From d87bd898fdf9057d9830bd7918d05e4aec0faedf Mon Sep 17 00:00:00 2001 From: Ewout Prangsma Date: Mon, 27 Aug 2018 12:09:33 +0200 Subject: [PATCH 1/3] Fixed PV creation on kubernetes 1.11 --- Makefile | 3 + deps/github.com/Azure/go-ansiterm/LICENSE | 21 + deps/github.com/Azure/go-ansiterm/README.md | 12 + .../github.com/Azure/go-ansiterm/constants.go | 188 + deps/github.com/Azure/go-ansiterm/context.go | 7 + .../Azure/go-ansiterm/csi_entry_state.go | 49 + .../Azure/go-ansiterm/csi_param_state.go | 38 + .../go-ansiterm/escape_intermediate_state.go | 36 + .../Azure/go-ansiterm/escape_state.go | 47 + .../Azure/go-ansiterm/event_handler.go | 90 + .../Azure/go-ansiterm/ground_state.go | 24 + .../Azure/go-ansiterm/osc_string_state.go | 31 + deps/github.com/Azure/go-ansiterm/parser.go | 136 + .../go-ansiterm/parser_action_helpers.go | 103 + .../Azure/go-ansiterm/parser_actions.go | 122 + deps/github.com/Azure/go-ansiterm/states.go | 71 + .../github.com/Azure/go-ansiterm/utilities.go | 21 + .../Azure/go-ansiterm/winterm/ansi.go | 182 + .../Azure/go-ansiterm/winterm/api.go | 322 + .../go-ansiterm/winterm/attr_translation.go | 100 + .../go-ansiterm/winterm/cursor_helpers.go | 101 + .../go-ansiterm/winterm/erase_helpers.go | 84 + .../go-ansiterm/winterm/scroll_helper.go | 118 + .../Azure/go-ansiterm/winterm/utilities.go | 9 + .../go-ansiterm/winterm/win_event_handler.go | 726 + .../Azure/go-autorest/autorest/adal/README.md | 19 +- .../Azure/go-autorest/autorest/adal/config.go | 8 +- .../Azure/go-autorest/autorest/adal/msi.go | 20 - .../go-autorest/autorest/adal/msi_windows.go | 25 - .../Azure/go-autorest/autorest/adal/token.go | 564 +- .../go-autorest/autorest/authorization.go | 53 +- .../Azure/go-autorest/autorest/autorest.go | 18 + .../Azure/go-autorest/autorest/azure/async.go | 922 +- .../Azure/go-autorest/autorest/azure/azure.go | 164 +- .../autorest/azure/environments.go | 19 +- .../autorest/azure/metadata_environment.go | 245 + .../Azure/go-autorest/autorest/azure/rp.go | 19 +- .../Azure/go-autorest/autorest/client.go | 19 +- .../Azure/go-autorest/autorest/sender.go | 22 +- .../Azure/go-autorest/autorest/utility.go | 10 + .../Azure/go-autorest/autorest/version.go | 33 +- .../Azure/go-autorest/version/version.go | 37 + .../go-driver/database_collections.go | 4 +- .../arangodb/go-driver/database_graphs.go | 2 +- deps/github.com/arangodb/go-driver/query.go | 2 +- .../arangodb/go-driver/test/indexes_test.go | 42 + .../beorn7/perks/quantile/stream.go | 34 +- deps/github.com/cenkalti/backoff/.travis.yml | 2 +- deps/github.com/cenkalti/backoff/README.md | 2 +- deps/github.com/cenkalti/backoff/context.go | 3 +- .../cenkalti/backoff/context_test.go | 3 +- .../cenkalti/backoff/example_test.go | 3 +- deps/github.com/cenkalti/backoff/retry.go | 1 - .../github.com/cenkalti/backoff/retry_test.go | 3 +- deps/github.com/cenkalti/backoff/ticker.go | 2 - .../cenkalti/backoff/ticker_test.go | 3 +- deps/github.com/cockroachdb/cmux/.gitignore | 24 + deps/github.com/cockroachdb/cmux/.travis.yml | 22 + deps/github.com/cockroachdb/cmux/LICENSE | 202 + deps/github.com/cockroachdb/cmux/README.md | 65 + deps/github.com/cockroachdb/cmux/buffer.go | 35 + deps/github.com/cockroachdb/cmux/cmux.go | 210 + deps/github.com/cockroachdb/cmux/matchers.go | 150 + deps/github.com/cockroachdb/cmux/patricia.go | 173 + deps/github.com/coreos/bbolt/.gitignore | 5 + deps/github.com/coreos/bbolt/LICENSE | 20 + deps/github.com/coreos/bbolt/Makefile | 30 + deps/github.com/coreos/bbolt/README.md | 928 + deps/github.com/coreos/bbolt/appveyor.yml | 18 + deps/github.com/coreos/bbolt/bolt_386.go | 10 + deps/github.com/coreos/bbolt/bolt_amd64.go | 10 + deps/github.com/coreos/bbolt/bolt_arm.go | 28 + deps/github.com/coreos/bbolt/bolt_arm64.go | 12 + deps/github.com/coreos/bbolt/bolt_linux.go | 10 + deps/github.com/coreos/bbolt/bolt_mips64x.go | 12 + deps/github.com/coreos/bbolt/bolt_mipsx.go | 12 + deps/github.com/coreos/bbolt/bolt_openbsd.go | 27 + deps/github.com/coreos/bbolt/bolt_ppc.go | 9 + deps/github.com/coreos/bbolt/bolt_ppc64.go | 12 + deps/github.com/coreos/bbolt/bolt_ppc64le.go | 12 + deps/github.com/coreos/bbolt/bolt_s390x.go | 12 + deps/github.com/coreos/bbolt/bolt_unix.go | 92 + .../coreos/bbolt/bolt_unix_solaris.go | 89 + deps/github.com/coreos/bbolt/bolt_windows.go | 145 + deps/github.com/coreos/bbolt/boltsync_unix.go | 8 + deps/github.com/coreos/bbolt/bucket.go | 775 + deps/github.com/coreos/bbolt/cursor.go | 400 + deps/github.com/coreos/bbolt/db.go | 1135 + deps/github.com/coreos/bbolt/doc.go | 44 + deps/github.com/coreos/bbolt/errors.go | 71 + deps/github.com/coreos/bbolt/freelist.go | 333 + deps/github.com/coreos/bbolt/node.go | 604 + deps/github.com/coreos/bbolt/page.go | 197 + deps/github.com/coreos/bbolt/tx.go | 705 + deps/github.com/coreos/etcd/alarm/alarms.go | 152 + deps/github.com/coreos/etcd/auth/doc.go | 16 + deps/github.com/coreos/etcd/auth/jwt.go | 137 + .../coreos/etcd/auth/range_perm_cache.go | 133 + .../coreos/etcd/auth/simple_token.go | 220 + deps/github.com/coreos/etcd/auth/store.go | 1059 + .../coreos/etcd/clientv3/concurrency/doc.go | 17 + .../etcd/clientv3/concurrency/election.go | 246 + .../coreos/etcd/clientv3/concurrency/key.go | 66 + .../coreos/etcd/clientv3/concurrency/mutex.go | 119 + .../etcd/clientv3/concurrency/session.go | 142 + .../coreos/etcd/clientv3/concurrency/stm.go | 388 + .../coreos/etcd/clientv3/namespace/doc.go | 43 + .../coreos/etcd/clientv3/namespace/kv.go | 189 + .../coreos/etcd/clientv3/namespace/lease.go | 58 + .../coreos/etcd/clientv3/namespace/util.go | 42 + .../coreos/etcd/clientv3/namespace/watch.go | 84 + .../coreos/etcd/clientv3/naming/doc.go | 56 + .../coreos/etcd/clientv3/naming/grpc.go | 132 + .../coreos/etcd/compactor/compactor.go | 137 + deps/github.com/coreos/etcd/compactor/doc.go | 16 + .../coreos/etcd/discovery/discovery.go | 362 + deps/github.com/coreos/etcd/embed/config.go | 464 + deps/github.com/coreos/etcd/embed/doc.go | 45 + deps/github.com/coreos/etcd/embed/etcd.go | 509 + deps/github.com/coreos/etcd/embed/serve.go | 244 + deps/github.com/coreos/etcd/embed/util.go | 30 + deps/github.com/coreos/etcd/error/error.go | 163 + .../coreos/etcd/etcdserver/api/capability.go | 86 + .../coreos/etcd/etcdserver/api/cluster.go | 41 + .../coreos/etcd/etcdserver/api/doc.go | 16 + .../etcd/etcdserver/api/etcdhttp/base.go | 186 + .../etcd/etcdserver/api/etcdhttp/peer.go | 78 + .../etcd/etcdserver/api/v2http/capability.go | 40 + .../etcd/etcdserver/api/v2http/client.go | 718 + .../etcd/etcdserver/api/v2http/client_auth.go | 543 + .../coreos/etcd/etcdserver/api/v2http/doc.go | 16 + .../coreos/etcd/etcdserver/api/v2http/http.go | 74 + .../etcdserver/api/v2http/httptypes/errors.go | 56 + .../etcdserver/api/v2http/httptypes/member.go | 69 + .../etcd/etcdserver/api/v2http/metrics.go | 96 + .../etcd/etcdserver/api/v3client/doc.go | 45 + .../etcd/etcdserver/api/v3client/v3client.go | 67 + .../etcd/etcdserver/api/v3election/doc.go | 16 + .../etcdserver/api/v3election/election.go | 123 + .../v3electionpb/gw/v3election.pb.gw.go | 313 + .../v3election/v3electionpb/v3election.pb.go | 2098 + .../v3election/v3electionpb/v3election.proto | 119 + .../coreos/etcd/etcdserver/api/v3lock/doc.go | 16 + .../coreos/etcd/etcdserver/api/v3lock/lock.go | 56 + .../api/v3lock/v3lockpb/gw/v3lock.pb.gw.go | 167 + .../api/v3lock/v3lockpb/v3lock.pb.go | 978 + .../api/v3lock/v3lockpb/v3lock.proto | 65 + .../coreos/etcd/etcdserver/api/v3rpc/auth.go | 157 + .../coreos/etcd/etcdserver/api/v3rpc/codec.go | 34 + .../coreos/etcd/etcdserver/api/v3rpc/grpc.go | 71 + .../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 | 125 + .../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 + .../coreos/etcd/etcdserver/api/v3rpc/util.go | 103 + .../coreos/etcd/etcdserver/api/v3rpc/watch.go | 430 + .../coreos/etcd/etcdserver/apply.go | 878 + .../coreos/etcd/etcdserver/apply_auth.go | 196 + .../coreos/etcd/etcdserver/apply_v2.go | 140 + .../coreos/etcd/etcdserver/auth/auth.go | 647 + .../etcd/etcdserver/auth/auth_requests.go | 166 + .../coreos/etcd/etcdserver/backend.go | 81 + .../coreos/etcd/etcdserver/cluster_util.go | 258 + .../coreos/etcd/etcdserver/config.go | 209 + .../etcd/etcdserver/consistent_index.go | 33 + deps/github.com/coreos/etcd/etcdserver/doc.go | 16 + .../coreos/etcd/etcdserver/errors.go | 46 + .../etcdserver/etcdserverpb/gw/rpc.pb.gw.go | 1996 + .../etcd/etcdserver/membership/cluster.go | 512 + .../coreos/etcd/etcdserver/membership/doc.go | 16 + .../etcd/etcdserver/membership/errors.go | 33 + .../etcd/etcdserver/membership/member.go | 124 + .../etcd/etcdserver/membership/store.go | 193 + .../coreos/etcd/etcdserver/metrics.go | 102 + .../coreos/etcd/etcdserver/quota.go | 121 + .../github.com/coreos/etcd/etcdserver/raft.go | 594 + .../coreos/etcd/etcdserver/server.go | 1664 + .../coreos/etcd/etcdserver/snapshot_merge.go | 73 + .../coreos/etcd/etcdserver/stats/leader.go | 128 + .../coreos/etcd/etcdserver/stats/queue.go | 110 + .../coreos/etcd/etcdserver/stats/server.go | 142 + .../coreos/etcd/etcdserver/stats/stats.go | 32 + .../coreos/etcd/etcdserver/storage.go | 98 + .../github.com/coreos/etcd/etcdserver/util.go | 97 + .../coreos/etcd/etcdserver/v2_server.go | 125 + .../coreos/etcd/etcdserver/v3_server.go | 686 + .../coreos/etcd/integration/bridge.go | 228 + .../coreos/etcd/integration/cluster.go | 999 + .../coreos/etcd/integration/cluster_direct.go | 41 + .../coreos/etcd/integration/cluster_proxy.go | 115 + .../github.com/coreos/etcd/integration/doc.go | 25 + deps/github.com/coreos/etcd/lease/doc.go | 16 + .../coreos/etcd/lease/leasehttp/doc.go | 16 + .../coreos/etcd/lease/leasehttp/http.go | 242 + .../coreos/etcd/lease/leasepb/lease.pb.go | 608 + .../coreos/etcd/lease/leasepb/lease.proto | 24 + deps/github.com/coreos/etcd/lease/lessor.go | 643 + .../coreos/etcd/mvcc/backend/backend.go | 443 + .../coreos/etcd/mvcc/backend/batch_tx.go | 266 + .../etcd/mvcc/backend/config_default.go | 23 + .../coreos/etcd/mvcc/backend/config_linux.go | 33 + .../etcd/mvcc/backend/config_windows.go | 26 + .../coreos/etcd/mvcc/backend/doc.go | 16 + .../coreos/etcd/mvcc/backend/metrics.go | 41 + .../coreos/etcd/mvcc/backend/read_tx.go | 92 + .../coreos/etcd/mvcc/backend/tx_buffer.go | 181 + deps/github.com/coreos/etcd/mvcc/doc.go | 16 + deps/github.com/coreos/etcd/mvcc/index.go | 219 + deps/github.com/coreos/etcd/mvcc/key_index.go | 332 + deps/github.com/coreos/etcd/mvcc/kv.go | 147 + deps/github.com/coreos/etcd/mvcc/kv_view.go | 53 + deps/github.com/coreos/etcd/mvcc/kvstore.go | 459 + .../coreos/etcd/mvcc/kvstore_compaction.go | 66 + .../coreos/etcd/mvcc/kvstore_txn.go | 253 + deps/github.com/coreos/etcd/mvcc/metrics.go | 174 + .../coreos/etcd/mvcc/metrics_txn.go | 67 + deps/github.com/coreos/etcd/mvcc/revision.go | 67 + deps/github.com/coreos/etcd/mvcc/util.go | 56 + .../coreos/etcd/mvcc/watchable_store.go | 522 + .../coreos/etcd/mvcc/watchable_store_txn.go | 53 + deps/github.com/coreos/etcd/mvcc/watcher.go | 171 + .../coreos/etcd/mvcc/watcher_group.go | 283 + deps/github.com/coreos/etcd/pkg/adt/doc.go | 16 + .../coreos/etcd/pkg/adt/interval_tree.go | 590 + .../coreos/etcd/pkg/contention/contention.go | 69 + .../coreos/etcd/pkg/contention/doc.go | 16 + deps/github.com/coreos/etcd/pkg/cors/cors.go | 90 + .../github.com/coreos/etcd/pkg/cpuutil/doc.go | 16 + .../coreos/etcd/pkg/cpuutil/endian.go | 36 + deps/github.com/coreos/etcd/pkg/crc/crc.go | 43 + .../coreos/etcd/pkg/debugutil/doc.go | 16 + .../coreos/etcd/pkg/debugutil/pprof.go | 47 + .../coreos/etcd/pkg/fileutil/dir_unix.go | 22 + .../coreos/etcd/pkg/fileutil/dir_windows.go | 46 + .../coreos/etcd/pkg/fileutil/fileutil.go | 122 + .../coreos/etcd/pkg/fileutil/lock.go | 26 + .../coreos/etcd/pkg/fileutil/lock_flock.go | 49 + .../coreos/etcd/pkg/fileutil/lock_linux.go | 97 + .../coreos/etcd/pkg/fileutil/lock_plan9.go | 45 + .../coreos/etcd/pkg/fileutil/lock_solaris.go | 62 + .../coreos/etcd/pkg/fileutil/lock_unix.go | 29 + .../coreos/etcd/pkg/fileutil/lock_windows.go | 125 + .../coreos/etcd/pkg/fileutil/preallocate.go | 54 + .../etcd/pkg/fileutil/preallocate_darwin.go | 43 + .../etcd/pkg/fileutil/preallocate_unix.go | 49 + .../pkg/fileutil/preallocate_unsupported.go | 25 + .../coreos/etcd/pkg/fileutil/purge.go | 78 + .../coreos/etcd/pkg/fileutil/sync.go | 29 + .../coreos/etcd/pkg/fileutil/sync_darwin.go | 40 + .../coreos/etcd/pkg/fileutil/sync_linux.go | 34 + .../coreos/etcd/pkg/httputil/httputil.go | 22 + deps/github.com/coreos/etcd/pkg/idutil/id.go | 78 + .../coreos/etcd/pkg/ioutil/pagewriter.go | 106 + .../coreos/etcd/pkg/ioutil/readcloser.go | 66 + .../coreos/etcd/pkg/ioutil/reader.go | 40 + .../github.com/coreos/etcd/pkg/ioutil/util.go | 43 + .../coreos/etcd/pkg/logutil/merge_logger.go | 195 + .../coreos/etcd/pkg/monotime/issue15006.s | 6 + .../coreos/etcd/pkg/monotime/monotime.go | 26 + .../coreos/etcd/pkg/monotime/nanotime.go | 24 + .../coreos/etcd/pkg/netutil/isolate_linux.go | 82 + .../coreos/etcd/pkg/netutil/isolate_stub.go | 25 + .../coreos/etcd/pkg/netutil/netutil.go | 169 + .../coreos/etcd/pkg/netutil/routes.go | 33 + .../coreos/etcd/pkg/netutil/routes_linux.go | 250 + .../coreos/etcd/pkg/pbutil/pbutil.go | 60 + .../coreos/etcd/pkg/runtime/fds_linux.go | 37 + .../coreos/etcd/pkg/runtime/fds_other.go | 30 + .../coreos/etcd/pkg/schedule/doc.go | 16 + .../coreos/etcd/pkg/schedule/schedule.go | 166 + .../coreos/etcd/pkg/testutil/assert.go | 62 + .../coreos/etcd/pkg/testutil/leak.go | 138 + .../etcd/pkg/testutil/pauseable_handler.go | 57 + .../coreos/etcd/pkg/testutil/recorder.go | 132 + .../coreos/etcd/pkg/testutil/testutil.go | 57 + deps/github.com/coreos/etcd/pkg/wait/wait.go | 91 + .../coreos/etcd/pkg/wait/wait_time.go | 66 + .../proxy/grpcproxy/adapter/chan_stream.go | 165 + .../adapter/cluster_client_adapter.go | 44 + .../etcd/proxy/grpcproxy/adapter/doc.go | 17 + .../adapter/election_client_adapter.go | 79 + .../grpcproxy/adapter/kv_client_adapter.go | 47 + .../grpcproxy/adapter/lease_client_adapter.go | 77 + .../grpcproxy/adapter/lock_client_adapter.go | 36 + .../adapter/maintenance_client_adapter.go | 79 + .../grpcproxy/adapter/watch_client_adapter.go | 66 + .../coreos/etcd/proxy/grpcproxy/auth.go | 110 + .../etcd/proxy/grpcproxy/cache/store.go | 168 + .../coreos/etcd/proxy/grpcproxy/cluster.go | 177 + .../coreos/etcd/proxy/grpcproxy/doc.go | 16 + .../coreos/etcd/proxy/grpcproxy/election.go | 65 + .../coreos/etcd/proxy/grpcproxy/kv.go | 226 + .../coreos/etcd/proxy/grpcproxy/leader.go | 114 + .../coreos/etcd/proxy/grpcproxy/lease.go | 367 + .../coreos/etcd/proxy/grpcproxy/lock.go | 38 + .../coreos/etcd/proxy/grpcproxy/logger.go | 19 + .../etcd/proxy/grpcproxy/maintenance.go | 79 + .../coreos/etcd/proxy/grpcproxy/metrics.go | 58 + .../coreos/etcd/proxy/grpcproxy/register.go | 94 + .../coreos/etcd/proxy/grpcproxy/watch.go | 262 + .../etcd/proxy/grpcproxy/watch_broadcast.go | 151 + .../etcd/proxy/grpcproxy/watch_broadcasts.go | 135 + .../etcd/proxy/grpcproxy/watch_ranges.go | 69 + .../coreos/etcd/proxy/grpcproxy/watcher.go | 128 + deps/github.com/coreos/etcd/raft/README.md | 196 + deps/github.com/coreos/etcd/raft/design.md | 57 + deps/github.com/coreos/etcd/raft/doc.go | 300 + deps/github.com/coreos/etcd/raft/log.go | 358 + .../coreos/etcd/raft/log_unstable.go | 159 + deps/github.com/coreos/etcd/raft/logger.go | 126 + deps/github.com/coreos/etcd/raft/node.go | 537 + deps/github.com/coreos/etcd/raft/progress.go | 279 + deps/github.com/coreos/etcd/raft/raft.go | 1257 + .../coreos/etcd/raft/raftpb/raft.pb.go | 1942 + .../coreos/etcd/raft/raftpb/raft.proto | 93 + deps/github.com/coreos/etcd/raft/rawnode.go | 264 + deps/github.com/coreos/etcd/raft/read_only.go | 118 + deps/github.com/coreos/etcd/raft/status.go | 76 + deps/github.com/coreos/etcd/raft/storage.go | 271 + deps/github.com/coreos/etcd/raft/util.go | 129 + deps/github.com/coreos/etcd/rafthttp/coder.go | 27 + deps/github.com/coreos/etcd/rafthttp/doc.go | 16 + deps/github.com/coreos/etcd/rafthttp/http.go | 359 + .../coreos/etcd/rafthttp/metrics.go | 73 + .../coreos/etcd/rafthttp/msg_codec.go | 68 + .../coreos/etcd/rafthttp/msgappv2_codec.go | 248 + deps/github.com/coreos/etcd/rafthttp/peer.go | 307 + .../coreos/etcd/rafthttp/peer_status.go | 77 + .../coreos/etcd/rafthttp/pipeline.go | 160 + .../coreos/etcd/rafthttp/probing_status.go | 67 + .../github.com/coreos/etcd/rafthttp/remote.go | 69 + .../coreos/etcd/rafthttp/snapshot_sender.go | 157 + .../github.com/coreos/etcd/rafthttp/stream.go | 527 + .../coreos/etcd/rafthttp/transport.go | 402 + .../coreos/etcd/rafthttp/urlpick.go | 57 + deps/github.com/coreos/etcd/rafthttp/util.go | 177 + deps/github.com/coreos/etcd/snap/db.go | 77 + deps/github.com/coreos/etcd/snap/message.go | 64 + deps/github.com/coreos/etcd/snap/metrics.go | 41 + .../coreos/etcd/snap/snappb/snap.pb.go | 353 + .../coreos/etcd/snap/snappb/snap.proto | 14 + .../coreos/etcd/snap/snapshotter.go | 204 + deps/github.com/coreos/etcd/store/doc.go | 16 + deps/github.com/coreos/etcd/store/event.go | 71 + .../coreos/etcd/store/event_history.go | 129 + .../coreos/etcd/store/event_queue.go | 34 + deps/github.com/coreos/etcd/store/metrics.go | 128 + deps/github.com/coreos/etcd/store/node.go | 395 + .../coreos/etcd/store/node_extern.go | 116 + deps/github.com/coreos/etcd/store/stats.go | 146 + deps/github.com/coreos/etcd/store/store.go | 791 + .../coreos/etcd/store/ttl_key_heap.go | 99 + deps/github.com/coreos/etcd/store/watcher.go | 95 + .../coreos/etcd/store/watcher_hub.go | 200 + deps/github.com/coreos/etcd/wal/decoder.go | 185 + deps/github.com/coreos/etcd/wal/doc.go | 75 + deps/github.com/coreos/etcd/wal/encoder.go | 120 + .../coreos/etcd/wal/file_pipeline.go | 97 + deps/github.com/coreos/etcd/wal/metrics.go | 31 + deps/github.com/coreos/etcd/wal/repair.go | 99 + deps/github.com/coreos/etcd/wal/util.go | 107 + deps/github.com/coreos/etcd/wal/wal.go | 628 + deps/github.com/coreos/etcd/wal/wal_unix.go | 44 + .../github.com/coreos/etcd/wal/wal_windows.go | 41 + .../coreos/etcd/wal/walpb/record.go | 29 + .../coreos/etcd/wal/walpb/record.pb.go | 521 + .../coreos/etcd/wal/walpb/record.proto | 20 + deps/github.com/coreos/go-oidc/LICENSE | 202 - deps/github.com/coreos/go-oidc/NOTICE | 5 - deps/github.com/coreos/go-oidc/http/client.go | 7 - deps/github.com/coreos/go-oidc/http/doc.go | 2 - deps/github.com/coreos/go-oidc/http/http.go | 161 - deps/github.com/coreos/go-oidc/http/url.go | 29 - deps/github.com/coreos/go-oidc/jose/claims.go | 126 - deps/github.com/coreos/go-oidc/jose/doc.go | 2 - deps/github.com/coreos/go-oidc/jose/jose.go | 112 - deps/github.com/coreos/go-oidc/jose/jwk.go | 135 - deps/github.com/coreos/go-oidc/jose/jws.go | 51 - deps/github.com/coreos/go-oidc/jose/jwt.go | 82 - deps/github.com/coreos/go-oidc/jose/sig.go | 24 - .../github.com/coreos/go-oidc/jose/sig_rsa.go | 67 - deps/github.com/coreos/go-oidc/key/doc.go | 2 - deps/github.com/coreos/go-oidc/key/key.go | 153 - deps/github.com/coreos/go-oidc/key/manager.go | 99 - deps/github.com/coreos/go-oidc/key/repo.go | 55 - deps/github.com/coreos/go-oidc/key/rotate.go | 159 - deps/github.com/coreos/go-oidc/key/sync.go | 91 - deps/github.com/coreos/go-oidc/oauth2/doc.go | 2 - .../github.com/coreos/go-oidc/oauth2/error.go | 29 - .../coreos/go-oidc/oauth2/oauth2.go | 416 - deps/github.com/coreos/go-oidc/oidc/client.go | 846 - deps/github.com/coreos/go-oidc/oidc/doc.go | 2 - .../coreos/go-oidc/oidc/identity.go | 44 - .../coreos/go-oidc/oidc/interface.go | 3 - deps/github.com/coreos/go-oidc/oidc/key.go | 67 - .../coreos/go-oidc/oidc/provider.go | 687 - .../coreos/go-oidc/oidc/transport.go | 88 - deps/github.com/coreos/go-oidc/oidc/util.go | 109 - .../coreos/go-oidc/oidc/verification.go | 190 - .../coreos/go-systemd/journal/journal.go | 179 + deps/github.com/coreos/pkg/capnslog/README.md | 39 + .../coreos/pkg/capnslog/formatters.go | 157 + .../coreos/pkg/capnslog/glog_formatter.go | 96 + deps/github.com/coreos/pkg/capnslog/init.go | 49 + .../coreos/pkg/capnslog/init_windows.go | 25 + .../coreos/pkg/capnslog/journald_formatter.go | 68 + .../coreos/pkg/capnslog/log_hijack.go | 39 + deps/github.com/coreos/pkg/capnslog/logmap.go | 240 + .../coreos/pkg/capnslog/pkg_logger.go | 177 + .../coreos/pkg/capnslog/syslog_formatter.go | 65 + deps/github.com/coreos/pkg/health/README.md | 11 - deps/github.com/coreos/pkg/health/health.go | 127 - deps/github.com/coreos/pkg/httputil/README.md | 13 - deps/github.com/coreos/pkg/httputil/cookie.go | 21 - deps/github.com/coreos/pkg/httputil/json.go | 27 - .../github.com/coreos/pkg/timeutil/backoff.go | 15 - .../github.com/davecgh/go-spew/spew/common.go | 2 +- deps/github.com/dgrijalva/jwt-go/README.md | 27 +- .../dgrijalva/jwt-go/VERSION_HISTORY.md | 7 + deps/github.com/dgrijalva/jwt-go/ecdsa.go | 1 + deps/github.com/dgrijalva/jwt-go/hmac.go | 3 +- deps/github.com/dgrijalva/jwt-go/parser.go | 113 +- .../dgrijalva/jwt-go/parser_test.go | 40 + .../dgrijalva/jwt-go/request/request.go | 58 +- deps/github.com/dgrijalva/jwt-go/rsa.go | 5 +- deps/github.com/dgrijalva/jwt-go/rsa_test.go | 9 + deps/github.com/dgrijalva/jwt-go/rsa_utils.go | 32 + .../dgrijalva/jwt-go/test/privateSecure.pem | 30 + deps/github.com/docker/docker/AUTHORS | 1885 + deps/github.com/docker/docker/LICENSE | 191 + deps/github.com/docker/docker/NOTICE | 19 + .../docker/docker/pkg/term/ascii.go | 66 + .../docker/docker/pkg/term/proxy.go | 74 + deps/github.com/docker/docker/pkg/term/tc.go | 21 + .../docker/docker/pkg/term/tc_solaris_cgo.go | 65 + .../github.com/docker/docker/pkg/term/term.go | 124 + .../docker/docker/pkg/term/term_windows.go | 237 + .../docker/docker/pkg/term/termios_bsd.go | 42 + .../docker/docker/pkg/term/termios_linux.go | 37 + .../docker/pkg/term/windows/ansi_reader.go | 263 + .../docker/pkg/term/windows/ansi_writer.go | 64 + .../docker/docker/pkg/term/windows/console.go | 35 + .../docker/docker/pkg/term/windows/windows.go | 33 + .../docker/docker/pkg/term/winsize.go | 30 + .../docker/pkg/term/winsize_solaris_cgo.go | 42 + deps/github.com/dustin/go-humanize/.gitignore | 6 - deps/github.com/dustin/go-humanize/comma.go | 8 + .../dustin/go-humanize/comma_test.go | 9 + .../dustin/go-humanize/english/words.go | 4 +- .../dustin/go-humanize/english/words_test.go | 1 + deps/github.com/dustin/go-humanize/ftoa.go | 25 +- .../dustin/go-humanize/ftoa_test.go | 68 + deps/github.com/dustin/go-humanize/si.go | 10 + deps/github.com/dustin/go-humanize/si_test.go | 23 + deps/github.com/evanphx/json-patch/README.md | 287 +- deps/github.com/evanphx/json-patch/merge.go | 102 +- deps/github.com/evanphx/json-patch/patch.go | 24 +- .../gin-gonic/gin/.github/ISSUE_TEMPLATE.md | 13 + .../gin/.github/PULL_REQUEST_TEMPLATE.md | 7 + deps/github.com/gin-gonic/gin/AUTHORS.md | 6 +- deps/github.com/gin-gonic/gin/CHANGELOG.md | 24 +- deps/github.com/gin-gonic/gin/README.md | 190 +- deps/github.com/gin-gonic/gin/auth_test.go | 12 +- .../gin-gonic/gin/benchmarks_test.go | 6 +- .../gin/binding/binding_body_test.go | 6 +- .../gin-gonic/gin/binding/binding_test.go | 14 +- .../gin-gonic/gin/binding/example/test.pb.go | 113 - .../gin-gonic/gin/binding/example/test.proto | 12 - .../gin-gonic/gin/binding/form_mapping.go | 18 +- deps/github.com/gin-gonic/gin/context.go | 89 +- deps/github.com/gin-gonic/gin/context_17.go | 17 + .../gin-gonic/gin/context_17_test.go | 27 + deps/github.com/gin-gonic/gin/context_test.go | 344 +- deps/github.com/gin-gonic/gin/debug_test.go | 2 +- deps/github.com/gin-gonic/gin/errors_test.go | 18 +- .../gin-gonic/gin/examples/basic/main.go | 10 +- .../gin-gonic/gin/examples/basic/main_test.go | 2 +- .../gin-gonic/gin/examples/favicon/main.go | 4 +- .../gin-gonic/gin/examples/http2/main.go | 3 +- .../gin/examples/realtime-advanced/routes.go | 11 +- .../gin/examples/realtime-chat/main.go | 5 +- .../gin-gonic/gin/examples/template/main.go | 2 +- deps/github.com/gin-gonic/gin/gin.go | 71 +- deps/github.com/gin-gonic/gin/ginS/gins.go | 2 +- deps/github.com/gin-gonic/gin/gin_test.go | 8 +- .../gin-gonic/gin/githubapi_test.go | 2 +- deps/github.com/gin-gonic/gin/json/json.go | 1 + .../github.com/gin-gonic/gin/json/jsoniter.go | 1 + deps/github.com/gin-gonic/gin/logger.go | 7 +- deps/github.com/gin-gonic/gin/logger_test.go | 17 +- .../gin-gonic/gin/middleware_test.go | 33 +- deps/github.com/gin-gonic/gin/path.go | 4 +- .../github.com/gin-gonic/gin/recovery_test.go | 27 +- deps/github.com/gin-gonic/gin/render/json.go | 30 + .../gin-gonic/gin/render/json_17.go | 28 + .../gin-gonic/gin/render/msgpack.go | 4 +- .../gin-gonic/gin/render/protobuf.go | 33 + .../github.com/gin-gonic/gin/render/reader.go | 4 + .../gin-gonic/gin/render/redirect.go | 2 + .../github.com/gin-gonic/gin/render/render.go | 2 + .../gin-gonic/gin/render/render_17_test.go | 26 + .../gin-gonic/gin/render/render_test.go | 89 +- deps/github.com/gin-gonic/gin/render/text.go | 4 +- .../gin-gonic/gin/response_writer.go | 1 + .../gin-gonic/gin/response_writer_test.go | 36 +- .../gin-gonic/gin/routergroup_test.go | 7 +- deps/github.com/gin-gonic/gin/routes_test.go | 98 +- deps/github.com/gin-gonic/gin/test_helpers.go | 4 +- .../certificate}/cert.pem | 0 .../testdata => testdata/certificate}/key.pem | 0 .../gin/testdata/protoexample/test.pb.go | 113 + .../gin/testdata/protoexample/test.proto | 12 + .../basic => testdata/template}/hello.tmpl | 0 .../basic => testdata/template}/raw.tmpl | 0 deps/github.com/gin-gonic/gin/utils_test.go | 21 +- .../gin-gonic/gin/vendor/vendor.json | 72 - deps/github.com/go-openapi/spec/expander.go | 690 +- deps/github.com/go-openapi/spec/items.go | 12 +- deps/github.com/go-openapi/spec/operation.go | 27 +- deps/github.com/go-openapi/spec/ref.go | 3 + deps/github.com/go-openapi/spec/schema.go | 26 +- .../github.com/go-openapi/validate/.drone.sec | 1 - .../github.com/go-openapi/validate/.drone.yml | 40 - .../go-openapi/validate/.pullapprove.yml | 13 - .../go-openapi/validate/.travis.yml | 22 + deps/github.com/go-openapi/validate/README.md | 2 +- .../github.com/go-openapi/validate/formats.go | 5 +- .../go-openapi/validate/object_validator.go | 73 +- deps/github.com/go-openapi/validate/result.go | 30 +- deps/github.com/go-openapi/validate/schema.go | 48 +- .../go-openapi/validate/schema_props.go | 17 +- .../go-openapi/validate/slice_validator.go | 3 + deps/github.com/go-openapi/validate/spec.go | 88 +- deps/github.com/go-openapi/validate/type.go | 19 +- .../go-openapi/validate/update-fixtures.sh | 15 + .../go-openapi/validate/validator.go | 33 +- deps/github.com/go-openapi/validate/values.go | 6 +- deps/github.com/go-webpack/webpack/.gitignore | 4 - .../github.com/go-webpack/webpack/LICENSE.txt | 22 - deps/github.com/go-webpack/webpack/README.md | 202 - .../go-webpack/webpack/helper/helper.go | 30 - .../webpack/reader/manifest/manifest.go | 28 - .../go-webpack/webpack/reader/reader.go | 21 - .../go-webpack/webpack/reader/stats/fetch.go | 43 - .../webpack/reader/stats/response.go | 13 - .../go-webpack/webpack/reader/stats/stats.go | 64 - .../go-webpack/webpack/util/util.go | 12 - deps/github.com/go-webpack/webpack/webpack.go | 98 - deps/github.com/gogo/protobuf/.gitignore | 6 + deps/github.com/gogo/protobuf/.mailmap | 8 + deps/github.com/gogo/protobuf/.travis.yml | 22 + deps/github.com/gogo/protobuf/AUTHORS | 1 + deps/github.com/gogo/protobuf/CONTRIBUTORS | 5 + .../gogo/protobuf/GOLANG_CONTRIBUTORS | 5 + deps/github.com/gogo/protobuf/LICENSE | 5 +- deps/github.com/gogo/protobuf/Makefile | 178 + deps/github.com/gogo/protobuf/README | 304 + deps/github.com/gogo/protobuf/Readme.md | 158 + deps/github.com/gogo/protobuf/bench.md | 190 + deps/github.com/gogo/protobuf/codec/codec.go | 91 + .../gogo/protobuf/codec/codec_test.go | 54 + .../gogo/protobuf/conformance/Makefile | 59 + .../protobuf/conformance}/conformance.go | 13 +- .../gogo/protobuf/conformance/conformance.sh | 4 + .../conformance_proto/conformance.pb.go | 1814 + .../conformance_proto/conformance.proto | 12 - .../gogo/protobuf/conformance/test.sh | 26 + deps/github.com/gogo/protobuf/custom_types.md | 68 + deps/github.com/gogo/protobuf/extensions.md | 164 + .../gogo/protobuf/gogoproto/Makefile | 2 +- .../gogo/protobuf/gogoproto/gogo.pb.go | 335 +- .../gogo/protobuf/gogoproto/gogo.proto | 4 + .../gogo/protobuf/gogoproto/helper.go | 7 +- .../gogo/protobuf/gogoreplace/main.go | 25 + .../gogo/protobuf/install-protobuf.sh | 28 + deps/github.com/gogo/protobuf/io/full.go | 102 + deps/github.com/gogo/protobuf/io/io.go | 70 + deps/github.com/gogo/protobuf/io/io_test.go | 221 + deps/github.com/gogo/protobuf/io/uint32.go | 138 + .../gogo/protobuf/io/uint32_test.go | 38 + deps/github.com/gogo/protobuf/io/varint.go | 134 + .../github.com/gogo/protobuf/jsonpb/jsonpb.go | 1386 + .../gogo/protobuf/jsonpb/jsonpb_test.go | 1142 + .../jsonpb/jsonpb_test_proto/Makefile | 33 + .../jsonpb/jsonpb_test_proto/bytes.go | 7 + .../jsonpb_test_proto/more_test_objects.pb.go | 368 + .../jsonpb_test_proto/more_test_objects.proto | 69 + .../jsonpb_test_proto/test_objects.pb.go | 1287 + .../jsonpb_test_proto/test_objects.proto | 175 + .../gogo/protobuf/plugin/compare/compare.go | 2 +- .../protobuf/plugin/embedcheck/embedcheck.go | 5 +- .../gogo/protobuf/plugin/equal/equal.go | 40 +- .../gogo/protobuf/plugin/gostring/gostring.go | 47 +- .../protobuf/plugin/gostring/gostringtest.go | 2 +- .../protobuf/plugin/marshalto/marshalto.go | 464 +- .../gogo/protobuf/plugin/populate/populate.go | 18 +- .../gogo/protobuf/plugin/size/size.go | 2 +- .../gogo/protobuf/plugin/testgen/testgen.go | 19 - .../gogo/protobuf/plugin/union/union.go | 2 +- .../protobuf/plugin/unmarshal/unmarshal.go | 522 +- deps/github.com/gogo/protobuf/proto/Makefile | 4 +- .../gogo/protobuf/proto/all_test.go | 2421 + .../gogo/protobuf/proto/any_test.go | 300 + deps/github.com/gogo/protobuf/proto/clone.go | 46 +- .../gogo/protobuf/proto/clone_test.go | 397 + .../gogo/protobuf/proto/custom_gogo.go | 39 + deps/github.com/gogo/protobuf/proto/decode.go | 676 +- .../gogo/protobuf/proto/decode_gogo.go | 172 - .../gogo/protobuf/proto/decode_test.go | 259 + .../github.com/gogo/protobuf/proto/discard.go | 350 + .../gogo/protobuf/proto/discard_test.go | 169 + .../gogo/protobuf/proto/duration_gogo.go | 154 - deps/github.com/gogo/protobuf/proto/encode.go | 1204 +- .../gogo/protobuf/proto/encode_gogo.go | 317 - .../gogo/protobuf/proto/encode_test.go | 84 + deps/github.com/gogo/protobuf/proto/equal.go | 30 +- .../gogo/protobuf/proto/equal_test.go | 244 + .../gogo/protobuf/proto/extensions.go | 283 +- .../gogo/protobuf/proto/extensions_gogo.go | 162 +- .../gogo/protobuf/proto/extensions_test.go | 691 + deps/github.com/gogo/protobuf/proto/lib.go | 89 +- .../gogo/protobuf/proto/lib_gogo.go | 8 + .../gogo/protobuf/proto/map_test.go | 70 + .../gogo/protobuf/proto/message_set.go | 81 +- .../gogo/protobuf/proto/message_set_test.go | 77 + .../gogo/protobuf/proto/pointer_reflect.go | 595 +- .../protobuf/proto/pointer_reflect_gogo.go | 64 +- .../gogo/protobuf/proto/pointer_unsafe.go | 366 +- .../protobuf/proto/pointer_unsafe_gogo.go | 100 +- .../gogo/protobuf/proto/properties.go | 472 +- .../gogo/protobuf/proto/properties_gogo.go | 81 +- .../gogo/protobuf/proto/proto3_proto/Makefile | 7 + .../protobuf/proto/proto3_proto/proto3.pb.go | 461 + .../protobuf/proto/proto3_proto/proto3.proto | 89 + .../gogo/protobuf/proto/proto3_test.go | 151 + .../gogo/protobuf/proto/size2_test.go | 63 + .../gogo/protobuf/proto/size_test.go | 190 + .../gogo/protobuf/proto/table_marshal.go | 2799 + .../gogo/protobuf/proto/table_marshal_gogo.go | 388 + .../gogo/protobuf/proto/table_merge.go | 657 + .../gogo/protobuf/proto/table_unmarshal.go | 2048 + .../protobuf/proto/table_unmarshal_gogo.go | 385 + .../gogo/protobuf/proto/test_proto/Makefile | 37 + .../proto/test_proto/deterministic.go | 5 + .../gogo/protobuf/proto/test_proto/test.pb.go | 5159 ++ .../gogo/protobuf/proto/test_proto/test.proto | 566 + deps/github.com/gogo/protobuf/proto/text.go | 84 +- .../gogo/protobuf/proto/text_parser.go | 75 +- .../gogo/protobuf/proto/text_parser_test.go | 706 + .../gogo/protobuf/proto/text_test.go | 518 + .../gogo/protobuf/proto/timestamp_gogo.go | 180 - .../gogo/protobuf/protobuf/Makefile | 64 + .../protobuf/google/protobuf/any.proto | 154 + .../protobuf/google/protobuf/api.proto | 210 + .../google/protobuf/compiler/plugin.proto | 167 + .../protobuf/google/protobuf/descriptor.proto | 872 + .../protobuf/google/protobuf/duration.proto | 117 + .../protobuf/google/protobuf/empty.proto | 52 + .../protobuf/google/protobuf/field_mask.proto | 252 + .../google/protobuf/source_context.proto | 48 + .../protobuf/google/protobuf/struct.proto | 96 + .../protobuf/google/protobuf/timestamp.proto | 135 + .../protobuf/google/protobuf/type.proto | 187 + .../protobuf/google/protobuf/wrappers.proto | 118 + .../gogo/protobuf/protoc-gen-combo/combo.go | 182 + .../gogo/protobuf/protoc-gen-gofast/main.go | 48 + .../gogo/protobuf/protoc-gen-gogo/Makefile | 41 + .../descriptor/descriptor.pb.go | 1314 +- .../descriptor/descriptor_gostring.gen.go | 101 +- .../descriptor/descriptor_test.go | 31 + .../gogo/protobuf/protoc-gen-gogo/doc.go | 51 + .../protoc-gen-gogo/generator/generator.go | 1402 +- .../protoc-gen-gogo/generator/helper.go | 23 +- .../generator/internal/remap/remap.go | 117 + .../generator/internal/remap/remap_test.go | 82 + .../protoc-gen-gogo/generator/name_test.go | 115 + .../protobuf/protoc-gen-gogo/golden_test.go | 407 + .../protobuf/protoc-gen-gogo/grpc/grpc.go | 41 +- .../gogo/protobuf/protoc-gen-gogo/main.go | 57 + .../protoc-gen-gogo/plugin/plugin.pb.go | 153 +- .../protoc-gen-gogo/testdata/Makefile | 35 + .../testdata/deprecated/deprecated.pb.go | 234 + .../testdata/deprecated/deprecated.proto | 69 + .../extension_base/extension_base.pb.go | 138 + .../extension_base}/extension_base.proto | 2 + .../extension_extra/extension_extra.pb.go | 78 + .../extension_extra}/extension_extra.proto | 2 + .../testdata/extension_test.go | 202 + .../extension_user/extension_user.pb.go | 401 + .../extension_user}/extension_user.proto | 6 +- .../protoc-gen-gogo/testdata/grpc/grpc.pb.go | 444 + .../protoc-gen-gogo/testdata/grpc}/grpc.proto | 2 + .../testdata/import_public/a.pb.go | 110 + .../testdata/import_public/a.proto | 45 + .../testdata/import_public/b.pb.go | 87 + .../testdata/import_public/b.proto | 43 + .../testdata/import_public/sub/a.pb.go | 100 + .../testdata/import_public/sub/a.proto | 47 + .../testdata/import_public/sub/b.pb.go | 67 + .../testdata/import_public/sub/b.proto | 39 + .../testdata/imports/fmt/m.pb.go | 66 + .../testdata/imports/fmt/m.proto | 35 + .../testdata/imports/test_a_1/m1.pb.go | 130 + .../testdata/imports/test_a_1/m1.proto | 44 + .../testdata/imports/test_a_1/m2.pb.go | 66 + .../testdata/imports/test_a_1/m2.proto | 35 + .../testdata/imports/test_a_2/m3.pb.go | 66 + .../testdata/imports/test_a_2/m3.proto | 35 + .../testdata/imports/test_a_2/m4.pb.go | 66 + .../testdata/imports/test_a_2/m4.proto | 35 + .../testdata/imports/test_b_1/m1.pb.go | 67 + .../testdata/imports/test_b_1/m1.proto | 35 + .../testdata/imports/test_b_1/m2.pb.go | 67 + .../testdata/imports/test_b_1/m2.proto | 35 + .../testdata/imports/test_import_a1m1.pb.go | 80 + .../testdata/imports/test_import_a1m1.proto | 42 + .../testdata/imports/test_import_a1m2.pb.go | 80 + .../testdata/imports/test_import_a1m2.proto | 42 + .../testdata/imports/test_import_all.pb.go | 138 + .../testdata/imports/test_import_all.proto | 58 + .../protoc-gen-gogo/testdata/main_test.go | 48 + .../protoc-gen-gogo/testdata/multi/.gitignore | 1 + .../testdata/multi/multi1.proto | 46 + .../testdata/multi/multi2.proto | 48 + .../testdata/multi/multi3.proto | 45 + .../testdata/my_test/test.pb.go | 1174 + .../testdata/my_test/test.proto | 158 + .../testdata/proto3/proto3.pb.go | 195 + .../testdata/proto3/proto3.proto | 55 + .../gogo/protobuf/protoc-gen-gogofast/main.go | 47 + .../protobuf/protoc-gen-gogofaster/main.go | 50 + .../protobuf/protoc-gen-gogoslick/main.go | 59 + .../protobuf/protoc-gen-gogotypes/main.go | 76 + .../gogo/protobuf/protoc-gen-gostring/main.go | 42 + .../protobuf/protoc-min-version/minversion.go | 67 + deps/github.com/gogo/protobuf/test/.gitignore | 1 + deps/github.com/gogo/protobuf/test/Makefile | 39 + .../protobuf/test/asymetric-issue125/Makefile | 30 + .../test/asymetric-issue125/asym.pb.go | 635 + .../test/asymetric-issue125/asym.proto | 52 + .../test/asymetric-issue125/asym_test.go | 40 + .../protobuf/test/asymetric-issue125/pop.go | 65 + .../github.com/gogo/protobuf/test/bug_test.go | 252 + .../gogo/protobuf/test/cachedsize/Makefile | 30 + .../protobuf/test/cachedsize/cachedsize.pb.go | 276 + .../protobuf/test/cachedsize/cachedsize.proto | 48 + .../test/cachedsize/cachedsize_test.go | 51 + .../gogo/protobuf/test/casttype/Makefile | 32 + .../protobuf/test/casttype/casttype.proto | 80 + .../test/casttype/combos/both/casttype.pb.go | 2593 + .../test/casttype/combos/both/casttype.proto | 80 + .../casttype/combos/both/casttypepb_test.go | 502 + .../casttype/combos/marshaler/casttype.pb.go | 1649 + .../casttype/combos/marshaler/casttype.proto | 80 + .../combos/marshaler/casttypepb_test.go | 502 + .../casttype/combos/neither/casttype.pb.go | 1426 + .../casttype/combos/neither/casttype.proto | 80 + .../combos/neither/casttypepb_test.go | 446 + .../combos/unmarshaler/casttype.pb.go | 2371 + .../combos/unmarshaler/casttype.proto | 80 + .../combos/unmarshaler/casttypepb_test.go | 446 + .../gogo/protobuf/test/casttype/mytypes.go | 59 + .../gogo/protobuf/test/castvalue/Makefile | 40 + .../protobuf/test/castvalue/castvalue.pb.go | 893 + .../protobuf/test/castvalue/castvalue.proto | 66 + .../test/castvalue/castvaluepb_test.go | 446 + .../castvalue/combos/both/castvalue.pb.go | 1474 + .../castvalue/combos/both/castvalue.proto | 66 + .../castvalue/combos/both/castvaluepb_test.go | 502 + .../test/castvalue/combos/both/mytypes.go | 31 + .../combos/marshaler/castvalue.pb.go | 1022 + .../combos/marshaler/castvalue.proto | 66 + .../combos/marshaler/castvaluepb_test.go | 502 + .../castvalue/combos/marshaler/mytypes.go | 31 + .../combos/unmarshaler/castvalue.pb.go | 1348 + .../combos/unmarshaler/castvalue.proto | 66 + .../combos/unmarshaler/castvaluepb_test.go | 446 + .../castvalue/combos/unmarshaler/mytypes.go | 31 + .../gogo/protobuf/test/castvalue/mytypes.go | 31 + .../protobuf/test/combos/both/bug_test.go | 252 + .../gogo/protobuf/test/combos/both/t.go | 77 + .../protobuf/test/combos/both/thetest.pb.go | 45323 +++++++++++++++ .../protobuf/test/combos/both/thetest.proto | 649 + .../test/combos/both/thetestpb_test.go | 17878 ++++++ .../gogo/protobuf/test/combos/both/uuid.go | 137 + .../test/combos/marshaler/bug_test.go | 252 + .../gogo/protobuf/test/combos/marshaler/t.go | 77 + .../test/combos/marshaler/thetest.pb.go | 31475 +++++++++++ .../test/combos/marshaler/thetest.proto | 649 + .../test/combos/marshaler/thetestpb_test.go | 17878 ++++++ .../protobuf/test/combos/marshaler/uuid.go | 137 + .../test/combos/unmarshaler/bug_test.go | 252 + .../protobuf/test/combos/unmarshaler/t.go | 73 + .../test/combos/unmarshaler/thetest.pb.go | 40727 ++++++++++++++ .../test/combos/unmarshaler/thetest.proto | 649 + .../test/combos/unmarshaler/thetestpb_test.go | 15974 ++++++ .../protobuf/test/combos/unmarshaler/uuid.go | 137 + .../test/custom-dash-type/customdash.go | 104 + .../gogo/protobuf/test/custom/custom.go | 154 + .../gogo/protobuf/test/custom/custom_test.go | 43 + .../test/custombytesnonstruct/Makefile | 30 + .../custombytesnonstruct_test.go | 34 + .../test/custombytesnonstruct/customtype.go | 36 + .../test/custombytesnonstruct/proto.pb.go | 293 + .../test/custombytesnonstruct/proto.proto | 39 + .../test/dashfilename/dash-filename.proto | 38 + .../protobuf/test/dashfilename/df_test.go | 48 + .../gogo/protobuf/test/dashfilename/doc.go | 1 + .../gogo/protobuf/test/data/Makefile | 33 + .../gogo/protobuf/test/data/data.pb.go | 508 + .../gogo/protobuf/test/data/data.proto | 49 + .../gogo/protobuf/test/data/datapb_test.go | 253 + .../protobuf/test/defaultconflict/df.proto | 40 + .../protobuf/test/defaultconflict/dg.proto | 39 + .../gogo/protobuf/test/defaultconflict/doc.go | 1 + .../protobuf/test/defaultconflict/nc.proto | 37 + .../protobuf/test/defaultconflict/nc_test.go | 68 + .../protobuf/test/defaultconflict/ne.proto | 42 + .../protobuf/test/defaultconflict/nx.proto | 41 + .../gogo/protobuf/test/deterministic/Makefile | 32 + .../test/deterministic/deterministic.pb.go | 1310 + .../test/deterministic/deterministic.proto | 81 + .../test/deterministic/deterministic_test.go | 207 + .../protobuf/test/embedconflict/.gitignore | 1 + .../gogo/protobuf/test/embedconflict/doc.go | 1 + .../gogo/protobuf/test/embedconflict/eb.proto | 38 + .../gogo/protobuf/test/embedconflict/ec.proto | 40 + .../protobuf/test/embedconflict/ec_test.go | 119 + .../gogo/protobuf/test/embedconflict/ee.proto | 41 + .../gogo/protobuf/test/embedconflict/em.proto | 42 + .../gogo/protobuf/test/embedconflict/en.proto | 40 + .../gogo/protobuf/test/embedconflict/er.proto | 41 + .../gogo/protobuf/test/empty-issue70/Makefile | 30 + .../protobuf/test/empty-issue70/empty.pb.go | 223 + .../protobuf/test/empty-issue70/empty.proto | 39 + .../protobuf/test/empty-issue70/empty_test.go | 37 + .../protobuf/test/enumcustomname/Makefile | 30 + .../test/enumcustomname/enumcustomname.pb.go | 330 + .../test/enumcustomname/enumcustomname.proto | 75 + .../gogo/protobuf/test/enumdecl/Makefile | 3 + .../protobuf/test/enumdecl/enumdecl.pb.go | 486 + .../protobuf/test/enumdecl/enumdecl.proto | 27 + .../protobuf/test/enumdecl/enumdeclpb_test.go | 229 + .../gogo/protobuf/test/enumdecl/models.go | 8 + .../gogo/protobuf/test/enumdecl_all/Makefile | 3 + .../test/enumdecl_all/enumdeclall.pb.go | 556 + .../test/enumdecl_all/enumdeclall.proto | 35 + .../test/enumdecl_all/enumdeclallpb_test.go | 229 + .../gogo/protobuf/test/enumdecl_all/models.go | 8 + .../gogo/protobuf/test/enumprefix/Makefile | 30 + .../protobuf/test/enumprefix/enumprefix.pb.go | 79 + .../protobuf/test/enumprefix/enumprefix.proto | 37 + .../gogo/protobuf/test/enumstringer/Makefile | 30 + .../test/enumstringer/enumstringer.pb.go | 635 + .../test/enumstringer/enumstringer.proto | 62 + .../test/enumstringer/enumstringerpb_test.go | 438 + .../gogo/protobuf/test/enumstringer/string.go | 41 + .../gogo/protobuf/test/example/Makefile | 30 + .../gogo/protobuf/test/example/example.pb.go | 2674 + .../gogo/protobuf/test/example/example.proto | 83 + .../protobuf/test/example/example_test.go | 35 + .../protobuf/test/example/examplepb_test.go | 1656 + .../gogo/protobuf/test/extension_test.go | 181 + .../gogo/protobuf/test/filedotname/Makefile | 31 + .../protobuf/test/filedotname/file.dot.pb.go | 589 + .../protobuf/test/filedotname/file.dot.proto | 62 + .../test/filedotname/file.dotpb_test.go | 236 + .../gogo/protobuf/test/fuzztests/Makefile | 31 + .../gogo/protobuf/test/fuzztests/fuzz.pb.go | 2873 + .../gogo/protobuf/test/fuzztests/fuzz.proto | 86 + .../gogo/protobuf/test/fuzztests/fuzz_test.go | 136 + .../gogo/protobuf/test/group/Makefile | 30 + .../gogo/protobuf/test/group/group.pb.go | 1029 + .../gogo/protobuf/test/group/group.proto | 65 + .../gogo/protobuf/test/group/grouppb_test.go | 530 + .../test/importcustom-issue389/Makefile | 4 + .../importcustom-issue389/imported/Makefile | 4 + .../importcustom-issue389/imported/a.pb.go | 443 + .../importcustom-issue389/imported/a.proto | 15 + .../imported/apb_test.go | 145 + .../test/importcustom-issue389/imported/b.go | 55 + .../importcustom-issue389/importing/Makefile | 4 + .../importcustom-issue389/importing/c.pb.go | 457 + .../importcustom-issue389/importing/c.proto | 16 + .../importing/cpb_test.go | 146 + .../gogo/protobuf/test/importdedup/Makefile | 31 + .../test/importdedup/importdedup_test.go | 34 + .../protobuf/test/importdedup/proto.pb.go | 83 + .../protobuf/test/importdedup/proto.proto | 40 + .../test/importdedup/subpkg/customtype.go | 31 + .../test/importdedup/subpkg/subproto.pb.go | 66 + .../test/importdedup/subpkg/subproto.proto | 36 + .../protobuf/test/importduplicate/Makefile | 40 + .../importduplicate/importduplicate.pb.go | 283 + .../importduplicate/importduplicate.proto | 45 + .../importduplicate/importduplicate_test.go | 34 + .../importduplicate/importduplicatepb_test.go | 115 + .../test/importduplicate/proto/proto.pb.go | 196 + .../test/importduplicate/proto/proto.proto | 41 + .../importduplicate/proto/protopb_test.go | 113 + .../importduplicate/sortkeys/sortable.pb.go | 197 + .../importduplicate/sortkeys/sortable.proto | 41 + .../sortkeys/sortablepb_test.go | 113 + .../test/indeximport-issue72/Makefile | 31 + .../indeximport-issue72/index/index.pb.go | 515 + .../indeximport-issue72/index/index.proto | 45 + .../indeximport-issue72/index/indexpb_test.go | 145 + .../indeximport-issue72/indeximport.pb.go | 468 + .../indeximport-issue72/indeximport.proto | 46 + .../indeximport-issue72/indeximportpb_test.go | 146 + .../gogo/protobuf/test/int64support/Makefile | 30 + .../protobuf/test/int64support/object.pb.go | 510 + .../protobuf/test/int64support/object.proto | 24 + .../protobuf/test/int64support/object_js.go | 63 + .../test/int64support/object_js_test.go | 47 + .../test/int64support/objectpb_test.go | 253 + .../gogo/protobuf/test/issue260/Makefile | 3 + .../gogo/protobuf/test/issue260/README.md | 11 + .../protobuf/test/issue260/issue260.pb.go | 1067 + .../protobuf/test/issue260/issue260.proto | 37 + .../protobuf/test/issue260/issue260pb_test.go | 646 + .../gogo/protobuf/test/issue260/models.go | 40 + .../gogo/protobuf/test/issue261/Makefile | 7 + .../protobuf/test/issue261/issue261.pb.go | 543 + .../protobuf/test/issue261/issue261.proto | 11 + .../gogo/protobuf/test/issue262/Makefile | 5 + .../protobuf/test/issue262/timefail.pb.go | 410 + .../protobuf/test/issue262/timefail.proto | 10 + .../gogo/protobuf/test/issue270/a/a1.proto | 12 + .../gogo/protobuf/test/issue270/a/a2.proto | 12 + .../gogo/protobuf/test/issue270/b/b.proto | 6 + .../gogo/protobuf/test/issue270/doc.go | 1 + .../protobuf/test/issue270/issue270_test.go | 51 + .../gogo/protobuf/test/issue312/Makefile | 4 + .../protobuf/test/issue312/events/Makefile | 4 + .../test/issue312/events/events.pb.go | 225 + .../test/issue312/events/events.proto | 17 + .../test/issue312/events/eventspb_test.go | 114 + .../protobuf/test/issue312/issue312.pb.go | 79 + .../protobuf/test/issue312/issue312.proto | 17 + .../gogo/protobuf/test/issue322/Makefile | 3 + .../protobuf/test/issue322/issue322.pb.go | 601 + .../protobuf/test/issue322/issue322.proto | 15 + .../protobuf/test/issue322/issue322pb_test.go | 159 + .../gogo/protobuf/test/issue330/Makefile | 3 + .../protobuf/test/issue330/issue330.pb.go | 433 + .../protobuf/test/issue330/issue330.proto | 17 + .../protobuf/test/issue330/issue330pb_test.go | 199 + .../gogo/protobuf/test/issue330/type.go | 17 + .../gogo/protobuf/test/issue34/Makefile | 30 + .../protobuf/test/issue34/issue34_test.go | 82 + .../gogo/protobuf/test/issue34/proto.pb.go | 383 + .../gogo/protobuf/test/issue34/proto.proto | 43 + .../gogo/protobuf/test/issue427/.gitignore | 2 + .../gogo/protobuf/test/issue427/Makefile | 7 + .../gogo/protobuf/test/issue427/README.md | 11 + .../protobuf/test/issue427/issue427.proto | 18 + .../gogo/protobuf/test/issue42order/Makefile | 30 + .../protobuf/test/issue42order/issue42.pb.go | 648 + .../protobuf/test/issue42order/issue42.proto | 48 + .../protobuf/test/issue42order/order_test.go | 56 + .../gogo/protobuf/test/issue435/Makefile | 3 + .../protobuf/test/issue435/issue435.pb.go | 129 + .../protobuf/test/issue435/issue435.proto | 16 + .../protobuf/test/issue435/issue435pb_test.go | 22 + .../gogo/protobuf/test/issue438/Makefile | 15 + .../protobuf/test/issue438/issue438.pb.go | 485 + .../protobuf/test/issue438/issue438.proto | 53 + .../gogo/protobuf/test/issue449/Makefile | 34 + .../protobuf/test/issue449/issue449.pb.go | 599 + .../protobuf/test/issue449/issue449.proto | 55 + .../protobuf/test/issue449/issue449_test.go | 170 + .../gogo/protobuf/test/issue8/Makefile | 30 + .../gogo/protobuf/test/issue8/proto.pb.go | 375 + .../gogo/protobuf/test/issue8/proto.proto | 42 + .../gogo/protobuf/test/issue8/protopb_test.go | 98 + .../protobuf/test/jsonpb-gogo/jsonpb_gogo.go | 1 + .../test/jsonpb-gogo/jsonpb_gogo_test.go | 36 + .../gogo/protobuf/test/mapdefaults/Makefile | 35 + .../test/mapdefaults/combos/both/map.pb.go | 1575 + .../test/mapdefaults/combos/both/map.proto | 70 + .../test/mapdefaults/combos/both/map_test.go | 136 + .../mapdefaults/combos/both/mappb_test.go | 554 + .../mapdefaults/combos/both/unknown_test.go | 79 + .../mapdefaults/combos/marshaler/map.pb.go | 1080 + .../mapdefaults/combos/marshaler/map.proto | 70 + .../mapdefaults/combos/marshaler/map_test.go | 136 + .../combos/marshaler/mappb_test.go | 554 + .../test/mapdefaults/combos/neither/map.pb.go | 934 + .../test/mapdefaults/combos/neither/map.proto | 70 + .../mapdefaults/combos/neither/map_test.go | 136 + .../mapdefaults/combos/neither/mappb_test.go | 470 + .../mapdefaults/combos/unmarshaler/map.pb.go | 1429 + .../mapdefaults/combos/unmarshaler/map.proto | 70 + .../combos/unmarshaler/map_test.go | 136 + .../combos/unmarshaler/mappb_test.go | 470 + .../combos/unmarshaler/unknown_test.go | 79 + .../gogo/protobuf/test/mapdefaults/map.pb.go | 414 + .../gogo/protobuf/test/mapdefaults/map.proto | 70 + .../protobuf/test/mapdefaults/map_test.go.in | 137 + .../test/mapdefaults/unknown_test.go.in | 79 + .../gogo/protobuf/test/mapsproto2/Makefile | 35 + .../mapsproto2/combos/both/mapsproto2.pb.go | 8776 +++ .../mapsproto2/combos/both/mapsproto2.proto | 124 + .../mapsproto2/combos/both/mapsproto2_test.go | 104 + .../combos/both/mapsproto2pb_test.go | 978 + .../combos/marshaler/mapsproto2.pb.go | 4636 ++ .../combos/marshaler/mapsproto2.proto | 124 + .../combos/marshaler/mapsproto2_test.go | 104 + .../combos/marshaler/mapsproto2pb_test.go | 978 + .../combos/neither/mapsproto2.pb.go | 3704 ++ .../combos/neither/mapsproto2.proto | 124 + .../combos/neither/mapsproto2_test.go | 104 + .../combos/neither/mapsproto2pb_test.go | 866 + .../combos/unmarshaler/mapsproto2.pb.go | 7845 +++ .../combos/unmarshaler/mapsproto2.proto | 124 + .../combos/unmarshaler/mapsproto2_test.go | 104 + .../combos/unmarshaler/mapsproto2pb_test.go | 866 + .../gogo/protobuf/test/mapsproto2/doc.go | 1 + .../protobuf/test/mapsproto2/header.proto | 76 + .../protobuf/test/mapsproto2/mapsproto2.proto | 124 + .../test/mapsproto2/mapsproto2_test.go.in | 104 + .../gogo/protobuf/test/merge/Makefile | 5 + .../gogo/protobuf/test/merge/merge.pb.go | 115 + .../gogo/protobuf/test/merge/merge.proto | 12 + .../gogo/protobuf/test/merge/merge_test.go | 36 + .../gogo/protobuf/test/mixbench/.gitignore | 1 + .../gogo/protobuf/test/mixbench/marshal.txt | 73 + .../gogo/protobuf/test/mixbench/marshaler.txt | 73 + .../gogo/protobuf/test/mixbench/mixbench.go | 58 + .../protobuf/test/mixbench/oldmarshaler.txt | 73 + .../protobuf/test/mixbench/oldunmarshaler.txt | 73 + .../gogo/protobuf/test/mixbench/unmarshal.txt | 73 + .../protobuf/test/mixbench/unmarshaler.txt | 73 + .../test/mixbench/unsafe_marshaler.txt | 73 + .../test/mixbench/unsafe_unmarshaler.txt | 73 + .../gogo/protobuf/test/moredefaults/Makefile | 30 + .../gogo/protobuf/test/moredefaults/md.pb.go | 363 + .../gogo/protobuf/test/moredefaults/md.proto | 53 + .../protobuf/test/moredefaults/md_test.go | 61 + .../protobuf/test/moredefaults/mdpb_test.go | 176 + .../gogo/protobuf/test/nopackage/Makefile | 30 + .../protobuf/test/nopackage/nopackage.pb.go | 422 + .../protobuf/test/nopackage/nopackage.proto | 33 + .../protobuf/test/nopackage/nopackage_test.go | 38 + .../gogo/protobuf/test/oneof/Makefile | 32 + .../protobuf/test/oneof/combos/both/one.pb.go | 5551 ++ .../protobuf/test/oneof/combos/both/one.proto | 103 + .../test/oneof/combos/both/onepb_test.go | 730 + .../test/oneof/combos/marshaler/one.pb.go | 4676 ++ .../test/oneof/combos/marshaler/one.proto | 103 + .../test/oneof/combos/marshaler/onepb_test.go | 730 + .../test/oneof/combos/neither/one.pb.go | 4268 ++ .../test/oneof/combos/neither/one.proto | 103 + .../test/oneof/combos/neither/onepb_test.go | 618 + .../test/oneof/combos/unmarshaler/one.pb.go | 5144 ++ .../test/oneof/combos/unmarshaler/one.proto | 103 + .../oneof/combos/unmarshaler/onepb_test.go | 618 + .../gogo/protobuf/test/oneof/doc.go | 1 + .../gogo/protobuf/test/oneof/one.proto | 103 + .../gogo/protobuf/test/oneof3/Makefile | 32 + .../test/oneof3/combos/both/one.pb.go | 3364 ++ .../test/oneof3/combos/both/one.proto | 82 + .../test/oneof3/combos/both/onepb_test.go | 378 + .../test/oneof3/combos/marshaler/one.pb.go | 2827 + .../test/oneof3/combos/marshaler/one.proto | 82 + .../oneof3/combos/marshaler/onepb_test.go | 378 + .../test/oneof3/combos/neither/one.pb.go | 2607 + .../test/oneof3/combos/neither/one.proto | 82 + .../test/oneof3/combos/neither/onepb_test.go | 322 + .../test/oneof3/combos/unmarshaler/one.pb.go | 3144 ++ .../test/oneof3/combos/unmarshaler/one.proto | 82 + .../oneof3/combos/unmarshaler/onepb_test.go | 322 + .../gogo/protobuf/test/oneof3/doc.go | 1 + .../gogo/protobuf/test/oneof3/one.proto | 82 + .../gogo/protobuf/test/oneofembed/Makefile | 31 + .../protobuf/test/oneofembed/oneofembed.pb.go | 434 + .../protobuf/test/oneofembed/oneofembed.proto | 46 + .../test/oneofembed/oneofembedpb_test.go | 175 + .../gogo/protobuf/test/packed/Makefile | 30 + .../gogo/protobuf/test/packed/doc.go | 1 + .../gogo/protobuf/test/packed/packed.pb.go | 4365 ++ .../gogo/protobuf/test/packed/packed.proto | 103 + .../gogo/protobuf/test/packed/packed_test.go | 378 + .../protobuf/test/proto3extension/Makefile | 32 + .../test/proto3extension/proto3ext.pb.go | 58 + .../test/proto3extension/proto3ext.proto | 11 + .../gogo/protobuf/test/protosize/Makefile | 30 + .../protobuf/test/protosize/protosize.pb.go | 616 + .../protobuf/test/protosize/protosize.proto | 46 + .../protobuf/test/protosize/protosize_test.go | 37 + .../test/protosize/protosizepb_test.go | 145 + .../protobuf/test/registration/.gitignore | 2 + .../gogo/protobuf/test/registration/Makefile | 33 + .../test/registration/registration.proto | 45 + .../test/registration/registration_test.go.in | 85 + .../gogo/protobuf/test/required/Makefile | 30 + .../test/required/requiredexample.pb.go | 2257 + .../test/required/requiredexample.proto | 83 + .../test/required/requiredexamplepb_test.go | 181 + .../gogo/protobuf/test/sizerconflict/doc.go | 1 + .../test/sizerconflict/sizerconflict.proto | 43 + .../test/sizerconflict/sizerconflict_test.go | 48 + .../protobuf/test/sizeunderscore/Makefile | 30 + .../test/sizeunderscore/sizeunderscore.pb.go | 565 + .../test/sizeunderscore/sizeunderscore.proto | 45 + .../sizeunderscore/sizeunderscorepb_test.go | 145 + .../gogo/protobuf/test/stdtypes/Makefile | 39 + .../test/stdtypes/concurrency_test.go | 31 + .../protobuf/test/stdtypes/stdtypes.pb.go | 1444 + .../protobuf/test/stdtypes/stdtypes.proto | 78 + .../protobuf/test/stdtypes/stdtypespb_test.go | 795 + deps/github.com/gogo/protobuf/test/t.go | 73 + .../gogo/protobuf/test/tags/Makefile | 30 + .../github.com/gogo/protobuf/test/tags/doc.go | 1 + .../gogo/protobuf/test/tags/tags.pb.go | 220 + .../gogo/protobuf/test/tags/tags.proto | 44 + .../gogo/protobuf/test/tags/tags_test.go | 119 + .../gogo/protobuf/test/theproto3/Makefile | 36 + .../test/theproto3/combos/both/proto3_test.go | 159 + .../theproto3/combos/both/theproto3.pb.go | 11572 ++++ .../theproto3/combos/both/theproto3.proto | 168 + .../theproto3/combos/both/theproto3pb_test.go | 2407 + .../theproto3/combos/marshaler/proto3_test.go | 159 + .../combos/marshaler/theproto3.pb.go | 6526 +++ .../combos/marshaler/theproto3.proto | 168 + .../combos/marshaler/theproto3pb_test.go | 2407 + .../theproto3/combos/neither/proto3_test.go | 159 + .../theproto3/combos/neither/theproto3.pb.go | 5267 ++ .../theproto3/combos/neither/theproto3.proto | 168 + .../combos/neither/theproto3pb_test.go | 2127 + .../combos/unmarshaler/proto3_test.go | 159 + .../combos/unmarshaler/theproto3.pb.go | 10313 ++++ .../combos/unmarshaler/theproto3.proto | 168 + .../combos/unmarshaler/theproto3pb_test.go | 2127 + .../gogo/protobuf/test/theproto3/doc.go | 1 + .../gogo/protobuf/test/theproto3/footer.proto | 25 + .../gogo/protobuf/test/theproto3/header.proto | 95 + .../gogo/protobuf/test/theproto3/maps.proto | 48 + .../protobuf/test/theproto3/proto3_test.go.in | 159 + .../protobuf/test/theproto3/theproto3.proto | 168 + .../gogo/protobuf/test/thetest.pb.go | 26872 +++++++++ .../gogo/protobuf/test/thetest.proto | 649 + .../gogo/protobuf/test/thetestpb_test.go | 15974 ++++++ .../gogo/protobuf/test/typedecl/Makefile | 3 + .../gogo/protobuf/test/typedecl/models.go | 41 + .../protobuf/test/typedecl/typedecl.pb.go | 1009 + .../protobuf/test/typedecl/typedecl.proto | 35 + .../protobuf/test/typedecl/typedeclpb_test.go | 645 + .../gogo/protobuf/test/typedecl_all/Makefile | 3 + .../gogo/protobuf/test/typedecl_all/models.go | 41 + .../test/typedecl_all/typedeclall.pb.go | 1009 + .../test/typedecl_all/typedeclall.proto | 35 + .../test/typedecl_all/typedeclallpb_test.go | 645 + .../protobuf/test/typedeclimport/Makefile | 4 + .../protobuf/test/typedeclimport/models.go | 7 + .../test/typedeclimport/subpkg/subpkg.pb.go | 383 + .../test/typedeclimport/subpkg/subpkg.proto | 15 + .../test/typedeclimport/typedeclimport.pb.go | 384 + .../test/typedeclimport/typedeclimport.proto | 18 + .../typedeclimport/typedeclimport_test.go | 7 + .../gogo/protobuf/test/types/Makefile | 39 + .../test/types/combos/both/types.pb.go | 6222 ++ .../test/types/combos/both/types.proto | 131 + .../test/types/combos/both/types_test.go | 242 + .../test/types/combos/both/typespb_test.go | 1966 + .../test/types/combos/marshaler/types.pb.go | 3774 ++ .../test/types/combos/marshaler/types.proto | 131 + .../test/types/combos/marshaler/types_test.go | 242 + .../types/combos/marshaler/typespb_test.go | 1966 + .../test/types/combos/neither/types.pb.go | 2937 + .../test/types/combos/neither/types.proto | 131 + .../test/types/combos/neither/types_test.go | 242 + .../test/types/combos/neither/typespb_test.go | 1714 + .../test/types/combos/unmarshaler/types.pb.go | 5387 ++ .../test/types/combos/unmarshaler/types.proto | 131 + .../types/combos/unmarshaler/types_test.go | 242 + .../types/combos/unmarshaler/typespb_test.go | 1714 + .../gogo/protobuf/test/types/types.proto | 131 + .../gogo/protobuf/test/types/types_test.go.in | 243 + .../protobuf/test/unmarshalmerge/Makefile | 30 + .../test/unmarshalmerge/unmarshalmerge.pb.go | 1596 + .../test/unmarshalmerge/unmarshalmerge.proto | 75 + .../unmarshalmerge/unmarshalmerge_test.go | 99 + .../unmarshalmerge/unmarshalmergepb_test.go | 692 + .../gogo/protobuf/test/unrecognized/Makefile | 30 + .../protobuf/test/unrecognized/oldnew_test.go | 200 + .../test/unrecognized/unrecognized.pb.go | 4355 ++ .../test/unrecognized/unrecognized.proto | 131 + .../test/unrecognized/unrecognizedpb_test.go | 1862 + .../protobuf/test/unrecognizedgroup/Makefile | 30 + .../test/unrecognizedgroup/oldnew_test.go | 128 + .../unrecognizedgroup/unrecognizedgroup.pb.go | 1816 + .../unrecognizedgroup/unrecognizedgroup.proto | 77 + .../unrecognizedgrouppb_test.go | 756 + deps/github.com/gogo/protobuf/test/uuid.go | 137 + .../gogo/protobuf/test/uuid_test.go | 51 + deps/github.com/gogo/protobuf/types/any.go | 140 + deps/github.com/gogo/protobuf/types/any.pb.go | 700 + .../gogo/protobuf/types/any_test.go | 153 + deps/github.com/gogo/protobuf/types/api.pb.go | 2058 + deps/github.com/gogo/protobuf/types/doc.go | 35 + .../gogo/protobuf/types/duration.go | 100 + .../gogo/protobuf/types/duration.pb.go | 534 + .../gogo/protobuf/types/duration_gogo.go | 100 + .../gogo/protobuf/types/duration_test.go | 120 + .../gogo/protobuf/types/empty.pb.go | 477 + .../gogo/protobuf/types/field_mask.pb.go | 766 + .../gogo/protobuf/types/protosize.go | 34 + .../gogo/protobuf/types/source_context.pb.go | 535 + .../gogo/protobuf/types/struct.pb.go | 1959 + .../gogo/protobuf/types/timestamp.go | 132 + .../gogo/protobuf/types/timestamp.pb.go | 552 + .../gogo/protobuf/types/timestamp_gogo.go | 94 + .../gogo/protobuf/types/timestamp_test.go | 152 + .../github.com/gogo/protobuf/types/type.pb.go | 3228 ++ .../gogo/protobuf/types/wrappers.pb.go | 2641 + deps/github.com/gogo/protobuf/vanity/field.go | 7 + deps/github.com/gogo/protobuf/vanity/file.go | 8 + deps/github.com/gogo/protobuf/vanity/msg.go | 4 + .../gogo/protobuf/vanity/test/Makefile | 46 + .../gogo/protobuf/vanity/test/doc.go | 1 + .../vanity/test/fast/gogovanity.pb.go | 410 + .../protobuf/vanity/test/fast/proto3.pb.go | 330 + .../protobuf/vanity/test/fast/vanity.pb.go | 377 + .../vanity/test/faster/gogovanity.pb.go | 398 + .../protobuf/vanity/test/faster/proto3.pb.go | 322 + .../protobuf/vanity/test/faster/vanity.pb.go | 356 + .../protobuf/vanity/test/gofast/.gitignore | 1 + .../protobuf/vanity/test/gogovanity.proto | 39 + .../gogo/protobuf/vanity/test/proto3.proto | 35 + .../vanity/test/slick/gogovanity.pb.go | 487 + .../protobuf/vanity/test/slick/proto3.pb.go | 386 + .../protobuf/vanity/test/slick/vanity.pb.go | 425 + .../gogo/protobuf/vanity/test/vanity.proto | 36 + .../gogo/protobuf/vanity/test/vanity_test.go | 93 + .../gogo/protobuf/version/version.go | 78 + .../.github/ISSUE_TEMPLATE/bug_report.md | 20 + .../.github/ISSUE_TEMPLATE/feature_request.md | 17 + .../.github/ISSUE_TEMPLATE/question.md | 7 + deps/github.com/golang/protobuf/Make.protobuf | 40 - deps/github.com/golang/protobuf/Makefile | 1 + deps/github.com/golang/protobuf/README.md | 20 +- .../golang/protobuf/_conformance/Makefile | 33 - .../conformance_proto/conformance.pb.go | 1885 - .../conformance_proto/conformance.pb.go | 88 +- .../golang/protobuf/jsonpb/jsonpb.go | 29 +- .../golang/protobuf/jsonpb/jsonpb_test.go | 32 +- .../jsonpb/jsonpb_test_proto/Makefile | 33 - .../jsonpb_test_proto/test_objects.pb.go | 16 +- .../github.com/golang/protobuf/proto/Makefile | 43 - .../golang/protobuf/proto/all_test.go | 55 +- .../golang/protobuf/proto/deprecated.go | 38 + .../golang/protobuf/proto/encode.go | 15 - .../golang/protobuf/proto/extensions.go | 2 +- deps/github.com/golang/protobuf/proto/lib.go | 82 +- .../golang/protobuf/proto/properties.go | 23 +- .../protobuf/proto/proto3_proto/proto3.pb.go | 28 +- .../golang/protobuf/proto/table_marshal.go | 127 +- .../golang/protobuf/proto/table_unmarshal.go | 49 +- .../protobuf/proto/test_proto/test.pb.go | 158 +- .../golang/protobuf/proto/testdata/Makefile | 50 - .../protobuf/proto/testdata/golden_test.go | 86 - .../golang/protobuf/proto/testdata/test.pb.go | 4147 -- .../golang/protobuf/proto/testdata/test.proto | 548 - deps/github.com/golang/protobuf/proto/text.go | 4 +- .../golang/protobuf/proto/text_parser.go | 6 +- .../golang/protobuf/protoc-gen-go/Makefile | 33 - .../protoc-gen-go/descriptor/Makefile | 37 - .../protobuf/protoc-gen-go/generator/Makefile | 40 - .../protoc-gen-go/generator/generator.go | 1629 +- .../protobuf/protoc-gen-go/plugin/Makefile | 45 - .../protobuf/protoc-gen-go/testdata/Makefile | 73 - .../protoc-gen-go/testdata/imp.pb.go.golden | 113 - .../protobuf/protoc-gen-go/testdata/imp.proto | 70 - .../protoc-gen-go/testdata/imp2.proto | 43 - .../protoc-gen-go/testdata/imp3.proto | 38 - .../protoc-gen-go/testdata/my_test/test.pb.go | 50 +- .../testdata/my_test/test.pb.go.golden | 870 - .../protoc-gen-go/testdata/proto3.proto | 53 - .../golang/protobuf/ptypes/regen.sh | 43 - .../protobuf/ptypes/struct/struct.pb.go | 16 +- deps/github.com/google/btree/.travis.yml | 1 + deps/github.com/google/btree/LICENSE | 202 + deps/github.com/google/btree/README.md | 12 + deps/github.com/google/btree/btree.go | 649 + deps/github.com/google/btree/btree_mem.go | 76 + deps/github.com/googleapis/gnostic/.gitignore | 4 + .../googleapis/gnostic/OpenAPIv2/OpenAPIv2.go | 297 +- .../googleapis/gnostic/OpenAPIv3/OpenAPIv3.go | 294 +- .../gnostic/OpenAPIv3/OpenAPIv3.pb.go | 434 +- .../gnostic/OpenAPIv3/OpenAPIv3.proto | 3 - .../gnostic/OpenAPIv3/openapi-3.0.json | 5 - .../schema-generator/{3.0.md => 3.0.0.md} | 0 .../OpenAPIv3/schema-generator/3.0.1.md | 3380 ++ .../OpenAPIv3/schema-generator/README.md | 5 +- .../OpenAPIv3/schema-generator/main.go | 2 +- .../gnostic/apps/disco/openapiv3.go | 8 +- .../gnostic/examples/v2.0/yaml/empty-v2.yaml | 6 + .../gnostic/examples/v3.0/yaml/empty-v3.yaml | 6 + .../generate-gnostic/generate-compiler.go | 27 +- .../gnostic/generate-gnostic/types.go | 9 + deps/github.com/googleapis/gnostic/gnostic.go | 14 +- .../googleapis/gnostic/gnostic_test.go | 31 +- .../node/gnostic-lint-responses/Makefile | 19 + .../node/gnostic-lint-responses/README.md | 15 + .../gnostic-lint-responses.js | 83 + .../node/gnostic-lint-responses/package.json | 19 + .../gnostic-lint-responses-swift/Makefile | 18 + .../Package.swift | 26 + .../gnostic-lint-responses-swift/README.md | 12 + .../gnostic-lint-responses-swift/io.swift | 77 + .../gnostic-lint-responses-swift/main.swift | 116 + .../compile-protos | 54 + .../googleapis/gnostic/plugins/environment.go | 4 +- .../examples/v2.0/apis_guru/main.go | 6 +- .../v2.0/bookstore/bookstore/bookstore.go | 19 + .../examples/v2.0/sample/sample/sample.go | 19 + .../examples/v2.0/xkcd/main.go | 1 + .../examples/v2.0/xkcd/xkcd/xkcd.go | 19 + .../v3.0/bookstore/bookstore/bookstore.go | 19 + .../urlshortener/urlshortener/urlshortener.go | 19 + .../googleapis/gnostic/plugins/plugin.pb.go | 76 +- .../googleapis/gnostic/printer/code.go | 14 + .../gnostic/surface/model_openapiv2.go | 28 +- .../gnostic/surface/model_openapiv3.go | 22 +- .../gnostic/test/v2.0/json/empty-v2.json | 9 + .../gnostic/test/v3.0/json/empty-v3.json | 9 + .../gophercloud/gophercloud/errors.go | 18 + .../gophercloud/openstack/client.go | 6 + .../openstack/endpoint_location.go | 2 +- .../openstack/identity/v3/tokens/results.go | 1 + .../gophercloud/gophercloud/params.go | 7 +- .../gophercloud/provider_client.go | 51 +- deps/github.com/gosimple/slug/.gitignore | 2 - deps/github.com/gosimple/slug/LICENSE | 373 - deps/github.com/gosimple/slug/README.md | 54 - deps/github.com/gosimple/slug/doc.go | 43 - .../gosimple/slug/languages_substitution.go | 57 - deps/github.com/gosimple/slug/slug.go | 157 - deps/github.com/gosimple/slug/slug_test.go | 421 - .../gregjones/httpcache/.travis.yml | 18 + .../gregjones/httpcache/LICENSE.txt | 7 + deps/github.com/gregjones/httpcache/README.md | 24 + .../httpcache/diskcache/diskcache.go | 61 + .../gregjones/httpcache/httpcache.go | 553 + .../go-grpc-prometheus/.gitignore | 198 + .../go-grpc-prometheus/.travis.yml | 18 + .../grpc-ecosystem/go-grpc-prometheus/LICENSE | 201 + .../go-grpc-prometheus/README.md | 247 + .../go-grpc-prometheus/client.go | 72 + .../go-grpc-prometheus/client_reporter.go | 111 + .../go-grpc-prometheus/server.go | 74 + .../go-grpc-prometheus/server_reporter.go | 157 + .../go-grpc-prometheus/test_all.sh | 14 + .../grpc-ecosystem/go-grpc-prometheus/util.go | 27 + .../grpc-ecosystem/grpc-gateway/LICENSE.txt | 27 + .../grpc-gateway/runtime/context.go | 187 + .../grpc-gateway/runtime/convert.go | 58 + .../grpc-gateway/runtime/doc.go | 5 + .../grpc-gateway/runtime/errors.go | 127 + .../grpc-gateway/runtime/handler.go | 169 + .../runtime/internal/stream_chunk.pb.go | 92 + .../runtime/internal/stream_chunk.proto | 12 + .../grpc-gateway/runtime/marshal_json.go | 37 + .../grpc-gateway/runtime/marshal_jsonpb.go | 184 + .../grpc-gateway/runtime/marshaler.go | 42 + .../runtime/marshaler_registry.go | 91 + .../grpc-gateway/runtime/mux.go | 260 + .../grpc-gateway/runtime/pattern.go | 227 + .../grpc-gateway/runtime/proto2_convert.go | 80 + .../grpc-gateway/runtime/proto_errors.go | 61 + .../grpc-gateway/runtime/query.go | 279 + .../grpc-gateway/utilities/doc.go | 2 + .../grpc-gateway/utilities/pattern.go | 22 + .../grpc-gateway/utilities/trie.go | 177 + deps/github.com/howeyc/gopass/.travis.yml | 11 - deps/github.com/howeyc/gopass/LICENSE.txt | 15 - .../howeyc/gopass/OPENSOLARIS.LICENSE | 384 - deps/github.com/howeyc/gopass/README.md | 27 - deps/github.com/howeyc/gopass/pass.go | 110 - deps/github.com/howeyc/gopass/terminal.go | 25 - .../howeyc/gopass/terminal_solaris.go | 69 - deps/github.com/imdario/mergo/.gitignore | 33 + deps/github.com/imdario/mergo/.travis.yml | 7 +- .../imdario/mergo/CODE_OF_CONDUCT.md | 46 + deps/github.com/imdario/mergo/README.md | 194 +- deps/github.com/imdario/mergo/map.go | 54 +- deps/github.com/imdario/mergo/merge.go | 190 +- deps/github.com/imdario/mergo/mergo.go | 9 +- deps/github.com/jinzhu/gorm/.codeclimate.yml | 11 - .../jinzhu/gorm/.github/ISSUE_TEMPLATE.md | 45 - .../gorm/.github/PULL_REQUEST_TEMPLATE.md | 9 - deps/github.com/jinzhu/gorm/.gitignore | 2 - deps/github.com/jinzhu/gorm/License | 21 - deps/github.com/jinzhu/gorm/README.md | 40 - deps/github.com/jinzhu/gorm/association.go | 375 - .../jinzhu/gorm/association_test.go | 1050 - deps/github.com/jinzhu/gorm/callback.go | 242 - .../github.com/jinzhu/gorm/callback_create.go | 164 - .../github.com/jinzhu/gorm/callback_delete.go | 63 - deps/github.com/jinzhu/gorm/callback_query.go | 99 - .../jinzhu/gorm/callback_query_preload.go | 387 - .../jinzhu/gorm/callback_row_query.go | 30 - deps/github.com/jinzhu/gorm/callback_save.go | 170 - .../jinzhu/gorm/callback_system_test.go | 112 - .../github.com/jinzhu/gorm/callback_update.go | 119 - deps/github.com/jinzhu/gorm/callbacks_test.go | 177 - deps/github.com/jinzhu/gorm/create_test.go | 231 - .../jinzhu/gorm/customize_column_test.go | 346 - deps/github.com/jinzhu/gorm/delete_test.go | 91 - deps/github.com/jinzhu/gorm/dialect.go | 136 - deps/github.com/jinzhu/gorm/dialect_common.go | 176 - deps/github.com/jinzhu/gorm/dialect_mysql.go | 191 - .../jinzhu/gorm/dialect_postgres.go | 143 - .../github.com/jinzhu/gorm/dialect_sqlite3.go | 107 - .../jinzhu/gorm/dialects/mssql/mssql.go | 203 - .../jinzhu/gorm/dialects/mysql/mysql.go | 3 - .../jinzhu/gorm/dialects/postgres/postgres.go | 80 - .../jinzhu/gorm/dialects/sqlite/sqlite.go | 3 - .../github.com/jinzhu/gorm/docker-compose.yml | 30 - .../jinzhu/gorm/embedded_struct_test.go | 91 - deps/github.com/jinzhu/gorm/errors.go | 72 - deps/github.com/jinzhu/gorm/errors_test.go | 20 - deps/github.com/jinzhu/gorm/field.go | 58 - deps/github.com/jinzhu/gorm/field_test.go | 49 - deps/github.com/jinzhu/gorm/interface.go | 20 - .../jinzhu/gorm/join_table_handler.go | 211 - .../github.com/jinzhu/gorm/join_table_test.go | 117 - deps/github.com/jinzhu/gorm/logger.go | 119 - deps/github.com/jinzhu/gorm/main.go | 781 - deps/github.com/jinzhu/gorm/main_test.go | 966 - deps/github.com/jinzhu/gorm/migration_test.go | 485 - deps/github.com/jinzhu/gorm/model.go | 14 - deps/github.com/jinzhu/gorm/model_struct.go | 629 - .../jinzhu/gorm/multi_primary_keys_test.go | 381 - deps/github.com/jinzhu/gorm/pointer_test.go | 84 - .../jinzhu/gorm/polymorphic_test.go | 366 - deps/github.com/jinzhu/gorm/preload_test.go | 1675 - deps/github.com/jinzhu/gorm/query_test.go | 773 - deps/github.com/jinzhu/gorm/scaner_test.go | 139 - deps/github.com/jinzhu/gorm/scope.go | 1381 - deps/github.com/jinzhu/gorm/scope_test.go | 80 - deps/github.com/jinzhu/gorm/search.go | 153 - deps/github.com/jinzhu/gorm/search_test.go | 30 - deps/github.com/jinzhu/gorm/test_all.sh | 5 - deps/github.com/jinzhu/gorm/update_test.go | 465 - deps/github.com/jinzhu/gorm/utils.go | 287 - deps/github.com/jinzhu/gorm/utils_test.go | 35 - deps/github.com/jinzhu/gorm/wercker.yml | 148 - deps/github.com/jinzhu/inflection/LICENSE | 21 - deps/github.com/jinzhu/inflection/README.md | 55 - .../jinzhu/inflection/inflections.go | 273 - .../jinzhu/inflection/inflections_test.go | 213 - deps/github.com/jinzhu/inflection/wercker.yml | 23 - deps/github.com/jinzhu/now/Guardfile | 3 - deps/github.com/jinzhu/now/License | 21 - deps/github.com/jinzhu/now/README.md | 116 - deps/github.com/jinzhu/now/main.go | 138 - deps/github.com/jinzhu/now/now.go | 203 - deps/github.com/jinzhu/now/now_test.go | 344 - deps/github.com/jinzhu/now/wercker.yml | 23 - deps/github.com/json-iterator/go/Gopkg.lock | 30 +- deps/github.com/json-iterator/go/Gopkg.toml | 13 +- deps/github.com/json-iterator/go/README.md | 5 + deps/github.com/json-iterator/go/adapter.go | 148 + deps/github.com/json-iterator/go/any.go | 321 + .../go/{feature_any_array.go => any_array.go} | 0 .../go/{feature_any_bool.go => any_bool.go} | 0 .../go/{feature_any_float.go => any_float.go} | 0 .../go/{feature_any_int32.go => any_int32.go} | 0 .../go/{feature_any_int64.go => any_int64.go} | 0 ...{feature_any_invalid.go => any_invalid.go} | 0 .../go/{feature_any_nil.go => any_nil.go} | 0 .../github.com/json-iterator/go/any_number.go | 123 + .../{feature_any_object.go => any_object.go} | 0 deps/github.com/json-iterator/go/any_str.go | 166 + .../{feature_any_uint32.go => any_uint32.go} | 0 .../{feature_any_uint64.go => any_uint64.go} | 0 deps/github.com/json-iterator/go/config.go | 372 + .../json-iterator/go/feature_adapter.go | 133 - .../json-iterator/go/feature_any.go | 245 - .../json-iterator/go/feature_any_number.go | 104 - .../json-iterator/go/feature_any_string.go | 166 - .../json-iterator/go/feature_config.go | 348 - .../json-iterator/go/feature_iter_float.go | 341 - .../json-iterator/go/feature_iter_int.go | 339 - .../json-iterator/go/feature_iter_object.go | 267 - .../json-iterator/go/feature_json_number.go | 31 - .../json-iterator/go/feature_pool.go | 59 - .../json-iterator/go/feature_reflect.go | 727 - .../json-iterator/go/feature_reflect_array.go | 99 - .../go/feature_reflect_extension.go | 435 - .../json-iterator/go/feature_reflect_map.go | 244 - .../go/feature_reflect_native.go | 764 - .../go/feature_reflect_object.go | 196 - .../json-iterator/go/feature_reflect_slice.go | 147 - .../go/feature_reflect_struct_decoder.go | 934 - .../json-iterator/go/feature_stream.go | 308 - .../json-iterator/go/feature_stream_float.go | 96 - .../json-iterator/go/feature_stream_int.go | 320 - .../json-iterator/go/feature_stream_string.go | 396 - .../go/{feature_iter.go => iter.go} | 0 .../{feature_iter_array.go => iter_array.go} | 0 .../github.com/json-iterator/go/iter_float.go | 347 + deps/github.com/json-iterator/go/iter_int.go | 345 + .../json-iterator/go/iter_object.go | 252 + .../go/{feature_iter_skip.go => iter_skip.go} | 0 ...ter_skip_sloppy.go => iter_skip_sloppy.go} | 0 ...ter_skip_strict.go => iter_skip_strict.go} | 0 .../{feature_iter_string.go => iter_str.go} | 0 deps/github.com/json-iterator/go/pool.go | 42 + deps/github.com/json-iterator/go/reflect.go | 330 + .../json-iterator/go/reflect_array.go | 104 + .../json-iterator/go/reflect_dynamic.go | 70 + .../json-iterator/go/reflect_extension.go | 471 + .../json-iterator/go/reflect_json_number.go | 112 + .../go/reflect_json_raw_message.go | 60 + .../json-iterator/go/reflect_map.go | 318 + .../json-iterator/go/reflect_marshaler.go | 218 + .../json-iterator/go/reflect_native.go | 451 + .../json-iterator/go/reflect_optional.go | 133 + .../json-iterator/go/reflect_slice.go | 99 + .../go/reflect_struct_decoder.go | 1048 + .../go/reflect_struct_encoder.go | 210 + deps/github.com/json-iterator/go/stream.go | 211 + .../json-iterator/go/stream_float.go | 94 + .../github.com/json-iterator/go/stream_int.go | 190 + .../github.com/json-iterator/go/stream_str.go | 372 + deps/github.com/json-iterator/go/test.sh | 2 +- .../julienschmidt/httprouter/path.go | 6 +- .../julienschmidt/httprouter/path_test.go | 1 + .../julienschmidt/httprouter/router.go | 10 +- .../microcosm-cc/bluemonday/.coveralls.yml | 1 - .../microcosm-cc/bluemonday/.travis.yml | 20 - .../microcosm-cc/bluemonday/CONTRIBUTING.md | 51 - .../microcosm-cc/bluemonday/CREDITS.md | 6 - .../microcosm-cc/bluemonday/LICENSE.md | 28 - .../microcosm-cc/bluemonday/Makefile | 42 - .../microcosm-cc/bluemonday/README.md | 346 - .../bluemonday/cmd/sanitise_html_email/doc.go | 12 - .../cmd/sanitise_html_email/main.go | 76 - .../bluemonday/cmd/sanitise_ugc/doc.go | 13 - .../bluemonday/cmd/sanitise_ugc/main.go | 37 - .../github.com/microcosm-cc/bluemonday/doc.go | 104 - .../microcosm-cc/bluemonday/example_test.go | 240 - .../microcosm-cc/bluemonday/helpers.go | 297 - .../microcosm-cc/bluemonday/helpers_test.go | 377 - .../microcosm-cc/bluemonday/policies.go | 253 - .../microcosm-cc/bluemonday/policies_test.go | 203 - .../microcosm-cc/bluemonday/policy.go | 551 - .../microcosm-cc/bluemonday/policy_test.go | 60 - .../microcosm-cc/bluemonday/sanitize.go | 581 - .../bluemonday/sanitize_go1.8_test.go | 74 - .../bluemonday/sanitize_ltgo1.8_test.go | 74 - .../microcosm-cc/bluemonday/sanitize_test.go | 1724 - .../modern-go/concurrent/.gitignore | 1 + .../modern-go/concurrent/.travis.yml | 14 + deps/github.com/modern-go/concurrent/LICENSE | 201 + .../github.com/modern-go/concurrent/README.md | 49 + .../modern-go/concurrent/executor.go | 14 + .../modern-go/concurrent/go_above_19.go | 15 + .../modern-go/concurrent/go_below_19.go | 33 + deps/github.com/modern-go/concurrent/log.go | 13 + deps/github.com/modern-go/concurrent/test.sh | 12 + .../concurrent/unbounded_executor.go | 119 + deps/github.com/modern-go/reflect2/.gitignore | 2 + .../github.com/modern-go/reflect2/.travis.yml | 14 + deps/github.com/modern-go/reflect2/Gopkg.lock | 15 + deps/github.com/modern-go/reflect2/Gopkg.toml | 35 + deps/github.com/modern-go/reflect2/LICENSE | 201 + deps/github.com/modern-go/reflect2/README.md | 71 + .../modern-go/reflect2/go_above_17.go | 8 + .../modern-go/reflect2/go_above_19.go | 14 + .../modern-go/reflect2/go_below_17.go | 9 + .../modern-go/reflect2/go_below_19.go | 14 + .../github.com/modern-go/reflect2/reflect2.go | 295 + .../reflect2/reflect2_amd64.s} | 0 .../modern-go/reflect2/reflect2_kind.go | 30 + .../abc => modern-go/reflect2/relfect2_386.s} | 0 .../reflect2/relfect2_amd64p32.s} | 0 .../ghi => modern-go/reflect2/relfect2_arm.s} | 0 .../reflect2/relfect2_arm64.s} | 0 .../reflect2/relfect2_mips64x.s} | 0 .../modern-go/reflect2/relfect2_mipsx.s | 0 .../modern-go/reflect2/relfect2_ppc64x.s | 0 .../modern-go/reflect2/relfect2_s390x.s | 0 .../modern-go/reflect2/safe_field.go | 58 + .../github.com/modern-go/reflect2/safe_map.go | 101 + .../modern-go/reflect2/safe_slice.go | 92 + .../modern-go/reflect2/safe_struct.go | 29 + .../modern-go/reflect2/safe_type.go | 78 + deps/github.com/modern-go/reflect2/test.sh | 12 + .../github.com/modern-go/reflect2/type_map.go | 103 + .../modern-go/reflect2/unsafe_array.go | 65 + .../modern-go/reflect2/unsafe_eface.go | 59 + .../modern-go/reflect2/unsafe_field.go | 74 + .../modern-go/reflect2/unsafe_iface.go | 64 + .../modern-go/reflect2/unsafe_link.go | 70 + .../modern-go/reflect2/unsafe_map.go | 138 + .../modern-go/reflect2/unsafe_ptr.go | 46 + .../modern-go/reflect2/unsafe_slice.go | 177 + .../modern-go/reflect2/unsafe_struct.go | 59 + .../modern-go/reflect2/unsafe_type.go | 85 + deps/github.com/peterbourgon/diskv/LICENSE | 19 + deps/github.com/peterbourgon/diskv/README.md | 141 + .../peterbourgon/diskv/compression.go | 64 + deps/github.com/peterbourgon/diskv/diskv.go | 624 + deps/github.com/peterbourgon/diskv/index.go | 115 + .../pmezard/go-difflib/difflib/difflib.go | 54 +- .../prometheus/client_golang/.travis.yml | 10 +- .../prometheus/client_golang/CONTRIBUTING.md | 2 + .../prometheus/client_golang/Dockerfile | 23 + .../prometheus/client_golang/MAINTAINERS.md | 3 +- .../prometheus/client_golang/Makefile | 22 + .../prometheus/client_golang/Makefile.common | 132 + .../prometheus/client_golang/README.md | 1 + .../prometheus/client_golang/api/client.go | 4 +- .../client_golang/api/client_test.go | 2 +- .../client_golang/api/prometheus/v1/api.go | 265 +- .../api/prometheus/v1/api_test.go | 298 +- .../client_golang/examples/random/Dockerfile | 20 - .../client_golang/examples/simple/Dockerfile | 20 - .../client_golang/prometheus/collector.go | 39 +- .../client_golang/prometheus/desc_test.go | 13 + .../client_golang/prometheus/doc.go | 27 +- .../client_golang/prometheus/examples_test.go | 45 +- .../prometheus/expvar_collector_test.go | 2 +- .../client_golang/prometheus/fnv.go | 13 + .../client_golang/prometheus/go_collector.go | 23 +- .../prometheus/go_collector_test.go | 13 + .../prometheus/graphite/bridge.go | 8 +- .../prometheus/graphite/bridge_test.go | 63 +- .../client_golang/prometheus/http.go | 21 +- .../client_golang/prometheus/http_test.go | 18 +- .../client_golang/prometheus/labels.go | 13 + .../client_golang/prometheus/metric.go | 45 +- .../prometheus/process_collector.go | 11 +- .../prometheus/process_collector_test.go | 17 + .../client_golang/prometheus/promauto/auto.go | 223 + .../prometheus/promhttp/delegator.go | 36 +- .../prometheus/promhttp/delegator_1_8.go | 34 +- .../client_golang/prometheus/promhttp/http.go | 2 +- .../prometheus/promhttp/http_test.go | 2 +- .../promhttp/instrument_client_1_8.go | 4 +- .../client_golang/prometheus/push/push.go | 2 +- .../client_golang/prometheus/registry.go | 292 +- .../client_golang/prometheus/registry_test.go | 170 +- .../client_golang/prometheus/summary.go | 14 + .../client_golang/prometheus/summary_test.go | 25 + .../client_golang/prometheus/value.go | 4 +- .../client_golang/prometheus/value_test.go | 13 + .../client_golang/prometheus/vec.go | 3 + .../prometheus/client_model/Makefile | 2 +- .../prometheus/client_model/go/metrics.pb.go | 381 +- .../prometheus/client_model/metrics.proto | 1 + deps/github.com/prometheus/common/README.md | 2 +- .../prometheus/common/config/config.go | 19 +- .../prometheus/common/config/http_config.go | 166 +- .../common/config/http_config_test.go | 539 +- .../common/config/testdata/barney-no-pass.key | 27 + .../common/config/testdata/barney.crt | 96 + .../config/testdata/basic-auth-password | 1 + .../common/config/testdata/bearer.token | 1 + .../testdata/http.conf.basic-auth.good.yaml | 3 + .../http.conf.basic-auth.no-password.yaml | 2 + .../http.conf.basic-auth.no-username.yaml | 2 + .../http.conf.basic-auth.too-much.bad.yaml | 4 + .../common/config/testdata/server.crt | 96 + .../common/config/testdata/server.key | 28 + .../common/config/testdata/tls-ca-chain.pem | 172 + .../common/config/tls_config_test.go | 36 +- .../prometheus/common/expfmt/decode.go | 4 +- .../prometheus/common/expfmt/expfmt.go | 2 +- .../prometheus/common/expfmt/text_parse.go | 6 +- .../prometheus/common/model/silence.go | 4 +- .../prometheus/common/model/value.go | 4 +- .../prometheus/common/route/route.go | 28 +- .../prometheus/common/route/route_test.go | 32 + .../prometheus/procfs/.circleci/config.yml | 21 + deps/github.com/prometheus/procfs/.gitignore | 1 + deps/github.com/prometheus/procfs/.travis.yml | 5 +- deps/github.com/prometheus/procfs/Makefile | 83 +- .../prometheus/procfs/fixtures.ttar | 446 + .../prometheus/procfs/fixtures/26231/cmdline | Bin 16 -> 0 bytes .../prometheus/procfs/fixtures/26231/comm | 1 - .../prometheus/procfs/fixtures/26231/exe | 1 - .../prometheus/procfs/fixtures/26231/fd/0 | 1 - .../prometheus/procfs/fixtures/26231/fd/1 | 1 - .../prometheus/procfs/fixtures/26231/fd/10 | 1 - .../prometheus/procfs/fixtures/26231/fd/2 | 1 - .../prometheus/procfs/fixtures/26231/fd/3 | 1 - .../prometheus/procfs/fixtures/26231/io | 7 - .../prometheus/procfs/fixtures/26231/limits | 17 - .../procfs/fixtures/26231/mountstats | 19 - .../prometheus/procfs/fixtures/26231/net/dev | 4 - .../prometheus/procfs/fixtures/26231/ns/mnt | 1 - .../prometheus/procfs/fixtures/26231/ns/net | 1 - .../prometheus/procfs/fixtures/26231/stat | 1 - .../prometheus/procfs/fixtures/26232/comm | 1 - .../prometheus/procfs/fixtures/26232/fd/0 | 1 - .../prometheus/procfs/fixtures/26232/fd/1 | 1 - .../prometheus/procfs/fixtures/26232/fd/2 | 1 - .../prometheus/procfs/fixtures/26232/fd/3 | 1 - .../prometheus/procfs/fixtures/26232/fd/4 | 1 - .../prometheus/procfs/fixtures/26232/limits | 17 - .../prometheus/procfs/fixtures/26232/stat | 1 - .../prometheus/procfs/fixtures/584/stat | 2 - .../procfs/fixtures/buddyinfo/short/buddyinfo | 3 - .../fixtures/buddyinfo/sizemismatch/buddyinfo | 3 - .../procfs/fixtures/buddyinfo/valid/buddyinfo | 3 - .../prometheus/procfs/fixtures/fs/xfs/stat | 23 - .../prometheus/procfs/fixtures/mdstat | 26 - .../prometheus/procfs/fixtures/net/dev | 6 - .../prometheus/procfs/fixtures/net/ip_vs | 21 - .../procfs/fixtures/net/ip_vs_stats | 6 - .../prometheus/procfs/fixtures/net/rpc/nfs | 5 - .../prometheus/procfs/fixtures/net/rpc/nfsd | 11 - .../prometheus/procfs/fixtures/net/xfrm_stat | 28 - .../prometheus/procfs/fixtures/self | 1 - .../prometheus/procfs/fixtures/stat | 16 - .../procfs/fixtures/symlinktargets/README | 2 - deps/github.com/prometheus/procfs/fs.go | 13 + deps/github.com/prometheus/procfs/fs_test.go | 13 + deps/github.com/prometheus/procfs/ipvs.go | 13 + .../github.com/prometheus/procfs/ipvs_test.go | 13 + deps/github.com/prometheus/procfs/mdstat.go | 13 + .../prometheus/procfs/mdstat_test.go | 13 + .../prometheus/procfs/mountstats.go | 64 +- .../prometheus/procfs/mountstats_test.go | 109 +- deps/github.com/prometheus/procfs/net_dev.go | 15 +- .../prometheus/procfs/net_dev_test.go | 13 + deps/github.com/prometheus/procfs/nfs/nfs.go | 20 +- .../github.com/prometheus/procfs/nfs/parse.go | 16 +- .../prometheus/procfs/nfs/parse_nfs_test.go | 34 +- deps/github.com/prometheus/procfs/proc.go | 16 +- deps/github.com/prometheus/procfs/proc_io.go | 13 + .../prometheus/procfs/proc_io_test.go | 13 + .../prometheus/procfs/proc_limits.go | 13 + .../prometheus/procfs/proc_limits_test.go | 13 + deps/github.com/prometheus/procfs/proc_ns.go | 13 + .../prometheus/procfs/proc_ns_test.go | 13 + .../github.com/prometheus/procfs/proc_stat.go | 13 + .../prometheus/procfs/proc_stat_test.go | 13 + .../github.com/prometheus/procfs/proc_test.go | 14 + .../procfs/scripts/check_license.sh | 29 + deps/github.com/prometheus/procfs/stat.go | 13 + .../github.com/prometheus/procfs/stat_test.go | 13 + .../prometheus/procfs/sysfs/fixtures.ttar | 136 + .../prometheus/procfs/sysfs/net_class.go | 174 + .../prometheus/procfs/sysfs/net_class_test.go | 88 + deps/github.com/prometheus/procfs/ttar | 133 +- deps/github.com/prometheus/procfs/xfrm.go | 2 +- deps/github.com/qor/assetfs/LICENSE.txt | 8 - deps/github.com/qor/assetfs/README.md | 38 - deps/github.com/qor/assetfs/assetfs.go | 37 - deps/github.com/qor/assetfs/filesystem.go | 88 - deps/github.com/qor/qor/.babelrc | 3 - deps/github.com/qor/qor/.codeclimate.yml | 20 - deps/github.com/qor/qor/.csscomb.json | 304 - deps/github.com/qor/qor/.csslintrc | 24 - deps/github.com/qor/qor/.editorconfig | 15 - deps/github.com/qor/qor/.eslintignore | 1 - deps/github.com/qor/qor/.eslintrc | 35 - deps/github.com/qor/qor/.gitattributes | 3 - deps/github.com/qor/qor/.gitignore | 27 - deps/github.com/qor/qor/.jscsrc | 29 - deps/github.com/qor/qor/.jshintrc | 23 - deps/github.com/qor/qor/LICENSE.txt | 8 - deps/github.com/qor/qor/README.md | 66 - deps/github.com/qor/qor/bower.json | 31 - deps/github.com/qor/qor/config.go | 8 - deps/github.com/qor/qor/context.go | 43 - deps/github.com/qor/qor/errors.go | 46 - deps/github.com/qor/qor/gulpfile.js | 356 - deps/github.com/qor/qor/package.json | 29 - deps/github.com/qor/qor/resource/crud.go | 148 - deps/github.com/qor/qor/resource/meta.go | 430 - deps/github.com/qor/qor/resource/meta_test.go | 243 - .../github.com/qor/qor/resource/meta_value.go | 68 - deps/github.com/qor/qor/resource/processor.go | 155 - deps/github.com/qor/qor/resource/resource.go | 165 - deps/github.com/qor/qor/resource/schema.go | 178 - deps/github.com/qor/qor/test/utils/test_db.go | 44 - deps/github.com/qor/qor/test_all.sh | 14 - .../qor/qor/update_all_qor_repos.sh | 54 - deps/github.com/qor/qor/utils/buffer.go | 13 - deps/github.com/qor/qor/utils/meta.go | 101 - deps/github.com/qor/qor/utils/params.go | 107 - deps/github.com/qor/qor/utils/params_test.go | 53 - deps/github.com/qor/qor/utils/utils.go | 393 - deps/github.com/qor/qor/utils/utils_test.go | 167 - deps/github.com/qor/qor/yarn.lock | 4154 -- deps/github.com/qor/render/LICENSE.txt | 8 - deps/github.com/qor/render/README.md | 114 - deps/github.com/qor/render/assetfs/assetfs.go | 15 - .../qor/render/assetfs/filesystem.go | 88 - deps/github.com/qor/render/render.go | 144 - deps/github.com/qor/render/render_test.go | 42 - deps/github.com/qor/render/template.go | 151 - .../render/test/layouts/layout_for_test.tmpl | 1 - deps/github.com/qor/render/test/test.tmpl | 1 - deps/github.com/qor/render/utils.go | 10 - .../github.com/rainycape/unidecode/.gitignore | 23 - deps/github.com/rainycape/unidecode/LICENSE | 203 - deps/github.com/rainycape/unidecode/README.md | 6 - deps/github.com/rainycape/unidecode/decode.go | 41 - .../rainycape/unidecode/make_table.go | 71 - deps/github.com/rainycape/unidecode/table.go | 5 - deps/github.com/rainycape/unidecode/table.txt | 46731 ---------------- .../rainycape/unidecode/unidecode.go | 58 - .../rainycape/unidecode/unidecode_test.go | 57 - deps/github.com/rs/zerolog/.travis.yml | 14 +- deps/github.com/rs/zerolog/README.md | 263 +- deps/github.com/rs/zerolog/array.go | 138 +- deps/github.com/rs/zerolog/array_test.go | 12 +- deps/github.com/rs/zerolog/binary_test.go | 498 + deps/github.com/rs/zerolog/cmd/lint/lint.go | 175 + deps/github.com/rs/zerolog/cmd/lint/readme.md | 37 + deps/github.com/rs/zerolog/console.go | 34 +- deps/github.com/rs/zerolog/console_test.go | 30 + deps/github.com/rs/zerolog/context.go | 168 +- deps/github.com/rs/zerolog/ctx.go | 23 +- deps/github.com/rs/zerolog/ctx_test.go | 28 +- deps/github.com/rs/zerolog/diode/diode.go | 91 + .../rs/zerolog/diode/diode_example_test.go | 24 + .../github.com/rs/zerolog/diode/diode_test.go | 47 + .../rs/zerolog/diode/internal/diodes/README | 1 + .../diode/internal/diodes/many_to_one.go | 130 + .../diode/internal/diodes/one_to_one.go | 129 + .../zerolog/diode/internal/diodes/poller.go | 80 + .../zerolog/diode/internal/diodes/waiter.go | 83 + deps/github.com/rs/zerolog/encoder.go | 56 + deps/github.com/rs/zerolog/encoder_cbor.go | 35 + deps/github.com/rs/zerolog/encoder_json.go | 32 + deps/github.com/rs/zerolog/event.go | 263 +- deps/github.com/rs/zerolog/fields.go | 164 +- deps/github.com/rs/zerolog/globals.go | 6 +- deps/github.com/rs/zerolog/go.mod | 1 + .../rs/zerolog/hlog/hlog_example_test.go | 2 + deps/github.com/rs/zerolog/hlog/hlog_test.go | 27 +- deps/github.com/rs/zerolog/hook.go | 9 + deps/github.com/rs/zerolog/hook_test.go | 313 +- .../rs/zerolog/internal/cbor/README.md | 56 + .../rs/zerolog/internal/cbor/base.go | 11 + .../rs/zerolog/internal/cbor/cbor.go | 100 + .../rs/zerolog/internal/cbor/decode_stream.go | 614 + .../rs/zerolog/internal/cbor/decoder_test.go | 205 + .../zerolog/internal/cbor/examples/genLog.go | 55 + .../zerolog/internal/cbor/examples/makefile | 10 + .../rs/zerolog/internal/cbor/string.go | 68 + .../rs/zerolog/internal/cbor/string_test.go | 118 + .../rs/zerolog/internal/cbor/time.go | 93 + .../rs/zerolog/internal/cbor/time_test.go | 99 + .../rs/zerolog/internal/cbor/types.go | 478 + .../rs/zerolog/internal/cbor/types_test.go | 322 + .../rs/zerolog/internal/json/base.go | 41 +- .../rs/zerolog/internal/json/bytes.go | 85 + .../rs/zerolog/internal/json/bytes_test.go | 84 + .../rs/zerolog/internal/json/string.go | 91 +- .../rs/zerolog/internal/json/string_test.go | 85 +- .../rs/zerolog/internal/json/time.go | 26 +- .../rs/zerolog/internal/json/types.go | 194 +- .../rs/zerolog/internal/json/types_test.go | 160 +- .../rs/zerolog/journald/journald.go | 115 + .../rs/zerolog/journald/journald_test.go | 44 + deps/github.com/rs/zerolog/log.go | 47 +- .../rs/zerolog/log/log_example_test.go | 4 +- .../github.com/rs/zerolog/log_example_test.go | 81 +- deps/github.com/rs/zerolog/log_test.go | 158 +- deps/github.com/rs/zerolog/sampler_test.go | 2 + deps/github.com/rs/zerolog/syslog.go | 5 +- deps/github.com/rs/zerolog/syslog_test.go | 1 + deps/github.com/rs/zerolog/writer_test.go | 1 + deps/github.com/sirupsen/logrus/.gitignore | 1 + deps/github.com/sirupsen/logrus/.travis.yml | 15 + deps/github.com/sirupsen/logrus/CHANGELOG.md | 113 + deps/github.com/sirupsen/logrus/LICENSE | 21 + deps/github.com/sirupsen/logrus/README.md | 507 + deps/github.com/sirupsen/logrus/alt_exit.go | 64 + deps/github.com/sirupsen/logrus/appveyor.yml | 14 + deps/github.com/sirupsen/logrus/doc.go | 26 + deps/github.com/sirupsen/logrus/entry.go | 279 + deps/github.com/sirupsen/logrus/exported.go | 193 + deps/github.com/sirupsen/logrus/formatter.go | 45 + deps/github.com/sirupsen/logrus/hooks.go | 34 + .../sirupsen/logrus/json_formatter.go | 79 + deps/github.com/sirupsen/logrus/logger.go | 323 + deps/github.com/sirupsen/logrus/logrus.go | 143 + .../sirupsen/logrus/terminal_bsd.go | 10 + .../sirupsen/logrus/terminal_linux.go | 14 + .../sirupsen/logrus/text_formatter.go | 191 + deps/github.com/sirupsen/logrus/writer.go | 62 + .../spf13/cobra/.circleci/config.yml | 6 +- deps/github.com/spf13/cobra/.travis.yml | 4 +- deps/github.com/spf13/cobra/README.md | 2 - .../spf13/cobra/bash_completions.go | 59 +- .../spf13/cobra/bash_completions.md | 66 +- .../spf13/cobra/bash_completions_test.go | 34 +- deps/github.com/spf13/cobra/cobra/cmd/init.go | 2 +- deps/github.com/spf13/cobra/command.go | 13 + deps/github.com/spf13/cobra/command_test.go | 131 +- deps/github.com/spf13/cobra/doc/man_docs.go | 6 +- .../spf13/cobra/doc/man_docs_test.go | 36 + deps/github.com/spf13/cobra/doc/md_docs.go | 4 +- .../spf13/cobra/doc/md_docs_test.go | 24 + deps/github.com/spf13/cobra/doc/rest_docs.go | 4 +- .../spf13/cobra/doc/rest_docs_test.go | 23 + deps/github.com/spf13/pflag/bytes.go | 209 + deps/github.com/spf13/pflag/bytes_test.go | 134 + deps/github.com/spf13/pflag/flag.go | 101 +- deps/github.com/spf13/pflag/flag_test.go | 105 +- deps/github.com/spf13/pflag/golangflag.go | 4 + .../github.com/spf13/pflag/golangflag_test.go | 8 + .../github.com/spf13/pflag/printusage_test.go | 74 + deps/github.com/spf13/pflag/string_array.go | 8 +- deps/github.com/spf13/pflag/string_slice.go | 20 + deps/github.com/spf13/pflag/string_to_int.go | 149 + .../spf13/pflag/string_to_int_test.go | 156 + .../spf13/pflag/string_to_string.go | 160 + .../spf13/pflag/string_to_string_test.go | 162 + .../github.com/stretchr => }/objx/LICENSE | 0 .../stretchr => }/objx/accessors.go | 0 .../stretchr => }/objx/constants.go | 0 .../stretchr => }/objx/conversions.go | 0 .../github.com/stretchr => }/objx/doc.go | 0 .../github.com/stretchr => }/objx/map.go | 0 .../stretchr => }/objx/mutations.go | 0 .../github.com/stretchr => }/objx/security.go | 0 .../github.com/stretchr => }/objx/tests.go | 0 .../objx/type_specific_codegen.go | 0 .../github.com/stretchr => }/objx/value.go | 0 deps/github.com/stretchr/testify/.travis.yml | 6 +- deps/github.com/stretchr/testify/LICENCE.txt | 22 - deps/github.com/stretchr/testify/README.md | 30 + .../testify/assert/assertion_format.go | 4 +- .../testify/assert/assertion_forward.go | 8 +- .../stretchr/testify/assert/assertions.go | 56 +- .../testify/assert/assertions_test.go | 216 +- .../testify/assert/http_assertions.go | 7 +- .../testify/assert/http_assertions_test.go | 29 + deps/github.com/stretchr/testify/mock/mock.go | 113 +- .../stretchr/testify/mock/mock_test.go | 132 +- .../stretchr/testify/require/require.go | 638 +- .../stretchr/testify/require/require.go.tmpl | 5 +- .../testify/require/require_forward.go | 8 +- .../stretchr/testify/require/requirements.go | 16 + .../testify/require/requirements_test.go | 197 + .../vendor/github.com/davecgh/go-spew/LICENSE | 15 - .../github.com/davecgh/go-spew/spew/bypass.go | 152 - .../davecgh/go-spew/spew/bypasssafe.go | 38 - .../github.com/davecgh/go-spew/spew/common.go | 341 - .../github.com/davecgh/go-spew/spew/config.go | 306 - .../github.com/davecgh/go-spew/spew/doc.go | 211 - .../github.com/davecgh/go-spew/spew/dump.go | 509 - .../github.com/davecgh/go-spew/spew/format.go | 419 - .../github.com/davecgh/go-spew/spew/spew.go | 148 - .../github.com/pmezard/go-difflib/LICENSE | 27 - .../pmezard/go-difflib/difflib/difflib.go | 772 - deps/github.com/ugorji/go/README.md | 4 - deps/github.com/ugorji/go/codec/build.sh | 7 +- deps/github.com/ugorji/go/codec/cbor.go | 20 +- deps/github.com/ugorji/go/codec/decode.go | 186 +- deps/github.com/ugorji/go/codec/encode.go | 157 +- .../ugorji/go/codec/gen-helper.generated.go | 18 +- .../ugorji/go/codec/gen-helper.go.tmpl | 17 +- deps/github.com/ugorji/go/codec/gen.go | 6 + deps/github.com/ugorji/go/codec/helper.go | 54 +- deps/github.com/ugorji/go/codec/json.go | 54 +- .../codec/mammoth2_codecgen_generated_test.go | 3504 +- deps/github.com/ugorji/go/codec/msgpack.go | 16 +- deps/github.com/ugorji/go/codec/prebuild.go | 3 + deps/github.com/ugorji/go/codec/prebuild.sh | 199 + deps/github.com/ugorji/go/codec/simple.go | 4 +- deps/github.com/ugorji/go/codec/tests.sh | 102 + .../github.com/voxelbrain/goptions/circle.yml | 13 +- .../github.com/voxelbrain/goptions/options.go | 9 + .../voxelbrain/goptions/valueparser.go | 10 + .../voxelbrain/goptions/valueparser_test.go | 23 + deps/github.com/xiang90/probing/.gitignore | 24 + deps/github.com/xiang90/probing/LICENSE | 22 + deps/github.com/xiang90/probing/README.md | 39 + deps/github.com/xiang90/probing/prober.go | 134 + deps/github.com/xiang90/probing/server.go | 25 + deps/github.com/xiang90/probing/status.go | 108 + deps/golang.org/x/crypto/bcrypt/base64.go | 35 + deps/golang.org/x/crypto/bcrypt/bcrypt.go | 295 + deps/golang.org/x/crypto/blowfish/block.go | 159 + deps/golang.org/x/crypto/blowfish/cipher.go | 91 + deps/golang.org/x/crypto/blowfish/const.go | 199 + .../x/crypto/ssh/terminal/terminal.go | 2 +- deps/golang.org/x/crypto/ssh/terminal/util.go | 71 +- .../x/crypto/ssh/terminal/util_solaris.go | 40 +- .../x/crypto/ssh/terminal/util_windows.go | 23 +- deps/golang.org/x/net/.gitattributes | 10 - deps/golang.org/x/net/.gitignore | 2 - deps/golang.org/x/net/CONTRIBUTING.md | 26 - deps/golang.org/x/net/README.md | 16 - deps/golang.org/x/net/bpf/asm.go | 41 - deps/golang.org/x/net/bpf/constants.go | 218 - deps/golang.org/x/net/bpf/doc.go | 82 - deps/golang.org/x/net/bpf/instructions.go | 704 - .../golang.org/x/net/bpf/instructions_test.go | 525 - deps/golang.org/x/net/bpf/setter.go | 10 - .../x/net/bpf/testdata/all_instructions.bpf | 1 - .../x/net/bpf/testdata/all_instructions.txt | 79 - deps/golang.org/x/net/bpf/vm.go | 140 - deps/golang.org/x/net/bpf/vm_aluop_test.go | 512 - deps/golang.org/x/net/bpf/vm_bpf_test.go | 192 - .../golang.org/x/net/bpf/vm_extension_test.go | 49 - deps/golang.org/x/net/bpf/vm_instructions.go | 174 - deps/golang.org/x/net/bpf/vm_jump_test.go | 380 - deps/golang.org/x/net/bpf/vm_load_test.go | 246 - deps/golang.org/x/net/bpf/vm_ret_test.go | 115 - deps/golang.org/x/net/bpf/vm_scratch_test.go | 247 - deps/golang.org/x/net/bpf/vm_test.go | 144 - deps/golang.org/x/net/codereview.cfg | 1 - deps/golang.org/x/net/context/context.go | 4 +- deps/golang.org/x/net/context/context_test.go | 583 - .../x/net/context/ctxhttp/ctxhttp.go | 2 +- .../x/net/context/ctxhttp/ctxhttp_17_test.go | 29 - .../x/net/context/ctxhttp/ctxhttp_pre17.go | 2 +- .../net/context/ctxhttp/ctxhttp_pre17_test.go | 79 - .../x/net/context/ctxhttp/ctxhttp_test.go | 105 - .../x/net/context/withtimeout_test.go | 31 - deps/golang.org/x/net/dict/dict.go | 210 - .../x/net/dns/dnsmessage/example_test.go | 132 - .../x/net/dns/dnsmessage/message.go | 2247 - .../x/net/dns/dnsmessage/message_test.go | 1316 - deps/golang.org/x/net/html/atom/atom.go | 2 +- deps/golang.org/x/net/html/atom/atom_test.go | 109 - deps/golang.org/x/net/html/atom/gen.go | 138 +- deps/golang.org/x/net/html/atom/table.go | 1474 +- deps/golang.org/x/net/html/atom/table_test.go | 376 - deps/golang.org/x/net/html/charset/charset.go | 257 - .../x/net/html/charset/charset_test.go | 237 - .../html/charset/testdata/HTTP-charset.html | 48 - .../charset/testdata/HTTP-vs-UTF-8-BOM.html | 48 - .../testdata/HTTP-vs-meta-charset.html | 49 - .../testdata/HTTP-vs-meta-content.html | 49 - .../testdata/No-encoding-declaration.html | 47 - .../x/net/html/charset/testdata/README | 9 - .../html/charset/testdata/UTF-16BE-BOM.html | Bin 2670 -> 0 bytes .../html/charset/testdata/UTF-16LE-BOM.html | Bin 2682 -> 0 bytes .../testdata/UTF-8-BOM-vs-meta-charset.html | 49 - .../testdata/UTF-8-BOM-vs-meta-content.html | 48 - .../testdata/meta-charset-attribute.html | 48 - .../testdata/meta-content-attribute.html | 48 - deps/golang.org/x/net/html/const.go | 6 +- deps/golang.org/x/net/html/doc.go | 10 +- deps/golang.org/x/net/html/entity.go | 4154 +- deps/golang.org/x/net/html/entity_test.go | 29 - deps/golang.org/x/net/html/escape_test.go | 97 - deps/golang.org/x/net/html/example_test.go | 40 - deps/golang.org/x/net/html/foreign.go | 6 +- deps/golang.org/x/net/html/node.go | 33 +- deps/golang.org/x/net/html/node_test.go | 146 - deps/golang.org/x/net/html/parse.go | 361 +- deps/golang.org/x/net/html/parse_test.go | 400 - deps/golang.org/x/net/html/render_test.go | 156 - deps/golang.org/x/net/html/testdata/go1.html | 2237 - .../x/net/html/testdata/webkit/README | 28 - .../x/net/html/testdata/webkit/adoption01.dat | 194 - .../x/net/html/testdata/webkit/adoption02.dat | 31 - .../x/net/html/testdata/webkit/comments01.dat | 135 - .../x/net/html/testdata/webkit/doctype01.dat | 370 - .../x/net/html/testdata/webkit/entities01.dat | 603 - .../x/net/html/testdata/webkit/entities02.dat | 249 - .../html/testdata/webkit/html5test-com.dat | 246 - .../x/net/html/testdata/webkit/inbody01.dat | 43 - .../x/net/html/testdata/webkit/isindex.dat | 40 - ...pending-spec-changes-plain-text-unsafe.dat | Bin 115 -> 0 bytes .../testdata/webkit/pending-spec-changes.dat | 52 - .../testdata/webkit/plain-text-unsafe.dat | Bin 4166 -> 0 bytes .../x/net/html/testdata/webkit/ruby.dat | 298 - .../net/html/testdata/webkit/scriptdata01.dat | 308 - .../testdata/webkit/scripted/adoption01.dat | 15 - .../testdata/webkit/scripted/webkit01.dat | 28 - .../x/net/html/testdata/webkit/tables01.dat | 212 - .../x/net/html/testdata/webkit/template.dat | 1117 - .../x/net/html/testdata/webkit/tests1.dat | 1952 - .../x/net/html/testdata/webkit/tests10.dat | 799 - .../x/net/html/testdata/webkit/tests11.dat | 482 - .../x/net/html/testdata/webkit/tests12.dat | 62 - .../x/net/html/testdata/webkit/tests14.dat | 74 - .../x/net/html/testdata/webkit/tests15.dat | 208 - .../x/net/html/testdata/webkit/tests16.dat | 2299 - .../x/net/html/testdata/webkit/tests17.dat | 153 - .../x/net/html/testdata/webkit/tests18.dat | 269 - .../x/net/html/testdata/webkit/tests19.dat | 1237 - .../x/net/html/testdata/webkit/tests2.dat | 763 - .../x/net/html/testdata/webkit/tests20.dat | 455 - .../x/net/html/testdata/webkit/tests21.dat | 221 - .../x/net/html/testdata/webkit/tests22.dat | 157 - .../x/net/html/testdata/webkit/tests23.dat | 155 - .../x/net/html/testdata/webkit/tests24.dat | 79 - .../x/net/html/testdata/webkit/tests25.dat | 219 - .../x/net/html/testdata/webkit/tests26.dat | 313 - .../x/net/html/testdata/webkit/tests3.dat | 305 - .../x/net/html/testdata/webkit/tests4.dat | 59 - .../x/net/html/testdata/webkit/tests5.dat | 191 - .../x/net/html/testdata/webkit/tests6.dat | 663 - .../x/net/html/testdata/webkit/tests7.dat | 390 - .../x/net/html/testdata/webkit/tests8.dat | 148 - .../x/net/html/testdata/webkit/tests9.dat | 457 - .../testdata/webkit/tests_innerHTML_1.dat | 741 - .../x/net/html/testdata/webkit/tricky01.dat | 261 - .../x/net/html/testdata/webkit/webkit01.dat | 610 - .../x/net/html/testdata/webkit/webkit02.dat | 159 - deps/golang.org/x/net/html/token.go | 4 +- deps/golang.org/x/net/html/token_test.go | 748 - deps/golang.org/x/net/http/httpguts/guts.go | 50 - .../golang.org/x/net/http/httpguts/httplex.go | 346 - .../x/net/http/httpguts/httplex_test.go | 119 - .../x/net/http/httpproxy/export_test.go | 7 - .../x/net/http/httpproxy/go19_test.go | 13 - deps/golang.org/x/net/http/httpproxy/proxy.go | 239 - .../x/net/http/httpproxy/proxy_test.go | 301 - deps/golang.org/x/net/http2/ciphers.go | 2 +- deps/golang.org/x/net/http2/ciphers_test.go | 309 - .../x/net/http2/configure_transport.go | 2 +- .../golang.org/x/net/http2/databuffer_test.go | 157 - deps/golang.org/x/net/http2/errors_test.go | 24 - deps/golang.org/x/net/http2/flow.go | 10 +- deps/golang.org/x/net/http2/flow_test.go | 87 - deps/golang.org/x/net/http2/frame.go | 4 +- deps/golang.org/x/net/http2/frame_test.go | 1191 - deps/golang.org/x/net/http2/go18_test.go | 79 - deps/golang.org/x/net/http2/go19_test.go | 59 - deps/golang.org/x/net/http2/gotrack_test.go | 33 - deps/golang.org/x/net/http2/h2demo/.gitignore | 6 - deps/golang.org/x/net/http2/h2demo/Dockerfile | 11 - .../x/net/http2/h2demo/Dockerfile.0 | 134 - deps/golang.org/x/net/http2/h2demo/Makefile | 55 - deps/golang.org/x/net/http2/h2demo/README | 16 - .../x/net/http2/h2demo/deployment-prod.yaml | 28 - deps/golang.org/x/net/http2/h2demo/h2demo.go | 543 - deps/golang.org/x/net/http2/h2demo/launch.go | 302 - deps/golang.org/x/net/http2/h2demo/rootCA.key | 27 - deps/golang.org/x/net/http2/h2demo/rootCA.pem | 26 - deps/golang.org/x/net/http2/h2demo/rootCA.srl | 1 - deps/golang.org/x/net/http2/h2demo/server.crt | 20 - deps/golang.org/x/net/http2/h2demo/server.key | 27 - .../x/net/http2/h2demo/service.yaml | 17 - deps/golang.org/x/net/http2/h2demo/tmpl.go | 1991 - deps/golang.org/x/net/http2/h2i/README.md | 97 - deps/golang.org/x/net/http2/h2i/h2i.go | 522 - deps/golang.org/x/net/http2/hpack/encode.go | 2 +- .../x/net/http2/hpack/encode_test.go | 386 - deps/golang.org/x/net/http2/hpack/hpack.go | 6 - .../x/net/http2/hpack/hpack_test.go | 741 - .../x/net/http2/hpack/tables_test.go | 214 - deps/golang.org/x/net/http2/http2.go | 10 +- deps/golang.org/x/net/http2/http2_test.go | 227 - deps/golang.org/x/net/http2/pipe_test.go | 130 - deps/golang.org/x/net/http2/server.go | 161 +- .../x/net/http2/server_push_test.go | 521 - deps/golang.org/x/net/http2/server_test.go | 3843 -- .../testdata/draft-ietf-httpbis-http2.xml | 5021 -- deps/golang.org/x/net/http2/transport.go | 361 +- deps/golang.org/x/net/http2/transport_test.go | 3848 -- deps/golang.org/x/net/http2/write.go | 11 +- .../x/net/http2/writesched_priority_test.go | 541 - .../x/net/http2/writesched_random_test.go | 44 - .../golang.org/x/net/http2/writesched_test.go | 125 - deps/golang.org/x/net/http2/z_spec_test.go | 356 - deps/golang.org/x/net/icmp/diag_test.go | 274 - deps/golang.org/x/net/icmp/dstunreach.go | 41 - deps/golang.org/x/net/icmp/echo.go | 157 - deps/golang.org/x/net/icmp/endpoint.go | 113 - deps/golang.org/x/net/icmp/example_test.go | 63 - deps/golang.org/x/net/icmp/extension.go | 108 - deps/golang.org/x/net/icmp/extension_test.go | 333 - deps/golang.org/x/net/icmp/helper_posix.go | 75 - deps/golang.org/x/net/icmp/interface.go | 322 - deps/golang.org/x/net/icmp/ipv4.go | 61 - deps/golang.org/x/net/icmp/ipv4_test.go | 75 - deps/golang.org/x/net/icmp/ipv6.go | 23 - deps/golang.org/x/net/icmp/listen_posix.go | 100 - deps/golang.org/x/net/icmp/listen_stub.go | 33 - deps/golang.org/x/net/icmp/message.go | 157 - deps/golang.org/x/net/icmp/message_test.go | 155 - deps/golang.org/x/net/icmp/messagebody.go | 41 - deps/golang.org/x/net/icmp/mpls.go | 77 - deps/golang.org/x/net/icmp/multipart.go | 121 - deps/golang.org/x/net/icmp/multipart_test.go | 575 - deps/golang.org/x/net/icmp/packettoobig.go | 43 - deps/golang.org/x/net/icmp/paramprob.go | 63 - deps/golang.org/x/net/icmp/ping_test.go | 200 - deps/golang.org/x/net/icmp/sys_freebsd.go | 11 - deps/golang.org/x/net/icmp/timeexceeded.go | 39 - deps/golang.org/x/net/idna/example_test.go | 70 - deps/golang.org/x/net/idna/idna.go | 128 +- deps/golang.org/x/net/idna/idna_test.go | 108 - deps/golang.org/x/net/idna/punycode_test.go | 198 - deps/golang.org/x/net/idna/tables.go | 4396 +- deps/golang.org/x/net/idna/trieval.go | 17 +- deps/golang.org/x/net/internal/iana/const.go | 223 - deps/golang.org/x/net/internal/iana/gen.go | 383 - .../x/net/internal/nettest/helper_bsd.go | 53 - .../x/net/internal/nettest/helper_nobsd.go | 15 - .../x/net/internal/nettest/helper_posix.go | 31 - .../x/net/internal/nettest/helper_stub.go | 32 - .../x/net/internal/nettest/helper_unix.go | 29 - .../x/net/internal/nettest/helper_windows.go | 42 - .../x/net/internal/nettest/interface.go | 94 - .../x/net/internal/nettest/rlimit.go | 11 - .../x/net/internal/nettest/stack.go | 152 - .../x/net/internal/socket/cmsghdr.go | 11 - .../x/net/internal/socket/cmsghdr_bsd.go | 13 - .../internal/socket/cmsghdr_linux_32bit.go | 14 - .../internal/socket/cmsghdr_linux_64bit.go | 14 - .../internal/socket/cmsghdr_solaris_64bit.go | 14 - .../x/net/internal/socket/cmsghdr_stub.go | 17 - .../x/net/internal/socket/defs_darwin.go | 44 - .../x/net/internal/socket/defs_dragonfly.go | 44 - .../x/net/internal/socket/defs_freebsd.go | 44 - .../x/net/internal/socket/defs_linux.go | 49 - .../x/net/internal/socket/defs_netbsd.go | 47 - .../x/net/internal/socket/defs_openbsd.go | 44 - .../x/net/internal/socket/defs_solaris.go | 44 - .../x/net/internal/socket/error_unix.go | 31 - .../x/net/internal/socket/error_windows.go | 26 - .../x/net/internal/socket/iovec_32bit.go | 19 - .../x/net/internal/socket/iovec_64bit.go | 19 - .../internal/socket/iovec_solaris_64bit.go | 19 - .../x/net/internal/socket/iovec_stub.go | 11 - .../x/net/internal/socket/mmsghdr_stub.go | 21 - .../x/net/internal/socket/mmsghdr_unix.go | 42 - .../x/net/internal/socket/msghdr_bsd.go | 39 - .../x/net/internal/socket/msghdr_bsdvar.go | 16 - .../x/net/internal/socket/msghdr_linux.go | 36 - .../net/internal/socket/msghdr_linux_32bit.go | 24 - .../net/internal/socket/msghdr_linux_64bit.go | 24 - .../x/net/internal/socket/msghdr_openbsd.go | 14 - .../internal/socket/msghdr_solaris_64bit.go | 36 - .../x/net/internal/socket/msghdr_stub.go | 14 - .../x/net/internal/socket/rawconn.go | 66 - .../x/net/internal/socket/rawconn_mmsg.go | 74 - .../x/net/internal/socket/rawconn_msg.go | 77 - .../x/net/internal/socket/rawconn_nommsg.go | 18 - .../x/net/internal/socket/rawconn_nomsg.go | 18 - .../x/net/internal/socket/rawconn_stub.go | 25 - .../x/net/internal/socket/reflect.go | 62 - .../x/net/internal/socket/socket.go | 285 - .../net/internal/socket/socket_go1_9_test.go | 259 - .../x/net/internal/socket/socket_test.go | 46 - deps/golang.org/x/net/internal/socket/sys.go | 33 - .../x/net/internal/socket/sys_bsd.go | 17 - .../x/net/internal/socket/sys_bsdvar.go | 14 - .../x/net/internal/socket/sys_darwin.go | 7 - .../x/net/internal/socket/sys_dragonfly.go | 7 - .../x/net/internal/socket/sys_linux.go | 27 - .../x/net/internal/socket/sys_linux_386.go | 55 - .../x/net/internal/socket/sys_linux_386.s | 11 - .../x/net/internal/socket/sys_linux_amd64.go | 10 - .../x/net/internal/socket/sys_linux_arm.go | 10 - .../x/net/internal/socket/sys_linux_arm64.go | 10 - .../x/net/internal/socket/sys_linux_mips.go | 10 - .../x/net/internal/socket/sys_linux_mips64.go | 10 - .../net/internal/socket/sys_linux_mips64le.go | 10 - .../x/net/internal/socket/sys_linux_mipsle.go | 10 - .../x/net/internal/socket/sys_linux_ppc64.go | 10 - .../net/internal/socket/sys_linux_ppc64le.go | 10 - .../x/net/internal/socket/sys_linux_s390x.go | 55 - .../x/net/internal/socket/sys_linux_s390x.s | 11 - .../x/net/internal/socket/sys_netbsd.go | 25 - .../x/net/internal/socket/sys_posix.go | 168 - .../x/net/internal/socket/sys_solaris.go | 71 - .../x/net/internal/socket/sys_solaris_amd64.s | 11 - .../x/net/internal/socket/sys_stub.go | 64 - .../x/net/internal/socket/sys_unix.go | 33 - .../x/net/internal/socket/sys_windows.go | 70 - .../x/net/internal/socket/zsys_darwin_386.go | 59 - .../net/internal/socket/zsys_darwin_amd64.go | 61 - .../x/net/internal/socket/zsys_darwin_arm.go | 59 - .../net/internal/socket/zsys_darwin_arm64.go | 61 - .../internal/socket/zsys_dragonfly_amd64.go | 61 - .../x/net/internal/socket/zsys_freebsd_386.go | 59 - .../net/internal/socket/zsys_freebsd_amd64.go | 61 - .../x/net/internal/socket/zsys_freebsd_arm.go | 59 - .../x/net/internal/socket/zsys_linux_386.go | 63 - .../x/net/internal/socket/zsys_linux_amd64.go | 66 - .../x/net/internal/socket/zsys_linux_arm.go | 63 - .../x/net/internal/socket/zsys_linux_arm64.go | 66 - .../x/net/internal/socket/zsys_linux_mips.go | 63 - .../net/internal/socket/zsys_linux_mips64.go | 66 - .../internal/socket/zsys_linux_mips64le.go | 66 - .../net/internal/socket/zsys_linux_mipsle.go | 63 - .../x/net/internal/socket/zsys_linux_ppc64.go | 66 - .../net/internal/socket/zsys_linux_ppc64le.go | 66 - .../x/net/internal/socket/zsys_linux_s390x.go | 66 - .../x/net/internal/socket/zsys_netbsd_386.go | 65 - .../net/internal/socket/zsys_netbsd_amd64.go | 68 - .../x/net/internal/socket/zsys_netbsd_arm.go | 65 - .../x/net/internal/socket/zsys_openbsd_386.go | 59 - .../net/internal/socket/zsys_openbsd_amd64.go | 61 - .../x/net/internal/socket/zsys_openbsd_arm.go | 59 - .../net/internal/socket/zsys_solaris_amd64.go | 60 - .../golang.org/x/net/internal/socks/client.go | 168 - .../x/net/internal/socks/dial_test.go | 170 - deps/golang.org/x/net/internal/socks/socks.go | 316 - .../x/net/internal/sockstest/server.go | 241 - .../x/net/internal/sockstest/server_test.go | 103 - .../x/net/internal/timeseries/timeseries.go | 2 +- .../internal/timeseries/timeseries_test.go | 170 - deps/golang.org/x/net/ipv4/batch.go | 191 - deps/golang.org/x/net/ipv4/bpf_test.go | 93 - deps/golang.org/x/net/ipv4/control.go | 144 - deps/golang.org/x/net/ipv4/control_bsd.go | 40 - deps/golang.org/x/net/ipv4/control_pktinfo.go | 39 - deps/golang.org/x/net/ipv4/control_stub.go | 13 - deps/golang.org/x/net/ipv4/control_test.go | 21 - deps/golang.org/x/net/ipv4/control_unix.go | 73 - deps/golang.org/x/net/ipv4/control_windows.go | 16 - deps/golang.org/x/net/ipv4/defs_darwin.go | 77 - deps/golang.org/x/net/ipv4/defs_dragonfly.go | 38 - deps/golang.org/x/net/ipv4/defs_freebsd.go | 75 - deps/golang.org/x/net/ipv4/defs_linux.go | 122 - deps/golang.org/x/net/ipv4/defs_netbsd.go | 37 - deps/golang.org/x/net/ipv4/defs_openbsd.go | 37 - deps/golang.org/x/net/ipv4/defs_solaris.go | 84 - deps/golang.org/x/net/ipv4/dgramopt.go | 265 - deps/golang.org/x/net/ipv4/doc.go | 244 - deps/golang.org/x/net/ipv4/endpoint.go | 187 - deps/golang.org/x/net/ipv4/example_test.go | 224 - deps/golang.org/x/net/ipv4/gen.go | 199 - deps/golang.org/x/net/ipv4/genericopt.go | 57 - deps/golang.org/x/net/ipv4/header.go | 159 - deps/golang.org/x/net/ipv4/header_test.go | 228 - deps/golang.org/x/net/ipv4/helper.go | 63 - deps/golang.org/x/net/ipv4/iana.go | 38 - deps/golang.org/x/net/ipv4/icmp.go | 57 - deps/golang.org/x/net/ipv4/icmp_linux.go | 25 - deps/golang.org/x/net/ipv4/icmp_stub.go | 25 - deps/golang.org/x/net/ipv4/icmp_test.go | 95 - deps/golang.org/x/net/ipv4/multicast_test.go | 334 - .../x/net/ipv4/multicastlistener_test.go | 265 - .../x/net/ipv4/multicastsockopt_test.go | 195 - deps/golang.org/x/net/ipv4/packet.go | 69 - deps/golang.org/x/net/ipv4/packet_go1_8.go | 56 - deps/golang.org/x/net/ipv4/packet_go1_9.go | 67 - deps/golang.org/x/net/ipv4/payload.go | 23 - deps/golang.org/x/net/ipv4/payload_cmsg.go | 36 - .../x/net/ipv4/payload_cmsg_go1_8.go | 59 - .../x/net/ipv4/payload_cmsg_go1_9.go | 67 - deps/golang.org/x/net/ipv4/payload_nocmsg.go | 42 - .../x/net/ipv4/readwrite_go1_8_test.go | 248 - .../x/net/ipv4/readwrite_go1_9_test.go | 388 - deps/golang.org/x/net/ipv4/readwrite_test.go | 140 - deps/golang.org/x/net/ipv4/sockopt.go | 44 - deps/golang.org/x/net/ipv4/sockopt_posix.go | 71 - deps/golang.org/x/net/ipv4/sockopt_stub.go | 42 - deps/golang.org/x/net/ipv4/sys_asmreq.go | 119 - deps/golang.org/x/net/ipv4/sys_asmreq_stub.go | 25 - deps/golang.org/x/net/ipv4/sys_asmreqn.go | 42 - .../golang.org/x/net/ipv4/sys_asmreqn_stub.go | 21 - deps/golang.org/x/net/ipv4/sys_bpf.go | 23 - deps/golang.org/x/net/ipv4/sys_bpf_stub.go | 16 - deps/golang.org/x/net/ipv4/sys_bsd.go | 37 - deps/golang.org/x/net/ipv4/sys_darwin.go | 93 - deps/golang.org/x/net/ipv4/sys_dragonfly.go | 35 - deps/golang.org/x/net/ipv4/sys_freebsd.go | 76 - deps/golang.org/x/net/ipv4/sys_linux.go | 59 - deps/golang.org/x/net/ipv4/sys_solaris.go | 57 - deps/golang.org/x/net/ipv4/sys_ssmreq.go | 54 - deps/golang.org/x/net/ipv4/sys_ssmreq_stub.go | 21 - deps/golang.org/x/net/ipv4/sys_stub.go | 13 - deps/golang.org/x/net/ipv4/sys_windows.go | 67 - deps/golang.org/x/net/ipv4/unicast_test.go | 247 - .../x/net/ipv4/unicastsockopt_test.go | 148 - deps/golang.org/x/net/ipv4/zsys_darwin.go | 99 - deps/golang.org/x/net/ipv4/zsys_dragonfly.go | 31 - .../golang.org/x/net/ipv4/zsys_freebsd_386.go | 93 - .../x/net/ipv4/zsys_freebsd_amd64.go | 95 - .../golang.org/x/net/ipv4/zsys_freebsd_arm.go | 95 - deps/golang.org/x/net/ipv4/zsys_linux_386.go | 148 - .../golang.org/x/net/ipv4/zsys_linux_amd64.go | 150 - deps/golang.org/x/net/ipv4/zsys_linux_arm.go | 148 - .../golang.org/x/net/ipv4/zsys_linux_arm64.go | 150 - deps/golang.org/x/net/ipv4/zsys_linux_mips.go | 148 - .../x/net/ipv4/zsys_linux_mips64.go | 150 - .../x/net/ipv4/zsys_linux_mips64le.go | 150 - .../x/net/ipv4/zsys_linux_mipsle.go | 148 - deps/golang.org/x/net/ipv4/zsys_linux_ppc.go | 148 - .../golang.org/x/net/ipv4/zsys_linux_ppc64.go | 150 - .../x/net/ipv4/zsys_linux_ppc64le.go | 150 - .../golang.org/x/net/ipv4/zsys_linux_s390x.go | 150 - deps/golang.org/x/net/ipv4/zsys_netbsd.go | 30 - deps/golang.org/x/net/ipv4/zsys_openbsd.go | 30 - deps/golang.org/x/net/ipv4/zsys_solaris.go | 100 - deps/golang.org/x/net/ipv6/batch.go | 119 - deps/golang.org/x/net/ipv6/bpf_test.go | 96 - deps/golang.org/x/net/ipv6/control.go | 187 - .../x/net/ipv6/control_rfc2292_unix.go | 48 - .../x/net/ipv6/control_rfc3542_unix.go | 94 - deps/golang.org/x/net/ipv6/control_stub.go | 13 - deps/golang.org/x/net/ipv6/control_test.go | 21 - deps/golang.org/x/net/ipv6/control_unix.go | 55 - deps/golang.org/x/net/ipv6/control_windows.go | 16 - deps/golang.org/x/net/ipv6/defs_darwin.go | 112 - deps/golang.org/x/net/ipv6/defs_dragonfly.go | 84 - deps/golang.org/x/net/ipv6/defs_freebsd.go | 105 - deps/golang.org/x/net/ipv6/defs_linux.go | 147 - deps/golang.org/x/net/ipv6/defs_netbsd.go | 80 - deps/golang.org/x/net/ipv6/defs_openbsd.go | 89 - deps/golang.org/x/net/ipv6/defs_solaris.go | 114 - deps/golang.org/x/net/ipv6/dgramopt.go | 302 - deps/golang.org/x/net/ipv6/doc.go | 243 - deps/golang.org/x/net/ipv6/endpoint.go | 128 - deps/golang.org/x/net/ipv6/example_test.go | 216 - deps/golang.org/x/net/ipv6/gen.go | 199 - deps/golang.org/x/net/ipv6/genericopt.go | 58 - deps/golang.org/x/net/ipv6/header.go | 55 - deps/golang.org/x/net/ipv6/header_test.go | 55 - deps/golang.org/x/net/ipv6/helper.go | 57 - deps/golang.org/x/net/ipv6/iana.go | 86 - deps/golang.org/x/net/ipv6/icmp.go | 60 - deps/golang.org/x/net/ipv6/icmp_bsd.go | 29 - deps/golang.org/x/net/ipv6/icmp_linux.go | 27 - deps/golang.org/x/net/ipv6/icmp_solaris.go | 27 - deps/golang.org/x/net/ipv6/icmp_stub.go | 23 - deps/golang.org/x/net/ipv6/icmp_test.go | 96 - deps/golang.org/x/net/ipv6/icmp_windows.go | 22 - .../x/net/ipv6/mocktransponder_test.go | 32 - deps/golang.org/x/net/ipv6/multicast_test.go | 264 - .../x/net/ipv6/multicastlistener_test.go | 261 - .../x/net/ipv6/multicastsockopt_test.go | 157 - deps/golang.org/x/net/ipv6/payload.go | 23 - deps/golang.org/x/net/ipv6/payload_cmsg.go | 35 - .../x/net/ipv6/payload_cmsg_go1_8.go | 55 - .../x/net/ipv6/payload_cmsg_go1_9.go | 57 - deps/golang.org/x/net/ipv6/payload_nocmsg.go | 41 - .../x/net/ipv6/readwrite_go1_8_test.go | 242 - .../x/net/ipv6/readwrite_go1_9_test.go | 373 - deps/golang.org/x/net/ipv6/readwrite_test.go | 148 - deps/golang.org/x/net/ipv6/sockopt.go | 43 - deps/golang.org/x/net/ipv6/sockopt_posix.go | 87 - deps/golang.org/x/net/ipv6/sockopt_stub.go | 46 - deps/golang.org/x/net/ipv6/sockopt_test.go | 133 - deps/golang.org/x/net/ipv6/sys_asmreq.go | 24 - deps/golang.org/x/net/ipv6/sys_asmreq_stub.go | 17 - deps/golang.org/x/net/ipv6/sys_bpf.go | 23 - deps/golang.org/x/net/ipv6/sys_bpf_stub.go | 16 - deps/golang.org/x/net/ipv6/sys_bsd.go | 57 - deps/golang.org/x/net/ipv6/sys_darwin.go | 106 - deps/golang.org/x/net/ipv6/sys_freebsd.go | 92 - deps/golang.org/x/net/ipv6/sys_linux.go | 74 - deps/golang.org/x/net/ipv6/sys_solaris.go | 74 - deps/golang.org/x/net/ipv6/sys_ssmreq.go | 54 - deps/golang.org/x/net/ipv6/sys_ssmreq_stub.go | 21 - deps/golang.org/x/net/ipv6/sys_stub.go | 13 - deps/golang.org/x/net/ipv6/sys_windows.go | 75 - deps/golang.org/x/net/ipv6/unicast_test.go | 184 - .../x/net/ipv6/unicastsockopt_test.go | 120 - deps/golang.org/x/net/ipv6/zsys_darwin.go | 131 - deps/golang.org/x/net/ipv6/zsys_dragonfly.go | 88 - .../golang.org/x/net/ipv6/zsys_freebsd_386.go | 122 - .../x/net/ipv6/zsys_freebsd_amd64.go | 124 - .../golang.org/x/net/ipv6/zsys_freebsd_arm.go | 124 - deps/golang.org/x/net/ipv6/zsys_linux_386.go | 170 - .../golang.org/x/net/ipv6/zsys_linux_amd64.go | 172 - deps/golang.org/x/net/ipv6/zsys_linux_arm.go | 170 - .../golang.org/x/net/ipv6/zsys_linux_arm64.go | 172 - deps/golang.org/x/net/ipv6/zsys_linux_mips.go | 170 - .../x/net/ipv6/zsys_linux_mips64.go | 172 - .../x/net/ipv6/zsys_linux_mips64le.go | 172 - .../x/net/ipv6/zsys_linux_mipsle.go | 170 - deps/golang.org/x/net/ipv6/zsys_linux_ppc.go | 170 - .../golang.org/x/net/ipv6/zsys_linux_ppc64.go | 172 - .../x/net/ipv6/zsys_linux_ppc64le.go | 172 - .../golang.org/x/net/ipv6/zsys_linux_s390x.go | 172 - deps/golang.org/x/net/ipv6/zsys_netbsd.go | 84 - deps/golang.org/x/net/ipv6/zsys_openbsd.go | 93 - deps/golang.org/x/net/ipv6/zsys_solaris.go | 131 - .../x/net/lex/httplex/httplex_test.go | 119 - deps/golang.org/x/net/lif/address.go | 105 - deps/golang.org/x/net/lif/address_test.go | 123 - deps/golang.org/x/net/lif/binary.go | 115 - deps/golang.org/x/net/lif/defs_solaris.go | 90 - deps/golang.org/x/net/lif/lif.go | 43 - deps/golang.org/x/net/lif/link.go | 126 - deps/golang.org/x/net/lif/link_test.go | 63 - deps/golang.org/x/net/lif/sys.go | 21 - deps/golang.org/x/net/lif/sys_solaris_amd64.s | 8 - deps/golang.org/x/net/lif/syscall.go | 28 - .../x/net/lif/zsys_solaris_amd64.go | 103 - deps/golang.org/x/net/nettest/conntest.go | 456 - .../golang.org/x/net/nettest/conntest_go16.go | 24 - .../golang.org/x/net/nettest/conntest_go17.go | 24 - .../golang.org/x/net/nettest/conntest_test.go | 76 - deps/golang.org/x/net/netutil/listen.go | 74 - deps/golang.org/x/net/netutil/listen_test.go | 147 - deps/golang.org/x/net/proxy/direct.go | 18 - deps/golang.org/x/net/proxy/per_host.go | 140 - deps/golang.org/x/net/proxy/per_host_test.go | 55 - deps/golang.org/x/net/proxy/proxy.go | 134 - deps/golang.org/x/net/proxy/proxy_test.go | 123 - deps/golang.org/x/net/proxy/socks5.go | 36 - deps/golang.org/x/net/publicsuffix/gen.go | 713 - deps/golang.org/x/net/publicsuffix/list.go | 135 - .../x/net/publicsuffix/list_test.go | 416 - deps/golang.org/x/net/publicsuffix/table.go | 9745 ---- .../x/net/publicsuffix/table_test.go | 17308 ------ deps/golang.org/x/net/route/address.go | 425 - .../x/net/route/address_darwin_test.go | 63 - deps/golang.org/x/net/route/address_test.go | 103 - deps/golang.org/x/net/route/binary.go | 90 - deps/golang.org/x/net/route/defs_darwin.go | 114 - deps/golang.org/x/net/route/defs_dragonfly.go | 113 - deps/golang.org/x/net/route/defs_freebsd.go | 337 - deps/golang.org/x/net/route/defs_netbsd.go | 112 - deps/golang.org/x/net/route/defs_openbsd.go | 116 - deps/golang.org/x/net/route/interface.go | 64 - .../x/net/route/interface_announce.go | 32 - .../x/net/route/interface_classic.go | 66 - .../x/net/route/interface_freebsd.go | 78 - .../x/net/route/interface_multicast.go | 30 - .../x/net/route/interface_openbsd.go | 90 - deps/golang.org/x/net/route/message.go | 72 - .../x/net/route/message_darwin_test.go | 34 - .../x/net/route/message_freebsd_test.go | 92 - deps/golang.org/x/net/route/message_test.go | 239 - deps/golang.org/x/net/route/route.go | 123 - deps/golang.org/x/net/route/route_classic.go | 75 - deps/golang.org/x/net/route/route_openbsd.go | 65 - deps/golang.org/x/net/route/route_test.go | 390 - deps/golang.org/x/net/route/sys.go | 39 - deps/golang.org/x/net/route/sys_darwin.go | 87 - deps/golang.org/x/net/route/sys_dragonfly.go | 76 - deps/golang.org/x/net/route/sys_freebsd.go | 155 - deps/golang.org/x/net/route/sys_netbsd.go | 71 - deps/golang.org/x/net/route/sys_openbsd.go | 80 - deps/golang.org/x/net/route/syscall.go | 28 - deps/golang.org/x/net/route/zsys_darwin.go | 99 - deps/golang.org/x/net/route/zsys_dragonfly.go | 98 - .../x/net/route/zsys_freebsd_386.go | 126 - .../x/net/route/zsys_freebsd_amd64.go | 123 - .../x/net/route/zsys_freebsd_arm.go | 123 - deps/golang.org/x/net/route/zsys_netbsd.go | 97 - deps/golang.org/x/net/route/zsys_openbsd.go | 101 - deps/golang.org/x/net/trace/histogram_test.go | 325 - deps/golang.org/x/net/trace/trace.go | 61 +- deps/golang.org/x/net/trace/trace_test.go | 178 - deps/golang.org/x/net/webdav/file.go | 796 - deps/golang.org/x/net/webdav/file_go1.6.go | 17 - deps/golang.org/x/net/webdav/file_go1.7.go | 16 - deps/golang.org/x/net/webdav/file_test.go | 1184 - deps/golang.org/x/net/webdav/if.go | 173 - deps/golang.org/x/net/webdav/if_test.go | 322 - .../x/net/webdav/internal/xml/README | 11 - .../x/net/webdav/internal/xml/atom_test.go | 56 - .../x/net/webdav/internal/xml/example_test.go | 151 - .../x/net/webdav/internal/xml/marshal.go | 1223 - .../x/net/webdav/internal/xml/marshal_test.go | 1939 - .../x/net/webdav/internal/xml/read.go | 692 - .../x/net/webdav/internal/xml/read_test.go | 744 - .../x/net/webdav/internal/xml/typeinfo.go | 371 - .../x/net/webdav/internal/xml/xml.go | 1998 - .../x/net/webdav/internal/xml/xml_test.go | 752 - .../x/net/webdav/litmus_test_server.go | 94 - deps/golang.org/x/net/webdav/lock.go | 445 - deps/golang.org/x/net/webdav/lock_test.go | 731 - deps/golang.org/x/net/webdav/prop.go | 470 - deps/golang.org/x/net/webdav/prop_test.go | 717 - deps/golang.org/x/net/webdav/webdav.go | 702 - deps/golang.org/x/net/webdav/webdav_test.go | 344 - deps/golang.org/x/net/webdav/xml.go | 519 - deps/golang.org/x/net/webdav/xml_test.go | 906 - deps/golang.org/x/net/websocket/dial_test.go | 43 - .../x/net/websocket/exampledial_test.go | 31 - .../x/net/websocket/examplehandler_test.go | 26 - deps/golang.org/x/net/websocket/hybi_test.go | 608 - deps/golang.org/x/net/websocket/websocket.go | 5 +- .../x/net/websocket/websocket_test.go | 665 - deps/golang.org/x/net/xsrftoken/xsrf.go | 94 - deps/golang.org/x/net/xsrftoken/xsrf_test.go | 83 - deps/golang.org/x/tools/CONTRIBUTING.md | 15 +- deps/golang.org/x/tools/blog/blog.go | 29 +- deps/golang.org/x/tools/blog/blog_test.go | 44 + deps/golang.org/x/tools/cmd/callgraph/main.go | 53 +- .../x/tools/cmd/callgraph/main_test.go | 70 +- .../callgraph/testdata/src/pkg/pkg_test.go | 5 +- .../x/tools/cmd/compilebench/main.go | 24 +- .../golang.org/x/tools/cmd/digraph/digraph.go | 5 +- deps/golang.org/x/tools/cmd/godex/print.go | 36 +- deps/golang.org/x/tools/cmd/godoc/autocert.go | 21 +- deps/golang.org/x/tools/cmd/godoc/blog.go | 26 +- .../x/tools/cmd/godoc/godoc_test.go | 136 +- deps/golang.org/x/tools/cmd/godoc/goroot.go | 74 + deps/golang.org/x/tools/cmd/godoc/handlers.go | 3 +- deps/golang.org/x/tools/cmd/godoc/main.go | 33 +- .../x/tools/cmd/godoc/setup-godoc-app.bash | 2 +- deps/golang.org/x/tools/cmd/godoc/x.go | 14 +- .../x/tools/cmd/goimports/goimports.go | 2 +- deps/golang.org/x/tools/cmd/gomvpkg/main.go | 2 +- deps/golang.org/x/tools/cmd/goyacc/yacc.go | 5 +- deps/golang.org/x/tools/cmd/guru/describe.go | 10 +- deps/golang.org/x/tools/cmd/guru/guru.go | 2 +- deps/golang.org/x/tools/cmd/guru/guru_test.go | 109 +- deps/golang.org/x/tools/cmd/guru/main.go | 10 + deps/golang.org/x/tools/cmd/guru/referrers.go | 350 +- .../guru/testdata/src/referrers/int_test.go | 2 + .../cmd/guru/testdata/src/referrers/main.go | 2 + .../guru/testdata/src/referrers/main.golden | 6 +- .../x/tools/cmd/present/static/styles.css | 8 + .../x/tools/cmd/present/templates/slides.tmpl | 3 +- deps/golang.org/x/tools/cmd/ssadump/main.go | 129 +- .../x/tools/cmd/stringer/endtoend_test.go | 76 +- .../x/tools/cmd/stringer/stringer.go | 43 +- .../x/tools/cmd/stringer/testdata/tag_main.go | 11 + .../x/tools/cmd/stringer/testdata/tag_tag.go | 7 + deps/golang.org/x/tools/cmd/tip/talks.go | 2 +- deps/golang.org/x/tools/cmd/tip/tip.go | 2 +- .../x/tools/go/ast/astutil/imports.go | 7 +- .../x/tools/go/ast/astutil/imports_test.go | 2 + .../x/tools/go/buildutil/allpackages_test.go | 5 + .../x/tools/go/buildutil/fakecontext.go | 1 + .../x/tools/go/buildutil/util_test.go | 17 +- .../x/tools/go/callgraph/cha/cha.go | 30 +- .../x/tools/go/callgraph/cha/cha_test.go | 1 + .../go/callgraph/cha/testdata/issue23925.go | 38 + .../x/tools/go/gcexportdata/example_test.go | 1 + .../x/tools/go/gcexportdata/gcexportdata.go | 19 +- .../x/tools/go/gcexportdata/main.go | 24 +- .../go/gcimporter15/testdata/versions/test.go | 25 - .../tools/go/{loader => internal/cgo}/cgo.go | 29 +- .../{loader => internal/cgo}/cgo_pkgconfig.go | 2 +- .../gccgoimporter/gccgoinstallation_test.go | 8 +- .../internal/gccgoimporter/importer_test.go | 11 + .../internal/gccgoimporter/newInterface10.go | 21 + .../internal/gccgoimporter/newInterface11.go | 13 + .../tools/go/internal/gccgoimporter/parser.go | 6 +- .../gcimporter}/bexport.go | 54 +- .../gcimporter}/bexport19_test.go | 7 +- .../gcimporter}/bexport_test.go | 15 +- .../gcimporter}/bimport.go | 147 +- .../gcimporter}/exportdata.go | 0 .../gcimporter}/gcimporter.go | 56 +- .../internal/gcimporter/gcimporter11_test.go | 134 + .../gcimporter}/gcimporter_test.go | 61 +- .../x/tools/go/internal/gcimporter/iimport.go | 598 + .../gcimporter}/isAlias18.go | 0 .../gcimporter}/isAlias19.go | 0 .../go/internal/gcimporter/newInterface10.go | 21 + .../go/internal/gcimporter/newInterface11.go | 13 + .../gcimporter}/testdata/a.go | 0 .../gcimporter}/testdata/b.go | 0 .../gcimporter}/testdata/exports.go | 0 .../gcimporter}/testdata/issue15920.go | 0 .../gcimporter}/testdata/issue20046.go | 0 .../gcimporter/testdata/issue25301.go | 17 + .../gcimporter}/testdata/p.go | 0 .../gcimporter/testdata/versions/test.go | 30 + .../testdata/versions/test_go1.11_0i.a | Bin 0 -> 2420 bytes .../testdata/versions/test_go1.11_6b.a | Bin 0 -> 2426 bytes .../testdata/versions/test_go1.11_999b.a | Bin 0 -> 2600 bytes .../testdata/versions/test_go1.11_999i.a | Bin 0 -> 2420 bytes .../testdata/versions/test_go1.7_0.a | Bin .../testdata/versions/test_go1.7_1.a | Bin .../testdata/versions/test_go1.8_4.a | Bin 0 -> 1658 bytes .../testdata/versions/test_go1.8_5.a | Bin 0 -> 1658 bytes deps/golang.org/x/tools/go/loader/loader.go | 3 +- .../x/tools/go/loader/loader_test.go | 9 + deps/golang.org/x/tools/go/packages/doc.go | 243 + .../x/tools/go/packages/external.go | 68 + deps/golang.org/x/tools/go/packages/golist.go | 337 + .../x/tools/go/packages/golist_fallback.go | 282 + .../x/tools/go/packages/gopackages/main.go | 273 + .../x/tools/go/packages/packages.go | 854 + .../x/tools/go/packages/packages110_test.go | 11 + .../x/tools/go/packages/packages_test.go | 1536 + .../x/tools/go/packages/stdlib_test.go | 135 + deps/golang.org/x/tools/go/pointer/api.go | 2 +- deps/golang.org/x/tools/go/pointer/query.go | 4 +- .../x/tools/go/pointer/query_test.go | 26 +- deps/golang.org/x/tools/go/pointer/reflect.go | 10 +- deps/golang.org/x/tools/go/ssa/builder.go | 18 +- deps/golang.org/x/tools/go/ssa/const.go | 44 +- deps/golang.org/x/tools/go/ssa/create.go | 17 +- deps/golang.org/x/tools/go/ssa/doc.go | 12 +- .../golang.org/x/tools/go/ssa/example_test.go | 55 +- .../x/tools/go/ssa/interp/external.go | 229 +- .../x/tools/go/ssa/interp/interp_test.go | 8 +- deps/golang.org/x/tools/go/ssa/interp/ops.go | 8 +- .../x/tools/go/ssa/interp/testdata/complit.go | 4 +- deps/golang.org/x/tools/go/ssa/source_test.go | 4 +- deps/golang.org/x/tools/go/ssa/ssa.go | 17 +- .../golang.org/x/tools/go/ssa/ssautil/load.go | 53 +- .../x/tools/go/ssa/ssautil/load_test.go | 39 + deps/golang.org/x/tools/go/ssa/testmain.go | 8 +- deps/golang.org/x/tools/go/vcs/vcs.go | 33 +- deps/golang.org/x/tools/go/vcs/vcs_test.go | 138 + deps/golang.org/x/tools/godoc/analysis/README | 2 +- deps/golang.org/x/tools/godoc/cmdline.go | 20 +- deps/golang.org/x/tools/godoc/cmdline_test.go | 24 +- deps/golang.org/x/tools/godoc/corpus.go | 4 + deps/golang.org/x/tools/godoc/dirtrees.go | 71 +- .../golang.org/x/tools/godoc/dirtrees_test.go | 64 + deps/golang.org/x/tools/godoc/dl/dl.go | 100 +- deps/golang.org/x/tools/godoc/dl/tmpl.go | 2 +- deps/golang.org/x/tools/godoc/godoc.go | 112 +- deps/golang.org/x/tools/godoc/godoc_test.go | 47 + deps/golang.org/x/tools/godoc/index.go | 3 +- deps/golang.org/x/tools/godoc/pres.go | 3 + .../x/tools/godoc/redirect/redirect.go | 6 +- .../x/tools/godoc/redirect/redirect_test.go | 6 +- deps/golang.org/x/tools/godoc/server.go | 25 +- deps/golang.org/x/tools/godoc/server_test.go | 48 + deps/golang.org/x/tools/godoc/snippet.go | 2 +- deps/golang.org/x/tools/godoc/spec.go | 2 +- deps/golang.org/x/tools/godoc/spec_test.go | 22 + deps/golang.org/x/tools/godoc/static/gen.go | 104 + .../x/tools/godoc/static/gen_test.go | 49 + .../x/tools/godoc/static/godoc.html | 23 +- .../golang.org/x/tools/godoc/static/godocs.js | 26 +- .../x/tools/godoc/static/makestatic.go | 107 +- .../x/tools/godoc/static/package.html | 89 +- .../x/tools/godoc/static/packageroot.html | 150 + .../x/tools/godoc/static/playground.js | 57 +- .../golang.org/x/tools/godoc/static/static.go | 3708 +- .../golang.org/x/tools/godoc/static/style.css | 373 +- deps/golang.org/x/tools/godoc/template.go | 2 +- deps/golang.org/x/tools/godoc/versions.go | 224 + .../golang.org/x/tools/godoc/versions_test.go | 132 + deps/golang.org/x/tools/godoc/vfs/emptyvfs.go | 4 + .../x/tools/godoc/vfs/gatefs/gatefs.go | 4 + .../x/tools/godoc/vfs/gatefs/gatefs_test.go | 39 + .../x/tools/godoc/vfs/mapfs/mapfs.go | 4 + .../golang.org/x/tools/godoc/vfs/namespace.go | 14 + deps/golang.org/x/tools/godoc/vfs/os.go | 48 +- deps/golang.org/x/tools/godoc/vfs/os_test.go | 38 + deps/golang.org/x/tools/godoc/vfs/vfs.go | 13 + .../x/tools/godoc/vfs/zipfs/zipfs.go | 22 + .../x/tools/imports/fastwalk_test.go | 171 - deps/golang.org/x/tools/imports/fix.go | 309 +- deps/golang.org/x/tools/imports/fix_test.go | 397 +- deps/golang.org/x/tools/imports/imports.go | 8 + .../golang.org/x/tools/imports/sortimports.go | 18 + .../fastwalk}/fastwalk.go | 38 +- .../fastwalk}/fastwalk_dirent_fileno.go | 2 +- .../fastwalk}/fastwalk_dirent_ino.go | 2 +- .../fastwalk}/fastwalk_portable.go | 2 +- .../tools/internal/fastwalk/fastwalk_test.go | 190 + .../fastwalk}/fastwalk_unix.go | 4 +- .../x/tools/playground/appengine.go | 18 +- .../x/tools/playground/appenginevm.go | 11 - deps/golang.org/x/tools/playground/common.go | 10 +- deps/golang.org/x/tools/playground/local.go | 15 +- deps/golang.org/x/tools/present/doc.go | 2 +- deps/golang.org/x/tools/present/parse.go | 9 + deps/golang.org/x/tools/refactor/eg/eg.go | 32 +- .../golang.org/x/tools/refactor/eg/eg_test.go | 10 +- deps/golang.org/x/tools/refactor/eg/match.go | 8 +- .../golang.org/x/tools/refactor/eg/rewrite.go | 152 +- .../x/tools/refactor/eg/testdata/I.template | 14 + .../x/tools/refactor/eg/testdata/I1.go | 9 + .../x/tools/refactor/eg/testdata/I1.golden | 14 + .../x/tools/refactor/eg/testdata/J.template | 11 + .../x/tools/refactor/eg/testdata/J1.go | 10 + .../x/tools/refactor/eg/testdata/J1.golden | 11 + .../eg/testdata/no_after_return.template | 2 - .../x/tools/refactor/rename/rename.go | 2 +- deps/k8s.io/api/Godeps/Godeps.json | 154 +- deps/k8s.io/api/Godeps/OWNERS | 2 + deps/k8s.io/api/OWNERS | 2 + deps/k8s.io/api/SECURITY_CONTACTS | 17 + deps/k8s.io/api/admission/v1beta1/BUILD | 43 - .../api/admission/v1beta1/generated.pb.go | 297 +- .../api/admission/v1beta1/generated.proto | 15 +- deps/k8s.io/api/admission/v1beta1/types.go | 11 + .../v1beta1/types_swagger_doc_generated.go | 18 +- .../v1beta1/zz_generated.deepcopy.go | 49 +- .../api/admissionregistration/v1alpha1/BUILD | 44 - .../v1alpha1/generated.pb.go | 73 +- .../v1alpha1/generated.proto | 3 +- .../v1alpha1/types_swagger_doc_generated.go | 4 +- .../v1alpha1/zz_generated.deepcopy.go | 10 +- .../api/admissionregistration/v1beta1/BUILD | 44 - .../v1beta1/generated.pb.go | 160 +- .../v1beta1/generated.proto | 22 +- .../admissionregistration/v1beta1/types.go | 33 +- .../v1beta1/types_swagger_doc_generated.go | 9 +- .../v1beta1/zz_generated.deepcopy.go | 61 +- deps/k8s.io/api/apps/v1/BUILD | 43 - deps/k8s.io/api/apps/v1/generated.pb.go | 258 +- deps/k8s.io/api/apps/v1/generated.proto | 13 +- deps/k8s.io/api/apps/v1/types.go | 16 +- .../apps/v1/types_swagger_doc_generated.go | 8 +- .../api/apps/v1/zz_generated.deepcopy.go | 208 +- deps/k8s.io/api/apps/v1beta1/BUILD | 47 - deps/k8s.io/api/apps/v1beta1/generated.pb.go | 239 +- deps/k8s.io/api/apps/v1beta1/generated.proto | 13 +- deps/k8s.io/api/apps/v1beta1/types.go | 16 +- .../v1beta1/types_swagger_doc_generated.go | 8 +- .../api/apps/v1beta1/zz_generated.deepcopy.go | 160 +- deps/k8s.io/api/apps/v1beta2/BUILD | 47 - deps/k8s.io/api/apps/v1beta2/generated.pb.go | 268 +- deps/k8s.io/api/apps/v1beta2/generated.proto | 13 +- deps/k8s.io/api/apps/v1beta2/types.go | 16 +- .../v1beta2/types_swagger_doc_generated.go | 8 +- .../api/apps/v1beta2/zz_generated.deepcopy.go | 209 +- deps/k8s.io/api/authentication/v1/BUILD | 46 - .../api/authentication/v1/generated.pb.go | 117 +- .../api/authentication/v1/generated.proto | 3 +- .../v1/types_swagger_doc_generated.go | 4 +- .../v1/zz_generated.deepcopy.go | 57 +- deps/k8s.io/api/authentication/v1beta1/BUILD | 45 - .../authentication/v1beta1/generated.pb.go | 85 +- .../authentication/v1beta1/generated.proto | 3 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../v1beta1/zz_generated.deepcopy.go | 38 +- deps/k8s.io/api/authorization/v1/BUILD | 45 - .../api/authorization/v1/generated.pb.go | 148 +- .../api/authorization/v1/generated.proto | 3 +- .../v1/types_swagger_doc_generated.go | 4 +- .../authorization/v1/zz_generated.deepcopy.go | 79 +- deps/k8s.io/api/authorization/v1beta1/BUILD | 45 - .../api/authorization/v1beta1/generated.pb.go | 149 +- .../api/authorization/v1beta1/generated.proto | 3 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../v1beta1/zz_generated.deepcopy.go | 79 +- deps/k8s.io/api/autoscaling/v1/BUILD | 46 - .../k8s.io/api/autoscaling/v1/generated.pb.go | 1007 +- .../k8s.io/api/autoscaling/v1/generated.proto | 62 +- deps/k8s.io/api/autoscaling/v1/types.go | 57 + .../v1/types_swagger_doc_generated.go | 30 +- .../autoscaling/v1/zz_generated.deepcopy.go | 195 +- deps/k8s.io/api/autoscaling/v2beta1/BUILD | 46 - .../api/autoscaling/v2beta1/generated.pb.go | 996 +- .../api/autoscaling/v2beta1/generated.proto | 63 +- deps/k8s.io/api/autoscaling/v2beta1/types.go | 58 + .../v2beta1/types_swagger_doc_generated.go | 30 +- .../v2beta1/zz_generated.deepcopy.go | 174 +- deps/k8s.io/api/batch/v1/BUILD | 45 - deps/k8s.io/api/batch/v1/generated.pb.go | 115 +- deps/k8s.io/api/batch/v1/generated.proto | 3 +- .../batch/v1/types_swagger_doc_generated.go | 4 +- .../api/batch/v1/zz_generated.deepcopy.go | 74 +- deps/k8s.io/api/batch/v1beta1/BUILD | 46 - deps/k8s.io/api/batch/v1beta1/generated.pb.go | 98 +- deps/k8s.io/api/batch/v1beta1/generated.proto | 3 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../batch/v1beta1/zz_generated.deepcopy.go | 53 +- deps/k8s.io/api/batch/v2alpha1/BUILD | 46 - .../k8s.io/api/batch/v2alpha1/generated.pb.go | 103 +- .../k8s.io/api/batch/v2alpha1/generated.proto | 3 +- .../v2alpha1/types_swagger_doc_generated.go | 4 +- .../batch/v2alpha1/zz_generated.deepcopy.go | 53 +- deps/k8s.io/api/certificates/v1beta1/BUILD | 45 - .../api/certificates/v1beta1/generated.pb.go | 106 +- .../api/certificates/v1beta1/generated.proto | 3 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../v1beta1/zz_generated.deepcopy.go | 41 +- deps/k8s.io/api/coordination/v1beta1/doc.go | 21 + .../api/coordination/v1beta1/generated.pb.go | 883 + .../api/coordination/v1beta1/generated.proto | 80 + .../api/coordination/v1beta1/register.go | 53 + deps/k8s.io/api/coordination/v1beta1/types.go | 74 + .../v1beta1/types_swagger_doc_generated.go | 63 + .../v1beta1/zz_generated.deepcopy.go | 124 + deps/k8s.io/api/core/v1/BUILD | 65 - .../api/core/v1/annotation_key_constants.go | 21 +- deps/k8s.io/api/core/v1/generated.pb.go | 8818 +-- deps/k8s.io/api/core/v1/generated.proto | 628 +- deps/k8s.io/api/core/v1/meta.go | 108 - deps/k8s.io/api/core/v1/register.go | 1 - deps/k8s.io/api/core/v1/resource.go | 7 - deps/k8s.io/api/core/v1/types.go | 723 +- .../core/v1/types_swagger_doc_generated.go | 256 +- .../api/core/v1/zz_generated.deepcopy.go | 1920 +- deps/k8s.io/api/events/v1beta1/BUILD | 42 - .../k8s.io/api/events/v1beta1/generated.pb.go | 104 +- .../k8s.io/api/events/v1beta1/generated.proto | 3 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../events/v1beta1/zz_generated.deepcopy.go | 26 +- deps/k8s.io/api/extensions/v1beta1/BUILD | 49 - .../api/extensions/v1beta1/generated.pb.go | 591 +- .../api/extensions/v1beta1/generated.proto | 143 +- deps/k8s.io/api/extensions/v1beta1/types.go | 174 +- .../v1beta1/types_swagger_doc_generated.go | 83 +- .../v1beta1/zz_generated.deepcopy.go | 275 +- deps/k8s.io/api/imagepolicy/v1alpha1/BUILD | 45 - .../api/imagepolicy/v1alpha1/generated.pb.go | 76 +- .../api/imagepolicy/v1alpha1/generated.proto | 3 +- .../v1alpha1/types_swagger_doc_generated.go | 4 +- .../v1alpha1/zz_generated.deepcopy.go | 7 +- deps/k8s.io/api/networking/v1/BUILD | 46 - deps/k8s.io/api/networking/v1/generated.pb.go | 107 +- deps/k8s.io/api/networking/v1/generated.proto | 29 +- deps/k8s.io/api/networking/v1/types.go | 25 +- .../v1/types_swagger_doc_generated.go | 12 +- .../networking/v1/zz_generated.deepcopy.go | 54 +- deps/k8s.io/api/policy/OWNERS | 4 + deps/k8s.io/api/policy/v1beta1/BUILD | 46 - .../k8s.io/api/policy/v1beta1/generated.pb.go | 3666 +- .../k8s.io/api/policy/v1beta1/generated.proto | 223 +- deps/k8s.io/api/policy/v1beta1/register.go | 2 + deps/k8s.io/api/policy/v1beta1/types.go | 281 +- .../v1beta1/types_swagger_doc_generated.go | 131 +- .../policy/v1beta1/zz_generated.deepcopy.go | 327 +- deps/k8s.io/api/rbac/v1/BUILD | 44 - deps/k8s.io/api/rbac/v1/generated.pb.go | 107 +- deps/k8s.io/api/rbac/v1/generated.proto | 6 +- deps/k8s.io/api/rbac/v1/types.go | 6 +- .../rbac/v1/types_swagger_doc_generated.go | 4 +- .../api/rbac/v1/zz_generated.deepcopy.go | 40 +- deps/k8s.io/api/rbac/v1alpha1/BUILD | 44 - deps/k8s.io/api/rbac/v1alpha1/generated.pb.go | 107 +- deps/k8s.io/api/rbac/v1alpha1/generated.proto | 5 +- deps/k8s.io/api/rbac/v1alpha1/types.go | 6 +- .../v1alpha1/types_swagger_doc_generated.go | 4 +- .../rbac/v1alpha1/zz_generated.deepcopy.go | 36 +- deps/k8s.io/api/rbac/v1beta1/BUILD | 44 - deps/k8s.io/api/rbac/v1beta1/generated.pb.go | 108 +- deps/k8s.io/api/rbac/v1beta1/generated.proto | 6 +- deps/k8s.io/api/rbac/v1beta1/types.go | 6 +- .../v1beta1/types_swagger_doc_generated.go | 4 +- .../api/rbac/v1beta1/zz_generated.deepcopy.go | 36 +- deps/k8s.io/api/roundtrip_test.go | 151 + deps/k8s.io/api/scheduling/v1alpha1/BUILD | 44 - .../api/scheduling/v1alpha1/generated.pb.go | 57 +- .../api/scheduling/v1alpha1/generated.proto | 6 +- deps/k8s.io/api/scheduling/v1alpha1/types.go | 3 + .../v1alpha1/types_swagger_doc_generated.go | 6 +- .../v1alpha1/zz_generated.deepcopy.go | 10 +- deps/k8s.io/api/scheduling/v1beta1/doc.go | 21 + .../api/scheduling/v1beta1/generated.pb.go | 640 + .../api/scheduling/v1beta1/generated.proto | 67 + .../k8s.io/api/scheduling/v1beta1/register.go | 52 + deps/k8s.io/api/scheduling/v1beta1/types.go | 66 + .../v1beta1/types_swagger_doc_generated.go | 52 + .../v1beta1/zz_generated.deepcopy.go | 84 + deps/k8s.io/api/settings/v1alpha1/BUILD | 45 - .../api/settings/v1alpha1/generated.pb.go | 73 +- .../api/settings/v1alpha1/generated.proto | 3 +- .../v1alpha1/types_swagger_doc_generated.go | 4 +- .../v1alpha1/zz_generated.deepcopy.go | 10 +- deps/k8s.io/api/storage/v1/BUILD | 43 - deps/k8s.io/api/storage/v1/generated.pb.go | 134 +- deps/k8s.io/api/storage/v1/generated.proto | 13 +- deps/k8s.io/api/storage/v1/types.go | 8 + .../storage/v1/types_swagger_doc_generated.go | 5 +- .../api/storage/v1/zz_generated.deepcopy.go | 41 +- deps/k8s.io/api/storage/v1alpha1/BUILD | 42 - .../api/storage/v1alpha1/generated.pb.go | 95 +- .../api/storage/v1alpha1/generated.proto | 4 +- .../v1alpha1/types_swagger_doc_generated.go | 4 +- .../storage/v1alpha1/zz_generated.deepcopy.go | 34 +- deps/k8s.io/api/storage/v1beta1/BUILD | 43 - .../api/storage/v1beta1/generated.pb.go | 178 +- .../api/storage/v1beta1/generated.proto | 12 +- deps/k8s.io/api/storage/v1beta1/types.go | 8 + .../v1beta1/types_swagger_doc_generated.go | 5 +- .../storage/v1beta1/zz_generated.deepcopy.go | 69 +- deps/k8s.io/apiextensions-apiserver/BUILD | 56 - .../Godeps/Godeps.json | 1186 +- .../apiextensions-apiserver/Godeps/OWNERS | 2 + deps/k8s.io/apiextensions-apiserver/OWNERS | 3 + .../apiextensions-apiserver/SECURITY_CONTACTS | 17 + .../artifacts/example/rc.yaml | 2 +- .../examples/client-go/BUILD | 19 - .../examples/client-go/hack/update-codegen.sh | 2 +- .../examples/client-go/hack/verify-codegen.sh | 2 +- .../examples/client-go/pkg/apis/cr/BUILD | 25 - .../examples/client-go/pkg/apis/cr/v1/BUILD | 36 - .../client-go/pkg/apis/cr/v1/register.go | 2 + .../pkg/apis/cr/v1/zz_generated.deepcopy.go | 10 +- .../pkg/client/clientset/versioned/BUILD | 37 - .../client/clientset/versioned/clientset.go | 6 +- .../pkg/client/clientset/versioned/doc.go | 4 +- .../pkg/client/clientset/versioned/fake/BUILD | 40 - .../versioned/fake/clientset_generated.go | 21 +- .../client/clientset/versioned/fake/doc.go | 4 +- .../clientset/versioned/fake/register.go | 19 +- .../client/clientset/versioned/scheme/BUILD | 32 - .../client/clientset/versioned/scheme/doc.go | 4 +- .../clientset/versioned/scheme/register.go | 19 +- .../clientset/versioned/typed/cr/v1/BUILD | 39 - .../versioned/typed/cr/v1/cr_client.go | 6 +- .../clientset/versioned/typed/cr/v1/doc.go | 4 +- .../versioned/typed/cr/v1/example.go | 26 +- .../versioned/typed/cr/v1/fake/BUILD | 37 - .../versioned/typed/cr/v1/fake/doc.go | 4 +- .../typed/cr/v1/fake/fake_cr_client.go | 4 +- .../typed/cr/v1/fake/fake_example.go | 46 +- .../typed/cr/v1/generated_expansion.go | 4 +- .../client/informers/externalversions/BUILD | 38 - .../informers/externalversions/cr/BUILD | 29 - .../externalversions/cr/interface.go | 14 +- .../informers/externalversions/cr/v1/BUILD | 35 - .../externalversions/cr/v1/example.go | 40 +- .../externalversions/cr/v1/interface.go | 14 +- .../informers/externalversions/factory.go | 86 +- .../informers/externalversions/generic.go | 7 +- .../externalversions/internalinterfaces/BUILD | 27 - .../internalinterfaces/factory_interfaces.go | 10 +- .../client-go/pkg/client/listers/cr/v1/BUILD | 31 - .../pkg/client/listers/cr/v1/example.go | 4 +- .../listers/cr/v1/expansion_generated.go | 4 +- .../hack/boilerplate.go.txt | 16 + .../hack/build-image.sh | 2 +- .../hack/update-codegen.sh | 75 +- .../hack/verify-codegen.sh | 2 +- deps/k8s.io/apiextensions-apiserver/main.go | 7 +- .../pkg/apis/apiextensions/BUILD | 53 - .../pkg/apis/apiextensions/deepcopy.go | 27 +- .../pkg/apis/apiextensions/fuzzer/BUILD | 30 - .../pkg/apis/apiextensions/fuzzer/fuzzer.go | 31 + .../pkg/apis/apiextensions/helpers.go | 31 + .../pkg/apis/apiextensions/helpers_test.go | 331 + .../pkg/apis/apiextensions/install/BUILD | 45 - .../pkg/apis/apiextensions/install/install.go | 22 +- .../apiextensions/install/roundtrip_test.go | 2 +- .../pkg/apis/apiextensions/types.go | 104 +- .../pkg/apis/apiextensions/v1beta1/BUILD | 69 - .../apis/apiextensions/v1beta1/deepcopy.go | 19 - .../apis/apiextensions/v1beta1/defaults.go | 28 + .../apiextensions/v1beta1/generated.pb.go | 2114 +- .../apiextensions/v1beta1/generated.proto | 131 +- .../pkg/apis/apiextensions/v1beta1/marshal.go | 1 + .../apiextensions/v1beta1/marshal_test.go | 8 +- .../pkg/apis/apiextensions/v1beta1/types.go | 122 +- .../apiextensions/v1beta1/types_jsonschema.go | 52 + .../v1beta1/zz_generated.conversion.go | 358 +- .../v1beta1/zz_generated.deepcopy.go | 210 +- .../v1beta1/zz_generated.defaults.go | 4 +- .../pkg/apis/apiextensions/validation/BUILD | 47 - .../apiextensions/validation/validation.go | 292 +- .../validation/validation_test.go | 494 +- .../apiextensions/zz_generated.deepcopy.go | 210 +- .../pkg/apiserver/BUILD | 91 - .../pkg/apiserver/apiserver.go | 45 +- .../pkg/apiserver/conversion/converter.go | 117 + .../pkg/apiserver/conversion/nop_converter.go | 79 + .../customresource_discovery_controller.go | 89 +- .../pkg/apiserver/customresource_handler.go | 657 +- .../apiserver/customresource_handler_test.go | 226 +- .../pkg/apiserver/jsonpath_test.go | 235 + .../pkg/apiserver/validation/BUILD | 50 - .../pkg/apiserver/validation/validation.go | 29 +- .../apiserver/validation/validation_test.go | 4 +- .../pkg/client/clientset/clientset/BUILD | 40 - .../client/clientset/clientset/clientset.go | 6 +- .../pkg/client/clientset/clientset/doc.go | 4 +- .../pkg/client/clientset/clientset/fake/BUILD | 43 - .../clientset/fake/clientset_generated.go | 13 +- .../client/clientset/clientset/fake/doc.go | 4 +- .../clientset/clientset/fake/register.go | 20 +- .../client/clientset/clientset/scheme/BUILD | 35 - .../client/clientset/clientset/scheme/doc.go | 4 +- .../clientset/clientset/scheme/register.go | 20 +- .../typed/apiextensions/v1beta1/BUILD | 42 - .../v1beta1/apiextensions_client.go | 4 +- .../v1beta1/customresourcedefinition.go | 4 +- .../typed/apiextensions/v1beta1/doc.go | 4 +- .../typed/apiextensions/v1beta1/fake/BUILD | 40 - .../typed/apiextensions/v1beta1/fake/doc.go | 4 +- .../v1beta1/fake/fake_apiextensions_client.go | 4 +- .../fake/fake_customresourcedefinition.go | 6 +- .../v1beta1/generated_expansion.go | 4 +- .../client/clientset/internalclientset/BUILD | 40 - .../clientset/internalclientset/clientset.go | 6 +- .../client/clientset/internalclientset/doc.go | 4 +- .../clientset/internalclientset/fake/BUILD | 43 - .../fake/clientset_generated.go | 13 +- .../clientset/internalclientset/fake/doc.go | 4 +- .../internalclientset/fake/register.go | 20 +- .../clientset/internalclientset/scheme/BUILD | 37 - .../clientset/internalclientset/scheme/doc.go | 4 +- .../internalclientset/scheme/register.go | 17 +- .../typed/apiextensions/internalversion/BUILD | 41 - .../internalversion/apiextensions_client.go | 13 +- .../customresourcedefinition.go | 4 +- .../apiextensions/internalversion/doc.go | 4 +- .../apiextensions/internalversion/fake/BUILD | 40 - .../apiextensions/internalversion/fake/doc.go | 4 +- .../fake/fake_apiextensions_client.go | 4 +- .../fake/fake_customresourcedefinition.go | 6 +- .../internalversion/generated_expansion.go | 4 +- .../client/informers/externalversions/BUILD | 42 - .../externalversions/apiextensions/BUILD | 32 - .../apiextensions/interface.go | 4 +- .../apiextensions/v1beta1/BUILD | 38 - .../v1beta1/customresourcedefinition.go | 10 +- .../apiextensions/v1beta1/interface.go | 4 +- .../informers/externalversions/factory.go | 65 +- .../informers/externalversions/generic.go | 4 +- .../externalversions/internalinterfaces/BUILD | 31 - .../internalinterfaces/factory_interfaces.go | 4 +- .../client/informers/internalversion/BUILD | 42 - .../internalversion/apiextensions/BUILD | 32 - .../apiextensions/interface.go | 4 +- .../apiextensions/internalversion/BUILD | 38 - .../customresourcedefinition.go | 4 +- .../internalversion/interface.go | 4 +- .../informers/internalversion/factory.go | 65 +- .../informers/internalversion/generic.go | 4 +- .../internalversion/internalinterfaces/BUILD | 31 - .../internalinterfaces/factory_interfaces.go | 4 +- .../apiextensions/internalversion/BUILD | 34 - .../customresourcedefinition.go | 4 +- .../internalversion/expansion_generated.go | 4 +- .../listers/apiextensions/v1beta1/BUILD | 34 - .../v1beta1/customresourcedefinition.go | 4 +- .../v1beta1/expansion_generated.go | 4 +- .../pkg/cmd/server/BUILD | 35 - .../pkg/cmd/server/options/options.go | 116 + .../pkg/cmd/server/server.go | 64 + .../pkg/cmd/server/start.go | 145 - .../localhost_127.0.0.1_localhost.crt | 37 + .../localhost_127.0.0.1_localhost.key | 27 + .../pkg/cmd/server/testing/testserver.go | 211 + .../establish/establishing_controller.go | 143 + .../pkg/controller/finalizer/BUILD | 43 - .../pkg/controller/status/BUILD | 54 - .../controller/status/naming_controller.go | 20 +- .../status/naming_controller_test.go | 63 +- .../pkg/crdserverscheme/unstructured.go | 67 + .../pkg/features/BUILD | 26 - .../pkg/features/OWNERS | 2 + .../pkg/features/kube_features.go | 10 +- .../pkg/registry/customresource/BUILD | 46 - .../pkg/registry/customresource/etcd.go | 277 +- .../pkg/registry/customresource/etcd_test.go | 575 + .../customresource/status_strategy.go | 59 + .../customresource/status_strategy_test.go | 138 + .../pkg/registry/customresource/strategy.go | 188 +- .../tableconvertor/tableconvertor.go | 172 + .../tableconvertor/tableconvertor_test.go | 68 + .../pkg/registry/customresource/validator.go | 195 + .../registry/customresourcedefinition/BUILD | 48 - .../registry/customresourcedefinition/etcd.go | 19 +- .../customresourcedefinition/strategy.go | 51 +- .../test/integration/BUILD | 52 - .../test/integration/basic_test.go | 577 +- .../test/integration/finalization_test.go | 90 +- .../test/integration/fixtures/resources.go | 403 + .../test/integration/fixtures/server.go | 108 + .../test/integration/helpers.go | 94 + .../test/integration/objectmeta_test.go | 164 + .../test/integration/registration_test.go | 145 +- .../test/integration/subresources_test.go | 770 + .../test/integration/table_test.go | 218 + .../test/integration/testserver/BUILD | 46 - .../test/integration/testserver/resources.go | 295 - .../test/integration/testserver/start.go | 148 - .../test/integration/validation_test.go | 80 +- .../test/integration/versioning_test.go | 138 + .../test/integration/yaml_test.go | 200 +- deps/k8s.io/apimachinery/Godeps/Godeps.json | 34 +- deps/k8s.io/apimachinery/Godeps/OWNERS | 2 + deps/k8s.io/apimachinery/OWNERS | 2 + deps/k8s.io/apimachinery/SECURITY_CONTACTS | 17 + .../apimachinery/pkg/api/apitesting/codec.go | 116 + .../{testing => apitesting}/fuzzer/fuzzer.go | 0 .../fuzzer/valuefuzz.go | 0 .../fuzzer/valuefuzz_test.go | 0 .../roundtrip/roundtrip.go | 34 +- .../apimachinery/pkg/api/equality/BUILD | 32 - deps/k8s.io/apimachinery/pkg/api/errors/BUILD | 48 - deps/k8s.io/apimachinery/pkg/api/meta/BUILD | 70 - .../apimachinery/pkg/api/meta/interfaces.go | 21 +- deps/k8s.io/apimachinery/pkg/api/meta/lazy.go | 25 +- deps/k8s.io/apimachinery/pkg/api/meta/meta.go | 3 - .../apimachinery/pkg/api/meta/priority.go | 30 +- .../pkg/api/meta/priority_test.go | 63 + .../apimachinery/pkg/api/meta/restmapper.go | 38 +- .../pkg/api/meta/restmapper_test.go | 95 +- .../apimachinery/pkg/api/meta/table/table.go | 71 + .../meta/testrestmapper/test_restmapper.go | 171 + .../apimachinery/pkg/api/meta/unstructured.go | 47 - .../apimachinery/pkg/api/resource/BUILD | 71 - .../pkg/api/resource/amount_test.go | 29 + .../pkg/api/resource/generated.pb.go | 45 +- .../pkg/api/resource/generated.proto | 9 +- .../apimachinery/pkg/api/resource/quantity.go | 53 +- .../pkg/api/resource/quantity_test.go | 16 - .../pkg/api/resource/zz_generated.deepcopy.go | 4 +- .../k8s.io/apimachinery/pkg/api/testing/BUILD | 35 - .../apimachinery/pkg/api/testing/codec.go | 86 - .../apimachinery/pkg/api/testing/fuzzer/BUILD | 40 - .../pkg/api/testing/roundtrip/BUILD | 45 - .../apimachinery/pkg/api/validation/BUILD | 54 - .../pkg/api/validation/objectmeta.go | 39 +- .../pkg/api/validation/objectmeta_test.go | 24 +- .../pkg/api/validation/path/BUILD | 33 - .../apimachinery/pkg/apimachinery/BUILD | 46 - .../pkg/apimachinery/announced/BUILD | 46 - .../pkg/apimachinery/announced/announced.go | 99 - .../apimachinery/announced/announced_test.go | 64 - .../apimachinery/announced/group_factory.go | 255 - .../apimachinery/pkg/apimachinery/doc.go | 20 - .../pkg/apimachinery/registered/BUILD | 44 - .../pkg/apimachinery/registered/registered.go | 336 - .../registered/registered_test.go | 71 - .../apimachinery/pkg/apimachinery/types.go | 87 - .../pkg/apimachinery/types_test.go | 43 - .../apimachinery/pkg/apis/config/OWNERS | 7 + .../apimachinery/pkg/apis/config/doc.go | 19 + .../apimachinery/pkg/apis/config/types.go | 33 + .../pkg/apis/config/v1alpha1/conversion.go | 37 + .../pkg/apis/config/v1alpha1/defaults.go | 38 + .../pkg/apis/config/v1alpha1/doc.go | 20 + .../pkg/apis/config/v1alpha1/register.go | 27 + .../pkg/apis/config/v1alpha1/types.go | 33 + .../v1alpha1/zz_generated.conversion.go | 75 + .../config/v1alpha1/zz_generated.deepcopy.go | 37 + .../pkg/apis/config/zz_generated.deepcopy.go | 37 + .../apimachinery/pkg/apis/meta/fuzzer/BUILD | 36 - .../pkg/apis/meta/fuzzer/fuzzer.go | 43 +- .../pkg/apis/meta/internalversion/BUILD | 60 - .../apis/meta/internalversion/conversion.go | 23 - .../pkg/apis/meta/internalversion/register.go | 16 +- .../meta/internalversion/roundtrip_test.go | 2 +- .../zz_generated.conversion.go | 43 +- .../internalversion/zz_generated.deepcopy.go | 30 +- .../apimachinery/pkg/apis/meta/v1/BUILD | 103 - .../pkg/apis/meta/v1/conversion.go | 51 +- .../pkg/apis/meta/v1/conversion_test.go | 43 +- .../apimachinery/pkg/apis/meta/v1/duration.go | 5 +- .../pkg/apis/meta/v1/generated.pb.go | 735 +- .../pkg/apis/meta/v1/generated.proto | 38 +- .../pkg/apis/meta/v1/group_version_test.go | 11 +- .../pkg/apis/meta/v1/helpers_test.go | 11 +- .../apimachinery/pkg/apis/meta/v1/meta.go | 54 +- .../pkg/apis/meta/v1/micro_time.go | 5 +- .../apimachinery/pkg/apis/meta/v1/register.go | 24 +- .../apimachinery/pkg/apis/meta/v1/time.go | 5 +- .../apimachinery/pkg/apis/meta/v1/types.go | 51 +- .../meta/v1/types_swagger_doc_generated.go | 24 +- .../pkg/apis/meta/v1/types_test.go | 21 +- .../pkg/apis/meta/v1/unstructured/BUILD | 54 - .../pkg/apis/meta/v1/unstructured/helpers.go | 66 +- .../apis/meta/v1/unstructured/helpers_test.go | 76 + .../apis/meta/v1/unstructured/unstructured.go | 85 +- .../meta/v1/unstructured/unstructured_list.go | 17 +- .../meta/v1/unstructured/unstructured_test.go | 162 + .../unstructured/unstructuredscheme/scheme.go | 129 + .../v1/unstructured/zz_generated.deepcopy.go | 10 +- .../pkg/apis/meta/v1/validation/BUILD | 39 - .../pkg/apis/meta/v1/validation/validation.go | 26 +- .../meta/v1/validation/validation_test.go | 33 + .../apimachinery/pkg/apis/meta/v1/watch.go | 12 +- .../pkg/apis/meta/v1/zz_generated.deepcopy.go | 227 +- .../pkg/apis/meta/v1/zz_generated.defaults.go | 4 +- .../apimachinery/pkg/apis/meta/v1beta1/BUILD | 45 - .../pkg/apis/meta/v1beta1/deepcopy.go | 23 +- .../pkg/apis/meta/v1beta1/generated.pb.go | 53 +- .../pkg/apis/meta/v1beta1/generated.proto | 3 +- .../pkg/apis/meta/v1beta1/types.go | 4 +- .../v1beta1/types_swagger_doc_generated.go | 6 +- .../meta/v1beta1/zz_generated.deepcopy.go | 25 +- .../meta/v1beta1/zz_generated.defaults.go | 4 +- .../apimachinery/pkg/apis/testapigroup/BUILD | 40 - .../pkg/apis/testapigroup/fuzzer/BUILD | 34 - .../pkg/apis/testapigroup/fuzzer/fuzzer.go | 4 +- .../pkg/apis/testapigroup/install/BUILD | 44 - .../pkg/apis/testapigroup/install/install.go | 20 +- .../testapigroup/install/roundtrip_test.go | 2 +- .../pkg/apis/testapigroup/v1/BUILD | 50 - .../pkg/apis/testapigroup/v1/generated.pb.go | 137 +- .../pkg/apis/testapigroup/v1/generated.proto | 3 +- .../v1/zz_generated.conversion.go | 75 +- .../testapigroup/v1/zz_generated.deepcopy.go | 34 +- .../testapigroup/v1/zz_generated.defaults.go | 4 +- .../testapigroup/zz_generated.deepcopy.go | 34 +- deps/k8s.io/apimachinery/pkg/conversion/BUILD | 50 - .../apimachinery/pkg/conversion/converter.go | 132 +- .../pkg/conversion/converter_test.go | 92 - .../pkg/conversion/queryparams/BUILD | 40 - .../pkg/conversion/queryparams/convert.go | 3 + .../conversion/queryparams/convert_test.go | 6 +- deps/k8s.io/apimachinery/pkg/fields/BUILD | 42 - .../apimachinery/pkg/fields/selector.go | 21 + deps/k8s.io/apimachinery/pkg/labels/BUILD | 51 - .../apimachinery/pkg/labels/selector.go | 16 +- .../apimachinery/pkg/labels/selector_test.go | 44 + .../pkg/labels/zz_generated.deepcopy.go | 4 +- deps/k8s.io/apimachinery/pkg/runtime/BUILD | 100 - deps/k8s.io/apimachinery/pkg/runtime/codec.go | 18 - .../apimachinery/pkg/runtime/conversion.go | 4 +- .../apimachinery/pkg/runtime/converter.go | 26 +- deps/k8s.io/apimachinery/pkg/runtime/doc.go | 22 +- .../apimachinery/pkg/runtime/embedded.go | 28 +- deps/k8s.io/apimachinery/pkg/runtime/error.go | 37 +- .../apimachinery/pkg/runtime/extension.go | 2 +- .../apimachinery/pkg/runtime/generated.pb.go | 53 +- .../apimachinery/pkg/runtime/generated.proto | 4 +- .../k8s.io/apimachinery/pkg/runtime/helper.go | 2 +- .../apimachinery/pkg/runtime/interfaces.go | 25 +- .../pkg/runtime/local_scheme_test.go | 150 + .../apimachinery/pkg/runtime/schema/BUILD | 44 - .../pkg/runtime/schema/generated.pb.go | 37 +- .../pkg/runtime/schema/generated.proto | 4 +- .../pkg/runtime/schema/group_version.go | 29 +- .../pkg/runtime/schema/group_version_test.go | 44 + .../k8s.io/apimachinery/pkg/runtime/scheme.go | 249 +- .../apimachinery/pkg/runtime/scheme_test.go | 356 +- .../apimachinery/pkg/runtime/serializer/BUILD | 65 - .../pkg/runtime/serializer/json/BUILD | 57 - .../pkg/runtime/serializer/json/json.go | 89 +- .../pkg/runtime/serializer/json/json_test.go | 61 +- .../pkg/runtime/serializer/protobuf/BUILD | 35 - .../runtime/serializer/protobuf/protobuf.go | 11 + .../pkg/runtime/serializer/recognizer/BUILD | 32 - .../serializer/recognizer/testing/BUILD | 31 - .../pkg/runtime/serializer/sparse_test.go | 91 + .../pkg/runtime/serializer/streaming/BUILD | 42 - .../pkg/runtime/serializer/testing/BUILD | 33 - .../testing/zz_generated.deepcopy.go | 35 +- .../pkg/runtime/serializer/versioning/BUILD | 42 - .../serializer/versioning/versioning.go | 43 +- .../serializer/versioning/versioning_test.go | 23 +- .../pkg/runtime/serializer/yaml/BUILD | 30 - .../apimachinery/pkg/runtime/testing/BUILD | 34 - .../apimachinery/pkg/runtime/testing/types.go | 5 +- .../runtime/testing/zz_generated.deepcopy.go | 103 +- .../pkg/runtime/zz_generated.deepcopy.go | 18 +- deps/k8s.io/apimachinery/pkg/selection/BUILD | 25 - deps/k8s.io/apimachinery/pkg/test/BUILD | 66 - ...pis_meta_v1_unstructed_unstructure_test.go | 2 +- .../pkg/test/runtime_helper_test.go | 2 +- ...ntime_serializer_protobuf_protobuf_test.go | 4 +- .../pkg/test/runtime_unversioned_test.go | 2 +- deps/k8s.io/apimachinery/pkg/test/util.go | 5 +- .../pkg/test/zz_generated.deepcopy.go | 14 +- deps/k8s.io/apimachinery/pkg/types/BUILD | 31 - .../apimachinery/pkg/types/namespacedname.go | 17 - deps/k8s.io/apimachinery/pkg/util/cache/BUILD | 44 - deps/k8s.io/apimachinery/pkg/util/clock/BUILD | 33 - .../apimachinery/pkg/util/clock/clock.go | 63 +- .../apimachinery/pkg/util/clock/clock_test.go | 18 +- deps/k8s.io/apimachinery/pkg/util/diff/BUILD | 37 - .../k8s.io/apimachinery/pkg/util/diff/diff.go | 52 +- .../apimachinery/pkg/util/diff/diff_test.go | 52 + .../pkg/util/duration/duration.go | 89 + .../pkg/util/duration/duration_test.go | 47 + .../k8s.io/apimachinery/pkg/util/errors/BUILD | 36 - .../k8s.io/apimachinery/pkg/util/framer/BUILD | 33 - .../apimachinery/pkg/util/httpstream/BUILD | 39 - .../pkg/util/httpstream/spdy/BUILD | 57 - .../pkg/util/httpstream/spdy/roundtripper.go | 12 +- .../util/httpstream/spdy/roundtripper_test.go | 2 +- .../pkg/util/initialization/BUILD | 27 - .../k8s.io/apimachinery/pkg/util/intstr/BUILD | 48 - .../pkg/util/intstr/generated.pb.go | 2 +- .../pkg/util/intstr/generated.proto | 2 +- .../apimachinery/pkg/util/intstr/intstr.go | 11 + .../pkg/util/intstr/intstr_test.go | 7 + deps/k8s.io/apimachinery/pkg/util/json/BUILD | 33 - .../pkg/util/jsonmergepatch/BUILD | 44 - .../pkg/util/jsonmergepatch/patch.go | 20 +- .../pkg/util/jsonmergepatch/patch_test.go | 53 +- .../apimachinery/pkg/util/mergepatch/BUILD | 40 - .../apimachinery/pkg/util/mergepatch/util.go | 2 +- .../pkg/util/mergepatch/util_test.go | 60 +- .../pkg/util/naming/from_stack.go | 93 + .../pkg/util/naming/from_stack_test.go | 56 + deps/k8s.io/apimachinery/pkg/util/net/BUILD | 51 - deps/k8s.io/apimachinery/pkg/util/net/http.go | 30 +- .../pkg/util/net/interface_test.go | 6 +- .../apimachinery/pkg/util/net/port_range.go | 66 +- .../pkg/util/net/port_range_test.go | 12 +- deps/k8s.io/apimachinery/pkg/util/proxy/BUILD | 62 - .../apimachinery/pkg/util/proxy/dial.go | 12 +- .../apimachinery/pkg/util/proxy/dial_test.go | 16 +- .../pkg/util/proxy/upgradeaware.go | 25 +- .../pkg/util/proxy/upgradeaware_test.go | 20 +- deps/k8s.io/apimachinery/pkg/util/rand/BUILD | 33 - .../apimachinery/pkg/util/remotecommand/BUILD | 26 - .../apimachinery/pkg/util/runtime/BUILD | 34 - .../apimachinery/pkg/util/runtime/runtime.go | 10 +- deps/k8s.io/apimachinery/pkg/util/sets/BUILD | 72 - .../k8s.io/apimachinery/pkg/util/sets/byte.go | 6 +- deps/k8s.io/apimachinery/pkg/util/sets/doc.go | 4 +- .../apimachinery/pkg/util/sets/empty.go | 4 +- deps/k8s.io/apimachinery/pkg/util/sets/int.go | 6 +- .../apimachinery/pkg/util/sets/int64.go | 6 +- .../apimachinery/pkg/util/sets/string.go | 6 +- .../apimachinery/pkg/util/sets/types/BUILD | 25 - .../pkg/util/strategicpatch/BUILD | 61 - .../pkg/util/strategicpatch/OWNERS | 1 + .../pkg/util/strategicpatch/patch.go | 25 +- .../pkg/util/strategicpatch/testing/BUILD | 30 - deps/k8s.io/apimachinery/pkg/util/uuid/BUILD | 29 - .../apimachinery/pkg/util/validation/BUILD | 38 - .../pkg/util/validation/field/BUILD | 43 - .../pkg/util/validation/field/errors.go | 2 +- deps/k8s.io/apimachinery/pkg/util/wait/BUILD | 38 - .../k8s.io/apimachinery/pkg/util/wait/wait.go | 26 +- .../apimachinery/pkg/util/waitgroup/BUILD | 32 - deps/k8s.io/apimachinery/pkg/util/yaml/BUILD | 37 - deps/k8s.io/apimachinery/pkg/version/BUILD | 28 - .../apimachinery/pkg/version/helpers.go | 88 + .../apimachinery/pkg/version/helpers_test.go | 52 + deps/k8s.io/apimachinery/pkg/watch/BUILD | 71 - deps/k8s.io/apimachinery/pkg/watch/filter.go | 6 +- deps/k8s.io/apimachinery/pkg/watch/mux.go | 6 +- deps/k8s.io/apimachinery/pkg/watch/until.go | 87 - .../apimachinery/pkg/watch/until_test.go | 172 - deps/k8s.io/apimachinery/pkg/watch/watch.go | 47 + .../apimachinery/pkg/watch/watch_test.go | 38 + .../pkg/watch/zz_generated.deepcopy.go | 8 +- .../third_party/forked/golang/json/BUILD | 33 - .../third_party/forked/golang/netutil/BUILD | 25 - .../third_party/forked/golang/reflect/BUILD | 33 - .../forked/golang/reflect/deep_equal.go | 2 +- deps/k8s.io/apiserver/pkg/admission/BUILD | 85 - .../apiserver/pkg/admission/attributes.go | 63 +- deps/k8s.io/apiserver/pkg/admission/audit.go | 95 + deps/k8s.io/apiserver/pkg/admission/config.go | 24 - .../pkg/admission/configuration/BUILD | 61 - .../configuration/mutating_webhook_manager.go | 100 +- .../validating_webhook_manager.go | 93 +- .../apiserver/pkg/admission/decorator.go | 39 + .../apiserver/pkg/admission/initializer/BUILD | 51 - .../apiserver/pkg/admission/interfaces.go | 22 + .../apiserver/pkg/admission/metrics/BUILD | 42 - .../pkg/admission/plugin/initialization/BUILD | 61 - .../plugin/namespace/lifecycle/BUILD | 63 - .../pkg/admission/plugin/webhook/config/BUILD | 60 - .../config/apis/webhookadmission/BUILD | 36 - .../apis/webhookadmission/v1alpha1/BUILD | 36 - .../v1alpha1/zz_generated.conversion.go | 21 +- .../v1alpha1/zz_generated.deepcopy.go | 7 +- .../v1alpha1/zz_generated.defaults.go | 4 +- .../webhookadmission/zz_generated.deepcopy.go | 7 +- .../admission/plugin/webhook/config/client.go | 44 +- .../plugin/webhook/config/kubeconfig.go | 5 +- .../pkg/admission/plugin/webhook/errors/BUILD | 38 - .../plugin/webhook/errors/statuserror.go | 6 + .../plugin/webhook/generic/conversion.go | 55 + .../plugin/webhook/generic/interfaces.go | 45 + .../plugin/webhook/generic/webhook.go | 202 + .../admission/plugin/webhook/mutating/BUILD | 71 - .../plugin/webhook/mutating/admission.go | 325 - .../plugin/webhook/mutating/dispatcher.go | 165 + .../plugin/webhook/mutating/plugin.go | 96 + .../admission/plugin/webhook/namespace/BUILD | 52 - .../admission/plugin/webhook/request/BUILD | 33 - .../plugin/webhook/request/admissionreview.go | 10 +- .../pkg/admission/plugin/webhook/rules/BUILD | 38 - .../admission/plugin/webhook/rules/rules.go | 12 + .../admission/plugin/webhook/validating/BUILD | 69 - .../plugin/webhook/validating/admission.go | 321 - .../plugin/webhook/validating/dispatcher.go | 133 + .../plugin/webhook/validating/plugin.go | 64 + .../admission/plugin/webhook/versioned/BUILD | 47 - .../plugin/webhook/versioned/attributes.go | 42 - .../plugin/webhook/versioned/conversion.go | 67 - .../admission/plugin/webhook/versioned/doc.go | 19 - .../k8s.io/apiserver/pkg/admission/plugins.go | 26 +- .../k8s.io/apiserver/pkg/apis/apiserver/BUILD | 39 - .../pkg/apis/apiserver/install/BUILD | 33 - .../pkg/apis/apiserver/install/install.go | 22 +- .../pkg/apis/apiserver/v1alpha1/BUILD | 39 - .../v1alpha1/zz_generated.conversion.go | 33 +- .../v1alpha1/zz_generated.deepcopy.go | 15 +- .../v1alpha1/zz_generated.defaults.go | 4 +- .../apis/apiserver/zz_generated.deepcopy.go | 15 +- deps/k8s.io/apiserver/pkg/apis/audit/BUILD | 44 - .../apiserver/pkg/apis/audit/install/BUILD | 46 - .../pkg/apis/audit/install/install.go | 27 +- deps/k8s.io/apiserver/pkg/apis/audit/types.go | 28 +- .../k8s.io/apiserver/pkg/apis/audit/v1/doc.go | 23 + .../pkg/apis/audit/v1/generated.pb.go | 2852 + .../pkg/apis/audit/v1/generated.proto | 249 + .../apiserver/pkg/apis/audit/v1/register.go | 58 + .../apiserver/pkg/apis/audit/v1/types.go | 280 + .../apis/audit/v1/zz_generated.conversion.go | 328 + .../apis/audit/v1/zz_generated.deepcopy.go | 291 + .../apis/audit/v1/zz_generated.defaults.go | 32 + .../apiserver/pkg/apis/audit/v1alpha1/BUILD | 65 - .../pkg/apis/audit/v1alpha1/generated.pb.go | 200 +- .../pkg/apis/audit/v1alpha1/generated.proto | 32 +- .../pkg/apis/audit/v1alpha1/types.go | 28 +- .../audit/v1alpha1/zz_generated.conversion.go | 119 +- .../audit/v1alpha1/zz_generated.deepcopy.go | 58 +- .../audit/v1alpha1/zz_generated.defaults.go | 4 +- .../apiserver/pkg/apis/audit/v1beta1/BUILD | 66 - .../pkg/apis/audit/v1beta1/generated.pb.go | 203 +- .../pkg/apis/audit/v1beta1/generated.proto | 33 +- .../apiserver/pkg/apis/audit/v1beta1/types.go | 28 +- .../audit/v1beta1/zz_generated.conversion.go | 109 +- .../audit/v1beta1/zz_generated.deepcopy.go | 58 +- .../audit/v1beta1/zz_generated.defaults.go | 4 +- .../apiserver/pkg/apis/audit/validation/BUILD | 39 - .../pkg/apis/audit/zz_generated.deepcopy.go | 85 +- deps/k8s.io/apiserver/pkg/audit/BUILD | 68 - deps/k8s.io/apiserver/pkg/audit/policy/BUILD | 58 - .../apiserver/pkg/audit/policy/checker.go | 33 +- .../apiserver/pkg/audit/policy/reader.go | 2 + deps/k8s.io/apiserver/pkg/audit/request.go | 29 +- deps/k8s.io/apiserver/pkg/audit/scheme.go | 11 +- deps/k8s.io/apiserver/pkg/audit/types.go | 3 + deps/k8s.io/apiserver/pkg/audit/union.go | 11 + .../pkg/authentication/authenticator/BUILD | 26 - .../authentication/authenticatorfactory/BUILD | 45 - .../apiserver/pkg/authentication/group/BUILD | 48 - .../authentication/request/anonymous/BUILD | 42 - .../authentication/request/bearertoken/BUILD | 41 - .../request/headerrequest/BUILD | 41 - .../request/headerrequest/requestheader.go | 11 +- .../pkg/authentication/request/union/BUILD | 39 - .../authentication/request/websocket/BUILD | 42 - .../pkg/authentication/request/x509/BUILD | 55 - .../pkg/authentication/request/x509/x509.go | 23 - .../pkg/authentication/serviceaccount/BUILD | 34 - .../pkg/authentication/token/tokenfile/BUILD | 38 - .../apiserver/pkg/authentication/user/BUILD | 28 - .../pkg/authorization/authorizer/BUILD | 29 - .../pkg/authorization/authorizerfactory/BUILD | 46 - .../authorizerfactory/delegating.go | 3 +- .../apiserver/pkg/authorization/path/doc.go | 18 + .../apiserver/pkg/authorization/path/path.go | 67 + .../apiserver/pkg/authorization/union/BUILD | 42 - deps/k8s.io/apiserver/pkg/endpoints/BUILD | 108 - .../apiserver/pkg/endpoints/discovery/BUILD | 64 - .../pkg/endpoints/discovery/group.go | 21 +- .../pkg/endpoints/discovery/legacy.go | 30 +- .../apiserver/pkg/endpoints/discovery/root.go | 22 +- .../pkg/endpoints/discovery/version.go | 16 +- .../apiserver/pkg/endpoints/filters/BUILD | 91 - .../apiserver/pkg/endpoints/filters/audit.go | 25 +- .../pkg/endpoints/filters/authentication.go | 45 +- .../pkg/endpoints/filters/authn_audit.go | 5 +- .../pkg/endpoints/filters/authorization.go | 31 +- .../pkg/endpoints/filters/impersonation.go | 23 +- .../pkg/endpoints/filters/legacy_audit.go | 10 +- .../pkg/endpoints/filters/requestinfo.go | 12 +- .../apiserver/pkg/endpoints/groupversion.go | 21 +- .../apiserver/pkg/endpoints/handlers/BUILD | 106 - .../pkg/endpoints/handlers/create.go | 48 +- .../pkg/endpoints/handlers/delete.go | 91 +- .../apiserver/pkg/endpoints/handlers/get.go | 43 +- .../apiserver/pkg/endpoints/handlers/namer.go | 8 +- .../pkg/endpoints/handlers/negotiation/BUILD | 47 - .../handlers/negotiation/negotiate.go | 26 - .../apiserver/pkg/endpoints/handlers/patch.go | 520 +- .../apiserver/pkg/endpoints/handlers/proxy.go | 287 - .../pkg/endpoints/handlers/response.go | 6 +- .../endpoints/handlers/responsewriters/BUILD | 67 - .../handlers/responsewriters/errors.go | 33 +- .../handlers/responsewriters/status.go | 2 +- .../handlers/responsewriters/writers.go | 68 +- .../apiserver/pkg/endpoints/handlers/rest.go | 47 +- .../pkg/endpoints/handlers/update.go | 107 +- .../apiserver/pkg/endpoints/handlers/watch.go | 17 +- .../apiserver/pkg/endpoints/installer.go | 282 +- .../apiserver/pkg/endpoints/metrics/BUILD | 39 - .../pkg/endpoints/metrics/metrics.go | 68 +- .../apiserver/pkg/endpoints/openapi/BUILD | 50 - .../pkg/endpoints/openapi/openapi.go | 20 +- .../apiserver/pkg/endpoints/request/BUILD | 63 - .../pkg/endpoints/request/context.go | 90 +- .../pkg/endpoints/request/requestcontext.go | 120 - .../pkg/endpoints/request/requestinfo.go | 46 +- deps/k8s.io/apiserver/pkg/features/BUILD | 26 - deps/k8s.io/apiserver/pkg/features/OWNERS | 2 + .../apiserver/pkg/features/kube_features.go | 9 + .../apiserver/pkg/registry/generic/BUILD | 45 - .../apiserver/pkg/registry/generic/OWNERS | 1 - .../apiserver/pkg/registry/generic/options.go | 3 + .../pkg/registry/generic/registry/BUILD | 98 - .../generic/registry/decorated_watcher.go | 3 +- .../pkg/registry/generic/registry/dryrun.go | 117 + .../generic/registry/storage_factory.go | 5 +- .../pkg/registry/generic/registry/store.go | 169 +- .../pkg/registry/generic/testing/tester.go | 202 + deps/k8s.io/apiserver/pkg/registry/rest/BUILD | 73 - .../k8s.io/apiserver/pkg/registry/rest/OWNERS | 1 - .../apiserver/pkg/registry/rest/create.go | 18 +- .../apiserver/pkg/registry/rest/delete.go | 10 +- .../apiserver/pkg/registry/rest/export.go | 5 +- .../apiserver/pkg/registry/rest/meta.go | 16 +- .../apiserver/pkg/registry/rest/rest.go | 78 +- .../pkg/registry/rest/resttest/resttest.go | 1571 + .../apiserver/pkg/registry/rest/table.go | 4 +- .../apiserver/pkg/registry/rest/update.go | 39 +- .../registry/rest/zz_generated.deepcopy.go | 55 - deps/k8s.io/apiserver/pkg/server/BUILD | 172 - deps/k8s.io/apiserver/pkg/server/config.go | 226 +- .../apiserver/pkg/server/config_selfclient.go | 28 +- .../pkg/server/deprecated_insecure_serving.go | 72 + .../k8s.io/apiserver/pkg/server/filters/BUILD | 70 - .../pkg/server/filters/compression.go | 15 +- .../pkg/server/filters/maxinflight.go | 9 +- .../apiserver/pkg/server/filters/timeout.go | 36 +- .../apiserver/pkg/server/filters/waitgroup.go | 14 +- .../apiserver/pkg/server/genericapiserver.go | 99 +- deps/k8s.io/apiserver/pkg/server/handler.go | 16 +- .../k8s.io/apiserver/pkg/server/healthz/BUILD | 37 - .../apiserver/pkg/server/healthz/healthz.go | 45 +- .../k8s.io/apiserver/pkg/server/httplog/BUILD | 37 - .../apiserver/pkg/server/httplog/httplog.go | 13 +- deps/k8s.io/apiserver/pkg/server/mux/BUILD | 42 - .../k8s.io/apiserver/pkg/server/options/BUILD | 109 - .../apiserver/pkg/server/options/admission.go | 33 +- .../pkg/server/options/api_enablement.go | 6 +- .../apiserver/pkg/server/options/audit.go | 422 +- .../pkg/server/options/authentication.go | 46 +- .../pkg/server/options/authorization.go | 59 +- .../options/deprecated_insecure_serving.go | 164 + .../apiserver/pkg/server/options/etcd.go | 53 +- .../pkg/server/options/recommended.go | 18 +- .../pkg/server/options/server_run_options.go | 4 + .../apiserver/pkg/server/options/serving.go | 118 +- .../server/options/serving_with_loopback.go | 78 + .../apiserver/pkg/server/resourceconfig/BUILD | 46 - .../pkg/server/resourceconfig/helpers.go | 20 +- deps/k8s.io/apiserver/pkg/server/routes/BUILD | 54 - .../pkg/server/routes/data/swagger/BUILD | 25 - .../server/routes/data/swagger/datafile.go | 86 +- .../apiserver/pkg/server/routes/flags.go | 126 + .../apiserver/pkg/server/routes/metrics.go | 8 + .../apiserver/pkg/server/routes/openapi.go | 9 +- .../apiserver/pkg/server/routes/profiling.go | 9 +- .../apiserver/pkg/server/secure_serving.go | 214 + deps/k8s.io/apiserver/pkg/server/serve.go | 207 - .../k8s.io/apiserver/pkg/server/storage/BUILD | 66 - .../pkg/server/storage/resource_config.go | 12 + .../storage/resource_encoding_config.go | 22 +- .../pkg/server/storage/storage_factory.go | 6 +- deps/k8s.io/apiserver/pkg/storage/BUILD | 97 - .../pkg/storage/{ => cacher}/cacher.go | 126 +- .../pkg/storage/{ => cacher}/time_budget.go | 2 +- .../apiserver/pkg/storage/cacher/util.go | 46 + .../pkg/storage/{ => cacher}/watch_cache.go | 108 +- deps/k8s.io/apiserver/pkg/storage/errors.go | 2 +- .../k8s.io/apiserver/pkg/storage/errors/BUILD | 33 - deps/k8s.io/apiserver/pkg/storage/etcd/BUILD | 87 - .../pkg/storage/etcd/api_object_versioner.go | 25 +- .../apiserver/pkg/storage/etcd/etcd_helper.go | 38 +- .../pkg/storage/etcd/etcd_watcher.go | 6 +- .../pkg/storage/etcd/etcdtest/doc.go | 17 + .../pkg/storage/etcd/etcdtest/etcdtest.go | 39 + .../apiserver/pkg/storage/etcd/metrics/BUILD | 26 - .../pkg/storage/etcd/metrics/metrics.go | 12 + .../etcd/testing/testingcert/certificates.go | 113 + .../pkg/storage/etcd/testing/utils.go | 303 + .../apiserver/pkg/storage/etcd/util/BUILD | 41 - deps/k8s.io/apiserver/pkg/storage/etcd3/BUILD | 86 - .../apiserver/pkg/storage/etcd3/compact.go | 2 +- .../pkg/storage/etcd3/lease_manager.go | 102 + .../pkg/storage/etcd3/preflight/BUILD | 34 - .../pkg/storage/etcd3/preflight/checks.go | 73 - .../apiserver/pkg/storage/etcd3/store.go | 81 +- .../apiserver/pkg/storage/etcd3/watcher.go | 6 +- .../apiserver/pkg/storage/interfaces.go | 41 +- deps/k8s.io/apiserver/pkg/storage/names/BUILD | 34 - .../pkg/storage/storagebackend/BUILD | 32 - .../pkg/storage/storagebackend/config.go | 3 + .../pkg/storage/storagebackend/factory/BUILD | 62 - .../storage/storagebackend/factory/etcd2.go | 29 +- .../storage/storagebackend/factory/etcd3.go | 70 +- .../storage/storagebackend/factory/factory.go | 12 + .../apiserver/pkg/storage/testing/OWNERS | 10 + .../apiserver/pkg/storage/testing/doc.go | 19 + .../apiserver/pkg/storage/testing/types.go | 29 + .../apiserver/pkg/storage/testing/utils.go | 61 + .../storage/testing/zz_generated.deepcopy.go | 51 + deps/k8s.io/apiserver/pkg/storage/util.go | 26 - deps/k8s.io/apiserver/pkg/storage/value/BUILD | 39 - .../apiserver/pkg/storage/value/metrics.go | 124 + .../pkg/storage/value/transformer.go | 11 + .../apiserver/pkg/util/dryrun/dryrun.go | 22 + deps/k8s.io/apiserver/pkg/util/feature/BUILD | 41 - .../pkg/util/feature/feature_gate.go | 43 +- deps/k8s.io/apiserver/pkg/util/flag/BUILD | 58 - .../pkg/util/flag/ciphersuites_flag.go | 18 + .../pkg/util/flag/map_string_bool.go | 3 + .../pkg/util/flag/map_string_string.go | 54 +- .../apiserver/pkg/util/flag/sectioned.go | 92 + .../apiserver/pkg/util/flushwriter/BUILD | 36 - deps/k8s.io/apiserver/pkg/util/logs/BUILD | 30 - deps/k8s.io/apiserver/pkg/util/logs/logs.go | 12 +- .../apiserver/pkg/util/openapi/proto.go | 142 + deps/k8s.io/apiserver/pkg/util/trace/BUILD | 26 - deps/k8s.io/apiserver/pkg/util/webhook/BUILD | 55 - .../apiserver/pkg/util/webhook/gencerts.sh | 2 +- .../apiserver/pkg/util/webhook/webhook.go | 9 +- deps/k8s.io/apiserver/pkg/util/wsstream/BUILD | 46 - .../plugin/pkg/audit/buffered/buffered.go | 289 + .../plugin/pkg/audit/buffered/doc.go | 19 + .../apiserver/plugin/pkg/audit/log/BUILD | 52 - .../apiserver/plugin/pkg/audit/log/backend.go | 13 +- .../plugin/pkg/audit/truncate/doc.go | 19 + .../plugin/pkg/audit/truncate/truncate.go | 158 + .../apiserver/plugin/pkg/audit/webhook/BUILD | 62 - .../plugin/pkg/audit/webhook/webhook.go | 371 +- .../pkg/authenticator/token/webhook/BUILD | 53 - .../authenticator/token/webhook/webhook.go | 30 +- .../plugin/pkg/authorizer/webhook/BUILD | 56 - .../plugin/pkg/authorizer/webhook/gencerts.sh | 2 +- .../plugin/pkg/authorizer/webhook/webhook.go | 25 +- .../.github/PULL_REQUEST_TEMPLATE.md | 5 +- deps/k8s.io/client-go/CHANGELOG.md | 285 +- deps/k8s.io/client-go/CONTRIBUTING.md | 4 +- deps/k8s.io/client-go/Godeps/Godeps.json | 304 +- deps/k8s.io/client-go/Godeps/OWNERS | 2 + deps/k8s.io/client-go/OWNERS | 41 +- deps/k8s.io/client-go/README.md | 33 +- deps/k8s.io/client-go/SECURITY_CONTACTS | 17 + .../client-go/deprecated-dynamic/bad_debt.go | 79 + .../client-go/deprecated-dynamic/client.go | 131 + .../deprecated-dynamic/client_pool.go | 122 + .../deprecated-dynamic/client_test.go | 623 + deps/k8s.io/client-go/discovery/BUILD | 76 - deps/k8s.io/client-go/discovery/cached/BUILD | 45 - .../client-go/discovery/cached/memcache.go | 25 +- .../client-go/discovery/cached_discovery.go | 282 + .../discovery/cached_discovery_test.go | 169 + .../client-go/discovery/discovery_client.go | 143 +- .../discovery/discovery_client_test.go | 121 +- deps/k8s.io/client-go/discovery/doc.go | 19 + deps/k8s.io/client-go/discovery/fake/BUILD | 46 - deps/k8s.io/client-go/discovery/restmapper.go | 331 - .../client-go/discovery/restmapper_test.go | 384 - .../client-go/discovery/round_tripper.go | 62 + .../client-go/discovery/round_tripper_test.go | 95 + .../client-go/discovery/unstructured.go | 95 - deps/k8s.io/client-go/dynamic/BUILD | 69 - deps/k8s.io/client-go/dynamic/client.go | 378 - deps/k8s.io/client-go/dynamic/client_pool.go | 122 - deps/k8s.io/client-go/dynamic/client_test.go | 297 +- deps/k8s.io/client-go/dynamic/dynamic_util.go | 96 - .../client-go/dynamic/dynamic_util_test.go | 79 - deps/k8s.io/client-go/dynamic/fake/BUILD | 40 - deps/k8s.io/client-go/dynamic/fake/client.go | 163 - .../client-go/dynamic/fake/client_pool.go | 48 - deps/k8s.io/client-go/dynamic/fake/simple.go | 368 + .../client-go/dynamic/fake/simple_test.go | 66 + deps/k8s.io/client-go/dynamic/interface.go | 59 + deps/k8s.io/client-go/dynamic/scheme.go | 98 + deps/k8s.io/client-go/dynamic/simple.go | 326 + deps/k8s.io/client-go/examples/README.md | 4 + .../create-update-delete-deployment/BUILD | 41 - .../create-update-delete-deployment/main.go | 34 +- .../client-go/examples/fake-client/README.md | 14 + .../client-go/examples/fake-client/doc.go | 20 + .../examples/fake-client/main_test.go | 77 + .../in-cluster-client-configuration/BUILD | 38 - .../out-of-cluster-client-configuration/BUILD | 38 - .../k8s.io/client-go/examples/workqueue/BUILD | 44 - deps/k8s.io/client-go/informers/BUILD | 91 - .../informers/admissionregistration/BUILD | 34 - .../admissionregistration/interface.go | 4 +- .../admissionregistration/v1alpha1/BUILD | 35 - .../v1alpha1/initializerconfiguration.go | 10 +- .../v1alpha1/interface.go | 4 +- .../admissionregistration/v1beta1/BUILD | 36 - .../v1beta1/interface.go | 4 +- .../v1beta1/mutatingwebhookconfiguration.go | 10 +- .../v1beta1/validatingwebhookconfiguration.go | 10 +- deps/k8s.io/client-go/informers/apps/BUILD | 36 - .../client-go/informers/apps/interface.go | 4 +- deps/k8s.io/client-go/informers/apps/v1/BUILD | 39 - .../informers/apps/v1/controllerrevision.go | 16 +- .../client-go/informers/apps/v1/daemonset.go | 16 +- .../client-go/informers/apps/v1/deployment.go | 16 +- .../client-go/informers/apps/v1/interface.go | 4 +- .../client-go/informers/apps/v1/replicaset.go | 16 +- .../informers/apps/v1/statefulset.go | 16 +- .../client-go/informers/apps/v1beta1/BUILD | 40 - .../apps/v1beta1/controllerrevision.go | 10 +- .../informers/apps/v1beta1/deployment.go | 10 +- .../informers/apps/v1beta1/interface.go | 4 +- .../informers/apps/v1beta1/statefulset.go | 10 +- .../client-go/informers/apps/v1beta2/BUILD | 42 - .../apps/v1beta2/controllerrevision.go | 10 +- .../informers/apps/v1beta2/daemonset.go | 10 +- .../informers/apps/v1beta2/deployment.go | 10 +- .../informers/apps/v1beta2/interface.go | 4 +- .../informers/apps/v1beta2/replicaset.go | 10 +- .../informers/apps/v1beta2/statefulset.go | 10 +- .../client-go/informers/autoscaling/BUILD | 31 - .../informers/autoscaling/interface.go | 4 +- .../client-go/informers/autoscaling/v1/BUILD | 35 - .../autoscaling/v1/horizontalpodautoscaler.go | 16 +- .../informers/autoscaling/v1/interface.go | 4 +- .../informers/autoscaling/v2beta1/BUILD | 35 - .../v2beta1/horizontalpodautoscaler.go | 10 +- .../autoscaling/v2beta1/interface.go | 4 +- deps/k8s.io/client-go/informers/batch/BUILD | 36 - .../client-go/informers/batch/interface.go | 4 +- .../k8s.io/client-go/informers/batch/v1/BUILD | 38 - .../client-go/informers/batch/v1/interface.go | 4 +- .../client-go/informers/batch/v1/job.go | 16 +- .../client-go/informers/batch/v1beta1/BUILD | 38 - .../informers/batch/v1beta1/cronjob.go | 10 +- .../informers/batch/v1beta1/interface.go | 4 +- .../client-go/informers/batch/v2alpha1/BUILD | 38 - .../informers/batch/v2alpha1/cronjob.go | 10 +- .../informers/batch/v2alpha1/interface.go | 4 +- .../client-go/informers/certificates/BUILD | 32 - .../informers/certificates/interface.go | 4 +- .../informers/certificates/v1beta1/BUILD | 38 - .../v1beta1/certificatesigningrequest.go | 10 +- .../certificates/v1beta1/interface.go | 4 +- .../informers/coordination/interface.go | 46 + .../coordination/v1beta1/interface.go | 45 + .../informers/coordination/v1beta1/lease.go | 89 + deps/k8s.io/client-go/informers/core/BUILD | 32 - .../client-go/informers/core/interface.go | 4 +- deps/k8s.io/client-go/informers/core/v1/BUILD | 53 - .../informers/core/v1/componentstatus.go | 16 +- .../client-go/informers/core/v1/configmap.go | 16 +- .../client-go/informers/core/v1/endpoints.go | 16 +- .../client-go/informers/core/v1/event.go | 16 +- .../client-go/informers/core/v1/interface.go | 4 +- .../client-go/informers/core/v1/limitrange.go | 16 +- .../client-go/informers/core/v1/namespace.go | 16 +- .../client-go/informers/core/v1/node.go | 16 +- .../informers/core/v1/persistentvolume.go | 16 +- .../core/v1/persistentvolumeclaim.go | 16 +- .../k8s.io/client-go/informers/core/v1/pod.go | 16 +- .../informers/core/v1/podtemplate.go | 16 +- .../core/v1/replicationcontroller.go | 16 +- .../informers/core/v1/resourcequota.go | 16 +- .../client-go/informers/core/v1/secret.go | 16 +- .../client-go/informers/core/v1/service.go | 16 +- .../informers/core/v1/serviceaccount.go | 16 +- deps/k8s.io/client-go/informers/events/BUILD | 29 - .../client-go/informers/events/interface.go | 4 +- .../client-go/informers/events/v1beta1/BUILD | 35 - .../informers/events/v1beta1/event.go | 10 +- .../informers/events/v1beta1/interface.go | 4 +- .../client-go/informers/extensions/BUILD | 32 - .../informers/extensions/interface.go | 4 +- .../informers/extensions/v1beta1/BUILD | 42 - .../informers/extensions/v1beta1/daemonset.go | 10 +- .../extensions/v1beta1/deployment.go | 10 +- .../informers/extensions/v1beta1/ingress.go | 10 +- .../informers/extensions/v1beta1/interface.go | 4 +- .../extensions/v1beta1/podsecuritypolicy.go | 10 +- .../extensions/v1beta1/replicaset.go | 10 +- deps/k8s.io/client-go/informers/factory.go | 71 +- deps/k8s.io/client-go/informers/generic.go | 150 +- .../informers/internalinterfaces/BUILD | 31 - .../internalinterfaces/factory_interfaces.go | 4 +- .../client-go/informers/networking/BUILD | 32 - .../informers/networking/interface.go | 4 +- .../client-go/informers/networking/v1/BUILD | 38 - .../informers/networking/v1/interface.go | 4 +- .../informers/networking/v1/networkpolicy.go | 16 +- deps/k8s.io/client-go/informers/policy/BUILD | 32 - .../client-go/informers/policy/interface.go | 4 +- .../client-go/informers/policy/v1beta1/BUILD | 38 - .../informers/policy/v1beta1/interface.go | 11 +- .../policy/v1beta1/poddisruptionbudget.go | 10 +- .../policy/v1beta1/podsecuritypolicy.go | 88 + deps/k8s.io/client-go/informers/rbac/BUILD | 36 - .../client-go/informers/rbac/interface.go | 4 +- deps/k8s.io/client-go/informers/rbac/v1/BUILD | 41 - .../informers/rbac/v1/clusterrole.go | 16 +- .../informers/rbac/v1/clusterrolebinding.go | 16 +- .../client-go/informers/rbac/v1/interface.go | 4 +- .../client-go/informers/rbac/v1/role.go | 16 +- .../informers/rbac/v1/rolebinding.go | 16 +- .../client-go/informers/rbac/v1alpha1/BUILD | 41 - .../informers/rbac/v1alpha1/clusterrole.go | 10 +- .../rbac/v1alpha1/clusterrolebinding.go | 10 +- .../informers/rbac/v1alpha1/interface.go | 4 +- .../client-go/informers/rbac/v1alpha1/role.go | 10 +- .../informers/rbac/v1alpha1/rolebinding.go | 10 +- .../client-go/informers/rbac/v1beta1/BUILD | 41 - .../informers/rbac/v1beta1/clusterrole.go | 10 +- .../rbac/v1beta1/clusterrolebinding.go | 10 +- .../informers/rbac/v1beta1/interface.go | 4 +- .../client-go/informers/rbac/v1beta1/role.go | 10 +- .../informers/rbac/v1beta1/rolebinding.go | 10 +- .../client-go/informers/scheduling/BUILD | 32 - .../informers/scheduling/interface.go | 12 +- .../informers/scheduling/v1alpha1/BUILD | 38 - .../scheduling/v1alpha1/interface.go | 4 +- .../scheduling/v1alpha1/priorityclass.go | 10 +- .../informers/scheduling/v1beta1/interface.go | 45 + .../scheduling/v1beta1/priorityclass.go | 88 + .../k8s.io/client-go/informers/settings/BUILD | 32 - .../client-go/informers/settings/interface.go | 4 +- .../informers/settings/v1alpha1/BUILD | 38 - .../informers/settings/v1alpha1/interface.go | 4 +- .../informers/settings/v1alpha1/podpreset.go | 10 +- deps/k8s.io/client-go/informers/storage/BUILD | 36 - .../client-go/informers/storage/interface.go | 4 +- .../client-go/informers/storage/v1/BUILD | 38 - .../informers/storage/v1/interface.go | 4 +- .../informers/storage/v1/storageclass.go | 16 +- .../informers/storage/v1alpha1/BUILD | 35 - .../informers/storage/v1alpha1/interface.go | 4 +- .../storage/v1alpha1/volumeattachment.go | 10 +- .../client-go/informers/storage/v1beta1/BUILD | 39 - .../informers/storage/v1beta1/interface.go | 4 +- .../informers/storage/v1beta1/storageclass.go | 10 +- .../storage/v1beta1/volumeattachment.go | 10 +- deps/k8s.io/client-go/kubernetes/BUILD | 95 - deps/k8s.io/client-go/kubernetes/clientset.go | 48 +- deps/k8s.io/client-go/kubernetes/doc.go | 4 +- deps/k8s.io/client-go/kubernetes/fake/BUILD | 124 - .../kubernetes/fake/clientset_generated.go | 38 +- deps/k8s.io/client-go/kubernetes/fake/doc.go | 4 +- .../client-go/kubernetes/fake/register.go | 78 +- deps/k8s.io/client-go/kubernetes/scheme/BUILD | 62 - .../k8s.io/client-go/kubernetes/scheme/doc.go | 4 +- .../client-go/kubernetes/scheme/register.go | 78 +- .../admissionregistration/v1alpha1/BUILD | 39 - .../v1alpha1/admissionregistration_client.go | 4 +- .../admissionregistration/v1alpha1/doc.go | 4 +- .../admissionregistration/v1alpha1/fake/BUILD | 37 - .../v1alpha1/fake/doc.go | 4 +- .../fake/fake_admissionregistration_client.go | 4 +- .../fake/fake_initializerconfiguration.go | 6 +- .../v1alpha1/generated_expansion.go | 4 +- .../v1alpha1/initializerconfiguration.go | 4 +- .../typed/admissionregistration/v1beta1/BUILD | 40 - .../v1beta1/admissionregistration_client.go | 4 +- .../admissionregistration/v1beta1/doc.go | 4 +- .../admissionregistration/v1beta1/fake/BUILD | 38 - .../admissionregistration/v1beta1/fake/doc.go | 4 +- .../fake/fake_admissionregistration_client.go | 4 +- .../fake/fake_mutatingwebhookconfiguration.go | 6 +- .../fake_validatingwebhookconfiguration.go | 6 +- .../v1beta1/generated_expansion.go | 4 +- .../v1beta1/mutatingwebhookconfiguration.go | 4 +- .../v1beta1/validatingwebhookconfiguration.go | 4 +- .../client-go/kubernetes/typed/apps/v1/BUILD | 43 - .../kubernetes/typed/apps/v1/apps_client.go | 4 +- .../typed/apps/v1/controllerrevision.go | 26 +- .../kubernetes/typed/apps/v1/daemonset.go | 26 +- .../kubernetes/typed/apps/v1/deployment.go | 26 +- .../client-go/kubernetes/typed/apps/v1/doc.go | 4 +- .../kubernetes/typed/apps/v1/fake/BUILD | 41 - .../kubernetes/typed/apps/v1/fake/doc.go | 4 +- .../typed/apps/v1/fake/fake_apps_client.go | 4 +- .../apps/v1/fake/fake_controllerrevision.go | 42 +- .../typed/apps/v1/fake/fake_daemonset.go | 48 +- .../typed/apps/v1/fake/fake_deployment.go | 48 +- .../typed/apps/v1/fake/fake_replicaset.go | 48 +- .../typed/apps/v1/fake/fake_statefulset.go | 48 +- .../typed/apps/v1/generated_expansion.go | 4 +- .../kubernetes/typed/apps/v1/replicaset.go | 26 +- .../kubernetes/typed/apps/v1/statefulset.go | 26 +- .../kubernetes/typed/apps/v1beta1/BUILD | 45 - .../typed/apps/v1beta1/apps_client.go | 4 +- .../typed/apps/v1beta1/controllerrevision.go | 4 +- .../typed/apps/v1beta1/deployment.go | 4 +- .../kubernetes/typed/apps/v1beta1/doc.go | 4 +- .../kubernetes/typed/apps/v1beta1/fake/BUILD | 43 - .../kubernetes/typed/apps/v1beta1/fake/doc.go | 4 +- .../apps/v1beta1/fake/fake_apps_client.go | 4 +- .../v1beta1/fake/fake_controllerrevision.go | 6 +- .../apps/v1beta1/fake/fake_deployment.go | 6 +- .../typed/apps/v1beta1/fake/fake_scale.go | 4 +- .../apps/v1beta1/fake/fake_statefulset.go | 6 +- .../typed/apps/v1beta1/generated_expansion.go | 4 +- .../kubernetes/typed/apps/v1beta1/scale.go | 4 +- .../typed/apps/v1beta1/statefulset.go | 4 +- .../kubernetes/typed/apps/v1beta2/BUILD | 47 - .../typed/apps/v1beta2/apps_client.go | 4 +- .../typed/apps/v1beta2/controllerrevision.go | 4 +- .../typed/apps/v1beta2/daemonset.go | 4 +- .../typed/apps/v1beta2/deployment.go | 4 +- .../kubernetes/typed/apps/v1beta2/doc.go | 4 +- .../kubernetes/typed/apps/v1beta2/fake/BUILD | 45 - .../kubernetes/typed/apps/v1beta2/fake/doc.go | 4 +- .../apps/v1beta2/fake/fake_apps_client.go | 4 +- .../v1beta2/fake/fake_controllerrevision.go | 6 +- .../typed/apps/v1beta2/fake/fake_daemonset.go | 6 +- .../apps/v1beta2/fake/fake_deployment.go | 6 +- .../apps/v1beta2/fake/fake_replicaset.go | 6 +- .../typed/apps/v1beta2/fake/fake_scale.go | 4 +- .../apps/v1beta2/fake/fake_statefulset.go | 6 +- .../typed/apps/v1beta2/generated_expansion.go | 4 +- .../typed/apps/v1beta2/replicaset.go | 4 +- .../kubernetes/typed/apps/v1beta2/scale.go | 4 +- .../typed/apps/v1beta2/statefulset.go | 4 +- .../kubernetes/typed/authentication/v1/BUILD | 40 - .../v1/authentication_client.go | 4 +- .../kubernetes/typed/authentication/v1/doc.go | 4 +- .../typed/authentication/v1/fake/BUILD | 36 - .../typed/authentication/v1/fake/doc.go | 4 +- .../v1/fake/fake_authentication_client.go | 4 +- .../v1/fake/fake_tokenreview.go | 4 +- .../authentication/v1/generated_expansion.go | 4 +- .../typed/authentication/v1/tokenreview.go | 4 +- .../typed/authentication/v1beta1/BUILD | 40 - .../v1beta1/authentication_client.go | 4 +- .../typed/authentication/v1beta1/doc.go | 4 +- .../typed/authentication/v1beta1/fake/BUILD | 36 - .../typed/authentication/v1beta1/fake/doc.go | 4 +- .../fake/fake_authentication_client.go | 4 +- .../v1beta1/fake/fake_tokenreview.go | 4 +- .../v1beta1/generated_expansion.go | 4 +- .../authentication/v1beta1/tokenreview.go | 4 +- .../kubernetes/typed/authorization/v1/BUILD | 46 - .../authorization/v1/authorization_client.go | 4 +- .../kubernetes/typed/authorization/v1/doc.go | 4 +- .../typed/authorization/v1/fake/BUILD | 42 - .../typed/authorization/v1/fake/doc.go | 4 +- .../v1/fake/fake_authorization_client.go | 4 +- .../v1/fake/fake_localsubjectaccessreview.go | 4 +- .../v1/fake/fake_selfsubjectaccessreview.go | 4 +- .../v1/fake/fake_selfsubjectrulesreview.go | 4 +- .../v1/fake/fake_subjectaccessreview.go | 4 +- .../fake_subjectaccessreview_expansion.go | 3 + .../authorization/v1/generated_expansion.go | 4 +- .../v1/localsubjectaccessreview.go | 4 +- .../v1/selfsubjectaccessreview.go | 4 +- .../v1/selfsubjectrulesreview.go | 4 +- .../authorization/v1/subjectaccessreview.go | 4 +- .../typed/authorization/v1beta1/BUILD | 46 - .../v1beta1/authorization_client.go | 4 +- .../typed/authorization/v1beta1/doc.go | 4 +- .../typed/authorization/v1beta1/fake/BUILD | 43 - .../typed/authorization/v1beta1/fake/doc.go | 4 +- .../v1beta1/fake/fake_authorization_client.go | 4 +- .../fake/fake_localsubjectaccessreview.go | 4 +- .../fake/fake_selfsubjectaccessreview.go | 4 +- .../fake/fake_selfsubjectrulesreview.go | 4 +- .../v1beta1/fake/fake_subjectaccessreview.go | 4 +- .../v1beta1/generated_expansion.go | 4 +- .../v1beta1/localsubjectaccessreview.go | 4 +- .../v1beta1/selfsubjectaccessreview.go | 4 +- .../v1beta1/selfsubjectrulesreview.go | 4 +- .../v1beta1/subjectaccessreview.go | 4 +- .../kubernetes/typed/autoscaling/v1/BUILD | 42 - .../autoscaling/v1/autoscaling_client.go | 4 +- .../kubernetes/typed/autoscaling/v1/doc.go | 4 +- .../typed/autoscaling/v1/fake/BUILD | 40 - .../typed/autoscaling/v1/fake/doc.go | 4 +- .../v1/fake/fake_autoscaling_client.go | 4 +- .../v1/fake/fake_horizontalpodautoscaler.go | 48 +- .../autoscaling/v1/generated_expansion.go | 4 +- .../autoscaling/v1/horizontalpodautoscaler.go | 26 +- .../typed/autoscaling/v2beta1/BUILD | 39 - .../autoscaling/v2beta1/autoscaling_client.go | 4 +- .../typed/autoscaling/v2beta1/doc.go | 4 +- .../typed/autoscaling/v2beta1/fake/BUILD | 37 - .../typed/autoscaling/v2beta1/fake/doc.go | 4 +- .../v2beta1/fake/fake_autoscaling_client.go | 4 +- .../fake/fake_horizontalpodautoscaler.go | 6 +- .../v2beta1/generated_expansion.go | 4 +- .../v2beta1/horizontalpodautoscaler.go | 4 +- .../client-go/kubernetes/typed/batch/v1/BUILD | 42 - .../kubernetes/typed/batch/v1/batch_client.go | 4 +- .../kubernetes/typed/batch/v1/doc.go | 4 +- .../kubernetes/typed/batch/v1/fake/BUILD | 40 - .../kubernetes/typed/batch/v1/fake/doc.go | 4 +- .../typed/batch/v1/fake/fake_batch_client.go | 4 +- .../typed/batch/v1/fake/fake_job.go | 48 +- .../typed/batch/v1/generated_expansion.go | 4 +- .../kubernetes/typed/batch/v1/job.go | 26 +- .../kubernetes/typed/batch/v1beta1/BUILD | 42 - .../typed/batch/v1beta1/batch_client.go | 4 +- .../kubernetes/typed/batch/v1beta1/cronjob.go | 4 +- .../kubernetes/typed/batch/v1beta1/doc.go | 4 +- .../kubernetes/typed/batch/v1beta1/fake/BUILD | 40 - .../typed/batch/v1beta1/fake/doc.go | 4 +- .../batch/v1beta1/fake/fake_batch_client.go | 4 +- .../typed/batch/v1beta1/fake/fake_cronjob.go | 6 +- .../batch/v1beta1/generated_expansion.go | 4 +- .../kubernetes/typed/batch/v2alpha1/BUILD | 42 - .../typed/batch/v2alpha1/batch_client.go | 4 +- .../typed/batch/v2alpha1/cronjob.go | 4 +- .../kubernetes/typed/batch/v2alpha1/doc.go | 4 +- .../typed/batch/v2alpha1/fake/BUILD | 40 - .../typed/batch/v2alpha1/fake/doc.go | 4 +- .../batch/v2alpha1/fake/fake_batch_client.go | 4 +- .../typed/batch/v2alpha1/fake/fake_cronjob.go | 6 +- .../batch/v2alpha1/generated_expansion.go | 4 +- .../typed/certificates/v1beta1/BUILD | 43 - .../v1beta1/certificates_client.go | 4 +- .../v1beta1/certificatesigningrequest.go | 4 +- .../typed/certificates/v1beta1/doc.go | 4 +- .../typed/certificates/v1beta1/fake/BUILD | 41 - .../typed/certificates/v1beta1/fake/doc.go | 4 +- .../v1beta1/fake/fake_certificates_client.go | 4 +- .../fake/fake_certificatesigningrequest.go | 6 +- .../v1beta1/generated_expansion.go | 4 +- .../v1beta1/coordination_client.go | 90 + .../typed/coordination/v1beta1/doc.go | 20 + .../typed/coordination/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_coordination_client.go | 40 + .../coordination/v1beta1/fake/fake_lease.go | 128 + .../v1beta1/generated_expansion.go | 21 + .../typed/coordination/v1beta1/lease.go | 157 + .../client-go/kubernetes/typed/core/v1/BUILD | 68 - .../typed/core/v1/componentstatus.go | 26 +- .../kubernetes/typed/core/v1/configmap.go | 26 +- .../kubernetes/typed/core/v1/core_client.go | 4 +- .../client-go/kubernetes/typed/core/v1/doc.go | 4 +- .../kubernetes/typed/core/v1/endpoints.go | 26 +- .../kubernetes/typed/core/v1/event.go | 26 +- .../kubernetes/typed/core/v1/fake/BUILD | 64 - .../kubernetes/typed/core/v1/fake/doc.go | 4 +- .../core/v1/fake/fake_componentstatus.go | 42 +- .../typed/core/v1/fake/fake_configmap.go | 42 +- .../typed/core/v1/fake/fake_core_client.go | 4 +- .../typed/core/v1/fake/fake_endpoints.go | 42 +- .../typed/core/v1/fake/fake_event.go | 42 +- .../typed/core/v1/fake/fake_limitrange.go | 42 +- .../typed/core/v1/fake/fake_namespace.go | 54 +- .../typed/core/v1/fake/fake_node.go | 48 +- .../core/v1/fake/fake_persistentvolume.go | 48 +- .../v1/fake/fake_persistentvolumeclaim.go | 48 +- .../kubernetes/typed/core/v1/fake/fake_pod.go | 48 +- .../typed/core/v1/fake/fake_podtemplate.go | 42 +- .../v1/fake/fake_replicationcontroller.go | 48 +- .../typed/core/v1/fake/fake_resourcequota.go | 48 +- .../typed/core/v1/fake/fake_secret.go | 42 +- .../typed/core/v1/fake/fake_service.go | 54 +- .../typed/core/v1/fake/fake_serviceaccount.go | 42 +- .../v1/fake/fake_serviceaccount_expansion.go | 31 + .../typed/core/v1/generated_expansion.go | 6 +- .../kubernetes/typed/core/v1/limitrange.go | 26 +- .../kubernetes/typed/core/v1/namespace.go | 33 +- .../kubernetes/typed/core/v1/node.go | 26 +- .../typed/core/v1/persistentvolume.go | 26 +- .../typed/core/v1/persistentvolumeclaim.go | 26 +- .../client-go/kubernetes/typed/core/v1/pod.go | 26 +- .../kubernetes/typed/core/v1/podtemplate.go | 26 +- .../typed/core/v1/replicationcontroller.go | 30 +- .../kubernetes/typed/core/v1/resourcequota.go | 26 +- .../kubernetes/typed/core/v1/secret.go | 26 +- .../kubernetes/typed/core/v1/service.go | 34 +- .../typed/core/v1/serviceaccount.go | 26 +- .../typed/core/v1/serviceaccount_expansion.go | 41 + .../kubernetes/typed/events/v1beta1/BUILD | 39 - .../kubernetes/typed/events/v1beta1/doc.go | 4 +- .../kubernetes/typed/events/v1beta1/event.go | 4 +- .../typed/events/v1beta1/events_client.go | 4 +- .../typed/events/v1beta1/fake/BUILD | 37 - .../typed/events/v1beta1/fake/doc.go | 4 +- .../typed/events/v1beta1/fake/fake_event.go | 6 +- .../events/v1beta1/fake/fake_events_client.go | 4 +- .../events/v1beta1/generated_expansion.go | 4 +- .../kubernetes/typed/extensions/v1beta1/BUILD | 51 - .../typed/extensions/v1beta1/daemonset.go | 4 +- .../typed/extensions/v1beta1/deployment.go | 4 +- .../typed/extensions/v1beta1/doc.go | 4 +- .../extensions/v1beta1/extensions_client.go | 4 +- .../typed/extensions/v1beta1/fake/BUILD | 47 - .../typed/extensions/v1beta1/fake/doc.go | 4 +- .../extensions/v1beta1/fake/fake_daemonset.go | 6 +- .../v1beta1/fake/fake_deployment.go | 6 +- .../v1beta1/fake/fake_extensions_client.go | 4 +- .../extensions/v1beta1/fake/fake_ingress.go | 6 +- .../v1beta1/fake/fake_podsecuritypolicy.go | 6 +- .../v1beta1/fake/fake_replicaset.go | 6 +- .../extensions/v1beta1/fake/fake_scale.go | 4 +- .../extensions/v1beta1/generated_expansion.go | 4 +- .../typed/extensions/v1beta1/ingress.go | 4 +- .../extensions/v1beta1/podsecuritypolicy.go | 4 +- .../typed/extensions/v1beta1/replicaset.go | 4 +- .../typed/extensions/v1beta1/scale.go | 4 +- .../kubernetes/typed/networking/v1/BUILD | 42 - .../kubernetes/typed/networking/v1/doc.go | 4 +- .../kubernetes/typed/networking/v1/fake/BUILD | 40 - .../typed/networking/v1/fake/doc.go | 4 +- .../v1/fake/fake_networking_client.go | 4 +- .../networking/v1/fake/fake_networkpolicy.go | 42 +- .../networking/v1/generated_expansion.go | 4 +- .../typed/networking/v1/networking_client.go | 4 +- .../typed/networking/v1/networkpolicy.go | 26 +- .../kubernetes/typed/policy/v1beta1/BUILD | 44 - .../kubernetes/typed/policy/v1beta1/doc.go | 4 +- .../typed/policy/v1beta1/eviction.go | 4 +- .../typed/policy/v1beta1/fake/BUILD | 42 - .../typed/policy/v1beta1/fake/doc.go | 4 +- .../policy/v1beta1/fake/fake_eviction.go | 4 +- .../v1beta1/fake/fake_poddisruptionbudget.go | 6 +- .../v1beta1/fake/fake_podsecuritypolicy.go | 120 + .../policy/v1beta1/fake/fake_policy_client.go | 8 +- .../policy/v1beta1/generated_expansion.go | 6 +- .../policy/v1beta1/poddisruptionbudget.go | 4 +- .../typed/policy/v1beta1/podsecuritypolicy.go | 147 + .../typed/policy/v1beta1/policy_client.go | 9 +- .../client-go/kubernetes/typed/rbac/v1/BUILD | 45 - .../kubernetes/typed/rbac/v1/clusterrole.go | 26 +- .../typed/rbac/v1/clusterrolebinding.go | 26 +- .../client-go/kubernetes/typed/rbac/v1/doc.go | 4 +- .../kubernetes/typed/rbac/v1/fake/BUILD | 43 - .../kubernetes/typed/rbac/v1/fake/doc.go | 4 +- .../typed/rbac/v1/fake/fake_clusterrole.go | 42 +- .../rbac/v1/fake/fake_clusterrolebinding.go | 42 +- .../typed/rbac/v1/fake/fake_rbac_client.go | 4 +- .../typed/rbac/v1/fake/fake_role.go | 42 +- .../typed/rbac/v1/fake/fake_rolebinding.go | 42 +- .../typed/rbac/v1/generated_expansion.go | 4 +- .../kubernetes/typed/rbac/v1/rbac_client.go | 4 +- .../kubernetes/typed/rbac/v1/role.go | 26 +- .../kubernetes/typed/rbac/v1/rolebinding.go | 26 +- .../kubernetes/typed/rbac/v1alpha1/BUILD | 45 - .../typed/rbac/v1alpha1/clusterrole.go | 4 +- .../typed/rbac/v1alpha1/clusterrolebinding.go | 4 +- .../kubernetes/typed/rbac/v1alpha1/doc.go | 4 +- .../kubernetes/typed/rbac/v1alpha1/fake/BUILD | 43 - .../typed/rbac/v1alpha1/fake/doc.go | 4 +- .../rbac/v1alpha1/fake/fake_clusterrole.go | 6 +- .../v1alpha1/fake/fake_clusterrolebinding.go | 6 +- .../rbac/v1alpha1/fake/fake_rbac_client.go | 4 +- .../typed/rbac/v1alpha1/fake/fake_role.go | 6 +- .../rbac/v1alpha1/fake/fake_rolebinding.go | 6 +- .../rbac/v1alpha1/generated_expansion.go | 4 +- .../typed/rbac/v1alpha1/rbac_client.go | 4 +- .../kubernetes/typed/rbac/v1alpha1/role.go | 4 +- .../typed/rbac/v1alpha1/rolebinding.go | 4 +- .../kubernetes/typed/rbac/v1beta1/BUILD | 45 - .../typed/rbac/v1beta1/clusterrole.go | 4 +- .../typed/rbac/v1beta1/clusterrolebinding.go | 4 +- .../kubernetes/typed/rbac/v1beta1/doc.go | 4 +- .../kubernetes/typed/rbac/v1beta1/fake/BUILD | 43 - .../kubernetes/typed/rbac/v1beta1/fake/doc.go | 4 +- .../rbac/v1beta1/fake/fake_clusterrole.go | 6 +- .../v1beta1/fake/fake_clusterrolebinding.go | 6 +- .../rbac/v1beta1/fake/fake_rbac_client.go | 4 +- .../typed/rbac/v1beta1/fake/fake_role.go | 6 +- .../rbac/v1beta1/fake/fake_rolebinding.go | 6 +- .../typed/rbac/v1beta1/generated_expansion.go | 4 +- .../typed/rbac/v1beta1/rbac_client.go | 4 +- .../kubernetes/typed/rbac/v1beta1/role.go | 4 +- .../typed/rbac/v1beta1/rolebinding.go | 4 +- .../typed/scheduling/v1alpha1/BUILD | 42 - .../typed/scheduling/v1alpha1/doc.go | 4 +- .../typed/scheduling/v1alpha1/fake/BUILD | 40 - .../typed/scheduling/v1alpha1/fake/doc.go | 4 +- .../v1alpha1/fake/fake_priorityclass.go | 6 +- .../v1alpha1/fake/fake_scheduling_client.go | 4 +- .../v1alpha1/generated_expansion.go | 4 +- .../scheduling/v1alpha1/priorityclass.go | 4 +- .../scheduling/v1alpha1/scheduling_client.go | 4 +- .../typed/scheduling/v1beta1/doc.go | 20 + .../typed/scheduling/v1beta1/fake/doc.go | 20 + .../v1beta1/fake/fake_priorityclass.go | 120 + .../v1beta1/fake/fake_scheduling_client.go | 40 + .../scheduling/v1beta1/generated_expansion.go | 21 + .../typed/scheduling/v1beta1/priorityclass.go | 147 + .../scheduling/v1beta1/scheduling_client.go | 90 + .../kubernetes/typed/settings/v1alpha1/BUILD | 42 - .../kubernetes/typed/settings/v1alpha1/doc.go | 4 +- .../typed/settings/v1alpha1/fake/BUILD | 40 - .../typed/settings/v1alpha1/fake/doc.go | 4 +- .../settings/v1alpha1/fake/fake_podpreset.go | 6 +- .../v1alpha1/fake/fake_settings_client.go | 4 +- .../settings/v1alpha1/generated_expansion.go | 4 +- .../typed/settings/v1alpha1/podpreset.go | 4 +- .../settings/v1alpha1/settings_client.go | 4 +- .../kubernetes/typed/storage/v1/BUILD | 42 - .../kubernetes/typed/storage/v1/doc.go | 4 +- .../kubernetes/typed/storage/v1/fake/BUILD | 40 - .../kubernetes/typed/storage/v1/fake/doc.go | 4 +- .../storage/v1/fake/fake_storage_client.go | 4 +- .../storage/v1/fake/fake_storageclass.go | 42 +- .../typed/storage/v1/generated_expansion.go | 4 +- .../typed/storage/v1/storage_client.go | 4 +- .../typed/storage/v1/storageclass.go | 26 +- .../kubernetes/typed/storage/v1alpha1/BUILD | 39 - .../kubernetes/typed/storage/v1alpha1/doc.go | 4 +- .../typed/storage/v1alpha1/fake/BUILD | 37 - .../typed/storage/v1alpha1/fake/doc.go | 4 +- .../v1alpha1/fake/fake_storage_client.go | 4 +- .../v1alpha1/fake/fake_volumeattachment.go | 6 +- .../storage/v1alpha1/generated_expansion.go | 4 +- .../typed/storage/v1alpha1/storage_client.go | 4 +- .../storage/v1alpha1/volumeattachment.go | 4 +- .../kubernetes/typed/storage/v1beta1/BUILD | 43 - .../kubernetes/typed/storage/v1beta1/doc.go | 4 +- .../typed/storage/v1beta1/fake/BUILD | 41 - .../typed/storage/v1beta1/fake/doc.go | 4 +- .../v1beta1/fake/fake_storage_client.go | 4 +- .../storage/v1beta1/fake/fake_storageclass.go | 6 +- .../v1beta1/fake/fake_volumeattachment.go | 6 +- .../storage/v1beta1/generated_expansion.go | 4 +- .../typed/storage/v1beta1/storage_client.go | 4 +- .../typed/storage/v1beta1/storageclass.go | 4 +- .../typed/storage/v1beta1/volumeattachment.go | 4 +- .../admissionregistration/v1alpha1/BUILD | 31 - .../v1alpha1/expansion_generated.go | 4 +- .../v1alpha1/initializerconfiguration.go | 4 +- .../admissionregistration/v1beta1/BUILD | 32 - .../v1beta1/expansion_generated.go | 4 +- .../v1beta1/mutatingwebhookconfiguration.go | 4 +- .../v1beta1/validatingwebhookconfiguration.go | 4 +- deps/k8s.io/client-go/listers/apps/v1/BUILD | 41 - .../listers/apps/v1/controllerrevision.go | 4 +- .../client-go/listers/apps/v1/daemonset.go | 4 +- .../client-go/listers/apps/v1/deployment.go | 4 +- .../listers/apps/v1/expansion_generated.go | 4 +- .../client-go/listers/apps/v1/replicaset.go | 4 +- .../client-go/listers/apps/v1/statefulset.go | 4 +- .../client-go/listers/apps/v1beta1/BUILD | 40 - .../apps/v1beta1/controllerrevision.go | 4 +- .../listers/apps/v1beta1/deployment.go | 4 +- .../apps/v1beta1/expansion_generated.go | 4 +- .../client-go/listers/apps/v1beta1/scale.go | 4 +- .../listers/apps/v1beta1/statefulset.go | 4 +- .../client-go/listers/apps/v1beta2/BUILD | 45 - .../apps/v1beta2/controllerrevision.go | 4 +- .../listers/apps/v1beta2/daemonset.go | 4 +- .../listers/apps/v1beta2/deployment.go | 4 +- .../apps/v1beta2/expansion_generated.go | 4 +- .../listers/apps/v1beta2/replicaset.go | 4 +- .../client-go/listers/apps/v1beta2/scale.go | 4 +- .../listers/apps/v1beta2/statefulset.go | 4 +- .../client-go/listers/authentication/v1/BUILD | 34 - .../authentication/v1/expansion_generated.go | 4 +- .../listers/authentication/v1/tokenreview.go | 4 +- .../listers/authentication/v1beta1/BUILD | 34 - .../v1beta1/expansion_generated.go | 4 +- .../authentication/v1beta1/tokenreview.go | 4 +- .../client-go/listers/authorization/v1/BUILD | 37 - .../authorization/v1/expansion_generated.go | 4 +- .../v1/localsubjectaccessreview.go | 4 +- .../v1/selfsubjectaccessreview.go | 4 +- .../v1/selfsubjectrulesreview.go | 4 +- .../authorization/v1/subjectaccessreview.go | 4 +- .../listers/authorization/v1beta1/BUILD | 37 - .../v1beta1/expansion_generated.go | 4 +- .../v1beta1/localsubjectaccessreview.go | 4 +- .../v1beta1/selfsubjectaccessreview.go | 4 +- .../v1beta1/selfsubjectrulesreview.go | 4 +- .../v1beta1/subjectaccessreview.go | 4 +- .../client-go/listers/autoscaling/v1/BUILD | 31 - .../autoscaling/v1/expansion_generated.go | 4 +- .../autoscaling/v1/horizontalpodautoscaler.go | 4 +- .../listers/autoscaling/v2beta1/BUILD | 31 - .../v2beta1/expansion_generated.go | 4 +- .../v2beta1/horizontalpodautoscaler.go | 4 +- deps/k8s.io/client-go/listers/batch/v1/BUILD | 37 - .../listers/batch/v1/expansion_generated.go | 4 +- deps/k8s.io/client-go/listers/batch/v1/job.go | 4 +- .../client-go/listers/batch/v1beta1/BUILD | 34 - .../listers/batch/v1beta1/cronjob.go | 4 +- .../batch/v1beta1/expansion_generated.go | 4 +- .../client-go/listers/batch/v2alpha1/BUILD | 34 - .../listers/batch/v2alpha1/cronjob.go | 4 +- .../batch/v2alpha1/expansion_generated.go | 4 +- .../listers/certificates/v1beta1/BUILD | 34 - .../v1beta1/certificatesigningrequest.go | 4 +- .../v1beta1/expansion_generated.go | 4 +- .../v1beta1/expansion_generated.go | 27 + .../listers/coordination/v1beta1/lease.go | 94 + deps/k8s.io/client-go/listers/core/v1/BUILD | 52 - .../listers/core/v1/componentstatus.go | 4 +- .../client-go/listers/core/v1/configmap.go | 4 +- .../client-go/listers/core/v1/endpoints.go | 4 +- .../k8s.io/client-go/listers/core/v1/event.go | 4 +- .../listers/core/v1/expansion_generated.go | 4 +- .../client-go/listers/core/v1/limitrange.go | 4 +- .../client-go/listers/core/v1/namespace.go | 4 +- deps/k8s.io/client-go/listers/core/v1/node.go | 4 +- .../listers/core/v1/persistentvolume.go | 4 +- .../listers/core/v1/persistentvolumeclaim.go | 4 +- deps/k8s.io/client-go/listers/core/v1/pod.go | 4 +- .../client-go/listers/core/v1/podtemplate.go | 4 +- .../listers/core/v1/replicationcontroller.go | 4 +- .../listers/core/v1/resourcequota.go | 4 +- .../client-go/listers/core/v1/secret.go | 4 +- .../client-go/listers/core/v1/service.go | 4 +- .../listers/core/v1/serviceaccount.go | 4 +- .../client-go/listers/events/v1beta1/BUILD | 31 - .../client-go/listers/events/v1beta1/event.go | 4 +- .../events/v1beta1/expansion_generated.go | 4 +- .../listers/extensions/v1beta1/BUILD | 61 - .../listers/extensions/v1beta1/daemonset.go | 4 +- .../listers/extensions/v1beta1/deployment.go | 4 +- .../extensions/v1beta1/expansion_generated.go | 4 +- .../listers/extensions/v1beta1/ingress.go | 4 +- .../extensions/v1beta1/podsecuritypolicy.go | 4 +- .../listers/extensions/v1beta1/replicaset.go | 4 +- .../listers/extensions/v1beta1/scale.go | 4 +- .../listers/imagepolicy/v1alpha1/BUILD | 34 - .../v1alpha1/expansion_generated.go | 4 +- .../imagepolicy/v1alpha1/imagereview.go | 4 +- .../client-go/listers/networking/v1/BUILD | 34 - .../networking/v1/expansion_generated.go | 4 +- .../listers/networking/v1/networkpolicy.go | 4 +- .../client-go/listers/policy/v1beta1/BUILD | 39 - .../listers/policy/v1beta1/eviction.go | 4 +- .../policy/v1beta1/expansion_generated.go | 8 +- .../policy/v1beta1/poddisruptionbudget.go | 4 +- .../policy/v1beta1/podsecuritypolicy.go | 65 + deps/k8s.io/client-go/listers/rbac/v1/BUILD | 37 - .../client-go/listers/rbac/v1/clusterrole.go | 4 +- .../listers/rbac/v1/clusterrolebinding.go | 4 +- .../listers/rbac/v1/expansion_generated.go | 4 +- deps/k8s.io/client-go/listers/rbac/v1/role.go | 4 +- .../client-go/listers/rbac/v1/rolebinding.go | 4 +- .../client-go/listers/rbac/v1alpha1/BUILD | 37 - .../listers/rbac/v1alpha1/clusterrole.go | 4 +- .../rbac/v1alpha1/clusterrolebinding.go | 4 +- .../rbac/v1alpha1/expansion_generated.go | 4 +- .../client-go/listers/rbac/v1alpha1/role.go | 4 +- .../listers/rbac/v1alpha1/rolebinding.go | 4 +- .../client-go/listers/rbac/v1beta1/BUILD | 37 - .../listers/rbac/v1beta1/clusterrole.go | 4 +- .../rbac/v1beta1/clusterrolebinding.go | 4 +- .../rbac/v1beta1/expansion_generated.go | 4 +- .../client-go/listers/rbac/v1beta1/role.go | 4 +- .../listers/rbac/v1beta1/rolebinding.go | 4 +- .../listers/scheduling/v1alpha1/BUILD | 34 - .../v1alpha1/expansion_generated.go | 4 +- .../scheduling/v1alpha1/priorityclass.go | 4 +- .../scheduling/v1beta1/expansion_generated.go | 23 + .../scheduling/v1beta1/priorityclass.go | 65 + .../client-go/listers/settings/v1alpha1/BUILD | 34 - .../settings/v1alpha1/expansion_generated.go | 4 +- .../listers/settings/v1alpha1/podpreset.go | 4 +- .../k8s.io/client-go/listers/storage/v1/BUILD | 34 - .../listers/storage/v1/expansion_generated.go | 4 +- .../listers/storage/v1/storageclass.go | 4 +- .../client-go/listers/storage/v1alpha1/BUILD | 31 - .../storage/v1alpha1/expansion_generated.go | 4 +- .../storage/v1alpha1/volumeattachment.go | 4 +- .../client-go/listers/storage/v1beta1/BUILD | 35 - .../storage/v1beta1/expansion_generated.go | 4 +- .../listers/storage/v1beta1/storageclass.go | 4 +- .../storage/v1beta1/volumeattachment.go | 4 +- .../pkg/apis/clientauthentication/doc.go | 19 + .../clientauthentication/install/install.go | 33 + .../pkg/apis/clientauthentication/register.go | 50 + .../pkg/apis/clientauthentication/types.go | 77 + .../apis/clientauthentication/v1alpha1/doc.go | 23 + .../clientauthentication/v1alpha1/register.go | 55 + .../clientauthentication/v1alpha1/types.go | 78 + .../v1alpha1/zz_generated.conversion.go | 176 + .../v1alpha1/zz_generated.deepcopy.go | 128 + .../v1alpha1/zz_generated.defaults.go | 32 + .../v1beta1/conversion.go | 26 + .../apis/clientauthentication/v1beta1/doc.go | 23 + .../clientauthentication/v1beta1/register.go | 55 + .../clientauthentication/v1beta1/types.go | 59 + .../v1beta1/zz_generated.conversion.go | 142 + .../v1beta1/zz_generated.deepcopy.go | 92 + .../v1beta1/zz_generated.defaults.go | 32 + .../zz_generated.deepcopy.go | 128 + deps/k8s.io/client-go/pkg/version/BUILD | 30 - deps/k8s.io/client-go/pkg/version/base.go | 2 +- deps/k8s.io/client-go/pkg/version/def.bzl | 14 + .../authenticator/token/oidc/testing/BUILD | 30 - .../token/oidc/testing/provider.go | 200 - .../client-go/plugin/pkg/client/auth/BUILD | 37 - .../plugin/pkg/client/auth/azure/BUILD | 42 - .../plugin/pkg/client/auth/azure/README.md | 18 +- .../plugin/pkg/client/auth/azure/azure.go | 2 +- .../plugin/pkg/client/auth/exec/exec.go | 361 + .../plugin/pkg/client/auth/exec/exec_test.go | 748 + .../client/auth/exec/testdata/test-plugin.sh | 18 + .../plugin/pkg/client/auth/gcp/BUILD | 44 - .../plugin/pkg/client/auth/gcp/gcp.go | 2 +- .../plugin/pkg/client/auth/oidc/BUILD | 39 - .../plugin/pkg/client/auth/oidc/OWNERS | 1 + .../plugin/pkg/client/auth/oidc/oidc.go | 2 +- .../plugin/pkg/client/auth/openstack/BUILD | 39 - .../pkg/client/auth/openstack/openstack.go | 49 +- .../client/auth/openstack/openstack_test.go | 57 + deps/k8s.io/client-go/rest/BUILD | 100 - deps/k8s.io/client-go/rest/config.go | 14 +- deps/k8s.io/client-go/rest/config_test.go | 26 +- deps/k8s.io/client-go/rest/fake/BUILD | 32 - deps/k8s.io/client-go/rest/fake/fake.go | 6 +- deps/k8s.io/client-go/rest/request.go | 41 +- deps/k8s.io/client-go/rest/request_test.go | 2 +- deps/k8s.io/client-go/rest/transport.go | 52 +- deps/k8s.io/client-go/rest/versions.go | 88 - deps/k8s.io/client-go/rest/watch/BUILD | 57 - .../client-go/rest/zz_generated.deepcopy.go | 4 +- .../restmapper/category_expansion.go | 119 + .../restmapper/category_expansion_test.go | 145 + deps/k8s.io/client-go/restmapper/discovery.go | 339 + .../client-go/restmapper/discovery_test.go | 384 + deps/k8s.io/client-go/restmapper/shortcut.go | 172 + .../client-go/restmapper/shortcut_test.go | 289 + deps/k8s.io/client-go/scale/BUILD | 77 - deps/k8s.io/client-go/scale/client.go | 14 +- deps/k8s.io/client-go/scale/client_test.go | 9 +- deps/k8s.io/client-go/scale/fake/BUILD | 28 - deps/k8s.io/client-go/scale/roundtrip_test.go | 2 +- deps/k8s.io/client-go/scale/scheme/BUILD | 41 - .../client-go/scale/scheme/appsint/BUILD | 31 - .../client-go/scale/scheme/appsv1beta1/BUILD | 35 - .../appsv1beta1/zz_generated.conversion.go | 55 +- .../client-go/scale/scheme/appsv1beta2/BUILD | 35 - .../appsv1beta2/zz_generated.conversion.go | 55 +- .../scale/scheme/autoscalingv1/BUILD | 35 - .../autoscalingv1/zz_generated.conversion.go | 55 +- .../scale/scheme/extensionsint/BUILD | 31 - .../scale/scheme/extensionsv1beta1/BUILD | 35 - .../zz_generated.conversion.go | 55 +- .../scale/scheme/zz_generated.deepcopy.go | 15 +- deps/k8s.io/client-go/scale/util.go | 25 +- deps/k8s.io/client-go/testing/BUILD | 61 - deps/k8s.io/client-go/testing/actions.go | 155 +- deps/k8s.io/client-go/testing/fake.go | 58 +- deps/k8s.io/client-go/testing/fixture.go | 57 +- deps/k8s.io/client-go/testing/fixture_test.go | 43 + .../third_party/forked/golang/template/BUILD | 28 - deps/k8s.io/client-go/tools/auth/BUILD | 34 - .../tools/bootstrap/token/{api => }/OWNERS | 0 .../client-go/tools/bootstrap/token/api/BUILD | 26 - .../tools/bootstrap/token/api/doc.go | 4 +- .../tools/bootstrap/token/api/types.go | 22 +- .../tools/bootstrap/token/util/BUILD | 33 - .../tools/bootstrap/token/util/helpers.go | 93 +- .../bootstrap/token/util/helpers_test.go | 137 + deps/k8s.io/client-go/tools/cache/BUILD | 104 - .../client-go/tools/cache/delta_fifo.go | 23 +- .../k8s.io/client-go/tools/cache/listwatch.go | 78 +- .../tools/cache/mutation_detector.go | 3 + .../k8s.io/client-go/tools/cache/reflector.go | 77 +- .../client-go/tools/cache/testing/BUILD | 46 - deps/k8s.io/client-go/tools/clientcmd/BUILD | 79 - .../client-go/tools/clientcmd/api/BUILD | 51 - .../client-go/tools/clientcmd/api/helpers.go | 9 +- .../tools/clientcmd/api/helpers_test.go | 7 +- .../tools/clientcmd/api/latest/BUILD | 33 - .../tools/clientcmd/api/latest/latest.go | 11 +- .../client-go/tools/clientcmd/api/types.go | 32 + .../client-go/tools/clientcmd/api/v1/BUILD | 37 - .../tools/clientcmd/api/v1/conversion.go | 25 +- .../client-go/tools/clientcmd/api/v1/types.go | 32 + .../clientcmd/api/v1/zz_generated.deepcopy.go | 69 +- .../clientcmd/api/zz_generated.deepcopy.go | 90 +- .../client-go/tools/clientcmd/auth_loaders.go | 11 +- .../tools/clientcmd/client_config.go | 57 +- .../tools/clientcmd/client_config_test.go | 177 +- .../client-go/tools/clientcmd/config.go | 32 +- .../client-go/tools/clientcmd/loader.go | 33 +- .../client-go/tools/clientcmd/loader_test.go | 214 +- .../tools/clientcmd/merged_client_builder.go | 3 +- .../client-go/tools/clientcmd/validation.go | 19 + .../tools/clientcmd/validation_test.go | 100 + .../client-go/tools/leaderelection/BUILD | 54 - .../tools/leaderelection/leaderelection.go | 96 +- .../tools/leaderelection/resourcelock/BUILD | 35 - .../resourcelock/configmaplock.go | 12 +- deps/k8s.io/client-go/tools/metrics/BUILD | 25 - deps/k8s.io/client-go/tools/pager/BUILD | 50 - deps/k8s.io/client-go/tools/pager/pager.go | 3 +- .../client-go/tools/pager/pager_test.go | 2 +- deps/k8s.io/client-go/tools/portforward/BUILD | 42 - deps/k8s.io/client-go/tools/record/BUILD | 69 - deps/k8s.io/client-go/tools/record/event.go | 28 +- deps/k8s.io/client-go/tools/record/fake.go | 4 + deps/k8s.io/client-go/tools/reference/BUILD | 31 - deps/k8s.io/client-go/tools/reference/ref.go | 8 +- .../client-go/tools/reference/ref_test.go | 72 + .../client-go/tools/remotecommand/BUILD | 61 - .../tools/remotecommand/remotecommand.go | 4 +- .../client-go/tools/watch/informerwatcher.go | 114 + .../tools/watch/informerwatcher_test.go | 236 + deps/k8s.io/client-go/tools/watch/until.go | 225 + .../client-go/tools/watch/until_test.go | 303 + deps/k8s.io/client-go/transport/BUILD | 49 - deps/k8s.io/client-go/transport/cache.go | 12 +- deps/k8s.io/client-go/transport/cache_test.go | 39 +- deps/k8s.io/client-go/transport/config.go | 13 +- .../client-go/transport/round_trippers.go | 125 +- .../transport/round_trippers_test.go | 119 +- deps/k8s.io/client-go/transport/spdy/BUILD | 30 - deps/k8s.io/client-go/transport/transport.go | 34 +- .../client-go/transport/transport_test.go | 140 +- deps/k8s.io/client-go/util/buffer/BUILD | 30 - .../util/buffer/ring_growing_test.go | 2 +- deps/k8s.io/client-go/util/cert/BUILD | 48 - deps/k8s.io/client-go/util/cert/cert.go | 96 +- deps/k8s.io/client-go/util/cert/io.go | 37 +- deps/k8s.io/client-go/util/cert/triple/BUILD | 26 - deps/k8s.io/client-go/util/certificate/BUILD | 67 - .../util/certificate/certificate_manager.go | 127 +- .../certificate/certificate_manager_test.go | 12 +- .../util/certificate/certificate_store.go | 16 +- .../client-go/util/certificate/csr/BUILD | 54 - .../client-go/util/certificate/csr/csr.go | 6 +- .../util/connrotation/connrotation.go | 105 + .../util/connrotation/connrotation_test.go | 61 + deps/k8s.io/client-go/util/exec/BUILD | 25 - deps/k8s.io/client-go/util/flowcontrol/BUILD | 45 - .../util/flowcontrol/backoff_test.go | 2 +- deps/k8s.io/client-go/util/homedir/BUILD | 25 - deps/k8s.io/client-go/util/integer/BUILD | 33 - deps/k8s.io/client-go/util/jsonpath/BUILD | 42 - deps/k8s.io/client-go/util/jsonpath/node.go | 8 +- deps/k8s.io/client-go/util/jsonpath/parser.go | 6 +- deps/k8s.io/client-go/util/retry/BUILD | 42 - deps/k8s.io/client-go/util/testing/BUILD | 36 - deps/k8s.io/client-go/util/workqueue/BUILD | 61 - .../util/workqueue/delaying_queue.go | 10 +- .../workqueue/rate_limitting_queue_test.go | 2 +- deps/k8s.io/code-generator/Godeps/Godeps.json | 44 +- deps/k8s.io/code-generator/Godeps/OWNERS | 2 + deps/k8s.io/code-generator/OWNERS | 3 + deps/k8s.io/code-generator/SECURITY_CONTACTS | 17 + .../apiserver/apis/example/install/install.go | 20 +- .../apiserver/apis/example/v1/doc.go | 1 + .../example/v1/zz_generated.conversion.go | 45 +- .../apis/example/v1/zz_generated.deepcopy.go | 10 +- .../apis/example/v1/zz_generated.defaults.go | 4 +- .../apis/example/zz_generated.deepcopy.go | 10 +- .../apis/example2/install/install.go | 20 +- .../apiserver/apis/example2/v1/doc.go | 1 + .../example2/v1/zz_generated.conversion.go | 45 +- .../apis/example2/v1/zz_generated.deepcopy.go | 10 +- .../apis/example2/v1/zz_generated.defaults.go | 4 +- .../apis/example2/zz_generated.deepcopy.go | 10 +- .../clientset/internalversion/clientset.go | 6 +- .../clientset/internalversion/doc.go | 4 +- .../fake/clientset_generated.go | 13 +- .../clientset/internalversion/fake/doc.go | 4 +- .../internalversion/fake/register.go | 22 +- .../clientset/internalversion/scheme/doc.go | 4 +- .../internalversion/scheme/register.go | 19 +- .../typed/example/internalversion/doc.go | 4 +- .../example/internalversion/example_client.go | 13 +- .../typed/example/internalversion/fake/doc.go | 4 +- .../fake/fake_example_client.go | 4 +- .../internalversion/fake/fake_testtype.go | 6 +- .../internalversion/generated_expansion.go | 4 +- .../typed/example/internalversion/testtype.go | 4 +- .../typed/example2/internalversion/doc.go | 4 +- .../internalversion/example2_client.go | 13 +- .../example2/internalversion/fake/doc.go | 4 +- .../fake/fake_example2_client.go | 4 +- .../internalversion/fake/fake_testtype.go | 6 +- .../internalversion/generated_expansion.go | 4 +- .../example2/internalversion/testtype.go | 4 +- .../clientset/versioned/clientset.go | 6 +- .../apiserver/clientset/versioned/doc.go | 4 +- .../versioned/fake/clientset_generated.go | 13 +- .../apiserver/clientset/versioned/fake/doc.go | 4 +- .../clientset/versioned/fake/register.go | 22 +- .../clientset/versioned/scheme/doc.go | 4 +- .../clientset/versioned/scheme/register.go | 22 +- .../versioned/typed/example/v1/doc.go | 4 +- .../typed/example/v1/example_client.go | 4 +- .../versioned/typed/example/v1/fake/doc.go | 4 +- .../example/v1/fake/fake_example_client.go | 4 +- .../typed/example/v1/fake/fake_testtype.go | 48 +- .../typed/example/v1/generated_expansion.go | 4 +- .../versioned/typed/example/v1/testtype.go | 26 +- .../versioned/typed/example2/v1/doc.go | 4 +- .../typed/example2/v1/example2_client.go | 4 +- .../versioned/typed/example2/v1/fake/doc.go | 4 +- .../example2/v1/fake/fake_example2_client.go | 4 +- .../typed/example2/v1/fake/fake_testtype.go | 48 +- .../typed/example2/v1/generated_expansion.go | 4 +- .../versioned/typed/example2/v1/testtype.go | 26 +- .../externalversions/example/interface.go | 4 +- .../externalversions/example/v1/interface.go | 4 +- .../externalversions/example/v1/testtype.go | 16 +- .../externalversions/example2/interface.go | 4 +- .../externalversions/example2/v1/interface.go | 4 +- .../externalversions/example2/v1/testtype.go | 16 +- .../informers/externalversions/factory.go | 65 +- .../informers/externalversions/generic.go | 8 +- .../internalinterfaces/factory_interfaces.go | 4 +- .../internalversion/example/interface.go | 4 +- .../example/internalversion/interface.go | 4 +- .../example/internalversion/testtype.go | 12 +- .../internalversion/example2/interface.go | 4 +- .../example2/internalversion/interface.go | 4 +- .../example2/internalversion/testtype.go | 12 +- .../informers/internalversion/factory.go | 65 +- .../informers/internalversion/generic.go | 4 +- .../internalinterfaces/factory_interfaces.go | 4 +- .../internalversion/expansion_generated.go | 4 +- .../example/internalversion/testtype.go | 4 +- .../listers/example/v1/expansion_generated.go | 4 +- .../apiserver/listers/example/v1/testtype.go | 4 +- .../internalversion/expansion_generated.go | 4 +- .../example2/internalversion/testtype.go | 4 +- .../example2/v1/expansion_generated.go | 4 +- .../apiserver/listers/example2/v1/testtype.go | 4 +- .../_examples/crd/apis/example/v1/doc.go | 1 + .../_examples/crd/apis/example/v1/types.go | 27 + .../apis/example/v1/zz_generated.deepcopy.go | 86 +- .../apis/example/v1/zz_generated.defaults.go | 32 + .../_examples/crd/apis/example2/v1/doc.go | 1 + .../apis/example2/v1/zz_generated.deepcopy.go | 10 +- .../apis/example2/v1/zz_generated.defaults.go | 32 + .../crd/clientset/versioned/clientset.go | 6 +- .../_examples/crd/clientset/versioned/doc.go | 4 +- .../versioned/fake/clientset_generated.go | 13 +- .../crd/clientset/versioned/fake/doc.go | 4 +- .../crd/clientset/versioned/fake/register.go | 22 +- .../crd/clientset/versioned/scheme/doc.go | 4 +- .../clientset/versioned/scheme/register.go | 22 +- .../typed/example/v1/clustertesttype.go | 193 + .../versioned/typed/example/v1/doc.go | 4 +- .../typed/example/v1/example_client.go | 9 +- .../versioned/typed/example/v1/fake/doc.go | 4 +- .../example/v1/fake/fake_clustertesttype.go | 152 + .../example/v1/fake/fake_example_client.go | 8 +- .../typed/example/v1/fake/fake_testtype.go | 48 +- .../typed/example/v1/generated_expansion.go | 6 +- .../versioned/typed/example/v1/testtype.go | 26 +- .../versioned/typed/example2/v1/doc.go | 4 +- .../typed/example2/v1/example2_client.go | 4 +- .../versioned/typed/example2/v1/fake/doc.go | 4 +- .../example2/v1/fake/fake_example2_client.go | 4 +- .../typed/example2/v1/fake/fake_testtype.go | 48 +- .../typed/example2/v1/generated_expansion.go | 4 +- .../versioned/typed/example2/v1/testtype.go | 26 +- .../externalversions/example/interface.go | 4 +- .../example/v1/clustertesttype.go | 88 + .../externalversions/example/v1/interface.go | 11 +- .../externalversions/example/v1/testtype.go | 16 +- .../externalversions/example2/interface.go | 4 +- .../externalversions/example2/v1/interface.go | 4 +- .../externalversions/example2/v1/testtype.go | 16 +- .../crd/informers/externalversions/factory.go | 65 +- .../crd/informers/externalversions/generic.go | 10 +- .../internalinterfaces/factory_interfaces.go | 4 +- .../crd/listers/example/v1/clustertesttype.go | 65 + .../listers/example/v1/expansion_generated.go | 8 +- .../crd/listers/example/v1/testtype.go | 4 +- .../example2/v1/expansion_generated.go | 4 +- .../crd/listers/example2/v1/testtype.go | 4 +- .../code-generator/cmd/client-gen/BUILD | 46 - .../code-generator/cmd/client-gen/args/BUILD | 47 - .../cmd/client-gen/args/gvpackages_test.go | 22 +- .../cmd/client-gen/generators/BUILD | 50 - .../client-gen/generators/client_generator.go | 24 +- .../cmd/client-gen/generators/fake/BUILD | 40 - .../fake/generator_fake_for_clientset.go | 11 +- .../fake/generator_fake_for_type.go | 31 +- .../generators/generator_for_clientset.go | 4 +- .../generators/generator_for_group.go | 9 +- .../cmd/client-gen/generators/scheme/BUILD | 32 - .../generators/scheme/generator_for_scheme.go | 74 +- .../cmd/client-gen/generators/util/BUILD | 34 - .../code-generator/cmd/client-gen/path/BUILD | 25 - .../code-generator/cmd/client-gen/types/BUILD | 37 - .../code-generator/cmd/conversion-gen/BUILD | 44 - .../cmd/conversion-gen/args/BUILD | 26 - .../cmd/conversion-gen/args/args.go | 2 +- .../cmd/conversion-gen/generators/BUILD | 33 - .../conversion-gen/generators/conversion.go | 37 +- .../code-generator/cmd/deepcopy-gen/BUILD | 43 - .../cmd/deepcopy-gen/args/BUILD | 27 - .../code-generator/cmd/defaulter-gen/BUILD | 43 - .../cmd/defaulter-gen/args/BUILD | 27 - .../code-generator/cmd/go-to-protobuf/BUILD | 40 - .../cmd/go-to-protobuf/protobuf/BUILD | 52 - .../cmd/go-to-protobuf/protobuf/namer.go | 5 +- .../cmd/go-to-protobuf/protoc-gen-gogo/BUILD | 38 - .../code-generator/cmd/import-boss/BUILD | 38 - .../code-generator/cmd/informer-gen/BUILD | 44 - .../cmd/informer-gen/args/BUILD | 27 - .../cmd/informer-gen/generators/BUILD | 45 - .../cmd/informer-gen/generators/factory.go | 72 +- .../cmd/informer-gen/generators/packages.go | 8 - .../cmd/informer-gen/generators/types.go | 1 + .../code-generator/cmd/lister-gen/BUILD | 44 - .../code-generator/cmd/lister-gen/args/BUILD | 27 - .../cmd/lister-gen/generators/BUILD | 38 - .../cmd/lister-gen/generators/lister.go | 8 - .../code-generator/cmd/openapi-gen/BUILD | 43 - .../code-generator/cmd/openapi-gen/args/BUILD | 26 - .../cmd/register-gen/args/args.go | 39 + .../cmd/register-gen/generators/packages.go | 137 + .../generators/register_external.go | 117 + .../code-generator/cmd/register-gen/main.go | 52 + deps/k8s.io/code-generator/cmd/set-gen/BUILD | 42 - deps/k8s.io/code-generator/generate-groups.sh | 12 +- .../generate-internal-groups.sh | 8 +- deps/k8s.io/code-generator/hack/BUILD | 18 - .../code-generator/hack/boilerplate.go.txt | 2 +- .../code-generator/hack/update-codegen.sh | 2 +- .../code-generator/hack/verify-codegen.sh | 2 +- deps/k8s.io/code-generator/pkg/util/BUILD | 22 - .../third_party/forked/golang/reflect/BUILD | 25 - deps/k8s.io/gengo/.travis.yml | 10 +- deps/k8s.io/gengo/CONTRIBUTING.md | 9 + deps/k8s.io/gengo/OWNERS | 1 + deps/k8s.io/gengo/README.md | 3 + deps/k8s.io/gengo/SECURITY_CONTACTS | 15 + deps/k8s.io/gengo/args/args.go | 25 +- .../deepcopy-gen/generators/deepcopy.go | 482 +- .../deepcopy-gen/generators/deepcopy_test.go | 329 +- .../deepcopy-gen/output_tests/aliases/doc.go | 89 + .../output_tests/aliases/zz_generated.go | 412 + .../output_tests/builtins/zz_generated.go | 2 +- .../output_tests/interface_fuzzer.go | 131 + .../output_tests/interfaces/doc.go | 2 +- .../output_tests/interfaces/zz_generated.go | 6 +- .../deepcopy-gen/output_tests/maps/doc.go | 28 +- .../output_tests/maps/zz_generated.go | 130 +- .../deepcopy-gen/output_tests/output_test.go | 157 + .../deepcopy-gen/output_tests/pointer/doc.go | 9 +- .../output_tests/pointer/zz_generated.go | 84 +- .../output_tests/reflect_deepcopy.go | 81 + .../deepcopy-gen/output_tests/slices/doc.go | 28 +- .../output_tests/slices/zz_generated.go | 102 +- .../output_tests/structs/zz_generated.go | 2 +- .../deepcopy-gen/output_tests/value_fuzzer.go | 86 + .../output_tests/wholepkg/zz_generated.go | 161 +- .../_output_tests/empty/zz_generated.go | 2 +- .../_output_tests/pointer/zz_generated.go | 2 +- .../_output_tests/slices/zz_generated.go | 2 +- .../_output_tests/wholepkg/zz_generated.go | 2 +- .../defaulter-gen/generators/defaulter.go | 5 - .../gengo/examples/go-to-protobuf/.gitignore | 1 - .../go-to-protobuf/.import-restrictions | 11 - .../gengo/examples/go-to-protobuf/OWNERS | 2 - .../go-to-protobuf/build-image/Dockerfile | 24 - .../gengo/examples/go-to-protobuf/main.go | 36 - .../examples/go-to-protobuf/protobuf/cmd.go | 306 - .../go-to-protobuf/protobuf/generator.go | 762 - .../go-to-protobuf/protobuf/import_tracker.go | 50 - .../examples/go-to-protobuf/protobuf/namer.go | 186 - .../go-to-protobuf/protobuf/namer_test.go | 50 - .../go-to-protobuf/protobuf/package.go | 211 - .../go-to-protobuf/protobuf/parser.go | 452 - .../examples/go-to-protobuf/protobuf/tags.go | 33 - .../go-to-protobuf/protoc-gen-gogo/main.go | 32 - .../generators/import_restrict_test.go | 9 +- .../gengo/examples/set-gen/generators/sets.go | 6 +- .../gengo/examples/set-gen/sets/byte.go | 2 +- .../k8s.io/gengo/examples/set-gen/sets/doc.go | 2 +- .../gengo/examples/set-gen/sets/empty.go | 2 +- .../k8s.io/gengo/examples/set-gen/sets/int.go | 2 +- .../gengo/examples/set-gen/sets/int64.go | 2 +- .../gengo/examples/set-gen/sets/string.go | 2 +- deps/k8s.io/gengo/generator/import_tracker.go | 22 +- deps/k8s.io/gengo/namer/namer.go | 13 +- deps/k8s.io/gengo/namer/plural_namer.go | 4 +- deps/k8s.io/gengo/namer/plural_namer_test.go | 5 + deps/k8s.io/gengo/parser/parse.go | 9 +- deps/k8s.io/gengo/parser/parse_test.go | 3 +- deps/k8s.io/kube-openapi/.travis.yml | 2 +- deps/k8s.io/kube-openapi/CONTRIBUTING.md | 9 + deps/k8s.io/kube-openapi/Godeps/Godeps.json | 5 + deps/k8s.io/kube-openapi/OWNERS | 4 + deps/k8s.io/kube-openapi/README.md | 4 + .../kube-openapi/cmd/openapi-gen/args/args.go | 73 + .../cmd/openapi-gen/openapi-gen.go | 55 + .../kube-openapi/example/openapi-gen/main.go | 47 - .../kube-openapi/pkg/aggregator/aggregator.go | 29 +- .../pkg/aggregator/aggregator_test.go | 302 +- .../kube-openapi/pkg/builder/openapi.go | 91 +- .../kube-openapi/pkg/builder/openapi_test.go | 42 +- deps/k8s.io/kube-openapi/pkg/common/common.go | 2 +- .../kube-openapi/pkg/generators/api_linter.go | 100 + .../kube-openapi/pkg/generators/extension.go | 182 + .../pkg/generators/extension_test.go | 454 + .../kube-openapi/pkg/generators/openapi.go | 240 +- .../pkg/generators/openapi_test.go | 225 +- .../kube-openapi/pkg/generators/rules/doc.go | 23 + .../pkg/generators/rules/names_match.go | 172 + .../pkg/generators/rules/names_match_test.go | 359 + .../kube-openapi/pkg/handler/handler.go | 67 +- .../kube-openapi/pkg/handler/handler_test.go | 89 + deps/k8s.io/kube-openapi/pkg/idl/doc.go | 140 + .../kube-openapi/pkg/idl/listtype_test.go | 56 + .../kube-openapi/pkg/idl/maptype_test.go | 26 + .../kube-openapi/pkg/idl/structtype_test.go | 30 + .../kube-openapi/pkg/util/proto/document.go | 66 +- .../kube-openapi/pkg/util/proto/openapi.go | 2 +- .../pkg/util/proto/openapi_test.go | 62 +- .../proto/{testing => testdata}/swagger.json | 4 +- .../pkg/util/proto/testdata/swagger_next.json | 6574 +++ .../pkg/util/proto/testing/openapi.go | 6 + .../proto/validation/validation_suite_test.go | 49 + .../util/proto/validation/validation_test.go | 369 + .../kube-openapi/pkg/util/sets/empty.go | 27 + .../kube-openapi/pkg/util/sets/string.go | 207 + .../k8s.io/kube-openapi/pkg/util/util_test.go | 37 + .../kube-openapi/test/integration/README.md | 28 + .../test/integration/builder/main.go | 85 + .../integration/integration_suite_test.go | 97 + .../pkg/generated/openapi_generated.go | 25 + .../test/integration/testdata/golden.json | 68 + .../testdata/listtype/atomic-list.go | 7 + .../integration/testdata/listtype/map-list.go | 14 + .../integration/testdata/listtype/set-list.go | 7 + pkg/operator/operator_leader.go | 8 +- pkg/storage/pv_creator.go | 39 +- 4883 files changed, 707406 insertions(+), 308810 deletions(-) create mode 100644 deps/github.com/Azure/go-ansiterm/LICENSE create mode 100644 deps/github.com/Azure/go-ansiterm/README.md create mode 100644 deps/github.com/Azure/go-ansiterm/constants.go create mode 100644 deps/github.com/Azure/go-ansiterm/context.go create mode 100644 deps/github.com/Azure/go-ansiterm/csi_entry_state.go create mode 100644 deps/github.com/Azure/go-ansiterm/csi_param_state.go create mode 100644 deps/github.com/Azure/go-ansiterm/escape_intermediate_state.go create mode 100644 deps/github.com/Azure/go-ansiterm/escape_state.go create mode 100644 deps/github.com/Azure/go-ansiterm/event_handler.go create mode 100644 deps/github.com/Azure/go-ansiterm/ground_state.go create mode 100644 deps/github.com/Azure/go-ansiterm/osc_string_state.go create mode 100644 deps/github.com/Azure/go-ansiterm/parser.go create mode 100644 deps/github.com/Azure/go-ansiterm/parser_action_helpers.go create mode 100644 deps/github.com/Azure/go-ansiterm/parser_actions.go create mode 100644 deps/github.com/Azure/go-ansiterm/states.go create mode 100644 deps/github.com/Azure/go-ansiterm/utilities.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/ansi.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/api.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/attr_translation.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/erase_helpers.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/scroll_helper.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/utilities.go create mode 100644 deps/github.com/Azure/go-ansiterm/winterm/win_event_handler.go delete mode 100644 deps/github.com/Azure/go-autorest/autorest/adal/msi.go delete mode 100644 deps/github.com/Azure/go-autorest/autorest/adal/msi_windows.go create mode 100644 deps/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go create mode 100644 deps/github.com/Azure/go-autorest/version/version.go create mode 100644 deps/github.com/cockroachdb/cmux/.gitignore create mode 100644 deps/github.com/cockroachdb/cmux/.travis.yml create mode 100644 deps/github.com/cockroachdb/cmux/LICENSE create mode 100644 deps/github.com/cockroachdb/cmux/README.md create mode 100644 deps/github.com/cockroachdb/cmux/buffer.go create mode 100644 deps/github.com/cockroachdb/cmux/cmux.go create mode 100644 deps/github.com/cockroachdb/cmux/matchers.go create mode 100644 deps/github.com/cockroachdb/cmux/patricia.go create mode 100644 deps/github.com/coreos/bbolt/.gitignore create mode 100644 deps/github.com/coreos/bbolt/LICENSE create mode 100644 deps/github.com/coreos/bbolt/Makefile create mode 100644 deps/github.com/coreos/bbolt/README.md create mode 100644 deps/github.com/coreos/bbolt/appveyor.yml create mode 100644 deps/github.com/coreos/bbolt/bolt_386.go create mode 100644 deps/github.com/coreos/bbolt/bolt_amd64.go create mode 100644 deps/github.com/coreos/bbolt/bolt_arm.go create mode 100644 deps/github.com/coreos/bbolt/bolt_arm64.go create mode 100644 deps/github.com/coreos/bbolt/bolt_linux.go create mode 100644 deps/github.com/coreos/bbolt/bolt_mips64x.go create mode 100644 deps/github.com/coreos/bbolt/bolt_mipsx.go create mode 100644 deps/github.com/coreos/bbolt/bolt_openbsd.go create mode 100644 deps/github.com/coreos/bbolt/bolt_ppc.go create mode 100644 deps/github.com/coreos/bbolt/bolt_ppc64.go create mode 100644 deps/github.com/coreos/bbolt/bolt_ppc64le.go create mode 100644 deps/github.com/coreos/bbolt/bolt_s390x.go create mode 100644 deps/github.com/coreos/bbolt/bolt_unix.go create mode 100644 deps/github.com/coreos/bbolt/bolt_unix_solaris.go create mode 100644 deps/github.com/coreos/bbolt/bolt_windows.go create mode 100644 deps/github.com/coreos/bbolt/boltsync_unix.go create mode 100644 deps/github.com/coreos/bbolt/bucket.go create mode 100644 deps/github.com/coreos/bbolt/cursor.go create mode 100644 deps/github.com/coreos/bbolt/db.go create mode 100644 deps/github.com/coreos/bbolt/doc.go create mode 100644 deps/github.com/coreos/bbolt/errors.go create mode 100644 deps/github.com/coreos/bbolt/freelist.go create mode 100644 deps/github.com/coreos/bbolt/node.go create mode 100644 deps/github.com/coreos/bbolt/page.go create mode 100644 deps/github.com/coreos/bbolt/tx.go create mode 100644 deps/github.com/coreos/etcd/alarm/alarms.go create mode 100644 deps/github.com/coreos/etcd/auth/doc.go create mode 100644 deps/github.com/coreos/etcd/auth/jwt.go create mode 100644 deps/github.com/coreos/etcd/auth/range_perm_cache.go create mode 100644 deps/github.com/coreos/etcd/auth/simple_token.go create mode 100644 deps/github.com/coreos/etcd/auth/store.go create mode 100644 deps/github.com/coreos/etcd/clientv3/concurrency/doc.go create mode 100644 deps/github.com/coreos/etcd/clientv3/concurrency/election.go create mode 100644 deps/github.com/coreos/etcd/clientv3/concurrency/key.go create mode 100644 deps/github.com/coreos/etcd/clientv3/concurrency/mutex.go create mode 100644 deps/github.com/coreos/etcd/clientv3/concurrency/session.go create mode 100644 deps/github.com/coreos/etcd/clientv3/concurrency/stm.go create mode 100644 deps/github.com/coreos/etcd/clientv3/namespace/doc.go create mode 100644 deps/github.com/coreos/etcd/clientv3/namespace/kv.go create mode 100644 deps/github.com/coreos/etcd/clientv3/namespace/lease.go create mode 100644 deps/github.com/coreos/etcd/clientv3/namespace/util.go create mode 100644 deps/github.com/coreos/etcd/clientv3/namespace/watch.go create mode 100644 deps/github.com/coreos/etcd/clientv3/naming/doc.go create mode 100644 deps/github.com/coreos/etcd/clientv3/naming/grpc.go create mode 100644 deps/github.com/coreos/etcd/compactor/compactor.go create mode 100644 deps/github.com/coreos/etcd/compactor/doc.go create mode 100644 deps/github.com/coreos/etcd/discovery/discovery.go create mode 100644 deps/github.com/coreos/etcd/embed/config.go create mode 100644 deps/github.com/coreos/etcd/embed/doc.go create mode 100644 deps/github.com/coreos/etcd/embed/etcd.go create mode 100644 deps/github.com/coreos/etcd/embed/serve.go create mode 100644 deps/github.com/coreos/etcd/embed/util.go create mode 100644 deps/github.com/coreos/etcd/error/error.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/capability.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/cluster.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/doc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/base.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/peer.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/capability.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/client.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/client_auth.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/doc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/http.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/errors.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/member.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v2http/metrics.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3client/doc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3election/doc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3election/election.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.pb.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.proto create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3lock/doc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.pb.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.proto create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/codec.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/header.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/metrics.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/util.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/apply.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/apply_auth.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/apply_v2.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/auth/auth.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/auth/auth_requests.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/backend.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/cluster_util.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/config.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/consistent_index.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/doc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/errors.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/etcdserverpb/gw/rpc.pb.gw.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/membership/cluster.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/membership/doc.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/membership/errors.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/membership/member.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/membership/store.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/metrics.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/quota.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/raft.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/server.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/snapshot_merge.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/stats/leader.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/stats/queue.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/stats/server.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/stats/stats.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/storage.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/util.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/v2_server.go create mode 100644 deps/github.com/coreos/etcd/etcdserver/v3_server.go create mode 100644 deps/github.com/coreos/etcd/integration/bridge.go create mode 100644 deps/github.com/coreos/etcd/integration/cluster.go create mode 100644 deps/github.com/coreos/etcd/integration/cluster_direct.go create mode 100644 deps/github.com/coreos/etcd/integration/cluster_proxy.go create mode 100644 deps/github.com/coreos/etcd/integration/doc.go create mode 100644 deps/github.com/coreos/etcd/lease/doc.go create mode 100644 deps/github.com/coreos/etcd/lease/leasehttp/doc.go create mode 100644 deps/github.com/coreos/etcd/lease/leasehttp/http.go create mode 100644 deps/github.com/coreos/etcd/lease/leasepb/lease.pb.go create mode 100644 deps/github.com/coreos/etcd/lease/leasepb/lease.proto create mode 100644 deps/github.com/coreos/etcd/lease/lessor.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/backend.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/batch_tx.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/config_default.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/config_linux.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/config_windows.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/doc.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/metrics.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/read_tx.go create mode 100644 deps/github.com/coreos/etcd/mvcc/backend/tx_buffer.go create mode 100644 deps/github.com/coreos/etcd/mvcc/doc.go create mode 100644 deps/github.com/coreos/etcd/mvcc/index.go create mode 100644 deps/github.com/coreos/etcd/mvcc/key_index.go create mode 100644 deps/github.com/coreos/etcd/mvcc/kv.go create mode 100644 deps/github.com/coreos/etcd/mvcc/kv_view.go create mode 100644 deps/github.com/coreos/etcd/mvcc/kvstore.go create mode 100644 deps/github.com/coreos/etcd/mvcc/kvstore_compaction.go create mode 100644 deps/github.com/coreos/etcd/mvcc/kvstore_txn.go create mode 100644 deps/github.com/coreos/etcd/mvcc/metrics.go create mode 100644 deps/github.com/coreos/etcd/mvcc/metrics_txn.go create mode 100644 deps/github.com/coreos/etcd/mvcc/revision.go create mode 100644 deps/github.com/coreos/etcd/mvcc/util.go create mode 100644 deps/github.com/coreos/etcd/mvcc/watchable_store.go create mode 100644 deps/github.com/coreos/etcd/mvcc/watchable_store_txn.go create mode 100644 deps/github.com/coreos/etcd/mvcc/watcher.go create mode 100644 deps/github.com/coreos/etcd/mvcc/watcher_group.go create mode 100644 deps/github.com/coreos/etcd/pkg/adt/doc.go create mode 100644 deps/github.com/coreos/etcd/pkg/adt/interval_tree.go create mode 100644 deps/github.com/coreos/etcd/pkg/contention/contention.go create mode 100644 deps/github.com/coreos/etcd/pkg/contention/doc.go create mode 100644 deps/github.com/coreos/etcd/pkg/cors/cors.go create mode 100644 deps/github.com/coreos/etcd/pkg/cpuutil/doc.go create mode 100644 deps/github.com/coreos/etcd/pkg/cpuutil/endian.go create mode 100644 deps/github.com/coreos/etcd/pkg/crc/crc.go create mode 100644 deps/github.com/coreos/etcd/pkg/debugutil/doc.go create mode 100644 deps/github.com/coreos/etcd/pkg/debugutil/pprof.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/dir_unix.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/dir_windows.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/fileutil.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/lock.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/lock_flock.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/lock_linux.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/lock_plan9.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/lock_solaris.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/lock_unix.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/lock_windows.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/preallocate.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/preallocate_darwin.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unix.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unsupported.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/purge.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/sync.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/sync_darwin.go create mode 100644 deps/github.com/coreos/etcd/pkg/fileutil/sync_linux.go create mode 100644 deps/github.com/coreos/etcd/pkg/httputil/httputil.go create mode 100644 deps/github.com/coreos/etcd/pkg/idutil/id.go create mode 100644 deps/github.com/coreos/etcd/pkg/ioutil/pagewriter.go create mode 100644 deps/github.com/coreos/etcd/pkg/ioutil/readcloser.go create mode 100644 deps/github.com/coreos/etcd/pkg/ioutil/reader.go create mode 100644 deps/github.com/coreos/etcd/pkg/ioutil/util.go create mode 100644 deps/github.com/coreos/etcd/pkg/logutil/merge_logger.go create mode 100644 deps/github.com/coreos/etcd/pkg/monotime/issue15006.s create mode 100644 deps/github.com/coreos/etcd/pkg/monotime/monotime.go create mode 100644 deps/github.com/coreos/etcd/pkg/monotime/nanotime.go create mode 100644 deps/github.com/coreos/etcd/pkg/netutil/isolate_linux.go create mode 100644 deps/github.com/coreos/etcd/pkg/netutil/isolate_stub.go create mode 100644 deps/github.com/coreos/etcd/pkg/netutil/netutil.go create mode 100644 deps/github.com/coreos/etcd/pkg/netutil/routes.go create mode 100644 deps/github.com/coreos/etcd/pkg/netutil/routes_linux.go create mode 100644 deps/github.com/coreos/etcd/pkg/pbutil/pbutil.go create mode 100644 deps/github.com/coreos/etcd/pkg/runtime/fds_linux.go create mode 100644 deps/github.com/coreos/etcd/pkg/runtime/fds_other.go create mode 100644 deps/github.com/coreos/etcd/pkg/schedule/doc.go create mode 100644 deps/github.com/coreos/etcd/pkg/schedule/schedule.go create mode 100644 deps/github.com/coreos/etcd/pkg/testutil/assert.go create mode 100644 deps/github.com/coreos/etcd/pkg/testutil/leak.go create mode 100644 deps/github.com/coreos/etcd/pkg/testutil/pauseable_handler.go create mode 100644 deps/github.com/coreos/etcd/pkg/testutil/recorder.go create mode 100644 deps/github.com/coreos/etcd/pkg/testutil/testutil.go create mode 100644 deps/github.com/coreos/etcd/pkg/wait/wait.go create mode 100644 deps/github.com/coreos/etcd/pkg/wait/wait_time.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/doc.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/auth.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/cache/store.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/cluster.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/doc.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/election.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/kv.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/leader.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/lease.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/lock.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/logger.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/metrics.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/register.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/watch.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcasts.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/watch_ranges.go create mode 100644 deps/github.com/coreos/etcd/proxy/grpcproxy/watcher.go create mode 100644 deps/github.com/coreos/etcd/raft/README.md create mode 100644 deps/github.com/coreos/etcd/raft/design.md create mode 100644 deps/github.com/coreos/etcd/raft/doc.go create mode 100644 deps/github.com/coreos/etcd/raft/log.go create mode 100644 deps/github.com/coreos/etcd/raft/log_unstable.go create mode 100644 deps/github.com/coreos/etcd/raft/logger.go create mode 100644 deps/github.com/coreos/etcd/raft/node.go create mode 100644 deps/github.com/coreos/etcd/raft/progress.go create mode 100644 deps/github.com/coreos/etcd/raft/raft.go create mode 100644 deps/github.com/coreos/etcd/raft/raftpb/raft.pb.go create mode 100644 deps/github.com/coreos/etcd/raft/raftpb/raft.proto create mode 100644 deps/github.com/coreos/etcd/raft/rawnode.go create mode 100644 deps/github.com/coreos/etcd/raft/read_only.go create mode 100644 deps/github.com/coreos/etcd/raft/status.go create mode 100644 deps/github.com/coreos/etcd/raft/storage.go create mode 100644 deps/github.com/coreos/etcd/raft/util.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/coder.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/doc.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/http.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/metrics.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/msg_codec.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/msgappv2_codec.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/peer.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/peer_status.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/pipeline.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/probing_status.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/remote.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/snapshot_sender.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/stream.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/transport.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/urlpick.go create mode 100644 deps/github.com/coreos/etcd/rafthttp/util.go create mode 100644 deps/github.com/coreos/etcd/snap/db.go create mode 100644 deps/github.com/coreos/etcd/snap/message.go create mode 100644 deps/github.com/coreos/etcd/snap/metrics.go create mode 100644 deps/github.com/coreos/etcd/snap/snappb/snap.pb.go create mode 100644 deps/github.com/coreos/etcd/snap/snappb/snap.proto create mode 100644 deps/github.com/coreos/etcd/snap/snapshotter.go create mode 100644 deps/github.com/coreos/etcd/store/doc.go create mode 100644 deps/github.com/coreos/etcd/store/event.go create mode 100644 deps/github.com/coreos/etcd/store/event_history.go create mode 100644 deps/github.com/coreos/etcd/store/event_queue.go create mode 100644 deps/github.com/coreos/etcd/store/metrics.go create mode 100644 deps/github.com/coreos/etcd/store/node.go create mode 100644 deps/github.com/coreos/etcd/store/node_extern.go create mode 100644 deps/github.com/coreos/etcd/store/stats.go create mode 100644 deps/github.com/coreos/etcd/store/store.go create mode 100644 deps/github.com/coreos/etcd/store/ttl_key_heap.go create mode 100644 deps/github.com/coreos/etcd/store/watcher.go create mode 100644 deps/github.com/coreos/etcd/store/watcher_hub.go create mode 100644 deps/github.com/coreos/etcd/wal/decoder.go create mode 100644 deps/github.com/coreos/etcd/wal/doc.go create mode 100644 deps/github.com/coreos/etcd/wal/encoder.go create mode 100644 deps/github.com/coreos/etcd/wal/file_pipeline.go create mode 100644 deps/github.com/coreos/etcd/wal/metrics.go create mode 100644 deps/github.com/coreos/etcd/wal/repair.go create mode 100644 deps/github.com/coreos/etcd/wal/util.go create mode 100644 deps/github.com/coreos/etcd/wal/wal.go create mode 100644 deps/github.com/coreos/etcd/wal/wal_unix.go create mode 100644 deps/github.com/coreos/etcd/wal/wal_windows.go create mode 100644 deps/github.com/coreos/etcd/wal/walpb/record.go create mode 100644 deps/github.com/coreos/etcd/wal/walpb/record.pb.go create mode 100644 deps/github.com/coreos/etcd/wal/walpb/record.proto delete mode 100644 deps/github.com/coreos/go-oidc/LICENSE delete mode 100644 deps/github.com/coreos/go-oidc/NOTICE delete mode 100644 deps/github.com/coreos/go-oidc/http/client.go delete mode 100644 deps/github.com/coreos/go-oidc/http/doc.go delete mode 100644 deps/github.com/coreos/go-oidc/http/http.go delete mode 100644 deps/github.com/coreos/go-oidc/http/url.go delete mode 100644 deps/github.com/coreos/go-oidc/jose/claims.go delete mode 100644 deps/github.com/coreos/go-oidc/jose/doc.go delete mode 100644 deps/github.com/coreos/go-oidc/jose/jose.go delete mode 100644 deps/github.com/coreos/go-oidc/jose/jwk.go delete mode 100644 deps/github.com/coreos/go-oidc/jose/jws.go delete mode 100644 deps/github.com/coreos/go-oidc/jose/jwt.go delete mode 100755 deps/github.com/coreos/go-oidc/jose/sig.go delete mode 100755 deps/github.com/coreos/go-oidc/jose/sig_rsa.go delete mode 100644 deps/github.com/coreos/go-oidc/key/doc.go delete mode 100644 deps/github.com/coreos/go-oidc/key/key.go delete mode 100644 deps/github.com/coreos/go-oidc/key/manager.go delete mode 100644 deps/github.com/coreos/go-oidc/key/repo.go delete mode 100644 deps/github.com/coreos/go-oidc/key/rotate.go delete mode 100644 deps/github.com/coreos/go-oidc/key/sync.go delete mode 100644 deps/github.com/coreos/go-oidc/oauth2/doc.go delete mode 100644 deps/github.com/coreos/go-oidc/oauth2/error.go delete mode 100644 deps/github.com/coreos/go-oidc/oauth2/oauth2.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/client.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/doc.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/identity.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/interface.go delete mode 100755 deps/github.com/coreos/go-oidc/oidc/key.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/provider.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/transport.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/util.go delete mode 100644 deps/github.com/coreos/go-oidc/oidc/verification.go create mode 100644 deps/github.com/coreos/go-systemd/journal/journal.go create mode 100644 deps/github.com/coreos/pkg/capnslog/README.md create mode 100644 deps/github.com/coreos/pkg/capnslog/formatters.go create mode 100644 deps/github.com/coreos/pkg/capnslog/glog_formatter.go create mode 100644 deps/github.com/coreos/pkg/capnslog/init.go create mode 100644 deps/github.com/coreos/pkg/capnslog/init_windows.go create mode 100644 deps/github.com/coreos/pkg/capnslog/journald_formatter.go create mode 100644 deps/github.com/coreos/pkg/capnslog/log_hijack.go create mode 100644 deps/github.com/coreos/pkg/capnslog/logmap.go create mode 100644 deps/github.com/coreos/pkg/capnslog/pkg_logger.go create mode 100644 deps/github.com/coreos/pkg/capnslog/syslog_formatter.go delete mode 100644 deps/github.com/coreos/pkg/health/README.md delete mode 100644 deps/github.com/coreos/pkg/health/health.go delete mode 100644 deps/github.com/coreos/pkg/httputil/README.md delete mode 100644 deps/github.com/coreos/pkg/httputil/cookie.go delete mode 100644 deps/github.com/coreos/pkg/httputil/json.go delete mode 100644 deps/github.com/coreos/pkg/timeutil/backoff.go create mode 100644 deps/github.com/dgrijalva/jwt-go/test/privateSecure.pem create mode 100644 deps/github.com/docker/docker/AUTHORS create mode 100644 deps/github.com/docker/docker/LICENSE create mode 100644 deps/github.com/docker/docker/NOTICE create mode 100644 deps/github.com/docker/docker/pkg/term/ascii.go create mode 100644 deps/github.com/docker/docker/pkg/term/proxy.go create mode 100644 deps/github.com/docker/docker/pkg/term/tc.go create mode 100644 deps/github.com/docker/docker/pkg/term/tc_solaris_cgo.go create mode 100644 deps/github.com/docker/docker/pkg/term/term.go create mode 100644 deps/github.com/docker/docker/pkg/term/term_windows.go create mode 100644 deps/github.com/docker/docker/pkg/term/termios_bsd.go create mode 100644 deps/github.com/docker/docker/pkg/term/termios_linux.go create mode 100644 deps/github.com/docker/docker/pkg/term/windows/ansi_reader.go create mode 100644 deps/github.com/docker/docker/pkg/term/windows/ansi_writer.go create mode 100644 deps/github.com/docker/docker/pkg/term/windows/console.go create mode 100644 deps/github.com/docker/docker/pkg/term/windows/windows.go create mode 100644 deps/github.com/docker/docker/pkg/term/winsize.go create mode 100644 deps/github.com/docker/docker/pkg/term/winsize_solaris_cgo.go delete mode 100644 deps/github.com/dustin/go-humanize/.gitignore create mode 100644 deps/github.com/gin-gonic/gin/.github/ISSUE_TEMPLATE.md create mode 100644 deps/github.com/gin-gonic/gin/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 deps/github.com/gin-gonic/gin/binding/example/test.pb.go delete mode 100644 deps/github.com/gin-gonic/gin/binding/example/test.proto create mode 100644 deps/github.com/gin-gonic/gin/context_17.go create mode 100644 deps/github.com/gin-gonic/gin/context_17_test.go mode change 100755 => 100644 deps/github.com/gin-gonic/gin/render/json.go create mode 100644 deps/github.com/gin-gonic/gin/render/json_17.go create mode 100644 deps/github.com/gin-gonic/gin/render/protobuf.go mode change 100755 => 100644 deps/github.com/gin-gonic/gin/render/render.go create mode 100644 deps/github.com/gin-gonic/gin/render/render_17_test.go mode change 100755 => 100644 deps/github.com/gin-gonic/gin/render/render_test.go rename deps/github.com/gin-gonic/gin/{fixtures/testdata => testdata/certificate}/cert.pem (100%) rename deps/github.com/gin-gonic/gin/{fixtures/testdata => testdata/certificate}/key.pem (100%) create mode 100644 deps/github.com/gin-gonic/gin/testdata/protoexample/test.pb.go create mode 100644 deps/github.com/gin-gonic/gin/testdata/protoexample/test.proto rename deps/github.com/gin-gonic/gin/{fixtures/basic => testdata/template}/hello.tmpl (100%) rename deps/github.com/gin-gonic/gin/{fixtures/basic => testdata/template}/raw.tmpl (100%) delete mode 100644 deps/github.com/gin-gonic/gin/vendor/vendor.json delete mode 100644 deps/github.com/go-openapi/validate/.drone.sec delete mode 100644 deps/github.com/go-openapi/validate/.drone.yml delete mode 100644 deps/github.com/go-openapi/validate/.pullapprove.yml create mode 100644 deps/github.com/go-openapi/validate/.travis.yml create mode 100755 deps/github.com/go-openapi/validate/update-fixtures.sh delete mode 100644 deps/github.com/go-webpack/webpack/.gitignore delete mode 100644 deps/github.com/go-webpack/webpack/LICENSE.txt delete mode 100644 deps/github.com/go-webpack/webpack/README.md delete mode 100644 deps/github.com/go-webpack/webpack/helper/helper.go delete mode 100644 deps/github.com/go-webpack/webpack/reader/manifest/manifest.go delete mode 100644 deps/github.com/go-webpack/webpack/reader/reader.go delete mode 100644 deps/github.com/go-webpack/webpack/reader/stats/fetch.go delete mode 100644 deps/github.com/go-webpack/webpack/reader/stats/response.go delete mode 100644 deps/github.com/go-webpack/webpack/reader/stats/stats.go delete mode 100644 deps/github.com/go-webpack/webpack/util/util.go delete mode 100644 deps/github.com/go-webpack/webpack/webpack.go create mode 100644 deps/github.com/gogo/protobuf/.gitignore create mode 100644 deps/github.com/gogo/protobuf/.mailmap create mode 100644 deps/github.com/gogo/protobuf/.travis.yml create mode 100644 deps/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS create mode 100644 deps/github.com/gogo/protobuf/Makefile create mode 100644 deps/github.com/gogo/protobuf/README create mode 100644 deps/github.com/gogo/protobuf/Readme.md create mode 100644 deps/github.com/gogo/protobuf/bench.md create mode 100644 deps/github.com/gogo/protobuf/codec/codec.go create mode 100644 deps/github.com/gogo/protobuf/codec/codec_test.go create mode 100644 deps/github.com/gogo/protobuf/conformance/Makefile rename deps/github.com/{golang/protobuf/_conformance => gogo/protobuf/conformance}/conformance.go (93%) create mode 100644 deps/github.com/gogo/protobuf/conformance/conformance.sh create mode 100644 deps/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.pb.go rename deps/github.com/{golang/protobuf/_conformance => gogo/protobuf/conformance/internal}/conformance_proto/conformance.proto (96%) create mode 100755 deps/github.com/gogo/protobuf/conformance/test.sh create mode 100644 deps/github.com/gogo/protobuf/custom_types.md create mode 100644 deps/github.com/gogo/protobuf/extensions.md create mode 100644 deps/github.com/gogo/protobuf/gogoreplace/main.go create mode 100755 deps/github.com/gogo/protobuf/install-protobuf.sh create mode 100644 deps/github.com/gogo/protobuf/io/full.go create mode 100644 deps/github.com/gogo/protobuf/io/io.go create mode 100644 deps/github.com/gogo/protobuf/io/io_test.go create mode 100644 deps/github.com/gogo/protobuf/io/uint32.go create mode 100644 deps/github.com/gogo/protobuf/io/uint32_test.go create mode 100644 deps/github.com/gogo/protobuf/io/varint.go create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb.go create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb_test.go create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go create mode 100644 deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto create mode 100644 deps/github.com/gogo/protobuf/proto/all_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/any_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/clone_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/custom_gogo.go delete mode 100644 deps/github.com/gogo/protobuf/proto/decode_gogo.go create mode 100644 deps/github.com/gogo/protobuf/proto/decode_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/discard.go create mode 100644 deps/github.com/gogo/protobuf/proto/discard_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/encode_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/equal_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/extensions_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/map_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/message_set_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/proto3_proto/Makefile create mode 100644 deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto create mode 100644 deps/github.com/gogo/protobuf/proto/proto3_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/size2_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/size_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/table_marshal.go create mode 100644 deps/github.com/gogo/protobuf/proto/table_marshal_gogo.go create mode 100644 deps/github.com/gogo/protobuf/proto/table_merge.go create mode 100644 deps/github.com/gogo/protobuf/proto/table_unmarshal.go create mode 100644 deps/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go create mode 100644 deps/github.com/gogo/protobuf/proto/test_proto/Makefile create mode 100644 deps/github.com/gogo/protobuf/proto/test_proto/deterministic.go create mode 100644 deps/github.com/gogo/protobuf/proto/test_proto/test.pb.go create mode 100644 deps/github.com/gogo/protobuf/proto/test_proto/test.proto create mode 100644 deps/github.com/gogo/protobuf/proto/text_parser_test.go create mode 100644 deps/github.com/gogo/protobuf/proto/text_test.go create mode 100644 deps/github.com/gogo/protobuf/protobuf/Makefile create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto create mode 100644 deps/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-combo/combo.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gofast/main.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/Makefile create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/doc.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap_test.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/main.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.pb.go rename deps/github.com/{golang/protobuf/protoc-gen-go/testdata => gogo/protobuf/protoc-gen-gogo/testdata/extension_base}/extension_base.proto (95%) create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.pb.go rename deps/github.com/{golang/protobuf/protoc-gen-go/testdata => gogo/protobuf/protoc-gen-gogo/testdata/extension_extra}/extension_extra.proto (95%) create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.pb.go rename deps/github.com/{golang/protobuf/protoc-gen-go/testdata => gogo/protobuf/protoc-gen-gogo/testdata/extension_user}/extension_user.proto (94%) create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.pb.go rename deps/github.com/{golang/protobuf/protoc-gen-go/testdata => gogo/protobuf/protoc-gen-gogo/testdata/grpc}/grpc.proto (96%) create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.proto create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogofast/main.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go create mode 100644 deps/github.com/gogo/protobuf/protoc-gen-gostring/main.go create mode 100644 deps/github.com/gogo/protobuf/protoc-min-version/minversion.go create mode 100644 deps/github.com/gogo/protobuf/test/.gitignore create mode 100644 deps/github.com/gogo/protobuf/test/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/asymetric-issue125/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto create mode 100644 deps/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go create mode 100644 deps/github.com/gogo/protobuf/test/asymetric-issue125/pop.go create mode 100644 deps/github.com/gogo/protobuf/test/bug_test.go create mode 100644 deps/github.com/gogo/protobuf/test/cachedsize/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.proto create mode 100644 deps/github.com/gogo/protobuf/test/cachedsize/cachedsize_test.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/casttype/casttype.proto create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto create mode 100644 deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/casttype/mytypes.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/castvalue.proto create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go create mode 100644 deps/github.com/gogo/protobuf/test/castvalue/mytypes.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/both/bug_test.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/both/t.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/both/thetest.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/both/thetest.proto create mode 100644 deps/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/both/uuid.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/marshaler/t.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto create mode 100644 deps/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/marshaler/uuid.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/unmarshaler/t.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto create mode 100644 deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go create mode 100644 deps/github.com/gogo/protobuf/test/custom-dash-type/customdash.go create mode 100644 deps/github.com/gogo/protobuf/test/custom/custom.go create mode 100644 deps/github.com/gogo/protobuf/test/custom/custom_test.go create mode 100644 deps/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go create mode 100644 deps/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go create mode 100644 deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto create mode 100644 deps/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto create mode 100644 deps/github.com/gogo/protobuf/test/dashfilename/df_test.go create mode 100644 deps/github.com/gogo/protobuf/test/dashfilename/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/data/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/data/data.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/data/data.proto create mode 100644 deps/github.com/gogo/protobuf/test/data/datapb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/defaultconflict/df.proto create mode 100644 deps/github.com/gogo/protobuf/test/defaultconflict/dg.proto create mode 100644 deps/github.com/gogo/protobuf/test/defaultconflict/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/defaultconflict/nc.proto create mode 100644 deps/github.com/gogo/protobuf/test/defaultconflict/nc_test.go create mode 100644 deps/github.com/gogo/protobuf/test/defaultconflict/ne.proto create mode 100644 deps/github.com/gogo/protobuf/test/defaultconflict/nx.proto create mode 100644 deps/github.com/gogo/protobuf/test/deterministic/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/deterministic/deterministic.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/deterministic/deterministic.proto create mode 100644 deps/github.com/gogo/protobuf/test/deterministic/deterministic_test.go create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/.gitignore create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/eb.proto create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/ec.proto create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/ec_test.go create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/ee.proto create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/em.proto create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/en.proto create mode 100644 deps/github.com/gogo/protobuf/test/embedconflict/er.proto create mode 100644 deps/github.com/gogo/protobuf/test/empty-issue70/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/empty-issue70/empty.proto create mode 100644 deps/github.com/gogo/protobuf/test/empty-issue70/empty_test.go create mode 100644 deps/github.com/gogo/protobuf/test/enumcustomname/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl/models.go create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl_all/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/enumdecl_all/models.go create mode 100644 deps/github.com/gogo/protobuf/test/enumprefix/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto create mode 100644 deps/github.com/gogo/protobuf/test/enumstringer/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto create mode 100644 deps/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/enumstringer/string.go create mode 100644 deps/github.com/gogo/protobuf/test/example/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/example/example.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/example/example.proto create mode 100644 deps/github.com/gogo/protobuf/test/example/example_test.go create mode 100644 deps/github.com/gogo/protobuf/test/example/examplepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/extension_test.go create mode 100644 deps/github.com/gogo/protobuf/test/filedotname/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/filedotname/file.dot.proto create mode 100644 deps/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/fuzztests/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/fuzztests/fuzz.proto create mode 100644 deps/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go create mode 100644 deps/github.com/gogo/protobuf/test/group/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/group/group.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/group/group.proto create mode 100644 deps/github.com/gogo/protobuf/test/group/grouppb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/apb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/b.go create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.proto create mode 100644 deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/cpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/importdedup/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/importdedup/importdedup_test.go create mode 100644 deps/github.com/gogo/protobuf/test/importdedup/proto.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/importdedup/proto.proto create mode 100644 deps/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go create mode 100644 deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.proto create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto create mode 100644 deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/indeximport-issue72/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto create mode 100644 deps/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto create mode 100644 deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/int64support/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/int64support/object.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/int64support/object.proto create mode 100644 deps/github.com/gogo/protobuf/test/int64support/object_js.go create mode 100644 deps/github.com/gogo/protobuf/test/int64support/object_js_test.go create mode 100644 deps/github.com/gogo/protobuf/test/int64support/objectpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue260/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue260/README.md create mode 100644 deps/github.com/gogo/protobuf/test/issue260/issue260.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue260/issue260.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue260/issue260pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue260/models.go create mode 100644 deps/github.com/gogo/protobuf/test/issue261/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue261/issue261.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue261/issue261.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue262/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue262/timefail.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue262/timefail.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue270/a/a1.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue270/a/a2.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue270/b/b.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue270/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/issue270/issue270_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue312/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue312/events/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue312/events/events.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue312/events/events.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue312/issue312.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue312/issue312.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue322/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue322/issue322.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue322/issue322.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue322/issue322pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue330/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue330/issue330.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue330/issue330.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue330/issue330pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue330/type.go create mode 100644 deps/github.com/gogo/protobuf/test/issue34/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue34/issue34_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue34/proto.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue34/proto.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue427/.gitignore create mode 100644 deps/github.com/gogo/protobuf/test/issue427/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue427/README.md create mode 100644 deps/github.com/gogo/protobuf/test/issue427/issue427.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue42order/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue42order/issue42.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue42order/issue42.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue42order/order_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue435/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue435/issue435.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue435/issue435.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue435/issue435pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue438/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue438/issue438.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue438/issue438.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue449/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue449/issue449.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue449/issue449.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue449/issue449_test.go create mode 100644 deps/github.com/gogo/protobuf/test/issue8/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/issue8/proto.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/issue8/proto.proto create mode 100644 deps/github.com/gogo/protobuf/test/issue8/protopb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go create mode 100644 deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/unknown_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/unknown_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/map.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/map.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in create mode 100644 deps/github.com/gogo/protobuf/test/mapdefaults/unknown_test.go.in create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/header.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto create mode 100644 deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in create mode 100644 deps/github.com/gogo/protobuf/test/merge/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/merge/merge.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/merge/merge.proto create mode 100644 deps/github.com/gogo/protobuf/test/merge/merge_test.go create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/.gitignore create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/marshal.txt create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/marshaler.txt create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/mixbench.go create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/unmarshal.txt create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt create mode 100644 deps/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt create mode 100644 deps/github.com/gogo/protobuf/test/moredefaults/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/moredefaults/md.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/moredefaults/md.proto create mode 100644 deps/github.com/gogo/protobuf/test/moredefaults/md_test.go create mode 100644 deps/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/nopackage/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/nopackage/nopackage.proto create mode 100644 deps/github.com/gogo/protobuf/test/nopackage/nopackage_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/both/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/oneof3/one.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneofembed/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto create mode 100644 deps/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/packed/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/packed/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/packed/packed.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/packed/packed.proto create mode 100644 deps/github.com/gogo/protobuf/test/packed/packed_test.go create mode 100644 deps/github.com/gogo/protobuf/test/proto3extension/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto create mode 100644 deps/github.com/gogo/protobuf/test/protosize/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/protosize/protosize.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/protosize/protosize.proto create mode 100644 deps/github.com/gogo/protobuf/test/protosize/protosize_test.go create mode 100644 deps/github.com/gogo/protobuf/test/protosize/protosizepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/registration/.gitignore create mode 100644 deps/github.com/gogo/protobuf/test/registration/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/registration/registration.proto create mode 100644 deps/github.com/gogo/protobuf/test/registration/registration_test.go.in create mode 100644 deps/github.com/gogo/protobuf/test/required/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/required/requiredexample.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/required/requiredexample.proto create mode 100644 deps/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/sizerconflict/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto create mode 100644 deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go create mode 100644 deps/github.com/gogo/protobuf/test/sizeunderscore/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto create mode 100644 deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/stdtypes/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go create mode 100644 deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto create mode 100644 deps/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/t.go create mode 100644 deps/github.com/gogo/protobuf/test/tags/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/tags/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/tags/tags.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/tags/tags.proto create mode 100644 deps/github.com/gogo/protobuf/test/tags/tags_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/doc.go create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/footer.proto create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/header.proto create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/maps.proto create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in create mode 100644 deps/github.com/gogo/protobuf/test/theproto3/theproto3.proto create mode 100644 deps/github.com/gogo/protobuf/test/thetest.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/thetest.proto create mode 100644 deps/github.com/gogo/protobuf/test/thetestpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/typedecl/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/typedecl/models.go create mode 100644 deps/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/typedecl/typedecl.proto create mode 100644 deps/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/typedecl_all/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/typedecl_all/models.go create mode 100644 deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto create mode 100644 deps/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/typedeclimport/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/typedeclimport/models.go create mode 100644 deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto create mode 100644 deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto create mode 100644 deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/both/types.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/both/types.proto create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/both/types_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/neither/types.proto create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/neither/types_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/types/types.proto create mode 100644 deps/github.com/gogo/protobuf/test/types/types_test.go.in create mode 100644 deps/github.com/gogo/protobuf/test/unmarshalmerge/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto create mode 100644 deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go create mode 100644 deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/unrecognized/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go create mode 100644 deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto create mode 100644 deps/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile create mode 100644 deps/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go create mode 100644 deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go create mode 100644 deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto create mode 100644 deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go create mode 100644 deps/github.com/gogo/protobuf/test/uuid.go create mode 100644 deps/github.com/gogo/protobuf/test/uuid_test.go create mode 100644 deps/github.com/gogo/protobuf/types/any.go create mode 100644 deps/github.com/gogo/protobuf/types/any.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/any_test.go create mode 100644 deps/github.com/gogo/protobuf/types/api.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/doc.go create mode 100644 deps/github.com/gogo/protobuf/types/duration.go create mode 100644 deps/github.com/gogo/protobuf/types/duration.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/duration_gogo.go create mode 100644 deps/github.com/gogo/protobuf/types/duration_test.go create mode 100644 deps/github.com/gogo/protobuf/types/empty.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/field_mask.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/protosize.go create mode 100644 deps/github.com/gogo/protobuf/types/source_context.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/struct.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/timestamp.go create mode 100644 deps/github.com/gogo/protobuf/types/timestamp.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/timestamp_gogo.go create mode 100644 deps/github.com/gogo/protobuf/types/timestamp_test.go create mode 100644 deps/github.com/gogo/protobuf/types/type.pb.go create mode 100644 deps/github.com/gogo/protobuf/types/wrappers.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/Makefile create mode 100644 deps/github.com/gogo/protobuf/vanity/test/doc.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/gofast/.gitignore create mode 100644 deps/github.com/gogo/protobuf/vanity/test/gogovanity.proto create mode 100644 deps/github.com/gogo/protobuf/vanity/test/proto3.proto create mode 100644 deps/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go create mode 100644 deps/github.com/gogo/protobuf/vanity/test/vanity.proto create mode 100644 deps/github.com/gogo/protobuf/vanity/test/vanity_test.go create mode 100644 deps/github.com/gogo/protobuf/version/version.go create mode 100644 deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/feature_request.md create mode 100644 deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/question.md delete mode 100644 deps/github.com/golang/protobuf/Make.protobuf delete mode 100644 deps/github.com/golang/protobuf/_conformance/Makefile delete mode 100644 deps/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go delete mode 100644 deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile delete mode 100644 deps/github.com/golang/protobuf/proto/Makefile create mode 100644 deps/github.com/golang/protobuf/proto/deprecated.go delete mode 100644 deps/github.com/golang/protobuf/proto/testdata/Makefile delete mode 100644 deps/github.com/golang/protobuf/proto/testdata/golden_test.go delete mode 100644 deps/github.com/golang/protobuf/proto/testdata/test.pb.go delete mode 100644 deps/github.com/golang/protobuf/proto/testdata/test.proto delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/Makefile delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/generator/Makefile delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden delete mode 100644 deps/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto delete mode 100755 deps/github.com/golang/protobuf/ptypes/regen.sh create mode 100644 deps/github.com/google/btree/.travis.yml create mode 100644 deps/github.com/google/btree/LICENSE create mode 100644 deps/github.com/google/btree/README.md create mode 100644 deps/github.com/google/btree/btree.go create mode 100644 deps/github.com/google/btree/btree_mem.go rename deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/{3.0.md => 3.0.0.md} (100%) create mode 100644 deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.1.md create mode 100644 deps/github.com/googleapis/gnostic/examples/v2.0/yaml/empty-v2.yaml create mode 100644 deps/github.com/googleapis/gnostic/examples/v3.0/yaml/empty-v3.yaml create mode 100644 deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/Makefile create mode 100644 deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/README.md create mode 100644 deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/gnostic-lint-responses.js create mode 100644 deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/package.json create mode 100644 deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Makefile create mode 100644 deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Package.swift create mode 100644 deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/README.md create mode 100644 deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/io.swift create mode 100644 deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/main.swift create mode 100644 deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/compile-protos create mode 100644 deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore/bookstore.go create mode 100644 deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample/sample.go create mode 100644 deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd/xkcd.go create mode 100644 deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore/bookstore.go create mode 100644 deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener/urlshortener.go create mode 100644 deps/github.com/googleapis/gnostic/test/v2.0/json/empty-v2.json create mode 100644 deps/github.com/googleapis/gnostic/test/v3.0/json/empty-v3.json delete mode 100644 deps/github.com/gosimple/slug/.gitignore delete mode 100644 deps/github.com/gosimple/slug/LICENSE delete mode 100644 deps/github.com/gosimple/slug/README.md delete mode 100644 deps/github.com/gosimple/slug/doc.go delete mode 100644 deps/github.com/gosimple/slug/languages_substitution.go delete mode 100644 deps/github.com/gosimple/slug/slug.go delete mode 100644 deps/github.com/gosimple/slug/slug_test.go create mode 100644 deps/github.com/gregjones/httpcache/.travis.yml create mode 100644 deps/github.com/gregjones/httpcache/LICENSE.txt create mode 100644 deps/github.com/gregjones/httpcache/README.md create mode 100644 deps/github.com/gregjones/httpcache/diskcache/diskcache.go create mode 100644 deps/github.com/gregjones/httpcache/httpcache.go create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignore create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.yml create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/README.md create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/client.go create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/server.go create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go create mode 100755 deps/github.com/grpc-ecosystem/go-grpc-prometheus/test_all.sh create mode 100644 deps/github.com/grpc-ecosystem/go-grpc-prometheus/util.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/convert.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/errors.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/handler.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.pb.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_jsonpb.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler_registry.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/mux.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/pattern.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto2_convert.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto_errors.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/runtime/query.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go create mode 100644 deps/github.com/grpc-ecosystem/grpc-gateway/utilities/trie.go delete mode 100644 deps/github.com/howeyc/gopass/.travis.yml delete mode 100644 deps/github.com/howeyc/gopass/LICENSE.txt delete mode 100644 deps/github.com/howeyc/gopass/OPENSOLARIS.LICENSE delete mode 100644 deps/github.com/howeyc/gopass/README.md delete mode 100644 deps/github.com/howeyc/gopass/pass.go delete mode 100644 deps/github.com/howeyc/gopass/terminal.go delete mode 100644 deps/github.com/howeyc/gopass/terminal_solaris.go create mode 100644 deps/github.com/imdario/mergo/.gitignore create mode 100644 deps/github.com/imdario/mergo/CODE_OF_CONDUCT.md delete mode 100644 deps/github.com/jinzhu/gorm/.codeclimate.yml delete mode 100644 deps/github.com/jinzhu/gorm/.github/ISSUE_TEMPLATE.md delete mode 100644 deps/github.com/jinzhu/gorm/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 deps/github.com/jinzhu/gorm/.gitignore delete mode 100644 deps/github.com/jinzhu/gorm/License delete mode 100644 deps/github.com/jinzhu/gorm/README.md delete mode 100644 deps/github.com/jinzhu/gorm/association.go delete mode 100644 deps/github.com/jinzhu/gorm/association_test.go delete mode 100644 deps/github.com/jinzhu/gorm/callback.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_create.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_delete.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_query.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_query_preload.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_row_query.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_save.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_system_test.go delete mode 100644 deps/github.com/jinzhu/gorm/callback_update.go delete mode 100644 deps/github.com/jinzhu/gorm/callbacks_test.go delete mode 100644 deps/github.com/jinzhu/gorm/create_test.go delete mode 100644 deps/github.com/jinzhu/gorm/customize_column_test.go delete mode 100644 deps/github.com/jinzhu/gorm/delete_test.go delete mode 100644 deps/github.com/jinzhu/gorm/dialect.go delete mode 100644 deps/github.com/jinzhu/gorm/dialect_common.go delete mode 100644 deps/github.com/jinzhu/gorm/dialect_mysql.go delete mode 100644 deps/github.com/jinzhu/gorm/dialect_postgres.go delete mode 100644 deps/github.com/jinzhu/gorm/dialect_sqlite3.go delete mode 100644 deps/github.com/jinzhu/gorm/dialects/mssql/mssql.go delete mode 100644 deps/github.com/jinzhu/gorm/dialects/mysql/mysql.go delete mode 100644 deps/github.com/jinzhu/gorm/dialects/postgres/postgres.go delete mode 100644 deps/github.com/jinzhu/gorm/dialects/sqlite/sqlite.go delete mode 100644 deps/github.com/jinzhu/gorm/docker-compose.yml delete mode 100644 deps/github.com/jinzhu/gorm/embedded_struct_test.go delete mode 100644 deps/github.com/jinzhu/gorm/errors.go delete mode 100644 deps/github.com/jinzhu/gorm/errors_test.go delete mode 100644 deps/github.com/jinzhu/gorm/field.go delete mode 100644 deps/github.com/jinzhu/gorm/field_test.go delete mode 100644 deps/github.com/jinzhu/gorm/interface.go delete mode 100644 deps/github.com/jinzhu/gorm/join_table_handler.go delete mode 100644 deps/github.com/jinzhu/gorm/join_table_test.go delete mode 100644 deps/github.com/jinzhu/gorm/logger.go delete mode 100644 deps/github.com/jinzhu/gorm/main.go delete mode 100644 deps/github.com/jinzhu/gorm/main_test.go delete mode 100644 deps/github.com/jinzhu/gorm/migration_test.go delete mode 100644 deps/github.com/jinzhu/gorm/model.go delete mode 100644 deps/github.com/jinzhu/gorm/model_struct.go delete mode 100644 deps/github.com/jinzhu/gorm/multi_primary_keys_test.go delete mode 100644 deps/github.com/jinzhu/gorm/pointer_test.go delete mode 100644 deps/github.com/jinzhu/gorm/polymorphic_test.go delete mode 100644 deps/github.com/jinzhu/gorm/preload_test.go delete mode 100644 deps/github.com/jinzhu/gorm/query_test.go delete mode 100644 deps/github.com/jinzhu/gorm/scaner_test.go delete mode 100644 deps/github.com/jinzhu/gorm/scope.go delete mode 100644 deps/github.com/jinzhu/gorm/scope_test.go delete mode 100644 deps/github.com/jinzhu/gorm/search.go delete mode 100644 deps/github.com/jinzhu/gorm/search_test.go delete mode 100755 deps/github.com/jinzhu/gorm/test_all.sh delete mode 100644 deps/github.com/jinzhu/gorm/update_test.go delete mode 100644 deps/github.com/jinzhu/gorm/utils.go delete mode 100644 deps/github.com/jinzhu/gorm/utils_test.go delete mode 100644 deps/github.com/jinzhu/gorm/wercker.yml delete mode 100644 deps/github.com/jinzhu/inflection/LICENSE delete mode 100644 deps/github.com/jinzhu/inflection/README.md delete mode 100644 deps/github.com/jinzhu/inflection/inflections.go delete mode 100644 deps/github.com/jinzhu/inflection/inflections_test.go delete mode 100644 deps/github.com/jinzhu/inflection/wercker.yml delete mode 100644 deps/github.com/jinzhu/now/Guardfile delete mode 100644 deps/github.com/jinzhu/now/License delete mode 100644 deps/github.com/jinzhu/now/README.md delete mode 100644 deps/github.com/jinzhu/now/main.go delete mode 100644 deps/github.com/jinzhu/now/now.go delete mode 100644 deps/github.com/jinzhu/now/now_test.go delete mode 100644 deps/github.com/jinzhu/now/wercker.yml create mode 100644 deps/github.com/json-iterator/go/adapter.go create mode 100644 deps/github.com/json-iterator/go/any.go rename deps/github.com/json-iterator/go/{feature_any_array.go => any_array.go} (100%) rename deps/github.com/json-iterator/go/{feature_any_bool.go => any_bool.go} (100%) rename deps/github.com/json-iterator/go/{feature_any_float.go => any_float.go} (100%) rename deps/github.com/json-iterator/go/{feature_any_int32.go => any_int32.go} (100%) rename deps/github.com/json-iterator/go/{feature_any_int64.go => any_int64.go} (100%) rename deps/github.com/json-iterator/go/{feature_any_invalid.go => any_invalid.go} (100%) rename deps/github.com/json-iterator/go/{feature_any_nil.go => any_nil.go} (100%) create mode 100644 deps/github.com/json-iterator/go/any_number.go rename deps/github.com/json-iterator/go/{feature_any_object.go => any_object.go} (100%) create mode 100644 deps/github.com/json-iterator/go/any_str.go rename deps/github.com/json-iterator/go/{feature_any_uint32.go => any_uint32.go} (100%) rename deps/github.com/json-iterator/go/{feature_any_uint64.go => any_uint64.go} (100%) create mode 100644 deps/github.com/json-iterator/go/config.go delete mode 100644 deps/github.com/json-iterator/go/feature_adapter.go delete mode 100644 deps/github.com/json-iterator/go/feature_any.go delete mode 100644 deps/github.com/json-iterator/go/feature_any_number.go delete mode 100644 deps/github.com/json-iterator/go/feature_any_string.go delete mode 100644 deps/github.com/json-iterator/go/feature_config.go delete mode 100644 deps/github.com/json-iterator/go/feature_iter_float.go delete mode 100644 deps/github.com/json-iterator/go/feature_iter_int.go delete mode 100644 deps/github.com/json-iterator/go/feature_iter_object.go delete mode 100644 deps/github.com/json-iterator/go/feature_json_number.go delete mode 100644 deps/github.com/json-iterator/go/feature_pool.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect_array.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect_extension.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect_map.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect_native.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect_object.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect_slice.go delete mode 100644 deps/github.com/json-iterator/go/feature_reflect_struct_decoder.go delete mode 100644 deps/github.com/json-iterator/go/feature_stream.go delete mode 100644 deps/github.com/json-iterator/go/feature_stream_float.go delete mode 100644 deps/github.com/json-iterator/go/feature_stream_int.go delete mode 100644 deps/github.com/json-iterator/go/feature_stream_string.go rename deps/github.com/json-iterator/go/{feature_iter.go => iter.go} (100%) rename deps/github.com/json-iterator/go/{feature_iter_array.go => iter_array.go} (100%) create mode 100644 deps/github.com/json-iterator/go/iter_float.go create mode 100644 deps/github.com/json-iterator/go/iter_int.go create mode 100644 deps/github.com/json-iterator/go/iter_object.go rename deps/github.com/json-iterator/go/{feature_iter_skip.go => iter_skip.go} (100%) rename deps/github.com/json-iterator/go/{feature_iter_skip_sloppy.go => iter_skip_sloppy.go} (100%) rename deps/github.com/json-iterator/go/{feature_iter_skip_strict.go => iter_skip_strict.go} (100%) rename deps/github.com/json-iterator/go/{feature_iter_string.go => iter_str.go} (100%) create mode 100644 deps/github.com/json-iterator/go/pool.go create mode 100644 deps/github.com/json-iterator/go/reflect.go create mode 100644 deps/github.com/json-iterator/go/reflect_array.go create mode 100644 deps/github.com/json-iterator/go/reflect_dynamic.go create mode 100644 deps/github.com/json-iterator/go/reflect_extension.go create mode 100644 deps/github.com/json-iterator/go/reflect_json_number.go create mode 100644 deps/github.com/json-iterator/go/reflect_json_raw_message.go create mode 100644 deps/github.com/json-iterator/go/reflect_map.go create mode 100644 deps/github.com/json-iterator/go/reflect_marshaler.go create mode 100644 deps/github.com/json-iterator/go/reflect_native.go create mode 100644 deps/github.com/json-iterator/go/reflect_optional.go create mode 100644 deps/github.com/json-iterator/go/reflect_slice.go create mode 100644 deps/github.com/json-iterator/go/reflect_struct_decoder.go create mode 100644 deps/github.com/json-iterator/go/reflect_struct_encoder.go create mode 100644 deps/github.com/json-iterator/go/stream.go create mode 100644 deps/github.com/json-iterator/go/stream_float.go create mode 100644 deps/github.com/json-iterator/go/stream_int.go create mode 100644 deps/github.com/json-iterator/go/stream_str.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/.coveralls.yml delete mode 100644 deps/github.com/microcosm-cc/bluemonday/.travis.yml delete mode 100644 deps/github.com/microcosm-cc/bluemonday/CONTRIBUTING.md delete mode 100644 deps/github.com/microcosm-cc/bluemonday/CREDITS.md delete mode 100644 deps/github.com/microcosm-cc/bluemonday/LICENSE.md delete mode 100644 deps/github.com/microcosm-cc/bluemonday/Makefile delete mode 100644 deps/github.com/microcosm-cc/bluemonday/README.md delete mode 100644 deps/github.com/microcosm-cc/bluemonday/cmd/sanitise_html_email/doc.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/cmd/sanitise_html_email/main.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/cmd/sanitise_ugc/doc.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/cmd/sanitise_ugc/main.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/doc.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/example_test.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/helpers.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/helpers_test.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/policies.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/policies_test.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/policy.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/policy_test.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/sanitize.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/sanitize_go1.8_test.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/sanitize_ltgo1.8_test.go delete mode 100644 deps/github.com/microcosm-cc/bluemonday/sanitize_test.go create mode 100644 deps/github.com/modern-go/concurrent/.gitignore create mode 100644 deps/github.com/modern-go/concurrent/.travis.yml create mode 100644 deps/github.com/modern-go/concurrent/LICENSE create mode 100644 deps/github.com/modern-go/concurrent/README.md create mode 100644 deps/github.com/modern-go/concurrent/executor.go create mode 100644 deps/github.com/modern-go/concurrent/go_above_19.go create mode 100644 deps/github.com/modern-go/concurrent/go_below_19.go create mode 100644 deps/github.com/modern-go/concurrent/log.go create mode 100755 deps/github.com/modern-go/concurrent/test.sh create mode 100644 deps/github.com/modern-go/concurrent/unbounded_executor.go create mode 100644 deps/github.com/modern-go/reflect2/.gitignore create mode 100644 deps/github.com/modern-go/reflect2/.travis.yml create mode 100644 deps/github.com/modern-go/reflect2/Gopkg.lock create mode 100644 deps/github.com/modern-go/reflect2/Gopkg.toml create mode 100644 deps/github.com/modern-go/reflect2/LICENSE create mode 100644 deps/github.com/modern-go/reflect2/README.md create mode 100644 deps/github.com/modern-go/reflect2/go_above_17.go create mode 100644 deps/github.com/modern-go/reflect2/go_above_19.go create mode 100644 deps/github.com/modern-go/reflect2/go_below_17.go create mode 100644 deps/github.com/modern-go/reflect2/go_below_19.go create mode 100644 deps/github.com/modern-go/reflect2/reflect2.go rename deps/github.com/{prometheus/procfs/fixtures/26232/cmdline => modern-go/reflect2/reflect2_amd64.s} (100%) create mode 100644 deps/github.com/modern-go/reflect2/reflect2_kind.go rename deps/github.com/{prometheus/procfs/fixtures/symlinktargets/abc => modern-go/reflect2/relfect2_386.s} (100%) rename deps/github.com/{prometheus/procfs/fixtures/symlinktargets/def => modern-go/reflect2/relfect2_amd64p32.s} (100%) rename deps/github.com/{prometheus/procfs/fixtures/symlinktargets/ghi => modern-go/reflect2/relfect2_arm.s} (100%) rename deps/github.com/{prometheus/procfs/fixtures/symlinktargets/uvw => modern-go/reflect2/relfect2_arm64.s} (100%) rename deps/github.com/{prometheus/procfs/fixtures/symlinktargets/xyz => modern-go/reflect2/relfect2_mips64x.s} (100%) create mode 100644 deps/github.com/modern-go/reflect2/relfect2_mipsx.s create mode 100644 deps/github.com/modern-go/reflect2/relfect2_ppc64x.s create mode 100644 deps/github.com/modern-go/reflect2/relfect2_s390x.s create mode 100644 deps/github.com/modern-go/reflect2/safe_field.go create mode 100644 deps/github.com/modern-go/reflect2/safe_map.go create mode 100644 deps/github.com/modern-go/reflect2/safe_slice.go create mode 100644 deps/github.com/modern-go/reflect2/safe_struct.go create mode 100644 deps/github.com/modern-go/reflect2/safe_type.go create mode 100755 deps/github.com/modern-go/reflect2/test.sh create mode 100644 deps/github.com/modern-go/reflect2/type_map.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_array.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_eface.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_field.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_iface.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_link.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_map.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_ptr.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_slice.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_struct.go create mode 100644 deps/github.com/modern-go/reflect2/unsafe_type.go create mode 100644 deps/github.com/peterbourgon/diskv/LICENSE create mode 100644 deps/github.com/peterbourgon/diskv/README.md create mode 100644 deps/github.com/peterbourgon/diskv/compression.go create mode 100644 deps/github.com/peterbourgon/diskv/diskv.go create mode 100644 deps/github.com/peterbourgon/diskv/index.go create mode 100644 deps/github.com/prometheus/client_golang/Dockerfile create mode 100644 deps/github.com/prometheus/client_golang/Makefile create mode 100644 deps/github.com/prometheus/client_golang/Makefile.common delete mode 100644 deps/github.com/prometheus/client_golang/examples/random/Dockerfile delete mode 100644 deps/github.com/prometheus/client_golang/examples/simple/Dockerfile create mode 100644 deps/github.com/prometheus/client_golang/prometheus/promauto/auto.go create mode 100644 deps/github.com/prometheus/common/config/testdata/barney-no-pass.key create mode 100644 deps/github.com/prometheus/common/config/testdata/barney.crt create mode 100644 deps/github.com/prometheus/common/config/testdata/basic-auth-password create mode 100644 deps/github.com/prometheus/common/config/testdata/bearer.token create mode 100644 deps/github.com/prometheus/common/config/testdata/http.conf.basic-auth.good.yaml create mode 100644 deps/github.com/prometheus/common/config/testdata/http.conf.basic-auth.no-password.yaml create mode 100644 deps/github.com/prometheus/common/config/testdata/http.conf.basic-auth.no-username.yaml create mode 100644 deps/github.com/prometheus/common/config/testdata/http.conf.basic-auth.too-much.bad.yaml create mode 100644 deps/github.com/prometheus/common/config/testdata/server.crt create mode 100644 deps/github.com/prometheus/common/config/testdata/server.key create mode 100644 deps/github.com/prometheus/common/config/testdata/tls-ca-chain.pem create mode 100644 deps/github.com/prometheus/procfs/.circleci/config.yml create mode 100644 deps/github.com/prometheus/procfs/.gitignore create mode 100644 deps/github.com/prometheus/procfs/fixtures.ttar delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26231/cmdline delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26231/comm delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/exe delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/fd/0 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/fd/1 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/fd/10 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/fd/2 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/fd/3 delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26231/io delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26231/limits delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26231/mountstats delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26231/net/dev delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/ns/mnt delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26231/ns/net delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26231/stat delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26232/comm delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26232/fd/0 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26232/fd/1 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26232/fd/2 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26232/fd/3 delete mode 120000 deps/github.com/prometheus/procfs/fixtures/26232/fd/4 delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26232/limits delete mode 100644 deps/github.com/prometheus/procfs/fixtures/26232/stat delete mode 100644 deps/github.com/prometheus/procfs/fixtures/584/stat delete mode 100644 deps/github.com/prometheus/procfs/fixtures/buddyinfo/short/buddyinfo delete mode 100644 deps/github.com/prometheus/procfs/fixtures/buddyinfo/sizemismatch/buddyinfo delete mode 100644 deps/github.com/prometheus/procfs/fixtures/buddyinfo/valid/buddyinfo delete mode 100644 deps/github.com/prometheus/procfs/fixtures/fs/xfs/stat delete mode 100644 deps/github.com/prometheus/procfs/fixtures/mdstat delete mode 100644 deps/github.com/prometheus/procfs/fixtures/net/dev delete mode 100644 deps/github.com/prometheus/procfs/fixtures/net/ip_vs delete mode 100644 deps/github.com/prometheus/procfs/fixtures/net/ip_vs_stats delete mode 100644 deps/github.com/prometheus/procfs/fixtures/net/rpc/nfs delete mode 100644 deps/github.com/prometheus/procfs/fixtures/net/rpc/nfsd delete mode 100644 deps/github.com/prometheus/procfs/fixtures/net/xfrm_stat delete mode 120000 deps/github.com/prometheus/procfs/fixtures/self delete mode 100644 deps/github.com/prometheus/procfs/fixtures/stat delete mode 100644 deps/github.com/prometheus/procfs/fixtures/symlinktargets/README create mode 100755 deps/github.com/prometheus/procfs/scripts/check_license.sh create mode 100644 deps/github.com/prometheus/procfs/sysfs/net_class.go create mode 100644 deps/github.com/prometheus/procfs/sysfs/net_class_test.go delete mode 100644 deps/github.com/qor/assetfs/LICENSE.txt delete mode 100644 deps/github.com/qor/assetfs/README.md delete mode 100644 deps/github.com/qor/assetfs/assetfs.go delete mode 100644 deps/github.com/qor/assetfs/filesystem.go delete mode 100644 deps/github.com/qor/qor/.babelrc delete mode 100644 deps/github.com/qor/qor/.codeclimate.yml delete mode 100644 deps/github.com/qor/qor/.csscomb.json delete mode 100644 deps/github.com/qor/qor/.csslintrc delete mode 100644 deps/github.com/qor/qor/.editorconfig delete mode 100644 deps/github.com/qor/qor/.eslintignore delete mode 100644 deps/github.com/qor/qor/.eslintrc delete mode 100644 deps/github.com/qor/qor/.gitattributes delete mode 100644 deps/github.com/qor/qor/.gitignore delete mode 100644 deps/github.com/qor/qor/.jscsrc delete mode 100644 deps/github.com/qor/qor/.jshintrc delete mode 100644 deps/github.com/qor/qor/LICENSE.txt delete mode 100644 deps/github.com/qor/qor/README.md delete mode 100644 deps/github.com/qor/qor/bower.json delete mode 100644 deps/github.com/qor/qor/config.go delete mode 100644 deps/github.com/qor/qor/context.go delete mode 100644 deps/github.com/qor/qor/errors.go delete mode 100644 deps/github.com/qor/qor/gulpfile.js delete mode 100644 deps/github.com/qor/qor/package.json delete mode 100644 deps/github.com/qor/qor/resource/crud.go delete mode 100644 deps/github.com/qor/qor/resource/meta.go delete mode 100644 deps/github.com/qor/qor/resource/meta_test.go delete mode 100644 deps/github.com/qor/qor/resource/meta_value.go delete mode 100644 deps/github.com/qor/qor/resource/processor.go delete mode 100644 deps/github.com/qor/qor/resource/resource.go delete mode 100644 deps/github.com/qor/qor/resource/schema.go delete mode 100644 deps/github.com/qor/qor/test/utils/test_db.go delete mode 100755 deps/github.com/qor/qor/test_all.sh delete mode 100755 deps/github.com/qor/qor/update_all_qor_repos.sh delete mode 100644 deps/github.com/qor/qor/utils/buffer.go delete mode 100644 deps/github.com/qor/qor/utils/meta.go delete mode 100644 deps/github.com/qor/qor/utils/params.go delete mode 100644 deps/github.com/qor/qor/utils/params_test.go delete mode 100644 deps/github.com/qor/qor/utils/utils.go delete mode 100644 deps/github.com/qor/qor/utils/utils_test.go delete mode 100644 deps/github.com/qor/qor/yarn.lock delete mode 100644 deps/github.com/qor/render/LICENSE.txt delete mode 100644 deps/github.com/qor/render/README.md delete mode 100644 deps/github.com/qor/render/assetfs/assetfs.go delete mode 100644 deps/github.com/qor/render/assetfs/filesystem.go delete mode 100644 deps/github.com/qor/render/render.go delete mode 100644 deps/github.com/qor/render/render_test.go delete mode 100644 deps/github.com/qor/render/template.go delete mode 100644 deps/github.com/qor/render/test/layouts/layout_for_test.tmpl delete mode 100644 deps/github.com/qor/render/test/test.tmpl delete mode 100644 deps/github.com/qor/render/utils.go delete mode 100644 deps/github.com/rainycape/unidecode/.gitignore delete mode 100644 deps/github.com/rainycape/unidecode/LICENSE delete mode 100644 deps/github.com/rainycape/unidecode/README.md delete mode 100644 deps/github.com/rainycape/unidecode/decode.go delete mode 100644 deps/github.com/rainycape/unidecode/make_table.go delete mode 100644 deps/github.com/rainycape/unidecode/table.go delete mode 100644 deps/github.com/rainycape/unidecode/table.txt delete mode 100644 deps/github.com/rainycape/unidecode/unidecode.go delete mode 100644 deps/github.com/rainycape/unidecode/unidecode_test.go create mode 100644 deps/github.com/rs/zerolog/binary_test.go create mode 100644 deps/github.com/rs/zerolog/cmd/lint/lint.go create mode 100644 deps/github.com/rs/zerolog/cmd/lint/readme.md create mode 100644 deps/github.com/rs/zerolog/console_test.go create mode 100644 deps/github.com/rs/zerolog/diode/diode.go create mode 100644 deps/github.com/rs/zerolog/diode/diode_example_test.go create mode 100644 deps/github.com/rs/zerolog/diode/diode_test.go create mode 100644 deps/github.com/rs/zerolog/diode/internal/diodes/README create mode 100644 deps/github.com/rs/zerolog/diode/internal/diodes/many_to_one.go create mode 100644 deps/github.com/rs/zerolog/diode/internal/diodes/one_to_one.go create mode 100644 deps/github.com/rs/zerolog/diode/internal/diodes/poller.go create mode 100644 deps/github.com/rs/zerolog/diode/internal/diodes/waiter.go create mode 100644 deps/github.com/rs/zerolog/encoder.go create mode 100644 deps/github.com/rs/zerolog/encoder_cbor.go create mode 100644 deps/github.com/rs/zerolog/encoder_json.go create mode 100644 deps/github.com/rs/zerolog/go.mod create mode 100644 deps/github.com/rs/zerolog/internal/cbor/README.md create mode 100644 deps/github.com/rs/zerolog/internal/cbor/base.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/cbor.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/decode_stream.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/decoder_test.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/examples/genLog.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/examples/makefile create mode 100644 deps/github.com/rs/zerolog/internal/cbor/string.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/string_test.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/time.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/time_test.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/types.go create mode 100644 deps/github.com/rs/zerolog/internal/cbor/types_test.go create mode 100644 deps/github.com/rs/zerolog/internal/json/bytes.go create mode 100644 deps/github.com/rs/zerolog/internal/json/bytes_test.go create mode 100644 deps/github.com/rs/zerolog/journald/journald.go create mode 100644 deps/github.com/rs/zerolog/journald/journald_test.go create mode 100644 deps/github.com/sirupsen/logrus/.gitignore create mode 100644 deps/github.com/sirupsen/logrus/.travis.yml create mode 100644 deps/github.com/sirupsen/logrus/CHANGELOG.md create mode 100644 deps/github.com/sirupsen/logrus/LICENSE create mode 100644 deps/github.com/sirupsen/logrus/README.md create mode 100644 deps/github.com/sirupsen/logrus/alt_exit.go create mode 100644 deps/github.com/sirupsen/logrus/appveyor.yml create mode 100644 deps/github.com/sirupsen/logrus/doc.go create mode 100644 deps/github.com/sirupsen/logrus/entry.go create mode 100644 deps/github.com/sirupsen/logrus/exported.go create mode 100644 deps/github.com/sirupsen/logrus/formatter.go create mode 100644 deps/github.com/sirupsen/logrus/hooks.go create mode 100644 deps/github.com/sirupsen/logrus/json_formatter.go create mode 100644 deps/github.com/sirupsen/logrus/logger.go create mode 100644 deps/github.com/sirupsen/logrus/logrus.go create mode 100644 deps/github.com/sirupsen/logrus/terminal_bsd.go create mode 100644 deps/github.com/sirupsen/logrus/terminal_linux.go create mode 100644 deps/github.com/sirupsen/logrus/text_formatter.go create mode 100644 deps/github.com/sirupsen/logrus/writer.go create mode 100644 deps/github.com/spf13/pflag/bytes.go create mode 100644 deps/github.com/spf13/pflag/bytes_test.go create mode 100644 deps/github.com/spf13/pflag/printusage_test.go create mode 100644 deps/github.com/spf13/pflag/string_to_int.go create mode 100644 deps/github.com/spf13/pflag/string_to_int_test.go create mode 100644 deps/github.com/spf13/pflag/string_to_string.go create mode 100644 deps/github.com/spf13/pflag/string_to_string_test.go rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/LICENSE (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/accessors.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/constants.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/conversions.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/doc.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/map.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/mutations.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/security.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/tests.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/type_specific_codegen.go (100%) rename deps/github.com/stretchr/{testify/vendor/github.com/stretchr => }/objx/value.go (100%) delete mode 100644 deps/github.com/stretchr/testify/LICENCE.txt delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/LICENSE delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypass.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/common.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/config.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/doc.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/dump.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/format.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew/spew.go delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/LICENSE delete mode 100644 deps/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib/difflib.go create mode 100644 deps/github.com/ugorji/go/codec/prebuild.go create mode 100755 deps/github.com/ugorji/go/codec/prebuild.sh create mode 100755 deps/github.com/ugorji/go/codec/tests.sh create mode 100644 deps/github.com/xiang90/probing/.gitignore create mode 100644 deps/github.com/xiang90/probing/LICENSE create mode 100644 deps/github.com/xiang90/probing/README.md create mode 100644 deps/github.com/xiang90/probing/prober.go create mode 100644 deps/github.com/xiang90/probing/server.go create mode 100644 deps/github.com/xiang90/probing/status.go create mode 100644 deps/golang.org/x/crypto/bcrypt/base64.go create mode 100644 deps/golang.org/x/crypto/bcrypt/bcrypt.go create mode 100644 deps/golang.org/x/crypto/blowfish/block.go create mode 100644 deps/golang.org/x/crypto/blowfish/cipher.go create mode 100644 deps/golang.org/x/crypto/blowfish/const.go delete mode 100644 deps/golang.org/x/net/.gitattributes delete mode 100644 deps/golang.org/x/net/.gitignore delete mode 100644 deps/golang.org/x/net/CONTRIBUTING.md delete mode 100644 deps/golang.org/x/net/README.md delete mode 100644 deps/golang.org/x/net/bpf/asm.go delete mode 100644 deps/golang.org/x/net/bpf/constants.go delete mode 100644 deps/golang.org/x/net/bpf/doc.go delete mode 100644 deps/golang.org/x/net/bpf/instructions.go delete mode 100644 deps/golang.org/x/net/bpf/instructions_test.go delete mode 100644 deps/golang.org/x/net/bpf/setter.go delete mode 100644 deps/golang.org/x/net/bpf/testdata/all_instructions.bpf delete mode 100644 deps/golang.org/x/net/bpf/testdata/all_instructions.txt delete mode 100644 deps/golang.org/x/net/bpf/vm.go delete mode 100644 deps/golang.org/x/net/bpf/vm_aluop_test.go delete mode 100644 deps/golang.org/x/net/bpf/vm_bpf_test.go delete mode 100644 deps/golang.org/x/net/bpf/vm_extension_test.go delete mode 100644 deps/golang.org/x/net/bpf/vm_instructions.go delete mode 100644 deps/golang.org/x/net/bpf/vm_jump_test.go delete mode 100644 deps/golang.org/x/net/bpf/vm_load_test.go delete mode 100644 deps/golang.org/x/net/bpf/vm_ret_test.go delete mode 100644 deps/golang.org/x/net/bpf/vm_scratch_test.go delete mode 100644 deps/golang.org/x/net/bpf/vm_test.go delete mode 100644 deps/golang.org/x/net/codereview.cfg delete mode 100644 deps/golang.org/x/net/context/context_test.go delete mode 100644 deps/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go delete mode 100644 deps/golang.org/x/net/context/ctxhttp/ctxhttp_pre17_test.go delete mode 100644 deps/golang.org/x/net/context/ctxhttp/ctxhttp_test.go delete mode 100644 deps/golang.org/x/net/context/withtimeout_test.go delete mode 100644 deps/golang.org/x/net/dict/dict.go delete mode 100644 deps/golang.org/x/net/dns/dnsmessage/example_test.go delete mode 100644 deps/golang.org/x/net/dns/dnsmessage/message.go delete mode 100644 deps/golang.org/x/net/dns/dnsmessage/message_test.go delete mode 100644 deps/golang.org/x/net/html/atom/atom_test.go delete mode 100644 deps/golang.org/x/net/html/atom/table_test.go delete mode 100644 deps/golang.org/x/net/html/charset/charset.go delete mode 100644 deps/golang.org/x/net/html/charset/charset_test.go delete mode 100644 deps/golang.org/x/net/html/charset/testdata/HTTP-charset.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/README delete mode 100644 deps/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html delete mode 100644 deps/golang.org/x/net/html/charset/testdata/meta-content-attribute.html delete mode 100644 deps/golang.org/x/net/html/entity_test.go delete mode 100644 deps/golang.org/x/net/html/escape_test.go delete mode 100644 deps/golang.org/x/net/html/example_test.go delete mode 100644 deps/golang.org/x/net/html/node_test.go delete mode 100644 deps/golang.org/x/net/html/parse_test.go delete mode 100644 deps/golang.org/x/net/html/render_test.go delete mode 100644 deps/golang.org/x/net/html/testdata/go1.html delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/README delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/adoption01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/adoption02.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/comments01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/doctype01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/entities01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/entities02.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/html5test-com.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/inbody01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/isindex.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/ruby.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/scriptdata01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tables01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/template.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests1.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests10.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests11.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests12.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests14.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests15.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests16.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests17.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests18.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests19.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests2.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests20.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests21.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests22.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests23.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests24.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests25.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests26.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests3.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests4.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests5.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests6.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests7.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests8.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests9.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/tricky01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/webkit01.dat delete mode 100644 deps/golang.org/x/net/html/testdata/webkit/webkit02.dat delete mode 100644 deps/golang.org/x/net/html/token_test.go delete mode 100644 deps/golang.org/x/net/http/httpguts/guts.go delete mode 100644 deps/golang.org/x/net/http/httpguts/httplex.go delete mode 100644 deps/golang.org/x/net/http/httpguts/httplex_test.go delete mode 100644 deps/golang.org/x/net/http/httpproxy/export_test.go delete mode 100644 deps/golang.org/x/net/http/httpproxy/go19_test.go delete mode 100644 deps/golang.org/x/net/http/httpproxy/proxy.go delete mode 100644 deps/golang.org/x/net/http/httpproxy/proxy_test.go delete mode 100644 deps/golang.org/x/net/http2/ciphers_test.go delete mode 100644 deps/golang.org/x/net/http2/databuffer_test.go delete mode 100644 deps/golang.org/x/net/http2/errors_test.go delete mode 100644 deps/golang.org/x/net/http2/flow_test.go delete mode 100644 deps/golang.org/x/net/http2/frame_test.go delete mode 100644 deps/golang.org/x/net/http2/go18_test.go delete mode 100644 deps/golang.org/x/net/http2/go19_test.go delete mode 100644 deps/golang.org/x/net/http2/gotrack_test.go delete mode 100644 deps/golang.org/x/net/http2/h2demo/.gitignore delete mode 100644 deps/golang.org/x/net/http2/h2demo/Dockerfile delete mode 100644 deps/golang.org/x/net/http2/h2demo/Dockerfile.0 delete mode 100644 deps/golang.org/x/net/http2/h2demo/Makefile delete mode 100644 deps/golang.org/x/net/http2/h2demo/README delete mode 100644 deps/golang.org/x/net/http2/h2demo/deployment-prod.yaml delete mode 100644 deps/golang.org/x/net/http2/h2demo/h2demo.go delete mode 100644 deps/golang.org/x/net/http2/h2demo/launch.go delete mode 100644 deps/golang.org/x/net/http2/h2demo/rootCA.key delete mode 100644 deps/golang.org/x/net/http2/h2demo/rootCA.pem delete mode 100644 deps/golang.org/x/net/http2/h2demo/rootCA.srl delete mode 100644 deps/golang.org/x/net/http2/h2demo/server.crt delete mode 100644 deps/golang.org/x/net/http2/h2demo/server.key delete mode 100644 deps/golang.org/x/net/http2/h2demo/service.yaml delete mode 100644 deps/golang.org/x/net/http2/h2demo/tmpl.go delete mode 100644 deps/golang.org/x/net/http2/h2i/README.md delete mode 100644 deps/golang.org/x/net/http2/h2i/h2i.go delete mode 100644 deps/golang.org/x/net/http2/hpack/encode_test.go delete mode 100644 deps/golang.org/x/net/http2/hpack/hpack_test.go delete mode 100644 deps/golang.org/x/net/http2/hpack/tables_test.go delete mode 100644 deps/golang.org/x/net/http2/http2_test.go delete mode 100644 deps/golang.org/x/net/http2/pipe_test.go delete mode 100644 deps/golang.org/x/net/http2/server_push_test.go delete mode 100644 deps/golang.org/x/net/http2/server_test.go delete mode 100644 deps/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml delete mode 100644 deps/golang.org/x/net/http2/transport_test.go delete mode 100644 deps/golang.org/x/net/http2/writesched_priority_test.go delete mode 100644 deps/golang.org/x/net/http2/writesched_random_test.go delete mode 100644 deps/golang.org/x/net/http2/writesched_test.go delete mode 100644 deps/golang.org/x/net/http2/z_spec_test.go delete mode 100644 deps/golang.org/x/net/icmp/diag_test.go delete mode 100644 deps/golang.org/x/net/icmp/dstunreach.go delete mode 100644 deps/golang.org/x/net/icmp/echo.go delete mode 100644 deps/golang.org/x/net/icmp/endpoint.go delete mode 100644 deps/golang.org/x/net/icmp/example_test.go delete mode 100644 deps/golang.org/x/net/icmp/extension.go delete mode 100644 deps/golang.org/x/net/icmp/extension_test.go delete mode 100644 deps/golang.org/x/net/icmp/helper_posix.go delete mode 100644 deps/golang.org/x/net/icmp/interface.go delete mode 100644 deps/golang.org/x/net/icmp/ipv4.go delete mode 100644 deps/golang.org/x/net/icmp/ipv4_test.go delete mode 100644 deps/golang.org/x/net/icmp/ipv6.go delete mode 100644 deps/golang.org/x/net/icmp/listen_posix.go delete mode 100644 deps/golang.org/x/net/icmp/listen_stub.go delete mode 100644 deps/golang.org/x/net/icmp/message.go delete mode 100644 deps/golang.org/x/net/icmp/message_test.go delete mode 100644 deps/golang.org/x/net/icmp/messagebody.go delete mode 100644 deps/golang.org/x/net/icmp/mpls.go delete mode 100644 deps/golang.org/x/net/icmp/multipart.go delete mode 100644 deps/golang.org/x/net/icmp/multipart_test.go delete mode 100644 deps/golang.org/x/net/icmp/packettoobig.go delete mode 100644 deps/golang.org/x/net/icmp/paramprob.go delete mode 100644 deps/golang.org/x/net/icmp/ping_test.go delete mode 100644 deps/golang.org/x/net/icmp/sys_freebsd.go delete mode 100644 deps/golang.org/x/net/icmp/timeexceeded.go delete mode 100644 deps/golang.org/x/net/idna/example_test.go delete mode 100644 deps/golang.org/x/net/idna/idna_test.go delete mode 100644 deps/golang.org/x/net/idna/punycode_test.go delete mode 100644 deps/golang.org/x/net/internal/iana/const.go delete mode 100644 deps/golang.org/x/net/internal/iana/gen.go delete mode 100644 deps/golang.org/x/net/internal/nettest/helper_bsd.go delete mode 100644 deps/golang.org/x/net/internal/nettest/helper_nobsd.go delete mode 100644 deps/golang.org/x/net/internal/nettest/helper_posix.go delete mode 100644 deps/golang.org/x/net/internal/nettest/helper_stub.go delete mode 100644 deps/golang.org/x/net/internal/nettest/helper_unix.go delete mode 100644 deps/golang.org/x/net/internal/nettest/helper_windows.go delete mode 100644 deps/golang.org/x/net/internal/nettest/interface.go delete mode 100644 deps/golang.org/x/net/internal/nettest/rlimit.go delete mode 100644 deps/golang.org/x/net/internal/nettest/stack.go delete mode 100644 deps/golang.org/x/net/internal/socket/cmsghdr.go delete mode 100644 deps/golang.org/x/net/internal/socket/cmsghdr_bsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/cmsghdr_stub.go delete mode 100644 deps/golang.org/x/net/internal/socket/defs_darwin.go delete mode 100644 deps/golang.org/x/net/internal/socket/defs_dragonfly.go delete mode 100644 deps/golang.org/x/net/internal/socket/defs_freebsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/defs_linux.go delete mode 100644 deps/golang.org/x/net/internal/socket/defs_netbsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/defs_openbsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/defs_solaris.go delete mode 100644 deps/golang.org/x/net/internal/socket/error_unix.go delete mode 100644 deps/golang.org/x/net/internal/socket/error_windows.go delete mode 100644 deps/golang.org/x/net/internal/socket/iovec_32bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/iovec_64bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/iovec_solaris_64bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/iovec_stub.go delete mode 100644 deps/golang.org/x/net/internal/socket/mmsghdr_stub.go delete mode 100644 deps/golang.org/x/net/internal/socket/mmsghdr_unix.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_bsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_bsdvar.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_linux.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_linux_32bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_linux_64bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_openbsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go delete mode 100644 deps/golang.org/x/net/internal/socket/msghdr_stub.go delete mode 100644 deps/golang.org/x/net/internal/socket/rawconn.go delete mode 100644 deps/golang.org/x/net/internal/socket/rawconn_mmsg.go delete mode 100644 deps/golang.org/x/net/internal/socket/rawconn_msg.go delete mode 100644 deps/golang.org/x/net/internal/socket/rawconn_nommsg.go delete mode 100644 deps/golang.org/x/net/internal/socket/rawconn_nomsg.go delete mode 100644 deps/golang.org/x/net/internal/socket/rawconn_stub.go delete mode 100644 deps/golang.org/x/net/internal/socket/reflect.go delete mode 100644 deps/golang.org/x/net/internal/socket/socket.go delete mode 100644 deps/golang.org/x/net/internal/socket/socket_go1_9_test.go delete mode 100644 deps/golang.org/x/net/internal/socket/socket_test.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_bsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_bsdvar.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_darwin.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_dragonfly.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_386.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_386.s delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_arm.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_arm64.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_mips.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_mips64.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_mips64le.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_mipsle.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_ppc64.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_ppc64le.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_s390x.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_linux_s390x.s delete mode 100644 deps/golang.org/x/net/internal/socket/sys_netbsd.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_posix.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_solaris.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_solaris_amd64.s delete mode 100644 deps/golang.org/x/net/internal/socket/sys_stub.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_unix.go delete mode 100644 deps/golang.org/x/net/internal/socket/sys_windows.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_darwin_386.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_darwin_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_darwin_arm.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_darwin_arm64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_freebsd_386.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_freebsd_arm.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_386.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_arm.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_arm64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_mips.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_mips64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_mips64le.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_mipsle.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_ppc64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_linux_s390x.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_netbsd_386.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_netbsd_arm.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_openbsd_386.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_openbsd_arm.go delete mode 100644 deps/golang.org/x/net/internal/socket/zsys_solaris_amd64.go delete mode 100644 deps/golang.org/x/net/internal/socks/client.go delete mode 100644 deps/golang.org/x/net/internal/socks/dial_test.go delete mode 100644 deps/golang.org/x/net/internal/socks/socks.go delete mode 100644 deps/golang.org/x/net/internal/sockstest/server.go delete mode 100644 deps/golang.org/x/net/internal/sockstest/server_test.go delete mode 100644 deps/golang.org/x/net/internal/timeseries/timeseries_test.go delete mode 100644 deps/golang.org/x/net/ipv4/batch.go delete mode 100644 deps/golang.org/x/net/ipv4/bpf_test.go delete mode 100644 deps/golang.org/x/net/ipv4/control.go delete mode 100644 deps/golang.org/x/net/ipv4/control_bsd.go delete mode 100644 deps/golang.org/x/net/ipv4/control_pktinfo.go delete mode 100644 deps/golang.org/x/net/ipv4/control_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/control_test.go delete mode 100644 deps/golang.org/x/net/ipv4/control_unix.go delete mode 100644 deps/golang.org/x/net/ipv4/control_windows.go delete mode 100644 deps/golang.org/x/net/ipv4/defs_darwin.go delete mode 100644 deps/golang.org/x/net/ipv4/defs_dragonfly.go delete mode 100644 deps/golang.org/x/net/ipv4/defs_freebsd.go delete mode 100644 deps/golang.org/x/net/ipv4/defs_linux.go delete mode 100644 deps/golang.org/x/net/ipv4/defs_netbsd.go delete mode 100644 deps/golang.org/x/net/ipv4/defs_openbsd.go delete mode 100644 deps/golang.org/x/net/ipv4/defs_solaris.go delete mode 100644 deps/golang.org/x/net/ipv4/dgramopt.go delete mode 100644 deps/golang.org/x/net/ipv4/doc.go delete mode 100644 deps/golang.org/x/net/ipv4/endpoint.go delete mode 100644 deps/golang.org/x/net/ipv4/example_test.go delete mode 100644 deps/golang.org/x/net/ipv4/gen.go delete mode 100644 deps/golang.org/x/net/ipv4/genericopt.go delete mode 100644 deps/golang.org/x/net/ipv4/header.go delete mode 100644 deps/golang.org/x/net/ipv4/header_test.go delete mode 100644 deps/golang.org/x/net/ipv4/helper.go delete mode 100644 deps/golang.org/x/net/ipv4/iana.go delete mode 100644 deps/golang.org/x/net/ipv4/icmp.go delete mode 100644 deps/golang.org/x/net/ipv4/icmp_linux.go delete mode 100644 deps/golang.org/x/net/ipv4/icmp_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/icmp_test.go delete mode 100644 deps/golang.org/x/net/ipv4/multicast_test.go delete mode 100644 deps/golang.org/x/net/ipv4/multicastlistener_test.go delete mode 100644 deps/golang.org/x/net/ipv4/multicastsockopt_test.go delete mode 100644 deps/golang.org/x/net/ipv4/packet.go delete mode 100644 deps/golang.org/x/net/ipv4/packet_go1_8.go delete mode 100644 deps/golang.org/x/net/ipv4/packet_go1_9.go delete mode 100644 deps/golang.org/x/net/ipv4/payload.go delete mode 100644 deps/golang.org/x/net/ipv4/payload_cmsg.go delete mode 100644 deps/golang.org/x/net/ipv4/payload_cmsg_go1_8.go delete mode 100644 deps/golang.org/x/net/ipv4/payload_cmsg_go1_9.go delete mode 100644 deps/golang.org/x/net/ipv4/payload_nocmsg.go delete mode 100644 deps/golang.org/x/net/ipv4/readwrite_go1_8_test.go delete mode 100644 deps/golang.org/x/net/ipv4/readwrite_go1_9_test.go delete mode 100644 deps/golang.org/x/net/ipv4/readwrite_test.go delete mode 100644 deps/golang.org/x/net/ipv4/sockopt.go delete mode 100644 deps/golang.org/x/net/ipv4/sockopt_posix.go delete mode 100644 deps/golang.org/x/net/ipv4/sockopt_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_asmreq.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_asmreq_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_asmreqn.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_asmreqn_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_bpf.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_bpf_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_bsd.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_darwin.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_dragonfly.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_freebsd.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_linux.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_solaris.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_ssmreq.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_ssmreq_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_stub.go delete mode 100644 deps/golang.org/x/net/ipv4/sys_windows.go delete mode 100644 deps/golang.org/x/net/ipv4/unicast_test.go delete mode 100644 deps/golang.org/x/net/ipv4/unicastsockopt_test.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_darwin.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_dragonfly.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_freebsd_386.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_freebsd_amd64.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_freebsd_arm.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_386.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_amd64.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_arm.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_arm64.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_mips.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_mips64.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_mips64le.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_mipsle.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_ppc.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_ppc64.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_ppc64le.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_linux_s390x.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_netbsd.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_openbsd.go delete mode 100644 deps/golang.org/x/net/ipv4/zsys_solaris.go delete mode 100644 deps/golang.org/x/net/ipv6/batch.go delete mode 100644 deps/golang.org/x/net/ipv6/bpf_test.go delete mode 100644 deps/golang.org/x/net/ipv6/control.go delete mode 100644 deps/golang.org/x/net/ipv6/control_rfc2292_unix.go delete mode 100644 deps/golang.org/x/net/ipv6/control_rfc3542_unix.go delete mode 100644 deps/golang.org/x/net/ipv6/control_stub.go delete mode 100644 deps/golang.org/x/net/ipv6/control_test.go delete mode 100644 deps/golang.org/x/net/ipv6/control_unix.go delete mode 100644 deps/golang.org/x/net/ipv6/control_windows.go delete mode 100644 deps/golang.org/x/net/ipv6/defs_darwin.go delete mode 100644 deps/golang.org/x/net/ipv6/defs_dragonfly.go delete mode 100644 deps/golang.org/x/net/ipv6/defs_freebsd.go delete mode 100644 deps/golang.org/x/net/ipv6/defs_linux.go delete mode 100644 deps/golang.org/x/net/ipv6/defs_netbsd.go delete mode 100644 deps/golang.org/x/net/ipv6/defs_openbsd.go delete mode 100644 deps/golang.org/x/net/ipv6/defs_solaris.go delete mode 100644 deps/golang.org/x/net/ipv6/dgramopt.go delete mode 100644 deps/golang.org/x/net/ipv6/doc.go delete mode 100644 deps/golang.org/x/net/ipv6/endpoint.go delete mode 100644 deps/golang.org/x/net/ipv6/example_test.go delete mode 100644 deps/golang.org/x/net/ipv6/gen.go delete mode 100644 deps/golang.org/x/net/ipv6/genericopt.go delete mode 100644 deps/golang.org/x/net/ipv6/header.go delete mode 100644 deps/golang.org/x/net/ipv6/header_test.go delete mode 100644 deps/golang.org/x/net/ipv6/helper.go delete mode 100644 deps/golang.org/x/net/ipv6/iana.go delete mode 100644 deps/golang.org/x/net/ipv6/icmp.go delete mode 100644 deps/golang.org/x/net/ipv6/icmp_bsd.go delete mode 100644 deps/golang.org/x/net/ipv6/icmp_linux.go delete mode 100644 deps/golang.org/x/net/ipv6/icmp_solaris.go delete mode 100644 deps/golang.org/x/net/ipv6/icmp_stub.go delete mode 100644 deps/golang.org/x/net/ipv6/icmp_test.go delete mode 100644 deps/golang.org/x/net/ipv6/icmp_windows.go delete mode 100644 deps/golang.org/x/net/ipv6/mocktransponder_test.go delete mode 100644 deps/golang.org/x/net/ipv6/multicast_test.go delete mode 100644 deps/golang.org/x/net/ipv6/multicastlistener_test.go delete mode 100644 deps/golang.org/x/net/ipv6/multicastsockopt_test.go delete mode 100644 deps/golang.org/x/net/ipv6/payload.go delete mode 100644 deps/golang.org/x/net/ipv6/payload_cmsg.go delete mode 100644 deps/golang.org/x/net/ipv6/payload_cmsg_go1_8.go delete mode 100644 deps/golang.org/x/net/ipv6/payload_cmsg_go1_9.go delete mode 100644 deps/golang.org/x/net/ipv6/payload_nocmsg.go delete mode 100644 deps/golang.org/x/net/ipv6/readwrite_go1_8_test.go delete mode 100644 deps/golang.org/x/net/ipv6/readwrite_go1_9_test.go delete mode 100644 deps/golang.org/x/net/ipv6/readwrite_test.go delete mode 100644 deps/golang.org/x/net/ipv6/sockopt.go delete mode 100644 deps/golang.org/x/net/ipv6/sockopt_posix.go delete mode 100644 deps/golang.org/x/net/ipv6/sockopt_stub.go delete mode 100644 deps/golang.org/x/net/ipv6/sockopt_test.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_asmreq.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_asmreq_stub.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_bpf.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_bpf_stub.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_bsd.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_darwin.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_freebsd.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_linux.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_solaris.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_ssmreq.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_ssmreq_stub.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_stub.go delete mode 100644 deps/golang.org/x/net/ipv6/sys_windows.go delete mode 100644 deps/golang.org/x/net/ipv6/unicast_test.go delete mode 100644 deps/golang.org/x/net/ipv6/unicastsockopt_test.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_darwin.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_dragonfly.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_freebsd_386.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_freebsd_amd64.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_freebsd_arm.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_386.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_amd64.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_arm.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_arm64.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_mips.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_mips64.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_mips64le.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_mipsle.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_ppc.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_ppc64.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_ppc64le.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_linux_s390x.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_netbsd.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_openbsd.go delete mode 100644 deps/golang.org/x/net/ipv6/zsys_solaris.go delete mode 100644 deps/golang.org/x/net/lex/httplex/httplex_test.go delete mode 100644 deps/golang.org/x/net/lif/address.go delete mode 100644 deps/golang.org/x/net/lif/address_test.go delete mode 100644 deps/golang.org/x/net/lif/binary.go delete mode 100644 deps/golang.org/x/net/lif/defs_solaris.go delete mode 100644 deps/golang.org/x/net/lif/lif.go delete mode 100644 deps/golang.org/x/net/lif/link.go delete mode 100644 deps/golang.org/x/net/lif/link_test.go delete mode 100644 deps/golang.org/x/net/lif/sys.go delete mode 100644 deps/golang.org/x/net/lif/sys_solaris_amd64.s delete mode 100644 deps/golang.org/x/net/lif/syscall.go delete mode 100644 deps/golang.org/x/net/lif/zsys_solaris_amd64.go delete mode 100644 deps/golang.org/x/net/nettest/conntest.go delete mode 100644 deps/golang.org/x/net/nettest/conntest_go16.go delete mode 100644 deps/golang.org/x/net/nettest/conntest_go17.go delete mode 100644 deps/golang.org/x/net/nettest/conntest_test.go delete mode 100644 deps/golang.org/x/net/netutil/listen.go delete mode 100644 deps/golang.org/x/net/netutil/listen_test.go delete mode 100644 deps/golang.org/x/net/proxy/direct.go delete mode 100644 deps/golang.org/x/net/proxy/per_host.go delete mode 100644 deps/golang.org/x/net/proxy/per_host_test.go delete mode 100644 deps/golang.org/x/net/proxy/proxy.go delete mode 100644 deps/golang.org/x/net/proxy/proxy_test.go delete mode 100644 deps/golang.org/x/net/proxy/socks5.go delete mode 100644 deps/golang.org/x/net/publicsuffix/gen.go delete mode 100644 deps/golang.org/x/net/publicsuffix/list.go delete mode 100644 deps/golang.org/x/net/publicsuffix/list_test.go delete mode 100644 deps/golang.org/x/net/publicsuffix/table.go delete mode 100644 deps/golang.org/x/net/publicsuffix/table_test.go delete mode 100644 deps/golang.org/x/net/route/address.go delete mode 100644 deps/golang.org/x/net/route/address_darwin_test.go delete mode 100644 deps/golang.org/x/net/route/address_test.go delete mode 100644 deps/golang.org/x/net/route/binary.go delete mode 100644 deps/golang.org/x/net/route/defs_darwin.go delete mode 100644 deps/golang.org/x/net/route/defs_dragonfly.go delete mode 100644 deps/golang.org/x/net/route/defs_freebsd.go delete mode 100644 deps/golang.org/x/net/route/defs_netbsd.go delete mode 100644 deps/golang.org/x/net/route/defs_openbsd.go delete mode 100644 deps/golang.org/x/net/route/interface.go delete mode 100644 deps/golang.org/x/net/route/interface_announce.go delete mode 100644 deps/golang.org/x/net/route/interface_classic.go delete mode 100644 deps/golang.org/x/net/route/interface_freebsd.go delete mode 100644 deps/golang.org/x/net/route/interface_multicast.go delete mode 100644 deps/golang.org/x/net/route/interface_openbsd.go delete mode 100644 deps/golang.org/x/net/route/message.go delete mode 100644 deps/golang.org/x/net/route/message_darwin_test.go delete mode 100644 deps/golang.org/x/net/route/message_freebsd_test.go delete mode 100644 deps/golang.org/x/net/route/message_test.go delete mode 100644 deps/golang.org/x/net/route/route.go delete mode 100644 deps/golang.org/x/net/route/route_classic.go delete mode 100644 deps/golang.org/x/net/route/route_openbsd.go delete mode 100644 deps/golang.org/x/net/route/route_test.go delete mode 100644 deps/golang.org/x/net/route/sys.go delete mode 100644 deps/golang.org/x/net/route/sys_darwin.go delete mode 100644 deps/golang.org/x/net/route/sys_dragonfly.go delete mode 100644 deps/golang.org/x/net/route/sys_freebsd.go delete mode 100644 deps/golang.org/x/net/route/sys_netbsd.go delete mode 100644 deps/golang.org/x/net/route/sys_openbsd.go delete mode 100644 deps/golang.org/x/net/route/syscall.go delete mode 100644 deps/golang.org/x/net/route/zsys_darwin.go delete mode 100644 deps/golang.org/x/net/route/zsys_dragonfly.go delete mode 100644 deps/golang.org/x/net/route/zsys_freebsd_386.go delete mode 100644 deps/golang.org/x/net/route/zsys_freebsd_amd64.go delete mode 100644 deps/golang.org/x/net/route/zsys_freebsd_arm.go delete mode 100644 deps/golang.org/x/net/route/zsys_netbsd.go delete mode 100644 deps/golang.org/x/net/route/zsys_openbsd.go delete mode 100644 deps/golang.org/x/net/trace/histogram_test.go delete mode 100644 deps/golang.org/x/net/trace/trace_test.go delete mode 100644 deps/golang.org/x/net/webdav/file.go delete mode 100644 deps/golang.org/x/net/webdav/file_go1.6.go delete mode 100644 deps/golang.org/x/net/webdav/file_go1.7.go delete mode 100644 deps/golang.org/x/net/webdav/file_test.go delete mode 100644 deps/golang.org/x/net/webdav/if.go delete mode 100644 deps/golang.org/x/net/webdav/if_test.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/README delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/atom_test.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/example_test.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/marshal.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/marshal_test.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/read.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/read_test.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/typeinfo.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/xml.go delete mode 100644 deps/golang.org/x/net/webdav/internal/xml/xml_test.go delete mode 100644 deps/golang.org/x/net/webdav/litmus_test_server.go delete mode 100644 deps/golang.org/x/net/webdav/lock.go delete mode 100644 deps/golang.org/x/net/webdav/lock_test.go delete mode 100644 deps/golang.org/x/net/webdav/prop.go delete mode 100644 deps/golang.org/x/net/webdav/prop_test.go delete mode 100644 deps/golang.org/x/net/webdav/webdav.go delete mode 100644 deps/golang.org/x/net/webdav/webdav_test.go delete mode 100644 deps/golang.org/x/net/webdav/xml.go delete mode 100644 deps/golang.org/x/net/webdav/xml_test.go delete mode 100644 deps/golang.org/x/net/websocket/dial_test.go delete mode 100644 deps/golang.org/x/net/websocket/exampledial_test.go delete mode 100644 deps/golang.org/x/net/websocket/examplehandler_test.go delete mode 100644 deps/golang.org/x/net/websocket/hybi_test.go delete mode 100644 deps/golang.org/x/net/websocket/websocket_test.go delete mode 100644 deps/golang.org/x/net/xsrftoken/xsrf.go delete mode 100644 deps/golang.org/x/net/xsrftoken/xsrf_test.go create mode 100644 deps/golang.org/x/tools/blog/blog_test.go create mode 100644 deps/golang.org/x/tools/cmd/godoc/goroot.go create mode 100644 deps/golang.org/x/tools/cmd/stringer/testdata/tag_main.go create mode 100644 deps/golang.org/x/tools/cmd/stringer/testdata/tag_tag.go create mode 100644 deps/golang.org/x/tools/go/callgraph/cha/testdata/issue23925.go delete mode 100644 deps/golang.org/x/tools/go/gcimporter15/testdata/versions/test.go rename deps/golang.org/x/tools/go/{loader => internal/cgo}/cgo.go (85%) rename deps/golang.org/x/tools/go/{loader => internal/cgo}/cgo_pkgconfig.go (98%) create mode 100644 deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface10.go create mode 100644 deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface11.go rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/bexport.go (92%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/bexport19_test.go (93%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/bexport_test.go (96%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/bimport.go (87%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/exportdata.go (100%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/gcimporter.go (94%) create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/gcimporter11_test.go rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/gcimporter_test.go (91%) create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/iimport.go rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/isAlias18.go (100%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/isAlias19.go (100%) create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/newInterface10.go create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/newInterface11.go rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/a.go (100%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/b.go (100%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/exports.go (100%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/issue15920.go (100%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/issue20046.go (100%) create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue25301.go rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/p.go (100%) create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test.go create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_0i.a create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_6b.a create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_999b.a create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_999i.a rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/versions/test_go1.7_0.a (100%) rename deps/golang.org/x/tools/go/{gcimporter15 => internal/gcimporter}/testdata/versions/test_go1.7_1.a (100%) create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.8_4.a create mode 100644 deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.8_5.a create mode 100644 deps/golang.org/x/tools/go/packages/doc.go create mode 100644 deps/golang.org/x/tools/go/packages/external.go create mode 100644 deps/golang.org/x/tools/go/packages/golist.go create mode 100644 deps/golang.org/x/tools/go/packages/golist_fallback.go create mode 100644 deps/golang.org/x/tools/go/packages/gopackages/main.go create mode 100644 deps/golang.org/x/tools/go/packages/packages.go create mode 100644 deps/golang.org/x/tools/go/packages/packages110_test.go create mode 100644 deps/golang.org/x/tools/go/packages/packages_test.go create mode 100644 deps/golang.org/x/tools/go/packages/stdlib_test.go create mode 100644 deps/golang.org/x/tools/godoc/dirtrees_test.go create mode 100644 deps/golang.org/x/tools/godoc/server_test.go create mode 100644 deps/golang.org/x/tools/godoc/spec_test.go create mode 100644 deps/golang.org/x/tools/godoc/static/gen_test.go create mode 100644 deps/golang.org/x/tools/godoc/static/packageroot.html create mode 100644 deps/golang.org/x/tools/godoc/versions.go create mode 100644 deps/golang.org/x/tools/godoc/versions_test.go create mode 100644 deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs_test.go create mode 100644 deps/golang.org/x/tools/godoc/vfs/os_test.go delete mode 100644 deps/golang.org/x/tools/imports/fastwalk_test.go rename deps/golang.org/x/tools/{imports => internal/fastwalk}/fastwalk.go (83%) rename deps/golang.org/x/tools/{imports => internal/fastwalk}/fastwalk_dirent_fileno.go (94%) rename deps/golang.org/x/tools/{imports => internal/fastwalk}/fastwalk_dirent_ino.go (94%) rename deps/golang.org/x/tools/{imports => internal/fastwalk}/fastwalk_portable.go (97%) create mode 100644 deps/golang.org/x/tools/internal/fastwalk/fastwalk_test.go rename deps/golang.org/x/tools/{imports => internal/fastwalk}/fastwalk_unix.go (97%) delete mode 100644 deps/golang.org/x/tools/playground/appenginevm.go create mode 100644 deps/golang.org/x/tools/refactor/eg/testdata/I.template create mode 100644 deps/golang.org/x/tools/refactor/eg/testdata/I1.go create mode 100644 deps/golang.org/x/tools/refactor/eg/testdata/I1.golden create mode 100644 deps/golang.org/x/tools/refactor/eg/testdata/J.template create mode 100644 deps/golang.org/x/tools/refactor/eg/testdata/J1.go create mode 100644 deps/golang.org/x/tools/refactor/eg/testdata/J1.golden create mode 100644 deps/k8s.io/api/Godeps/OWNERS create mode 100644 deps/k8s.io/api/SECURITY_CONTACTS delete mode 100644 deps/k8s.io/api/admission/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/admissionregistration/v1alpha1/BUILD delete mode 100644 deps/k8s.io/api/admissionregistration/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/apps/v1/BUILD delete mode 100644 deps/k8s.io/api/apps/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/apps/v1beta2/BUILD delete mode 100644 deps/k8s.io/api/authentication/v1/BUILD delete mode 100644 deps/k8s.io/api/authentication/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/authorization/v1/BUILD delete mode 100644 deps/k8s.io/api/authorization/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/autoscaling/v1/BUILD delete mode 100644 deps/k8s.io/api/autoscaling/v2beta1/BUILD delete mode 100644 deps/k8s.io/api/batch/v1/BUILD delete mode 100644 deps/k8s.io/api/batch/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/batch/v2alpha1/BUILD delete mode 100644 deps/k8s.io/api/certificates/v1beta1/BUILD create mode 100644 deps/k8s.io/api/coordination/v1beta1/doc.go create mode 100644 deps/k8s.io/api/coordination/v1beta1/generated.pb.go create mode 100644 deps/k8s.io/api/coordination/v1beta1/generated.proto create mode 100644 deps/k8s.io/api/coordination/v1beta1/register.go create mode 100644 deps/k8s.io/api/coordination/v1beta1/types.go create mode 100644 deps/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go create mode 100644 deps/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go delete mode 100644 deps/k8s.io/api/core/v1/BUILD delete mode 100644 deps/k8s.io/api/core/v1/meta.go delete mode 100644 deps/k8s.io/api/events/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/extensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/imagepolicy/v1alpha1/BUILD delete mode 100644 deps/k8s.io/api/networking/v1/BUILD delete mode 100644 deps/k8s.io/api/policy/v1beta1/BUILD delete mode 100644 deps/k8s.io/api/rbac/v1/BUILD delete mode 100644 deps/k8s.io/api/rbac/v1alpha1/BUILD delete mode 100644 deps/k8s.io/api/rbac/v1beta1/BUILD create mode 100644 deps/k8s.io/api/roundtrip_test.go delete mode 100644 deps/k8s.io/api/scheduling/v1alpha1/BUILD create mode 100644 deps/k8s.io/api/scheduling/v1beta1/doc.go create mode 100644 deps/k8s.io/api/scheduling/v1beta1/generated.pb.go create mode 100644 deps/k8s.io/api/scheduling/v1beta1/generated.proto create mode 100644 deps/k8s.io/api/scheduling/v1beta1/register.go create mode 100644 deps/k8s.io/api/scheduling/v1beta1/types.go create mode 100644 deps/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go create mode 100644 deps/k8s.io/api/scheduling/v1beta1/zz_generated.deepcopy.go delete mode 100644 deps/k8s.io/api/settings/v1alpha1/BUILD delete mode 100644 deps/k8s.io/api/storage/v1/BUILD delete mode 100644 deps/k8s.io/api/storage/v1alpha1/BUILD delete mode 100644 deps/k8s.io/api/storage/v1beta1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/Godeps/OWNERS create mode 100644 deps/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/hack/boilerplate.go.txt delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/converter.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/nop_converter.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apiserver/jsonpath_test.go delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/server.go delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/start.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.crt create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.key create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testserver.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/crdserverscheme/unstructured.go delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/features/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/features/OWNERS delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd_test.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy_test.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor_test.go create mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go delete mode 100644 deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/BUILD create mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/resources.go create mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/server.go create mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/helpers.go create mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/objectmeta_test.go create mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go create mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/table_test.go delete mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/testserver/BUILD delete mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/testserver/resources.go delete mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/testserver/start.go create mode 100644 deps/k8s.io/apiextensions-apiserver/test/integration/versioning_test.go create mode 100644 deps/k8s.io/apimachinery/Godeps/OWNERS create mode 100644 deps/k8s.io/apimachinery/SECURITY_CONTACTS create mode 100644 deps/k8s.io/apimachinery/pkg/api/apitesting/codec.go rename deps/k8s.io/apimachinery/pkg/api/{testing => apitesting}/fuzzer/fuzzer.go (100%) rename deps/k8s.io/apimachinery/pkg/api/{testing => apitesting}/fuzzer/valuefuzz.go (100%) rename deps/k8s.io/apimachinery/pkg/api/{testing => apitesting}/fuzzer/valuefuzz_test.go (100%) rename deps/k8s.io/apimachinery/pkg/api/{testing => apitesting}/roundtrip/roundtrip.go (92%) delete mode 100644 deps/k8s.io/apimachinery/pkg/api/equality/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/api/errors/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/api/meta/BUILD create mode 100644 deps/k8s.io/apimachinery/pkg/api/meta/table/table.go create mode 100644 deps/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go delete mode 100644 deps/k8s.io/apimachinery/pkg/api/meta/unstructured.go delete mode 100644 deps/k8s.io/apimachinery/pkg/api/resource/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/api/testing/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/api/testing/codec.go delete mode 100644 deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/api/testing/roundtrip/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/api/validation/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/api/validation/path/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/announced/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/doc.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/registered/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered_test.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/types.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apimachinery/types_test.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/OWNERS create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/doc.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/types.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/conversion.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/defaults.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/doc.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/register.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/config/zz_generated.deepcopy.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD create mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go create mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme/scheme.go delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/testapigroup/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/conversion/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/conversion/queryparams/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/fields/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/labels/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/BUILD create mode 100644 deps/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/schema/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing/BUILD create mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/streaming/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/serializer/yaml/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/runtime/testing/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/selection/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/test/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/types/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/cache/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/clock/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/diff/BUILD create mode 100644 deps/k8s.io/apimachinery/pkg/util/duration/duration.go create mode 100644 deps/k8s.io/apimachinery/pkg/util/duration/duration_test.go delete mode 100644 deps/k8s.io/apimachinery/pkg/util/errors/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/framer/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/httpstream/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/initialization/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/intstr/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/json/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/mergepatch/BUILD create mode 100644 deps/k8s.io/apimachinery/pkg/util/naming/from_stack.go create mode 100644 deps/k8s.io/apimachinery/pkg/util/naming/from_stack_test.go delete mode 100644 deps/k8s.io/apimachinery/pkg/util/net/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/proxy/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/rand/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/remotecommand/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/runtime/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/sets/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/sets/types/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/strategicpatch/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/strategicpatch/testing/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/uuid/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/validation/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/validation/field/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/wait/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/waitgroup/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/util/yaml/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/version/BUILD create mode 100644 deps/k8s.io/apimachinery/pkg/version/helpers.go create mode 100644 deps/k8s.io/apimachinery/pkg/version/helpers_test.go delete mode 100644 deps/k8s.io/apimachinery/pkg/watch/BUILD delete mode 100644 deps/k8s.io/apimachinery/pkg/watch/until.go delete mode 100644 deps/k8s.io/apimachinery/pkg/watch/until_test.go delete mode 100644 deps/k8s.io/apimachinery/third_party/forked/golang/json/BUILD delete mode 100644 deps/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD delete mode 100644 deps/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/admission/audit.go delete mode 100644 deps/k8s.io/apiserver/pkg/admission/configuration/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/admission/decorator.go delete mode 100644 deps/k8s.io/apiserver/pkg/admission/initializer/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/metrics/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/initialization/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/conversion.go create mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/interfaces.go create mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/admission.go create mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go create mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/admission.go create mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go create mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/attributes.go delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/conversion.go delete mode 100644 deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/doc.go delete mode 100644 deps/k8s.io/apiserver/pkg/apis/apiserver/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/apis/apiserver/install/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/install/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/doc.go create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/register.go create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/types.go create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.conversion.go create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.deepcopy.go create mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.defaults.go delete mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/apis/audit/validation/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/audit/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/audit/policy/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/authenticator/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/authenticatorfactory/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/group/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/request/anonymous/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/request/bearertoken/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/request/union/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/request/websocket/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/request/x509/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/serviceaccount/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authentication/user/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authorization/authorizer/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/authorization/path/doc.go create mode 100644 deps/k8s.io/apiserver/pkg/authorization/path/path.go delete mode 100644 deps/k8s.io/apiserver/pkg/authorization/union/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/discovery/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/filters/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/handlers/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/handlers/proxy.go delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/metrics/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/openapi/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/request/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/endpoints/request/requestcontext.go delete mode 100644 deps/k8s.io/apiserver/pkg/features/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/features/OWNERS delete mode 100644 deps/k8s.io/apiserver/pkg/registry/generic/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/registry/generic/registry/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go create mode 100644 deps/k8s.io/apiserver/pkg/registry/generic/testing/tester.go delete mode 100644 deps/k8s.io/apiserver/pkg/registry/rest/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go delete mode 100644 deps/k8s.io/apiserver/pkg/registry/rest/zz_generated.deepcopy.go delete mode 100644 deps/k8s.io/apiserver/pkg/server/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go delete mode 100644 deps/k8s.io/apiserver/pkg/server/filters/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/server/healthz/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/server/httplog/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/server/mux/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/server/options/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go create mode 100644 deps/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go delete mode 100644 deps/k8s.io/apiserver/pkg/server/resourceconfig/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/server/routes/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/server/routes/data/swagger/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/server/routes/flags.go create mode 100644 deps/k8s.io/apiserver/pkg/server/secure_serving.go delete mode 100644 deps/k8s.io/apiserver/pkg/server/serve.go delete mode 100644 deps/k8s.io/apiserver/pkg/server/storage/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/storage/BUILD rename deps/k8s.io/apiserver/pkg/storage/{ => cacher}/cacher.go (90%) rename deps/k8s.io/apiserver/pkg/storage/{ => cacher}/time_budget.go (99%) create mode 100644 deps/k8s.io/apiserver/pkg/storage/cacher/util.go rename deps/k8s.io/apiserver/pkg/storage/{ => cacher}/watch_cache.go (87%) delete mode 100644 deps/k8s.io/apiserver/pkg/storage/errors/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/doc.go create mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/etcdtest.go delete mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd/metrics/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd/testing/testingcert/certificates.go create mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go delete mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd/util/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd3/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd3/lease_manager.go delete mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/checks.go delete mode 100644 deps/k8s.io/apiserver/pkg/storage/names/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/storage/storagebackend/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD create mode 100755 deps/k8s.io/apiserver/pkg/storage/testing/OWNERS create mode 100644 deps/k8s.io/apiserver/pkg/storage/testing/doc.go create mode 100644 deps/k8s.io/apiserver/pkg/storage/testing/types.go create mode 100644 deps/k8s.io/apiserver/pkg/storage/testing/utils.go create mode 100644 deps/k8s.io/apiserver/pkg/storage/testing/zz_generated.deepcopy.go delete mode 100644 deps/k8s.io/apiserver/pkg/storage/value/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/storage/value/metrics.go create mode 100644 deps/k8s.io/apiserver/pkg/util/dryrun/dryrun.go delete mode 100644 deps/k8s.io/apiserver/pkg/util/feature/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/util/flag/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/util/flag/sectioned.go delete mode 100644 deps/k8s.io/apiserver/pkg/util/flushwriter/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/util/logs/BUILD create mode 100644 deps/k8s.io/apiserver/pkg/util/openapi/proto.go delete mode 100644 deps/k8s.io/apiserver/pkg/util/trace/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/util/webhook/BUILD delete mode 100644 deps/k8s.io/apiserver/pkg/util/wsstream/BUILD create mode 100644 deps/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go create mode 100644 deps/k8s.io/apiserver/plugin/pkg/audit/buffered/doc.go delete mode 100644 deps/k8s.io/apiserver/plugin/pkg/audit/log/BUILD create mode 100644 deps/k8s.io/apiserver/plugin/pkg/audit/truncate/doc.go create mode 100644 deps/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go delete mode 100644 deps/k8s.io/apiserver/plugin/pkg/audit/webhook/BUILD delete mode 100644 deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD delete mode 100644 deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD create mode 100644 deps/k8s.io/client-go/Godeps/OWNERS create mode 100644 deps/k8s.io/client-go/SECURITY_CONTACTS create mode 100644 deps/k8s.io/client-go/deprecated-dynamic/bad_debt.go create mode 100644 deps/k8s.io/client-go/deprecated-dynamic/client.go create mode 100644 deps/k8s.io/client-go/deprecated-dynamic/client_pool.go create mode 100644 deps/k8s.io/client-go/deprecated-dynamic/client_test.go delete mode 100644 deps/k8s.io/client-go/discovery/BUILD delete mode 100644 deps/k8s.io/client-go/discovery/cached/BUILD create mode 100644 deps/k8s.io/client-go/discovery/cached_discovery.go create mode 100644 deps/k8s.io/client-go/discovery/cached_discovery_test.go create mode 100644 deps/k8s.io/client-go/discovery/doc.go delete mode 100644 deps/k8s.io/client-go/discovery/fake/BUILD delete mode 100644 deps/k8s.io/client-go/discovery/restmapper.go delete mode 100644 deps/k8s.io/client-go/discovery/restmapper_test.go create mode 100644 deps/k8s.io/client-go/discovery/round_tripper.go create mode 100644 deps/k8s.io/client-go/discovery/round_tripper_test.go delete mode 100644 deps/k8s.io/client-go/discovery/unstructured.go delete mode 100644 deps/k8s.io/client-go/dynamic/BUILD delete mode 100644 deps/k8s.io/client-go/dynamic/client.go delete mode 100644 deps/k8s.io/client-go/dynamic/client_pool.go delete mode 100644 deps/k8s.io/client-go/dynamic/dynamic_util.go delete mode 100644 deps/k8s.io/client-go/dynamic/dynamic_util_test.go delete mode 100644 deps/k8s.io/client-go/dynamic/fake/BUILD delete mode 100644 deps/k8s.io/client-go/dynamic/fake/client.go delete mode 100644 deps/k8s.io/client-go/dynamic/fake/client_pool.go create mode 100644 deps/k8s.io/client-go/dynamic/fake/simple.go create mode 100644 deps/k8s.io/client-go/dynamic/fake/simple_test.go create mode 100644 deps/k8s.io/client-go/dynamic/interface.go create mode 100644 deps/k8s.io/client-go/dynamic/scheme.go create mode 100644 deps/k8s.io/client-go/dynamic/simple.go delete mode 100644 deps/k8s.io/client-go/examples/create-update-delete-deployment/BUILD create mode 100644 deps/k8s.io/client-go/examples/fake-client/README.md create mode 100644 deps/k8s.io/client-go/examples/fake-client/doc.go create mode 100644 deps/k8s.io/client-go/examples/fake-client/main_test.go delete mode 100644 deps/k8s.io/client-go/examples/in-cluster-client-configuration/BUILD delete mode 100644 deps/k8s.io/client-go/examples/out-of-cluster-client-configuration/BUILD delete mode 100644 deps/k8s.io/client-go/examples/workqueue/BUILD delete mode 100644 deps/k8s.io/client-go/informers/BUILD delete mode 100644 deps/k8s.io/client-go/informers/admissionregistration/BUILD delete mode 100644 deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/admissionregistration/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/apps/BUILD delete mode 100644 deps/k8s.io/client-go/informers/apps/v1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/apps/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/apps/v1beta2/BUILD delete mode 100644 deps/k8s.io/client-go/informers/autoscaling/BUILD delete mode 100644 deps/k8s.io/client-go/informers/autoscaling/v1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/autoscaling/v2beta1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/batch/BUILD delete mode 100644 deps/k8s.io/client-go/informers/batch/v1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/batch/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/batch/v2alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/certificates/BUILD delete mode 100644 deps/k8s.io/client-go/informers/certificates/v1beta1/BUILD create mode 100644 deps/k8s.io/client-go/informers/coordination/interface.go create mode 100644 deps/k8s.io/client-go/informers/coordination/v1beta1/interface.go create mode 100644 deps/k8s.io/client-go/informers/coordination/v1beta1/lease.go delete mode 100644 deps/k8s.io/client-go/informers/core/BUILD delete mode 100644 deps/k8s.io/client-go/informers/core/v1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/events/BUILD delete mode 100644 deps/k8s.io/client-go/informers/events/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/extensions/BUILD delete mode 100644 deps/k8s.io/client-go/informers/extensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/internalinterfaces/BUILD delete mode 100644 deps/k8s.io/client-go/informers/networking/BUILD delete mode 100644 deps/k8s.io/client-go/informers/networking/v1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/policy/BUILD delete mode 100644 deps/k8s.io/client-go/informers/policy/v1beta1/BUILD create mode 100644 deps/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go delete mode 100644 deps/k8s.io/client-go/informers/rbac/BUILD delete mode 100644 deps/k8s.io/client-go/informers/rbac/v1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/rbac/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/rbac/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/scheduling/BUILD delete mode 100644 deps/k8s.io/client-go/informers/scheduling/v1alpha1/BUILD create mode 100644 deps/k8s.io/client-go/informers/scheduling/v1beta1/interface.go create mode 100644 deps/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go delete mode 100644 deps/k8s.io/client-go/informers/settings/BUILD delete mode 100644 deps/k8s.io/client-go/informers/settings/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/storage/BUILD delete mode 100644 deps/k8s.io/client-go/informers/storage/v1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/storage/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/informers/storage/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/scheme/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/apps/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/batch/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/BUILD create mode 100644 deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/doc.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/generated_expansion.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/core/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD create mode 100644 deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount_expansion.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount_expansion.go delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/BUILD create mode 100644 deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/rbac/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/BUILD create mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/doc.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/generated_expansion.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go create mode 100644 deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/storage/v1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/BUILD delete mode 100644 deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/admissionregistration/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/apps/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/apps/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/apps/v1beta2/BUILD delete mode 100644 deps/k8s.io/client-go/listers/authentication/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/authentication/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/authorization/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/authorization/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/autoscaling/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/autoscaling/v2beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/batch/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/batch/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/batch/v2alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/certificates/v1beta1/BUILD create mode 100644 deps/k8s.io/client-go/listers/coordination/v1beta1/expansion_generated.go create mode 100644 deps/k8s.io/client-go/listers/coordination/v1beta1/lease.go delete mode 100644 deps/k8s.io/client-go/listers/core/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/events/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/extensions/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/networking/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/policy/v1beta1/BUILD create mode 100644 deps/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go delete mode 100644 deps/k8s.io/client-go/listers/rbac/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/rbac/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/rbac/v1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/scheduling/v1alpha1/BUILD create mode 100644 deps/k8s.io/client-go/listers/scheduling/v1beta1/expansion_generated.go create mode 100644 deps/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go delete mode 100644 deps/k8s.io/client-go/listers/settings/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/storage/v1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/storage/v1alpha1/BUILD delete mode 100644 deps/k8s.io/client-go/listers/storage/v1beta1/BUILD create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/doc.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/register.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/types.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/conversion.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/doc.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/register.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/types.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.deepcopy.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.defaults.go create mode 100644 deps/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go delete mode 100644 deps/k8s.io/client-go/pkg/version/BUILD delete mode 100644 deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/BUILD delete mode 100644 deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go delete mode 100644 deps/k8s.io/client-go/plugin/pkg/client/auth/BUILD delete mode 100644 deps/k8s.io/client-go/plugin/pkg/client/auth/azure/BUILD create mode 100644 deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go create mode 100644 deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go create mode 100755 deps/k8s.io/client-go/plugin/pkg/client/auth/exec/testdata/test-plugin.sh delete mode 100644 deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD delete mode 100644 deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/BUILD delete mode 100644 deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/BUILD delete mode 100644 deps/k8s.io/client-go/rest/BUILD delete mode 100644 deps/k8s.io/client-go/rest/fake/BUILD delete mode 100644 deps/k8s.io/client-go/rest/versions.go delete mode 100644 deps/k8s.io/client-go/rest/watch/BUILD create mode 100644 deps/k8s.io/client-go/restmapper/category_expansion.go create mode 100644 deps/k8s.io/client-go/restmapper/category_expansion_test.go create mode 100644 deps/k8s.io/client-go/restmapper/discovery.go create mode 100644 deps/k8s.io/client-go/restmapper/discovery_test.go create mode 100644 deps/k8s.io/client-go/restmapper/shortcut.go create mode 100644 deps/k8s.io/client-go/restmapper/shortcut_test.go delete mode 100644 deps/k8s.io/client-go/scale/BUILD delete mode 100644 deps/k8s.io/client-go/scale/fake/BUILD delete mode 100644 deps/k8s.io/client-go/scale/scheme/BUILD delete mode 100644 deps/k8s.io/client-go/scale/scheme/appsint/BUILD delete mode 100644 deps/k8s.io/client-go/scale/scheme/appsv1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/scale/scheme/appsv1beta2/BUILD delete mode 100644 deps/k8s.io/client-go/scale/scheme/autoscalingv1/BUILD delete mode 100644 deps/k8s.io/client-go/scale/scheme/extensionsint/BUILD delete mode 100644 deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/BUILD delete mode 100644 deps/k8s.io/client-go/testing/BUILD delete mode 100644 deps/k8s.io/client-go/third_party/forked/golang/template/BUILD delete mode 100644 deps/k8s.io/client-go/tools/auth/BUILD rename deps/k8s.io/client-go/tools/bootstrap/token/{api => }/OWNERS (100%) delete mode 100644 deps/k8s.io/client-go/tools/bootstrap/token/api/BUILD delete mode 100644 deps/k8s.io/client-go/tools/bootstrap/token/util/BUILD delete mode 100644 deps/k8s.io/client-go/tools/cache/BUILD delete mode 100644 deps/k8s.io/client-go/tools/cache/testing/BUILD delete mode 100644 deps/k8s.io/client-go/tools/clientcmd/BUILD delete mode 100644 deps/k8s.io/client-go/tools/clientcmd/api/BUILD delete mode 100644 deps/k8s.io/client-go/tools/clientcmd/api/latest/BUILD delete mode 100644 deps/k8s.io/client-go/tools/clientcmd/api/v1/BUILD delete mode 100644 deps/k8s.io/client-go/tools/leaderelection/BUILD delete mode 100644 deps/k8s.io/client-go/tools/leaderelection/resourcelock/BUILD delete mode 100644 deps/k8s.io/client-go/tools/metrics/BUILD delete mode 100644 deps/k8s.io/client-go/tools/pager/BUILD delete mode 100644 deps/k8s.io/client-go/tools/portforward/BUILD delete mode 100644 deps/k8s.io/client-go/tools/record/BUILD delete mode 100644 deps/k8s.io/client-go/tools/reference/BUILD create mode 100644 deps/k8s.io/client-go/tools/reference/ref_test.go delete mode 100644 deps/k8s.io/client-go/tools/remotecommand/BUILD create mode 100644 deps/k8s.io/client-go/tools/watch/informerwatcher.go create mode 100644 deps/k8s.io/client-go/tools/watch/informerwatcher_test.go create mode 100644 deps/k8s.io/client-go/tools/watch/until.go create mode 100644 deps/k8s.io/client-go/tools/watch/until_test.go delete mode 100644 deps/k8s.io/client-go/transport/BUILD delete mode 100644 deps/k8s.io/client-go/transport/spdy/BUILD delete mode 100644 deps/k8s.io/client-go/util/buffer/BUILD delete mode 100644 deps/k8s.io/client-go/util/cert/BUILD delete mode 100644 deps/k8s.io/client-go/util/cert/triple/BUILD delete mode 100644 deps/k8s.io/client-go/util/certificate/BUILD delete mode 100644 deps/k8s.io/client-go/util/certificate/csr/BUILD create mode 100644 deps/k8s.io/client-go/util/connrotation/connrotation.go create mode 100644 deps/k8s.io/client-go/util/connrotation/connrotation_test.go delete mode 100644 deps/k8s.io/client-go/util/exec/BUILD delete mode 100644 deps/k8s.io/client-go/util/flowcontrol/BUILD delete mode 100644 deps/k8s.io/client-go/util/homedir/BUILD delete mode 100644 deps/k8s.io/client-go/util/integer/BUILD delete mode 100644 deps/k8s.io/client-go/util/jsonpath/BUILD delete mode 100644 deps/k8s.io/client-go/util/retry/BUILD delete mode 100644 deps/k8s.io/client-go/util/testing/BUILD delete mode 100644 deps/k8s.io/client-go/util/workqueue/BUILD create mode 100644 deps/k8s.io/code-generator/Godeps/OWNERS create mode 100644 deps/k8s.io/code-generator/SECURITY_CONTACTS create mode 100644 deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.defaults.go create mode 100644 deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.defaults.go create mode 100644 deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go create mode 100644 deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go create mode 100644 deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/clustertesttype.go create mode 100644 deps/k8s.io/code-generator/_examples/crd/listers/example/v1/clustertesttype.go delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/args/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/generators/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/generators/fake/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/generators/util/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/path/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/client-gen/types/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/conversion-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/conversion-gen/args/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/conversion-gen/generators/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/deepcopy-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/deepcopy-gen/args/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/defaulter-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/defaulter-gen/args/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/go-to-protobuf/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/import-boss/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/informer-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/informer-gen/args/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/informer-gen/generators/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/lister-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/lister-gen/args/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/lister-gen/generators/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/openapi-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/cmd/openapi-gen/args/BUILD create mode 100644 deps/k8s.io/code-generator/cmd/register-gen/args/args.go create mode 100644 deps/k8s.io/code-generator/cmd/register-gen/generators/packages.go create mode 100644 deps/k8s.io/code-generator/cmd/register-gen/generators/register_external.go create mode 100644 deps/k8s.io/code-generator/cmd/register-gen/main.go delete mode 100644 deps/k8s.io/code-generator/cmd/set-gen/BUILD delete mode 100644 deps/k8s.io/code-generator/hack/BUILD delete mode 100644 deps/k8s.io/code-generator/pkg/util/BUILD delete mode 100644 deps/k8s.io/code-generator/third_party/forked/golang/reflect/BUILD create mode 100644 deps/k8s.io/gengo/CONTRIBUTING.md create mode 100644 deps/k8s.io/gengo/SECURITY_CONTACTS create mode 100644 deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/doc.go create mode 100644 deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/zz_generated.go create mode 100644 deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interface_fuzzer.go create mode 100644 deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/output_test.go create mode 100644 deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/reflect_deepcopy.go create mode 100644 deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/value_fuzzer.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/.gitignore delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/.import-restrictions delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/OWNERS delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/build-image/Dockerfile delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/main.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/cmd.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/generator.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/import_tracker.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer_test.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/package.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/parser.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/tags.go delete mode 100644 deps/k8s.io/gengo/examples/go-to-protobuf/protoc-gen-gogo/main.go create mode 100644 deps/k8s.io/kube-openapi/CONTRIBUTING.md create mode 100644 deps/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go create mode 100644 deps/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go delete mode 100644 deps/k8s.io/kube-openapi/example/openapi-gen/main.go create mode 100644 deps/k8s.io/kube-openapi/pkg/generators/api_linter.go create mode 100644 deps/k8s.io/kube-openapi/pkg/generators/extension.go create mode 100644 deps/k8s.io/kube-openapi/pkg/generators/extension_test.go create mode 100644 deps/k8s.io/kube-openapi/pkg/generators/rules/doc.go create mode 100644 deps/k8s.io/kube-openapi/pkg/generators/rules/names_match.go create mode 100644 deps/k8s.io/kube-openapi/pkg/generators/rules/names_match_test.go create mode 100644 deps/k8s.io/kube-openapi/pkg/handler/handler_test.go create mode 100644 deps/k8s.io/kube-openapi/pkg/idl/doc.go create mode 100644 deps/k8s.io/kube-openapi/pkg/idl/listtype_test.go create mode 100644 deps/k8s.io/kube-openapi/pkg/idl/maptype_test.go create mode 100644 deps/k8s.io/kube-openapi/pkg/idl/structtype_test.go rename deps/k8s.io/kube-openapi/pkg/util/proto/{testing => testdata}/swagger.json (99%) create mode 100644 deps/k8s.io/kube-openapi/pkg/util/proto/testdata/swagger_next.json create mode 100644 deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_suite_test.go create mode 100644 deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_test.go create mode 100644 deps/k8s.io/kube-openapi/pkg/util/sets/empty.go create mode 100644 deps/k8s.io/kube-openapi/pkg/util/sets/string.go create mode 100644 deps/k8s.io/kube-openapi/pkg/util/util_test.go create mode 100644 deps/k8s.io/kube-openapi/test/integration/README.md create mode 100644 deps/k8s.io/kube-openapi/test/integration/builder/main.go create mode 100644 deps/k8s.io/kube-openapi/test/integration/integration_suite_test.go create mode 100644 deps/k8s.io/kube-openapi/test/integration/pkg/generated/openapi_generated.go create mode 100644 deps/k8s.io/kube-openapi/test/integration/testdata/golden.json create mode 100644 deps/k8s.io/kube-openapi/test/integration/testdata/listtype/atomic-list.go create mode 100644 deps/k8s.io/kube-openapi/test/integration/testdata/listtype/map-list.go create mode 100644 deps/k8s.io/kube-openapi/test/integration/testdata/listtype/set-list.go diff --git a/Makefile b/Makefile index e1cf4915b..9b1f5479f 100644 --- a/Makefile +++ b/Makefile @@ -162,6 +162,8 @@ update-vendor: github.com/coreos/go-semver/semver \ github.com/dchest/uniuri \ github.com/dgrijalva/jwt-go \ + github.com/gin-gonic/gin \ + github.com/jessevdk/go-assets-builder \ github.com/julienschmidt/httprouter \ github.com/pkg/errors \ github.com/prometheus/client_golang/prometheus \ @@ -171,6 +173,7 @@ update-vendor: github.com/stretchr/testify @$(PULSAR) go flatten -V $(VENDORDIR) $(VENDORDIR) @${MAKE} -B -s clean + # Manually restore arangosync vendor with: git checkout deps/github.com/arangodb/arangosync .PHONY: update-generated update-generated: $(GOBUILDDIR) diff --git a/deps/github.com/Azure/go-ansiterm/LICENSE b/deps/github.com/Azure/go-ansiterm/LICENSE new file mode 100644 index 000000000..e3d9a64d1 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/github.com/Azure/go-ansiterm/README.md b/deps/github.com/Azure/go-ansiterm/README.md new file mode 100644 index 000000000..261c041e7 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/README.md @@ -0,0 +1,12 @@ +# go-ansiterm + +This is a cross platform Ansi Terminal Emulation library. It reads a stream of Ansi characters and produces the appropriate function calls. The results of the function calls are platform dependent. + +For example the parser might receive "ESC, [, A" as a stream of three characters. This is the code for Cursor Up (http://www.vt100.net/docs/vt510-rm/CUU). The parser then calls the cursor up function (CUU()) on an event handler. The event handler determines what platform specific work must be done to cause the cursor to move up one position. + +The parser (parser.go) is a partial implementation of this state machine (http://vt100.net/emu/vt500_parser.png). There are also two event handler implementations, one for tests (test_event_handler.go) to validate that the expected events are being produced and called, the other is a Windows implementation (winterm/win_event_handler.go). + +See parser_test.go for examples exercising the state machine and generating appropriate function calls. + +----- +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/deps/github.com/Azure/go-ansiterm/constants.go b/deps/github.com/Azure/go-ansiterm/constants.go new file mode 100644 index 000000000..96504a33b --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/constants.go @@ -0,0 +1,188 @@ +package ansiterm + +const LogEnv = "DEBUG_TERMINAL" + +// ANSI constants +// References: +// -- http://www.ecma-international.org/publications/standards/Ecma-048.htm +// -- http://man7.org/linux/man-pages/man4/console_codes.4.html +// -- http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html +// -- http://en.wikipedia.org/wiki/ANSI_escape_code +// -- http://vt100.net/emu/dec_ansi_parser +// -- http://vt100.net/emu/vt500_parser.svg +// -- http://invisible-island.net/xterm/ctlseqs/ctlseqs.html +// -- http://www.inwap.com/pdp10/ansicode.txt +const ( + // ECMA-48 Set Graphics Rendition + // Note: + // -- Constants leading with an underscore (e.g., _ANSI_xxx) are unsupported or reserved + // -- Fonts could possibly be supported via SetCurrentConsoleFontEx + // -- Windows does not expose the per-window cursor (i.e., caret) blink times + ANSI_SGR_RESET = 0 + ANSI_SGR_BOLD = 1 + ANSI_SGR_DIM = 2 + _ANSI_SGR_ITALIC = 3 + ANSI_SGR_UNDERLINE = 4 + _ANSI_SGR_BLINKSLOW = 5 + _ANSI_SGR_BLINKFAST = 6 + ANSI_SGR_REVERSE = 7 + _ANSI_SGR_INVISIBLE = 8 + _ANSI_SGR_LINETHROUGH = 9 + _ANSI_SGR_FONT_00 = 10 + _ANSI_SGR_FONT_01 = 11 + _ANSI_SGR_FONT_02 = 12 + _ANSI_SGR_FONT_03 = 13 + _ANSI_SGR_FONT_04 = 14 + _ANSI_SGR_FONT_05 = 15 + _ANSI_SGR_FONT_06 = 16 + _ANSI_SGR_FONT_07 = 17 + _ANSI_SGR_FONT_08 = 18 + _ANSI_SGR_FONT_09 = 19 + _ANSI_SGR_FONT_10 = 20 + _ANSI_SGR_DOUBLEUNDERLINE = 21 + ANSI_SGR_BOLD_DIM_OFF = 22 + _ANSI_SGR_ITALIC_OFF = 23 + ANSI_SGR_UNDERLINE_OFF = 24 + _ANSI_SGR_BLINK_OFF = 25 + _ANSI_SGR_RESERVED_00 = 26 + ANSI_SGR_REVERSE_OFF = 27 + _ANSI_SGR_INVISIBLE_OFF = 28 + _ANSI_SGR_LINETHROUGH_OFF = 29 + ANSI_SGR_FOREGROUND_BLACK = 30 + ANSI_SGR_FOREGROUND_RED = 31 + ANSI_SGR_FOREGROUND_GREEN = 32 + ANSI_SGR_FOREGROUND_YELLOW = 33 + ANSI_SGR_FOREGROUND_BLUE = 34 + ANSI_SGR_FOREGROUND_MAGENTA = 35 + ANSI_SGR_FOREGROUND_CYAN = 36 + ANSI_SGR_FOREGROUND_WHITE = 37 + _ANSI_SGR_RESERVED_01 = 38 + ANSI_SGR_FOREGROUND_DEFAULT = 39 + ANSI_SGR_BACKGROUND_BLACK = 40 + ANSI_SGR_BACKGROUND_RED = 41 + ANSI_SGR_BACKGROUND_GREEN = 42 + ANSI_SGR_BACKGROUND_YELLOW = 43 + ANSI_SGR_BACKGROUND_BLUE = 44 + ANSI_SGR_BACKGROUND_MAGENTA = 45 + ANSI_SGR_BACKGROUND_CYAN = 46 + ANSI_SGR_BACKGROUND_WHITE = 47 + _ANSI_SGR_RESERVED_02 = 48 + ANSI_SGR_BACKGROUND_DEFAULT = 49 + // 50 - 65: Unsupported + + ANSI_MAX_CMD_LENGTH = 4096 + + MAX_INPUT_EVENTS = 128 + DEFAULT_WIDTH = 80 + DEFAULT_HEIGHT = 24 + + ANSI_BEL = 0x07 + ANSI_BACKSPACE = 0x08 + ANSI_TAB = 0x09 + ANSI_LINE_FEED = 0x0A + ANSI_VERTICAL_TAB = 0x0B + ANSI_FORM_FEED = 0x0C + ANSI_CARRIAGE_RETURN = 0x0D + ANSI_ESCAPE_PRIMARY = 0x1B + ANSI_ESCAPE_SECONDARY = 0x5B + ANSI_OSC_STRING_ENTRY = 0x5D + ANSI_COMMAND_FIRST = 0x40 + ANSI_COMMAND_LAST = 0x7E + DCS_ENTRY = 0x90 + CSI_ENTRY = 0x9B + OSC_STRING = 0x9D + ANSI_PARAMETER_SEP = ";" + ANSI_CMD_G0 = '(' + ANSI_CMD_G1 = ')' + ANSI_CMD_G2 = '*' + ANSI_CMD_G3 = '+' + ANSI_CMD_DECPNM = '>' + ANSI_CMD_DECPAM = '=' + ANSI_CMD_OSC = ']' + ANSI_CMD_STR_TERM = '\\' + + KEY_CONTROL_PARAM_2 = ";2" + KEY_CONTROL_PARAM_3 = ";3" + KEY_CONTROL_PARAM_4 = ";4" + KEY_CONTROL_PARAM_5 = ";5" + KEY_CONTROL_PARAM_6 = ";6" + KEY_CONTROL_PARAM_7 = ";7" + KEY_CONTROL_PARAM_8 = ";8" + KEY_ESC_CSI = "\x1B[" + KEY_ESC_N = "\x1BN" + KEY_ESC_O = "\x1BO" + + FILL_CHARACTER = ' ' +) + +func getByteRange(start byte, end byte) []byte { + bytes := make([]byte, 0, 32) + for i := start; i <= end; i++ { + bytes = append(bytes, byte(i)) + } + + return bytes +} + +var toGroundBytes = getToGroundBytes() +var executors = getExecuteBytes() + +// SPACE 20+A0 hex Always and everywhere a blank space +// Intermediate 20-2F hex !"#$%&'()*+,-./ +var intermeds = getByteRange(0x20, 0x2F) + +// Parameters 30-3F hex 0123456789:;<=>? +// CSI Parameters 30-39, 3B hex 0123456789; +var csiParams = getByteRange(0x30, 0x3F) + +var csiCollectables = append(getByteRange(0x30, 0x39), getByteRange(0x3B, 0x3F)...) + +// Uppercase 40-5F hex @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ +var upperCase = getByteRange(0x40, 0x5F) + +// Lowercase 60-7E hex `abcdefghijlkmnopqrstuvwxyz{|}~ +var lowerCase = getByteRange(0x60, 0x7E) + +// Alphabetics 40-7E hex (all of upper and lower case) +var alphabetics = append(upperCase, lowerCase...) + +var printables = getByteRange(0x20, 0x7F) + +var escapeIntermediateToGroundBytes = getByteRange(0x30, 0x7E) +var escapeToGroundBytes = getEscapeToGroundBytes() + +// See http://www.vt100.net/emu/vt500_parser.png for description of the complex +// byte ranges below + +func getEscapeToGroundBytes() []byte { + escapeToGroundBytes := getByteRange(0x30, 0x4F) + escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x51, 0x57)...) + escapeToGroundBytes = append(escapeToGroundBytes, 0x59) + escapeToGroundBytes = append(escapeToGroundBytes, 0x5A) + escapeToGroundBytes = append(escapeToGroundBytes, 0x5C) + escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x60, 0x7E)...) + return escapeToGroundBytes +} + +func getExecuteBytes() []byte { + executeBytes := getByteRange(0x00, 0x17) + executeBytes = append(executeBytes, 0x19) + executeBytes = append(executeBytes, getByteRange(0x1C, 0x1F)...) + return executeBytes +} + +func getToGroundBytes() []byte { + groundBytes := []byte{0x18} + groundBytes = append(groundBytes, 0x1A) + groundBytes = append(groundBytes, getByteRange(0x80, 0x8F)...) + groundBytes = append(groundBytes, getByteRange(0x91, 0x97)...) + groundBytes = append(groundBytes, 0x99) + groundBytes = append(groundBytes, 0x9A) + groundBytes = append(groundBytes, 0x9C) + return groundBytes +} + +// Delete 7F hex Always and everywhere ignored +// C1 Control 80-9F hex 32 additional control characters +// G1 Displayable A1-FE hex 94 additional displayable characters +// Special A0+FF hex Same as SPACE and DELETE diff --git a/deps/github.com/Azure/go-ansiterm/context.go b/deps/github.com/Azure/go-ansiterm/context.go new file mode 100644 index 000000000..8d66e777c --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/context.go @@ -0,0 +1,7 @@ +package ansiterm + +type ansiContext struct { + currentChar byte + paramBuffer []byte + interBuffer []byte +} diff --git a/deps/github.com/Azure/go-ansiterm/csi_entry_state.go b/deps/github.com/Azure/go-ansiterm/csi_entry_state.go new file mode 100644 index 000000000..1bd6057da --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/csi_entry_state.go @@ -0,0 +1,49 @@ +package ansiterm + +type csiEntryState struct { + baseState +} + +func (csiState csiEntryState) Handle(b byte) (s state, e error) { + logger.Infof("CsiEntry::Handle %#x", b) + + nextState, err := csiState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(alphabetics, b): + return csiState.parser.ground, nil + case sliceContains(csiCollectables, b): + return csiState.parser.csiParam, nil + case sliceContains(executors, b): + return csiState, csiState.parser.execute() + } + + return csiState, nil +} + +func (csiState csiEntryState) Transition(s state) error { + logger.Infof("CsiEntry::Transition %s --> %s", csiState.Name(), s.Name()) + csiState.baseState.Transition(s) + + switch s { + case csiState.parser.ground: + return csiState.parser.csiDispatch() + case csiState.parser.csiParam: + switch { + case sliceContains(csiParams, csiState.parser.context.currentChar): + csiState.parser.collectParam() + case sliceContains(intermeds, csiState.parser.context.currentChar): + csiState.parser.collectInter() + } + } + + return nil +} + +func (csiState csiEntryState) Enter() error { + csiState.parser.clear() + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/csi_param_state.go b/deps/github.com/Azure/go-ansiterm/csi_param_state.go new file mode 100644 index 000000000..4be35c5fd --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/csi_param_state.go @@ -0,0 +1,38 @@ +package ansiterm + +type csiParamState struct { + baseState +} + +func (csiState csiParamState) Handle(b byte) (s state, e error) { + logger.Infof("CsiParam::Handle %#x", b) + + nextState, err := csiState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(alphabetics, b): + return csiState.parser.ground, nil + case sliceContains(csiCollectables, b): + csiState.parser.collectParam() + return csiState, nil + case sliceContains(executors, b): + return csiState, csiState.parser.execute() + } + + return csiState, nil +} + +func (csiState csiParamState) Transition(s state) error { + logger.Infof("CsiParam::Transition %s --> %s", csiState.Name(), s.Name()) + csiState.baseState.Transition(s) + + switch s { + case csiState.parser.ground: + return csiState.parser.csiDispatch() + } + + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/escape_intermediate_state.go b/deps/github.com/Azure/go-ansiterm/escape_intermediate_state.go new file mode 100644 index 000000000..2189eb6b6 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/escape_intermediate_state.go @@ -0,0 +1,36 @@ +package ansiterm + +type escapeIntermediateState struct { + baseState +} + +func (escState escapeIntermediateState) Handle(b byte) (s state, e error) { + logger.Infof("escapeIntermediateState::Handle %#x", b) + nextState, err := escState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(intermeds, b): + return escState, escState.parser.collectInter() + case sliceContains(executors, b): + return escState, escState.parser.execute() + case sliceContains(escapeIntermediateToGroundBytes, b): + return escState.parser.ground, nil + } + + return escState, nil +} + +func (escState escapeIntermediateState) Transition(s state) error { + logger.Infof("escapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name()) + escState.baseState.Transition(s) + + switch s { + case escState.parser.ground: + return escState.parser.escDispatch() + } + + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/escape_state.go b/deps/github.com/Azure/go-ansiterm/escape_state.go new file mode 100644 index 000000000..7b1b9ad3f --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/escape_state.go @@ -0,0 +1,47 @@ +package ansiterm + +type escapeState struct { + baseState +} + +func (escState escapeState) Handle(b byte) (s state, e error) { + logger.Infof("escapeState::Handle %#x", b) + nextState, err := escState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case b == ANSI_ESCAPE_SECONDARY: + return escState.parser.csiEntry, nil + case b == ANSI_OSC_STRING_ENTRY: + return escState.parser.oscString, nil + case sliceContains(executors, b): + return escState, escState.parser.execute() + case sliceContains(escapeToGroundBytes, b): + return escState.parser.ground, nil + case sliceContains(intermeds, b): + return escState.parser.escapeIntermediate, nil + } + + return escState, nil +} + +func (escState escapeState) Transition(s state) error { + logger.Infof("Escape::Transition %s --> %s", escState.Name(), s.Name()) + escState.baseState.Transition(s) + + switch s { + case escState.parser.ground: + return escState.parser.escDispatch() + case escState.parser.escapeIntermediate: + return escState.parser.collectInter() + } + + return nil +} + +func (escState escapeState) Enter() error { + escState.parser.clear() + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/event_handler.go b/deps/github.com/Azure/go-ansiterm/event_handler.go new file mode 100644 index 000000000..98087b38c --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/event_handler.go @@ -0,0 +1,90 @@ +package ansiterm + +type AnsiEventHandler interface { + // Print + Print(b byte) error + + // Execute C0 commands + Execute(b byte) error + + // CUrsor Up + CUU(int) error + + // CUrsor Down + CUD(int) error + + // CUrsor Forward + CUF(int) error + + // CUrsor Backward + CUB(int) error + + // Cursor to Next Line + CNL(int) error + + // Cursor to Previous Line + CPL(int) error + + // Cursor Horizontal position Absolute + CHA(int) error + + // Vertical line Position Absolute + VPA(int) error + + // CUrsor Position + CUP(int, int) error + + // Horizontal and Vertical Position (depends on PUM) + HVP(int, int) error + + // Text Cursor Enable Mode + DECTCEM(bool) error + + // Origin Mode + DECOM(bool) error + + // 132 Column Mode + DECCOLM(bool) error + + // Erase in Display + ED(int) error + + // Erase in Line + EL(int) error + + // Insert Line + IL(int) error + + // Delete Line + DL(int) error + + // Insert Character + ICH(int) error + + // Delete Character + DCH(int) error + + // Set Graphics Rendition + SGR([]int) error + + // Pan Down + SU(int) error + + // Pan Up + SD(int) error + + // Device Attributes + DA([]string) error + + // Set Top and Bottom Margins + DECSTBM(int, int) error + + // Index + IND() error + + // Reverse Index + RI() error + + // Flush updates from previous commands + Flush() error +} diff --git a/deps/github.com/Azure/go-ansiterm/ground_state.go b/deps/github.com/Azure/go-ansiterm/ground_state.go new file mode 100644 index 000000000..52451e946 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/ground_state.go @@ -0,0 +1,24 @@ +package ansiterm + +type groundState struct { + baseState +} + +func (gs groundState) Handle(b byte) (s state, e error) { + gs.parser.context.currentChar = b + + nextState, err := gs.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case sliceContains(printables, b): + return gs, gs.parser.print() + + case sliceContains(executors, b): + return gs, gs.parser.execute() + } + + return gs, nil +} diff --git a/deps/github.com/Azure/go-ansiterm/osc_string_state.go b/deps/github.com/Azure/go-ansiterm/osc_string_state.go new file mode 100644 index 000000000..24062d420 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/osc_string_state.go @@ -0,0 +1,31 @@ +package ansiterm + +type oscStringState struct { + baseState +} + +func (oscState oscStringState) Handle(b byte) (s state, e error) { + logger.Infof("OscString::Handle %#x", b) + nextState, err := oscState.baseState.Handle(b) + if nextState != nil || err != nil { + return nextState, err + } + + switch { + case isOscStringTerminator(b): + return oscState.parser.ground, nil + } + + return oscState, nil +} + +// See below for OSC string terminators for linux +// http://man7.org/linux/man-pages/man4/console_codes.4.html +func isOscStringTerminator(b byte) bool { + + if b == ANSI_BEL || b == 0x5C { + return true + } + + return false +} diff --git a/deps/github.com/Azure/go-ansiterm/parser.go b/deps/github.com/Azure/go-ansiterm/parser.go new file mode 100644 index 000000000..3286a9cb5 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/parser.go @@ -0,0 +1,136 @@ +package ansiterm + +import ( + "errors" + "io/ioutil" + "os" + + "github.com/sirupsen/logrus" +) + +var logger *logrus.Logger + +type AnsiParser struct { + currState state + eventHandler AnsiEventHandler + context *ansiContext + csiEntry state + csiParam state + dcsEntry state + escape state + escapeIntermediate state + error state + ground state + oscString state + stateMap []state +} + +func CreateParser(initialState string, evtHandler AnsiEventHandler) *AnsiParser { + logFile := ioutil.Discard + + if isDebugEnv := os.Getenv(LogEnv); isDebugEnv == "1" { + logFile, _ = os.Create("ansiParser.log") + } + + logger = &logrus.Logger{ + Out: logFile, + Formatter: new(logrus.TextFormatter), + Level: logrus.InfoLevel, + } + + parser := &AnsiParser{ + eventHandler: evtHandler, + context: &ansiContext{}, + } + + parser.csiEntry = csiEntryState{baseState{name: "CsiEntry", parser: parser}} + parser.csiParam = csiParamState{baseState{name: "CsiParam", parser: parser}} + parser.dcsEntry = dcsEntryState{baseState{name: "DcsEntry", parser: parser}} + parser.escape = escapeState{baseState{name: "Escape", parser: parser}} + parser.escapeIntermediate = escapeIntermediateState{baseState{name: "EscapeIntermediate", parser: parser}} + parser.error = errorState{baseState{name: "Error", parser: parser}} + parser.ground = groundState{baseState{name: "Ground", parser: parser}} + parser.oscString = oscStringState{baseState{name: "OscString", parser: parser}} + + parser.stateMap = []state{ + parser.csiEntry, + parser.csiParam, + parser.dcsEntry, + parser.escape, + parser.escapeIntermediate, + parser.error, + parser.ground, + parser.oscString, + } + + parser.currState = getState(initialState, parser.stateMap) + + logger.Infof("CreateParser: parser %p", parser) + return parser +} + +func getState(name string, states []state) state { + for _, el := range states { + if el.Name() == name { + return el + } + } + + return nil +} + +func (ap *AnsiParser) Parse(bytes []byte) (int, error) { + for i, b := range bytes { + if err := ap.handle(b); err != nil { + return i, err + } + } + + return len(bytes), ap.eventHandler.Flush() +} + +func (ap *AnsiParser) handle(b byte) error { + ap.context.currentChar = b + newState, err := ap.currState.Handle(b) + if err != nil { + return err + } + + if newState == nil { + logger.Warning("newState is nil") + return errors.New("New state of 'nil' is invalid.") + } + + if newState != ap.currState { + if err := ap.changeState(newState); err != nil { + return err + } + } + + return nil +} + +func (ap *AnsiParser) changeState(newState state) error { + logger.Infof("ChangeState %s --> %s", ap.currState.Name(), newState.Name()) + + // Exit old state + if err := ap.currState.Exit(); err != nil { + logger.Infof("Exit state '%s' failed with : '%v'", ap.currState.Name(), err) + return err + } + + // Perform transition action + if err := ap.currState.Transition(newState); err != nil { + logger.Infof("Transition from '%s' to '%s' failed with: '%v'", ap.currState.Name(), newState.Name, err) + return err + } + + // Enter new state + if err := newState.Enter(); err != nil { + logger.Infof("Enter state '%s' failed with: '%v'", newState.Name(), err) + return err + } + + ap.currState = newState + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/parser_action_helpers.go b/deps/github.com/Azure/go-ansiterm/parser_action_helpers.go new file mode 100644 index 000000000..8b69a67a5 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/parser_action_helpers.go @@ -0,0 +1,103 @@ +package ansiterm + +import ( + "strconv" +) + +func parseParams(bytes []byte) ([]string, error) { + paramBuff := make([]byte, 0, 0) + params := []string{} + + for _, v := range bytes { + if v == ';' { + if len(paramBuff) > 0 { + // Completed parameter, append it to the list + s := string(paramBuff) + params = append(params, s) + paramBuff = make([]byte, 0, 0) + } + } else { + paramBuff = append(paramBuff, v) + } + } + + // Last parameter may not be terminated with ';' + if len(paramBuff) > 0 { + s := string(paramBuff) + params = append(params, s) + } + + logger.Infof("Parsed params: %v with length: %d", params, len(params)) + return params, nil +} + +func parseCmd(context ansiContext) (string, error) { + return string(context.currentChar), nil +} + +func getInt(params []string, dflt int) int { + i := getInts(params, 1, dflt)[0] + logger.Infof("getInt: %v", i) + return i +} + +func getInts(params []string, minCount int, dflt int) []int { + ints := []int{} + + for _, v := range params { + i, _ := strconv.Atoi(v) + // Zero is mapped to the default value in VT100. + if i == 0 { + i = dflt + } + ints = append(ints, i) + } + + if len(ints) < minCount { + remaining := minCount - len(ints) + for i := 0; i < remaining; i++ { + ints = append(ints, dflt) + } + } + + logger.Infof("getInts: %v", ints) + + return ints +} + +func (ap *AnsiParser) modeDispatch(param string, set bool) error { + switch param { + case "?3": + return ap.eventHandler.DECCOLM(set) + case "?6": + return ap.eventHandler.DECOM(set) + case "?25": + return ap.eventHandler.DECTCEM(set) + } + return nil +} + +func (ap *AnsiParser) hDispatch(params []string) error { + if len(params) == 1 { + return ap.modeDispatch(params[0], true) + } + + return nil +} + +func (ap *AnsiParser) lDispatch(params []string) error { + if len(params) == 1 { + return ap.modeDispatch(params[0], false) + } + + return nil +} + +func getEraseParam(params []string) int { + param := getInt(params, 0) + if param < 0 || 3 < param { + param = 0 + } + + return param +} diff --git a/deps/github.com/Azure/go-ansiterm/parser_actions.go b/deps/github.com/Azure/go-ansiterm/parser_actions.go new file mode 100644 index 000000000..58750a2d2 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/parser_actions.go @@ -0,0 +1,122 @@ +package ansiterm + +import ( + "fmt" +) + +func (ap *AnsiParser) collectParam() error { + currChar := ap.context.currentChar + logger.Infof("collectParam %#x", currChar) + ap.context.paramBuffer = append(ap.context.paramBuffer, currChar) + return nil +} + +func (ap *AnsiParser) collectInter() error { + currChar := ap.context.currentChar + logger.Infof("collectInter %#x", currChar) + ap.context.paramBuffer = append(ap.context.interBuffer, currChar) + return nil +} + +func (ap *AnsiParser) escDispatch() error { + cmd, _ := parseCmd(*ap.context) + intermeds := ap.context.interBuffer + logger.Infof("escDispatch currentChar: %#x", ap.context.currentChar) + logger.Infof("escDispatch: %v(%v)", cmd, intermeds) + + switch cmd { + case "D": // IND + return ap.eventHandler.IND() + case "E": // NEL, equivalent to CRLF + err := ap.eventHandler.Execute(ANSI_CARRIAGE_RETURN) + if err == nil { + err = ap.eventHandler.Execute(ANSI_LINE_FEED) + } + return err + case "M": // RI + return ap.eventHandler.RI() + } + + return nil +} + +func (ap *AnsiParser) csiDispatch() error { + cmd, _ := parseCmd(*ap.context) + params, _ := parseParams(ap.context.paramBuffer) + + logger.Infof("csiDispatch: %v(%v)", cmd, params) + + switch cmd { + case "@": + return ap.eventHandler.ICH(getInt(params, 1)) + case "A": + return ap.eventHandler.CUU(getInt(params, 1)) + case "B": + return ap.eventHandler.CUD(getInt(params, 1)) + case "C": + return ap.eventHandler.CUF(getInt(params, 1)) + case "D": + return ap.eventHandler.CUB(getInt(params, 1)) + case "E": + return ap.eventHandler.CNL(getInt(params, 1)) + case "F": + return ap.eventHandler.CPL(getInt(params, 1)) + case "G": + return ap.eventHandler.CHA(getInt(params, 1)) + case "H": + ints := getInts(params, 2, 1) + x, y := ints[0], ints[1] + return ap.eventHandler.CUP(x, y) + case "J": + param := getEraseParam(params) + return ap.eventHandler.ED(param) + case "K": + param := getEraseParam(params) + return ap.eventHandler.EL(param) + case "L": + return ap.eventHandler.IL(getInt(params, 1)) + case "M": + return ap.eventHandler.DL(getInt(params, 1)) + case "P": + return ap.eventHandler.DCH(getInt(params, 1)) + case "S": + return ap.eventHandler.SU(getInt(params, 1)) + case "T": + return ap.eventHandler.SD(getInt(params, 1)) + case "c": + return ap.eventHandler.DA(params) + case "d": + return ap.eventHandler.VPA(getInt(params, 1)) + case "f": + ints := getInts(params, 2, 1) + x, y := ints[0], ints[1] + return ap.eventHandler.HVP(x, y) + case "h": + return ap.hDispatch(params) + case "l": + return ap.lDispatch(params) + case "m": + return ap.eventHandler.SGR(getInts(params, 1, 0)) + case "r": + ints := getInts(params, 2, 1) + top, bottom := ints[0], ints[1] + return ap.eventHandler.DECSTBM(top, bottom) + default: + logger.Errorf(fmt.Sprintf("Unsupported CSI command: '%s', with full context: %v", cmd, ap.context)) + return nil + } + +} + +func (ap *AnsiParser) print() error { + return ap.eventHandler.Print(ap.context.currentChar) +} + +func (ap *AnsiParser) clear() error { + ap.context = &ansiContext{} + return nil +} + +func (ap *AnsiParser) execute() error { + return ap.eventHandler.Execute(ap.context.currentChar) +} diff --git a/deps/github.com/Azure/go-ansiterm/states.go b/deps/github.com/Azure/go-ansiterm/states.go new file mode 100644 index 000000000..f2ea1fcd1 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/states.go @@ -0,0 +1,71 @@ +package ansiterm + +type stateID int + +type state interface { + Enter() error + Exit() error + Handle(byte) (state, error) + Name() string + Transition(state) error +} + +type baseState struct { + name string + parser *AnsiParser +} + +func (base baseState) Enter() error { + return nil +} + +func (base baseState) Exit() error { + return nil +} + +func (base baseState) Handle(b byte) (s state, e error) { + + switch { + case b == CSI_ENTRY: + return base.parser.csiEntry, nil + case b == DCS_ENTRY: + return base.parser.dcsEntry, nil + case b == ANSI_ESCAPE_PRIMARY: + return base.parser.escape, nil + case b == OSC_STRING: + return base.parser.oscString, nil + case sliceContains(toGroundBytes, b): + return base.parser.ground, nil + } + + return nil, nil +} + +func (base baseState) Name() string { + return base.name +} + +func (base baseState) Transition(s state) error { + if s == base.parser.ground { + execBytes := []byte{0x18} + execBytes = append(execBytes, 0x1A) + execBytes = append(execBytes, getByteRange(0x80, 0x8F)...) + execBytes = append(execBytes, getByteRange(0x91, 0x97)...) + execBytes = append(execBytes, 0x99) + execBytes = append(execBytes, 0x9A) + + if sliceContains(execBytes, base.parser.context.currentChar) { + return base.parser.execute() + } + } + + return nil +} + +type dcsEntryState struct { + baseState +} + +type errorState struct { + baseState +} diff --git a/deps/github.com/Azure/go-ansiterm/utilities.go b/deps/github.com/Azure/go-ansiterm/utilities.go new file mode 100644 index 000000000..392114493 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/utilities.go @@ -0,0 +1,21 @@ +package ansiterm + +import ( + "strconv" +) + +func sliceContains(bytes []byte, b byte) bool { + for _, v := range bytes { + if v == b { + return true + } + } + + return false +} + +func convertBytesToInteger(bytes []byte) int { + s := string(bytes) + i, _ := strconv.Atoi(s) + return i +} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/ansi.go b/deps/github.com/Azure/go-ansiterm/winterm/ansi.go new file mode 100644 index 000000000..daf2f0696 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/ansi.go @@ -0,0 +1,182 @@ +// +build windows + +package winterm + +import ( + "fmt" + "os" + "strconv" + "strings" + "syscall" + + "github.com/Azure/go-ansiterm" +) + +// Windows keyboard constants +// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx. +const ( + VK_PRIOR = 0x21 // PAGE UP key + VK_NEXT = 0x22 // PAGE DOWN key + VK_END = 0x23 // END key + VK_HOME = 0x24 // HOME key + VK_LEFT = 0x25 // LEFT ARROW key + VK_UP = 0x26 // UP ARROW key + VK_RIGHT = 0x27 // RIGHT ARROW key + VK_DOWN = 0x28 // DOWN ARROW key + VK_SELECT = 0x29 // SELECT key + VK_PRINT = 0x2A // PRINT key + VK_EXECUTE = 0x2B // EXECUTE key + VK_SNAPSHOT = 0x2C // PRINT SCREEN key + VK_INSERT = 0x2D // INS key + VK_DELETE = 0x2E // DEL key + VK_HELP = 0x2F // HELP key + VK_F1 = 0x70 // F1 key + VK_F2 = 0x71 // F2 key + VK_F3 = 0x72 // F3 key + VK_F4 = 0x73 // F4 key + VK_F5 = 0x74 // F5 key + VK_F6 = 0x75 // F6 key + VK_F7 = 0x76 // F7 key + VK_F8 = 0x77 // F8 key + VK_F9 = 0x78 // F9 key + VK_F10 = 0x79 // F10 key + VK_F11 = 0x7A // F11 key + VK_F12 = 0x7B // F12 key + + RIGHT_ALT_PRESSED = 0x0001 + LEFT_ALT_PRESSED = 0x0002 + RIGHT_CTRL_PRESSED = 0x0004 + LEFT_CTRL_PRESSED = 0x0008 + SHIFT_PRESSED = 0x0010 + NUMLOCK_ON = 0x0020 + SCROLLLOCK_ON = 0x0040 + CAPSLOCK_ON = 0x0080 + ENHANCED_KEY = 0x0100 +) + +type ansiCommand struct { + CommandBytes []byte + Command string + Parameters []string + IsSpecial bool +} + +func newAnsiCommand(command []byte) *ansiCommand { + + if isCharacterSelectionCmdChar(command[1]) { + // Is Character Set Selection commands + return &ansiCommand{ + CommandBytes: command, + Command: string(command), + IsSpecial: true, + } + } + + // last char is command character + lastCharIndex := len(command) - 1 + + ac := &ansiCommand{ + CommandBytes: command, + Command: string(command[lastCharIndex]), + IsSpecial: false, + } + + // more than a single escape + if lastCharIndex != 0 { + start := 1 + // skip if double char escape sequence + if command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_ESCAPE_SECONDARY { + start++ + } + // convert this to GetNextParam method + ac.Parameters = strings.Split(string(command[start:lastCharIndex]), ansiterm.ANSI_PARAMETER_SEP) + } + + return ac +} + +func (ac *ansiCommand) paramAsSHORT(index int, defaultValue int16) int16 { + if index < 0 || index >= len(ac.Parameters) { + return defaultValue + } + + param, err := strconv.ParseInt(ac.Parameters[index], 10, 16) + if err != nil { + return defaultValue + } + + return int16(param) +} + +func (ac *ansiCommand) String() string { + return fmt.Sprintf("0x%v \"%v\" (\"%v\")", + bytesToHex(ac.CommandBytes), + ac.Command, + strings.Join(ac.Parameters, "\",\"")) +} + +// isAnsiCommandChar returns true if the passed byte falls within the range of ANSI commands. +// See http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html. +func isAnsiCommandChar(b byte) bool { + switch { + case ansiterm.ANSI_COMMAND_FIRST <= b && b <= ansiterm.ANSI_COMMAND_LAST && b != ansiterm.ANSI_ESCAPE_SECONDARY: + return true + case b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_OSC || b == ansiterm.ANSI_CMD_DECPAM || b == ansiterm.ANSI_CMD_DECPNM: + // non-CSI escape sequence terminator + return true + case b == ansiterm.ANSI_CMD_STR_TERM || b == ansiterm.ANSI_BEL: + // String escape sequence terminator + return true + } + return false +} + +func isXtermOscSequence(command []byte, current byte) bool { + return (len(command) >= 2 && command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_CMD_OSC && current != ansiterm.ANSI_BEL) +} + +func isCharacterSelectionCmdChar(b byte) bool { + return (b == ansiterm.ANSI_CMD_G0 || b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_G2 || b == ansiterm.ANSI_CMD_G3) +} + +// bytesToHex converts a slice of bytes to a human-readable string. +func bytesToHex(b []byte) string { + hex := make([]string, len(b)) + for i, ch := range b { + hex[i] = fmt.Sprintf("%X", ch) + } + return strings.Join(hex, "") +} + +// ensureInRange adjusts the passed value, if necessary, to ensure it is within +// the passed min / max range. +func ensureInRange(n int16, min int16, max int16) int16 { + if n < min { + return min + } else if n > max { + return max + } else { + return n + } +} + +func GetStdFile(nFile int) (*os.File, uintptr) { + var file *os.File + switch nFile { + case syscall.STD_INPUT_HANDLE: + file = os.Stdin + case syscall.STD_OUTPUT_HANDLE: + file = os.Stdout + case syscall.STD_ERROR_HANDLE: + file = os.Stderr + default: + panic(fmt.Errorf("Invalid standard handle identifier: %v", nFile)) + } + + fd, err := syscall.GetStdHandle(nFile) + if err != nil { + panic(fmt.Errorf("Invalid standard handle indentifier: %v -- %v", nFile, err)) + } + + return file, uintptr(fd) +} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/api.go b/deps/github.com/Azure/go-ansiterm/winterm/api.go new file mode 100644 index 000000000..462d92f8e --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/api.go @@ -0,0 +1,322 @@ +// +build windows + +package winterm + +import ( + "fmt" + "syscall" + "unsafe" +) + +//=========================================================================================================== +// IMPORTANT NOTE: +// +// The methods below make extensive use of the "unsafe" package to obtain the required pointers. +// Beginning in Go 1.3, the garbage collector may release local variables (e.g., incoming arguments, stack +// variables) the pointers reference *before* the API completes. +// +// As a result, in those cases, the code must hint that the variables remain in active by invoking the +// dummy method "use" (see below). Newer versions of Go are planned to change the mechanism to no longer +// require unsafe pointers. +// +// If you add or modify methods, ENSURE protection of local variables through the "use" builtin to inform +// the garbage collector the variables remain in use if: +// +// -- The value is not a pointer (e.g., int32, struct) +// -- The value is not referenced by the method after passing the pointer to Windows +// +// See http://golang.org/doc/go1.3. +//=========================================================================================================== + +var ( + kernel32DLL = syscall.NewLazyDLL("kernel32.dll") + + getConsoleCursorInfoProc = kernel32DLL.NewProc("GetConsoleCursorInfo") + setConsoleCursorInfoProc = kernel32DLL.NewProc("SetConsoleCursorInfo") + setConsoleCursorPositionProc = kernel32DLL.NewProc("SetConsoleCursorPosition") + setConsoleModeProc = kernel32DLL.NewProc("SetConsoleMode") + getConsoleScreenBufferInfoProc = kernel32DLL.NewProc("GetConsoleScreenBufferInfo") + setConsoleScreenBufferSizeProc = kernel32DLL.NewProc("SetConsoleScreenBufferSize") + scrollConsoleScreenBufferProc = kernel32DLL.NewProc("ScrollConsoleScreenBufferA") + setConsoleTextAttributeProc = kernel32DLL.NewProc("SetConsoleTextAttribute") + setConsoleWindowInfoProc = kernel32DLL.NewProc("SetConsoleWindowInfo") + writeConsoleOutputProc = kernel32DLL.NewProc("WriteConsoleOutputW") + readConsoleInputProc = kernel32DLL.NewProc("ReadConsoleInputW") + waitForSingleObjectProc = kernel32DLL.NewProc("WaitForSingleObject") +) + +// Windows Console constants +const ( + // Console modes + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx. + ENABLE_PROCESSED_INPUT = 0x0001 + ENABLE_LINE_INPUT = 0x0002 + ENABLE_ECHO_INPUT = 0x0004 + ENABLE_WINDOW_INPUT = 0x0008 + ENABLE_MOUSE_INPUT = 0x0010 + ENABLE_INSERT_MODE = 0x0020 + ENABLE_QUICK_EDIT_MODE = 0x0040 + ENABLE_EXTENDED_FLAGS = 0x0080 + + ENABLE_PROCESSED_OUTPUT = 0x0001 + ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002 + + // Character attributes + // Note: + // -- The attributes are combined to produce various colors (e.g., Blue + Green will create Cyan). + // Clearing all foreground or background colors results in black; setting all creates white. + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx#_win32_character_attributes. + FOREGROUND_BLUE uint16 = 0x0001 + FOREGROUND_GREEN uint16 = 0x0002 + FOREGROUND_RED uint16 = 0x0004 + FOREGROUND_INTENSITY uint16 = 0x0008 + FOREGROUND_MASK uint16 = 0x000F + + BACKGROUND_BLUE uint16 = 0x0010 + BACKGROUND_GREEN uint16 = 0x0020 + BACKGROUND_RED uint16 = 0x0040 + BACKGROUND_INTENSITY uint16 = 0x0080 + BACKGROUND_MASK uint16 = 0x00F0 + + COMMON_LVB_MASK uint16 = 0xFF00 + COMMON_LVB_REVERSE_VIDEO uint16 = 0x4000 + COMMON_LVB_UNDERSCORE uint16 = 0x8000 + + // Input event types + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx. + KEY_EVENT = 0x0001 + MOUSE_EVENT = 0x0002 + WINDOW_BUFFER_SIZE_EVENT = 0x0004 + MENU_EVENT = 0x0008 + FOCUS_EVENT = 0x0010 + + // WaitForSingleObject return codes + WAIT_ABANDONED = 0x00000080 + WAIT_FAILED = 0xFFFFFFFF + WAIT_SIGNALED = 0x0000000 + WAIT_TIMEOUT = 0x00000102 + + // WaitForSingleObject wait duration + WAIT_INFINITE = 0xFFFFFFFF + WAIT_ONE_SECOND = 1000 + WAIT_HALF_SECOND = 500 + WAIT_QUARTER_SECOND = 250 +) + +// Windows API Console types +// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682101(v=vs.85).aspx for Console specific types (e.g., COORD) +// -- See https://msdn.microsoft.com/en-us/library/aa296569(v=vs.60).aspx for comments on alignment +type ( + CHAR_INFO struct { + UnicodeChar uint16 + Attributes uint16 + } + + CONSOLE_CURSOR_INFO struct { + Size uint32 + Visible int32 + } + + CONSOLE_SCREEN_BUFFER_INFO struct { + Size COORD + CursorPosition COORD + Attributes uint16 + Window SMALL_RECT + MaximumWindowSize COORD + } + + COORD struct { + X int16 + Y int16 + } + + SMALL_RECT struct { + Left int16 + Top int16 + Right int16 + Bottom int16 + } + + // INPUT_RECORD is a C/C++ union of which KEY_EVENT_RECORD is one case, it is also the largest + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx. + INPUT_RECORD struct { + EventType uint16 + KeyEvent KEY_EVENT_RECORD + } + + KEY_EVENT_RECORD struct { + KeyDown int32 + RepeatCount uint16 + VirtualKeyCode uint16 + VirtualScanCode uint16 + UnicodeChar uint16 + ControlKeyState uint32 + } + + WINDOW_BUFFER_SIZE struct { + Size COORD + } +) + +// boolToBOOL converts a Go bool into a Windows int32. +func boolToBOOL(f bool) int32 { + if f { + return int32(1) + } else { + return int32(0) + } +} + +// GetConsoleCursorInfo retrieves information about the size and visiblity of the console cursor. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683163(v=vs.85).aspx. +func GetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error { + r1, r2, err := getConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0) + return checkError(r1, r2, err) +} + +// SetConsoleCursorInfo sets the size and visiblity of the console cursor. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686019(v=vs.85).aspx. +func SetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error { + r1, r2, err := setConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0) + return checkError(r1, r2, err) +} + +// SetConsoleCursorPosition location of the console cursor. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx. +func SetConsoleCursorPosition(handle uintptr, coord COORD) error { + r1, r2, err := setConsoleCursorPositionProc.Call(handle, coordToPointer(coord)) + use(coord) + return checkError(r1, r2, err) +} + +// GetConsoleMode gets the console mode for given file descriptor +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx. +func GetConsoleMode(handle uintptr) (mode uint32, err error) { + err = syscall.GetConsoleMode(syscall.Handle(handle), &mode) + return mode, err +} + +// SetConsoleMode sets the console mode for given file descriptor +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx. +func SetConsoleMode(handle uintptr, mode uint32) error { + r1, r2, err := setConsoleModeProc.Call(handle, uintptr(mode), 0) + use(mode) + return checkError(r1, r2, err) +} + +// GetConsoleScreenBufferInfo retrieves information about the specified console screen buffer. +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683171(v=vs.85).aspx. +func GetConsoleScreenBufferInfo(handle uintptr) (*CONSOLE_SCREEN_BUFFER_INFO, error) { + info := CONSOLE_SCREEN_BUFFER_INFO{} + err := checkError(getConsoleScreenBufferInfoProc.Call(handle, uintptr(unsafe.Pointer(&info)), 0)) + if err != nil { + return nil, err + } + return &info, nil +} + +func ScrollConsoleScreenBuffer(handle uintptr, scrollRect SMALL_RECT, clipRect SMALL_RECT, destOrigin COORD, char CHAR_INFO) error { + r1, r2, err := scrollConsoleScreenBufferProc.Call(handle, uintptr(unsafe.Pointer(&scrollRect)), uintptr(unsafe.Pointer(&clipRect)), coordToPointer(destOrigin), uintptr(unsafe.Pointer(&char))) + use(scrollRect) + use(clipRect) + use(destOrigin) + use(char) + return checkError(r1, r2, err) +} + +// SetConsoleScreenBufferSize sets the size of the console screen buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686044(v=vs.85).aspx. +func SetConsoleScreenBufferSize(handle uintptr, coord COORD) error { + r1, r2, err := setConsoleScreenBufferSizeProc.Call(handle, coordToPointer(coord)) + use(coord) + return checkError(r1, r2, err) +} + +// SetConsoleTextAttribute sets the attributes of characters written to the +// console screen buffer by the WriteFile or WriteConsole function. +// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx. +func SetConsoleTextAttribute(handle uintptr, attribute uint16) error { + r1, r2, err := setConsoleTextAttributeProc.Call(handle, uintptr(attribute), 0) + use(attribute) + return checkError(r1, r2, err) +} + +// SetConsoleWindowInfo sets the size and position of the console screen buffer's window. +// Note that the size and location must be within and no larger than the backing console screen buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686125(v=vs.85).aspx. +func SetConsoleWindowInfo(handle uintptr, isAbsolute bool, rect SMALL_RECT) error { + r1, r2, err := setConsoleWindowInfoProc.Call(handle, uintptr(boolToBOOL(isAbsolute)), uintptr(unsafe.Pointer(&rect))) + use(isAbsolute) + use(rect) + return checkError(r1, r2, err) +} + +// WriteConsoleOutput writes the CHAR_INFOs from the provided buffer to the active console buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687404(v=vs.85).aspx. +func WriteConsoleOutput(handle uintptr, buffer []CHAR_INFO, bufferSize COORD, bufferCoord COORD, writeRegion *SMALL_RECT) error { + r1, r2, err := writeConsoleOutputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), coordToPointer(bufferSize), coordToPointer(bufferCoord), uintptr(unsafe.Pointer(writeRegion))) + use(buffer) + use(bufferSize) + use(bufferCoord) + return checkError(r1, r2, err) +} + +// ReadConsoleInput reads (and removes) data from the console input buffer. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx. +func ReadConsoleInput(handle uintptr, buffer []INPUT_RECORD, count *uint32) error { + r1, r2, err := readConsoleInputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer)), uintptr(unsafe.Pointer(count))) + use(buffer) + return checkError(r1, r2, err) +} + +// WaitForSingleObject waits for the passed handle to be signaled. +// It returns true if the handle was signaled; false otherwise. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx. +func WaitForSingleObject(handle uintptr, msWait uint32) (bool, error) { + r1, _, err := waitForSingleObjectProc.Call(handle, uintptr(uint32(msWait))) + switch r1 { + case WAIT_ABANDONED, WAIT_TIMEOUT: + return false, nil + case WAIT_SIGNALED: + return true, nil + } + use(msWait) + return false, err +} + +// String helpers +func (info CONSOLE_SCREEN_BUFFER_INFO) String() string { + return fmt.Sprintf("Size(%v) Cursor(%v) Window(%v) Max(%v)", info.Size, info.CursorPosition, info.Window, info.MaximumWindowSize) +} + +func (coord COORD) String() string { + return fmt.Sprintf("%v,%v", coord.X, coord.Y) +} + +func (rect SMALL_RECT) String() string { + return fmt.Sprintf("(%v,%v),(%v,%v)", rect.Left, rect.Top, rect.Right, rect.Bottom) +} + +// checkError evaluates the results of a Windows API call and returns the error if it failed. +func checkError(r1, r2 uintptr, err error) error { + // Windows APIs return non-zero to indicate success + if r1 != 0 { + return nil + } + + // Return the error if provided, otherwise default to EINVAL + if err != nil { + return err + } + return syscall.EINVAL +} + +// coordToPointer converts a COORD into a uintptr (by fooling the type system). +func coordToPointer(c COORD) uintptr { + // Note: This code assumes the two SHORTs are correctly laid out; the "cast" to uint32 is just to get a pointer to pass. + return uintptr(*((*uint32)(unsafe.Pointer(&c)))) +} + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +func use(p interface{}) {} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/attr_translation.go b/deps/github.com/Azure/go-ansiterm/winterm/attr_translation.go new file mode 100644 index 000000000..cbec8f728 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/attr_translation.go @@ -0,0 +1,100 @@ +// +build windows + +package winterm + +import "github.com/Azure/go-ansiterm" + +const ( + FOREGROUND_COLOR_MASK = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE + BACKGROUND_COLOR_MASK = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE +) + +// collectAnsiIntoWindowsAttributes modifies the passed Windows text mode flags to reflect the +// request represented by the passed ANSI mode. +func collectAnsiIntoWindowsAttributes(windowsMode uint16, inverted bool, baseMode uint16, ansiMode int16) (uint16, bool) { + switch ansiMode { + + // Mode styles + case ansiterm.ANSI_SGR_BOLD: + windowsMode = windowsMode | FOREGROUND_INTENSITY + + case ansiterm.ANSI_SGR_DIM, ansiterm.ANSI_SGR_BOLD_DIM_OFF: + windowsMode &^= FOREGROUND_INTENSITY + + case ansiterm.ANSI_SGR_UNDERLINE: + windowsMode = windowsMode | COMMON_LVB_UNDERSCORE + + case ansiterm.ANSI_SGR_REVERSE: + inverted = true + + case ansiterm.ANSI_SGR_REVERSE_OFF: + inverted = false + + case ansiterm.ANSI_SGR_UNDERLINE_OFF: + windowsMode &^= COMMON_LVB_UNDERSCORE + + // Foreground colors + case ansiterm.ANSI_SGR_FOREGROUND_DEFAULT: + windowsMode = (windowsMode &^ FOREGROUND_MASK) | (baseMode & FOREGROUND_MASK) + + case ansiterm.ANSI_SGR_FOREGROUND_BLACK: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) + + case ansiterm.ANSI_SGR_FOREGROUND_RED: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED + + case ansiterm.ANSI_SGR_FOREGROUND_GREEN: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN + + case ansiterm.ANSI_SGR_FOREGROUND_YELLOW: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN + + case ansiterm.ANSI_SGR_FOREGROUND_BLUE: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_MAGENTA: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_CYAN: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN | FOREGROUND_BLUE + + case ansiterm.ANSI_SGR_FOREGROUND_WHITE: + windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE + + // Background colors + case ansiterm.ANSI_SGR_BACKGROUND_DEFAULT: + // Black with no intensity + windowsMode = (windowsMode &^ BACKGROUND_MASK) | (baseMode & BACKGROUND_MASK) + + case ansiterm.ANSI_SGR_BACKGROUND_BLACK: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) + + case ansiterm.ANSI_SGR_BACKGROUND_RED: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED + + case ansiterm.ANSI_SGR_BACKGROUND_GREEN: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN + + case ansiterm.ANSI_SGR_BACKGROUND_YELLOW: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN + + case ansiterm.ANSI_SGR_BACKGROUND_BLUE: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_MAGENTA: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_CYAN: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN | BACKGROUND_BLUE + + case ansiterm.ANSI_SGR_BACKGROUND_WHITE: + windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE + } + + return windowsMode, inverted +} + +// invertAttributes inverts the foreground and background colors of a Windows attributes value +func invertAttributes(windowsMode uint16) uint16 { + return (COMMON_LVB_MASK & windowsMode) | ((FOREGROUND_MASK & windowsMode) << 4) | ((BACKGROUND_MASK & windowsMode) >> 4) +} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go b/deps/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go new file mode 100644 index 000000000..f015723ad --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go @@ -0,0 +1,101 @@ +// +build windows + +package winterm + +const ( + horizontal = iota + vertical +) + +func (h *windowsAnsiEventHandler) getCursorWindow(info *CONSOLE_SCREEN_BUFFER_INFO) SMALL_RECT { + if h.originMode { + sr := h.effectiveSr(info.Window) + return SMALL_RECT{ + Top: sr.top, + Bottom: sr.bottom, + Left: 0, + Right: info.Size.X - 1, + } + } else { + return SMALL_RECT{ + Top: info.Window.Top, + Bottom: info.Window.Bottom, + Left: 0, + Right: info.Size.X - 1, + } + } +} + +// setCursorPosition sets the cursor to the specified position, bounded to the screen size +func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error { + position.X = ensureInRange(position.X, window.Left, window.Right) + position.Y = ensureInRange(position.Y, window.Top, window.Bottom) + err := SetConsoleCursorPosition(h.fd, position) + if err != nil { + return err + } + logger.Infof("Cursor position set: (%d, %d)", position.X, position.Y) + return err +} + +func (h *windowsAnsiEventHandler) moveCursorVertical(param int) error { + return h.moveCursor(vertical, param) +} + +func (h *windowsAnsiEventHandler) moveCursorHorizontal(param int) error { + return h.moveCursor(horizontal, param) +} + +func (h *windowsAnsiEventHandler) moveCursor(moveMode int, param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + switch moveMode { + case horizontal: + position.X += int16(param) + case vertical: + position.Y += int16(param) + } + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) moveCursorLine(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + position.X = 0 + position.Y += int16(param) + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) moveCursorColumn(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + position := info.CursorPosition + position.X = int16(param) - 1 + + if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil { + return err + } + + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/erase_helpers.go b/deps/github.com/Azure/go-ansiterm/winterm/erase_helpers.go new file mode 100644 index 000000000..244b5fa25 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/erase_helpers.go @@ -0,0 +1,84 @@ +// +build windows + +package winterm + +import "github.com/Azure/go-ansiterm" + +func (h *windowsAnsiEventHandler) clearRange(attributes uint16, fromCoord COORD, toCoord COORD) error { + // Ignore an invalid (negative area) request + if toCoord.Y < fromCoord.Y { + return nil + } + + var err error + + var coordStart = COORD{} + var coordEnd = COORD{} + + xCurrent, yCurrent := fromCoord.X, fromCoord.Y + xEnd, yEnd := toCoord.X, toCoord.Y + + // Clear any partial initial line + if xCurrent > 0 { + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yCurrent + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + xCurrent = 0 + yCurrent += 1 + } + + // Clear intervening rectangular section + if yCurrent < yEnd { + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yEnd-1 + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + xCurrent = 0 + yCurrent = yEnd + } + + // Clear remaining partial ending line + coordStart.X, coordStart.Y = xCurrent, yCurrent + coordEnd.X, coordEnd.Y = xEnd, yEnd + + err = h.clearRect(attributes, coordStart, coordEnd) + if err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) clearRect(attributes uint16, fromCoord COORD, toCoord COORD) error { + region := SMALL_RECT{Top: fromCoord.Y, Left: fromCoord.X, Bottom: toCoord.Y, Right: toCoord.X} + width := toCoord.X - fromCoord.X + 1 + height := toCoord.Y - fromCoord.Y + 1 + size := uint32(width) * uint32(height) + + if size <= 0 { + return nil + } + + buffer := make([]CHAR_INFO, size) + + char := CHAR_INFO{ansiterm.FILL_CHARACTER, attributes} + for i := 0; i < int(size); i++ { + buffer[i] = char + } + + err := WriteConsoleOutput(h.fd, buffer, COORD{X: width, Y: height}, COORD{X: 0, Y: 0}, ®ion) + if err != nil { + return err + } + + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/scroll_helper.go b/deps/github.com/Azure/go-ansiterm/winterm/scroll_helper.go new file mode 100644 index 000000000..706d27057 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/scroll_helper.go @@ -0,0 +1,118 @@ +// +build windows + +package winterm + +// effectiveSr gets the current effective scroll region in buffer coordinates +func (h *windowsAnsiEventHandler) effectiveSr(window SMALL_RECT) scrollRegion { + top := addInRange(window.Top, h.sr.top, window.Top, window.Bottom) + bottom := addInRange(window.Top, h.sr.bottom, window.Top, window.Bottom) + if top >= bottom { + top = window.Top + bottom = window.Bottom + } + return scrollRegion{top: top, bottom: bottom} +} + +func (h *windowsAnsiEventHandler) scrollUp(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + sr := h.effectiveSr(info.Window) + return h.scroll(param, sr, info) +} + +func (h *windowsAnsiEventHandler) scrollDown(param int) error { + return h.scrollUp(-param) +} + +func (h *windowsAnsiEventHandler) deleteLines(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + start := info.CursorPosition.Y + sr := h.effectiveSr(info.Window) + // Lines cannot be inserted or deleted outside the scrolling region. + if start >= sr.top && start <= sr.bottom { + sr.top = start + return h.scroll(param, sr, info) + } else { + return nil + } +} + +func (h *windowsAnsiEventHandler) insertLines(param int) error { + return h.deleteLines(-param) +} + +// scroll scrolls the provided scroll region by param lines. The scroll region is in buffer coordinates. +func (h *windowsAnsiEventHandler) scroll(param int, sr scrollRegion, info *CONSOLE_SCREEN_BUFFER_INFO) error { + logger.Infof("scroll: scrollTop: %d, scrollBottom: %d", sr.top, sr.bottom) + logger.Infof("scroll: windowTop: %d, windowBottom: %d", info.Window.Top, info.Window.Bottom) + + // Copy from and clip to the scroll region (full buffer width) + scrollRect := SMALL_RECT{ + Top: sr.top, + Bottom: sr.bottom, + Left: 0, + Right: info.Size.X - 1, + } + + // Origin to which area should be copied + destOrigin := COORD{ + X: 0, + Y: sr.top - int16(param), + } + + char := CHAR_INFO{ + UnicodeChar: ' ', + Attributes: h.attributes, + } + + if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { + return err + } + return nil +} + +func (h *windowsAnsiEventHandler) deleteCharacters(param int) error { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + return h.scrollLine(param, info.CursorPosition, info) +} + +func (h *windowsAnsiEventHandler) insertCharacters(param int) error { + return h.deleteCharacters(-param) +} + +// scrollLine scrolls a line horizontally starting at the provided position by a number of columns. +func (h *windowsAnsiEventHandler) scrollLine(columns int, position COORD, info *CONSOLE_SCREEN_BUFFER_INFO) error { + // Copy from and clip to the scroll region (full buffer width) + scrollRect := SMALL_RECT{ + Top: position.Y, + Bottom: position.Y, + Left: position.X, + Right: info.Size.X - 1, + } + + // Origin to which area should be copied + destOrigin := COORD{ + X: position.X - int16(columns), + Y: position.Y, + } + + char := CHAR_INFO{ + UnicodeChar: ' ', + Attributes: h.attributes, + } + + if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil { + return err + } + return nil +} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/utilities.go b/deps/github.com/Azure/go-ansiterm/winterm/utilities.go new file mode 100644 index 000000000..afa7635d7 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/utilities.go @@ -0,0 +1,9 @@ +// +build windows + +package winterm + +// AddInRange increments a value by the passed quantity while ensuring the values +// always remain within the supplied min / max range. +func addInRange(n int16, increment int16, min int16, max int16) int16 { + return ensureInRange(n+increment, min, max) +} diff --git a/deps/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/deps/github.com/Azure/go-ansiterm/winterm/win_event_handler.go new file mode 100644 index 000000000..48998bb05 --- /dev/null +++ b/deps/github.com/Azure/go-ansiterm/winterm/win_event_handler.go @@ -0,0 +1,726 @@ +// +build windows + +package winterm + +import ( + "bytes" + "io/ioutil" + "os" + "strconv" + + "github.com/Azure/go-ansiterm" + "github.com/sirupsen/logrus" +) + +var logger *logrus.Logger + +type windowsAnsiEventHandler struct { + fd uintptr + file *os.File + infoReset *CONSOLE_SCREEN_BUFFER_INFO + sr scrollRegion + buffer bytes.Buffer + attributes uint16 + inverted bool + wrapNext bool + drewMarginByte bool + originMode bool + marginByte byte + curInfo *CONSOLE_SCREEN_BUFFER_INFO + curPos COORD +} + +func CreateWinEventHandler(fd uintptr, file *os.File) ansiterm.AnsiEventHandler { + logFile := ioutil.Discard + + if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" { + logFile, _ = os.Create("winEventHandler.log") + } + + logger = &logrus.Logger{ + Out: logFile, + Formatter: new(logrus.TextFormatter), + Level: logrus.DebugLevel, + } + + infoReset, err := GetConsoleScreenBufferInfo(fd) + if err != nil { + return nil + } + + return &windowsAnsiEventHandler{ + fd: fd, + file: file, + infoReset: infoReset, + attributes: infoReset.Attributes, + } +} + +type scrollRegion struct { + top int16 + bottom int16 +} + +// simulateLF simulates a LF or CR+LF by scrolling if necessary to handle the +// current cursor position and scroll region settings, in which case it returns +// true. If no special handling is necessary, then it does nothing and returns +// false. +// +// In the false case, the caller should ensure that a carriage return +// and line feed are inserted or that the text is otherwise wrapped. +func (h *windowsAnsiEventHandler) simulateLF(includeCR bool) (bool, error) { + if h.wrapNext { + if err := h.Flush(); err != nil { + return false, err + } + h.clearWrap() + } + pos, info, err := h.getCurrentInfo() + if err != nil { + return false, err + } + sr := h.effectiveSr(info.Window) + if pos.Y == sr.bottom { + // Scrolling is necessary. Let Windows automatically scroll if the scrolling region + // is the full window. + if sr.top == info.Window.Top && sr.bottom == info.Window.Bottom { + if includeCR { + pos.X = 0 + h.updatePos(pos) + } + return false, nil + } + + // A custom scroll region is active. Scroll the window manually to simulate + // the LF. + if err := h.Flush(); err != nil { + return false, err + } + logger.Info("Simulating LF inside scroll region") + if err := h.scrollUp(1); err != nil { + return false, err + } + if includeCR { + pos.X = 0 + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return false, err + } + } + return true, nil + + } else if pos.Y < info.Window.Bottom { + // Let Windows handle the LF. + pos.Y++ + if includeCR { + pos.X = 0 + } + h.updatePos(pos) + return false, nil + } else { + // The cursor is at the bottom of the screen but outside the scroll + // region. Skip the LF. + logger.Info("Simulating LF outside scroll region") + if includeCR { + if err := h.Flush(); err != nil { + return false, err + } + pos.X = 0 + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return false, err + } + } + return true, nil + } +} + +// executeLF executes a LF without a CR. +func (h *windowsAnsiEventHandler) executeLF() error { + handled, err := h.simulateLF(false) + if err != nil { + return err + } + if !handled { + // Windows LF will reset the cursor column position. Write the LF + // and restore the cursor position. + pos, _, err := h.getCurrentInfo() + if err != nil { + return err + } + h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED) + if pos.X != 0 { + if err := h.Flush(); err != nil { + return err + } + logger.Info("Resetting cursor position for LF without CR") + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return err + } + } + } + return nil +} + +func (h *windowsAnsiEventHandler) Print(b byte) error { + if h.wrapNext { + h.buffer.WriteByte(h.marginByte) + h.clearWrap() + if _, err := h.simulateLF(true); err != nil { + return err + } + } + pos, info, err := h.getCurrentInfo() + if err != nil { + return err + } + if pos.X == info.Size.X-1 { + h.wrapNext = true + h.marginByte = b + } else { + pos.X++ + h.updatePos(pos) + h.buffer.WriteByte(b) + } + return nil +} + +func (h *windowsAnsiEventHandler) Execute(b byte) error { + switch b { + case ansiterm.ANSI_TAB: + logger.Info("Execute(TAB)") + // Move to the next tab stop, but preserve auto-wrap if already set. + if !h.wrapNext { + pos, info, err := h.getCurrentInfo() + if err != nil { + return err + } + pos.X = (pos.X + 8) - pos.X%8 + if pos.X >= info.Size.X { + pos.X = info.Size.X - 1 + } + if err := h.Flush(); err != nil { + return err + } + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return err + } + } + return nil + + case ansiterm.ANSI_BEL: + h.buffer.WriteByte(ansiterm.ANSI_BEL) + return nil + + case ansiterm.ANSI_BACKSPACE: + if h.wrapNext { + if err := h.Flush(); err != nil { + return err + } + h.clearWrap() + } + pos, _, err := h.getCurrentInfo() + if err != nil { + return err + } + if pos.X > 0 { + pos.X-- + h.updatePos(pos) + h.buffer.WriteByte(ansiterm.ANSI_BACKSPACE) + } + return nil + + case ansiterm.ANSI_VERTICAL_TAB, ansiterm.ANSI_FORM_FEED: + // Treat as true LF. + return h.executeLF() + + case ansiterm.ANSI_LINE_FEED: + // Simulate a CR and LF for now since there is no way in go-ansiterm + // to tell if the LF should include CR (and more things break when it's + // missing than when it's incorrectly added). + handled, err := h.simulateLF(true) + if handled || err != nil { + return err + } + return h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED) + + case ansiterm.ANSI_CARRIAGE_RETURN: + if h.wrapNext { + if err := h.Flush(); err != nil { + return err + } + h.clearWrap() + } + pos, _, err := h.getCurrentInfo() + if err != nil { + return err + } + if pos.X != 0 { + pos.X = 0 + h.updatePos(pos) + h.buffer.WriteByte(ansiterm.ANSI_CARRIAGE_RETURN) + } + return nil + + default: + return nil + } +} + +func (h *windowsAnsiEventHandler) CUU(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CUU: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorVertical(-param) +} + +func (h *windowsAnsiEventHandler) CUD(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CUD: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorVertical(param) +} + +func (h *windowsAnsiEventHandler) CUF(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CUF: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorHorizontal(param) +} + +func (h *windowsAnsiEventHandler) CUB(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CUB: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorHorizontal(-param) +} + +func (h *windowsAnsiEventHandler) CNL(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CNL: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorLine(param) +} + +func (h *windowsAnsiEventHandler) CPL(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CPL: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorLine(-param) +} + +func (h *windowsAnsiEventHandler) CHA(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CHA: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.moveCursorColumn(param) +} + +func (h *windowsAnsiEventHandler) VPA(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("VPA: [[%d]]", param) + h.clearWrap() + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + window := h.getCursorWindow(info) + position := info.CursorPosition + position.Y = window.Top + int16(param) - 1 + return h.setCursorPosition(position, window) +} + +func (h *windowsAnsiEventHandler) CUP(row int, col int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("CUP: [[%d %d]]", row, col) + h.clearWrap() + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + window := h.getCursorWindow(info) + position := COORD{window.Left + int16(col) - 1, window.Top + int16(row) - 1} + return h.setCursorPosition(position, window) +} + +func (h *windowsAnsiEventHandler) HVP(row int, col int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("HVP: [[%d %d]]", row, col) + h.clearWrap() + return h.CUP(row, col) +} + +func (h *windowsAnsiEventHandler) DECTCEM(visible bool) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("DECTCEM: [%v]", []string{strconv.FormatBool(visible)}) + h.clearWrap() + return nil +} + +func (h *windowsAnsiEventHandler) DECOM(enable bool) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("DECOM: [%v]", []string{strconv.FormatBool(enable)}) + h.clearWrap() + h.originMode = enable + return h.CUP(1, 1) +} + +func (h *windowsAnsiEventHandler) DECCOLM(use132 bool) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("DECCOLM: [%v]", []string{strconv.FormatBool(use132)}) + h.clearWrap() + if err := h.ED(2); err != nil { + return err + } + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + targetWidth := int16(80) + if use132 { + targetWidth = 132 + } + if info.Size.X < targetWidth { + if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil { + logger.Info("set buffer failed:", err) + return err + } + } + window := info.Window + window.Left = 0 + window.Right = targetWidth - 1 + if err := SetConsoleWindowInfo(h.fd, true, window); err != nil { + logger.Info("set window failed:", err) + return err + } + if info.Size.X > targetWidth { + if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil { + logger.Info("set buffer failed:", err) + return err + } + } + return SetConsoleCursorPosition(h.fd, COORD{0, 0}) +} + +func (h *windowsAnsiEventHandler) ED(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("ED: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + + // [J -- Erases from the cursor to the end of the screen, including the cursor position. + // [1J -- Erases from the beginning of the screen to the cursor, including the cursor position. + // [2J -- Erases the complete display. The cursor does not move. + // Notes: + // -- Clearing the entire buffer, versus just the Window, works best for Windows Consoles + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + var start COORD + var end COORD + + switch param { + case 0: + start = info.CursorPosition + end = COORD{info.Size.X - 1, info.Size.Y - 1} + + case 1: + start = COORD{0, 0} + end = info.CursorPosition + + case 2: + start = COORD{0, 0} + end = COORD{info.Size.X - 1, info.Size.Y - 1} + } + + err = h.clearRange(h.attributes, start, end) + if err != nil { + return err + } + + // If the whole buffer was cleared, move the window to the top while preserving + // the window-relative cursor position. + if param == 2 { + pos := info.CursorPosition + window := info.Window + pos.Y -= window.Top + window.Bottom -= window.Top + window.Top = 0 + if err := SetConsoleCursorPosition(h.fd, pos); err != nil { + return err + } + if err := SetConsoleWindowInfo(h.fd, true, window); err != nil { + return err + } + } + + return nil +} + +func (h *windowsAnsiEventHandler) EL(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("EL: [%v]", strconv.Itoa(param)) + h.clearWrap() + + // [K -- Erases from the cursor to the end of the line, including the cursor position. + // [1K -- Erases from the beginning of the line to the cursor, including the cursor position. + // [2K -- Erases the complete line. + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + var start COORD + var end COORD + + switch param { + case 0: + start = info.CursorPosition + end = COORD{info.Size.X, info.CursorPosition.Y} + + case 1: + start = COORD{0, info.CursorPosition.Y} + end = info.CursorPosition + + case 2: + start = COORD{0, info.CursorPosition.Y} + end = COORD{info.Size.X, info.CursorPosition.Y} + } + + err = h.clearRange(h.attributes, start, end) + if err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) IL(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("IL: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.insertLines(param) +} + +func (h *windowsAnsiEventHandler) DL(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("DL: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.deleteLines(param) +} + +func (h *windowsAnsiEventHandler) ICH(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("ICH: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.insertCharacters(param) +} + +func (h *windowsAnsiEventHandler) DCH(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("DCH: [%v]", strconv.Itoa(param)) + h.clearWrap() + return h.deleteCharacters(param) +} + +func (h *windowsAnsiEventHandler) SGR(params []int) error { + if err := h.Flush(); err != nil { + return err + } + strings := []string{} + for _, v := range params { + strings = append(strings, strconv.Itoa(v)) + } + + logger.Infof("SGR: [%v]", strings) + + if len(params) <= 0 { + h.attributes = h.infoReset.Attributes + h.inverted = false + } else { + for _, attr := range params { + + if attr == ansiterm.ANSI_SGR_RESET { + h.attributes = h.infoReset.Attributes + h.inverted = false + continue + } + + h.attributes, h.inverted = collectAnsiIntoWindowsAttributes(h.attributes, h.inverted, h.infoReset.Attributes, int16(attr)) + } + } + + attributes := h.attributes + if h.inverted { + attributes = invertAttributes(attributes) + } + err := SetConsoleTextAttribute(h.fd, attributes) + if err != nil { + return err + } + + return nil +} + +func (h *windowsAnsiEventHandler) SU(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("SU: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.scrollUp(param) +} + +func (h *windowsAnsiEventHandler) SD(param int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("SD: [%v]", []string{strconv.Itoa(param)}) + h.clearWrap() + return h.scrollDown(param) +} + +func (h *windowsAnsiEventHandler) DA(params []string) error { + logger.Infof("DA: [%v]", params) + // DA cannot be implemented because it must send data on the VT100 input stream, + // which is not available to go-ansiterm. + return nil +} + +func (h *windowsAnsiEventHandler) DECSTBM(top int, bottom int) error { + if err := h.Flush(); err != nil { + return err + } + logger.Infof("DECSTBM: [%d, %d]", top, bottom) + + // Windows is 0 indexed, Linux is 1 indexed + h.sr.top = int16(top - 1) + h.sr.bottom = int16(bottom - 1) + + // This command also moves the cursor to the origin. + h.clearWrap() + return h.CUP(1, 1) +} + +func (h *windowsAnsiEventHandler) RI() error { + if err := h.Flush(); err != nil { + return err + } + logger.Info("RI: []") + h.clearWrap() + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + sr := h.effectiveSr(info.Window) + if info.CursorPosition.Y == sr.top { + return h.scrollDown(1) + } + + return h.moveCursorVertical(-1) +} + +func (h *windowsAnsiEventHandler) IND() error { + logger.Info("IND: []") + return h.executeLF() +} + +func (h *windowsAnsiEventHandler) Flush() error { + h.curInfo = nil + if h.buffer.Len() > 0 { + logger.Infof("Flush: [%s]", h.buffer.Bytes()) + if _, err := h.buffer.WriteTo(h.file); err != nil { + return err + } + } + + if h.wrapNext && !h.drewMarginByte { + logger.Infof("Flush: drawing margin byte '%c'", h.marginByte) + + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return err + } + + charInfo := []CHAR_INFO{{UnicodeChar: uint16(h.marginByte), Attributes: info.Attributes}} + size := COORD{1, 1} + position := COORD{0, 0} + region := SMALL_RECT{Left: info.CursorPosition.X, Top: info.CursorPosition.Y, Right: info.CursorPosition.X, Bottom: info.CursorPosition.Y} + if err := WriteConsoleOutput(h.fd, charInfo, size, position, ®ion); err != nil { + return err + } + h.drewMarginByte = true + } + return nil +} + +// cacheConsoleInfo ensures that the current console screen information has been queried +// since the last call to Flush(). It must be called before accessing h.curInfo or h.curPos. +func (h *windowsAnsiEventHandler) getCurrentInfo() (COORD, *CONSOLE_SCREEN_BUFFER_INFO, error) { + if h.curInfo == nil { + info, err := GetConsoleScreenBufferInfo(h.fd) + if err != nil { + return COORD{}, nil, err + } + h.curInfo = info + h.curPos = info.CursorPosition + } + return h.curPos, h.curInfo, nil +} + +func (h *windowsAnsiEventHandler) updatePos(pos COORD) { + if h.curInfo == nil { + panic("failed to call getCurrentInfo before calling updatePos") + } + h.curPos = pos +} + +// clearWrap clears the state where the cursor is in the margin +// waiting for the next character before wrapping the line. This must +// be done before most operations that act on the cursor. +func (h *windowsAnsiEventHandler) clearWrap() { + h.wrapNext = false + h.drewMarginByte = false +} diff --git a/deps/github.com/Azure/go-autorest/autorest/adal/README.md b/deps/github.com/Azure/go-autorest/autorest/adal/README.md index 08966c9cf..7b0c4bc4d 100644 --- a/deps/github.com/Azure/go-autorest/autorest/adal/README.md +++ b/deps/github.com/Azure/go-autorest/autorest/adal/README.md @@ -1,19 +1,24 @@ -# Azure Active Directory library for Go +# Azure Active Directory authentication for Go -This project provides a stand alone Azure Active Directory library for Go. The code was extracted -from [go-autorest](https://github.com/Azure/go-autorest/) project, which is used as a base for -[azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go). +This is a standalone package for authenticating with Azure Active +Directory from other Go libraries and applications, in particular the [Azure SDK +for Go](https://github.com/Azure/azure-sdk-for-go). +Note: Despite the package's name it is not related to other "ADAL" libraries +maintained in the [github.com/AzureAD](https://github.com/AzureAD) org. Issues +should be opened in [this repo's](https://github.com/Azure/go-autorest/issues) +or [the SDK's](https://github.com/Azure/azure-sdk-for-go/issues) issue +trackers. -## Installation +## Install -``` +```bash go get -u github.com/Azure/go-autorest/autorest/adal ``` ## Usage -An Active Directory application is required in order to use this library. An application can be registered in the [Azure Portal](https://portal.azure.com/) follow these [guidelines](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications) or using the [Azure CLI](https://github.com/Azure/azure-cli). +An Active Directory application is required in order to use this library. An application can be registered in the [Azure Portal](https://portal.azure.com/) by following these [guidelines](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications) or using the [Azure CLI](https://github.com/Azure/azure-cli). ### Register an Azure AD Application with secret diff --git a/deps/github.com/Azure/go-autorest/autorest/adal/config.go b/deps/github.com/Azure/go-autorest/autorest/adal/config.go index f570d540a..bee5e61dd 100644 --- a/deps/github.com/Azure/go-autorest/autorest/adal/config.go +++ b/deps/github.com/Azure/go-autorest/autorest/adal/config.go @@ -26,10 +26,10 @@ const ( // OAuthConfig represents the endpoints needed // in OAuth operations type OAuthConfig struct { - AuthorityEndpoint url.URL - AuthorizeEndpoint url.URL - TokenEndpoint url.URL - DeviceCodeEndpoint url.URL + AuthorityEndpoint url.URL `json:"authorityEndpoint"` + AuthorizeEndpoint url.URL `json:"authorizeEndpoint"` + TokenEndpoint url.URL `json:"tokenEndpoint"` + DeviceCodeEndpoint url.URL `json:"deviceCodeEndpoint"` } // IsZero returns true if the OAuthConfig object is zero-initialized. diff --git a/deps/github.com/Azure/go-autorest/autorest/adal/msi.go b/deps/github.com/Azure/go-autorest/autorest/adal/msi.go deleted file mode 100644 index 5e02d52ac..000000000 --- a/deps/github.com/Azure/go-autorest/autorest/adal/msi.go +++ /dev/null @@ -1,20 +0,0 @@ -// +build !windows - -package adal - -// Copyright 2017 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// msiPath is the path to the MSI Extension settings file (to discover the endpoint) -var msiPath = "/var/lib/waagent/ManagedIdentity-Settings" diff --git a/deps/github.com/Azure/go-autorest/autorest/adal/msi_windows.go b/deps/github.com/Azure/go-autorest/autorest/adal/msi_windows.go deleted file mode 100644 index 261b56882..000000000 --- a/deps/github.com/Azure/go-autorest/autorest/adal/msi_windows.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build windows - -package adal - -// Copyright 2017 Microsoft Corporation -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import ( - "os" - "strings" -) - -// msiPath is the path to the MSI Extension settings file (to discover the endpoint) -var msiPath = strings.Join([]string{os.Getenv("SystemDrive"), "WindowsAzure/Config/ManagedIdentity-Settings"}, "/") diff --git a/deps/github.com/Azure/go-autorest/autorest/adal/token.go b/deps/github.com/Azure/go-autorest/autorest/adal/token.go index 941af281b..32aea8389 100644 --- a/deps/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/deps/github.com/Azure/go-autorest/autorest/adal/token.go @@ -15,14 +15,18 @@ package adal // limitations under the License. import ( + "context" "crypto/rand" "crypto/rsa" "crypto/sha1" "crypto/x509" "encoding/base64" "encoding/json" + "errors" "fmt" "io/ioutil" + "math" + "net" "net/http" "net/url" "strconv" @@ -31,6 +35,7 @@ import ( "time" "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/version" "github.com/dgrijalva/jwt-go" ) @@ -54,6 +59,12 @@ const ( // metadataHeader is the header required by MSI extension metadataHeader = "Metadata" + + // msiEndpoint is the well known endpoint for getting MSI authentications tokens + msiEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token" + + // the default number of attempts to refresh an MSI authentication token + defaultMaxMSIRefreshAttempts = 5 ) // OAuthTokenProvider is an interface which should be implemented by an access token retriever @@ -74,6 +85,13 @@ type Refresher interface { EnsureFresh() error } +// RefresherWithContext is an interface for token refresh functionality +type RefresherWithContext interface { + RefreshWithContext(ctx context.Context) error + RefreshExchangeWithContext(ctx context.Context, resource string) error + EnsureFreshWithContext(ctx context.Context) error +} + // TokenRefreshCallback is the type representing callbacks that will be called after // a successful token refresh type TokenRefreshCallback func(Token) error @@ -124,6 +142,12 @@ func (t *Token) OAuthToken() string { return t.AccessToken } +// ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form +// that is submitted when acquiring an oAuth token. +type ServicePrincipalSecret interface { + SetAuthenticationValues(spt *ServicePrincipalToken, values *url.Values) error +} + // ServicePrincipalNoSecret represents a secret type that contains no secret // meaning it is not valid for fetching a fresh token. This is used by Manual type ServicePrincipalNoSecret struct { @@ -135,15 +159,19 @@ func (noSecret *ServicePrincipalNoSecret) SetAuthenticationValues(spt *ServicePr return fmt.Errorf("Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token") } -// ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form -// that is submitted when acquiring an oAuth token. -type ServicePrincipalSecret interface { - SetAuthenticationValues(spt *ServicePrincipalToken, values *url.Values) error +// MarshalJSON implements the json.Marshaler interface. +func (noSecret ServicePrincipalNoSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalNoSecret", + }) } // ServicePrincipalTokenSecret implements ServicePrincipalSecret for client_secret type authorization. type ServicePrincipalTokenSecret struct { - ClientSecret string + ClientSecret string `json:"value"` } // SetAuthenticationValues is a method of the interface ServicePrincipalSecret. @@ -153,49 +181,24 @@ func (tokenSecret *ServicePrincipalTokenSecret) SetAuthenticationValues(spt *Ser return nil } +// MarshalJSON implements the json.Marshaler interface. +func (tokenSecret ServicePrincipalTokenSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + Value string `json:"value"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalTokenSecret", + Value: tokenSecret.ClientSecret, + }) +} + // ServicePrincipalCertificateSecret implements ServicePrincipalSecret for generic RSA cert auth with signed JWTs. type ServicePrincipalCertificateSecret struct { Certificate *x509.Certificate PrivateKey *rsa.PrivateKey } -// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension. -type ServicePrincipalMSISecret struct { -} - -// ServicePrincipalUsernamePasswordSecret implements ServicePrincipalSecret for username and password auth. -type ServicePrincipalUsernamePasswordSecret struct { - Username string - Password string -} - -// ServicePrincipalAuthorizationCodeSecret implements ServicePrincipalSecret for authorization code auth. -type ServicePrincipalAuthorizationCodeSecret struct { - ClientSecret string - AuthorizationCode string - RedirectURI string -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (secret *ServicePrincipalAuthorizationCodeSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - v.Set("code", secret.AuthorizationCode) - v.Set("client_secret", secret.ClientSecret) - v.Set("redirect_uri", secret.RedirectURI) - return nil -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (secret *ServicePrincipalUsernamePasswordSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - v.Set("username", secret.Username) - v.Set("password", secret.Password) - return nil -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - return nil -} - // SignJwt returns the JWT signed with the certificate's private key. func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalToken) (string, error) { hasher := sha1.New() @@ -216,9 +219,9 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo token := jwt.New(jwt.SigningMethodRS256) token.Header["x5t"] = thumbprint token.Claims = jwt.MapClaims{ - "aud": spt.oauthConfig.TokenEndpoint.String(), - "iss": spt.clientID, - "sub": spt.clientID, + "aud": spt.inner.OauthConfig.TokenEndpoint.String(), + "iss": spt.inner.ClientID, + "sub": spt.inner.ClientID, "jti": base64.URLEncoding.EncodeToString(jti), "nbf": time.Now().Unix(), "exp": time.Now().Add(time.Hour * 24).Unix(), @@ -241,20 +244,151 @@ func (secret *ServicePrincipalCertificateSecret) SetAuthenticationValues(spt *Se return nil } +// MarshalJSON implements the json.Marshaler interface. +func (secret ServicePrincipalCertificateSecret) MarshalJSON() ([]byte, error) { + return nil, errors.New("marshalling ServicePrincipalCertificateSecret is not supported") +} + +// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension. +type ServicePrincipalMSISecret struct { +} + +// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. +func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (msiSecret ServicePrincipalMSISecret) MarshalJSON() ([]byte, error) { + return nil, errors.New("marshalling ServicePrincipalMSISecret is not supported") +} + +// ServicePrincipalUsernamePasswordSecret implements ServicePrincipalSecret for username and password auth. +type ServicePrincipalUsernamePasswordSecret struct { + Username string `json:"username"` + Password string `json:"password"` +} + +// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. +func (secret *ServicePrincipalUsernamePasswordSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { + v.Set("username", secret.Username) + v.Set("password", secret.Password) + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (secret ServicePrincipalUsernamePasswordSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + Username string `json:"username"` + Password string `json:"password"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalUsernamePasswordSecret", + Username: secret.Username, + Password: secret.Password, + }) +} + +// ServicePrincipalAuthorizationCodeSecret implements ServicePrincipalSecret for authorization code auth. +type ServicePrincipalAuthorizationCodeSecret struct { + ClientSecret string `json:"value"` + AuthorizationCode string `json:"authCode"` + RedirectURI string `json:"redirect"` +} + +// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. +func (secret *ServicePrincipalAuthorizationCodeSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { + v.Set("code", secret.AuthorizationCode) + v.Set("client_secret", secret.ClientSecret) + v.Set("redirect_uri", secret.RedirectURI) + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (secret ServicePrincipalAuthorizationCodeSecret) MarshalJSON() ([]byte, error) { + type tokenType struct { + Type string `json:"type"` + Value string `json:"value"` + AuthCode string `json:"authCode"` + Redirect string `json:"redirect"` + } + return json.Marshal(tokenType{ + Type: "ServicePrincipalAuthorizationCodeSecret", + Value: secret.ClientSecret, + AuthCode: secret.AuthorizationCode, + Redirect: secret.RedirectURI, + }) +} + // ServicePrincipalToken encapsulates a Token created for a Service Principal. type ServicePrincipalToken struct { - Token + inner servicePrincipalToken + refreshLock *sync.RWMutex + sender Sender + refreshCallbacks []TokenRefreshCallback + // MaxMSIRefreshAttempts is the maximum number of attempts to refresh an MSI token. + MaxMSIRefreshAttempts int +} - secret ServicePrincipalSecret - oauthConfig OAuthConfig - clientID string - resource string - autoRefresh bool - autoRefreshLock *sync.Mutex - refreshWithin time.Duration - sender Sender +// MarshalTokenJSON returns the marshalled inner token. +func (spt ServicePrincipalToken) MarshalTokenJSON() ([]byte, error) { + return json.Marshal(spt.inner.Token) +} - refreshCallbacks []TokenRefreshCallback +// SetRefreshCallbacks replaces any existing refresh callbacks with the specified callbacks. +func (spt *ServicePrincipalToken) SetRefreshCallbacks(callbacks []TokenRefreshCallback) { + spt.refreshCallbacks = callbacks +} + +// MarshalJSON implements the json.Marshaler interface. +func (spt ServicePrincipalToken) MarshalJSON() ([]byte, error) { + return json.Marshal(spt.inner) +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (spt *ServicePrincipalToken) UnmarshalJSON(data []byte) error { + // need to determine the token type + raw := map[string]interface{}{} + err := json.Unmarshal(data, &raw) + if err != nil { + return err + } + secret := raw["secret"].(map[string]interface{}) + switch secret["type"] { + case "ServicePrincipalNoSecret": + spt.inner.Secret = &ServicePrincipalNoSecret{} + case "ServicePrincipalTokenSecret": + spt.inner.Secret = &ServicePrincipalTokenSecret{} + case "ServicePrincipalCertificateSecret": + return errors.New("unmarshalling ServicePrincipalCertificateSecret is not supported") + case "ServicePrincipalMSISecret": + return errors.New("unmarshalling ServicePrincipalMSISecret is not supported") + case "ServicePrincipalUsernamePasswordSecret": + spt.inner.Secret = &ServicePrincipalUsernamePasswordSecret{} + case "ServicePrincipalAuthorizationCodeSecret": + spt.inner.Secret = &ServicePrincipalAuthorizationCodeSecret{} + default: + return fmt.Errorf("unrecognized token type '%s'", secret["type"]) + } + err = json.Unmarshal(data, &spt.inner) + if err != nil { + return err + } + spt.refreshLock = &sync.RWMutex{} + spt.sender = &http.Client{} + return nil +} + +// internal type used for marshalling/unmarshalling +type servicePrincipalToken struct { + Token Token `json:"token"` + Secret ServicePrincipalSecret `json:"secret"` + OauthConfig OAuthConfig `json:"oauth"` + ClientID string `json:"clientID"` + Resource string `json:"resource"` + AutoRefresh bool `json:"autoRefresh"` + RefreshWithin time.Duration `json:"refreshWithin"` } func validateOAuthConfig(oac OAuthConfig) error { @@ -279,13 +413,15 @@ func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, reso return nil, fmt.Errorf("parameter 'secret' cannot be nil") } spt := &ServicePrincipalToken{ - oauthConfig: oauthConfig, - secret: secret, - clientID: id, - resource: resource, - autoRefresh: true, - autoRefreshLock: &sync.Mutex{}, - refreshWithin: defaultRefresh, + inner: servicePrincipalToken{ + OauthConfig: oauthConfig, + Secret: secret, + ClientID: id, + Resource: resource, + AutoRefresh: true, + RefreshWithin: defaultRefresh, + }, + refreshLock: &sync.RWMutex{}, sender: &http.Client{}, refreshCallbacks: callbacks, } @@ -316,7 +452,39 @@ func NewServicePrincipalTokenFromManualToken(oauthConfig OAuthConfig, clientID s return nil, err } - spt.Token = token + spt.inner.Token = token + + return spt, nil +} + +// NewServicePrincipalTokenFromManualTokenSecret creates a ServicePrincipalToken using the supplied token and secret +func NewServicePrincipalTokenFromManualTokenSecret(oauthConfig OAuthConfig, clientID string, resource string, token Token, secret ServicePrincipalSecret, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { + if err := validateOAuthConfig(oauthConfig); err != nil { + return nil, err + } + if err := validateStringParam(clientID, "clientID"); err != nil { + return nil, err + } + if err := validateStringParam(resource, "resource"); err != nil { + return nil, err + } + if secret == nil { + return nil, fmt.Errorf("parameter 'secret' cannot be nil") + } + if token.IsZero() { + return nil, fmt.Errorf("parameter 'token' cannot be zero-initialized") + } + spt, err := NewServicePrincipalTokenWithSecret( + oauthConfig, + clientID, + resource, + secret, + callbacks...) + if err != nil { + return nil, err + } + + spt.inner.Token = token return spt, nil } @@ -442,24 +610,7 @@ func NewServicePrincipalTokenFromAuthorizationCode(oauthConfig OAuthConfig, clie // GetMSIVMEndpoint gets the MSI endpoint on Virtual Machines. func GetMSIVMEndpoint() (string, error) { - return getMSIVMEndpoint(msiPath) -} - -func getMSIVMEndpoint(path string) (string, error) { - // Read MSI settings - bytes, err := ioutil.ReadFile(path) - if err != nil { - return "", err - } - msiSettings := struct { - URL string `json:"url"` - }{} - err = json.Unmarshal(bytes, &msiSettings) - if err != nil { - return "", err - } - - return msiSettings.URL, nil + return msiEndpoint, nil } // NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension. @@ -492,24 +643,32 @@ func newServicePrincipalTokenFromMSI(msiEndpoint, resource string, userAssignedI return nil, err } - oauthConfig, err := NewOAuthConfig(msiEndpointURL.String(), "") - if err != nil { - return nil, err + v := url.Values{} + v.Set("resource", resource) + v.Set("api-version", "2018-02-01") + if userAssignedID != nil { + v.Set("client_id", *userAssignedID) } + msiEndpointURL.RawQuery = v.Encode() spt := &ServicePrincipalToken{ - oauthConfig: *oauthConfig, - secret: &ServicePrincipalMSISecret{}, - resource: resource, - autoRefresh: true, - autoRefreshLock: &sync.Mutex{}, - refreshWithin: defaultRefresh, - sender: &http.Client{}, - refreshCallbacks: callbacks, + inner: servicePrincipalToken{ + OauthConfig: OAuthConfig{ + TokenEndpoint: *msiEndpointURL, + }, + Secret: &ServicePrincipalMSISecret{}, + Resource: resource, + AutoRefresh: true, + RefreshWithin: defaultRefresh, + }, + refreshLock: &sync.RWMutex{}, + sender: &http.Client{}, + refreshCallbacks: callbacks, + MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts, } if userAssignedID != nil { - spt.clientID = *userAssignedID + spt.inner.ClientID = *userAssignedID } return spt, nil @@ -538,12 +697,18 @@ func newTokenRefreshError(message string, resp *http.Response) TokenRefreshError // EnsureFresh will refresh the token if it will expire within the refresh window (as set by // RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use. func (spt *ServicePrincipalToken) EnsureFresh() error { - if spt.autoRefresh && spt.WillExpireIn(spt.refreshWithin) { - // take the lock then check to see if the token was already refreshed - spt.autoRefreshLock.Lock() - defer spt.autoRefreshLock.Unlock() - if spt.WillExpireIn(spt.refreshWithin) { - return spt.Refresh() + return spt.EnsureFreshWithContext(context.Background()) +} + +// EnsureFreshWithContext will refresh the token if it will expire within the refresh window (as set by +// RefreshWithin) and autoRefresh flag is on. This method is safe for concurrent use. +func (spt *ServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error { + if spt.inner.AutoRefresh && spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) { + // take the write lock then check to see if the token was already refreshed + spt.refreshLock.Lock() + defer spt.refreshLock.Unlock() + if spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) { + return spt.refreshInternal(ctx, spt.inner.Resource) } } return nil @@ -553,7 +718,7 @@ func (spt *ServicePrincipalToken) EnsureFresh() error { func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error { if spt.refreshCallbacks != nil { for _, callback := range spt.refreshCallbacks { - err := callback(spt.Token) + err := callback(spt.inner.Token) if err != nil { return fmt.Errorf("adal: TokenRefreshCallback handler failed. Error = '%v'", err) } @@ -565,17 +730,33 @@ func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error { // Refresh obtains a fresh token for the Service Principal. // This method is not safe for concurrent use and should be syncrhonized. func (spt *ServicePrincipalToken) Refresh() error { - return spt.refreshInternal(spt.resource) + return spt.RefreshWithContext(context.Background()) +} + +// RefreshWithContext obtains a fresh token for the Service Principal. +// This method is not safe for concurrent use and should be syncrhonized. +func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error { + spt.refreshLock.Lock() + defer spt.refreshLock.Unlock() + return spt.refreshInternal(ctx, spt.inner.Resource) } // RefreshExchange refreshes the token, but for a different resource. // This method is not safe for concurrent use and should be syncrhonized. func (spt *ServicePrincipalToken) RefreshExchange(resource string) error { - return spt.refreshInternal(resource) + return spt.RefreshExchangeWithContext(context.Background(), resource) +} + +// RefreshExchangeWithContext refreshes the token, but for a different resource. +// This method is not safe for concurrent use and should be syncrhonized. +func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error { + spt.refreshLock.Lock() + defer spt.refreshLock.Unlock() + return spt.refreshInternal(ctx, resource) } func (spt *ServicePrincipalToken) getGrantType() string { - switch spt.secret.(type) { + switch spt.inner.Secret.(type) { case *ServicePrincipalUsernamePasswordSecret: return OAuthGrantTypeUserPass case *ServicePrincipalAuthorizationCodeSecret: @@ -585,37 +766,65 @@ func (spt *ServicePrincipalToken) getGrantType() string { } } -func (spt *ServicePrincipalToken) refreshInternal(resource string) error { - v := url.Values{} - v.Set("client_id", spt.clientID) - v.Set("resource", resource) - - if spt.RefreshToken != "" { - v.Set("grant_type", OAuthGrantTypeRefreshToken) - v.Set("refresh_token", spt.RefreshToken) - } else { - v.Set("grant_type", spt.getGrantType()) - err := spt.secret.SetAuthenticationValues(spt, &v) - if err != nil { - return err - } +func isIMDS(u url.URL) bool { + imds, err := url.Parse(msiEndpoint) + if err != nil { + return false } + return u.Host == imds.Host && u.Path == imds.Path +} - s := v.Encode() - body := ioutil.NopCloser(strings.NewReader(s)) - req, err := http.NewRequest(http.MethodPost, spt.oauthConfig.TokenEndpoint.String(), body) +func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error { + req, err := http.NewRequest(http.MethodPost, spt.inner.OauthConfig.TokenEndpoint.String(), nil) if err != nil { return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err) } + req.Header.Add("User-Agent", version.UserAgent()) + req = req.WithContext(ctx) + if !isIMDS(spt.inner.OauthConfig.TokenEndpoint) { + v := url.Values{} + v.Set("client_id", spt.inner.ClientID) + v.Set("resource", resource) + + if spt.inner.Token.RefreshToken != "" { + v.Set("grant_type", OAuthGrantTypeRefreshToken) + v.Set("refresh_token", spt.inner.Token.RefreshToken) + // web apps must specify client_secret when refreshing tokens + // see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#refreshing-the-access-tokens + if spt.getGrantType() == OAuthGrantTypeAuthorizationCode { + err := spt.inner.Secret.SetAuthenticationValues(spt, &v) + if err != nil { + return err + } + } + } else { + v.Set("grant_type", spt.getGrantType()) + err := spt.inner.Secret.SetAuthenticationValues(spt, &v) + if err != nil { + return err + } + } - req.ContentLength = int64(len(s)) - req.Header.Set(contentType, mimeTypeFormPost) - if _, ok := spt.secret.(*ServicePrincipalMSISecret); ok { + s := v.Encode() + body := ioutil.NopCloser(strings.NewReader(s)) + req.ContentLength = int64(len(s)) + req.Header.Set(contentType, mimeTypeFormPost) + req.Body = body + } + + if _, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok { + req.Method = http.MethodGet req.Header.Set(metadataHeader, "true") } - resp, err := spt.sender.Do(req) + + var resp *http.Response + if isIMDS(spt.inner.OauthConfig.TokenEndpoint) { + resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts) + } else { + resp, err = spt.sender.Do(req) + } if err != nil { - return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err) + return newTokenRefreshError(fmt.Sprintf("adal: Failed to execute the refresh request. Error = '%v'", err), nil) } defer resp.Body.Close() @@ -623,11 +832,15 @@ func (spt *ServicePrincipalToken) refreshInternal(resource string) error { if resp.StatusCode != http.StatusOK { if err != nil { - return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Failed reading response body", resp.StatusCode), resp) + return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Failed reading response body: %v", resp.StatusCode, err), resp) } return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Response body: %s", resp.StatusCode, string(rb)), resp) } + // for the following error cases don't return a TokenRefreshError. the operation succeeded + // but some transient failure happened during deserialization. by returning a generic error + // the retry logic will kick in (we don't retry on TokenRefreshError). + if err != nil { return fmt.Errorf("adal: Failed to read a new service principal token during refresh. Error = '%v'", err) } @@ -640,23 +853,116 @@ func (spt *ServicePrincipalToken) refreshInternal(resource string) error { return fmt.Errorf("adal: Failed to unmarshal the service principal token during refresh. Error = '%v' JSON = '%s'", err, string(rb)) } - spt.Token = token + spt.inner.Token = token return spt.InvokeRefreshCallbacks(token) } +// retry logic specific to retrieving a token from the IMDS endpoint +func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http.Response, err error) { + // copied from client.go due to circular dependency + retries := []int{ + http.StatusRequestTimeout, // 408 + http.StatusTooManyRequests, // 429 + http.StatusInternalServerError, // 500 + http.StatusBadGateway, // 502 + http.StatusServiceUnavailable, // 503 + http.StatusGatewayTimeout, // 504 + } + // extra retry status codes specific to IMDS + retries = append(retries, + http.StatusNotFound, + http.StatusGone, + // all remaining 5xx + http.StatusNotImplemented, + http.StatusHTTPVersionNotSupported, + http.StatusVariantAlsoNegotiates, + http.StatusInsufficientStorage, + http.StatusLoopDetected, + http.StatusNotExtended, + http.StatusNetworkAuthenticationRequired) + + // see https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/how-to-use-vm-token#retry-guidance + + const maxDelay time.Duration = 60 * time.Second + + attempt := 0 + delay := time.Duration(0) + + for attempt < maxAttempts { + resp, err = sender.Do(req) + // retry on temporary network errors, e.g. transient network failures. + // if we don't receive a response then assume we can't connect to the + // endpoint so we're likely not running on an Azure VM so don't retry. + if (err != nil && !isTemporaryNetworkError(err)) || resp == nil || resp.StatusCode == http.StatusOK || !containsInt(retries, resp.StatusCode) { + return + } + + // perform exponential backoff with a cap. + // must increment attempt before calculating delay. + attempt++ + // the base value of 2 is the "delta backoff" as specified in the guidance doc + delay += (time.Duration(math.Pow(2, float64(attempt))) * time.Second) + if delay > maxDelay { + delay = maxDelay + } + + select { + case <-time.After(delay): + // intentionally left blank + case <-req.Context().Done(): + err = req.Context().Err() + return + } + } + return +} + +// returns true if the specified error is a temporary network error or false if it's not. +// if the error doesn't implement the net.Error interface the return value is true. +func isTemporaryNetworkError(err error) bool { + if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) { + return true + } + return false +} + +// returns true if slice ints contains the value n +func containsInt(ints []int, n int) bool { + for _, i := range ints { + if i == n { + return true + } + } + return false +} + // SetAutoRefresh enables or disables automatic refreshing of stale tokens. func (spt *ServicePrincipalToken) SetAutoRefresh(autoRefresh bool) { - spt.autoRefresh = autoRefresh + spt.inner.AutoRefresh = autoRefresh } // SetRefreshWithin sets the interval within which if the token will expire, EnsureFresh will // refresh the token. func (spt *ServicePrincipalToken) SetRefreshWithin(d time.Duration) { - spt.refreshWithin = d + spt.inner.RefreshWithin = d return } // SetSender sets the http.Client used when obtaining the Service Principal token. An // undecorated http.Client is used by default. func (spt *ServicePrincipalToken) SetSender(s Sender) { spt.sender = s } + +// OAuthToken implements the OAuthTokenProvider interface. It returns the current access token. +func (spt *ServicePrincipalToken) OAuthToken() string { + spt.refreshLock.RLock() + defer spt.refreshLock.RUnlock() + return spt.inner.Token.OAuthToken() +} + +// Token returns a copy of the current token. +func (spt *ServicePrincipalToken) Token() Token { + spt.refreshLock.RLock() + defer spt.refreshLock.RUnlock() + return spt.inner.Token +} diff --git a/deps/github.com/Azure/go-autorest/autorest/authorization.go b/deps/github.com/Azure/go-autorest/autorest/authorization.go index 4a602f676..77eff45bd 100644 --- a/deps/github.com/Azure/go-autorest/autorest/authorization.go +++ b/deps/github.com/Azure/go-autorest/autorest/authorization.go @@ -104,10 +104,6 @@ func NewBearerAuthorizer(tp adal.OAuthTokenProvider) *BearerAuthorizer { return &BearerAuthorizer{tokenProvider: tp} } -func (ba *BearerAuthorizer) withBearerAuthorization() PrepareDecorator { - return WithHeader(headerAuthorization, fmt.Sprintf("Bearer %s", ba.tokenProvider.OAuthToken())) -} - // WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose // value is "Bearer " followed by the token. // @@ -115,9 +111,14 @@ func (ba *BearerAuthorizer) withBearerAuthorization() PrepareDecorator { func (ba *BearerAuthorizer) WithAuthorization() PrepareDecorator { return func(p Preparer) Preparer { return PreparerFunc(func(r *http.Request) (*http.Request, error) { - refresher, ok := ba.tokenProvider.(adal.Refresher) - if ok { - err := refresher.EnsureFresh() + r, err := p.Prepare(r) + if err == nil { + // the ordering is important here, prefer RefresherWithContext if available + if refresher, ok := ba.tokenProvider.(adal.RefresherWithContext); ok { + err = refresher.EnsureFreshWithContext(r.Context()) + } else if refresher, ok := ba.tokenProvider.(adal.Refresher); ok { + err = refresher.EnsureFresh() + } if err != nil { var resp *http.Response if tokError, ok := err.(adal.TokenRefreshError); ok { @@ -126,8 +127,9 @@ func (ba *BearerAuthorizer) WithAuthorization() PrepareDecorator { return r, NewErrorWithError(err, "azure.BearerAuthorizer", "WithAuthorization", resp, "Failed to refresh the Token for request to %s", r.URL) } + return Prepare(r, WithHeader(headerAuthorization, fmt.Sprintf("Bearer %s", ba.tokenProvider.OAuthToken()))) } - return (ba.withBearerAuthorization()(p)).Prepare(r) + return r, err }) } } @@ -157,25 +159,28 @@ func NewBearerAuthorizerCallback(sender Sender, callback BearerAuthorizerCallbac func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { return func(p Preparer) Preparer { return PreparerFunc(func(r *http.Request) (*http.Request, error) { - // make a copy of the request and remove the body as it's not - // required and avoids us having to create a copy of it. - rCopy := *r - removeRequestBody(&rCopy) - - resp, err := bacb.sender.Do(&rCopy) - if err == nil && resp.StatusCode == 401 { - defer resp.Body.Close() - if hasBearerChallenge(resp) { - bc, err := newBearerChallenge(resp) - if err != nil { - return r, err - } - if bacb.callback != nil { - ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) + r, err := p.Prepare(r) + if err == nil { + // make a copy of the request and remove the body as it's not + // required and avoids us having to create a copy of it. + rCopy := *r + removeRequestBody(&rCopy) + + resp, err := bacb.sender.Do(&rCopy) + if err == nil && resp.StatusCode == 401 { + defer resp.Body.Close() + if hasBearerChallenge(resp) { + bc, err := newBearerChallenge(resp) if err != nil { return r, err } - return ba.WithAuthorization()(p).Prepare(r) + if bacb.callback != nil { + ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) + if err != nil { + return r, err + } + return Prepare(r, ba.WithAuthorization()) + } } } } diff --git a/deps/github.com/Azure/go-autorest/autorest/autorest.go b/deps/github.com/Azure/go-autorest/autorest/autorest.go index f86b66a41..aafdf021f 100644 --- a/deps/github.com/Azure/go-autorest/autorest/autorest.go +++ b/deps/github.com/Azure/go-autorest/autorest/autorest.go @@ -72,6 +72,7 @@ package autorest // limitations under the License. import ( + "context" "net/http" "time" ) @@ -130,3 +131,20 @@ func NewPollingRequest(resp *http.Response, cancel <-chan struct{}) (*http.Reque return req, nil } + +// NewPollingRequestWithContext allocates and returns a new http.Request with the specified context to poll for the passed response. +func NewPollingRequestWithContext(ctx context.Context, resp *http.Response) (*http.Request, error) { + location := GetLocation(resp) + if location == "" { + return nil, NewErrorWithResponse("autorest", "NewPollingRequestWithContext", resp, "Location header missing from response that requires polling") + } + + req, err := Prepare((&http.Request{}).WithContext(ctx), + AsGet(), + WithBaseURL(location)) + if err != nil { + return nil, NewErrorWithError(err, "autorest", "NewPollingRequestWithContext", nil, "Failure creating poll request to %s", location) + } + + return req, nil +} diff --git a/deps/github.com/Azure/go-autorest/autorest/azure/async.go b/deps/github.com/Azure/go-autorest/autorest/azure/async.go index 366fc5379..cda1e180a 100644 --- a/deps/github.com/Azure/go-autorest/autorest/azure/async.go +++ b/deps/github.com/Azure/go-autorest/autorest/azure/async.go @@ -21,11 +21,11 @@ import ( "fmt" "io/ioutil" "net/http" + "net/url" "strings" "time" "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/date" ) const ( @@ -44,58 +44,85 @@ var pollingCodes = [...]int{http.StatusNoContent, http.StatusAccepted, http.Stat // Future provides a mechanism to access the status and results of an asynchronous request. // Since futures are stateful they should be passed by value to avoid race conditions. type Future struct { - req *http.Request - resp *http.Response - ps pollingState + req *http.Request // legacy + pt pollingTracker } // NewFuture returns a new Future object initialized with the specified request. +// Deprecated: Please use NewFutureFromResponse instead. func NewFuture(req *http.Request) Future { return Future{req: req} } -// Response returns the last HTTP response or nil if there isn't one. +// NewFutureFromResponse returns a new Future object initialized +// with the initial response from an asynchronous operation. +func NewFutureFromResponse(resp *http.Response) (Future, error) { + pt, err := createPollingTracker(resp) + if err != nil { + return Future{}, err + } + return Future{pt: pt}, nil +} + +// Response returns the last HTTP response. func (f Future) Response() *http.Response { - return f.resp + if f.pt == nil { + return nil + } + return f.pt.latestResponse() } // Status returns the last status message of the operation. func (f Future) Status() string { - if f.ps.State == "" { - return "Unknown" + if f.pt == nil { + return "" } - return f.ps.State + return f.pt.pollingStatus() } // PollingMethod returns the method used to monitor the status of the asynchronous operation. func (f Future) PollingMethod() PollingMethodType { - return f.ps.PollingMethod + if f.pt == nil { + return PollingUnknown + } + return f.pt.pollingMethod() } // Done queries the service to see if the operation has completed. func (f *Future) Done(sender autorest.Sender) (bool, error) { - // exit early if this future has terminated - if f.ps.hasTerminated() { - return true, f.errorInfo() + // support for legacy Future implementation + if f.req != nil { + resp, err := sender.Do(f.req) + if err != nil { + return false, err + } + pt, err := createPollingTracker(resp) + if err != nil { + return false, err + } + f.pt = pt + f.req = nil } - - resp, err := sender.Do(f.req) - f.resp = resp - if err != nil || !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) { + // end legacy + if f.pt == nil { + return false, autorest.NewError("Future", "Done", "future is not initialized") + } + if f.pt.hasTerminated() { + return true, f.pt.pollingError() + } + if err := f.pt.pollForStatus(sender); err != nil { return false, err } - - err = updatePollingState(resp, &f.ps) - if err != nil { + if err := f.pt.checkForErrors(); err != nil { + return f.pt.hasTerminated(), err + } + if err := f.pt.updatePollingState(f.pt.provisioningStateApplicable()); err != nil { return false, err } - - if f.ps.hasTerminated() { - return true, f.errorInfo() + if err := f.pt.updateHeaders(); err != nil { + return false, err } - - f.req, err = newPollingRequest(f.ps) - return false, err + return f.pt.hasTerminated(), f.pt.pollingError() } // GetPollingDelay returns a duration the application should wait before checking @@ -103,11 +130,15 @@ func (f *Future) Done(sender autorest.Sender) (bool, error) { // the service via the Retry-After response header. If the header wasn't returned // then the function returns the zero-value time.Duration and false. func (f Future) GetPollingDelay() (time.Duration, bool) { - if f.resp == nil { + if f.pt == nil { + return 0, false + } + resp := f.pt.latestResponse() + if resp == nil { return 0, false } - retry := f.resp.Header.Get(autorest.HeaderRetryAfter) + retry := resp.Header.Get(autorest.HeaderRetryAfter) if retry == "" { return 0, false } @@ -124,14 +155,22 @@ func (f Future) GetPollingDelay() (time.Duration, bool) { // running operation has completed, the provided context is cancelled, or the client's // polling duration has been exceeded. It will retry failed polling attempts based on // the retry value defined in the client up to the maximum retry attempts. +// Deprecated: Please use WaitForCompletionRef() instead. func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) error { + return f.WaitForCompletionRef(ctx, client) +} + +// WaitForCompletionRef will return when one of the following conditions is met: the long +// running operation has completed, the provided context is cancelled, or the client's +// polling duration has been exceeded. It will retry failed polling attempts based on +// the retry value defined in the client up to the maximum retry attempts. +func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) error { ctx, cancel := context.WithTimeout(ctx, client.PollingDuration) defer cancel() - done, err := f.Done(client) for attempts := 0; !done; done, err = f.Done(client) { if attempts >= client.RetryAttempts { - return autorest.NewErrorWithError(err, "azure", "WaitForCompletion", f.resp, "the number of retries has been exceeded") + return autorest.NewErrorWithError(err, "Future", "WaitForCompletion", f.pt.latestResponse(), "the number of retries has been exceeded") } // we want delayAttempt to be zero in the non-error case so // that DelayForBackoff doesn't perform exponential back-off @@ -155,310 +194,709 @@ func (f Future) WaitForCompletion(ctx context.Context, client autorest.Client) e // wait until the delay elapses or the context is cancelled delayElapsed := autorest.DelayForBackoff(delay, delayAttempt, ctx.Done()) if !delayElapsed { - return autorest.NewErrorWithError(ctx.Err(), "azure", "WaitForCompletion", f.resp, "context has been cancelled") + return autorest.NewErrorWithError(ctx.Err(), "Future", "WaitForCompletion", f.pt.latestResponse(), "context has been cancelled") } } return err } -// if the operation failed the polling state will contain -// error information and implements the error interface -func (f *Future) errorInfo() error { - if !f.ps.hasSucceeded() { - return f.ps - } - return nil -} - // MarshalJSON implements the json.Marshaler interface. func (f Future) MarshalJSON() ([]byte, error) { - return json.Marshal(&f.ps) + return json.Marshal(f.pt) } // UnmarshalJSON implements the json.Unmarshaler interface. func (f *Future) UnmarshalJSON(data []byte) error { - err := json.Unmarshal(data, &f.ps) + // unmarshal into JSON object to determine the tracker type + obj := map[string]interface{}{} + err := json.Unmarshal(data, &obj) if err != nil { return err } - f.req, err = newPollingRequest(f.ps) - return err + if obj["method"] == nil { + return autorest.NewError("Future", "UnmarshalJSON", "missing 'method' property") + } + method := obj["method"].(string) + switch strings.ToUpper(method) { + case http.MethodDelete: + f.pt = &pollingTrackerDelete{} + case http.MethodPatch: + f.pt = &pollingTrackerPatch{} + case http.MethodPost: + f.pt = &pollingTrackerPost{} + case http.MethodPut: + f.pt = &pollingTrackerPut{} + default: + return autorest.NewError("Future", "UnmarshalJSON", "unsupoorted method '%s'", method) + } + // now unmarshal into the tracker + return json.Unmarshal(data, &f.pt) } -// DoPollForAsynchronous returns a SendDecorator that polls if the http.Response is for an Azure -// long-running operation. It will delay between requests for the duration specified in the -// RetryAfter header or, if the header is absent, the passed delay. Polling may be canceled by -// closing the optional channel on the http.Request. -func DoPollForAsynchronous(delay time.Duration) autorest.SendDecorator { - return func(s autorest.Sender) autorest.Sender { - return autorest.SenderFunc(func(r *http.Request) (resp *http.Response, err error) { - resp, err = s.Do(r) - if err != nil { - return resp, err - } - if !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) { - return resp, nil - } +// PollingURL returns the URL used for retrieving the status of the long-running operation. +func (f Future) PollingURL() string { + if f.pt == nil { + return "" + } + return f.pt.pollingURL() +} + +// GetResult should be called once polling has completed successfully. +// It makes the final GET call to retrieve the resultant payload. +func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) { + if f.pt.finalGetURL() == "" { + // we can end up in this situation if the async operation returns a 200 + // with no polling URLs. in that case return the response which should + // contain the JSON payload (only do this for successful terminal cases). + if lr := f.pt.latestResponse(); lr != nil && f.pt.hasSucceeded() { + return lr, nil + } + return nil, autorest.NewError("Future", "GetResult", "missing URL for retrieving result") + } + req, err := http.NewRequest(http.MethodGet, f.pt.finalGetURL(), nil) + if err != nil { + return nil, err + } + return sender.Do(req) +} - ps := pollingState{} - for err == nil { - err = updatePollingState(resp, &ps) - if err != nil { - break - } - if ps.hasTerminated() { - if !ps.hasSucceeded() { - err = ps - } - break - } +type pollingTracker interface { + // these methods can differ per tracker - r, err = newPollingRequest(ps) - if err != nil { - return resp, err - } - r.Cancel = resp.Request.Cancel + // checks the response headers and status code to determine the polling mechanism + updateHeaders() error - delay = autorest.GetRetryAfter(resp, delay) - resp, err = autorest.SendWithSender(s, r, - autorest.AfterDelay(delay)) - } + // checks the response for tracker-specific error conditions + checkForErrors() error - return resp, err - }) + // returns true if provisioning state should be checked + provisioningStateApplicable() bool + + // methods common to all trackers + + // initializes the tracker's internal state, call this when the tracker is created + initializeState() error + + // makes an HTTP request to check the status of the LRO + pollForStatus(sender autorest.Sender) error + + // updates internal tracker state, call this after each call to pollForStatus + updatePollingState(provStateApl bool) error + + // returns the error response from the service, can be nil + pollingError() error + + // returns the polling method being used + pollingMethod() PollingMethodType + + // returns the state of the LRO as returned from the service + pollingStatus() string + + // returns the URL used for polling status + pollingURL() string + + // returns the URL used for the final GET to retrieve the resource + finalGetURL() string + + // returns true if the LRO is in a terminal state + hasTerminated() bool + + // returns true if the LRO is in a failed terminal state + hasFailed() bool + + // returns true if the LRO is in a successful terminal state + hasSucceeded() bool + + // returns the cached HTTP response after a call to pollForStatus(), can be nil + latestResponse() *http.Response +} + +type pollingTrackerBase struct { + // resp is the last response, either from the submission of the LRO or from polling + resp *http.Response + + // method is the HTTP verb, this is needed for deserialization + Method string `json:"method"` + + // rawBody is the raw JSON response body + rawBody map[string]interface{} + + // denotes if polling is using async-operation or location header + Pm PollingMethodType `json:"pollingMethod"` + + // the URL to poll for status + URI string `json:"pollingURI"` + + // the state of the LRO as returned from the service + State string `json:"lroState"` + + // the URL to GET for the final result + FinalGetURI string `json:"resultURI"` + + // used to hold an error object returned from the service + Err *ServiceError `json:"error,omitempty"` +} + +func (pt *pollingTrackerBase) initializeState() error { + // determine the initial polling state based on response body and/or HTTP status + // code. this is applicable to the initial LRO response, not polling responses! + pt.Method = pt.resp.Request.Method + if err := pt.updateRawBody(); err != nil { + return err } + switch pt.resp.StatusCode { + case http.StatusOK: + if ps := pt.getProvisioningState(); ps != nil { + pt.State = *ps + } else { + pt.State = operationSucceeded + } + case http.StatusCreated: + if ps := pt.getProvisioningState(); ps != nil { + pt.State = *ps + } else { + pt.State = operationInProgress + } + case http.StatusAccepted: + pt.State = operationInProgress + case http.StatusNoContent: + pt.State = operationSucceeded + default: + pt.State = operationFailed + pt.updateErrorFromResponse() + } + return nil } -func getAsyncOperation(resp *http.Response) string { - return resp.Header.Get(http.CanonicalHeaderKey(headerAsyncOperation)) +func (pt pollingTrackerBase) getProvisioningState() *string { + if pt.rawBody != nil && pt.rawBody["properties"] != nil { + p := pt.rawBody["properties"].(map[string]interface{}) + if ps := p["provisioningState"]; ps != nil { + s := ps.(string) + return &s + } + } + return nil } -func hasSucceeded(state string) bool { - return strings.EqualFold(state, operationSucceeded) +func (pt *pollingTrackerBase) updateRawBody() error { + pt.rawBody = map[string]interface{}{} + if pt.resp.ContentLength != 0 { + defer pt.resp.Body.Close() + b, err := ioutil.ReadAll(pt.resp.Body) + if err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to read response body") + } + // put the body back so it's available to other callers + pt.resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + if err = json.Unmarshal(b, &pt.rawBody); err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to unmarshal response body") + } + } + return nil } -func hasTerminated(state string) bool { - return strings.EqualFold(state, operationCanceled) || strings.EqualFold(state, operationFailed) || strings.EqualFold(state, operationSucceeded) +func (pt *pollingTrackerBase) pollForStatus(sender autorest.Sender) error { + req, err := http.NewRequest(http.MethodGet, pt.URI, nil) + if err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to create HTTP request") + } + // attach the context from the original request if available (it will be absent for deserialized futures) + if pt.resp != nil { + req = req.WithContext(pt.resp.Request.Context()) + } + pt.resp, err = sender.Do(req) + if err != nil { + return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to send HTTP request") + } + if autorest.ResponseHasStatusCode(pt.resp, pollingCodes[:]...) { + // reset the service error on success case + pt.Err = nil + err = pt.updateRawBody() + } else { + // check response body for error content + pt.updateErrorFromResponse() + } + return err } -func hasFailed(state string) bool { - return strings.EqualFold(state, operationFailed) +// attempts to unmarshal a ServiceError type from the response body. +// if that fails then make a best attempt at creating something meaningful. +func (pt *pollingTrackerBase) updateErrorFromResponse() { + var err error + if pt.resp.ContentLength != 0 { + type respErr struct { + ServiceError *ServiceError `json:"error"` + } + re := respErr{} + defer pt.resp.Body.Close() + var b []byte + b, err = ioutil.ReadAll(pt.resp.Body) + if err != nil { + goto Default + } + if err = json.Unmarshal(b, &re); err != nil { + goto Default + } + // unmarshalling the error didn't yield anything, try unwrapped error + if re.ServiceError == nil { + err = json.Unmarshal(b, &re.ServiceError) + if err != nil { + goto Default + } + } + if re.ServiceError != nil { + pt.Err = re.ServiceError + return + } + } +Default: + se := &ServiceError{ + Code: fmt.Sprintf("HTTP status code %v", pt.resp.StatusCode), + Message: pt.resp.Status, + } + if err != nil { + se.InnerError = make(map[string]interface{}) + se.InnerError["unmarshalError"] = err.Error() + } + pt.Err = se } -type provisioningTracker interface { - state() string - hasSucceeded() bool - hasTerminated() bool +func (pt *pollingTrackerBase) updatePollingState(provStateApl bool) error { + if pt.Pm == PollingAsyncOperation && pt.rawBody["status"] != nil { + pt.State = pt.rawBody["status"].(string) + } else { + if pt.resp.StatusCode == http.StatusAccepted { + pt.State = operationInProgress + } else if provStateApl { + if ps := pt.getProvisioningState(); ps != nil { + pt.State = *ps + } else { + pt.State = operationSucceeded + } + } else { + return autorest.NewError("pollingTrackerBase", "updatePollingState", "the response from the async operation has an invalid status code") + } + } + // if the operation has failed update the error state + if pt.hasFailed() { + pt.updateErrorFromResponse() + } + return nil } -type operationResource struct { - // Note: - // The specification states services should return the "id" field. However some return it as - // "operationId". - ID string `json:"id"` - OperationID string `json:"operationId"` - Name string `json:"name"` - Status string `json:"status"` - Properties map[string]interface{} `json:"properties"` - OperationError ServiceError `json:"error"` - StartTime date.Time `json:"startTime"` - EndTime date.Time `json:"endTime"` - PercentComplete float64 `json:"percentComplete"` +func (pt pollingTrackerBase) pollingError() error { + if pt.Err == nil { + return nil + } + return pt.Err } -func (or operationResource) state() string { - return or.Status +func (pt pollingTrackerBase) pollingMethod() PollingMethodType { + return pt.Pm } -func (or operationResource) hasSucceeded() bool { - return hasSucceeded(or.state()) +func (pt pollingTrackerBase) pollingStatus() string { + return pt.State } -func (or operationResource) hasTerminated() bool { - return hasTerminated(or.state()) +func (pt pollingTrackerBase) pollingURL() string { + return pt.URI } -type provisioningProperties struct { - ProvisioningState string `json:"provisioningState"` +func (pt pollingTrackerBase) finalGetURL() string { + return pt.FinalGetURI } -type provisioningStatus struct { - Properties provisioningProperties `json:"properties,omitempty"` - ProvisioningError ServiceError `json:"error,omitempty"` +func (pt pollingTrackerBase) hasTerminated() bool { + return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed) || strings.EqualFold(pt.State, operationSucceeded) } -func (ps provisioningStatus) state() string { - return ps.Properties.ProvisioningState +func (pt pollingTrackerBase) hasFailed() bool { + return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed) } -func (ps provisioningStatus) hasSucceeded() bool { - return hasSucceeded(ps.state()) +func (pt pollingTrackerBase) hasSucceeded() bool { + return strings.EqualFold(pt.State, operationSucceeded) } -func (ps provisioningStatus) hasTerminated() bool { - return hasTerminated(ps.state()) +func (pt pollingTrackerBase) latestResponse() *http.Response { + return pt.resp } -func (ps provisioningStatus) hasProvisioningError() bool { - return ps.ProvisioningError != ServiceError{} +// error checking common to all trackers +func (pt pollingTrackerBase) baseCheckForErrors() error { + // for Azure-AsyncOperations the response body cannot be nil or empty + if pt.Pm == PollingAsyncOperation { + if pt.resp.Body == nil || pt.resp.ContentLength == 0 { + return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "for Azure-AsyncOperation response body cannot be nil") + } + if pt.rawBody["status"] == nil { + return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "missing status property in Azure-AsyncOperation response body") + } + } + return nil } -// PollingMethodType defines a type used for enumerating polling mechanisms. -type PollingMethodType string +// DELETE -const ( - // PollingAsyncOperation indicates the polling method uses the Azure-AsyncOperation header. - PollingAsyncOperation PollingMethodType = "AsyncOperation" +type pollingTrackerDelete struct { + pollingTrackerBase +} - // PollingLocation indicates the polling method uses the Location header. - PollingLocation PollingMethodType = "Location" +func (pt *pollingTrackerDelete) updateHeaders() error { + // for 201 the Location header is required + if pt.resp.StatusCode == http.StatusCreated { + if lh, err := getURLFromLocationHeader(pt.resp); err != nil { + return err + } else if lh == "" { + return autorest.NewError("pollingTrackerDelete", "updateHeaders", "missing Location header in 201 response") + } else { + pt.URI = lh + } + pt.Pm = PollingLocation + pt.FinalGetURI = pt.URI + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + // if the Location header is invalid and we already have a polling URL + // then we don't care if the Location header URL is malformed. + if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { + return err + } else if lh != "" { + if ao == "" { + pt.URI = lh + pt.Pm = PollingLocation + } + // when both headers are returned we use the value in the Location header for the final GET + pt.FinalGetURI = lh + } + // make sure a polling URL was found + if pt.URI == "" { + return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response") + } + } + return nil +} - // PollingUnknown indicates an unknown polling method and is the default value. - PollingUnknown PollingMethodType = "" -) +func (pt pollingTrackerDelete) checkForErrors() error { + return pt.baseCheckForErrors() +} -type pollingState struct { - PollingMethod PollingMethodType `json:"pollingMethod"` - URI string `json:"uri"` - State string `json:"state"` - Code string `json:"code"` - Message string `json:"message"` +func (pt pollingTrackerDelete) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent } -func (ps pollingState) hasSucceeded() bool { - return hasSucceeded(ps.State) +// PATCH + +type pollingTrackerPatch struct { + pollingTrackerBase } -func (ps pollingState) hasTerminated() bool { - return hasTerminated(ps.State) +func (pt *pollingTrackerPatch) updateHeaders() error { + // by default we can use the original URL for polling and final GET + if pt.URI == "" { + pt.URI = pt.resp.Request.URL.String() + } + if pt.FinalGetURI == "" { + pt.FinalGetURI = pt.resp.Request.URL.String() + } + if pt.Pm == PollingUnknown { + pt.Pm = PollingRequestURI + } + // for 201 it's permissible for no headers to be returned + if pt.resp.StatusCode == http.StatusCreated { + if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + // note the absense of the "final GET" mechanism for PATCH + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + if ao == "" { + if lh, err := getURLFromLocationHeader(pt.resp); err != nil { + return err + } else if lh == "" { + return autorest.NewError("pollingTrackerPatch", "updateHeaders", "didn't get any suitable polling URLs in 202 response") + } else { + pt.URI = lh + pt.Pm = PollingLocation + } + } + } + return nil } -func (ps pollingState) hasFailed() bool { - return hasFailed(ps.State) +func (pt pollingTrackerPatch) checkForErrors() error { + return pt.baseCheckForErrors() } -func (ps pollingState) Error() string { - return fmt.Sprintf("Long running operation terminated with status '%s': Code=%q Message=%q", ps.State, ps.Code, ps.Message) +func (pt pollingTrackerPatch) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated } -// updatePollingState maps the operation status -- retrieved from either a provisioningState -// field, the status field of an OperationResource, or inferred from the HTTP status code -- -// into a well-known states. Since the process begins from the initial request, the state -// always comes from either a the provisioningState returned or is inferred from the HTTP -// status code. Subsequent requests will read an Azure OperationResource object if the -// service initially returned the Azure-AsyncOperation header. The responseFormat field notes -// the expected response format. -func updatePollingState(resp *http.Response, ps *pollingState) error { - // Determine the response shape - // -- The first response will always be a provisioningStatus response; only the polling requests, - // depending on the header returned, may be something otherwise. - var pt provisioningTracker - if ps.PollingMethod == PollingAsyncOperation { - pt = &operationResource{} - } else { - pt = &provisioningStatus{} - } +// POST - // If this is the first request (that is, the polling response shape is unknown), determine how - // to poll and what to expect - if ps.PollingMethod == PollingUnknown { - req := resp.Request - if req == nil { - return autorest.NewError("azure", "updatePollingState", "Azure Polling Error - Original HTTP request is missing") - } +type pollingTrackerPost struct { + pollingTrackerBase +} - // Prefer the Azure-AsyncOperation header - ps.URI = getAsyncOperation(resp) - if ps.URI != "" { - ps.PollingMethod = PollingAsyncOperation +func (pt *pollingTrackerPost) updateHeaders() error { + // 201 requires Location header + if pt.resp.StatusCode == http.StatusCreated { + if lh, err := getURLFromLocationHeader(pt.resp); err != nil { + return err + } else if lh == "" { + return autorest.NewError("pollingTrackerPost", "updateHeaders", "missing Location header in 201 response") } else { - ps.PollingMethod = PollingLocation + pt.URI = lh + pt.FinalGetURI = lh + pt.Pm = PollingLocation } - - // Else, use the Location header - if ps.URI == "" { - ps.URI = autorest.GetLocation(resp) + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation } - - // Lastly, requests against an existing resource, use the last request URI - if ps.URI == "" { - m := strings.ToUpper(req.Method) - if m == http.MethodPatch || m == http.MethodPut || m == http.MethodGet { - ps.URI = req.URL.String() + // if the Location header is invalid and we already have a polling URL + // then we don't care if the Location header URL is malformed. + if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { + return err + } else if lh != "" { + if ao == "" { + pt.URI = lh + pt.Pm = PollingLocation } + // when both headers are returned we use the value in the Location header for the final GET + pt.FinalGetURI = lh + } + // make sure a polling URL was found + if pt.URI == "" { + return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response") } } + return nil +} - // Read and interpret the response (saving the Body in case no polling is necessary) - b := &bytes.Buffer{} - err := autorest.Respond(resp, - autorest.ByCopying(b), - autorest.ByUnmarshallingJSON(pt), - autorest.ByClosing()) - resp.Body = ioutil.NopCloser(b) - if err != nil { - return err - } +func (pt pollingTrackerPost) checkForErrors() error { + return pt.baseCheckForErrors() +} - // Interpret the results - // -- Terminal states apply regardless - // -- Unknown states are per-service inprogress states - // -- Otherwise, infer state from HTTP status code - if pt.hasTerminated() { - ps.State = pt.state() - } else if pt.state() != "" { - ps.State = operationInProgress - } else { - switch resp.StatusCode { - case http.StatusAccepted: - ps.State = operationInProgress +func (pt pollingTrackerPost) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent +} - case http.StatusNoContent, http.StatusCreated, http.StatusOK: - ps.State = operationSucceeded +// PUT - default: - ps.State = operationFailed - } - } +type pollingTrackerPut struct { + pollingTrackerBase +} - if strings.EqualFold(ps.State, operationInProgress) && ps.URI == "" { - return autorest.NewError("azure", "updatePollingState", "Azure Polling Error - Unable to obtain polling URI for %s %s", resp.Request.Method, resp.Request.URL) +func (pt *pollingTrackerPut) updateHeaders() error { + // by default we can use the original URL for polling and final GET + if pt.URI == "" { + pt.URI = pt.resp.Request.URL.String() } - - // For failed operation, check for error code and message in - // -- Operation resource - // -- Response - // -- Otherwise, Unknown - if ps.hasFailed() { - if ps.PollingMethod == PollingAsyncOperation { - or := pt.(*operationResource) - ps.Code = or.OperationError.Code - ps.Message = or.OperationError.Message - } else { - p := pt.(*provisioningStatus) - if p.hasProvisioningError() { - ps.Code = p.ProvisioningError.Code - ps.Message = p.ProvisioningError.Message - } else { - ps.Code = "Unknown" - ps.Message = "None" + if pt.FinalGetURI == "" { + pt.FinalGetURI = pt.resp.Request.URL.String() + } + if pt.Pm == PollingUnknown { + pt.Pm = PollingRequestURI + } + // for 201 it's permissible for no headers to be returned + if pt.resp.StatusCode == http.StatusCreated { + if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + } + // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary + if pt.resp.StatusCode == http.StatusAccepted { + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } else if ao != "" { + pt.URI = ao + pt.Pm = PollingAsyncOperation + } + // if the Location header is invalid and we already have a polling URL + // then we don't care if the Location header URL is malformed. + if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { + return err + } else if lh != "" { + if ao == "" { + pt.URI = lh + pt.Pm = PollingLocation } + // when both headers are returned we use the value in the Location header for the final GET + pt.FinalGetURI = lh + } + // make sure a polling URL was found + if pt.URI == "" { + return autorest.NewError("pollingTrackerPut", "updateHeaders", "didn't get any suitable polling URLs in 202 response") } } return nil } -func newPollingRequest(ps pollingState) (*http.Request, error) { - reqPoll, err := autorest.Prepare(&http.Request{}, - autorest.AsGet(), - autorest.WithBaseURL(ps.URI)) +func (pt pollingTrackerPut) checkForErrors() error { + err := pt.baseCheckForErrors() + if err != nil { + return err + } + // if there are no LRO headers then the body cannot be empty + ao, err := getURLFromAsyncOpHeader(pt.resp) + if err != nil { + return err + } + lh, err := getURLFromLocationHeader(pt.resp) if err != nil { - return nil, autorest.NewErrorWithError(err, "azure", "newPollingRequest", nil, "Failure creating poll request to %s", ps.URI) + return err + } + if ao == "" && lh == "" && len(pt.rawBody) == 0 { + return autorest.NewError("pollingTrackerPut", "checkForErrors", "the response did not contain a body") } + return nil +} - return reqPoll, nil +func (pt pollingTrackerPut) provisioningStateApplicable() bool { + return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated +} + +// creates a polling tracker based on the verb of the original request +func createPollingTracker(resp *http.Response) (pollingTracker, error) { + var pt pollingTracker + switch strings.ToUpper(resp.Request.Method) { + case http.MethodDelete: + pt = &pollingTrackerDelete{pollingTrackerBase: pollingTrackerBase{resp: resp}} + case http.MethodPatch: + pt = &pollingTrackerPatch{pollingTrackerBase: pollingTrackerBase{resp: resp}} + case http.MethodPost: + pt = &pollingTrackerPost{pollingTrackerBase: pollingTrackerBase{resp: resp}} + case http.MethodPut: + pt = &pollingTrackerPut{pollingTrackerBase: pollingTrackerBase{resp: resp}} + default: + return nil, autorest.NewError("azure", "createPollingTracker", "unsupported HTTP method %s", resp.Request.Method) + } + if err := pt.initializeState(); err != nil { + return pt, err + } + // this initializes the polling header values, we do this during creation in case the + // initial response send us invalid values; this way the API call will return a non-nil + // error (not doing this means the error shows up in Future.Done) + return pt, pt.updateHeaders() +} + +// gets the polling URL from the Azure-AsyncOperation header. +// ensures the URL is well-formed and absolute. +func getURLFromAsyncOpHeader(resp *http.Response) (string, error) { + s := resp.Header.Get(http.CanonicalHeaderKey(headerAsyncOperation)) + if s == "" { + return "", nil + } + if !isValidURL(s) { + return "", autorest.NewError("azure", "getURLFromAsyncOpHeader", "invalid polling URL '%s'", s) + } + return s, nil +} + +// gets the polling URL from the Location header. +// ensures the URL is well-formed and absolute. +func getURLFromLocationHeader(resp *http.Response) (string, error) { + s := resp.Header.Get(http.CanonicalHeaderKey(autorest.HeaderLocation)) + if s == "" { + return "", nil + } + if !isValidURL(s) { + return "", autorest.NewError("azure", "getURLFromLocationHeader", "invalid polling URL '%s'", s) + } + return s, nil } +// verify that the URL is valid and absolute +func isValidURL(s string) bool { + u, err := url.Parse(s) + return err == nil && u.IsAbs() +} + +// DoPollForAsynchronous returns a SendDecorator that polls if the http.Response is for an Azure +// long-running operation. It will delay between requests for the duration specified in the +// RetryAfter header or, if the header is absent, the passed delay. Polling may be canceled via +// the context associated with the http.Request. +// Deprecated: Prefer using Futures to allow for non-blocking async operations. +func DoPollForAsynchronous(delay time.Duration) autorest.SendDecorator { + return func(s autorest.Sender) autorest.Sender { + return autorest.SenderFunc(func(r *http.Request) (*http.Response, error) { + resp, err := s.Do(r) + if err != nil { + return resp, err + } + if !autorest.ResponseHasStatusCode(resp, pollingCodes[:]...) { + return resp, nil + } + future, err := NewFutureFromResponse(resp) + if err != nil { + return resp, err + } + // retry until either the LRO completes or we receive an error + var done bool + for done, err = future.Done(s); !done && err == nil; done, err = future.Done(s) { + // check for Retry-After delay, if not present use the specified polling delay + if pd, ok := future.GetPollingDelay(); ok { + delay = pd + } + // wait until the delay elapses or the context is cancelled + if delayElapsed := autorest.DelayForBackoff(delay, 0, r.Context().Done()); !delayElapsed { + return future.Response(), + autorest.NewErrorWithError(r.Context().Err(), "azure", "DoPollForAsynchronous", future.Response(), "context has been cancelled") + } + } + return future.Response(), err + }) + } +} + +// PollingMethodType defines a type used for enumerating polling mechanisms. +type PollingMethodType string + +const ( + // PollingAsyncOperation indicates the polling method uses the Azure-AsyncOperation header. + PollingAsyncOperation PollingMethodType = "AsyncOperation" + + // PollingLocation indicates the polling method uses the Location header. + PollingLocation PollingMethodType = "Location" + + // PollingRequestURI indicates the polling method uses the original request URI. + PollingRequestURI PollingMethodType = "RequestURI" + + // PollingUnknown indicates an unknown polling method and is the default value. + PollingUnknown PollingMethodType = "" +) + // AsyncOpIncompleteError is the type that's returned from a future that has not completed. type AsyncOpIncompleteError struct { // FutureType is the name of the type composed of a azure.Future. diff --git a/deps/github.com/Azure/go-autorest/autorest/azure/azure.go b/deps/github.com/Azure/go-autorest/autorest/azure/azure.go index fa1835647..3a0a439ff 100644 --- a/deps/github.com/Azure/go-autorest/autorest/azure/azure.go +++ b/deps/github.com/Azure/go-autorest/autorest/azure/azure.go @@ -1,8 +1,5 @@ -/* -Package azure provides Azure-specific implementations used with AutoRest. - -See the included examples for more detail. -*/ +// Package azure provides Azure-specific implementations used with AutoRest. +// See the included examples for more detail. package azure // Copyright 2017 Microsoft Corporation @@ -24,7 +21,9 @@ import ( "fmt" "io/ioutil" "net/http" + "regexp" "strconv" + "strings" "github.com/Azure/go-autorest/autorest" ) @@ -43,21 +42,100 @@ const ( ) // ServiceError encapsulates the error response from an Azure service. +// It adhears to the OData v4 specification for error responses. type ServiceError struct { - Code string `json:"code"` - Message string `json:"message"` - Details *[]interface{} `json:"details"` + Code string `json:"code"` + Message string `json:"message"` + Target *string `json:"target"` + Details []map[string]interface{} `json:"details"` + InnerError map[string]interface{} `json:"innererror"` + AdditionalInfo []map[string]interface{} `json:"additionalInfo"` } func (se ServiceError) Error() string { + result := fmt.Sprintf("Code=%q Message=%q", se.Code, se.Message) + + if se.Target != nil { + result += fmt.Sprintf(" Target=%q", *se.Target) + } + if se.Details != nil { - d, err := json.Marshal(*(se.Details)) + d, err := json.Marshal(se.Details) if err != nil { - return fmt.Sprintf("Code=%q Message=%q Details=%v", se.Code, se.Message, *se.Details) + result += fmt.Sprintf(" Details=%v", se.Details) } - return fmt.Sprintf("Code=%q Message=%q Details=%v", se.Code, se.Message, string(d)) + result += fmt.Sprintf(" Details=%v", string(d)) + } + + if se.InnerError != nil { + d, err := json.Marshal(se.InnerError) + if err != nil { + result += fmt.Sprintf(" InnerError=%v", se.InnerError) + } + result += fmt.Sprintf(" InnerError=%v", string(d)) + } + + if se.AdditionalInfo != nil { + d, err := json.Marshal(se.AdditionalInfo) + if err != nil { + result += fmt.Sprintf(" AdditionalInfo=%v", se.AdditionalInfo) + } + result += fmt.Sprintf(" AdditionalInfo=%v", string(d)) + } + + return result +} + +// UnmarshalJSON implements the json.Unmarshaler interface for the ServiceError type. +func (se *ServiceError) UnmarshalJSON(b []byte) error { + // per the OData v4 spec the details field must be an array of JSON objects. + // unfortunately not all services adhear to the spec and just return a single + // object instead of an array with one object. so we have to perform some + // shenanigans to accommodate both cases. + // http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091 + + type serviceError1 struct { + Code string `json:"code"` + Message string `json:"message"` + Target *string `json:"target"` + Details []map[string]interface{} `json:"details"` + InnerError map[string]interface{} `json:"innererror"` + AdditionalInfo []map[string]interface{} `json:"additionalInfo"` + } + + type serviceError2 struct { + Code string `json:"code"` + Message string `json:"message"` + Target *string `json:"target"` + Details map[string]interface{} `json:"details"` + InnerError map[string]interface{} `json:"innererror"` + AdditionalInfo []map[string]interface{} `json:"additionalInfo"` + } + + se1 := serviceError1{} + err := json.Unmarshal(b, &se1) + if err == nil { + se.populate(se1.Code, se1.Message, se1.Target, se1.Details, se1.InnerError, se1.AdditionalInfo) + return nil } - return fmt.Sprintf("Code=%q Message=%q", se.Code, se.Message) + + se2 := serviceError2{} + err = json.Unmarshal(b, &se2) + if err == nil { + se.populate(se2.Code, se2.Message, se2.Target, nil, se2.InnerError, se2.AdditionalInfo) + se.Details = append(se.Details, se2.Details) + return nil + } + return err +} + +func (se *ServiceError) populate(code, message string, target *string, details []map[string]interface{}, inner map[string]interface{}, additional []map[string]interface{}) { + se.Code = code + se.Message = message + se.Target = target + se.Details = details + se.InnerError = inner + se.AdditionalInfo = additional } // RequestError describes an error response returned by Azure service. @@ -83,6 +161,41 @@ func IsAzureError(e error) bool { return ok } +// Resource contains details about an Azure resource. +type Resource struct { + SubscriptionID string + ResourceGroup string + Provider string + ResourceType string + ResourceName string +} + +// ParseResourceID parses a resource ID into a ResourceDetails struct. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions-resource#return-value-4. +func ParseResourceID(resourceID string) (Resource, error) { + + const resourceIDPatternText = `(?i)subscriptions/(.+)/resourceGroups/(.+)/providers/(.+?)/(.+?)/(.+)` + resourceIDPattern := regexp.MustCompile(resourceIDPatternText) + match := resourceIDPattern.FindStringSubmatch(resourceID) + + if len(match) == 0 { + return Resource{}, fmt.Errorf("parsing failed for %s. Invalid resource Id format", resourceID) + } + + v := strings.Split(match[5], "/") + resourceName := v[len(v)-1] + + result := Resource{ + SubscriptionID: match[1], + ResourceGroup: match[2], + Provider: match[3], + ResourceType: match[4], + ResourceName: resourceName, + } + + return result, nil +} + // NewErrorWithError creates a new Error conforming object from the // passed packageType, method, statusCode of the given resp (UndefinedStatusCode // if resp is nil), message, and original error. message is treated as a format @@ -178,16 +291,29 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator { resp.Body = ioutil.NopCloser(&b) if decodeErr != nil { return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), decodeErr) - } else if e.ServiceError == nil { + } + if e.ServiceError == nil { // Check if error is unwrapped ServiceError - if err := json.Unmarshal(b.Bytes(), &e.ServiceError); err != nil || e.ServiceError.Message == "" { - e.ServiceError = &ServiceError{ - Code: "Unknown", - Message: "Unknown service error", - } + if err := json.Unmarshal(b.Bytes(), &e.ServiceError); err != nil { + return err } } - + if e.ServiceError.Message == "" { + // if we're here it means the returned error wasn't OData v4 compliant. + // try to unmarshal the body as raw JSON in hopes of getting something. + rawBody := map[string]interface{}{} + if err := json.Unmarshal(b.Bytes(), &rawBody); err != nil { + return err + } + e.ServiceError = &ServiceError{ + Code: "Unknown", + Message: "Unknown service error", + } + if len(rawBody) > 0 { + e.ServiceError.Details = []map[string]interface{}{rawBody} + } + } + e.Response = resp e.RequestID = ExtractRequestID(resp) if e.StatusCode == nil { e.StatusCode = resp.StatusCode diff --git a/deps/github.com/Azure/go-autorest/autorest/azure/environments.go b/deps/github.com/Azure/go-autorest/autorest/azure/environments.go index 936836493..7e41f7fd9 100644 --- a/deps/github.com/Azure/go-autorest/autorest/azure/environments.go +++ b/deps/github.com/Azure/go-autorest/autorest/azure/environments.go @@ -44,6 +44,8 @@ type Environment struct { GalleryEndpoint string `json:"galleryEndpoint"` KeyVaultEndpoint string `json:"keyVaultEndpoint"` GraphEndpoint string `json:"graphEndpoint"` + ServiceBusEndpoint string `json:"serviceBusEndpoint"` + BatchManagementEndpoint string `json:"batchManagementEndpoint"` StorageEndpointSuffix string `json:"storageEndpointSuffix"` SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"` TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"` @@ -52,6 +54,7 @@ type Environment struct { ServiceManagementVMDNSSuffix string `json:"serviceManagementVMDNSSuffix"` ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix"` ContainerRegistryDNSSuffix string `json:"containerRegistryDNSSuffix"` + TokenAudience string `json:"tokenAudience"` } var ( @@ -66,14 +69,17 @@ var ( GalleryEndpoint: "https://gallery.azure.com/", KeyVaultEndpoint: "https://vault.azure.net/", GraphEndpoint: "https://graph.windows.net/", + ServiceBusEndpoint: "https://servicebus.windows.net/", + BatchManagementEndpoint: "https://batch.core.windows.net/", StorageEndpointSuffix: "core.windows.net", SQLDatabaseDNSSuffix: "database.windows.net", TrafficManagerDNSSuffix: "trafficmanager.net", KeyVaultDNSSuffix: "vault.azure.net", - ServiceBusEndpointSuffix: "servicebus.azure.com", + ServiceBusEndpointSuffix: "servicebus.windows.net", ServiceManagementVMDNSSuffix: "cloudapp.net", ResourceManagerVMDNSSuffix: "cloudapp.azure.com", ContainerRegistryDNSSuffix: "azurecr.io", + TokenAudience: "https://management.azure.com/", } // USGovernmentCloud is the cloud environment for the US Government @@ -87,6 +93,8 @@ var ( GalleryEndpoint: "https://gallery.usgovcloudapi.net/", KeyVaultEndpoint: "https://vault.usgovcloudapi.net/", GraphEndpoint: "https://graph.windows.net/", + ServiceBusEndpoint: "https://servicebus.usgovcloudapi.net/", + BatchManagementEndpoint: "https://batch.core.usgovcloudapi.net/", StorageEndpointSuffix: "core.usgovcloudapi.net", SQLDatabaseDNSSuffix: "database.usgovcloudapi.net", TrafficManagerDNSSuffix: "usgovtrafficmanager.net", @@ -95,6 +103,7 @@ var ( ServiceManagementVMDNSSuffix: "usgovcloudapp.net", ResourceManagerVMDNSSuffix: "cloudapp.windowsazure.us", ContainerRegistryDNSSuffix: "azurecr.io", + TokenAudience: "https://management.usgovcloudapi.net/", } // ChinaCloud is the cloud environment operated in China @@ -108,14 +117,17 @@ var ( GalleryEndpoint: "https://gallery.chinacloudapi.cn/", KeyVaultEndpoint: "https://vault.azure.cn/", GraphEndpoint: "https://graph.chinacloudapi.cn/", + ServiceBusEndpoint: "https://servicebus.chinacloudapi.cn/", + BatchManagementEndpoint: "https://batch.chinacloudapi.cn/", StorageEndpointSuffix: "core.chinacloudapi.cn", SQLDatabaseDNSSuffix: "database.chinacloudapi.cn", TrafficManagerDNSSuffix: "trafficmanager.cn", KeyVaultDNSSuffix: "vault.azure.cn", - ServiceBusEndpointSuffix: "servicebus.chinacloudapi.net", + ServiceBusEndpointSuffix: "servicebus.chinacloudapi.cn", ServiceManagementVMDNSSuffix: "chinacloudapp.cn", ResourceManagerVMDNSSuffix: "cloudapp.azure.cn", ContainerRegistryDNSSuffix: "azurecr.io", + TokenAudience: "https://management.chinacloudapi.cn/", } // GermanCloud is the cloud environment operated in Germany @@ -129,6 +141,8 @@ var ( GalleryEndpoint: "https://gallery.cloudapi.de/", KeyVaultEndpoint: "https://vault.microsoftazure.de/", GraphEndpoint: "https://graph.cloudapi.de/", + ServiceBusEndpoint: "https://servicebus.cloudapi.de/", + BatchManagementEndpoint: "https://batch.cloudapi.de/", StorageEndpointSuffix: "core.cloudapi.de", SQLDatabaseDNSSuffix: "database.cloudapi.de", TrafficManagerDNSSuffix: "azuretrafficmanager.de", @@ -137,6 +151,7 @@ var ( ServiceManagementVMDNSSuffix: "azurecloudapp.de", ResourceManagerVMDNSSuffix: "cloudapp.microsoftazure.de", ContainerRegistryDNSSuffix: "azurecr.io", + TokenAudience: "https://management.microsoftazure.de/", } ) diff --git a/deps/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go b/deps/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go new file mode 100644 index 000000000..507f9e95c --- /dev/null +++ b/deps/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go @@ -0,0 +1,245 @@ +package azure + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "strings" + + "github.com/Azure/go-autorest/autorest" +) + +// Copyright 2017 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +type audience []string + +type authentication struct { + LoginEndpoint string `json:"loginEndpoint"` + Audiences audience `json:"audiences"` +} + +type environmentMetadataInfo struct { + GalleryEndpoint string `json:"galleryEndpoint"` + GraphEndpoint string `json:"graphEndpoint"` + PortalEndpoint string `json:"portalEndpoint"` + Authentication authentication `json:"authentication"` +} + +// EnvironmentProperty represent property names that clients can override +type EnvironmentProperty string + +const ( + // EnvironmentName ... + EnvironmentName EnvironmentProperty = "name" + // EnvironmentManagementPortalURL .. + EnvironmentManagementPortalURL EnvironmentProperty = "managementPortalURL" + // EnvironmentPublishSettingsURL ... + EnvironmentPublishSettingsURL EnvironmentProperty = "publishSettingsURL" + // EnvironmentServiceManagementEndpoint ... + EnvironmentServiceManagementEndpoint EnvironmentProperty = "serviceManagementEndpoint" + // EnvironmentResourceManagerEndpoint ... + EnvironmentResourceManagerEndpoint EnvironmentProperty = "resourceManagerEndpoint" + // EnvironmentActiveDirectoryEndpoint ... + EnvironmentActiveDirectoryEndpoint EnvironmentProperty = "activeDirectoryEndpoint" + // EnvironmentGalleryEndpoint ... + EnvironmentGalleryEndpoint EnvironmentProperty = "galleryEndpoint" + // EnvironmentKeyVaultEndpoint ... + EnvironmentKeyVaultEndpoint EnvironmentProperty = "keyVaultEndpoint" + // EnvironmentGraphEndpoint ... + EnvironmentGraphEndpoint EnvironmentProperty = "graphEndpoint" + // EnvironmentServiceBusEndpoint ... + EnvironmentServiceBusEndpoint EnvironmentProperty = "serviceBusEndpoint" + // EnvironmentBatchManagementEndpoint ... + EnvironmentBatchManagementEndpoint EnvironmentProperty = "batchManagementEndpoint" + // EnvironmentStorageEndpointSuffix ... + EnvironmentStorageEndpointSuffix EnvironmentProperty = "storageEndpointSuffix" + // EnvironmentSQLDatabaseDNSSuffix ... + EnvironmentSQLDatabaseDNSSuffix EnvironmentProperty = "sqlDatabaseDNSSuffix" + // EnvironmentTrafficManagerDNSSuffix ... + EnvironmentTrafficManagerDNSSuffix EnvironmentProperty = "trafficManagerDNSSuffix" + // EnvironmentKeyVaultDNSSuffix ... + EnvironmentKeyVaultDNSSuffix EnvironmentProperty = "keyVaultDNSSuffix" + // EnvironmentServiceBusEndpointSuffix ... + EnvironmentServiceBusEndpointSuffix EnvironmentProperty = "serviceBusEndpointSuffix" + // EnvironmentServiceManagementVMDNSSuffix ... + EnvironmentServiceManagementVMDNSSuffix EnvironmentProperty = "serviceManagementVMDNSSuffix" + // EnvironmentResourceManagerVMDNSSuffix ... + EnvironmentResourceManagerVMDNSSuffix EnvironmentProperty = "resourceManagerVMDNSSuffix" + // EnvironmentContainerRegistryDNSSuffix ... + EnvironmentContainerRegistryDNSSuffix EnvironmentProperty = "containerRegistryDNSSuffix" + // EnvironmentTokenAudience ... + EnvironmentTokenAudience EnvironmentProperty = "tokenAudience" +) + +// OverrideProperty represents property name and value that clients can override +type OverrideProperty struct { + Key EnvironmentProperty + Value string +} + +// EnvironmentFromURL loads an Environment from a URL +// This function is particularly useful in the Hybrid Cloud model, where one may define their own +// endpoints. +func EnvironmentFromURL(resourceManagerEndpoint string, properties ...OverrideProperty) (environment Environment, err error) { + var metadataEnvProperties environmentMetadataInfo + + if resourceManagerEndpoint == "" { + return environment, fmt.Errorf("Metadata resource manager endpoint is empty") + } + + if metadataEnvProperties, err = retrieveMetadataEnvironment(resourceManagerEndpoint); err != nil { + return environment, err + } + + // Give priority to user's override values + overrideProperties(&environment, properties) + + if environment.Name == "" { + environment.Name = "HybridEnvironment" + } + stampDNSSuffix := environment.StorageEndpointSuffix + if stampDNSSuffix == "" { + stampDNSSuffix = strings.TrimSuffix(strings.TrimPrefix(strings.Replace(resourceManagerEndpoint, strings.Split(resourceManagerEndpoint, ".")[0], "", 1), "."), "/") + environment.StorageEndpointSuffix = stampDNSSuffix + } + if environment.KeyVaultDNSSuffix == "" { + environment.KeyVaultDNSSuffix = fmt.Sprintf("%s.%s", "vault", stampDNSSuffix) + } + if environment.KeyVaultEndpoint == "" { + environment.KeyVaultEndpoint = fmt.Sprintf("%s%s", "https://", environment.KeyVaultDNSSuffix) + } + if environment.TokenAudience == "" { + environment.TokenAudience = metadataEnvProperties.Authentication.Audiences[0] + } + if environment.ActiveDirectoryEndpoint == "" { + environment.ActiveDirectoryEndpoint = metadataEnvProperties.Authentication.LoginEndpoint + } + if environment.ResourceManagerEndpoint == "" { + environment.ResourceManagerEndpoint = resourceManagerEndpoint + } + if environment.GalleryEndpoint == "" { + environment.GalleryEndpoint = metadataEnvProperties.GalleryEndpoint + } + if environment.GraphEndpoint == "" { + environment.GraphEndpoint = metadataEnvProperties.GraphEndpoint + } + + return environment, nil +} + +func overrideProperties(environment *Environment, properties []OverrideProperty) { + for _, property := range properties { + switch property.Key { + case EnvironmentName: + { + environment.Name = property.Value + } + case EnvironmentManagementPortalURL: + { + environment.ManagementPortalURL = property.Value + } + case EnvironmentPublishSettingsURL: + { + environment.PublishSettingsURL = property.Value + } + case EnvironmentServiceManagementEndpoint: + { + environment.ServiceManagementEndpoint = property.Value + } + case EnvironmentResourceManagerEndpoint: + { + environment.ResourceManagerEndpoint = property.Value + } + case EnvironmentActiveDirectoryEndpoint: + { + environment.ActiveDirectoryEndpoint = property.Value + } + case EnvironmentGalleryEndpoint: + { + environment.GalleryEndpoint = property.Value + } + case EnvironmentKeyVaultEndpoint: + { + environment.KeyVaultEndpoint = property.Value + } + case EnvironmentGraphEndpoint: + { + environment.GraphEndpoint = property.Value + } + case EnvironmentServiceBusEndpoint: + { + environment.ServiceBusEndpoint = property.Value + } + case EnvironmentBatchManagementEndpoint: + { + environment.BatchManagementEndpoint = property.Value + } + case EnvironmentStorageEndpointSuffix: + { + environment.StorageEndpointSuffix = property.Value + } + case EnvironmentSQLDatabaseDNSSuffix: + { + environment.SQLDatabaseDNSSuffix = property.Value + } + case EnvironmentTrafficManagerDNSSuffix: + { + environment.TrafficManagerDNSSuffix = property.Value + } + case EnvironmentKeyVaultDNSSuffix: + { + environment.KeyVaultDNSSuffix = property.Value + } + case EnvironmentServiceBusEndpointSuffix: + { + environment.ServiceBusEndpointSuffix = property.Value + } + case EnvironmentServiceManagementVMDNSSuffix: + { + environment.ServiceManagementVMDNSSuffix = property.Value + } + case EnvironmentResourceManagerVMDNSSuffix: + { + environment.ResourceManagerVMDNSSuffix = property.Value + } + case EnvironmentContainerRegistryDNSSuffix: + { + environment.ContainerRegistryDNSSuffix = property.Value + } + case EnvironmentTokenAudience: + { + environment.TokenAudience = property.Value + } + } + } +} + +func retrieveMetadataEnvironment(endpoint string) (environment environmentMetadataInfo, err error) { + client := autorest.NewClientWithUserAgent("") + managementEndpoint := fmt.Sprintf("%s%s", strings.TrimSuffix(endpoint, "/"), "/metadata/endpoints?api-version=1.0") + req, _ := http.NewRequest("GET", managementEndpoint, nil) + response, err := client.Do(req) + if err != nil { + return environment, err + } + defer response.Body.Close() + jsonResponse, err := ioutil.ReadAll(response.Body) + if err != nil { + return environment, err + } + err = json.Unmarshal(jsonResponse, &environment) + return environment, err +} diff --git a/deps/github.com/Azure/go-autorest/autorest/azure/rp.go b/deps/github.com/Azure/go-autorest/autorest/azure/rp.go index b6b95d6fd..bd34f0ed5 100644 --- a/deps/github.com/Azure/go-autorest/autorest/azure/rp.go +++ b/deps/github.com/Azure/go-autorest/autorest/azure/rp.go @@ -64,17 +64,14 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator { } } } - return resp, fmt.Errorf("failed request: %s", err) + return resp, err }) } } func getProvider(re RequestError) (string, error) { - if re.ServiceError != nil { - if re.ServiceError.Details != nil && len(*re.ServiceError.Details) > 0 { - detail := (*re.ServiceError.Details)[0].(map[string]interface{}) - return detail["target"].(string), nil - } + if re.ServiceError != nil && len(re.ServiceError.Details) > 0 { + return re.ServiceError.Details[0]["target"].(string), nil } return "", errors.New("provider was not found in the response") } @@ -118,7 +115,7 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError if err != nil { return err } - req.Cancel = originalReq.Cancel + req = req.WithContext(originalReq.Context()) resp, err := autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...), @@ -157,7 +154,7 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError if err != nil { return err } - req.Cancel = originalReq.Cancel + req = req.WithContext(originalReq.Context()) resp, err := autorest.SendWithSender(client, req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...), @@ -181,9 +178,9 @@ func register(client autorest.Client, originalReq *http.Request, re RequestError break } - delayed := autorest.DelayWithRetryAfter(resp, originalReq.Cancel) - if !delayed { - autorest.DelayForBackoff(client.PollingDelay, 0, originalReq.Cancel) + delayed := autorest.DelayWithRetryAfter(resp, originalReq.Context().Done()) + if !delayed && !autorest.DelayForBackoff(client.PollingDelay, 0, originalReq.Context().Done()) { + return originalReq.Context().Err() } } if !(time.Since(now) < client.PollingDuration) { diff --git a/deps/github.com/Azure/go-autorest/autorest/client.go b/deps/github.com/Azure/go-autorest/autorest/client.go index d329cb737..467c1509d 100644 --- a/deps/github.com/Azure/go-autorest/autorest/client.go +++ b/deps/github.com/Azure/go-autorest/autorest/client.go @@ -22,8 +22,9 @@ import ( "log" "net/http" "net/http/cookiejar" - "runtime" "time" + + "github.com/Azure/go-autorest/version" ) const ( @@ -41,15 +42,6 @@ const ( ) var ( - // defaultUserAgent builds a string containing the Go version, system archityecture and OS, - // and the go-autorest version. - defaultUserAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", - runtime.Version(), - runtime.GOARCH, - runtime.GOOS, - Version(), - ) - // StatusCodesForRetry are a defined group of status code for which the client will retry StatusCodesForRetry = []int{ http.StatusRequestTimeout, // 408 @@ -179,7 +171,7 @@ func NewClientWithUserAgent(ua string) Client { PollingDuration: DefaultPollingDuration, RetryAttempts: DefaultRetryAttempts, RetryDuration: DefaultRetryDuration, - UserAgent: defaultUserAgent, + UserAgent: version.UserAgent(), } c.Sender = c.sender() c.AddToUserAgent(ua) @@ -203,9 +195,10 @@ func (c Client) Do(r *http.Request) (*http.Response, error) { r, _ = Prepare(r, WithUserAgent(c.UserAgent)) } + // NOTE: c.WithInspection() must be last in the list so that it can inspect all preceding operations r, err := Prepare(r, - c.WithInspection(), - c.WithAuthorization()) + c.WithAuthorization(), + c.WithInspection()) if err != nil { var resp *http.Response if detErr, ok := err.(DetailedError); ok { diff --git a/deps/github.com/Azure/go-autorest/autorest/sender.go b/deps/github.com/Azure/go-autorest/autorest/sender.go index c5efd59a2..cacbd8157 100644 --- a/deps/github.com/Azure/go-autorest/autorest/sender.go +++ b/deps/github.com/Azure/go-autorest/autorest/sender.go @@ -86,7 +86,7 @@ func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*ht func AfterDelay(d time.Duration) SendDecorator { return func(s Sender) Sender { return SenderFunc(func(r *http.Request) (*http.Response, error) { - if !DelayForBackoff(d, 0, r.Cancel) { + if !DelayForBackoff(d, 0, r.Context().Done()) { return nil, fmt.Errorf("autorest: AfterDelay canceled before full delay") } return s.Do(r) @@ -165,7 +165,7 @@ func DoPollForStatusCodes(duration time.Duration, delay time.Duration, codes ... resp, err = s.Do(r) if err == nil && ResponseHasStatusCode(resp, codes...) { - r, err = NewPollingRequest(resp, r.Cancel) + r, err = NewPollingRequestWithContext(r.Context(), resp) for err == nil && ResponseHasStatusCode(resp, codes...) { Respond(resp, @@ -198,7 +198,9 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { if err == nil { return resp, err } - DelayForBackoff(backoff, attempt, r.Cancel) + if !DelayForBackoff(backoff, attempt, r.Context().Done()) { + return nil, r.Context().Err() + } } return resp, err }) @@ -221,14 +223,18 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se return resp, err } resp, err = s.Do(rr.Request()) + // if the error isn't temporary don't bother retrying + if err != nil && !IsTemporaryNetworkError(err) { + return nil, err + } // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication // resp and err will both have a value, so in this case we don't want to retry as it will never succeed. if err == nil && !ResponseHasStatusCode(resp, codes...) || IsTokenRefreshError(err) { return resp, err } - delayed := DelayWithRetryAfter(resp, r.Cancel) - if !delayed { - DelayForBackoff(backoff, attempt, r.Cancel) + delayed := DelayWithRetryAfter(resp, r.Context().Done()) + if !delayed && !DelayForBackoff(backoff, attempt, r.Context().Done()) { + return nil, r.Context().Err() } // don't count a 429 against the number of attempts // so that we continue to retry until it succeeds @@ -277,7 +283,9 @@ func DoRetryForDuration(d time.Duration, backoff time.Duration) SendDecorator { if err == nil { return resp, err } - DelayForBackoff(backoff, attempt, r.Cancel) + if !DelayForBackoff(backoff, attempt, r.Context().Done()) { + return nil, r.Context().Err() + } } return resp, err }) diff --git a/deps/github.com/Azure/go-autorest/autorest/utility.go b/deps/github.com/Azure/go-autorest/autorest/utility.go index afb3e4e16..bfddd90b5 100644 --- a/deps/github.com/Azure/go-autorest/autorest/utility.go +++ b/deps/github.com/Azure/go-autorest/autorest/utility.go @@ -20,6 +20,7 @@ import ( "encoding/xml" "fmt" "io" + "net" "net/http" "net/url" "reflect" @@ -216,3 +217,12 @@ func IsTokenRefreshError(err error) bool { } return false } + +// IsTemporaryNetworkError returns true if the specified error is a temporary network error or false +// if it's not. If the error doesn't implement the net.Error interface the return value is true. +func IsTemporaryNetworkError(err error) bool { + if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) { + return true + } + return false +} diff --git a/deps/github.com/Azure/go-autorest/autorest/version.go b/deps/github.com/Azure/go-autorest/autorest/version.go index a19c0d35a..3c6451546 100644 --- a/deps/github.com/Azure/go-autorest/autorest/version.go +++ b/deps/github.com/Azure/go-autorest/autorest/version.go @@ -1,5 +1,7 @@ package autorest +import "github.com/Azure/go-autorest/version" + // Copyright 2017 Microsoft Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,36 +16,7 @@ package autorest // See the License for the specific language governing permissions and // limitations under the License. -import ( - "bytes" - "fmt" - "strings" - "sync" -) - -const ( - major = 9 - minor = 8 - patch = 1 - tag = "" -) - -var once sync.Once -var version string - // Version returns the semantic version (see http://semver.org). func Version() string { - once.Do(func() { - semver := fmt.Sprintf("%d.%d.%d", major, minor, patch) - verBuilder := bytes.NewBufferString(semver) - if tag != "" && tag != "-" { - updated := strings.TrimPrefix(tag, "-") - _, err := verBuilder.WriteString("-" + updated) - if err == nil { - verBuilder = bytes.NewBufferString(semver) - } - } - version = verBuilder.String() - }) - return version + return version.Number } diff --git a/deps/github.com/Azure/go-autorest/version/version.go b/deps/github.com/Azure/go-autorest/version/version.go new file mode 100644 index 000000000..10d1df64f --- /dev/null +++ b/deps/github.com/Azure/go-autorest/version/version.go @@ -0,0 +1,37 @@ +package version + +// Copyright 2017 Microsoft Corporation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import ( + "fmt" + "runtime" +) + +// Number contains the semantic version of this SDK. +const Number = "v10.14.0" + +var ( + userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", + runtime.Version(), + runtime.GOARCH, + runtime.GOOS, + Number, + ) +) + +// UserAgent returns a string containing the Go version, system archityecture and OS, and the go-autorest version. +func UserAgent() string { + return userAgent +} diff --git a/deps/github.com/arangodb/go-driver/database_collections.go b/deps/github.com/arangodb/go-driver/database_collections.go index 41989f924..9e8645b07 100644 --- a/deps/github.com/arangodb/go-driver/database_collections.go +++ b/deps/github.com/arangodb/go-driver/database_collections.go @@ -89,11 +89,11 @@ type CreateCollectionOptions struct { // This field is used for internal purposes only. DO NOT USE. DistributeShardsLike string `json:"distributeShardsLike,omitempty"` // Set to create a smart edge or vertex collection. - // This requires ArangoDB enterprise. + // This requires ArangoDB Enterprise Edition. IsSmart bool `json:"isSmart,omitempty"` // This field must be set to the attribute that will be used for sharding or smart graphs. // All vertices are required to have this attribute set. Edges derive the attribute from their connected vertices. - // This requires ArangoDB enterprise. + // This requires ArangoDB Enterprise Edition. SmartGraphAttribute string `json:"smartGraphAttribute,omitempty"` } diff --git a/deps/github.com/arangodb/go-driver/database_graphs.go b/deps/github.com/arangodb/go-driver/database_graphs.go index 899f5445a..a45edda6c 100644 --- a/deps/github.com/arangodb/go-driver/database_graphs.go +++ b/deps/github.com/arangodb/go-driver/database_graphs.go @@ -49,7 +49,7 @@ type CreateGraphOptions struct { // EdgeDefinitions is an array of edge definitions for the graph. EdgeDefinitions []EdgeDefinition // IsSmart defines if the created graph should be smart. - // This only has effect in Enterprise version. + // This only has effect in Enterprise Edition. IsSmart bool // SmartGraphAttribute is the attribute name that is used to smartly shard the vertices of a graph. // Every vertex in this Graph has to have this attribute. diff --git a/deps/github.com/arangodb/go-driver/query.go b/deps/github.com/arangodb/go-driver/query.go index 47c5a2cfc..ee3d6f100 100644 --- a/deps/github.com/arangodb/go-driver/query.go +++ b/deps/github.com/arangodb/go-driver/query.go @@ -131,7 +131,7 @@ type queryRequest struct { // A list of to-be-included or to-be-excluded optimizer rules can be put into this attribute, telling the optimizer to include or exclude specific rules. // To disable a rule, prefix its name with a -, to enable a rule, prefix it with a +. There is also a pseudo-rule all, which will match all optimizer rules. OptimizerRules string `json:"optimizer.rules,omitempty"` - // This enterprise parameter allows to configure how long a DBServer will have time to bring the satellite collections + // This Enterprise Edition parameter allows to configure how long a DBServer will have time to bring the satellite collections // involved in the query into sync. The default value is 60.0 (seconds). When the max time has been reached the query will be stopped. SatelliteSyncWait float64 `json:"satelliteSyncWait,omitempty"` // if set to true and the query contains a LIMIT clause, then the result will have an extra attribute with the sub-attributes diff --git a/deps/github.com/arangodb/go-driver/test/indexes_test.go b/deps/github.com/arangodb/go-driver/test/indexes_test.go index c5ee73903..ba990be49 100644 --- a/deps/github.com/arangodb/go-driver/test/indexes_test.go +++ b/deps/github.com/arangodb/go-driver/test/indexes_test.go @@ -71,6 +71,48 @@ func TestIndexes(t *testing.T) { } } +// TestMultipleIndexes creates a collection with a full text index. +func TestMultipleIndexes(t *testing.T) { + c := createClientFromEnv(t, true) + db := ensureDatabase(nil, c, "index_test", nil, t) + col := ensureCollection(nil, db, "multiple_indexes_test", nil, t) + + // Create some indexes of same type & fields, but different options + if _, _, err := col.EnsureFullTextIndex(nil, []string{"name"}, &driver.EnsureFullTextIndexOptions{MinLength: 2}); err != nil { + t.Fatalf("Failed to create new index (1): %s", describe(err)) + } + if _, _, err := col.EnsureFullTextIndex(nil, []string{"name"}, &driver.EnsureFullTextIndexOptions{MinLength: 7}); err != nil { + t.Fatalf("Failed to create new index (2): %s", describe(err)) + } + + // Get list of indexes + if idxs, err := col.Indexes(context.Background()); err != nil { + t.Fatalf("Failed to get indexes: %s", describe(err)) + } else { + if len(idxs) != 3 { + // We made 2 indexes, 1 is always added by the system + t.Errorf("Expected 3 indexes, got %d", len(idxs)) + } + + // Try opening the indexes 1 by 1 + for _, x := range idxs { + if idx, err := col.Index(nil, x.Name()); err != nil { + t.Errorf("Failed to open index '%s': %s", x.Name(), describe(err)) + } else if idx.Name() != x.Name() { + t.Errorf("Got different index name. Expected '%s', got '%s'", x.Name(), idx.Name()) + } + } + } + + // Check index count + if stats, err := col.Statistics(nil); err != nil { + t.Fatalf("Statistics failed: %s", describe(err)) + } else if stats.Figures.Indexes.Count != 3 { + // 3 because 1 system index + 2 created above + t.Errorf("Expected 3 indexes, got %d", stats.Figures.Indexes.Count) + } +} + // TestIndexesDeduplicateHash tests no-deduplicate on hash index. func TestIndexesDeduplicateHash(t *testing.T) { c := createClientFromEnv(t, true) diff --git a/deps/github.com/beorn7/perks/quantile/stream.go b/deps/github.com/beorn7/perks/quantile/stream.go index f4cabd669..d7d14f8eb 100644 --- a/deps/github.com/beorn7/perks/quantile/stream.go +++ b/deps/github.com/beorn7/perks/quantile/stream.go @@ -77,15 +77,20 @@ func NewHighBiased(epsilon float64) *Stream { // is guaranteed to be within (Quantile±Epsilon). // // See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties. -func NewTargeted(targets map[float64]float64) *Stream { +func NewTargeted(targetMap map[float64]float64) *Stream { + // Convert map to slice to avoid slow iterations on a map. + // ƒ is called on the hot path, so converting the map to a slice + // beforehand results in significant CPU savings. + targets := targetMapToSlice(targetMap) + ƒ := func(s *stream, r float64) float64 { var m = math.MaxFloat64 var f float64 - for quantile, epsilon := range targets { - if quantile*s.n <= r { - f = (2 * epsilon * r) / quantile + for _, t := range targets { + if t.quantile*s.n <= r { + f = (2 * t.epsilon * r) / t.quantile } else { - f = (2 * epsilon * (s.n - r)) / (1 - quantile) + f = (2 * t.epsilon * (s.n - r)) / (1 - t.quantile) } if f < m { m = f @@ -96,6 +101,25 @@ func NewTargeted(targets map[float64]float64) *Stream { return newStream(ƒ) } +type target struct { + quantile float64 + epsilon float64 +} + +func targetMapToSlice(targetMap map[float64]float64) []target { + targets := make([]target, 0, len(targetMap)) + + for quantile, epsilon := range targetMap { + t := target{ + quantile: quantile, + epsilon: epsilon, + } + targets = append(targets, t) + } + + return targets +} + // Stream computes quantiles for a stream of float64s. It is not thread-safe by // design. Take care when using across multiple goroutines. type Stream struct { diff --git a/deps/github.com/cenkalti/backoff/.travis.yml b/deps/github.com/cenkalti/backoff/.travis.yml index d6f85ad6e..47a6a46ec 100644 --- a/deps/github.com/cenkalti/backoff/.travis.yml +++ b/deps/github.com/cenkalti/backoff/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.3.3 + - 1.7 - 1.x - tip before_install: diff --git a/deps/github.com/cenkalti/backoff/README.md b/deps/github.com/cenkalti/backoff/README.md index 13b347fb9..55ebc98fc 100644 --- a/deps/github.com/cenkalti/backoff/README.md +++ b/deps/github.com/cenkalti/backoff/README.md @@ -24,7 +24,7 @@ See https://godoc.org/github.com/cenkalti/backoff#pkg-examples [coveralls]: https://coveralls.io/github/cenkalti/backoff?branch=master [coveralls image]: https://coveralls.io/repos/github/cenkalti/backoff/badge.svg?branch=master -[google-http-java-client]: https://github.com/google/google-http-java-client +[google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java [exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff [advanced example]: https://godoc.org/github.com/cenkalti/backoff#example_ diff --git a/deps/github.com/cenkalti/backoff/context.go b/deps/github.com/cenkalti/backoff/context.go index 5d1570925..d70055229 100644 --- a/deps/github.com/cenkalti/backoff/context.go +++ b/deps/github.com/cenkalti/backoff/context.go @@ -1,9 +1,8 @@ package backoff import ( + "context" "time" - - "golang.org/x/net/context" ) // BackOffContext is a backoff policy that stops retrying after the context diff --git a/deps/github.com/cenkalti/backoff/context_test.go b/deps/github.com/cenkalti/backoff/context_test.go index 993fa6149..806432c43 100644 --- a/deps/github.com/cenkalti/backoff/context_test.go +++ b/deps/github.com/cenkalti/backoff/context_test.go @@ -1,10 +1,9 @@ package backoff import ( + "context" "testing" "time" - - "golang.org/x/net/context" ) func TestContext(t *testing.T) { diff --git a/deps/github.com/cenkalti/backoff/example_test.go b/deps/github.com/cenkalti/backoff/example_test.go index d97a8db8e..f9f686bb5 100644 --- a/deps/github.com/cenkalti/backoff/example_test.go +++ b/deps/github.com/cenkalti/backoff/example_test.go @@ -1,9 +1,8 @@ package backoff import ( + "context" "log" - - "golang.org/x/net/context" ) func ExampleRetry() { diff --git a/deps/github.com/cenkalti/backoff/retry.go b/deps/github.com/cenkalti/backoff/retry.go index 5dbd825b5..e65cc700d 100644 --- a/deps/github.com/cenkalti/backoff/retry.go +++ b/deps/github.com/cenkalti/backoff/retry.go @@ -15,7 +15,6 @@ type Notify func(error, time.Duration) // Retry the operation o until it does not return error or BackOff stops. // o is guaranteed to be run at least once. -// It is the caller's responsibility to reset b after Retry returns. // // If o returns a *PermanentError, the operation is not retried, and the // wrapped error is returned. diff --git a/deps/github.com/cenkalti/backoff/retry_test.go b/deps/github.com/cenkalti/backoff/retry_test.go index 5af288897..a9b8be1a9 100644 --- a/deps/github.com/cenkalti/backoff/retry_test.go +++ b/deps/github.com/cenkalti/backoff/retry_test.go @@ -1,13 +1,12 @@ package backoff import ( + "context" "errors" "fmt" "log" "testing" "time" - - "golang.org/x/net/context" ) func TestRetry(t *testing.T) { diff --git a/deps/github.com/cenkalti/backoff/ticker.go b/deps/github.com/cenkalti/backoff/ticker.go index e742512fd..e41084b0e 100644 --- a/deps/github.com/cenkalti/backoff/ticker.go +++ b/deps/github.com/cenkalti/backoff/ticker.go @@ -1,7 +1,6 @@ package backoff import ( - "runtime" "sync" "time" ) @@ -34,7 +33,6 @@ func NewTicker(b BackOff) *Ticker { } t.b.Reset() go t.run() - runtime.SetFinalizer(t, (*Ticker).Stop) return t } diff --git a/deps/github.com/cenkalti/backoff/ticker_test.go b/deps/github.com/cenkalti/backoff/ticker_test.go index 6aae254b3..4dc78bd60 100644 --- a/deps/github.com/cenkalti/backoff/ticker_test.go +++ b/deps/github.com/cenkalti/backoff/ticker_test.go @@ -1,13 +1,12 @@ package backoff import ( + "context" "errors" "fmt" "log" "testing" "time" - - "golang.org/x/net/context" ) func TestTicker(t *testing.T) { diff --git a/deps/github.com/cockroachdb/cmux/.gitignore b/deps/github.com/cockroachdb/cmux/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/deps/github.com/cockroachdb/cmux/.travis.yml b/deps/github.com/cockroachdb/cmux/.travis.yml new file mode 100644 index 000000000..e73780f2e --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/.travis.yml @@ -0,0 +1,22 @@ +language: go + +go: + - 1.3 + - 1.4 + - 1.5 + - 1.6 + +gobuild_args: -race + +before_install: + - go get -u github.com/golang/lint/golint + - if [[ $TRAVIS_GO_VERSION == 1.5* ]]; then go get -u github.com/kisielk/errcheck; fi + - go get -u golang.org/x/tools/cmd/vet + +before_script: + - '! gofmt -s -l . | read' + - golint ./... + - echo $TRAVIS_GO_VERSION + - if [[ $TRAVIS_GO_VERSION == 1.5* ]]; then errcheck ./...; fi + - go vet . + - go tool vet --shadow . diff --git a/deps/github.com/cockroachdb/cmux/LICENSE b/deps/github.com/cockroachdb/cmux/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/deps/github.com/cockroachdb/cmux/README.md b/deps/github.com/cockroachdb/cmux/README.md new file mode 100644 index 000000000..b3713da58 --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/README.md @@ -0,0 +1,65 @@ +# cmux: Connection Mux [![Build Status](https://travis-ci.org/cockroachdb/cmux.svg?branch=master)](https://travis-ci.org/cockroachdb/cmux) [![GoDoc](https://godoc.org/github.com/cockroachdb/cmux?status.svg)](https://godoc.org/github.com/cockroachdb/cmux) + +cmux is a generic Go library to multiplex connections based on their payload. +Using cmux, you can serve gRPC, SSH, HTTPS, HTTP, Go RPC, and pretty much any +other protocol on the same TCP listener. + +## How-To +Simply create your main listener, create a cmux for that listener, +and then match connections: +```go +// Create the main listener. +l, err := net.Listen("tcp", ":23456") +if err != nil { + log.Fatal(err) +} + +// Create a cmux. +m := cmux.New(l) + +// Match connections in order: +// First grpc, then HTTP, and otherwise Go RPC/TCP. +grpcL := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc")) +httpL := m.Match(cmux.HTTP1Fast()) +trpcL := m.Match(cmux.Any()) // Any means anything that is not yet matched. + +// Create your protocol servers. +grpcS := grpc.NewServer() +grpchello.RegisterGreeterServer(grpcs, &server{}) + +httpS := &http.Server{ + Handler: &helloHTTP1Handler{}, +} + +trpcS := rpc.NewServer() +s.Register(&ExampleRPCRcvr{}) + +// Use the muxed listeners for your servers. +go grpcS.Serve(grpcL) +go httpS.Serve(httpL) +go trpcS.Accept(trpcL) + +// Start serving! +m.Serve() +``` + +There are [more examples on GoDoc](https://godoc.org/github.com/cockroachdb/cmux#pkg-examples). + +## Performance +Since we are only matching the very first bytes of a connection, the +performance overhead on long-lived connections (i.e., RPCs and pipelined HTTP +streams) is negligible. + +## Limitations +* *TLS*: `net/http` uses a [type assertion](https://github.com/golang/go/issues/14221) +to identify TLS connections; since cmux's lookahead-implementing connection +wraps the underlying TLS connection, this type assertion fails. This means you +can serve HTTPS using cmux but `http.Request.TLS` will not be set in your +handlers. If you are able to wrap TLS around cmux, you can work around this +limitation. See https://github.com/cockroachdb/cockroach/commit/83caba2 for an +example of this approach. + +* *Different Protocols on The Same Connection*: `cmux` matches the connection +when it's accepted. For example, one connection can be either gRPC or REST, but +not both. That is, we assume that a client connection is either used for gRPC +or REST. diff --git a/deps/github.com/cockroachdb/cmux/buffer.go b/deps/github.com/cockroachdb/cmux/buffer.go new file mode 100644 index 000000000..5c1785853 --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/buffer.go @@ -0,0 +1,35 @@ +package cmux + +import ( + "bytes" + "io" +) + +// bufferedReader is an optimized implementation of io.Reader that behaves like +// ``` +// io.MultiReader(bytes.NewReader(buffer.Bytes()), io.TeeReader(source, buffer)) +// ``` +// without allocating. +type bufferedReader struct { + source io.Reader + buffer *bytes.Buffer + bufferRead int + bufferSize int +} + +func (s *bufferedReader) Read(p []byte) (int, error) { + // Functionality of bytes.Reader. + bn := copy(p, s.buffer.Bytes()[s.bufferRead:s.bufferSize]) + s.bufferRead += bn + + p = p[bn:] + + // Funtionality of io.TeeReader. + sn, sErr := s.source.Read(p) + if sn > 0 { + if wn, wErr := s.buffer.Write(p[:sn]); wErr != nil { + return bn + wn, wErr + } + } + return bn + sn, sErr +} diff --git a/deps/github.com/cockroachdb/cmux/cmux.go b/deps/github.com/cockroachdb/cmux/cmux.go new file mode 100644 index 000000000..89cc910b0 --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/cmux.go @@ -0,0 +1,210 @@ +package cmux + +import ( + "bytes" + "fmt" + "io" + "net" + "sync" +) + +// Matcher matches a connection based on its content. +type Matcher func(io.Reader) bool + +// ErrorHandler handles an error and returns whether +// the mux should continue serving the listener. +type ErrorHandler func(error) bool + +var _ net.Error = ErrNotMatched{} + +// ErrNotMatched is returned whenever a connection is not matched by any of +// the matchers registered in the multiplexer. +type ErrNotMatched struct { + c net.Conn +} + +func (e ErrNotMatched) Error() string { + return fmt.Sprintf("mux: connection %v not matched by an matcher", + e.c.RemoteAddr()) +} + +// Temporary implements the net.Error interface. +func (e ErrNotMatched) Temporary() bool { return true } + +// Timeout implements the net.Error interface. +func (e ErrNotMatched) Timeout() bool { return false } + +type errListenerClosed string + +func (e errListenerClosed) Error() string { return string(e) } +func (e errListenerClosed) Temporary() bool { return false } +func (e errListenerClosed) Timeout() bool { return false } + +// ErrListenerClosed is returned from muxListener.Accept when the underlying +// listener is closed. +var ErrListenerClosed = errListenerClosed("mux: listener closed") + +// New instantiates a new connection multiplexer. +func New(l net.Listener) CMux { + return &cMux{ + root: l, + bufLen: 1024, + errh: func(_ error) bool { return true }, + donec: make(chan struct{}), + } +} + +// CMux is a multiplexer for network connections. +type CMux interface { + // Match returns a net.Listener that sees (i.e., accepts) only + // the connections matched by at least one of the matcher. + // + // The order used to call Match determines the priority of matchers. + Match(...Matcher) net.Listener + // Serve starts multiplexing the listener. Serve blocks and perhaps + // should be invoked concurrently within a go routine. + Serve() error + // HandleError registers an error handler that handles listener errors. + HandleError(ErrorHandler) +} + +type matchersListener struct { + ss []Matcher + l muxListener +} + +type cMux struct { + root net.Listener + bufLen int + errh ErrorHandler + donec chan struct{} + sls []matchersListener +} + +func (m *cMux) Match(matchers ...Matcher) net.Listener { + ml := muxListener{ + Listener: m.root, + connc: make(chan net.Conn, m.bufLen), + } + m.sls = append(m.sls, matchersListener{ss: matchers, l: ml}) + return ml +} + +func (m *cMux) Serve() error { + var wg sync.WaitGroup + + defer func() { + close(m.donec) + wg.Wait() + + for _, sl := range m.sls { + close(sl.l.connc) + // Drain the connections enqueued for the listener. + for c := range sl.l.connc { + _ = c.Close() + } + } + }() + + for { + c, err := m.root.Accept() + if err != nil { + if !m.handleErr(err) { + return err + } + continue + } + + wg.Add(1) + go m.serve(c, m.donec, &wg) + } +} + +func (m *cMux) serve(c net.Conn, donec <-chan struct{}, wg *sync.WaitGroup) { + defer wg.Done() + + muc := newMuxConn(c) + for _, sl := range m.sls { + for _, s := range sl.ss { + matched := s(muc.getSniffer()) + if matched { + select { + case sl.l.connc <- muc: + case <-donec: + _ = c.Close() + } + return + } + } + } + + _ = c.Close() + err := ErrNotMatched{c: c} + if !m.handleErr(err) { + _ = m.root.Close() + } +} + +func (m *cMux) HandleError(h ErrorHandler) { + m.errh = h +} + +func (m *cMux) handleErr(err error) bool { + if !m.errh(err) { + return false + } + + if ne, ok := err.(net.Error); ok { + return ne.Temporary() + } + + return false +} + +type muxListener struct { + net.Listener + connc chan net.Conn +} + +func (l muxListener) Accept() (net.Conn, error) { + c, ok := <-l.connc + if !ok { + return nil, ErrListenerClosed + } + return c, nil +} + +// MuxConn wraps a net.Conn and provides transparent sniffing of connection data. +type MuxConn struct { + net.Conn + buf bytes.Buffer + sniffer bufferedReader +} + +func newMuxConn(c net.Conn) *MuxConn { + return &MuxConn{ + Conn: c, + } +} + +// From the io.Reader documentation: +// +// When Read encounters an error or end-of-file condition after +// successfully reading n > 0 bytes, it returns the number of +// bytes read. It may return the (non-nil) error from the same call +// or return the error (and n == 0) from a subsequent call. +// An instance of this general case is that a Reader returning +// a non-zero number of bytes at the end of the input stream may +// return either err == EOF or err == nil. The next Read should +// return 0, EOF. +func (m *MuxConn) Read(p []byte) (int, error) { + if n, err := m.buf.Read(p); err != io.EOF { + return n, err + } + return m.Conn.Read(p) +} + +func (m *MuxConn) getSniffer() io.Reader { + m.sniffer = bufferedReader{source: m.Conn, buffer: &m.buf, bufferSize: m.buf.Len()} + return &m.sniffer +} diff --git a/deps/github.com/cockroachdb/cmux/matchers.go b/deps/github.com/cockroachdb/cmux/matchers.go new file mode 100644 index 000000000..abc30f6e0 --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/matchers.go @@ -0,0 +1,150 @@ +package cmux + +import ( + "bufio" + "io" + "io/ioutil" + "net/http" + "strings" + + "golang.org/x/net/http2" + "golang.org/x/net/http2/hpack" +) + +// Any is a Matcher that matches any connection. +func Any() Matcher { + return func(r io.Reader) bool { return true } +} + +// PrefixMatcher returns a matcher that matches a connection if it +// starts with any of the strings in strs. +func PrefixMatcher(strs ...string) Matcher { + pt := newPatriciaTreeString(strs...) + return pt.matchPrefix +} + +var defaultHTTPMethods = []string{ + "OPTIONS", + "GET", + "HEAD", + "POST", + "PUT", + "DELETE", + "TRACE", + "CONNECT", +} + +// HTTP1Fast only matches the methods in the HTTP request. +// +// This matcher is very optimistic: if it returns true, it does not mean that +// the request is a valid HTTP response. If you want a correct but slower HTTP1 +// matcher, use HTTP1 instead. +func HTTP1Fast(extMethods ...string) Matcher { + return PrefixMatcher(append(defaultHTTPMethods, extMethods...)...) +} + +const maxHTTPRead = 4096 + +// HTTP1 parses the first line or upto 4096 bytes of the request to see if +// the conection contains an HTTP request. +func HTTP1() Matcher { + return func(r io.Reader) bool { + br := bufio.NewReader(&io.LimitedReader{R: r, N: maxHTTPRead}) + l, part, err := br.ReadLine() + if err != nil || part { + return false + } + + _, _, proto, ok := parseRequestLine(string(l)) + if !ok { + return false + } + + v, _, ok := http.ParseHTTPVersion(proto) + return ok && v == 1 + } +} + +// grabbed from net/http. +func parseRequestLine(line string) (method, uri, proto string, ok bool) { + s1 := strings.Index(line, " ") + s2 := strings.Index(line[s1+1:], " ") + if s1 < 0 || s2 < 0 { + return + } + s2 += s1 + 1 + return line[:s1], line[s1+1 : s2], line[s2+1:], true +} + +// HTTP2 parses the frame header of the first frame to detect whether the +// connection is an HTTP2 connection. +func HTTP2() Matcher { + return hasHTTP2Preface +} + +// HTTP1HeaderField returns a matcher matching the header fields of the first +// request of an HTTP 1 connection. +func HTTP1HeaderField(name, value string) Matcher { + return func(r io.Reader) bool { + return matchHTTP1Field(r, name, value) + } +} + +// HTTP2HeaderField resturns a matcher matching the header fields of the first +// headers frame. +func HTTP2HeaderField(name, value string) Matcher { + return func(r io.Reader) bool { + return matchHTTP2Field(r, name, value) + } +} + +func hasHTTP2Preface(r io.Reader) bool { + var b [len(http2.ClientPreface)]byte + if _, err := io.ReadFull(r, b[:]); err != nil { + return false + } + + return string(b[:]) == http2.ClientPreface +} + +func matchHTTP1Field(r io.Reader, name, value string) (matched bool) { + req, err := http.ReadRequest(bufio.NewReader(r)) + if err != nil { + return false + } + + return req.Header.Get(name) == value +} + +func matchHTTP2Field(r io.Reader, name, value string) (matched bool) { + if !hasHTTP2Preface(r) { + return false + } + + framer := http2.NewFramer(ioutil.Discard, r) + hdec := hpack.NewDecoder(uint32(4<<10), func(hf hpack.HeaderField) { + if hf.Name == name && hf.Value == value { + matched = true + } + }) + for { + f, err := framer.ReadFrame() + if err != nil { + return false + } + + switch f := f.(type) { + case *http2.HeadersFrame: + if _, err := hdec.Write(f.HeaderBlockFragment()); err != nil { + return false + } + if matched { + return true + } + + if f.FrameHeader.Flags&http2.FlagHeadersEndHeaders != 0 { + return false + } + } + } +} diff --git a/deps/github.com/cockroachdb/cmux/patricia.go b/deps/github.com/cockroachdb/cmux/patricia.go new file mode 100644 index 000000000..56ec4e7b2 --- /dev/null +++ b/deps/github.com/cockroachdb/cmux/patricia.go @@ -0,0 +1,173 @@ +package cmux + +import ( + "bytes" + "io" +) + +// patriciaTree is a simple patricia tree that handles []byte instead of string +// and cannot be changed after instantiation. +type patriciaTree struct { + root *ptNode +} + +func newPatriciaTree(b ...[]byte) *patriciaTree { + return &patriciaTree{ + root: newNode(b), + } +} + +func newPatriciaTreeString(strs ...string) *patriciaTree { + b := make([][]byte, len(strs)) + for i, s := range strs { + b[i] = []byte(s) + } + return &patriciaTree{ + root: newNode(b), + } +} + +func (t *patriciaTree) matchPrefix(r io.Reader) bool { + return t.root.match(r, true) +} + +func (t *patriciaTree) match(r io.Reader) bool { + return t.root.match(r, false) +} + +type ptNode struct { + prefix []byte + next map[byte]*ptNode + terminal bool +} + +func newNode(strs [][]byte) *ptNode { + if len(strs) == 0 { + return &ptNode{ + prefix: []byte{}, + terminal: true, + } + } + + if len(strs) == 1 { + return &ptNode{ + prefix: strs[0], + terminal: true, + } + } + + p, strs := splitPrefix(strs) + n := &ptNode{ + prefix: p, + } + + nexts := make(map[byte][][]byte) + for _, s := range strs { + if len(s) == 0 { + n.terminal = true + continue + } + nexts[s[0]] = append(nexts[s[0]], s[1:]) + } + + n.next = make(map[byte]*ptNode) + for first, rests := range nexts { + n.next[first] = newNode(rests) + } + + return n +} + +func splitPrefix(bss [][]byte) (prefix []byte, rest [][]byte) { + if len(bss) == 0 || len(bss[0]) == 0 { + return prefix, bss + } + + if len(bss) == 1 { + return bss[0], [][]byte{{}} + } + + for i := 0; ; i++ { + var cur byte + eq := true + for j, b := range bss { + if len(b) <= i { + eq = false + break + } + + if j == 0 { + cur = b[i] + continue + } + + if cur != b[i] { + eq = false + break + } + } + + if !eq { + break + } + + prefix = append(prefix, cur) + } + + rest = make([][]byte, 0, len(bss)) + for _, b := range bss { + rest = append(rest, b[len(prefix):]) + } + + return prefix, rest +} + +func readBytes(r io.Reader, n int) (b []byte, err error) { + b = make([]byte, n) + o := 0 + for o < n { + nr, err := r.Read(b[o:]) + if err != nil && err != io.EOF { + return b, err + } + + o += nr + + if err == io.EOF { + break + } + } + return b[:o], nil +} + +func (n *ptNode) match(r io.Reader, prefix bool) bool { + if l := len(n.prefix); l > 0 { + b, err := readBytes(r, l) + if err != nil || len(b) != l || !bytes.Equal(b, n.prefix) { + return false + } + } + + if prefix && n.terminal { + return true + } + + b := make([]byte, 1) + for { + nr, err := r.Read(b) + if nr != 0 { + break + } + + if err == io.EOF { + return n.terminal + } + + if err != nil { + return false + } + } + + nextN, ok := n.next[b[0]] + return ok && nextN.match(r, prefix) +} diff --git a/deps/github.com/coreos/bbolt/.gitignore b/deps/github.com/coreos/bbolt/.gitignore new file mode 100644 index 000000000..c2a8cfa78 --- /dev/null +++ b/deps/github.com/coreos/bbolt/.gitignore @@ -0,0 +1,5 @@ +*.prof +*.test +*.swp +/bin/ +cmd/bolt/bolt diff --git a/deps/github.com/coreos/bbolt/LICENSE b/deps/github.com/coreos/bbolt/LICENSE new file mode 100644 index 000000000..004e77fe5 --- /dev/null +++ b/deps/github.com/coreos/bbolt/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ben Johnson + +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/deps/github.com/coreos/bbolt/Makefile b/deps/github.com/coreos/bbolt/Makefile new file mode 100644 index 000000000..43b94f3bd --- /dev/null +++ b/deps/github.com/coreos/bbolt/Makefile @@ -0,0 +1,30 @@ +BRANCH=`git rev-parse --abbrev-ref HEAD` +COMMIT=`git rev-parse --short HEAD` +GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" + +default: build + +race: + @go test -v -race -test.run="TestSimulate_(100op|1000op)" + +fmt: + !(gofmt -l -s -d $(shell find . -name \*.go) | grep '[a-z]') + +# go get honnef.co/go/tools/simple +gosimple: + gosimple ./... + +# go get honnef.co/go/tools/unused +unused: + unused ./... + +# go get github.com/kisielk/errcheck +errcheck: + @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/coreos/bbolt + +test: + go test -timeout 20m -v -coverprofile cover.out -covermode atomic + # Note: gets "program not an importable package" in out of path builds + go test -v ./cmd/bolt + +.PHONY: race fmt errcheck test gosimple unused diff --git a/deps/github.com/coreos/bbolt/README.md b/deps/github.com/coreos/bbolt/README.md new file mode 100644 index 000000000..015f0efbe --- /dev/null +++ b/deps/github.com/coreos/bbolt/README.md @@ -0,0 +1,928 @@ +bbolt +==== + +[![Go Report Card](https://goreportcard.com/badge/github.com/coreos/bbolt?style=flat-square)](https://goreportcard.com/report/github.com/coreos/bbolt) +[![Coverage](https://codecov.io/gh/coreos/bbolt/branch/master/graph/badge.svg)](https://codecov.io/gh/coreos/bbolt) +[![Godoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](https://godoc.org/github.com/coreos/bbolt) + +bbolt is a fork of [Ben Johnson's][gh_ben] [Bolt][bolt] key/value +store. The purpose of this fork is to provide the Go community with an active +maintenance and development target for Bolt; the goal is improved reliability +and stability. bbolt includes bug fixes, performance enhancements, and features +not found in Bolt while preserving backwards compatibility with the Bolt API. + +Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] +[LMDB project][lmdb]. The goal of the project is to provide a simple, +fast, and reliable database for projects that don't require a full database +server such as Postgres or MySQL. + +Since Bolt is meant to be used as such a low-level piece of functionality, +simplicity is key. The API will be small and only focus on getting values +and setting values. That's it. + +[gh_ben]: https://github.com/benbjohnson +[bolt]: https://github.com/boltdb/bolt +[hyc_symas]: https://twitter.com/hyc_symas +[lmdb]: http://symas.com/mdb/ + +## Project Status + +Bolt is stable, the API is fixed, and the file format is fixed. Full unit +test coverage and randomized black box testing are used to ensure database +consistency and thread safety. Bolt is currently used in high-load production +environments serving databases as large as 1TB. Many companies such as +Shopify and Heroku use Bolt-backed services every day. + +## Table of Contents + +- [Getting Started](#getting-started) + - [Installing](#installing) + - [Opening a database](#opening-a-database) + - [Transactions](#transactions) + - [Read-write transactions](#read-write-transactions) + - [Read-only transactions](#read-only-transactions) + - [Batch read-write transactions](#batch-read-write-transactions) + - [Managing transactions manually](#managing-transactions-manually) + - [Using buckets](#using-buckets) + - [Using key/value pairs](#using-keyvalue-pairs) + - [Autoincrementing integer for the bucket](#autoincrementing-integer-for-the-bucket) + - [Iterating over keys](#iterating-over-keys) + - [Prefix scans](#prefix-scans) + - [Range scans](#range-scans) + - [ForEach()](#foreach) + - [Nested buckets](#nested-buckets) + - [Database backups](#database-backups) + - [Statistics](#statistics) + - [Read-Only Mode](#read-only-mode) + - [Mobile Use (iOS/Android)](#mobile-use-iosandroid) +- [Resources](#resources) +- [Comparison with other databases](#comparison-with-other-databases) + - [Postgres, MySQL, & other relational databases](#postgres-mysql--other-relational-databases) + - [LevelDB, RocksDB](#leveldb-rocksdb) + - [LMDB](#lmdb) +- [Caveats & Limitations](#caveats--limitations) +- [Reading the Source](#reading-the-source) +- [Other Projects Using Bolt](#other-projects-using-bolt) + +## Getting Started + +### Installing + +To start using Bolt, install Go and run `go get`: + +```sh +$ go get github.com/coreos/bbolt/... +``` + +This will retrieve the library and install the `bolt` command line utility into +your `$GOBIN` path. + + +### Opening a database + +The top-level object in Bolt is a `DB`. It is represented as a single file on +your disk and represents a consistent snapshot of your data. + +To open your database, simply use the `bolt.Open()` function: + +```go +package main + +import ( + "log" + + bolt "github.com/coreos/bbolt" +) + +func main() { + // Open the my.db data file in your current directory. + // It will be created if it doesn't exist. + db, err := bolt.Open("my.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + defer db.Close() + + ... +} +``` + +Please note that Bolt obtains a file lock on the data file so multiple processes +cannot open the same database at the same time. Opening an already open Bolt +database will cause it to hang until the other process closes it. To prevent +an indefinite wait you can pass a timeout option to the `Open()` function: + +```go +db, err := bolt.Open("my.db", 0600, &bolt.Options{Timeout: 1 * time.Second}) +``` + + +### Transactions + +Bolt allows only one read-write transaction at a time but allows as many +read-only transactions as you want at a time. Each transaction has a consistent +view of the data as it existed when the transaction started. + +Individual transactions and all objects created from them (e.g. buckets, keys) +are not thread safe. To work with data in multiple goroutines you must start +a transaction for each one or use locking to ensure only one goroutine accesses +a transaction at a time. Creating transaction from the `DB` is thread safe. + +Read-only transactions and read-write transactions should not depend on one +another and generally shouldn't be opened simultaneously in the same goroutine. +This can cause a deadlock as the read-write transaction needs to periodically +re-map the data file but it cannot do so while a read-only transaction is open. + + +#### Read-write transactions + +To start a read-write transaction, you can use the `DB.Update()` function: + +```go +err := db.Update(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Inside the closure, you have a consistent view of the database. You commit the +transaction by returning `nil` at the end. You can also rollback the transaction +at any point by returning an error. All database operations are allowed inside +a read-write transaction. + +Always check the return error as it will report any disk failures that can cause +your transaction to not complete. If you return an error within your closure +it will be passed through. + + +#### Read-only transactions + +To start a read-only transaction, you can use the `DB.View()` function: + +```go +err := db.View(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +You also get a consistent view of the database within this closure, however, +no mutating operations are allowed within a read-only transaction. You can only +retrieve buckets, retrieve values, and copy the database within a read-only +transaction. + + +#### Batch read-write transactions + +Each `DB.Update()` waits for disk to commit the writes. This overhead +can be minimized by combining multiple updates with the `DB.Batch()` +function: + +```go +err := db.Batch(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Concurrent Batch calls are opportunistically combined into larger +transactions. Batch is only useful when there are multiple goroutines +calling it. + +The trade-off is that `Batch` can call the given +function multiple times, if parts of the transaction fail. The +function must be idempotent and side effects must take effect only +after a successful return from `DB.Batch()`. + +For example: don't display messages from inside the function, instead +set variables in the enclosing scope: + +```go +var id uint64 +err := db.Batch(func(tx *bolt.Tx) error { + // Find last key in bucket, decode as bigendian uint64, increment + // by one, encode back to []byte, and add new key. + ... + id = newValue + return nil +}) +if err != nil { + return ... +} +fmt.Println("Allocated ID %d", id) +``` + + +#### Managing transactions manually + +The `DB.View()` and `DB.Update()` functions are wrappers around the `DB.Begin()` +function. These helper functions will start the transaction, execute a function, +and then safely close your transaction if an error is returned. This is the +recommended way to use Bolt transactions. + +However, sometimes you may want to manually start and end your transactions. +You can use the `DB.Begin()` function directly but **please** be sure to close +the transaction. + +```go +// Start a writable transaction. +tx, err := db.Begin(true) +if err != nil { + return err +} +defer tx.Rollback() + +// Use the transaction... +_, err := tx.CreateBucket([]byte("MyBucket")) +if err != nil { + return err +} + +// Commit the transaction and check for error. +if err := tx.Commit(); err != nil { + return err +} +``` + +The first argument to `DB.Begin()` is a boolean stating if the transaction +should be writable. + + +### Using buckets + +Buckets are collections of key/value pairs within the database. All keys in a +bucket must be unique. You can create a bucket using the `DB.CreateBucket()` +function: + +```go +db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("MyBucket")) + if err != nil { + return fmt.Errorf("create bucket: %s", err) + } + return nil +}) +``` + +You can also create a bucket only if it doesn't exist by using the +`Tx.CreateBucketIfNotExists()` function. It's a common pattern to call this +function for all your top-level buckets after you open your database so you can +guarantee that they exist for future transactions. + +To delete a bucket, simply call the `Tx.DeleteBucket()` function. + + +### Using key/value pairs + +To save a key/value pair to a bucket, use the `Bucket.Put()` function: + +```go +db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + err := b.Put([]byte("answer"), []byte("42")) + return err +}) +``` + +This will set the value of the `"answer"` key to `"42"` in the `MyBucket` +bucket. To retrieve this value, we can use the `Bucket.Get()` function: + +```go +db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + v := b.Get([]byte("answer")) + fmt.Printf("The answer is: %s\n", v) + return nil +}) +``` + +The `Get()` function does not return an error because its operation is +guaranteed to work (unless there is some kind of system failure). If the key +exists then it will return its byte slice value. If it doesn't exist then it +will return `nil`. It's important to note that you can have a zero-length value +set to a key which is different than the key not existing. + +Use the `Bucket.Delete()` function to delete a key from the bucket. + +Please note that values returned from `Get()` are only valid while the +transaction is open. If you need to use a value outside of the transaction +then you must use `copy()` to copy it to another byte slice. + + +### Autoincrementing integer for the bucket +By using the `NextSequence()` function, you can let Bolt determine a sequence +which can be used as the unique identifier for your key/value pairs. See the +example below. + +```go +// CreateUser saves u to the store. The new user ID is set on u once the data is persisted. +func (s *Store) CreateUser(u *User) error { + return s.db.Update(func(tx *bolt.Tx) error { + // Retrieve the users bucket. + // This should be created when the DB is first opened. + b := tx.Bucket([]byte("users")) + + // Generate ID for the user. + // This returns an error only if the Tx is closed or not writeable. + // That can't happen in an Update() call so I ignore the error check. + id, _ := b.NextSequence() + u.ID = int(id) + + // Marshal user data into bytes. + buf, err := json.Marshal(u) + if err != nil { + return err + } + + // Persist bytes to users bucket. + return b.Put(itob(u.ID), buf) + }) +} + +// itob returns an 8-byte big endian representation of v. +func itob(v int) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(v)) + return b +} + +type User struct { + ID int + ... +} +``` + +### Iterating over keys + +Bolt stores its keys in byte-sorted order within a bucket. This makes sequential +iteration over these keys extremely fast. To iterate over keys we'll use a +`Cursor`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + c := b.Cursor() + + for k, v := c.First(); k != nil; k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +The cursor allows you to move to a specific point in the list of keys and move +forward or backward through the keys one at a time. + +The following functions are available on the cursor: + +``` +First() Move to the first key. +Last() Move to the last key. +Seek() Move to a specific key. +Next() Move to the next key. +Prev() Move to the previous key. +``` + +Each of those functions has a return signature of `(key []byte, value []byte)`. +When you have iterated to the end of the cursor then `Next()` will return a +`nil` key. You must seek to a position using `First()`, `Last()`, or `Seek()` +before calling `Next()` or `Prev()`. If you do not seek to a position then +these functions will return a `nil` key. + +During iteration, if the key is non-`nil` but the value is `nil`, that means +the key refers to a bucket rather than a value. Use `Bucket.Bucket()` to +access the sub-bucket. + + +#### Prefix scans + +To iterate over a key prefix, you can combine `Seek()` and `bytes.HasPrefix()`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + c := tx.Bucket([]byte("MyBucket")).Cursor() + + prefix := []byte("1234") + for k, v := c.Seek(prefix); k != nil && bytes.HasPrefix(k, prefix); k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +#### Range scans + +Another common use case is scanning over a range such as a time range. If you +use a sortable time encoding such as RFC3339 then you can query a specific +date range like this: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume our events bucket exists and has RFC3339 encoded time keys. + c := tx.Bucket([]byte("Events")).Cursor() + + // Our time range spans the 90's decade. + min := []byte("1990-01-01T00:00:00Z") + max := []byte("2000-01-01T00:00:00Z") + + // Iterate over the 90's. + for k, v := c.Seek(min); k != nil && bytes.Compare(k, max) <= 0; k, v = c.Next() { + fmt.Printf("%s: %s\n", k, v) + } + + return nil +}) +``` + +Note that, while RFC3339 is sortable, the Golang implementation of RFC3339Nano does not use a fixed number of digits after the decimal point and is therefore not sortable. + + +#### ForEach() + +You can also use the function `ForEach()` if you know you'll be iterating over +all the keys in a bucket: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + b.ForEach(func(k, v []byte) error { + fmt.Printf("key=%s, value=%s\n", k, v) + return nil + }) + return nil +}) +``` + +Please note that keys and values in `ForEach()` are only valid while +the transaction is open. If you need to use a key or value outside of +the transaction, you must use `copy()` to copy it to another byte +slice. + +### Nested buckets + +You can also store a bucket in a key to create nested buckets. The API is the +same as the bucket management API on the `DB` object: + +```go +func (*Bucket) CreateBucket(key []byte) (*Bucket, error) +func (*Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) +func (*Bucket) DeleteBucket(key []byte) error +``` + +Say you had a multi-tenant application where the root level bucket was the account bucket. Inside of this bucket was a sequence of accounts which themselves are buckets. And inside the sequence bucket you could have many buckets pertaining to the Account itself (Users, Notes, etc) isolating the information into logical groupings. + +```go + +// createUser creates a new user in the given account. +func createUser(accountID int, u *User) error { + // Start the transaction. + tx, err := db.Begin(true) + if err != nil { + return err + } + defer tx.Rollback() + + // Retrieve the root bucket for the account. + // Assume this has already been created when the account was set up. + root := tx.Bucket([]byte(strconv.FormatUint(accountID, 10))) + + // Setup the users bucket. + bkt, err := root.CreateBucketIfNotExists([]byte("USERS")) + if err != nil { + return err + } + + // Generate an ID for the new user. + userID, err := bkt.NextSequence() + if err != nil { + return err + } + u.ID = userID + + // Marshal and save the encoded user. + if buf, err := json.Marshal(u); err != nil { + return err + } else if err := bkt.Put([]byte(strconv.FormatUint(u.ID, 10)), buf); err != nil { + return err + } + + // Commit the transaction. + if err := tx.Commit(); err != nil { + return err + } + + return nil +} + +``` + + + + +### Database backups + +Bolt is a single file so it's easy to backup. You can use the `Tx.WriteTo()` +function to write a consistent view of the database to a writer. If you call +this from a read-only transaction, it will perform a hot backup and not block +your other database reads and writes. + +By default, it will use a regular file handle which will utilize the operating +system's page cache. See the [`Tx`](https://godoc.org/github.com/coreos/bbolt#Tx) +documentation for information about optimizing for larger-than-RAM datasets. + +One common use case is to backup over HTTP so you can use tools like `cURL` to +do database backups: + +```go +func BackupHandleFunc(w http.ResponseWriter, req *http.Request) { + err := db.View(func(tx *bolt.Tx) error { + w.Header().Set("Content-Type", "application/octet-stream") + w.Header().Set("Content-Disposition", `attachment; filename="my.db"`) + w.Header().Set("Content-Length", strconv.Itoa(int(tx.Size()))) + _, err := tx.WriteTo(w) + return err + }) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } +} +``` + +Then you can backup using this command: + +```sh +$ curl http://localhost/backup > my.db +``` + +Or you can open your browser to `http://localhost/backup` and it will download +automatically. + +If you want to backup to another file you can use the `Tx.CopyFile()` helper +function. + + +### Statistics + +The database keeps a running count of many of the internal operations it +performs so you can better understand what's going on. By grabbing a snapshot +of these stats at two points in time we can see what operations were performed +in that time range. + +For example, we could start a goroutine to log stats every 10 seconds: + +```go +go func() { + // Grab the initial stats. + prev := db.Stats() + + for { + // Wait for 10s. + time.Sleep(10 * time.Second) + + // Grab the current stats and diff them. + stats := db.Stats() + diff := stats.Sub(&prev) + + // Encode stats to JSON and print to STDERR. + json.NewEncoder(os.Stderr).Encode(diff) + + // Save stats for the next loop. + prev = stats + } +}() +``` + +It's also useful to pipe these stats to a service such as statsd for monitoring +or to provide an HTTP endpoint that will perform a fixed-length sample. + + +### Read-Only Mode + +Sometimes it is useful to create a shared, read-only Bolt database. To this, +set the `Options.ReadOnly` flag when opening your database. Read-only mode +uses a shared lock to allow multiple processes to read from the database but +it will block any processes from opening the database in read-write mode. + +```go +db, err := bolt.Open("my.db", 0666, &bolt.Options{ReadOnly: true}) +if err != nil { + log.Fatal(err) +} +``` + +### Mobile Use (iOS/Android) + +Bolt is able to run on mobile devices by leveraging the binding feature of the +[gomobile](https://github.com/golang/mobile) tool. Create a struct that will +contain your database logic and a reference to a `*bolt.DB` with a initializing +constructor that takes in a filepath where the database file will be stored. +Neither Android nor iOS require extra permissions or cleanup from using this method. + +```go +func NewBoltDB(filepath string) *BoltDB { + db, err := bolt.Open(filepath+"/demo.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + + return &BoltDB{db} +} + +type BoltDB struct { + db *bolt.DB + ... +} + +func (b *BoltDB) Path() string { + return b.db.Path() +} + +func (b *BoltDB) Close() { + b.db.Close() +} +``` + +Database logic should be defined as methods on this wrapper struct. + +To initialize this struct from the native language (both platforms now sync +their local storage to the cloud. These snippets disable that functionality for the +database file): + +#### Android + +```java +String path; +if (android.os.Build.VERSION.SDK_INT >=android.os.Build.VERSION_CODES.LOLLIPOP){ + path = getNoBackupFilesDir().getAbsolutePath(); +} else{ + path = getFilesDir().getAbsolutePath(); +} +Boltmobiledemo.BoltDB boltDB = Boltmobiledemo.NewBoltDB(path) +``` + +#### iOS + +```objc +- (void)demo { + NSString* path = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, + NSUserDomainMask, + YES) objectAtIndex:0]; + GoBoltmobiledemoBoltDB * demo = GoBoltmobiledemoNewBoltDB(path); + [self addSkipBackupAttributeToItemAtPath:demo.path]; + //Some DB Logic would go here + [demo close]; +} + +- (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *) filePathString +{ + NSURL* URL= [NSURL fileURLWithPath: filePathString]; + assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); + + NSError *error = nil; + BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] + forKey: NSURLIsExcludedFromBackupKey error: &error]; + if(!success){ + NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); + } + return success; +} + +``` + +## Resources + +For more information on getting started with Bolt, check out the following articles: + +* [Intro to BoltDB: Painless Performant Persistence](http://npf.io/2014/07/intro-to-boltdb-painless-performant-persistence/) by [Nate Finch](https://github.com/natefinch). +* [Bolt -- an embedded key/value database for Go](https://www.progville.com/go/bolt-embedded-db-golang/) by Progville + + +## Comparison with other databases + +### Postgres, MySQL, & other relational databases + +Relational databases structure data into rows and are only accessible through +the use of SQL. This approach provides flexibility in how you store and query +your data but also incurs overhead in parsing and planning SQL statements. Bolt +accesses all data by a byte slice key. This makes Bolt fast to read and write +data by key but provides no built-in support for joining values together. + +Most relational databases (with the exception of SQLite) are standalone servers +that run separately from your application. This gives your systems +flexibility to connect multiple application servers to a single database +server but also adds overhead in serializing and transporting data over the +network. Bolt runs as a library included in your application so all data access +has to go through your application's process. This brings data closer to your +application but limits multi-process access to the data. + + +### LevelDB, RocksDB + +LevelDB and its derivatives (RocksDB, HyperLevelDB) are similar to Bolt in that +they are libraries bundled into the application, however, their underlying +structure is a log-structured merge-tree (LSM tree). An LSM tree optimizes +random writes by using a write ahead log and multi-tiered, sorted files called +SSTables. Bolt uses a B+tree internally and only a single file. Both approaches +have trade-offs. + +If you require a high random write throughput (>10,000 w/sec) or you need to use +spinning disks then LevelDB could be a good choice. If your application is +read-heavy or does a lot of range scans then Bolt could be a good choice. + +One other important consideration is that LevelDB does not have transactions. +It supports batch writing of key/values pairs and it supports read snapshots +but it will not give you the ability to do a compare-and-swap operation safely. +Bolt supports fully serializable ACID transactions. + + +### LMDB + +Bolt was originally a port of LMDB so it is architecturally similar. Both use +a B+tree, have ACID semantics with fully serializable transactions, and support +lock-free MVCC using a single writer and multiple readers. + +The two projects have somewhat diverged. LMDB heavily focuses on raw performance +while Bolt has focused on simplicity and ease of use. For example, LMDB allows +several unsafe actions such as direct writes for the sake of performance. Bolt +opts to disallow actions which can leave the database in a corrupted state. The +only exception to this in Bolt is `DB.NoSync`. + +There are also a few differences in API. LMDB requires a maximum mmap size when +opening an `mdb_env` whereas Bolt will handle incremental mmap resizing +automatically. LMDB overloads the getter and setter functions with multiple +flags whereas Bolt splits these specialized cases into their own functions. + + +## Caveats & Limitations + +It's important to pick the right tool for the job and Bolt is no exception. +Here are a few things to note when evaluating and using Bolt: + +* Bolt is good for read intensive workloads. Sequential write performance is + also fast but random writes can be slow. You can use `DB.Batch()` or add a + write-ahead log to help mitigate this issue. + +* Bolt uses a B+tree internally so there can be a lot of random page access. + SSDs provide a significant performance boost over spinning disks. + +* Try to avoid long running read transactions. Bolt uses copy-on-write so + old pages cannot be reclaimed while an old transaction is using them. + +* Byte slices returned from Bolt are only valid during a transaction. Once the + transaction has been committed or rolled back then the memory they point to + can be reused by a new page or can be unmapped from virtual memory and you'll + see an `unexpected fault address` panic when accessing it. + +* Bolt uses an exclusive write lock on the database file so it cannot be + shared by multiple processes. + +* Be careful when using `Bucket.FillPercent`. Setting a high fill percent for + buckets that have random inserts will cause your database to have very poor + page utilization. + +* Use larger buckets in general. Smaller buckets causes poor page utilization + once they become larger than the page size (typically 4KB). + +* Bulk loading a lot of random writes into a new bucket can be slow as the + page will not split until the transaction is committed. Randomly inserting + more than 100,000 key/value pairs into a single new bucket in a single + transaction is not advised. + +* Bolt uses a memory-mapped file so the underlying operating system handles the + caching of the data. Typically, the OS will cache as much of the file as it + can in memory and will release memory as needed to other processes. This means + that Bolt can show very high memory usage when working with large databases. + However, this is expected and the OS will release memory as needed. Bolt can + handle databases much larger than the available physical RAM, provided its + memory-map fits in the process virtual address space. It may be problematic + on 32-bits systems. + +* The data structures in the Bolt database are memory mapped so the data file + will be endian specific. This means that you cannot copy a Bolt file from a + little endian machine to a big endian machine and have it work. For most + users this is not a concern since most modern CPUs are little endian. + +* Because of the way pages are laid out on disk, Bolt cannot truncate data files + and return free pages back to the disk. Instead, Bolt maintains a free list + of unused pages within its data file. These free pages can be reused by later + transactions. This works well for many use cases as databases generally tend + to grow. However, it's important to note that deleting large chunks of data + will not allow you to reclaim that space on disk. + + For more information on page allocation, [see this comment][page-allocation]. + +[page-allocation]: https://github.com/boltdb/bolt/issues/308#issuecomment-74811638 + + +## Reading the Source + +Bolt is a relatively small code base (<5KLOC) for an embedded, serializable, +transactional key/value database so it can be a good starting point for people +interested in how databases work. + +The best places to start are the main entry points into Bolt: + +- `Open()` - Initializes the reference to the database. It's responsible for + creating the database if it doesn't exist, obtaining an exclusive lock on the + file, reading the meta pages, & memory-mapping the file. + +- `DB.Begin()` - Starts a read-only or read-write transaction depending on the + value of the `writable` argument. This requires briefly obtaining the "meta" + lock to keep track of open transactions. Only one read-write transaction can + exist at a time so the "rwlock" is acquired during the life of a read-write + transaction. + +- `Bucket.Put()` - Writes a key/value pair into a bucket. After validating the + arguments, a cursor is used to traverse the B+tree to the page and position + where they key & value will be written. Once the position is found, the bucket + materializes the underlying page and the page's parent pages into memory as + "nodes". These nodes are where mutations occur during read-write transactions. + These changes get flushed to disk during commit. + +- `Bucket.Get()` - Retrieves a key/value pair from a bucket. This uses a cursor + to move to the page & position of a key/value pair. During a read-only + transaction, the key and value data is returned as a direct reference to the + underlying mmap file so there's no allocation overhead. For read-write + transactions, this data may reference the mmap file or one of the in-memory + node values. + +- `Cursor` - This object is simply for traversing the B+tree of on-disk pages + or in-memory nodes. It can seek to a specific key, move to the first or last + value, or it can move forward or backward. The cursor handles the movement up + and down the B+tree transparently to the end user. + +- `Tx.Commit()` - Converts the in-memory dirty nodes and the list of free pages + into pages to be written to disk. Writing to disk then occurs in two phases. + First, the dirty pages are written to disk and an `fsync()` occurs. Second, a + new meta page with an incremented transaction ID is written and another + `fsync()` occurs. This two phase write ensures that partially written data + pages are ignored in the event of a crash since the meta page pointing to them + is never written. Partially written meta pages are invalidated because they + are written with a checksum. + +If you have additional notes that could be helpful for others, please submit +them via pull request. + + +## Other Projects Using Bolt + +Below is a list of public, open source projects that use Bolt: + +* [BoltDbWeb](https://github.com/evnix/boltdbweb) - A web based GUI for BoltDB files. +* [Operation Go: A Routine Mission](http://gocode.io) - An online programming game for Golang using Bolt for user accounts and a leaderboard. +* [Bazil](https://bazil.org/) - A file system that lets your data reside where it is most convenient for it to reside. +* [DVID](https://github.com/janelia-flyem/dvid) - Added Bolt as optional storage engine and testing it against Basho-tuned leveldb. +* [Skybox Analytics](https://github.com/skybox/skybox) - A standalone funnel analysis tool for web analytics. +* [Scuttlebutt](https://github.com/benbjohnson/scuttlebutt) - Uses Bolt to store and process all Twitter mentions of GitHub projects. +* [Wiki](https://github.com/peterhellberg/wiki) - A tiny wiki using Goji, BoltDB and Blackfriday. +* [ChainStore](https://github.com/pressly/chainstore) - Simple key-value interface to a variety of storage engines organized as a chain of operations. +* [MetricBase](https://github.com/msiebuhr/MetricBase) - Single-binary version of Graphite. +* [Gitchain](https://github.com/gitchain/gitchain) - Decentralized, peer-to-peer Git repositories aka "Git meets Bitcoin". +* [event-shuttle](https://github.com/sclasen/event-shuttle) - A Unix system service to collect and reliably deliver messages to Kafka. +* [ipxed](https://github.com/kelseyhightower/ipxed) - Web interface and api for ipxed. +* [BoltStore](https://github.com/yosssi/boltstore) - Session store using Bolt. +* [photosite/session](https://godoc.org/bitbucket.org/kardianos/photosite/session) - Sessions for a photo viewing site. +* [LedisDB](https://github.com/siddontang/ledisdb) - A high performance NoSQL, using Bolt as optional storage. +* [ipLocator](https://github.com/AndreasBriese/ipLocator) - A fast ip-geo-location-server using bolt with bloom filters. +* [cayley](https://github.com/google/cayley) - Cayley is an open-source graph database using Bolt as optional backend. +* [bleve](http://www.blevesearch.com/) - A pure Go search engine similar to ElasticSearch that uses Bolt as the default storage backend. +* [tentacool](https://github.com/optiflows/tentacool) - REST api server to manage system stuff (IP, DNS, Gateway...) on a linux server. +* [Seaweed File System](https://github.com/chrislusf/seaweedfs) - Highly scalable distributed key~file system with O(1) disk read. +* [InfluxDB](https://influxdata.com) - Scalable datastore for metrics, events, and real-time analytics. +* [Freehold](http://tshannon.bitbucket.org/freehold/) - An open, secure, and lightweight platform for your files and data. +* [Prometheus Annotation Server](https://github.com/oliver006/prom_annotation_server) - Annotation server for PromDash & Prometheus service monitoring system. +* [Consul](https://github.com/hashicorp/consul) - Consul is service discovery and configuration made easy. Distributed, highly available, and datacenter-aware. +* [Kala](https://github.com/ajvb/kala) - Kala is a modern job scheduler optimized to run on a single node. It is persistent, JSON over HTTP API, ISO 8601 duration notation, and dependent jobs. +* [drive](https://github.com/odeke-em/drive) - drive is an unofficial Google Drive command line client for \*NIX operating systems. +* [stow](https://github.com/djherbis/stow) - a persistence manager for objects + backed by boltdb. +* [buckets](https://github.com/joyrexus/buckets) - a bolt wrapper streamlining + simple tx and key scans. +* [mbuckets](https://github.com/abhigupta912/mbuckets) - A Bolt wrapper that allows easy operations on multi level (nested) buckets. +* [Request Baskets](https://github.com/darklynx/request-baskets) - A web service to collect arbitrary HTTP requests and inspect them via REST API or simple web UI, similar to [RequestBin](http://requestb.in/) service +* [Go Report Card](https://goreportcard.com/) - Go code quality report cards as a (free and open source) service. +* [Boltdb Boilerplate](https://github.com/bobintornado/boltdb-boilerplate) - Boilerplate wrapper around bolt aiming to make simple calls one-liners. +* [lru](https://github.com/crowdriff/lru) - Easy to use Bolt-backed Least-Recently-Used (LRU) read-through cache with chainable remote stores. +* [Storm](https://github.com/asdine/storm) - Simple and powerful ORM for BoltDB. +* [GoWebApp](https://github.com/josephspurrier/gowebapp) - A basic MVC web application in Go using BoltDB. +* [SimpleBolt](https://github.com/xyproto/simplebolt) - A simple way to use BoltDB. Deals mainly with strings. +* [Algernon](https://github.com/xyproto/algernon) - A HTTP/2 web server with built-in support for Lua. Uses BoltDB as the default database backend. +* [MuLiFS](https://github.com/dankomiocevic/mulifs) - Music Library Filesystem creates a filesystem to organise your music files. +* [GoShort](https://github.com/pankajkhairnar/goShort) - GoShort is a URL shortener written in Golang and BoltDB for persistent key/value storage and for routing it's using high performent HTTPRouter. +* [torrent](https://github.com/anacrolix/torrent) - Full-featured BitTorrent client package and utilities in Go. BoltDB is a storage backend in development. +* [gopherpit](https://github.com/gopherpit/gopherpit) - A web service to manage Go remote import paths with custom domains +* [bolter](https://github.com/hasit/bolter) - Command-line app for viewing BoltDB file in your terminal. +* [boltcli](https://github.com/spacewander/boltcli) - the redis-cli for boltdb with Lua script support. +* [btcwallet](https://github.com/btcsuite/btcwallet) - A bitcoin wallet. +* [dcrwallet](https://github.com/decred/dcrwallet) - A wallet for the Decred cryptocurrency. +* [Ironsmith](https://github.com/timshannon/ironsmith) - A simple, script-driven continuous integration (build - > test -> release) tool, with no external dependencies +* [BoltHold](https://github.com/timshannon/bolthold) - An embeddable NoSQL store for Go types built on BoltDB + +If you are using Bolt in a project please send a pull request to add it to the list. diff --git a/deps/github.com/coreos/bbolt/appveyor.yml b/deps/github.com/coreos/bbolt/appveyor.yml new file mode 100644 index 000000000..6e26e941d --- /dev/null +++ b/deps/github.com/coreos/bbolt/appveyor.yml @@ -0,0 +1,18 @@ +version: "{build}" + +os: Windows Server 2012 R2 + +clone_folder: c:\gopath\src\github.com\boltdb\bolt + +environment: + GOPATH: c:\gopath + +install: + - echo %PATH% + - echo %GOPATH% + - go version + - go env + - go get -v -t ./... + +build_script: + - go test -v ./... diff --git a/deps/github.com/coreos/bbolt/bolt_386.go b/deps/github.com/coreos/bbolt/bolt_386.go new file mode 100644 index 000000000..820d533c1 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_386.go @@ -0,0 +1,10 @@ +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x7FFFFFFF // 2GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_amd64.go b/deps/github.com/coreos/bbolt/bolt_amd64.go new file mode 100644 index 000000000..98fafdb47 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_amd64.go @@ -0,0 +1,10 @@ +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_arm.go b/deps/github.com/coreos/bbolt/bolt_arm.go new file mode 100644 index 000000000..7e5cb4b94 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_arm.go @@ -0,0 +1,28 @@ +package bolt + +import "unsafe" + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x7FFFFFFF // 2GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned bool + +func init() { + // Simple check to see whether this arch handles unaligned load/stores + // correctly. + + // ARM9 and older devices require load/stores to be from/to aligned + // addresses. If not, the lower 2 bits are cleared and that address is + // read in a jumbled up order. + + // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html + + raw := [6]byte{0xfe, 0xef, 0x11, 0x22, 0x22, 0x11} + val := *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&raw)) + 2)) + + brokenUnaligned = val != 0x11222211 +} diff --git a/deps/github.com/coreos/bbolt/bolt_arm64.go b/deps/github.com/coreos/bbolt/bolt_arm64.go new file mode 100644 index 000000000..b26d84f91 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_arm64.go @@ -0,0 +1,12 @@ +// +build arm64 + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_linux.go b/deps/github.com/coreos/bbolt/bolt_linux.go new file mode 100644 index 000000000..2b6766614 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_linux.go @@ -0,0 +1,10 @@ +package bolt + +import ( + "syscall" +) + +// fdatasync flushes written data to a file descriptor. +func fdatasync(db *DB) error { + return syscall.Fdatasync(int(db.file.Fd())) +} diff --git a/deps/github.com/coreos/bbolt/bolt_mips64x.go b/deps/github.com/coreos/bbolt/bolt_mips64x.go new file mode 100644 index 000000000..134b578bd --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_mips64x.go @@ -0,0 +1,12 @@ +// +build mips64 mips64le + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x8000000000 // 512GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_mipsx.go b/deps/github.com/coreos/bbolt/bolt_mipsx.go new file mode 100644 index 000000000..d5ecb0597 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_mipsx.go @@ -0,0 +1,12 @@ +// +build mips mipsle + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x40000000 // 1GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_openbsd.go b/deps/github.com/coreos/bbolt/bolt_openbsd.go new file mode 100644 index 000000000..7058c3d73 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_openbsd.go @@ -0,0 +1,27 @@ +package bolt + +import ( + "syscall" + "unsafe" +) + +const ( + msAsync = 1 << iota // perform asynchronous writes + msSync // perform synchronous writes + msInvalidate // invalidate cached data +) + +func msync(db *DB) error { + _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate) + if errno != 0 { + return errno + } + return nil +} + +func fdatasync(db *DB) error { + if db.data != nil { + return msync(db) + } + return db.file.Sync() +} diff --git a/deps/github.com/coreos/bbolt/bolt_ppc.go b/deps/github.com/coreos/bbolt/bolt_ppc.go new file mode 100644 index 000000000..645ddc3ed --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_ppc.go @@ -0,0 +1,9 @@ +// +build ppc + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x7FFFFFFF // 2GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF diff --git a/deps/github.com/coreos/bbolt/bolt_ppc64.go b/deps/github.com/coreos/bbolt/bolt_ppc64.go new file mode 100644 index 000000000..9331d9771 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_ppc64.go @@ -0,0 +1,12 @@ +// +build ppc64 + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_ppc64le.go b/deps/github.com/coreos/bbolt/bolt_ppc64le.go new file mode 100644 index 000000000..8c143bc5d --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_ppc64le.go @@ -0,0 +1,12 @@ +// +build ppc64le + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_s390x.go b/deps/github.com/coreos/bbolt/bolt_s390x.go new file mode 100644 index 000000000..d7c39af92 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_s390x.go @@ -0,0 +1,12 @@ +// +build s390x + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF + +// Are unaligned load/stores broken on this arch? +var brokenUnaligned = false diff --git a/deps/github.com/coreos/bbolt/bolt_unix.go b/deps/github.com/coreos/bbolt/bolt_unix.go new file mode 100644 index 000000000..06592a080 --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_unix.go @@ -0,0 +1,92 @@ +// +build !windows,!plan9,!solaris + +package bolt + +import ( + "fmt" + "os" + "syscall" + "time" + "unsafe" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error { + var t time.Time + if timeout != 0 { + t = time.Now() + } + fd := db.file.Fd() + flag := syscall.LOCK_NB + if exclusive { + flag |= syscall.LOCK_EX + } else { + flag |= syscall.LOCK_SH + } + for { + // Attempt to obtain an exclusive lock. + err := syscall.Flock(int(fd), flag) + if err == nil { + return nil + } else if err != syscall.EWOULDBLOCK { + return err + } + + // If we timed out then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + return syscall.Flock(int(db.file.Fd()), syscall.LOCK_UN) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := syscall.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + if err := madvise(b, syscall.MADV_RANDOM); err != nil { + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := syscall.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} + +// NOTE: This function is copied from stdlib because it is not available on darwin. +func madvise(b []byte, advice int) (err error) { + _, _, e1 := syscall.Syscall(syscall.SYS_MADVISE, uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = e1 + } + return +} diff --git a/deps/github.com/coreos/bbolt/bolt_unix_solaris.go b/deps/github.com/coreos/bbolt/bolt_unix_solaris.go new file mode 100644 index 000000000..fd8335ecc --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_unix_solaris.go @@ -0,0 +1,89 @@ +package bolt + +import ( + "fmt" + "os" + "syscall" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error { + var t time.Time + if timeout != 0 { + t = time.Now() + } + fd := db.file.Fd() + var lockType int16 + if exclusive { + lockType = syscall.F_WRLCK + } else { + lockType = syscall.F_RDLCK + } + for { + // Attempt to obtain an exclusive lock. + lock := syscall.Flock_t{Type: lockType} + err := syscall.FcntlFlock(fd, syscall.F_SETLK, &lock) + if err == nil { + return nil + } else if err != syscall.EAGAIN { + return err + } + + // If we timed out then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Type = syscall.F_UNLCK + lock.Whence = 0 + return syscall.FcntlFlock(uintptr(db.file.Fd()), syscall.F_SETLK, &lock) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + if err := unix.Madvise(b, syscall.MADV_RANDOM); err != nil { + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := unix.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} diff --git a/deps/github.com/coreos/bbolt/bolt_windows.go b/deps/github.com/coreos/bbolt/bolt_windows.go new file mode 100644 index 000000000..ca6f9a11c --- /dev/null +++ b/deps/github.com/coreos/bbolt/bolt_windows.go @@ -0,0 +1,145 @@ +package bolt + +import ( + "fmt" + "os" + "syscall" + "time" + "unsafe" +) + +// LockFileEx code derived from golang build filemutex_windows.go @ v1.5.1 +var ( + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + procLockFileEx = modkernel32.NewProc("LockFileEx") + procUnlockFileEx = modkernel32.NewProc("UnlockFileEx") +) + +const ( + lockExt = ".lock" + + // see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx + flagLockExclusive = 2 + flagLockFailImmediately = 1 + + // see https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx + errLockViolation syscall.Errno = 0x21 +) + +func lockFileEx(h syscall.Handle, flags, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procLockFileEx.Call(uintptr(h), uintptr(flags), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol))) + if r == 0 { + return err + } + return nil +} + +func unlockFileEx(h syscall.Handle, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procUnlockFileEx.Call(uintptr(h), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)), 0) + if r == 0 { + return err + } + return nil +} + +// fdatasync flushes written data to a file descriptor. +func fdatasync(db *DB) error { + return db.file.Sync() +} + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error { + // Create a separate lock file on windows because a process + // cannot share an exclusive lock on the same file. This is + // needed during Tx.WriteTo(). + f, err := os.OpenFile(db.path+lockExt, os.O_CREATE, mode) + if err != nil { + return err + } + db.lockfile = f + + var t time.Time + if timeout != 0 { + t = time.Now() + } + fd := f.Fd() + var flag uint32 = flagLockFailImmediately + if exclusive { + flag |= flagLockExclusive + } + for { + // Attempt to obtain an exclusive lock. + err := lockFileEx(syscall.Handle(fd), flag, 0, 1, 0, &syscall.Overlapped{}) + if err == nil { + return nil + } else if err != errLockViolation { + return err + } + + // If we timed oumercit then return an error. + if timeout != 0 && time.Since(t) > timeout-flockRetryTimeout { + return ErrTimeout + } + + // Wait for a bit and try again. + time.Sleep(flockRetryTimeout) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + err := unlockFileEx(syscall.Handle(db.lockfile.Fd()), 0, 1, 0, &syscall.Overlapped{}) + db.lockfile.Close() + os.Remove(db.path + lockExt) + return err +} + +// mmap memory maps a DB's data file. +// Based on: https://github.com/edsrzf/mmap-go +func mmap(db *DB, sz int) error { + if !db.readOnly { + // Truncate the database to the size of the mmap. + if err := db.file.Truncate(int64(sz)); err != nil { + return fmt.Errorf("truncate: %s", err) + } + } + + // Open a file mapping handle. + sizelo := uint32(sz >> 32) + sizehi := uint32(sz) & 0xffffffff + h, errno := syscall.CreateFileMapping(syscall.Handle(db.file.Fd()), nil, syscall.PAGE_READONLY, sizelo, sizehi, nil) + if h == 0 { + return os.NewSyscallError("CreateFileMapping", errno) + } + + // Create the memory map. + addr, errno := syscall.MapViewOfFile(h, syscall.FILE_MAP_READ, 0, 0, uintptr(sz)) + if addr == 0 { + return os.NewSyscallError("MapViewOfFile", errno) + } + + // Close mapping handle. + if err := syscall.CloseHandle(syscall.Handle(h)); err != nil { + return os.NewSyscallError("CloseHandle", err) + } + + // Convert to a byte array. + db.data = ((*[maxMapSize]byte)(unsafe.Pointer(addr))) + db.datasz = sz + + return nil +} + +// munmap unmaps a pointer from a file. +// Based on: https://github.com/edsrzf/mmap-go +func munmap(db *DB) error { + if db.data == nil { + return nil + } + + addr := (uintptr)(unsafe.Pointer(&db.data[0])) + if err := syscall.UnmapViewOfFile(addr); err != nil { + return os.NewSyscallError("UnmapViewOfFile", err) + } + return nil +} diff --git a/deps/github.com/coreos/bbolt/boltsync_unix.go b/deps/github.com/coreos/bbolt/boltsync_unix.go new file mode 100644 index 000000000..f50442523 --- /dev/null +++ b/deps/github.com/coreos/bbolt/boltsync_unix.go @@ -0,0 +1,8 @@ +// +build !windows,!plan9,!linux,!openbsd + +package bolt + +// fdatasync flushes written data to a file descriptor. +func fdatasync(db *DB) error { + return db.file.Sync() +} diff --git a/deps/github.com/coreos/bbolt/bucket.go b/deps/github.com/coreos/bbolt/bucket.go new file mode 100644 index 000000000..44db88b8a --- /dev/null +++ b/deps/github.com/coreos/bbolt/bucket.go @@ -0,0 +1,775 @@ +package bolt + +import ( + "bytes" + "fmt" + "unsafe" +) + +const ( + // MaxKeySize is the maximum length of a key, in bytes. + MaxKeySize = 32768 + + // MaxValueSize is the maximum length of a value, in bytes. + MaxValueSize = (1 << 31) - 2 +) + +const bucketHeaderSize = int(unsafe.Sizeof(bucket{})) + +const ( + minFillPercent = 0.1 + maxFillPercent = 1.0 +) + +// DefaultFillPercent is the percentage that split pages are filled. +// This value can be changed by setting Bucket.FillPercent. +const DefaultFillPercent = 0.5 + +// Bucket represents a collection of key/value pairs inside the database. +type Bucket struct { + *bucket + tx *Tx // the associated transaction + buckets map[string]*Bucket // subbucket cache + page *page // inline page reference + rootNode *node // materialized node for the root page. + nodes map[pgid]*node // node cache + + // Sets the threshold for filling nodes when they split. By default, + // the bucket will fill to 50% but it can be useful to increase this + // amount if you know that your write workloads are mostly append-only. + // + // This is non-persisted across transactions so it must be set in every Tx. + FillPercent float64 +} + +// bucket represents the on-file representation of a bucket. +// This is stored as the "value" of a bucket key. If the bucket is small enough, +// then its root page can be stored inline in the "value", after the bucket +// header. In the case of inline buckets, the "root" will be 0. +type bucket struct { + root pgid // page id of the bucket's root-level page + sequence uint64 // monotonically incrementing, used by NextSequence() +} + +// newBucket returns a new bucket associated with a transaction. +func newBucket(tx *Tx) Bucket { + var b = Bucket{tx: tx, FillPercent: DefaultFillPercent} + if tx.writable { + b.buckets = make(map[string]*Bucket) + b.nodes = make(map[pgid]*node) + } + return b +} + +// Tx returns the tx of the bucket. +func (b *Bucket) Tx() *Tx { + return b.tx +} + +// Root returns the root of the bucket. +func (b *Bucket) Root() pgid { + return b.root +} + +// Writable returns whether the bucket is writable. +func (b *Bucket) Writable() bool { + return b.tx.writable +} + +// Cursor creates a cursor associated with the bucket. +// The cursor is only valid as long as the transaction is open. +// Do not use a cursor after the transaction is closed. +func (b *Bucket) Cursor() *Cursor { + // Update transaction statistics. + b.tx.stats.CursorCount++ + + // Allocate and return a cursor. + return &Cursor{ + bucket: b, + stack: make([]elemRef, 0), + } +} + +// Bucket retrieves a nested bucket by name. +// Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. +func (b *Bucket) Bucket(name []byte) *Bucket { + if b.buckets != nil { + if child := b.buckets[string(name)]; child != nil { + return child + } + } + + // Move cursor to key. + c := b.Cursor() + k, v, flags := c.seek(name) + + // Return nil if the key doesn't exist or it is not a bucket. + if !bytes.Equal(name, k) || (flags&bucketLeafFlag) == 0 { + return nil + } + + // Otherwise create a bucket and cache it. + var child = b.openBucket(v) + if b.buckets != nil { + b.buckets[string(name)] = child + } + + return child +} + +// Helper method that re-interprets a sub-bucket value +// from a parent into a Bucket +func (b *Bucket) openBucket(value []byte) *Bucket { + var child = newBucket(b.tx) + + // If unaligned load/stores are broken on this arch and value is + // unaligned simply clone to an aligned byte array. + unaligned := brokenUnaligned && uintptr(unsafe.Pointer(&value[0]))&3 != 0 + + if unaligned { + value = cloneBytes(value) + } + + // If this is a writable transaction then we need to copy the bucket entry. + // Read-only transactions can point directly at the mmap entry. + if b.tx.writable && !unaligned { + child.bucket = &bucket{} + *child.bucket = *(*bucket)(unsafe.Pointer(&value[0])) + } else { + child.bucket = (*bucket)(unsafe.Pointer(&value[0])) + } + + // Save a reference to the inline page if the bucket is inline. + if child.root == 0 { + child.page = (*page)(unsafe.Pointer(&value[bucketHeaderSize])) + } + + return &child +} + +// CreateBucket creates a new bucket at the given key and returns the new bucket. +// Returns an error if the key already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { + if b.tx.db == nil { + return nil, ErrTxClosed + } else if !b.tx.writable { + return nil, ErrTxNotWritable + } else if len(key) == 0 { + return nil, ErrBucketNameRequired + } + + // Move cursor to correct position. + c := b.Cursor() + k, _, flags := c.seek(key) + + // Return an error if there is an existing key. + if bytes.Equal(key, k) { + if (flags & bucketLeafFlag) != 0 { + return nil, ErrBucketExists + } + return nil, ErrIncompatibleValue + } + + // Create empty, inline bucket. + var bucket = Bucket{ + bucket: &bucket{}, + rootNode: &node{isLeaf: true}, + FillPercent: DefaultFillPercent, + } + var value = bucket.write() + + // Insert into node. + key = cloneBytes(key) + c.node().put(key, key, value, 0, bucketLeafFlag) + + // Since subbuckets are not allowed on inline buckets, we need to + // dereference the inline page, if it exists. This will cause the bucket + // to be treated as a regular, non-inline bucket for the rest of the tx. + b.page = nil + + return b.Bucket(key), nil +} + +// CreateBucketIfNotExists creates a new bucket if it doesn't already exist and returns a reference to it. +// Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) { + child, err := b.CreateBucket(key) + if err == ErrBucketExists { + return b.Bucket(key), nil + } else if err != nil { + return nil, err + } + return child, nil +} + +// DeleteBucket deletes a bucket at the given key. +// Returns an error if the bucket does not exists, or if the key represents a non-bucket value. +func (b *Bucket) DeleteBucket(key []byte) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } + + // Move cursor to correct position. + c := b.Cursor() + k, _, flags := c.seek(key) + + // Return an error if bucket doesn't exist or is not a bucket. + if !bytes.Equal(key, k) { + return ErrBucketNotFound + } else if (flags & bucketLeafFlag) == 0 { + return ErrIncompatibleValue + } + + // Recursively delete all child buckets. + child := b.Bucket(key) + err := child.ForEach(func(k, v []byte) error { + if v == nil { + if err := child.DeleteBucket(k); err != nil { + return fmt.Errorf("delete bucket: %s", err) + } + } + return nil + }) + if err != nil { + return err + } + + // Remove cached copy. + delete(b.buckets, string(key)) + + // Release all bucket pages to freelist. + child.nodes = nil + child.rootNode = nil + child.free() + + // Delete the node if we have a matching key. + c.node().del(key) + + return nil +} + +// Get retrieves the value for a key in the bucket. +// Returns a nil value if the key does not exist or if the key is a nested bucket. +// The returned value is only valid for the life of the transaction. +func (b *Bucket) Get(key []byte) []byte { + k, v, flags := b.Cursor().seek(key) + + // Return nil if this is a bucket. + if (flags & bucketLeafFlag) != 0 { + return nil + } + + // If our target node isn't the same key as what's passed in then return nil. + if !bytes.Equal(key, k) { + return nil + } + return v +} + +// Put sets the value for a key in the bucket. +// If the key exist then its previous value will be overwritten. +// Supplied value must remain valid for the life of the transaction. +// Returns an error if the bucket was created from a read-only transaction, if the key is blank, if the key is too large, or if the value is too large. +func (b *Bucket) Put(key []byte, value []byte) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } else if len(key) == 0 { + return ErrKeyRequired + } else if len(key) > MaxKeySize { + return ErrKeyTooLarge + } else if int64(len(value)) > MaxValueSize { + return ErrValueTooLarge + } + + // Move cursor to correct position. + c := b.Cursor() + k, _, flags := c.seek(key) + + // Return an error if there is an existing key with a bucket value. + if bytes.Equal(key, k) && (flags&bucketLeafFlag) != 0 { + return ErrIncompatibleValue + } + + // Insert into node. + key = cloneBytes(key) + c.node().put(key, key, value, 0, 0) + + return nil +} + +// Delete removes a key from the bucket. +// If the key does not exist then nothing is done and a nil error is returned. +// Returns an error if the bucket was created from a read-only transaction. +func (b *Bucket) Delete(key []byte) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } + + // Move cursor to correct position. + c := b.Cursor() + k, _, flags := c.seek(key) + + // Return nil if the key doesn't exist. + if !bytes.Equal(key, k) { + return nil + } + + // Return an error if there is already existing bucket value. + if (flags & bucketLeafFlag) != 0 { + return ErrIncompatibleValue + } + + // Delete the node if we have a matching key. + c.node().del(key) + + return nil +} + +// Sequence returns the current integer for the bucket without incrementing it. +func (b *Bucket) Sequence() uint64 { return b.bucket.sequence } + +// SetSequence updates the sequence number for the bucket. +func (b *Bucket) SetSequence(v uint64) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } + + // Materialize the root node if it hasn't been already so that the + // bucket will be saved during commit. + if b.rootNode == nil { + _ = b.node(b.root, nil) + } + + // Increment and return the sequence. + b.bucket.sequence = v + return nil +} + +// NextSequence returns an autoincrementing integer for the bucket. +func (b *Bucket) NextSequence() (uint64, error) { + if b.tx.db == nil { + return 0, ErrTxClosed + } else if !b.Writable() { + return 0, ErrTxNotWritable + } + + // Materialize the root node if it hasn't been already so that the + // bucket will be saved during commit. + if b.rootNode == nil { + _ = b.node(b.root, nil) + } + + // Increment and return the sequence. + b.bucket.sequence++ + return b.bucket.sequence, nil +} + +// ForEach executes a function for each key/value pair in a bucket. +// If the provided function returns an error then the iteration is stopped and +// the error is returned to the caller. The provided function must not modify +// the bucket; this will result in undefined behavior. +func (b *Bucket) ForEach(fn func(k, v []byte) error) error { + if b.tx.db == nil { + return ErrTxClosed + } + c := b.Cursor() + for k, v := c.First(); k != nil; k, v = c.Next() { + if err := fn(k, v); err != nil { + return err + } + } + return nil +} + +// Stat returns stats on a bucket. +func (b *Bucket) Stats() BucketStats { + var s, subStats BucketStats + pageSize := b.tx.db.pageSize + s.BucketN += 1 + if b.root == 0 { + s.InlineBucketN += 1 + } + b.forEachPage(func(p *page, depth int) { + if (p.flags & leafPageFlag) != 0 { + s.KeyN += int(p.count) + + // used totals the used bytes for the page + used := pageHeaderSize + + if p.count != 0 { + // If page has any elements, add all element headers. + used += leafPageElementSize * int(p.count-1) + + // Add all element key, value sizes. + // The computation takes advantage of the fact that the position + // of the last element's key/value equals to the total of the sizes + // of all previous elements' keys and values. + // It also includes the last element's header. + lastElement := p.leafPageElement(p.count - 1) + used += int(lastElement.pos + lastElement.ksize + lastElement.vsize) + } + + if b.root == 0 { + // For inlined bucket just update the inline stats + s.InlineBucketInuse += used + } else { + // For non-inlined bucket update all the leaf stats + s.LeafPageN++ + s.LeafInuse += used + s.LeafOverflowN += int(p.overflow) + + // Collect stats from sub-buckets. + // Do that by iterating over all element headers + // looking for the ones with the bucketLeafFlag. + for i := uint16(0); i < p.count; i++ { + e := p.leafPageElement(i) + if (e.flags & bucketLeafFlag) != 0 { + // For any bucket element, open the element value + // and recursively call Stats on the contained bucket. + subStats.Add(b.openBucket(e.value()).Stats()) + } + } + } + } else if (p.flags & branchPageFlag) != 0 { + s.BranchPageN++ + lastElement := p.branchPageElement(p.count - 1) + + // used totals the used bytes for the page + // Add header and all element headers. + used := pageHeaderSize + (branchPageElementSize * int(p.count-1)) + + // Add size of all keys and values. + // Again, use the fact that last element's position equals to + // the total of key, value sizes of all previous elements. + used += int(lastElement.pos + lastElement.ksize) + s.BranchInuse += used + s.BranchOverflowN += int(p.overflow) + } + + // Keep track of maximum page depth. + if depth+1 > s.Depth { + s.Depth = (depth + 1) + } + }) + + // Alloc stats can be computed from page counts and pageSize. + s.BranchAlloc = (s.BranchPageN + s.BranchOverflowN) * pageSize + s.LeafAlloc = (s.LeafPageN + s.LeafOverflowN) * pageSize + + // Add the max depth of sub-buckets to get total nested depth. + s.Depth += subStats.Depth + // Add the stats for all sub-buckets + s.Add(subStats) + return s +} + +// forEachPage iterates over every page in a bucket, including inline pages. +func (b *Bucket) forEachPage(fn func(*page, int)) { + // If we have an inline page then just use that. + if b.page != nil { + fn(b.page, 0) + return + } + + // Otherwise traverse the page hierarchy. + b.tx.forEachPage(b.root, 0, fn) +} + +// forEachPageNode iterates over every page (or node) in a bucket. +// This also includes inline pages. +func (b *Bucket) forEachPageNode(fn func(*page, *node, int)) { + // If we have an inline page or root node then just use that. + if b.page != nil { + fn(b.page, nil, 0) + return + } + b._forEachPageNode(b.root, 0, fn) +} + +func (b *Bucket) _forEachPageNode(pgid pgid, depth int, fn func(*page, *node, int)) { + var p, n = b.pageNode(pgid) + + // Execute function. + fn(p, n, depth) + + // Recursively loop over children. + if p != nil { + if (p.flags & branchPageFlag) != 0 { + for i := 0; i < int(p.count); i++ { + elem := p.branchPageElement(uint16(i)) + b._forEachPageNode(elem.pgid, depth+1, fn) + } + } + } else { + if !n.isLeaf { + for _, inode := range n.inodes { + b._forEachPageNode(inode.pgid, depth+1, fn) + } + } + } +} + +// spill writes all the nodes for this bucket to dirty pages. +func (b *Bucket) spill() error { + // Spill all child buckets first. + for name, child := range b.buckets { + // If the child bucket is small enough and it has no child buckets then + // write it inline into the parent bucket's page. Otherwise spill it + // like a normal bucket and make the parent value a pointer to the page. + var value []byte + if child.inlineable() { + child.free() + value = child.write() + } else { + if err := child.spill(); err != nil { + return err + } + + // Update the child bucket header in this bucket. + value = make([]byte, unsafe.Sizeof(bucket{})) + var bucket = (*bucket)(unsafe.Pointer(&value[0])) + *bucket = *child.bucket + } + + // Skip writing the bucket if there are no materialized nodes. + if child.rootNode == nil { + continue + } + + // Update parent node. + var c = b.Cursor() + k, _, flags := c.seek([]byte(name)) + if !bytes.Equal([]byte(name), k) { + panic(fmt.Sprintf("misplaced bucket header: %x -> %x", []byte(name), k)) + } + if flags&bucketLeafFlag == 0 { + panic(fmt.Sprintf("unexpected bucket header flag: %x", flags)) + } + c.node().put([]byte(name), []byte(name), value, 0, bucketLeafFlag) + } + + // Ignore if there's not a materialized root node. + if b.rootNode == nil { + return nil + } + + // Spill nodes. + if err := b.rootNode.spill(); err != nil { + return err + } + b.rootNode = b.rootNode.root() + + // Update the root node for this bucket. + if b.rootNode.pgid >= b.tx.meta.pgid { + panic(fmt.Sprintf("pgid (%d) above high water mark (%d)", b.rootNode.pgid, b.tx.meta.pgid)) + } + b.root = b.rootNode.pgid + + return nil +} + +// inlineable returns true if a bucket is small enough to be written inline +// and if it contains no subbuckets. Otherwise returns false. +func (b *Bucket) inlineable() bool { + var n = b.rootNode + + // Bucket must only contain a single leaf node. + if n == nil || !n.isLeaf { + return false + } + + // Bucket is not inlineable if it contains subbuckets or if it goes beyond + // our threshold for inline bucket size. + var size = pageHeaderSize + for _, inode := range n.inodes { + size += leafPageElementSize + len(inode.key) + len(inode.value) + + if inode.flags&bucketLeafFlag != 0 { + return false + } else if size > b.maxInlineBucketSize() { + return false + } + } + + return true +} + +// Returns the maximum total size of a bucket to make it a candidate for inlining. +func (b *Bucket) maxInlineBucketSize() int { + return b.tx.db.pageSize / 4 +} + +// write allocates and writes a bucket to a byte slice. +func (b *Bucket) write() []byte { + // Allocate the appropriate size. + var n = b.rootNode + var value = make([]byte, bucketHeaderSize+n.size()) + + // Write a bucket header. + var bucket = (*bucket)(unsafe.Pointer(&value[0])) + *bucket = *b.bucket + + // Convert byte slice to a fake page and write the root node. + var p = (*page)(unsafe.Pointer(&value[bucketHeaderSize])) + n.write(p) + + return value +} + +// rebalance attempts to balance all nodes. +func (b *Bucket) rebalance() { + for _, n := range b.nodes { + n.rebalance() + } + for _, child := range b.buckets { + child.rebalance() + } +} + +// node creates a node from a page and associates it with a given parent. +func (b *Bucket) node(pgid pgid, parent *node) *node { + _assert(b.nodes != nil, "nodes map expected") + + // Retrieve node if it's already been created. + if n := b.nodes[pgid]; n != nil { + return n + } + + // Otherwise create a node and cache it. + n := &node{bucket: b, parent: parent} + if parent == nil { + b.rootNode = n + } else { + parent.children = append(parent.children, n) + } + + // Use the inline page if this is an inline bucket. + var p = b.page + if p == nil { + p = b.tx.page(pgid) + } + + // Read the page into the node and cache it. + n.read(p) + b.nodes[pgid] = n + + // Update statistics. + b.tx.stats.NodeCount++ + + return n +} + +// free recursively frees all pages in the bucket. +func (b *Bucket) free() { + if b.root == 0 { + return + } + + var tx = b.tx + b.forEachPageNode(func(p *page, n *node, _ int) { + if p != nil { + tx.db.freelist.free(tx.meta.txid, p) + } else { + n.free() + } + }) + b.root = 0 +} + +// dereference removes all references to the old mmap. +func (b *Bucket) dereference() { + if b.rootNode != nil { + b.rootNode.root().dereference() + } + + for _, child := range b.buckets { + child.dereference() + } +} + +// pageNode returns the in-memory node, if it exists. +// Otherwise returns the underlying page. +func (b *Bucket) pageNode(id pgid) (*page, *node) { + // Inline buckets have a fake page embedded in their value so treat them + // differently. We'll return the rootNode (if available) or the fake page. + if b.root == 0 { + if id != 0 { + panic(fmt.Sprintf("inline bucket non-zero page access(2): %d != 0", id)) + } + if b.rootNode != nil { + return nil, b.rootNode + } + return b.page, nil + } + + // Check the node cache for non-inline buckets. + if b.nodes != nil { + if n := b.nodes[id]; n != nil { + return nil, n + } + } + + // Finally lookup the page from the transaction if no node is materialized. + return b.tx.page(id), nil +} + +// BucketStats records statistics about resources used by a bucket. +type BucketStats struct { + // Page count statistics. + BranchPageN int // number of logical branch pages + BranchOverflowN int // number of physical branch overflow pages + LeafPageN int // number of logical leaf pages + LeafOverflowN int // number of physical leaf overflow pages + + // Tree statistics. + KeyN int // number of keys/value pairs + Depth int // number of levels in B+tree + + // Page size utilization. + BranchAlloc int // bytes allocated for physical branch pages + BranchInuse int // bytes actually used for branch data + LeafAlloc int // bytes allocated for physical leaf pages + LeafInuse int // bytes actually used for leaf data + + // Bucket statistics + BucketN int // total number of buckets including the top bucket + InlineBucketN int // total number on inlined buckets + InlineBucketInuse int // bytes used for inlined buckets (also accounted for in LeafInuse) +} + +func (s *BucketStats) Add(other BucketStats) { + s.BranchPageN += other.BranchPageN + s.BranchOverflowN += other.BranchOverflowN + s.LeafPageN += other.LeafPageN + s.LeafOverflowN += other.LeafOverflowN + s.KeyN += other.KeyN + if s.Depth < other.Depth { + s.Depth = other.Depth + } + s.BranchAlloc += other.BranchAlloc + s.BranchInuse += other.BranchInuse + s.LeafAlloc += other.LeafAlloc + s.LeafInuse += other.LeafInuse + + s.BucketN += other.BucketN + s.InlineBucketN += other.InlineBucketN + s.InlineBucketInuse += other.InlineBucketInuse +} + +// cloneBytes returns a copy of a given slice. +func cloneBytes(v []byte) []byte { + var clone = make([]byte, len(v)) + copy(clone, v) + return clone +} diff --git a/deps/github.com/coreos/bbolt/cursor.go b/deps/github.com/coreos/bbolt/cursor.go new file mode 100644 index 000000000..1be9f35e3 --- /dev/null +++ b/deps/github.com/coreos/bbolt/cursor.go @@ -0,0 +1,400 @@ +package bolt + +import ( + "bytes" + "fmt" + "sort" +) + +// Cursor represents an iterator that can traverse over all key/value pairs in a bucket in sorted order. +// Cursors see nested buckets with value == nil. +// Cursors can be obtained from a transaction and are valid as long as the transaction is open. +// +// Keys and values returned from the cursor are only valid for the life of the transaction. +// +// Changing data while traversing with a cursor may cause it to be invalidated +// and return unexpected keys and/or values. You must reposition your cursor +// after mutating data. +type Cursor struct { + bucket *Bucket + stack []elemRef +} + +// Bucket returns the bucket that this cursor was created from. +func (c *Cursor) Bucket() *Bucket { + return c.bucket +} + +// First moves the cursor to the first item in the bucket and returns its key and value. +// If the bucket is empty then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) First() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + c.stack = c.stack[:0] + p, n := c.bucket.pageNode(c.bucket.root) + c.stack = append(c.stack, elemRef{page: p, node: n, index: 0}) + c.first() + + // If we land on an empty page then move to the next value. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + c.next() + } + + k, v, flags := c.keyValue() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v + +} + +// Last moves the cursor to the last item in the bucket and returns its key and value. +// If the bucket is empty then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Last() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + c.stack = c.stack[:0] + p, n := c.bucket.pageNode(c.bucket.root) + ref := elemRef{page: p, node: n} + ref.index = ref.count() - 1 + c.stack = append(c.stack, ref) + c.last() + k, v, flags := c.keyValue() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Next moves the cursor to the next item in the bucket and returns its key and value. +// If the cursor is at the end of the bucket then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Next() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + k, v, flags := c.next() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Prev moves the cursor to the previous item in the bucket and returns its key and value. +// If the cursor is at the beginning of the bucket then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Prev() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + + // Attempt to move back one element until we're successful. + // Move up the stack as we hit the beginning of each page in our stack. + for i := len(c.stack) - 1; i >= 0; i-- { + elem := &c.stack[i] + if elem.index > 0 { + elem.index-- + break + } + c.stack = c.stack[:i] + } + + // If we've hit the end then return nil. + if len(c.stack) == 0 { + return nil, nil + } + + // Move down the stack to find the last element of the last leaf under this branch. + c.last() + k, v, flags := c.keyValue() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Seek moves the cursor to a given key and returns it. +// If the key does not exist then the next key is used. If no keys +// follow, a nil key is returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Seek(seek []byte) (key []byte, value []byte) { + k, v, flags := c.seek(seek) + + // If we ended up after the last element of a page then move to the next one. + if ref := &c.stack[len(c.stack)-1]; ref.index >= ref.count() { + k, v, flags = c.next() + } + + if k == nil { + return nil, nil + } else if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Delete removes the current key/value under the cursor from the bucket. +// Delete fails if current key/value is a bucket or if the transaction is not writable. +func (c *Cursor) Delete() error { + if c.bucket.tx.db == nil { + return ErrTxClosed + } else if !c.bucket.Writable() { + return ErrTxNotWritable + } + + key, _, flags := c.keyValue() + // Return an error if current value is a bucket. + if (flags & bucketLeafFlag) != 0 { + return ErrIncompatibleValue + } + c.node().del(key) + + return nil +} + +// seek moves the cursor to a given key and returns it. +// If the key does not exist then the next key is used. +func (c *Cursor) seek(seek []byte) (key []byte, value []byte, flags uint32) { + _assert(c.bucket.tx.db != nil, "tx closed") + + // Start from root page/node and traverse to correct page. + c.stack = c.stack[:0] + c.search(seek, c.bucket.root) + ref := &c.stack[len(c.stack)-1] + + // If the cursor is pointing to the end of page/node then return nil. + if ref.index >= ref.count() { + return nil, nil, 0 + } + + // If this is a bucket then return a nil value. + return c.keyValue() +} + +// first moves the cursor to the first leaf element under the last page in the stack. +func (c *Cursor) first() { + for { + // Exit when we hit a leaf page. + var ref = &c.stack[len(c.stack)-1] + if ref.isLeaf() { + break + } + + // Keep adding pages pointing to the first element to the stack. + var pgid pgid + if ref.node != nil { + pgid = ref.node.inodes[ref.index].pgid + } else { + pgid = ref.page.branchPageElement(uint16(ref.index)).pgid + } + p, n := c.bucket.pageNode(pgid) + c.stack = append(c.stack, elemRef{page: p, node: n, index: 0}) + } +} + +// last moves the cursor to the last leaf element under the last page in the stack. +func (c *Cursor) last() { + for { + // Exit when we hit a leaf page. + ref := &c.stack[len(c.stack)-1] + if ref.isLeaf() { + break + } + + // Keep adding pages pointing to the last element in the stack. + var pgid pgid + if ref.node != nil { + pgid = ref.node.inodes[ref.index].pgid + } else { + pgid = ref.page.branchPageElement(uint16(ref.index)).pgid + } + p, n := c.bucket.pageNode(pgid) + + var nextRef = elemRef{page: p, node: n} + nextRef.index = nextRef.count() - 1 + c.stack = append(c.stack, nextRef) + } +} + +// next moves to the next leaf element and returns the key and value. +// If the cursor is at the last leaf element then it stays there and returns nil. +func (c *Cursor) next() (key []byte, value []byte, flags uint32) { + for { + // Attempt to move over one element until we're successful. + // Move up the stack as we hit the end of each page in our stack. + var i int + for i = len(c.stack) - 1; i >= 0; i-- { + elem := &c.stack[i] + if elem.index < elem.count()-1 { + elem.index++ + break + } + } + + // If we've hit the root page then stop and return. This will leave the + // cursor on the last element of the last page. + if i == -1 { + return nil, nil, 0 + } + + // Otherwise start from where we left off in the stack and find the + // first element of the first leaf page. + c.stack = c.stack[:i+1] + c.first() + + // If this is an empty page then restart and move back up the stack. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + continue + } + + return c.keyValue() + } +} + +// search recursively performs a binary search against a given page/node until it finds a given key. +func (c *Cursor) search(key []byte, pgid pgid) { + p, n := c.bucket.pageNode(pgid) + if p != nil && (p.flags&(branchPageFlag|leafPageFlag)) == 0 { + panic(fmt.Sprintf("invalid page type: %d: %x", p.id, p.flags)) + } + e := elemRef{page: p, node: n} + c.stack = append(c.stack, e) + + // If we're on a leaf page/node then find the specific node. + if e.isLeaf() { + c.nsearch(key) + return + } + + if n != nil { + c.searchNode(key, n) + return + } + c.searchPage(key, p) +} + +func (c *Cursor) searchNode(key []byte, n *node) { + var exact bool + index := sort.Search(len(n.inodes), func(i int) bool { + // TODO(benbjohnson): Optimize this range search. It's a bit hacky right now. + // sort.Search() finds the lowest index where f() != -1 but we need the highest index. + ret := bytes.Compare(n.inodes[i].key, key) + if ret == 0 { + exact = true + } + return ret != -1 + }) + if !exact && index > 0 { + index-- + } + c.stack[len(c.stack)-1].index = index + + // Recursively search to the next page. + c.search(key, n.inodes[index].pgid) +} + +func (c *Cursor) searchPage(key []byte, p *page) { + // Binary search for the correct range. + inodes := p.branchPageElements() + + var exact bool + index := sort.Search(int(p.count), func(i int) bool { + // TODO(benbjohnson): Optimize this range search. It's a bit hacky right now. + // sort.Search() finds the lowest index where f() != -1 but we need the highest index. + ret := bytes.Compare(inodes[i].key(), key) + if ret == 0 { + exact = true + } + return ret != -1 + }) + if !exact && index > 0 { + index-- + } + c.stack[len(c.stack)-1].index = index + + // Recursively search to the next page. + c.search(key, inodes[index].pgid) +} + +// nsearch searches the leaf node on the top of the stack for a key. +func (c *Cursor) nsearch(key []byte) { + e := &c.stack[len(c.stack)-1] + p, n := e.page, e.node + + // If we have a node then search its inodes. + if n != nil { + index := sort.Search(len(n.inodes), func(i int) bool { + return bytes.Compare(n.inodes[i].key, key) != -1 + }) + e.index = index + return + } + + // If we have a page then search its leaf elements. + inodes := p.leafPageElements() + index := sort.Search(int(p.count), func(i int) bool { + return bytes.Compare(inodes[i].key(), key) != -1 + }) + e.index = index +} + +// keyValue returns the key and value of the current leaf element. +func (c *Cursor) keyValue() ([]byte, []byte, uint32) { + ref := &c.stack[len(c.stack)-1] + if ref.count() == 0 || ref.index >= ref.count() { + return nil, nil, 0 + } + + // Retrieve value from node. + if ref.node != nil { + inode := &ref.node.inodes[ref.index] + return inode.key, inode.value, inode.flags + } + + // Or retrieve value from page. + elem := ref.page.leafPageElement(uint16(ref.index)) + return elem.key(), elem.value(), elem.flags +} + +// node returns the node that the cursor is currently positioned on. +func (c *Cursor) node() *node { + _assert(len(c.stack) > 0, "accessing a node with a zero-length cursor stack") + + // If the top of the stack is a leaf node then just return it. + if ref := &c.stack[len(c.stack)-1]; ref.node != nil && ref.isLeaf() { + return ref.node + } + + // Start from root and traverse down the hierarchy. + var n = c.stack[0].node + if n == nil { + n = c.bucket.node(c.stack[0].page.id, nil) + } + for _, ref := range c.stack[:len(c.stack)-1] { + _assert(!n.isLeaf, "expected branch node") + n = n.childAt(int(ref.index)) + } + _assert(n.isLeaf, "expected leaf node") + return n +} + +// elemRef represents a reference to an element on a given page/node. +type elemRef struct { + page *page + node *node + index int +} + +// isLeaf returns whether the ref is pointing at a leaf page/node. +func (r *elemRef) isLeaf() bool { + if r.node != nil { + return r.node.isLeaf + } + return (r.page.flags & leafPageFlag) != 0 +} + +// count returns the number of inodes or page elements. +func (r *elemRef) count() int { + if r.node != nil { + return len(r.node.inodes) + } + return int(r.page.count) +} diff --git a/deps/github.com/coreos/bbolt/db.go b/deps/github.com/coreos/bbolt/db.go new file mode 100644 index 000000000..4c8c156b2 --- /dev/null +++ b/deps/github.com/coreos/bbolt/db.go @@ -0,0 +1,1135 @@ +package bolt + +import ( + "errors" + "fmt" + "hash/fnv" + "log" + "os" + "runtime" + "sort" + "sync" + "time" + "unsafe" +) + +// The largest step that can be taken when remapping the mmap. +const maxMmapStep = 1 << 30 // 1GB + +// The data file format version. +const version = 2 + +// Represents a marker value to indicate that a file is a Bolt DB. +const magic uint32 = 0xED0CDAED + +const pgidNoFreelist pgid = 0xffffffffffffffff + +// IgnoreNoSync specifies whether the NoSync field of a DB is ignored when +// syncing changes to a file. This is required as some operating systems, +// such as OpenBSD, do not have a unified buffer cache (UBC) and writes +// must be synchronized using the msync(2) syscall. +const IgnoreNoSync = runtime.GOOS == "openbsd" + +// Default values if not set in a DB instance. +const ( + DefaultMaxBatchSize int = 1000 + DefaultMaxBatchDelay = 10 * time.Millisecond + DefaultAllocSize = 16 * 1024 * 1024 +) + +// default page size for db is set to the OS page size. +var defaultPageSize = os.Getpagesize() + +// The time elapsed between consecutive file locking attempts. +const flockRetryTimeout = 50 * time.Millisecond + +// DB represents a collection of buckets persisted to a file on disk. +// All data access is performed through transactions which can be obtained through the DB. +// All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called. +type DB struct { + // When enabled, the database will perform a Check() after every commit. + // A panic is issued if the database is in an inconsistent state. This + // flag has a large performance impact so it should only be used for + // debugging purposes. + StrictMode bool + + // Setting the NoSync flag will cause the database to skip fsync() + // calls after each commit. This can be useful when bulk loading data + // into a database and you can restart the bulk load in the event of + // a system failure or database corruption. Do not set this flag for + // normal use. + // + // If the package global IgnoreNoSync constant is true, this value is + // ignored. See the comment on that constant for more details. + // + // THIS IS UNSAFE. PLEASE USE WITH CAUTION. + NoSync bool + + // When true, skips syncing freelist to disk. This improves the database + // write performance under normal operation, but requires a full database + // re-sync during recovery. + NoFreelistSync bool + + // When true, skips the truncate call when growing the database. + // Setting this to true is only safe on non-ext3/ext4 systems. + // Skipping truncation avoids preallocation of hard drive space and + // bypasses a truncate() and fsync() syscall on remapping. + // + // https://github.com/boltdb/bolt/issues/284 + NoGrowSync bool + + // If you want to read the entire database fast, you can set MmapFlag to + // syscall.MAP_POPULATE on Linux 2.6.23+ for sequential read-ahead. + MmapFlags int + + // MaxBatchSize is the maximum size of a batch. Default value is + // copied from DefaultMaxBatchSize in Open. + // + // If <=0, disables batching. + // + // Do not change concurrently with calls to Batch. + MaxBatchSize int + + // MaxBatchDelay is the maximum delay before a batch starts. + // Default value is copied from DefaultMaxBatchDelay in Open. + // + // If <=0, effectively disables batching. + // + // Do not change concurrently with calls to Batch. + MaxBatchDelay time.Duration + + // AllocSize is the amount of space allocated when the database + // needs to create new pages. This is done to amortize the cost + // of truncate() and fsync() when growing the data file. + AllocSize int + + path string + file *os.File + lockfile *os.File // windows only + dataref []byte // mmap'ed readonly, write throws SEGV + data *[maxMapSize]byte + datasz int + filesz int // current on disk file size + meta0 *meta + meta1 *meta + pageSize int + opened bool + rwtx *Tx + txs []*Tx + stats Stats + + freelist *freelist + freelistLoad sync.Once + + pagePool sync.Pool + + batchMu sync.Mutex + batch *batch + + rwlock sync.Mutex // Allows only one writer at a time. + metalock sync.Mutex // Protects meta page access. + mmaplock sync.RWMutex // Protects mmap access during remapping. + statlock sync.RWMutex // Protects stats access. + + ops struct { + writeAt func(b []byte, off int64) (n int, err error) + } + + // Read only mode. + // When true, Update() and Begin(true) return ErrDatabaseReadOnly immediately. + readOnly bool +} + +// Path returns the path to currently open database file. +func (db *DB) Path() string { + return db.path +} + +// GoString returns the Go string representation of the database. +func (db *DB) GoString() string { + return fmt.Sprintf("bolt.DB{path:%q}", db.path) +} + +// String returns the string representation of the database. +func (db *DB) String() string { + return fmt.Sprintf("DB<%q>", db.path) +} + +// Open creates and opens a database at the given path. +// If the file does not exist then it will be created automatically. +// Passing in nil options will cause Bolt to open the database with the default options. +func Open(path string, mode os.FileMode, options *Options) (*DB, error) { + db := &DB{ + opened: true, + } + // Set default options if no options are provided. + if options == nil { + options = DefaultOptions + } + db.NoSync = options.NoSync + db.NoGrowSync = options.NoGrowSync + db.MmapFlags = options.MmapFlags + db.NoFreelistSync = options.NoFreelistSync + + // Set default values for later DB operations. + db.MaxBatchSize = DefaultMaxBatchSize + db.MaxBatchDelay = DefaultMaxBatchDelay + db.AllocSize = DefaultAllocSize + + flag := os.O_RDWR + if options.ReadOnly { + flag = os.O_RDONLY + db.readOnly = true + } + + // Open data file and separate sync handler for metadata writes. + db.path = path + var err error + if db.file, err = os.OpenFile(db.path, flag|os.O_CREATE, mode); err != nil { + _ = db.close() + return nil, err + } + + // Lock file so that other processes using Bolt in read-write mode cannot + // use the database at the same time. This would cause corruption since + // the two processes would write meta pages and free pages separately. + // The database file is locked exclusively (only one process can grab the lock) + // if !options.ReadOnly. + // The database file is locked using the shared lock (more than one process may + // hold a lock at the same time) otherwise (options.ReadOnly is set). + if err := flock(db, mode, !db.readOnly, options.Timeout); err != nil { + db.lockfile = nil // make 'unused' happy. TODO: rework locks + _ = db.close() + return nil, err + } + + // Default values for test hooks + db.ops.writeAt = db.file.WriteAt + + if db.pageSize = options.PageSize; db.pageSize == 0 { + // Set the default page size to the OS page size. + db.pageSize = defaultPageSize + } + + // Initialize the database if it doesn't exist. + if info, err := db.file.Stat(); err != nil { + return nil, err + } else if info.Size() == 0 { + // Initialize new files with meta pages. + if err := db.init(); err != nil { + return nil, err + } + } else { + // Read the first meta page to determine the page size. + var buf [0x1000]byte + // If we can't read the page size, but can read a page, assume + // it's the same as the OS or one given -- since that's how the + // page size was chosen in the first place. + // + // If the first page is invalid and this OS uses a different + // page size than what the database was created with then we + // are out of luck and cannot access the database. + // + // TODO: scan for next page + if bw, err := db.file.ReadAt(buf[:], 0); err == nil && bw == len(buf) { + if m := db.pageInBuffer(buf[:], 0).meta(); m.validate() == nil { + db.pageSize = int(m.pageSize) + } + } else { + return nil, ErrInvalid + } + } + + // Initialize page pool. + db.pagePool = sync.Pool{ + New: func() interface{} { + return make([]byte, db.pageSize) + }, + } + + // Memory map the data file. + if err := db.mmap(options.InitialMmapSize); err != nil { + _ = db.close() + return nil, err + } + + if db.readOnly { + return db, nil + } + + db.loadFreelist() + + // Flush freelist when transitioning from no sync to sync so + // NoFreelistSync unaware boltdb can open the db later. + if !db.NoFreelistSync && !db.hasSyncedFreelist() { + tx, err := db.Begin(true) + if tx != nil { + err = tx.Commit() + } + if err != nil { + _ = db.close() + return nil, err + } + } + + // Mark the database as opened and return. + return db, nil +} + +// loadFreelist reads the freelist if it is synced, or reconstructs it +// by scanning the DB if it is not synced. It assumes there are no +// concurrent accesses being made to the freelist. +func (db *DB) loadFreelist() { + db.freelistLoad.Do(func() { + db.freelist = newFreelist() + if !db.hasSyncedFreelist() { + // Reconstruct free list by scanning the DB. + db.freelist.readIDs(db.freepages()) + } else { + // Read free list from freelist page. + db.freelist.read(db.page(db.meta().freelist)) + } + db.stats.FreePageN = len(db.freelist.ids) + }) +} + +func (db *DB) hasSyncedFreelist() bool { + return db.meta().freelist != pgidNoFreelist +} + +// mmap opens the underlying memory-mapped file and initializes the meta references. +// minsz is the minimum size that the new mmap can be. +func (db *DB) mmap(minsz int) error { + db.mmaplock.Lock() + defer db.mmaplock.Unlock() + + info, err := db.file.Stat() + if err != nil { + return fmt.Errorf("mmap stat error: %s", err) + } else if int(info.Size()) < db.pageSize*2 { + return fmt.Errorf("file size too small") + } + + // Ensure the size is at least the minimum size. + var size = int(info.Size()) + if size < minsz { + size = minsz + } + size, err = db.mmapSize(size) + if err != nil { + return err + } + + // Dereference all mmap references before unmapping. + if db.rwtx != nil { + db.rwtx.root.dereference() + } + + // Unmap existing data before continuing. + if err := db.munmap(); err != nil { + return err + } + + // Memory-map the data file as a byte slice. + if err := mmap(db, size); err != nil { + return err + } + + // Save references to the meta pages. + db.meta0 = db.page(0).meta() + db.meta1 = db.page(1).meta() + + // Validate the meta pages. We only return an error if both meta pages fail + // validation, since meta0 failing validation means that it wasn't saved + // properly -- but we can recover using meta1. And vice-versa. + err0 := db.meta0.validate() + err1 := db.meta1.validate() + if err0 != nil && err1 != nil { + return err0 + } + + return nil +} + +// munmap unmaps the data file from memory. +func (db *DB) munmap() error { + if err := munmap(db); err != nil { + return fmt.Errorf("unmap error: " + err.Error()) + } + return nil +} + +// mmapSize determines the appropriate size for the mmap given the current size +// of the database. The minimum size is 32KB and doubles until it reaches 1GB. +// Returns an error if the new mmap size is greater than the max allowed. +func (db *DB) mmapSize(size int) (int, error) { + // Double the size from 32KB until 1GB. + for i := uint(15); i <= 30; i++ { + if size <= 1< maxMapSize { + return 0, fmt.Errorf("mmap too large") + } + + // If larger than 1GB then grow by 1GB at a time. + sz := int64(size) + if remainder := sz % int64(maxMmapStep); remainder > 0 { + sz += int64(maxMmapStep) - remainder + } + + // Ensure that the mmap size is a multiple of the page size. + // This should always be true since we're incrementing in MBs. + pageSize := int64(db.pageSize) + if (sz % pageSize) != 0 { + sz = ((sz / pageSize) + 1) * pageSize + } + + // If we've exceeded the max size then only grow up to the max size. + if sz > maxMapSize { + sz = maxMapSize + } + + return int(sz), nil +} + +// init creates a new database file and initializes its meta pages. +func (db *DB) init() error { + // Create two meta pages on a buffer. + buf := make([]byte, db.pageSize*4) + for i := 0; i < 2; i++ { + p := db.pageInBuffer(buf[:], pgid(i)) + p.id = pgid(i) + p.flags = metaPageFlag + + // Initialize the meta page. + m := p.meta() + m.magic = magic + m.version = version + m.pageSize = uint32(db.pageSize) + m.freelist = 2 + m.root = bucket{root: 3} + m.pgid = 4 + m.txid = txid(i) + m.checksum = m.sum64() + } + + // Write an empty freelist at page 3. + p := db.pageInBuffer(buf[:], pgid(2)) + p.id = pgid(2) + p.flags = freelistPageFlag + p.count = 0 + + // Write an empty leaf page at page 4. + p = db.pageInBuffer(buf[:], pgid(3)) + p.id = pgid(3) + p.flags = leafPageFlag + p.count = 0 + + // Write the buffer to our data file. + if _, err := db.ops.writeAt(buf, 0); err != nil { + return err + } + if err := fdatasync(db); err != nil { + return err + } + + return nil +} + +// Close releases all database resources. +// All transactions must be closed before closing the database. +func (db *DB) Close() error { + db.rwlock.Lock() + defer db.rwlock.Unlock() + + db.metalock.Lock() + defer db.metalock.Unlock() + + db.mmaplock.RLock() + defer db.mmaplock.RUnlock() + + return db.close() +} + +func (db *DB) close() error { + if !db.opened { + return nil + } + + db.opened = false + + db.freelist = nil + + // Clear ops. + db.ops.writeAt = nil + + // Close the mmap. + if err := db.munmap(); err != nil { + return err + } + + // Close file handles. + if db.file != nil { + // No need to unlock read-only file. + if !db.readOnly { + // Unlock the file. + if err := funlock(db); err != nil { + log.Printf("bolt.Close(): funlock error: %s", err) + } + } + + // Close the file descriptor. + if err := db.file.Close(); err != nil { + return fmt.Errorf("db file close: %s", err) + } + db.file = nil + } + + db.path = "" + return nil +} + +// Begin starts a new transaction. +// Multiple read-only transactions can be used concurrently but only one +// write transaction can be used at a time. Starting multiple write transactions +// will cause the calls to block and be serialized until the current write +// transaction finishes. +// +// Transactions should not be dependent on one another. Opening a read +// transaction and a write transaction in the same goroutine can cause the +// writer to deadlock because the database periodically needs to re-mmap itself +// as it grows and it cannot do that while a read transaction is open. +// +// If a long running read transaction (for example, a snapshot transaction) is +// needed, you might want to set DB.InitialMmapSize to a large enough value +// to avoid potential blocking of write transaction. +// +// IMPORTANT: You must close read-only transactions after you are finished or +// else the database will not reclaim old pages. +func (db *DB) Begin(writable bool) (*Tx, error) { + if writable { + return db.beginRWTx() + } + return db.beginTx() +} + +func (db *DB) beginTx() (*Tx, error) { + // Lock the meta pages while we initialize the transaction. We obtain + // the meta lock before the mmap lock because that's the order that the + // write transaction will obtain them. + db.metalock.Lock() + + // Obtain a read-only lock on the mmap. When the mmap is remapped it will + // obtain a write lock so all transactions must finish before it can be + // remapped. + db.mmaplock.RLock() + + // Exit if the database is not open yet. + if !db.opened { + db.mmaplock.RUnlock() + db.metalock.Unlock() + return nil, ErrDatabaseNotOpen + } + + // Create a transaction associated with the database. + t := &Tx{} + t.init(db) + + // Keep track of transaction until it closes. + db.txs = append(db.txs, t) + n := len(db.txs) + + // Unlock the meta pages. + db.metalock.Unlock() + + // Update the transaction stats. + db.statlock.Lock() + db.stats.TxN++ + db.stats.OpenTxN = n + db.statlock.Unlock() + + return t, nil +} + +func (db *DB) beginRWTx() (*Tx, error) { + // If the database was opened with Options.ReadOnly, return an error. + if db.readOnly { + return nil, ErrDatabaseReadOnly + } + + // Obtain writer lock. This is released by the transaction when it closes. + // This enforces only one writer transaction at a time. + db.rwlock.Lock() + + // Once we have the writer lock then we can lock the meta pages so that + // we can set up the transaction. + db.metalock.Lock() + defer db.metalock.Unlock() + + // Exit if the database is not open yet. + if !db.opened { + db.rwlock.Unlock() + return nil, ErrDatabaseNotOpen + } + + // Create a transaction associated with the database. + t := &Tx{writable: true} + t.init(db) + db.rwtx = t + db.freePages() + return t, nil +} + +// freePages releases any pages associated with closed read-only transactions. +func (db *DB) freePages() { + // Free all pending pages prior to earliest open transaction. + sort.Sort(txsById(db.txs)) + minid := txid(0xFFFFFFFFFFFFFFFF) + if len(db.txs) > 0 { + minid = db.txs[0].meta.txid + } + if minid > 0 { + db.freelist.release(minid - 1) + } + // Release unused txid extents. + for _, t := range db.txs { + db.freelist.releaseRange(minid, t.meta.txid-1) + minid = t.meta.txid + 1 + } + db.freelist.releaseRange(minid, txid(0xFFFFFFFFFFFFFFFF)) + // Any page both allocated and freed in an extent is safe to release. +} + +type txsById []*Tx + +func (t txsById) Len() int { return len(t) } +func (t txsById) Swap(i, j int) { t[i], t[j] = t[j], t[i] } +func (t txsById) Less(i, j int) bool { return t[i].meta.txid < t[j].meta.txid } + +// removeTx removes a transaction from the database. +func (db *DB) removeTx(tx *Tx) { + // Release the read lock on the mmap. + db.mmaplock.RUnlock() + + // Use the meta lock to restrict access to the DB object. + db.metalock.Lock() + + // Remove the transaction. + for i, t := range db.txs { + if t == tx { + last := len(db.txs) - 1 + db.txs[i] = db.txs[last] + db.txs[last] = nil + db.txs = db.txs[:last] + break + } + } + n := len(db.txs) + + // Unlock the meta pages. + db.metalock.Unlock() + + // Merge statistics. + db.statlock.Lock() + db.stats.OpenTxN = n + db.stats.TxStats.add(&tx.stats) + db.statlock.Unlock() +} + +// Update executes a function within the context of a read-write managed transaction. +// If no error is returned from the function then the transaction is committed. +// If an error is returned then the entire transaction is rolled back. +// Any error that is returned from the function or returned from the commit is +// returned from the Update() method. +// +// Attempting to manually commit or rollback within the function will cause a panic. +func (db *DB) Update(fn func(*Tx) error) error { + t, err := db.Begin(true) + if err != nil { + return err + } + + // Make sure the transaction rolls back in the event of a panic. + defer func() { + if t.db != nil { + t.rollback() + } + }() + + // Mark as a managed tx so that the inner function cannot manually commit. + t.managed = true + + // If an error is returned from the function then rollback and return error. + err = fn(t) + t.managed = false + if err != nil { + _ = t.Rollback() + return err + } + + return t.Commit() +} + +// View executes a function within the context of a managed read-only transaction. +// Any error that is returned from the function is returned from the View() method. +// +// Attempting to manually rollback within the function will cause a panic. +func (db *DB) View(fn func(*Tx) error) error { + t, err := db.Begin(false) + if err != nil { + return err + } + + // Make sure the transaction rolls back in the event of a panic. + defer func() { + if t.db != nil { + t.rollback() + } + }() + + // Mark as a managed tx so that the inner function cannot manually rollback. + t.managed = true + + // If an error is returned from the function then pass it through. + err = fn(t) + t.managed = false + if err != nil { + _ = t.Rollback() + return err + } + + return t.Rollback() +} + +// Batch calls fn as part of a batch. It behaves similar to Update, +// except: +// +// 1. concurrent Batch calls can be combined into a single Bolt +// transaction. +// +// 2. the function passed to Batch may be called multiple times, +// regardless of whether it returns error or not. +// +// This means that Batch function side effects must be idempotent and +// take permanent effect only after a successful return is seen in +// caller. +// +// The maximum batch size and delay can be adjusted with DB.MaxBatchSize +// and DB.MaxBatchDelay, respectively. +// +// Batch is only useful when there are multiple goroutines calling it. +func (db *DB) Batch(fn func(*Tx) error) error { + errCh := make(chan error, 1) + + db.batchMu.Lock() + if (db.batch == nil) || (db.batch != nil && len(db.batch.calls) >= db.MaxBatchSize) { + // There is no existing batch, or the existing batch is full; start a new one. + db.batch = &batch{ + db: db, + } + db.batch.timer = time.AfterFunc(db.MaxBatchDelay, db.batch.trigger) + } + db.batch.calls = append(db.batch.calls, call{fn: fn, err: errCh}) + if len(db.batch.calls) >= db.MaxBatchSize { + // wake up batch, it's ready to run + go db.batch.trigger() + } + db.batchMu.Unlock() + + err := <-errCh + if err == trySolo { + err = db.Update(fn) + } + return err +} + +type call struct { + fn func(*Tx) error + err chan<- error +} + +type batch struct { + db *DB + timer *time.Timer + start sync.Once + calls []call +} + +// trigger runs the batch if it hasn't already been run. +func (b *batch) trigger() { + b.start.Do(b.run) +} + +// run performs the transactions in the batch and communicates results +// back to DB.Batch. +func (b *batch) run() { + b.db.batchMu.Lock() + b.timer.Stop() + // Make sure no new work is added to this batch, but don't break + // other batches. + if b.db.batch == b { + b.db.batch = nil + } + b.db.batchMu.Unlock() + +retry: + for len(b.calls) > 0 { + var failIdx = -1 + err := b.db.Update(func(tx *Tx) error { + for i, c := range b.calls { + if err := safelyCall(c.fn, tx); err != nil { + failIdx = i + return err + } + } + return nil + }) + + if failIdx >= 0 { + // take the failing transaction out of the batch. it's + // safe to shorten b.calls here because db.batch no longer + // points to us, and we hold the mutex anyway. + c := b.calls[failIdx] + b.calls[failIdx], b.calls = b.calls[len(b.calls)-1], b.calls[:len(b.calls)-1] + // tell the submitter re-run it solo, continue with the rest of the batch + c.err <- trySolo + continue retry + } + + // pass success, or bolt internal errors, to all callers + for _, c := range b.calls { + c.err <- err + } + break retry + } +} + +// trySolo is a special sentinel error value used for signaling that a +// transaction function should be re-run. It should never be seen by +// callers. +var trySolo = errors.New("batch function returned an error and should be re-run solo") + +type panicked struct { + reason interface{} +} + +func (p panicked) Error() string { + if err, ok := p.reason.(error); ok { + return err.Error() + } + return fmt.Sprintf("panic: %v", p.reason) +} + +func safelyCall(fn func(*Tx) error, tx *Tx) (err error) { + defer func() { + if p := recover(); p != nil { + err = panicked{p} + } + }() + return fn(tx) +} + +// Sync executes fdatasync() against the database file handle. +// +// This is not necessary under normal operation, however, if you use NoSync +// then it allows you to force the database file to sync against the disk. +func (db *DB) Sync() error { return fdatasync(db) } + +// Stats retrieves ongoing performance stats for the database. +// This is only updated when a transaction closes. +func (db *DB) Stats() Stats { + db.statlock.RLock() + defer db.statlock.RUnlock() + return db.stats +} + +// This is for internal access to the raw data bytes from the C cursor, use +// carefully, or not at all. +func (db *DB) Info() *Info { + return &Info{uintptr(unsafe.Pointer(&db.data[0])), db.pageSize} +} + +// page retrieves a page reference from the mmap based on the current page size. +func (db *DB) page(id pgid) *page { + pos := id * pgid(db.pageSize) + return (*page)(unsafe.Pointer(&db.data[pos])) +} + +// pageInBuffer retrieves a page reference from a given byte array based on the current page size. +func (db *DB) pageInBuffer(b []byte, id pgid) *page { + return (*page)(unsafe.Pointer(&b[id*pgid(db.pageSize)])) +} + +// meta retrieves the current meta page reference. +func (db *DB) meta() *meta { + // We have to return the meta with the highest txid which doesn't fail + // validation. Otherwise, we can cause errors when in fact the database is + // in a consistent state. metaA is the one with the higher txid. + metaA := db.meta0 + metaB := db.meta1 + if db.meta1.txid > db.meta0.txid { + metaA = db.meta1 + metaB = db.meta0 + } + + // Use higher meta page if valid. Otherwise fallback to previous, if valid. + if err := metaA.validate(); err == nil { + return metaA + } else if err := metaB.validate(); err == nil { + return metaB + } + + // This should never be reached, because both meta1 and meta0 were validated + // on mmap() and we do fsync() on every write. + panic("bolt.DB.meta(): invalid meta pages") +} + +// allocate returns a contiguous block of memory starting at a given page. +func (db *DB) allocate(txid txid, count int) (*page, error) { + // Allocate a temporary buffer for the page. + var buf []byte + if count == 1 { + buf = db.pagePool.Get().([]byte) + } else { + buf = make([]byte, count*db.pageSize) + } + p := (*page)(unsafe.Pointer(&buf[0])) + p.overflow = uint32(count - 1) + + // Use pages from the freelist if they are available. + if p.id = db.freelist.allocate(txid, count); p.id != 0 { + return p, nil + } + + // Resize mmap() if we're at the end. + p.id = db.rwtx.meta.pgid + var minsz = int((p.id+pgid(count))+1) * db.pageSize + if minsz >= db.datasz { + if err := db.mmap(minsz); err != nil { + return nil, fmt.Errorf("mmap allocate error: %s", err) + } + } + + // Move the page id high water mark. + db.rwtx.meta.pgid += pgid(count) + + return p, nil +} + +// grow grows the size of the database to the given sz. +func (db *DB) grow(sz int) error { + // Ignore if the new size is less than available file size. + if sz <= db.filesz { + return nil + } + + // If the data is smaller than the alloc size then only allocate what's needed. + // Once it goes over the allocation size then allocate in chunks. + if db.datasz < db.AllocSize { + sz = db.datasz + } else { + sz += db.AllocSize + } + + // Truncate and fsync to ensure file size metadata is flushed. + // https://github.com/boltdb/bolt/issues/284 + if !db.NoGrowSync && !db.readOnly { + if runtime.GOOS != "windows" { + if err := db.file.Truncate(int64(sz)); err != nil { + return fmt.Errorf("file resize error: %s", err) + } + } + if err := db.file.Sync(); err != nil { + return fmt.Errorf("file sync error: %s", err) + } + } + + db.filesz = sz + return nil +} + +func (db *DB) IsReadOnly() bool { + return db.readOnly +} + +func (db *DB) freepages() []pgid { + tx, err := db.beginTx() + defer func() { + err = tx.Rollback() + if err != nil { + panic("freepages: failed to rollback tx") + } + }() + if err != nil { + panic("freepages: failed to open read only tx") + } + + reachable := make(map[pgid]*page) + nofreed := make(map[pgid]bool) + ech := make(chan error) + go func() { + for e := range ech { + panic(fmt.Sprintf("freepages: failed to get all reachable pages (%v)", e)) + } + }() + tx.checkBucket(&tx.root, reachable, nofreed, ech) + close(ech) + + var fids []pgid + for i := pgid(2); i < db.meta().pgid; i++ { + if _, ok := reachable[i]; !ok { + fids = append(fids, i) + } + } + return fids +} + +// Options represents the options that can be set when opening a database. +type Options struct { + // Timeout is the amount of time to wait to obtain a file lock. + // When set to zero it will wait indefinitely. This option is only + // available on Darwin and Linux. + Timeout time.Duration + + // Sets the DB.NoGrowSync flag before memory mapping the file. + NoGrowSync bool + + // Do not sync freelist to disk. This improves the database write performance + // under normal operation, but requires a full database re-sync during recovery. + NoFreelistSync bool + + // Open database in read-only mode. Uses flock(..., LOCK_SH |LOCK_NB) to + // grab a shared lock (UNIX). + ReadOnly bool + + // Sets the DB.MmapFlags flag before memory mapping the file. + MmapFlags int + + // InitialMmapSize is the initial mmap size of the database + // in bytes. Read transactions won't block write transaction + // if the InitialMmapSize is large enough to hold database mmap + // size. (See DB.Begin for more information) + // + // If <=0, the initial map size is 0. + // If initialMmapSize is smaller than the previous database size, + // it takes no effect. + InitialMmapSize int + + // PageSize overrides the default OS page size. + PageSize int + + // NoSync sets the initial value of DB.NoSync. Normally this can just be + // set directly on the DB itself when returned from Open(), but this option + // is useful in APIs which expose Options but not the underlying DB. + NoSync bool +} + +// DefaultOptions represent the options used if nil options are passed into Open(). +// No timeout is used which will cause Bolt to wait indefinitely for a lock. +var DefaultOptions = &Options{ + Timeout: 0, + NoGrowSync: false, +} + +// Stats represents statistics about the database. +type Stats struct { + // Freelist stats + FreePageN int // total number of free pages on the freelist + PendingPageN int // total number of pending pages on the freelist + FreeAlloc int // total bytes allocated in free pages + FreelistInuse int // total bytes used by the freelist + + // Transaction stats + TxN int // total number of started read transactions + OpenTxN int // number of currently open read transactions + + TxStats TxStats // global, ongoing stats. +} + +// Sub calculates and returns the difference between two sets of database stats. +// This is useful when obtaining stats at two different points and time and +// you need the performance counters that occurred within that time span. +func (s *Stats) Sub(other *Stats) Stats { + if other == nil { + return *s + } + var diff Stats + diff.FreePageN = s.FreePageN + diff.PendingPageN = s.PendingPageN + diff.FreeAlloc = s.FreeAlloc + diff.FreelistInuse = s.FreelistInuse + diff.TxN = s.TxN - other.TxN + diff.TxStats = s.TxStats.Sub(&other.TxStats) + return diff +} + +type Info struct { + Data uintptr + PageSize int +} + +type meta struct { + magic uint32 + version uint32 + pageSize uint32 + flags uint32 + root bucket + freelist pgid + pgid pgid + txid txid + checksum uint64 +} + +// validate checks the marker bytes and version of the meta page to ensure it matches this binary. +func (m *meta) validate() error { + if m.magic != magic { + return ErrInvalid + } else if m.version != version { + return ErrVersionMismatch + } else if m.checksum != 0 && m.checksum != m.sum64() { + return ErrChecksum + } + return nil +} + +// copy copies one meta object to another. +func (m *meta) copy(dest *meta) { + *dest = *m +} + +// write writes the meta onto a page. +func (m *meta) write(p *page) { + if m.root.root >= m.pgid { + panic(fmt.Sprintf("root bucket pgid (%d) above high water mark (%d)", m.root.root, m.pgid)) + } else if m.freelist >= m.pgid && m.freelist != pgidNoFreelist { + // TODO: reject pgidNoFreeList if !NoFreelistSync + panic(fmt.Sprintf("freelist pgid (%d) above high water mark (%d)", m.freelist, m.pgid)) + } + + // Page id is either going to be 0 or 1 which we can determine by the transaction ID. + p.id = pgid(m.txid % 2) + p.flags |= metaPageFlag + + // Calculate the checksum. + m.checksum = m.sum64() + + m.copy(p.meta()) +} + +// generates the checksum for the meta. +func (m *meta) sum64() uint64 { + var h = fnv.New64a() + _, _ = h.Write((*[unsafe.Offsetof(meta{}.checksum)]byte)(unsafe.Pointer(m))[:]) + return h.Sum64() +} + +// _assert will panic with a given formatted message if the given condition is false. +func _assert(condition bool, msg string, v ...interface{}) { + if !condition { + panic(fmt.Sprintf("assertion failed: "+msg, v...)) + } +} diff --git a/deps/github.com/coreos/bbolt/doc.go b/deps/github.com/coreos/bbolt/doc.go new file mode 100644 index 000000000..cc937845d --- /dev/null +++ b/deps/github.com/coreos/bbolt/doc.go @@ -0,0 +1,44 @@ +/* +Package bolt implements a low-level key/value store in pure Go. It supports +fully serializable transactions, ACID semantics, and lock-free MVCC with +multiple readers and a single writer. Bolt can be used for projects that +want a simple data store without the need to add large dependencies such as +Postgres or MySQL. + +Bolt is a single-level, zero-copy, B+tree data store. This means that Bolt is +optimized for fast read access and does not require recovery in the event of a +system crash. Transactions which have not finished committing will simply be +rolled back in the event of a crash. + +The design of Bolt is based on Howard Chu's LMDB database project. + +Bolt currently works on Windows, Mac OS X, and Linux. + + +Basics + +There are only a few types in Bolt: DB, Bucket, Tx, and Cursor. The DB is +a collection of buckets and is represented by a single file on disk. A bucket is +a collection of unique keys that are associated with values. + +Transactions provide either read-only or read-write access to the database. +Read-only transactions can retrieve key/value pairs and can use Cursors to +iterate over the dataset sequentially. Read-write transactions can create and +delete buckets and can insert and remove keys. Only one read-write transaction +is allowed at a time. + + +Caveats + +The database uses a read-only, memory-mapped data file to ensure that +applications cannot corrupt the database, however, this means that keys and +values returned from Bolt cannot be changed. Writing to a read-only byte slice +will cause Go to panic. + +Keys and values retrieved from the database are only valid for the life of +the transaction. When used outside the transaction, these byte slices can +point to different data or can point to invalid memory which will cause a panic. + + +*/ +package bolt diff --git a/deps/github.com/coreos/bbolt/errors.go b/deps/github.com/coreos/bbolt/errors.go new file mode 100644 index 000000000..a3620a3eb --- /dev/null +++ b/deps/github.com/coreos/bbolt/errors.go @@ -0,0 +1,71 @@ +package bolt + +import "errors" + +// These errors can be returned when opening or calling methods on a DB. +var ( + // ErrDatabaseNotOpen is returned when a DB instance is accessed before it + // is opened or after it is closed. + ErrDatabaseNotOpen = errors.New("database not open") + + // ErrDatabaseOpen is returned when opening a database that is + // already open. + ErrDatabaseOpen = errors.New("database already open") + + // ErrInvalid is returned when both meta pages on a database are invalid. + // This typically occurs when a file is not a bolt database. + ErrInvalid = errors.New("invalid database") + + // ErrVersionMismatch is returned when the data file was created with a + // different version of Bolt. + ErrVersionMismatch = errors.New("version mismatch") + + // ErrChecksum is returned when either meta page checksum does not match. + ErrChecksum = errors.New("checksum error") + + // ErrTimeout is returned when a database cannot obtain an exclusive lock + // on the data file after the timeout passed to Open(). + ErrTimeout = errors.New("timeout") +) + +// These errors can occur when beginning or committing a Tx. +var ( + // ErrTxNotWritable is returned when performing a write operation on a + // read-only transaction. + ErrTxNotWritable = errors.New("tx not writable") + + // ErrTxClosed is returned when committing or rolling back a transaction + // that has already been committed or rolled back. + ErrTxClosed = errors.New("tx closed") + + // ErrDatabaseReadOnly is returned when a mutating transaction is started on a + // read-only database. + ErrDatabaseReadOnly = errors.New("database is in read-only mode") +) + +// These errors can occur when putting or deleting a value or a bucket. +var ( + // ErrBucketNotFound is returned when trying to access a bucket that has + // not been created yet. + ErrBucketNotFound = errors.New("bucket not found") + + // ErrBucketExists is returned when creating a bucket that already exists. + ErrBucketExists = errors.New("bucket already exists") + + // ErrBucketNameRequired is returned when creating a bucket with a blank name. + ErrBucketNameRequired = errors.New("bucket name required") + + // ErrKeyRequired is returned when inserting a zero-length key. + ErrKeyRequired = errors.New("key required") + + // ErrKeyTooLarge is returned when inserting a key that is larger than MaxKeySize. + ErrKeyTooLarge = errors.New("key too large") + + // ErrValueTooLarge is returned when inserting a value that is larger than MaxValueSize. + ErrValueTooLarge = errors.New("value too large") + + // ErrIncompatibleValue is returned when trying create or delete a bucket + // on an existing non-bucket key or when trying to create or delete a + // non-bucket key on an existing bucket key. + ErrIncompatibleValue = errors.New("incompatible value") +) diff --git a/deps/github.com/coreos/bbolt/freelist.go b/deps/github.com/coreos/bbolt/freelist.go new file mode 100644 index 000000000..266f15429 --- /dev/null +++ b/deps/github.com/coreos/bbolt/freelist.go @@ -0,0 +1,333 @@ +package bolt + +import ( + "fmt" + "sort" + "unsafe" +) + +// txPending holds a list of pgids and corresponding allocation txns +// that are pending to be freed. +type txPending struct { + ids []pgid + alloctx []txid // txids allocating the ids + lastReleaseBegin txid // beginning txid of last matching releaseRange +} + +// freelist represents a list of all pages that are available for allocation. +// It also tracks pages that have been freed but are still in use by open transactions. +type freelist struct { + ids []pgid // all free and available free page ids. + allocs map[pgid]txid // mapping of txid that allocated a pgid. + pending map[txid]*txPending // mapping of soon-to-be free page ids by tx. + cache map[pgid]bool // fast lookup of all free and pending page ids. +} + +// newFreelist returns an empty, initialized freelist. +func newFreelist() *freelist { + return &freelist{ + allocs: make(map[pgid]txid), + pending: make(map[txid]*txPending), + cache: make(map[pgid]bool), + } +} + +// size returns the size of the page after serialization. +func (f *freelist) size() int { + n := f.count() + if n >= 0xFFFF { + // The first element will be used to store the count. See freelist.write. + n++ + } + return pageHeaderSize + (int(unsafe.Sizeof(pgid(0))) * n) +} + +// count returns count of pages on the freelist +func (f *freelist) count() int { + return f.free_count() + f.pending_count() +} + +// free_count returns count of free pages +func (f *freelist) free_count() int { + return len(f.ids) +} + +// pending_count returns count of pending pages +func (f *freelist) pending_count() int { + var count int + for _, txp := range f.pending { + count += len(txp.ids) + } + return count +} + +// copyall copies into dst a list of all free ids and all pending ids in one sorted list. +// f.count returns the minimum length required for dst. +func (f *freelist) copyall(dst []pgid) { + m := make(pgids, 0, f.pending_count()) + for _, txp := range f.pending { + m = append(m, txp.ids...) + } + sort.Sort(m) + mergepgids(dst, f.ids, m) +} + +// allocate returns the starting page id of a contiguous list of pages of a given size. +// If a contiguous block cannot be found then 0 is returned. +func (f *freelist) allocate(txid txid, n int) pgid { + if len(f.ids) == 0 { + return 0 + } + + var initial, previd pgid + for i, id := range f.ids { + if id <= 1 { + panic(fmt.Sprintf("invalid page allocation: %d", id)) + } + + // Reset initial page if this is not contiguous. + if previd == 0 || id-previd != 1 { + initial = id + } + + // If we found a contiguous block then remove it and return it. + if (id-initial)+1 == pgid(n) { + // If we're allocating off the beginning then take the fast path + // and just adjust the existing slice. This will use extra memory + // temporarily but the append() in free() will realloc the slice + // as is necessary. + if (i + 1) == n { + f.ids = f.ids[i+1:] + } else { + copy(f.ids[i-n+1:], f.ids[i+1:]) + f.ids = f.ids[:len(f.ids)-n] + } + + // Remove from the free cache. + for i := pgid(0); i < pgid(n); i++ { + delete(f.cache, initial+i) + } + f.allocs[initial] = txid + return initial + } + + previd = id + } + return 0 +} + +// free releases a page and its overflow for a given transaction id. +// If the page is already free then a panic will occur. +func (f *freelist) free(txid txid, p *page) { + if p.id <= 1 { + panic(fmt.Sprintf("cannot free page 0 or 1: %d", p.id)) + } + + // Free page and all its overflow pages. + txp := f.pending[txid] + if txp == nil { + txp = &txPending{} + f.pending[txid] = txp + } + allocTxid, ok := f.allocs[p.id] + if ok { + delete(f.allocs, p.id) + } else if (p.flags & freelistPageFlag) != 0 { + // Freelist is always allocated by prior tx. + allocTxid = txid - 1 + } + + for id := p.id; id <= p.id+pgid(p.overflow); id++ { + // Verify that page is not already free. + if f.cache[id] { + panic(fmt.Sprintf("page %d already freed", id)) + } + // Add to the freelist and cache. + txp.ids = append(txp.ids, id) + txp.alloctx = append(txp.alloctx, allocTxid) + f.cache[id] = true + } +} + +// release moves all page ids for a transaction id (or older) to the freelist. +func (f *freelist) release(txid txid) { + m := make(pgids, 0) + for tid, txp := range f.pending { + if tid <= txid { + // Move transaction's pending pages to the available freelist. + // Don't remove from the cache since the page is still free. + m = append(m, txp.ids...) + delete(f.pending, tid) + } + } + sort.Sort(m) + f.ids = pgids(f.ids).merge(m) +} + +// releaseRange moves pending pages allocated within an extent [begin,end] to the free list. +func (f *freelist) releaseRange(begin, end txid) { + if begin > end { + return + } + var m pgids + for tid, txp := range f.pending { + if tid < begin || tid > end { + continue + } + // Don't recompute freed pages if ranges haven't updated. + if txp.lastReleaseBegin == begin { + continue + } + for i := 0; i < len(txp.ids); i++ { + if atx := txp.alloctx[i]; atx < begin || atx > end { + continue + } + m = append(m, txp.ids[i]) + txp.ids[i] = txp.ids[len(txp.ids)-1] + txp.ids = txp.ids[:len(txp.ids)-1] + txp.alloctx[i] = txp.alloctx[len(txp.alloctx)-1] + txp.alloctx = txp.alloctx[:len(txp.alloctx)-1] + i-- + } + txp.lastReleaseBegin = begin + if len(txp.ids) == 0 { + delete(f.pending, tid) + } + } + sort.Sort(m) + f.ids = pgids(f.ids).merge(m) +} + +// rollback removes the pages from a given pending tx. +func (f *freelist) rollback(txid txid) { + // Remove page ids from cache. + txp := f.pending[txid] + if txp == nil { + return + } + var m pgids + for i, pgid := range txp.ids { + delete(f.cache, pgid) + tx := txp.alloctx[i] + if tx == 0 { + continue + } + if tx != txid { + // Pending free aborted; restore page back to alloc list. + f.allocs[pgid] = tx + } else { + // Freed page was allocated by this txn; OK to throw away. + m = append(m, pgid) + } + } + // Remove pages from pending list and mark as free if allocated by txid. + delete(f.pending, txid) + sort.Sort(m) + f.ids = pgids(f.ids).merge(m) +} + +// freed returns whether a given page is in the free list. +func (f *freelist) freed(pgid pgid) bool { + return f.cache[pgid] +} + +// read initializes the freelist from a freelist page. +func (f *freelist) read(p *page) { + if (p.flags & freelistPageFlag) == 0 { + panic(fmt.Sprintf("invalid freelist page: %d, page type is %s", p.id, p.typ())) + } + // If the page.count is at the max uint16 value (64k) then it's considered + // an overflow and the size of the freelist is stored as the first element. + idx, count := 0, int(p.count) + if count == 0xFFFF { + idx = 1 + count = int(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0]) + } + + // Copy the list of page ids from the freelist. + if count == 0 { + f.ids = nil + } else { + ids := ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[idx : idx+count] + f.ids = make([]pgid, len(ids)) + copy(f.ids, ids) + + // Make sure they're sorted. + sort.Sort(pgids(f.ids)) + } + + // Rebuild the page cache. + f.reindex() +} + +// read initializes the freelist from a given list of ids. +func (f *freelist) readIDs(ids []pgid) { + f.ids = ids + f.reindex() +} + +// write writes the page ids onto a freelist page. All free and pending ids are +// saved to disk since in the event of a program crash, all pending ids will +// become free. +func (f *freelist) write(p *page) error { + // Combine the old free pgids and pgids waiting on an open transaction. + + // Update the header flag. + p.flags |= freelistPageFlag + + // The page.count can only hold up to 64k elements so if we overflow that + // number then we handle it by putting the size in the first element. + lenids := f.count() + if lenids == 0 { + p.count = uint16(lenids) + } else if lenids < 0xFFFF { + p.count = uint16(lenids) + f.copyall(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:]) + } else { + p.count = 0xFFFF + ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0] = pgid(lenids) + f.copyall(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[1:]) + } + + return nil +} + +// reload reads the freelist from a page and filters out pending items. +func (f *freelist) reload(p *page) { + f.read(p) + + // Build a cache of only pending pages. + pcache := make(map[pgid]bool) + for _, txp := range f.pending { + for _, pendingID := range txp.ids { + pcache[pendingID] = true + } + } + + // Check each page in the freelist and build a new available freelist + // with any pages not in the pending lists. + var a []pgid + for _, id := range f.ids { + if !pcache[id] { + a = append(a, id) + } + } + f.ids = a + + // Once the available list is rebuilt then rebuild the free cache so that + // it includes the available and pending free pages. + f.reindex() +} + +// reindex rebuilds the free cache based on available and pending free lists. +func (f *freelist) reindex() { + f.cache = make(map[pgid]bool, len(f.ids)) + for _, id := range f.ids { + f.cache[id] = true + } + for _, txp := range f.pending { + for _, pendingID := range txp.ids { + f.cache[pendingID] = true + } + } +} diff --git a/deps/github.com/coreos/bbolt/node.go b/deps/github.com/coreos/bbolt/node.go new file mode 100644 index 000000000..f4ce240ed --- /dev/null +++ b/deps/github.com/coreos/bbolt/node.go @@ -0,0 +1,604 @@ +package bolt + +import ( + "bytes" + "fmt" + "sort" + "unsafe" +) + +// node represents an in-memory, deserialized page. +type node struct { + bucket *Bucket + isLeaf bool + unbalanced bool + spilled bool + key []byte + pgid pgid + parent *node + children nodes + inodes inodes +} + +// root returns the top-level node this node is attached to. +func (n *node) root() *node { + if n.parent == nil { + return n + } + return n.parent.root() +} + +// minKeys returns the minimum number of inodes this node should have. +func (n *node) minKeys() int { + if n.isLeaf { + return 1 + } + return 2 +} + +// size returns the size of the node after serialization. +func (n *node) size() int { + sz, elsz := pageHeaderSize, n.pageElementSize() + for i := 0; i < len(n.inodes); i++ { + item := &n.inodes[i] + sz += elsz + len(item.key) + len(item.value) + } + return sz +} + +// sizeLessThan returns true if the node is less than a given size. +// This is an optimization to avoid calculating a large node when we only need +// to know if it fits inside a certain page size. +func (n *node) sizeLessThan(v int) bool { + sz, elsz := pageHeaderSize, n.pageElementSize() + for i := 0; i < len(n.inodes); i++ { + item := &n.inodes[i] + sz += elsz + len(item.key) + len(item.value) + if sz >= v { + return false + } + } + return true +} + +// pageElementSize returns the size of each page element based on the type of node. +func (n *node) pageElementSize() int { + if n.isLeaf { + return leafPageElementSize + } + return branchPageElementSize +} + +// childAt returns the child node at a given index. +func (n *node) childAt(index int) *node { + if n.isLeaf { + panic(fmt.Sprintf("invalid childAt(%d) on a leaf node", index)) + } + return n.bucket.node(n.inodes[index].pgid, n) +} + +// childIndex returns the index of a given child node. +func (n *node) childIndex(child *node) int { + index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].key, child.key) != -1 }) + return index +} + +// numChildren returns the number of children. +func (n *node) numChildren() int { + return len(n.inodes) +} + +// nextSibling returns the next node with the same parent. +func (n *node) nextSibling() *node { + if n.parent == nil { + return nil + } + index := n.parent.childIndex(n) + if index >= n.parent.numChildren()-1 { + return nil + } + return n.parent.childAt(index + 1) +} + +// prevSibling returns the previous node with the same parent. +func (n *node) prevSibling() *node { + if n.parent == nil { + return nil + } + index := n.parent.childIndex(n) + if index == 0 { + return nil + } + return n.parent.childAt(index - 1) +} + +// put inserts a key/value. +func (n *node) put(oldKey, newKey, value []byte, pgid pgid, flags uint32) { + if pgid >= n.bucket.tx.meta.pgid { + panic(fmt.Sprintf("pgid (%d) above high water mark (%d)", pgid, n.bucket.tx.meta.pgid)) + } else if len(oldKey) <= 0 { + panic("put: zero-length old key") + } else if len(newKey) <= 0 { + panic("put: zero-length new key") + } + + // Find insertion index. + index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].key, oldKey) != -1 }) + + // Add capacity and shift nodes if we don't have an exact match and need to insert. + exact := (len(n.inodes) > 0 && index < len(n.inodes) && bytes.Equal(n.inodes[index].key, oldKey)) + if !exact { + n.inodes = append(n.inodes, inode{}) + copy(n.inodes[index+1:], n.inodes[index:]) + } + + inode := &n.inodes[index] + inode.flags = flags + inode.key = newKey + inode.value = value + inode.pgid = pgid + _assert(len(inode.key) > 0, "put: zero-length inode key") +} + +// del removes a key from the node. +func (n *node) del(key []byte) { + // Find index of key. + index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].key, key) != -1 }) + + // Exit if the key isn't found. + if index >= len(n.inodes) || !bytes.Equal(n.inodes[index].key, key) { + return + } + + // Delete inode from the node. + n.inodes = append(n.inodes[:index], n.inodes[index+1:]...) + + // Mark the node as needing rebalancing. + n.unbalanced = true +} + +// read initializes the node from a page. +func (n *node) read(p *page) { + n.pgid = p.id + n.isLeaf = ((p.flags & leafPageFlag) != 0) + n.inodes = make(inodes, int(p.count)) + + for i := 0; i < int(p.count); i++ { + inode := &n.inodes[i] + if n.isLeaf { + elem := p.leafPageElement(uint16(i)) + inode.flags = elem.flags + inode.key = elem.key() + inode.value = elem.value() + } else { + elem := p.branchPageElement(uint16(i)) + inode.pgid = elem.pgid + inode.key = elem.key() + } + _assert(len(inode.key) > 0, "read: zero-length inode key") + } + + // Save first key so we can find the node in the parent when we spill. + if len(n.inodes) > 0 { + n.key = n.inodes[0].key + _assert(len(n.key) > 0, "read: zero-length node key") + } else { + n.key = nil + } +} + +// write writes the items onto one or more pages. +func (n *node) write(p *page) { + // Initialize page. + if n.isLeaf { + p.flags |= leafPageFlag + } else { + p.flags |= branchPageFlag + } + + if len(n.inodes) >= 0xFFFF { + panic(fmt.Sprintf("inode overflow: %d (pgid=%d)", len(n.inodes), p.id)) + } + p.count = uint16(len(n.inodes)) + + // Stop here if there are no items to write. + if p.count == 0 { + return + } + + // Loop over each item and write it to the page. + b := (*[maxAllocSize]byte)(unsafe.Pointer(&p.ptr))[n.pageElementSize()*len(n.inodes):] + for i, item := range n.inodes { + _assert(len(item.key) > 0, "write: zero-length inode key") + + // Write the page element. + if n.isLeaf { + elem := p.leafPageElement(uint16(i)) + elem.pos = uint32(uintptr(unsafe.Pointer(&b[0])) - uintptr(unsafe.Pointer(elem))) + elem.flags = item.flags + elem.ksize = uint32(len(item.key)) + elem.vsize = uint32(len(item.value)) + } else { + elem := p.branchPageElement(uint16(i)) + elem.pos = uint32(uintptr(unsafe.Pointer(&b[0])) - uintptr(unsafe.Pointer(elem))) + elem.ksize = uint32(len(item.key)) + elem.pgid = item.pgid + _assert(elem.pgid != p.id, "write: circular dependency occurred") + } + + // If the length of key+value is larger than the max allocation size + // then we need to reallocate the byte array pointer. + // + // See: https://github.com/boltdb/bolt/pull/335 + klen, vlen := len(item.key), len(item.value) + if len(b) < klen+vlen { + b = (*[maxAllocSize]byte)(unsafe.Pointer(&b[0]))[:] + } + + // Write data for the element to the end of the page. + copy(b[0:], item.key) + b = b[klen:] + copy(b[0:], item.value) + b = b[vlen:] + } + + // DEBUG ONLY: n.dump() +} + +// split breaks up a node into multiple smaller nodes, if appropriate. +// This should only be called from the spill() function. +func (n *node) split(pageSize int) []*node { + var nodes []*node + + node := n + for { + // Split node into two. + a, b := node.splitTwo(pageSize) + nodes = append(nodes, a) + + // If we can't split then exit the loop. + if b == nil { + break + } + + // Set node to b so it gets split on the next iteration. + node = b + } + + return nodes +} + +// splitTwo breaks up a node into two smaller nodes, if appropriate. +// This should only be called from the split() function. +func (n *node) splitTwo(pageSize int) (*node, *node) { + // Ignore the split if the page doesn't have at least enough nodes for + // two pages or if the nodes can fit in a single page. + if len(n.inodes) <= (minKeysPerPage*2) || n.sizeLessThan(pageSize) { + return n, nil + } + + // Determine the threshold before starting a new node. + var fillPercent = n.bucket.FillPercent + if fillPercent < minFillPercent { + fillPercent = minFillPercent + } else if fillPercent > maxFillPercent { + fillPercent = maxFillPercent + } + threshold := int(float64(pageSize) * fillPercent) + + // Determine split position and sizes of the two pages. + splitIndex, _ := n.splitIndex(threshold) + + // Split node into two separate nodes. + // If there's no parent then we'll need to create one. + if n.parent == nil { + n.parent = &node{bucket: n.bucket, children: []*node{n}} + } + + // Create a new node and add it to the parent. + next := &node{bucket: n.bucket, isLeaf: n.isLeaf, parent: n.parent} + n.parent.children = append(n.parent.children, next) + + // Split inodes across two nodes. + next.inodes = n.inodes[splitIndex:] + n.inodes = n.inodes[:splitIndex] + + // Update the statistics. + n.bucket.tx.stats.Split++ + + return n, next +} + +// splitIndex finds the position where a page will fill a given threshold. +// It returns the index as well as the size of the first page. +// This is only be called from split(). +func (n *node) splitIndex(threshold int) (index, sz int) { + sz = pageHeaderSize + + // Loop until we only have the minimum number of keys required for the second page. + for i := 0; i < len(n.inodes)-minKeysPerPage; i++ { + index = i + inode := n.inodes[i] + elsize := n.pageElementSize() + len(inode.key) + len(inode.value) + + // If we have at least the minimum number of keys and adding another + // node would put us over the threshold then exit and return. + if i >= minKeysPerPage && sz+elsize > threshold { + break + } + + // Add the element size to the total size. + sz += elsize + } + + return +} + +// spill writes the nodes to dirty pages and splits nodes as it goes. +// Returns an error if dirty pages cannot be allocated. +func (n *node) spill() error { + var tx = n.bucket.tx + if n.spilled { + return nil + } + + // Spill child nodes first. Child nodes can materialize sibling nodes in + // the case of split-merge so we cannot use a range loop. We have to check + // the children size on every loop iteration. + sort.Sort(n.children) + for i := 0; i < len(n.children); i++ { + if err := n.children[i].spill(); err != nil { + return err + } + } + + // We no longer need the child list because it's only used for spill tracking. + n.children = nil + + // Split nodes into appropriate sizes. The first node will always be n. + var nodes = n.split(tx.db.pageSize) + for _, node := range nodes { + // Add node's page to the freelist if it's not new. + if node.pgid > 0 { + tx.db.freelist.free(tx.meta.txid, tx.page(node.pgid)) + node.pgid = 0 + } + + // Allocate contiguous space for the node. + p, err := tx.allocate((node.size() + tx.db.pageSize - 1) / tx.db.pageSize) + if err != nil { + return err + } + + // Write the node. + if p.id >= tx.meta.pgid { + panic(fmt.Sprintf("pgid (%d) above high water mark (%d)", p.id, tx.meta.pgid)) + } + node.pgid = p.id + node.write(p) + node.spilled = true + + // Insert into parent inodes. + if node.parent != nil { + var key = node.key + if key == nil { + key = node.inodes[0].key + } + + node.parent.put(key, node.inodes[0].key, nil, node.pgid, 0) + node.key = node.inodes[0].key + _assert(len(node.key) > 0, "spill: zero-length node key") + } + + // Update the statistics. + tx.stats.Spill++ + } + + // If the root node split and created a new root then we need to spill that + // as well. We'll clear out the children to make sure it doesn't try to respill. + if n.parent != nil && n.parent.pgid == 0 { + n.children = nil + return n.parent.spill() + } + + return nil +} + +// rebalance attempts to combine the node with sibling nodes if the node fill +// size is below a threshold or if there are not enough keys. +func (n *node) rebalance() { + if !n.unbalanced { + return + } + n.unbalanced = false + + // Update statistics. + n.bucket.tx.stats.Rebalance++ + + // Ignore if node is above threshold (25%) and has enough keys. + var threshold = n.bucket.tx.db.pageSize / 4 + if n.size() > threshold && len(n.inodes) > n.minKeys() { + return + } + + // Root node has special handling. + if n.parent == nil { + // If root node is a branch and only has one node then collapse it. + if !n.isLeaf && len(n.inodes) == 1 { + // Move root's child up. + child := n.bucket.node(n.inodes[0].pgid, n) + n.isLeaf = child.isLeaf + n.inodes = child.inodes[:] + n.children = child.children + + // Reparent all child nodes being moved. + for _, inode := range n.inodes { + if child, ok := n.bucket.nodes[inode.pgid]; ok { + child.parent = n + } + } + + // Remove old child. + child.parent = nil + delete(n.bucket.nodes, child.pgid) + child.free() + } + + return + } + + // If node has no keys then just remove it. + if n.numChildren() == 0 { + n.parent.del(n.key) + n.parent.removeChild(n) + delete(n.bucket.nodes, n.pgid) + n.free() + n.parent.rebalance() + return + } + + _assert(n.parent.numChildren() > 1, "parent must have at least 2 children") + + // Destination node is right sibling if idx == 0, otherwise left sibling. + var target *node + var useNextSibling = (n.parent.childIndex(n) == 0) + if useNextSibling { + target = n.nextSibling() + } else { + target = n.prevSibling() + } + + // If both this node and the target node are too small then merge them. + if useNextSibling { + // Reparent all child nodes being moved. + for _, inode := range target.inodes { + if child, ok := n.bucket.nodes[inode.pgid]; ok { + child.parent.removeChild(child) + child.parent = n + child.parent.children = append(child.parent.children, child) + } + } + + // Copy over inodes from target and remove target. + n.inodes = append(n.inodes, target.inodes...) + n.parent.del(target.key) + n.parent.removeChild(target) + delete(n.bucket.nodes, target.pgid) + target.free() + } else { + // Reparent all child nodes being moved. + for _, inode := range n.inodes { + if child, ok := n.bucket.nodes[inode.pgid]; ok { + child.parent.removeChild(child) + child.parent = target + child.parent.children = append(child.parent.children, child) + } + } + + // Copy over inodes to target and remove node. + target.inodes = append(target.inodes, n.inodes...) + n.parent.del(n.key) + n.parent.removeChild(n) + delete(n.bucket.nodes, n.pgid) + n.free() + } + + // Either this node or the target node was deleted from the parent so rebalance it. + n.parent.rebalance() +} + +// removes a node from the list of in-memory children. +// This does not affect the inodes. +func (n *node) removeChild(target *node) { + for i, child := range n.children { + if child == target { + n.children = append(n.children[:i], n.children[i+1:]...) + return + } + } +} + +// dereference causes the node to copy all its inode key/value references to heap memory. +// This is required when the mmap is reallocated so inodes are not pointing to stale data. +func (n *node) dereference() { + if n.key != nil { + key := make([]byte, len(n.key)) + copy(key, n.key) + n.key = key + _assert(n.pgid == 0 || len(n.key) > 0, "dereference: zero-length node key on existing node") + } + + for i := range n.inodes { + inode := &n.inodes[i] + + key := make([]byte, len(inode.key)) + copy(key, inode.key) + inode.key = key + _assert(len(inode.key) > 0, "dereference: zero-length inode key") + + value := make([]byte, len(inode.value)) + copy(value, inode.value) + inode.value = value + } + + // Recursively dereference children. + for _, child := range n.children { + child.dereference() + } + + // Update statistics. + n.bucket.tx.stats.NodeDeref++ +} + +// free adds the node's underlying page to the freelist. +func (n *node) free() { + if n.pgid != 0 { + n.bucket.tx.db.freelist.free(n.bucket.tx.meta.txid, n.bucket.tx.page(n.pgid)) + n.pgid = 0 + } +} + +// dump writes the contents of the node to STDERR for debugging purposes. +/* +func (n *node) dump() { + // Write node header. + var typ = "branch" + if n.isLeaf { + typ = "leaf" + } + warnf("[NODE %d {type=%s count=%d}]", n.pgid, typ, len(n.inodes)) + + // Write out abbreviated version of each item. + for _, item := range n.inodes { + if n.isLeaf { + if item.flags&bucketLeafFlag != 0 { + bucket := (*bucket)(unsafe.Pointer(&item.value[0])) + warnf("+L %08x -> (bucket root=%d)", trunc(item.key, 4), bucket.root) + } else { + warnf("+L %08x -> %08x", trunc(item.key, 4), trunc(item.value, 4)) + } + } else { + warnf("+B %08x -> pgid=%d", trunc(item.key, 4), item.pgid) + } + } + warn("") +} +*/ + +type nodes []*node + +func (s nodes) Len() int { return len(s) } +func (s nodes) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s nodes) Less(i, j int) bool { return bytes.Compare(s[i].inodes[0].key, s[j].inodes[0].key) == -1 } + +// inode represents an internal node inside of a node. +// It can be used to point to elements in a page or point +// to an element which hasn't been added to a page yet. +type inode struct { + flags uint32 + pgid pgid + key []byte + value []byte +} + +type inodes []inode diff --git a/deps/github.com/coreos/bbolt/page.go b/deps/github.com/coreos/bbolt/page.go new file mode 100644 index 000000000..cde403ae8 --- /dev/null +++ b/deps/github.com/coreos/bbolt/page.go @@ -0,0 +1,197 @@ +package bolt + +import ( + "fmt" + "os" + "sort" + "unsafe" +) + +const pageHeaderSize = int(unsafe.Offsetof(((*page)(nil)).ptr)) + +const minKeysPerPage = 2 + +const branchPageElementSize = int(unsafe.Sizeof(branchPageElement{})) +const leafPageElementSize = int(unsafe.Sizeof(leafPageElement{})) + +const ( + branchPageFlag = 0x01 + leafPageFlag = 0x02 + metaPageFlag = 0x04 + freelistPageFlag = 0x10 +) + +const ( + bucketLeafFlag = 0x01 +) + +type pgid uint64 + +type page struct { + id pgid + flags uint16 + count uint16 + overflow uint32 + ptr uintptr +} + +// typ returns a human readable page type string used for debugging. +func (p *page) typ() string { + if (p.flags & branchPageFlag) != 0 { + return "branch" + } else if (p.flags & leafPageFlag) != 0 { + return "leaf" + } else if (p.flags & metaPageFlag) != 0 { + return "meta" + } else if (p.flags & freelistPageFlag) != 0 { + return "freelist" + } + return fmt.Sprintf("unknown<%02x>", p.flags) +} + +// meta returns a pointer to the metadata section of the page. +func (p *page) meta() *meta { + return (*meta)(unsafe.Pointer(&p.ptr)) +} + +// leafPageElement retrieves the leaf node by index +func (p *page) leafPageElement(index uint16) *leafPageElement { + n := &((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[index] + return n +} + +// leafPageElements retrieves a list of leaf nodes. +func (p *page) leafPageElements() []leafPageElement { + if p.count == 0 { + return nil + } + return ((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[:] +} + +// branchPageElement retrieves the branch node by index +func (p *page) branchPageElement(index uint16) *branchPageElement { + return &((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[index] +} + +// branchPageElements retrieves a list of branch nodes. +func (p *page) branchPageElements() []branchPageElement { + if p.count == 0 { + return nil + } + return ((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[:] +} + +// dump writes n bytes of the page to STDERR as hex output. +func (p *page) hexdump(n int) { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:n] + fmt.Fprintf(os.Stderr, "%x\n", buf) +} + +type pages []*page + +func (s pages) Len() int { return len(s) } +func (s pages) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s pages) Less(i, j int) bool { return s[i].id < s[j].id } + +// branchPageElement represents a node on a branch page. +type branchPageElement struct { + pos uint32 + ksize uint32 + pgid pgid +} + +// key returns a byte slice of the node key. +func (n *branchPageElement) key() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize] +} + +// leafPageElement represents a node on a leaf page. +type leafPageElement struct { + flags uint32 + pos uint32 + ksize uint32 + vsize uint32 +} + +// key returns a byte slice of the node key. +func (n *leafPageElement) key() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize:n.ksize] +} + +// value returns a byte slice of the node value. +func (n *leafPageElement) value() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos+n.ksize]))[:n.vsize:n.vsize] +} + +// PageInfo represents human readable information about a page. +type PageInfo struct { + ID int + Type string + Count int + OverflowCount int +} + +type pgids []pgid + +func (s pgids) Len() int { return len(s) } +func (s pgids) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s pgids) Less(i, j int) bool { return s[i] < s[j] } + +// merge returns the sorted union of a and b. +func (a pgids) merge(b pgids) pgids { + // Return the opposite slice if one is nil. + if len(a) == 0 { + return b + } + if len(b) == 0 { + return a + } + merged := make(pgids, len(a)+len(b)) + mergepgids(merged, a, b) + return merged +} + +// mergepgids copies the sorted union of a and b into dst. +// If dst is too small, it panics. +func mergepgids(dst, a, b pgids) { + if len(dst) < len(a)+len(b) { + panic(fmt.Errorf("mergepgids bad len %d < %d + %d", len(dst), len(a), len(b))) + } + // Copy in the opposite slice if one is nil. + if len(a) == 0 { + copy(dst, b) + return + } + if len(b) == 0 { + copy(dst, a) + return + } + + // Merged will hold all elements from both lists. + merged := dst[:0] + + // Assign lead to the slice with a lower starting value, follow to the higher value. + lead, follow := a, b + if b[0] < a[0] { + lead, follow = b, a + } + + // Continue while there are elements in the lead. + for len(lead) > 0 { + // Merge largest prefix of lead that is ahead of follow[0]. + n := sort.Search(len(lead), func(i int) bool { return lead[i] > follow[0] }) + merged = append(merged, lead[:n]...) + if n >= len(lead) { + break + } + + // Swap lead and follow. + lead, follow = follow, lead[n:] + } + + // Append what's left in follow. + _ = append(merged, follow...) +} diff --git a/deps/github.com/coreos/bbolt/tx.go b/deps/github.com/coreos/bbolt/tx.go new file mode 100644 index 000000000..5c0290733 --- /dev/null +++ b/deps/github.com/coreos/bbolt/tx.go @@ -0,0 +1,705 @@ +package bolt + +import ( + "fmt" + "io" + "os" + "sort" + "strings" + "time" + "unsafe" +) + +// txid represents the internal transaction identifier. +type txid uint64 + +// Tx represents a read-only or read/write transaction on the database. +// Read-only transactions can be used for retrieving values for keys and creating cursors. +// Read/write transactions can create and remove buckets and create and remove keys. +// +// IMPORTANT: You must commit or rollback transactions when you are done with +// them. Pages can not be reclaimed by the writer until no more transactions +// are using them. A long running read transaction can cause the database to +// quickly grow. +type Tx struct { + writable bool + managed bool + db *DB + meta *meta + root Bucket + pages map[pgid]*page + stats TxStats + commitHandlers []func() + + // WriteFlag specifies the flag for write-related methods like WriteTo(). + // Tx opens the database file with the specified flag to copy the data. + // + // By default, the flag is unset, which works well for mostly in-memory + // workloads. For databases that are much larger than available RAM, + // set the flag to syscall.O_DIRECT to avoid trashing the page cache. + WriteFlag int +} + +// init initializes the transaction. +func (tx *Tx) init(db *DB) { + tx.db = db + tx.pages = nil + + // Copy the meta page since it can be changed by the writer. + tx.meta = &meta{} + db.meta().copy(tx.meta) + + // Copy over the root bucket. + tx.root = newBucket(tx) + tx.root.bucket = &bucket{} + *tx.root.bucket = tx.meta.root + + // Increment the transaction id and add a page cache for writable transactions. + if tx.writable { + tx.pages = make(map[pgid]*page) + tx.meta.txid += txid(1) + } +} + +// ID returns the transaction id. +func (tx *Tx) ID() int { + return int(tx.meta.txid) +} + +// DB returns a reference to the database that created the transaction. +func (tx *Tx) DB() *DB { + return tx.db +} + +// Size returns current database size in bytes as seen by this transaction. +func (tx *Tx) Size() int64 { + return int64(tx.meta.pgid) * int64(tx.db.pageSize) +} + +// Writable returns whether the transaction can perform write operations. +func (tx *Tx) Writable() bool { + return tx.writable +} + +// Cursor creates a cursor associated with the root bucket. +// All items in the cursor will return a nil value because all root bucket keys point to buckets. +// The cursor is only valid as long as the transaction is open. +// Do not use a cursor after the transaction is closed. +func (tx *Tx) Cursor() *Cursor { + return tx.root.Cursor() +} + +// Stats retrieves a copy of the current transaction statistics. +func (tx *Tx) Stats() TxStats { + return tx.stats +} + +// Bucket retrieves a bucket by name. +// Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. +func (tx *Tx) Bucket(name []byte) *Bucket { + return tx.root.Bucket(name) +} + +// CreateBucket creates a new bucket. +// Returns an error if the bucket already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) { + return tx.root.CreateBucket(name) +} + +// CreateBucketIfNotExists creates a new bucket if it doesn't already exist. +// Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) { + return tx.root.CreateBucketIfNotExists(name) +} + +// DeleteBucket deletes a bucket. +// Returns an error if the bucket cannot be found or if the key represents a non-bucket value. +func (tx *Tx) DeleteBucket(name []byte) error { + return tx.root.DeleteBucket(name) +} + +// ForEach executes a function for each bucket in the root. +// If the provided function returns an error then the iteration is stopped and +// the error is returned to the caller. +func (tx *Tx) ForEach(fn func(name []byte, b *Bucket) error) error { + return tx.root.ForEach(func(k, v []byte) error { + return fn(k, tx.root.Bucket(k)) + }) +} + +// OnCommit adds a handler function to be executed after the transaction successfully commits. +func (tx *Tx) OnCommit(fn func()) { + tx.commitHandlers = append(tx.commitHandlers, fn) +} + +// Commit writes all changes to disk and updates the meta page. +// Returns an error if a disk write error occurs, or if Commit is +// called on a read-only transaction. +func (tx *Tx) Commit() error { + _assert(!tx.managed, "managed tx commit not allowed") + if tx.db == nil { + return ErrTxClosed + } else if !tx.writable { + return ErrTxNotWritable + } + + // TODO(benbjohnson): Use vectorized I/O to write out dirty pages. + + // Rebalance nodes which have had deletions. + var startTime = time.Now() + tx.root.rebalance() + if tx.stats.Rebalance > 0 { + tx.stats.RebalanceTime += time.Since(startTime) + } + + // spill data onto dirty pages. + startTime = time.Now() + if err := tx.root.spill(); err != nil { + tx.rollback() + return err + } + tx.stats.SpillTime += time.Since(startTime) + + // Free the old root bucket. + tx.meta.root.root = tx.root.root + + // Free the old freelist because commit writes out a fresh freelist. + if tx.meta.freelist != pgidNoFreelist { + tx.db.freelist.free(tx.meta.txid, tx.db.page(tx.meta.freelist)) + } + + if !tx.db.NoFreelistSync { + err := tx.commitFreelist() + if err != nil { + return err + } + } else { + tx.meta.freelist = pgidNoFreelist + } + + // Write dirty pages to disk. + startTime = time.Now() + if err := tx.write(); err != nil { + tx.rollback() + return err + } + + // If strict mode is enabled then perform a consistency check. + // Only the first consistency error is reported in the panic. + if tx.db.StrictMode { + ch := tx.Check() + var errs []string + for { + err, ok := <-ch + if !ok { + break + } + errs = append(errs, err.Error()) + } + if len(errs) > 0 { + panic("check fail: " + strings.Join(errs, "\n")) + } + } + + // Write meta to disk. + if err := tx.writeMeta(); err != nil { + tx.rollback() + return err + } + tx.stats.WriteTime += time.Since(startTime) + + // Finalize the transaction. + tx.close() + + // Execute commit handlers now that the locks have been removed. + for _, fn := range tx.commitHandlers { + fn() + } + + return nil +} + +func (tx *Tx) commitFreelist() error { + // Allocate new pages for the new free list. This will overestimate + // the size of the freelist but not underestimate the size (which would be bad). + opgid := tx.meta.pgid + p, err := tx.allocate((tx.db.freelist.size() / tx.db.pageSize) + 1) + if err != nil { + tx.rollback() + return err + } + if err := tx.db.freelist.write(p); err != nil { + tx.rollback() + return err + } + tx.meta.freelist = p.id + // If the high water mark has moved up then attempt to grow the database. + if tx.meta.pgid > opgid { + if err := tx.db.grow(int(tx.meta.pgid+1) * tx.db.pageSize); err != nil { + tx.rollback() + return err + } + } + + return nil +} + +// Rollback closes the transaction and ignores all previous updates. Read-only +// transactions must be rolled back and not committed. +func (tx *Tx) Rollback() error { + _assert(!tx.managed, "managed tx rollback not allowed") + if tx.db == nil { + return ErrTxClosed + } + tx.rollback() + return nil +} + +func (tx *Tx) rollback() { + if tx.db == nil { + return + } + if tx.writable { + tx.db.freelist.rollback(tx.meta.txid) + tx.db.freelist.reload(tx.db.page(tx.db.meta().freelist)) + } + tx.close() +} + +func (tx *Tx) close() { + if tx.db == nil { + return + } + if tx.writable { + // Grab freelist stats. + var freelistFreeN = tx.db.freelist.free_count() + var freelistPendingN = tx.db.freelist.pending_count() + var freelistAlloc = tx.db.freelist.size() + + // Remove transaction ref & writer lock. + tx.db.rwtx = nil + tx.db.rwlock.Unlock() + + // Merge statistics. + tx.db.statlock.Lock() + tx.db.stats.FreePageN = freelistFreeN + tx.db.stats.PendingPageN = freelistPendingN + tx.db.stats.FreeAlloc = (freelistFreeN + freelistPendingN) * tx.db.pageSize + tx.db.stats.FreelistInuse = freelistAlloc + tx.db.stats.TxStats.add(&tx.stats) + tx.db.statlock.Unlock() + } else { + tx.db.removeTx(tx) + } + + // Clear all references. + tx.db = nil + tx.meta = nil + tx.root = Bucket{tx: tx} + tx.pages = nil +} + +// Copy writes the entire database to a writer. +// This function exists for backwards compatibility. Use WriteTo() instead. +func (tx *Tx) Copy(w io.Writer) error { + _, err := tx.WriteTo(w) + return err +} + +// WriteTo writes the entire database to a writer. +// If err == nil then exactly tx.Size() bytes will be written into the writer. +func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) { + // Attempt to open reader with WriteFlag + f, err := os.OpenFile(tx.db.path, os.O_RDONLY|tx.WriteFlag, 0) + if err != nil { + return 0, err + } + defer func() { + if cerr := f.Close(); err == nil { + err = cerr + } + }() + + // Generate a meta page. We use the same page data for both meta pages. + buf := make([]byte, tx.db.pageSize) + page := (*page)(unsafe.Pointer(&buf[0])) + page.flags = metaPageFlag + *page.meta() = *tx.meta + + // Write meta 0. + page.id = 0 + page.meta().checksum = page.meta().sum64() + nn, err := w.Write(buf) + n += int64(nn) + if err != nil { + return n, fmt.Errorf("meta 0 copy: %s", err) + } + + // Write meta 1 with a lower transaction id. + page.id = 1 + page.meta().txid -= 1 + page.meta().checksum = page.meta().sum64() + nn, err = w.Write(buf) + n += int64(nn) + if err != nil { + return n, fmt.Errorf("meta 1 copy: %s", err) + } + + // Move past the meta pages in the file. + if _, err := f.Seek(int64(tx.db.pageSize*2), io.SeekStart); err != nil { + return n, fmt.Errorf("seek: %s", err) + } + + // Copy data pages. + wn, err := io.CopyN(w, f, tx.Size()-int64(tx.db.pageSize*2)) + n += wn + if err != nil { + return n, err + } + + return n, nil +} + +// CopyFile copies the entire database to file at the given path. +// A reader transaction is maintained during the copy so it is safe to continue +// using the database while a copy is in progress. +func (tx *Tx) CopyFile(path string, mode os.FileMode) error { + f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode) + if err != nil { + return err + } + + err = tx.Copy(f) + if err != nil { + _ = f.Close() + return err + } + return f.Close() +} + +// Check performs several consistency checks on the database for this transaction. +// An error is returned if any inconsistency is found. +// +// It can be safely run concurrently on a writable transaction. However, this +// incurs a high cost for large databases and databases with a lot of subbuckets +// because of caching. This overhead can be removed if running on a read-only +// transaction, however, it is not safe to execute other writer transactions at +// the same time. +func (tx *Tx) Check() <-chan error { + ch := make(chan error) + go tx.check(ch) + return ch +} + +func (tx *Tx) check(ch chan error) { + // Force loading free list if opened in ReadOnly mode. + tx.db.loadFreelist() + + // Check if any pages are double freed. + freed := make(map[pgid]bool) + all := make([]pgid, tx.db.freelist.count()) + tx.db.freelist.copyall(all) + for _, id := range all { + if freed[id] { + ch <- fmt.Errorf("page %d: already freed", id) + } + freed[id] = true + } + + // Track every reachable page. + reachable := make(map[pgid]*page) + reachable[0] = tx.page(0) // meta0 + reachable[1] = tx.page(1) // meta1 + if tx.meta.freelist != pgidNoFreelist { + for i := uint32(0); i <= tx.page(tx.meta.freelist).overflow; i++ { + reachable[tx.meta.freelist+pgid(i)] = tx.page(tx.meta.freelist) + } + } + + // Recursively check buckets. + tx.checkBucket(&tx.root, reachable, freed, ch) + + // Ensure all pages below high water mark are either reachable or freed. + for i := pgid(0); i < tx.meta.pgid; i++ { + _, isReachable := reachable[i] + if !isReachable && !freed[i] { + ch <- fmt.Errorf("page %d: unreachable unfreed", int(i)) + } + } + + // Close the channel to signal completion. + close(ch) +} + +func (tx *Tx) checkBucket(b *Bucket, reachable map[pgid]*page, freed map[pgid]bool, ch chan error) { + // Ignore inline buckets. + if b.root == 0 { + return + } + + // Check every page used by this bucket. + b.tx.forEachPage(b.root, 0, func(p *page, _ int) { + if p.id > tx.meta.pgid { + ch <- fmt.Errorf("page %d: out of bounds: %d", int(p.id), int(b.tx.meta.pgid)) + } + + // Ensure each page is only referenced once. + for i := pgid(0); i <= pgid(p.overflow); i++ { + var id = p.id + i + if _, ok := reachable[id]; ok { + ch <- fmt.Errorf("page %d: multiple references", int(id)) + } + reachable[id] = p + } + + // We should only encounter un-freed leaf and branch pages. + if freed[p.id] { + ch <- fmt.Errorf("page %d: reachable freed", int(p.id)) + } else if (p.flags&branchPageFlag) == 0 && (p.flags&leafPageFlag) == 0 { + ch <- fmt.Errorf("page %d: invalid type: %s", int(p.id), p.typ()) + } + }) + + // Check each bucket within this bucket. + _ = b.ForEach(func(k, v []byte) error { + if child := b.Bucket(k); child != nil { + tx.checkBucket(child, reachable, freed, ch) + } + return nil + }) +} + +// allocate returns a contiguous block of memory starting at a given page. +func (tx *Tx) allocate(count int) (*page, error) { + p, err := tx.db.allocate(tx.meta.txid, count) + if err != nil { + return nil, err + } + + // Save to our page cache. + tx.pages[p.id] = p + + // Update statistics. + tx.stats.PageCount += count + tx.stats.PageAlloc += count * tx.db.pageSize + + return p, nil +} + +// write writes any dirty pages to disk. +func (tx *Tx) write() error { + // Sort pages by id. + pages := make(pages, 0, len(tx.pages)) + for _, p := range tx.pages { + pages = append(pages, p) + } + // Clear out page cache early. + tx.pages = make(map[pgid]*page) + sort.Sort(pages) + + // Write pages to disk in order. + for _, p := range pages { + size := (int(p.overflow) + 1) * tx.db.pageSize + offset := int64(p.id) * int64(tx.db.pageSize) + + // Write out page in "max allocation" sized chunks. + ptr := (*[maxAllocSize]byte)(unsafe.Pointer(p)) + for { + // Limit our write to our max allocation size. + sz := size + if sz > maxAllocSize-1 { + sz = maxAllocSize - 1 + } + + // Write chunk to disk. + buf := ptr[:sz] + if _, err := tx.db.ops.writeAt(buf, offset); err != nil { + return err + } + + // Update statistics. + tx.stats.Write++ + + // Exit inner for loop if we've written all the chunks. + size -= sz + if size == 0 { + break + } + + // Otherwise move offset forward and move pointer to next chunk. + offset += int64(sz) + ptr = (*[maxAllocSize]byte)(unsafe.Pointer(&ptr[sz])) + } + } + + // Ignore file sync if flag is set on DB. + if !tx.db.NoSync || IgnoreNoSync { + if err := fdatasync(tx.db); err != nil { + return err + } + } + + // Put small pages back to page pool. + for _, p := range pages { + // Ignore page sizes over 1 page. + // These are allocated using make() instead of the page pool. + if int(p.overflow) != 0 { + continue + } + + buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:tx.db.pageSize] + + // See https://go.googlesource.com/go/+/f03c9202c43e0abb130669852082117ca50aa9b1 + for i := range buf { + buf[i] = 0 + } + tx.db.pagePool.Put(buf) + } + + return nil +} + +// writeMeta writes the meta to the disk. +func (tx *Tx) writeMeta() error { + // Create a temporary buffer for the meta page. + buf := make([]byte, tx.db.pageSize) + p := tx.db.pageInBuffer(buf, 0) + tx.meta.write(p) + + // Write the meta page to file. + if _, err := tx.db.ops.writeAt(buf, int64(p.id)*int64(tx.db.pageSize)); err != nil { + return err + } + if !tx.db.NoSync || IgnoreNoSync { + if err := fdatasync(tx.db); err != nil { + return err + } + } + + // Update statistics. + tx.stats.Write++ + + return nil +} + +// page returns a reference to the page with a given id. +// If page has been written to then a temporary buffered page is returned. +func (tx *Tx) page(id pgid) *page { + // Check the dirty pages first. + if tx.pages != nil { + if p, ok := tx.pages[id]; ok { + return p + } + } + + // Otherwise return directly from the mmap. + return tx.db.page(id) +} + +// forEachPage iterates over every page within a given page and executes a function. +func (tx *Tx) forEachPage(pgid pgid, depth int, fn func(*page, int)) { + p := tx.page(pgid) + + // Execute function. + fn(p, depth) + + // Recursively loop over children. + if (p.flags & branchPageFlag) != 0 { + for i := 0; i < int(p.count); i++ { + elem := p.branchPageElement(uint16(i)) + tx.forEachPage(elem.pgid, depth+1, fn) + } + } +} + +// Page returns page information for a given page number. +// This is only safe for concurrent use when used by a writable transaction. +func (tx *Tx) Page(id int) (*PageInfo, error) { + if tx.db == nil { + return nil, ErrTxClosed + } else if pgid(id) >= tx.meta.pgid { + return nil, nil + } + + // Build the page info. + p := tx.db.page(pgid(id)) + info := &PageInfo{ + ID: id, + Count: int(p.count), + OverflowCount: int(p.overflow), + } + + // Determine the type (or if it's free). + if tx.db.freelist.freed(pgid(id)) { + info.Type = "free" + } else { + info.Type = p.typ() + } + + return info, nil +} + +// TxStats represents statistics about the actions performed by the transaction. +type TxStats struct { + // Page statistics. + PageCount int // number of page allocations + PageAlloc int // total bytes allocated + + // Cursor statistics. + CursorCount int // number of cursors created + + // Node statistics + NodeCount int // number of node allocations + NodeDeref int // number of node dereferences + + // Rebalance statistics. + Rebalance int // number of node rebalances + RebalanceTime time.Duration // total time spent rebalancing + + // Split/Spill statistics. + Split int // number of nodes split + Spill int // number of nodes spilled + SpillTime time.Duration // total time spent spilling + + // Write statistics. + Write int // number of writes performed + WriteTime time.Duration // total time spent writing to disk +} + +func (s *TxStats) add(other *TxStats) { + s.PageCount += other.PageCount + s.PageAlloc += other.PageAlloc + s.CursorCount += other.CursorCount + s.NodeCount += other.NodeCount + s.NodeDeref += other.NodeDeref + s.Rebalance += other.Rebalance + s.RebalanceTime += other.RebalanceTime + s.Split += other.Split + s.Spill += other.Spill + s.SpillTime += other.SpillTime + s.Write += other.Write + s.WriteTime += other.WriteTime +} + +// Sub calculates and returns the difference between two sets of transaction stats. +// This is useful when obtaining stats at two different points and time and +// you need the performance counters that occurred within that time span. +func (s *TxStats) Sub(other *TxStats) TxStats { + var diff TxStats + diff.PageCount = s.PageCount - other.PageCount + diff.PageAlloc = s.PageAlloc - other.PageAlloc + diff.CursorCount = s.CursorCount - other.CursorCount + diff.NodeCount = s.NodeCount - other.NodeCount + diff.NodeDeref = s.NodeDeref - other.NodeDeref + diff.Rebalance = s.Rebalance - other.Rebalance + diff.RebalanceTime = s.RebalanceTime - other.RebalanceTime + diff.Split = s.Split - other.Split + diff.Spill = s.Spill - other.Spill + diff.SpillTime = s.SpillTime - other.SpillTime + diff.Write = s.Write - other.Write + diff.WriteTime = s.WriteTime - other.WriteTime + return diff +} diff --git a/deps/github.com/coreos/etcd/alarm/alarms.go b/deps/github.com/coreos/etcd/alarm/alarms.go new file mode 100644 index 000000000..4f0ebe93f --- /dev/null +++ b/deps/github.com/coreos/etcd/alarm/alarms.go @@ -0,0 +1,152 @@ +// 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. + +// Package alarm manages health status alarms in etcd. +package alarm + +import ( + "sync" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/pkg/capnslog" +) + +var ( + alarmBucketName = []byte("alarm") + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "alarm") +) + +type BackendGetter interface { + Backend() backend.Backend +} + +type alarmSet map[types.ID]*pb.AlarmMember + +// AlarmStore persists alarms to the backend. +type AlarmStore struct { + mu sync.Mutex + types map[pb.AlarmType]alarmSet + + bg BackendGetter +} + +func NewAlarmStore(bg BackendGetter) (*AlarmStore, error) { + ret := &AlarmStore{types: make(map[pb.AlarmType]alarmSet), bg: bg} + err := ret.restore() + return ret, err +} + +func (a *AlarmStore) Activate(id types.ID, at pb.AlarmType) *pb.AlarmMember { + a.mu.Lock() + defer a.mu.Unlock() + + newAlarm := &pb.AlarmMember{MemberID: uint64(id), Alarm: at} + if m := a.addToMap(newAlarm); m != newAlarm { + return m + } + + v, err := newAlarm.Marshal() + if err != nil { + plog.Panicf("failed to marshal alarm member") + } + + b := a.bg.Backend() + b.BatchTx().Lock() + b.BatchTx().UnsafePut(alarmBucketName, v, nil) + b.BatchTx().Unlock() + + return newAlarm +} + +func (a *AlarmStore) Deactivate(id types.ID, at pb.AlarmType) *pb.AlarmMember { + a.mu.Lock() + defer a.mu.Unlock() + + t := a.types[at] + if t == nil { + t = make(alarmSet) + a.types[at] = t + } + m := t[id] + if m == nil { + return nil + } + + delete(t, id) + + v, err := m.Marshal() + if err != nil { + plog.Panicf("failed to marshal alarm member") + } + + b := a.bg.Backend() + b.BatchTx().Lock() + b.BatchTx().UnsafeDelete(alarmBucketName, v) + b.BatchTx().Unlock() + + return m +} + +func (a *AlarmStore) Get(at pb.AlarmType) (ret []*pb.AlarmMember) { + a.mu.Lock() + defer a.mu.Unlock() + if at == pb.AlarmType_NONE { + for _, t := range a.types { + for _, m := range t { + ret = append(ret, m) + } + } + return ret + } + for _, m := range a.types[at] { + ret = append(ret, m) + } + return ret +} + +func (a *AlarmStore) restore() error { + b := a.bg.Backend() + tx := b.BatchTx() + + tx.Lock() + tx.UnsafeCreateBucket(alarmBucketName) + err := tx.UnsafeForEach(alarmBucketName, func(k, v []byte) error { + var m pb.AlarmMember + if err := m.Unmarshal(k); err != nil { + return err + } + a.addToMap(&m) + return nil + }) + tx.Unlock() + + b.ForceCommit() + return err +} + +func (a *AlarmStore) addToMap(newAlarm *pb.AlarmMember) *pb.AlarmMember { + t := a.types[newAlarm.Alarm] + if t == nil { + t = make(alarmSet) + a.types[newAlarm.Alarm] = t + } + m := t[types.ID(newAlarm.MemberID)] + if m != nil { + return m + } + t[types.ID(newAlarm.MemberID)] = newAlarm + return newAlarm +} diff --git a/deps/github.com/coreos/etcd/auth/doc.go b/deps/github.com/coreos/etcd/auth/doc.go new file mode 100644 index 000000000..72741a107 --- /dev/null +++ b/deps/github.com/coreos/etcd/auth/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package auth provides client role authentication for accessing keys in etcd. +package auth diff --git a/deps/github.com/coreos/etcd/auth/jwt.go b/deps/github.com/coreos/etcd/auth/jwt.go new file mode 100644 index 000000000..214ae48c8 --- /dev/null +++ b/deps/github.com/coreos/etcd/auth/jwt.go @@ -0,0 +1,137 @@ +// Copyright 2017 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. + +package auth + +import ( + "crypto/rsa" + "io/ioutil" + + jwt "github.com/dgrijalva/jwt-go" + "golang.org/x/net/context" +) + +type tokenJWT struct { + signMethod string + signKey *rsa.PrivateKey + verifyKey *rsa.PublicKey +} + +func (t *tokenJWT) enable() {} +func (t *tokenJWT) disable() {} +func (t *tokenJWT) invalidateUser(string) {} +func (t *tokenJWT) genTokenPrefix() (string, error) { return "", nil } + +func (t *tokenJWT) info(ctx context.Context, token string, rev uint64) (*AuthInfo, bool) { + // rev isn't used in JWT, it is only used in simple token + var ( + username string + revision uint64 + ) + + parsed, err := jwt.Parse(token, func(token *jwt.Token) (interface{}, error) { + return t.verifyKey, nil + }) + + switch err.(type) { + case nil: + if !parsed.Valid { + plog.Warningf("invalid jwt token: %s", token) + return nil, false + } + + claims := parsed.Claims.(jwt.MapClaims) + + username = claims["username"].(string) + revision = uint64(claims["revision"].(float64)) + default: + plog.Warningf("failed to parse jwt token: %s", err) + return nil, false + } + + return &AuthInfo{Username: username, Revision: revision}, true +} + +func (t *tokenJWT) assign(ctx context.Context, username string, revision uint64) (string, error) { + // Future work: let a jwt token include permission information would be useful for + // permission checking in proxy side. + tk := jwt.NewWithClaims(jwt.GetSigningMethod(t.signMethod), + jwt.MapClaims{ + "username": username, + "revision": revision, + }) + + token, err := tk.SignedString(t.signKey) + if err != nil { + plog.Debugf("failed to sign jwt token: %s", err) + return "", err + } + + plog.Debugf("jwt token: %s", token) + + return token, err +} + +func prepareOpts(opts map[string]string) (jwtSignMethod, jwtPubKeyPath, jwtPrivKeyPath string, err error) { + for k, v := range opts { + switch k { + case "sign-method": + jwtSignMethod = v + case "pub-key": + jwtPubKeyPath = v + case "priv-key": + jwtPrivKeyPath = v + default: + plog.Errorf("unknown token specific option: %s", k) + return "", "", "", ErrInvalidAuthOpts + } + } + + return jwtSignMethod, jwtPubKeyPath, jwtPrivKeyPath, nil +} + +func newTokenProviderJWT(opts map[string]string) (*tokenJWT, error) { + jwtSignMethod, jwtPubKeyPath, jwtPrivKeyPath, err := prepareOpts(opts) + if err != nil { + return nil, ErrInvalidAuthOpts + } + + t := &tokenJWT{} + + t.signMethod = jwtSignMethod + + verifyBytes, err := ioutil.ReadFile(jwtPubKeyPath) + if err != nil { + plog.Errorf("failed to read public key (%s) for jwt: %s", jwtPubKeyPath, err) + return nil, err + } + t.verifyKey, err = jwt.ParseRSAPublicKeyFromPEM(verifyBytes) + if err != nil { + plog.Errorf("failed to parse public key (%s): %s", jwtPubKeyPath, err) + return nil, err + } + + signBytes, err := ioutil.ReadFile(jwtPrivKeyPath) + if err != nil { + plog.Errorf("failed to read private key (%s) for jwt: %s", jwtPrivKeyPath, err) + return nil, err + } + t.signKey, err = jwt.ParseRSAPrivateKeyFromPEM(signBytes) + if err != nil { + plog.Errorf("failed to parse private key (%s): %s", jwtPrivKeyPath, err) + return nil, err + } + + return t, nil +} diff --git a/deps/github.com/coreos/etcd/auth/range_perm_cache.go b/deps/github.com/coreos/etcd/auth/range_perm_cache.go new file mode 100644 index 000000000..691b65ba3 --- /dev/null +++ b/deps/github.com/coreos/etcd/auth/range_perm_cache.go @@ -0,0 +1,133 @@ +// 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. + +package auth + +import ( + "github.com/coreos/etcd/auth/authpb" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/pkg/adt" +) + +func getMergedPerms(tx backend.BatchTx, userName string) *unifiedRangePermissions { + user := getUser(tx, userName) + if user == nil { + plog.Errorf("invalid user name %s", userName) + return nil + } + + readPerms := &adt.IntervalTree{} + writePerms := &adt.IntervalTree{} + + for _, roleName := range user.Roles { + role := getRole(tx, roleName) + if role == nil { + continue + } + + for _, perm := range role.KeyPermission { + var ivl adt.Interval + var rangeEnd []byte + + if len(perm.RangeEnd) != 1 || perm.RangeEnd[0] != 0 { + rangeEnd = perm.RangeEnd + } + + if len(perm.RangeEnd) != 0 { + ivl = adt.NewBytesAffineInterval(perm.Key, rangeEnd) + } else { + ivl = adt.NewBytesAffinePoint(perm.Key) + } + + switch perm.PermType { + case authpb.READWRITE: + readPerms.Insert(ivl, struct{}{}) + writePerms.Insert(ivl, struct{}{}) + + case authpb.READ: + readPerms.Insert(ivl, struct{}{}) + + case authpb.WRITE: + writePerms.Insert(ivl, struct{}{}) + } + } + } + + return &unifiedRangePermissions{ + readPerms: readPerms, + writePerms: writePerms, + } +} + +func checkKeyInterval(cachedPerms *unifiedRangePermissions, key, rangeEnd []byte, permtyp authpb.Permission_Type) bool { + if len(rangeEnd) == 1 && rangeEnd[0] == 0 { + rangeEnd = nil + } + + ivl := adt.NewBytesAffineInterval(key, rangeEnd) + switch permtyp { + case authpb.READ: + return cachedPerms.readPerms.Contains(ivl) + case authpb.WRITE: + return cachedPerms.writePerms.Contains(ivl) + default: + plog.Panicf("unknown auth type: %v", permtyp) + } + return false +} + +func checkKeyPoint(cachedPerms *unifiedRangePermissions, key []byte, permtyp authpb.Permission_Type) bool { + pt := adt.NewBytesAffinePoint(key) + switch permtyp { + case authpb.READ: + return cachedPerms.readPerms.Intersects(pt) + case authpb.WRITE: + return cachedPerms.writePerms.Intersects(pt) + default: + plog.Panicf("unknown auth type: %v", permtyp) + } + return false +} + +func (as *authStore) isRangeOpPermitted(tx backend.BatchTx, userName string, key, rangeEnd []byte, permtyp authpb.Permission_Type) bool { + // assumption: tx is Lock()ed + _, ok := as.rangePermCache[userName] + if !ok { + perms := getMergedPerms(tx, userName) + if perms == nil { + plog.Errorf("failed to create a unified permission of user %s", userName) + return false + } + as.rangePermCache[userName] = perms + } + + if len(rangeEnd) == 0 { + return checkKeyPoint(as.rangePermCache[userName], key, permtyp) + } + + return checkKeyInterval(as.rangePermCache[userName], key, rangeEnd, permtyp) +} + +func (as *authStore) clearCachedPerm() { + as.rangePermCache = make(map[string]*unifiedRangePermissions) +} + +func (as *authStore) invalidateCachedPerm(userName string) { + delete(as.rangePermCache, userName) +} + +type unifiedRangePermissions struct { + readPerms *adt.IntervalTree + writePerms *adt.IntervalTree +} diff --git a/deps/github.com/coreos/etcd/auth/simple_token.go b/deps/github.com/coreos/etcd/auth/simple_token.go new file mode 100644 index 000000000..94d92a115 --- /dev/null +++ b/deps/github.com/coreos/etcd/auth/simple_token.go @@ -0,0 +1,220 @@ +// 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. + +package auth + +// CAUTION: This randum number based token mechanism is only for testing purpose. +// JWT based mechanism will be added in the near future. + +import ( + "crypto/rand" + "fmt" + "math/big" + "strconv" + "strings" + "sync" + "time" + + "golang.org/x/net/context" +) + +const ( + letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" + defaultSimpleTokenLength = 16 +) + +// var for testing purposes +var ( + simpleTokenTTL = 5 * time.Minute + simpleTokenTTLResolution = 1 * time.Second +) + +type simpleTokenTTLKeeper struct { + tokens map[string]time.Time + donec chan struct{} + stopc chan struct{} + deleteTokenFunc func(string) + mu *sync.Mutex +} + +func (tm *simpleTokenTTLKeeper) stop() { + select { + case tm.stopc <- struct{}{}: + case <-tm.donec: + } + <-tm.donec +} + +func (tm *simpleTokenTTLKeeper) addSimpleToken(token string) { + tm.tokens[token] = time.Now().Add(simpleTokenTTL) +} + +func (tm *simpleTokenTTLKeeper) resetSimpleToken(token string) { + if _, ok := tm.tokens[token]; ok { + tm.tokens[token] = time.Now().Add(simpleTokenTTL) + } +} + +func (tm *simpleTokenTTLKeeper) deleteSimpleToken(token string) { + delete(tm.tokens, token) +} + +func (tm *simpleTokenTTLKeeper) run() { + tokenTicker := time.NewTicker(simpleTokenTTLResolution) + defer func() { + tokenTicker.Stop() + close(tm.donec) + }() + for { + select { + case <-tokenTicker.C: + nowtime := time.Now() + tm.mu.Lock() + for t, tokenendtime := range tm.tokens { + if nowtime.After(tokenendtime) { + tm.deleteTokenFunc(t) + delete(tm.tokens, t) + } + } + tm.mu.Unlock() + case <-tm.stopc: + return + } + } +} + +type tokenSimple struct { + indexWaiter func(uint64) <-chan struct{} + simpleTokenKeeper *simpleTokenTTLKeeper + simpleTokensMu sync.Mutex + simpleTokens map[string]string // token -> username +} + +func (t *tokenSimple) genTokenPrefix() (string, error) { + ret := make([]byte, defaultSimpleTokenLength) + + for i := 0; i < defaultSimpleTokenLength; i++ { + bInt, err := rand.Int(rand.Reader, big.NewInt(int64(len(letters)))) + if err != nil { + return "", err + } + + ret[i] = letters[bInt.Int64()] + } + + return string(ret), nil +} + +func (t *tokenSimple) assignSimpleTokenToUser(username, token string) { + t.simpleTokensMu.Lock() + _, ok := t.simpleTokens[token] + if ok { + plog.Panicf("token %s is alredy used", token) + } + + t.simpleTokens[token] = username + t.simpleTokenKeeper.addSimpleToken(token) + t.simpleTokensMu.Unlock() +} + +func (t *tokenSimple) invalidateUser(username string) { + if t.simpleTokenKeeper == nil { + return + } + t.simpleTokensMu.Lock() + for token, name := range t.simpleTokens { + if strings.Compare(name, username) == 0 { + delete(t.simpleTokens, token) + t.simpleTokenKeeper.deleteSimpleToken(token) + } + } + t.simpleTokensMu.Unlock() +} + +func (t *tokenSimple) enable() { + delf := func(tk string) { + if username, ok := t.simpleTokens[tk]; ok { + plog.Infof("deleting token %s for user %s", tk, username) + delete(t.simpleTokens, tk) + } + } + t.simpleTokenKeeper = &simpleTokenTTLKeeper{ + tokens: make(map[string]time.Time), + donec: make(chan struct{}), + stopc: make(chan struct{}), + deleteTokenFunc: delf, + mu: &t.simpleTokensMu, + } + go t.simpleTokenKeeper.run() +} + +func (t *tokenSimple) disable() { + t.simpleTokensMu.Lock() + tk := t.simpleTokenKeeper + t.simpleTokenKeeper = nil + t.simpleTokens = make(map[string]string) // invalidate all tokens + t.simpleTokensMu.Unlock() + if tk != nil { + tk.stop() + } +} + +func (t *tokenSimple) info(ctx context.Context, token string, revision uint64) (*AuthInfo, bool) { + if !t.isValidSimpleToken(ctx, token) { + return nil, false + } + t.simpleTokensMu.Lock() + username, ok := t.simpleTokens[token] + if ok && t.simpleTokenKeeper != nil { + t.simpleTokenKeeper.resetSimpleToken(token) + } + t.simpleTokensMu.Unlock() + return &AuthInfo{Username: username, Revision: revision}, ok +} + +func (t *tokenSimple) assign(ctx context.Context, username string, rev uint64) (string, error) { + // rev isn't used in simple token, it is only used in JWT + index := ctx.Value("index").(uint64) + simpleToken := ctx.Value("simpleToken").(string) + token := fmt.Sprintf("%s.%d", simpleToken, index) + t.assignSimpleTokenToUser(username, token) + + return token, nil +} + +func (t *tokenSimple) isValidSimpleToken(ctx context.Context, token string) bool { + splitted := strings.Split(token, ".") + if len(splitted) != 2 { + return false + } + index, err := strconv.Atoi(splitted[1]) + if err != nil { + return false + } + + select { + case <-t.indexWaiter(uint64(index)): + return true + case <-ctx.Done(): + } + + return false +} + +func newTokenProviderSimple(indexWaiter func(uint64) <-chan struct{}) *tokenSimple { + return &tokenSimple{ + simpleTokens: make(map[string]string), + indexWaiter: indexWaiter, + } +} diff --git a/deps/github.com/coreos/etcd/auth/store.go b/deps/github.com/coreos/etcd/auth/store.go new file mode 100644 index 000000000..3fac7f5a6 --- /dev/null +++ b/deps/github.com/coreos/etcd/auth/store.go @@ -0,0 +1,1059 @@ +// 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. + +package auth + +import ( + "bytes" + "encoding/binary" + "errors" + "sort" + "strings" + "sync" + "sync/atomic" + + "github.com/coreos/etcd/auth/authpb" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/pkg/capnslog" + "golang.org/x/crypto/bcrypt" + "golang.org/x/net/context" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/peer" +) + +var ( + enableFlagKey = []byte("authEnabled") + authEnabled = []byte{1} + authDisabled = []byte{0} + + revisionKey = []byte("authRevision") + + authBucketName = []byte("auth") + authUsersBucketName = []byte("authUsers") + authRolesBucketName = []byte("authRoles") + + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "auth") + + ErrRootUserNotExist = errors.New("auth: root user does not exist") + ErrRootRoleNotExist = errors.New("auth: root user does not have root role") + ErrUserAlreadyExist = errors.New("auth: user already exists") + ErrUserEmpty = errors.New("auth: user name is empty") + ErrUserNotFound = errors.New("auth: user not found") + ErrRoleAlreadyExist = errors.New("auth: role already exists") + ErrRoleNotFound = errors.New("auth: role not found") + ErrAuthFailed = errors.New("auth: authentication failed, invalid user ID or password") + ErrPermissionDenied = errors.New("auth: permission denied") + ErrRoleNotGranted = errors.New("auth: role is not granted to the user") + ErrPermissionNotGranted = errors.New("auth: permission is not granted to the role") + ErrAuthNotEnabled = errors.New("auth: authentication is not enabled") + ErrAuthOldRevision = errors.New("auth: revision in header is old") + ErrInvalidAuthToken = errors.New("auth: invalid auth token") + ErrInvalidAuthOpts = errors.New("auth: invalid auth options") + ErrInvalidAuthMgmt = errors.New("auth: invalid auth management") + + // BcryptCost is the algorithm cost / strength for hashing auth passwords + BcryptCost = bcrypt.DefaultCost +) + +const ( + rootUser = "root" + rootRole = "root" + + revBytesLen = 8 +) + +type AuthInfo struct { + Username string + Revision uint64 +} + +type AuthStore interface { + // AuthEnable turns on the authentication feature + AuthEnable() error + + // AuthDisable turns off the authentication feature + AuthDisable() + + // Authenticate does authentication based on given user name and password + Authenticate(ctx context.Context, username, password string) (*pb.AuthenticateResponse, error) + + // Recover recovers the state of auth store from the given backend + Recover(b backend.Backend) + + // UserAdd adds a new user + UserAdd(r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) + + // UserDelete deletes a user + UserDelete(r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) + + // UserChangePassword changes a password of a user + UserChangePassword(r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) + + // UserGrantRole grants a role to the user + UserGrantRole(r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) + + // UserGet gets the detailed information of a users + UserGet(r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) + + // UserRevokeRole revokes a role of a user + UserRevokeRole(r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) + + // RoleAdd adds a new role + RoleAdd(r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) + + // RoleGrantPermission grants a permission to a role + RoleGrantPermission(r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) + + // RoleGet gets the detailed information of a role + RoleGet(r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) + + // RoleRevokePermission gets the detailed information of a role + RoleRevokePermission(r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) + + // RoleDelete gets the detailed information of a role + RoleDelete(r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) + + // UserList gets a list of all users + UserList(r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) + + // RoleList gets a list of all roles + RoleList(r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) + + // IsPutPermitted checks put permission of the user + IsPutPermitted(authInfo *AuthInfo, key []byte) error + + // IsRangePermitted checks range permission of the user + IsRangePermitted(authInfo *AuthInfo, key, rangeEnd []byte) error + + // IsDeleteRangePermitted checks delete-range permission of the user + IsDeleteRangePermitted(authInfo *AuthInfo, key, rangeEnd []byte) error + + // IsAdminPermitted checks admin permission of the user + IsAdminPermitted(authInfo *AuthInfo) error + + // GenTokenPrefix produces a random string in a case of simple token + // in a case of JWT, it produces an empty string + GenTokenPrefix() (string, error) + + // Revision gets current revision of authStore + Revision() uint64 + + // CheckPassword checks a given pair of username and password is correct + CheckPassword(username, password string) (uint64, error) + + // Close does cleanup of AuthStore + Close() error + + // AuthInfoFromCtx gets AuthInfo from gRPC's context + AuthInfoFromCtx(ctx context.Context) (*AuthInfo, error) + + // AuthInfoFromTLS gets AuthInfo from TLS info of gRPC's context + AuthInfoFromTLS(ctx context.Context) *AuthInfo +} + +type TokenProvider interface { + info(ctx context.Context, token string, revision uint64) (*AuthInfo, bool) + assign(ctx context.Context, username string, revision uint64) (string, error) + enable() + disable() + + invalidateUser(string) + genTokenPrefix() (string, error) +} + +type authStore struct { + // atomic operations; need 64-bit align, or 32-bit tests will crash + revision uint64 + + be backend.Backend + enabled bool + enabledMu sync.RWMutex + + rangePermCache map[string]*unifiedRangePermissions // username -> unifiedRangePermissions + + tokenProvider TokenProvider +} + +func (as *authStore) AuthEnable() error { + as.enabledMu.Lock() + defer as.enabledMu.Unlock() + if as.enabled { + plog.Noticef("Authentication already enabled") + return nil + } + b := as.be + tx := b.BatchTx() + tx.Lock() + defer func() { + tx.Unlock() + b.ForceCommit() + }() + + u := getUser(tx, rootUser) + if u == nil { + return ErrRootUserNotExist + } + + if !hasRootRole(u) { + return ErrRootRoleNotExist + } + + tx.UnsafePut(authBucketName, enableFlagKey, authEnabled) + + as.enabled = true + as.tokenProvider.enable() + + as.rangePermCache = make(map[string]*unifiedRangePermissions) + + as.setRevision(getRevision(tx)) + + plog.Noticef("Authentication enabled") + + return nil +} + +func (as *authStore) AuthDisable() { + as.enabledMu.Lock() + defer as.enabledMu.Unlock() + if !as.enabled { + return + } + b := as.be + tx := b.BatchTx() + tx.Lock() + tx.UnsafePut(authBucketName, enableFlagKey, authDisabled) + as.commitRevision(tx) + tx.Unlock() + b.ForceCommit() + + as.enabled = false + as.tokenProvider.disable() + + plog.Noticef("Authentication disabled") +} + +func (as *authStore) Close() error { + as.enabledMu.Lock() + defer as.enabledMu.Unlock() + if !as.enabled { + return nil + } + as.tokenProvider.disable() + return nil +} + +func (as *authStore) Authenticate(ctx context.Context, username, password string) (*pb.AuthenticateResponse, error) { + if !as.isAuthEnabled() { + return nil, ErrAuthNotEnabled + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, username) + if user == nil { + return nil, ErrAuthFailed + } + + // Password checking is already performed in the API layer, so we don't need to check for now. + // Staleness of password can be detected with OCC in the API layer, too. + + token, err := as.tokenProvider.assign(ctx, username, as.Revision()) + if err != nil { + return nil, err + } + + plog.Debugf("authorized %s, token is %s", username, token) + return &pb.AuthenticateResponse{Token: token}, nil +} + +func (as *authStore) CheckPassword(username, password string) (uint64, error) { + if !as.isAuthEnabled() { + return 0, ErrAuthNotEnabled + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, username) + if user == nil { + return 0, ErrAuthFailed + } + + if bcrypt.CompareHashAndPassword(user.Password, []byte(password)) != nil { + plog.Noticef("authentication failed, invalid password for user %s", username) + return 0, ErrAuthFailed + } + + return getRevision(tx), nil +} + +func (as *authStore) Recover(be backend.Backend) { + enabled := false + as.be = be + tx := be.BatchTx() + tx.Lock() + _, vs := tx.UnsafeRange(authBucketName, enableFlagKey, nil, 0) + if len(vs) == 1 { + if bytes.Equal(vs[0], authEnabled) { + enabled = true + } + } + + as.setRevision(getRevision(tx)) + + tx.Unlock() + + as.enabledMu.Lock() + as.enabled = enabled + as.enabledMu.Unlock() +} + +func (as *authStore) UserAdd(r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) { + if len(r.Name) == 0 { + return nil, ErrUserEmpty + } + + hashed, err := bcrypt.GenerateFromPassword([]byte(r.Password), BcryptCost) + if err != nil { + plog.Errorf("failed to hash password: %s", err) + return nil, err + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, r.Name) + if user != nil { + return nil, ErrUserAlreadyExist + } + + newUser := &authpb.User{ + Name: []byte(r.Name), + Password: hashed, + } + + putUser(tx, newUser) + + as.commitRevision(tx) + + plog.Noticef("added a new user: %s", r.Name) + + return &pb.AuthUserAddResponse{}, nil +} + +func (as *authStore) UserDelete(r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) { + if as.enabled && strings.Compare(r.Name, rootUser) == 0 { + plog.Errorf("the user root must not be deleted") + return nil, ErrInvalidAuthMgmt + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, r.Name) + if user == nil { + return nil, ErrUserNotFound + } + + delUser(tx, r.Name) + + as.commitRevision(tx) + + as.invalidateCachedPerm(r.Name) + as.tokenProvider.invalidateUser(r.Name) + + plog.Noticef("deleted a user: %s", r.Name) + + return &pb.AuthUserDeleteResponse{}, nil +} + +func (as *authStore) UserChangePassword(r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) { + // TODO(mitake): measure the cost of bcrypt.GenerateFromPassword() + // If the cost is too high, we should move the encryption to outside of the raft + hashed, err := bcrypt.GenerateFromPassword([]byte(r.Password), BcryptCost) + if err != nil { + plog.Errorf("failed to hash password: %s", err) + return nil, err + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, r.Name) + if user == nil { + return nil, ErrUserNotFound + } + + updatedUser := &authpb.User{ + Name: []byte(r.Name), + Roles: user.Roles, + Password: hashed, + } + + putUser(tx, updatedUser) + + as.commitRevision(tx) + + as.invalidateCachedPerm(r.Name) + as.tokenProvider.invalidateUser(r.Name) + + plog.Noticef("changed a password of a user: %s", r.Name) + + return &pb.AuthUserChangePasswordResponse{}, nil +} + +func (as *authStore) UserGrantRole(r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, r.User) + if user == nil { + return nil, ErrUserNotFound + } + + if r.Role != rootRole { + role := getRole(tx, r.Role) + if role == nil { + return nil, ErrRoleNotFound + } + } + + idx := sort.SearchStrings(user.Roles, r.Role) + if idx < len(user.Roles) && strings.Compare(user.Roles[idx], r.Role) == 0 { + plog.Warningf("user %s is already granted role %s", r.User, r.Role) + return &pb.AuthUserGrantRoleResponse{}, nil + } + + user.Roles = append(user.Roles, r.Role) + sort.Sort(sort.StringSlice(user.Roles)) + + putUser(tx, user) + + as.invalidateCachedPerm(r.User) + + as.commitRevision(tx) + + plog.Noticef("granted role %s to user %s", r.Role, r.User) + return &pb.AuthUserGrantRoleResponse{}, nil +} + +func (as *authStore) UserGet(r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + var resp pb.AuthUserGetResponse + + user := getUser(tx, r.Name) + if user == nil { + return nil, ErrUserNotFound + } + resp.Roles = append(resp.Roles, user.Roles...) + return &resp, nil +} + +func (as *authStore) UserList(r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + var resp pb.AuthUserListResponse + + users := getAllUsers(tx) + + for _, u := range users { + resp.Users = append(resp.Users, string(u.Name)) + } + + return &resp, nil +} + +func (as *authStore) UserRevokeRole(r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) { + if as.enabled && strings.Compare(r.Name, rootUser) == 0 && strings.Compare(r.Role, rootRole) == 0 { + plog.Errorf("the role root must not be revoked from the user root") + return nil, ErrInvalidAuthMgmt + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, r.Name) + if user == nil { + return nil, ErrUserNotFound + } + + updatedUser := &authpb.User{ + Name: user.Name, + Password: user.Password, + } + + for _, role := range user.Roles { + if strings.Compare(role, r.Role) != 0 { + updatedUser.Roles = append(updatedUser.Roles, role) + } + } + + if len(updatedUser.Roles) == len(user.Roles) { + return nil, ErrRoleNotGranted + } + + putUser(tx, updatedUser) + + as.invalidateCachedPerm(r.Name) + + as.commitRevision(tx) + + plog.Noticef("revoked role %s from user %s", r.Role, r.Name) + return &pb.AuthUserRevokeRoleResponse{}, nil +} + +func (as *authStore) RoleGet(r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + var resp pb.AuthRoleGetResponse + + role := getRole(tx, r.Role) + if role == nil { + return nil, ErrRoleNotFound + } + resp.Perm = append(resp.Perm, role.KeyPermission...) + return &resp, nil +} + +func (as *authStore) RoleList(r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + var resp pb.AuthRoleListResponse + + roles := getAllRoles(tx) + + for _, r := range roles { + resp.Roles = append(resp.Roles, string(r.Name)) + } + + return &resp, nil +} + +func (as *authStore) RoleRevokePermission(r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + role := getRole(tx, r.Role) + if role == nil { + return nil, ErrRoleNotFound + } + + updatedRole := &authpb.Role{ + Name: role.Name, + } + + for _, perm := range role.KeyPermission { + if !bytes.Equal(perm.Key, []byte(r.Key)) || !bytes.Equal(perm.RangeEnd, []byte(r.RangeEnd)) { + updatedRole.KeyPermission = append(updatedRole.KeyPermission, perm) + } + } + + if len(role.KeyPermission) == len(updatedRole.KeyPermission) { + return nil, ErrPermissionNotGranted + } + + putRole(tx, updatedRole) + + // TODO(mitake): currently single role update invalidates every cache + // It should be optimized. + as.clearCachedPerm() + + as.commitRevision(tx) + + plog.Noticef("revoked key %s from role %s", r.Key, r.Role) + return &pb.AuthRoleRevokePermissionResponse{}, nil +} + +func (as *authStore) RoleDelete(r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) { + if as.enabled && strings.Compare(r.Role, rootRole) == 0 { + plog.Errorf("the role root must not be deleted") + return nil, ErrInvalidAuthMgmt + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + role := getRole(tx, r.Role) + if role == nil { + return nil, ErrRoleNotFound + } + + delRole(tx, r.Role) + + users := getAllUsers(tx) + for _, user := range users { + updatedUser := &authpb.User{ + Name: user.Name, + Password: user.Password, + } + + for _, role := range user.Roles { + if strings.Compare(role, r.Role) != 0 { + updatedUser.Roles = append(updatedUser.Roles, role) + } + } + + if len(updatedUser.Roles) == len(user.Roles) { + continue + } + + putUser(tx, updatedUser) + + as.invalidateCachedPerm(string(user.Name)) + } + + as.commitRevision(tx) + + plog.Noticef("deleted role %s", r.Role) + return &pb.AuthRoleDeleteResponse{}, nil +} + +func (as *authStore) RoleAdd(r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + role := getRole(tx, r.Name) + if role != nil { + return nil, ErrRoleAlreadyExist + } + + newRole := &authpb.Role{ + Name: []byte(r.Name), + } + + putRole(tx, newRole) + + as.commitRevision(tx) + + plog.Noticef("Role %s is created", r.Name) + + return &pb.AuthRoleAddResponse{}, nil +} + +func (as *authStore) authInfoFromToken(ctx context.Context, token string) (*AuthInfo, bool) { + return as.tokenProvider.info(ctx, token, as.Revision()) +} + +type permSlice []*authpb.Permission + +func (perms permSlice) Len() int { + return len(perms) +} + +func (perms permSlice) Less(i, j int) bool { + return bytes.Compare(perms[i].Key, perms[j].Key) < 0 +} + +func (perms permSlice) Swap(i, j int) { + perms[i], perms[j] = perms[j], perms[i] +} + +func (as *authStore) RoleGrantPermission(r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) { + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + role := getRole(tx, r.Name) + if role == nil { + return nil, ErrRoleNotFound + } + + idx := sort.Search(len(role.KeyPermission), func(i int) bool { + return bytes.Compare(role.KeyPermission[i].Key, []byte(r.Perm.Key)) >= 0 + }) + + if idx < len(role.KeyPermission) && bytes.Equal(role.KeyPermission[idx].Key, r.Perm.Key) && bytes.Equal(role.KeyPermission[idx].RangeEnd, r.Perm.RangeEnd) { + // update existing permission + role.KeyPermission[idx].PermType = r.Perm.PermType + } else { + // append new permission to the role + newPerm := &authpb.Permission{ + Key: []byte(r.Perm.Key), + RangeEnd: []byte(r.Perm.RangeEnd), + PermType: r.Perm.PermType, + } + + role.KeyPermission = append(role.KeyPermission, newPerm) + sort.Sort(permSlice(role.KeyPermission)) + } + + putRole(tx, role) + + // TODO(mitake): currently single role update invalidates every cache + // It should be optimized. + as.clearCachedPerm() + + as.commitRevision(tx) + + plog.Noticef("role %s's permission of key %s is updated as %s", r.Name, r.Perm.Key, authpb.Permission_Type_name[int32(r.Perm.PermType)]) + + return &pb.AuthRoleGrantPermissionResponse{}, nil +} + +func (as *authStore) isOpPermitted(userName string, revision uint64, key, rangeEnd []byte, permTyp authpb.Permission_Type) error { + // TODO(mitake): this function would be costly so we need a caching mechanism + if !as.isAuthEnabled() { + return nil + } + + // only gets rev == 0 when passed AuthInfo{}; no user given + if revision == 0 { + return ErrUserEmpty + } + + if revision < as.Revision() { + return ErrAuthOldRevision + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + user := getUser(tx, userName) + if user == nil { + plog.Errorf("invalid user name %s for permission checking", userName) + return ErrPermissionDenied + } + + // root role should have permission on all ranges + if hasRootRole(user) { + return nil + } + + if as.isRangeOpPermitted(tx, userName, key, rangeEnd, permTyp) { + return nil + } + + return ErrPermissionDenied +} + +func (as *authStore) IsPutPermitted(authInfo *AuthInfo, key []byte) error { + return as.isOpPermitted(authInfo.Username, authInfo.Revision, key, nil, authpb.WRITE) +} + +func (as *authStore) IsRangePermitted(authInfo *AuthInfo, key, rangeEnd []byte) error { + return as.isOpPermitted(authInfo.Username, authInfo.Revision, key, rangeEnd, authpb.READ) +} + +func (as *authStore) IsDeleteRangePermitted(authInfo *AuthInfo, key, rangeEnd []byte) error { + return as.isOpPermitted(authInfo.Username, authInfo.Revision, key, rangeEnd, authpb.WRITE) +} + +func (as *authStore) IsAdminPermitted(authInfo *AuthInfo) error { + if !as.isAuthEnabled() { + return nil + } + if authInfo == nil { + return ErrUserEmpty + } + + tx := as.be.BatchTx() + tx.Lock() + defer tx.Unlock() + + u := getUser(tx, authInfo.Username) + if u == nil { + return ErrUserNotFound + } + + if !hasRootRole(u) { + return ErrPermissionDenied + } + + return nil +} + +func getUser(tx backend.BatchTx, username string) *authpb.User { + _, vs := tx.UnsafeRange(authUsersBucketName, []byte(username), nil, 0) + if len(vs) == 0 { + return nil + } + + user := &authpb.User{} + err := user.Unmarshal(vs[0]) + if err != nil { + plog.Panicf("failed to unmarshal user struct (name: %s): %s", username, err) + } + return user +} + +func getAllUsers(tx backend.BatchTx) []*authpb.User { + _, vs := tx.UnsafeRange(authUsersBucketName, []byte{0}, []byte{0xff}, -1) + if len(vs) == 0 { + return nil + } + + var users []*authpb.User + + for _, v := range vs { + user := &authpb.User{} + err := user.Unmarshal(v) + if err != nil { + plog.Panicf("failed to unmarshal user struct: %s", err) + } + + users = append(users, user) + } + + return users +} + +func putUser(tx backend.BatchTx, user *authpb.User) { + b, err := user.Marshal() + if err != nil { + plog.Panicf("failed to marshal user struct (name: %s): %s", user.Name, err) + } + tx.UnsafePut(authUsersBucketName, user.Name, b) +} + +func delUser(tx backend.BatchTx, username string) { + tx.UnsafeDelete(authUsersBucketName, []byte(username)) +} + +func getRole(tx backend.BatchTx, rolename string) *authpb.Role { + _, vs := tx.UnsafeRange(authRolesBucketName, []byte(rolename), nil, 0) + if len(vs) == 0 { + return nil + } + + role := &authpb.Role{} + err := role.Unmarshal(vs[0]) + if err != nil { + plog.Panicf("failed to unmarshal role struct (name: %s): %s", rolename, err) + } + return role +} + +func getAllRoles(tx backend.BatchTx) []*authpb.Role { + _, vs := tx.UnsafeRange(authRolesBucketName, []byte{0}, []byte{0xff}, -1) + if len(vs) == 0 { + return nil + } + + var roles []*authpb.Role + + for _, v := range vs { + role := &authpb.Role{} + err := role.Unmarshal(v) + if err != nil { + plog.Panicf("failed to unmarshal role struct: %s", err) + } + + roles = append(roles, role) + } + + return roles +} + +func putRole(tx backend.BatchTx, role *authpb.Role) { + b, err := role.Marshal() + if err != nil { + plog.Panicf("failed to marshal role struct (name: %s): %s", role.Name, err) + } + + tx.UnsafePut(authRolesBucketName, []byte(role.Name), b) +} + +func delRole(tx backend.BatchTx, rolename string) { + tx.UnsafeDelete(authRolesBucketName, []byte(rolename)) +} + +func (as *authStore) isAuthEnabled() bool { + as.enabledMu.RLock() + defer as.enabledMu.RUnlock() + return as.enabled +} + +func NewAuthStore(be backend.Backend, tp TokenProvider) *authStore { + tx := be.BatchTx() + tx.Lock() + + tx.UnsafeCreateBucket(authBucketName) + tx.UnsafeCreateBucket(authUsersBucketName) + tx.UnsafeCreateBucket(authRolesBucketName) + + enabled := false + _, vs := tx.UnsafeRange(authBucketName, enableFlagKey, nil, 0) + if len(vs) == 1 { + if bytes.Equal(vs[0], authEnabled) { + enabled = true + } + } + + as := &authStore{ + be: be, + revision: getRevision(tx), + enabled: enabled, + rangePermCache: make(map[string]*unifiedRangePermissions), + tokenProvider: tp, + } + + if enabled { + as.tokenProvider.enable() + } + + if as.Revision() == 0 { + as.commitRevision(tx) + } + + tx.Unlock() + be.ForceCommit() + + return as +} + +func hasRootRole(u *authpb.User) bool { + for _, r := range u.Roles { + if r == rootRole { + return true + } + } + return false +} + +func (as *authStore) commitRevision(tx backend.BatchTx) { + atomic.AddUint64(&as.revision, 1) + revBytes := make([]byte, revBytesLen) + binary.BigEndian.PutUint64(revBytes, as.Revision()) + tx.UnsafePut(authBucketName, revisionKey, revBytes) +} + +func getRevision(tx backend.BatchTx) uint64 { + _, vs := tx.UnsafeRange(authBucketName, []byte(revisionKey), nil, 0) + if len(vs) != 1 { + // this can happen in the initialization phase + return 0 + } + + return binary.BigEndian.Uint64(vs[0]) +} + +func (as *authStore) setRevision(rev uint64) { + atomic.StoreUint64(&as.revision, rev) +} + +func (as *authStore) Revision() uint64 { + return atomic.LoadUint64(&as.revision) +} + +func (as *authStore) AuthInfoFromTLS(ctx context.Context) *AuthInfo { + peer, ok := peer.FromContext(ctx) + if !ok || peer == nil || peer.AuthInfo == nil { + return nil + } + + tlsInfo := peer.AuthInfo.(credentials.TLSInfo) + for _, chains := range tlsInfo.State.VerifiedChains { + for _, chain := range chains { + cn := chain.Subject.CommonName + plog.Debugf("found common name %s", cn) + + return &AuthInfo{ + Username: cn, + Revision: as.Revision(), + } + } + } + + return nil +} + +func (as *authStore) AuthInfoFromCtx(ctx context.Context) (*AuthInfo, error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, nil + } + + ts, tok := md["token"] + if !tok { + return nil, nil + } + + token := ts[0] + authInfo, uok := as.authInfoFromToken(ctx, token) + if !uok { + plog.Warningf("invalid auth token: %s", token) + return nil, ErrInvalidAuthToken + } + return authInfo, nil +} + +func (as *authStore) GenTokenPrefix() (string, error) { + return as.tokenProvider.genTokenPrefix() +} + +func decomposeOpts(optstr string) (string, map[string]string, error) { + opts := strings.Split(optstr, ",") + tokenType := opts[0] + + typeSpecificOpts := make(map[string]string) + for i := 1; i < len(opts); i++ { + pair := strings.Split(opts[i], "=") + + if len(pair) != 2 { + plog.Errorf("invalid token specific option: %s", optstr) + return "", nil, ErrInvalidAuthOpts + } + + if _, ok := typeSpecificOpts[pair[0]]; ok { + plog.Errorf("invalid token specific option, duplicated parameters (%s): %s", pair[0], optstr) + return "", nil, ErrInvalidAuthOpts + } + + typeSpecificOpts[pair[0]] = pair[1] + } + + return tokenType, typeSpecificOpts, nil + +} + +func NewTokenProvider(tokenOpts string, indexWaiter func(uint64) <-chan struct{}) (TokenProvider, error) { + tokenType, typeSpecificOpts, err := decomposeOpts(tokenOpts) + if err != nil { + return nil, ErrInvalidAuthOpts + } + + switch tokenType { + case "simple": + plog.Warningf("simple token is not cryptographically signed") + return newTokenProviderSimple(indexWaiter), nil + case "jwt": + return newTokenProviderJWT(typeSpecificOpts) + default: + plog.Errorf("unknown token type: %s", tokenType) + return nil, ErrInvalidAuthOpts + } +} diff --git a/deps/github.com/coreos/etcd/clientv3/concurrency/doc.go b/deps/github.com/coreos/etcd/clientv3/concurrency/doc.go new file mode 100644 index 000000000..dcdbf511d --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/concurrency/doc.go @@ -0,0 +1,17 @@ +// 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. + +// Package concurrency implements concurrency operations on top of +// etcd such as distributed locks, barriers, and elections. +package concurrency diff --git a/deps/github.com/coreos/etcd/clientv3/concurrency/election.go b/deps/github.com/coreos/etcd/clientv3/concurrency/election.go new file mode 100644 index 000000000..c092bde0a --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/concurrency/election.go @@ -0,0 +1,246 @@ +// 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. + +package concurrency + +import ( + "errors" + "fmt" + + v3 "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc/mvccpb" + + "golang.org/x/net/context" +) + +var ( + ErrElectionNotLeader = errors.New("election: not leader") + ErrElectionNoLeader = errors.New("election: no leader") +) + +type Election struct { + session *Session + + keyPrefix string + + leaderKey string + leaderRev int64 + leaderSession *Session + hdr *pb.ResponseHeader +} + +// NewElection returns a new election on a given key prefix. +func NewElection(s *Session, pfx string) *Election { + return &Election{session: s, keyPrefix: pfx + "/"} +} + +// ResumeElection initializes an election with a known leader. +func ResumeElection(s *Session, pfx string, leaderKey string, leaderRev int64) *Election { + return &Election{ + session: s, + leaderKey: leaderKey, + leaderRev: leaderRev, + leaderSession: s, + } +} + +// Campaign puts a value as eligible for the election. It blocks until +// it is elected, an error occurs, or the context is cancelled. +func (e *Election) Campaign(ctx context.Context, val string) error { + s := e.session + client := e.session.Client() + + k := fmt.Sprintf("%s%x", e.keyPrefix, s.Lease()) + txn := client.Txn(ctx).If(v3.Compare(v3.CreateRevision(k), "=", 0)) + txn = txn.Then(v3.OpPut(k, val, v3.WithLease(s.Lease()))) + txn = txn.Else(v3.OpGet(k)) + resp, err := txn.Commit() + if err != nil { + return err + } + e.leaderKey, e.leaderRev, e.leaderSession = k, resp.Header.Revision, s + if !resp.Succeeded { + kv := resp.Responses[0].GetResponseRange().Kvs[0] + e.leaderRev = kv.CreateRevision + if string(kv.Value) != val { + if err = e.Proclaim(ctx, val); err != nil { + e.Resign(ctx) + return err + } + } + } + + _, err = waitDeletes(ctx, client, e.keyPrefix, e.leaderRev-1) + if err != nil { + // clean up in case of context cancel + select { + case <-ctx.Done(): + e.Resign(client.Ctx()) + default: + e.leaderSession = nil + } + return err + } + e.hdr = resp.Header + + return nil +} + +// Proclaim lets the leader announce a new value without another election. +func (e *Election) Proclaim(ctx context.Context, val string) error { + if e.leaderSession == nil { + return ErrElectionNotLeader + } + client := e.session.Client() + cmp := v3.Compare(v3.CreateRevision(e.leaderKey), "=", e.leaderRev) + txn := client.Txn(ctx).If(cmp) + txn = txn.Then(v3.OpPut(e.leaderKey, val, v3.WithLease(e.leaderSession.Lease()))) + tresp, terr := txn.Commit() + if terr != nil { + return terr + } + if !tresp.Succeeded { + e.leaderKey = "" + return ErrElectionNotLeader + } + + e.hdr = tresp.Header + return nil +} + +// Resign lets a leader start a new election. +func (e *Election) Resign(ctx context.Context) (err error) { + if e.leaderSession == nil { + return nil + } + client := e.session.Client() + cmp := v3.Compare(v3.CreateRevision(e.leaderKey), "=", e.leaderRev) + resp, err := client.Txn(ctx).If(cmp).Then(v3.OpDelete(e.leaderKey)).Commit() + if err == nil { + e.hdr = resp.Header + } + e.leaderKey = "" + e.leaderSession = nil + return err +} + +// Leader returns the leader value for the current election. +func (e *Election) Leader(ctx context.Context) (*v3.GetResponse, error) { + client := e.session.Client() + resp, err := client.Get(ctx, e.keyPrefix, v3.WithFirstCreate()...) + if err != nil { + return nil, err + } else if len(resp.Kvs) == 0 { + // no leader currently elected + return nil, ErrElectionNoLeader + } + return resp, nil +} + +// Observe returns a channel that reliably observes ordered leader proposals +// as GetResponse values on every current elected leader key. It will not +// necessarily fetch all historical leader updates, but will always post the +// most recent leader value. +// +// The channel closes when the context is canceled or the underlying watcher +// is otherwise disrupted. +func (e *Election) Observe(ctx context.Context) <-chan v3.GetResponse { + retc := make(chan v3.GetResponse) + go e.observe(ctx, retc) + return retc +} + +func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) { + client := e.session.Client() + + defer close(ch) + for { + resp, err := client.Get(ctx, e.keyPrefix, v3.WithFirstCreate()...) + if err != nil { + return + } + + var kv *mvccpb.KeyValue + var hdr *pb.ResponseHeader + + if len(resp.Kvs) == 0 { + cctx, cancel := context.WithCancel(ctx) + // wait for first key put on prefix + opts := []v3.OpOption{v3.WithRev(resp.Header.Revision), v3.WithPrefix()} + wch := client.Watch(cctx, e.keyPrefix, opts...) + for kv == nil { + wr, ok := <-wch + if !ok || wr.Err() != nil { + cancel() + return + } + // only accept puts; a delete will make observe() spin + for _, ev := range wr.Events { + if ev.Type == mvccpb.PUT { + hdr, kv = &wr.Header, ev.Kv + // may have multiple revs; hdr.rev = the last rev + // set to kv's rev in case batch has multiple Puts + hdr.Revision = kv.ModRevision + break + } + } + } + cancel() + } else { + hdr, kv = resp.Header, resp.Kvs[0] + } + + select { + case ch <- v3.GetResponse{Header: hdr, Kvs: []*mvccpb.KeyValue{kv}}: + case <-ctx.Done(): + return + } + + cctx, cancel := context.WithCancel(ctx) + wch := client.Watch(cctx, string(kv.Key), v3.WithRev(hdr.Revision+1)) + keyDeleted := false + for !keyDeleted { + wr, ok := <-wch + if !ok { + cancel() + return + } + for _, ev := range wr.Events { + if ev.Type == mvccpb.DELETE { + keyDeleted = true + break + } + resp.Header = &wr.Header + resp.Kvs = []*mvccpb.KeyValue{ev.Kv} + select { + case ch <- *resp: + case <-cctx.Done(): + cancel() + return + } + } + } + cancel() + } +} + +// Key returns the leader key if elected, empty string otherwise. +func (e *Election) Key() string { return e.leaderKey } + +// Rev returns the leader key's creation revision, if elected. +func (e *Election) Rev() int64 { return e.leaderRev } + +// Header is the response header from the last successful election proposal. +func (e *Election) Header() *pb.ResponseHeader { return e.hdr } diff --git a/deps/github.com/coreos/etcd/clientv3/concurrency/key.go b/deps/github.com/coreos/etcd/clientv3/concurrency/key.go new file mode 100644 index 000000000..993673775 --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/concurrency/key.go @@ -0,0 +1,66 @@ +// 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. + +package concurrency + +import ( + "fmt" + + v3 "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc/mvccpb" + + "golang.org/x/net/context" +) + +func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error { + cctx, cancel := context.WithCancel(ctx) + defer cancel() + + var wr v3.WatchResponse + wch := client.Watch(cctx, key, v3.WithRev(rev)) + for wr = range wch { + for _, ev := range wr.Events { + if ev.Type == mvccpb.DELETE { + return nil + } + } + } + if err := wr.Err(); err != nil { + return err + } + if err := ctx.Err(); err != nil { + return err + } + return fmt.Errorf("lost watcher waiting for delete") +} + +// waitDeletes efficiently waits until all keys matching the prefix and no greater +// than the create revision. +func waitDeletes(ctx context.Context, client *v3.Client, pfx string, maxCreateRev int64) (*pb.ResponseHeader, error) { + getOpts := append(v3.WithLastCreate(), v3.WithMaxCreateRev(maxCreateRev)) + for { + resp, err := client.Get(ctx, pfx, getOpts...) + if err != nil { + return nil, err + } + if len(resp.Kvs) == 0 { + return resp.Header, nil + } + lastKey := string(resp.Kvs[0].Key) + if err = waitDelete(ctx, client, lastKey, resp.Header.Revision); err != nil { + return nil, err + } + } +} diff --git a/deps/github.com/coreos/etcd/clientv3/concurrency/mutex.go b/deps/github.com/coreos/etcd/clientv3/concurrency/mutex.go new file mode 100644 index 000000000..736a9d3d3 --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/concurrency/mutex.go @@ -0,0 +1,119 @@ +// 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. + +package concurrency + +import ( + "fmt" + "sync" + + v3 "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "golang.org/x/net/context" +) + +// Mutex implements the sync Locker interface with etcd +type Mutex struct { + s *Session + + pfx string + myKey string + myRev int64 + hdr *pb.ResponseHeader +} + +func NewMutex(s *Session, pfx string) *Mutex { + return &Mutex{s, pfx + "/", "", -1, nil} +} + +// Lock locks the mutex with a cancelable context. If the context is canceled +// while trying to acquire the lock, the mutex tries to clean its stale lock entry. +func (m *Mutex) Lock(ctx context.Context) error { + s := m.s + client := m.s.Client() + + m.myKey = fmt.Sprintf("%s%x", m.pfx, s.Lease()) + cmp := v3.Compare(v3.CreateRevision(m.myKey), "=", 0) + // put self in lock waiters via myKey; oldest waiter holds lock + put := v3.OpPut(m.myKey, "", v3.WithLease(s.Lease())) + // reuse key in case this session already holds the lock + get := v3.OpGet(m.myKey) + // fetch current holder to complete uncontended path with only one RPC + getOwner := v3.OpGet(m.pfx, v3.WithFirstCreate()...) + resp, err := client.Txn(ctx).If(cmp).Then(put, getOwner).Else(get, getOwner).Commit() + if err != nil { + return err + } + m.myRev = resp.Header.Revision + if !resp.Succeeded { + m.myRev = resp.Responses[0].GetResponseRange().Kvs[0].CreateRevision + } + // if no key on prefix / the minimum rev is key, already hold the lock + ownerKey := resp.Responses[1].GetResponseRange().Kvs + if len(ownerKey) == 0 || ownerKey[0].CreateRevision == m.myRev { + m.hdr = resp.Header + return nil + } + + // wait for deletion revisions prior to myKey + hdr, werr := waitDeletes(ctx, client, m.pfx, m.myRev-1) + // release lock key if cancelled + select { + case <-ctx.Done(): + m.Unlock(client.Ctx()) + default: + m.hdr = hdr + } + return werr +} + +func (m *Mutex) Unlock(ctx context.Context) error { + client := m.s.Client() + if _, err := client.Delete(ctx, m.myKey); err != nil { + return err + } + m.myKey = "\x00" + m.myRev = -1 + return nil +} + +func (m *Mutex) IsOwner() v3.Cmp { + return v3.Compare(v3.CreateRevision(m.myKey), "=", m.myRev) +} + +func (m *Mutex) Key() string { return m.myKey } + +// Header is the response header received from etcd on acquiring the lock. +func (m *Mutex) Header() *pb.ResponseHeader { return m.hdr } + +type lockerMutex struct{ *Mutex } + +func (lm *lockerMutex) Lock() { + client := lm.s.Client() + if err := lm.Mutex.Lock(client.Ctx()); err != nil { + panic(err) + } +} +func (lm *lockerMutex) Unlock() { + client := lm.s.Client() + if err := lm.Mutex.Unlock(client.Ctx()); err != nil { + panic(err) + } +} + +// NewLocker creates a sync.Locker backed by an etcd mutex. +func NewLocker(s *Session, pfx string) sync.Locker { + return &lockerMutex{NewMutex(s, pfx)} +} diff --git a/deps/github.com/coreos/etcd/clientv3/concurrency/session.go b/deps/github.com/coreos/etcd/clientv3/concurrency/session.go new file mode 100644 index 000000000..55cb553ea --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/concurrency/session.go @@ -0,0 +1,142 @@ +// 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. + +package concurrency + +import ( + "time" + + v3 "github.com/coreos/etcd/clientv3" + + "golang.org/x/net/context" +) + +const defaultSessionTTL = 60 + +// Session represents a lease kept alive for the lifetime of a client. +// Fault-tolerant applications may use sessions to reason about liveness. +type Session struct { + client *v3.Client + opts *sessionOptions + id v3.LeaseID + + cancel context.CancelFunc + donec <-chan struct{} +} + +// NewSession gets the leased session for a client. +func NewSession(client *v3.Client, opts ...SessionOption) (*Session, error) { + ops := &sessionOptions{ttl: defaultSessionTTL, ctx: client.Ctx()} + for _, opt := range opts { + opt(ops) + } + + id := ops.leaseID + if id == v3.NoLease { + resp, err := client.Grant(ops.ctx, int64(ops.ttl)) + if err != nil { + return nil, err + } + id = v3.LeaseID(resp.ID) + } + + ctx, cancel := context.WithCancel(ops.ctx) + keepAlive, err := client.KeepAlive(ctx, id) + if err != nil || keepAlive == nil { + cancel() + return nil, err + } + + donec := make(chan struct{}) + s := &Session{client: client, opts: ops, id: id, cancel: cancel, donec: donec} + + // keep the lease alive until client error or cancelled context + go func() { + defer close(donec) + for range keepAlive { + // eat messages until keep alive channel closes + } + }() + + return s, nil +} + +// Client is the etcd client that is attached to the session. +func (s *Session) Client() *v3.Client { + return s.client +} + +// Lease is the lease ID for keys bound to the session. +func (s *Session) Lease() v3.LeaseID { return s.id } + +// Done returns a channel that closes when the lease is orphaned, expires, or +// is otherwise no longer being refreshed. +func (s *Session) Done() <-chan struct{} { return s.donec } + +// Orphan ends the refresh for the session lease. This is useful +// in case the state of the client connection is indeterminate (revoke +// would fail) or when transferring lease ownership. +func (s *Session) Orphan() { + s.cancel() + <-s.donec +} + +// Close orphans the session and revokes the session lease. +func (s *Session) Close() error { + s.Orphan() + // if revoke takes longer than the ttl, lease is expired anyway + ctx, cancel := context.WithTimeout(s.opts.ctx, time.Duration(s.opts.ttl)*time.Second) + _, err := s.client.Revoke(ctx, s.id) + cancel() + return err +} + +type sessionOptions struct { + ttl int + leaseID v3.LeaseID + ctx context.Context +} + +// SessionOption configures Session. +type SessionOption func(*sessionOptions) + +// WithTTL configures the session's TTL in seconds. +// If TTL is <= 0, the default 60 seconds TTL will be used. +func WithTTL(ttl int) SessionOption { + return func(so *sessionOptions) { + if ttl > 0 { + so.ttl = ttl + } + } +} + +// WithLease specifies the existing leaseID to be used for the session. +// This is useful in process restart scenario, for example, to reclaim +// leadership from an election prior to restart. +func WithLease(leaseID v3.LeaseID) SessionOption { + return func(so *sessionOptions) { + so.leaseID = leaseID + } +} + +// WithContext assigns a context to the session instead of defaulting to +// using the client context. This is useful for canceling NewSession and +// Close operations immediately without having to close the client. If the +// context is canceled before Close() completes, the session's lease will be +// abandoned and left to expire instead of being revoked. +func WithContext(ctx context.Context) SessionOption { + return func(so *sessionOptions) { + so.ctx = ctx + } +} diff --git a/deps/github.com/coreos/etcd/clientv3/concurrency/stm.go b/deps/github.com/coreos/etcd/clientv3/concurrency/stm.go new file mode 100644 index 000000000..6bfd70ec4 --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/concurrency/stm.go @@ -0,0 +1,388 @@ +// 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. + +package concurrency + +import ( + "math" + + v3 "github.com/coreos/etcd/clientv3" + + "golang.org/x/net/context" +) + +// STM is an interface for software transactional memory. +type STM interface { + // Get returns the value for a key and inserts the key in the txn's read set. + // If Get fails, it aborts the transaction with an error, never returning. + Get(key ...string) string + // Put adds a value for a key to the write set. + Put(key, val string, opts ...v3.OpOption) + // Rev returns the revision of a key in the read set. + Rev(key string) int64 + // Del deletes a key. + Del(key string) + + // commit attempts to apply the txn's changes to the server. + commit() *v3.TxnResponse + reset() +} + +// Isolation is an enumeration of transactional isolation levels which +// describes how transactions should interfere and conflict. +type Isolation int + +const ( + // SerializableSnapshot provides serializable isolation and also checks + // for write conflicts. + SerializableSnapshot Isolation = iota + // Serializable reads within the same transaction attempt return data + // from the at the revision of the first read. + Serializable + // RepeatableReads reads within the same transaction attempt always + // return the same data. + RepeatableReads + // ReadCommitted reads keys from any committed revision. + ReadCommitted +) + +// stmError safely passes STM errors through panic to the STM error channel. +type stmError struct{ err error } + +type stmOptions struct { + iso Isolation + ctx context.Context + prefetch []string +} + +type stmOption func(*stmOptions) + +// WithIsolation specifies the transaction isolation level. +func WithIsolation(lvl Isolation) stmOption { + return func(so *stmOptions) { so.iso = lvl } +} + +// WithAbortContext specifies the context for permanently aborting the transaction. +func WithAbortContext(ctx context.Context) stmOption { + return func(so *stmOptions) { so.ctx = ctx } +} + +// WithPrefetch is a hint to prefetch a list of keys before trying to apply. +// If an STM transaction will unconditionally fetch a set of keys, prefetching +// those keys will save the round-trip cost from requesting each key one by one +// with Get(). +func WithPrefetch(keys ...string) stmOption { + return func(so *stmOptions) { so.prefetch = append(so.prefetch, keys...) } +} + +// NewSTM initiates a new STM instance, using serializable snapshot isolation by default. +func NewSTM(c *v3.Client, apply func(STM) error, so ...stmOption) (*v3.TxnResponse, error) { + opts := &stmOptions{ctx: c.Ctx()} + for _, f := range so { + f(opts) + } + if len(opts.prefetch) != 0 { + f := apply + apply = func(s STM) error { + s.Get(opts.prefetch...) + return f(s) + } + } + return runSTM(mkSTM(c, opts), apply) +} + +func mkSTM(c *v3.Client, opts *stmOptions) STM { + switch opts.iso { + case SerializableSnapshot: + s := &stmSerializable{ + stm: stm{client: c, ctx: opts.ctx}, + prefetch: make(map[string]*v3.GetResponse), + } + s.conflicts = func() []v3.Cmp { + return append(s.rset.cmps(), s.wset.cmps(s.rset.first()+1)...) + } + return s + case Serializable: + s := &stmSerializable{ + stm: stm{client: c, ctx: opts.ctx}, + prefetch: make(map[string]*v3.GetResponse), + } + s.conflicts = func() []v3.Cmp { return s.rset.cmps() } + return s + case RepeatableReads: + s := &stm{client: c, ctx: opts.ctx, getOpts: []v3.OpOption{v3.WithSerializable()}} + s.conflicts = func() []v3.Cmp { return s.rset.cmps() } + return s + case ReadCommitted: + s := &stm{client: c, ctx: opts.ctx, getOpts: []v3.OpOption{v3.WithSerializable()}} + s.conflicts = func() []v3.Cmp { return nil } + return s + default: + panic("unsupported stm") + } +} + +type stmResponse struct { + resp *v3.TxnResponse + err error +} + +func runSTM(s STM, apply func(STM) error) (*v3.TxnResponse, error) { + outc := make(chan stmResponse, 1) + go func() { + defer func() { + if r := recover(); r != nil { + e, ok := r.(stmError) + if !ok { + // client apply panicked + panic(r) + } + outc <- stmResponse{nil, e.err} + } + }() + var out stmResponse + for { + s.reset() + if out.err = apply(s); out.err != nil { + break + } + if out.resp = s.commit(); out.resp != nil { + break + } + } + outc <- out + }() + r := <-outc + return r.resp, r.err +} + +// stm implements repeatable-read software transactional memory over etcd +type stm struct { + client *v3.Client + ctx context.Context + // rset holds read key values and revisions + rset readSet + // wset holds overwritten keys and their values + wset writeSet + // getOpts are the opts used for gets + getOpts []v3.OpOption + // conflicts computes the current conflicts on the txn + conflicts func() []v3.Cmp +} + +type stmPut struct { + val string + op v3.Op +} + +type readSet map[string]*v3.GetResponse + +func (rs readSet) add(keys []string, txnresp *v3.TxnResponse) { + for i, resp := range txnresp.Responses { + rs[keys[i]] = (*v3.GetResponse)(resp.GetResponseRange()) + } +} + +// first returns the store revision from the first fetch +func (rs readSet) first() int64 { + ret := int64(math.MaxInt64 - 1) + for _, resp := range rs { + if rev := resp.Header.Revision; rev < ret { + ret = rev + } + } + return ret +} + +// cmps guards the txn from updates to read set +func (rs readSet) cmps() []v3.Cmp { + cmps := make([]v3.Cmp, 0, len(rs)) + for k, rk := range rs { + cmps = append(cmps, isKeyCurrent(k, rk)) + } + return cmps +} + +type writeSet map[string]stmPut + +func (ws writeSet) get(keys ...string) *stmPut { + for _, key := range keys { + if wv, ok := ws[key]; ok { + return &wv + } + } + return nil +} + +// cmps returns a cmp list testing no writes have happened past rev +func (ws writeSet) cmps(rev int64) []v3.Cmp { + cmps := make([]v3.Cmp, 0, len(ws)) + for key := range ws { + cmps = append(cmps, v3.Compare(v3.ModRevision(key), "<", rev)) + } + return cmps +} + +// puts is the list of ops for all pending writes +func (ws writeSet) puts() []v3.Op { + puts := make([]v3.Op, 0, len(ws)) + for _, v := range ws { + puts = append(puts, v.op) + } + return puts +} + +func (s *stm) Get(keys ...string) string { + if wv := s.wset.get(keys...); wv != nil { + return wv.val + } + return respToValue(s.fetch(keys...)) +} + +func (s *stm) Put(key, val string, opts ...v3.OpOption) { + s.wset[key] = stmPut{val, v3.OpPut(key, val, opts...)} +} + +func (s *stm) Del(key string) { s.wset[key] = stmPut{"", v3.OpDelete(key)} } + +func (s *stm) Rev(key string) int64 { + if resp := s.fetch(key); resp != nil && len(resp.Kvs) != 0 { + return resp.Kvs[0].ModRevision + } + return 0 +} + +func (s *stm) commit() *v3.TxnResponse { + txnresp, err := s.client.Txn(s.ctx).If(s.conflicts()...).Then(s.wset.puts()...).Commit() + if err != nil { + panic(stmError{err}) + } + if txnresp.Succeeded { + return txnresp + } + return nil +} + +func (s *stm) fetch(keys ...string) *v3.GetResponse { + if len(keys) == 0 { + return nil + } + ops := make([]v3.Op, len(keys)) + for i, key := range keys { + if resp, ok := s.rset[key]; ok { + return resp + } + ops[i] = v3.OpGet(key, s.getOpts...) + } + txnresp, err := s.client.Txn(s.ctx).Then(ops...).Commit() + if err != nil { + panic(stmError{err}) + } + s.rset.add(keys, txnresp) + return (*v3.GetResponse)(txnresp.Responses[0].GetResponseRange()) +} + +func (s *stm) reset() { + s.rset = make(map[string]*v3.GetResponse) + s.wset = make(map[string]stmPut) +} + +type stmSerializable struct { + stm + prefetch map[string]*v3.GetResponse +} + +func (s *stmSerializable) Get(keys ...string) string { + if wv := s.wset.get(keys...); wv != nil { + return wv.val + } + firstRead := len(s.rset) == 0 + for _, key := range keys { + if resp, ok := s.prefetch[key]; ok { + delete(s.prefetch, key) + s.rset[key] = resp + } + } + resp := s.stm.fetch(keys...) + if firstRead { + // txn's base revision is defined by the first read + s.getOpts = []v3.OpOption{ + v3.WithRev(resp.Header.Revision), + v3.WithSerializable(), + } + } + return respToValue(resp) +} + +func (s *stmSerializable) Rev(key string) int64 { + s.Get(key) + return s.stm.Rev(key) +} + +func (s *stmSerializable) gets() ([]string, []v3.Op) { + keys := make([]string, 0, len(s.rset)) + ops := make([]v3.Op, 0, len(s.rset)) + for k := range s.rset { + keys = append(keys, k) + ops = append(ops, v3.OpGet(k)) + } + return keys, ops +} + +func (s *stmSerializable) commit() *v3.TxnResponse { + keys, getops := s.gets() + txn := s.client.Txn(s.ctx).If(s.conflicts()...).Then(s.wset.puts()...) + // use Else to prefetch keys in case of conflict to save a round trip + txnresp, err := txn.Else(getops...).Commit() + if err != nil { + panic(stmError{err}) + } + if txnresp.Succeeded { + return txnresp + } + // load prefetch with Else data + s.rset.add(keys, txnresp) + s.prefetch = s.rset + s.getOpts = nil + return nil +} + +func isKeyCurrent(k string, r *v3.GetResponse) v3.Cmp { + if len(r.Kvs) != 0 { + return v3.Compare(v3.ModRevision(k), "=", r.Kvs[0].ModRevision) + } + return v3.Compare(v3.ModRevision(k), "=", 0) +} + +func respToValue(resp *v3.GetResponse) string { + if resp == nil || len(resp.Kvs) == 0 { + return "" + } + return string(resp.Kvs[0].Value) +} + +// NewSTMRepeatable is deprecated. +func NewSTMRepeatable(ctx context.Context, c *v3.Client, apply func(STM) error) (*v3.TxnResponse, error) { + return NewSTM(c, apply, WithAbortContext(ctx), WithIsolation(RepeatableReads)) +} + +// NewSTMSerializable is deprecated. +func NewSTMSerializable(ctx context.Context, c *v3.Client, apply func(STM) error) (*v3.TxnResponse, error) { + return NewSTM(c, apply, WithAbortContext(ctx), WithIsolation(Serializable)) +} + +// NewSTMReadCommitted is deprecated. +func NewSTMReadCommitted(ctx context.Context, c *v3.Client, apply func(STM) error) (*v3.TxnResponse, error) { + return NewSTM(c, apply, WithAbortContext(ctx), WithIsolation(ReadCommitted)) +} diff --git a/deps/github.com/coreos/etcd/clientv3/namespace/doc.go b/deps/github.com/coreos/etcd/clientv3/namespace/doc.go new file mode 100644 index 000000000..3f883320f --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/namespace/doc.go @@ -0,0 +1,43 @@ +// Copyright 2017 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. + +// Package namespace is a clientv3 wrapper that translates all keys to begin +// with a given prefix. +// +// First, create a client: +// +// cli, err := clientv3.New(clientv3.Config{Endpoints: []string{"localhost:2379"}}) +// if err != nil { +// // handle error! +// } +// +// Next, override the client interfaces: +// +// unprefixedKV := cli.KV +// cli.KV = namespace.NewKV(cli.KV, "my-prefix/") +// cli.Watcher = namespace.NewWatcher(cli.Watcher, "my-prefix/") +// cli.Lease = namespace.NewLease(cli.Lease, "my-prefix/") +// +// Now calls using 'cli' will namespace / prefix all keys with "my-prefix/": +// +// cli.Put(context.TODO(), "abc", "123") +// resp, _ := unprefixedKV.Get(context.TODO(), "my-prefix/abc") +// fmt.Printf("%s\n", resp.Kvs[0].Value) +// // Output: 123 +// unprefixedKV.Put(context.TODO(), "my-prefix/abc", "456") +// resp, _ = cli.Get("abc") +// fmt.Printf("%s\n", resp.Kvs[0].Value) +// // Output: 456 +// +package namespace diff --git a/deps/github.com/coreos/etcd/clientv3/namespace/kv.go b/deps/github.com/coreos/etcd/clientv3/namespace/kv.go new file mode 100644 index 000000000..2b759e0d3 --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/namespace/kv.go @@ -0,0 +1,189 @@ +// Copyright 2017 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. + +package namespace + +import ( + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "golang.org/x/net/context" +) + +type kvPrefix struct { + clientv3.KV + pfx string +} + +// NewKV wraps a KV instance so that all requests +// are prefixed with a given string. +func NewKV(kv clientv3.KV, prefix string) clientv3.KV { + return &kvPrefix{kv, prefix} +} + +func (kv *kvPrefix) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) { + if len(key) == 0 { + return nil, rpctypes.ErrEmptyKey + } + op := kv.prefixOp(clientv3.OpPut(key, val, opts...)) + r, err := kv.KV.Do(ctx, op) + if err != nil { + return nil, err + } + put := r.Put() + kv.unprefixPutResponse(put) + return put, nil +} + +func (kv *kvPrefix) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) { + if len(key) == 0 { + return nil, rpctypes.ErrEmptyKey + } + r, err := kv.KV.Do(ctx, kv.prefixOp(clientv3.OpGet(key, opts...))) + if err != nil { + return nil, err + } + get := r.Get() + kv.unprefixGetResponse(get) + return get, nil +} + +func (kv *kvPrefix) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error) { + if len(key) == 0 { + return nil, rpctypes.ErrEmptyKey + } + r, err := kv.KV.Do(ctx, kv.prefixOp(clientv3.OpDelete(key, opts...))) + if err != nil { + return nil, err + } + del := r.Del() + kv.unprefixDeleteResponse(del) + return del, nil +} + +func (kv *kvPrefix) Do(ctx context.Context, op clientv3.Op) (clientv3.OpResponse, error) { + if len(op.KeyBytes()) == 0 { + return clientv3.OpResponse{}, rpctypes.ErrEmptyKey + } + r, err := kv.KV.Do(ctx, kv.prefixOp(op)) + if err != nil { + return r, err + } + switch { + case r.Get() != nil: + kv.unprefixGetResponse(r.Get()) + case r.Put() != nil: + kv.unprefixPutResponse(r.Put()) + case r.Del() != nil: + kv.unprefixDeleteResponse(r.Del()) + } + return r, nil +} + +type txnPrefix struct { + clientv3.Txn + kv *kvPrefix +} + +func (kv *kvPrefix) Txn(ctx context.Context) clientv3.Txn { + return &txnPrefix{kv.KV.Txn(ctx), kv} +} + +func (txn *txnPrefix) If(cs ...clientv3.Cmp) clientv3.Txn { + newCmps := make([]clientv3.Cmp, len(cs)) + for i := range cs { + newCmps[i] = cs[i] + pfxKey, _ := txn.kv.prefixInterval(cs[i].KeyBytes(), nil) + newCmps[i].WithKeyBytes(pfxKey) + } + txn.Txn = txn.Txn.If(newCmps...) + return txn +} + +func (txn *txnPrefix) Then(ops ...clientv3.Op) clientv3.Txn { + newOps := make([]clientv3.Op, len(ops)) + for i := range ops { + newOps[i] = txn.kv.prefixOp(ops[i]) + } + txn.Txn = txn.Txn.Then(newOps...) + return txn +} + +func (txn *txnPrefix) Else(ops ...clientv3.Op) clientv3.Txn { + newOps := make([]clientv3.Op, len(ops)) + for i := range ops { + newOps[i] = txn.kv.prefixOp(ops[i]) + } + txn.Txn = txn.Txn.Else(newOps...) + return txn +} + +func (txn *txnPrefix) Commit() (*clientv3.TxnResponse, error) { + resp, err := txn.Txn.Commit() + if err != nil { + return nil, err + } + txn.kv.unprefixTxnResponse(resp) + return resp, nil +} + +func (kv *kvPrefix) prefixOp(op clientv3.Op) clientv3.Op { + begin, end := kv.prefixInterval(op.KeyBytes(), op.RangeBytes()) + op.WithKeyBytes(begin) + op.WithRangeBytes(end) + return op +} + +func (kv *kvPrefix) unprefixGetResponse(resp *clientv3.GetResponse) { + for i := range resp.Kvs { + resp.Kvs[i].Key = resp.Kvs[i].Key[len(kv.pfx):] + } +} + +func (kv *kvPrefix) unprefixPutResponse(resp *clientv3.PutResponse) { + if resp.PrevKv != nil { + resp.PrevKv.Key = resp.PrevKv.Key[len(kv.pfx):] + } +} + +func (kv *kvPrefix) unprefixDeleteResponse(resp *clientv3.DeleteResponse) { + for i := range resp.PrevKvs { + resp.PrevKvs[i].Key = resp.PrevKvs[i].Key[len(kv.pfx):] + } +} + +func (kv *kvPrefix) unprefixTxnResponse(resp *clientv3.TxnResponse) { + for _, r := range resp.Responses { + switch tv := r.Response.(type) { + case *pb.ResponseOp_ResponseRange: + if tv.ResponseRange != nil { + kv.unprefixGetResponse((*clientv3.GetResponse)(tv.ResponseRange)) + } + case *pb.ResponseOp_ResponsePut: + if tv.ResponsePut != nil { + kv.unprefixPutResponse((*clientv3.PutResponse)(tv.ResponsePut)) + } + case *pb.ResponseOp_ResponseDeleteRange: + if tv.ResponseDeleteRange != nil { + kv.unprefixDeleteResponse((*clientv3.DeleteResponse)(tv.ResponseDeleteRange)) + } + default: + } + } +} + +func (p *kvPrefix) prefixInterval(key, end []byte) (pfxKey []byte, pfxEnd []byte) { + return prefixInterval(p.pfx, key, end) +} diff --git a/deps/github.com/coreos/etcd/clientv3/namespace/lease.go b/deps/github.com/coreos/etcd/clientv3/namespace/lease.go new file mode 100644 index 000000000..c3167fa5d --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/namespace/lease.go @@ -0,0 +1,58 @@ +// Copyright 2017 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. + +package namespace + +import ( + "bytes" + + "github.com/coreos/etcd/clientv3" + + "golang.org/x/net/context" +) + +type leasePrefix struct { + clientv3.Lease + pfx []byte +} + +// NewLease wraps a Lease interface to filter for only keys with a prefix +// and remove that prefix when fetching attached keys through TimeToLive. +func NewLease(l clientv3.Lease, prefix string) clientv3.Lease { + return &leasePrefix{l, []byte(prefix)} +} + +func (l *leasePrefix) TimeToLive(ctx context.Context, id clientv3.LeaseID, opts ...clientv3.LeaseOption) (*clientv3.LeaseTimeToLiveResponse, error) { + resp, err := l.Lease.TimeToLive(ctx, id, opts...) + if err != nil { + return nil, err + } + if len(resp.Keys) > 0 { + var outKeys [][]byte + for i := range resp.Keys { + if len(resp.Keys[i]) < len(l.pfx) { + // too short + continue + } + if !bytes.Equal(resp.Keys[i][:len(l.pfx)], l.pfx) { + // doesn't match prefix + continue + } + // strip prefix + outKeys = append(outKeys, resp.Keys[i][len(l.pfx):]) + } + resp.Keys = outKeys + } + return resp, nil +} diff --git a/deps/github.com/coreos/etcd/clientv3/namespace/util.go b/deps/github.com/coreos/etcd/clientv3/namespace/util.go new file mode 100644 index 000000000..ecf04046c --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/namespace/util.go @@ -0,0 +1,42 @@ +// Copyright 2017 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. + +package namespace + +func prefixInterval(pfx string, key, end []byte) (pfxKey []byte, pfxEnd []byte) { + pfxKey = make([]byte, len(pfx)+len(key)) + copy(pfxKey[copy(pfxKey, pfx):], key) + + if len(end) == 1 && end[0] == 0 { + // the edge of the keyspace + pfxEnd = make([]byte, len(pfx)) + copy(pfxEnd, pfx) + ok := false + for i := len(pfxEnd) - 1; i >= 0; i-- { + if pfxEnd[i]++; pfxEnd[i] != 0 { + ok = true + break + } + } + if !ok { + // 0xff..ff => 0x00 + pfxEnd = []byte{0} + } + } else if len(end) >= 1 { + pfxEnd = make([]byte, len(pfx)+len(end)) + copy(pfxEnd[copy(pfxEnd, pfx):], end) + } + + return pfxKey, pfxEnd +} diff --git a/deps/github.com/coreos/etcd/clientv3/namespace/watch.go b/deps/github.com/coreos/etcd/clientv3/namespace/watch.go new file mode 100644 index 000000000..990721152 --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/namespace/watch.go @@ -0,0 +1,84 @@ +// Copyright 2017 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. + +package namespace + +import ( + "sync" + + "github.com/coreos/etcd/clientv3" + + "golang.org/x/net/context" +) + +type watcherPrefix struct { + clientv3.Watcher + pfx string + + wg sync.WaitGroup + stopc chan struct{} + stopOnce sync.Once +} + +// NewWatcher wraps a Watcher instance so that all Watch requests +// are prefixed with a given string and all Watch responses have +// the prefix removed. +func NewWatcher(w clientv3.Watcher, prefix string) clientv3.Watcher { + return &watcherPrefix{Watcher: w, pfx: prefix, stopc: make(chan struct{})} +} + +func (w *watcherPrefix) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan { + // since OpOption is opaque, determine range for prefixing through an OpGet + op := clientv3.OpGet(key, opts...) + end := op.RangeBytes() + pfxBegin, pfxEnd := prefixInterval(w.pfx, []byte(key), end) + if pfxEnd != nil { + opts = append(opts, clientv3.WithRange(string(pfxEnd))) + } + + wch := w.Watcher.Watch(ctx, string(pfxBegin), opts...) + + // translate watch events from prefixed to unprefixed + pfxWch := make(chan clientv3.WatchResponse) + w.wg.Add(1) + go func() { + defer func() { + close(pfxWch) + w.wg.Done() + }() + for wr := range wch { + for i := range wr.Events { + wr.Events[i].Kv.Key = wr.Events[i].Kv.Key[len(w.pfx):] + if wr.Events[i].PrevKv != nil { + wr.Events[i].PrevKv.Key = wr.Events[i].Kv.Key + } + } + select { + case pfxWch <- wr: + case <-ctx.Done(): + return + case <-w.stopc: + return + } + } + }() + return pfxWch +} + +func (w *watcherPrefix) Close() error { + err := w.Watcher.Close() + w.stopOnce.Do(func() { close(w.stopc) }) + w.wg.Wait() + return err +} diff --git a/deps/github.com/coreos/etcd/clientv3/naming/doc.go b/deps/github.com/coreos/etcd/clientv3/naming/doc.go new file mode 100644 index 000000000..71608cc73 --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/naming/doc.go @@ -0,0 +1,56 @@ +// Copyright 2017 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. + +// Package naming provides an etcd-backed gRPC resolver for discovering gRPC services. +// +// To use, first import the packages: +// +// import ( +// "github.com/coreos/etcd/clientv3" +// etcdnaming "github.com/coreos/etcd/clientv3/naming" +// +// "google.golang.org/grpc" +// "google.golang.org/grpc/naming" +// ) +// +// First, register new endpoint addresses for a service: +// +// func etcdAdd(c *clientv3.Client, service, addr string) error { +// r := &etcdnaming.GRPCResolver{Client: c} +// return r.Update(c.Ctx(), service, naming.Update{Op: naming.Add, Addr: addr}) +// } +// +// Dial an RPC service using the etcd gRPC resolver and a gRPC Balancer: +// +// func etcdDial(c *clientv3.Client, service string) (*grpc.ClientConn, error) { +// r := &etcdnaming.GRPCResolver{Client: c} +// b := grpc.RoundRobin(r) +// return grpc.Dial(service, grpc.WithBalancer(b)) +// } +// +// Optionally, force delete an endpoint: +// +// func etcdDelete(c *clientv3, service, addr string) error { +// r := &etcdnaming.GRPCResolver{Client: c} +// return r.Update(c.Ctx(), "my-service", naming.Update{Op: naming.Delete, Addr: "1.2.3.4"}) +// } +// +// Or register an expiring endpoint with a lease: +// +// func etcdLeaseAdd(c *clientv3.Client, lid clientv3.LeaseID, service, addr string) error { +// r := &etcdnaming.GRPCResolver{Client: c} +// return r.Update(c.Ctx(), service, naming.Update{Op: naming.Add, Addr: addr}, clientv3.WithLease(lid)) +// } +// +package naming diff --git a/deps/github.com/coreos/etcd/clientv3/naming/grpc.go b/deps/github.com/coreos/etcd/clientv3/naming/grpc.go new file mode 100644 index 000000000..7fabc4f10 --- /dev/null +++ b/deps/github.com/coreos/etcd/clientv3/naming/grpc.go @@ -0,0 +1,132 @@ +// 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. + +package naming + +import ( + "encoding/json" + "fmt" + + etcd "github.com/coreos/etcd/clientv3" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/naming" + "google.golang.org/grpc/status" + + "golang.org/x/net/context" +) + +var ErrWatcherClosed = fmt.Errorf("naming: watch closed") + +// GRPCResolver creates a grpc.Watcher for a target to track its resolution changes. +type GRPCResolver struct { + // Client is an initialized etcd client. + Client *etcd.Client +} + +func (gr *GRPCResolver) Update(ctx context.Context, target string, nm naming.Update, opts ...etcd.OpOption) (err error) { + switch nm.Op { + case naming.Add: + var v []byte + if v, err = json.Marshal(nm); err != nil { + return status.Error(codes.InvalidArgument, err.Error()) + } + _, err = gr.Client.KV.Put(ctx, target+"/"+nm.Addr, string(v), opts...) + case naming.Delete: + _, err = gr.Client.Delete(ctx, target+"/"+nm.Addr, opts...) + default: + return status.Error(codes.InvalidArgument, "naming: bad naming op") + } + return err +} + +func (gr *GRPCResolver) Resolve(target string) (naming.Watcher, error) { + ctx, cancel := context.WithCancel(context.Background()) + w := &gRPCWatcher{c: gr.Client, target: target + "/", ctx: ctx, cancel: cancel} + return w, nil +} + +type gRPCWatcher struct { + c *etcd.Client + target string + ctx context.Context + cancel context.CancelFunc + wch etcd.WatchChan + err error +} + +// Next gets the next set of updates from the etcd resolver. +// Calls to Next should be serialized; concurrent calls are not safe since +// there is no way to reconcile the update ordering. +func (gw *gRPCWatcher) Next() ([]*naming.Update, error) { + if gw.wch == nil { + // first Next() returns all addresses + return gw.firstNext() + } + if gw.err != nil { + return nil, gw.err + } + + // process new events on target/* + wr, ok := <-gw.wch + if !ok { + gw.err = status.Error(codes.Unavailable, ErrWatcherClosed.Error()) + return nil, gw.err + } + if gw.err = wr.Err(); gw.err != nil { + return nil, gw.err + } + + updates := make([]*naming.Update, 0, len(wr.Events)) + for _, e := range wr.Events { + var jupdate naming.Update + var err error + switch e.Type { + case etcd.EventTypePut: + err = json.Unmarshal(e.Kv.Value, &jupdate) + jupdate.Op = naming.Add + case etcd.EventTypeDelete: + err = json.Unmarshal(e.PrevKv.Value, &jupdate) + jupdate.Op = naming.Delete + } + if err == nil { + updates = append(updates, &jupdate) + } + } + return updates, nil +} + +func (gw *gRPCWatcher) firstNext() ([]*naming.Update, error) { + // Use serialized request so resolution still works if the target etcd + // server is partitioned away from the quorum. + resp, err := gw.c.Get(gw.ctx, gw.target, etcd.WithPrefix(), etcd.WithSerializable()) + if gw.err = err; err != nil { + return nil, err + } + + updates := make([]*naming.Update, 0, len(resp.Kvs)) + for _, kv := range resp.Kvs { + var jupdate naming.Update + if err := json.Unmarshal(kv.Value, &jupdate); err != nil { + continue + } + updates = append(updates, &jupdate) + } + + opts := []etcd.OpOption{etcd.WithRev(resp.Header.Revision + 1), etcd.WithPrefix(), etcd.WithPrevKV()} + gw.wch = gw.c.Watch(gw.ctx, gw.target, opts...) + return updates, nil +} + +func (gw *gRPCWatcher) Close() { gw.cancel() } diff --git a/deps/github.com/coreos/etcd/compactor/compactor.go b/deps/github.com/coreos/etcd/compactor/compactor.go new file mode 100644 index 000000000..5cf7b6509 --- /dev/null +++ b/deps/github.com/coreos/etcd/compactor/compactor.go @@ -0,0 +1,137 @@ +// 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. + +package compactor + +import ( + "sync" + "time" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/pkg/capnslog" + "github.com/jonboulle/clockwork" + "golang.org/x/net/context" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "compactor") +) + +const ( + checkCompactionInterval = 5 * time.Minute + executeCompactionInterval = time.Hour +) + +type Compactable interface { + Compact(ctx context.Context, r *pb.CompactionRequest) (*pb.CompactionResponse, error) +} + +type RevGetter interface { + Rev() int64 +} + +// Periodic compacts the log by purging revisions older than +// the configured retention time. Compaction happens hourly. +type Periodic struct { + clock clockwork.Clock + periodInHour int + + rg RevGetter + c Compactable + + revs []int64 + ctx context.Context + cancel context.CancelFunc + + mu sync.Mutex + paused bool +} + +func NewPeriodic(h int, rg RevGetter, c Compactable) *Periodic { + return &Periodic{ + clock: clockwork.NewRealClock(), + periodInHour: h, + rg: rg, + c: c, + } +} + +func (t *Periodic) Run() { + t.ctx, t.cancel = context.WithCancel(context.Background()) + t.revs = make([]int64, 0) + clock := t.clock + + go func() { + last := clock.Now() + for { + t.revs = append(t.revs, t.rg.Rev()) + select { + case <-t.ctx.Done(): + return + case <-clock.After(checkCompactionInterval): + t.mu.Lock() + p := t.paused + t.mu.Unlock() + if p { + continue + } + } + + if clock.Now().Sub(last) < executeCompactionInterval { + continue + } + + rev, remaining := t.getRev(t.periodInHour) + if rev < 0 { + continue + } + + plog.Noticef("Starting auto-compaction at revision %d", rev) + _, err := t.c.Compact(t.ctx, &pb.CompactionRequest{Revision: rev}) + if err == nil || err == mvcc.ErrCompacted { + t.revs = remaining + last = clock.Now() + plog.Noticef("Finished auto-compaction at revision %d", rev) + } else { + plog.Noticef("Failed auto-compaction at revision %d (%v)", rev, err) + plog.Noticef("Retry after %v", checkCompactionInterval) + } + } + }() +} + +func (t *Periodic) Stop() { + t.cancel() +} + +func (t *Periodic) Pause() { + t.mu.Lock() + defer t.mu.Unlock() + t.paused = true +} + +func (t *Periodic) Resume() { + t.mu.Lock() + defer t.mu.Unlock() + t.paused = false +} + +func (t *Periodic) getRev(h int) (int64, []int64) { + i := len(t.revs) - int(time.Duration(h)*time.Hour/checkCompactionInterval) + if i < 0 { + return -1, t.revs + } + return t.revs[i], t.revs[i+1:] +} diff --git a/deps/github.com/coreos/etcd/compactor/doc.go b/deps/github.com/coreos/etcd/compactor/doc.go new file mode 100644 index 000000000..cb158340e --- /dev/null +++ b/deps/github.com/coreos/etcd/compactor/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package compactor implements automated policies for compacting etcd's mvcc storage. +package compactor diff --git a/deps/github.com/coreos/etcd/discovery/discovery.go b/deps/github.com/coreos/etcd/discovery/discovery.go new file mode 100644 index 000000000..edc842ffb --- /dev/null +++ b/deps/github.com/coreos/etcd/discovery/discovery.go @@ -0,0 +1,362 @@ +// Copyright 2015 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. + +// Package discovery provides an implementation of the cluster discovery that +// is used by etcd. +package discovery + +import ( + "errors" + "fmt" + "math" + "net/http" + "net/url" + "path" + "sort" + "strconv" + "strings" + "time" + + "github.com/coreos/etcd/client" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/pkg/capnslog" + "github.com/jonboulle/clockwork" + "golang.org/x/net/context" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "discovery") + + ErrInvalidURL = errors.New("discovery: invalid URL") + ErrBadSizeKey = errors.New("discovery: size key is bad") + ErrSizeNotFound = errors.New("discovery: size key not found") + ErrTokenNotFound = errors.New("discovery: token not found") + ErrDuplicateID = errors.New("discovery: found duplicate id") + ErrDuplicateName = errors.New("discovery: found duplicate name") + ErrFullCluster = errors.New("discovery: cluster is full") + ErrTooManyRetries = errors.New("discovery: too many retries") + ErrBadDiscoveryEndpoint = errors.New("discovery: bad discovery endpoint") +) + +var ( + // Number of retries discovery will attempt before giving up and erroring out. + nRetries = uint(math.MaxUint32) + maxExpoentialRetries = uint(8) +) + +// JoinCluster will connect to the discovery service at the given url, and +// register the server represented by the given id and config to the cluster +func JoinCluster(durl, dproxyurl string, id types.ID, config string) (string, error) { + d, err := newDiscovery(durl, dproxyurl, id) + if err != nil { + return "", err + } + return d.joinCluster(config) +} + +// GetCluster will connect to the discovery service at the given url and +// retrieve a string describing the cluster +func GetCluster(durl, dproxyurl string) (string, error) { + d, err := newDiscovery(durl, dproxyurl, 0) + if err != nil { + return "", err + } + return d.getCluster() +} + +type discovery struct { + cluster string + id types.ID + c client.KeysAPI + retries uint + url *url.URL + + clock clockwork.Clock +} + +// newProxyFunc builds a proxy function from the given string, which should +// represent a URL that can be used as a proxy. It performs basic +// sanitization of the URL and returns any error encountered. +func newProxyFunc(proxy string) (func(*http.Request) (*url.URL, error), error) { + if proxy == "" { + return nil, nil + } + // Do a small amount of URL sanitization to help the user + // Derived from net/http.ProxyFromEnvironment + proxyURL, err := url.Parse(proxy) + if err != nil || !strings.HasPrefix(proxyURL.Scheme, "http") { + // proxy was bogus. Try prepending "http://" to it and + // see if that parses correctly. If not, we ignore the + // error and complain about the original one + var err2 error + proxyURL, err2 = url.Parse("http://" + proxy) + if err2 == nil { + err = nil + } + } + if err != nil { + return nil, fmt.Errorf("invalid proxy address %q: %v", proxy, err) + } + + plog.Infof("using proxy %q", proxyURL.String()) + return http.ProxyURL(proxyURL), nil +} + +func newDiscovery(durl, dproxyurl string, id types.ID) (*discovery, error) { + u, err := url.Parse(durl) + if err != nil { + return nil, err + } + token := u.Path + u.Path = "" + pf, err := newProxyFunc(dproxyurl) + if err != nil { + return nil, err + } + + // TODO: add ResponseHeaderTimeout back when watch on discovery service writes header early + tr, err := transport.NewTransport(transport.TLSInfo{}, 30*time.Second) + if err != nil { + return nil, err + } + tr.Proxy = pf + cfg := client.Config{ + Transport: tr, + Endpoints: []string{u.String()}, + } + c, err := client.New(cfg) + if err != nil { + return nil, err + } + dc := client.NewKeysAPIWithPrefix(c, "") + return &discovery{ + cluster: token, + c: dc, + id: id, + url: u, + clock: clockwork.NewRealClock(), + }, nil +} + +func (d *discovery) joinCluster(config string) (string, error) { + // fast path: if the cluster is full, return the error + // do not need to register to the cluster in this case. + if _, _, _, err := d.checkCluster(); err != nil { + return "", err + } + + if err := d.createSelf(config); err != nil { + // Fails, even on a timeout, if createSelf times out. + // TODO(barakmich): Retrying the same node might want to succeed here + // (ie, createSelf should be idempotent for discovery). + return "", err + } + + nodes, size, index, err := d.checkCluster() + if err != nil { + return "", err + } + + all, err := d.waitNodes(nodes, size, index) + if err != nil { + return "", err + } + + return nodesToCluster(all, size) +} + +func (d *discovery) getCluster() (string, error) { + nodes, size, index, err := d.checkCluster() + if err != nil { + if err == ErrFullCluster { + return nodesToCluster(nodes, size) + } + return "", err + } + + all, err := d.waitNodes(nodes, size, index) + if err != nil { + return "", err + } + return nodesToCluster(all, size) +} + +func (d *discovery) createSelf(contents string) error { + ctx, cancel := context.WithTimeout(context.Background(), client.DefaultRequestTimeout) + resp, err := d.c.Create(ctx, d.selfKey(), contents) + cancel() + if err != nil { + if eerr, ok := err.(client.Error); ok && eerr.Code == client.ErrorCodeNodeExist { + return ErrDuplicateID + } + return err + } + + // ensure self appears on the server we connected to + w := d.c.Watcher(d.selfKey(), &client.WatcherOptions{AfterIndex: resp.Node.CreatedIndex - 1}) + _, err = w.Next(context.Background()) + return err +} + +func (d *discovery) checkCluster() ([]*client.Node, int, uint64, error) { + configKey := path.Join("/", d.cluster, "_config") + ctx, cancel := context.WithTimeout(context.Background(), client.DefaultRequestTimeout) + // find cluster size + resp, err := d.c.Get(ctx, path.Join(configKey, "size"), nil) + cancel() + if err != nil { + if eerr, ok := err.(*client.Error); ok && eerr.Code == client.ErrorCodeKeyNotFound { + return nil, 0, 0, ErrSizeNotFound + } + if err == client.ErrInvalidJSON { + return nil, 0, 0, ErrBadDiscoveryEndpoint + } + if ce, ok := err.(*client.ClusterError); ok { + plog.Error(ce.Detail()) + return d.checkClusterRetry() + } + return nil, 0, 0, err + } + size, err := strconv.Atoi(resp.Node.Value) + if err != nil { + return nil, 0, 0, ErrBadSizeKey + } + + ctx, cancel = context.WithTimeout(context.Background(), client.DefaultRequestTimeout) + resp, err = d.c.Get(ctx, d.cluster, nil) + cancel() + if err != nil { + if ce, ok := err.(*client.ClusterError); ok { + plog.Error(ce.Detail()) + return d.checkClusterRetry() + } + return nil, 0, 0, err + } + var nodes []*client.Node + // append non-config keys to nodes + for _, n := range resp.Node.Nodes { + if !(path.Base(n.Key) == path.Base(configKey)) { + nodes = append(nodes, n) + } + } + + snodes := sortableNodes{nodes} + sort.Sort(snodes) + + // find self position + for i := range nodes { + if path.Base(nodes[i].Key) == path.Base(d.selfKey()) { + break + } + if i >= size-1 { + return nodes[:size], size, resp.Index, ErrFullCluster + } + } + return nodes, size, resp.Index, nil +} + +func (d *discovery) logAndBackoffForRetry(step string) { + d.retries++ + // logAndBackoffForRetry stops exponential backoff when the retries are more than maxExpoentialRetries and is set to a constant backoff afterward. + retries := d.retries + if retries > maxExpoentialRetries { + retries = maxExpoentialRetries + } + retryTimeInSecond := time.Duration(0x1< size { + nodes = nodes[:size] + } + // watch from the next index + w := d.c.Watcher(d.cluster, &client.WatcherOptions{AfterIndex: index, Recursive: true}) + all := make([]*client.Node, len(nodes)) + copy(all, nodes) + for _, n := range all { + if path.Base(n.Key) == path.Base(d.selfKey()) { + plog.Noticef("found self %s in the cluster", path.Base(d.selfKey())) + } else { + plog.Noticef("found peer %s in the cluster", path.Base(n.Key)) + } + } + + // wait for others + for len(all) < size { + plog.Noticef("found %d peer(s), waiting for %d more", len(all), size-len(all)) + resp, err := w.Next(context.Background()) + if err != nil { + if ce, ok := err.(*client.ClusterError); ok { + plog.Error(ce.Detail()) + return d.waitNodesRetry() + } + return nil, err + } + plog.Noticef("found peer %s in the cluster", path.Base(resp.Node.Key)) + all = append(all, resp.Node) + } + plog.Noticef("found %d needed peer(s)", len(all)) + return all, nil +} + +func (d *discovery) selfKey() string { + return path.Join("/", d.cluster, d.id.String()) +} + +func nodesToCluster(ns []*client.Node, size int) (string, error) { + s := make([]string, len(ns)) + for i, n := range ns { + s[i] = n.Value + } + us := strings.Join(s, ",") + m, err := types.NewURLsMap(us) + if err != nil { + return us, ErrInvalidURL + } + if m.Len() != size { + return us, ErrDuplicateName + } + return us, nil +} + +type sortableNodes struct{ Nodes []*client.Node } + +func (ns sortableNodes) Len() int { return len(ns.Nodes) } +func (ns sortableNodes) Less(i, j int) bool { + return ns.Nodes[i].CreatedIndex < ns.Nodes[j].CreatedIndex +} +func (ns sortableNodes) Swap(i, j int) { ns.Nodes[i], ns.Nodes[j] = ns.Nodes[j], ns.Nodes[i] } diff --git a/deps/github.com/coreos/etcd/embed/config.go b/deps/github.com/coreos/etcd/embed/config.go new file mode 100644 index 000000000..90efb3937 --- /dev/null +++ b/deps/github.com/coreos/etcd/embed/config.go @@ -0,0 +1,464 @@ +// 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. + +package embed + +import ( + "fmt" + "io/ioutil" + "net" + "net/http" + "net/url" + "strings" + "time" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/pkg/cors" + "github.com/coreos/etcd/pkg/netutil" + "github.com/coreos/etcd/pkg/srv" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + + "github.com/ghodss/yaml" + "google.golang.org/grpc" +) + +const ( + ClusterStateFlagNew = "new" + ClusterStateFlagExisting = "existing" + + DefaultName = "default" + DefaultMaxSnapshots = 5 + DefaultMaxWALs = 5 + DefaultMaxRequestBytes = 1.5 * 1024 * 1024 + DefaultGRPCKeepAliveMinTime = 5 * time.Second + DefaultGRPCKeepAliveInterval = 2 * time.Hour + DefaultGRPCKeepAliveTimeout = 20 * time.Second + + DefaultListenPeerURLs = "http://localhost:2380" + DefaultListenClientURLs = "http://localhost:2379" + + // maxElectionMs specifies the maximum value of election timeout. + // More details are listed in ../Documentation/tuning.md#time-parameters. + maxElectionMs = 50000 +) + +var ( + ErrConflictBootstrapFlags = fmt.Errorf("multiple discovery or bootstrap flags are set. " + + "Choose one of \"initial-cluster\", \"discovery\" or \"discovery-srv\"") + ErrUnsetAdvertiseClientURLsFlag = fmt.Errorf("--advertise-client-urls is required when --listen-client-urls is set explicitly") + + DefaultInitialAdvertisePeerURLs = "http://localhost:2380" + DefaultAdvertiseClientURLs = "http://localhost:2379" + + defaultHostname string + defaultHostStatus error +) + +func init() { + defaultHostname, defaultHostStatus = netutil.GetDefaultHost() +} + +// Config holds the arguments for configuring an etcd server. +type Config struct { + // member + + CorsInfo *cors.CORSInfo + LPUrls, LCUrls []url.URL + Dir string `json:"data-dir"` + WalDir string `json:"wal-dir"` + MaxSnapFiles uint `json:"max-snapshots"` + MaxWalFiles uint `json:"max-wals"` + Name string `json:"name"` + SnapCount uint64 `json:"snapshot-count"` + AutoCompactionRetention int `json:"auto-compaction-retention"` + + // TickMs is the number of milliseconds between heartbeat ticks. + // TODO: decouple tickMs and heartbeat tick (current heartbeat tick = 1). + // make ticks a cluster wide configuration. + TickMs uint `json:"heartbeat-interval"` + ElectionMs uint `json:"election-timeout"` + QuotaBackendBytes int64 `json:"quota-backend-bytes"` + MaxRequestBytes uint `json:"max-request-bytes"` + + // gRPC server options + + // GRPCKeepAliveMinTime is the minimum interval that a client should + // wait before pinging server. When client pings "too fast", server + // sends goaway and closes the connection (errors: too_many_pings, + // http2.ErrCodeEnhanceYourCalm). When too slow, nothing happens. + // Server expects client pings only when there is any active streams + // (PermitWithoutStream is set false). + GRPCKeepAliveMinTime time.Duration `json:"grpc-keepalive-min-time"` + // GRPCKeepAliveInterval is the frequency of server-to-client ping + // to check if a connection is alive. Close a non-responsive connection + // after an additional duration of Timeout. 0 to disable. + GRPCKeepAliveInterval time.Duration `json:"grpc-keepalive-interval"` + // GRPCKeepAliveTimeout is the additional duration of wait + // before closing a non-responsive connection. 0 to disable. + GRPCKeepAliveTimeout time.Duration `json:"grpc-keepalive-timeout"` + + // clustering + + APUrls, ACUrls []url.URL + ClusterState string `json:"initial-cluster-state"` + DNSCluster string `json:"discovery-srv"` + Dproxy string `json:"discovery-proxy"` + Durl string `json:"discovery"` + InitialCluster string `json:"initial-cluster"` + InitialClusterToken string `json:"initial-cluster-token"` + StrictReconfigCheck bool `json:"strict-reconfig-check"` + EnableV2 bool `json:"enable-v2"` + + // security + + ClientTLSInfo transport.TLSInfo + ClientAutoTLS bool + PeerTLSInfo transport.TLSInfo + PeerAutoTLS bool + + // debug + + Debug bool `json:"debug"` + LogPkgLevels string `json:"log-package-levels"` + EnablePprof bool `json:"enable-pprof"` + Metrics string `json:"metrics"` + + // ForceNewCluster starts a new cluster even if previously started; unsafe. + ForceNewCluster bool `json:"force-new-cluster"` + + // UserHandlers is for registering users handlers and only used for + // embedding etcd into other applications. + // The map key is the route path for the handler, and + // you must ensure it can't be conflicted with etcd's. + UserHandlers map[string]http.Handler `json:"-"` + // ServiceRegister is for registering users' gRPC services. A simple usage example: + // cfg := embed.NewConfig() + // cfg.ServerRegister = func(s *grpc.Server) { + // pb.RegisterFooServer(s, &fooServer{}) + // pb.RegisterBarServer(s, &barServer{}) + // } + // embed.StartEtcd(cfg) + ServiceRegister func(*grpc.Server) `json:"-"` + + // auth + + AuthToken string `json:"auth-token"` +} + +// configYAML holds the config suitable for yaml parsing +type configYAML struct { + Config + configJSON +} + +// configJSON has file options that are translated into Config options +type configJSON struct { + LPUrlsJSON string `json:"listen-peer-urls"` + LCUrlsJSON string `json:"listen-client-urls"` + CorsJSON string `json:"cors"` + APUrlsJSON string `json:"initial-advertise-peer-urls"` + ACUrlsJSON string `json:"advertise-client-urls"` + ClientSecurityJSON securityConfig `json:"client-transport-security"` + PeerSecurityJSON securityConfig `json:"peer-transport-security"` +} + +type securityConfig struct { + CAFile string `json:"ca-file"` + CertFile string `json:"cert-file"` + KeyFile string `json:"key-file"` + CertAuth bool `json:"client-cert-auth"` + TrustedCAFile string `json:"trusted-ca-file"` + AutoTLS bool `json:"auto-tls"` +} + +// NewConfig creates a new Config populated with default values. +func NewConfig() *Config { + lpurl, _ := url.Parse(DefaultListenPeerURLs) + apurl, _ := url.Parse(DefaultInitialAdvertisePeerURLs) + lcurl, _ := url.Parse(DefaultListenClientURLs) + acurl, _ := url.Parse(DefaultAdvertiseClientURLs) + cfg := &Config{ + CorsInfo: &cors.CORSInfo{}, + MaxSnapFiles: DefaultMaxSnapshots, + MaxWalFiles: DefaultMaxWALs, + Name: DefaultName, + SnapCount: etcdserver.DefaultSnapCount, + MaxRequestBytes: DefaultMaxRequestBytes, + GRPCKeepAliveMinTime: DefaultGRPCKeepAliveMinTime, + GRPCKeepAliveInterval: DefaultGRPCKeepAliveInterval, + GRPCKeepAliveTimeout: DefaultGRPCKeepAliveTimeout, + TickMs: 100, + ElectionMs: 1000, + LPUrls: []url.URL{*lpurl}, + LCUrls: []url.URL{*lcurl}, + APUrls: []url.URL{*apurl}, + ACUrls: []url.URL{*acurl}, + ClusterState: ClusterStateFlagNew, + InitialClusterToken: "etcd-cluster", + StrictReconfigCheck: true, + Metrics: "basic", + EnableV2: true, + AuthToken: "simple", + } + cfg.InitialCluster = cfg.InitialClusterFromName(cfg.Name) + return cfg +} + +func ConfigFromFile(path string) (*Config, error) { + cfg := &configYAML{Config: *NewConfig()} + if err := cfg.configFromFile(path); err != nil { + return nil, err + } + return &cfg.Config, nil +} + +func (cfg *configYAML) configFromFile(path string) error { + b, err := ioutil.ReadFile(path) + if err != nil { + return err + } + + defaultInitialCluster := cfg.InitialCluster + + err = yaml.Unmarshal(b, cfg) + if err != nil { + return err + } + + if cfg.LPUrlsJSON != "" { + u, err := types.NewURLs(strings.Split(cfg.LPUrlsJSON, ",")) + if err != nil { + plog.Fatalf("unexpected error setting up listen-peer-urls: %v", err) + } + cfg.LPUrls = []url.URL(u) + } + + if cfg.LCUrlsJSON != "" { + u, err := types.NewURLs(strings.Split(cfg.LCUrlsJSON, ",")) + if err != nil { + plog.Fatalf("unexpected error setting up listen-client-urls: %v", err) + } + cfg.LCUrls = []url.URL(u) + } + + if cfg.CorsJSON != "" { + if err := cfg.CorsInfo.Set(cfg.CorsJSON); err != nil { + plog.Panicf("unexpected error setting up cors: %v", err) + } + } + + if cfg.APUrlsJSON != "" { + u, err := types.NewURLs(strings.Split(cfg.APUrlsJSON, ",")) + if err != nil { + plog.Fatalf("unexpected error setting up initial-advertise-peer-urls: %v", err) + } + cfg.APUrls = []url.URL(u) + } + + if cfg.ACUrlsJSON != "" { + u, err := types.NewURLs(strings.Split(cfg.ACUrlsJSON, ",")) + if err != nil { + plog.Fatalf("unexpected error setting up advertise-peer-urls: %v", err) + } + cfg.ACUrls = []url.URL(u) + } + + // If a discovery flag is set, clear default initial cluster set by InitialClusterFromName + if (cfg.Durl != "" || cfg.DNSCluster != "") && cfg.InitialCluster == defaultInitialCluster { + cfg.InitialCluster = "" + } + if cfg.ClusterState == "" { + cfg.ClusterState = ClusterStateFlagNew + } + + copySecurityDetails := func(tls *transport.TLSInfo, ysc *securityConfig) { + tls.CAFile = ysc.CAFile + tls.CertFile = ysc.CertFile + tls.KeyFile = ysc.KeyFile + tls.ClientCertAuth = ysc.CertAuth + tls.TrustedCAFile = ysc.TrustedCAFile + } + copySecurityDetails(&cfg.ClientTLSInfo, &cfg.ClientSecurityJSON) + copySecurityDetails(&cfg.PeerTLSInfo, &cfg.PeerSecurityJSON) + cfg.ClientAutoTLS = cfg.ClientSecurityJSON.AutoTLS + cfg.PeerAutoTLS = cfg.PeerSecurityJSON.AutoTLS + + return cfg.Validate() +} + +func (cfg *Config) Validate() error { + if err := checkBindURLs(cfg.LPUrls); err != nil { + return err + } + if err := checkBindURLs(cfg.LCUrls); err != nil { + return err + } + + // Check if conflicting flags are passed. + nSet := 0 + for _, v := range []bool{cfg.Durl != "", cfg.InitialCluster != "", cfg.DNSCluster != ""} { + if v { + nSet++ + } + } + + if cfg.ClusterState != ClusterStateFlagNew && cfg.ClusterState != ClusterStateFlagExisting { + return fmt.Errorf("unexpected clusterState %q", cfg.ClusterState) + } + + if nSet > 1 { + return ErrConflictBootstrapFlags + } + + if 5*cfg.TickMs > cfg.ElectionMs { + return fmt.Errorf("--election-timeout[%vms] should be at least as 5 times as --heartbeat-interval[%vms]", cfg.ElectionMs, cfg.TickMs) + } + if cfg.ElectionMs > maxElectionMs { + return fmt.Errorf("--election-timeout[%vms] is too long, and should be set less than %vms", cfg.ElectionMs, maxElectionMs) + } + + // check this last since proxying in etcdmain may make this OK + if cfg.LCUrls != nil && cfg.ACUrls == nil { + return ErrUnsetAdvertiseClientURLsFlag + } + + return nil +} + +// PeerURLsMapAndToken sets up an initial peer URLsMap and cluster token for bootstrap or discovery. +func (cfg *Config) PeerURLsMapAndToken(which string) (urlsmap types.URLsMap, token string, err error) { + token = cfg.InitialClusterToken + switch { + case cfg.Durl != "": + urlsmap = types.URLsMap{} + // If using discovery, generate a temporary cluster based on + // self's advertised peer URLs + urlsmap[cfg.Name] = cfg.APUrls + token = cfg.Durl + case cfg.DNSCluster != "": + clusterStrs, cerr := srv.GetCluster("etcd-server", cfg.Name, cfg.DNSCluster, cfg.APUrls) + if cerr != nil { + plog.Errorf("couldn't resolve during SRV discovery (%v)", cerr) + return nil, "", cerr + } + for _, s := range clusterStrs { + plog.Noticef("got bootstrap from DNS for etcd-server at %s", s) + } + clusterStr := strings.Join(clusterStrs, ",") + if strings.Contains(clusterStr, "https://") && cfg.PeerTLSInfo.CAFile == "" { + cfg.PeerTLSInfo.ServerName = cfg.DNSCluster + } + urlsmap, err = types.NewURLsMap(clusterStr) + // only etcd member must belong to the discovered cluster. + // proxy does not need to belong to the discovered cluster. + if which == "etcd" { + if _, ok := urlsmap[cfg.Name]; !ok { + return nil, "", fmt.Errorf("cannot find local etcd member %q in SRV records", cfg.Name) + } + } + default: + // We're statically configured, and cluster has appropriately been set. + urlsmap, err = types.NewURLsMap(cfg.InitialCluster) + } + return urlsmap, token, err +} + +func (cfg Config) InitialClusterFromName(name string) (ret string) { + if len(cfg.APUrls) == 0 { + return "" + } + n := name + if name == "" { + n = DefaultName + } + for i := range cfg.APUrls { + ret = ret + "," + n + "=" + cfg.APUrls[i].String() + } + return ret[1:] +} + +func (cfg Config) IsNewCluster() bool { return cfg.ClusterState == ClusterStateFlagNew } +func (cfg Config) ElectionTicks() int { return int(cfg.ElectionMs / cfg.TickMs) } + +func (cfg Config) defaultPeerHost() bool { + return len(cfg.APUrls) == 1 && cfg.APUrls[0].String() == DefaultInitialAdvertisePeerURLs +} + +func (cfg Config) defaultClientHost() bool { + return len(cfg.ACUrls) == 1 && cfg.ACUrls[0].String() == DefaultAdvertiseClientURLs +} + +// UpdateDefaultClusterFromName updates cluster advertise URLs with, if available, default host, +// if advertise URLs are default values(localhost:2379,2380) AND if listen URL is 0.0.0.0. +// e.g. advertise peer URL localhost:2380 or listen peer URL 0.0.0.0:2380 +// then the advertise peer host would be updated with machine's default host, +// while keeping the listen URL's port. +// User can work around this by explicitly setting URL with 127.0.0.1. +// It returns the default hostname, if used, and the error, if any, from getting the machine's default host. +// TODO: check whether fields are set instead of whether fields have default value +func (cfg *Config) UpdateDefaultClusterFromName(defaultInitialCluster string) (string, error) { + if defaultHostname == "" || defaultHostStatus != nil { + // update 'initial-cluster' when only the name is specified (e.g. 'etcd --name=abc') + if cfg.Name != DefaultName && cfg.InitialCluster == defaultInitialCluster { + cfg.InitialCluster = cfg.InitialClusterFromName(cfg.Name) + } + return "", defaultHostStatus + } + + used := false + pip, pport := cfg.LPUrls[0].Hostname(), cfg.LPUrls[0].Port() + if cfg.defaultPeerHost() && pip == "0.0.0.0" { + cfg.APUrls[0] = url.URL{Scheme: cfg.APUrls[0].Scheme, Host: fmt.Sprintf("%s:%s", defaultHostname, pport)} + used = true + } + // update 'initial-cluster' when only the name is specified (e.g. 'etcd --name=abc') + if cfg.Name != DefaultName && cfg.InitialCluster == defaultInitialCluster { + cfg.InitialCluster = cfg.InitialClusterFromName(cfg.Name) + } + + cip, cport := cfg.LCUrls[0].Hostname(), cfg.LCUrls[0].Port() + if cfg.defaultClientHost() && cip == "0.0.0.0" { + cfg.ACUrls[0] = url.URL{Scheme: cfg.ACUrls[0].Scheme, Host: fmt.Sprintf("%s:%s", defaultHostname, cport)} + used = true + } + dhost := defaultHostname + if !used { + dhost = "" + } + return dhost, defaultHostStatus +} + +// checkBindURLs returns an error if any URL uses a domain name. +// TODO: return error in 3.2.0 +func checkBindURLs(urls []url.URL) error { + for _, url := range urls { + if url.Scheme == "unix" || url.Scheme == "unixs" { + continue + } + host, _, err := net.SplitHostPort(url.Host) + if err != nil { + return err + } + if host == "localhost" { + // special case for local address + // TODO: support /etc/hosts ? + continue + } + if net.ParseIP(host) == nil { + return fmt.Errorf("expected IP in URL for binding (%s)", url.String()) + } + } + return nil +} diff --git a/deps/github.com/coreos/etcd/embed/doc.go b/deps/github.com/coreos/etcd/embed/doc.go new file mode 100644 index 000000000..c555aa58e --- /dev/null +++ b/deps/github.com/coreos/etcd/embed/doc.go @@ -0,0 +1,45 @@ +// 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. + +/* +Package embed provides bindings for embedding an etcd server in a program. + +Launch an embedded etcd server using the configuration defaults: + + import ( + "log" + "time" + + "github.com/coreos/etcd/embed" + ) + + func main() { + cfg := embed.NewConfig() + cfg.Dir = "default.etcd" + e, err := embed.StartEtcd(cfg) + if err != nil { + log.Fatal(err) + } + defer e.Close() + select { + case <-e.Server.ReadyNotify(): + log.Printf("Server is ready!") + case <-time.After(60 * time.Second): + e.Server.Stop() // trigger a shutdown + log.Printf("Server took too long to start!") + } + log.Fatal(<-e.Err()) + } +*/ +package embed diff --git a/deps/github.com/coreos/etcd/embed/etcd.go b/deps/github.com/coreos/etcd/embed/etcd.go new file mode 100644 index 000000000..2f500f9f1 --- /dev/null +++ b/deps/github.com/coreos/etcd/embed/etcd.go @@ -0,0 +1,509 @@ +// 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. + +package embed + +import ( + "context" + "crypto/tls" + "fmt" + "io/ioutil" + defaultLog "log" + "net" + "net/http" + "path/filepath" + "sync" + "time" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/etcdhttp" + "github.com/coreos/etcd/etcdserver/api/v2http" + "github.com/coreos/etcd/etcdserver/api/v3rpc" + "github.com/coreos/etcd/pkg/cors" + "github.com/coreos/etcd/pkg/debugutil" + runtimeutil "github.com/coreos/etcd/pkg/runtime" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/rafthttp" + + "github.com/cockroachdb/cmux" + "github.com/coreos/pkg/capnslog" + "google.golang.org/grpc" + "google.golang.org/grpc/keepalive" +) + +var plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "embed") + +const ( + // internal fd usage includes disk usage and transport usage. + // To read/write snapshot, snap pkg needs 1. In normal case, wal pkg needs + // at most 2 to read/lock/write WALs. One case that it needs to 2 is to + // read all logs after some snapshot index, which locates at the end of + // the second last and the head of the last. For purging, it needs to read + // directory, so it needs 1. For fd monitor, it needs 1. + // For transport, rafthttp builds two long-polling connections and at most + // four temporary connections with each member. There are at most 9 members + // in a cluster, so it should reserve 96. + // For the safety, we set the total reserved number to 150. + reservedInternalFDNum = 150 +) + +// Etcd contains a running etcd server and its listeners. +type Etcd struct { + Peers []*peerListener + Clients []net.Listener + // a map of contexts for the servers that serves client requests. + sctxs map[string]*serveCtx + + Server *etcdserver.EtcdServer + + cfg Config + stopc chan struct{} + errc chan error + + closeOnce sync.Once +} + +type peerListener struct { + net.Listener + serve func() error + close func(context.Context) error +} + +// StartEtcd launches the etcd server and HTTP handlers for client/server communication. +// The returned Etcd.Server is not guaranteed to have joined the cluster. Wait +// on the Etcd.Server.ReadyNotify() channel to know when it completes and is ready for use. +func StartEtcd(inCfg *Config) (e *Etcd, err error) { + if err = inCfg.Validate(); err != nil { + return nil, err + } + serving := false + e = &Etcd{cfg: *inCfg, stopc: make(chan struct{})} + cfg := &e.cfg + defer func() { + if e == nil || err == nil { + return + } + if !serving { + // errored before starting gRPC server for serveCtx.serversC + for _, sctx := range e.sctxs { + close(sctx.serversC) + } + } + e.Close() + e = nil + }() + + if e.Peers, err = startPeerListeners(cfg); err != nil { + return e, err + } + if e.sctxs, err = startClientListeners(cfg); err != nil { + return e, err + } + for _, sctx := range e.sctxs { + e.Clients = append(e.Clients, sctx.l) + } + + var ( + urlsmap types.URLsMap + token string + ) + + if !isMemberInitialized(cfg) { + urlsmap, token, err = cfg.PeerURLsMapAndToken("etcd") + if err != nil { + return e, fmt.Errorf("error setting up initial cluster: %v", err) + } + } + + srvcfg := &etcdserver.ServerConfig{ + Name: cfg.Name, + ClientURLs: cfg.ACUrls, + PeerURLs: cfg.APUrls, + DataDir: cfg.Dir, + DedicatedWALDir: cfg.WalDir, + SnapCount: cfg.SnapCount, + MaxSnapFiles: cfg.MaxSnapFiles, + MaxWALFiles: cfg.MaxWalFiles, + InitialPeerURLsMap: urlsmap, + InitialClusterToken: token, + DiscoveryURL: cfg.Durl, + DiscoveryProxy: cfg.Dproxy, + NewCluster: cfg.IsNewCluster(), + ForceNewCluster: cfg.ForceNewCluster, + PeerTLSInfo: cfg.PeerTLSInfo, + TickMs: cfg.TickMs, + ElectionTicks: cfg.ElectionTicks(), + AutoCompactionRetention: cfg.AutoCompactionRetention, + QuotaBackendBytes: cfg.QuotaBackendBytes, + MaxRequestBytes: cfg.MaxRequestBytes, + StrictReconfigCheck: cfg.StrictReconfigCheck, + ClientCertAuthEnabled: cfg.ClientTLSInfo.ClientCertAuth, + AuthToken: cfg.AuthToken, + Debug: cfg.Debug, + } + + if e.Server, err = etcdserver.NewServer(srvcfg); err != nil { + return e, err + } + + // buffer channel so goroutines on closed connections won't wait forever + e.errc = make(chan error, len(e.Peers)+len(e.Clients)+2*len(e.sctxs)) + + e.Server.Start() + + if err = e.servePeers(); err != nil { + return e, err + } + if err = e.serveClients(); err != nil { + return e, err + } + + serving = true + return e, nil +} + +// Config returns the current configuration. +func (e *Etcd) Config() Config { + return e.cfg +} + +// Close gracefully shuts down all servers/listeners. +// Client requests will be terminated with request timeout. +// After timeout, enforce remaning requests be closed immediately. +func (e *Etcd) Close() { + e.closeOnce.Do(func() { close(e.stopc) }) + + // close client requests with request timeout + timeout := 2 * time.Second + if e.Server != nil { + timeout = e.Server.Cfg.ReqTimeout() + } + for _, sctx := range e.sctxs { + for ss := range sctx.serversC { + ctx, cancel := context.WithTimeout(context.Background(), timeout) + stopServers(ctx, ss) + cancel() + } + } + + for _, sctx := range e.sctxs { + sctx.cancel() + } + + for i := range e.Clients { + if e.Clients[i] != nil { + e.Clients[i].Close() + } + } + + // close rafthttp transports + if e.Server != nil { + e.Server.Stop() + } + + // close all idle connections in peer handler (wait up to 1-second) + for i := range e.Peers { + if e.Peers[i] != nil && e.Peers[i].close != nil { + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + e.Peers[i].close(ctx) + cancel() + } + } +} + +func stopServers(ctx context.Context, ss *servers) { + shutdownNow := func() { + // first, close the http.Server + ss.http.Shutdown(ctx) + // then close grpc.Server; cancels all active RPCs + ss.grpc.Stop() + } + + // do not grpc.Server.GracefulStop with TLS enabled etcd server + // See https://github.com/grpc/grpc-go/issues/1384#issuecomment-317124531 + // and https://github.com/coreos/etcd/issues/8916 + if ss.secure { + shutdownNow() + return + } + + ch := make(chan struct{}) + go func() { + defer close(ch) + // close listeners to stop accepting new connections, + // will block on any existing transports + ss.grpc.GracefulStop() + }() + + // wait until all pending RPCs are finished + select { + case <-ch: + case <-ctx.Done(): + // took too long, manually close open transports + // e.g. watch streams + shutdownNow() + + // concurrent GracefulStop should be interrupted + <-ch + } +} + +func (e *Etcd) Err() <-chan error { return e.errc } + +func startPeerListeners(cfg *Config) (peers []*peerListener, err error) { + if cfg.PeerAutoTLS && cfg.PeerTLSInfo.Empty() { + phosts := make([]string, len(cfg.LPUrls)) + for i, u := range cfg.LPUrls { + phosts[i] = u.Host + } + cfg.PeerTLSInfo, err = transport.SelfCert(filepath.Join(cfg.Dir, "fixtures", "peer"), phosts) + if err != nil { + plog.Fatalf("could not get certs (%v)", err) + } + } else if cfg.PeerAutoTLS { + plog.Warningf("ignoring peer auto TLS since certs given") + } + + if !cfg.PeerTLSInfo.Empty() { + plog.Infof("peerTLS: %s", cfg.PeerTLSInfo) + } + + peers = make([]*peerListener, len(cfg.LPUrls)) + defer func() { + if err == nil { + return + } + for i := range peers { + if peers[i] != nil && peers[i].close != nil { + plog.Info("stopping listening for peers on ", cfg.LPUrls[i].String()) + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + peers[i].close(ctx) + cancel() + } + } + }() + + for i, u := range cfg.LPUrls { + if u.Scheme == "http" { + if !cfg.PeerTLSInfo.Empty() { + plog.Warningf("The scheme of peer url %s is HTTP while peer key/cert files are presented. Ignored peer key/cert files.", u.String()) + } + if cfg.PeerTLSInfo.ClientCertAuth { + plog.Warningf("The scheme of peer url %s is HTTP while client cert auth (--peer-client-cert-auth) is enabled. Ignored client cert auth for this url.", u.String()) + } + } + peers[i] = &peerListener{close: func(context.Context) error { return nil }} + peers[i].Listener, err = rafthttp.NewListener(u, &cfg.PeerTLSInfo) + if err != nil { + return nil, err + } + // once serve, overwrite with 'http.Server.Shutdown' + peers[i].close = func(context.Context) error { + return peers[i].Listener.Close() + } + plog.Info("listening for peers on ", u.String()) + } + return peers, nil +} + +// configure peer handlers after rafthttp.Transport started +func (e *Etcd) servePeers() (err error) { + ph := etcdhttp.NewPeerHandler(e.Server) + var peerTLScfg *tls.Config + if !e.cfg.PeerTLSInfo.Empty() { + if peerTLScfg, err = e.cfg.PeerTLSInfo.ServerConfig(); err != nil { + return err + } + } + + for _, p := range e.Peers { + gs := v3rpc.Server(e.Server, peerTLScfg) + m := cmux.New(p.Listener) + go gs.Serve(m.Match(cmux.HTTP2())) + srv := &http.Server{ + Handler: grpcHandlerFunc(gs, ph), + ReadTimeout: 5 * time.Minute, + ErrorLog: defaultLog.New(ioutil.Discard, "", 0), // do not log user error + } + go srv.Serve(m.Match(cmux.Any())) + p.serve = func() error { return m.Serve() } + p.close = func(ctx context.Context) error { + // gracefully shutdown http.Server + // close open listeners, idle connections + // until context cancel or time-out + stopServers(ctx, &servers{secure: peerTLScfg != nil, grpc: gs, http: srv}) + return nil + } + } + + // start peer servers in a goroutine + for _, pl := range e.Peers { + go func(l *peerListener) { + e.errHandler(l.serve()) + }(pl) + } + return nil +} + +func startClientListeners(cfg *Config) (sctxs map[string]*serveCtx, err error) { + if cfg.ClientAutoTLS && cfg.ClientTLSInfo.Empty() { + chosts := make([]string, len(cfg.LCUrls)) + for i, u := range cfg.LCUrls { + chosts[i] = u.Host + } + cfg.ClientTLSInfo, err = transport.SelfCert(filepath.Join(cfg.Dir, "fixtures", "client"), chosts) + if err != nil { + plog.Fatalf("could not get certs (%v)", err) + } + } else if cfg.ClientAutoTLS { + plog.Warningf("ignoring client auto TLS since certs given") + } + + if cfg.EnablePprof { + plog.Infof("pprof is enabled under %s", debugutil.HTTPPrefixPProf) + } + + sctxs = make(map[string]*serveCtx) + for _, u := range cfg.LCUrls { + sctx := newServeCtx() + + if u.Scheme == "http" || u.Scheme == "unix" { + if !cfg.ClientTLSInfo.Empty() { + plog.Warningf("The scheme of client url %s is HTTP while peer key/cert files are presented. Ignored key/cert files.", u.String()) + } + if cfg.ClientTLSInfo.ClientCertAuth { + plog.Warningf("The scheme of client url %s is HTTP while client cert auth (--client-cert-auth) is enabled. Ignored client cert auth for this url.", u.String()) + } + } + if (u.Scheme == "https" || u.Scheme == "unixs") && cfg.ClientTLSInfo.Empty() { + return nil, fmt.Errorf("TLS key/cert (--cert-file, --key-file) must be provided for client url %s with HTTPs scheme", u.String()) + } + + proto := "tcp" + addr := u.Host + if u.Scheme == "unix" || u.Scheme == "unixs" { + proto = "unix" + addr = u.Host + u.Path + } + + sctx.secure = u.Scheme == "https" || u.Scheme == "unixs" + sctx.insecure = !sctx.secure + if oldctx := sctxs[addr]; oldctx != nil { + oldctx.secure = oldctx.secure || sctx.secure + oldctx.insecure = oldctx.insecure || sctx.insecure + continue + } + + if sctx.l, err = net.Listen(proto, addr); err != nil { + return nil, err + } + // net.Listener will rewrite ipv4 0.0.0.0 to ipv6 [::], breaking + // hosts that disable ipv6. So, use the address given by the user. + sctx.addr = addr + + if fdLimit, fderr := runtimeutil.FDLimit(); fderr == nil { + if fdLimit <= reservedInternalFDNum { + plog.Fatalf("file descriptor limit[%d] of etcd process is too low, and should be set higher than %d to ensure internal usage", fdLimit, reservedInternalFDNum) + } + sctx.l = transport.LimitListener(sctx.l, int(fdLimit-reservedInternalFDNum)) + } + + if proto == "tcp" { + if sctx.l, err = transport.NewKeepAliveListener(sctx.l, "tcp", nil); err != nil { + return nil, err + } + } + + plog.Info("listening for client requests on ", u.Host) + defer func() { + if err != nil { + sctx.l.Close() + plog.Info("stopping listening for client requests on ", u.Host) + } + }() + for k := range cfg.UserHandlers { + sctx.userHandlers[k] = cfg.UserHandlers[k] + } + sctx.serviceRegister = cfg.ServiceRegister + if cfg.EnablePprof || cfg.Debug { + sctx.registerPprof() + } + if cfg.Debug { + sctx.registerTrace() + } + sctxs[addr] = sctx + } + return sctxs, nil +} + +func (e *Etcd) serveClients() (err error) { + var ctlscfg *tls.Config + if !e.cfg.ClientTLSInfo.Empty() { + plog.Infof("ClientTLS: %s", e.cfg.ClientTLSInfo) + if ctlscfg, err = e.cfg.ClientTLSInfo.ServerConfig(); err != nil { + return err + } + } + + if e.cfg.CorsInfo.String() != "" { + plog.Infof("cors = %s", e.cfg.CorsInfo) + } + + // Start a client server goroutine for each listen address + var h http.Handler + if e.Config().EnableV2 { + h = v2http.NewClientHandler(e.Server, e.Server.Cfg.ReqTimeout()) + } else { + mux := http.NewServeMux() + etcdhttp.HandleBasic(mux, e.Server) + h = mux + } + h = http.Handler(&cors.CORSHandler{Handler: h, Info: e.cfg.CorsInfo}) + + gopts := []grpc.ServerOption{} + if e.cfg.GRPCKeepAliveMinTime > time.Duration(0) { + gopts = append(gopts, grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ + MinTime: e.cfg.GRPCKeepAliveMinTime, + PermitWithoutStream: false, + })) + } + if e.cfg.GRPCKeepAliveInterval > time.Duration(0) && + e.cfg.GRPCKeepAliveTimeout > time.Duration(0) { + gopts = append(gopts, grpc.KeepaliveParams(keepalive.ServerParameters{ + Time: e.cfg.GRPCKeepAliveInterval, + Timeout: e.cfg.GRPCKeepAliveTimeout, + })) + } + + // start client servers in a goroutine + for _, sctx := range e.sctxs { + go func(s *serveCtx) { + e.errHandler(s.serve(e.Server, ctlscfg, h, e.errHandler, gopts...)) + }(sctx) + } + return nil +} + +func (e *Etcd) errHandler(err error) { + select { + case <-e.stopc: + return + default: + } + select { + case <-e.stopc: + case e.errc <- err: + } +} diff --git a/deps/github.com/coreos/etcd/embed/serve.go b/deps/github.com/coreos/etcd/embed/serve.go new file mode 100644 index 000000000..b659bf8b7 --- /dev/null +++ b/deps/github.com/coreos/etcd/embed/serve.go @@ -0,0 +1,244 @@ +// Copyright 2015 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. + +package embed + +import ( + "crypto/tls" + "io/ioutil" + defaultLog "log" + "net" + "net/http" + "strings" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v3client" + "github.com/coreos/etcd/etcdserver/api/v3election" + "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" + v3electiongw "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/gw" + "github.com/coreos/etcd/etcdserver/api/v3lock" + "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" + v3lockgw "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/gw" + "github.com/coreos/etcd/etcdserver/api/v3rpc" + etcdservergw "github.com/coreos/etcd/etcdserver/etcdserverpb/gw" + "github.com/coreos/etcd/pkg/debugutil" + + "github.com/cockroachdb/cmux" + gw "github.com/grpc-ecosystem/grpc-gateway/runtime" + "golang.org/x/net/context" + "golang.org/x/net/trace" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" +) + +type serveCtx struct { + l net.Listener + addr string + secure bool + insecure bool + + ctx context.Context + cancel context.CancelFunc + + userHandlers map[string]http.Handler + serviceRegister func(*grpc.Server) + serversC chan *servers +} + +type servers struct { + secure bool + grpc *grpc.Server + http *http.Server +} + +func newServeCtx() *serveCtx { + ctx, cancel := context.WithCancel(context.Background()) + return &serveCtx{ + ctx: ctx, + cancel: cancel, + userHandlers: make(map[string]http.Handler), + serversC: make(chan *servers, 2), // in case sctx.insecure,sctx.secure true + } +} + +// serve accepts incoming connections on the listener l, +// creating a new service goroutine for each. The service goroutines +// read requests and then call handler to reply to them. +func (sctx *serveCtx) serve( + s *etcdserver.EtcdServer, + tlscfg *tls.Config, + handler http.Handler, + errHandler func(error), + gopts ...grpc.ServerOption) error { + logger := defaultLog.New(ioutil.Discard, "etcdhttp", 0) + <-s.ReadyNotify() + plog.Info("ready to serve client requests") + + m := cmux.New(sctx.l) + v3c := v3client.New(s) + servElection := v3election.NewElectionServer(v3c) + servLock := v3lock.NewLockServer(v3c) + + if sctx.insecure { + gs := v3rpc.Server(s, nil, gopts...) + v3electionpb.RegisterElectionServer(gs, servElection) + v3lockpb.RegisterLockServer(gs, servLock) + if sctx.serviceRegister != nil { + sctx.serviceRegister(gs) + } + grpcl := m.Match(cmux.HTTP2()) + go func() { errHandler(gs.Serve(grpcl)) }() + + opts := []grpc.DialOption{grpc.WithInsecure()} + gwmux, err := sctx.registerGateway(opts) + if err != nil { + return err + } + + httpmux := sctx.createMux(gwmux, handler) + + srvhttp := &http.Server{ + Handler: httpmux, + ErrorLog: logger, // do not log user error + } + httpl := m.Match(cmux.HTTP1()) + go func() { errHandler(srvhttp.Serve(httpl)) }() + + sctx.serversC <- &servers{grpc: gs, http: srvhttp} + plog.Noticef("serving insecure client requests on %s, this is strongly discouraged!", sctx.l.Addr().String()) + } + + if sctx.secure { + gs := v3rpc.Server(s, tlscfg, gopts...) + v3electionpb.RegisterElectionServer(gs, servElection) + v3lockpb.RegisterLockServer(gs, servLock) + if sctx.serviceRegister != nil { + sctx.serviceRegister(gs) + } + handler = grpcHandlerFunc(gs, handler) + + dtls := tlscfg.Clone() + // trust local server + dtls.InsecureSkipVerify = true + creds := credentials.NewTLS(dtls) + opts := []grpc.DialOption{grpc.WithTransportCredentials(creds)} + gwmux, err := sctx.registerGateway(opts) + if err != nil { + return err + } + + tlsl := tls.NewListener(m.Match(cmux.Any()), tlscfg) + // TODO: add debug flag; enable logging when debug flag is set + httpmux := sctx.createMux(gwmux, handler) + + srv := &http.Server{ + Handler: httpmux, + TLSConfig: tlscfg, + ErrorLog: logger, // do not log user error + } + go func() { errHandler(srv.Serve(tlsl)) }() + + sctx.serversC <- &servers{secure: true, grpc: gs, http: srv} + plog.Infof("serving client requests on %s", sctx.l.Addr().String()) + } + + close(sctx.serversC) + return m.Serve() +} + +// grpcHandlerFunc returns an http.Handler that delegates to grpcServer on incoming gRPC +// connections or otherHandler otherwise. Copied from cockroachdb. +func grpcHandlerFunc(grpcServer *grpc.Server, otherHandler http.Handler) http.Handler { + if otherHandler == nil { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + grpcServer.ServeHTTP(w, r) + }) + } + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.ProtoMajor == 2 && strings.Contains(r.Header.Get("Content-Type"), "application/grpc") { + grpcServer.ServeHTTP(w, r) + } else { + otherHandler.ServeHTTP(w, r) + } + }) +} + +type registerHandlerFunc func(context.Context, *gw.ServeMux, *grpc.ClientConn) error + +func (sctx *serveCtx) registerGateway(opts []grpc.DialOption) (*gw.ServeMux, error) { + ctx := sctx.ctx + conn, err := grpc.DialContext(ctx, sctx.addr, opts...) + if err != nil { + return nil, err + } + gwmux := gw.NewServeMux() + + handlers := []registerHandlerFunc{ + etcdservergw.RegisterKVHandler, + etcdservergw.RegisterWatchHandler, + etcdservergw.RegisterLeaseHandler, + etcdservergw.RegisterClusterHandler, + etcdservergw.RegisterMaintenanceHandler, + etcdservergw.RegisterAuthHandler, + v3lockgw.RegisterLockHandler, + v3electiongw.RegisterElectionHandler, + } + for _, h := range handlers { + if err := h(ctx, gwmux, conn); err != nil { + return nil, err + } + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + plog.Warningf("failed to close conn to %s: %v", sctx.l.Addr().String(), cerr) + } + }() + + return gwmux, nil +} + +func (sctx *serveCtx) createMux(gwmux *gw.ServeMux, handler http.Handler) *http.ServeMux { + httpmux := http.NewServeMux() + for path, h := range sctx.userHandlers { + httpmux.Handle(path, h) + } + + httpmux.Handle("/v3alpha/", gwmux) + if handler != nil { + httpmux.Handle("/", handler) + } + return httpmux +} + +func (sctx *serveCtx) registerUserHandler(s string, h http.Handler) { + if sctx.userHandlers[s] != nil { + plog.Warningf("path %s already registered by user handler", s) + return + } + sctx.userHandlers[s] = h +} + +func (sctx *serveCtx) registerPprof() { + for p, h := range debugutil.PProfHandlers() { + sctx.registerUserHandler(p, h) + } +} + +func (sctx *serveCtx) registerTrace() { + reqf := func(w http.ResponseWriter, r *http.Request) { trace.Render(w, r, true) } + sctx.registerUserHandler("/debug/requests", http.HandlerFunc(reqf)) + evf := func(w http.ResponseWriter, r *http.Request) { trace.RenderEvents(w, r, true) } + sctx.registerUserHandler("/debug/events", http.HandlerFunc(evf)) +} diff --git a/deps/github.com/coreos/etcd/embed/util.go b/deps/github.com/coreos/etcd/embed/util.go new file mode 100644 index 000000000..168e03138 --- /dev/null +++ b/deps/github.com/coreos/etcd/embed/util.go @@ -0,0 +1,30 @@ +// 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. + +package embed + +import ( + "path/filepath" + + "github.com/coreos/etcd/wal" +) + +func isMemberInitialized(cfg *Config) bool { + waldir := cfg.WalDir + if waldir == "" { + waldir = filepath.Join(cfg.Dir, "member", "wal") + } + + return wal.Exist(waldir) +} diff --git a/deps/github.com/coreos/etcd/error/error.go b/deps/github.com/coreos/etcd/error/error.go new file mode 100644 index 000000000..b541a628b --- /dev/null +++ b/deps/github.com/coreos/etcd/error/error.go @@ -0,0 +1,163 @@ +// Copyright 2015 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. + +// Package error describes errors in etcd project. When any change happens, +// Documentation/v2/errorcode.md needs to be updated correspondingly. +package error + +import ( + "encoding/json" + "fmt" + "net/http" +) + +var errors = map[int]string{ + // command related errors + EcodeKeyNotFound: "Key not found", + EcodeTestFailed: "Compare failed", //test and set + EcodeNotFile: "Not a file", + ecodeNoMorePeer: "Reached the max number of peers in the cluster", + EcodeNotDir: "Not a directory", + EcodeNodeExist: "Key already exists", // create + ecodeKeyIsPreserved: "The prefix of given key is a keyword in etcd", + EcodeRootROnly: "Root is read only", + EcodeDirNotEmpty: "Directory not empty", + ecodeExistingPeerAddr: "Peer address has existed", + EcodeUnauthorized: "The request requires user authentication", + + // Post form related errors + ecodeValueRequired: "Value is Required in POST form", + EcodePrevValueRequired: "PrevValue is Required in POST form", + EcodeTTLNaN: "The given TTL in POST form is not a number", + EcodeIndexNaN: "The given index in POST form is not a number", + ecodeValueOrTTLRequired: "Value or TTL is required in POST form", + ecodeTimeoutNaN: "The given timeout in POST form is not a number", + ecodeNameRequired: "Name is required in POST form", + ecodeIndexOrValueRequired: "Index or value is required", + ecodeIndexValueMutex: "Index and value cannot both be specified", + EcodeInvalidField: "Invalid field", + EcodeInvalidForm: "Invalid POST form", + EcodeRefreshValue: "Value provided on refresh", + EcodeRefreshTTLRequired: "A TTL must be provided on refresh", + + // raft related errors + EcodeRaftInternal: "Raft Internal Error", + EcodeLeaderElect: "During Leader Election", + + // etcd related errors + EcodeWatcherCleared: "watcher is cleared due to etcd recovery", + EcodeEventIndexCleared: "The event in requested index is outdated and cleared", + ecodeStandbyInternal: "Standby Internal Error", + ecodeInvalidActiveSize: "Invalid active size", + ecodeInvalidRemoveDelay: "Standby remove delay", + + // client related errors + ecodeClientInternal: "Client Internal Error", +} + +var errorStatus = map[int]int{ + EcodeKeyNotFound: http.StatusNotFound, + EcodeNotFile: http.StatusForbidden, + EcodeDirNotEmpty: http.StatusForbidden, + EcodeUnauthorized: http.StatusUnauthorized, + EcodeTestFailed: http.StatusPreconditionFailed, + EcodeNodeExist: http.StatusPreconditionFailed, + EcodeRaftInternal: http.StatusInternalServerError, + EcodeLeaderElect: http.StatusInternalServerError, +} + +const ( + EcodeKeyNotFound = 100 + EcodeTestFailed = 101 + EcodeNotFile = 102 + ecodeNoMorePeer = 103 + EcodeNotDir = 104 + EcodeNodeExist = 105 + ecodeKeyIsPreserved = 106 + EcodeRootROnly = 107 + EcodeDirNotEmpty = 108 + ecodeExistingPeerAddr = 109 + EcodeUnauthorized = 110 + + ecodeValueRequired = 200 + EcodePrevValueRequired = 201 + EcodeTTLNaN = 202 + EcodeIndexNaN = 203 + ecodeValueOrTTLRequired = 204 + ecodeTimeoutNaN = 205 + ecodeNameRequired = 206 + ecodeIndexOrValueRequired = 207 + ecodeIndexValueMutex = 208 + EcodeInvalidField = 209 + EcodeInvalidForm = 210 + EcodeRefreshValue = 211 + EcodeRefreshTTLRequired = 212 + + EcodeRaftInternal = 300 + EcodeLeaderElect = 301 + + EcodeWatcherCleared = 400 + EcodeEventIndexCleared = 401 + ecodeStandbyInternal = 402 + ecodeInvalidActiveSize = 403 + ecodeInvalidRemoveDelay = 404 + + ecodeClientInternal = 500 +) + +type Error struct { + ErrorCode int `json:"errorCode"` + Message string `json:"message"` + Cause string `json:"cause,omitempty"` + Index uint64 `json:"index"` +} + +func NewRequestError(errorCode int, cause string) *Error { + return NewError(errorCode, cause, 0) +} + +func NewError(errorCode int, cause string, index uint64) *Error { + return &Error{ + ErrorCode: errorCode, + Message: errors[errorCode], + Cause: cause, + Index: index, + } +} + +// Error is for the error interface +func (e Error) Error() string { + return e.Message + " (" + e.Cause + ")" +} + +func (e Error) toJsonString() string { + b, _ := json.Marshal(e) + return string(b) +} + +func (e Error) StatusCode() int { + status, ok := errorStatus[e.ErrorCode] + if !ok { + status = http.StatusBadRequest + } + return status +} + +func (e Error) WriteTo(w http.ResponseWriter) error { + w.Header().Add("X-Etcd-Index", fmt.Sprint(e.Index)) + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(e.StatusCode()) + _, err := w.Write([]byte(e.toJsonString() + "\n")) + return err +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/capability.go b/deps/github.com/coreos/etcd/etcdserver/api/capability.go new file mode 100644 index 000000000..5e2de58e9 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/capability.go @@ -0,0 +1,86 @@ +// Copyright 2015 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. + +package api + +import ( + "sync" + + "github.com/coreos/etcd/version" + "github.com/coreos/go-semver/semver" + "github.com/coreos/pkg/capnslog" +) + +type Capability string + +const ( + AuthCapability Capability = "auth" + V3rpcCapability Capability = "v3rpc" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/api") + + // capabilityMaps is a static map of version to capability map. + capabilityMaps = map[string]map[Capability]bool{ + "3.0.0": {AuthCapability: true, V3rpcCapability: true}, + "3.1.0": {AuthCapability: true, V3rpcCapability: true}, + "3.2.0": {AuthCapability: true, V3rpcCapability: true}, + } + + enableMapMu sync.RWMutex + // enabledMap points to a map in capabilityMaps + enabledMap map[Capability]bool + + curVersion *semver.Version +) + +func init() { + enabledMap = map[Capability]bool{ + AuthCapability: true, + V3rpcCapability: true, + } +} + +// UpdateCapability updates the enabledMap when the cluster version increases. +func UpdateCapability(v *semver.Version) { + if v == nil { + // if recovered but version was never set by cluster + return + } + enableMapMu.Lock() + if curVersion != nil && !curVersion.LessThan(*v) { + enableMapMu.Unlock() + return + } + curVersion = v + enabledMap = capabilityMaps[curVersion.String()] + enableMapMu.Unlock() + plog.Infof("enabled capabilities for version %s", version.Cluster(v.String())) +} + +func IsCapabilityEnabled(c Capability) bool { + enableMapMu.RLock() + defer enableMapMu.RUnlock() + if enabledMap == nil { + return false + } + return enabledMap[c] +} + +func EnableCapability(c Capability) { + enableMapMu.Lock() + defer enableMapMu.Unlock() + enabledMap[c] = true +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/cluster.go b/deps/github.com/coreos/etcd/etcdserver/api/cluster.go new file mode 100644 index 000000000..87face4a1 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/cluster.go @@ -0,0 +1,41 @@ +// 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. + +package api + +import ( + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/pkg/types" + + "github.com/coreos/go-semver/semver" +) + +// Cluster is an interface representing a collection of members in one etcd cluster. +type Cluster interface { + // ID returns the cluster ID + ID() types.ID + // ClientURLs returns an aggregate set of all URLs on which this + // cluster is listening for client requests + ClientURLs() []string + // Members returns a slice of members sorted by their ID + Members() []*membership.Member + // Member retrieves a particular member based on ID, or nil if the + // member does not exist in the cluster + Member(id types.ID) *membership.Member + // IsIDRemoved checks whether the given ID has been removed from this + // cluster at some point in the past + IsIDRemoved(id types.ID) bool + // Version is the cluster-wide minimum major.minor version. + Version() *semver.Version +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/doc.go b/deps/github.com/coreos/etcd/etcdserver/api/doc.go new file mode 100644 index 000000000..f44881be6 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package api manages the capabilities and features that are exposed to clients by the etcd cluster. +package api diff --git a/deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/base.go b/deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/base.go new file mode 100644 index 000000000..283b32dbf --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/base.go @@ -0,0 +1,186 @@ +// Copyright 2015 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. + +package etcdhttp + +import ( + "encoding/json" + "expvar" + "fmt" + "net/http" + "strings" + "time" + + etcdErr "github.com/coreos/etcd/error" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" + "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/pkg/logutil" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/version" + "github.com/coreos/pkg/capnslog" + "github.com/prometheus/client_golang/prometheus" + "golang.org/x/net/context" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/api/etcdhttp") + mlog = logutil.NewMergeLogger(plog) +) + +const ( + configPath = "/config" + metricsPath = "/metrics" + healthPath = "/health" + varsPath = "/debug/vars" + versionPath = "/version" +) + +// HandleBasic adds handlers to a mux for serving JSON etcd client requests +// that do not access the v2 store. +func HandleBasic(mux *http.ServeMux, server *etcdserver.EtcdServer) { + mux.HandleFunc(varsPath, serveVars) + mux.HandleFunc(configPath+"/local/log", logHandleFunc) + mux.Handle(metricsPath, prometheus.Handler()) + mux.Handle(healthPath, healthHandler(server)) + mux.HandleFunc(versionPath, versionHandler(server.Cluster(), serveVersion)) +} + +func healthHandler(server *etcdserver.EtcdServer) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r, "GET") { + return + } + if uint64(server.Leader()) == raft.None { + http.Error(w, `{"health": "false"}`, http.StatusServiceUnavailable) + return + } + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + if _, err := server.Do(ctx, etcdserverpb.Request{Method: "QGET"}); err != nil { + http.Error(w, `{"health": "false"}`, http.StatusServiceUnavailable) + return + } + w.WriteHeader(http.StatusOK) + w.Write([]byte(`{"health": "true"}`)) + } +} + +func versionHandler(c api.Cluster, fn func(http.ResponseWriter, *http.Request, string)) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + v := c.Version() + if v != nil { + fn(w, r, v.String()) + } else { + fn(w, r, "not_decided") + } + } +} + +func serveVersion(w http.ResponseWriter, r *http.Request, clusterV string) { + if !allowMethod(w, r, "GET") { + return + } + vs := version.Versions{ + Server: version.Version, + Cluster: clusterV, + } + + w.Header().Set("Content-Type", "application/json") + b, err := json.Marshal(&vs) + if err != nil { + plog.Panicf("cannot marshal versions to json (%v)", err) + } + w.Write(b) +} + +func logHandleFunc(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r, "PUT") { + return + } + + in := struct{ Level string }{} + + d := json.NewDecoder(r.Body) + if err := d.Decode(&in); err != nil { + WriteError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Invalid json body")) + return + } + + logl, err := capnslog.ParseLevel(strings.ToUpper(in.Level)) + if err != nil { + WriteError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Invalid log level "+in.Level)) + return + } + + plog.Noticef("globalLogLevel set to %q", logl.String()) + capnslog.SetGlobalLogLevel(logl) + w.WriteHeader(http.StatusNoContent) +} + +func serveVars(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r, "GET") { + return + } + + w.Header().Set("Content-Type", "application/json; charset=utf-8") + fmt.Fprintf(w, "{\n") + first := true + expvar.Do(func(kv expvar.KeyValue) { + if !first { + fmt.Fprintf(w, ",\n") + } + first = false + fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value) + }) + fmt.Fprintf(w, "\n}\n") +} + +func allowMethod(w http.ResponseWriter, r *http.Request, m string) bool { + if m == r.Method { + return true + } + w.Header().Set("Allow", m) + http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed) + return false +} + +// WriteError logs and writes the given Error to the ResponseWriter +// If Error is an etcdErr, it is rendered to the ResponseWriter +// Otherwise, it is assumed to be a StatusInternalServerError +func WriteError(w http.ResponseWriter, r *http.Request, err error) { + if err == nil { + return + } + switch e := err.(type) { + case *etcdErr.Error: + e.WriteTo(w) + case *httptypes.HTTPError: + if et := e.WriteTo(w); et != nil { + plog.Debugf("error writing HTTPError (%v) to %s", et, r.RemoteAddr) + } + default: + switch err { + case etcdserver.ErrTimeoutDueToLeaderFail, etcdserver.ErrTimeoutDueToConnectionLost, etcdserver.ErrNotEnoughStartedMembers, etcdserver.ErrUnhealthy: + mlog.MergeError(err) + default: + mlog.MergeErrorf("got unexpected response error (%v)", err) + } + herr := httptypes.NewHTTPError(http.StatusInternalServerError, "Internal Server Error") + if et := herr.WriteTo(w); et != nil { + plog.Debugf("error writing HTTPError (%v) to %s", et, r.RemoteAddr) + } + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/peer.go b/deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/peer.go new file mode 100644 index 000000000..721bae3c6 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/etcdhttp/peer.go @@ -0,0 +1,78 @@ +// Copyright 2015 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. + +package etcdhttp + +import ( + "encoding/json" + "net/http" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/lease/leasehttp" + "github.com/coreos/etcd/rafthttp" +) + +const ( + peerMembersPrefix = "/members" +) + +// NewPeerHandler generates an http.Handler to handle etcd peer requests. +func NewPeerHandler(s *etcdserver.EtcdServer) http.Handler { + var lh http.Handler + l := s.Lessor() + if l != nil { + lh = leasehttp.NewHandler(l, func() <-chan struct{} { return s.ApplyWait() }) + } + return newPeerHandler(s.Cluster(), s.RaftHandler(), lh) +} + +func newPeerHandler(cluster api.Cluster, raftHandler http.Handler, leaseHandler http.Handler) http.Handler { + mh := &peerMembersHandler{ + cluster: cluster, + } + + mux := http.NewServeMux() + mux.HandleFunc("/", http.NotFound) + mux.Handle(rafthttp.RaftPrefix, raftHandler) + mux.Handle(rafthttp.RaftPrefix+"/", raftHandler) + mux.Handle(peerMembersPrefix, mh) + if leaseHandler != nil { + mux.Handle(leasehttp.LeasePrefix, leaseHandler) + mux.Handle(leasehttp.LeaseInternalPrefix, leaseHandler) + } + mux.HandleFunc(versionPath, versionHandler(cluster, serveVersion)) + return mux +} + +type peerMembersHandler struct { + cluster api.Cluster +} + +func (h *peerMembersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r, "GET") { + return + } + w.Header().Set("X-Etcd-Cluster-ID", h.cluster.ID().String()) + + if r.URL.Path != peerMembersPrefix { + http.Error(w, "bad path", http.StatusBadRequest) + return + } + ms := h.cluster.Members() + w.Header().Set("Content-Type", "application/json") + if err := json.NewEncoder(w).Encode(ms); err != nil { + plog.Warningf("failed to encode members response (%v)", err) + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/capability.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/capability.go new file mode 100644 index 000000000..fa0bcca5e --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/capability.go @@ -0,0 +1,40 @@ +// Copyright 2015 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. + +package v2http + +import ( + "fmt" + "net/http" + + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" +) + +func capabilityHandler(c api.Capability, fn func(http.ResponseWriter, *http.Request)) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + if !api.IsCapabilityEnabled(c) { + notCapable(w, r, c) + return + } + fn(w, r) + } +} + +func notCapable(w http.ResponseWriter, r *http.Request, c api.Capability) { + herr := httptypes.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("Not capable of accessing %s feature during rolling upgrades.", c)) + if err := herr.WriteTo(w); err != nil { + plog.Debugf("error writing HTTPError (%v) to %s", err, r.RemoteAddr) + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/client.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/client.go new file mode 100644 index 000000000..aa1e71ec3 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/client.go @@ -0,0 +1,718 @@ +// Copyright 2015 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. + +package v2http + +import ( + "encoding/json" + "errors" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "path" + "strconv" + "strings" + "time" + + etcdErr "github.com/coreos/etcd/error" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/etcdhttp" + "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" + "github.com/coreos/etcd/etcdserver/auth" + "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/etcdserver/stats" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/store" + "github.com/jonboulle/clockwork" + "golang.org/x/net/context" +) + +const ( + authPrefix = "/v2/auth" + keysPrefix = "/v2/keys" + machinesPrefix = "/v2/machines" + membersPrefix = "/v2/members" + statsPrefix = "/v2/stats" +) + +// NewClientHandler generates a muxed http.Handler with the given parameters to serve etcd client requests. +func NewClientHandler(server *etcdserver.EtcdServer, timeout time.Duration) http.Handler { + mux := http.NewServeMux() + etcdhttp.HandleBasic(mux, server) + handleV2(mux, server, timeout) + return requestLogger(mux) +} + +func handleV2(mux *http.ServeMux, server *etcdserver.EtcdServer, timeout time.Duration) { + sec := auth.NewStore(server, timeout) + kh := &keysHandler{ + sec: sec, + server: server, + cluster: server.Cluster(), + timer: server, + timeout: timeout, + clientCertAuthEnabled: server.Cfg.ClientCertAuthEnabled, + } + + sh := &statsHandler{ + stats: server, + } + + mh := &membersHandler{ + sec: sec, + server: server, + cluster: server.Cluster(), + timeout: timeout, + clock: clockwork.NewRealClock(), + clientCertAuthEnabled: server.Cfg.ClientCertAuthEnabled, + } + + mah := &machinesHandler{cluster: server.Cluster()} + + sech := &authHandler{ + sec: sec, + cluster: server.Cluster(), + clientCertAuthEnabled: server.Cfg.ClientCertAuthEnabled, + } + mux.HandleFunc("/", http.NotFound) + mux.Handle(keysPrefix, kh) + mux.Handle(keysPrefix+"/", kh) + mux.HandleFunc(statsPrefix+"/store", sh.serveStore) + mux.HandleFunc(statsPrefix+"/self", sh.serveSelf) + mux.HandleFunc(statsPrefix+"/leader", sh.serveLeader) + mux.Handle(membersPrefix, mh) + mux.Handle(membersPrefix+"/", mh) + mux.Handle(machinesPrefix, mah) + handleAuth(mux, sech) +} + +type keysHandler struct { + sec auth.Store + server etcdserver.Server + cluster api.Cluster + timer etcdserver.RaftTimer + timeout time.Duration + clientCertAuthEnabled bool +} + +func (h *keysHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "HEAD", "GET", "PUT", "POST", "DELETE") { + return + } + + w.Header().Set("X-Etcd-Cluster-ID", h.cluster.ID().String()) + + ctx, cancel := context.WithTimeout(context.Background(), h.timeout) + defer cancel() + clock := clockwork.NewRealClock() + startTime := clock.Now() + rr, noValueOnSuccess, err := parseKeyRequest(r, clock) + if err != nil { + writeKeyError(w, err) + return + } + // The path must be valid at this point (we've parsed the request successfully). + if !hasKeyPrefixAccess(h.sec, r, r.URL.Path[len(keysPrefix):], rr.Recursive, h.clientCertAuthEnabled) { + writeKeyNoAuth(w) + return + } + if !rr.Wait { + reportRequestReceived(rr) + } + resp, err := h.server.Do(ctx, rr) + if err != nil { + err = trimErrorPrefix(err, etcdserver.StoreKeysPrefix) + writeKeyError(w, err) + reportRequestFailed(rr, err) + return + } + switch { + case resp.Event != nil: + if err := writeKeyEvent(w, resp.Event, noValueOnSuccess, h.timer); err != nil { + // Should never be reached + plog.Errorf("error writing event (%v)", err) + } + reportRequestCompleted(rr, resp, startTime) + case resp.Watcher != nil: + ctx, cancel := context.WithTimeout(context.Background(), defaultWatchTimeout) + defer cancel() + handleKeyWatch(ctx, w, resp.Watcher, rr.Stream, h.timer) + default: + writeKeyError(w, errors.New("received response with no Event/Watcher!")) + } +} + +type machinesHandler struct { + cluster api.Cluster +} + +func (h *machinesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET", "HEAD") { + return + } + endpoints := h.cluster.ClientURLs() + w.Write([]byte(strings.Join(endpoints, ", "))) +} + +type membersHandler struct { + sec auth.Store + server etcdserver.Server + cluster api.Cluster + timeout time.Duration + clock clockwork.Clock + clientCertAuthEnabled bool +} + +func (h *membersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET", "POST", "DELETE", "PUT") { + return + } + if !hasWriteRootAccess(h.sec, r, h.clientCertAuthEnabled) { + writeNoAuth(w, r) + return + } + w.Header().Set("X-Etcd-Cluster-ID", h.cluster.ID().String()) + + ctx, cancel := context.WithTimeout(context.Background(), h.timeout) + defer cancel() + + switch r.Method { + case "GET": + switch trimPrefix(r.URL.Path, membersPrefix) { + case "": + mc := newMemberCollection(h.cluster.Members()) + w.Header().Set("Content-Type", "application/json") + if err := json.NewEncoder(w).Encode(mc); err != nil { + plog.Warningf("failed to encode members response (%v)", err) + } + case "leader": + id := h.server.Leader() + if id == 0 { + writeError(w, r, httptypes.NewHTTPError(http.StatusServiceUnavailable, "During election")) + return + } + m := newMember(h.cluster.Member(id)) + w.Header().Set("Content-Type", "application/json") + if err := json.NewEncoder(w).Encode(m); err != nil { + plog.Warningf("failed to encode members response (%v)", err) + } + default: + writeError(w, r, httptypes.NewHTTPError(http.StatusNotFound, "Not found")) + } + case "POST": + req := httptypes.MemberCreateRequest{} + if ok := unmarshalRequest(r, &req, w); !ok { + return + } + now := h.clock.Now() + m := membership.NewMember("", req.PeerURLs, "", &now) + _, err := h.server.AddMember(ctx, *m) + switch { + case err == membership.ErrIDExists || err == membership.ErrPeerURLexists: + writeError(w, r, httptypes.NewHTTPError(http.StatusConflict, err.Error())) + return + case err != nil: + plog.Errorf("error adding member %s (%v)", m.ID, err) + writeError(w, r, err) + return + } + res := newMember(m) + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + if err := json.NewEncoder(w).Encode(res); err != nil { + plog.Warningf("failed to encode members response (%v)", err) + } + case "DELETE": + id, ok := getID(r.URL.Path, w) + if !ok { + return + } + _, err := h.server.RemoveMember(ctx, uint64(id)) + switch { + case err == membership.ErrIDRemoved: + writeError(w, r, httptypes.NewHTTPError(http.StatusGone, fmt.Sprintf("Member permanently removed: %s", id))) + case err == membership.ErrIDNotFound: + writeError(w, r, httptypes.NewHTTPError(http.StatusNotFound, fmt.Sprintf("No such member: %s", id))) + case err != nil: + plog.Errorf("error removing member %s (%v)", id, err) + writeError(w, r, err) + default: + w.WriteHeader(http.StatusNoContent) + } + case "PUT": + id, ok := getID(r.URL.Path, w) + if !ok { + return + } + req := httptypes.MemberUpdateRequest{} + if ok := unmarshalRequest(r, &req, w); !ok { + return + } + m := membership.Member{ + ID: id, + RaftAttributes: membership.RaftAttributes{PeerURLs: req.PeerURLs.StringSlice()}, + } + _, err := h.server.UpdateMember(ctx, m) + switch { + case err == membership.ErrPeerURLexists: + writeError(w, r, httptypes.NewHTTPError(http.StatusConflict, err.Error())) + case err == membership.ErrIDNotFound: + writeError(w, r, httptypes.NewHTTPError(http.StatusNotFound, fmt.Sprintf("No such member: %s", id))) + case err != nil: + plog.Errorf("error updating member %s (%v)", m.ID, err) + writeError(w, r, err) + default: + w.WriteHeader(http.StatusNoContent) + } + } +} + +type statsHandler struct { + stats stats.Stats +} + +func (h *statsHandler) serveStore(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET") { + return + } + w.Header().Set("Content-Type", "application/json") + w.Write(h.stats.StoreStats()) +} + +func (h *statsHandler) serveSelf(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET") { + return + } + w.Header().Set("Content-Type", "application/json") + w.Write(h.stats.SelfStats()) +} + +func (h *statsHandler) serveLeader(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET") { + return + } + stats := h.stats.LeaderStats() + if stats == nil { + etcdhttp.WriteError(w, r, httptypes.NewHTTPError(http.StatusForbidden, "not current leader")) + return + } + w.Header().Set("Content-Type", "application/json") + w.Write(stats) +} + +// parseKeyRequest converts a received http.Request on keysPrefix to +// a server Request, performing validation of supplied fields as appropriate. +// If any validation fails, an empty Request and non-nil error is returned. +func parseKeyRequest(r *http.Request, clock clockwork.Clock) (etcdserverpb.Request, bool, error) { + noValueOnSuccess := false + emptyReq := etcdserverpb.Request{} + + err := r.ParseForm() + if err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidForm, + err.Error(), + ) + } + + if !strings.HasPrefix(r.URL.Path, keysPrefix) { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidForm, + "incorrect key prefix", + ) + } + p := path.Join(etcdserver.StoreKeysPrefix, r.URL.Path[len(keysPrefix):]) + + var pIdx, wIdx uint64 + if pIdx, err = getUint64(r.Form, "prevIndex"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeIndexNaN, + `invalid value for "prevIndex"`, + ) + } + if wIdx, err = getUint64(r.Form, "waitIndex"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeIndexNaN, + `invalid value for "waitIndex"`, + ) + } + + var rec, sort, wait, dir, quorum, stream bool + if rec, err = getBool(r.Form, "recursive"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `invalid value for "recursive"`, + ) + } + if sort, err = getBool(r.Form, "sorted"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `invalid value for "sorted"`, + ) + } + if wait, err = getBool(r.Form, "wait"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `invalid value for "wait"`, + ) + } + // TODO(jonboulle): define what parameters dir is/isn't compatible with? + if dir, err = getBool(r.Form, "dir"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `invalid value for "dir"`, + ) + } + if quorum, err = getBool(r.Form, "quorum"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `invalid value for "quorum"`, + ) + } + if stream, err = getBool(r.Form, "stream"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `invalid value for "stream"`, + ) + } + + if wait && r.Method != "GET" { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `"wait" can only be used with GET requests`, + ) + } + + pV := r.FormValue("prevValue") + if _, ok := r.Form["prevValue"]; ok && pV == "" { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodePrevValueRequired, + `"prevValue" cannot be empty`, + ) + } + + if noValueOnSuccess, err = getBool(r.Form, "noValueOnSuccess"); err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + `invalid value for "noValueOnSuccess"`, + ) + } + + // TTL is nullable, so leave it null if not specified + // or an empty string + var ttl *uint64 + if len(r.FormValue("ttl")) > 0 { + i, err := getUint64(r.Form, "ttl") + if err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeTTLNaN, + `invalid value for "ttl"`, + ) + } + ttl = &i + } + + // prevExist is nullable, so leave it null if not specified + var pe *bool + if _, ok := r.Form["prevExist"]; ok { + bv, err := getBool(r.Form, "prevExist") + if err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + "invalid value for prevExist", + ) + } + pe = &bv + } + + // refresh is nullable, so leave it null if not specified + var refresh *bool + if _, ok := r.Form["refresh"]; ok { + bv, err := getBool(r.Form, "refresh") + if err != nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeInvalidField, + "invalid value for refresh", + ) + } + refresh = &bv + if refresh != nil && *refresh { + val := r.FormValue("value") + if _, ok := r.Form["value"]; ok && val != "" { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeRefreshValue, + `A value was provided on a refresh`, + ) + } + if ttl == nil { + return emptyReq, false, etcdErr.NewRequestError( + etcdErr.EcodeRefreshTTLRequired, + `No TTL value set`, + ) + } + } + } + + rr := etcdserverpb.Request{ + Method: r.Method, + Path: p, + Val: r.FormValue("value"), + Dir: dir, + PrevValue: pV, + PrevIndex: pIdx, + PrevExist: pe, + Wait: wait, + Since: wIdx, + Recursive: rec, + Sorted: sort, + Quorum: quorum, + Stream: stream, + } + + if pe != nil { + rr.PrevExist = pe + } + + if refresh != nil { + rr.Refresh = refresh + } + + // Null TTL is equivalent to unset Expiration + if ttl != nil { + expr := time.Duration(*ttl) * time.Second + rr.Expiration = clock.Now().Add(expr).UnixNano() + } + + return rr, noValueOnSuccess, nil +} + +// writeKeyEvent trims the prefix of key path in a single Event under +// StoreKeysPrefix, serializes it and writes the resulting JSON to the given +// ResponseWriter, along with the appropriate headers. +func writeKeyEvent(w http.ResponseWriter, ev *store.Event, noValueOnSuccess bool, rt etcdserver.RaftTimer) error { + if ev == nil { + return errors.New("cannot write empty Event!") + } + w.Header().Set("Content-Type", "application/json") + w.Header().Set("X-Etcd-Index", fmt.Sprint(ev.EtcdIndex)) + w.Header().Set("X-Raft-Index", fmt.Sprint(rt.Index())) + w.Header().Set("X-Raft-Term", fmt.Sprint(rt.Term())) + + if ev.IsCreated() { + w.WriteHeader(http.StatusCreated) + } + + ev = trimEventPrefix(ev, etcdserver.StoreKeysPrefix) + if noValueOnSuccess && + (ev.Action == store.Set || ev.Action == store.CompareAndSwap || + ev.Action == store.Create || ev.Action == store.Update) { + ev.Node = nil + ev.PrevNode = nil + } + return json.NewEncoder(w).Encode(ev) +} + +func writeKeyNoAuth(w http.ResponseWriter) { + e := etcdErr.NewError(etcdErr.EcodeUnauthorized, "Insufficient credentials", 0) + e.WriteTo(w) +} + +// writeKeyError logs and writes the given Error to the ResponseWriter. +// If Error is not an etcdErr, the error will be converted to an etcd error. +func writeKeyError(w http.ResponseWriter, err error) { + if err == nil { + return + } + switch e := err.(type) { + case *etcdErr.Error: + e.WriteTo(w) + default: + switch err { + case etcdserver.ErrTimeoutDueToLeaderFail, etcdserver.ErrTimeoutDueToConnectionLost: + mlog.MergeError(err) + default: + mlog.MergeErrorf("got unexpected response error (%v)", err) + } + ee := etcdErr.NewError(etcdErr.EcodeRaftInternal, err.Error(), 0) + ee.WriteTo(w) + } +} + +func handleKeyWatch(ctx context.Context, w http.ResponseWriter, wa store.Watcher, stream bool, rt etcdserver.RaftTimer) { + defer wa.Remove() + ech := wa.EventChan() + var nch <-chan bool + if x, ok := w.(http.CloseNotifier); ok { + nch = x.CloseNotify() + } + + w.Header().Set("Content-Type", "application/json") + w.Header().Set("X-Etcd-Index", fmt.Sprint(wa.StartIndex())) + w.Header().Set("X-Raft-Index", fmt.Sprint(rt.Index())) + w.Header().Set("X-Raft-Term", fmt.Sprint(rt.Term())) + w.WriteHeader(http.StatusOK) + + // Ensure headers are flushed early, in case of long polling + w.(http.Flusher).Flush() + + for { + select { + case <-nch: + // Client closed connection. Nothing to do. + return + case <-ctx.Done(): + // Timed out. net/http will close the connection for us, so nothing to do. + return + case ev, ok := <-ech: + if !ok { + // If the channel is closed this may be an indication of + // that notifications are much more than we are able to + // send to the client in time. Then we simply end streaming. + return + } + ev = trimEventPrefix(ev, etcdserver.StoreKeysPrefix) + if err := json.NewEncoder(w).Encode(ev); err != nil { + // Should never be reached + plog.Warningf("error writing event (%v)", err) + return + } + if !stream { + return + } + w.(http.Flusher).Flush() + } + } +} + +func trimEventPrefix(ev *store.Event, prefix string) *store.Event { + if ev == nil { + return nil + } + // Since the *Event may reference one in the store history + // history, we must copy it before modifying + e := ev.Clone() + trimNodeExternPrefix(e.Node, prefix) + trimNodeExternPrefix(e.PrevNode, prefix) + return e +} + +func trimNodeExternPrefix(n *store.NodeExtern, prefix string) { + if n == nil { + return + } + n.Key = strings.TrimPrefix(n.Key, prefix) + for _, nn := range n.Nodes { + trimNodeExternPrefix(nn, prefix) + } +} + +func trimErrorPrefix(err error, prefix string) error { + if e, ok := err.(*etcdErr.Error); ok { + e.Cause = strings.TrimPrefix(e.Cause, prefix) + } + return err +} + +func unmarshalRequest(r *http.Request, req json.Unmarshaler, w http.ResponseWriter) bool { + ctype := r.Header.Get("Content-Type") + semicolonPosition := strings.Index(ctype, ";") + if semicolonPosition != -1 { + ctype = strings.TrimSpace(strings.ToLower(ctype[0:semicolonPosition])) + } + if ctype != "application/json" { + writeError(w, r, httptypes.NewHTTPError(http.StatusUnsupportedMediaType, fmt.Sprintf("Bad Content-Type %s, accept application/json", ctype))) + return false + } + b, err := ioutil.ReadAll(r.Body) + if err != nil { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, err.Error())) + return false + } + if err := req.UnmarshalJSON(b); err != nil { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, err.Error())) + return false + } + return true +} + +func getID(p string, w http.ResponseWriter) (types.ID, bool) { + idStr := trimPrefix(p, membersPrefix) + if idStr == "" { + http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed) + return 0, false + } + id, err := types.IDFromString(idStr) + if err != nil { + writeError(w, nil, httptypes.NewHTTPError(http.StatusNotFound, fmt.Sprintf("No such member: %s", idStr))) + return 0, false + } + return id, true +} + +// getUint64 extracts a uint64 by the given key from a Form. If the key does +// not exist in the form, 0 is returned. If the key exists but the value is +// badly formed, an error is returned. If multiple values are present only the +// first is considered. +func getUint64(form url.Values, key string) (i uint64, err error) { + if vals, ok := form[key]; ok { + i, err = strconv.ParseUint(vals[0], 10, 64) + } + return +} + +// getBool extracts a bool by the given key from a Form. If the key does not +// exist in the form, false is returned. If the key exists but the value is +// badly formed, an error is returned. If multiple values are present only the +// first is considered. +func getBool(form url.Values, key string) (b bool, err error) { + if vals, ok := form[key]; ok { + b, err = strconv.ParseBool(vals[0]) + } + return +} + +// trimPrefix removes a given prefix and any slash following the prefix +// e.g.: trimPrefix("foo", "foo") == trimPrefix("foo/", "foo") == "" +func trimPrefix(p, prefix string) (s string) { + s = strings.TrimPrefix(p, prefix) + s = strings.TrimPrefix(s, "/") + return +} + +func newMemberCollection(ms []*membership.Member) *httptypes.MemberCollection { + c := httptypes.MemberCollection(make([]httptypes.Member, len(ms))) + + for i, m := range ms { + c[i] = newMember(m) + } + + return &c +} + +func newMember(m *membership.Member) httptypes.Member { + tm := httptypes.Member{ + ID: m.ID.String(), + Name: m.Name, + PeerURLs: make([]string, len(m.PeerURLs)), + ClientURLs: make([]string, len(m.ClientURLs)), + } + + copy(tm.PeerURLs, m.PeerURLs) + copy(tm.ClientURLs, m.ClientURLs) + + return tm +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/client_auth.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/client_auth.go new file mode 100644 index 000000000..606e2e00b --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/client_auth.go @@ -0,0 +1,543 @@ +// Copyright 2015 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. + +package v2http + +import ( + "encoding/json" + "net/http" + "path" + "strings" + + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" + "github.com/coreos/etcd/etcdserver/auth" +) + +type authHandler struct { + sec auth.Store + cluster api.Cluster + clientCertAuthEnabled bool +} + +func hasWriteRootAccess(sec auth.Store, r *http.Request, clientCertAuthEnabled bool) bool { + if r.Method == "GET" || r.Method == "HEAD" { + return true + } + return hasRootAccess(sec, r, clientCertAuthEnabled) +} + +func userFromBasicAuth(sec auth.Store, r *http.Request) *auth.User { + username, password, ok := r.BasicAuth() + if !ok { + plog.Warningf("auth: malformed basic auth encoding") + return nil + } + user, err := sec.GetUser(username) + if err != nil { + return nil + } + + ok = sec.CheckPassword(user, password) + if !ok { + plog.Warningf("auth: incorrect password for user: %s", username) + return nil + } + return &user +} + +func userFromClientCertificate(sec auth.Store, r *http.Request) *auth.User { + if r.TLS == nil { + return nil + } + + for _, chains := range r.TLS.VerifiedChains { + for _, chain := range chains { + plog.Debugf("auth: found common name %s.\n", chain.Subject.CommonName) + user, err := sec.GetUser(chain.Subject.CommonName) + if err == nil { + plog.Debugf("auth: authenticated user %s by cert common name.", user.User) + return &user + } + } + } + return nil +} + +func hasRootAccess(sec auth.Store, r *http.Request, clientCertAuthEnabled bool) bool { + if sec == nil { + // No store means no auth available, eg, tests. + return true + } + if !sec.AuthEnabled() { + return true + } + + var rootUser *auth.User + if r.Header.Get("Authorization") == "" && clientCertAuthEnabled { + rootUser = userFromClientCertificate(sec, r) + if rootUser == nil { + return false + } + } else { + rootUser = userFromBasicAuth(sec, r) + if rootUser == nil { + return false + } + } + + for _, role := range rootUser.Roles { + if role == auth.RootRoleName { + return true + } + } + plog.Warningf("auth: user %s does not have the %s role for resource %s.", rootUser.User, auth.RootRoleName, r.URL.Path) + return false +} + +func hasKeyPrefixAccess(sec auth.Store, r *http.Request, key string, recursive, clientCertAuthEnabled bool) bool { + if sec == nil { + // No store means no auth available, eg, tests. + return true + } + if !sec.AuthEnabled() { + return true + } + + var user *auth.User + if r.Header.Get("Authorization") == "" { + if clientCertAuthEnabled { + user = userFromClientCertificate(sec, r) + } + if user == nil { + return hasGuestAccess(sec, r, key) + } + } else { + user = userFromBasicAuth(sec, r) + if user == nil { + return false + } + } + + writeAccess := r.Method != "GET" && r.Method != "HEAD" + for _, roleName := range user.Roles { + role, err := sec.GetRole(roleName) + if err != nil { + continue + } + if recursive { + if role.HasRecursiveAccess(key, writeAccess) { + return true + } + } else if role.HasKeyAccess(key, writeAccess) { + return true + } + } + plog.Warningf("auth: invalid access for user %s on key %s.", user.User, key) + return false +} + +func hasGuestAccess(sec auth.Store, r *http.Request, key string) bool { + writeAccess := r.Method != "GET" && r.Method != "HEAD" + role, err := sec.GetRole(auth.GuestRoleName) + if err != nil { + return false + } + if role.HasKeyAccess(key, writeAccess) { + return true + } + plog.Warningf("auth: invalid access for unauthenticated user on resource %s.", key) + return false +} + +func writeNoAuth(w http.ResponseWriter, r *http.Request) { + herr := httptypes.NewHTTPError(http.StatusUnauthorized, "Insufficient credentials") + if err := herr.WriteTo(w); err != nil { + plog.Debugf("error writing HTTPError (%v) to %s", err, r.RemoteAddr) + } +} + +func handleAuth(mux *http.ServeMux, sh *authHandler) { + mux.HandleFunc(authPrefix+"/roles", capabilityHandler(api.AuthCapability, sh.baseRoles)) + mux.HandleFunc(authPrefix+"/roles/", capabilityHandler(api.AuthCapability, sh.handleRoles)) + mux.HandleFunc(authPrefix+"/users", capabilityHandler(api.AuthCapability, sh.baseUsers)) + mux.HandleFunc(authPrefix+"/users/", capabilityHandler(api.AuthCapability, sh.handleUsers)) + mux.HandleFunc(authPrefix+"/enable", capabilityHandler(api.AuthCapability, sh.enableDisable)) +} + +func (sh *authHandler) baseRoles(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET") { + return + } + if !hasRootAccess(sh.sec, r, sh.clientCertAuthEnabled) { + writeNoAuth(w, r) + return + } + + w.Header().Set("X-Etcd-Cluster-ID", sh.cluster.ID().String()) + w.Header().Set("Content-Type", "application/json") + + roles, err := sh.sec.AllRoles() + if err != nil { + writeError(w, r, err) + return + } + if roles == nil { + roles = make([]string, 0) + } + + err = r.ParseForm() + if err != nil { + writeError(w, r, err) + return + } + + var rolesCollections struct { + Roles []auth.Role `json:"roles"` + } + for _, roleName := range roles { + var role auth.Role + role, err = sh.sec.GetRole(roleName) + if err != nil { + writeError(w, r, err) + return + } + rolesCollections.Roles = append(rolesCollections.Roles, role) + } + err = json.NewEncoder(w).Encode(rolesCollections) + + if err != nil { + plog.Warningf("baseRoles error encoding on %s", r.URL) + writeError(w, r, err) + return + } +} + +func (sh *authHandler) handleRoles(w http.ResponseWriter, r *http.Request) { + subpath := path.Clean(r.URL.Path[len(authPrefix):]) + // Split "/roles/rolename/command". + // First item is an empty string, second is "roles" + pieces := strings.Split(subpath, "/") + if len(pieces) == 2 { + sh.baseRoles(w, r) + return + } + if len(pieces) != 3 { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Invalid path")) + return + } + sh.forRole(w, r, pieces[2]) +} + +func (sh *authHandler) forRole(w http.ResponseWriter, r *http.Request, role string) { + if !allowMethod(w, r.Method, "GET", "PUT", "DELETE") { + return + } + if !hasRootAccess(sh.sec, r, sh.clientCertAuthEnabled) { + writeNoAuth(w, r) + return + } + w.Header().Set("X-Etcd-Cluster-ID", sh.cluster.ID().String()) + w.Header().Set("Content-Type", "application/json") + + switch r.Method { + case "GET": + data, err := sh.sec.GetRole(role) + if err != nil { + writeError(w, r, err) + return + } + err = json.NewEncoder(w).Encode(data) + if err != nil { + plog.Warningf("forRole error encoding on %s", r.URL) + return + } + return + case "PUT": + var in auth.Role + err := json.NewDecoder(r.Body).Decode(&in) + if err != nil { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Invalid JSON in request body.")) + return + } + if in.Role != role { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Role JSON name does not match the name in the URL")) + return + } + + var out auth.Role + + // create + if in.Grant.IsEmpty() && in.Revoke.IsEmpty() { + err = sh.sec.CreateRole(in) + if err != nil { + writeError(w, r, err) + return + } + w.WriteHeader(http.StatusCreated) + out = in + } else { + if !in.Permissions.IsEmpty() { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Role JSON contains both permissions and grant/revoke")) + return + } + out, err = sh.sec.UpdateRole(in) + if err != nil { + writeError(w, r, err) + return + } + w.WriteHeader(http.StatusOK) + } + + err = json.NewEncoder(w).Encode(out) + if err != nil { + plog.Warningf("forRole error encoding on %s", r.URL) + return + } + return + case "DELETE": + err := sh.sec.DeleteRole(role) + if err != nil { + writeError(w, r, err) + return + } + } +} + +type userWithRoles struct { + User string `json:"user"` + Roles []auth.Role `json:"roles,omitempty"` +} + +type usersCollections struct { + Users []userWithRoles `json:"users"` +} + +func (sh *authHandler) baseUsers(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET") { + return + } + if !hasRootAccess(sh.sec, r, sh.clientCertAuthEnabled) { + writeNoAuth(w, r) + return + } + w.Header().Set("X-Etcd-Cluster-ID", sh.cluster.ID().String()) + w.Header().Set("Content-Type", "application/json") + + users, err := sh.sec.AllUsers() + if err != nil { + writeError(w, r, err) + return + } + if users == nil { + users = make([]string, 0) + } + + err = r.ParseForm() + if err != nil { + writeError(w, r, err) + return + } + + ucs := usersCollections{} + for _, userName := range users { + var user auth.User + user, err = sh.sec.GetUser(userName) + if err != nil { + writeError(w, r, err) + return + } + + uwr := userWithRoles{User: user.User} + for _, roleName := range user.Roles { + var role auth.Role + role, err = sh.sec.GetRole(roleName) + if err != nil { + continue + } + uwr.Roles = append(uwr.Roles, role) + } + + ucs.Users = append(ucs.Users, uwr) + } + err = json.NewEncoder(w).Encode(ucs) + + if err != nil { + plog.Warningf("baseUsers error encoding on %s", r.URL) + writeError(w, r, err) + return + } +} + +func (sh *authHandler) handleUsers(w http.ResponseWriter, r *http.Request) { + subpath := path.Clean(r.URL.Path[len(authPrefix):]) + // Split "/users/username". + // First item is an empty string, second is "users" + pieces := strings.Split(subpath, "/") + if len(pieces) == 2 { + sh.baseUsers(w, r) + return + } + if len(pieces) != 3 { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Invalid path")) + return + } + sh.forUser(w, r, pieces[2]) +} + +func (sh *authHandler) forUser(w http.ResponseWriter, r *http.Request, user string) { + if !allowMethod(w, r.Method, "GET", "PUT", "DELETE") { + return + } + if !hasRootAccess(sh.sec, r, sh.clientCertAuthEnabled) { + writeNoAuth(w, r) + return + } + w.Header().Set("X-Etcd-Cluster-ID", sh.cluster.ID().String()) + w.Header().Set("Content-Type", "application/json") + + switch r.Method { + case "GET": + u, err := sh.sec.GetUser(user) + if err != nil { + writeError(w, r, err) + return + } + + err = r.ParseForm() + if err != nil { + writeError(w, r, err) + return + } + + uwr := userWithRoles{User: u.User} + for _, roleName := range u.Roles { + var role auth.Role + role, err = sh.sec.GetRole(roleName) + if err != nil { + writeError(w, r, err) + return + } + uwr.Roles = append(uwr.Roles, role) + } + err = json.NewEncoder(w).Encode(uwr) + + if err != nil { + plog.Warningf("forUser error encoding on %s", r.URL) + return + } + return + case "PUT": + var u auth.User + err := json.NewDecoder(r.Body).Decode(&u) + if err != nil { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "Invalid JSON in request body.")) + return + } + if u.User != user { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "User JSON name does not match the name in the URL")) + return + } + + var ( + out auth.User + created bool + ) + + if len(u.Grant) == 0 && len(u.Revoke) == 0 { + // create or update + if len(u.Roles) != 0 { + out, err = sh.sec.CreateUser(u) + } else { + // if user passes in both password and roles, we are unsure about his/her + // intention. + out, created, err = sh.sec.CreateOrUpdateUser(u) + } + + if err != nil { + writeError(w, r, err) + return + } + } else { + // update case + if len(u.Roles) != 0 { + writeError(w, r, httptypes.NewHTTPError(http.StatusBadRequest, "User JSON contains both roles and grant/revoke")) + return + } + out, err = sh.sec.UpdateUser(u) + if err != nil { + writeError(w, r, err) + return + } + } + + if created { + w.WriteHeader(http.StatusCreated) + } else { + w.WriteHeader(http.StatusOK) + } + + out.Password = "" + + err = json.NewEncoder(w).Encode(out) + if err != nil { + plog.Warningf("forUser error encoding on %s", r.URL) + return + } + return + case "DELETE": + err := sh.sec.DeleteUser(user) + if err != nil { + writeError(w, r, err) + return + } + } +} + +type enabled struct { + Enabled bool `json:"enabled"` +} + +func (sh *authHandler) enableDisable(w http.ResponseWriter, r *http.Request) { + if !allowMethod(w, r.Method, "GET", "PUT", "DELETE") { + return + } + if !hasWriteRootAccess(sh.sec, r, sh.clientCertAuthEnabled) { + writeNoAuth(w, r) + return + } + w.Header().Set("X-Etcd-Cluster-ID", sh.cluster.ID().String()) + w.Header().Set("Content-Type", "application/json") + isEnabled := sh.sec.AuthEnabled() + switch r.Method { + case "GET": + jsonDict := enabled{isEnabled} + err := json.NewEncoder(w).Encode(jsonDict) + if err != nil { + plog.Warningf("error encoding auth state on %s", r.URL) + } + case "PUT": + err := sh.sec.EnableAuth() + if err != nil { + writeError(w, r, err) + return + } + case "DELETE": + err := sh.sec.DisableAuth() + if err != nil { + writeError(w, r, err) + return + } + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/doc.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/doc.go new file mode 100644 index 000000000..475c4b1f9 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/doc.go @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +// Package v2http provides etcd client and server implementations. +package v2http diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/http.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/http.go new file mode 100644 index 000000000..589c172db --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/http.go @@ -0,0 +1,74 @@ +// Copyright 2015 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. + +package v2http + +import ( + "math" + "net/http" + "strings" + "time" + + "github.com/coreos/etcd/etcdserver/api/etcdhttp" + "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" + "github.com/coreos/etcd/etcdserver/auth" + "github.com/coreos/etcd/pkg/logutil" + + "github.com/coreos/pkg/capnslog" +) + +const ( + // time to wait for a Watch request + defaultWatchTimeout = time.Duration(math.MaxInt64) +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/api/v2http") + mlog = logutil.NewMergeLogger(plog) +) + +func writeError(w http.ResponseWriter, r *http.Request, err error) { + if err == nil { + return + } + if e, ok := err.(auth.Error); ok { + herr := httptypes.NewHTTPError(e.HTTPStatus(), e.Error()) + if et := herr.WriteTo(w); et != nil { + plog.Debugf("error writing HTTPError (%v) to %s", et, r.RemoteAddr) + } + return + } + etcdhttp.WriteError(w, r, err) +} + +// allowMethod verifies that the given method is one of the allowed methods, +// and if not, it writes an error to w. A boolean is returned indicating +// whether or not the method is allowed. +func allowMethod(w http.ResponseWriter, m string, ms ...string) bool { + for _, meth := range ms { + if m == meth { + return true + } + } + w.Header().Set("Allow", strings.Join(ms, ",")) + http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed) + return false +} + +func requestLogger(handler http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + plog.Debugf("[%s] %s remote:%s", r.Method, r.RequestURI, r.RemoteAddr) + handler.ServeHTTP(w, r) + }) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/errors.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/errors.go new file mode 100644 index 000000000..0657604ca --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/errors.go @@ -0,0 +1,56 @@ +// Copyright 2015 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. + +package httptypes + +import ( + "encoding/json" + "net/http" + + "github.com/coreos/pkg/capnslog" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/api/v2http/httptypes") +) + +type HTTPError struct { + Message string `json:"message"` + // Code is the HTTP status code + Code int `json:"-"` +} + +func (e HTTPError) Error() string { + return e.Message +} + +func (e HTTPError) WriteTo(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(e.Code) + b, err := json.Marshal(e) + if err != nil { + plog.Panicf("marshal HTTPError should never fail (%v)", err) + } + if _, err := w.Write(b); err != nil { + return err + } + return nil +} + +func NewHTTPError(code int, m string) *HTTPError { + return &HTTPError{ + Message: m, + Code: code, + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/member.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/member.go new file mode 100644 index 000000000..738d74432 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/httptypes/member.go @@ -0,0 +1,69 @@ +// Copyright 2015 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. + +// Package httptypes defines how etcd's HTTP API entities are serialized to and +// deserialized from JSON. +package httptypes + +import ( + "encoding/json" + + "github.com/coreos/etcd/pkg/types" +) + +type Member struct { + ID string `json:"id"` + Name string `json:"name"` + PeerURLs []string `json:"peerURLs"` + ClientURLs []string `json:"clientURLs"` +} + +type MemberCreateRequest struct { + PeerURLs types.URLs +} + +type MemberUpdateRequest struct { + MemberCreateRequest +} + +func (m *MemberCreateRequest) UnmarshalJSON(data []byte) error { + s := struct { + PeerURLs []string `json:"peerURLs"` + }{} + + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + + urls, err := types.NewURLs(s.PeerURLs) + if err != nil { + return err + } + + m.PeerURLs = urls + return nil +} + +type MemberCollection []Member + +func (c *MemberCollection) MarshalJSON() ([]byte, error) { + d := struct { + Members []Member `json:"members"` + }{ + Members: []Member(*c), + } + + return json.Marshal(d) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v2http/metrics.go b/deps/github.com/coreos/etcd/etcdserver/api/v2http/metrics.go new file mode 100644 index 000000000..fdfb0c607 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v2http/metrics.go @@ -0,0 +1,96 @@ +// Copyright 2015 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. + +package v2http + +import ( + "strconv" + "time" + + "net/http" + + etcdErr "github.com/coreos/etcd/error" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" + "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/prometheus/client_golang/prometheus" +) + +var ( + incomingEvents = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "http", + Name: "received_total", + Help: "Counter of requests received into the system (successfully parsed and authd).", + }, []string{"method"}) + + failedEvents = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "http", + Name: "failed_total", + Help: "Counter of handle failures of requests (non-watches), by method (GET/PUT etc.) and code (400, 500 etc.).", + }, []string{"method", "code"}) + + successfulEventsHandlingTime = prometheus.NewHistogramVec( + prometheus.HistogramOpts{ + Namespace: "etcd", + Subsystem: "http", + Name: "successful_duration_seconds", + Help: "Bucketed histogram of processing time (s) of successfully handled requests (non-watches), by method (GET/PUT etc.).", + Buckets: prometheus.ExponentialBuckets(0.0005, 2, 13), + }, []string{"method"}) +) + +func init() { + prometheus.MustRegister(incomingEvents) + prometheus.MustRegister(failedEvents) + prometheus.MustRegister(successfulEventsHandlingTime) +} + +func reportRequestReceived(request etcdserverpb.Request) { + incomingEvents.WithLabelValues(methodFromRequest(request)).Inc() +} + +func reportRequestCompleted(request etcdserverpb.Request, response etcdserver.Response, startTime time.Time) { + method := methodFromRequest(request) + successfulEventsHandlingTime.WithLabelValues(method).Observe(time.Since(startTime).Seconds()) +} + +func reportRequestFailed(request etcdserverpb.Request, err error) { + method := methodFromRequest(request) + failedEvents.WithLabelValues(method, strconv.Itoa(codeFromError(err))).Inc() +} + +func methodFromRequest(request etcdserverpb.Request) string { + if request.Method == "GET" && request.Quorum { + return "QGET" + } + return request.Method +} + +func codeFromError(err error) int { + if err == nil { + return http.StatusInternalServerError + } + switch e := err.(type) { + case *etcdErr.Error: + return (*etcdErr.Error)(e).StatusCode() + case *httptypes.HTTPError: + return (*httptypes.HTTPError)(e).Code + default: + return http.StatusInternalServerError + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3client/doc.go b/deps/github.com/coreos/etcd/etcdserver/api/v3client/doc.go new file mode 100644 index 000000000..310715f5c --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3client/doc.go @@ -0,0 +1,45 @@ +// Copyright 2017 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. + +// Package v3client provides clientv3 interfaces from an etcdserver. +// +// Use v3client by creating an EtcdServer instance, then wrapping it with v3client.New: +// +// import ( +// "context" +// +// "github.com/coreos/etcd/embed" +// "github.com/coreos/etcd/etcdserver/api/v3client" +// ) +// +// ... +// +// // create an embedded EtcdServer from the default configuration +// cfg := embed.NewConfig() +// cfg.Dir = "default.etcd" +// e, err := embed.StartEtcd(cfg) +// if err != nil { +// // handle error! +// } +// +// // wrap the EtcdServer with v3client +// cli := v3client.New(e.Server) +// +// // use like an ordinary clientv3 +// resp, err := cli.Put(context.TODO(), "some-key", "it works!") +// if err != nil { +// // handle error! +// } +// +package v3client diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go b/deps/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go new file mode 100644 index 000000000..c0c07c8d7 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go @@ -0,0 +1,67 @@ +// Copyright 2017 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. + +package v3client + +import ( + "time" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v3rpc" + "github.com/coreos/etcd/proxy/grpcproxy/adapter" + + "golang.org/x/net/context" +) + +// New creates a clientv3 client that wraps an in-process EtcdServer. Instead +// of making gRPC calls through sockets, the client makes direct function calls +// to the etcd server through its api/v3rpc function interfaces. +func New(s *etcdserver.EtcdServer) *clientv3.Client { + c := clientv3.NewCtxClient(context.Background()) + + kvc := adapter.KvServerToKvClient(v3rpc.NewQuotaKVServer(s)) + c.KV = clientv3.NewKVFromKVClient(kvc, c) + + lc := adapter.LeaseServerToLeaseClient(v3rpc.NewQuotaLeaseServer(s)) + c.Lease = clientv3.NewLeaseFromLeaseClient(lc, c, time.Second) + + wc := adapter.WatchServerToWatchClient(v3rpc.NewWatchServer(s)) + c.Watcher = &watchWrapper{clientv3.NewWatchFromWatchClient(wc, c)} + + mc := adapter.MaintenanceServerToMaintenanceClient(v3rpc.NewMaintenanceServer(s)) + c.Maintenance = clientv3.NewMaintenanceFromMaintenanceClient(mc, c) + + clc := adapter.ClusterServerToClusterClient(v3rpc.NewClusterServer(s)) + c.Cluster = clientv3.NewClusterFromClusterClient(clc, c) + + // TODO: implement clientv3.Auth interface? + + return c +} + +// BlankContext implements Stringer on a context so the ctx string doesn't +// depend on the context's WithValue data, which tends to be unsynchronized +// (e.g., x/net/trace), causing ctx.String() to throw data races. +type blankContext struct{ context.Context } + +func (*blankContext) String() string { return "(blankCtx)" } + +// watchWrapper wraps clientv3 watch calls to blank out the context +// to avoid races on trace data. +type watchWrapper struct{ clientv3.Watcher } + +func (ww *watchWrapper) Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan { + return ww.Watcher.Watch(&blankContext{ctx}, key, opts...) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3election/doc.go b/deps/github.com/coreos/etcd/etcdserver/api/v3election/doc.go new file mode 100644 index 000000000..d6fefd741 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3election/doc.go @@ -0,0 +1,16 @@ +// Copyright 2017 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. + +// Package v3election provides a v3 election service from an etcdserver. +package v3election diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3election/election.go b/deps/github.com/coreos/etcd/etcdserver/api/v3election/election.go new file mode 100644 index 000000000..f9061c079 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3election/election.go @@ -0,0 +1,123 @@ +// Copyright 2017 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. + +package v3election + +import ( + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/clientv3/concurrency" + epb "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" +) + +type electionServer struct { + c *clientv3.Client +} + +func NewElectionServer(c *clientv3.Client) epb.ElectionServer { + return &electionServer{c} +} + +func (es *electionServer) Campaign(ctx context.Context, req *epb.CampaignRequest) (*epb.CampaignResponse, error) { + s, err := es.session(ctx, req.Lease) + if err != nil { + return nil, err + } + e := concurrency.NewElection(s, string(req.Name)) + if err = e.Campaign(ctx, string(req.Value)); err != nil { + return nil, err + } + return &epb.CampaignResponse{ + Header: e.Header(), + Leader: &epb.LeaderKey{ + Name: req.Name, + Key: []byte(e.Key()), + Rev: e.Rev(), + Lease: int64(s.Lease()), + }, + }, nil +} + +func (es *electionServer) Proclaim(ctx context.Context, req *epb.ProclaimRequest) (*epb.ProclaimResponse, error) { + s, err := es.session(ctx, req.Leader.Lease) + if err != nil { + return nil, err + } + e := concurrency.ResumeElection(s, string(req.Leader.Name), string(req.Leader.Key), req.Leader.Rev) + if err := e.Proclaim(ctx, string(req.Value)); err != nil { + return nil, err + } + return &epb.ProclaimResponse{Header: e.Header()}, nil +} + +func (es *electionServer) Observe(req *epb.LeaderRequest, stream epb.Election_ObserveServer) error { + s, err := es.session(stream.Context(), -1) + if err != nil { + return err + } + e := concurrency.NewElection(s, string(req.Name)) + ch := e.Observe(stream.Context()) + for stream.Context().Err() == nil { + select { + case <-stream.Context().Done(): + case resp, ok := <-ch: + if !ok { + return nil + } + lresp := &epb.LeaderResponse{Header: resp.Header, Kv: resp.Kvs[0]} + if err := stream.Send(lresp); err != nil { + return err + } + } + } + return stream.Context().Err() +} + +func (es *electionServer) Leader(ctx context.Context, req *epb.LeaderRequest) (*epb.LeaderResponse, error) { + s, err := es.session(ctx, -1) + if err != nil { + return nil, err + } + l, lerr := concurrency.NewElection(s, string(req.Name)).Leader(ctx) + if lerr != nil { + return nil, lerr + } + return &epb.LeaderResponse{Header: l.Header, Kv: l.Kvs[0]}, nil +} + +func (es *electionServer) Resign(ctx context.Context, req *epb.ResignRequest) (*epb.ResignResponse, error) { + s, err := es.session(ctx, req.Leader.Lease) + if err != nil { + return nil, err + } + e := concurrency.ResumeElection(s, string(req.Leader.Name), string(req.Leader.Key), req.Leader.Rev) + if err := e.Resign(ctx); err != nil { + return nil, err + } + return &epb.ResignResponse{Header: e.Header()}, nil +} + +func (es *electionServer) session(ctx context.Context, lease int64) (*concurrency.Session, error) { + s, err := concurrency.NewSession( + es.c, + concurrency.WithLease(clientv3.LeaseID(lease)), + concurrency.WithContext(ctx), + ) + if err != nil { + return nil, err + } + s.Orphan() + return s, nil +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go b/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go new file mode 100644 index 000000000..ac00cbea9 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/gw/v3election.pb.gw.go @@ -0,0 +1,313 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: etcdserver/api/v3election/v3electionpb/v3election.proto + +/* +Package v3electionpb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gw + +import ( + "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" + "io" + "net/http" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_Election_Campaign_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v3electionpb.CampaignRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Campaign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Election_Proclaim_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v3electionpb.ProclaimRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Proclaim(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Election_Leader_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v3electionpb.LeaderRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Leader(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Election_Observe_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (v3electionpb.Election_ObserveClient, runtime.ServerMetadata, error) { + var protoReq v3electionpb.LeaderRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.Observe(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_Election_Resign_0(ctx context.Context, marshaler runtime.Marshaler, client v3electionpb.ElectionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v3electionpb.ResignRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Resign(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterElectionHandlerFromEndpoint is same as RegisterElectionHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterElectionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterElectionHandler(ctx, mux, conn) +} + +// RegisterElectionHandler registers the http handlers for service Election to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterElectionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterElectionHandlerClient(ctx, mux, v3electionpb.NewElectionClient(conn)) +} + +// RegisterElectionHandler registers the http handlers for service Election to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "ElectionClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ElectionClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ElectionClient" to call the correct interceptors. +func RegisterElectionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client v3electionpb.ElectionClient) error { + + mux.Handle("POST", pattern_Election_Campaign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Election_Campaign_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Election_Campaign_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Election_Proclaim_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Election_Proclaim_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Election_Proclaim_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Election_Leader_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Election_Leader_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Election_Leader_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Election_Observe_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Election_Observe_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Election_Observe_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Election_Resign_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Election_Resign_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Election_Resign_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Election_Campaign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "election", "campaign"}, "")) + + pattern_Election_Proclaim_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "election", "proclaim"}, "")) + + pattern_Election_Leader_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "election", "leader"}, "")) + + pattern_Election_Observe_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "election", "observe"}, "")) + + pattern_Election_Resign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "election", "resign"}, "")) +) + +var ( + forward_Election_Campaign_0 = runtime.ForwardResponseMessage + + forward_Election_Proclaim_0 = runtime.ForwardResponseMessage + + forward_Election_Leader_0 = runtime.ForwardResponseMessage + + forward_Election_Observe_0 = runtime.ForwardResponseStream + + forward_Election_Resign_0 = runtime.ForwardResponseMessage +) diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.pb.go b/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.pb.go new file mode 100644 index 000000000..92acb1469 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.pb.go @@ -0,0 +1,2098 @@ +// Code generated by protoc-gen-gogo. +// source: v3election.proto +// DO NOT EDIT! + +/* + Package v3electionpb is a generated protocol buffer package. + + It is generated from these files: + v3election.proto + + It has these top-level messages: + CampaignRequest + CampaignResponse + LeaderKey + LeaderRequest + LeaderResponse + ResignRequest + ResignResponse + ProclaimRequest + ProclaimResponse +*/ +package v3electionpb + +import ( + "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + + etcdserverpb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + mvccpb "github.com/coreos/etcd/mvcc/mvccpb" + + _ "google.golang.org/genproto/googleapis/api/annotations" + + context "golang.org/x/net/context" + + grpc "google.golang.org/grpc" + + 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 CampaignRequest struct { + // name is the election's identifier for the campaign. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // lease is the ID of the lease attached to leadership of the election. If the + // lease expires or is revoked before resigning leadership, then the + // leadership is transferred to the next campaigner, if any. + Lease int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"` + // value is the initial proclaimed value set when the campaigner wins the + // election. + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *CampaignRequest) Reset() { *m = CampaignRequest{} } +func (m *CampaignRequest) String() string { return proto.CompactTextString(m) } +func (*CampaignRequest) ProtoMessage() {} +func (*CampaignRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{0} } + +func (m *CampaignRequest) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +func (m *CampaignRequest) GetLease() int64 { + if m != nil { + return m.Lease + } + return 0 +} + +func (m *CampaignRequest) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +type CampaignResponse struct { + Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + // leader describes the resources used for holding leadereship of the election. + Leader *LeaderKey `protobuf:"bytes,2,opt,name=leader" json:"leader,omitempty"` +} + +func (m *CampaignResponse) Reset() { *m = CampaignResponse{} } +func (m *CampaignResponse) String() string { return proto.CompactTextString(m) } +func (*CampaignResponse) ProtoMessage() {} +func (*CampaignResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{1} } + +func (m *CampaignResponse) GetHeader() *etcdserverpb.ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *CampaignResponse) GetLeader() *LeaderKey { + if m != nil { + return m.Leader + } + return nil +} + +type LeaderKey struct { + // name is the election identifier that correponds to the leadership key. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // key is an opaque key representing the ownership of the election. If the key + // is deleted, then leadership is lost. + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // rev is the creation revision of the key. It can be used to test for ownership + // of an election during transactions by testing the key's creation revision + // matches rev. + Rev int64 `protobuf:"varint,3,opt,name=rev,proto3" json:"rev,omitempty"` + // lease is the lease ID of the election leader. + Lease int64 `protobuf:"varint,4,opt,name=lease,proto3" json:"lease,omitempty"` +} + +func (m *LeaderKey) Reset() { *m = LeaderKey{} } +func (m *LeaderKey) String() string { return proto.CompactTextString(m) } +func (*LeaderKey) ProtoMessage() {} +func (*LeaderKey) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{2} } + +func (m *LeaderKey) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +func (m *LeaderKey) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *LeaderKey) GetRev() int64 { + if m != nil { + return m.Rev + } + return 0 +} + +func (m *LeaderKey) GetLease() int64 { + if m != nil { + return m.Lease + } + return 0 +} + +type LeaderRequest struct { + // name is the election identifier for the leadership information. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *LeaderRequest) Reset() { *m = LeaderRequest{} } +func (m *LeaderRequest) String() string { return proto.CompactTextString(m) } +func (*LeaderRequest) ProtoMessage() {} +func (*LeaderRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{3} } + +func (m *LeaderRequest) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +type LeaderResponse struct { + Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + // kv is the key-value pair representing the latest leader update. + Kv *mvccpb.KeyValue `protobuf:"bytes,2,opt,name=kv" json:"kv,omitempty"` +} + +func (m *LeaderResponse) Reset() { *m = LeaderResponse{} } +func (m *LeaderResponse) String() string { return proto.CompactTextString(m) } +func (*LeaderResponse) ProtoMessage() {} +func (*LeaderResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{4} } + +func (m *LeaderResponse) GetHeader() *etcdserverpb.ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *LeaderResponse) GetKv() *mvccpb.KeyValue { + if m != nil { + return m.Kv + } + return nil +} + +type ResignRequest struct { + // leader is the leadership to relinquish by resignation. + Leader *LeaderKey `protobuf:"bytes,1,opt,name=leader" json:"leader,omitempty"` +} + +func (m *ResignRequest) Reset() { *m = ResignRequest{} } +func (m *ResignRequest) String() string { return proto.CompactTextString(m) } +func (*ResignRequest) ProtoMessage() {} +func (*ResignRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{5} } + +func (m *ResignRequest) GetLeader() *LeaderKey { + if m != nil { + return m.Leader + } + return nil +} + +type ResignResponse struct { + Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` +} + +func (m *ResignResponse) Reset() { *m = ResignResponse{} } +func (m *ResignResponse) String() string { return proto.CompactTextString(m) } +func (*ResignResponse) ProtoMessage() {} +func (*ResignResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{6} } + +func (m *ResignResponse) GetHeader() *etcdserverpb.ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +type ProclaimRequest struct { + // leader is the leadership hold on the election. + Leader *LeaderKey `protobuf:"bytes,1,opt,name=leader" json:"leader,omitempty"` + // value is an update meant to overwrite the leader's current value. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *ProclaimRequest) Reset() { *m = ProclaimRequest{} } +func (m *ProclaimRequest) String() string { return proto.CompactTextString(m) } +func (*ProclaimRequest) ProtoMessage() {} +func (*ProclaimRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{7} } + +func (m *ProclaimRequest) GetLeader() *LeaderKey { + if m != nil { + return m.Leader + } + return nil +} + +func (m *ProclaimRequest) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +type ProclaimResponse struct { + Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` +} + +func (m *ProclaimResponse) Reset() { *m = ProclaimResponse{} } +func (m *ProclaimResponse) String() string { return proto.CompactTextString(m) } +func (*ProclaimResponse) ProtoMessage() {} +func (*ProclaimResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Election, []int{8} } + +func (m *ProclaimResponse) GetHeader() *etcdserverpb.ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +func init() { + proto.RegisterType((*CampaignRequest)(nil), "v3electionpb.CampaignRequest") + proto.RegisterType((*CampaignResponse)(nil), "v3electionpb.CampaignResponse") + proto.RegisterType((*LeaderKey)(nil), "v3electionpb.LeaderKey") + proto.RegisterType((*LeaderRequest)(nil), "v3electionpb.LeaderRequest") + proto.RegisterType((*LeaderResponse)(nil), "v3electionpb.LeaderResponse") + proto.RegisterType((*ResignRequest)(nil), "v3electionpb.ResignRequest") + proto.RegisterType((*ResignResponse)(nil), "v3electionpb.ResignResponse") + proto.RegisterType((*ProclaimRequest)(nil), "v3electionpb.ProclaimRequest") + proto.RegisterType((*ProclaimResponse)(nil), "v3electionpb.ProclaimResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Election service + +type ElectionClient interface { + // Campaign waits to acquire leadership in an election, returning a LeaderKey + // representing the leadership if successful. The LeaderKey can then be used + // to issue new values on the election, transactionally guard API requests on + // leadership still being held, and resign from the election. + Campaign(ctx context.Context, in *CampaignRequest, opts ...grpc.CallOption) (*CampaignResponse, error) + // Proclaim updates the leader's posted value with a new value. + Proclaim(ctx context.Context, in *ProclaimRequest, opts ...grpc.CallOption) (*ProclaimResponse, error) + // Leader returns the current election proclamation, if any. + Leader(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (*LeaderResponse, error) + // Observe streams election proclamations in-order as made by the election's + // elected leaders. + Observe(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (Election_ObserveClient, error) + // Resign releases election leadership so other campaigners may acquire + // leadership on the election. + Resign(ctx context.Context, in *ResignRequest, opts ...grpc.CallOption) (*ResignResponse, error) +} + +type electionClient struct { + cc *grpc.ClientConn +} + +func NewElectionClient(cc *grpc.ClientConn) ElectionClient { + return &electionClient{cc} +} + +func (c *electionClient) Campaign(ctx context.Context, in *CampaignRequest, opts ...grpc.CallOption) (*CampaignResponse, error) { + out := new(CampaignResponse) + err := grpc.Invoke(ctx, "/v3electionpb.Election/Campaign", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *electionClient) Proclaim(ctx context.Context, in *ProclaimRequest, opts ...grpc.CallOption) (*ProclaimResponse, error) { + out := new(ProclaimResponse) + err := grpc.Invoke(ctx, "/v3electionpb.Election/Proclaim", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *electionClient) Leader(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (*LeaderResponse, error) { + out := new(LeaderResponse) + err := grpc.Invoke(ctx, "/v3electionpb.Election/Leader", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *electionClient) Observe(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (Election_ObserveClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Election_serviceDesc.Streams[0], c.cc, "/v3electionpb.Election/Observe", opts...) + if err != nil { + return nil, err + } + x := &electionObserveClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Election_ObserveClient interface { + Recv() (*LeaderResponse, error) + grpc.ClientStream +} + +type electionObserveClient struct { + grpc.ClientStream +} + +func (x *electionObserveClient) Recv() (*LeaderResponse, error) { + m := new(LeaderResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *electionClient) Resign(ctx context.Context, in *ResignRequest, opts ...grpc.CallOption) (*ResignResponse, error) { + out := new(ResignResponse) + err := grpc.Invoke(ctx, "/v3electionpb.Election/Resign", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Election service + +type ElectionServer interface { + // Campaign waits to acquire leadership in an election, returning a LeaderKey + // representing the leadership if successful. The LeaderKey can then be used + // to issue new values on the election, transactionally guard API requests on + // leadership still being held, and resign from the election. + Campaign(context.Context, *CampaignRequest) (*CampaignResponse, error) + // Proclaim updates the leader's posted value with a new value. + Proclaim(context.Context, *ProclaimRequest) (*ProclaimResponse, error) + // Leader returns the current election proclamation, if any. + Leader(context.Context, *LeaderRequest) (*LeaderResponse, error) + // Observe streams election proclamations in-order as made by the election's + // elected leaders. + Observe(*LeaderRequest, Election_ObserveServer) error + // Resign releases election leadership so other campaigners may acquire + // leadership on the election. + Resign(context.Context, *ResignRequest) (*ResignResponse, error) +} + +func RegisterElectionServer(s *grpc.Server, srv ElectionServer) { + s.RegisterService(&_Election_serviceDesc, srv) +} + +func _Election_Campaign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CampaignRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ElectionServer).Campaign(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v3electionpb.Election/Campaign", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ElectionServer).Campaign(ctx, req.(*CampaignRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Election_Proclaim_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ProclaimRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ElectionServer).Proclaim(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v3electionpb.Election/Proclaim", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ElectionServer).Proclaim(ctx, req.(*ProclaimRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Election_Leader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LeaderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ElectionServer).Leader(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v3electionpb.Election/Leader", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ElectionServer).Leader(ctx, req.(*LeaderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Election_Observe_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(LeaderRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ElectionServer).Observe(m, &electionObserveServer{stream}) +} + +type Election_ObserveServer interface { + Send(*LeaderResponse) error + grpc.ServerStream +} + +type electionObserveServer struct { + grpc.ServerStream +} + +func (x *electionObserveServer) Send(m *LeaderResponse) error { + return x.ServerStream.SendMsg(m) +} + +func _Election_Resign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResignRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ElectionServer).Resign(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v3electionpb.Election/Resign", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ElectionServer).Resign(ctx, req.(*ResignRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Election_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v3electionpb.Election", + HandlerType: (*ElectionServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Campaign", + Handler: _Election_Campaign_Handler, + }, + { + MethodName: "Proclaim", + Handler: _Election_Proclaim_Handler, + }, + { + MethodName: "Leader", + Handler: _Election_Leader_Handler, + }, + { + MethodName: "Resign", + Handler: _Election_Resign_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Observe", + Handler: _Election_Observe_Handler, + ServerStreams: true, + }, + }, + Metadata: "v3election.proto", +} + +func (m *CampaignRequest) 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 *CampaignRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Lease != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Lease)) + } + if len(m.Value) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintV3Election(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + return i, nil +} + +func (m *CampaignResponse) 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 *CampaignResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Header.Size())) + n1, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Leader != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Leader.Size())) + n2, err := m.Leader.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func (m *LeaderKey) 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 *LeaderKey) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Key) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintV3Election(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if m.Rev != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Rev)) + } + if m.Lease != 0 { + dAtA[i] = 0x20 + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Lease)) + } + return i, nil +} + +func (m *LeaderRequest) 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 *LeaderRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + return i, nil +} + +func (m *LeaderResponse) 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 *LeaderResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Header.Size())) + n3, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.Kv != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Kv.Size())) + n4, err := m.Kv.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} + +func (m *ResignRequest) 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 *ResignRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Leader != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Leader.Size())) + n5, err := m.Leader.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} + +func (m *ResignResponse) 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 *ResignResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Header.Size())) + n6, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *ProclaimRequest) 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 *ProclaimRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Leader != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Leader.Size())) + n7, err := m.Leader.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintV3Election(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + return i, nil +} + +func (m *ProclaimResponse) 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 *ProclaimResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Election(dAtA, i, uint64(m.Header.Size())) + n8, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + return i, nil +} + +func encodeFixed64V3Election(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 encodeFixed32V3Election(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 encodeVarintV3Election(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 *CampaignRequest) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovV3Election(uint64(l)) + } + if m.Lease != 0 { + n += 1 + sovV3Election(uint64(m.Lease)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func (m *CampaignResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + if m.Leader != nil { + l = m.Leader.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func (m *LeaderKey) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovV3Election(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovV3Election(uint64(l)) + } + if m.Rev != 0 { + n += 1 + sovV3Election(uint64(m.Rev)) + } + if m.Lease != 0 { + n += 1 + sovV3Election(uint64(m.Lease)) + } + return n +} + +func (m *LeaderRequest) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func (m *LeaderResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + if m.Kv != nil { + l = m.Kv.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func (m *ResignRequest) Size() (n int) { + var l int + _ = l + if m.Leader != nil { + l = m.Leader.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func (m *ResignResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func (m *ProclaimRequest) Size() (n int) { + var l int + _ = l + if m.Leader != nil { + l = m.Leader.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func (m *ProclaimResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovV3Election(uint64(l)) + } + return n +} + +func sovV3Election(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozV3Election(x uint64) (n int) { + return sovV3Election(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CampaignRequest) 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 ErrIntOverflowV3Election + } + 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: CampaignRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CampaignRequest: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Election + } + 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 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) + } + m.Lease = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Lease |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + 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 ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Election + } + 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 + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CampaignResponse) 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 ErrIntOverflowV3Election + } + 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: CampaignResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CampaignResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &etcdserverpb.ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leader == nil { + m.Leader = &LeaderKey{} + } + if err := m.Leader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaderKey) 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 ErrIntOverflowV3Election + } + 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: LeaderKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaderKey: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Election + } + 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 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rev", wireType) + } + m.Rev = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rev |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) + } + m.Lease = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Lease |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaderRequest) 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 ErrIntOverflowV3Election + } + 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: LeaderRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaderRequest: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Election + } + 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 + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaderResponse) 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 ErrIntOverflowV3Election + } + 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: LeaderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &etcdserverpb.ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kv", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Kv == nil { + m.Kv = &mvccpb.KeyValue{} + } + if err := m.Kv.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResignRequest) 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 ErrIntOverflowV3Election + } + 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: ResignRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResignRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leader == nil { + m.Leader = &LeaderKey{} + } + if err := m.Leader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResignResponse) 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 ErrIntOverflowV3Election + } + 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: ResignResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResignResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &etcdserverpb.ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProclaimRequest) 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 ErrIntOverflowV3Election + } + 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: ProclaimRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProclaimRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leader", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leader == nil { + m.Leader = &LeaderKey{} + } + if err := m.Leader.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Election + } + 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 + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProclaimResponse) 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 ErrIntOverflowV3Election + } + 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: ProclaimResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProclaimResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Election + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Election + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &etcdserverpb.ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Election(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Election + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipV3Election(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, ErrIntOverflowV3Election + } + 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, ErrIntOverflowV3Election + } + 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, ErrIntOverflowV3Election + } + 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, ErrInvalidLengthV3Election + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowV3Election + } + 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 := skipV3Election(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 ( + ErrInvalidLengthV3Election = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowV3Election = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("v3election.proto", fileDescriptorV3Election) } + +var fileDescriptorV3Election = []byte{ + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x65, 0x9d, 0x10, 0xca, 0x90, 0xb6, 0x96, 0x55, 0x89, 0x34, 0xa4, 0x26, 0xda, 0x02, 0xaa, + 0x72, 0xf0, 0xa2, 0x86, 0x53, 0x4e, 0x08, 0x04, 0xaa, 0x54, 0x24, 0xc0, 0x07, 0x04, 0xc7, 0x8d, + 0x3b, 0x4a, 0xa2, 0x38, 0xde, 0xc5, 0x4e, 0x2d, 0xe5, 0xca, 0x2f, 0x70, 0xe1, 0x33, 0xf8, 0x0c, + 0x8e, 0x48, 0xfc, 0x00, 0x0a, 0x7c, 0x08, 0xda, 0x5d, 0x1b, 0x3b, 0x6e, 0x88, 0x50, 0x73, 0xb1, + 0xc6, 0x33, 0xcf, 0xf3, 0xe6, 0xbd, 0x9d, 0x35, 0xd8, 0x69, 0x1f, 0x43, 0x0c, 0xe6, 0x13, 0x11, + 0x79, 0x32, 0x16, 0x73, 0xe1, 0x34, 0x8b, 0x8c, 0x1c, 0xb6, 0x0f, 0x46, 0x62, 0x24, 0x74, 0x81, + 0xa9, 0xc8, 0x60, 0xda, 0x8f, 0x70, 0x1e, 0x5c, 0x30, 0xf5, 0x48, 0x30, 0x4e, 0x31, 0x2e, 0x85, + 0x72, 0xc8, 0x62, 0x19, 0x64, 0xb8, 0x43, 0x8d, 0x9b, 0xa5, 0x41, 0xa0, 0x1f, 0x72, 0xc8, 0xa6, + 0x69, 0x56, 0xea, 0x8c, 0x84, 0x18, 0x85, 0xc8, 0xb8, 0x9c, 0x30, 0x1e, 0x45, 0x62, 0xce, 0x15, + 0x63, 0x62, 0xaa, 0xf4, 0x2d, 0xec, 0x3f, 0xe7, 0x33, 0xc9, 0x27, 0xa3, 0xc8, 0xc7, 0x8f, 0x97, + 0x98, 0xcc, 0x1d, 0x07, 0xea, 0x11, 0x9f, 0x61, 0x8b, 0x74, 0xc9, 0x49, 0xd3, 0xd7, 0xb1, 0x73, + 0x00, 0x37, 0x43, 0xe4, 0x09, 0xb6, 0xac, 0x2e, 0x39, 0xa9, 0xf9, 0xe6, 0x45, 0x65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0xa3, 0xd5, 0xc9, 0x2a, 0x57, 0xa1, 0xed, 0xfe, 0xab, 0x6c, 0x58, 0xe8, 0xc3, 0x4f, + 0x3f, 0x7e, 0x7f, 0xb6, 0xee, 0xd3, 0x36, 0x4b, 0xfb, 0x3c, 0x94, 0x63, 0xce, 0x72, 0x34, 0x0b, + 0x32, 0xec, 0x80, 0xf4, 0x14, 0x63, 0x2e, 0xa4, 0xca, 0x58, 0xb1, 0xae, 0xca, 0x58, 0xd5, 0xbf, + 0x89, 0x51, 0x66, 0x58, 0xc5, 0x38, 0x86, 0x86, 0x71, 0xd9, 0xb9, 0xb7, 0xce, 0xfb, 0x9c, 0xad, + 0xb3, 0xbe, 0x98, 0x71, 0x1d, 0x6b, 0xae, 0x23, 0xda, 0xba, 0xca, 0x65, 0xce, 0x4d, 0x31, 0x85, + 0x70, 0xeb, 0xf5, 0x50, 0xfb, 0xbf, 0x0d, 0xd5, 0x03, 0x4d, 0xe5, 0xd2, 0xc3, 0xab, 0x54, 0xc2, + 0x74, 0x1f, 0x90, 0xde, 0x63, 0xa2, 0x74, 0x99, 0xa5, 0xad, 0x92, 0xad, 0x5c, 0x86, 0x2a, 0xd9, + 0xea, 0x9e, 0x6f, 0xd2, 0x15, 0x6b, 0xe4, 0x80, 0xf4, 0x9e, 0xd9, 0xdf, 0x96, 0x2e, 0xf9, 0xbe, + 0x74, 0xc9, 0xcf, 0xa5, 0x4b, 0xbe, 0xfc, 0x72, 0x6f, 0x0c, 0x1b, 0xfa, 0x8f, 0xd9, 0xff, 0x13, + 0x00, 0x00, 0xff, 0xff, 0xfc, 0x4d, 0x5a, 0x40, 0xca, 0x05, 0x00, 0x00, +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.proto b/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.proto new file mode 100644 index 000000000..ebf6c88f7 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/v3election.proto @@ -0,0 +1,119 @@ +syntax = "proto3"; +package v3electionpb; + +import "gogoproto/gogo.proto"; +import "etcd/etcdserver/etcdserverpb/rpc.proto"; +import "etcd/mvcc/mvccpb/kv.proto"; + +// for grpc-gateway +import "google/api/annotations.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; + +// The election service exposes client-side election facilities as a gRPC interface. +service Election { + // Campaign waits to acquire leadership in an election, returning a LeaderKey + // representing the leadership if successful. The LeaderKey can then be used + // to issue new values on the election, transactionally guard API requests on + // leadership still being held, and resign from the election. + rpc Campaign(CampaignRequest) returns (CampaignResponse) { + option (google.api.http) = { + post: "/v3alpha/election/campaign" + body: "*" + }; + } + // Proclaim updates the leader's posted value with a new value. + rpc Proclaim(ProclaimRequest) returns (ProclaimResponse) { + option (google.api.http) = { + post: "/v3alpha/election/proclaim" + body: "*" + }; + } + // Leader returns the current election proclamation, if any. + rpc Leader(LeaderRequest) returns (LeaderResponse) { + option (google.api.http) = { + post: "/v3alpha/election/leader" + body: "*" + }; + } + // Observe streams election proclamations in-order as made by the election's + // elected leaders. + rpc Observe(LeaderRequest) returns (stream LeaderResponse) { + option (google.api.http) = { + post: "/v3alpha/election/observe" + body: "*" + }; + } + // Resign releases election leadership so other campaigners may acquire + // leadership on the election. + rpc Resign(ResignRequest) returns (ResignResponse) { + option (google.api.http) = { + post: "/v3alpha/election/resign" + body: "*" + }; + } +} + +message CampaignRequest { + // name is the election's identifier for the campaign. + bytes name = 1; + // lease is the ID of the lease attached to leadership of the election. If the + // lease expires or is revoked before resigning leadership, then the + // leadership is transferred to the next campaigner, if any. + int64 lease = 2; + // value is the initial proclaimed value set when the campaigner wins the + // election. + bytes value = 3; +} + +message CampaignResponse { + etcdserverpb.ResponseHeader header = 1; + // leader describes the resources used for holding leadereship of the election. + LeaderKey leader = 2; +} + +message LeaderKey { + // name is the election identifier that correponds to the leadership key. + bytes name = 1; + // key is an opaque key representing the ownership of the election. If the key + // is deleted, then leadership is lost. + bytes key = 2; + // rev is the creation revision of the key. It can be used to test for ownership + // of an election during transactions by testing the key's creation revision + // matches rev. + int64 rev = 3; + // lease is the lease ID of the election leader. + int64 lease = 4; +} + +message LeaderRequest { + // name is the election identifier for the leadership information. + bytes name = 1; +} + +message LeaderResponse { + etcdserverpb.ResponseHeader header = 1; + // kv is the key-value pair representing the latest leader update. + mvccpb.KeyValue kv = 2; +} + +message ResignRequest { + // leader is the leadership to relinquish by resignation. + LeaderKey leader = 1; +} + +message ResignResponse { + etcdserverpb.ResponseHeader header = 1; +} + +message ProclaimRequest { + // leader is the leadership hold on the election. + LeaderKey leader = 1; + // value is an update meant to overwrite the leader's current value. + bytes value = 2; +} + +message ProclaimResponse { + etcdserverpb.ResponseHeader header = 1; +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3lock/doc.go b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/doc.go new file mode 100644 index 000000000..e0a1008ab --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/doc.go @@ -0,0 +1,16 @@ +// Copyright 2017 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. + +// Package v3lock provides a v3 locking service from an etcdserver. +package v3lock diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go new file mode 100644 index 000000000..66465bf13 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go @@ -0,0 +1,56 @@ +// Copyright 2017 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. + +package v3lock + +import ( + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/clientv3/concurrency" + "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" +) + +type lockServer struct { + c *clientv3.Client +} + +func NewLockServer(c *clientv3.Client) v3lockpb.LockServer { + return &lockServer{c} +} + +func (ls *lockServer) Lock(ctx context.Context, req *v3lockpb.LockRequest) (*v3lockpb.LockResponse, error) { + s, err := concurrency.NewSession( + ls.c, + concurrency.WithLease(clientv3.LeaseID(req.Lease)), + concurrency.WithContext(ctx), + ) + if err != nil { + return nil, err + } + s.Orphan() + m := concurrency.NewMutex(s, string(req.Name)) + if err = m.Lock(ctx); err != nil { + return nil, err + } + return &v3lockpb.LockResponse{Header: m.Header(), Key: []byte(m.Key())}, nil +} + +func (ls *lockServer) Unlock(ctx context.Context, req *v3lockpb.UnlockRequest) (*v3lockpb.UnlockResponse, error) { + resp, err := ls.c.Delete(ctx, string(req.Key)) + if err != nil { + return nil, err + } + return &v3lockpb.UnlockResponse{Header: resp.Header}, nil +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go new file mode 100644 index 000000000..5aef4756d --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/gw/v3lock.pb.gw.go @@ -0,0 +1,167 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: etcdserver/api/v3lock/v3lockpb/v3lock.proto + +/* +Package v3lockpb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gw + +import ( + "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" + "io" + "net/http" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_Lock_Lock_0(ctx context.Context, marshaler runtime.Marshaler, client v3lockpb.LockClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v3lockpb.LockRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Lock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Lock_Unlock_0(ctx context.Context, marshaler runtime.Marshaler, client v3lockpb.LockClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v3lockpb.UnlockRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Unlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterLockHandlerFromEndpoint is same as RegisterLockHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterLockHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterLockHandler(ctx, mux, conn) +} + +// RegisterLockHandler registers the http handlers for service Lock to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterLockHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterLockHandlerClient(ctx, mux, v3lockpb.NewLockClient(conn)) +} + +// RegisterLockHandler registers the http handlers for service Lock to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "LockClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LockClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "LockClient" to call the correct interceptors. +func RegisterLockHandlerClient(ctx context.Context, mux *runtime.ServeMux, client v3lockpb.LockClient) error { + + mux.Handle("POST", pattern_Lock_Lock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Lock_Lock_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Lock_Lock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Lock_Unlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Lock_Unlock_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Lock_Unlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Lock_Lock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 1}, []string{"v3alpha", "lock"}, "")) + + pattern_Lock_Unlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "lock", "unlock"}, "")) +) + +var ( + forward_Lock_Lock_0 = runtime.ForwardResponseMessage + + forward_Lock_Unlock_0 = runtime.ForwardResponseMessage +) diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.pb.go b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.pb.go new file mode 100644 index 000000000..dcf2bad40 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.pb.go @@ -0,0 +1,978 @@ +// Code generated by protoc-gen-gogo. +// source: v3lock.proto +// DO NOT EDIT! + +/* + Package v3lockpb is a generated protocol buffer package. + + It is generated from these files: + v3lock.proto + + It has these top-level messages: + LockRequest + LockResponse + UnlockRequest + UnlockResponse +*/ +package v3lockpb + +import ( + "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + + etcdserverpb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + _ "google.golang.org/genproto/googleapis/api/annotations" + + context "golang.org/x/net/context" + + grpc "google.golang.org/grpc" + + 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 LockRequest struct { + // name is the identifier for the distributed shared lock to be acquired. + Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // lease is the ID of the lease that will be attached to ownership of the + // lock. If the lease expires or is revoked and currently holds the lock, + // the lock is automatically released. Calls to Lock with the same lease will + // be treated as a single acquistion; locking twice with the same lease is a + // no-op. + Lease int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"` +} + +func (m *LockRequest) Reset() { *m = LockRequest{} } +func (m *LockRequest) String() string { return proto.CompactTextString(m) } +func (*LockRequest) ProtoMessage() {} +func (*LockRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{0} } + +func (m *LockRequest) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +func (m *LockRequest) GetLease() int64 { + if m != nil { + return m.Lease + } + return 0 +} + +type LockResponse struct { + Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` + // key is a key that will exist on etcd for the duration that the Lock caller + // owns the lock. Users should not modify this key or the lock may exhibit + // undefined behavior. + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *LockResponse) Reset() { *m = LockResponse{} } +func (m *LockResponse) String() string { return proto.CompactTextString(m) } +func (*LockResponse) ProtoMessage() {} +func (*LockResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{1} } + +func (m *LockResponse) GetHeader() *etcdserverpb.ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +func (m *LockResponse) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +type UnlockRequest struct { + // key is the lock ownership key granted by Lock. + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *UnlockRequest) Reset() { *m = UnlockRequest{} } +func (m *UnlockRequest) String() string { return proto.CompactTextString(m) } +func (*UnlockRequest) ProtoMessage() {} +func (*UnlockRequest) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{2} } + +func (m *UnlockRequest) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +type UnlockResponse struct { + Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` +} + +func (m *UnlockResponse) Reset() { *m = UnlockResponse{} } +func (m *UnlockResponse) String() string { return proto.CompactTextString(m) } +func (*UnlockResponse) ProtoMessage() {} +func (*UnlockResponse) Descriptor() ([]byte, []int) { return fileDescriptorV3Lock, []int{3} } + +func (m *UnlockResponse) GetHeader() *etcdserverpb.ResponseHeader { + if m != nil { + return m.Header + } + return nil +} + +func init() { + proto.RegisterType((*LockRequest)(nil), "v3lockpb.LockRequest") + proto.RegisterType((*LockResponse)(nil), "v3lockpb.LockResponse") + proto.RegisterType((*UnlockRequest)(nil), "v3lockpb.UnlockRequest") + proto.RegisterType((*UnlockResponse)(nil), "v3lockpb.UnlockResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Lock service + +type LockClient interface { + // Lock acquires a distributed shared lock on a given named lock. + // On success, it will return a unique key that exists so long as the + // lock is held by the caller. This key can be used in conjunction with + // transactions to safely ensure updates to etcd only occur while holding + // lock ownership. The lock is held until Unlock is called on the key or the + // lease associate with the owner expires. + Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) + // Unlock takes a key returned by Lock and releases the hold on lock. The + // next Lock caller waiting for the lock will then be woken up and given + // ownership of the lock. + Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) +} + +type lockClient struct { + cc *grpc.ClientConn +} + +func NewLockClient(cc *grpc.ClientConn) LockClient { + return &lockClient{cc} +} + +func (c *lockClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) { + out := new(LockResponse) + err := grpc.Invoke(ctx, "/v3lockpb.Lock/Lock", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *lockClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) { + out := new(UnlockResponse) + err := grpc.Invoke(ctx, "/v3lockpb.Lock/Unlock", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Lock service + +type LockServer interface { + // Lock acquires a distributed shared lock on a given named lock. + // On success, it will return a unique key that exists so long as the + // lock is held by the caller. This key can be used in conjunction with + // transactions to safely ensure updates to etcd only occur while holding + // lock ownership. The lock is held until Unlock is called on the key or the + // lease associate with the owner expires. + Lock(context.Context, *LockRequest) (*LockResponse, error) + // Unlock takes a key returned by Lock and releases the hold on lock. The + // next Lock caller waiting for the lock will then be woken up and given + // ownership of the lock. + Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error) +} + +func RegisterLockServer(s *grpc.Server, srv LockServer) { + s.RegisterService(&_Lock_serviceDesc, srv) +} + +func _Lock_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LockServer).Lock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v3lockpb.Lock/Lock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LockServer).Lock(ctx, req.(*LockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Lock_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LockServer).Unlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v3lockpb.Lock/Unlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LockServer).Unlock(ctx, req.(*UnlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Lock_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v3lockpb.Lock", + HandlerType: (*LockServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Lock", + Handler: _Lock_Lock_Handler, + }, + { + MethodName: "Unlock", + Handler: _Lock_Unlock_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "v3lock.proto", +} + +func (m *LockRequest) 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 *LockRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Lease != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintV3Lock(dAtA, i, uint64(m.Lease)) + } + return i, nil +} + +func (m *LockResponse) 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 *LockResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Lock(dAtA, i, uint64(m.Header.Size())) + n1, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.Key) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + return i, nil +} + +func (m *UnlockRequest) 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 *UnlockRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + return i, nil +} + +func (m *UnlockResponse) 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 *UnlockResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Header != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintV3Lock(dAtA, i, uint64(m.Header.Size())) + n2, err := m.Header.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func encodeFixed64V3Lock(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 encodeFixed32V3Lock(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 encodeVarintV3Lock(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 *LockRequest) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovV3Lock(uint64(l)) + } + if m.Lease != 0 { + n += 1 + sovV3Lock(uint64(m.Lease)) + } + return n +} + +func (m *LockResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovV3Lock(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovV3Lock(uint64(l)) + } + return n +} + +func (m *UnlockRequest) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovV3Lock(uint64(l)) + } + return n +} + +func (m *UnlockResponse) Size() (n int) { + var l int + _ = l + if m.Header != nil { + l = m.Header.Size() + n += 1 + l + sovV3Lock(uint64(l)) + } + return n +} + +func sovV3Lock(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozV3Lock(x uint64) (n int) { + return sovV3Lock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *LockRequest) 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 ErrIntOverflowV3Lock + } + 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: LockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LockRequest: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Lock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Lock + } + 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 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) + } + m.Lease = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Lock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Lease |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipV3Lock(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Lock + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LockResponse) 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 ErrIntOverflowV3Lock + } + 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: LockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Lock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Lock + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &etcdserverpb.ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Lock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Lock + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Lock(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Lock + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnlockRequest) 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 ErrIntOverflowV3Lock + } + 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: UnlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockRequest: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Lock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthV3Lock + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Lock(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Lock + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnlockResponse) 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 ErrIntOverflowV3Lock + } + 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: UnlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowV3Lock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthV3Lock + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Header == nil { + m.Header = &etcdserverpb.ResponseHeader{} + } + if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipV3Lock(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthV3Lock + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipV3Lock(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, ErrIntOverflowV3Lock + } + 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, ErrIntOverflowV3Lock + } + 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, ErrIntOverflowV3Lock + } + 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, ErrInvalidLengthV3Lock + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowV3Lock + } + 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 := skipV3Lock(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 ( + ErrInvalidLengthV3Lock = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowV3Lock = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("v3lock.proto", fileDescriptorV3Lock) } + +var fileDescriptorV3Lock = []byte{ + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x33, 0xce, 0xc9, + 0x4f, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf0, 0x0a, 0x92, 0xa4, 0x44, + 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0x4a, 0x2d, 0xb5, 0x24, 0x39, + 0x45, 0x1f, 0x44, 0x14, 0xa7, 0x16, 0x95, 0xa5, 0x16, 0x21, 0x31, 0x0b, 0x92, 0xf4, 0x8b, 0x0a, + 0x92, 0xa1, 0xea, 0x64, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x13, 0x0b, 0x32, 0xf5, 0x13, + 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0x21, 0xb2, 0x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x84, 0x01, 0x28, 0x7e, 0x93, 0x92, 0xc0, 0x94, 0x80, 0x9a, 0x2d, 0x0f, 0x36, + 0x5b, 0x52, 0x49, 0x04, 0xd5, 0xec, 0xd2, 0x3c, 0xa8, 0xe9, 0x4e, 0x02, 0x27, 0x1e, 0xc9, 0x31, + 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8c, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0xe0, + 0x18, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xa0, 0x26, 0x28, 0x47, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.proto b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.proto new file mode 100644 index 000000000..3e92a6ec2 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/v3lock.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; +package v3lockpb; + +import "gogoproto/gogo.proto"; +import "etcd/etcdserver/etcdserverpb/rpc.proto"; + +// for grpc-gateway +import "google/api/annotations.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; + +// The lock service exposes client-side locking facilities as a gRPC interface. +service Lock { + // Lock acquires a distributed shared lock on a given named lock. + // On success, it will return a unique key that exists so long as the + // lock is held by the caller. This key can be used in conjunction with + // transactions to safely ensure updates to etcd only occur while holding + // lock ownership. The lock is held until Unlock is called on the key or the + // lease associate with the owner expires. + rpc Lock(LockRequest) returns (LockResponse) { + option (google.api.http) = { + post: "/v3alpha/lock/lock" + body: "*" + }; + } + + // Unlock takes a key returned by Lock and releases the hold on lock. The + // next Lock caller waiting for the lock will then be woken up and given + // ownership of the lock. + rpc Unlock(UnlockRequest) returns (UnlockResponse) { + option (google.api.http) = { + post: "/v3alpha/lock/unlock" + body: "*" + }; + } +} + +message LockRequest { + // name is the identifier for the distributed shared lock to be acquired. + bytes name = 1; + // lease is the ID of the lease that will be attached to ownership of the + // lock. If the lease expires or is revoked and currently holds the lock, + // the lock is automatically released. Calls to Lock with the same lease will + // be treated as a single acquistion; locking twice with the same lease is a + // no-op. + int64 lease = 2; +} + +message LockResponse { + etcdserverpb.ResponseHeader header = 1; + // key is a key that will exist on etcd for the duration that the Lock caller + // owns the lock. Users should not modify this key or the lock may exhibit + // undefined behavior. + bytes key = 2; +} + +message UnlockRequest { + // key is the lock ownership key granted by Lock. + bytes key = 1; +} + +message UnlockResponse { + etcdserverpb.ResponseHeader header = 1; +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go new file mode 100644 index 000000000..e66c5261d --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go @@ -0,0 +1,157 @@ +// 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. + +package v3rpc + +import ( + "github.com/coreos/etcd/etcdserver" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "golang.org/x/net/context" +) + +type AuthServer struct { + authenticator etcdserver.Authenticator +} + +func NewAuthServer(s *etcdserver.EtcdServer) *AuthServer { + return &AuthServer{authenticator: s} +} + +func (as *AuthServer) AuthEnable(ctx context.Context, r *pb.AuthEnableRequest) (*pb.AuthEnableResponse, error) { + resp, err := as.authenticator.AuthEnable(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) AuthDisable(ctx context.Context, r *pb.AuthDisableRequest) (*pb.AuthDisableResponse, error) { + resp, err := as.authenticator.AuthDisable(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) Authenticate(ctx context.Context, r *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error) { + resp, err := as.authenticator.Authenticate(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) RoleAdd(ctx context.Context, r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) { + resp, err := as.authenticator.RoleAdd(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) RoleDelete(ctx context.Context, r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) { + resp, err := as.authenticator.RoleDelete(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) RoleGet(ctx context.Context, r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) { + resp, err := as.authenticator.RoleGet(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) RoleList(ctx context.Context, r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) { + resp, err := as.authenticator.RoleList(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) RoleRevokePermission(ctx context.Context, r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) { + resp, err := as.authenticator.RoleRevokePermission(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) RoleGrantPermission(ctx context.Context, r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) { + resp, err := as.authenticator.RoleGrantPermission(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) UserAdd(ctx context.Context, r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) { + resp, err := as.authenticator.UserAdd(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) UserDelete(ctx context.Context, r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) { + resp, err := as.authenticator.UserDelete(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) UserGet(ctx context.Context, r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) { + resp, err := as.authenticator.UserGet(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) UserList(ctx context.Context, r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) { + resp, err := as.authenticator.UserList(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) UserGrantRole(ctx context.Context, r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) { + resp, err := as.authenticator.UserGrantRole(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) UserRevokeRole(ctx context.Context, r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) { + resp, err := as.authenticator.UserRevokeRole(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} + +func (as *AuthServer) UserChangePassword(ctx context.Context, r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) { + resp, err := as.authenticator.UserChangePassword(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + return resp, nil +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/codec.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/codec.go new file mode 100644 index 000000000..17a2c87ae --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/codec.go @@ -0,0 +1,34 @@ +// 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. + +package v3rpc + +import "github.com/gogo/protobuf/proto" + +type codec struct{} + +func (c *codec) Marshal(v interface{}) ([]byte, error) { + b, err := proto.Marshal(v.(proto.Message)) + sentBytes.Add(float64(len(b))) + return b, err +} + +func (c *codec) Unmarshal(data []byte, v interface{}) error { + receivedBytes.Add(float64(len(data))) + return proto.Unmarshal(data, v.(proto.Message)) +} + +func (c *codec) String() string { + return "proto" +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go new file mode 100644 index 000000000..5333491a2 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go @@ -0,0 +1,71 @@ +// 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. + +package v3rpc + +import ( + "crypto/tls" + "io/ioutil" + "math" + "os" + "sync" + + "github.com/coreos/etcd/etcdserver" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/grpclog" +) + +const ( + grpcOverheadBytes = 512 * 1024 + maxStreams = math.MaxUint32 + maxSendBytes = math.MaxInt32 +) + +// integration tests call this multiple times, which is racey in gRPC side +var grpclogOnce sync.Once + +func Server(s *etcdserver.EtcdServer, tls *tls.Config, gopts ...grpc.ServerOption) *grpc.Server { + var opts []grpc.ServerOption + opts = append(opts, grpc.CustomCodec(&codec{})) + if tls != nil { + opts = append(opts, grpc.Creds(credentials.NewTLS(tls))) + } + opts = append(opts, grpc.UnaryInterceptor(newUnaryInterceptor(s))) + opts = append(opts, grpc.StreamInterceptor(newStreamInterceptor(s))) + opts = append(opts, grpc.MaxRecvMsgSize(int(s.Cfg.MaxRequestBytes+grpcOverheadBytes))) + opts = append(opts, grpc.MaxSendMsgSize(maxSendBytes)) + opts = append(opts, grpc.MaxConcurrentStreams(maxStreams)) + grpcServer := grpc.NewServer(append(opts, gopts...)...) + + pb.RegisterKVServer(grpcServer, NewQuotaKVServer(s)) + pb.RegisterWatchServer(grpcServer, NewWatchServer(s)) + pb.RegisterLeaseServer(grpcServer, NewQuotaLeaseServer(s)) + pb.RegisterClusterServer(grpcServer, NewClusterServer(s)) + pb.RegisterAuthServer(grpcServer, NewAuthServer(s)) + pb.RegisterMaintenanceServer(grpcServer, NewMaintenanceServer(s)) + + grpclogOnce.Do(func() { + if s.Cfg.Debug { + grpc.EnableTracing = true + // enable info, warning, error + grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr)) + } else { + // only discard info + grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, os.Stderr, os.Stderr)) + } + }) + return grpcServer +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/header.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/header.go new file mode 100644 index 000000000..d6d7f35d5 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/header.go @@ -0,0 +1,46 @@ +// 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. + +package v3rpc + +import ( + "github.com/coreos/etcd/etcdserver" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +type header struct { + clusterID int64 + memberID int64 + raftTimer etcdserver.RaftTimer + rev func() int64 +} + +func newHeader(s *etcdserver.EtcdServer) header { + return header{ + clusterID: int64(s.Cluster().ID()), + memberID: int64(s.ID()), + raftTimer: s, + rev: func() int64 { return s.KV().Rev() }, + } +} + +// fill populates pb.ResponseHeader using etcdserver information +func (h *header) fill(rh *pb.ResponseHeader) { + rh.ClusterId = uint64(h.clusterID) + rh.MemberId = uint64(h.memberID) + rh.RaftTerm = h.raftTimer.Term() + if rh.Revision == 0 { + rh.Revision = h.rev() + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go new file mode 100644 index 000000000..de9470a89 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go @@ -0,0 +1,144 @@ +// 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. + +package v3rpc + +import ( + "sync" + "time" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft" + + prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +const ( + maxNoLeaderCnt = 3 +) + +type streamsMap struct { + mu sync.Mutex + streams map[grpc.ServerStream]struct{} +} + +func newUnaryInterceptor(s *etcdserver.EtcdServer) grpc.UnaryServerInterceptor { + return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { + if !api.IsCapabilityEnabled(api.V3rpcCapability) { + return nil, rpctypes.ErrGRPCNotCapable + } + + md, ok := metadata.FromIncomingContext(ctx) + if ok { + if ks := md[rpctypes.MetadataRequireLeaderKey]; len(ks) > 0 && ks[0] == rpctypes.MetadataHasLeader { + if s.Leader() == types.ID(raft.None) { + return nil, rpctypes.ErrGRPCNoLeader + } + } + } + + return prometheus.UnaryServerInterceptor(ctx, req, info, handler) + } +} + +func newStreamInterceptor(s *etcdserver.EtcdServer) grpc.StreamServerInterceptor { + smap := monitorLeader(s) + + return func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { + if !api.IsCapabilityEnabled(api.V3rpcCapability) { + return rpctypes.ErrGRPCNotCapable + } + + md, ok := metadata.FromIncomingContext(ss.Context()) + if ok { + if ks := md[rpctypes.MetadataRequireLeaderKey]; len(ks) > 0 && ks[0] == rpctypes.MetadataHasLeader { + if s.Leader() == types.ID(raft.None) { + return rpctypes.ErrGRPCNoLeader + } + + cctx, cancel := context.WithCancel(ss.Context()) + ss = serverStreamWithCtx{ctx: cctx, cancel: &cancel, ServerStream: ss} + + smap.mu.Lock() + smap.streams[ss] = struct{}{} + smap.mu.Unlock() + + defer func() { + smap.mu.Lock() + delete(smap.streams, ss) + smap.mu.Unlock() + cancel() + }() + + } + } + + return prometheus.StreamServerInterceptor(srv, ss, info, handler) + } +} + +type serverStreamWithCtx struct { + grpc.ServerStream + ctx context.Context + cancel *context.CancelFunc +} + +func (ssc serverStreamWithCtx) Context() context.Context { return ssc.ctx } + +func monitorLeader(s *etcdserver.EtcdServer) *streamsMap { + smap := &streamsMap{ + streams: make(map[grpc.ServerStream]struct{}), + } + + go func() { + election := time.Duration(s.Cfg.TickMs) * time.Duration(s.Cfg.ElectionTicks) * time.Millisecond + noLeaderCnt := 0 + + for { + select { + case <-s.StopNotify(): + return + case <-time.After(election): + if s.Leader() == types.ID(raft.None) { + noLeaderCnt++ + } else { + noLeaderCnt = 0 + } + + // We are more conservative on canceling existing streams. Reconnecting streams + // cost much more than just rejecting new requests. So we wait until the member + // cannot find a leader for maxNoLeaderCnt election timeouts to cancel existing streams. + if noLeaderCnt >= maxNoLeaderCnt { + smap.mu.Lock() + for ss := range smap.streams { + if ssWithCtx, ok := ss.(serverStreamWithCtx); ok { + (*ssWithCtx.cancel)() + <-ss.Context().Done() + } + } + smap.streams = make(map[grpc.ServerStream]struct{}) + smap.mu.Unlock() + } + } + } + }() + + return smap +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go new file mode 100644 index 000000000..d0220e03a --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go @@ -0,0 +1,259 @@ +// Copyright 2015 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. + +// Package v3rpc implements etcd v3 RPC system based on gRPC. +package v3rpc + +import ( + "sort" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/pkg/capnslog" + "golang.org/x/net/context" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/api/v3rpc") + + // Max operations per txn list. For example, Txn.Success can have at most 128 operations, + // and Txn.Failure can have at most 128 operations. + MaxOpsPerTxn = 128 +) + +type kvServer struct { + hdr header + kv etcdserver.RaftKV +} + +func NewKVServer(s *etcdserver.EtcdServer) pb.KVServer { + return &kvServer{hdr: newHeader(s), kv: s} +} + +func (s *kvServer) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, error) { + if err := checkRangeRequest(r); err != nil { + return nil, err + } + + resp, err := s.kv.Range(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + + if resp.Header == nil { + plog.Panic("unexpected nil resp.Header") + } + s.hdr.fill(resp.Header) + return resp, nil +} + +func (s *kvServer) Put(ctx context.Context, r *pb.PutRequest) (*pb.PutResponse, error) { + if err := checkPutRequest(r); err != nil { + return nil, err + } + + resp, err := s.kv.Put(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + + if resp.Header == nil { + plog.Panic("unexpected nil resp.Header") + } + s.hdr.fill(resp.Header) + return resp, nil +} + +func (s *kvServer) DeleteRange(ctx context.Context, r *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { + if err := checkDeleteRequest(r); err != nil { + return nil, err + } + + resp, err := s.kv.DeleteRange(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + + if resp.Header == nil { + plog.Panic("unexpected nil resp.Header") + } + s.hdr.fill(resp.Header) + return resp, nil +} + +func (s *kvServer) Txn(ctx context.Context, r *pb.TxnRequest) (*pb.TxnResponse, error) { + if err := checkTxnRequest(r); err != nil { + return nil, err + } + + resp, err := s.kv.Txn(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + + if resp.Header == nil { + plog.Panic("unexpected nil resp.Header") + } + s.hdr.fill(resp.Header) + return resp, nil +} + +func (s *kvServer) Compact(ctx context.Context, r *pb.CompactionRequest) (*pb.CompactionResponse, error) { + resp, err := s.kv.Compact(ctx, r) + if err != nil { + return nil, togRPCError(err) + } + + if resp.Header == nil { + plog.Panic("unexpected nil resp.Header") + } + s.hdr.fill(resp.Header) + return resp, nil +} + +func checkRangeRequest(r *pb.RangeRequest) error { + if len(r.Key) == 0 { + return rpctypes.ErrGRPCEmptyKey + } + return nil +} + +func checkPutRequest(r *pb.PutRequest) error { + if len(r.Key) == 0 { + return rpctypes.ErrGRPCEmptyKey + } + if r.IgnoreValue && len(r.Value) != 0 { + return rpctypes.ErrGRPCValueProvided + } + if r.IgnoreLease && r.Lease != 0 { + return rpctypes.ErrGRPCLeaseProvided + } + return nil +} + +func checkDeleteRequest(r *pb.DeleteRangeRequest) error { + if len(r.Key) == 0 { + return rpctypes.ErrGRPCEmptyKey + } + return nil +} + +func checkTxnRequest(r *pb.TxnRequest) error { + if len(r.Compare) > MaxOpsPerTxn || len(r.Success) > MaxOpsPerTxn || len(r.Failure) > MaxOpsPerTxn { + return rpctypes.ErrGRPCTooManyOps + } + + for _, c := range r.Compare { + if len(c.Key) == 0 { + return rpctypes.ErrGRPCEmptyKey + } + } + + for _, u := range r.Success { + if err := checkRequestOp(u); err != nil { + return err + } + } + if err := checkRequestDupKeys(r.Success); err != nil { + return err + } + + for _, u := range r.Failure { + if err := checkRequestOp(u); err != nil { + return err + } + } + return checkRequestDupKeys(r.Failure) +} + +// checkRequestDupKeys gives rpctypes.ErrGRPCDuplicateKey if the same key is modified twice +func checkRequestDupKeys(reqs []*pb.RequestOp) error { + // check put overlap + keys := make(map[string]struct{}) + for _, requ := range reqs { + tv, ok := requ.Request.(*pb.RequestOp_RequestPut) + if !ok { + continue + } + preq := tv.RequestPut + if preq == nil { + continue + } + if _, ok := keys[string(preq.Key)]; ok { + return rpctypes.ErrGRPCDuplicateKey + } + keys[string(preq.Key)] = struct{}{} + } + + // no need to check deletes if no puts; delete overlaps are permitted + if len(keys) == 0 { + return nil + } + + // sort keys for range checking + sortedKeys := []string{} + for k := range keys { + sortedKeys = append(sortedKeys, k) + } + sort.Strings(sortedKeys) + + // check put overlap with deletes + for _, requ := range reqs { + tv, ok := requ.Request.(*pb.RequestOp_RequestDeleteRange) + if !ok { + continue + } + dreq := tv.RequestDeleteRange + if dreq == nil { + continue + } + if dreq.RangeEnd == nil { + if _, found := keys[string(dreq.Key)]; found { + return rpctypes.ErrGRPCDuplicateKey + } + } else { + lo := sort.SearchStrings(sortedKeys, string(dreq.Key)) + hi := sort.SearchStrings(sortedKeys, string(dreq.RangeEnd)) + if lo != hi { + // element between lo and hi => overlap + return rpctypes.ErrGRPCDuplicateKey + } + } + } + + return nil +} + +func checkRequestOp(u *pb.RequestOp) error { + // TODO: ensure only one of the field is set. + switch uv := u.Request.(type) { + case *pb.RequestOp_RequestRange: + if uv.RequestRange != nil { + return checkRangeRequest(uv.RequestRange) + } + case *pb.RequestOp_RequestPut: + if uv.RequestPut != nil { + return checkPutRequest(uv.RequestPut) + } + case *pb.RequestOp_RequestDeleteRange: + if uv.RequestDeleteRange != nil { + return checkDeleteRequest(uv.RequestDeleteRange) + } + default: + // empty op / nil entry + return rpctypes.ErrGRPCKeyNotFound + } + return nil +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go new file mode 100644 index 000000000..91618d115 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go @@ -0,0 +1,125 @@ +// 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. + +package v3rpc + +import ( + "io" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/lease" + "golang.org/x/net/context" +) + +type LeaseServer struct { + hdr header + le etcdserver.Lessor +} + +func NewLeaseServer(s *etcdserver.EtcdServer) pb.LeaseServer { + return &LeaseServer{le: s, hdr: newHeader(s)} +} + +func (ls *LeaseServer) LeaseGrant(ctx context.Context, cr *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) { + resp, err := ls.le.LeaseGrant(ctx, cr) + + if err != nil { + return nil, togRPCError(err) + } + ls.hdr.fill(resp.Header) + return resp, nil +} + +func (ls *LeaseServer) LeaseRevoke(ctx context.Context, rr *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error) { + resp, err := ls.le.LeaseRevoke(ctx, rr) + if err != nil { + return nil, togRPCError(err) + } + ls.hdr.fill(resp.Header) + return resp, nil +} + +func (ls *LeaseServer) LeaseTimeToLive(ctx context.Context, rr *pb.LeaseTimeToLiveRequest) (*pb.LeaseTimeToLiveResponse, error) { + resp, err := ls.le.LeaseTimeToLive(ctx, rr) + if err != nil && err != lease.ErrLeaseNotFound { + return nil, togRPCError(err) + } + if err == lease.ErrLeaseNotFound { + resp = &pb.LeaseTimeToLiveResponse{ + Header: &pb.ResponseHeader{}, + ID: rr.ID, + TTL: -1, + } + } + ls.hdr.fill(resp.Header) + return resp, nil +} + +func (ls *LeaseServer) LeaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) (err error) { + errc := make(chan error, 1) + go func() { + errc <- ls.leaseKeepAlive(stream) + }() + select { + case err = <-errc: + case <-stream.Context().Done(): + // the only server-side cancellation is noleader for now. + err = stream.Context().Err() + if err == context.Canceled { + err = rpctypes.ErrGRPCNoLeader + } + } + return err +} + +func (ls *LeaseServer) leaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) error { + for { + req, err := stream.Recv() + if err == io.EOF { + return nil + } + if err != nil { + plog.Debugf("failed to receive lease keepalive request from gRPC stream (%q)", err.Error()) + return err + } + + // Create header before we sent out the renew request. + // This can make sure that the revision is strictly smaller or equal to + // when the keepalive happened at the local server (when the local server is the leader) + // or remote leader. + // Without this, a lease might be revoked at rev 3 but client can see the keepalive succeeded + // at rev 4. + resp := &pb.LeaseKeepAliveResponse{ID: req.ID, Header: &pb.ResponseHeader{}} + ls.hdr.fill(resp.Header) + + ttl, err := ls.le.LeaseRenew(stream.Context(), lease.LeaseID(req.ID)) + if err == lease.ErrLeaseNotFound { + err = nil + ttl = 0 + } + + if err != nil { + return togRPCError(err) + } + + resp.TTL = ttl + err = stream.Send(resp) + if err != nil { + plog.Debugf("failed to send lease keepalive response to gRPC stream (%q)", err.Error()) + return err + } + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go new file mode 100644 index 000000000..3657d0360 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go @@ -0,0 +1,190 @@ +// 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. + +package v3rpc + +import ( + "crypto/sha256" + "io" + + "github.com/coreos/etcd/auth" + "github.com/coreos/etcd/etcdserver" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/version" + "golang.org/x/net/context" +) + +type KVGetter interface { + KV() mvcc.ConsistentWatchableKV +} + +type BackendGetter interface { + Backend() backend.Backend +} + +type Alarmer interface { + Alarm(ctx context.Context, ar *pb.AlarmRequest) (*pb.AlarmResponse, error) +} + +type RaftStatusGetter interface { + Index() uint64 + Term() uint64 + Leader() types.ID +} + +type AuthGetter interface { + AuthInfoFromCtx(ctx context.Context) (*auth.AuthInfo, error) + AuthStore() auth.AuthStore +} + +type maintenanceServer struct { + rg RaftStatusGetter + kg KVGetter + bg BackendGetter + a Alarmer + hdr header +} + +func NewMaintenanceServer(s *etcdserver.EtcdServer) pb.MaintenanceServer { + srv := &maintenanceServer{rg: s, kg: s, bg: s, a: s, hdr: newHeader(s)} + return &authMaintenanceServer{srv, s} +} + +func (ms *maintenanceServer) Defragment(ctx context.Context, sr *pb.DefragmentRequest) (*pb.DefragmentResponse, error) { + plog.Noticef("starting to defragment the storage backend...") + err := ms.bg.Backend().Defrag() + if err != nil { + plog.Errorf("failed to defragment the storage backend (%v)", err) + return nil, err + } + plog.Noticef("finished defragmenting the storage backend") + return &pb.DefragmentResponse{}, nil +} + +func (ms *maintenanceServer) Snapshot(sr *pb.SnapshotRequest, srv pb.Maintenance_SnapshotServer) error { + snap := ms.bg.Backend().Snapshot() + pr, pw := io.Pipe() + + defer pr.Close() + + go func() { + snap.WriteTo(pw) + if err := snap.Close(); err != nil { + plog.Errorf("error closing snapshot (%v)", err) + } + pw.Close() + }() + + // send file data + h := sha256.New() + br := int64(0) + buf := make([]byte, 32*1024) + sz := snap.Size() + for br < sz { + n, err := io.ReadFull(pr, buf) + if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { + return togRPCError(err) + } + br += int64(n) + resp := &pb.SnapshotResponse{ + RemainingBytes: uint64(sz - br), + Blob: buf[:n], + } + if err = srv.Send(resp); err != nil { + return togRPCError(err) + } + h.Write(buf[:n]) + } + + // send sha + sha := h.Sum(nil) + hresp := &pb.SnapshotResponse{RemainingBytes: 0, Blob: sha} + if err := srv.Send(hresp); err != nil { + return togRPCError(err) + } + + return nil +} + +func (ms *maintenanceServer) Hash(ctx context.Context, r *pb.HashRequest) (*pb.HashResponse, error) { + h, rev, err := ms.kg.KV().Hash() + if err != nil { + return nil, togRPCError(err) + } + resp := &pb.HashResponse{Header: &pb.ResponseHeader{Revision: rev}, Hash: h} + ms.hdr.fill(resp.Header) + return resp, nil +} + +func (ms *maintenanceServer) Alarm(ctx context.Context, ar *pb.AlarmRequest) (*pb.AlarmResponse, error) { + return ms.a.Alarm(ctx, ar) +} + +func (ms *maintenanceServer) Status(ctx context.Context, ar *pb.StatusRequest) (*pb.StatusResponse, error) { + resp := &pb.StatusResponse{ + Header: &pb.ResponseHeader{Revision: ms.hdr.rev()}, + Version: version.Version, + DbSize: ms.bg.Backend().Size(), + Leader: uint64(ms.rg.Leader()), + RaftIndex: ms.rg.Index(), + RaftTerm: ms.rg.Term(), + } + ms.hdr.fill(resp.Header) + return resp, nil +} + +type authMaintenanceServer struct { + *maintenanceServer + ag AuthGetter +} + +func (ams *authMaintenanceServer) isAuthenticated(ctx context.Context) error { + authInfo, err := ams.ag.AuthInfoFromCtx(ctx) + if err != nil { + return err + } + + return ams.ag.AuthStore().IsAdminPermitted(authInfo) +} + +func (ams *authMaintenanceServer) Defragment(ctx context.Context, sr *pb.DefragmentRequest) (*pb.DefragmentResponse, error) { + if err := ams.isAuthenticated(ctx); err != nil { + return nil, err + } + + return ams.maintenanceServer.Defragment(ctx, sr) +} + +func (ams *authMaintenanceServer) Snapshot(sr *pb.SnapshotRequest, srv pb.Maintenance_SnapshotServer) error { + if err := ams.isAuthenticated(srv.Context()); err != nil { + return err + } + + return ams.maintenanceServer.Snapshot(sr, srv) +} + +func (ams *authMaintenanceServer) Hash(ctx context.Context, r *pb.HashRequest) (*pb.HashResponse, error) { + if err := ams.isAuthenticated(ctx); err != nil { + return nil, err + } + + return ams.maintenanceServer.Hash(ctx, r) +} + +func (ams *authMaintenanceServer) Status(ctx context.Context, ar *pb.StatusRequest) (*pb.StatusResponse, error) { + return ams.maintenanceServer.Status(ctx, ar) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go new file mode 100644 index 000000000..91a59389b --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go @@ -0,0 +1,103 @@ +// 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. + +package v3rpc + +import ( + "time" + + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/pkg/types" + "golang.org/x/net/context" +) + +type ClusterServer struct { + cluster api.Cluster + server etcdserver.Server + raftTimer etcdserver.RaftTimer +} + +func NewClusterServer(s *etcdserver.EtcdServer) *ClusterServer { + return &ClusterServer{ + cluster: s.Cluster(), + server: s, + raftTimer: s, + } +} + +func (cs *ClusterServer) MemberAdd(ctx context.Context, r *pb.MemberAddRequest) (*pb.MemberAddResponse, error) { + urls, err := types.NewURLs(r.PeerURLs) + if err != nil { + return nil, rpctypes.ErrGRPCMemberBadURLs + } + + now := time.Now() + m := membership.NewMember("", urls, "", &now) + membs, merr := cs.server.AddMember(ctx, *m) + if merr != nil { + return nil, togRPCError(merr) + } + + return &pb.MemberAddResponse{ + Header: cs.header(), + Member: &pb.Member{ID: uint64(m.ID), PeerURLs: m.PeerURLs}, + Members: membersToProtoMembers(membs), + }, nil +} + +func (cs *ClusterServer) MemberRemove(ctx context.Context, r *pb.MemberRemoveRequest) (*pb.MemberRemoveResponse, error) { + membs, err := cs.server.RemoveMember(ctx, r.ID) + if err != nil { + return nil, togRPCError(err) + } + return &pb.MemberRemoveResponse{Header: cs.header(), Members: membersToProtoMembers(membs)}, nil +} + +func (cs *ClusterServer) MemberUpdate(ctx context.Context, r *pb.MemberUpdateRequest) (*pb.MemberUpdateResponse, error) { + m := membership.Member{ + ID: types.ID(r.ID), + RaftAttributes: membership.RaftAttributes{PeerURLs: r.PeerURLs}, + } + membs, err := cs.server.UpdateMember(ctx, m) + if err != nil { + return nil, togRPCError(err) + } + return &pb.MemberUpdateResponse{Header: cs.header(), Members: membersToProtoMembers(membs)}, nil +} + +func (cs *ClusterServer) MemberList(ctx context.Context, r *pb.MemberListRequest) (*pb.MemberListResponse, error) { + membs := membersToProtoMembers(cs.cluster.Members()) + return &pb.MemberListResponse{Header: cs.header(), Members: membs}, nil +} + +func (cs *ClusterServer) header() *pb.ResponseHeader { + return &pb.ResponseHeader{ClusterId: uint64(cs.cluster.ID()), MemberId: uint64(cs.server.ID()), RaftTerm: cs.raftTimer.Term()} +} + +func membersToProtoMembers(membs []*membership.Member) []*pb.Member { + protoMembs := make([]*pb.Member, len(membs)) + for i := range membs { + protoMembs[i] = &pb.Member{ + Name: membs[i].Name, + ID: uint64(membs[i].ID), + PeerURLs: membs[i].PeerURLs, + ClientURLs: membs[i].ClientURLs, + } + } + return protoMembs +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/metrics.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/metrics.go new file mode 100644 index 000000000..6cb41a61e --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/metrics.go @@ -0,0 +1,38 @@ +// 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. + +package v3rpc + +import "github.com/prometheus/client_golang/prometheus" + +var ( + sentBytes = prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "network", + Name: "client_grpc_sent_bytes_total", + Help: "The total number of bytes sent to grpc clients.", + }) + + receivedBytes = prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "network", + Name: "client_grpc_received_bytes_total", + Help: "The total number of bytes received from grpc clients.", + }) +) + +func init() { + prometheus.MustRegister(sentBytes) + prometheus.MustRegister(receivedBytes) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go new file mode 100644 index 000000000..836f2fd3f --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go @@ -0,0 +1,89 @@ +// 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. + +package v3rpc + +import ( + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/pkg/types" + "golang.org/x/net/context" +) + +type quotaKVServer struct { + pb.KVServer + qa quotaAlarmer +} + +type quotaAlarmer struct { + q etcdserver.Quota + a Alarmer + id types.ID +} + +// check whether request satisfies the quota. If there is not enough space, +// ignore request and raise the free space alarm. +func (qa *quotaAlarmer) check(ctx context.Context, r interface{}) error { + if qa.q.Available(r) { + return nil + } + req := &pb.AlarmRequest{ + MemberID: uint64(qa.id), + Action: pb.AlarmRequest_ACTIVATE, + Alarm: pb.AlarmType_NOSPACE, + } + qa.a.Alarm(ctx, req) + return rpctypes.ErrGRPCNoSpace +} + +func NewQuotaKVServer(s *etcdserver.EtcdServer) pb.KVServer { + return "aKVServer{ + NewKVServer(s), + quotaAlarmer{etcdserver.NewBackendQuota(s), s, s.ID()}, + } +} + +func (s *quotaKVServer) Put(ctx context.Context, r *pb.PutRequest) (*pb.PutResponse, error) { + if err := s.qa.check(ctx, r); err != nil { + return nil, err + } + return s.KVServer.Put(ctx, r) +} + +func (s *quotaKVServer) Txn(ctx context.Context, r *pb.TxnRequest) (*pb.TxnResponse, error) { + if err := s.qa.check(ctx, r); err != nil { + return nil, err + } + return s.KVServer.Txn(ctx, r) +} + +type quotaLeaseServer struct { + pb.LeaseServer + qa quotaAlarmer +} + +func (s *quotaLeaseServer) LeaseGrant(ctx context.Context, cr *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) { + if err := s.qa.check(ctx, cr); err != nil { + return nil, err + } + return s.LeaseServer.LeaseGrant(ctx, cr) +} + +func NewQuotaLeaseServer(s *etcdserver.EtcdServer) pb.LeaseServer { + return "aLeaseServer{ + NewLeaseServer(s), + quotaAlarmer{etcdserver.NewBackendQuota(s), s, s.ID()}, + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/util.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/util.go new file mode 100644 index 000000000..8d38d9bd1 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/util.go @@ -0,0 +1,103 @@ +// 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. + +package v3rpc + +import ( + "github.com/coreos/etcd/auth" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" +) + +func togRPCError(err error) error { + switch err { + case membership.ErrIDRemoved: + return rpctypes.ErrGRPCMemberNotFound + case membership.ErrIDNotFound: + return rpctypes.ErrGRPCMemberNotFound + case membership.ErrIDExists: + return rpctypes.ErrGRPCMemberExist + case membership.ErrPeerURLexists: + return rpctypes.ErrGRPCPeerURLExist + case etcdserver.ErrNotEnoughStartedMembers: + return rpctypes.ErrMemberNotEnoughStarted + + case mvcc.ErrCompacted: + return rpctypes.ErrGRPCCompacted + case mvcc.ErrFutureRev: + return rpctypes.ErrGRPCFutureRev + case etcdserver.ErrRequestTooLarge: + return rpctypes.ErrGRPCRequestTooLarge + case etcdserver.ErrNoSpace: + return rpctypes.ErrGRPCNoSpace + case etcdserver.ErrTooManyRequests: + return rpctypes.ErrTooManyRequests + + case etcdserver.ErrNoLeader: + return rpctypes.ErrGRPCNoLeader + case etcdserver.ErrStopped: + return rpctypes.ErrGRPCStopped + case etcdserver.ErrTimeout: + return rpctypes.ErrGRPCTimeout + case etcdserver.ErrTimeoutDueToLeaderFail: + return rpctypes.ErrGRPCTimeoutDueToLeaderFail + case etcdserver.ErrTimeoutDueToConnectionLost: + return rpctypes.ErrGRPCTimeoutDueToConnectionLost + case etcdserver.ErrUnhealthy: + return rpctypes.ErrGRPCUnhealthy + case etcdserver.ErrKeyNotFound: + return rpctypes.ErrGRPCKeyNotFound + + case lease.ErrLeaseNotFound: + return rpctypes.ErrGRPCLeaseNotFound + case lease.ErrLeaseExists: + return rpctypes.ErrGRPCLeaseExist + + case auth.ErrRootUserNotExist: + return rpctypes.ErrGRPCRootUserNotExist + case auth.ErrRootRoleNotExist: + return rpctypes.ErrGRPCRootRoleNotExist + case auth.ErrUserAlreadyExist: + return rpctypes.ErrGRPCUserAlreadyExist + case auth.ErrUserEmpty: + return rpctypes.ErrGRPCUserEmpty + case auth.ErrUserNotFound: + return rpctypes.ErrGRPCUserNotFound + case auth.ErrRoleAlreadyExist: + return rpctypes.ErrGRPCRoleAlreadyExist + case auth.ErrRoleNotFound: + return rpctypes.ErrGRPCRoleNotFound + case auth.ErrAuthFailed: + return rpctypes.ErrGRPCAuthFailed + case auth.ErrPermissionDenied: + return rpctypes.ErrGRPCPermissionDenied + case auth.ErrRoleNotGranted: + return rpctypes.ErrGRPCRoleNotGranted + case auth.ErrPermissionNotGranted: + return rpctypes.ErrGRPCPermissionNotGranted + case auth.ErrAuthNotEnabled: + return rpctypes.ErrGRPCAuthNotEnabled + case auth.ErrInvalidAuthToken: + return rpctypes.ErrGRPCInvalidAuthToken + case auth.ErrInvalidAuthMgmt: + return rpctypes.ErrGRPCInvalidAuthMgmt + default: + return grpc.Errorf(codes.Unknown, err.Error()) + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go new file mode 100644 index 000000000..cd2adf984 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go @@ -0,0 +1,430 @@ +// Copyright 2015 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. + +package v3rpc + +import ( + "io" + "sync" + "time" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/auth" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/mvccpb" +) + +type watchServer struct { + clusterID int64 + memberID int64 + raftTimer etcdserver.RaftTimer + watchable mvcc.WatchableKV + + ag AuthGetter +} + +func NewWatchServer(s *etcdserver.EtcdServer) pb.WatchServer { + return &watchServer{ + clusterID: int64(s.Cluster().ID()), + memberID: int64(s.ID()), + raftTimer: s, + watchable: s.Watchable(), + ag: s, + } +} + +var ( + // External test can read this with GetProgressReportInterval() + // and change this to a small value to finish fast with + // SetProgressReportInterval(). + progressReportInterval = 10 * time.Minute + progressReportIntervalMu sync.RWMutex +) + +func GetProgressReportInterval() time.Duration { + progressReportIntervalMu.RLock() + defer progressReportIntervalMu.RUnlock() + return progressReportInterval +} + +func SetProgressReportInterval(newTimeout time.Duration) { + progressReportIntervalMu.Lock() + defer progressReportIntervalMu.Unlock() + progressReportInterval = newTimeout +} + +const ( + // We send ctrl response inside the read loop. We do not want + // send to block read, but we still want ctrl response we sent to + // be serialized. Thus we use a buffered chan to solve the problem. + // A small buffer should be OK for most cases, since we expect the + // ctrl requests are infrequent. + ctrlStreamBufLen = 16 +) + +// serverWatchStream is an etcd server side stream. It receives requests +// from client side gRPC stream. It receives watch events from mvcc.WatchStream, +// and creates responses that forwarded to gRPC stream. +// It also forwards control message like watch created and canceled. +type serverWatchStream struct { + clusterID int64 + memberID int64 + raftTimer etcdserver.RaftTimer + + watchable mvcc.WatchableKV + + gRPCStream pb.Watch_WatchServer + watchStream mvcc.WatchStream + ctrlStream chan *pb.WatchResponse + + // mu protects progress, prevKV + mu sync.Mutex + // progress tracks the watchID that stream might need to send + // progress to. + // TODO: combine progress and prevKV into a single struct? + progress map[mvcc.WatchID]bool + prevKV map[mvcc.WatchID]bool + + // closec indicates the stream is closed. + closec chan struct{} + + // wg waits for the send loop to complete + wg sync.WaitGroup + + ag AuthGetter +} + +func (ws *watchServer) Watch(stream pb.Watch_WatchServer) (err error) { + sws := serverWatchStream{ + clusterID: ws.clusterID, + memberID: ws.memberID, + raftTimer: ws.raftTimer, + + watchable: ws.watchable, + + gRPCStream: stream, + watchStream: ws.watchable.NewWatchStream(), + // chan for sending control response like watcher created and canceled. + ctrlStream: make(chan *pb.WatchResponse, ctrlStreamBufLen), + progress: make(map[mvcc.WatchID]bool), + prevKV: make(map[mvcc.WatchID]bool), + closec: make(chan struct{}), + + ag: ws.ag, + } + + sws.wg.Add(1) + go func() { + sws.sendLoop() + sws.wg.Done() + }() + + errc := make(chan error, 1) + // Ideally recvLoop would also use sws.wg to signal its completion + // but when stream.Context().Done() is closed, the stream's recv + // may continue to block since it uses a different context, leading to + // deadlock when calling sws.close(). + go func() { + if rerr := sws.recvLoop(); rerr != nil { + plog.Debugf("failed to receive watch request from gRPC stream (%q)", rerr.Error()) + errc <- rerr + } + }() + select { + case err = <-errc: + close(sws.ctrlStream) + case <-stream.Context().Done(): + err = stream.Context().Err() + // the only server-side cancellation is noleader for now. + if err == context.Canceled { + err = rpctypes.ErrGRPCNoLeader + } + } + sws.close() + return err +} + +func (sws *serverWatchStream) isWatchPermitted(wcr *pb.WatchCreateRequest) bool { + authInfo, err := sws.ag.AuthInfoFromCtx(sws.gRPCStream.Context()) + if err != nil { + return false + } + if authInfo == nil { + // if auth is enabled, IsRangePermitted() can cause an error + authInfo = &auth.AuthInfo{} + } + + return sws.ag.AuthStore().IsRangePermitted(authInfo, wcr.Key, wcr.RangeEnd) == nil +} + +func (sws *serverWatchStream) recvLoop() error { + for { + req, err := sws.gRPCStream.Recv() + if err == io.EOF { + return nil + } + if err != nil { + return err + } + + switch uv := req.RequestUnion.(type) { + case *pb.WatchRequest_CreateRequest: + if uv.CreateRequest == nil { + break + } + + creq := uv.CreateRequest + if len(creq.Key) == 0 { + // \x00 is the smallest key + creq.Key = []byte{0} + } + if len(creq.RangeEnd) == 0 { + // force nil since watchstream.Watch distinguishes + // between nil and []byte{} for single key / >= + creq.RangeEnd = nil + } + if len(creq.RangeEnd) == 1 && creq.RangeEnd[0] == 0 { + // support >= key queries + creq.RangeEnd = []byte{} + } + + if !sws.isWatchPermitted(creq) { + wr := &pb.WatchResponse{ + Header: sws.newResponseHeader(sws.watchStream.Rev()), + WatchId: -1, + Canceled: true, + Created: true, + CancelReason: rpctypes.ErrGRPCPermissionDenied.Error(), + } + + select { + case sws.ctrlStream <- wr: + case <-sws.closec: + } + return nil + } + + filters := FiltersFromRequest(creq) + + wsrev := sws.watchStream.Rev() + rev := creq.StartRevision + if rev == 0 { + rev = wsrev + 1 + } + id := sws.watchStream.Watch(creq.Key, creq.RangeEnd, rev, filters...) + if id != -1 { + sws.mu.Lock() + if creq.ProgressNotify { + sws.progress[id] = true + } + if creq.PrevKv { + sws.prevKV[id] = true + } + sws.mu.Unlock() + } + wr := &pb.WatchResponse{ + Header: sws.newResponseHeader(wsrev), + WatchId: int64(id), + Created: true, + Canceled: id == -1, + } + select { + case sws.ctrlStream <- wr: + case <-sws.closec: + return nil + } + case *pb.WatchRequest_CancelRequest: + if uv.CancelRequest != nil { + id := uv.CancelRequest.WatchId + err := sws.watchStream.Cancel(mvcc.WatchID(id)) + if err == nil { + sws.ctrlStream <- &pb.WatchResponse{ + Header: sws.newResponseHeader(sws.watchStream.Rev()), + WatchId: id, + Canceled: true, + } + sws.mu.Lock() + delete(sws.progress, mvcc.WatchID(id)) + delete(sws.prevKV, mvcc.WatchID(id)) + sws.mu.Unlock() + } + } + default: + // we probably should not shutdown the entire stream when + // receive an valid command. + // so just do nothing instead. + continue + } + } +} + +func (sws *serverWatchStream) sendLoop() { + // watch ids that are currently active + ids := make(map[mvcc.WatchID]struct{}) + // watch responses pending on a watch id creation message + pending := make(map[mvcc.WatchID][]*pb.WatchResponse) + + interval := GetProgressReportInterval() + progressTicker := time.NewTicker(interval) + + defer func() { + progressTicker.Stop() + // drain the chan to clean up pending events + for ws := range sws.watchStream.Chan() { + mvcc.ReportEventReceived(len(ws.Events)) + } + for _, wrs := range pending { + for _, ws := range wrs { + mvcc.ReportEventReceived(len(ws.Events)) + } + } + }() + + for { + select { + case wresp, ok := <-sws.watchStream.Chan(): + if !ok { + return + } + + // TODO: evs is []mvccpb.Event type + // either return []*mvccpb.Event from the mvcc package + // or define protocol buffer with []mvccpb.Event. + evs := wresp.Events + events := make([]*mvccpb.Event, len(evs)) + sws.mu.Lock() + needPrevKV := sws.prevKV[wresp.WatchID] + sws.mu.Unlock() + for i := range evs { + events[i] = &evs[i] + + if needPrevKV { + opt := mvcc.RangeOptions{Rev: evs[i].Kv.ModRevision - 1} + r, err := sws.watchable.Range(evs[i].Kv.Key, nil, opt) + if err == nil && len(r.KVs) != 0 { + events[i].PrevKv = &(r.KVs[0]) + } + } + } + + wr := &pb.WatchResponse{ + Header: sws.newResponseHeader(wresp.Revision), + WatchId: int64(wresp.WatchID), + Events: events, + CompactRevision: wresp.CompactRevision, + } + + if _, hasId := ids[wresp.WatchID]; !hasId { + // buffer if id not yet announced + wrs := append(pending[wresp.WatchID], wr) + pending[wresp.WatchID] = wrs + continue + } + + mvcc.ReportEventReceived(len(evs)) + if err := sws.gRPCStream.Send(wr); err != nil { + plog.Debugf("failed to send watch response to gRPC stream (%q)", err.Error()) + return + } + + sws.mu.Lock() + if len(evs) > 0 && sws.progress[wresp.WatchID] { + // elide next progress update if sent a key update + sws.progress[wresp.WatchID] = false + } + sws.mu.Unlock() + + case c, ok := <-sws.ctrlStream: + if !ok { + return + } + + if err := sws.gRPCStream.Send(c); err != nil { + plog.Debugf("failed to send watch control response to gRPC stream (%q)", err.Error()) + return + } + + // track id creation + wid := mvcc.WatchID(c.WatchId) + if c.Canceled { + delete(ids, wid) + continue + } + if c.Created { + // flush buffered events + ids[wid] = struct{}{} + for _, v := range pending[wid] { + mvcc.ReportEventReceived(len(v.Events)) + if err := sws.gRPCStream.Send(v); err != nil { + plog.Debugf("failed to send pending watch response to gRPC stream (%q)", err.Error()) + return + } + } + delete(pending, wid) + } + case <-progressTicker.C: + sws.mu.Lock() + for id, ok := range sws.progress { + if ok { + sws.watchStream.RequestProgress(id) + } + sws.progress[id] = true + } + sws.mu.Unlock() + case <-sws.closec: + return + } + } +} + +func (sws *serverWatchStream) close() { + sws.watchStream.Close() + close(sws.closec) + sws.wg.Wait() +} + +func (sws *serverWatchStream) newResponseHeader(rev int64) *pb.ResponseHeader { + return &pb.ResponseHeader{ + ClusterId: uint64(sws.clusterID), + MemberId: uint64(sws.memberID), + Revision: rev, + RaftTerm: sws.raftTimer.Term(), + } +} + +func filterNoDelete(e mvccpb.Event) bool { + return e.Type == mvccpb.DELETE +} + +func filterNoPut(e mvccpb.Event) bool { + return e.Type == mvccpb.PUT +} + +func FiltersFromRequest(creq *pb.WatchCreateRequest) []mvcc.FilterFunc { + filters := make([]mvcc.FilterFunc, 0, len(creq.Filters)) + for _, ft := range creq.Filters { + switch ft { + case pb.WatchCreateRequest_NOPUT: + filters = append(filters, filterNoPut) + case pb.WatchCreateRequest_NODELETE: + filters = append(filters, filterNoDelete) + default: + } + } + return filters +} diff --git a/deps/github.com/coreos/etcd/etcdserver/apply.go b/deps/github.com/coreos/etcd/etcdserver/apply.go new file mode 100644 index 000000000..0be93c52b --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/apply.go @@ -0,0 +1,878 @@ +// 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. + +package etcdserver + +import ( + "bytes" + "sort" + "time" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/pkg/types" + "github.com/gogo/protobuf/proto" + "golang.org/x/net/context" +) + +const ( + warnApplyDuration = 100 * time.Millisecond +) + +type applyResult struct { + resp proto.Message + err error + // physc signals the physical effect of the request has completed in addition + // to being logically reflected by the node. Currently only used for + // Compaction requests. + physc <-chan struct{} +} + +// applierV3 is the interface for processing V3 raft messages +type applierV3 interface { + Apply(r *pb.InternalRaftRequest) *applyResult + + Put(txn mvcc.TxnWrite, p *pb.PutRequest) (*pb.PutResponse, error) + Range(txn mvcc.TxnRead, r *pb.RangeRequest) (*pb.RangeResponse, error) + DeleteRange(txn mvcc.TxnWrite, dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) + Txn(rt *pb.TxnRequest) (*pb.TxnResponse, error) + Compaction(compaction *pb.CompactionRequest) (*pb.CompactionResponse, <-chan struct{}, error) + + LeaseGrant(lc *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) + LeaseRevoke(lc *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error) + + Alarm(*pb.AlarmRequest) (*pb.AlarmResponse, error) + + Authenticate(r *pb.InternalAuthenticateRequest) (*pb.AuthenticateResponse, error) + + AuthEnable() (*pb.AuthEnableResponse, error) + AuthDisable() (*pb.AuthDisableResponse, error) + + UserAdd(ua *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) + UserDelete(ua *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) + UserChangePassword(ua *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) + UserGrantRole(ua *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) + UserGet(ua *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) + UserRevokeRole(ua *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) + RoleAdd(ua *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) + RoleGrantPermission(ua *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) + RoleGet(ua *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) + RoleRevokePermission(ua *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) + RoleDelete(ua *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) + UserList(ua *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) + RoleList(ua *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) +} + +type applierV3backend struct { + s *EtcdServer +} + +func (s *EtcdServer) newApplierV3() applierV3 { + return newAuthApplierV3( + s.AuthStore(), + newQuotaApplierV3(s, &applierV3backend{s}), + ) +} + +func (a *applierV3backend) Apply(r *pb.InternalRaftRequest) *applyResult { + ar := &applyResult{} + + // call into a.s.applyV3.F instead of a.F so upper appliers can check individual calls + switch { + case r.Range != nil: + ar.resp, ar.err = a.s.applyV3.Range(nil, r.Range) + case r.Put != nil: + ar.resp, ar.err = a.s.applyV3.Put(nil, r.Put) + case r.DeleteRange != nil: + ar.resp, ar.err = a.s.applyV3.DeleteRange(nil, r.DeleteRange) + case r.Txn != nil: + ar.resp, ar.err = a.s.applyV3.Txn(r.Txn) + case r.Compaction != nil: + ar.resp, ar.physc, ar.err = a.s.applyV3.Compaction(r.Compaction) + case r.LeaseGrant != nil: + ar.resp, ar.err = a.s.applyV3.LeaseGrant(r.LeaseGrant) + case r.LeaseRevoke != nil: + ar.resp, ar.err = a.s.applyV3.LeaseRevoke(r.LeaseRevoke) + case r.Alarm != nil: + ar.resp, ar.err = a.s.applyV3.Alarm(r.Alarm) + case r.Authenticate != nil: + ar.resp, ar.err = a.s.applyV3.Authenticate(r.Authenticate) + case r.AuthEnable != nil: + ar.resp, ar.err = a.s.applyV3.AuthEnable() + case r.AuthDisable != nil: + ar.resp, ar.err = a.s.applyV3.AuthDisable() + case r.AuthUserAdd != nil: + ar.resp, ar.err = a.s.applyV3.UserAdd(r.AuthUserAdd) + case r.AuthUserDelete != nil: + ar.resp, ar.err = a.s.applyV3.UserDelete(r.AuthUserDelete) + case r.AuthUserChangePassword != nil: + ar.resp, ar.err = a.s.applyV3.UserChangePassword(r.AuthUserChangePassword) + case r.AuthUserGrantRole != nil: + ar.resp, ar.err = a.s.applyV3.UserGrantRole(r.AuthUserGrantRole) + case r.AuthUserGet != nil: + ar.resp, ar.err = a.s.applyV3.UserGet(r.AuthUserGet) + case r.AuthUserRevokeRole != nil: + ar.resp, ar.err = a.s.applyV3.UserRevokeRole(r.AuthUserRevokeRole) + case r.AuthRoleAdd != nil: + ar.resp, ar.err = a.s.applyV3.RoleAdd(r.AuthRoleAdd) + case r.AuthRoleGrantPermission != nil: + ar.resp, ar.err = a.s.applyV3.RoleGrantPermission(r.AuthRoleGrantPermission) + case r.AuthRoleGet != nil: + ar.resp, ar.err = a.s.applyV3.RoleGet(r.AuthRoleGet) + case r.AuthRoleRevokePermission != nil: + ar.resp, ar.err = a.s.applyV3.RoleRevokePermission(r.AuthRoleRevokePermission) + case r.AuthRoleDelete != nil: + ar.resp, ar.err = a.s.applyV3.RoleDelete(r.AuthRoleDelete) + case r.AuthUserList != nil: + ar.resp, ar.err = a.s.applyV3.UserList(r.AuthUserList) + case r.AuthRoleList != nil: + ar.resp, ar.err = a.s.applyV3.RoleList(r.AuthRoleList) + default: + panic("not implemented") + } + return ar +} + +func (a *applierV3backend) Put(txn mvcc.TxnWrite, p *pb.PutRequest) (resp *pb.PutResponse, err error) { + resp = &pb.PutResponse{} + resp.Header = &pb.ResponseHeader{} + + val, leaseID := p.Value, lease.LeaseID(p.Lease) + if txn == nil { + if leaseID != lease.NoLease { + if l := a.s.lessor.Lookup(leaseID); l == nil { + return nil, lease.ErrLeaseNotFound + } + } + txn = a.s.KV().Write() + defer txn.End() + } + + var rr *mvcc.RangeResult + if p.IgnoreValue || p.IgnoreLease || p.PrevKv { + rr, err = txn.Range(p.Key, nil, mvcc.RangeOptions{}) + if err != nil { + return nil, err + } + } + if p.IgnoreValue || p.IgnoreLease { + if rr == nil || len(rr.KVs) == 0 { + // ignore_{lease,value} flag expects previous key-value pair + return nil, ErrKeyNotFound + } + } + if p.IgnoreValue { + val = rr.KVs[0].Value + } + if p.IgnoreLease { + leaseID = lease.LeaseID(rr.KVs[0].Lease) + } + if p.PrevKv { + if rr != nil && len(rr.KVs) != 0 { + resp.PrevKv = &rr.KVs[0] + } + } + + resp.Header.Revision = txn.Put(p.Key, val, leaseID) + return resp, nil +} + +func (a *applierV3backend) DeleteRange(txn mvcc.TxnWrite, dr *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { + resp := &pb.DeleteRangeResponse{} + resp.Header = &pb.ResponseHeader{} + + if txn == nil { + txn = a.s.kv.Write() + defer txn.End() + } + + if isGteRange(dr.RangeEnd) { + dr.RangeEnd = []byte{} + } + + if dr.PrevKv { + rr, err := txn.Range(dr.Key, dr.RangeEnd, mvcc.RangeOptions{}) + if err != nil { + return nil, err + } + if rr != nil { + for i := range rr.KVs { + resp.PrevKvs = append(resp.PrevKvs, &rr.KVs[i]) + } + } + } + + resp.Deleted, resp.Header.Revision = txn.DeleteRange(dr.Key, dr.RangeEnd) + return resp, nil +} + +func (a *applierV3backend) Range(txn mvcc.TxnRead, r *pb.RangeRequest) (*pb.RangeResponse, error) { + resp := &pb.RangeResponse{} + resp.Header = &pb.ResponseHeader{} + + if txn == nil { + txn = a.s.kv.Read() + defer txn.End() + } + + if isGteRange(r.RangeEnd) { + r.RangeEnd = []byte{} + } + + limit := r.Limit + if r.SortOrder != pb.RangeRequest_NONE || + r.MinModRevision != 0 || r.MaxModRevision != 0 || + r.MinCreateRevision != 0 || r.MaxCreateRevision != 0 { + // fetch everything; sort and truncate afterwards + limit = 0 + } + if limit > 0 { + // fetch one extra for 'more' flag + limit = limit + 1 + } + + ro := mvcc.RangeOptions{ + Limit: limit, + Rev: r.Revision, + Count: r.CountOnly, + } + + rr, err := txn.Range(r.Key, r.RangeEnd, ro) + if err != nil { + return nil, err + } + + if r.MaxModRevision != 0 { + f := func(kv *mvccpb.KeyValue) bool { return kv.ModRevision > r.MaxModRevision } + pruneKVs(rr, f) + } + if r.MinModRevision != 0 { + f := func(kv *mvccpb.KeyValue) bool { return kv.ModRevision < r.MinModRevision } + pruneKVs(rr, f) + } + if r.MaxCreateRevision != 0 { + f := func(kv *mvccpb.KeyValue) bool { return kv.CreateRevision > r.MaxCreateRevision } + pruneKVs(rr, f) + } + if r.MinCreateRevision != 0 { + f := func(kv *mvccpb.KeyValue) bool { return kv.CreateRevision < r.MinCreateRevision } + pruneKVs(rr, f) + } + + sortOrder := r.SortOrder + if r.SortTarget != pb.RangeRequest_KEY && sortOrder == pb.RangeRequest_NONE { + // Since current mvcc.Range implementation returns results + // sorted by keys in lexiographically ascending order, + // sort ASCEND by default only when target is not 'KEY' + sortOrder = pb.RangeRequest_ASCEND + } + if sortOrder != pb.RangeRequest_NONE { + var sorter sort.Interface + switch { + case r.SortTarget == pb.RangeRequest_KEY: + sorter = &kvSortByKey{&kvSort{rr.KVs}} + case r.SortTarget == pb.RangeRequest_VERSION: + sorter = &kvSortByVersion{&kvSort{rr.KVs}} + case r.SortTarget == pb.RangeRequest_CREATE: + sorter = &kvSortByCreate{&kvSort{rr.KVs}} + case r.SortTarget == pb.RangeRequest_MOD: + sorter = &kvSortByMod{&kvSort{rr.KVs}} + case r.SortTarget == pb.RangeRequest_VALUE: + sorter = &kvSortByValue{&kvSort{rr.KVs}} + } + switch { + case sortOrder == pb.RangeRequest_ASCEND: + sort.Sort(sorter) + case sortOrder == pb.RangeRequest_DESCEND: + sort.Sort(sort.Reverse(sorter)) + } + } + + if r.Limit > 0 && len(rr.KVs) > int(r.Limit) { + rr.KVs = rr.KVs[:r.Limit] + resp.More = true + } + + resp.Header.Revision = rr.Rev + resp.Count = int64(rr.Count) + for i := range rr.KVs { + if r.KeysOnly { + rr.KVs[i].Value = nil + } + resp.Kvs = append(resp.Kvs, &rr.KVs[i]) + } + return resp, nil +} + +func (a *applierV3backend) Txn(rt *pb.TxnRequest) (*pb.TxnResponse, error) { + isWrite := !isTxnReadonly(rt) + txn := mvcc.NewReadOnlyTxnWrite(a.s.KV().Read()) + + reqs, ok := a.compareToOps(txn, rt) + if isWrite { + if err := a.checkRequestPut(txn, reqs); err != nil { + txn.End() + return nil, err + } + } + if err := checkRequestRange(txn, reqs); err != nil { + txn.End() + return nil, err + } + + resps := make([]*pb.ResponseOp, len(reqs)) + txnResp := &pb.TxnResponse{ + Responses: resps, + Succeeded: ok, + Header: &pb.ResponseHeader{}, + } + + // When executing mutable txn ops, etcd must hold the txn lock so + // readers do not see any intermediate results. Since writes are + // serialized on the raft loop, the revision in the read view will + // be the revision of the write txn. + if isWrite { + txn.End() + txn = a.s.KV().Write() + } + for i := range reqs { + resps[i] = a.applyUnion(txn, reqs[i]) + } + rev := txn.Rev() + if len(txn.Changes()) != 0 { + rev++ + } + txn.End() + + txnResp.Header.Revision = rev + return txnResp, nil +} + +func (a *applierV3backend) compareToOps(rv mvcc.ReadView, rt *pb.TxnRequest) ([]*pb.RequestOp, bool) { + for _, c := range rt.Compare { + if !applyCompare(rv, c) { + return rt.Failure, false + } + } + return rt.Success, true +} + +// applyCompare applies the compare request. +// If the comparison succeeds, it returns true. Otherwise, returns false. +func applyCompare(rv mvcc.ReadView, c *pb.Compare) bool { + rr, err := rv.Range(c.Key, nil, mvcc.RangeOptions{}) + if err != nil { + return false + } + var ckv mvccpb.KeyValue + if len(rr.KVs) != 0 { + ckv = rr.KVs[0] + } else { + // Use the zero value of ckv normally. However... + if c.Target == pb.Compare_VALUE { + // Always fail if we're comparing a value on a key that doesn't exist. + // We can treat non-existence as the empty set explicitly, such that + // even a key with a value of length 0 bytes is still a real key + // that was written that way + return false + } + } + + // -1 is less, 0 is equal, 1 is greater + var result int + switch c.Target { + case pb.Compare_VALUE: + tv, _ := c.TargetUnion.(*pb.Compare_Value) + if tv != nil { + result = bytes.Compare(ckv.Value, tv.Value) + } + case pb.Compare_CREATE: + tv, _ := c.TargetUnion.(*pb.Compare_CreateRevision) + if tv != nil { + result = compareInt64(ckv.CreateRevision, tv.CreateRevision) + } + + case pb.Compare_MOD: + tv, _ := c.TargetUnion.(*pb.Compare_ModRevision) + if tv != nil { + result = compareInt64(ckv.ModRevision, tv.ModRevision) + } + case pb.Compare_VERSION: + tv, _ := c.TargetUnion.(*pb.Compare_Version) + if tv != nil { + result = compareInt64(ckv.Version, tv.Version) + } + } + + switch c.Result { + case pb.Compare_EQUAL: + return result == 0 + case pb.Compare_NOT_EQUAL: + return result != 0 + case pb.Compare_GREATER: + return result > 0 + case pb.Compare_LESS: + return result < 0 + } + return true +} + +func (a *applierV3backend) applyUnion(txn mvcc.TxnWrite, union *pb.RequestOp) *pb.ResponseOp { + switch tv := union.Request.(type) { + case *pb.RequestOp_RequestRange: + if tv.RequestRange != nil { + resp, err := a.Range(txn, tv.RequestRange) + if err != nil { + plog.Panicf("unexpected error during txn: %v", err) + } + return &pb.ResponseOp{Response: &pb.ResponseOp_ResponseRange{ResponseRange: resp}} + } + case *pb.RequestOp_RequestPut: + if tv.RequestPut != nil { + resp, err := a.Put(txn, tv.RequestPut) + if err != nil { + plog.Panicf("unexpected error during txn: %v", err) + } + return &pb.ResponseOp{Response: &pb.ResponseOp_ResponsePut{ResponsePut: resp}} + } + case *pb.RequestOp_RequestDeleteRange: + if tv.RequestDeleteRange != nil { + resp, err := a.DeleteRange(txn, tv.RequestDeleteRange) + if err != nil { + plog.Panicf("unexpected error during txn: %v", err) + } + return &pb.ResponseOp{Response: &pb.ResponseOp_ResponseDeleteRange{ResponseDeleteRange: resp}} + } + default: + // empty union + return nil + } + return nil + +} + +func (a *applierV3backend) Compaction(compaction *pb.CompactionRequest) (*pb.CompactionResponse, <-chan struct{}, error) { + resp := &pb.CompactionResponse{} + resp.Header = &pb.ResponseHeader{} + ch, err := a.s.KV().Compact(compaction.Revision) + if err != nil { + return nil, ch, err + } + // get the current revision. which key to get is not important. + rr, _ := a.s.KV().Range([]byte("compaction"), nil, mvcc.RangeOptions{}) + resp.Header.Revision = rr.Rev + return resp, ch, err +} + +func (a *applierV3backend) LeaseGrant(lc *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) { + l, err := a.s.lessor.Grant(lease.LeaseID(lc.ID), lc.TTL) + resp := &pb.LeaseGrantResponse{} + if err == nil { + resp.ID = int64(l.ID) + resp.TTL = l.TTL() + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) LeaseRevoke(lc *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error) { + err := a.s.lessor.Revoke(lease.LeaseID(lc.ID)) + return &pb.LeaseRevokeResponse{Header: newHeader(a.s)}, err +} + +func (a *applierV3backend) Alarm(ar *pb.AlarmRequest) (*pb.AlarmResponse, error) { + resp := &pb.AlarmResponse{} + oldCount := len(a.s.alarmStore.Get(ar.Alarm)) + + switch ar.Action { + case pb.AlarmRequest_GET: + resp.Alarms = a.s.alarmStore.Get(ar.Alarm) + case pb.AlarmRequest_ACTIVATE: + m := a.s.alarmStore.Activate(types.ID(ar.MemberID), ar.Alarm) + if m == nil { + break + } + resp.Alarms = append(resp.Alarms, m) + activated := oldCount == 0 && len(a.s.alarmStore.Get(m.Alarm)) == 1 + if !activated { + break + } + + switch m.Alarm { + case pb.AlarmType_NOSPACE: + plog.Warningf("alarm raised %+v", m) + a.s.applyV3 = newApplierV3Capped(a) + default: + plog.Errorf("unimplemented alarm activation (%+v)", m) + } + case pb.AlarmRequest_DEACTIVATE: + m := a.s.alarmStore.Deactivate(types.ID(ar.MemberID), ar.Alarm) + if m == nil { + break + } + resp.Alarms = append(resp.Alarms, m) + deactivated := oldCount > 0 && len(a.s.alarmStore.Get(ar.Alarm)) == 0 + if !deactivated { + break + } + + switch m.Alarm { + case pb.AlarmType_NOSPACE: + plog.Infof("alarm disarmed %+v", ar) + a.s.applyV3 = a.s.newApplierV3() + default: + plog.Errorf("unimplemented alarm deactivation (%+v)", m) + } + default: + return nil, nil + } + return resp, nil +} + +type applierV3Capped struct { + applierV3 + q backendQuota +} + +// newApplierV3Capped creates an applyV3 that will reject Puts and transactions +// with Puts so that the number of keys in the store is capped. +func newApplierV3Capped(base applierV3) applierV3 { return &applierV3Capped{applierV3: base} } + +func (a *applierV3Capped) Put(txn mvcc.TxnWrite, p *pb.PutRequest) (*pb.PutResponse, error) { + return nil, ErrNoSpace +} + +func (a *applierV3Capped) Txn(r *pb.TxnRequest) (*pb.TxnResponse, error) { + if a.q.Cost(r) > 0 { + return nil, ErrNoSpace + } + return a.applierV3.Txn(r) +} + +func (a *applierV3Capped) LeaseGrant(lc *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) { + return nil, ErrNoSpace +} + +func (a *applierV3backend) AuthEnable() (*pb.AuthEnableResponse, error) { + err := a.s.AuthStore().AuthEnable() + if err != nil { + return nil, err + } + return &pb.AuthEnableResponse{Header: newHeader(a.s)}, nil +} + +func (a *applierV3backend) AuthDisable() (*pb.AuthDisableResponse, error) { + a.s.AuthStore().AuthDisable() + return &pb.AuthDisableResponse{Header: newHeader(a.s)}, nil +} + +func (a *applierV3backend) Authenticate(r *pb.InternalAuthenticateRequest) (*pb.AuthenticateResponse, error) { + ctx := context.WithValue(context.WithValue(a.s.ctx, "index", a.s.consistIndex.ConsistentIndex()), "simpleToken", r.SimpleToken) + resp, err := a.s.AuthStore().Authenticate(ctx, r.Name, r.Password) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) UserAdd(r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) { + resp, err := a.s.AuthStore().UserAdd(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) UserDelete(r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) { + resp, err := a.s.AuthStore().UserDelete(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) UserChangePassword(r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) { + resp, err := a.s.AuthStore().UserChangePassword(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) UserGrantRole(r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) { + resp, err := a.s.AuthStore().UserGrantRole(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) UserGet(r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) { + resp, err := a.s.AuthStore().UserGet(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) UserRevokeRole(r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) { + resp, err := a.s.AuthStore().UserRevokeRole(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) RoleAdd(r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) { + resp, err := a.s.AuthStore().RoleAdd(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) RoleGrantPermission(r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) { + resp, err := a.s.AuthStore().RoleGrantPermission(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) RoleGet(r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) { + resp, err := a.s.AuthStore().RoleGet(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) RoleRevokePermission(r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) { + resp, err := a.s.AuthStore().RoleRevokePermission(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) RoleDelete(r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) { + resp, err := a.s.AuthStore().RoleDelete(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) UserList(r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) { + resp, err := a.s.AuthStore().UserList(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +func (a *applierV3backend) RoleList(r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) { + resp, err := a.s.AuthStore().RoleList(r) + if resp != nil { + resp.Header = newHeader(a.s) + } + return resp, err +} + +type quotaApplierV3 struct { + applierV3 + q Quota +} + +func newQuotaApplierV3(s *EtcdServer, app applierV3) applierV3 { + return "aApplierV3{app, NewBackendQuota(s)} +} + +func (a *quotaApplierV3) Put(txn mvcc.TxnWrite, p *pb.PutRequest) (*pb.PutResponse, error) { + ok := a.q.Available(p) + resp, err := a.applierV3.Put(txn, p) + if err == nil && !ok { + err = ErrNoSpace + } + return resp, err +} + +func (a *quotaApplierV3) Txn(rt *pb.TxnRequest) (*pb.TxnResponse, error) { + ok := a.q.Available(rt) + resp, err := a.applierV3.Txn(rt) + if err == nil && !ok { + err = ErrNoSpace + } + return resp, err +} + +func (a *quotaApplierV3) LeaseGrant(lc *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) { + ok := a.q.Available(lc) + resp, err := a.applierV3.LeaseGrant(lc) + if err == nil && !ok { + err = ErrNoSpace + } + return resp, err +} + +type kvSort struct{ kvs []mvccpb.KeyValue } + +func (s *kvSort) Swap(i, j int) { + t := s.kvs[i] + s.kvs[i] = s.kvs[j] + s.kvs[j] = t +} +func (s *kvSort) Len() int { return len(s.kvs) } + +type kvSortByKey struct{ *kvSort } + +func (s *kvSortByKey) Less(i, j int) bool { + return bytes.Compare(s.kvs[i].Key, s.kvs[j].Key) < 0 +} + +type kvSortByVersion struct{ *kvSort } + +func (s *kvSortByVersion) Less(i, j int) bool { + return (s.kvs[i].Version - s.kvs[j].Version) < 0 +} + +type kvSortByCreate struct{ *kvSort } + +func (s *kvSortByCreate) Less(i, j int) bool { + return (s.kvs[i].CreateRevision - s.kvs[j].CreateRevision) < 0 +} + +type kvSortByMod struct{ *kvSort } + +func (s *kvSortByMod) Less(i, j int) bool { + return (s.kvs[i].ModRevision - s.kvs[j].ModRevision) < 0 +} + +type kvSortByValue struct{ *kvSort } + +func (s *kvSortByValue) Less(i, j int) bool { + return bytes.Compare(s.kvs[i].Value, s.kvs[j].Value) < 0 +} + +func (a *applierV3backend) checkRequestPut(rv mvcc.ReadView, reqs []*pb.RequestOp) error { + for _, requ := range reqs { + tv, ok := requ.Request.(*pb.RequestOp_RequestPut) + if !ok { + continue + } + preq := tv.RequestPut + if preq == nil { + continue + } + if preq.IgnoreValue || preq.IgnoreLease { + // expects previous key-value, error if not exist + rr, err := rv.Range(preq.Key, nil, mvcc.RangeOptions{}) + if err != nil { + return err + } + if rr == nil || len(rr.KVs) == 0 { + return ErrKeyNotFound + } + } + if lease.LeaseID(preq.Lease) == lease.NoLease { + continue + } + if l := a.s.lessor.Lookup(lease.LeaseID(preq.Lease)); l == nil { + return lease.ErrLeaseNotFound + } + } + return nil +} + +func checkRequestRange(rv mvcc.ReadView, reqs []*pb.RequestOp) error { + for _, requ := range reqs { + tv, ok := requ.Request.(*pb.RequestOp_RequestRange) + if !ok { + continue + } + greq := tv.RequestRange + if greq == nil || greq.Revision == 0 { + continue + } + + if greq.Revision > rv.Rev() { + return mvcc.ErrFutureRev + } + if greq.Revision < rv.FirstRev() { + return mvcc.ErrCompacted + } + } + return nil +} + +func compareInt64(a, b int64) int { + switch { + case a < b: + return -1 + case a > b: + return 1 + default: + return 0 + } +} + +// isGteRange determines if the range end is a >= range. This works around grpc +// sending empty byte strings as nil; >= is encoded in the range end as '\0'. +func isGteRange(rangeEnd []byte) bool { + return len(rangeEnd) == 1 && rangeEnd[0] == 0 +} + +func noSideEffect(r *pb.InternalRaftRequest) bool { + return r.Range != nil || r.AuthUserGet != nil || r.AuthRoleGet != nil +} + +func removeNeedlessRangeReqs(txn *pb.TxnRequest) { + f := func(ops []*pb.RequestOp) []*pb.RequestOp { + j := 0 + for i := 0; i < len(ops); i++ { + if _, ok := ops[i].Request.(*pb.RequestOp_RequestRange); ok { + continue + } + ops[j] = ops[i] + j++ + } + + return ops[:j] + } + + txn.Success = f(txn.Success) + txn.Failure = f(txn.Failure) +} + +func pruneKVs(rr *mvcc.RangeResult, isPrunable func(*mvccpb.KeyValue) bool) { + j := 0 + for i := range rr.KVs { + rr.KVs[j] = rr.KVs[i] + if !isPrunable(&rr.KVs[i]) { + j++ + } + } + rr.KVs = rr.KVs[:j] +} + +func newHeader(s *EtcdServer) *pb.ResponseHeader { + return &pb.ResponseHeader{ + ClusterId: uint64(s.Cluster().ID()), + MemberId: uint64(s.ID()), + Revision: s.KV().Rev(), + RaftTerm: s.Term(), + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/apply_auth.go b/deps/github.com/coreos/etcd/etcdserver/apply_auth.go new file mode 100644 index 000000000..7da4ae45d --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/apply_auth.go @@ -0,0 +1,196 @@ +// 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. + +package etcdserver + +import ( + "sync" + + "github.com/coreos/etcd/auth" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc" +) + +type authApplierV3 struct { + applierV3 + as auth.AuthStore + + // mu serializes Apply so that user isn't corrupted and so that + // serialized requests don't leak data from TOCTOU errors + mu sync.Mutex + + authInfo auth.AuthInfo +} + +func newAuthApplierV3(as auth.AuthStore, base applierV3) *authApplierV3 { + return &authApplierV3{applierV3: base, as: as} +} + +func (aa *authApplierV3) Apply(r *pb.InternalRaftRequest) *applyResult { + aa.mu.Lock() + defer aa.mu.Unlock() + if r.Header != nil { + // backward-compatible with pre-3.0 releases when internalRaftRequest + // does not have header field + aa.authInfo.Username = r.Header.Username + aa.authInfo.Revision = r.Header.AuthRevision + } + if needAdminPermission(r) { + if err := aa.as.IsAdminPermitted(&aa.authInfo); err != nil { + aa.authInfo.Username = "" + aa.authInfo.Revision = 0 + return &applyResult{err: err} + } + } + ret := aa.applierV3.Apply(r) + aa.authInfo.Username = "" + aa.authInfo.Revision = 0 + return ret +} + +func (aa *authApplierV3) Put(txn mvcc.TxnWrite, r *pb.PutRequest) (*pb.PutResponse, error) { + if err := aa.as.IsPutPermitted(&aa.authInfo, r.Key); err != nil { + return nil, err + } + if r.PrevKv { + err := aa.as.IsRangePermitted(&aa.authInfo, r.Key, nil) + if err != nil { + return nil, err + } + } + return aa.applierV3.Put(txn, r) +} + +func (aa *authApplierV3) Range(txn mvcc.TxnRead, r *pb.RangeRequest) (*pb.RangeResponse, error) { + if err := aa.as.IsRangePermitted(&aa.authInfo, r.Key, r.RangeEnd); err != nil { + return nil, err + } + return aa.applierV3.Range(txn, r) +} + +func (aa *authApplierV3) DeleteRange(txn mvcc.TxnWrite, r *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { + if err := aa.as.IsDeleteRangePermitted(&aa.authInfo, r.Key, r.RangeEnd); err != nil { + return nil, err + } + if r.PrevKv { + err := aa.as.IsRangePermitted(&aa.authInfo, r.Key, r.RangeEnd) + if err != nil { + return nil, err + } + } + + return aa.applierV3.DeleteRange(txn, r) +} + +func checkTxnReqsPermission(as auth.AuthStore, ai *auth.AuthInfo, reqs []*pb.RequestOp) error { + for _, requ := range reqs { + switch tv := requ.Request.(type) { + case *pb.RequestOp_RequestRange: + if tv.RequestRange == nil { + continue + } + + if err := as.IsRangePermitted(ai, tv.RequestRange.Key, tv.RequestRange.RangeEnd); err != nil { + return err + } + + case *pb.RequestOp_RequestPut: + if tv.RequestPut == nil { + continue + } + + if err := as.IsPutPermitted(ai, tv.RequestPut.Key); err != nil { + return err + } + + case *pb.RequestOp_RequestDeleteRange: + if tv.RequestDeleteRange == nil { + continue + } + + if tv.RequestDeleteRange.PrevKv { + err := as.IsRangePermitted(ai, tv.RequestDeleteRange.Key, tv.RequestDeleteRange.RangeEnd) + if err != nil { + return err + } + } + + err := as.IsDeleteRangePermitted(ai, tv.RequestDeleteRange.Key, tv.RequestDeleteRange.RangeEnd) + if err != nil { + return err + } + } + } + + return nil +} + +func checkTxnAuth(as auth.AuthStore, ai *auth.AuthInfo, rt *pb.TxnRequest) error { + for _, c := range rt.Compare { + if err := as.IsRangePermitted(ai, c.Key, nil); err != nil { + return err + } + } + if err := checkTxnReqsPermission(as, ai, rt.Success); err != nil { + return err + } + if err := checkTxnReqsPermission(as, ai, rt.Failure); err != nil { + return err + } + return nil +} + +func (aa *authApplierV3) Txn(rt *pb.TxnRequest) (*pb.TxnResponse, error) { + if err := checkTxnAuth(aa.as, &aa.authInfo, rt); err != nil { + return nil, err + } + return aa.applierV3.Txn(rt) +} + +func needAdminPermission(r *pb.InternalRaftRequest) bool { + switch { + case r.AuthEnable != nil: + return true + case r.AuthDisable != nil: + return true + case r.AuthUserAdd != nil: + return true + case r.AuthUserDelete != nil: + return true + case r.AuthUserChangePassword != nil: + return true + case r.AuthUserGrantRole != nil: + return true + case r.AuthUserGet != nil: + return true + case r.AuthUserRevokeRole != nil: + return true + case r.AuthRoleAdd != nil: + return true + case r.AuthRoleGrantPermission != nil: + return true + case r.AuthRoleGet != nil: + return true + case r.AuthRoleRevokePermission != nil: + return true + case r.AuthRoleDelete != nil: + return true + case r.AuthUserList != nil: + return true + case r.AuthRoleList != nil: + return true + default: + return false + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/apply_v2.go b/deps/github.com/coreos/etcd/etcdserver/apply_v2.go new file mode 100644 index 000000000..f278efca8 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/apply_v2.go @@ -0,0 +1,140 @@ +// 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. + +package etcdserver + +import ( + "encoding/json" + "path" + "time" + + "github.com/coreos/etcd/etcdserver/api" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/store" + "github.com/coreos/go-semver/semver" +) + +// ApplierV2 is the interface for processing V2 raft messages +type ApplierV2 interface { + Delete(r *pb.Request) Response + Post(r *pb.Request) Response + Put(r *pb.Request) Response + QGet(r *pb.Request) Response + Sync(r *pb.Request) Response +} + +func NewApplierV2(s store.Store, c *membership.RaftCluster) ApplierV2 { + return &applierV2store{store: s, cluster: c} +} + +type applierV2store struct { + store store.Store + cluster *membership.RaftCluster +} + +func (a *applierV2store) Delete(r *pb.Request) Response { + switch { + case r.PrevIndex > 0 || r.PrevValue != "": + return toResponse(a.store.CompareAndDelete(r.Path, r.PrevValue, r.PrevIndex)) + default: + return toResponse(a.store.Delete(r.Path, r.Dir, r.Recursive)) + } +} + +func (a *applierV2store) Post(r *pb.Request) Response { + return toResponse(a.store.Create(r.Path, r.Dir, r.Val, true, toTTLOptions(r))) +} + +func (a *applierV2store) Put(r *pb.Request) Response { + ttlOptions := toTTLOptions(r) + exists, existsSet := pbutil.GetBool(r.PrevExist) + switch { + case existsSet: + if exists { + if r.PrevIndex == 0 && r.PrevValue == "" { + return toResponse(a.store.Update(r.Path, r.Val, ttlOptions)) + } + return toResponse(a.store.CompareAndSwap(r.Path, r.PrevValue, r.PrevIndex, r.Val, ttlOptions)) + } + return toResponse(a.store.Create(r.Path, r.Dir, r.Val, false, ttlOptions)) + case r.PrevIndex > 0 || r.PrevValue != "": + return toResponse(a.store.CompareAndSwap(r.Path, r.PrevValue, r.PrevIndex, r.Val, ttlOptions)) + default: + if storeMemberAttributeRegexp.MatchString(r.Path) { + id := membership.MustParseMemberIDFromKey(path.Dir(r.Path)) + var attr membership.Attributes + if err := json.Unmarshal([]byte(r.Val), &attr); err != nil { + plog.Panicf("unmarshal %s should never fail: %v", r.Val, err) + } + if a.cluster != nil { + a.cluster.UpdateAttributes(id, attr) + } + // return an empty response since there is no consumer. + return Response{} + } + if r.Path == membership.StoreClusterVersionKey() { + if a.cluster != nil { + a.cluster.SetVersion(semver.Must(semver.NewVersion(r.Val)), api.UpdateCapability) + } + // return an empty response since there is no consumer. + return Response{} + } + return toResponse(a.store.Set(r.Path, r.Dir, r.Val, ttlOptions)) + } +} + +func (a *applierV2store) QGet(r *pb.Request) Response { + return toResponse(a.store.Get(r.Path, r.Recursive, r.Sorted)) +} + +func (a *applierV2store) Sync(r *pb.Request) Response { + a.store.DeleteExpiredKeys(time.Unix(0, r.Time)) + return Response{} +} + +// applyV2Request interprets r as a call to store.X and returns a Response interpreted +// from store.Event +func (s *EtcdServer) applyV2Request(r *pb.Request) Response { + toTTLOptions(r) + switch r.Method { + case "POST": + return s.applyV2.Post(r) + case "PUT": + return s.applyV2.Put(r) + case "DELETE": + return s.applyV2.Delete(r) + case "QGET": + return s.applyV2.QGet(r) + case "SYNC": + return s.applyV2.Sync(r) + default: + // This should never be reached, but just in case: + return Response{err: ErrUnknownMethod} + } +} + +func toTTLOptions(r *pb.Request) store.TTLOptionSet { + refresh, _ := pbutil.GetBool(r.Refresh) + ttlOptions := store.TTLOptionSet{Refresh: refresh} + if r.Expiration != 0 { + ttlOptions.ExpireTime = time.Unix(0, r.Expiration) + } + return ttlOptions +} + +func toResponse(ev *store.Event, err error) Response { + return Response{Event: ev, err: err} +} diff --git a/deps/github.com/coreos/etcd/etcdserver/auth/auth.go b/deps/github.com/coreos/etcd/etcdserver/auth/auth.go new file mode 100644 index 000000000..19e96d57c --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/auth/auth.go @@ -0,0 +1,647 @@ +// Copyright 2015 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. + +// Package auth implements etcd authentication. +package auth + +import ( + "encoding/json" + "fmt" + "net/http" + "path" + "reflect" + "sort" + "strings" + "time" + + etcderr "github.com/coreos/etcd/error" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/pkg/capnslog" + "golang.org/x/crypto/bcrypt" + "golang.org/x/net/context" +) + +const ( + // StorePermsPrefix is the internal prefix of the storage layer dedicated to storing user data. + StorePermsPrefix = "/2" + + // RootRoleName is the name of the ROOT role, with privileges to manage the cluster. + RootRoleName = "root" + + // GuestRoleName is the name of the role that defines the privileges of an unauthenticated user. + GuestRoleName = "guest" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/auth") +) + +var rootRole = Role{ + Role: RootRoleName, + Permissions: Permissions{ + KV: RWPermission{ + Read: []string{"/*"}, + Write: []string{"/*"}, + }, + }, +} + +var guestRole = Role{ + Role: GuestRoleName, + Permissions: Permissions{ + KV: RWPermission{ + Read: []string{"/*"}, + Write: []string{"/*"}, + }, + }, +} + +type doer interface { + Do(context.Context, etcdserverpb.Request) (etcdserver.Response, error) +} + +type Store interface { + AllUsers() ([]string, error) + GetUser(name string) (User, error) + CreateOrUpdateUser(user User) (out User, created bool, err error) + CreateUser(user User) (User, error) + DeleteUser(name string) error + UpdateUser(user User) (User, error) + AllRoles() ([]string, error) + GetRole(name string) (Role, error) + CreateRole(role Role) error + DeleteRole(name string) error + UpdateRole(role Role) (Role, error) + AuthEnabled() bool + EnableAuth() error + DisableAuth() error + PasswordStore +} + +type PasswordStore interface { + CheckPassword(user User, password string) bool + HashPassword(password string) (string, error) +} + +type store struct { + server doer + timeout time.Duration + ensuredOnce bool + + PasswordStore +} + +type User struct { + User string `json:"user"` + Password string `json:"password,omitempty"` + Roles []string `json:"roles"` + Grant []string `json:"grant,omitempty"` + Revoke []string `json:"revoke,omitempty"` +} + +type Role struct { + Role string `json:"role"` + Permissions Permissions `json:"permissions"` + Grant *Permissions `json:"grant,omitempty"` + Revoke *Permissions `json:"revoke,omitempty"` +} + +type Permissions struct { + KV RWPermission `json:"kv"` +} + +func (p *Permissions) IsEmpty() bool { + return p == nil || (len(p.KV.Read) == 0 && len(p.KV.Write) == 0) +} + +type RWPermission struct { + Read []string `json:"read"` + Write []string `json:"write"` +} + +type Error struct { + Status int + Errmsg string +} + +func (ae Error) Error() string { return ae.Errmsg } +func (ae Error) HTTPStatus() int { return ae.Status } + +func authErr(hs int, s string, v ...interface{}) Error { + return Error{Status: hs, Errmsg: fmt.Sprintf("auth: "+s, v...)} +} + +func NewStore(server doer, timeout time.Duration) Store { + s := &store{ + server: server, + timeout: timeout, + PasswordStore: passwordStore{}, + } + return s +} + +// passwordStore implements PasswordStore using bcrypt to hash user passwords +type passwordStore struct{} + +func (_ passwordStore) CheckPassword(user User, password string) bool { + err := bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(password)) + return err == nil +} + +func (_ passwordStore) HashPassword(password string) (string, error) { + hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost) + return string(hash), err +} + +func (s *store) AllUsers() ([]string, error) { + resp, err := s.requestResource("/users/", false, false) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return []string{}, nil + } + } + return nil, err + } + var nodes []string + for _, n := range resp.Event.Node.Nodes { + _, user := path.Split(n.Key) + nodes = append(nodes, user) + } + sort.Strings(nodes) + return nodes, nil +} + +func (s *store) GetUser(name string) (User, error) { return s.getUser(name, false) } + +// CreateOrUpdateUser should be only used for creating the new user or when you are not +// sure if it is a create or update. (When only password is passed in, we are not sure +// if it is a update or create) +func (s *store) CreateOrUpdateUser(user User) (out User, created bool, err error) { + _, err = s.getUser(user.User, true) + if err == nil { + out, err = s.UpdateUser(user) + return out, false, err + } + u, err := s.CreateUser(user) + return u, true, err +} + +func (s *store) CreateUser(user User) (User, error) { + // Attach root role to root user. + if user.User == "root" { + user = attachRootRole(user) + } + u, err := s.createUserInternal(user) + if err == nil { + plog.Noticef("created user %s", user.User) + } + return u, err +} + +func (s *store) createUserInternal(user User) (User, error) { + if user.Password == "" { + return user, authErr(http.StatusBadRequest, "Cannot create user %s with an empty password", user.User) + } + hash, err := s.HashPassword(user.Password) + if err != nil { + return user, err + } + user.Password = hash + + _, err = s.createResource("/users/"+user.User, user) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeNodeExist { + return user, authErr(http.StatusConflict, "User %s already exists.", user.User) + } + } + } + return user, err +} + +func (s *store) DeleteUser(name string) error { + if s.AuthEnabled() && name == "root" { + return authErr(http.StatusForbidden, "Cannot delete root user while auth is enabled.") + } + _, err := s.deleteResource("/users/" + name) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return authErr(http.StatusNotFound, "User %s does not exist", name) + } + } + return err + } + plog.Noticef("deleted user %s", name) + return nil +} + +func (s *store) UpdateUser(user User) (User, error) { + old, err := s.getUser(user.User, true) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return user, authErr(http.StatusNotFound, "User %s doesn't exist.", user.User) + } + } + return old, err + } + + newUser, err := old.merge(user, s.PasswordStore) + if err != nil { + return old, err + } + if reflect.DeepEqual(old, newUser) { + return old, authErr(http.StatusBadRequest, "User not updated. Use grant/revoke/password to update the user.") + } + _, err = s.updateResource("/users/"+user.User, newUser) + if err == nil { + plog.Noticef("updated user %s", user.User) + } + return newUser, err +} + +func (s *store) AllRoles() ([]string, error) { + nodes := []string{RootRoleName} + resp, err := s.requestResource("/roles/", false, false) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return nodes, nil + } + } + return nil, err + } + for _, n := range resp.Event.Node.Nodes { + _, role := path.Split(n.Key) + nodes = append(nodes, role) + } + sort.Strings(nodes) + return nodes, nil +} + +func (s *store) GetRole(name string) (Role, error) { return s.getRole(name, false) } + +func (s *store) CreateRole(role Role) error { + if role.Role == RootRoleName { + return authErr(http.StatusForbidden, "Cannot modify role %s: is root role.", role.Role) + } + _, err := s.createResource("/roles/"+role.Role, role) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeNodeExist { + return authErr(http.StatusConflict, "Role %s already exists.", role.Role) + } + } + } + if err == nil { + plog.Noticef("created new role %s", role.Role) + } + return err +} + +func (s *store) DeleteRole(name string) error { + if name == RootRoleName { + return authErr(http.StatusForbidden, "Cannot modify role %s: is root role.", name) + } + _, err := s.deleteResource("/roles/" + name) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return authErr(http.StatusNotFound, "Role %s doesn't exist.", name) + } + } + } + if err == nil { + plog.Noticef("deleted role %s", name) + } + return err +} + +func (s *store) UpdateRole(role Role) (Role, error) { + if role.Role == RootRoleName { + return Role{}, authErr(http.StatusForbidden, "Cannot modify role %s: is root role.", role.Role) + } + old, err := s.getRole(role.Role, true) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return role, authErr(http.StatusNotFound, "Role %s doesn't exist.", role.Role) + } + } + return old, err + } + newRole, err := old.merge(role) + if err != nil { + return old, err + } + if reflect.DeepEqual(old, newRole) { + return old, authErr(http.StatusBadRequest, "Role not updated. Use grant/revoke to update the role.") + } + _, err = s.updateResource("/roles/"+role.Role, newRole) + if err == nil { + plog.Noticef("updated role %s", role.Role) + } + return newRole, err +} + +func (s *store) AuthEnabled() bool { + return s.detectAuth() +} + +func (s *store) EnableAuth() error { + if s.AuthEnabled() { + return authErr(http.StatusConflict, "already enabled") + } + + if _, err := s.getUser("root", true); err != nil { + return authErr(http.StatusConflict, "No root user available, please create one") + } + if _, err := s.getRole(GuestRoleName, true); err != nil { + plog.Printf("no guest role access found, creating default") + if err := s.CreateRole(guestRole); err != nil { + plog.Errorf("error creating guest role. aborting auth enable.") + return err + } + } + + if err := s.enableAuth(); err != nil { + plog.Errorf("error enabling auth (%v)", err) + return err + } + + plog.Noticef("auth: enabled auth") + return nil +} + +func (s *store) DisableAuth() error { + if !s.AuthEnabled() { + return authErr(http.StatusConflict, "already disabled") + } + + err := s.disableAuth() + if err == nil { + plog.Noticef("auth: disabled auth") + } else { + plog.Errorf("error disabling auth (%v)", err) + } + return err +} + +// merge applies the properties of the passed-in User to the User on which it +// is called and returns a new User with these modifications applied. Think of +// all Users as immutable sets of data. Merge allows you to perform the set +// operations (desired grants and revokes) atomically +func (ou User) merge(nu User, s PasswordStore) (User, error) { + var out User + if ou.User != nu.User { + return out, authErr(http.StatusConflict, "Merging user data with conflicting usernames: %s %s", ou.User, nu.User) + } + out.User = ou.User + if nu.Password != "" { + hash, err := s.HashPassword(nu.Password) + if err != nil { + return ou, err + } + out.Password = hash + } else { + out.Password = ou.Password + } + currentRoles := types.NewUnsafeSet(ou.Roles...) + for _, g := range nu.Grant { + if currentRoles.Contains(g) { + plog.Noticef("granting duplicate role %s for user %s", g, nu.User) + return User{}, authErr(http.StatusConflict, fmt.Sprintf("Granting duplicate role %s for user %s", g, nu.User)) + } + currentRoles.Add(g) + } + for _, r := range nu.Revoke { + if !currentRoles.Contains(r) { + plog.Noticef("revoking ungranted role %s for user %s", r, nu.User) + return User{}, authErr(http.StatusConflict, fmt.Sprintf("Revoking ungranted role %s for user %s", r, nu.User)) + } + currentRoles.Remove(r) + } + out.Roles = currentRoles.Values() + sort.Strings(out.Roles) + return out, nil +} + +// merge for a role works the same as User above -- atomic Role application to +// each of the substructures. +func (r Role) merge(n Role) (Role, error) { + var out Role + var err error + if r.Role != n.Role { + return out, authErr(http.StatusConflict, "Merging role with conflicting names: %s %s", r.Role, n.Role) + } + out.Role = r.Role + out.Permissions, err = r.Permissions.Grant(n.Grant) + if err != nil { + return out, err + } + out.Permissions, err = out.Permissions.Revoke(n.Revoke) + return out, err +} + +func (r Role) HasKeyAccess(key string, write bool) bool { + if r.Role == RootRoleName { + return true + } + return r.Permissions.KV.HasAccess(key, write) +} + +func (r Role) HasRecursiveAccess(key string, write bool) bool { + if r.Role == RootRoleName { + return true + } + return r.Permissions.KV.HasRecursiveAccess(key, write) +} + +// Grant adds a set of permissions to the permission object on which it is called, +// returning a new permission object. +func (p Permissions) Grant(n *Permissions) (Permissions, error) { + var out Permissions + var err error + if n == nil { + return p, nil + } + out.KV, err = p.KV.Grant(n.KV) + return out, err +} + +// Revoke removes a set of permissions to the permission object on which it is called, +// returning a new permission object. +func (p Permissions) Revoke(n *Permissions) (Permissions, error) { + var out Permissions + var err error + if n == nil { + return p, nil + } + out.KV, err = p.KV.Revoke(n.KV) + return out, err +} + +// Grant adds a set of permissions to the permission object on which it is called, +// returning a new permission object. +func (rw RWPermission) Grant(n RWPermission) (RWPermission, error) { + var out RWPermission + currentRead := types.NewUnsafeSet(rw.Read...) + for _, r := range n.Read { + if currentRead.Contains(r) { + return out, authErr(http.StatusConflict, "Granting duplicate read permission %s", r) + } + currentRead.Add(r) + } + currentWrite := types.NewUnsafeSet(rw.Write...) + for _, w := range n.Write { + if currentWrite.Contains(w) { + return out, authErr(http.StatusConflict, "Granting duplicate write permission %s", w) + } + currentWrite.Add(w) + } + out.Read = currentRead.Values() + out.Write = currentWrite.Values() + sort.Strings(out.Read) + sort.Strings(out.Write) + return out, nil +} + +// Revoke removes a set of permissions to the permission object on which it is called, +// returning a new permission object. +func (rw RWPermission) Revoke(n RWPermission) (RWPermission, error) { + var out RWPermission + currentRead := types.NewUnsafeSet(rw.Read...) + for _, r := range n.Read { + if !currentRead.Contains(r) { + plog.Noticef("revoking ungranted read permission %s", r) + continue + } + currentRead.Remove(r) + } + currentWrite := types.NewUnsafeSet(rw.Write...) + for _, w := range n.Write { + if !currentWrite.Contains(w) { + plog.Noticef("revoking ungranted write permission %s", w) + continue + } + currentWrite.Remove(w) + } + out.Read = currentRead.Values() + out.Write = currentWrite.Values() + sort.Strings(out.Read) + sort.Strings(out.Write) + return out, nil +} + +func (rw RWPermission) HasAccess(key string, write bool) bool { + var list []string + if write { + list = rw.Write + } else { + list = rw.Read + } + for _, pat := range list { + match, err := simpleMatch(pat, key) + if err == nil && match { + return true + } + } + return false +} + +func (rw RWPermission) HasRecursiveAccess(key string, write bool) bool { + list := rw.Read + if write { + list = rw.Write + } + for _, pat := range list { + match, err := prefixMatch(pat, key) + if err == nil && match { + return true + } + } + return false +} + +func simpleMatch(pattern string, key string) (match bool, err error) { + if pattern[len(pattern)-1] == '*' { + return strings.HasPrefix(key, pattern[:len(pattern)-1]), nil + } + return key == pattern, nil +} + +func prefixMatch(pattern string, key string) (match bool, err error) { + if pattern[len(pattern)-1] != '*' { + return false, nil + } + return strings.HasPrefix(key, pattern[:len(pattern)-1]), nil +} + +func attachRootRole(u User) User { + inRoles := false + for _, r := range u.Roles { + if r == RootRoleName { + inRoles = true + break + } + } + if !inRoles { + u.Roles = append(u.Roles, RootRoleName) + } + return u +} + +func (s *store) getUser(name string, quorum bool) (User, error) { + resp, err := s.requestResource("/users/"+name, false, quorum) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return User{}, authErr(http.StatusNotFound, "User %s does not exist.", name) + } + } + return User{}, err + } + var u User + err = json.Unmarshal([]byte(*resp.Event.Node.Value), &u) + if err != nil { + return u, err + } + // Attach root role to root user. + if u.User == "root" { + u = attachRootRole(u) + } + return u, nil +} + +func (s *store) getRole(name string, quorum bool) (Role, error) { + if name == RootRoleName { + return rootRole, nil + } + resp, err := s.requestResource("/roles/"+name, false, quorum) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return Role{}, authErr(http.StatusNotFound, "Role %s does not exist.", name) + } + } + return Role{}, err + } + var r Role + err = json.Unmarshal([]byte(*resp.Event.Node.Value), &r) + return r, err +} diff --git a/deps/github.com/coreos/etcd/etcdserver/auth/auth_requests.go b/deps/github.com/coreos/etcd/etcdserver/auth/auth_requests.go new file mode 100644 index 000000000..eec700acc --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/auth/auth_requests.go @@ -0,0 +1,166 @@ +// Copyright 2015 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. + +package auth + +import ( + "encoding/json" + "path" + + etcderr "github.com/coreos/etcd/error" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/etcdserverpb" + "golang.org/x/net/context" +) + +func (s *store) ensureAuthDirectories() error { + if s.ensuredOnce { + return nil + } + for _, res := range []string{StorePermsPrefix, StorePermsPrefix + "/users/", StorePermsPrefix + "/roles/"} { + ctx, cancel := context.WithTimeout(context.Background(), s.timeout) + defer cancel() + pe := false + rr := etcdserverpb.Request{ + Method: "PUT", + Path: res, + Dir: true, + PrevExist: &pe, + } + _, err := s.server.Do(ctx, rr) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeNodeExist { + continue + } + } + plog.Errorf("failed to create auth directories in the store (%v)", err) + return err + } + } + ctx, cancel := context.WithTimeout(context.Background(), s.timeout) + defer cancel() + pe := false + rr := etcdserverpb.Request{ + Method: "PUT", + Path: StorePermsPrefix + "/enabled", + Val: "false", + PrevExist: &pe, + } + _, err := s.server.Do(ctx, rr) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeNodeExist { + s.ensuredOnce = true + return nil + } + } + return err + } + s.ensuredOnce = true + return nil +} + +func (s *store) enableAuth() error { + _, err := s.updateResource("/enabled", true) + return err +} +func (s *store) disableAuth() error { + _, err := s.updateResource("/enabled", false) + return err +} + +func (s *store) detectAuth() bool { + if s.server == nil { + return false + } + value, err := s.requestResource("/enabled", false, false) + if err != nil { + if e, ok := err.(*etcderr.Error); ok { + if e.ErrorCode == etcderr.EcodeKeyNotFound { + return false + } + } + plog.Errorf("failed to detect auth settings (%s)", err) + return false + } + + var u bool + err = json.Unmarshal([]byte(*value.Event.Node.Value), &u) + if err != nil { + plog.Errorf("internal bookkeeping value for enabled isn't valid JSON (%v)", err) + return false + } + return u +} + +func (s *store) requestResource(res string, dir, quorum bool) (etcdserver.Response, error) { + ctx, cancel := context.WithTimeout(context.Background(), s.timeout) + defer cancel() + p := path.Join(StorePermsPrefix, res) + method := "GET" + if quorum { + method = "QGET" + } + rr := etcdserverpb.Request{ + Method: method, + Path: p, + Dir: dir, + } + return s.server.Do(ctx, rr) +} + +func (s *store) updateResource(res string, value interface{}) (etcdserver.Response, error) { + return s.setResource(res, value, true) +} +func (s *store) createResource(res string, value interface{}) (etcdserver.Response, error) { + return s.setResource(res, value, false) +} +func (s *store) setResource(res string, value interface{}, prevexist bool) (etcdserver.Response, error) { + err := s.ensureAuthDirectories() + if err != nil { + return etcdserver.Response{}, err + } + ctx, cancel := context.WithTimeout(context.Background(), s.timeout) + defer cancel() + data, err := json.Marshal(value) + if err != nil { + return etcdserver.Response{}, err + } + p := path.Join(StorePermsPrefix, res) + rr := etcdserverpb.Request{ + Method: "PUT", + Path: p, + Val: string(data), + PrevExist: &prevexist, + } + return s.server.Do(ctx, rr) +} + +func (s *store) deleteResource(res string) (etcdserver.Response, error) { + err := s.ensureAuthDirectories() + if err != nil { + return etcdserver.Response{}, err + } + ctx, cancel := context.WithTimeout(context.Background(), s.timeout) + defer cancel() + pex := true + p := path.Join(StorePermsPrefix, res) + rr := etcdserverpb.Request{ + Method: "DELETE", + Path: p, + PrevExist: &pex, + } + return s.server.Do(ctx, rr) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/backend.go b/deps/github.com/coreos/etcd/etcdserver/backend.go new file mode 100644 index 000000000..c5e2dabf3 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/backend.go @@ -0,0 +1,81 @@ +// Copyright 2017 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. + +package etcdserver + +import ( + "fmt" + "os" + "time" + + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/snap" +) + +func newBackend(cfg *ServerConfig) backend.Backend { + bcfg := backend.DefaultBackendConfig() + bcfg.Path = cfg.backendPath() + if cfg.QuotaBackendBytes > 0 && cfg.QuotaBackendBytes != DefaultQuotaBytes { + // permit 10% excess over quota for disarm + bcfg.MmapSize = uint64(cfg.QuotaBackendBytes + cfg.QuotaBackendBytes/10) + } + return backend.New(bcfg) +} + +// openSnapshotBackend renames a snapshot db to the current etcd db and opens it. +func openSnapshotBackend(cfg *ServerConfig, ss *snap.Snapshotter, snapshot raftpb.Snapshot) (backend.Backend, error) { + snapPath, err := ss.DBFilePath(snapshot.Metadata.Index) + if err != nil { + return nil, fmt.Errorf("database snapshot file path error: %v", err) + } + if err := os.Rename(snapPath, cfg.backendPath()); err != nil { + return nil, fmt.Errorf("rename snapshot file error: %v", err) + } + return openBackend(cfg), nil +} + +// openBackend returns a backend using the current etcd db. +func openBackend(cfg *ServerConfig) backend.Backend { + fn := cfg.backendPath() + beOpened := make(chan backend.Backend) + go func() { + beOpened <- newBackend(cfg) + }() + select { + case be := <-beOpened: + return be + case <-time.After(time.Second): + plog.Warningf("another etcd process is using %q and holds the file lock.", fn) + plog.Warningf("waiting for it to exit before starting...") + } + return <-beOpened +} + +// recoverBackendSnapshot recovers the DB from a snapshot in case etcd crashes +// before updating the backend db after persisting raft snapshot to disk, +// violating the invariant snapshot.Metadata.Index < db.consistentIndex. In this +// case, replace the db with the snapshot db sent by the leader. +func recoverSnapshotBackend(cfg *ServerConfig, oldbe backend.Backend, snapshot raftpb.Snapshot) (backend.Backend, error) { + var cIndex consistentIndex + kv := mvcc.New(oldbe, &lease.FakeLessor{}, &cIndex) + defer kv.Close() + if snapshot.Metadata.Index <= kv.ConsistentIndex() { + return oldbe, nil + } + oldbe.Close() + return openSnapshotBackend(cfg, snap.New(cfg.SnapDir()), snapshot) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/cluster_util.go b/deps/github.com/coreos/etcd/etcdserver/cluster_util.go new file mode 100644 index 000000000..f44862a46 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/cluster_util.go @@ -0,0 +1,258 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "sort" + "time" + + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/version" + "github.com/coreos/go-semver/semver" +) + +// isMemberBootstrapped tries to check if the given member has been bootstrapped +// in the given cluster. +func isMemberBootstrapped(cl *membership.RaftCluster, member string, rt http.RoundTripper, timeout time.Duration) bool { + rcl, err := getClusterFromRemotePeers(getRemotePeerURLs(cl, member), timeout, false, rt) + if err != nil { + return false + } + id := cl.MemberByName(member).ID + m := rcl.Member(id) + if m == nil { + return false + } + if len(m.ClientURLs) > 0 { + return true + } + return false +} + +// GetClusterFromRemotePeers takes a set of URLs representing etcd peers, and +// attempts to construct a Cluster by accessing the members endpoint on one of +// these URLs. The first URL to provide a response is used. If no URLs provide +// a response, or a Cluster cannot be successfully created from a received +// response, an error is returned. +// Each request has a 10-second timeout. Because the upper limit of TTL is 5s, +// 10 second is enough for building connection and finishing request. +func GetClusterFromRemotePeers(urls []string, rt http.RoundTripper) (*membership.RaftCluster, error) { + return getClusterFromRemotePeers(urls, 10*time.Second, true, rt) +} + +// If logerr is true, it prints out more error messages. +func getClusterFromRemotePeers(urls []string, timeout time.Duration, logerr bool, rt http.RoundTripper) (*membership.RaftCluster, error) { + cc := &http.Client{ + Transport: rt, + Timeout: timeout, + } + for _, u := range urls { + resp, err := cc.Get(u + "/members") + if err != nil { + if logerr { + plog.Warningf("could not get cluster response from %s: %v", u, err) + } + continue + } + b, err := ioutil.ReadAll(resp.Body) + resp.Body.Close() + if err != nil { + if logerr { + plog.Warningf("could not read the body of cluster response: %v", err) + } + continue + } + var membs []*membership.Member + if err = json.Unmarshal(b, &membs); err != nil { + if logerr { + plog.Warningf("could not unmarshal cluster response: %v", err) + } + continue + } + id, err := types.IDFromString(resp.Header.Get("X-Etcd-Cluster-ID")) + if err != nil { + if logerr { + plog.Warningf("could not parse the cluster ID from cluster res: %v", err) + } + continue + } + + // check the length of membership members + // if the membership members are present then prepare and return raft cluster + // if membership members are not present then the raft cluster formed will be + // an invalid empty cluster hence return failed to get raft cluster member(s) from the given urls error + if len(membs) > 0 { + return membership.NewClusterFromMembers("", id, membs), nil + } + + return nil, fmt.Errorf("failed to get raft cluster member(s) from the given urls.") + } + return nil, fmt.Errorf("could not retrieve cluster information from the given urls") +} + +// getRemotePeerURLs returns peer urls of remote members in the cluster. The +// returned list is sorted in ascending lexicographical order. +func getRemotePeerURLs(cl *membership.RaftCluster, local string) []string { + us := make([]string, 0) + for _, m := range cl.Members() { + if m.Name == local { + continue + } + us = append(us, m.PeerURLs...) + } + sort.Strings(us) + return us +} + +// getVersions returns the versions of the members in the given cluster. +// The key of the returned map is the member's ID. The value of the returned map +// is the semver versions string, including server and cluster. +// If it fails to get the version of a member, the key will be nil. +func getVersions(cl *membership.RaftCluster, local types.ID, rt http.RoundTripper) map[string]*version.Versions { + members := cl.Members() + vers := make(map[string]*version.Versions) + for _, m := range members { + if m.ID == local { + cv := "not_decided" + if cl.Version() != nil { + cv = cl.Version().String() + } + vers[m.ID.String()] = &version.Versions{Server: version.Version, Cluster: cv} + continue + } + ver, err := getVersion(m, rt) + if err != nil { + plog.Warningf("cannot get the version of member %s (%v)", m.ID, err) + vers[m.ID.String()] = nil + } else { + vers[m.ID.String()] = ver + } + } + return vers +} + +// decideClusterVersion decides the cluster version based on the versions map. +// The returned version is the min server version in the map, or nil if the min +// version in unknown. +func decideClusterVersion(vers map[string]*version.Versions) *semver.Version { + var cv *semver.Version + lv := semver.Must(semver.NewVersion(version.Version)) + + for mid, ver := range vers { + if ver == nil { + return nil + } + v, err := semver.NewVersion(ver.Server) + if err != nil { + plog.Errorf("cannot understand the version of member %s (%v)", mid, err) + return nil + } + if lv.LessThan(*v) { + plog.Warningf("the local etcd version %s is not up-to-date", lv.String()) + plog.Warningf("member %s has a higher version %s", mid, ver.Server) + } + if cv == nil { + cv = v + } else if v.LessThan(*cv) { + cv = v + } + } + return cv +} + +// isCompatibleWithCluster return true if the local member has a compatible version with +// the current running cluster. +// The version is considered as compatible when at least one of the other members in the cluster has a +// cluster version in the range of [MinClusterVersion, Version] and no known members has a cluster version +// out of the range. +// We set this rule since when the local member joins, another member might be offline. +func isCompatibleWithCluster(cl *membership.RaftCluster, local types.ID, rt http.RoundTripper) bool { + vers := getVersions(cl, local, rt) + minV := semver.Must(semver.NewVersion(version.MinClusterVersion)) + maxV := semver.Must(semver.NewVersion(version.Version)) + maxV = &semver.Version{ + Major: maxV.Major, + Minor: maxV.Minor, + } + + return isCompatibleWithVers(vers, local, minV, maxV) +} + +func isCompatibleWithVers(vers map[string]*version.Versions, local types.ID, minV, maxV *semver.Version) bool { + var ok bool + for id, v := range vers { + // ignore comparison with local version + if id == local.String() { + continue + } + if v == nil { + continue + } + clusterv, err := semver.NewVersion(v.Cluster) + if err != nil { + plog.Errorf("cannot understand the cluster version of member %s (%v)", id, err) + continue + } + if clusterv.LessThan(*minV) { + plog.Warningf("the running cluster version(%v) is lower than the minimal cluster version(%v) supported", clusterv.String(), minV.String()) + return false + } + if maxV.LessThan(*clusterv) { + plog.Warningf("the running cluster version(%v) is higher than the maximum cluster version(%v) supported", clusterv.String(), maxV.String()) + return false + } + ok = true + } + return ok +} + +// getVersion returns the Versions of the given member via its +// peerURLs. Returns the last error if it fails to get the version. +func getVersion(m *membership.Member, rt http.RoundTripper) (*version.Versions, error) { + cc := &http.Client{ + Transport: rt, + } + var ( + err error + resp *http.Response + ) + + for _, u := range m.PeerURLs { + resp, err = cc.Get(u + "/version") + if err != nil { + plog.Warningf("failed to reach the peerURL(%s) of member %s (%v)", u, m.ID, err) + continue + } + var b []byte + b, err = ioutil.ReadAll(resp.Body) + resp.Body.Close() + if err != nil { + plog.Warningf("failed to read out the response body from the peerURL(%s) of member %s (%v)", u, m.ID, err) + continue + } + var vers version.Versions + if err = json.Unmarshal(b, &vers); err != nil { + plog.Warningf("failed to unmarshal the response body got from the peerURL(%s) of member %s (%v)", u, m.ID, err) + continue + } + return &vers, nil + } + return nil, err +} diff --git a/deps/github.com/coreos/etcd/etcdserver/config.go b/deps/github.com/coreos/etcd/etcdserver/config.go new file mode 100644 index 000000000..ae8a4d08e --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/config.go @@ -0,0 +1,209 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "fmt" + "path/filepath" + "sort" + "strings" + "time" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/pkg/netutil" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" +) + +// ServerConfig holds the configuration of etcd as taken from the command line or discovery. +type ServerConfig struct { + Name string + DiscoveryURL string + DiscoveryProxy string + ClientURLs types.URLs + PeerURLs types.URLs + DataDir string + // DedicatedWALDir config will make the etcd to write the WAL to the WALDir + // rather than the dataDir/member/wal. + DedicatedWALDir string + SnapCount uint64 + MaxSnapFiles uint + MaxWALFiles uint + InitialPeerURLsMap types.URLsMap + InitialClusterToken string + NewCluster bool + ForceNewCluster bool + PeerTLSInfo transport.TLSInfo + + TickMs uint + ElectionTicks int + BootstrapTimeout time.Duration + + AutoCompactionRetention int + QuotaBackendBytes int64 + + // MaxRequestBytes is the maximum request size to send over raft. + MaxRequestBytes uint + + StrictReconfigCheck bool + + // ClientCertAuthEnabled is true when cert has been signed by the client CA. + ClientCertAuthEnabled bool + + AuthToken string + + Debug bool +} + +// VerifyBootstrap sanity-checks the initial config for bootstrap case +// and returns an error for things that should never happen. +func (c *ServerConfig) VerifyBootstrap() error { + if err := c.hasLocalMember(); err != nil { + return err + } + if err := c.advertiseMatchesCluster(); err != nil { + return err + } + if checkDuplicateURL(c.InitialPeerURLsMap) { + return fmt.Errorf("initial cluster %s has duplicate url", c.InitialPeerURLsMap) + } + if c.InitialPeerURLsMap.String() == "" && c.DiscoveryURL == "" { + return fmt.Errorf("initial cluster unset and no discovery URL found") + } + return nil +} + +// VerifyJoinExisting sanity-checks the initial config for join existing cluster +// case and returns an error for things that should never happen. +func (c *ServerConfig) VerifyJoinExisting() error { + // The member has announced its peer urls to the cluster before starting; no need to + // set the configuration again. + if err := c.hasLocalMember(); err != nil { + return err + } + if checkDuplicateURL(c.InitialPeerURLsMap) { + return fmt.Errorf("initial cluster %s has duplicate url", c.InitialPeerURLsMap) + } + if c.DiscoveryURL != "" { + return fmt.Errorf("discovery URL should not be set when joining existing initial cluster") + } + return nil +} + +// hasLocalMember checks that the cluster at least contains the local server. +func (c *ServerConfig) hasLocalMember() error { + if urls := c.InitialPeerURLsMap[c.Name]; urls == nil { + return fmt.Errorf("couldn't find local name %q in the initial cluster configuration", c.Name) + } + return nil +} + +// advertiseMatchesCluster confirms peer URLs match those in the cluster peer list. +func (c *ServerConfig) advertiseMatchesCluster() error { + urls, apurls := c.InitialPeerURLsMap[c.Name], c.PeerURLs.StringSlice() + urls.Sort() + sort.Strings(apurls) + ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) + defer cancel() + if !netutil.URLStringsEqual(ctx, apurls, urls.StringSlice()) { + umap := map[string]types.URLs{c.Name: c.PeerURLs} + return fmt.Errorf("--initial-cluster must include %s given --initial-advertise-peer-urls=%s", types.URLsMap(umap).String(), strings.Join(apurls, ",")) + } + return nil +} + +func (c *ServerConfig) MemberDir() string { return filepath.Join(c.DataDir, "member") } + +func (c *ServerConfig) WALDir() string { + if c.DedicatedWALDir != "" { + return c.DedicatedWALDir + } + return filepath.Join(c.MemberDir(), "wal") +} + +func (c *ServerConfig) SnapDir() string { return filepath.Join(c.MemberDir(), "snap") } + +func (c *ServerConfig) ShouldDiscover() bool { return c.DiscoveryURL != "" } + +// ReqTimeout returns timeout for request to finish. +func (c *ServerConfig) ReqTimeout() time.Duration { + // 5s for queue waiting, computation and disk IO delay + // + 2 * election timeout for possible leader election + return 5*time.Second + 2*time.Duration(c.ElectionTicks)*time.Duration(c.TickMs)*time.Millisecond +} + +func (c *ServerConfig) electionTimeout() time.Duration { + return time.Duration(c.ElectionTicks) * time.Duration(c.TickMs) * time.Millisecond +} + +func (c *ServerConfig) peerDialTimeout() time.Duration { + // 1s for queue wait and system delay + // + one RTT, which is smaller than 1/5 election timeout + return time.Second + time.Duration(c.ElectionTicks)*time.Duration(c.TickMs)*time.Millisecond/5 +} + +func (c *ServerConfig) PrintWithInitial() { c.print(true) } + +func (c *ServerConfig) Print() { c.print(false) } + +func (c *ServerConfig) print(initial bool) { + plog.Infof("name = %s", c.Name) + if c.ForceNewCluster { + plog.Infof("force new cluster") + } + plog.Infof("data dir = %s", c.DataDir) + plog.Infof("member dir = %s", c.MemberDir()) + if c.DedicatedWALDir != "" { + plog.Infof("dedicated WAL dir = %s", c.DedicatedWALDir) + } + plog.Infof("heartbeat = %dms", c.TickMs) + plog.Infof("election = %dms", c.ElectionTicks*int(c.TickMs)) + plog.Infof("snapshot count = %d", c.SnapCount) + if len(c.DiscoveryURL) != 0 { + plog.Infof("discovery URL= %s", c.DiscoveryURL) + if len(c.DiscoveryProxy) != 0 { + plog.Infof("discovery proxy = %s", c.DiscoveryProxy) + } + } + plog.Infof("advertise client URLs = %s", c.ClientURLs) + if initial { + plog.Infof("initial advertise peer URLs = %s", c.PeerURLs) + plog.Infof("initial cluster = %s", c.InitialPeerURLsMap) + } +} + +func checkDuplicateURL(urlsmap types.URLsMap) bool { + um := make(map[string]bool) + for _, urls := range urlsmap { + for _, url := range urls { + u := url.String() + if um[u] { + return true + } + um[u] = true + } + } + return false +} + +func (c *ServerConfig) bootstrapTimeout() time.Duration { + if c.BootstrapTimeout != 0 { + return c.BootstrapTimeout + } + return time.Second +} + +func (c *ServerConfig) backendPath() string { return filepath.Join(c.SnapDir(), "db") } diff --git a/deps/github.com/coreos/etcd/etcdserver/consistent_index.go b/deps/github.com/coreos/etcd/etcdserver/consistent_index.go new file mode 100644 index 000000000..d513f6708 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/consistent_index.go @@ -0,0 +1,33 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "sync/atomic" +) + +// consistentIndex represents the offset of an entry in a consistent replica log. +// It implements the mvcc.ConsistentIndexGetter interface. +// It is always set to the offset of current entry before executing the entry, +// so ConsistentWatchableKV could get the consistent index from it. +type consistentIndex uint64 + +func (i *consistentIndex) setConsistentIndex(v uint64) { + atomic.StoreUint64((*uint64)(i), v) +} + +func (i *consistentIndex) ConsistentIndex() uint64 { + return atomic.LoadUint64((*uint64)(i)) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/doc.go b/deps/github.com/coreos/etcd/etcdserver/doc.go new file mode 100644 index 000000000..b195d2d16 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/doc.go @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +// Package etcdserver defines how etcd servers interact and store their states. +package etcdserver diff --git a/deps/github.com/coreos/etcd/etcdserver/errors.go b/deps/github.com/coreos/etcd/etcdserver/errors.go new file mode 100644 index 000000000..ed749dbe8 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/errors.go @@ -0,0 +1,46 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "errors" + "fmt" +) + +var ( + ErrUnknownMethod = errors.New("etcdserver: unknown method") + ErrStopped = errors.New("etcdserver: server stopped") + ErrCanceled = errors.New("etcdserver: request cancelled") + ErrTimeout = errors.New("etcdserver: request timed out") + ErrTimeoutDueToLeaderFail = errors.New("etcdserver: request timed out, possibly due to previous leader failure") + ErrTimeoutDueToConnectionLost = errors.New("etcdserver: request timed out, possibly due to connection lost") + ErrTimeoutLeaderTransfer = errors.New("etcdserver: request timed out, leader transfer took too long") + ErrNotEnoughStartedMembers = errors.New("etcdserver: re-configuration failed due to not enough started members") + ErrNoLeader = errors.New("etcdserver: no leader") + ErrRequestTooLarge = errors.New("etcdserver: request is too large") + ErrNoSpace = errors.New("etcdserver: no space") + ErrTooManyRequests = errors.New("etcdserver: too many requests") + ErrUnhealthy = errors.New("etcdserver: unhealthy cluster") + ErrKeyNotFound = errors.New("etcdserver: key not found") +) + +type DiscoveryError struct { + Op string + Err error +} + +func (e DiscoveryError) Error() string { + return fmt.Sprintf("failed to %s discovery cluster (%v)", e.Op, e.Err) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/etcdserverpb/gw/rpc.pb.gw.go b/deps/github.com/coreos/etcd/etcdserver/etcdserverpb/gw/rpc.pb.gw.go new file mode 100644 index 000000000..02a23b78c --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/etcdserverpb/gw/rpc.pb.gw.go @@ -0,0 +1,1996 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: etcdserver/etcdserverpb/rpc.proto + +/* +Package etcdserverpb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package gw + +import ( + "github.com/coreos/etcd/etcdserver/etcdserverpb" + "io" + "net/http" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray + +func request_KV_Range_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.KVClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.RangeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Range(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_KV_Put_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.KVClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.PutRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Put(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_KV_DeleteRange_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.KVClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.DeleteRangeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteRange(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_KV_Txn_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.KVClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.TxnRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Txn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_KV_Compact_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.KVClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.CompactionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Compact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Watch_Watch_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.WatchClient, req *http.Request, pathParams map[string]string) (etcdserverpb.Watch_WatchClient, runtime.ServerMetadata, error) { + var metadata runtime.ServerMetadata + stream, err := client.Watch(ctx) + if err != nil { + grpclog.Printf("Failed to start streaming: %v", err) + return nil, metadata, err + } + dec := marshaler.NewDecoder(req.Body) + handleSend := func() error { + var protoReq etcdserverpb.WatchRequest + err = dec.Decode(&protoReq) + if err == io.EOF { + return err + } + if err != nil { + grpclog.Printf("Failed to decode request: %v", err) + return err + } + if err = stream.Send(&protoReq); err != nil { + grpclog.Printf("Failed to send request: %v", err) + return err + } + return nil + } + if err := handleSend(); err != nil { + if cerr := stream.CloseSend(); cerr != nil { + grpclog.Printf("Failed to terminate client stream: %v", cerr) + } + if err == io.EOF { + return stream, metadata, nil + } + return nil, metadata, err + } + go func() { + for { + if err := handleSend(); err != nil { + break + } + } + if err := stream.CloseSend(); err != nil { + grpclog.Printf("Failed to terminate client stream: %v", err) + } + }() + header, err := stream.Header() + if err != nil { + grpclog.Printf("Failed to get header from client: %v", err) + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + +func request_Lease_LeaseGrant_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.LeaseClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.LeaseGrantRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LeaseGrant(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Lease_LeaseRevoke_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.LeaseClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.LeaseRevokeRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LeaseRevoke(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Lease_LeaseKeepAlive_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.LeaseClient, req *http.Request, pathParams map[string]string) (etcdserverpb.Lease_LeaseKeepAliveClient, runtime.ServerMetadata, error) { + var metadata runtime.ServerMetadata + stream, err := client.LeaseKeepAlive(ctx) + if err != nil { + grpclog.Printf("Failed to start streaming: %v", err) + return nil, metadata, err + } + dec := marshaler.NewDecoder(req.Body) + handleSend := func() error { + var protoReq etcdserverpb.LeaseKeepAliveRequest + err = dec.Decode(&protoReq) + if err == io.EOF { + return err + } + if err != nil { + grpclog.Printf("Failed to decode request: %v", err) + return err + } + if err = stream.Send(&protoReq); err != nil { + grpclog.Printf("Failed to send request: %v", err) + return err + } + return nil + } + if err := handleSend(); err != nil { + if cerr := stream.CloseSend(); cerr != nil { + grpclog.Printf("Failed to terminate client stream: %v", cerr) + } + if err == io.EOF { + return stream, metadata, nil + } + return nil, metadata, err + } + go func() { + for { + if err := handleSend(); err != nil { + break + } + } + if err := stream.CloseSend(); err != nil { + grpclog.Printf("Failed to terminate client stream: %v", err) + } + }() + header, err := stream.Header() + if err != nil { + grpclog.Printf("Failed to get header from client: %v", err) + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil +} + +func request_Lease_LeaseTimeToLive_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.LeaseClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.LeaseTimeToLiveRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LeaseTimeToLive(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Cluster_MemberAdd_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.ClusterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.MemberAddRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MemberAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Cluster_MemberRemove_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.ClusterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.MemberRemoveRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MemberRemove(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Cluster_MemberUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.ClusterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.MemberUpdateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MemberUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Cluster_MemberList_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.ClusterClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.MemberListRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MemberList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Maintenance_Alarm_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AlarmRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Alarm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Maintenance_Status_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.StatusRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Maintenance_Defragment_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.DefragmentRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Defragment(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Maintenance_Hash_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.HashRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Hash(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Maintenance_Snapshot_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.MaintenanceClient, req *http.Request, pathParams map[string]string) (etcdserverpb.Maintenance_SnapshotClient, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.SnapshotRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + stream, err := client.Snapshot(ctx, &protoReq) + if err != nil { + return nil, metadata, err + } + header, err := stream.Header() + if err != nil { + return nil, metadata, err + } + metadata.HeaderMD = header + return stream, metadata, nil + +} + +func request_Auth_AuthEnable_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthEnableRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AuthEnable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_AuthDisable_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthDisableRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AuthDisable(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_Authenticate_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthenticateRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Authenticate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_UserAdd_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthUserAddRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UserAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_UserGet_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthUserGetRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UserGet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_UserList_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthUserListRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UserList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_UserDelete_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthUserDeleteRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UserDelete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_UserChangePassword_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthUserChangePasswordRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UserChangePassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_UserGrantRole_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthUserGrantRoleRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UserGrantRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_UserRevokeRole_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthUserRevokeRoleRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UserRevokeRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_RoleAdd_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthRoleAddRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RoleAdd(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_RoleGet_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthRoleGetRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RoleGet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_RoleList_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthRoleListRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RoleList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_RoleDelete_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthRoleDeleteRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RoleDelete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_RoleGrantPermission_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthRoleGrantPermissionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RoleGrantPermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func request_Auth_RoleRevokePermission_0(ctx context.Context, marshaler runtime.Marshaler, client etcdserverpb.AuthClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq etcdserverpb.AuthRoleRevokePermissionRequest + var metadata runtime.ServerMetadata + + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RoleRevokePermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +// RegisterKVHandlerFromEndpoint is same as RegisterKVHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterKVHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterKVHandler(ctx, mux, conn) +} + +// RegisterKVHandler registers the http handlers for service KV to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterKVHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterKVHandlerClient(ctx, mux, etcdserverpb.NewKVClient(conn)) +} + +// RegisterKVHandler registers the http handlers for service KV to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "KVClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KVClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "KVClient" to call the correct interceptors. +func RegisterKVHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.KVClient) error { + + mux.Handle("POST", pattern_KV_Range_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KV_Range_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KV_Range_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KV_Put_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KV_Put_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KV_Put_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KV_DeleteRange_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KV_DeleteRange_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KV_DeleteRange_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KV_Txn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KV_Txn_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KV_Txn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KV_Compact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KV_Compact_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_KV_Compact_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_KV_Range_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "kv", "range"}, "")) + + pattern_KV_Put_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "kv", "put"}, "")) + + pattern_KV_DeleteRange_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "kv", "deleterange"}, "")) + + pattern_KV_Txn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "kv", "txn"}, "")) + + pattern_KV_Compact_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "kv", "compaction"}, "")) +) + +var ( + forward_KV_Range_0 = runtime.ForwardResponseMessage + + forward_KV_Put_0 = runtime.ForwardResponseMessage + + forward_KV_DeleteRange_0 = runtime.ForwardResponseMessage + + forward_KV_Txn_0 = runtime.ForwardResponseMessage + + forward_KV_Compact_0 = runtime.ForwardResponseMessage +) + +// RegisterWatchHandlerFromEndpoint is same as RegisterWatchHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterWatchHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterWatchHandler(ctx, mux, conn) +} + +// RegisterWatchHandler registers the http handlers for service Watch to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWatchHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterWatchHandlerClient(ctx, mux, etcdserverpb.NewWatchClient(conn)) +} + +// RegisterWatchHandler registers the http handlers for service Watch to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "WatchClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WatchClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "WatchClient" to call the correct interceptors. +func RegisterWatchHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.WatchClient) error { + + mux.Handle("POST", pattern_Watch_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Watch_Watch_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Watch_Watch_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Watch_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v3alpha", "watch"}, "")) +) + +var ( + forward_Watch_Watch_0 = runtime.ForwardResponseStream +) + +// RegisterLeaseHandlerFromEndpoint is same as RegisterLeaseHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterLeaseHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterLeaseHandler(ctx, mux, conn) +} + +// RegisterLeaseHandler registers the http handlers for service Lease to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterLeaseHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterLeaseHandlerClient(ctx, mux, etcdserverpb.NewLeaseClient(conn)) +} + +// RegisterLeaseHandler registers the http handlers for service Lease to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "LeaseClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "LeaseClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "LeaseClient" to call the correct interceptors. +func RegisterLeaseHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.LeaseClient) error { + + mux.Handle("POST", pattern_Lease_LeaseGrant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Lease_LeaseGrant_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Lease_LeaseGrant_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Lease_LeaseRevoke_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Lease_LeaseRevoke_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Lease_LeaseRevoke_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Lease_LeaseKeepAlive_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Lease_LeaseKeepAlive_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Lease_LeaseKeepAlive_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Lease_LeaseTimeToLive_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Lease_LeaseTimeToLive_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Lease_LeaseTimeToLive_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Lease_LeaseGrant_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "lease", "grant"}, "")) + + pattern_Lease_LeaseRevoke_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "kv", "lease", "revoke"}, "")) + + pattern_Lease_LeaseKeepAlive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "lease", "keepalive"}, "")) + + pattern_Lease_LeaseTimeToLive_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "kv", "lease", "timetolive"}, "")) +) + +var ( + forward_Lease_LeaseGrant_0 = runtime.ForwardResponseMessage + + forward_Lease_LeaseRevoke_0 = runtime.ForwardResponseMessage + + forward_Lease_LeaseKeepAlive_0 = runtime.ForwardResponseStream + + forward_Lease_LeaseTimeToLive_0 = runtime.ForwardResponseMessage +) + +// RegisterClusterHandlerFromEndpoint is same as RegisterClusterHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterClusterHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterClusterHandler(ctx, mux, conn) +} + +// RegisterClusterHandler registers the http handlers for service Cluster to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterClusterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterClusterHandlerClient(ctx, mux, etcdserverpb.NewClusterClient(conn)) +} + +// RegisterClusterHandler registers the http handlers for service Cluster to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "ClusterClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ClusterClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "ClusterClient" to call the correct interceptors. +func RegisterClusterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.ClusterClient) error { + + mux.Handle("POST", pattern_Cluster_MemberAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cluster_MemberAdd_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cluster_MemberAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Cluster_MemberRemove_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cluster_MemberRemove_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cluster_MemberRemove_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Cluster_MemberUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cluster_MemberUpdate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cluster_MemberUpdate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Cluster_MemberList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Cluster_MemberList_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Cluster_MemberList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Cluster_MemberAdd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "cluster", "member", "add"}, "")) + + pattern_Cluster_MemberRemove_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "cluster", "member", "remove"}, "")) + + pattern_Cluster_MemberUpdate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "cluster", "member", "update"}, "")) + + pattern_Cluster_MemberList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "cluster", "member", "list"}, "")) +) + +var ( + forward_Cluster_MemberAdd_0 = runtime.ForwardResponseMessage + + forward_Cluster_MemberRemove_0 = runtime.ForwardResponseMessage + + forward_Cluster_MemberUpdate_0 = runtime.ForwardResponseMessage + + forward_Cluster_MemberList_0 = runtime.ForwardResponseMessage +) + +// RegisterMaintenanceHandlerFromEndpoint is same as RegisterMaintenanceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMaintenanceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMaintenanceHandler(ctx, mux, conn) +} + +// RegisterMaintenanceHandler registers the http handlers for service Maintenance to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMaintenanceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMaintenanceHandlerClient(ctx, mux, etcdserverpb.NewMaintenanceClient(conn)) +} + +// RegisterMaintenanceHandler registers the http handlers for service Maintenance to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "MaintenanceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MaintenanceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MaintenanceClient" to call the correct interceptors. +func RegisterMaintenanceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.MaintenanceClient) error { + + mux.Handle("POST", pattern_Maintenance_Alarm_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Maintenance_Alarm_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Maintenance_Alarm_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Maintenance_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Maintenance_Status_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Maintenance_Status_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Maintenance_Defragment_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Maintenance_Defragment_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Maintenance_Defragment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Maintenance_Hash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Maintenance_Hash_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Maintenance_Hash_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Maintenance_Snapshot_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Maintenance_Snapshot_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Maintenance_Snapshot_0(ctx, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Maintenance_Alarm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "alarm"}, "")) + + pattern_Maintenance_Status_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "status"}, "")) + + pattern_Maintenance_Defragment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "defragment"}, "")) + + pattern_Maintenance_Hash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "hash"}, "")) + + pattern_Maintenance_Snapshot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "maintenance", "snapshot"}, "")) +) + +var ( + forward_Maintenance_Alarm_0 = runtime.ForwardResponseMessage + + forward_Maintenance_Status_0 = runtime.ForwardResponseMessage + + forward_Maintenance_Defragment_0 = runtime.ForwardResponseMessage + + forward_Maintenance_Hash_0 = runtime.ForwardResponseMessage + + forward_Maintenance_Snapshot_0 = runtime.ForwardResponseStream +) + +// RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Printf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterAuthHandler(ctx, mux, conn) +} + +// RegisterAuthHandler registers the http handlers for service Auth to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAuthHandlerClient(ctx, mux, etcdserverpb.NewAuthClient(conn)) +} + +// RegisterAuthHandler registers the http handlers for service Auth to "mux". +// The handlers forward requests to the grpc endpoint over the given implementation of "AuthClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "AuthClient" to call the correct interceptors. +func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client etcdserverpb.AuthClient) error { + + mux.Handle("POST", pattern_Auth_AuthEnable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_AuthEnable_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_AuthEnable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_AuthDisable_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_AuthDisable_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_AuthDisable_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_Authenticate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_Authenticate_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_Authenticate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_UserAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_UserAdd_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_UserAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_UserGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_UserGet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_UserGet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_UserList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_UserList_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_UserList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_UserDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_UserDelete_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_UserDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_UserChangePassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_UserChangePassword_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_UserChangePassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_UserGrantRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_UserGrantRole_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_UserGrantRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_UserRevokeRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_UserRevokeRole_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_UserRevokeRole_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_RoleAdd_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_RoleAdd_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_RoleAdd_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_RoleGet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_RoleGet_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_RoleGet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_RoleList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_RoleList_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_RoleList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_RoleDelete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_RoleDelete_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_RoleDelete_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_RoleGrantPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_RoleGrantPermission_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_RoleGrantPermission_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Auth_RoleRevokePermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + if cn, ok := w.(http.CloseNotifier); ok { + go func(done <-chan struct{}, closed <-chan bool) { + select { + case <-done: + case <-closed: + cancel() + } + }(ctx.Done(), cn.CloseNotify()) + } + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Auth_RoleRevokePermission_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Auth_RoleRevokePermission_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Auth_AuthEnable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "auth", "enable"}, "")) + + pattern_Auth_AuthDisable_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "auth", "disable"}, "")) + + pattern_Auth_Authenticate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v3alpha", "auth", "authenticate"}, "")) + + pattern_Auth_UserAdd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "user", "add"}, "")) + + pattern_Auth_UserGet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "user", "get"}, "")) + + pattern_Auth_UserList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "user", "list"}, "")) + + pattern_Auth_UserDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "user", "delete"}, "")) + + pattern_Auth_UserChangePassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "user", "changepw"}, "")) + + pattern_Auth_UserGrantRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "user", "grant"}, "")) + + pattern_Auth_UserRevokeRole_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "user", "revoke"}, "")) + + pattern_Auth_RoleAdd_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "role", "add"}, "")) + + pattern_Auth_RoleGet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "role", "get"}, "")) + + pattern_Auth_RoleList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "role", "list"}, "")) + + pattern_Auth_RoleDelete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "role", "delete"}, "")) + + pattern_Auth_RoleGrantPermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "role", "grant"}, "")) + + pattern_Auth_RoleRevokePermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v3alpha", "auth", "role", "revoke"}, "")) +) + +var ( + forward_Auth_AuthEnable_0 = runtime.ForwardResponseMessage + + forward_Auth_AuthDisable_0 = runtime.ForwardResponseMessage + + forward_Auth_Authenticate_0 = runtime.ForwardResponseMessage + + forward_Auth_UserAdd_0 = runtime.ForwardResponseMessage + + forward_Auth_UserGet_0 = runtime.ForwardResponseMessage + + forward_Auth_UserList_0 = runtime.ForwardResponseMessage + + forward_Auth_UserDelete_0 = runtime.ForwardResponseMessage + + forward_Auth_UserChangePassword_0 = runtime.ForwardResponseMessage + + forward_Auth_UserGrantRole_0 = runtime.ForwardResponseMessage + + forward_Auth_UserRevokeRole_0 = runtime.ForwardResponseMessage + + forward_Auth_RoleAdd_0 = runtime.ForwardResponseMessage + + forward_Auth_RoleGet_0 = runtime.ForwardResponseMessage + + forward_Auth_RoleList_0 = runtime.ForwardResponseMessage + + forward_Auth_RoleDelete_0 = runtime.ForwardResponseMessage + + forward_Auth_RoleGrantPermission_0 = runtime.ForwardResponseMessage + + forward_Auth_RoleRevokePermission_0 = runtime.ForwardResponseMessage +) diff --git a/deps/github.com/coreos/etcd/etcdserver/membership/cluster.go b/deps/github.com/coreos/etcd/etcdserver/membership/cluster.go new file mode 100644 index 000000000..2330219f1 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/membership/cluster.go @@ -0,0 +1,512 @@ +// Copyright 2015 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. + +package membership + +import ( + "bytes" + "crypto/sha1" + "encoding/binary" + "encoding/json" + "fmt" + "path" + "sort" + "strings" + "sync" + "time" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/pkg/netutil" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/store" + "github.com/coreos/etcd/version" + "github.com/coreos/go-semver/semver" +) + +// RaftCluster is a list of Members that belong to the same raft cluster +type RaftCluster struct { + id types.ID + token string + + store store.Store + be backend.Backend + + sync.Mutex // guards the fields below + version *semver.Version + members map[types.ID]*Member + // removed contains the ids of removed members in the cluster. + // removed id cannot be reused. + removed map[types.ID]bool +} + +func NewClusterFromURLsMap(token string, urlsmap types.URLsMap) (*RaftCluster, error) { + c := NewCluster(token) + for name, urls := range urlsmap { + m := NewMember(name, urls, token, nil) + if _, ok := c.members[m.ID]; ok { + return nil, fmt.Errorf("member exists with identical ID %v", m) + } + if uint64(m.ID) == raft.None { + return nil, fmt.Errorf("cannot use %x as member id", raft.None) + } + c.members[m.ID] = m + } + c.genID() + return c, nil +} + +func NewClusterFromMembers(token string, id types.ID, membs []*Member) *RaftCluster { + c := NewCluster(token) + c.id = id + for _, m := range membs { + c.members[m.ID] = m + } + return c +} + +func NewCluster(token string) *RaftCluster { + return &RaftCluster{ + token: token, + members: make(map[types.ID]*Member), + removed: make(map[types.ID]bool), + } +} + +func (c *RaftCluster) ID() types.ID { return c.id } + +func (c *RaftCluster) Members() []*Member { + c.Lock() + defer c.Unlock() + var ms MembersByID + for _, m := range c.members { + ms = append(ms, m.Clone()) + } + sort.Sort(ms) + return []*Member(ms) +} + +func (c *RaftCluster) Member(id types.ID) *Member { + c.Lock() + defer c.Unlock() + return c.members[id].Clone() +} + +// MemberByName returns a Member with the given name if exists. +// If more than one member has the given name, it will panic. +func (c *RaftCluster) MemberByName(name string) *Member { + c.Lock() + defer c.Unlock() + var memb *Member + for _, m := range c.members { + if m.Name == name { + if memb != nil { + plog.Panicf("two members with the given name %q exist", name) + } + memb = m + } + } + return memb.Clone() +} + +func (c *RaftCluster) MemberIDs() []types.ID { + c.Lock() + defer c.Unlock() + var ids []types.ID + for _, m := range c.members { + ids = append(ids, m.ID) + } + sort.Sort(types.IDSlice(ids)) + return ids +} + +func (c *RaftCluster) IsIDRemoved(id types.ID) bool { + c.Lock() + defer c.Unlock() + return c.removed[id] +} + +// PeerURLs returns a list of all peer addresses. +// The returned list is sorted in ascending lexicographical order. +func (c *RaftCluster) PeerURLs() []string { + c.Lock() + defer c.Unlock() + urls := make([]string, 0) + for _, p := range c.members { + urls = append(urls, p.PeerURLs...) + } + sort.Strings(urls) + return urls +} + +// ClientURLs returns a list of all client addresses. +// The returned list is sorted in ascending lexicographical order. +func (c *RaftCluster) ClientURLs() []string { + c.Lock() + defer c.Unlock() + urls := make([]string, 0) + for _, p := range c.members { + urls = append(urls, p.ClientURLs...) + } + sort.Strings(urls) + return urls +} + +func (c *RaftCluster) String() string { + c.Lock() + defer c.Unlock() + b := &bytes.Buffer{} + fmt.Fprintf(b, "{ClusterID:%s ", c.id) + var ms []string + for _, m := range c.members { + ms = append(ms, fmt.Sprintf("%+v", m)) + } + fmt.Fprintf(b, "Members:[%s] ", strings.Join(ms, " ")) + var ids []string + for id := range c.removed { + ids = append(ids, id.String()) + } + fmt.Fprintf(b, "RemovedMemberIDs:[%s]}", strings.Join(ids, " ")) + return b.String() +} + +func (c *RaftCluster) genID() { + mIDs := c.MemberIDs() + b := make([]byte, 8*len(mIDs)) + for i, id := range mIDs { + binary.BigEndian.PutUint64(b[8*i:], uint64(id)) + } + hash := sha1.Sum(b) + c.id = types.ID(binary.BigEndian.Uint64(hash[:8])) +} + +func (c *RaftCluster) SetID(id types.ID) { c.id = id } + +func (c *RaftCluster) SetStore(st store.Store) { c.store = st } + +func (c *RaftCluster) SetBackend(be backend.Backend) { + c.be = be + mustCreateBackendBuckets(c.be) +} + +func (c *RaftCluster) Recover(onSet func(*semver.Version)) { + c.Lock() + defer c.Unlock() + + c.members, c.removed = membersFromStore(c.store) + c.version = clusterVersionFromStore(c.store) + mustDetectDowngrade(c.version) + onSet(c.version) + + for _, m := range c.members { + plog.Infof("added member %s %v to cluster %s from store", m.ID, m.PeerURLs, c.id) + } + if c.version != nil { + plog.Infof("set the cluster version to %v from store", version.Cluster(c.version.String())) + } +} + +// ValidateConfigurationChange takes a proposed ConfChange and +// ensures that it is still valid. +func (c *RaftCluster) ValidateConfigurationChange(cc raftpb.ConfChange) error { + members, removed := membersFromStore(c.store) + id := types.ID(cc.NodeID) + if removed[id] { + return ErrIDRemoved + } + switch cc.Type { + case raftpb.ConfChangeAddNode: + if members[id] != nil { + return ErrIDExists + } + urls := make(map[string]bool) + for _, m := range members { + for _, u := range m.PeerURLs { + urls[u] = true + } + } + m := new(Member) + if err := json.Unmarshal(cc.Context, m); err != nil { + plog.Panicf("unmarshal member should never fail: %v", err) + } + for _, u := range m.PeerURLs { + if urls[u] { + return ErrPeerURLexists + } + } + case raftpb.ConfChangeRemoveNode: + if members[id] == nil { + return ErrIDNotFound + } + case raftpb.ConfChangeUpdateNode: + if members[id] == nil { + return ErrIDNotFound + } + urls := make(map[string]bool) + for _, m := range members { + if m.ID == id { + continue + } + for _, u := range m.PeerURLs { + urls[u] = true + } + } + m := new(Member) + if err := json.Unmarshal(cc.Context, m); err != nil { + plog.Panicf("unmarshal member should never fail: %v", err) + } + for _, u := range m.PeerURLs { + if urls[u] { + return ErrPeerURLexists + } + } + default: + plog.Panicf("ConfChange type should be either AddNode, RemoveNode or UpdateNode") + } + return nil +} + +// AddMember adds a new Member into the cluster, and saves the given member's +// raftAttributes into the store. The given member should have empty attributes. +// A Member with a matching id must not exist. +func (c *RaftCluster) AddMember(m *Member) { + c.Lock() + defer c.Unlock() + if c.store != nil { + mustSaveMemberToStore(c.store, m) + } + if c.be != nil { + mustSaveMemberToBackend(c.be, m) + } + + c.members[m.ID] = m + + plog.Infof("added member %s %v to cluster %s", m.ID, m.PeerURLs, c.id) +} + +// RemoveMember removes a member from the store. +// The given id MUST exist, or the function panics. +func (c *RaftCluster) RemoveMember(id types.ID) { + c.Lock() + defer c.Unlock() + if c.store != nil { + mustDeleteMemberFromStore(c.store, id) + } + if c.be != nil { + mustDeleteMemberFromBackend(c.be, id) + } + + delete(c.members, id) + c.removed[id] = true + + plog.Infof("removed member %s from cluster %s", id, c.id) +} + +func (c *RaftCluster) UpdateAttributes(id types.ID, attr Attributes) { + c.Lock() + defer c.Unlock() + if m, ok := c.members[id]; ok { + m.Attributes = attr + if c.store != nil { + mustUpdateMemberAttrInStore(c.store, m) + } + if c.be != nil { + mustSaveMemberToBackend(c.be, m) + } + return + } + _, ok := c.removed[id] + if !ok { + plog.Panicf("error updating attributes of unknown member %s", id) + } + plog.Warningf("skipped updating attributes of removed member %s", id) +} + +func (c *RaftCluster) UpdateRaftAttributes(id types.ID, raftAttr RaftAttributes) { + c.Lock() + defer c.Unlock() + + c.members[id].RaftAttributes = raftAttr + if c.store != nil { + mustUpdateMemberInStore(c.store, c.members[id]) + } + if c.be != nil { + mustSaveMemberToBackend(c.be, c.members[id]) + } + + plog.Noticef("updated member %s %v in cluster %s", id, raftAttr.PeerURLs, c.id) +} + +func (c *RaftCluster) Version() *semver.Version { + c.Lock() + defer c.Unlock() + if c.version == nil { + return nil + } + return semver.Must(semver.NewVersion(c.version.String())) +} + +func (c *RaftCluster) SetVersion(ver *semver.Version, onSet func(*semver.Version)) { + c.Lock() + defer c.Unlock() + if c.version != nil { + plog.Noticef("updated the cluster version from %v to %v", version.Cluster(c.version.String()), version.Cluster(ver.String())) + } else { + plog.Noticef("set the initial cluster version to %v", version.Cluster(ver.String())) + } + c.version = ver + mustDetectDowngrade(c.version) + if c.store != nil { + mustSaveClusterVersionToStore(c.store, ver) + } + if c.be != nil { + mustSaveClusterVersionToBackend(c.be, ver) + } + onSet(ver) +} + +func (c *RaftCluster) IsReadyToAddNewMember() bool { + nmembers := 1 + nstarted := 0 + + for _, member := range c.members { + if member.IsStarted() { + nstarted++ + } + nmembers++ + } + + if nstarted == 1 && nmembers == 2 { + // a case of adding a new node to 1-member cluster for restoring cluster data + // https://github.com/coreos/etcd/blob/master/Documentation/v2/admin_guide.md#restoring-the-cluster + + plog.Debugf("The number of started member is 1. This cluster can accept add member request.") + return true + } + + nquorum := nmembers/2 + 1 + if nstarted < nquorum { + plog.Warningf("Reject add member request: the number of started member (%d) will be less than the quorum number of the cluster (%d)", nstarted, nquorum) + return false + } + + return true +} + +func (c *RaftCluster) IsReadyToRemoveMember(id uint64) bool { + nmembers := 0 + nstarted := 0 + + for _, member := range c.members { + if uint64(member.ID) == id { + continue + } + + if member.IsStarted() { + nstarted++ + } + nmembers++ + } + + nquorum := nmembers/2 + 1 + if nstarted < nquorum { + plog.Warningf("Reject remove member request: the number of started member (%d) will be less than the quorum number of the cluster (%d)", nstarted, nquorum) + return false + } + + return true +} + +func membersFromStore(st store.Store) (map[types.ID]*Member, map[types.ID]bool) { + members := make(map[types.ID]*Member) + removed := make(map[types.ID]bool) + e, err := st.Get(StoreMembersPrefix, true, true) + if err != nil { + if isKeyNotFound(err) { + return members, removed + } + plog.Panicf("get storeMembers should never fail: %v", err) + } + for _, n := range e.Node.Nodes { + var m *Member + m, err = nodeToMember(n) + if err != nil { + plog.Panicf("nodeToMember should never fail: %v", err) + } + members[m.ID] = m + } + + e, err = st.Get(storeRemovedMembersPrefix, true, true) + if err != nil { + if isKeyNotFound(err) { + return members, removed + } + plog.Panicf("get storeRemovedMembers should never fail: %v", err) + } + for _, n := range e.Node.Nodes { + removed[MustParseMemberIDFromKey(n.Key)] = true + } + return members, removed +} + +func clusterVersionFromStore(st store.Store) *semver.Version { + e, err := st.Get(path.Join(storePrefix, "version"), false, false) + if err != nil { + if isKeyNotFound(err) { + return nil + } + plog.Panicf("unexpected error (%v) when getting cluster version from store", err) + } + return semver.Must(semver.NewVersion(*e.Node.Value)) +} + +// ValidateClusterAndAssignIDs validates the local cluster by matching the PeerURLs +// with the existing cluster. If the validation succeeds, it assigns the IDs +// from the existing cluster to the local cluster. +// If the validation fails, an error will be returned. +func ValidateClusterAndAssignIDs(local *RaftCluster, existing *RaftCluster) error { + ems := existing.Members() + lms := local.Members() + if len(ems) != len(lms) { + return fmt.Errorf("member count is unequal") + } + sort.Sort(MembersByPeerURLs(ems)) + sort.Sort(MembersByPeerURLs(lms)) + + ctx, cancel := context.WithTimeout(context.TODO(), 30*time.Second) + defer cancel() + for i := range ems { + if !netutil.URLStringsEqual(ctx, ems[i].PeerURLs, lms[i].PeerURLs) { + return fmt.Errorf("unmatched member while checking PeerURLs") + } + lms[i].ID = ems[i].ID + } + local.members = make(map[types.ID]*Member) + for _, m := range lms { + local.members[m.ID] = m + } + return nil +} + +func mustDetectDowngrade(cv *semver.Version) { + lv := semver.Must(semver.NewVersion(version.Version)) + // only keep major.minor version for comparison against cluster version + lv = &semver.Version{Major: lv.Major, Minor: lv.Minor} + if cv != nil && lv.LessThan(*cv) { + plog.Fatalf("cluster cannot be downgraded (current version: %s is lower than determined cluster version: %s).", version.Version, version.Cluster(cv.String())) + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/membership/doc.go b/deps/github.com/coreos/etcd/etcdserver/membership/doc.go new file mode 100644 index 000000000..b07fb2d92 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/membership/doc.go @@ -0,0 +1,16 @@ +// Copyright 2017 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. + +// Package membership describes individual etcd members and clusters of members. +package membership diff --git a/deps/github.com/coreos/etcd/etcdserver/membership/errors.go b/deps/github.com/coreos/etcd/etcdserver/membership/errors.go new file mode 100644 index 000000000..e4d36af25 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/membership/errors.go @@ -0,0 +1,33 @@ +// 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. + +package membership + +import ( + "errors" + + etcdErr "github.com/coreos/etcd/error" +) + +var ( + ErrIDRemoved = errors.New("membership: ID removed") + ErrIDExists = errors.New("membership: ID exists") + ErrIDNotFound = errors.New("membership: ID not found") + ErrPeerURLexists = errors.New("membership: peerURL exists") +) + +func isKeyNotFound(err error) bool { + e, ok := err.(*etcdErr.Error) + return ok && e.ErrorCode == etcdErr.EcodeKeyNotFound +} diff --git a/deps/github.com/coreos/etcd/etcdserver/membership/member.go b/deps/github.com/coreos/etcd/etcdserver/membership/member.go new file mode 100644 index 000000000..6de74d26f --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/membership/member.go @@ -0,0 +1,124 @@ +// Copyright 2015 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. + +package membership + +import ( + "crypto/sha1" + "encoding/binary" + "fmt" + "math/rand" + "sort" + "time" + + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/pkg/capnslog" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/membership") +) + +// RaftAttributes represents the raft related attributes of an etcd member. +type RaftAttributes struct { + // PeerURLs is the list of peers in the raft cluster. + // TODO(philips): ensure these are URLs + PeerURLs []string `json:"peerURLs"` +} + +// Attributes represents all the non-raft related attributes of an etcd member. +type Attributes struct { + Name string `json:"name,omitempty"` + ClientURLs []string `json:"clientURLs,omitempty"` +} + +type Member struct { + ID types.ID `json:"id"` + RaftAttributes + Attributes +} + +// NewMember creates a Member without an ID and generates one based on the +// cluster name, peer URLs, and time. This is used for bootstrapping/adding new member. +func NewMember(name string, peerURLs types.URLs, clusterName string, now *time.Time) *Member { + m := &Member{ + RaftAttributes: RaftAttributes{PeerURLs: peerURLs.StringSlice()}, + Attributes: Attributes{Name: name}, + } + + var b []byte + sort.Strings(m.PeerURLs) + for _, p := range m.PeerURLs { + b = append(b, []byte(p)...) + } + + b = append(b, []byte(clusterName)...) + if now != nil { + b = append(b, []byte(fmt.Sprintf("%d", now.Unix()))...) + } + + hash := sha1.Sum(b) + m.ID = types.ID(binary.BigEndian.Uint64(hash[:8])) + return m +} + +// PickPeerURL chooses a random address from a given Member's PeerURLs. +// It will panic if there is no PeerURLs available in Member. +func (m *Member) PickPeerURL() string { + if len(m.PeerURLs) == 0 { + plog.Panicf("member should always have some peer url") + } + return m.PeerURLs[rand.Intn(len(m.PeerURLs))] +} + +func (m *Member) Clone() *Member { + if m == nil { + return nil + } + mm := &Member{ + ID: m.ID, + Attributes: Attributes{ + Name: m.Name, + }, + } + if m.PeerURLs != nil { + mm.PeerURLs = make([]string, len(m.PeerURLs)) + copy(mm.PeerURLs, m.PeerURLs) + } + if m.ClientURLs != nil { + mm.ClientURLs = make([]string, len(m.ClientURLs)) + copy(mm.ClientURLs, m.ClientURLs) + } + return mm +} + +func (m *Member) IsStarted() bool { + return len(m.Name) != 0 +} + +// MembersByID implements sort by ID interface +type MembersByID []*Member + +func (ms MembersByID) Len() int { return len(ms) } +func (ms MembersByID) Less(i, j int) bool { return ms[i].ID < ms[j].ID } +func (ms MembersByID) Swap(i, j int) { ms[i], ms[j] = ms[j], ms[i] } + +// MembersByPeerURLs implements sort by peer urls interface +type MembersByPeerURLs []*Member + +func (ms MembersByPeerURLs) Len() int { return len(ms) } +func (ms MembersByPeerURLs) Less(i, j int) bool { + return ms[i].PeerURLs[0] < ms[j].PeerURLs[0] +} +func (ms MembersByPeerURLs) Swap(i, j int) { ms[i], ms[j] = ms[j], ms[i] } diff --git a/deps/github.com/coreos/etcd/etcdserver/membership/store.go b/deps/github.com/coreos/etcd/etcdserver/membership/store.go new file mode 100644 index 000000000..d3f8f2474 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/membership/store.go @@ -0,0 +1,193 @@ +// 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. + +package membership + +import ( + "encoding/json" + "fmt" + "path" + + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/store" + + "github.com/coreos/go-semver/semver" +) + +const ( + attributesSuffix = "attributes" + raftAttributesSuffix = "raftAttributes" + + // the prefix for stroing membership related information in store provided by store pkg. + storePrefix = "/0" +) + +var ( + membersBucketName = []byte("members") + membersRemovedBucketName = []byte("members_removed") + clusterBucketName = []byte("cluster") + + StoreMembersPrefix = path.Join(storePrefix, "members") + storeRemovedMembersPrefix = path.Join(storePrefix, "removed_members") +) + +func mustSaveMemberToBackend(be backend.Backend, m *Member) { + mkey := backendMemberKey(m.ID) + mvalue, err := json.Marshal(m) + if err != nil { + plog.Panicf("marshal raftAttributes should never fail: %v", err) + } + + tx := be.BatchTx() + tx.Lock() + tx.UnsafePut(membersBucketName, mkey, mvalue) + tx.Unlock() +} + +func mustDeleteMemberFromBackend(be backend.Backend, id types.ID) { + mkey := backendMemberKey(id) + + tx := be.BatchTx() + tx.Lock() + tx.UnsafeDelete(membersBucketName, mkey) + tx.UnsafePut(membersRemovedBucketName, mkey, []byte("removed")) + tx.Unlock() +} + +func mustSaveClusterVersionToBackend(be backend.Backend, ver *semver.Version) { + ckey := backendClusterVersionKey() + + tx := be.BatchTx() + tx.Lock() + defer tx.Unlock() + tx.UnsafePut(clusterBucketName, ckey, []byte(ver.String())) +} + +func mustSaveMemberToStore(s store.Store, m *Member) { + b, err := json.Marshal(m.RaftAttributes) + if err != nil { + plog.Panicf("marshal raftAttributes should never fail: %v", err) + } + p := path.Join(MemberStoreKey(m.ID), raftAttributesSuffix) + if _, err := s.Create(p, false, string(b), false, store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil { + plog.Panicf("create raftAttributes should never fail: %v", err) + } +} + +func mustDeleteMemberFromStore(s store.Store, id types.ID) { + if _, err := s.Delete(MemberStoreKey(id), true, true); err != nil { + plog.Panicf("delete member should never fail: %v", err) + } + if _, err := s.Create(RemovedMemberStoreKey(id), false, "", false, store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil { + plog.Panicf("create removedMember should never fail: %v", err) + } +} + +func mustUpdateMemberInStore(s store.Store, m *Member) { + b, err := json.Marshal(m.RaftAttributes) + if err != nil { + plog.Panicf("marshal raftAttributes should never fail: %v", err) + } + p := path.Join(MemberStoreKey(m.ID), raftAttributesSuffix) + if _, err := s.Update(p, string(b), store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil { + plog.Panicf("update raftAttributes should never fail: %v", err) + } +} + +func mustUpdateMemberAttrInStore(s store.Store, m *Member) { + b, err := json.Marshal(m.Attributes) + if err != nil { + plog.Panicf("marshal raftAttributes should never fail: %v", err) + } + p := path.Join(MemberStoreKey(m.ID), attributesSuffix) + if _, err := s.Set(p, false, string(b), store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil { + plog.Panicf("update raftAttributes should never fail: %v", err) + } +} + +func mustSaveClusterVersionToStore(s store.Store, ver *semver.Version) { + if _, err := s.Set(StoreClusterVersionKey(), false, ver.String(), store.TTLOptionSet{ExpireTime: store.Permanent}); err != nil { + plog.Panicf("save cluster version should never fail: %v", err) + } +} + +// nodeToMember builds member from a key value node. +// the child nodes of the given node MUST be sorted by key. +func nodeToMember(n *store.NodeExtern) (*Member, error) { + m := &Member{ID: MustParseMemberIDFromKey(n.Key)} + attrs := make(map[string][]byte) + raftAttrKey := path.Join(n.Key, raftAttributesSuffix) + attrKey := path.Join(n.Key, attributesSuffix) + for _, nn := range n.Nodes { + if nn.Key != raftAttrKey && nn.Key != attrKey { + return nil, fmt.Errorf("unknown key %q", nn.Key) + } + attrs[nn.Key] = []byte(*nn.Value) + } + if data := attrs[raftAttrKey]; data != nil { + if err := json.Unmarshal(data, &m.RaftAttributes); err != nil { + return nil, fmt.Errorf("unmarshal raftAttributes error: %v", err) + } + } else { + return nil, fmt.Errorf("raftAttributes key doesn't exist") + } + if data := attrs[attrKey]; data != nil { + if err := json.Unmarshal(data, &m.Attributes); err != nil { + return m, fmt.Errorf("unmarshal attributes error: %v", err) + } + } + return m, nil +} + +func backendMemberKey(id types.ID) []byte { + return []byte(id.String()) +} + +func backendClusterVersionKey() []byte { + return []byte("clusterVersion") +} + +func mustCreateBackendBuckets(be backend.Backend) { + tx := be.BatchTx() + tx.Lock() + defer tx.Unlock() + tx.UnsafeCreateBucket(membersBucketName) + tx.UnsafeCreateBucket(membersRemovedBucketName) + tx.UnsafeCreateBucket(clusterBucketName) +} + +func MemberStoreKey(id types.ID) string { + return path.Join(StoreMembersPrefix, id.String()) +} + +func StoreClusterVersionKey() string { + return path.Join(storePrefix, "version") +} + +func MemberAttributesStorePath(id types.ID) string { + return path.Join(MemberStoreKey(id), attributesSuffix) +} + +func MustParseMemberIDFromKey(key string) types.ID { + id, err := types.IDFromString(path.Base(key)) + if err != nil { + plog.Panicf("unexpected parse member id error: %v", err) + } + return id +} + +func RemovedMemberStoreKey(id types.ID) string { + return path.Join(storeRemovedMembersPrefix, id.String()) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/metrics.go b/deps/github.com/coreos/etcd/etcdserver/metrics.go new file mode 100644 index 000000000..90bbd3632 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/metrics.go @@ -0,0 +1,102 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "time" + + "github.com/coreos/etcd/pkg/runtime" + "github.com/prometheus/client_golang/prometheus" +) + +var ( + hasLeader = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "server", + Name: "has_leader", + Help: "Whether or not a leader exists. 1 is existence, 0 is not.", + }) + leaderChanges = prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "server", + Name: "leader_changes_seen_total", + Help: "The number of leader changes seen.", + }) + proposalsCommitted = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "server", + Name: "proposals_committed_total", + Help: "The total number of consensus proposals committed.", + }) + proposalsApplied = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "server", + Name: "proposals_applied_total", + Help: "The total number of consensus proposals applied.", + }) + proposalsPending = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "server", + Name: "proposals_pending", + Help: "The current number of pending proposals to commit.", + }) + proposalsFailed = prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "server", + Name: "proposals_failed_total", + Help: "The total number of failed proposals seen.", + }) + leaseExpired = prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "server", + Name: "lease_expired_total", + Help: "The total number of expired leases.", + }) +) + +func init() { + prometheus.MustRegister(hasLeader) + prometheus.MustRegister(leaderChanges) + prometheus.MustRegister(proposalsCommitted) + prometheus.MustRegister(proposalsApplied) + prometheus.MustRegister(proposalsPending) + prometheus.MustRegister(proposalsFailed) + prometheus.MustRegister(leaseExpired) +} + +func monitorFileDescriptor(done <-chan struct{}) { + ticker := time.NewTicker(5 * time.Second) + defer ticker.Stop() + for { + used, err := runtime.FDUsage() + if err != nil { + plog.Errorf("cannot monitor file descriptor usage (%v)", err) + return + } + limit, err := runtime.FDLimit() + if err != nil { + plog.Errorf("cannot monitor file descriptor usage (%v)", err) + return + } + if used >= limit/5*4 { + plog.Warningf("80%% of the file descriptor limit is used [used = %d, limit = %d]", used, limit) + } + select { + case <-ticker.C: + case <-done: + return + } + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/quota.go b/deps/github.com/coreos/etcd/etcdserver/quota.go new file mode 100644 index 000000000..87126f156 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/quota.go @@ -0,0 +1,121 @@ +// 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. + +package etcdserver + +import ( + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +const ( + // DefaultQuotaBytes is the number of bytes the backend Size may + // consume before exceeding the space quota. + DefaultQuotaBytes = int64(2 * 1024 * 1024 * 1024) // 2GB + // MaxQuotaBytes is the maximum number of bytes suggested for a backend + // quota. A larger quota may lead to degraded performance. + MaxQuotaBytes = int64(8 * 1024 * 1024 * 1024) // 8GB +) + +// Quota represents an arbitrary quota against arbitrary requests. Each request +// costs some charge; if there is not enough remaining charge, then there are +// too few resources available within the quota to apply the request. +type Quota interface { + // Available judges whether the given request fits within the quota. + Available(req interface{}) bool + // Cost computes the charge against the quota for a given request. + Cost(req interface{}) int + // Remaining is the amount of charge left for the quota. + Remaining() int64 +} + +type passthroughQuota struct{} + +func (*passthroughQuota) Available(interface{}) bool { return true } +func (*passthroughQuota) Cost(interface{}) int { return 0 } +func (*passthroughQuota) Remaining() int64 { return 1 } + +type backendQuota struct { + s *EtcdServer + maxBackendBytes int64 +} + +const ( + // leaseOverhead is an estimate for the cost of storing a lease + leaseOverhead = 64 + // kvOverhead is an estimate for the cost of storing a key's metadata + kvOverhead = 256 +) + +func NewBackendQuota(s *EtcdServer) Quota { + if s.Cfg.QuotaBackendBytes < 0 { + // disable quotas if negative + plog.Warningf("disabling backend quota") + return &passthroughQuota{} + } + if s.Cfg.QuotaBackendBytes == 0 { + // use default size if no quota size given + return &backendQuota{s, DefaultQuotaBytes} + } + if s.Cfg.QuotaBackendBytes > MaxQuotaBytes { + plog.Warningf("backend quota %v exceeds maximum recommended quota %v", s.Cfg.QuotaBackendBytes, MaxQuotaBytes) + } + return &backendQuota{s, s.Cfg.QuotaBackendBytes} +} + +func (b *backendQuota) Available(v interface{}) bool { + // TODO: maybe optimize backend.Size() + return b.s.Backend().Size()+int64(b.Cost(v)) < b.maxBackendBytes +} + +func (b *backendQuota) Cost(v interface{}) int { + switch r := v.(type) { + case *pb.PutRequest: + return costPut(r) + case *pb.TxnRequest: + return costTxn(r) + case *pb.LeaseGrantRequest: + return leaseOverhead + default: + panic("unexpected cost") + } +} + +func costPut(r *pb.PutRequest) int { return kvOverhead + len(r.Key) + len(r.Value) } + +func costTxnReq(u *pb.RequestOp) int { + r := u.GetRequestPut() + if r == nil { + return 0 + } + return costPut(r) +} + +func costTxn(r *pb.TxnRequest) int { + sizeSuccess := 0 + for _, u := range r.Success { + sizeSuccess += costTxnReq(u) + } + sizeFailure := 0 + for _, u := range r.Failure { + sizeFailure += costTxnReq(u) + } + if sizeFailure > sizeSuccess { + return sizeFailure + } + return sizeSuccess +} + +func (b *backendQuota) Remaining() int64 { + return b.maxBackendBytes - b.s.Backend().Size() +} diff --git a/deps/github.com/coreos/etcd/etcdserver/raft.go b/deps/github.com/coreos/etcd/etcdserver/raft.go new file mode 100644 index 000000000..dcb894f82 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/raft.go @@ -0,0 +1,594 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "encoding/json" + "expvar" + "sort" + "sync" + "sync/atomic" + "time" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/pkg/contention" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/rafthttp" + "github.com/coreos/etcd/wal" + "github.com/coreos/etcd/wal/walpb" + "github.com/coreos/pkg/capnslog" +) + +const ( + // Number of entries for slow follower to catch-up after compacting + // the raft storage entries. + // We expect the follower has a millisecond level latency with the leader. + // The max throughput is around 10K. Keep a 5K entries is enough for helping + // follower to catch up. + numberOfCatchUpEntries = 5000 + + // The max throughput of etcd will not exceed 100MB/s (100K * 1KB value). + // Assuming the RTT is around 10ms, 1MB max size is large enough. + maxSizePerMsg = 1 * 1024 * 1024 + // Never overflow the rafthttp buffer, which is 4096. + // TODO: a better const? + maxInflightMsgs = 4096 / 8 +) + +var ( + // protects raftStatus + raftStatusMu sync.Mutex + // indirection for expvar func interface + // expvar panics when publishing duplicate name + // expvar does not support remove a registered name + // so only register a func that calls raftStatus + // and change raftStatus as we need. + raftStatus func() raft.Status +) + +func init() { + raft.SetLogger(capnslog.NewPackageLogger("github.com/coreos/etcd", "raft")) + expvar.Publish("raft.status", expvar.Func(func() interface{} { + raftStatusMu.Lock() + defer raftStatusMu.Unlock() + return raftStatus() + })) +} + +type RaftTimer interface { + Index() uint64 + Term() uint64 +} + +// apply contains entries, snapshot to be applied. Once +// an apply is consumed, the entries will be persisted to +// to raft storage concurrently; the application must read +// raftDone before assuming the raft messages are stable. +type apply struct { + entries []raftpb.Entry + snapshot raftpb.Snapshot + // notifyc synchronizes etcd server applies with the raft node + notifyc chan struct{} +} + +type raftNode struct { + // Cache of the latest raft index and raft term the server has seen. + // These three unit64 fields must be the first elements to keep 64-bit + // alignment for atomic access to the fields. + index uint64 + term uint64 + lead uint64 + + raftNodeConfig + + // a chan to send/receive snapshot + msgSnapC chan raftpb.Message + + // a chan to send out apply + applyc chan apply + + // a chan to send out readState + readStateC chan raft.ReadState + + // utility + ticker *time.Ticker + // contention detectors for raft heartbeat message + td *contention.TimeoutDetector + + stopped chan struct{} + done chan struct{} +} + +type raftNodeConfig struct { + // to check if msg receiver is removed from cluster + isIDRemoved func(id uint64) bool + raft.Node + raftStorage *raft.MemoryStorage + storage Storage + heartbeat time.Duration // for logging + // transport specifies the transport to send and receive msgs to members. + // Sending messages MUST NOT block. It is okay to drop messages, since + // clients should timeout and reissue their messages. + // If transport is nil, server will panic. + transport rafthttp.Transporter +} + +func newRaftNode(cfg raftNodeConfig) *raftNode { + r := &raftNode{ + raftNodeConfig: cfg, + // set up contention detectors for raft heartbeat message. + // expect to send a heartbeat within 2 heartbeat intervals. + td: contention.NewTimeoutDetector(2 * cfg.heartbeat), + readStateC: make(chan raft.ReadState, 1), + msgSnapC: make(chan raftpb.Message, maxInFlightMsgSnap), + applyc: make(chan apply), + stopped: make(chan struct{}), + done: make(chan struct{}), + } + if r.heartbeat == 0 { + r.ticker = &time.Ticker{} + } else { + r.ticker = time.NewTicker(r.heartbeat) + } + return r +} + +// start prepares and starts raftNode in a new goroutine. It is no longer safe +// to modify the fields after it has been started. +func (r *raftNode) start(rh *raftReadyHandler) { + internalTimeout := time.Second + + go func() { + defer r.onStop() + islead := false + + for { + select { + case <-r.ticker.C: + r.Tick() + case rd := <-r.Ready(): + if rd.SoftState != nil { + newLeader := rd.SoftState.Lead != raft.None && atomic.LoadUint64(&r.lead) != rd.SoftState.Lead + if newLeader { + leaderChanges.Inc() + } + + if rd.SoftState.Lead == raft.None { + hasLeader.Set(0) + } else { + hasLeader.Set(1) + } + + atomic.StoreUint64(&r.lead, rd.SoftState.Lead) + islead = rd.RaftState == raft.StateLeader + rh.updateLeadership(newLeader) + r.td.Reset() + } + + if len(rd.ReadStates) != 0 { + select { + case r.readStateC <- rd.ReadStates[len(rd.ReadStates)-1]: + case <-time.After(internalTimeout): + plog.Warningf("timed out sending read state") + case <-r.stopped: + return + } + } + + notifyc := make(chan struct{}, 1) + ap := apply{ + entries: rd.CommittedEntries, + snapshot: rd.Snapshot, + notifyc: notifyc, + } + + updateCommittedIndex(&ap, rh) + + select { + case r.applyc <- ap: + case <-r.stopped: + return + } + + // the leader can write to its disk in parallel with replicating to the followers and them + // writing to their disks. + // For more details, check raft thesis 10.2.1 + if islead { + // gofail: var raftBeforeLeaderSend struct{} + r.transport.Send(r.processMessages(rd.Messages)) + } + + // gofail: var raftBeforeSave struct{} + if err := r.storage.Save(rd.HardState, rd.Entries); err != nil { + plog.Fatalf("raft save state and entries error: %v", err) + } + if !raft.IsEmptyHardState(rd.HardState) { + proposalsCommitted.Set(float64(rd.HardState.Commit)) + } + // gofail: var raftAfterSave struct{} + + if !raft.IsEmptySnap(rd.Snapshot) { + // gofail: var raftBeforeSaveSnap struct{} + if err := r.storage.SaveSnap(rd.Snapshot); err != nil { + plog.Fatalf("raft save snapshot error: %v", err) + } + // etcdserver now claim the snapshot has been persisted onto the disk + notifyc <- struct{}{} + + // gofail: var raftAfterSaveSnap struct{} + r.raftStorage.ApplySnapshot(rd.Snapshot) + plog.Infof("raft applied incoming snapshot at index %d", rd.Snapshot.Metadata.Index) + // gofail: var raftAfterApplySnap struct{} + } + + r.raftStorage.Append(rd.Entries) + + if !islead { + // finish processing incoming messages before we signal raftdone chan + msgs := r.processMessages(rd.Messages) + + // now unblocks 'applyAll' that waits on Raft log disk writes before triggering snapshots + notifyc <- struct{}{} + + // Candidate or follower needs to wait for all pending configuration + // changes to be applied before sending messages. + // Otherwise we might incorrectly count votes (e.g. votes from removed members). + // Also slow machine's follower raft-layer could proceed to become the leader + // on its own single-node cluster, before apply-layer applies the config change. + // We simply wait for ALL pending entries to be applied for now. + // We might improve this later on if it causes unnecessary long blocking issues. + waitApply := false + for _, ent := range rd.CommittedEntries { + if ent.Type == raftpb.EntryConfChange { + waitApply = true + break + } + } + if waitApply { + // blocks until 'applyAll' calls 'applyWait.Trigger' + // to be in sync with scheduled config-change job + // (assume notifyc has cap of 1) + select { + case notifyc <- struct{}{}: + case <-r.stopped: + return + } + } + + // gofail: var raftBeforeFollowerSend struct{} + r.transport.Send(msgs) + } else { + // leader already processed 'MsgSnap' and signaled + notifyc <- struct{}{} + } + + r.Advance() + case <-r.stopped: + return + } + } + }() +} + +func updateCommittedIndex(ap *apply, rh *raftReadyHandler) { + var ci uint64 + if len(ap.entries) != 0 { + ci = ap.entries[len(ap.entries)-1].Index + } + if ap.snapshot.Metadata.Index > ci { + ci = ap.snapshot.Metadata.Index + } + if ci != 0 { + rh.updateCommittedIndex(ci) + } +} + +func (r *raftNode) processMessages(ms []raftpb.Message) []raftpb.Message { + sentAppResp := false + for i := len(ms) - 1; i >= 0; i-- { + if r.isIDRemoved(ms[i].To) { + ms[i].To = 0 + } + + if ms[i].Type == raftpb.MsgAppResp { + if sentAppResp { + ms[i].To = 0 + } else { + sentAppResp = true + } + } + + if ms[i].Type == raftpb.MsgSnap { + // There are two separate data store: the store for v2, and the KV for v3. + // The msgSnap only contains the most recent snapshot of store without KV. + // So we need to redirect the msgSnap to etcd server main loop for merging in the + // current store snapshot and KV snapshot. + select { + case r.msgSnapC <- ms[i]: + default: + // drop msgSnap if the inflight chan if full. + } + ms[i].To = 0 + } + if ms[i].Type == raftpb.MsgHeartbeat { + ok, exceed := r.td.Observe(ms[i].To) + if !ok { + // TODO: limit request rate. + plog.Warningf("failed to send out heartbeat on time (exceeded the %v timeout for %v)", r.heartbeat, exceed) + plog.Warningf("server is likely overloaded") + } + } + } + return ms +} + +func (r *raftNode) apply() chan apply { + return r.applyc +} + +func (r *raftNode) stop() { + r.stopped <- struct{}{} + <-r.done +} + +func (r *raftNode) onStop() { + r.Stop() + r.ticker.Stop() + r.transport.Stop() + if err := r.storage.Close(); err != nil { + plog.Panicf("raft close storage error: %v", err) + } + close(r.done) +} + +// for testing +func (r *raftNode) pauseSending() { + p := r.transport.(rafthttp.Pausable) + p.Pause() +} + +func (r *raftNode) resumeSending() { + p := r.transport.(rafthttp.Pausable) + p.Resume() +} + +// advanceTicksForElection advances ticks to the node for fast election. +// This reduces the time to wait for first leader election if bootstrapping the whole +// cluster, while leaving at least 1 heartbeat for possible existing leader +// to contact it. +func advanceTicksForElection(n raft.Node, electionTicks int) { + for i := 0; i < electionTicks-1; i++ { + n.Tick() + } +} + +func startNode(cfg *ServerConfig, cl *membership.RaftCluster, ids []types.ID) (id types.ID, n raft.Node, s *raft.MemoryStorage, w *wal.WAL) { + var err error + member := cl.MemberByName(cfg.Name) + metadata := pbutil.MustMarshal( + &pb.Metadata{ + NodeID: uint64(member.ID), + ClusterID: uint64(cl.ID()), + }, + ) + if w, err = wal.Create(cfg.WALDir(), metadata); err != nil { + plog.Fatalf("create wal error: %v", err) + } + peers := make([]raft.Peer, len(ids)) + for i, id := range ids { + ctx, err := json.Marshal((*cl).Member(id)) + if err != nil { + plog.Panicf("marshal member should never fail: %v", err) + } + peers[i] = raft.Peer{ID: uint64(id), Context: ctx} + } + id = member.ID + plog.Infof("starting member %s in cluster %s", id, cl.ID()) + s = raft.NewMemoryStorage() + c := &raft.Config{ + ID: uint64(id), + ElectionTick: cfg.ElectionTicks, + HeartbeatTick: 1, + Storage: s, + MaxSizePerMsg: maxSizePerMsg, + MaxInflightMsgs: maxInflightMsgs, + CheckQuorum: true, + } + + n = raft.StartNode(c, peers) + raftStatusMu.Lock() + raftStatus = n.Status + raftStatusMu.Unlock() + advanceTicksForElection(n, c.ElectionTick) + return +} + +func restartNode(cfg *ServerConfig, snapshot *raftpb.Snapshot) (types.ID, *membership.RaftCluster, raft.Node, *raft.MemoryStorage, *wal.WAL) { + var walsnap walpb.Snapshot + if snapshot != nil { + walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term + } + w, id, cid, st, ents := readWAL(cfg.WALDir(), walsnap) + + plog.Infof("restarting member %s in cluster %s at commit index %d", id, cid, st.Commit) + cl := membership.NewCluster("") + cl.SetID(cid) + s := raft.NewMemoryStorage() + if snapshot != nil { + s.ApplySnapshot(*snapshot) + } + s.SetHardState(st) + s.Append(ents) + c := &raft.Config{ + ID: uint64(id), + ElectionTick: cfg.ElectionTicks, + HeartbeatTick: 1, + Storage: s, + MaxSizePerMsg: maxSizePerMsg, + MaxInflightMsgs: maxInflightMsgs, + CheckQuorum: true, + } + + n := raft.RestartNode(c) + raftStatusMu.Lock() + raftStatus = n.Status + raftStatusMu.Unlock() + advanceTicksForElection(n, c.ElectionTick) + return id, cl, n, s, w +} + +func restartAsStandaloneNode(cfg *ServerConfig, snapshot *raftpb.Snapshot) (types.ID, *membership.RaftCluster, raft.Node, *raft.MemoryStorage, *wal.WAL) { + var walsnap walpb.Snapshot + if snapshot != nil { + walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term + } + w, id, cid, st, ents := readWAL(cfg.WALDir(), walsnap) + + // discard the previously uncommitted entries + for i, ent := range ents { + if ent.Index > st.Commit { + plog.Infof("discarding %d uncommitted WAL entries ", len(ents)-i) + ents = ents[:i] + break + } + } + + // force append the configuration change entries + toAppEnts := createConfigChangeEnts(getIDs(snapshot, ents), uint64(id), st.Term, st.Commit) + ents = append(ents, toAppEnts...) + + // force commit newly appended entries + err := w.Save(raftpb.HardState{}, toAppEnts) + if err != nil { + plog.Fatalf("%v", err) + } + if len(ents) != 0 { + st.Commit = ents[len(ents)-1].Index + } + + plog.Printf("forcing restart of member %s in cluster %s at commit index %d", id, cid, st.Commit) + cl := membership.NewCluster("") + cl.SetID(cid) + s := raft.NewMemoryStorage() + if snapshot != nil { + s.ApplySnapshot(*snapshot) + } + s.SetHardState(st) + s.Append(ents) + c := &raft.Config{ + ID: uint64(id), + ElectionTick: cfg.ElectionTicks, + HeartbeatTick: 1, + Storage: s, + MaxSizePerMsg: maxSizePerMsg, + MaxInflightMsgs: maxInflightMsgs, + } + n := raft.RestartNode(c) + raftStatus = n.Status + return id, cl, n, s, w +} + +// getIDs returns an ordered set of IDs included in the given snapshot and +// the entries. The given snapshot/entries can contain two kinds of +// ID-related entry: +// - ConfChangeAddNode, in which case the contained ID will be added into the set. +// - ConfChangeRemoveNode, in which case the contained ID will be removed from the set. +func getIDs(snap *raftpb.Snapshot, ents []raftpb.Entry) []uint64 { + ids := make(map[uint64]bool) + if snap != nil { + for _, id := range snap.Metadata.ConfState.Nodes { + ids[id] = true + } + } + for _, e := range ents { + if e.Type != raftpb.EntryConfChange { + continue + } + var cc raftpb.ConfChange + pbutil.MustUnmarshal(&cc, e.Data) + switch cc.Type { + case raftpb.ConfChangeAddNode: + ids[cc.NodeID] = true + case raftpb.ConfChangeRemoveNode: + delete(ids, cc.NodeID) + case raftpb.ConfChangeUpdateNode: + // do nothing + default: + plog.Panicf("ConfChange Type should be either ConfChangeAddNode or ConfChangeRemoveNode!") + } + } + sids := make(types.Uint64Slice, 0, len(ids)) + for id := range ids { + sids = append(sids, id) + } + sort.Sort(sids) + return []uint64(sids) +} + +// createConfigChangeEnts creates a series of Raft entries (i.e. +// EntryConfChange) to remove the set of given IDs from the cluster. The ID +// `self` is _not_ removed, even if present in the set. +// If `self` is not inside the given ids, it creates a Raft entry to add a +// default member with the given `self`. +func createConfigChangeEnts(ids []uint64, self uint64, term, index uint64) []raftpb.Entry { + ents := make([]raftpb.Entry, 0) + next := index + 1 + found := false + for _, id := range ids { + if id == self { + found = true + continue + } + cc := &raftpb.ConfChange{ + Type: raftpb.ConfChangeRemoveNode, + NodeID: id, + } + e := raftpb.Entry{ + Type: raftpb.EntryConfChange, + Data: pbutil.MustMarshal(cc), + Term: term, + Index: next, + } + ents = append(ents, e) + next++ + } + if !found { + m := membership.Member{ + ID: types.ID(self), + RaftAttributes: membership.RaftAttributes{PeerURLs: []string{"http://localhost:2380"}}, + } + ctx, err := json.Marshal(m) + if err != nil { + plog.Panicf("marshal member should never fail: %v", err) + } + cc := &raftpb.ConfChange{ + Type: raftpb.ConfChangeAddNode, + NodeID: self, + Context: ctx, + } + e := raftpb.Entry{ + Type: raftpb.EntryConfChange, + Data: pbutil.MustMarshal(cc), + Term: term, + Index: next, + } + ents = append(ents, e) + } + return ents +} diff --git a/deps/github.com/coreos/etcd/etcdserver/server.go b/deps/github.com/coreos/etcd/etcdserver/server.go new file mode 100644 index 000000000..271c5e773 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/server.go @@ -0,0 +1,1664 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "encoding/json" + "expvar" + "fmt" + "math" + "math/rand" + "net/http" + "os" + "path" + "regexp" + "sync" + "sync/atomic" + "time" + + "github.com/coreos/etcd/alarm" + "github.com/coreos/etcd/auth" + "github.com/coreos/etcd/compactor" + "github.com/coreos/etcd/discovery" + "github.com/coreos/etcd/etcdserver/api" + "github.com/coreos/etcd/etcdserver/api/v2http/httptypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/etcdserver/stats" + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/pkg/fileutil" + "github.com/coreos/etcd/pkg/idutil" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/pkg/runtime" + "github.com/coreos/etcd/pkg/schedule" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/pkg/wait" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/rafthttp" + "github.com/coreos/etcd/snap" + "github.com/coreos/etcd/store" + "github.com/coreos/etcd/version" + "github.com/coreos/etcd/wal" + "github.com/coreos/go-semver/semver" + "github.com/coreos/pkg/capnslog" + "golang.org/x/net/context" +) + +const ( + DefaultSnapCount = 100000 + + StoreClusterPrefix = "/0" + StoreKeysPrefix = "/1" + + // HealthInterval is the minimum time the cluster should be healthy + // before accepting add member requests. + HealthInterval = 5 * time.Second + + purgeFileInterval = 30 * time.Second + // monitorVersionInterval should be smaller than the timeout + // on the connection. Or we will not be able to reuse the connection + // (since it will timeout). + monitorVersionInterval = rafthttp.ConnWriteTimeout - time.Second + + // max number of in-flight snapshot messages etcdserver allows to have + // This number is more than enough for most clusters with 5 machines. + maxInFlightMsgSnap = 16 + + releaseDelayAfterSnapshot = 30 * time.Second + + // maxPendingRevokes is the maximum number of outstanding expired lease revocations. + maxPendingRevokes = 16 + recommendedMaxRequestBytes = 10 * 1024 * 1024 +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver") + + storeMemberAttributeRegexp = regexp.MustCompile(path.Join(membership.StoreMembersPrefix, "[[:xdigit:]]{1,16}", "attributes")) +) + +func init() { + rand.Seed(time.Now().UnixNano()) + + expvar.Publish( + "file_descriptor_limit", + expvar.Func( + func() interface{} { + n, _ := runtime.FDLimit() + return n + }, + ), + ) +} + +type Response struct { + Event *store.Event + Watcher store.Watcher + err error +} + +type Server interface { + // Start performs any initialization of the Server necessary for it to + // begin serving requests. It must be called before Do or Process. + // Start must be non-blocking; any long-running server functionality + // should be implemented in goroutines. + Start() + // Stop terminates the Server and performs any necessary finalization. + // Do and Process cannot be called after Stop has been invoked. + Stop() + // ID returns the ID of the Server. + ID() types.ID + // Leader returns the ID of the leader Server. + Leader() types.ID + // Do takes a request and attempts to fulfill it, returning a Response. + Do(ctx context.Context, r pb.Request) (Response, error) + // Process takes a raft message and applies it to the server's raft state + // machine, respecting any timeout of the given context. + Process(ctx context.Context, m raftpb.Message) error + // AddMember attempts to add a member into the cluster. It will return + // ErrIDRemoved if member ID is removed from the cluster, or return + // ErrIDExists if member ID exists in the cluster. + AddMember(ctx context.Context, memb membership.Member) ([]*membership.Member, error) + // RemoveMember attempts to remove a member from the cluster. It will + // return ErrIDRemoved if member ID is removed from the cluster, or return + // ErrIDNotFound if member ID is not in the cluster. + RemoveMember(ctx context.Context, id uint64) ([]*membership.Member, error) + + // UpdateMember attempts to update an existing member in the cluster. It will + // return ErrIDNotFound if the member ID does not exist. + UpdateMember(ctx context.Context, updateMemb membership.Member) ([]*membership.Member, error) + + // ClusterVersion is the cluster-wide minimum major.minor version. + // Cluster version is set to the min version that an etcd member is + // compatible with when first bootstrap. + // + // ClusterVersion is nil until the cluster is bootstrapped (has a quorum). + // + // During a rolling upgrades, the ClusterVersion will be updated + // automatically after a sync. (5 second by default) + // + // The API/raft component can utilize ClusterVersion to determine if + // it can accept a client request or a raft RPC. + // NOTE: ClusterVersion might be nil when etcd 2.1 works with etcd 2.0 and + // the leader is etcd 2.0. etcd 2.0 leader will not update clusterVersion since + // this feature is introduced post 2.0. + ClusterVersion() *semver.Version +} + +// EtcdServer is the production implementation of the Server interface +type EtcdServer struct { + // inflightSnapshots holds count the number of snapshots currently inflight. + inflightSnapshots int64 // must use atomic operations to access; keep 64-bit aligned. + appliedIndex uint64 // must use atomic operations to access; keep 64-bit aligned. + committedIndex uint64 // must use atomic operations to access; keep 64-bit aligned. + // consistIndex used to hold the offset of current executing entry + // It is initialized to 0 before executing any entry. + consistIndex consistentIndex // must use atomic operations to access; keep 64-bit aligned. + Cfg *ServerConfig + + readych chan struct{} + r raftNode + + snapCount uint64 + + w wait.Wait + + readMu sync.RWMutex + // read routine notifies etcd server that it waits for reading by sending an empty struct to + // readwaitC + readwaitc chan struct{} + // readNotifier is used to notify the read routine that it can process the request + // when there is no error + readNotifier *notifier + + // stop signals the run goroutine should shutdown. + stop chan struct{} + // stopping is closed by run goroutine on shutdown. + stopping chan struct{} + // done is closed when all goroutines from start() complete. + done chan struct{} + + errorc chan error + id types.ID + attributes membership.Attributes + + cluster *membership.RaftCluster + + store store.Store + snapshotter *snap.Snapshotter + + applyV2 ApplierV2 + + // applyV3 is the applier with auth and quotas + applyV3 applierV3 + // applyV3Base is the core applier without auth or quotas + applyV3Base applierV3 + applyWait wait.WaitTime + + kv mvcc.ConsistentWatchableKV + lessor lease.Lessor + bemu sync.Mutex + be backend.Backend + authStore auth.AuthStore + alarmStore *alarm.AlarmStore + + stats *stats.ServerStats + lstats *stats.LeaderStats + + SyncTicker *time.Ticker + // compactor is used to auto-compact the KV. + compactor *compactor.Periodic + + // peerRt used to send requests (version, lease) to peers. + peerRt http.RoundTripper + reqIDGen *idutil.Generator + + // forceVersionC is used to force the version monitor loop + // to detect the cluster version immediately. + forceVersionC chan struct{} + + // wgMu blocks concurrent waitgroup mutation while server stopping + wgMu sync.RWMutex + // wg is used to wait for the go routines that depends on the server state + // to exit when stopping the server. + wg sync.WaitGroup + + // ctx is used for etcd-initiated requests that may need to be canceled + // on etcd server shutdown. + ctx context.Context + cancel context.CancelFunc + + leadTimeMu sync.RWMutex + leadElectedTime time.Time +} + +// NewServer creates a new EtcdServer from the supplied configuration. The +// configuration is considered static for the lifetime of the EtcdServer. +func NewServer(cfg *ServerConfig) (srv *EtcdServer, err error) { + st := store.New(StoreClusterPrefix, StoreKeysPrefix) + + var ( + w *wal.WAL + n raft.Node + s *raft.MemoryStorage + id types.ID + cl *membership.RaftCluster + ) + + if cfg.MaxRequestBytes > recommendedMaxRequestBytes { + plog.Warningf("MaxRequestBytes %v exceeds maximum recommended size %v", cfg.MaxRequestBytes, recommendedMaxRequestBytes) + } + + if terr := fileutil.TouchDirAll(cfg.DataDir); terr != nil { + return nil, fmt.Errorf("cannot access data directory: %v", terr) + } + + haveWAL := wal.Exist(cfg.WALDir()) + + if err = fileutil.TouchDirAll(cfg.SnapDir()); err != nil { + plog.Fatalf("create snapshot directory error: %v", err) + } + ss := snap.New(cfg.SnapDir()) + + bepath := cfg.backendPath() + beExist := fileutil.Exist(bepath) + be := openBackend(cfg) + + defer func() { + if err != nil { + be.Close() + } + }() + + prt, err := rafthttp.NewRoundTripper(cfg.PeerTLSInfo, cfg.peerDialTimeout()) + if err != nil { + return nil, err + } + var ( + remotes []*membership.Member + snapshot *raftpb.Snapshot + ) + + switch { + case !haveWAL && !cfg.NewCluster: + if err = cfg.VerifyJoinExisting(); err != nil { + return nil, err + } + cl, err = membership.NewClusterFromURLsMap(cfg.InitialClusterToken, cfg.InitialPeerURLsMap) + if err != nil { + return nil, err + } + existingCluster, gerr := GetClusterFromRemotePeers(getRemotePeerURLs(cl, cfg.Name), prt) + if gerr != nil { + return nil, fmt.Errorf("cannot fetch cluster info from peer urls: %v", gerr) + } + if err = membership.ValidateClusterAndAssignIDs(cl, existingCluster); err != nil { + return nil, fmt.Errorf("error validating peerURLs %s: %v", existingCluster, err) + } + if !isCompatibleWithCluster(cl, cl.MemberByName(cfg.Name).ID, prt) { + return nil, fmt.Errorf("incompatible with current running cluster") + } + + remotes = existingCluster.Members() + cl.SetID(existingCluster.ID()) + cl.SetStore(st) + cl.SetBackend(be) + cfg.Print() + id, n, s, w = startNode(cfg, cl, nil) + case !haveWAL && cfg.NewCluster: + if err = cfg.VerifyBootstrap(); err != nil { + return nil, err + } + cl, err = membership.NewClusterFromURLsMap(cfg.InitialClusterToken, cfg.InitialPeerURLsMap) + if err != nil { + return nil, err + } + m := cl.MemberByName(cfg.Name) + if isMemberBootstrapped(cl, cfg.Name, prt, cfg.bootstrapTimeout()) { + return nil, fmt.Errorf("member %s has already been bootstrapped", m.ID) + } + if cfg.ShouldDiscover() { + var str string + str, err = discovery.JoinCluster(cfg.DiscoveryURL, cfg.DiscoveryProxy, m.ID, cfg.InitialPeerURLsMap.String()) + if err != nil { + return nil, &DiscoveryError{Op: "join", Err: err} + } + var urlsmap types.URLsMap + urlsmap, err = types.NewURLsMap(str) + if err != nil { + return nil, err + } + if checkDuplicateURL(urlsmap) { + return nil, fmt.Errorf("discovery cluster %s has duplicate url", urlsmap) + } + if cl, err = membership.NewClusterFromURLsMap(cfg.InitialClusterToken, urlsmap); err != nil { + return nil, err + } + } + cl.SetStore(st) + cl.SetBackend(be) + cfg.PrintWithInitial() + id, n, s, w = startNode(cfg, cl, cl.MemberIDs()) + case haveWAL: + if err = fileutil.IsDirWriteable(cfg.MemberDir()); err != nil { + return nil, fmt.Errorf("cannot write to member directory: %v", err) + } + + if err = fileutil.IsDirWriteable(cfg.WALDir()); err != nil { + return nil, fmt.Errorf("cannot write to WAL directory: %v", err) + } + + if cfg.ShouldDiscover() { + plog.Warningf("discovery token ignored since a cluster has already been initialized. Valid log found at %q", cfg.WALDir()) + } + snapshot, err = ss.Load() + if err != nil && err != snap.ErrNoSnapshot { + return nil, err + } + if snapshot != nil { + if err = st.Recovery(snapshot.Data); err != nil { + plog.Panicf("recovered store from snapshot error: %v", err) + } + plog.Infof("recovered store from snapshot at index %d", snapshot.Metadata.Index) + if be, err = recoverSnapshotBackend(cfg, be, *snapshot); err != nil { + plog.Panicf("recovering backend from snapshot error: %v", err) + } + } + cfg.Print() + if !cfg.ForceNewCluster { + id, cl, n, s, w = restartNode(cfg, snapshot) + } else { + id, cl, n, s, w = restartAsStandaloneNode(cfg, snapshot) + } + cl.SetStore(st) + cl.SetBackend(be) + cl.Recover(api.UpdateCapability) + if cl.Version() != nil && !cl.Version().LessThan(semver.Version{Major: 3}) && !beExist { + os.RemoveAll(bepath) + return nil, fmt.Errorf("database file (%v) of the backend is missing", bepath) + } + default: + return nil, fmt.Errorf("unsupported bootstrap config") + } + + if terr := fileutil.TouchDirAll(cfg.MemberDir()); terr != nil { + return nil, fmt.Errorf("cannot access member directory: %v", terr) + } + + sstats := stats.NewServerStats(cfg.Name, id.String()) + lstats := stats.NewLeaderStats(id.String()) + + heartbeat := time.Duration(cfg.TickMs) * time.Millisecond + srv = &EtcdServer{ + readych: make(chan struct{}), + Cfg: cfg, + snapCount: cfg.SnapCount, + errorc: make(chan error, 1), + store: st, + snapshotter: ss, + r: *newRaftNode( + raftNodeConfig{ + isIDRemoved: func(id uint64) bool { return cl.IsIDRemoved(types.ID(id)) }, + Node: n, + heartbeat: heartbeat, + raftStorage: s, + storage: NewStorage(w, ss), + }, + ), + id: id, + attributes: membership.Attributes{Name: cfg.Name, ClientURLs: cfg.ClientURLs.StringSlice()}, + cluster: cl, + stats: sstats, + lstats: lstats, + SyncTicker: time.NewTicker(500 * time.Millisecond), + peerRt: prt, + reqIDGen: idutil.NewGenerator(uint16(id), time.Now()), + forceVersionC: make(chan struct{}), + } + + srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster} + + srv.be = be + minTTL := time.Duration((3*cfg.ElectionTicks)/2) * heartbeat + + // always recover lessor before kv. When we recover the mvcc.KV it will reattach keys to its leases. + // If we recover mvcc.KV first, it will attach the keys to the wrong lessor before it recovers. + srv.lessor = lease.NewLessor(srv.be, int64(math.Ceil(minTTL.Seconds()))) + srv.kv = mvcc.New(srv.be, srv.lessor, &srv.consistIndex) + if beExist { + kvindex := srv.kv.ConsistentIndex() + // TODO: remove kvindex != 0 checking when we do not expect users to upgrade + // etcd from pre-3.0 release. + if snapshot != nil && kvindex < snapshot.Metadata.Index { + if kvindex != 0 { + return nil, fmt.Errorf("database file (%v index %d) does not match with snapshot (index %d).", bepath, kvindex, snapshot.Metadata.Index) + } + plog.Warningf("consistent index never saved (snapshot index=%d)", snapshot.Metadata.Index) + } + } + newSrv := srv // since srv == nil in defer if srv is returned as nil + defer func() { + // closing backend without first closing kv can cause + // resumed compactions to fail with closed tx errors + if err != nil { + newSrv.kv.Close() + } + }() + + srv.consistIndex.setConsistentIndex(srv.kv.ConsistentIndex()) + tp, err := auth.NewTokenProvider(cfg.AuthToken, + func(index uint64) <-chan struct{} { + return srv.applyWait.Wait(index) + }, + ) + if err != nil { + plog.Errorf("failed to create token provider: %s", err) + return nil, err + } + srv.authStore = auth.NewAuthStore(srv.be, tp) + if h := cfg.AutoCompactionRetention; h != 0 { + srv.compactor = compactor.NewPeriodic(h, srv.kv, srv) + srv.compactor.Run() + } + + srv.applyV3Base = &applierV3backend{srv} + if err = srv.restoreAlarms(); err != nil { + return nil, err + } + + // TODO: move transport initialization near the definition of remote + tr := &rafthttp.Transport{ + TLSInfo: cfg.PeerTLSInfo, + DialTimeout: cfg.peerDialTimeout(), + ID: id, + URLs: cfg.PeerURLs, + ClusterID: cl.ID(), + Raft: srv, + Snapshotter: ss, + ServerStats: sstats, + LeaderStats: lstats, + ErrorC: srv.errorc, + } + if err = tr.Start(); err != nil { + return nil, err + } + // add all remotes into transport + for _, m := range remotes { + if m.ID != id { + tr.AddRemote(m.ID, m.PeerURLs) + } + } + for _, m := range cl.Members() { + if m.ID != id { + tr.AddPeer(m.ID, m.PeerURLs) + } + } + srv.r.transport = tr + + return srv, nil +} + +// Start prepares and starts server in a new goroutine. It is no longer safe to +// modify a server's fields after it has been sent to Start. +// It also starts a goroutine to publish its server information. +func (s *EtcdServer) Start() { + s.start() + s.goAttach(func() { s.publish(s.Cfg.ReqTimeout()) }) + s.goAttach(s.purgeFile) + s.goAttach(func() { monitorFileDescriptor(s.stopping) }) + s.goAttach(s.monitorVersions) + s.goAttach(s.linearizableReadLoop) +} + +// start prepares and starts server in a new goroutine. It is no longer safe to +// modify a server's fields after it has been sent to Start. +// This function is just used for testing. +func (s *EtcdServer) start() { + if s.snapCount == 0 { + plog.Infof("set snapshot count to default %d", DefaultSnapCount) + s.snapCount = DefaultSnapCount + } + s.w = wait.New() + s.applyWait = wait.NewTimeList() + s.done = make(chan struct{}) + s.stop = make(chan struct{}) + s.stopping = make(chan struct{}) + s.ctx, s.cancel = context.WithCancel(context.Background()) + s.readwaitc = make(chan struct{}, 1) + s.readNotifier = newNotifier() + if s.ClusterVersion() != nil { + plog.Infof("starting server... [version: %v, cluster version: %v]", version.Version, version.Cluster(s.ClusterVersion().String())) + } else { + plog.Infof("starting server... [version: %v, cluster version: to_be_decided]", version.Version) + } + // TODO: if this is an empty log, writes all peer infos + // into the first entry + go s.run() +} + +func (s *EtcdServer) purgeFile() { + var serrc, werrc <-chan error + if s.Cfg.MaxSnapFiles > 0 { + serrc = fileutil.PurgeFile(s.Cfg.SnapDir(), "snap", s.Cfg.MaxSnapFiles, purgeFileInterval, s.done) + } + if s.Cfg.MaxWALFiles > 0 { + werrc = fileutil.PurgeFile(s.Cfg.WALDir(), "wal", s.Cfg.MaxWALFiles, purgeFileInterval, s.done) + } + select { + case e := <-werrc: + plog.Fatalf("failed to purge wal file %v", e) + case e := <-serrc: + plog.Fatalf("failed to purge snap file %v", e) + case <-s.stopping: + return + } +} + +func (s *EtcdServer) ID() types.ID { return s.id } + +func (s *EtcdServer) Cluster() *membership.RaftCluster { return s.cluster } + +func (s *EtcdServer) RaftHandler() http.Handler { return s.r.transport.Handler() } + +func (s *EtcdServer) Lessor() lease.Lessor { return s.lessor } + +func (s *EtcdServer) ApplyWait() <-chan struct{} { return s.applyWait.Wait(s.getCommittedIndex()) } + +func (s *EtcdServer) Process(ctx context.Context, m raftpb.Message) error { + if s.cluster.IsIDRemoved(types.ID(m.From)) { + plog.Warningf("reject message from removed member %s", types.ID(m.From).String()) + return httptypes.NewHTTPError(http.StatusForbidden, "cannot process message from removed member") + } + if m.Type == raftpb.MsgApp { + s.stats.RecvAppendReq(types.ID(m.From).String(), m.Size()) + } + return s.r.Step(ctx, m) +} + +func (s *EtcdServer) IsIDRemoved(id uint64) bool { return s.cluster.IsIDRemoved(types.ID(id)) } + +func (s *EtcdServer) ReportUnreachable(id uint64) { s.r.ReportUnreachable(id) } + +// ReportSnapshot reports snapshot sent status to the raft state machine, +// and clears the used snapshot from the snapshot store. +func (s *EtcdServer) ReportSnapshot(id uint64, status raft.SnapshotStatus) { + s.r.ReportSnapshot(id, status) +} + +type etcdProgress struct { + confState raftpb.ConfState + snapi uint64 + appliedt uint64 + appliedi uint64 +} + +// raftReadyHandler contains a set of EtcdServer operations to be called by raftNode, +// and helps decouple state machine logic from Raft algorithms. +// TODO: add a state machine interface to apply the commit entries and do snapshot/recover +type raftReadyHandler struct { + updateLeadership func(newLeader bool) + updateCommittedIndex func(uint64) +} + +func (s *EtcdServer) run() { + sn, err := s.r.raftStorage.Snapshot() + if err != nil { + plog.Panicf("get snapshot from raft storage error: %v", err) + } + + // asynchronously accept apply packets, dispatch progress in-order + sched := schedule.NewFIFOScheduler() + + var ( + smu sync.RWMutex + syncC <-chan time.Time + ) + setSyncC := func(ch <-chan time.Time) { + smu.Lock() + syncC = ch + smu.Unlock() + } + getSyncC := func() (ch <-chan time.Time) { + smu.RLock() + ch = syncC + smu.RUnlock() + return + } + rh := &raftReadyHandler{ + updateLeadership: func(newLeader bool) { + if !s.isLeader() { + if s.lessor != nil { + s.lessor.Demote() + } + if s.compactor != nil { + s.compactor.Pause() + } + setSyncC(nil) + } else { + if newLeader { + t := time.Now() + s.leadTimeMu.Lock() + s.leadElectedTime = t + s.leadTimeMu.Unlock() + } + setSyncC(s.SyncTicker.C) + if s.compactor != nil { + s.compactor.Resume() + } + } + + // TODO: remove the nil checking + // current test utility does not provide the stats + if s.stats != nil { + s.stats.BecomeLeader() + } + }, + updateCommittedIndex: func(ci uint64) { + cci := s.getCommittedIndex() + if ci > cci { + s.setCommittedIndex(ci) + } + }, + } + s.r.start(rh) + + ep := etcdProgress{ + confState: sn.Metadata.ConfState, + snapi: sn.Metadata.Index, + appliedt: sn.Metadata.Term, + appliedi: sn.Metadata.Index, + } + + defer func() { + s.wgMu.Lock() // block concurrent waitgroup adds in goAttach while stopping + close(s.stopping) + s.wgMu.Unlock() + s.cancel() + + sched.Stop() + + // wait for gouroutines before closing raft so wal stays open + s.wg.Wait() + + s.SyncTicker.Stop() + + // must stop raft after scheduler-- etcdserver can leak rafthttp pipelines + // by adding a peer after raft stops the transport + s.r.stop() + + // kv, lessor and backend can be nil if running without v3 enabled + // or running unit tests. + if s.lessor != nil { + s.lessor.Stop() + } + if s.kv != nil { + s.kv.Close() + } + if s.authStore != nil { + s.authStore.Close() + } + if s.be != nil { + s.be.Close() + } + if s.compactor != nil { + s.compactor.Stop() + } + close(s.done) + }() + + var expiredLeaseC <-chan []*lease.Lease + if s.lessor != nil { + expiredLeaseC = s.lessor.ExpiredLeasesC() + } + + for { + select { + case ap := <-s.r.apply(): + f := func(context.Context) { s.applyAll(&ep, &ap) } + sched.Schedule(f) + case leases := <-expiredLeaseC: + s.goAttach(func() { + // Increases throughput of expired leases deletion process through parallelization + c := make(chan struct{}, maxPendingRevokes) + for _, lease := range leases { + select { + case c <- struct{}{}: + case <-s.stopping: + return + } + lid := lease.ID + s.goAttach(func() { + s.LeaseRevoke(s.ctx, &pb.LeaseRevokeRequest{ID: int64(lid)}) + leaseExpired.Inc() + <-c + }) + } + }) + case err := <-s.errorc: + plog.Errorf("%s", err) + plog.Infof("the data-dir used by this member must be removed.") + return + case <-getSyncC(): + if s.store.HasTTLKeys() { + s.sync(s.Cfg.ReqTimeout()) + } + case <-s.stop: + return + } + } +} + +func (s *EtcdServer) applyAll(ep *etcdProgress, apply *apply) { + s.applySnapshot(ep, apply) + st := time.Now() + s.applyEntries(ep, apply) + d := time.Since(st) + entriesNum := len(apply.entries) + if entriesNum != 0 && d > time.Duration(entriesNum)*warnApplyDuration { + plog.Warningf("apply entries took too long [%v for %d entries]", d, len(apply.entries)) + plog.Warningf("avoid queries with large range/delete range!") + } + proposalsApplied.Set(float64(ep.appliedi)) + s.applyWait.Trigger(ep.appliedi) + // wait for the raft routine to finish the disk writes before triggering a + // snapshot. or applied index might be greater than the last index in raft + // storage, since the raft routine might be slower than apply routine. + <-apply.notifyc + + s.triggerSnapshot(ep) + select { + // snapshot requested via send() + case m := <-s.r.msgSnapC: + merged := s.createMergedSnapshotMessage(m, ep.appliedt, ep.appliedi, ep.confState) + s.sendMergedSnap(merged) + default: + } +} + +func (s *EtcdServer) applySnapshot(ep *etcdProgress, apply *apply) { + if raft.IsEmptySnap(apply.snapshot) { + return + } + + plog.Infof("applying snapshot at index %d...", ep.snapi) + defer plog.Infof("finished applying incoming snapshot at index %d", ep.snapi) + + if apply.snapshot.Metadata.Index <= ep.appliedi { + plog.Panicf("snapshot index [%d] should > appliedi[%d] + 1", + apply.snapshot.Metadata.Index, ep.appliedi) + } + + // wait for raftNode to persist snapshot onto the disk + <-apply.notifyc + + newbe, err := openSnapshotBackend(s.Cfg, s.snapshotter, apply.snapshot) + if err != nil { + plog.Panic(err) + } + + // always recover lessor before kv. When we recover the mvcc.KV it will reattach keys to its leases. + // If we recover mvcc.KV first, it will attach the keys to the wrong lessor before it recovers. + if s.lessor != nil { + plog.Info("recovering lessor...") + s.lessor.Recover(newbe, func() lease.TxnDelete { return s.kv.Write() }) + plog.Info("finished recovering lessor") + } + + plog.Info("restoring mvcc store...") + + if err := s.kv.Restore(newbe); err != nil { + plog.Panicf("restore KV error: %v", err) + } + s.consistIndex.setConsistentIndex(s.kv.ConsistentIndex()) + + plog.Info("finished restoring mvcc store") + + // Closing old backend might block until all the txns + // on the backend are finished. + // We do not want to wait on closing the old backend. + s.bemu.Lock() + oldbe := s.be + go func() { + plog.Info("closing old backend...") + defer plog.Info("finished closing old backend") + + if err := oldbe.Close(); err != nil { + plog.Panicf("close backend error: %v", err) + } + }() + + s.be = newbe + s.bemu.Unlock() + + plog.Info("recovering alarms...") + if err := s.restoreAlarms(); err != nil { + plog.Panicf("restore alarms error: %v", err) + } + plog.Info("finished recovering alarms") + + if s.authStore != nil { + plog.Info("recovering auth store...") + s.authStore.Recover(newbe) + plog.Info("finished recovering auth store") + } + + plog.Info("recovering store v2...") + if err := s.store.Recovery(apply.snapshot.Data); err != nil { + plog.Panicf("recovery store error: %v", err) + } + plog.Info("finished recovering store v2") + + s.cluster.SetBackend(s.be) + plog.Info("recovering cluster configuration...") + s.cluster.Recover(api.UpdateCapability) + plog.Info("finished recovering cluster configuration") + + plog.Info("removing old peers from network...") + // recover raft transport + s.r.transport.RemoveAllPeers() + plog.Info("finished removing old peers from network") + + plog.Info("adding peers from new cluster configuration into network...") + for _, m := range s.cluster.Members() { + if m.ID == s.ID() { + continue + } + s.r.transport.AddPeer(m.ID, m.PeerURLs) + } + plog.Info("finished adding peers from new cluster configuration into network...") + + ep.appliedt = apply.snapshot.Metadata.Term + ep.appliedi = apply.snapshot.Metadata.Index + ep.snapi = ep.appliedi + ep.confState = apply.snapshot.Metadata.ConfState +} + +func (s *EtcdServer) applyEntries(ep *etcdProgress, apply *apply) { + if len(apply.entries) == 0 { + return + } + firsti := apply.entries[0].Index + if firsti > ep.appliedi+1 { + plog.Panicf("first index of committed entry[%d] should <= appliedi[%d] + 1", firsti, ep.appliedi) + } + var ents []raftpb.Entry + if ep.appliedi+1-firsti < uint64(len(apply.entries)) { + ents = apply.entries[ep.appliedi+1-firsti:] + } + if len(ents) == 0 { + return + } + var shouldstop bool + if ep.appliedt, ep.appliedi, shouldstop = s.apply(ents, &ep.confState); shouldstop { + go s.stopWithDelay(10*100*time.Millisecond, fmt.Errorf("the member has been permanently removed from the cluster")) + } +} + +func (s *EtcdServer) triggerSnapshot(ep *etcdProgress) { + if ep.appliedi-ep.snapi <= s.snapCount { + return + } + + plog.Infof("start to snapshot (applied: %d, lastsnap: %d)", ep.appliedi, ep.snapi) + s.snapshot(ep.appliedi, ep.confState) + ep.snapi = ep.appliedi +} + +func (s *EtcdServer) isMultiNode() bool { + return s.cluster != nil && len(s.cluster.MemberIDs()) > 1 +} + +func (s *EtcdServer) isLeader() bool { + return uint64(s.ID()) == s.Lead() +} + +// transferLeadership transfers the leader to the given transferee. +// TODO: maybe expose to client? +func (s *EtcdServer) transferLeadership(ctx context.Context, lead, transferee uint64) error { + now := time.Now() + interval := time.Duration(s.Cfg.TickMs) * time.Millisecond + + plog.Infof("%s starts leadership transfer from %s to %s", s.ID(), types.ID(lead), types.ID(transferee)) + s.r.TransferLeadership(ctx, lead, transferee) + for s.Lead() != transferee { + select { + case <-ctx.Done(): // time out + return ErrTimeoutLeaderTransfer + case <-time.After(interval): + } + } + + // TODO: drain all requests, or drop all messages to the old leader + + plog.Infof("%s finished leadership transfer from %s to %s (took %v)", s.ID(), types.ID(lead), types.ID(transferee), time.Since(now)) + return nil +} + +// TransferLeadership transfers the leader to the chosen transferee. +func (s *EtcdServer) TransferLeadership() error { + if !s.isLeader() { + plog.Printf("skipped leadership transfer for stopping non-leader member") + return nil + } + + if !s.isMultiNode() { + plog.Printf("skipped leadership transfer for single member cluster") + return nil + } + + transferee, ok := longestConnected(s.r.transport, s.cluster.MemberIDs()) + if !ok { + return ErrUnhealthy + } + + tm := s.Cfg.ReqTimeout() + ctx, cancel := context.WithTimeout(s.ctx, tm) + err := s.transferLeadership(ctx, s.Lead(), uint64(transferee)) + cancel() + return err +} + +// HardStop stops the server without coordination with other members in the cluster. +func (s *EtcdServer) HardStop() { + select { + case s.stop <- struct{}{}: + case <-s.done: + return + } + <-s.done +} + +// Stop stops the server gracefully, and shuts down the running goroutine. +// Stop should be called after a Start(s), otherwise it will block forever. +// When stopping leader, Stop transfers its leadership to one of its peers +// before stopping the server. +func (s *EtcdServer) Stop() { + if err := s.TransferLeadership(); err != nil { + plog.Warningf("%s failed to transfer leadership (%v)", s.ID(), err) + } + s.HardStop() +} + +// ReadyNotify returns a channel that will be closed when the server +// is ready to serve client requests +func (s *EtcdServer) ReadyNotify() <-chan struct{} { return s.readych } + +func (s *EtcdServer) stopWithDelay(d time.Duration, err error) { + select { + case <-time.After(d): + case <-s.done: + } + select { + case s.errorc <- err: + default: + } +} + +// StopNotify returns a channel that receives a empty struct +// when the server is stopped. +func (s *EtcdServer) StopNotify() <-chan struct{} { return s.done } + +func (s *EtcdServer) SelfStats() []byte { return s.stats.JSON() } + +func (s *EtcdServer) LeaderStats() []byte { + lead := atomic.LoadUint64(&s.r.lead) + if lead != uint64(s.id) { + return nil + } + return s.lstats.JSON() +} + +func (s *EtcdServer) StoreStats() []byte { return s.store.JsonStats() } + +func (s *EtcdServer) checkMembershipOperationPermission(ctx context.Context) error { + if s.authStore == nil { + // In the context of ordinary etcd process, s.authStore will never be nil. + // This branch is for handling cases in server_test.go + return nil + } + + // Note that this permission check is done in the API layer, + // so TOCTOU problem can be caused potentially in a schedule like this: + // update membership with user A -> revoke root role of A -> apply membership change + // in the state machine layer + // However, both of membership change and role management requires the root privilege. + // So careful operation by admins can prevent the problem. + authInfo, err := s.AuthInfoFromCtx(ctx) + if err != nil { + return err + } + + return s.AuthStore().IsAdminPermitted(authInfo) +} + +func (s *EtcdServer) AddMember(ctx context.Context, memb membership.Member) ([]*membership.Member, error) { + if err := s.checkMembershipOperationPermission(ctx); err != nil { + return nil, err + } + + if s.Cfg.StrictReconfigCheck { + // by default StrictReconfigCheck is enabled; reject new members if unhealthy + if !s.cluster.IsReadyToAddNewMember() { + plog.Warningf("not enough started members, rejecting member add %+v", memb) + return nil, ErrNotEnoughStartedMembers + } + if !isConnectedFullySince(s.r.transport, time.Now().Add(-HealthInterval), s.ID(), s.cluster.Members()) { + plog.Warningf("not healthy for reconfigure, rejecting member add %+v", memb) + return nil, ErrUnhealthy + } + } + + // TODO: move Member to protobuf type + b, err := json.Marshal(memb) + if err != nil { + return nil, err + } + cc := raftpb.ConfChange{ + Type: raftpb.ConfChangeAddNode, + NodeID: uint64(memb.ID), + Context: b, + } + return s.configure(ctx, cc) +} + +func (s *EtcdServer) RemoveMember(ctx context.Context, id uint64) ([]*membership.Member, error) { + if err := s.checkMembershipOperationPermission(ctx); err != nil { + return nil, err + } + + // by default StrictReconfigCheck is enabled; reject removal if leads to quorum loss + if err := s.mayRemoveMember(types.ID(id)); err != nil { + return nil, err + } + + cc := raftpb.ConfChange{ + Type: raftpb.ConfChangeRemoveNode, + NodeID: id, + } + return s.configure(ctx, cc) +} + +func (s *EtcdServer) mayRemoveMember(id types.ID) error { + if !s.Cfg.StrictReconfigCheck { + return nil + } + + if !s.cluster.IsReadyToRemoveMember(uint64(id)) { + plog.Warningf("not enough started members, rejecting remove member %s", id) + return ErrNotEnoughStartedMembers + } + + // downed member is safe to remove since it's not part of the active quorum + if t := s.r.transport.ActiveSince(id); id != s.ID() && t.IsZero() { + return nil + } + + // protect quorum if some members are down + m := s.cluster.Members() + active := numConnectedSince(s.r.transport, time.Now().Add(-HealthInterval), s.ID(), m) + if (active - 1) < 1+((len(m)-1)/2) { + plog.Warningf("reconfigure breaks active quorum, rejecting remove member %s", id) + return ErrUnhealthy + } + + return nil +} + +func (s *EtcdServer) UpdateMember(ctx context.Context, memb membership.Member) ([]*membership.Member, error) { + b, merr := json.Marshal(memb) + if merr != nil { + return nil, merr + } + + if err := s.checkMembershipOperationPermission(ctx); err != nil { + return nil, err + } + cc := raftpb.ConfChange{ + Type: raftpb.ConfChangeUpdateNode, + NodeID: uint64(memb.ID), + Context: b, + } + return s.configure(ctx, cc) +} + +// Implement the RaftTimer interface + +func (s *EtcdServer) Index() uint64 { return atomic.LoadUint64(&s.r.index) } + +func (s *EtcdServer) Term() uint64 { return atomic.LoadUint64(&s.r.term) } + +// Lead is only for testing purposes. +// TODO: add Raft server interface to expose raft related info: +// Index, Term, Lead, Committed, Applied, LastIndex, etc. +func (s *EtcdServer) Lead() uint64 { return atomic.LoadUint64(&s.r.lead) } + +func (s *EtcdServer) Leader() types.ID { return types.ID(s.Lead()) } + +type confChangeResponse struct { + membs []*membership.Member + err error +} + +// configure sends a configuration change through consensus and +// then waits for it to be applied to the server. It +// will block until the change is performed or there is an error. +func (s *EtcdServer) configure(ctx context.Context, cc raftpb.ConfChange) ([]*membership.Member, error) { + cc.ID = s.reqIDGen.Next() + ch := s.w.Register(cc.ID) + start := time.Now() + if err := s.r.ProposeConfChange(ctx, cc); err != nil { + s.w.Trigger(cc.ID, nil) + return nil, err + } + select { + case x := <-ch: + if x == nil { + plog.Panicf("configure trigger value should never be nil") + } + resp := x.(*confChangeResponse) + return resp.membs, resp.err + case <-ctx.Done(): + s.w.Trigger(cc.ID, nil) // GC wait + return nil, s.parseProposeCtxErr(ctx.Err(), start) + case <-s.stopping: + return nil, ErrStopped + } +} + +// sync proposes a SYNC request and is non-blocking. +// This makes no guarantee that the request will be proposed or performed. +// The request will be canceled after the given timeout. +func (s *EtcdServer) sync(timeout time.Duration) { + req := pb.Request{ + Method: "SYNC", + ID: s.reqIDGen.Next(), + Time: time.Now().UnixNano(), + } + data := pbutil.MustMarshal(&req) + // There is no promise that node has leader when do SYNC request, + // so it uses goroutine to propose. + ctx, cancel := context.WithTimeout(s.ctx, timeout) + s.goAttach(func() { + s.r.Propose(ctx, data) + cancel() + }) +} + +// publish registers server information into the cluster. The information +// is the JSON representation of this server's member struct, updated with the +// static clientURLs of the server. +// The function keeps attempting to register until it succeeds, +// or its server is stopped. +func (s *EtcdServer) publish(timeout time.Duration) { + b, err := json.Marshal(s.attributes) + if err != nil { + plog.Panicf("json marshal error: %v", err) + return + } + req := pb.Request{ + Method: "PUT", + Path: membership.MemberAttributesStorePath(s.id), + Val: string(b), + } + + for { + ctx, cancel := context.WithTimeout(s.ctx, timeout) + _, err := s.Do(ctx, req) + cancel() + switch err { + case nil: + close(s.readych) + plog.Infof("published %+v to cluster %s", s.attributes, s.cluster.ID()) + return + case ErrStopped: + plog.Infof("aborting publish because server is stopped") + return + default: + plog.Errorf("publish error: %v", err) + } + } +} + +func (s *EtcdServer) sendMergedSnap(merged snap.Message) { + atomic.AddInt64(&s.inflightSnapshots, 1) + + s.r.transport.SendSnapshot(merged) + s.goAttach(func() { + select { + case ok := <-merged.CloseNotify(): + // delay releasing inflight snapshot for another 30 seconds to + // block log compaction. + // If the follower still fails to catch up, it is probably just too slow + // to catch up. We cannot avoid the snapshot cycle anyway. + if ok { + select { + case <-time.After(releaseDelayAfterSnapshot): + case <-s.stopping: + } + } + atomic.AddInt64(&s.inflightSnapshots, -1) + case <-s.stopping: + return + } + }) +} + +// apply takes entries received from Raft (after it has been committed) and +// applies them to the current state of the EtcdServer. +// The given entries should not be empty. +func (s *EtcdServer) apply(es []raftpb.Entry, confState *raftpb.ConfState) (appliedt uint64, appliedi uint64, shouldStop bool) { + for i := range es { + e := es[i] + switch e.Type { + case raftpb.EntryNormal: + s.applyEntryNormal(&e) + case raftpb.EntryConfChange: + // set the consistent index of current executing entry + if e.Index > s.consistIndex.ConsistentIndex() { + s.consistIndex.setConsistentIndex(e.Index) + } + var cc raftpb.ConfChange + pbutil.MustUnmarshal(&cc, e.Data) + removedSelf, err := s.applyConfChange(cc, confState) + s.setAppliedIndex(e.Index) + shouldStop = shouldStop || removedSelf + s.w.Trigger(cc.ID, &confChangeResponse{s.cluster.Members(), err}) + default: + plog.Panicf("entry type should be either EntryNormal or EntryConfChange") + } + atomic.StoreUint64(&s.r.index, e.Index) + atomic.StoreUint64(&s.r.term, e.Term) + appliedt = e.Term + appliedi = e.Index + } + return appliedt, appliedi, shouldStop +} + +// applyEntryNormal apples an EntryNormal type raftpb request to the EtcdServer +func (s *EtcdServer) applyEntryNormal(e *raftpb.Entry) { + shouldApplyV3 := false + if e.Index > s.consistIndex.ConsistentIndex() { + // set the consistent index of current executing entry + s.consistIndex.setConsistentIndex(e.Index) + shouldApplyV3 = true + } + defer s.setAppliedIndex(e.Index) + + // raft state machine may generate noop entry when leader confirmation. + // skip it in advance to avoid some potential bug in the future + if len(e.Data) == 0 { + select { + case s.forceVersionC <- struct{}{}: + default: + } + // promote lessor when the local member is leader and finished + // applying all entries from the last term. + if s.isLeader() { + s.lessor.Promote(s.Cfg.electionTimeout()) + } + return + } + + var raftReq pb.InternalRaftRequest + if !pbutil.MaybeUnmarshal(&raftReq, e.Data) { // backward compatible + var r pb.Request + pbutil.MustUnmarshal(&r, e.Data) + s.w.Trigger(r.ID, s.applyV2Request(&r)) + return + } + if raftReq.V2 != nil { + req := raftReq.V2 + s.w.Trigger(req.ID, s.applyV2Request(req)) + return + } + + // do not re-apply applied entries. + if !shouldApplyV3 { + return + } + + id := raftReq.ID + if id == 0 { + id = raftReq.Header.ID + } + + var ar *applyResult + needResult := s.w.IsRegistered(id) + if needResult || !noSideEffect(&raftReq) { + if !needResult && raftReq.Txn != nil { + removeNeedlessRangeReqs(raftReq.Txn) + } + ar = s.applyV3.Apply(&raftReq) + } + + if ar == nil { + return + } + + if ar.err != ErrNoSpace || len(s.alarmStore.Get(pb.AlarmType_NOSPACE)) > 0 { + s.w.Trigger(id, ar) + return + } + + plog.Errorf("applying raft message exceeded backend quota") + s.goAttach(func() { + a := &pb.AlarmRequest{ + MemberID: uint64(s.ID()), + Action: pb.AlarmRequest_ACTIVATE, + Alarm: pb.AlarmType_NOSPACE, + } + s.raftRequest(s.ctx, pb.InternalRaftRequest{Alarm: a}) + s.w.Trigger(id, ar) + }) +} + +// applyConfChange applies a ConfChange to the server. It is only +// invoked with a ConfChange that has already passed through Raft +func (s *EtcdServer) applyConfChange(cc raftpb.ConfChange, confState *raftpb.ConfState) (bool, error) { + if err := s.cluster.ValidateConfigurationChange(cc); err != nil { + cc.NodeID = raft.None + s.r.ApplyConfChange(cc) + return false, err + } + *confState = *s.r.ApplyConfChange(cc) + switch cc.Type { + case raftpb.ConfChangeAddNode: + m := new(membership.Member) + if err := json.Unmarshal(cc.Context, m); err != nil { + plog.Panicf("unmarshal member should never fail: %v", err) + } + if cc.NodeID != uint64(m.ID) { + plog.Panicf("nodeID should always be equal to member ID") + } + s.cluster.AddMember(m) + if m.ID != s.id { + s.r.transport.AddPeer(m.ID, m.PeerURLs) + } + case raftpb.ConfChangeRemoveNode: + id := types.ID(cc.NodeID) + s.cluster.RemoveMember(id) + if id == s.id { + return true, nil + } + s.r.transport.RemovePeer(id) + case raftpb.ConfChangeUpdateNode: + m := new(membership.Member) + if err := json.Unmarshal(cc.Context, m); err != nil { + plog.Panicf("unmarshal member should never fail: %v", err) + } + if cc.NodeID != uint64(m.ID) { + plog.Panicf("nodeID should always be equal to member ID") + } + s.cluster.UpdateRaftAttributes(m.ID, m.RaftAttributes) + if m.ID != s.id { + s.r.transport.UpdatePeer(m.ID, m.PeerURLs) + } + } + return false, nil +} + +// TODO: non-blocking snapshot +func (s *EtcdServer) snapshot(snapi uint64, confState raftpb.ConfState) { + clone := s.store.Clone() + // commit kv to write metadata (for example: consistent index) to disk. + // KV().commit() updates the consistent index in backend. + // All operations that update consistent index must be called sequentially + // from applyAll function. + // So KV().Commit() cannot run in parallel with apply. It has to be called outside + // the go routine created below. + s.KV().Commit() + + s.goAttach(func() { + d, err := clone.SaveNoCopy() + // TODO: current store will never fail to do a snapshot + // what should we do if the store might fail? + if err != nil { + plog.Panicf("store save should never fail: %v", err) + } + snap, err := s.r.raftStorage.CreateSnapshot(snapi, &confState, d) + if err != nil { + // the snapshot was done asynchronously with the progress of raft. + // raft might have already got a newer snapshot. + if err == raft.ErrSnapOutOfDate { + return + } + plog.Panicf("unexpected create snapshot error %v", err) + } + // SaveSnap saves the snapshot and releases the locked wal files + // to the snapshot index. + if err = s.r.storage.SaveSnap(snap); err != nil { + plog.Fatalf("save snapshot error: %v", err) + } + plog.Infof("saved snapshot at index %d", snap.Metadata.Index) + + // When sending a snapshot, etcd will pause compaction. + // After receives a snapshot, the slow follower needs to get all the entries right after + // the snapshot sent to catch up. If we do not pause compaction, the log entries right after + // the snapshot sent might already be compacted. It happens when the snapshot takes long time + // to send and save. Pausing compaction avoids triggering a snapshot sending cycle. + if atomic.LoadInt64(&s.inflightSnapshots) != 0 { + plog.Infof("skip compaction since there is an inflight snapshot") + return + } + + // keep some in memory log entries for slow followers. + compacti := uint64(1) + if snapi > numberOfCatchUpEntries { + compacti = snapi - numberOfCatchUpEntries + } + err = s.r.raftStorage.Compact(compacti) + if err != nil { + // the compaction was done asynchronously with the progress of raft. + // raft log might already been compact. + if err == raft.ErrCompacted { + return + } + plog.Panicf("unexpected compaction error %v", err) + } + plog.Infof("compacted raft log at %d", compacti) + }) +} + +// CutPeer drops messages to the specified peer. +func (s *EtcdServer) CutPeer(id types.ID) { + tr, ok := s.r.transport.(*rafthttp.Transport) + if ok { + tr.CutPeer(id) + } +} + +// MendPeer recovers the message dropping behavior of the given peer. +func (s *EtcdServer) MendPeer(id types.ID) { + tr, ok := s.r.transport.(*rafthttp.Transport) + if ok { + tr.MendPeer(id) + } +} + +func (s *EtcdServer) PauseSending() { s.r.pauseSending() } + +func (s *EtcdServer) ResumeSending() { s.r.resumeSending() } + +func (s *EtcdServer) ClusterVersion() *semver.Version { + if s.cluster == nil { + return nil + } + return s.cluster.Version() +} + +// monitorVersions checks the member's version every monitorVersionInterval. +// It updates the cluster version if all members agrees on a higher one. +// It prints out log if there is a member with a higher version than the +// local version. +func (s *EtcdServer) monitorVersions() { + for { + select { + case <-s.forceVersionC: + case <-time.After(monitorVersionInterval): + case <-s.stopping: + return + } + + if s.Leader() != s.ID() { + continue + } + + v := decideClusterVersion(getVersions(s.cluster, s.id, s.peerRt)) + if v != nil { + // only keep major.minor version for comparison + v = &semver.Version{ + Major: v.Major, + Minor: v.Minor, + } + } + + // if the current version is nil: + // 1. use the decided version if possible + // 2. or use the min cluster version + if s.cluster.Version() == nil { + verStr := version.MinClusterVersion + if v != nil { + verStr = v.String() + } + s.goAttach(func() { s.updateClusterVersion(verStr) }) + continue + } + + // update cluster version only if the decided version is greater than + // the current cluster version + if v != nil && s.cluster.Version().LessThan(*v) { + s.goAttach(func() { s.updateClusterVersion(v.String()) }) + } + } +} + +func (s *EtcdServer) updateClusterVersion(ver string) { + if s.cluster.Version() == nil { + plog.Infof("setting up the initial cluster version to %s", version.Cluster(ver)) + } else { + plog.Infof("updating the cluster version from %s to %s", version.Cluster(s.cluster.Version().String()), version.Cluster(ver)) + } + req := pb.Request{ + Method: "PUT", + Path: membership.StoreClusterVersionKey(), + Val: ver, + } + ctx, cancel := context.WithTimeout(s.ctx, s.Cfg.ReqTimeout()) + _, err := s.Do(ctx, req) + cancel() + switch err { + case nil: + return + case ErrStopped: + plog.Infof("aborting update cluster version because server is stopped") + return + default: + plog.Errorf("error updating cluster version (%v)", err) + } +} + +func (s *EtcdServer) parseProposeCtxErr(err error, start time.Time) error { + switch err { + case context.Canceled: + return ErrCanceled + case context.DeadlineExceeded: + s.leadTimeMu.RLock() + curLeadElected := s.leadElectedTime + s.leadTimeMu.RUnlock() + prevLeadLost := curLeadElected.Add(-2 * time.Duration(s.Cfg.ElectionTicks) * time.Duration(s.Cfg.TickMs) * time.Millisecond) + if start.After(prevLeadLost) && start.Before(curLeadElected) { + return ErrTimeoutDueToLeaderFail + } + + lead := types.ID(atomic.LoadUint64(&s.r.lead)) + switch lead { + case types.ID(raft.None): + // TODO: return error to specify it happens because the cluster does not have leader now + case s.ID(): + if !isConnectedToQuorumSince(s.r.transport, start, s.ID(), s.cluster.Members()) { + return ErrTimeoutDueToConnectionLost + } + default: + if !isConnectedSince(s.r.transport, start, lead) { + return ErrTimeoutDueToConnectionLost + } + } + + return ErrTimeout + default: + return err + } +} + +func (s *EtcdServer) KV() mvcc.ConsistentWatchableKV { return s.kv } +func (s *EtcdServer) Backend() backend.Backend { + s.bemu.Lock() + defer s.bemu.Unlock() + return s.be +} + +func (s *EtcdServer) AuthStore() auth.AuthStore { return s.authStore } + +func (s *EtcdServer) restoreAlarms() error { + s.applyV3 = s.newApplierV3() + as, err := alarm.NewAlarmStore(s) + if err != nil { + return err + } + s.alarmStore = as + if len(as.Get(pb.AlarmType_NOSPACE)) > 0 { + s.applyV3 = newApplierV3Capped(s.applyV3) + } + return nil +} + +func (s *EtcdServer) getAppliedIndex() uint64 { + return atomic.LoadUint64(&s.appliedIndex) +} + +func (s *EtcdServer) setAppliedIndex(v uint64) { + atomic.StoreUint64(&s.appliedIndex, v) +} + +func (s *EtcdServer) getCommittedIndex() uint64 { + return atomic.LoadUint64(&s.committedIndex) +} + +func (s *EtcdServer) setCommittedIndex(v uint64) { + atomic.StoreUint64(&s.committedIndex, v) +} + +// goAttach creates a goroutine on a given function and tracks it using +// the etcdserver waitgroup. +func (s *EtcdServer) goAttach(f func()) { + s.wgMu.RLock() // this blocks with ongoing close(s.stopping) + defer s.wgMu.RUnlock() + select { + case <-s.stopping: + plog.Warning("server has stopped (skipping goAttach)") + return + default: + } + + // now safe to add since waitgroup wait has not started yet + s.wg.Add(1) + go func() { + defer s.wg.Done() + f() + }() +} diff --git a/deps/github.com/coreos/etcd/etcdserver/snapshot_merge.go b/deps/github.com/coreos/etcd/etcdserver/snapshot_merge.go new file mode 100644 index 000000000..928aa95b6 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/snapshot_merge.go @@ -0,0 +1,73 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "io" + + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/snap" +) + +// createMergedSnapshotMessage creates a snapshot message that contains: raft status (term, conf), +// a snapshot of v2 store inside raft.Snapshot as []byte, a snapshot of v3 KV in the top level message +// as ReadCloser. +func (s *EtcdServer) createMergedSnapshotMessage(m raftpb.Message, snapt, snapi uint64, confState raftpb.ConfState) snap.Message { + // get a snapshot of v2 store as []byte + clone := s.store.Clone() + d, err := clone.SaveNoCopy() + if err != nil { + plog.Panicf("store save should never fail: %v", err) + } + + // commit kv to write metadata(for example: consistent index). + s.KV().Commit() + dbsnap := s.be.Snapshot() + // get a snapshot of v3 KV as readCloser + rc := newSnapshotReaderCloser(dbsnap) + + // put the []byte snapshot of store into raft snapshot and return the merged snapshot with + // KV readCloser snapshot. + snapshot := raftpb.Snapshot{ + Metadata: raftpb.SnapshotMetadata{ + Index: snapi, + Term: snapt, + ConfState: confState, + }, + Data: d, + } + m.Snapshot = snapshot + + return *snap.NewMessage(m, rc, dbsnap.Size()) +} + +func newSnapshotReaderCloser(snapshot backend.Snapshot) io.ReadCloser { + pr, pw := io.Pipe() + go func() { + n, err := snapshot.WriteTo(pw) + if err == nil { + plog.Infof("wrote database snapshot out [total bytes: %d]", n) + } else { + plog.Warningf("failed to write database snapshot out [written bytes: %d]: %v", n, err) + } + pw.CloseWithError(err) + err = snapshot.Close() + if err != nil { + plog.Panicf("failed to close database snapshot: %v", err) + } + }() + return pr +} diff --git a/deps/github.com/coreos/etcd/etcdserver/stats/leader.go b/deps/github.com/coreos/etcd/etcdserver/stats/leader.go new file mode 100644 index 000000000..8f6a54ff7 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/stats/leader.go @@ -0,0 +1,128 @@ +// Copyright 2015 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. + +package stats + +import ( + "encoding/json" + "math" + "sync" + "time" +) + +// LeaderStats is used by the leader in an etcd cluster, and encapsulates +// statistics about communication with its followers +type LeaderStats struct { + leaderStats + sync.Mutex +} + +type leaderStats struct { + // Leader is the ID of the leader in the etcd cluster. + // TODO(jonboulle): clarify that these are IDs, not names + Leader string `json:"leader"` + Followers map[string]*FollowerStats `json:"followers"` +} + +// NewLeaderStats generates a new LeaderStats with the given id as leader +func NewLeaderStats(id string) *LeaderStats { + return &LeaderStats{ + leaderStats: leaderStats{ + Leader: id, + Followers: make(map[string]*FollowerStats), + }, + } +} + +func (ls *LeaderStats) JSON() []byte { + ls.Lock() + stats := ls.leaderStats + ls.Unlock() + b, err := json.Marshal(stats) + // TODO(jonboulle): appropriate error handling? + if err != nil { + plog.Errorf("error marshalling leader stats (%v)", err) + } + return b +} + +func (ls *LeaderStats) Follower(name string) *FollowerStats { + ls.Lock() + defer ls.Unlock() + fs, ok := ls.Followers[name] + if !ok { + fs = &FollowerStats{} + fs.Latency.Minimum = 1 << 63 + ls.Followers[name] = fs + } + return fs +} + +// FollowerStats encapsulates various statistics about a follower in an etcd cluster +type FollowerStats struct { + Latency LatencyStats `json:"latency"` + Counts CountsStats `json:"counts"` + + sync.Mutex +} + +// LatencyStats encapsulates latency statistics. +type LatencyStats struct { + Current float64 `json:"current"` + Average float64 `json:"average"` + averageSquare float64 + StandardDeviation float64 `json:"standardDeviation"` + Minimum float64 `json:"minimum"` + Maximum float64 `json:"maximum"` +} + +// CountsStats encapsulates raft statistics. +type CountsStats struct { + Fail uint64 `json:"fail"` + Success uint64 `json:"success"` +} + +// Succ updates the FollowerStats with a successful send +func (fs *FollowerStats) Succ(d time.Duration) { + fs.Lock() + defer fs.Unlock() + + total := float64(fs.Counts.Success) * fs.Latency.Average + totalSquare := float64(fs.Counts.Success) * fs.Latency.averageSquare + + fs.Counts.Success++ + + fs.Latency.Current = float64(d) / (1000000.0) + + if fs.Latency.Current > fs.Latency.Maximum { + fs.Latency.Maximum = fs.Latency.Current + } + + if fs.Latency.Current < fs.Latency.Minimum { + fs.Latency.Minimum = fs.Latency.Current + } + + fs.Latency.Average = (total + fs.Latency.Current) / float64(fs.Counts.Success) + fs.Latency.averageSquare = (totalSquare + fs.Latency.Current*fs.Latency.Current) / float64(fs.Counts.Success) + + // sdv = sqrt(avg(x^2) - avg(x)^2) + fs.Latency.StandardDeviation = math.Sqrt(fs.Latency.averageSquare - fs.Latency.Average*fs.Latency.Average) +} + +// Fail updates the FollowerStats with an unsuccessful send +func (fs *FollowerStats) Fail() { + fs.Lock() + defer fs.Unlock() + fs.Counts.Fail++ +} diff --git a/deps/github.com/coreos/etcd/etcdserver/stats/queue.go b/deps/github.com/coreos/etcd/etcdserver/stats/queue.go new file mode 100644 index 000000000..635074c48 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/stats/queue.go @@ -0,0 +1,110 @@ +// Copyright 2015 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. + +package stats + +import ( + "sync" + "time" +) + +const ( + queueCapacity = 200 +) + +// RequestStats represent the stats for a request. +// It encapsulates the sending time and the size of the request. +type RequestStats struct { + SendingTime time.Time + Size int +} + +type statsQueue struct { + items [queueCapacity]*RequestStats + size int + front int + back int + totalReqSize int + rwl sync.RWMutex +} + +func (q *statsQueue) Len() int { + return q.size +} + +func (q *statsQueue) ReqSize() int { + return q.totalReqSize +} + +// FrontAndBack gets the front and back elements in the queue +// We must grab front and back together with the protection of the lock +func (q *statsQueue) frontAndBack() (*RequestStats, *RequestStats) { + q.rwl.RLock() + defer q.rwl.RUnlock() + if q.size != 0 { + return q.items[q.front], q.items[q.back] + } + return nil, nil +} + +// Insert function insert a RequestStats into the queue and update the records +func (q *statsQueue) Insert(p *RequestStats) { + q.rwl.Lock() + defer q.rwl.Unlock() + + q.back = (q.back + 1) % queueCapacity + + if q.size == queueCapacity { //dequeue + q.totalReqSize -= q.items[q.front].Size + q.front = (q.back + 1) % queueCapacity + } else { + q.size++ + } + + q.items[q.back] = p + q.totalReqSize += q.items[q.back].Size + +} + +// Rate function returns the package rate and byte rate +func (q *statsQueue) Rate() (float64, float64) { + front, back := q.frontAndBack() + + if front == nil || back == nil { + return 0, 0 + } + + if time.Since(back.SendingTime) > time.Second { + q.Clear() + return 0, 0 + } + + sampleDuration := back.SendingTime.Sub(front.SendingTime) + + pr := float64(q.Len()) / float64(sampleDuration) * float64(time.Second) + + br := float64(q.ReqSize()) / float64(sampleDuration) * float64(time.Second) + + return pr, br +} + +// Clear function clear up the statsQueue +func (q *statsQueue) Clear() { + q.rwl.Lock() + defer q.rwl.Unlock() + q.back = -1 + q.front = 0 + q.size = 0 + q.totalReqSize = 0 +} diff --git a/deps/github.com/coreos/etcd/etcdserver/stats/server.go b/deps/github.com/coreos/etcd/etcdserver/stats/server.go new file mode 100644 index 000000000..0278e885c --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/stats/server.go @@ -0,0 +1,142 @@ +// Copyright 2015 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. + +package stats + +import ( + "encoding/json" + "log" + "sync" + "time" + + "github.com/coreos/etcd/raft" +) + +// ServerStats encapsulates various statistics about an EtcdServer and its +// communication with other members of the cluster +type ServerStats struct { + serverStats + sync.Mutex +} + +func NewServerStats(name, id string) *ServerStats { + ss := &ServerStats{ + serverStats: serverStats{ + Name: name, + ID: id, + }, + } + now := time.Now() + ss.StartTime = now + ss.LeaderInfo.StartTime = now + ss.sendRateQueue = &statsQueue{back: -1} + ss.recvRateQueue = &statsQueue{back: -1} + return ss +} + +type serverStats struct { + Name string `json:"name"` + // ID is the raft ID of the node. + // TODO(jonboulle): use ID instead of name? + ID string `json:"id"` + State raft.StateType `json:"state"` + StartTime time.Time `json:"startTime"` + + LeaderInfo struct { + Name string `json:"leader"` + Uptime string `json:"uptime"` + StartTime time.Time `json:"startTime"` + } `json:"leaderInfo"` + + RecvAppendRequestCnt uint64 `json:"recvAppendRequestCnt,"` + RecvingPkgRate float64 `json:"recvPkgRate,omitempty"` + RecvingBandwidthRate float64 `json:"recvBandwidthRate,omitempty"` + + SendAppendRequestCnt uint64 `json:"sendAppendRequestCnt"` + SendingPkgRate float64 `json:"sendPkgRate,omitempty"` + SendingBandwidthRate float64 `json:"sendBandwidthRate,omitempty"` + + sendRateQueue *statsQueue + recvRateQueue *statsQueue +} + +func (ss *ServerStats) JSON() []byte { + ss.Lock() + stats := ss.serverStats + ss.Unlock() + stats.LeaderInfo.Uptime = time.Since(stats.LeaderInfo.StartTime).String() + stats.SendingPkgRate, stats.SendingBandwidthRate = stats.sendRateQueue.Rate() + stats.RecvingPkgRate, stats.RecvingBandwidthRate = stats.recvRateQueue.Rate() + b, err := json.Marshal(stats) + // TODO(jonboulle): appropriate error handling? + if err != nil { + log.Printf("stats: error marshalling server stats: %v", err) + } + return b +} + +// RecvAppendReq updates the ServerStats in response to an AppendRequest +// from the given leader being received +func (ss *ServerStats) RecvAppendReq(leader string, reqSize int) { + ss.Lock() + defer ss.Unlock() + + now := time.Now() + + ss.State = raft.StateFollower + if leader != ss.LeaderInfo.Name { + ss.LeaderInfo.Name = leader + ss.LeaderInfo.StartTime = now + } + + ss.recvRateQueue.Insert( + &RequestStats{ + SendingTime: now, + Size: reqSize, + }, + ) + ss.RecvAppendRequestCnt++ +} + +// SendAppendReq updates the ServerStats in response to an AppendRequest +// being sent by this server +func (ss *ServerStats) SendAppendReq(reqSize int) { + ss.Lock() + defer ss.Unlock() + + ss.becomeLeader() + + ss.sendRateQueue.Insert( + &RequestStats{ + SendingTime: time.Now(), + Size: reqSize, + }, + ) + + ss.SendAppendRequestCnt++ +} + +func (ss *ServerStats) BecomeLeader() { + ss.Lock() + defer ss.Unlock() + ss.becomeLeader() +} + +func (ss *ServerStats) becomeLeader() { + if ss.State != raft.StateLeader { + ss.State = raft.StateLeader + ss.LeaderInfo.Name = ss.ID + ss.LeaderInfo.StartTime = time.Now() + } +} diff --git a/deps/github.com/coreos/etcd/etcdserver/stats/stats.go b/deps/github.com/coreos/etcd/etcdserver/stats/stats.go new file mode 100644 index 000000000..2b5f7071a --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/stats/stats.go @@ -0,0 +1,32 @@ +// Copyright 2015 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. + +// Package stats defines a standard interface for etcd cluster statistics. +package stats + +import "github.com/coreos/pkg/capnslog" + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "etcdserver/stats") +) + +type Stats interface { + // SelfStats returns the struct representing statistics of this server + SelfStats() []byte + // LeaderStats returns the statistics of all followers in the cluster + // if this server is leader. Otherwise, nil is returned. + LeaderStats() []byte + // StoreStats returns statistics of the store backing this EtcdServer + StoreStats() []byte +} diff --git a/deps/github.com/coreos/etcd/etcdserver/storage.go b/deps/github.com/coreos/etcd/etcdserver/storage.go new file mode 100644 index 000000000..aa8f87569 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/storage.go @@ -0,0 +1,98 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "io" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/snap" + "github.com/coreos/etcd/wal" + "github.com/coreos/etcd/wal/walpb" +) + +type Storage interface { + // Save function saves ents and state to the underlying stable storage. + // Save MUST block until st and ents are on stable storage. + Save(st raftpb.HardState, ents []raftpb.Entry) error + // SaveSnap function saves snapshot to the underlying stable storage. + SaveSnap(snap raftpb.Snapshot) error + // Close closes the Storage and performs finalization. + Close() error +} + +type storage struct { + *wal.WAL + *snap.Snapshotter +} + +func NewStorage(w *wal.WAL, s *snap.Snapshotter) Storage { + return &storage{w, s} +} + +// SaveSnap saves the snapshot to disk and release the locked +// wal files since they will not be used. +func (st *storage) SaveSnap(snap raftpb.Snapshot) error { + walsnap := walpb.Snapshot{ + Index: snap.Metadata.Index, + Term: snap.Metadata.Term, + } + err := st.WAL.SaveSnapshot(walsnap) + if err != nil { + return err + } + err = st.Snapshotter.SaveSnap(snap) + if err != nil { + return err + } + return st.WAL.ReleaseLockTo(snap.Metadata.Index) +} + +func readWAL(waldir string, snap walpb.Snapshot) (w *wal.WAL, id, cid types.ID, st raftpb.HardState, ents []raftpb.Entry) { + var ( + err error + wmetadata []byte + ) + + repaired := false + for { + if w, err = wal.Open(waldir, snap); err != nil { + plog.Fatalf("open wal error: %v", err) + } + if wmetadata, st, ents, err = w.ReadAll(); err != nil { + w.Close() + // we can only repair ErrUnexpectedEOF and we never repair twice. + if repaired || err != io.ErrUnexpectedEOF { + plog.Fatalf("read wal error (%v) and cannot be repaired", err) + } + if !wal.Repair(waldir) { + plog.Fatalf("WAL error (%v) cannot be repaired", err) + } else { + plog.Infof("repaired WAL error (%v)", err) + repaired = true + } + continue + } + break + } + var metadata pb.Metadata + pbutil.MustUnmarshal(&metadata, wmetadata) + id = types.ID(metadata.NodeID) + cid = types.ID(metadata.ClusterID) + return +} diff --git a/deps/github.com/coreos/etcd/etcdserver/util.go b/deps/github.com/coreos/etcd/etcdserver/util.go new file mode 100644 index 000000000..e3896ffc2 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/util.go @@ -0,0 +1,97 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "time" + + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/rafthttp" +) + +// isConnectedToQuorumSince checks whether the local member is connected to the +// quorum of the cluster since the given time. +func isConnectedToQuorumSince(transport rafthttp.Transporter, since time.Time, self types.ID, members []*membership.Member) bool { + return numConnectedSince(transport, since, self, members) >= (len(members)/2)+1 +} + +// isConnectedSince checks whether the local member is connected to the +// remote member since the given time. +func isConnectedSince(transport rafthttp.Transporter, since time.Time, remote types.ID) bool { + t := transport.ActiveSince(remote) + return !t.IsZero() && t.Before(since) +} + +// isConnectedFullySince checks whether the local member is connected to all +// members in the cluster since the given time. +func isConnectedFullySince(transport rafthttp.Transporter, since time.Time, self types.ID, members []*membership.Member) bool { + return numConnectedSince(transport, since, self, members) == len(members) +} + +// numConnectedSince counts how many members are connected to the local member +// since the given time. +func numConnectedSince(transport rafthttp.Transporter, since time.Time, self types.ID, members []*membership.Member) int { + connectedNum := 0 + for _, m := range members { + if m.ID == self || isConnectedSince(transport, since, m.ID) { + connectedNum++ + } + } + return connectedNum +} + +// longestConnected chooses the member with longest active-since-time. +// It returns false, if nothing is active. +func longestConnected(tp rafthttp.Transporter, membs []types.ID) (types.ID, bool) { + var longest types.ID + var oldest time.Time + for _, id := range membs { + tm := tp.ActiveSince(id) + if tm.IsZero() { // inactive + continue + } + + if oldest.IsZero() { // first longest candidate + oldest = tm + longest = id + } + + if tm.Before(oldest) { + oldest = tm + longest = id + } + } + if uint64(longest) == 0 { + return longest, false + } + return longest, true +} + +type notifier struct { + c chan struct{} + err error +} + +func newNotifier() *notifier { + return ¬ifier{ + c: make(chan struct{}), + } +} + +func (nc *notifier) notify(err error) { + nc.err = err + close(nc.c) +} diff --git a/deps/github.com/coreos/etcd/etcdserver/v2_server.go b/deps/github.com/coreos/etcd/etcdserver/v2_server.go new file mode 100644 index 000000000..72c4eb7c5 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/v2_server.go @@ -0,0 +1,125 @@ +// 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. + +package etcdserver + +import ( + "time" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "golang.org/x/net/context" +) + +type v2API interface { + Post(ctx context.Context, r *pb.Request) (Response, error) + Put(ctx context.Context, r *pb.Request) (Response, error) + Delete(ctx context.Context, r *pb.Request) (Response, error) + QGet(ctx context.Context, r *pb.Request) (Response, error) + Get(ctx context.Context, r *pb.Request) (Response, error) + Head(ctx context.Context, r *pb.Request) (Response, error) +} + +type v2apiStore struct{ s *EtcdServer } + +func (a *v2apiStore) Post(ctx context.Context, r *pb.Request) (Response, error) { + return a.processRaftRequest(ctx, r) +} + +func (a *v2apiStore) Put(ctx context.Context, r *pb.Request) (Response, error) { + return a.processRaftRequest(ctx, r) +} + +func (a *v2apiStore) Delete(ctx context.Context, r *pb.Request) (Response, error) { + return a.processRaftRequest(ctx, r) +} + +func (a *v2apiStore) QGet(ctx context.Context, r *pb.Request) (Response, error) { + return a.processRaftRequest(ctx, r) +} + +func (a *v2apiStore) processRaftRequest(ctx context.Context, r *pb.Request) (Response, error) { + data, err := r.Marshal() + if err != nil { + return Response{}, err + } + ch := a.s.w.Register(r.ID) + + start := time.Now() + a.s.r.Propose(ctx, data) + proposalsPending.Inc() + defer proposalsPending.Dec() + + select { + case x := <-ch: + resp := x.(Response) + return resp, resp.err + case <-ctx.Done(): + proposalsFailed.Inc() + a.s.w.Trigger(r.ID, nil) // GC wait + return Response{}, a.s.parseProposeCtxErr(ctx.Err(), start) + case <-a.s.stopping: + } + return Response{}, ErrStopped +} + +func (a *v2apiStore) Get(ctx context.Context, r *pb.Request) (Response, error) { + if r.Wait { + wc, err := a.s.store.Watch(r.Path, r.Recursive, r.Stream, r.Since) + if err != nil { + return Response{}, err + } + return Response{Watcher: wc}, nil + } + ev, err := a.s.store.Get(r.Path, r.Recursive, r.Sorted) + if err != nil { + return Response{}, err + } + return Response{Event: ev}, nil +} + +func (a *v2apiStore) Head(ctx context.Context, r *pb.Request) (Response, error) { + ev, err := a.s.store.Get(r.Path, r.Recursive, r.Sorted) + if err != nil { + return Response{}, err + } + return Response{Event: ev}, nil +} + +// Do interprets r and performs an operation on s.store according to r.Method +// and other fields. If r.Method is "POST", "PUT", "DELETE", or a "GET" with +// Quorum == true, r will be sent through consensus before performing its +// respective operation. Do will block until an action is performed or there is +// an error. +func (s *EtcdServer) Do(ctx context.Context, r pb.Request) (Response, error) { + r.ID = s.reqIDGen.Next() + if r.Method == "GET" && r.Quorum { + r.Method = "QGET" + } + v2api := (v2API)(&v2apiStore{s}) + switch r.Method { + case "POST": + return v2api.Post(ctx, &r) + case "PUT": + return v2api.Put(ctx, &r) + case "DELETE": + return v2api.Delete(ctx, &r) + case "QGET": + return v2api.QGet(ctx, &r) + case "GET": + return v2api.Get(ctx, &r) + case "HEAD": + return v2api.Head(ctx, &r) + } + return Response{}, ErrUnknownMethod +} diff --git a/deps/github.com/coreos/etcd/etcdserver/v3_server.go b/deps/github.com/coreos/etcd/etcdserver/v3_server.go new file mode 100644 index 000000000..ae449bbf2 --- /dev/null +++ b/deps/github.com/coreos/etcd/etcdserver/v3_server.go @@ -0,0 +1,686 @@ +// Copyright 2015 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. + +package etcdserver + +import ( + "bytes" + "encoding/binary" + "time" + + "github.com/gogo/protobuf/proto" + + "github.com/coreos/etcd/auth" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/etcdserver/membership" + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/lease/leasehttp" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/raft" + + "golang.org/x/net/context" +) + +const ( + // In the health case, there might be a small gap (10s of entries) between + // the applied index and committed index. + // However, if the committed entries are very heavy to apply, the gap might grow. + // We should stop accepting new proposals if the gap growing to a certain point. + maxGapBetweenApplyAndCommitIndex = 5000 +) + +type RaftKV interface { + Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, error) + Put(ctx context.Context, r *pb.PutRequest) (*pb.PutResponse, error) + DeleteRange(ctx context.Context, r *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) + Txn(ctx context.Context, r *pb.TxnRequest) (*pb.TxnResponse, error) + Compact(ctx context.Context, r *pb.CompactionRequest) (*pb.CompactionResponse, error) +} + +type Lessor interface { + // LeaseGrant sends LeaseGrant request to raft and apply it after committed. + LeaseGrant(ctx context.Context, r *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) + // LeaseRevoke sends LeaseRevoke request to raft and apply it after committed. + LeaseRevoke(ctx context.Context, r *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error) + + // LeaseRenew renews the lease with given ID. The renewed TTL is returned. Or an error + // is returned. + LeaseRenew(ctx context.Context, id lease.LeaseID) (int64, error) + + // LeaseTimeToLive retrieves lease information. + LeaseTimeToLive(ctx context.Context, r *pb.LeaseTimeToLiveRequest) (*pb.LeaseTimeToLiveResponse, error) +} + +type Authenticator interface { + AuthEnable(ctx context.Context, r *pb.AuthEnableRequest) (*pb.AuthEnableResponse, error) + AuthDisable(ctx context.Context, r *pb.AuthDisableRequest) (*pb.AuthDisableResponse, error) + Authenticate(ctx context.Context, r *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error) + UserAdd(ctx context.Context, r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) + UserDelete(ctx context.Context, r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) + UserChangePassword(ctx context.Context, r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) + UserGrantRole(ctx context.Context, r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) + UserGet(ctx context.Context, r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) + UserRevokeRole(ctx context.Context, r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) + RoleAdd(ctx context.Context, r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) + RoleGrantPermission(ctx context.Context, r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) + RoleGet(ctx context.Context, r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) + RoleRevokePermission(ctx context.Context, r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) + RoleDelete(ctx context.Context, r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) + UserList(ctx context.Context, r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) + RoleList(ctx context.Context, r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) +} + +func (s *EtcdServer) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, error) { + if !r.Serializable { + err := s.linearizableReadNotify(ctx) + if err != nil { + return nil, err + } + } + var resp *pb.RangeResponse + var err error + chk := func(ai *auth.AuthInfo) error { + return s.authStore.IsRangePermitted(ai, r.Key, r.RangeEnd) + } + get := func() { resp, err = s.applyV3Base.Range(nil, r) } + if serr := s.doSerialize(ctx, chk, get); serr != nil { + return nil, serr + } + return resp, err +} + +func (s *EtcdServer) Put(ctx context.Context, r *pb.PutRequest) (*pb.PutResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{Put: r}) + if err != nil { + return nil, err + } + return resp.(*pb.PutResponse), nil +} + +func (s *EtcdServer) DeleteRange(ctx context.Context, r *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{DeleteRange: r}) + if err != nil { + return nil, err + } + return resp.(*pb.DeleteRangeResponse), nil +} + +func (s *EtcdServer) Txn(ctx context.Context, r *pb.TxnRequest) (*pb.TxnResponse, error) { + if isTxnReadonly(r) { + if !isTxnSerializable(r) { + err := s.linearizableReadNotify(ctx) + if err != nil { + return nil, err + } + } + var resp *pb.TxnResponse + var err error + chk := func(ai *auth.AuthInfo) error { + return checkTxnAuth(s.authStore, ai, r) + } + get := func() { resp, err = s.applyV3Base.Txn(r) } + if serr := s.doSerialize(ctx, chk, get); serr != nil { + return nil, serr + } + return resp, err + } + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{Txn: r}) + if err != nil { + return nil, err + } + return resp.(*pb.TxnResponse), nil +} + +func isTxnSerializable(r *pb.TxnRequest) bool { + for _, u := range r.Success { + if r := u.GetRequestRange(); r == nil || !r.Serializable { + return false + } + } + for _, u := range r.Failure { + if r := u.GetRequestRange(); r == nil || !r.Serializable { + return false + } + } + return true +} + +func isTxnReadonly(r *pb.TxnRequest) bool { + for _, u := range r.Success { + if r := u.GetRequestRange(); r == nil { + return false + } + } + for _, u := range r.Failure { + if r := u.GetRequestRange(); r == nil { + return false + } + } + return true +} + +func (s *EtcdServer) Compact(ctx context.Context, r *pb.CompactionRequest) (*pb.CompactionResponse, error) { + result, err := s.processInternalRaftRequestOnce(ctx, pb.InternalRaftRequest{Compaction: r}) + if r.Physical && result != nil && result.physc != nil { + <-result.physc + // The compaction is done deleting keys; the hash is now settled + // but the data is not necessarily committed. If there's a crash, + // the hash may revert to a hash prior to compaction completing + // if the compaction resumes. Force the finished compaction to + // commit so it won't resume following a crash. + s.be.ForceCommit() + } + if err != nil { + return nil, err + } + if result.err != nil { + return nil, result.err + } + resp := result.resp.(*pb.CompactionResponse) + if resp == nil { + resp = &pb.CompactionResponse{} + } + if resp.Header == nil { + resp.Header = &pb.ResponseHeader{} + } + resp.Header.Revision = s.kv.Rev() + return resp, nil +} + +func (s *EtcdServer) LeaseGrant(ctx context.Context, r *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) { + // no id given? choose one + for r.ID == int64(lease.NoLease) { + // only use positive int64 id's + r.ID = int64(s.reqIDGen.Next() & ((1 << 63) - 1)) + } + resp, err := s.raftRequestOnce(ctx, pb.InternalRaftRequest{LeaseGrant: r}) + if err != nil { + return nil, err + } + return resp.(*pb.LeaseGrantResponse), nil +} + +func (s *EtcdServer) LeaseRevoke(ctx context.Context, r *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error) { + resp, err := s.raftRequestOnce(ctx, pb.InternalRaftRequest{LeaseRevoke: r}) + if err != nil { + return nil, err + } + return resp.(*pb.LeaseRevokeResponse), nil +} + +func (s *EtcdServer) LeaseRenew(ctx context.Context, id lease.LeaseID) (int64, error) { + ttl, err := s.lessor.Renew(id) + if err == nil { // already requested to primary lessor(leader) + return ttl, nil + } + if err != lease.ErrNotPrimary { + return -1, err + } + + cctx, cancel := context.WithTimeout(ctx, s.Cfg.ReqTimeout()) + defer cancel() + + // renewals don't go through raft; forward to leader manually + for cctx.Err() == nil && err != nil { + leader, lerr := s.waitLeader(cctx) + if lerr != nil { + return -1, lerr + } + for _, url := range leader.PeerURLs { + lurl := url + leasehttp.LeasePrefix + ttl, err = leasehttp.RenewHTTP(cctx, id, lurl, s.peerRt) + if err == nil || err == lease.ErrLeaseNotFound { + return ttl, err + } + } + } + return -1, ErrTimeout +} + +func (s *EtcdServer) LeaseTimeToLive(ctx context.Context, r *pb.LeaseTimeToLiveRequest) (*pb.LeaseTimeToLiveResponse, error) { + if s.Leader() == s.ID() { + // primary; timetolive directly from leader + le := s.lessor.Lookup(lease.LeaseID(r.ID)) + if le == nil { + return nil, lease.ErrLeaseNotFound + } + // TODO: fill out ResponseHeader + resp := &pb.LeaseTimeToLiveResponse{Header: &pb.ResponseHeader{}, ID: r.ID, TTL: int64(le.Remaining().Seconds()), GrantedTTL: le.TTL()} + if r.Keys { + ks := le.Keys() + kbs := make([][]byte, len(ks)) + for i := range ks { + kbs[i] = []byte(ks[i]) + } + resp.Keys = kbs + } + return resp, nil + } + + cctx, cancel := context.WithTimeout(ctx, s.Cfg.ReqTimeout()) + defer cancel() + + // forward to leader + for cctx.Err() == nil { + leader, err := s.waitLeader(cctx) + if err != nil { + return nil, err + } + for _, url := range leader.PeerURLs { + lurl := url + leasehttp.LeaseInternalPrefix + resp, err := leasehttp.TimeToLiveHTTP(cctx, lease.LeaseID(r.ID), r.Keys, lurl, s.peerRt) + if err == nil { + return resp.LeaseTimeToLiveResponse, nil + } + if err == lease.ErrLeaseNotFound { + return nil, err + } + } + } + return nil, ErrTimeout +} + +func (s *EtcdServer) waitLeader(ctx context.Context) (*membership.Member, error) { + leader := s.cluster.Member(s.Leader()) + for leader == nil { + // wait an election + dur := time.Duration(s.Cfg.ElectionTicks) * time.Duration(s.Cfg.TickMs) * time.Millisecond + select { + case <-time.After(dur): + leader = s.cluster.Member(s.Leader()) + case <-s.stopping: + return nil, ErrStopped + case <-ctx.Done(): + return nil, ErrNoLeader + } + } + if leader == nil || len(leader.PeerURLs) == 0 { + return nil, ErrNoLeader + } + return leader, nil +} + +func (s *EtcdServer) Alarm(ctx context.Context, r *pb.AlarmRequest) (*pb.AlarmResponse, error) { + resp, err := s.raftRequestOnce(ctx, pb.InternalRaftRequest{Alarm: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AlarmResponse), nil +} + +func (s *EtcdServer) AuthEnable(ctx context.Context, r *pb.AuthEnableRequest) (*pb.AuthEnableResponse, error) { + resp, err := s.raftRequestOnce(ctx, pb.InternalRaftRequest{AuthEnable: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthEnableResponse), nil +} + +func (s *EtcdServer) AuthDisable(ctx context.Context, r *pb.AuthDisableRequest) (*pb.AuthDisableResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthDisable: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthDisableResponse), nil +} + +func (s *EtcdServer) Authenticate(ctx context.Context, r *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error) { + if err := s.linearizableReadNotify(ctx); err != nil { + return nil, err + } + + var resp proto.Message + for { + checkedRevision, err := s.AuthStore().CheckPassword(r.Name, r.Password) + if err != nil { + if err != auth.ErrAuthNotEnabled { + plog.Errorf("invalid authentication request to user %s was issued", r.Name) + } + return nil, err + } + + st, err := s.AuthStore().GenTokenPrefix() + if err != nil { + return nil, err + } + + internalReq := &pb.InternalAuthenticateRequest{ + Name: r.Name, + Password: r.Password, + SimpleToken: st, + } + + resp, err = s.raftRequestOnce(ctx, pb.InternalRaftRequest{Authenticate: internalReq}) + if err != nil { + return nil, err + } + if checkedRevision == s.AuthStore().Revision() { + break + } + plog.Infof("revision when password checked is obsolete, retrying") + } + + return resp.(*pb.AuthenticateResponse), nil +} + +func (s *EtcdServer) UserAdd(ctx context.Context, r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthUserAdd: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthUserAddResponse), nil +} + +func (s *EtcdServer) UserDelete(ctx context.Context, r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthUserDelete: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthUserDeleteResponse), nil +} + +func (s *EtcdServer) UserChangePassword(ctx context.Context, r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthUserChangePassword: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthUserChangePasswordResponse), nil +} + +func (s *EtcdServer) UserGrantRole(ctx context.Context, r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthUserGrantRole: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthUserGrantRoleResponse), nil +} + +func (s *EtcdServer) UserGet(ctx context.Context, r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthUserGet: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthUserGetResponse), nil +} + +func (s *EtcdServer) UserList(ctx context.Context, r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthUserList: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthUserListResponse), nil +} + +func (s *EtcdServer) UserRevokeRole(ctx context.Context, r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthUserRevokeRole: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthUserRevokeRoleResponse), nil +} + +func (s *EtcdServer) RoleAdd(ctx context.Context, r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthRoleAdd: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthRoleAddResponse), nil +} + +func (s *EtcdServer) RoleGrantPermission(ctx context.Context, r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthRoleGrantPermission: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthRoleGrantPermissionResponse), nil +} + +func (s *EtcdServer) RoleGet(ctx context.Context, r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthRoleGet: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthRoleGetResponse), nil +} + +func (s *EtcdServer) RoleList(ctx context.Context, r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthRoleList: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthRoleListResponse), nil +} + +func (s *EtcdServer) RoleRevokePermission(ctx context.Context, r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthRoleRevokePermission: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthRoleRevokePermissionResponse), nil +} + +func (s *EtcdServer) RoleDelete(ctx context.Context, r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) { + resp, err := s.raftRequest(ctx, pb.InternalRaftRequest{AuthRoleDelete: r}) + if err != nil { + return nil, err + } + return resp.(*pb.AuthRoleDeleteResponse), nil +} + +func (s *EtcdServer) raftRequestOnce(ctx context.Context, r pb.InternalRaftRequest) (proto.Message, error) { + result, err := s.processInternalRaftRequestOnce(ctx, r) + if err != nil { + return nil, err + } + if result.err != nil { + return nil, result.err + } + return result.resp, nil +} + +func (s *EtcdServer) raftRequest(ctx context.Context, r pb.InternalRaftRequest) (proto.Message, error) { + for { + resp, err := s.raftRequestOnce(ctx, r) + if err != auth.ErrAuthOldRevision { + return resp, err + } + } +} + +// doSerialize handles the auth logic, with permissions checked by "chk", for a serialized request "get". Returns a non-nil error on authentication failure. +func (s *EtcdServer) doSerialize(ctx context.Context, chk func(*auth.AuthInfo) error, get func()) error { + for { + ai, err := s.AuthInfoFromCtx(ctx) + if err != nil { + return err + } + if ai == nil { + // chk expects non-nil AuthInfo; use empty credentials + ai = &auth.AuthInfo{} + } + if err = chk(ai); err != nil { + if err == auth.ErrAuthOldRevision { + continue + } + return err + } + // fetch response for serialized request + get() + // empty credentials or current auth info means no need to retry + if ai.Revision == 0 || ai.Revision == s.authStore.Revision() { + return nil + } + // avoid TOCTOU error, retry of the request is required. + } +} + +func (s *EtcdServer) processInternalRaftRequestOnce(ctx context.Context, r pb.InternalRaftRequest) (*applyResult, error) { + ai := s.getAppliedIndex() + ci := s.getCommittedIndex() + if ci > ai+maxGapBetweenApplyAndCommitIndex { + return nil, ErrTooManyRequests + } + + r.Header = &pb.RequestHeader{ + ID: s.reqIDGen.Next(), + } + + authInfo, err := s.AuthInfoFromCtx(ctx) + if err != nil { + return nil, err + } + if authInfo != nil { + r.Header.Username = authInfo.Username + r.Header.AuthRevision = authInfo.Revision + } + + data, err := r.Marshal() + if err != nil { + return nil, err + } + + if len(data) > int(s.Cfg.MaxRequestBytes) { + return nil, ErrRequestTooLarge + } + + id := r.ID + if id == 0 { + id = r.Header.ID + } + ch := s.w.Register(id) + + cctx, cancel := context.WithTimeout(ctx, s.Cfg.ReqTimeout()) + defer cancel() + + start := time.Now() + s.r.Propose(cctx, data) + proposalsPending.Inc() + defer proposalsPending.Dec() + + select { + case x := <-ch: + return x.(*applyResult), nil + case <-cctx.Done(): + proposalsFailed.Inc() + s.w.Trigger(id, nil) // GC wait + return nil, s.parseProposeCtxErr(cctx.Err(), start) + case <-s.done: + return nil, ErrStopped + } +} + +// Watchable returns a watchable interface attached to the etcdserver. +func (s *EtcdServer) Watchable() mvcc.WatchableKV { return s.KV() } + +func (s *EtcdServer) linearizableReadLoop() { + var rs raft.ReadState + + for { + ctx := make([]byte, 8) + binary.BigEndian.PutUint64(ctx, s.reqIDGen.Next()) + + select { + case <-s.readwaitc: + case <-s.stopping: + return + } + + nextnr := newNotifier() + + s.readMu.Lock() + nr := s.readNotifier + s.readNotifier = nextnr + s.readMu.Unlock() + + cctx, cancel := context.WithTimeout(context.Background(), s.Cfg.ReqTimeout()) + if err := s.r.ReadIndex(cctx, ctx); err != nil { + cancel() + if err == raft.ErrStopped { + return + } + plog.Errorf("failed to get read index from raft: %v", err) + nr.notify(err) + continue + } + cancel() + + var ( + timeout bool + done bool + ) + for !timeout && !done { + select { + case rs = <-s.r.readStateC: + done = bytes.Equal(rs.RequestCtx, ctx) + if !done { + // a previous request might time out. now we should ignore the response of it and + // continue waiting for the response of the current requests. + plog.Warningf("ignored out-of-date read index response (want %v, got %v)", rs.RequestCtx, ctx) + } + case <-time.After(s.Cfg.ReqTimeout()): + plog.Warningf("timed out waiting for read index response") + nr.notify(ErrTimeout) + timeout = true + case <-s.stopping: + return + } + } + if !done { + continue + } + + if ai := s.getAppliedIndex(); ai < rs.Index { + select { + case <-s.applyWait.Wait(rs.Index): + case <-s.stopping: + return + } + } + // unblock all l-reads requested at indices before rs.Index + nr.notify(nil) + } +} + +func (s *EtcdServer) linearizableReadNotify(ctx context.Context) error { + s.readMu.RLock() + nc := s.readNotifier + s.readMu.RUnlock() + + // signal linearizable loop for current notify if it hasn't been already + select { + case s.readwaitc <- struct{}{}: + default: + } + + // wait for read state notification + select { + case <-nc.c: + return nc.err + case <-ctx.Done(): + return ctx.Err() + case <-s.done: + return ErrStopped + } +} + +func (s *EtcdServer) AuthInfoFromCtx(ctx context.Context) (*auth.AuthInfo, error) { + if s.Cfg.ClientCertAuthEnabled { + authInfo := s.AuthStore().AuthInfoFromTLS(ctx) + if authInfo != nil { + return authInfo, nil + } + } + + return s.AuthStore().AuthInfoFromCtx(ctx) +} diff --git a/deps/github.com/coreos/etcd/integration/bridge.go b/deps/github.com/coreos/etcd/integration/bridge.go new file mode 100644 index 000000000..59cebe1f0 --- /dev/null +++ b/deps/github.com/coreos/etcd/integration/bridge.go @@ -0,0 +1,228 @@ +// 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. + +package integration + +import ( + "fmt" + "io" + "io/ioutil" + "net" + "sync" + + "github.com/coreos/etcd/pkg/transport" +) + +// bridge creates a unix socket bridge to another unix socket, making it possible +// to disconnect grpc network connections without closing the logical grpc connection. +type bridge struct { + inaddr string + outaddr string + l net.Listener + conns map[*bridgeConn]struct{} + + stopc chan struct{} + pausec chan struct{} + blackholec chan struct{} + wg sync.WaitGroup + + mu sync.Mutex +} + +func newBridge(addr string) (*bridge, error) { + b := &bridge{ + // bridge "port" is ("%05d%05d0", port, pid) since go1.8 expects the port to be a number + inaddr: addr + "0", + outaddr: addr, + conns: make(map[*bridgeConn]struct{}), + stopc: make(chan struct{}), + pausec: make(chan struct{}), + blackholec: make(chan struct{}), + } + close(b.pausec) + + l, err := transport.NewUnixListener(b.inaddr) + if err != nil { + return nil, fmt.Errorf("listen failed on socket %s (%v)", addr, err) + } + b.l = l + b.wg.Add(1) + go b.serveListen() + return b, nil +} + +func (b *bridge) URL() string { return "unix://" + b.inaddr } + +func (b *bridge) Close() { + b.l.Close() + b.mu.Lock() + select { + case <-b.stopc: + default: + close(b.stopc) + } + b.mu.Unlock() + b.wg.Wait() +} + +func (b *bridge) Reset() { + b.mu.Lock() + defer b.mu.Unlock() + for bc := range b.conns { + bc.Close() + } + b.conns = make(map[*bridgeConn]struct{}) +} + +func (b *bridge) Pause() { + b.mu.Lock() + b.pausec = make(chan struct{}) + b.mu.Unlock() +} + +func (b *bridge) Unpause() { + b.mu.Lock() + select { + case <-b.pausec: + default: + close(b.pausec) + } + b.mu.Unlock() +} + +func (b *bridge) serveListen() { + defer func() { + b.l.Close() + b.mu.Lock() + for bc := range b.conns { + bc.Close() + } + b.mu.Unlock() + b.wg.Done() + }() + + for { + inc, ierr := b.l.Accept() + if ierr != nil { + return + } + b.mu.Lock() + pausec := b.pausec + b.mu.Unlock() + select { + case <-b.stopc: + inc.Close() + return + case <-pausec: + } + + outc, oerr := net.Dial("unix", b.outaddr) + if oerr != nil { + inc.Close() + return + } + + bc := &bridgeConn{inc, outc, make(chan struct{})} + b.wg.Add(1) + b.mu.Lock() + b.conns[bc] = struct{}{} + go b.serveConn(bc) + b.mu.Unlock() + } +} + +func (b *bridge) serveConn(bc *bridgeConn) { + defer func() { + close(bc.donec) + bc.Close() + b.mu.Lock() + delete(b.conns, bc) + b.mu.Unlock() + b.wg.Done() + }() + + var wg sync.WaitGroup + wg.Add(2) + go func() { + b.ioCopy(bc, bc.out, bc.in) + bc.close() + wg.Done() + }() + go func() { + b.ioCopy(bc, bc.in, bc.out) + bc.close() + wg.Done() + }() + wg.Wait() +} + +type bridgeConn struct { + in net.Conn + out net.Conn + donec chan struct{} +} + +func (bc *bridgeConn) Close() { + bc.close() + <-bc.donec +} + +func (bc *bridgeConn) close() { + bc.in.Close() + bc.out.Close() +} + +func (b *bridge) Blackhole() { + b.mu.Lock() + close(b.blackholec) + b.mu.Unlock() +} + +func (b *bridge) Unblackhole() { + b.mu.Lock() + for bc := range b.conns { + bc.Close() + } + b.conns = make(map[*bridgeConn]struct{}) + b.blackholec = make(chan struct{}) + b.mu.Unlock() +} + +// ref. https://github.com/golang/go/blob/master/src/io/io.go copyBuffer +func (b *bridge) ioCopy(bc *bridgeConn, dst io.Writer, src io.Reader) (err error) { + buf := make([]byte, 32*1024) + for { + select { + case <-b.blackholec: + io.Copy(ioutil.Discard, src) + return nil + default: + } + nr, er := src.Read(buf) + if nr > 0 { + nw, ew := dst.Write(buf[0:nr]) + if ew != nil { + return ew + } + if nr != nw { + return io.ErrShortWrite + } + } + if er != nil { + err = er + break + } + } + return +} diff --git a/deps/github.com/coreos/etcd/integration/cluster.go b/deps/github.com/coreos/etcd/integration/cluster.go new file mode 100644 index 000000000..2907e994d --- /dev/null +++ b/deps/github.com/coreos/etcd/integration/cluster.go @@ -0,0 +1,999 @@ +// 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. + +package integration + +import ( + "crypto/tls" + "fmt" + "io/ioutil" + "math/rand" + "net" + "net/http" + "net/http/httptest" + "os" + "reflect" + "sort" + "strings" + "sync" + "sync/atomic" + "testing" + "time" + + "github.com/coreos/etcd/client" + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/embed" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/etcdhttp" + "github.com/coreos/etcd/etcdserver/api/v2http" + "github.com/coreos/etcd/etcdserver/api/v3client" + "github.com/coreos/etcd/etcdserver/api/v3election" + epb "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" + "github.com/coreos/etcd/etcdserver/api/v3lock" + lockpb "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" + "github.com/coreos/etcd/etcdserver/api/v3rpc" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/pkg/testutil" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/rafthttp" + + "github.com/coreos/pkg/capnslog" + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/keepalive" +) + +const ( + tickDuration = 10 * time.Millisecond + clusterName = "etcd" + requestTimeout = 20 * time.Second + + basePort = 21000 + UrlScheme = "unix" + UrlSchemeTLS = "unixs" +) + +var ( + electionTicks = 10 + + // integration test uses unique ports, counting up, to listen for each + // member, ensuring restarted members can listen on the same port again. + localListenCount int64 = 0 + + testTLSInfo = transport.TLSInfo{ + KeyFile: "./fixtures/server.key.insecure", + CertFile: "./fixtures/server.crt", + TrustedCAFile: "./fixtures/ca.crt", + ClientCertAuth: true, + } + + testTLSInfoExpired = transport.TLSInfo{ + KeyFile: "./fixtures-expired/server-key.pem", + CertFile: "./fixtures-expired/server.pem", + TrustedCAFile: "./fixtures-expired/etcd-root-ca.pem", + ClientCertAuth: true, + } + + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "integration") +) + +type ClusterConfig struct { + Size int + PeerTLS *transport.TLSInfo + ClientTLS *transport.TLSInfo + DiscoveryURL string + UseGRPC bool + QuotaBackendBytes int64 + MaxRequestBytes uint + GRPCKeepAliveMinTime time.Duration + GRPCKeepAliveInterval time.Duration + GRPCKeepAliveTimeout time.Duration + // SkipCreatingClient to skip creating clients for each member. + SkipCreatingClient bool + + ClientMaxCallSendMsgSize int + ClientMaxCallRecvMsgSize int +} + +type cluster struct { + cfg *ClusterConfig + Members []*member +} + +func schemeFromTLSInfo(tls *transport.TLSInfo) string { + if tls == nil { + return UrlScheme + } + return UrlSchemeTLS +} + +func (c *cluster) fillClusterForMembers() error { + if c.cfg.DiscoveryURL != "" { + // cluster will be discovered + return nil + } + + addrs := make([]string, 0) + for _, m := range c.Members { + scheme := schemeFromTLSInfo(m.PeerTLSInfo) + for _, l := range m.PeerListeners { + addrs = append(addrs, fmt.Sprintf("%s=%s://%s", m.Name, scheme, l.Addr().String())) + } + } + clusterStr := strings.Join(addrs, ",") + var err error + for _, m := range c.Members { + m.InitialPeerURLsMap, err = types.NewURLsMap(clusterStr) + if err != nil { + return err + } + } + return nil +} + +func newCluster(t *testing.T, cfg *ClusterConfig) *cluster { + c := &cluster{cfg: cfg} + ms := make([]*member, cfg.Size) + for i := 0; i < cfg.Size; i++ { + ms[i] = c.mustNewMember(t) + } + c.Members = ms + if err := c.fillClusterForMembers(); err != nil { + t.Fatal(err) + } + + return c +} + +// NewCluster returns an unlaunched cluster of the given size which has been +// set to use static bootstrap. +func NewCluster(t *testing.T, size int) *cluster { + return newCluster(t, &ClusterConfig{Size: size}) +} + +// NewClusterByConfig returns an unlaunched cluster defined by a cluster configuration +func NewClusterByConfig(t *testing.T, cfg *ClusterConfig) *cluster { + return newCluster(t, cfg) +} + +func (c *cluster) Launch(t *testing.T) { + errc := make(chan error) + for _, m := range c.Members { + // Members are launched in separate goroutines because if they boot + // using discovery url, they have to wait for others to register to continue. + go func(m *member) { + errc <- m.Launch() + }(m) + } + for range c.Members { + if err := <-errc; err != nil { + t.Fatalf("error setting up member: %v", err) + } + } + // wait cluster to be stable to receive future client requests + c.waitMembersMatch(t, c.HTTPMembers()) + c.waitVersion() +} + +func (c *cluster) URL(i int) string { + return c.Members[i].ClientURLs[0].String() +} + +// URLs returns a list of all active client URLs in the cluster +func (c *cluster) URLs() []string { + return getMembersURLs(c.Members) +} + +func getMembersURLs(members []*member) []string { + urls := make([]string, 0) + for _, m := range members { + select { + case <-m.s.StopNotify(): + continue + default: + } + for _, u := range m.ClientURLs { + urls = append(urls, u.String()) + } + } + return urls +} + +// HTTPMembers returns a list of all active members as client.Members +func (c *cluster) HTTPMembers() []client.Member { + ms := []client.Member{} + for _, m := range c.Members { + pScheme := schemeFromTLSInfo(m.PeerTLSInfo) + cScheme := schemeFromTLSInfo(m.ClientTLSInfo) + cm := client.Member{Name: m.Name} + for _, ln := range m.PeerListeners { + cm.PeerURLs = append(cm.PeerURLs, pScheme+"://"+ln.Addr().String()) + } + for _, ln := range m.ClientListeners { + cm.ClientURLs = append(cm.ClientURLs, cScheme+"://"+ln.Addr().String()) + } + ms = append(ms, cm) + } + return ms +} + +func (c *cluster) mustNewMember(t *testing.T) *member { + m := mustNewMember(t, + memberConfig{ + name: c.name(rand.Int()), + peerTLS: c.cfg.PeerTLS, + clientTLS: c.cfg.ClientTLS, + quotaBackendBytes: c.cfg.QuotaBackendBytes, + maxRequestBytes: c.cfg.MaxRequestBytes, + grpcKeepAliveMinTime: c.cfg.GRPCKeepAliveMinTime, + grpcKeepAliveInterval: c.cfg.GRPCKeepAliveInterval, + grpcKeepAliveTimeout: c.cfg.GRPCKeepAliveTimeout, + clientMaxCallSendMsgSize: c.cfg.ClientMaxCallSendMsgSize, + clientMaxCallRecvMsgSize: c.cfg.ClientMaxCallRecvMsgSize, + }) + m.DiscoveryURL = c.cfg.DiscoveryURL + if c.cfg.UseGRPC { + if err := m.listenGRPC(); err != nil { + t.Fatal(err) + } + } + return m +} + +func (c *cluster) addMember(t *testing.T) { + m := c.mustNewMember(t) + + scheme := schemeFromTLSInfo(c.cfg.PeerTLS) + + // send add request to the cluster + var err error + for i := 0; i < len(c.Members); i++ { + clientURL := c.URL(i) + peerURL := scheme + "://" + m.PeerListeners[0].Addr().String() + if err = c.addMemberByURL(t, clientURL, peerURL); err == nil { + break + } + } + if err != nil { + t.Fatalf("add member failed on all members error: %v", err) + } + + m.InitialPeerURLsMap = types.URLsMap{} + for _, mm := range c.Members { + m.InitialPeerURLsMap[mm.Name] = mm.PeerURLs + } + m.InitialPeerURLsMap[m.Name] = m.PeerURLs + m.NewCluster = false + if err := m.Launch(); err != nil { + t.Fatal(err) + } + c.Members = append(c.Members, m) + // wait cluster to be stable to receive future client requests + c.waitMembersMatch(t, c.HTTPMembers()) +} + +func (c *cluster) addMemberByURL(t *testing.T, clientURL, peerURL string) error { + cc := MustNewHTTPClient(t, []string{clientURL}, c.cfg.ClientTLS) + ma := client.NewMembersAPI(cc) + ctx, cancel := context.WithTimeout(context.Background(), requestTimeout) + if _, err := ma.Add(ctx, peerURL); err != nil { + return err + } + cancel() + + // wait for the add node entry applied in the cluster + members := append(c.HTTPMembers(), client.Member{PeerURLs: []string{peerURL}, ClientURLs: []string{}}) + c.waitMembersMatch(t, members) + return nil +} + +func (c *cluster) AddMember(t *testing.T) { + c.addMember(t) +} + +func (c *cluster) RemoveMember(t *testing.T, id uint64) { + if err := c.removeMember(t, id); err != nil { + t.Fatal(err) + } +} + +func (c *cluster) removeMember(t *testing.T, id uint64) error { + // send remove request to the cluster + cc := MustNewHTTPClient(t, c.URLs(), c.cfg.ClientTLS) + ma := client.NewMembersAPI(cc) + ctx, cancel := context.WithTimeout(context.Background(), requestTimeout) + if err := ma.Remove(ctx, types.ID(id).String()); err != nil { + return err + } + cancel() + newMembers := make([]*member, 0) + for _, m := range c.Members { + if uint64(m.s.ID()) != id { + newMembers = append(newMembers, m) + } else { + select { + case <-m.s.StopNotify(): + m.Terminate(t) + // 1s stop delay + election timeout + 1s disk and network delay + connection write timeout + // TODO: remove connection write timeout by selecting on http response closeNotifier + // blocking on https://github.com/golang/go/issues/9524 + case <-time.After(time.Second + time.Duration(electionTicks)*tickDuration + time.Second + rafthttp.ConnWriteTimeout): + t.Fatalf("failed to remove member %s in time", m.s.ID()) + } + } + } + c.Members = newMembers + c.waitMembersMatch(t, c.HTTPMembers()) + return nil +} + +func (c *cluster) Terminate(t *testing.T) { + var wg sync.WaitGroup + wg.Add(len(c.Members)) + for _, m := range c.Members { + go func(mm *member) { + defer wg.Done() + mm.Terminate(t) + }(m) + } + wg.Wait() +} + +func (c *cluster) waitMembersMatch(t *testing.T, membs []client.Member) { + for _, u := range c.URLs() { + cc := MustNewHTTPClient(t, []string{u}, c.cfg.ClientTLS) + ma := client.NewMembersAPI(cc) + for { + ctx, cancel := context.WithTimeout(context.Background(), requestTimeout) + ms, err := ma.List(ctx) + cancel() + if err == nil && isMembersEqual(ms, membs) { + break + } + time.Sleep(tickDuration) + } + } +} + +func (c *cluster) WaitLeader(t *testing.T) int { return c.waitLeader(t, c.Members) } + +// waitLeader waits until given members agree on the same leader. +func (c *cluster) waitLeader(t *testing.T, membs []*member) int { + possibleLead := make(map[uint64]bool) + var lead uint64 + for _, m := range membs { + possibleLead[uint64(m.s.ID())] = true + } + cc := MustNewHTTPClient(t, getMembersURLs(membs), nil) + kapi := client.NewKeysAPI(cc) + + // ensure leader is up via linearizable get + for { + ctx, cancel := context.WithTimeout(context.Background(), 10*tickDuration+time.Second) + _, err := kapi.Get(ctx, "0", &client.GetOptions{Quorum: true}) + cancel() + if err == nil || strings.Contains(err.Error(), "Key not found") { + break + } + } + + for lead == 0 || !possibleLead[lead] { + lead = 0 + for _, m := range membs { + select { + case <-m.s.StopNotify(): + continue + default: + } + if lead != 0 && lead != m.s.Lead() { + lead = 0 + time.Sleep(10 * tickDuration) + break + } + lead = m.s.Lead() + } + } + + for i, m := range membs { + if uint64(m.s.ID()) == lead { + return i + } + } + + return -1 +} + +func (c *cluster) WaitNoLeader(t *testing.T) { c.waitNoLeader(t, c.Members) } + +// waitNoLeader waits until given members lose leader. +func (c *cluster) waitNoLeader(t *testing.T, membs []*member) { + noLeader := false + for !noLeader { + noLeader = true + for _, m := range membs { + select { + case <-m.s.StopNotify(): + continue + default: + } + if m.s.Lead() != 0 { + noLeader = false + time.Sleep(10 * tickDuration) + break + } + } + } +} + +func (c *cluster) waitVersion() { + for _, m := range c.Members { + for { + if m.s.ClusterVersion() != nil { + break + } + time.Sleep(tickDuration) + } + } +} + +func (c *cluster) name(i int) string { + return fmt.Sprint(i) +} + +// isMembersEqual checks whether two members equal except ID field. +// The given wmembs should always set ID field to empty string. +func isMembersEqual(membs []client.Member, wmembs []client.Member) bool { + sort.Sort(SortableMemberSliceByPeerURLs(membs)) + sort.Sort(SortableMemberSliceByPeerURLs(wmembs)) + for i := range membs { + membs[i].ID = "" + } + return reflect.DeepEqual(membs, wmembs) +} + +func newLocalListener(t *testing.T) net.Listener { + c := atomic.AddInt64(&localListenCount, 1) + // Go 1.8+ allows only numbers in port + addr := fmt.Sprintf("127.0.0.1:%05d%05d", c+basePort, os.Getpid()) + return NewListenerWithAddr(t, addr) +} + +func NewListenerWithAddr(t *testing.T, addr string) net.Listener { + l, err := transport.NewUnixListener(addr) + if err != nil { + t.Fatal(err) + } + return l +} + +type member struct { + etcdserver.ServerConfig + PeerListeners, ClientListeners []net.Listener + grpcListener net.Listener + // PeerTLSInfo enables peer TLS when set + PeerTLSInfo *transport.TLSInfo + // ClientTLSInfo enables client TLS when set + ClientTLSInfo *transport.TLSInfo + + raftHandler *testutil.PauseableHandler + s *etcdserver.EtcdServer + hss []*httptest.Server + + grpcServerOpts []grpc.ServerOption + grpcServer *grpc.Server + grpcAddr string + grpcBridge *bridge + + // serverClient is a clientv3 that directly calls the etcdserver. + serverClient *clientv3.Client + + keepDataDirTerminate bool + clientMaxCallSendMsgSize int + clientMaxCallRecvMsgSize int +} + +func (m *member) GRPCAddr() string { return m.grpcAddr } + +type memberConfig struct { + name string + peerTLS *transport.TLSInfo + clientTLS *transport.TLSInfo + quotaBackendBytes int64 + maxRequestBytes uint + grpcKeepAliveMinTime time.Duration + grpcKeepAliveInterval time.Duration + grpcKeepAliveTimeout time.Duration + clientMaxCallSendMsgSize int + clientMaxCallRecvMsgSize int +} + +// mustNewMember return an inited member with the given name. If peerTLS is +// set, it will use https scheme to communicate between peers. +func mustNewMember(t *testing.T, mcfg memberConfig) *member { + var err error + m := &member{} + + peerScheme := schemeFromTLSInfo(mcfg.peerTLS) + clientScheme := schemeFromTLSInfo(mcfg.clientTLS) + + pln := newLocalListener(t) + m.PeerListeners = []net.Listener{pln} + m.PeerURLs, err = types.NewURLs([]string{peerScheme + "://" + pln.Addr().String()}) + if err != nil { + t.Fatal(err) + } + m.PeerTLSInfo = mcfg.peerTLS + + cln := newLocalListener(t) + m.ClientListeners = []net.Listener{cln} + m.ClientURLs, err = types.NewURLs([]string{clientScheme + "://" + cln.Addr().String()}) + if err != nil { + t.Fatal(err) + } + m.ClientTLSInfo = mcfg.clientTLS + + m.Name = mcfg.name + + m.DataDir, err = ioutil.TempDir(os.TempDir(), "etcd") + if err != nil { + t.Fatal(err) + } + clusterStr := fmt.Sprintf("%s=%s://%s", mcfg.name, peerScheme, pln.Addr().String()) + m.InitialPeerURLsMap, err = types.NewURLsMap(clusterStr) + if err != nil { + t.Fatal(err) + } + m.InitialClusterToken = clusterName + m.NewCluster = true + m.BootstrapTimeout = 10 * time.Millisecond + if m.PeerTLSInfo != nil { + m.ServerConfig.PeerTLSInfo = *m.PeerTLSInfo + } + m.ElectionTicks = electionTicks + m.TickMs = uint(tickDuration / time.Millisecond) + m.QuotaBackendBytes = mcfg.quotaBackendBytes + m.MaxRequestBytes = mcfg.maxRequestBytes + if m.MaxRequestBytes == 0 { + m.MaxRequestBytes = embed.DefaultMaxRequestBytes + } + m.AuthToken = "simple" // for the purpose of integration testing, simple token is enough + + m.grpcServerOpts = []grpc.ServerOption{} + if mcfg.grpcKeepAliveMinTime > time.Duration(0) { + m.grpcServerOpts = append(m.grpcServerOpts, grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ + MinTime: mcfg.grpcKeepAliveMinTime, + PermitWithoutStream: false, + })) + } + if mcfg.grpcKeepAliveInterval > time.Duration(0) && + mcfg.grpcKeepAliveTimeout > time.Duration(0) { + m.grpcServerOpts = append(m.grpcServerOpts, grpc.KeepaliveParams(keepalive.ServerParameters{ + Time: mcfg.grpcKeepAliveInterval, + Timeout: mcfg.grpcKeepAliveTimeout, + })) + } + + m.clientMaxCallSendMsgSize = mcfg.clientMaxCallSendMsgSize + m.clientMaxCallRecvMsgSize = mcfg.clientMaxCallRecvMsgSize + + return m +} + +// listenGRPC starts a grpc server over a unix domain socket on the member +func (m *member) listenGRPC() error { + // prefix with localhost so cert has right domain + m.grpcAddr = "localhost:" + m.Name + l, err := transport.NewUnixListener(m.grpcAddr) + if err != nil { + return fmt.Errorf("listen failed on grpc socket %s (%v)", m.grpcAddr, err) + } + m.grpcBridge, err = newBridge(m.grpcAddr) + if err != nil { + l.Close() + return err + } + m.grpcAddr = schemeFromTLSInfo(m.ClientTLSInfo) + "://" + m.grpcBridge.inaddr + m.grpcListener = l + return nil +} + +func (m *member) electionTimeout() time.Duration { + return time.Duration(m.s.Cfg.ElectionTicks) * time.Millisecond +} + +func (m *member) DropConnections() { m.grpcBridge.Reset() } +func (m *member) PauseConnections() { m.grpcBridge.Pause() } +func (m *member) UnpauseConnections() { m.grpcBridge.Unpause() } +func (m *member) Blackhole() { m.grpcBridge.Blackhole() } +func (m *member) Unblackhole() { m.grpcBridge.Unblackhole() } + +// NewClientV3 creates a new grpc client connection to the member +func NewClientV3(m *member) (*clientv3.Client, error) { + if m.grpcAddr == "" { + return nil, fmt.Errorf("member not configured for grpc") + } + + cfg := clientv3.Config{ + Endpoints: []string{m.grpcAddr}, + DialTimeout: 5 * time.Second, + MaxCallSendMsgSize: m.clientMaxCallSendMsgSize, + MaxCallRecvMsgSize: m.clientMaxCallRecvMsgSize, + } + + if m.ClientTLSInfo != nil { + tls, err := m.ClientTLSInfo.ClientConfig() + if err != nil { + return nil, err + } + cfg.TLS = tls + } + return newClientV3(cfg) +} + +// Clone returns a member with the same server configuration. The returned +// member will not set PeerListeners and ClientListeners. +func (m *member) Clone(t *testing.T) *member { + mm := &member{} + mm.ServerConfig = m.ServerConfig + + var err error + clientURLStrs := m.ClientURLs.StringSlice() + mm.ClientURLs, err = types.NewURLs(clientURLStrs) + if err != nil { + // this should never fail + panic(err) + } + peerURLStrs := m.PeerURLs.StringSlice() + mm.PeerURLs, err = types.NewURLs(peerURLStrs) + if err != nil { + // this should never fail + panic(err) + } + clusterStr := m.InitialPeerURLsMap.String() + mm.InitialPeerURLsMap, err = types.NewURLsMap(clusterStr) + if err != nil { + // this should never fail + panic(err) + } + mm.InitialClusterToken = m.InitialClusterToken + mm.ElectionTicks = m.ElectionTicks + mm.PeerTLSInfo = m.PeerTLSInfo + mm.ClientTLSInfo = m.ClientTLSInfo + return mm +} + +// Launch starts a member based on ServerConfig, PeerListeners +// and ClientListeners. +func (m *member) Launch() error { + plog.Printf("launching %s (%s)", m.Name, m.grpcAddr) + var err error + if m.s, err = etcdserver.NewServer(&m.ServerConfig); err != nil { + return fmt.Errorf("failed to initialize the etcd server: %v", err) + } + m.s.SyncTicker = time.NewTicker(500 * time.Millisecond) + m.s.Start() + + m.raftHandler = &testutil.PauseableHandler{Next: etcdhttp.NewPeerHandler(m.s)} + + for _, ln := range m.PeerListeners { + hs := &httptest.Server{ + Listener: ln, + Config: &http.Server{Handler: m.raftHandler}, + } + if m.PeerTLSInfo == nil { + hs.Start() + } else { + hs.TLS, err = m.PeerTLSInfo.ServerConfig() + if err != nil { + return err + } + hs.StartTLS() + } + m.hss = append(m.hss, hs) + } + for _, ln := range m.ClientListeners { + hs := &httptest.Server{ + Listener: ln, + Config: &http.Server{Handler: v2http.NewClientHandler(m.s, m.ServerConfig.ReqTimeout())}, + } + if m.ClientTLSInfo == nil { + hs.Start() + } else { + hs.TLS, err = m.ClientTLSInfo.ServerConfig() + if err != nil { + return err + } + hs.StartTLS() + } + m.hss = append(m.hss, hs) + } + if m.grpcListener != nil { + var ( + tlscfg *tls.Config + ) + if m.ClientTLSInfo != nil && !m.ClientTLSInfo.Empty() { + tlscfg, err = m.ClientTLSInfo.ServerConfig() + if err != nil { + return err + } + } + m.grpcServer = v3rpc.Server(m.s, tlscfg, m.grpcServerOpts...) + m.serverClient = v3client.New(m.s) + lockpb.RegisterLockServer(m.grpcServer, v3lock.NewLockServer(m.serverClient)) + epb.RegisterElectionServer(m.grpcServer, v3election.NewElectionServer(m.serverClient)) + go m.grpcServer.Serve(m.grpcListener) + } + + plog.Printf("launched %s (%s)", m.Name, m.grpcAddr) + return nil +} + +func (m *member) WaitOK(t *testing.T) { + cc := MustNewHTTPClient(t, []string{m.URL()}, m.ClientTLSInfo) + kapi := client.NewKeysAPI(cc) + for { + ctx, cancel := context.WithTimeout(context.Background(), requestTimeout) + _, err := kapi.Get(ctx, "/", nil) + if err != nil { + time.Sleep(tickDuration) + continue + } + cancel() + break + } + for m.s.Leader() == 0 { + time.Sleep(tickDuration) + } +} + +func (m *member) URL() string { return m.ClientURLs[0].String() } + +func (m *member) Pause() { + m.raftHandler.Pause() + m.s.PauseSending() +} + +func (m *member) Resume() { + m.raftHandler.Resume() + m.s.ResumeSending() +} + +// Close stops the member's etcdserver and closes its connections +func (m *member) Close() { + if m.grpcBridge != nil { + m.grpcBridge.Close() + m.grpcBridge = nil + } + if m.serverClient != nil { + m.serverClient.Close() + m.serverClient = nil + } + if m.grpcServer != nil { + m.grpcServer.GracefulStop() + m.grpcServer = nil + } + m.s.HardStop() + for _, hs := range m.hss { + hs.CloseClientConnections() + hs.Close() + } +} + +// Stop stops the member, but the data dir of the member is preserved. +func (m *member) Stop(t *testing.T) { + plog.Printf("stopping %s (%s)", m.Name, m.grpcAddr) + m.Close() + m.hss = nil + plog.Printf("stopped %s (%s)", m.Name, m.grpcAddr) +} + +// checkLeaderTransition waits for leader transition, returning the new leader ID. +func checkLeaderTransition(t *testing.T, m *member, oldLead uint64) uint64 { + interval := time.Duration(m.s.Cfg.TickMs) * time.Millisecond + for m.s.Lead() == 0 || (m.s.Lead() == oldLead) { + time.Sleep(interval) + } + return m.s.Lead() +} + +// StopNotify unblocks when a member stop completes +func (m *member) StopNotify() <-chan struct{} { + return m.s.StopNotify() +} + +// Restart starts the member using the preserved data dir. +func (m *member) Restart(t *testing.T) error { + plog.Printf("restarting %s (%s)", m.Name, m.grpcAddr) + newPeerListeners := make([]net.Listener, 0) + for _, ln := range m.PeerListeners { + newPeerListeners = append(newPeerListeners, NewListenerWithAddr(t, ln.Addr().String())) + } + m.PeerListeners = newPeerListeners + newClientListeners := make([]net.Listener, 0) + for _, ln := range m.ClientListeners { + newClientListeners = append(newClientListeners, NewListenerWithAddr(t, ln.Addr().String())) + } + m.ClientListeners = newClientListeners + + if m.grpcListener != nil { + if err := m.listenGRPC(); err != nil { + t.Fatal(err) + } + } + + err := m.Launch() + plog.Printf("restarted %s (%s)", m.Name, m.grpcAddr) + return err +} + +// Terminate stops the member and removes the data dir. +func (m *member) Terminate(t *testing.T) { + plog.Printf("terminating %s (%s)", m.Name, m.grpcAddr) + m.Close() + if !m.keepDataDirTerminate { + if err := os.RemoveAll(m.ServerConfig.DataDir); err != nil { + t.Fatal(err) + } + } + plog.Printf("terminated %s (%s)", m.Name, m.grpcAddr) +} + +// Metric gets the metric value for a member +func (m *member) Metric(metricName string) (string, error) { + cfgtls := transport.TLSInfo{} + tr, err := transport.NewTimeoutTransport(cfgtls, time.Second, time.Second, time.Second) + if err != nil { + return "", err + } + cli := &http.Client{Transport: tr} + resp, err := cli.Get(m.ClientURLs[0].String() + "/metrics") + if err != nil { + return "", err + } + defer resp.Body.Close() + b, rerr := ioutil.ReadAll(resp.Body) + if rerr != nil { + return "", rerr + } + lines := strings.Split(string(b), "\n") + for _, l := range lines { + if strings.HasPrefix(l, metricName) { + return strings.Split(l, " ")[1], nil + } + } + return "", nil +} + +// InjectPartition drops connections from m to others, vice versa. +func (m *member) InjectPartition(t *testing.T, others ...*member) { + for _, other := range others { + m.s.CutPeer(other.s.ID()) + other.s.CutPeer(m.s.ID()) + } +} + +// RecoverPartition recovers connections from m to others, vice versa. +func (m *member) RecoverPartition(t *testing.T, others ...*member) { + for _, other := range others { + m.s.MendPeer(other.s.ID()) + other.s.MendPeer(m.s.ID()) + } +} + +func MustNewHTTPClient(t *testing.T, eps []string, tls *transport.TLSInfo) client.Client { + cfgtls := transport.TLSInfo{} + if tls != nil { + cfgtls = *tls + } + cfg := client.Config{Transport: mustNewTransport(t, cfgtls), Endpoints: eps} + c, err := client.New(cfg) + if err != nil { + t.Fatal(err) + } + return c +} + +func mustNewTransport(t *testing.T, tlsInfo transport.TLSInfo) *http.Transport { + // tick in integration test is short, so 1s dial timeout could play well. + tr, err := transport.NewTimeoutTransport(tlsInfo, time.Second, rafthttp.ConnReadTimeout, rafthttp.ConnWriteTimeout) + if err != nil { + t.Fatal(err) + } + return tr +} + +type SortableMemberSliceByPeerURLs []client.Member + +func (p SortableMemberSliceByPeerURLs) Len() int { return len(p) } +func (p SortableMemberSliceByPeerURLs) Less(i, j int) bool { + return p[i].PeerURLs[0] < p[j].PeerURLs[0] +} +func (p SortableMemberSliceByPeerURLs) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type ClusterV3 struct { + *cluster + + mu sync.Mutex + clients []*clientv3.Client +} + +// NewClusterV3 returns a launched cluster with a grpc client connection +// for each cluster member. +func NewClusterV3(t *testing.T, cfg *ClusterConfig) *ClusterV3 { + cfg.UseGRPC = true + clus := &ClusterV3{ + cluster: NewClusterByConfig(t, cfg), + } + clus.Launch(t) + + if !cfg.SkipCreatingClient { + for _, m := range clus.Members { + client, err := NewClientV3(m) + if err != nil { + t.Fatalf("cannot create client: %v", err) + } + clus.clients = append(clus.clients, client) + } + } + + return clus +} + +func (c *ClusterV3) TakeClient(idx int) { + c.mu.Lock() + c.clients[idx] = nil + c.mu.Unlock() +} + +func (c *ClusterV3) Terminate(t *testing.T) { + c.mu.Lock() + for _, client := range c.clients { + if client == nil { + continue + } + if err := client.Close(); err != nil { + t.Error(err) + } + } + c.mu.Unlock() + c.cluster.Terminate(t) +} + +func (c *ClusterV3) RandClient() *clientv3.Client { + return c.clients[rand.Intn(len(c.clients))] +} + +func (c *ClusterV3) Client(i int) *clientv3.Client { + return c.clients[i] +} + +type grpcAPI struct { + // Cluster is the cluster API for the client's connection. + Cluster pb.ClusterClient + // KV is the keyvalue API for the client's connection. + KV pb.KVClient + // Lease is the lease API for the client's connection. + Lease pb.LeaseClient + // Watch is the watch API for the client's connection. + Watch pb.WatchClient + // Maintenance is the maintenance API for the client's connection. + Maintenance pb.MaintenanceClient + // Auth is the authentication API for the client's connection. + Auth pb.AuthClient + // Lock is the lock API for the client's connection. + Lock lockpb.LockClient + // Election is the election API for the client's connection. + Election epb.ElectionClient +} diff --git a/deps/github.com/coreos/etcd/integration/cluster_direct.go b/deps/github.com/coreos/etcd/integration/cluster_direct.go new file mode 100644 index 000000000..ff97e6146 --- /dev/null +++ b/deps/github.com/coreos/etcd/integration/cluster_direct.go @@ -0,0 +1,41 @@ +// 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. + +// +build !cluster_proxy + +package integration + +import ( + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" + "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +func toGRPC(c *clientv3.Client) grpcAPI { + return grpcAPI{ + pb.NewClusterClient(c.ActiveConnection()), + pb.NewKVClient(c.ActiveConnection()), + pb.NewLeaseClient(c.ActiveConnection()), + pb.NewWatchClient(c.ActiveConnection()), + pb.NewMaintenanceClient(c.ActiveConnection()), + pb.NewAuthClient(c.ActiveConnection()), + v3lockpb.NewLockClient(c.ActiveConnection()), + v3electionpb.NewElectionClient(c.ActiveConnection()), + } +} + +func newClientV3(cfg clientv3.Config) (*clientv3.Client, error) { + return clientv3.New(cfg) +} diff --git a/deps/github.com/coreos/etcd/integration/cluster_proxy.go b/deps/github.com/coreos/etcd/integration/cluster_proxy.go new file mode 100644 index 000000000..15094358e --- /dev/null +++ b/deps/github.com/coreos/etcd/integration/cluster_proxy.go @@ -0,0 +1,115 @@ +// 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. + +// +build cluster_proxy + +package integration + +import ( + "sync" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/clientv3/namespace" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/proxy/grpcproxy" + "github.com/coreos/etcd/proxy/grpcproxy/adapter" +) + +var ( + pmu sync.Mutex + proxies map[*clientv3.Client]grpcClientProxy = make(map[*clientv3.Client]grpcClientProxy) +) + +const proxyNamespace = "proxy-namespace" + +type grpcClientProxy struct { + grpc grpcAPI + wdonec <-chan struct{} + kvdonec <-chan struct{} + lpdonec <-chan struct{} +} + +func toGRPC(c *clientv3.Client) grpcAPI { + pmu.Lock() + defer pmu.Unlock() + + if v, ok := proxies[c]; ok { + return v.grpc + } + + // test namespacing proxy + c.KV = namespace.NewKV(c.KV, proxyNamespace) + c.Watcher = namespace.NewWatcher(c.Watcher, proxyNamespace) + c.Lease = namespace.NewLease(c.Lease, proxyNamespace) + // test coalescing/caching proxy + kvp, kvpch := grpcproxy.NewKvProxy(c) + wp, wpch := grpcproxy.NewWatchProxy(c) + lp, lpch := grpcproxy.NewLeaseProxy(c) + mp := grpcproxy.NewMaintenanceProxy(c) + clp, _ := grpcproxy.NewClusterProxy(c, "", "") // without registering proxy URLs + lockp := grpcproxy.NewLockProxy(c) + electp := grpcproxy.NewElectionProxy(c) + + grpc := grpcAPI{ + adapter.ClusterServerToClusterClient(clp), + adapter.KvServerToKvClient(kvp), + adapter.LeaseServerToLeaseClient(lp), + adapter.WatchServerToWatchClient(wp), + adapter.MaintenanceServerToMaintenanceClient(mp), + pb.NewAuthClient(c.ActiveConnection()), + adapter.LockServerToLockClient(lockp), + adapter.ElectionServerToElectionClient(electp), + } + proxies[c] = grpcClientProxy{grpc: grpc, wdonec: wpch, kvdonec: kvpch, lpdonec: lpch} + return grpc +} + +type proxyCloser struct { + clientv3.Watcher + wdonec <-chan struct{} + kvdonec <-chan struct{} + lclose func() + lpdonec <-chan struct{} +} + +func (pc *proxyCloser) Close() error { + // client ctx is canceled before calling close, so kv and lp will close out + <-pc.kvdonec + err := pc.Watcher.Close() + <-pc.wdonec + pc.lclose() + <-pc.lpdonec + return err +} + +func newClientV3(cfg clientv3.Config) (*clientv3.Client, error) { + c, err := clientv3.New(cfg) + if err != nil { + return nil, err + } + rpc := toGRPC(c) + c.KV = clientv3.NewKVFromKVClient(rpc.KV, c) + pmu.Lock() + lc := c.Lease + c.Lease = clientv3.NewLeaseFromLeaseClient(rpc.Lease, c, cfg.DialTimeout) + c.Watcher = &proxyCloser{ + Watcher: clientv3.NewWatchFromWatchClient(rpc.Watch, c), + wdonec: proxies[c].wdonec, + kvdonec: proxies[c].kvdonec, + lclose: func() { lc.Close() }, + lpdonec: proxies[c].lpdonec, + } + pmu.Unlock() + return c, nil +} diff --git a/deps/github.com/coreos/etcd/integration/doc.go b/deps/github.com/coreos/etcd/integration/doc.go new file mode 100644 index 000000000..fbf19d543 --- /dev/null +++ b/deps/github.com/coreos/etcd/integration/doc.go @@ -0,0 +1,25 @@ +// Copyright 2015 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. + +/* +Package integration implements tests built upon embedded etcd, and focus on +etcd correctness. + +Features/goals of the integration tests: +1. test the whole code base except command-line parsing. +2. check internal data, including raft, store and etc. +3. based on goroutines, which is faster than process. +4. mainly tests user behavior and user-facing API. +*/ +package integration diff --git a/deps/github.com/coreos/etcd/lease/doc.go b/deps/github.com/coreos/etcd/lease/doc.go new file mode 100644 index 000000000..73e7d0ec5 --- /dev/null +++ b/deps/github.com/coreos/etcd/lease/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package lease provides an interface and implemetation for time-limited leases over arbitrary resources. +package lease diff --git a/deps/github.com/coreos/etcd/lease/leasehttp/doc.go b/deps/github.com/coreos/etcd/lease/leasehttp/doc.go new file mode 100644 index 000000000..8177a37b6 --- /dev/null +++ b/deps/github.com/coreos/etcd/lease/leasehttp/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package leasehttp serves lease renewals made through HTTP requests. +package leasehttp diff --git a/deps/github.com/coreos/etcd/lease/leasehttp/http.go b/deps/github.com/coreos/etcd/lease/leasehttp/http.go new file mode 100644 index 000000000..c3175cbbb --- /dev/null +++ b/deps/github.com/coreos/etcd/lease/leasehttp/http.go @@ -0,0 +1,242 @@ +// 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. + +package leasehttp + +import ( + "bytes" + "context" + "errors" + "fmt" + "io/ioutil" + "net/http" + "time" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/lease/leasepb" + "github.com/coreos/etcd/pkg/httputil" +) + +var ( + LeasePrefix = "/leases" + LeaseInternalPrefix = "/leases/internal" + applyTimeout = time.Second + ErrLeaseHTTPTimeout = errors.New("waiting for node to catch up its applied index has timed out") +) + +// NewHandler returns an http Handler for lease renewals +func NewHandler(l lease.Lessor, waitch func() <-chan struct{}) http.Handler { + return &leaseHandler{l, waitch} +} + +type leaseHandler struct { + l lease.Lessor + waitch func() <-chan struct{} +} + +func (h *leaseHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed) + return + } + + b, err := ioutil.ReadAll(r.Body) + if err != nil { + http.Error(w, "error reading body", http.StatusBadRequest) + return + } + + var v []byte + switch r.URL.Path { + case LeasePrefix: + lreq := pb.LeaseKeepAliveRequest{} + if err := lreq.Unmarshal(b); err != nil { + http.Error(w, "error unmarshalling request", http.StatusBadRequest) + return + } + select { + case <-h.waitch(): + case <-time.After(applyTimeout): + http.Error(w, ErrLeaseHTTPTimeout.Error(), http.StatusRequestTimeout) + return + } + ttl, err := h.l.Renew(lease.LeaseID(lreq.ID)) + if err != nil { + if err == lease.ErrLeaseNotFound { + http.Error(w, err.Error(), http.StatusNotFound) + return + } + + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + // TODO: fill out ResponseHeader + resp := &pb.LeaseKeepAliveResponse{ID: lreq.ID, TTL: ttl} + v, err = resp.Marshal() + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + case LeaseInternalPrefix: + lreq := leasepb.LeaseInternalRequest{} + if err := lreq.Unmarshal(b); err != nil { + http.Error(w, "error unmarshalling request", http.StatusBadRequest) + return + } + select { + case <-h.waitch(): + case <-time.After(applyTimeout): + http.Error(w, ErrLeaseHTTPTimeout.Error(), http.StatusRequestTimeout) + return + } + l := h.l.Lookup(lease.LeaseID(lreq.LeaseTimeToLiveRequest.ID)) + if l == nil { + http.Error(w, lease.ErrLeaseNotFound.Error(), http.StatusNotFound) + return + } + // TODO: fill out ResponseHeader + resp := &leasepb.LeaseInternalResponse{ + LeaseTimeToLiveResponse: &pb.LeaseTimeToLiveResponse{ + Header: &pb.ResponseHeader{}, + ID: lreq.LeaseTimeToLiveRequest.ID, + TTL: int64(l.Remaining().Seconds()), + GrantedTTL: l.TTL(), + }, + } + if lreq.LeaseTimeToLiveRequest.Keys { + ks := l.Keys() + kbs := make([][]byte, len(ks)) + for i := range ks { + kbs[i] = []byte(ks[i]) + } + resp.LeaseTimeToLiveResponse.Keys = kbs + } + + v, err = resp.Marshal() + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + default: + http.Error(w, fmt.Sprintf("unknown request path %q", r.URL.Path), http.StatusBadRequest) + return + } + + w.Header().Set("Content-Type", "application/protobuf") + w.Write(v) +} + +// RenewHTTP renews a lease at a given primary server. +// TODO: Batch request in future? +func RenewHTTP(ctx context.Context, id lease.LeaseID, url string, rt http.RoundTripper) (int64, error) { + // will post lreq protobuf to leader + lreq, err := (&pb.LeaseKeepAliveRequest{ID: int64(id)}).Marshal() + if err != nil { + return -1, err + } + + cc := &http.Client{Transport: rt} + req, err := http.NewRequest("POST", url, bytes.NewReader(lreq)) + if err != nil { + return -1, err + } + req.Header.Set("Content-Type", "application/protobuf") + req.Cancel = ctx.Done() + + resp, err := cc.Do(req) + if err != nil { + return -1, err + } + b, err := readResponse(resp) + if err != nil { + return -1, err + } + + if resp.StatusCode == http.StatusRequestTimeout { + return -1, ErrLeaseHTTPTimeout + } + + if resp.StatusCode == http.StatusNotFound { + return -1, lease.ErrLeaseNotFound + } + + if resp.StatusCode != http.StatusOK { + return -1, fmt.Errorf("lease: unknown error(%s)", string(b)) + } + + lresp := &pb.LeaseKeepAliveResponse{} + if err := lresp.Unmarshal(b); err != nil { + return -1, fmt.Errorf(`lease: %v. data = "%s"`, err, string(b)) + } + if lresp.ID != int64(id) { + return -1, fmt.Errorf("lease: renew id mismatch") + } + return lresp.TTL, nil +} + +// TimeToLiveHTTP retrieves lease information of the given lease ID. +func TimeToLiveHTTP(ctx context.Context, id lease.LeaseID, keys bool, url string, rt http.RoundTripper) (*leasepb.LeaseInternalResponse, error) { + // will post lreq protobuf to leader + lreq, err := (&leasepb.LeaseInternalRequest{&pb.LeaseTimeToLiveRequest{ID: int64(id), Keys: keys}}).Marshal() + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", url, bytes.NewReader(lreq)) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", "application/protobuf") + + req = req.WithContext(ctx) + + cc := &http.Client{Transport: rt} + var b []byte + // buffer errc channel so that errc don't block inside the go routinue + resp, err := cc.Do(req) + if err != nil { + return nil, err + } + b, err = readResponse(resp) + if err != nil { + return nil, err + } + if resp.StatusCode == http.StatusRequestTimeout { + return nil, ErrLeaseHTTPTimeout + } + if resp.StatusCode == http.StatusNotFound { + return nil, lease.ErrLeaseNotFound + } + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("lease: unknown error(%s)", string(b)) + } + + lresp := &leasepb.LeaseInternalResponse{} + if err := lresp.Unmarshal(b); err != nil { + return nil, fmt.Errorf(`lease: %v. data = "%s"`, err, string(b)) + } + if lresp.LeaseTimeToLiveResponse.ID != int64(id) { + return nil, fmt.Errorf("lease: renew id mismatch") + } + return lresp, nil +} + +func readResponse(resp *http.Response) (b []byte, err error) { + b, err = ioutil.ReadAll(resp.Body) + httputil.GracefulClose(resp) + return +} diff --git a/deps/github.com/coreos/etcd/lease/leasepb/lease.pb.go b/deps/github.com/coreos/etcd/lease/leasepb/lease.pb.go new file mode 100644 index 000000000..ec8db732b --- /dev/null +++ b/deps/github.com/coreos/etcd/lease/leasepb/lease.pb.go @@ -0,0 +1,608 @@ +// Code generated by protoc-gen-gogo. +// source: lease.proto +// DO NOT EDIT! + +/* + Package leasepb is a generated protocol buffer package. + + It is generated from these files: + lease.proto + + It has these top-level messages: + Lease + LeaseInternalRequest + LeaseInternalResponse +*/ +package leasepb + +import ( + "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + + etcdserverpb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + 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 Lease struct { + ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + TTL int64 `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` +} + +func (m *Lease) Reset() { *m = Lease{} } +func (m *Lease) String() string { return proto.CompactTextString(m) } +func (*Lease) ProtoMessage() {} +func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{0} } + +type LeaseInternalRequest struct { + LeaseTimeToLiveRequest *etcdserverpb.LeaseTimeToLiveRequest `protobuf:"bytes,1,opt,name=LeaseTimeToLiveRequest" json:"LeaseTimeToLiveRequest,omitempty"` +} + +func (m *LeaseInternalRequest) Reset() { *m = LeaseInternalRequest{} } +func (m *LeaseInternalRequest) String() string { return proto.CompactTextString(m) } +func (*LeaseInternalRequest) ProtoMessage() {} +func (*LeaseInternalRequest) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{1} } + +type LeaseInternalResponse struct { + LeaseTimeToLiveResponse *etcdserverpb.LeaseTimeToLiveResponse `protobuf:"bytes,1,opt,name=LeaseTimeToLiveResponse" json:"LeaseTimeToLiveResponse,omitempty"` +} + +func (m *LeaseInternalResponse) Reset() { *m = LeaseInternalResponse{} } +func (m *LeaseInternalResponse) String() string { return proto.CompactTextString(m) } +func (*LeaseInternalResponse) ProtoMessage() {} +func (*LeaseInternalResponse) Descriptor() ([]byte, []int) { return fileDescriptorLease, []int{2} } + +func init() { + proto.RegisterType((*Lease)(nil), "leasepb.Lease") + proto.RegisterType((*LeaseInternalRequest)(nil), "leasepb.LeaseInternalRequest") + proto.RegisterType((*LeaseInternalResponse)(nil), "leasepb.LeaseInternalResponse") +} +func (m *Lease) 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 *Lease) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ID != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintLease(dAtA, i, uint64(m.ID)) + } + if m.TTL != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintLease(dAtA, i, uint64(m.TTL)) + } + return i, nil +} + +func (m *LeaseInternalRequest) 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 *LeaseInternalRequest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.LeaseTimeToLiveRequest != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintLease(dAtA, i, uint64(m.LeaseTimeToLiveRequest.Size())) + n1, err := m.LeaseTimeToLiveRequest.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *LeaseInternalResponse) 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 *LeaseInternalResponse) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.LeaseTimeToLiveResponse != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintLease(dAtA, i, uint64(m.LeaseTimeToLiveResponse.Size())) + n2, err := m.LeaseTimeToLiveResponse.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} + +func encodeFixed64Lease(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 encodeFixed32Lease(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 encodeVarintLease(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 *Lease) Size() (n int) { + var l int + _ = l + if m.ID != 0 { + n += 1 + sovLease(uint64(m.ID)) + } + if m.TTL != 0 { + n += 1 + sovLease(uint64(m.TTL)) + } + return n +} + +func (m *LeaseInternalRequest) Size() (n int) { + var l int + _ = l + if m.LeaseTimeToLiveRequest != nil { + l = m.LeaseTimeToLiveRequest.Size() + n += 1 + l + sovLease(uint64(l)) + } + return n +} + +func (m *LeaseInternalResponse) Size() (n int) { + var l int + _ = l + if m.LeaseTimeToLiveResponse != nil { + l = m.LeaseTimeToLiveResponse.Size() + n += 1 + l + sovLease(uint64(l)) + } + return n +} + +func sovLease(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozLease(x uint64) (n int) { + return sovLease(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Lease) 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 ErrIntOverflowLease + } + 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: Lease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + m.ID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType) + } + m.TTL = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TTL |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseInternalRequest) 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 ErrIntOverflowLease + } + 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: LeaseInternalRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseInternalRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseTimeToLiveRequest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LeaseTimeToLiveRequest == nil { + m.LeaseTimeToLiveRequest = &etcdserverpb.LeaseTimeToLiveRequest{} + } + if err := m.LeaseTimeToLiveRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseInternalResponse) 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 ErrIntOverflowLease + } + 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: LeaseInternalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseInternalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseTimeToLiveResponse", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLease + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLease + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LeaseTimeToLiveResponse == nil { + m.LeaseTimeToLiveResponse = &etcdserverpb.LeaseTimeToLiveResponse{} + } + if err := m.LeaseTimeToLiveResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLease(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLease + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipLease(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, ErrIntOverflowLease + } + 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, ErrIntOverflowLease + } + 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, ErrIntOverflowLease + } + 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, ErrInvalidLengthLease + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowLease + } + 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 := skipLease(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 ( + ErrInvalidLengthLease = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowLease = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("lease.proto", fileDescriptorLease) } + +var fileDescriptorLease = []byte{ + // 233 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x49, 0x4d, 0x2c, + 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x73, 0x0a, 0x92, 0xa4, 0x44, 0xd2, + 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x4a, 0x2d, 0xb5, 0x24, 0x39, 0x45, + 0x1f, 0x44, 0x14, 0xa7, 0x16, 0x95, 0xa5, 0x16, 0x21, 0x31, 0x0b, 0x92, 0xf4, 0x8b, 0x0a, 0x92, + 0x21, 0xea, 0x94, 0x34, 0xb9, 0x58, 0x7d, 0x40, 0x06, 0x09, 0xf1, 0x71, 0x31, 0x79, 0xba, 0x48, + 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x31, 0x79, 0xba, 0x08, 0x09, 0x70, 0x31, 0x87, 0x84, 0xf8, + 0x48, 0x30, 0x81, 0x05, 0x40, 0x4c, 0xa5, 0x12, 0x2e, 0x11, 0xb0, 0x52, 0xcf, 0xbc, 0x92, 0xd4, + 0xa2, 0xbc, 0xc4, 0x9c, 0xa0, 0xd4, 0xc2, 0xd2, 0xd4, 0xe2, 0x12, 0xa1, 0x18, 0x2e, 0x31, 0xb0, + 0x78, 0x48, 0x66, 0x6e, 0x6a, 0x48, 0xbe, 0x4f, 0x66, 0x59, 0x2a, 0x54, 0x06, 0x6c, 0x1a, 0xb7, + 0x91, 0x8a, 0x1e, 0xb2, 0xdd, 0x7a, 0xd8, 0xd5, 0x06, 0xe1, 0x30, 0x43, 0xa9, 0x82, 0x4b, 0x14, + 0xcd, 0xd6, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xa1, 0x78, 0x2e, 0x71, 0x0c, 0x2d, 0x10, 0x29, + 0xa8, 0xbd, 0xaa, 0x04, 0xec, 0x85, 0x28, 0x0e, 0xc2, 0x65, 0x8a, 0x93, 0xc4, 0x89, 0x87, 0x72, + 0x0c, 0x17, 0x1e, 0xca, 0x31, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, + 0x72, 0x8c, 0x33, 0x1e, 0xcb, 0x31, 0x24, 0xb1, 0x81, 0xc3, 0xce, 0x18, 0x10, 0x00, 0x00, 0xff, + 0xff, 0x9f, 0xf2, 0x42, 0xe0, 0x91, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/coreos/etcd/lease/leasepb/lease.proto b/deps/github.com/coreos/etcd/lease/leasepb/lease.proto new file mode 100644 index 000000000..be414b993 --- /dev/null +++ b/deps/github.com/coreos/etcd/lease/leasepb/lease.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package leasepb; + +import "gogoproto/gogo.proto"; +import "etcd/etcdserver/etcdserverpb/rpc.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_getters_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; + +message Lease { + int64 ID = 1; + int64 TTL = 2; +} + +message LeaseInternalRequest { + etcdserverpb.LeaseTimeToLiveRequest LeaseTimeToLiveRequest = 1; +} + +message LeaseInternalResponse { + etcdserverpb.LeaseTimeToLiveResponse LeaseTimeToLiveResponse = 1; +} diff --git a/deps/github.com/coreos/etcd/lease/lessor.go b/deps/github.com/coreos/etcd/lease/lessor.go new file mode 100644 index 000000000..3418cf565 --- /dev/null +++ b/deps/github.com/coreos/etcd/lease/lessor.go @@ -0,0 +1,643 @@ +// Copyright 2015 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. + +package lease + +import ( + "encoding/binary" + "errors" + "math" + "sort" + "sync" + "sync/atomic" + "time" + + "github.com/coreos/etcd/lease/leasepb" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/pkg/monotime" +) + +const ( + // NoLease is a special LeaseID representing the absence of a lease. + NoLease = LeaseID(0) + + forever = monotime.Time(math.MaxInt64) +) + +var ( + leaseBucketName = []byte("lease") + + // maximum number of leases to revoke per second; configurable for tests + leaseRevokeRate = 1000 + + ErrNotPrimary = errors.New("not a primary lessor") + ErrLeaseNotFound = errors.New("lease not found") + ErrLeaseExists = errors.New("lease already exists") +) + +// TxnDelete is a TxnWrite that only permits deletes. Defined here +// to avoid circular dependency with mvcc. +type TxnDelete interface { + DeleteRange(key, end []byte) (n, rev int64) + End() +} + +// RangeDeleter is a TxnDelete constructor. +type RangeDeleter func() TxnDelete + +type LeaseID int64 + +// Lessor owns leases. It can grant, revoke, renew and modify leases for lessee. +type Lessor interface { + // SetRangeDeleter lets the lessor create TxnDeletes to the store. + // Lessor deletes the items in the revoked or expired lease by creating + // new TxnDeletes. + SetRangeDeleter(rd RangeDeleter) + + // Grant grants a lease that expires at least after TTL seconds. + Grant(id LeaseID, ttl int64) (*Lease, error) + // Revoke revokes a lease with given ID. The item attached to the + // given lease will be removed. If the ID does not exist, an error + // will be returned. + Revoke(id LeaseID) error + + // Attach attaches given leaseItem to the lease with given LeaseID. + // If the lease does not exist, an error will be returned. + Attach(id LeaseID, items []LeaseItem) error + + // GetLease returns LeaseID for given item. + // If no lease found, NoLease value will be returned. + GetLease(item LeaseItem) LeaseID + + // Detach detaches given leaseItem from the lease with given LeaseID. + // If the lease does not exist, an error will be returned. + Detach(id LeaseID, items []LeaseItem) error + + // Promote promotes the lessor to be the primary lessor. Primary lessor manages + // the expiration and renew of leases. + // Newly promoted lessor renew the TTL of all lease to extend + previous TTL. + Promote(extend time.Duration) + + // Demote demotes the lessor from being the primary lessor. + Demote() + + // Renew renews a lease with given ID. It returns the renewed TTL. If the ID does not exist, + // an error will be returned. + Renew(id LeaseID) (int64, error) + + // Lookup gives the lease at a given lease id, if any + Lookup(id LeaseID) *Lease + + // ExpiredLeasesC returns a chan that is used to receive expired leases. + ExpiredLeasesC() <-chan []*Lease + + // Recover recovers the lessor state from the given backend and RangeDeleter. + Recover(b backend.Backend, rd RangeDeleter) + + // Stop stops the lessor for managing leases. The behavior of calling Stop multiple + // times is undefined. + Stop() +} + +// lessor implements Lessor interface. +// TODO: use clockwork for testability. +type lessor struct { + mu sync.Mutex + + // demotec is set when the lessor is the primary. + // demotec will be closed if the lessor is demoted. + demotec chan struct{} + + // TODO: probably this should be a heap with a secondary + // id index. + // Now it is O(N) to loop over the leases to find expired ones. + // We want to make Grant, Revoke, and findExpiredLeases all O(logN) and + // Renew O(1). + // findExpiredLeases and Renew should be the most frequent operations. + leaseMap map[LeaseID]*Lease + + itemMap map[LeaseItem]LeaseID + + // When a lease expires, the lessor will delete the + // leased range (or key) by the RangeDeleter. + rd RangeDeleter + + // backend to persist leases. We only persist lease ID and expiry for now. + // The leased items can be recovered by iterating all the keys in kv. + b backend.Backend + + // minLeaseTTL is the minimum lease TTL that can be granted for a lease. Any + // requests for shorter TTLs are extended to the minimum TTL. + minLeaseTTL int64 + + expiredC chan []*Lease + // stopC is a channel whose closure indicates that the lessor should be stopped. + stopC chan struct{} + // doneC is a channel whose closure indicates that the lessor is stopped. + doneC chan struct{} +} + +func NewLessor(b backend.Backend, minLeaseTTL int64) Lessor { + return newLessor(b, minLeaseTTL) +} + +func newLessor(b backend.Backend, minLeaseTTL int64) *lessor { + l := &lessor{ + leaseMap: make(map[LeaseID]*Lease), + itemMap: make(map[LeaseItem]LeaseID), + b: b, + minLeaseTTL: minLeaseTTL, + // expiredC is a small buffered chan to avoid unnecessary blocking. + expiredC: make(chan []*Lease, 16), + stopC: make(chan struct{}), + doneC: make(chan struct{}), + } + l.initAndRecover() + + go l.runLoop() + + return l +} + +// isPrimary indicates if this lessor is the primary lessor. The primary +// lessor manages lease expiration and renew. +// +// in etcd, raft leader is the primary. Thus there might be two primary +// leaders at the same time (raft allows concurrent leader but with different term) +// for at most a leader election timeout. +// The old primary leader cannot affect the correctness since its proposal has a +// smaller term and will not be committed. +// +// TODO: raft follower do not forward lease management proposals. There might be a +// very small window (within second normally which depends on go scheduling) that +// a raft follow is the primary between the raft leader demotion and lessor demotion. +// Usually this should not be a problem. Lease should not be that sensitive to timing. +func (le *lessor) isPrimary() bool { + return le.demotec != nil +} + +func (le *lessor) SetRangeDeleter(rd RangeDeleter) { + le.mu.Lock() + defer le.mu.Unlock() + + le.rd = rd +} + +func (le *lessor) Grant(id LeaseID, ttl int64) (*Lease, error) { + if id == NoLease { + return nil, ErrLeaseNotFound + } + + // TODO: when lessor is under high load, it should give out lease + // with longer TTL to reduce renew load. + l := &Lease{ + ID: id, + ttl: ttl, + itemSet: make(map[LeaseItem]struct{}), + revokec: make(chan struct{}), + } + + le.mu.Lock() + defer le.mu.Unlock() + + if _, ok := le.leaseMap[id]; ok { + return nil, ErrLeaseExists + } + + if l.ttl < le.minLeaseTTL { + l.ttl = le.minLeaseTTL + } + + if le.isPrimary() { + l.refresh(0) + } else { + l.forever() + } + + le.leaseMap[id] = l + l.persistTo(le.b) + + return l, nil +} + +func (le *lessor) Revoke(id LeaseID) error { + le.mu.Lock() + + l := le.leaseMap[id] + if l == nil { + le.mu.Unlock() + return ErrLeaseNotFound + } + defer close(l.revokec) + // unlock before doing external work + le.mu.Unlock() + + if le.rd == nil { + return nil + } + + txn := le.rd() + + // sort keys so deletes are in same order among all members, + // otherwise the backened hashes will be different + keys := l.Keys() + sort.StringSlice(keys).Sort() + for _, key := range keys { + txn.DeleteRange([]byte(key), nil) + } + + le.mu.Lock() + defer le.mu.Unlock() + delete(le.leaseMap, l.ID) + // lease deletion needs to be in the same backend transaction with the + // kv deletion. Or we might end up with not executing the revoke or not + // deleting the keys if etcdserver fails in between. + le.b.BatchTx().UnsafeDelete(leaseBucketName, int64ToBytes(int64(l.ID))) + + txn.End() + return nil +} + +// Renew renews an existing lease. If the given lease does not exist or +// has expired, an error will be returned. +func (le *lessor) Renew(id LeaseID) (int64, error) { + le.mu.Lock() + + unlock := func() { le.mu.Unlock() } + defer func() { unlock() }() + + if !le.isPrimary() { + // forward renew request to primary instead of returning error. + return -1, ErrNotPrimary + } + + demotec := le.demotec + + l := le.leaseMap[id] + if l == nil { + return -1, ErrLeaseNotFound + } + + if l.expired() { + le.mu.Unlock() + unlock = func() {} + select { + // A expired lease might be pending for revoking or going through + // quorum to be revoked. To be accurate, renew request must wait for the + // deletion to complete. + case <-l.revokec: + return -1, ErrLeaseNotFound + // The expired lease might fail to be revoked if the primary changes. + // The caller will retry on ErrNotPrimary. + case <-demotec: + return -1, ErrNotPrimary + case <-le.stopC: + return -1, ErrNotPrimary + } + } + + l.refresh(0) + return l.ttl, nil +} + +func (le *lessor) Lookup(id LeaseID) *Lease { + le.mu.Lock() + defer le.mu.Unlock() + return le.leaseMap[id] +} + +func (le *lessor) Promote(extend time.Duration) { + le.mu.Lock() + defer le.mu.Unlock() + + le.demotec = make(chan struct{}) + + // refresh the expiries of all leases. + for _, l := range le.leaseMap { + l.refresh(extend) + } + + if len(le.leaseMap) < leaseRevokeRate { + // no possibility of lease pile-up + return + } + + // adjust expiries in case of overlap + leases := make([]*Lease, 0, len(le.leaseMap)) + for _, l := range le.leaseMap { + leases = append(leases, l) + } + sort.Sort(leasesByExpiry(leases)) + + baseWindow := leases[0].Remaining() + nextWindow := baseWindow + time.Second + expires := 0 + // have fewer expires than the total revoke rate so piled up leases + // don't consume the entire revoke limit + targetExpiresPerSecond := (3 * leaseRevokeRate) / 4 + for _, l := range leases { + remaining := l.Remaining() + if remaining > nextWindow { + baseWindow = remaining + nextWindow = baseWindow + time.Second + expires = 1 + continue + } + expires++ + if expires <= targetExpiresPerSecond { + continue + } + rateDelay := float64(time.Second) * (float64(expires) / float64(targetExpiresPerSecond)) + // If leases are extended by n seconds, leases n seconds ahead of the + // base window should be extended by only one second. + rateDelay -= float64(remaining - baseWindow) + delay := time.Duration(rateDelay) + nextWindow = baseWindow + delay + l.refresh(delay + extend) + } +} + +type leasesByExpiry []*Lease + +func (le leasesByExpiry) Len() int { return len(le) } +func (le leasesByExpiry) Less(i, j int) bool { return le[i].Remaining() < le[j].Remaining() } +func (le leasesByExpiry) Swap(i, j int) { le[i], le[j] = le[j], le[i] } + +func (le *lessor) Demote() { + le.mu.Lock() + defer le.mu.Unlock() + + // set the expiries of all leases to forever + for _, l := range le.leaseMap { + l.forever() + } + + if le.demotec != nil { + close(le.demotec) + le.demotec = nil + } +} + +// Attach attaches items to the lease with given ID. When the lease +// expires, the attached items will be automatically removed. +// If the given lease does not exist, an error will be returned. +func (le *lessor) Attach(id LeaseID, items []LeaseItem) error { + le.mu.Lock() + defer le.mu.Unlock() + + l := le.leaseMap[id] + if l == nil { + return ErrLeaseNotFound + } + + l.mu.Lock() + for _, it := range items { + l.itemSet[it] = struct{}{} + le.itemMap[it] = id + } + l.mu.Unlock() + return nil +} + +func (le *lessor) GetLease(item LeaseItem) LeaseID { + le.mu.Lock() + id := le.itemMap[item] + le.mu.Unlock() + return id +} + +// Detach detaches items from the lease with given ID. +// If the given lease does not exist, an error will be returned. +func (le *lessor) Detach(id LeaseID, items []LeaseItem) error { + le.mu.Lock() + defer le.mu.Unlock() + + l := le.leaseMap[id] + if l == nil { + return ErrLeaseNotFound + } + + l.mu.Lock() + for _, it := range items { + delete(l.itemSet, it) + delete(le.itemMap, it) + } + l.mu.Unlock() + return nil +} + +func (le *lessor) Recover(b backend.Backend, rd RangeDeleter) { + le.mu.Lock() + defer le.mu.Unlock() + + le.b = b + le.rd = rd + le.leaseMap = make(map[LeaseID]*Lease) + le.itemMap = make(map[LeaseItem]LeaseID) + le.initAndRecover() +} + +func (le *lessor) ExpiredLeasesC() <-chan []*Lease { + return le.expiredC +} + +func (le *lessor) Stop() { + close(le.stopC) + <-le.doneC +} + +func (le *lessor) runLoop() { + defer close(le.doneC) + + for { + var ls []*Lease + + le.mu.Lock() + if le.isPrimary() { + ls = le.findExpiredLeases() + } + le.mu.Unlock() + + if len(ls) != 0 { + // rate limit + if len(ls) > leaseRevokeRate/2 { + ls = ls[:leaseRevokeRate/2] + } + select { + case <-le.stopC: + return + case le.expiredC <- ls: + default: + // the receiver of expiredC is probably busy handling + // other stuff + // let's try this next time after 500ms + } + } + + select { + case <-time.After(500 * time.Millisecond): + case <-le.stopC: + return + } + } +} + +// findExpiredLeases loops all the leases in the leaseMap and returns the expired +// leases that needed to be revoked. +func (le *lessor) findExpiredLeases() []*Lease { + leases := make([]*Lease, 0, 16) + + for _, l := range le.leaseMap { + // TODO: probably should change to <= 100-500 millisecond to + // make up committing latency. + if l.expired() { + leases = append(leases, l) + } + } + + return leases +} + +func (le *lessor) initAndRecover() { + tx := le.b.BatchTx() + tx.Lock() + + tx.UnsafeCreateBucket(leaseBucketName) + _, vs := tx.UnsafeRange(leaseBucketName, int64ToBytes(0), int64ToBytes(math.MaxInt64), 0) + // TODO: copy vs and do decoding outside tx lock if lock contention becomes an issue. + for i := range vs { + var lpb leasepb.Lease + err := lpb.Unmarshal(vs[i]) + if err != nil { + tx.Unlock() + panic("failed to unmarshal lease proto item") + } + ID := LeaseID(lpb.ID) + if lpb.TTL < le.minLeaseTTL { + lpb.TTL = le.minLeaseTTL + } + le.leaseMap[ID] = &Lease{ + ID: ID, + ttl: lpb.TTL, + // itemSet will be filled in when recover key-value pairs + // set expiry to forever, refresh when promoted + itemSet: make(map[LeaseItem]struct{}), + expiry: forever, + revokec: make(chan struct{}), + } + } + tx.Unlock() + + le.b.ForceCommit() +} + +type Lease struct { + ID LeaseID + ttl int64 // time to live in seconds + // expiry is time when lease should expire; must be 64-bit aligned. + expiry monotime.Time + + // mu protects concurrent accesses to itemSet + mu sync.RWMutex + itemSet map[LeaseItem]struct{} + revokec chan struct{} +} + +func (l *Lease) expired() bool { + return l.Remaining() <= 0 +} + +func (l *Lease) persistTo(b backend.Backend) { + key := int64ToBytes(int64(l.ID)) + + lpb := leasepb.Lease{ID: int64(l.ID), TTL: int64(l.ttl)} + val, err := lpb.Marshal() + if err != nil { + panic("failed to marshal lease proto item") + } + + b.BatchTx().Lock() + b.BatchTx().UnsafePut(leaseBucketName, key, val) + b.BatchTx().Unlock() +} + +// TTL returns the TTL of the Lease. +func (l *Lease) TTL() int64 { + return l.ttl +} + +// refresh refreshes the expiry of the lease. +func (l *Lease) refresh(extend time.Duration) { + t := monotime.Now().Add(extend + time.Duration(l.ttl)*time.Second) + atomic.StoreUint64((*uint64)(&l.expiry), uint64(t)) +} + +// forever sets the expiry of lease to be forever. +func (l *Lease) forever() { atomic.StoreUint64((*uint64)(&l.expiry), uint64(forever)) } + +// Keys returns all the keys attached to the lease. +func (l *Lease) Keys() []string { + l.mu.RLock() + keys := make([]string, 0, len(l.itemSet)) + for k := range l.itemSet { + keys = append(keys, k.Key) + } + l.mu.RUnlock() + return keys +} + +// Remaining returns the remaining time of the lease. +func (l *Lease) Remaining() time.Duration { + t := monotime.Time(atomic.LoadUint64((*uint64)(&l.expiry))) + return time.Duration(t - monotime.Now()) +} + +type LeaseItem struct { + Key string +} + +func int64ToBytes(n int64) []byte { + bytes := make([]byte, 8) + binary.BigEndian.PutUint64(bytes, uint64(n)) + return bytes +} + +// FakeLessor is a fake implementation of Lessor interface. +// Used for testing only. +type FakeLessor struct{} + +func (fl *FakeLessor) SetRangeDeleter(dr RangeDeleter) {} + +func (fl *FakeLessor) Grant(id LeaseID, ttl int64) (*Lease, error) { return nil, nil } + +func (fl *FakeLessor) Revoke(id LeaseID) error { return nil } + +func (fl *FakeLessor) Attach(id LeaseID, items []LeaseItem) error { return nil } + +func (fl *FakeLessor) GetLease(item LeaseItem) LeaseID { return 0 } +func (fl *FakeLessor) Detach(id LeaseID, items []LeaseItem) error { return nil } + +func (fl *FakeLessor) Promote(extend time.Duration) {} + +func (fl *FakeLessor) Demote() {} + +func (fl *FakeLessor) Renew(id LeaseID) (int64, error) { return 10, nil } + +func (le *FakeLessor) Lookup(id LeaseID) *Lease { return nil } + +func (fl *FakeLessor) ExpiredLeasesC() <-chan []*Lease { return nil } + +func (fl *FakeLessor) Recover(b backend.Backend, rd RangeDeleter) {} + +func (fl *FakeLessor) Stop() {} diff --git a/deps/github.com/coreos/etcd/mvcc/backend/backend.go b/deps/github.com/coreos/etcd/mvcc/backend/backend.go new file mode 100644 index 000000000..87edd25f4 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/backend.go @@ -0,0 +1,443 @@ +// Copyright 2015 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. + +package backend + +import ( + "fmt" + "hash/crc32" + "io" + "io/ioutil" + "os" + "path/filepath" + "sync" + "sync/atomic" + "time" + + bolt "github.com/coreos/bbolt" + "github.com/coreos/pkg/capnslog" +) + +var ( + defaultBatchLimit = 10000 + defaultBatchInterval = 100 * time.Millisecond + + defragLimit = 10000 + + // initialMmapSize is the initial size of the mmapped region. Setting this larger than + // the potential max db size can prevent writer from blocking reader. + // This only works for linux. + initialMmapSize = uint64(10 * 1024 * 1024 * 1024) + + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "mvcc/backend") + + // minSnapshotWarningTimeout is the minimum threshold to trigger a long running snapshot warning. + minSnapshotWarningTimeout = time.Duration(30 * time.Second) +) + +type Backend interface { + ReadTx() ReadTx + BatchTx() BatchTx + + Snapshot() Snapshot + Hash(ignores map[IgnoreKey]struct{}) (uint32, error) + // Size returns the current size of the backend. + Size() int64 + Defrag() error + ForceCommit() + Close() error +} + +type Snapshot interface { + // Size gets the size of the snapshot. + Size() int64 + // WriteTo writes the snapshot into the given writer. + WriteTo(w io.Writer) (n int64, err error) + // Close closes the snapshot. + Close() error +} + +type backend struct { + // size and commits are used with atomic operations so they must be + // 64-bit aligned, otherwise 32-bit tests will crash + + // size is the number of bytes in the backend + size int64 + // commits counts number of commits since start + commits int64 + + mu sync.RWMutex + db *bolt.DB + + batchInterval time.Duration + batchLimit int + batchTx *batchTxBuffered + + readTx *readTx + + stopc chan struct{} + donec chan struct{} +} + +type BackendConfig struct { + // Path is the file path to the backend file. + Path string + // BatchInterval is the maximum time before flushing the BatchTx. + BatchInterval time.Duration + // BatchLimit is the maximum puts before flushing the BatchTx. + BatchLimit int + // MmapSize is the number of bytes to mmap for the backend. + MmapSize uint64 +} + +func DefaultBackendConfig() BackendConfig { + return BackendConfig{ + BatchInterval: defaultBatchInterval, + BatchLimit: defaultBatchLimit, + MmapSize: initialMmapSize, + } +} + +func New(bcfg BackendConfig) Backend { + return newBackend(bcfg) +} + +func NewDefaultBackend(path string) Backend { + bcfg := DefaultBackendConfig() + bcfg.Path = path + return newBackend(bcfg) +} + +func newBackend(bcfg BackendConfig) *backend { + bopts := &bolt.Options{} + if boltOpenOptions != nil { + *bopts = *boltOpenOptions + } + bopts.InitialMmapSize = bcfg.mmapSize() + + db, err := bolt.Open(bcfg.Path, 0600, bopts) + if err != nil { + plog.Panicf("cannot open database at %s (%v)", bcfg.Path, err) + } + + // In future, may want to make buffering optional for low-concurrency systems + // or dynamically swap between buffered/non-buffered depending on workload. + b := &backend{ + db: db, + + batchInterval: bcfg.BatchInterval, + batchLimit: bcfg.BatchLimit, + + readTx: &readTx{buf: txReadBuffer{ + txBuffer: txBuffer{make(map[string]*bucketBuffer)}}, + }, + + stopc: make(chan struct{}), + donec: make(chan struct{}), + } + b.batchTx = newBatchTxBuffered(b) + go b.run() + return b +} + +// BatchTx returns the current batch tx in coalescer. The tx can be used for read and +// write operations. The write result can be retrieved within the same tx immediately. +// The write result is isolated with other txs until the current one get committed. +func (b *backend) BatchTx() BatchTx { + return b.batchTx +} + +func (b *backend) ReadTx() ReadTx { return b.readTx } + +// ForceCommit forces the current batching tx to commit. +func (b *backend) ForceCommit() { + b.batchTx.Commit() +} + +func (b *backend) Snapshot() Snapshot { + b.batchTx.Commit() + + b.mu.RLock() + defer b.mu.RUnlock() + tx, err := b.db.Begin(false) + if err != nil { + plog.Fatalf("cannot begin tx (%s)", err) + } + + stopc, donec := make(chan struct{}), make(chan struct{}) + dbBytes := tx.Size() + go func() { + defer close(donec) + // sendRateBytes is based on transferring snapshot data over a 1 gigabit/s connection + // assuming a min tcp throughput of 100MB/s. + var sendRateBytes int64 = 100 * 1024 * 1014 + warningTimeout := time.Duration(int64((float64(dbBytes) / float64(sendRateBytes)) * float64(time.Second))) + if warningTimeout < minSnapshotWarningTimeout { + warningTimeout = minSnapshotWarningTimeout + } + start := time.Now() + ticker := time.NewTicker(warningTimeout) + defer ticker.Stop() + for { + select { + case <-ticker.C: + plog.Warningf("snapshotting is taking more than %v seconds to finish transferring %v MB [started at %v]", time.Since(start).Seconds(), float64(dbBytes)/float64(1024*1014), start) + case <-stopc: + snapshotDurations.Observe(time.Since(start).Seconds()) + return + } + } + }() + + return &snapshot{tx, stopc, donec} +} + +type IgnoreKey struct { + Bucket string + Key string +} + +func (b *backend) Hash(ignores map[IgnoreKey]struct{}) (uint32, error) { + h := crc32.New(crc32.MakeTable(crc32.Castagnoli)) + + b.mu.RLock() + defer b.mu.RUnlock() + err := b.db.View(func(tx *bolt.Tx) error { + c := tx.Cursor() + for next, _ := c.First(); next != nil; next, _ = c.Next() { + b := tx.Bucket(next) + if b == nil { + return fmt.Errorf("cannot get hash of bucket %s", string(next)) + } + h.Write(next) + b.ForEach(func(k, v []byte) error { + bk := IgnoreKey{Bucket: string(next), Key: string(k)} + if _, ok := ignores[bk]; !ok { + h.Write(k) + h.Write(v) + } + return nil + }) + } + return nil + }) + + if err != nil { + return 0, err + } + + return h.Sum32(), nil +} + +func (b *backend) Size() int64 { + return atomic.LoadInt64(&b.size) +} + +func (b *backend) run() { + defer close(b.donec) + t := time.NewTimer(b.batchInterval) + defer t.Stop() + for { + select { + case <-t.C: + case <-b.stopc: + b.batchTx.CommitAndStop() + return + } + b.batchTx.Commit() + t.Reset(b.batchInterval) + } +} + +func (b *backend) Close() error { + close(b.stopc) + <-b.donec + return b.db.Close() +} + +// Commits returns total number of commits since start +func (b *backend) Commits() int64 { + return atomic.LoadInt64(&b.commits) +} + +func (b *backend) Defrag() error { + err := b.defrag() + if err != nil { + return err + } + + // commit to update metadata like db.size + b.batchTx.Commit() + + return nil +} + +func (b *backend) defrag() error { + // TODO: make this non-blocking? + // lock batchTx to ensure nobody is using previous tx, and then + // close previous ongoing tx. + b.batchTx.Lock() + defer b.batchTx.Unlock() + + // lock database after lock tx to avoid deadlock. + b.mu.Lock() + defer b.mu.Unlock() + + // block concurrent read requests while resetting tx + b.readTx.mu.Lock() + defer b.readTx.mu.Unlock() + + b.batchTx.unsafeCommit(true) + b.batchTx.tx = nil + + tmpdb, err := bolt.Open(b.db.Path()+".tmp", 0600, boltOpenOptions) + if err != nil { + return err + } + + err = defragdb(b.db, tmpdb, defragLimit) + + if err != nil { + tmpdb.Close() + os.RemoveAll(tmpdb.Path()) + return err + } + + dbp := b.db.Path() + tdbp := tmpdb.Path() + + err = b.db.Close() + if err != nil { + plog.Fatalf("cannot close database (%s)", err) + } + err = tmpdb.Close() + if err != nil { + plog.Fatalf("cannot close database (%s)", err) + } + err = os.Rename(tdbp, dbp) + if err != nil { + plog.Fatalf("cannot rename database (%s)", err) + } + + b.db, err = bolt.Open(dbp, 0600, boltOpenOptions) + if err != nil { + plog.Panicf("cannot open database at %s (%v)", dbp, err) + } + b.batchTx.tx, err = b.db.Begin(true) + if err != nil { + plog.Fatalf("cannot begin tx (%s)", err) + } + + b.readTx.buf.reset() + b.readTx.tx = b.unsafeBegin(false) + atomic.StoreInt64(&b.size, b.readTx.tx.Size()) + + return nil +} + +func defragdb(odb, tmpdb *bolt.DB, limit int) error { + // open a tx on tmpdb for writes + tmptx, err := tmpdb.Begin(true) + if err != nil { + return err + } + + // open a tx on old db for read + tx, err := odb.Begin(false) + if err != nil { + return err + } + defer tx.Rollback() + + c := tx.Cursor() + + count := 0 + for next, _ := c.First(); next != nil; next, _ = c.Next() { + b := tx.Bucket(next) + if b == nil { + return fmt.Errorf("backend: cannot defrag bucket %s", string(next)) + } + + tmpb, berr := tmptx.CreateBucketIfNotExists(next) + tmpb.FillPercent = 0.9 // for seq write in for each + if berr != nil { + return berr + } + + b.ForEach(func(k, v []byte) error { + count++ + if count > limit { + err = tmptx.Commit() + if err != nil { + return err + } + tmptx, err = tmpdb.Begin(true) + if err != nil { + return err + } + tmpb = tmptx.Bucket(next) + tmpb.FillPercent = 0.9 // for seq write in for each + + count = 0 + } + return tmpb.Put(k, v) + }) + } + + return tmptx.Commit() +} + +func (b *backend) begin(write bool) *bolt.Tx { + b.mu.RLock() + tx := b.unsafeBegin(write) + b.mu.RUnlock() + atomic.StoreInt64(&b.size, tx.Size()) + return tx +} + +func (b *backend) unsafeBegin(write bool) *bolt.Tx { + tx, err := b.db.Begin(write) + if err != nil { + plog.Fatalf("cannot begin tx (%s)", err) + } + return tx +} + +// NewTmpBackend creates a backend implementation for testing. +func NewTmpBackend(batchInterval time.Duration, batchLimit int) (*backend, string) { + dir, err := ioutil.TempDir(os.TempDir(), "etcd_backend_test") + if err != nil { + plog.Fatal(err) + } + tmpPath := filepath.Join(dir, "database") + bcfg := DefaultBackendConfig() + bcfg.Path, bcfg.BatchInterval, bcfg.BatchLimit = tmpPath, batchInterval, batchLimit + return newBackend(bcfg), tmpPath +} + +func NewDefaultTmpBackend() (*backend, string) { + return NewTmpBackend(defaultBatchInterval, defaultBatchLimit) +} + +type snapshot struct { + *bolt.Tx + stopc chan struct{} + donec chan struct{} +} + +func (s *snapshot) Close() error { + close(s.stopc) + <-s.donec + return s.Tx.Rollback() +} diff --git a/deps/github.com/coreos/etcd/mvcc/backend/batch_tx.go b/deps/github.com/coreos/etcd/mvcc/backend/batch_tx.go new file mode 100644 index 000000000..e5fb84740 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/batch_tx.go @@ -0,0 +1,266 @@ +// Copyright 2015 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. + +package backend + +import ( + "bytes" + "fmt" + "math" + "sync" + "sync/atomic" + "time" + + bolt "github.com/coreos/bbolt" +) + +type BatchTx interface { + ReadTx + UnsafeCreateBucket(name []byte) + UnsafePut(bucketName []byte, key []byte, value []byte) + UnsafeSeqPut(bucketName []byte, key []byte, value []byte) + UnsafeDelete(bucketName []byte, key []byte) + // Commit commits a previous tx and begins a new writable one. + Commit() + // CommitAndStop commits the previous tx and does not create a new one. + CommitAndStop() +} + +type batchTx struct { + sync.Mutex + tx *bolt.Tx + backend *backend + + pending int +} + +func (t *batchTx) UnsafeCreateBucket(name []byte) { + _, err := t.tx.CreateBucket(name) + if err != nil && err != bolt.ErrBucketExists { + plog.Fatalf("cannot create bucket %s (%v)", name, err) + } + t.pending++ +} + +// UnsafePut must be called holding the lock on the tx. +func (t *batchTx) UnsafePut(bucketName []byte, key []byte, value []byte) { + t.unsafePut(bucketName, key, value, false) +} + +// UnsafeSeqPut must be called holding the lock on the tx. +func (t *batchTx) UnsafeSeqPut(bucketName []byte, key []byte, value []byte) { + t.unsafePut(bucketName, key, value, true) +} + +func (t *batchTx) unsafePut(bucketName []byte, key []byte, value []byte, seq bool) { + bucket := t.tx.Bucket(bucketName) + if bucket == nil { + plog.Fatalf("bucket %s does not exist", bucketName) + } + if seq { + // it is useful to increase fill percent when the workloads are mostly append-only. + // this can delay the page split and reduce space usage. + bucket.FillPercent = 0.9 + } + if err := bucket.Put(key, value); err != nil { + plog.Fatalf("cannot put key into bucket (%v)", err) + } + t.pending++ +} + +// UnsafeRange must be called holding the lock on the tx. +func (t *batchTx) UnsafeRange(bucketName, key, endKey []byte, limit int64) ([][]byte, [][]byte) { + k, v, err := unsafeRange(t.tx, bucketName, key, endKey, limit) + if err != nil { + plog.Fatal(err) + } + return k, v +} + +func unsafeRange(tx *bolt.Tx, bucketName, key, endKey []byte, limit int64) (keys [][]byte, vs [][]byte, err error) { + bucket := tx.Bucket(bucketName) + if bucket == nil { + return nil, nil, fmt.Errorf("bucket %s does not exist", bucketName) + } + if len(endKey) == 0 { + if v := bucket.Get(key); v != nil { + return append(keys, key), append(vs, v), nil + } + return nil, nil, nil + } + if limit <= 0 { + limit = math.MaxInt64 + } + c := bucket.Cursor() + for ck, cv := c.Seek(key); ck != nil && bytes.Compare(ck, endKey) < 0; ck, cv = c.Next() { + vs = append(vs, cv) + keys = append(keys, ck) + if limit == int64(len(keys)) { + break + } + } + return keys, vs, nil +} + +// UnsafeDelete must be called holding the lock on the tx. +func (t *batchTx) UnsafeDelete(bucketName []byte, key []byte) { + bucket := t.tx.Bucket(bucketName) + if bucket == nil { + plog.Fatalf("bucket %s does not exist", bucketName) + } + err := bucket.Delete(key) + if err != nil { + plog.Fatalf("cannot delete key from bucket (%v)", err) + } + t.pending++ +} + +// UnsafeForEach must be called holding the lock on the tx. +func (t *batchTx) UnsafeForEach(bucketName []byte, visitor func(k, v []byte) error) error { + return unsafeForEach(t.tx, bucketName, visitor) +} + +func unsafeForEach(tx *bolt.Tx, bucket []byte, visitor func(k, v []byte) error) error { + if b := tx.Bucket(bucket); b != nil { + return b.ForEach(visitor) + } + return nil +} + +// Commit commits a previous tx and begins a new writable one. +func (t *batchTx) Commit() { + t.Lock() + defer t.Unlock() + t.commit(false) +} + +// CommitAndStop commits the previous tx and does not create a new one. +func (t *batchTx) CommitAndStop() { + t.Lock() + defer t.Unlock() + t.commit(true) +} + +func (t *batchTx) Unlock() { + if t.pending >= t.backend.batchLimit { + t.commit(false) + } + t.Mutex.Unlock() +} + +func (t *batchTx) commit(stop bool) { + // commit the last tx + if t.tx != nil { + if t.pending == 0 && !stop { + t.backend.mu.RLock() + defer t.backend.mu.RUnlock() + + // t.tx.DB()==nil if 'CommitAndStop' calls 'batchTx.commit(true)', + // which initializes *bolt.Tx.db and *bolt.Tx.meta as nil; panics t.tx.Size(). + // Server must make sure 'batchTx.commit(false)' does not follow + // 'batchTx.commit(true)' (e.g. stopping backend, and inflight Hash call). + atomic.StoreInt64(&t.backend.size, t.tx.Size()) + return + } + + start := time.Now() + // gofail: var beforeCommit struct{} + err := t.tx.Commit() + // gofail: var afterCommit struct{} + commitDurations.Observe(time.Since(start).Seconds()) + atomic.AddInt64(&t.backend.commits, 1) + + t.pending = 0 + if err != nil { + plog.Fatalf("cannot commit tx (%s)", err) + } + } + if !stop { + t.tx = t.backend.begin(true) + } +} + +type batchTxBuffered struct { + batchTx + buf txWriteBuffer +} + +func newBatchTxBuffered(backend *backend) *batchTxBuffered { + tx := &batchTxBuffered{ + batchTx: batchTx{backend: backend}, + buf: txWriteBuffer{ + txBuffer: txBuffer{make(map[string]*bucketBuffer)}, + seq: true, + }, + } + tx.Commit() + return tx +} + +func (t *batchTxBuffered) Unlock() { + if t.pending != 0 { + t.backend.readTx.mu.Lock() + t.buf.writeback(&t.backend.readTx.buf) + t.backend.readTx.mu.Unlock() + if t.pending >= t.backend.batchLimit { + t.commit(false) + } + } + t.batchTx.Unlock() +} + +func (t *batchTxBuffered) Commit() { + t.Lock() + defer t.Unlock() + t.commit(false) +} + +func (t *batchTxBuffered) CommitAndStop() { + t.Lock() + defer t.Unlock() + t.commit(true) +} + +func (t *batchTxBuffered) commit(stop bool) { + // all read txs must be closed to acquire boltdb commit rwlock + t.backend.readTx.mu.Lock() + defer t.backend.readTx.mu.Unlock() + t.unsafeCommit(stop) +} + +func (t *batchTxBuffered) unsafeCommit(stop bool) { + if t.backend.readTx.tx != nil { + if err := t.backend.readTx.tx.Rollback(); err != nil { + plog.Fatalf("cannot rollback tx (%s)", err) + } + t.backend.readTx.buf.reset() + t.backend.readTx.tx = nil + } + + t.batchTx.commit(stop) + + if !stop { + t.backend.readTx.tx = t.backend.begin(false) + } +} + +func (t *batchTxBuffered) UnsafePut(bucketName []byte, key []byte, value []byte) { + t.batchTx.UnsafePut(bucketName, key, value) + t.buf.put(bucketName, key, value) +} + +func (t *batchTxBuffered) UnsafeSeqPut(bucketName []byte, key []byte, value []byte) { + t.batchTx.UnsafeSeqPut(bucketName, key, value) + t.buf.putSeq(bucketName, key, value) +} diff --git a/deps/github.com/coreos/etcd/mvcc/backend/config_default.go b/deps/github.com/coreos/etcd/mvcc/backend/config_default.go new file mode 100644 index 000000000..edfed0025 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/config_default.go @@ -0,0 +1,23 @@ +// 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. + +// +build !linux,!windows + +package backend + +import bolt "github.com/coreos/bbolt" + +var boltOpenOptions *bolt.Options = nil + +func (bcfg *BackendConfig) mmapSize() int { return int(bcfg.MmapSize) } diff --git a/deps/github.com/coreos/etcd/mvcc/backend/config_linux.go b/deps/github.com/coreos/etcd/mvcc/backend/config_linux.go new file mode 100644 index 000000000..a8f6abeba --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/config_linux.go @@ -0,0 +1,33 @@ +// Copyright 2015 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. + +package backend + +import ( + "syscall" + + bolt "github.com/coreos/bbolt" +) + +// syscall.MAP_POPULATE on linux 2.6.23+ does sequential read-ahead +// which can speed up entire-database read with boltdb. We want to +// enable MAP_POPULATE for faster key-value store recovery in storage +// package. If your kernel version is lower than 2.6.23 +// (https://github.com/torvalds/linux/releases/tag/v2.6.23), mmap might +// silently ignore this flag. Please update your kernel to prevent this. +var boltOpenOptions = &bolt.Options{ + MmapFlags: syscall.MAP_POPULATE, +} + +func (bcfg *BackendConfig) mmapSize() int { return int(bcfg.MmapSize) } diff --git a/deps/github.com/coreos/etcd/mvcc/backend/config_windows.go b/deps/github.com/coreos/etcd/mvcc/backend/config_windows.go new file mode 100644 index 000000000..71d02700b --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/config_windows.go @@ -0,0 +1,26 @@ +// Copyright 2017 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. + +// +build windows + +package backend + +import bolt "github.com/coreos/bbolt" + +var boltOpenOptions *bolt.Options = nil + +// setting mmap size != 0 on windows will allocate the entire +// mmap size for the file, instead of growing it. So, force 0. + +func (bcfg *BackendConfig) mmapSize() int { return 0 } diff --git a/deps/github.com/coreos/etcd/mvcc/backend/doc.go b/deps/github.com/coreos/etcd/mvcc/backend/doc.go new file mode 100644 index 000000000..9cc42fa79 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/doc.go @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +// Package backend defines a standard interface for etcd's backend MVCC storage. +package backend diff --git a/deps/github.com/coreos/etcd/mvcc/backend/metrics.go b/deps/github.com/coreos/etcd/mvcc/backend/metrics.go new file mode 100644 index 000000000..30a388014 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/metrics.go @@ -0,0 +1,41 @@ +// 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. + +package backend + +import "github.com/prometheus/client_golang/prometheus" + +var ( + commitDurations = prometheus.NewHistogram(prometheus.HistogramOpts{ + Namespace: "etcd", + Subsystem: "disk", + Name: "backend_commit_duration_seconds", + Help: "The latency distributions of commit called by backend.", + Buckets: prometheus.ExponentialBuckets(0.001, 2, 14), + }) + + snapshotDurations = prometheus.NewHistogram(prometheus.HistogramOpts{ + Namespace: "etcd", + Subsystem: "disk", + Name: "backend_snapshot_duration_seconds", + Help: "The latency distribution of backend snapshots.", + // 10 ms -> 655 seconds + Buckets: prometheus.ExponentialBuckets(.01, 2, 17), + }) +) + +func init() { + prometheus.MustRegister(commitDurations) + prometheus.MustRegister(snapshotDurations) +} diff --git a/deps/github.com/coreos/etcd/mvcc/backend/read_tx.go b/deps/github.com/coreos/etcd/mvcc/backend/read_tx.go new file mode 100644 index 000000000..9fc6b7906 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/read_tx.go @@ -0,0 +1,92 @@ +// Copyright 2017 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. + +package backend + +import ( + "bytes" + "math" + "sync" + + bolt "github.com/coreos/bbolt" +) + +// safeRangeBucket is a hack to avoid inadvertently reading duplicate keys; +// overwrites on a bucket should only fetch with limit=1, but safeRangeBucket +// is known to never overwrite any key so range is safe. +var safeRangeBucket = []byte("key") + +type ReadTx interface { + Lock() + Unlock() + + UnsafeRange(bucketName []byte, key, endKey []byte, limit int64) (keys [][]byte, vals [][]byte) + UnsafeForEach(bucketName []byte, visitor func(k, v []byte) error) error +} + +type readTx struct { + // mu protects accesses to the txReadBuffer + mu sync.RWMutex + buf txReadBuffer + + // txmu protects accesses to the Tx on Range requests + txmu sync.Mutex + tx *bolt.Tx +} + +func (rt *readTx) Lock() { rt.mu.RLock() } +func (rt *readTx) Unlock() { rt.mu.RUnlock() } + +func (rt *readTx) UnsafeRange(bucketName, key, endKey []byte, limit int64) ([][]byte, [][]byte) { + if endKey == nil { + // forbid duplicates for single keys + limit = 1 + } + if limit <= 0 { + limit = math.MaxInt64 + } + if limit > 1 && !bytes.Equal(bucketName, safeRangeBucket) { + panic("do not use unsafeRange on non-keys bucket") + } + keys, vals := rt.buf.Range(bucketName, key, endKey, limit) + if int64(len(keys)) == limit { + return keys, vals + } + rt.txmu.Lock() + // ignore error since bucket may have been created in this batch + k2, v2, _ := unsafeRange(rt.tx, bucketName, key, endKey, limit-int64(len(keys))) + rt.txmu.Unlock() + return append(k2, keys...), append(v2, vals...) +} + +func (rt *readTx) UnsafeForEach(bucketName []byte, visitor func(k, v []byte) error) error { + dups := make(map[string]struct{}) + f1 := func(k, v []byte) error { + dups[string(k)] = struct{}{} + return visitor(k, v) + } + f2 := func(k, v []byte) error { + if _, ok := dups[string(k)]; ok { + return nil + } + return visitor(k, v) + } + if err := rt.buf.ForEach(bucketName, f1); err != nil { + return err + } + rt.txmu.Lock() + err := unsafeForEach(rt.tx, bucketName, f2) + rt.txmu.Unlock() + return err +} diff --git a/deps/github.com/coreos/etcd/mvcc/backend/tx_buffer.go b/deps/github.com/coreos/etcd/mvcc/backend/tx_buffer.go new file mode 100644 index 000000000..56e885dbf --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/backend/tx_buffer.go @@ -0,0 +1,181 @@ +// Copyright 2017 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. + +package backend + +import ( + "bytes" + "sort" +) + +// txBuffer handles functionality shared between txWriteBuffer and txReadBuffer. +type txBuffer struct { + buckets map[string]*bucketBuffer +} + +func (txb *txBuffer) reset() { + for k, v := range txb.buckets { + if v.used == 0 { + // demote + delete(txb.buckets, k) + } + v.used = 0 + } +} + +// txWriteBuffer buffers writes of pending updates that have not yet committed. +type txWriteBuffer struct { + txBuffer + seq bool +} + +func (txw *txWriteBuffer) put(bucket, k, v []byte) { + txw.seq = false + txw.putSeq(bucket, k, v) +} + +func (txw *txWriteBuffer) putSeq(bucket, k, v []byte) { + b, ok := txw.buckets[string(bucket)] + if !ok { + b = newBucketBuffer() + txw.buckets[string(bucket)] = b + } + b.add(k, v) +} + +func (txw *txWriteBuffer) writeback(txr *txReadBuffer) { + for k, wb := range txw.buckets { + rb, ok := txr.buckets[k] + if !ok { + delete(txw.buckets, k) + txr.buckets[k] = wb + continue + } + if !txw.seq && wb.used > 1 { + // assume no duplicate keys + sort.Sort(wb) + } + rb.merge(wb) + } + txw.reset() +} + +// txReadBuffer accesses buffered updates. +type txReadBuffer struct{ txBuffer } + +func (txr *txReadBuffer) Range(bucketName, key, endKey []byte, limit int64) ([][]byte, [][]byte) { + if b := txr.buckets[string(bucketName)]; b != nil { + return b.Range(key, endKey, limit) + } + return nil, nil +} + +func (txr *txReadBuffer) ForEach(bucketName []byte, visitor func(k, v []byte) error) error { + if b := txr.buckets[string(bucketName)]; b != nil { + return b.ForEach(visitor) + } + return nil +} + +type kv struct { + key []byte + val []byte +} + +// bucketBuffer buffers key-value pairs that are pending commit. +type bucketBuffer struct { + buf []kv + // used tracks number of elements in use so buf can be reused without reallocation. + used int +} + +func newBucketBuffer() *bucketBuffer { + return &bucketBuffer{buf: make([]kv, 512), used: 0} +} + +func (bb *bucketBuffer) Range(key, endKey []byte, limit int64) (keys [][]byte, vals [][]byte) { + f := func(i int) bool { return bytes.Compare(bb.buf[i].key, key) >= 0 } + idx := sort.Search(bb.used, f) + if idx < 0 { + return nil, nil + } + if len(endKey) == 0 { + if bytes.Equal(key, bb.buf[idx].key) { + keys = append(keys, bb.buf[idx].key) + vals = append(vals, bb.buf[idx].val) + } + return keys, vals + } + if bytes.Compare(endKey, bb.buf[idx].key) <= 0 { + return nil, nil + } + for i := idx; i < bb.used && int64(len(keys)) < limit; i++ { + if bytes.Compare(endKey, bb.buf[i].key) <= 0 { + break + } + keys = append(keys, bb.buf[i].key) + vals = append(vals, bb.buf[i].val) + } + return keys, vals +} + +func (bb *bucketBuffer) ForEach(visitor func(k, v []byte) error) error { + for i := 0; i < bb.used; i++ { + if err := visitor(bb.buf[i].key, bb.buf[i].val); err != nil { + return err + } + } + return nil +} + +func (bb *bucketBuffer) add(k, v []byte) { + bb.buf[bb.used].key, bb.buf[bb.used].val = k, v + bb.used++ + if bb.used == len(bb.buf) { + buf := make([]kv, (3*len(bb.buf))/2) + copy(buf, bb.buf) + bb.buf = buf + } +} + +// merge merges data from bb into bbsrc. +func (bb *bucketBuffer) merge(bbsrc *bucketBuffer) { + for i := 0; i < bbsrc.used; i++ { + bb.add(bbsrc.buf[i].key, bbsrc.buf[i].val) + } + if bb.used == bbsrc.used { + return + } + if bytes.Compare(bb.buf[(bb.used-bbsrc.used)-1].key, bbsrc.buf[0].key) < 0 { + return + } + + sort.Stable(bb) + + // remove duplicates, using only newest update + widx := 0 + for ridx := 1; ridx < bb.used; ridx++ { + if !bytes.Equal(bb.buf[ridx].key, bb.buf[widx].key) { + widx++ + } + bb.buf[widx] = bb.buf[ridx] + } + bb.used = widx + 1 +} + +func (bb *bucketBuffer) Len() int { return bb.used } +func (bb *bucketBuffer) Less(i, j int) bool { + return bytes.Compare(bb.buf[i].key, bb.buf[j].key) < 0 +} +func (bb *bucketBuffer) Swap(i, j int) { bb.buf[i], bb.buf[j] = bb.buf[j], bb.buf[i] } diff --git a/deps/github.com/coreos/etcd/mvcc/doc.go b/deps/github.com/coreos/etcd/mvcc/doc.go new file mode 100644 index 000000000..ad5be0308 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/doc.go @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +// Package mvcc defines etcd's stable MVCC storage. +package mvcc diff --git a/deps/github.com/coreos/etcd/mvcc/index.go b/deps/github.com/coreos/etcd/mvcc/index.go new file mode 100644 index 000000000..991289cdd --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/index.go @@ -0,0 +1,219 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "sort" + "sync" + + "github.com/google/btree" +) + +type index interface { + Get(key []byte, atRev int64) (rev, created revision, ver int64, err error) + Range(key, end []byte, atRev int64) ([][]byte, []revision) + Put(key []byte, rev revision) + Tombstone(key []byte, rev revision) error + RangeSince(key, end []byte, rev int64) []revision + Compact(rev int64) map[revision]struct{} + Equal(b index) bool + + Insert(ki *keyIndex) + KeyIndex(ki *keyIndex) *keyIndex +} + +type treeIndex struct { + sync.RWMutex + tree *btree.BTree +} + +func newTreeIndex() index { + return &treeIndex{ + tree: btree.New(32), + } +} + +func (ti *treeIndex) Put(key []byte, rev revision) { + keyi := &keyIndex{key: key} + + ti.Lock() + defer ti.Unlock() + item := ti.tree.Get(keyi) + if item == nil { + keyi.put(rev.main, rev.sub) + ti.tree.ReplaceOrInsert(keyi) + return + } + okeyi := item.(*keyIndex) + okeyi.put(rev.main, rev.sub) +} + +func (ti *treeIndex) Get(key []byte, atRev int64) (modified, created revision, ver int64, err error) { + keyi := &keyIndex{key: key} + ti.RLock() + defer ti.RUnlock() + if keyi = ti.keyIndex(keyi); keyi == nil { + return revision{}, revision{}, 0, ErrRevisionNotFound + } + return keyi.get(atRev) +} + +func (ti *treeIndex) KeyIndex(keyi *keyIndex) *keyIndex { + ti.RLock() + defer ti.RUnlock() + return ti.keyIndex(keyi) +} + +func (ti *treeIndex) keyIndex(keyi *keyIndex) *keyIndex { + if item := ti.tree.Get(keyi); item != nil { + return item.(*keyIndex) + } + return nil +} + +func (ti *treeIndex) Range(key, end []byte, atRev int64) (keys [][]byte, revs []revision) { + if end == nil { + rev, _, _, err := ti.Get(key, atRev) + if err != nil { + return nil, nil + } + return [][]byte{key}, []revision{rev} + } + + keyi := &keyIndex{key: key} + endi := &keyIndex{key: end} + + ti.RLock() + defer ti.RUnlock() + + ti.tree.AscendGreaterOrEqual(keyi, func(item btree.Item) bool { + if len(endi.key) > 0 && !item.Less(endi) { + return false + } + curKeyi := item.(*keyIndex) + rev, _, _, err := curKeyi.get(atRev) + if err != nil { + return true + } + revs = append(revs, rev) + keys = append(keys, curKeyi.key) + return true + }) + + return keys, revs +} + +func (ti *treeIndex) Tombstone(key []byte, rev revision) error { + keyi := &keyIndex{key: key} + + ti.Lock() + defer ti.Unlock() + item := ti.tree.Get(keyi) + if item == nil { + return ErrRevisionNotFound + } + + ki := item.(*keyIndex) + return ki.tombstone(rev.main, rev.sub) +} + +// RangeSince returns all revisions from key(including) to end(excluding) +// at or after the given rev. The returned slice is sorted in the order +// of revision. +func (ti *treeIndex) RangeSince(key, end []byte, rev int64) []revision { + ti.RLock() + defer ti.RUnlock() + + keyi := &keyIndex{key: key} + if end == nil { + item := ti.tree.Get(keyi) + if item == nil { + return nil + } + keyi = item.(*keyIndex) + return keyi.since(rev) + } + + endi := &keyIndex{key: end} + var revs []revision + ti.tree.AscendGreaterOrEqual(keyi, func(item btree.Item) bool { + if len(endi.key) > 0 && !item.Less(endi) { + return false + } + curKeyi := item.(*keyIndex) + revs = append(revs, curKeyi.since(rev)...) + return true + }) + sort.Sort(revisions(revs)) + + return revs +} + +func (ti *treeIndex) Compact(rev int64) map[revision]struct{} { + available := make(map[revision]struct{}) + var emptyki []*keyIndex + plog.Printf("store.index: compact %d", rev) + // TODO: do not hold the lock for long time? + // This is probably OK. Compacting 10M keys takes O(10ms). + ti.Lock() + defer ti.Unlock() + ti.tree.Ascend(compactIndex(rev, available, &emptyki)) + for _, ki := range emptyki { + item := ti.tree.Delete(ki) + if item == nil { + plog.Panic("store.index: unexpected delete failure during compaction") + } + } + return available +} + +func compactIndex(rev int64, available map[revision]struct{}, emptyki *[]*keyIndex) func(i btree.Item) bool { + return func(i btree.Item) bool { + keyi := i.(*keyIndex) + keyi.compact(rev, available) + if keyi.isEmpty() { + *emptyki = append(*emptyki, keyi) + } + return true + } +} + +func (a *treeIndex) Equal(bi index) bool { + b := bi.(*treeIndex) + + if a.tree.Len() != b.tree.Len() { + return false + } + + equal := true + + a.tree.Ascend(func(item btree.Item) bool { + aki := item.(*keyIndex) + bki := b.tree.Get(item).(*keyIndex) + if !aki.equal(bki) { + equal = false + return false + } + return true + }) + + return equal +} + +func (ti *treeIndex) Insert(ki *keyIndex) { + ti.Lock() + defer ti.Unlock() + ti.tree.ReplaceOrInsert(ki) +} diff --git a/deps/github.com/coreos/etcd/mvcc/key_index.go b/deps/github.com/coreos/etcd/mvcc/key_index.go new file mode 100644 index 000000000..9104f9b2d --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/key_index.go @@ -0,0 +1,332 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "bytes" + "errors" + "fmt" + + "github.com/google/btree" +) + +var ( + ErrRevisionNotFound = errors.New("mvcc: revision not found") +) + +// keyIndex stores the revisions of a key in the backend. +// Each keyIndex has at least one key generation. +// Each generation might have several key versions. +// Tombstone on a key appends an tombstone version at the end +// of the current generation and creates a new empty generation. +// Each version of a key has an index pointing to the backend. +// +// For example: put(1.0);put(2.0);tombstone(3.0);put(4.0);tombstone(5.0) on key "foo" +// generate a keyIndex: +// key: "foo" +// rev: 5 +// generations: +// {empty} +// {4.0, 5.0(t)} +// {1.0, 2.0, 3.0(t)} +// +// Compact a keyIndex removes the versions with smaller or equal to +// rev except the largest one. If the generation becomes empty +// during compaction, it will be removed. if all the generations get +// removed, the keyIndex should be removed. + +// For example: +// compact(2) on the previous example +// generations: +// {empty} +// {4.0, 5.0(t)} +// {2.0, 3.0(t)} +// +// compact(4) +// generations: +// {empty} +// {4.0, 5.0(t)} +// +// compact(5): +// generations: +// {empty} -> key SHOULD be removed. +// +// compact(6): +// generations: +// {empty} -> key SHOULD be removed. +type keyIndex struct { + key []byte + modified revision // the main rev of the last modification + generations []generation +} + +// put puts a revision to the keyIndex. +func (ki *keyIndex) put(main int64, sub int64) { + rev := revision{main: main, sub: sub} + + if !rev.GreaterThan(ki.modified) { + plog.Panicf("store.keyindex: put with unexpected smaller revision [%v / %v]", rev, ki.modified) + } + if len(ki.generations) == 0 { + ki.generations = append(ki.generations, generation{}) + } + g := &ki.generations[len(ki.generations)-1] + if len(g.revs) == 0 { // create a new key + keysGauge.Inc() + g.created = rev + } + g.revs = append(g.revs, rev) + g.ver++ + ki.modified = rev +} + +func (ki *keyIndex) restore(created, modified revision, ver int64) { + if len(ki.generations) != 0 { + plog.Panicf("store.keyindex: cannot restore non-empty keyIndex") + } + + ki.modified = modified + g := generation{created: created, ver: ver, revs: []revision{modified}} + ki.generations = append(ki.generations, g) + keysGauge.Inc() +} + +// tombstone puts a revision, pointing to a tombstone, to the keyIndex. +// It also creates a new empty generation in the keyIndex. +// It returns ErrRevisionNotFound when tombstone on an empty generation. +func (ki *keyIndex) tombstone(main int64, sub int64) error { + if ki.isEmpty() { + plog.Panicf("store.keyindex: unexpected tombstone on empty keyIndex %s", string(ki.key)) + } + if ki.generations[len(ki.generations)-1].isEmpty() { + return ErrRevisionNotFound + } + ki.put(main, sub) + ki.generations = append(ki.generations, generation{}) + keysGauge.Dec() + return nil +} + +// get gets the modified, created revision and version of the key that satisfies the given atRev. +// Rev must be higher than or equal to the given atRev. +func (ki *keyIndex) get(atRev int64) (modified, created revision, ver int64, err error) { + if ki.isEmpty() { + plog.Panicf("store.keyindex: unexpected get on empty keyIndex %s", string(ki.key)) + } + g := ki.findGeneration(atRev) + if g.isEmpty() { + return revision{}, revision{}, 0, ErrRevisionNotFound + } + + n := g.walk(func(rev revision) bool { return rev.main > atRev }) + if n != -1 { + return g.revs[n], g.created, g.ver - int64(len(g.revs)-n-1), nil + } + + return revision{}, revision{}, 0, ErrRevisionNotFound +} + +// since returns revisions since the given rev. Only the revision with the +// largest sub revision will be returned if multiple revisions have the same +// main revision. +func (ki *keyIndex) since(rev int64) []revision { + if ki.isEmpty() { + plog.Panicf("store.keyindex: unexpected get on empty keyIndex %s", string(ki.key)) + } + since := revision{rev, 0} + var gi int + // find the generations to start checking + for gi = len(ki.generations) - 1; gi > 0; gi-- { + g := ki.generations[gi] + if g.isEmpty() { + continue + } + if since.GreaterThan(g.created) { + break + } + } + + var revs []revision + var last int64 + for ; gi < len(ki.generations); gi++ { + for _, r := range ki.generations[gi].revs { + if since.GreaterThan(r) { + continue + } + if r.main == last { + // replace the revision with a new one that has higher sub value, + // because the original one should not be seen by external + revs[len(revs)-1] = r + continue + } + revs = append(revs, r) + last = r.main + } + } + return revs +} + +// compact compacts a keyIndex by removing the versions with smaller or equal +// revision than the given atRev except the largest one (If the largest one is +// a tombstone, it will not be kept). +// If a generation becomes empty during compaction, it will be removed. +func (ki *keyIndex) compact(atRev int64, available map[revision]struct{}) { + if ki.isEmpty() { + plog.Panicf("store.keyindex: unexpected compact on empty keyIndex %s", string(ki.key)) + } + + // walk until reaching the first revision that has an revision smaller or equal to + // the atRev. + // add it to the available map + f := func(rev revision) bool { + if rev.main <= atRev { + available[rev] = struct{}{} + return false + } + return true + } + + i, g := 0, &ki.generations[0] + // find first generation includes atRev or created after atRev + for i < len(ki.generations)-1 { + if tomb := g.revs[len(g.revs)-1].main; tomb > atRev { + break + } + i++ + g = &ki.generations[i] + } + + if !g.isEmpty() { + n := g.walk(f) + // remove the previous contents. + if n != -1 { + g.revs = g.revs[n:] + } + // remove any tombstone + if len(g.revs) == 1 && i != len(ki.generations)-1 { + delete(available, g.revs[0]) + i++ + } + } + // remove the previous generations. + ki.generations = ki.generations[i:] +} + +func (ki *keyIndex) isEmpty() bool { + return len(ki.generations) == 1 && ki.generations[0].isEmpty() +} + +// findGeneration finds out the generation of the keyIndex that the +// given rev belongs to. If the given rev is at the gap of two generations, +// which means that the key does not exist at the given rev, it returns nil. +func (ki *keyIndex) findGeneration(rev int64) *generation { + lastg := len(ki.generations) - 1 + cg := lastg + + for cg >= 0 { + if len(ki.generations[cg].revs) == 0 { + cg-- + continue + } + g := ki.generations[cg] + if cg != lastg { + if tomb := g.revs[len(g.revs)-1].main; tomb <= rev { + return nil + } + } + if g.revs[0].main <= rev { + return &ki.generations[cg] + } + cg-- + } + return nil +} + +func (a *keyIndex) Less(b btree.Item) bool { + return bytes.Compare(a.key, b.(*keyIndex).key) == -1 +} + +func (a *keyIndex) equal(b *keyIndex) bool { + if !bytes.Equal(a.key, b.key) { + return false + } + if a.modified != b.modified { + return false + } + if len(a.generations) != len(b.generations) { + return false + } + for i := range a.generations { + ag, bg := a.generations[i], b.generations[i] + if !ag.equal(bg) { + return false + } + } + return true +} + +func (ki *keyIndex) String() string { + var s string + for _, g := range ki.generations { + s += g.String() + } + return s +} + +// generation contains multiple revisions of a key. +type generation struct { + ver int64 + created revision // when the generation is created (put in first revision). + revs []revision +} + +func (g *generation) isEmpty() bool { return g == nil || len(g.revs) == 0 } + +// walk walks through the revisions in the generation in descending order. +// It passes the revision to the given function. +// walk returns until: 1. it finishes walking all pairs 2. the function returns false. +// walk returns the position at where it stopped. If it stopped after +// finishing walking, -1 will be returned. +func (g *generation) walk(f func(rev revision) bool) int { + l := len(g.revs) + for i := range g.revs { + ok := f(g.revs[l-i-1]) + if !ok { + return l - i - 1 + } + } + return -1 +} + +func (g *generation) String() string { + return fmt.Sprintf("g: created[%d] ver[%d], revs %#v\n", g.created, g.ver, g.revs) +} + +func (a generation) equal(b generation) bool { + if a.ver != b.ver { + return false + } + if len(a.revs) != len(b.revs) { + return false + } + + for i := range a.revs { + ar, br := a.revs[i], b.revs[i] + if ar != br { + return false + } + } + return true +} diff --git a/deps/github.com/coreos/etcd/mvcc/kv.go b/deps/github.com/coreos/etcd/mvcc/kv.go new file mode 100644 index 000000000..6636347aa --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/kv.go @@ -0,0 +1,147 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" +) + +type RangeOptions struct { + Limit int64 + Rev int64 + Count bool +} + +type RangeResult struct { + KVs []mvccpb.KeyValue + Rev int64 + Count int +} + +type ReadView interface { + // FirstRev returns the first KV revision at the time of opening the txn. + // After a compaction, the first revision increases to the compaction + // revision. + FirstRev() int64 + + // Rev returns the revision of the KV at the time of opening the txn. + Rev() int64 + + // Range gets the keys in the range at rangeRev. + // The returned rev is the current revision of the KV when the operation is executed. + // If rangeRev <=0, range gets the keys at currentRev. + // If `end` is nil, the request returns the key. + // If `end` is not nil and not empty, it gets the keys in range [key, range_end). + // If `end` is not nil and empty, it gets the keys greater than or equal to key. + // Limit limits the number of keys returned. + // If the required rev is compacted, ErrCompacted will be returned. + Range(key, end []byte, ro RangeOptions) (r *RangeResult, err error) +} + +// TxnRead represents a read-only transaction with operations that will not +// block other read transactions. +type TxnRead interface { + ReadView + // End marks the transaction is complete and ready to commit. + End() +} + +type WriteView interface { + // DeleteRange deletes the given range from the store. + // A deleteRange increases the rev of the store if any key in the range exists. + // The number of key deleted will be returned. + // The returned rev is the current revision of the KV when the operation is executed. + // It also generates one event for each key delete in the event history. + // if the `end` is nil, deleteRange deletes the key. + // if the `end` is not nil, deleteRange deletes the keys in range [key, range_end). + DeleteRange(key, end []byte) (n, rev int64) + + // Put puts the given key, value into the store. Put also takes additional argument lease to + // attach a lease to a key-value pair as meta-data. KV implementation does not validate the lease + // id. + // A put also increases the rev of the store, and generates one event in the event history. + // The returned rev is the current revision of the KV when the operation is executed. + Put(key, value []byte, lease lease.LeaseID) (rev int64) +} + +// TxnWrite represents a transaction that can modify the store. +type TxnWrite interface { + TxnRead + WriteView + // Changes gets the changes made since opening the write txn. + Changes() []mvccpb.KeyValue +} + +// txnReadWrite coerces a read txn to a write, panicking on any write operation. +type txnReadWrite struct{ TxnRead } + +func (trw *txnReadWrite) DeleteRange(key, end []byte) (n, rev int64) { panic("unexpected DeleteRange") } +func (trw *txnReadWrite) Put(key, value []byte, lease lease.LeaseID) (rev int64) { + panic("unexpected Put") +} +func (trw *txnReadWrite) Changes() []mvccpb.KeyValue { return nil } + +func NewReadOnlyTxnWrite(txn TxnRead) TxnWrite { return &txnReadWrite{txn} } + +type KV interface { + ReadView + WriteView + + // Read creates a read transaction. + Read() TxnRead + + // Write creates a write transaction. + Write() TxnWrite + + // Hash retrieves the hash of KV state and revision. + // This method is designed for consistency checking purposes. + Hash() (hash uint32, revision int64, err error) + + // Compact frees all superseded keys with revisions less than rev. + Compact(rev int64) (<-chan struct{}, error) + + // Commit commits outstanding txns into the underlying backend. + Commit() + + // Restore restores the KV store from a backend. + Restore(b backend.Backend) error + Close() error +} + +// WatchableKV is a KV that can be watched. +type WatchableKV interface { + KV + Watchable +} + +// Watchable is the interface that wraps the NewWatchStream function. +type Watchable interface { + // NewWatchStream returns a WatchStream that can be used to + // watch events happened or happening on the KV. + NewWatchStream() WatchStream +} + +// ConsistentWatchableKV is a WatchableKV that understands the consistency +// algorithm and consistent index. +// If the consistent index of executing entry is not larger than the +// consistent index of ConsistentWatchableKV, all operations in +// this entry are skipped and return empty response. +type ConsistentWatchableKV interface { + WatchableKV + // ConsistentIndex returns the current consistent index of the KV. + ConsistentIndex() uint64 +} diff --git a/deps/github.com/coreos/etcd/mvcc/kv_view.go b/deps/github.com/coreos/etcd/mvcc/kv_view.go new file mode 100644 index 000000000..f40ba8edc --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/kv_view.go @@ -0,0 +1,53 @@ +// Copyright 2017 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. + +package mvcc + +import ( + "github.com/coreos/etcd/lease" +) + +type readView struct{ kv KV } + +func (rv *readView) FirstRev() int64 { + tr := rv.kv.Read() + defer tr.End() + return tr.FirstRev() +} + +func (rv *readView) Rev() int64 { + tr := rv.kv.Read() + defer tr.End() + return tr.Rev() +} + +func (rv *readView) Range(key, end []byte, ro RangeOptions) (r *RangeResult, err error) { + tr := rv.kv.Read() + defer tr.End() + return tr.Range(key, end, ro) +} + +type writeView struct{ kv KV } + +func (wv *writeView) DeleteRange(key, end []byte) (n, rev int64) { + tw := wv.kv.Write() + defer tw.End() + return tw.DeleteRange(key, end) +} + +func (wv *writeView) Put(key, value []byte, lease lease.LeaseID) (rev int64) { + tw := wv.kv.Write() + defer tw.End() + return tw.Put(key, value, lease) +} diff --git a/deps/github.com/coreos/etcd/mvcc/kvstore.go b/deps/github.com/coreos/etcd/mvcc/kvstore.go new file mode 100644 index 000000000..28a508ccb --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/kvstore.go @@ -0,0 +1,459 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "encoding/binary" + "errors" + "math" + "sync" + "time" + + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/pkg/schedule" + "github.com/coreos/pkg/capnslog" + "golang.org/x/net/context" +) + +var ( + keyBucketName = []byte("key") + metaBucketName = []byte("meta") + + consistentIndexKeyName = []byte("consistent_index") + scheduledCompactKeyName = []byte("scheduledCompactRev") + finishedCompactKeyName = []byte("finishedCompactRev") + + ErrCompacted = errors.New("mvcc: required revision has been compacted") + ErrFutureRev = errors.New("mvcc: required revision is a future revision") + ErrCanceled = errors.New("mvcc: watcher is canceled") + ErrClosed = errors.New("mvcc: closed") + + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "mvcc") +) + +const ( + // markedRevBytesLen is the byte length of marked revision. + // The first `revBytesLen` bytes represents a normal revision. The last + // one byte is the mark. + markedRevBytesLen = revBytesLen + 1 + markBytePosition = markedRevBytesLen - 1 + markTombstone byte = 't' +) + +var restoreChunkKeys = 10000 // non-const for testing + +// ConsistentIndexGetter is an interface that wraps the Get method. +// Consistent index is the offset of an entry in a consistent replicated log. +type ConsistentIndexGetter interface { + // ConsistentIndex returns the consistent index of current executing entry. + ConsistentIndex() uint64 +} + +type store struct { + ReadView + WriteView + + // mu read locks for txns and write locks for non-txn store changes. + mu sync.RWMutex + + ig ConsistentIndexGetter + + b backend.Backend + kvindex index + + le lease.Lessor + + // revMuLock protects currentRev and compactMainRev. + // Locked at end of write txn and released after write txn unlock lock. + // Locked before locking read txn and released after locking. + revMu sync.RWMutex + // currentRev is the revision of the last completed transaction. + currentRev int64 + // compactMainRev is the main revision of the last compaction. + compactMainRev int64 + + // bytesBuf8 is a byte slice of length 8 + // to avoid a repetitive allocation in saveIndex. + bytesBuf8 []byte + + fifoSched schedule.Scheduler + + stopc chan struct{} +} + +// NewStore returns a new store. It is useful to create a store inside +// mvcc pkg. It should only be used for testing externally. +func NewStore(b backend.Backend, le lease.Lessor, ig ConsistentIndexGetter) *store { + s := &store{ + b: b, + ig: ig, + kvindex: newTreeIndex(), + + le: le, + + currentRev: 1, + compactMainRev: -1, + + bytesBuf8: make([]byte, 8), + fifoSched: schedule.NewFIFOScheduler(), + + stopc: make(chan struct{}), + } + s.ReadView = &readView{s} + s.WriteView = &writeView{s} + if s.le != nil { + s.le.SetRangeDeleter(func() lease.TxnDelete { return s.Write() }) + } + + tx := s.b.BatchTx() + tx.Lock() + tx.UnsafeCreateBucket(keyBucketName) + tx.UnsafeCreateBucket(metaBucketName) + tx.Unlock() + s.b.ForceCommit() + + if err := s.restore(); err != nil { + // TODO: return the error instead of panic here? + panic("failed to recover store from backend") + } + + return s +} + +func (s *store) compactBarrier(ctx context.Context, ch chan struct{}) { + if ctx == nil || ctx.Err() != nil { + s.mu.Lock() + select { + case <-s.stopc: + default: + f := func(ctx context.Context) { s.compactBarrier(ctx, ch) } + s.fifoSched.Schedule(f) + } + s.mu.Unlock() + return + } + close(ch) +} + +func (s *store) Hash() (hash uint32, revision int64, err error) { + s.b.ForceCommit() + h, err := s.b.Hash(DefaultIgnores) + return h, s.currentRev, err +} + +func (s *store) Compact(rev int64) (<-chan struct{}, error) { + s.mu.Lock() + defer s.mu.Unlock() + s.revMu.Lock() + defer s.revMu.Unlock() + + if rev <= s.compactMainRev { + ch := make(chan struct{}) + f := func(ctx context.Context) { s.compactBarrier(ctx, ch) } + s.fifoSched.Schedule(f) + return ch, ErrCompacted + } + if rev > s.currentRev { + return nil, ErrFutureRev + } + + start := time.Now() + + s.compactMainRev = rev + + rbytes := newRevBytes() + revToBytes(revision{main: rev}, rbytes) + + tx := s.b.BatchTx() + tx.Lock() + tx.UnsafePut(metaBucketName, scheduledCompactKeyName, rbytes) + tx.Unlock() + // ensure that desired compaction is persisted + s.b.ForceCommit() + + keep := s.kvindex.Compact(rev) + ch := make(chan struct{}) + var j = func(ctx context.Context) { + if ctx.Err() != nil { + s.compactBarrier(ctx, ch) + return + } + if !s.scheduleCompaction(rev, keep) { + s.compactBarrier(nil, ch) + return + } + close(ch) + } + + s.fifoSched.Schedule(j) + + indexCompactionPauseDurations.Observe(float64(time.Since(start) / time.Millisecond)) + return ch, nil +} + +// DefaultIgnores is a map of keys to ignore in hash checking. +var DefaultIgnores map[backend.IgnoreKey]struct{} + +func init() { + DefaultIgnores = map[backend.IgnoreKey]struct{}{ + // consistent index might be changed due to v2 internal sync, which + // is not controllable by the user. + {Bucket: string(metaBucketName), Key: string(consistentIndexKeyName)}: {}, + } +} + +func (s *store) Commit() { + s.mu.Lock() + defer s.mu.Unlock() + + tx := s.b.BatchTx() + tx.Lock() + s.saveIndex(tx) + tx.Unlock() + s.b.ForceCommit() +} + +func (s *store) Restore(b backend.Backend) error { + s.mu.Lock() + defer s.mu.Unlock() + + close(s.stopc) + s.fifoSched.Stop() + + s.b = b + s.kvindex = newTreeIndex() + s.currentRev = 1 + s.compactMainRev = -1 + s.fifoSched = schedule.NewFIFOScheduler() + s.stopc = make(chan struct{}) + + return s.restore() +} + +func (s *store) restore() error { + reportDbTotalSizeInBytesMu.Lock() + b := s.b + reportDbTotalSizeInBytes = func() float64 { return float64(b.Size()) } + reportDbTotalSizeInBytesMu.Unlock() + + min, max := newRevBytes(), newRevBytes() + revToBytes(revision{main: 1}, min) + revToBytes(revision{main: math.MaxInt64, sub: math.MaxInt64}, max) + + keyToLease := make(map[string]lease.LeaseID) + + // restore index + tx := s.b.BatchTx() + tx.Lock() + + _, finishedCompactBytes := tx.UnsafeRange(metaBucketName, finishedCompactKeyName, nil, 0) + if len(finishedCompactBytes) != 0 { + s.compactMainRev = bytesToRev(finishedCompactBytes[0]).main + plog.Printf("restore compact to %d", s.compactMainRev) + } + _, scheduledCompactBytes := tx.UnsafeRange(metaBucketName, scheduledCompactKeyName, nil, 0) + scheduledCompact := int64(0) + if len(scheduledCompactBytes) != 0 { + scheduledCompact = bytesToRev(scheduledCompactBytes[0]).main + } + + // index keys concurrently as they're loaded in from tx + keysGauge.Set(0) + rkvc, revc := restoreIntoIndex(s.kvindex) + for { + keys, vals := tx.UnsafeRange(keyBucketName, min, max, int64(restoreChunkKeys)) + if len(keys) == 0 { + break + } + // rkvc blocks if the total pending keys exceeds the restore + // chunk size to keep keys from consuming too much memory. + restoreChunk(rkvc, keys, vals, keyToLease) + if len(keys) < restoreChunkKeys { + // partial set implies final set + break + } + // next set begins after where this one ended + newMin := bytesToRev(keys[len(keys)-1][:revBytesLen]) + newMin.sub++ + revToBytes(newMin, min) + } + close(rkvc) + s.currentRev = <-revc + + // keys in the range [compacted revision -N, compaction] might all be deleted due to compaction. + // the correct revision should be set to compaction revision in the case, not the largest revision + // we have seen. + if s.currentRev < s.compactMainRev { + s.currentRev = s.compactMainRev + } + if scheduledCompact <= s.compactMainRev { + scheduledCompact = 0 + } + + for key, lid := range keyToLease { + if s.le == nil { + panic("no lessor to attach lease") + } + err := s.le.Attach(lid, []lease.LeaseItem{{Key: key}}) + if err != nil { + plog.Errorf("unexpected Attach error: %v", err) + } + } + + tx.Unlock() + + if scheduledCompact != 0 { + s.Compact(scheduledCompact) + plog.Printf("resume scheduled compaction at %d", scheduledCompact) + } + + return nil +} + +type revKeyValue struct { + key []byte + kv mvccpb.KeyValue + kstr string +} + +func restoreIntoIndex(idx index) (chan<- revKeyValue, <-chan int64) { + rkvc, revc := make(chan revKeyValue, restoreChunkKeys), make(chan int64, 1) + go func() { + currentRev := int64(1) + defer func() { revc <- currentRev }() + // restore the tree index from streaming the unordered index. + kiCache := make(map[string]*keyIndex, restoreChunkKeys) + for rkv := range rkvc { + ki, ok := kiCache[rkv.kstr] + // purge kiCache if many keys but still missing in the cache + if !ok && len(kiCache) >= restoreChunkKeys { + i := 10 + for k := range kiCache { + delete(kiCache, k) + if i--; i == 0 { + break + } + } + } + // cache miss, fetch from tree index if there + if !ok { + ki = &keyIndex{key: rkv.kv.Key} + if idxKey := idx.KeyIndex(ki); idxKey != nil { + kiCache[rkv.kstr], ki = idxKey, idxKey + ok = true + } + } + rev := bytesToRev(rkv.key) + currentRev = rev.main + if ok { + if isTombstone(rkv.key) { + ki.tombstone(rev.main, rev.sub) + continue + } + ki.put(rev.main, rev.sub) + } else if !isTombstone(rkv.key) { + ki.restore(revision{rkv.kv.CreateRevision, 0}, rev, rkv.kv.Version) + idx.Insert(ki) + kiCache[rkv.kstr] = ki + } + } + }() + return rkvc, revc +} + +func restoreChunk(kvc chan<- revKeyValue, keys, vals [][]byte, keyToLease map[string]lease.LeaseID) { + for i, key := range keys { + rkv := revKeyValue{key: key} + if err := rkv.kv.Unmarshal(vals[i]); err != nil { + plog.Fatalf("cannot unmarshal event: %v", err) + } + rkv.kstr = string(rkv.kv.Key) + if isTombstone(key) { + delete(keyToLease, rkv.kstr) + } else if lid := lease.LeaseID(rkv.kv.Lease); lid != lease.NoLease { + keyToLease[rkv.kstr] = lid + } else { + delete(keyToLease, rkv.kstr) + } + kvc <- rkv + } +} + +func (s *store) Close() error { + close(s.stopc) + s.fifoSched.Stop() + return nil +} + +func (a *store) Equal(b *store) bool { + if a.currentRev != b.currentRev { + return false + } + if a.compactMainRev != b.compactMainRev { + return false + } + return a.kvindex.Equal(b.kvindex) +} + +func (s *store) saveIndex(tx backend.BatchTx) { + if s.ig == nil { + return + } + bs := s.bytesBuf8 + binary.BigEndian.PutUint64(bs, s.ig.ConsistentIndex()) + // put the index into the underlying backend + // tx has been locked in TxnBegin, so there is no need to lock it again + tx.UnsafePut(metaBucketName, consistentIndexKeyName, bs) +} + +func (s *store) ConsistentIndex() uint64 { + // TODO: cache index in a uint64 field? + tx := s.b.BatchTx() + tx.Lock() + defer tx.Unlock() + _, vs := tx.UnsafeRange(metaBucketName, consistentIndexKeyName, nil, 0) + if len(vs) == 0 { + return 0 + } + return binary.BigEndian.Uint64(vs[0]) +} + +// appendMarkTombstone appends tombstone mark to normal revision bytes. +func appendMarkTombstone(b []byte) []byte { + if len(b) != revBytesLen { + plog.Panicf("cannot append mark to non normal revision bytes") + } + return append(b, markTombstone) +} + +// isTombstone checks whether the revision bytes is a tombstone. +func isTombstone(b []byte) bool { + return len(b) == markedRevBytesLen && b[markBytePosition] == markTombstone +} + +// revBytesRange returns the range of revision bytes at +// the given revision. +func revBytesRange(rev revision) (start, end []byte) { + start = newRevBytes() + revToBytes(rev, start) + + end = newRevBytes() + endRev := revision{main: rev.main, sub: rev.sub + 1} + revToBytes(endRev, end) + + return start, end +} diff --git a/deps/github.com/coreos/etcd/mvcc/kvstore_compaction.go b/deps/github.com/coreos/etcd/mvcc/kvstore_compaction.go new file mode 100644 index 000000000..bbd38f547 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/kvstore_compaction.go @@ -0,0 +1,66 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "encoding/binary" + "time" +) + +func (s *store) scheduleCompaction(compactMainRev int64, keep map[revision]struct{}) bool { + totalStart := time.Now() + defer dbCompactionTotalDurations.Observe(float64(time.Since(totalStart) / time.Millisecond)) + + end := make([]byte, 8) + binary.BigEndian.PutUint64(end, uint64(compactMainRev+1)) + + batchsize := int64(10000) + last := make([]byte, 8+1+8) + for { + var rev revision + + start := time.Now() + tx := s.b.BatchTx() + tx.Lock() + + keys, _ := tx.UnsafeRange(keyBucketName, last, end, batchsize) + for _, key := range keys { + rev = bytesToRev(key) + if _, ok := keep[rev]; !ok { + tx.UnsafeDelete(keyBucketName, key) + } + } + + if len(keys) < int(batchsize) { + rbytes := make([]byte, 8+1+8) + revToBytes(revision{main: compactMainRev}, rbytes) + tx.UnsafePut(metaBucketName, finishedCompactKeyName, rbytes) + tx.Unlock() + plog.Printf("finished scheduled compaction at %d (took %v)", compactMainRev, time.Since(totalStart)) + return true + } + + // update last + revToBytes(revision{main: rev.main, sub: rev.sub + 1}, last) + tx.Unlock() + dbCompactionPauseDurations.Observe(float64(time.Since(start) / time.Millisecond)) + + select { + case <-time.After(100 * time.Millisecond): + case <-s.stopc: + return false + } + } +} diff --git a/deps/github.com/coreos/etcd/mvcc/kvstore_txn.go b/deps/github.com/coreos/etcd/mvcc/kvstore_txn.go new file mode 100644 index 000000000..13d4d530d --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/kvstore_txn.go @@ -0,0 +1,253 @@ +// Copyright 2017 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. + +package mvcc + +import ( + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" +) + +type storeTxnRead struct { + s *store + tx backend.ReadTx + + firstRev int64 + rev int64 +} + +func (s *store) Read() TxnRead { + s.mu.RLock() + tx := s.b.ReadTx() + s.revMu.RLock() + tx.Lock() + firstRev, rev := s.compactMainRev, s.currentRev + s.revMu.RUnlock() + return newMetricsTxnRead(&storeTxnRead{s, tx, firstRev, rev}) +} + +func (tr *storeTxnRead) FirstRev() int64 { return tr.firstRev } +func (tr *storeTxnRead) Rev() int64 { return tr.rev } + +func (tr *storeTxnRead) Range(key, end []byte, ro RangeOptions) (r *RangeResult, err error) { + return tr.rangeKeys(key, end, tr.Rev(), ro) +} + +func (tr *storeTxnRead) End() { + tr.tx.Unlock() + tr.s.mu.RUnlock() +} + +type storeTxnWrite struct { + *storeTxnRead + tx backend.BatchTx + // beginRev is the revision where the txn begins; it will write to the next revision. + beginRev int64 + changes []mvccpb.KeyValue +} + +func (s *store) Write() TxnWrite { + s.mu.RLock() + tx := s.b.BatchTx() + tx.Lock() + tw := &storeTxnWrite{ + storeTxnRead: &storeTxnRead{s, tx, 0, 0}, + tx: tx, + beginRev: s.currentRev, + changes: make([]mvccpb.KeyValue, 0, 4), + } + return newMetricsTxnWrite(tw) +} + +func (tw *storeTxnWrite) Rev() int64 { return tw.beginRev } + +func (tw *storeTxnWrite) Range(key, end []byte, ro RangeOptions) (r *RangeResult, err error) { + rev := tw.beginRev + if len(tw.changes) > 0 { + rev++ + } + return tw.rangeKeys(key, end, rev, ro) +} + +func (tw *storeTxnWrite) DeleteRange(key, end []byte) (int64, int64) { + if n := tw.deleteRange(key, end); n != 0 || len(tw.changes) > 0 { + return n, int64(tw.beginRev + 1) + } + return 0, int64(tw.beginRev) +} + +func (tw *storeTxnWrite) Put(key, value []byte, lease lease.LeaseID) int64 { + tw.put(key, value, lease) + return int64(tw.beginRev + 1) +} + +func (tw *storeTxnWrite) End() { + // only update index if the txn modifies the mvcc state. + if len(tw.changes) != 0 { + tw.s.saveIndex(tw.tx) + // hold revMu lock to prevent new read txns from opening until writeback. + tw.s.revMu.Lock() + tw.s.currentRev++ + } + tw.tx.Unlock() + if len(tw.changes) != 0 { + tw.s.revMu.Unlock() + } + tw.s.mu.RUnlock() +} + +func (tr *storeTxnRead) rangeKeys(key, end []byte, curRev int64, ro RangeOptions) (*RangeResult, error) { + rev := ro.Rev + if rev > curRev { + return &RangeResult{KVs: nil, Count: -1, Rev: curRev}, ErrFutureRev + } + if rev <= 0 { + rev = curRev + } + if rev < tr.s.compactMainRev { + return &RangeResult{KVs: nil, Count: -1, Rev: 0}, ErrCompacted + } + + _, revpairs := tr.s.kvindex.Range(key, end, int64(rev)) + if len(revpairs) == 0 { + return &RangeResult{KVs: nil, Count: 0, Rev: curRev}, nil + } + if ro.Count { + return &RangeResult{KVs: nil, Count: len(revpairs), Rev: curRev}, nil + } + + var kvs []mvccpb.KeyValue + for _, revpair := range revpairs { + start, end := revBytesRange(revpair) + _, vs := tr.tx.UnsafeRange(keyBucketName, start, end, 0) + if len(vs) != 1 { + plog.Fatalf("range cannot find rev (%d,%d)", revpair.main, revpair.sub) + } + + var kv mvccpb.KeyValue + if err := kv.Unmarshal(vs[0]); err != nil { + plog.Fatalf("cannot unmarshal event: %v", err) + } + kvs = append(kvs, kv) + if ro.Limit > 0 && len(kvs) >= int(ro.Limit) { + break + } + } + return &RangeResult{KVs: kvs, Count: len(revpairs), Rev: curRev}, nil +} + +func (tw *storeTxnWrite) put(key, value []byte, leaseID lease.LeaseID) { + rev := tw.beginRev + 1 + c := rev + oldLease := lease.NoLease + + // if the key exists before, use its previous created and + // get its previous leaseID + _, created, ver, err := tw.s.kvindex.Get(key, rev) + if err == nil { + c = created.main + oldLease = tw.s.le.GetLease(lease.LeaseItem{Key: string(key)}) + } + + ibytes := newRevBytes() + idxRev := revision{main: rev, sub: int64(len(tw.changes))} + revToBytes(idxRev, ibytes) + + ver = ver + 1 + kv := mvccpb.KeyValue{ + Key: key, + Value: value, + CreateRevision: c, + ModRevision: rev, + Version: ver, + Lease: int64(leaseID), + } + + d, err := kv.Marshal() + if err != nil { + plog.Fatalf("cannot marshal event: %v", err) + } + + tw.tx.UnsafeSeqPut(keyBucketName, ibytes, d) + tw.s.kvindex.Put(key, idxRev) + tw.changes = append(tw.changes, kv) + + if oldLease != lease.NoLease { + if tw.s.le == nil { + panic("no lessor to detach lease") + } + err = tw.s.le.Detach(oldLease, []lease.LeaseItem{{Key: string(key)}}) + if err != nil { + plog.Errorf("unexpected error from lease detach: %v", err) + } + } + if leaseID != lease.NoLease { + if tw.s.le == nil { + panic("no lessor to attach lease") + } + err = tw.s.le.Attach(leaseID, []lease.LeaseItem{{Key: string(key)}}) + if err != nil { + panic("unexpected error from lease Attach") + } + } +} + +func (tw *storeTxnWrite) deleteRange(key, end []byte) int64 { + rrev := tw.beginRev + if len(tw.changes) > 0 { + rrev += 1 + } + keys, revs := tw.s.kvindex.Range(key, end, rrev) + if len(keys) == 0 { + return 0 + } + for i, key := range keys { + tw.delete(key, revs[i]) + } + return int64(len(keys)) +} + +func (tw *storeTxnWrite) delete(key []byte, rev revision) { + ibytes := newRevBytes() + idxRev := revision{main: tw.beginRev + 1, sub: int64(len(tw.changes))} + revToBytes(idxRev, ibytes) + ibytes = appendMarkTombstone(ibytes) + + kv := mvccpb.KeyValue{Key: key} + + d, err := kv.Marshal() + if err != nil { + plog.Fatalf("cannot marshal event: %v", err) + } + + tw.tx.UnsafeSeqPut(keyBucketName, ibytes, d) + err = tw.s.kvindex.Tombstone(key, idxRev) + if err != nil { + plog.Fatalf("cannot tombstone an existing key (%s): %v", string(key), err) + } + tw.changes = append(tw.changes, kv) + + item := lease.LeaseItem{Key: string(key)} + leaseID := tw.s.le.GetLease(item) + + if leaseID != lease.NoLease { + err = tw.s.le.Detach(leaseID, []lease.LeaseItem{item}) + if err != nil { + plog.Errorf("cannot detach %v", err) + } + } +} + +func (tw *storeTxnWrite) Changes() []mvccpb.KeyValue { return tw.changes } diff --git a/deps/github.com/coreos/etcd/mvcc/metrics.go b/deps/github.com/coreos/etcd/mvcc/metrics.go new file mode 100644 index 000000000..a65fe59b9 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/metrics.go @@ -0,0 +1,174 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "sync" + + "github.com/prometheus/client_golang/prometheus" +) + +var ( + rangeCounter = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "range_total", + Help: "Total number of ranges seen by this member.", + }) + + putCounter = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "put_total", + Help: "Total number of puts seen by this member.", + }) + + deleteCounter = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "delete_total", + Help: "Total number of deletes seen by this member.", + }) + + txnCounter = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "txn_total", + Help: "Total number of txns seen by this member.", + }) + + keysGauge = prometheus.NewGauge( + prometheus.GaugeOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "keys_total", + Help: "Total number of keys.", + }) + + watchStreamGauge = prometheus.NewGauge( + prometheus.GaugeOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "watch_stream_total", + Help: "Total number of watch streams.", + }) + + watcherGauge = prometheus.NewGauge( + prometheus.GaugeOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "watcher_total", + Help: "Total number of watchers.", + }) + + slowWatcherGauge = prometheus.NewGauge( + prometheus.GaugeOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "slow_watcher_total", + Help: "Total number of unsynced slow watchers.", + }) + + totalEventsCounter = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "events_total", + Help: "Total number of events sent by this member.", + }) + + pendingEventsGauge = prometheus.NewGauge( + prometheus.GaugeOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "pending_events_total", + Help: "Total number of pending events to be sent.", + }) + + indexCompactionPauseDurations = prometheus.NewHistogram( + prometheus.HistogramOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "index_compaction_pause_duration_milliseconds", + Help: "Bucketed histogram of index compaction pause duration.", + // 0.5ms -> 1second + Buckets: prometheus.ExponentialBuckets(0.5, 2, 12), + }) + + dbCompactionPauseDurations = prometheus.NewHistogram( + prometheus.HistogramOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "db_compaction_pause_duration_milliseconds", + Help: "Bucketed histogram of db compaction pause duration.", + // 1ms -> 4second + Buckets: prometheus.ExponentialBuckets(1, 2, 13), + }) + + dbCompactionTotalDurations = prometheus.NewHistogram( + prometheus.HistogramOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "db_compaction_total_duration_milliseconds", + Help: "Bucketed histogram of db compaction total duration.", + // 100ms -> 800second + Buckets: prometheus.ExponentialBuckets(100, 2, 14), + }) + + dbTotalSize = prometheus.NewGaugeFunc(prometheus.GaugeOpts{ + Namespace: "etcd_debugging", + Subsystem: "mvcc", + Name: "db_total_size_in_bytes", + Help: "Total size of the underlying database in bytes.", + }, + func() float64 { + reportDbTotalSizeInBytesMu.RLock() + defer reportDbTotalSizeInBytesMu.RUnlock() + return reportDbTotalSizeInBytes() + }, + ) + // overridden by mvcc initialization + reportDbTotalSizeInBytesMu sync.RWMutex + reportDbTotalSizeInBytes func() float64 = func() float64 { return 0 } +) + +func init() { + prometheus.MustRegister(rangeCounter) + prometheus.MustRegister(putCounter) + prometheus.MustRegister(deleteCounter) + prometheus.MustRegister(txnCounter) + prometheus.MustRegister(keysGauge) + prometheus.MustRegister(watchStreamGauge) + prometheus.MustRegister(watcherGauge) + prometheus.MustRegister(slowWatcherGauge) + prometheus.MustRegister(totalEventsCounter) + prometheus.MustRegister(pendingEventsGauge) + prometheus.MustRegister(indexCompactionPauseDurations) + prometheus.MustRegister(dbCompactionPauseDurations) + prometheus.MustRegister(dbCompactionTotalDurations) + prometheus.MustRegister(dbTotalSize) +} + +// ReportEventReceived reports that an event is received. +// This function should be called when the external systems received an +// event from mvcc.Watcher. +func ReportEventReceived(n int) { + pendingEventsGauge.Sub(float64(n)) + totalEventsCounter.Add(float64(n)) +} diff --git a/deps/github.com/coreos/etcd/mvcc/metrics_txn.go b/deps/github.com/coreos/etcd/mvcc/metrics_txn.go new file mode 100644 index 000000000..fd2144279 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/metrics_txn.go @@ -0,0 +1,67 @@ +// Copyright 2017 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. + +package mvcc + +import ( + "github.com/coreos/etcd/lease" +) + +type metricsTxnWrite struct { + TxnWrite + ranges uint + puts uint + deletes uint +} + +func newMetricsTxnRead(tr TxnRead) TxnRead { + return &metricsTxnWrite{&txnReadWrite{tr}, 0, 0, 0} +} + +func newMetricsTxnWrite(tw TxnWrite) TxnWrite { + return &metricsTxnWrite{tw, 0, 0, 0} +} + +func (tw *metricsTxnWrite) Range(key, end []byte, ro RangeOptions) (*RangeResult, error) { + tw.ranges++ + return tw.TxnWrite.Range(key, end, ro) +} + +func (tw *metricsTxnWrite) DeleteRange(key, end []byte) (n, rev int64) { + tw.deletes++ + return tw.TxnWrite.DeleteRange(key, end) +} + +func (tw *metricsTxnWrite) Put(key, value []byte, lease lease.LeaseID) (rev int64) { + tw.puts++ + return tw.TxnWrite.Put(key, value, lease) +} + +func (tw *metricsTxnWrite) End() { + defer tw.TxnWrite.End() + if sum := tw.ranges + tw.puts + tw.deletes; sum != 1 { + if sum > 1 { + txnCounter.Inc() + } + return + } + switch { + case tw.ranges == 1: + rangeCounter.Inc() + case tw.puts == 1: + putCounter.Inc() + case tw.deletes == 1: + deleteCounter.Inc() + } +} diff --git a/deps/github.com/coreos/etcd/mvcc/revision.go b/deps/github.com/coreos/etcd/mvcc/revision.go new file mode 100644 index 000000000..5fa35a1c2 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/revision.go @@ -0,0 +1,67 @@ +// Copyright 2015 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. + +package mvcc + +import "encoding/binary" + +// revBytesLen is the byte length of a normal revision. +// First 8 bytes is the revision.main in big-endian format. The 9th byte +// is a '_'. The last 8 bytes is the revision.sub in big-endian format. +const revBytesLen = 8 + 1 + 8 + +// A revision indicates modification of the key-value space. +// The set of changes that share same main revision changes the key-value space atomically. +type revision struct { + // main is the main revision of a set of changes that happen atomically. + main int64 + + // sub is the the sub revision of a change in a set of changes that happen + // atomically. Each change has different increasing sub revision in that + // set. + sub int64 +} + +func (a revision) GreaterThan(b revision) bool { + if a.main > b.main { + return true + } + if a.main < b.main { + return false + } + return a.sub > b.sub +} + +func newRevBytes() []byte { + return make([]byte, revBytesLen, markedRevBytesLen) +} + +func revToBytes(rev revision, bytes []byte) { + binary.BigEndian.PutUint64(bytes, uint64(rev.main)) + bytes[8] = '_' + binary.BigEndian.PutUint64(bytes[9:], uint64(rev.sub)) +} + +func bytesToRev(bytes []byte) revision { + return revision{ + main: int64(binary.BigEndian.Uint64(bytes[0:8])), + sub: int64(binary.BigEndian.Uint64(bytes[9:])), + } +} + +type revisions []revision + +func (a revisions) Len() int { return len(a) } +func (a revisions) Less(i, j int) bool { return a[j].GreaterThan(a[i]) } +func (a revisions) Swap(i, j int) { a[i], a[j] = a[j], a[i] } diff --git a/deps/github.com/coreos/etcd/mvcc/util.go b/deps/github.com/coreos/etcd/mvcc/util.go new file mode 100644 index 000000000..8a0df0bfc --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/util.go @@ -0,0 +1,56 @@ +// 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. + +package mvcc + +import ( + "encoding/binary" + + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" +) + +func UpdateConsistentIndex(be backend.Backend, index uint64) { + tx := be.BatchTx() + tx.Lock() + defer tx.Unlock() + + var oldi uint64 + _, vs := tx.UnsafeRange(metaBucketName, consistentIndexKeyName, nil, 0) + if len(vs) != 0 { + oldi = binary.BigEndian.Uint64(vs[0]) + } + + if index <= oldi { + return + } + + bs := make([]byte, 8) + binary.BigEndian.PutUint64(bs, index) + tx.UnsafePut(metaBucketName, consistentIndexKeyName, bs) +} + +func WriteKV(be backend.Backend, kv mvccpb.KeyValue) { + ibytes := newRevBytes() + revToBytes(revision{main: kv.ModRevision}, ibytes) + + d, err := kv.Marshal() + if err != nil { + plog.Fatalf("cannot marshal event: %v", err) + } + + be.BatchTx().Lock() + be.BatchTx().UnsafePut(keyBucketName, ibytes, d) + be.BatchTx().Unlock() +} diff --git a/deps/github.com/coreos/etcd/mvcc/watchable_store.go b/deps/github.com/coreos/etcd/mvcc/watchable_store.go new file mode 100644 index 000000000..68d9ab71d --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/watchable_store.go @@ -0,0 +1,522 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "sync" + "time" + + "github.com/coreos/etcd/lease" + "github.com/coreos/etcd/mvcc/backend" + "github.com/coreos/etcd/mvcc/mvccpb" +) + +const ( + // chanBufLen is the length of the buffered chan + // for sending out watched events. + // TODO: find a good buf value. 1024 is just a random one that + // seems to be reasonable. + chanBufLen = 1024 + + // maxWatchersPerSync is the number of watchers to sync in a single batch + maxWatchersPerSync = 512 +) + +type watchable interface { + watch(key, end []byte, startRev int64, id WatchID, ch chan<- WatchResponse, fcs ...FilterFunc) (*watcher, cancelFunc) + progress(w *watcher) + rev() int64 +} + +type watchableStore struct { + *store + + // mu protects watcher groups and batches. It should never be locked + // before locking store.mu to avoid deadlock. + mu sync.RWMutex + + // victims are watcher batches that were blocked on the watch channel + victims []watcherBatch + victimc chan struct{} + + // contains all unsynced watchers that needs to sync with events that have happened + unsynced watcherGroup + + // contains all synced watchers that are in sync with the progress of the store. + // The key of the map is the key that the watcher watches on. + synced watcherGroup + + stopc chan struct{} + wg sync.WaitGroup +} + +// cancelFunc updates unsynced and synced maps when running +// cancel operations. +type cancelFunc func() + +func New(b backend.Backend, le lease.Lessor, ig ConsistentIndexGetter) ConsistentWatchableKV { + return newWatchableStore(b, le, ig) +} + +func newWatchableStore(b backend.Backend, le lease.Lessor, ig ConsistentIndexGetter) *watchableStore { + s := &watchableStore{ + store: NewStore(b, le, ig), + victimc: make(chan struct{}, 1), + unsynced: newWatcherGroup(), + synced: newWatcherGroup(), + stopc: make(chan struct{}), + } + s.store.ReadView = &readView{s} + s.store.WriteView = &writeView{s} + if s.le != nil { + // use this store as the deleter so revokes trigger watch events + s.le.SetRangeDeleter(func() lease.TxnDelete { return s.Write() }) + } + s.wg.Add(2) + go s.syncWatchersLoop() + go s.syncVictimsLoop() + return s +} + +func (s *watchableStore) Close() error { + close(s.stopc) + s.wg.Wait() + return s.store.Close() +} + +func (s *watchableStore) NewWatchStream() WatchStream { + watchStreamGauge.Inc() + return &watchStream{ + watchable: s, + ch: make(chan WatchResponse, chanBufLen), + cancels: make(map[WatchID]cancelFunc), + watchers: make(map[WatchID]*watcher), + } +} + +func (s *watchableStore) watch(key, end []byte, startRev int64, id WatchID, ch chan<- WatchResponse, fcs ...FilterFunc) (*watcher, cancelFunc) { + wa := &watcher{ + key: key, + end: end, + minRev: startRev, + id: id, + ch: ch, + fcs: fcs, + } + + s.mu.Lock() + s.revMu.RLock() + synced := startRev > s.store.currentRev || startRev == 0 + if synced { + wa.minRev = s.store.currentRev + 1 + if startRev > wa.minRev { + wa.minRev = startRev + } + } + if synced { + s.synced.add(wa) + } else { + slowWatcherGauge.Inc() + s.unsynced.add(wa) + } + s.revMu.RUnlock() + s.mu.Unlock() + + watcherGauge.Inc() + + return wa, func() { s.cancelWatcher(wa) } +} + +// cancelWatcher removes references of the watcher from the watchableStore +func (s *watchableStore) cancelWatcher(wa *watcher) { + for { + s.mu.Lock() + + if s.unsynced.delete(wa) { + slowWatcherGauge.Dec() + break + } else if s.synced.delete(wa) { + break + } else if wa.compacted { + break + } + + if !wa.victim { + panic("watcher not victim but not in watch groups") + } + + var victimBatch watcherBatch + for _, wb := range s.victims { + if wb[wa] != nil { + victimBatch = wb + break + } + } + if victimBatch != nil { + slowWatcherGauge.Dec() + delete(victimBatch, wa) + break + } + + // victim being processed so not accessible; retry + s.mu.Unlock() + time.Sleep(time.Millisecond) + } + + watcherGauge.Dec() + s.mu.Unlock() +} + +func (s *watchableStore) Restore(b backend.Backend) error { + s.mu.Lock() + defer s.mu.Unlock() + err := s.store.Restore(b) + if err != nil { + return err + } + + for wa := range s.synced.watchers { + s.unsynced.watchers.add(wa) + } + s.synced = newWatcherGroup() + return nil +} + +// syncWatchersLoop syncs the watcher in the unsynced map every 100ms. +func (s *watchableStore) syncWatchersLoop() { + defer s.wg.Done() + + for { + s.mu.RLock() + st := time.Now() + lastUnsyncedWatchers := s.unsynced.size() + s.mu.RUnlock() + + unsyncedWatchers := 0 + if lastUnsyncedWatchers > 0 { + unsyncedWatchers = s.syncWatchers() + } + syncDuration := time.Since(st) + + waitDuration := 100 * time.Millisecond + // more work pending? + if unsyncedWatchers != 0 && lastUnsyncedWatchers > unsyncedWatchers { + // be fair to other store operations by yielding time taken + waitDuration = syncDuration + } + + select { + case <-time.After(waitDuration): + case <-s.stopc: + return + } + } +} + +// syncVictimsLoop tries to write precomputed watcher responses to +// watchers that had a blocked watcher channel +func (s *watchableStore) syncVictimsLoop() { + defer s.wg.Done() + + for { + for s.moveVictims() != 0 { + // try to update all victim watchers + } + s.mu.RLock() + isEmpty := len(s.victims) == 0 + s.mu.RUnlock() + + var tickc <-chan time.Time + if !isEmpty { + tickc = time.After(10 * time.Millisecond) + } + + select { + case <-tickc: + case <-s.victimc: + case <-s.stopc: + return + } + } +} + +// moveVictims tries to update watches with already pending event data +func (s *watchableStore) moveVictims() (moved int) { + s.mu.Lock() + victims := s.victims + s.victims = nil + s.mu.Unlock() + + var newVictim watcherBatch + for _, wb := range victims { + // try to send responses again + for w, eb := range wb { + // watcher has observed the store up to, but not including, w.minRev + rev := w.minRev - 1 + if w.send(WatchResponse{WatchID: w.id, Events: eb.evs, Revision: rev}) { + pendingEventsGauge.Add(float64(len(eb.evs))) + } else { + if newVictim == nil { + newVictim = make(watcherBatch) + } + newVictim[w] = eb + continue + } + moved++ + } + + // assign completed victim watchers to unsync/sync + s.mu.Lock() + s.store.revMu.RLock() + curRev := s.store.currentRev + for w, eb := range wb { + if newVictim != nil && newVictim[w] != nil { + // couldn't send watch response; stays victim + continue + } + w.victim = false + if eb.moreRev != 0 { + w.minRev = eb.moreRev + } + if w.minRev <= curRev { + s.unsynced.add(w) + } else { + slowWatcherGauge.Dec() + s.synced.add(w) + } + } + s.store.revMu.RUnlock() + s.mu.Unlock() + } + + if len(newVictim) > 0 { + s.mu.Lock() + s.victims = append(s.victims, newVictim) + s.mu.Unlock() + } + + return moved +} + +// syncWatchers syncs unsynced watchers by: +// 1. choose a set of watchers from the unsynced watcher group +// 2. iterate over the set to get the minimum revision and remove compacted watchers +// 3. use minimum revision to get all key-value pairs and send those events to watchers +// 4. remove synced watchers in set from unsynced group and move to synced group +func (s *watchableStore) syncWatchers() int { + s.mu.Lock() + defer s.mu.Unlock() + + if s.unsynced.size() == 0 { + return 0 + } + + s.store.revMu.RLock() + defer s.store.revMu.RUnlock() + + // in order to find key-value pairs from unsynced watchers, we need to + // find min revision index, and these revisions can be used to + // query the backend store of key-value pairs + curRev := s.store.currentRev + compactionRev := s.store.compactMainRev + + wg, minRev := s.unsynced.choose(maxWatchersPerSync, curRev, compactionRev) + minBytes, maxBytes := newRevBytes(), newRevBytes() + revToBytes(revision{main: minRev}, minBytes) + revToBytes(revision{main: curRev + 1}, maxBytes) + + // UnsafeRange returns keys and values. And in boltdb, keys are revisions. + // values are actual key-value pairs in backend. + tx := s.store.b.ReadTx() + tx.Lock() + revs, vs := tx.UnsafeRange(keyBucketName, minBytes, maxBytes, 0) + evs := kvsToEvents(wg, revs, vs) + tx.Unlock() + + var victims watcherBatch + wb := newWatcherBatch(wg, evs) + for w := range wg.watchers { + w.minRev = curRev + 1 + + eb, ok := wb[w] + if !ok { + // bring un-notified watcher to synced + s.synced.add(w) + s.unsynced.delete(w) + continue + } + + if eb.moreRev != 0 { + w.minRev = eb.moreRev + } + + if w.send(WatchResponse{WatchID: w.id, Events: eb.evs, Revision: curRev}) { + pendingEventsGauge.Add(float64(len(eb.evs))) + } else { + if victims == nil { + victims = make(watcherBatch) + } + w.victim = true + } + + if w.victim { + victims[w] = eb + } else { + if eb.moreRev != 0 { + // stay unsynced; more to read + continue + } + s.synced.add(w) + } + s.unsynced.delete(w) + } + s.addVictim(victims) + + vsz := 0 + for _, v := range s.victims { + vsz += len(v) + } + slowWatcherGauge.Set(float64(s.unsynced.size() + vsz)) + + return s.unsynced.size() +} + +// kvsToEvents gets all events for the watchers from all key-value pairs +func kvsToEvents(wg *watcherGroup, revs, vals [][]byte) (evs []mvccpb.Event) { + for i, v := range vals { + var kv mvccpb.KeyValue + if err := kv.Unmarshal(v); err != nil { + plog.Panicf("cannot unmarshal event: %v", err) + } + + if !wg.contains(string(kv.Key)) { + continue + } + + ty := mvccpb.PUT + if isTombstone(revs[i]) { + ty = mvccpb.DELETE + // patch in mod revision so watchers won't skip + kv.ModRevision = bytesToRev(revs[i]).main + } + evs = append(evs, mvccpb.Event{Kv: &kv, Type: ty}) + } + return evs +} + +// notify notifies the fact that given event at the given rev just happened to +// watchers that watch on the key of the event. +func (s *watchableStore) notify(rev int64, evs []mvccpb.Event) { + var victim watcherBatch + for w, eb := range newWatcherBatch(&s.synced, evs) { + if eb.revs != 1 { + plog.Panicf("unexpected multiple revisions in notification") + } + + if w.send(WatchResponse{WatchID: w.id, Events: eb.evs, Revision: rev}) { + pendingEventsGauge.Add(float64(len(eb.evs))) + } else { + // move slow watcher to victims + w.minRev = rev + 1 + if victim == nil { + victim = make(watcherBatch) + } + w.victim = true + victim[w] = eb + s.synced.delete(w) + slowWatcherGauge.Inc() + } + } + s.addVictim(victim) +} + +func (s *watchableStore) addVictim(victim watcherBatch) { + if victim == nil { + return + } + s.victims = append(s.victims, victim) + select { + case s.victimc <- struct{}{}: + default: + } +} + +func (s *watchableStore) rev() int64 { return s.store.Rev() } + +func (s *watchableStore) progress(w *watcher) { + s.mu.RLock() + defer s.mu.RUnlock() + + if _, ok := s.synced.watchers[w]; ok { + w.send(WatchResponse{WatchID: w.id, Revision: s.rev()}) + // If the ch is full, this watcher is receiving events. + // We do not need to send progress at all. + } +} + +type watcher struct { + // the watcher key + key []byte + // end indicates the end of the range to watch. + // If end is set, the watcher is on a range. + end []byte + + // victim is set when ch is blocked and undergoing victim processing + victim bool + + // compacted is set when the watcher is removed because of compaction + compacted bool + + // minRev is the minimum revision update the watcher will accept + minRev int64 + id WatchID + + fcs []FilterFunc + // a chan to send out the watch response. + // The chan might be shared with other watchers. + ch chan<- WatchResponse +} + +func (w *watcher) send(wr WatchResponse) bool { + progressEvent := len(wr.Events) == 0 + + if len(w.fcs) != 0 { + ne := make([]mvccpb.Event, 0, len(wr.Events)) + for i := range wr.Events { + filtered := false + for _, filter := range w.fcs { + if filter(wr.Events[i]) { + filtered = true + break + } + } + if !filtered { + ne = append(ne, wr.Events[i]) + } + } + wr.Events = ne + } + + // if all events are filtered out, we should send nothing. + if !progressEvent && len(wr.Events) == 0 { + return true + } + select { + case w.ch <- wr: + return true + default: + return false + } +} diff --git a/deps/github.com/coreos/etcd/mvcc/watchable_store_txn.go b/deps/github.com/coreos/etcd/mvcc/watchable_store_txn.go new file mode 100644 index 000000000..5c5bfda13 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/watchable_store_txn.go @@ -0,0 +1,53 @@ +// Copyright 2017 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. + +package mvcc + +import ( + "github.com/coreos/etcd/mvcc/mvccpb" +) + +func (tw *watchableStoreTxnWrite) End() { + changes := tw.Changes() + if len(changes) == 0 { + tw.TxnWrite.End() + return + } + + rev := tw.Rev() + 1 + evs := make([]mvccpb.Event, len(changes)) + for i, change := range changes { + evs[i].Kv = &changes[i] + if change.CreateRevision == 0 { + evs[i].Type = mvccpb.DELETE + evs[i].Kv.ModRevision = rev + } else { + evs[i].Type = mvccpb.PUT + } + } + + // end write txn under watchable store lock so the updates are visible + // when asynchronous event posting checks the current store revision + tw.s.mu.Lock() + tw.s.notify(rev, evs) + tw.TxnWrite.End() + tw.s.mu.Unlock() +} + +type watchableStoreTxnWrite struct { + TxnWrite + s *watchableStore +} + +func (s *watchableStore) Write() TxnWrite { return &watchableStoreTxnWrite{s.store.Write(), s} } diff --git a/deps/github.com/coreos/etcd/mvcc/watcher.go b/deps/github.com/coreos/etcd/mvcc/watcher.go new file mode 100644 index 000000000..9468d4269 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/watcher.go @@ -0,0 +1,171 @@ +// Copyright 2015 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. + +package mvcc + +import ( + "bytes" + "errors" + "sync" + + "github.com/coreos/etcd/mvcc/mvccpb" +) + +var ( + ErrWatcherNotExist = errors.New("mvcc: watcher does not exist") +) + +type WatchID int64 + +// FilterFunc returns true if the given event should be filtered out. +type FilterFunc func(e mvccpb.Event) bool + +type WatchStream interface { + // Watch creates a watcher. The watcher watches the events happening or + // happened on the given key or range [key, end) from the given startRev. + // + // The whole event history can be watched unless compacted. + // If `startRev` <=0, watch observes events after currentRev. + // + // The returned `id` is the ID of this watcher. It appears as WatchID + // in events that are sent to the created watcher through stream channel. + // + Watch(key, end []byte, startRev int64, fcs ...FilterFunc) WatchID + + // Chan returns a chan. All watch response will be sent to the returned chan. + Chan() <-chan WatchResponse + + // RequestProgress requests the progress of the watcher with given ID. The response + // will only be sent if the watcher is currently synced. + // The responses will be sent through the WatchRespone Chan attached + // with this stream to ensure correct ordering. + // The responses contains no events. The revision in the response is the progress + // of the watchers since the watcher is currently synced. + RequestProgress(id WatchID) + + // Cancel cancels a watcher by giving its ID. If watcher does not exist, an error will be + // returned. + Cancel(id WatchID) error + + // Close closes Chan and release all related resources. + Close() + + // Rev returns the current revision of the KV the stream watches on. + Rev() int64 +} + +type WatchResponse struct { + // WatchID is the WatchID of the watcher this response sent to. + WatchID WatchID + + // Events contains all the events that needs to send. + Events []mvccpb.Event + + // Revision is the revision of the KV when the watchResponse is created. + // For a normal response, the revision should be the same as the last + // modified revision inside Events. For a delayed response to a unsynced + // watcher, the revision is greater than the last modified revision + // inside Events. + Revision int64 + + // CompactRevision is set when the watcher is cancelled due to compaction. + CompactRevision int64 +} + +// watchStream contains a collection of watchers that share +// one streaming chan to send out watched events and other control events. +type watchStream struct { + watchable watchable + ch chan WatchResponse + + mu sync.Mutex // guards fields below it + // nextID is the ID pre-allocated for next new watcher in this stream + nextID WatchID + closed bool + cancels map[WatchID]cancelFunc + watchers map[WatchID]*watcher +} + +// Watch creates a new watcher in the stream and returns its WatchID. +// TODO: return error if ws is closed? +func (ws *watchStream) Watch(key, end []byte, startRev int64, fcs ...FilterFunc) WatchID { + // prevent wrong range where key >= end lexicographically + // watch request with 'WithFromKey' has empty-byte range end + if len(end) != 0 && bytes.Compare(key, end) != -1 { + return -1 + } + + ws.mu.Lock() + defer ws.mu.Unlock() + if ws.closed { + return -1 + } + + id := ws.nextID + ws.nextID++ + + w, c := ws.watchable.watch(key, end, startRev, id, ws.ch, fcs...) + + ws.cancels[id] = c + ws.watchers[id] = w + return id +} + +func (ws *watchStream) Chan() <-chan WatchResponse { + return ws.ch +} + +func (ws *watchStream) Cancel(id WatchID) error { + ws.mu.Lock() + cancel, ok := ws.cancels[id] + ok = ok && !ws.closed + if ok { + delete(ws.cancels, id) + delete(ws.watchers, id) + } + ws.mu.Unlock() + if !ok { + return ErrWatcherNotExist + } + cancel() + return nil +} + +func (ws *watchStream) Close() { + ws.mu.Lock() + defer ws.mu.Unlock() + + for _, cancel := range ws.cancels { + cancel() + } + ws.closed = true + close(ws.ch) + watchStreamGauge.Dec() +} + +func (ws *watchStream) Rev() int64 { + ws.mu.Lock() + defer ws.mu.Unlock() + return ws.watchable.rev() +} + +func (ws *watchStream) RequestProgress(id WatchID) { + ws.mu.Lock() + w, ok := ws.watchers[id] + ws.mu.Unlock() + if !ok { + return + } + ws.watchable.progress(w) +} diff --git a/deps/github.com/coreos/etcd/mvcc/watcher_group.go b/deps/github.com/coreos/etcd/mvcc/watcher_group.go new file mode 100644 index 000000000..6ef1d0ce8 --- /dev/null +++ b/deps/github.com/coreos/etcd/mvcc/watcher_group.go @@ -0,0 +1,283 @@ +// 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. + +package mvcc + +import ( + "math" + + "github.com/coreos/etcd/mvcc/mvccpb" + "github.com/coreos/etcd/pkg/adt" +) + +var ( + // watchBatchMaxRevs is the maximum distinct revisions that + // may be sent to an unsynced watcher at a time. Declared as + // var instead of const for testing purposes. + watchBatchMaxRevs = 1000 +) + +type eventBatch struct { + // evs is a batch of revision-ordered events + evs []mvccpb.Event + // revs is the minimum unique revisions observed for this batch + revs int + // moreRev is first revision with more events following this batch + moreRev int64 +} + +func (eb *eventBatch) add(ev mvccpb.Event) { + if eb.revs > watchBatchMaxRevs { + // maxed out batch size + return + } + + if len(eb.evs) == 0 { + // base case + eb.revs = 1 + eb.evs = append(eb.evs, ev) + return + } + + // revision accounting + ebRev := eb.evs[len(eb.evs)-1].Kv.ModRevision + evRev := ev.Kv.ModRevision + if evRev > ebRev { + eb.revs++ + if eb.revs > watchBatchMaxRevs { + eb.moreRev = evRev + return + } + } + + eb.evs = append(eb.evs, ev) +} + +type watcherBatch map[*watcher]*eventBatch + +func (wb watcherBatch) add(w *watcher, ev mvccpb.Event) { + eb := wb[w] + if eb == nil { + eb = &eventBatch{} + wb[w] = eb + } + eb.add(ev) +} + +// newWatcherBatch maps watchers to their matched events. It enables quick +// events look up by watcher. +func newWatcherBatch(wg *watcherGroup, evs []mvccpb.Event) watcherBatch { + if len(wg.watchers) == 0 { + return nil + } + + wb := make(watcherBatch) + for _, ev := range evs { + for w := range wg.watcherSetByKey(string(ev.Kv.Key)) { + if ev.Kv.ModRevision >= w.minRev { + // don't double notify + wb.add(w, ev) + } + } + } + return wb +} + +type watcherSet map[*watcher]struct{} + +func (w watcherSet) add(wa *watcher) { + if _, ok := w[wa]; ok { + panic("add watcher twice!") + } + w[wa] = struct{}{} +} + +func (w watcherSet) union(ws watcherSet) { + for wa := range ws { + w.add(wa) + } +} + +func (w watcherSet) delete(wa *watcher) { + if _, ok := w[wa]; !ok { + panic("removing missing watcher!") + } + delete(w, wa) +} + +type watcherSetByKey map[string]watcherSet + +func (w watcherSetByKey) add(wa *watcher) { + set := w[string(wa.key)] + if set == nil { + set = make(watcherSet) + w[string(wa.key)] = set + } + set.add(wa) +} + +func (w watcherSetByKey) delete(wa *watcher) bool { + k := string(wa.key) + if v, ok := w[k]; ok { + if _, ok := v[wa]; ok { + delete(v, wa) + if len(v) == 0 { + // remove the set; nothing left + delete(w, k) + } + return true + } + } + return false +} + +// watcherGroup is a collection of watchers organized by their ranges +type watcherGroup struct { + // keyWatchers has the watchers that watch on a single key + keyWatchers watcherSetByKey + // ranges has the watchers that watch a range; it is sorted by interval + ranges adt.IntervalTree + // watchers is the set of all watchers + watchers watcherSet +} + +func newWatcherGroup() watcherGroup { + return watcherGroup{ + keyWatchers: make(watcherSetByKey), + watchers: make(watcherSet), + } +} + +// add puts a watcher in the group. +func (wg *watcherGroup) add(wa *watcher) { + wg.watchers.add(wa) + if wa.end == nil { + wg.keyWatchers.add(wa) + return + } + + // interval already registered? + ivl := adt.NewStringAffineInterval(string(wa.key), string(wa.end)) + if iv := wg.ranges.Find(ivl); iv != nil { + iv.Val.(watcherSet).add(wa) + return + } + + // not registered, put in interval tree + ws := make(watcherSet) + ws.add(wa) + wg.ranges.Insert(ivl, ws) +} + +// contains is whether the given key has a watcher in the group. +func (wg *watcherGroup) contains(key string) bool { + _, ok := wg.keyWatchers[key] + return ok || wg.ranges.Intersects(adt.NewStringAffinePoint(key)) +} + +// size gives the number of unique watchers in the group. +func (wg *watcherGroup) size() int { return len(wg.watchers) } + +// delete removes a watcher from the group. +func (wg *watcherGroup) delete(wa *watcher) bool { + if _, ok := wg.watchers[wa]; !ok { + return false + } + wg.watchers.delete(wa) + if wa.end == nil { + wg.keyWatchers.delete(wa) + return true + } + + ivl := adt.NewStringAffineInterval(string(wa.key), string(wa.end)) + iv := wg.ranges.Find(ivl) + if iv == nil { + return false + } + + ws := iv.Val.(watcherSet) + delete(ws, wa) + if len(ws) == 0 { + // remove interval missing watchers + if ok := wg.ranges.Delete(ivl); !ok { + panic("could not remove watcher from interval tree") + } + } + + return true +} + +// choose selects watchers from the watcher group to update +func (wg *watcherGroup) choose(maxWatchers int, curRev, compactRev int64) (*watcherGroup, int64) { + if len(wg.watchers) < maxWatchers { + return wg, wg.chooseAll(curRev, compactRev) + } + ret := newWatcherGroup() + for w := range wg.watchers { + if maxWatchers <= 0 { + break + } + maxWatchers-- + ret.add(w) + } + return &ret, ret.chooseAll(curRev, compactRev) +} + +func (wg *watcherGroup) chooseAll(curRev, compactRev int64) int64 { + minRev := int64(math.MaxInt64) + for w := range wg.watchers { + if w.minRev > curRev { + panic("watcher current revision should not exceed current revision") + } + if w.minRev < compactRev { + select { + case w.ch <- WatchResponse{WatchID: w.id, CompactRevision: compactRev}: + w.compacted = true + wg.delete(w) + default: + // retry next time + } + continue + } + if minRev > w.minRev { + minRev = w.minRev + } + } + return minRev +} + +// watcherSetByKey gets the set of watchers that receive events on the given key. +func (wg *watcherGroup) watcherSetByKey(key string) watcherSet { + wkeys := wg.keyWatchers[key] + wranges := wg.ranges.Stab(adt.NewStringAffinePoint(key)) + + // zero-copy cases + switch { + case len(wranges) == 0: + // no need to merge ranges or copy; reuse single-key set + return wkeys + case len(wranges) == 0 && len(wkeys) == 0: + return nil + case len(wranges) == 1 && len(wkeys) == 0: + return wranges[0].Val.(watcherSet) + } + + // copy case + ret := make(watcherSet) + ret.union(wg.keyWatchers[key]) + for _, item := range wranges { + ret.union(item.Val.(watcherSet)) + } + return ret +} diff --git a/deps/github.com/coreos/etcd/pkg/adt/doc.go b/deps/github.com/coreos/etcd/pkg/adt/doc.go new file mode 100644 index 000000000..1a9559145 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/adt/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package adt implements useful abstract data types. +package adt diff --git a/deps/github.com/coreos/etcd/pkg/adt/interval_tree.go b/deps/github.com/coreos/etcd/pkg/adt/interval_tree.go new file mode 100644 index 000000000..9769771ea --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/adt/interval_tree.go @@ -0,0 +1,590 @@ +// 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. + +package adt + +import ( + "bytes" + "math" +) + +// Comparable is an interface for trichotomic comparisons. +type Comparable interface { + // Compare gives the result of a 3-way comparison + // a.Compare(b) = 1 => a > b + // a.Compare(b) = 0 => a == b + // a.Compare(b) = -1 => a < b + Compare(c Comparable) int +} + +type rbcolor int + +const ( + black rbcolor = iota + red +) + +// Interval implements a Comparable interval [begin, end) +// TODO: support different sorts of intervals: (a,b), [a,b], (a, b] +type Interval struct { + Begin Comparable + End Comparable +} + +// Compare on an interval gives == if the interval overlaps. +func (ivl *Interval) Compare(c Comparable) int { + ivl2 := c.(*Interval) + ivbCmpBegin := ivl.Begin.Compare(ivl2.Begin) + ivbCmpEnd := ivl.Begin.Compare(ivl2.End) + iveCmpBegin := ivl.End.Compare(ivl2.Begin) + + // ivl is left of ivl2 + if ivbCmpBegin < 0 && iveCmpBegin <= 0 { + return -1 + } + + // iv is right of iv2 + if ivbCmpEnd >= 0 { + return 1 + } + + return 0 +} + +type intervalNode struct { + // iv is the interval-value pair entry. + iv IntervalValue + // max endpoint of all descendent nodes. + max Comparable + // left and right are sorted by low endpoint of key interval + left, right *intervalNode + // parent is the direct ancestor of the node + parent *intervalNode + c rbcolor +} + +func (x *intervalNode) color() rbcolor { + if x == nil { + return black + } + return x.c +} + +func (n *intervalNode) height() int { + if n == nil { + return 0 + } + ld := n.left.height() + rd := n.right.height() + if ld < rd { + return rd + 1 + } + return ld + 1 +} + +func (x *intervalNode) min() *intervalNode { + for x.left != nil { + x = x.left + } + return x +} + +// successor is the next in-order node in the tree +func (x *intervalNode) successor() *intervalNode { + if x.right != nil { + return x.right.min() + } + y := x.parent + for y != nil && x == y.right { + x = y + y = y.parent + } + return y +} + +// updateMax updates the maximum values for a node and its ancestors +func (x *intervalNode) updateMax() { + for x != nil { + oldmax := x.max + max := x.iv.Ivl.End + if x.left != nil && x.left.max.Compare(max) > 0 { + max = x.left.max + } + if x.right != nil && x.right.max.Compare(max) > 0 { + max = x.right.max + } + if oldmax.Compare(max) == 0 { + break + } + x.max = max + x = x.parent + } +} + +type nodeVisitor func(n *intervalNode) bool + +// visit will call a node visitor on each node that overlaps the given interval +func (x *intervalNode) visit(iv *Interval, nv nodeVisitor) bool { + if x == nil { + return true + } + v := iv.Compare(&x.iv.Ivl) + switch { + case v < 0: + if !x.left.visit(iv, nv) { + return false + } + case v > 0: + maxiv := Interval{x.iv.Ivl.Begin, x.max} + if maxiv.Compare(iv) == 0 { + if !x.left.visit(iv, nv) || !x.right.visit(iv, nv) { + return false + } + } + default: + if !x.left.visit(iv, nv) || !nv(x) || !x.right.visit(iv, nv) { + return false + } + } + return true +} + +type IntervalValue struct { + Ivl Interval + Val interface{} +} + +// IntervalTree represents a (mostly) textbook implementation of the +// "Introduction to Algorithms" (Cormen et al, 2nd ed.) chapter 13 red-black tree +// and chapter 14.3 interval tree with search supporting "stabbing queries". +type IntervalTree struct { + root *intervalNode + count int +} + +// Delete removes the node with the given interval from the tree, returning +// true if a node is in fact removed. +func (ivt *IntervalTree) Delete(ivl Interval) bool { + z := ivt.find(ivl) + if z == nil { + return false + } + + y := z + if z.left != nil && z.right != nil { + y = z.successor() + } + + x := y.left + if x == nil { + x = y.right + } + if x != nil { + x.parent = y.parent + } + + if y.parent == nil { + ivt.root = x + } else { + if y == y.parent.left { + y.parent.left = x + } else { + y.parent.right = x + } + y.parent.updateMax() + } + if y != z { + z.iv = y.iv + z.updateMax() + } + + if y.color() == black && x != nil { + ivt.deleteFixup(x) + } + + ivt.count-- + return true +} + +func (ivt *IntervalTree) deleteFixup(x *intervalNode) { + for x != ivt.root && x.color() == black && x.parent != nil { + if x == x.parent.left { + w := x.parent.right + if w.color() == red { + w.c = black + x.parent.c = red + ivt.rotateLeft(x.parent) + w = x.parent.right + } + if w == nil { + break + } + if w.left.color() == black && w.right.color() == black { + w.c = red + x = x.parent + } else { + if w.right.color() == black { + w.left.c = black + w.c = red + ivt.rotateRight(w) + w = x.parent.right + } + w.c = x.parent.color() + x.parent.c = black + w.right.c = black + ivt.rotateLeft(x.parent) + x = ivt.root + } + } else { + // same as above but with left and right exchanged + w := x.parent.left + if w.color() == red { + w.c = black + x.parent.c = red + ivt.rotateRight(x.parent) + w = x.parent.left + } + if w == nil { + break + } + if w.left.color() == black && w.right.color() == black { + w.c = red + x = x.parent + } else { + if w.left.color() == black { + w.right.c = black + w.c = red + ivt.rotateLeft(w) + w = x.parent.left + } + w.c = x.parent.color() + x.parent.c = black + w.left.c = black + ivt.rotateRight(x.parent) + x = ivt.root + } + } + } + if x != nil { + x.c = black + } +} + +// Insert adds a node with the given interval into the tree. +func (ivt *IntervalTree) Insert(ivl Interval, val interface{}) { + var y *intervalNode + z := &intervalNode{iv: IntervalValue{ivl, val}, max: ivl.End, c: red} + x := ivt.root + for x != nil { + y = x + if z.iv.Ivl.Begin.Compare(x.iv.Ivl.Begin) < 0 { + x = x.left + } else { + x = x.right + } + } + + z.parent = y + if y == nil { + ivt.root = z + } else { + if z.iv.Ivl.Begin.Compare(y.iv.Ivl.Begin) < 0 { + y.left = z + } else { + y.right = z + } + y.updateMax() + } + z.c = red + ivt.insertFixup(z) + ivt.count++ +} + +func (ivt *IntervalTree) insertFixup(z *intervalNode) { + for z.parent != nil && z.parent.parent != nil && z.parent.color() == red { + if z.parent == z.parent.parent.left { + y := z.parent.parent.right + if y.color() == red { + y.c = black + z.parent.c = black + z.parent.parent.c = red + z = z.parent.parent + } else { + if z == z.parent.right { + z = z.parent + ivt.rotateLeft(z) + } + z.parent.c = black + z.parent.parent.c = red + ivt.rotateRight(z.parent.parent) + } + } else { + // same as then with left/right exchanged + y := z.parent.parent.left + if y.color() == red { + y.c = black + z.parent.c = black + z.parent.parent.c = red + z = z.parent.parent + } else { + if z == z.parent.left { + z = z.parent + ivt.rotateRight(z) + } + z.parent.c = black + z.parent.parent.c = red + ivt.rotateLeft(z.parent.parent) + } + } + } + ivt.root.c = black +} + +// rotateLeft moves x so it is left of its right child +func (ivt *IntervalTree) rotateLeft(x *intervalNode) { + y := x.right + x.right = y.left + if y.left != nil { + y.left.parent = x + } + x.updateMax() + ivt.replaceParent(x, y) + y.left = x + y.updateMax() +} + +// rotateLeft moves x so it is right of its left child +func (ivt *IntervalTree) rotateRight(x *intervalNode) { + if x == nil { + return + } + y := x.left + x.left = y.right + if y.right != nil { + y.right.parent = x + } + x.updateMax() + ivt.replaceParent(x, y) + y.right = x + y.updateMax() +} + +// replaceParent replaces x's parent with y +func (ivt *IntervalTree) replaceParent(x *intervalNode, y *intervalNode) { + y.parent = x.parent + if x.parent == nil { + ivt.root = y + } else { + if x == x.parent.left { + x.parent.left = y + } else { + x.parent.right = y + } + x.parent.updateMax() + } + x.parent = y +} + +// Len gives the number of elements in the tree +func (ivt *IntervalTree) Len() int { return ivt.count } + +// Height is the number of levels in the tree; one node has height 1. +func (ivt *IntervalTree) Height() int { return ivt.root.height() } + +// MaxHeight is the expected maximum tree height given the number of nodes +func (ivt *IntervalTree) MaxHeight() int { + return int((2 * math.Log2(float64(ivt.Len()+1))) + 0.5) +} + +// IntervalVisitor is used on tree searches; return false to stop searching. +type IntervalVisitor func(n *IntervalValue) bool + +// Visit calls a visitor function on every tree node intersecting the given interval. +// It will visit each interval [x, y) in ascending order sorted on x. +func (ivt *IntervalTree) Visit(ivl Interval, ivv IntervalVisitor) { + ivt.root.visit(&ivl, func(n *intervalNode) bool { return ivv(&n.iv) }) +} + +// find the exact node for a given interval +func (ivt *IntervalTree) find(ivl Interval) (ret *intervalNode) { + f := func(n *intervalNode) bool { + if n.iv.Ivl != ivl { + return true + } + ret = n + return false + } + ivt.root.visit(&ivl, f) + return ret +} + +// Find gets the IntervalValue for the node matching the given interval +func (ivt *IntervalTree) Find(ivl Interval) (ret *IntervalValue) { + n := ivt.find(ivl) + if n == nil { + return nil + } + return &n.iv +} + +// Intersects returns true if there is some tree node intersecting the given interval. +func (ivt *IntervalTree) Intersects(iv Interval) bool { + x := ivt.root + for x != nil && iv.Compare(&x.iv.Ivl) != 0 { + if x.left != nil && x.left.max.Compare(iv.Begin) > 0 { + x = x.left + } else { + x = x.right + } + } + return x != nil +} + +// Contains returns true if the interval tree's keys cover the entire given interval. +func (ivt *IntervalTree) Contains(ivl Interval) bool { + var maxEnd, minBegin Comparable + + isContiguous := true + ivt.Visit(ivl, func(n *IntervalValue) bool { + if minBegin == nil { + minBegin = n.Ivl.Begin + maxEnd = n.Ivl.End + return true + } + if maxEnd.Compare(n.Ivl.Begin) < 0 { + isContiguous = false + return false + } + if n.Ivl.End.Compare(maxEnd) > 0 { + maxEnd = n.Ivl.End + } + return true + }) + + return isContiguous && minBegin != nil && maxEnd.Compare(ivl.End) >= 0 && minBegin.Compare(ivl.Begin) <= 0 +} + +// Stab returns a slice with all elements in the tree intersecting the interval. +func (ivt *IntervalTree) Stab(iv Interval) (ivs []*IntervalValue) { + if ivt.count == 0 { + return nil + } + f := func(n *IntervalValue) bool { ivs = append(ivs, n); return true } + ivt.Visit(iv, f) + return ivs +} + +type StringComparable string + +func (s StringComparable) Compare(c Comparable) int { + sc := c.(StringComparable) + if s < sc { + return -1 + } + if s > sc { + return 1 + } + return 0 +} + +func NewStringInterval(begin, end string) Interval { + return Interval{StringComparable(begin), StringComparable(end)} +} + +func NewStringPoint(s string) Interval { + return Interval{StringComparable(s), StringComparable(s + "\x00")} +} + +// StringAffineComparable treats "" as > all other strings +type StringAffineComparable string + +func (s StringAffineComparable) Compare(c Comparable) int { + sc := c.(StringAffineComparable) + + if len(s) == 0 { + if len(sc) == 0 { + return 0 + } + return 1 + } + if len(sc) == 0 { + return -1 + } + + if s < sc { + return -1 + } + if s > sc { + return 1 + } + return 0 +} + +func NewStringAffineInterval(begin, end string) Interval { + return Interval{StringAffineComparable(begin), StringAffineComparable(end)} +} +func NewStringAffinePoint(s string) Interval { + return NewStringAffineInterval(s, s+"\x00") +} + +func NewInt64Interval(a int64, b int64) Interval { + return Interval{Int64Comparable(a), Int64Comparable(b)} +} + +func NewInt64Point(a int64) Interval { + return Interval{Int64Comparable(a), Int64Comparable(a + 1)} +} + +type Int64Comparable int64 + +func (v Int64Comparable) Compare(c Comparable) int { + vc := c.(Int64Comparable) + cmp := v - vc + if cmp < 0 { + return -1 + } + if cmp > 0 { + return 1 + } + return 0 +} + +// BytesAffineComparable treats empty byte arrays as > all other byte arrays +type BytesAffineComparable []byte + +func (b BytesAffineComparable) Compare(c Comparable) int { + bc := c.(BytesAffineComparable) + + if len(b) == 0 { + if len(bc) == 0 { + return 0 + } + return 1 + } + if len(bc) == 0 { + return -1 + } + + return bytes.Compare(b, bc) +} + +func NewBytesAffineInterval(begin, end []byte) Interval { + return Interval{BytesAffineComparable(begin), BytesAffineComparable(end)} +} +func NewBytesAffinePoint(b []byte) Interval { + be := make([]byte, len(b)+1) + copy(be, b) + be[len(b)] = 0 + return NewBytesAffineInterval(b, be) +} diff --git a/deps/github.com/coreos/etcd/pkg/contention/contention.go b/deps/github.com/coreos/etcd/pkg/contention/contention.go new file mode 100644 index 000000000..26ce9a2f3 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/contention/contention.go @@ -0,0 +1,69 @@ +// 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. + +package contention + +import ( + "sync" + "time" +) + +// TimeoutDetector detects routine starvations by +// observing the actual time duration to finish an action +// or between two events that should happen in a fixed +// interval. If the observed duration is longer than +// the expectation, the detector will report the result. +type TimeoutDetector struct { + mu sync.Mutex // protects all + maxDuration time.Duration + // map from event to time + // time is the last seen time of the event. + records map[uint64]time.Time +} + +// NewTimeoutDetector creates the TimeoutDetector. +func NewTimeoutDetector(maxDuration time.Duration) *TimeoutDetector { + return &TimeoutDetector{ + maxDuration: maxDuration, + records: make(map[uint64]time.Time), + } +} + +// Reset resets the NewTimeoutDetector. +func (td *TimeoutDetector) Reset() { + td.mu.Lock() + defer td.mu.Unlock() + + td.records = make(map[uint64]time.Time) +} + +// Observe observes an event for given id. It returns false and exceeded duration +// if the interval is longer than the expectation. +func (td *TimeoutDetector) Observe(which uint64) (bool, time.Duration) { + td.mu.Lock() + defer td.mu.Unlock() + + ok := true + now := time.Now() + exceed := time.Duration(0) + + if pt, found := td.records[which]; found { + exceed = now.Sub(pt) - td.maxDuration + if exceed > 0 { + ok = false + } + } + td.records[which] = now + return ok, exceed +} diff --git a/deps/github.com/coreos/etcd/pkg/contention/doc.go b/deps/github.com/coreos/etcd/pkg/contention/doc.go new file mode 100644 index 000000000..daf452219 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/contention/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package contention provides facilities for detecting system contention. +package contention diff --git a/deps/github.com/coreos/etcd/pkg/cors/cors.go b/deps/github.com/coreos/etcd/pkg/cors/cors.go new file mode 100644 index 000000000..0c64f16a3 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/cors/cors.go @@ -0,0 +1,90 @@ +// Copyright 2015 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. + +// Package cors handles cross-origin HTTP requests (CORS). +package cors + +import ( + "fmt" + "net/http" + "net/url" + "sort" + "strings" +) + +type CORSInfo map[string]bool + +// Set implements the flag.Value interface to allow users to define a list of CORS origins +func (ci *CORSInfo) Set(s string) error { + m := make(map[string]bool) + for _, v := range strings.Split(s, ",") { + v = strings.TrimSpace(v) + if v == "" { + continue + } + if v != "*" { + if _, err := url.Parse(v); err != nil { + return fmt.Errorf("Invalid CORS origin: %s", err) + } + } + m[v] = true + + } + *ci = CORSInfo(m) + return nil +} + +func (ci *CORSInfo) String() string { + o := make([]string, 0) + for k := range *ci { + o = append(o, k) + } + sort.StringSlice(o).Sort() + return strings.Join(o, ",") +} + +// OriginAllowed determines whether the server will allow a given CORS origin. +func (c CORSInfo) OriginAllowed(origin string) bool { + return c["*"] || c[origin] +} + +type CORSHandler struct { + Handler http.Handler + Info *CORSInfo +} + +// addHeader adds the correct cors headers given an origin +func (h *CORSHandler) addHeader(w http.ResponseWriter, origin string) { + w.Header().Add("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE") + w.Header().Add("Access-Control-Allow-Origin", origin) + w.Header().Add("Access-Control-Allow-Headers", "accept, content-type, authorization") +} + +// ServeHTTP adds the correct CORS headers based on the origin and returns immediately +// with a 200 OK if the method is OPTIONS. +func (h *CORSHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { + // Write CORS header. + if h.Info.OriginAllowed("*") { + h.addHeader(w, "*") + } else if origin := req.Header.Get("Origin"); h.Info.OriginAllowed(origin) { + h.addHeader(w, origin) + } + + if req.Method == "OPTIONS" { + w.WriteHeader(http.StatusOK) + return + } + + h.Handler.ServeHTTP(w, req) +} diff --git a/deps/github.com/coreos/etcd/pkg/cpuutil/doc.go b/deps/github.com/coreos/etcd/pkg/cpuutil/doc.go new file mode 100644 index 000000000..0323b2d34 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/cpuutil/doc.go @@ -0,0 +1,16 @@ +// Copyright 2017 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. + +// Package cpuutil provides facilities for detecting cpu-specific features. +package cpuutil diff --git a/deps/github.com/coreos/etcd/pkg/cpuutil/endian.go b/deps/github.com/coreos/etcd/pkg/cpuutil/endian.go new file mode 100644 index 000000000..6ab898d4b --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/cpuutil/endian.go @@ -0,0 +1,36 @@ +// Copyright 2017 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. + +package cpuutil + +import ( + "encoding/binary" + "unsafe" +) + +const intWidth int = int(unsafe.Sizeof(0)) + +var byteOrder binary.ByteOrder + +// ByteOrder returns the byte order for the CPU's native endianness. +func ByteOrder() binary.ByteOrder { return byteOrder } + +func init() { + var i int = 0x1 + if v := (*[intWidth]byte)(unsafe.Pointer(&i)); v[0] == 0 { + byteOrder = binary.BigEndian + } else { + byteOrder = binary.LittleEndian + } +} diff --git a/deps/github.com/coreos/etcd/pkg/crc/crc.go b/deps/github.com/coreos/etcd/pkg/crc/crc.go new file mode 100644 index 000000000..4b998a484 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/crc/crc.go @@ -0,0 +1,43 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package crc provides utility function for cyclic redundancy check +// algorithms. +package crc + +import ( + "hash" + "hash/crc32" +) + +// The size of a CRC-32 checksum in bytes. +const Size = 4 + +type digest struct { + crc uint32 + tab *crc32.Table +} + +// New creates a new hash.Hash32 computing the CRC-32 checksum +// using the polynomial represented by the Table. +// Modified by xiangli to take a prevcrc. +func New(prev uint32, tab *crc32.Table) hash.Hash32 { return &digest{prev, tab} } + +func (d *digest) Size() int { return Size } + +func (d *digest) BlockSize() int { return 1 } + +func (d *digest) Reset() { d.crc = 0 } + +func (d *digest) Write(p []byte) (n int, err error) { + d.crc = crc32.Update(d.crc, d.tab, p) + return len(p), nil +} + +func (d *digest) Sum32() uint32 { return d.crc } + +func (d *digest) Sum(in []byte) []byte { + s := d.Sum32() + return append(in, byte(s>>24), byte(s>>16), byte(s>>8), byte(s)) +} diff --git a/deps/github.com/coreos/etcd/pkg/debugutil/doc.go b/deps/github.com/coreos/etcd/pkg/debugutil/doc.go new file mode 100644 index 000000000..74499eb27 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/debugutil/doc.go @@ -0,0 +1,16 @@ +// Copyright 2017 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. + +// Package debugutil includes utility functions for debugging. +package debugutil diff --git a/deps/github.com/coreos/etcd/pkg/debugutil/pprof.go b/deps/github.com/coreos/etcd/pkg/debugutil/pprof.go new file mode 100644 index 000000000..8d5544a3d --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/debugutil/pprof.go @@ -0,0 +1,47 @@ +// Copyright 2017 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. + +package debugutil + +import ( + "net/http" + "net/http/pprof" + "runtime" +) + +const HTTPPrefixPProf = "/debug/pprof" + +// PProfHandlers returns a map of pprof handlers keyed by the HTTP path. +func PProfHandlers() map[string]http.Handler { + // set only when there's no existing setting + if runtime.SetMutexProfileFraction(-1) == 0 { + // 1 out of 5 mutex events are reported, on average + runtime.SetMutexProfileFraction(5) + } + + m := make(map[string]http.Handler) + + m[HTTPPrefixPProf+"/"] = http.HandlerFunc(pprof.Index) + m[HTTPPrefixPProf+"/profile"] = http.HandlerFunc(pprof.Profile) + m[HTTPPrefixPProf+"/symbol"] = http.HandlerFunc(pprof.Symbol) + m[HTTPPrefixPProf+"/cmdline"] = http.HandlerFunc(pprof.Cmdline) + m[HTTPPrefixPProf+"/trace "] = http.HandlerFunc(pprof.Trace) + m[HTTPPrefixPProf+"/heap"] = pprof.Handler("heap") + m[HTTPPrefixPProf+"/goroutine"] = pprof.Handler("goroutine") + m[HTTPPrefixPProf+"/threadcreate"] = pprof.Handler("threadcreate") + m[HTTPPrefixPProf+"/block"] = pprof.Handler("block") + m[HTTPPrefixPProf+"/mutex"] = pprof.Handler("mutex") + + return m +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/dir_unix.go b/deps/github.com/coreos/etcd/pkg/fileutil/dir_unix.go new file mode 100644 index 000000000..58a77dfc1 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/dir_unix.go @@ -0,0 +1,22 @@ +// 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. + +// +build !windows + +package fileutil + +import "os" + +// OpenDir opens a directory for syncing. +func OpenDir(path string) (*os.File, error) { return os.Open(path) } diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/dir_windows.go b/deps/github.com/coreos/etcd/pkg/fileutil/dir_windows.go new file mode 100644 index 000000000..c123395c0 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/dir_windows.go @@ -0,0 +1,46 @@ +// 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. + +// +build windows + +package fileutil + +import ( + "os" + "syscall" +) + +// OpenDir opens a directory in windows with write access for syncing. +func OpenDir(path string) (*os.File, error) { + fd, err := openDir(path) + if err != nil { + return nil, err + } + return os.NewFile(uintptr(fd), path), nil +} + +func openDir(path string) (fd syscall.Handle, err error) { + if len(path) == 0 { + return syscall.InvalidHandle, syscall.ERROR_FILE_NOT_FOUND + } + pathp, err := syscall.UTF16PtrFromString(path) + if err != nil { + return syscall.InvalidHandle, err + } + access := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE) + sharemode := uint32(syscall.FILE_SHARE_READ | syscall.FILE_SHARE_WRITE) + createmode := uint32(syscall.OPEN_EXISTING) + fl := uint32(syscall.FILE_FLAG_BACKUP_SEMANTICS) + return syscall.CreateFile(pathp, access, sharemode, nil, createmode, fl, 0) +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/fileutil.go b/deps/github.com/coreos/etcd/pkg/fileutil/fileutil.go new file mode 100644 index 000000000..fce5126c6 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/fileutil.go @@ -0,0 +1,122 @@ +// Copyright 2015 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. + +// Package fileutil implements utility functions related to files and paths. +package fileutil + +import ( + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "sort" + + "github.com/coreos/pkg/capnslog" +) + +const ( + // PrivateFileMode grants owner to read/write a file. + PrivateFileMode = 0600 + // PrivateDirMode grants owner to make/remove files inside the directory. + PrivateDirMode = 0700 +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "pkg/fileutil") +) + +// IsDirWriteable checks if dir is writable by writing and removing a file +// to dir. It returns nil if dir is writable. +func IsDirWriteable(dir string) error { + f := filepath.Join(dir, ".touch") + if err := ioutil.WriteFile(f, []byte(""), PrivateFileMode); err != nil { + return err + } + return os.Remove(f) +} + +// ReadDir returns the filenames in the given directory in sorted order. +func ReadDir(dirpath string) ([]string, error) { + dir, err := os.Open(dirpath) + if err != nil { + return nil, err + } + defer dir.Close() + names, err := dir.Readdirnames(-1) + if err != nil { + return nil, err + } + sort.Strings(names) + return names, nil +} + +// TouchDirAll is similar to os.MkdirAll. It creates directories with 0700 permission if any directory +// does not exists. TouchDirAll also ensures the given directory is writable. +func TouchDirAll(dir string) error { + // If path is already a directory, MkdirAll does nothing + // and returns nil. + err := os.MkdirAll(dir, PrivateDirMode) + if err != nil { + // if mkdirAll("a/text") and "text" is not + // a directory, this will return syscall.ENOTDIR + return err + } + return IsDirWriteable(dir) +} + +// CreateDirAll is similar to TouchDirAll but returns error +// if the deepest directory was not empty. +func CreateDirAll(dir string) error { + err := TouchDirAll(dir) + if err == nil { + var ns []string + ns, err = ReadDir(dir) + if err != nil { + return err + } + if len(ns) != 0 { + err = fmt.Errorf("expected %q to be empty, got %q", dir, ns) + } + } + return err +} + +func Exist(name string) bool { + _, err := os.Stat(name) + return err == nil +} + +// ZeroToEnd zeros a file starting from SEEK_CUR to its SEEK_END. May temporarily +// shorten the length of the file. +func ZeroToEnd(f *os.File) error { + // TODO: support FALLOC_FL_ZERO_RANGE + off, err := f.Seek(0, io.SeekCurrent) + if err != nil { + return err + } + lenf, lerr := f.Seek(0, io.SeekEnd) + if lerr != nil { + return lerr + } + if err = f.Truncate(off); err != nil { + return err + } + // make sure blocks remain allocated + if err = Preallocate(f, lenf, true); err != nil { + return err + } + _, err = f.Seek(off, io.SeekStart) + return err +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/lock.go b/deps/github.com/coreos/etcd/pkg/fileutil/lock.go new file mode 100644 index 000000000..338627f43 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/lock.go @@ -0,0 +1,26 @@ +// 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. + +package fileutil + +import ( + "errors" + "os" +) + +var ( + ErrLocked = errors.New("fileutil: file already locked") +) + +type LockedFile struct{ *os.File } diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/lock_flock.go b/deps/github.com/coreos/etcd/pkg/fileutil/lock_flock.go new file mode 100644 index 000000000..542550bc8 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/lock_flock.go @@ -0,0 +1,49 @@ +// 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. + +// +build !windows,!plan9,!solaris + +package fileutil + +import ( + "os" + "syscall" +) + +func flockTryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + f, err := os.OpenFile(path, flag, perm) + if err != nil { + return nil, err + } + if err = syscall.Flock(int(f.Fd()), syscall.LOCK_EX|syscall.LOCK_NB); err != nil { + f.Close() + if err == syscall.EWOULDBLOCK { + err = ErrLocked + } + return nil, err + } + return &LockedFile{f}, nil +} + +func flockLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + f, err := os.OpenFile(path, flag, perm) + if err != nil { + return nil, err + } + if err = syscall.Flock(int(f.Fd()), syscall.LOCK_EX); err != nil { + f.Close() + return nil, err + } + return &LockedFile{f}, err +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/lock_linux.go b/deps/github.com/coreos/etcd/pkg/fileutil/lock_linux.go new file mode 100644 index 000000000..939fea623 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/lock_linux.go @@ -0,0 +1,97 @@ +// 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. + +// +build linux + +package fileutil + +import ( + "io" + "os" + "syscall" +) + +// This used to call syscall.Flock() but that call fails with EBADF on NFS. +// An alternative is lockf() which works on NFS but that call lets a process lock +// the same file twice. Instead, use Linux's non-standard open file descriptor +// locks which will block if the process already holds the file lock. +// +// constants from /usr/include/bits/fcntl-linux.h +const ( + F_OFD_GETLK = 37 + F_OFD_SETLK = 37 + F_OFD_SETLKW = 38 +) + +var ( + wrlck = syscall.Flock_t{ + Type: syscall.F_WRLCK, + Whence: int16(io.SeekStart), + Start: 0, + Len: 0, + } + + linuxTryLockFile = flockTryLockFile + linuxLockFile = flockLockFile +) + +func init() { + // use open file descriptor locks if the system supports it + getlk := syscall.Flock_t{Type: syscall.F_RDLCK} + if err := syscall.FcntlFlock(0, F_OFD_GETLK, &getlk); err == nil { + linuxTryLockFile = ofdTryLockFile + linuxLockFile = ofdLockFile + } +} + +func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + return linuxTryLockFile(path, flag, perm) +} + +func ofdTryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + f, err := os.OpenFile(path, flag, perm) + if err != nil { + return nil, err + } + + flock := wrlck + if err = syscall.FcntlFlock(f.Fd(), F_OFD_SETLK, &flock); err != nil { + f.Close() + if err == syscall.EWOULDBLOCK { + err = ErrLocked + } + return nil, err + } + return &LockedFile{f}, nil +} + +func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + return linuxLockFile(path, flag, perm) +} + +func ofdLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + f, err := os.OpenFile(path, flag, perm) + if err != nil { + return nil, err + } + + flock := wrlck + err = syscall.FcntlFlock(f.Fd(), F_OFD_SETLKW, &flock) + + if err != nil { + f.Close() + return nil, err + } + return &LockedFile{f}, err +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/lock_plan9.go b/deps/github.com/coreos/etcd/pkg/fileutil/lock_plan9.go new file mode 100644 index 000000000..fee6a7c8f --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/lock_plan9.go @@ -0,0 +1,45 @@ +// Copyright 2015 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. + +package fileutil + +import ( + "os" + "syscall" + "time" +) + +func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + if err := os.Chmod(path, syscall.DMEXCL|PrivateFileMode); err != nil { + return nil, err + } + f, err := os.Open(path, flag, perm) + if err != nil { + return nil, ErrLocked + } + return &LockedFile{f}, nil +} + +func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + if err := os.Chmod(path, syscall.DMEXCL|PrivateFileMode); err != nil { + return nil, err + } + for { + f, err := os.OpenFile(path, flag, perm) + if err == nil { + return &LockedFile{f}, nil + } + time.Sleep(10 * time.Millisecond) + } +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/lock_solaris.go b/deps/github.com/coreos/etcd/pkg/fileutil/lock_solaris.go new file mode 100644 index 000000000..352ca5590 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/lock_solaris.go @@ -0,0 +1,62 @@ +// Copyright 2015 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. + +// +build solaris + +package fileutil + +import ( + "os" + "syscall" +) + +func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Pid = 0 + lock.Type = syscall.F_WRLCK + lock.Whence = 0 + lock.Pid = 0 + f, err := os.OpenFile(path, flag, perm) + if err != nil { + return nil, err + } + if err := syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &lock); err != nil { + f.Close() + if err == syscall.EAGAIN { + err = ErrLocked + } + return nil, err + } + return &LockedFile{f}, nil +} + +func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Pid = 0 + lock.Type = syscall.F_WRLCK + lock.Whence = 0 + f, err := os.OpenFile(path, flag, perm) + if err != nil { + return nil, err + } + if err = syscall.FcntlFlock(f.Fd(), syscall.F_SETLKW, &lock); err != nil { + f.Close() + return nil, err + } + return &LockedFile{f}, nil +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/lock_unix.go b/deps/github.com/coreos/etcd/pkg/fileutil/lock_unix.go new file mode 100644 index 000000000..ed01164de --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/lock_unix.go @@ -0,0 +1,29 @@ +// Copyright 2015 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. + +// +build !windows,!plan9,!solaris,!linux + +package fileutil + +import ( + "os" +) + +func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + return flockTryLockFile(path, flag, perm) +} + +func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + return flockLockFile(path, flag, perm) +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/lock_windows.go b/deps/github.com/coreos/etcd/pkg/fileutil/lock_windows.go new file mode 100644 index 000000000..8698f4a8d --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/lock_windows.go @@ -0,0 +1,125 @@ +// Copyright 2015 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. + +// +build windows + +package fileutil + +import ( + "errors" + "fmt" + "os" + "syscall" + "unsafe" +) + +var ( + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + procLockFileEx = modkernel32.NewProc("LockFileEx") + + errLocked = errors.New("The process cannot access the file because another process has locked a portion of the file.") +) + +const ( + // https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx + LOCKFILE_EXCLUSIVE_LOCK = 2 + LOCKFILE_FAIL_IMMEDIATELY = 1 + + // see https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx + errLockViolation syscall.Errno = 0x21 +) + +func TryLockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + f, err := open(path, flag, perm) + if err != nil { + return nil, err + } + if err := lockFile(syscall.Handle(f.Fd()), LOCKFILE_FAIL_IMMEDIATELY); err != nil { + f.Close() + return nil, err + } + return &LockedFile{f}, nil +} + +func LockFile(path string, flag int, perm os.FileMode) (*LockedFile, error) { + f, err := open(path, flag, perm) + if err != nil { + return nil, err + } + if err := lockFile(syscall.Handle(f.Fd()), 0); err != nil { + f.Close() + return nil, err + } + return &LockedFile{f}, nil +} + +func open(path string, flag int, perm os.FileMode) (*os.File, error) { + if path == "" { + return nil, fmt.Errorf("cannot open empty filename") + } + var access uint32 + switch flag { + case syscall.O_RDONLY: + access = syscall.GENERIC_READ + case syscall.O_WRONLY: + access = syscall.GENERIC_WRITE + case syscall.O_RDWR: + access = syscall.GENERIC_READ | syscall.GENERIC_WRITE + case syscall.O_WRONLY | syscall.O_CREAT: + access = syscall.GENERIC_ALL + default: + panic(fmt.Errorf("flag %v is not supported", flag)) + } + fd, err := syscall.CreateFile(&(syscall.StringToUTF16(path)[0]), + access, + syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE, + nil, + syscall.OPEN_ALWAYS, + syscall.FILE_ATTRIBUTE_NORMAL, + 0) + if err != nil { + return nil, err + } + return os.NewFile(uintptr(fd), path), nil +} + +func lockFile(fd syscall.Handle, flags uint32) error { + var flag uint32 = LOCKFILE_EXCLUSIVE_LOCK + flag |= flags + if fd == syscall.InvalidHandle { + return nil + } + err := lockFileEx(fd, flag, 1, 0, &syscall.Overlapped{}) + if err == nil { + return nil + } else if err.Error() == errLocked.Error() { + return ErrLocked + } else if err != errLockViolation { + return err + } + return nil +} + +func lockFileEx(h syscall.Handle, flags, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + var reserved uint32 = 0 + r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(h), uintptr(flags), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/preallocate.go b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate.go new file mode 100644 index 000000000..c747b7cf8 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate.go @@ -0,0 +1,54 @@ +// Copyright 2015 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. + +package fileutil + +import ( + "io" + "os" +) + +// Preallocate tries to allocate the space for given +// file. This operation is only supported on linux by a +// few filesystems (btrfs, ext4, etc.). +// If the operation is unsupported, no error will be returned. +// Otherwise, the error encountered will be returned. +func Preallocate(f *os.File, sizeInBytes int64, extendFile bool) error { + if sizeInBytes == 0 { + // fallocate will return EINVAL if length is 0; skip + return nil + } + if extendFile { + return preallocExtend(f, sizeInBytes) + } + return preallocFixed(f, sizeInBytes) +} + +func preallocExtendTrunc(f *os.File, sizeInBytes int64) error { + curOff, err := f.Seek(0, io.SeekCurrent) + if err != nil { + return err + } + size, err := f.Seek(sizeInBytes, io.SeekEnd) + if err != nil { + return err + } + if _, err = f.Seek(curOff, io.SeekStart); err != nil { + return err + } + if sizeInBytes > size { + return nil + } + return f.Truncate(sizeInBytes) +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_darwin.go b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_darwin.go new file mode 100644 index 000000000..1ed09c560 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_darwin.go @@ -0,0 +1,43 @@ +// 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. + +// +build darwin + +package fileutil + +import ( + "os" + "syscall" + "unsafe" +) + +func preallocExtend(f *os.File, sizeInBytes int64) error { + if err := preallocFixed(f, sizeInBytes); err != nil { + return err + } + return preallocExtendTrunc(f, sizeInBytes) +} + +func preallocFixed(f *os.File, sizeInBytes int64) error { + fstore := &syscall.Fstore_t{ + Flags: syscall.F_ALLOCATEALL, + Posmode: syscall.F_PEOFPOSMODE, + Length: sizeInBytes} + p := unsafe.Pointer(fstore) + _, _, errno := syscall.Syscall(syscall.SYS_FCNTL, f.Fd(), uintptr(syscall.F_PREALLOCATE), uintptr(p)) + if errno == 0 || errno == syscall.ENOTSUP { + return nil + } + return errno +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unix.go b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unix.go new file mode 100644 index 000000000..50bd84f02 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unix.go @@ -0,0 +1,49 @@ +// 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. + +// +build linux + +package fileutil + +import ( + "os" + "syscall" +) + +func preallocExtend(f *os.File, sizeInBytes int64) error { + // use mode = 0 to change size + err := syscall.Fallocate(int(f.Fd()), 0, 0, sizeInBytes) + if err != nil { + errno, ok := err.(syscall.Errno) + // not supported; fallback + // fallocate EINTRs frequently in some environments; fallback + if ok && (errno == syscall.ENOTSUP || errno == syscall.EINTR) { + return preallocExtendTrunc(f, sizeInBytes) + } + } + return err +} + +func preallocFixed(f *os.File, sizeInBytes int64) error { + // use mode = 1 to keep size; see FALLOC_FL_KEEP_SIZE + err := syscall.Fallocate(int(f.Fd()), 1, 0, sizeInBytes) + if err != nil { + errno, ok := err.(syscall.Errno) + // treat not supported as nil error + if ok && errno == syscall.ENOTSUP { + return nil + } + } + return err +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unsupported.go b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unsupported.go new file mode 100644 index 000000000..162fbc5f7 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/preallocate_unsupported.go @@ -0,0 +1,25 @@ +// Copyright 2015 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. + +// +build !linux,!darwin + +package fileutil + +import "os" + +func preallocExtend(f *os.File, sizeInBytes int64) error { + return preallocExtendTrunc(f, sizeInBytes) +} + +func preallocFixed(f *os.File, sizeInBytes int64) error { return nil } diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/purge.go b/deps/github.com/coreos/etcd/pkg/fileutil/purge.go new file mode 100644 index 000000000..92fceab01 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/purge.go @@ -0,0 +1,78 @@ +// Copyright 2015 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. + +package fileutil + +import ( + "os" + "path/filepath" + "sort" + "strings" + "time" +) + +func PurgeFile(dirname string, suffix string, max uint, interval time.Duration, stop <-chan struct{}) <-chan error { + return purgeFile(dirname, suffix, max, interval, stop, nil) +} + +// purgeFile is the internal implementation for PurgeFile which can post purged files to purgec if non-nil. +func purgeFile(dirname string, suffix string, max uint, interval time.Duration, stop <-chan struct{}, purgec chan<- string) <-chan error { + errC := make(chan error, 1) + go func() { + for { + fnames, err := ReadDir(dirname) + if err != nil { + errC <- err + return + } + newfnames := make([]string, 0) + for _, fname := range fnames { + if strings.HasSuffix(fname, suffix) { + newfnames = append(newfnames, fname) + } + } + sort.Strings(newfnames) + fnames = newfnames + for len(newfnames) > int(max) { + f := filepath.Join(dirname, newfnames[0]) + l, err := TryLockFile(f, os.O_WRONLY, PrivateFileMode) + if err != nil { + break + } + if err = os.Remove(f); err != nil { + errC <- err + return + } + if err = l.Close(); err != nil { + plog.Errorf("error unlocking %s when purging file (%v)", l.Name(), err) + errC <- err + return + } + plog.Infof("purged file %s successfully", f) + newfnames = newfnames[1:] + } + if purgec != nil { + for i := 0; i < len(fnames)-len(newfnames); i++ { + purgec <- fnames[i] + } + } + select { + case <-time.After(interval): + case <-stop: + return + } + } + }() + return errC +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/sync.go b/deps/github.com/coreos/etcd/pkg/fileutil/sync.go new file mode 100644 index 000000000..54dd41f4f --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/sync.go @@ -0,0 +1,29 @@ +// 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. + +// +build !linux,!darwin + +package fileutil + +import "os" + +// Fsync is a wrapper around file.Sync(). Special handling is needed on darwin platform. +func Fsync(f *os.File) error { + return f.Sync() +} + +// Fdatasync is a wrapper around file.Sync(). Special handling is needed on linux platform. +func Fdatasync(f *os.File) error { + return f.Sync() +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/sync_darwin.go b/deps/github.com/coreos/etcd/pkg/fileutil/sync_darwin.go new file mode 100644 index 000000000..c2f39bf20 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/sync_darwin.go @@ -0,0 +1,40 @@ +// 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. + +// +build darwin + +package fileutil + +import ( + "os" + "syscall" +) + +// Fsync on HFS/OSX flushes the data on to the physical drive but the drive +// may not write it to the persistent media for quite sometime and it may be +// written in out-of-order sequence. Using F_FULLFSYNC ensures that the +// physical drive's buffer will also get flushed to the media. +func Fsync(f *os.File) error { + _, _, errno := syscall.Syscall(syscall.SYS_FCNTL, f.Fd(), uintptr(syscall.F_FULLFSYNC), uintptr(0)) + if errno == 0 { + return nil + } + return errno +} + +// Fdatasync on darwin platform invokes fcntl(F_FULLFSYNC) for actual persistence +// on physical drive media. +func Fdatasync(f *os.File) error { + return Fsync(f) +} diff --git a/deps/github.com/coreos/etcd/pkg/fileutil/sync_linux.go b/deps/github.com/coreos/etcd/pkg/fileutil/sync_linux.go new file mode 100644 index 000000000..1bbced915 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/fileutil/sync_linux.go @@ -0,0 +1,34 @@ +// 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. + +// +build linux + +package fileutil + +import ( + "os" + "syscall" +) + +// Fsync is a wrapper around file.Sync(). Special handling is needed on darwin platform. +func Fsync(f *os.File) error { + return f.Sync() +} + +// Fdatasync is similar to fsync(), but does not flush modified metadata +// unless that metadata is needed in order to allow a subsequent data retrieval +// to be correctly handled. +func Fdatasync(f *os.File) error { + return syscall.Fdatasync(int(f.Fd())) +} diff --git a/deps/github.com/coreos/etcd/pkg/httputil/httputil.go b/deps/github.com/coreos/etcd/pkg/httputil/httputil.go new file mode 100644 index 000000000..09f44e7c7 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/httputil/httputil.go @@ -0,0 +1,22 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// borrowed from golang/net/context/ctxhttp/cancelreq.go + +// Package httputil provides HTTP utility functions. +package httputil + +import ( + "io" + "io/ioutil" + "net/http" +) + +// GracefulClose drains http.Response.Body until it hits EOF +// and closes it. This prevents TCP/TLS connections from closing, +// therefore available for reuse. +func GracefulClose(resp *http.Response) { + io.Copy(ioutil.Discard, resp.Body) + resp.Body.Close() +} diff --git a/deps/github.com/coreos/etcd/pkg/idutil/id.go b/deps/github.com/coreos/etcd/pkg/idutil/id.go new file mode 100644 index 000000000..2da210626 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/idutil/id.go @@ -0,0 +1,78 @@ +// Copyright 2015 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. + +// Package idutil implements utility functions for generating unique, +// randomized ids. +package idutil + +import ( + "math" + "sync" + "time" +) + +const ( + tsLen = 5 * 8 + cntLen = 8 + suffixLen = tsLen + cntLen +) + +// Generator generates unique identifiers based on counters, timestamps, and +// a node member ID. +// +// The initial id is in this format: +// High order 2 bytes are from memberID, next 5 bytes are from timestamp, +// and low order one byte is a counter. +// | prefix | suffix | +// | 2 bytes | 5 bytes | 1 byte | +// | memberID | timestamp | cnt | +// +// The timestamp 5 bytes is different when the machine is restart +// after 1 ms and before 35 years. +// +// It increases suffix to generate the next id. +// The count field may overflow to timestamp field, which is intentional. +// It helps to extend the event window to 2^56. This doesn't break that +// id generated after restart is unique because etcd throughput is << +// 256req/ms(250k reqs/second). +type Generator struct { + mu sync.Mutex + // high order 2 bytes + prefix uint64 + // low order 6 bytes + suffix uint64 +} + +func NewGenerator(memberID uint16, now time.Time) *Generator { + prefix := uint64(memberID) << suffixLen + unixMilli := uint64(now.UnixNano()) / uint64(time.Millisecond/time.Nanosecond) + suffix := lowbit(unixMilli, tsLen) << cntLen + return &Generator{ + prefix: prefix, + suffix: suffix, + } +} + +// Next generates a id that is unique. +func (g *Generator) Next() uint64 { + g.mu.Lock() + defer g.mu.Unlock() + g.suffix++ + id := g.prefix | lowbit(g.suffix, suffixLen) + return id +} + +func lowbit(x uint64, n uint) uint64 { + return x & (math.MaxUint64 >> (64 - n)) +} diff --git a/deps/github.com/coreos/etcd/pkg/ioutil/pagewriter.go b/deps/github.com/coreos/etcd/pkg/ioutil/pagewriter.go new file mode 100644 index 000000000..72de1593d --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/ioutil/pagewriter.go @@ -0,0 +1,106 @@ +// 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. + +package ioutil + +import ( + "io" +) + +var defaultBufferBytes = 128 * 1024 + +// PageWriter implements the io.Writer interface so that writes will +// either be in page chunks or from flushing. +type PageWriter struct { + w io.Writer + // pageOffset tracks the page offset of the base of the buffer + pageOffset int + // pageBytes is the number of bytes per page + pageBytes int + // bufferedBytes counts the number of bytes pending for write in the buffer + bufferedBytes int + // buf holds the write buffer + buf []byte + // bufWatermarkBytes is the number of bytes the buffer can hold before it needs + // to be flushed. It is less than len(buf) so there is space for slack writes + // to bring the writer to page alignment. + bufWatermarkBytes int +} + +// NewPageWriter creates a new PageWriter. pageBytes is the number of bytes +// to write per page. pageOffset is the starting offset of io.Writer. +func NewPageWriter(w io.Writer, pageBytes, pageOffset int) *PageWriter { + return &PageWriter{ + w: w, + pageOffset: pageOffset, + pageBytes: pageBytes, + buf: make([]byte, defaultBufferBytes+pageBytes), + bufWatermarkBytes: defaultBufferBytes, + } +} + +func (pw *PageWriter) Write(p []byte) (n int, err error) { + if len(p)+pw.bufferedBytes <= pw.bufWatermarkBytes { + // no overflow + copy(pw.buf[pw.bufferedBytes:], p) + pw.bufferedBytes += len(p) + return len(p), nil + } + // complete the slack page in the buffer if unaligned + slack := pw.pageBytes - ((pw.pageOffset + pw.bufferedBytes) % pw.pageBytes) + if slack != pw.pageBytes { + partial := slack > len(p) + if partial { + // not enough data to complete the slack page + slack = len(p) + } + // special case: writing to slack page in buffer + copy(pw.buf[pw.bufferedBytes:], p[:slack]) + pw.bufferedBytes += slack + n = slack + p = p[slack:] + if partial { + // avoid forcing an unaligned flush + return n, nil + } + } + // buffer contents are now page-aligned; clear out + if err = pw.Flush(); err != nil { + return n, err + } + // directly write all complete pages without copying + if len(p) > pw.pageBytes { + pages := len(p) / pw.pageBytes + c, werr := pw.w.Write(p[:pages*pw.pageBytes]) + n += c + if werr != nil { + return n, werr + } + p = p[pages*pw.pageBytes:] + } + // write remaining tail to buffer + c, werr := pw.Write(p) + n += c + return n, werr +} + +func (pw *PageWriter) Flush() error { + if pw.bufferedBytes == 0 { + return nil + } + _, err := pw.w.Write(pw.buf[:pw.bufferedBytes]) + pw.pageOffset = (pw.pageOffset + pw.bufferedBytes) % pw.pageBytes + pw.bufferedBytes = 0 + return err +} diff --git a/deps/github.com/coreos/etcd/pkg/ioutil/readcloser.go b/deps/github.com/coreos/etcd/pkg/ioutil/readcloser.go new file mode 100644 index 000000000..d3efcfe3d --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/ioutil/readcloser.go @@ -0,0 +1,66 @@ +// Copyright 2015 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. + +package ioutil + +import ( + "fmt" + "io" +) + +// ReaderAndCloser implements io.ReadCloser interface by combining +// reader and closer together. +type ReaderAndCloser struct { + io.Reader + io.Closer +} + +var ( + ErrShortRead = fmt.Errorf("ioutil: short read") + ErrExpectEOF = fmt.Errorf("ioutil: expect EOF") +) + +// NewExactReadCloser returns a ReadCloser that returns errors if the underlying +// reader does not read back exactly the requested number of bytes. +func NewExactReadCloser(rc io.ReadCloser, totalBytes int64) io.ReadCloser { + return &exactReadCloser{rc: rc, totalBytes: totalBytes} +} + +type exactReadCloser struct { + rc io.ReadCloser + br int64 + totalBytes int64 +} + +func (e *exactReadCloser) Read(p []byte) (int, error) { + n, err := e.rc.Read(p) + e.br += int64(n) + if e.br > e.totalBytes { + return 0, ErrExpectEOF + } + if e.br < e.totalBytes && n == 0 { + return 0, ErrShortRead + } + return n, err +} + +func (e *exactReadCloser) Close() error { + if err := e.rc.Close(); err != nil { + return err + } + if e.br < e.totalBytes { + return ErrShortRead + } + return nil +} diff --git a/deps/github.com/coreos/etcd/pkg/ioutil/reader.go b/deps/github.com/coreos/etcd/pkg/ioutil/reader.go new file mode 100644 index 000000000..0703ed476 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/ioutil/reader.go @@ -0,0 +1,40 @@ +// Copyright 2015 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. + +// Package ioutil implements I/O utility functions. +package ioutil + +import "io" + +// NewLimitedBufferReader returns a reader that reads from the given reader +// but limits the amount of data returned to at most n bytes. +func NewLimitedBufferReader(r io.Reader, n int) io.Reader { + return &limitedBufferReader{ + r: r, + n: n, + } +} + +type limitedBufferReader struct { + r io.Reader + n int +} + +func (r *limitedBufferReader) Read(p []byte) (n int, err error) { + np := p + if len(np) > r.n { + np = np[:r.n] + } + return r.r.Read(np) +} diff --git a/deps/github.com/coreos/etcd/pkg/ioutil/util.go b/deps/github.com/coreos/etcd/pkg/ioutil/util.go new file mode 100644 index 000000000..192ad888c --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/ioutil/util.go @@ -0,0 +1,43 @@ +// Copyright 2015 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. + +package ioutil + +import ( + "io" + "os" + + "github.com/coreos/etcd/pkg/fileutil" +) + +// WriteAndSyncFile behaves just like ioutil.WriteFile in the standard library, +// but calls Sync before closing the file. WriteAndSyncFile guarantees the data +// is synced if there is no error returned. +func WriteAndSyncFile(filename string, data []byte, perm os.FileMode) error { + f, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm) + if err != nil { + return err + } + n, err := f.Write(data) + if err == nil && n < len(data) { + err = io.ErrShortWrite + } + if err == nil { + err = fileutil.Fsync(f) + } + if err1 := f.Close(); err == nil { + err = err1 + } + return err +} diff --git a/deps/github.com/coreos/etcd/pkg/logutil/merge_logger.go b/deps/github.com/coreos/etcd/pkg/logutil/merge_logger.go new file mode 100644 index 000000000..cc750f4d3 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/logutil/merge_logger.go @@ -0,0 +1,195 @@ +// Copyright 2015 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. + +// Package logutil includes utilities to facilitate logging. +package logutil + +import ( + "fmt" + "sync" + "time" + + "github.com/coreos/pkg/capnslog" +) + +var ( + defaultMergePeriod = time.Second + defaultTimeOutputScale = 10 * time.Millisecond + + outputInterval = time.Second +) + +// line represents a log line that can be printed out +// through capnslog.PackageLogger. +type line struct { + level capnslog.LogLevel + str string +} + +func (l line) append(s string) line { + return line{ + level: l.level, + str: l.str + " " + s, + } +} + +// status represents the merge status of a line. +type status struct { + period time.Duration + + start time.Time // start time of latest merge period + count int // number of merged lines from starting +} + +func (s *status) isInMergePeriod(now time.Time) bool { + return s.period == 0 || s.start.Add(s.period).After(now) +} + +func (s *status) isEmpty() bool { return s.count == 0 } + +func (s *status) summary(now time.Time) string { + ts := s.start.Round(defaultTimeOutputScale) + took := now.Round(defaultTimeOutputScale).Sub(ts) + return fmt.Sprintf("[merged %d repeated lines in %s]", s.count, took) +} + +func (s *status) reset(now time.Time) { + s.start = now + s.count = 0 +} + +// MergeLogger supports merge logging, which merges repeated log lines +// and prints summary log lines instead. +// +// For merge logging, MergeLogger prints out the line when the line appears +// at the first time. MergeLogger holds the same log line printed within +// defaultMergePeriod, and prints out summary log line at the end of defaultMergePeriod. +// It stops merging when the line doesn't appear within the +// defaultMergePeriod. +type MergeLogger struct { + *capnslog.PackageLogger + + mu sync.Mutex // protect statusm + statusm map[line]*status +} + +func NewMergeLogger(logger *capnslog.PackageLogger) *MergeLogger { + l := &MergeLogger{ + PackageLogger: logger, + statusm: make(map[line]*status), + } + go l.outputLoop() + return l +} + +func (l *MergeLogger) MergeInfo(entries ...interface{}) { + l.merge(line{ + level: capnslog.INFO, + str: fmt.Sprint(entries...), + }) +} + +func (l *MergeLogger) MergeInfof(format string, args ...interface{}) { + l.merge(line{ + level: capnslog.INFO, + str: fmt.Sprintf(format, args...), + }) +} + +func (l *MergeLogger) MergeNotice(entries ...interface{}) { + l.merge(line{ + level: capnslog.NOTICE, + str: fmt.Sprint(entries...), + }) +} + +func (l *MergeLogger) MergeNoticef(format string, args ...interface{}) { + l.merge(line{ + level: capnslog.NOTICE, + str: fmt.Sprintf(format, args...), + }) +} + +func (l *MergeLogger) MergeWarning(entries ...interface{}) { + l.merge(line{ + level: capnslog.WARNING, + str: fmt.Sprint(entries...), + }) +} + +func (l *MergeLogger) MergeWarningf(format string, args ...interface{}) { + l.merge(line{ + level: capnslog.WARNING, + str: fmt.Sprintf(format, args...), + }) +} + +func (l *MergeLogger) MergeError(entries ...interface{}) { + l.merge(line{ + level: capnslog.ERROR, + str: fmt.Sprint(entries...), + }) +} + +func (l *MergeLogger) MergeErrorf(format string, args ...interface{}) { + l.merge(line{ + level: capnslog.ERROR, + str: fmt.Sprintf(format, args...), + }) +} + +func (l *MergeLogger) merge(ln line) { + l.mu.Lock() + + // increase count if the logger is merging the line + if status, ok := l.statusm[ln]; ok { + status.count++ + l.mu.Unlock() + return + } + + // initialize status of the line + l.statusm[ln] = &status{ + period: defaultMergePeriod, + start: time.Now(), + } + // release the lock before IO operation + l.mu.Unlock() + // print out the line at its first time + l.PackageLogger.Logf(ln.level, ln.str) +} + +func (l *MergeLogger) outputLoop() { + for now := range time.Tick(outputInterval) { + var outputs []line + + l.mu.Lock() + for ln, status := range l.statusm { + if status.isInMergePeriod(now) { + continue + } + if status.isEmpty() { + delete(l.statusm, ln) + continue + } + outputs = append(outputs, ln.append(status.summary(now))) + status.reset(now) + } + l.mu.Unlock() + + for _, o := range outputs { + l.PackageLogger.Logf(o.level, o.str) + } + } +} diff --git a/deps/github.com/coreos/etcd/pkg/monotime/issue15006.s b/deps/github.com/coreos/etcd/pkg/monotime/issue15006.s new file mode 100644 index 000000000..c3132a1f0 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/monotime/issue15006.s @@ -0,0 +1,6 @@ +// Copyright (C) 2016 Arista Networks, Inc. +// Use of this source code is governed by the Apache License 2.0 +// that can be found in the COPYING file. + +// This file is intentionally empty. +// It's a workaround for https://github.com/golang/go/issues/15006 \ No newline at end of file diff --git a/deps/github.com/coreos/etcd/pkg/monotime/monotime.go b/deps/github.com/coreos/etcd/pkg/monotime/monotime.go new file mode 100644 index 000000000..a5e16ce1d --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/monotime/monotime.go @@ -0,0 +1,26 @@ +// 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. + +package monotime + +import ( + "time" +) + +// Time represents a point in monotonic time +type Time uint64 + +func (t Time) Add(d time.Duration) Time { + return Time(uint64(t) + uint64(d.Nanoseconds())) +} diff --git a/deps/github.com/coreos/etcd/pkg/monotime/nanotime.go b/deps/github.com/coreos/etcd/pkg/monotime/nanotime.go new file mode 100644 index 000000000..e3fc846ef --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/monotime/nanotime.go @@ -0,0 +1,24 @@ +// Copyright (C) 2016 Arista Networks, Inc. +// Use of this source code is governed by the Apache License 2.0 +// that can be found in the COPYING file. + +// Package monotime provides a fast monotonic clock source. +package monotime + +import ( + _ "unsafe" // required to use //go:linkname +) + +//go:noescape +//go:linkname nanotime runtime.nanotime +func nanotime() int64 + +// Now returns the current time in nanoseconds from a monotonic clock. +// The time returned is based on some arbitrary platform-specific point in the +// past. The time returned is guaranteed to increase monotonically at a +// constant rate, unlike time.Now() from the Go standard library, which may +// slow down, speed up, jump forward or backward, due to NTP activity or leap +// seconds. +func Now() Time { + return Time(nanotime()) +} diff --git a/deps/github.com/coreos/etcd/pkg/netutil/isolate_linux.go b/deps/github.com/coreos/etcd/pkg/netutil/isolate_linux.go new file mode 100644 index 000000000..418580ac4 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/netutil/isolate_linux.go @@ -0,0 +1,82 @@ +// Copyright 2015 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. + +package netutil + +import ( + "fmt" + "os/exec" +) + +// DropPort drops all tcp packets that are received from the given port and sent to the given port. +func DropPort(port int) error { + cmdStr := fmt.Sprintf("sudo iptables -A OUTPUT -p tcp --destination-port %d -j DROP", port) + if _, err := exec.Command("/bin/sh", "-c", cmdStr).Output(); err != nil { + return err + } + cmdStr = fmt.Sprintf("sudo iptables -A INPUT -p tcp --destination-port %d -j DROP", port) + _, err := exec.Command("/bin/sh", "-c", cmdStr).Output() + return err +} + +// RecoverPort stops dropping tcp packets at given port. +func RecoverPort(port int) error { + cmdStr := fmt.Sprintf("sudo iptables -D OUTPUT -p tcp --destination-port %d -j DROP", port) + if _, err := exec.Command("/bin/sh", "-c", cmdStr).Output(); err != nil { + return err + } + cmdStr = fmt.Sprintf("sudo iptables -D INPUT -p tcp --destination-port %d -j DROP", port) + _, err := exec.Command("/bin/sh", "-c", cmdStr).Output() + return err +} + +// SetLatency adds latency in millisecond scale with random variations. +func SetLatency(ms, rv int) error { + ifces, err := GetDefaultInterfaces() + if err != nil { + return err + } + + if rv > ms { + rv = 1 + } + for ifce := range ifces { + cmdStr := fmt.Sprintf("sudo tc qdisc add dev %s root netem delay %dms %dms distribution normal", ifce, ms, rv) + _, err = exec.Command("/bin/sh", "-c", cmdStr).Output() + if err != nil { + // the rule has already been added. Overwrite it. + cmdStr = fmt.Sprintf("sudo tc qdisc change dev %s root netem delay %dms %dms distribution normal", ifce, ms, rv) + _, err = exec.Command("/bin/sh", "-c", cmdStr).Output() + if err != nil { + return err + } + } + } + return nil +} + +// RemoveLatency resets latency configurations. +func RemoveLatency() error { + ifces, err := GetDefaultInterfaces() + if err != nil { + return err + } + for ifce := range ifces { + _, err = exec.Command("/bin/sh", "-c", fmt.Sprintf("sudo tc qdisc del dev %s root netem", ifce)).Output() + if err != nil { + return err + } + } + return nil +} diff --git a/deps/github.com/coreos/etcd/pkg/netutil/isolate_stub.go b/deps/github.com/coreos/etcd/pkg/netutil/isolate_stub.go new file mode 100644 index 000000000..7f4c3e67c --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/netutil/isolate_stub.go @@ -0,0 +1,25 @@ +// Copyright 2015 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. + +// +build !linux + +package netutil + +func DropPort(port int) error { return nil } + +func RecoverPort(port int) error { return nil } + +func SetLatency(ms, rv int) error { return nil } + +func RemoveLatency() error { return nil } diff --git a/deps/github.com/coreos/etcd/pkg/netutil/netutil.go b/deps/github.com/coreos/etcd/pkg/netutil/netutil.go new file mode 100644 index 000000000..5e38dc98d --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/netutil/netutil.go @@ -0,0 +1,169 @@ +// Copyright 2015 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. + +// Package netutil implements network-related utility functions. +package netutil + +import ( + "context" + "net" + "net/url" + "reflect" + "sort" + "time" + + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/pkg/capnslog" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "pkg/netutil") + + // indirection for testing + resolveTCPAddr = resolveTCPAddrDefault +) + +const retryInterval = time.Second + +// taken from go's ResolveTCP code but uses configurable ctx +func resolveTCPAddrDefault(ctx context.Context, addr string) (*net.TCPAddr, error) { + host, port, serr := net.SplitHostPort(addr) + if serr != nil { + return nil, serr + } + portnum, perr := net.DefaultResolver.LookupPort(ctx, "tcp", port) + if perr != nil { + return nil, perr + } + + var ips []net.IPAddr + if ip := net.ParseIP(host); ip != nil { + ips = []net.IPAddr{{IP: ip}} + } else { + // Try as a DNS name. + ipss, err := net.DefaultResolver.LookupIPAddr(ctx, host) + if err != nil { + return nil, err + } + ips = ipss + } + // randomize? + ip := ips[0] + return &net.TCPAddr{IP: ip.IP, Port: portnum, Zone: ip.Zone}, nil +} + +// resolveTCPAddrs is a convenience wrapper for net.ResolveTCPAddr. +// resolveTCPAddrs return a new set of url.URLs, in which all DNS hostnames +// are resolved. +func resolveTCPAddrs(ctx context.Context, urls [][]url.URL) ([][]url.URL, error) { + newurls := make([][]url.URL, 0) + for _, us := range urls { + nus := make([]url.URL, len(us)) + for i, u := range us { + nu, err := url.Parse(u.String()) + if err != nil { + return nil, err + } + nus[i] = *nu + } + for i, u := range nus { + h, err := resolveURL(ctx, u) + if err != nil { + return nil, err + } + if h != "" { + nus[i].Host = h + } + } + newurls = append(newurls, nus) + } + return newurls, nil +} + +func resolveURL(ctx context.Context, u url.URL) (string, error) { + for ctx.Err() == nil { + host, _, err := net.SplitHostPort(u.Host) + if err != nil { + plog.Errorf("could not parse url %s during tcp resolving", u.Host) + return "", err + } + if host == "localhost" || net.ParseIP(host) != nil { + return "", nil + } + tcpAddr, err := resolveTCPAddr(ctx, u.Host) + if err == nil { + plog.Infof("resolving %s to %s", u.Host, tcpAddr.String()) + return tcpAddr.String(), nil + } + plog.Warningf("failed resolving host %s (%v); retrying in %v", u.Host, err, retryInterval) + select { + case <-ctx.Done(): + plog.Errorf("could not resolve host %s", u.Host) + return "", err + case <-time.After(retryInterval): + } + } + return "", ctx.Err() +} + +// urlsEqual checks equality of url.URLS between two arrays. +// This check pass even if an URL is in hostname and opposite is in IP address. +func urlsEqual(ctx context.Context, a []url.URL, b []url.URL) bool { + if len(a) != len(b) { + return false + } + urls, err := resolveTCPAddrs(ctx, [][]url.URL{a, b}) + if err != nil { + return false + } + a, b = urls[0], urls[1] + sort.Sort(types.URLs(a)) + sort.Sort(types.URLs(b)) + for i := range a { + if !reflect.DeepEqual(a[i], b[i]) { + return false + } + } + + return true +} + +func URLStringsEqual(ctx context.Context, a []string, b []string) bool { + if len(a) != len(b) { + return false + } + urlsA := make([]url.URL, 0) + for _, str := range a { + u, err := url.Parse(str) + if err != nil { + return false + } + urlsA = append(urlsA, *u) + } + urlsB := make([]url.URL, 0) + for _, str := range b { + u, err := url.Parse(str) + if err != nil { + return false + } + urlsB = append(urlsB, *u) + } + + return urlsEqual(ctx, urlsA, urlsB) +} + +func IsNetworkTimeoutError(err error) bool { + nerr, ok := err.(net.Error) + return ok && nerr.Timeout() +} diff --git a/deps/github.com/coreos/etcd/pkg/netutil/routes.go b/deps/github.com/coreos/etcd/pkg/netutil/routes.go new file mode 100644 index 000000000..3eb6a19ec --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/netutil/routes.go @@ -0,0 +1,33 @@ +// 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. + +// +build !linux + +package netutil + +import ( + "fmt" + "runtime" +) + +// GetDefaultHost fetches the a resolvable name that corresponds +// to the machine's default routable interface +func GetDefaultHost() (string, error) { + return "", fmt.Errorf("default host not supported on %s_%s", runtime.GOOS, runtime.GOARCH) +} + +// GetDefaultInterfaces fetches the device name of default routable interface. +func GetDefaultInterfaces() (map[string]uint8, error) { + return nil, fmt.Errorf("default host not supported on %s_%s", runtime.GOOS, runtime.GOARCH) +} diff --git a/deps/github.com/coreos/etcd/pkg/netutil/routes_linux.go b/deps/github.com/coreos/etcd/pkg/netutil/routes_linux.go new file mode 100644 index 000000000..5d234d460 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/netutil/routes_linux.go @@ -0,0 +1,250 @@ +// 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. + +// +build linux + +package netutil + +import ( + "bytes" + "encoding/binary" + "fmt" + "net" + "sort" + "syscall" + + "github.com/coreos/etcd/pkg/cpuutil" +) + +var errNoDefaultRoute = fmt.Errorf("could not find default route") +var errNoDefaultHost = fmt.Errorf("could not find default host") +var errNoDefaultInterface = fmt.Errorf("could not find default interface") + +// GetDefaultHost obtains the first IP address of machine from the routing table and returns the IP address as string. +// An IPv4 address is preferred to an IPv6 address for backward compatibility. +func GetDefaultHost() (string, error) { + rmsgs, rerr := getDefaultRoutes() + if rerr != nil { + return "", rerr + } + + // prioritize IPv4 + if rmsg, ok := rmsgs[syscall.AF_INET]; ok { + if host, err := chooseHost(syscall.AF_INET, rmsg); host != "" || err != nil { + return host, err + } + delete(rmsgs, syscall.AF_INET) + } + + // sort so choice is deterministic + var families []int + for family := range rmsgs { + families = append(families, int(family)) + } + sort.Ints(families) + + for _, f := range families { + family := uint8(f) + if host, err := chooseHost(family, rmsgs[family]); host != "" || err != nil { + return host, err + } + } + + return "", errNoDefaultHost +} + +func chooseHost(family uint8, rmsg *syscall.NetlinkMessage) (string, error) { + host, oif, err := parsePREFSRC(rmsg) + if host != "" || err != nil { + return host, err + } + + // prefsrc not detected, fall back to getting address from iface + ifmsg, ierr := getIfaceAddr(oif, family) + if ierr != nil { + return "", ierr + } + + attrs, aerr := syscall.ParseNetlinkRouteAttr(ifmsg) + if aerr != nil { + return "", aerr + } + + for _, attr := range attrs { + // search for RTA_DST because ipv6 doesn't have RTA_SRC + if attr.Attr.Type == syscall.RTA_DST { + return net.IP(attr.Value).String(), nil + } + } + + return "", nil +} + +func getDefaultRoutes() (map[uint8]*syscall.NetlinkMessage, error) { + dat, err := syscall.NetlinkRIB(syscall.RTM_GETROUTE, syscall.AF_UNSPEC) + if err != nil { + return nil, err + } + + msgs, msgErr := syscall.ParseNetlinkMessage(dat) + if msgErr != nil { + return nil, msgErr + } + + routes := make(map[uint8]*syscall.NetlinkMessage) + rtmsg := syscall.RtMsg{} + for _, m := range msgs { + if m.Header.Type != syscall.RTM_NEWROUTE { + continue + } + buf := bytes.NewBuffer(m.Data[:syscall.SizeofRtMsg]) + if rerr := binary.Read(buf, cpuutil.ByteOrder(), &rtmsg); rerr != nil { + continue + } + if rtmsg.Dst_len == 0 && rtmsg.Table == syscall.RT_TABLE_MAIN { + // zero-length Dst_len implies default route + msg := m + routes[rtmsg.Family] = &msg + } + } + + if len(routes) > 0 { + return routes, nil + } + + return nil, errNoDefaultRoute +} + +// Used to get an address of interface. +func getIfaceAddr(idx uint32, family uint8) (*syscall.NetlinkMessage, error) { + dat, err := syscall.NetlinkRIB(syscall.RTM_GETADDR, int(family)) + if err != nil { + return nil, err + } + + msgs, msgErr := syscall.ParseNetlinkMessage(dat) + if msgErr != nil { + return nil, msgErr + } + + ifaddrmsg := syscall.IfAddrmsg{} + for _, m := range msgs { + if m.Header.Type != syscall.RTM_NEWADDR { + continue + } + buf := bytes.NewBuffer(m.Data[:syscall.SizeofIfAddrmsg]) + if rerr := binary.Read(buf, cpuutil.ByteOrder(), &ifaddrmsg); rerr != nil { + continue + } + if ifaddrmsg.Index == idx { + return &m, nil + } + } + + return nil, fmt.Errorf("could not find address for interface index %v", idx) + +} + +// Used to get a name of interface. +func getIfaceLink(idx uint32) (*syscall.NetlinkMessage, error) { + dat, err := syscall.NetlinkRIB(syscall.RTM_GETLINK, syscall.AF_UNSPEC) + if err != nil { + return nil, err + } + + msgs, msgErr := syscall.ParseNetlinkMessage(dat) + if msgErr != nil { + return nil, msgErr + } + + ifinfomsg := syscall.IfInfomsg{} + for _, m := range msgs { + if m.Header.Type != syscall.RTM_NEWLINK { + continue + } + buf := bytes.NewBuffer(m.Data[:syscall.SizeofIfInfomsg]) + if rerr := binary.Read(buf, cpuutil.ByteOrder(), &ifinfomsg); rerr != nil { + continue + } + if ifinfomsg.Index == int32(idx) { + return &m, nil + } + } + + return nil, fmt.Errorf("could not find link for interface index %v", idx) +} + +// GetDefaultInterfaces gets names of interfaces and returns a map[interface]families. +func GetDefaultInterfaces() (map[string]uint8, error) { + interfaces := make(map[string]uint8) + rmsgs, rerr := getDefaultRoutes() + if rerr != nil { + return interfaces, rerr + } + + for family, rmsg := range rmsgs { + _, oif, err := parsePREFSRC(rmsg) + if err != nil { + return interfaces, err + } + + ifmsg, ierr := getIfaceLink(oif) + if ierr != nil { + return interfaces, ierr + } + + attrs, aerr := syscall.ParseNetlinkRouteAttr(ifmsg) + if aerr != nil { + return interfaces, aerr + } + + for _, attr := range attrs { + if attr.Attr.Type == syscall.IFLA_IFNAME { + // key is an interface name + // possible values: 2 - AF_INET, 10 - AF_INET6, 12 - dualstack + interfaces[string(attr.Value[:len(attr.Value)-1])] += family + } + } + } + if len(interfaces) > 0 { + return interfaces, nil + } + return interfaces, errNoDefaultInterface +} + +// parsePREFSRC returns preferred source address and output interface index (RTA_OIF). +func parsePREFSRC(m *syscall.NetlinkMessage) (host string, oif uint32, err error) { + var attrs []syscall.NetlinkRouteAttr + attrs, err = syscall.ParseNetlinkRouteAttr(m) + if err != nil { + return "", 0, err + } + + for _, attr := range attrs { + if attr.Attr.Type == syscall.RTA_PREFSRC { + host = net.IP(attr.Value).String() + } + if attr.Attr.Type == syscall.RTA_OIF { + oif = cpuutil.ByteOrder().Uint32(attr.Value) + } + if host != "" && oif != uint32(0) { + break + } + } + + if oif == 0 { + err = errNoDefaultRoute + } + return +} diff --git a/deps/github.com/coreos/etcd/pkg/pbutil/pbutil.go b/deps/github.com/coreos/etcd/pkg/pbutil/pbutil.go new file mode 100644 index 000000000..d70f98dd8 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/pbutil/pbutil.go @@ -0,0 +1,60 @@ +// Copyright 2015 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. + +// Package pbutil defines interfaces for handling Protocol Buffer objects. +package pbutil + +import "github.com/coreos/pkg/capnslog" + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "pkg/pbutil") +) + +type Marshaler interface { + Marshal() (data []byte, err error) +} + +type Unmarshaler interface { + Unmarshal(data []byte) error +} + +func MustMarshal(m Marshaler) []byte { + d, err := m.Marshal() + if err != nil { + plog.Panicf("marshal should never fail (%v)", err) + } + return d +} + +func MustUnmarshal(um Unmarshaler, data []byte) { + if err := um.Unmarshal(data); err != nil { + plog.Panicf("unmarshal should never fail (%v)", err) + } +} + +func MaybeUnmarshal(um Unmarshaler, data []byte) bool { + if err := um.Unmarshal(data); err != nil { + return false + } + return true +} + +func GetBool(v *bool) (vv bool, set bool) { + if v == nil { + return false, false + } + return *v, true +} + +func Boolp(b bool) *bool { return &b } diff --git a/deps/github.com/coreos/etcd/pkg/runtime/fds_linux.go b/deps/github.com/coreos/etcd/pkg/runtime/fds_linux.go new file mode 100644 index 000000000..8e9359db2 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/runtime/fds_linux.go @@ -0,0 +1,37 @@ +// Copyright 2015 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. + +// Package runtime implements utility functions for runtime systems. +package runtime + +import ( + "io/ioutil" + "syscall" +) + +func FDLimit() (uint64, error) { + var rlimit syscall.Rlimit + if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlimit); err != nil { + return 0, err + } + return rlimit.Cur, nil +} + +func FDUsage() (uint64, error) { + fds, err := ioutil.ReadDir("/proc/self/fd") + if err != nil { + return 0, err + } + return uint64(len(fds)), nil +} diff --git a/deps/github.com/coreos/etcd/pkg/runtime/fds_other.go b/deps/github.com/coreos/etcd/pkg/runtime/fds_other.go new file mode 100644 index 000000000..0cbdb88c7 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/runtime/fds_other.go @@ -0,0 +1,30 @@ +// Copyright 2015 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. + +// +build !linux + +package runtime + +import ( + "fmt" + "runtime" +) + +func FDLimit() (uint64, error) { + return 0, fmt.Errorf("cannot get FDLimit on %s", runtime.GOOS) +} + +func FDUsage() (uint64, error) { + return 0, fmt.Errorf("cannot get FDUsage on %s", runtime.GOOS) +} diff --git a/deps/github.com/coreos/etcd/pkg/schedule/doc.go b/deps/github.com/coreos/etcd/pkg/schedule/doc.go new file mode 100644 index 000000000..cca2c75fb --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/schedule/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package schedule provides mechanisms and policies for scheduling units of work. +package schedule diff --git a/deps/github.com/coreos/etcd/pkg/schedule/schedule.go b/deps/github.com/coreos/etcd/pkg/schedule/schedule.go new file mode 100644 index 000000000..bf8528b75 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/schedule/schedule.go @@ -0,0 +1,166 @@ +// 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. + +package schedule + +import ( + "sync" + + "golang.org/x/net/context" +) + +type Job func(context.Context) + +// Scheduler can schedule jobs. +type Scheduler interface { + // Schedule asks the scheduler to schedule a job defined by the given func. + // Schedule to a stopped scheduler might panic. + Schedule(j Job) + + // Pending returns number of pending jobs + Pending() int + + // Scheduled returns the number of scheduled jobs (excluding pending jobs) + Scheduled() int + + // Finished returns the number of finished jobs + Finished() int + + // WaitFinish waits until at least n job are finished and all pending jobs are finished. + WaitFinish(n int) + + // Stop stops the scheduler. + Stop() +} + +type fifo struct { + mu sync.Mutex + + resume chan struct{} + scheduled int + finished int + pendings []Job + + ctx context.Context + cancel context.CancelFunc + + finishCond *sync.Cond + donec chan struct{} +} + +// NewFIFOScheduler returns a Scheduler that schedules jobs in FIFO +// order sequentially +func NewFIFOScheduler() Scheduler { + f := &fifo{ + resume: make(chan struct{}, 1), + donec: make(chan struct{}, 1), + } + f.finishCond = sync.NewCond(&f.mu) + f.ctx, f.cancel = context.WithCancel(context.Background()) + go f.run() + return f +} + +// Schedule schedules a job that will be ran in FIFO order sequentially. +func (f *fifo) Schedule(j Job) { + f.mu.Lock() + defer f.mu.Unlock() + + if f.cancel == nil { + panic("schedule: schedule to stopped scheduler") + } + + if len(f.pendings) == 0 { + select { + case f.resume <- struct{}{}: + default: + } + } + f.pendings = append(f.pendings, j) +} + +func (f *fifo) Pending() int { + f.mu.Lock() + defer f.mu.Unlock() + return len(f.pendings) +} + +func (f *fifo) Scheduled() int { + f.mu.Lock() + defer f.mu.Unlock() + return f.scheduled +} + +func (f *fifo) Finished() int { + f.finishCond.L.Lock() + defer f.finishCond.L.Unlock() + return f.finished +} + +func (f *fifo) WaitFinish(n int) { + f.finishCond.L.Lock() + for f.finished < n || len(f.pendings) != 0 { + f.finishCond.Wait() + } + f.finishCond.L.Unlock() +} + +// Stop stops the scheduler and cancels all pending jobs. +func (f *fifo) Stop() { + f.mu.Lock() + f.cancel() + f.cancel = nil + f.mu.Unlock() + <-f.donec +} + +func (f *fifo) run() { + // TODO: recover from job panic? + defer func() { + close(f.donec) + close(f.resume) + }() + + for { + var todo Job + f.mu.Lock() + if len(f.pendings) != 0 { + f.scheduled++ + todo = f.pendings[0] + } + f.mu.Unlock() + if todo == nil { + select { + case <-f.resume: + case <-f.ctx.Done(): + f.mu.Lock() + pendings := f.pendings + f.pendings = nil + f.mu.Unlock() + // clean up pending jobs + for _, todo := range pendings { + todo(f.ctx) + } + return + } + } else { + todo(f.ctx) + f.finishCond.L.Lock() + f.finished++ + f.pendings = f.pendings[1:] + f.finishCond.Broadcast() + f.finishCond.L.Unlock() + } + } +} diff --git a/deps/github.com/coreos/etcd/pkg/testutil/assert.go b/deps/github.com/coreos/etcd/pkg/testutil/assert.go new file mode 100644 index 000000000..9cf03457d --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/testutil/assert.go @@ -0,0 +1,62 @@ +// Copyright 2017 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. + +package testutil + +import ( + "fmt" + "reflect" + "testing" +) + +func AssertEqual(t *testing.T, e, a interface{}, msg ...string) { + if (e == nil || a == nil) && (isNil(e) && isNil(a)) { + return + } + if reflect.DeepEqual(e, a) { + return + } + s := "" + if len(msg) > 1 { + s = msg[0] + ": " + } + s = fmt.Sprintf("%sexpected %+v, got %+v", s, e, a) + FatalStack(t, s) +} + +func AssertNil(t *testing.T, v interface{}) { + AssertEqual(t, nil, v) +} + +func AssertNotNil(t *testing.T, v interface{}) { + if v == nil { + t.Fatalf("expected non-nil, got %+v", v) + } +} + +func AssertTrue(t *testing.T, v bool, msg ...string) { + AssertEqual(t, true, v, msg...) +} + +func AssertFalse(t *testing.T, v bool, msg ...string) { + AssertEqual(t, false, v, msg...) +} + +func isNil(v interface{}) bool { + if v == nil { + return true + } + rv := reflect.ValueOf(v) + return rv.Kind() != reflect.Struct && rv.IsNil() +} diff --git a/deps/github.com/coreos/etcd/pkg/testutil/leak.go b/deps/github.com/coreos/etcd/pkg/testutil/leak.go new file mode 100644 index 000000000..a29d06d9b --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/testutil/leak.go @@ -0,0 +1,138 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package testutil + +import ( + "fmt" + "net/http" + "os" + "regexp" + "runtime" + "sort" + "strings" + "testing" + "time" +) + +/* +CheckLeakedGoroutine verifies tests do not leave any leaky +goroutines. It returns true when there are goroutines still +running(leaking) after all tests. + + import "github.com/coreos/etcd/pkg/testutil" + + func TestMain(m *testing.M) { + v := m.Run() + if v == 0 && testutil.CheckLeakedGoroutine() { + os.Exit(1) + } + os.Exit(v) + } + + func TestSample(t *testing.T) { + defer testutil.AfterTest(t) + ... + } + +*/ +func CheckLeakedGoroutine() bool { + if testing.Short() { + // not counting goroutines for leakage in -short mode + return false + } + gs := interestingGoroutines() + if len(gs) == 0 { + return false + } + + stackCount := make(map[string]int) + re := regexp.MustCompile(`\(0[0-9a-fx, ]*\)`) + for _, g := range gs { + // strip out pointer arguments in first function of stack dump + normalized := string(re.ReplaceAll([]byte(g), []byte("(...)"))) + stackCount[normalized]++ + } + + fmt.Fprintf(os.Stderr, "Too many goroutines running after all test(s).\n") + for stack, count := range stackCount { + fmt.Fprintf(os.Stderr, "%d instances of:\n%s\n", count, stack) + } + return true +} + +// CheckAfterTest returns an error if AfterTest would fail with an error. +func CheckAfterTest(d time.Duration) error { + http.DefaultTransport.(*http.Transport).CloseIdleConnections() + if testing.Short() { + return nil + } + var bad string + badSubstring := map[string]string{ + ").writeLoop(": "a Transport", + "created by net/http/httptest.(*Server).Start": "an httptest.Server", + "timeoutHandler": "a TimeoutHandler", + "net.(*netFD).connect(": "a timing out dial", + ").noteClientGone(": "a closenotifier sender", + ").readLoop(": "a Transport", + ".grpc": "a gRPC resource", + } + + var stacks string + begin := time.Now() + for time.Since(begin) < d { + bad = "" + stacks = strings.Join(interestingGoroutines(), "\n\n") + for substr, what := range badSubstring { + if strings.Contains(stacks, substr) { + bad = what + } + } + if bad == "" { + return nil + } + // Bad stuff found, but goroutines might just still be + // shutting down, so give it some time. + time.Sleep(50 * time.Millisecond) + } + return fmt.Errorf("appears to have leaked %s:\n%s", bad, stacks) +} + +// AfterTest is meant to run in a defer that executes after a test completes. +// It will detect common goroutine leaks, retrying in case there are goroutines +// not synchronously torn down, and fail the test if any goroutines are stuck. +func AfterTest(t *testing.T) { + if err := CheckAfterTest(300 * time.Millisecond); err != nil { + t.Errorf("Test %v", err) + } +} + +func interestingGoroutines() (gs []string) { + buf := make([]byte, 2<<20) + buf = buf[:runtime.Stack(buf, true)] + for _, g := range strings.Split(string(buf), "\n\n") { + sl := strings.SplitN(g, "\n", 2) + if len(sl) != 2 { + continue + } + stack := strings.TrimSpace(sl[1]) + if stack == "" || + strings.Contains(stack, "sync.(*WaitGroup).Done") || + strings.Contains(stack, "created by os/signal.init") || + strings.Contains(stack, "runtime/panic.go") || + strings.Contains(stack, "created by testing.RunTests") || + strings.Contains(stack, "testing.Main(") || + strings.Contains(stack, "runtime.goexit") || + strings.Contains(stack, "github.com/coreos/etcd/pkg/testutil.interestingGoroutines") || + strings.Contains(stack, "github.com/coreos/etcd/pkg/logutil.(*MergeLogger).outputLoop") || + strings.Contains(stack, "github.com/golang/glog.(*loggingT).flushDaemon") || + strings.Contains(stack, "created by runtime.gc") || + strings.Contains(stack, "runtime.MHeap_Scavenger") { + continue + } + gs = append(gs, stack) + } + sort.Strings(gs) + return +} diff --git a/deps/github.com/coreos/etcd/pkg/testutil/pauseable_handler.go b/deps/github.com/coreos/etcd/pkg/testutil/pauseable_handler.go new file mode 100644 index 000000000..e0d6aca26 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/testutil/pauseable_handler.go @@ -0,0 +1,57 @@ +// Copyright 2015 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. + +package testutil + +import ( + "net/http" + "sync" +) + +type PauseableHandler struct { + Next http.Handler + mu sync.Mutex + paused bool +} + +func (ph *PauseableHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + ph.mu.Lock() + paused := ph.paused + ph.mu.Unlock() + if !paused { + ph.Next.ServeHTTP(w, r) + } else { + hj, ok := w.(http.Hijacker) + if !ok { + panic("webserver doesn't support hijacking") + } + conn, _, err := hj.Hijack() + if err != nil { + panic(err.Error()) + } + conn.Close() + } +} + +func (ph *PauseableHandler) Pause() { + ph.mu.Lock() + defer ph.mu.Unlock() + ph.paused = true +} + +func (ph *PauseableHandler) Resume() { + ph.mu.Lock() + defer ph.mu.Unlock() + ph.paused = false +} diff --git a/deps/github.com/coreos/etcd/pkg/testutil/recorder.go b/deps/github.com/coreos/etcd/pkg/testutil/recorder.go new file mode 100644 index 000000000..bdbbd8cc5 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/testutil/recorder.go @@ -0,0 +1,132 @@ +// Copyright 2015 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. + +package testutil + +import ( + "errors" + "fmt" + "sync" + "time" +) + +type Action struct { + Name string + Params []interface{} +} + +type Recorder interface { + // Record publishes an Action (e.g., function call) which will + // be reflected by Wait() or Chan() + Record(a Action) + // Wait waits until at least n Actions are available or returns with error + Wait(n int) ([]Action, error) + // Action returns immediately available Actions + Action() []Action + // Chan returns the channel for actions published by Record + Chan() <-chan Action +} + +// RecorderBuffered appends all Actions to a slice +type RecorderBuffered struct { + sync.Mutex + actions []Action +} + +func (r *RecorderBuffered) Record(a Action) { + r.Lock() + r.actions = append(r.actions, a) + r.Unlock() +} +func (r *RecorderBuffered) Action() []Action { + r.Lock() + cpy := make([]Action, len(r.actions)) + copy(cpy, r.actions) + r.Unlock() + return cpy +} +func (r *RecorderBuffered) Wait(n int) (acts []Action, err error) { + // legacy racey behavior + WaitSchedule() + acts = r.Action() + if len(acts) < n { + err = newLenErr(n, len(acts)) + } + return acts, err +} + +func (r *RecorderBuffered) Chan() <-chan Action { + ch := make(chan Action) + go func() { + acts := r.Action() + for i := range acts { + ch <- acts[i] + } + close(ch) + }() + return ch +} + +// RecorderStream writes all Actions to an unbuffered channel +type recorderStream struct { + ch chan Action +} + +func NewRecorderStream() Recorder { + return &recorderStream{ch: make(chan Action)} +} + +func (r *recorderStream) Record(a Action) { + r.ch <- a +} + +func (r *recorderStream) Action() (acts []Action) { + for { + select { + case act := <-r.ch: + acts = append(acts, act) + default: + return acts + } + } +} + +func (r *recorderStream) Chan() <-chan Action { + return r.ch +} + +func (r *recorderStream) Wait(n int) ([]Action, error) { + acts := make([]Action, n) + timeoutC := time.After(5 * time.Second) + for i := 0; i < n; i++ { + select { + case acts[i] = <-r.ch: + case <-timeoutC: + acts = acts[:i] + return acts, newLenErr(n, i) + } + } + // extra wait to catch any Action spew + select { + case act := <-r.ch: + acts = append(acts, act) + case <-time.After(10 * time.Millisecond): + } + return acts, nil +} + +func newLenErr(expected int, actual int) error { + s := fmt.Sprintf("len(actions) = %d, expected >= %d", actual, expected) + return errors.New(s) +} diff --git a/deps/github.com/coreos/etcd/pkg/testutil/testutil.go b/deps/github.com/coreos/etcd/pkg/testutil/testutil.go new file mode 100644 index 000000000..db2dd3285 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/testutil/testutil.go @@ -0,0 +1,57 @@ +// Copyright 2015 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. + +// Package testutil provides test utility functions. +package testutil + +import ( + "net/url" + "runtime" + "testing" + "time" +) + +// WaitSchedule briefly sleeps in order to invoke the go scheduler. +// TODO: improve this when we are able to know the schedule or status of target go-routine. +func WaitSchedule() { + time.Sleep(10 * time.Millisecond) +} + +func MustNewURLs(t *testing.T, urls []string) []url.URL { + if urls == nil { + return nil + } + var us []url.URL + for _, url := range urls { + u := MustNewURL(t, url) + us = append(us, *u) + } + return us +} + +func MustNewURL(t *testing.T, s string) *url.URL { + u, err := url.Parse(s) + if err != nil { + t.Fatalf("parse %v error: %v", s, err) + } + return u +} + +// FatalStack helps to fatal the test and print out the stacks of all running goroutines. +func FatalStack(t *testing.T, s string) { + stackTrace := make([]byte, 1024*1024) + n := runtime.Stack(stackTrace, true) + t.Error(string(stackTrace[:n])) + t.Fatalf(s) +} diff --git a/deps/github.com/coreos/etcd/pkg/wait/wait.go b/deps/github.com/coreos/etcd/pkg/wait/wait.go new file mode 100644 index 000000000..34fa237e8 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/wait/wait.go @@ -0,0 +1,91 @@ +// Copyright 2015 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. + +// Package wait provides utility functions for polling, listening using Go +// channel. +package wait + +import ( + "log" + "sync" +) + +// Wait is an interface that provides the ability to wait and trigger events that +// are associated with IDs. +type Wait interface { + // Register waits returns a chan that waits on the given ID. + // The chan will be triggered when Trigger is called with + // the same ID. + Register(id uint64) <-chan interface{} + // Trigger triggers the waiting chans with the given ID. + Trigger(id uint64, x interface{}) + IsRegistered(id uint64) bool +} + +type list struct { + l sync.Mutex + m map[uint64]chan interface{} +} + +// New creates a Wait. +func New() Wait { + return &list{m: make(map[uint64]chan interface{})} +} + +func (w *list) Register(id uint64) <-chan interface{} { + w.l.Lock() + defer w.l.Unlock() + ch := w.m[id] + if ch == nil { + ch = make(chan interface{}, 1) + w.m[id] = ch + } else { + log.Panicf("dup id %x", id) + } + return ch +} + +func (w *list) Trigger(id uint64, x interface{}) { + w.l.Lock() + ch := w.m[id] + delete(w.m, id) + w.l.Unlock() + if ch != nil { + ch <- x + close(ch) + } +} + +func (w *list) IsRegistered(id uint64) bool { + w.l.Lock() + defer w.l.Unlock() + _, ok := w.m[id] + return ok +} + +type waitWithResponse struct { + ch <-chan interface{} +} + +func NewWithResponse(ch <-chan interface{}) Wait { + return &waitWithResponse{ch: ch} +} + +func (w *waitWithResponse) Register(id uint64) <-chan interface{} { + return w.ch +} +func (w *waitWithResponse) Trigger(id uint64, x interface{}) {} +func (w *waitWithResponse) IsRegistered(id uint64) bool { + panic("waitWithResponse.IsRegistered() shouldn't be called") +} diff --git a/deps/github.com/coreos/etcd/pkg/wait/wait_time.go b/deps/github.com/coreos/etcd/pkg/wait/wait_time.go new file mode 100644 index 000000000..297e48a47 --- /dev/null +++ b/deps/github.com/coreos/etcd/pkg/wait/wait_time.go @@ -0,0 +1,66 @@ +// Copyright 2015 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. + +package wait + +import "sync" + +type WaitTime interface { + // Wait returns a chan that waits on the given logical deadline. + // The chan will be triggered when Trigger is called with a + // deadline that is later than the one it is waiting for. + Wait(deadline uint64) <-chan struct{} + // Trigger triggers all the waiting chans with an earlier logical deadline. + Trigger(deadline uint64) +} + +var closec chan struct{} + +func init() { closec = make(chan struct{}); close(closec) } + +type timeList struct { + l sync.Mutex + lastTriggerDeadline uint64 + m map[uint64]chan struct{} +} + +func NewTimeList() *timeList { + return &timeList{m: make(map[uint64]chan struct{})} +} + +func (tl *timeList) Wait(deadline uint64) <-chan struct{} { + tl.l.Lock() + defer tl.l.Unlock() + if tl.lastTriggerDeadline >= deadline { + return closec + } + ch := tl.m[deadline] + if ch == nil { + ch = make(chan struct{}) + tl.m[deadline] = ch + } + return ch +} + +func (tl *timeList) Trigger(deadline uint64) { + tl.l.Lock() + defer tl.l.Unlock() + tl.lastTriggerDeadline = deadline + for t, ch := range tl.m { + if t <= deadline { + delete(tl.m, t) + close(ch) + } + } +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go new file mode 100644 index 000000000..3aa01f205 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go @@ -0,0 +1,165 @@ +// Copyright 2017 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. + +package adapter + +import ( + "golang.org/x/net/context" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +// chanServerStream implements grpc.ServerStream with a chanStream +type chanServerStream struct { + headerc chan<- metadata.MD + trailerc chan<- metadata.MD + grpc.Stream + + headers []metadata.MD +} + +func (ss *chanServerStream) SendHeader(md metadata.MD) error { + if ss.headerc == nil { + return errAlreadySentHeader + } + outmd := make(map[string][]string) + for _, h := range append(ss.headers, md) { + for k, v := range h { + outmd[k] = v + } + } + select { + case ss.headerc <- outmd: + ss.headerc = nil + ss.headers = nil + return nil + case <-ss.Context().Done(): + } + return ss.Context().Err() +} + +func (ss *chanServerStream) SetHeader(md metadata.MD) error { + if ss.headerc == nil { + return errAlreadySentHeader + } + ss.headers = append(ss.headers, md) + return nil +} + +func (ss *chanServerStream) SetTrailer(md metadata.MD) { + ss.trailerc <- md +} + +// chanClientStream implements grpc.ClientStream with a chanStream +type chanClientStream struct { + headerc <-chan metadata.MD + trailerc <-chan metadata.MD + *chanStream +} + +func (cs *chanClientStream) Header() (metadata.MD, error) { + select { + case md := <-cs.headerc: + return md, nil + case <-cs.Context().Done(): + } + return nil, cs.Context().Err() +} + +func (cs *chanClientStream) Trailer() metadata.MD { + select { + case md := <-cs.trailerc: + return md + case <-cs.Context().Done(): + return nil + } +} + +func (cs *chanClientStream) CloseSend() error { + close(cs.chanStream.sendc) + return nil +} + +// chanStream implements grpc.Stream using channels +type chanStream struct { + recvc <-chan interface{} + sendc chan<- interface{} + ctx context.Context + cancel context.CancelFunc +} + +func (s *chanStream) Context() context.Context { return s.ctx } + +func (s *chanStream) SendMsg(m interface{}) error { + select { + case s.sendc <- m: + if err, ok := m.(error); ok { + return err + } + return nil + case <-s.ctx.Done(): + } + return s.ctx.Err() +} + +func (s *chanStream) RecvMsg(m interface{}) error { + v := m.(*interface{}) + for { + select { + case msg, ok := <-s.recvc: + if !ok { + return grpc.ErrClientConnClosing + } + if err, ok := msg.(error); ok { + return err + } + *v = msg + return nil + case <-s.ctx.Done(): + } + if len(s.recvc) == 0 { + // prioritize any pending recv messages over canceled context + break + } + } + return s.ctx.Err() +} + +func newPipeStream(ctx context.Context, ssHandler func(chanServerStream) error) chanClientStream { + // ch1 is buffered so server can send error on close + ch1, ch2 := make(chan interface{}, 1), make(chan interface{}) + headerc, trailerc := make(chan metadata.MD, 1), make(chan metadata.MD, 1) + + cctx, ccancel := context.WithCancel(ctx) + cli := &chanStream{recvc: ch1, sendc: ch2, ctx: cctx, cancel: ccancel} + cs := chanClientStream{headerc, trailerc, cli} + + sctx, scancel := context.WithCancel(ctx) + srv := &chanStream{recvc: ch2, sendc: ch1, ctx: sctx, cancel: scancel} + ss := chanServerStream{headerc, trailerc, srv, nil} + + go func() { + if err := ssHandler(ss); err != nil { + select { + case srv.sendc <- err: + case <-sctx.Done(): + case <-cctx.Done(): + } + } + scancel() + ccancel() + }() + return cs +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go new file mode 100644 index 000000000..4ddf78e15 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go @@ -0,0 +1,44 @@ +// Copyright 2017 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. + +package adapter + +import ( + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "golang.org/x/net/context" + "google.golang.org/grpc" +) + +type cls2clc struct{ cls pb.ClusterServer } + +func ClusterServerToClusterClient(cls pb.ClusterServer) pb.ClusterClient { + return &cls2clc{cls} +} + +func (s *cls2clc) MemberList(ctx context.Context, r *pb.MemberListRequest, opts ...grpc.CallOption) (*pb.MemberListResponse, error) { + return s.cls.MemberList(ctx, r) +} + +func (s *cls2clc) MemberAdd(ctx context.Context, r *pb.MemberAddRequest, opts ...grpc.CallOption) (*pb.MemberAddResponse, error) { + return s.cls.MemberAdd(ctx, r) +} + +func (s *cls2clc) MemberUpdate(ctx context.Context, r *pb.MemberUpdateRequest, opts ...grpc.CallOption) (*pb.MemberUpdateResponse, error) { + return s.cls.MemberUpdate(ctx, r) +} + +func (s *cls2clc) MemberRemove(ctx context.Context, r *pb.MemberRemoveRequest, opts ...grpc.CallOption) (*pb.MemberRemoveResponse, error) { + return s.cls.MemberRemove(ctx, r) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/doc.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/doc.go new file mode 100644 index 000000000..7170be233 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/doc.go @@ -0,0 +1,17 @@ +// Copyright 2017 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. + +// Package adapter provides gRPC adapters between client and server +// gRPC interfaces without needing to go through a gRPC connection. +package adapter diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go new file mode 100644 index 000000000..383c1b9d8 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go @@ -0,0 +1,79 @@ +// Copyright 2017 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. + +package adapter + +import ( + "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" + + "golang.org/x/net/context" + "google.golang.org/grpc" +) + +type es2ec struct{ es v3electionpb.ElectionServer } + +func ElectionServerToElectionClient(es v3electionpb.ElectionServer) v3electionpb.ElectionClient { + return &es2ec{es} +} + +func (s *es2ec) Campaign(ctx context.Context, r *v3electionpb.CampaignRequest, opts ...grpc.CallOption) (*v3electionpb.CampaignResponse, error) { + return s.es.Campaign(ctx, r) +} + +func (s *es2ec) Proclaim(ctx context.Context, r *v3electionpb.ProclaimRequest, opts ...grpc.CallOption) (*v3electionpb.ProclaimResponse, error) { + return s.es.Proclaim(ctx, r) +} + +func (s *es2ec) Leader(ctx context.Context, r *v3electionpb.LeaderRequest, opts ...grpc.CallOption) (*v3electionpb.LeaderResponse, error) { + return s.es.Leader(ctx, r) +} + +func (s *es2ec) Resign(ctx context.Context, r *v3electionpb.ResignRequest, opts ...grpc.CallOption) (*v3electionpb.ResignResponse, error) { + return s.es.Resign(ctx, r) +} + +func (s *es2ec) Observe(ctx context.Context, in *v3electionpb.LeaderRequest, opts ...grpc.CallOption) (v3electionpb.Election_ObserveClient, error) { + cs := newPipeStream(ctx, func(ss chanServerStream) error { + return s.es.Observe(in, &es2ecServerStream{ss}) + }) + return &es2ecClientStream{cs}, nil +} + +// es2ecClientStream implements Election_ObserveClient +type es2ecClientStream struct{ chanClientStream } + +// es2ecServerStream implements Election_ObserveServer +type es2ecServerStream struct{ chanServerStream } + +func (s *es2ecClientStream) Send(rr *v3electionpb.LeaderRequest) error { + return s.SendMsg(rr) +} +func (s *es2ecClientStream) Recv() (*v3electionpb.LeaderResponse, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*v3electionpb.LeaderResponse), nil +} + +func (s *es2ecServerStream) Send(rr *v3electionpb.LeaderResponse) error { + return s.SendMsg(rr) +} +func (s *es2ecServerStream) Recv() (*v3electionpb.LeaderRequest, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*v3electionpb.LeaderRequest), nil +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go new file mode 100644 index 000000000..fec401d9d --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go @@ -0,0 +1,47 @@ +// 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. + +package adapter + +import ( + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +type kvs2kvc struct{ kvs pb.KVServer } + +func KvServerToKvClient(kvs pb.KVServer) pb.KVClient { + return &kvs2kvc{kvs} +} + +func (s *kvs2kvc) Range(ctx context.Context, in *pb.RangeRequest, opts ...grpc.CallOption) (*pb.RangeResponse, error) { + return s.kvs.Range(ctx, in) +} + +func (s *kvs2kvc) Put(ctx context.Context, in *pb.PutRequest, opts ...grpc.CallOption) (*pb.PutResponse, error) { + return s.kvs.Put(ctx, in) +} + +func (s *kvs2kvc) DeleteRange(ctx context.Context, in *pb.DeleteRangeRequest, opts ...grpc.CallOption) (*pb.DeleteRangeResponse, error) { + return s.kvs.DeleteRange(ctx, in) +} + +func (s *kvs2kvc) Txn(ctx context.Context, in *pb.TxnRequest, opts ...grpc.CallOption) (*pb.TxnResponse, error) { + return s.kvs.Txn(ctx, in) +} + +func (s *kvs2kvc) Compact(ctx context.Context, in *pb.CompactionRequest, opts ...grpc.CallOption) (*pb.CompactionResponse, error) { + return s.kvs.Compact(ctx, in) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go new file mode 100644 index 000000000..d471fd914 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go @@ -0,0 +1,77 @@ +// Copyright 2017 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. + +package adapter + +import ( + "golang.org/x/net/context" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "google.golang.org/grpc" +) + +type ls2lc struct { + leaseServer pb.LeaseServer +} + +func LeaseServerToLeaseClient(ls pb.LeaseServer) pb.LeaseClient { + return &ls2lc{ls} +} + +func (c *ls2lc) LeaseGrant(ctx context.Context, in *pb.LeaseGrantRequest, opts ...grpc.CallOption) (*pb.LeaseGrantResponse, error) { + return c.leaseServer.LeaseGrant(ctx, in) +} + +func (c *ls2lc) LeaseRevoke(ctx context.Context, in *pb.LeaseRevokeRequest, opts ...grpc.CallOption) (*pb.LeaseRevokeResponse, error) { + return c.leaseServer.LeaseRevoke(ctx, in) +} + +func (c *ls2lc) LeaseKeepAlive(ctx context.Context, opts ...grpc.CallOption) (pb.Lease_LeaseKeepAliveClient, error) { + cs := newPipeStream(ctx, func(ss chanServerStream) error { + return c.leaseServer.LeaseKeepAlive(&ls2lcServerStream{ss}) + }) + return &ls2lcClientStream{cs}, nil +} + +func (c *ls2lc) LeaseTimeToLive(ctx context.Context, in *pb.LeaseTimeToLiveRequest, opts ...grpc.CallOption) (*pb.LeaseTimeToLiveResponse, error) { + return c.leaseServer.LeaseTimeToLive(ctx, in) +} + +// ls2lcClientStream implements Lease_LeaseKeepAliveClient +type ls2lcClientStream struct{ chanClientStream } + +// ls2lcServerStream implements Lease_LeaseKeepAliveServer +type ls2lcServerStream struct{ chanServerStream } + +func (s *ls2lcClientStream) Send(rr *pb.LeaseKeepAliveRequest) error { + return s.SendMsg(rr) +} +func (s *ls2lcClientStream) Recv() (*pb.LeaseKeepAliveResponse, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*pb.LeaseKeepAliveResponse), nil +} + +func (s *ls2lcServerStream) Send(rr *pb.LeaseKeepAliveResponse) error { + return s.SendMsg(rr) +} +func (s *ls2lcServerStream) Recv() (*pb.LeaseKeepAliveRequest, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*pb.LeaseKeepAliveRequest), nil +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go new file mode 100644 index 000000000..05e5cb020 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go @@ -0,0 +1,36 @@ +// Copyright 2017 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. + +package adapter + +import ( + "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" + + "golang.org/x/net/context" + "google.golang.org/grpc" +) + +type ls2lsc struct{ ls v3lockpb.LockServer } + +func LockServerToLockClient(ls v3lockpb.LockServer) v3lockpb.LockClient { + return &ls2lsc{ls} +} + +func (s *ls2lsc) Lock(ctx context.Context, r *v3lockpb.LockRequest, opts ...grpc.CallOption) (*v3lockpb.LockResponse, error) { + return s.ls.Lock(ctx, r) +} + +func (s *ls2lsc) Unlock(ctx context.Context, r *v3lockpb.UnlockRequest, opts ...grpc.CallOption) (*v3lockpb.UnlockResponse, error) { + return s.ls.Unlock(ctx, r) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go new file mode 100644 index 000000000..9b21bf257 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go @@ -0,0 +1,79 @@ +// Copyright 2017 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. + +package adapter + +import ( + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "golang.org/x/net/context" + "google.golang.org/grpc" +) + +type mts2mtc struct{ mts pb.MaintenanceServer } + +func MaintenanceServerToMaintenanceClient(mts pb.MaintenanceServer) pb.MaintenanceClient { + return &mts2mtc{mts} +} + +func (s *mts2mtc) Alarm(ctx context.Context, r *pb.AlarmRequest, opts ...grpc.CallOption) (*pb.AlarmResponse, error) { + return s.mts.Alarm(ctx, r) +} + +func (s *mts2mtc) Status(ctx context.Context, r *pb.StatusRequest, opts ...grpc.CallOption) (*pb.StatusResponse, error) { + return s.mts.Status(ctx, r) +} + +func (s *mts2mtc) Defragment(ctx context.Context, dr *pb.DefragmentRequest, opts ...grpc.CallOption) (*pb.DefragmentResponse, error) { + return s.mts.Defragment(ctx, dr) +} + +func (s *mts2mtc) Hash(ctx context.Context, r *pb.HashRequest, opts ...grpc.CallOption) (*pb.HashResponse, error) { + return s.mts.Hash(ctx, r) +} + +func (s *mts2mtc) Snapshot(ctx context.Context, in *pb.SnapshotRequest, opts ...grpc.CallOption) (pb.Maintenance_SnapshotClient, error) { + cs := newPipeStream(ctx, func(ss chanServerStream) error { + return s.mts.Snapshot(in, &ss2scServerStream{ss}) + }) + return &ss2scClientStream{cs}, nil +} + +// ss2scClientStream implements Maintenance_SnapshotClient +type ss2scClientStream struct{ chanClientStream } + +// ss2scServerStream implements Maintenance_SnapshotServer +type ss2scServerStream struct{ chanServerStream } + +func (s *ss2scClientStream) Send(rr *pb.SnapshotRequest) error { + return s.SendMsg(rr) +} +func (s *ss2scClientStream) Recv() (*pb.SnapshotResponse, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*pb.SnapshotResponse), nil +} + +func (s *ss2scServerStream) Send(rr *pb.SnapshotResponse) error { + return s.SendMsg(rr) +} +func (s *ss2scServerStream) Recv() (*pb.SnapshotRequest, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*pb.SnapshotRequest), nil +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go new file mode 100644 index 000000000..af4a13c41 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go @@ -0,0 +1,66 @@ +// 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. + +package adapter + +import ( + "errors" + + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "golang.org/x/net/context" + "google.golang.org/grpc" +) + +var errAlreadySentHeader = errors.New("adapter: already sent header") + +type ws2wc struct{ wserv pb.WatchServer } + +func WatchServerToWatchClient(wserv pb.WatchServer) pb.WatchClient { + return &ws2wc{wserv} +} + +func (s *ws2wc) Watch(ctx context.Context, opts ...grpc.CallOption) (pb.Watch_WatchClient, error) { + cs := newPipeStream(ctx, func(ss chanServerStream) error { + return s.wserv.Watch(&ws2wcServerStream{ss}) + }) + return &ws2wcClientStream{cs}, nil +} + +// ws2wcClientStream implements Watch_WatchClient +type ws2wcClientStream struct{ chanClientStream } + +// ws2wcServerStream implements Watch_WatchServer +type ws2wcServerStream struct{ chanServerStream } + +func (s *ws2wcClientStream) Send(wr *pb.WatchRequest) error { + return s.SendMsg(wr) +} +func (s *ws2wcClientStream) Recv() (*pb.WatchResponse, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*pb.WatchResponse), nil +} + +func (s *ws2wcServerStream) Send(wr *pb.WatchResponse) error { + return s.SendMsg(wr) +} +func (s *ws2wcServerStream) Recv() (*pb.WatchRequest, error) { + var v interface{} + if err := s.RecvMsg(&v); err != nil { + return nil, err + } + return v.(*pb.WatchRequest), nil +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/auth.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/auth.go new file mode 100644 index 000000000..c1b75e36d --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/auth.go @@ -0,0 +1,110 @@ +// 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. + +package grpcproxy + +import ( + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +type AuthProxy struct { + client *clientv3.Client +} + +func NewAuthProxy(c *clientv3.Client) pb.AuthServer { + return &AuthProxy{client: c} +} + +func (ap *AuthProxy) AuthEnable(ctx context.Context, r *pb.AuthEnableRequest) (*pb.AuthEnableResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).AuthEnable(ctx, r) +} + +func (ap *AuthProxy) AuthDisable(ctx context.Context, r *pb.AuthDisableRequest) (*pb.AuthDisableResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).AuthDisable(ctx, r) +} + +func (ap *AuthProxy) Authenticate(ctx context.Context, r *pb.AuthenticateRequest) (*pb.AuthenticateResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).Authenticate(ctx, r) +} + +func (ap *AuthProxy) RoleAdd(ctx context.Context, r *pb.AuthRoleAddRequest) (*pb.AuthRoleAddResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).RoleAdd(ctx, r) +} + +func (ap *AuthProxy) RoleDelete(ctx context.Context, r *pb.AuthRoleDeleteRequest) (*pb.AuthRoleDeleteResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).RoleDelete(ctx, r) +} + +func (ap *AuthProxy) RoleGet(ctx context.Context, r *pb.AuthRoleGetRequest) (*pb.AuthRoleGetResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).RoleGet(ctx, r) +} + +func (ap *AuthProxy) RoleList(ctx context.Context, r *pb.AuthRoleListRequest) (*pb.AuthRoleListResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).RoleList(ctx, r) +} + +func (ap *AuthProxy) RoleRevokePermission(ctx context.Context, r *pb.AuthRoleRevokePermissionRequest) (*pb.AuthRoleRevokePermissionResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).RoleRevokePermission(ctx, r) +} + +func (ap *AuthProxy) RoleGrantPermission(ctx context.Context, r *pb.AuthRoleGrantPermissionRequest) (*pb.AuthRoleGrantPermissionResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).RoleGrantPermission(ctx, r) +} + +func (ap *AuthProxy) UserAdd(ctx context.Context, r *pb.AuthUserAddRequest) (*pb.AuthUserAddResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).UserAdd(ctx, r) +} + +func (ap *AuthProxy) UserDelete(ctx context.Context, r *pb.AuthUserDeleteRequest) (*pb.AuthUserDeleteResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).UserDelete(ctx, r) +} + +func (ap *AuthProxy) UserGet(ctx context.Context, r *pb.AuthUserGetRequest) (*pb.AuthUserGetResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).UserGet(ctx, r) +} + +func (ap *AuthProxy) UserList(ctx context.Context, r *pb.AuthUserListRequest) (*pb.AuthUserListResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).UserList(ctx, r) +} + +func (ap *AuthProxy) UserGrantRole(ctx context.Context, r *pb.AuthUserGrantRoleRequest) (*pb.AuthUserGrantRoleResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).UserGrantRole(ctx, r) +} + +func (ap *AuthProxy) UserRevokeRole(ctx context.Context, r *pb.AuthUserRevokeRoleRequest) (*pb.AuthUserRevokeRoleResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).UserRevokeRole(ctx, r) +} + +func (ap *AuthProxy) UserChangePassword(ctx context.Context, r *pb.AuthUserChangePasswordRequest) (*pb.AuthUserChangePasswordResponse, error) { + conn := ap.client.ActiveConnection() + return pb.NewAuthClient(conn).UserChangePassword(ctx, r) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/cache/store.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/cache/store.go new file mode 100644 index 000000000..e84a05229 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/cache/store.go @@ -0,0 +1,168 @@ +// 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. + +// Package cache exports functionality for efficiently caching and mapping +// `RangeRequest`s to corresponding `RangeResponse`s. +package cache + +import ( + "errors" + "sync" + + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/pkg/adt" + "github.com/golang/groupcache/lru" +) + +var ( + DefaultMaxEntries = 2048 + ErrCompacted = rpctypes.ErrGRPCCompacted +) + +type Cache interface { + Add(req *pb.RangeRequest, resp *pb.RangeResponse) + Get(req *pb.RangeRequest) (*pb.RangeResponse, error) + Compact(revision int64) + Invalidate(key []byte, endkey []byte) + Size() int + Close() +} + +// keyFunc returns the key of an request, which is used to look up in the cache for it's caching response. +func keyFunc(req *pb.RangeRequest) string { + // TODO: use marshalTo to reduce allocation + b, err := req.Marshal() + if err != nil { + panic(err) + } + return string(b) +} + +func NewCache(maxCacheEntries int) Cache { + return &cache{ + lru: lru.New(maxCacheEntries), + compactedRev: -1, + } +} + +func (c *cache) Close() {} + +// cache implements Cache +type cache struct { + mu sync.RWMutex + lru *lru.Cache + + // a reverse index for cache invalidation + cachedRanges adt.IntervalTree + + compactedRev int64 +} + +// Add adds the response of a request to the cache if its revision is larger than the compacted revision of the cache. +func (c *cache) Add(req *pb.RangeRequest, resp *pb.RangeResponse) { + key := keyFunc(req) + + c.mu.Lock() + defer c.mu.Unlock() + + if req.Revision > c.compactedRev { + c.lru.Add(key, resp) + } + // we do not need to invalidate a request with a revision specified. + // so we do not need to add it into the reverse index. + if req.Revision != 0 { + return + } + + var ( + iv *adt.IntervalValue + ivl adt.Interval + ) + if len(req.RangeEnd) != 0 { + ivl = adt.NewStringAffineInterval(string(req.Key), string(req.RangeEnd)) + } else { + ivl = adt.NewStringAffinePoint(string(req.Key)) + } + + iv = c.cachedRanges.Find(ivl) + + if iv == nil { + c.cachedRanges.Insert(ivl, []string{key}) + } else { + iv.Val = append(iv.Val.([]string), key) + } +} + +// Get looks up the caching response for a given request. +// Get is also responsible for lazy eviction when accessing compacted entries. +func (c *cache) Get(req *pb.RangeRequest) (*pb.RangeResponse, error) { + key := keyFunc(req) + + c.mu.Lock() + defer c.mu.Unlock() + + if req.Revision > 0 && req.Revision < c.compactedRev { + c.lru.Remove(key) + return nil, ErrCompacted + } + + if resp, ok := c.lru.Get(key); ok { + return resp.(*pb.RangeResponse), nil + } + return nil, errors.New("not exist") +} + +// Invalidate invalidates the cache entries that intersecting with the given range from key to endkey. +func (c *cache) Invalidate(key, endkey []byte) { + c.mu.Lock() + defer c.mu.Unlock() + + var ( + ivs []*adt.IntervalValue + ivl adt.Interval + ) + if len(endkey) == 0 { + ivl = adt.NewStringAffinePoint(string(key)) + } else { + ivl = adt.NewStringAffineInterval(string(key), string(endkey)) + } + + ivs = c.cachedRanges.Stab(ivl) + for _, iv := range ivs { + keys := iv.Val.([]string) + for _, key := range keys { + c.lru.Remove(key) + } + } + // delete after removing all keys since it is destructive to 'ivs' + c.cachedRanges.Delete(ivl) +} + +// Compact invalidate all caching response before the given rev. +// Replace with the invalidation is lazy. The actual removal happens when the entries is accessed. +func (c *cache) Compact(revision int64) { + c.mu.Lock() + defer c.mu.Unlock() + + if revision > c.compactedRev { + c.compactedRev = revision + } +} + +func (c *cache) Size() int { + c.mu.RLock() + defer c.mu.RUnlock() + return c.lru.Len() +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/cluster.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/cluster.go new file mode 100644 index 000000000..899fb9be6 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/cluster.go @@ -0,0 +1,177 @@ +// 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. + +package grpcproxy + +import ( + "fmt" + "os" + "sync" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/clientv3/naming" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + + "golang.org/x/net/context" + "golang.org/x/time/rate" + "google.golang.org/grpc" + gnaming "google.golang.org/grpc/naming" +) + +// allow maximum 1 retry per second +const resolveRetryRate = 1 + +type clusterProxy struct { + clus clientv3.Cluster + ctx context.Context + gr *naming.GRPCResolver + + // advertise client URL + advaddr string + prefix string + + umu sync.RWMutex + umap map[string]gnaming.Update +} + +// NewClusterProxy takes optional prefix to fetch grpc-proxy member endpoints. +// The returned channel is closed when there is grpc-proxy endpoint registered +// and the client's context is canceled so the 'register' loop returns. +func NewClusterProxy(c *clientv3.Client, advaddr string, prefix string) (pb.ClusterServer, <-chan struct{}) { + cp := &clusterProxy{ + clus: c.Cluster, + ctx: c.Ctx(), + gr: &naming.GRPCResolver{Client: c}, + + advaddr: advaddr, + prefix: prefix, + umap: make(map[string]gnaming.Update), + } + + donec := make(chan struct{}) + if advaddr != "" && prefix != "" { + go func() { + defer close(donec) + cp.resolve(prefix) + }() + return cp, donec + } + + close(donec) + return cp, donec +} + +func (cp *clusterProxy) resolve(prefix string) { + rm := rate.NewLimiter(rate.Limit(resolveRetryRate), resolveRetryRate) + for rm.Wait(cp.ctx) == nil { + wa, err := cp.gr.Resolve(prefix) + if err != nil { + plog.Warningf("failed to resolve %q (%v)", prefix, err) + continue + } + cp.monitor(wa) + } +} + +func (cp *clusterProxy) monitor(wa gnaming.Watcher) { + for cp.ctx.Err() == nil { + ups, err := wa.Next() + if err != nil { + plog.Warningf("clusterProxy watcher error (%v)", err) + if grpc.ErrorDesc(err) == naming.ErrWatcherClosed.Error() { + return + } + } + + cp.umu.Lock() + for i := range ups { + switch ups[i].Op { + case gnaming.Add: + cp.umap[ups[i].Addr] = *ups[i] + case gnaming.Delete: + delete(cp.umap, ups[i].Addr) + } + } + cp.umu.Unlock() + } +} + +func (cp *clusterProxy) MemberAdd(ctx context.Context, r *pb.MemberAddRequest) (*pb.MemberAddResponse, error) { + mresp, err := cp.clus.MemberAdd(ctx, r.PeerURLs) + if err != nil { + return nil, err + } + resp := (pb.MemberAddResponse)(*mresp) + return &resp, err +} + +func (cp *clusterProxy) MemberRemove(ctx context.Context, r *pb.MemberRemoveRequest) (*pb.MemberRemoveResponse, error) { + mresp, err := cp.clus.MemberRemove(ctx, r.ID) + if err != nil { + return nil, err + } + resp := (pb.MemberRemoveResponse)(*mresp) + return &resp, err +} + +func (cp *clusterProxy) MemberUpdate(ctx context.Context, r *pb.MemberUpdateRequest) (*pb.MemberUpdateResponse, error) { + mresp, err := cp.clus.MemberUpdate(ctx, r.ID, r.PeerURLs) + if err != nil { + return nil, err + } + resp := (pb.MemberUpdateResponse)(*mresp) + return &resp, err +} + +func (cp *clusterProxy) membersFromUpdates() ([]*pb.Member, error) { + cp.umu.RLock() + defer cp.umu.RUnlock() + mbs := make([]*pb.Member, 0, len(cp.umap)) + for addr, upt := range cp.umap { + m, err := decodeMeta(fmt.Sprint(upt.Metadata)) + if err != nil { + return nil, err + } + mbs = append(mbs, &pb.Member{Name: m.Name, ClientURLs: []string{addr}}) + } + return mbs, nil +} + +// MemberList wraps member list API with following rules: +// - If 'advaddr' is not empty and 'prefix' is not empty, return registered member lists via resolver +// - If 'advaddr' is not empty and 'prefix' is not empty and registered grpc-proxy members haven't been fetched, return the 'advaddr' +// - If 'advaddr' is not empty and 'prefix' is empty, return 'advaddr' without forcing it to 'register' +// - If 'advaddr' is empty, forward to member list API +func (cp *clusterProxy) MemberList(ctx context.Context, r *pb.MemberListRequest) (*pb.MemberListResponse, error) { + if cp.advaddr != "" { + if cp.prefix != "" { + mbs, err := cp.membersFromUpdates() + if err != nil { + return nil, err + } + if len(mbs) > 0 { + return &pb.MemberListResponse{Members: mbs}, nil + } + } + // prefix is empty or no grpc-proxy members haven't been registered + hostname, _ := os.Hostname() + return &pb.MemberListResponse{Members: []*pb.Member{{Name: hostname, ClientURLs: []string{cp.advaddr}}}}, nil + } + mresp, err := cp.clus.MemberList(ctx) + if err != nil { + return nil, err + } + resp := (pb.MemberListResponse)(*mresp) + return &resp, err +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/doc.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/doc.go new file mode 100644 index 000000000..fc022e3c5 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/doc.go @@ -0,0 +1,16 @@ +// 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. + +// Package grpcproxy is an OSI level 7 proxy for etcd v3 API requests. +package grpcproxy diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/election.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/election.go new file mode 100644 index 000000000..27115a81d --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/election.go @@ -0,0 +1,65 @@ +// Copyright 2017 The etcd Lockors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 grpcproxy + +import ( + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb" +) + +type electionProxy struct { + client *clientv3.Client +} + +func NewElectionProxy(client *clientv3.Client) v3electionpb.ElectionServer { + return &electionProxy{client: client} +} + +func (ep *electionProxy) Campaign(ctx context.Context, req *v3electionpb.CampaignRequest) (*v3electionpb.CampaignResponse, error) { + return v3electionpb.NewElectionClient(ep.client.ActiveConnection()).Campaign(ctx, req) +} + +func (ep *electionProxy) Proclaim(ctx context.Context, req *v3electionpb.ProclaimRequest) (*v3electionpb.ProclaimResponse, error) { + return v3electionpb.NewElectionClient(ep.client.ActiveConnection()).Proclaim(ctx, req) +} + +func (ep *electionProxy) Leader(ctx context.Context, req *v3electionpb.LeaderRequest) (*v3electionpb.LeaderResponse, error) { + return v3electionpb.NewElectionClient(ep.client.ActiveConnection()).Leader(ctx, req) +} + +func (ep *electionProxy) Observe(req *v3electionpb.LeaderRequest, s v3electionpb.Election_ObserveServer) error { + conn := ep.client.ActiveConnection() + ctx, cancel := context.WithCancel(s.Context()) + defer cancel() + sc, err := v3electionpb.NewElectionClient(conn).Observe(ctx, req) + if err != nil { + return err + } + for { + rr, err := sc.Recv() + if err != nil { + return err + } + if err = s.Send(rr); err != nil { + return err + } + } +} + +func (ep *electionProxy) Resign(ctx context.Context, req *v3electionpb.ResignRequest) (*v3electionpb.ResignResponse, error) { + return v3electionpb.NewElectionClient(ep.client.ActiveConnection()).Resign(ctx, req) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/kv.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/kv.go new file mode 100644 index 000000000..0654729a0 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/kv.go @@ -0,0 +1,226 @@ +// 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. + +package grpcproxy + +import ( + "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/proxy/grpcproxy/cache" + + "golang.org/x/net/context" +) + +type kvProxy struct { + kv clientv3.KV + cache cache.Cache +} + +func NewKvProxy(c *clientv3.Client) (pb.KVServer, <-chan struct{}) { + kv := &kvProxy{ + kv: c.KV, + cache: cache.NewCache(cache.DefaultMaxEntries), + } + donec := make(chan struct{}) + close(donec) + return kv, donec +} + +func (p *kvProxy) Range(ctx context.Context, r *pb.RangeRequest) (*pb.RangeResponse, error) { + if r.Serializable { + resp, err := p.cache.Get(r) + switch err { + case nil: + cacheHits.Inc() + return resp, nil + case cache.ErrCompacted: + cacheHits.Inc() + return nil, err + } + } + cachedMisses.Inc() + + resp, err := p.kv.Do(ctx, RangeRequestToOp(r)) + if err != nil { + return nil, err + } + + // cache linearizable as serializable + req := *r + req.Serializable = true + gresp := (*pb.RangeResponse)(resp.Get()) + p.cache.Add(&req, gresp) + cacheKeys.Set(float64(p.cache.Size())) + + return gresp, nil +} + +func (p *kvProxy) Put(ctx context.Context, r *pb.PutRequest) (*pb.PutResponse, error) { + p.cache.Invalidate(r.Key, nil) + cacheKeys.Set(float64(p.cache.Size())) + + resp, err := p.kv.Do(ctx, PutRequestToOp(r)) + return (*pb.PutResponse)(resp.Put()), err +} + +func (p *kvProxy) DeleteRange(ctx context.Context, r *pb.DeleteRangeRequest) (*pb.DeleteRangeResponse, error) { + p.cache.Invalidate(r.Key, r.RangeEnd) + cacheKeys.Set(float64(p.cache.Size())) + + resp, err := p.kv.Do(ctx, DelRequestToOp(r)) + return (*pb.DeleteRangeResponse)(resp.Del()), err +} + +func (p *kvProxy) txnToCache(reqs []*pb.RequestOp, resps []*pb.ResponseOp) { + for i := range resps { + switch tv := resps[i].Response.(type) { + case *pb.ResponseOp_ResponsePut: + p.cache.Invalidate(reqs[i].GetRequestPut().Key, nil) + case *pb.ResponseOp_ResponseDeleteRange: + rdr := reqs[i].GetRequestDeleteRange() + p.cache.Invalidate(rdr.Key, rdr.RangeEnd) + case *pb.ResponseOp_ResponseRange: + req := *(reqs[i].GetRequestRange()) + req.Serializable = true + p.cache.Add(&req, tv.ResponseRange) + } + } +} + +func (p *kvProxy) Txn(ctx context.Context, r *pb.TxnRequest) (*pb.TxnResponse, error) { + txn := p.kv.Txn(ctx) + cmps := make([]clientv3.Cmp, len(r.Compare)) + thenops := make([]clientv3.Op, len(r.Success)) + elseops := make([]clientv3.Op, len(r.Failure)) + + for i := range r.Compare { + cmps[i] = (clientv3.Cmp)(*r.Compare[i]) + } + + for i := range r.Success { + thenops[i] = requestOpToOp(r.Success[i]) + } + + for i := range r.Failure { + elseops[i] = requestOpToOp(r.Failure[i]) + } + + resp, err := txn.If(cmps...).Then(thenops...).Else(elseops...).Commit() + + if err != nil { + return nil, err + } + // txn may claim an outdated key is updated; be safe and invalidate + for _, cmp := range r.Compare { + p.cache.Invalidate(cmp.Key, nil) + } + // update any fetched keys + if resp.Succeeded { + p.txnToCache(r.Success, resp.Responses) + } else { + p.txnToCache(r.Failure, resp.Responses) + } + + cacheKeys.Set(float64(p.cache.Size())) + + return (*pb.TxnResponse)(resp), nil +} + +func (p *kvProxy) Compact(ctx context.Context, r *pb.CompactionRequest) (*pb.CompactionResponse, error) { + var opts []clientv3.CompactOption + if r.Physical { + opts = append(opts, clientv3.WithCompactPhysical()) + } + + resp, err := p.kv.Compact(ctx, r.Revision, opts...) + if err == nil { + p.cache.Compact(r.Revision) + } + + cacheKeys.Set(float64(p.cache.Size())) + + return (*pb.CompactionResponse)(resp), err +} + +func requestOpToOp(union *pb.RequestOp) clientv3.Op { + switch tv := union.Request.(type) { + case *pb.RequestOp_RequestRange: + if tv.RequestRange != nil { + return RangeRequestToOp(tv.RequestRange) + } + case *pb.RequestOp_RequestPut: + if tv.RequestPut != nil { + return PutRequestToOp(tv.RequestPut) + } + case *pb.RequestOp_RequestDeleteRange: + if tv.RequestDeleteRange != nil { + return DelRequestToOp(tv.RequestDeleteRange) + } + } + panic("unknown request") +} + +func RangeRequestToOp(r *pb.RangeRequest) clientv3.Op { + opts := []clientv3.OpOption{} + if len(r.RangeEnd) != 0 { + opts = append(opts, clientv3.WithRange(string(r.RangeEnd))) + } + opts = append(opts, clientv3.WithRev(r.Revision)) + opts = append(opts, clientv3.WithLimit(r.Limit)) + opts = append(opts, clientv3.WithSort( + clientv3.SortTarget(r.SortTarget), + clientv3.SortOrder(r.SortOrder)), + ) + opts = append(opts, clientv3.WithMaxCreateRev(r.MaxCreateRevision)) + opts = append(opts, clientv3.WithMinCreateRev(r.MinCreateRevision)) + opts = append(opts, clientv3.WithMaxModRev(r.MaxModRevision)) + opts = append(opts, clientv3.WithMinModRev(r.MinModRevision)) + if r.CountOnly { + opts = append(opts, clientv3.WithCountOnly()) + } + if r.KeysOnly { + opts = append(opts, clientv3.WithKeysOnly()) + } + if r.Serializable { + opts = append(opts, clientv3.WithSerializable()) + } + + return clientv3.OpGet(string(r.Key), opts...) +} + +func PutRequestToOp(r *pb.PutRequest) clientv3.Op { + opts := []clientv3.OpOption{} + opts = append(opts, clientv3.WithLease(clientv3.LeaseID(r.Lease))) + if r.IgnoreValue { + opts = append(opts, clientv3.WithIgnoreValue()) + } + if r.IgnoreLease { + opts = append(opts, clientv3.WithIgnoreLease()) + } + if r.PrevKv { + opts = append(opts, clientv3.WithPrevKV()) + } + return clientv3.OpPut(string(r.Key), string(r.Value), opts...) +} + +func DelRequestToOp(r *pb.DeleteRangeRequest) clientv3.Op { + opts := []clientv3.OpOption{} + if len(r.RangeEnd) != 0 { + opts = append(opts, clientv3.WithRange(string(r.RangeEnd))) + } + if r.PrevKv { + opts = append(opts, clientv3.WithPrevKV()) + } + return clientv3.OpDelete(string(r.Key), opts...) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/leader.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/leader.go new file mode 100644 index 000000000..86afdb707 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/leader.go @@ -0,0 +1,114 @@ +// Copyright 2017 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. + +package grpcproxy + +import ( + "math" + "sync" + + "golang.org/x/net/context" + "golang.org/x/time/rate" + "google.golang.org/grpc" + + "github.com/coreos/etcd/clientv3" +) + +const ( + lostLeaderKey = "__lostleader" // watched to detect leader loss + retryPerSecond = 10 +) + +type leader struct { + ctx context.Context + w clientv3.Watcher + // mu protects leaderc updates. + mu sync.RWMutex + leaderc chan struct{} + disconnc chan struct{} + donec chan struct{} +} + +func newLeader(ctx context.Context, w clientv3.Watcher) *leader { + l := &leader{ + ctx: clientv3.WithRequireLeader(ctx), + w: w, + leaderc: make(chan struct{}), + disconnc: make(chan struct{}), + donec: make(chan struct{}), + } + // begin assuming leader is lost + close(l.leaderc) + go l.recvLoop() + return l +} + +func (l *leader) recvLoop() { + defer close(l.donec) + + limiter := rate.NewLimiter(rate.Limit(retryPerSecond), retryPerSecond) + rev := int64(math.MaxInt64 - 2) + for limiter.Wait(l.ctx) == nil { + wch := l.w.Watch(l.ctx, lostLeaderKey, clientv3.WithRev(rev), clientv3.WithCreatedNotify()) + cresp, ok := <-wch + if !ok { + l.loseLeader() + continue + } + if cresp.Err() != nil { + l.loseLeader() + if grpc.ErrorDesc(cresp.Err()) == grpc.ErrClientConnClosing.Error() { + close(l.disconnc) + return + } + continue + } + l.gotLeader() + <-wch + l.loseLeader() + } +} + +func (l *leader) loseLeader() { + l.mu.RLock() + defer l.mu.RUnlock() + select { + case <-l.leaderc: + default: + close(l.leaderc) + } +} + +// gotLeader will force update the leadership status to having a leader. +func (l *leader) gotLeader() { + l.mu.Lock() + defer l.mu.Unlock() + select { + case <-l.leaderc: + l.leaderc = make(chan struct{}) + default: + } +} + +func (l *leader) disconnectNotify() <-chan struct{} { return l.disconnc } + +func (l *leader) stopNotify() <-chan struct{} { return l.donec } + +// lostNotify returns a channel that is closed if there has been +// a leader loss not yet followed by a leader reacquire. +func (l *leader) lostNotify() <-chan struct{} { + l.mu.RLock() + defer l.mu.RUnlock() + return l.leaderc +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/lease.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/lease.go new file mode 100644 index 000000000..19c2249a7 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/lease.go @@ -0,0 +1,367 @@ +// 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. + +package grpcproxy + +import ( + "io" + "sync" + "sync/atomic" + "time" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +type leaseProxy struct { + // leaseClient handles req from LeaseGrant() that requires a lease ID. + leaseClient pb.LeaseClient + + lessor clientv3.Lease + + ctx context.Context + + leader *leader + + // mu protects adding outstanding leaseProxyStream through wg. + mu sync.RWMutex + + // wg waits until all outstanding leaseProxyStream quit. + wg sync.WaitGroup +} + +func NewLeaseProxy(c *clientv3.Client) (pb.LeaseServer, <-chan struct{}) { + cctx, cancel := context.WithCancel(c.Ctx()) + lp := &leaseProxy{ + leaseClient: pb.NewLeaseClient(c.ActiveConnection()), + lessor: c.Lease, + ctx: cctx, + leader: newLeader(c.Ctx(), c.Watcher), + } + ch := make(chan struct{}) + go func() { + defer close(ch) + <-lp.leader.stopNotify() + lp.mu.Lock() + select { + case <-lp.ctx.Done(): + case <-lp.leader.disconnectNotify(): + cancel() + } + <-lp.ctx.Done() + lp.mu.Unlock() + lp.wg.Wait() + }() + return lp, ch +} + +func (lp *leaseProxy) LeaseGrant(ctx context.Context, cr *pb.LeaseGrantRequest) (*pb.LeaseGrantResponse, error) { + rp, err := lp.leaseClient.LeaseGrant(ctx, cr) + if err != nil { + return nil, err + } + lp.leader.gotLeader() + return rp, nil +} + +func (lp *leaseProxy) LeaseRevoke(ctx context.Context, rr *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error) { + r, err := lp.lessor.Revoke(ctx, clientv3.LeaseID(rr.ID)) + if err != nil { + return nil, err + } + lp.leader.gotLeader() + return (*pb.LeaseRevokeResponse)(r), nil +} + +func (lp *leaseProxy) LeaseTimeToLive(ctx context.Context, rr *pb.LeaseTimeToLiveRequest) (*pb.LeaseTimeToLiveResponse, error) { + var ( + r *clientv3.LeaseTimeToLiveResponse + err error + ) + if rr.Keys { + r, err = lp.lessor.TimeToLive(ctx, clientv3.LeaseID(rr.ID), clientv3.WithAttachedKeys()) + } else { + r, err = lp.lessor.TimeToLive(ctx, clientv3.LeaseID(rr.ID)) + } + if err != nil { + return nil, err + } + rp := &pb.LeaseTimeToLiveResponse{ + Header: r.ResponseHeader, + ID: int64(r.ID), + TTL: r.TTL, + GrantedTTL: r.GrantedTTL, + Keys: r.Keys, + } + return rp, err +} + +func (lp *leaseProxy) LeaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) error { + lp.mu.Lock() + select { + case <-lp.ctx.Done(): + lp.mu.Unlock() + return lp.ctx.Err() + default: + lp.wg.Add(1) + } + lp.mu.Unlock() + + ctx, cancel := context.WithCancel(stream.Context()) + lps := leaseProxyStream{ + stream: stream, + lessor: lp.lessor, + keepAliveLeases: make(map[int64]*atomicCounter), + respc: make(chan *pb.LeaseKeepAliveResponse), + ctx: ctx, + cancel: cancel, + } + + errc := make(chan error, 2) + + var lostLeaderC <-chan struct{} + if md, ok := metadata.FromOutgoingContext(stream.Context()); ok { + v := md[rpctypes.MetadataRequireLeaderKey] + if len(v) > 0 && v[0] == rpctypes.MetadataHasLeader { + lostLeaderC = lp.leader.lostNotify() + // if leader is known to be lost at creation time, avoid + // letting events through at all + select { + case <-lostLeaderC: + lp.wg.Done() + return rpctypes.ErrNoLeader + default: + } + } + } + stopc := make(chan struct{}, 3) + go func() { + defer func() { stopc <- struct{}{} }() + if err := lps.recvLoop(); err != nil { + errc <- err + } + }() + + go func() { + defer func() { stopc <- struct{}{} }() + if err := lps.sendLoop(); err != nil { + errc <- err + } + }() + + // tears down LeaseKeepAlive stream if leader goes down or entire leaseProxy is terminated. + go func() { + defer func() { stopc <- struct{}{} }() + select { + case <-lostLeaderC: + case <-ctx.Done(): + case <-lp.ctx.Done(): + } + }() + + var err error + select { + case <-stopc: + stopc <- struct{}{} + case err = <-errc: + } + cancel() + + // recv/send may only shutdown after function exits; + // this goroutine notifies lease proxy that the stream is through + go func() { + <-stopc + <-stopc + <-stopc + lps.close() + close(errc) + lp.wg.Done() + }() + + select { + case <-lostLeaderC: + return rpctypes.ErrNoLeader + case <-lp.leader.disconnectNotify(): + return grpc.ErrClientConnClosing + default: + if err != nil { + return err + } + return ctx.Err() + } +} + +type leaseProxyStream struct { + stream pb.Lease_LeaseKeepAliveServer + + lessor clientv3.Lease + // wg tracks keepAliveLoop goroutines + wg sync.WaitGroup + // mu protects keepAliveLeases + mu sync.RWMutex + // keepAliveLeases tracks how many outstanding keepalive requests which need responses are on a lease. + keepAliveLeases map[int64]*atomicCounter + // respc receives lease keepalive responses from etcd backend + respc chan *pb.LeaseKeepAliveResponse + + ctx context.Context + cancel context.CancelFunc +} + +func (lps *leaseProxyStream) recvLoop() error { + for { + rr, err := lps.stream.Recv() + if err == io.EOF { + return nil + } + if err != nil { + return err + } + lps.mu.Lock() + neededResps, ok := lps.keepAliveLeases[rr.ID] + if !ok { + neededResps = &atomicCounter{} + lps.keepAliveLeases[rr.ID] = neededResps + lps.wg.Add(1) + go func() { + defer lps.wg.Done() + if err := lps.keepAliveLoop(rr.ID, neededResps); err != nil { + lps.cancel() + } + }() + } + neededResps.add(1) + lps.mu.Unlock() + } +} + +func (lps *leaseProxyStream) keepAliveLoop(leaseID int64, neededResps *atomicCounter) error { + cctx, ccancel := context.WithCancel(lps.ctx) + defer ccancel() + respc, err := lps.lessor.KeepAlive(cctx, clientv3.LeaseID(leaseID)) + if err != nil { + return err + } + // ticker expires when loop hasn't received keepalive within TTL + var ticker <-chan time.Time + for { + select { + case <-ticker: + lps.mu.Lock() + // if there are outstanding keepAlive reqs at the moment of ticker firing, + // don't close keepAliveLoop(), let it continuing to process the KeepAlive reqs. + if neededResps.get() > 0 { + lps.mu.Unlock() + ticker = nil + continue + } + delete(lps.keepAliveLeases, leaseID) + lps.mu.Unlock() + return nil + case rp, ok := <-respc: + if !ok { + lps.mu.Lock() + delete(lps.keepAliveLeases, leaseID) + lps.mu.Unlock() + if neededResps.get() == 0 { + return nil + } + ttlResp, err := lps.lessor.TimeToLive(cctx, clientv3.LeaseID(leaseID)) + if err != nil { + return err + } + r := &pb.LeaseKeepAliveResponse{ + Header: ttlResp.ResponseHeader, + ID: int64(ttlResp.ID), + TTL: ttlResp.TTL, + } + for neededResps.get() > 0 { + select { + case lps.respc <- r: + neededResps.add(-1) + case <-lps.ctx.Done(): + return nil + } + } + return nil + } + if neededResps.get() == 0 { + continue + } + ticker = time.After(time.Duration(rp.TTL) * time.Second) + r := &pb.LeaseKeepAliveResponse{ + Header: rp.ResponseHeader, + ID: int64(rp.ID), + TTL: rp.TTL, + } + lps.replyToClient(r, neededResps) + } + } +} + +func (lps *leaseProxyStream) replyToClient(r *pb.LeaseKeepAliveResponse, neededResps *atomicCounter) { + timer := time.After(500 * time.Millisecond) + for neededResps.get() > 0 { + select { + case lps.respc <- r: + neededResps.add(-1) + case <-timer: + return + case <-lps.ctx.Done(): + return + } + } +} + +func (lps *leaseProxyStream) sendLoop() error { + for { + select { + case lrp, ok := <-lps.respc: + if !ok { + return nil + } + if err := lps.stream.Send(lrp); err != nil { + return err + } + case <-lps.ctx.Done(): + return lps.ctx.Err() + } + } +} + +func (lps *leaseProxyStream) close() { + lps.cancel() + lps.wg.Wait() + // only close respc channel if all the keepAliveLoop() goroutines have finished + // this ensures those goroutines don't send resp to a closed resp channel + close(lps.respc) +} + +type atomicCounter struct { + counter int64 +} + +func (ac *atomicCounter) add(delta int64) { + atomic.AddInt64(&ac.counter, delta) +} + +func (ac *atomicCounter) get() int64 { + return atomic.LoadInt64(&ac.counter) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/lock.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/lock.go new file mode 100644 index 000000000..804aff64a --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/lock.go @@ -0,0 +1,38 @@ +// Copyright 2017 The etcd Lockors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 grpcproxy + +import ( + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb" +) + +type lockProxy struct { + client *clientv3.Client +} + +func NewLockProxy(client *clientv3.Client) v3lockpb.LockServer { + return &lockProxy{client: client} +} + +func (lp *lockProxy) Lock(ctx context.Context, req *v3lockpb.LockRequest) (*v3lockpb.LockResponse, error) { + return v3lockpb.NewLockClient(lp.client.ActiveConnection()).Lock(ctx, req) +} + +func (lp *lockProxy) Unlock(ctx context.Context, req *v3lockpb.UnlockRequest) (*v3lockpb.UnlockResponse, error) { + return v3lockpb.NewLockClient(lp.client.ActiveConnection()).Unlock(ctx, req) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/logger.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/logger.go new file mode 100644 index 000000000..c2d818043 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/logger.go @@ -0,0 +1,19 @@ +// Copyright 2017 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. + +package grpcproxy + +import "github.com/coreos/pkg/capnslog" + +var plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "grpcproxy") diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go new file mode 100644 index 000000000..384d15203 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go @@ -0,0 +1,79 @@ +// 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. + +package grpcproxy + +import ( + "io" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +type maintenanceProxy struct { + client *clientv3.Client +} + +func NewMaintenanceProxy(c *clientv3.Client) pb.MaintenanceServer { + return &maintenanceProxy{ + client: c, + } +} + +func (mp *maintenanceProxy) Defragment(ctx context.Context, dr *pb.DefragmentRequest) (*pb.DefragmentResponse, error) { + conn := mp.client.ActiveConnection() + return pb.NewMaintenanceClient(conn).Defragment(ctx, dr) +} + +func (mp *maintenanceProxy) Snapshot(sr *pb.SnapshotRequest, stream pb.Maintenance_SnapshotServer) error { + conn := mp.client.ActiveConnection() + ctx, cancel := context.WithCancel(stream.Context()) + defer cancel() + + sc, err := pb.NewMaintenanceClient(conn).Snapshot(ctx, sr) + if err != nil { + return err + } + + for { + rr, err := sc.Recv() + if err != nil { + if err == io.EOF { + return nil + } + return err + } + err = stream.Send(rr) + if err != nil { + return err + } + } +} + +func (mp *maintenanceProxy) Hash(ctx context.Context, r *pb.HashRequest) (*pb.HashResponse, error) { + conn := mp.client.ActiveConnection() + return pb.NewMaintenanceClient(conn).Hash(ctx, r) +} + +func (mp *maintenanceProxy) Alarm(ctx context.Context, r *pb.AlarmRequest) (*pb.AlarmResponse, error) { + conn := mp.client.ActiveConnection() + return pb.NewMaintenanceClient(conn).Alarm(ctx, r) +} + +func (mp *maintenanceProxy) Status(ctx context.Context, r *pb.StatusRequest) (*pb.StatusResponse, error) { + conn := mp.client.ActiveConnection() + return pb.NewMaintenanceClient(conn).Status(ctx, r) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/metrics.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/metrics.go new file mode 100644 index 000000000..864fa1609 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/metrics.go @@ -0,0 +1,58 @@ +// 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. + +package grpcproxy + +import "github.com/prometheus/client_golang/prometheus" + +var ( + watchersCoalescing = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "grpc_proxy", + Name: "watchers_coalescing_total", + Help: "Total number of current watchers coalescing", + }) + eventsCoalescing = prometheus.NewCounter(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "grpc_proxy", + Name: "events_coalescing_total", + Help: "Total number of events coalescing", + }) + cacheKeys = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "grpc_proxy", + Name: "cache_keys_total", + Help: "Total number of keys/ranges cached", + }) + cacheHits = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "grpc_proxy", + Name: "cache_hits_total", + Help: "Total number of cache hits", + }) + cachedMisses = prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "etcd", + Subsystem: "grpc_proxy", + Name: "cache_misses_total", + Help: "Total number of cache misses", + }) +) + +func init() { + prometheus.MustRegister(watchersCoalescing) + prometheus.MustRegister(eventsCoalescing) + prometheus.MustRegister(cacheKeys) + prometheus.MustRegister(cacheHits) + prometheus.MustRegister(cachedMisses) +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/register.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/register.go new file mode 100644 index 000000000..598c71f07 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/register.go @@ -0,0 +1,94 @@ +// Copyright 2017 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. + +package grpcproxy + +import ( + "encoding/json" + "os" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/clientv3/concurrency" + "github.com/coreos/etcd/clientv3/naming" + + "golang.org/x/time/rate" + gnaming "google.golang.org/grpc/naming" +) + +// allow maximum 1 retry per second +const registerRetryRate = 1 + +// Register registers itself as a grpc-proxy server by writing prefixed-key +// with session of specified TTL (in seconds). The returned channel is closed +// when the client's context is canceled. +func Register(c *clientv3.Client, prefix string, addr string, ttl int) <-chan struct{} { + rm := rate.NewLimiter(rate.Limit(registerRetryRate), registerRetryRate) + + donec := make(chan struct{}) + go func() { + defer close(donec) + + for rm.Wait(c.Ctx()) == nil { + ss, err := registerSession(c, prefix, addr, ttl) + if err != nil { + plog.Warningf("failed to create a session %v", err) + continue + } + select { + case <-c.Ctx().Done(): + ss.Close() + return + + case <-ss.Done(): + plog.Warning("session expired; possible network partition or server restart") + plog.Warning("creating a new session to rejoin") + continue + } + } + }() + + return donec +} + +func registerSession(c *clientv3.Client, prefix string, addr string, ttl int) (*concurrency.Session, error) { + ss, err := concurrency.NewSession(c, concurrency.WithTTL(ttl)) + if err != nil { + return nil, err + } + + gr := &naming.GRPCResolver{Client: c} + if err = gr.Update(c.Ctx(), prefix, gnaming.Update{Op: gnaming.Add, Addr: addr, Metadata: getMeta()}, clientv3.WithLease(ss.Lease())); err != nil { + return nil, err + } + + plog.Infof("registered %q with %d-second lease", addr, ttl) + return ss, nil +} + +// meta represents metadata of proxy register. +type meta struct { + Name string `json:"name"` +} + +func getMeta() string { + hostname, _ := os.Hostname() + bts, _ := json.Marshal(meta{Name: hostname}) + return string(bts) +} + +func decodeMeta(s string) (meta, error) { + m := meta{} + err := json.Unmarshal([]byte(s), &m) + return m, err +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/watch.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch.go new file mode 100644 index 000000000..b960c9476 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch.go @@ -0,0 +1,262 @@ +// 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. + +package grpcproxy + +import ( + "sync" + + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver/api/v3rpc" + "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +type watchProxy struct { + cw clientv3.Watcher + ctx context.Context + + leader *leader + + ranges *watchRanges + + // mu protects adding outstanding watch servers through wg. + mu sync.Mutex + + // wg waits until all outstanding watch servers quit. + wg sync.WaitGroup +} + +func NewWatchProxy(c *clientv3.Client) (pb.WatchServer, <-chan struct{}) { + cctx, cancel := context.WithCancel(c.Ctx()) + wp := &watchProxy{ + cw: c.Watcher, + ctx: cctx, + leader: newLeader(c.Ctx(), c.Watcher), + } + wp.ranges = newWatchRanges(wp) + ch := make(chan struct{}) + go func() { + defer close(ch) + <-wp.leader.stopNotify() + wp.mu.Lock() + select { + case <-wp.ctx.Done(): + case <-wp.leader.disconnectNotify(): + cancel() + } + <-wp.ctx.Done() + wp.mu.Unlock() + wp.wg.Wait() + wp.ranges.stop() + }() + return wp, ch +} + +func (wp *watchProxy) Watch(stream pb.Watch_WatchServer) (err error) { + wp.mu.Lock() + select { + case <-wp.ctx.Done(): + wp.mu.Unlock() + select { + case <-wp.leader.disconnectNotify(): + return grpc.ErrClientConnClosing + default: + return wp.ctx.Err() + } + default: + wp.wg.Add(1) + } + wp.mu.Unlock() + + ctx, cancel := context.WithCancel(stream.Context()) + wps := &watchProxyStream{ + ranges: wp.ranges, + watchers: make(map[int64]*watcher), + stream: stream, + watchCh: make(chan *pb.WatchResponse, 1024), + ctx: ctx, + cancel: cancel, + } + + var lostLeaderC <-chan struct{} + if md, ok := metadata.FromOutgoingContext(stream.Context()); ok { + v := md[rpctypes.MetadataRequireLeaderKey] + if len(v) > 0 && v[0] == rpctypes.MetadataHasLeader { + lostLeaderC = wp.leader.lostNotify() + // if leader is known to be lost at creation time, avoid + // letting events through at all + select { + case <-lostLeaderC: + wp.wg.Done() + return rpctypes.ErrNoLeader + default: + } + } + } + + // post to stopc => terminate server stream; can't use a waitgroup + // since all goroutines will only terminate after Watch() exits. + stopc := make(chan struct{}, 3) + go func() { + defer func() { stopc <- struct{}{} }() + wps.recvLoop() + }() + go func() { + defer func() { stopc <- struct{}{} }() + wps.sendLoop() + }() + // tear down watch if leader goes down or entire watch proxy is terminated + go func() { + defer func() { stopc <- struct{}{} }() + select { + case <-lostLeaderC: + case <-ctx.Done(): + case <-wp.ctx.Done(): + } + }() + + <-stopc + cancel() + + // recv/send may only shutdown after function exits; + // goroutine notifies proxy that stream is through + go func() { + <-stopc + <-stopc + wps.close() + wp.wg.Done() + }() + + select { + case <-lostLeaderC: + return rpctypes.ErrNoLeader + case <-wp.leader.disconnectNotify(): + return grpc.ErrClientConnClosing + default: + return wps.ctx.Err() + } +} + +// watchProxyStream forwards etcd watch events to a proxied client stream. +type watchProxyStream struct { + ranges *watchRanges + + // mu protects watchers and nextWatcherID + mu sync.Mutex + // watchers receive events from watch broadcast. + watchers map[int64]*watcher + // nextWatcherID is the id to assign the next watcher on this stream. + nextWatcherID int64 + + stream pb.Watch_WatchServer + + // watchCh receives watch responses from the watchers. + watchCh chan *pb.WatchResponse + + ctx context.Context + cancel context.CancelFunc +} + +func (wps *watchProxyStream) close() { + var wg sync.WaitGroup + wps.cancel() + wps.mu.Lock() + wg.Add(len(wps.watchers)) + for _, wpsw := range wps.watchers { + go func(w *watcher) { + wps.ranges.delete(w) + wg.Done() + }(wpsw) + } + wps.watchers = nil + wps.mu.Unlock() + + wg.Wait() + + close(wps.watchCh) +} + +func (wps *watchProxyStream) recvLoop() error { + for { + req, err := wps.stream.Recv() + if err != nil { + return err + } + switch uv := req.RequestUnion.(type) { + case *pb.WatchRequest_CreateRequest: + cr := uv.CreateRequest + w := &watcher{ + wr: watchRange{string(cr.Key), string(cr.RangeEnd)}, + id: wps.nextWatcherID, + wps: wps, + + nextrev: cr.StartRevision, + progress: cr.ProgressNotify, + prevKV: cr.PrevKv, + filters: v3rpc.FiltersFromRequest(cr), + } + if !w.wr.valid() { + w.post(&pb.WatchResponse{WatchId: -1, Created: true, Canceled: true}) + continue + } + wps.nextWatcherID++ + w.nextrev = cr.StartRevision + wps.watchers[w.id] = w + wps.ranges.add(w) + case *pb.WatchRequest_CancelRequest: + wps.delete(uv.CancelRequest.WatchId) + default: + panic("not implemented") + } + } +} + +func (wps *watchProxyStream) sendLoop() { + for { + select { + case wresp, ok := <-wps.watchCh: + if !ok { + return + } + if err := wps.stream.Send(wresp); err != nil { + return + } + case <-wps.ctx.Done(): + return + } + } +} + +func (wps *watchProxyStream) delete(id int64) { + wps.mu.Lock() + defer wps.mu.Unlock() + + w, ok := wps.watchers[id] + if !ok { + return + } + wps.ranges.delete(w) + delete(wps.watchers, id) + resp := &pb.WatchResponse{ + Header: &w.lastHeader, + WatchId: id, + Canceled: true, + } + wps.watchCh <- resp +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go new file mode 100644 index 000000000..5e750bdb0 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go @@ -0,0 +1,151 @@ +// 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. + +package grpcproxy + +import ( + "sync" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" +) + +// watchBroadcast broadcasts a server watcher to many client watchers. +type watchBroadcast struct { + // cancel stops the underlying etcd server watcher and closes ch. + cancel context.CancelFunc + donec chan struct{} + + // mu protects rev and receivers. + mu sync.RWMutex + // nextrev is the minimum expected next revision of the watcher on ch. + nextrev int64 + // receivers contains all the client-side watchers to serve. + receivers map[*watcher]struct{} + // responses counts the number of responses + responses int +} + +func newWatchBroadcast(wp *watchProxy, w *watcher, update func(*watchBroadcast)) *watchBroadcast { + cctx, cancel := context.WithCancel(wp.ctx) + wb := &watchBroadcast{ + cancel: cancel, + nextrev: w.nextrev, + receivers: make(map[*watcher]struct{}), + donec: make(chan struct{}), + } + wb.add(w) + go func() { + defer close(wb.donec) + + opts := []clientv3.OpOption{ + clientv3.WithRange(w.wr.end), + clientv3.WithProgressNotify(), + clientv3.WithRev(wb.nextrev), + clientv3.WithPrevKV(), + clientv3.WithCreatedNotify(), + } + + wch := wp.cw.Watch(cctx, w.wr.key, opts...) + + for wr := range wch { + wb.bcast(wr) + update(wb) + } + }() + return wb +} + +func (wb *watchBroadcast) bcast(wr clientv3.WatchResponse) { + wb.mu.Lock() + defer wb.mu.Unlock() + // watchers start on the given revision, if any; ignore header rev on create + if wb.responses > 0 || wb.nextrev == 0 { + wb.nextrev = wr.Header.Revision + 1 + } + wb.responses++ + for r := range wb.receivers { + r.send(wr) + } + if len(wb.receivers) > 0 { + eventsCoalescing.Add(float64(len(wb.receivers) - 1)) + } +} + +// add puts a watcher into receiving a broadcast if its revision at least +// meets the broadcast revision. Returns true if added. +func (wb *watchBroadcast) add(w *watcher) bool { + wb.mu.Lock() + defer wb.mu.Unlock() + if wb.nextrev > w.nextrev || (wb.nextrev == 0 && w.nextrev != 0) { + // wb is too far ahead, w will miss events + // or wb is being established with a current watcher + return false + } + if wb.responses == 0 { + // Newly created; create event will be sent by etcd. + wb.receivers[w] = struct{}{} + return true + } + // already sent by etcd; emulate create event + ok := w.post(&pb.WatchResponse{ + Header: &pb.ResponseHeader{ + // todo: fill in ClusterId + // todo: fill in MemberId: + Revision: w.nextrev, + // todo: fill in RaftTerm: + }, + WatchId: w.id, + Created: true, + }) + if !ok { + return false + } + wb.receivers[w] = struct{}{} + watchersCoalescing.Inc() + + return true +} +func (wb *watchBroadcast) delete(w *watcher) { + wb.mu.Lock() + defer wb.mu.Unlock() + if _, ok := wb.receivers[w]; !ok { + panic("deleting missing watcher from broadcast") + } + delete(wb.receivers, w) + if len(wb.receivers) > 0 { + // do not dec the only left watcher for coalescing. + watchersCoalescing.Dec() + } +} + +func (wb *watchBroadcast) size() int { + wb.mu.RLock() + defer wb.mu.RUnlock() + return len(wb.receivers) +} + +func (wb *watchBroadcast) empty() bool { return wb.size() == 0 } + +func (wb *watchBroadcast) stop() { + if !wb.empty() { + // do not dec the only left watcher for coalescing. + watchersCoalescing.Sub(float64(wb.size() - 1)) + } + + wb.cancel() + <-wb.donec +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcasts.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcasts.go new file mode 100644 index 000000000..8fe9e5f51 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcasts.go @@ -0,0 +1,135 @@ +// 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. + +package grpcproxy + +import ( + "sync" +) + +type watchBroadcasts struct { + wp *watchProxy + + // mu protects bcasts and watchers from the coalesce loop. + mu sync.Mutex + bcasts map[*watchBroadcast]struct{} + watchers map[*watcher]*watchBroadcast + + updatec chan *watchBroadcast + donec chan struct{} +} + +// maxCoalesceRecievers prevents a popular watchBroadcast from being coalseced. +const maxCoalesceReceivers = 5 + +func newWatchBroadcasts(wp *watchProxy) *watchBroadcasts { + wbs := &watchBroadcasts{ + wp: wp, + bcasts: make(map[*watchBroadcast]struct{}), + watchers: make(map[*watcher]*watchBroadcast), + updatec: make(chan *watchBroadcast, 1), + donec: make(chan struct{}), + } + go func() { + defer close(wbs.donec) + for wb := range wbs.updatec { + wbs.coalesce(wb) + } + }() + return wbs +} + +func (wbs *watchBroadcasts) coalesce(wb *watchBroadcast) { + if wb.size() >= maxCoalesceReceivers { + return + } + wbs.mu.Lock() + for wbswb := range wbs.bcasts { + if wbswb == wb { + continue + } + wb.mu.Lock() + wbswb.mu.Lock() + // 1. check if wbswb is behind wb so it won't skip any events in wb + // 2. ensure wbswb started; nextrev == 0 may mean wbswb is waiting + // for a current watcher and expects a create event from the server. + if wb.nextrev >= wbswb.nextrev && wbswb.responses > 0 { + for w := range wb.receivers { + wbswb.receivers[w] = struct{}{} + wbs.watchers[w] = wbswb + } + wb.receivers = nil + } + wbswb.mu.Unlock() + wb.mu.Unlock() + if wb.empty() { + delete(wbs.bcasts, wb) + wb.stop() + break + } + } + wbs.mu.Unlock() +} + +func (wbs *watchBroadcasts) add(w *watcher) { + wbs.mu.Lock() + defer wbs.mu.Unlock() + // find fitting bcast + for wb := range wbs.bcasts { + if wb.add(w) { + wbs.watchers[w] = wb + return + } + } + // no fit; create a bcast + wb := newWatchBroadcast(wbs.wp, w, wbs.update) + wbs.watchers[w] = wb + wbs.bcasts[wb] = struct{}{} +} + +// delete removes a watcher and returns the number of remaining watchers. +func (wbs *watchBroadcasts) delete(w *watcher) int { + wbs.mu.Lock() + defer wbs.mu.Unlock() + + wb, ok := wbs.watchers[w] + if !ok { + panic("deleting missing watcher from broadcasts") + } + delete(wbs.watchers, w) + wb.delete(w) + if wb.empty() { + delete(wbs.bcasts, wb) + wb.stop() + } + return len(wbs.bcasts) +} + +func (wbs *watchBroadcasts) stop() { + wbs.mu.Lock() + for wb := range wbs.bcasts { + wb.stop() + } + wbs.bcasts = nil + close(wbs.updatec) + wbs.mu.Unlock() + <-wbs.donec +} + +func (wbs *watchBroadcasts) update(wb *watchBroadcast) { + select { + case wbs.updatec <- wb: + default: + } +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_ranges.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_ranges.go new file mode 100644 index 000000000..31c6b5925 --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/watch_ranges.go @@ -0,0 +1,69 @@ +// 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. + +package grpcproxy + +import ( + "sync" +) + +// watchRanges tracks all open watches for the proxy. +type watchRanges struct { + wp *watchProxy + + mu sync.Mutex + bcasts map[watchRange]*watchBroadcasts +} + +func newWatchRanges(wp *watchProxy) *watchRanges { + return &watchRanges{ + wp: wp, + bcasts: make(map[watchRange]*watchBroadcasts), + } +} + +func (wrs *watchRanges) add(w *watcher) { + wrs.mu.Lock() + defer wrs.mu.Unlock() + + if wbs := wrs.bcasts[w.wr]; wbs != nil { + wbs.add(w) + return + } + wbs := newWatchBroadcasts(wrs.wp) + wrs.bcasts[w.wr] = wbs + wbs.add(w) +} + +func (wrs *watchRanges) delete(w *watcher) { + wrs.mu.Lock() + defer wrs.mu.Unlock() + wbs, ok := wrs.bcasts[w.wr] + if !ok { + panic("deleting missing range") + } + if wbs.delete(w) == 0 { + wbs.stop() + delete(wrs.bcasts, w.wr) + } +} + +func (wrs *watchRanges) stop() { + wrs.mu.Lock() + defer wrs.mu.Unlock() + for _, wb := range wrs.bcasts { + wb.stop() + } + wrs.bcasts = nil +} diff --git a/deps/github.com/coreos/etcd/proxy/grpcproxy/watcher.go b/deps/github.com/coreos/etcd/proxy/grpcproxy/watcher.go new file mode 100644 index 000000000..7387caf4d --- /dev/null +++ b/deps/github.com/coreos/etcd/proxy/grpcproxy/watcher.go @@ -0,0 +1,128 @@ +// 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. + +package grpcproxy + +import ( + "time" + + "github.com/coreos/etcd/clientv3" + pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + "github.com/coreos/etcd/mvcc" + "github.com/coreos/etcd/mvcc/mvccpb" +) + +type watchRange struct { + key, end string +} + +func (wr *watchRange) valid() bool { + return len(wr.end) == 0 || wr.end > wr.key || (wr.end[0] == 0 && len(wr.end) == 1) +} + +type watcher struct { + // user configuration + + wr watchRange + filters []mvcc.FilterFunc + progress bool + prevKV bool + + // id is the id returned to the client on its watch stream. + id int64 + // nextrev is the minimum expected next event revision. + nextrev int64 + // lastHeader has the last header sent over the stream. + lastHeader pb.ResponseHeader + + // wps is the parent. + wps *watchProxyStream +} + +// send filters out repeated events by discarding revisions older +// than the last one sent over the watch channel. +func (w *watcher) send(wr clientv3.WatchResponse) { + if wr.IsProgressNotify() && !w.progress { + return + } + if w.nextrev > wr.Header.Revision && len(wr.Events) > 0 { + return + } + if w.nextrev == 0 { + // current watch; expect updates following this revision + w.nextrev = wr.Header.Revision + 1 + } + + events := make([]*mvccpb.Event, 0, len(wr.Events)) + + var lastRev int64 + for i := range wr.Events { + ev := (*mvccpb.Event)(wr.Events[i]) + if ev.Kv.ModRevision < w.nextrev { + continue + } else { + // We cannot update w.rev here. + // txn can have multiple events with the same rev. + // If w.nextrev updates here, it would skip events in the same txn. + lastRev = ev.Kv.ModRevision + } + + filtered := false + for _, filter := range w.filters { + if filter(*ev) { + filtered = true + break + } + } + if filtered { + continue + } + + if !w.prevKV { + evCopy := *ev + evCopy.PrevKv = nil + ev = &evCopy + } + events = append(events, ev) + } + + if lastRev >= w.nextrev { + w.nextrev = lastRev + 1 + } + + // all events are filtered out? + if !wr.IsProgressNotify() && !wr.Created && len(events) == 0 && wr.CompactRevision == 0 { + return + } + + w.lastHeader = wr.Header + w.post(&pb.WatchResponse{ + Header: &wr.Header, + Created: wr.Created, + CompactRevision: wr.CompactRevision, + WatchId: w.id, + Events: events, + }) +} + +// post puts a watch response on the watcher's proxy stream channel +func (w *watcher) post(wr *pb.WatchResponse) bool { + select { + case w.wps.watchCh <- wr: + case <-time.After(50 * time.Millisecond): + w.wps.cancel() + return false + } + return true +} diff --git a/deps/github.com/coreos/etcd/raft/README.md b/deps/github.com/coreos/etcd/raft/README.md new file mode 100644 index 000000000..f485b8397 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/README.md @@ -0,0 +1,196 @@ +# Raft library + +Raft is a protocol with which a cluster of nodes can maintain a replicated state machine. +The state machine is kept in sync through the use of a replicated log. +For more details on Raft, see "In Search of an Understandable Consensus Algorithm" +(https://ramcloud.stanford.edu/raft.pdf) by Diego Ongaro and John Ousterhout. + +This Raft library is stable and feature complete. As of 2016, it is **the most widely used** Raft library in production, serving tens of thousands clusters each day. It powers distributed systems such as etcd, Kubernetes, Docker Swarm, Cloud Foundry Diego, CockroachDB, TiDB, Project Calico, Flannel, and more. + +Most Raft implementations have a monolithic design, including storage handling, messaging serialization, and network transport. This library instead follows a minimalistic design philosophy by only implementing the core raft algorithm. This minimalism buys flexibility, determinism, and performance. + +To keep the codebase small as well as provide flexibility, the library only implements the Raft algorithm; both network and disk IO are left to the user. Library users must implement their own transportation layer for message passing between Raft peers over the wire. Similarly, users must implement their own storage layer to persist the Raft log and state. + +In order to easily test the Raft library, its behavior should be deterministic. To achieve this determinism, the library models Raft as a state machine. The state machine takes a `Message` as input. A message can either be a local timer update or a network message sent from a remote peer. The state machine's output is a 3-tuple `{[]Messages, []LogEntries, NextState}` consisting of an array of `Messages`, `log entries`, and `Raft state changes`. For state machines with the same state, the same state machine input should always generate the same state machine output. + +A simple example application, _raftexample_, is also available to help illustrate how to use this package in practice: https://github.com/coreos/etcd/tree/master/contrib/raftexample + +# Features + +This raft implementation is a full feature implementation of Raft protocol. Features includes: + +- Leader election +- Log replication +- Log compaction +- Membership changes +- Leadership transfer extension +- Efficient linearizable read-only queries served by both the leader and followers + - leader checks with quorum and bypasses Raft log before processing read-only queries + - followers asks leader to get a safe read index before processing read-only queries +- More efficient lease-based linearizable read-only queries served by both the leader and followers + - leader bypasses Raft log and processing read-only queries locally + - followers asks leader to get a safe read index before processing read-only queries + - this approach relies on the clock of the all the machines in raft group + +This raft implementation also includes a few optional enhancements: + +- Optimistic pipelining to reduce log replication latency +- Flow control for log replication +- Batching Raft messages to reduce synchronized network I/O calls +- Batching log entries to reduce disk synchronized I/O +- Writing to leader's disk in parallel +- Internal proposal redirection from followers to leader +- Automatic stepping down when the leader loses quorum + +## Notable Users + +- [cockroachdb](https://github.com/cockroachdb/cockroach) A Scalable, Survivable, Strongly-Consistent SQL Database +- [dgraph](https://github.com/dgraph-io/dgraph) A Scalable, Distributed, Low Latency, High Throughput Graph Database +- [etcd](https://github.com/coreos/etcd) A distributed reliable key-value store +- [tikv](https://github.com/pingcap/tikv) A Distributed transactional key value database powered by Rust and Raft +- [swarmkit](https://github.com/docker/swarmkit) A toolkit for orchestrating distributed systems at any scale. +- [chain core](https://github.com/chain/chain) Software for operating permissioned, multi-asset blockchain networks + +## Usage + +The primary object in raft is a Node. Either start a Node from scratch using raft.StartNode or start a Node from some initial state using raft.RestartNode. + +To start a three-node cluster +```go + storage := raft.NewMemoryStorage() + c := &Config{ + ID: 0x01, + ElectionTick: 10, + HeartbeatTick: 1, + Storage: storage, + MaxSizePerMsg: 4096, + MaxInflightMsgs: 256, + } + // Set peer list to the other nodes in the cluster. + // Note that they need to be started separately as well. + n := raft.StartNode(c, []raft.Peer{{ID: 0x02}, {ID: 0x03}}) +``` + +Start a single node cluster, like so: +```go + // Create storage and config as shown above. + // Set peer list to itself, so this node can become the leader of this single-node cluster. + peers := []raft.Peer{{ID: 0x01}} + n := raft.StartNode(c, peers) +``` + +To allow a new node to join this cluster, do not pass in any peers. First, add the node to the existing cluster by calling `ProposeConfChange` on any existing node inside the cluster. Then, start the node with an empty peer list, like so: +```go + // Create storage and config as shown above. + n := raft.StartNode(c, nil) +``` + +To restart a node from previous state: +```go + storage := raft.NewMemoryStorage() + + // Recover the in-memory storage from persistent snapshot, state and entries. + storage.ApplySnapshot(snapshot) + storage.SetHardState(state) + storage.Append(entries) + + c := &Config{ + ID: 0x01, + ElectionTick: 10, + HeartbeatTick: 1, + Storage: storage, + MaxSizePerMsg: 4096, + MaxInflightMsgs: 256, + } + + // Restart raft without peer information. + // Peer information is already included in the storage. + n := raft.RestartNode(c) +``` + +After creating a Node, the user has a few responsibilities: + +First, read from the Node.Ready() channel and process the updates it contains. These steps may be performed in parallel, except as noted in step 2. + +1. Write HardState, Entries, and Snapshot to persistent storage if they are not empty. Note that when writing an Entry with Index i, any previously-persisted entries with Index >= i must be discarded. + +2. Send all Messages to the nodes named in the To field. It is important that no messages be sent until the latest HardState has been persisted to disk, and all Entries written by any previous Ready batch (Messages may be sent while entries from the same batch are being persisted). To reduce the I/O latency, an optimization can be applied to make leader write to disk in parallel with its followers (as explained at section 10.2.1 in Raft thesis). If any Message has type MsgSnap, call Node.ReportSnapshot() after it has been sent (these messages may be large). Note: Marshalling messages is not thread-safe; it is important to make sure that no new entries are persisted while marshalling. The easiest way to achieve this is to serialise the messages directly inside the main raft loop. + +3. Apply Snapshot (if any) and CommittedEntries to the state machine. If any committed Entry has Type EntryConfChange, call Node.ApplyConfChange() to apply it to the node. The configuration change may be cancelled at this point by setting the NodeID field to zero before calling ApplyConfChange (but ApplyConfChange must be called one way or the other, and the decision to cancel must be based solely on the state machine and not external information such as the observed health of the node). + +4. Call Node.Advance() to signal readiness for the next batch of updates. This may be done at any time after step 1, although all updates must be processed in the order they were returned by Ready. + +Second, all persisted log entries must be made available via an implementation of the Storage interface. The provided MemoryStorage type can be used for this (if repopulating its state upon a restart), or a custom disk-backed implementation can be supplied. + +Third, after receiving a message from another node, pass it to Node.Step: + +```go + func recvRaftRPC(ctx context.Context, m raftpb.Message) { + n.Step(ctx, m) + } +``` + +Finally, call `Node.Tick()` at regular intervals (probably via a `time.Ticker`). Raft has two important timeouts: heartbeat and the election timeout. However, internally to the raft package time is represented by an abstract "tick". + +The total state machine handling loop will look something like this: + +```go + for { + select { + case <-s.Ticker: + n.Tick() + case rd := <-s.Node.Ready(): + saveToStorage(rd.State, rd.Entries, rd.Snapshot) + send(rd.Messages) + if !raft.IsEmptySnap(rd.Snapshot) { + processSnapshot(rd.Snapshot) + } + for _, entry := range rd.CommittedEntries { + process(entry) + if entry.Type == raftpb.EntryConfChange { + var cc raftpb.ConfChange + cc.Unmarshal(entry.Data) + s.Node.ApplyConfChange(cc) + } + } + s.Node.Advance() + case <-s.done: + return + } + } +``` + +To propose changes to the state machine from the node to take application data, serialize it into a byte slice and call: + +```go + n.Propose(ctx, data) +``` + +If the proposal is committed, data will appear in committed entries with type raftpb.EntryNormal. There is no guarantee that a proposed command will be committed; the command may have to be reproposed after a timeout. + +To add or remove node in a cluster, build ConfChange struct 'cc' and call: + +```go + n.ProposeConfChange(ctx, cc) +``` + +After config change is committed, some committed entry with type raftpb.EntryConfChange will be returned. This must be applied to node through: + +```go + var cc raftpb.ConfChange + cc.Unmarshal(data) + n.ApplyConfChange(cc) +``` + +Note: An ID represents a unique node in a cluster for all time. A +given ID MUST be used only once even if the old node has been removed. +This means that for example IP addresses make poor node IDs since they +may be reused. Node IDs must be non-zero. + +## Implementation notes + +This implementation is up to date with the final Raft thesis (https://ramcloud.stanford.edu/~ongaro/thesis.pdf), although this implementation of the membership change protocol differs somewhat from that described in chapter 4. The key invariant that membership changes happen one node at a time is preserved, but in our implementation the membership change takes effect when its entry is applied, not when it is added to the log (so the entry is committed under the old membership instead of the new). This is equivalent in terms of safety, since the old and new configurations are guaranteed to overlap. + +To ensure there is no attempt to commit two membership changes at once by matching log positions (which would be unsafe since they should have different quorum requirements), any proposed membership change is simply disallowed while any uncommitted change appears in the leader's log. + +This approach introduces a problem when removing a member from a two-member cluster: If one of the members dies before the other one receives the commit of the confchange entry, then the member cannot be removed any more since the cluster cannot make progress. For this reason it is highly recommended to use three or more nodes in every cluster. diff --git a/deps/github.com/coreos/etcd/raft/design.md b/deps/github.com/coreos/etcd/raft/design.md new file mode 100644 index 000000000..7bc0531dc --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/design.md @@ -0,0 +1,57 @@ +## Progress + +Progress represents a follower’s progress in the view of the leader. Leader maintains progresses of all followers, and sends `replication message` to the follower based on its progress. + +`replication message` is a `msgApp` with log entries. + +A progress has two attribute: `match` and `next`. `match` is the index of the highest known matched entry. If leader knows nothing about follower’s replication status, `match` is set to zero. `next` is the index of the first entry that will be replicated to the follower. Leader puts entries from `next` to its latest one in next `replication message`. + +A progress is in one of the three state: `probe`, `replicate`, `snapshot`. + +``` + +--------------------------------------------------------+ + | send snapshot | + | | + +---------+----------+ +----------v---------+ + +---> probe | | snapshot | + | | max inflight = 1 <----------------------------------+ max inflight = 0 | + | +---------+----------+ +--------------------+ + | | 1. snapshot success + | | (next=snapshot.index + 1) + | | 2. snapshot failure + | | (no change) + | | 3. receives msgAppResp(rej=false&&index>lastsnap.index) + | | (match=m.index,next=match+1) +receives msgAppResp(rej=true) +(next=match+1)| | + | | + | | + | | receives msgAppResp(rej=false&&index>match) + | | (match=m.index,next=match+1) + | | + | | + | | + | +---------v----------+ + | | replicate | + +---+ max inflight = n | + +--------------------+ +``` + +When the progress of a follower is in `probe` state, leader sends at most one `replication message` per heartbeat interval. The leader sends `replication message` slowly and probing the actual progress of the follower. A `msgHeartbeatResp` or a `msgAppResp` with reject might trigger the sending of the next `replication message`. + +When the progress of a follower is in `replicate` state, leader sends `replication message`, then optimistically increases `next` to the latest entry sent. This is an optimized state for fast replicating log entries to the follower. + +When the progress of a follower is in `snapshot` state, leader stops sending any `replication message`. + +A newly elected leader sets the progresses of all the followers to `probe` state with `match` = 0 and `next` = last index. The leader slowly (at most once per heartbeat) sends `replication message` to the follower and probes its progress. + +A progress changes to `replicate` when the follower replies with a non-rejection `msgAppResp`, which implies that it has matched the index sent. At this point, leader starts to stream log entries to the follower fast. The progress will fall back to `probe` when the follower replies a rejection `msgAppResp` or the link layer reports the follower is unreachable. We aggressively reset `next` to `match`+1 since if we receive any `msgAppResp` soon, both `match` and `next` will increase directly to the `index` in `msgAppResp`. (We might end up with sending some duplicate entries when aggressively reset `next` too low. see open question) + +A progress changes from `probe` to `snapshot` when the follower falls very far behind and requires a snapshot. After sending `msgSnap`, the leader waits until the success, failure or abortion of the previous snapshot sent. The progress will go back to `probe` after the sending result is applied. + +### Flow Control + +1. limit the max size of message sent per message. Max should be configurable. +Lower the cost at probing state as we limit the size per message; lower the penalty when aggressively decreased to a too low `next` + +2. limit the # of in flight messages < N when in `replicate` state. N should be configurable. Most implementation will have a sending buffer on top of its actual network transport layer (not blocking raft node). We want to make sure raft does not overflow that buffer, which can cause message dropping and triggering a bunch of unnecessary resending repeatedly. diff --git a/deps/github.com/coreos/etcd/raft/doc.go b/deps/github.com/coreos/etcd/raft/doc.go new file mode 100644 index 000000000..b55c591ff --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/doc.go @@ -0,0 +1,300 @@ +// Copyright 2015 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. + +/* +Package raft sends and receives messages in the Protocol Buffer format +defined in the raftpb package. + +Raft is a protocol with which a cluster of nodes can maintain a replicated state machine. +The state machine is kept in sync through the use of a replicated log. +For more details on Raft, see "In Search of an Understandable Consensus Algorithm" +(https://ramcloud.stanford.edu/raft.pdf) by Diego Ongaro and John Ousterhout. + +A simple example application, _raftexample_, is also available to help illustrate +how to use this package in practice: +https://github.com/coreos/etcd/tree/master/contrib/raftexample + +Usage + +The primary object in raft is a Node. You either start a Node from scratch +using raft.StartNode or start a Node from some initial state using raft.RestartNode. + +To start a node from scratch: + + storage := raft.NewMemoryStorage() + c := &Config{ + ID: 0x01, + ElectionTick: 10, + HeartbeatTick: 1, + Storage: storage, + MaxSizePerMsg: 4096, + MaxInflightMsgs: 256, + } + n := raft.StartNode(c, []raft.Peer{{ID: 0x02}, {ID: 0x03}}) + +To restart a node from previous state: + + storage := raft.NewMemoryStorage() + + // recover the in-memory storage from persistent + // snapshot, state and entries. + storage.ApplySnapshot(snapshot) + storage.SetHardState(state) + storage.Append(entries) + + c := &Config{ + ID: 0x01, + ElectionTick: 10, + HeartbeatTick: 1, + Storage: storage, + MaxSizePerMsg: 4096, + MaxInflightMsgs: 256, + } + + // restart raft without peer information. + // peer information is already included in the storage. + n := raft.RestartNode(c) + +Now that you are holding onto a Node you have a few responsibilities: + +First, you must read from the Node.Ready() channel and process the updates +it contains. These steps may be performed in parallel, except as noted in step +2. + +1. Write HardState, Entries, and Snapshot to persistent storage if they are +not empty. Note that when writing an Entry with Index i, any +previously-persisted entries with Index >= i must be discarded. + +2. Send all Messages to the nodes named in the To field. It is important that +no messages be sent until the latest HardState has been persisted to disk, +and all Entries written by any previous Ready batch (Messages may be sent while +entries from the same batch are being persisted). To reduce the I/O latency, an +optimization can be applied to make leader write to disk in parallel with its +followers (as explained at section 10.2.1 in Raft thesis). If any Message has type +MsgSnap, call Node.ReportSnapshot() after it has been sent (these messages may be +large). + +Note: Marshalling messages is not thread-safe; it is important that you +make sure that no new entries are persisted while marshalling. +The easiest way to achieve this is to serialise the messages directly inside +your main raft loop. + +3. Apply Snapshot (if any) and CommittedEntries to the state machine. +If any committed Entry has Type EntryConfChange, call Node.ApplyConfChange() +to apply it to the node. The configuration change may be cancelled at this point +by setting the NodeID field to zero before calling ApplyConfChange +(but ApplyConfChange must be called one way or the other, and the decision to cancel +must be based solely on the state machine and not external information such as +the observed health of the node). + +4. Call Node.Advance() to signal readiness for the next batch of updates. +This may be done at any time after step 1, although all updates must be processed +in the order they were returned by Ready. + +Second, all persisted log entries must be made available via an +implementation of the Storage interface. The provided MemoryStorage +type can be used for this (if you repopulate its state upon a +restart), or you can supply your own disk-backed implementation. + +Third, when you receive a message from another node, pass it to Node.Step: + + func recvRaftRPC(ctx context.Context, m raftpb.Message) { + n.Step(ctx, m) + } + +Finally, you need to call Node.Tick() at regular intervals (probably +via a time.Ticker). Raft has two important timeouts: heartbeat and the +election timeout. However, internally to the raft package time is +represented by an abstract "tick". + +The total state machine handling loop will look something like this: + + for { + select { + case <-s.Ticker: + n.Tick() + case rd := <-s.Node.Ready(): + saveToStorage(rd.State, rd.Entries, rd.Snapshot) + send(rd.Messages) + if !raft.IsEmptySnap(rd.Snapshot) { + processSnapshot(rd.Snapshot) + } + for _, entry := range rd.CommittedEntries { + process(entry) + if entry.Type == raftpb.EntryConfChange { + var cc raftpb.ConfChange + cc.Unmarshal(entry.Data) + s.Node.ApplyConfChange(cc) + } + } + s.Node.Advance() + case <-s.done: + return + } + } + +To propose changes to the state machine from your node take your application +data, serialize it into a byte slice and call: + + n.Propose(ctx, data) + +If the proposal is committed, data will appear in committed entries with type +raftpb.EntryNormal. There is no guarantee that a proposed command will be +committed; you may have to re-propose after a timeout. + +To add or remove node in a cluster, build ConfChange struct 'cc' and call: + + n.ProposeConfChange(ctx, cc) + +After config change is committed, some committed entry with type +raftpb.EntryConfChange will be returned. You must apply it to node through: + + var cc raftpb.ConfChange + cc.Unmarshal(data) + n.ApplyConfChange(cc) + +Note: An ID represents a unique node in a cluster for all time. A +given ID MUST be used only once even if the old node has been removed. +This means that for example IP addresses make poor node IDs since they +may be reused. Node IDs must be non-zero. + +Implementation notes + +This implementation is up to date with the final Raft thesis +(https://ramcloud.stanford.edu/~ongaro/thesis.pdf), although our +implementation of the membership change protocol differs somewhat from +that described in chapter 4. The key invariant that membership changes +happen one node at a time is preserved, but in our implementation the +membership change takes effect when its entry is applied, not when it +is added to the log (so the entry is committed under the old +membership instead of the new). This is equivalent in terms of safety, +since the old and new configurations are guaranteed to overlap. + +To ensure that we do not attempt to commit two membership changes at +once by matching log positions (which would be unsafe since they +should have different quorum requirements), we simply disallow any +proposed membership change while any uncommitted change appears in +the leader's log. + +This approach introduces a problem when you try to remove a member +from a two-member cluster: If one of the members dies before the +other one receives the commit of the confchange entry, then the member +cannot be removed any more since the cluster cannot make progress. +For this reason it is highly recommended to use three or more nodes in +every cluster. + +MessageType + +Package raft sends and receives message in Protocol Buffer format (defined +in raftpb package). Each state (follower, candidate, leader) implements its +own 'step' method ('stepFollower', 'stepCandidate', 'stepLeader') when +advancing with the given raftpb.Message. Each step is determined by its +raftpb.MessageType. Note that every step is checked by one common method +'Step' that safety-checks the terms of node and incoming message to prevent +stale log entries: + + 'MsgHup' is used for election. If a node is a follower or candidate, the + 'tick' function in 'raft' struct is set as 'tickElection'. If a follower or + candidate has not received any heartbeat before the election timeout, it + passes 'MsgHup' to its Step method and becomes (or remains) a candidate to + start a new election. + + 'MsgBeat' is an internal type that signals the leader to send a heartbeat of + the 'MsgHeartbeat' type. If a node is a leader, the 'tick' function in + the 'raft' struct is set as 'tickHeartbeat', and triggers the leader to + send periodic 'MsgHeartbeat' messages to its followers. + + 'MsgProp' proposes to append data to its log entries. This is a special + type to redirect proposals to leader. Therefore, send method overwrites + raftpb.Message's term with its HardState's term to avoid attaching its + local term to 'MsgProp'. When 'MsgProp' is passed to the leader's 'Step' + method, the leader first calls the 'appendEntry' method to append entries + to its log, and then calls 'bcastAppend' method to send those entries to + its peers. When passed to candidate, 'MsgProp' is dropped. When passed to + follower, 'MsgProp' is stored in follower's mailbox(msgs) by the send + method. It is stored with sender's ID and later forwarded to leader by + rafthttp package. + + 'MsgApp' contains log entries to replicate. A leader calls bcastAppend, + which calls sendAppend, which sends soon-to-be-replicated logs in 'MsgApp' + type. When 'MsgApp' is passed to candidate's Step method, candidate reverts + back to follower, because it indicates that there is a valid leader sending + 'MsgApp' messages. Candidate and follower respond to this message in + 'MsgAppResp' type. + + 'MsgAppResp' is response to log replication request('MsgApp'). When + 'MsgApp' is passed to candidate or follower's Step method, it responds by + calling 'handleAppendEntries' method, which sends 'MsgAppResp' to raft + mailbox. + + 'MsgVote' requests votes for election. When a node is a follower or + candidate and 'MsgHup' is passed to its Step method, then the node calls + 'campaign' method to campaign itself to become a leader. Once 'campaign' + method is called, the node becomes candidate and sends 'MsgVote' to peers + in cluster to request votes. When passed to leader or candidate's Step + method and the message's Term is lower than leader's or candidate's, + 'MsgVote' will be rejected ('MsgVoteResp' is returned with Reject true). + If leader or candidate receives 'MsgVote' with higher term, it will revert + back to follower. When 'MsgVote' is passed to follower, it votes for the + sender only when sender's last term is greater than MsgVote's term or + sender's last term is equal to MsgVote's term but sender's last committed + index is greater than or equal to follower's. + + 'MsgVoteResp' contains responses from voting request. When 'MsgVoteResp' is + passed to candidate, the candidate calculates how many votes it has won. If + it's more than majority (quorum), it becomes leader and calls 'bcastAppend'. + If candidate receives majority of votes of denials, it reverts back to + follower. + + 'MsgPreVote' and 'MsgPreVoteResp' are used in an optional two-phase election + protocol. When Config.PreVote is true, a pre-election is carried out first + (using the same rules as a regular election), and no node increases its term + number unless the pre-election indicates that the campaigining node would win. + This minimizes disruption when a partitioned node rejoins the cluster. + + 'MsgSnap' requests to install a snapshot message. When a node has just + become a leader or the leader receives 'MsgProp' message, it calls + 'bcastAppend' method, which then calls 'sendAppend' method to each + follower. In 'sendAppend', if a leader fails to get term or entries, + the leader requests snapshot by sending 'MsgSnap' type message. + + 'MsgSnapStatus' tells the result of snapshot install message. When a + follower rejected 'MsgSnap', it indicates the snapshot request with + 'MsgSnap' had failed from network issues which causes the network layer + to fail to send out snapshots to its followers. Then leader considers + follower's progress as probe. When 'MsgSnap' were not rejected, it + indicates that the snapshot succeeded and the leader sets follower's + progress to probe and resumes its log replication. + + 'MsgHeartbeat' sends heartbeat from leader. When 'MsgHeartbeat' is passed + to candidate and message's term is higher than candidate's, the candidate + reverts back to follower and updates its committed index from the one in + this heartbeat. And it sends the message to its mailbox. When + 'MsgHeartbeat' is passed to follower's Step method and message's term is + higher than follower's, the follower updates its leaderID with the ID + from the message. + + 'MsgHeartbeatResp' is a response to 'MsgHeartbeat'. When 'MsgHeartbeatResp' + is passed to leader's Step method, the leader knows which follower + responded. And only when the leader's last committed index is greater than + follower's Match index, the leader runs 'sendAppend` method. + + 'MsgUnreachable' tells that request(message) wasn't delivered. When + 'MsgUnreachable' is passed to leader's Step method, the leader discovers + that the follower that sent this 'MsgUnreachable' is not reachable, often + indicating 'MsgApp' is lost. When follower's progress state is replicate, + the leader sets it back to probe. + +*/ +package raft diff --git a/deps/github.com/coreos/etcd/raft/log.go b/deps/github.com/coreos/etcd/raft/log.go new file mode 100644 index 000000000..c3036d3c9 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/log.go @@ -0,0 +1,358 @@ +// Copyright 2015 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. + +package raft + +import ( + "fmt" + "log" + + pb "github.com/coreos/etcd/raft/raftpb" +) + +type raftLog struct { + // storage contains all stable entries since the last snapshot. + storage Storage + + // unstable contains all unstable entries and snapshot. + // they will be saved into storage. + unstable unstable + + // committed is the highest log position that is known to be in + // stable storage on a quorum of nodes. + committed uint64 + // applied is the highest log position that the application has + // been instructed to apply to its state machine. + // Invariant: applied <= committed + applied uint64 + + logger Logger +} + +// newLog returns log using the given storage. It recovers the log to the state +// that it just commits and applies the latest snapshot. +func newLog(storage Storage, logger Logger) *raftLog { + if storage == nil { + log.Panic("storage must not be nil") + } + log := &raftLog{ + storage: storage, + logger: logger, + } + firstIndex, err := storage.FirstIndex() + if err != nil { + panic(err) // TODO(bdarnell) + } + lastIndex, err := storage.LastIndex() + if err != nil { + panic(err) // TODO(bdarnell) + } + log.unstable.offset = lastIndex + 1 + log.unstable.logger = logger + // Initialize our committed and applied pointers to the time of the last compaction. + log.committed = firstIndex - 1 + log.applied = firstIndex - 1 + + return log +} + +func (l *raftLog) String() string { + return fmt.Sprintf("committed=%d, applied=%d, unstable.offset=%d, len(unstable.Entries)=%d", l.committed, l.applied, l.unstable.offset, len(l.unstable.entries)) +} + +// maybeAppend returns (0, false) if the entries cannot be appended. Otherwise, +// it returns (last index of new entries, true). +func (l *raftLog) maybeAppend(index, logTerm, committed uint64, ents ...pb.Entry) (lastnewi uint64, ok bool) { + if l.matchTerm(index, logTerm) { + lastnewi = index + uint64(len(ents)) + ci := l.findConflict(ents) + switch { + case ci == 0: + case ci <= l.committed: + l.logger.Panicf("entry %d conflict with committed entry [committed(%d)]", ci, l.committed) + default: + offset := index + 1 + l.append(ents[ci-offset:]...) + } + l.commitTo(min(committed, lastnewi)) + return lastnewi, true + } + return 0, false +} + +func (l *raftLog) append(ents ...pb.Entry) uint64 { + if len(ents) == 0 { + return l.lastIndex() + } + if after := ents[0].Index - 1; after < l.committed { + l.logger.Panicf("after(%d) is out of range [committed(%d)]", after, l.committed) + } + l.unstable.truncateAndAppend(ents) + return l.lastIndex() +} + +// findConflict finds the index of the conflict. +// It returns the first pair of conflicting entries between the existing +// entries and the given entries, if there are any. +// If there is no conflicting entries, and the existing entries contains +// all the given entries, zero will be returned. +// If there is no conflicting entries, but the given entries contains new +// entries, the index of the first new entry will be returned. +// An entry is considered to be conflicting if it has the same index but +// a different term. +// The first entry MUST have an index equal to the argument 'from'. +// The index of the given entries MUST be continuously increasing. +func (l *raftLog) findConflict(ents []pb.Entry) uint64 { + for _, ne := range ents { + if !l.matchTerm(ne.Index, ne.Term) { + if ne.Index <= l.lastIndex() { + l.logger.Infof("found conflict at index %d [existing term: %d, conflicting term: %d]", + ne.Index, l.zeroTermOnErrCompacted(l.term(ne.Index)), ne.Term) + } + return ne.Index + } + } + return 0 +} + +func (l *raftLog) unstableEntries() []pb.Entry { + if len(l.unstable.entries) == 0 { + return nil + } + return l.unstable.entries +} + +// nextEnts returns all the available entries for execution. +// If applied is smaller than the index of snapshot, it returns all committed +// entries after the index of snapshot. +func (l *raftLog) nextEnts() (ents []pb.Entry) { + off := max(l.applied+1, l.firstIndex()) + if l.committed+1 > off { + ents, err := l.slice(off, l.committed+1, noLimit) + if err != nil { + l.logger.Panicf("unexpected error when getting unapplied entries (%v)", err) + } + return ents + } + return nil +} + +// hasNextEnts returns if there is any available entries for execution. This +// is a fast check without heavy raftLog.slice() in raftLog.nextEnts(). +func (l *raftLog) hasNextEnts() bool { + off := max(l.applied+1, l.firstIndex()) + return l.committed+1 > off +} + +func (l *raftLog) snapshot() (pb.Snapshot, error) { + if l.unstable.snapshot != nil { + return *l.unstable.snapshot, nil + } + return l.storage.Snapshot() +} + +func (l *raftLog) firstIndex() uint64 { + if i, ok := l.unstable.maybeFirstIndex(); ok { + return i + } + index, err := l.storage.FirstIndex() + if err != nil { + panic(err) // TODO(bdarnell) + } + return index +} + +func (l *raftLog) lastIndex() uint64 { + if i, ok := l.unstable.maybeLastIndex(); ok { + return i + } + i, err := l.storage.LastIndex() + if err != nil { + panic(err) // TODO(bdarnell) + } + return i +} + +func (l *raftLog) commitTo(tocommit uint64) { + // never decrease commit + if l.committed < tocommit { + if l.lastIndex() < tocommit { + l.logger.Panicf("tocommit(%d) is out of range [lastIndex(%d)]. Was the raft log corrupted, truncated, or lost?", tocommit, l.lastIndex()) + } + l.committed = tocommit + } +} + +func (l *raftLog) appliedTo(i uint64) { + if i == 0 { + return + } + if l.committed < i || i < l.applied { + l.logger.Panicf("applied(%d) is out of range [prevApplied(%d), committed(%d)]", i, l.applied, l.committed) + } + l.applied = i +} + +func (l *raftLog) stableTo(i, t uint64) { l.unstable.stableTo(i, t) } + +func (l *raftLog) stableSnapTo(i uint64) { l.unstable.stableSnapTo(i) } + +func (l *raftLog) lastTerm() uint64 { + t, err := l.term(l.lastIndex()) + if err != nil { + l.logger.Panicf("unexpected error when getting the last term (%v)", err) + } + return t +} + +func (l *raftLog) term(i uint64) (uint64, error) { + // the valid term range is [index of dummy entry, last index] + dummyIndex := l.firstIndex() - 1 + if i < dummyIndex || i > l.lastIndex() { + // TODO: return an error instead? + return 0, nil + } + + if t, ok := l.unstable.maybeTerm(i); ok { + return t, nil + } + + t, err := l.storage.Term(i) + if err == nil { + return t, nil + } + if err == ErrCompacted || err == ErrUnavailable { + return 0, err + } + panic(err) // TODO(bdarnell) +} + +func (l *raftLog) entries(i, maxsize uint64) ([]pb.Entry, error) { + if i > l.lastIndex() { + return nil, nil + } + return l.slice(i, l.lastIndex()+1, maxsize) +} + +// allEntries returns all entries in the log. +func (l *raftLog) allEntries() []pb.Entry { + ents, err := l.entries(l.firstIndex(), noLimit) + if err == nil { + return ents + } + if err == ErrCompacted { // try again if there was a racing compaction + return l.allEntries() + } + // TODO (xiangli): handle error? + panic(err) +} + +// isUpToDate determines if the given (lastIndex,term) log is more up-to-date +// by comparing the index and term of the last entries in the existing logs. +// If the logs have last entries with different terms, then the log with the +// later term is more up-to-date. If the logs end with the same term, then +// whichever log has the larger lastIndex is more up-to-date. If the logs are +// the same, the given log is up-to-date. +func (l *raftLog) isUpToDate(lasti, term uint64) bool { + return term > l.lastTerm() || (term == l.lastTerm() && lasti >= l.lastIndex()) +} + +func (l *raftLog) matchTerm(i, term uint64) bool { + t, err := l.term(i) + if err != nil { + return false + } + return t == term +} + +func (l *raftLog) maybeCommit(maxIndex, term uint64) bool { + if maxIndex > l.committed && l.zeroTermOnErrCompacted(l.term(maxIndex)) == term { + l.commitTo(maxIndex) + return true + } + return false +} + +func (l *raftLog) restore(s pb.Snapshot) { + l.logger.Infof("log [%s] starts to restore snapshot [index: %d, term: %d]", l, s.Metadata.Index, s.Metadata.Term) + l.committed = s.Metadata.Index + l.unstable.restore(s) +} + +// slice returns a slice of log entries from lo through hi-1, inclusive. +func (l *raftLog) slice(lo, hi, maxSize uint64) ([]pb.Entry, error) { + err := l.mustCheckOutOfBounds(lo, hi) + if err != nil { + return nil, err + } + if lo == hi { + return nil, nil + } + var ents []pb.Entry + if lo < l.unstable.offset { + storedEnts, err := l.storage.Entries(lo, min(hi, l.unstable.offset), maxSize) + if err == ErrCompacted { + return nil, err + } else if err == ErrUnavailable { + l.logger.Panicf("entries[%d:%d) is unavailable from storage", lo, min(hi, l.unstable.offset)) + } else if err != nil { + panic(err) // TODO(bdarnell) + } + + // check if ents has reached the size limitation + if uint64(len(storedEnts)) < min(hi, l.unstable.offset)-lo { + return storedEnts, nil + } + + ents = storedEnts + } + if hi > l.unstable.offset { + unstable := l.unstable.slice(max(lo, l.unstable.offset), hi) + if len(ents) > 0 { + ents = append([]pb.Entry{}, ents...) + ents = append(ents, unstable...) + } else { + ents = unstable + } + } + return limitSize(ents, maxSize), nil +} + +// l.firstIndex <= lo <= hi <= l.firstIndex + len(l.entries) +func (l *raftLog) mustCheckOutOfBounds(lo, hi uint64) error { + if lo > hi { + l.logger.Panicf("invalid slice %d > %d", lo, hi) + } + fi := l.firstIndex() + if lo < fi { + return ErrCompacted + } + + length := l.lastIndex() + 1 - fi + if lo < fi || hi > fi+length { + l.logger.Panicf("slice[%d,%d) out of bound [%d,%d]", lo, hi, fi, l.lastIndex()) + } + return nil +} + +func (l *raftLog) zeroTermOnErrCompacted(t uint64, err error) uint64 { + if err == nil { + return t + } + if err == ErrCompacted { + return 0 + } + l.logger.Panicf("unexpected error (%v)", err) + return 0 +} diff --git a/deps/github.com/coreos/etcd/raft/log_unstable.go b/deps/github.com/coreos/etcd/raft/log_unstable.go new file mode 100644 index 000000000..263af9ce4 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/log_unstable.go @@ -0,0 +1,159 @@ +// Copyright 2015 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. + +package raft + +import pb "github.com/coreos/etcd/raft/raftpb" + +// unstable.entries[i] has raft log position i+unstable.offset. +// Note that unstable.offset may be less than the highest log +// position in storage; this means that the next write to storage +// might need to truncate the log before persisting unstable.entries. +type unstable struct { + // the incoming unstable snapshot, if any. + snapshot *pb.Snapshot + // all entries that have not yet been written to storage. + entries []pb.Entry + offset uint64 + + logger Logger +} + +// maybeFirstIndex returns the index of the first possible entry in entries +// if it has a snapshot. +func (u *unstable) maybeFirstIndex() (uint64, bool) { + if u.snapshot != nil { + return u.snapshot.Metadata.Index + 1, true + } + return 0, false +} + +// maybeLastIndex returns the last index if it has at least one +// unstable entry or snapshot. +func (u *unstable) maybeLastIndex() (uint64, bool) { + if l := len(u.entries); l != 0 { + return u.offset + uint64(l) - 1, true + } + if u.snapshot != nil { + return u.snapshot.Metadata.Index, true + } + return 0, false +} + +// maybeTerm returns the term of the entry at index i, if there +// is any. +func (u *unstable) maybeTerm(i uint64) (uint64, bool) { + if i < u.offset { + if u.snapshot == nil { + return 0, false + } + if u.snapshot.Metadata.Index == i { + return u.snapshot.Metadata.Term, true + } + return 0, false + } + + last, ok := u.maybeLastIndex() + if !ok { + return 0, false + } + if i > last { + return 0, false + } + return u.entries[i-u.offset].Term, true +} + +func (u *unstable) stableTo(i, t uint64) { + gt, ok := u.maybeTerm(i) + if !ok { + return + } + // if i < offset, term is matched with the snapshot + // only update the unstable entries if term is matched with + // an unstable entry. + if gt == t && i >= u.offset { + u.entries = u.entries[i+1-u.offset:] + u.offset = i + 1 + u.shrinkEntriesArray() + } +} + +// shrinkEntriesArray discards the underlying array used by the entries slice +// if most of it isn't being used. This avoids holding references to a bunch of +// potentially large entries that aren't needed anymore. Simply clearing the +// entries wouldn't be safe because clients might still be using them. +func (u *unstable) shrinkEntriesArray() { + // We replace the array if we're using less than half of the space in + // it. This number is fairly arbitrary, chosen as an attempt to balance + // memory usage vs number of allocations. It could probably be improved + // with some focused tuning. + const lenMultiple = 2 + if len(u.entries) == 0 { + u.entries = nil + } else if len(u.entries)*lenMultiple < cap(u.entries) { + newEntries := make([]pb.Entry, len(u.entries)) + copy(newEntries, u.entries) + u.entries = newEntries + } +} + +func (u *unstable) stableSnapTo(i uint64) { + if u.snapshot != nil && u.snapshot.Metadata.Index == i { + u.snapshot = nil + } +} + +func (u *unstable) restore(s pb.Snapshot) { + u.offset = s.Metadata.Index + 1 + u.entries = nil + u.snapshot = &s +} + +func (u *unstable) truncateAndAppend(ents []pb.Entry) { + after := ents[0].Index + switch { + case after == u.offset+uint64(len(u.entries)): + // after is the next index in the u.entries + // directly append + u.entries = append(u.entries, ents...) + case after <= u.offset: + u.logger.Infof("replace the unstable entries from index %d", after) + // The log is being truncated to before our current offset + // portion, so set the offset and replace the entries + u.offset = after + u.entries = ents + default: + // truncate to after and copy to u.entries + // then append + u.logger.Infof("truncate the unstable entries before index %d", after) + u.entries = append([]pb.Entry{}, u.slice(u.offset, after)...) + u.entries = append(u.entries, ents...) + } +} + +func (u *unstable) slice(lo uint64, hi uint64) []pb.Entry { + u.mustCheckOutOfBounds(lo, hi) + return u.entries[lo-u.offset : hi-u.offset] +} + +// u.offset <= lo <= hi <= u.offset+len(u.offset) +func (u *unstable) mustCheckOutOfBounds(lo, hi uint64) { + if lo > hi { + u.logger.Panicf("invalid unstable.slice %d > %d", lo, hi) + } + upper := u.offset + uint64(len(u.entries)) + if lo < u.offset || hi > upper { + u.logger.Panicf("unstable.slice[%d,%d) out of bound [%d,%d]", lo, hi, u.offset, upper) + } +} diff --git a/deps/github.com/coreos/etcd/raft/logger.go b/deps/github.com/coreos/etcd/raft/logger.go new file mode 100644 index 000000000..92e55b373 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/logger.go @@ -0,0 +1,126 @@ +// Copyright 2015 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. + +package raft + +import ( + "fmt" + "io/ioutil" + "log" + "os" +) + +type Logger interface { + Debug(v ...interface{}) + Debugf(format string, v ...interface{}) + + Error(v ...interface{}) + Errorf(format string, v ...interface{}) + + Info(v ...interface{}) + Infof(format string, v ...interface{}) + + Warning(v ...interface{}) + Warningf(format string, v ...interface{}) + + Fatal(v ...interface{}) + Fatalf(format string, v ...interface{}) + + Panic(v ...interface{}) + Panicf(format string, v ...interface{}) +} + +func SetLogger(l Logger) { raftLogger = l } + +var ( + defaultLogger = &DefaultLogger{Logger: log.New(os.Stderr, "raft", log.LstdFlags)} + discardLogger = &DefaultLogger{Logger: log.New(ioutil.Discard, "", 0)} + raftLogger = Logger(defaultLogger) +) + +const ( + calldepth = 2 +) + +// DefaultLogger is a default implementation of the Logger interface. +type DefaultLogger struct { + *log.Logger + debug bool +} + +func (l *DefaultLogger) EnableTimestamps() { + l.SetFlags(l.Flags() | log.Ldate | log.Ltime) +} + +func (l *DefaultLogger) EnableDebug() { + l.debug = true +} + +func (l *DefaultLogger) Debug(v ...interface{}) { + if l.debug { + l.Output(calldepth, header("DEBUG", fmt.Sprint(v...))) + } +} + +func (l *DefaultLogger) Debugf(format string, v ...interface{}) { + if l.debug { + l.Output(calldepth, header("DEBUG", fmt.Sprintf(format, v...))) + } +} + +func (l *DefaultLogger) Info(v ...interface{}) { + l.Output(calldepth, header("INFO", fmt.Sprint(v...))) +} + +func (l *DefaultLogger) Infof(format string, v ...interface{}) { + l.Output(calldepth, header("INFO", fmt.Sprintf(format, v...))) +} + +func (l *DefaultLogger) Error(v ...interface{}) { + l.Output(calldepth, header("ERROR", fmt.Sprint(v...))) +} + +func (l *DefaultLogger) Errorf(format string, v ...interface{}) { + l.Output(calldepth, header("ERROR", fmt.Sprintf(format, v...))) +} + +func (l *DefaultLogger) Warning(v ...interface{}) { + l.Output(calldepth, header("WARN", fmt.Sprint(v...))) +} + +func (l *DefaultLogger) Warningf(format string, v ...interface{}) { + l.Output(calldepth, header("WARN", fmt.Sprintf(format, v...))) +} + +func (l *DefaultLogger) Fatal(v ...interface{}) { + l.Output(calldepth, header("FATAL", fmt.Sprint(v...))) + os.Exit(1) +} + +func (l *DefaultLogger) Fatalf(format string, v ...interface{}) { + l.Output(calldepth, header("FATAL", fmt.Sprintf(format, v...))) + os.Exit(1) +} + +func (l *DefaultLogger) Panic(v ...interface{}) { + l.Logger.Panic(v) +} + +func (l *DefaultLogger) Panicf(format string, v ...interface{}) { + l.Logger.Panicf(format, v...) +} + +func header(lvl, msg string) string { + return fmt.Sprintf("%s: %s", lvl, msg) +} diff --git a/deps/github.com/coreos/etcd/raft/node.go b/deps/github.com/coreos/etcd/raft/node.go new file mode 100644 index 000000000..5da1c1193 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/node.go @@ -0,0 +1,537 @@ +// Copyright 2015 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. + +package raft + +import ( + "errors" + + pb "github.com/coreos/etcd/raft/raftpb" + "golang.org/x/net/context" +) + +type SnapshotStatus int + +const ( + SnapshotFinish SnapshotStatus = 1 + SnapshotFailure SnapshotStatus = 2 +) + +var ( + emptyState = pb.HardState{} + + // ErrStopped is returned by methods on Nodes that have been stopped. + ErrStopped = errors.New("raft: stopped") +) + +// SoftState provides state that is useful for logging and debugging. +// The state is volatile and does not need to be persisted to the WAL. +type SoftState struct { + Lead uint64 // must use atomic operations to access; keep 64-bit aligned. + RaftState StateType +} + +func (a *SoftState) equal(b *SoftState) bool { + return a.Lead == b.Lead && a.RaftState == b.RaftState +} + +// Ready encapsulates the entries and messages that are ready to read, +// be saved to stable storage, committed or sent to other peers. +// All fields in Ready are read-only. +type Ready struct { + // The current volatile state of a Node. + // SoftState will be nil if there is no update. + // It is not required to consume or store SoftState. + *SoftState + + // The current state of a Node to be saved to stable storage BEFORE + // Messages are sent. + // HardState will be equal to empty state if there is no update. + pb.HardState + + // ReadStates can be used for node to serve linearizable read requests locally + // when its applied index is greater than the index in ReadState. + // Note that the readState will be returned when raft receives msgReadIndex. + // The returned is only valid for the request that requested to read. + ReadStates []ReadState + + // Entries specifies entries to be saved to stable storage BEFORE + // Messages are sent. + Entries []pb.Entry + + // Snapshot specifies the snapshot to be saved to stable storage. + Snapshot pb.Snapshot + + // CommittedEntries specifies entries to be committed to a + // store/state-machine. These have previously been committed to stable + // store. + CommittedEntries []pb.Entry + + // Messages specifies outbound messages to be sent AFTER Entries are + // committed to stable storage. + // If it contains a MsgSnap message, the application MUST report back to raft + // when the snapshot has been received or has failed by calling ReportSnapshot. + Messages []pb.Message + + // MustSync indicates whether the HardState and Entries must be synchronously + // written to disk or if an asynchronous write is permissible. + MustSync bool +} + +func isHardStateEqual(a, b pb.HardState) bool { + return a.Term == b.Term && a.Vote == b.Vote && a.Commit == b.Commit +} + +// IsEmptyHardState returns true if the given HardState is empty. +func IsEmptyHardState(st pb.HardState) bool { + return isHardStateEqual(st, emptyState) +} + +// IsEmptySnap returns true if the given Snapshot is empty. +func IsEmptySnap(sp pb.Snapshot) bool { + return sp.Metadata.Index == 0 +} + +func (rd Ready) containsUpdates() bool { + return rd.SoftState != nil || !IsEmptyHardState(rd.HardState) || + !IsEmptySnap(rd.Snapshot) || len(rd.Entries) > 0 || + len(rd.CommittedEntries) > 0 || len(rd.Messages) > 0 || len(rd.ReadStates) != 0 +} + +// Node represents a node in a raft cluster. +type Node interface { + // Tick increments the internal logical clock for the Node by a single tick. Election + // timeouts and heartbeat timeouts are in units of ticks. + Tick() + // Campaign causes the Node to transition to candidate state and start campaigning to become leader. + Campaign(ctx context.Context) error + // Propose proposes that data be appended to the log. + Propose(ctx context.Context, data []byte) error + // ProposeConfChange proposes config change. + // At most one ConfChange can be in the process of going through consensus. + // Application needs to call ApplyConfChange when applying EntryConfChange type entry. + ProposeConfChange(ctx context.Context, cc pb.ConfChange) error + // Step advances the state machine using the given message. ctx.Err() will be returned, if any. + Step(ctx context.Context, msg pb.Message) error + + // Ready returns a channel that returns the current point-in-time state. + // Users of the Node must call Advance after retrieving the state returned by Ready. + // + // NOTE: No committed entries from the next Ready may be applied until all committed entries + // and snapshots from the previous one have finished. + Ready() <-chan Ready + + // Advance notifies the Node that the application has saved progress up to the last Ready. + // It prepares the node to return the next available Ready. + // + // The application should generally call Advance after it applies the entries in last Ready. + // + // However, as an optimization, the application may call Advance while it is applying the + // commands. For example. when the last Ready contains a snapshot, the application might take + // a long time to apply the snapshot data. To continue receiving Ready without blocking raft + // progress, it can call Advance before finishing applying the last ready. + Advance() + // ApplyConfChange applies config change to the local node. + // Returns an opaque ConfState protobuf which must be recorded + // in snapshots. Will never return nil; it returns a pointer only + // to match MemoryStorage.Compact. + ApplyConfChange(cc pb.ConfChange) *pb.ConfState + + // TransferLeadership attempts to transfer leadership to the given transferee. + TransferLeadership(ctx context.Context, lead, transferee uint64) + + // ReadIndex request a read state. The read state will be set in the ready. + // Read state has a read index. Once the application advances further than the read + // index, any linearizable read requests issued before the read request can be + // processed safely. The read state will have the same rctx attached. + ReadIndex(ctx context.Context, rctx []byte) error + + // Status returns the current status of the raft state machine. + Status() Status + // ReportUnreachable reports the given node is not reachable for the last send. + ReportUnreachable(id uint64) + // ReportSnapshot reports the status of the sent snapshot. + ReportSnapshot(id uint64, status SnapshotStatus) + // Stop performs any necessary termination of the Node. + Stop() +} + +type Peer struct { + ID uint64 + Context []byte +} + +// StartNode returns a new Node given configuration and a list of raft peers. +// It appends a ConfChangeAddNode entry for each given peer to the initial log. +func StartNode(c *Config, peers []Peer) Node { + r := newRaft(c) + // become the follower at term 1 and apply initial configuration + // entries of term 1 + r.becomeFollower(1, None) + for _, peer := range peers { + cc := pb.ConfChange{Type: pb.ConfChangeAddNode, NodeID: peer.ID, Context: peer.Context} + d, err := cc.Marshal() + if err != nil { + panic("unexpected marshal error") + } + e := pb.Entry{Type: pb.EntryConfChange, Term: 1, Index: r.raftLog.lastIndex() + 1, Data: d} + r.raftLog.append(e) + } + // Mark these initial entries as committed. + // TODO(bdarnell): These entries are still unstable; do we need to preserve + // the invariant that committed < unstable? + r.raftLog.committed = r.raftLog.lastIndex() + // Now apply them, mainly so that the application can call Campaign + // immediately after StartNode in tests. Note that these nodes will + // be added to raft twice: here and when the application's Ready + // loop calls ApplyConfChange. The calls to addNode must come after + // all calls to raftLog.append so progress.next is set after these + // bootstrapping entries (it is an error if we try to append these + // entries since they have already been committed). + // We do not set raftLog.applied so the application will be able + // to observe all conf changes via Ready.CommittedEntries. + for _, peer := range peers { + r.addNode(peer.ID) + } + + n := newNode() + n.logger = c.Logger + go n.run(r) + return &n +} + +// RestartNode is similar to StartNode but does not take a list of peers. +// The current membership of the cluster will be restored from the Storage. +// If the caller has an existing state machine, pass in the last log index that +// has been applied to it; otherwise use zero. +func RestartNode(c *Config) Node { + r := newRaft(c) + + n := newNode() + n.logger = c.Logger + go n.run(r) + return &n +} + +// node is the canonical implementation of the Node interface +type node struct { + propc chan pb.Message + recvc chan pb.Message + confc chan pb.ConfChange + confstatec chan pb.ConfState + readyc chan Ready + advancec chan struct{} + tickc chan struct{} + done chan struct{} + stop chan struct{} + status chan chan Status + + logger Logger +} + +func newNode() node { + return node{ + propc: make(chan pb.Message), + recvc: make(chan pb.Message), + confc: make(chan pb.ConfChange), + confstatec: make(chan pb.ConfState), + readyc: make(chan Ready), + advancec: make(chan struct{}), + // make tickc a buffered chan, so raft node can buffer some ticks when the node + // is busy processing raft messages. Raft node will resume process buffered + // ticks when it becomes idle. + tickc: make(chan struct{}, 128), + done: make(chan struct{}), + stop: make(chan struct{}), + status: make(chan chan Status), + } +} + +func (n *node) Stop() { + select { + case n.stop <- struct{}{}: + // Not already stopped, so trigger it + case <-n.done: + // Node has already been stopped - no need to do anything + return + } + // Block until the stop has been acknowledged by run() + <-n.done +} + +func (n *node) run(r *raft) { + var propc chan pb.Message + var readyc chan Ready + var advancec chan struct{} + var prevLastUnstablei, prevLastUnstablet uint64 + var havePrevLastUnstablei bool + var prevSnapi uint64 + var rd Ready + + lead := None + prevSoftSt := r.softState() + prevHardSt := emptyState + + for { + if advancec != nil { + readyc = nil + } else { + rd = newReady(r, prevSoftSt, prevHardSt) + if rd.containsUpdates() { + readyc = n.readyc + } else { + readyc = nil + } + } + + if lead != r.lead { + if r.hasLeader() { + if lead == None { + r.logger.Infof("raft.node: %x elected leader %x at term %d", r.id, r.lead, r.Term) + } else { + r.logger.Infof("raft.node: %x changed leader from %x to %x at term %d", r.id, lead, r.lead, r.Term) + } + propc = n.propc + } else { + r.logger.Infof("raft.node: %x lost leader %x at term %d", r.id, lead, r.Term) + propc = nil + } + lead = r.lead + } + + select { + // TODO: maybe buffer the config propose if there exists one (the way + // described in raft dissertation) + // Currently it is dropped in Step silently. + case m := <-propc: + m.From = r.id + r.Step(m) + case m := <-n.recvc: + // filter out response message from unknown From. + if _, ok := r.prs[m.From]; ok || !IsResponseMsg(m.Type) { + r.Step(m) // raft never returns an error + } + case cc := <-n.confc: + if cc.NodeID == None { + r.resetPendingConf() + select { + case n.confstatec <- pb.ConfState{Nodes: r.nodes()}: + case <-n.done: + } + break + } + switch cc.Type { + case pb.ConfChangeAddNode: + r.addNode(cc.NodeID) + case pb.ConfChangeRemoveNode: + // block incoming proposal when local node is + // removed + if cc.NodeID == r.id { + propc = nil + } + r.removeNode(cc.NodeID) + case pb.ConfChangeUpdateNode: + r.resetPendingConf() + default: + panic("unexpected conf type") + } + select { + case n.confstatec <- pb.ConfState{Nodes: r.nodes()}: + case <-n.done: + } + case <-n.tickc: + r.tick() + case readyc <- rd: + if rd.SoftState != nil { + prevSoftSt = rd.SoftState + } + if len(rd.Entries) > 0 { + prevLastUnstablei = rd.Entries[len(rd.Entries)-1].Index + prevLastUnstablet = rd.Entries[len(rd.Entries)-1].Term + havePrevLastUnstablei = true + } + if !IsEmptyHardState(rd.HardState) { + prevHardSt = rd.HardState + } + if !IsEmptySnap(rd.Snapshot) { + prevSnapi = rd.Snapshot.Metadata.Index + } + + r.msgs = nil + r.readStates = nil + advancec = n.advancec + case <-advancec: + if prevHardSt.Commit != 0 { + r.raftLog.appliedTo(prevHardSt.Commit) + } + if havePrevLastUnstablei { + r.raftLog.stableTo(prevLastUnstablei, prevLastUnstablet) + havePrevLastUnstablei = false + } + r.raftLog.stableSnapTo(prevSnapi) + advancec = nil + case c := <-n.status: + c <- getStatus(r) + case <-n.stop: + close(n.done) + return + } + } +} + +// Tick increments the internal logical clock for this Node. Election timeouts +// and heartbeat timeouts are in units of ticks. +func (n *node) Tick() { + select { + case n.tickc <- struct{}{}: + case <-n.done: + default: + n.logger.Warningf("A tick missed to fire. Node blocks too long!") + } +} + +func (n *node) Campaign(ctx context.Context) error { return n.step(ctx, pb.Message{Type: pb.MsgHup}) } + +func (n *node) Propose(ctx context.Context, data []byte) error { + return n.step(ctx, pb.Message{Type: pb.MsgProp, Entries: []pb.Entry{{Data: data}}}) +} + +func (n *node) Step(ctx context.Context, m pb.Message) error { + // ignore unexpected local messages receiving over network + if IsLocalMsg(m.Type) { + // TODO: return an error? + return nil + } + return n.step(ctx, m) +} + +func (n *node) ProposeConfChange(ctx context.Context, cc pb.ConfChange) error { + data, err := cc.Marshal() + if err != nil { + return err + } + return n.Step(ctx, pb.Message{Type: pb.MsgProp, Entries: []pb.Entry{{Type: pb.EntryConfChange, Data: data}}}) +} + +// Step advances the state machine using msgs. The ctx.Err() will be returned, +// if any. +func (n *node) step(ctx context.Context, m pb.Message) error { + ch := n.recvc + if m.Type == pb.MsgProp { + ch = n.propc + } + + select { + case ch <- m: + return nil + case <-ctx.Done(): + return ctx.Err() + case <-n.done: + return ErrStopped + } +} + +func (n *node) Ready() <-chan Ready { return n.readyc } + +func (n *node) Advance() { + select { + case n.advancec <- struct{}{}: + case <-n.done: + } +} + +func (n *node) ApplyConfChange(cc pb.ConfChange) *pb.ConfState { + var cs pb.ConfState + select { + case n.confc <- cc: + case <-n.done: + } + select { + case cs = <-n.confstatec: + case <-n.done: + } + return &cs +} + +func (n *node) Status() Status { + c := make(chan Status) + select { + case n.status <- c: + return <-c + case <-n.done: + return Status{} + } +} + +func (n *node) ReportUnreachable(id uint64) { + select { + case n.recvc <- pb.Message{Type: pb.MsgUnreachable, From: id}: + case <-n.done: + } +} + +func (n *node) ReportSnapshot(id uint64, status SnapshotStatus) { + rej := status == SnapshotFailure + + select { + case n.recvc <- pb.Message{Type: pb.MsgSnapStatus, From: id, Reject: rej}: + case <-n.done: + } +} + +func (n *node) TransferLeadership(ctx context.Context, lead, transferee uint64) { + select { + // manually set 'from' and 'to', so that leader can voluntarily transfers its leadership + case n.recvc <- pb.Message{Type: pb.MsgTransferLeader, From: transferee, To: lead}: + case <-n.done: + case <-ctx.Done(): + } +} + +func (n *node) ReadIndex(ctx context.Context, rctx []byte) error { + return n.step(ctx, pb.Message{Type: pb.MsgReadIndex, Entries: []pb.Entry{{Data: rctx}}}) +} + +func newReady(r *raft, prevSoftSt *SoftState, prevHardSt pb.HardState) Ready { + rd := Ready{ + Entries: r.raftLog.unstableEntries(), + CommittedEntries: r.raftLog.nextEnts(), + Messages: r.msgs, + } + if softSt := r.softState(); !softSt.equal(prevSoftSt) { + rd.SoftState = softSt + } + if hardSt := r.hardState(); !isHardStateEqual(hardSt, prevHardSt) { + rd.HardState = hardSt + } + if r.raftLog.unstable.snapshot != nil { + rd.Snapshot = *r.raftLog.unstable.snapshot + } + if len(r.readStates) != 0 { + rd.ReadStates = r.readStates + } + rd.MustSync = MustSync(rd.HardState, prevHardSt, len(rd.Entries)) + return rd +} + +// MustSync returns true if the hard state and count of Raft entries indicate +// that a synchronous write to persistent storage is required. +func MustSync(st, prevst pb.HardState, entsnum int) bool { + // Persistent state on all servers: + // (Updated on stable storage before responding to RPCs) + // currentTerm + // votedFor + // log entries[] + return entsnum != 0 || st.Vote != prevst.Vote || st.Term != prevst.Term +} diff --git a/deps/github.com/coreos/etcd/raft/progress.go b/deps/github.com/coreos/etcd/raft/progress.go new file mode 100644 index 000000000..77c7b52ef --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/progress.go @@ -0,0 +1,279 @@ +// Copyright 2015 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. + +package raft + +import "fmt" + +const ( + ProgressStateProbe ProgressStateType = iota + ProgressStateReplicate + ProgressStateSnapshot +) + +type ProgressStateType uint64 + +var prstmap = [...]string{ + "ProgressStateProbe", + "ProgressStateReplicate", + "ProgressStateSnapshot", +} + +func (st ProgressStateType) String() string { return prstmap[uint64(st)] } + +// Progress represents a follower’s progress in the view of the leader. Leader maintains +// progresses of all followers, and sends entries to the follower based on its progress. +type Progress struct { + Match, Next uint64 + // State defines how the leader should interact with the follower. + // + // When in ProgressStateProbe, leader sends at most one replication message + // per heartbeat interval. It also probes actual progress of the follower. + // + // When in ProgressStateReplicate, leader optimistically increases next + // to the latest entry sent after sending replication message. This is + // an optimized state for fast replicating log entries to the follower. + // + // When in ProgressStateSnapshot, leader should have sent out snapshot + // before and stops sending any replication message. + State ProgressStateType + // Paused is used in ProgressStateProbe. + // When Paused is true, raft should pause sending replication message to this peer. + Paused bool + // PendingSnapshot is used in ProgressStateSnapshot. + // If there is a pending snapshot, the pendingSnapshot will be set to the + // index of the snapshot. If pendingSnapshot is set, the replication process of + // this Progress will be paused. raft will not resend snapshot until the pending one + // is reported to be failed. + PendingSnapshot uint64 + + // RecentActive is true if the progress is recently active. Receiving any messages + // from the corresponding follower indicates the progress is active. + // RecentActive can be reset to false after an election timeout. + RecentActive bool + + // inflights is a sliding window for the inflight messages. + // Each inflight message contains one or more log entries. + // The max number of entries per message is defined in raft config as MaxSizePerMsg. + // Thus inflight effectively limits both the number of inflight messages + // and the bandwidth each Progress can use. + // When inflights is full, no more message should be sent. + // When a leader sends out a message, the index of the last + // entry should be added to inflights. The index MUST be added + // into inflights in order. + // When a leader receives a reply, the previous inflights should + // be freed by calling inflights.freeTo with the index of the last + // received entry. + ins *inflights +} + +func (pr *Progress) resetState(state ProgressStateType) { + pr.Paused = false + pr.PendingSnapshot = 0 + pr.State = state + pr.ins.reset() +} + +func (pr *Progress) becomeProbe() { + // If the original state is ProgressStateSnapshot, progress knows that + // the pending snapshot has been sent to this peer successfully, then + // probes from pendingSnapshot + 1. + if pr.State == ProgressStateSnapshot { + pendingSnapshot := pr.PendingSnapshot + pr.resetState(ProgressStateProbe) + pr.Next = max(pr.Match+1, pendingSnapshot+1) + } else { + pr.resetState(ProgressStateProbe) + pr.Next = pr.Match + 1 + } +} + +func (pr *Progress) becomeReplicate() { + pr.resetState(ProgressStateReplicate) + pr.Next = pr.Match + 1 +} + +func (pr *Progress) becomeSnapshot(snapshoti uint64) { + pr.resetState(ProgressStateSnapshot) + pr.PendingSnapshot = snapshoti +} + +// maybeUpdate returns false if the given n index comes from an outdated message. +// Otherwise it updates the progress and returns true. +func (pr *Progress) maybeUpdate(n uint64) bool { + var updated bool + if pr.Match < n { + pr.Match = n + updated = true + pr.resume() + } + if pr.Next < n+1 { + pr.Next = n + 1 + } + return updated +} + +func (pr *Progress) optimisticUpdate(n uint64) { pr.Next = n + 1 } + +// maybeDecrTo returns false if the given to index comes from an out of order message. +// Otherwise it decreases the progress next index to min(rejected, last) and returns true. +func (pr *Progress) maybeDecrTo(rejected, last uint64) bool { + if pr.State == ProgressStateReplicate { + // the rejection must be stale if the progress has matched and "rejected" + // is smaller than "match". + if rejected <= pr.Match { + return false + } + // directly decrease next to match + 1 + pr.Next = pr.Match + 1 + return true + } + + // the rejection must be stale if "rejected" does not match next - 1 + if pr.Next-1 != rejected { + return false + } + + if pr.Next = min(rejected, last+1); pr.Next < 1 { + pr.Next = 1 + } + pr.resume() + return true +} + +func (pr *Progress) pause() { pr.Paused = true } +func (pr *Progress) resume() { pr.Paused = false } + +// IsPaused returns whether sending log entries to this node has been +// paused. A node may be paused because it has rejected recent +// MsgApps, is currently waiting for a snapshot, or has reached the +// MaxInflightMsgs limit. +func (pr *Progress) IsPaused() bool { + switch pr.State { + case ProgressStateProbe: + return pr.Paused + case ProgressStateReplicate: + return pr.ins.full() + case ProgressStateSnapshot: + return true + default: + panic("unexpected state") + } +} + +func (pr *Progress) snapshotFailure() { pr.PendingSnapshot = 0 } + +// needSnapshotAbort returns true if snapshot progress's Match +// is equal or higher than the pendingSnapshot. +func (pr *Progress) needSnapshotAbort() bool { + return pr.State == ProgressStateSnapshot && pr.Match >= pr.PendingSnapshot +} + +func (pr *Progress) String() string { + return fmt.Sprintf("next = %d, match = %d, state = %s, waiting = %v, pendingSnapshot = %d", pr.Next, pr.Match, pr.State, pr.IsPaused(), pr.PendingSnapshot) +} + +type inflights struct { + // the starting index in the buffer + start int + // number of inflights in the buffer + count int + + // the size of the buffer + size int + + // buffer contains the index of the last entry + // inside one message. + buffer []uint64 +} + +func newInflights(size int) *inflights { + return &inflights{ + size: size, + } +} + +// add adds an inflight into inflights +func (in *inflights) add(inflight uint64) { + if in.full() { + panic("cannot add into a full inflights") + } + next := in.start + in.count + size := in.size + if next >= size { + next -= size + } + if next >= len(in.buffer) { + in.growBuf() + } + in.buffer[next] = inflight + in.count++ +} + +// grow the inflight buffer by doubling up to inflights.size. We grow on demand +// instead of preallocating to inflights.size to handle systems which have +// thousands of Raft groups per process. +func (in *inflights) growBuf() { + newSize := len(in.buffer) * 2 + if newSize == 0 { + newSize = 1 + } else if newSize > in.size { + newSize = in.size + } + newBuffer := make([]uint64, newSize) + copy(newBuffer, in.buffer) + in.buffer = newBuffer +} + +// freeTo frees the inflights smaller or equal to the given `to` flight. +func (in *inflights) freeTo(to uint64) { + if in.count == 0 || to < in.buffer[in.start] { + // out of the left side of the window + return + } + + i, idx := 0, in.start + for i = 0; i < in.count; i++ { + if to < in.buffer[idx] { // found the first large inflight + break + } + + // increase index and maybe rotate + size := in.size + if idx++; idx >= size { + idx -= size + } + } + // free i inflights and set new start index + in.count -= i + in.start = idx + if in.count == 0 { + // inflights is empty, reset the start index so that we don't grow the + // buffer unnecessarily. + in.start = 0 + } +} + +func (in *inflights) freeFirstOne() { in.freeTo(in.buffer[in.start]) } + +// full returns true if the inflights is full. +func (in *inflights) full() bool { + return in.count == in.size +} + +// resets frees all inflights. +func (in *inflights) reset() { + in.count = 0 + in.start = 0 +} diff --git a/deps/github.com/coreos/etcd/raft/raft.go b/deps/github.com/coreos/etcd/raft/raft.go new file mode 100644 index 000000000..29f203982 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/raft.go @@ -0,0 +1,1257 @@ +// Copyright 2015 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. + +package raft + +import ( + "bytes" + "errors" + "fmt" + "math" + "math/rand" + "sort" + "strings" + "sync" + "time" + + pb "github.com/coreos/etcd/raft/raftpb" +) + +// None is a placeholder node ID used when there is no leader. +const None uint64 = 0 +const noLimit = math.MaxUint64 + +// Possible values for StateType. +const ( + StateFollower StateType = iota + StateCandidate + StateLeader + StatePreCandidate + numStates +) + +type ReadOnlyOption int + +const ( + // ReadOnlySafe guarantees the linearizability of the read only request by + // communicating with the quorum. It is the default and suggested option. + ReadOnlySafe ReadOnlyOption = iota + // ReadOnlyLeaseBased ensures linearizability of the read only request by + // relying on the leader lease. It can be affected by clock drift. + // If the clock drift is unbounded, leader might keep the lease longer than it + // should (clock can move backward/pause without any bound). ReadIndex is not safe + // in that case. + ReadOnlyLeaseBased +) + +// Possible values for CampaignType +const ( + // campaignPreElection represents the first phase of a normal election when + // Config.PreVote is true. + campaignPreElection CampaignType = "CampaignPreElection" + // campaignElection represents a normal (time-based) election (the second phase + // of the election when Config.PreVote is true). + campaignElection CampaignType = "CampaignElection" + // campaignTransfer represents the type of leader transfer + campaignTransfer CampaignType = "CampaignTransfer" +) + +// lockedRand is a small wrapper around rand.Rand to provide +// synchronization. Only the methods needed by the code are exposed +// (e.g. Intn). +type lockedRand struct { + mu sync.Mutex + rand *rand.Rand +} + +func (r *lockedRand) Intn(n int) int { + r.mu.Lock() + v := r.rand.Intn(n) + r.mu.Unlock() + return v +} + +var globalRand = &lockedRand{ + rand: rand.New(rand.NewSource(time.Now().UnixNano())), +} + +// CampaignType represents the type of campaigning +// the reason we use the type of string instead of uint64 +// is because it's simpler to compare and fill in raft entries +type CampaignType string + +// StateType represents the role of a node in a cluster. +type StateType uint64 + +var stmap = [...]string{ + "StateFollower", + "StateCandidate", + "StateLeader", + "StatePreCandidate", +} + +func (st StateType) String() string { + return stmap[uint64(st)] +} + +// Config contains the parameters to start a raft. +type Config struct { + // ID is the identity of the local raft. ID cannot be 0. + ID uint64 + + // peers contains the IDs of all nodes (including self) in the raft cluster. It + // should only be set when starting a new raft cluster. Restarting raft from + // previous configuration will panic if peers is set. peer is private and only + // used for testing right now. + peers []uint64 + + // ElectionTick is the number of Node.Tick invocations that must pass between + // elections. That is, if a follower does not receive any message from the + // leader of current term before ElectionTick has elapsed, it will become + // candidate and start an election. ElectionTick must be greater than + // HeartbeatTick. We suggest ElectionTick = 10 * HeartbeatTick to avoid + // unnecessary leader switching. + ElectionTick int + // HeartbeatTick is the number of Node.Tick invocations that must pass between + // heartbeats. That is, a leader sends heartbeat messages to maintain its + // leadership every HeartbeatTick ticks. + HeartbeatTick int + + // Storage is the storage for raft. raft generates entries and states to be + // stored in storage. raft reads the persisted entries and states out of + // Storage when it needs. raft reads out the previous state and configuration + // out of storage when restarting. + Storage Storage + // Applied is the last applied index. It should only be set when restarting + // raft. raft will not return entries to the application smaller or equal to + // Applied. If Applied is unset when restarting, raft might return previous + // applied entries. This is a very application dependent configuration. + Applied uint64 + + // MaxSizePerMsg limits the max size of each append message. Smaller value + // lowers the raft recovery cost(initial probing and message lost during normal + // operation). On the other side, it might affect the throughput during normal + // replication. Note: math.MaxUint64 for unlimited, 0 for at most one entry per + // message. + MaxSizePerMsg uint64 + // MaxInflightMsgs limits the max number of in-flight append messages during + // optimistic replication phase. The application transportation layer usually + // has its own sending buffer over TCP/UDP. Setting MaxInflightMsgs to avoid + // overflowing that sending buffer. TODO (xiangli): feedback to application to + // limit the proposal rate? + MaxInflightMsgs int + + // CheckQuorum specifies if the leader should check quorum activity. Leader + // steps down when quorum is not active for an electionTimeout. + CheckQuorum bool + + // PreVote enables the Pre-Vote algorithm described in raft thesis section + // 9.6. This prevents disruption when a node that has been partitioned away + // rejoins the cluster. + PreVote bool + + // ReadOnlyOption specifies how the read only request is processed. + // + // ReadOnlySafe guarantees the linearizability of the read only request by + // communicating with the quorum. It is the default and suggested option. + // + // ReadOnlyLeaseBased ensures linearizability of the read only request by + // relying on the leader lease. It can be affected by clock drift. + // If the clock drift is unbounded, leader might keep the lease longer than it + // should (clock can move backward/pause without any bound). ReadIndex is not safe + // in that case. + ReadOnlyOption ReadOnlyOption + + // Logger is the logger used for raft log. For multinode which can host + // multiple raft group, each raft group can have its own logger + Logger Logger +} + +func (c *Config) validate() error { + if c.ID == None { + return errors.New("cannot use none as id") + } + + if c.HeartbeatTick <= 0 { + return errors.New("heartbeat tick must be greater than 0") + } + + if c.ElectionTick <= c.HeartbeatTick { + return errors.New("election tick must be greater than heartbeat tick") + } + + if c.Storage == nil { + return errors.New("storage cannot be nil") + } + + if c.MaxInflightMsgs <= 0 { + return errors.New("max inflight messages must be greater than 0") + } + + if c.Logger == nil { + c.Logger = raftLogger + } + + return nil +} + +type raft struct { + id uint64 + + Term uint64 + Vote uint64 + + readStates []ReadState + + // the log + raftLog *raftLog + + maxInflight int + maxMsgSize uint64 + prs map[uint64]*Progress + + state StateType + + votes map[uint64]bool + + msgs []pb.Message + + // the leader id + lead uint64 + // leadTransferee is id of the leader transfer target when its value is not zero. + // Follow the procedure defined in raft thesis 3.10. + leadTransferee uint64 + // New configuration is ignored if there exists unapplied configuration. + pendingConf bool + + readOnly *readOnly + + // number of ticks since it reached last electionTimeout when it is leader + // or candidate. + // number of ticks since it reached last electionTimeout or received a + // valid message from current leader when it is a follower. + electionElapsed int + + // number of ticks since it reached last heartbeatTimeout. + // only leader keeps heartbeatElapsed. + heartbeatElapsed int + + checkQuorum bool + preVote bool + + heartbeatTimeout int + electionTimeout int + // randomizedElectionTimeout is a random number between + // [electiontimeout, 2 * electiontimeout - 1]. It gets reset + // when raft changes its state to follower or candidate. + randomizedElectionTimeout int + + tick func() + step stepFunc + + logger Logger +} + +func newRaft(c *Config) *raft { + if err := c.validate(); err != nil { + panic(err.Error()) + } + raftlog := newLog(c.Storage, c.Logger) + hs, cs, err := c.Storage.InitialState() + if err != nil { + panic(err) // TODO(bdarnell) + } + peers := c.peers + if len(cs.Nodes) > 0 { + if len(peers) > 0 { + // TODO(bdarnell): the peers argument is always nil except in + // tests; the argument should be removed and these tests should be + // updated to specify their nodes through a snapshot. + panic("cannot specify both newRaft(peers) and ConfState.Nodes)") + } + peers = cs.Nodes + } + r := &raft{ + id: c.ID, + lead: None, + raftLog: raftlog, + maxMsgSize: c.MaxSizePerMsg, + maxInflight: c.MaxInflightMsgs, + prs: make(map[uint64]*Progress), + electionTimeout: c.ElectionTick, + heartbeatTimeout: c.HeartbeatTick, + logger: c.Logger, + checkQuorum: c.CheckQuorum, + preVote: c.PreVote, + readOnly: newReadOnly(c.ReadOnlyOption), + } + for _, p := range peers { + r.prs[p] = &Progress{Next: 1, ins: newInflights(r.maxInflight)} + } + if !isHardStateEqual(hs, emptyState) { + r.loadState(hs) + } + if c.Applied > 0 { + raftlog.appliedTo(c.Applied) + } + r.becomeFollower(r.Term, None) + + var nodesStrs []string + for _, n := range r.nodes() { + nodesStrs = append(nodesStrs, fmt.Sprintf("%x", n)) + } + + r.logger.Infof("newRaft %x [peers: [%s], term: %d, commit: %d, applied: %d, lastindex: %d, lastterm: %d]", + r.id, strings.Join(nodesStrs, ","), r.Term, r.raftLog.committed, r.raftLog.applied, r.raftLog.lastIndex(), r.raftLog.lastTerm()) + return r +} + +func (r *raft) hasLeader() bool { return r.lead != None } + +func (r *raft) softState() *SoftState { return &SoftState{Lead: r.lead, RaftState: r.state} } + +func (r *raft) hardState() pb.HardState { + return pb.HardState{ + Term: r.Term, + Vote: r.Vote, + Commit: r.raftLog.committed, + } +} + +func (r *raft) quorum() int { return len(r.prs)/2 + 1 } + +func (r *raft) nodes() []uint64 { + nodes := make([]uint64, 0, len(r.prs)) + for id := range r.prs { + nodes = append(nodes, id) + } + sort.Sort(uint64Slice(nodes)) + return nodes +} + +// send persists state to stable storage and then sends to its mailbox. +func (r *raft) send(m pb.Message) { + m.From = r.id + if m.Type == pb.MsgVote || m.Type == pb.MsgPreVote { + if m.Term == 0 { + // PreVote RPCs are sent at a term other than our actual term, so the code + // that sends these messages is responsible for setting the term. + panic(fmt.Sprintf("term should be set when sending %s", m.Type)) + } + } else { + if m.Term != 0 { + panic(fmt.Sprintf("term should not be set when sending %s (was %d)", m.Type, m.Term)) + } + // do not attach term to MsgProp, MsgReadIndex + // proposals are a way to forward to the leader and + // should be treated as local message. + // MsgReadIndex is also forwarded to leader. + if m.Type != pb.MsgProp && m.Type != pb.MsgReadIndex { + m.Term = r.Term + } + } + r.msgs = append(r.msgs, m) +} + +// sendAppend sends RPC, with entries to the given peer. +func (r *raft) sendAppend(to uint64) { + pr := r.prs[to] + if pr.IsPaused() { + return + } + m := pb.Message{} + m.To = to + + term, errt := r.raftLog.term(pr.Next - 1) + ents, erre := r.raftLog.entries(pr.Next, r.maxMsgSize) + + if errt != nil || erre != nil { // send snapshot if we failed to get term or entries + if !pr.RecentActive { + r.logger.Debugf("ignore sending snapshot to %x since it is not recently active", to) + return + } + + m.Type = pb.MsgSnap + snapshot, err := r.raftLog.snapshot() + if err != nil { + if err == ErrSnapshotTemporarilyUnavailable { + r.logger.Debugf("%x failed to send snapshot to %x because snapshot is temporarily unavailable", r.id, to) + return + } + panic(err) // TODO(bdarnell) + } + if IsEmptySnap(snapshot) { + panic("need non-empty snapshot") + } + m.Snapshot = snapshot + sindex, sterm := snapshot.Metadata.Index, snapshot.Metadata.Term + r.logger.Debugf("%x [firstindex: %d, commit: %d] sent snapshot[index: %d, term: %d] to %x [%s]", + r.id, r.raftLog.firstIndex(), r.raftLog.committed, sindex, sterm, to, pr) + pr.becomeSnapshot(sindex) + r.logger.Debugf("%x paused sending replication messages to %x [%s]", r.id, to, pr) + } else { + m.Type = pb.MsgApp + m.Index = pr.Next - 1 + m.LogTerm = term + m.Entries = ents + m.Commit = r.raftLog.committed + if n := len(m.Entries); n != 0 { + switch pr.State { + // optimistically increase the next when in ProgressStateReplicate + case ProgressStateReplicate: + last := m.Entries[n-1].Index + pr.optimisticUpdate(last) + pr.ins.add(last) + case ProgressStateProbe: + pr.pause() + default: + r.logger.Panicf("%x is sending append in unhandled state %s", r.id, pr.State) + } + } + } + r.send(m) +} + +// sendHeartbeat sends an empty MsgApp +func (r *raft) sendHeartbeat(to uint64, ctx []byte) { + // Attach the commit as min(to.matched, r.committed). + // When the leader sends out heartbeat message, + // the receiver(follower) might not be matched with the leader + // or it might not have all the committed entries. + // The leader MUST NOT forward the follower's commit to + // an unmatched index. + commit := min(r.prs[to].Match, r.raftLog.committed) + m := pb.Message{ + To: to, + Type: pb.MsgHeartbeat, + Commit: commit, + Context: ctx, + } + + r.send(m) +} + +// bcastAppend sends RPC, with entries to all peers that are not up-to-date +// according to the progress recorded in r.prs. +func (r *raft) bcastAppend() { + for id := range r.prs { + if id == r.id { + continue + } + r.sendAppend(id) + } +} + +// bcastHeartbeat sends RPC, without entries to all the peers. +func (r *raft) bcastHeartbeat() { + lastCtx := r.readOnly.lastPendingRequestCtx() + if len(lastCtx) == 0 { + r.bcastHeartbeatWithCtx(nil) + } else { + r.bcastHeartbeatWithCtx([]byte(lastCtx)) + } +} + +func (r *raft) bcastHeartbeatWithCtx(ctx []byte) { + for id := range r.prs { + if id == r.id { + continue + } + r.sendHeartbeat(id, ctx) + } +} + +// maybeCommit attempts to advance the commit index. Returns true if +// the commit index changed (in which case the caller should call +// r.bcastAppend). +func (r *raft) maybeCommit() bool { + // TODO(bmizerany): optimize.. Currently naive + mis := make(uint64Slice, 0, len(r.prs)) + for id := range r.prs { + mis = append(mis, r.prs[id].Match) + } + sort.Sort(sort.Reverse(mis)) + mci := mis[r.quorum()-1] + return r.raftLog.maybeCommit(mci, r.Term) +} + +func (r *raft) reset(term uint64) { + if r.Term != term { + r.Term = term + r.Vote = None + } + r.lead = None + + r.electionElapsed = 0 + r.heartbeatElapsed = 0 + r.resetRandomizedElectionTimeout() + + r.abortLeaderTransfer() + + r.votes = make(map[uint64]bool) + for id := range r.prs { + r.prs[id] = &Progress{Next: r.raftLog.lastIndex() + 1, ins: newInflights(r.maxInflight)} + if id == r.id { + r.prs[id].Match = r.raftLog.lastIndex() + } + } + r.pendingConf = false + r.readOnly = newReadOnly(r.readOnly.option) +} + +func (r *raft) appendEntry(es ...pb.Entry) { + li := r.raftLog.lastIndex() + for i := range es { + es[i].Term = r.Term + es[i].Index = li + 1 + uint64(i) + } + r.raftLog.append(es...) + r.prs[r.id].maybeUpdate(r.raftLog.lastIndex()) + // Regardless of maybeCommit's return, our caller will call bcastAppend. + r.maybeCommit() +} + +// tickElection is run by followers and candidates after r.electionTimeout. +func (r *raft) tickElection() { + r.electionElapsed++ + + if r.promotable() && r.pastElectionTimeout() { + r.electionElapsed = 0 + r.Step(pb.Message{From: r.id, Type: pb.MsgHup}) + } +} + +// tickHeartbeat is run by leaders to send a MsgBeat after r.heartbeatTimeout. +func (r *raft) tickHeartbeat() { + r.heartbeatElapsed++ + r.electionElapsed++ + + if r.electionElapsed >= r.electionTimeout { + r.electionElapsed = 0 + if r.checkQuorum { + r.Step(pb.Message{From: r.id, Type: pb.MsgCheckQuorum}) + } + // If current leader cannot transfer leadership in electionTimeout, it becomes leader again. + if r.state == StateLeader && r.leadTransferee != None { + r.abortLeaderTransfer() + } + } + + if r.state != StateLeader { + return + } + + if r.heartbeatElapsed >= r.heartbeatTimeout { + r.heartbeatElapsed = 0 + r.Step(pb.Message{From: r.id, Type: pb.MsgBeat}) + } +} + +func (r *raft) becomeFollower(term uint64, lead uint64) { + r.step = stepFollower + r.reset(term) + r.tick = r.tickElection + r.lead = lead + r.state = StateFollower + r.logger.Infof("%x became follower at term %d", r.id, r.Term) +} + +func (r *raft) becomeCandidate() { + // TODO(xiangli) remove the panic when the raft implementation is stable + if r.state == StateLeader { + panic("invalid transition [leader -> candidate]") + } + r.step = stepCandidate + r.reset(r.Term + 1) + r.tick = r.tickElection + r.Vote = r.id + r.state = StateCandidate + r.logger.Infof("%x became candidate at term %d", r.id, r.Term) +} + +func (r *raft) becomePreCandidate() { + // TODO(xiangli) remove the panic when the raft implementation is stable + if r.state == StateLeader { + panic("invalid transition [leader -> pre-candidate]") + } + // Becoming a pre-candidate changes our step functions and state, + // but doesn't change anything else. In particular it does not increase + // r.Term or change r.Vote. + r.step = stepCandidate + r.tick = r.tickElection + r.state = StatePreCandidate + r.logger.Infof("%x became pre-candidate at term %d", r.id, r.Term) +} + +func (r *raft) becomeLeader() { + // TODO(xiangli) remove the panic when the raft implementation is stable + if r.state == StateFollower { + panic("invalid transition [follower -> leader]") + } + r.step = stepLeader + r.reset(r.Term) + r.tick = r.tickHeartbeat + r.lead = r.id + r.state = StateLeader + ents, err := r.raftLog.entries(r.raftLog.committed+1, noLimit) + if err != nil { + r.logger.Panicf("unexpected error getting uncommitted entries (%v)", err) + } + + nconf := numOfPendingConf(ents) + if nconf > 1 { + panic("unexpected multiple uncommitted config entry") + } + if nconf == 1 { + r.pendingConf = true + } + + r.appendEntry(pb.Entry{Data: nil}) + r.logger.Infof("%x became leader at term %d", r.id, r.Term) +} + +func (r *raft) campaign(t CampaignType) { + var term uint64 + var voteMsg pb.MessageType + if t == campaignPreElection { + r.becomePreCandidate() + voteMsg = pb.MsgPreVote + // PreVote RPCs are sent for the next term before we've incremented r.Term. + term = r.Term + 1 + } else { + r.becomeCandidate() + voteMsg = pb.MsgVote + term = r.Term + } + if r.quorum() == r.poll(r.id, voteRespMsgType(voteMsg), true) { + // We won the election after voting for ourselves (which must mean that + // this is a single-node cluster). Advance to the next state. + if t == campaignPreElection { + r.campaign(campaignElection) + } else { + r.becomeLeader() + } + return + } + for id := range r.prs { + if id == r.id { + continue + } + r.logger.Infof("%x [logterm: %d, index: %d] sent %s request to %x at term %d", + r.id, r.raftLog.lastTerm(), r.raftLog.lastIndex(), voteMsg, id, r.Term) + + var ctx []byte + if t == campaignTransfer { + ctx = []byte(t) + } + r.send(pb.Message{Term: term, To: id, Type: voteMsg, Index: r.raftLog.lastIndex(), LogTerm: r.raftLog.lastTerm(), Context: ctx}) + } +} + +func (r *raft) poll(id uint64, t pb.MessageType, v bool) (granted int) { + if v { + r.logger.Infof("%x received %s from %x at term %d", r.id, t, id, r.Term) + } else { + r.logger.Infof("%x received %s rejection from %x at term %d", r.id, t, id, r.Term) + } + if _, ok := r.votes[id]; !ok { + r.votes[id] = v + } + for _, vv := range r.votes { + if vv { + granted++ + } + } + return granted +} + +func (r *raft) Step(m pb.Message) error { + // Handle the message term, which may result in our stepping down to a follower. + switch { + case m.Term == 0: + // local message + case m.Term > r.Term: + lead := m.From + if m.Type == pb.MsgVote || m.Type == pb.MsgPreVote { + force := bytes.Equal(m.Context, []byte(campaignTransfer)) + inLease := r.checkQuorum && r.lead != None && r.electionElapsed < r.electionTimeout + if !force && inLease { + // If a server receives a RequestVote request within the minimum election timeout + // of hearing from a current leader, it does not update its term or grant its vote + r.logger.Infof("%x [logterm: %d, index: %d, vote: %x] ignored %s from %x [logterm: %d, index: %d] at term %d: lease is not expired (remaining ticks: %d)", + r.id, r.raftLog.lastTerm(), r.raftLog.lastIndex(), r.Vote, m.Type, m.From, m.LogTerm, m.Index, r.Term, r.electionTimeout-r.electionElapsed) + return nil + } + lead = None + } + switch { + case m.Type == pb.MsgPreVote: + // Never change our term in response to a PreVote + case m.Type == pb.MsgPreVoteResp && !m.Reject: + // We send pre-vote requests with a term in our future. If the + // pre-vote is granted, we will increment our term when we get a + // quorum. If it is not, the term comes from the node that + // rejected our vote so we should become a follower at the new + // term. + default: + r.logger.Infof("%x [term: %d] received a %s message with higher term from %x [term: %d]", + r.id, r.Term, m.Type, m.From, m.Term) + r.becomeFollower(m.Term, lead) + } + + case m.Term < r.Term: + if r.checkQuorum && (m.Type == pb.MsgHeartbeat || m.Type == pb.MsgApp) { + // We have received messages from a leader at a lower term. It is possible + // that these messages were simply delayed in the network, but this could + // also mean that this node has advanced its term number during a network + // partition, and it is now unable to either win an election or to rejoin + // the majority on the old term. If checkQuorum is false, this will be + // handled by incrementing term numbers in response to MsgVote with a + // higher term, but if checkQuorum is true we may not advance the term on + // MsgVote and must generate other messages to advance the term. The net + // result of these two features is to minimize the disruption caused by + // nodes that have been removed from the cluster's configuration: a + // removed node will send MsgVotes (or MsgPreVotes) which will be ignored, + // but it will not receive MsgApp or MsgHeartbeat, so it will not create + // disruptive term increases + r.send(pb.Message{To: m.From, Type: pb.MsgAppResp}) + } else { + // ignore other cases + r.logger.Infof("%x [term: %d] ignored a %s message with lower term from %x [term: %d]", + r.id, r.Term, m.Type, m.From, m.Term) + } + return nil + } + + switch m.Type { + case pb.MsgHup: + if r.state != StateLeader { + ents, err := r.raftLog.slice(r.raftLog.applied+1, r.raftLog.committed+1, noLimit) + if err != nil { + r.logger.Panicf("unexpected error getting unapplied entries (%v)", err) + } + if n := numOfPendingConf(ents); n != 0 && r.raftLog.committed > r.raftLog.applied { + r.logger.Warningf("%x cannot campaign at term %d since there are still %d pending configuration changes to apply", r.id, r.Term, n) + return nil + } + + r.logger.Infof("%x is starting a new election at term %d", r.id, r.Term) + if r.preVote { + r.campaign(campaignPreElection) + } else { + r.campaign(campaignElection) + } + } else { + r.logger.Debugf("%x ignoring MsgHup because already leader", r.id) + } + + case pb.MsgVote, pb.MsgPreVote: + // The m.Term > r.Term clause is for MsgPreVote. For MsgVote m.Term should + // always equal r.Term. + if (r.Vote == None || m.Term > r.Term || r.Vote == m.From) && r.raftLog.isUpToDate(m.Index, m.LogTerm) { + r.logger.Infof("%x [logterm: %d, index: %d, vote: %x] cast %s for %x [logterm: %d, index: %d] at term %d", + r.id, r.raftLog.lastTerm(), r.raftLog.lastIndex(), r.Vote, m.Type, m.From, m.LogTerm, m.Index, r.Term) + r.send(pb.Message{To: m.From, Type: voteRespMsgType(m.Type)}) + if m.Type == pb.MsgVote { + // Only record real votes. + r.electionElapsed = 0 + r.Vote = m.From + } + } else { + r.logger.Infof("%x [logterm: %d, index: %d, vote: %x] rejected %s from %x [logterm: %d, index: %d] at term %d", + r.id, r.raftLog.lastTerm(), r.raftLog.lastIndex(), r.Vote, m.Type, m.From, m.LogTerm, m.Index, r.Term) + r.send(pb.Message{To: m.From, Type: voteRespMsgType(m.Type), Reject: true}) + } + + default: + r.step(r, m) + } + return nil +} + +type stepFunc func(r *raft, m pb.Message) + +func stepLeader(r *raft, m pb.Message) { + // These message types do not require any progress for m.From. + switch m.Type { + case pb.MsgBeat: + r.bcastHeartbeat() + return + case pb.MsgCheckQuorum: + if !r.checkQuorumActive() { + r.logger.Warningf("%x stepped down to follower since quorum is not active", r.id) + r.becomeFollower(r.Term, None) + } + return + case pb.MsgProp: + if len(m.Entries) == 0 { + r.logger.Panicf("%x stepped empty MsgProp", r.id) + } + if _, ok := r.prs[r.id]; !ok { + // If we are not currently a member of the range (i.e. this node + // was removed from the configuration while serving as leader), + // drop any new proposals. + return + } + if r.leadTransferee != None { + r.logger.Debugf("%x [term %d] transfer leadership to %x is in progress; dropping proposal", r.id, r.Term, r.leadTransferee) + return + } + + for i, e := range m.Entries { + if e.Type == pb.EntryConfChange { + if r.pendingConf { + r.logger.Infof("propose conf %s ignored since pending unapplied configuration", e.String()) + m.Entries[i] = pb.Entry{Type: pb.EntryNormal} + } + r.pendingConf = true + } + } + r.appendEntry(m.Entries...) + r.bcastAppend() + return + case pb.MsgReadIndex: + if r.quorum() > 1 { + if r.raftLog.zeroTermOnErrCompacted(r.raftLog.term(r.raftLog.committed)) != r.Term { + // Reject read only request when this leader has not committed any log entry at its term. + return + } + + // thinking: use an interally defined context instead of the user given context. + // We can express this in terms of the term and index instead of a user-supplied value. + // This would allow multiple reads to piggyback on the same message. + switch r.readOnly.option { + case ReadOnlySafe: + r.readOnly.addRequest(r.raftLog.committed, m) + r.bcastHeartbeatWithCtx(m.Entries[0].Data) + case ReadOnlyLeaseBased: + var ri uint64 + if r.checkQuorum { + ri = r.raftLog.committed + } + if m.From == None || m.From == r.id { // from local member + r.readStates = append(r.readStates, ReadState{Index: r.raftLog.committed, RequestCtx: m.Entries[0].Data}) + } else { + r.send(pb.Message{To: m.From, Type: pb.MsgReadIndexResp, Index: ri, Entries: m.Entries}) + } + } + } else { + r.readStates = append(r.readStates, ReadState{Index: r.raftLog.committed, RequestCtx: m.Entries[0].Data}) + } + + return + } + + // All other message types require a progress for m.From (pr). + pr, prOk := r.prs[m.From] + if !prOk { + r.logger.Debugf("%x no progress available for %x", r.id, m.From) + return + } + switch m.Type { + case pb.MsgAppResp: + pr.RecentActive = true + + if m.Reject { + r.logger.Debugf("%x received msgApp rejection(lastindex: %d) from %x for index %d", + r.id, m.RejectHint, m.From, m.Index) + if pr.maybeDecrTo(m.Index, m.RejectHint) { + r.logger.Debugf("%x decreased progress of %x to [%s]", r.id, m.From, pr) + if pr.State == ProgressStateReplicate { + pr.becomeProbe() + } + r.sendAppend(m.From) + } + } else { + oldPaused := pr.IsPaused() + if pr.maybeUpdate(m.Index) { + switch { + case pr.State == ProgressStateProbe: + pr.becomeReplicate() + case pr.State == ProgressStateSnapshot && pr.needSnapshotAbort(): + r.logger.Debugf("%x snapshot aborted, resumed sending replication messages to %x [%s]", r.id, m.From, pr) + pr.becomeProbe() + case pr.State == ProgressStateReplicate: + pr.ins.freeTo(m.Index) + } + + if r.maybeCommit() { + r.bcastAppend() + } else if oldPaused { + // update() reset the wait state on this node. If we had delayed sending + // an update before, send it now. + r.sendAppend(m.From) + } + // Transfer leadership is in progress. + if m.From == r.leadTransferee && pr.Match == r.raftLog.lastIndex() { + r.logger.Infof("%x sent MsgTimeoutNow to %x after received MsgAppResp", r.id, m.From) + r.sendTimeoutNow(m.From) + } + } + } + case pb.MsgHeartbeatResp: + pr.RecentActive = true + pr.resume() + + // free one slot for the full inflights window to allow progress. + if pr.State == ProgressStateReplicate && pr.ins.full() { + pr.ins.freeFirstOne() + } + if pr.Match < r.raftLog.lastIndex() { + r.sendAppend(m.From) + } + + if r.readOnly.option != ReadOnlySafe || len(m.Context) == 0 { + return + } + + ackCount := r.readOnly.recvAck(m) + if ackCount < r.quorum() { + return + } + + rss := r.readOnly.advance(m) + for _, rs := range rss { + req := rs.req + if req.From == None || req.From == r.id { // from local member + r.readStates = append(r.readStates, ReadState{Index: rs.index, RequestCtx: req.Entries[0].Data}) + } else { + r.send(pb.Message{To: req.From, Type: pb.MsgReadIndexResp, Index: rs.index, Entries: req.Entries}) + } + } + case pb.MsgSnapStatus: + if pr.State != ProgressStateSnapshot { + return + } + if !m.Reject { + pr.becomeProbe() + r.logger.Debugf("%x snapshot succeeded, resumed sending replication messages to %x [%s]", r.id, m.From, pr) + } else { + pr.snapshotFailure() + pr.becomeProbe() + r.logger.Debugf("%x snapshot failed, resumed sending replication messages to %x [%s]", r.id, m.From, pr) + } + // If snapshot finish, wait for the msgAppResp from the remote node before sending + // out the next msgApp. + // If snapshot failure, wait for a heartbeat interval before next try + pr.pause() + case pb.MsgUnreachable: + // During optimistic replication, if the remote becomes unreachable, + // there is huge probability that a MsgApp is lost. + if pr.State == ProgressStateReplicate { + pr.becomeProbe() + } + r.logger.Debugf("%x failed to send message to %x because it is unreachable [%s]", r.id, m.From, pr) + case pb.MsgTransferLeader: + leadTransferee := m.From + lastLeadTransferee := r.leadTransferee + if lastLeadTransferee != None { + if lastLeadTransferee == leadTransferee { + r.logger.Infof("%x [term %d] transfer leadership to %x is in progress, ignores request to same node %x", + r.id, r.Term, leadTransferee, leadTransferee) + return + } + r.abortLeaderTransfer() + r.logger.Infof("%x [term %d] abort previous transferring leadership to %x", r.id, r.Term, lastLeadTransferee) + } + if leadTransferee == r.id { + r.logger.Debugf("%x is already leader. Ignored transferring leadership to self", r.id) + return + } + // Transfer leadership to third party. + r.logger.Infof("%x [term %d] starts to transfer leadership to %x", r.id, r.Term, leadTransferee) + // Transfer leadership should be finished in one electionTimeout, so reset r.electionElapsed. + r.electionElapsed = 0 + r.leadTransferee = leadTransferee + if pr.Match == r.raftLog.lastIndex() { + r.sendTimeoutNow(leadTransferee) + r.logger.Infof("%x sends MsgTimeoutNow to %x immediately as %x already has up-to-date log", r.id, leadTransferee, leadTransferee) + } else { + r.sendAppend(leadTransferee) + } + } +} + +// stepCandidate is shared by StateCandidate and StatePreCandidate; the difference is +// whether they respond to MsgVoteResp or MsgPreVoteResp. +func stepCandidate(r *raft, m pb.Message) { + // Only handle vote responses corresponding to our candidacy (while in + // StateCandidate, we may get stale MsgPreVoteResp messages in this term from + // our pre-candidate state). + var myVoteRespType pb.MessageType + if r.state == StatePreCandidate { + myVoteRespType = pb.MsgPreVoteResp + } else { + myVoteRespType = pb.MsgVoteResp + } + switch m.Type { + case pb.MsgProp: + r.logger.Infof("%x no leader at term %d; dropping proposal", r.id, r.Term) + return + case pb.MsgApp: + r.becomeFollower(r.Term, m.From) + r.handleAppendEntries(m) + case pb.MsgHeartbeat: + r.becomeFollower(r.Term, m.From) + r.handleHeartbeat(m) + case pb.MsgSnap: + r.becomeFollower(m.Term, m.From) + r.handleSnapshot(m) + case myVoteRespType: + gr := r.poll(m.From, m.Type, !m.Reject) + r.logger.Infof("%x [quorum:%d] has received %d %s votes and %d vote rejections", r.id, r.quorum(), gr, m.Type, len(r.votes)-gr) + switch r.quorum() { + case gr: + if r.state == StatePreCandidate { + r.campaign(campaignElection) + } else { + r.becomeLeader() + r.bcastAppend() + } + case len(r.votes) - gr: + r.becomeFollower(r.Term, None) + } + case pb.MsgTimeoutNow: + r.logger.Debugf("%x [term %d state %v] ignored MsgTimeoutNow from %x", r.id, r.Term, r.state, m.From) + } +} + +func stepFollower(r *raft, m pb.Message) { + switch m.Type { + case pb.MsgProp: + if r.lead == None { + r.logger.Infof("%x no leader at term %d; dropping proposal", r.id, r.Term) + return + } + m.To = r.lead + r.send(m) + case pb.MsgApp: + r.electionElapsed = 0 + r.lead = m.From + r.handleAppendEntries(m) + case pb.MsgHeartbeat: + r.electionElapsed = 0 + r.lead = m.From + r.handleHeartbeat(m) + case pb.MsgSnap: + r.electionElapsed = 0 + r.lead = m.From + r.handleSnapshot(m) + case pb.MsgTransferLeader: + if r.lead == None { + r.logger.Infof("%x no leader at term %d; dropping leader transfer msg", r.id, r.Term) + return + } + m.To = r.lead + r.send(m) + case pb.MsgTimeoutNow: + if r.promotable() { + r.logger.Infof("%x [term %d] received MsgTimeoutNow from %x and starts an election to get leadership.", r.id, r.Term, m.From) + // Leadership transfers never use pre-vote even if r.preVote is true; we + // know we are not recovering from a partition so there is no need for the + // extra round trip. + r.campaign(campaignTransfer) + } else { + r.logger.Infof("%x received MsgTimeoutNow from %x but is not promotable", r.id, m.From) + } + case pb.MsgReadIndex: + if r.lead == None { + r.logger.Infof("%x no leader at term %d; dropping index reading msg", r.id, r.Term) + return + } + m.To = r.lead + r.send(m) + case pb.MsgReadIndexResp: + if len(m.Entries) != 1 { + r.logger.Errorf("%x invalid format of MsgReadIndexResp from %x, entries count: %d", r.id, m.From, len(m.Entries)) + return + } + r.readStates = append(r.readStates, ReadState{Index: m.Index, RequestCtx: m.Entries[0].Data}) + } +} + +func (r *raft) handleAppendEntries(m pb.Message) { + if m.Index < r.raftLog.committed { + r.send(pb.Message{To: m.From, Type: pb.MsgAppResp, Index: r.raftLog.committed}) + return + } + + if mlastIndex, ok := r.raftLog.maybeAppend(m.Index, m.LogTerm, m.Commit, m.Entries...); ok { + r.send(pb.Message{To: m.From, Type: pb.MsgAppResp, Index: mlastIndex}) + } else { + r.logger.Debugf("%x [logterm: %d, index: %d] rejected msgApp [logterm: %d, index: %d] from %x", + r.id, r.raftLog.zeroTermOnErrCompacted(r.raftLog.term(m.Index)), m.Index, m.LogTerm, m.Index, m.From) + r.send(pb.Message{To: m.From, Type: pb.MsgAppResp, Index: m.Index, Reject: true, RejectHint: r.raftLog.lastIndex()}) + } +} + +func (r *raft) handleHeartbeat(m pb.Message) { + r.raftLog.commitTo(m.Commit) + r.send(pb.Message{To: m.From, Type: pb.MsgHeartbeatResp, Context: m.Context}) +} + +func (r *raft) handleSnapshot(m pb.Message) { + sindex, sterm := m.Snapshot.Metadata.Index, m.Snapshot.Metadata.Term + if r.restore(m.Snapshot) { + r.logger.Infof("%x [commit: %d] restored snapshot [index: %d, term: %d]", + r.id, r.raftLog.committed, sindex, sterm) + r.send(pb.Message{To: m.From, Type: pb.MsgAppResp, Index: r.raftLog.lastIndex()}) + } else { + r.logger.Infof("%x [commit: %d] ignored snapshot [index: %d, term: %d]", + r.id, r.raftLog.committed, sindex, sterm) + r.send(pb.Message{To: m.From, Type: pb.MsgAppResp, Index: r.raftLog.committed}) + } +} + +// restore recovers the state machine from a snapshot. It restores the log and the +// configuration of state machine. +func (r *raft) restore(s pb.Snapshot) bool { + if s.Metadata.Index <= r.raftLog.committed { + return false + } + if r.raftLog.matchTerm(s.Metadata.Index, s.Metadata.Term) { + r.logger.Infof("%x [commit: %d, lastindex: %d, lastterm: %d] fast-forwarded commit to snapshot [index: %d, term: %d]", + r.id, r.raftLog.committed, r.raftLog.lastIndex(), r.raftLog.lastTerm(), s.Metadata.Index, s.Metadata.Term) + r.raftLog.commitTo(s.Metadata.Index) + return false + } + + r.logger.Infof("%x [commit: %d, lastindex: %d, lastterm: %d] starts to restore snapshot [index: %d, term: %d]", + r.id, r.raftLog.committed, r.raftLog.lastIndex(), r.raftLog.lastTerm(), s.Metadata.Index, s.Metadata.Term) + + r.raftLog.restore(s) + r.prs = make(map[uint64]*Progress) + for _, n := range s.Metadata.ConfState.Nodes { + match, next := uint64(0), r.raftLog.lastIndex()+1 + if n == r.id { + match = next - 1 + } + r.setProgress(n, match, next) + r.logger.Infof("%x restored progress of %x [%s]", r.id, n, r.prs[n]) + } + return true +} + +// promotable indicates whether state machine can be promoted to leader, +// which is true when its own id is in progress list. +func (r *raft) promotable() bool { + _, ok := r.prs[r.id] + return ok +} + +func (r *raft) addNode(id uint64) { + r.pendingConf = false + if _, ok := r.prs[id]; ok { + // Ignore any redundant addNode calls (which can happen because the + // initial bootstrapping entries are applied twice). + return + } + + r.setProgress(id, 0, r.raftLog.lastIndex()+1) + // When a node is first added, we should mark it as recently active. + // Otherwise, CheckQuorum may cause us to step down if it is invoked + // before the added node has a chance to communicate with us. + r.prs[id].RecentActive = true +} + +func (r *raft) removeNode(id uint64) { + r.delProgress(id) + r.pendingConf = false + + // do not try to commit or abort transferring if there is no nodes in the cluster. + if len(r.prs) == 0 { + return + } + + // The quorum size is now smaller, so see if any pending entries can + // be committed. + if r.maybeCommit() { + r.bcastAppend() + } + // If the removed node is the leadTransferee, then abort the leadership transferring. + if r.state == StateLeader && r.leadTransferee == id { + r.abortLeaderTransfer() + } +} + +func (r *raft) resetPendingConf() { r.pendingConf = false } + +func (r *raft) setProgress(id, match, next uint64) { + r.prs[id] = &Progress{Next: next, Match: match, ins: newInflights(r.maxInflight)} +} + +func (r *raft) delProgress(id uint64) { + delete(r.prs, id) +} + +func (r *raft) loadState(state pb.HardState) { + if state.Commit < r.raftLog.committed || state.Commit > r.raftLog.lastIndex() { + r.logger.Panicf("%x state.commit %d is out of range [%d, %d]", r.id, state.Commit, r.raftLog.committed, r.raftLog.lastIndex()) + } + r.raftLog.committed = state.Commit + r.Term = state.Term + r.Vote = state.Vote +} + +// pastElectionTimeout returns true iff r.electionElapsed is greater +// than or equal to the randomized election timeout in +// [electiontimeout, 2 * electiontimeout - 1]. +func (r *raft) pastElectionTimeout() bool { + return r.electionElapsed >= r.randomizedElectionTimeout +} + +func (r *raft) resetRandomizedElectionTimeout() { + r.randomizedElectionTimeout = r.electionTimeout + globalRand.Intn(r.electionTimeout) +} + +// checkQuorumActive returns true if the quorum is active from +// the view of the local raft state machine. Otherwise, it returns +// false. +// checkQuorumActive also resets all RecentActive to false. +func (r *raft) checkQuorumActive() bool { + var act int + + for id := range r.prs { + if id == r.id { // self is always active + act++ + continue + } + + if r.prs[id].RecentActive { + act++ + } + + r.prs[id].RecentActive = false + } + + return act >= r.quorum() +} + +func (r *raft) sendTimeoutNow(to uint64) { + r.send(pb.Message{To: to, Type: pb.MsgTimeoutNow}) +} + +func (r *raft) abortLeaderTransfer() { + r.leadTransferee = None +} + +func numOfPendingConf(ents []pb.Entry) int { + n := 0 + for i := range ents { + if ents[i].Type == pb.EntryConfChange { + n++ + } + } + return n +} diff --git a/deps/github.com/coreos/etcd/raft/raftpb/raft.pb.go b/deps/github.com/coreos/etcd/raft/raftpb/raft.pb.go new file mode 100644 index 000000000..4c6e79d58 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/raftpb/raft.pb.go @@ -0,0 +1,1942 @@ +// Code generated by protoc-gen-gogo. +// source: raft.proto +// DO NOT EDIT! + +/* + Package raftpb is a generated protocol buffer package. + + It is generated from these files: + raft.proto + + It has these top-level messages: + Entry + SnapshotMetadata + Snapshot + Message + HardState + ConfState + ConfChange +*/ +package raftpb + +import ( + "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + + 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 EntryType int32 + +const ( + EntryNormal EntryType = 0 + EntryConfChange EntryType = 1 +) + +var EntryType_name = map[int32]string{ + 0: "EntryNormal", + 1: "EntryConfChange", +} +var EntryType_value = map[string]int32{ + "EntryNormal": 0, + "EntryConfChange": 1, +} + +func (x EntryType) Enum() *EntryType { + p := new(EntryType) + *p = x + return p +} +func (x EntryType) String() string { + return proto.EnumName(EntryType_name, int32(x)) +} +func (x *EntryType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(EntryType_value, data, "EntryType") + if err != nil { + return err + } + *x = EntryType(value) + return nil +} +func (EntryType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRaft, []int{0} } + +type MessageType int32 + +const ( + MsgHup MessageType = 0 + MsgBeat MessageType = 1 + MsgProp MessageType = 2 + MsgApp MessageType = 3 + MsgAppResp MessageType = 4 + MsgVote MessageType = 5 + MsgVoteResp MessageType = 6 + MsgSnap MessageType = 7 + MsgHeartbeat MessageType = 8 + MsgHeartbeatResp MessageType = 9 + MsgUnreachable MessageType = 10 + MsgSnapStatus MessageType = 11 + MsgCheckQuorum MessageType = 12 + MsgTransferLeader MessageType = 13 + MsgTimeoutNow MessageType = 14 + MsgReadIndex MessageType = 15 + MsgReadIndexResp MessageType = 16 + MsgPreVote MessageType = 17 + MsgPreVoteResp MessageType = 18 +) + +var MessageType_name = map[int32]string{ + 0: "MsgHup", + 1: "MsgBeat", + 2: "MsgProp", + 3: "MsgApp", + 4: "MsgAppResp", + 5: "MsgVote", + 6: "MsgVoteResp", + 7: "MsgSnap", + 8: "MsgHeartbeat", + 9: "MsgHeartbeatResp", + 10: "MsgUnreachable", + 11: "MsgSnapStatus", + 12: "MsgCheckQuorum", + 13: "MsgTransferLeader", + 14: "MsgTimeoutNow", + 15: "MsgReadIndex", + 16: "MsgReadIndexResp", + 17: "MsgPreVote", + 18: "MsgPreVoteResp", +} +var MessageType_value = map[string]int32{ + "MsgHup": 0, + "MsgBeat": 1, + "MsgProp": 2, + "MsgApp": 3, + "MsgAppResp": 4, + "MsgVote": 5, + "MsgVoteResp": 6, + "MsgSnap": 7, + "MsgHeartbeat": 8, + "MsgHeartbeatResp": 9, + "MsgUnreachable": 10, + "MsgSnapStatus": 11, + "MsgCheckQuorum": 12, + "MsgTransferLeader": 13, + "MsgTimeoutNow": 14, + "MsgReadIndex": 15, + "MsgReadIndexResp": 16, + "MsgPreVote": 17, + "MsgPreVoteResp": 18, +} + +func (x MessageType) Enum() *MessageType { + p := new(MessageType) + *p = x + return p +} +func (x MessageType) String() string { + return proto.EnumName(MessageType_name, int32(x)) +} +func (x *MessageType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MessageType_value, data, "MessageType") + if err != nil { + return err + } + *x = MessageType(value) + return nil +} +func (MessageType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRaft, []int{1} } + +type ConfChangeType int32 + +const ( + ConfChangeAddNode ConfChangeType = 0 + ConfChangeRemoveNode ConfChangeType = 1 + ConfChangeUpdateNode ConfChangeType = 2 +) + +var ConfChangeType_name = map[int32]string{ + 0: "ConfChangeAddNode", + 1: "ConfChangeRemoveNode", + 2: "ConfChangeUpdateNode", +} +var ConfChangeType_value = map[string]int32{ + "ConfChangeAddNode": 0, + "ConfChangeRemoveNode": 1, + "ConfChangeUpdateNode": 2, +} + +func (x ConfChangeType) Enum() *ConfChangeType { + p := new(ConfChangeType) + *p = x + return p +} +func (x ConfChangeType) String() string { + return proto.EnumName(ConfChangeType_name, int32(x)) +} +func (x *ConfChangeType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ConfChangeType_value, data, "ConfChangeType") + if err != nil { + return err + } + *x = ConfChangeType(value) + return nil +} +func (ConfChangeType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRaft, []int{2} } + +type Entry struct { + Term uint64 `protobuf:"varint,2,opt,name=Term" json:"Term"` + Index uint64 `protobuf:"varint,3,opt,name=Index" json:"Index"` + Type EntryType `protobuf:"varint,1,opt,name=Type,enum=raftpb.EntryType" json:"Type"` + Data []byte `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Entry) Reset() { *m = Entry{} } +func (m *Entry) String() string { return proto.CompactTextString(m) } +func (*Entry) ProtoMessage() {} +func (*Entry) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{0} } + +type SnapshotMetadata struct { + ConfState ConfState `protobuf:"bytes,1,opt,name=conf_state,json=confState" json:"conf_state"` + Index uint64 `protobuf:"varint,2,opt,name=index" json:"index"` + Term uint64 `protobuf:"varint,3,opt,name=term" json:"term"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotMetadata) Reset() { *m = SnapshotMetadata{} } +func (m *SnapshotMetadata) String() string { return proto.CompactTextString(m) } +func (*SnapshotMetadata) ProtoMessage() {} +func (*SnapshotMetadata) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{1} } + +type Snapshot struct { + Data []byte `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + Metadata SnapshotMetadata `protobuf:"bytes,2,opt,name=metadata" json:"metadata"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{2} } + +type Message struct { + Type MessageType `protobuf:"varint,1,opt,name=type,enum=raftpb.MessageType" json:"type"` + To uint64 `protobuf:"varint,2,opt,name=to" json:"to"` + From uint64 `protobuf:"varint,3,opt,name=from" json:"from"` + Term uint64 `protobuf:"varint,4,opt,name=term" json:"term"` + LogTerm uint64 `protobuf:"varint,5,opt,name=logTerm" json:"logTerm"` + Index uint64 `protobuf:"varint,6,opt,name=index" json:"index"` + Entries []Entry `protobuf:"bytes,7,rep,name=entries" json:"entries"` + Commit uint64 `protobuf:"varint,8,opt,name=commit" json:"commit"` + Snapshot Snapshot `protobuf:"bytes,9,opt,name=snapshot" json:"snapshot"` + Reject bool `protobuf:"varint,10,opt,name=reject" json:"reject"` + RejectHint uint64 `protobuf:"varint,11,opt,name=rejectHint" json:"rejectHint"` + Context []byte `protobuf:"bytes,12,opt,name=context" json:"context,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{3} } + +type HardState struct { + Term uint64 `protobuf:"varint,1,opt,name=term" json:"term"` + Vote uint64 `protobuf:"varint,2,opt,name=vote" json:"vote"` + Commit uint64 `protobuf:"varint,3,opt,name=commit" json:"commit"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *HardState) Reset() { *m = HardState{} } +func (m *HardState) String() string { return proto.CompactTextString(m) } +func (*HardState) ProtoMessage() {} +func (*HardState) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{4} } + +type ConfState struct { + Nodes []uint64 `protobuf:"varint,1,rep,name=nodes" json:"nodes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ConfState) Reset() { *m = ConfState{} } +func (m *ConfState) String() string { return proto.CompactTextString(m) } +func (*ConfState) ProtoMessage() {} +func (*ConfState) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{5} } + +type ConfChange struct { + ID uint64 `protobuf:"varint,1,opt,name=ID" json:"ID"` + Type ConfChangeType `protobuf:"varint,2,opt,name=Type,enum=raftpb.ConfChangeType" json:"Type"` + NodeID uint64 `protobuf:"varint,3,opt,name=NodeID" json:"NodeID"` + Context []byte `protobuf:"bytes,4,opt,name=Context" json:"Context,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ConfChange) Reset() { *m = ConfChange{} } +func (m *ConfChange) String() string { return proto.CompactTextString(m) } +func (*ConfChange) ProtoMessage() {} +func (*ConfChange) Descriptor() ([]byte, []int) { return fileDescriptorRaft, []int{6} } + +func init() { + proto.RegisterType((*Entry)(nil), "raftpb.Entry") + proto.RegisterType((*SnapshotMetadata)(nil), "raftpb.SnapshotMetadata") + proto.RegisterType((*Snapshot)(nil), "raftpb.Snapshot") + proto.RegisterType((*Message)(nil), "raftpb.Message") + proto.RegisterType((*HardState)(nil), "raftpb.HardState") + proto.RegisterType((*ConfState)(nil), "raftpb.ConfState") + proto.RegisterType((*ConfChange)(nil), "raftpb.ConfChange") + proto.RegisterEnum("raftpb.EntryType", EntryType_name, EntryType_value) + proto.RegisterEnum("raftpb.MessageType", MessageType_name, MessageType_value) + proto.RegisterEnum("raftpb.ConfChangeType", ConfChangeType_name, ConfChangeType_value) +} +func (m *Entry) 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 *Entry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Type)) + dAtA[i] = 0x10 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Term)) + dAtA[i] = 0x18 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Index)) + if m.Data != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintRaft(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SnapshotMetadata) 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 *SnapshotMetadata) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.ConfState.Size())) + n1, err := m.ConfState.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + dAtA[i] = 0x10 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Index)) + dAtA[i] = 0x18 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Term)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Data != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintRaft(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + dAtA[i] = 0x12 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Metadata.Size())) + n2, err := m.Metadata.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 *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Type)) + dAtA[i] = 0x10 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.To)) + dAtA[i] = 0x18 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.From)) + dAtA[i] = 0x20 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Term)) + dAtA[i] = 0x28 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.LogTerm)) + dAtA[i] = 0x30 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Index)) + if len(m.Entries) > 0 { + for _, msg := range m.Entries { + dAtA[i] = 0x3a + i++ + i = encodeVarintRaft(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + dAtA[i] = 0x40 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Commit)) + dAtA[i] = 0x4a + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Snapshot.Size())) + n3, err := m.Snapshot.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + dAtA[i] = 0x50 + i++ + if m.Reject { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x58 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.RejectHint)) + if m.Context != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintRaft(dAtA, i, uint64(len(m.Context))) + i += copy(dAtA[i:], m.Context) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *HardState) 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 *HardState) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Term)) + dAtA[i] = 0x10 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Vote)) + dAtA[i] = 0x18 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Commit)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ConfState) 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 *ConfState) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Nodes) > 0 { + for _, num := range m.Nodes { + dAtA[i] = 0x8 + i++ + i = encodeVarintRaft(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ConfChange) 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 *ConfChange) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.ID)) + dAtA[i] = 0x10 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.Type)) + dAtA[i] = 0x18 + i++ + i = encodeVarintRaft(dAtA, i, uint64(m.NodeID)) + if m.Context != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintRaft(dAtA, i, uint64(len(m.Context))) + i += copy(dAtA[i:], m.Context) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Raft(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 encodeFixed32Raft(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 encodeVarintRaft(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 *Entry) Size() (n int) { + var l int + _ = l + n += 1 + sovRaft(uint64(m.Type)) + n += 1 + sovRaft(uint64(m.Term)) + n += 1 + sovRaft(uint64(m.Index)) + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovRaft(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SnapshotMetadata) Size() (n int) { + var l int + _ = l + l = m.ConfState.Size() + n += 1 + l + sovRaft(uint64(l)) + n += 1 + sovRaft(uint64(m.Index)) + n += 1 + sovRaft(uint64(m.Term)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Snapshot) Size() (n int) { + var l int + _ = l + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovRaft(uint64(l)) + } + l = m.Metadata.Size() + n += 1 + l + sovRaft(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Message) Size() (n int) { + var l int + _ = l + n += 1 + sovRaft(uint64(m.Type)) + n += 1 + sovRaft(uint64(m.To)) + n += 1 + sovRaft(uint64(m.From)) + n += 1 + sovRaft(uint64(m.Term)) + n += 1 + sovRaft(uint64(m.LogTerm)) + n += 1 + sovRaft(uint64(m.Index)) + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovRaft(uint64(l)) + } + } + n += 1 + sovRaft(uint64(m.Commit)) + l = m.Snapshot.Size() + n += 1 + l + sovRaft(uint64(l)) + n += 2 + n += 1 + sovRaft(uint64(m.RejectHint)) + if m.Context != nil { + l = len(m.Context) + n += 1 + l + sovRaft(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HardState) Size() (n int) { + var l int + _ = l + n += 1 + sovRaft(uint64(m.Term)) + n += 1 + sovRaft(uint64(m.Vote)) + n += 1 + sovRaft(uint64(m.Commit)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ConfState) Size() (n int) { + var l int + _ = l + if len(m.Nodes) > 0 { + for _, e := range m.Nodes { + n += 1 + sovRaft(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ConfChange) Size() (n int) { + var l int + _ = l + n += 1 + sovRaft(uint64(m.ID)) + n += 1 + sovRaft(uint64(m.Type)) + n += 1 + sovRaft(uint64(m.NodeID)) + if m.Context != nil { + l = len(m.Context) + n += 1 + l + sovRaft(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovRaft(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozRaft(x uint64) (n int) { + return sovRaft(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Entry) 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 ErrIntOverflowRaft + } + 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: Entry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Entry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (EntryType(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) + } + m.Term = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Term |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRaft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRaft + } + 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 *SnapshotMetadata) 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 ErrIntOverflowRaft + } + 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: SnapshotMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConfState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ConfState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) + } + m.Term = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Term |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRaft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRaft + } + 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 *Snapshot) 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 ErrIntOverflowRaft + } + 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: Snapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRaft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRaft + } + 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 *Message) 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 ErrIntOverflowRaft + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (MessageType(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) + } + m.To = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.To |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) + } + m.From = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.From |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) + } + m.Term = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Term |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LogTerm", wireType) + } + m.LogTerm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LogTerm |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, Entry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) + } + m.Commit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Commit |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Snapshot.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reject", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Reject = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RejectHint", wireType) + } + m.RejectHint = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RejectHint |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) + if m.Context == nil { + m.Context = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRaft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRaft + } + 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 *HardState) 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 ErrIntOverflowRaft + } + 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: HardState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HardState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) + } + m.Term = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Term |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + m.Vote = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Vote |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) + } + m.Commit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Commit |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRaft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRaft + } + 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 *ConfState) 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 ErrIntOverflowRaft + } + 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: ConfState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Nodes = append(m.Nodes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Nodes = append(m.Nodes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipRaft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRaft + } + 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 *ConfChange) 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 ErrIntOverflowRaft + } + 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: ConfChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + m.ID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (ConfChangeType(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType) + } + m.NodeID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NodeID |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRaft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRaft + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...) + if m.Context == nil { + m.Context = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRaft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRaft + } + 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 skipRaft(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, ErrIntOverflowRaft + } + 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, ErrIntOverflowRaft + } + 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, ErrIntOverflowRaft + } + 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, ErrInvalidLengthRaft + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRaft + } + 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 := skipRaft(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 ( + ErrInvalidLengthRaft = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRaft = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("raft.proto", fileDescriptorRaft) } + +var fileDescriptorRaft = []byte{ + // 790 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x54, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x16, 0x29, 0xea, 0x6f, 0x28, 0xcb, 0xab, 0xb5, 0x5a, 0x2c, 0x0c, 0x43, 0x55, 0x85, 0x1e, + 0x04, 0x17, 0x76, 0x5b, 0x1d, 0x7a, 0xe8, 0xcd, 0x96, 0x0a, 0x58, 0x40, 0x65, 0xb8, 0xb2, 0xdc, + 0x43, 0x83, 0x20, 0x58, 0x8b, 0x2b, 0x4a, 0x89, 0xc9, 0x25, 0x96, 0x2b, 0xc7, 0xbe, 0x04, 0x79, + 0x80, 0x3c, 0x40, 0x2e, 0x79, 0x1f, 0x1f, 0x0d, 0xe4, 0x1e, 0xc4, 0xce, 0x8b, 0x04, 0xbb, 0x5c, + 0x4a, 0x94, 0x74, 0xdb, 0xf9, 0xbe, 0xe1, 0xcc, 0x37, 0xdf, 0xce, 0x12, 0x40, 0xd0, 0xa9, 0x3c, + 0x8e, 0x04, 0x97, 0x1c, 0x17, 0xd5, 0x39, 0xba, 0xde, 0x6f, 0xf8, 0xdc, 0xe7, 0x1a, 0xfa, 0x4d, + 0x9d, 0x12, 0xb6, 0xfd, 0x0e, 0x0a, 0x7f, 0x87, 0x52, 0xdc, 0xe3, 0x5f, 0xc1, 0x19, 0xdf, 0x47, + 0x8c, 0x58, 0x2d, 0xab, 0x53, 0xeb, 0xd6, 0x8f, 0x93, 0xaf, 0x8e, 0x35, 0xa9, 0x88, 0x53, 0xe7, + 0xe1, 0xcb, 0x4f, 0xb9, 0x91, 0x4e, 0xc2, 0x04, 0x9c, 0x31, 0x13, 0x01, 0xb1, 0x5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, 0x80, 0xca, 0xf2, 0xc9, + 0xe3, 0x5d, 0x70, 0x75, 0x70, 0xce, 0x45, 0x40, 0x6f, 0x50, 0x0e, 0xef, 0xc1, 0xae, 0x06, 0x56, + 0x8d, 0x91, 0x75, 0xf8, 0xd9, 0x06, 0x37, 0xb3, 0xc4, 0x18, 0xa0, 0x38, 0x8c, 0xfd, 0xb3, 0x45, + 0x84, 0x72, 0xd8, 0x85, 0xd2, 0x30, 0xf6, 0x4f, 0x19, 0x95, 0xc8, 0x32, 0xc1, 0x85, 0xe0, 0x11, + 0xb2, 0x4d, 0xd6, 0x49, 0x14, 0xa1, 0x3c, 0xae, 0x01, 0x24, 0xe7, 0x11, 0x8b, 0x23, 0xe4, 0x98, + 0xc4, 0xff, 0xb8, 0x64, 0xa8, 0xa0, 0x44, 0x98, 0x40, 0xb3, 0x45, 0xc3, 0xaa, 0x85, 0x41, 0x25, + 0x8c, 0xa0, 0xaa, 0x9a, 0x31, 0x2a, 0xe4, 0xb5, 0xea, 0x52, 0xc6, 0x0d, 0x40, 0x59, 0x44, 0x7f, + 0x54, 0xc1, 0x18, 0x6a, 0xc3, 0xd8, 0xbf, 0x0a, 0x05, 0xa3, 0x93, 0x19, 0xbd, 0xbe, 0x61, 0x08, + 0x70, 0x1d, 0x76, 0x4c, 0x21, 0x75, 0x41, 0x8b, 0x18, 0xb9, 0x26, 0xad, 0x37, 0x63, 0x93, 0x37, + 0xff, 0x2e, 0xb8, 0x58, 0x04, 0xa8, 0x8a, 0x7f, 0x80, 0xfa, 0x30, 0xf6, 0xc7, 0x82, 0x86, 0xf1, + 0x94, 0x89, 0x7f, 0x18, 0xf5, 0x98, 0x40, 0x3b, 0xe6, 0xeb, 0xf1, 0x3c, 0x60, 0x7c, 0x21, 0xcf, + 0xf9, 0x5b, 0x54, 0x33, 0x62, 0x46, 0x8c, 0x7a, 0xfa, 0x87, 0x87, 0x76, 0x8d, 0x98, 0x25, 0xa2, + 0xc5, 0x20, 0x33, 0xef, 0x85, 0x60, 0x7a, 0xc4, 0xba, 0xe9, 0x6a, 0x62, 0x9d, 0x83, 0x0f, 0x5f, + 0x40, 0x6d, 0xfd, 0x7a, 0x95, 0x8e, 0x15, 0x72, 0xe2, 0x79, 0xea, 0x2e, 0x51, 0x0e, 0x13, 0x68, + 0xac, 0xe0, 0x11, 0x0b, 0xf8, 0x2d, 0xd3, 0x8c, 0xb5, 0xce, 0x5c, 0x45, 0x1e, 0x95, 0x09, 0x63, + 0x9f, 0x92, 0x87, 0xa7, 0x66, 0xee, 0xf1, 0xa9, 0x99, 0x7b, 0x78, 0x6e, 0x5a, 0x8f, 0xcf, 0x4d, + 0xeb, 0xeb, 0x73, 0xd3, 0xfa, 0xf8, 0xad, 0x99, 0xfb, 0x1e, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x30, + 0x01, 0x41, 0x3a, 0x06, 0x00, 0x00, +} diff --git a/deps/github.com/coreos/etcd/raft/raftpb/raft.proto b/deps/github.com/coreos/etcd/raft/raftpb/raft.proto new file mode 100644 index 000000000..806a43634 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/raftpb/raft.proto @@ -0,0 +1,93 @@ +syntax = "proto2"; +package raftpb; + +import "gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_getters_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; + +enum EntryType { + EntryNormal = 0; + EntryConfChange = 1; +} + +message Entry { + optional uint64 Term = 2 [(gogoproto.nullable) = false]; // must be 64-bit aligned for atomic operations + optional uint64 Index = 3 [(gogoproto.nullable) = false]; // must be 64-bit aligned for atomic operations + optional EntryType Type = 1 [(gogoproto.nullable) = false]; + optional bytes Data = 4; +} + +message SnapshotMetadata { + optional ConfState conf_state = 1 [(gogoproto.nullable) = false]; + optional uint64 index = 2 [(gogoproto.nullable) = false]; + optional uint64 term = 3 [(gogoproto.nullable) = false]; +} + +message Snapshot { + optional bytes data = 1; + optional SnapshotMetadata metadata = 2 [(gogoproto.nullable) = false]; +} + +enum MessageType { + MsgHup = 0; + MsgBeat = 1; + MsgProp = 2; + MsgApp = 3; + MsgAppResp = 4; + MsgVote = 5; + MsgVoteResp = 6; + MsgSnap = 7; + MsgHeartbeat = 8; + MsgHeartbeatResp = 9; + MsgUnreachable = 10; + MsgSnapStatus = 11; + MsgCheckQuorum = 12; + MsgTransferLeader = 13; + MsgTimeoutNow = 14; + MsgReadIndex = 15; + MsgReadIndexResp = 16; + MsgPreVote = 17; + MsgPreVoteResp = 18; +} + +message Message { + optional MessageType type = 1 [(gogoproto.nullable) = false]; + optional uint64 to = 2 [(gogoproto.nullable) = false]; + optional uint64 from = 3 [(gogoproto.nullable) = false]; + optional uint64 term = 4 [(gogoproto.nullable) = false]; + optional uint64 logTerm = 5 [(gogoproto.nullable) = false]; + optional uint64 index = 6 [(gogoproto.nullable) = false]; + repeated Entry entries = 7 [(gogoproto.nullable) = false]; + optional uint64 commit = 8 [(gogoproto.nullable) = false]; + optional Snapshot snapshot = 9 [(gogoproto.nullable) = false]; + optional bool reject = 10 [(gogoproto.nullable) = false]; + optional uint64 rejectHint = 11 [(gogoproto.nullable) = false]; + optional bytes context = 12; +} + +message HardState { + optional uint64 term = 1 [(gogoproto.nullable) = false]; + optional uint64 vote = 2 [(gogoproto.nullable) = false]; + optional uint64 commit = 3 [(gogoproto.nullable) = false]; +} + +message ConfState { + repeated uint64 nodes = 1; +} + +enum ConfChangeType { + ConfChangeAddNode = 0; + ConfChangeRemoveNode = 1; + ConfChangeUpdateNode = 2; +} + +message ConfChange { + optional uint64 ID = 1 [(gogoproto.nullable) = false]; + optional ConfChangeType Type = 2 [(gogoproto.nullable) = false]; + optional uint64 NodeID = 3 [(gogoproto.nullable) = false]; + optional bytes Context = 4; +} diff --git a/deps/github.com/coreos/etcd/raft/rawnode.go b/deps/github.com/coreos/etcd/raft/rawnode.go new file mode 100644 index 000000000..b950d5169 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/rawnode.go @@ -0,0 +1,264 @@ +// Copyright 2015 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. + +package raft + +import ( + "errors" + + pb "github.com/coreos/etcd/raft/raftpb" +) + +// ErrStepLocalMsg is returned when try to step a local raft message +var ErrStepLocalMsg = errors.New("raft: cannot step raft local message") + +// ErrStepPeerNotFound is returned when try to step a response message +// but there is no peer found in raft.prs for that node. +var ErrStepPeerNotFound = errors.New("raft: cannot step as peer not found") + +// RawNode is a thread-unsafe Node. +// The methods of this struct correspond to the methods of Node and are described +// more fully there. +type RawNode struct { + raft *raft + prevSoftSt *SoftState + prevHardSt pb.HardState +} + +func (rn *RawNode) newReady() Ready { + return newReady(rn.raft, rn.prevSoftSt, rn.prevHardSt) +} + +func (rn *RawNode) commitReady(rd Ready) { + if rd.SoftState != nil { + rn.prevSoftSt = rd.SoftState + } + if !IsEmptyHardState(rd.HardState) { + rn.prevHardSt = rd.HardState + } + if rn.prevHardSt.Commit != 0 { + // In most cases, prevHardSt and rd.HardState will be the same + // because when there are new entries to apply we just sent a + // HardState with an updated Commit value. However, on initial + // startup the two are different because we don't send a HardState + // until something changes, but we do send any un-applied but + // committed entries (and previously-committed entries may be + // incorporated into the snapshot, even if rd.CommittedEntries is + // empty). Therefore we mark all committed entries as applied + // whether they were included in rd.HardState or not. + rn.raft.raftLog.appliedTo(rn.prevHardSt.Commit) + } + if len(rd.Entries) > 0 { + e := rd.Entries[len(rd.Entries)-1] + rn.raft.raftLog.stableTo(e.Index, e.Term) + } + if !IsEmptySnap(rd.Snapshot) { + rn.raft.raftLog.stableSnapTo(rd.Snapshot.Metadata.Index) + } + if len(rd.ReadStates) != 0 { + rn.raft.readStates = nil + } +} + +// NewRawNode returns a new RawNode given configuration and a list of raft peers. +func NewRawNode(config *Config, peers []Peer) (*RawNode, error) { + if config.ID == 0 { + panic("config.ID must not be zero") + } + r := newRaft(config) + rn := &RawNode{ + raft: r, + } + lastIndex, err := config.Storage.LastIndex() + if err != nil { + panic(err) // TODO(bdarnell) + } + // If the log is empty, this is a new RawNode (like StartNode); otherwise it's + // restoring an existing RawNode (like RestartNode). + // TODO(bdarnell): rethink RawNode initialization and whether the application needs + // to be able to tell us when it expects the RawNode to exist. + if lastIndex == 0 { + r.becomeFollower(1, None) + ents := make([]pb.Entry, len(peers)) + for i, peer := range peers { + cc := pb.ConfChange{Type: pb.ConfChangeAddNode, NodeID: peer.ID, Context: peer.Context} + data, err := cc.Marshal() + if err != nil { + panic("unexpected marshal error") + } + + ents[i] = pb.Entry{Type: pb.EntryConfChange, Term: 1, Index: uint64(i + 1), Data: data} + } + r.raftLog.append(ents...) + r.raftLog.committed = uint64(len(ents)) + for _, peer := range peers { + r.addNode(peer.ID) + } + } + + // Set the initial hard and soft states after performing all initialization. + rn.prevSoftSt = r.softState() + if lastIndex == 0 { + rn.prevHardSt = emptyState + } else { + rn.prevHardSt = r.hardState() + } + + return rn, nil +} + +// Tick advances the internal logical clock by a single tick. +func (rn *RawNode) Tick() { + rn.raft.tick() +} + +// TickQuiesced advances the internal logical clock by a single tick without +// performing any other state machine processing. It allows the caller to avoid +// periodic heartbeats and elections when all of the peers in a Raft group are +// known to be at the same state. Expected usage is to periodically invoke Tick +// or TickQuiesced depending on whether the group is "active" or "quiesced". +// +// WARNING: Be very careful about using this method as it subverts the Raft +// state machine. You should probably be using Tick instead. +func (rn *RawNode) TickQuiesced() { + rn.raft.electionElapsed++ +} + +// Campaign causes this RawNode to transition to candidate state. +func (rn *RawNode) Campaign() error { + return rn.raft.Step(pb.Message{ + Type: pb.MsgHup, + }) +} + +// Propose proposes data be appended to the raft log. +func (rn *RawNode) Propose(data []byte) error { + return rn.raft.Step(pb.Message{ + Type: pb.MsgProp, + From: rn.raft.id, + Entries: []pb.Entry{ + {Data: data}, + }}) +} + +// ProposeConfChange proposes a config change. +func (rn *RawNode) ProposeConfChange(cc pb.ConfChange) error { + data, err := cc.Marshal() + if err != nil { + return err + } + return rn.raft.Step(pb.Message{ + Type: pb.MsgProp, + Entries: []pb.Entry{ + {Type: pb.EntryConfChange, Data: data}, + }, + }) +} + +// ApplyConfChange applies a config change to the local node. +func (rn *RawNode) ApplyConfChange(cc pb.ConfChange) *pb.ConfState { + if cc.NodeID == None { + rn.raft.resetPendingConf() + return &pb.ConfState{Nodes: rn.raft.nodes()} + } + switch cc.Type { + case pb.ConfChangeAddNode: + rn.raft.addNode(cc.NodeID) + case pb.ConfChangeRemoveNode: + rn.raft.removeNode(cc.NodeID) + case pb.ConfChangeUpdateNode: + rn.raft.resetPendingConf() + default: + panic("unexpected conf type") + } + return &pb.ConfState{Nodes: rn.raft.nodes()} +} + +// Step advances the state machine using the given message. +func (rn *RawNode) Step(m pb.Message) error { + // ignore unexpected local messages receiving over network + if IsLocalMsg(m.Type) { + return ErrStepLocalMsg + } + if _, ok := rn.raft.prs[m.From]; ok || !IsResponseMsg(m.Type) { + return rn.raft.Step(m) + } + return ErrStepPeerNotFound +} + +// Ready returns the current point-in-time state of this RawNode. +func (rn *RawNode) Ready() Ready { + rd := rn.newReady() + rn.raft.msgs = nil + return rd +} + +// HasReady called when RawNode user need to check if any Ready pending. +// Checking logic in this method should be consistent with Ready.containsUpdates(). +func (rn *RawNode) HasReady() bool { + r := rn.raft + if !r.softState().equal(rn.prevSoftSt) { + return true + } + if hardSt := r.hardState(); !IsEmptyHardState(hardSt) && !isHardStateEqual(hardSt, rn.prevHardSt) { + return true + } + if r.raftLog.unstable.snapshot != nil && !IsEmptySnap(*r.raftLog.unstable.snapshot) { + return true + } + if len(r.msgs) > 0 || len(r.raftLog.unstableEntries()) > 0 || r.raftLog.hasNextEnts() { + return true + } + if len(r.readStates) != 0 { + return true + } + return false +} + +// Advance notifies the RawNode that the application has applied and saved progress in the +// last Ready results. +func (rn *RawNode) Advance(rd Ready) { + rn.commitReady(rd) +} + +// Status returns the current status of the given group. +func (rn *RawNode) Status() *Status { + status := getStatus(rn.raft) + return &status +} + +// ReportUnreachable reports the given node is not reachable for the last send. +func (rn *RawNode) ReportUnreachable(id uint64) { + _ = rn.raft.Step(pb.Message{Type: pb.MsgUnreachable, From: id}) +} + +// ReportSnapshot reports the status of the sent snapshot. +func (rn *RawNode) ReportSnapshot(id uint64, status SnapshotStatus) { + rej := status == SnapshotFailure + + _ = rn.raft.Step(pb.Message{Type: pb.MsgSnapStatus, From: id, Reject: rej}) +} + +// TransferLeader tries to transfer leadership to the given transferee. +func (rn *RawNode) TransferLeader(transferee uint64) { + _ = rn.raft.Step(pb.Message{Type: pb.MsgTransferLeader, From: transferee}) +} + +// ReadIndex requests a read state. The read state will be set in ready. +// Read State has a read index. Once the application advances further than the read +// index, any linearizable read requests issued before the read request can be +// processed safely. The read state will have the same rctx attached. +func (rn *RawNode) ReadIndex(rctx []byte) { + _ = rn.raft.Step(pb.Message{Type: pb.MsgReadIndex, Entries: []pb.Entry{{Data: rctx}}}) +} diff --git a/deps/github.com/coreos/etcd/raft/read_only.go b/deps/github.com/coreos/etcd/raft/read_only.go new file mode 100644 index 000000000..d0085237e --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/read_only.go @@ -0,0 +1,118 @@ +// 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. + +package raft + +import pb "github.com/coreos/etcd/raft/raftpb" + +// ReadState provides state for read only query. +// It's caller's responsibility to call ReadIndex first before getting +// this state from ready, It's also caller's duty to differentiate if this +// state is what it requests through RequestCtx, eg. given a unique id as +// RequestCtx +type ReadState struct { + Index uint64 + RequestCtx []byte +} + +type readIndexStatus struct { + req pb.Message + index uint64 + acks map[uint64]struct{} +} + +type readOnly struct { + option ReadOnlyOption + pendingReadIndex map[string]*readIndexStatus + readIndexQueue []string +} + +func newReadOnly(option ReadOnlyOption) *readOnly { + return &readOnly{ + option: option, + pendingReadIndex: make(map[string]*readIndexStatus), + } +} + +// addRequest adds a read only reuqest into readonly struct. +// `index` is the commit index of the raft state machine when it received +// the read only request. +// `m` is the original read only request message from the local or remote node. +func (ro *readOnly) addRequest(index uint64, m pb.Message) { + ctx := string(m.Entries[0].Data) + if _, ok := ro.pendingReadIndex[ctx]; ok { + return + } + ro.pendingReadIndex[ctx] = &readIndexStatus{index: index, req: m, acks: make(map[uint64]struct{})} + ro.readIndexQueue = append(ro.readIndexQueue, ctx) +} + +// recvAck notifies the readonly struct that the raft state machine received +// an acknowledgment of the heartbeat that attached with the read only request +// context. +func (ro *readOnly) recvAck(m pb.Message) int { + rs, ok := ro.pendingReadIndex[string(m.Context)] + if !ok { + return 0 + } + + rs.acks[m.From] = struct{}{} + // add one to include an ack from local node + return len(rs.acks) + 1 +} + +// advance advances the read only request queue kept by the readonly struct. +// It dequeues the requests until it finds the read only request that has +// the same context as the given `m`. +func (ro *readOnly) advance(m pb.Message) []*readIndexStatus { + var ( + i int + found bool + ) + + ctx := string(m.Context) + rss := []*readIndexStatus{} + + for _, okctx := range ro.readIndexQueue { + i++ + rs, ok := ro.pendingReadIndex[okctx] + if !ok { + panic("cannot find corresponding read state from pending map") + } + rss = append(rss, rs) + if okctx == ctx { + found = true + break + } + } + + if found { + ro.readIndexQueue = ro.readIndexQueue[i:] + for _, rs := range rss { + delete(ro.pendingReadIndex, string(rs.req.Entries[0].Data)) + } + return rss + } + + return nil +} + +// lastPendingRequestCtx returns the context of the last pending read only +// request in readonly struct. +func (ro *readOnly) lastPendingRequestCtx() string { + if len(ro.readIndexQueue) == 0 { + return "" + } + return ro.readIndexQueue[len(ro.readIndexQueue)-1] +} diff --git a/deps/github.com/coreos/etcd/raft/status.go b/deps/github.com/coreos/etcd/raft/status.go new file mode 100644 index 000000000..b690fa56b --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/status.go @@ -0,0 +1,76 @@ +// Copyright 2015 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. + +package raft + +import ( + "fmt" + + pb "github.com/coreos/etcd/raft/raftpb" +) + +type Status struct { + ID uint64 + + pb.HardState + SoftState + + Applied uint64 + Progress map[uint64]Progress +} + +// getStatus gets a copy of the current raft status. +func getStatus(r *raft) Status { + s := Status{ID: r.id} + s.HardState = r.hardState() + s.SoftState = *r.softState() + + s.Applied = r.raftLog.applied + + if s.RaftState == StateLeader { + s.Progress = make(map[uint64]Progress) + for id, p := range r.prs { + s.Progress[id] = *p + } + } + + return s +} + +// MarshalJSON translates the raft status into JSON. +// TODO: try to simplify this by introducing ID type into raft +func (s Status) MarshalJSON() ([]byte, error) { + j := fmt.Sprintf(`{"id":"%x","term":%d,"vote":"%x","commit":%d,"lead":"%x","raftState":%q,"progress":{`, + s.ID, s.Term, s.Vote, s.Commit, s.Lead, s.RaftState) + + if len(s.Progress) == 0 { + j += "}}" + } else { + for k, v := range s.Progress { + subj := fmt.Sprintf(`"%x":{"match":%d,"next":%d,"state":%q},`, k, v.Match, v.Next, v.State) + j += subj + } + // remove the trailing "," + j = j[:len(j)-1] + "}}" + } + return []byte(j), nil +} + +func (s Status) String() string { + b, err := s.MarshalJSON() + if err != nil { + raftLogger.Panicf("unexpected error: %v", err) + } + return string(b) +} diff --git a/deps/github.com/coreos/etcd/raft/storage.go b/deps/github.com/coreos/etcd/raft/storage.go new file mode 100644 index 000000000..69c3a7d90 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/storage.go @@ -0,0 +1,271 @@ +// Copyright 2015 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. + +package raft + +import ( + "errors" + "sync" + + pb "github.com/coreos/etcd/raft/raftpb" +) + +// ErrCompacted is returned by Storage.Entries/Compact when a requested +// index is unavailable because it predates the last snapshot. +var ErrCompacted = errors.New("requested index is unavailable due to compaction") + +// ErrSnapOutOfDate is returned by Storage.CreateSnapshot when a requested +// index is older than the existing snapshot. +var ErrSnapOutOfDate = errors.New("requested index is older than the existing snapshot") + +// ErrUnavailable is returned by Storage interface when the requested log entries +// are unavailable. +var ErrUnavailable = errors.New("requested entry at index is unavailable") + +// ErrSnapshotTemporarilyUnavailable is returned by the Storage interface when the required +// snapshot is temporarily unavailable. +var ErrSnapshotTemporarilyUnavailable = errors.New("snapshot is temporarily unavailable") + +// Storage is an interface that may be implemented by the application +// to retrieve log entries from storage. +// +// If any Storage method returns an error, the raft instance will +// become inoperable and refuse to participate in elections; the +// application is responsible for cleanup and recovery in this case. +type Storage interface { + // InitialState returns the saved HardState and ConfState information. + InitialState() (pb.HardState, pb.ConfState, error) + // Entries returns a slice of log entries in the range [lo,hi). + // MaxSize limits the total size of the log entries returned, but + // Entries returns at least one entry if any. + Entries(lo, hi, maxSize uint64) ([]pb.Entry, error) + // Term returns the term of entry i, which must be in the range + // [FirstIndex()-1, LastIndex()]. The term of the entry before + // FirstIndex is retained for matching purposes even though the + // rest of that entry may not be available. + Term(i uint64) (uint64, error) + // LastIndex returns the index of the last entry in the log. + LastIndex() (uint64, error) + // FirstIndex returns the index of the first log entry that is + // possibly available via Entries (older entries have been incorporated + // into the latest Snapshot; if storage only contains the dummy entry the + // first log entry is not available). + FirstIndex() (uint64, error) + // Snapshot returns the most recent snapshot. + // If snapshot is temporarily unavailable, it should return ErrSnapshotTemporarilyUnavailable, + // so raft state machine could know that Storage needs some time to prepare + // snapshot and call Snapshot later. + Snapshot() (pb.Snapshot, error) +} + +// MemoryStorage implements the Storage interface backed by an +// in-memory array. +type MemoryStorage struct { + // Protects access to all fields. Most methods of MemoryStorage are + // run on the raft goroutine, but Append() is run on an application + // goroutine. + sync.Mutex + + hardState pb.HardState + snapshot pb.Snapshot + // ents[i] has raft log position i+snapshot.Metadata.Index + ents []pb.Entry +} + +// NewMemoryStorage creates an empty MemoryStorage. +func NewMemoryStorage() *MemoryStorage { + return &MemoryStorage{ + // When starting from scratch populate the list with a dummy entry at term zero. + ents: make([]pb.Entry, 1), + } +} + +// InitialState implements the Storage interface. +func (ms *MemoryStorage) InitialState() (pb.HardState, pb.ConfState, error) { + return ms.hardState, ms.snapshot.Metadata.ConfState, nil +} + +// SetHardState saves the current HardState. +func (ms *MemoryStorage) SetHardState(st pb.HardState) error { + ms.Lock() + defer ms.Unlock() + ms.hardState = st + return nil +} + +// Entries implements the Storage interface. +func (ms *MemoryStorage) Entries(lo, hi, maxSize uint64) ([]pb.Entry, error) { + ms.Lock() + defer ms.Unlock() + offset := ms.ents[0].Index + if lo <= offset { + return nil, ErrCompacted + } + if hi > ms.lastIndex()+1 { + raftLogger.Panicf("entries' hi(%d) is out of bound lastindex(%d)", hi, ms.lastIndex()) + } + // only contains dummy entries. + if len(ms.ents) == 1 { + return nil, ErrUnavailable + } + + ents := ms.ents[lo-offset : hi-offset] + return limitSize(ents, maxSize), nil +} + +// Term implements the Storage interface. +func (ms *MemoryStorage) Term(i uint64) (uint64, error) { + ms.Lock() + defer ms.Unlock() + offset := ms.ents[0].Index + if i < offset { + return 0, ErrCompacted + } + if int(i-offset) >= len(ms.ents) { + return 0, ErrUnavailable + } + return ms.ents[i-offset].Term, nil +} + +// LastIndex implements the Storage interface. +func (ms *MemoryStorage) LastIndex() (uint64, error) { + ms.Lock() + defer ms.Unlock() + return ms.lastIndex(), nil +} + +func (ms *MemoryStorage) lastIndex() uint64 { + return ms.ents[0].Index + uint64(len(ms.ents)) - 1 +} + +// FirstIndex implements the Storage interface. +func (ms *MemoryStorage) FirstIndex() (uint64, error) { + ms.Lock() + defer ms.Unlock() + return ms.firstIndex(), nil +} + +func (ms *MemoryStorage) firstIndex() uint64 { + return ms.ents[0].Index + 1 +} + +// Snapshot implements the Storage interface. +func (ms *MemoryStorage) Snapshot() (pb.Snapshot, error) { + ms.Lock() + defer ms.Unlock() + return ms.snapshot, nil +} + +// ApplySnapshot overwrites the contents of this Storage object with +// those of the given snapshot. +func (ms *MemoryStorage) ApplySnapshot(snap pb.Snapshot) error { + ms.Lock() + defer ms.Unlock() + + //handle check for old snapshot being applied + msIndex := ms.snapshot.Metadata.Index + snapIndex := snap.Metadata.Index + if msIndex >= snapIndex { + return ErrSnapOutOfDate + } + + ms.snapshot = snap + ms.ents = []pb.Entry{{Term: snap.Metadata.Term, Index: snap.Metadata.Index}} + return nil +} + +// CreateSnapshot makes a snapshot which can be retrieved with Snapshot() and +// can be used to reconstruct the state at that point. +// If any configuration changes have been made since the last compaction, +// the result of the last ApplyConfChange must be passed in. +func (ms *MemoryStorage) CreateSnapshot(i uint64, cs *pb.ConfState, data []byte) (pb.Snapshot, error) { + ms.Lock() + defer ms.Unlock() + if i <= ms.snapshot.Metadata.Index { + return pb.Snapshot{}, ErrSnapOutOfDate + } + + offset := ms.ents[0].Index + if i > ms.lastIndex() { + raftLogger.Panicf("snapshot %d is out of bound lastindex(%d)", i, ms.lastIndex()) + } + + ms.snapshot.Metadata.Index = i + ms.snapshot.Metadata.Term = ms.ents[i-offset].Term + if cs != nil { + ms.snapshot.Metadata.ConfState = *cs + } + ms.snapshot.Data = data + return ms.snapshot, nil +} + +// Compact discards all log entries prior to compactIndex. +// It is the application's responsibility to not attempt to compact an index +// greater than raftLog.applied. +func (ms *MemoryStorage) Compact(compactIndex uint64) error { + ms.Lock() + defer ms.Unlock() + offset := ms.ents[0].Index + if compactIndex <= offset { + return ErrCompacted + } + if compactIndex > ms.lastIndex() { + raftLogger.Panicf("compact %d is out of bound lastindex(%d)", compactIndex, ms.lastIndex()) + } + + i := compactIndex - offset + ents := make([]pb.Entry, 1, 1+uint64(len(ms.ents))-i) + ents[0].Index = ms.ents[i].Index + ents[0].Term = ms.ents[i].Term + ents = append(ents, ms.ents[i+1:]...) + ms.ents = ents + return nil +} + +// Append the new entries to storage. +// TODO (xiangli): ensure the entries are continuous and +// entries[0].Index > ms.entries[0].Index +func (ms *MemoryStorage) Append(entries []pb.Entry) error { + if len(entries) == 0 { + return nil + } + + ms.Lock() + defer ms.Unlock() + + first := ms.firstIndex() + last := entries[0].Index + uint64(len(entries)) - 1 + + // shortcut if there is no new entry. + if last < first { + return nil + } + // truncate compacted entries + if first > entries[0].Index { + entries = entries[first-entries[0].Index:] + } + + offset := entries[0].Index - ms.ents[0].Index + switch { + case uint64(len(ms.ents)) > offset: + ms.ents = append([]pb.Entry{}, ms.ents[:offset]...) + ms.ents = append(ms.ents, entries...) + case uint64(len(ms.ents)) == offset: + ms.ents = append(ms.ents, entries...) + default: + raftLogger.Panicf("missing log entry [last: %d, append at: %d]", + ms.lastIndex(), entries[0].Index) + } + return nil +} diff --git a/deps/github.com/coreos/etcd/raft/util.go b/deps/github.com/coreos/etcd/raft/util.go new file mode 100644 index 000000000..f4141fe65 --- /dev/null +++ b/deps/github.com/coreos/etcd/raft/util.go @@ -0,0 +1,129 @@ +// Copyright 2015 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. + +package raft + +import ( + "bytes" + "fmt" + + pb "github.com/coreos/etcd/raft/raftpb" +) + +func (st StateType) MarshalJSON() ([]byte, error) { + return []byte(fmt.Sprintf("%q", st.String())), nil +} + +// uint64Slice implements sort interface +type uint64Slice []uint64 + +func (p uint64Slice) Len() int { return len(p) } +func (p uint64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func min(a, b uint64) uint64 { + if a > b { + return b + } + return a +} + +func max(a, b uint64) uint64 { + if a > b { + return a + } + return b +} + +func IsLocalMsg(msgt pb.MessageType) bool { + return msgt == pb.MsgHup || msgt == pb.MsgBeat || msgt == pb.MsgUnreachable || + msgt == pb.MsgSnapStatus || msgt == pb.MsgCheckQuorum +} + +func IsResponseMsg(msgt pb.MessageType) bool { + return msgt == pb.MsgAppResp || msgt == pb.MsgVoteResp || msgt == pb.MsgHeartbeatResp || msgt == pb.MsgUnreachable || msgt == pb.MsgPreVoteResp +} + +// voteResponseType maps vote and prevote message types to their corresponding responses. +func voteRespMsgType(msgt pb.MessageType) pb.MessageType { + switch msgt { + case pb.MsgVote: + return pb.MsgVoteResp + case pb.MsgPreVote: + return pb.MsgPreVoteResp + default: + panic(fmt.Sprintf("not a vote message: %s", msgt)) + } +} + +// EntryFormatter can be implemented by the application to provide human-readable formatting +// of entry data. Nil is a valid EntryFormatter and will use a default format. +type EntryFormatter func([]byte) string + +// DescribeMessage returns a concise human-readable description of a +// Message for debugging. +func DescribeMessage(m pb.Message, f EntryFormatter) string { + var buf bytes.Buffer + fmt.Fprintf(&buf, "%x->%x %v Term:%d Log:%d/%d", m.From, m.To, m.Type, m.Term, m.LogTerm, m.Index) + if m.Reject { + fmt.Fprintf(&buf, " Rejected") + if m.RejectHint != 0 { + fmt.Fprintf(&buf, "(Hint:%d)", m.RejectHint) + } + } + if m.Commit != 0 { + fmt.Fprintf(&buf, " Commit:%d", m.Commit) + } + if len(m.Entries) > 0 { + fmt.Fprintf(&buf, " Entries:[") + for i, e := range m.Entries { + if i != 0 { + buf.WriteString(", ") + } + buf.WriteString(DescribeEntry(e, f)) + } + fmt.Fprintf(&buf, "]") + } + if !IsEmptySnap(m.Snapshot) { + fmt.Fprintf(&buf, " Snapshot:%v", m.Snapshot) + } + return buf.String() +} + +// DescribeEntry returns a concise human-readable description of an +// Entry for debugging. +func DescribeEntry(e pb.Entry, f EntryFormatter) string { + var formatted string + if e.Type == pb.EntryNormal && f != nil { + formatted = f(e.Data) + } else { + formatted = fmt.Sprintf("%q", e.Data) + } + return fmt.Sprintf("%d/%d %s %s", e.Term, e.Index, e.Type, formatted) +} + +func limitSize(ents []pb.Entry, maxSize uint64) []pb.Entry { + if len(ents) == 0 { + return ents + } + size := ents[0].Size() + var limit int + for limit = 1; limit < len(ents); limit++ { + size += ents[limit].Size() + if uint64(size) > maxSize { + break + } + } + return ents[:limit] +} diff --git a/deps/github.com/coreos/etcd/rafthttp/coder.go b/deps/github.com/coreos/etcd/rafthttp/coder.go new file mode 100644 index 000000000..86ede972e --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/coder.go @@ -0,0 +1,27 @@ +// Copyright 2015 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. + +package rafthttp + +import "github.com/coreos/etcd/raft/raftpb" + +type encoder interface { + // encode encodes the given message to an output stream. + encode(m *raftpb.Message) error +} + +type decoder interface { + // decode decodes the message from an input stream. + decode() (raftpb.Message, error) +} diff --git a/deps/github.com/coreos/etcd/rafthttp/doc.go b/deps/github.com/coreos/etcd/rafthttp/doc.go new file mode 100644 index 000000000..a9486a8bb --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/doc.go @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +// Package rafthttp implements HTTP transportation layer for etcd/raft pkg. +package rafthttp diff --git a/deps/github.com/coreos/etcd/rafthttp/http.go b/deps/github.com/coreos/etcd/rafthttp/http.go new file mode 100644 index 000000000..55df26e9b --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/http.go @@ -0,0 +1,359 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "errors" + "fmt" + "io/ioutil" + "net/http" + "path" + "strings" + + pioutil "github.com/coreos/etcd/pkg/ioutil" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/snap" + "github.com/coreos/etcd/version" + "golang.org/x/net/context" +) + +const ( + // connReadLimitByte limits the number of bytes + // a single read can read out. + // + // 64KB should be large enough for not causing + // throughput bottleneck as well as small enough + // for not causing a read timeout. + connReadLimitByte = 64 * 1024 +) + +var ( + RaftPrefix = "/raft" + ProbingPrefix = path.Join(RaftPrefix, "probing") + RaftStreamPrefix = path.Join(RaftPrefix, "stream") + RaftSnapshotPrefix = path.Join(RaftPrefix, "snapshot") + + errIncompatibleVersion = errors.New("incompatible version") + errClusterIDMismatch = errors.New("cluster ID mismatch") +) + +type peerGetter interface { + Get(id types.ID) Peer +} + +type writerToResponse interface { + WriteTo(w http.ResponseWriter) +} + +type pipelineHandler struct { + tr Transporter + r Raft + cid types.ID +} + +// newPipelineHandler returns a handler for handling raft messages +// from pipeline for RaftPrefix. +// +// The handler reads out the raft message from request body, +// and forwards it to the given raft state machine for processing. +func newPipelineHandler(tr Transporter, r Raft, cid types.ID) http.Handler { + return &pipelineHandler{ + tr: tr, + r: r, + cid: cid, + } +} + +func (h *pipelineHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + w.Header().Set("Allow", "POST") + http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed) + return + } + + w.Header().Set("X-Etcd-Cluster-ID", h.cid.String()) + + if err := checkClusterCompatibilityFromHeader(r.Header, h.cid); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if from, err := types.IDFromString(r.Header.Get("X-Server-From")); err != nil { + if urls := r.Header.Get("X-PeerURLs"); urls != "" { + h.tr.AddRemote(from, strings.Split(urls, ",")) + } + } + + // Limit the data size that could be read from the request body, which ensures that read from + // connection will not time out accidentally due to possible blocking in underlying implementation. + limitedr := pioutil.NewLimitedBufferReader(r.Body, connReadLimitByte) + b, err := ioutil.ReadAll(limitedr) + if err != nil { + plog.Errorf("failed to read raft message (%v)", err) + http.Error(w, "error reading raft message", http.StatusBadRequest) + recvFailures.WithLabelValues(r.RemoteAddr).Inc() + return + } + + var m raftpb.Message + if err := m.Unmarshal(b); err != nil { + plog.Errorf("failed to unmarshal raft message (%v)", err) + http.Error(w, "error unmarshaling raft message", http.StatusBadRequest) + recvFailures.WithLabelValues(r.RemoteAddr).Inc() + return + } + + receivedBytes.WithLabelValues(types.ID(m.From).String()).Add(float64(len(b))) + + if err := h.r.Process(context.TODO(), m); err != nil { + switch v := err.(type) { + case writerToResponse: + v.WriteTo(w) + default: + plog.Warningf("failed to process raft message (%v)", err) + http.Error(w, "error processing raft message", http.StatusInternalServerError) + w.(http.Flusher).Flush() + // disconnect the http stream + panic(err) + } + return + } + + // Write StatusNoContent header after the message has been processed by + // raft, which facilitates the client to report MsgSnap status. + w.WriteHeader(http.StatusNoContent) +} + +type snapshotHandler struct { + tr Transporter + r Raft + snapshotter *snap.Snapshotter + cid types.ID +} + +func newSnapshotHandler(tr Transporter, r Raft, snapshotter *snap.Snapshotter, cid types.ID) http.Handler { + return &snapshotHandler{ + tr: tr, + r: r, + snapshotter: snapshotter, + cid: cid, + } +} + +// ServeHTTP serves HTTP request to receive and process snapshot message. +// +// If request sender dies without closing underlying TCP connection, +// the handler will keep waiting for the request body until TCP keepalive +// finds out that the connection is broken after several minutes. +// This is acceptable because +// 1. snapshot messages sent through other TCP connections could still be +// received and processed. +// 2. this case should happen rarely, so no further optimization is done. +func (h *snapshotHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + w.Header().Set("Allow", "POST") + http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed) + return + } + + w.Header().Set("X-Etcd-Cluster-ID", h.cid.String()) + + if err := checkClusterCompatibilityFromHeader(r.Header, h.cid); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + if from, err := types.IDFromString(r.Header.Get("X-Server-From")); err != nil { + if urls := r.Header.Get("X-PeerURLs"); urls != "" { + h.tr.AddRemote(from, strings.Split(urls, ",")) + } + } + + dec := &messageDecoder{r: r.Body} + // let snapshots be very large since they can exceed 512MB for large installations + m, err := dec.decodeLimit(uint64(1 << 63)) + if err != nil { + msg := fmt.Sprintf("failed to decode raft message (%v)", err) + plog.Errorf(msg) + http.Error(w, msg, http.StatusBadRequest) + recvFailures.WithLabelValues(r.RemoteAddr).Inc() + return + } + + receivedBytes.WithLabelValues(types.ID(m.From).String()).Add(float64(m.Size())) + + if m.Type != raftpb.MsgSnap { + plog.Errorf("unexpected raft message type %s on snapshot path", m.Type) + http.Error(w, "wrong raft message type", http.StatusBadRequest) + return + } + + plog.Infof("receiving database snapshot [index:%d, from %s] ...", m.Snapshot.Metadata.Index, types.ID(m.From)) + // save incoming database snapshot. + n, err := h.snapshotter.SaveDBFrom(r.Body, m.Snapshot.Metadata.Index) + if err != nil { + msg := fmt.Sprintf("failed to save KV snapshot (%v)", err) + plog.Error(msg) + http.Error(w, msg, http.StatusInternalServerError) + return + } + receivedBytes.WithLabelValues(types.ID(m.From).String()).Add(float64(n)) + plog.Infof("received and saved database snapshot [index: %d, from: %s] successfully", m.Snapshot.Metadata.Index, types.ID(m.From)) + + if err := h.r.Process(context.TODO(), m); err != nil { + switch v := err.(type) { + // Process may return writerToResponse error when doing some + // additional checks before calling raft.Node.Step. + case writerToResponse: + v.WriteTo(w) + default: + msg := fmt.Sprintf("failed to process raft message (%v)", err) + plog.Warningf(msg) + http.Error(w, msg, http.StatusInternalServerError) + } + return + } + // Write StatusNoContent header after the message has been processed by + // raft, which facilitates the client to report MsgSnap status. + w.WriteHeader(http.StatusNoContent) +} + +type streamHandler struct { + tr *Transport + peerGetter peerGetter + r Raft + id types.ID + cid types.ID +} + +func newStreamHandler(tr *Transport, pg peerGetter, r Raft, id, cid types.ID) http.Handler { + return &streamHandler{ + tr: tr, + peerGetter: pg, + r: r, + id: id, + cid: cid, + } +} + +func (h *streamHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + w.Header().Set("Allow", "GET") + http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed) + return + } + + w.Header().Set("X-Server-Version", version.Version) + w.Header().Set("X-Etcd-Cluster-ID", h.cid.String()) + + if err := checkClusterCompatibilityFromHeader(r.Header, h.cid); err != nil { + http.Error(w, err.Error(), http.StatusPreconditionFailed) + return + } + + var t streamType + switch path.Dir(r.URL.Path) { + case streamTypeMsgAppV2.endpoint(): + t = streamTypeMsgAppV2 + case streamTypeMessage.endpoint(): + t = streamTypeMessage + default: + plog.Debugf("ignored unexpected streaming request path %s", r.URL.Path) + http.Error(w, "invalid path", http.StatusNotFound) + return + } + + fromStr := path.Base(r.URL.Path) + from, err := types.IDFromString(fromStr) + if err != nil { + plog.Errorf("failed to parse from %s into ID (%v)", fromStr, err) + http.Error(w, "invalid from", http.StatusNotFound) + return + } + if h.r.IsIDRemoved(uint64(from)) { + plog.Warningf("rejected the stream from peer %s since it was removed", from) + http.Error(w, "removed member", http.StatusGone) + return + } + p := h.peerGetter.Get(from) + if p == nil { + // This may happen in following cases: + // 1. user starts a remote peer that belongs to a different cluster + // with the same cluster ID. + // 2. local etcd falls behind of the cluster, and cannot recognize + // the members that joined after its current progress. + if urls := r.Header.Get("X-PeerURLs"); urls != "" { + h.tr.AddRemote(from, strings.Split(urls, ",")) + } + plog.Errorf("failed to find member %s in cluster %s", from, h.cid) + http.Error(w, "error sender not found", http.StatusNotFound) + return + } + + wto := h.id.String() + if gto := r.Header.Get("X-Raft-To"); gto != wto { + plog.Errorf("streaming request ignored (ID mismatch got %s want %s)", gto, wto) + http.Error(w, "to field mismatch", http.StatusPreconditionFailed) + return + } + + w.WriteHeader(http.StatusOK) + w.(http.Flusher).Flush() + + c := newCloseNotifier() + conn := &outgoingConn{ + t: t, + Writer: w, + Flusher: w.(http.Flusher), + Closer: c, + } + p.attachOutgoingConn(conn) + <-c.closeNotify() +} + +// checkClusterCompatibilityFromHeader checks the cluster compatibility of +// the local member from the given header. +// It checks whether the version of local member is compatible with +// the versions in the header, and whether the cluster ID of local member +// matches the one in the header. +func checkClusterCompatibilityFromHeader(header http.Header, cid types.ID) error { + if err := checkVersionCompability(header.Get("X-Server-From"), serverVersion(header), minClusterVersion(header)); err != nil { + plog.Errorf("request version incompatibility (%v)", err) + return errIncompatibleVersion + } + if gcid := header.Get("X-Etcd-Cluster-ID"); gcid != cid.String() { + plog.Errorf("request cluster ID mismatch (got %s want %s)", gcid, cid) + return errClusterIDMismatch + } + return nil +} + +type closeNotifier struct { + done chan struct{} +} + +func newCloseNotifier() *closeNotifier { + return &closeNotifier{ + done: make(chan struct{}), + } +} + +func (n *closeNotifier) Close() error { + close(n.done) + return nil +} + +func (n *closeNotifier) closeNotify() <-chan struct{} { return n.done } diff --git a/deps/github.com/coreos/etcd/rafthttp/metrics.go b/deps/github.com/coreos/etcd/rafthttp/metrics.go new file mode 100644 index 000000000..320bfe726 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/metrics.go @@ -0,0 +1,73 @@ +// Copyright 2015 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. + +package rafthttp + +import "github.com/prometheus/client_golang/prometheus" + +var ( + sentBytes = prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "network", + Name: "peer_sent_bytes_total", + Help: "The total number of bytes sent to peers.", + }, + []string{"To"}, + ) + + receivedBytes = prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "network", + Name: "peer_received_bytes_total", + Help: "The total number of bytes received from peers.", + }, + []string{"From"}, + ) + + sentFailures = prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "network", + Name: "peer_sent_failures_total", + Help: "The total number of send failures from peers.", + }, + []string{"To"}, + ) + + recvFailures = prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: "etcd", + Subsystem: "network", + Name: "peer_received_failures_total", + Help: "The total number of receive failures from peers.", + }, + []string{"From"}, + ) + + rtts = prometheus.NewHistogramVec(prometheus.HistogramOpts{ + Namespace: "etcd", + Subsystem: "network", + Name: "peer_round_trip_time_seconds", + Help: "Round-Trip-Time histogram between peers.", + Buckets: prometheus.ExponentialBuckets(0.0001, 2, 14), + }, + []string{"To"}, + ) +) + +func init() { + prometheus.MustRegister(sentBytes) + prometheus.MustRegister(receivedBytes) + prometheus.MustRegister(sentFailures) + prometheus.MustRegister(recvFailures) + prometheus.MustRegister(rtts) +} diff --git a/deps/github.com/coreos/etcd/rafthttp/msg_codec.go b/deps/github.com/coreos/etcd/rafthttp/msg_codec.go new file mode 100644 index 000000000..ef59bc888 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/msg_codec.go @@ -0,0 +1,68 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "encoding/binary" + "errors" + "io" + + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/raft/raftpb" +) + +// messageEncoder is a encoder that can encode all kinds of messages. +// It MUST be used with a paired messageDecoder. +type messageEncoder struct { + w io.Writer +} + +func (enc *messageEncoder) encode(m *raftpb.Message) error { + if err := binary.Write(enc.w, binary.BigEndian, uint64(m.Size())); err != nil { + return err + } + _, err := enc.w.Write(pbutil.MustMarshal(m)) + return err +} + +// messageDecoder is a decoder that can decode all kinds of messages. +type messageDecoder struct { + r io.Reader +} + +var ( + readBytesLimit uint64 = 512 * 1024 * 1024 // 512 MB + ErrExceedSizeLimit = errors.New("rafthttp: error limit exceeded") +) + +func (dec *messageDecoder) decode() (raftpb.Message, error) { + return dec.decodeLimit(readBytesLimit) +} + +func (dec *messageDecoder) decodeLimit(numBytes uint64) (raftpb.Message, error) { + var m raftpb.Message + var l uint64 + if err := binary.Read(dec.r, binary.BigEndian, &l); err != nil { + return m, err + } + if l > numBytes { + return m, ErrExceedSizeLimit + } + buf := make([]byte, int(l)) + if _, err := io.ReadFull(dec.r, buf); err != nil { + return m, err + } + return m, m.Unmarshal(buf) +} diff --git a/deps/github.com/coreos/etcd/rafthttp/msgappv2_codec.go b/deps/github.com/coreos/etcd/rafthttp/msgappv2_codec.go new file mode 100644 index 000000000..013ffe7c7 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/msgappv2_codec.go @@ -0,0 +1,248 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "encoding/binary" + "fmt" + "io" + "time" + + "github.com/coreos/etcd/etcdserver/stats" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft/raftpb" +) + +const ( + msgTypeLinkHeartbeat uint8 = 0 + msgTypeAppEntries uint8 = 1 + msgTypeApp uint8 = 2 + + msgAppV2BufSize = 1024 * 1024 +) + +// msgappv2 stream sends three types of message: linkHeartbeatMessage, +// AppEntries and MsgApp. AppEntries is the MsgApp that is sent in +// replicate state in raft, whose index and term are fully predictable. +// +// Data format of linkHeartbeatMessage: +// | offset | bytes | description | +// +--------+-------+-------------+ +// | 0 | 1 | \x00 | +// +// Data format of AppEntries: +// | offset | bytes | description | +// +--------+-------+-------------+ +// | 0 | 1 | \x01 | +// | 1 | 8 | length of entries | +// | 9 | 8 | length of first entry | +// | 17 | n1 | first entry | +// ... +// | x | 8 | length of k-th entry data | +// | x+8 | nk | k-th entry data | +// | x+8+nk | 8 | commit index | +// +// Data format of MsgApp: +// | offset | bytes | description | +// +--------+-------+-------------+ +// | 0 | 1 | \x02 | +// | 1 | 8 | length of encoded message | +// | 9 | n | encoded message | +type msgAppV2Encoder struct { + w io.Writer + fs *stats.FollowerStats + + term uint64 + index uint64 + buf []byte + uint64buf []byte + uint8buf []byte +} + +func newMsgAppV2Encoder(w io.Writer, fs *stats.FollowerStats) *msgAppV2Encoder { + return &msgAppV2Encoder{ + w: w, + fs: fs, + buf: make([]byte, msgAppV2BufSize), + uint64buf: make([]byte, 8), + uint8buf: make([]byte, 1), + } +} + +func (enc *msgAppV2Encoder) encode(m *raftpb.Message) error { + start := time.Now() + switch { + case isLinkHeartbeatMessage(m): + enc.uint8buf[0] = byte(msgTypeLinkHeartbeat) + if _, err := enc.w.Write(enc.uint8buf); err != nil { + return err + } + case enc.index == m.Index && enc.term == m.LogTerm && m.LogTerm == m.Term: + enc.uint8buf[0] = byte(msgTypeAppEntries) + if _, err := enc.w.Write(enc.uint8buf); err != nil { + return err + } + // write length of entries + binary.BigEndian.PutUint64(enc.uint64buf, uint64(len(m.Entries))) + if _, err := enc.w.Write(enc.uint64buf); err != nil { + return err + } + for i := 0; i < len(m.Entries); i++ { + // write length of entry + binary.BigEndian.PutUint64(enc.uint64buf, uint64(m.Entries[i].Size())) + if _, err := enc.w.Write(enc.uint64buf); err != nil { + return err + } + if n := m.Entries[i].Size(); n < msgAppV2BufSize { + if _, err := m.Entries[i].MarshalTo(enc.buf); err != nil { + return err + } + if _, err := enc.w.Write(enc.buf[:n]); err != nil { + return err + } + } else { + if _, err := enc.w.Write(pbutil.MustMarshal(&m.Entries[i])); err != nil { + return err + } + } + enc.index++ + } + // write commit index + binary.BigEndian.PutUint64(enc.uint64buf, m.Commit) + if _, err := enc.w.Write(enc.uint64buf); err != nil { + return err + } + enc.fs.Succ(time.Since(start)) + default: + if err := binary.Write(enc.w, binary.BigEndian, msgTypeApp); err != nil { + return err + } + // write size of message + if err := binary.Write(enc.w, binary.BigEndian, uint64(m.Size())); err != nil { + return err + } + // write message + if _, err := enc.w.Write(pbutil.MustMarshal(m)); err != nil { + return err + } + + enc.term = m.Term + enc.index = m.Index + if l := len(m.Entries); l > 0 { + enc.index = m.Entries[l-1].Index + } + enc.fs.Succ(time.Since(start)) + } + return nil +} + +type msgAppV2Decoder struct { + r io.Reader + local, remote types.ID + + term uint64 + index uint64 + buf []byte + uint64buf []byte + uint8buf []byte +} + +func newMsgAppV2Decoder(r io.Reader, local, remote types.ID) *msgAppV2Decoder { + return &msgAppV2Decoder{ + r: r, + local: local, + remote: remote, + buf: make([]byte, msgAppV2BufSize), + uint64buf: make([]byte, 8), + uint8buf: make([]byte, 1), + } +} + +func (dec *msgAppV2Decoder) decode() (raftpb.Message, error) { + var ( + m raftpb.Message + typ uint8 + ) + if _, err := io.ReadFull(dec.r, dec.uint8buf); err != nil { + return m, err + } + typ = uint8(dec.uint8buf[0]) + switch typ { + case msgTypeLinkHeartbeat: + return linkHeartbeatMessage, nil + case msgTypeAppEntries: + m = raftpb.Message{ + Type: raftpb.MsgApp, + From: uint64(dec.remote), + To: uint64(dec.local), + Term: dec.term, + LogTerm: dec.term, + Index: dec.index, + } + + // decode entries + if _, err := io.ReadFull(dec.r, dec.uint64buf); err != nil { + return m, err + } + l := binary.BigEndian.Uint64(dec.uint64buf) + m.Entries = make([]raftpb.Entry, int(l)) + for i := 0; i < int(l); i++ { + if _, err := io.ReadFull(dec.r, dec.uint64buf); err != nil { + return m, err + } + size := binary.BigEndian.Uint64(dec.uint64buf) + var buf []byte + if size < msgAppV2BufSize { + buf = dec.buf[:size] + if _, err := io.ReadFull(dec.r, buf); err != nil { + return m, err + } + } else { + buf = make([]byte, int(size)) + if _, err := io.ReadFull(dec.r, buf); err != nil { + return m, err + } + } + dec.index++ + // 1 alloc + pbutil.MustUnmarshal(&m.Entries[i], buf) + } + // decode commit index + if _, err := io.ReadFull(dec.r, dec.uint64buf); err != nil { + return m, err + } + m.Commit = binary.BigEndian.Uint64(dec.uint64buf) + case msgTypeApp: + var size uint64 + if err := binary.Read(dec.r, binary.BigEndian, &size); err != nil { + return m, err + } + buf := make([]byte, int(size)) + if _, err := io.ReadFull(dec.r, buf); err != nil { + return m, err + } + pbutil.MustUnmarshal(&m, buf) + + dec.term = m.Term + dec.index = m.Index + if l := len(m.Entries); l > 0 { + dec.index = m.Entries[l-1].Index + } + default: + return m, fmt.Errorf("failed to parse type %d in msgappv2 stream", typ) + } + return m, nil +} diff --git a/deps/github.com/coreos/etcd/rafthttp/peer.go b/deps/github.com/coreos/etcd/rafthttp/peer.go new file mode 100644 index 000000000..a82d7beed --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/peer.go @@ -0,0 +1,307 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "sync" + "time" + + "github.com/coreos/etcd/etcdserver/stats" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/snap" + "golang.org/x/net/context" +) + +const ( + // ConnReadTimeout and ConnWriteTimeout are the i/o timeout set on each connection rafthttp pkg creates. + // A 5 seconds timeout is good enough for recycling bad connections. Or we have to wait for + // tcp keepalive failing to detect a bad connection, which is at minutes level. + // For long term streaming connections, rafthttp pkg sends application level linkHeartbeatMessage + // to keep the connection alive. + // For short term pipeline connections, the connection MUST be killed to avoid it being + // put back to http pkg connection pool. + ConnReadTimeout = 5 * time.Second + ConnWriteTimeout = 5 * time.Second + + recvBufSize = 4096 + // maxPendingProposals holds the proposals during one leader election process. + // Generally one leader election takes at most 1 sec. It should have + // 0-2 election conflicts, and each one takes 0.5 sec. + // We assume the number of concurrent proposers is smaller than 4096. + // One client blocks on its proposal for at least 1 sec, so 4096 is enough + // to hold all proposals. + maxPendingProposals = 4096 + + streamAppV2 = "streamMsgAppV2" + streamMsg = "streamMsg" + pipelineMsg = "pipeline" + sendSnap = "sendMsgSnap" +) + +type Peer interface { + // send sends the message to the remote peer. The function is non-blocking + // and has no promise that the message will be received by the remote. + // When it fails to send message out, it will report the status to underlying + // raft. + send(m raftpb.Message) + + // sendSnap sends the merged snapshot message to the remote peer. Its behavior + // is similar to send. + sendSnap(m snap.Message) + + // update updates the urls of remote peer. + update(urls types.URLs) + + // attachOutgoingConn attaches the outgoing connection to the peer for + // stream usage. After the call, the ownership of the outgoing + // connection hands over to the peer. The peer will close the connection + // when it is no longer used. + attachOutgoingConn(conn *outgoingConn) + // activeSince returns the time that the connection with the + // peer becomes active. + activeSince() time.Time + // stop performs any necessary finalization and terminates the peer + // elegantly. + stop() +} + +// peer is the representative of a remote raft node. Local raft node sends +// messages to the remote through peer. +// Each peer has two underlying mechanisms to send out a message: stream and +// pipeline. +// A stream is a receiver initialized long-polling connection, which +// is always open to transfer messages. Besides general stream, peer also has +// a optimized stream for sending msgApp since msgApp accounts for large part +// of all messages. Only raft leader uses the optimized stream to send msgApp +// to the remote follower node. +// A pipeline is a series of http clients that send http requests to the remote. +// It is only used when the stream has not been established. +type peer struct { + // id of the remote raft peer node + id types.ID + r Raft + + status *peerStatus + + picker *urlPicker + + msgAppV2Writer *streamWriter + writer *streamWriter + pipeline *pipeline + snapSender *snapshotSender // snapshot sender to send v3 snapshot messages + msgAppV2Reader *streamReader + msgAppReader *streamReader + + recvc chan raftpb.Message + propc chan raftpb.Message + + mu sync.Mutex + paused bool + + cancel context.CancelFunc // cancel pending works in go routine created by peer. + stopc chan struct{} +} + +func startPeer(transport *Transport, urls types.URLs, peerID types.ID, fs *stats.FollowerStats) *peer { + plog.Infof("starting peer %s...", peerID) + defer plog.Infof("started peer %s", peerID) + + status := newPeerStatus(peerID) + picker := newURLPicker(urls) + errorc := transport.ErrorC + r := transport.Raft + pipeline := &pipeline{ + peerID: peerID, + tr: transport, + picker: picker, + status: status, + followerStats: fs, + raft: r, + errorc: errorc, + } + pipeline.start() + + p := &peer{ + id: peerID, + r: r, + status: status, + picker: picker, + msgAppV2Writer: startStreamWriter(peerID, status, fs, r), + writer: startStreamWriter(peerID, status, fs, r), + pipeline: pipeline, + snapSender: newSnapshotSender(transport, picker, peerID, status), + recvc: make(chan raftpb.Message, recvBufSize), + propc: make(chan raftpb.Message, maxPendingProposals), + stopc: make(chan struct{}), + } + + ctx, cancel := context.WithCancel(context.Background()) + p.cancel = cancel + go func() { + for { + select { + case mm := <-p.recvc: + if err := r.Process(ctx, mm); err != nil { + plog.Warningf("failed to process raft message (%v)", err) + } + case <-p.stopc: + return + } + } + }() + + // r.Process might block for processing proposal when there is no leader. + // Thus propc must be put into a separate routine with recvc to avoid blocking + // processing other raft messages. + go func() { + for { + select { + case mm := <-p.propc: + if err := r.Process(ctx, mm); err != nil { + plog.Warningf("failed to process raft message (%v)", err) + } + case <-p.stopc: + return + } + } + }() + + p.msgAppV2Reader = &streamReader{ + peerID: peerID, + typ: streamTypeMsgAppV2, + tr: transport, + picker: picker, + status: status, + recvc: p.recvc, + propc: p.propc, + } + p.msgAppReader = &streamReader{ + peerID: peerID, + typ: streamTypeMessage, + tr: transport, + picker: picker, + status: status, + recvc: p.recvc, + propc: p.propc, + } + p.msgAppV2Reader.start() + p.msgAppReader.start() + + return p +} + +func (p *peer) send(m raftpb.Message) { + p.mu.Lock() + paused := p.paused + p.mu.Unlock() + + if paused { + return + } + + writec, name := p.pick(m) + select { + case writec <- m: + default: + p.r.ReportUnreachable(m.To) + if isMsgSnap(m) { + p.r.ReportSnapshot(m.To, raft.SnapshotFailure) + } + if p.status.isActive() { + plog.MergeWarningf("dropped internal raft message to %s since %s's sending buffer is full (bad/overloaded network)", p.id, name) + } + plog.Debugf("dropped %s to %s since %s's sending buffer is full", m.Type, p.id, name) + } +} + +func (p *peer) sendSnap(m snap.Message) { + go p.snapSender.send(m) +} + +func (p *peer) update(urls types.URLs) { + p.picker.update(urls) +} + +func (p *peer) attachOutgoingConn(conn *outgoingConn) { + var ok bool + switch conn.t { + case streamTypeMsgAppV2: + ok = p.msgAppV2Writer.attach(conn) + case streamTypeMessage: + ok = p.writer.attach(conn) + default: + plog.Panicf("unhandled stream type %s", conn.t) + } + if !ok { + conn.Close() + } +} + +func (p *peer) activeSince() time.Time { return p.status.activeSince() } + +// Pause pauses the peer. The peer will simply drops all incoming +// messages without returning an error. +func (p *peer) Pause() { + p.mu.Lock() + defer p.mu.Unlock() + p.paused = true + p.msgAppReader.pause() + p.msgAppV2Reader.pause() +} + +// Resume resumes a paused peer. +func (p *peer) Resume() { + p.mu.Lock() + defer p.mu.Unlock() + p.paused = false + p.msgAppReader.resume() + p.msgAppV2Reader.resume() +} + +func (p *peer) stop() { + plog.Infof("stopping peer %s...", p.id) + defer plog.Infof("stopped peer %s", p.id) + + close(p.stopc) + p.cancel() + p.msgAppV2Writer.stop() + p.writer.stop() + p.pipeline.stop() + p.snapSender.stop() + p.msgAppV2Reader.stop() + p.msgAppReader.stop() +} + +// pick picks a chan for sending the given message. The picked chan and the picked chan +// string name are returned. +func (p *peer) pick(m raftpb.Message) (writec chan<- raftpb.Message, picked string) { + var ok bool + // Considering MsgSnap may have a big size, e.g., 1G, and will block + // stream for a long time, only use one of the N pipelines to send MsgSnap. + if isMsgSnap(m) { + return p.pipeline.msgc, pipelineMsg + } else if writec, ok = p.msgAppV2Writer.writec(); ok && isMsgApp(m) { + return writec, streamAppV2 + } else if writec, ok = p.writer.writec(); ok { + return writec, streamMsg + } + return p.pipeline.msgc, pipelineMsg +} + +func isMsgApp(m raftpb.Message) bool { return m.Type == raftpb.MsgApp } + +func isMsgSnap(m raftpb.Message) bool { return m.Type == raftpb.MsgSnap } diff --git a/deps/github.com/coreos/etcd/rafthttp/peer_status.go b/deps/github.com/coreos/etcd/rafthttp/peer_status.go new file mode 100644 index 000000000..706144f64 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/peer_status.go @@ -0,0 +1,77 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "fmt" + "sync" + "time" + + "github.com/coreos/etcd/pkg/types" +) + +type failureType struct { + source string + action string +} + +type peerStatus struct { + id types.ID + mu sync.Mutex // protect variables below + active bool + since time.Time +} + +func newPeerStatus(id types.ID) *peerStatus { + return &peerStatus{ + id: id, + } +} + +func (s *peerStatus) activate() { + s.mu.Lock() + defer s.mu.Unlock() + if !s.active { + plog.Infof("peer %s became active", s.id) + s.active = true + s.since = time.Now() + } +} + +func (s *peerStatus) deactivate(failure failureType, reason string) { + s.mu.Lock() + defer s.mu.Unlock() + msg := fmt.Sprintf("failed to %s %s on %s (%s)", failure.action, s.id, failure.source, reason) + if s.active { + plog.Errorf(msg) + plog.Infof("peer %s became inactive", s.id) + s.active = false + s.since = time.Time{} + return + } + plog.Debugf(msg) +} + +func (s *peerStatus) isActive() bool { + s.mu.Lock() + defer s.mu.Unlock() + return s.active +} + +func (s *peerStatus) activeSince() time.Time { + s.mu.Lock() + defer s.mu.Unlock() + return s.since +} diff --git a/deps/github.com/coreos/etcd/rafthttp/pipeline.go b/deps/github.com/coreos/etcd/rafthttp/pipeline.go new file mode 100644 index 000000000..d9f07c347 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/pipeline.go @@ -0,0 +1,160 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "bytes" + "context" + "errors" + "io/ioutil" + "sync" + "time" + + "github.com/coreos/etcd/etcdserver/stats" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" +) + +const ( + connPerPipeline = 4 + // pipelineBufSize is the size of pipeline buffer, which helps hold the + // temporary network latency. + // The size ensures that pipeline does not drop messages when the network + // is out of work for less than 1 second in good path. + pipelineBufSize = 64 +) + +var errStopped = errors.New("stopped") + +type pipeline struct { + peerID types.ID + + tr *Transport + picker *urlPicker + status *peerStatus + raft Raft + errorc chan error + // deprecate when we depercate v2 API + followerStats *stats.FollowerStats + + msgc chan raftpb.Message + // wait for the handling routines + wg sync.WaitGroup + stopc chan struct{} +} + +func (p *pipeline) start() { + p.stopc = make(chan struct{}) + p.msgc = make(chan raftpb.Message, pipelineBufSize) + p.wg.Add(connPerPipeline) + for i := 0; i < connPerPipeline; i++ { + go p.handle() + } + plog.Infof("started HTTP pipelining with peer %s", p.peerID) +} + +func (p *pipeline) stop() { + close(p.stopc) + p.wg.Wait() + plog.Infof("stopped HTTP pipelining with peer %s", p.peerID) +} + +func (p *pipeline) handle() { + defer p.wg.Done() + + for { + select { + case m := <-p.msgc: + start := time.Now() + err := p.post(pbutil.MustMarshal(&m)) + end := time.Now() + + if err != nil { + p.status.deactivate(failureType{source: pipelineMsg, action: "write"}, err.Error()) + + if m.Type == raftpb.MsgApp && p.followerStats != nil { + p.followerStats.Fail() + } + p.raft.ReportUnreachable(m.To) + if isMsgSnap(m) { + p.raft.ReportSnapshot(m.To, raft.SnapshotFailure) + } + sentFailures.WithLabelValues(types.ID(m.To).String()).Inc() + continue + } + + p.status.activate() + if m.Type == raftpb.MsgApp && p.followerStats != nil { + p.followerStats.Succ(end.Sub(start)) + } + if isMsgSnap(m) { + p.raft.ReportSnapshot(m.To, raft.SnapshotFinish) + } + sentBytes.WithLabelValues(types.ID(m.To).String()).Add(float64(m.Size())) + case <-p.stopc: + return + } + } +} + +// post POSTs a data payload to a url. Returns nil if the POST succeeds, +// error on any failure. +func (p *pipeline) post(data []byte) (err error) { + u := p.picker.pick() + req := createPostRequest(u, RaftPrefix, bytes.NewBuffer(data), "application/protobuf", p.tr.URLs, p.tr.ID, p.tr.ClusterID) + + done := make(chan struct{}, 1) + ctx, cancel := context.WithCancel(context.Background()) + req = req.WithContext(ctx) + go func() { + select { + case <-done: + case <-p.stopc: + waitSchedule() + cancel() + } + }() + + resp, err := p.tr.pipelineRt.RoundTrip(req) + done <- struct{}{} + if err != nil { + p.picker.unreachable(u) + return err + } + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + p.picker.unreachable(u) + return err + } + resp.Body.Close() + + err = checkPostResponse(resp, b, req, p.peerID) + if err != nil { + p.picker.unreachable(u) + // errMemberRemoved is a critical error since a removed member should + // always be stopped. So we use reportCriticalError to report it to errorc. + if err == errMemberRemoved { + reportCriticalError(err, p.errorc) + } + return err + } + + return nil +} + +// waitSchedule waits other goroutines to be scheduled for a while +func waitSchedule() { time.Sleep(time.Millisecond) } diff --git a/deps/github.com/coreos/etcd/rafthttp/probing_status.go b/deps/github.com/coreos/etcd/rafthttp/probing_status.go new file mode 100644 index 000000000..c7a3c7ab9 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/probing_status.go @@ -0,0 +1,67 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "time" + + "github.com/xiang90/probing" +) + +var ( + // proberInterval must be shorter than read timeout. + // Or the connection will time-out. + proberInterval = ConnReadTimeout - time.Second + statusMonitoringInterval = 30 * time.Second + statusErrorInterval = 5 * time.Second +) + +func addPeerToProber(p probing.Prober, id string, us []string) { + hus := make([]string, len(us)) + for i := range us { + hus[i] = us[i] + ProbingPrefix + } + + p.AddHTTP(id, proberInterval, hus) + + s, err := p.Status(id) + if err != nil { + plog.Errorf("failed to add peer %s into prober", id) + } else { + go monitorProbingStatus(s, id) + } +} + +func monitorProbingStatus(s probing.Status, id string) { + // set the first interval short to log error early. + interval := statusErrorInterval + for { + select { + case <-time.After(interval): + if !s.Health() { + plog.Warningf("health check for peer %s could not connect: %v", id, s.Err()) + interval = statusErrorInterval + } else { + interval = statusMonitoringInterval + } + if s.ClockDiff() > time.Second { + plog.Warningf("the clock difference against peer %s is too high [%v > %v]", id, s.ClockDiff(), time.Second) + } + rtts.WithLabelValues(id).Observe(s.SRTT().Seconds()) + case <-s.StopNotify(): + return + } + } +} diff --git a/deps/github.com/coreos/etcd/rafthttp/remote.go b/deps/github.com/coreos/etcd/rafthttp/remote.go new file mode 100644 index 000000000..c62c81823 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/remote.go @@ -0,0 +1,69 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft/raftpb" +) + +type remote struct { + id types.ID + status *peerStatus + pipeline *pipeline +} + +func startRemote(tr *Transport, urls types.URLs, id types.ID) *remote { + picker := newURLPicker(urls) + status := newPeerStatus(id) + pipeline := &pipeline{ + peerID: id, + tr: tr, + picker: picker, + status: status, + raft: tr.Raft, + errorc: tr.ErrorC, + } + pipeline.start() + + return &remote{ + id: id, + status: status, + pipeline: pipeline, + } +} + +func (g *remote) send(m raftpb.Message) { + select { + case g.pipeline.msgc <- m: + default: + if g.status.isActive() { + plog.MergeWarningf("dropped internal raft message to %s since sending buffer is full (bad/overloaded network)", g.id) + } + plog.Debugf("dropped %s to %s since sending buffer is full", m.Type, g.id) + } +} + +func (g *remote) stop() { + g.pipeline.stop() +} + +func (g *remote) Pause() { + g.stop() +} + +func (g *remote) Resume() { + g.pipeline.start() +} diff --git a/deps/github.com/coreos/etcd/rafthttp/snapshot_sender.go b/deps/github.com/coreos/etcd/rafthttp/snapshot_sender.go new file mode 100644 index 000000000..52273c9d1 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/snapshot_sender.go @@ -0,0 +1,157 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "bytes" + "context" + "io" + "io/ioutil" + "net/http" + "time" + + "github.com/coreos/etcd/pkg/httputil" + pioutil "github.com/coreos/etcd/pkg/ioutil" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/snap" +) + +var ( + // timeout for reading snapshot response body + snapResponseReadTimeout = 5 * time.Second +) + +type snapshotSender struct { + from, to types.ID + cid types.ID + + tr *Transport + picker *urlPicker + status *peerStatus + r Raft + errorc chan error + + stopc chan struct{} +} + +func newSnapshotSender(tr *Transport, picker *urlPicker, to types.ID, status *peerStatus) *snapshotSender { + return &snapshotSender{ + from: tr.ID, + to: to, + cid: tr.ClusterID, + tr: tr, + picker: picker, + status: status, + r: tr.Raft, + errorc: tr.ErrorC, + stopc: make(chan struct{}), + } +} + +func (s *snapshotSender) stop() { close(s.stopc) } + +func (s *snapshotSender) send(merged snap.Message) { + m := merged.Message + + body := createSnapBody(merged) + defer body.Close() + + u := s.picker.pick() + req := createPostRequest(u, RaftSnapshotPrefix, body, "application/octet-stream", s.tr.URLs, s.from, s.cid) + + plog.Infof("start to send database snapshot [index: %d, to %s]...", m.Snapshot.Metadata.Index, types.ID(m.To)) + + err := s.post(req) + defer merged.CloseWithError(err) + if err != nil { + plog.Warningf("database snapshot [index: %d, to: %s] failed to be sent out (%v)", m.Snapshot.Metadata.Index, types.ID(m.To), err) + + // errMemberRemoved is a critical error since a removed member should + // always be stopped. So we use reportCriticalError to report it to errorc. + if err == errMemberRemoved { + reportCriticalError(err, s.errorc) + } + + s.picker.unreachable(u) + s.status.deactivate(failureType{source: sendSnap, action: "post"}, err.Error()) + s.r.ReportUnreachable(m.To) + // report SnapshotFailure to raft state machine. After raft state + // machine knows about it, it would pause a while and retry sending + // new snapshot message. + s.r.ReportSnapshot(m.To, raft.SnapshotFailure) + sentFailures.WithLabelValues(types.ID(m.To).String()).Inc() + return + } + s.status.activate() + s.r.ReportSnapshot(m.To, raft.SnapshotFinish) + plog.Infof("database snapshot [index: %d, to: %s] sent out successfully", m.Snapshot.Metadata.Index, types.ID(m.To)) + + sentBytes.WithLabelValues(types.ID(m.To).String()).Add(float64(merged.TotalSize)) +} + +// post posts the given request. +// It returns nil when request is sent out and processed successfully. +func (s *snapshotSender) post(req *http.Request) (err error) { + ctx, cancel := context.WithCancel(context.Background()) + req = req.WithContext(ctx) + defer cancel() + + type responseAndError struct { + resp *http.Response + body []byte + err error + } + result := make(chan responseAndError, 1) + + go func() { + resp, err := s.tr.pipelineRt.RoundTrip(req) + if err != nil { + result <- responseAndError{resp, nil, err} + return + } + + // close the response body when timeouts. + // prevents from reading the body forever when the other side dies right after + // successfully receives the request body. + time.AfterFunc(snapResponseReadTimeout, func() { httputil.GracefulClose(resp) }) + body, err := ioutil.ReadAll(resp.Body) + result <- responseAndError{resp, body, err} + }() + + select { + case <-s.stopc: + return errStopped + case r := <-result: + if r.err != nil { + return r.err + } + return checkPostResponse(r.resp, r.body, req, s.to) + } +} + +func createSnapBody(merged snap.Message) io.ReadCloser { + buf := new(bytes.Buffer) + enc := &messageEncoder{w: buf} + // encode raft message + if err := enc.encode(&merged.Message); err != nil { + plog.Panicf("encode message error (%v)", err) + } + + return &pioutil.ReaderAndCloser{ + Reader: io.MultiReader(buf, merged.ReadCloser), + Closer: merged.ReadCloser, + } +} diff --git a/deps/github.com/coreos/etcd/rafthttp/stream.go b/deps/github.com/coreos/etcd/rafthttp/stream.go new file mode 100644 index 000000000..2a6c620f5 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/stream.go @@ -0,0 +1,527 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "context" + "fmt" + "io" + "io/ioutil" + "net/http" + "path" + "strings" + "sync" + "time" + + "github.com/coreos/etcd/etcdserver/stats" + "github.com/coreos/etcd/pkg/httputil" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/version" + "github.com/coreos/go-semver/semver" +) + +const ( + streamTypeMessage streamType = "message" + streamTypeMsgAppV2 streamType = "msgappv2" + + streamBufSize = 4096 +) + +var ( + errUnsupportedStreamType = fmt.Errorf("unsupported stream type") + + // the key is in string format "major.minor.patch" + supportedStream = map[string][]streamType{ + "2.0.0": {}, + "2.1.0": {streamTypeMsgAppV2, streamTypeMessage}, + "2.2.0": {streamTypeMsgAppV2, streamTypeMessage}, + "2.3.0": {streamTypeMsgAppV2, streamTypeMessage}, + "3.0.0": {streamTypeMsgAppV2, streamTypeMessage}, + "3.1.0": {streamTypeMsgAppV2, streamTypeMessage}, + "3.2.0": {streamTypeMsgAppV2, streamTypeMessage}, + } +) + +type streamType string + +func (t streamType) endpoint() string { + switch t { + case streamTypeMsgAppV2: + return path.Join(RaftStreamPrefix, "msgapp") + case streamTypeMessage: + return path.Join(RaftStreamPrefix, "message") + default: + plog.Panicf("unhandled stream type %v", t) + return "" + } +} + +func (t streamType) String() string { + switch t { + case streamTypeMsgAppV2: + return "stream MsgApp v2" + case streamTypeMessage: + return "stream Message" + default: + return "unknown stream" + } +} + +var ( + // linkHeartbeatMessage is a special message used as heartbeat message in + // link layer. It never conflicts with messages from raft because raft + // doesn't send out messages without From and To fields. + linkHeartbeatMessage = raftpb.Message{Type: raftpb.MsgHeartbeat} +) + +func isLinkHeartbeatMessage(m *raftpb.Message) bool { + return m.Type == raftpb.MsgHeartbeat && m.From == 0 && m.To == 0 +} + +type outgoingConn struct { + t streamType + io.Writer + http.Flusher + io.Closer +} + +// streamWriter writes messages to the attached outgoingConn. +type streamWriter struct { + peerID types.ID + status *peerStatus + fs *stats.FollowerStats + r Raft + + mu sync.Mutex // guard field working and closer + closer io.Closer + working bool + + msgc chan raftpb.Message + connc chan *outgoingConn + stopc chan struct{} + done chan struct{} +} + +// startStreamWriter creates a streamWrite and starts a long running go-routine that accepts +// messages and writes to the attached outgoing connection. +func startStreamWriter(id types.ID, status *peerStatus, fs *stats.FollowerStats, r Raft) *streamWriter { + w := &streamWriter{ + peerID: id, + status: status, + fs: fs, + r: r, + msgc: make(chan raftpb.Message, streamBufSize), + connc: make(chan *outgoingConn), + stopc: make(chan struct{}), + done: make(chan struct{}), + } + go w.run() + return w +} + +func (cw *streamWriter) run() { + var ( + msgc chan raftpb.Message + heartbeatc <-chan time.Time + t streamType + enc encoder + flusher http.Flusher + batched int + ) + tickc := time.NewTicker(ConnReadTimeout / 3) + defer tickc.Stop() + unflushed := 0 + + plog.Infof("started streaming with peer %s (writer)", cw.peerID) + + for { + select { + case <-heartbeatc: + err := enc.encode(&linkHeartbeatMessage) + unflushed += linkHeartbeatMessage.Size() + if err == nil { + flusher.Flush() + batched = 0 + sentBytes.WithLabelValues(cw.peerID.String()).Add(float64(unflushed)) + unflushed = 0 + continue + } + + cw.status.deactivate(failureType{source: t.String(), action: "heartbeat"}, err.Error()) + + sentFailures.WithLabelValues(cw.peerID.String()).Inc() + cw.close() + plog.Warningf("lost the TCP streaming connection with peer %s (%s writer)", cw.peerID, t) + heartbeatc, msgc = nil, nil + + case m := <-msgc: + err := enc.encode(&m) + if err == nil { + unflushed += m.Size() + + if len(msgc) == 0 || batched > streamBufSize/2 { + flusher.Flush() + sentBytes.WithLabelValues(cw.peerID.String()).Add(float64(unflushed)) + unflushed = 0 + batched = 0 + } else { + batched++ + } + + continue + } + + cw.status.deactivate(failureType{source: t.String(), action: "write"}, err.Error()) + cw.close() + plog.Warningf("lost the TCP streaming connection with peer %s (%s writer)", cw.peerID, t) + heartbeatc, msgc = nil, nil + cw.r.ReportUnreachable(m.To) + sentFailures.WithLabelValues(cw.peerID.String()).Inc() + + case conn := <-cw.connc: + cw.mu.Lock() + closed := cw.closeUnlocked() + t = conn.t + switch conn.t { + case streamTypeMsgAppV2: + enc = newMsgAppV2Encoder(conn.Writer, cw.fs) + case streamTypeMessage: + enc = &messageEncoder{w: conn.Writer} + default: + plog.Panicf("unhandled stream type %s", conn.t) + } + flusher = conn.Flusher + unflushed = 0 + cw.status.activate() + cw.closer = conn.Closer + cw.working = true + cw.mu.Unlock() + + if closed { + plog.Warningf("closed an existing TCP streaming connection with peer %s (%s writer)", cw.peerID, t) + } + plog.Infof("established a TCP streaming connection with peer %s (%s writer)", cw.peerID, t) + heartbeatc, msgc = tickc.C, cw.msgc + case <-cw.stopc: + if cw.close() { + plog.Infof("closed the TCP streaming connection with peer %s (%s writer)", cw.peerID, t) + } + plog.Infof("stopped streaming with peer %s (writer)", cw.peerID) + close(cw.done) + return + } + } +} + +func (cw *streamWriter) writec() (chan<- raftpb.Message, bool) { + cw.mu.Lock() + defer cw.mu.Unlock() + return cw.msgc, cw.working +} + +func (cw *streamWriter) close() bool { + cw.mu.Lock() + defer cw.mu.Unlock() + return cw.closeUnlocked() +} + +func (cw *streamWriter) closeUnlocked() bool { + if !cw.working { + return false + } + cw.closer.Close() + if len(cw.msgc) > 0 { + cw.r.ReportUnreachable(uint64(cw.peerID)) + } + cw.msgc = make(chan raftpb.Message, streamBufSize) + cw.working = false + return true +} + +func (cw *streamWriter) attach(conn *outgoingConn) bool { + select { + case cw.connc <- conn: + return true + case <-cw.done: + return false + } +} + +func (cw *streamWriter) stop() { + close(cw.stopc) + <-cw.done +} + +// streamReader is a long-running go-routine that dials to the remote stream +// endpoint and reads messages from the response body returned. +type streamReader struct { + peerID types.ID + typ streamType + + tr *Transport + picker *urlPicker + status *peerStatus + recvc chan<- raftpb.Message + propc chan<- raftpb.Message + + errorc chan<- error + + mu sync.Mutex + paused bool + cancel func() + closer io.Closer + + stopc chan struct{} + done chan struct{} +} + +func (r *streamReader) start() { + r.stopc = make(chan struct{}) + r.done = make(chan struct{}) + if r.errorc == nil { + r.errorc = r.tr.ErrorC + } + + go r.run() +} + +func (cr *streamReader) run() { + t := cr.typ + plog.Infof("started streaming with peer %s (%s reader)", cr.peerID, t) + for { + rc, err := cr.dial(t) + if err != nil { + if err != errUnsupportedStreamType { + cr.status.deactivate(failureType{source: t.String(), action: "dial"}, err.Error()) + } + } else { + cr.status.activate() + plog.Infof("established a TCP streaming connection with peer %s (%s reader)", cr.peerID, cr.typ) + err := cr.decodeLoop(rc, t) + plog.Warningf("lost the TCP streaming connection with peer %s (%s reader)", cr.peerID, cr.typ) + switch { + // all data is read out + case err == io.EOF: + // connection is closed by the remote + case transport.IsClosedConnError(err): + default: + cr.status.deactivate(failureType{source: t.String(), action: "read"}, err.Error()) + } + } + select { + // Wait 100ms to create a new stream, so it doesn't bring too much + // overhead when retry. + case <-time.After(100 * time.Millisecond): + case <-cr.stopc: + plog.Infof("stopped streaming with peer %s (%s reader)", cr.peerID, t) + close(cr.done) + return + } + } +} + +func (cr *streamReader) decodeLoop(rc io.ReadCloser, t streamType) error { + var dec decoder + cr.mu.Lock() + switch t { + case streamTypeMsgAppV2: + dec = newMsgAppV2Decoder(rc, cr.tr.ID, cr.peerID) + case streamTypeMessage: + dec = &messageDecoder{r: rc} + default: + plog.Panicf("unhandled stream type %s", t) + } + select { + case <-cr.stopc: + cr.mu.Unlock() + if err := rc.Close(); err != nil { + return err + } + return io.EOF + default: + cr.closer = rc + } + cr.mu.Unlock() + + for { + m, err := dec.decode() + if err != nil { + cr.mu.Lock() + cr.close() + cr.mu.Unlock() + return err + } + + receivedBytes.WithLabelValues(types.ID(m.From).String()).Add(float64(m.Size())) + + cr.mu.Lock() + paused := cr.paused + cr.mu.Unlock() + + if paused { + continue + } + + if isLinkHeartbeatMessage(&m) { + // raft is not interested in link layer + // heartbeat message, so we should ignore + // it. + continue + } + + recvc := cr.recvc + if m.Type == raftpb.MsgProp { + recvc = cr.propc + } + + select { + case recvc <- m: + default: + if cr.status.isActive() { + plog.MergeWarningf("dropped internal raft message from %s since receiving buffer is full (overloaded network)", types.ID(m.From)) + } + plog.Debugf("dropped %s from %s since receiving buffer is full", m.Type, types.ID(m.From)) + recvFailures.WithLabelValues(types.ID(m.From).String()).Inc() + } + } +} + +func (cr *streamReader) stop() { + close(cr.stopc) + cr.mu.Lock() + if cr.cancel != nil { + cr.cancel() + } + cr.close() + cr.mu.Unlock() + <-cr.done +} + +func (cr *streamReader) dial(t streamType) (io.ReadCloser, error) { + u := cr.picker.pick() + uu := u + uu.Path = path.Join(t.endpoint(), cr.tr.ID.String()) + + req, err := http.NewRequest("GET", uu.String(), nil) + if err != nil { + cr.picker.unreachable(u) + return nil, fmt.Errorf("failed to make http request to %v (%v)", u, err) + } + req.Header.Set("X-Server-From", cr.tr.ID.String()) + req.Header.Set("X-Server-Version", version.Version) + req.Header.Set("X-Min-Cluster-Version", version.MinClusterVersion) + req.Header.Set("X-Etcd-Cluster-ID", cr.tr.ClusterID.String()) + req.Header.Set("X-Raft-To", cr.peerID.String()) + + setPeerURLsHeader(req, cr.tr.URLs) + + ctx, cancel := context.WithCancel(context.Background()) + req = req.WithContext(ctx) + + cr.mu.Lock() + cr.cancel = cancel + select { + case <-cr.stopc: + cr.mu.Unlock() + return nil, fmt.Errorf("stream reader is stopped") + default: + } + cr.mu.Unlock() + + resp, err := cr.tr.streamRt.RoundTrip(req) + if err != nil { + cr.picker.unreachable(u) + return nil, err + } + + rv := serverVersion(resp.Header) + lv := semver.Must(semver.NewVersion(version.Version)) + if compareMajorMinorVersion(rv, lv) == -1 && !checkStreamSupport(rv, t) { + httputil.GracefulClose(resp) + cr.picker.unreachable(u) + return nil, errUnsupportedStreamType + } + + switch resp.StatusCode { + case http.StatusGone: + httputil.GracefulClose(resp) + cr.picker.unreachable(u) + reportCriticalError(errMemberRemoved, cr.errorc) + return nil, errMemberRemoved + case http.StatusOK: + return resp.Body, nil + case http.StatusNotFound: + httputil.GracefulClose(resp) + cr.picker.unreachable(u) + return nil, fmt.Errorf("peer %s failed to find local node %s", cr.peerID, cr.tr.ID) + case http.StatusPreconditionFailed: + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + cr.picker.unreachable(u) + return nil, err + } + httputil.GracefulClose(resp) + cr.picker.unreachable(u) + + switch strings.TrimSuffix(string(b), "\n") { + case errIncompatibleVersion.Error(): + plog.Errorf("request sent was ignored by peer %s (server version incompatible)", cr.peerID) + return nil, errIncompatibleVersion + case errClusterIDMismatch.Error(): + plog.Errorf("request sent was ignored (cluster ID mismatch: peer[%s]=%s, local=%s)", + cr.peerID, resp.Header.Get("X-Etcd-Cluster-ID"), cr.tr.ClusterID) + return nil, errClusterIDMismatch + default: + return nil, fmt.Errorf("unhandled error %q when precondition failed", string(b)) + } + default: + httputil.GracefulClose(resp) + cr.picker.unreachable(u) + return nil, fmt.Errorf("unhandled http status %d", resp.StatusCode) + } +} + +func (cr *streamReader) close() { + if cr.closer != nil { + cr.closer.Close() + } + cr.closer = nil +} + +func (cr *streamReader) pause() { + cr.mu.Lock() + defer cr.mu.Unlock() + cr.paused = true +} + +func (cr *streamReader) resume() { + cr.mu.Lock() + defer cr.mu.Unlock() + cr.paused = false +} + +// checkStreamSupport checks whether the stream type is supported in the +// given version. +func checkStreamSupport(v *semver.Version, t streamType) bool { + nv := &semver.Version{Major: v.Major, Minor: v.Minor} + for _, s := range supportedStream[nv.String()] { + if s == t { + return true + } + } + return false +} diff --git a/deps/github.com/coreos/etcd/rafthttp/transport.go b/deps/github.com/coreos/etcd/rafthttp/transport.go new file mode 100644 index 000000000..1f0b46836 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/transport.go @@ -0,0 +1,402 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "net/http" + "sync" + "time" + + "github.com/coreos/etcd/etcdserver/stats" + "github.com/coreos/etcd/pkg/logutil" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/snap" + "github.com/coreos/pkg/capnslog" + "github.com/xiang90/probing" + "golang.org/x/net/context" +) + +var plog = logutil.NewMergeLogger(capnslog.NewPackageLogger("github.com/coreos/etcd", "rafthttp")) + +type Raft interface { + Process(ctx context.Context, m raftpb.Message) error + IsIDRemoved(id uint64) bool + ReportUnreachable(id uint64) + ReportSnapshot(id uint64, status raft.SnapshotStatus) +} + +type Transporter interface { + // Start starts the given Transporter. + // Start MUST be called before calling other functions in the interface. + Start() error + // Handler returns the HTTP handler of the transporter. + // A transporter HTTP handler handles the HTTP requests + // from remote peers. + // The handler MUST be used to handle RaftPrefix(/raft) + // endpoint. + Handler() http.Handler + // Send sends out the given messages to the remote peers. + // Each message has a To field, which is an id that maps + // to an existing peer in the transport. + // If the id cannot be found in the transport, the message + // will be ignored. + Send(m []raftpb.Message) + // SendSnapshot sends out the given snapshot message to a remote peer. + // The behavior of SendSnapshot is similar to Send. + SendSnapshot(m snap.Message) + // AddRemote adds a remote with given peer urls into the transport. + // A remote helps newly joined member to catch up the progress of cluster, + // and will not be used after that. + // It is the caller's responsibility to ensure the urls are all valid, + // or it panics. + AddRemote(id types.ID, urls []string) + // AddPeer adds a peer with given peer urls into the transport. + // It is the caller's responsibility to ensure the urls are all valid, + // or it panics. + // Peer urls are used to connect to the remote peer. + AddPeer(id types.ID, urls []string) + // RemovePeer removes the peer with given id. + RemovePeer(id types.ID) + // RemoveAllPeers removes all the existing peers in the transport. + RemoveAllPeers() + // UpdatePeer updates the peer urls of the peer with the given id. + // It is the caller's responsibility to ensure the urls are all valid, + // or it panics. + UpdatePeer(id types.ID, urls []string) + // ActiveSince returns the time that the connection with the peer + // of the given id becomes active. + // If the connection is active since peer was added, it returns the adding time. + // If the connection is currently inactive, it returns zero time. + ActiveSince(id types.ID) time.Time + // Stop closes the connections and stops the transporter. + Stop() +} + +// Transport implements Transporter interface. It provides the functionality +// to send raft messages to peers, and receive raft messages from peers. +// User should call Handler method to get a handler to serve requests +// received from peerURLs. +// User needs to call Start before calling other functions, and call +// Stop when the Transport is no longer used. +type Transport struct { + DialTimeout time.Duration // maximum duration before timing out dial of the request + TLSInfo transport.TLSInfo // TLS information used when creating connection + + ID types.ID // local member ID + URLs types.URLs // local peer URLs + ClusterID types.ID // raft cluster ID for request validation + Raft Raft // raft state machine, to which the Transport forwards received messages and reports status + Snapshotter *snap.Snapshotter + ServerStats *stats.ServerStats // used to record general transportation statistics + // used to record transportation statistics with followers when + // performing as leader in raft protocol + LeaderStats *stats.LeaderStats + // ErrorC is used to report detected critical errors, e.g., + // the member has been permanently removed from the cluster + // When an error is received from ErrorC, user should stop raft state + // machine and thus stop the Transport. + ErrorC chan error + + streamRt http.RoundTripper // roundTripper used by streams + pipelineRt http.RoundTripper // roundTripper used by pipelines + + mu sync.RWMutex // protect the remote and peer map + remotes map[types.ID]*remote // remotes map that helps newly joined member to catch up + peers map[types.ID]Peer // peers map + + prober probing.Prober +} + +func (t *Transport) Start() error { + var err error + t.streamRt, err = newStreamRoundTripper(t.TLSInfo, t.DialTimeout) + if err != nil { + return err + } + t.pipelineRt, err = NewRoundTripper(t.TLSInfo, t.DialTimeout) + if err != nil { + return err + } + t.remotes = make(map[types.ID]*remote) + t.peers = make(map[types.ID]Peer) + t.prober = probing.NewProber(t.pipelineRt) + return nil +} + +func (t *Transport) Handler() http.Handler { + pipelineHandler := newPipelineHandler(t, t.Raft, t.ClusterID) + streamHandler := newStreamHandler(t, t, t.Raft, t.ID, t.ClusterID) + snapHandler := newSnapshotHandler(t, t.Raft, t.Snapshotter, t.ClusterID) + mux := http.NewServeMux() + mux.Handle(RaftPrefix, pipelineHandler) + mux.Handle(RaftStreamPrefix+"/", streamHandler) + mux.Handle(RaftSnapshotPrefix, snapHandler) + mux.Handle(ProbingPrefix, probing.NewHandler()) + return mux +} + +func (t *Transport) Get(id types.ID) Peer { + t.mu.RLock() + defer t.mu.RUnlock() + return t.peers[id] +} + +func (t *Transport) Send(msgs []raftpb.Message) { + for _, m := range msgs { + if m.To == 0 { + // ignore intentionally dropped message + continue + } + to := types.ID(m.To) + + t.mu.RLock() + p, pok := t.peers[to] + g, rok := t.remotes[to] + t.mu.RUnlock() + + if pok { + if m.Type == raftpb.MsgApp { + t.ServerStats.SendAppendReq(m.Size()) + } + p.send(m) + continue + } + + if rok { + g.send(m) + continue + } + + plog.Debugf("ignored message %s (sent to unknown peer %s)", m.Type, to) + } +} + +func (t *Transport) Stop() { + t.mu.Lock() + defer t.mu.Unlock() + for _, r := range t.remotes { + r.stop() + } + for _, p := range t.peers { + p.stop() + } + t.prober.RemoveAll() + if tr, ok := t.streamRt.(*http.Transport); ok { + tr.CloseIdleConnections() + } + if tr, ok := t.pipelineRt.(*http.Transport); ok { + tr.CloseIdleConnections() + } + t.peers = nil + t.remotes = nil +} + +// CutPeer drops messages to the specified peer. +func (t *Transport) CutPeer(id types.ID) { + t.mu.RLock() + p, pok := t.peers[id] + g, gok := t.remotes[id] + t.mu.RUnlock() + + if pok { + p.(Pausable).Pause() + } + if gok { + g.Pause() + } +} + +// MendPeer recovers the message dropping behavior of the given peer. +func (t *Transport) MendPeer(id types.ID) { + t.mu.RLock() + p, pok := t.peers[id] + g, gok := t.remotes[id] + t.mu.RUnlock() + + if pok { + p.(Pausable).Resume() + } + if gok { + g.Resume() + } +} + +func (t *Transport) AddRemote(id types.ID, us []string) { + t.mu.Lock() + defer t.mu.Unlock() + if t.remotes == nil { + // there's no clean way to shutdown the golang http server + // (see: https://github.com/golang/go/issues/4674) before + // stopping the transport; ignore any new connections. + return + } + if _, ok := t.peers[id]; ok { + return + } + if _, ok := t.remotes[id]; ok { + return + } + urls, err := types.NewURLs(us) + if err != nil { + plog.Panicf("newURLs %+v should never fail: %+v", us, err) + } + t.remotes[id] = startRemote(t, urls, id) +} + +func (t *Transport) AddPeer(id types.ID, us []string) { + t.mu.Lock() + defer t.mu.Unlock() + + if t.peers == nil { + panic("transport stopped") + } + if _, ok := t.peers[id]; ok { + return + } + urls, err := types.NewURLs(us) + if err != nil { + plog.Panicf("newURLs %+v should never fail: %+v", us, err) + } + fs := t.LeaderStats.Follower(id.String()) + t.peers[id] = startPeer(t, urls, id, fs) + addPeerToProber(t.prober, id.String(), us) + + plog.Infof("added peer %s", id) +} + +func (t *Transport) RemovePeer(id types.ID) { + t.mu.Lock() + defer t.mu.Unlock() + t.removePeer(id) +} + +func (t *Transport) RemoveAllPeers() { + t.mu.Lock() + defer t.mu.Unlock() + for id := range t.peers { + t.removePeer(id) + } +} + +// the caller of this function must have the peers mutex. +func (t *Transport) removePeer(id types.ID) { + if peer, ok := t.peers[id]; ok { + peer.stop() + } else { + plog.Panicf("unexpected removal of unknown peer '%d'", id) + } + delete(t.peers, id) + delete(t.LeaderStats.Followers, id.String()) + t.prober.Remove(id.String()) + plog.Infof("removed peer %s", id) +} + +func (t *Transport) UpdatePeer(id types.ID, us []string) { + t.mu.Lock() + defer t.mu.Unlock() + // TODO: return error or just panic? + if _, ok := t.peers[id]; !ok { + return + } + urls, err := types.NewURLs(us) + if err != nil { + plog.Panicf("newURLs %+v should never fail: %+v", us, err) + } + t.peers[id].update(urls) + + t.prober.Remove(id.String()) + addPeerToProber(t.prober, id.String(), us) + plog.Infof("updated peer %s", id) +} + +func (t *Transport) ActiveSince(id types.ID) time.Time { + t.mu.Lock() + defer t.mu.Unlock() + if p, ok := t.peers[id]; ok { + return p.activeSince() + } + return time.Time{} +} + +func (t *Transport) SendSnapshot(m snap.Message) { + t.mu.Lock() + defer t.mu.Unlock() + p := t.peers[types.ID(m.To)] + if p == nil { + m.CloseWithError(errMemberNotFound) + return + } + p.sendSnap(m) +} + +// Pausable is a testing interface for pausing transport traffic. +type Pausable interface { + Pause() + Resume() +} + +func (t *Transport) Pause() { + for _, p := range t.peers { + p.(Pausable).Pause() + } +} + +func (t *Transport) Resume() { + for _, p := range t.peers { + p.(Pausable).Resume() + } +} + +type nopTransporter struct{} + +func NewNopTransporter() Transporter { + return &nopTransporter{} +} + +func (s *nopTransporter) Start() error { return nil } +func (s *nopTransporter) Handler() http.Handler { return nil } +func (s *nopTransporter) Send(m []raftpb.Message) {} +func (s *nopTransporter) SendSnapshot(m snap.Message) {} +func (s *nopTransporter) AddRemote(id types.ID, us []string) {} +func (s *nopTransporter) AddPeer(id types.ID, us []string) {} +func (s *nopTransporter) RemovePeer(id types.ID) {} +func (s *nopTransporter) RemoveAllPeers() {} +func (s *nopTransporter) UpdatePeer(id types.ID, us []string) {} +func (s *nopTransporter) ActiveSince(id types.ID) time.Time { return time.Time{} } +func (s *nopTransporter) Stop() {} +func (s *nopTransporter) Pause() {} +func (s *nopTransporter) Resume() {} + +type snapTransporter struct { + nopTransporter + snapDoneC chan snap.Message + snapDir string +} + +func NewSnapTransporter(snapDir string) (Transporter, <-chan snap.Message) { + ch := make(chan snap.Message, 1) + tr := &snapTransporter{snapDoneC: ch, snapDir: snapDir} + return tr, ch +} + +func (s *snapTransporter) SendSnapshot(m snap.Message) { + ss := snap.New(s.snapDir) + ss.SaveDBFrom(m.ReadCloser, m.Snapshot.Metadata.Index+1) + m.CloseWithError(nil) + s.snapDoneC <- m +} diff --git a/deps/github.com/coreos/etcd/rafthttp/urlpick.go b/deps/github.com/coreos/etcd/rafthttp/urlpick.go new file mode 100644 index 000000000..61839deeb --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/urlpick.go @@ -0,0 +1,57 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "net/url" + "sync" + + "github.com/coreos/etcd/pkg/types" +) + +type urlPicker struct { + mu sync.Mutex // guards urls and picked + urls types.URLs + picked int +} + +func newURLPicker(urls types.URLs) *urlPicker { + return &urlPicker{ + urls: urls, + } +} + +func (p *urlPicker) update(urls types.URLs) { + p.mu.Lock() + defer p.mu.Unlock() + p.urls = urls + p.picked = 0 +} + +func (p *urlPicker) pick() url.URL { + p.mu.Lock() + defer p.mu.Unlock() + return p.urls[p.picked] +} + +// unreachable notices the picker that the given url is unreachable, +// and it should use other possible urls. +func (p *urlPicker) unreachable(u url.URL) { + p.mu.Lock() + defer p.mu.Unlock() + if u == p.urls[p.picked] { + p.picked = (p.picked + 1) % len(p.urls) + } +} diff --git a/deps/github.com/coreos/etcd/rafthttp/util.go b/deps/github.com/coreos/etcd/rafthttp/util.go new file mode 100644 index 000000000..12e548c77 --- /dev/null +++ b/deps/github.com/coreos/etcd/rafthttp/util.go @@ -0,0 +1,177 @@ +// Copyright 2015 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. + +package rafthttp + +import ( + "fmt" + "io" + "net" + "net/http" + "net/url" + "strings" + "time" + + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + "github.com/coreos/etcd/version" + "github.com/coreos/go-semver/semver" +) + +var ( + errMemberRemoved = fmt.Errorf("the member has been permanently removed from the cluster") + errMemberNotFound = fmt.Errorf("member not found") +) + +// NewListener returns a listener for raft message transfer between peers. +// It uses timeout listener to identify broken streams promptly. +func NewListener(u url.URL, tlsinfo *transport.TLSInfo) (net.Listener, error) { + return transport.NewTimeoutListener(u.Host, u.Scheme, tlsinfo, ConnReadTimeout, ConnWriteTimeout) +} + +// NewRoundTripper returns a roundTripper used to send requests +// to rafthttp listener of remote peers. +func NewRoundTripper(tlsInfo transport.TLSInfo, dialTimeout time.Duration) (http.RoundTripper, error) { + // It uses timeout transport to pair with remote timeout listeners. + // It sets no read/write timeout, because message in requests may + // take long time to write out before reading out the response. + return transport.NewTimeoutTransport(tlsInfo, dialTimeout, 0, 0) +} + +// newStreamRoundTripper returns a roundTripper used to send stream requests +// to rafthttp listener of remote peers. +// Read/write timeout is set for stream roundTripper to promptly +// find out broken status, which minimizes the number of messages +// sent on broken connection. +func newStreamRoundTripper(tlsInfo transport.TLSInfo, dialTimeout time.Duration) (http.RoundTripper, error) { + return transport.NewTimeoutTransport(tlsInfo, dialTimeout, ConnReadTimeout, ConnWriteTimeout) +} + +// createPostRequest creates a HTTP POST request that sends raft message. +func createPostRequest(u url.URL, path string, body io.Reader, ct string, urls types.URLs, from, cid types.ID) *http.Request { + uu := u + uu.Path = path + req, err := http.NewRequest("POST", uu.String(), body) + if err != nil { + plog.Panicf("unexpected new request error (%v)", err) + } + req.Header.Set("Content-Type", ct) + req.Header.Set("X-Server-From", from.String()) + req.Header.Set("X-Server-Version", version.Version) + req.Header.Set("X-Min-Cluster-Version", version.MinClusterVersion) + req.Header.Set("X-Etcd-Cluster-ID", cid.String()) + setPeerURLsHeader(req, urls) + + return req +} + +// checkPostResponse checks the response of the HTTP POST request that sends +// raft message. +func checkPostResponse(resp *http.Response, body []byte, req *http.Request, to types.ID) error { + switch resp.StatusCode { + case http.StatusPreconditionFailed: + switch strings.TrimSuffix(string(body), "\n") { + case errIncompatibleVersion.Error(): + plog.Errorf("request sent was ignored by peer %s (server version incompatible)", to) + return errIncompatibleVersion + case errClusterIDMismatch.Error(): + plog.Errorf("request sent was ignored (cluster ID mismatch: remote[%s]=%s, local=%s)", + to, resp.Header.Get("X-Etcd-Cluster-ID"), req.Header.Get("X-Etcd-Cluster-ID")) + return errClusterIDMismatch + default: + return fmt.Errorf("unhandled error %q when precondition failed", string(body)) + } + case http.StatusForbidden: + return errMemberRemoved + case http.StatusNoContent: + return nil + default: + return fmt.Errorf("unexpected http status %s while posting to %q", http.StatusText(resp.StatusCode), req.URL.String()) + } +} + +// reportCriticalError reports the given error through sending it into +// the given error channel. +// If the error channel is filled up when sending error, it drops the error +// because the fact that error has happened is reported, which is +// good enough. +func reportCriticalError(err error, errc chan<- error) { + select { + case errc <- err: + default: + } +} + +// compareMajorMinorVersion returns an integer comparing two versions based on +// their major and minor version. The result will be 0 if a==b, -1 if a < b, +// and 1 if a > b. +func compareMajorMinorVersion(a, b *semver.Version) int { + na := &semver.Version{Major: a.Major, Minor: a.Minor} + nb := &semver.Version{Major: b.Major, Minor: b.Minor} + switch { + case na.LessThan(*nb): + return -1 + case nb.LessThan(*na): + return 1 + default: + return 0 + } +} + +// serverVersion returns the server version from the given header. +func serverVersion(h http.Header) *semver.Version { + verStr := h.Get("X-Server-Version") + // backward compatibility with etcd 2.0 + if verStr == "" { + verStr = "2.0.0" + } + return semver.Must(semver.NewVersion(verStr)) +} + +// serverVersion returns the min cluster version from the given header. +func minClusterVersion(h http.Header) *semver.Version { + verStr := h.Get("X-Min-Cluster-Version") + // backward compatibility with etcd 2.0 + if verStr == "" { + verStr = "2.0.0" + } + return semver.Must(semver.NewVersion(verStr)) +} + +// checkVersionCompability checks whether the given version is compatible +// with the local version. +func checkVersionCompability(name string, server, minCluster *semver.Version) error { + localServer := semver.Must(semver.NewVersion(version.Version)) + localMinCluster := semver.Must(semver.NewVersion(version.MinClusterVersion)) + if compareMajorMinorVersion(server, localMinCluster) == -1 { + return fmt.Errorf("remote version is too low: remote[%s]=%s, local=%s", name, server, localServer) + } + if compareMajorMinorVersion(minCluster, localServer) == 1 { + return fmt.Errorf("local version is too low: remote[%s]=%s, local=%s", name, server, localServer) + } + return nil +} + +// setPeerURLsHeader reports local urls for peer discovery +func setPeerURLsHeader(req *http.Request, urls types.URLs) { + if urls == nil { + // often not set in unit tests + return + } + peerURLs := make([]string, urls.Len()) + for i := range urls { + peerURLs[i] = urls[i].String() + } + req.Header.Set("X-PeerURLs", strings.Join(peerURLs, ",")) +} diff --git a/deps/github.com/coreos/etcd/snap/db.go b/deps/github.com/coreos/etcd/snap/db.go new file mode 100644 index 000000000..01d897ae8 --- /dev/null +++ b/deps/github.com/coreos/etcd/snap/db.go @@ -0,0 +1,77 @@ +// Copyright 2015 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. + +package snap + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + + "github.com/coreos/etcd/pkg/fileutil" +) + +var ErrNoDBSnapshot = errors.New("snap: snapshot file doesn't exist") + +// SaveDBFrom saves snapshot of the database from the given reader. It +// guarantees the save operation is atomic. +func (s *Snapshotter) SaveDBFrom(r io.Reader, id uint64) (int64, error) { + f, err := ioutil.TempFile(s.dir, "tmp") + if err != nil { + return 0, err + } + var n int64 + n, err = io.Copy(f, r) + if err == nil { + err = fileutil.Fsync(f) + } + f.Close() + if err != nil { + os.Remove(f.Name()) + return n, err + } + fn := s.dbFilePath(id) + if fileutil.Exist(fn) { + os.Remove(f.Name()) + return n, nil + } + err = os.Rename(f.Name(), fn) + if err != nil { + os.Remove(f.Name()) + return n, err + } + + plog.Infof("saved database snapshot to disk [total bytes: %d]", n) + + return n, nil +} + +// DBFilePath returns the file path for the snapshot of the database with +// given id. If the snapshot does not exist, it returns error. +func (s *Snapshotter) DBFilePath(id uint64) (string, error) { + if _, err := fileutil.ReadDir(s.dir); err != nil { + return "", err + } + if fn := s.dbFilePath(id); fileutil.Exist(fn) { + return fn, nil + } + return "", ErrNoDBSnapshot +} + +func (s *Snapshotter) dbFilePath(id uint64) string { + return filepath.Join(s.dir, fmt.Sprintf("%016x.snap.db", id)) +} diff --git a/deps/github.com/coreos/etcd/snap/message.go b/deps/github.com/coreos/etcd/snap/message.go new file mode 100644 index 000000000..d73713ff1 --- /dev/null +++ b/deps/github.com/coreos/etcd/snap/message.go @@ -0,0 +1,64 @@ +// Copyright 2015 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. + +package snap + +import ( + "io" + + "github.com/coreos/etcd/pkg/ioutil" + "github.com/coreos/etcd/raft/raftpb" +) + +// Message is a struct that contains a raft Message and a ReadCloser. The type +// of raft message MUST be MsgSnap, which contains the raft meta-data and an +// additional data []byte field that contains the snapshot of the actual state +// machine. +// Message contains the ReadCloser field for handling large snapshot. This avoid +// copying the entire snapshot into a byte array, which consumes a lot of memory. +// +// User of Message should close the Message after sending it. +type Message struct { + raftpb.Message + ReadCloser io.ReadCloser + TotalSize int64 + closeC chan bool +} + +func NewMessage(rs raftpb.Message, rc io.ReadCloser, rcSize int64) *Message { + return &Message{ + Message: rs, + ReadCloser: ioutil.NewExactReadCloser(rc, rcSize), + TotalSize: int64(rs.Size()) + rcSize, + closeC: make(chan bool, 1), + } +} + +// CloseNotify returns a channel that receives a single value +// when the message sent is finished. true indicates the sent +// is successful. +func (m Message) CloseNotify() <-chan bool { + return m.closeC +} + +func (m Message) CloseWithError(err error) { + if cerr := m.ReadCloser.Close(); cerr != nil { + err = cerr + } + if err == nil { + m.closeC <- true + } else { + m.closeC <- false + } +} diff --git a/deps/github.com/coreos/etcd/snap/metrics.go b/deps/github.com/coreos/etcd/snap/metrics.go new file mode 100644 index 000000000..433ef09d4 --- /dev/null +++ b/deps/github.com/coreos/etcd/snap/metrics.go @@ -0,0 +1,41 @@ +// Copyright 2015 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. + +package snap + +import "github.com/prometheus/client_golang/prometheus" + +var ( + // TODO: save_fsync latency? + saveDurations = prometheus.NewHistogram(prometheus.HistogramOpts{ + Namespace: "etcd_debugging", + Subsystem: "snap", + Name: "save_total_duration_seconds", + Help: "The total latency distributions of save called by snapshot.", + Buckets: prometheus.ExponentialBuckets(0.001, 2, 14), + }) + + marshallingDurations = prometheus.NewHistogram(prometheus.HistogramOpts{ + Namespace: "etcd_debugging", + Subsystem: "snap", + Name: "save_marshalling_duration_seconds", + Help: "The marshalling cost distributions of save called by snapshot.", + Buckets: prometheus.ExponentialBuckets(0.001, 2, 14), + }) +) + +func init() { + prometheus.MustRegister(saveDurations) + prometheus.MustRegister(marshallingDurations) +} diff --git a/deps/github.com/coreos/etcd/snap/snappb/snap.pb.go b/deps/github.com/coreos/etcd/snap/snappb/snap.pb.go new file mode 100644 index 000000000..05a77ff9d --- /dev/null +++ b/deps/github.com/coreos/etcd/snap/snappb/snap.pb.go @@ -0,0 +1,353 @@ +// Code generated by protoc-gen-gogo. +// source: snap.proto +// DO NOT EDIT! + +/* + Package snappb is a generated protocol buffer package. + + It is generated from these files: + snap.proto + + It has these top-level messages: + Snapshot +*/ +package snappb + +import ( + "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + + 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 Snapshot struct { + Crc uint32 `protobuf:"varint,1,opt,name=crc" json:"crc"` + Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorSnap, []int{0} } + +func init() { + proto.RegisterType((*Snapshot)(nil), "snappb.snapshot") +} +func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintSnap(dAtA, i, uint64(m.Crc)) + if m.Data != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintSnap(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Snap(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 encodeFixed32Snap(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 encodeVarintSnap(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 *Snapshot) Size() (n int) { + var l int + _ = l + n += 1 + sovSnap(uint64(m.Crc)) + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovSnap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSnap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSnap(x uint64) (n int) { + return sovSnap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Snapshot) 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 ErrIntOverflowSnap + } + 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: snapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Crc", wireType) + } + m.Crc = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Crc |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnap + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSnap + } + 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 skipSnap(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, ErrIntOverflowSnap + } + 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, ErrIntOverflowSnap + } + 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, ErrIntOverflowSnap + } + 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, ErrInvalidLengthSnap + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnap + } + 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 := skipSnap(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 ( + ErrInvalidLengthSnap = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSnap = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("snap.proto", fileDescriptorSnap) } + +var fileDescriptorSnap = []byte{ + // 126 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0xce, 0x4b, 0x2c, + 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0xb1, 0x0b, 0x92, 0xa4, 0x44, 0xd2, 0xf3, + 0xd3, 0xf3, 0xc1, 0x42, 0xfa, 0x20, 0x16, 0x44, 0x56, 0xc9, 0x8c, 0x8b, 0x03, 0x24, 0x5f, 0x9c, + 0x91, 0x5f, 0x22, 0x24, 0xc6, 0xc5, 0x9c, 0x5c, 0x94, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xeb, + 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x48, 0x40, 0x48, 0x88, 0x8b, 0x25, 0x25, 0xb1, 0x24, + 0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xcc, 0x76, 0x12, 0x39, 0xf1, 0x50, 0x8e, 0xe1, + 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf1, 0x58, 0x8e, + 0x01, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0f, 0x32, 0xb2, 0x78, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/coreos/etcd/snap/snappb/snap.proto b/deps/github.com/coreos/etcd/snap/snappb/snap.proto new file mode 100644 index 000000000..cd3d21d0e --- /dev/null +++ b/deps/github.com/coreos/etcd/snap/snappb/snap.proto @@ -0,0 +1,14 @@ +syntax = "proto2"; +package snappb; + +import "gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_getters_all) = false; + +message snapshot { + optional uint32 crc = 1 [(gogoproto.nullable) = false]; + optional bytes data = 2; +} diff --git a/deps/github.com/coreos/etcd/snap/snapshotter.go b/deps/github.com/coreos/etcd/snap/snapshotter.go new file mode 100644 index 000000000..007555921 --- /dev/null +++ b/deps/github.com/coreos/etcd/snap/snapshotter.go @@ -0,0 +1,204 @@ +// Copyright 2015 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. + +// Package snap stores raft nodes' states with snapshots. +package snap + +import ( + "errors" + "fmt" + "hash/crc32" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strings" + "time" + + pioutil "github.com/coreos/etcd/pkg/ioutil" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/snap/snappb" + + "github.com/coreos/pkg/capnslog" +) + +const ( + snapSuffix = ".snap" +) + +var ( + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "snap") + + ErrNoSnapshot = errors.New("snap: no available snapshot") + ErrEmptySnapshot = errors.New("snap: empty snapshot") + ErrCRCMismatch = errors.New("snap: crc mismatch") + crcTable = crc32.MakeTable(crc32.Castagnoli) + + // A map of valid files that can be present in the snap folder. + validFiles = map[string]bool{ + "db": true, + } +) + +type Snapshotter struct { + dir string +} + +func New(dir string) *Snapshotter { + return &Snapshotter{ + dir: dir, + } +} + +func (s *Snapshotter) SaveSnap(snapshot raftpb.Snapshot) error { + if raft.IsEmptySnap(snapshot) { + return nil + } + return s.save(&snapshot) +} + +func (s *Snapshotter) save(snapshot *raftpb.Snapshot) error { + start := time.Now() + + fname := fmt.Sprintf("%016x-%016x%s", snapshot.Metadata.Term, snapshot.Metadata.Index, snapSuffix) + b := pbutil.MustMarshal(snapshot) + crc := crc32.Update(0, crcTable, b) + snap := snappb.Snapshot{Crc: crc, Data: b} + d, err := snap.Marshal() + if err != nil { + return err + } else { + marshallingDurations.Observe(float64(time.Since(start)) / float64(time.Second)) + } + + err = pioutil.WriteAndSyncFile(filepath.Join(s.dir, fname), d, 0666) + if err == nil { + saveDurations.Observe(float64(time.Since(start)) / float64(time.Second)) + } else { + err1 := os.Remove(filepath.Join(s.dir, fname)) + if err1 != nil { + plog.Errorf("failed to remove broken snapshot file %s", filepath.Join(s.dir, fname)) + } + } + return err +} + +func (s *Snapshotter) Load() (*raftpb.Snapshot, error) { + names, err := s.snapNames() + if err != nil { + return nil, err + } + var snap *raftpb.Snapshot + for _, name := range names { + if snap, err = loadSnap(s.dir, name); err == nil { + break + } + } + if err != nil { + return nil, ErrNoSnapshot + } + return snap, nil +} + +func loadSnap(dir, name string) (*raftpb.Snapshot, error) { + fpath := filepath.Join(dir, name) + snap, err := Read(fpath) + if err != nil { + renameBroken(fpath) + } + return snap, err +} + +// Read reads the snapshot named by snapname and returns the snapshot. +func Read(snapname string) (*raftpb.Snapshot, error) { + b, err := ioutil.ReadFile(snapname) + if err != nil { + plog.Errorf("cannot read file %v: %v", snapname, err) + return nil, err + } + + if len(b) == 0 { + plog.Errorf("unexpected empty snapshot") + return nil, ErrEmptySnapshot + } + + var serializedSnap snappb.Snapshot + if err = serializedSnap.Unmarshal(b); err != nil { + plog.Errorf("corrupted snapshot file %v: %v", snapname, err) + return nil, err + } + + if len(serializedSnap.Data) == 0 || serializedSnap.Crc == 0 { + plog.Errorf("unexpected empty snapshot") + return nil, ErrEmptySnapshot + } + + crc := crc32.Update(0, crcTable, serializedSnap.Data) + if crc != serializedSnap.Crc { + plog.Errorf("corrupted snapshot file %v: crc mismatch", snapname) + return nil, ErrCRCMismatch + } + + var snap raftpb.Snapshot + if err = snap.Unmarshal(serializedSnap.Data); err != nil { + plog.Errorf("corrupted snapshot file %v: %v", snapname, err) + return nil, err + } + return &snap, nil +} + +// snapNames returns the filename of the snapshots in logical time order (from newest to oldest). +// If there is no available snapshots, an ErrNoSnapshot will be returned. +func (s *Snapshotter) snapNames() ([]string, error) { + dir, err := os.Open(s.dir) + if err != nil { + return nil, err + } + defer dir.Close() + names, err := dir.Readdirnames(-1) + if err != nil { + return nil, err + } + snaps := checkSuffix(names) + if len(snaps) == 0 { + return nil, ErrNoSnapshot + } + sort.Sort(sort.Reverse(sort.StringSlice(snaps))) + return snaps, nil +} + +func checkSuffix(names []string) []string { + snaps := []string{} + for i := range names { + if strings.HasSuffix(names[i], snapSuffix) { + snaps = append(snaps, names[i]) + } else { + // If we find a file which is not a snapshot then check if it's + // a vaild file. If not throw out a warning. + if _, ok := validFiles[names[i]]; !ok { + plog.Warningf("skipped unexpected non snapshot file %v", names[i]) + } + } + } + return snaps +} + +func renameBroken(path string) { + brokenPath := path + ".broken" + if err := os.Rename(path, brokenPath); err != nil { + plog.Warningf("cannot rename broken snapshot file %v to %v: %v", path, brokenPath, err) + } +} diff --git a/deps/github.com/coreos/etcd/store/doc.go b/deps/github.com/coreos/etcd/store/doc.go new file mode 100644 index 000000000..612df9279 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/doc.go @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +// Package store defines etcd's in-memory key/value store. +package store diff --git a/deps/github.com/coreos/etcd/store/event.go b/deps/github.com/coreos/etcd/store/event.go new file mode 100644 index 000000000..efcddb0e0 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/event.go @@ -0,0 +1,71 @@ +// Copyright 2015 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. + +package store + +const ( + Get = "get" + Create = "create" + Set = "set" + Update = "update" + Delete = "delete" + CompareAndSwap = "compareAndSwap" + CompareAndDelete = "compareAndDelete" + Expire = "expire" +) + +type Event struct { + Action string `json:"action"` + Node *NodeExtern `json:"node,omitempty"` + PrevNode *NodeExtern `json:"prevNode,omitempty"` + EtcdIndex uint64 `json:"-"` + Refresh bool `json:"refresh,omitempty"` +} + +func newEvent(action string, key string, modifiedIndex, createdIndex uint64) *Event { + n := &NodeExtern{ + Key: key, + ModifiedIndex: modifiedIndex, + CreatedIndex: createdIndex, + } + + return &Event{ + Action: action, + Node: n, + } +} + +func (e *Event) IsCreated() bool { + if e.Action == Create { + return true + } + return e.Action == Set && e.PrevNode == nil +} + +func (e *Event) Index() uint64 { + return e.Node.ModifiedIndex +} + +func (e *Event) Clone() *Event { + return &Event{ + Action: e.Action, + EtcdIndex: e.EtcdIndex, + Node: e.Node.Clone(), + PrevNode: e.PrevNode.Clone(), + } +} + +func (e *Event) SetRefresh() { + e.Refresh = true +} diff --git a/deps/github.com/coreos/etcd/store/event_history.go b/deps/github.com/coreos/etcd/store/event_history.go new file mode 100644 index 000000000..235d87a26 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/event_history.go @@ -0,0 +1,129 @@ +// Copyright 2015 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. + +package store + +import ( + "fmt" + "path" + "strings" + "sync" + + etcdErr "github.com/coreos/etcd/error" +) + +type EventHistory struct { + Queue eventQueue + StartIndex uint64 + LastIndex uint64 + rwl sync.RWMutex +} + +func newEventHistory(capacity int) *EventHistory { + return &EventHistory{ + Queue: eventQueue{ + Capacity: capacity, + Events: make([]*Event, capacity), + }, + } +} + +// addEvent function adds event into the eventHistory +func (eh *EventHistory) addEvent(e *Event) *Event { + eh.rwl.Lock() + defer eh.rwl.Unlock() + + eh.Queue.insert(e) + + eh.LastIndex = e.Index() + + eh.StartIndex = eh.Queue.Events[eh.Queue.Front].Index() + + return e +} + +// scan enumerates events from the index history and stops at the first point +// where the key matches. +func (eh *EventHistory) scan(key string, recursive bool, index uint64) (*Event, *etcdErr.Error) { + eh.rwl.RLock() + defer eh.rwl.RUnlock() + + // index should be after the event history's StartIndex + if index < eh.StartIndex { + return nil, + etcdErr.NewError(etcdErr.EcodeEventIndexCleared, + fmt.Sprintf("the requested history has been cleared [%v/%v]", + eh.StartIndex, index), 0) + } + + // the index should come before the size of the queue minus the duplicate count + if index > eh.LastIndex { // future index + return nil, nil + } + + offset := index - eh.StartIndex + i := (eh.Queue.Front + int(offset)) % eh.Queue.Capacity + + for { + e := eh.Queue.Events[i] + + if !e.Refresh { + ok := (e.Node.Key == key) + + if recursive { + // add tailing slash + nkey := path.Clean(key) + if nkey[len(nkey)-1] != '/' { + nkey = nkey + "/" + } + + ok = ok || strings.HasPrefix(e.Node.Key, nkey) + } + + if (e.Action == Delete || e.Action == Expire) && e.PrevNode != nil && e.PrevNode.Dir { + ok = ok || strings.HasPrefix(key, e.PrevNode.Key) + } + + if ok { + return e, nil + } + } + + i = (i + 1) % eh.Queue.Capacity + + if i == eh.Queue.Back { + return nil, nil + } + } +} + +// clone will be protected by a stop-world lock +// do not need to obtain internal lock +func (eh *EventHistory) clone() *EventHistory { + clonedQueue := eventQueue{ + Capacity: eh.Queue.Capacity, + Events: make([]*Event, eh.Queue.Capacity), + Size: eh.Queue.Size, + Front: eh.Queue.Front, + Back: eh.Queue.Back, + } + + copy(clonedQueue.Events, eh.Queue.Events) + return &EventHistory{ + StartIndex: eh.StartIndex, + Queue: clonedQueue, + LastIndex: eh.LastIndex, + } + +} diff --git a/deps/github.com/coreos/etcd/store/event_queue.go b/deps/github.com/coreos/etcd/store/event_queue.go new file mode 100644 index 000000000..767b83591 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/event_queue.go @@ -0,0 +1,34 @@ +// Copyright 2015 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. + +package store + +type eventQueue struct { + Events []*Event + Size int + Front int + Back int + Capacity int +} + +func (eq *eventQueue) insert(e *Event) { + eq.Events[eq.Back] = e + eq.Back = (eq.Back + 1) % eq.Capacity + + if eq.Size == eq.Capacity { //dequeue + eq.Front = (eq.Front + 1) % eq.Capacity + } else { + eq.Size++ + } +} diff --git a/deps/github.com/coreos/etcd/store/metrics.go b/deps/github.com/coreos/etcd/store/metrics.go new file mode 100644 index 000000000..26404ba72 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/metrics.go @@ -0,0 +1,128 @@ +// Copyright 2015 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. + +package store + +import ( + "github.com/prometheus/client_golang/prometheus" +) + +// Set of raw Prometheus metrics. +// Labels +// * action = declared in event.go +// * outcome = Outcome +// Do not increment directly, use Report* methods. +var ( + readCounter = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "store", + Name: "reads_total", + Help: "Total number of reads action by (get/getRecursive), local to this member.", + }, []string{"action"}) + + writeCounter = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "store", + Name: "writes_total", + Help: "Total number of writes (e.g. set/compareAndDelete) seen by this member.", + }, []string{"action"}) + + readFailedCounter = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "store", + Name: "reads_failed_total", + Help: "Failed read actions by (get/getRecursive), local to this member.", + }, []string{"action"}) + + writeFailedCounter = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "store", + Name: "writes_failed_total", + Help: "Failed write actions (e.g. set/compareAndDelete), seen by this member.", + }, []string{"action"}) + + expireCounter = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "store", + Name: "expires_total", + Help: "Total number of expired keys.", + }) + + watchRequests = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: "etcd_debugging", + Subsystem: "store", + Name: "watch_requests_total", + Help: "Total number of incoming watch requests (new or reestablished).", + }) + + watcherCount = prometheus.NewGauge( + prometheus.GaugeOpts{ + Namespace: "etcd_debugging", + Subsystem: "store", + Name: "watchers", + Help: "Count of currently active watchers.", + }) +) + +const ( + GetRecursive = "getRecursive" +) + +func init() { + prometheus.MustRegister(readCounter) + prometheus.MustRegister(writeCounter) + prometheus.MustRegister(expireCounter) + prometheus.MustRegister(watchRequests) + prometheus.MustRegister(watcherCount) +} + +func reportReadSuccess(read_action string) { + readCounter.WithLabelValues(read_action).Inc() +} + +func reportReadFailure(read_action string) { + readCounter.WithLabelValues(read_action).Inc() + readFailedCounter.WithLabelValues(read_action).Inc() +} + +func reportWriteSuccess(write_action string) { + writeCounter.WithLabelValues(write_action).Inc() +} + +func reportWriteFailure(write_action string) { + writeCounter.WithLabelValues(write_action).Inc() + writeFailedCounter.WithLabelValues(write_action).Inc() +} + +func reportExpiredKey() { + expireCounter.Inc() +} + +func reportWatchRequest() { + watchRequests.Inc() +} + +func reportWatcherAdded() { + watcherCount.Inc() +} + +func reportWatcherRemoved() { + watcherCount.Dec() +} diff --git a/deps/github.com/coreos/etcd/store/node.go b/deps/github.com/coreos/etcd/store/node.go new file mode 100644 index 000000000..541595535 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/node.go @@ -0,0 +1,395 @@ +// Copyright 2015 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. + +package store + +import ( + "path" + "sort" + "time" + + etcdErr "github.com/coreos/etcd/error" + "github.com/jonboulle/clockwork" +) + +// explanations of Compare function result +const ( + CompareMatch = iota + CompareIndexNotMatch + CompareValueNotMatch + CompareNotMatch +) + +var Permanent time.Time + +// node is the basic element in the store system. +// A key-value pair will have a string value +// A directory will have a children map +type node struct { + Path string + + CreatedIndex uint64 + ModifiedIndex uint64 + + Parent *node `json:"-"` // should not encode this field! avoid circular dependency. + + ExpireTime time.Time + Value string // for key-value pair + Children map[string]*node // for directory + + // A reference to the store this node is attached to. + store *store +} + +// newKV creates a Key-Value pair +func newKV(store *store, nodePath string, value string, createdIndex uint64, parent *node, expireTime time.Time) *node { + return &node{ + Path: nodePath, + CreatedIndex: createdIndex, + ModifiedIndex: createdIndex, + Parent: parent, + store: store, + ExpireTime: expireTime, + Value: value, + } +} + +// newDir creates a directory +func newDir(store *store, nodePath string, createdIndex uint64, parent *node, expireTime time.Time) *node { + return &node{ + Path: nodePath, + CreatedIndex: createdIndex, + ModifiedIndex: createdIndex, + Parent: parent, + ExpireTime: expireTime, + Children: make(map[string]*node), + store: store, + } +} + +// IsHidden function checks if the node is a hidden node. A hidden node +// will begin with '_' +// A hidden node will not be shown via get command under a directory +// For example if we have /foo/_hidden and /foo/notHidden, get "/foo" +// will only return /foo/notHidden +func (n *node) IsHidden() bool { + _, name := path.Split(n.Path) + + return name[0] == '_' +} + +// IsPermanent function checks if the node is a permanent one. +func (n *node) IsPermanent() bool { + // we use a uninitialized time.Time to indicate the node is a + // permanent one. + // the uninitialized time.Time should equal zero. + return n.ExpireTime.IsZero() +} + +// IsDir function checks whether the node is a directory. +// If the node is a directory, the function will return true. +// Otherwise the function will return false. +func (n *node) IsDir() bool { + return n.Children != nil +} + +// Read function gets the value of the node. +// If the receiver node is not a key-value pair, a "Not A File" error will be returned. +func (n *node) Read() (string, *etcdErr.Error) { + if n.IsDir() { + return "", etcdErr.NewError(etcdErr.EcodeNotFile, "", n.store.CurrentIndex) + } + + return n.Value, nil +} + +// Write function set the value of the node to the given value. +// If the receiver node is a directory, a "Not A File" error will be returned. +func (n *node) Write(value string, index uint64) *etcdErr.Error { + if n.IsDir() { + return etcdErr.NewError(etcdErr.EcodeNotFile, "", n.store.CurrentIndex) + } + + n.Value = value + n.ModifiedIndex = index + + return nil +} + +func (n *node) expirationAndTTL(clock clockwork.Clock) (*time.Time, int64) { + if !n.IsPermanent() { + /* compute ttl as: + ceiling( (expireTime - timeNow) / nanosecondsPerSecond ) + which ranges from 1..n + rather than as: + ( (expireTime - timeNow) / nanosecondsPerSecond ) + 1 + which ranges 1..n+1 + */ + ttlN := n.ExpireTime.Sub(clock.Now()) + ttl := ttlN / time.Second + if (ttlN % time.Second) > 0 { + ttl++ + } + t := n.ExpireTime.UTC() + return &t, int64(ttl) + } + return nil, 0 +} + +// List function return a slice of nodes under the receiver node. +// If the receiver node is not a directory, a "Not A Directory" error will be returned. +func (n *node) List() ([]*node, *etcdErr.Error) { + if !n.IsDir() { + return nil, etcdErr.NewError(etcdErr.EcodeNotDir, "", n.store.CurrentIndex) + } + + nodes := make([]*node, len(n.Children)) + + i := 0 + for _, node := range n.Children { + nodes[i] = node + i++ + } + + return nodes, nil +} + +// GetChild function returns the child node under the directory node. +// On success, it returns the file node +func (n *node) GetChild(name string) (*node, *etcdErr.Error) { + if !n.IsDir() { + return nil, etcdErr.NewError(etcdErr.EcodeNotDir, n.Path, n.store.CurrentIndex) + } + + child, ok := n.Children[name] + + if ok { + return child, nil + } + + return nil, nil +} + +// Add function adds a node to the receiver node. +// If the receiver is not a directory, a "Not A Directory" error will be returned. +// If there is an existing node with the same name under the directory, a "Already Exist" +// error will be returned +func (n *node) Add(child *node) *etcdErr.Error { + if !n.IsDir() { + return etcdErr.NewError(etcdErr.EcodeNotDir, "", n.store.CurrentIndex) + } + + _, name := path.Split(child.Path) + + if _, ok := n.Children[name]; ok { + return etcdErr.NewError(etcdErr.EcodeNodeExist, "", n.store.CurrentIndex) + } + + n.Children[name] = child + + return nil +} + +// Remove function remove the node. +func (n *node) Remove(dir, recursive bool, callback func(path string)) *etcdErr.Error { + if !n.IsDir() { // key-value pair + _, name := path.Split(n.Path) + + // find its parent and remove the node from the map + if n.Parent != nil && n.Parent.Children[name] == n { + delete(n.Parent.Children, name) + } + + if callback != nil { + callback(n.Path) + } + + if !n.IsPermanent() { + n.store.ttlKeyHeap.remove(n) + } + + return nil + } + + if !dir { + // cannot delete a directory without dir set to true + return etcdErr.NewError(etcdErr.EcodeNotFile, n.Path, n.store.CurrentIndex) + } + + if len(n.Children) != 0 && !recursive { + // cannot delete a directory if it is not empty and the operation + // is not recursive + return etcdErr.NewError(etcdErr.EcodeDirNotEmpty, n.Path, n.store.CurrentIndex) + } + + for _, child := range n.Children { // delete all children + child.Remove(true, true, callback) + } + + // delete self + _, name := path.Split(n.Path) + if n.Parent != nil && n.Parent.Children[name] == n { + delete(n.Parent.Children, name) + + if callback != nil { + callback(n.Path) + } + + if !n.IsPermanent() { + n.store.ttlKeyHeap.remove(n) + } + } + + return nil +} + +func (n *node) Repr(recursive, sorted bool, clock clockwork.Clock) *NodeExtern { + if n.IsDir() { + node := &NodeExtern{ + Key: n.Path, + Dir: true, + ModifiedIndex: n.ModifiedIndex, + CreatedIndex: n.CreatedIndex, + } + node.Expiration, node.TTL = n.expirationAndTTL(clock) + + if !recursive { + return node + } + + children, _ := n.List() + node.Nodes = make(NodeExterns, len(children)) + + // we do not use the index in the children slice directly + // we need to skip the hidden one + i := 0 + + for _, child := range children { + + if child.IsHidden() { // get will not list hidden node + continue + } + + node.Nodes[i] = child.Repr(recursive, sorted, clock) + + i++ + } + + // eliminate hidden nodes + node.Nodes = node.Nodes[:i] + if sorted { + sort.Sort(node.Nodes) + } + + return node + } + + // since n.Value could be changed later, so we need to copy the value out + value := n.Value + node := &NodeExtern{ + Key: n.Path, + Value: &value, + ModifiedIndex: n.ModifiedIndex, + CreatedIndex: n.CreatedIndex, + } + node.Expiration, node.TTL = n.expirationAndTTL(clock) + return node +} + +func (n *node) UpdateTTL(expireTime time.Time) { + if !n.IsPermanent() { + if expireTime.IsZero() { + // from ttl to permanent + n.ExpireTime = expireTime + // remove from ttl heap + n.store.ttlKeyHeap.remove(n) + return + } + + // update ttl + n.ExpireTime = expireTime + // update ttl heap + n.store.ttlKeyHeap.update(n) + return + } + + if expireTime.IsZero() { + return + } + + // from permanent to ttl + n.ExpireTime = expireTime + // push into ttl heap + n.store.ttlKeyHeap.push(n) +} + +// Compare function compares node index and value with provided ones. +// second result value explains result and equals to one of Compare.. constants +func (n *node) Compare(prevValue string, prevIndex uint64) (ok bool, which int) { + indexMatch := (prevIndex == 0 || n.ModifiedIndex == prevIndex) + valueMatch := (prevValue == "" || n.Value == prevValue) + ok = valueMatch && indexMatch + switch { + case valueMatch && indexMatch: + which = CompareMatch + case indexMatch && !valueMatch: + which = CompareValueNotMatch + case valueMatch && !indexMatch: + which = CompareIndexNotMatch + default: + which = CompareNotMatch + } + return +} + +// Clone function clone the node recursively and return the new node. +// If the node is a directory, it will clone all the content under this directory. +// If the node is a key-value pair, it will clone the pair. +func (n *node) Clone() *node { + if !n.IsDir() { + newkv := newKV(n.store, n.Path, n.Value, n.CreatedIndex, n.Parent, n.ExpireTime) + newkv.ModifiedIndex = n.ModifiedIndex + return newkv + } + + clone := newDir(n.store, n.Path, n.CreatedIndex, n.Parent, n.ExpireTime) + clone.ModifiedIndex = n.ModifiedIndex + + for key, child := range n.Children { + clone.Children[key] = child.Clone() + } + + return clone +} + +// recoverAndclean function help to do recovery. +// Two things need to be done: 1. recovery structure; 2. delete expired nodes +// +// If the node is a directory, it will help recover children's parent pointer and recursively +// call this function on its children. +// We check the expire last since we need to recover the whole structure first and add all the +// notifications into the event history. +func (n *node) recoverAndclean() { + if n.IsDir() { + for _, child := range n.Children { + child.Parent = n + child.store = n.store + child.recoverAndclean() + } + } + + if !n.ExpireTime.IsZero() { + n.store.ttlKeyHeap.push(n) + } +} diff --git a/deps/github.com/coreos/etcd/store/node_extern.go b/deps/github.com/coreos/etcd/store/node_extern.go new file mode 100644 index 000000000..7ba870cbe --- /dev/null +++ b/deps/github.com/coreos/etcd/store/node_extern.go @@ -0,0 +1,116 @@ +// Copyright 2015 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. + +package store + +import ( + "sort" + "time" + + "github.com/jonboulle/clockwork" +) + +// NodeExtern is the external representation of the +// internal node with additional fields +// PrevValue is the previous value of the node +// TTL is time to live in second +type NodeExtern struct { + Key string `json:"key,omitempty"` + Value *string `json:"value,omitempty"` + Dir bool `json:"dir,omitempty"` + Expiration *time.Time `json:"expiration,omitempty"` + TTL int64 `json:"ttl,omitempty"` + Nodes NodeExterns `json:"nodes,omitempty"` + ModifiedIndex uint64 `json:"modifiedIndex,omitempty"` + CreatedIndex uint64 `json:"createdIndex,omitempty"` +} + +func (eNode *NodeExtern) loadInternalNode(n *node, recursive, sorted bool, clock clockwork.Clock) { + if n.IsDir() { // node is a directory + eNode.Dir = true + + children, _ := n.List() + eNode.Nodes = make(NodeExterns, len(children)) + + // we do not use the index in the children slice directly + // we need to skip the hidden one + i := 0 + + for _, child := range children { + if child.IsHidden() { // get will not return hidden nodes + continue + } + + eNode.Nodes[i] = child.Repr(recursive, sorted, clock) + i++ + } + + // eliminate hidden nodes + eNode.Nodes = eNode.Nodes[:i] + + if sorted { + sort.Sort(eNode.Nodes) + } + + } else { // node is a file + value, _ := n.Read() + eNode.Value = &value + } + + eNode.Expiration, eNode.TTL = n.expirationAndTTL(clock) +} + +func (eNode *NodeExtern) Clone() *NodeExtern { + if eNode == nil { + return nil + } + nn := &NodeExtern{ + Key: eNode.Key, + Dir: eNode.Dir, + TTL: eNode.TTL, + ModifiedIndex: eNode.ModifiedIndex, + CreatedIndex: eNode.CreatedIndex, + } + if eNode.Value != nil { + s := *eNode.Value + nn.Value = &s + } + if eNode.Expiration != nil { + t := *eNode.Expiration + nn.Expiration = &t + } + if eNode.Nodes != nil { + nn.Nodes = make(NodeExterns, len(eNode.Nodes)) + for i, n := range eNode.Nodes { + nn.Nodes[i] = n.Clone() + } + } + return nn +} + +type NodeExterns []*NodeExtern + +// interfaces for sorting + +func (ns NodeExterns) Len() int { + return len(ns) +} + +func (ns NodeExterns) Less(i, j int) bool { + return ns[i].Key < ns[j].Key +} + +func (ns NodeExterns) Swap(i, j int) { + ns[i], ns[j] = ns[j], ns[i] +} diff --git a/deps/github.com/coreos/etcd/store/stats.go b/deps/github.com/coreos/etcd/store/stats.go new file mode 100644 index 000000000..59b45f2b8 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/stats.go @@ -0,0 +1,146 @@ +// Copyright 2015 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. + +package store + +import ( + "encoding/json" + "sync/atomic" +) + +const ( + SetSuccess = iota + SetFail + DeleteSuccess + DeleteFail + CreateSuccess + CreateFail + UpdateSuccess + UpdateFail + CompareAndSwapSuccess + CompareAndSwapFail + GetSuccess + GetFail + ExpireCount + CompareAndDeleteSuccess + CompareAndDeleteFail +) + +type Stats struct { + + // Number of get requests + + GetSuccess uint64 `json:"getsSuccess"` + GetFail uint64 `json:"getsFail"` + + // Number of sets requests + + SetSuccess uint64 `json:"setsSuccess"` + SetFail uint64 `json:"setsFail"` + + // Number of delete requests + + DeleteSuccess uint64 `json:"deleteSuccess"` + DeleteFail uint64 `json:"deleteFail"` + + // Number of update requests + + UpdateSuccess uint64 `json:"updateSuccess"` + UpdateFail uint64 `json:"updateFail"` + + // Number of create requests + + CreateSuccess uint64 `json:"createSuccess"` + CreateFail uint64 `json:"createFail"` + + // Number of testAndSet requests + + CompareAndSwapSuccess uint64 `json:"compareAndSwapSuccess"` + CompareAndSwapFail uint64 `json:"compareAndSwapFail"` + + // Number of compareAndDelete requests + + CompareAndDeleteSuccess uint64 `json:"compareAndDeleteSuccess"` + CompareAndDeleteFail uint64 `json:"compareAndDeleteFail"` + + ExpireCount uint64 `json:"expireCount"` + + Watchers uint64 `json:"watchers"` +} + +func newStats() *Stats { + s := new(Stats) + return s +} + +func (s *Stats) clone() *Stats { + return &Stats{ + GetSuccess: s.GetSuccess, + GetFail: s.GetFail, + SetSuccess: s.SetSuccess, + SetFail: s.SetFail, + DeleteSuccess: s.DeleteSuccess, + DeleteFail: s.DeleteFail, + UpdateSuccess: s.UpdateSuccess, + UpdateFail: s.UpdateFail, + CreateSuccess: s.CreateSuccess, + CreateFail: s.CreateFail, + CompareAndSwapSuccess: s.CompareAndSwapSuccess, + CompareAndSwapFail: s.CompareAndSwapFail, + CompareAndDeleteSuccess: s.CompareAndDeleteSuccess, + CompareAndDeleteFail: s.CompareAndDeleteFail, + ExpireCount: s.ExpireCount, + Watchers: s.Watchers, + } +} + +func (s *Stats) toJson() []byte { + b, _ := json.Marshal(s) + return b +} + +func (s *Stats) Inc(field int) { + switch field { + case SetSuccess: + atomic.AddUint64(&s.SetSuccess, 1) + case SetFail: + atomic.AddUint64(&s.SetFail, 1) + case CreateSuccess: + atomic.AddUint64(&s.CreateSuccess, 1) + case CreateFail: + atomic.AddUint64(&s.CreateFail, 1) + case DeleteSuccess: + atomic.AddUint64(&s.DeleteSuccess, 1) + case DeleteFail: + atomic.AddUint64(&s.DeleteFail, 1) + case GetSuccess: + atomic.AddUint64(&s.GetSuccess, 1) + case GetFail: + atomic.AddUint64(&s.GetFail, 1) + case UpdateSuccess: + atomic.AddUint64(&s.UpdateSuccess, 1) + case UpdateFail: + atomic.AddUint64(&s.UpdateFail, 1) + case CompareAndSwapSuccess: + atomic.AddUint64(&s.CompareAndSwapSuccess, 1) + case CompareAndSwapFail: + atomic.AddUint64(&s.CompareAndSwapFail, 1) + case CompareAndDeleteSuccess: + atomic.AddUint64(&s.CompareAndDeleteSuccess, 1) + case CompareAndDeleteFail: + atomic.AddUint64(&s.CompareAndDeleteFail, 1) + case ExpireCount: + atomic.AddUint64(&s.ExpireCount, 1) + } +} diff --git a/deps/github.com/coreos/etcd/store/store.go b/deps/github.com/coreos/etcd/store/store.go new file mode 100644 index 000000000..edf7f2194 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/store.go @@ -0,0 +1,791 @@ +// Copyright 2015 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. + +package store + +import ( + "encoding/json" + "fmt" + "path" + "strconv" + "strings" + "sync" + "time" + + etcdErr "github.com/coreos/etcd/error" + "github.com/coreos/etcd/pkg/types" + "github.com/jonboulle/clockwork" +) + +// The default version to set when the store is first initialized. +const defaultVersion = 2 + +var minExpireTime time.Time + +func init() { + minExpireTime, _ = time.Parse(time.RFC3339, "2000-01-01T00:00:00Z") +} + +type Store interface { + Version() int + Index() uint64 + + Get(nodePath string, recursive, sorted bool) (*Event, error) + Set(nodePath string, dir bool, value string, expireOpts TTLOptionSet) (*Event, error) + Update(nodePath string, newValue string, expireOpts TTLOptionSet) (*Event, error) + Create(nodePath string, dir bool, value string, unique bool, + expireOpts TTLOptionSet) (*Event, error) + CompareAndSwap(nodePath string, prevValue string, prevIndex uint64, + value string, expireOpts TTLOptionSet) (*Event, error) + Delete(nodePath string, dir, recursive bool) (*Event, error) + CompareAndDelete(nodePath string, prevValue string, prevIndex uint64) (*Event, error) + + Watch(prefix string, recursive, stream bool, sinceIndex uint64) (Watcher, error) + + Save() ([]byte, error) + Recovery(state []byte) error + + Clone() Store + SaveNoCopy() ([]byte, error) + + JsonStats() []byte + DeleteExpiredKeys(cutoff time.Time) + + HasTTLKeys() bool +} + +type TTLOptionSet struct { + ExpireTime time.Time + Refresh bool +} + +type store struct { + Root *node + WatcherHub *watcherHub + CurrentIndex uint64 + Stats *Stats + CurrentVersion int + ttlKeyHeap *ttlKeyHeap // need to recovery manually + worldLock sync.RWMutex // stop the world lock + clock clockwork.Clock + readonlySet types.Set +} + +// New creates a store where the given namespaces will be created as initial directories. +func New(namespaces ...string) Store { + s := newStore(namespaces...) + s.clock = clockwork.NewRealClock() + return s +} + +func newStore(namespaces ...string) *store { + s := new(store) + s.CurrentVersion = defaultVersion + s.Root = newDir(s, "/", s.CurrentIndex, nil, Permanent) + for _, namespace := range namespaces { + s.Root.Add(newDir(s, namespace, s.CurrentIndex, s.Root, Permanent)) + } + s.Stats = newStats() + s.WatcherHub = newWatchHub(1000) + s.ttlKeyHeap = newTtlKeyHeap() + s.readonlySet = types.NewUnsafeSet(append(namespaces, "/")...) + return s +} + +// Version retrieves current version of the store. +func (s *store) Version() int { + return s.CurrentVersion +} + +// Index retrieves the current index of the store. +func (s *store) Index() uint64 { + s.worldLock.RLock() + defer s.worldLock.RUnlock() + return s.CurrentIndex +} + +// Get returns a get event. +// If recursive is true, it will return all the content under the node path. +// If sorted is true, it will sort the content by keys. +func (s *store) Get(nodePath string, recursive, sorted bool) (*Event, error) { + var err *etcdErr.Error + + s.worldLock.RLock() + defer s.worldLock.RUnlock() + + defer func() { + if err == nil { + s.Stats.Inc(GetSuccess) + if recursive { + reportReadSuccess(GetRecursive) + } else { + reportReadSuccess(Get) + } + return + } + + s.Stats.Inc(GetFail) + if recursive { + reportReadFailure(GetRecursive) + } else { + reportReadFailure(Get) + } + }() + + n, err := s.internalGet(nodePath) + if err != nil { + return nil, err + } + + e := newEvent(Get, nodePath, n.ModifiedIndex, n.CreatedIndex) + e.EtcdIndex = s.CurrentIndex + e.Node.loadInternalNode(n, recursive, sorted, s.clock) + + return e, nil +} + +// Create creates the node at nodePath. Create will help to create intermediate directories with no ttl. +// If the node has already existed, create will fail. +// If any node on the path is a file, create will fail. +func (s *store) Create(nodePath string, dir bool, value string, unique bool, expireOpts TTLOptionSet) (*Event, error) { + var err *etcdErr.Error + + s.worldLock.Lock() + defer s.worldLock.Unlock() + + defer func() { + if err == nil { + s.Stats.Inc(CreateSuccess) + reportWriteSuccess(Create) + return + } + + s.Stats.Inc(CreateFail) + reportWriteFailure(Create) + }() + + e, err := s.internalCreate(nodePath, dir, value, unique, false, expireOpts.ExpireTime, Create) + if err != nil { + return nil, err + } + + e.EtcdIndex = s.CurrentIndex + s.WatcherHub.notify(e) + + return e, nil +} + +// Set creates or replace the node at nodePath. +func (s *store) Set(nodePath string, dir bool, value string, expireOpts TTLOptionSet) (*Event, error) { + var err *etcdErr.Error + + s.worldLock.Lock() + defer s.worldLock.Unlock() + + defer func() { + if err == nil { + s.Stats.Inc(SetSuccess) + reportWriteSuccess(Set) + return + } + + s.Stats.Inc(SetFail) + reportWriteFailure(Set) + }() + + // Get prevNode value + n, getErr := s.internalGet(nodePath) + if getErr != nil && getErr.ErrorCode != etcdErr.EcodeKeyNotFound { + err = getErr + return nil, err + } + + if expireOpts.Refresh { + if getErr != nil { + err = getErr + return nil, err + } else { + value = n.Value + } + } + + // Set new value + e, err := s.internalCreate(nodePath, dir, value, false, true, expireOpts.ExpireTime, Set) + if err != nil { + return nil, err + } + e.EtcdIndex = s.CurrentIndex + + // Put prevNode into event + if getErr == nil { + prev := newEvent(Get, nodePath, n.ModifiedIndex, n.CreatedIndex) + prev.Node.loadInternalNode(n, false, false, s.clock) + e.PrevNode = prev.Node + } + + if !expireOpts.Refresh { + s.WatcherHub.notify(e) + } else { + e.SetRefresh() + s.WatcherHub.add(e) + } + + return e, nil +} + +// returns user-readable cause of failed comparison +func getCompareFailCause(n *node, which int, prevValue string, prevIndex uint64) string { + switch which { + case CompareIndexNotMatch: + return fmt.Sprintf("[%v != %v]", prevIndex, n.ModifiedIndex) + case CompareValueNotMatch: + return fmt.Sprintf("[%v != %v]", prevValue, n.Value) + default: + return fmt.Sprintf("[%v != %v] [%v != %v]", prevValue, n.Value, prevIndex, n.ModifiedIndex) + } +} + +func (s *store) CompareAndSwap(nodePath string, prevValue string, prevIndex uint64, + value string, expireOpts TTLOptionSet) (*Event, error) { + + var err *etcdErr.Error + + s.worldLock.Lock() + defer s.worldLock.Unlock() + + defer func() { + if err == nil { + s.Stats.Inc(CompareAndSwapSuccess) + reportWriteSuccess(CompareAndSwap) + return + } + + s.Stats.Inc(CompareAndSwapFail) + reportWriteFailure(CompareAndSwap) + }() + + nodePath = path.Clean(path.Join("/", nodePath)) + // we do not allow the user to change "/" + if s.readonlySet.Contains(nodePath) { + return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, "/", s.CurrentIndex) + } + + n, err := s.internalGet(nodePath) + if err != nil { + return nil, err + } + if n.IsDir() { // can only compare and swap file + err = etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, s.CurrentIndex) + return nil, err + } + + // If both of the prevValue and prevIndex are given, we will test both of them. + // Command will be executed, only if both of the tests are successful. + if ok, which := n.Compare(prevValue, prevIndex); !ok { + cause := getCompareFailCause(n, which, prevValue, prevIndex) + err = etcdErr.NewError(etcdErr.EcodeTestFailed, cause, s.CurrentIndex) + return nil, err + } + + if expireOpts.Refresh { + value = n.Value + } + + // update etcd index + s.CurrentIndex++ + + e := newEvent(CompareAndSwap, nodePath, s.CurrentIndex, n.CreatedIndex) + e.EtcdIndex = s.CurrentIndex + e.PrevNode = n.Repr(false, false, s.clock) + eNode := e.Node + + // if test succeed, write the value + n.Write(value, s.CurrentIndex) + n.UpdateTTL(expireOpts.ExpireTime) + + // copy the value for safety + valueCopy := value + eNode.Value = &valueCopy + eNode.Expiration, eNode.TTL = n.expirationAndTTL(s.clock) + + if !expireOpts.Refresh { + s.WatcherHub.notify(e) + } else { + e.SetRefresh() + s.WatcherHub.add(e) + } + + return e, nil +} + +// Delete deletes the node at the given path. +// If the node is a directory, recursive must be true to delete it. +func (s *store) Delete(nodePath string, dir, recursive bool) (*Event, error) { + var err *etcdErr.Error + + s.worldLock.Lock() + defer s.worldLock.Unlock() + + defer func() { + if err == nil { + s.Stats.Inc(DeleteSuccess) + reportWriteSuccess(Delete) + return + } + + s.Stats.Inc(DeleteFail) + reportWriteFailure(Delete) + }() + + nodePath = path.Clean(path.Join("/", nodePath)) + // we do not allow the user to change "/" + if s.readonlySet.Contains(nodePath) { + return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, "/", s.CurrentIndex) + } + + // recursive implies dir + if recursive { + dir = true + } + + n, err := s.internalGet(nodePath) + if err != nil { // if the node does not exist, return error + return nil, err + } + + nextIndex := s.CurrentIndex + 1 + e := newEvent(Delete, nodePath, nextIndex, n.CreatedIndex) + e.EtcdIndex = nextIndex + e.PrevNode = n.Repr(false, false, s.clock) + eNode := e.Node + + if n.IsDir() { + eNode.Dir = true + } + + callback := func(path string) { // notify function + // notify the watchers with deleted set true + s.WatcherHub.notifyWatchers(e, path, true) + } + + err = n.Remove(dir, recursive, callback) + if err != nil { + return nil, err + } + + // update etcd index + s.CurrentIndex++ + + s.WatcherHub.notify(e) + + return e, nil +} + +func (s *store) CompareAndDelete(nodePath string, prevValue string, prevIndex uint64) (*Event, error) { + var err *etcdErr.Error + + s.worldLock.Lock() + defer s.worldLock.Unlock() + + defer func() { + if err == nil { + s.Stats.Inc(CompareAndDeleteSuccess) + reportWriteSuccess(CompareAndDelete) + return + } + + s.Stats.Inc(CompareAndDeleteFail) + reportWriteFailure(CompareAndDelete) + }() + + nodePath = path.Clean(path.Join("/", nodePath)) + + n, err := s.internalGet(nodePath) + if err != nil { // if the node does not exist, return error + return nil, err + } + if n.IsDir() { // can only compare and delete file + return nil, etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, s.CurrentIndex) + } + + // If both of the prevValue and prevIndex are given, we will test both of them. + // Command will be executed, only if both of the tests are successful. + if ok, which := n.Compare(prevValue, prevIndex); !ok { + cause := getCompareFailCause(n, which, prevValue, prevIndex) + return nil, etcdErr.NewError(etcdErr.EcodeTestFailed, cause, s.CurrentIndex) + } + + // update etcd index + s.CurrentIndex++ + + e := newEvent(CompareAndDelete, nodePath, s.CurrentIndex, n.CreatedIndex) + e.EtcdIndex = s.CurrentIndex + e.PrevNode = n.Repr(false, false, s.clock) + + callback := func(path string) { // notify function + // notify the watchers with deleted set true + s.WatcherHub.notifyWatchers(e, path, true) + } + + err = n.Remove(false, false, callback) + if err != nil { + return nil, err + } + + s.WatcherHub.notify(e) + + return e, nil +} + +func (s *store) Watch(key string, recursive, stream bool, sinceIndex uint64) (Watcher, error) { + s.worldLock.RLock() + defer s.worldLock.RUnlock() + + key = path.Clean(path.Join("/", key)) + if sinceIndex == 0 { + sinceIndex = s.CurrentIndex + 1 + } + // WatcherHub does not know about the current index, so we need to pass it in + w, err := s.WatcherHub.watch(key, recursive, stream, sinceIndex, s.CurrentIndex) + if err != nil { + return nil, err + } + + return w, nil +} + +// walk walks all the nodePath and apply the walkFunc on each directory +func (s *store) walk(nodePath string, walkFunc func(prev *node, component string) (*node, *etcdErr.Error)) (*node, *etcdErr.Error) { + components := strings.Split(nodePath, "/") + + curr := s.Root + var err *etcdErr.Error + + for i := 1; i < len(components); i++ { + if len(components[i]) == 0 { // ignore empty string + return curr, nil + } + + curr, err = walkFunc(curr, components[i]) + if err != nil { + return nil, err + } + } + + return curr, nil +} + +// Update updates the value/ttl of the node. +// If the node is a file, the value and the ttl can be updated. +// If the node is a directory, only the ttl can be updated. +func (s *store) Update(nodePath string, newValue string, expireOpts TTLOptionSet) (*Event, error) { + var err *etcdErr.Error + + s.worldLock.Lock() + defer s.worldLock.Unlock() + + defer func() { + if err == nil { + s.Stats.Inc(UpdateSuccess) + reportWriteSuccess(Update) + return + } + + s.Stats.Inc(UpdateFail) + reportWriteFailure(Update) + }() + + nodePath = path.Clean(path.Join("/", nodePath)) + // we do not allow the user to change "/" + if s.readonlySet.Contains(nodePath) { + return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, "/", s.CurrentIndex) + } + + currIndex, nextIndex := s.CurrentIndex, s.CurrentIndex+1 + + n, err := s.internalGet(nodePath) + if err != nil { // if the node does not exist, return error + return nil, err + } + if n.IsDir() && len(newValue) != 0 { + // if the node is a directory, we cannot update value to non-empty + return nil, etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, currIndex) + } + + if expireOpts.Refresh { + newValue = n.Value + } + + e := newEvent(Update, nodePath, nextIndex, n.CreatedIndex) + e.EtcdIndex = nextIndex + e.PrevNode = n.Repr(false, false, s.clock) + eNode := e.Node + + n.Write(newValue, nextIndex) + + if n.IsDir() { + eNode.Dir = true + } else { + // copy the value for safety + newValueCopy := newValue + eNode.Value = &newValueCopy + } + + // update ttl + n.UpdateTTL(expireOpts.ExpireTime) + + eNode.Expiration, eNode.TTL = n.expirationAndTTL(s.clock) + + if !expireOpts.Refresh { + s.WatcherHub.notify(e) + } else { + e.SetRefresh() + s.WatcherHub.add(e) + } + + s.CurrentIndex = nextIndex + + return e, nil +} + +func (s *store) internalCreate(nodePath string, dir bool, value string, unique, replace bool, + expireTime time.Time, action string) (*Event, *etcdErr.Error) { + + currIndex, nextIndex := s.CurrentIndex, s.CurrentIndex+1 + + if unique { // append unique item under the node path + nodePath += "/" + fmt.Sprintf("%020s", strconv.FormatUint(nextIndex, 10)) + } + + nodePath = path.Clean(path.Join("/", nodePath)) + + // we do not allow the user to change "/" + if s.readonlySet.Contains(nodePath) { + return nil, etcdErr.NewError(etcdErr.EcodeRootROnly, "/", currIndex) + } + + // Assume expire times that are way in the past are + // This can occur when the time is serialized to JS + if expireTime.Before(minExpireTime) { + expireTime = Permanent + } + + dirName, nodeName := path.Split(nodePath) + + // walk through the nodePath, create dirs and get the last directory node + d, err := s.walk(dirName, s.checkDir) + + if err != nil { + s.Stats.Inc(SetFail) + reportWriteFailure(action) + err.Index = currIndex + return nil, err + } + + e := newEvent(action, nodePath, nextIndex, nextIndex) + eNode := e.Node + + n, _ := d.GetChild(nodeName) + + // force will try to replace an existing file + if n != nil { + if replace { + if n.IsDir() { + return nil, etcdErr.NewError(etcdErr.EcodeNotFile, nodePath, currIndex) + } + e.PrevNode = n.Repr(false, false, s.clock) + + n.Remove(false, false, nil) + } else { + return nil, etcdErr.NewError(etcdErr.EcodeNodeExist, nodePath, currIndex) + } + } + + if !dir { // create file + // copy the value for safety + valueCopy := value + eNode.Value = &valueCopy + + n = newKV(s, nodePath, value, nextIndex, d, expireTime) + + } else { // create directory + eNode.Dir = true + + n = newDir(s, nodePath, nextIndex, d, expireTime) + } + + // we are sure d is a directory and does not have the children with name n.Name + d.Add(n) + + // node with TTL + if !n.IsPermanent() { + s.ttlKeyHeap.push(n) + + eNode.Expiration, eNode.TTL = n.expirationAndTTL(s.clock) + } + + s.CurrentIndex = nextIndex + + return e, nil +} + +// InternalGet gets the node of the given nodePath. +func (s *store) internalGet(nodePath string) (*node, *etcdErr.Error) { + nodePath = path.Clean(path.Join("/", nodePath)) + + walkFunc := func(parent *node, name string) (*node, *etcdErr.Error) { + + if !parent.IsDir() { + err := etcdErr.NewError(etcdErr.EcodeNotDir, parent.Path, s.CurrentIndex) + return nil, err + } + + child, ok := parent.Children[name] + if ok { + return child, nil + } + + return nil, etcdErr.NewError(etcdErr.EcodeKeyNotFound, path.Join(parent.Path, name), s.CurrentIndex) + } + + f, err := s.walk(nodePath, walkFunc) + + if err != nil { + return nil, err + } + return f, nil +} + +// DeleteExpiredKeys will delete all expired keys +func (s *store) DeleteExpiredKeys(cutoff time.Time) { + s.worldLock.Lock() + defer s.worldLock.Unlock() + + for { + node := s.ttlKeyHeap.top() + if node == nil || node.ExpireTime.After(cutoff) { + break + } + + s.CurrentIndex++ + e := newEvent(Expire, node.Path, s.CurrentIndex, node.CreatedIndex) + e.EtcdIndex = s.CurrentIndex + e.PrevNode = node.Repr(false, false, s.clock) + if node.IsDir() { + e.Node.Dir = true + } + + callback := func(path string) { // notify function + // notify the watchers with deleted set true + s.WatcherHub.notifyWatchers(e, path, true) + } + + s.ttlKeyHeap.pop() + node.Remove(true, true, callback) + + reportExpiredKey() + s.Stats.Inc(ExpireCount) + + s.WatcherHub.notify(e) + } + +} + +// checkDir will check whether the component is a directory under parent node. +// If it is a directory, this function will return the pointer to that node. +// If it does not exist, this function will create a new directory and return the pointer to that node. +// If it is a file, this function will return error. +func (s *store) checkDir(parent *node, dirName string) (*node, *etcdErr.Error) { + node, ok := parent.Children[dirName] + + if ok { + if node.IsDir() { + return node, nil + } + + return nil, etcdErr.NewError(etcdErr.EcodeNotDir, node.Path, s.CurrentIndex) + } + + n := newDir(s, path.Join(parent.Path, dirName), s.CurrentIndex+1, parent, Permanent) + + parent.Children[dirName] = n + + return n, nil +} + +// Save saves the static state of the store system. +// It will not be able to save the state of watchers. +// It will not save the parent field of the node. Or there will +// be cyclic dependencies issue for the json package. +func (s *store) Save() ([]byte, error) { + b, err := json.Marshal(s.Clone()) + if err != nil { + return nil, err + } + + return b, nil +} + +func (s *store) SaveNoCopy() ([]byte, error) { + b, err := json.Marshal(s) + if err != nil { + return nil, err + } + + return b, nil +} + +func (s *store) Clone() Store { + s.worldLock.Lock() + + clonedStore := newStore() + clonedStore.CurrentIndex = s.CurrentIndex + clonedStore.Root = s.Root.Clone() + clonedStore.WatcherHub = s.WatcherHub.clone() + clonedStore.Stats = s.Stats.clone() + clonedStore.CurrentVersion = s.CurrentVersion + + s.worldLock.Unlock() + return clonedStore +} + +// Recovery recovers the store system from a static state +// It needs to recover the parent field of the nodes. +// It needs to delete the expired nodes since the saved time and also +// needs to create monitoring go routines. +func (s *store) Recovery(state []byte) error { + s.worldLock.Lock() + defer s.worldLock.Unlock() + err := json.Unmarshal(state, s) + + if err != nil { + return err + } + + s.ttlKeyHeap = newTtlKeyHeap() + + s.Root.recoverAndclean() + return nil +} + +func (s *store) JsonStats() []byte { + s.Stats.Watchers = uint64(s.WatcherHub.count) + return s.Stats.toJson() +} + +func (s *store) HasTTLKeys() bool { + s.worldLock.RLock() + defer s.worldLock.RUnlock() + return s.ttlKeyHeap.Len() != 0 +} diff --git a/deps/github.com/coreos/etcd/store/ttl_key_heap.go b/deps/github.com/coreos/etcd/store/ttl_key_heap.go new file mode 100644 index 000000000..21ae9b7c6 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/ttl_key_heap.go @@ -0,0 +1,99 @@ +// Copyright 2015 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. + +package store + +import ( + "container/heap" +) + +// An TTLKeyHeap is a min-heap of TTLKeys order by expiration time +type ttlKeyHeap struct { + array []*node + keyMap map[*node]int +} + +func newTtlKeyHeap() *ttlKeyHeap { + h := &ttlKeyHeap{keyMap: make(map[*node]int)} + heap.Init(h) + return h +} + +func (h ttlKeyHeap) Len() int { + return len(h.array) +} + +func (h ttlKeyHeap) Less(i, j int) bool { + return h.array[i].ExpireTime.Before(h.array[j].ExpireTime) +} + +func (h ttlKeyHeap) Swap(i, j int) { + // swap node + h.array[i], h.array[j] = h.array[j], h.array[i] + + // update map + h.keyMap[h.array[i]] = i + h.keyMap[h.array[j]] = j +} + +func (h *ttlKeyHeap) Push(x interface{}) { + n, _ := x.(*node) + h.keyMap[n] = len(h.array) + h.array = append(h.array, n) +} + +func (h *ttlKeyHeap) Pop() interface{} { + old := h.array + n := len(old) + x := old[n-1] + // Set slice element to nil, so GC can recycle the node. + // This is due to golang GC doesn't support partial recycling: + // https://github.com/golang/go/issues/9618 + old[n-1] = nil + h.array = old[0 : n-1] + delete(h.keyMap, x) + return x +} + +func (h *ttlKeyHeap) top() *node { + if h.Len() != 0 { + return h.array[0] + } + return nil +} + +func (h *ttlKeyHeap) pop() *node { + x := heap.Pop(h) + n, _ := x.(*node) + return n +} + +func (h *ttlKeyHeap) push(x interface{}) { + heap.Push(h, x) +} + +func (h *ttlKeyHeap) update(n *node) { + index, ok := h.keyMap[n] + if ok { + heap.Remove(h, index) + heap.Push(h, n) + } +} + +func (h *ttlKeyHeap) remove(n *node) { + index, ok := h.keyMap[n] + if ok { + heap.Remove(h, index) + } +} diff --git a/deps/github.com/coreos/etcd/store/watcher.go b/deps/github.com/coreos/etcd/store/watcher.go new file mode 100644 index 000000000..a236ec777 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/watcher.go @@ -0,0 +1,95 @@ +// Copyright 2015 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. + +package store + +type Watcher interface { + EventChan() chan *Event + StartIndex() uint64 // The EtcdIndex at which the Watcher was created + Remove() +} + +type watcher struct { + eventChan chan *Event + stream bool + recursive bool + sinceIndex uint64 + startIndex uint64 + hub *watcherHub + removed bool + remove func() +} + +func (w *watcher) EventChan() chan *Event { + return w.eventChan +} + +func (w *watcher) StartIndex() uint64 { + return w.startIndex +} + +// notify function notifies the watcher. If the watcher interests in the given path, +// the function will return true. +func (w *watcher) notify(e *Event, originalPath bool, deleted bool) bool { + // watcher is interested the path in three cases and under one condition + // the condition is that the event happens after the watcher's sinceIndex + + // 1. the path at which the event happens is the path the watcher is watching at. + // For example if the watcher is watching at "/foo" and the event happens at "/foo", + // the watcher must be interested in that event. + + // 2. the watcher is a recursive watcher, it interests in the event happens after + // its watching path. For example if watcher A watches at "/foo" and it is a recursive + // one, it will interest in the event happens at "/foo/bar". + + // 3. when we delete a directory, we need to force notify all the watchers who watches + // at the file we need to delete. + // For example a watcher is watching at "/foo/bar". And we deletes "/foo". The watcher + // should get notified even if "/foo" is not the path it is watching. + if (w.recursive || originalPath || deleted) && e.Index() >= w.sinceIndex { + // We cannot block here if the eventChan capacity is full, otherwise + // etcd will hang. eventChan capacity is full when the rate of + // notifications are higher than our send rate. + // If this happens, we close the channel. + select { + case w.eventChan <- e: + default: + // We have missed a notification. Remove the watcher. + // Removing the watcher also closes the eventChan. + w.remove() + } + return true + } + return false +} + +// Remove removes the watcher from watcherHub +// The actual remove function is guaranteed to only be executed once +func (w *watcher) Remove() { + w.hub.mutex.Lock() + defer w.hub.mutex.Unlock() + + close(w.eventChan) + if w.remove != nil { + w.remove() + } +} + +// nopWatcher is a watcher that receives nothing, always blocking. +type nopWatcher struct{} + +func NewNopWatcher() Watcher { return &nopWatcher{} } +func (w *nopWatcher) EventChan() chan *Event { return nil } +func (w *nopWatcher) StartIndex() uint64 { return 0 } +func (w *nopWatcher) Remove() {} diff --git a/deps/github.com/coreos/etcd/store/watcher_hub.go b/deps/github.com/coreos/etcd/store/watcher_hub.go new file mode 100644 index 000000000..13c23e391 --- /dev/null +++ b/deps/github.com/coreos/etcd/store/watcher_hub.go @@ -0,0 +1,200 @@ +// Copyright 2015 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. + +package store + +import ( + "container/list" + "path" + "strings" + "sync" + "sync/atomic" + + etcdErr "github.com/coreos/etcd/error" +) + +// A watcherHub contains all subscribed watchers +// watchers is a map with watched path as key and watcher as value +// EventHistory keeps the old events for watcherHub. It is used to help +// watcher to get a continuous event history. Or a watcher might miss the +// event happens between the end of the first watch command and the start +// of the second command. +type watcherHub struct { + // count must be the first element to keep 64-bit alignment for atomic + // access + + count int64 // current number of watchers. + + mutex sync.Mutex + watchers map[string]*list.List + EventHistory *EventHistory +} + +// newWatchHub creates a watcherHub. The capacity determines how many events we will +// keep in the eventHistory. +// Typically, we only need to keep a small size of history[smaller than 20K]. +// Ideally, it should smaller than 20K/s[max throughput] * 2 * 50ms[RTT] = 2000 +func newWatchHub(capacity int) *watcherHub { + return &watcherHub{ + watchers: make(map[string]*list.List), + EventHistory: newEventHistory(capacity), + } +} + +// Watch function returns a Watcher. +// If recursive is true, the first change after index under key will be sent to the event channel of the watcher. +// If recursive is false, the first change after index at key will be sent to the event channel of the watcher. +// If index is zero, watch will start from the current index + 1. +func (wh *watcherHub) watch(key string, recursive, stream bool, index, storeIndex uint64) (Watcher, *etcdErr.Error) { + reportWatchRequest() + event, err := wh.EventHistory.scan(key, recursive, index) + + if err != nil { + err.Index = storeIndex + return nil, err + } + + w := &watcher{ + eventChan: make(chan *Event, 100), // use a buffered channel + recursive: recursive, + stream: stream, + sinceIndex: index, + startIndex: storeIndex, + hub: wh, + } + + wh.mutex.Lock() + defer wh.mutex.Unlock() + // If the event exists in the known history, append the EtcdIndex and return immediately + if event != nil { + ne := event.Clone() + ne.EtcdIndex = storeIndex + w.eventChan <- ne + return w, nil + } + + l, ok := wh.watchers[key] + + var elem *list.Element + + if ok { // add the new watcher to the back of the list + elem = l.PushBack(w) + } else { // create a new list and add the new watcher + l = list.New() + elem = l.PushBack(w) + wh.watchers[key] = l + } + + w.remove = func() { + if w.removed { // avoid removing it twice + return + } + w.removed = true + l.Remove(elem) + atomic.AddInt64(&wh.count, -1) + reportWatcherRemoved() + if l.Len() == 0 { + delete(wh.watchers, key) + } + } + + atomic.AddInt64(&wh.count, 1) + reportWatcherAdded() + + return w, nil +} + +func (wh *watcherHub) add(e *Event) { + wh.EventHistory.addEvent(e) +} + +// notify function accepts an event and notify to the watchers. +func (wh *watcherHub) notify(e *Event) { + e = wh.EventHistory.addEvent(e) // add event into the eventHistory + + segments := strings.Split(e.Node.Key, "/") + + currPath := "/" + + // walk through all the segments of the path and notify the watchers + // if the path is "/foo/bar", it will notify watchers with path "/", + // "/foo" and "/foo/bar" + + for _, segment := range segments { + currPath = path.Join(currPath, segment) + // notify the watchers who interests in the changes of current path + wh.notifyWatchers(e, currPath, false) + } +} + +func (wh *watcherHub) notifyWatchers(e *Event, nodePath string, deleted bool) { + wh.mutex.Lock() + defer wh.mutex.Unlock() + + l, ok := wh.watchers[nodePath] + if ok { + curr := l.Front() + + for curr != nil { + next := curr.Next() // save reference to the next one in the list + + w, _ := curr.Value.(*watcher) + + originalPath := (e.Node.Key == nodePath) + if (originalPath || !isHidden(nodePath, e.Node.Key)) && w.notify(e, originalPath, deleted) { + if !w.stream { // do not remove the stream watcher + // if we successfully notify a watcher + // we need to remove the watcher from the list + // and decrease the counter + w.removed = true + l.Remove(curr) + atomic.AddInt64(&wh.count, -1) + reportWatcherRemoved() + } + } + + curr = next // update current to the next element in the list + } + + if l.Len() == 0 { + // if we have notified all watcher in the list + // we can delete the list + delete(wh.watchers, nodePath) + } + } +} + +// clone function clones the watcherHub and return the cloned one. +// only clone the static content. do not clone the current watchers. +func (wh *watcherHub) clone() *watcherHub { + clonedHistory := wh.EventHistory.clone() + + return &watcherHub{ + EventHistory: clonedHistory, + } +} + +// isHidden checks to see if key path is considered hidden to watch path i.e. the +// last element is hidden or it's within a hidden directory +func isHidden(watchPath, keyPath string) bool { + // When deleting a directory, watchPath might be deeper than the actual keyPath + // For example, when deleting /foo we also need to notify watchers on /foo/bar. + if len(watchPath) > len(keyPath) { + return false + } + // if watch path is just a "/", after path will start without "/" + // add a "/" to deal with the special case when watchPath is "/" + afterPath := path.Clean("/" + keyPath[len(watchPath):]) + return strings.Contains(afterPath, "/_") +} diff --git a/deps/github.com/coreos/etcd/wal/decoder.go b/deps/github.com/coreos/etcd/wal/decoder.go new file mode 100644 index 000000000..0d9b4428c --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/decoder.go @@ -0,0 +1,185 @@ +// Copyright 2015 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. + +package wal + +import ( + "bufio" + "encoding/binary" + "hash" + "io" + "sync" + + "github.com/coreos/etcd/pkg/crc" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/wal/walpb" +) + +const minSectorSize = 512 + +type decoder struct { + mu sync.Mutex + brs []*bufio.Reader + + // lastValidOff file offset following the last valid decoded record + lastValidOff int64 + crc hash.Hash32 +} + +func newDecoder(r ...io.Reader) *decoder { + readers := make([]*bufio.Reader, len(r)) + for i := range r { + readers[i] = bufio.NewReader(r[i]) + } + return &decoder{ + brs: readers, + crc: crc.New(0, crcTable), + } +} + +func (d *decoder) decode(rec *walpb.Record) error { + rec.Reset() + d.mu.Lock() + defer d.mu.Unlock() + return d.decodeRecord(rec) +} + +func (d *decoder) decodeRecord(rec *walpb.Record) error { + if len(d.brs) == 0 { + return io.EOF + } + + l, err := readInt64(d.brs[0]) + if err == io.EOF || (err == nil && l == 0) { + // hit end of file or preallocated space + d.brs = d.brs[1:] + if len(d.brs) == 0 { + return io.EOF + } + d.lastValidOff = 0 + return d.decodeRecord(rec) + } + if err != nil { + return err + } + + recBytes, padBytes := decodeFrameSize(l) + + data := make([]byte, recBytes+padBytes) + if _, err = io.ReadFull(d.brs[0], data); err != nil { + // ReadFull returns io.EOF only if no bytes were read + // the decoder should treat this as an ErrUnexpectedEOF instead. + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + return err + } + if err := rec.Unmarshal(data[:recBytes]); err != nil { + if d.isTornEntry(data) { + return io.ErrUnexpectedEOF + } + return err + } + + // skip crc checking if the record type is crcType + if rec.Type != crcType { + d.crc.Write(rec.Data) + if err := rec.Validate(d.crc.Sum32()); err != nil { + if d.isTornEntry(data) { + return io.ErrUnexpectedEOF + } + return err + } + } + // record decoded as valid; point last valid offset to end of record + d.lastValidOff += recBytes + padBytes + 8 + return nil +} + +func decodeFrameSize(lenField int64) (recBytes int64, padBytes int64) { + // the record size is stored in the lower 56 bits of the 64-bit length + recBytes = int64(uint64(lenField) & ^(uint64(0xff) << 56)) + // non-zero padding is indicated by set MSb / a negative length + if lenField < 0 { + // padding is stored in lower 3 bits of length MSB + padBytes = int64((uint64(lenField) >> 56) & 0x7) + } + return +} + +// isTornEntry determines whether the last entry of the WAL was partially written +// and corrupted because of a torn write. +func (d *decoder) isTornEntry(data []byte) bool { + if len(d.brs) != 1 { + return false + } + + fileOff := d.lastValidOff + 8 + curOff := 0 + chunks := [][]byte{} + // split data on sector boundaries + for curOff < len(data) { + chunkLen := int(minSectorSize - (fileOff % minSectorSize)) + if chunkLen > len(data)-curOff { + chunkLen = len(data) - curOff + } + chunks = append(chunks, data[curOff:curOff+chunkLen]) + fileOff += int64(chunkLen) + curOff += chunkLen + } + + // if any data for a sector chunk is all 0, it's a torn write + for _, sect := range chunks { + isZero := true + for _, v := range sect { + if v != 0 { + isZero = false + break + } + } + if isZero { + return true + } + } + return false +} + +func (d *decoder) updateCRC(prevCrc uint32) { + d.crc = crc.New(prevCrc, crcTable) +} + +func (d *decoder) lastCRC() uint32 { + return d.crc.Sum32() +} + +func (d *decoder) lastOffset() int64 { return d.lastValidOff } + +func mustUnmarshalEntry(d []byte) raftpb.Entry { + var e raftpb.Entry + pbutil.MustUnmarshal(&e, d) + return e +} + +func mustUnmarshalState(d []byte) raftpb.HardState { + var s raftpb.HardState + pbutil.MustUnmarshal(&s, d) + return s +} + +func readInt64(r io.Reader) (int64, error) { + var n int64 + err := binary.Read(r, binary.LittleEndian, &n) + return n, err +} diff --git a/deps/github.com/coreos/etcd/wal/doc.go b/deps/github.com/coreos/etcd/wal/doc.go new file mode 100644 index 000000000..a3abd6961 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/doc.go @@ -0,0 +1,75 @@ +// Copyright 2015 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. + +/* +Package wal provides an implementation of a write ahead log that is used by +etcd. + +A WAL is created at a particular directory and is made up of a number of +segmented WAL files. Inside of each file the raft state and entries are appended +to it with the Save method: + + metadata := []byte{} + w, err := wal.Create("/var/lib/etcd", metadata) + ... + err := w.Save(s, ents) + +After saving a raft snapshot to disk, SaveSnapshot method should be called to +record it. So WAL can match with the saved snapshot when restarting. + + err := w.SaveSnapshot(walpb.Snapshot{Index: 10, Term: 2}) + +When a user has finished using a WAL it must be closed: + + w.Close() + +Each WAL file is a stream of WAL records. A WAL record is a length field and a wal record +protobuf. The record protobuf contains a CRC, a type, and a data payload. The length field is a +64-bit packed structure holding the length of the remaining logical record data in its lower +56 bits and its physical padding in the first three bits of the most significant byte. Each +record is 8-byte aligned so that the length field is never torn. The CRC contains the CRC32 +value of all record protobufs preceding the current record. + +WAL files are placed inside of the directory in the following format: +$seq-$index.wal + +The first WAL file to be created will be 0000000000000000-0000000000000000.wal +indicating an initial sequence of 0 and an initial raft index of 0. The first +entry written to WAL MUST have raft index 0. + +WAL will cut its current tail wal file if its size exceeds 64MB. This will increment an internal +sequence number and cause a new file to be created. If the last raft index saved +was 0x20 and this is the first time cut has been called on this WAL then the sequence will +increment from 0x0 to 0x1. The new file will be: 0000000000000001-0000000000000021.wal. +If a second cut issues 0x10 entries with incremental index later then the file will be called: +0000000000000002-0000000000000031.wal. + +At a later time a WAL can be opened at a particular snapshot. If there is no +snapshot, an empty snapshot should be passed in. + + w, err := wal.Open("/var/lib/etcd", walpb.Snapshot{Index: 10, Term: 2}) + ... + +The snapshot must have been written to the WAL. + +Additional items cannot be Saved to this WAL until all of the items from the given +snapshot to the end of the WAL are read first: + + metadata, state, ents, err := w.ReadAll() + +This will give you the metadata, the last raft.State and the slice of +raft.Entry items in the log. + +*/ +package wal diff --git a/deps/github.com/coreos/etcd/wal/encoder.go b/deps/github.com/coreos/etcd/wal/encoder.go new file mode 100644 index 000000000..aac1e197e --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/encoder.go @@ -0,0 +1,120 @@ +// Copyright 2015 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. + +package wal + +import ( + "encoding/binary" + "hash" + "io" + "os" + "sync" + + "github.com/coreos/etcd/pkg/crc" + "github.com/coreos/etcd/pkg/ioutil" + "github.com/coreos/etcd/wal/walpb" +) + +// walPageBytes is the alignment for flushing records to the backing Writer. +// It should be a multiple of the minimum sector size so that WAL can safely +// distinguish between torn writes and ordinary data corruption. +const walPageBytes = 8 * minSectorSize + +type encoder struct { + mu sync.Mutex + bw *ioutil.PageWriter + + crc hash.Hash32 + buf []byte + uint64buf []byte +} + +func newEncoder(w io.Writer, prevCrc uint32, pageOffset int) *encoder { + return &encoder{ + bw: ioutil.NewPageWriter(w, walPageBytes, pageOffset), + crc: crc.New(prevCrc, crcTable), + // 1MB buffer + buf: make([]byte, 1024*1024), + uint64buf: make([]byte, 8), + } +} + +// newFileEncoder creates a new encoder with current file offset for the page writer. +func newFileEncoder(f *os.File, prevCrc uint32) (*encoder, error) { + offset, err := f.Seek(0, io.SeekCurrent) + if err != nil { + return nil, err + } + return newEncoder(f, prevCrc, int(offset)), nil +} + +func (e *encoder) encode(rec *walpb.Record) error { + e.mu.Lock() + defer e.mu.Unlock() + + e.crc.Write(rec.Data) + rec.Crc = e.crc.Sum32() + var ( + data []byte + err error + n int + ) + + if rec.Size() > len(e.buf) { + data, err = rec.Marshal() + if err != nil { + return err + } + } else { + n, err = rec.MarshalTo(e.buf) + if err != nil { + return err + } + data = e.buf[:n] + } + + lenField, padBytes := encodeFrameSize(len(data)) + if err = writeUint64(e.bw, lenField, e.uint64buf); err != nil { + return err + } + + if padBytes != 0 { + data = append(data, make([]byte, padBytes)...) + } + _, err = e.bw.Write(data) + return err +} + +func encodeFrameSize(dataBytes int) (lenField uint64, padBytes int) { + lenField = uint64(dataBytes) + // force 8 byte alignment so length never gets a torn write + padBytes = (8 - (dataBytes % 8)) % 8 + if padBytes != 0 { + lenField |= uint64(0x80|padBytes) << 56 + } + return +} + +func (e *encoder) flush() error { + e.mu.Lock() + defer e.mu.Unlock() + return e.bw.Flush() +} + +func writeUint64(w io.Writer, n uint64, buf []byte) error { + // http://golang.org/src/encoding/binary/binary.go + binary.LittleEndian.PutUint64(buf, n) + _, err := w.Write(buf) + return err +} diff --git a/deps/github.com/coreos/etcd/wal/file_pipeline.go b/deps/github.com/coreos/etcd/wal/file_pipeline.go new file mode 100644 index 000000000..5e32a0693 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/file_pipeline.go @@ -0,0 +1,97 @@ +// 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. + +package wal + +import ( + "fmt" + "os" + "path/filepath" + + "github.com/coreos/etcd/pkg/fileutil" +) + +// filePipeline pipelines allocating disk space +type filePipeline struct { + // dir to put files + dir string + // size of files to make, in bytes + size int64 + // count number of files generated + count int + + filec chan *fileutil.LockedFile + errc chan error + donec chan struct{} +} + +func newFilePipeline(dir string, fileSize int64) *filePipeline { + fp := &filePipeline{ + dir: dir, + size: fileSize, + filec: make(chan *fileutil.LockedFile), + errc: make(chan error, 1), + donec: make(chan struct{}), + } + go fp.run() + return fp +} + +// Open returns a fresh file for writing. Rename the file before calling +// Open again or there will be file collisions. +func (fp *filePipeline) Open() (f *fileutil.LockedFile, err error) { + select { + case f = <-fp.filec: + case err = <-fp.errc: + } + return +} + +func (fp *filePipeline) Close() error { + close(fp.donec) + return <-fp.errc +} + +func (fp *filePipeline) alloc() (f *fileutil.LockedFile, err error) { + // count % 2 so this file isn't the same as the one last published + fpath := filepath.Join(fp.dir, fmt.Sprintf("%d.tmp", fp.count%2)) + if f, err = fileutil.LockFile(fpath, os.O_CREATE|os.O_WRONLY, fileutil.PrivateFileMode); err != nil { + return nil, err + } + if err = fileutil.Preallocate(f.File, fp.size, true); err != nil { + plog.Errorf("failed to allocate space when creating new wal file (%v)", err) + f.Close() + return nil, err + } + fp.count++ + return f, nil +} + +func (fp *filePipeline) run() { + defer close(fp.errc) + for { + f, err := fp.alloc() + if err != nil { + fp.errc <- err + return + } + select { + case fp.filec <- f: + case <-fp.donec: + os.Remove(f.Name()) + f.Close() + return + } + } +} diff --git a/deps/github.com/coreos/etcd/wal/metrics.go b/deps/github.com/coreos/etcd/wal/metrics.go new file mode 100644 index 000000000..9e089d380 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/metrics.go @@ -0,0 +1,31 @@ +// Copyright 2015 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. + +package wal + +import "github.com/prometheus/client_golang/prometheus" + +var ( + syncDurations = prometheus.NewHistogram(prometheus.HistogramOpts{ + Namespace: "etcd", + Subsystem: "disk", + Name: "wal_fsync_duration_seconds", + Help: "The latency distributions of fsync called by wal.", + Buckets: prometheus.ExponentialBuckets(0.001, 2, 14), + }) +) + +func init() { + prometheus.MustRegister(syncDurations) +} diff --git a/deps/github.com/coreos/etcd/wal/repair.go b/deps/github.com/coreos/etcd/wal/repair.go new file mode 100644 index 000000000..091036b57 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/repair.go @@ -0,0 +1,99 @@ +// Copyright 2015 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. + +package wal + +import ( + "io" + "os" + "path/filepath" + + "github.com/coreos/etcd/pkg/fileutil" + "github.com/coreos/etcd/wal/walpb" +) + +// Repair tries to repair ErrUnexpectedEOF in the +// last wal file by truncating. +func Repair(dirpath string) bool { + f, err := openLast(dirpath) + if err != nil { + return false + } + defer f.Close() + + rec := &walpb.Record{} + decoder := newDecoder(f) + for { + lastOffset := decoder.lastOffset() + err := decoder.decode(rec) + switch err { + case nil: + // update crc of the decoder when necessary + switch rec.Type { + case crcType: + crc := decoder.crc.Sum32() + // current crc of decoder must match the crc of the record. + // do no need to match 0 crc, since the decoder is a new one at this case. + if crc != 0 && rec.Validate(crc) != nil { + return false + } + decoder.updateCRC(rec.Crc) + } + continue + case io.EOF: + return true + case io.ErrUnexpectedEOF: + plog.Noticef("repairing %v", f.Name()) + bf, bferr := os.Create(f.Name() + ".broken") + if bferr != nil { + plog.Errorf("could not repair %v, failed to create backup file", f.Name()) + return false + } + defer bf.Close() + + if _, err = f.Seek(0, io.SeekStart); err != nil { + plog.Errorf("could not repair %v, failed to read file", f.Name()) + return false + } + + if _, err = io.Copy(bf, f); err != nil { + plog.Errorf("could not repair %v, failed to copy file", f.Name()) + return false + } + + if err = f.Truncate(int64(lastOffset)); err != nil { + plog.Errorf("could not repair %v, failed to truncate file", f.Name()) + return false + } + if err = fileutil.Fsync(f.File); err != nil { + plog.Errorf("could not repair %v, failed to sync file", f.Name()) + return false + } + return true + default: + plog.Errorf("could not repair error (%v)", err) + return false + } + } +} + +// openLast opens the last wal file for read and write. +func openLast(dirpath string) (*fileutil.LockedFile, error) { + names, err := readWalNames(dirpath) + if err != nil { + return nil, err + } + last := filepath.Join(dirpath, names[len(names)-1]) + return fileutil.LockFile(last, os.O_RDWR, fileutil.PrivateFileMode) +} diff --git a/deps/github.com/coreos/etcd/wal/util.go b/deps/github.com/coreos/etcd/wal/util.go new file mode 100644 index 000000000..5c56e2288 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/util.go @@ -0,0 +1,107 @@ +// Copyright 2015 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. + +package wal + +import ( + "errors" + "fmt" + "strings" + + "github.com/coreos/etcd/pkg/fileutil" +) + +var ( + badWalName = errors.New("bad wal name") +) + +func Exist(dirpath string) bool { + names, err := fileutil.ReadDir(dirpath) + if err != nil { + return false + } + return len(names) != 0 +} + +// searchIndex returns the last array index of names whose raft index section is +// equal to or smaller than the given index. +// The given names MUST be sorted. +func searchIndex(names []string, index uint64) (int, bool) { + for i := len(names) - 1; i >= 0; i-- { + name := names[i] + _, curIndex, err := parseWalName(name) + if err != nil { + plog.Panicf("parse correct name should never fail: %v", err) + } + if index >= curIndex { + return i, true + } + } + return -1, false +} + +// names should have been sorted based on sequence number. +// isValidSeq checks whether seq increases continuously. +func isValidSeq(names []string) bool { + var lastSeq uint64 + for _, name := range names { + curSeq, _, err := parseWalName(name) + if err != nil { + plog.Panicf("parse correct name should never fail: %v", err) + } + if lastSeq != 0 && lastSeq != curSeq-1 { + return false + } + lastSeq = curSeq + } + return true +} +func readWalNames(dirpath string) ([]string, error) { + names, err := fileutil.ReadDir(dirpath) + if err != nil { + return nil, err + } + wnames := checkWalNames(names) + if len(wnames) == 0 { + return nil, ErrFileNotFound + } + return wnames, nil +} + +func checkWalNames(names []string) []string { + wnames := make([]string, 0) + for _, name := range names { + if _, _, err := parseWalName(name); err != nil { + // don't complain about left over tmp files + if !strings.HasSuffix(name, ".tmp") { + plog.Warningf("ignored file %v in wal", name) + } + continue + } + wnames = append(wnames, name) + } + return wnames +} + +func parseWalName(str string) (seq, index uint64, err error) { + if !strings.HasSuffix(str, ".wal") { + return 0, 0, badWalName + } + _, err = fmt.Sscanf(str, "%016x-%016x.wal", &seq, &index) + return seq, index, err +} + +func walName(seq, index uint64) string { + return fmt.Sprintf("%016x-%016x.wal", seq, index) +} diff --git a/deps/github.com/coreos/etcd/wal/wal.go b/deps/github.com/coreos/etcd/wal/wal.go new file mode 100644 index 000000000..2cac25c1c --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/wal.go @@ -0,0 +1,628 @@ +// Copyright 2015 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. + +package wal + +import ( + "bytes" + "errors" + "fmt" + "hash/crc32" + "io" + "os" + "path/filepath" + "sync" + "time" + + "github.com/coreos/etcd/pkg/fileutil" + "github.com/coreos/etcd/pkg/pbutil" + "github.com/coreos/etcd/raft" + "github.com/coreos/etcd/raft/raftpb" + "github.com/coreos/etcd/wal/walpb" + + "github.com/coreos/pkg/capnslog" +) + +const ( + metadataType int64 = iota + 1 + entryType + stateType + crcType + snapshotType + + // warnSyncDuration is the amount of time allotted to an fsync before + // logging a warning + warnSyncDuration = time.Second +) + +var ( + // SegmentSizeBytes is the preallocated size of each wal segment file. + // The actual size might be larger than this. In general, the default + // value should be used, but this is defined as an exported variable + // so that tests can set a different segment size. + SegmentSizeBytes int64 = 64 * 1000 * 1000 // 64MB + + plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "wal") + + ErrMetadataConflict = errors.New("wal: conflicting metadata found") + ErrFileNotFound = errors.New("wal: file not found") + ErrCRCMismatch = errors.New("wal: crc mismatch") + ErrSnapshotMismatch = errors.New("wal: snapshot mismatch") + ErrSnapshotNotFound = errors.New("wal: snapshot not found") + crcTable = crc32.MakeTable(crc32.Castagnoli) +) + +// WAL is a logical representation of the stable storage. +// WAL is either in read mode or append mode but not both. +// A newly created WAL is in append mode, and ready for appending records. +// A just opened WAL is in read mode, and ready for reading records. +// The WAL will be ready for appending after reading out all the previous records. +type WAL struct { + dir string // the living directory of the underlay files + + // dirFile is a fd for the wal directory for syncing on Rename + dirFile *os.File + + metadata []byte // metadata recorded at the head of each WAL + state raftpb.HardState // hardstate recorded at the head of WAL + + start walpb.Snapshot // snapshot to start reading + decoder *decoder // decoder to decode records + readClose func() error // closer for decode reader + + mu sync.Mutex + enti uint64 // index of the last entry saved to the wal + encoder *encoder // encoder to encode records + + locks []*fileutil.LockedFile // the locked files the WAL holds (the name is increasing) + fp *filePipeline +} + +// Create creates a WAL ready for appending records. The given metadata is +// recorded at the head of each WAL file, and can be retrieved with ReadAll. +func Create(dirpath string, metadata []byte) (*WAL, error) { + if Exist(dirpath) { + return nil, os.ErrExist + } + + // keep temporary wal directory so WAL initialization appears atomic + tmpdirpath := filepath.Clean(dirpath) + ".tmp" + if fileutil.Exist(tmpdirpath) { + if err := os.RemoveAll(tmpdirpath); err != nil { + return nil, err + } + } + if err := fileutil.CreateDirAll(tmpdirpath); err != nil { + return nil, err + } + + p := filepath.Join(tmpdirpath, walName(0, 0)) + f, err := fileutil.LockFile(p, os.O_WRONLY|os.O_CREATE, fileutil.PrivateFileMode) + if err != nil { + return nil, err + } + if _, err = f.Seek(0, io.SeekEnd); err != nil { + return nil, err + } + if err = fileutil.Preallocate(f.File, SegmentSizeBytes, true); err != nil { + return nil, err + } + + w := &WAL{ + dir: dirpath, + metadata: metadata, + } + w.encoder, err = newFileEncoder(f.File, 0) + if err != nil { + return nil, err + } + w.locks = append(w.locks, f) + if err = w.saveCrc(0); err != nil { + return nil, err + } + if err = w.encoder.encode(&walpb.Record{Type: metadataType, Data: metadata}); err != nil { + return nil, err + } + if err = w.SaveSnapshot(walpb.Snapshot{}); err != nil { + return nil, err + } + + if w, err = w.renameWal(tmpdirpath); err != nil { + return nil, err + } + + // directory was renamed; sync parent dir to persist rename + pdir, perr := fileutil.OpenDir(filepath.Dir(w.dir)) + if perr != nil { + return nil, perr + } + if perr = fileutil.Fsync(pdir); perr != nil { + return nil, perr + } + if perr = pdir.Close(); err != nil { + return nil, perr + } + + return w, nil +} + +// Open opens the WAL at the given snap. +// The snap SHOULD have been previously saved to the WAL, or the following +// ReadAll will fail. +// The returned WAL is ready to read and the first record will be the one after +// the given snap. The WAL cannot be appended to before reading out all of its +// previous records. +func Open(dirpath string, snap walpb.Snapshot) (*WAL, error) { + w, err := openAtIndex(dirpath, snap, true) + if err != nil { + return nil, err + } + if w.dirFile, err = fileutil.OpenDir(w.dir); err != nil { + return nil, err + } + return w, nil +} + +// OpenForRead only opens the wal files for read. +// Write on a read only wal panics. +func OpenForRead(dirpath string, snap walpb.Snapshot) (*WAL, error) { + return openAtIndex(dirpath, snap, false) +} + +func openAtIndex(dirpath string, snap walpb.Snapshot, write bool) (*WAL, error) { + names, err := readWalNames(dirpath) + if err != nil { + return nil, err + } + + nameIndex, ok := searchIndex(names, snap.Index) + if !ok || !isValidSeq(names[nameIndex:]) { + return nil, ErrFileNotFound + } + + // open the wal files + rcs := make([]io.ReadCloser, 0) + rs := make([]io.Reader, 0) + ls := make([]*fileutil.LockedFile, 0) + for _, name := range names[nameIndex:] { + p := filepath.Join(dirpath, name) + if write { + l, err := fileutil.TryLockFile(p, os.O_RDWR, fileutil.PrivateFileMode) + if err != nil { + closeAll(rcs...) + return nil, err + } + ls = append(ls, l) + rcs = append(rcs, l) + } else { + rf, err := os.OpenFile(p, os.O_RDONLY, fileutil.PrivateFileMode) + if err != nil { + closeAll(rcs...) + return nil, err + } + ls = append(ls, nil) + rcs = append(rcs, rf) + } + rs = append(rs, rcs[len(rcs)-1]) + } + + closer := func() error { return closeAll(rcs...) } + + // create a WAL ready for reading + w := &WAL{ + dir: dirpath, + start: snap, + decoder: newDecoder(rs...), + readClose: closer, + locks: ls, + } + + if write { + // write reuses the file descriptors from read; don't close so + // WAL can append without dropping the file lock + w.readClose = nil + if _, _, err := parseWalName(filepath.Base(w.tail().Name())); err != nil { + closer() + return nil, err + } + w.fp = newFilePipeline(w.dir, SegmentSizeBytes) + } + + return w, nil +} + +// ReadAll reads out records of the current WAL. +// If opened in write mode, it must read out all records until EOF. Or an error +// will be returned. +// If opened in read mode, it will try to read all records if possible. +// If it cannot read out the expected snap, it will return ErrSnapshotNotFound. +// If loaded snap doesn't match with the expected one, it will return +// all the records and error ErrSnapshotMismatch. +// TODO: detect not-last-snap error. +// TODO: maybe loose the checking of match. +// After ReadAll, the WAL will be ready for appending new records. +func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb.Entry, err error) { + w.mu.Lock() + defer w.mu.Unlock() + + rec := &walpb.Record{} + decoder := w.decoder + + var match bool + for err = decoder.decode(rec); err == nil; err = decoder.decode(rec) { + switch rec.Type { + case entryType: + e := mustUnmarshalEntry(rec.Data) + if e.Index > w.start.Index { + ents = append(ents[:e.Index-w.start.Index-1], e) + } + w.enti = e.Index + case stateType: + state = mustUnmarshalState(rec.Data) + case metadataType: + if metadata != nil && !bytes.Equal(metadata, rec.Data) { + state.Reset() + return nil, state, nil, ErrMetadataConflict + } + metadata = rec.Data + case crcType: + crc := decoder.crc.Sum32() + // current crc of decoder must match the crc of the record. + // do no need to match 0 crc, since the decoder is a new one at this case. + if crc != 0 && rec.Validate(crc) != nil { + state.Reset() + return nil, state, nil, ErrCRCMismatch + } + decoder.updateCRC(rec.Crc) + case snapshotType: + var snap walpb.Snapshot + pbutil.MustUnmarshal(&snap, rec.Data) + if snap.Index == w.start.Index { + if snap.Term != w.start.Term { + state.Reset() + return nil, state, nil, ErrSnapshotMismatch + } + match = true + } + default: + state.Reset() + return nil, state, nil, fmt.Errorf("unexpected block type %d", rec.Type) + } + } + + switch w.tail() { + case nil: + // We do not have to read out all entries in read mode. + // The last record maybe a partial written one, so + // ErrunexpectedEOF might be returned. + if err != io.EOF && err != io.ErrUnexpectedEOF { + state.Reset() + return nil, state, nil, err + } + default: + // We must read all of the entries if WAL is opened in write mode. + if err != io.EOF { + state.Reset() + return nil, state, nil, err + } + // decodeRecord() will return io.EOF if it detects a zero record, + // but this zero record may be followed by non-zero records from + // a torn write. Overwriting some of these non-zero records, but + // not all, will cause CRC errors on WAL open. Since the records + // were never fully synced to disk in the first place, it's safe + // to zero them out to avoid any CRC errors from new writes. + if _, err = w.tail().Seek(w.decoder.lastOffset(), io.SeekStart); err != nil { + return nil, state, nil, err + } + if err = fileutil.ZeroToEnd(w.tail().File); err != nil { + return nil, state, nil, err + } + } + + err = nil + if !match { + err = ErrSnapshotNotFound + } + + // close decoder, disable reading + if w.readClose != nil { + w.readClose() + w.readClose = nil + } + w.start = walpb.Snapshot{} + + w.metadata = metadata + + if w.tail() != nil { + // create encoder (chain crc with the decoder), enable appending + w.encoder, err = newFileEncoder(w.tail().File, w.decoder.lastCRC()) + if err != nil { + return + } + } + w.decoder = nil + + return metadata, state, ents, err +} + +// cut closes current file written and creates a new one ready to append. +// cut first creates a temp wal file and writes necessary headers into it. +// Then cut atomically rename temp wal file to a wal file. +func (w *WAL) cut() error { + // close old wal file; truncate to avoid wasting space if an early cut + off, serr := w.tail().Seek(0, io.SeekCurrent) + if serr != nil { + return serr + } + if err := w.tail().Truncate(off); err != nil { + return err + } + if err := w.sync(); err != nil { + return err + } + + fpath := filepath.Join(w.dir, walName(w.seq()+1, w.enti+1)) + + // create a temp wal file with name sequence + 1, or truncate the existing one + newTail, err := w.fp.Open() + if err != nil { + return err + } + + // update writer and save the previous crc + w.locks = append(w.locks, newTail) + prevCrc := w.encoder.crc.Sum32() + w.encoder, err = newFileEncoder(w.tail().File, prevCrc) + if err != nil { + return err + } + if err = w.saveCrc(prevCrc); err != nil { + return err + } + if err = w.encoder.encode(&walpb.Record{Type: metadataType, Data: w.metadata}); err != nil { + return err + } + if err = w.saveState(&w.state); err != nil { + return err + } + // atomically move temp wal file to wal file + if err = w.sync(); err != nil { + return err + } + + off, err = w.tail().Seek(0, io.SeekCurrent) + if err != nil { + return err + } + + if err = os.Rename(newTail.Name(), fpath); err != nil { + return err + } + if err = fileutil.Fsync(w.dirFile); err != nil { + return err + } + + newTail.Close() + + if newTail, err = fileutil.LockFile(fpath, os.O_WRONLY, fileutil.PrivateFileMode); err != nil { + return err + } + if _, err = newTail.Seek(off, io.SeekStart); err != nil { + return err + } + + w.locks[len(w.locks)-1] = newTail + + prevCrc = w.encoder.crc.Sum32() + w.encoder, err = newFileEncoder(w.tail().File, prevCrc) + if err != nil { + return err + } + + plog.Infof("segmented wal file %v is created", fpath) + return nil +} + +func (w *WAL) sync() error { + if w.encoder != nil { + if err := w.encoder.flush(); err != nil { + return err + } + } + start := time.Now() + err := fileutil.Fdatasync(w.tail().File) + + duration := time.Since(start) + if duration > warnSyncDuration { + plog.Warningf("sync duration of %v, expected less than %v", duration, warnSyncDuration) + } + syncDurations.Observe(duration.Seconds()) + + return err +} + +// ReleaseLockTo releases the locks, which has smaller index than the given index +// except the largest one among them. +// For example, if WAL is holding lock 1,2,3,4,5,6, ReleaseLockTo(4) will release +// lock 1,2 but keep 3. ReleaseLockTo(5) will release 1,2,3 but keep 4. +func (w *WAL) ReleaseLockTo(index uint64) error { + w.mu.Lock() + defer w.mu.Unlock() + + var smaller int + found := false + + for i, l := range w.locks { + _, lockIndex, err := parseWalName(filepath.Base(l.Name())) + if err != nil { + return err + } + if lockIndex >= index { + smaller = i - 1 + found = true + break + } + } + + // if no lock index is greater than the release index, we can + // release lock up to the last one(excluding). + if !found && len(w.locks) != 0 { + smaller = len(w.locks) - 1 + } + + if smaller <= 0 { + return nil + } + + for i := 0; i < smaller; i++ { + if w.locks[i] == nil { + continue + } + w.locks[i].Close() + } + w.locks = w.locks[smaller:] + + return nil +} + +func (w *WAL) Close() error { + w.mu.Lock() + defer w.mu.Unlock() + + if w.fp != nil { + w.fp.Close() + w.fp = nil + } + + if w.tail() != nil { + if err := w.sync(); err != nil { + return err + } + } + for _, l := range w.locks { + if l == nil { + continue + } + if err := l.Close(); err != nil { + plog.Errorf("failed to unlock during closing wal: %s", err) + } + } + + return w.dirFile.Close() +} + +func (w *WAL) saveEntry(e *raftpb.Entry) error { + // TODO: add MustMarshalTo to reduce one allocation. + b := pbutil.MustMarshal(e) + rec := &walpb.Record{Type: entryType, Data: b} + if err := w.encoder.encode(rec); err != nil { + return err + } + w.enti = e.Index + return nil +} + +func (w *WAL) saveState(s *raftpb.HardState) error { + if raft.IsEmptyHardState(*s) { + return nil + } + w.state = *s + b := pbutil.MustMarshal(s) + rec := &walpb.Record{Type: stateType, Data: b} + return w.encoder.encode(rec) +} + +func (w *WAL) Save(st raftpb.HardState, ents []raftpb.Entry) error { + w.mu.Lock() + defer w.mu.Unlock() + + // short cut, do not call sync + if raft.IsEmptyHardState(st) && len(ents) == 0 { + return nil + } + + mustSync := raft.MustSync(st, w.state, len(ents)) + + // TODO(xiangli): no more reference operator + for i := range ents { + if err := w.saveEntry(&ents[i]); err != nil { + return err + } + } + if err := w.saveState(&st); err != nil { + return err + } + + curOff, err := w.tail().Seek(0, io.SeekCurrent) + if err != nil { + return err + } + if curOff < SegmentSizeBytes { + if mustSync { + return w.sync() + } + return nil + } + + return w.cut() +} + +func (w *WAL) SaveSnapshot(e walpb.Snapshot) error { + b := pbutil.MustMarshal(&e) + + w.mu.Lock() + defer w.mu.Unlock() + + rec := &walpb.Record{Type: snapshotType, Data: b} + if err := w.encoder.encode(rec); err != nil { + return err + } + // update enti only when snapshot is ahead of last index + if w.enti < e.Index { + w.enti = e.Index + } + return w.sync() +} + +func (w *WAL) saveCrc(prevCrc uint32) error { + return w.encoder.encode(&walpb.Record{Type: crcType, Crc: prevCrc}) +} + +func (w *WAL) tail() *fileutil.LockedFile { + if len(w.locks) > 0 { + return w.locks[len(w.locks)-1] + } + return nil +} + +func (w *WAL) seq() uint64 { + t := w.tail() + if t == nil { + return 0 + } + seq, _, err := parseWalName(filepath.Base(t.Name())) + if err != nil { + plog.Fatalf("bad wal name %s (%v)", t.Name(), err) + } + return seq +} + +func closeAll(rcs ...io.ReadCloser) error { + for _, f := range rcs { + if err := f.Close(); err != nil { + return err + } + } + return nil +} diff --git a/deps/github.com/coreos/etcd/wal/wal_unix.go b/deps/github.com/coreos/etcd/wal/wal_unix.go new file mode 100644 index 000000000..82fd6a17a --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/wal_unix.go @@ -0,0 +1,44 @@ +// 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. + +// +build !windows + +package wal + +import ( + "os" + + "github.com/coreos/etcd/pkg/fileutil" +) + +func (w *WAL) renameWal(tmpdirpath string) (*WAL, error) { + // On non-Windows platforms, hold the lock while renaming. Releasing + // the lock and trying to reacquire it quickly can be flaky because + // it's possible the process will fork to spawn a process while this is + // happening. The fds are set up as close-on-exec by the Go runtime, + // but there is a window between the fork and the exec where another + // process holds the lock. + + if err := os.RemoveAll(w.dir); err != nil { + return nil, err + } + if err := os.Rename(tmpdirpath, w.dir); err != nil { + return nil, err + } + + w.fp = newFilePipeline(w.dir, SegmentSizeBytes) + df, err := fileutil.OpenDir(w.dir) + w.dirFile = df + return w, err +} diff --git a/deps/github.com/coreos/etcd/wal/wal_windows.go b/deps/github.com/coreos/etcd/wal/wal_windows.go new file mode 100644 index 000000000..0b9e434cf --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/wal_windows.go @@ -0,0 +1,41 @@ +// 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. + +package wal + +import ( + "os" + + "github.com/coreos/etcd/wal/walpb" +) + +func (w *WAL) renameWal(tmpdirpath string) (*WAL, error) { + // rename of directory with locked files doesn't work on + // windows; close the WAL to release the locks so the directory + // can be renamed + w.Close() + if err := os.Rename(tmpdirpath, w.dir); err != nil { + return nil, err + } + // reopen and relock + newWAL, oerr := Open(w.dir, walpb.Snapshot{}) + if oerr != nil { + return nil, oerr + } + if _, _, _, err := newWAL.ReadAll(); err != nil { + newWAL.Close() + return nil, err + } + return newWAL, nil +} diff --git a/deps/github.com/coreos/etcd/wal/walpb/record.go b/deps/github.com/coreos/etcd/wal/walpb/record.go new file mode 100644 index 000000000..30a05e0c1 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/walpb/record.go @@ -0,0 +1,29 @@ +// Copyright 2015 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. + +package walpb + +import "errors" + +var ( + ErrCRCMismatch = errors.New("walpb: crc mismatch") +) + +func (rec *Record) Validate(crc uint32) error { + if rec.Crc == crc { + return nil + } + rec.Reset() + return ErrCRCMismatch +} diff --git a/deps/github.com/coreos/etcd/wal/walpb/record.pb.go b/deps/github.com/coreos/etcd/wal/walpb/record.pb.go new file mode 100644 index 000000000..664fae130 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/walpb/record.pb.go @@ -0,0 +1,521 @@ +// Code generated by protoc-gen-gogo. +// source: record.proto +// DO NOT EDIT! + +/* + Package walpb is a generated protocol buffer package. + + It is generated from these files: + record.proto + + It has these top-level messages: + Record + Snapshot +*/ +package walpb + +import ( + "fmt" + + proto "github.com/golang/protobuf/proto" + + math "math" + + 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 Record struct { + Type int64 `protobuf:"varint,1,opt,name=type" json:"type"` + Crc uint32 `protobuf:"varint,2,opt,name=crc" json:"crc"` + Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Record) Reset() { *m = Record{} } +func (m *Record) String() string { return proto.CompactTextString(m) } +func (*Record) ProtoMessage() {} +func (*Record) Descriptor() ([]byte, []int) { return fileDescriptorRecord, []int{0} } + +type Snapshot struct { + Index uint64 `protobuf:"varint,1,opt,name=index" json:"index"` + Term uint64 `protobuf:"varint,2,opt,name=term" json:"term"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { return fileDescriptorRecord, []int{1} } + +func init() { + proto.RegisterType((*Record)(nil), "walpb.Record") + proto.RegisterType((*Snapshot)(nil), "walpb.Snapshot") +} +func (m *Record) 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 *Record) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintRecord(dAtA, i, uint64(m.Type)) + dAtA[i] = 0x10 + i++ + i = encodeVarintRecord(dAtA, i, uint64(m.Crc)) + if m.Data != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintRecord(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintRecord(dAtA, i, uint64(m.Index)) + dAtA[i] = 0x10 + i++ + i = encodeVarintRecord(dAtA, i, uint64(m.Term)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeFixed64Record(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 encodeFixed32Record(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 encodeVarintRecord(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 *Record) Size() (n int) { + var l int + _ = l + n += 1 + sovRecord(uint64(m.Type)) + n += 1 + sovRecord(uint64(m.Crc)) + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovRecord(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Snapshot) Size() (n int) { + var l int + _ = l + n += 1 + sovRecord(uint64(m.Index)) + n += 1 + sovRecord(uint64(m.Term)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovRecord(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozRecord(x uint64) (n int) { + return sovRecord(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Record) 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 ErrIntOverflowRecord + } + 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: Record: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Record: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Crc", wireType) + } + m.Crc = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Crc |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRecord(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRecord + } + 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 *Snapshot) 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 ErrIntOverflowRecord + } + 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: Snapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType) + } + m.Term = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Term |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipRecord(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRecord + } + 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 skipRecord(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, ErrIntOverflowRecord + } + 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, ErrIntOverflowRecord + } + 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, ErrIntOverflowRecord + } + 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, ErrInvalidLengthRecord + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRecord + } + 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 := skipRecord(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 ( + ErrInvalidLengthRecord = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRecord = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("record.proto", fileDescriptorRecord) } + +var fileDescriptorRecord = []byte{ + // 186 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4a, 0x4d, 0xce, + 0x2f, 0x4a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2d, 0x4f, 0xcc, 0x29, 0x48, 0x92, + 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x8b, 0xe8, 0x83, 0x58, 0x10, 0x49, 0x25, 0x3f, 0x2e, 0xb6, + 0x20, 0xb0, 0x62, 0x21, 0x09, 0x2e, 0x96, 0x92, 0xca, 0x82, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, + 0x66, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xc0, 0x22, 0x42, 0x62, 0x5c, 0xcc, 0xc9, 0x45, + 0xc9, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xbc, 0x50, 0x09, 0x90, 0x80, 0x90, 0x10, 0x17, 0x4b, 0x4a, + 0x62, 0x49, 0xa2, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x4f, 0x10, 0x98, 0xad, 0xe4, 0xc0, 0xc5, 0x11, + 0x9c, 0x97, 0x58, 0x50, 0x9c, 0x91, 0x5f, 0x22, 0x24, 0xc5, 0xc5, 0x9a, 0x99, 0x97, 0x92, 0x5a, + 0x01, 0x36, 0x92, 0x05, 0xaa, 0x13, 0x22, 0x04, 0xb6, 0x2d, 0xb5, 0x28, 0x17, 0x6c, 0x28, 0x0b, + 0xdc, 0xb6, 0xd4, 0xa2, 0x5c, 0x27, 0x91, 0x13, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, + 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x19, 0x8f, 0xe5, 0x18, 0x00, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x7f, 0x5e, 0x5c, 0x46, 0xd3, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/coreos/etcd/wal/walpb/record.proto b/deps/github.com/coreos/etcd/wal/walpb/record.proto new file mode 100644 index 000000000..b694cb233 --- /dev/null +++ b/deps/github.com/coreos/etcd/wal/walpb/record.proto @@ -0,0 +1,20 @@ +syntax = "proto2"; +package walpb; + +import "gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_getters_all) = false; + +message Record { + optional int64 type = 1 [(gogoproto.nullable) = false]; + optional uint32 crc = 2 [(gogoproto.nullable) = false]; + optional bytes data = 3; +} + +message Snapshot { + optional uint64 index = 1 [(gogoproto.nullable) = false]; + optional uint64 term = 2 [(gogoproto.nullable) = false]; +} diff --git a/deps/github.com/coreos/go-oidc/LICENSE b/deps/github.com/coreos/go-oidc/LICENSE deleted file mode 100644 index e06d20818..000000000 --- a/deps/github.com/coreos/go-oidc/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/deps/github.com/coreos/go-oidc/NOTICE b/deps/github.com/coreos/go-oidc/NOTICE deleted file mode 100644 index b39ddfa5c..000000000 --- a/deps/github.com/coreos/go-oidc/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -CoreOS Project -Copyright 2014 CoreOS, Inc - -This product includes software developed at CoreOS, Inc. -(http://www.coreos.com/). diff --git a/deps/github.com/coreos/go-oidc/http/client.go b/deps/github.com/coreos/go-oidc/http/client.go deleted file mode 100644 index fd079b495..000000000 --- a/deps/github.com/coreos/go-oidc/http/client.go +++ /dev/null @@ -1,7 +0,0 @@ -package http - -import "net/http" - -type Client interface { - Do(*http.Request) (*http.Response, error) -} diff --git a/deps/github.com/coreos/go-oidc/http/doc.go b/deps/github.com/coreos/go-oidc/http/doc.go deleted file mode 100644 index 5687e8b81..000000000 --- a/deps/github.com/coreos/go-oidc/http/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package http is DEPRECATED. Use net/http instead. -package http diff --git a/deps/github.com/coreos/go-oidc/http/http.go b/deps/github.com/coreos/go-oidc/http/http.go deleted file mode 100644 index 48717833c..000000000 --- a/deps/github.com/coreos/go-oidc/http/http.go +++ /dev/null @@ -1,161 +0,0 @@ -package http - -import ( - "encoding/base64" - "encoding/json" - "errors" - "log" - "net/http" - "net/url" - "path" - "strconv" - "strings" - "time" -) - -func WriteError(w http.ResponseWriter, code int, msg string) { - e := struct { - Error string `json:"error"` - }{ - Error: msg, - } - b, err := json.Marshal(e) - if err != nil { - log.Printf("go-oidc: failed to marshal %#v: %v", e, err) - code = http.StatusInternalServerError - b = []byte(`{"error":"server_error"}`) - } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(code) - w.Write(b) -} - -// BasicAuth parses a username and password from the request's -// Authorization header. This was pulled from golang master: -// https://codereview.appspot.com/76540043 -func BasicAuth(r *http.Request) (username, password string, ok bool) { - auth := r.Header.Get("Authorization") - if auth == "" { - return - } - - if !strings.HasPrefix(auth, "Basic ") { - return - } - c, err := base64.StdEncoding.DecodeString(strings.TrimPrefix(auth, "Basic ")) - if err != nil { - return - } - cs := string(c) - s := strings.IndexByte(cs, ':') - if s < 0 { - return - } - return cs[:s], cs[s+1:], true -} - -func cacheControlMaxAge(hdr string) (time.Duration, bool, error) { - for _, field := range strings.Split(hdr, ",") { - parts := strings.SplitN(strings.TrimSpace(field), "=", 2) - k := strings.ToLower(strings.TrimSpace(parts[0])) - if k != "max-age" { - continue - } - - if len(parts) == 1 { - return 0, false, errors.New("max-age has no value") - } - - v := strings.TrimSpace(parts[1]) - if v == "" { - return 0, false, errors.New("max-age has empty value") - } - - age, err := strconv.Atoi(v) - if err != nil { - return 0, false, err - } - - if age <= 0 { - return 0, false, nil - } - - return time.Duration(age) * time.Second, true, nil - } - - return 0, false, nil -} - -func expires(date, expires string) (time.Duration, bool, error) { - if date == "" || expires == "" { - return 0, false, nil - } - - var te time.Time - var err error - if expires == "0" { - return 0, false, nil - } - te, err = time.Parse(time.RFC1123, expires) - if err != nil { - return 0, false, err - } - - td, err := time.Parse(time.RFC1123, date) - if err != nil { - return 0, false, err - } - - ttl := te.Sub(td) - - // headers indicate data already expired, caller should not - // have to care about this case - if ttl <= 0 { - return 0, false, nil - } - - return ttl, true, nil -} - -func Cacheable(hdr http.Header) (time.Duration, bool, error) { - ttl, ok, err := cacheControlMaxAge(hdr.Get("Cache-Control")) - if err != nil || ok { - return ttl, ok, err - } - - return expires(hdr.Get("Date"), hdr.Get("Expires")) -} - -// MergeQuery appends additional query values to an existing URL. -func MergeQuery(u url.URL, q url.Values) url.URL { - uv := u.Query() - for k, vs := range q { - for _, v := range vs { - uv.Add(k, v) - } - } - u.RawQuery = uv.Encode() - return u -} - -// NewResourceLocation appends a resource id to the end of the requested URL path. -func NewResourceLocation(reqURL *url.URL, id string) string { - var u url.URL - u = *reqURL - u.Path = path.Join(u.Path, id) - u.RawQuery = "" - u.Fragment = "" - return u.String() -} - -// CopyRequest returns a clone of the provided *http.Request. -// The returned object is a shallow copy of the struct and a -// deep copy of its Header field. -func CopyRequest(r *http.Request) *http.Request { - r2 := *r - r2.Header = make(http.Header) - for k, s := range r.Header { - r2.Header[k] = s - } - return &r2 -} diff --git a/deps/github.com/coreos/go-oidc/http/url.go b/deps/github.com/coreos/go-oidc/http/url.go deleted file mode 100644 index df60eb1a6..000000000 --- a/deps/github.com/coreos/go-oidc/http/url.go +++ /dev/null @@ -1,29 +0,0 @@ -package http - -import ( - "errors" - "net/url" -) - -// ParseNonEmptyURL checks that a string is a parsable URL which is also not empty -// since `url.Parse("")` does not return an error. Must contian a scheme and a host. -func ParseNonEmptyURL(u string) (*url.URL, error) { - if u == "" { - return nil, errors.New("url is empty") - } - - ur, err := url.Parse(u) - if err != nil { - return nil, err - } - - if ur.Scheme == "" { - return nil, errors.New("url scheme is empty") - } - - if ur.Host == "" { - return nil, errors.New("url host is empty") - } - - return ur, nil -} diff --git a/deps/github.com/coreos/go-oidc/jose/claims.go b/deps/github.com/coreos/go-oidc/jose/claims.go deleted file mode 100644 index 8b48bfd23..000000000 --- a/deps/github.com/coreos/go-oidc/jose/claims.go +++ /dev/null @@ -1,126 +0,0 @@ -package jose - -import ( - "encoding/json" - "fmt" - "math" - "time" -) - -type Claims map[string]interface{} - -func (c Claims) Add(name string, value interface{}) { - c[name] = value -} - -func (c Claims) StringClaim(name string) (string, bool, error) { - cl, ok := c[name] - if !ok { - return "", false, nil - } - - v, ok := cl.(string) - if !ok { - return "", false, fmt.Errorf("unable to parse claim as string: %v", name) - } - - return v, true, nil -} - -func (c Claims) StringsClaim(name string) ([]string, bool, error) { - cl, ok := c[name] - if !ok { - return nil, false, nil - } - - if v, ok := cl.([]string); ok { - return v, true, nil - } - - // When unmarshaled, []string will become []interface{}. - if v, ok := cl.([]interface{}); ok { - var ret []string - for _, vv := range v { - str, ok := vv.(string) - if !ok { - return nil, false, fmt.Errorf("unable to parse claim as string array: %v", name) - } - ret = append(ret, str) - } - return ret, true, nil - } - - return nil, false, fmt.Errorf("unable to parse claim as string array: %v", name) -} - -func (c Claims) Int64Claim(name string) (int64, bool, error) { - cl, ok := c[name] - if !ok { - return 0, false, nil - } - - v, ok := cl.(int64) - if !ok { - vf, ok := cl.(float64) - if !ok { - return 0, false, fmt.Errorf("unable to parse claim as int64: %v", name) - } - v = int64(vf) - } - - return v, true, nil -} - -func (c Claims) Float64Claim(name string) (float64, bool, error) { - cl, ok := c[name] - if !ok { - return 0, false, nil - } - - v, ok := cl.(float64) - if !ok { - vi, ok := cl.(int64) - if !ok { - return 0, false, fmt.Errorf("unable to parse claim as float64: %v", name) - } - v = float64(vi) - } - - return v, true, nil -} - -func (c Claims) TimeClaim(name string) (time.Time, bool, error) { - v, ok, err := c.Float64Claim(name) - if !ok || err != nil { - return time.Time{}, ok, err - } - - s := math.Trunc(v) - ns := (v - s) * math.Pow(10, 9) - return time.Unix(int64(s), int64(ns)).UTC(), true, nil -} - -func decodeClaims(payload []byte) (Claims, error) { - var c Claims - if err := json.Unmarshal(payload, &c); err != nil { - return nil, fmt.Errorf("malformed JWT claims, unable to decode: %v", err) - } - return c, nil -} - -func marshalClaims(c Claims) ([]byte, error) { - b, err := json.Marshal(c) - if err != nil { - return nil, err - } - return b, nil -} - -func encodeClaims(c Claims) (string, error) { - b, err := marshalClaims(c) - if err != nil { - return "", err - } - - return encodeSegment(b), nil -} diff --git a/deps/github.com/coreos/go-oidc/jose/doc.go b/deps/github.com/coreos/go-oidc/jose/doc.go deleted file mode 100644 index b5e132178..000000000 --- a/deps/github.com/coreos/go-oidc/jose/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package jose is DEPRECATED. Use gopkg.in/square/go-jose.v2 instead. -package jose diff --git a/deps/github.com/coreos/go-oidc/jose/jose.go b/deps/github.com/coreos/go-oidc/jose/jose.go deleted file mode 100644 index 620992659..000000000 --- a/deps/github.com/coreos/go-oidc/jose/jose.go +++ /dev/null @@ -1,112 +0,0 @@ -package jose - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "strings" -) - -const ( - HeaderMediaType = "typ" - HeaderKeyAlgorithm = "alg" - HeaderKeyID = "kid" -) - -const ( - // Encryption Algorithm Header Parameter Values for JWS - // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-6 - AlgHS256 = "HS256" - AlgHS384 = "HS384" - AlgHS512 = "HS512" - AlgRS256 = "RS256" - AlgRS384 = "RS384" - AlgRS512 = "RS512" - AlgES256 = "ES256" - AlgES384 = "ES384" - AlgES512 = "ES512" - AlgPS256 = "PS256" - AlgPS384 = "PS384" - AlgPS512 = "PS512" - AlgNone = "none" -) - -const ( - // Algorithm Header Parameter Values for JWE - // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-4.1 - AlgRSA15 = "RSA1_5" - AlgRSAOAEP = "RSA-OAEP" - AlgRSAOAEP256 = "RSA-OAEP-256" - AlgA128KW = "A128KW" - AlgA192KW = "A192KW" - AlgA256KW = "A256KW" - AlgDir = "dir" - AlgECDHES = "ECDH-ES" - AlgECDHESA128KW = "ECDH-ES+A128KW" - AlgECDHESA192KW = "ECDH-ES+A192KW" - AlgECDHESA256KW = "ECDH-ES+A256KW" - AlgA128GCMKW = "A128GCMKW" - AlgA192GCMKW = "A192GCMKW" - AlgA256GCMKW = "A256GCMKW" - AlgPBES2HS256A128KW = "PBES2-HS256+A128KW" - AlgPBES2HS384A192KW = "PBES2-HS384+A192KW" - AlgPBES2HS512A256KW = "PBES2-HS512+A256KW" -) - -const ( - // Encryption Algorithm Header Parameter Values for JWE - // See: https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#page-22 - EncA128CBCHS256 = "A128CBC-HS256" - EncA128CBCHS384 = "A128CBC-HS384" - EncA256CBCHS512 = "A256CBC-HS512" - EncA128GCM = "A128GCM" - EncA192GCM = "A192GCM" - EncA256GCM = "A256GCM" -) - -type JOSEHeader map[string]string - -func (j JOSEHeader) Validate() error { - if _, exists := j[HeaderKeyAlgorithm]; !exists { - return fmt.Errorf("header missing %q parameter", HeaderKeyAlgorithm) - } - - return nil -} - -func decodeHeader(seg string) (JOSEHeader, error) { - b, err := decodeSegment(seg) - if err != nil { - return nil, err - } - - var h JOSEHeader - err = json.Unmarshal(b, &h) - if err != nil { - return nil, err - } - - return h, nil -} - -func encodeHeader(h JOSEHeader) (string, error) { - b, err := json.Marshal(h) - if err != nil { - return "", err - } - - return encodeSegment(b), nil -} - -// Decode JWT specific base64url encoding with padding stripped -func decodeSegment(seg string) ([]byte, error) { - if l := len(seg) % 4; l != 0 { - seg += strings.Repeat("=", 4-l) - } - return base64.URLEncoding.DecodeString(seg) -} - -// Encode JWT specific base64url encoding with padding stripped -func encodeSegment(seg []byte) string { - return strings.TrimRight(base64.URLEncoding.EncodeToString(seg), "=") -} diff --git a/deps/github.com/coreos/go-oidc/jose/jwk.go b/deps/github.com/coreos/go-oidc/jose/jwk.go deleted file mode 100644 index 119f073ff..000000000 --- a/deps/github.com/coreos/go-oidc/jose/jwk.go +++ /dev/null @@ -1,135 +0,0 @@ -package jose - -import ( - "bytes" - "encoding/base64" - "encoding/binary" - "encoding/json" - "math/big" - "strings" -) - -// JSON Web Key -// https://tools.ietf.org/html/draft-ietf-jose-json-web-key-36#page-5 -type JWK struct { - ID string - Type string - Alg string - Use string - Exponent int - Modulus *big.Int - Secret []byte -} - -type jwkJSON struct { - ID string `json:"kid"` - Type string `json:"kty"` - Alg string `json:"alg"` - Use string `json:"use"` - Exponent string `json:"e"` - Modulus string `json:"n"` -} - -func (j *JWK) MarshalJSON() ([]byte, error) { - t := jwkJSON{ - ID: j.ID, - Type: j.Type, - Alg: j.Alg, - Use: j.Use, - Exponent: encodeExponent(j.Exponent), - Modulus: encodeModulus(j.Modulus), - } - - return json.Marshal(&t) -} - -func (j *JWK) UnmarshalJSON(data []byte) error { - var t jwkJSON - err := json.Unmarshal(data, &t) - if err != nil { - return err - } - - e, err := decodeExponent(t.Exponent) - if err != nil { - return err - } - - n, err := decodeModulus(t.Modulus) - if err != nil { - return err - } - - j.ID = t.ID - j.Type = t.Type - j.Alg = t.Alg - j.Use = t.Use - j.Exponent = e - j.Modulus = n - - return nil -} - -type JWKSet struct { - Keys []JWK `json:"keys"` -} - -func decodeExponent(e string) (int, error) { - decE, err := decodeBase64URLPaddingOptional(e) - if err != nil { - return 0, err - } - var eBytes []byte - if len(decE) < 8 { - eBytes = make([]byte, 8-len(decE), 8) - eBytes = append(eBytes, decE...) - } else { - eBytes = decE - } - eReader := bytes.NewReader(eBytes) - var E uint64 - err = binary.Read(eReader, binary.BigEndian, &E) - if err != nil { - return 0, err - } - return int(E), nil -} - -func encodeExponent(e int) string { - b := make([]byte, 8) - binary.BigEndian.PutUint64(b, uint64(e)) - var idx int - for ; idx < 8; idx++ { - if b[idx] != 0x0 { - break - } - } - return base64.RawURLEncoding.EncodeToString(b[idx:]) -} - -// Turns a URL encoded modulus of a key into a big int. -func decodeModulus(n string) (*big.Int, error) { - decN, err := decodeBase64URLPaddingOptional(n) - if err != nil { - return nil, err - } - N := big.NewInt(0) - N.SetBytes(decN) - return N, nil -} - -func encodeModulus(n *big.Int) string { - return base64.RawURLEncoding.EncodeToString(n.Bytes()) -} - -// decodeBase64URLPaddingOptional decodes Base64 whether there is padding or not. -// The stdlib version currently doesn't handle this. -// We can get rid of this is if this bug: -// https://github.com/golang/go/issues/4237 -// ever closes. -func decodeBase64URLPaddingOptional(e string) ([]byte, error) { - if m := len(e) % 4; m != 0 { - e += strings.Repeat("=", 4-m) - } - return base64.URLEncoding.DecodeString(e) -} diff --git a/deps/github.com/coreos/go-oidc/jose/jws.go b/deps/github.com/coreos/go-oidc/jose/jws.go deleted file mode 100644 index 1049ece83..000000000 --- a/deps/github.com/coreos/go-oidc/jose/jws.go +++ /dev/null @@ -1,51 +0,0 @@ -package jose - -import ( - "fmt" - "strings" -) - -type JWS struct { - RawHeader string - Header JOSEHeader - RawPayload string - Payload []byte - Signature []byte -} - -// Given a raw encoded JWS token parses it and verifies the structure. -func ParseJWS(raw string) (JWS, error) { - parts := strings.Split(raw, ".") - if len(parts) != 3 { - return JWS{}, fmt.Errorf("malformed JWS, only %d segments", len(parts)) - } - - rawSig := parts[2] - jws := JWS{ - RawHeader: parts[0], - RawPayload: parts[1], - } - - header, err := decodeHeader(jws.RawHeader) - if err != nil { - return JWS{}, fmt.Errorf("malformed JWS, unable to decode header, %s", err) - } - if err = header.Validate(); err != nil { - return JWS{}, fmt.Errorf("malformed JWS, %s", err) - } - jws.Header = header - - payload, err := decodeSegment(jws.RawPayload) - if err != nil { - return JWS{}, fmt.Errorf("malformed JWS, unable to decode payload: %s", err) - } - jws.Payload = payload - - sig, err := decodeSegment(rawSig) - if err != nil { - return JWS{}, fmt.Errorf("malformed JWS, unable to decode signature: %s", err) - } - jws.Signature = sig - - return jws, nil -} diff --git a/deps/github.com/coreos/go-oidc/jose/jwt.go b/deps/github.com/coreos/go-oidc/jose/jwt.go deleted file mode 100644 index 3b3e9634b..000000000 --- a/deps/github.com/coreos/go-oidc/jose/jwt.go +++ /dev/null @@ -1,82 +0,0 @@ -package jose - -import "strings" - -type JWT JWS - -func ParseJWT(token string) (jwt JWT, err error) { - jws, err := ParseJWS(token) - if err != nil { - return - } - - return JWT(jws), nil -} - -func NewJWT(header JOSEHeader, claims Claims) (jwt JWT, err error) { - jwt = JWT{} - - jwt.Header = header - jwt.Header[HeaderMediaType] = "JWT" - - claimBytes, err := marshalClaims(claims) - if err != nil { - return - } - jwt.Payload = claimBytes - - eh, err := encodeHeader(header) - if err != nil { - return - } - jwt.RawHeader = eh - - ec, err := encodeClaims(claims) - if err != nil { - return - } - jwt.RawPayload = ec - - return -} - -func (j *JWT) KeyID() (string, bool) { - kID, ok := j.Header[HeaderKeyID] - return kID, ok -} - -func (j *JWT) Claims() (Claims, error) { - return decodeClaims(j.Payload) -} - -// Encoded data part of the token which may be signed. -func (j *JWT) Data() string { - return strings.Join([]string{j.RawHeader, j.RawPayload}, ".") -} - -// Full encoded JWT token string in format: header.claims.signature -func (j *JWT) Encode() string { - d := j.Data() - s := encodeSegment(j.Signature) - return strings.Join([]string{d, s}, ".") -} - -func NewSignedJWT(claims Claims, s Signer) (*JWT, error) { - header := JOSEHeader{ - HeaderKeyAlgorithm: s.Alg(), - HeaderKeyID: s.ID(), - } - - jwt, err := NewJWT(header, claims) - if err != nil { - return nil, err - } - - sig, err := s.Sign([]byte(jwt.Data())) - if err != nil { - return nil, err - } - jwt.Signature = sig - - return &jwt, nil -} diff --git a/deps/github.com/coreos/go-oidc/jose/sig.go b/deps/github.com/coreos/go-oidc/jose/sig.go deleted file mode 100755 index 7b2b253cc..000000000 --- a/deps/github.com/coreos/go-oidc/jose/sig.go +++ /dev/null @@ -1,24 +0,0 @@ -package jose - -import ( - "fmt" -) - -type Verifier interface { - ID() string - Alg() string - Verify(sig []byte, data []byte) error -} - -type Signer interface { - Verifier - Sign(data []byte) (sig []byte, err error) -} - -func NewVerifier(jwk JWK) (Verifier, error) { - if jwk.Type != "RSA" { - return nil, fmt.Errorf("unsupported key type %q", jwk.Type) - } - - return NewVerifierRSA(jwk) -} diff --git a/deps/github.com/coreos/go-oidc/jose/sig_rsa.go b/deps/github.com/coreos/go-oidc/jose/sig_rsa.go deleted file mode 100755 index 004e45dd8..000000000 --- a/deps/github.com/coreos/go-oidc/jose/sig_rsa.go +++ /dev/null @@ -1,67 +0,0 @@ -package jose - -import ( - "crypto" - "crypto/rand" - "crypto/rsa" - "fmt" -) - -type VerifierRSA struct { - KeyID string - Hash crypto.Hash - PublicKey rsa.PublicKey -} - -type SignerRSA struct { - PrivateKey rsa.PrivateKey - VerifierRSA -} - -func NewVerifierRSA(jwk JWK) (*VerifierRSA, error) { - if jwk.Alg != "" && jwk.Alg != "RS256" { - return nil, fmt.Errorf("unsupported key algorithm %q", jwk.Alg) - } - - v := VerifierRSA{ - KeyID: jwk.ID, - PublicKey: rsa.PublicKey{ - N: jwk.Modulus, - E: jwk.Exponent, - }, - Hash: crypto.SHA256, - } - - return &v, nil -} - -func NewSignerRSA(kid string, key rsa.PrivateKey) *SignerRSA { - return &SignerRSA{ - PrivateKey: key, - VerifierRSA: VerifierRSA{ - KeyID: kid, - PublicKey: key.PublicKey, - Hash: crypto.SHA256, - }, - } -} - -func (v *VerifierRSA) ID() string { - return v.KeyID -} - -func (v *VerifierRSA) Alg() string { - return "RS256" -} - -func (v *VerifierRSA) Verify(sig []byte, data []byte) error { - h := v.Hash.New() - h.Write(data) - return rsa.VerifyPKCS1v15(&v.PublicKey, v.Hash, h.Sum(nil), sig) -} - -func (s *SignerRSA) Sign(data []byte) ([]byte, error) { - h := s.Hash.New() - h.Write(data) - return rsa.SignPKCS1v15(rand.Reader, &s.PrivateKey, s.Hash, h.Sum(nil)) -} diff --git a/deps/github.com/coreos/go-oidc/key/doc.go b/deps/github.com/coreos/go-oidc/key/doc.go deleted file mode 100644 index 936eec745..000000000 --- a/deps/github.com/coreos/go-oidc/key/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package key is DEPRECATED. Use github.com/coreos/go-oidc instead. -package key diff --git a/deps/github.com/coreos/go-oidc/key/key.go b/deps/github.com/coreos/go-oidc/key/key.go deleted file mode 100644 index 208c1fc14..000000000 --- a/deps/github.com/coreos/go-oidc/key/key.go +++ /dev/null @@ -1,153 +0,0 @@ -package key - -import ( - "crypto/rand" - "crypto/rsa" - "encoding/hex" - "encoding/json" - "io" - "time" - - "github.com/coreos/go-oidc/jose" -) - -func NewPublicKey(jwk jose.JWK) *PublicKey { - return &PublicKey{jwk: jwk} -} - -type PublicKey struct { - jwk jose.JWK -} - -func (k *PublicKey) MarshalJSON() ([]byte, error) { - return json.Marshal(&k.jwk) -} - -func (k *PublicKey) UnmarshalJSON(data []byte) error { - var jwk jose.JWK - if err := json.Unmarshal(data, &jwk); err != nil { - return err - } - k.jwk = jwk - return nil -} - -func (k *PublicKey) ID() string { - return k.jwk.ID -} - -func (k *PublicKey) Verifier() (jose.Verifier, error) { - return jose.NewVerifierRSA(k.jwk) -} - -type PrivateKey struct { - KeyID string - PrivateKey *rsa.PrivateKey -} - -func (k *PrivateKey) ID() string { - return k.KeyID -} - -func (k *PrivateKey) Signer() jose.Signer { - return jose.NewSignerRSA(k.ID(), *k.PrivateKey) -} - -func (k *PrivateKey) JWK() jose.JWK { - return jose.JWK{ - ID: k.KeyID, - Type: "RSA", - Alg: "RS256", - Use: "sig", - Exponent: k.PrivateKey.PublicKey.E, - Modulus: k.PrivateKey.PublicKey.N, - } -} - -type KeySet interface { - ExpiresAt() time.Time -} - -type PublicKeySet struct { - keys []PublicKey - index map[string]*PublicKey - expiresAt time.Time -} - -func NewPublicKeySet(jwks []jose.JWK, exp time.Time) *PublicKeySet { - keys := make([]PublicKey, len(jwks)) - index := make(map[string]*PublicKey) - for i, jwk := range jwks { - keys[i] = *NewPublicKey(jwk) - index[keys[i].ID()] = &keys[i] - } - return &PublicKeySet{ - keys: keys, - index: index, - expiresAt: exp, - } -} - -func (s *PublicKeySet) ExpiresAt() time.Time { - return s.expiresAt -} - -func (s *PublicKeySet) Keys() []PublicKey { - return s.keys -} - -func (s *PublicKeySet) Key(id string) *PublicKey { - return s.index[id] -} - -type PrivateKeySet struct { - keys []*PrivateKey - ActiveKeyID string - expiresAt time.Time -} - -func NewPrivateKeySet(keys []*PrivateKey, exp time.Time) *PrivateKeySet { - return &PrivateKeySet{ - keys: keys, - ActiveKeyID: keys[0].ID(), - expiresAt: exp.UTC(), - } -} - -func (s *PrivateKeySet) Keys() []*PrivateKey { - return s.keys -} - -func (s *PrivateKeySet) ExpiresAt() time.Time { - return s.expiresAt -} - -func (s *PrivateKeySet) Active() *PrivateKey { - for i, k := range s.keys { - if k.ID() == s.ActiveKeyID { - return s.keys[i] - } - } - - return nil -} - -type GeneratePrivateKeyFunc func() (*PrivateKey, error) - -func GeneratePrivateKey() (*PrivateKey, error) { - pk, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - return nil, err - } - keyID := make([]byte, 20) - if _, err := io.ReadFull(rand.Reader, keyID); err != nil { - return nil, err - } - - k := PrivateKey{ - KeyID: hex.EncodeToString(keyID), - PrivateKey: pk, - } - - return &k, nil -} diff --git a/deps/github.com/coreos/go-oidc/key/manager.go b/deps/github.com/coreos/go-oidc/key/manager.go deleted file mode 100644 index 476ab6a8d..000000000 --- a/deps/github.com/coreos/go-oidc/key/manager.go +++ /dev/null @@ -1,99 +0,0 @@ -package key - -import ( - "errors" - "time" - - "github.com/jonboulle/clockwork" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/pkg/health" -) - -type PrivateKeyManager interface { - ExpiresAt() time.Time - Signer() (jose.Signer, error) - JWKs() ([]jose.JWK, error) - PublicKeys() ([]PublicKey, error) - - WritableKeySetRepo - health.Checkable -} - -func NewPrivateKeyManager() PrivateKeyManager { - return &privateKeyManager{ - clock: clockwork.NewRealClock(), - } -} - -type privateKeyManager struct { - keySet *PrivateKeySet - clock clockwork.Clock -} - -func (m *privateKeyManager) ExpiresAt() time.Time { - if m.keySet == nil { - return m.clock.Now().UTC() - } - - return m.keySet.ExpiresAt() -} - -func (m *privateKeyManager) Signer() (jose.Signer, error) { - if err := m.Healthy(); err != nil { - return nil, err - } - - return m.keySet.Active().Signer(), nil -} - -func (m *privateKeyManager) JWKs() ([]jose.JWK, error) { - if err := m.Healthy(); err != nil { - return nil, err - } - - keys := m.keySet.Keys() - jwks := make([]jose.JWK, len(keys)) - for i, k := range keys { - jwks[i] = k.JWK() - } - return jwks, nil -} - -func (m *privateKeyManager) PublicKeys() ([]PublicKey, error) { - jwks, err := m.JWKs() - if err != nil { - return nil, err - } - keys := make([]PublicKey, len(jwks)) - for i, jwk := range jwks { - keys[i] = *NewPublicKey(jwk) - } - return keys, nil -} - -func (m *privateKeyManager) Healthy() error { - if m.keySet == nil { - return errors.New("private key manager uninitialized") - } - - if len(m.keySet.Keys()) == 0 { - return errors.New("private key manager zero keys") - } - - if m.keySet.ExpiresAt().Before(m.clock.Now().UTC()) { - return errors.New("private key manager keys expired") - } - - return nil -} - -func (m *privateKeyManager) Set(keySet KeySet) error { - privKeySet, ok := keySet.(*PrivateKeySet) - if !ok { - return errors.New("unable to cast to PrivateKeySet") - } - - m.keySet = privKeySet - return nil -} diff --git a/deps/github.com/coreos/go-oidc/key/repo.go b/deps/github.com/coreos/go-oidc/key/repo.go deleted file mode 100644 index 1acdeb361..000000000 --- a/deps/github.com/coreos/go-oidc/key/repo.go +++ /dev/null @@ -1,55 +0,0 @@ -package key - -import ( - "errors" - "sync" -) - -var ErrorNoKeys = errors.New("no keys found") - -type WritableKeySetRepo interface { - Set(KeySet) error -} - -type ReadableKeySetRepo interface { - Get() (KeySet, error) -} - -type PrivateKeySetRepo interface { - WritableKeySetRepo - ReadableKeySetRepo -} - -func NewPrivateKeySetRepo() PrivateKeySetRepo { - return &memPrivateKeySetRepo{} -} - -type memPrivateKeySetRepo struct { - mu sync.RWMutex - pks PrivateKeySet -} - -func (r *memPrivateKeySetRepo) Set(ks KeySet) error { - pks, ok := ks.(*PrivateKeySet) - if !ok { - return errors.New("unable to cast to PrivateKeySet") - } else if pks == nil { - return errors.New("nil KeySet") - } - - r.mu.Lock() - defer r.mu.Unlock() - - r.pks = *pks - return nil -} - -func (r *memPrivateKeySetRepo) Get() (KeySet, error) { - r.mu.RLock() - defer r.mu.RUnlock() - - if r.pks.keys == nil { - return nil, ErrorNoKeys - } - return KeySet(&r.pks), nil -} diff --git a/deps/github.com/coreos/go-oidc/key/rotate.go b/deps/github.com/coreos/go-oidc/key/rotate.go deleted file mode 100644 index bc6cdfb1b..000000000 --- a/deps/github.com/coreos/go-oidc/key/rotate.go +++ /dev/null @@ -1,159 +0,0 @@ -package key - -import ( - "errors" - "log" - "time" - - ptime "github.com/coreos/pkg/timeutil" - "github.com/jonboulle/clockwork" -) - -var ( - ErrorPrivateKeysExpired = errors.New("private keys have expired") -) - -func NewPrivateKeyRotator(repo PrivateKeySetRepo, ttl time.Duration) *PrivateKeyRotator { - return &PrivateKeyRotator{ - repo: repo, - ttl: ttl, - - keep: 2, - generateKey: GeneratePrivateKey, - clock: clockwork.NewRealClock(), - } -} - -type PrivateKeyRotator struct { - repo PrivateKeySetRepo - generateKey GeneratePrivateKeyFunc - clock clockwork.Clock - keep int - ttl time.Duration -} - -func (r *PrivateKeyRotator) expiresAt() time.Time { - return r.clock.Now().UTC().Add(r.ttl) -} - -func (r *PrivateKeyRotator) Healthy() error { - pks, err := r.privateKeySet() - if err != nil { - return err - } - - if r.clock.Now().After(pks.ExpiresAt()) { - return ErrorPrivateKeysExpired - } - - return nil -} - -func (r *PrivateKeyRotator) privateKeySet() (*PrivateKeySet, error) { - ks, err := r.repo.Get() - if err != nil { - return nil, err - } - - pks, ok := ks.(*PrivateKeySet) - if !ok { - return nil, errors.New("unable to cast to PrivateKeySet") - } - return pks, nil -} - -func (r *PrivateKeyRotator) nextRotation() (time.Duration, error) { - pks, err := r.privateKeySet() - if err == ErrorNoKeys { - return 0, nil - } - if err != nil { - return 0, err - } - - now := r.clock.Now() - - // Ideally, we want to rotate after half the TTL has elapsed. - idealRotationTime := pks.ExpiresAt().Add(-r.ttl / 2) - - // If we are past the ideal rotation time, rotate immediatly. - return max(0, idealRotationTime.Sub(now)), nil -} - -func max(a, b time.Duration) time.Duration { - if a > b { - return a - } - return b -} - -func (r *PrivateKeyRotator) Run() chan struct{} { - attempt := func() { - k, err := r.generateKey() - if err != nil { - log.Printf("go-oidc: failed generating signing key: %v", err) - return - } - - exp := r.expiresAt() - if err := rotatePrivateKeys(r.repo, k, r.keep, exp); err != nil { - log.Printf("go-oidc: key rotation failed: %v", err) - return - } - } - - stop := make(chan struct{}) - go func() { - for { - var nextRotation time.Duration - var sleep time.Duration - var err error - for { - if nextRotation, err = r.nextRotation(); err == nil { - break - } - sleep = ptime.ExpBackoff(sleep, time.Minute) - log.Printf("go-oidc: error getting nextRotation, retrying in %v: %v", sleep, err) - time.Sleep(sleep) - } - - select { - case <-r.clock.After(nextRotation): - attempt() - case <-stop: - return - } - } - }() - - return stop -} - -func rotatePrivateKeys(repo PrivateKeySetRepo, k *PrivateKey, keep int, exp time.Time) error { - ks, err := repo.Get() - if err != nil && err != ErrorNoKeys { - return err - } - - var keys []*PrivateKey - if ks != nil { - pks, ok := ks.(*PrivateKeySet) - if !ok { - return errors.New("unable to cast to PrivateKeySet") - } - keys = pks.Keys() - } - - keys = append([]*PrivateKey{k}, keys...) - if l := len(keys); l > keep { - keys = keys[0:keep] - } - - nks := PrivateKeySet{ - keys: keys, - ActiveKeyID: k.ID(), - expiresAt: exp, - } - - return repo.Set(KeySet(&nks)) -} diff --git a/deps/github.com/coreos/go-oidc/key/sync.go b/deps/github.com/coreos/go-oidc/key/sync.go deleted file mode 100644 index b887f7b5a..000000000 --- a/deps/github.com/coreos/go-oidc/key/sync.go +++ /dev/null @@ -1,91 +0,0 @@ -package key - -import ( - "errors" - "log" - "time" - - "github.com/jonboulle/clockwork" - - "github.com/coreos/pkg/timeutil" -) - -func NewKeySetSyncer(r ReadableKeySetRepo, w WritableKeySetRepo) *KeySetSyncer { - return &KeySetSyncer{ - readable: r, - writable: w, - clock: clockwork.NewRealClock(), - } -} - -type KeySetSyncer struct { - readable ReadableKeySetRepo - writable WritableKeySetRepo - clock clockwork.Clock -} - -func (s *KeySetSyncer) Run() chan struct{} { - stop := make(chan struct{}) - go func() { - var failing bool - var next time.Duration - for { - exp, err := syncKeySet(s.readable, s.writable, s.clock) - if err != nil || exp == 0 { - if !failing { - failing = true - next = time.Second - } else { - next = timeutil.ExpBackoff(next, time.Minute) - } - if exp == 0 { - log.Printf("Synced to already expired key set, retrying in %v: %v", next, err) - - } else { - log.Printf("Failed syncing key set, retrying in %v: %v", next, err) - } - } else { - failing = false - next = exp / 2 - } - - select { - case <-s.clock.After(next): - continue - case <-stop: - return - } - } - }() - - return stop -} - -func Sync(r ReadableKeySetRepo, w WritableKeySetRepo) (time.Duration, error) { - return syncKeySet(r, w, clockwork.NewRealClock()) -} - -// syncKeySet copies the keyset from r to the KeySet at w and returns the duration in which the KeySet will expire. -// If keyset has already expired, returns a zero duration. -func syncKeySet(r ReadableKeySetRepo, w WritableKeySetRepo, clock clockwork.Clock) (exp time.Duration, err error) { - var ks KeySet - ks, err = r.Get() - if err != nil { - return - } - - if ks == nil { - err = errors.New("no source KeySet") - return - } - - if err = w.Set(ks); err != nil { - return - } - - now := clock.Now() - if ks.ExpiresAt().After(now) { - exp = ks.ExpiresAt().Sub(now) - } - return -} diff --git a/deps/github.com/coreos/go-oidc/oauth2/doc.go b/deps/github.com/coreos/go-oidc/oauth2/doc.go deleted file mode 100644 index 52eb3085e..000000000 --- a/deps/github.com/coreos/go-oidc/oauth2/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package oauth2 is DEPRECATED. Use golang.org/x/oauth instead. -package oauth2 diff --git a/deps/github.com/coreos/go-oidc/oauth2/error.go b/deps/github.com/coreos/go-oidc/oauth2/error.go deleted file mode 100644 index 50d890949..000000000 --- a/deps/github.com/coreos/go-oidc/oauth2/error.go +++ /dev/null @@ -1,29 +0,0 @@ -package oauth2 - -const ( - ErrorAccessDenied = "access_denied" - ErrorInvalidClient = "invalid_client" - ErrorInvalidGrant = "invalid_grant" - ErrorInvalidRequest = "invalid_request" - ErrorServerError = "server_error" - ErrorUnauthorizedClient = "unauthorized_client" - ErrorUnsupportedGrantType = "unsupported_grant_type" - ErrorUnsupportedResponseType = "unsupported_response_type" -) - -type Error struct { - Type string `json:"error"` - Description string `json:"error_description,omitempty"` - State string `json:"state,omitempty"` -} - -func (e *Error) Error() string { - if e.Description != "" { - return e.Type + ": " + e.Description - } - return e.Type -} - -func NewError(typ string) *Error { - return &Error{Type: typ} -} diff --git a/deps/github.com/coreos/go-oidc/oauth2/oauth2.go b/deps/github.com/coreos/go-oidc/oauth2/oauth2.go deleted file mode 100644 index 72d1d6715..000000000 --- a/deps/github.com/coreos/go-oidc/oauth2/oauth2.go +++ /dev/null @@ -1,416 +0,0 @@ -package oauth2 - -import ( - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "mime" - "net/http" - "net/url" - "sort" - "strconv" - "strings" - - phttp "github.com/coreos/go-oidc/http" -) - -// ResponseTypesEqual compares two response_type values. If either -// contains a space, it is treated as an unordered list. For example, -// comparing "code id_token" and "id_token code" would evaluate to true. -func ResponseTypesEqual(r1, r2 string) bool { - if !strings.Contains(r1, " ") || !strings.Contains(r2, " ") { - // fast route, no split needed - return r1 == r2 - } - - // split, sort, and compare - r1Fields := strings.Fields(r1) - r2Fields := strings.Fields(r2) - if len(r1Fields) != len(r2Fields) { - return false - } - sort.Strings(r1Fields) - sort.Strings(r2Fields) - for i, r1Field := range r1Fields { - if r1Field != r2Fields[i] { - return false - } - } - return true -} - -const ( - // OAuth2.0 response types registered by OIDC. - // - // See: https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#RegistryContents - ResponseTypeCode = "code" - ResponseTypeCodeIDToken = "code id_token" - ResponseTypeCodeIDTokenToken = "code id_token token" - ResponseTypeIDToken = "id_token" - ResponseTypeIDTokenToken = "id_token token" - ResponseTypeToken = "token" - ResponseTypeNone = "none" -) - -const ( - GrantTypeAuthCode = "authorization_code" - GrantTypeClientCreds = "client_credentials" - GrantTypeUserCreds = "password" - GrantTypeImplicit = "implicit" - GrantTypeRefreshToken = "refresh_token" - - AuthMethodClientSecretPost = "client_secret_post" - AuthMethodClientSecretBasic = "client_secret_basic" - AuthMethodClientSecretJWT = "client_secret_jwt" - AuthMethodPrivateKeyJWT = "private_key_jwt" -) - -type Config struct { - Credentials ClientCredentials - Scope []string - RedirectURL string - AuthURL string - TokenURL string - - // Must be one of the AuthMethodXXX methods above. Right now, only - // AuthMethodClientSecretPost and AuthMethodClientSecretBasic are supported. - AuthMethod string -} - -type Client struct { - hc phttp.Client - creds ClientCredentials - scope []string - authURL *url.URL - redirectURL *url.URL - tokenURL *url.URL - authMethod string -} - -type ClientCredentials struct { - ID string - Secret string -} - -func NewClient(hc phttp.Client, cfg Config) (c *Client, err error) { - if len(cfg.Credentials.ID) == 0 { - err = errors.New("missing client id") - return - } - - if len(cfg.Credentials.Secret) == 0 { - err = errors.New("missing client secret") - return - } - - if cfg.AuthMethod == "" { - cfg.AuthMethod = AuthMethodClientSecretBasic - } else if cfg.AuthMethod != AuthMethodClientSecretPost && cfg.AuthMethod != AuthMethodClientSecretBasic { - err = fmt.Errorf("auth method %q is not supported", cfg.AuthMethod) - return - } - - au, err := phttp.ParseNonEmptyURL(cfg.AuthURL) - if err != nil { - return - } - - tu, err := phttp.ParseNonEmptyURL(cfg.TokenURL) - if err != nil { - return - } - - // Allow empty redirect URL in the case where the client - // only needs to verify a given token. - ru, err := url.Parse(cfg.RedirectURL) - if err != nil { - return - } - - c = &Client{ - creds: cfg.Credentials, - scope: cfg.Scope, - redirectURL: ru, - authURL: au, - tokenURL: tu, - hc: hc, - authMethod: cfg.AuthMethod, - } - - return -} - -// Return the embedded HTTP client -func (c *Client) HttpClient() phttp.Client { - return c.hc -} - -// Generate the url for initial redirect to oauth provider. -func (c *Client) AuthCodeURL(state, accessType, prompt string) string { - v := c.commonURLValues() - v.Set("state", state) - if strings.ToLower(accessType) == "offline" { - v.Set("access_type", "offline") - } - - if prompt != "" { - v.Set("prompt", prompt) - } - v.Set("response_type", "code") - - q := v.Encode() - u := *c.authURL - if u.RawQuery == "" { - u.RawQuery = q - } else { - u.RawQuery += "&" + q - } - return u.String() -} - -func (c *Client) commonURLValues() url.Values { - return url.Values{ - "redirect_uri": {c.redirectURL.String()}, - "scope": {strings.Join(c.scope, " ")}, - "client_id": {c.creds.ID}, - } -} - -func (c *Client) newAuthenticatedRequest(urlToken string, values url.Values) (*http.Request, error) { - var req *http.Request - var err error - switch c.authMethod { - case AuthMethodClientSecretPost: - values.Set("client_secret", c.creds.Secret) - req, err = http.NewRequest("POST", urlToken, strings.NewReader(values.Encode())) - if err != nil { - return nil, err - } - case AuthMethodClientSecretBasic: - req, err = http.NewRequest("POST", urlToken, strings.NewReader(values.Encode())) - if err != nil { - return nil, err - } - encodedID := url.QueryEscape(c.creds.ID) - encodedSecret := url.QueryEscape(c.creds.Secret) - req.SetBasicAuth(encodedID, encodedSecret) - default: - panic("misconfigured client: auth method not supported") - } - - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - return req, nil - -} - -// ClientCredsToken posts the client id and secret to obtain a token scoped to the OAuth2 client via the "client_credentials" grant type. -// May not be supported by all OAuth2 servers. -func (c *Client) ClientCredsToken(scope []string) (result TokenResponse, err error) { - v := url.Values{ - "scope": {strings.Join(scope, " ")}, - "grant_type": {GrantTypeClientCreds}, - } - - req, err := c.newAuthenticatedRequest(c.tokenURL.String(), v) - if err != nil { - return - } - - resp, err := c.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - return parseTokenResponse(resp) -} - -// UserCredsToken posts the username and password to obtain a token scoped to the OAuth2 client via the "password" grant_type -// May not be supported by all OAuth2 servers. -func (c *Client) UserCredsToken(username, password string) (result TokenResponse, err error) { - v := url.Values{ - "scope": {strings.Join(c.scope, " ")}, - "grant_type": {GrantTypeUserCreds}, - "username": {username}, - "password": {password}, - } - - req, err := c.newAuthenticatedRequest(c.tokenURL.String(), v) - if err != nil { - return - } - - resp, err := c.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - return parseTokenResponse(resp) -} - -// RequestToken requests a token from the Token Endpoint with the specified grantType. -// If 'grantType' == GrantTypeAuthCode, then 'value' should be the authorization code. -// If 'grantType' == GrantTypeRefreshToken, then 'value' should be the refresh token. -func (c *Client) RequestToken(grantType, value string) (result TokenResponse, err error) { - v := c.commonURLValues() - - v.Set("grant_type", grantType) - v.Set("client_secret", c.creds.Secret) - switch grantType { - case GrantTypeAuthCode: - v.Set("code", value) - case GrantTypeRefreshToken: - v.Set("refresh_token", value) - default: - err = fmt.Errorf("unsupported grant_type: %v", grantType) - return - } - - req, err := c.newAuthenticatedRequest(c.tokenURL.String(), v) - if err != nil { - return - } - - resp, err := c.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - return parseTokenResponse(resp) -} - -func parseTokenResponse(resp *http.Response) (result TokenResponse, err error) { - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return - } - badStatusCode := resp.StatusCode < 200 || resp.StatusCode > 299 - - contentType, _, err := mime.ParseMediaType(resp.Header.Get("Content-Type")) - if err != nil { - return - } - - result = TokenResponse{ - RawBody: body, - } - - newError := func(typ, desc, state string) error { - if typ == "" { - return fmt.Errorf("unrecognized error %s", body) - } - return &Error{typ, desc, state} - } - - if contentType == "application/x-www-form-urlencoded" || contentType == "text/plain" { - var vals url.Values - vals, err = url.ParseQuery(string(body)) - if err != nil { - return - } - if error := vals.Get("error"); error != "" || badStatusCode { - err = newError(error, vals.Get("error_description"), vals.Get("state")) - return - } - e := vals.Get("expires_in") - if e == "" { - e = vals.Get("expires") - } - if e != "" { - result.Expires, err = strconv.Atoi(e) - if err != nil { - return - } - } - result.AccessToken = vals.Get("access_token") - result.TokenType = vals.Get("token_type") - result.IDToken = vals.Get("id_token") - result.RefreshToken = vals.Get("refresh_token") - result.Scope = vals.Get("scope") - } else { - var r struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - IDToken string `json:"id_token"` - RefreshToken string `json:"refresh_token"` - Scope string `json:"scope"` - State string `json:"state"` - ExpiresIn json.Number `json:"expires_in"` // Azure AD returns string - Expires int `json:"expires"` - Error string `json:"error"` - Desc string `json:"error_description"` - } - if err = json.Unmarshal(body, &r); err != nil { - return - } - if r.Error != "" || badStatusCode { - err = newError(r.Error, r.Desc, r.State) - return - } - result.AccessToken = r.AccessToken - result.TokenType = r.TokenType - result.IDToken = r.IDToken - result.RefreshToken = r.RefreshToken - result.Scope = r.Scope - if expiresIn, err := r.ExpiresIn.Int64(); err != nil { - result.Expires = r.Expires - } else { - result.Expires = int(expiresIn) - } - } - return -} - -type TokenResponse struct { - AccessToken string - TokenType string - Expires int - IDToken string - RefreshToken string // OPTIONAL. - Scope string // OPTIONAL, if identical to the scope requested by the client, otherwise, REQUIRED. - RawBody []byte // In case callers need some other non-standard info from the token response -} - -type AuthCodeRequest struct { - ResponseType string - ClientID string - RedirectURL *url.URL - Scope []string - State string -} - -func ParseAuthCodeRequest(q url.Values) (AuthCodeRequest, error) { - acr := AuthCodeRequest{ - ResponseType: q.Get("response_type"), - ClientID: q.Get("client_id"), - State: q.Get("state"), - Scope: make([]string, 0), - } - - qs := strings.TrimSpace(q.Get("scope")) - if qs != "" { - acr.Scope = strings.Split(qs, " ") - } - - err := func() error { - if acr.ClientID == "" { - return NewError(ErrorInvalidRequest) - } - - redirectURL := q.Get("redirect_uri") - if redirectURL != "" { - ru, err := url.Parse(redirectURL) - if err != nil { - return NewError(ErrorInvalidRequest) - } - acr.RedirectURL = ru - } - - return nil - }() - - return acr, err -} diff --git a/deps/github.com/coreos/go-oidc/oidc/client.go b/deps/github.com/coreos/go-oidc/oidc/client.go deleted file mode 100644 index 7a3cb40f6..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/client.go +++ /dev/null @@ -1,846 +0,0 @@ -package oidc - -import ( - "encoding/json" - "errors" - "fmt" - "net/http" - "net/mail" - "net/url" - "sync" - "time" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" - "github.com/coreos/go-oidc/oauth2" -) - -const ( - // amount of time that must pass after the last key sync - // completes before another attempt may begin - keySyncWindow = 5 * time.Second -) - -var ( - DefaultScope = []string{"openid", "email", "profile"} - - supportedAuthMethods = map[string]struct{}{ - oauth2.AuthMethodClientSecretBasic: struct{}{}, - oauth2.AuthMethodClientSecretPost: struct{}{}, - } -) - -type ClientCredentials oauth2.ClientCredentials - -type ClientIdentity struct { - Credentials ClientCredentials - Metadata ClientMetadata -} - -type JWAOptions struct { - // SigningAlg specifies an JWA alg for signing JWTs. - // - // Specifying this field implies different actions depending on the context. It may - // require objects be serialized and signed as a JWT instead of plain JSON, or - // require an existing JWT object use the specified alg. - // - // See: http://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata - SigningAlg string - // EncryptionAlg, if provided, specifies that the returned or sent object be stored - // (or nested) within a JWT object and encrypted with the provided JWA alg. - EncryptionAlg string - // EncryptionEnc specifies the JWA enc algorithm to use with EncryptionAlg. If - // EncryptionAlg is provided and EncryptionEnc is omitted, this field defaults - // to A128CBC-HS256. - // - // If EncryptionEnc is provided EncryptionAlg must also be specified. - EncryptionEnc string -} - -func (opt JWAOptions) valid() error { - if opt.EncryptionEnc != "" && opt.EncryptionAlg == "" { - return errors.New("encryption encoding provided with no encryption algorithm") - } - return nil -} - -func (opt JWAOptions) defaults() JWAOptions { - if opt.EncryptionAlg != "" && opt.EncryptionEnc == "" { - opt.EncryptionEnc = jose.EncA128CBCHS256 - } - return opt -} - -var ( - // Ensure ClientMetadata satisfies these interfaces. - _ json.Marshaler = &ClientMetadata{} - _ json.Unmarshaler = &ClientMetadata{} -) - -// ClientMetadata holds metadata that the authorization server associates -// with a client identifier. The fields range from human-facing display -// strings such as client name, to items that impact the security of the -// protocol, such as the list of valid redirect URIs. -// -// See http://openid.net/specs/openid-connect-registration-1_0.html#ClientMetadata -// -// TODO: support language specific claim representations -// http://openid.net/specs/openid-connect-registration-1_0.html#LanguagesAndScripts -type ClientMetadata struct { - RedirectURIs []url.URL // Required - - // A list of OAuth 2.0 "response_type" values that the client wishes to restrict - // itself to. Either "code", "token", or another registered extension. - // - // If omitted, only "code" will be used. - ResponseTypes []string - // A list of OAuth 2.0 grant types the client wishes to restrict itself to. - // The grant type values used by OIDC are "authorization_code", "implicit", - // and "refresh_token". - // - // If ommitted, only "authorization_code" will be used. - GrantTypes []string - // "native" or "web". If omitted, "web". - ApplicationType string - - // List of email addresses. - Contacts []mail.Address - // Name of client to be presented to the end-user. - ClientName string - // URL that references a logo for the Client application. - LogoURI *url.URL - // URL of the home page of the Client. - ClientURI *url.URL - // Profile data policies and terms of use to be provided to the end user. - PolicyURI *url.URL - TermsOfServiceURI *url.URL - - // URL to or the value of the client's JSON Web Key Set document. - JWKSURI *url.URL - JWKS *jose.JWKSet - - // URL referencing a flie with a single JSON array of redirect URIs. - SectorIdentifierURI *url.URL - - SubjectType string - - // Options to restrict the JWS alg and enc values used for server responses and requests. - IDTokenResponseOptions JWAOptions - UserInfoResponseOptions JWAOptions - RequestObjectOptions JWAOptions - - // Client requested authorization method and signing options for the token endpoint. - // - // Defaults to "client_secret_basic" - TokenEndpointAuthMethod string - TokenEndpointAuthSigningAlg string - - // DefaultMaxAge specifies the maximum amount of time in seconds before an authorized - // user must reauthroize. - // - // If 0, no limitation is placed on the maximum. - DefaultMaxAge int64 - // RequireAuthTime specifies if the auth_time claim in the ID token is required. - RequireAuthTime bool - - // Default Authentication Context Class Reference values for authentication requests. - DefaultACRValues []string - - // URI that a third party can use to initiate a login by the relaying party. - // - // See: http://openid.net/specs/openid-connect-core-1_0.html#ThirdPartyInitiatedLogin - InitiateLoginURI *url.URL - // Pre-registered request_uri values that may be cached by the server. - RequestURIs []url.URL -} - -// Defaults returns a shallow copy of ClientMetadata with default -// values replacing omitted fields. -func (m ClientMetadata) Defaults() ClientMetadata { - if len(m.ResponseTypes) == 0 { - m.ResponseTypes = []string{oauth2.ResponseTypeCode} - } - if len(m.GrantTypes) == 0 { - m.GrantTypes = []string{oauth2.GrantTypeAuthCode} - } - if m.ApplicationType == "" { - m.ApplicationType = "web" - } - if m.TokenEndpointAuthMethod == "" { - m.TokenEndpointAuthMethod = oauth2.AuthMethodClientSecretBasic - } - m.IDTokenResponseOptions = m.IDTokenResponseOptions.defaults() - m.UserInfoResponseOptions = m.UserInfoResponseOptions.defaults() - m.RequestObjectOptions = m.RequestObjectOptions.defaults() - return m -} - -func (m *ClientMetadata) MarshalJSON() ([]byte, error) { - e := m.toEncodableStruct() - return json.Marshal(&e) -} - -func (m *ClientMetadata) UnmarshalJSON(data []byte) error { - var e encodableClientMetadata - if err := json.Unmarshal(data, &e); err != nil { - return err - } - meta, err := e.toStruct() - if err != nil { - return err - } - if err := meta.Valid(); err != nil { - return err - } - *m = meta - return nil -} - -type encodableClientMetadata struct { - RedirectURIs []string `json:"redirect_uris"` // Required - ResponseTypes []string `json:"response_types,omitempty"` - GrantTypes []string `json:"grant_types,omitempty"` - ApplicationType string `json:"application_type,omitempty"` - Contacts []string `json:"contacts,omitempty"` - ClientName string `json:"client_name,omitempty"` - LogoURI string `json:"logo_uri,omitempty"` - ClientURI string `json:"client_uri,omitempty"` - PolicyURI string `json:"policy_uri,omitempty"` - TermsOfServiceURI string `json:"tos_uri,omitempty"` - JWKSURI string `json:"jwks_uri,omitempty"` - JWKS *jose.JWKSet `json:"jwks,omitempty"` - SectorIdentifierURI string `json:"sector_identifier_uri,omitempty"` - SubjectType string `json:"subject_type,omitempty"` - IDTokenSignedResponseAlg string `json:"id_token_signed_response_alg,omitempty"` - IDTokenEncryptedResponseAlg string `json:"id_token_encrypted_response_alg,omitempty"` - IDTokenEncryptedResponseEnc string `json:"id_token_encrypted_response_enc,omitempty"` - UserInfoSignedResponseAlg string `json:"userinfo_signed_response_alg,omitempty"` - UserInfoEncryptedResponseAlg string `json:"userinfo_encrypted_response_alg,omitempty"` - UserInfoEncryptedResponseEnc string `json:"userinfo_encrypted_response_enc,omitempty"` - RequestObjectSigningAlg string `json:"request_object_signing_alg,omitempty"` - RequestObjectEncryptionAlg string `json:"request_object_encryption_alg,omitempty"` - RequestObjectEncryptionEnc string `json:"request_object_encryption_enc,omitempty"` - TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"` - TokenEndpointAuthSigningAlg string `json:"token_endpoint_auth_signing_alg,omitempty"` - DefaultMaxAge int64 `json:"default_max_age,omitempty"` - RequireAuthTime bool `json:"require_auth_time,omitempty"` - DefaultACRValues []string `json:"default_acr_values,omitempty"` - InitiateLoginURI string `json:"initiate_login_uri,omitempty"` - RequestURIs []string `json:"request_uris,omitempty"` -} - -func (c *encodableClientMetadata) toStruct() (ClientMetadata, error) { - p := stickyErrParser{} - m := ClientMetadata{ - RedirectURIs: p.parseURIs(c.RedirectURIs, "redirect_uris"), - ResponseTypes: c.ResponseTypes, - GrantTypes: c.GrantTypes, - ApplicationType: c.ApplicationType, - Contacts: p.parseEmails(c.Contacts, "contacts"), - ClientName: c.ClientName, - LogoURI: p.parseURI(c.LogoURI, "logo_uri"), - ClientURI: p.parseURI(c.ClientURI, "client_uri"), - PolicyURI: p.parseURI(c.PolicyURI, "policy_uri"), - TermsOfServiceURI: p.parseURI(c.TermsOfServiceURI, "tos_uri"), - JWKSURI: p.parseURI(c.JWKSURI, "jwks_uri"), - JWKS: c.JWKS, - SectorIdentifierURI: p.parseURI(c.SectorIdentifierURI, "sector_identifier_uri"), - SubjectType: c.SubjectType, - TokenEndpointAuthMethod: c.TokenEndpointAuthMethod, - TokenEndpointAuthSigningAlg: c.TokenEndpointAuthSigningAlg, - DefaultMaxAge: c.DefaultMaxAge, - RequireAuthTime: c.RequireAuthTime, - DefaultACRValues: c.DefaultACRValues, - InitiateLoginURI: p.parseURI(c.InitiateLoginURI, "initiate_login_uri"), - RequestURIs: p.parseURIs(c.RequestURIs, "request_uris"), - IDTokenResponseOptions: JWAOptions{ - c.IDTokenSignedResponseAlg, - c.IDTokenEncryptedResponseAlg, - c.IDTokenEncryptedResponseEnc, - }, - UserInfoResponseOptions: JWAOptions{ - c.UserInfoSignedResponseAlg, - c.UserInfoEncryptedResponseAlg, - c.UserInfoEncryptedResponseEnc, - }, - RequestObjectOptions: JWAOptions{ - c.RequestObjectSigningAlg, - c.RequestObjectEncryptionAlg, - c.RequestObjectEncryptionEnc, - }, - } - if p.firstErr != nil { - return ClientMetadata{}, p.firstErr - } - return m, nil -} - -// stickyErrParser parses URIs and email addresses. Once it encounters -// a parse error, subsequent calls become no-op. -type stickyErrParser struct { - firstErr error -} - -func (p *stickyErrParser) parseURI(s, field string) *url.URL { - if p.firstErr != nil || s == "" { - return nil - } - u, err := url.Parse(s) - if err == nil { - if u.Host == "" { - err = errors.New("no host in URI") - } else if u.Scheme != "http" && u.Scheme != "https" { - err = errors.New("invalid URI scheme") - } - } - if err != nil { - p.firstErr = fmt.Errorf("failed to parse %s: %v", field, err) - return nil - } - return u -} - -func (p *stickyErrParser) parseURIs(s []string, field string) []url.URL { - if p.firstErr != nil || len(s) == 0 { - return nil - } - uris := make([]url.URL, len(s)) - for i, val := range s { - if val == "" { - p.firstErr = fmt.Errorf("invalid URI in field %s", field) - return nil - } - if u := p.parseURI(val, field); u != nil { - uris[i] = *u - } - } - return uris -} - -func (p *stickyErrParser) parseEmails(s []string, field string) []mail.Address { - if p.firstErr != nil || len(s) == 0 { - return nil - } - addrs := make([]mail.Address, len(s)) - for i, addr := range s { - if addr == "" { - p.firstErr = fmt.Errorf("invalid email in field %s", field) - return nil - } - a, err := mail.ParseAddress(addr) - if err != nil { - p.firstErr = fmt.Errorf("invalid email in field %s: %v", field, err) - return nil - } - addrs[i] = *a - } - return addrs -} - -func (m *ClientMetadata) toEncodableStruct() encodableClientMetadata { - return encodableClientMetadata{ - RedirectURIs: urisToStrings(m.RedirectURIs), - ResponseTypes: m.ResponseTypes, - GrantTypes: m.GrantTypes, - ApplicationType: m.ApplicationType, - Contacts: emailsToStrings(m.Contacts), - ClientName: m.ClientName, - LogoURI: uriToString(m.LogoURI), - ClientURI: uriToString(m.ClientURI), - PolicyURI: uriToString(m.PolicyURI), - TermsOfServiceURI: uriToString(m.TermsOfServiceURI), - JWKSURI: uriToString(m.JWKSURI), - JWKS: m.JWKS, - SectorIdentifierURI: uriToString(m.SectorIdentifierURI), - SubjectType: m.SubjectType, - IDTokenSignedResponseAlg: m.IDTokenResponseOptions.SigningAlg, - IDTokenEncryptedResponseAlg: m.IDTokenResponseOptions.EncryptionAlg, - IDTokenEncryptedResponseEnc: m.IDTokenResponseOptions.EncryptionEnc, - UserInfoSignedResponseAlg: m.UserInfoResponseOptions.SigningAlg, - UserInfoEncryptedResponseAlg: m.UserInfoResponseOptions.EncryptionAlg, - UserInfoEncryptedResponseEnc: m.UserInfoResponseOptions.EncryptionEnc, - RequestObjectSigningAlg: m.RequestObjectOptions.SigningAlg, - RequestObjectEncryptionAlg: m.RequestObjectOptions.EncryptionAlg, - RequestObjectEncryptionEnc: m.RequestObjectOptions.EncryptionEnc, - TokenEndpointAuthMethod: m.TokenEndpointAuthMethod, - TokenEndpointAuthSigningAlg: m.TokenEndpointAuthSigningAlg, - DefaultMaxAge: m.DefaultMaxAge, - RequireAuthTime: m.RequireAuthTime, - DefaultACRValues: m.DefaultACRValues, - InitiateLoginURI: uriToString(m.InitiateLoginURI), - RequestURIs: urisToStrings(m.RequestURIs), - } -} - -func uriToString(u *url.URL) string { - if u == nil { - return "" - } - return u.String() -} - -func urisToStrings(urls []url.URL) []string { - if len(urls) == 0 { - return nil - } - sli := make([]string, len(urls)) - for i, u := range urls { - sli[i] = u.String() - } - return sli -} - -func emailsToStrings(addrs []mail.Address) []string { - if len(addrs) == 0 { - return nil - } - sli := make([]string, len(addrs)) - for i, addr := range addrs { - sli[i] = addr.String() - } - return sli -} - -// Valid determines if a ClientMetadata conforms with the OIDC specification. -// -// Valid is called by UnmarshalJSON. -// -// NOTE(ericchiang): For development purposes Valid does not mandate 'https' for -// URLs fields where the OIDC spec requires it. This may change in future releases -// of this package. See: https://github.com/coreos/go-oidc/issues/34 -func (m *ClientMetadata) Valid() error { - if len(m.RedirectURIs) == 0 { - return errors.New("zero redirect URLs") - } - - validURI := func(u *url.URL, fieldName string) error { - if u.Host == "" { - return fmt.Errorf("no host for uri field %s", fieldName) - } - if u.Scheme != "http" && u.Scheme != "https" { - return fmt.Errorf("uri field %s scheme is not http or https", fieldName) - } - return nil - } - - uris := []struct { - val *url.URL - name string - }{ - {m.LogoURI, "logo_uri"}, - {m.ClientURI, "client_uri"}, - {m.PolicyURI, "policy_uri"}, - {m.TermsOfServiceURI, "tos_uri"}, - {m.JWKSURI, "jwks_uri"}, - {m.SectorIdentifierURI, "sector_identifier_uri"}, - {m.InitiateLoginURI, "initiate_login_uri"}, - } - - for _, uri := range uris { - if uri.val == nil { - continue - } - if err := validURI(uri.val, uri.name); err != nil { - return err - } - } - - uriLists := []struct { - vals []url.URL - name string - }{ - {m.RedirectURIs, "redirect_uris"}, - {m.RequestURIs, "request_uris"}, - } - for _, list := range uriLists { - for _, uri := range list.vals { - if err := validURI(&uri, list.name); err != nil { - return err - } - } - } - - options := []struct { - option JWAOptions - name string - }{ - {m.IDTokenResponseOptions, "id_token response"}, - {m.UserInfoResponseOptions, "userinfo response"}, - {m.RequestObjectOptions, "request_object"}, - } - for _, option := range options { - if err := option.option.valid(); err != nil { - return fmt.Errorf("invalid JWA values for %s: %v", option.name, err) - } - } - return nil -} - -type ClientRegistrationResponse struct { - ClientID string // Required - ClientSecret string - RegistrationAccessToken string - RegistrationClientURI string - // If IsZero is true, unspecified. - ClientIDIssuedAt time.Time - // Time at which the client_secret will expire. - // If IsZero is true, it will not expire. - ClientSecretExpiresAt time.Time - - ClientMetadata -} - -type encodableClientRegistrationResponse struct { - ClientID string `json:"client_id"` // Required - ClientSecret string `json:"client_secret,omitempty"` - RegistrationAccessToken string `json:"registration_access_token,omitempty"` - RegistrationClientURI string `json:"registration_client_uri,omitempty"` - ClientIDIssuedAt int64 `json:"client_id_issued_at,omitempty"` - // Time at which the client_secret will expire, in seconds since the epoch. - // If 0 it will not expire. - ClientSecretExpiresAt int64 `json:"client_secret_expires_at"` // Required - - encodableClientMetadata -} - -func unixToSec(t time.Time) int64 { - if t.IsZero() { - return 0 - } - return t.Unix() -} - -func (c *ClientRegistrationResponse) MarshalJSON() ([]byte, error) { - e := encodableClientRegistrationResponse{ - ClientID: c.ClientID, - ClientSecret: c.ClientSecret, - RegistrationAccessToken: c.RegistrationAccessToken, - RegistrationClientURI: c.RegistrationClientURI, - ClientIDIssuedAt: unixToSec(c.ClientIDIssuedAt), - ClientSecretExpiresAt: unixToSec(c.ClientSecretExpiresAt), - encodableClientMetadata: c.ClientMetadata.toEncodableStruct(), - } - return json.Marshal(&e) -} - -func secToUnix(sec int64) time.Time { - if sec == 0 { - return time.Time{} - } - return time.Unix(sec, 0) -} - -func (c *ClientRegistrationResponse) UnmarshalJSON(data []byte) error { - var e encodableClientRegistrationResponse - if err := json.Unmarshal(data, &e); err != nil { - return err - } - if e.ClientID == "" { - return errors.New("no client_id in client registration response") - } - metadata, err := e.encodableClientMetadata.toStruct() - if err != nil { - return err - } - *c = ClientRegistrationResponse{ - ClientID: e.ClientID, - ClientSecret: e.ClientSecret, - RegistrationAccessToken: e.RegistrationAccessToken, - RegistrationClientURI: e.RegistrationClientURI, - ClientIDIssuedAt: secToUnix(e.ClientIDIssuedAt), - ClientSecretExpiresAt: secToUnix(e.ClientSecretExpiresAt), - ClientMetadata: metadata, - } - return nil -} - -type ClientConfig struct { - HTTPClient phttp.Client - Credentials ClientCredentials - Scope []string - RedirectURL string - ProviderConfig ProviderConfig - KeySet key.PublicKeySet -} - -func NewClient(cfg ClientConfig) (*Client, error) { - // Allow empty redirect URL in the case where the client - // only needs to verify a given token. - ru, err := url.Parse(cfg.RedirectURL) - if err != nil { - return nil, fmt.Errorf("invalid redirect URL: %v", err) - } - - c := Client{ - credentials: cfg.Credentials, - httpClient: cfg.HTTPClient, - scope: cfg.Scope, - redirectURL: ru.String(), - providerConfig: newProviderConfigRepo(cfg.ProviderConfig), - keySet: cfg.KeySet, - } - - if c.httpClient == nil { - c.httpClient = http.DefaultClient - } - - if c.scope == nil { - c.scope = make([]string, len(DefaultScope)) - copy(c.scope, DefaultScope) - } - - return &c, nil -} - -type Client struct { - httpClient phttp.Client - providerConfig *providerConfigRepo - credentials ClientCredentials - redirectURL string - scope []string - keySet key.PublicKeySet - providerSyncer *ProviderConfigSyncer - - keySetSyncMutex sync.RWMutex - lastKeySetSync time.Time -} - -func (c *Client) Healthy() error { - now := time.Now().UTC() - - cfg := c.providerConfig.Get() - - if cfg.Empty() { - return errors.New("oidc client provider config empty") - } - - if !cfg.ExpiresAt.IsZero() && cfg.ExpiresAt.Before(now) { - return errors.New("oidc client provider config expired") - } - - return nil -} - -func (c *Client) OAuthClient() (*oauth2.Client, error) { - cfg := c.providerConfig.Get() - authMethod, err := chooseAuthMethod(cfg) - if err != nil { - return nil, err - } - - ocfg := oauth2.Config{ - Credentials: oauth2.ClientCredentials(c.credentials), - RedirectURL: c.redirectURL, - AuthURL: cfg.AuthEndpoint.String(), - TokenURL: cfg.TokenEndpoint.String(), - Scope: c.scope, - AuthMethod: authMethod, - } - - return oauth2.NewClient(c.httpClient, ocfg) -} - -func chooseAuthMethod(cfg ProviderConfig) (string, error) { - if len(cfg.TokenEndpointAuthMethodsSupported) == 0 { - return oauth2.AuthMethodClientSecretBasic, nil - } - - for _, authMethod := range cfg.TokenEndpointAuthMethodsSupported { - if _, ok := supportedAuthMethods[authMethod]; ok { - return authMethod, nil - } - } - - return "", errors.New("no supported auth methods") -} - -// SyncProviderConfig starts the provider config syncer -func (c *Client) SyncProviderConfig(discoveryURL string) chan struct{} { - r := NewHTTPProviderConfigGetter(c.httpClient, discoveryURL) - s := NewProviderConfigSyncer(r, c.providerConfig) - stop := s.Run() - s.WaitUntilInitialSync() - return stop -} - -func (c *Client) maybeSyncKeys() error { - tooSoon := func() bool { - return time.Now().UTC().Before(c.lastKeySetSync.Add(keySyncWindow)) - } - - // ignore request to sync keys if a sync operation has been - // attempted too recently - if tooSoon() { - return nil - } - - c.keySetSyncMutex.Lock() - defer c.keySetSyncMutex.Unlock() - - // check again, as another goroutine may have been holding - // the lock while updating the keys - if tooSoon() { - return nil - } - - cfg := c.providerConfig.Get() - r := NewRemotePublicKeyRepo(c.httpClient, cfg.KeysEndpoint.String()) - w := &clientKeyRepo{client: c} - _, err := key.Sync(r, w) - c.lastKeySetSync = time.Now().UTC() - - return err -} - -type clientKeyRepo struct { - client *Client -} - -func (r *clientKeyRepo) Set(ks key.KeySet) error { - pks, ok := ks.(*key.PublicKeySet) - if !ok { - return errors.New("unable to cast to PublicKey") - } - r.client.keySet = *pks - return nil -} - -func (c *Client) ClientCredsToken(scope []string) (jose.JWT, error) { - cfg := c.providerConfig.Get() - - if !cfg.SupportsGrantType(oauth2.GrantTypeClientCreds) { - return jose.JWT{}, fmt.Errorf("%v grant type is not supported", oauth2.GrantTypeClientCreds) - } - - oac, err := c.OAuthClient() - if err != nil { - return jose.JWT{}, err - } - - t, err := oac.ClientCredsToken(scope) - if err != nil { - return jose.JWT{}, err - } - - jwt, err := jose.ParseJWT(t.IDToken) - if err != nil { - return jose.JWT{}, err - } - - return jwt, c.VerifyJWT(jwt) -} - -// ExchangeAuthCode exchanges an OAuth2 auth code for an OIDC JWT ID token. -func (c *Client) ExchangeAuthCode(code string) (jose.JWT, error) { - oac, err := c.OAuthClient() - if err != nil { - return jose.JWT{}, err - } - - t, err := oac.RequestToken(oauth2.GrantTypeAuthCode, code) - if err != nil { - return jose.JWT{}, err - } - - jwt, err := jose.ParseJWT(t.IDToken) - if err != nil { - return jose.JWT{}, err - } - - return jwt, c.VerifyJWT(jwt) -} - -// RefreshToken uses a refresh token to exchange for a new OIDC JWT ID Token. -func (c *Client) RefreshToken(refreshToken string) (jose.JWT, error) { - oac, err := c.OAuthClient() - if err != nil { - return jose.JWT{}, err - } - - t, err := oac.RequestToken(oauth2.GrantTypeRefreshToken, refreshToken) - if err != nil { - return jose.JWT{}, err - } - - jwt, err := jose.ParseJWT(t.IDToken) - if err != nil { - return jose.JWT{}, err - } - - return jwt, c.VerifyJWT(jwt) -} - -func (c *Client) VerifyJWT(jwt jose.JWT) error { - var keysFunc func() []key.PublicKey - if kID, ok := jwt.KeyID(); ok { - keysFunc = c.keysFuncWithID(kID) - } else { - keysFunc = c.keysFuncAll() - } - - v := NewJWTVerifier( - c.providerConfig.Get().Issuer.String(), - c.credentials.ID, - c.maybeSyncKeys, keysFunc) - - return v.Verify(jwt) -} - -// keysFuncWithID returns a function that retrieves at most unexpired -// public key from the Client that matches the provided ID -func (c *Client) keysFuncWithID(kID string) func() []key.PublicKey { - return func() []key.PublicKey { - c.keySetSyncMutex.RLock() - defer c.keySetSyncMutex.RUnlock() - - if c.keySet.ExpiresAt().Before(time.Now()) { - return []key.PublicKey{} - } - - k := c.keySet.Key(kID) - if k == nil { - return []key.PublicKey{} - } - - return []key.PublicKey{*k} - } -} - -// keysFuncAll returns a function that retrieves all unexpired public -// keys from the Client -func (c *Client) keysFuncAll() func() []key.PublicKey { - return func() []key.PublicKey { - c.keySetSyncMutex.RLock() - defer c.keySetSyncMutex.RUnlock() - - if c.keySet.ExpiresAt().Before(time.Now()) { - return []key.PublicKey{} - } - - return c.keySet.Keys() - } -} - -type providerConfigRepo struct { - mu sync.RWMutex - config ProviderConfig // do not access directly, use Get() -} - -func newProviderConfigRepo(pc ProviderConfig) *providerConfigRepo { - return &providerConfigRepo{sync.RWMutex{}, pc} -} - -// returns an error to implement ProviderConfigSetter -func (r *providerConfigRepo) Set(cfg ProviderConfig) error { - r.mu.Lock() - defer r.mu.Unlock() - r.config = cfg - return nil -} - -func (r *providerConfigRepo) Get() ProviderConfig { - r.mu.RLock() - defer r.mu.RUnlock() - return r.config -} diff --git a/deps/github.com/coreos/go-oidc/oidc/doc.go b/deps/github.com/coreos/go-oidc/oidc/doc.go deleted file mode 100644 index 196611ec5..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package oidc is DEPRECATED. Use github.com/coreos/go-oidc instead. -package oidc diff --git a/deps/github.com/coreos/go-oidc/oidc/identity.go b/deps/github.com/coreos/go-oidc/oidc/identity.go deleted file mode 100644 index 9bfa8e343..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/identity.go +++ /dev/null @@ -1,44 +0,0 @@ -package oidc - -import ( - "errors" - "time" - - "github.com/coreos/go-oidc/jose" -) - -type Identity struct { - ID string - Name string - Email string - ExpiresAt time.Time -} - -func IdentityFromClaims(claims jose.Claims) (*Identity, error) { - if claims == nil { - return nil, errors.New("nil claim set") - } - - var ident Identity - var err error - var ok bool - - if ident.ID, ok, err = claims.StringClaim("sub"); err != nil { - return nil, err - } else if !ok { - return nil, errors.New("missing required claim: sub") - } - - if ident.Email, _, err = claims.StringClaim("email"); err != nil { - return nil, err - } - - exp, ok, err := claims.TimeClaim("exp") - if err != nil { - return nil, err - } else if ok { - ident.ExpiresAt = exp - } - - return &ident, nil -} diff --git a/deps/github.com/coreos/go-oidc/oidc/interface.go b/deps/github.com/coreos/go-oidc/oidc/interface.go deleted file mode 100644 index 248cac0b4..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/interface.go +++ /dev/null @@ -1,3 +0,0 @@ -package oidc - -type LoginFunc func(ident Identity, sessionKey string) (redirectURL string, err error) diff --git a/deps/github.com/coreos/go-oidc/oidc/key.go b/deps/github.com/coreos/go-oidc/oidc/key.go deleted file mode 100755 index 82a0f567d..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/key.go +++ /dev/null @@ -1,67 +0,0 @@ -package oidc - -import ( - "encoding/json" - "errors" - "net/http" - "time" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" -) - -// DefaultPublicKeySetTTL is the default TTL set on the PublicKeySet if no -// Cache-Control header is provided by the JWK Set document endpoint. -const DefaultPublicKeySetTTL = 24 * time.Hour - -// NewRemotePublicKeyRepo is responsible for fetching the JWK Set document. -func NewRemotePublicKeyRepo(hc phttp.Client, ep string) *remotePublicKeyRepo { - return &remotePublicKeyRepo{hc: hc, ep: ep} -} - -type remotePublicKeyRepo struct { - hc phttp.Client - ep string -} - -// Get returns a PublicKeySet fetched from the JWK Set document endpoint. A TTL -// is set on the Key Set to avoid it having to be re-retrieved for every -// encryption event. This TTL is typically controlled by the endpoint returning -// a Cache-Control header, but defaults to 24 hours if no Cache-Control header -// is found. -func (r *remotePublicKeyRepo) Get() (key.KeySet, error) { - req, err := http.NewRequest("GET", r.ep, nil) - if err != nil { - return nil, err - } - - resp, err := r.hc.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - var d struct { - Keys []jose.JWK `json:"keys"` - } - if err := json.NewDecoder(resp.Body).Decode(&d); err != nil { - return nil, err - } - - if len(d.Keys) == 0 { - return nil, errors.New("zero keys in response") - } - - ttl, ok, err := phttp.Cacheable(resp.Header) - if err != nil { - return nil, err - } - if !ok { - ttl = DefaultPublicKeySetTTL - } - - exp := time.Now().UTC().Add(ttl) - ks := key.NewPublicKeySet(d.Keys, exp) - return ks, nil -} diff --git a/deps/github.com/coreos/go-oidc/oidc/provider.go b/deps/github.com/coreos/go-oidc/oidc/provider.go deleted file mode 100644 index 2afc0da33..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/provider.go +++ /dev/null @@ -1,687 +0,0 @@ -package oidc - -import ( - "encoding/json" - "errors" - "fmt" - "log" - "net/http" - "net/url" - "strings" - "sync" - "time" - - "github.com/coreos/pkg/timeutil" - "github.com/jonboulle/clockwork" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/oauth2" -) - -const ( - // Subject Identifier types defined by the OIDC spec. Specifies if the provider - // should provide the same sub claim value to all clients (public) or a unique - // value for each client (pairwise). - // - // See: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes - SubjectTypePublic = "public" - SubjectTypePairwise = "pairwise" -) - -var ( - // Default values for omitted provider config fields. - // - // Use ProviderConfig's Defaults method to fill a provider config with these values. - DefaultGrantTypesSupported = []string{oauth2.GrantTypeAuthCode, oauth2.GrantTypeImplicit} - DefaultResponseModesSupported = []string{"query", "fragment"} - DefaultTokenEndpointAuthMethodsSupported = []string{oauth2.AuthMethodClientSecretBasic} - DefaultClaimTypesSupported = []string{"normal"} -) - -const ( - MaximumProviderConfigSyncInterval = 24 * time.Hour - MinimumProviderConfigSyncInterval = time.Minute - - discoveryConfigPath = "/.well-known/openid-configuration" -) - -// internally configurable for tests -var minimumProviderConfigSyncInterval = MinimumProviderConfigSyncInterval - -var ( - // Ensure ProviderConfig satisfies these interfaces. - _ json.Marshaler = &ProviderConfig{} - _ json.Unmarshaler = &ProviderConfig{} -) - -// ProviderConfig represents the OpenID Provider Metadata specifying what -// configurations a provider supports. -// -// See: http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata -type ProviderConfig struct { - Issuer *url.URL // Required - AuthEndpoint *url.URL // Required - TokenEndpoint *url.URL // Required if grant types other than "implicit" are supported - UserInfoEndpoint *url.URL - KeysEndpoint *url.URL // Required - RegistrationEndpoint *url.URL - EndSessionEndpoint *url.URL - CheckSessionIFrame *url.URL - - // Servers MAY choose not to advertise some supported scope values even when this - // parameter is used, although those defined in OpenID Core SHOULD be listed, if supported. - ScopesSupported []string - // OAuth2.0 response types supported. - ResponseTypesSupported []string // Required - // OAuth2.0 response modes supported. - // - // If omitted, defaults to DefaultResponseModesSupported. - ResponseModesSupported []string - // OAuth2.0 grant types supported. - // - // If omitted, defaults to DefaultGrantTypesSupported. - GrantTypesSupported []string - ACRValuesSupported []string - // SubjectTypesSupported specifies strategies for providing values for the sub claim. - SubjectTypesSupported []string // Required - - // JWA signing and encryption algorith values supported for ID tokens. - IDTokenSigningAlgValues []string // Required - IDTokenEncryptionAlgValues []string - IDTokenEncryptionEncValues []string - - // JWA signing and encryption algorith values supported for user info responses. - UserInfoSigningAlgValues []string - UserInfoEncryptionAlgValues []string - UserInfoEncryptionEncValues []string - - // JWA signing and encryption algorith values supported for request objects. - ReqObjSigningAlgValues []string - ReqObjEncryptionAlgValues []string - ReqObjEncryptionEncValues []string - - TokenEndpointAuthMethodsSupported []string - TokenEndpointAuthSigningAlgValuesSupported []string - DisplayValuesSupported []string - ClaimTypesSupported []string - ClaimsSupported []string - ServiceDocs *url.URL - ClaimsLocalsSupported []string - UILocalsSupported []string - ClaimsParameterSupported bool - RequestParameterSupported bool - RequestURIParamaterSupported bool - RequireRequestURIRegistration bool - - Policy *url.URL - TermsOfService *url.URL - - // Not part of the OpenID Provider Metadata - ExpiresAt time.Time -} - -// Defaults returns a shallow copy of ProviderConfig with default -// values replacing omitted fields. -// -// var cfg oidc.ProviderConfig -// // Fill provider config with default values for omitted fields. -// cfg = cfg.Defaults() -// -func (p ProviderConfig) Defaults() ProviderConfig { - setDefault := func(val *[]string, defaultVal []string) { - if len(*val) == 0 { - *val = defaultVal - } - } - setDefault(&p.GrantTypesSupported, DefaultGrantTypesSupported) - setDefault(&p.ResponseModesSupported, DefaultResponseModesSupported) - setDefault(&p.TokenEndpointAuthMethodsSupported, DefaultTokenEndpointAuthMethodsSupported) - setDefault(&p.ClaimTypesSupported, DefaultClaimTypesSupported) - return p -} - -func (p *ProviderConfig) MarshalJSON() ([]byte, error) { - e := p.toEncodableStruct() - return json.Marshal(&e) -} - -func (p *ProviderConfig) UnmarshalJSON(data []byte) error { - var e encodableProviderConfig - if err := json.Unmarshal(data, &e); err != nil { - return err - } - conf, err := e.toStruct() - if err != nil { - return err - } - if err := conf.Valid(); err != nil { - return err - } - *p = conf - return nil -} - -type encodableProviderConfig struct { - Issuer string `json:"issuer"` - AuthEndpoint string `json:"authorization_endpoint"` - TokenEndpoint string `json:"token_endpoint"` - UserInfoEndpoint string `json:"userinfo_endpoint,omitempty"` - KeysEndpoint string `json:"jwks_uri"` - RegistrationEndpoint string `json:"registration_endpoint,omitempty"` - EndSessionEndpoint string `json:"end_session_endpoint,omitempty"` - CheckSessionIFrame string `json:"check_session_iframe,omitempty"` - - // Use 'omitempty' for all slices as per OIDC spec: - // "Claims that return multiple values are represented as JSON arrays. - // Claims with zero elements MUST be omitted from the response." - // http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse - - ScopesSupported []string `json:"scopes_supported,omitempty"` - ResponseTypesSupported []string `json:"response_types_supported,omitempty"` - ResponseModesSupported []string `json:"response_modes_supported,omitempty"` - GrantTypesSupported []string `json:"grant_types_supported,omitempty"` - ACRValuesSupported []string `json:"acr_values_supported,omitempty"` - SubjectTypesSupported []string `json:"subject_types_supported,omitempty"` - - IDTokenSigningAlgValues []string `json:"id_token_signing_alg_values_supported,omitempty"` - IDTokenEncryptionAlgValues []string `json:"id_token_encryption_alg_values_supported,omitempty"` - IDTokenEncryptionEncValues []string `json:"id_token_encryption_enc_values_supported,omitempty"` - UserInfoSigningAlgValues []string `json:"userinfo_signing_alg_values_supported,omitempty"` - UserInfoEncryptionAlgValues []string `json:"userinfo_encryption_alg_values_supported,omitempty"` - UserInfoEncryptionEncValues []string `json:"userinfo_encryption_enc_values_supported,omitempty"` - ReqObjSigningAlgValues []string `json:"request_object_signing_alg_values_supported,omitempty"` - ReqObjEncryptionAlgValues []string `json:"request_object_encryption_alg_values_supported,omitempty"` - ReqObjEncryptionEncValues []string `json:"request_object_encryption_enc_values_supported,omitempty"` - - TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported,omitempty"` - TokenEndpointAuthSigningAlgValuesSupported []string `json:"token_endpoint_auth_signing_alg_values_supported,omitempty"` - - DisplayValuesSupported []string `json:"display_values_supported,omitempty"` - ClaimTypesSupported []string `json:"claim_types_supported,omitempty"` - ClaimsSupported []string `json:"claims_supported,omitempty"` - ServiceDocs string `json:"service_documentation,omitempty"` - ClaimsLocalsSupported []string `json:"claims_locales_supported,omitempty"` - UILocalsSupported []string `json:"ui_locales_supported,omitempty"` - ClaimsParameterSupported bool `json:"claims_parameter_supported,omitempty"` - RequestParameterSupported bool `json:"request_parameter_supported,omitempty"` - RequestURIParamaterSupported bool `json:"request_uri_parameter_supported,omitempty"` - RequireRequestURIRegistration bool `json:"require_request_uri_registration,omitempty"` - - Policy string `json:"op_policy_uri,omitempty"` - TermsOfService string `json:"op_tos_uri,omitempty"` -} - -func (cfg ProviderConfig) toEncodableStruct() encodableProviderConfig { - return encodableProviderConfig{ - Issuer: uriToString(cfg.Issuer), - AuthEndpoint: uriToString(cfg.AuthEndpoint), - TokenEndpoint: uriToString(cfg.TokenEndpoint), - UserInfoEndpoint: uriToString(cfg.UserInfoEndpoint), - KeysEndpoint: uriToString(cfg.KeysEndpoint), - RegistrationEndpoint: uriToString(cfg.RegistrationEndpoint), - EndSessionEndpoint: uriToString(cfg.EndSessionEndpoint), - CheckSessionIFrame: uriToString(cfg.CheckSessionIFrame), - ScopesSupported: cfg.ScopesSupported, - ResponseTypesSupported: cfg.ResponseTypesSupported, - ResponseModesSupported: cfg.ResponseModesSupported, - GrantTypesSupported: cfg.GrantTypesSupported, - ACRValuesSupported: cfg.ACRValuesSupported, - SubjectTypesSupported: cfg.SubjectTypesSupported, - IDTokenSigningAlgValues: cfg.IDTokenSigningAlgValues, - IDTokenEncryptionAlgValues: cfg.IDTokenEncryptionAlgValues, - IDTokenEncryptionEncValues: cfg.IDTokenEncryptionEncValues, - UserInfoSigningAlgValues: cfg.UserInfoSigningAlgValues, - UserInfoEncryptionAlgValues: cfg.UserInfoEncryptionAlgValues, - UserInfoEncryptionEncValues: cfg.UserInfoEncryptionEncValues, - ReqObjSigningAlgValues: cfg.ReqObjSigningAlgValues, - ReqObjEncryptionAlgValues: cfg.ReqObjEncryptionAlgValues, - ReqObjEncryptionEncValues: cfg.ReqObjEncryptionEncValues, - TokenEndpointAuthMethodsSupported: cfg.TokenEndpointAuthMethodsSupported, - TokenEndpointAuthSigningAlgValuesSupported: cfg.TokenEndpointAuthSigningAlgValuesSupported, - DisplayValuesSupported: cfg.DisplayValuesSupported, - ClaimTypesSupported: cfg.ClaimTypesSupported, - ClaimsSupported: cfg.ClaimsSupported, - ServiceDocs: uriToString(cfg.ServiceDocs), - ClaimsLocalsSupported: cfg.ClaimsLocalsSupported, - UILocalsSupported: cfg.UILocalsSupported, - ClaimsParameterSupported: cfg.ClaimsParameterSupported, - RequestParameterSupported: cfg.RequestParameterSupported, - RequestURIParamaterSupported: cfg.RequestURIParamaterSupported, - RequireRequestURIRegistration: cfg.RequireRequestURIRegistration, - Policy: uriToString(cfg.Policy), - TermsOfService: uriToString(cfg.TermsOfService), - } -} - -func (e encodableProviderConfig) toStruct() (ProviderConfig, error) { - p := stickyErrParser{} - conf := ProviderConfig{ - Issuer: p.parseURI(e.Issuer, "issuer"), - AuthEndpoint: p.parseURI(e.AuthEndpoint, "authorization_endpoint"), - TokenEndpoint: p.parseURI(e.TokenEndpoint, "token_endpoint"), - UserInfoEndpoint: p.parseURI(e.UserInfoEndpoint, "userinfo_endpoint"), - KeysEndpoint: p.parseURI(e.KeysEndpoint, "jwks_uri"), - RegistrationEndpoint: p.parseURI(e.RegistrationEndpoint, "registration_endpoint"), - EndSessionEndpoint: p.parseURI(e.EndSessionEndpoint, "end_session_endpoint"), - CheckSessionIFrame: p.parseURI(e.CheckSessionIFrame, "check_session_iframe"), - ScopesSupported: e.ScopesSupported, - ResponseTypesSupported: e.ResponseTypesSupported, - ResponseModesSupported: e.ResponseModesSupported, - GrantTypesSupported: e.GrantTypesSupported, - ACRValuesSupported: e.ACRValuesSupported, - SubjectTypesSupported: e.SubjectTypesSupported, - IDTokenSigningAlgValues: e.IDTokenSigningAlgValues, - IDTokenEncryptionAlgValues: e.IDTokenEncryptionAlgValues, - IDTokenEncryptionEncValues: e.IDTokenEncryptionEncValues, - UserInfoSigningAlgValues: e.UserInfoSigningAlgValues, - UserInfoEncryptionAlgValues: e.UserInfoEncryptionAlgValues, - UserInfoEncryptionEncValues: e.UserInfoEncryptionEncValues, - ReqObjSigningAlgValues: e.ReqObjSigningAlgValues, - ReqObjEncryptionAlgValues: e.ReqObjEncryptionAlgValues, - ReqObjEncryptionEncValues: e.ReqObjEncryptionEncValues, - TokenEndpointAuthMethodsSupported: e.TokenEndpointAuthMethodsSupported, - TokenEndpointAuthSigningAlgValuesSupported: e.TokenEndpointAuthSigningAlgValuesSupported, - DisplayValuesSupported: e.DisplayValuesSupported, - ClaimTypesSupported: e.ClaimTypesSupported, - ClaimsSupported: e.ClaimsSupported, - ServiceDocs: p.parseURI(e.ServiceDocs, "service_documentation"), - ClaimsLocalsSupported: e.ClaimsLocalsSupported, - UILocalsSupported: e.UILocalsSupported, - ClaimsParameterSupported: e.ClaimsParameterSupported, - RequestParameterSupported: e.RequestParameterSupported, - RequestURIParamaterSupported: e.RequestURIParamaterSupported, - RequireRequestURIRegistration: e.RequireRequestURIRegistration, - Policy: p.parseURI(e.Policy, "op_policy-uri"), - TermsOfService: p.parseURI(e.TermsOfService, "op_tos_uri"), - } - if p.firstErr != nil { - return ProviderConfig{}, p.firstErr - } - return conf, nil -} - -// Empty returns if a ProviderConfig holds no information. -// -// This case generally indicates a ProviderConfigGetter has experienced an error -// and has nothing to report. -func (p ProviderConfig) Empty() bool { - return p.Issuer == nil -} - -func contains(sli []string, ele string) bool { - for _, s := range sli { - if s == ele { - return true - } - } - return false -} - -// Valid determines if a ProviderConfig conforms with the OIDC specification. -// If Valid returns successfully it guarantees required field are non-nil and -// URLs are well formed. -// -// Valid is called by UnmarshalJSON. -// -// NOTE(ericchiang): For development purposes Valid does not mandate 'https' for -// URLs fields where the OIDC spec requires it. This may change in future releases -// of this package. See: https://github.com/coreos/go-oidc/issues/34 -func (p ProviderConfig) Valid() error { - grantTypes := p.GrantTypesSupported - if len(grantTypes) == 0 { - grantTypes = DefaultGrantTypesSupported - } - implicitOnly := true - for _, grantType := range grantTypes { - if grantType != oauth2.GrantTypeImplicit { - implicitOnly = false - break - } - } - - if len(p.SubjectTypesSupported) == 0 { - return errors.New("missing required field subject_types_supported") - } - if len(p.IDTokenSigningAlgValues) == 0 { - return errors.New("missing required field id_token_signing_alg_values_supported") - } - - if len(p.ScopesSupported) != 0 && !contains(p.ScopesSupported, "openid") { - return errors.New("scoped_supported must be unspecified or include 'openid'") - } - - if !contains(p.IDTokenSigningAlgValues, "RS256") { - return errors.New("id_token_signing_alg_values_supported must include 'RS256'") - } - - uris := []struct { - val *url.URL - name string - required bool - }{ - {p.Issuer, "issuer", true}, - {p.AuthEndpoint, "authorization_endpoint", true}, - {p.TokenEndpoint, "token_endpoint", !implicitOnly}, - {p.UserInfoEndpoint, "userinfo_endpoint", false}, - {p.KeysEndpoint, "jwks_uri", true}, - {p.RegistrationEndpoint, "registration_endpoint", false}, - {p.EndSessionEndpoint, "end_session_endpoint", false}, - {p.CheckSessionIFrame, "check_session_iframe", false}, - {p.ServiceDocs, "service_documentation", false}, - {p.Policy, "op_policy_uri", false}, - {p.TermsOfService, "op_tos_uri", false}, - } - - for _, uri := range uris { - if uri.val == nil { - if !uri.required { - continue - } - return fmt.Errorf("empty value for required uri field %s", uri.name) - } - if uri.val.Host == "" { - return fmt.Errorf("no host for uri field %s", uri.name) - } - if uri.val.Scheme != "http" && uri.val.Scheme != "https" { - return fmt.Errorf("uri field %s schemeis not http or https", uri.name) - } - } - return nil -} - -// Supports determines if provider supports a client given their respective metadata. -func (p ProviderConfig) Supports(c ClientMetadata) error { - if err := p.Valid(); err != nil { - return fmt.Errorf("invalid provider config: %v", err) - } - if err := c.Valid(); err != nil { - return fmt.Errorf("invalid client config: %v", err) - } - - // Fill default values for omitted fields - c = c.Defaults() - p = p.Defaults() - - // Do the supported values list the requested one? - supports := []struct { - supported []string - requested string - name string - }{ - {p.IDTokenSigningAlgValues, c.IDTokenResponseOptions.SigningAlg, "id_token_signed_response_alg"}, - {p.IDTokenEncryptionAlgValues, c.IDTokenResponseOptions.EncryptionAlg, "id_token_encryption_response_alg"}, - {p.IDTokenEncryptionEncValues, c.IDTokenResponseOptions.EncryptionEnc, "id_token_encryption_response_enc"}, - {p.UserInfoSigningAlgValues, c.UserInfoResponseOptions.SigningAlg, "userinfo_signed_response_alg"}, - {p.UserInfoEncryptionAlgValues, c.UserInfoResponseOptions.EncryptionAlg, "userinfo_encryption_response_alg"}, - {p.UserInfoEncryptionEncValues, c.UserInfoResponseOptions.EncryptionEnc, "userinfo_encryption_response_enc"}, - {p.ReqObjSigningAlgValues, c.RequestObjectOptions.SigningAlg, "request_object_signing_alg"}, - {p.ReqObjEncryptionAlgValues, c.RequestObjectOptions.EncryptionAlg, "request_object_encryption_alg"}, - {p.ReqObjEncryptionEncValues, c.RequestObjectOptions.EncryptionEnc, "request_object_encryption_enc"}, - } - for _, field := range supports { - if field.requested == "" { - continue - } - if !contains(field.supported, field.requested) { - return fmt.Errorf("provider does not support requested value for field %s", field.name) - } - } - - stringsEqual := func(s1, s2 string) bool { return s1 == s2 } - - // For lists, are the list of requested values a subset of the supported ones? - supportsAll := []struct { - supported []string - requested []string - name string - // OAuth2.0 response_type can be space separated lists where order doesn't matter. - // For example "id_token token" is the same as "token id_token" - // Support a custom compare method. - comp func(s1, s2 string) bool - }{ - {p.GrantTypesSupported, c.GrantTypes, "grant_types", stringsEqual}, - {p.ResponseTypesSupported, c.ResponseTypes, "response_type", oauth2.ResponseTypesEqual}, - } - for _, field := range supportsAll { - requestLoop: - for _, req := range field.requested { - for _, sup := range field.supported { - if field.comp(req, sup) { - continue requestLoop - } - } - return fmt.Errorf("provider does not support requested value for field %s", field.name) - } - } - - // TODO(ericchiang): Are there more checks we feel comfortable with begin strict about? - - return nil -} - -func (p ProviderConfig) SupportsGrantType(grantType string) bool { - var supported []string - if len(p.GrantTypesSupported) == 0 { - supported = DefaultGrantTypesSupported - } else { - supported = p.GrantTypesSupported - } - - for _, t := range supported { - if t == grantType { - return true - } - } - return false -} - -type ProviderConfigGetter interface { - Get() (ProviderConfig, error) -} - -type ProviderConfigSetter interface { - Set(ProviderConfig) error -} - -type ProviderConfigSyncer struct { - from ProviderConfigGetter - to ProviderConfigSetter - clock clockwork.Clock - - initialSyncDone bool - initialSyncWait sync.WaitGroup -} - -func NewProviderConfigSyncer(from ProviderConfigGetter, to ProviderConfigSetter) *ProviderConfigSyncer { - return &ProviderConfigSyncer{ - from: from, - to: to, - clock: clockwork.NewRealClock(), - } -} - -func (s *ProviderConfigSyncer) Run() chan struct{} { - stop := make(chan struct{}) - - var next pcsStepper - next = &pcsStepNext{aft: time.Duration(0)} - - s.initialSyncWait.Add(1) - go func() { - for { - select { - case <-s.clock.After(next.after()): - next = next.step(s.sync) - case <-stop: - return - } - } - }() - - return stop -} - -func (s *ProviderConfigSyncer) WaitUntilInitialSync() { - s.initialSyncWait.Wait() -} - -func (s *ProviderConfigSyncer) sync() (time.Duration, error) { - cfg, err := s.from.Get() - if err != nil { - return 0, err - } - - if err = s.to.Set(cfg); err != nil { - return 0, fmt.Errorf("error setting provider config: %v", err) - } - - if !s.initialSyncDone { - s.initialSyncWait.Done() - s.initialSyncDone = true - } - - return nextSyncAfter(cfg.ExpiresAt, s.clock), nil -} - -type pcsStepFunc func() (time.Duration, error) - -type pcsStepper interface { - after() time.Duration - step(pcsStepFunc) pcsStepper -} - -type pcsStepNext struct { - aft time.Duration -} - -func (n *pcsStepNext) after() time.Duration { - return n.aft -} - -func (n *pcsStepNext) step(fn pcsStepFunc) (next pcsStepper) { - ttl, err := fn() - if err == nil { - next = &pcsStepNext{aft: ttl} - } else { - next = &pcsStepRetry{aft: time.Second} - log.Printf("go-oidc: provider config sync failed, retrying in %v: %v", next.after(), err) - } - return -} - -type pcsStepRetry struct { - aft time.Duration -} - -func (r *pcsStepRetry) after() time.Duration { - return r.aft -} - -func (r *pcsStepRetry) step(fn pcsStepFunc) (next pcsStepper) { - ttl, err := fn() - if err == nil { - next = &pcsStepNext{aft: ttl} - } else { - next = &pcsStepRetry{aft: timeutil.ExpBackoff(r.aft, time.Minute)} - log.Printf("go-oidc: provider config sync failed, retrying in %v: %v", next.after(), err) - } - return -} - -func nextSyncAfter(exp time.Time, clock clockwork.Clock) time.Duration { - if exp.IsZero() { - return MaximumProviderConfigSyncInterval - } - - t := exp.Sub(clock.Now()) / 2 - if t > MaximumProviderConfigSyncInterval { - t = MaximumProviderConfigSyncInterval - } else if t < minimumProviderConfigSyncInterval { - t = minimumProviderConfigSyncInterval - } - - return t -} - -type httpProviderConfigGetter struct { - hc phttp.Client - issuerURL string - clock clockwork.Clock -} - -func NewHTTPProviderConfigGetter(hc phttp.Client, issuerURL string) *httpProviderConfigGetter { - return &httpProviderConfigGetter{ - hc: hc, - issuerURL: issuerURL, - clock: clockwork.NewRealClock(), - } -} - -func (r *httpProviderConfigGetter) Get() (cfg ProviderConfig, err error) { - // If the Issuer value contains a path component, any terminating / MUST be removed before - // appending /.well-known/openid-configuration. - // https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest - discoveryURL := strings.TrimSuffix(r.issuerURL, "/") + discoveryConfigPath - req, err := http.NewRequest("GET", discoveryURL, nil) - if err != nil { - return - } - - resp, err := r.hc.Do(req) - if err != nil { - return - } - defer resp.Body.Close() - - if err = json.NewDecoder(resp.Body).Decode(&cfg); err != nil { - return - } - - var ttl time.Duration - var ok bool - ttl, ok, err = phttp.Cacheable(resp.Header) - if err != nil { - return - } else if ok { - cfg.ExpiresAt = r.clock.Now().UTC().Add(ttl) - } - - // The issuer value returned MUST be identical to the Issuer URL that was directly used to retrieve the configuration information. - // http://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationValidation - if !urlEqual(cfg.Issuer.String(), r.issuerURL) { - err = fmt.Errorf(`"issuer" in config (%v) does not match provided issuer URL (%v)`, cfg.Issuer, r.issuerURL) - return - } - - return -} - -func FetchProviderConfig(hc phttp.Client, issuerURL string) (ProviderConfig, error) { - if hc == nil { - hc = http.DefaultClient - } - - g := NewHTTPProviderConfigGetter(hc, issuerURL) - return g.Get() -} - -func WaitForProviderConfig(hc phttp.Client, issuerURL string) (pcfg ProviderConfig) { - return waitForProviderConfig(hc, issuerURL, clockwork.NewRealClock()) -} - -func waitForProviderConfig(hc phttp.Client, issuerURL string, clock clockwork.Clock) (pcfg ProviderConfig) { - var sleep time.Duration - var err error - for { - pcfg, err = FetchProviderConfig(hc, issuerURL) - if err == nil { - break - } - - sleep = timeutil.ExpBackoff(sleep, time.Minute) - fmt.Printf("Failed fetching provider config, trying again in %v: %v\n", sleep, err) - time.Sleep(sleep) - } - - return -} diff --git a/deps/github.com/coreos/go-oidc/oidc/transport.go b/deps/github.com/coreos/go-oidc/oidc/transport.go deleted file mode 100644 index 61c926d7f..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/transport.go +++ /dev/null @@ -1,88 +0,0 @@ -package oidc - -import ( - "fmt" - "net/http" - "sync" - - phttp "github.com/coreos/go-oidc/http" - "github.com/coreos/go-oidc/jose" -) - -type TokenRefresher interface { - // Verify checks if the provided token is currently valid or not. - Verify(jose.JWT) error - - // Refresh attempts to authenticate and retrieve a new token. - Refresh() (jose.JWT, error) -} - -type ClientCredsTokenRefresher struct { - Issuer string - OIDCClient *Client -} - -func (c *ClientCredsTokenRefresher) Verify(jwt jose.JWT) (err error) { - _, err = VerifyClientClaims(jwt, c.Issuer) - return -} - -func (c *ClientCredsTokenRefresher) Refresh() (jwt jose.JWT, err error) { - if err = c.OIDCClient.Healthy(); err != nil { - err = fmt.Errorf("unable to authenticate, unhealthy OIDC client: %v", err) - return - } - - jwt, err = c.OIDCClient.ClientCredsToken([]string{"openid"}) - if err != nil { - err = fmt.Errorf("unable to verify auth code with issuer: %v", err) - return - } - - return -} - -type AuthenticatedTransport struct { - TokenRefresher - http.RoundTripper - - mu sync.Mutex - jwt jose.JWT -} - -func (t *AuthenticatedTransport) verifiedJWT() (jose.JWT, error) { - t.mu.Lock() - defer t.mu.Unlock() - - if t.TokenRefresher.Verify(t.jwt) == nil { - return t.jwt, nil - } - - jwt, err := t.TokenRefresher.Refresh() - if err != nil { - return jose.JWT{}, fmt.Errorf("unable to acquire valid JWT: %v", err) - } - - t.jwt = jwt - return t.jwt, nil -} - -// SetJWT sets the JWT held by the Transport. -// This is useful for cases in which you want to set an initial JWT. -func (t *AuthenticatedTransport) SetJWT(jwt jose.JWT) { - t.mu.Lock() - defer t.mu.Unlock() - - t.jwt = jwt -} - -func (t *AuthenticatedTransport) RoundTrip(r *http.Request) (*http.Response, error) { - jwt, err := t.verifiedJWT() - if err != nil { - return nil, err - } - - req := phttp.CopyRequest(r) - req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", jwt.Encode())) - return t.RoundTripper.RoundTrip(req) -} diff --git a/deps/github.com/coreos/go-oidc/oidc/util.go b/deps/github.com/coreos/go-oidc/oidc/util.go deleted file mode 100644 index f2a5a195e..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/util.go +++ /dev/null @@ -1,109 +0,0 @@ -package oidc - -import ( - "crypto/rand" - "encoding/base64" - "errors" - "fmt" - "net" - "net/http" - "net/url" - "strings" - "time" - - "github.com/coreos/go-oidc/jose" -) - -// RequestTokenExtractor funcs extract a raw encoded token from a request. -type RequestTokenExtractor func(r *http.Request) (string, error) - -// ExtractBearerToken is a RequestTokenExtractor which extracts a bearer token from a request's -// Authorization header. -func ExtractBearerToken(r *http.Request) (string, error) { - ah := r.Header.Get("Authorization") - if ah == "" { - return "", errors.New("missing Authorization header") - } - - if len(ah) <= 6 || strings.ToUpper(ah[0:6]) != "BEARER" { - return "", errors.New("should be a bearer token") - } - - val := ah[7:] - if len(val) == 0 { - return "", errors.New("bearer token is empty") - } - - return val, nil -} - -// CookieTokenExtractor returns a RequestTokenExtractor which extracts a token from the named cookie in a request. -func CookieTokenExtractor(cookieName string) RequestTokenExtractor { - return func(r *http.Request) (string, error) { - ck, err := r.Cookie(cookieName) - if err != nil { - return "", fmt.Errorf("token cookie not found in request: %v", err) - } - - if ck.Value == "" { - return "", errors.New("token cookie found but is empty") - } - - return ck.Value, nil - } -} - -func NewClaims(iss, sub string, aud interface{}, iat, exp time.Time) jose.Claims { - return jose.Claims{ - // required - "iss": iss, - "sub": sub, - "aud": aud, - "iat": iat.Unix(), - "exp": exp.Unix(), - } -} - -func GenClientID(hostport string) (string, error) { - b, err := randBytes(32) - if err != nil { - return "", err - } - - var host string - if strings.Contains(hostport, ":") { - host, _, err = net.SplitHostPort(hostport) - if err != nil { - return "", err - } - } else { - host = hostport - } - - return fmt.Sprintf("%s@%s", base64.URLEncoding.EncodeToString(b), host), nil -} - -func randBytes(n int) ([]byte, error) { - b := make([]byte, n) - got, err := rand.Read(b) - if err != nil { - return nil, err - } else if n != got { - return nil, errors.New("unable to generate enough random data") - } - return b, nil -} - -// urlEqual checks two urls for equality using only the host and path portions. -func urlEqual(url1, url2 string) bool { - u1, err := url.Parse(url1) - if err != nil { - return false - } - u2, err := url.Parse(url2) - if err != nil { - return false - } - - return strings.ToLower(u1.Host+u1.Path) == strings.ToLower(u2.Host+u2.Path) -} diff --git a/deps/github.com/coreos/go-oidc/oidc/verification.go b/deps/github.com/coreos/go-oidc/oidc/verification.go deleted file mode 100644 index d9c6afa69..000000000 --- a/deps/github.com/coreos/go-oidc/oidc/verification.go +++ /dev/null @@ -1,190 +0,0 @@ -package oidc - -import ( - "errors" - "fmt" - "time" - - "github.com/jonboulle/clockwork" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" -) - -func VerifySignature(jwt jose.JWT, keys []key.PublicKey) (bool, error) { - jwtBytes := []byte(jwt.Data()) - for _, k := range keys { - v, err := k.Verifier() - if err != nil { - return false, err - } - if v.Verify(jwt.Signature, jwtBytes) == nil { - return true, nil - } - } - return false, nil -} - -// containsString returns true if the given string(needle) is found -// in the string array(haystack). -func containsString(needle string, haystack []string) bool { - for _, v := range haystack { - if v == needle { - return true - } - } - return false -} - -// Verify claims in accordance with OIDC spec -// http://openid.net/specs/openid-connect-basic-1_0.html#IDTokenValidation -func VerifyClaims(jwt jose.JWT, issuer, clientID string) error { - now := time.Now().UTC() - - claims, err := jwt.Claims() - if err != nil { - return err - } - - ident, err := IdentityFromClaims(claims) - if err != nil { - return err - } - - if ident.ExpiresAt.Before(now) { - return errors.New("token is expired") - } - - // iss REQUIRED. Issuer Identifier for the Issuer of the response. - // The iss value is a case sensitive URL using the https scheme that contains scheme, - // host, and optionally, port number and path components and no query or fragment components. - if iss, exists := claims["iss"].(string); exists { - if !urlEqual(iss, issuer) { - return fmt.Errorf("invalid claim value: 'iss'. expected=%s, found=%s.", issuer, iss) - } - } else { - return errors.New("missing claim: 'iss'") - } - - // iat REQUIRED. Time at which the JWT was issued. - // Its value is a JSON number representing the number of seconds from 1970-01-01T0:0:0Z - // as measured in UTC until the date/time. - if _, exists := claims["iat"].(float64); !exists { - return errors.New("missing claim: 'iat'") - } - - // aud REQUIRED. Audience(s) that this ID Token is intended for. - // It MUST contain the OAuth 2.0 client_id of the Relying Party as an audience value. - // It MAY also contain identifiers for other audiences. In the general case, the aud - // value is an array of case sensitive strings. In the common special case when there - // is one audience, the aud value MAY be a single case sensitive string. - if aud, ok, err := claims.StringClaim("aud"); err == nil && ok { - if aud != clientID { - return fmt.Errorf("invalid claims, 'aud' claim and 'client_id' do not match, aud=%s, client_id=%s", aud, clientID) - } - } else if aud, ok, err := claims.StringsClaim("aud"); err == nil && ok { - if !containsString(clientID, aud) { - return fmt.Errorf("invalid claims, cannot find 'client_id' in 'aud' claim, aud=%v, client_id=%s", aud, clientID) - } - } else { - return errors.New("invalid claim value: 'aud' is required, and should be either string or string array") - } - - return nil -} - -// VerifyClientClaims verifies all the required claims are valid for a "client credentials" JWT. -// Returns the client ID if valid, or an error if invalid. -func VerifyClientClaims(jwt jose.JWT, issuer string) (string, error) { - claims, err := jwt.Claims() - if err != nil { - return "", fmt.Errorf("failed to parse JWT claims: %v", err) - } - - iss, ok, err := claims.StringClaim("iss") - if err != nil { - return "", fmt.Errorf("failed to parse 'iss' claim: %v", err) - } else if !ok { - return "", errors.New("missing required 'iss' claim") - } else if !urlEqual(iss, issuer) { - return "", fmt.Errorf("'iss' claim does not match expected issuer, iss=%s", iss) - } - - sub, ok, err := claims.StringClaim("sub") - if err != nil { - return "", fmt.Errorf("failed to parse 'sub' claim: %v", err) - } else if !ok { - return "", errors.New("missing required 'sub' claim") - } - - if aud, ok, err := claims.StringClaim("aud"); err == nil && ok { - if aud != sub { - return "", fmt.Errorf("invalid claims, 'aud' claim and 'sub' claim do not match, aud=%s, sub=%s", aud, sub) - } - } else if aud, ok, err := claims.StringsClaim("aud"); err == nil && ok { - if !containsString(sub, aud) { - return "", fmt.Errorf("invalid claims, cannot find 'sud' in 'aud' claim, aud=%v, sub=%s", aud, sub) - } - } else { - return "", errors.New("invalid claim value: 'aud' is required, and should be either string or string array") - } - - now := time.Now().UTC() - exp, ok, err := claims.TimeClaim("exp") - if err != nil { - return "", fmt.Errorf("failed to parse 'exp' claim: %v", err) - } else if !ok { - return "", errors.New("missing required 'exp' claim") - } else if exp.Before(now) { - return "", fmt.Errorf("token already expired at: %v", exp) - } - - return sub, nil -} - -type JWTVerifier struct { - issuer string - clientID string - syncFunc func() error - keysFunc func() []key.PublicKey - clock clockwork.Clock -} - -func NewJWTVerifier(issuer, clientID string, syncFunc func() error, keysFunc func() []key.PublicKey) JWTVerifier { - return JWTVerifier{ - issuer: issuer, - clientID: clientID, - syncFunc: syncFunc, - keysFunc: keysFunc, - clock: clockwork.NewRealClock(), - } -} - -func (v *JWTVerifier) Verify(jwt jose.JWT) error { - // Verify claims before verifying the signature. This is an optimization to throw out - // tokens we know are invalid without undergoing an expensive signature check and - // possibly a re-sync event. - if err := VerifyClaims(jwt, v.issuer, v.clientID); err != nil { - return fmt.Errorf("oidc: JWT claims invalid: %v", err) - } - - ok, err := VerifySignature(jwt, v.keysFunc()) - if err != nil { - return fmt.Errorf("oidc: JWT signature verification failed: %v", err) - } else if ok { - return nil - } - - if err = v.syncFunc(); err != nil { - return fmt.Errorf("oidc: failed syncing KeySet: %v", err) - } - - ok, err = VerifySignature(jwt, v.keysFunc()) - if err != nil { - return fmt.Errorf("oidc: JWT signature verification failed: %v", err) - } else if !ok { - return errors.New("oidc: unable to verify JWT signature: no matching keys") - } - - return nil -} diff --git a/deps/github.com/coreos/go-systemd/journal/journal.go b/deps/github.com/coreos/go-systemd/journal/journal.go new file mode 100644 index 000000000..7f434990d --- /dev/null +++ b/deps/github.com/coreos/go-systemd/journal/journal.go @@ -0,0 +1,179 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package journal provides write bindings to the local systemd journal. +// It is implemented in pure Go and connects to the journal directly over its +// unix socket. +// +// To read from the journal, see the "sdjournal" package, which wraps the +// sd-journal a C API. +// +// http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html +package journal + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "io/ioutil" + "net" + "os" + "strconv" + "strings" + "syscall" +) + +// Priority of a journal message +type Priority int + +const ( + PriEmerg Priority = iota + PriAlert + PriCrit + PriErr + PriWarning + PriNotice + PriInfo + PriDebug +) + +var conn net.Conn + +func init() { + var err error + conn, err = net.Dial("unixgram", "/run/systemd/journal/socket") + if err != nil { + conn = nil + } +} + +// Enabled returns true if the local systemd journal is available for logging +func Enabled() bool { + return conn != nil +} + +// Send a message to the local systemd journal. vars is a map of journald +// fields to values. Fields must be composed of uppercase letters, numbers, +// and underscores, but must not start with an underscore. Within these +// restrictions, any arbitrary field name may be used. Some names have special +// significance: see the journalctl documentation +// (http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html) +// for more details. vars may be nil. +func Send(message string, priority Priority, vars map[string]string) error { + if conn == nil { + return journalError("could not connect to journald socket") + } + + data := new(bytes.Buffer) + appendVariable(data, "PRIORITY", strconv.Itoa(int(priority))) + appendVariable(data, "MESSAGE", message) + for k, v := range vars { + appendVariable(data, k, v) + } + + _, err := io.Copy(conn, data) + if err != nil && isSocketSpaceError(err) { + file, err := tempFd() + if err != nil { + return journalError(err.Error()) + } + defer file.Close() + _, err = io.Copy(file, data) + if err != nil { + return journalError(err.Error()) + } + + rights := syscall.UnixRights(int(file.Fd())) + + /* this connection should always be a UnixConn, but better safe than sorry */ + unixConn, ok := conn.(*net.UnixConn) + if !ok { + return journalError("can't send file through non-Unix connection") + } + unixConn.WriteMsgUnix([]byte{}, rights, nil) + } else if err != nil { + return journalError(err.Error()) + } + return nil +} + +// Print prints a message to the local systemd journal using Send(). +func Print(priority Priority, format string, a ...interface{}) error { + return Send(fmt.Sprintf(format, a...), priority, nil) +} + +func appendVariable(w io.Writer, name, value string) { + if !validVarName(name) { + journalError("variable name contains invalid character, ignoring") + } + if strings.ContainsRune(value, '\n') { + /* When the value contains a newline, we write: + * - the variable name, followed by a newline + * - the size (in 64bit little endian format) + * - the data, followed by a newline + */ + fmt.Fprintln(w, name) + binary.Write(w, binary.LittleEndian, uint64(len(value))) + fmt.Fprintln(w, value) + } else { + /* just write the variable and value all on one line */ + fmt.Fprintf(w, "%s=%s\n", name, value) + } +} + +func validVarName(name string) bool { + /* The variable name must be in uppercase and consist only of characters, + * numbers and underscores, and may not begin with an underscore. (from the docs) + */ + + valid := name[0] != '_' + for _, c := range name { + valid = valid && ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' + } + return valid +} + +func isSocketSpaceError(err error) bool { + opErr, ok := err.(*net.OpError) + if !ok { + return false + } + + sysErr, ok := opErr.Err.(syscall.Errno) + if !ok { + return false + } + + return sysErr == syscall.EMSGSIZE || sysErr == syscall.ENOBUFS +} + +func tempFd() (*os.File, error) { + file, err := ioutil.TempFile("/dev/shm/", "journal.XXXXX") + if err != nil { + return nil, err + } + syscall.Unlink(file.Name()) + if err != nil { + return nil, err + } + return file, nil +} + +func journalError(s string) error { + s = "journal error: " + s + fmt.Fprintln(os.Stderr, s) + return errors.New(s) +} diff --git a/deps/github.com/coreos/pkg/capnslog/README.md b/deps/github.com/coreos/pkg/capnslog/README.md new file mode 100644 index 000000000..81efb1fb6 --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/README.md @@ -0,0 +1,39 @@ +# capnslog, the CoreOS logging package + +There are far too many logging packages out there, with varying degrees of licenses, far too many features (colorization, all sorts of log frameworks) or are just a pain to use (lack of `Fatalln()`?). +capnslog provides a simple but consistent logging interface suitable for all kinds of projects. + +### Design Principles + +##### `package main` is the place where logging gets turned on and routed + +A library should not touch log options, only generate log entries. Libraries are silent until main lets them speak. + +##### All log options are runtime-configurable. + +Still the job of `main` to expose these configurations. `main` may delegate this to, say, a configuration webhook, but does so explicitly. + +##### There is one log object per package. It is registered under its repository and package name. + +`main` activates logging for its repository and any dependency repositories it would also like to have output in its logstream. `main` also dictates at which level each subpackage logs. + +##### There is *one* output stream, and it is an `io.Writer` composed with a formatter. + +Splitting streams is probably not the job of your program, but rather, your log aggregation framework. If you must split output streams, again, `main` configures this and you can write a very simple two-output struct that satisfies io.Writer. + +Fancy colorful formatting and JSON output are beyond the scope of a basic logging framework -- they're application/log-collector dependant. These are, at best, provided as options, but more likely, provided by your application. + +##### Log objects are an interface + +An object knows best how to print itself. Log objects can collect more interesting metadata if they wish, however, because text isn't going away anytime soon, they must all be marshalable to text. The simplest log object is a string, which returns itself. If you wish to do more fancy tricks for printing your log objects, see also JSON output -- introspect and write a formatter which can handle your advanced log interface. Making strings is the only thing guaranteed. + +##### Log levels have specific meanings: + + * Critical: Unrecoverable. Must fail. + * Error: Data has been lost, a request has failed for a bad reason, or a required resource has been lost + * Warning: (Hopefully) Temporary conditions that may cause errors, but may work fine. A replica disappearing (that may reconnect) is a warning. + * Notice: Normal, but important (uncommon) log information. + * Info: Normal, working log information, everything is fine, but helpful notices for auditing or common operations. + * Debug: Everything is still fine, but even common operations may be logged, and less helpful but more quantity of notices. + * Trace: Anything goes, from logging every function call as part of a common operation, to tracing execution of a query. + diff --git a/deps/github.com/coreos/pkg/capnslog/formatters.go b/deps/github.com/coreos/pkg/capnslog/formatters.go new file mode 100644 index 000000000..b305a845f --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/formatters.go @@ -0,0 +1,157 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package capnslog + +import ( + "bufio" + "fmt" + "io" + "log" + "runtime" + "strings" + "time" +) + +type Formatter interface { + Format(pkg string, level LogLevel, depth int, entries ...interface{}) + Flush() +} + +func NewStringFormatter(w io.Writer) Formatter { + return &StringFormatter{ + w: bufio.NewWriter(w), + } +} + +type StringFormatter struct { + w *bufio.Writer +} + +func (s *StringFormatter) Format(pkg string, l LogLevel, i int, entries ...interface{}) { + now := time.Now().UTC() + s.w.WriteString(now.Format(time.RFC3339)) + s.w.WriteByte(' ') + writeEntries(s.w, pkg, l, i, entries...) + s.Flush() +} + +func writeEntries(w *bufio.Writer, pkg string, _ LogLevel, _ int, entries ...interface{}) { + if pkg != "" { + w.WriteString(pkg + ": ") + } + str := fmt.Sprint(entries...) + endsInNL := strings.HasSuffix(str, "\n") + w.WriteString(str) + if !endsInNL { + w.WriteString("\n") + } +} + +func (s *StringFormatter) Flush() { + s.w.Flush() +} + +func NewPrettyFormatter(w io.Writer, debug bool) Formatter { + return &PrettyFormatter{ + w: bufio.NewWriter(w), + debug: debug, + } +} + +type PrettyFormatter struct { + w *bufio.Writer + debug bool +} + +func (c *PrettyFormatter) Format(pkg string, l LogLevel, depth int, entries ...interface{}) { + now := time.Now() + ts := now.Format("2006-01-02 15:04:05") + c.w.WriteString(ts) + ms := now.Nanosecond() / 1000 + c.w.WriteString(fmt.Sprintf(".%06d", ms)) + if c.debug { + _, file, line, ok := runtime.Caller(depth) // It's always the same number of frames to the user's call. + if !ok { + file = "???" + line = 1 + } else { + slash := strings.LastIndex(file, "/") + if slash >= 0 { + file = file[slash+1:] + } + } + if line < 0 { + line = 0 // not a real line number + } + c.w.WriteString(fmt.Sprintf(" [%s:%d]", file, line)) + } + c.w.WriteString(fmt.Sprint(" ", l.Char(), " | ")) + writeEntries(c.w, pkg, l, depth, entries...) + c.Flush() +} + +func (c *PrettyFormatter) Flush() { + c.w.Flush() +} + +// LogFormatter emulates the form of the traditional built-in logger. +type LogFormatter struct { + logger *log.Logger + prefix string +} + +// NewLogFormatter is a helper to produce a new LogFormatter struct. It uses the +// golang log package to actually do the logging work so that logs look similar. +func NewLogFormatter(w io.Writer, prefix string, flag int) Formatter { + return &LogFormatter{ + logger: log.New(w, "", flag), // don't use prefix here + prefix: prefix, // save it instead + } +} + +// Format builds a log message for the LogFormatter. The LogLevel is ignored. +func (lf *LogFormatter) Format(pkg string, _ LogLevel, _ int, entries ...interface{}) { + str := fmt.Sprint(entries...) + prefix := lf.prefix + if pkg != "" { + prefix = fmt.Sprintf("%s%s: ", prefix, pkg) + } + lf.logger.Output(5, fmt.Sprintf("%s%v", prefix, str)) // call depth is 5 +} + +// Flush is included so that the interface is complete, but is a no-op. +func (lf *LogFormatter) Flush() { + // noop +} + +// NilFormatter is a no-op log formatter that does nothing. +type NilFormatter struct { +} + +// NewNilFormatter is a helper to produce a new LogFormatter struct. It logs no +// messages so that you can cause part of your logging to be silent. +func NewNilFormatter() Formatter { + return &NilFormatter{} +} + +// Format does nothing. +func (_ *NilFormatter) Format(_ string, _ LogLevel, _ int, _ ...interface{}) { + // noop +} + +// Flush is included so that the interface is complete, but is a no-op. +func (_ *NilFormatter) Flush() { + // noop +} diff --git a/deps/github.com/coreos/pkg/capnslog/glog_formatter.go b/deps/github.com/coreos/pkg/capnslog/glog_formatter.go new file mode 100644 index 000000000..426603ef3 --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/glog_formatter.go @@ -0,0 +1,96 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package capnslog + +import ( + "bufio" + "bytes" + "io" + "os" + "runtime" + "strconv" + "strings" + "time" +) + +var pid = os.Getpid() + +type GlogFormatter struct { + StringFormatter +} + +func NewGlogFormatter(w io.Writer) *GlogFormatter { + g := &GlogFormatter{} + g.w = bufio.NewWriter(w) + return g +} + +func (g GlogFormatter) Format(pkg string, level LogLevel, depth int, entries ...interface{}) { + g.w.Write(GlogHeader(level, depth+1)) + g.StringFormatter.Format(pkg, level, depth+1, entries...) +} + +func GlogHeader(level LogLevel, depth int) []byte { + // Lmmdd hh:mm:ss.uuuuuu threadid file:line] + now := time.Now().UTC() + _, file, line, ok := runtime.Caller(depth) // It's always the same number of frames to the user's call. + if !ok { + file = "???" + line = 1 + } else { + slash := strings.LastIndex(file, "/") + if slash >= 0 { + file = file[slash+1:] + } + } + if line < 0 { + line = 0 // not a real line number + } + buf := &bytes.Buffer{} + buf.Grow(30) + _, month, day := now.Date() + hour, minute, second := now.Clock() + buf.WriteString(level.Char()) + twoDigits(buf, int(month)) + twoDigits(buf, day) + buf.WriteByte(' ') + twoDigits(buf, hour) + buf.WriteByte(':') + twoDigits(buf, minute) + buf.WriteByte(':') + twoDigits(buf, second) + buf.WriteByte('.') + buf.WriteString(strconv.Itoa(now.Nanosecond() / 1000)) + buf.WriteByte('Z') + buf.WriteByte(' ') + buf.WriteString(strconv.Itoa(pid)) + buf.WriteByte(' ') + buf.WriteString(file) + buf.WriteByte(':') + buf.WriteString(strconv.Itoa(line)) + buf.WriteByte(']') + buf.WriteByte(' ') + return buf.Bytes() +} + +const digits = "0123456789" + +func twoDigits(b *bytes.Buffer, d int) { + c2 := digits[d%10] + d /= 10 + c1 := digits[d%10] + b.WriteByte(c1) + b.WriteByte(c2) +} diff --git a/deps/github.com/coreos/pkg/capnslog/init.go b/deps/github.com/coreos/pkg/capnslog/init.go new file mode 100644 index 000000000..44b8cd361 --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/init.go @@ -0,0 +1,49 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +build !windows + +package capnslog + +import ( + "io" + "os" + "syscall" +) + +// Here's where the opinionation comes in. We need some sensible defaults, +// especially after taking over the log package. Your project (whatever it may +// be) may see things differently. That's okay; there should be no defaults in +// the main package that cannot be controlled or overridden programatically, +// otherwise it's a bug. Doing so is creating your own init_log.go file much +// like this one. + +func init() { + initHijack() + + // Go `log` pacakge uses os.Stderr. + SetFormatter(NewDefaultFormatter(os.Stderr)) + SetGlobalLogLevel(INFO) +} + +func NewDefaultFormatter(out io.Writer) Formatter { + if syscall.Getppid() == 1 { + // We're running under init, which may be systemd. + f, err := NewJournaldFormatter() + if err == nil { + return f + } + } + return NewPrettyFormatter(out, false) +} diff --git a/deps/github.com/coreos/pkg/capnslog/init_windows.go b/deps/github.com/coreos/pkg/capnslog/init_windows.go new file mode 100644 index 000000000..455305065 --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/init_windows.go @@ -0,0 +1,25 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package capnslog + +import "os" + +func init() { + initHijack() + + // Go `log` package uses os.Stderr. + SetFormatter(NewPrettyFormatter(os.Stderr, false)) + SetGlobalLogLevel(INFO) +} diff --git a/deps/github.com/coreos/pkg/capnslog/journald_formatter.go b/deps/github.com/coreos/pkg/capnslog/journald_formatter.go new file mode 100644 index 000000000..72e05207c --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/journald_formatter.go @@ -0,0 +1,68 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +build !windows + +package capnslog + +import ( + "errors" + "fmt" + "os" + "path/filepath" + + "github.com/coreos/go-systemd/journal" +) + +func NewJournaldFormatter() (Formatter, error) { + if !journal.Enabled() { + return nil, errors.New("No systemd detected") + } + return &journaldFormatter{}, nil +} + +type journaldFormatter struct{} + +func (j *journaldFormatter) Format(pkg string, l LogLevel, _ int, entries ...interface{}) { + var pri journal.Priority + switch l { + case CRITICAL: + pri = journal.PriCrit + case ERROR: + pri = journal.PriErr + case WARNING: + pri = journal.PriWarning + case NOTICE: + pri = journal.PriNotice + case INFO: + pri = journal.PriInfo + case DEBUG: + pri = journal.PriDebug + case TRACE: + pri = journal.PriDebug + default: + panic("Unhandled loglevel") + } + msg := fmt.Sprint(entries...) + tags := map[string]string{ + "PACKAGE": pkg, + "SYSLOG_IDENTIFIER": filepath.Base(os.Args[0]), + } + err := journal.Send(msg, pri, tags) + if err != nil { + fmt.Fprintln(os.Stderr, err) + } +} + +func (j *journaldFormatter) Flush() {} diff --git a/deps/github.com/coreos/pkg/capnslog/log_hijack.go b/deps/github.com/coreos/pkg/capnslog/log_hijack.go new file mode 100644 index 000000000..970086b9f --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/log_hijack.go @@ -0,0 +1,39 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package capnslog + +import ( + "log" +) + +func initHijack() { + pkg := NewPackageLogger("log", "") + w := packageWriter{pkg} + log.SetFlags(0) + log.SetPrefix("") + log.SetOutput(w) +} + +type packageWriter struct { + pl *PackageLogger +} + +func (p packageWriter) Write(b []byte) (int, error) { + if p.pl.level < INFO { + return 0, nil + } + p.pl.internalLog(calldepth+2, INFO, string(b)) + return len(b), nil +} diff --git a/deps/github.com/coreos/pkg/capnslog/logmap.go b/deps/github.com/coreos/pkg/capnslog/logmap.go new file mode 100644 index 000000000..849544883 --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/logmap.go @@ -0,0 +1,240 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package capnslog + +import ( + "errors" + "strings" + "sync" +) + +// LogLevel is the set of all log levels. +type LogLevel int8 + +const ( + // CRITICAL is the lowest log level; only errors which will end the program will be propagated. + CRITICAL LogLevel = iota - 1 + // ERROR is for errors that are not fatal but lead to troubling behavior. + ERROR + // WARNING is for errors which are not fatal and not errors, but are unusual. Often sourced from misconfigurations. + WARNING + // NOTICE is for normal but significant conditions. + NOTICE + // INFO is a log level for common, everyday log updates. + INFO + // DEBUG is the default hidden level for more verbose updates about internal processes. + DEBUG + // TRACE is for (potentially) call by call tracing of programs. + TRACE +) + +// Char returns a single-character representation of the log level. +func (l LogLevel) Char() string { + switch l { + case CRITICAL: + return "C" + case ERROR: + return "E" + case WARNING: + return "W" + case NOTICE: + return "N" + case INFO: + return "I" + case DEBUG: + return "D" + case TRACE: + return "T" + default: + panic("Unhandled loglevel") + } +} + +// String returns a multi-character representation of the log level. +func (l LogLevel) String() string { + switch l { + case CRITICAL: + return "CRITICAL" + case ERROR: + return "ERROR" + case WARNING: + return "WARNING" + case NOTICE: + return "NOTICE" + case INFO: + return "INFO" + case DEBUG: + return "DEBUG" + case TRACE: + return "TRACE" + default: + panic("Unhandled loglevel") + } +} + +// Update using the given string value. Fulfills the flag.Value interface. +func (l *LogLevel) Set(s string) error { + value, err := ParseLevel(s) + if err != nil { + return err + } + + *l = value + return nil +} + +// ParseLevel translates some potential loglevel strings into their corresponding levels. +func ParseLevel(s string) (LogLevel, error) { + switch s { + case "CRITICAL", "C": + return CRITICAL, nil + case "ERROR", "0", "E": + return ERROR, nil + case "WARNING", "1", "W": + return WARNING, nil + case "NOTICE", "2", "N": + return NOTICE, nil + case "INFO", "3", "I": + return INFO, nil + case "DEBUG", "4", "D": + return DEBUG, nil + case "TRACE", "5", "T": + return TRACE, nil + } + return CRITICAL, errors.New("couldn't parse log level " + s) +} + +type RepoLogger map[string]*PackageLogger + +type loggerStruct struct { + sync.Mutex + repoMap map[string]RepoLogger + formatter Formatter +} + +// logger is the global logger +var logger = new(loggerStruct) + +// SetGlobalLogLevel sets the log level for all packages in all repositories +// registered with capnslog. +func SetGlobalLogLevel(l LogLevel) { + logger.Lock() + defer logger.Unlock() + for _, r := range logger.repoMap { + r.setRepoLogLevelInternal(l) + } +} + +// GetRepoLogger may return the handle to the repository's set of packages' loggers. +func GetRepoLogger(repo string) (RepoLogger, error) { + logger.Lock() + defer logger.Unlock() + r, ok := logger.repoMap[repo] + if !ok { + return nil, errors.New("no packages registered for repo " + repo) + } + return r, nil +} + +// MustRepoLogger returns the handle to the repository's packages' loggers. +func MustRepoLogger(repo string) RepoLogger { + r, err := GetRepoLogger(repo) + if err != nil { + panic(err) + } + return r +} + +// SetRepoLogLevel sets the log level for all packages in the repository. +func (r RepoLogger) SetRepoLogLevel(l LogLevel) { + logger.Lock() + defer logger.Unlock() + r.setRepoLogLevelInternal(l) +} + +func (r RepoLogger) setRepoLogLevelInternal(l LogLevel) { + for _, v := range r { + v.level = l + } +} + +// ParseLogLevelConfig parses a comma-separated string of "package=loglevel", in +// order, and returns a map of the results, for use in SetLogLevel. +func (r RepoLogger) ParseLogLevelConfig(conf string) (map[string]LogLevel, error) { + setlist := strings.Split(conf, ",") + out := make(map[string]LogLevel) + for _, setstring := range setlist { + setting := strings.Split(setstring, "=") + if len(setting) != 2 { + return nil, errors.New("oddly structured `pkg=level` option: " + setstring) + } + l, err := ParseLevel(setting[1]) + if err != nil { + return nil, err + } + out[setting[0]] = l + } + return out, nil +} + +// SetLogLevel takes a map of package names within a repository to their desired +// loglevel, and sets the levels appropriately. Unknown packages are ignored. +// "*" is a special package name that corresponds to all packages, and will be +// processed first. +func (r RepoLogger) SetLogLevel(m map[string]LogLevel) { + logger.Lock() + defer logger.Unlock() + if l, ok := m["*"]; ok { + r.setRepoLogLevelInternal(l) + } + for k, v := range m { + l, ok := r[k] + if !ok { + continue + } + l.level = v + } +} + +// SetFormatter sets the formatting function for all logs. +func SetFormatter(f Formatter) { + logger.Lock() + defer logger.Unlock() + logger.formatter = f +} + +// NewPackageLogger creates a package logger object. +// This should be defined as a global var in your package, referencing your repo. +func NewPackageLogger(repo string, pkg string) (p *PackageLogger) { + logger.Lock() + defer logger.Unlock() + if logger.repoMap == nil { + logger.repoMap = make(map[string]RepoLogger) + } + r, rok := logger.repoMap[repo] + if !rok { + logger.repoMap[repo] = make(RepoLogger) + r = logger.repoMap[repo] + } + p, pok := r[pkg] + if !pok { + r[pkg] = &PackageLogger{ + pkg: pkg, + level: INFO, + } + p = r[pkg] + } + return +} diff --git a/deps/github.com/coreos/pkg/capnslog/pkg_logger.go b/deps/github.com/coreos/pkg/capnslog/pkg_logger.go new file mode 100644 index 000000000..612d55c66 --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/pkg_logger.go @@ -0,0 +1,177 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package capnslog + +import ( + "fmt" + "os" +) + +type PackageLogger struct { + pkg string + level LogLevel +} + +const calldepth = 2 + +func (p *PackageLogger) internalLog(depth int, inLevel LogLevel, entries ...interface{}) { + logger.Lock() + defer logger.Unlock() + if inLevel != CRITICAL && p.level < inLevel { + return + } + if logger.formatter != nil { + logger.formatter.Format(p.pkg, inLevel, depth+1, entries...) + } +} + +func (p *PackageLogger) LevelAt(l LogLevel) bool { + logger.Lock() + defer logger.Unlock() + return p.level >= l +} + +// Log a formatted string at any level between ERROR and TRACE +func (p *PackageLogger) Logf(l LogLevel, format string, args ...interface{}) { + p.internalLog(calldepth, l, fmt.Sprintf(format, args...)) +} + +// Log a message at any level between ERROR and TRACE +func (p *PackageLogger) Log(l LogLevel, args ...interface{}) { + p.internalLog(calldepth, l, fmt.Sprint(args...)) +} + +// log stdlib compatibility + +func (p *PackageLogger) Println(args ...interface{}) { + p.internalLog(calldepth, INFO, fmt.Sprintln(args...)) +} + +func (p *PackageLogger) Printf(format string, args ...interface{}) { + p.Logf(INFO, format, args...) +} + +func (p *PackageLogger) Print(args ...interface{}) { + p.internalLog(calldepth, INFO, fmt.Sprint(args...)) +} + +// Panic and fatal + +func (p *PackageLogger) Panicf(format string, args ...interface{}) { + s := fmt.Sprintf(format, args...) + p.internalLog(calldepth, CRITICAL, s) + panic(s) +} + +func (p *PackageLogger) Panic(args ...interface{}) { + s := fmt.Sprint(args...) + p.internalLog(calldepth, CRITICAL, s) + panic(s) +} + +func (p *PackageLogger) Fatalf(format string, args ...interface{}) { + p.Logf(CRITICAL, format, args...) + os.Exit(1) +} + +func (p *PackageLogger) Fatal(args ...interface{}) { + s := fmt.Sprint(args...) + p.internalLog(calldepth, CRITICAL, s) + os.Exit(1) +} + +func (p *PackageLogger) Fatalln(args ...interface{}) { + s := fmt.Sprintln(args...) + p.internalLog(calldepth, CRITICAL, s) + os.Exit(1) +} + +// Error Functions + +func (p *PackageLogger) Errorf(format string, args ...interface{}) { + p.Logf(ERROR, format, args...) +} + +func (p *PackageLogger) Error(entries ...interface{}) { + p.internalLog(calldepth, ERROR, entries...) +} + +// Warning Functions + +func (p *PackageLogger) Warningf(format string, args ...interface{}) { + p.Logf(WARNING, format, args...) +} + +func (p *PackageLogger) Warning(entries ...interface{}) { + p.internalLog(calldepth, WARNING, entries...) +} + +// Notice Functions + +func (p *PackageLogger) Noticef(format string, args ...interface{}) { + p.Logf(NOTICE, format, args...) +} + +func (p *PackageLogger) Notice(entries ...interface{}) { + p.internalLog(calldepth, NOTICE, entries...) +} + +// Info Functions + +func (p *PackageLogger) Infof(format string, args ...interface{}) { + p.Logf(INFO, format, args...) +} + +func (p *PackageLogger) Info(entries ...interface{}) { + p.internalLog(calldepth, INFO, entries...) +} + +// Debug Functions + +func (p *PackageLogger) Debugf(format string, args ...interface{}) { + if p.level < DEBUG { + return + } + p.Logf(DEBUG, format, args...) +} + +func (p *PackageLogger) Debug(entries ...interface{}) { + if p.level < DEBUG { + return + } + p.internalLog(calldepth, DEBUG, entries...) +} + +// Trace Functions + +func (p *PackageLogger) Tracef(format string, args ...interface{}) { + if p.level < TRACE { + return + } + p.Logf(TRACE, format, args...) +} + +func (p *PackageLogger) Trace(entries ...interface{}) { + if p.level < TRACE { + return + } + p.internalLog(calldepth, TRACE, entries...) +} + +func (p *PackageLogger) Flush() { + logger.Lock() + defer logger.Unlock() + logger.formatter.Flush() +} diff --git a/deps/github.com/coreos/pkg/capnslog/syslog_formatter.go b/deps/github.com/coreos/pkg/capnslog/syslog_formatter.go new file mode 100644 index 000000000..4be5a1f2d --- /dev/null +++ b/deps/github.com/coreos/pkg/capnslog/syslog_formatter.go @@ -0,0 +1,65 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +build !windows + +package capnslog + +import ( + "fmt" + "log/syslog" +) + +func NewSyslogFormatter(w *syslog.Writer) Formatter { + return &syslogFormatter{w} +} + +func NewDefaultSyslogFormatter(tag string) (Formatter, error) { + w, err := syslog.New(syslog.LOG_DEBUG, tag) + if err != nil { + return nil, err + } + return NewSyslogFormatter(w), nil +} + +type syslogFormatter struct { + w *syslog.Writer +} + +func (s *syslogFormatter) Format(pkg string, l LogLevel, _ int, entries ...interface{}) { + for _, entry := range entries { + str := fmt.Sprint(entry) + switch l { + case CRITICAL: + s.w.Crit(str) + case ERROR: + s.w.Err(str) + case WARNING: + s.w.Warning(str) + case NOTICE: + s.w.Notice(str) + case INFO: + s.w.Info(str) + case DEBUG: + s.w.Debug(str) + case TRACE: + s.w.Debug(str) + default: + panic("Unhandled loglevel") + } + } +} + +func (s *syslogFormatter) Flush() { +} diff --git a/deps/github.com/coreos/pkg/health/README.md b/deps/github.com/coreos/pkg/health/README.md deleted file mode 100644 index 5ec34c21e..000000000 --- a/deps/github.com/coreos/pkg/health/README.md +++ /dev/null @@ -1,11 +0,0 @@ -health -==== - -A simple framework for implementing an HTTP health check endpoint on servers. - -Users implement their `health.Checkable` types, and create a `health.Checker`, from which they can get an `http.HandlerFunc` using `health.Checker.MakeHealthHandlerFunc`. - -### Documentation - -For more details, visit the docs on [gopkgdoc](http://godoc.org/github.com/coreos/pkg/health) - diff --git a/deps/github.com/coreos/pkg/health/health.go b/deps/github.com/coreos/pkg/health/health.go deleted file mode 100644 index a1c3610fa..000000000 --- a/deps/github.com/coreos/pkg/health/health.go +++ /dev/null @@ -1,127 +0,0 @@ -package health - -import ( - "expvar" - "fmt" - "log" - "net/http" - - "github.com/coreos/pkg/httputil" -) - -// Checkables should return nil when the thing they are checking is healthy, and an error otherwise. -type Checkable interface { - Healthy() error -} - -// Checker provides a way to make an endpoint which can be probed for system health. -type Checker struct { - // Checks are the Checkables to be checked when probing. - Checks []Checkable - - // Unhealthyhandler is called when one or more of the checks are unhealthy. - // If not provided DefaultUnhealthyHandler is called. - UnhealthyHandler UnhealthyHandler - - // HealthyHandler is called when all checks are healthy. - // If not provided, DefaultHealthyHandler is called. - HealthyHandler http.HandlerFunc -} - -func (c Checker) ServeHTTP(w http.ResponseWriter, r *http.Request) { - unhealthyHandler := c.UnhealthyHandler - if unhealthyHandler == nil { - unhealthyHandler = DefaultUnhealthyHandler - } - - successHandler := c.HealthyHandler - if successHandler == nil { - successHandler = DefaultHealthyHandler - } - - if r.Method != "GET" { - w.Header().Set("Allow", "GET") - w.WriteHeader(http.StatusMethodNotAllowed) - return - } - - if err := Check(c.Checks); err != nil { - unhealthyHandler(w, r, err) - return - } - - successHandler(w, r) -} - -type UnhealthyHandler func(w http.ResponseWriter, r *http.Request, err error) - -type StatusResponse struct { - Status string `json:"status"` - Details *StatusResponseDetails `json:"details,omitempty"` -} - -type StatusResponseDetails struct { - Code int `json:"code,omitempty"` - Message string `json:"message,omitempty"` -} - -func Check(checks []Checkable) (err error) { - errs := []error{} - for _, c := range checks { - if e := c.Healthy(); e != nil { - errs = append(errs, e) - } - } - - switch len(errs) { - case 0: - err = nil - case 1: - err = errs[0] - default: - err = fmt.Errorf("multiple health check failure: %v", errs) - } - - return -} - -func DefaultHealthyHandler(w http.ResponseWriter, r *http.Request) { - err := httputil.WriteJSONResponse(w, http.StatusOK, StatusResponse{ - Status: "ok", - }) - if err != nil { - // TODO(bobbyrullo): replace with logging from new logging pkg, - // once it lands. - log.Printf("Failed to write JSON response: %v", err) - } -} - -func DefaultUnhealthyHandler(w http.ResponseWriter, r *http.Request, err error) { - writeErr := httputil.WriteJSONResponse(w, http.StatusInternalServerError, StatusResponse{ - Status: "error", - Details: &StatusResponseDetails{ - Code: http.StatusInternalServerError, - Message: err.Error(), - }, - }) - if writeErr != nil { - // TODO(bobbyrullo): replace with logging from new logging pkg, - // once it lands. - log.Printf("Failed to write JSON response: %v", err) - } -} - -// ExpvarHandler is copied from https://golang.org/src/expvar/expvar.go, where it's sadly unexported. -func ExpvarHandler(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "application/json; charset=utf-8") - fmt.Fprintf(w, "{\n") - first := true - expvar.Do(func(kv expvar.KeyValue) { - if !first { - fmt.Fprintf(w, ",\n") - } - first = false - fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value) - }) - fmt.Fprintf(w, "\n}\n") -} diff --git a/deps/github.com/coreos/pkg/httputil/README.md b/deps/github.com/coreos/pkg/httputil/README.md deleted file mode 100644 index 44fa751c4..000000000 --- a/deps/github.com/coreos/pkg/httputil/README.md +++ /dev/null @@ -1,13 +0,0 @@ -httputil -==== - -Common code for dealing with HTTP. - -Includes: - -* Code for returning JSON responses. - -### Documentation - -Visit the docs on [gopkgdoc](http://godoc.org/github.com/coreos/pkg/httputil) - diff --git a/deps/github.com/coreos/pkg/httputil/cookie.go b/deps/github.com/coreos/pkg/httputil/cookie.go deleted file mode 100644 index c37a37bb2..000000000 --- a/deps/github.com/coreos/pkg/httputil/cookie.go +++ /dev/null @@ -1,21 +0,0 @@ -package httputil - -import ( - "net/http" - "time" -) - -// DeleteCookies effectively deletes all named cookies -// by wiping all data and setting to expire immediately. -func DeleteCookies(w http.ResponseWriter, cookieNames ...string) { - for _, n := range cookieNames { - c := &http.Cookie{ - Name: n, - Value: "", - Path: "/", - MaxAge: -1, - Expires: time.Time{}, - } - http.SetCookie(w, c) - } -} diff --git a/deps/github.com/coreos/pkg/httputil/json.go b/deps/github.com/coreos/pkg/httputil/json.go deleted file mode 100644 index 0b0923503..000000000 --- a/deps/github.com/coreos/pkg/httputil/json.go +++ /dev/null @@ -1,27 +0,0 @@ -package httputil - -import ( - "encoding/json" - "net/http" -) - -const ( - JSONContentType = "application/json" -) - -func WriteJSONResponse(w http.ResponseWriter, code int, resp interface{}) error { - enc, err := json.Marshal(resp) - if err != nil { - w.WriteHeader(http.StatusInternalServerError) - return err - } - - w.Header().Set("Content-Type", JSONContentType) - w.WriteHeader(code) - - _, err = w.Write(enc) - if err != nil { - return err - } - return nil -} diff --git a/deps/github.com/coreos/pkg/timeutil/backoff.go b/deps/github.com/coreos/pkg/timeutil/backoff.go deleted file mode 100644 index b34fb4966..000000000 --- a/deps/github.com/coreos/pkg/timeutil/backoff.go +++ /dev/null @@ -1,15 +0,0 @@ -package timeutil - -import ( - "time" -) - -func ExpBackoff(prev, max time.Duration) time.Duration { - if prev == 0 { - return time.Second - } - if prev > max/2 { - return max - } - return 2 * prev -} diff --git a/deps/github.com/davecgh/go-spew/spew/common.go b/deps/github.com/davecgh/go-spew/spew/common.go index 1be8ce945..7c519ff47 100644 --- a/deps/github.com/davecgh/go-spew/spew/common.go +++ b/deps/github.com/davecgh/go-spew/spew/common.go @@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) { w.Write(closeParenBytes) } -// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' +// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. diff --git a/deps/github.com/dgrijalva/jwt-go/README.md b/deps/github.com/dgrijalva/jwt-go/README.md index 25aec486c..add010377 100644 --- a/deps/github.com/dgrijalva/jwt-go/README.md +++ b/deps/github.com/dgrijalva/jwt-go/README.md @@ -1,11 +1,15 @@ -A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) +# jwt-go [![Build Status](https://travis-ci.org/dgrijalva/jwt-go.svg?branch=master)](https://travis-ci.org/dgrijalva/jwt-go) +[![GoDoc](https://godoc.org/github.com/dgrijalva/jwt-go?status.svg)](https://godoc.org/github.com/dgrijalva/jwt-go) + +A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html) -**BREAKING CHANGES:*** Version 3.0.0 is here. It includes _a lot_ of changes including a few that break the API. We've tried to break as few things as possible, so there should just be a few type signature changes. A full list of breaking changes is available in `VERSION_HISTORY.md`. See `MIGRATION_GUIDE.md` for more information on updating your code. +**NEW VERSION COMING:** There have been a lot of improvements suggested since the version 3.0.0 released in 2016. I'm working now on cutting two different releases: 3.2.0 will contain any non-breaking changes or enhancements. 4.0.0 will follow shortly which will include breaking changes. See the 4.0.0 milestone to get an idea of what's coming. If you have other ideas, or would like to participate in 4.0.0, now's the time. If you depend on this library and don't want to be interrupted, I recommend you use your dependency mangement tool to pin to version 3. -**NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided. +**SECURITY NOTICE:** Some older versions of Go have a security issue in the cryotp/elliptic. Recommendation is to upgrade to at least 1.8.3. See issue #216 for more detail. +**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided. ## What the heck is a JWT? @@ -37,7 +41,7 @@ Here's an example of an extension that integrates with the Google App Engine sig ## Compliance -This library was last reviewed to comply with [RTF 7519](http://www.rfc-editor.org/info/rfc7519) dated May 2015 with a few notable differences: +This library was last reviewed to comply with [RTF 7519](http://www.rfc-editor.org/info/rfc7519) dated May 2015 with a few notable differences: * In order to protect against accidental use of [Unsecured JWTs](http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#UnsecuredJWT), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key. @@ -47,7 +51,10 @@ This library is considered production ready. Feedback and feature requests are This project uses [Semantic Versioning 2.0.0](http://semver.org). Accepted pull requests will land on `master`. Periodically, versions will be tagged from `master`. You can find all the releases on [the project releases page](https://github.com/dgrijalva/jwt-go/releases). -While we try to make it obvious when we make breaking changes, there isn't a great mechanism for pushing announcements out to users. You may want to use this alternative package include: `gopkg.in/dgrijalva/jwt-go.v2`. It will do the right thing WRT semantic versioning. +While we try to make it obvious when we make breaking changes, there isn't a great mechanism for pushing announcements out to users. You may want to use this alternative package include: `gopkg.in/dgrijalva/jwt-go.v3`. It will do the right thing WRT semantic versioning. + +**BREAKING CHANGES:*** +* Version 3.0.0 includes _a lot_ of changes from the 2.x line, including a few that break the API. We've tried to break as few things as possible, so there should just be a few type signature changes. A full list of breaking changes is available in `VERSION_HISTORY.md`. See `MIGRATION_GUIDE.md` for more information on updating your code. ## Usage Tips @@ -68,6 +75,14 @@ Symmetric signing methods, such as HSA, use only a single secret. This is probab Asymmetric signing methods, such as RSA, use different keys for signing and verifying tokens. This makes it possible to produce tokens with a private key, and allow any consumer to access the public key for verification. +### Signing Methods and Key Types + +Each signing method expects a different object type for its signing keys. See the package documentation for details. Here are the most common ones: + +* The [HMAC signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodHMAC) (`HS256`,`HS384`,`HS512`) expect `[]byte` values for signing and validation +* The [RSA signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodRSA) (`RS256`,`RS384`,`RS512`) expect `*rsa.PrivateKey` for signing and `*rsa.PublicKey` for validation +* The [ECDSA signing method](https://godoc.org/github.com/dgrijalva/jwt-go#SigningMethodECDSA) (`ES256`,`ES384`,`ES512`) expect `*ecdsa.PrivateKey` for signing and `*ecdsa.PublicKey` for validation + ### JWT and OAuth It's worth mentioning that OAuth and JWT are not the same thing. A JWT token is simply a signed JSON object. It can be used anywhere such a thing is useful. There is some confusion, though, as JWT is the most common type of bearer token used in OAuth2 authentication. @@ -77,7 +92,7 @@ Without going too far down the rabbit hole, here's a description of the interact * OAuth is a protocol for allowing an identity provider to be separate from the service a user is logging in to. For example, whenever you use Facebook to log into a different service (Yelp, Spotify, etc), you are using OAuth. * OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token. * Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL. - + ## More Documentation can be found [on godoc.org](http://godoc.org/github.com/dgrijalva/jwt-go). diff --git a/deps/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md b/deps/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md index c21551f6b..637029831 100644 --- a/deps/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md +++ b/deps/github.com/dgrijalva/jwt-go/VERSION_HISTORY.md @@ -1,5 +1,12 @@ ## `jwt-go` Version History +#### 3.2.0 + +* Added method `ParseUnverified` to allow users to split up the tasks of parsing and validation +* HMAC signing method returns `ErrInvalidKeyType` instead of `ErrInvalidKey` where appropriate +* Added options to `request.ParseFromRequest`, which allows for an arbitrary list of modifiers to parsing behavior. Initial set include `WithClaims` and `WithParser`. Existing usage of this function will continue to work as before. +* Deprecated `ParseFromRequestWithClaims` to simplify API in the future. + #### 3.1.0 * Improvements to `jwt` command line tool diff --git a/deps/github.com/dgrijalva/jwt-go/ecdsa.go b/deps/github.com/dgrijalva/jwt-go/ecdsa.go index 2f59a2223..f97738124 100644 --- a/deps/github.com/dgrijalva/jwt-go/ecdsa.go +++ b/deps/github.com/dgrijalva/jwt-go/ecdsa.go @@ -14,6 +14,7 @@ var ( ) // Implements the ECDSA family of signing methods signing methods +// Expects *ecdsa.PrivateKey for signing and *ecdsa.PublicKey for verification type SigningMethodECDSA struct { Name string Hash crypto.Hash diff --git a/deps/github.com/dgrijalva/jwt-go/hmac.go b/deps/github.com/dgrijalva/jwt-go/hmac.go index c22991925..addbe5d40 100644 --- a/deps/github.com/dgrijalva/jwt-go/hmac.go +++ b/deps/github.com/dgrijalva/jwt-go/hmac.go @@ -7,6 +7,7 @@ import ( ) // Implements the HMAC-SHA family of signing methods signing methods +// Expects key type of []byte for both signing and validation type SigningMethodHMAC struct { Name string Hash crypto.Hash @@ -90,5 +91,5 @@ func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) (string, return EncodeSegment(hasher.Sum(nil)), nil } - return "", ErrInvalidKey + return "", ErrInvalidKeyType } diff --git a/deps/github.com/dgrijalva/jwt-go/parser.go b/deps/github.com/dgrijalva/jwt-go/parser.go index 7bf1c4ea0..d6901d9ad 100644 --- a/deps/github.com/dgrijalva/jwt-go/parser.go +++ b/deps/github.com/dgrijalva/jwt-go/parser.go @@ -21,55 +21,9 @@ func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) { } func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) { - parts := strings.Split(tokenString, ".") - if len(parts) != 3 { - return nil, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed) - } - - var err error - token := &Token{Raw: tokenString} - - // parse Header - var headerBytes []byte - if headerBytes, err = DecodeSegment(parts[0]); err != nil { - if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") { - return token, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed) - } - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - if err = json.Unmarshal(headerBytes, &token.Header); err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // parse Claims - var claimBytes []byte - token.Claims = claims - - if claimBytes, err = DecodeSegment(parts[1]); err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - dec := json.NewDecoder(bytes.NewBuffer(claimBytes)) - if p.UseJSONNumber { - dec.UseNumber() - } - // JSON Decode. Special case for map type to avoid weird pointer behavior - if c, ok := token.Claims.(MapClaims); ok { - err = dec.Decode(&c) - } else { - err = dec.Decode(&claims) - } - // Handle decode error + token, parts, err := p.ParseUnverified(tokenString, claims) if err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // Lookup signature method - if method, ok := token.Header["alg"].(string); ok { - if token.Method = GetSigningMethod(method); token.Method == nil { - return token, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable) - } - } else { - return token, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable) + return token, err } // Verify signing method is in the required set @@ -96,6 +50,9 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf } if key, err = keyFunc(token); err != nil { // keyFunc returned an error + if ve, ok := err.(*ValidationError); ok { + return token, ve + } return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable} } @@ -129,3 +86,63 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf return token, vErr } + +// WARNING: Don't use this method unless you know what you're doing +// +// This method parses the token but doesn't validate the signature. It's only +// ever useful in cases where you know the signature is valid (because it has +// been checked previously in the stack) and you want to extract values from +// it. +func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Token, parts []string, err error) { + parts = strings.Split(tokenString, ".") + if len(parts) != 3 { + return nil, parts, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed) + } + + token = &Token{Raw: tokenString} + + // parse Header + var headerBytes []byte + if headerBytes, err = DecodeSegment(parts[0]); err != nil { + if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") { + return token, parts, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed) + } + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + if err = json.Unmarshal(headerBytes, &token.Header); err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + + // parse Claims + var claimBytes []byte + token.Claims = claims + + if claimBytes, err = DecodeSegment(parts[1]); err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + dec := json.NewDecoder(bytes.NewBuffer(claimBytes)) + if p.UseJSONNumber { + dec.UseNumber() + } + // JSON Decode. Special case for map type to avoid weird pointer behavior + if c, ok := token.Claims.(MapClaims); ok { + err = dec.Decode(&c) + } else { + err = dec.Decode(&claims) + } + // Handle decode error + if err != nil { + return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} + } + + // Lookup signature method + if method, ok := token.Header["alg"].(string); ok { + if token.Method = GetSigningMethod(method); token.Method == nil { + return token, parts, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable) + } + } else { + return token, parts, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable) + } + + return token, parts, nil +} diff --git a/deps/github.com/dgrijalva/jwt-go/parser_test.go b/deps/github.com/dgrijalva/jwt-go/parser_test.go index f8ad6f908..390779785 100644 --- a/deps/github.com/dgrijalva/jwt-go/parser_test.go +++ b/deps/github.com/dgrijalva/jwt-go/parser_test.go @@ -247,6 +247,46 @@ func TestParser_Parse(t *testing.T) { } } +func TestParser_ParseUnverified(t *testing.T) { + privateKey := test.LoadRSAPrivateKeyFromDisk("test/sample_key") + + // Iterate over test data set and run tests + for _, data := range jwtTestData { + // If the token string is blank, use helper function to generate string + if data.tokenString == "" { + data.tokenString = test.MakeSampleToken(data.claims, privateKey) + } + + // Parse the token + var token *jwt.Token + var err error + var parser = data.parser + if parser == nil { + parser = new(jwt.Parser) + } + // Figure out correct claims type + switch data.claims.(type) { + case jwt.MapClaims: + token, _, err = parser.ParseUnverified(data.tokenString, jwt.MapClaims{}) + case *jwt.StandardClaims: + token, _, err = parser.ParseUnverified(data.tokenString, &jwt.StandardClaims{}) + } + + if err != nil { + t.Errorf("[%v] Invalid token", data.name) + } + + // Verify result matches expectation + if !reflect.DeepEqual(data.claims, token.Claims) { + t.Errorf("[%v] Claims mismatch. Expecting: %v Got: %v", data.name, data.claims, token.Claims) + } + + if data.valid && err != nil { + t.Errorf("[%v] Error while verifying token: %T:%v", data.name, err, err) + } + } +} + // Helper method for benchmarking various methods func benchmarkSigning(b *testing.B, method jwt.SigningMethod, key interface{}) { t := jwt.New(method) diff --git a/deps/github.com/dgrijalva/jwt-go/request/request.go b/deps/github.com/dgrijalva/jwt-go/request/request.go index 1807b3965..70525cfac 100644 --- a/deps/github.com/dgrijalva/jwt-go/request/request.go +++ b/deps/github.com/dgrijalva/jwt-go/request/request.go @@ -9,16 +9,60 @@ import ( // This behaves the same as Parse, but accepts a request and an extractor // instead of a token string. The Extractor interface allows you to define // the logic for extracting a token. Several useful implementations are provided. -func ParseFromRequest(req *http.Request, extractor Extractor, keyFunc jwt.Keyfunc) (token *jwt.Token, err error) { - return ParseFromRequestWithClaims(req, extractor, jwt.MapClaims{}, keyFunc) +// +// You can provide options to modify parsing behavior +func ParseFromRequest(req *http.Request, extractor Extractor, keyFunc jwt.Keyfunc, options ...ParseFromRequestOption) (token *jwt.Token, err error) { + // Create basic parser struct + p := &fromRequestParser{req, extractor, nil, nil} + + // Handle options + for _, option := range options { + option(p) + } + + // Set defaults + if p.claims == nil { + p.claims = jwt.MapClaims{} + } + if p.parser == nil { + p.parser = &jwt.Parser{} + } + + // perform extract + tokenString, err := p.extractor.ExtractToken(req) + if err != nil { + return nil, err + } + + // perform parse + return p.parser.ParseWithClaims(tokenString, p.claims, keyFunc) } // ParseFromRequest but with custom Claims type +// DEPRECATED: use ParseFromRequest and the WithClaims option func ParseFromRequestWithClaims(req *http.Request, extractor Extractor, claims jwt.Claims, keyFunc jwt.Keyfunc) (token *jwt.Token, err error) { - // Extract token from request - if tokStr, err := extractor.ExtractToken(req); err == nil { - return jwt.ParseWithClaims(tokStr, claims, keyFunc) - } else { - return nil, err + return ParseFromRequest(req, extractor, keyFunc, WithClaims(claims)) +} + +type fromRequestParser struct { + req *http.Request + extractor Extractor + claims jwt.Claims + parser *jwt.Parser +} + +type ParseFromRequestOption func(*fromRequestParser) + +// Parse with custom claims +func WithClaims(claims jwt.Claims) ParseFromRequestOption { + return func(p *fromRequestParser) { + p.claims = claims + } +} + +// Parse using a custom parser +func WithParser(parser *jwt.Parser) ParseFromRequestOption { + return func(p *fromRequestParser) { + p.parser = parser } } diff --git a/deps/github.com/dgrijalva/jwt-go/rsa.go b/deps/github.com/dgrijalva/jwt-go/rsa.go index 0ae0b1984..e4caf1ca4 100644 --- a/deps/github.com/dgrijalva/jwt-go/rsa.go +++ b/deps/github.com/dgrijalva/jwt-go/rsa.go @@ -7,6 +7,7 @@ import ( ) // Implements the RSA family of signing methods signing methods +// Expects *rsa.PrivateKey for signing and *rsa.PublicKey for validation type SigningMethodRSA struct { Name string Hash crypto.Hash @@ -44,7 +45,7 @@ func (m *SigningMethodRSA) Alg() string { } // Implements the Verify method from SigningMethod -// For this signing method, must be an rsa.PublicKey structure. +// For this signing method, must be an *rsa.PublicKey structure. func (m *SigningMethodRSA) Verify(signingString, signature string, key interface{}) error { var err error @@ -73,7 +74,7 @@ func (m *SigningMethodRSA) Verify(signingString, signature string, key interface } // Implements the Sign method from SigningMethod -// For this signing method, must be an rsa.PrivateKey structure. +// For this signing method, must be an *rsa.PrivateKey structure. func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) { var rsaKey *rsa.PrivateKey var ok bool diff --git a/deps/github.com/dgrijalva/jwt-go/rsa_test.go b/deps/github.com/dgrijalva/jwt-go/rsa_test.go index 2e0f78536..7f67c5db1 100644 --- a/deps/github.com/dgrijalva/jwt-go/rsa_test.go +++ b/deps/github.com/dgrijalva/jwt-go/rsa_test.go @@ -114,6 +114,7 @@ func TestRSAWithPreParsedPrivateKey(t *testing.T) { func TestRSAKeyParsing(t *testing.T) { key, _ := ioutil.ReadFile("test/sample_key") + secureKey, _ := ioutil.ReadFile("test/privateSecure.pem") pubKey, _ := ioutil.ReadFile("test/sample_key.pub") badKey := []byte("All your base are belong to key") @@ -130,6 +131,14 @@ func TestRSAKeyParsing(t *testing.T) { t.Errorf("Parsed invalid key as valid private key: %v", k) } + if _, e := jwt.ParseRSAPrivateKeyFromPEMWithPassword(secureKey, "password"); e != nil { + t.Errorf("Failed to parse valid private key with password: %v", e) + } + + if k, e := jwt.ParseRSAPrivateKeyFromPEMWithPassword(secureKey, "123132"); e == nil { + t.Errorf("Parsed private key with invalid password %v", k) + } + // Test parsePublicKey if _, e := jwt.ParseRSAPublicKeyFromPEM(pubKey); e != nil { t.Errorf("Failed to parse valid public key: %v", e) diff --git a/deps/github.com/dgrijalva/jwt-go/rsa_utils.go b/deps/github.com/dgrijalva/jwt-go/rsa_utils.go index 213a90dbb..a5ababf95 100644 --- a/deps/github.com/dgrijalva/jwt-go/rsa_utils.go +++ b/deps/github.com/dgrijalva/jwt-go/rsa_utils.go @@ -39,6 +39,38 @@ func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) { return pkey, nil } +// Parse PEM encoded PKCS1 or PKCS8 private key protected with password +func ParseRSAPrivateKeyFromPEMWithPassword(key []byte, password string) (*rsa.PrivateKey, error) { + var err error + + // Parse PEM block + var block *pem.Block + if block, _ = pem.Decode(key); block == nil { + return nil, ErrKeyMustBePEMEncoded + } + + var parsedKey interface{} + + var blockDecrypted []byte + if blockDecrypted, err = x509.DecryptPEMBlock(block, []byte(password)); err != nil { + return nil, err + } + + if parsedKey, err = x509.ParsePKCS1PrivateKey(blockDecrypted); err != nil { + if parsedKey, err = x509.ParsePKCS8PrivateKey(blockDecrypted); err != nil { + return nil, err + } + } + + var pkey *rsa.PrivateKey + var ok bool + if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok { + return nil, ErrNotRSAPrivateKey + } + + return pkey, nil +} + // Parse PEM encoded PKCS1 or PKCS8 public key func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) { var err error diff --git a/deps/github.com/dgrijalva/jwt-go/test/privateSecure.pem b/deps/github.com/dgrijalva/jwt-go/test/privateSecure.pem new file mode 100644 index 000000000..8537e0743 --- /dev/null +++ b/deps/github.com/dgrijalva/jwt-go/test/privateSecure.pem @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: DES-EDE3-CBC,7487BB8910A3741B + +iL7m48mbFSIy1Y5xbXWwPTR07ufxu7o+myGUE+AdDeWWISkd5W6Gl44oX/jgXldS +mL/ntUXoZzQz2WKEYLwssAtSTGF+QgSIMvV5faiP+pLYvWgk0oVr42po00CvADFL +eDAJC7LgagYifS1l4EAK4MY8RGCHyJWEN5JAr0fc/Haa3WfWZ009kOWAp8MDuYxB +hQlCKUmnUpXCp5c6jwbjlyinLj8XwzzjZ/rVRsY+t2Z0Vc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+7kqvnsQm8y76vjug3p4IbEbHp/fNGf+gv7KDng1HyCl9A+ +Ow/Hlr0NqCAIhminScbRsZ4SgbRTRgGEYZXvyOtQa/uL6I8t2NR4W7ynispMs0QL +RD61i3++bQXuTi4i8dg3yqIfe9S22NHSzZY/lAHAmmc3r5NrQ1TM1hsSxXawT5CU +anWFjbH6YQ/QplkkAqZMpropWn6ZdNDg/+BUjukDs0HZrbdGy846WxQUvE7G2bAw +IFQ1SymBZBtfnZXhfAXOHoWh017p6HsIkb2xmFrigMj7Jh10VVhdWg== +-----END RSA PRIVATE KEY----- diff --git a/deps/github.com/docker/docker/AUTHORS b/deps/github.com/docker/docker/AUTHORS new file mode 100644 index 000000000..e091ed7dc --- /dev/null +++ b/deps/github.com/docker/docker/AUTHORS @@ -0,0 +1,1885 @@ +# This file lists all individuals having contributed content to the repository. +# For how it is generated, see `hack/generate-authors.sh`. + +Aanand Prasad +Aaron Davidson +Aaron Feng +Aaron Huslage +Aaron L. Xu +Aaron Lehmann +Aaron Welch +Aaron.L.Xu +Abel Muiño +Abhijeet Kasurde +Abhinandan Prativadi +Abhinav Ajgaonkar +Abhishek Chanda +Abhishek Sharma +Abin Shahab +Adam Avilla +Adam Eijdenberg +Adam Kunk +Adam Miller +Adam Mills +Adam Singer +Adam Walz +Addam Hardy +Aditi Rajagopal +Aditya +Adolfo Ochagavía +Adria Casas +Adrian Moisey +Adrian Mouat +Adrian Oprea +Adrien Folie +Adrien Gallouët +Ahmed Kamal +Ahmet Alp Balkan +Aidan Feldman +Aidan Hobson Sayers +AJ Bowen +Ajey Charantimath +ajneu +Akihiro Matsushima +Akihiro Suda +Akira Koyasu +Akshay Karle +Al Tobey +alambike +Alan Scherger +Alan Thompson +Albert Callarisa +Albert Zhang +Aleksa Sarai +Aleksandrs Fadins +Alena Prokharchyk +Alessandro Boch +Alessio Biancalana +Alex Chan +Alex Chen +Alex Coventry +Alex Crawford +Alex Ellis +Alex Gaynor +Alex Olshansky +Alex Samorukov +Alex Warhawk +Alexander Artemenko +Alexander Boyd +Alexander Larsson +Alexander Midlash +Alexander Morozov +Alexander Shopov +Alexandre Beslic +Alexandre Garnier +Alexandre González +Alexandru Sfirlogea +Alexey Guskov +Alexey Kotlyarov +Alexey Shamrin +Alexis THOMAS +Alfred Landrum +Ali Dehghani +Alicia Lauerman +Alihan Demir +Allen Madsen +Allen Sun +almoehi +Alvaro Saurin +Alvin Deng +Alvin Richards +amangoel +Amen Belayneh +Amir Goldstein +Amit Bakshi +Amit Krishnan +Amit Shukla +Amy Lindburg +Anand Patil +AnandkumarPatel +Anatoly Borodin +Anchal Agrawal +Anders Janmyr +Andre Dublin <81dublin@gmail.com> +Andre Granovsky +Andrea Luzzardi +Andrea Turli +Andreas Köhler +Andreas Savvides +Andreas Tiefenthaler +Andrei Gherzan +Andrew C. Bodine +Andrew Clay Shafer +Andrew Duckworth +Andrew France +Andrew Gerrand +Andrew Guenther +Andrew Hsu +Andrew Kuklewicz +Andrew Macgregor +Andrew Macpherson +Andrew Martin +Andrew McDonnell +Andrew Munsell +Andrew Po +Andrew Weiss +Andrew Williams +Andrews Medina +Andrey Petrov +Andrey Stolbovsky +André Martins +andy +Andy Chambers +andy diller +Andy Goldstein +Andy Kipp +Andy Rothfusz +Andy Smith +Andy Wilson +Anes Hasicic +Anil Belur +Anil Madhavapeddy +Ankush Agarwal +Anonmily +Anran Qiao +Anthon van der Neut +Anthony Baire +Anthony Bishopric +Anthony Dahanne +Anthony Sottile +Anton Löfgren +Anton Nikitin +Anton Polonskiy +Anton Tiurin +Antonio Murdaca +Antonis Kalipetis +Antony Messerli +Anuj Bahuguna +Anusha Ragunathan +apocas +Arash Deshmeh +ArikaChen +Arnaud Lefebvre +Arnaud Porterie +Arthur Barr +Arthur Gautier +Artur Meyster +Arun Gupta +Asbjørn Enge +averagehuman +Avi Das +Avi Miller +Avi Vaid +ayoshitake +Azat Khuyiyakhmetov +Bardia Keyoumarsi +Barnaby Gray +Barry Allard +Bartłomiej Piotrowski +Bastiaan Bakker +bdevloed +Ben Bonnefoy +Ben Firshman +Ben Golub +Ben Hall +Ben Sargent +Ben Severson +Ben Toews +Ben Wiklund +Benjamin Atkin +Benjamin Boudreau +Benoit Chesneau +Bernerd Schaefer +Bert Goethals +Bharath Thiruveedula +Bhiraj Butala +Bhumika Bayani +Bilal Amarni +Bill W +bin liu +Bingshen Wang +Blake Geno +Boaz Shuster +bobby abbott +Boris Pruessmann +Boshi Lian +boucher +Bouke Haarsma +Boyd Hemphill +boynux +Bradley Cicenas +Bradley Wright +Brandon Liu +Brandon Philips +Brandon Rhodes +Brendan Dixon +Brent Salisbury +Brett Higgins +Brett Kochendorfer +Brian (bex) Exelbierd +Brian Bland +Brian DeHamer +Brian Dorsey +Brian Flad +Brian Goff +Brian McCallister +Brian Olsen +Brian Schwind +Brian Shumate +Brian Torres-Gil +Brian Trump +Brice Jaglin +Briehan Lombaard +Bruno Bigras +Bruno Binet +Bruno Gazzera +Bruno Renié +Bruno Tavares +Bryan Bess +Bryan Boreham +Bryan Matsuo +Bryan Murphy +buddhamagnet +Burke Libbey +Byung Kang +Caleb Spare +Calen Pennington +Cameron Boehmer +Cameron Spear +Campbell Allen +Candid Dauth +Cao Weiwei +Carl Henrik Lunde +Carl Loa Odin +Carl X. Su +Carlos Alexandro Becker +Carlos Sanchez +Carol Fager-Higgins +Cary +Casey Bisson +Ce Gao +Cedric Davies +Cezar Sa Espinola +Chad Swenson +Chance Zibolski +Chander G +Charles Chan +Charles Hooper +Charles Law +Charles Lindsay +Charles Merriam +Charles Sarrazin +Charles Smith +Charlie Drage +Charlie Lewis +Chase Bolt +ChaYoung You +Chen Chao +Chen Chuanliang +Chen Hanxiao +Chen Min +Chen Mingjie +Chen Qiu +Chewey +Chia-liang Kao +chli +Cholerae Hu +Chris Alfonso +Chris Armstrong +Chris Dias +Chris Dituri +Chris Fordham +Chris Gavin +Chris Gibson +Chris Khoo +Chris McKinnel +Chris McKinnel +Chris Seto +Chris Snow +Chris St. Pierre +Chris Stivers +Chris Swan +Chris Wahl +Chris Weyl +Christian Berendt +Christian Böhme +Christian Persson +Christian Rotzoll +Christian Simon +Christian Stefanescu +ChristoperBiscardi +Christophe Mehay +Christophe Troestler +Christopher Currie +Christopher Jones +Christopher Latham +Christopher Rigor +Christy Perez +Chun Chen +Ciro S. Costa +Clayton Coleman +Clinton Kitson +Coenraad Loubser +Colin Dunklau +Colin Hebert +Colin Rice +Colin Walters +Collin Guarino +Colm Hally +companycy +Corey Farrell +Cory Forsyth +cressie176 +CrimsonGlory +Cristian Staretu +cristiano balducci +Cruceru Calin-Cristian +CUI Wei +Cyprian Gracz +Cyril F +Daan van Berkel +Daehyeok Mun +Dafydd Crosby +dalanlan +Damian Smyth +Damien Nadé +Damien Nozay +Damjan Georgievski +Dan Anolik +Dan Buch +Dan Cotora +Dan Feldman +Dan Griffin +Dan Hirsch +Dan Keder +Dan Levy +Dan McPherson +Dan Stine +Dan Williams +Daniel Antlinger +Daniel Exner +Daniel Farrell +Daniel Garcia +Daniel Gasienica +Daniel Grunwell +Daniel Hiltgen +Daniel J Walsh +Daniel Menet +Daniel Mizyrycki +Daniel Nephin +Daniel Norberg +Daniel Nordberg +Daniel Robinson +Daniel S +Daniel Von Fange +Daniel X Moore +Daniel YC Lin +Daniel Zhang +Daniel, Dao Quang Minh +Danny Berger +Danny Yates +Darren Coxall +Darren Shepherd +Darren Stahl +Dattatraya Kumbhar +Davanum Srinivas +Dave Barboza +Dave Henderson +Dave MacDonald +Dave Tucker +David Anderson +David Calavera +David Corking +David Cramer +David Currie +David Davis +David Dooling +David Gageot +David Gebler +David Glasser +David Lawrence +David Lechner +David M. Karr +David Mackey +David Mat +David Mcanulty +David McKay +David Pelaez +David R. Jenni +David Röthlisberger +David Sheets +David Sissitka +David Trott +David Williamson +David Xia +David Young +Davide Ceretti +Dawn Chen +dbdd +dcylabs +Deborah Gertrude Digges +deed02392 +Deng Guangxing +Deni Bertovic +Denis Defreyne +Denis Gladkikh +Denis Ollier +Dennis Chen +Dennis Docter +Derek +Derek +Derek Ch +Derek McGowan +Deric Crago +Deshi Xiao +devmeyster +Devvyn Murphy +Dharmit Shah +Dhawal Yogesh Bhanushali +Diego Romero +Diego Siqueira +Dieter Reuter +Dillon Dixon +Dima Stopel +Dimitri John Ledkov +Dimitris Rozakis +Dimitry Andric +Dinesh Subhraveti +Ding Fei +Diogo Monica +DiuDiugirl +Djibril Koné +dkumor +Dmitri Logvinenko +Dmitri Shuralyov +Dmitry Demeshchuk +Dmitry Gusev +Dmitry Kononenko +Dmitry Shyshkin +Dmitry Smirnov +Dmitry V. Krivenok +Dmitry Vorobev +Dolph Mathews +Dominik Dingel +Dominik Finkbeiner +Dominik Honnef +Don Kirkby +Don Kjer +Don Spaulding +Donald Huang +Dong Chen +Donovan Jones +Doron Podoleanu +Doug Davis +Doug MacEachern +Doug Tangren +Dr Nic Williams +dragon788 +Dražen Lučanin +Drew Erny +Dustin Sallings +Ed Costello +Edmund Wagner +Eiichi Tsukata +Eike Herzbach +Eivin Giske Skaaren +Eivind Uggedal +Elan Ruusamäe +Elena Morozova +Elias Faxö +Elias Probst +Elijah Zupancic +eluck +Elvir Kuric +Emil Hernvall +Emily Maier +Emily Rose +Emir Ozer +Enguerran +Eohyung Lee +epeterso +Eric Barch +Eric Curtin +Eric G. Noriega +Eric Hanchrow +Eric Lee +Eric Myhre +Eric Paris +Eric Rafaloff +Eric Rosenberg +Eric Sage +Eric Yang +Eric-Olivier Lamey +Erica Windisch +Erik Bray +Erik Dubbelboer +Erik Hollensbe +Erik Inge Bolsø +Erik Kristensen +Erik St. Martin +Erik Weathers +Erno Hopearuoho +Erwin van der Koogh +Euan +Eugene Yakubovich +eugenkrizo +evalle +Evan Allrich +Evan Carmi +Evan Hazlett +Evan Hazlett +Evan Krall +Evan Phoenix +Evan Wies +Evelyn Xu +Everett Toews +Evgeny Vereshchagin +Ewa Czechowska +Eystein Måløy Stenberg +ezbercih +Ezra Silvera +Fabian Lauer +Fabiano Rosas +Fabio Falci +Fabio Kung +Fabio Rapposelli +Fabio Rehm +Fabrizio Regini +Fabrizio Soppelsa +Faiz Khan +falmp +Fangyuan Gao <21551127@zju.edu.cn> +Fareed Dudhia +Fathi Boudra +Federico Gimenez +Felipe Oliveira +Felix Abecassis +Felix Geisendörfer +Felix Hupfeld +Felix Rabe +Felix Ruess +Felix Schindler +Fengtu Wang +Ferenc Szabo +Fernando +Fero Volar +Ferran Rodenas +Filipe Brandenburger +Filipe Oliveira +fl0yd +Flavio Castelli +Flavio Crisciani +FLGMwt +Florian +Florian Klein +Florian Maier +Florian Weingarten +Florin Asavoaie +fonglh +fortinux +Foysal Iqbal +Francesc Campoy +Francis Chuang +Francisco Carriedo +Francisco Souza +Frank Groeneveld +Frank Herrmann +Frank Macreery +Frank Rosquin +Fred Lifton +Frederick F. Kautz IV +Frederik Loeffert +Frederik Nordahl Jul Sabroe +Freek Kalter +frosforever +fy2462 +Félix Baylac-Jacqué +Félix Cantournet +Gabe Rosenhouse +Gabor Nagy +Gabriel Linder +Gabriel Monroy +Gabriel Nicolas Avellaneda +Gaetan de Villele +Galen Sampson +Gang Qiao +Gareth Rushgrove +Garrett Barboza +Gary Schaetz +Gaurav +gautam, prasanna +Gaël PORTAY +Genki Takiuchi +GennadySpb +Geoffrey Bachelet +George Kontridze +George MacRorie +George Xie +Georgi Hristozov +Gereon Frey +German DZ +Gert van Valkenhoef +Gerwim +Giampaolo Mancini +Gianluca Borello +Gildas Cuisinier +gissehel +Giuseppe Mazzotta +Gleb Fotengauer-Malinovskiy +Gleb M Borisov +Glyn Normington +GoBella +Goffert van Gool +Gopikannan Venugopalsamy +Gosuke Miyashita +Gou Rao +Govinda Fichtner +Grant Reaber +Graydon Hoare +Greg Fausak +Greg Pflaum +Greg Thornton +Grzegorz Jaśkiewicz +Guilhem Lettron +Guilherme Salgado +Guillaume Dufour +Guillaume J. Charmes +guoxiuyan +Gurjeet Singh +Guruprasad +Gustav Sinder +gwx296173 +Günter Zöchbauer +Hans Kristian Flaatten +Hans Rødtang +Hao Shu Wei +Hao Zhang <21521210@zju.edu.cn> +Harald Albers +Harley Laue +Harold Cooper +Harry Zhang +Harshal Patil +Harshal Patil +He Simei +He Xin +heartlock <21521209@zju.edu.cn> +Hector Castro +Helen Xie +Henning Sprang +Hobofan +Hollie Teal +Hong Xu +Hongbin Lu +hsinko <21551195@zju.edu.cn> +Hu Keping +Hu Tao +Huanzhong Zhang +Huayi Zhang +Hugo Duncan +Hugo Marisco <0x6875676f@gmail.com> +Hunter Blanks +huqun +Huu Nguyen +hyeongkyu.lee +hyp3rdino +Hyzhou Zhy +Ian Babrou +Ian Bishop +Ian Bull +Ian Calvert +Ian Campbell +Ian Lee +Ian Main +Ian Philpot +Ian Truslove +Iavael +Icaro Seara +Ignacio Capurro +Igor Dolzhikov +Iliana Weller +Ilkka Laukkanen +Ilya Dmitrichenko +Ilya Gusev +ILYA Khlopotov +imre Fitos +inglesp +Ingo Gottwald +Isaac Dupree +Isabel Jimenez +Isao Jonas +Ivan Babrou +Ivan Fraixedes +Ivan Grcic +Ivan Markin +J Bruni +J. Nunn +Jack Danger Canty +Jacob Atzen +Jacob Edelman +Jacob Tomlinson +Jacob Wen +Jake Champlin +Jake Moshenko +Jake Sanders +jakedt +James Allen +James Carey +James Carr +James DeFelice +James Harrison Fisher +James Kyburz +James Kyle +James Lal +James Mills +James Nesbitt +James Nugent +James Turnbull +Jamie Hannaford +Jamshid Afshar +Jan Keromnes +Jan Koprowski +Jan Pazdziora +Jan Toebes +Jan-Gerd Tenberge +Jan-Jaap Driessen +Jana Radhakrishnan +Jannick Fahlbusch +Janonymous +Januar Wayong +Jared Biel +Jared Hocutt +Jaroslaw Zabiello +jaseg +Jasmine Hegman +Jason Divock +Jason Giedymin +Jason Green +Jason Hall +Jason Heiss +Jason Livesay +Jason McVetta +Jason Plum +Jason Shepherd +Jason Smith +Jason Sommer +Jason Stangroome +jaxgeller +Jay +Jay +Jay Kamat +Jean-Baptiste Barth +Jean-Baptiste Dalido +Jean-Christophe Berthon +Jean-Paul Calderone +Jean-Pierre Huynh +Jean-Tiare Le Bigot +Jeff Anderson +Jeff Johnston +Jeff Lindsay +Jeff Mickey +Jeff Minard +Jeff Nickoloff +Jeff Silberman +Jeff Welch +Jeffrey Bolle +Jeffrey Morgan +Jeffrey van Gogh +Jenny Gebske +Jeremy Chambers +Jeremy Grosser +Jeremy Price +Jeremy Qian +Jeremy Unruh +Jeremy Yallop +Jeroen Jacobs +Jesse Dearing +Jesse Dubay +Jessica Frazelle +Jezeniel Zapanta +jgeiger +Jhon Honce +Ji.Zhilong +Jian Zhang +jianbosun +Jie Luo +Jilles Oldenbeuving +Jim Alateras +Jim Galasyn +Jim Minter +Jim Perrin +Jimmy Cuadra +Jimmy Puckett +Jimmy Song +jimmyxian +Jinsoo Park +Jiri Popelka +Jiuyue Ma +Jiří Župka +jjy +jmzwcn +Joao Fernandes +Joe Beda +Joe Doliner +Joe Ferguson +Joe Gordon +Joe Shaw +Joe Van Dyk +Joel Friedly +Joel Handwell +Joel Hansson +Joel Wurtz +Joey Geiger +Joey Gibson +Joffrey F +Johan Euphrosine +Johan Rydberg +Johanan Lieberman +Johannes 'fish' Ziemke +John Costa +John Feminella +John Gardiner Myers +John Gossman +John Harris +John Howard (VM) +John Laswell +John Maguire +John Mulhausen +John OBrien III +John Starks +John Stephens +John Tims +John V. Martinez +John Warwick +John Willis +Jon Johnson +Jon Wedaman +Jonas Pfenniger +Jonathan A. Sternberg +Jonathan Boulle +Jonathan Camp +Jonathan Dowland +Jonathan Lebon +Jonathan Lomas +Jonathan McCrohan +Jonathan Mueller +Jonathan Pares +Jonathan Rudenberg +Jonathan Stoppani +Jonh Wendell +Joni Sar +Joost Cassee +Jordan +Jordan Arentsen +Jordan Sissel +Jorge Marin +Jose Diaz-Gonzalez +Joseph Anthony Pasquale Holsten +Joseph Hager +Joseph Kern +Joseph Rothrock +Josh +Josh Bodah +Josh Chorlton +Josh Eveleth +Josh Hawn +Josh Horwitz +Josh Poimboeuf +Josh Soref +Josh Wilson +Josiah Kiehl +José Tomás Albornoz +JP +jrabbit +jroenf +Julian Taylor +Julien Barbier +Julien Bisconti +Julien Bordellier +Julien Dubois +Julien Kassar +Julien Maitrehenry +Julien Pervillé +Julio Montes +Jun-Ru Chang +Jussi Nummelin +Justas Brazauskas +Justin Cormack +Justin Force +Justin Menga +Justin Plock +Justin Simonelis +Justin Terry +Justyn Temme +Jyrki Puttonen +Jérôme Petazzoni +Jörg Thalheim +K. Heller +Kai Blin +Kai Qiang Wu(Kennan) +Kamil Domański +kamjar gerami +Kanstantsin Shautsou +Kara Alexandra +Karan Lyons +Kareem Khazem +kargakis +Karl Grzeszczak +Karol Duleba +Karthik Nayak +Katie McLaughlin +Kato Kazuyoshi +Katrina Owen +Kawsar Saiyeed +Kay Yan +kayrus +Ke Li +Ke Xu +Kei Ohmura +Keith Hudgins +Keli Hu +Ken Cochrane +Ken Herner +Ken ICHIKAWA +Kenfe-Mickaël Laventure +Kenjiro Nakayama +Kent Johnson +Kevin "qwazerty" Houdebert +Kevin Burke +Kevin Clark +Kevin Feyrer +Kevin J. Lynagh +Kevin Jing Qiu +Kevin Kern +Kevin Menard +Kevin P. Kucharczyk +Kevin Richardson +Kevin Shi +Kevin Wallace +Kevin Yap +kevinmeredith +Keyvan Fatehi +kies +Kim BKC Carlbacker +Kim Eik +Kimbro Staken +Kir Kolyshkin +Kiran Gangadharan +Kirill Kolyshkin +Kirill SIbirev +knappe +Kohei Tsuruta +Koichi Shiraishi +Konrad Kleine +Konstantin Gribov +Konstantin L +Konstantin Pelykh +Krasi Georgiev +Krasimir Georgiev +Kris-Mikael Krister +Kristian Haugene +Kristina Zabunova +krrg +Kun Zhang +Kunal Kushwaha +Kyle Conroy +Kyle Linden +kyu +Lachlan Coote +Lai Jiangshan +Lajos Papp +Lakshan Perera +Lalatendu Mohanty +Lance Chen +Lance Kinley +Lars Butler +Lars Kellogg-Stedman +Lars R. Damerow +Lars-Magnus Skog +Laszlo Meszaros +Laura Frank +Laurent Erignoux +Laurie Voss +Leandro Siqueira +Lee Chao <932819864@qq.com> +Lee, Meng-Han +leeplay +Lei Jitang +Len Weincier +Lennie +Leo Gallucci +Leszek Kowalski +Levi Blackstone +Levi Gross +Lewis Daly +Lewis Marshall +Lewis Peckover +Liam Macgillavry +Liana Lo +Liang Mingqiang +Liang-Chi Hsieh +Liao Qingwei +Lily Guo +limsy +Lin Lu +LingFaKe +Linus Heckemann +Liran Tal +Liron Levin +Liu Bo +Liu Hua +liwenqi +lixiaobing10051267 +Liz Zhang +LIZAO LI +Lizzie Dixon <_@lizzie.io> +Lloyd Dewolf +Lokesh Mandvekar +longliqiang88 <394564827@qq.com> +Lorenz Leutgeb +Lorenzo Fontana +Louis Opter +Luca Favatella +Luca Marturana +Luca Orlandi +Luca-Bogdan Grigorescu +Lucas Chan +Lucas Chi +Luciano Mores +Luis Martínez de Bartolomé Izquierdo +Luiz Svoboda +Lukas Waslowski +lukaspustina +Lukasz Zajaczkowski +Luke Marsden +Lyn +Lynda O'Leary +Lénaïc Huard +Ma Müller +Ma Shimiao +Mabin +Madhan Raj Mookkandy +Madhav Puri +Madhu Venugopal +Mageee +Mahesh Tiyyagura +malnick +Malte Janduda +Manfred Touron +Manfred Zabarauskas +Manjunath A Kumatagi +Mansi Nahar +Manuel Meurer +Manuel Woelker +mapk0y +Marc Abramowitz +Marc Kuo +Marc Tamsky +Marcelo Salazar +Marco Hennings +Marcus Cobden +Marcus Farkas +Marcus Linke +Marcus Ramberg +Marek Goldmann +Marian Marinov +Marianna Tessel +Mario Loriedo +Marius Gundersen +Marius Sturm +Marius Voila +Mark Allen +Mark McGranaghan +Mark McKinstry +Mark Milstein +Mark Parker +Mark West +Markan Patel +Marko Mikulicic +Marko Tibold +Markus Fix +Martijn Dwars +Martijn van Oosterhout +Martin Honermeyer +Martin Kelly +Martin Mosegaard Amdisen +Martin Redmond +Mary Anthony +Masahito Zembutsu +Masayuki Morita +Mason Malone +Mateusz Sulima +Mathias Monnerville +Mathieu Le Marec - Pasquet +Mathieu Parent +Matt Apperson +Matt Bachmann +Matt Bentley +Matt Haggard +Matt Hoyle +Matt McCormick +Matt Moore +Matt Richardson +Matt Robenolt +Matthew Heon +Matthew Lapworth +Matthew Mayer +Matthew Mueller +Matthew Riley +Matthias Klumpp +Matthias Kühnle +Matthias Rampke +Matthieu Hauglustaine +mattymo +mattyw +Mauricio Garavaglia +mauriyouth +Max Shytikov +Maxim Fedchyshyn +Maxim Ivanov +Maxim Kulkin +Maxim Treskin +Maxime Petazzoni +Meaglith Ma +meejah +Megan Kostick +Mehul Kar +Mei ChunTao +Mengdi Gao +Mert Yazıcıoğlu +mgniu +Micah Zoltu +Michael A. Smith +Michael Bridgen +Michael Brown +Michael Chiang +Michael Crosby +Michael Currie +Michael Friis +Michael Gorsuch +Michael Grauer +Michael Holzheu +Michael Hudson-Doyle +Michael Huettermann +Michael Irwin +Michael Käufl +Michael Neale +Michael Prokop +Michael Scharf +Michael Spetsiotis +Michael Stapelberg +Michael Steinert +Michael Thies +Michael West +Michal Fojtik +Michal Gebauer +Michal Jemala +Michal Minář +Michal Wieczorek +Michaël Pailloncy +Michał Czeraszkiewicz +Michiel@unhosted +Mickaël FORTUNATO +Miguel Angel Fernández +Miguel Morales +Mihai Borobocea +Mihuleacc Sergiu +Mike Brown +Mike Casas +Mike Chelen +Mike Danese +Mike Dillon +Mike Dougherty +Mike Gaffney +Mike Goelzer +Mike Leone +Mike MacCana +Mike Naberezny +Mike Snitzer +mikelinjie <294893458@qq.com> +Mikhail Sobolev +Miklos Szegedi +Milind Chawre +Miloslav Trmač +mingqing +Mingzhen Feng +Misty Stanley-Jones +Mitch Capper +mlarcher +Mohammad Banikazemi +Mohammed Aaqib Ansari +Mohit Soni +Moorthy RS +Morgan Bauer +Morgante Pell +Morgy93 +Morten Siebuhr +Morton Fox +Moysés Borges +mqliang +Mrunal Patel +msabansal +mschurenko +Muayyad Alsadi +muge +Mustafa Akın +Muthukumar R +Máximo Cuadros +Médi-Rémi Hashim +Nahum Shalman +Nakul Pathak +Nalin Dahyabhai +Nan Monnand Deng +Naoki Orii +Natalie Parker +Natanael Copa +Nate Brennand +Nate Eagleson +Nate Jones +Nathan Hsieh +Nathan Kleyn +Nathan LeClaire +Nathan McCauley +Nathan Williams +Naveed Jamil +Neal McBurnett +Neil Horman +Neil Peterson +Nelson Chen +Neyazul Haque +Nghia Tran +Niall O'Higgins +Nicholas E. Rabenau +nick +Nick DeCoursin +Nick Irvine +Nick Parker +Nick Payne +Nick Stenning +Nick Stinemates +NickrenREN +Nicola Kabar +Nicolas Borboën +Nicolas De loof +Nicolas Dudebout +Nicolas Goy +Nicolas Kaiser +Nicolás Hock Isaza +Nigel Poulton +Nik Nyby +Nikhil Chawla +NikolaMandic +Nikolas Garofil +Nikolay Milovanov +Nirmal Mehta +Nishant Totla +NIWA Hideyuki +Noah Treuhaft +noducks +Nolan Darilek +nponeccop +Nuutti Kotivuori +nzwsch +O.S. Tezer +objectified +OddBloke +odk- +Oguz Bilgic +Oh Jinkyun +Ohad Schneider +ohmystack +Ole Reifschneider +Oliver Neal +Olivier Gambier +Olle Jonsson +Oriol Francès +orkaa +Oskar Niburski +Otto Kekäläinen +Ovidio Mallo +oyld +ozlerhakan +paetling +pandrew +panticz +Paolo G. Giarrusso +Pascal Borreli +Pascal Hartig +Patrick Böänziger +Patrick Devine +Patrick Hemmer +Patrick Stapleton +pattichen +Paul +paul +Paul Annesley +Paul Bellamy +Paul Bowsher +Paul Furtado +Paul Hammond +Paul Jimenez +Paul Kehrer +Paul Lietar +Paul Liljenberg +Paul Morie +Paul Nasrat +Paul Weaver +Paulo Ribeiro +Pavel Lobashov +Pavel Pospisil +Pavel Sutyrin +Pavel Tikhomirov +Pavlos Ratis +Pavol Vargovcik +Peeyush Gupta +Peggy Li +Pei Su +Peng Tao +Penghan Wang +Per Weijnitz +perhapszzy@sina.com +Peter Bourgon +Peter Braden +Peter Bücker +Peter Choi +Peter Dave Hello +Peter Edge +Peter Ericson +Peter Esbensen +Peter Jaffe +Peter Malmgren +Peter Salvatore +Peter Volpe +Peter Waller +Petr Švihlík +Phil +Phil Estes +Phil Spitler +Philip Monroe +Philipp Gillé +Philipp Wahala +Philipp Weissensteiner +Phillip Alexander +phineas +pidster +Piergiuliano Bossi +Pierre +Pierre Carrier +Pierre Dal-Pra +Pierre Wacrenier +Pierre-Alain RIVIERE +Piotr Bogdan +pixelistik +Porjo +Poul Kjeldager Sørensen +Pradeep Chhetri +Prasanna Gautam +Pratik Karki +Prayag Verma +Przemek Hejman +Pure White +pysqz +qhuang +Qiang Huang +Qinglan Peng +qudongfang +Quentin Brossard +Quentin Perez +Quentin Tayssier +r0n22 +Rafal Jeczalik +Rafe Colton +Raghavendra K T +Raghuram Devarakonda +Raja Sami +Rajat Pandit +Rajdeep Dua +Ralf Sippl +Ralle +Ralph Bean +Ramkumar Ramachandra +Ramon Brooker +Ramon van Alteren +Ray Tsang +ReadmeCritic +Recursive Madman +Reficul +Regan McCooey +Remi Rampin +Remy Suen +Renato Riccieri Santos Zannon +resouer +rgstephens +Rhys Hiltner +Ricardo N Feliciano +Rich Moyse +Rich Seymour +Richard +Richard Burnison +Richard Harvey +Richard Mathie +Richard Metzler +Richard Scothern +Richo Healey +Rick Bradley +Rick van de Loo +Rick Wieman +Rik Nijessen +Riku Voipio +Riley Guerin +Ritesh H Shukla +Riyaz Faizullabhoy +Rob Vesse +Robert Bachmann +Robert Bittle +Robert Obryk +Robert Schneider +Robert Stern +Robert Terhaar +Robert Wallis +Roberto G. Hashioka +Roberto Muñoz Fernández +Robin Naundorf +Robin Schneider +Robin Speekenbrink +robpc +Rodolfo Carvalho +Rodrigo Vaz +Roel Van Nyen +Roger Peppe +Rohit Jnagal +Rohit Kadam +Rojin George +Roland Huß +Roland Kammerer +Roland Moriz +Roma Sokolov +Roman Dudin +Roman Strashkin +Ron Smits +Ron Williams +root +root +root +root +root +Rory Hunter +Rory McCune +Ross Boucher +Rovanion Luckey +Royce Remer +Rozhnov Alexandr +Rudolph Gottesheim +Rui Lopes +Runshen Zhu +Ryan Abrams +Ryan Anderson +Ryan Aslett +Ryan Belgrave +Ryan Detzel +Ryan Fowler +Ryan Liu +Ryan McLaughlin +Ryan O'Donnell +Ryan Seto +Ryan Thomas +Ryan Trauntvein +Ryan Wallner +Ryan Zhang +ryancooper7 +RyanDeng +Rémy Greinhofer +s. rannou +s00318865 +Sabin Basyal +Sachin Joshi +Sagar Hani +Sainath Grandhi +sakeven +Sally O'Malley +Sam Abed +Sam Alba +Sam Bailey +Sam J Sharpe +Sam Neirinck +Sam Reis +Sam Rijs +Sambuddha Basu +Sami Wagiaalla +Samuel Andaya +Samuel Dion-Girardeau +Samuel Karp +Samuel PHAN +Sandeep Bansal +Sankar சங்கர் +Sanket Saurav +Santhosh Manohar +sapphiredev +Satnam Singh +satoru +Satoshi Amemiya +Satoshi Tagomori +Scott Bessler +Scott Collier +Scott Johnston +Scott Stamp +Scott Walls +sdreyesg +Sean Christopherson +Sean Cronin +Sean Lee +Sean McIntyre +Sean OMeara +Sean P. Kane +Sean Rodman +Sebastiaan van Steenis +Sebastiaan van Stijn +Senthil Kumar Selvaraj +Senthil Kumaran +SeongJae Park +Seongyeol Lim +Serge Hallyn +Sergey Alekseev +Sergey Evstifeev +Sergii Kabashniuk +Serhat Gülçiçek +Sevki Hasirci +Shane Canon +Shane da Silva +shaunol +Shawn Landden +Shawn Siefkas +shawnhe +Shayne Wang +Shekhar Gulati +Sheng Yang +Shengbo Song +Shev Yan +Shih-Yuan Lee +Shijiang Wei +Shishir Mahajan +Shoubhik Bose +Shourya Sarcar +shuai-z +Shukui Yang +Shuwei Hao +Sian Lerk Lau +sidharthamani +Silas Sewell +Silvan Jegen +Simei He +Simon Eskildsen +Simon Ferquel +Simon Leinen +Simon Menke +Simon Taranto +Sindhu S +Sjoerd Langkemper +skaasten +Solganik Alexander +Solomon Hykes +Song Gao +Soshi Katsuta +Soulou +Spencer Brown +Spencer Smith +Sridatta Thatipamala +Sridhar Ratnakumar +Srini Brahmaroutu +Srinivasan Srivatsan +Stanislav Bondarenko +Steeve Morin +Stefan Berger +Stefan J. Wernli +Stefan Praszalowicz +Stefan S. +Stefan Scherer +Stefan Staudenmeyer +Stefan Weil +Stephen Crosby +Stephen Day +Stephen Drake +Stephen Rust +Steve Desmond +Steve Dougherty +Steve Durrheimer +Steve Francia +Steve Koch +Steven Burgess +Steven Erenst +Steven Hartland +Steven Iveson +Steven Merrill +Steven Richards +Steven Taylor +Subhajit Ghosh +Sujith Haridasan +Sun Gengze <690388648@qq.com> +Sunny Gogoi +Suryakumar Sudar +Sven Dowideit +Swapnil Daingade +Sylvain Baubeau +Sylvain Bellemare +Sébastien +Sébastien Luttringer +Sébastien Stormacq +Tabakhase +Tadej Janež +TAGOMORI Satoshi +tang0th +Tangi COLIN +Tatsuki Sugiura +Tatsushi Inagaki +Taylor Jones +tbonza +Ted M. Young +Tehmasp Chaudhri +Tejesh Mehta +terryding77 <550147740@qq.com> +tgic +Thatcher Peskens +theadactyl +Thell 'Bo' Fowler +Thermionix +Thijs Terlouw +Thomas Bikeev +Thomas Frössman +Thomas Gazagnaire +Thomas Grainger +Thomas Hansen +Thomas Leonard +Thomas LEVEIL +Thomas Orozco +Thomas Riccardi +Thomas Schroeter +Thomas Sjögren +Thomas Swift +Thomas Tanaka +Thomas Texier +Tianon Gravi +Tianyi Wang +Tibor Vass +Tiffany Jernigan +Tiffany Low +Tim Bart +Tim Bosse +Tim Dettrick +Tim Düsterhus +Tim Hockin +Tim Potter +Tim Ruffles +Tim Smith +Tim Terhorst +Tim Wang +Tim Waugh +Tim Wraight +Tim Zju <21651152@zju.edu.cn> +timfeirg +Timothy Hobbs +tjwebb123 +tobe +Tobias Bieniek +Tobias Bradtke +Tobias Gesellchen +Tobias Klauser +Tobias Munk +Tobias Schmidt +Tobias Schwab +Todd Crane +Todd Lunter +Todd Whiteman +Toli Kuznets +Tom Barlow +Tom Booth +Tom Denham +Tom Fotherby +Tom Howe +Tom Hulihan +Tom Maaswinkel +Tom Wilkie +Tom X. Tobin +Tomas Tomecek +Tomasz Kopczynski +Tomasz Lipinski +Tomasz Nurkiewicz +Tommaso Visconti +Tomáš Hrčka +Tonny Xu +Tony Abboud +Tony Daws +Tony Miller +toogley +Torstein Husebø +Tõnis Tiigi +tpng +tracylihui <793912329@qq.com> +Trapier Marshall +Travis Cline +Travis Thieman +Trent Ogren +Trevor +Trevor Pounds +Trevor Sullivan +trishnaguha +Tristan Carel +Troy Denton +Tyler Brock +Tzu-Jung Lee +uhayate +Ulysse Carion +Utz Bacher +vagrant +Vaidas Jablonskis +vanderliang +Veres Lajos +Victor Algaze +Victor Coisne +Victor Costan +Victor I. Wood +Victor Lyuboslavsky +Victor Marmol +Victor Palma +Victor Vieux +Victoria Bialas +Vijaya Kumar K +Viktor Stanchev +Viktor Vojnovski +VinayRaghavanKS +Vincent Batts +Vincent Bernat +Vincent Bernat +Vincent Demeester +Vincent Giersch +Vincent Mayers +Vincent Woo +Vinod Kulkarni +Vishal Doshi +Vishnu Kannan +Vitaly Ostrosablin +Vitor Monteiro +Vivek Agarwal +Vivek Dasgupta +Vivek Goyal +Vladimir Bulyga +Vladimir Kirillov +Vladimir Pouzanov +Vladimir Rutsky +Vladimir Varankin +VladimirAus +Vojtech Vitek (V-Teq) +waitingkuo +Walter Leibbrandt +Walter Stanish +WANG Chao +Wang Jie +Wang Long +Wang Ping +Wang Xing +Wang Yuexiao +Ward Vandewege +WarheadsSE +Wayne Chang +Wayne Song +Wei Wu +Wei-Ting Kuo +weiyan +Weiyang Zhu +Wen Cheng Ma +Wendel Fleming +Wenkai Yin +Wentao Zhang +Wenxuan Zhao +Wenyu You <21551128@zju.edu.cn> +Wenzhi Liang +Wes Morgan +Wewang Xiaorenfine +Will Dietz +Will Rouesnel +Will Weaver +willhf +William Delanoue +William Henry +William Hubbs +William Martin +William Riancho +William Thurston +WiseTrem +wlan0 +Wolfgang Powisch +wonderflow +Wonjun Kim +xamyzhao +Xianglin Gao +Xianlu Bird +XiaoBing Jiang +Xiaoxu Chen +Xiaoyu Zhang +xiekeyang +Xinbo Weng +Xinzi Zhou +Xiuming Chen +xlgao-zju +xuzhaokui +Yahya +YAMADA Tsuyoshi +Yamasaki Masahide +Yan Feng +Yang Bai +Yang Pengfei +Yanqiang Miao +Yao Zaiyong +Yassine Tijani +Yasunori Mahata +Yestin Sun +Yi EungJun +Yibai Zhang +Yihang Ho +Ying Li +Yohei Ueda +Yong Tang +Yongzhi Pan +yorkie +You-Sheng Yang (楊有勝) +Youcef YEKHLEF +Yu Changchun +Yu Chengxia +Yu Peng +Yuan Sun +Yuanhong Peng +Yunxiang Huang +Yurii Rashkovskii +yuzou +Zac Dover +Zach Borboa +Zachary Jaffee +Zain Memon +Zaiste! +Zane DeGraffenried +Zefan Li +Zen Lin(Zhinan Lin) +Zhang Kun +Zhang Wei +Zhang Wentao +zhangxianwei +Zhenan Ye <21551168@zju.edu.cn> +zhenghenghuo +Zhenkun Bi +zhouhao +Zhu Guihua +Zhu Kunjia +Zhuoyun Wei +Zilin Du +zimbatm +Ziming Dong +ZJUshuaizhou <21551191@zju.edu.cn> +zmarouf +Zoltan Tombol +zqh +Zuhayr Elahi +Zunayed Ali +Álex González +Álvaro Lázaro +Átila Camurça Alves +尹吉峰 +徐俊杰 +搏通 diff --git a/deps/github.com/docker/docker/LICENSE b/deps/github.com/docker/docker/LICENSE new file mode 100644 index 000000000..9c8e20ab8 --- /dev/null +++ b/deps/github.com/docker/docker/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2013-2017 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/deps/github.com/docker/docker/NOTICE b/deps/github.com/docker/docker/NOTICE new file mode 100644 index 000000000..0c74e15b0 --- /dev/null +++ b/deps/github.com/docker/docker/NOTICE @@ -0,0 +1,19 @@ +Docker +Copyright 2012-2017 Docker, Inc. + +This product includes software developed at Docker, Inc. (https://www.docker.com). + +This product contains software (https://github.com/kr/pty) developed +by Keith Rarick, licensed under the MIT License. + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see https://www.bis.doc.gov + +See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/deps/github.com/docker/docker/pkg/term/ascii.go b/deps/github.com/docker/docker/pkg/term/ascii.go new file mode 100644 index 000000000..f5262bccf --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/ascii.go @@ -0,0 +1,66 @@ +package term + +import ( + "fmt" + "strings" +) + +// ASCII list the possible supported ASCII key sequence +var ASCII = []string{ + "ctrl-@", + "ctrl-a", + "ctrl-b", + "ctrl-c", + "ctrl-d", + "ctrl-e", + "ctrl-f", + "ctrl-g", + "ctrl-h", + "ctrl-i", + "ctrl-j", + "ctrl-k", + "ctrl-l", + "ctrl-m", + "ctrl-n", + "ctrl-o", + "ctrl-p", + "ctrl-q", + "ctrl-r", + "ctrl-s", + "ctrl-t", + "ctrl-u", + "ctrl-v", + "ctrl-w", + "ctrl-x", + "ctrl-y", + "ctrl-z", + "ctrl-[", + "ctrl-\\", + "ctrl-]", + "ctrl-^", + "ctrl-_", +} + +// ToBytes converts a string representing a suite of key-sequence to the corresponding ASCII code. +func ToBytes(keys string) ([]byte, error) { + codes := []byte{} +next: + for _, key := range strings.Split(keys, ",") { + if len(key) != 1 { + for code, ctrl := range ASCII { + if ctrl == key { + codes = append(codes, byte(code)) + continue next + } + } + if key == "DEL" { + codes = append(codes, 127) + } else { + return nil, fmt.Errorf("Unknown character: '%s'", key) + } + } else { + codes = append(codes, byte(key[0])) + } + } + return codes, nil +} diff --git a/deps/github.com/docker/docker/pkg/term/proxy.go b/deps/github.com/docker/docker/pkg/term/proxy.go new file mode 100644 index 000000000..e648eb812 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/proxy.go @@ -0,0 +1,74 @@ +package term + +import ( + "io" +) + +// EscapeError is special error which returned by a TTY proxy reader's Read() +// method in case its detach escape sequence is read. +type EscapeError struct{} + +func (EscapeError) Error() string { + return "read escape sequence" +} + +// escapeProxy is used only for attaches with a TTY. It is used to proxy +// stdin keypresses from the underlying reader and look for the passed in +// escape key sequence to signal a detach. +type escapeProxy struct { + escapeKeys []byte + escapeKeyPos int + r io.Reader +} + +// NewEscapeProxy returns a new TTY proxy reader which wraps the given reader +// and detects when the specified escape keys are read, in which case the Read +// method will return an error of type EscapeError. +func NewEscapeProxy(r io.Reader, escapeKeys []byte) io.Reader { + return &escapeProxy{ + escapeKeys: escapeKeys, + r: r, + } +} + +func (r *escapeProxy) Read(buf []byte) (int, error) { + nr, err := r.r.Read(buf) + + preserve := func() { + // this preserves the original key presses in the passed in buffer + nr += r.escapeKeyPos + preserve := make([]byte, 0, r.escapeKeyPos+len(buf)) + preserve = append(preserve, r.escapeKeys[:r.escapeKeyPos]...) + preserve = append(preserve, buf...) + r.escapeKeyPos = 0 + copy(buf[0:nr], preserve) + } + + if nr != 1 || err != nil { + if r.escapeKeyPos > 0 { + preserve() + } + return nr, err + } + + if buf[0] != r.escapeKeys[r.escapeKeyPos] { + if r.escapeKeyPos > 0 { + preserve() + } + return nr, nil + } + + if r.escapeKeyPos == len(r.escapeKeys)-1 { + return 0, EscapeError{} + } + + // Looks like we've got an escape key, but we need to match again on the next + // read. + // Store the current escape key we found so we can look for the next one on + // the next read. + // Since this is an escape key, make sure we don't let the caller read it + // If later on we find that this is not the escape sequence, we'll add the + // keys back + r.escapeKeyPos++ + return nr - r.escapeKeyPos, nil +} diff --git a/deps/github.com/docker/docker/pkg/term/tc.go b/deps/github.com/docker/docker/pkg/term/tc.go new file mode 100644 index 000000000..6d2dfd3a8 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/tc.go @@ -0,0 +1,21 @@ +// +build !windows +// +build !solaris !cgo + +package term + +import ( + "syscall" + "unsafe" + + "golang.org/x/sys/unix" +) + +func tcget(fd uintptr, p *Termios) syscall.Errno { + _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) + return err +} + +func tcset(fd uintptr, p *Termios) syscall.Errno { + _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) + return err +} diff --git a/deps/github.com/docker/docker/pkg/term/tc_solaris_cgo.go b/deps/github.com/docker/docker/pkg/term/tc_solaris_cgo.go new file mode 100644 index 000000000..50234affc --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/tc_solaris_cgo.go @@ -0,0 +1,65 @@ +// +build solaris,cgo + +package term + +import ( + "syscall" + "unsafe" + + "golang.org/x/sys/unix" +) + +// #include +import "C" + +// Termios is the Unix API for terminal I/O. +// It is passthrough for unix.Termios in order to make it portable with +// other platforms where it is not available or handled differently. +type Termios unix.Termios + +// MakeRaw put the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd uintptr) (*State, error) { + var oldState State + if err := tcget(fd, &oldState.termios); err != 0 { + return nil, err + } + + newState := oldState.termios + + newState.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON | unix.IXANY) + newState.Oflag &^= unix.OPOST + newState.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) + newState.Cflag &^= (unix.CSIZE | unix.PARENB) + newState.Cflag |= unix.CS8 + + /* + VMIN is the minimum number of characters that needs to be read in non-canonical mode for it to be returned + Since VMIN is overloaded with another element in canonical mode when we switch modes it defaults to 4. It + needs to be explicitly set to 1. + */ + newState.Cc[C.VMIN] = 1 + newState.Cc[C.VTIME] = 0 + + if err := tcset(fd, &newState); err != 0 { + return nil, err + } + return &oldState, nil +} + +func tcget(fd uintptr, p *Termios) syscall.Errno { + ret, err := C.tcgetattr(C.int(fd), (*C.struct_termios)(unsafe.Pointer(p))) + if ret != 0 { + return err.(syscall.Errno) + } + return 0 +} + +func tcset(fd uintptr, p *Termios) syscall.Errno { + ret, err := C.tcsetattr(C.int(fd), C.TCSANOW, (*C.struct_termios)(unsafe.Pointer(p))) + if ret != 0 { + return err.(syscall.Errno) + } + return 0 +} diff --git a/deps/github.com/docker/docker/pkg/term/term.go b/deps/github.com/docker/docker/pkg/term/term.go new file mode 100644 index 000000000..4f59d8d93 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/term.go @@ -0,0 +1,124 @@ +// +build !windows + +// Package term provides structures and helper functions to work with +// terminal (state, sizes). +package term + +import ( + "errors" + "fmt" + "io" + "os" + "os/signal" + + "golang.org/x/sys/unix" +) + +var ( + // ErrInvalidState is returned if the state of the terminal is invalid. + ErrInvalidState = errors.New("Invalid terminal state") +) + +// State represents the state of the terminal. +type State struct { + termios Termios +} + +// Winsize represents the size of the terminal window. +type Winsize struct { + Height uint16 + Width uint16 + x uint16 + y uint16 +} + +// StdStreams returns the standard streams (stdin, stdout, stderr). +func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + return os.Stdin, os.Stdout, os.Stderr +} + +// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. +func GetFdInfo(in interface{}) (uintptr, bool) { + var inFd uintptr + var isTerminalIn bool + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminalIn = IsTerminal(inFd) + } + return inFd, isTerminalIn +} + +// IsTerminal returns true if the given file descriptor is a terminal. +func IsTerminal(fd uintptr) bool { + var termios Termios + return tcget(fd, &termios) == 0 +} + +// RestoreTerminal restores the terminal connected to the given file descriptor +// to a previous state. +func RestoreTerminal(fd uintptr, state *State) error { + if state == nil { + return ErrInvalidState + } + if err := tcset(fd, &state.termios); err != 0 { + return err + } + return nil +} + +// SaveState saves the state of the terminal connected to the given file descriptor. +func SaveState(fd uintptr) (*State, error) { + var oldState State + if err := tcget(fd, &oldState.termios); err != 0 { + return nil, err + } + + return &oldState, nil +} + +// DisableEcho applies the specified state to the terminal connected to the file +// descriptor, with echo disabled. +func DisableEcho(fd uintptr, state *State) error { + newState := state.termios + newState.Lflag &^= unix.ECHO + + if err := tcset(fd, &newState); err != 0 { + return err + } + handleInterrupt(fd, state) + return nil +} + +// SetRawTerminal puts the terminal connected to the given file descriptor into +// raw mode and returns the previous state. On UNIX, this puts both the input +// and output into raw mode. On Windows, it only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (*State, error) { + oldState, err := MakeRaw(fd) + if err != nil { + return nil, err + } + handleInterrupt(fd, oldState) + return oldState, err +} + +// SetRawTerminalOutput puts the output of terminal connected to the given file +// descriptor into raw mode. On UNIX, this does nothing and returns nil for the +// state. On Windows, it disables LF -> CRLF translation. +func SetRawTerminalOutput(fd uintptr) (*State, error) { + return nil, nil +} + +func handleInterrupt(fd uintptr, state *State) { + sigchan := make(chan os.Signal, 1) + signal.Notify(sigchan, os.Interrupt) + go func() { + for range sigchan { + // quit cleanly and the new terminal item is on a new line + fmt.Println() + signal.Stop(sigchan) + close(sigchan) + RestoreTerminal(fd, state) + os.Exit(1) + } + }() +} diff --git a/deps/github.com/docker/docker/pkg/term/term_windows.go b/deps/github.com/docker/docker/pkg/term/term_windows.go new file mode 100644 index 000000000..c0332c3cd --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/term_windows.go @@ -0,0 +1,237 @@ +// +build windows + +package term + +import ( + "io" + "os" + "os/signal" + "syscall" // used for STD_INPUT_HANDLE, STD_OUTPUT_HANDLE and STD_ERROR_HANDLE + + "github.com/Azure/go-ansiterm/winterm" + "github.com/docker/docker/pkg/term/windows" +) + +// State holds the console mode for the terminal. +type State struct { + mode uint32 +} + +// Winsize is used for window size. +type Winsize struct { + Height uint16 + Width uint16 +} + +const ( + // https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx + enableVirtualTerminalInput = 0x0200 + enableVirtualTerminalProcessing = 0x0004 + disableNewlineAutoReturn = 0x0008 +) + +// vtInputSupported is true if enableVirtualTerminalInput is supported by the console +var vtInputSupported bool + +// StdStreams returns the standard streams (stdin, stdout, stderr). +func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer) { + // Turn on VT handling on all std handles, if possible. This might + // fail, in which case we will fall back to terminal emulation. + var emulateStdin, emulateStdout, emulateStderr bool + fd := os.Stdin.Fd() + if mode, err := winterm.GetConsoleMode(fd); err == nil { + // Validate that enableVirtualTerminalInput is supported, but do not set it. + if err = winterm.SetConsoleMode(fd, mode|enableVirtualTerminalInput); err != nil { + emulateStdin = true + } else { + vtInputSupported = true + } + // Unconditionally set the console mode back even on failure because SetConsoleMode + // remembers invalid bits on input handles. + winterm.SetConsoleMode(fd, mode) + } + + fd = os.Stdout.Fd() + if mode, err := winterm.GetConsoleMode(fd); err == nil { + // Validate disableNewlineAutoReturn is supported, but do not set it. + if err = winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing|disableNewlineAutoReturn); err != nil { + emulateStdout = true + } else { + winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing) + } + } + + fd = os.Stderr.Fd() + if mode, err := winterm.GetConsoleMode(fd); err == nil { + // Validate disableNewlineAutoReturn is supported, but do not set it. + if err = winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing|disableNewlineAutoReturn); err != nil { + emulateStderr = true + } else { + winterm.SetConsoleMode(fd, mode|enableVirtualTerminalProcessing) + } + } + + if os.Getenv("ConEmuANSI") == "ON" || os.Getenv("ConsoleZVersion") != "" { + // The ConEmu and ConsoleZ terminals emulate ANSI on output streams well. + emulateStdin = true + emulateStdout = false + emulateStderr = false + } + + // Temporarily use STD_INPUT_HANDLE, STD_OUTPUT_HANDLE and + // STD_ERROR_HANDLE from syscall rather than x/sys/windows as long as + // go-ansiterm hasn't switch to x/sys/windows. + // TODO: switch back to x/sys/windows once go-ansiterm has switched + if emulateStdin { + stdIn = windowsconsole.NewAnsiReader(syscall.STD_INPUT_HANDLE) + } else { + stdIn = os.Stdin + } + + if emulateStdout { + stdOut = windowsconsole.NewAnsiWriter(syscall.STD_OUTPUT_HANDLE) + } else { + stdOut = os.Stdout + } + + if emulateStderr { + stdErr = windowsconsole.NewAnsiWriter(syscall.STD_ERROR_HANDLE) + } else { + stdErr = os.Stderr + } + + return +} + +// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal. +func GetFdInfo(in interface{}) (uintptr, bool) { + return windowsconsole.GetHandleInfo(in) +} + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + info, err := winterm.GetConsoleScreenBufferInfo(fd) + if err != nil { + return nil, err + } + + winsize := &Winsize{ + Width: uint16(info.Window.Right - info.Window.Left + 1), + Height: uint16(info.Window.Bottom - info.Window.Top + 1), + } + + return winsize, nil +} + +// IsTerminal returns true if the given file descriptor is a terminal. +func IsTerminal(fd uintptr) bool { + return windowsconsole.IsConsole(fd) +} + +// RestoreTerminal restores the terminal connected to the given file descriptor +// to a previous state. +func RestoreTerminal(fd uintptr, state *State) error { + return winterm.SetConsoleMode(fd, state.mode) +} + +// SaveState saves the state of the terminal connected to the given file descriptor. +func SaveState(fd uintptr) (*State, error) { + mode, e := winterm.GetConsoleMode(fd) + if e != nil { + return nil, e + } + + return &State{mode: mode}, nil +} + +// DisableEcho disables echo for the terminal connected to the given file descriptor. +// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx +func DisableEcho(fd uintptr, state *State) error { + mode := state.mode + mode &^= winterm.ENABLE_ECHO_INPUT + mode |= winterm.ENABLE_PROCESSED_INPUT | winterm.ENABLE_LINE_INPUT + err := winterm.SetConsoleMode(fd, mode) + if err != nil { + return err + } + + // Register an interrupt handler to catch and restore prior state + restoreAtInterrupt(fd, state) + return nil +} + +// SetRawTerminal puts the terminal connected to the given file descriptor into +// raw mode and returns the previous state. On UNIX, this puts both the input +// and output into raw mode. On Windows, it only puts the input into raw mode. +func SetRawTerminal(fd uintptr) (*State, error) { + state, err := MakeRaw(fd) + if err != nil { + return nil, err + } + + // Register an interrupt handler to catch and restore prior state + restoreAtInterrupt(fd, state) + return state, err +} + +// SetRawTerminalOutput puts the output of terminal connected to the given file +// descriptor into raw mode. On UNIX, this does nothing and returns nil for the +// state. On Windows, it disables LF -> CRLF translation. +func SetRawTerminalOutput(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + // Ignore failures, since disableNewlineAutoReturn might not be supported on this + // version of Windows. + winterm.SetConsoleMode(fd, state.mode|disableNewlineAutoReturn) + return state, err +} + +// MakeRaw puts the terminal (Windows Console) connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be restored. +func MakeRaw(fd uintptr) (*State, error) { + state, err := SaveState(fd) + if err != nil { + return nil, err + } + + mode := state.mode + + // See + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx + // -- https://msdn.microsoft.com/en-us/library/windows/desktop/ms683462(v=vs.85).aspx + + // Disable these modes + mode &^= winterm.ENABLE_ECHO_INPUT + mode &^= winterm.ENABLE_LINE_INPUT + mode &^= winterm.ENABLE_MOUSE_INPUT + mode &^= winterm.ENABLE_WINDOW_INPUT + mode &^= winterm.ENABLE_PROCESSED_INPUT + + // Enable these modes + mode |= winterm.ENABLE_EXTENDED_FLAGS + mode |= winterm.ENABLE_INSERT_MODE + mode |= winterm.ENABLE_QUICK_EDIT_MODE + if vtInputSupported { + mode |= enableVirtualTerminalInput + } + + err = winterm.SetConsoleMode(fd, mode) + if err != nil { + return nil, err + } + return state, nil +} + +func restoreAtInterrupt(fd uintptr, state *State) { + sigchan := make(chan os.Signal, 1) + signal.Notify(sigchan, os.Interrupt) + + go func() { + _ = <-sigchan + RestoreTerminal(fd, state) + os.Exit(0) + }() +} diff --git a/deps/github.com/docker/docker/pkg/term/termios_bsd.go b/deps/github.com/docker/docker/pkg/term/termios_bsd.go new file mode 100644 index 000000000..c47341e87 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/termios_bsd.go @@ -0,0 +1,42 @@ +// +build darwin freebsd openbsd + +package term + +import ( + "unsafe" + + "golang.org/x/sys/unix" +) + +const ( + getTermios = unix.TIOCGETA + setTermios = unix.TIOCSETA +) + +// Termios is the Unix API for terminal I/O. +type Termios unix.Termios + +// MakeRaw put the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd uintptr) (*State, error) { + var oldState State + if _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, getTermios, uintptr(unsafe.Pointer(&oldState.termios))); err != 0 { + return nil, err + } + + newState := oldState.termios + newState.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + newState.Oflag &^= unix.OPOST + newState.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) + newState.Cflag &^= (unix.CSIZE | unix.PARENB) + newState.Cflag |= unix.CS8 + newState.Cc[unix.VMIN] = 1 + newState.Cc[unix.VTIME] = 0 + + if _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(&newState))); err != 0 { + return nil, err + } + + return &oldState, nil +} diff --git a/deps/github.com/docker/docker/pkg/term/termios_linux.go b/deps/github.com/docker/docker/pkg/term/termios_linux.go new file mode 100644 index 000000000..3e25eb7a4 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/termios_linux.go @@ -0,0 +1,37 @@ +package term + +import ( + "golang.org/x/sys/unix" +) + +const ( + getTermios = unix.TCGETS + setTermios = unix.TCSETS +) + +// Termios is the Unix API for terminal I/O. +type Termios unix.Termios + +// MakeRaw put the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +func MakeRaw(fd uintptr) (*State, error) { + termios, err := unix.IoctlGetTermios(int(fd), getTermios) + if err != nil { + return nil, err + } + + var oldState State + oldState.termios = Termios(*termios) + + termios.Iflag &^= (unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON) + termios.Oflag &^= unix.OPOST + termios.Lflag &^= (unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN) + termios.Cflag &^= (unix.CSIZE | unix.PARENB) + termios.Cflag |= unix.CS8 + + if err := unix.IoctlSetTermios(int(fd), setTermios, termios); err != nil { + return nil, err + } + return &oldState, nil +} diff --git a/deps/github.com/docker/docker/pkg/term/windows/ansi_reader.go b/deps/github.com/docker/docker/pkg/term/windows/ansi_reader.go new file mode 100644 index 000000000..29d396318 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/windows/ansi_reader.go @@ -0,0 +1,263 @@ +// +build windows + +package windowsconsole + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "strings" + "unsafe" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/Azure/go-ansiterm/winterm" +) + +const ( + escapeSequence = ansiterm.KEY_ESC_CSI +) + +// ansiReader wraps a standard input file (e.g., os.Stdin) providing ANSI sequence translation. +type ansiReader struct { + file *os.File + fd uintptr + buffer []byte + cbBuffer int + command []byte +} + +// NewAnsiReader returns an io.ReadCloser that provides VT100 terminal emulation on top of a +// Windows console input handle. +func NewAnsiReader(nFile int) io.ReadCloser { + initLogger() + file, fd := winterm.GetStdFile(nFile) + return &ansiReader{ + file: file, + fd: fd, + command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), + buffer: make([]byte, 0), + } +} + +// Close closes the wrapped file. +func (ar *ansiReader) Close() (err error) { + return ar.file.Close() +} + +// Fd returns the file descriptor of the wrapped file. +func (ar *ansiReader) Fd() uintptr { + return ar.fd +} + +// Read reads up to len(p) bytes of translated input events into p. +func (ar *ansiReader) Read(p []byte) (int, error) { + if len(p) == 0 { + return 0, nil + } + + // Previously read bytes exist, read as much as we can and return + if len(ar.buffer) > 0 { + logger.Debugf("Reading previously cached bytes") + + originalLength := len(ar.buffer) + copiedLength := copy(p, ar.buffer) + + if copiedLength == originalLength { + ar.buffer = make([]byte, 0, len(p)) + } else { + ar.buffer = ar.buffer[copiedLength:] + } + + logger.Debugf("Read from cache p[%d]: % x", copiedLength, p) + return copiedLength, nil + } + + // Read and translate key events + events, err := readInputEvents(ar.fd, len(p)) + if err != nil { + return 0, err + } else if len(events) == 0 { + logger.Debug("No input events detected") + return 0, nil + } + + keyBytes := translateKeyEvents(events, []byte(escapeSequence)) + + // Save excess bytes and right-size keyBytes + if len(keyBytes) > len(p) { + logger.Debugf("Received %d keyBytes, only room for %d bytes", len(keyBytes), len(p)) + ar.buffer = keyBytes[len(p):] + keyBytes = keyBytes[:len(p)] + } else if len(keyBytes) == 0 { + logger.Debug("No key bytes returned from the translator") + return 0, nil + } + + copiedLength := copy(p, keyBytes) + if copiedLength != len(keyBytes) { + return 0, errors.New("unexpected copy length encountered") + } + + logger.Debugf("Read p[%d]: % x", copiedLength, p) + logger.Debugf("Read keyBytes[%d]: % x", copiedLength, keyBytes) + return copiedLength, nil +} + +// readInputEvents polls until at least one event is available. +func readInputEvents(fd uintptr, maxBytes int) ([]winterm.INPUT_RECORD, error) { + // Determine the maximum number of records to retrieve + // -- Cast around the type system to obtain the size of a single INPUT_RECORD. + // unsafe.Sizeof requires an expression vs. a type-reference; the casting + // tricks the type system into believing it has such an expression. + recordSize := int(unsafe.Sizeof(*((*winterm.INPUT_RECORD)(unsafe.Pointer(&maxBytes))))) + countRecords := maxBytes / recordSize + if countRecords > ansiterm.MAX_INPUT_EVENTS { + countRecords = ansiterm.MAX_INPUT_EVENTS + } else if countRecords == 0 { + countRecords = 1 + } + logger.Debugf("[windows] readInputEvents: Reading %v records (buffer size %v, record size %v)", countRecords, maxBytes, recordSize) + + // Wait for and read input events + events := make([]winterm.INPUT_RECORD, countRecords) + nEvents := uint32(0) + eventsExist, err := winterm.WaitForSingleObject(fd, winterm.WAIT_INFINITE) + if err != nil { + return nil, err + } + + if eventsExist { + err = winterm.ReadConsoleInput(fd, events, &nEvents) + if err != nil { + return nil, err + } + } + + // Return a slice restricted to the number of returned records + logger.Debugf("[windows] readInputEvents: Read %v events", nEvents) + return events[:nEvents], nil +} + +// KeyEvent Translation Helpers + +var arrowKeyMapPrefix = map[uint16]string{ + winterm.VK_UP: "%s%sA", + winterm.VK_DOWN: "%s%sB", + winterm.VK_RIGHT: "%s%sC", + winterm.VK_LEFT: "%s%sD", +} + +var keyMapPrefix = map[uint16]string{ + winterm.VK_UP: "\x1B[%sA", + winterm.VK_DOWN: "\x1B[%sB", + winterm.VK_RIGHT: "\x1B[%sC", + winterm.VK_LEFT: "\x1B[%sD", + winterm.VK_HOME: "\x1B[1%s~", // showkey shows ^[[1 + winterm.VK_END: "\x1B[4%s~", // showkey shows ^[[4 + winterm.VK_INSERT: "\x1B[2%s~", + winterm.VK_DELETE: "\x1B[3%s~", + winterm.VK_PRIOR: "\x1B[5%s~", + winterm.VK_NEXT: "\x1B[6%s~", + winterm.VK_F1: "", + winterm.VK_F2: "", + winterm.VK_F3: "\x1B[13%s~", + winterm.VK_F4: "\x1B[14%s~", + winterm.VK_F5: "\x1B[15%s~", + winterm.VK_F6: "\x1B[17%s~", + winterm.VK_F7: "\x1B[18%s~", + winterm.VK_F8: "\x1B[19%s~", + winterm.VK_F9: "\x1B[20%s~", + winterm.VK_F10: "\x1B[21%s~", + winterm.VK_F11: "\x1B[23%s~", + winterm.VK_F12: "\x1B[24%s~", +} + +// translateKeyEvents converts the input events into the appropriate ANSI string. +func translateKeyEvents(events []winterm.INPUT_RECORD, escapeSequence []byte) []byte { + var buffer bytes.Buffer + for _, event := range events { + if event.EventType == winterm.KEY_EVENT && event.KeyEvent.KeyDown != 0 { + buffer.WriteString(keyToString(&event.KeyEvent, escapeSequence)) + } + } + + return buffer.Bytes() +} + +// keyToString maps the given input event record to the corresponding string. +func keyToString(keyEvent *winterm.KEY_EVENT_RECORD, escapeSequence []byte) string { + if keyEvent.UnicodeChar == 0 { + return formatVirtualKey(keyEvent.VirtualKeyCode, keyEvent.ControlKeyState, escapeSequence) + } + + _, alt, control := getControlKeys(keyEvent.ControlKeyState) + if control { + // TODO(azlinux): Implement following control sequences + // -D Signals the end of input from the keyboard; also exits current shell. + // -H Deletes the first character to the left of the cursor. Also called the ERASE key. + // -Q Restarts printing after it has been stopped with -s. + // -S Suspends printing on the screen (does not stop the program). + // -U Deletes all characters on the current line. Also called the KILL key. + // -E Quits current command and creates a core + + } + + // +Key generates ESC N Key + if !control && alt { + return ansiterm.KEY_ESC_N + strings.ToLower(string(keyEvent.UnicodeChar)) + } + + return string(keyEvent.UnicodeChar) +} + +// formatVirtualKey converts a virtual key (e.g., up arrow) into the appropriate ANSI string. +func formatVirtualKey(key uint16, controlState uint32, escapeSequence []byte) string { + shift, alt, control := getControlKeys(controlState) + modifier := getControlKeysModifier(shift, alt, control) + + if format, ok := arrowKeyMapPrefix[key]; ok { + return fmt.Sprintf(format, escapeSequence, modifier) + } + + if format, ok := keyMapPrefix[key]; ok { + return fmt.Sprintf(format, modifier) + } + + return "" +} + +// getControlKeys extracts the shift, alt, and ctrl key states. +func getControlKeys(controlState uint32) (shift, alt, control bool) { + shift = 0 != (controlState & winterm.SHIFT_PRESSED) + alt = 0 != (controlState & (winterm.LEFT_ALT_PRESSED | winterm.RIGHT_ALT_PRESSED)) + control = 0 != (controlState & (winterm.LEFT_CTRL_PRESSED | winterm.RIGHT_CTRL_PRESSED)) + return shift, alt, control +} + +// getControlKeysModifier returns the ANSI modifier for the given combination of control keys. +func getControlKeysModifier(shift, alt, control bool) string { + if shift && alt && control { + return ansiterm.KEY_CONTROL_PARAM_8 + } + if alt && control { + return ansiterm.KEY_CONTROL_PARAM_7 + } + if shift && control { + return ansiterm.KEY_CONTROL_PARAM_6 + } + if control { + return ansiterm.KEY_CONTROL_PARAM_5 + } + if shift && alt { + return ansiterm.KEY_CONTROL_PARAM_4 + } + if alt { + return ansiterm.KEY_CONTROL_PARAM_3 + } + if shift { + return ansiterm.KEY_CONTROL_PARAM_2 + } + return "" +} diff --git a/deps/github.com/docker/docker/pkg/term/windows/ansi_writer.go b/deps/github.com/docker/docker/pkg/term/windows/ansi_writer.go new file mode 100644 index 000000000..256577e1f --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/windows/ansi_writer.go @@ -0,0 +1,64 @@ +// +build windows + +package windowsconsole + +import ( + "io" + "os" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/Azure/go-ansiterm/winterm" +) + +// ansiWriter wraps a standard output file (e.g., os.Stdout) providing ANSI sequence translation. +type ansiWriter struct { + file *os.File + fd uintptr + infoReset *winterm.CONSOLE_SCREEN_BUFFER_INFO + command []byte + escapeSequence []byte + inAnsiSequence bool + parser *ansiterm.AnsiParser +} + +// NewAnsiWriter returns an io.Writer that provides VT100 terminal emulation on top of a +// Windows console output handle. +func NewAnsiWriter(nFile int) io.Writer { + initLogger() + file, fd := winterm.GetStdFile(nFile) + info, err := winterm.GetConsoleScreenBufferInfo(fd) + if err != nil { + return nil + } + + parser := ansiterm.CreateParser("Ground", winterm.CreateWinEventHandler(fd, file)) + logger.Infof("newAnsiWriter: parser %p", parser) + + aw := &ansiWriter{ + file: file, + fd: fd, + infoReset: info, + command: make([]byte, 0, ansiterm.ANSI_MAX_CMD_LENGTH), + escapeSequence: []byte(ansiterm.KEY_ESC_CSI), + parser: parser, + } + + logger.Infof("newAnsiWriter: aw.parser %p", aw.parser) + logger.Infof("newAnsiWriter: %v", aw) + return aw +} + +func (aw *ansiWriter) Fd() uintptr { + return aw.fd +} + +// Write writes len(p) bytes from p to the underlying data stream. +func (aw *ansiWriter) Write(p []byte) (total int, err error) { + if len(p) == 0 { + return 0, nil + } + + logger.Infof("Write: % x", p) + logger.Infof("Write: %s", string(p)) + return aw.parser.Parse(p) +} diff --git a/deps/github.com/docker/docker/pkg/term/windows/console.go b/deps/github.com/docker/docker/pkg/term/windows/console.go new file mode 100644 index 000000000..4bad32ea7 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/windows/console.go @@ -0,0 +1,35 @@ +// +build windows + +package windowsconsole + +import ( + "os" + + "github.com/Azure/go-ansiterm/winterm" +) + +// GetHandleInfo returns file descriptor and bool indicating whether the file is a console. +func GetHandleInfo(in interface{}) (uintptr, bool) { + switch t := in.(type) { + case *ansiReader: + return t.Fd(), true + case *ansiWriter: + return t.Fd(), true + } + + var inFd uintptr + var isTerminal bool + + if file, ok := in.(*os.File); ok { + inFd = file.Fd() + isTerminal = IsConsole(inFd) + } + return inFd, isTerminal +} + +// IsConsole returns true if the given file descriptor is a Windows Console. +// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console. +func IsConsole(fd uintptr) bool { + _, e := winterm.GetConsoleMode(fd) + return e == nil +} diff --git a/deps/github.com/docker/docker/pkg/term/windows/windows.go b/deps/github.com/docker/docker/pkg/term/windows/windows.go new file mode 100644 index 000000000..c02a93a03 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/windows/windows.go @@ -0,0 +1,33 @@ +// These files implement ANSI-aware input and output streams for use by the Docker Windows client. +// When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create +// and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls. + +package windowsconsole + +import ( + "io/ioutil" + "os" + "sync" + + ansiterm "github.com/Azure/go-ansiterm" + "github.com/sirupsen/logrus" +) + +var logger *logrus.Logger +var initOnce sync.Once + +func initLogger() { + initOnce.Do(func() { + logFile := ioutil.Discard + + if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" { + logFile, _ = os.Create("ansiReaderWriter.log") + } + + logger = &logrus.Logger{ + Out: logFile, + Formatter: new(logrus.TextFormatter), + Level: logrus.DebugLevel, + } + }) +} diff --git a/deps/github.com/docker/docker/pkg/term/winsize.go b/deps/github.com/docker/docker/pkg/term/winsize.go new file mode 100644 index 000000000..f58367fe6 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/winsize.go @@ -0,0 +1,30 @@ +// +build !solaris,!windows + +package term + +import ( + "unsafe" + + "golang.org/x/sys/unix" +) + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + ws := &Winsize{} + _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(unix.TIOCGWINSZ), uintptr(unsafe.Pointer(ws))) + // Skipp errno = 0 + if err == 0 { + return ws, nil + } + return ws, err +} + +// SetWinsize tries to set the specified window size for the specified file descriptor. +func SetWinsize(fd uintptr, ws *Winsize) error { + _, _, err := unix.Syscall(unix.SYS_IOCTL, fd, uintptr(unix.TIOCSWINSZ), uintptr(unsafe.Pointer(ws))) + // Skipp errno = 0 + if err == 0 { + return nil + } + return err +} diff --git a/deps/github.com/docker/docker/pkg/term/winsize_solaris_cgo.go b/deps/github.com/docker/docker/pkg/term/winsize_solaris_cgo.go new file mode 100644 index 000000000..39c1d3207 --- /dev/null +++ b/deps/github.com/docker/docker/pkg/term/winsize_solaris_cgo.go @@ -0,0 +1,42 @@ +// +build solaris,cgo + +package term + +import ( + "unsafe" + + "golang.org/x/sys/unix" +) + +/* +#include +#include +#include + +// Small wrapper to get rid of variadic args of ioctl() +int my_ioctl(int fd, int cmd, struct winsize *ws) { + return ioctl(fd, cmd, ws); +} +*/ +import "C" + +// GetWinsize returns the window size based on the specified file descriptor. +func GetWinsize(fd uintptr) (*Winsize, error) { + ws := &Winsize{} + ret, err := C.my_ioctl(C.int(fd), C.int(unix.TIOCGWINSZ), (*C.struct_winsize)(unsafe.Pointer(ws))) + // Skip retval = 0 + if ret == 0 { + return ws, nil + } + return ws, err +} + +// SetWinsize tries to set the specified window size for the specified file descriptor. +func SetWinsize(fd uintptr, ws *Winsize) error { + ret, err := C.my_ioctl(C.int(fd), C.int(unix.TIOCSWINSZ), (*C.struct_winsize)(unsafe.Pointer(ws))) + // Skip retval = 0 + if ret == 0 { + return nil + } + return err +} diff --git a/deps/github.com/dustin/go-humanize/.gitignore b/deps/github.com/dustin/go-humanize/.gitignore deleted file mode 100644 index 05b40514a..000000000 --- a/deps/github.com/dustin/go-humanize/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -#* -*.[568] -*.a -*~ -[568].out -_* diff --git a/deps/github.com/dustin/go-humanize/comma.go b/deps/github.com/dustin/go-humanize/comma.go index 13611aaab..520ae3e57 100644 --- a/deps/github.com/dustin/go-humanize/comma.go +++ b/deps/github.com/dustin/go-humanize/comma.go @@ -76,6 +76,14 @@ func Commaf(v float64) string { return buf.String() } +// CommafWithDigits works like the Commaf but limits the resulting +// string to the given number of decimal places. +// +// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3 +func CommafWithDigits(f float64, decimals int) string { + return stripTrailingDigits(Commaf(f), decimals) +} + // BigComma produces a string form of the given big.Int in base 10 // with commas after every three orders of magnitude. func BigComma(b *big.Int) string { diff --git a/deps/github.com/dustin/go-humanize/comma_test.go b/deps/github.com/dustin/go-humanize/comma_test.go index 89daca5fb..c37a5187b 100644 --- a/deps/github.com/dustin/go-humanize/comma_test.go +++ b/deps/github.com/dustin/go-humanize/comma_test.go @@ -36,6 +36,15 @@ func TestCommas(t *testing.T) { }.validate(t) } +func TestCommafWithDigits(t *testing.T) { + testList{ + {"1.23, 0", CommafWithDigits(1.23, 0), "1"}, + {"1.23, 1", CommafWithDigits(1.23, 1), "1.2"}, + {"1.23, 2", CommafWithDigits(1.23, 2), "1.23"}, + {"1.23, 3", CommafWithDigits(1.23, 3), "1.23"}, + }.validate(t) +} + func TestCommafs(t *testing.T) { testList{ {"0", Commaf(0), "0"}, diff --git a/deps/github.com/dustin/go-humanize/english/words.go b/deps/github.com/dustin/go-humanize/english/words.go index 26e9918bd..68c4948b5 100644 --- a/deps/github.com/dustin/go-humanize/english/words.go +++ b/deps/github.com/dustin/go-humanize/english/words.go @@ -4,6 +4,8 @@ package english import ( "fmt" "strings" + + humanize "github.com/dustin/go-humanize" ) // These are included because they are common technical terms. @@ -61,7 +63,7 @@ func PluralWord(quantity int, singular, plural string) string { // The simple English rules of regular pluralization will be used // if the plural form is an empty string (i.e. not explicitly given). func Plural(quantity int, singular, plural string) string { - return fmt.Sprintf("%d %s", quantity, PluralWord(quantity, singular, plural)) + return fmt.Sprintf("%s %s", humanize.Comma(int64(quantity)), PluralWord(quantity, singular, plural)) } // WordSeries converts a list of words into a word series in English. diff --git a/deps/github.com/dustin/go-humanize/english/words_test.go b/deps/github.com/dustin/go-humanize/english/words_test.go index 3c1d7bea6..61db7b349 100644 --- a/deps/github.com/dustin/go-humanize/english/words_test.go +++ b/deps/github.com/dustin/go-humanize/english/words_test.go @@ -47,6 +47,7 @@ func TestPlural(t *testing.T) { }{ {1, "object", "", "1 object"}, {42, "object", "", "42 objects"}, + {1234567, "object", "", "1,234,567 objects"}, } for _, tt := range tests { if got := Plural(tt.n, tt.singular, tt.plural); got != tt.want { diff --git a/deps/github.com/dustin/go-humanize/ftoa.go b/deps/github.com/dustin/go-humanize/ftoa.go index c76190b10..1c62b640d 100644 --- a/deps/github.com/dustin/go-humanize/ftoa.go +++ b/deps/github.com/dustin/go-humanize/ftoa.go @@ -1,6 +1,9 @@ package humanize -import "strconv" +import ( + "strconv" + "strings" +) func stripTrailingZeros(s string) string { offset := len(s) - 1 @@ -17,7 +20,27 @@ func stripTrailingZeros(s string) string { return s[:offset+1] } +func stripTrailingDigits(s string, digits int) string { + if i := strings.Index(s, "."); i >= 0 { + if digits <= 0 { + return s[:i] + } + i++ + if i+digits >= len(s) { + return s + } + return s[:i+digits] + } + return s +} + // Ftoa converts a float to a string with no trailing zeros. func Ftoa(num float64) string { return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) } + +// FtoaWithDigits converts a float to a string but limits the resulting string +// to the given number of decimal places, and no trailing zeros. +func FtoaWithDigits(num float64, digits int) string { + return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits)) +} diff --git a/deps/github.com/dustin/go-humanize/ftoa_test.go b/deps/github.com/dustin/go-humanize/ftoa_test.go index 276d411b7..45ef9c580 100644 --- a/deps/github.com/dustin/go-humanize/ftoa_test.go +++ b/deps/github.com/dustin/go-humanize/ftoa_test.go @@ -2,9 +2,13 @@ package humanize import ( "fmt" + "math/rand" + "reflect" "regexp" "strconv" + "strings" "testing" + "testing/quick" ) func TestFtoa(t *testing.T) { @@ -17,6 +21,70 @@ func TestFtoa(t *testing.T) { }.validate(t) } +func TestFtoaWithDigits(t *testing.T) { + testList{ + {"1.23, 0", FtoaWithDigits(1.23, 0), "1"}, + {"1.23, 1", FtoaWithDigits(1.23, 1), "1.2"}, + {"1.23, 2", FtoaWithDigits(1.23, 2), "1.23"}, + {"1.23, 3", FtoaWithDigits(1.23, 3), "1.23"}, + }.validate(t) +} + +func TestStripTrailingDigits(t *testing.T) { + err := quick.Check(func(s string, digits int) bool { + stripped := stripTrailingDigits(s, digits) + + // A stripped string will always be a prefix of its original string + if !strings.HasPrefix(s, stripped) { + return false + } + + if strings.ContainsRune(s, '.') { + // If there is a dot, the part on the left of the dot will never change + a := strings.Split(s, ".") + b := strings.Split(stripped, ".") + if a[0] != b[0] { + return false + } + } else { + // If there's no dot in the input, the output will always be the same as the input. + if stripped != s { + return false + } + } + + return true + }, &quick.Config{ + MaxCount: 10000, + Values: func(v []reflect.Value, r *rand.Rand) { + rdigs := func(n int) string { + digs := []rune{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} + var rv []rune + for i := 0; i < n; i++ { + rv = append(rv, digs[r.Intn(len(digs))]) + } + return string(rv) + } + + ls := r.Intn(20) + rs := r.Intn(20) + jc := "." + if rs == 0 { + jc = "" + } + s := rdigs(ls) + jc + rdigs(rs) + digits := r.Intn(len(s) + 1) + + v[0] = reflect.ValueOf(s) + v[1] = reflect.ValueOf(digits) + }, + }) + + if err != nil { + t.Error(err) + } +} + func BenchmarkFtoaRegexTrailing(b *testing.B) { trailingZerosRegex := regexp.MustCompile(`\.?0+$`) diff --git a/deps/github.com/dustin/go-humanize/si.go b/deps/github.com/dustin/go-humanize/si.go index b24e48169..ae659e0e4 100644 --- a/deps/github.com/dustin/go-humanize/si.go +++ b/deps/github.com/dustin/go-humanize/si.go @@ -93,6 +93,16 @@ func SI(input float64, unit string) string { return Ftoa(value) + " " + prefix + unit } +// SIWithDigits works like SI but limits the resulting string to the +// given number of decimal places. +// +// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB +// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF +func SIWithDigits(input float64, decimals int, unit string) string { + value, prefix := ComputeSI(input) + return FtoaWithDigits(value, decimals) + " " + prefix + unit +} + var errInvalid = errors.New("invalid input") // ParseSI parses an SI string back into the number and unit. diff --git a/deps/github.com/dustin/go-humanize/si_test.go b/deps/github.com/dustin/go-humanize/si_test.go index bc5bac669..e15fc6971 100644 --- a/deps/github.com/dustin/go-humanize/si_test.go +++ b/deps/github.com/dustin/go-humanize/si_test.go @@ -94,6 +94,29 @@ func TestSI(t *testing.T) { } } +func TestSIWithDigits(t *testing.T) { + tests := []struct { + name string + num float64 + digits int + formatted string + }{ + {"e-12", 2.234e-12, 0, "2 pF"}, + {"e-12", 2.234e-12, 1, "2.2 pF"}, + {"e-12", 2.234e-12, 2, "2.23 pF"}, + {"e-12", 2.234e-12, 3, "2.234 pF"}, + {"e-12", 2.234e-12, 4, "2.234 pF"}, + } + + for _, test := range tests { + got := SIWithDigits(test.num, test.digits, "F") + if got != test.formatted { + t.Errorf("On %v (%v), got %v, wanted %v", + test.name, test.num, got, test.formatted) + } + } +} + func BenchmarkParseSI(b *testing.B) { for i := 0; i < b.N; i++ { ParseSI("2.2346ZB") diff --git a/deps/github.com/evanphx/json-patch/README.md b/deps/github.com/evanphx/json-patch/README.md index d0d826bac..078629004 100644 --- a/deps/github.com/evanphx/json-patch/README.md +++ b/deps/github.com/evanphx/json-patch/README.md @@ -1,29 +1,284 @@ -## JSON-Patch +# JSON-Patch +`jsonpatch` is a library which provides functionallity for both applying +[RFC6902 JSON patches](http://tools.ietf.org/html/rfc6902) against documents, as +well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ietf.org/html/rfc7396). -Provides the ability to modify and test a JSON according to a -[RFC6902 JSON patch](http://tools.ietf.org/html/rfc6902) and [RFC7396 JSON Merge Patch](https://tools.ietf.org/html/rfc7396). +[![GoDoc](https://godoc.org/github.com/evanphx/json-patch?status.svg)](http://godoc.org/github.com/evanphx/json-patch) +[![Build Status](https://travis-ci.org/evanphx/json-patch.svg?branch=master)](https://travis-ci.org/evanphx/json-patch) +[![Report Card](https://goreportcard.com/badge/github.com/evanphx/json-patch)](https://goreportcard.com/report/github.com/evanphx/json-patch) -*Version*: **1.0** +# Get It! -[![GoDoc](https://godoc.org/github.com/evanphx/json-patch?status.svg)](http://godoc.org/github.com/evanphx/json-patch) +**Latest and greatest**: +```bash +go get -u github.com/evanphx/json-patch +``` -[![Build Status](https://travis-ci.org/evanphx/json-patch.svg?branch=master)](https://travis-ci.org/evanphx/json-patch) +**Stable Versions**: +* Version 3: `go get -u gopkg.in/evanphx/json-patch.v3` + +(previous versions below `v3` are unavailable) + +# Use It! +* [Create and apply a merge patch](#create-and-apply-a-merge-patch) +* [Create and apply a JSON Patch](#create-and-apply-a-json-patch) +* [Comparing JSON documents](#comparing-json-documents) +* [Combine merge patches](#combine-merge-patches) + +## Create and apply a merge patch +Given both an original JSON document and a modified JSON document, you can create +a [Merge Patch](https://tools.ietf.org/html/rfc7396) document. + +It can describe the changes needed to convert from the original to the +modified JSON document. + +Once you have a merge patch, you can apply it to other JSON documents using the +`jsonpatch.MergePatch(document, patch)` function. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + // Let's create a merge patch from these two documents... + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + target := []byte(`{"name": "Jane", "age": 24}`) + + patch, err := jsonpatch.CreateMergePatch(original, target) + if err != nil { + panic(err) + } + + // Now lets apply the patch against a different JSON document... + + alternative := []byte(`{"name": "Tina", "age": 28, "height": 3.75}`) + modifiedAlternative, err := jsonpatch.MergePatch(alternative, patch) + + fmt.Printf("patch document: %s\n", patch) + fmt.Printf("updated alternative doc: %s\n", modifiedAlternative) +} +``` + +When ran, you get the following output: + +```bash +$ go run main.go +patch document: {"height":null,"name":"Jane"} +updated tina doc: {"age":28,"name":"Jane"} +``` + +## Create and apply a JSON Patch +You can create patch objects using `DecodePatch([]byte)`, which can then +be applied against JSON documents. + +The following is an example of creating a patch from two operations, and +applying it against a JSON document. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + patchJSON := []byte(`[ + {"op": "replace", "path": "/name", "value": "Jane"}, + {"op": "remove", "path": "/height"} + ]`) + + patch, err := jsonpatch.DecodePatch(patchJSON) + if err != nil { + panic(err) + } + + modified, err := patch.Apply(original) + if err != nil { + panic(err) + } + + fmt.Printf("Original document: %s\n", original) + fmt.Printf("Modified document: %s\n", modified) +} +``` + +When ran, you get the following output: + +```bash +$ go run main.go +Original document: {"name": "John", "age": 24, "height": 3.21} +Modified document: {"age":24,"name":"Jane"} +``` + +## Comparing JSON documents +Due to potential whitespace and ordering differences, one cannot simply compare +JSON strings or byte-arrays directly. + +As such, you can instead use `jsonpatch.Equal(document1, document2)` to +determine if two JSON documents are _structurally_ equal. This ignores +whitespace differences, and key-value ordering. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + similar := []byte(` + { + "age": 24, + "height": 3.21, + "name": "John" + } + `) + different := []byte(`{"name": "Jane", "age": 20, "height": 3.37}`) + + if jsonpatch.Equal(original, similar) { + fmt.Println(`"original" is structurally equal to "similar"`) + } + + if !jsonpatch.Equal(original, different) { + fmt.Println(`"original" is _not_ structurally equal to "similar"`) + } +} +``` + +When ran, you get the following output: +```bash +$ go run main.go +"original" is structurally equal to "similar" +"original" is _not_ structurally equal to "similar" +``` + +## Combine merge patches +Given two JSON merge patch documents, it is possible to combine them into a +single merge patch which can describe both set of changes. + +The resulting merge patch can be used such that applying it results in a +document structurally similar as merging each merge patch to the document +in succession. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + + nameAndHeight := []byte(`{"height":null,"name":"Jane"}`) + ageAndEyes := []byte(`{"age":4.23,"eyes":"blue"}`) + + // Let's combine these merge patch documents... + combinedPatch, err := jsonpatch.MergeMergePatches(nameAndHeight, ageAndEyes) + if err != nil { + panic(err) + } + + // Apply each patch individual against the original document + withoutCombinedPatch, err := jsonpatch.MergePatch(original, nameAndHeight) + if err != nil { + panic(err) + } + + withoutCombinedPatch, err = jsonpatch.MergePatch(withoutCombinedPatch, ageAndEyes) + if err != nil { + panic(err) + } + + // Apply the combined patch against the original document + + withCombinedPatch, err := jsonpatch.MergePatch(original, combinedPatch) + if err != nil { + panic(err) + } + + // Do both result in the same thing? They should! + if jsonpatch.Equal(withCombinedPatch, withoutCombinedPatch) { + fmt.Println("Both JSON documents are structurally the same!") + } + + fmt.Printf("combined merge patch: %s", combinedPatch) +} +``` + +When ran, you get the following output: +```bash +$ go run main.go +Both JSON documents are structurally the same! +combined merge patch: {"age":4.23,"eyes":"blue","height":null,"name":"Jane"} +``` + +# CLI for comparing JSON documents +You can install the commandline program `json-patch`. + +This program can take multiple JSON patch documents as arguments, +and fed a JSON document from `stdin`. It will apply the patch(es) against +the document and output the modified doc. + +**patch.1.json** +```json +[ + {"op": "replace", "path": "/name", "value": "Jane"}, + {"op": "remove", "path": "/height"} +] +``` + +**patch.2.json** +```json +[ + {"op": "add", "path": "/address", "value": "123 Main St"}, + {"op": "replace", "path": "/age", "value": "21"} +] +``` -### API Usage +**document.json** +```json +{ + "name": "John", + "age": 24, + "height": 3.21 +} +``` -* Given a `[]byte`, obtain a Patch object +You can then run: - `obj, err := jsonpatch.DecodePatch(patch)` +```bash +$ go install github.com/evanphx/json-patch/cmd/json-patch +$ cat document.json | json-patch -p patch.1.json -p patch.2.json +{"address":"123 Main St","age":"21","name":"Jane"} +``` -* Apply the patch and get a new document back +# Help It! +Contributions are welcomed! Leave [an issue](https://github.com/evanphx/json-patch/issues) +or [create a PR](https://github.com/evanphx/json-patch/compare). - `out, err := obj.Apply(doc)` -* Create a JSON Merge Patch document based on two json documents (a to b): +Before creating a pull request, we'd ask that you make sure tests are passing +and that you have added new tests when applicable. - `mergeDoc, err := jsonpatch.CreateMergePatch(a, b)` - -* Bonus API: compare documents for structural equality +Contributors can run tests using: - `jsonpatch.Equal(doca, docb)` +```bash +go test -cover ./... +``` +Builds for pull requests are tested automatically +using [TravisCI](https://travis-ci.org/evanphx/json-patch). diff --git a/deps/github.com/evanphx/json-patch/merge.go b/deps/github.com/evanphx/json-patch/merge.go index b9af252fe..6806c4c20 100644 --- a/deps/github.com/evanphx/json-patch/merge.go +++ b/deps/github.com/evanphx/json-patch/merge.go @@ -1,6 +1,7 @@ package jsonpatch import ( + "bytes" "encoding/json" "fmt" "reflect" @@ -89,6 +90,7 @@ func pruneAryNulls(ary *partialArray) *partialArray { var errBadJSONDoc = fmt.Errorf("Invalid JSON Document") var errBadJSONPatch = fmt.Errorf("Invalid JSON Patch") +var errBadMergeTypes = fmt.Errorf("Mismatched JSON Documents") // MergeMergePatches merges two merge patches together, such that // applying this resulting merged merge patch to a document yields the same @@ -160,30 +162,106 @@ func doMergePatch(docData, patchData []byte, mergeMerge bool) ([]byte, error) { return json.Marshal(doc) } -// CreateMergePatch creates a merge patch as specified in http://tools.ietf.org/html/draft-ietf-appsawg-json-merge-patch-07 -// -// 'a' is original, 'b' is the modified document. Both are to be given as json encoded content. -// The function will return a mergeable json document with differences from a to b. -// -// An error will be returned if any of the two documents are invalid. -func CreateMergePatch(a, b []byte) ([]byte, error) { - aI := map[string]interface{}{} - bI := map[string]interface{}{} - err := json.Unmarshal(a, &aI) +// resemblesJSONArray indicates whether the byte-slice "appears" to be +// a JSON array or not. +// False-positives are possible, as this function does not check the internal +// structure of the array. It only checks that the outer syntax is present and +// correct. +func resemblesJSONArray(input []byte) bool { + input = bytes.TrimSpace(input) + + hasPrefix := bytes.HasPrefix(input, []byte("[")) + hasSuffix := bytes.HasSuffix(input, []byte("]")) + + return hasPrefix && hasSuffix +} + +// CreateMergePatch will return a merge patch document capable of converting +// the original document(s) to the modified document(s). +// The parameters can be bytes of either two JSON Documents, or two arrays of +// JSON documents. +// The merge patch returned follows the specification defined at http://tools.ietf.org/html/draft-ietf-appsawg-json-merge-patch-07 +func CreateMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalResemblesArray := resemblesJSONArray(originalJSON) + modifiedResemblesArray := resemblesJSONArray(modifiedJSON) + + // Do both byte-slices seem like JSON arrays? + if originalResemblesArray && modifiedResemblesArray { + return createArrayMergePatch(originalJSON, modifiedJSON) + } + + // Are both byte-slices are not arrays? Then they are likely JSON objects... + if !originalResemblesArray && !modifiedResemblesArray { + return createObjectMergePatch(originalJSON, modifiedJSON) + } + + // None of the above? Then return an error because of mismatched types. + return nil, errBadMergeTypes +} + +// createObjectMergePatch will return a merge-patch document capable of +// converting the original document to the modified document. +func createObjectMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalDoc := map[string]interface{}{} + modifiedDoc := map[string]interface{}{} + + err := json.Unmarshal(originalJSON, &originalDoc) if err != nil { return nil, errBadJSONDoc } - err = json.Unmarshal(b, &bI) + + err = json.Unmarshal(modifiedJSON, &modifiedDoc) if err != nil { return nil, errBadJSONDoc } - dest, err := getDiff(aI, bI) + + dest, err := getDiff(originalDoc, modifiedDoc) if err != nil { return nil, err } + return json.Marshal(dest) } +// createArrayMergePatch will return an array of merge-patch documents capable +// of converting the original document to the modified document for each +// pair of JSON documents provided in the arrays. +// Arrays of mismatched sizes will result in an error. +func createArrayMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalDocs := []json.RawMessage{} + modifiedDocs := []json.RawMessage{} + + err := json.Unmarshal(originalJSON, &originalDocs) + if err != nil { + return nil, errBadJSONDoc + } + + err = json.Unmarshal(modifiedJSON, &modifiedDocs) + if err != nil { + return nil, errBadJSONDoc + } + + total := len(originalDocs) + if len(modifiedDocs) != total { + return nil, errBadJSONDoc + } + + result := []json.RawMessage{} + for i := 0; i < len(originalDocs); i++ { + original := originalDocs[i] + modified := modifiedDocs[i] + + patch, err := createObjectMergePatch(original, modified) + if err != nil { + return nil, err + } + + result = append(result, json.RawMessage(patch)) + } + + return json.Marshal(result) +} + // Returns true if the array matches (must be json types). // As is idiomatic for go, an empty array is not the same as a nil array. func matchesArray(a, b []interface{}) bool { diff --git a/deps/github.com/evanphx/json-patch/patch.go b/deps/github.com/evanphx/json-patch/patch.go index de70dbca7..1a3aa387e 100644 --- a/deps/github.com/evanphx/json-patch/patch.go +++ b/deps/github.com/evanphx/json-patch/patch.go @@ -66,6 +66,10 @@ func (n *lazyNode) intoDoc() (*partialDoc, error) { return &n.doc, nil } + if n.raw == nil { + return nil, fmt.Errorf("Unable to unmarshal nil pointer as partial document") + } + err := json.Unmarshal(*n.raw, &n.doc) if err != nil { @@ -81,6 +85,10 @@ func (n *lazyNode) intoAry() (*partialArray, error) { return &n.ary, nil } + if n.raw == nil { + return nil, fmt.Errorf("Unable to unmarshal nil pointer as partial array") + } + err := json.Unmarshal(*n.raw, &n.ary) if err != nil { @@ -94,6 +102,10 @@ func (n *lazyNode) intoAry() (*partialArray, error) { func (n *lazyNode) compact() []byte { buf := &bytes.Buffer{} + if n.raw == nil { + return nil + } + err := json.Compact(buf, *n.raw) if err != nil { @@ -104,6 +116,10 @@ func (n *lazyNode) compact() []byte { } func (n *lazyNode) tryDoc() bool { + if n.raw == nil { + return false + } + err := json.Unmarshal(*n.raw, &n.doc) if err != nil { @@ -115,6 +131,10 @@ func (n *lazyNode) tryDoc() bool { } func (n *lazyNode) tryAry() bool { + if n.raw == nil { + return false + } + err := json.Unmarshal(*n.raw, &n.ary) if err != nil { @@ -377,7 +397,9 @@ func (d *partialArray) add(key string, val *lazyNode) error { } idx = len(ary) - idx } - + if idx < 0 || idx >= len(ary) || idx > len(cur) { + return fmt.Errorf("Unable to access invalid index: %d", idx) + } copy(ary[0:idx], cur[0:idx]) ary[idx] = val copy(ary[idx+1:], cur[idx:]) diff --git a/deps/github.com/gin-gonic/gin/.github/ISSUE_TEMPLATE.md b/deps/github.com/gin-gonic/gin/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..de067ce08 --- /dev/null +++ b/deps/github.com/gin-gonic/gin/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,13 @@ +- With issues: + - Use the search tool before opening a new issue. + - Please provide source code and commit sha if you found a bug. + - Review existing issues and provide feedback or react to them. + +- gin version (or commit ref): +- git version: +- operating system: + +## Description + +## Screenshots + diff --git a/deps/github.com/gin-gonic/gin/.github/PULL_REQUEST_TEMPLATE.md b/deps/github.com/gin-gonic/gin/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..8630bc356 --- /dev/null +++ b/deps/github.com/gin-gonic/gin/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +- With pull requests: + - Open your pull request against `master` + - Your pull request should have no more than two commits, if not you should squash them. + - It should pass all tests in the available continuous integrations systems such as TravisCI. + - You should add/modify tests to cover your proposed code changes. + - If your pull request contains a new feature, please document it on the README. + diff --git a/deps/github.com/gin-gonic/gin/AUTHORS.md b/deps/github.com/gin-gonic/gin/AUTHORS.md index 7ab7213d9..dda19bcf3 100644 --- a/deps/github.com/gin-gonic/gin/AUTHORS.md +++ b/deps/github.com/gin-gonic/gin/AUTHORS.md @@ -1,8 +1,12 @@ List of all the awesome people working to make Gin the best Web Framework in Go. +## gin 1.x series authors + +**Gin Core Team:** Bo-Yi Wu (@appleboy), 田欧 (@thinkerou), Javier Provecho (@javierprovecho) + ## gin 0.x series authors -**Maintainer:** Manu Martinez-Almeida (@manucorporat), Javier Provecho (@javierprovecho) +**Maintainers:** Manu Martinez-Almeida (@manucorporat), Javier Provecho (@javierprovecho) People and companies, who have contributed, in alphabetical order. diff --git a/deps/github.com/gin-gonic/gin/CHANGELOG.md b/deps/github.com/gin-gonic/gin/CHANGELOG.md index ee485ec3b..e6a108ca3 100644 --- a/deps/github.com/gin-gonic/gin/CHANGELOG.md +++ b/deps/github.com/gin-gonic/gin/CHANGELOG.md @@ -1,6 +1,28 @@ # CHANGELOG -### Gin 1.2 +### Gin 1.3.0 + +- [NEW] Add [`func (*Context) QueryMap`](https://godoc.org/github.com/gin-gonic/gin#Context.QueryMap), [`func (*Context) GetQueryMap`](https://godoc.org/github.com/gin-gonic/gin#Context.GetQueryMap), [`func (*Context) PostFormMap`](https://godoc.org/github.com/gin-gonic/gin#Context.PostFormMap) and [`func (*Context) GetPostFormMap`](https://godoc.org/github.com/gin-gonic/gin#Context.GetPostFormMap) to support `type map[string]string` as query string or form parameters, see [#1383](https://github.com/gin-gonic/gin/pull/1383) +- [NEW] Add [`func (*Context) AsciiJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.AsciiJSON), see [#1358](https://github.com/gin-gonic/gin/pull/1358) +- [NEW] Add `Pusher()` in [`type ResponseWriter`](https://godoc.org/github.com/gin-gonic/gin#ResponseWriter) for supporting http2 push, see [#1273](https://github.com/gin-gonic/gin/pull/1273) +- [NEW] Add [`func (*Context) DataFromReader`](https://godoc.org/github.com/gin-gonic/gin#Context.DataFromReader) for serving dynamic data, see [#1304](https://github.com/gin-gonic/gin/pull/1304) +- [NEW] Add [`func (*Context) ShouldBindBodyWith`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindBodyWith) allowing to call binding multiple times, see [#1341](https://github.com/gin-gonic/gin/pull/1341) +- [NEW] Support pointers in form binding, see [#1336](https://github.com/gin-gonic/gin/pull/1336) +- [NEW] Add [`func (*Context) JSONP`](https://godoc.org/github.com/gin-gonic/gin#Context.JSONP), see [#1333](https://github.com/gin-gonic/gin/pull/1333) +- [NEW] Support default value in form binding, see [#1138](https://github.com/gin-gonic/gin/pull/1138) +- [NEW] Expose validator engine in [`type StructValidator`](https://godoc.org/github.com/gin-gonic/gin/binding#StructValidator), see [#1277](https://github.com/gin-gonic/gin/pull/1277) +- [NEW] Add [`func (*Context) ShouldBind`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBind), [`func (*Context) ShouldBindQuery`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindQuery) and [`func (*Context) ShouldBindJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.ShouldBindJSON), see [#1047](https://github.com/gin-gonic/gin/pull/1047) +- [NEW] Add support for `time.Time` location in form binding, see [#1117](https://github.com/gin-gonic/gin/pull/1117) +- [NEW] Add [`func (*Context) BindQuery`](https://godoc.org/github.com/gin-gonic/gin#Context.BindQuery), see [#1029](https://github.com/gin-gonic/gin/pull/1029) +- [NEW] Make [jsonite](https://github.com/json-iterator/go) optional with build tags, see [#1026](https://github.com/gin-gonic/gin/pull/1026) +- [NEW] Show query string in logger, see [#999](https://github.com/gin-gonic/gin/pull/999) +- [NEW] Add [`func (*Context) SecureJSON`](https://godoc.org/github.com/gin-gonic/gin#Context.SecureJSON), see [#987](https://github.com/gin-gonic/gin/pull/987) and [#993](https://github.com/gin-gonic/gin/pull/993) +- [DEPRECATE] `func (*Context) GetCookie` for [`func (*Context) Cookie`](https://godoc.org/github.com/gin-gonic/gin#Context.Cookie) +- [FIX] Don't display color tags if [`func DisableConsoleColor`](https://godoc.org/github.com/gin-gonic/gin#DisableConsoleColor) called, see [#1072](https://github.com/gin-gonic/gin/pull/1072) +- [FIX] Gin Mode `""` when calling [`func Mode`](https://godoc.org/github.com/gin-gonic/gin#Mode) now returns `const DebugMode`, see [#1250](https://github.com/gin-gonic/gin/pull/1250) +- [FIX] `Flush()` now doesn't overwrite `responseWriter` status code, see [#1460](https://github.com/gin-gonic/gin/pull/1460) + +### Gin 1.2.0 - [NEW] Switch from godeps to govendor - [NEW] Add support for Let's Encrypt via gin-gonic/autotls diff --git a/deps/github.com/gin-gonic/gin/README.md b/deps/github.com/gin-gonic/gin/README.md index e09a51f24..9f66dd765 100644 --- a/deps/github.com/gin-gonic/gin/README.md +++ b/deps/github.com/gin-gonic/gin/README.md @@ -3,10 +3,11 @@ [![Build Status](https://travis-ci.org/gin-gonic/gin.svg)](https://travis-ci.org/gin-gonic/gin) - [![codecov](https://codecov.io/gh/gin-gonic/gin/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-gonic/gin) - [![Go Report Card](https://goreportcard.com/badge/github.com/gin-gonic/gin)](https://goreportcard.com/report/github.com/gin-gonic/gin) - [![GoDoc](https://godoc.org/github.com/gin-gonic/gin?status.svg)](https://godoc.org/github.com/gin-gonic/gin) - [![Join the chat at https://gitter.im/gin-gonic/gin](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gin-gonic/gin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![codecov](https://codecov.io/gh/gin-gonic/gin/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-gonic/gin) +[![Go Report Card](https://goreportcard.com/badge/github.com/gin-gonic/gin)](https://goreportcard.com/report/github.com/gin-gonic/gin) +[![GoDoc](https://godoc.org/github.com/gin-gonic/gin?status.svg)](https://godoc.org/github.com/gin-gonic/gin) +[![Join the chat at https://gitter.im/gin-gonic/gin](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gin-gonic/gin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Sourcegraph](https://sourcegraph.com/github.com/gin-gonic/gin/-/badge.svg)](https://sourcegraph.com/github.com/gin-gonic/gin?badge) [![Open Source Helpers](https://www.codetriage.com/gin-gonic/gin/badges/users.svg)](https://www.codetriage.com/gin-gonic/gin) Gin is a web framework written in Go (Golang). It features a martini-like API with much better performance, up to 40 times faster thanks to [httprouter](https://github.com/julienschmidt/httprouter). If you need performance and good productivity, you will love Gin. @@ -27,6 +28,7 @@ Gin is a web framework written in Go (Golang). It features a martini-like API wi - [Querystring parameters](#querystring-parameters) - [Multipart/Urlencoded Form](#multiparturlencoded-form) - [Another example: query + post form](#another-example-query--post-form) + - [Map as querystring or postform parameters](#map-as-querystring-or-postform-parameters) - [Upload files](#upload-files) - [Grouping routes](#grouping-routes) - [Blank Gin without middleware by default](#blank-gin-without-middleware-by-default) @@ -38,7 +40,7 @@ Gin is a web framework written in Go (Golang). It features a martini-like API wi - [Bind Query String or Post Data](#bind-query-string-or-post-data) - [Bind HTML checkboxes](#bind-html-checkboxes) - [Multipart/Urlencoded binding](#multiparturlencoded-binding) - - [XML, JSON and YAML rendering](#xml-json-and-yaml-rendering) + - [XML, JSON, YAML and ProtoBuf rendering](#xml-json-yaml-and-protobuf-rendering) - [JSONP rendering](#jsonp) - [Serving static files](#serving-static-files) - [Serving data from reader](#serving-data-from-reader) @@ -57,7 +59,7 @@ Gin is a web framework written in Go (Golang). It features a martini-like API wi - [Try to bind body into different structs](#try-to-bind-body-into-different-structs) - [http2 server push](#http2-server-push) - [Testing](#testing) -- [Users](#users--) +- [Users](#users) ## Installation @@ -98,7 +100,7 @@ $ mkdir -p $GOPATH/src/github.com/myusername/project && cd "$_" ```sh $ govendor init -$ govendor fetch github.com/gin-gonic/gin@v1.2 +$ govendor fetch github.com/gin-gonic/gin@v1.3 ``` 4. Copy a starting template inside your project @@ -196,7 +198,7 @@ BenchmarkVulcan_GithubAll | 5000 | 394253 | 19894 ## Build with [jsoniter](https://github.com/json-iterator/go) -Gin use `encoding/json` as default json package but you can change to [jsoniter](https://github.com/json-iterator/go) by build from other tags. +Gin uses `encoding/json` as default json package but you can change to [jsoniter](https://github.com/json-iterator/go) by build from other tags. ```sh $ go build -tags=jsoniter . @@ -236,7 +238,7 @@ func main() { func main() { router := gin.Default() - // This handler will match /user/john but will not match neither /user/ or /user + // This handler will match /user/john but will not match /user/ or /user router.GET("/user/:name", func(c *gin.Context) { name := c.Param("name") c.String(http.StatusOK, "Hello %s", name) @@ -323,6 +325,34 @@ func main() { id: 1234; page: 1; name: manu; message: this_is_great ``` +### Map as querystring or postform parameters + +``` +POST /post?ids[a]=1234&ids[b]=hello HTTP/1.1 +Content-Type: application/x-www-form-urlencoded + +names[first]=thinkerou&names[second]=tianou +``` + +```go +func main() { + router := gin.Default() + + router.POST("/post", func(c *gin.Context) { + + ids := c.QueryMap("ids") + names := c.PostFormMap("names") + + fmt.Printf("ids: %v; names: %v", ids, names) + }) + router.Run(":8080") +} +``` + +``` +ids: map[b:hello a:1234], names: map[second:tianou first:thinkerou] +``` + ### Upload files #### Single file @@ -504,10 +534,10 @@ Note that you need to set the corresponding binding tag on all fields you want t Also, Gin provides two sets of methods for binding: - **Type** - Must bind - - **Methods** - `Bind`, `BindJSON`, `BindQuery` + - **Methods** - `Bind`, `BindJSON`, `BindXML`, `BindQuery` - **Behavior** - These methods use `MustBindWith` under the hood. If there is a binding error, the request is aborted with `c.AbortWithError(400, err).SetType(ErrorTypeBind)`. This sets the response status code to 400 and the `Content-Type` header is set to `text/plain; charset=utf-8`. Note that if you try to set the response code after this, it will result in a warning `[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 400 with 422`. If you wish to have greater control over the behavior, consider using the `ShouldBind` equivalent method. - **Type** - Should bind - - **Methods** - `ShouldBind`, `ShouldBindJSON`, `ShouldBindQuery` + - **Methods** - `ShouldBind`, `ShouldBindJSON`, `ShouldBindXML`, `ShouldBindQuery` - **Behavior** - These methods use `ShouldBindWith` under the hood. If there is a binding error, the error is returned and it is the developer's responsibility to handle the request and error appropriately. When using the Bind-method, Gin tries to infer the binder depending on the Content-Type header. If you are sure what you are binding, you can use `MustBindWith` or `ShouldBindWith`. @@ -517,8 +547,8 @@ You can also specify that specific fields are required. If a field is decorated ```go // Binding from JSON type Login struct { - User string `form:"user" json:"user" binding:"required"` - Password string `form:"password" json:"password" binding:"required"` + User string `form:"user" json:"user" xml:"user" binding:"required"` + Password string `form:"password" json:"password" xml:"password" binding:"required"` } func main() { @@ -527,30 +557,55 @@ func main() { // Example for binding JSON ({"user": "manu", "password": "123"}) router.POST("/loginJSON", func(c *gin.Context) { var json Login - if err := c.ShouldBindJSON(&json); err == nil { - if json.User == "manu" && json.Password == "123" { - c.JSON(http.StatusOK, gin.H{"status": "you are logged in"}) - } else { - c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"}) - } - } else { + if err := c.ShouldBindXML(&json); err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) + return } + + if json.User != "manu" || json.Password != "123" { + c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"}) + return + } + + c.JSON(http.StatusOK, gin.H{"status": "you are logged in"}) + }) + + // Example for binding XML ( + // + // + // user + // 123 + // ) + router.POST("/loginXML", func(c *gin.Context) { + var xml Login + if err := c.ShouldBindXML(&xml); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) + return + } + + if xml.User != "manu" || xml.Password != "123" { + c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"}) + return + } + + c.JSON(http.StatusOK, gin.H{"status": "you are logged in"}) }) // Example for binding a HTML form (user=manu&password=123) router.POST("/loginForm", func(c *gin.Context) { var form Login // This will infer what binder to use depending on the content-type header. - if err := c.ShouldBind(&form); err == nil { - if form.User == "manu" && form.Password == "123" { - c.JSON(http.StatusOK, gin.H{"status": "you are logged in"}) - } else { - c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"}) - } - } else { + if err := c.ShouldBind(&form); err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) + return } + + if form.User != "manu" || form.Password != "123" { + c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"}) + return + } + + c.JSON(http.StatusOK, gin.H{"status": "you are logged in"}) }) // Listen and serve on 0.0.0.0:8080 @@ -649,7 +704,7 @@ $ curl "localhost:8085/bookable?check_in=2018-03-08&check_out=2018-03-09" {"error":"Key: 'Booking.CheckIn' Error:Field validation for 'CheckIn' failed on the 'bookabledate' tag"} ``` -[Struct level validations](https://github.com/go-playground/validator/releases/tag/v8.7) can also be registed this way. +[Struct level validations](https://github.com/go-playground/validator/releases/tag/v8.7) can also be registered this way. See the [struct-lvl-validation example](examples/struct-lvl-validations) to learn more. ### Only Bind Query String @@ -695,9 +750,12 @@ See the [detail information](https://github.com/gin-gonic/gin/issues/742#issueco ```go package main -import "log" -import "github.com/gin-gonic/gin" -import "time" +import ( + "log" + "time" + + "github.com/gin-gonic/gin" +) type Person struct { Name string `form:"name"` @@ -816,7 +874,7 @@ Test it with: $ curl -v --form user=user --form password=password http://localhost:8080/login ``` -### XML, JSON and YAML rendering +### XML, JSON, YAML and ProtoBuf rendering ```go func main() { @@ -850,6 +908,19 @@ func main() { c.YAML(http.StatusOK, gin.H{"message": "hey", "status": http.StatusOK}) }) + r.GET("/someProtoBuf", func(c *gin.Context) { + reps := []int64{int64(1), int64(2)} + label := "test" + // The specific definition of protobuf is written in the testdata/protoexample file. + data := &protoexample.Test{ + Label: &label, + Reps: reps, + } + // Note that data becomes binary data in the response + // Will output protoexample.Test protobuf serialized data + c.ProtoBuf(http.StatusOK, data) + }) + // Listen and serve on 0.0.0.0:8080 r.Run(":8080") } @@ -900,6 +971,57 @@ func main() { } ``` +#### AsciiJSON + +Using AsciiJSON to Generates ASCII-only JSON with escaped non-ASCII chracters. + +```go +func main() { + r := gin.Default() + + r.GET("/someJSON", func(c *gin.Context) { + data := map[string]interface{}{ + "lang": "GO语言", + "tag": "
", + } + + // will output : {"lang":"GO\u8bed\u8a00","tag":"\u003cbr\u003e"} + c.AsciiJSON(http.StatusOK, data) + }) + + // Listen and serve on 0.0.0.0:8080 + r.Run(":8080") +} +``` + +#### PureJSON + +Normally, JSON replaces special HTML characters with their unicode entities, e.g. `<` becomes `\u003c`. If you want to encode such characters literally, you can use PureJSON instead. +This feature is unavailable in Go 1.6 and lower. + +```go +func main() { + r := gin.Default() + + // Serves unicode entities + r.GET("/json", func(c *gin.Context) { + c.JSON(200, gin.H{ + "html": "Hello, world!", + }) + }) + + // Serves literal characters + r.GET("/purejson", func(c *gin.Context) { + c.PureJSON(200, gin.H{ + "html": "Hello, world!", + }) + }) + + // listen and serve on 0.0.0.0:8080 + r.Run(":8080) +} +``` + ### Serving static files ```go @@ -1064,7 +1186,7 @@ func main() { router.SetFuncMap(template.FuncMap{ "formatAsDate": formatAsDate, }) - router.LoadHTMLFiles("./fixtures/basic/raw.tmpl") + router.LoadHTMLFiles("./testdata/template/raw.tmpl") router.GET("/raw", func(c *gin.Context) { c.HTML(http.StatusOK, "raw.tmpl", map[string]interface{}{ @@ -1759,7 +1881,7 @@ func TestPingRoute(t *testing.T) { } ``` -## Users [![Sourcegraph](https://sourcegraph.com/github.com/gin-gonic/gin/-/badge.svg)](https://sourcegraph.com/github.com/gin-gonic/gin?badge) +## Users Awesome project lists using [Gin](https://github.com/gin-gonic/gin) web framework. diff --git a/deps/github.com/gin-gonic/gin/auth_test.go b/deps/github.com/gin-gonic/gin/auth_test.go index dc8523b0b..ab7e94bee 100644 --- a/deps/github.com/gin-gonic/gin/auth_test.go +++ b/deps/github.com/gin-gonic/gin/auth_test.go @@ -93,7 +93,7 @@ func TestBasicAuthSucceed(t *testing.T) { router := New() router.Use(BasicAuth(accounts)) router.GET("/login", func(c *Context) { - c.String(200, c.MustGet(AuthUserKey).(string)) + c.String(http.StatusOK, c.MustGet(AuthUserKey).(string)) }) w := httptest.NewRecorder() @@ -101,7 +101,7 @@ func TestBasicAuthSucceed(t *testing.T) { req.Header.Set("Authorization", authorizationHeader("admin", "password")) router.ServeHTTP(w, req) - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "admin", w.Body.String()) } @@ -112,7 +112,7 @@ func TestBasicAuth401(t *testing.T) { router.Use(BasicAuth(accounts)) router.GET("/login", func(c *Context) { called = true - c.String(200, c.MustGet(AuthUserKey).(string)) + c.String(http.StatusOK, c.MustGet(AuthUserKey).(string)) }) w := httptest.NewRecorder() @@ -121,7 +121,7 @@ func TestBasicAuth401(t *testing.T) { router.ServeHTTP(w, req) assert.False(t, called) - assert.Equal(t, 401, w.Code) + assert.Equal(t, http.StatusUnauthorized, w.Code) assert.Equal(t, "Basic realm=\"Authorization Required\"", w.HeaderMap.Get("WWW-Authenticate")) } @@ -132,7 +132,7 @@ func TestBasicAuth401WithCustomRealm(t *testing.T) { router.Use(BasicAuthForRealm(accounts, "My Custom \"Realm\"")) router.GET("/login", func(c *Context) { called = true - c.String(200, c.MustGet(AuthUserKey).(string)) + c.String(http.StatusOK, c.MustGet(AuthUserKey).(string)) }) w := httptest.NewRecorder() @@ -141,6 +141,6 @@ func TestBasicAuth401WithCustomRealm(t *testing.T) { router.ServeHTTP(w, req) assert.False(t, called) - assert.Equal(t, 401, w.Code) + assert.Equal(t, http.StatusUnauthorized, w.Code) assert.Equal(t, "Basic realm=\"My Custom \\\"Realm\\\"\"", w.HeaderMap.Get("WWW-Authenticate")) } diff --git a/deps/github.com/gin-gonic/gin/benchmarks_test.go b/deps/github.com/gin-gonic/gin/benchmarks_test.go index e79700343..0b3f82df7 100644 --- a/deps/github.com/gin-gonic/gin/benchmarks_test.go +++ b/deps/github.com/gin-gonic/gin/benchmarks_test.go @@ -54,7 +54,7 @@ func BenchmarkOneRouteJSON(B *testing.B) { Status string `json:"status"` }{"ok"} router.GET("/json", func(c *Context) { - c.JSON(200, data) + c.JSON(http.StatusOK, data) }) runRequest(B, router, "GET", "/json") } @@ -66,7 +66,7 @@ func BenchmarkOneRouteHTML(B *testing.B) { router.SetHTMLTemplate(t) router.GET("/html", func(c *Context) { - c.HTML(200, "index", "hola") + c.HTML(http.StatusOK, "index", "hola") }) runRequest(B, router, "GET", "/html") } @@ -82,7 +82,7 @@ func BenchmarkOneRouteSet(B *testing.B) { func BenchmarkOneRouteString(B *testing.B) { router := New() router.GET("/text", func(c *Context) { - c.String(200, "this is a plain text") + c.String(http.StatusOK, "this is a plain text") }) runRequest(B, router, "GET", "/text") } diff --git a/deps/github.com/gin-gonic/gin/binding/binding_body_test.go b/deps/github.com/gin-gonic/gin/binding/binding_body_test.go index c41d9f86a..dfd761e10 100644 --- a/deps/github.com/gin-gonic/gin/binding/binding_body_test.go +++ b/deps/github.com/gin-gonic/gin/binding/binding_body_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "testing" - "github.com/gin-gonic/gin/binding/example" + "github.com/gin-gonic/gin/testdata/protoexample" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/ugorji/go/codec" @@ -55,12 +55,12 @@ func msgPackBody(t *testing.T) string { } func TestBindingBodyProto(t *testing.T) { - test := example.Test{ + test := protoexample.Test{ Label: proto.String("FOO"), } data, _ := proto.Marshal(&test) req := requestWithBody("POST", "/", string(data)) - form := example.Test{} + form := protoexample.Test{} body, _ := ioutil.ReadAll(req.Body) assert.NoError(t, ProtoBuf.BindBody(body, &form)) assert.Equal(t, test, form) diff --git a/deps/github.com/gin-gonic/gin/binding/binding_test.go b/deps/github.com/gin-gonic/gin/binding/binding_test.go index 936deac7e..efe87669d 100644 --- a/deps/github.com/gin-gonic/gin/binding/binding_test.go +++ b/deps/github.com/gin-gonic/gin/binding/binding_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "github.com/gin-gonic/gin/binding/example" + "github.com/gin-gonic/gin/testdata/protoexample" "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/ugorji/go/codec" @@ -562,7 +562,7 @@ func TestBindingFormMultipartFail(t *testing.T) { } func TestBindingProtoBuf(t *testing.T) { - test := &example.Test{ + test := &protoexample.Test{ Label: proto.String("yes"), } data, _ := proto.Marshal(test) @@ -574,7 +574,7 @@ func TestBindingProtoBuf(t *testing.T) { } func TestBindingProtoBufFail(t *testing.T) { - test := &example.Test{ + test := &protoexample.Test{ Label: proto.String("yes"), } data, _ := proto.Marshal(test) @@ -1156,14 +1156,14 @@ func testBodyBindingFail(t *testing.T, b Binding, name, path, badPath, body, bad func testProtoBodyBinding(t *testing.T, b Binding, name, path, badPath, body, badBody string) { assert.Equal(t, name, b.Name()) - obj := example.Test{} + obj := protoexample.Test{} req := requestWithBody("POST", path, body) req.Header.Add("Content-Type", MIMEPROTOBUF) err := b.Bind(req, &obj) assert.NoError(t, err) assert.Equal(t, "yes", *obj.Label) - obj = example.Test{} + obj = protoexample.Test{} req = requestWithBody("POST", badPath, badBody) req.Header.Add("Content-Type", MIMEPROTOBUF) err = ProtoBuf.Bind(req, &obj) @@ -1179,7 +1179,7 @@ func (h hook) Read([]byte) (int, error) { func testProtoBodyBindingFail(t *testing.T, b Binding, name, path, badPath, body, badBody string) { assert.Equal(t, name, b.Name()) - obj := example.Test{} + obj := protoexample.Test{} req := requestWithBody("POST", path, body) req.Body = ioutil.NopCloser(&hook{}) @@ -1187,7 +1187,7 @@ func testProtoBodyBindingFail(t *testing.T, b Binding, name, path, badPath, body err := b.Bind(req, &obj) assert.Error(t, err) - obj = example.Test{} + obj = protoexample.Test{} req = requestWithBody("POST", badPath, badBody) req.Header.Add("Content-Type", MIMEPROTOBUF) err = ProtoBuf.Bind(req, &obj) diff --git a/deps/github.com/gin-gonic/gin/binding/example/test.pb.go b/deps/github.com/gin-gonic/gin/binding/example/test.pb.go deleted file mode 100644 index 3de8444ff..000000000 --- a/deps/github.com/gin-gonic/gin/binding/example/test.pb.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by protoc-gen-go. -// source: test.proto -// DO NOT EDIT! - -/* -Package example is a generated protocol buffer package. - -It is generated from these files: - test.proto - -It has these top-level messages: - Test -*/ -package example - -import proto "github.com/golang/protobuf/proto" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = math.Inf - -type FOO int32 - -const ( - FOO_X FOO = 17 -) - -var FOO_name = map[int32]string{ - 17: "X", -} -var FOO_value = map[string]int32{ - "X": 17, -} - -func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p -} -func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) -} -func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") - if err != nil { - return err - } - *x = FOO(value) - return nil -} - -type Test struct { - Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` - Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` - Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` - Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Test) Reset() { *m = Test{} } -func (m *Test) String() string { return proto.CompactTextString(m) } -func (*Test) ProtoMessage() {} - -const Default_Test_Type int32 = 77 - -func (m *Test) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" -} - -func (m *Test) GetType() int32 { - if m != nil && m.Type != nil { - return *m.Type - } - return Default_Test_Type -} - -func (m *Test) GetReps() []int64 { - if m != nil { - return m.Reps - } - return nil -} - -func (m *Test) GetOptionalgroup() *Test_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil -} - -type Test_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } -func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } -func (*Test_OptionalGroup) ProtoMessage() {} - -func (m *Test_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -func init() { - proto.RegisterEnum("example.FOO", FOO_name, FOO_value) -} diff --git a/deps/github.com/gin-gonic/gin/binding/example/test.proto b/deps/github.com/gin-gonic/gin/binding/example/test.proto deleted file mode 100644 index 8ee9800aa..000000000 --- a/deps/github.com/gin-gonic/gin/binding/example/test.proto +++ /dev/null @@ -1,12 +0,0 @@ -package example; - -enum FOO {X=17;}; - -message Test { - required string label = 1; - optional int32 type = 2[default=77]; - repeated int64 reps = 3; - optional group OptionalGroup = 4{ - required string RequiredField = 5; - } -} diff --git a/deps/github.com/gin-gonic/gin/binding/form_mapping.go b/deps/github.com/gin-gonic/gin/binding/form_mapping.go index 3f6b9bfa1..f46a0dc12 100644 --- a/deps/github.com/gin-gonic/gin/binding/form_mapping.go +++ b/deps/github.com/gin-gonic/gin/binding/form_mapping.go @@ -74,16 +74,16 @@ func mapForm(ptr interface{}, form map[string][]string) error { } } val.Field(i).Set(slice) - } else { - if _, isTime := structField.Interface().(time.Time); isTime { - if err := setTimeField(inputValue[0], typeField, structField); err != nil { - return err - } - continue - } - if err := setWithProperType(typeField.Type.Kind(), inputValue[0], structField); err != nil { + continue + } + if _, isTime := structField.Interface().(time.Time); isTime { + if err := setTimeField(inputValue[0], typeField, structField); err != nil { return err } + continue + } + if err := setWithProperType(typeField.Type.Kind(), inputValue[0], structField); err != nil { + return err } } return nil @@ -178,7 +178,7 @@ func setFloatField(val string, bitSize int, field reflect.Value) error { func setTimeField(val string, structField reflect.StructField, value reflect.Value) error { timeFormat := structField.Tag.Get("time_format") if timeFormat == "" { - return errors.New("Blank time format") + timeFormat = time.RFC3339 } if val == "" { diff --git a/deps/github.com/gin-gonic/gin/context.go b/deps/github.com/gin-gonic/gin/context.go index 6fc5d25f6..063c72f00 100644 --- a/deps/github.com/gin-gonic/gin/context.go +++ b/deps/github.com/gin-gonic/gin/context.go @@ -159,16 +159,15 @@ func (c *Context) Error(err error) *Error { if err == nil { panic("err is nil") } - var parsedError *Error - switch err.(type) { - case *Error: - parsedError = err.(*Error) - default: + + parsedError, ok := err.(*Error) + if !ok { parsedError = &Error{ Err: err, Type: ErrorTypePrivate, } } + c.Errors = append(c.Errors, parsedError) return parsedError } @@ -361,6 +360,18 @@ func (c *Context) GetQueryArray(key string) ([]string, bool) { return []string{}, false } +// QueryMap returns a map for a given query key. +func (c *Context) QueryMap(key string) map[string]string { + dicts, _ := c.GetQueryMap(key) + return dicts +} + +// GetQueryMap returns a map for a given query key, plus a boolean value +// whether at least one value exists for the given key. +func (c *Context) GetQueryMap(key string) (map[string]string, bool) { + return c.get(c.Request.URL.Query(), key) +} + // PostForm returns the specified key from a POST urlencoded form or multipart form // when it exists, otherwise it returns an empty string `("")`. func (c *Context) PostForm(key string) string { @@ -416,6 +427,42 @@ func (c *Context) GetPostFormArray(key string) ([]string, bool) { return []string{}, false } +// PostFormMap returns a map for a given form key. +func (c *Context) PostFormMap(key string) map[string]string { + dicts, _ := c.GetPostFormMap(key) + return dicts +} + +// GetPostFormMap returns a map for a given form key, plus a boolean value +// whether at least one value exists for the given key. +func (c *Context) GetPostFormMap(key string) (map[string]string, bool) { + req := c.Request + req.ParseForm() + req.ParseMultipartForm(c.engine.MaxMultipartMemory) + dicts, exist := c.get(req.PostForm, key) + + if !exist && req.MultipartForm != nil && req.MultipartForm.File != nil { + dicts, exist = c.get(req.MultipartForm.Value, key) + } + + return dicts, exist +} + +// get is an internal method and returns a map which satisfy conditions. +func (c *Context) get(m map[string][]string, key string) (map[string]string, bool) { + dicts := make(map[string]string) + exist := false + for k, v := range m { + if i := strings.IndexByte(k, '['); i >= 1 && k[0:i] == key { + if j := strings.IndexByte(k[i+1:], ']'); j >= 1 { + exist = true + dicts[k[i+1:][:j]] = v[0] + } + } + } + return dicts, exist +} + // FormFile returns the first file for the provided form key. func (c *Context) FormFile(name string) (*multipart.FileHeader, error) { _, fh, err := c.Request.FormFile(name) @@ -464,6 +511,11 @@ func (c *Context) BindJSON(obj interface{}) error { return c.MustBindWith(obj, binding.JSON) } +// BindXML is a shortcut for c.MustBindWith(obj, binding.BindXML). +func (c *Context) BindXML(obj interface{}) error { + return c.MustBindWith(obj, binding.XML) +} + // BindQuery is a shortcut for c.MustBindWith(obj, binding.Query). func (c *Context) BindQuery(obj interface{}) error { return c.MustBindWith(obj, binding.Query) @@ -498,6 +550,11 @@ func (c *Context) ShouldBindJSON(obj interface{}) error { return c.ShouldBindWith(obj, binding.JSON) } +// ShouldBindXML is a shortcut for c.ShouldBindWith(obj, binding.XML). +func (c *Context) ShouldBindXML(obj interface{}) error { + return c.ShouldBindWith(obj, binding.XML) +} + // ShouldBindQuery is a shortcut for c.ShouldBindWith(obj, binding.Query). func (c *Context) ShouldBindQuery(obj interface{}) error { return c.ShouldBindWith(obj, binding.Query) @@ -608,9 +665,9 @@ func (c *Context) Status(code int) { func (c *Context) Header(key, value string) { if value == "" { c.Writer.Header().Del(key) - } else { - c.Writer.Header().Set(key, value) + return } + c.Writer.Header().Set(key, value) } // GetHeader returns value from request headers. @@ -695,7 +752,12 @@ func (c *Context) SecureJSON(code int, obj interface{}) { // It add padding to response body to request data from a server residing in a different domain than the client. // It also sets the Content-Type as "application/javascript". func (c *Context) JSONP(code int, obj interface{}) { - c.Render(code, render.JsonpJSON{Callback: c.DefaultQuery("callback", ""), Data: obj}) + callback := c.DefaultQuery("callback", "") + if callback == "" { + c.Render(code, render.JSON{Data: obj}) + return + } + c.Render(code, render.JsonpJSON{Callback: callback, Data: obj}) } // JSON serializes the given struct as JSON into the response body. @@ -704,6 +766,12 @@ func (c *Context) JSON(code int, obj interface{}) { c.Render(code, render.JSON{Data: obj}) } +// AsciiJSON serializes the given struct as JSON into the response body with unicode to ASCII string. +// It also sets the Content-Type as "application/json". +func (c *Context) AsciiJSON(code int, obj interface{}) { + c.Render(code, render.AsciiJSON{Data: obj}) +} + // XML serializes the given struct as XML into the response body. // It also sets the Content-Type as "application/xml". func (c *Context) XML(code int, obj interface{}) { @@ -715,6 +783,11 @@ func (c *Context) YAML(code int, obj interface{}) { c.Render(code, render.YAML{Data: obj}) } +// ProtoBuf serializes the given struct as ProtoBuf into the response body. +func (c *Context) ProtoBuf(code int, obj interface{}) { + c.Render(code, render.ProtoBuf{Data: obj}) +} + // String writes the given string into the response body. func (c *Context) String(code int, format string, values ...interface{}) { c.Render(code, render.String{Format: format, Data: values}) diff --git a/deps/github.com/gin-gonic/gin/context_17.go b/deps/github.com/gin-gonic/gin/context_17.go new file mode 100644 index 000000000..8e9f75ad7 --- /dev/null +++ b/deps/github.com/gin-gonic/gin/context_17.go @@ -0,0 +1,17 @@ +// Copyright 2018 Gin Core Team. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package gin + +import ( + "github.com/gin-gonic/gin/render" +) + +// PureJSON serializes the given struct as JSON into the response body. +// PureJSON, unlike JSON, does not replace special html characters with their unicode entities. +func (c *Context) PureJSON(code int, obj interface{}) { + c.Render(code, render.PureJSON{Data: obj}) +} diff --git a/deps/github.com/gin-gonic/gin/context_17_test.go b/deps/github.com/gin-gonic/gin/context_17_test.go new file mode 100644 index 000000000..d2251904f --- /dev/null +++ b/deps/github.com/gin-gonic/gin/context_17_test.go @@ -0,0 +1,27 @@ +// Copyright 2018 Gin Core Team. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package gin + +import ( + "net/http" + "net/http/httptest" + "testing" + + "github.com/stretchr/testify/assert" +) + +// Tests that the response is serialized as JSON +// and Content-Type is set to application/json +// and special HTML characters are preserved +func TestContextRenderPureJSON(t *testing.T) { + w := httptest.NewRecorder() + c, _ := CreateTestContext(w) + c.PureJSON(http.StatusCreated, H{"foo": "bar", "html": ""}) + assert.Equal(t, http.StatusCreated, w.Code) + assert.Equal(t, "{\"foo\":\"bar\",\"html\":\"\"}\n", w.Body.String()) + assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) +} diff --git a/deps/github.com/gin-gonic/gin/context_test.go b/deps/github.com/gin-gonic/gin/context_test.go index 12e02fa05..782f7bed5 100644 --- a/deps/github.com/gin-gonic/gin/context_test.go +++ b/deps/github.com/gin-gonic/gin/context_test.go @@ -9,6 +9,7 @@ import ( "errors" "fmt" "html/template" + "io" "mime/multipart" "net/http" "net/http/httptest" @@ -19,8 +20,11 @@ import ( "github.com/gin-contrib/sse" "github.com/gin-gonic/gin/binding" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "golang.org/x/net/context" + + testdata "github.com/gin-gonic/gin/testdata/protoexample" ) var _ context.Context = &Context{} @@ -47,6 +51,8 @@ func createMultipartRequest() *http.Request { must(mw.WriteField("time_local", "31/12/2016 14:55")) must(mw.WriteField("time_utc", "31/12/2016 14:55")) must(mw.WriteField("time_location", "31/12/2016 14:55")) + must(mw.WriteField("names[a]", "thinkerou")) + must(mw.WriteField("names[b]", "tianou")) req, err := http.NewRequest("POST", "/", body) must(err) req.Header.Set("Content-Type", MIMEMultipartPOSTForm+"; boundary="+boundary) @@ -371,7 +377,8 @@ func TestContextQuery(t *testing.T) { func TestContextQueryAndPostForm(t *testing.T) { c, _ := CreateTestContext(httptest.NewRecorder()) body := bytes.NewBufferString("foo=bar&page=11&both=&foo=second") - c.Request, _ = http.NewRequest("POST", "/?both=GET&id=main&id=omit&array[]=first&array[]=second", body) + c.Request, _ = http.NewRequest("POST", + "/?both=GET&id=main&id=omit&array[]=first&array[]=second&ids[a]=hi&ids[b]=3.14", body) c.Request.Header.Add("Content-Type", MIMEPOSTForm) assert.Equal(t, "bar", c.DefaultPostForm("foo", "none")) @@ -439,6 +446,30 @@ func TestContextQueryAndPostForm(t *testing.T) { values = c.QueryArray("both") assert.Equal(t, 1, len(values)) assert.Equal(t, "GET", values[0]) + + dicts, ok := c.GetQueryMap("ids") + assert.True(t, ok) + assert.Equal(t, "hi", dicts["a"]) + assert.Equal(t, "3.14", dicts["b"]) + + dicts, ok = c.GetQueryMap("nokey") + assert.False(t, ok) + assert.Equal(t, 0, len(dicts)) + + dicts, ok = c.GetQueryMap("both") + assert.False(t, ok) + assert.Equal(t, 0, len(dicts)) + + dicts, ok = c.GetQueryMap("array") + assert.False(t, ok) + assert.Equal(t, 0, len(dicts)) + + dicts = c.QueryMap("ids") + assert.Equal(t, "hi", dicts["a"]) + assert.Equal(t, "3.14", dicts["b"]) + + dicts = c.QueryMap("nokey") + assert.Equal(t, 0, len(dicts)) } func TestContextPostFormMultipart(t *testing.T) { @@ -515,6 +546,22 @@ func TestContextPostFormMultipart(t *testing.T) { values = c.PostFormArray("foo") assert.Equal(t, 1, len(values)) assert.Equal(t, "bar", values[0]) + + dicts, ok := c.GetPostFormMap("names") + assert.True(t, ok) + assert.Equal(t, "thinkerou", dicts["a"]) + assert.Equal(t, "tianou", dicts["b"]) + + dicts, ok = c.GetPostFormMap("nokey") + assert.False(t, ok) + assert.Equal(t, 0, len(dicts)) + + dicts = c.PostFormMap("names") + assert.Equal(t, "thinkerou", dicts["a"]) + assert.Equal(t, "tianou", dicts["b"]) + + dicts = c.PostFormMap("nokey") + assert.Equal(t, 0, len(dicts)) } func TestContextSetCookie(t *testing.T) { @@ -541,10 +588,11 @@ func TestContextGetCookie(t *testing.T) { } func TestContextBodyAllowedForStatus(t *testing.T) { + // todo(thinkerou): go1.6 not support StatusProcessing assert.False(t, false, bodyAllowedForStatus(102)) - assert.False(t, false, bodyAllowedForStatus(204)) - assert.False(t, false, bodyAllowedForStatus(304)) - assert.True(t, true, bodyAllowedForStatus(500)) + assert.False(t, false, bodyAllowedForStatus(http.StatusNoContent)) + assert.False(t, false, bodyAllowedForStatus(http.StatusNotModified)) + assert.True(t, true, bodyAllowedForStatus(http.StatusInternalServerError)) } type TestPanicRender struct { @@ -571,14 +619,15 @@ func TestContextRenderPanicIfErr(t *testing.T) { // Tests that the response is serialized as JSON // and Content-Type is set to application/json +// and special HTML characters are escaped func TestContextRenderJSON(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.JSON(201, H{"foo": "bar"}) + c.JSON(http.StatusCreated, H{"foo": "bar", "html": ""}) - assert.Equal(t, 201, w.Code) - assert.Equal(t, "{\"foo\":\"bar\"}", w.Body.String()) + assert.Equal(t, http.StatusCreated, w.Code) + assert.Equal(t, "{\"foo\":\"bar\",\"html\":\"\\u003cb\\u003e\"}", w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -589,21 +638,35 @@ func TestContextRenderJSONP(t *testing.T) { c, _ := CreateTestContext(w) c.Request, _ = http.NewRequest("GET", "http://example.com/?callback=x", nil) - c.JSONP(201, H{"foo": "bar"}) + c.JSONP(http.StatusCreated, H{"foo": "bar"}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "x({\"foo\":\"bar\"})", w.Body.String()) assert.Equal(t, "application/javascript; charset=utf-8", w.HeaderMap.Get("Content-Type")) } +// Tests that the response is serialized as JSONP +// and Content-Type is set to application/json +func TestContextRenderJSONPWithoutCallback(t *testing.T) { + w := httptest.NewRecorder() + c, _ := CreateTestContext(w) + c.Request, _ = http.NewRequest("GET", "http://example.com", nil) + + c.JSONP(http.StatusCreated, H{"foo": "bar"}) + + assert.Equal(t, http.StatusCreated, w.Code) + assert.Equal(t, "{\"foo\":\"bar\"}", w.Body.String()) + assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) +} + // Tests that no JSON is rendered if code is 204 func TestContextRenderNoContentJSON(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.JSON(204, H{"foo": "bar"}) + c.JSON(http.StatusNoContent, H{"foo": "bar"}) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -615,9 +678,9 @@ func TestContextRenderAPIJSON(t *testing.T) { c, _ := CreateTestContext(w) c.Header("Content-Type", "application/vnd.api+json") - c.JSON(201, H{"foo": "bar"}) + c.JSON(http.StatusCreated, H{"foo": "bar"}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "{\"foo\":\"bar\"}", w.Body.String()) assert.Equal(t, "application/vnd.api+json", w.HeaderMap.Get("Content-Type")) } @@ -628,9 +691,9 @@ func TestContextRenderNoContentAPIJSON(t *testing.T) { c, _ := CreateTestContext(w) c.Header("Content-Type", "application/vnd.api+json") - c.JSON(204, H{"foo": "bar"}) + c.JSON(http.StatusNoContent, H{"foo": "bar"}) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, w.HeaderMap.Get("Content-Type"), "application/vnd.api+json") } @@ -641,9 +704,9 @@ func TestContextRenderIndentedJSON(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.IndentedJSON(201, H{"foo": "bar", "bar": "foo", "nested": H{"foo": "bar"}}) + c.IndentedJSON(http.StatusCreated, H{"foo": "bar", "bar": "foo", "nested": H{"foo": "bar"}}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "{\n \"bar\": \"foo\",\n \"foo\": \"bar\",\n \"nested\": {\n \"foo\": \"bar\"\n }\n}", w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -653,9 +716,9 @@ func TestContextRenderNoContentIndentedJSON(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.IndentedJSON(204, H{"foo": "bar", "bar": "foo", "nested": H{"foo": "bar"}}) + c.IndentedJSON(http.StatusNoContent, H{"foo": "bar", "bar": "foo", "nested": H{"foo": "bar"}}) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -667,9 +730,9 @@ func TestContextRenderSecureJSON(t *testing.T) { c, router := CreateTestContext(w) router.SecureJsonPrefix("&&&START&&&") - c.SecureJSON(201, []string{"foo", "bar"}) + c.SecureJSON(http.StatusCreated, []string{"foo", "bar"}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "&&&START&&&[\"foo\",\"bar\"]", w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -679,13 +742,24 @@ func TestContextRenderNoContentSecureJSON(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.SecureJSON(204, []string{"foo", "bar"}) + c.SecureJSON(http.StatusNoContent, []string{"foo", "bar"}) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) } +func TestContextRenderNoContentAsciiJSON(t *testing.T) { + w := httptest.NewRecorder() + c, _ := CreateTestContext(w) + + c.AsciiJSON(http.StatusNoContent, []string{"lang", "Go语言"}) + + assert.Equal(t, http.StatusNoContent, w.Code) + assert.Empty(t, w.Body.String()) + assert.Equal(t, "application/json", w.HeaderMap.Get("Content-Type")) +} + // Tests that the response executes the templates // and responds with Content-Type set to text/html func TestContextRenderHTML(t *testing.T) { @@ -695,9 +769,9 @@ func TestContextRenderHTML(t *testing.T) { templ := template.Must(template.New("t").Parse(`Hello {{.name}}`)) router.SetHTMLTemplate(templ) - c.HTML(201, "t", H{"name": "alexandernyquist"}) + c.HTML(http.StatusCreated, "t", H{"name": "alexandernyquist"}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "Hello alexandernyquist", w.Body.String()) assert.Equal(t, "text/html; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -719,9 +793,9 @@ func TestContextRenderHTML2(t *testing.T) { assert.Equal(t, "[GIN-debug] [WARNING] Since SetHTMLTemplate() is NOT thread-safe. It should only be called\nat initialization. ie. before any route is registered or the router is listening in a socket:\n\n\trouter := gin.Default()\n\trouter.SetHTMLTemplate(template) // << good place\n\n", b.String()) - c.HTML(201, "t", H{"name": "alexandernyquist"}) + c.HTML(http.StatusCreated, "t", H{"name": "alexandernyquist"}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "Hello alexandernyquist", w.Body.String()) assert.Equal(t, "text/html; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -733,9 +807,9 @@ func TestContextRenderNoContentHTML(t *testing.T) { templ := template.Must(template.New("t").Parse(`Hello {{.name}}`)) router.SetHTMLTemplate(templ) - c.HTML(204, "t", H{"name": "alexandernyquist"}) + c.HTML(http.StatusNoContent, "t", H{"name": "alexandernyquist"}) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "text/html; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -746,9 +820,9 @@ func TestContextRenderXML(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.XML(201, H{"foo": "bar"}) + c.XML(http.StatusCreated, H{"foo": "bar"}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "bar", w.Body.String()) assert.Equal(t, "application/xml; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -758,9 +832,9 @@ func TestContextRenderNoContentXML(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.XML(204, H{"foo": "bar"}) + c.XML(http.StatusNoContent, H{"foo": "bar"}) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "application/xml; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -771,9 +845,9 @@ func TestContextRenderString(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.String(201, "test %s %d", "string", 2) + c.String(http.StatusCreated, "test %s %d", "string", 2) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "test string 2", w.Body.String()) assert.Equal(t, "text/plain; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -783,9 +857,9 @@ func TestContextRenderNoContentString(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.String(204, "test %s %d", "string", 2) + c.String(http.StatusNoContent, "test %s %d", "string", 2) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "text/plain; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -797,9 +871,9 @@ func TestContextRenderHTMLString(t *testing.T) { c, _ := CreateTestContext(w) c.Header("Content-Type", "text/html; charset=utf-8") - c.String(201, "%s %d", "string", 3) + c.String(http.StatusCreated, "%s %d", "string", 3) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "string 3", w.Body.String()) assert.Equal(t, "text/html; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -810,9 +884,9 @@ func TestContextRenderNoContentHTMLString(t *testing.T) { c, _ := CreateTestContext(w) c.Header("Content-Type", "text/html; charset=utf-8") - c.String(204, "%s %d", "string", 3) + c.String(http.StatusNoContent, "%s %d", "string", 3) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "text/html; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -823,9 +897,9 @@ func TestContextRenderData(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.Data(201, "text/csv", []byte(`foo,bar`)) + c.Data(http.StatusCreated, "text/csv", []byte(`foo,bar`)) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "foo,bar", w.Body.String()) assert.Equal(t, "text/csv", w.HeaderMap.Get("Content-Type")) } @@ -835,9 +909,9 @@ func TestContextRenderNoContentData(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.Data(204, "text/csv", []byte(`foo,bar`)) + c.Data(http.StatusNoContent, "text/csv", []byte(`foo,bar`)) - assert.Equal(t, 204, w.Code) + assert.Equal(t, http.StatusNoContent, w.Code) assert.Empty(t, w.Body.String()) assert.Equal(t, "text/csv", w.HeaderMap.Get("Content-Type")) } @@ -866,7 +940,7 @@ func TestContextRenderFile(t *testing.T) { c.Request, _ = http.NewRequest("GET", "/", nil) c.File("./gin.go") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Contains(t, w.Body.String(), "func New() *Engine {") assert.Equal(t, "text/plain; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -877,13 +951,37 @@ func TestContextRenderYAML(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.YAML(201, H{"foo": "bar"}) + c.YAML(http.StatusCreated, H{"foo": "bar"}) - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "foo: bar\n", w.Body.String()) assert.Equal(t, "application/x-yaml; charset=utf-8", w.HeaderMap.Get("Content-Type")) } +// TestContextRenderProtoBuf tests that the response is serialized as ProtoBuf +// and Content-Type is set to application/x-protobuf +// and we just use the example protobuf to check if the response is correct +func TestContextRenderProtoBuf(t *testing.T) { + w := httptest.NewRecorder() + c, _ := CreateTestContext(w) + + reps := []int64{int64(1), int64(2)} + label := "test" + data := &testdata.Test{ + Label: &label, + Reps: reps, + } + + c.ProtoBuf(http.StatusCreated, data) + + protoData, err := proto.Marshal(data) + assert.NoError(t, err) + + assert.Equal(t, http.StatusCreated, w.Code) + assert.Equal(t, string(protoData[:]), w.Body.String()) + assert.Equal(t, "application/x-protobuf", w.HeaderMap.Get("Content-Type")) +} + func TestContextHeaders(t *testing.T) { c, _ := CreateTestContext(httptest.NewRecorder()) c.Header("Content-Type", "text/plain") @@ -909,9 +1007,9 @@ func TestContextRenderRedirectWithRelativePath(t *testing.T) { assert.Panics(t, func() { c.Redirect(299, "/new_path") }) assert.Panics(t, func() { c.Redirect(309, "/new_path") }) - c.Redirect(301, "/path") + c.Redirect(http.StatusMovedPermanently, "/path") c.Writer.WriteHeaderNow() - assert.Equal(t, 301, w.Code) + assert.Equal(t, http.StatusMovedPermanently, w.Code) assert.Equal(t, "/path", w.Header().Get("Location")) } @@ -920,10 +1018,10 @@ func TestContextRenderRedirectWithAbsolutePath(t *testing.T) { c, _ := CreateTestContext(w) c.Request, _ = http.NewRequest("POST", "http://example.com", nil) - c.Redirect(302, "http://google.com") + c.Redirect(http.StatusFound, "http://google.com") c.Writer.WriteHeaderNow() - assert.Equal(t, 302, w.Code) + assert.Equal(t, http.StatusFound, w.Code) assert.Equal(t, "http://google.com", w.Header().Get("Location")) } @@ -932,21 +1030,23 @@ func TestContextRenderRedirectWith201(t *testing.T) { c, _ := CreateTestContext(w) c.Request, _ = http.NewRequest("POST", "http://example.com", nil) - c.Redirect(201, "/resource") + c.Redirect(http.StatusCreated, "/resource") c.Writer.WriteHeaderNow() - assert.Equal(t, 201, w.Code) + assert.Equal(t, http.StatusCreated, w.Code) assert.Equal(t, "/resource", w.Header().Get("Location")) } func TestContextRenderRedirectAll(t *testing.T) { c, _ := CreateTestContext(httptest.NewRecorder()) c.Request, _ = http.NewRequest("POST", "http://example.com", nil) - assert.Panics(t, func() { c.Redirect(200, "/resource") }) - assert.Panics(t, func() { c.Redirect(202, "/resource") }) + assert.Panics(t, func() { c.Redirect(http.StatusOK, "/resource") }) + assert.Panics(t, func() { c.Redirect(http.StatusAccepted, "/resource") }) assert.Panics(t, func() { c.Redirect(299, "/resource") }) assert.Panics(t, func() { c.Redirect(309, "/resource") }) - assert.NotPanics(t, func() { c.Redirect(300, "/resource") }) + assert.NotPanics(t, func() { c.Redirect(http.StatusMultipleChoices, "/resource") }) + // todo(thinkerou): go1.6 not support StatusPermanentRedirect(308) + // when we upgrade go version we can use http.StatusPermanentRedirect assert.NotPanics(t, func() { c.Redirect(308, "/resource") }) } @@ -955,12 +1055,12 @@ func TestContextNegotiationWithJSON(t *testing.T) { c, _ := CreateTestContext(w) c.Request, _ = http.NewRequest("POST", "", nil) - c.Negotiate(200, Negotiate{ + c.Negotiate(http.StatusOK, Negotiate{ Offered: []string{MIMEJSON, MIMEXML}, Data: H{"foo": "bar"}, }) - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "{\"foo\":\"bar\"}", w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -970,12 +1070,12 @@ func TestContextNegotiationWithXML(t *testing.T) { c, _ := CreateTestContext(w) c.Request, _ = http.NewRequest("POST", "", nil) - c.Negotiate(200, Negotiate{ + c.Negotiate(http.StatusOK, Negotiate{ Offered: []string{MIMEXML, MIMEJSON}, Data: H{"foo": "bar"}, }) - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "bar", w.Body.String()) assert.Equal(t, "application/xml; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -987,13 +1087,13 @@ func TestContextNegotiationWithHTML(t *testing.T) { templ := template.Must(template.New("t").Parse(`Hello {{.name}}`)) router.SetHTMLTemplate(templ) - c.Negotiate(200, Negotiate{ + c.Negotiate(http.StatusOK, Negotiate{ Offered: []string{MIMEHTML}, Data: H{"name": "gin"}, HTMLName: "t", }) - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "Hello gin", w.Body.String()) assert.Equal(t, "text/html; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -1003,11 +1103,11 @@ func TestContextNegotiationNotSupport(t *testing.T) { c, _ := CreateTestContext(w) c.Request, _ = http.NewRequest("POST", "", nil) - c.Negotiate(200, Negotiate{ + c.Negotiate(http.StatusOK, Negotiate{ Offered: []string{MIMEPOSTForm}, }) - assert.Equal(t, 406, w.Code) + assert.Equal(t, http.StatusNotAcceptable, w.Code) assert.Equal(t, c.index, abortIndex) assert.True(t, c.IsAborted()) } @@ -1065,11 +1165,11 @@ func TestContextAbortWithStatus(t *testing.T) { c, _ := CreateTestContext(w) c.index = 4 - c.AbortWithStatus(401) + c.AbortWithStatus(http.StatusUnauthorized) assert.Equal(t, abortIndex, c.index) - assert.Equal(t, 401, c.Writer.Status()) - assert.Equal(t, 401, w.Code) + assert.Equal(t, http.StatusUnauthorized, c.Writer.Status()) + assert.Equal(t, http.StatusUnauthorized, w.Code) assert.True(t, c.IsAborted()) } @@ -1087,11 +1187,11 @@ func TestContextAbortWithStatusJSON(t *testing.T) { in.Bar = "barValue" in.Foo = "fooValue" - c.AbortWithStatusJSON(415, in) + c.AbortWithStatusJSON(http.StatusUnsupportedMediaType, in) assert.Equal(t, abortIndex, c.index) - assert.Equal(t, 415, c.Writer.Status()) - assert.Equal(t, 415, w.Code) + assert.Equal(t, http.StatusUnsupportedMediaType, c.Writer.Status()) + assert.Equal(t, http.StatusUnsupportedMediaType, w.Code) assert.True(t, c.IsAborted()) contentType := w.Header().Get("Content-Type") @@ -1154,9 +1254,9 @@ func TestContextAbortWithError(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) - c.AbortWithError(401, errors.New("bad input")).SetMeta("some input") + c.AbortWithError(http.StatusUnauthorized, errors.New("bad input")).SetMeta("some input") - assert.Equal(t, 401, w.Code) + assert.Equal(t, http.StatusUnauthorized, w.Code) assert.Equal(t, abortIndex, c.index) assert.True(t, c.IsAborted()) } @@ -1230,6 +1330,26 @@ func TestContextBindWithJSON(t *testing.T) { assert.Equal(t, "bar", obj.Foo) assert.Equal(t, 0, w.Body.Len()) } +func TestContextBindWithXML(t *testing.T) { + w := httptest.NewRecorder() + c, _ := CreateTestContext(w) + + c.Request, _ = http.NewRequest("POST", "/", bytes.NewBufferString(` + + FOO + BAR + `)) + c.Request.Header.Add("Content-Type", MIMEXML) // set fake content-type + + var obj struct { + Foo string `xml:"foo"` + Bar string `xml:"bar"` + } + assert.NoError(t, c.BindXML(&obj)) + assert.Equal(t, "FOO", obj.Foo) + assert.Equal(t, "BAR", obj.Bar) + assert.Equal(t, 0, w.Body.Len()) +} func TestContextBindWithQuery(t *testing.T) { w := httptest.NewRecorder() @@ -1264,7 +1384,7 @@ func TestContextBadAutoBind(t *testing.T) { assert.Empty(t, obj.Bar) assert.Empty(t, obj.Foo) - assert.Equal(t, 400, w.Code) + assert.Equal(t, http.StatusBadRequest, w.Code) assert.True(t, c.IsAborted()) } @@ -1300,6 +1420,27 @@ func TestContextShouldBindWithJSON(t *testing.T) { assert.Equal(t, 0, w.Body.Len()) } +func TestContextShouldBindWithXML(t *testing.T) { + w := httptest.NewRecorder() + c, _ := CreateTestContext(w) + + c.Request, _ = http.NewRequest("POST", "/", bytes.NewBufferString(` + + FOO + BAR + `)) + c.Request.Header.Add("Content-Type", MIMEXML) // set fake content-type + + var obj struct { + Foo string `xml:"foo"` + Bar string `xml:"bar"` + } + assert.NoError(t, c.ShouldBindXML(&obj)) + assert.Equal(t, "FOO", obj.Foo) + assert.Equal(t, "BAR", obj.Bar) + assert.Equal(t, 0, w.Body.Len()) +} + func TestContextShouldBindWithQuery(t *testing.T) { w := httptest.NewRecorder() c, _ := CreateTestContext(w) @@ -1490,3 +1631,58 @@ func TestContextRenderDataFromReader(t *testing.T) { assert.Equal(t, fmt.Sprintf("%d", contentLength), w.HeaderMap.Get("Content-Length")) assert.Equal(t, extraHeaders["Content-Disposition"], w.HeaderMap.Get("Content-Disposition")) } + +type TestResponseRecorder struct { + *httptest.ResponseRecorder + closeChannel chan bool +} + +func (r *TestResponseRecorder) CloseNotify() <-chan bool { + return r.closeChannel +} + +func (r *TestResponseRecorder) closeClient() { + r.closeChannel <- true +} + +func CreateTestResponseRecorder() *TestResponseRecorder { + return &TestResponseRecorder{ + httptest.NewRecorder(), + make(chan bool, 1), + } +} + +func TestContextStream(t *testing.T) { + w := CreateTestResponseRecorder() + c, _ := CreateTestContext(w) + + stopStream := true + c.Stream(func(w io.Writer) bool { + defer func() { + stopStream = false + }() + + w.Write([]byte("test")) + + return stopStream + }) + + assert.Equal(t, "testtest", w.Body.String()) +} + +func TestContextStreamWithClientGone(t *testing.T) { + w := CreateTestResponseRecorder() + c, _ := CreateTestContext(w) + + c.Stream(func(writer io.Writer) bool { + defer func() { + w.closeClient() + }() + + writer.Write([]byte("test")) + + return true + }) + + assert.Equal(t, "test", w.Body.String()) +} diff --git a/deps/github.com/gin-gonic/gin/debug_test.go b/deps/github.com/gin-gonic/gin/debug_test.go index 440173b77..ed5a6a54f 100644 --- a/deps/github.com/gin-gonic/gin/debug_test.go +++ b/deps/github.com/gin-gonic/gin/debug_test.go @@ -72,7 +72,7 @@ func TestDebugPrintLoadTemplate(t *testing.T) { setup(&w) defer teardown() - templ := template.Must(template.New("").Delims("{[{", "}]}").ParseGlob("./fixtures/basic/hello.tmpl")) + templ := template.Must(template.New("").Delims("{[{", "}]}").ParseGlob("./testdata/template/hello.tmpl")) debugPrintLoadTemplate(templ) assert.Regexp(t, `^\[GIN-debug\] Loaded HTML Templates \(2\): \n(\t- \n|\t- hello\.tmpl\n){2}\n`, w.String()) } diff --git a/deps/github.com/gin-gonic/gin/errors_test.go b/deps/github.com/gin-gonic/gin/errors_test.go index a666d7c1b..0626611fe 100644 --- a/deps/github.com/gin-gonic/gin/errors_test.go +++ b/deps/github.com/gin-gonic/gin/errors_test.go @@ -19,17 +19,17 @@ func TestError(t *testing.T) { Type: ErrorTypePrivate, } assert.Equal(t, err.Error(), baseError.Error()) - assert.Equal(t, err.JSON(), H{"error": baseError.Error()}) + assert.Equal(t, H{"error": baseError.Error()}, err.JSON()) assert.Equal(t, err.SetType(ErrorTypePublic), err) - assert.Equal(t, err.Type, ErrorTypePublic) + assert.Equal(t, ErrorTypePublic, err.Type) assert.Equal(t, err.SetMeta("some data"), err) - assert.Equal(t, err.Meta, "some data") - assert.Equal(t, err.JSON(), H{ + assert.Equal(t, "some data", err.Meta) + assert.Equal(t, H{ "error": baseError.Error(), "meta": "some data", - }) + }, err.JSON()) jsonBytes, _ := json.Marshal(err) assert.Equal(t, "{\"error\":\"test error\",\"meta\":\"some data\"}", string(jsonBytes)) @@ -38,22 +38,22 @@ func TestError(t *testing.T) { "status": "200", "data": "some data", }) - assert.Equal(t, err.JSON(), H{ + assert.Equal(t, H{ "error": baseError.Error(), "status": "200", "data": "some data", - }) + }, err.JSON()) err.SetMeta(H{ "error": "custom error", "status": "200", "data": "some data", }) - assert.Equal(t, err.JSON(), H{ + assert.Equal(t, H{ "error": "custom error", "status": "200", "data": "some data", - }) + }, err.JSON()) type customError struct { status string diff --git a/deps/github.com/gin-gonic/gin/examples/basic/main.go b/deps/github.com/gin-gonic/gin/examples/basic/main.go index 473c6a09d..48fa7bbac 100644 --- a/deps/github.com/gin-gonic/gin/examples/basic/main.go +++ b/deps/github.com/gin-gonic/gin/examples/basic/main.go @@ -1,6 +1,8 @@ package main import ( + "net/http" + "github.com/gin-gonic/gin" ) @@ -13,7 +15,7 @@ func setupRouter() *gin.Engine { // Ping test r.GET("/ping", func(c *gin.Context) { - c.String(200, "pong") + c.String(http.StatusOK, "pong") }) // Get user value @@ -21,9 +23,9 @@ func setupRouter() *gin.Engine { user := c.Params.ByName("name") value, ok := DB[user] if ok { - c.JSON(200, gin.H{"user": user, "value": value}) + c.JSON(http.StatusOK, gin.H{"user": user, "value": value}) } else { - c.JSON(200, gin.H{"user": user, "status": "no value"}) + c.JSON(http.StatusOK, gin.H{"user": user, "status": "no value"}) } }) @@ -49,7 +51,7 @@ func setupRouter() *gin.Engine { if c.Bind(&json) == nil { DB[user] = json.Value - c.JSON(200, gin.H{"status": "ok"}) + c.JSON(http.StatusOK, gin.H{"status": "ok"}) } }) diff --git a/deps/github.com/gin-gonic/gin/examples/basic/main_test.go b/deps/github.com/gin-gonic/gin/examples/basic/main_test.go index 61203d66f..5eb852403 100644 --- a/deps/github.com/gin-gonic/gin/examples/basic/main_test.go +++ b/deps/github.com/gin-gonic/gin/examples/basic/main_test.go @@ -15,6 +15,6 @@ func TestPingRoute(t *testing.T) { req, _ := http.NewRequest("GET", "/ping", nil) router.ServeHTTP(w, req) - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "pong", w.Body.String()) } diff --git a/deps/github.com/gin-gonic/gin/examples/favicon/main.go b/deps/github.com/gin-gonic/gin/examples/favicon/main.go index 5ad39331d..d32ca0985 100644 --- a/deps/github.com/gin-gonic/gin/examples/favicon/main.go +++ b/deps/github.com/gin-gonic/gin/examples/favicon/main.go @@ -1,6 +1,8 @@ package main import ( + "net/http" + "github.com/gin-gonic/gin" "github.com/thinkerou/favicon" ) @@ -9,7 +11,7 @@ func main() { app := gin.Default() app.Use(favicon.New("./favicon.ico")) app.GET("/ping", func(c *gin.Context) { - c.String(200, "Hello favicon.") + c.String(http.StatusOK, "Hello favicon.") }) app.Run(":8080") } diff --git a/deps/github.com/gin-gonic/gin/examples/http2/main.go b/deps/github.com/gin-gonic/gin/examples/http2/main.go index 07df01e2b..6598a4c9f 100644 --- a/deps/github.com/gin-gonic/gin/examples/http2/main.go +++ b/deps/github.com/gin-gonic/gin/examples/http2/main.go @@ -3,6 +3,7 @@ package main import ( "html/template" "log" + "net/http" "os" "github.com/gin-gonic/gin" @@ -27,7 +28,7 @@ func main() { r.SetHTMLTemplate(html) r.GET("/welcome", func(c *gin.Context) { - c.HTML(200, "https", gin.H{ + c.HTML(http.StatusOK, "https", gin.H{ "status": "success", }) }) diff --git a/deps/github.com/gin-gonic/gin/examples/realtime-advanced/routes.go b/deps/github.com/gin-gonic/gin/examples/realtime-advanced/routes.go index 86da9bea2..03c699108 100644 --- a/deps/github.com/gin-gonic/gin/examples/realtime-advanced/routes.go +++ b/deps/github.com/gin-gonic/gin/examples/realtime-advanced/routes.go @@ -4,6 +4,7 @@ import ( "fmt" "html" "io" + "net/http" "strings" "time" @@ -21,12 +22,12 @@ func rateLimit(c *gin.Context) { fmt.Println("ip blocked") } c.Abort() - c.String(503, "you were automatically banned :)") + c.String(http.StatusServiceUnavailable, "you were automatically banned :)") } } func index(c *gin.Context) { - c.Redirect(301, "/room/hn") + c.Redirect(http.StatusMovedPermanently, "/room/hn") } func roomGET(c *gin.Context) { @@ -38,7 +39,7 @@ func roomGET(c *gin.Context) { if len(nick) > 13 { nick = nick[0:12] + "..." } - c.HTML(200, "room_login.templ.html", gin.H{ + c.HTML(http.StatusOK, "room_login.templ.html", gin.H{ "roomid": roomid, "nick": nick, "timestamp": time.Now().Unix(), @@ -55,7 +56,7 @@ func roomPOST(c *gin.Context) { validMessage := len(message) > 1 && len(message) < 200 validNick := len(nick) > 1 && len(nick) < 14 if !validMessage || !validNick { - c.JSON(400, gin.H{ + c.JSON(http.StatusBadRequest, gin.H{ "status": "failed", "error": "the message or nickname is too long", }) @@ -68,7 +69,7 @@ func roomPOST(c *gin.Context) { } messages.Add("inbound", 1) room(roomid).Submit(post) - c.JSON(200, post) + c.JSON(http.StatusOK, post) } func streamRoom(c *gin.Context) { diff --git a/deps/github.com/gin-gonic/gin/examples/realtime-chat/main.go b/deps/github.com/gin-gonic/gin/examples/realtime-chat/main.go index e4b55a0f0..5741fcbad 100644 --- a/deps/github.com/gin-gonic/gin/examples/realtime-chat/main.go +++ b/deps/github.com/gin-gonic/gin/examples/realtime-chat/main.go @@ -4,6 +4,7 @@ import ( "fmt" "io" "math/rand" + "net/http" "github.com/gin-gonic/gin" ) @@ -34,7 +35,7 @@ func stream(c *gin.Context) { func roomGET(c *gin.Context) { roomid := c.Param("roomid") userid := fmt.Sprint(rand.Int31()) - c.HTML(200, "chat_room", gin.H{ + c.HTML(http.StatusOK, "chat_room", gin.H{ "roomid": roomid, "userid": userid, }) @@ -46,7 +47,7 @@ func roomPOST(c *gin.Context) { message := c.PostForm("message") room(roomid).Submit(userid + ": " + message) - c.JSON(200, gin.H{ + c.JSON(http.StatusOK, gin.H{ "status": "success", "message": message, }) diff --git a/deps/github.com/gin-gonic/gin/examples/template/main.go b/deps/github.com/gin-gonic/gin/examples/template/main.go index f9e611dff..e20a3b981 100644 --- a/deps/github.com/gin-gonic/gin/examples/template/main.go +++ b/deps/github.com/gin-gonic/gin/examples/template/main.go @@ -20,7 +20,7 @@ func main() { router.SetFuncMap(template.FuncMap{ "formatAsDate": formatAsDate, }) - router.LoadHTMLFiles("../../fixtures/basic/raw.tmpl") + router.LoadHTMLFiles("../../testdata/template/raw.tmpl") router.GET("/raw", func(c *gin.Context) { c.HTML(http.StatusOK, "raw.tmpl", map[string]interface{}{ diff --git a/deps/github.com/gin-gonic/gin/gin.go b/deps/github.com/gin-gonic/gin/gin.go index 3ee8018d5..aa62e014f 100644 --- a/deps/github.com/gin-gonic/gin/gin.go +++ b/deps/github.com/gin-gonic/gin/gin.go @@ -16,7 +16,7 @@ import ( const ( // Version is Framework's version. - Version = "v1.2" + Version = "v1.3.0" defaultMultipartMemory = 32 << 20 // 32 MB ) @@ -349,38 +349,40 @@ func (engine *Engine) handleHTTPRequest(c *Context) { // Find root of the tree for the given HTTP method t := engine.trees for i, tl := 0, len(t); i < tl; i++ { - if t[i].method == httpMethod { - root := t[i].root - // Find route in tree - handlers, params, tsr := root.getValue(path, c.Params, unescape) - if handlers != nil { - c.handlers = handlers - c.Params = params - c.Next() - c.writermem.WriteHeaderNow() + if t[i].method != httpMethod { + continue + } + root := t[i].root + // Find route in tree + handlers, params, tsr := root.getValue(path, c.Params, unescape) + if handlers != nil { + c.handlers = handlers + c.Params = params + c.Next() + c.writermem.WriteHeaderNow() + return + } + if httpMethod != "CONNECT" && path != "/" { + if tsr && engine.RedirectTrailingSlash { + redirectTrailingSlash(c) return } - if httpMethod != "CONNECT" && path != "/" { - if tsr && engine.RedirectTrailingSlash { - redirectTrailingSlash(c) - return - } - if engine.RedirectFixedPath && redirectFixedPath(c, root, engine.RedirectFixedPath) { - return - } + if engine.RedirectFixedPath && redirectFixedPath(c, root, engine.RedirectFixedPath) { + return } - break } + break } if engine.HandleMethodNotAllowed { for _, tree := range engine.trees { - if tree.method != httpMethod { - if handlers, _, _ := tree.root.getValue(path, nil, unescape); handlers != nil { - c.handlers = engine.allNoMethod - serveError(c, http.StatusMethodNotAllowed, default405Body) - return - } + if tree.method == httpMethod { + continue + } + if handlers, _, _ := tree.root.getValue(path, nil, unescape); handlers != nil { + c.handlers = engine.allNoMethod + serveError(c, http.StatusMethodNotAllowed, default405Body) + return } } } @@ -393,14 +395,16 @@ var mimePlain = []string{MIMEPlain} func serveError(c *Context, code int, defaultMessage []byte) { c.writermem.status = code c.Next() - if !c.writermem.Written() { - if c.writermem.Status() == code { - c.writermem.Header()["Content-Type"] = mimePlain - c.Writer.Write(defaultMessage) - } else { - c.writermem.WriteHeaderNow() - } + if c.writermem.Written() { + return + } + if c.writermem.Status() == code { + c.writermem.Header()["Content-Type"] = mimePlain + c.Writer.Write(defaultMessage) + return } + c.writermem.WriteHeaderNow() + return } func redirectTrailingSlash(c *Context) { @@ -411,10 +415,9 @@ func redirectTrailingSlash(c *Context) { code = http.StatusTemporaryRedirect } + req.URL.Path = path + "/" if length := len(path); length > 1 && path[length-1] == '/' { req.URL.Path = path[:length-1] - } else { - req.URL.Path = path + "/" } debugPrint("redirecting request %d: %s --> %s", code, path, req.URL.String()) http.Redirect(c.Writer, req, req.URL.String(), code) diff --git a/deps/github.com/gin-gonic/gin/ginS/gins.go b/deps/github.com/gin-gonic/gin/ginS/gins.go index ee00b3816..a7686f231 100644 --- a/deps/github.com/gin-gonic/gin/ginS/gins.go +++ b/deps/github.com/gin-gonic/gin/ginS/gins.go @@ -128,7 +128,7 @@ func Run(addr ...string) (err error) { // RunTLS : The router is attached to a http.Server and starts listening and serving HTTPS requests. // It is a shortcut for http.ListenAndServeTLS(addr, certFile, keyFile, router) // Note: this method will block the calling goroutine undefinitelly unless an error happens. -func RunTLS(addr string, certFile string, keyFile string) (err error) { +func RunTLS(addr, certFile, keyFile string) (err error) { return engine().RunTLS(addr, certFile, keyFile) } diff --git a/deps/github.com/gin-gonic/gin/gin_test.go b/deps/github.com/gin-gonic/gin/gin_test.go index 3ac60577e..b3cab715e 100644 --- a/deps/github.com/gin-gonic/gin/gin_test.go +++ b/deps/github.com/gin-gonic/gin/gin_test.go @@ -30,7 +30,7 @@ func setupHTMLFiles(t *testing.T, mode string, tls bool) func() { router.SetFuncMap(template.FuncMap{ "formatAsDate": formatAsDate, }) - router.LoadHTMLFiles("./fixtures/basic/hello.tmpl", "./fixtures/basic/raw.tmpl") + router.LoadHTMLFiles("./testdata/template/hello.tmpl", "./testdata/template/raw.tmpl") router.GET("/test", func(c *Context) { c.HTML(http.StatusOK, "hello.tmpl", map[string]string{"name": "world"}) }) @@ -41,7 +41,7 @@ func setupHTMLFiles(t *testing.T, mode string, tls bool) func() { }) if tls { // these files generated by `go run $GOROOT/src/crypto/tls/generate_cert.go --host 127.0.0.1` - router.RunTLS(":9999", "./fixtures/testdata/cert.pem", "./fixtures/testdata/key.pem") + router.RunTLS(":9999", "./testdata/certificate/cert.pem", "./testdata/certificate/key.pem") } else { router.Run(":8888") } @@ -59,7 +59,7 @@ func setupHTMLGlob(t *testing.T, mode string, tls bool) func() { router.SetFuncMap(template.FuncMap{ "formatAsDate": formatAsDate, }) - router.LoadHTMLGlob("./fixtures/basic/*") + router.LoadHTMLGlob("./testdata/template/*") router.GET("/test", func(c *Context) { c.HTML(http.StatusOK, "hello.tmpl", map[string]string{"name": "world"}) }) @@ -70,7 +70,7 @@ func setupHTMLGlob(t *testing.T, mode string, tls bool) func() { }) if tls { // these files generated by `go run $GOROOT/src/crypto/tls/generate_cert.go --host 127.0.0.1` - router.RunTLS(":9999", "./fixtures/testdata/cert.pem", "./fixtures/testdata/key.pem") + router.RunTLS(":9999", "./testdata/certificate/cert.pem", "./testdata/certificate/key.pem") } else { router.Run(":8888") } diff --git a/deps/github.com/gin-gonic/gin/githubapi_test.go b/deps/github.com/gin-gonic/gin/githubapi_test.go index a08c264d7..f631035d2 100644 --- a/deps/github.com/gin-gonic/gin/githubapi_test.go +++ b/deps/github.com/gin-gonic/gin/githubapi_test.go @@ -293,7 +293,7 @@ func githubConfigRouter(router *Engine) { for _, param := range c.Params { output[param.Key] = param.Value } - c.JSON(200, output) + c.JSON(http.StatusOK, output) }) } } diff --git a/deps/github.com/gin-gonic/gin/json/json.go b/deps/github.com/gin-gonic/gin/json/json.go index aa76aa309..4f643c561 100644 --- a/deps/github.com/gin-gonic/gin/json/json.go +++ b/deps/github.com/gin-gonic/gin/json/json.go @@ -12,4 +12,5 @@ var ( Marshal = json.Marshal MarshalIndent = json.MarshalIndent NewDecoder = json.NewDecoder + NewEncoder = json.NewEncoder ) diff --git a/deps/github.com/gin-gonic/gin/json/jsoniter.go b/deps/github.com/gin-gonic/gin/json/jsoniter.go index ffe1424ac..f1ed5bea8 100644 --- a/deps/github.com/gin-gonic/gin/json/jsoniter.go +++ b/deps/github.com/gin-gonic/gin/json/jsoniter.go @@ -13,4 +13,5 @@ var ( Marshal = json.Marshal MarshalIndent = json.MarshalIndent NewDecoder = json.NewDecoder + NewEncoder = json.NewEncoder ) diff --git a/deps/github.com/gin-gonic/gin/logger.go b/deps/github.com/gin-gonic/gin/logger.go index c679c7871..1a8df6010 100644 --- a/deps/github.com/gin-gonic/gin/logger.go +++ b/deps/github.com/gin-gonic/gin/logger.go @@ -7,6 +7,7 @@ package gin import ( "fmt" "io" + "net/http" "os" "time" @@ -118,11 +119,11 @@ func LoggerWithWriter(out io.Writer, notlogged ...string) HandlerFunc { func colorForStatus(code int) string { switch { - case code >= 200 && code < 300: + case code >= http.StatusOK && code < http.StatusMultipleChoices: return green - case code >= 300 && code < 400: + case code >= http.StatusMultipleChoices && code < http.StatusBadRequest: return white - case code >= 400 && code < 500: + case code >= http.StatusBadRequest && code < http.StatusInternalServerError: return yellow default: return red diff --git a/deps/github.com/gin-gonic/gin/logger_test.go b/deps/github.com/gin-gonic/gin/logger_test.go index 74a9659c0..7dbbf7b18 100644 --- a/deps/github.com/gin-gonic/gin/logger_test.go +++ b/deps/github.com/gin-gonic/gin/logger_test.go @@ -7,6 +7,7 @@ package gin import ( "bytes" "errors" + "net/http" "testing" "github.com/stretchr/testify/assert" @@ -93,9 +94,9 @@ func TestColorForMethod(t *testing.T) { } func TestColorForStatus(t *testing.T) { - assert.Equal(t, string([]byte{27, 91, 57, 55, 59, 52, 50, 109}), colorForStatus(200), "2xx should be green") - assert.Equal(t, string([]byte{27, 91, 57, 48, 59, 52, 55, 109}), colorForStatus(301), "3xx should be white") - assert.Equal(t, string([]byte{27, 91, 57, 55, 59, 52, 51, 109}), colorForStatus(404), "4xx should be yellow") + assert.Equal(t, string([]byte{27, 91, 57, 55, 59, 52, 50, 109}), colorForStatus(http.StatusOK), "2xx should be green") + assert.Equal(t, string([]byte{27, 91, 57, 48, 59, 52, 55, 109}), colorForStatus(http.StatusMovedPermanently), "3xx should be white") + assert.Equal(t, string([]byte{27, 91, 57, 55, 59, 52, 51, 109}), colorForStatus(http.StatusNotFound), "4xx should be yellow") assert.Equal(t, string([]byte{27, 91, 57, 55, 59, 52, 49, 109}), colorForStatus(2), "other things should be red") } @@ -106,23 +107,23 @@ func TestErrorLogger(t *testing.T) { c.Error(errors.New("this is an error")) }) router.GET("/abort", func(c *Context) { - c.AbortWithError(401, errors.New("no authorized")) + c.AbortWithError(http.StatusUnauthorized, errors.New("no authorized")) }) router.GET("/print", func(c *Context) { c.Error(errors.New("this is an error")) - c.String(500, "hola!") + c.String(http.StatusInternalServerError, "hola!") }) w := performRequest(router, "GET", "/error") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "{\"error\":\"this is an error\"}", w.Body.String()) w = performRequest(router, "GET", "/abort") - assert.Equal(t, 401, w.Code) + assert.Equal(t, http.StatusUnauthorized, w.Code) assert.Equal(t, "{\"error\":\"no authorized\"}", w.Body.String()) w = performRequest(router, "GET", "/print") - assert.Equal(t, 500, w.Code) + assert.Equal(t, http.StatusInternalServerError, w.Code) assert.Equal(t, "hola!{\"error\":\"this is an error\"}", w.Body.String()) } diff --git a/deps/github.com/gin-gonic/gin/middleware_test.go b/deps/github.com/gin-gonic/gin/middleware_test.go index aa6a37a89..983ad9337 100644 --- a/deps/github.com/gin-gonic/gin/middleware_test.go +++ b/deps/github.com/gin-gonic/gin/middleware_test.go @@ -6,6 +6,7 @@ package gin import ( "errors" + "net/http" "strings" "testing" @@ -37,7 +38,7 @@ func TestMiddlewareGeneralCase(t *testing.T) { w := performRequest(router, "GET", "/") // TEST - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "ACDB", signature) } @@ -73,7 +74,7 @@ func TestMiddlewareNoRoute(t *testing.T) { w := performRequest(router, "GET", "/") // TEST - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) assert.Equal(t, "ACEGHFDB", signature) } @@ -110,7 +111,7 @@ func TestMiddlewareNoMethodEnabled(t *testing.T) { w := performRequest(router, "GET", "/") // TEST - assert.Equal(t, 405, w.Code) + assert.Equal(t, http.StatusMethodNotAllowed, w.Code) assert.Equal(t, "ACEGHFDB", signature) } @@ -147,7 +148,7 @@ func TestMiddlewareNoMethodDisabled(t *testing.T) { w := performRequest(router, "GET", "/") // TEST - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) assert.Equal(t, "AC X DB", signature) } @@ -159,7 +160,7 @@ func TestMiddlewareAbort(t *testing.T) { }) router.Use(func(c *Context) { signature += "C" - c.AbortWithStatus(401) + c.AbortWithStatus(http.StatusUnauthorized) c.Next() signature += "D" }) @@ -173,7 +174,7 @@ func TestMiddlewareAbort(t *testing.T) { w := performRequest(router, "GET", "/") // TEST - assert.Equal(t, 401, w.Code) + assert.Equal(t, http.StatusUnauthorized, w.Code) assert.Equal(t, "ACD", signature) } @@ -183,7 +184,7 @@ func TestMiddlewareAbortHandlersChainAndNext(t *testing.T) { router.Use(func(c *Context) { signature += "A" c.Next() - c.AbortWithStatus(410) + c.AbortWithStatus(http.StatusGone) signature += "B" }) @@ -195,7 +196,7 @@ func TestMiddlewareAbortHandlersChainAndNext(t *testing.T) { w := performRequest(router, "GET", "/") // TEST - assert.Equal(t, 410, w.Code) + assert.Equal(t, http.StatusGone, w.Code) assert.Equal(t, "ACB", signature) } @@ -207,7 +208,7 @@ func TestMiddlewareFailHandlersChain(t *testing.T) { router := New() router.Use(func(context *Context) { signature += "A" - context.AbortWithError(500, errors.New("foo")) + context.AbortWithError(http.StatusInternalServerError, errors.New("foo")) }) router.Use(func(context *Context) { signature += "B" @@ -218,25 +219,25 @@ func TestMiddlewareFailHandlersChain(t *testing.T) { w := performRequest(router, "GET", "/") // TEST - assert.Equal(t, 500, w.Code) + assert.Equal(t, http.StatusInternalServerError, w.Code) assert.Equal(t, "A", signature) } func TestMiddlewareWrite(t *testing.T) { router := New() router.Use(func(c *Context) { - c.String(400, "hola\n") + c.String(http.StatusBadRequest, "hola\n") }) router.Use(func(c *Context) { - c.XML(400, H{"foo": "bar"}) + c.XML(http.StatusBadRequest, H{"foo": "bar"}) }) router.Use(func(c *Context) { - c.JSON(400, H{"foo": "bar"}) + c.JSON(http.StatusBadRequest, H{"foo": "bar"}) }) router.GET("/", func(c *Context) { - c.JSON(400, H{"foo": "bar"}) + c.JSON(http.StatusBadRequest, H{"foo": "bar"}) }, func(c *Context) { - c.Render(400, sse.Event{ + c.Render(http.StatusBadRequest, sse.Event{ Event: "test", Data: "message", }) @@ -244,6 +245,6 @@ func TestMiddlewareWrite(t *testing.T) { w := performRequest(router, "GET", "/") - assert.Equal(t, 400, w.Code) + assert.Equal(t, http.StatusBadRequest, w.Code) assert.Equal(t, strings.Replace("hola\nbar{\"foo\":\"bar\"}{\"foo\":\"bar\"}event:test\ndata:message\n\n", " ", "", -1), strings.Replace(w.Body.String(), " ", "", -1)) } diff --git a/deps/github.com/gin-gonic/gin/path.go b/deps/github.com/gin-gonic/gin/path.go index 1c2b8498f..d1f596228 100644 --- a/deps/github.com/gin-gonic/gin/path.go +++ b/deps/github.com/gin-gonic/gin/path.go @@ -59,11 +59,11 @@ func cleanPath(p string) string { case p[r] == '.' && p[r+1] == '/': // . element - r++ + r += 2 case p[r] == '.' && p[r+1] == '.' && (r+2 == n || p[r+2] == '/'): // .. element: remove to last / - r += 2 + r += 3 if w > 1 { // can backtrack diff --git a/deps/github.com/gin-gonic/gin/recovery_test.go b/deps/github.com/gin-gonic/gin/recovery_test.go index de3b62a50..53f4a0715 100644 --- a/deps/github.com/gin-gonic/gin/recovery_test.go +++ b/deps/github.com/gin-gonic/gin/recovery_test.go @@ -6,6 +6,7 @@ package gin import ( "bytes" + "net/http" "testing" "github.com/stretchr/testify/assert" @@ -22,7 +23,7 @@ func TestPanicInHandler(t *testing.T) { // RUN w := performRequest(router, "GET", "/recovery") // TEST - assert.Equal(t, 500, w.Code) + assert.Equal(t, http.StatusInternalServerError, w.Code) assert.Contains(t, buffer.String(), "GET /recovery") assert.Contains(t, buffer.String(), "Oupps, Houston, we have a problem") assert.Contains(t, buffer.String(), "TestPanicInHandler") @@ -33,11 +34,31 @@ func TestPanicWithAbort(t *testing.T) { router := New() router.Use(RecoveryWithWriter(nil)) router.GET("/recovery", func(c *Context) { - c.AbortWithStatus(400) + c.AbortWithStatus(http.StatusBadRequest) panic("Oupps, Houston, we have a problem") }) // RUN w := performRequest(router, "GET", "/recovery") // TEST - assert.Equal(t, 400, w.Code) + assert.Equal(t, http.StatusBadRequest, w.Code) +} + +func TestSource(t *testing.T) { + bs := source(nil, 0) + assert.Equal(t, []byte("???"), bs) + + in := [][]byte{ + []byte("Hello world."), + []byte("Hi, gin.."), + } + bs = source(in, 10) + assert.Equal(t, []byte("???"), bs) + + bs = source(in, 1) + assert.Equal(t, []byte("Hello world."), bs) +} + +func TestFunction(t *testing.T) { + bs := function(1) + assert.Equal(t, []byte("???"), bs) } diff --git a/deps/github.com/gin-gonic/gin/render/json.go b/deps/github.com/gin-gonic/gin/render/json.go old mode 100755 new mode 100644 index 3a2e8b2fc..4d1857f59 --- a/deps/github.com/gin-gonic/gin/render/json.go +++ b/deps/github.com/gin-gonic/gin/render/json.go @@ -6,6 +6,7 @@ package render import ( "bytes" + "fmt" "html/template" "net/http" @@ -30,10 +31,15 @@ type JsonpJSON struct { Data interface{} } +type AsciiJSON struct { + Data interface{} +} + type SecureJSONPrefix string var jsonContentType = []string{"application/json; charset=utf-8"} var jsonpContentType = []string{"application/javascript; charset=utf-8"} +var jsonAsciiContentType = []string{"application/json"} func (r JSON) Render(w http.ResponseWriter) (err error) { if err = WriteJSON(w, r.Data); err != nil { @@ -112,3 +118,27 @@ func (r JsonpJSON) Render(w http.ResponseWriter) (err error) { func (r JsonpJSON) WriteContentType(w http.ResponseWriter) { writeContentType(w, jsonpContentType) } + +func (r AsciiJSON) Render(w http.ResponseWriter) (err error) { + r.WriteContentType(w) + ret, err := json.Marshal(r.Data) + if err != nil { + return err + } + + var buffer bytes.Buffer + for _, r := range string(ret) { + cvt := string(r) + if r >= 128 { + cvt = fmt.Sprintf("\\u%04x", int64(r)) + } + buffer.WriteString(cvt) + } + + w.Write(buffer.Bytes()) + return nil +} + +func (r AsciiJSON) WriteContentType(w http.ResponseWriter) { + writeContentType(w, jsonAsciiContentType) +} diff --git a/deps/github.com/gin-gonic/gin/render/json_17.go b/deps/github.com/gin-gonic/gin/render/json_17.go new file mode 100644 index 000000000..df0dc1458 --- /dev/null +++ b/deps/github.com/gin-gonic/gin/render/json_17.go @@ -0,0 +1,28 @@ +// Copyright 2018 Gin Core Team. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package render + +import ( + "net/http" + + "github.com/gin-gonic/gin/json" +) + +type PureJSON struct { + Data interface{} +} + +func (r PureJSON) Render(w http.ResponseWriter) error { + r.WriteContentType(w) + encoder := json.NewEncoder(w) + encoder.SetEscapeHTML(false) + return encoder.Encode(r.Data) +} + +func (r PureJSON) WriteContentType(w http.ResponseWriter) { + writeContentType(w, jsonContentType) +} diff --git a/deps/github.com/gin-gonic/gin/render/msgpack.go b/deps/github.com/gin-gonic/gin/render/msgpack.go index e6c13e588..b6b8aa0f7 100644 --- a/deps/github.com/gin-gonic/gin/render/msgpack.go +++ b/deps/github.com/gin-gonic/gin/render/msgpack.go @@ -26,6 +26,6 @@ func (r MsgPack) Render(w http.ResponseWriter) error { func WriteMsgPack(w http.ResponseWriter, obj interface{}) error { writeContentType(w, msgpackContentType) - var h codec.Handle = new(codec.MsgpackHandle) - return codec.NewEncoder(w, h).Encode(obj) + var mh codec.MsgpackHandle + return codec.NewEncoder(w, &mh).Encode(obj) } diff --git a/deps/github.com/gin-gonic/gin/render/protobuf.go b/deps/github.com/gin-gonic/gin/render/protobuf.go new file mode 100644 index 000000000..34f1e9b50 --- /dev/null +++ b/deps/github.com/gin-gonic/gin/render/protobuf.go @@ -0,0 +1,33 @@ +// Copyright 2018 Gin Core Team. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +package render + +import ( + "net/http" + + "github.com/golang/protobuf/proto" +) + +type ProtoBuf struct { + Data interface{} +} + +var protobufContentType = []string{"application/x-protobuf"} + +func (r ProtoBuf) Render(w http.ResponseWriter) error { + r.WriteContentType(w) + + bytes, err := proto.Marshal(r.Data.(proto.Message)) + if err != nil { + return err + } + + w.Write(bytes) + return nil +} + +func (r ProtoBuf) WriteContentType(w http.ResponseWriter) { + writeContentType(w, protobufContentType) +} diff --git a/deps/github.com/gin-gonic/gin/render/reader.go b/deps/github.com/gin-gonic/gin/render/reader.go index be2132c8f..7a06cce40 100644 --- a/deps/github.com/gin-gonic/gin/render/reader.go +++ b/deps/github.com/gin-gonic/gin/render/reader.go @@ -1,3 +1,7 @@ +// Copyright 2018 Gin Core Team. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + package render import ( diff --git a/deps/github.com/gin-gonic/gin/render/redirect.go b/deps/github.com/gin-gonic/gin/render/redirect.go index f874a3515..a0634f5a7 100644 --- a/deps/github.com/gin-gonic/gin/render/redirect.go +++ b/deps/github.com/gin-gonic/gin/render/redirect.go @@ -16,6 +16,8 @@ type Redirect struct { } func (r Redirect) Render(w http.ResponseWriter) error { + // todo(thinkerou): go1.6 not support StatusPermanentRedirect(308) + // when we upgrade go version we can use http.StatusPermanentRedirect if (r.Code < 300 || r.Code > 308) && r.Code != 201 { panic(fmt.Sprintf("Cannot redirect with status code %d", r.Code)) } diff --git a/deps/github.com/gin-gonic/gin/render/render.go b/deps/github.com/gin-gonic/gin/render/render.go old mode 100755 new mode 100644 index 7caf9bbab..df0d1d7c3 --- a/deps/github.com/gin-gonic/gin/render/render.go +++ b/deps/github.com/gin-gonic/gin/render/render.go @@ -26,6 +26,8 @@ var ( _ Render = YAML{} _ Render = MsgPack{} _ Render = Reader{} + _ Render = AsciiJSON{} + _ Render = ProtoBuf{} ) func writeContentType(w http.ResponseWriter, value []string) { diff --git a/deps/github.com/gin-gonic/gin/render/render_17_test.go b/deps/github.com/gin-gonic/gin/render/render_17_test.go new file mode 100644 index 000000000..68330090f --- /dev/null +++ b/deps/github.com/gin-gonic/gin/render/render_17_test.go @@ -0,0 +1,26 @@ +// Copyright 2018 Gin Core Team. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package render + +import ( + "net/http/httptest" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRenderPureJSON(t *testing.T) { + w := httptest.NewRecorder() + data := map[string]interface{}{ + "foo": "bar", + "html": "", + } + err := (PureJSON{data}).Render(w) + assert.NoError(t, err) + assert.Equal(t, "{\"foo\":\"bar\",\"html\":\"\"}\n", w.Body.String()) + assert.Equal(t, "application/json; charset=utf-8", w.Header().Get("Content-Type")) +} diff --git a/deps/github.com/gin-gonic/gin/render/render_test.go b/deps/github.com/gin-gonic/gin/render/render_test.go old mode 100755 new mode 100644 index 40ec806ec..fe9228e98 --- a/deps/github.com/gin-gonic/gin/render/render_test.go +++ b/deps/github.com/gin-gonic/gin/render/render_test.go @@ -15,8 +15,11 @@ import ( "strings" "testing" + "github.com/golang/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/ugorji/go/codec" + + testdata "github.com/gin-gonic/gin/testdata/protoexample" ) // TODO unit tests @@ -49,7 +52,8 @@ func TestRenderMsgPack(t *testing.T) { func TestRenderJSON(t *testing.T) { w := httptest.NewRecorder() data := map[string]interface{}{ - "foo": "bar", + "foo": "bar", + "html": "", } (JSON{data}).WriteContentType(w) @@ -58,7 +62,7 @@ func TestRenderJSON(t *testing.T) { err := (JSON{data}).Render(w) assert.NoError(t, err) - assert.Equal(t, "{\"foo\":\"bar\"}", w.Body.String()) + assert.Equal(t, "{\"foo\":\"bar\",\"html\":\"\\u003cb\\u003e\"}", w.Body.String()) assert.Equal(t, "application/json; charset=utf-8", w.Header().Get("Content-Type")) } @@ -158,6 +162,21 @@ func TestRenderJsonpJSON(t *testing.T) { assert.Equal(t, "application/javascript; charset=utf-8", w2.Header().Get("Content-Type")) } +func TestRenderJsonpJSONError2(t *testing.T) { + w := httptest.NewRecorder() + data := map[string]interface{}{ + "foo": "bar", + } + (JsonpJSON{"", data}).WriteContentType(w) + assert.Equal(t, "application/javascript; charset=utf-8", w.Header().Get("Content-Type")) + + e := (JsonpJSON{"", data}).Render(w) + assert.NoError(t, e) + + assert.Equal(t, "{\"foo\":\"bar\"}", w.Body.String()) + assert.Equal(t, "application/javascript; charset=utf-8", w.Header().Get("Content-Type")) +} + func TestRenderJsonpJSONFail(t *testing.T) { w := httptest.NewRecorder() data := make(chan int) @@ -167,6 +186,35 @@ func TestRenderJsonpJSONFail(t *testing.T) { assert.Error(t, err) } +func TestRenderAsciiJSON(t *testing.T) { + w1 := httptest.NewRecorder() + data1 := map[string]interface{}{ + "lang": "GO语言", + "tag": "
", + } + + err := (AsciiJSON{data1}).Render(w1) + + assert.NoError(t, err) + assert.Equal(t, "{\"lang\":\"GO\\u8bed\\u8a00\",\"tag\":\"\\u003cbr\\u003e\"}", w1.Body.String()) + assert.Equal(t, "application/json", w1.Header().Get("Content-Type")) + + w2 := httptest.NewRecorder() + data2 := float64(3.1415926) + + err = (AsciiJSON{data2}).Render(w2) + assert.NoError(t, err) + assert.Equal(t, "3.1415926", w2.Body.String()) +} + +func TestRenderAsciiJSONFail(t *testing.T) { + w := httptest.NewRecorder() + data := make(chan int) + + // json: unsupported type: chan int + assert.Error(t, (AsciiJSON{data}).Render(w)) +} + type xmlmap map[string]interface{} // Allows type H to be used with xml.Marshal @@ -221,6 +269,35 @@ func TestRenderYAMLFail(t *testing.T) { assert.Error(t, err) } +// test Protobuf rendering +func TestRenderProtoBuf(t *testing.T) { + w := httptest.NewRecorder() + reps := []int64{int64(1), int64(2)} + label := "test" + data := &testdata.Test{ + Label: &label, + Reps: reps, + } + + (ProtoBuf{data}).WriteContentType(w) + protoData, err := proto.Marshal(data) + assert.NoError(t, err) + assert.Equal(t, "application/x-protobuf", w.Header().Get("Content-Type")) + + err = (ProtoBuf{data}).Render(w) + + assert.NoError(t, err) + assert.Equal(t, string(protoData[:]), w.Body.String()) + assert.Equal(t, "application/x-protobuf", w.Header().Get("Content-Type")) +} + +func TestRenderProtoBufFail(t *testing.T) { + w := httptest.NewRecorder() + data := &testdata.Test{} + err := (ProtoBuf{data}).Render(w) + assert.Error(t, err) +} + func TestRenderXML(t *testing.T) { w := httptest.NewRecorder() data := xmlmap{ @@ -242,7 +319,7 @@ func TestRenderRedirect(t *testing.T) { assert.NoError(t, err) data1 := Redirect{ - Code: 301, + Code: http.StatusMovedPermanently, Request: req, Location: "/new/location", } @@ -252,7 +329,7 @@ func TestRenderRedirect(t *testing.T) { assert.NoError(t, err) data2 := Redirect{ - Code: 200, + Code: http.StatusOK, Request: req, Location: "/new/location", } @@ -344,7 +421,7 @@ func TestRenderHTMLTemplateEmptyName(t *testing.T) { func TestRenderHTMLDebugFiles(t *testing.T) { w := httptest.NewRecorder() - htmlRender := HTMLDebug{Files: []string{"../fixtures/basic/hello.tmpl"}, + htmlRender := HTMLDebug{Files: []string{"../testdata/template/hello.tmpl"}, Glob: "", Delims: Delims{Left: "{[{", Right: "}]}"}, FuncMap: nil, @@ -363,7 +440,7 @@ func TestRenderHTMLDebugFiles(t *testing.T) { func TestRenderHTMLDebugGlob(t *testing.T) { w := httptest.NewRecorder() htmlRender := HTMLDebug{Files: nil, - Glob: "../fixtures/basic/hello*", + Glob: "../testdata/template/hello*", Delims: Delims{Left: "{[{", Right: "}]}"}, FuncMap: nil, } diff --git a/deps/github.com/gin-gonic/gin/render/text.go b/deps/github.com/gin-gonic/gin/render/text.go index 74cd26bee..7a6acc449 100644 --- a/deps/github.com/gin-gonic/gin/render/text.go +++ b/deps/github.com/gin-gonic/gin/render/text.go @@ -30,7 +30,7 @@ func WriteString(w http.ResponseWriter, format string, data []interface{}) { writeContentType(w, plainContentType) if len(data) > 0 { fmt.Fprintf(w, format, data...) - } else { - io.WriteString(w, format) + return } + io.WriteString(w, format) } diff --git a/deps/github.com/gin-gonic/gin/response_writer.go b/deps/github.com/gin-gonic/gin/response_writer.go index 166ae8c30..923b53f8b 100644 --- a/deps/github.com/gin-gonic/gin/response_writer.go +++ b/deps/github.com/gin-gonic/gin/response_writer.go @@ -110,5 +110,6 @@ func (w *responseWriter) CloseNotify() <-chan bool { // Flush implements the http.Flush interface. func (w *responseWriter) Flush() { + w.WriteHeaderNow() w.ResponseWriter.(http.Flusher).Flush() } diff --git a/deps/github.com/gin-gonic/gin/response_writer_test.go b/deps/github.com/gin-gonic/gin/response_writer_test.go index cec27338d..cc5a89dcf 100644 --- a/deps/github.com/gin-gonic/gin/response_writer_test.go +++ b/deps/github.com/gin-gonic/gin/response_writer_test.go @@ -35,10 +35,10 @@ func TestResponseWriterReset(t *testing.T) { writer.reset(testWritter) assert.Equal(t, -1, writer.size) - assert.Equal(t, 200, writer.status) + assert.Equal(t, http.StatusOK, writer.status) assert.Equal(t, testWritter, writer.ResponseWriter) assert.Equal(t, -1, w.Size()) - assert.Equal(t, 200, w.Status()) + assert.Equal(t, http.StatusOK, w.Status()) assert.False(t, w.Written()) } @@ -48,13 +48,13 @@ func TestResponseWriterWriteHeader(t *testing.T) { writer.reset(testWritter) w := ResponseWriter(writer) - w.WriteHeader(300) + w.WriteHeader(http.StatusMultipleChoices) assert.False(t, w.Written()) - assert.Equal(t, 300, w.Status()) - assert.NotEqual(t, testWritter.Code, 300) + assert.Equal(t, http.StatusMultipleChoices, w.Status()) + assert.NotEqual(t, http.StatusMultipleChoices, testWritter.Code) w.WriteHeader(-1) - assert.Equal(t, 300, w.Status()) + assert.Equal(t, http.StatusMultipleChoices, w.Status()) } func TestResponseWriterWriteHeadersNow(t *testing.T) { @@ -63,12 +63,12 @@ func TestResponseWriterWriteHeadersNow(t *testing.T) { writer.reset(testWritter) w := ResponseWriter(writer) - w.WriteHeader(300) + w.WriteHeader(http.StatusMultipleChoices) w.WriteHeaderNow() assert.True(t, w.Written()) assert.Equal(t, 0, w.Size()) - assert.Equal(t, 300, testWritter.Code) + assert.Equal(t, http.StatusMultipleChoices, testWritter.Code) writer.size = 10 w.WriteHeaderNow() @@ -84,8 +84,8 @@ func TestResponseWriterWrite(t *testing.T) { n, err := w.Write([]byte("hola")) assert.Equal(t, 4, n) assert.Equal(t, 4, w.Size()) - assert.Equal(t, 200, w.Status()) - assert.Equal(t, 200, testWritter.Code) + assert.Equal(t, http.StatusOK, w.Status()) + assert.Equal(t, http.StatusOK, testWritter.Code) assert.Equal(t, "hola", testWritter.Body.String()) assert.NoError(t, err) @@ -113,3 +113,19 @@ func TestResponseWriterHijack(t *testing.T) { w.Flush() } + +func TestResponseWriterFlush(t *testing.T) { + testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + writer := &responseWriter{} + writer.reset(w) + + writer.WriteHeader(http.StatusInternalServerError) + writer.Flush() + })) + defer testServer.Close() + + // should return 500 + resp, err := http.Get(testServer.URL) + assert.NoError(t, err) + assert.Equal(t, http.StatusInternalServerError, resp.StatusCode) +} diff --git a/deps/github.com/gin-gonic/gin/routergroup_test.go b/deps/github.com/gin-gonic/gin/routergroup_test.go index a362e23dd..ce3d54a2f 100644 --- a/deps/github.com/gin-gonic/gin/routergroup_test.go +++ b/deps/github.com/gin-gonic/gin/routergroup_test.go @@ -5,6 +5,7 @@ package gin import ( + "net/http" "testing" "github.com/stretchr/testify/assert" @@ -50,7 +51,7 @@ func performRequestInGroup(t *testing.T, method string) { assert.Equal(t, "/v1/login/", login.BasePath()) handler := func(c *Context) { - c.String(400, "the method was %s and index %d", c.Request.Method, c.index) + c.String(http.StatusBadRequest, "the method was %s and index %d", c.Request.Method, c.index) } switch method { @@ -80,11 +81,11 @@ func performRequestInGroup(t *testing.T, method string) { } w := performRequest(router, method, "/v1/login/test") - assert.Equal(t, 400, w.Code) + assert.Equal(t, http.StatusBadRequest, w.Code) assert.Equal(t, "the method was "+method+" and index 3", w.Body.String()) w = performRequest(router, method, "/v1/test") - assert.Equal(t, 400, w.Code) + assert.Equal(t, http.StatusBadRequest, w.Code) assert.Equal(t, "the method was "+method+" and index 1", w.Body.String()) } diff --git a/deps/github.com/gin-gonic/gin/routes_test.go b/deps/github.com/gin-gonic/gin/routes_test.go index 812939071..23e749e26 100644 --- a/deps/github.com/gin-gonic/gin/routes_test.go +++ b/deps/github.com/gin-gonic/gin/routes_test.go @@ -80,20 +80,20 @@ func testRouteNotOK2(method string, t *testing.T) { func TestRouterMethod(t *testing.T) { router := New() router.PUT("/hey2", func(c *Context) { - c.String(200, "sup2") + c.String(http.StatusOK, "sup2") }) router.PUT("/hey", func(c *Context) { - c.String(200, "called") + c.String(http.StatusOK, "called") }) router.PUT("/hey3", func(c *Context) { - c.String(200, "sup3") + c.String(http.StatusOK, "sup3") }) w := performRequest(router, "PUT", "/hey") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "called", w.Body.String()) } @@ -144,42 +144,42 @@ func TestRouteRedirectTrailingSlash(t *testing.T) { w := performRequest(router, "GET", "/path/") assert.Equal(t, "/path", w.Header().Get("Location")) - assert.Equal(t, 301, w.Code) + assert.Equal(t, http.StatusMovedPermanently, w.Code) w = performRequest(router, "GET", "/path2") assert.Equal(t, "/path2/", w.Header().Get("Location")) - assert.Equal(t, 301, w.Code) + assert.Equal(t, http.StatusMovedPermanently, w.Code) w = performRequest(router, "POST", "/path3/") assert.Equal(t, "/path3", w.Header().Get("Location")) - assert.Equal(t, 307, w.Code) + assert.Equal(t, http.StatusTemporaryRedirect, w.Code) w = performRequest(router, "PUT", "/path4") assert.Equal(t, "/path4/", w.Header().Get("Location")) - assert.Equal(t, 307, w.Code) + assert.Equal(t, http.StatusTemporaryRedirect, w.Code) w = performRequest(router, "GET", "/path") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) w = performRequest(router, "GET", "/path2/") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) w = performRequest(router, "POST", "/path3") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) w = performRequest(router, "PUT", "/path4/") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) router.RedirectTrailingSlash = false w = performRequest(router, "GET", "/path/") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) w = performRequest(router, "GET", "/path2") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) w = performRequest(router, "POST", "/path3/") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) w = performRequest(router, "PUT", "/path4") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) } func TestRouteRedirectFixedPath(t *testing.T) { @@ -194,19 +194,19 @@ func TestRouteRedirectFixedPath(t *testing.T) { w := performRequest(router, "GET", "/PATH") assert.Equal(t, "/path", w.Header().Get("Location")) - assert.Equal(t, 301, w.Code) + assert.Equal(t, http.StatusMovedPermanently, w.Code) w = performRequest(router, "GET", "/path2") assert.Equal(t, "/Path2", w.Header().Get("Location")) - assert.Equal(t, 301, w.Code) + assert.Equal(t, http.StatusMovedPermanently, w.Code) w = performRequest(router, "POST", "/path3") assert.Equal(t, "/PATH3", w.Header().Get("Location")) - assert.Equal(t, 307, w.Code) + assert.Equal(t, http.StatusTemporaryRedirect, w.Code) w = performRequest(router, "POST", "/path4") assert.Equal(t, "/Path4/", w.Header().Get("Location")) - assert.Equal(t, 307, w.Code) + assert.Equal(t, http.StatusTemporaryRedirect, w.Code) } // TestContextParamsGet tests that a parameter can be parsed from the URL. @@ -236,7 +236,7 @@ func TestRouteParamsByName(t *testing.T) { w := performRequest(router, "GET", "/test/john/smith/is/super/great") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "john", name) assert.Equal(t, "smith", lastName) assert.Equal(t, "/is/super/great", wild) @@ -265,7 +265,7 @@ func TestRouteStaticFile(t *testing.T) { w2 := performRequest(router, "GET", "/result") assert.Equal(t, w, w2) - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Equal(t, "Gin Web Framework", w.Body.String()) assert.Equal(t, "text/plain; charset=utf-8", w.HeaderMap.Get("Content-Type")) @@ -273,7 +273,7 @@ func TestRouteStaticFile(t *testing.T) { w4 := performRequest(router, "HEAD", "/result") assert.Equal(t, w3, w4) - assert.Equal(t, 200, w3.Code) + assert.Equal(t, http.StatusOK, w3.Code) } // TestHandleStaticDir - ensure the root/sub dir handles properly @@ -283,7 +283,7 @@ func TestRouteStaticListingDir(t *testing.T) { w := performRequest(router, "GET", "/") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Contains(t, w.Body.String(), "gin.go") assert.Equal(t, "text/html; charset=utf-8", w.HeaderMap.Get("Content-Type")) } @@ -295,7 +295,7 @@ func TestRouteStaticNoListing(t *testing.T) { w := performRequest(router, "GET", "/") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) assert.NotContains(t, w.Body.String(), "gin.go") } @@ -310,7 +310,7 @@ func TestRouterMiddlewareAndStatic(t *testing.T) { w := performRequest(router, "GET", "/gin.go") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) assert.Contains(t, w.Body.String(), "package gin") assert.Equal(t, "text/plain; charset=utf-8", w.HeaderMap.Get("Content-Type")) assert.NotEqual(t, w.HeaderMap.Get("Last-Modified"), "Mon, 02 Jan 2006 15:04:05 MST") @@ -333,19 +333,29 @@ func TestRouteNotAllowedEnabled(t *testing.T) { assert.Equal(t, http.StatusTeapot, w.Code) } +func TestRouteNotAllowedEnabled2(t *testing.T) { + router := New() + router.HandleMethodNotAllowed = true + // add one methodTree to trees + router.addRoute("POST", "/", HandlersChain{func(_ *Context) {}}) + router.GET("/path2", func(c *Context) {}) + w := performRequest(router, "POST", "/path2") + assert.Equal(t, http.StatusMethodNotAllowed, w.Code) +} + func TestRouteNotAllowedDisabled(t *testing.T) { router := New() router.HandleMethodNotAllowed = false router.POST("/path", func(c *Context) {}) w := performRequest(router, "GET", "/path") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) router.NoMethod(func(c *Context) { c.String(http.StatusTeapot, "responseText") }) w = performRequest(router, "GET", "/path") assert.Equal(t, "404 page not found", w.Body.String()) - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) } func TestRouterNotFound(t *testing.T) { @@ -360,20 +370,20 @@ func TestRouterNotFound(t *testing.T) { code int location string }{ - {"/path/", 301, "/path"}, // TSR -/ - {"/dir", 301, "/dir/"}, // TSR +/ - {"", 301, "/"}, // TSR +/ - {"/PATH", 301, "/path"}, // Fixed Case - {"/DIR/", 301, "/dir/"}, // Fixed Case - {"/PATH/", 301, "/path"}, // Fixed Case -/ - {"/DIR", 301, "/dir/"}, // Fixed Case +/ - {"/../path", 301, "/path"}, // CleanPath - {"/nope", 404, ""}, // NotFound + {"/path/", http.StatusMovedPermanently, "/path"}, // TSR -/ + {"/dir", http.StatusMovedPermanently, "/dir/"}, // TSR +/ + {"", http.StatusMovedPermanently, "/"}, // TSR +/ + {"/PATH", http.StatusMovedPermanently, "/path"}, // Fixed Case + {"/DIR/", http.StatusMovedPermanently, "/dir/"}, // Fixed Case + {"/PATH/", http.StatusMovedPermanently, "/path"}, // Fixed Case -/ + {"/DIR", http.StatusMovedPermanently, "/dir/"}, // Fixed Case +/ + {"/../path", http.StatusMovedPermanently, "/path"}, // CleanPath + {"/nope", http.StatusNotFound, ""}, // NotFound } for _, tr := range testRoutes { w := performRequest(router, "GET", tr.route) assert.Equal(t, tr.code, w.Code) - if w.Code != 404 { + if w.Code != http.StatusNotFound { assert.Equal(t, tr.location, fmt.Sprint(w.Header().Get("Location"))) } } @@ -381,24 +391,24 @@ func TestRouterNotFound(t *testing.T) { // Test custom not found handler var notFound bool router.NoRoute(func(c *Context) { - c.AbortWithStatus(404) + c.AbortWithStatus(http.StatusNotFound) notFound = true }) w := performRequest(router, "GET", "/nope") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) assert.True(t, notFound) // Test other method than GET (want 307 instead of 301) router.PATCH("/path", func(c *Context) {}) w = performRequest(router, "PATCH", "/path/") - assert.Equal(t, 307, w.Code) + assert.Equal(t, http.StatusTemporaryRedirect, w.Code) assert.Equal(t, "map[Location:[/path]]", fmt.Sprint(w.Header())) // Test special case where no node for the prefix "/" exists router = New() router.GET("/a", func(c *Context) {}) w = performRequest(router, "GET", "/") - assert.Equal(t, 404, w.Code) + assert.Equal(t, http.StatusNotFound, w.Code) } func TestRouteRawPath(t *testing.T) { @@ -417,7 +427,7 @@ func TestRouteRawPath(t *testing.T) { }) w := performRequest(route, "POST", "/project/Some%2FOther%2FProject/build/222") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) } func TestRouteRawPathNoUnescape(t *testing.T) { @@ -437,7 +447,7 @@ func TestRouteRawPathNoUnescape(t *testing.T) { }) w := performRequest(route, "POST", "/project/Some%2FOther%2FProject/build/333") - assert.Equal(t, 200, w.Code) + assert.Equal(t, http.StatusOK, w.Code) } func TestRouteServeErrorWithWriteHeader(t *testing.T) { diff --git a/deps/github.com/gin-gonic/gin/test_helpers.go b/deps/github.com/gin-gonic/gin/test_helpers.go index 2aed37f20..3a7a5ddf6 100644 --- a/deps/github.com/gin-gonic/gin/test_helpers.go +++ b/deps/github.com/gin-gonic/gin/test_helpers.go @@ -4,9 +4,7 @@ package gin -import ( - "net/http" -) +import "net/http" // CreateTestContext returns a fresh engine and context for testing purposes func CreateTestContext(w http.ResponseWriter) (c *Context, r *Engine) { diff --git a/deps/github.com/gin-gonic/gin/fixtures/testdata/cert.pem b/deps/github.com/gin-gonic/gin/testdata/certificate/cert.pem similarity index 100% rename from deps/github.com/gin-gonic/gin/fixtures/testdata/cert.pem rename to deps/github.com/gin-gonic/gin/testdata/certificate/cert.pem diff --git a/deps/github.com/gin-gonic/gin/fixtures/testdata/key.pem b/deps/github.com/gin-gonic/gin/testdata/certificate/key.pem similarity index 100% rename from deps/github.com/gin-gonic/gin/fixtures/testdata/key.pem rename to deps/github.com/gin-gonic/gin/testdata/certificate/key.pem diff --git a/deps/github.com/gin-gonic/gin/testdata/protoexample/test.pb.go b/deps/github.com/gin-gonic/gin/testdata/protoexample/test.pb.go new file mode 100644 index 000000000..21997ca1c --- /dev/null +++ b/deps/github.com/gin-gonic/gin/testdata/protoexample/test.pb.go @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-go. +// source: test.proto +// DO NOT EDIT! + +/* +Package protoexample is a generated protocol buffer package. + +It is generated from these files: + test.proto + +It has these top-level messages: + Test +*/ +package protoexample + +import proto "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = math.Inf + +type FOO int32 + +const ( + FOO_X FOO = 17 +) + +var FOO_name = map[int32]string{ + 17: "X", +} +var FOO_value = map[string]int32{ + "X": 17, +} + +func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p +} +func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) +} +func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") + if err != nil { + return err + } + *x = FOO(value) + return nil +} + +type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Test) Reset() { *m = Test{} } +func (m *Test) String() string { return proto.CompactTextString(m) } +func (*Test) ProtoMessage() {} + +const Default_Test_Type int32 = 77 + +func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" +} + +func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type +} + +func (m *Test) GetReps() []int64 { + if m != nil { + return m.Reps + } + return nil +} + +func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil +} + +type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } +func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } +func (*Test_OptionalGroup) ProtoMessage() {} + +func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +func init() { + proto.RegisterEnum("protoexample.FOO", FOO_name, FOO_value) +} diff --git a/deps/github.com/gin-gonic/gin/testdata/protoexample/test.proto b/deps/github.com/gin-gonic/gin/testdata/protoexample/test.proto new file mode 100644 index 000000000..3e7342877 --- /dev/null +++ b/deps/github.com/gin-gonic/gin/testdata/protoexample/test.proto @@ -0,0 +1,12 @@ +package protoexample; + +enum FOO {X=17;}; + +message Test { + required string label = 1; + optional int32 type = 2[default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4{ + required string RequiredField = 5; + } +} diff --git a/deps/github.com/gin-gonic/gin/fixtures/basic/hello.tmpl b/deps/github.com/gin-gonic/gin/testdata/template/hello.tmpl similarity index 100% rename from deps/github.com/gin-gonic/gin/fixtures/basic/hello.tmpl rename to deps/github.com/gin-gonic/gin/testdata/template/hello.tmpl diff --git a/deps/github.com/gin-gonic/gin/fixtures/basic/raw.tmpl b/deps/github.com/gin-gonic/gin/testdata/template/raw.tmpl similarity index 100% rename from deps/github.com/gin-gonic/gin/fixtures/basic/raw.tmpl rename to deps/github.com/gin-gonic/gin/testdata/template/raw.tmpl diff --git a/deps/github.com/gin-gonic/gin/utils_test.go b/deps/github.com/gin-gonic/gin/utils_test.go index 3d019e7e2..9b57c57b0 100644 --- a/deps/github.com/gin-gonic/gin/utils_test.go +++ b/deps/github.com/gin-gonic/gin/utils_test.go @@ -5,6 +5,8 @@ package gin import ( + "bytes" + "encoding/xml" "fmt" "net/http" "testing" @@ -23,7 +25,7 @@ type testStruct struct { func (t *testStruct) ServeHTTP(w http.ResponseWriter, req *http.Request) { assert.Equal(t.T, "POST", req.Method) assert.Equal(t.T, "/path", req.URL.Path) - w.WriteHeader(500) + w.WriteHeader(http.StatusInternalServerError) fmt.Fprint(w, "hello") } @@ -33,16 +35,16 @@ func TestWrap(t *testing.T) { router.GET("/path2", WrapF(func(w http.ResponseWriter, req *http.Request) { assert.Equal(t, "GET", req.Method) assert.Equal(t, "/path2", req.URL.Path) - w.WriteHeader(400) + w.WriteHeader(http.StatusBadRequest) fmt.Fprint(w, "hola!") })) w := performRequest(router, "POST", "/path") - assert.Equal(t, 500, w.Code) + assert.Equal(t, http.StatusInternalServerError, w.Code) assert.Equal(t, "hello", w.Body.String()) w = performRequest(router, "GET", "/path2") - assert.Equal(t, 400, w.Code) + assert.Equal(t, http.StatusBadRequest, w.Code) assert.Equal(t, "hola!", w.Body.String()) } @@ -124,3 +126,14 @@ func TestBindMiddleware(t *testing.T) { Bind(&bindTestStruct{}) }) } + +func TestMarshalXMLforH(t *testing.T) { + h := H{ + "": "test", + } + var b bytes.Buffer + enc := xml.NewEncoder(&b) + var x xml.StartElement + e := h.MarshalXML(enc, x) + assert.Error(t, e) +} diff --git a/deps/github.com/gin-gonic/gin/vendor/vendor.json b/deps/github.com/gin-gonic/gin/vendor/vendor.json deleted file mode 100644 index c34c2de3f..000000000 --- a/deps/github.com/gin-gonic/gin/vendor/vendor.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "comment": "v1.2", - "ignore": "test", - "package": [ - { - "checksumSHA1": "dvabztWVQX8f6oMLRyv4dLH+TGY=", - "comment": "v1.1.0", - "path": "github.com/davecgh/go-spew/spew", - "revision": "346938d642f2ec3594ed81d874461961cd0faa76", - "revisionTime": "2016-10-29T20:57:26Z" - }, - { - "checksumSHA1": "QeKwBtN2df+j+4stw3bQJ6yO4EY=", - "path": "github.com/gin-contrib/sse", - "revision": "22d885f9ecc78bf4ee5d72b937e4bbcdc58e8cae", - "revisionTime": "2017-01-09T09:34:21Z" - }, - { - "checksumSHA1": "qlPUeFabwF4RKAOF1H+yBFU1Veg=", - "path": "github.com/golang/protobuf/proto", - "revision": "5a0f697c9ed9d68fef0116532c6e05cfeae00e55", - "revisionTime": "2017-06-01T23:02:30Z" - }, - { - "checksumSHA1": "Ajh8TemnItg4nn+jKmVcsMRALBc=", - "path": "github.com/json-iterator/go", - "revision": "36b14963da70d11297d313183d7e6388c8510e1e", - "revisionTime": "2017-08-29T15:58:51Z" - }, - { - "checksumSHA1": "U6lX43KDDlNOn+Z0Yyww+ZzHfFo=", - "path": "github.com/mattn/go-isatty", - "revision": "57fdcb988a5c543893cc61bce354a6e24ab70022", - "revisionTime": "2017-03-07T16:30:44Z" - }, - { - "checksumSHA1": "Q2V7Zs3diLmLfmfbiuLpSxETSuY=", - "comment": "v1.1.4", - "path": "github.com/stretchr/testify/assert", - "revision": "976c720a22c8eb4eb6a0b4348ad85ad12491a506", - "revisionTime": "2016-09-25T22:06:09Z" - }, - { - "checksumSHA1": "CoxdaTYdPZNJXr8mJfLxye428N0=", - "path": "github.com/ugorji/go/codec", - "revision": "c88ee250d0221a57af388746f5cf03768c21d6e2", - "revisionTime": "2017-02-15T20:11:44Z" - }, - { - "checksumSHA1": "9jjO5GjLa0XF/nfWihF02RoH4qc=", - "comment": "release-branch.go1.7", - "path": "golang.org/x/net/context", - "revision": "d4c55e66d8c3a2f3382d264b08e3e3454a66355a", - "revisionTime": "2016-10-18T08:54:36Z" - }, - { - "checksumSHA1": "39V1idWER42Lmcmg2Uy40wMzOlo=", - "comment": "v8.18.1", - "path": "gopkg.in/go-playground/validator.v8", - "revision": "5f57d2222ad794d0dffb07e664ea05e2ee07d60c", - "revisionTime": "2016-07-18T13:41:25Z" - }, - { - "checksumSHA1": "12GqsW8PiRPnezDDy0v4brZrndM=", - "comment": "v2", - "path": "gopkg.in/yaml.v2", - "revision": "a5b47d31c556af34a302ce5d659e6fea44d90de0", - "revisionTime": "2016-09-28T15:37:09Z" - } - ], - "rootPath": "github.com/gin-gonic/gin" -} diff --git a/deps/github.com/go-openapi/spec/expander.go b/deps/github.com/go-openapi/spec/expander.go index b4429a21c..5054a7be6 100644 --- a/deps/github.com/go-openapi/spec/expander.go +++ b/deps/github.com/go-openapi/spec/expander.go @@ -20,6 +20,7 @@ import ( "log" "net/url" "os" + "path" "path/filepath" "reflect" "strings" @@ -83,21 +84,43 @@ func (s *simpleCache) Set(uri string, data interface{}) { // ResolveRefWithBase resolves a reference against a context root with preservation of base path func ResolveRefWithBase(root interface{}, ref *Ref, opts *ExpandOptions) (*Schema, error) { - resolver, err := defaultSchemaLoader(root, nil, opts, nil) + resolver, err := defaultSchemaLoader(root, opts, nil) if err != nil { return nil, err } + specBasePath := "" + if opts != nil && opts.RelativeBase != "" { + specBasePath, _ = absPath(opts.RelativeBase) + } result := new(Schema) - if err := resolver.Resolve(ref, result); err != nil { + if err := resolver.Resolve(ref, result, specBasePath); err != nil { return nil, err } return result, nil } // ResolveRef resolves a reference against a context root +// ref is guaranteed to be in root (no need to go to external files) +// ResolveRef is ONLY called from the code generation module func ResolveRef(root interface{}, ref *Ref) (*Schema, error) { - return ResolveRefWithBase(root, ref, nil) + res, _, err := ref.GetPointer().Get(root) + if err != nil { + panic(err) + } + switch sch := res.(type) { + case Schema: + return &sch, nil + case *Schema: + return sch, nil + case map[string]interface{}: + b, _ := json.Marshal(sch) + newSch := new(Schema) + json.Unmarshal(b, newSch) + return newSch, nil + default: + return nil, fmt.Errorf("unknown type for the resolved reference") + } } // ResolveParameter resolves a paramter reference against a context root @@ -107,13 +130,13 @@ func ResolveParameter(root interface{}, ref Ref) (*Parameter, error) { // ResolveParameterWithBase resolves a paramter reference against a context root and base path func ResolveParameterWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Parameter, error) { - resolver, err := defaultSchemaLoader(root, nil, opts, nil) + resolver, err := defaultSchemaLoader(root, opts, nil) if err != nil { return nil, err } result := new(Parameter) - if err := resolver.Resolve(&ref, result); err != nil { + if err := resolver.Resolve(&ref, result, ""); err != nil { return nil, err } return result, nil @@ -126,13 +149,13 @@ func ResolveResponse(root interface{}, ref Ref) (*Response, error) { // ResolveResponseWithBase resolves response a reference against a context root and base path func ResolveResponseWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*Response, error) { - resolver, err := defaultSchemaLoader(root, nil, opts, nil) + resolver, err := defaultSchemaLoader(root, opts, nil) if err != nil { return nil, err } result := new(Response) - if err := resolver.Resolve(&ref, result); err != nil { + if err := resolver.Resolve(&ref, result, ""); err != nil { return nil, err } return result, nil @@ -140,13 +163,16 @@ func ResolveResponseWithBase(root interface{}, ref Ref, opts *ExpandOptions) (*R // ResolveItems resolves header and parameter items reference against a context root and base path func ResolveItems(root interface{}, ref Ref, opts *ExpandOptions) (*Items, error) { - resolver, err := defaultSchemaLoader(root, nil, opts, nil) + resolver, err := defaultSchemaLoader(root, opts, nil) if err != nil { return nil, err } - + basePath := "" + if opts.RelativeBase != "" { + basePath = opts.RelativeBase + } result := new(Items) - if err := resolver.Resolve(&ref, result); err != nil { + if err := resolver.Resolve(&ref, result, basePath); err != nil { return nil, err } return result, nil @@ -154,26 +180,26 @@ func ResolveItems(root interface{}, ref Ref, opts *ExpandOptions) (*Items, error // ResolvePathItem resolves response a path item against a context root and base path func ResolvePathItem(root interface{}, ref Ref, opts *ExpandOptions) (*PathItem, error) { - resolver, err := defaultSchemaLoader(root, nil, opts, nil) + resolver, err := defaultSchemaLoader(root, opts, nil) if err != nil { return nil, err } - + basePath := "" + if opts.RelativeBase != "" { + basePath = opts.RelativeBase + } result := new(PathItem) - if err := resolver.Resolve(&ref, result); err != nil { + if err := resolver.Resolve(&ref, result, basePath); err != nil { return nil, err } return result, nil } type schemaLoader struct { - loadingRef *Ref - startingRef *Ref - currentRef *Ref - root interface{} - options *ExpandOptions - cache ResolutionCache - loadDoc func(string) (json.RawMessage, error) + root interface{} + options *ExpandOptions + cache ResolutionCache + loadDoc func(string) (json.RawMessage, error) } var idPtr, _ = jsonpointer.New("/id") @@ -194,7 +220,6 @@ func init() { func defaultSchemaLoader( root interface{}, - ref *Ref, expandOptions *ExpandOptions, cache ResolutionCache) (*schemaLoader, error) { @@ -205,20 +230,10 @@ func defaultSchemaLoader( expandOptions = &ExpandOptions{} } - var ptr *jsonpointer.Pointer - if ref != nil { - ptr = ref.GetPointer() - } - - currentRef := nextRef(root, ref, ptr) - return &schemaLoader{ - loadingRef: ref, - startingRef: ref, - currentRef: currentRef, - root: root, - options: expandOptions, - cache: cache, + root: root, + options: expandOptions, + cache: cache, loadDoc: func(path string) (json.RawMessage, error) { debugLog("fetching document at %q", path) return PathLoader(path) @@ -303,172 +318,110 @@ func debugLog(msg string, args ...interface{}) { } } -func normalizeFileRef(ref *Ref, relativeBase string) *Ref { - refURL := ref.GetURL() - debugLog("normalizing %s against %s (%s)", ref.String(), relativeBase, refURL.String()) - if strings.HasPrefix(refURL.String(), "#") { - return ref +// normalize absolute path for cache. +// on Windows, drive letters should be converted to lower as scheme in net/url.URL +func normalizeAbsPath(path string) string { + u, err := url.Parse(path) + if err != nil { + debugLog("normalize absolute path failed: %s", err) + return path } + return u.String() +} - if refURL.Scheme == "file" || (refURL.Scheme == "" && refURL.Host == "") { - filePath := refURL.Path - debugLog("normalizing file path: %s", filePath) - - if !filepath.IsAbs(filepath.FromSlash(filePath)) && len(relativeBase) != 0 { - debugLog("joining %s with %s", relativeBase, filePath) - if fi, err := os.Stat(filepath.FromSlash(relativeBase)); err == nil { - if !fi.IsDir() { - relativeBase = filepath.Dir(filepath.FromSlash(relativeBase)) - } - } - filePath = filepath.Join(filepath.FromSlash(relativeBase), filepath.FromSlash(filePath)) - } - if !filepath.IsAbs(filepath.FromSlash(filePath)) { - pwd, err := os.Getwd() - if err == nil { - debugLog("joining cwd %s with %s", pwd, filePath) - filePath = filepath.Join(pwd, filepath.FromSlash(filePath)) - } +// base or refPath could be a file path or a URL +// given a base absolute path and a ref path, return the absolute path of refPath +// 1) if refPath is absolute, return it +// 2) if refPath is relative, join it with basePath keeping the scheme, hosts, and ports if exists +// base could be a directory or a full file path +func normalizePaths(refPath, base string) string { + refURL, _ := url.Parse(refPath) + if path.IsAbs(refURL.Path) { + // refPath is actually absolute + if refURL.Host != "" { + return refPath } + return filepath.FromSlash(refPath) + } - debugLog("cleaning %s", filePath) - filePath = filepath.Clean(filepath.FromSlash(filePath)) - _, err := os.Stat(filepath.FromSlash(filePath)) - if err == nil { - debugLog("rewriting url %s to scheme \"\" path %s", refURL.String(), filePath) - slp := filepath.FromSlash(filePath) - if filepath.IsAbs(slp) && filepath.Separator == '\\' && len(slp) > 1 && slp[1] == ':' && ('a' <= slp[0] && slp[0] <= 'z' || 'A' <= slp[0] && slp[0] <= 'Z') { - slp = slp[2:] - } - refURL.Scheme = "" - refURL.Path = filepath.ToSlash(slp) - debugLog("new url with joined filepath: %s", refURL.String()) - *ref = MustCreateRef(refURL.String()) + // relative refPath + baseURL, _ := url.Parse(base) + if !strings.HasPrefix(refPath, "#") { + // combining paths + if baseURL.Host != "" { + baseURL.Path = path.Join(path.Dir(baseURL.Path), refURL.Path) + } else { // base is a file + newBase := fmt.Sprintf("%s#%s", filepath.Join(filepath.Dir(base), filepath.FromSlash(refURL.Path)), refURL.Fragment) + return newBase } - } - debugLog("refurl: %s", ref.GetURL().String()) - return ref + } + // copying fragment from ref to base + baseURL.Fragment = refURL.Fragment + return baseURL.String() } -func (r *schemaLoader) resolveRef(currentRef, ref *Ref, node, target interface{}) error { - - tgt := reflect.ValueOf(target) - if tgt.Kind() != reflect.Ptr { - return fmt.Errorf("resolve ref: target needs to be a pointer") +// relativeBase could be an ABSOLUTE file path or an ABSOLUTE URL +func normalizeFileRef(ref *Ref, relativeBase string) *Ref { + // This is important for when the reference is pointing to the root schema + if ref.String() == "" { + r, _ := NewRef(relativeBase) + return &r } - oldRef := currentRef + refURL := ref.GetURL() + debugLog("normalizing %s against %s (%s)", ref.String(), relativeBase, refURL.String()) - if currentRef != nil { - debugLog("resolve ref current %s new %s", currentRef.String(), ref.String()) - nextRef := nextRef(node, ref, currentRef.GetPointer()) - if nextRef == nil || nextRef.GetURL() == nil { - return nil - } - var err error - currentRef, err = currentRef.Inherits(*nextRef) - debugLog("resolved ref current %s", currentRef.String()) - if err != nil { - return err - } - } + s := normalizePaths(ref.String(), relativeBase) + r, _ := NewRef(s) + return &r +} - if currentRef == nil { - currentRef = ref +func (r *schemaLoader) resolveRef(ref *Ref, target interface{}, basePath string) error { + tgt := reflect.ValueOf(target) + if tgt.Kind() != reflect.Ptr { + return fmt.Errorf("resolve ref: target needs to be a pointer") } - refURL := currentRef.GetURL() + refURL := ref.GetURL() if refURL == nil { return nil } - if currentRef.IsRoot() { - nv := reflect.ValueOf(node) - reflect.Indirect(tgt).Set(reflect.Indirect(nv)) - return nil - } - if strings.HasPrefix(refURL.String(), "#") { - res, _, err := ref.GetPointer().Get(node) + var res interface{} + var data interface{} + var err error + // Resolve against the root if it isn't nil, and if ref is pointing at the root, or has a fragment only which means + // it is pointing somewhere in the root. + root := r.root + if (ref.IsRoot() || ref.HasFragmentOnly) && root == nil && basePath != "" { + if baseRef, err := NewRef(basePath); err == nil { + root, _, _, _ = r.load(baseRef.GetURL()) + } + } + if (ref.IsRoot() || ref.HasFragmentOnly) && root != nil { + data = root + } else { + baseRef := normalizeFileRef(ref, basePath) + debugLog("current ref is: %s", ref.String()) + debugLog("current ref normalized file: %s", baseRef.String()) + data, _, _, err = r.load(baseRef.GetURL()) if err != nil { - res, _, err = ref.GetPointer().Get(r.root) - if err != nil { - return err - } - } - rv := reflect.Indirect(reflect.ValueOf(res)) - tgtType := reflect.Indirect(tgt).Type() - if rv.Type().AssignableTo(tgtType) { - reflect.Indirect(tgt).Set(reflect.Indirect(reflect.ValueOf(res))) - } else { - if err := swag.DynamicJSONToStruct(rv.Interface(), target); err != nil { - return err - } + return err } - - return nil } - relativeBase := "" - if r.options != nil && r.options.RelativeBase != "" { - relativeBase = r.options.RelativeBase - } - normalizeFileRef(currentRef, relativeBase) - debugLog("current ref normalized file: %s", currentRef.String()) - normalizeFileRef(ref, relativeBase) - debugLog("ref normalized file: %s", currentRef.String()) - - data, _, _, err := r.load(currentRef.GetURL()) - if err != nil { - return err - } - - if ((oldRef == nil && currentRef != nil) || - (oldRef != nil && currentRef == nil) || - oldRef.String() != currentRef.String()) && - ((oldRef == nil && ref != nil) || - (oldRef != nil && ref == nil) || - (oldRef.String() != ref.String())) { - - return r.resolveRef(currentRef, ref, data, target) - } - - var res interface{} - if currentRef.String() != "" { - res, _, err = currentRef.GetPointer().Get(data) + res = data + if ref.String() != "" { + res, _, err = ref.GetPointer().Get(data) if err != nil { - if strings.HasPrefix(ref.String(), "#") { - if r.loadingRef != nil { - rr, er := r.loadingRef.Inherits(*ref) - if er != nil { - return er - } - refURL = rr.GetURL() - - data, _, _, err = r.load(refURL) - if err != nil { - return err - } - } else { - data = r.root - } - } - - res, _, err = ref.GetPointer().Get(data) - if err != nil { - return err - } + return err } - } else { - res = data } - if err := swag.DynamicJSONToStruct(res, target); err != nil { return err } - r.currentRef = currentRef - return nil } @@ -493,50 +446,62 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error) return data, toFetch, fromCache, nil } -func (r *schemaLoader) Resolve(ref *Ref, target interface{}) error { - return r.resolveRef(r.currentRef, ref, r.root, target) +// Resolve resolves a reference against basePath and stores the result in target +// Resolve is not in charge of following references, it only resolves ref by following its URL +// if the schema that ref is referring to has more refs in it. Resolve doesn't resolve them +// if basePath is an empty string, ref is resolved against the root schema stored in the schemaLoader struct +func (r *schemaLoader) Resolve(ref *Ref, target interface{}, basePath string) error { + return r.resolveRef(ref, target, basePath) } -func (r *schemaLoader) reset() { - ref := r.startingRef - - var ptr *jsonpointer.Pointer - if ref != nil { - ptr = ref.GetPointer() +// absPath returns the absolute path of a file +func absPath(fname string) (string, error) { + if strings.HasPrefix(fname, "http") { + return fname, nil } - - r.currentRef = nextRef(r.root, ref, ptr) + if filepath.IsAbs(fname) { + return fname, nil + } + wd, err := os.Getwd() + return filepath.Join(wd, fname), err } // ExpandSpec expands the references in a swagger spec func ExpandSpec(spec *Swagger, options *ExpandOptions) error { - resolver, err := defaultSchemaLoader(spec, nil, options, nil) + resolver, err := defaultSchemaLoader(spec, options, nil) // Just in case this ever returns an error. if shouldStopOnError(err, resolver.options) { return err } + // getting the base path of the spec to adjust all subsequent reference resolutions + specBasePath := "" + if options != nil && options.RelativeBase != "" { + specBasePath, _ = absPath(options.RelativeBase) + } + if options == nil || !options.SkipSchemas { for key, definition := range spec.Definitions { var def *Schema var err error - if def, err = expandSchema(definition, []string{"#/definitions/" + key}, resolver); shouldStopOnError(err, resolver.options) { + if def, err = expandSchema(definition, []string{fmt.Sprintf("#/defintions/%s", key)}, resolver, specBasePath); shouldStopOnError(err, resolver.options) { return err } - resolver.reset() - spec.Definitions[key] = *def + if def != nil { + spec.Definitions[key] = *def + } } } for key, parameter := range spec.Parameters { - if err := expandParameter(¶meter, resolver); shouldStopOnError(err, resolver.options) { + if err := expandParameter(¶meter, resolver, specBasePath); shouldStopOnError(err, resolver.options) { return err } spec.Parameters[key] = parameter } for key, response := range spec.Responses { - if err := expandResponse(&response, resolver); shouldStopOnError(err, resolver.options) { + if err := expandResponse(&response, resolver, specBasePath); shouldStopOnError(err, resolver.options) { return err } spec.Responses[key] = response @@ -544,7 +509,7 @@ func ExpandSpec(spec *Swagger, options *ExpandOptions) error { if spec.Paths != nil { for key, path := range spec.Paths.Paths { - if err := expandPathItem(&path, resolver); shouldStopOnError(err, resolver.options) { + if err := expandPathItem(&path, resolver, specBasePath); shouldStopOnError(err, resolver.options) { return err } spec.Paths.Paths[key] = path @@ -566,69 +531,65 @@ func shouldStopOnError(err error, opts *ExpandOptions) bool { return false } -// ExpandSchema expands the refs in the schema object +// ExpandSchema expands the refs in the schema object with reference to the root object +// go-openapi/validate uses this function +// notice that it is impossible to reference a json scema in a different file other than root func ExpandSchema(schema *Schema, root interface{}, cache ResolutionCache) error { - return ExpandSchemaWithBasePath(schema, root, cache, nil) + // Only save the root to a tmp file if it isn't nil. + var base string + if root != nil { + base, _ = absPath("root") + if cache == nil { + cache = resCache + } + cache.Set(normalizeAbsPath(base), root) + base = "root" + } + + opts := &ExpandOptions{ + RelativeBase: base, + SkipSchemas: false, + ContinueOnError: false, + } + return ExpandSchemaWithBasePath(schema, cache, opts) } // ExpandSchemaWithBasePath expands the refs in the schema object, base path configured through expand options -func ExpandSchemaWithBasePath(schema *Schema, root interface{}, cache ResolutionCache, opts *ExpandOptions) error { +func ExpandSchemaWithBasePath(schema *Schema, cache ResolutionCache, opts *ExpandOptions) error { if schema == nil { return nil } - if root == nil { - root = schema - } - nrr, _ := NewRef(schema.ID) - var rrr *Ref - if nrr.String() != "" { - switch rt := root.(type) { - case *Schema: - rid, _ := NewRef(rt.ID) - rrr, _ = rid.Inherits(nrr) - case *Swagger: - rid, _ := NewRef(rt.ID) - rrr, _ = rid.Inherits(nrr) - } + var basePath string + if opts.RelativeBase != "" { + basePath, _ = absPath(opts.RelativeBase) } - resolver, err := defaultSchemaLoader(root, rrr, opts, cache) + resolver, err := defaultSchemaLoader(nil, opts, cache) if err != nil { return err } refs := []string{""} - if rrr != nil { - refs[0] = rrr.String() - } var s *Schema - if s, err = expandSchema(*schema, refs, resolver); err != nil { + if s, err = expandSchema(*schema, refs, resolver, basePath); err != nil { return err } *schema = *s return nil } -func expandItems(target Schema, parentRefs []string, resolver *schemaLoader) (*Schema, error) { +func expandItems(target Schema, parentRefs []string, resolver *schemaLoader, basePath string) (*Schema, error) { if target.Items != nil { if target.Items.Schema != nil { - t, err := expandSchema(*target.Items.Schema, parentRefs, resolver) + t, err := expandSchema(*target.Items.Schema, parentRefs, resolver, basePath) if err != nil { - if target.Items.Schema.ID == "" { - target.Items.Schema.ID = target.ID - if err != nil { - t, err = expandSchema(*target.Items.Schema, parentRefs, resolver) - if err != nil { - return nil, err - } - } - } + return nil, err } *target.Items.Schema = *t } for i := range target.Items.Schemas { - t, err := expandSchema(target.Items.Schemas[i], parentRefs, resolver) + t, err := expandSchema(target.Items.Schemas[i], parentRefs, resolver, basePath) if err != nil { return nil, err } @@ -638,36 +599,84 @@ func expandItems(target Schema, parentRefs []string, resolver *schemaLoader) (*S return &target, nil } -func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (*Schema, error) { +// basePathFromSchemaID returns a new basePath based on an existing basePath and a schema ID +func basePathFromSchemaID(oldBasePath, id string) string { + u, err := url.Parse(oldBasePath) + if err != nil { + panic(err) + } + uid, err := url.Parse(id) + if err != nil { + panic(err) + } + + if path.IsAbs(uid.Path) { + return id + } + u.Path = path.Join(path.Dir(u.Path), uid.Path) + return u.String() +} + +func isCircular(ref *Ref, basePath string, parentRefs ...string) bool { + return basePath != "" && swag.ContainsStringsCI(parentRefs, ref.String()) +} + +func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader, basePath string) (*Schema, error) { if target.Ref.String() == "" && target.Ref.IsRoot() { - debugLog("skipping expand schema for no ref and root: %v", resolver.root) + // normalizing is important + newRef := normalizeFileRef(&target.Ref, basePath) + target.Ref = *newRef + return &target, nil - return resolver.root.(*Schema), nil } - // t is the new expanded schema - var t *Schema + /* change the base path of resolution when an ID is encountered + otherwise the basePath should inherit the parent's */ + // important: ID can be relative path + if target.ID != "" { + // handling the case when id is a folder + // remember that basePath has to be a file + refPath := target.ID + if strings.HasSuffix(target.ID, "/") { + // path.Clean here would not work correctly if basepath is http + refPath = fmt.Sprintf("%s%s", refPath, "placeholder.json") + } + basePath = normalizePaths(refPath, basePath) + } + + /* Explain here what this function does */ - for target.Ref.String() != "" { - if swag.ContainsStringsCI(parentRefs, target.Ref.String()) { + var t *Schema + /* if Ref is found, everything else doesn't matter */ + /* Ref also changes the resolution scope of children expandSchema */ + if target.Ref.String() != "" { + /* Here the resolution scope is changed because a $ref was encountered */ + normalizedRef := normalizeFileRef(&target.Ref, basePath) + normalizedBasePath := normalizedRef.RemoteURI() + + /* this means there is a circle in the recursion tree */ + /* return the Ref */ + if isCircular(normalizedRef, basePath, parentRefs...) { + target.Ref = *normalizedRef return &target, nil } - if err := resolver.Resolve(&target.Ref, &t); shouldStopOnError(err, resolver.options) { - return &target, err + debugLog("\nbasePath: %s", basePath) + if Debug { + b, _ := json.Marshal(target) + debugLog("calling Resolve with target: %s", string(b)) } - - if swag.ContainsStringsCI(parentRefs, target.Ref.String()) { - debugLog("ref already exists in parent") - return &target, nil + if err := resolver.Resolve(&target.Ref, &t, basePath); shouldStopOnError(err, resolver.options) { + return nil, err } - parentRefs = append(parentRefs, target.Ref.String()) + if t != nil { - target = *t + parentRefs = append(parentRefs, normalizedRef.String()) + return expandSchema(*t, parentRefs, resolver, normalizedBasePath) } } - t, err := expandItems(target, parentRefs, resolver) + t, err := expandItems(target, parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -676,23 +685,21 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } for i := range target.AllOf { - t, err := expandSchema(target.AllOf[i], parentRefs, resolver) + t, err := expandSchema(target.AllOf[i], parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } - if t != nil { - target.AllOf[i] = *t - } + target.AllOf[i] = *t } for i := range target.AnyOf { - t, err := expandSchema(target.AnyOf[i], parentRefs, resolver) + t, err := expandSchema(target.AnyOf[i], parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } target.AnyOf[i] = *t } for i := range target.OneOf { - t, err := expandSchema(target.OneOf[i], parentRefs, resolver) + t, err := expandSchema(target.OneOf[i], parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -701,7 +708,7 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } } if target.Not != nil { - t, err := expandSchema(*target.Not, parentRefs, resolver) + t, err := expandSchema(*target.Not, parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -710,7 +717,7 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } } for k := range target.Properties { - t, err := expandSchema(target.Properties[k], parentRefs, resolver) + t, err := expandSchema(target.Properties[k], parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -719,7 +726,7 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } } if target.AdditionalProperties != nil && target.AdditionalProperties.Schema != nil { - t, err := expandSchema(*target.AdditionalProperties.Schema, parentRefs, resolver) + t, err := expandSchema(*target.AdditionalProperties.Schema, parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -728,7 +735,7 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } } for k := range target.PatternProperties { - t, err := expandSchema(target.PatternProperties[k], parentRefs, resolver) + t, err := expandSchema(target.PatternProperties[k], parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -738,7 +745,7 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } for k := range target.Dependencies { if target.Dependencies[k].Schema != nil { - t, err := expandSchema(*target.Dependencies[k].Schema, parentRefs, resolver) + t, err := expandSchema(*target.Dependencies[k].Schema, parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -748,7 +755,7 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } } if target.AdditionalItems != nil && target.AdditionalItems.Schema != nil { - t, err := expandSchema(*target.AdditionalItems.Schema, parentRefs, resolver) + t, err := expandSchema(*target.AdditionalItems.Schema, parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -757,7 +764,7 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* } } for k := range target.Definitions { - t, err := expandSchema(target.Definitions[k], parentRefs, resolver) + t, err := expandSchema(target.Definitions[k], parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return &target, err } @@ -768,55 +775,78 @@ func expandSchema(target Schema, parentRefs []string, resolver *schemaLoader) (* return &target, nil } -func expandPathItem(pathItem *PathItem, resolver *schemaLoader) error { +func derefPathItem(pathItem *PathItem, parentRefs []string, resolver *schemaLoader, basePath string) error { + curRef := pathItem.Ref.String() + if curRef != "" { + normalizedRef := normalizeFileRef(&pathItem.Ref, basePath) + normalizedBasePath := normalizedRef.RemoteURI() + + if isCircular(normalizedRef, basePath, parentRefs...) { + return nil + } + + if err := resolver.Resolve(&pathItem.Ref, pathItem, basePath); shouldStopOnError(err, resolver.options) { + return err + } + + if pathItem.Ref.String() != "" && pathItem.Ref.String() != curRef && basePath != normalizedBasePath { + parentRefs = append(parentRefs, normalizedRef.String()) + return derefPathItem(pathItem, parentRefs, resolver, normalizedBasePath) + } + } + + return nil +} + +func expandPathItem(pathItem *PathItem, resolver *schemaLoader, basePath string) error { if pathItem == nil { return nil } - if pathItem.Ref.String() != "" { - if err := resolver.Resolve(&pathItem.Ref, &pathItem); err != nil { - return err - } - resolver.reset() - pathItem.Ref = Ref{} + parentRefs := []string{} + if err := derefPathItem(pathItem, parentRefs, resolver, basePath); shouldStopOnError(err, resolver.options) { + return err } + pathItem.Ref = Ref{} + + parentRefs = parentRefs[0:] for idx := range pathItem.Parameters { - if err := expandParameter(&(pathItem.Parameters[idx]), resolver); shouldStopOnError(err, resolver.options) { + if err := expandParameter(&(pathItem.Parameters[idx]), resolver, basePath); shouldStopOnError(err, resolver.options) { return err } } - if err := expandOperation(pathItem.Get, resolver); shouldStopOnError(err, resolver.options) { + if err := expandOperation(pathItem.Get, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Head, resolver); shouldStopOnError(err, resolver.options) { + if err := expandOperation(pathItem.Head, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Options, resolver); shouldStopOnError(err, resolver.options) { + if err := expandOperation(pathItem.Options, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Put, resolver); shouldStopOnError(err, resolver.options) { + if err := expandOperation(pathItem.Put, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Post, resolver); shouldStopOnError(err, resolver.options) { + if err := expandOperation(pathItem.Post, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Patch, resolver); shouldStopOnError(err, resolver.options) { + if err := expandOperation(pathItem.Patch, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } - if err := expandOperation(pathItem.Delete, resolver); shouldStopOnError(err, resolver.options) { + if err := expandOperation(pathItem.Delete, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } return nil } -func expandOperation(op *Operation, resolver *schemaLoader) error { +func expandOperation(op *Operation, resolver *schemaLoader, basePath string) error { if op == nil { return nil } for i, param := range op.Parameters { - if err := expandParameter(¶m, resolver); shouldStopOnError(err, resolver.options) { + if err := expandParameter(¶m, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } op.Parameters[i] = param @@ -824,11 +854,11 @@ func expandOperation(op *Operation, resolver *schemaLoader) error { if op.Responses != nil { responses := op.Responses - if err := expandResponse(responses.Default, resolver); shouldStopOnError(err, resolver.options) { + if err := expandResponse(responses.Default, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } for code, response := range responses.StatusCodeResponses { - if err := expandResponse(&response, resolver); shouldStopOnError(err, resolver.options) { + if err := expandResponse(&response, resolver, basePath); shouldStopOnError(err, resolver.options) { return err } responses.StatusCodeResponses[code] = response @@ -837,63 +867,125 @@ func expandOperation(op *Operation, resolver *schemaLoader) error { return nil } -func expandResponse(response *Response, resolver *schemaLoader) error { - if response == nil { - return nil +// ExpandResponse expands a response based on a basepath +// This is the exported version of expandResponse +// all refs inside response will be resolved relative to basePath +func ExpandResponse(response *Response, basePath string) error { + opts := &ExpandOptions{ + RelativeBase: basePath, } + resolver, err := defaultSchemaLoader(nil, opts, nil) + if err != nil { + return err + } + + return expandResponse(response, resolver, basePath) +} - var parentRefs []string +func derefResponse(response *Response, parentRefs []string, resolver *schemaLoader, basePath string) error { + curRef := response.Ref.String() + if curRef != "" { + /* Here the resolution scope is changed because a $ref was encountered */ + normalizedRef := normalizeFileRef(&response.Ref, basePath) + normalizedBasePath := normalizedRef.RemoteURI() + + if isCircular(normalizedRef, basePath, parentRefs...) { + return nil + } - if response.Ref.String() != "" { - parentRefs = append(parentRefs, response.Ref.String()) - if err := resolver.Resolve(&response.Ref, response); shouldStopOnError(err, resolver.options) { + if err := resolver.Resolve(&response.Ref, response, basePath); shouldStopOnError(err, resolver.options) { return err } - resolver.reset() - response.Ref = Ref{} + + if response.Ref.String() != "" && response.Ref.String() != curRef && basePath != normalizedBasePath { + parentRefs = append(parentRefs, normalizedRef.String()) + return derefResponse(response, parentRefs, resolver, normalizedBasePath) + } } + return nil +} + +func expandResponse(response *Response, resolver *schemaLoader, basePath string) error { + if response == nil { + return nil + } + + parentRefs := []string{} + if err := derefResponse(response, parentRefs, resolver, basePath); shouldStopOnError(err, resolver.options) { + return err + } + response.Ref = Ref{} + + parentRefs = parentRefs[0:] if !resolver.options.SkipSchemas && response.Schema != nil { parentRefs = append(parentRefs, response.Schema.Ref.String()) - debugLog("response ref: %s", response.Schema.Ref) - if err := resolver.Resolve(&response.Schema.Ref, &response.Schema); shouldStopOnError(err, resolver.options) { - return err - } - s, err := expandSchema(*response.Schema, parentRefs, resolver) + s, err := expandSchema(*response.Schema, parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return err } - resolver.reset() *response.Schema = *s } + return nil } -func expandParameter(parameter *Parameter, resolver *schemaLoader) error { - if parameter == nil { - return nil +// ExpandParameter expands a parameter based on a basepath +// This is the exported version of expandParameter +// all refs inside parameter will be resolved relative to basePath +func ExpandParameter(parameter *Parameter, basePath string) error { + opts := &ExpandOptions{ + RelativeBase: basePath, } + resolver, err := defaultSchemaLoader(nil, opts, nil) + if err != nil { + return err + } + + return expandParameter(parameter, resolver, basePath) +} + +func derefParameter(parameter *Parameter, parentRefs []string, resolver *schemaLoader, basePath string) error { + curRef := parameter.Ref.String() + if curRef != "" { + normalizedRef := normalizeFileRef(¶meter.Ref, basePath) + normalizedBasePath := normalizedRef.RemoteURI() - var parentRefs []string + if isCircular(normalizedRef, basePath, parentRefs...) { + return nil + } - if parameter.Ref.String() != "" { - parentRefs = append(parentRefs, parameter.Ref.String()) - if err := resolver.Resolve(¶meter.Ref, parameter); shouldStopOnError(err, resolver.options) { + if err := resolver.Resolve(¶meter.Ref, parameter, basePath); shouldStopOnError(err, resolver.options) { return err } - resolver.reset() - parameter.Ref = Ref{} + + if parameter.Ref.String() != "" && parameter.Ref.String() != curRef && basePath != normalizedBasePath { + parentRefs = append(parentRefs, normalizedRef.String()) + return derefParameter(parameter, parentRefs, resolver, normalizedBasePath) + } } + + return nil +} + +func expandParameter(parameter *Parameter, resolver *schemaLoader, basePath string) error { + if parameter == nil { + return nil + } + + parentRefs := []string{} + if err := derefParameter(parameter, parentRefs, resolver, basePath); shouldStopOnError(err, resolver.options) { + return err + } + parameter.Ref = Ref{} + + parentRefs = parentRefs[0:] if !resolver.options.SkipSchemas && parameter.Schema != nil { parentRefs = append(parentRefs, parameter.Schema.Ref.String()) - if err := resolver.Resolve(¶meter.Schema.Ref, ¶meter.Schema); shouldStopOnError(err, resolver.options) { - return err - } - s, err := expandSchema(*parameter.Schema, parentRefs, resolver) + s, err := expandSchema(*parameter.Schema, parentRefs, resolver, basePath) if shouldStopOnError(err, resolver.options) { return err } - resolver.reset() *parameter.Schema = *s } return nil diff --git a/deps/github.com/go-openapi/spec/items.go b/deps/github.com/go-openapi/spec/items.go index 46944fb69..492423ef7 100644 --- a/deps/github.com/go-openapi/spec/items.go +++ b/deps/github.com/go-openapi/spec/items.go @@ -28,6 +28,7 @@ type SimpleSchema struct { Items *Items `json:"items,omitempty"` CollectionFormat string `json:"collectionFormat,omitempty"` Default interface{} `json:"default,omitempty"` + Example interface{} `json:"example,omitempty"` } func (s *SimpleSchema) TypeName() string { @@ -178,9 +179,14 @@ func (i *Items) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &simpleSchema); err != nil { return err } + var vendorExtensible VendorExtensible + if err := json.Unmarshal(data, &vendorExtensible); err != nil { + return err + } i.Refable = ref i.CommonValidations = validations i.SimpleSchema = simpleSchema + i.VendorExtensible = vendorExtensible return nil } @@ -198,7 +204,11 @@ func (i Items) MarshalJSON() ([]byte, error) { if err != nil { return nil, err } - return swag.ConcatJSON(b3, b1, b2), nil + b4, err := json.Marshal(i.VendorExtensible) + if err != nil { + return nil, err + } + return swag.ConcatJSON(b4, b3, b1, b2), nil } // JSONLookup look up a value by the json property name diff --git a/deps/github.com/go-openapi/spec/operation.go b/deps/github.com/go-openapi/spec/operation.go index de1db6f02..e698f9e8a 100644 --- a/deps/github.com/go-openapi/spec/operation.go +++ b/deps/github.com/go-openapi/spec/operation.go @@ -31,11 +31,36 @@ type OperationProps struct { ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"` ID string `json:"operationId,omitempty"` Deprecated bool `json:"deprecated,omitempty"` - Security []map[string][]string `json:"security,omitempty"` + Security []map[string][]string `json:"security,omitempty"` //Special case, see MarshalJSON function Parameters []Parameter `json:"parameters,omitempty"` Responses *Responses `json:"responses,omitempty"` } +// MarshalJSON takes care of serializing operation properties to JSON +// +// We use a custom marhaller here to handle a special cases related +// the Security field. We need to preserve zero length slice +// while omiting the field when the value is nil/unset. +func (op OperationProps) MarshalJSON() ([]byte, error) { + type Alias OperationProps + if op.Security == nil { + return json.Marshal(&struct { + Security []map[string][]string `json:"security,omitempty"` + *Alias + }{ + Security: op.Security, + Alias: (*Alias)(&op), + }) + } + return json.Marshal(&struct { + Security []map[string][]string `json:"security"` + *Alias + }{ + Security: op.Security, + Alias: (*Alias)(&op), + }) +} + // Operation describes a single API operation on a path. // // For more information: http://goo.gl/8us55a#operationObject diff --git a/deps/github.com/go-openapi/spec/ref.go b/deps/github.com/go-openapi/spec/ref.go index 4833b87e2..1405bfd8e 100644 --- a/deps/github.com/go-openapi/spec/ref.go +++ b/deps/github.com/go-openapi/spec/ref.go @@ -145,7 +145,10 @@ func (r *Ref) UnmarshalJSON(d []byte) error { if err := json.Unmarshal(d, &v); err != nil { return err } + return r.fromMap(v) +} +func (r *Ref) fromMap(v map[string]interface{}) error { if v == nil { return nil } diff --git a/deps/github.com/go-openapi/spec/schema.go b/deps/github.com/go-openapi/spec/schema.go index 1cdcc163f..05c1a4aa0 100644 --- a/deps/github.com/go-openapi/spec/schema.go +++ b/deps/github.com/go-openapi/spec/schema.go @@ -135,6 +135,10 @@ func (r *SchemaURL) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &v); err != nil { return err } + return r.fromMap(v) +} + +func (r *SchemaURL) fromMap(v map[string]interface{}) error { if v == nil { return nil } @@ -582,18 +586,17 @@ func (s Schema) MarshalJSON() ([]byte, error) { // UnmarshalJSON marshal this from JSON func (s *Schema) UnmarshalJSON(data []byte) error { - var sch Schema - if err := json.Unmarshal(data, &sch.SchemaProps); err != nil { + props := struct { + SchemaProps + SwaggerSchemaProps + }{} + if err := json.Unmarshal(data, &props); err != nil { return err } - if err := json.Unmarshal(data, &sch.Ref); err != nil { - return err - } - if err := json.Unmarshal(data, &sch.Schema); err != nil { - return err - } - if err := json.Unmarshal(data, &sch.SwaggerSchemaProps); err != nil { - return err + + sch := Schema{ + SchemaProps: props.SchemaProps, + SwaggerSchemaProps: props.SwaggerSchemaProps, } var d map[string]interface{} @@ -601,6 +604,9 @@ func (s *Schema) UnmarshalJSON(data []byte) error { return err } + sch.Ref.fromMap(d) + sch.Schema.fromMap(d) + delete(d, "$ref") delete(d, "$schema") for _, pn := range swag.DefaultJSONNameProvider.GetJSONNames(s) { diff --git a/deps/github.com/go-openapi/validate/.drone.sec b/deps/github.com/go-openapi/validate/.drone.sec deleted file mode 100644 index 64bfa2ef6..000000000 --- a/deps/github.com/go-openapi/validate/.drone.sec +++ /dev/null @@ -1 +0,0 @@ -eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.lisG21ATunZSCBP6vaqK_AZCIR18tN563RdqkAb6PGOipqTeg8R7VwZQIeDqS-2Vond6NX_KSC_D_uxxv0hBf2DiGXmwMUmP4nRXrsmbzT2qQKKIHYRDC_6jb2-FSfK14ezIe1Q07UiiJecDsN3CFEccS8E68Tdnp78p7yDwbTvpumnZmwYfyhlImtjFQv2YpyFVsjEHWK0R4e9T3ONQWcx6D2rSoxABbutrS03QwsJhHCeD9joL_gxfkFKm3CW8yWPSk2QYtx_Q1hu-tZR4IPb2tQPXPX3mtyhwBqziWgmJRDFCEjlCO5aCobiMm_9K5X05gue_DcgW163zh1P9jg.nleER2An8CUn_OuR.b77RFEFp0gC8j5yCAoARNKYmQIvWq99ibmf5ffJgdhQBF3sRYJLt_XflJ_2lsaiFOxvc45T2fnkMVy2lHFcri7F9f1BRiT_0AcDthxsecGzG8BZ9QvaM6b4Dn0rhjrOq8rsF0m3ZnbPBkkg3LV5EkbHWstMo2fgJPJhJswlGWhqJPJBDecG1nMBC8SMH32X-zVlSM-BLiaghvOGNxyb_RLZJZ3CLczIdQ2JO2UeYkOGCPGzernvkHDMpqQXc-8cmulDdHgCy87qFLy5ttGFgYbnTm92h_ChOGKZixeX0PL0pQY5wXd2xTO7Tg_Ov5E5FoVwIkwOextedVsF9iz_b_mwtCY3LXrvbJTW7zWrwBVsVyAXxT5iu0HyQ3tBVxT2GxS-yM5ApqLozcZCQg9flMyfSgThu82FfzEr0fI5vKw8zo0GdO4GBuVSppM9m6ToG6hlwyHD9g2YTZw9068hyq1_kZQhugJRjgGbpa2gyGqzx16fg0zVoupVIiq5KfvRlAQFeOVVjQwb0BWf25tJUj5tV3O9ge6dbKSXizEca33FJJwJWoXhd7DCREXUU9pBz06NCCf495BGoVbq3oLPDQc2mpcuy0XAPxSwXcc5Ts8DNs7MrxBlYdw81wMXuztIpOY4.XjKlMWl_H40XszToi2VU5g \ No newline at end of file diff --git a/deps/github.com/go-openapi/validate/.drone.yml b/deps/github.com/go-openapi/validate/.drone.yml deleted file mode 100644 index cfe9c7c30..000000000 --- a/deps/github.com/go-openapi/validate/.drone.yml +++ /dev/null @@ -1,40 +0,0 @@ -clone: - path: github.com/go-openapi/validate - -matrix: - GO_VERSION: - - "1.6" - -build: - integration: - image: golang:$$GO_VERSION - pull: true - commands: - - go get -u github.com/axw/gocov/gocov - - go get -u gopkg.in/matm/v1/gocov-html - - go get -u github.com/cee-dub/go-junit-report - - go get -u github.com/stretchr/testify/assert - - go get -u gopkg.in/yaml.v2 - - go get -u github.com/go-openapi/analysis - - go get -u github.com/go-openapi/errors - - go get -u github.com/go-openapi/loads - - go get -u github.com/go-openapi/strfmt - - go get -u github.com/go-openapi/runtime - - go test -race - - go test -v -cover -coverprofile=coverage.out -covermode=count - -notify: - slack: - channel: bots - webhook_url: $$SLACK_URL - username: drone - -publish: - coverage: - server: https://coverage.vmware.run - token: $$GITHUB_TOKEN - # threshold: 70 - # must_increase: true - when: - matrix: - GO_VERSION: "1.6" diff --git a/deps/github.com/go-openapi/validate/.pullapprove.yml b/deps/github.com/go-openapi/validate/.pullapprove.yml deleted file mode 100644 index 5ec183e22..000000000 --- a/deps/github.com/go-openapi/validate/.pullapprove.yml +++ /dev/null @@ -1,13 +0,0 @@ -approve_by_comment: true -approve_regex: '^(:shipit:|:\+1:|\+1|LGTM|lgtm|Approved)' -reject_regex: ^[Rr]ejected -reset_on_push: false -reviewers: - members: - - casualjim - - chancez - - frapposelli - - vburenin - - pytlesk4 - name: pullapprove - required: 1 diff --git a/deps/github.com/go-openapi/validate/.travis.yml b/deps/github.com/go-openapi/validate/.travis.yml new file mode 100644 index 000000000..6eeb6f626 --- /dev/null +++ b/deps/github.com/go-openapi/validate/.travis.yml @@ -0,0 +1,22 @@ +language: go +go: +- 1.7 +install: +- go get -u github.com/axw/gocov/gocov +- go get -u gopkg.in/matm/v1/gocov-html +- go get -u github.com/cee-dub/go-junit-report +- go get -u github.com/stretchr/testify/assert +- go get -u github.com/kr/pretty +- go get -u gopkg.in/yaml.v2 +- go get -u github.com/go-openapi/analysis +- go get -u github.com/go-openapi/errors +- go get -u github.com/go-openapi/loads +- go get -u github.com/go-openapi/strfmt +- go get -u github.com/go-openapi/runtime +script: +- go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic +after_success: +- bash <(curl -s https://codecov.io/bash) +notifications: + slack: + secure: EmObnQuM9Mw8J9vpFaKKHqSMN4Wsr/A9+v7ewAD5cEhA0T1P4m7MbJMiJOhxUhj/X+BFh2DamW+P2lT8mybj5wg8wnkQ2BteKA8Tawi6f9PRw2NRheO8tAi8o/npLnlmet0kc93mn+oLuqHw36w4+j5mkOl2FghkfGiUVhwrhkCP7KXQN+3TU87e+/HzQumlJ3nsE+6terVxkH3PmaUTsS5ONaODZfuxFpfb7RsoEl3skHf6d+tr+1nViLxxly7558Nc33C+W1mr0qiEvMLZ+kJ/CpGWBJ6CUJM3jm6hNe2eMuIPwEK2hxZob8c7n22VPap4K6a0bBRoydoDXaba+2sD7Ym6ivDO/DVyL44VeBBLyIiIBylDGQdZH+6SoWm90Qe/i7tnY/T5Ao5igT8f3cfQY1c3EsTfqmlDfrhmACBmwSlgkdVBLTprHL63JMY24LWmh4jhxsmMRZhCL4dze8su1w6pLN/pD1pGHtKYCEVbdTmaM3PblNRFf12XB7qosmQsgUndH4Vq3bTbU0s1pKjeDhRyLvFzvR0TBbo0pDLEoF1A/i5GVFWa7yLZNUDudQERRh7qv/xBl2excIaQ1sV4DSVm7bAE9l6Kp+yeHQJW2uN6Y3X8wu9gB9nv9l5HBze7wh8KE6PyWAOLYYqZg9/sAtsv/2GcQqXcKFF1zcA= diff --git a/deps/github.com/go-openapi/validate/README.md b/deps/github.com/go-openapi/validate/README.md index 7e7831c9e..e3bfc622b 100644 --- a/deps/github.com/go-openapi/validate/README.md +++ b/deps/github.com/go-openapi/validate/README.md @@ -1,3 +1,3 @@ -# Validation helpers [![Build Status](https://ci.vmware.run/api/badges/go-openapi/validate/status.svg)](https://ci.vmware.run/go-openapi/validate) [![Coverage](https://coverage.vmware.run/badges/go-openapi/validate/coverage.svg)](https://coverage.vmware.run/go-openapi/validate) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# Validation helpers [![Build Status](https://travis-ci.org/go-openapi/validate.svg?branch=master)](https://travis-ci.org/go-openapi/validate) [![codecov](https://codecov.io/gh/go-openapi/validate/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/validate) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/validate/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/validate?status.svg)](http://godoc.org/github.com/go-openapi/validate) diff --git a/deps/github.com/go-openapi/validate/formats.go b/deps/github.com/go-openapi/validate/formats.go index f0e9f9039..294845aff 100644 --- a/deps/github.com/go-openapi/validate/formats.go +++ b/deps/github.com/go-openapi/validate/formats.go @@ -15,6 +15,7 @@ package validate import ( + "log" "reflect" "github.com/go-openapi/spec" @@ -51,7 +52,9 @@ func (f *formatValidator) Applies(source interface{}, kind reflect.Kind) bool { return false } r := doit() - // fmt.Printf("schema props validator for %q applies %t for %T (kind: %v)\n", f.Path, r, source, kind) + if Debug { + log.Printf("format validator for %q applies %t for %T (kind: %v)\n", f.Path, r, source, kind) + } return r } diff --git a/deps/github.com/go-openapi/validate/object_validator.go b/deps/github.com/go-openapi/validate/object_validator.go index 7caff230c..0dd580288 100644 --- a/deps/github.com/go-openapi/validate/object_validator.go +++ b/deps/github.com/go-openapi/validate/object_validator.go @@ -15,8 +15,10 @@ package validate import ( + "log" "reflect" "regexp" + "strings" "github.com/go-openapi/errors" "github.com/go-openapi/spec" @@ -45,10 +47,45 @@ func (o *objectValidator) Applies(source interface{}, kind reflect.Kind) bool { // there is a problem in the type validator where it will be unhappy about null values // so that requires more testing r := reflect.TypeOf(source) == specSchemaType && (kind == reflect.Map || kind == reflect.Struct) - //fmt.Printf("object validator for %q applies %t for %T (kind: %v)\n", o.Path, r, source, kind) + if Debug { + log.Printf("object validator for %q applies %t for %T (kind: %v)\n", o.Path, r, source, kind) + } return r } +func (o *objectValidator) isPropertyName() bool { + p := strings.Split(o.Path, ".") + return p[len(p)-1] == "properties" && p[len(p)-2] != "properties" +} +func (o *objectValidator) checkArrayMustHaveItems(res *Result, val map[string]interface{}) { + if t, typeFound := val["type"]; typeFound { + if tpe, ok := t.(string); ok && tpe == "array" { + if _, itemsKeyFound := val["items"]; !itemsKeyFound { + res.AddErrors(errors.Required("items", o.Path)) + } + } + } +} + +func (o *objectValidator) checkItemsMustBeTypeArray(res *Result, val map[string]interface{}) { + if !o.isPropertyName() { + if _, itemsKeyFound := val["items"]; itemsKeyFound { + t, typeFound := val["type"] + if typeFound { + if tpe, ok := t.(string); !ok || tpe != "array" { + res.AddErrors(errors.InvalidType(o.Path, o.In, "array", nil)) + } + } else { + // there is no type + res.AddErrors(errors.Required("type", o.Path)) + } + } + } +} +func (o *objectValidator) precheck(res *Result, val map[string]interface{}) { + o.checkArrayMustHaveItems(res, val) + o.checkItemsMustBeTypeArray(res, val) +} func (o *objectValidator) Validate(data interface{}) *Result { val := data.(map[string]interface{}) numKeys := int64(len(val)) @@ -61,14 +98,8 @@ func (o *objectValidator) Validate(data interface{}) *Result { } res := new(Result) - if len(o.Required) > 0 { - for _, k := range o.Required { - if _, ok := val[k]; !ok { - res.AddErrors(errors.Required(o.Path+"."+k, o.In)) - continue - } - } - } + + o.precheck(res, val) if o.AdditionalProperties != nil && !o.AdditionalProperties.Allows { for k := range val { @@ -99,6 +130,8 @@ func (o *objectValidator) Validate(data interface{}) *Result { } } + createdFromDefaults := map[string]bool{} + for pName, pSchema := range o.Properties { rName := pName if o.Path != "" { @@ -106,7 +139,24 @@ func (o *objectValidator) Validate(data interface{}) *Result { } if v, ok := val[pName]; ok { - res.Merge(NewSchemaValidator(&pSchema, o.Root, rName, o.KnownFormats).Validate(v)) + r := NewSchemaValidator(&pSchema, o.Root, rName, o.KnownFormats).Validate(v) + res.Merge(r) + } else if pSchema.Default != nil { + createdFromDefaults[pName] = true + pName := pName // shaddow + def := pSchema.Default + res.Defaulters = append(res.Defaulters, DefaulterFunc(func() { + val[pName] = def + })) + } + } + + if len(o.Required) > 0 { + for _, k := range o.Required { + if _, ok := val[k]; !ok && !createdFromDefaults[k] { + res.AddErrors(errors.Required(o.Path+"."+k, o.In)) + continue + } } } @@ -137,9 +187,6 @@ func (o *objectValidator) validatePatternProperty(key string, value interface{}, res := validator.Validate(value) result.Merge(res) - if res.IsValid() { - succeededOnce = true - } } } diff --git a/deps/github.com/go-openapi/validate/result.go b/deps/github.com/go-openapi/validate/result.go index d8f71e946..7b58e50df 100644 --- a/deps/github.com/go-openapi/validate/result.go +++ b/deps/github.com/go-openapi/validate/result.go @@ -14,12 +14,32 @@ package validate -import "github.com/go-openapi/errors" +import ( + "os" + + "github.com/go-openapi/errors" +) + +var ( + // Debug is true when the SWAGGER_DEBUG env var is not empty + Debug = os.Getenv("SWAGGER_DEBUG") != "" +) + +type Defaulter interface { + Apply() +} + +type DefaulterFunc func() + +func (f DefaulterFunc) Apply() { + f() +} // Result represents a validation result type Result struct { Errors []error MatchCount int + Defaulters []Defaulter } // Merge merges this result with the other one, preserving match counts etc @@ -29,11 +49,13 @@ func (r *Result) Merge(other *Result) *Result { } r.AddErrors(other.Errors...) r.MatchCount += other.MatchCount + r.Defaulters = append(r.Defaulters, other.Defaulters...) return r } // AddErrors adds errors to this validation result func (r *Result) AddErrors(errors ...error) { + // TODO: filter already existing errors r.Errors = append(r.Errors, errors...) } @@ -59,3 +81,9 @@ func (r *Result) AsError() error { } return errors.CompositeValidationError(r.Errors...) } + +func (r *Result) ApplyDefaults() { + for _, d := range r.Defaulters { + d.Apply() + } +} diff --git a/deps/github.com/go-openapi/validate/schema.go b/deps/github.com/go-openapi/validate/schema.go index 8bf7d3bcc..f859c6d63 100644 --- a/deps/github.com/go-openapi/validate/schema.go +++ b/deps/github.com/go-openapi/validate/schema.go @@ -15,6 +15,8 @@ package validate import ( + "encoding/json" + "log" "reflect" "github.com/go-openapi/spec" @@ -80,12 +82,16 @@ func (s *SchemaValidator) Applies(source interface{}, kind reflect.Kind) bool { // Validate validates the data against the schema func (s *SchemaValidator) Validate(data interface{}) *Result { + result := new(Result) + if s == nil { + return result + } + if data == nil { v := s.validators[0].Validate(data) v.Merge(s.validators[6].Validate(data)) return v } - result := new(Result) tpe := reflect.TypeOf(data) kind := tpe.Kind() @@ -98,8 +104,35 @@ func (s *SchemaValidator) Validate(data interface{}) *Result { d = swag.ToDynamicJSON(data) } + isnumber := s.Schema.Type.Contains("number") || s.Schema.Type.Contains("integer") + if num, ok := data.(json.Number); ok && isnumber { + if s.Schema.Type.Contains("integer") { // avoid lossy conversion + in, erri := num.Int64() + if erri != nil { + result.AddErrors(erri) + result.Inc() + return result + } + d = in + } else { + nf, errf := num.Float64() + if errf != nil { + result.AddErrors(errf) + result.Inc() + return result + } + d = nf + } + + tpe = reflect.TypeOf(d) + kind = tpe.Kind() + } + for _, v := range s.validators { if !v.Applies(s.Schema, kind) { + if Debug { + log.Printf("%T does not apply for %v", v, kind) + } continue } @@ -117,10 +150,9 @@ func (s *SchemaValidator) typeValidator() valueValidator { func (s *SchemaValidator) commonValidator() valueValidator { return &basicCommonValidator{ - Path: s.Path, - In: s.in, - Default: s.Schema.Default, - Enum: s.Schema.Enum, + Path: s.Path, + In: s.in, + Enum: s.Schema.Enum, } } @@ -155,7 +187,6 @@ func (s *SchemaValidator) stringValidator() valueValidator { return &stringValidator{ Path: s.Path, In: s.in, - Default: s.Schema.Default, MaxLength: s.Schema.MaxLength, MinLength: s.Schema.MinLength, Pattern: s.Schema.Pattern, @@ -164,9 +195,8 @@ func (s *SchemaValidator) stringValidator() valueValidator { func (s *SchemaValidator) formatValidator() valueValidator { return &formatValidator{ - Path: s.Path, - In: s.in, - //Default: s.Schema.Default, + Path: s.Path, + In: s.in, Format: s.Schema.Format, KnownFormats: s.KnownFormats, } diff --git a/deps/github.com/go-openapi/validate/schema_props.go b/deps/github.com/go-openapi/validate/schema_props.go index feff6d6a3..5d8ed4045 100644 --- a/deps/github.com/go-openapi/validate/schema_props.go +++ b/deps/github.com/go-openapi/validate/schema_props.go @@ -15,6 +15,7 @@ package validate import ( + "log" "reflect" "github.com/go-openapi/errors" @@ -80,12 +81,15 @@ func newSchemaPropsValidator(path string, in string, allOf, oneOf, anyOf []spec. func (s *schemaPropsValidator) Applies(source interface{}, kind reflect.Kind) bool { r := reflect.TypeOf(source) == specSchemaType - // fmt.Printf("schema props validator for %q applies %t for %T (kind: %v)\n", s.Path, r, source, kind) + if Debug { + log.Printf("schema props validator for %q applies %t for %T (kind: %v)\n", s.Path, r, source, kind) + } return r } func (s *schemaPropsValidator) Validate(data interface{}) *Result { mainResult := new(Result) + var firstSuccess *Result if len(s.anyOfValidators) > 0 { var bestFailures *Result succeededOnce := false @@ -94,6 +98,9 @@ func (s *schemaPropsValidator) Validate(data interface{}) *Result { if result.IsValid() { bestFailures = nil succeededOnce = true + if firstSuccess == nil { + firstSuccess = result + } break } if bestFailures == nil || result.MatchCount > bestFailures.MatchCount { @@ -106,11 +113,14 @@ func (s *schemaPropsValidator) Validate(data interface{}) *Result { } if bestFailures != nil { mainResult.Merge(bestFailures) + } else if firstSuccess != nil { + mainResult.Merge(firstSuccess) } } if len(s.oneOfValidators) > 0 { var bestFailures *Result + var firstSuccess *Result validated := 0 for _, oneOfSchema := range s.oneOfValidators { @@ -118,6 +128,9 @@ func (s *schemaPropsValidator) Validate(data interface{}) *Result { if result.IsValid() { validated++ bestFailures = nil + if firstSuccess == nil { + firstSuccess = result + } continue } if validated == 0 && (bestFailures == nil || result.MatchCount > bestFailures.MatchCount) { @@ -130,6 +143,8 @@ func (s *schemaPropsValidator) Validate(data interface{}) *Result { if bestFailures != nil { mainResult.Merge(bestFailures) } + } else if firstSuccess != nil { + mainResult.Merge(firstSuccess) } } diff --git a/deps/github.com/go-openapi/validate/slice_validator.go b/deps/github.com/go-openapi/validate/slice_validator.go index 837106153..2665a0ffe 100644 --- a/deps/github.com/go-openapi/validate/slice_validator.go +++ b/deps/github.com/go-openapi/validate/slice_validator.go @@ -67,6 +67,9 @@ func (s *schemaSliceValidator) Validate(data interface{}) *Result { itemsSize = int64(len(s.Items.Schemas)) for i := int64(0); i < itemsSize; i++ { validator := NewSchemaValidator(&s.Items.Schemas[i], s.Root, fmt.Sprintf("%s.%d", s.Path, i), s.KnownFormats) + if val.Len() <= int(i) { + break + } result.Merge(validator.Validate(val.Index(int(i)).Interface())) } diff --git a/deps/github.com/go-openapi/validate/spec.go b/deps/github.com/go-openapi/validate/spec.go index 938bc5bf9..2f1d70286 100644 --- a/deps/github.com/go-openapi/validate/spec.go +++ b/deps/github.com/go-openapi/validate/spec.go @@ -19,6 +19,7 @@ import ( "fmt" "log" "regexp" + "strconv" "strings" "github.com/go-openapi/analysis" @@ -193,6 +194,13 @@ func (s *SpecValidator) validateDuplicatePropertyNames() *Result { return res } +func (s *SpecValidator) resolveRef(ref *spec.Ref) (*spec.Schema, error) { + if s.spec.SpecFilePath() != "" { + return spec.ResolveRefWithBase(s.spec.Spec(), ref, &spec.ExpandOptions{RelativeBase: s.spec.SpecFilePath()}) + } + return spec.ResolveRef(s.spec.Spec(), ref) +} + func (s *SpecValidator) validateSchemaPropertyNames(nm string, sch spec.Schema, knowns map[string]struct{}) []dupProp { var dups []dupProp @@ -200,7 +208,7 @@ func (s *SpecValidator) validateSchemaPropertyNames(nm string, sch spec.Schema, schc := &sch for schc.Ref.String() != "" { // gather property names - reso, err := spec.ResolveRef(s.spec.Spec(), &schc.Ref) + reso, err := s.resolveRef(&schc.Ref) if err != nil { panic(err) } @@ -236,7 +244,7 @@ func (s *SpecValidator) validateCircularAncestry(nm string, sch spec.Schema, kno schn := nm schc := &sch for schc.Ref.String() != "" { - reso, err := spec.ResolveRef(s.spec.Spec(), &schc.Ref) + reso, err := s.resolveRef(&schc.Ref) if err != nil { panic(err) } @@ -335,15 +343,15 @@ func (s *SpecValidator) validateSchemaItems(schema spec.Schema, prefix, opID str return errors.New(422, "%s for %q is a collection without an element type", prefix, opID) } - schemas := schema.Items.Schemas if schema.Items.Schema != nil { - schemas = []spec.Schema{*schema.Items.Schema} - } - for _, sch := range schemas { - if err := s.validateSchemaItems(sch, prefix, opID); err != nil { - return err + schema = *schema.Items.Schema + if _, err := regexp.Compile(schema.Pattern); err != nil { + return errors.New(422, "%s for %q has invalid items pattern: %q", prefix, opID, schema.Pattern) } + + return s.validateSchemaItems(schema, prefix, opID) } + return nil } @@ -524,8 +532,15 @@ func (s *SpecValidator) validateParameters() *Result { } var fromPath []string for _, i := range params { - fromPath = append(fromPath, knowns[i]) - knowns[i] = "!" + knownsi := knowns[i] + iparams := extractPathParams(knownsi) + if len(iparams) > 0 { + fromPath = append(fromPath, iparams...) + for _, iparam := range iparams { + knownsi = strings.Replace(knownsi, iparam, "!", 1) + } + knowns[i] = knownsi + } } knownPath := strings.Join(knowns, "/") if orig, ok := knownPaths[knownPath]; ok { @@ -544,7 +559,9 @@ func (s *SpecValidator) validateParameters() *Result { for pr.Ref.String() != "" { obj, _, err := pr.Ref.GetPointer().Get(sw) if err != nil { - log.Println(err) + if Debug { + log.Println(err) + } res.AddErrors(err) break PARAMETERS } @@ -575,6 +592,10 @@ func (s *SpecValidator) validateParameters() *Result { pr = obj.(spec.Parameter) } + if _, err := regexp.Compile(pr.Pattern); err != nil { + res.AddErrors(errors.New(422, "operation %q has invalid pattern in param %q: %q", op.ID, pr.Name, pr.Pattern)) + } + if pr.In == "body" { if firstBodyParam != "" { res.AddErrors(errors.New(422, "operation %q has more than 1 body param (accepted: %q, dropped: %q)", op.ID, firstBodyParam, pr.Name)) @@ -595,18 +616,35 @@ func (s *SpecValidator) validateParameters() *Result { func parsePath(path string) (segments []string, params []int) { for i, p := range strings.Split(path, "/") { segments = append(segments, p) - if len(p) > 0 && p[0] == '{' && p[len(p)-1] == '}' { + if d0 := strings.Index(p, "{"); d0 >= 0 && d0 < strings.Index(p, "}") { params = append(params, i) } } return } +func extractPathParams(segment string) (params []string) { + for { + d0 := strings.IndexByte(segment, '{') + if d0 < 0 { + break + } + d1 := strings.IndexByte(segment[d0:], '}') + if d1 > 0 { + params = append(params, segment[d0:d0+d1+1]) + } else { + break + } + segment = segment[d1:] + } + return params +} + func (s *SpecValidator) validateReferencesValid() *Result { // each reference must point to a valid object res := new(Result) for _, r := range s.analyzer.AllRefs() { - if !r.IsValidURI() { + if !r.IsValidURI(s.spec.SpecFilePath()) { res.AddErrors(errors.New(404, "invalid ref %q", r.String())) } } @@ -698,7 +736,9 @@ func (s *SpecValidator) validateDefaultValueValidAgainstSchema() *Result { } // check simple paramters first if param.Default != nil && param.Schema == nil { - //fmt.Println(param.Name, "in", param.In, "has a default without a schema") + if Debug { + log.Println(param.Name, "in", param.In, "has a default without a schema") + } // check param valid res.Merge(NewParamValidator(¶m, s.KnownFormats).Validate(param.Default)) } @@ -721,9 +761,15 @@ func (s *SpecValidator) validateDefaultValueValidAgainstSchema() *Result { if h.Items != nil { res.Merge(s.validateDefaultValueItemsAgainstSchema(nm, "header", &h, h.Items)) } + if _, err := regexp.Compile(h.Pattern); err != nil { + res.AddErrors(errors.New(422, "operation %q has invalid pattern in default header %q: %q", op.ID, nm, h.Pattern)) + } + } + if dr.Schema != nil { + res.Merge(s.validateDefaultValueSchemaAgainstSchema("default", "response", dr.Schema)) } } - for _, r := range op.Responses.StatusCodeResponses { + for code, r := range op.Responses.StatusCodeResponses { for nm, h := range r.Headers { if h.Default != nil { res.Merge(NewHeaderValidator(nm, &h, s.KnownFormats).Validate(h.Default)) @@ -731,6 +777,12 @@ func (s *SpecValidator) validateDefaultValueValidAgainstSchema() *Result { if h.Items != nil { res.Merge(s.validateDefaultValueItemsAgainstSchema(nm, "header", &h, h.Items)) } + if _, err := regexp.Compile(h.Pattern); err != nil { + res.AddErrors(errors.New(422, "operation %q has invalid pattern in %v's header %q: %q", op.ID, code, nm, h.Pattern)) + } + } + if r.Schema != nil { + res.Merge(s.validateDefaultValueSchemaAgainstSchema(strconv.Itoa(code), "response", r.Schema)) } } @@ -758,6 +810,9 @@ func (s *SpecValidator) validateDefaultValueSchemaAgainstSchema(path, in string, res.Merge(s.validateDefaultValueSchemaAgainstSchema(fmt.Sprintf("%s.items[%d]", path, i), in, &sch)) } } + if _, err := regexp.Compile(schema.Pattern); err != nil { + res.AddErrors(errors.New(422, "%s in %s has invalid pattern: %q", path, in, schema.Pattern)) + } if schema.AdditionalItems != nil && schema.AdditionalItems.Schema != nil { res.Merge(s.validateDefaultValueSchemaAgainstSchema(fmt.Sprintf("%s.additionalItems", path), in, schema.AdditionalItems.Schema)) } @@ -787,6 +842,9 @@ func (s *SpecValidator) validateDefaultValueItemsAgainstSchema(path, in string, if items.Items != nil { res.Merge(s.validateDefaultValueItemsAgainstSchema(path+"[0]", in, root, items.Items)) } + if _, err := regexp.Compile(items.Pattern); err != nil { + res.AddErrors(errors.New(422, "%s in %s has invalid pattern: %q", path, in, items.Pattern)) + } } return res } diff --git a/deps/github.com/go-openapi/validate/type.go b/deps/github.com/go-openapi/validate/type.go index 0a5f4a293..3ae31f087 100644 --- a/deps/github.com/go-openapi/validate/type.go +++ b/deps/github.com/go-openapi/validate/type.go @@ -15,6 +15,7 @@ package validate import ( + "log" "reflect" "strings" @@ -32,16 +33,6 @@ type typeValidator struct { Path string } -var jsonTypeNames = map[string]struct{}{ - "array": struct{}{}, - "boolean": struct{}{}, - "integer": struct{}{}, - "null": struct{}{}, - "number": struct{}{}, - "object": struct{}{}, - "string": struct{}{}, -} - func (t *typeValidator) schemaInfoForType(data interface{}) (string, string) { switch data.(type) { case []byte: @@ -121,7 +112,9 @@ func (t *typeValidator) SetPath(path string) { func (t *typeValidator) Applies(source interface{}, kind reflect.Kind) bool { stpe := reflect.TypeOf(source) r := (len(t.Type) > 0 || t.Format != "") && (stpe == specSchemaType || stpe == specParameterType || stpe == specHeaderType) - //fmt.Printf("type validator for %q applies %t for %T (kind: %v)\n", t.Path, r, source, kind) + if Debug { + log.Printf("type validator for %q applies %t for %T (kind: %v)\n", t.Path, r, source, kind) + } return r } @@ -140,7 +133,9 @@ func (t *typeValidator) Validate(data interface{}) *Result { kind := val.Kind() schType, format := t.schemaInfoForType(data) - //fmt.Println("path:", t.Path, "schType:", schType, "format:", format, "expType:", t.Type, "expFmt:", t.Format, "kind:", val.Kind().String()) + if Debug { + log.Println("path:", t.Path, "schType:", schType, "format:", format, "expType:", t.Type, "expFmt:", t.Format, "kind:", val.Kind().String()) + } isLowerInt := t.Format == "int64" && format == "int32" isLowerFloat := t.Format == "float64" && format == "float32" isFloatInt := schType == "number" && swag.IsFloat64AJSONInteger(val.Float()) && t.Type.Contains("integer") diff --git a/deps/github.com/go-openapi/validate/update-fixtures.sh b/deps/github.com/go-openapi/validate/update-fixtures.sh new file mode 100755 index 000000000..21b06e2b0 --- /dev/null +++ b/deps/github.com/go-openapi/validate/update-fixtures.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -eu -o pipefail +dir=$(git rev-parse --show-toplevel) +scratch=$(mktemp -d -t tmp.XXXXXXXXXX) + +function finish { + rm -rf "$scratch" +} +trap finish EXIT SIGHUP SIGINT SIGTERM + +cd "$scratch" +git clone https://github.com/json-schema-org/JSON-Schema-Test-Suite Suite +cp -r Suite/tests/draft4/* "$dir/fixtures/jsonschema_suite" +cp -a Suite/remotes "$dir/fixtures/jsonschema_suite" diff --git a/deps/github.com/go-openapi/validate/validator.go b/deps/github.com/go-openapi/validate/validator.go index 45675d28f..64a379fcd 100644 --- a/deps/github.com/go-openapi/validate/validator.go +++ b/deps/github.com/go-openapi/validate/validator.go @@ -16,6 +16,7 @@ package validate import ( "fmt" + "log" "reflect" "github.com/go-openapi/errors" @@ -156,8 +157,15 @@ func (b *basicCommonValidator) Applies(source interface{}, kind reflect.Kind) bo func (b *basicCommonValidator) Validate(data interface{}) (res *Result) { if len(b.Enum) > 0 { for _, enumValue := range b.Enum { - if data != nil && reflect.DeepEqual(enumValue, data) { - return nil + actualType := reflect.TypeOf(enumValue) + if actualType == nil { + continue + } + expectedValue := reflect.ValueOf(data) + if expectedValue.IsValid() && expectedValue.Type().ConvertibleTo(actualType) { + if reflect.DeepEqual(expectedValue.Convert(actualType).Interface(), enumValue) { + return nil + } } } return sErr(errors.EnumFail(b.Path, b.In, data, b.Enum)) @@ -474,10 +482,14 @@ func (n *numberValidator) Applies(source interface{}, kind reflect.Kind) bool { isInt := kind >= reflect.Int && kind <= reflect.Uint64 isFloat := kind == reflect.Float32 || kind == reflect.Float64 r := isInt || isFloat - // fmt.Printf("schema props validator for %q applies %t for %T (kind: %v)\n", n.Path, r, source, kind) + if Debug { + log.Printf("schema props validator for %q applies %t for %T (kind: %v)\n", n.Path, r, source, kind) + } return r } - // fmt.Printf("schema props validator for %q applies %t for %T (kind: %v)\n", n.Path, false, source, kind) + if Debug { + log.Printf("schema props validator for %q applies %t for %T (kind: %v)\n", n.Path, false, source, kind) + } return false } @@ -536,15 +548,22 @@ func (s *stringValidator) Applies(source interface{}, kind reflect.Kind) bool { switch source.(type) { case *spec.Parameter, *spec.Schema, *spec.Items, *spec.Header: r := kind == reflect.String - // fmt.Printf("string validator for %q applies %t for %T (kind: %v)\n", s.Path, r, source, kind) + if Debug { + log.Printf("string validator for %q applies %t for %T (kind: %v)\n", s.Path, r, source, kind) + } return r } - // fmt.Printf("string validator for %q applies %t for %T (kind: %v)\n", s.Path, false, source, kind) + if Debug { + log.Printf("string validator for %q applies %t for %T (kind: %v)\n", s.Path, false, source, kind) + } return false } func (s *stringValidator) Validate(val interface{}) *Result { - data := val.(string) + data, ok := val.(string) + if !ok { + return sErr(errors.InvalidType(s.Path, s.In, "string", val)) + } if s.Required && !s.AllowEmptyValue && (s.Default == nil || s.Default == "") { if err := RequiredString(s.Path, s.In, data); err != nil { diff --git a/deps/github.com/go-openapi/validate/values.go b/deps/github.com/go-openapi/validate/values.go index ab5ce8af5..67895d1ec 100644 --- a/deps/github.com/go-openapi/validate/values.go +++ b/deps/github.com/go-openapi/validate/values.go @@ -196,7 +196,11 @@ func MinimumUint(path, in string, data, min uint64, exclusive bool) *errors.Vali // MultipleOf validates if the provided number is a multiple of the factor func MultipleOf(path, in string, data, factor float64) *errors.Validation { - if !swag.IsFloat64AJSONInteger(data / factor) { + mult := data / factor + if factor < 1 { + mult = 1 / factor * data + } + if !swag.IsFloat64AJSONInteger(mult) { return errors.NotMultipleOf(path, in, factor) } return nil diff --git a/deps/github.com/go-webpack/webpack/.gitignore b/deps/github.com/go-webpack/webpack/.gitignore deleted file mode 100644 index dd2ab18dd..000000000 --- a/deps/github.com/go-webpack/webpack/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/examples/node_modules -/examples/public/webpack -/examples-statsplugin/node_modules -/examples-statsplugin/public/webpack diff --git a/deps/github.com/go-webpack/webpack/LICENSE.txt b/deps/github.com/go-webpack/webpack/LICENSE.txt deleted file mode 100644 index 31bceba6a..000000000 --- a/deps/github.com/go-webpack/webpack/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2017 glebtv - -MIT License - -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/deps/github.com/go-webpack/webpack/README.md b/deps/github.com/go-webpack/webpack/README.md deleted file mode 100644 index 513b5c55b..000000000 --- a/deps/github.com/go-webpack/webpack/README.md +++ /dev/null @@ -1,202 +0,0 @@ -## go-webpack - -[![GoDoc](https://godoc.org/github.com/go-webpack/webpack?status.svg)](https://godoc.org/github.com/go-webpack/webpack) -[![Go Report Card](https://goreportcard.com/badge/github.com/go-webpack/webpack)](https://goreportcard.com/report/github.com/go-webpack/webpack) - -This module allows proper integration with webpack, with support for proper assets reloading in development and asset hashes for production caching. - -This module is compatible with both webpack 3.0, 2.0 and 1.0. Example config file is for 3.0. - -## Changelog - -#### Version 1.1 - -- 2018-02-13 Move examples to [separate repo](https://github.com/go-webpack/examples) -- 2018-02-09 Refactor & cleanup code, add support for ManifestPlugin instead of outdated StatsPlugin (see new examples) -- 2017-08-09 Now reports if you didn't call webpack.Init() to set working mode properly - -#### Version 1.0 - -- 2017-03-07 Initial version / extraction - -#### Usage with QOR / Gin -##### main.go -```golang -import ( - ... - "github.com/go-webpack/webpack" -) -func main() { - is_dev := flag.Bool("dev", false, "development mode") - flag.Parse() - webpack.DevHost = "localhost:3808" // default - webpack.Plugin = "manifest" // defaults to stats for compatability - // webpack.IgnoreMissing = true // ignore assets not present in manifest - webpack.Init(*is_dev) - ... -} -``` - -##### controller.go (qor) -```golang -package controllers - -import ( - "github.com/qor/render" - "github.com/gin-gonic/gin" - "github.com/go-webpack/webpack" -) - -var Render *render.Render - -func init() { - Render = render.New() -} - -func ViewHelpers() map[string]interface{} { - return map[string]interface{}{"asset": webpack.AssetHelper} -} - -func HomeIndex(ctx *gin.Context) { - Render.Funcs(ViewHelpers()).Execute( - "home_index", - gin.H{}, - ctx.Request, - ctx.Writer, - ) -} -``` - -##### alternate controller/route (gin / eztemplate) - -```golang -import ( - "github.com/gin-gonic/gin" - eztemplate "github.com/michelloworld/ez-gin-template" -) -r = gin.Default() -render := eztemplate.New() -render.TemplateFuncMap = template.FuncMap{ - "asset": webpack.AssetHelper, -} -r.HTMLRender = render.Init() -``` - -##### layouts/application.tmpl - -```html - - - - - {{ asset "vendor.css" }} - {{ asset "application.css" }} - - -
- {{render .Template}} -
- {{ asset "vendor.js" }} - {{ asset "application.js" }} - - -``` - -#### Usage with Iris - -##### main.go - -```golang -import ( - "github.com/go-webpack/webpack" - iris "gopkg.in/kataras/iris.v6" - "gopkg.in/kataras/iris.v6/adaptors/httprouter" -) - -func main() { - is_dev := flag.Bool("dev", false, "development mode") - flag.Parse() - webpack.Plugin = "manifest" - webpack.Init(*is_dev) - view := view.HTML("./templates", ".html") - view = view.Layout("layout.html") - view = view.Funcs(map[string]interface{}{"asset": webpack.AssetHelper}) - app.Adapt(view.Reload(*is_dev)) - - app.Adapt(httprouter.New()) -} -``` - -##### templates/layout.html -```html - - - - - -{{ asset "vendor.css" }} -{{ asset "application.css" }} - - -{{ yield }} -{{ asset "vendor.js" }} -{{ asset "application.js" }} -``` - -#### Usage with other frameworks - -- Configure webpack to serve manifest.json via ~~StatsPlugin~~ ManifestPlugin -- Call ```webpack.Plugin = "manifest"``` to set go-webpack to use ManifestPlugin, don't call to use old StatsPlugin -- Call ```webpack.Init()``` to set development or production mode. -- Add webpack.AssetHelper to your template functions. -- Call helper function with the name of your asset - -Use webpack.config.js (and package.json) from this repo or create your own. - -The only thing that must be present in your webpack config is ~~StatsPlugin~~ ManifestPlugin which is required to serve assets the proper way with hashes, etc. - -Your compiled assets is expected to be at public/webpack and your webpack-dev-server at http://localhost:3808 - -When run with -dev flag, webpack asset manifest is loaded from http://localhost:3808/webpack/manifest.json, and updated automatically on every request. When running in production from public/webpack/manifest.json and is persistently cached in memory for performance reasons. - -#### Running examples - -Exapmles moved to separate repo [here](https://github.com/go-webpack/examples) - -``` -cd examples -yarn install # or npm install -# for development mode -./node_modules/.bin/webpack-dev-server --config webpack.config.js --hot --inline -# Or for production mode -./node_modules/.bin/webpack --config webpack.config.js --bail -go get -go run iris/main.go -dev -go run qor/main.go -dev -``` - -If all is working, you will see a JS alert message. - -#### Compiling assets for production - -``` -NODE_ENV=production ./node_modules/.bin/webpack --config webpack.config.js -``` -Don't forget to set go-webpack to production mode (webpack.Init(false)) - -#### Additional settings - -var DevHost = "localhost:3808" - webpack-dev-server host:port -var FsPath = "public/webpack" - filesystem path to public webpack dir -var WebPath = "webpack" - http path to public webpack dir -var Plugin = "stats" - webpack plugin to use, can be stats or manifest -var IgnoreMissing = true - ignore assets missing on manifest or fail on them -var Verbose = true - print error messages to console (even if error is ignored) - -#### License - -Copyright (c) 2017 glebtv - -MIT License - - diff --git a/deps/github.com/go-webpack/webpack/helper/helper.go b/deps/github.com/go-webpack/webpack/helper/helper.go deleted file mode 100644 index 83a9a0570..000000000 --- a/deps/github.com/go-webpack/webpack/helper/helper.go +++ /dev/null @@ -1,30 +0,0 @@ -package helper - -import ( - "html" - "log" -) - -// LinkTag make css link tag from url -func LinkTag(url string) string { - return `` -} - -// ScriptTag make js script tag from url -func ScriptTag(url string) string { - return `` -} - -// AssetTag make js or css tag from url -func AssetTag(kind, url string) string { - var buf string - if kind == "css" { - buf = LinkTag(url) - } else if kind == "js" { - buf = ScriptTag(url) - } else { - log.Println("go-webpack: unsupported asset kind: " + kind) - buf = "" - } - return buf -} diff --git a/deps/github.com/go-webpack/webpack/reader/manifest/manifest.go b/deps/github.com/go-webpack/webpack/reader/manifest/manifest.go deleted file mode 100644 index 5bb755064..000000000 --- a/deps/github.com/go-webpack/webpack/reader/manifest/manifest.go +++ /dev/null @@ -1,28 +0,0 @@ -package manifest - -import ( - "encoding/json" - "io/ioutil" - "strings" - - "github.com/pkg/errors" -) - -// Read webpack-manifest-plugin format manifest -func Read(path string) (map[string][]string, error) { - assets := make(map[string][]string, 0) - data, err := ioutil.ReadFile("./public/webpack/manifest.json") - if err != nil { - return assets, errors.Wrap(err, "go-webpack: Error when loading manifest from file") - } - - response := make(map[string]string, 0) - json.Unmarshal(data, &response) - for key, value := range response { - //log.Println("found asset", key, value) - if !strings.Contains(value, ".map") { - assets[key] = []string{value} - } - } - return assets, nil -} diff --git a/deps/github.com/go-webpack/webpack/reader/reader.go b/deps/github.com/go-webpack/webpack/reader/reader.go deleted file mode 100644 index 286109690..000000000 --- a/deps/github.com/go-webpack/webpack/reader/reader.go +++ /dev/null @@ -1,21 +0,0 @@ -package reader - -import ( - "errors" - - "github.com/go-webpack/webpack/reader/manifest" - "github.com/go-webpack/webpack/reader/stats" -) - -// Read webpack asset manifest -func Read(plugin, host, fsPath, webPath string, isDev bool) (map[string][]string, error) { - //log.Println("read", plugin, isDev) - if plugin == "stats" { - return stats.Read(isDev, host, fsPath, webPath) - } else if plugin == "manifest" { - return manifest.Read(fsPath) - } else { - return map[string][]string{}, errors.New("go-webpack: bad plugin type") - } - -} diff --git a/deps/github.com/go-webpack/webpack/reader/stats/fetch.go b/deps/github.com/go-webpack/webpack/reader/stats/fetch.go deleted file mode 100644 index b64e6a0b3..000000000 --- a/deps/github.com/go-webpack/webpack/reader/stats/fetch.go +++ /dev/null @@ -1,43 +0,0 @@ -package stats - -import ( - "fmt" - "io/ioutil" - "net/http" - - "github.com/pkg/errors" -) - -func getURL(url string) (string, error) { - resp, err := http.Get(url) - if err != nil { - return "", err - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return "", fmt.Errorf("go-webpack: Unexpected status code: %d. Expecting %d", resp.StatusCode, http.StatusOK) - } - - body, err := ioutil.ReadAll(resp.Body) - return string(body), err -} - -func devManifest(host, webPath string) ([]byte, error) { - manifestURL := fmt.Sprint("http://", host, "/", webPath, "/manifest.json") - body, err := getURL(manifestURL) - if err != nil { - return []byte{}, errors.Wrap(err, fmt.Sprintf("go-webpack: Error when loading manifest from url %s", manifestURL)) - - } - return []byte(body), nil -} - -func prodManifest(fsPath string) ([]byte, error) { - manifestPath := "./" + fsPath + "/manifest.json" - body, err := ioutil.ReadFile(manifestPath) - if err != nil { - return []byte{}, errors.Wrap(err, fmt.Sprintf("go-webpack: Error when loading manifest from file %s", manifestPath)) - } - return body, nil -} diff --git a/deps/github.com/go-webpack/webpack/reader/stats/response.go b/deps/github.com/go-webpack/webpack/reader/stats/response.go deleted file mode 100644 index 1573ec59a..000000000 --- a/deps/github.com/go-webpack/webpack/reader/stats/response.go +++ /dev/null @@ -1,13 +0,0 @@ -package stats - -import "encoding/json" - -type statsResponse struct { - Errors []string `json:"errors"` - Warning []string `json:"warnings"` - Version string `json:"version"` - Hash string `json:"hash"` - PublicPath string `json:"publicPath"` - AssetsByChunkName map[string]*json.RawMessage `json:"assetsByChunkName"` - Assets []*json.RawMessage `json:"assets"` -} diff --git a/deps/github.com/go-webpack/webpack/reader/stats/stats.go b/deps/github.com/go-webpack/webpack/reader/stats/stats.go deleted file mode 100644 index 3b370b7dd..000000000 --- a/deps/github.com/go-webpack/webpack/reader/stats/stats.go +++ /dev/null @@ -1,64 +0,0 @@ -package stats - -import ( - "encoding/json" - "fmt" - "strings" - - "github.com/go-webpack/webpack/util" - "github.com/pkg/errors" -) - -// Read stats plugin manifest from HTTP for development or from file for production -func Read(isDev bool, host, fsPath, webPath string) (map[string][]string, error) { - //log.Println("stats reads", isDev) - var data []byte - var err error - - if isDev { - data, err = devManifest(host, webPath) - } else { - data, err = prodManifest(fsPath) - } - - if err != nil { - return map[string][]string{}, errors.Wrap(err, "go-webpack: Error reading manifest") - } - - return parseManifest(data) -} - -// ParseManifest Get webpack manifest according to current environment -func parseManifest(data []byte) (map[string][]string, error) { - var err error - - resp := statsResponse{} - err = json.Unmarshal(data, &resp) - if err != nil { - return map[string][]string{}, errors.Wrap(err, "go-webpack: Error parsing manifest - json decode") - } - webpackBase := resp.PublicPath - //log.Println("webpackBase", webpackBase) - - assets := make(map[string][]string, len(resp.AssetsByChunkName)) - - for akey, aval := range resp.AssetsByChunkName { - var d []string - err = json.Unmarshal(*aval, &d) - if err != nil { - return assets, errors.Wrap(err, fmt.Sprintf("go-webpack: Error when parsing manifest for %s: %s %s", akey, err, string(*aval))) - } - for i, v := range d { - d[i] = webpackBase + v - } - - assets[akey+".js"] = util.Filter(d, func(v string) bool { - return strings.HasSuffix(v, ".js") - }) - - assets[akey+".css"] = util.Filter(d, func(v string) bool { - return strings.HasSuffix(v, ".css") - }) - } - return assets, nil -} diff --git a/deps/github.com/go-webpack/webpack/util/util.go b/deps/github.com/go-webpack/webpack/util/util.go deleted file mode 100644 index 671e25ca3..000000000 --- a/deps/github.com/go-webpack/webpack/util/util.go +++ /dev/null @@ -1,12 +0,0 @@ -package util - -// Filter array of strings by function -func Filter(vs []string, f func(string) bool) []string { - vsf := make([]string, 0) - for _, v := range vs { - if f(v) { - vsf = append(vsf, v) - } - } - return vsf -} diff --git a/deps/github.com/go-webpack/webpack/webpack.go b/deps/github.com/go-webpack/webpack/webpack.go deleted file mode 100644 index 37e85ddd1..000000000 --- a/deps/github.com/go-webpack/webpack/webpack.go +++ /dev/null @@ -1,98 +0,0 @@ -package webpack - -import ( - "errors" - "html/template" - "log" - "strings" - - "github.com/go-webpack/webpack/helper" - "github.com/go-webpack/webpack/reader" -) - -// DevHost webpack-dev-server host:port -var DevHost = "localhost:3808" - -// FsPath filesystem path to public webpack dir -var FsPath = "public/webpack" - -// WebPath http path to public webpack dir -var WebPath = "webpack" - -// Plugin webpack plugin to use, can be stats or manifest -var Plugin = "stats" - -// IgnoreMissing ignore assets missing on manifest or fail on them -var IgnoreMissing = true - -// Verbose error messages to console (even if error is ignored) -var Verbose = true - -var isDev = false -var initDone = false -var preloadedAssets map[string][]string - -func readManifest() (map[string][]string, error) { - return reader.Read(Plugin, DevHost, FsPath, WebPath, isDev) -} - -// Init Set current environment and preload manifest -func Init(dev bool) { - var err error - isDev = dev - if isDev { - // Try to preload manifest, so we can show an error if webpack-dev-server is not running - _, err = readManifest() - } else { - preloadedAssets, err = readManifest() - } - if err != nil { - log.Println(err) - } - initDone = true -} - -// AssetHelper renders asset tag with url from webpack manifest to the page -func AssetHelper(key string) (template.HTML, error) { - var err error - - if !initDone { - return "", errors.New("Please call webpack.Init() first (see readme)") - } - - var assets map[string][]string - if isDev { - assets, err = readManifest() - if err != nil { - return template.HTML(""), err - } - } else { - assets = preloadedAssets - } - - parts := strings.Split(key, ".") - kind := parts[len(parts)-1] - //log.Println("showing assets:", key, parts, kind) - - v, ok := assets[key] - if !ok { - message := "go-webpack: Asset file '" + key + "' not found in manifest" - if Verbose { - log.Printf("%s. Manifest contents: %+v", message, assets) - } - if IgnoreMissing { - return template.HTML(""), nil - } - return template.HTML(""), errors.New(message) - } - - buf := []string{} - for _, s := range v { - if strings.HasSuffix(s, "."+kind) { - buf = append(buf, helper.AssetTag(kind, s)) - } else { - log.Println("skip asset", s, ": bad type") - } - } - return template.HTML(strings.Join(buf, "\n")), nil -} diff --git a/deps/github.com/gogo/protobuf/.gitignore b/deps/github.com/gogo/protobuf/.gitignore new file mode 100644 index 000000000..82f4de4a5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/.gitignore @@ -0,0 +1,6 @@ +._* +*.js +*.js.map + +# Conformance test output and transient files. +conformance/failing_tests.txt \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/.mailmap b/deps/github.com/gogo/protobuf/.mailmap new file mode 100644 index 000000000..bc0010219 --- /dev/null +++ b/deps/github.com/gogo/protobuf/.mailmap @@ -0,0 +1,8 @@ +Walter Schulze Walter Schulze +Walter Schulze +Walter Schulze awalterschulze +Walter Schulze awalterschulze@gmail.com +John Tuley +Anton Povarov +Denis Smirnov dennwc +DongYun Kang \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/.travis.yml b/deps/github.com/gogo/protobuf/.travis.yml new file mode 100644 index 000000000..8ec6af6a0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/.travis.yml @@ -0,0 +1,22 @@ +apt: + update: true + +env: + - PROTOBUF_VERSION=2.6.1 + - PROTOBUF_VERSION=3.0.2 + - PROTOBUF_VERSION=3.5.1 + +before_install: + - ./install-protobuf.sh + - PATH=/home/travis/bin:$PATH protoc --version + +script: + - PATH=/home/travis/bin:$PATH make buildserverall + - echo $TRAVIS_GO_VERSION + - if [[ "$PROTOBUF_VERSION" == "3.5.1" ]] && [[ "$TRAVIS_GO_VERSION" == "1.10.x" ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi + +language: go + +go: + - 1.9.x + - 1.10.x diff --git a/deps/github.com/gogo/protobuf/AUTHORS b/deps/github.com/gogo/protobuf/AUTHORS index 2eaf4d53a..3d97fc7a2 100644 --- a/deps/github.com/gogo/protobuf/AUTHORS +++ b/deps/github.com/gogo/protobuf/AUTHORS @@ -10,5 +10,6 @@ # Please keep the list sorted. +Sendgrid, Inc Vastech SA (PTY) LTD Walter Schulze diff --git a/deps/github.com/gogo/protobuf/CONTRIBUTORS b/deps/github.com/gogo/protobuf/CONTRIBUTORS index 84a85b1e8..1b4f6c208 100644 --- a/deps/github.com/gogo/protobuf/CONTRIBUTORS +++ b/deps/github.com/gogo/protobuf/CONTRIBUTORS @@ -1,4 +1,5 @@ Anton Povarov +Brian Goff Clayton Coleman Denis Smirnov DongYun Kang @@ -10,9 +11,13 @@ John Shahid John Tuley Laurent Patrick Lee +Peter Edge +Roger Johansson +Sam Nguyen Sergio Arbeo Stephen J Day Tamir Duberstein Todd Eisenberger Tormod Erevik Lea +Vyacheslav Kim Walter Schulze diff --git a/deps/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS b/deps/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS new file mode 100644 index 000000000..b368efb7f --- /dev/null +++ b/deps/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS @@ -0,0 +1,5 @@ +The contributors to the Go protobuf repository: + +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/LICENSE b/deps/github.com/gogo/protobuf/LICENSE index 7be0cc7b6..f57de90da 100644 --- a/deps/github.com/gogo/protobuf/LICENSE +++ b/deps/github.com/gogo/protobuf/LICENSE @@ -1,7 +1,6 @@ -Protocol Buffers for Go with Gadgets - Copyright (c) 2013, The GoGo Authors. All rights reserved. -http://github.com/gogo/protobuf + +Protocol Buffers for Go with Gadgets Go support for Protocol Buffers - Google's data interchange format diff --git a/deps/github.com/gogo/protobuf/Makefile b/deps/github.com/gogo/protobuf/Makefile new file mode 100644 index 000000000..604dea5b8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/Makefile @@ -0,0 +1,178 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +GO_VERSION:=$(shell go version) + +# Skip known issues from purego tests +# https://github.com/gogo/protobuf/issues/447 +# https://github.com/gogo/protobuf/issues/448 +SKIPISSUE:="/jsonpb|/test/casttype/|/test/oneof/combos/" + +.PHONY: nuke regenerate tests clean install gofmt vet contributors + +all: clean install regenerate install tests errcheck vet + +buildserverall: clean install regenerate install tests vet js purego + +install: + go install ./proto + go install ./gogoproto + go install ./jsonpb + go install ./protoc-gen-gogo + go install ./protoc-gen-gofast + go install ./protoc-gen-gogofast + go install ./protoc-gen-gogofaster + go install ./protoc-gen-gogoslick + go install ./protoc-gen-gostring + go install ./protoc-min-version + go install ./protoc-gen-combo + go install ./gogoreplace + +clean: + go clean ./... + +nuke: + go clean -i ./... + +gofmt: + gofmt -l -s -w . + +regenerate: + make -C protoc-gen-gogo regenerate + make -C gogoproto regenerate + make -C proto/test_proto regenerate + make -C proto/proto3_proto regenerate + make -C jsonpb/jsonpb_test_proto regenerate + make -C conformance regenerate + make -C protobuf regenerate + make -C test regenerate + make -C test/example regenerate + make -C test/unrecognized regenerate + make -C test/group regenerate + make -C test/unrecognizedgroup regenerate + make -C test/enumstringer regenerate + make -C test/unmarshalmerge regenerate + make -C test/moredefaults regenerate + make -C test/issue8 regenerate + make -C test/enumprefix regenerate + make -C test/enumcustomname regenerate + make -C test/packed regenerate + make -C test/protosize regenerate + make -C test/tags regenerate + make -C test/oneof regenerate + make -C test/oneof3 regenerate + make -C test/theproto3 regenerate + make -C test/mapdefaults regenerate + make -C test/mapsproto2 regenerate + make -C test/issue42order regenerate + make -C proto generate-test-pbs + make -C test/importdedup regenerate + make -C test/importduplicate regenerate + make -C test/custombytesnonstruct regenerate + make -C test/required regenerate + make -C test/casttype regenerate + make -C test/castvalue regenerate + make -C vanity/test regenerate + make -C test/sizeunderscore regenerate + make -C test/issue34 regenerate + make -C test/empty-issue70 regenerate + make -C test/indeximport-issue72 regenerate + make -C test/fuzztests regenerate + make -C test/oneofembed regenerate + make -C test/asymetric-issue125 regenerate + make -C test/filedotname regenerate + make -C test/nopackage regenerate + make -C test/types regenerate + make -C test/proto3extension regenerate + make -C test/stdtypes regenerate + make -C test/data regenerate + make -C test/typedecl regenerate + make -C test/issue260 regenerate + make -C test/issue261 regenerate + make -C test/issue262 regenerate + make -C test/issue312 regenerate + make -C test/enumdecl regenerate + make -C test/typedecl_all regenerate + make -C test/enumdecl_all regenerate + make -C test/int64support regenerate + make -C test/issue322 regenerate + make -C test/issue330 regenerate + make -C test/importcustom-issue389 regenerate + make -C test/merge regenerate + make -C test/cachedsize regenerate + make -C test/deterministic regenerate + make -C test/issue438 regenerate + make -C test/issue449 regenerate + make -C test/issue435 regenerate + make gofmt + +tests: + go build ./test/enumprefix + go test ./... + (cd test/stdtypes && make test) + +vet: + go vet ./... + go tool vet --shadow . + +errcheck: + go get github.com/kisielk/errcheck + errcheck ./test/... + +drone: + sudo apt-get install protobuf-compiler + (cd $(GOPATH)/src/github.com/gogo/protobuf && make buildserverall) + +testall: + go get -u github.com/golang/protobuf/proto + make -C protoc-gen-gogo test + make -C vanity/test test + make -C test/registration test + make -C conformance test + make -C test/issue427 test + make tests + +bench: + go get golang.org/x/tools/cmd/benchcmp + (cd test/mixbench && go build .) + ./test/mixbench/mixbench + +contributors: + git log --format='%aN <%aE>' | sort -fu > CONTRIBUTORS + +js: +ifeq (go1.10, $(findstring go1.10, $(GO_VERSION))) + go get -u github.com/gopherjs/gopherjs + gopherjs build github.com/gogo/protobuf/protoc-gen-gogo +endif + +purego: + go test -tags purego $$(go list ./... | grep -Ev $(SKIPISSUE)) + +update: + (cd protobuf && make update) diff --git a/deps/github.com/gogo/protobuf/README b/deps/github.com/gogo/protobuf/README new file mode 100644 index 000000000..623db054b --- /dev/null +++ b/deps/github.com/gogo/protobuf/README @@ -0,0 +1,304 @@ +Protocol Buffers for Go with Gadgets + +GoGoProtobuf http://github.com/gogo/protobuf extends +GoProtobuf http://github.com/golang/protobuf + +Copyright (c) 2013, The GoGo Authors. All rights reserved. + + +# Go support for Protocol Buffers + +Google's data interchange format. +Copyright 2010 The Go Authors. +https://github.com/golang/protobuf + +This package and the code it generates requires at least Go 1.6. + +This software implements Go bindings for protocol buffers. For +information about protocol buffers themselves, see + https://developers.google.com/protocol-buffers/ + +## Installation ## + +To use this software, you must: +- Install the standard C++ implementation of protocol buffers from + https://developers.google.com/protocol-buffers/ +- Of course, install the Go compiler and tools from + https://golang.org/ + See + https://golang.org/doc/install + for details or, if you are using gccgo, follow the instructions at + https://golang.org/doc/install/gccgo +- Grab the code from the repository and install the proto package. + The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`. + The compiler plugin, protoc-gen-go, will be installed in $GOBIN, + defaulting to $GOPATH/bin. It must be in your $PATH for the protocol + compiler, protoc, to find it. + +This software has two parts: a 'protocol compiler plugin' that +generates Go source files that, once compiled, can access and manage +protocol buffers; and a library that implements run-time support for +encoding (marshaling), decoding (unmarshaling), and accessing protocol +buffers. + +There is support for gRPC in Go using protocol buffers. +See the note at the bottom of this file for details. + +There are no insertion points in the plugin. + +GoGoProtobuf provides extensions for protocol buffers and GoProtobuf +see http://github.com/gogo/protobuf/gogoproto/doc.go + +## Using protocol buffers with Go ## + +Once the software is installed, there are two steps to using it. +First you must compile the protocol buffer definitions and then import +them, with the support library, into your program. + +To compile the protocol buffer definition, run protoc with the --gogo_out +parameter set to the directory you want to output the Go code to. + + protoc --gogo_out=. *.proto + +The generated files will be suffixed .pb.go. See the Test code below +for an example using such a file. + +## Packages and input paths ## + +The protocol buffer language has a concept of "packages" which does not +correspond well to the Go notion of packages. In generated Go code, +each source `.proto` file is associated with a single Go package. The +name and import path for this package is specified with the `go_package` +proto option: + + option go_package = "github.com/gogo/protobuf/types"; + +The protocol buffer compiler will attempt to derive a package name and +import path if a `go_package` option is not present, but it is +best to always specify one explicitly. + +There is a one-to-one relationship between source `.proto` files and +generated `.pb.go` files, but any number of `.pb.go` files may be +contained in the same Go package. + +The output name of a generated file is produced by replacing the +`.proto` suffix with `.pb.go` (e.g., `foo.proto` produces `foo.pb.go`). +However, the output directory is selected in one of two ways. Let +us say we have `inputs/x.proto` with a `go_package` option of +`github.com/golang/protobuf/p`. The corresponding output file may +be: + +- Relative to the import path: + + protoc --gogo_out=. inputs/x.proto + # writes ./github.com/gogo/protobuf/p/x.pb.go + + (This can work well with `--gogo_out=$GOPATH`.) + +- Relative to the input file: + + protoc --gogo_out=paths=source_relative:. inputs/x.proto + # generate ./inputs/x.pb.go + +## Generated code ## + +The package comment for the proto library contains text describing +the interface provided in Go for protocol buffers. Here is an edited +version. + +If you are using any gogo.proto extensions you will need to specify the +proto_path to include the descriptor.proto and gogo.proto. +gogo.proto is located in github.com/gogo/protobuf/gogoproto +This should be fine, since your import is the same. +descriptor.proto is located in either github.com/gogo/protobuf/protobuf +or code.google.com/p/protobuf/trunk/src/ +Its import is google/protobuf/descriptor.proto so it might need some help. + + protoc --gogo_out=. -I=.:github.com/gogo/protobuf/protobuf *.proto + +========== + +The proto package converts data structures to and from the +wire format of protocol buffers. It works in concert with the +Go source code generated for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + Helpers for getting values are superseded by the + GetFoo methods and their use is deprecated. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed with the enum's type name. Enum types have + a String method, and a Enum method to assist in message construction. + - Nested groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Enum types do not get an Enum method. + +Consider file test.proto, containing + +```proto + syntax = "proto2"; + package example; + + enum FOO { X = 17; }; + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + } +``` + +To create and play with a Test object from the example package, + +```go + package main + + import ( + "log" + + "github.com/gogo/protobuf/proto" + "path/to/example" + ) + + func main() { + test := &example.Test { + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &example.Test_OptionalGroup { + RequiredField: proto.String("good bye"), + }, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &example.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // etc. + } +``` + + +## Parameters ## + +To pass extra parameters to the plugin, use a comma-separated +parameter list separated from the output directory by a colon: + + + protoc --gogo_out=plugins=grpc,import_path=mypackage:. *.proto + +- `paths=(import | source_relative)` - specifies how the paths of + generated files are structured. See the "Packages and imports paths" + section above. The default is `import`. +- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to + load. The only plugin in this repo is `grpc`. +- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is + associated with Go package quux/shme. This is subject to the + import_prefix parameter. + +The following parameters are deprecated and should not be used: + +- `import_prefix=xxx` - a prefix that is added onto the beginning of + all imports. +- `import_path=foo/bar` - used as the package if no input files + declare `go_package`. If it contains slashes, everything up to the + rightmost slash is ignored. + +## gRPC Support ## + +If a proto file specifies RPC services, protoc-gen-go can be instructed to +generate code compatible with gRPC (http://www.grpc.io/). To do this, pass +the `plugins` parameter to protoc-gen-go; the usual way is to insert it into +the --go_out argument to protoc: + + protoc --gogo_out=plugins=grpc:. *.proto + +## Compatibility ## + +The library and the generated code are expected to be stable over time. +However, we reserve the right to make breaking changes without notice for the +following reasons: + +- Security. A security issue in the specification or implementation may come to + light whose resolution requires breaking compatibility. We reserve the right + to address such security issues. +- Unspecified behavior. There are some aspects of the Protocol Buffers + specification that are undefined. Programs that depend on such unspecified + behavior may break in future releases. +- Specification errors or changes. If it becomes necessary to address an + inconsistency, incompleteness, or change in the Protocol Buffers + specification, resolving the issue could affect the meaning or legality of + existing programs. We reserve the right to address such issues, including + updating the implementations. +- Bugs. If the library has a bug that violates the specification, a program + that depends on the buggy behavior may break if the bug is fixed. We reserve + the right to fix such bugs. +- Adding methods or fields to generated structs. These may conflict with field + names that already exist in a schema, causing applications to break. When the + code generator encounters a field in the schema that would collide with a + generated field or method name, the code generator will append an underscore + to the generated field or method name. +- Adding, removing, or changing methods or fields in generated structs that + start with `XXX`. These parts of the generated code are exported out of + necessity, but should not be considered part of the public API. +- Adding, removing, or changing unexported symbols in generated code. + +Any breaking changes outside of these will be announced 6 months in advance to +protobuf@googlegroups.com. + +You should, whenever possible, use generated code created by the `protoc-gen-go` +tool built at the same commit as the `proto` package. The `proto` package +declares package-level constants in the form `ProtoPackageIsVersionX`. +Application code and generated code may depend on one of these constants to +ensure that compilation will fail if the available version of the proto library +is too old. Whenever we make a change to the generated code that requires newer +library support, in the same commit we will increment the version number of the +generated code and declare a new package-level constant whose name incorporates +the latest version number. Removing a compatibility constant is considered a +breaking change and would be subject to the announcement policy stated above. + +The `protoc-gen-go/generator` package exposes a plugin interface, +which is used by the gRPC code generation. This interface is not +supported and is subject to incompatible changes without notice. diff --git a/deps/github.com/gogo/protobuf/Readme.md b/deps/github.com/gogo/protobuf/Readme.md new file mode 100644 index 000000000..88b5c03a1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/Readme.md @@ -0,0 +1,158 @@ +# Protocol Buffers for Go with Gadgets + +[![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf) + +gogoprotobuf is a fork of golang/protobuf with extra code generation features. + +This code generation is used to achieve: + + - fast marshalling and unmarshalling + - more canonical Go structures + - goprotobuf compatibility + - less typing by optionally generating extra helper code + - peace of mind by optionally generating test and benchmark code + - other serialization formats + +Keeping track of how up to date gogoprotobuf is relative to golang/protobuf is done in this +issue + +## Users + +These projects use gogoprotobuf: + + - etcd - blog - sample proto file + - spacemonkey - blog + - badoo - sample proto file + - mesos-go - sample proto file + - heka - the switch from golang/protobuf to gogo/protobuf when it was still on code.google.com + - cockroachdb - sample proto file + - go-ipfs - sample proto file + - rkive-go - sample proto file + - dropbox + - srclib - sample proto file + - adyoulike + - cloudfoundry - sample proto file + - kubernetes - go2idl built on top of gogoprotobuf + - dgraph - release notes - benchmarks + - centrifugo - release notes - blog + - docker swarmkit - sample proto file + - nats.io - go-nats-streaming + - tidb - Communication between tidb and tikv + - protoactor-go - vanity command that also generates actors from service definitions + - containerd - vanity command with custom field names that conforms to the golang convention. + - nakama + - proteus + - carbonzipper stack + - sendgrid + - zero-os/0-stor + - go-spacemesh + - cortex - sample proto file + - Apache SkyWalking APM - Istio telemetry receiver based on Mixer bypass protocol + +Please let us know if you are using gogoprotobuf by posting on our GoogleGroup. + +### Mentioned + + - Cloudflare - go serialization talk - Albert Strasheim + - GopherCon 2014 Writing High Performance Databases in Go by Ben Johnson + - alecthomas' go serialization benchmarks + - Go faster with gogoproto - Agniva De Sarker + - Evolution of protobuf (Gource Visualization) - Landon Wilkins + - Creating GopherJS Apps with gRPC-Web - Johan Brandhorst + - So you want to use GoGo Protobuf - Johan Brandhorst + - Advanced gRPC Error Usage - Johan Brandhorst + - gRPC Golang Course on Udemy - Stephane Maarek + +## Getting Started + +There are several ways to use gogoprotobuf, but for all you need to install go and protoc. +After that you can choose: + + - Speed + - More Speed and more generated code + - Most Speed and most customization + +### Installation + +To install it, you must first have Go (at least version 1.6.3 or 1.9 if you are using gRPC) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). +Latest patch versions of 1.9 and 1.10 are continuously tested. + +Next, install the standard protocol buffer implementation from [https://github.com/google/protobuf](https://github.com/google/protobuf). +Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.5.1 are continuously tested. + +### Speed + +Install the protoc-gen-gofast binary + + go get github.com/gogo/protobuf/protoc-gen-gofast + +Use it to generate faster marshaling and unmarshaling go code for your protocol buffers. + + protoc --gofast_out=. myproto.proto + +This does not allow you to use any of the other gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md). + +### More Speed and more generated code + +Fields without pointers cause less time in the garbage collector. +More code generation results in more convenient methods. + +Other binaries are also included: + + protoc-gen-gogofast (same as gofast, but imports gogoprotobuf) + protoc-gen-gogofaster (same as gogofast, without XXX_unrecognized, less pointer fields) + protoc-gen-gogoslick (same as gogofaster, but with generated string, gostring and equal methods) + +Installing any of these binaries is easy. Simply run: + + go get github.com/gogo/protobuf/proto + go get github.com/gogo/protobuf/{binary} + go get github.com/gogo/protobuf/gogoproto + +These binaries allow you to use gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md). You can also use your own binary. + +To generate the code, you also need to set the include path properly. + + protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --{binary}_out=. myproto.proto + +To use proto files from "google/protobuf" you need to add additional args to protoc. + + protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --{binary}_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \ + myproto.proto + +Note that in the protoc command, {binary} does not contain the initial prefix of "protoc-gen". + +### Most Speed and most customization + +Customizing the fields of the messages to be the fields that you actually want to use removes the need to copy between the structs you use and structs you use to serialize. +gogoprotobuf also offers more serialization formats and generation of tests and even more methods. + +Please visit the [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md) page for more documentation. + +Install protoc-gen-gogo: + + go get github.com/gogo/protobuf/proto + go get github.com/gogo/protobuf/jsonpb + go get github.com/gogo/protobuf/protoc-gen-gogo + go get github.com/gogo/protobuf/gogoproto + +## GRPC + +It works the same as golang/protobuf, simply specify the plugin. +Here is an example using gofast: + + protoc --gofast_out=plugins=grpc:. my.proto + +See [https://github.com/gogo/grpc-example](https://github.com/gogo/grpc-example) for an example of using gRPC with gogoprotobuf and the wider grpc-ecosystem. + + +## License +This software is licensed under the 3-Clause BSD License +("BSD License 2.0", "Revised BSD License", "New BSD License", or "Modified BSD License"). + + diff --git a/deps/github.com/gogo/protobuf/bench.md b/deps/github.com/gogo/protobuf/bench.md new file mode 100644 index 000000000..16da66ad2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/bench.md @@ -0,0 +1,190 @@ +# Benchmarks + +## How to reproduce + +For a comparison run: + + make bench + +followed by [benchcmp](http://code.google.com/p/go/source/browse/misc/benchcmp benchcmp) on the resulting files: + + $GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshaler.txt + $GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt + +Benchmarks ran on Revision: 11c56be39364 + +June 2013 + +Processor 2,66 GHz Intel Core i7 + +Memory 8 GB 1067 MHz DDR3 + +## Marshaler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold ns/opnew ns/opdelta
BenchmarkNidOptNativeProtoMarshal2656889-66.53%
BenchmarkNinOptNativeProtoMarshal26511015-61.71%
BenchmarkNidRepNativeProtoMarshal4266112519-70.65%
BenchmarkNinRepNativeProtoMarshal4230612354-70.80%
BenchmarkNidRepPackedNativeProtoMarshal3414811902-65.15%
BenchmarkNinRepPackedNativeProtoMarshal3337511969-64.14%
BenchmarkNidOptStructProtoMarshal71483727-47.86%
BenchmarkNinOptStructProtoMarshal69563481-49.96%
BenchmarkNidRepStructProtoMarshal4655119492-58.13%
BenchmarkNinRepStructProtoMarshal4671519043-59.24%
BenchmarkNidEmbeddedStructProtoMarshal52312050-60.81%
BenchmarkNinEmbeddedStructProtoMarshal46652000-57.13%
BenchmarkNidNestedStructProtoMarshal181106103604-42.79%
BenchmarkNinNestedStructProtoMarshal182053102069-43.93%
BenchmarkNidOptCustomProtoMarshal1209310-74.36%
BenchmarkNinOptCustomProtoMarshal1435277-80.70%
BenchmarkNidRepCustomProtoMarshal4126763-81.51%
BenchmarkNinRepCustomProtoMarshal3972769-80.64%
BenchmarkNinOptNativeUnionProtoMarshal973303-68.86%
BenchmarkNinOptStructUnionProtoMarshal1536521-66.08%
BenchmarkNinEmbeddedStructUnionProtoMarshal2327884-62.01%
BenchmarkNinNestedStructUnionProtoMarshal2070743-64.11%
BenchmarkTreeProtoMarshal1554838-46.07%
BenchmarkOrBranchProtoMarshal31562012-36.25%
BenchmarkAndBranchProtoMarshal31831996-37.29%
BenchmarkLeafProtoMarshal965606-37.20%
BenchmarkDeepTreeProtoMarshal23161283-44.60%
BenchmarkADeepBranchProtoMarshal27191492-45.13%
BenchmarkAndDeepBranchProtoMarshal46632922-37.34%
BenchmarkDeepLeafProtoMarshal18491016-45.05%
BenchmarkNilProtoMarshal43976-82.53%
BenchmarkNidOptEnumProtoMarshal514152-70.43%
BenchmarkNinOptEnumProtoMarshal550158-71.27%
BenchmarkNidRepEnumProtoMarshal647207-68.01%
BenchmarkNinRepEnumProtoMarshal662213-67.82%
BenchmarkTimerProtoMarshal934271-70.99%
BenchmarkMyExtendableProtoMarshal608185-69.57%
BenchmarkOtherExtenableProtoMarshal1112332-70.14%
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold MB/snew MB/sspeedup
BenchmarkNidOptNativeProtoMarshal126.86378.862.99x
BenchmarkNinOptNativeProtoMarshal114.27298.422.61x
BenchmarkNidRepNativeProtoMarshal164.25561.203.42x
BenchmarkNinRepNativeProtoMarshal166.10568.233.42x
BenchmarkNidRepPackedNativeProtoMarshal99.10283.972.87x
BenchmarkNinRepPackedNativeProtoMarshal101.30282.312.79x
BenchmarkNidOptStructProtoMarshal176.83339.071.92x
BenchmarkNinOptStructProtoMarshal163.59326.572.00x
BenchmarkNidRepStructProtoMarshal178.84427.492.39x
BenchmarkNinRepStructProtoMarshal178.70437.692.45x
BenchmarkNidEmbeddedStructProtoMarshal124.24317.562.56x
BenchmarkNinEmbeddedStructProtoMarshal132.03307.992.33x
BenchmarkNidNestedStructProtoMarshal192.91337.861.75x
BenchmarkNinNestedStructProtoMarshal192.44344.451.79x
BenchmarkNidOptCustomProtoMarshal29.77116.033.90x
BenchmarkNinOptCustomProtoMarshal22.29115.385.18x
BenchmarkNidRepCustomProtoMarshal35.14189.805.40x
BenchmarkNinRepCustomProtoMarshal36.50188.405.16x
BenchmarkNinOptNativeUnionProtoMarshal32.87105.393.21x
BenchmarkNinOptStructUnionProtoMarshal66.40195.762.95x
BenchmarkNinEmbeddedStructUnionProtoMarshal93.24245.262.63x
BenchmarkNinNestedStructUnionProtoMarshal57.49160.062.78x
BenchmarkTreeProtoMarshal137.64255.121.85x
BenchmarkOrBranchProtoMarshal137.80216.101.57x
BenchmarkAndBranchProtoMarshal136.64217.891.59x
BenchmarkLeafProtoMarshal214.48341.531.59x
BenchmarkDeepTreeProtoMarshal95.85173.031.81x
BenchmarkADeepBranchProtoMarshal82.73150.781.82x
BenchmarkAndDeepBranchProtoMarshal96.72153.981.59x
BenchmarkDeepLeafProtoMarshal117.34213.411.82x
BenchmarkNidOptEnumProtoMarshal3.8913.163.38x
BenchmarkNinOptEnumProtoMarshal1.826.303.46x
BenchmarkNidRepEnumProtoMarshal12.3638.503.11x
BenchmarkNinRepEnumProtoMarshal12.0837.533.11x
BenchmarkTimerProtoMarshal73.81253.873.44x
BenchmarkMyExtendableProtoMarshal13.1543.083.28x
BenchmarkOtherExtenableProtoMarshal24.2881.093.34x
+ +## Unmarshaler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold ns/opnew ns/opdelta
BenchmarkNidOptNativeProtoUnmarshal25211006-60.10%
BenchmarkNinOptNativeProtoUnmarshal25291750-30.80%
BenchmarkNidRepNativeProtoUnmarshal4906735299-28.06%
BenchmarkNinRepNativeProtoUnmarshal4799035456-26.12%
BenchmarkNidRepPackedNativeProtoUnmarshal2645623950-9.47%
BenchmarkNinRepPackedNativeProtoUnmarshal2649924037-9.29%
BenchmarkNidOptStructProtoUnmarshal68033873-43.07%
BenchmarkNinOptStructProtoUnmarshal67864154-38.79%
BenchmarkNidRepStructProtoUnmarshal5627631970-43.19%
BenchmarkNinRepStructProtoUnmarshal4875031832-34.70%
BenchmarkNidEmbeddedStructProtoUnmarshal45561973-56.69%
BenchmarkNinEmbeddedStructProtoUnmarshal44851975-55.96%
BenchmarkNidNestedStructProtoUnmarshal223395135844-39.19%
BenchmarkNinNestedStructProtoUnmarshal226446134022-40.82%
BenchmarkNidOptCustomProtoUnmarshal1859300-83.86%
BenchmarkNinOptCustomProtoUnmarshal1486402-72.95%
BenchmarkNidRepCustomProtoUnmarshal82291669-79.72%
BenchmarkNinRepCustomProtoUnmarshal82531649-80.02%
BenchmarkNinOptNativeUnionProtoUnmarshal840307-63.45%
BenchmarkNinOptStructUnionProtoUnmarshal1395639-54.19%
BenchmarkNinEmbeddedStructUnionProtoUnmarshal22971167-49.19%
BenchmarkNinNestedStructUnionProtoUnmarshal1820889-51.15%
BenchmarkTreeProtoUnmarshal1521720-52.66%
BenchmarkOrBranchProtoUnmarshal26691385-48.11%
BenchmarkAndBranchProtoUnmarshal26671420-46.76%
BenchmarkLeafProtoUnmarshal1171584-50.13%
BenchmarkDeepTreeProtoUnmarshal20651081-47.65%
BenchmarkADeepBranchProtoUnmarshal26951178-56.29%
BenchmarkAndDeepBranchProtoUnmarshal40551918-52.70%
BenchmarkDeepLeafProtoUnmarshal1758865-50.80%
BenchmarkNilProtoUnmarshal56463-88.79%
BenchmarkNidOptEnumProtoUnmarshal76273-90.34%
BenchmarkNinOptEnumProtoUnmarshal764163-78.66%
BenchmarkNidRepEnumProtoUnmarshal1078447-58.53%
BenchmarkNinRepEnumProtoUnmarshal1071479-55.28%
BenchmarkTimerProtoUnmarshal1128362-67.91%
BenchmarkMyExtendableProtoUnmarshal808217-73.14%
BenchmarkOtherExtenableProtoUnmarshal1233517-58.07%
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
benchmarkold MB/snew MB/sspeedup
BenchmarkNidOptNativeProtoUnmarshal133.67334.982.51x
BenchmarkNinOptNativeProtoUnmarshal119.77173.081.45x
BenchmarkNidRepNativeProtoUnmarshal143.23199.121.39x
BenchmarkNinRepNativeProtoUnmarshal146.07198.161.36x
BenchmarkNidRepPackedNativeProtoUnmarshal127.80141.041.10x
BenchmarkNinRepPackedNativeProtoUnmarshal127.55140.781.10x
BenchmarkNidOptStructProtoUnmarshal185.79326.311.76x
BenchmarkNinOptStructProtoUnmarshal167.68273.661.63x
BenchmarkNidRepStructProtoUnmarshal147.88260.391.76x
BenchmarkNinRepStructProtoUnmarshal171.20261.971.53x
BenchmarkNidEmbeddedStructProtoUnmarshal142.86329.422.31x
BenchmarkNinEmbeddedStructProtoUnmarshal137.33311.832.27x
BenchmarkNidNestedStructProtoUnmarshal154.97259.471.67x
BenchmarkNinNestedStructProtoUnmarshal154.32258.421.67x
BenchmarkNidOptCustomProtoUnmarshal19.36119.666.18x
BenchmarkNinOptCustomProtoUnmarshal21.5279.503.69x
BenchmarkNidRepCustomProtoUnmarshal17.6286.864.93x
BenchmarkNinRepCustomProtoUnmarshal17.5787.925.00x
BenchmarkNinOptNativeUnionProtoUnmarshal38.07104.122.73x
BenchmarkNinOptStructUnionProtoUnmarshal73.08159.542.18x
BenchmarkNinEmbeddedStructUnionProtoUnmarshal94.00185.921.98x
BenchmarkNinNestedStructUnionProtoUnmarshal65.35133.752.05x
BenchmarkTreeProtoUnmarshal141.28297.132.10x
BenchmarkOrBranchProtoUnmarshal162.56313.961.93x
BenchmarkAndBranchProtoUnmarshal163.06306.151.88x
BenchmarkLeafProtoUnmarshal176.72354.192.00x
BenchmarkDeepTreeProtoUnmarshal107.50205.301.91x
BenchmarkADeepBranchProtoUnmarshal83.48190.882.29x
BenchmarkAndDeepBranchProtoUnmarshal110.97234.602.11x
BenchmarkDeepLeafProtoUnmarshal123.40250.732.03x
BenchmarkNidOptEnumProtoUnmarshal2.6227.1610.37x
BenchmarkNinOptEnumProtoUnmarshal1.316.114.66x
BenchmarkNidRepEnumProtoUnmarshal7.4217.882.41x
BenchmarkNinRepEnumProtoUnmarshal7.4716.692.23x
BenchmarkTimerProtoUnmarshal61.12190.343.11x
BenchmarkMyExtendableProtoUnmarshal9.9036.713.71x
BenchmarkOtherExtenableProtoUnmarshal21.9052.132.38x
\ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/codec/codec.go b/deps/github.com/gogo/protobuf/codec/codec.go new file mode 100644 index 000000000..91d10fe7f --- /dev/null +++ b/deps/github.com/gogo/protobuf/codec/codec.go @@ -0,0 +1,91 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package codec + +import ( + "github.com/gogo/protobuf/proto" +) + +type Codec interface { + Marshal(v interface{}) ([]byte, error) + Unmarshal(data []byte, v interface{}) error + String() string +} + +type marshaler interface { + MarshalTo(data []byte) (n int, err error) +} + +func getSize(v interface{}) (int, bool) { + if sz, ok := v.(interface { + Size() (n int) + }); ok { + return sz.Size(), true + } else if sz, ok := v.(interface { + ProtoSize() (n int) + }); ok { + return sz.ProtoSize(), true + } else { + return 0, false + } +} + +type codec struct { + buf []byte +} + +func (this *codec) String() string { + return "proto" +} + +func New(size int) Codec { + return &codec{make([]byte, size)} +} + +func (this *codec) Marshal(v interface{}) ([]byte, error) { + if m, ok := v.(marshaler); ok { + n, ok := getSize(v) + if !ok { + return proto.Marshal(v.(proto.Message)) + } + if n > len(this.buf) { + this.buf = make([]byte, n) + } + _, err := m.MarshalTo(this.buf) + if err != nil { + return nil, err + } + return this.buf[:n], nil + } + return proto.Marshal(v.(proto.Message)) +} + +func (this *codec) Unmarshal(data []byte, v interface{}) error { + return proto.Unmarshal(data, v.(proto.Message)) +} diff --git a/deps/github.com/gogo/protobuf/codec/codec_test.go b/deps/github.com/gogo/protobuf/codec/codec_test.go new file mode 100644 index 000000000..de2c9bc4b --- /dev/null +++ b/deps/github.com/gogo/protobuf/codec/codec_test.go @@ -0,0 +1,54 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package codec + +import ( + "github.com/gogo/protobuf/test" + "math/rand" + "testing" + "time" +) + +func TestCodec(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + in := test.NewPopulatedNinOptStruct(r, true) + c := New(r.Intn(1024)) + data, err := c.Marshal(in) + if err != nil { + t.Fatal(err) + } + out := &test.NinOptStruct{} + err = c.Unmarshal(data, out) + if err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } +} diff --git a/deps/github.com/gogo/protobuf/conformance/Makefile b/deps/github.com/gogo/protobuf/conformance/Makefile new file mode 100644 index 000000000..7a191829f --- /dev/null +++ b/deps/github.com/gogo/protobuf/conformance/Makefile @@ -0,0 +1,59 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2016 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PROTOBUF_ROOT=$(HOME)/src/protobuf + +all: + @echo To run the tests in this directory, acquire the main protobuf + @echo distribution from: + @echo + @echo ' https://github.com/google/protobuf' + @echo + @echo Build the test runner with: + @echo + @echo ' cd conformance && make conformance-test-runner' + @echo + @echo And run the tests in this directory with: + @echo + @echo ' make test PROTOBUF_ROOT=' + +test: + ./test.sh $(PROTOBUF_ROOT) + +regenerate: + protoc-min-version --version="3.0.0" --proto_path=$(GOPATH)/src:$(GOPATH)/src/github.com/gogo/protobuf/protobuf:. --gogo_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types\ + :. ./internal/conformance_proto/conformance.proto diff --git a/deps/github.com/golang/protobuf/_conformance/conformance.go b/deps/github.com/gogo/protobuf/conformance/conformance.go similarity index 93% rename from deps/github.com/golang/protobuf/_conformance/conformance.go rename to deps/github.com/gogo/protobuf/conformance/conformance.go index c54212c80..4957f9f54 100644 --- a/deps/github.com/golang/protobuf/_conformance/conformance.go +++ b/deps/github.com/gogo/protobuf/conformance/conformance.go @@ -39,9 +39,9 @@ import ( "io" "os" - pb "github.com/golang/protobuf/_conformance/conformance_proto" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" + pb "github.com/gogo/protobuf/conformance/internal/conformance_proto" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" ) func main() { @@ -101,13 +101,6 @@ func handle(req *pb.ConformanceRequest) *pb.ConformanceResponse { err = proto.Unmarshal(p.ProtobufPayload, &msg) case *pb.ConformanceRequest_JsonPayload: err = jsonpb.UnmarshalString(p.JsonPayload, &msg) - if err != nil && err.Error() == "unmarshaling Any not supported yet" { - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_Skipped{ - Skipped: err.Error(), - }, - } - } default: return &pb.ConformanceResponse{ Result: &pb.ConformanceResponse_RuntimeError{ diff --git a/deps/github.com/gogo/protobuf/conformance/conformance.sh b/deps/github.com/gogo/protobuf/conformance/conformance.sh new file mode 100644 index 000000000..0313b38fd --- /dev/null +++ b/deps/github.com/gogo/protobuf/conformance/conformance.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $(dirname $0) +exec go run conformance.go $* \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.pb.go b/deps/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.pb.go new file mode 100644 index 000000000..d4fb73e28 --- /dev/null +++ b/deps/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.pb.go @@ -0,0 +1,1814 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: internal/conformance_proto/conformance.proto + +package conformance + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import types "github.com/gogo/protobuf/types" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type WireFormat int32 + +const ( + WireFormat_UNSPECIFIED WireFormat = 0 + WireFormat_PROTOBUF WireFormat = 1 + WireFormat_JSON WireFormat = 2 +) + +var WireFormat_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "PROTOBUF", + 2: "JSON", +} +var WireFormat_value = map[string]int32{ + "UNSPECIFIED": 0, + "PROTOBUF": 1, + "JSON": 2, +} + +func (x WireFormat) String() string { + return proto.EnumName(WireFormat_name, int32(x)) +} +func (WireFormat) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{0} +} + +type ForeignEnum int32 + +const ( + ForeignEnum_FOREIGN_FOO ForeignEnum = 0 + ForeignEnum_FOREIGN_BAR ForeignEnum = 1 + ForeignEnum_FOREIGN_BAZ ForeignEnum = 2 +) + +var ForeignEnum_name = map[int32]string{ + 0: "FOREIGN_FOO", + 1: "FOREIGN_BAR", + 2: "FOREIGN_BAZ", +} +var ForeignEnum_value = map[string]int32{ + "FOREIGN_FOO": 0, + "FOREIGN_BAR": 1, + "FOREIGN_BAZ": 2, +} + +func (x ForeignEnum) String() string { + return proto.EnumName(ForeignEnum_name, int32(x)) +} +func (ForeignEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{1} +} + +type TestAllTypes_NestedEnum int32 + +const ( + TestAllTypes_FOO TestAllTypes_NestedEnum = 0 + TestAllTypes_BAR TestAllTypes_NestedEnum = 1 + TestAllTypes_BAZ TestAllTypes_NestedEnum = 2 + TestAllTypes_NEG TestAllTypes_NestedEnum = -1 +) + +var TestAllTypes_NestedEnum_name = map[int32]string{ + 0: "FOO", + 1: "BAR", + 2: "BAZ", + -1: "NEG", +} +var TestAllTypes_NestedEnum_value = map[string]int32{ + "FOO": 0, + "BAR": 1, + "BAZ": 2, + "NEG": -1, +} + +func (x TestAllTypes_NestedEnum) String() string { + return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x)) +} +func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{2, 0} +} + +// Represents a single test case's input. The testee should: +// +// 1. parse this proto (which should always succeed) +// 2. parse the protobuf or JSON payload in "payload" (which may fail) +// 3. if the parse succeeded, serialize the message in the requested format. +type ConformanceRequest struct { + // The payload (whether protobuf of JSON) is always for a TestAllTypes proto + // (see below). + // + // Types that are valid to be assigned to Payload: + // *ConformanceRequest_ProtobufPayload + // *ConformanceRequest_JsonPayload + Payload isConformanceRequest_Payload `protobuf_oneof:"payload"` + // Which format should the testee serialize its message to? + RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,proto3,enum=conformance.WireFormat" json:"requested_output_format,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} } +func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) } +func (*ConformanceRequest) ProtoMessage() {} +func (*ConformanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{0} +} +func (m *ConformanceRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConformanceRequest.Unmarshal(m, b) +} +func (m *ConformanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConformanceRequest.Marshal(b, m, deterministic) +} +func (dst *ConformanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConformanceRequest.Merge(dst, src) +} +func (m *ConformanceRequest) XXX_Size() int { + return xxx_messageInfo_ConformanceRequest.Size(m) +} +func (m *ConformanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ConformanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ConformanceRequest proto.InternalMessageInfo + +type isConformanceRequest_Payload interface { + isConformanceRequest_Payload() +} + +type ConformanceRequest_ProtobufPayload struct { + ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` +} +type ConformanceRequest_JsonPayload struct { + JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"` +} + +func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {} +func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} + +func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (m *ConformanceRequest) GetProtobufPayload() []byte { + if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok { + return x.ProtobufPayload + } + return nil +} + +func (m *ConformanceRequest) GetJsonPayload() string { + if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok { + return x.JsonPayload + } + return "" +} + +func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat { + if m != nil { + return m.RequestedOutputFormat + } + return WireFormat_UNSPECIFIED +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{ + (*ConformanceRequest_ProtobufPayload)(nil), + (*ConformanceRequest_JsonPayload)(nil), + } +} + +func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ConformanceRequest) + // payload + switch x := m.Payload.(type) { + case *ConformanceRequest_ProtobufPayload: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.ProtobufPayload) + case *ConformanceRequest_JsonPayload: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.JsonPayload) + case nil: + default: + return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x) + } + return nil +} + +func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ConformanceRequest) + switch tag { + case 1: // payload.protobuf_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Payload = &ConformanceRequest_ProtobufPayload{x} + return true, err + case 2: // payload.json_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Payload = &ConformanceRequest_JsonPayload{x} + return true, err + default: + return false, nil + } +} + +func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ConformanceRequest) + // payload + switch x := m.Payload.(type) { + case *ConformanceRequest_ProtobufPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) + n += len(x.ProtobufPayload) + case *ConformanceRequest_JsonPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.JsonPayload))) + n += len(x.JsonPayload) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// Represents a single test case's output. +type ConformanceResponse struct { + // Types that are valid to be assigned to Result: + // *ConformanceResponse_ParseError + // *ConformanceResponse_SerializeError + // *ConformanceResponse_RuntimeError + // *ConformanceResponse_ProtobufPayload + // *ConformanceResponse_JsonPayload + // *ConformanceResponse_Skipped + Result isConformanceResponse_Result `protobuf_oneof:"result"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} } +func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) } +func (*ConformanceResponse) ProtoMessage() {} +func (*ConformanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{1} +} +func (m *ConformanceResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConformanceResponse.Unmarshal(m, b) +} +func (m *ConformanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConformanceResponse.Marshal(b, m, deterministic) +} +func (dst *ConformanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConformanceResponse.Merge(dst, src) +} +func (m *ConformanceResponse) XXX_Size() int { + return xxx_messageInfo_ConformanceResponse.Size(m) +} +func (m *ConformanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ConformanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ConformanceResponse proto.InternalMessageInfo + +type isConformanceResponse_Result interface { + isConformanceResponse_Result() +} + +type ConformanceResponse_ParseError struct { + ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"` +} +type ConformanceResponse_SerializeError struct { + SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"` +} +type ConformanceResponse_RuntimeError struct { + RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"` +} +type ConformanceResponse_ProtobufPayload struct { + ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` +} +type ConformanceResponse_JsonPayload struct { + JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"` +} +type ConformanceResponse_Skipped struct { + Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"` +} + +func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} +func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} +func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} +func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} +func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} +func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} + +func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { + if m != nil { + return m.Result + } + return nil +} + +func (m *ConformanceResponse) GetParseError() string { + if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok { + return x.ParseError + } + return "" +} + +func (m *ConformanceResponse) GetSerializeError() string { + if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok { + return x.SerializeError + } + return "" +} + +func (m *ConformanceResponse) GetRuntimeError() string { + if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok { + return x.RuntimeError + } + return "" +} + +func (m *ConformanceResponse) GetProtobufPayload() []byte { + if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok { + return x.ProtobufPayload + } + return nil +} + +func (m *ConformanceResponse) GetJsonPayload() string { + if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok { + return x.JsonPayload + } + return "" +} + +func (m *ConformanceResponse) GetSkipped() string { + if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok { + return x.Skipped + } + return "" +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ConformanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{ + (*ConformanceResponse_ParseError)(nil), + (*ConformanceResponse_SerializeError)(nil), + (*ConformanceResponse_RuntimeError)(nil), + (*ConformanceResponse_ProtobufPayload)(nil), + (*ConformanceResponse_JsonPayload)(nil), + (*ConformanceResponse_Skipped)(nil), + } +} + +func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ConformanceResponse) + // result + switch x := m.Result.(type) { + case *ConformanceResponse_ParseError: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.ParseError) + case *ConformanceResponse_SerializeError: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.SerializeError) + case *ConformanceResponse_RuntimeError: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.RuntimeError) + case *ConformanceResponse_ProtobufPayload: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.ProtobufPayload) + case *ConformanceResponse_JsonPayload: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.JsonPayload) + case *ConformanceResponse_Skipped: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Skipped) + case nil: + default: + return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x) + } + return nil +} + +func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ConformanceResponse) + switch tag { + case 1: // result.parse_error + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_ParseError{x} + return true, err + case 6: // result.serialize_error + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_SerializeError{x} + return true, err + case 2: // result.runtime_error + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_RuntimeError{x} + return true, err + case 3: // result.protobuf_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Result = &ConformanceResponse_ProtobufPayload{x} + return true, err + case 4: // result.json_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_JsonPayload{x} + return true, err + case 5: // result.skipped + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_Skipped{x} + return true, err + default: + return false, nil + } +} + +func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ConformanceResponse) + // result + switch x := m.Result.(type) { + case *ConformanceResponse_ParseError: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.ParseError))) + n += len(x.ParseError) + case *ConformanceResponse_SerializeError: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.SerializeError))) + n += len(x.SerializeError) + case *ConformanceResponse_RuntimeError: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.RuntimeError))) + n += len(x.RuntimeError) + case *ConformanceResponse_ProtobufPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) + n += len(x.ProtobufPayload) + case *ConformanceResponse_JsonPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.JsonPayload))) + n += len(x.JsonPayload) + case *ConformanceResponse_Skipped: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Skipped))) + n += len(x.Skipped) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// This proto includes every type of field in both singular and repeated +// forms. +type TestAllTypes struct { + // Singular + OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"` + OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"` + OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"` + OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"` + OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"` + OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"` + OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"` + OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"` + OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"` + OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"` + OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"` + OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"` + OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"` + OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"` + OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"` + OptionalNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage" json:"optional_nested_message,omitempty"` + OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage" json:"optional_foreign_message,omitempty"` + OptionalNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"` + OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,proto3,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"` + OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece,proto3" json:"optional_string_piece,omitempty"` + OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord,proto3" json:"optional_cord,omitempty"` + RecursiveMessage *TestAllTypes `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage" json:"recursive_message,omitempty"` + // Repeated + RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32" json:"repeated_int32,omitempty"` + RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64" json:"repeated_int64,omitempty"` + RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32" json:"repeated_uint32,omitempty"` + RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64" json:"repeated_uint64,omitempty"` + RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32" json:"repeated_sint32,omitempty"` + RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64" json:"repeated_sint64,omitempty"` + RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32" json:"repeated_fixed32,omitempty"` + RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64" json:"repeated_fixed64,omitempty"` + RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32" json:"repeated_sfixed32,omitempty"` + RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64" json:"repeated_sfixed64,omitempty"` + RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat" json:"repeated_float,omitempty"` + RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble" json:"repeated_double,omitempty"` + RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool" json:"repeated_bool,omitempty"` + RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString" json:"repeated_string,omitempty"` + RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes" json:"repeated_bytes,omitempty"` + RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage" json:"repeated_nested_message,omitempty"` + RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage" json:"repeated_foreign_message,omitempty"` + RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,enum=conformance.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"` + RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,enum=conformance.ForeignEnum" json:"repeated_foreign_enum,omitempty"` + RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece" json:"repeated_string_piece,omitempty"` + RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord" json:"repeated_cord,omitempty"` + // Map + MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.TestAllTypes_NestedEnum"` + MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.ForeignEnum"` + // Types that are valid to be assigned to OneofField: + // *TestAllTypes_OneofUint32 + // *TestAllTypes_OneofNestedMessage + // *TestAllTypes_OneofString + // *TestAllTypes_OneofBytes + OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"` + // Well-known types + OptionalBoolWrapper *types.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper" json:"optional_bool_wrapper,omitempty"` + OptionalInt32Wrapper *types.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper" json:"optional_int32_wrapper,omitempty"` + OptionalInt64Wrapper *types.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper" json:"optional_int64_wrapper,omitempty"` + OptionalUint32Wrapper *types.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper" json:"optional_uint32_wrapper,omitempty"` + OptionalUint64Wrapper *types.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper" json:"optional_uint64_wrapper,omitempty"` + OptionalFloatWrapper *types.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper" json:"optional_float_wrapper,omitempty"` + OptionalDoubleWrapper *types.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper" json:"optional_double_wrapper,omitempty"` + OptionalStringWrapper *types.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper" json:"optional_string_wrapper,omitempty"` + OptionalBytesWrapper *types.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper" json:"optional_bytes_wrapper,omitempty"` + RepeatedBoolWrapper []*types.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper" json:"repeated_bool_wrapper,omitempty"` + RepeatedInt32Wrapper []*types.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper" json:"repeated_int32_wrapper,omitempty"` + RepeatedInt64Wrapper []*types.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper" json:"repeated_int64_wrapper,omitempty"` + RepeatedUint32Wrapper []*types.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper" json:"repeated_uint32_wrapper,omitempty"` + RepeatedUint64Wrapper []*types.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper" json:"repeated_uint64_wrapper,omitempty"` + RepeatedFloatWrapper []*types.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper" json:"repeated_float_wrapper,omitempty"` + RepeatedDoubleWrapper []*types.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper" json:"repeated_double_wrapper,omitempty"` + RepeatedStringWrapper []*types.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper" json:"repeated_string_wrapper,omitempty"` + RepeatedBytesWrapper []*types.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper" json:"repeated_bytes_wrapper,omitempty"` + OptionalDuration *types.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration" json:"optional_duration,omitempty"` + OptionalTimestamp *types.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp" json:"optional_timestamp,omitempty"` + OptionalFieldMask *types.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask" json:"optional_field_mask,omitempty"` + OptionalStruct *types.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct" json:"optional_struct,omitempty"` + OptionalAny *types.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny" json:"optional_any,omitempty"` + OptionalValue *types.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue" json:"optional_value,omitempty"` + RepeatedDuration []*types.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration" json:"repeated_duration,omitempty"` + RepeatedTimestamp []*types.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp" json:"repeated_timestamp,omitempty"` + RepeatedFieldmask []*types.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask" json:"repeated_fieldmask,omitempty"` + RepeatedStruct []*types.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct" json:"repeated_struct,omitempty"` + RepeatedAny []*types.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny" json:"repeated_any,omitempty"` + RepeatedValue []*types.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue" json:"repeated_value,omitempty"` + // Test field-name-to-JSON-name convention. + Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"` + FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"` + XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"` + Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"` + Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"` + Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"` + FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"` + FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"` + Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"` + Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"` + FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"` + FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestAllTypes) Reset() { *m = TestAllTypes{} } +func (m *TestAllTypes) String() string { return proto.CompactTextString(m) } +func (*TestAllTypes) ProtoMessage() {} +func (*TestAllTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{2} +} +func (m *TestAllTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestAllTypes.Unmarshal(m, b) +} +func (m *TestAllTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestAllTypes.Marshal(b, m, deterministic) +} +func (dst *TestAllTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestAllTypes.Merge(dst, src) +} +func (m *TestAllTypes) XXX_Size() int { + return xxx_messageInfo_TestAllTypes.Size(m) +} +func (m *TestAllTypes) XXX_DiscardUnknown() { + xxx_messageInfo_TestAllTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_TestAllTypes proto.InternalMessageInfo + +type isTestAllTypes_OneofField interface { + isTestAllTypes_OneofField() +} + +type TestAllTypes_OneofUint32 struct { + OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"` +} +type TestAllTypes_OneofNestedMessage struct { + OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,oneof"` +} +type TestAllTypes_OneofString struct { + OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"` +} +type TestAllTypes_OneofBytes struct { + OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` +} + +func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} + +func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { + if m != nil { + return m.OneofField + } + return nil +} + +func (m *TestAllTypes) GetOptionalInt32() int32 { + if m != nil { + return m.OptionalInt32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalInt64() int64 { + if m != nil { + return m.OptionalInt64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalUint32() uint32 { + if m != nil { + return m.OptionalUint32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalUint64() uint64 { + if m != nil { + return m.OptionalUint64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSint32() int32 { + if m != nil { + return m.OptionalSint32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSint64() int64 { + if m != nil { + return m.OptionalSint64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalFixed32() uint32 { + if m != nil { + return m.OptionalFixed32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalFixed64() uint64 { + if m != nil { + return m.OptionalFixed64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSfixed32() int32 { + if m != nil { + return m.OptionalSfixed32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSfixed64() int64 { + if m != nil { + return m.OptionalSfixed64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalFloat() float32 { + if m != nil { + return m.OptionalFloat + } + return 0 +} + +func (m *TestAllTypes) GetOptionalDouble() float64 { + if m != nil { + return m.OptionalDouble + } + return 0 +} + +func (m *TestAllTypes) GetOptionalBool() bool { + if m != nil { + return m.OptionalBool + } + return false +} + +func (m *TestAllTypes) GetOptionalString() string { + if m != nil { + return m.OptionalString + } + return "" +} + +func (m *TestAllTypes) GetOptionalBytes() []byte { + if m != nil { + return m.OptionalBytes + } + return nil +} + +func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage { + if m != nil { + return m.OptionalNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage { + if m != nil { + return m.OptionalForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum { + if m != nil { + return m.OptionalNestedEnum + } + return TestAllTypes_FOO +} + +func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum { + if m != nil { + return m.OptionalForeignEnum + } + return ForeignEnum_FOREIGN_FOO +} + +func (m *TestAllTypes) GetOptionalStringPiece() string { + if m != nil { + return m.OptionalStringPiece + } + return "" +} + +func (m *TestAllTypes) GetOptionalCord() string { + if m != nil { + return m.OptionalCord + } + return "" +} + +func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes { + if m != nil { + return m.RecursiveMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt32() []int32 { + if m != nil { + return m.RepeatedInt32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt64() []int64 { + if m != nil { + return m.RepeatedInt64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint32() []uint32 { + if m != nil { + return m.RepeatedUint32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint64() []uint64 { + if m != nil { + return m.RepeatedUint64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSint32() []int32 { + if m != nil { + return m.RepeatedSint32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSint64() []int64 { + if m != nil { + return m.RepeatedSint64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFixed32() []uint32 { + if m != nil { + return m.RepeatedFixed32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFixed64() []uint64 { + if m != nil { + return m.RepeatedFixed64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSfixed32() []int32 { + if m != nil { + return m.RepeatedSfixed32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSfixed64() []int64 { + if m != nil { + return m.RepeatedSfixed64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFloat() []float32 { + if m != nil { + return m.RepeatedFloat + } + return nil +} + +func (m *TestAllTypes) GetRepeatedDouble() []float64 { + if m != nil { + return m.RepeatedDouble + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBool() []bool { + if m != nil { + return m.RepeatedBool + } + return nil +} + +func (m *TestAllTypes) GetRepeatedString() []string { + if m != nil { + return m.RepeatedString + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBytes() [][]byte { + if m != nil { + return m.RepeatedBytes + } + return nil +} + +func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage { + if m != nil { + return m.RepeatedNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage { + if m != nil { + return m.RepeatedForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum { + if m != nil { + return m.RepeatedNestedEnum + } + return nil +} + +func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum { + if m != nil { + return m.RepeatedForeignEnum + } + return nil +} + +func (m *TestAllTypes) GetRepeatedStringPiece() []string { + if m != nil { + return m.RepeatedStringPiece + } + return nil +} + +func (m *TestAllTypes) GetRepeatedCord() []string { + if m != nil { + return m.RepeatedCord + } + return nil +} + +func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 { + if m != nil { + return m.MapInt32Int32 + } + return nil +} + +func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 { + if m != nil { + return m.MapInt64Int64 + } + return nil +} + +func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 { + if m != nil { + return m.MapUint32Uint32 + } + return nil +} + +func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 { + if m != nil { + return m.MapUint64Uint64 + } + return nil +} + +func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 { + if m != nil { + return m.MapSint32Sint32 + } + return nil +} + +func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 { + if m != nil { + return m.MapSint64Sint64 + } + return nil +} + +func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 { + if m != nil { + return m.MapFixed32Fixed32 + } + return nil +} + +func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 { + if m != nil { + return m.MapFixed64Fixed64 + } + return nil +} + +func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 { + if m != nil { + return m.MapSfixed32Sfixed32 + } + return nil +} + +func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 { + if m != nil { + return m.MapSfixed64Sfixed64 + } + return nil +} + +func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 { + if m != nil { + return m.MapInt32Float + } + return nil +} + +func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 { + if m != nil { + return m.MapInt32Double + } + return nil +} + +func (m *TestAllTypes) GetMapBoolBool() map[bool]bool { + if m != nil { + return m.MapBoolBool + } + return nil +} + +func (m *TestAllTypes) GetMapStringString() map[string]string { + if m != nil { + return m.MapStringString + } + return nil +} + +func (m *TestAllTypes) GetMapStringBytes() map[string][]byte { + if m != nil { + return m.MapStringBytes + } + return nil +} + +func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage { + if m != nil { + return m.MapStringNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetMapStringForeignMessage() map[string]*ForeignMessage { + if m != nil { + return m.MapStringForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum { + if m != nil { + return m.MapStringNestedEnum + } + return nil +} + +func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum { + if m != nil { + return m.MapStringForeignEnum + } + return nil +} + +func (m *TestAllTypes) GetOneofUint32() uint32 { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok { + return x.OneofUint32 + } + return 0 +} + +func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok { + return x.OneofNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetOneofString() string { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok { + return x.OneofString + } + return "" +} + +func (m *TestAllTypes) GetOneofBytes() []byte { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok { + return x.OneofBytes + } + return nil +} + +func (m *TestAllTypes) GetOptionalBoolWrapper() *types.BoolValue { + if m != nil { + return m.OptionalBoolWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalInt32Wrapper() *types.Int32Value { + if m != nil { + return m.OptionalInt32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalInt64Wrapper() *types.Int64Value { + if m != nil { + return m.OptionalInt64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalUint32Wrapper() *types.UInt32Value { + if m != nil { + return m.OptionalUint32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalUint64Wrapper() *types.UInt64Value { + if m != nil { + return m.OptionalUint64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalFloatWrapper() *types.FloatValue { + if m != nil { + return m.OptionalFloatWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalDoubleWrapper() *types.DoubleValue { + if m != nil { + return m.OptionalDoubleWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalStringWrapper() *types.StringValue { + if m != nil { + return m.OptionalStringWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalBytesWrapper() *types.BytesValue { + if m != nil { + return m.OptionalBytesWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBoolWrapper() []*types.BoolValue { + if m != nil { + return m.RepeatedBoolWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt32Wrapper() []*types.Int32Value { + if m != nil { + return m.RepeatedInt32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt64Wrapper() []*types.Int64Value { + if m != nil { + return m.RepeatedInt64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint32Wrapper() []*types.UInt32Value { + if m != nil { + return m.RepeatedUint32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint64Wrapper() []*types.UInt64Value { + if m != nil { + return m.RepeatedUint64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFloatWrapper() []*types.FloatValue { + if m != nil { + return m.RepeatedFloatWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedDoubleWrapper() []*types.DoubleValue { + if m != nil { + return m.RepeatedDoubleWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedStringWrapper() []*types.StringValue { + if m != nil { + return m.RepeatedStringWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBytesWrapper() []*types.BytesValue { + if m != nil { + return m.RepeatedBytesWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalDuration() *types.Duration { + if m != nil { + return m.OptionalDuration + } + return nil +} + +func (m *TestAllTypes) GetOptionalTimestamp() *types.Timestamp { + if m != nil { + return m.OptionalTimestamp + } + return nil +} + +func (m *TestAllTypes) GetOptionalFieldMask() *types.FieldMask { + if m != nil { + return m.OptionalFieldMask + } + return nil +} + +func (m *TestAllTypes) GetOptionalStruct() *types.Struct { + if m != nil { + return m.OptionalStruct + } + return nil +} + +func (m *TestAllTypes) GetOptionalAny() *types.Any { + if m != nil { + return m.OptionalAny + } + return nil +} + +func (m *TestAllTypes) GetOptionalValue() *types.Value { + if m != nil { + return m.OptionalValue + } + return nil +} + +func (m *TestAllTypes) GetRepeatedDuration() []*types.Duration { + if m != nil { + return m.RepeatedDuration + } + return nil +} + +func (m *TestAllTypes) GetRepeatedTimestamp() []*types.Timestamp { + if m != nil { + return m.RepeatedTimestamp + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFieldmask() []*types.FieldMask { + if m != nil { + return m.RepeatedFieldmask + } + return nil +} + +func (m *TestAllTypes) GetRepeatedStruct() []*types.Struct { + if m != nil { + return m.RepeatedStruct + } + return nil +} + +func (m *TestAllTypes) GetRepeatedAny() []*types.Any { + if m != nil { + return m.RepeatedAny + } + return nil +} + +func (m *TestAllTypes) GetRepeatedValue() []*types.Value { + if m != nil { + return m.RepeatedValue + } + return nil +} + +func (m *TestAllTypes) GetFieldname1() int32 { + if m != nil { + return m.Fieldname1 + } + return 0 +} + +func (m *TestAllTypes) GetFieldName2() int32 { + if m != nil { + return m.FieldName2 + } + return 0 +} + +func (m *TestAllTypes) GetXFieldName3() int32 { + if m != nil { + return m.XFieldName3 + } + return 0 +} + +func (m *TestAllTypes) GetField_Name4_() int32 { + if m != nil { + return m.Field_Name4_ + } + return 0 +} + +func (m *TestAllTypes) GetField0Name5() int32 { + if m != nil { + return m.Field0Name5 + } + return 0 +} + +func (m *TestAllTypes) GetField_0Name6() int32 { + if m != nil { + return m.Field_0Name6 + } + return 0 +} + +func (m *TestAllTypes) GetFieldName7() int32 { + if m != nil { + return m.FieldName7 + } + return 0 +} + +func (m *TestAllTypes) GetFieldName8() int32 { + if m != nil { + return m.FieldName8 + } + return 0 +} + +func (m *TestAllTypes) GetField_Name9() int32 { + if m != nil { + return m.Field_Name9 + } + return 0 +} + +func (m *TestAllTypes) GetField_Name10() int32 { + if m != nil { + return m.Field_Name10 + } + return 0 +} + +func (m *TestAllTypes) GetFIELD_NAME11() int32 { + if m != nil { + return m.FIELD_NAME11 + } + return 0 +} + +func (m *TestAllTypes) GetFIELDName12() int32 { + if m != nil { + return m.FIELDName12 + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{ + (*TestAllTypes_OneofUint32)(nil), + (*TestAllTypes_OneofNestedMessage)(nil), + (*TestAllTypes_OneofString)(nil), + (*TestAllTypes_OneofBytes)(nil), + } +} + +func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TestAllTypes) + // oneof_field + switch x := m.OneofField.(type) { + case *TestAllTypes_OneofUint32: + _ = b.EncodeVarint(111<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.OneofUint32)) + case *TestAllTypes_OneofNestedMessage: + _ = b.EncodeVarint(112<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.OneofNestedMessage); err != nil { + return err + } + case *TestAllTypes_OneofString: + _ = b.EncodeVarint(113<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.OneofString) + case *TestAllTypes_OneofBytes: + _ = b.EncodeVarint(114<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.OneofBytes) + case nil: + default: + return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x) + } + return nil +} + +func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TestAllTypes) + switch tag { + case 111: // oneof_field.oneof_uint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.OneofField = &TestAllTypes_OneofUint32{uint32(x)} + return true, err + case 112: // oneof_field.oneof_nested_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TestAllTypes_NestedMessage) + err := b.DecodeMessage(msg) + m.OneofField = &TestAllTypes_OneofNestedMessage{msg} + return true, err + case 113: // oneof_field.oneof_string + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.OneofField = &TestAllTypes_OneofString{x} + return true, err + case 114: // oneof_field.oneof_bytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.OneofField = &TestAllTypes_OneofBytes{x} + return true, err + default: + return false, nil + } +} + +func _TestAllTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TestAllTypes) + // oneof_field + switch x := m.OneofField.(type) { + case *TestAllTypes_OneofUint32: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.OneofUint32)) + case *TestAllTypes_OneofNestedMessage: + s := proto.Size(x.OneofNestedMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *TestAllTypes_OneofString: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.OneofString))) + n += len(x.OneofString) + case *TestAllTypes_OneofBytes: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.OneofBytes))) + n += len(x.OneofBytes) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TestAllTypes_NestedMessage struct { + A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` + Corecursive *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} } +func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) } +func (*TestAllTypes_NestedMessage) ProtoMessage() {} +func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{2, 0} +} +func (m *TestAllTypes_NestedMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestAllTypes_NestedMessage.Unmarshal(m, b) +} +func (m *TestAllTypes_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestAllTypes_NestedMessage.Marshal(b, m, deterministic) +} +func (dst *TestAllTypes_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestAllTypes_NestedMessage.Merge(dst, src) +} +func (m *TestAllTypes_NestedMessage) XXX_Size() int { + return xxx_messageInfo_TestAllTypes_NestedMessage.Size(m) +} +func (m *TestAllTypes_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_TestAllTypes_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_TestAllTypes_NestedMessage proto.InternalMessageInfo + +func (m *TestAllTypes_NestedMessage) GetA() int32 { + if m != nil { + return m.A + } + return 0 +} + +func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes { + if m != nil { + return m.Corecursive + } + return nil +} + +type ForeignMessage struct { + C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ForeignMessage) Reset() { *m = ForeignMessage{} } +func (m *ForeignMessage) String() string { return proto.CompactTextString(m) } +func (*ForeignMessage) ProtoMessage() {} +func (*ForeignMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{3} +} +func (m *ForeignMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ForeignMessage.Unmarshal(m, b) +} +func (m *ForeignMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ForeignMessage.Marshal(b, m, deterministic) +} +func (dst *ForeignMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForeignMessage.Merge(dst, src) +} +func (m *ForeignMessage) XXX_Size() int { + return xxx_messageInfo_ForeignMessage.Size(m) +} +func (m *ForeignMessage) XXX_DiscardUnknown() { + xxx_messageInfo_ForeignMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_ForeignMessage proto.InternalMessageInfo + +func (m *ForeignMessage) GetC() int32 { + if m != nil { + return m.C + } + return 0 +} + +func init() { + proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest") + proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse") + proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes") + proto.RegisterMapType((map[bool]bool)(nil), "conformance.TestAllTypes.MapBoolBoolEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapFixed32Fixed32Entry") + proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapFixed64Fixed64Entry") + proto.RegisterMapType((map[int32]float64)(nil), "conformance.TestAllTypes.MapInt32DoubleEntry") + proto.RegisterMapType((map[int32]float32)(nil), "conformance.TestAllTypes.MapInt32FloatEntry") + proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapInt32Int32Entry") + proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapInt64Int64Entry") + proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSfixed32Sfixed32Entry") + proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSfixed64Sfixed64Entry") + proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSint32Sint32Entry") + proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSint64Sint64Entry") + proto.RegisterMapType((map[string][]byte)(nil), "conformance.TestAllTypes.MapStringBytesEntry") + proto.RegisterMapType((map[string]ForeignEnum)(nil), "conformance.TestAllTypes.MapStringForeignEnumEntry") + proto.RegisterMapType((map[string]*ForeignMessage)(nil), "conformance.TestAllTypes.MapStringForeignMessageEntry") + proto.RegisterMapType((map[string]TestAllTypes_NestedEnum)(nil), "conformance.TestAllTypes.MapStringNestedEnumEntry") + proto.RegisterMapType((map[string]*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.MapStringNestedMessageEntry") + proto.RegisterMapType((map[string]string)(nil), "conformance.TestAllTypes.MapStringStringEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapUint32Uint32Entry") + proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapUint64Uint64Entry") + proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage") + proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage") + proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value) + proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value) + proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value) +} + +func init() { + proto.RegisterFile("internal/conformance_proto/conformance.proto", fileDescriptor_conformance_64c26947649a56a9) +} + +var fileDescriptor_conformance_64c26947649a56a9 = []byte{ + // 2611 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0x59, 0x73, 0xdb, 0xc8, + 0x11, 0x16, 0x08, 0x5b, 0x92, 0x87, 0x94, 0x44, 0x8d, 0xae, 0xb1, 0xec, 0x5a, 0xc3, 0xf2, 0x3a, + 0xa6, 0x8f, 0x95, 0x75, 0xc0, 0xf0, 0xb1, 0x59, 0xc7, 0xa2, 0x4d, 0xda, 0x72, 0xd6, 0xa2, 0x0b, + 0xb2, 0xd6, 0x55, 0xce, 0x03, 0x03, 0x51, 0x90, 0x8a, 0x6b, 0x12, 0xe0, 0x02, 0xe0, 0x26, 0xca, + 0x63, 0xfe, 0x41, 0xee, 0xf3, 0x2f, 0xe4, 0xac, 0x4a, 0x25, 0xa9, 0xe4, 0x29, 0x95, 0x97, 0xdc, + 0x49, 0xe5, 0x4e, 0x7e, 0x4c, 0x52, 0x73, 0x62, 0x66, 0x08, 0x50, 0xf4, 0x56, 0x2d, 0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0xcd, 0xe0, 0x98, 0xcd, 0xe6, 0x50, + 0x7a, 0x4f, 0x32, 0x07, 0xcc, 0xe0, 0x80, 0x32, 0xc7, 0x23, 0xb0, 0x98, 0xdd, 0x61, 0x92, 0x59, + 0x26, 0x32, 0x58, 0x26, 0x72, 0x58, 0xd4, 0x2e, 0x92, 0xcc, 0x32, 0x9e, 0xc1, 0x32, 0x2e, 0xb3, + 0xd4, 0x01, 0xca, 0xeb, 0x13, 0xc9, 0x3c, 0x33, 0x19, 0x3c, 0x33, 0x79, 0x3c, 0x5a, 0x1f, 0x48, + 0xe6, 0x29, 0x67, 0xf0, 0x94, 0x33, 0xab, 0x4d, 0xee, 0xf6, 0x9c, 0x54, 0xaf, 0x05, 0x99, 0x61, + 0x0b, 0xcc, 0x65, 0x34, 0x76, 0x4e, 0xa2, 0x30, 0x64, 0x8a, 0xfb, 0xa0, 0xac, 0x77, 0x71, 0xe4, + 0xf9, 0x93, 0x19, 0xf3, 0x27, 0x33, 0x8a, 0x44, 0xef, 0xd8, 0xc8, 0x1c, 0x67, 0x32, 0x38, 0xce, + 0x0c, 0x2e, 0x43, 0x6f, 0xcd, 0x9c, 0x44, 0x51, 0x92, 0x29, 0x22, 0x70, 0x6e, 0x48, 0xef, 0x25, + 0x83, 0xea, 0x3d, 0x99, 0xea, 0x0d, 0x5e, 0x7c, 0x48, 0x3e, 0x8f, 0xc0, 0xf9, 0x61, 0xcd, 0x97, + 0x0c, 0xa7, 0xeb, 0xaa, 0xd3, 0xa1, 0xef, 0x42, 0x24, 0x47, 0x1d, 0x5a, 0x70, 0x59, 0x4d, 0x97, + 0x0c, 0x27, 0xf7, 0x64, 0x27, 0xa3, 0xbe, 0x1d, 0x91, 0xbc, 0x79, 0xe0, 0x6c, 0x6e, 0xe3, 0x25, + 0xc3, 0xdd, 0xaa, 0xea, 0x2e, 0xff, 0x9d, 0x49, 0xea, 0x62, 0xe5, 0x2e, 0x00, 0x52, 0x8b, 0x68, + 0x02, 0x98, 0xf5, 0x46, 0xa3, 0x3c, 0x86, 0x7f, 0xa9, 0x6e, 0xb9, 0x65, 0x83, 0xfe, 0xf2, 0xaa, + 0x5c, 0xc0, 0xee, 0x76, 0x6a, 0x8f, 0xcb, 0xff, 0xe3, 0xff, 0x19, 0xd5, 0x29, 0xde, 0x3c, 0x21, + 0x07, 0xd8, 0xca, 0x5b, 0x60, 0x5a, 0xeb, 0x6c, 0x95, 0x80, 0xd1, 0xe2, 0x07, 0x4a, 0xeb, 0xda, + 0x2d, 0x00, 0xd2, 0x7f, 0x0c, 0x03, 0x67, 0x40, 0x71, 0x6f, 0x67, 0xf7, 0x79, 0xed, 0xe1, 0x76, + 0x7d, 0xbb, 0xf6, 0xa8, 0x3c, 0x06, 0x4b, 0x60, 0xf2, 0xb9, 0xdb, 0x78, 0xd1, 0xa8, 0xee, 0xd5, + 0xcb, 0x06, 0x9c, 0x04, 0xa7, 0x9e, 0xee, 0x36, 0x76, 0xca, 0x85, 0x6b, 0x0f, 0x40, 0x51, 0x6e, + 0x2c, 0xcd, 0x80, 0x62, 0xbd, 0xe1, 0xd6, 0xb6, 0x1f, 0xef, 0x34, 0x69, 0xa4, 0x92, 0x81, 0x46, + 0xac, 0x18, 0x5e, 0x95, 0x0b, 0xd5, 0x8b, 0xe0, 0x42, 0x2b, 0xec, 0x0e, 0xfc, 0xd9, 0x22, 0x25, + 0x67, 0x7f, 0x9c, 0x58, 0x37, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xc3, 0x66, 0xe3, 0x3d, + 0x25, 0x00, 0x00, +} diff --git a/deps/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto b/deps/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.proto similarity index 96% rename from deps/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto rename to deps/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.proto index 95a8fd135..fc96074ac 100644 --- a/deps/github.com/golang/protobuf/_conformance/conformance_proto/conformance.proto +++ b/deps/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.proto @@ -210,11 +210,6 @@ message TestAllTypes { NestedMessage oneof_nested_message = 112; string oneof_string = 113; bytes oneof_bytes = 114; - bool oneof_bool = 115; - uint64 oneof_uint64 = 116; - float oneof_float = 117; - double oneof_double = 118; - NestedEnum oneof_enum = 119; } // Well-known types @@ -253,7 +248,6 @@ message TestAllTypes { repeated google.protobuf.Value repeated_value = 316; // Test field-name-to-JSON-name convention. - // (protobuf says names can be any valid C/C++ identifier.) int32 fieldname1 = 401; int32 field_name2 = 402; int32 _field_name3 = 403; @@ -266,12 +260,6 @@ message TestAllTypes { int32 Field_Name10 = 410; int32 FIELD_NAME11 = 411; int32 FIELD_name12 = 412; - int32 __field_name13 = 413; - int32 __Field_name14 = 414; - int32 field__name15 = 415; - int32 field__Name16 = 416; - int32 field_name17__ = 417; - int32 Field_name18__ = 418; } message ForeignMessage { diff --git a/deps/github.com/gogo/protobuf/conformance/test.sh b/deps/github.com/gogo/protobuf/conformance/test.sh new file mode 100755 index 000000000..e6de29b9a --- /dev/null +++ b/deps/github.com/gogo/protobuf/conformance/test.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +PROTOBUF_ROOT=$1 +CONFORMANCE_ROOT=$1/conformance +CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner + +cd $(dirname $0) + +if [[ $PROTOBUF_ROOT == "" ]]; then + echo "usage: test.sh " >/dev/stderr + exit 1 +fi + +if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then + echo "SKIP: conformance test runner not installed" >/dev/stderr + exit 0 +fi + +a=$CONFORMANCE_ROOT/conformance.proto +b=internal/conformance_proto/conformance.proto +if [[ $(diff $a $b) != "" ]]; then + cp $a $b + echo "WARNING: conformance.proto is out of date" >/dev/stderr +fi + +$CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh diff --git a/deps/github.com/gogo/protobuf/custom_types.md b/deps/github.com/gogo/protobuf/custom_types.md new file mode 100644 index 000000000..3eed249b5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/custom_types.md @@ -0,0 +1,68 @@ +# Custom types + +Custom types is a gogo protobuf extensions that allows for using a custom +struct type to decorate the underlying structure of the protocol message. + +# How to use + +## Defining the protobuf message + +```proto +message CustomType { + optional ProtoType Field = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field = 1; +} +``` + +or alternatively you can declare the field type in the protocol message to be +`bytes`: + +```proto +message BytesCustomType { + optional bytes Field = 1 [(gogoproto.customtype) = "T"]; +} +``` + +The downside of using `bytes` is that it makes it harder to generate protobuf +code in other languages. In either case, it is the user responsibility to +ensure that the custom type marshals and unmarshals to the expected wire +format. That is, in the first example, gogo protobuf will not attempt to ensure +that the wire format of `ProtoType` and `T` are wire compatible. + +## Custom type method signatures + +The custom type must define the following methods with the given +signatures. Assuming the custom type is called `T`: + +```go +func (t T) Marshal() ([]byte, error) {} +func (t *T) MarshalTo(data []byte) (n int, err error) {} +func (t *T) Unmarshal(data []byte) error {} + +func (t T) MarshalJSON() ([]byte, error) {} +func (t *T) UnmarshalJSON(data []byte) error {} + +// only required if the compare option is set +func (t T) Compare(other T) int {} +// only required if the equal option is set +func (t T) Equal(other T) bool {} +// only required if populate option is set +func NewPopulatedT(r randyThetest) *T {} +``` + +Check [t.go](test/t.go) for a full example + +# Warnings and issues + +`Warning about customtype: It is your responsibility to test all cases of your marshaling, unmarshaling and size methods implemented for your custom type.` + +Issues with customtype include: + * A Bytes method is not allowed. + * Defining a customtype as a fake proto message is broken. + * proto.Clone is broken. + * Using a proto message as a customtype is not allowed. + * cusomtype of type map can not UnmarshalText + * customtype of type struct cannot jsonpb unmarshal diff --git a/deps/github.com/gogo/protobuf/extensions.md b/deps/github.com/gogo/protobuf/extensions.md new file mode 100644 index 000000000..af4ab57c5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/extensions.md @@ -0,0 +1,164 @@ +# gogoprotobuf Extensions + +Here is an [example.proto](https://github.com/gogo/protobuf/blob/master/test/example/example.proto) which uses most of the gogoprotobuf code generation plugins. + +Please also look at the example [Makefile](https://github.com/gogo/protobuf/blob/master/test/example/Makefile) which shows how to specify the `descriptor.proto` and `gogo.proto` in your proto_path + +The documentation at [http://godoc.org/github.com/gogo/protobuf/gogoproto](http://godoc.org/github.com/gogo/protobuf/gogoproto) describes the extensions made to goprotobuf in more detail. + +Also see [http://godoc.org/github.com/gogo/protobuf/plugin/](http://godoc.org/github.com/gogo/protobuf/plugin/) for documentation of each of the extensions which have their own plugins. + +# Fast Marshalling and Unmarshalling + +Generating a `Marshal`, `MarshalTo`, `Size` (or `ProtoSize`) and `Unmarshal` method for a struct results in faster marshalling and unmarshalling than when using reflect. + +See [BenchComparison](https://github.com/gogo/protobuf/blob/master/bench.md) for a comparison between reflect and generated code used for marshalling and unmarshalling. + + + + + + + + + + + +
NameOptionTypeDescriptionDefault
marshalerMessageboolif true, a Marshal and MarshalTo method is generated for the specific messagefalse
sizerMessageboolif true, a Size method is generated for the specific messagefalse
unmarshaler Message bool if true, an Unmarshal method is generated for the specific message false
protosizerMessageboolif true, a ProtoSize method is generated for the specific messagefalse
unsafe_marshaler (deprecated) Message bool if true, a Marshal and MarshalTo method is generated. false
unsafe_unmarshaler (deprecated) Message bool if true, an Unmarshal method is generated. false
stable_marshaler Message bool if true, a Marshal and MarshalTo method is generated for the specific message, but unlike marshaler the output is guaranteed to be deterministic, at the sacrifice of some speed false
typedecl (beta) Message bool if false, type declaration of the message is excluded from the generated output. Requires the marshaler and unmarshaler to be generated. true
+ +# More Canonical Go Structures + +Lots of times working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. + +You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a new struct. + +`gogoprotobuf` tries to fix these problems with the nullable, embed, customtype, customname, casttype, castkey and castvalue field extensions. + + + + + + + + + + + + + + + +
NameOptionTypeDescriptionDefault
nullable Field bool if false, a field is generated without a pointer (see warning below). true
embed Field bool if true, the field is generated as an embedded field. false
customtype Field string It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128. For more information please refer to the CustomTypes document goprotobuf type
customname (beta) Field string Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. goprotobuf field name
casttype (beta) Field string Changes the generated field type. It assumes that this type is castable to the original goprotobuf field type. It currently does not support maps, structs or enums. goprotobuf field type
castkey (beta) Field string Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. goprotobuf field type
castvalue (beta) Field string Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. goprotobuf field type
enum_customname (beta) Enum string Sets the type name of an enum. If goproto_enum_prefix is enabled, this value will be used as a prefix when generating enum values.goprotobuf enum type name. Helps with golint issues.
enumdecl (beta) Enum bool if false, type declaration of the enum is excluded from the generated output. Requires the marshaler and unmarshaler to be generated. true
enumvalue_customname (beta) Enum Value string Changes the generated enum name. Helps with golint issues.goprotobuf enum value name
stdtime Timestamp Field bool Changes the Well Known Timestamp Type to time.TimeTimestamp
stdduration Duration Field bool Changes the Well Known Duration Type to time.DurationDuration
+ +`Warning about nullable: according to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set.` + +# Goprotobuf Compatibility + +Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers (see the section on tests below). + +Gogoprotobuf generates the same code as goprotobuf if no extensions are used. + +The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf. + + + + + + + + + + + + +
NameOptionTypeDescriptionDefault
gogoproto_import File bool if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. true
goproto_enum_prefix Enum bool if false, generates the enum constant names without the messagetype prefix true
goproto_getters Message bool if false, the message is generated without get methods, this is useful when you would rather want to use face true
goproto_stringer Message bool if false, the message is generated without the default string method, this is useful for rather using stringer true
goproto_enum_stringer (experimental) Enum bool if false, the enum is generated without the default string method, this is useful for rather using enum_stringer true
goproto_extensions_map (beta) Message bool if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension true
goproto_unrecognized (beta) Message bool if false, XXX_unrecognized field is not generated. This is useful to reduce GC pressure at the cost of losing information about unrecognized fields. true
goproto_registration (beta) File bool if true, the generated files will register all messages and types against both gogo/protobuf and golang/protobuf. This is necessary when using third-party packages which read registrations from golang/protobuf (such as the grpc-gateway). false
message_name Message bool if true, a `XXX_MessageName()` method is generated that returns the message's name. This is useful for grpc-gateway compatibility. false
+ +# Less Typing + +The Protocol Buffer language is very parseable and extra code can be easily generated for structures. + +Helper methods, functions and interfaces can be generated by triggering certain extensions like gostring. + + + + + + + + + + + + + +
NameOptionTypeDescriptionDefault
gostring Message bool if true, a `GoString` method is generated. This returns a string representing valid go code to reproduce the current state of the struct. false
onlyone Message bool if true, all fields must be nullable and only one of the fields may be set, like a union. Two methods are generated: `GetValue() interface{}` and `SetValue(v interface{}) (set bool)`. These provide easier interaction with a union. false
equal Message bool if true, an Equal method is generated false
compare Message bool if true, a Compare method is generated. This is very useful for quickly implementing sort on a list of protobuf structs false
verbose_equal Message bool if true, a verbose equal method is generated for the message. This returns an error which describes the exact element which is not equal to the exact element in the other struct. false
stringer Message bool if true, a String method is generated for the message. false
face Message bool if true, a function will be generated which can convert a structure which satisfies an interface (face) to the specified structure. This interface contains getters for each of the fields in the struct. The specified struct is also generated with the getters. This allows it to satisfy its own face. false
description (beta) Message bool if true, a Description method is generated for the message. false
populate Message bool if true, a `NewPopulated` function is generated. This is necessary for generated tests. false
enum_stringer (experimental) Enum bool if true, a String method is generated for an Enum false
+ +Issues with Compare include: + * Oneof is not supported yet + * Not all Well Known Types are supported yet + * Maps are not supported + +#Peace of Mind + +Test and Benchmark generation is done with the following extensions: + + + + +
testgen Message bool if true, tests are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins false
benchgen Message bool if true, benchmarks are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins false
+ +# More Serialization Formats + +Other serialization formats like xml and json typically use reflect to marshal and unmarshal structured data. Manipulating these structs into something other than the default Go requires editing tags. The following extensions provide ways of editing these tags for the generated protobuf structs. + + + + +
jsontag (beta) Field string if set, the json tag value between the double quotes is replaced with this string fieldname
moretags (beta) Field string if set, this string is appended to the tag string empty
+ +Here is a longer explanation of jsontag and moretags + +# File Options + +Each of the boolean message and enum extensions also have a file extension: + + * `marshaler_all` + * `sizer_all` + * `protosizer_all` + * `unmarshaler_all` + * `unsafe_marshaler_all` + * `unsafe_unmarshaler_all` + * `stable_marshaler_all` + * `goproto_enum_prefix_all` + * `goproto_getters_all` + * `goproto_stringer_all` + * `goproto_enum_stringer_all` + * `goproto_extensions_map_all` + * `goproto_unrecognized_all` + * `gostring_all` + * `onlyone_all` + * `equal_all` + * `compare_all` + * `verbose_equal_all` + * `stringer_all` + * `enum_stringer_all` + * `face_all` + * `description_all` + * `populate_all` + * `testgen_all` + * `benchgen_all` + * `enumdecl_all` + * `typedecl_all` + * `messagename_all` + +Each of these are the same as their Message Option counterparts, except they apply to all messages in the file. Their Message option counterparts can also be used to overwrite their effect. + +# Tests + + * The normal barrage of tests are run with: `make tests` + * A few weird tests: `make testall` + * Tests for compatibility with [golang/protobuf](https://github.com/golang/protobuf) are handled by a different project [harmonytests](https://github.com/gogo/harmonytests), since it requires goprotobuf. + * Cross version tests are made with [Travis CI](https://travis-ci.org/gogo/protobuf). + * GRPC Tests are also handled by a different project [grpctests](https://github.com/gogo/grpctests), since it depends on a lot of grpc libraries. + * Thanks to [go-fuzz](https://github.com/dvyukov/go-fuzz/) we have proper [fuzztests](https://github.com/gogo/fuzztests). + diff --git a/deps/github.com/gogo/protobuf/gogoproto/Makefile b/deps/github.com/gogo/protobuf/gogoproto/Makefile index 02f9c62c2..0b4659b73 100644 --- a/deps/github.com/gogo/protobuf/gogoproto/Makefile +++ b/deps/github.com/gogo/protobuf/gogoproto/Makefile @@ -28,7 +28,7 @@ regenerate: go install github.com/gogo/protobuf/protoc-gen-gogo - protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../:../protobuf/:. *.proto + protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:../../../../ --proto_path=../../../../:../protobuf/:. *.proto restore: cp gogo.pb.golden gogo.pb.go diff --git a/deps/github.com/gogo/protobuf/gogoproto/gogo.pb.go b/deps/github.com/gogo/protobuf/gogoproto/gogo.pb.go index 9506b6fb2..97843b244 100644 --- a/deps/github.com/gogo/protobuf/gogoproto/gogo.pb.go +++ b/deps/github.com/gogo/protobuf/gogoproto/gogo.pb.go @@ -1,21 +1,12 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: gogo.proto -// DO NOT EDIT! -/* -Package gogoproto is a generated protocol buffer package. - -It is generated from these files: - gogo.proto - -It has these top-level messages: -*/ -package gogoproto +package gogoproto // import "github.com/gogo/protobuf/gogoproto" import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -29,7 +20,7 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtendedType: (*descriptor.EnumOptions)(nil), ExtensionType: (*bool)(nil), Field: 62001, Name: "gogoproto.goproto_enum_prefix", @@ -38,7 +29,7 @@ var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ } var E_GoprotoEnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtendedType: (*descriptor.EnumOptions)(nil), ExtensionType: (*bool)(nil), Field: 62021, Name: "gogoproto.goproto_enum_stringer", @@ -47,7 +38,7 @@ var E_GoprotoEnumStringer = &proto.ExtensionDesc{ } var E_EnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtendedType: (*descriptor.EnumOptions)(nil), ExtensionType: (*bool)(nil), Field: 62022, Name: "gogoproto.enum_stringer", @@ -56,7 +47,7 @@ var E_EnumStringer = &proto.ExtensionDesc{ } var E_EnumCustomname = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtendedType: (*descriptor.EnumOptions)(nil), ExtensionType: (*string)(nil), Field: 62023, Name: "gogoproto.enum_customname", @@ -65,7 +56,7 @@ var E_EnumCustomname = &proto.ExtensionDesc{ } var E_Enumdecl = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtendedType: (*descriptor.EnumOptions)(nil), ExtensionType: (*bool)(nil), Field: 62024, Name: "gogoproto.enumdecl", @@ -74,7 +65,7 @@ var E_Enumdecl = &proto.ExtensionDesc{ } var E_EnumvalueCustomname = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.EnumValueOptions)(nil), + ExtendedType: (*descriptor.EnumValueOptions)(nil), ExtensionType: (*string)(nil), Field: 66001, Name: "gogoproto.enumvalue_customname", @@ -83,7 +74,7 @@ var E_EnumvalueCustomname = &proto.ExtensionDesc{ } var E_GoprotoGettersAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63001, Name: "gogoproto.goproto_getters_all", @@ -92,7 +83,7 @@ var E_GoprotoGettersAll = &proto.ExtensionDesc{ } var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63002, Name: "gogoproto.goproto_enum_prefix_all", @@ -101,7 +92,7 @@ var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ } var E_GoprotoStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63003, Name: "gogoproto.goproto_stringer_all", @@ -110,7 +101,7 @@ var E_GoprotoStringerAll = &proto.ExtensionDesc{ } var E_VerboseEqualAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63004, Name: "gogoproto.verbose_equal_all", @@ -119,7 +110,7 @@ var E_VerboseEqualAll = &proto.ExtensionDesc{ } var E_FaceAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63005, Name: "gogoproto.face_all", @@ -128,7 +119,7 @@ var E_FaceAll = &proto.ExtensionDesc{ } var E_GostringAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63006, Name: "gogoproto.gostring_all", @@ -137,7 +128,7 @@ var E_GostringAll = &proto.ExtensionDesc{ } var E_PopulateAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63007, Name: "gogoproto.populate_all", @@ -146,7 +137,7 @@ var E_PopulateAll = &proto.ExtensionDesc{ } var E_StringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63008, Name: "gogoproto.stringer_all", @@ -155,7 +146,7 @@ var E_StringerAll = &proto.ExtensionDesc{ } var E_OnlyoneAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63009, Name: "gogoproto.onlyone_all", @@ -164,7 +155,7 @@ var E_OnlyoneAll = &proto.ExtensionDesc{ } var E_EqualAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63013, Name: "gogoproto.equal_all", @@ -173,7 +164,7 @@ var E_EqualAll = &proto.ExtensionDesc{ } var E_DescriptionAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63014, Name: "gogoproto.description_all", @@ -182,7 +173,7 @@ var E_DescriptionAll = &proto.ExtensionDesc{ } var E_TestgenAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63015, Name: "gogoproto.testgen_all", @@ -191,7 +182,7 @@ var E_TestgenAll = &proto.ExtensionDesc{ } var E_BenchgenAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63016, Name: "gogoproto.benchgen_all", @@ -200,7 +191,7 @@ var E_BenchgenAll = &proto.ExtensionDesc{ } var E_MarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63017, Name: "gogoproto.marshaler_all", @@ -209,7 +200,7 @@ var E_MarshalerAll = &proto.ExtensionDesc{ } var E_UnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63018, Name: "gogoproto.unmarshaler_all", @@ -218,7 +209,7 @@ var E_UnmarshalerAll = &proto.ExtensionDesc{ } var E_StableMarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63019, Name: "gogoproto.stable_marshaler_all", @@ -227,7 +218,7 @@ var E_StableMarshalerAll = &proto.ExtensionDesc{ } var E_SizerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63020, Name: "gogoproto.sizer_all", @@ -236,7 +227,7 @@ var E_SizerAll = &proto.ExtensionDesc{ } var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63021, Name: "gogoproto.goproto_enum_stringer_all", @@ -245,7 +236,7 @@ var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ } var E_EnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63022, Name: "gogoproto.enum_stringer_all", @@ -254,7 +245,7 @@ var E_EnumStringerAll = &proto.ExtensionDesc{ } var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63023, Name: "gogoproto.unsafe_marshaler_all", @@ -263,7 +254,7 @@ var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ } var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63024, Name: "gogoproto.unsafe_unmarshaler_all", @@ -272,7 +263,7 @@ var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ } var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63025, Name: "gogoproto.goproto_extensions_map_all", @@ -281,7 +272,7 @@ var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ } var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63026, Name: "gogoproto.goproto_unrecognized_all", @@ -290,7 +281,7 @@ var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ } var E_GogoprotoImport = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63027, Name: "gogoproto.gogoproto_import", @@ -299,7 +290,7 @@ var E_GogoprotoImport = &proto.ExtensionDesc{ } var E_ProtosizerAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63028, Name: "gogoproto.protosizer_all", @@ -308,7 +299,7 @@ var E_ProtosizerAll = &proto.ExtensionDesc{ } var E_CompareAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63029, Name: "gogoproto.compare_all", @@ -317,7 +308,7 @@ var E_CompareAll = &proto.ExtensionDesc{ } var E_TypedeclAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63030, Name: "gogoproto.typedecl_all", @@ -326,7 +317,7 @@ var E_TypedeclAll = &proto.ExtensionDesc{ } var E_EnumdeclAll = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63031, Name: "gogoproto.enumdecl_all", @@ -335,7 +326,7 @@ var E_EnumdeclAll = &proto.ExtensionDesc{ } var E_GoprotoRegistration = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtendedType: (*descriptor.FileOptions)(nil), ExtensionType: (*bool)(nil), Field: 63032, Name: "gogoproto.goproto_registration", @@ -343,8 +334,17 @@ var E_GoprotoRegistration = &proto.ExtensionDesc{ Filename: "gogo.proto", } +var E_MessagenameAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63033, + Name: "gogoproto.messagename_all", + Tag: "varint,63033,opt,name=messagename_all,json=messagenameAll", + Filename: "gogo.proto", +} + var E_GoprotoGetters = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64001, Name: "gogoproto.goproto_getters", @@ -353,7 +353,7 @@ var E_GoprotoGetters = &proto.ExtensionDesc{ } var E_GoprotoStringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64003, Name: "gogoproto.goproto_stringer", @@ -362,7 +362,7 @@ var E_GoprotoStringer = &proto.ExtensionDesc{ } var E_VerboseEqual = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64004, Name: "gogoproto.verbose_equal", @@ -371,7 +371,7 @@ var E_VerboseEqual = &proto.ExtensionDesc{ } var E_Face = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64005, Name: "gogoproto.face", @@ -380,7 +380,7 @@ var E_Face = &proto.ExtensionDesc{ } var E_Gostring = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64006, Name: "gogoproto.gostring", @@ -389,7 +389,7 @@ var E_Gostring = &proto.ExtensionDesc{ } var E_Populate = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64007, Name: "gogoproto.populate", @@ -398,7 +398,7 @@ var E_Populate = &proto.ExtensionDesc{ } var E_Stringer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 67008, Name: "gogoproto.stringer", @@ -407,7 +407,7 @@ var E_Stringer = &proto.ExtensionDesc{ } var E_Onlyone = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64009, Name: "gogoproto.onlyone", @@ -416,7 +416,7 @@ var E_Onlyone = &proto.ExtensionDesc{ } var E_Equal = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64013, Name: "gogoproto.equal", @@ -425,7 +425,7 @@ var E_Equal = &proto.ExtensionDesc{ } var E_Description = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64014, Name: "gogoproto.description", @@ -434,7 +434,7 @@ var E_Description = &proto.ExtensionDesc{ } var E_Testgen = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64015, Name: "gogoproto.testgen", @@ -443,7 +443,7 @@ var E_Testgen = &proto.ExtensionDesc{ } var E_Benchgen = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64016, Name: "gogoproto.benchgen", @@ -452,7 +452,7 @@ var E_Benchgen = &proto.ExtensionDesc{ } var E_Marshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64017, Name: "gogoproto.marshaler", @@ -461,7 +461,7 @@ var E_Marshaler = &proto.ExtensionDesc{ } var E_Unmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64018, Name: "gogoproto.unmarshaler", @@ -470,7 +470,7 @@ var E_Unmarshaler = &proto.ExtensionDesc{ } var E_StableMarshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64019, Name: "gogoproto.stable_marshaler", @@ -479,7 +479,7 @@ var E_StableMarshaler = &proto.ExtensionDesc{ } var E_Sizer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64020, Name: "gogoproto.sizer", @@ -488,7 +488,7 @@ var E_Sizer = &proto.ExtensionDesc{ } var E_UnsafeMarshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64023, Name: "gogoproto.unsafe_marshaler", @@ -497,7 +497,7 @@ var E_UnsafeMarshaler = &proto.ExtensionDesc{ } var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64024, Name: "gogoproto.unsafe_unmarshaler", @@ -506,7 +506,7 @@ var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ } var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64025, Name: "gogoproto.goproto_extensions_map", @@ -515,7 +515,7 @@ var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ } var E_GoprotoUnrecognized = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64026, Name: "gogoproto.goproto_unrecognized", @@ -524,7 +524,7 @@ var E_GoprotoUnrecognized = &proto.ExtensionDesc{ } var E_Protosizer = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64028, Name: "gogoproto.protosizer", @@ -533,7 +533,7 @@ var E_Protosizer = &proto.ExtensionDesc{ } var E_Compare = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64029, Name: "gogoproto.compare", @@ -542,7 +542,7 @@ var E_Compare = &proto.ExtensionDesc{ } var E_Typedecl = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtendedType: (*descriptor.MessageOptions)(nil), ExtensionType: (*bool)(nil), Field: 64030, Name: "gogoproto.typedecl", @@ -550,8 +550,17 @@ var E_Typedecl = &proto.ExtensionDesc{ Filename: "gogo.proto", } +var E_Messagename = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64033, + Name: "gogoproto.messagename", + Tag: "varint,64033,opt,name=messagename", + Filename: "gogo.proto", +} + var E_Nullable = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 65001, Name: "gogoproto.nullable", @@ -560,7 +569,7 @@ var E_Nullable = &proto.ExtensionDesc{ } var E_Embed = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 65002, Name: "gogoproto.embed", @@ -569,7 +578,7 @@ var E_Embed = &proto.ExtensionDesc{ } var E_Customtype = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 65003, Name: "gogoproto.customtype", @@ -578,7 +587,7 @@ var E_Customtype = &proto.ExtensionDesc{ } var E_Customname = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 65004, Name: "gogoproto.customname", @@ -587,7 +596,7 @@ var E_Customname = &proto.ExtensionDesc{ } var E_Jsontag = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 65005, Name: "gogoproto.jsontag", @@ -596,7 +605,7 @@ var E_Jsontag = &proto.ExtensionDesc{ } var E_Moretags = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 65006, Name: "gogoproto.moretags", @@ -605,7 +614,7 @@ var E_Moretags = &proto.ExtensionDesc{ } var E_Casttype = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 65007, Name: "gogoproto.casttype", @@ -614,7 +623,7 @@ var E_Casttype = &proto.ExtensionDesc{ } var E_Castkey = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 65008, Name: "gogoproto.castkey", @@ -623,7 +632,7 @@ var E_Castkey = &proto.ExtensionDesc{ } var E_Castvalue = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*string)(nil), Field: 65009, Name: "gogoproto.castvalue", @@ -632,7 +641,7 @@ var E_Castvalue = &proto.ExtensionDesc{ } var E_Stdtime = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 65010, Name: "gogoproto.stdtime", @@ -641,7 +650,7 @@ var E_Stdtime = &proto.ExtensionDesc{ } var E_Stdduration = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtendedType: (*descriptor.FieldOptions)(nil), ExtensionType: (*bool)(nil), Field: 65011, Name: "gogoproto.stdduration", @@ -685,6 +694,7 @@ func init() { proto.RegisterExtension(E_TypedeclAll) proto.RegisterExtension(E_EnumdeclAll) proto.RegisterExtension(E_GoprotoRegistration) + proto.RegisterExtension(E_MessagenameAll) proto.RegisterExtension(E_GoprotoGetters) proto.RegisterExtension(E_GoprotoStringer) proto.RegisterExtension(E_VerboseEqual) @@ -708,6 +718,7 @@ func init() { proto.RegisterExtension(E_Protosizer) proto.RegisterExtension(E_Compare) proto.RegisterExtension(E_Typedecl) + proto.RegisterExtension(E_Messagename) proto.RegisterExtension(E_Nullable) proto.RegisterExtension(E_Embed) proto.RegisterExtension(E_Customtype) @@ -721,84 +732,86 @@ func init() { proto.RegisterExtension(E_Stdduration) } -func init() { proto.RegisterFile("gogo.proto", fileDescriptorGogo) } - -var fileDescriptorGogo = []byte{ - // 1201 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0xcb, 0x6f, 0x1c, 0x45, - 0x13, 0xc0, 0xf5, 0xe9, 0x73, 0x64, 0x6f, 0xf9, 0x85, 0xd7, 0xc6, 0x84, 0x08, 0x44, 0x72, 0xe3, - 0xe4, 0x9c, 0x22, 0x94, 0xb6, 0x22, 0xcb, 0xb1, 0x1c, 0x2b, 0x11, 0x06, 0x63, 0xe2, 0x00, 0xe2, - 0xb0, 0x9a, 0xdd, 0x6d, 0x4f, 0x06, 0x66, 0xa6, 0x87, 0x99, 0x9e, 0x28, 0xce, 0x0d, 0x85, 0x87, - 0x10, 0xe2, 0x8d, 0x04, 0x09, 0x49, 0x80, 0x03, 0xef, 0x67, 0x78, 0x1f, 0xb9, 0xf0, 0xb8, 0xf2, - 0x3f, 0x70, 0x01, 0xcc, 0xdb, 0x37, 0x5f, 0x50, 0xcd, 0x56, 0xcd, 0xf6, 0xac, 0x57, 0xea, 0xde, - 0xdb, 0xec, 0xba, 0x7f, 0xbf, 0xad, 0xa9, 0x9a, 0xae, 0xea, 0x31, 0x80, 0xaf, 0x7c, 0x35, 0x97, - 0xa4, 0x4a, 0xab, 0x7a, 0x0d, 0xaf, 0x8b, 0xcb, 0x03, 0x07, 0x7d, 0xa5, 0xfc, 0x50, 0x1e, 0x2e, - 0x3e, 0x35, 0xf3, 0xcd, 0xc3, 0x6d, 0x99, 0xb5, 0xd2, 0x20, 0xd1, 0x2a, 0xed, 0x2c, 0x16, 0x77, - 0xc1, 0x34, 0x2d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x33, 0x94, 0x8d, 0x41, 0x6c, 0x1f, 0xf0, 0xd6, 0xeb, 0xb0, 0xab, 0xa6, 0x71, 0x1e, 0x6a, 0x59, - 0x70, 0xc1, 0x49, 0xf3, 0x21, 0x57, 0xba, 0x00, 0x10, 0x7e, 0x00, 0x6e, 0xee, 0x3b, 0x26, 0x1c, - 0x64, 0x1f, 0x91, 0x6c, 0xb6, 0xcf, 0xa8, 0xa0, 0x96, 0x30, 0xa8, 0xf2, 0x63, 0x6e, 0x09, 0xb2, - 0xc7, 0xb5, 0x06, 0x33, 0x79, 0x9c, 0x79, 0x9b, 0x83, 0x65, 0xed, 0x13, 0xce, 0x5a, 0x87, 0xad, - 0x64, 0xed, 0x34, 0xcc, 0x92, 0x71, 0xb0, 0xba, 0x7e, 0xca, 0x8d, 0xb5, 0x43, 0x6f, 0x54, 0xab, - 0xfb, 0x20, 0x1c, 0x28, 0xd3, 0x79, 0x5e, 0xcb, 0x38, 0x43, 0xa6, 0x11, 0x79, 0x89, 0x83, 0xf9, - 0x3a, 0x99, 0xb9, 0xe3, 0x2f, 0x97, 0x82, 0x55, 0x2f, 0x41, 0xf9, 0xfd, 0xb0, 0x9f, 0xe5, 0x79, - 0x9c, 0xca, 0x96, 0xf2, 0xe3, 0xe0, 0x82, 0x6c, 0x3b, 0xa8, 0x3f, 0xeb, 0x29, 0xd5, 0x86, 0x81, - 0xa3, 0xf9, 0x24, 0xdc, 0x50, 0x9e, 0x55, 0x1a, 0x41, 0x94, 0xa8, 0x54, 0x5b, 0x8c, 0x9f, 0x73, - 0xa5, 0x4a, 0xee, 0x64, 0x81, 0x89, 0x65, 0x98, 0x28, 0x3e, 0xba, 0x3e, 0x92, 0x5f, 0x90, 0x68, - 0xbc, 0x4b, 0x51, 0xe3, 0x68, 0xa9, 0x28, 0xf1, 0x52, 0x97, 0xfe, 0xf7, 0x25, 0x37, 0x0e, 0x42, - 0xa8, 0x71, 0xe8, 0xad, 0x44, 0xe2, 0xb4, 0x77, 0x30,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xbb, 0x9d, 0xf7, 0x7a, 0x03, 0xe9, 0x0a, 0x8a, 0xb7, 0x71, 0x8b, 0x60, - 0xbb, 0x2a, 0x28, 0x5e, 0xc0, 0x8f, 0xc2, 0xf0, 0x43, 0x99, 0x8a, 0xb5, 0xe7, 0xdb, 0xe8, 0xdf, - 0x89, 0xe6, 0xf5, 0x98, 0xb0, 0x48, 0xa5, 0x52, 0x7b, 0x7e, 0x66, 0x63, 0xff, 0x20, 0xb6, 0x04, - 0x10, 0x6e, 0x79, 0x99, 0x76, 0xb9, 0xef, 0x3f, 0x19, 0x66, 0x00, 0x83, 0xc6, 0xeb, 0x87, 0xe5, - 0x96, 0x8d, 0xfd, 0x8b, 0x83, 0xa6, 0xf5, 0xe2, 0x18, 0xd4, 0xf0, 0xb2, 0xf8, 0x3f, 0x84, 0x0d, - 0xfe, 0x9b, 0xe0, 0x2e, 0x81, 0xbf, 0x9c, 0xe9, 0xb6, 0x0e, 0xec, 0xc9, 0xfe, 0x87, 0x2a, 0xcd, - 0xeb, 0xc5, 0x22, 0x8c, 0x66, 0xba, 0xdd, 0xce, 0xe9, 0x44, 0x63, 0xc1, 0xff, 0xdd, 0x2d, 0x5f, - 0x72, 0x4b, 0xe6, 0xf8, 0x21, 0x98, 0x6e, 0xa9, 0xa8, 0x17, 0x3c, 0x0e, 0x2b, 0x6a, 0x45, 0xad, - 0x15, 0xbb, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x9c, 0xec, 0xd8, 0x50, 0x13, 0x00, - 0x00, +func init() { proto.RegisterFile("gogo.proto", fileDescriptor_gogo_68790841c0f79064) } + +var fileDescriptor_gogo_68790841c0f79064 = []byte{ + // 1246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x49, 0x6f, 0x1c, 0x45, + 0x14, 0x80, 0x85, 0x70, 0x64, 0xcf, 0xf3, 0x86, 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c3, 0x78, + 0x1f, 0xa1, 0x62, 0x11, 0x46, 0xfb, 0x71, 0xfd, 0x48, 0xae, 0x11, 0x69, 0x4a, 0x96, 0x61, 0x3c, + 0x97, 0x34, 0xb2, 0x54, 0xab, 0x28, 0xf6, 0x22, 0x69, 0xd1, 0xfc, 0x94, 0x6b, 0x2a, 0x6b, 0x63, + 0x88, 0x2d, 0x96, 0x94, 0x10, 0x30, 0x84, 0xbf, 0x69, 0xca, 0x46, 0x68, 0x31, 0xfc, 0x4c, 0x1b, + 0x29, 0xd7, 0x8b, 0x93, 0x30, 0x85, 0xcf, 0xa7, 0xbc, 0x30, 0x93, 0xe6, 0x4e, 0x6e, 0xed, 0xe9, + 0x39, 0x89, 0xcb, 0x58, 0xf6, 0xcb, 0xd9, 0x81, 0x7c, 0x3b, 0x93, 0xa5, 0xc0, 0xd8, 0x93, 0x91, + 0x45, 0x5f, 0x6a, 0x2d, 0x93, 0xb4, 0xe6, 0x85, 0xbd, 0xb6, 0x77, 0x2c, 0x08, 0x4b, 0xe3, 0xb9, + 0xed, 0xce, 0x2c, 0x2e, 0x17, 0xe4, 0x42, 0x18, 0x8a, 0x75, 0xb8, 0xa1, 0xc7, 0xa9, 0x70, 0x70, + 0x9e, 0x27, 0xe7, 0xd4, 0x9e, 0x93, 0x81, 0xda, 0x55, 0xe0, 0xdf, 0x97, 0xb9, 0x74, 0x70, 0xbe, + 0x41, 0xce, 0x2a, 0xb1, 0x9c, 0x52, 0x34, 0xde, 0x09, 0x13, 0xa7, 0x64, 0x52, 0x57, 0xa9, 0xac, + 0xc9, 0xc7, 0x32, 0x2f, 0x74, 0xd0, 0x5d, 0x20, 0xdd, 0x38, 0x81, 0x4b, 0xc8, 0xa1, 0xeb, 0x30, + 0x0c, 0x6d, 0x78, 0x0d, 0xe9, 0xa0, 0xb8, 0x48, 0x8a, 0x41, 0x5c, 0x8f, 0xe8, 0x02, 0x8c, 0xf8, + 0xaa, 0x78, 0x25, 0x07, 0xfc, 0x12, 0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60, 0x91, + 0x4a, 0xa4, 0xf6, 0xfc, 0xd4, 0xc6, 0xfe, 0x45, 0x6c, 0x09, 0x20, 0xdc, 0xf0, 0x52, 0xed, 0xf2, + 0xde, 0x7f, 0x33, 0xcc, 0x00, 0x6e, 0x1a, 0x9f, 0x1f, 0x95, 0x5b, 0x36, 0xf6, 0x1f, 0xde, 0x34, + 0xad, 0x17, 0x47, 0xa0, 0x82, 0x8f, 0xf9, 0xb7, 0x22, 0x36, 0xf8, 0x5f, 0x82, 0xdb, 0x04, 0xfe, + 0xe7, 0x54, 0x37, 0x75, 0x60, 0x0f, 0xf6, 0x7f, 0x94, 0x69, 0x5e, 0x2f, 0x16, 0x60, 0x38, 0xd5, + 0xcd, 0x66, 0x46, 0xf3, 0x95, 0x05, 0xff, 0x7f, 0xb7, 0xfc, 0xc8, 0x5d, 0x32, 0x47, 0x97, 0x60, + 0xb2, 0xa1, 0xa2, 0x6e, 0xf0, 0x28, 0x2c, 0xab, 0x65, 0xb5, 0x9a, 0x5f, 0xc5, 0x87, 0x6e, 0xf3, + 0x03, 0xbd, 0x99, 0xd5, 0x67, 0x1a, 0x2a, 0x9a, 0xc5, 0xc1, 0xb7, 0xfd, 0x7d, 0x5e, 0x39, 0x06, + 0x5f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x51, 0xf0, 0xa5, 0x95, 0x02, 0x14, 0x00, 0x00, } diff --git a/deps/github.com/gogo/protobuf/gogoproto/gogo.proto b/deps/github.com/gogo/protobuf/gogoproto/gogo.proto index fbca44cd4..bc8d889f1 100644 --- a/deps/github.com/gogo/protobuf/gogoproto/gogo.proto +++ b/deps/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -33,6 +33,7 @@ import "google/protobuf/descriptor.proto"; option java_package = "com.google.protobuf"; option java_outer_classname = "GoGoProtos"; +option go_package = "github.com/gogo/protobuf/gogoproto"; extend google.protobuf.EnumOptions { optional bool goproto_enum_prefix = 62001; @@ -82,6 +83,7 @@ extend google.protobuf.FileOptions { optional bool enumdecl_all = 63031; optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; } extend google.protobuf.MessageOptions { @@ -114,6 +116,8 @@ extend google.protobuf.MessageOptions { optional bool compare = 64029; optional bool typedecl = 64030; + + optional bool messagename = 64033; } extend google.protobuf.FieldOptions { diff --git a/deps/github.com/gogo/protobuf/gogoproto/helper.go b/deps/github.com/gogo/protobuf/gogoproto/helper.go index 6b851c562..22910c6d4 100644 --- a/deps/github.com/gogo/protobuf/gogoproto/helper.go +++ b/deps/github.com/gogo/protobuf/gogoproto/helper.go @@ -334,9 +334,6 @@ func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google } func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - if IsProto3(file) { - return false - } return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) } @@ -355,3 +352,7 @@ func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_proto func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false) } + +func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false)) +} diff --git a/deps/github.com/gogo/protobuf/gogoreplace/main.go b/deps/github.com/gogo/protobuf/gogoreplace/main.go new file mode 100644 index 000000000..3eab56513 --- /dev/null +++ b/deps/github.com/gogo/protobuf/gogoreplace/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "bytes" + "fmt" + "io/ioutil" + "os" +) + +func main() { + args := os.Args + if len(args) != 4 { + fmt.Println("gogoreplace wants three arguments") + fmt.Println(" gogoreplace oldsubstring newsubstring filename") + os.Exit(1) + } + data, err := ioutil.ReadFile(args[3]) + if err != nil { + panic(err) + } + data = bytes.Replace(data, []byte(args[1]), []byte(args[2]), -1) + if err := ioutil.WriteFile(args[3], data, 0666); err != nil { + panic(err) + } +} diff --git a/deps/github.com/gogo/protobuf/install-protobuf.sh b/deps/github.com/gogo/protobuf/install-protobuf.sh new file mode 100755 index 000000000..f42fc9e63 --- /dev/null +++ b/deps/github.com/gogo/protobuf/install-protobuf.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -ex + +die() { + echo "$@" >&2 + exit 1 +} + +cd /home/travis + +case "$PROTOBUF_VERSION" in +2*) + basename=protobuf-$PROTOBUF_VERSION + wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.tar.gz + tar xzf $basename.tar.gz + cd protobuf-$PROTOBUF_VERSION + ./configure --prefix=/home/travis && make -j2 && make install + ;; +3*) + basename=protoc-$PROTOBUF_VERSION-linux-x86_64 + wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.zip + unzip $basename.zip + ;; +*) + die "unknown protobuf version: $PROTOBUF_VERSION" + ;; +esac diff --git a/deps/github.com/gogo/protobuf/io/full.go b/deps/github.com/gogo/protobuf/io/full.go new file mode 100644 index 000000000..550726a32 --- /dev/null +++ b/deps/github.com/gogo/protobuf/io/full.go @@ -0,0 +1,102 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "github.com/gogo/protobuf/proto" + "io" +) + +func NewFullWriter(w io.Writer) WriteCloser { + return &fullWriter{w, nil} +} + +type fullWriter struct { + w io.Writer + buffer []byte +} + +func (this *fullWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if !ok { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + if n >= len(this.buffer) { + this.buffer = make([]byte, n) + } + _, err = m.MarshalTo(this.buffer) + if err != nil { + return err + } + data = this.buffer[:n] + } else { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + _, err = this.w.Write(data) + return err +} + +func (this *fullWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type fullReader struct { + r io.Reader + buf []byte +} + +func NewFullReader(r io.Reader, maxSize int) ReadCloser { + return &fullReader{r, make([]byte, maxSize)} +} + +func (this *fullReader) ReadMsg(msg proto.Message) error { + length, err := this.r.Read(this.buf) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *fullReader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/deps/github.com/gogo/protobuf/io/io.go b/deps/github.com/gogo/protobuf/io/io.go new file mode 100644 index 000000000..6dca519a1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/io/io.go @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "github.com/gogo/protobuf/proto" + "io" +) + +type Writer interface { + WriteMsg(proto.Message) error +} + +type WriteCloser interface { + Writer + io.Closer +} + +type Reader interface { + ReadMsg(msg proto.Message) error +} + +type ReadCloser interface { + Reader + io.Closer +} + +type marshaler interface { + MarshalTo(data []byte) (n int, err error) +} + +func getSize(v interface{}) (int, bool) { + if sz, ok := v.(interface { + Size() (n int) + }); ok { + return sz.Size(), true + } else if sz, ok := v.(interface { + ProtoSize() (n int) + }); ok { + return sz.ProtoSize(), true + } else { + return 0, false + } +} diff --git a/deps/github.com/gogo/protobuf/io/io_test.go b/deps/github.com/gogo/protobuf/io/io_test.go new file mode 100644 index 000000000..0b74b3100 --- /dev/null +++ b/deps/github.com/gogo/protobuf/io/io_test.go @@ -0,0 +1,221 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io_test + +import ( + "bytes" + "encoding/binary" + "github.com/gogo/protobuf/io" + "github.com/gogo/protobuf/test" + goio "io" + "math/rand" + "testing" + "time" +) + +func iotest(writer io.WriteCloser, reader io.ReadCloser) error { + size := 1000 + msgs := make([]*test.NinOptNative, size) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + for i := range msgs { + msgs[i] = test.NewPopulatedNinOptNative(r, true) + //issue 31 + if i == 5 { + msgs[i] = &test.NinOptNative{} + } + //issue 31 + if i == 999 { + msgs[i] = &test.NinOptNative{} + } + err := writer.WriteMsg(msgs[i]) + if err != nil { + return err + } + } + if err := writer.Close(); err != nil { + return err + } + i := 0 + for { + msg := &test.NinOptNative{} + if err := reader.ReadMsg(msg); err != nil { + if err == goio.EOF { + break + } + return err + } + if err := msg.VerboseEqual(msgs[i]); err != nil { + return err + } + i++ + } + if i != size { + panic("not enough messages read") + } + if err := reader.Close(); err != nil { + return err + } + return nil +} + +type buffer struct { + *bytes.Buffer + closed bool +} + +func (this *buffer) Close() error { + this.closed = true + return nil +} + +func newBuffer() *buffer { + return &buffer{bytes.NewBuffer(nil), false} +} + +func TestBigUint32Normal(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) + reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestBigUint32MaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) + reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestLittleUint32Normal(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) + reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestLittleUint32MaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) + reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestVarintNormal(t *testing.T) { + buf := newBuffer() + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestVarintNoClose(t *testing.T) { + buf := bytes.NewBuffer(nil) + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } +} + +//issue 32 +func TestVarintMaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestVarintError(t *testing.T) { + buf := newBuffer() + buf.Write([]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f}) + reader := io.NewDelimitedReader(buf, 1024*1024) + msg := &test.NinOptNative{} + err := reader.ReadMsg(msg) + if err == nil { + t.Fatalf("Expected error") + } +} + +func TestFull(t *testing.T) { + buf := newBuffer() + writer := io.NewFullWriter(buf) + reader := io.NewFullReader(buf, 1024*1024) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + msgIn := test.NewPopulatedNinOptNative(r, true) + if err := writer.WriteMsg(msgIn); err != nil { + panic(err) + } + if err := writer.Close(); err != nil { + panic(err) + } + msgOut := &test.NinOptNative{} + if err := reader.ReadMsg(msgOut); err != nil { + panic(err) + } + if err := msgIn.VerboseEqual(msgOut); err != nil { + panic(err) + } + if err := reader.ReadMsg(msgOut); err != nil { + if err != goio.EOF { + panic(err) + } + } + if err := reader.Close(); err != nil { + panic(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} diff --git a/deps/github.com/gogo/protobuf/io/uint32.go b/deps/github.com/gogo/protobuf/io/uint32.go new file mode 100644 index 000000000..fc43857dd --- /dev/null +++ b/deps/github.com/gogo/protobuf/io/uint32.go @@ -0,0 +1,138 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "encoding/binary" + "io" + + "github.com/gogo/protobuf/proto" +) + +const uint32BinaryLen = 4 + +func NewUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder) WriteCloser { + return &uint32Writer{w, byteOrder, nil, make([]byte, uint32BinaryLen)} +} + +func NewSizeUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder, size int) WriteCloser { + return &uint32Writer{w, byteOrder, make([]byte, size), make([]byte, uint32BinaryLen)} +} + +type uint32Writer struct { + w io.Writer + byteOrder binary.ByteOrder + buffer []byte + lenBuf []byte +} + +func (this *uint32Writer) writeFallback(msg proto.Message) error { + data, err := proto.Marshal(msg) + if err != nil { + return err + } + + length := uint32(len(data)) + this.byteOrder.PutUint32(this.lenBuf, length) + if _, err = this.w.Write(this.lenBuf); err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *uint32Writer) WriteMsg(msg proto.Message) error { + m, ok := msg.(marshaler) + if !ok { + return this.writeFallback(msg) + } + + n, ok := getSize(m) + if !ok { + return this.writeFallback(msg) + } + + size := n + uint32BinaryLen + if size > len(this.buffer) { + this.buffer = make([]byte, size) + } + + this.byteOrder.PutUint32(this.buffer, uint32(n)) + if _, err := m.MarshalTo(this.buffer[uint32BinaryLen:]); err != nil { + return err + } + + _, err := this.w.Write(this.buffer[:size]) + return err +} + +func (this *uint32Writer) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type uint32Reader struct { + r io.Reader + byteOrder binary.ByteOrder + lenBuf []byte + buf []byte + maxSize int +} + +func NewUint32DelimitedReader(r io.Reader, byteOrder binary.ByteOrder, maxSize int) ReadCloser { + return &uint32Reader{r, byteOrder, make([]byte, 4), nil, maxSize} +} + +func (this *uint32Reader) ReadMsg(msg proto.Message) error { + if _, err := io.ReadFull(this.r, this.lenBuf); err != nil { + return err + } + length32 := this.byteOrder.Uint32(this.lenBuf) + length := int(length32) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if length >= len(this.buf) { + this.buf = make([]byte, length) + } + _, err := io.ReadFull(this.r, this.buf[:length]) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *uint32Reader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/deps/github.com/gogo/protobuf/io/uint32_test.go b/deps/github.com/gogo/protobuf/io/uint32_test.go new file mode 100644 index 000000000..d837e4a93 --- /dev/null +++ b/deps/github.com/gogo/protobuf/io/uint32_test.go @@ -0,0 +1,38 @@ +package io_test + +import ( + "encoding/binary" + "io/ioutil" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/test" + example "github.com/gogo/protobuf/test/example" + + "github.com/gogo/protobuf/io" +) + +func BenchmarkUint32DelimWriterMarshaller(b *testing.B) { + w := io.NewUint32DelimitedWriter(ioutil.Discard, binary.BigEndian) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + msg := example.NewPopulatedA(r, true) + + for i := 0; i < b.N; i++ { + if err := w.WriteMsg(msg); err != nil { + b.Fatal(err) + } + } +} + +func BenchmarkUint32DelimWriterFallback(b *testing.B) { + w := io.NewUint32DelimitedWriter(ioutil.Discard, binary.BigEndian) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + msg := test.NewPopulatedNinOptNative(r, true) + + for i := 0; i < b.N; i++ { + if err := w.WriteMsg(msg); err != nil { + b.Fatal(err) + } + } +} diff --git a/deps/github.com/gogo/protobuf/io/varint.go b/deps/github.com/gogo/protobuf/io/varint.go new file mode 100644 index 000000000..a72e14a58 --- /dev/null +++ b/deps/github.com/gogo/protobuf/io/varint.go @@ -0,0 +1,134 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package io + +import ( + "bufio" + "encoding/binary" + "errors" + "github.com/gogo/protobuf/proto" + "io" +) + +var ( + errSmallBuffer = errors.New("Buffer Too Small") + errLargeValue = errors.New("Value is Larger than 64 bits") +) + +func NewDelimitedWriter(w io.Writer) WriteCloser { + return &varintWriter{w, make([]byte, 10), nil} +} + +type varintWriter struct { + w io.Writer + lenBuf []byte + buffer []byte +} + +func (this *varintWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if !ok { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + if n >= len(this.buffer) { + this.buffer = make([]byte, n) + } + _, err = m.MarshalTo(this.buffer) + if err != nil { + return err + } + data = this.buffer[:n] + } else { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + length := uint64(len(data)) + n := binary.PutUvarint(this.lenBuf, length) + _, err = this.w.Write(this.lenBuf[:n]) + if err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *varintWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser { + var closer io.Closer + if c, ok := r.(io.Closer); ok { + closer = c + } + return &varintReader{bufio.NewReader(r), nil, maxSize, closer} +} + +type varintReader struct { + r *bufio.Reader + buf []byte + maxSize int + closer io.Closer +} + +func (this *varintReader) ReadMsg(msg proto.Message) error { + length64, err := binary.ReadUvarint(this.r) + if err != nil { + return err + } + length := int(length64) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if len(this.buf) < length { + this.buf = make([]byte, length) + } + buf := this.buf[:length] + if _, err := io.ReadFull(this.r, buf); err != nil { + return err + } + return proto.Unmarshal(buf, msg) +} + +func (this *varintReader) Close() error { + if this.closer != nil { + return this.closer.Close() + } + return nil +} diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb.go b/deps/github.com/gogo/protobuf/jsonpb/jsonpb.go new file mode 100644 index 000000000..cd0f66863 --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb.go @@ -0,0 +1,1386 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package jsonpb provides marshaling and unmarshaling between protocol buffers and JSON. +It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json. + +This package produces a different output than the standard "encoding/json" package, +which does not operate correctly on protocol buffers. +*/ +package jsonpb + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "math" + "reflect" + "sort" + "strconv" + "strings" + "time" + + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/types" +) + +const secondInNanos = int64(time.Second / time.Nanosecond) + +// Marshaler is a configurable object for converting between +// protocol buffer objects and a JSON representation for them. +type Marshaler struct { + // Whether to render enum values as integers, as opposed to string values. + EnumsAsInts bool + + // Whether to render fields with zero values. + EmitDefaults bool + + // A string to indent each level by. The presence of this field will + // also cause a space to appear between the field separator and + // value, and for newlines to be appear between fields and array + // elements. + Indent string + + // Whether to use the original (.proto) name for fields. + OrigName bool + + // A custom URL resolver to use when marshaling Any messages to JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver +} + +// AnyResolver takes a type URL, present in an Any message, and resolves it into +// an instance of the associated message. +type AnyResolver interface { + Resolve(typeUrl string) (proto.Message, error) +} + +func defaultResolveAny(typeUrl string) (proto.Message, error) { + // Only the part of typeUrl after the last slash is relevant. + mname := typeUrl + if slash := strings.LastIndex(mname, "/"); slash >= 0 { + mname = mname[slash+1:] + } + mt := proto.MessageType(mname) + if mt == nil { + return nil, fmt.Errorf("unknown message type %q", mname) + } + return reflect.New(mt.Elem()).Interface().(proto.Message), nil +} + +// JSONPBMarshaler is implemented by protobuf messages that customize the +// way they are marshaled to JSON. Messages that implement this should +// also implement JSONPBUnmarshaler so that the custom format can be +// parsed. +type JSONPBMarshaler interface { + MarshalJSONPB(*Marshaler) ([]byte, error) +} + +// JSONPBUnmarshaler is implemented by protobuf messages that customize +// the way they are unmarshaled from JSON. Messages that implement this +// should also implement JSONPBMarshaler so that the custom format can be +// produced. +type JSONPBUnmarshaler interface { + UnmarshalJSONPB(*Unmarshaler, []byte) error +} + +// Marshal marshals a protocol buffer into JSON. +func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { + v := reflect.ValueOf(pb) + if pb == nil || (v.Kind() == reflect.Ptr && v.IsNil()) { + return errors.New("Marshal called with nil") + } + // Check for unset required fields first. + if err := checkRequiredFields(pb); err != nil { + return err + } + writer := &errWriter{writer: out} + return m.marshalObject(writer, pb, "", "") +} + +// MarshalToString converts a protocol buffer object to JSON string. +func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { + var buf bytes.Buffer + if err := m.Marshal(&buf, pb); err != nil { + return "", err + } + return buf.String(), nil +} + +type int32Slice []int32 + +var nonFinite = map[string]float64{ + `"NaN"`: math.NaN(), + `"Infinity"`: math.Inf(1), + `"-Infinity"`: math.Inf(-1), +} + +// For sorting extensions ids to ensure stable output. +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +type isWkt interface { + XXX_WellKnownType() string +} + +// marshalObject writes a struct to the Writer. +func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error { + if jsm, ok := v.(JSONPBMarshaler); ok { + b, err := jsm.MarshalJSONPB(m) + if err != nil { + return err + } + if typeURL != "" { + // we are marshaling this object to an Any type + var js map[string]*json.RawMessage + if err = json.Unmarshal(b, &js); err != nil { + return fmt.Errorf("type %T produced invalid JSON: %v", v, err) + } + turl, err := json.Marshal(typeURL) + if err != nil { + return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err) + } + js["@type"] = (*json.RawMessage)(&turl) + if b, err = json.Marshal(js); err != nil { + return err + } + } + + out.write(string(b)) + return out.err + } + + s := reflect.ValueOf(v).Elem() + + // Handle well-known types. + if wkt, ok := v.(isWkt); ok { + switch wkt.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + // "Wrappers use the same representation in JSON + // as the wrapped primitive type, ..." + sprop := proto.GetProperties(s.Type()) + return m.marshalValue(out, sprop.Prop[0], s.Field(0), indent) + case "Any": + // Any is a bit more involved. + return m.marshalAny(out, v, indent) + case "Duration": + // "Generated output always contains 0, 3, 6, or 9 fractional digits, + // depending on required precision." + s, ns := s.Field(0).Int(), s.Field(1).Int() + if ns <= -secondInNanos || ns >= secondInNanos { + return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos) + } + if (s > 0 && ns < 0) || (s < 0 && ns > 0) { + return errors.New("signs of seconds and nanos do not match") + } + if s < 0 { + ns = -ns + } + x := fmt.Sprintf("%d.%09d", s, ns) + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, ".000") + out.write(`"`) + out.write(x) + out.write(`s"`) + return out.err + case "Struct", "ListValue": + // Let marshalValue handle the `Struct.fields` map or the `ListValue.values` slice. + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, s.Field(0), indent) + case "Timestamp": + // "RFC 3339, where generated output will always be Z-normalized + // and uses 0, 3, 6 or 9 fractional digits." + s, ns := s.Field(0).Int(), s.Field(1).Int() + if ns < 0 || ns >= secondInNanos { + return fmt.Errorf("ns out of range [0, %v)", secondInNanos) + } + t := time.Unix(s, ns).UTC() + // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits). + x := t.Format("2006-01-02T15:04:05.000000000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, ".000") + out.write(`"`) + out.write(x) + out.write(`Z"`) + return out.err + case "Value": + // Value has a single oneof. + kind := s.Field(0) + if kind.IsNil() { + // "absence of any variant indicates an error" + return errors.New("nil Value") + } + // oneof -> *T -> T -> T.F + x := kind.Elem().Elem().Field(0) + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, x, indent) + } + } + + out.write("{") + if m.Indent != "" { + out.write("\n") + } + + firstField := true + + if typeURL != "" { + if err := m.marshalTypeURL(out, indent, typeURL); err != nil { + return err + } + firstField = false + } + + for i := 0; i < s.NumField(); i++ { + value := s.Field(i) + valueField := s.Type().Field(i) + if strings.HasPrefix(valueField.Name, "XXX_") { + continue + } + + //this is not a protobuf field + if valueField.Tag.Get("protobuf") == "" && valueField.Tag.Get("protobuf_oneof") == "" { + continue + } + + // IsNil will panic on most value kinds. + switch value.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface: + if value.IsNil() { + continue + } + } + + if !m.EmitDefaults { + switch value.Kind() { + case reflect.Bool: + if !value.Bool() { + continue + } + case reflect.Int32, reflect.Int64: + if value.Int() == 0 { + continue + } + case reflect.Uint32, reflect.Uint64: + if value.Uint() == 0 { + continue + } + case reflect.Float32, reflect.Float64: + if value.Float() == 0 { + continue + } + case reflect.String: + if value.Len() == 0 { + continue + } + case reflect.Map, reflect.Ptr, reflect.Slice: + if value.IsNil() { + continue + } + } + } + + // Oneof fields need special handling. + if valueField.Tag.Get("protobuf_oneof") != "" { + // value is an interface containing &T{real_value}. + sv := value.Elem().Elem() // interface -> *T -> T + value = sv.Field(0) + valueField = sv.Type().Field(0) + } + prop := jsonProperties(valueField, m.OrigName) + if !firstField { + m.writeSep(out) + } + // If the map value is a cast type, it may not implement proto.Message, therefore + // allow the struct tag to declare the underlying message type. Instead of changing + // the signatures of the child types (and because prop.mvalue is not public), use + // CustomType as a passer. + if value.Kind() == reflect.Map { + if tag := valueField.Tag.Get("protobuf"); tag != "" { + for _, v := range strings.Split(tag, ",") { + if !strings.HasPrefix(v, "castvaluetype=") { + continue + } + v = strings.TrimPrefix(v, "castvaluetype=") + prop.CustomType = v + break + } + } + } + if err := m.marshalField(out, prop, value, indent); err != nil { + return err + } + firstField = false + } + + // Handle proto2 extensions. + if ep, ok := v.(proto.Message); ok { + extensions := proto.RegisteredExtensions(v) + // Sort extensions for stable output. + ids := make([]int32, 0, len(extensions)) + for id, desc := range extensions { + if !proto.HasExtension(ep, desc) { + continue + } + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + for _, id := range ids { + desc := extensions[id] + if desc == nil { + // unknown extension + continue + } + ext, extErr := proto.GetExtension(ep, desc) + if extErr != nil { + return extErr + } + value := reflect.ValueOf(ext) + var prop proto.Properties + prop.Parse(desc.Tag) + prop.JSONName = fmt.Sprintf("[%s]", desc.Name) + if !firstField { + m.writeSep(out) + } + if err := m.marshalField(out, &prop, value, indent); err != nil { + return err + } + firstField = false + } + + } + + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err +} + +func (m *Marshaler) writeSep(out *errWriter) { + if m.Indent != "" { + out.write(",\n") + } else { + out.write(",") + } +} + +func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) error { + // "If the Any contains a value that has a special JSON mapping, + // it will be converted as follows: {"@type": xxx, "value": yyy}. + // Otherwise, the value will be converted into a JSON object, + // and the "@type" field will be inserted to indicate the actual data type." + v := reflect.ValueOf(any).Elem() + turl := v.Field(0).String() + val := v.Field(1).Bytes() + + var msg proto.Message + var err error + if m.AnyResolver != nil { + msg, err = m.AnyResolver.Resolve(turl) + } else { + msg, err = defaultResolveAny(turl) + } + if err != nil { + return err + } + + if err := proto.Unmarshal(val, msg); err != nil { + return err + } + + if _, ok := msg.(isWkt); ok { + out.write("{") + if m.Indent != "" { + out.write("\n") + } + if err := m.marshalTypeURL(out, indent, turl); err != nil { + return err + } + m.writeSep(out) + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + out.write(`"value": `) + } else { + out.write(`"value":`) + } + if err := m.marshalObject(out, msg, indent+m.Indent, ""); err != nil { + return err + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err + } + + return m.marshalObject(out, msg, indent, turl) +} + +func (m *Marshaler) marshalTypeURL(out *errWriter, indent, typeURL string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"@type":`) + if m.Indent != "" { + out.write(" ") + } + b, err := json.Marshal(typeURL) + if err != nil { + return err + } + out.write(string(b)) + return out.err +} + +// marshalField writes field description and value to the Writer. +func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"`) + out.write(prop.JSONName) + out.write(`":`) + if m.Indent != "" { + out.write(" ") + } + if err := m.marshalValue(out, prop, v, indent); err != nil { + return err + } + return nil +} + +// marshalValue writes the value to the Writer. +func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + + v = reflect.Indirect(v) + + // Handle nil pointer + if v.Kind() == reflect.Invalid { + out.write("null") + return out.err + } + + // Handle repeated elements. + if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { + out.write("[") + comma := "" + for i := 0; i < v.Len(); i++ { + sliceVal := v.Index(i) + out.write(comma) + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil { + return err + } + comma = "," + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write("]") + return out.err + } + + // Handle well-known types. + // Most are handled up in marshalObject (because 99% are messages). + if wkt, ok := v.Interface().(isWkt); ok { + switch wkt.XXX_WellKnownType() { + case "NullValue": + out.write("null") + return out.err + } + } + + if t, ok := v.Interface().(time.Time); ok { + ts, err := types.TimestampProto(t) + if err != nil { + return err + } + return m.marshalValue(out, prop, reflect.ValueOf(ts), indent) + } + + if d, ok := v.Interface().(time.Duration); ok { + dur := types.DurationProto(d) + return m.marshalValue(out, prop, reflect.ValueOf(dur), indent) + } + + // Handle enumerations. + if !m.EnumsAsInts && prop.Enum != "" { + // Unknown enum values will are stringified by the proto library as their + // value. Such values should _not_ be quoted or they will be interpreted + // as an enum string instead of their value. + enumStr := v.Interface().(fmt.Stringer).String() + var valStr string + if v.Kind() == reflect.Ptr { + valStr = strconv.Itoa(int(v.Elem().Int())) + } else { + valStr = strconv.Itoa(int(v.Int())) + } + + if m, ok := v.Interface().(interface { + MarshalJSON() ([]byte, error) + }); ok { + data, err := m.MarshalJSON() + if err != nil { + return err + } + enumStr = string(data) + enumStr, err = strconv.Unquote(enumStr) + if err != nil { + return err + } + } + + isKnownEnum := enumStr != valStr + + if isKnownEnum { + out.write(`"`) + } + out.write(enumStr) + if isKnownEnum { + out.write(`"`) + } + return out.err + } + + // Handle nested messages. + if v.Kind() == reflect.Struct { + i := v + if v.CanAddr() { + i = v.Addr() + } else { + i = reflect.New(v.Type()) + i.Elem().Set(v) + } + iface := i.Interface() + if iface == nil { + out.write(`null`) + return out.err + } + + if m, ok := v.Interface().(interface { + MarshalJSON() ([]byte, error) + }); ok { + data, err := m.MarshalJSON() + if err != nil { + return err + } + out.write(string(data)) + return nil + } + + pm, ok := iface.(proto.Message) + if !ok { + if prop.CustomType == "" { + return fmt.Errorf("%v does not implement proto.Message", v.Type()) + } + t := proto.MessageType(prop.CustomType) + if t == nil || !i.Type().ConvertibleTo(t) { + return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) + } + pm = i.Convert(t).Interface().(proto.Message) + } + return m.marshalObject(out, pm, indent+m.Indent, "") + } + + // Handle maps. + // Since Go randomizes map iteration, we sort keys for stable output. + if v.Kind() == reflect.Map { + out.write(`{`) + keys := v.MapKeys() + sort.Sort(mapKeys(keys)) + for i, k := range keys { + if i > 0 { + out.write(`,`) + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + + b, err := json.Marshal(k.Interface()) + if err != nil { + return err + } + s := string(b) + + // If the JSON is not a string value, encode it again to make it one. + if !strings.HasPrefix(s, `"`) { + b, err := json.Marshal(s) + if err != nil { + return err + } + s = string(b) + } + + out.write(s) + out.write(`:`) + if m.Indent != "" { + out.write(` `) + } + + if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil { + return err + } + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write(`}`) + return out.err + } + + // Handle non-finite floats, e.g. NaN, Infinity and -Infinity. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + f := v.Float() + var sval string + switch { + case math.IsInf(f, 1): + sval = `"Infinity"` + case math.IsInf(f, -1): + sval = `"-Infinity"` + case math.IsNaN(f): + sval = `"NaN"` + } + if sval != "" { + out.write(sval) + return out.err + } + } + + // Default handling defers to the encoding/json library. + b, err := json.Marshal(v.Interface()) + if err != nil { + return err + } + needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) + if needToQuote { + out.write(`"`) + } + out.write(string(b)) + if needToQuote { + out.write(`"`) + } + return out.err +} + +// Unmarshaler is a configurable object for converting from a JSON +// representation to a protocol buffer object. +type Unmarshaler struct { + // Whether to allow messages to contain unknown fields, as opposed to + // failing to unmarshal. + AllowUnknownFields bool + + // A custom URL resolver to use when unmarshaling Any messages from JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver +} + +// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. +// This function is lenient and will decode any options permutations of the +// related Marshaler. +func (u *Unmarshaler) UnmarshalNext(dec *json.Decoder, pb proto.Message) error { + inputValue := json.RawMessage{} + if err := dec.Decode(&inputValue); err != nil { + return err + } + if err := u.unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil); err != nil { + return err + } + return checkRequiredFields(pb) +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func (u *Unmarshaler) Unmarshal(r io.Reader, pb proto.Message) error { + dec := json.NewDecoder(r) + return u.UnmarshalNext(dec, pb) +} + +// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. +// This function is lenient and will decode any options permutations of the +// related Marshaler. +func UnmarshalNext(dec *json.Decoder, pb proto.Message) error { + return new(Unmarshaler).UnmarshalNext(dec, pb) +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func Unmarshal(r io.Reader, pb proto.Message) error { + return new(Unmarshaler).Unmarshal(r, pb) +} + +// UnmarshalString will populate the fields of a protocol buffer based +// on a JSON string. This function is lenient and will decode any options +// permutations of the related Marshaler. +func UnmarshalString(str string, pb proto.Message) error { + return new(Unmarshaler).Unmarshal(strings.NewReader(str), pb) +} + +// unmarshalValue converts/copies a value into the target. +// prop may be nil. +func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error { + targetType := target.Type() + + // Allocate memory for pointer fields. + if targetType.Kind() == reflect.Ptr { + // If input value is "null" and target is a pointer type, then the field should be treated as not set + // UNLESS the target is structpb.Value, in which case it should be set to structpb.NullValue. + _, isJSONPBUnmarshaler := target.Interface().(JSONPBUnmarshaler) + if string(inputValue) == "null" && targetType != reflect.TypeOf(&types.Value{}) && !isJSONPBUnmarshaler { + return nil + } + target.Set(reflect.New(targetType.Elem())) + + return u.unmarshalValue(target.Elem(), inputValue, prop) + } + + if jsu, ok := target.Addr().Interface().(JSONPBUnmarshaler); ok { + return jsu.UnmarshalJSONPB(u, []byte(inputValue)) + } + + // Handle well-known types that are not pointers. + if w, ok := target.Addr().Interface().(isWkt); ok { + switch w.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + return u.unmarshalValue(target.Field(0), inputValue, prop) + case "Any": + // Use json.RawMessage pointer type instead of value to support pre-1.8 version. + // 1.8 changed RawMessage.MarshalJSON from pointer type to value type, see + // https://github.com/golang/go/issues/14493 + var jsonFields map[string]*json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + val, ok := jsonFields["@type"] + if !ok || val == nil { + return errors.New("Any JSON doesn't have '@type'") + } + + var turl string + if err := json.Unmarshal([]byte(*val), &turl); err != nil { + return fmt.Errorf("can't unmarshal Any's '@type': %q", *val) + } + target.Field(0).SetString(turl) + + var m proto.Message + var err error + if u.AnyResolver != nil { + m, err = u.AnyResolver.Resolve(turl) + } else { + m, err = defaultResolveAny(turl) + } + if err != nil { + return err + } + + if _, ok := m.(isWkt); ok { + val, ok := jsonFields["value"] + if !ok { + return errors.New("Any JSON doesn't have 'value'") + } + + if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), *val, nil); err != nil { + return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err) + } + } else { + delete(jsonFields, "@type") + nestedProto, uerr := json.Marshal(jsonFields) + if uerr != nil { + return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", uerr) + } + + if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), nestedProto, nil); err != nil { + return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err) + } + } + + b, err := proto.Marshal(m) + if err != nil { + return fmt.Errorf("can't marshal proto %T into Any.Value: %v", m, err) + } + target.Field(1).SetBytes(b) + + return nil + case "Duration": + unq, err := strconv.Unquote(string(inputValue)) + if err != nil { + return err + } + + d, err := time.ParseDuration(unq) + if err != nil { + return fmt.Errorf("bad Duration: %v", err) + } + + ns := d.Nanoseconds() + s := ns / 1e9 + ns %= 1e9 + target.Field(0).SetInt(s) + target.Field(1).SetInt(ns) + return nil + case "Timestamp": + unq, err := strconv.Unquote(string(inputValue)) + if err != nil { + return err + } + + t, err := time.Parse(time.RFC3339Nano, unq) + if err != nil { + return fmt.Errorf("bad Timestamp: %v", err) + } + + target.Field(0).SetInt(t.Unix()) + target.Field(1).SetInt(int64(t.Nanosecond())) + return nil + case "Struct": + var m map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &m); err != nil { + return fmt.Errorf("bad StructValue: %v", err) + } + target.Field(0).Set(reflect.ValueOf(map[string]*types.Value{})) + for k, jv := range m { + pv := &types.Value{} + if err := u.unmarshalValue(reflect.ValueOf(pv).Elem(), jv, prop); err != nil { + return fmt.Errorf("bad value in StructValue for key %q: %v", k, err) + } + target.Field(0).SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(pv)) + } + return nil + case "ListValue": + var s []json.RawMessage + if err := json.Unmarshal(inputValue, &s); err != nil { + return fmt.Errorf("bad ListValue: %v", err) + } + + target.Field(0).Set(reflect.ValueOf(make([]*types.Value, len(s)))) + for i, sv := range s { + if err := u.unmarshalValue(target.Field(0).Index(i), sv, prop); err != nil { + return err + } + } + return nil + case "Value": + ivStr := string(inputValue) + if ivStr == "null" { + target.Field(0).Set(reflect.ValueOf(&types.Value_NullValue{})) + } else if v, err := strconv.ParseFloat(ivStr, 0); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_NumberValue{NumberValue: v})) + } else if v, err := strconv.Unquote(ivStr); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_StringValue{StringValue: v})) + } else if v, err := strconv.ParseBool(ivStr); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_BoolValue{BoolValue: v})) + } else if err := json.Unmarshal(inputValue, &[]json.RawMessage{}); err == nil { + lv := &types.ListValue{} + target.Field(0).Set(reflect.ValueOf(&types.Value_ListValue{ListValue: lv})) + return u.unmarshalValue(reflect.ValueOf(lv).Elem(), inputValue, prop) + } else if err := json.Unmarshal(inputValue, &map[string]json.RawMessage{}); err == nil { + sv := &types.Struct{} + target.Field(0).Set(reflect.ValueOf(&types.Value_StructValue{StructValue: sv})) + return u.unmarshalValue(reflect.ValueOf(sv).Elem(), inputValue, prop) + } else { + return fmt.Errorf("unrecognized type for Value %q", ivStr) + } + return nil + } + } + + if t, ok := target.Addr().Interface().(*time.Time); ok { + ts := &types.Timestamp{} + if err := u.unmarshalValue(reflect.ValueOf(ts).Elem(), inputValue, prop); err != nil { + return err + } + tt, err := types.TimestampFromProto(ts) + if err != nil { + return err + } + *t = tt + return nil + } + + if d, ok := target.Addr().Interface().(*time.Duration); ok { + dur := &types.Duration{} + if err := u.unmarshalValue(reflect.ValueOf(dur).Elem(), inputValue, prop); err != nil { + return err + } + dd, err := types.DurationFromProto(dur) + if err != nil { + return err + } + *d = dd + return nil + } + + // Handle enums, which have an underlying type of int32, + // and may appear as strings. + // The case of an enum appearing as a number is handled + // at the bottom of this function. + if inputValue[0] == '"' && prop != nil && prop.Enum != "" { + vmap := proto.EnumValueMap(prop.Enum) + // Don't need to do unquoting; valid enum names + // are from a limited character set. + s := inputValue[1 : len(inputValue)-1] + n, ok := vmap[string(s)] + if !ok { + return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum) + } + if target.Kind() == reflect.Ptr { // proto2 + target.Set(reflect.New(targetType.Elem())) + target = target.Elem() + } + target.SetInt(int64(n)) + return nil + } + + // Handle nested messages. + if targetType.Kind() == reflect.Struct { + if prop != nil && len(prop.CustomType) > 0 && target.CanAddr() { + if m, ok := target.Addr().Interface().(interface { + UnmarshalJSON([]byte) error + }); ok { + return json.Unmarshal(inputValue, m) + } + } + + var jsonFields map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + consumeField := func(prop *proto.Properties) (json.RawMessage, bool) { + // Be liberal in what names we accept; both orig_name and camelName are okay. + fieldNames := acceptedJSONFieldNames(prop) + + vOrig, okOrig := jsonFields[fieldNames.orig] + vCamel, okCamel := jsonFields[fieldNames.camel] + if !okOrig && !okCamel { + return nil, false + } + // If, for some reason, both are present in the data, favour the camelName. + var raw json.RawMessage + if okOrig { + raw = vOrig + delete(jsonFields, fieldNames.orig) + } + if okCamel { + raw = vCamel + delete(jsonFields, fieldNames.camel) + } + return raw, true + } + + sprops := proto.GetProperties(targetType) + for i := 0; i < target.NumField(); i++ { + ft := target.Type().Field(i) + if strings.HasPrefix(ft.Name, "XXX_") { + continue + } + valueForField, ok := consumeField(sprops.Prop[i]) + if !ok { + continue + } + + if err := u.unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil { + return err + } + } + // Check for any oneof fields. + if len(jsonFields) > 0 { + for _, oop := range sprops.OneofTypes { + raw, ok := consumeField(oop.Prop) + if !ok { + continue + } + nv := reflect.New(oop.Type.Elem()) + target.Field(oop.Field).Set(nv) + if err := u.unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil { + return err + } + } + } + // Handle proto2 extensions. + if len(jsonFields) > 0 { + if ep, ok := target.Addr().Interface().(proto.Message); ok { + for _, ext := range proto.RegisteredExtensions(ep) { + name := fmt.Sprintf("[%s]", ext.Name) + raw, ok := jsonFields[name] + if !ok { + continue + } + delete(jsonFields, name) + nv := reflect.New(reflect.TypeOf(ext.ExtensionType).Elem()) + if err := u.unmarshalValue(nv.Elem(), raw, nil); err != nil { + return err + } + if err := proto.SetExtension(ep, ext, nv.Interface()); err != nil { + return err + } + } + } + } + if !u.AllowUnknownFields && len(jsonFields) > 0 { + // Pick any field to be the scapegoat. + var f string + for fname := range jsonFields { + f = fname + break + } + return fmt.Errorf("unknown field %q in %v", f, targetType) + } + return nil + } + + // Handle arrays + if targetType.Kind() == reflect.Slice { + if targetType.Elem().Kind() == reflect.Uint8 { + outRef := reflect.New(targetType) + outVal := outRef.Interface() + //CustomType with underlying type []byte + if _, ok := outVal.(interface { + UnmarshalJSON([]byte) error + }); ok { + if err := json.Unmarshal(inputValue, outVal); err != nil { + return err + } + target.Set(outRef.Elem()) + return nil + } + // Special case for encoded bytes. Pre-go1.5 doesn't support unmarshalling + // strings into aliased []byte types. + // https://github.com/golang/go/commit/4302fd0409da5e4f1d71471a6770dacdc3301197 + // https://github.com/golang/go/commit/c60707b14d6be26bf4213114d13070bff00d0b0a + var out []byte + if err := json.Unmarshal(inputValue, &out); err != nil { + return err + } + target.SetBytes(out) + return nil + } + + var slc []json.RawMessage + if err := json.Unmarshal(inputValue, &slc); err != nil { + return err + } + if slc != nil { + l := len(slc) + target.Set(reflect.MakeSlice(targetType, l, l)) + for i := 0; i < l; i++ { + if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil { + return err + } + } + } + return nil + } + + // Handle maps (whose keys are always strings) + if targetType.Kind() == reflect.Map { + var mp map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &mp); err != nil { + return err + } + if mp != nil { + target.Set(reflect.MakeMap(targetType)) + for ks, raw := range mp { + // Unmarshal map key. The core json library already decoded the key into a + // string, so we handle that specially. Other types were quoted post-serialization. + var k reflect.Value + if targetType.Key().Kind() == reflect.String { + k = reflect.ValueOf(ks) + } else { + k = reflect.New(targetType.Key()).Elem() + // TODO: pass the correct Properties if needed. + if err := u.unmarshalValue(k, json.RawMessage(ks), nil); err != nil { + return err + } + } + + if !k.Type().AssignableTo(targetType.Key()) { + k = k.Convert(targetType.Key()) + } + + // Unmarshal map value. + v := reflect.New(targetType.Elem()).Elem() + // TODO: pass the correct Properties if needed. + if err := u.unmarshalValue(v, raw, nil); err != nil { + return err + } + target.SetMapIndex(k, v) + } + } + return nil + } + + // 64-bit integers can be encoded as strings. In this case we drop + // the quotes and proceed as normal. + isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 + if isNum && strings.HasPrefix(string(inputValue), `"`) { + inputValue = inputValue[1 : len(inputValue)-1] + } + + // Non-finite numbers can be encoded as strings. + isFloat := targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64 + if isFloat { + if num, ok := nonFinite[string(inputValue)]; ok { + target.SetFloat(num) + return nil + } + } + + // Use the encoding/json for parsing other value types. + return json.Unmarshal(inputValue, target.Addr().Interface()) +} + +// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute. +func jsonProperties(f reflect.StructField, origName bool) *proto.Properties { + var prop proto.Properties + prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) + if origName || prop.JSONName == "" { + prop.JSONName = prop.OrigName + } + return &prop +} + +type fieldNames struct { + orig, camel string +} + +func acceptedJSONFieldNames(prop *proto.Properties) fieldNames { + opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName} + if prop.JSONName != "" { + opts.camel = prop.JSONName + } + return opts +} + +// Writer wrapper inspired by https://blog.golang.org/errors-are-values +type errWriter struct { + writer io.Writer + err error +} + +func (w *errWriter) write(str string) { + if w.err != nil { + return + } + _, w.err = w.writer.Write([]byte(str)) +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. +// +// Numeric keys are sorted in numeric order per +// https://developers.google.com/protocol-buffers/docs/proto#maps. +type mapKeys []reflect.Value + +func (s mapKeys) Len() int { return len(s) } +func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s mapKeys) Less(i, j int) bool { + if k := s[i].Kind(); k == s[j].Kind() { + switch k { + case reflect.Int32, reflect.Int64: + return s[i].Int() < s[j].Int() + case reflect.Uint32, reflect.Uint64: + return s[i].Uint() < s[j].Uint() + } + } + return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) +} + +// checkRequiredFields returns an error if any required field in the given proto message is not set. +// This function is used by both Marshal and Unmarshal. While required fields only exist in a +// proto2 message, a proto3 message can contain proto2 message(s). +func checkRequiredFields(pb proto.Message) error { + // Most well-known type messages do not contain required fields. The "Any" type may contain + // a message that has required fields. + // + // When an Any message is being marshaled, the code will invoked proto.Unmarshal on Any.Value + // field in order to transform that into JSON, and that should have returned an error if a + // required field is not set in the embedded message. + // + // When an Any message is being unmarshaled, the code will have invoked proto.Marshal on the + // embedded message to store the serialized message in Any.Value field, and that should have + // returned an error if a required field is not set. + if _, ok := pb.(isWkt); ok { + return nil + } + + v := reflect.ValueOf(pb) + // Skip message if it is not a struct pointer. + if v.Kind() != reflect.Ptr { + return nil + } + v = v.Elem() + if v.Kind() != reflect.Struct { + return nil + } + + for i := 0; i < v.NumField(); i++ { + field := v.Field(i) + sfield := v.Type().Field(i) + + if sfield.PkgPath != "" { + // blank PkgPath means the field is exported; skip if not exported + continue + } + + if strings.HasPrefix(sfield.Name, "XXX_") { + continue + } + + // Oneof field is an interface implemented by wrapper structs containing the actual oneof + // field, i.e. an interface containing &T{real_value}. + if sfield.Tag.Get("protobuf_oneof") != "" { + if field.Kind() != reflect.Interface { + continue + } + v := field.Elem() + if v.Kind() != reflect.Ptr || v.IsNil() { + continue + } + v = v.Elem() + if v.Kind() != reflect.Struct || v.NumField() < 1 { + continue + } + field = v.Field(0) + sfield = v.Type().Field(0) + } + + protoTag := sfield.Tag.Get("protobuf") + if protoTag == "" { + continue + } + var prop proto.Properties + prop.Init(sfield.Type, sfield.Name, protoTag, &sfield) + + switch field.Kind() { + case reflect.Map: + if field.IsNil() { + continue + } + // Check each map value. + keys := field.MapKeys() + for _, k := range keys { + v := field.MapIndex(k) + if err := checkRequiredFieldsInValue(v); err != nil { + return err + } + } + case reflect.Slice: + // Handle non-repeated type, e.g. bytes. + if !prop.Repeated { + if prop.Required && field.IsNil() { + return fmt.Errorf("required field %q is not set", prop.Name) + } + continue + } + + // Handle repeated type. + if field.IsNil() { + continue + } + // Check each slice item. + for i := 0; i < field.Len(); i++ { + v := field.Index(i) + if err := checkRequiredFieldsInValue(v); err != nil { + return err + } + } + case reflect.Ptr: + if field.IsNil() { + if prop.Required { + return fmt.Errorf("required field %q is not set", prop.Name) + } + continue + } + if err := checkRequiredFieldsInValue(field); err != nil { + return err + } + } + } + + // Handle proto2 extensions. + for _, ext := range proto.RegisteredExtensions(pb) { + if !proto.HasExtension(pb, ext) { + continue + } + ep, err := proto.GetExtension(pb, ext) + if err != nil { + return err + } + err = checkRequiredFieldsInValue(reflect.ValueOf(ep)) + if err != nil { + return err + } + } + + return nil +} + +func checkRequiredFieldsInValue(v reflect.Value) error { + if pm, ok := v.Interface().(proto.Message); ok { + return checkRequiredFields(pm) + } + return nil +} diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test.go b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test.go new file mode 100644 index 000000000..5ee9142ef --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test.go @@ -0,0 +1,1142 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package jsonpb + +import ( + "bytes" + "encoding/json" + "io" + "math" + "reflect" + "strings" + "testing" + + pb "github.com/gogo/protobuf/jsonpb/jsonpb_test_proto" + "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + "github.com/gogo/protobuf/types" +) + +var ( + marshaler = Marshaler{} + + marshalerAllOptions = Marshaler{ + Indent: " ", + } + + simpleObject = &pb.Simple{ + OInt32: proto.Int32(-32), + OInt64: proto.Int64(-6400000000), + OUint32: proto.Uint32(32), + OUint64: proto.Uint64(6400000000), + OSint32: proto.Int32(-13), + OSint64: proto.Int64(-2600000000), + OFloat: proto.Float32(3.14), + ODouble: proto.Float64(6.02214179e23), + OBool: proto.Bool(true), + OString: proto.String("hello \"there\""), + OBytes: []byte("beep boop"), + OCastBytes: pb.Bytes("wow"), + } + + simpleObjectJSON = `{` + + `"oBool":true,` + + `"oInt32":-32,` + + `"oInt64":"-6400000000",` + + `"oUint32":32,` + + `"oUint64":"6400000000",` + + `"oSint32":-13,` + + `"oSint64":"-2600000000",` + + `"oFloat":3.14,` + + `"oDouble":6.02214179e+23,` + + `"oString":"hello \"there\"",` + + `"oBytes":"YmVlcCBib29w",` + + `"oCastBytes":"d293"` + + `}` + + simpleObjectPrettyJSON = `{ + "oBool": true, + "oInt32": -32, + "oInt64": "-6400000000", + "oUint32": 32, + "oUint64": "6400000000", + "oSint32": -13, + "oSint64": "-2600000000", + "oFloat": 3.14, + "oDouble": 6.02214179e+23, + "oString": "hello \"there\"", + "oBytes": "YmVlcCBib29w", + "oCastBytes": "d293" +}` + + repeatsObject = &pb.Repeats{ + RBool: []bool{true, false, true}, + RInt32: []int32{-3, -4, -5}, + RInt64: []int64{-123456789, -987654321}, + RUint32: []uint32{1, 2, 3}, + RUint64: []uint64{6789012345, 3456789012}, + RSint32: []int32{-1, -2, -3}, + RSint64: []int64{-6789012345, -3456789012}, + RFloat: []float32{3.14, 6.28}, + RDouble: []float64{299792458 * 1e20, 6.62606957e-34}, + RString: []string{"happy", "days"}, + RBytes: [][]byte{[]byte("skittles"), []byte("m&m's")}, + } + + repeatsObjectJSON = `{` + + `"rBool":[true,false,true],` + + `"rInt32":[-3,-4,-5],` + + `"rInt64":["-123456789","-987654321"],` + + `"rUint32":[1,2,3],` + + `"rUint64":["6789012345","3456789012"],` + + `"rSint32":[-1,-2,-3],` + + `"rSint64":["-6789012345","-3456789012"],` + + `"rFloat":[3.14,6.28],` + + `"rDouble":[2.99792458e+28,6.62606957e-34],` + + `"rString":["happy","days"],` + + `"rBytes":["c2tpdHRsZXM=","bSZtJ3M="]` + + `}` + + repeatsObjectPrettyJSON = `{ + "rBool": [ + true, + false, + true + ], + "rInt32": [ + -3, + -4, + -5 + ], + "rInt64": [ + "-123456789", + "-987654321" + ], + "rUint32": [ + 1, + 2, + 3 + ], + "rUint64": [ + "6789012345", + "3456789012" + ], + "rSint32": [ + -1, + -2, + -3 + ], + "rSint64": [ + "-6789012345", + "-3456789012" + ], + "rFloat": [ + 3.14, + 6.28 + ], + "rDouble": [ + 2.99792458e+28, + 6.62606957e-34 + ], + "rString": [ + "happy", + "days" + ], + "rBytes": [ + "c2tpdHRsZXM=", + "bSZtJ3M=" + ] +}` + + innerSimple = &pb.Simple{OInt32: proto.Int32(-32)} + innerSimple2 = &pb.Simple{OInt64: proto.Int64(25)} + innerRepeats = &pb.Repeats{RString: []string{"roses", "red"}} + innerRepeats2 = &pb.Repeats{RString: []string{"violets", "blue"}} + complexObject = &pb.Widget{ + Color: pb.Widget_GREEN.Enum(), + RColor: []pb.Widget_Color{pb.Widget_RED, pb.Widget_GREEN, pb.Widget_BLUE}, + Simple: innerSimple, + RSimple: []*pb.Simple{innerSimple, innerSimple2}, + Repeats: innerRepeats, + RRepeats: []*pb.Repeats{innerRepeats, innerRepeats2}, + } + + complexObjectJSON = `{"color":"GREEN",` + + `"rColor":["RED","GREEN","BLUE"],` + + `"simple":{"oInt32":-32},` + + `"rSimple":[{"oInt32":-32},{"oInt64":"25"}],` + + `"repeats":{"rString":["roses","red"]},` + + `"rRepeats":[{"rString":["roses","red"]},{"rString":["violets","blue"]}]` + + `}` + + complexObjectPrettyJSON = `{ + "color": "GREEN", + "rColor": [ + "RED", + "GREEN", + "BLUE" + ], + "simple": { + "oInt32": -32 + }, + "rSimple": [ + { + "oInt32": -32 + }, + { + "oInt64": "25" + } + ], + "repeats": { + "rString": [ + "roses", + "red" + ] + }, + "rRepeats": [ + { + "rString": [ + "roses", + "red" + ] + }, + { + "rString": [ + "violets", + "blue" + ] + } + ] +}` + + colorPrettyJSON = `{ + "color": 2 +}` + + colorListPrettyJSON = `{ + "color": 1000, + "rColor": [ + "RED" + ] +}` + + nummyPrettyJSON = `{ + "nummy": { + "1": 2, + "3": 4 + } +}` + + objjyPrettyJSON = `{ + "objjy": { + "1": { + "dub": 1 + } + } +}` + realNumber = &pb.Real{Value: proto.Float64(3.14159265359)} + realNumberName = "Pi" + complexNumber = &pb.Complex{Imaginary: proto.Float64(0.5772156649)} + realNumberJSON = `{` + + `"value":3.14159265359,` + + `"[jsonpb.Complex.real_extension]":{"imaginary":0.5772156649},` + + `"[jsonpb.name]":"Pi"` + + `}` + + anySimple = &pb.KnownTypes{ + An: &types.Any{ + TypeUrl: "something.example.com/jsonpb.Simple", + Value: []byte{ + // &pb.Simple{OBool:true} + 1 << 3, 1, + }, + }, + } + anySimpleJSON = `{"an":{"@type":"something.example.com/jsonpb.Simple","oBool":true}}` + anySimplePrettyJSON = `{ + "an": { + "@type": "something.example.com/jsonpb.Simple", + "oBool": true + } +}` + + anyWellKnown = &pb.KnownTypes{ + An: &types.Any{ + TypeUrl: "type.googleapis.com/google.protobuf.Duration", + Value: []byte{ + // &durpb.Duration{Seconds: 1, Nanos: 212000000 } + 1 << 3, 1, // seconds + 2 << 3, 0x80, 0xba, 0x8b, 0x65, // nanos + }, + }, + } + anyWellKnownJSON = `{"an":{"@type":"type.googleapis.com/google.protobuf.Duration","value":"1.212s"}}` + anyWellKnownPrettyJSON = `{ + "an": { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } +}` + + nonFinites = &pb.NonFinites{ + FNan: proto.Float32(float32(math.NaN())), + FPinf: proto.Float32(float32(math.Inf(1))), + FNinf: proto.Float32(float32(math.Inf(-1))), + DNan: proto.Float64(float64(math.NaN())), + DPinf: proto.Float64(float64(math.Inf(1))), + DNinf: proto.Float64(float64(math.Inf(-1))), + } + nonFinitesJSON = `{` + + `"fNan":"NaN",` + + `"fPinf":"Infinity",` + + `"fNinf":"-Infinity",` + + `"dNan":"NaN",` + + `"dPinf":"Infinity",` + + `"dNinf":"-Infinity"` + + `}` +) + +func init() { + if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil { + panic(err) + } + if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil { + panic(err) + } +} + +var marshalingTests = []struct { + desc string + marshaler Marshaler + pb proto.Message + json string +}{ + {"simple flat object", marshaler, simpleObject, simpleObjectJSON}, + {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectPrettyJSON}, + {"non-finite floats fields object", marshaler, nonFinites, nonFinitesJSON}, + {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON}, + {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON}, + {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON}, + {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON}, + {"enum-string flat object", Marshaler{}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`}, + {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON}, + {"unknown enum value object", marshalerAllOptions, + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON}, + {"repeated proto3 enum", Marshaler{}, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}, + `{"rFunny":["PUNS","SLAPSTICK"]}`}, + {"repeated proto3 enum as int", Marshaler{EnumsAsInts: true}, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}, + `{"rFunny":[1,2]}`}, + {"empty value", marshaler, &pb.Simple3{}, `{}`}, + {"empty value emitted", Marshaler{EmitDefaults: true}, &pb.Simple3{}, `{"dub":0}`}, + {"empty repeated emitted", Marshaler{EmitDefaults: true}, &pb.SimpleSlice3{}, `{"slices":[]}`}, + {"empty map emitted", Marshaler{EmitDefaults: true}, &pb.SimpleMap3{}, `{"stringy":{}}`}, + {"nested struct null", Marshaler{EmitDefaults: true}, &pb.SimpleNull3{}, `{"simple":null}`}, + {"map", marshaler, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, `{"nummy":{"1":2,"3":4}}`}, + {"map", marshalerAllOptions, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, nummyPrettyJSON}, + {"map", marshaler, + &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}, + `{"strry":{"\"one\"":"two","three":"four"}}`}, + {"map", marshaler, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, + {"map", marshalerAllOptions, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, objjyPrettyJSON}, + {"map", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}}, + `{"buggy":{"1234":"yup"}}`}, + {"map", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`}, + // TODO: This is broken. + //{"map", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}`}, + {"map", Marshaler{EnumsAsInts: true}, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":2}}`}, + {"map", marshaler, &pb.Mappy{S32Booly: map[int32]bool{1: true, 3: false, 10: true, 12: false}}, `{"s32booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"map", marshaler, &pb.Mappy{S64Booly: map[int64]bool{1: true, 3: false, 10: true, 12: false}}, `{"s64booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"map", marshaler, &pb.Mappy{U32Booly: map[uint32]bool{1: true, 3: false, 10: true, 12: false}}, `{"u32booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"map", marshaler, &pb.Mappy{U64Booly: map[uint64]bool{1: true, 3: false, 10: true, 12: false}}, `{"u64booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"proto2 map", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}}, + `{"mInt64Str":{"213":"cat"}}`}, + {"proto2 map", marshaler, + &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: {OInt32: proto.Int32(1)}}}, + `{"mBoolSimple":{"true":{"oInt32":1}}}`}, + {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, + {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{Title: "Grand Poobah"}}, `{"title":"Grand Poobah"}`}, + {"force orig_name", Marshaler{OrigName: true}, &pb.Simple{OInt32: proto.Int32(4)}, + `{"o_int32":4}`}, + {"proto2 extension", marshaler, realNumber, realNumberJSON}, + {"Any with message", marshaler, anySimple, anySimpleJSON}, + {"Any with message and indent", marshalerAllOptions, anySimple, anySimplePrettyJSON}, + {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON}, + {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON}, + {"Duration", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3}}, `{"dur":"3s"}`}, + {"Duration", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3, Nanos: 1e6}}, `{"dur":"3.001s"}`}, + {"Duration beyond float64 precision", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: 100000000, Nanos: 1}}, `{"dur":"100000000.000000001s"}`}, + {"negative Duration", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: -123, Nanos: -456}}, `{"dur":"-123.000000456s"}`}, + {"Struct", marshaler, &pb.KnownTypes{St: &types.Struct{ + Fields: map[string]*types.Value{ + "one": {Kind: &types.Value_StringValue{StringValue: "loneliest number"}}, + "two": {Kind: &types.Value_NullValue{NullValue: types.NullValue_NULL_VALUE}}, + }, + }}, `{"st":{"one":"loneliest number","two":null}}`}, + {"empty ListValue", marshaler, &pb.KnownTypes{Lv: &types.ListValue{}}, `{"lv":[]}`}, + {"basic ListValue", marshaler, &pb.KnownTypes{Lv: &types.ListValue{Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_NullValue{}}, + {Kind: &types.Value_NumberValue{NumberValue: 3}}, + {Kind: &types.Value_BoolValue{BoolValue: true}}, + }}}, `{"lv":["x",null,3,true]}`}, + {"Timestamp", marshaler, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"2014-05-13T16:53:20.021Z"}`}, + {"Timestamp", marshaler, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 0}}, `{"ts":"2014-05-13T16:53:20Z"}`}, + {"number Value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NumberValue{NumberValue: 1}}}, `{"val":1}`}, + {"null Value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NullValue{NullValue: types.NullValue_NULL_VALUE}}}, `{"val":null}`}, + {"string number value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "9223372036854775807"}}}, `{"val":"9223372036854775807"}`}, + {"list of lists Value", marshaler, &pb.KnownTypes{Val: &types.Value{ + Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{{Kind: &types.Value_StringValue{StringValue: "y"}}}, + }}}, + {Kind: &types.Value_StringValue{StringValue: "z"}}, + }, + }}}, + }, + }}, + }}, `{"val":["x",[["y"],"z"]]}`}, + {"DoubleValue", marshaler, &pb.KnownTypes{Dbl: &types.DoubleValue{Value: 1.2}}, `{"dbl":1.2}`}, + {"FloatValue", marshaler, &pb.KnownTypes{Flt: &types.FloatValue{Value: 1.2}}, `{"flt":1.2}`}, + {"Int64Value", marshaler, &pb.KnownTypes{I64: &types.Int64Value{Value: -3}}, `{"i64":"-3"}`}, + {"UInt64Value", marshaler, &pb.KnownTypes{U64: &types.UInt64Value{Value: 3}}, `{"u64":"3"}`}, + {"Int32Value", marshaler, &pb.KnownTypes{I32: &types.Int32Value{Value: -4}}, `{"i32":-4}`}, + {"UInt32Value", marshaler, &pb.KnownTypes{U32: &types.UInt32Value{Value: 4}}, `{"u32":4}`}, + {"BoolValue", marshaler, &pb.KnownTypes{Bool: &types.BoolValue{Value: true}}, `{"bool":true}`}, + {"StringValue", marshaler, &pb.KnownTypes{Str: &types.StringValue{Value: "plush"}}, `{"str":"plush"}`}, + {"BytesValue", marshaler, &pb.KnownTypes{Bytes: &types.BytesValue{Value: []byte("wow")}}, `{"bytes":"d293"}`}, + {"required", marshaler, &pb.MsgWithRequired{Str: proto.String("hello")}, `{"str":"hello"}`}, + {"required bytes", marshaler, &pb.MsgWithRequiredBytes{Byts: []byte{}}, `{"byts":""}`}, +} + +func TestMarshaling(t *testing.T) { + for _, tt := range marshalingTests { + json, err := tt.marshaler.MarshalToString(tt.pb) + if err != nil { + t.Errorf("%s: marshaling error: %v", tt.desc, err) + } else if tt.json != json { + t.Errorf("%s: got [%v] want [%v]", tt.desc, json, tt.json) + } + } +} + +func TestMarshalingNil(t *testing.T) { + var msg *pb.Simple + m := &Marshaler{} + if _, err := m.MarshalToString(msg); err == nil { + t.Errorf("mashaling nil returned no error") + } +} + +func TestMarshalIllegalTime(t *testing.T) { + tests := []struct { + pb proto.Message + fail bool + }{ + {&pb.KnownTypes{Dur: &types.Duration{Seconds: 1, Nanos: 0}}, false}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: -1, Nanos: 0}}, false}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: 1, Nanos: -1}}, true}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: -1, Nanos: 1}}, true}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: 1, Nanos: 1000000000}}, true}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: -1, Nanos: -1000000000}}, true}, + {&pb.KnownTypes{Ts: &types.Timestamp{Seconds: 1, Nanos: 1}}, false}, + {&pb.KnownTypes{Ts: &types.Timestamp{Seconds: 1, Nanos: -1}}, true}, + {&pb.KnownTypes{Ts: &types.Timestamp{Seconds: 1, Nanos: 1000000000}}, true}, + } + for _, tt := range tests { + _, err := marshaler.MarshalToString(tt.pb) + if err == nil && tt.fail { + t.Errorf("marshaler.MarshalToString(%v) = _, ; want _, ", tt.pb) + } + if err != nil && !tt.fail { + t.Errorf("marshaler.MarshalToString(%v) = _, %v; want _, ", tt.pb, err) + } + } +} + +func TestMarshalJSONPBMarshaler(t *testing.T) { + rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` + msg := dynamicMessage{rawJson: rawJson} + str, err := new(Marshaler).MarshalToString(&msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling JSONPBMarshaler: %v", err) + } + if str != rawJson { + t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, rawJson) + } +} + +func TestMarshalAnyJSONPBMarshaler(t *testing.T) { + msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`} + a, err := types.MarshalAny(&msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling to Any: %v", err) + } + str, err := new(Marshaler).MarshalToString(a) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling Any to JSON: %v", err) + } + // after custom marshaling, it's round-tripped through JSON decoding/encoding already, + // so the keys are sorted, whitespace is compacted, and "@type" key has been added + expected := `{"@type":"type.googleapis.com/` + dynamicMessageName + `","baz":[0,1,2,3],"foo":"bar"}` + if str != expected { + t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected) + } +} + +func TestMarshalWithCustomValidation(t *testing.T) { + msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`, dummy: &dynamicMessage{}} + + js, err := new(Marshaler).MarshalToString(&msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling to json: %v", err) + } + err = Unmarshal(strings.NewReader(js), &msg) + if err != nil { + t.Errorf("an unexpected error occurred when unmarshalling from json: %v", err) + } +} + +// Test marshaling message containing unset required fields should produce error. +func TestMarshalUnsetRequiredFields(t *testing.T) { + msgExt := &pb.Real{} + proto.SetExtension(msgExt, pb.E_Extm, &pb.MsgWithRequired{}) + + tests := []struct { + desc string + marshaler *Marshaler + pb proto.Message + }{ + { + desc: "direct required field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithRequired{}, + }, + { + desc: "direct required field + emit defaults", + marshaler: &Marshaler{EmitDefaults: true}, + pb: &pb.MsgWithRequired{}, + }, + { + desc: "indirect required field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithIndirectRequired{Subm: &pb.MsgWithRequired{}}, + }, + { + desc: "indirect required field + emit defaults", + marshaler: &Marshaler{EmitDefaults: true}, + pb: &pb.MsgWithIndirectRequired{Subm: &pb.MsgWithRequired{}}, + }, + { + desc: "direct required wkt field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithRequiredWKT{}, + }, + { + desc: "direct required wkt field + emit defaults", + marshaler: &Marshaler{EmitDefaults: true}, + pb: &pb.MsgWithRequiredWKT{}, + }, + { + desc: "direct required bytes field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithRequiredBytes{}, + }, + { + desc: "required in map value", + marshaler: &Marshaler{}, + pb: &pb.MsgWithIndirectRequired{ + MapField: map[string]*pb.MsgWithRequired{ + "key": {}, + }, + }, + }, + { + desc: "required in repeated item", + marshaler: &Marshaler{}, + pb: &pb.MsgWithIndirectRequired{ + SliceField: []*pb.MsgWithRequired{ + {Str: proto.String("hello")}, + {}, + }, + }, + }, + { + desc: "required inside oneof", + marshaler: &Marshaler{}, + pb: &pb.MsgWithOneof{ + Union: &pb.MsgWithOneof_MsgWithRequired{MsgWithRequired: &pb.MsgWithRequired{}}, + }, + }, + { + desc: "required inside extension", + marshaler: &Marshaler{}, + pb: msgExt, + }, + } + + for _, tc := range tests { + if _, err := tc.marshaler.MarshalToString(tc.pb); err == nil { + t.Errorf("%s: expecting error in marshaling with unset required fields %+v", tc.desc, tc.pb) + } + } +} + +var unmarshalingTests = []struct { + desc string + unmarshaler Unmarshaler + json string + pb proto.Message +}{ + {"simple flat object", Unmarshaler{}, simpleObjectJSON, simpleObject}, + {"simple pretty object", Unmarshaler{}, simpleObjectPrettyJSON, simpleObject}, + {"repeated fields flat object", Unmarshaler{}, repeatsObjectJSON, repeatsObject}, + {"repeated fields pretty object", Unmarshaler{}, repeatsObjectPrettyJSON, repeatsObject}, + {"nested message/enum flat object", Unmarshaler{}, complexObjectJSON, complexObject}, + {"nested message/enum pretty object", Unmarshaler{}, complexObjectPrettyJSON, complexObject}, + {"enum-string object", Unmarshaler{}, `{"color":"BLUE"}`, &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"enum-value object", Unmarshaler{}, "{\n \"color\": 2\n}", &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"unknown field with allowed option", Unmarshaler{AllowUnknownFields: true}, `{"unknown": "foo"}`, new(pb.Simple)}, + {"proto3 enum string", Unmarshaler{}, `{"hilarity":"PUNS"}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 enum value", Unmarshaler{}, `{"hilarity":1}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"unknown enum value object", + Unmarshaler{}, + "{\n \"color\": 1000,\n \"r_color\": [\n \"RED\"\n ]\n}", + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}}, + {"repeated proto3 enum", Unmarshaler{}, `{"rFunny":["PUNS","SLAPSTICK"]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"repeated proto3 enum as int", Unmarshaler{}, `{"rFunny":[1,2]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"repeated proto3 enum as mix of strings and ints", Unmarshaler{}, `{"rFunny":["PUNS",2]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"unquoted int64 object", Unmarshaler{}, `{"oInt64":-314}`, &pb.Simple{OInt64: proto.Int64(-314)}}, + {"unquoted uint64 object", Unmarshaler{}, `{"oUint64":123}`, &pb.Simple{OUint64: proto.Uint64(123)}}, + {"NaN", Unmarshaler{}, `{"oDouble":"NaN"}`, &pb.Simple{ODouble: proto.Float64(math.NaN())}}, + {"Inf", Unmarshaler{}, `{"oFloat":"Infinity"}`, &pb.Simple{OFloat: proto.Float32(float32(math.Inf(1)))}}, + {"-Inf", Unmarshaler{}, `{"oDouble":"-Infinity"}`, &pb.Simple{ODouble: proto.Float64(math.Inf(-1))}}, + {"map", Unmarshaler{}, `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}}, + {"map", Unmarshaler{}, `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}}, + {"map", Unmarshaler{}, `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}}, + {"proto2 extension", Unmarshaler{}, realNumberJSON, realNumber}, + // TODO does not work with go version 1.7, but works with go version 1.8 {"Any with message", Unmarshaler{}, anySimpleJSON, anySimple}, + // TODO does not work with go version 1.7, but works with go version 1.8 {"Any with message and indent", Unmarshaler{}, anySimplePrettyJSON, anySimple}, + {"Any with WKT", Unmarshaler{}, anyWellKnownJSON, anyWellKnown}, + {"Any with WKT and indent", Unmarshaler{}, anyWellKnownPrettyJSON, anyWellKnown}, + // TODO: This is broken. + //{"map", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, + {"map", Unmarshaler{}, `{"enumy":{"XIV":2}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, + {"oneof", Unmarshaler{}, `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{Salary: 31000}}}, + {"oneof spec name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{Country: "Australia"}}}, + {"oneof orig_name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{Country: "Australia"}}}, + {"oneof spec name2", Unmarshaler{}, `{"homeAddress":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{HomeAddress: "Australia"}}}, + {"oneof orig_name2", Unmarshaler{}, `{"home_address":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{HomeAddress: "Australia"}}}, + {"orig_name input", Unmarshaler{}, `{"o_bool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, + {"camelName input", Unmarshaler{}, `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, + {"Duration", Unmarshaler{}, `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3}}}, + {"Duration", Unmarshaler{}, `{"dur":"4s"}`, &pb.KnownTypes{Dur: &types.Duration{Seconds: 4}}}, + {"null Duration", Unmarshaler{}, `{"dur":null}`, &pb.KnownTypes{Dur: nil}}, + {"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 21e6}}}, + {"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 0}}}, + {"PreEpochTimestamp", Unmarshaler{}, `{"ts":"1969-12-31T23:59:58.999999995Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: -2, Nanos: 999999995}}}, + {"ZeroTimeTimestamp", Unmarshaler{}, `{"ts":"0001-01-01T00:00:00Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: -62135596800, Nanos: 0}}}, + {"null Timestamp", Unmarshaler{}, `{"ts":null}`, &pb.KnownTypes{Ts: nil}}, + {"null Struct", Unmarshaler{}, `{"st": null}`, &pb.KnownTypes{St: nil}}, + {"empty Struct", Unmarshaler{}, `{"st": {}}`, &pb.KnownTypes{St: &types.Struct{}}}, + {"basic Struct", Unmarshaler{}, `{"st": {"a": "x", "b": null, "c": 3, "d": true}}`, &pb.KnownTypes{St: &types.Struct{Fields: map[string]*types.Value{ + "a": {Kind: &types.Value_StringValue{StringValue: "x"}}, + "b": {Kind: &types.Value_NullValue{}}, + "c": {Kind: &types.Value_NumberValue{NumberValue: 3}}, + "d": {Kind: &types.Value_BoolValue{BoolValue: true}}, + }}}}, + {"nested Struct", Unmarshaler{}, `{"st": {"a": {"b": 1, "c": [{"d": true}, "f"]}}}`, &pb.KnownTypes{St: &types.Struct{Fields: map[string]*types.Value{ + "a": {Kind: &types.Value_StructValue{StructValue: &types.Struct{Fields: map[string]*types.Value{ + "b": {Kind: &types.Value_NumberValue{NumberValue: 1}}, + "c": {Kind: &types.Value_ListValue{ListValue: &types.ListValue{Values: []*types.Value{ + {Kind: &types.Value_StructValue{StructValue: &types.Struct{Fields: map[string]*types.Value{"d": {Kind: &types.Value_BoolValue{BoolValue: true}}}}}}, + {Kind: &types.Value_StringValue{StringValue: "f"}}, + }}}}, + }}}}, + }}}}, + {"null ListValue", Unmarshaler{}, `{"lv": null}`, &pb.KnownTypes{Lv: nil}}, + {"empty ListValue", Unmarshaler{}, `{"lv": []}`, &pb.KnownTypes{Lv: &types.ListValue{}}}, + {"basic ListValue", Unmarshaler{}, `{"lv": ["x", null, 3, true]}`, &pb.KnownTypes{Lv: &types.ListValue{Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_NullValue{}}, + {Kind: &types.Value_NumberValue{NumberValue: 3}}, + {Kind: &types.Value_BoolValue{BoolValue: true}}, + }}}}, + {"number Value", Unmarshaler{}, `{"val":1}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NumberValue{NumberValue: 1}}}}, + {"null Value", Unmarshaler{}, `{"val":null}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NullValue{NullValue: types.NullValue_NULL_VALUE}}}}, + {"bool Value", Unmarshaler{}, `{"val":true}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_BoolValue{BoolValue: true}}}}, + {"string Value", Unmarshaler{}, `{"val":"x"}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "x"}}}}, + {"string number value", Unmarshaler{}, `{"val":"9223372036854775807"}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "9223372036854775807"}}}}, + {"list of lists Value", Unmarshaler{}, `{"val":["x", [["y"], "z"]]}`, &pb.KnownTypes{Val: &types.Value{ + Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{{Kind: &types.Value_StringValue{StringValue: "y"}}}, + }}}, + {Kind: &types.Value_StringValue{StringValue: "z"}}, + }, + }}}, + }, + }}}}}, + + {"DoubleValue", Unmarshaler{}, `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &types.DoubleValue{Value: 1.2}}}, + {"FloatValue", Unmarshaler{}, `{"flt":1.2}`, &pb.KnownTypes{Flt: &types.FloatValue{Value: 1.2}}}, + {"Int64Value", Unmarshaler{}, `{"i64":"-3"}`, &pb.KnownTypes{I64: &types.Int64Value{Value: -3}}}, + {"UInt64Value", Unmarshaler{}, `{"u64":"3"}`, &pb.KnownTypes{U64: &types.UInt64Value{Value: 3}}}, + {"Int32Value", Unmarshaler{}, `{"i32":-4}`, &pb.KnownTypes{I32: &types.Int32Value{Value: -4}}}, + {"UInt32Value", Unmarshaler{}, `{"u32":4}`, &pb.KnownTypes{U32: &types.UInt32Value{Value: 4}}}, + {"BoolValue", Unmarshaler{}, `{"bool":true}`, &pb.KnownTypes{Bool: &types.BoolValue{Value: true}}}, + {"StringValue", Unmarshaler{}, `{"str":"plush"}`, &pb.KnownTypes{Str: &types.StringValue{Value: "plush"}}}, + {"BytesValue", Unmarshaler{}, `{"bytes":"d293"}`, &pb.KnownTypes{Bytes: &types.BytesValue{Value: []byte("wow")}}}, + // Ensure that `null` as a value ends up with a nil pointer instead of a [type]Value struct. + {"null DoubleValue", Unmarshaler{}, `{"dbl":null}`, &pb.KnownTypes{Dbl: nil}}, + {"null FloatValue", Unmarshaler{}, `{"flt":null}`, &pb.KnownTypes{Flt: nil}}, + {"null Int64Value", Unmarshaler{}, `{"i64":null}`, &pb.KnownTypes{I64: nil}}, + {"null UInt64Value", Unmarshaler{}, `{"u64":null}`, &pb.KnownTypes{U64: nil}}, + {"null Int32Value", Unmarshaler{}, `{"i32":null}`, &pb.KnownTypes{I32: nil}}, + {"null UInt32Value", Unmarshaler{}, `{"u32":null}`, &pb.KnownTypes{U32: nil}}, + {"null BoolValue", Unmarshaler{}, `{"bool":null}`, &pb.KnownTypes{Bool: nil}}, + {"null StringValue", Unmarshaler{}, `{"str":null}`, &pb.KnownTypes{Str: nil}}, + {"null BytesValue", Unmarshaler{}, `{"bytes":null}`, &pb.KnownTypes{Bytes: nil}}, + {"required", Unmarshaler{}, `{"str":"hello"}`, &pb.MsgWithRequired{Str: proto.String("hello")}}, + {"required bytes", Unmarshaler{}, `{"byts": []}`, &pb.MsgWithRequiredBytes{Byts: []byte{}}}, +} + +func TestUnmarshaling(t *testing.T) { + for _, tt := range unmarshalingTests { + // Make a new instance of the type of our expected object. + p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) + + err := tt.unmarshaler.Unmarshal(strings.NewReader(tt.json), p) + if err != nil { + t.Errorf("%s: %v", tt.desc, err) + continue + } + + // For easier diffs, compare text strings of the protos. + exp := proto.MarshalTextString(tt.pb) + act := proto.MarshalTextString(p) + if string(exp) != string(act) { + t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) + } + } +} + +func TestUnmarshalNullArray(t *testing.T) { + var repeats pb.Repeats + if err := UnmarshalString(`{"rBool":null}`, &repeats); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(repeats, pb.Repeats{}) { + t.Errorf("got non-nil fields in [%#v]", repeats) + } +} + +func TestUnmarshalNullObject(t *testing.T) { + var maps pb.Maps + if err := UnmarshalString(`{"mInt64Str":null}`, &maps); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(maps, pb.Maps{}) { + t.Errorf("got non-nil fields in [%#v]", maps) + } +} + +func TestUnmarshalNext(t *testing.T) { + // We only need to check against a few, not all of them. + tests := unmarshalingTests[:5] + + // Create a buffer with many concatenated JSON objects. + var b bytes.Buffer + for _, tt := range tests { + b.WriteString(tt.json) + } + + dec := json.NewDecoder(&b) + for _, tt := range tests { + // Make a new instance of the type of our expected object. + p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) + + err := tt.unmarshaler.UnmarshalNext(dec, p) + if err != nil { + t.Errorf("%s: %v", tt.desc, err) + continue + } + + // For easier diffs, compare text strings of the protos. + exp := proto.MarshalTextString(tt.pb) + act := proto.MarshalTextString(p) + if string(exp) != string(act) { + t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) + } + } + + p := &pb.Simple{} + err := new(Unmarshaler).UnmarshalNext(dec, p) + if err != io.EOF { + t.Errorf("eof: got %v, expected io.EOF", err) + } +} + +var unmarshalingShouldError = []struct { + desc string + in string + pb proto.Message +}{ + {"a value", "666", new(pb.Simple)}, + {"gibberish", "{adskja123;l23=-=", new(pb.Simple)}, + {"unknown field", `{"unknown": "foo"}`, new(pb.Simple)}, + {"unknown enum name", `{"hilarity":"DAVE"}`, new(proto3pb.Message)}, +} + +func TestUnmarshalingBadInput(t *testing.T) { + for _, tt := range unmarshalingShouldError { + err := UnmarshalString(tt.in, tt.pb) + if err == nil { + t.Errorf("an error was expected when parsing %q instead of an object", tt.desc) + } + } +} + +type funcResolver func(turl string) (proto.Message, error) + +func (fn funcResolver) Resolve(turl string) (proto.Message, error) { + return fn(turl) +} + +func TestAnyWithCustomResolver(t *testing.T) { + var resolvedTypeUrls []string + resolver := funcResolver(func(turl string) (proto.Message, error) { + resolvedTypeUrls = append(resolvedTypeUrls, turl) + return new(pb.Simple), nil + }) + msg := &pb.Simple{ + OBytes: []byte{1, 2, 3, 4}, + OBool: proto.Bool(true), + OString: proto.String("foobar"), + OInt64: proto.Int64(1020304), + } + msgBytes, err := proto.Marshal(msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling message: %v", err) + } + // make an Any with a type URL that won't resolve w/out custom resolver + any := &types.Any{ + TypeUrl: "https://foobar.com/some.random.MessageKind", + Value: msgBytes, + } + + m := Marshaler{AnyResolver: resolver} + js, err := m.MarshalToString(any) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling any to JSON: %v", err) + } + if len(resolvedTypeUrls) != 1 { + t.Errorf("custom resolver was not invoked during marshaling") + } else if resolvedTypeUrls[0] != "https://foobar.com/some.random.MessageKind" { + t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[0], "https://foobar.com/some.random.MessageKind") + } + wanted := `{"@type":"https://foobar.com/some.random.MessageKind","oBool":true,"oInt64":"1020304","oString":"foobar","oBytes":"AQIDBA=="}` + if js != wanted { + t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", js, wanted) + } + + u := Unmarshaler{AnyResolver: resolver} + roundTrip := &types.Any{} + err = u.Unmarshal(bytes.NewReader([]byte(js)), roundTrip) + if err != nil { + t.Errorf("an unexpected error occurred when unmarshaling any from JSON: %v", err) + } + if len(resolvedTypeUrls) != 2 { + t.Errorf("custom resolver was not invoked during marshaling") + } else if resolvedTypeUrls[1] != "https://foobar.com/some.random.MessageKind" { + t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[1], "https://foobar.com/some.random.MessageKind") + } + if !proto.Equal(any, roundTrip) { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", roundTrip, any) + } +} + +func TestUnmarshalJSONPBUnmarshaler(t *testing.T) { + rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` + var msg dynamicMessage + if err := Unmarshal(strings.NewReader(rawJson), &msg); err != nil { + t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) + } + if msg.rawJson != rawJson { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.rawJson, rawJson) + } +} + +func TestUnmarshalNullWithJSONPBUnmarshaler(t *testing.T) { + rawJson := `{"stringField":null}` + var ptrFieldMsg ptrFieldMessage + if err := Unmarshal(strings.NewReader(rawJson), &ptrFieldMsg); err != nil { + t.Errorf("unmarshal error: %v", err) + } + + want := ptrFieldMessage{StringField: &stringField{IsSet: true, StringValue: "null"}} + if !proto.Equal(&ptrFieldMsg, &want) { + t.Errorf("unmarshal result StringField: got %v, want %v", ptrFieldMsg, want) + } +} + +func TestUnmarshalAnyJSONPBUnmarshaler(t *testing.T) { + rawJson := `{ "@type": "blah.com/` + dynamicMessageName + `", "foo": "bar", "baz": [0, 1, 2, 3] }` + var got types.Any + if err := Unmarshal(strings.NewReader(rawJson), &got); err != nil { + t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) + } + + dm := &dynamicMessage{rawJson: `{"baz":[0,1,2,3],"foo":"bar"}`} + var want types.Any + if b, err := proto.Marshal(dm); err != nil { + t.Errorf("an unexpected error occurred when marshaling message: %v", err) + } else { + want.TypeUrl = "blah.com/" + dynamicMessageName + want.Value = b + } + + if !proto.Equal(&got, &want) { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %v, wanted %v", got, want) + } +} + +const ( + dynamicMessageName = "google.protobuf.jsonpb.testing.dynamicMessage" +) + +func init() { + // we register the custom type below so that we can use it in Any types + proto.RegisterType((*dynamicMessage)(nil), dynamicMessageName) +} + +type ptrFieldMessage struct { + StringField *stringField `protobuf:"bytes,1,opt,name=stringField"` +} + +func (m *ptrFieldMessage) Reset() { +} + +func (m *ptrFieldMessage) String() string { + return m.StringField.StringValue +} + +func (m *ptrFieldMessage) ProtoMessage() { +} + +type stringField struct { + IsSet bool `protobuf:"varint,1,opt,name=isSet"` + StringValue string `protobuf:"bytes,2,opt,name=stringValue"` +} + +func (s *stringField) Reset() { +} + +func (s *stringField) String() string { + return s.StringValue +} + +func (s *stringField) ProtoMessage() { +} + +func (s *stringField) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { + s.IsSet = true + s.StringValue = string(js) + return nil +} + +// dynamicMessage implements protobuf.Message but is not a normal generated message type. +// It provides implementations of JSONPBMarshaler and JSONPBUnmarshaler for JSON support. +type dynamicMessage struct { + rawJson string `protobuf:"bytes,1,opt,name=rawJson"` + + // an unexported nested message is present just to ensure that it + // won't result in a panic (see issue #509) + dummy *dynamicMessage `protobuf:"bytes,2,opt,name=dummy"` +} + +func (m *dynamicMessage) Reset() { + m.rawJson = "{}" +} + +func (m *dynamicMessage) String() string { + return m.rawJson +} + +func (m *dynamicMessage) ProtoMessage() { +} + +func (m *dynamicMessage) MarshalJSONPB(jm *Marshaler) ([]byte, error) { + return []byte(m.rawJson), nil +} + +func (m *dynamicMessage) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { + m.rawJson = string(js) + return nil +} + +// Test unmarshaling message containing unset required fields should produce error. +func TestUnmarshalUnsetRequiredFields(t *testing.T) { + tests := []struct { + desc string + pb proto.Message + json string + }{ + { + desc: "direct required field missing", + pb: &pb.MsgWithRequired{}, + json: `{}`, + }, + { + desc: "direct required field set to null", + pb: &pb.MsgWithRequired{}, + json: `{"str": null}`, + }, + { + desc: "indirect required field missing", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"subm": {}}`, + }, + { + desc: "indirect required field set to null", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"subm": {"str": null}}`, + }, + { + desc: "direct required bytes field missing", + pb: &pb.MsgWithRequiredBytes{}, + json: `{}`, + }, + { + desc: "direct required bytes field set to null", + pb: &pb.MsgWithRequiredBytes{}, + json: `{"byts": null}`, + }, + { + desc: "direct required wkt field missing", + pb: &pb.MsgWithRequiredWKT{}, + json: `{}`, + }, + { + desc: "direct required wkt field set to null", + pb: &pb.MsgWithRequiredWKT{}, + json: `{"str": null}`, + }, + { + desc: "any containing message with required field set to null", + pb: &pb.KnownTypes{}, + json: `{"an": {"@type": "example.com/jsonpb.MsgWithRequired", "str": null}}`, + }, + { + desc: "any containing message with missing required field", + pb: &pb.KnownTypes{}, + json: `{"an": {"@type": "example.com/jsonpb.MsgWithRequired"}}`, + }, + { + desc: "missing required in map value", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"map_field": {"a": {}, "b": {"str": "hi"}}}`, + }, + { + desc: "required in map value set to null", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"map_field": {"a": {"str": "hello"}, "b": {"str": null}}}`, + }, + { + desc: "missing required in slice item", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"slice_field": [{}, {"str": "hi"}]}`, + }, + { + desc: "required in slice item set to null", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"slice_field": [{"str": "hello"}, {"str": null}]}`, + }, + { + desc: "required inside oneof missing", + pb: &pb.MsgWithOneof{}, + json: `{"msgWithRequired": {}}`, + }, + { + desc: "required inside oneof set to null", + pb: &pb.MsgWithOneof{}, + json: `{"msgWithRequired": {"str": null}}`, + }, + { + desc: "required field in extension missing", + pb: &pb.Real{}, + json: `{"[jsonpb.extm]":{}}`, + }, + { + desc: "required field in extension set to null", + pb: &pb.Real{}, + json: `{"[jsonpb.extm]":{"str": null}}`, + }, + } + + for _, tc := range tests { + if err := UnmarshalString(tc.json, tc.pb); err == nil { + t.Errorf("%s: expecting error in unmarshaling with unset required fields %s", tc.desc, tc.json) + } + } +} diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile new file mode 100644 index 000000000..e294f68dd --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile @@ -0,0 +1,33 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2015 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types:. *.proto -I . -I ../../ -I ../../protobuf/ diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go new file mode 100644 index 000000000..bee5f0ed6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go @@ -0,0 +1,7 @@ +package jsonpb + +// Byte is used to test that []byte type aliases are serialized to base64. +type Byte byte + +// Bytes is used to test that []byte type aliases are serialized to base64. +type Bytes []Byte diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go new file mode 100644 index 000000000..4d012a6c8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: more_test_objects.proto + +package jsonpb + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Numeral int32 + +const ( + Numeral_UNKNOWN Numeral = 0 + Numeral_ARABIC Numeral = 1 + Numeral_ROMAN Numeral = 2 +) + +var Numeral_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARABIC", + 2: "ROMAN", +} +var Numeral_value = map[string]int32{ + "UNKNOWN": 0, + "ARABIC": 1, + "ROMAN": 2, +} + +func (x Numeral) String() string { + return proto.EnumName(Numeral_name, int32(x)) +} +func (Numeral) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0} +} + +type Simple3 struct { + Dub float64 `protobuf:"fixed64,1,opt,name=dub,proto3" json:"dub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Simple3) Reset() { *m = Simple3{} } +func (m *Simple3) String() string { return proto.CompactTextString(m) } +func (*Simple3) ProtoMessage() {} +func (*Simple3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0} +} +func (m *Simple3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Simple3.Unmarshal(m, b) +} +func (m *Simple3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Simple3.Marshal(b, m, deterministic) +} +func (dst *Simple3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Simple3.Merge(dst, src) +} +func (m *Simple3) XXX_Size() int { + return xxx_messageInfo_Simple3.Size(m) +} +func (m *Simple3) XXX_DiscardUnknown() { + xxx_messageInfo_Simple3.DiscardUnknown(m) +} + +var xxx_messageInfo_Simple3 proto.InternalMessageInfo + +func (m *Simple3) GetDub() float64 { + if m != nil { + return m.Dub + } + return 0 +} + +type SimpleSlice3 struct { + Slices []string `protobuf:"bytes,1,rep,name=slices" json:"slices,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleSlice3) Reset() { *m = SimpleSlice3{} } +func (m *SimpleSlice3) String() string { return proto.CompactTextString(m) } +func (*SimpleSlice3) ProtoMessage() {} +func (*SimpleSlice3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{1} +} +func (m *SimpleSlice3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleSlice3.Unmarshal(m, b) +} +func (m *SimpleSlice3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleSlice3.Marshal(b, m, deterministic) +} +func (dst *SimpleSlice3) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleSlice3.Merge(dst, src) +} +func (m *SimpleSlice3) XXX_Size() int { + return xxx_messageInfo_SimpleSlice3.Size(m) +} +func (m *SimpleSlice3) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleSlice3.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleSlice3 proto.InternalMessageInfo + +func (m *SimpleSlice3) GetSlices() []string { + if m != nil { + return m.Slices + } + return nil +} + +type SimpleMap3 struct { + Stringy map[string]string `protobuf:"bytes,1,rep,name=stringy" json:"stringy,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleMap3) Reset() { *m = SimpleMap3{} } +func (m *SimpleMap3) String() string { return proto.CompactTextString(m) } +func (*SimpleMap3) ProtoMessage() {} +func (*SimpleMap3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{2} +} +func (m *SimpleMap3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleMap3.Unmarshal(m, b) +} +func (m *SimpleMap3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleMap3.Marshal(b, m, deterministic) +} +func (dst *SimpleMap3) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleMap3.Merge(dst, src) +} +func (m *SimpleMap3) XXX_Size() int { + return xxx_messageInfo_SimpleMap3.Size(m) +} +func (m *SimpleMap3) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleMap3.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleMap3 proto.InternalMessageInfo + +func (m *SimpleMap3) GetStringy() map[string]string { + if m != nil { + return m.Stringy + } + return nil +} + +type SimpleNull3 struct { + Simple *Simple3 `protobuf:"bytes,1,opt,name=simple" json:"simple,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleNull3) Reset() { *m = SimpleNull3{} } +func (m *SimpleNull3) String() string { return proto.CompactTextString(m) } +func (*SimpleNull3) ProtoMessage() {} +func (*SimpleNull3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{3} +} +func (m *SimpleNull3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleNull3.Unmarshal(m, b) +} +func (m *SimpleNull3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleNull3.Marshal(b, m, deterministic) +} +func (dst *SimpleNull3) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleNull3.Merge(dst, src) +} +func (m *SimpleNull3) XXX_Size() int { + return xxx_messageInfo_SimpleNull3.Size(m) +} +func (m *SimpleNull3) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleNull3.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleNull3 proto.InternalMessageInfo + +func (m *SimpleNull3) GetSimple() *Simple3 { + if m != nil { + return m.Simple + } + return nil +} + +type Mappy struct { + Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Enumy map[string]Numeral `protobuf:"bytes,6,rep,name=enumy" json:"enumy,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=jsonpb.Numeral"` + S32Booly map[int32]bool `protobuf:"bytes,7,rep,name=s32booly" json:"s32booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + S64Booly map[int64]bool `protobuf:"bytes,8,rep,name=s64booly" json:"s64booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + U32Booly map[uint32]bool `protobuf:"bytes,9,rep,name=u32booly" json:"u32booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + U64Booly map[uint64]bool `protobuf:"bytes,10,rep,name=u64booly" json:"u64booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Mappy) Reset() { *m = Mappy{} } +func (m *Mappy) String() string { return proto.CompactTextString(m) } +func (*Mappy) ProtoMessage() {} +func (*Mappy) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{4} +} +func (m *Mappy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Mappy.Unmarshal(m, b) +} +func (m *Mappy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Mappy.Marshal(b, m, deterministic) +} +func (dst *Mappy) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mappy.Merge(dst, src) +} +func (m *Mappy) XXX_Size() int { + return xxx_messageInfo_Mappy.Size(m) +} +func (m *Mappy) XXX_DiscardUnknown() { + xxx_messageInfo_Mappy.DiscardUnknown(m) +} + +var xxx_messageInfo_Mappy proto.InternalMessageInfo + +func (m *Mappy) GetNummy() map[int64]int32 { + if m != nil { + return m.Nummy + } + return nil +} + +func (m *Mappy) GetStrry() map[string]string { + if m != nil { + return m.Strry + } + return nil +} + +func (m *Mappy) GetObjjy() map[int32]*Simple3 { + if m != nil { + return m.Objjy + } + return nil +} + +func (m *Mappy) GetBuggy() map[int64]string { + if m != nil { + return m.Buggy + } + return nil +} + +func (m *Mappy) GetBooly() map[bool]bool { + if m != nil { + return m.Booly + } + return nil +} + +func (m *Mappy) GetEnumy() map[string]Numeral { + if m != nil { + return m.Enumy + } + return nil +} + +func (m *Mappy) GetS32Booly() map[int32]bool { + if m != nil { + return m.S32Booly + } + return nil +} + +func (m *Mappy) GetS64Booly() map[int64]bool { + if m != nil { + return m.S64Booly + } + return nil +} + +func (m *Mappy) GetU32Booly() map[uint32]bool { + if m != nil { + return m.U32Booly + } + return nil +} + +func (m *Mappy) GetU64Booly() map[uint64]bool { + if m != nil { + return m.U64Booly + } + return nil +} + +func init() { + proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") + proto.RegisterType((*SimpleSlice3)(nil), "jsonpb.SimpleSlice3") + proto.RegisterType((*SimpleMap3)(nil), "jsonpb.SimpleMap3") + proto.RegisterMapType((map[string]string)(nil), "jsonpb.SimpleMap3.StringyEntry") + proto.RegisterType((*SimpleNull3)(nil), "jsonpb.SimpleNull3") + proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy") + proto.RegisterMapType((map[bool]bool)(nil), "jsonpb.Mappy.BoolyEntry") + proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Mappy.BuggyEntry") + proto.RegisterMapType((map[string]Numeral)(nil), "jsonpb.Mappy.EnumyEntry") + proto.RegisterMapType((map[int64]int32)(nil), "jsonpb.Mappy.NummyEntry") + proto.RegisterMapType((map[int32]*Simple3)(nil), "jsonpb.Mappy.ObjjyEntry") + proto.RegisterMapType((map[int32]bool)(nil), "jsonpb.Mappy.S32boolyEntry") + proto.RegisterMapType((map[int64]bool)(nil), "jsonpb.Mappy.S64boolyEntry") + proto.RegisterMapType((map[string]string)(nil), "jsonpb.Mappy.StrryEntry") + proto.RegisterMapType((map[uint32]bool)(nil), "jsonpb.Mappy.U32boolyEntry") + proto.RegisterMapType((map[uint64]bool)(nil), "jsonpb.Mappy.U64boolyEntry") + proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value) +} + +func init() { + proto.RegisterFile("more_test_objects.proto", fileDescriptor_more_test_objects_bef0d79b901f4c4a) +} + +var fileDescriptor_more_test_objects_bef0d79b901f4c4a = []byte{ + // 526 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdd, 0x6b, 0xdb, 0x3c, + 0x14, 0x87, 0x5f, 0x27, 0xf5, 0xd7, 0x49, 0xfb, 0x2e, 0x88, 0xb1, 0x99, 0xf4, 0x62, 0xc5, 0xb0, + 0xad, 0x0c, 0xe6, 0x8b, 0x78, 0x74, 0x5d, 0x77, 0x95, 0x8e, 0x5e, 0x94, 0x11, 0x07, 0x1c, 0xc2, + 0x2e, 0x4b, 0xdc, 0x99, 0x90, 0xcc, 0x5f, 0xd8, 0xd6, 0xc0, 0xd7, 0xfb, 0xbb, 0x07, 0xe3, 0x48, + 0x72, 0x2d, 0x07, 0x85, 0x6c, 0x77, 0x52, 0x7e, 0xcf, 0xe3, 0x73, 0x24, 0x1d, 0x02, 0x2f, 0xd3, + 0xbc, 0x8c, 0x1f, 0xea, 0xb8, 0xaa, 0x1f, 0xf2, 0x68, 0x17, 0x3f, 0xd6, 0x95, 0x57, 0x94, 0x79, + 0x9d, 0x13, 0x63, 0x57, 0xe5, 0x59, 0x11, 0xb9, 0xe7, 0x60, 0x2e, 0xb7, 0x69, 0x91, 0xc4, 0x3e, + 0x19, 0xc3, 0xf0, 0x3b, 0x8d, 0x1c, 0xed, 0x42, 0xbb, 0xd4, 0x42, 0x5c, 0xba, 0x6f, 0xe0, 0x94, + 0x87, 0xcb, 0x64, 0xfb, 0x18, 0xfb, 0xe4, 0x05, 0x18, 0x15, 0xae, 0x2a, 0x47, 0xbb, 0x18, 0x5e, + 0xda, 0xa1, 0xd8, 0xb9, 0xbf, 0x34, 0x00, 0x0e, 0xce, 0xd7, 0x85, 0x4f, 0x3e, 0x81, 0x59, 0xd5, + 0xe5, 0x36, 0xdb, 0x34,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, 0xc0, 0x45, 0x4b, 0x29, 0x8a, 0xb4, 0x15, + 0xc5, 0x16, 0x45, 0xda, 0x56, 0xb4, 0x55, 0xe2, 0xaa, 0x5f, 0x91, 0x4a, 0x15, 0x69, 0x5b, 0x11, + 0x94, 0x62, 0xbf, 0x62, 0x0b, 0x4f, 0xae, 0x01, 0xba, 0x87, 0x96, 0xe7, 0x6f, 0xa8, 0x98, 0x3f, + 0x5d, 0x9a, 0x3f, 0x34, 0xbb, 0x27, 0xff, 0x97, 0xc9, 0x9d, 0xdc, 0x03, 0x74, 0x8f, 0x2f, 0x9b, + 0x3a, 0x37, 0x5f, 0xcb, 0xa6, 0x62, 0x92, 0xfb, 0x4d, 0x74, 0x73, 0x71, 0xac, 0x7d, 0x7b, 0xdf, + 0x7c, 0xba, 0x10, 0xd9, 0xb4, 0x14, 0xa6, 0xb5, 0xd7, 0x7e, 0x37, 0x2b, 0x8a, 0x83, 0xf7, 0xda, + 0xff, 0xbf, 0x6b, 0x3f, 0xa0, 0x69, 0x5c, 0xae, 0x13, 0xf9, 0x53, 0x9f, 0xe1, 0xac, 0x37, 0x43, + 0x8a, 0xcb, 0x38, 0xdc, 0x07, 0xca, 0xf2, 0xab, 0x1e, 0x3b, 0xfe, 0xbe, 0xbc, 0x3a, 0x54, 0xf9, + 0xec, 0x6f, 0xe4, 0x43, 0x95, 0x4f, 0x8e, 0xc8, 0xef, 0xde, 0x83, 0x29, 0x6e, 0x82, 0x8c, 0xc0, + 0x5c, 0x05, 0x5f, 0x83, 0xc5, 0xb7, 0x60, 0xfc, 0x1f, 0x01, 0x30, 0x66, 0xe1, 0xec, 0xf6, 0xfe, + 0xcb, 0x58, 0x23, 0x36, 0xe8, 0xe1, 0x62, 0x3e, 0x0b, 0xc6, 0x83, 0xc8, 0x60, 0x7f, 0xe0, 0xfe, + 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x84, 0x34, 0xaf, 0xdb, 0x05, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto new file mode 100644 index 000000000..d254fa5fa --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto @@ -0,0 +1,69 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package jsonpb; + +message Simple3 { + double dub = 1; +} + +message SimpleSlice3 { + repeated string slices = 1; +} + +message SimpleMap3 { + map stringy = 1; +} + +message SimpleNull3 { + Simple3 simple = 1; +} + +enum Numeral { + UNKNOWN = 0; + ARABIC = 1; + ROMAN = 2; +} + +message Mappy { + map nummy = 1; + map strry = 2; + map objjy = 3; + map buggy = 4; + map booly = 5; + map enumy = 6; + map s32booly = 7; + map s64booly = 8; + map u32booly = 9; + map u64booly = 10; +} diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go new file mode 100644 index 000000000..354b7ce99 --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go @@ -0,0 +1,1287 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: test_objects.proto + +package jsonpb + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Widget_Color int32 + +const ( + Widget_RED Widget_Color = 0 + Widget_GREEN Widget_Color = 1 + Widget_BLUE Widget_Color = 2 +) + +var Widget_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Widget_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Widget_Color) Enum() *Widget_Color { + p := new(Widget_Color) + *p = x + return p +} +func (x Widget_Color) String() string { + return proto.EnumName(Widget_Color_name, int32(x)) +} +func (x *Widget_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") + if err != nil { + return err + } + *x = Widget_Color(value) + return nil +} +func (Widget_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{3, 0} +} + +// Test message for holding primitive types. +type Simple struct { + OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"` + OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"` + OInt64 *int64 `protobuf:"varint,3,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"` + OUint32 *uint32 `protobuf:"varint,4,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"` + OUint64 *uint64 `protobuf:"varint,5,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"` + OSint32 *int32 `protobuf:"zigzag32,6,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"` + OSint64 *int64 `protobuf:"zigzag64,7,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"` + OFloat *float32 `protobuf:"fixed32,8,opt,name=o_float,json=oFloat" json:"o_float,omitempty"` + ODouble *float64 `protobuf:"fixed64,9,opt,name=o_double,json=oDouble" json:"o_double,omitempty"` + OString *string `protobuf:"bytes,10,opt,name=o_string,json=oString" json:"o_string,omitempty"` + OBytes []byte `protobuf:"bytes,11,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"` + OCastBytes Bytes `protobuf:"bytes,12,opt,name=o_cast_bytes,json=oCastBytes,casttype=Bytes" json:"o_cast_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Simple) Reset() { *m = Simple{} } +func (m *Simple) String() string { return proto.CompactTextString(m) } +func (*Simple) ProtoMessage() {} +func (*Simple) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{0} +} +func (m *Simple) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Simple.Unmarshal(m, b) +} +func (m *Simple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Simple.Marshal(b, m, deterministic) +} +func (dst *Simple) XXX_Merge(src proto.Message) { + xxx_messageInfo_Simple.Merge(dst, src) +} +func (m *Simple) XXX_Size() int { + return xxx_messageInfo_Simple.Size(m) +} +func (m *Simple) XXX_DiscardUnknown() { + xxx_messageInfo_Simple.DiscardUnknown(m) +} + +var xxx_messageInfo_Simple proto.InternalMessageInfo + +func (m *Simple) GetOBool() bool { + if m != nil && m.OBool != nil { + return *m.OBool + } + return false +} + +func (m *Simple) GetOInt32() int32 { + if m != nil && m.OInt32 != nil { + return *m.OInt32 + } + return 0 +} + +func (m *Simple) GetOInt64() int64 { + if m != nil && m.OInt64 != nil { + return *m.OInt64 + } + return 0 +} + +func (m *Simple) GetOUint32() uint32 { + if m != nil && m.OUint32 != nil { + return *m.OUint32 + } + return 0 +} + +func (m *Simple) GetOUint64() uint64 { + if m != nil && m.OUint64 != nil { + return *m.OUint64 + } + return 0 +} + +func (m *Simple) GetOSint32() int32 { + if m != nil && m.OSint32 != nil { + return *m.OSint32 + } + return 0 +} + +func (m *Simple) GetOSint64() int64 { + if m != nil && m.OSint64 != nil { + return *m.OSint64 + } + return 0 +} + +func (m *Simple) GetOFloat() float32 { + if m != nil && m.OFloat != nil { + return *m.OFloat + } + return 0 +} + +func (m *Simple) GetODouble() float64 { + if m != nil && m.ODouble != nil { + return *m.ODouble + } + return 0 +} + +func (m *Simple) GetOString() string { + if m != nil && m.OString != nil { + return *m.OString + } + return "" +} + +func (m *Simple) GetOBytes() []byte { + if m != nil { + return m.OBytes + } + return nil +} + +func (m *Simple) GetOCastBytes() Bytes { + if m != nil { + return m.OCastBytes + } + return nil +} + +// Test message for holding special non-finites primitives. +type NonFinites struct { + FNan *float32 `protobuf:"fixed32,1,opt,name=f_nan,json=fNan" json:"f_nan,omitempty"` + FPinf *float32 `protobuf:"fixed32,2,opt,name=f_pinf,json=fPinf" json:"f_pinf,omitempty"` + FNinf *float32 `protobuf:"fixed32,3,opt,name=f_ninf,json=fNinf" json:"f_ninf,omitempty"` + DNan *float64 `protobuf:"fixed64,4,opt,name=d_nan,json=dNan" json:"d_nan,omitempty"` + DPinf *float64 `protobuf:"fixed64,5,opt,name=d_pinf,json=dPinf" json:"d_pinf,omitempty"` + DNinf *float64 `protobuf:"fixed64,6,opt,name=d_ninf,json=dNinf" json:"d_ninf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonFinites) Reset() { *m = NonFinites{} } +func (m *NonFinites) String() string { return proto.CompactTextString(m) } +func (*NonFinites) ProtoMessage() {} +func (*NonFinites) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{1} +} +func (m *NonFinites) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonFinites.Unmarshal(m, b) +} +func (m *NonFinites) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonFinites.Marshal(b, m, deterministic) +} +func (dst *NonFinites) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonFinites.Merge(dst, src) +} +func (m *NonFinites) XXX_Size() int { + return xxx_messageInfo_NonFinites.Size(m) +} +func (m *NonFinites) XXX_DiscardUnknown() { + xxx_messageInfo_NonFinites.DiscardUnknown(m) +} + +var xxx_messageInfo_NonFinites proto.InternalMessageInfo + +func (m *NonFinites) GetFNan() float32 { + if m != nil && m.FNan != nil { + return *m.FNan + } + return 0 +} + +func (m *NonFinites) GetFPinf() float32 { + if m != nil && m.FPinf != nil { + return *m.FPinf + } + return 0 +} + +func (m *NonFinites) GetFNinf() float32 { + if m != nil && m.FNinf != nil { + return *m.FNinf + } + return 0 +} + +func (m *NonFinites) GetDNan() float64 { + if m != nil && m.DNan != nil { + return *m.DNan + } + return 0 +} + +func (m *NonFinites) GetDPinf() float64 { + if m != nil && m.DPinf != nil { + return *m.DPinf + } + return 0 +} + +func (m *NonFinites) GetDNinf() float64 { + if m != nil && m.DNinf != nil { + return *m.DNinf + } + return 0 +} + +// Test message for holding repeated primitives. +type Repeats struct { + RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"` + RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"` + RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"` + RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"` + RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"` + RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"` + RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"` + RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"` + RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"` + RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"` + RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Repeats) Reset() { *m = Repeats{} } +func (m *Repeats) String() string { return proto.CompactTextString(m) } +func (*Repeats) ProtoMessage() {} +func (*Repeats) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{2} +} +func (m *Repeats) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Repeats.Unmarshal(m, b) +} +func (m *Repeats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Repeats.Marshal(b, m, deterministic) +} +func (dst *Repeats) XXX_Merge(src proto.Message) { + xxx_messageInfo_Repeats.Merge(dst, src) +} +func (m *Repeats) XXX_Size() int { + return xxx_messageInfo_Repeats.Size(m) +} +func (m *Repeats) XXX_DiscardUnknown() { + xxx_messageInfo_Repeats.DiscardUnknown(m) +} + +var xxx_messageInfo_Repeats proto.InternalMessageInfo + +func (m *Repeats) GetRBool() []bool { + if m != nil { + return m.RBool + } + return nil +} + +func (m *Repeats) GetRInt32() []int32 { + if m != nil { + return m.RInt32 + } + return nil +} + +func (m *Repeats) GetRInt64() []int64 { + if m != nil { + return m.RInt64 + } + return nil +} + +func (m *Repeats) GetRUint32() []uint32 { + if m != nil { + return m.RUint32 + } + return nil +} + +func (m *Repeats) GetRUint64() []uint64 { + if m != nil { + return m.RUint64 + } + return nil +} + +func (m *Repeats) GetRSint32() []int32 { + if m != nil { + return m.RSint32 + } + return nil +} + +func (m *Repeats) GetRSint64() []int64 { + if m != nil { + return m.RSint64 + } + return nil +} + +func (m *Repeats) GetRFloat() []float32 { + if m != nil { + return m.RFloat + } + return nil +} + +func (m *Repeats) GetRDouble() []float64 { + if m != nil { + return m.RDouble + } + return nil +} + +func (m *Repeats) GetRString() []string { + if m != nil { + return m.RString + } + return nil +} + +func (m *Repeats) GetRBytes() [][]byte { + if m != nil { + return m.RBytes + } + return nil +} + +// Test message for holding enums and nested messages. +type Widget struct { + Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"` + RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"` + Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"` + RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"` + Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"` + RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Widget) Reset() { *m = Widget{} } +func (m *Widget) String() string { return proto.CompactTextString(m) } +func (*Widget) ProtoMessage() {} +func (*Widget) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{3} +} +func (m *Widget) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Widget.Unmarshal(m, b) +} +func (m *Widget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Widget.Marshal(b, m, deterministic) +} +func (dst *Widget) XXX_Merge(src proto.Message) { + xxx_messageInfo_Widget.Merge(dst, src) +} +func (m *Widget) XXX_Size() int { + return xxx_messageInfo_Widget.Size(m) +} +func (m *Widget) XXX_DiscardUnknown() { + xxx_messageInfo_Widget.DiscardUnknown(m) +} + +var xxx_messageInfo_Widget proto.InternalMessageInfo + +func (m *Widget) GetColor() Widget_Color { + if m != nil && m.Color != nil { + return *m.Color + } + return Widget_RED +} + +func (m *Widget) GetRColor() []Widget_Color { + if m != nil { + return m.RColor + } + return nil +} + +func (m *Widget) GetSimple() *Simple { + if m != nil { + return m.Simple + } + return nil +} + +func (m *Widget) GetRSimple() []*Simple { + if m != nil { + return m.RSimple + } + return nil +} + +func (m *Widget) GetRepeats() *Repeats { + if m != nil { + return m.Repeats + } + return nil +} + +func (m *Widget) GetRRepeats() []*Repeats { + if m != nil { + return m.RRepeats + } + return nil +} + +type Maps struct { + MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Maps) Reset() { *m = Maps{} } +func (m *Maps) String() string { return proto.CompactTextString(m) } +func (*Maps) ProtoMessage() {} +func (*Maps) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{4} +} +func (m *Maps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Maps.Unmarshal(m, b) +} +func (m *Maps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Maps.Marshal(b, m, deterministic) +} +func (dst *Maps) XXX_Merge(src proto.Message) { + xxx_messageInfo_Maps.Merge(dst, src) +} +func (m *Maps) XXX_Size() int { + return xxx_messageInfo_Maps.Size(m) +} +func (m *Maps) XXX_DiscardUnknown() { + xxx_messageInfo_Maps.DiscardUnknown(m) +} + +var xxx_messageInfo_Maps proto.InternalMessageInfo + +func (m *Maps) GetMInt64Str() map[int64]string { + if m != nil { + return m.MInt64Str + } + return nil +} + +func (m *Maps) GetMBoolSimple() map[bool]*Simple { + if m != nil { + return m.MBoolSimple + } + return nil +} + +type MsgWithOneof struct { + // Types that are valid to be assigned to Union: + // *MsgWithOneof_Title + // *MsgWithOneof_Salary + // *MsgWithOneof_Country + // *MsgWithOneof_HomeAddress + // *MsgWithOneof_MsgWithRequired + Union isMsgWithOneof_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} } +func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } +func (*MsgWithOneof) ProtoMessage() {} +func (*MsgWithOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{5} +} +func (m *MsgWithOneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithOneof.Unmarshal(m, b) +} +func (m *MsgWithOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithOneof.Marshal(b, m, deterministic) +} +func (dst *MsgWithOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithOneof.Merge(dst, src) +} +func (m *MsgWithOneof) XXX_Size() int { + return xxx_messageInfo_MsgWithOneof.Size(m) +} +func (m *MsgWithOneof) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithOneof proto.InternalMessageInfo + +type isMsgWithOneof_Union interface { + isMsgWithOneof_Union() +} + +type MsgWithOneof_Title struct { + Title string `protobuf:"bytes,1,opt,name=title,oneof"` +} +type MsgWithOneof_Salary struct { + Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` +} +type MsgWithOneof_Country struct { + Country string `protobuf:"bytes,3,opt,name=Country,oneof"` +} +type MsgWithOneof_HomeAddress struct { + HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"` +} +type MsgWithOneof_MsgWithRequired struct { + MsgWithRequired *MsgWithRequired `protobuf:"bytes,5,opt,name=msg_with_required,json=msgWithRequired,oneof"` +} + +func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Country) isMsgWithOneof_Union() {} +func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {} +func (*MsgWithOneof_MsgWithRequired) isMsgWithOneof_Union() {} + +func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *MsgWithOneof) GetTitle() string { + if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok { + return x.Title + } + return "" +} + +func (m *MsgWithOneof) GetSalary() int64 { + if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok { + return x.Salary + } + return 0 +} + +func (m *MsgWithOneof) GetCountry() string { + if x, ok := m.GetUnion().(*MsgWithOneof_Country); ok { + return x.Country + } + return "" +} + +func (m *MsgWithOneof) GetHomeAddress() string { + if x, ok := m.GetUnion().(*MsgWithOneof_HomeAddress); ok { + return x.HomeAddress + } + return "" +} + +func (m *MsgWithOneof) GetMsgWithRequired() *MsgWithRequired { + if x, ok := m.GetUnion().(*MsgWithOneof_MsgWithRequired); ok { + return x.MsgWithRequired + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*MsgWithOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{ + (*MsgWithOneof_Title)(nil), + (*MsgWithOneof_Salary)(nil), + (*MsgWithOneof_Country)(nil), + (*MsgWithOneof_HomeAddress)(nil), + (*MsgWithOneof_MsgWithRequired)(nil), + } +} + +func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Title) + case *MsgWithOneof_Salary: + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Salary)) + case *MsgWithOneof_Country: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Country) + case *MsgWithOneof_HomeAddress: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.HomeAddress) + case *MsgWithOneof_MsgWithRequired: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.MsgWithRequired); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) + } + return nil +} + +func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*MsgWithOneof) + switch tag { + case 1: // union.title + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_Title{x} + return true, err + case 2: // union.salary + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &MsgWithOneof_Salary{int64(x)} + return true, err + case 3: // union.Country + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_Country{x} + return true, err + case 4: // union.home_address + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_HomeAddress{x} + return true, err + case 5: // union.msg_with_required + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(MsgWithRequired) + err := b.DecodeMessage(msg) + m.Union = &MsgWithOneof_MsgWithRequired{msg} + return true, err + default: + return false, nil + } +} + +func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Title))) + n += len(x.Title) + case *MsgWithOneof_Salary: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Salary)) + case *MsgWithOneof_Country: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Country))) + n += len(x.Country) + case *MsgWithOneof_HomeAddress: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.HomeAddress))) + n += len(x.HomeAddress) + case *MsgWithOneof_MsgWithRequired: + s := proto.Size(x.MsgWithRequired) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Real struct { + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Real) Reset() { *m = Real{} } +func (m *Real) String() string { return proto.CompactTextString(m) } +func (*Real) ProtoMessage() {} +func (*Real) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{6} +} + +var extRange_Real = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*Real) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Real +} +func (m *Real) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Real.Unmarshal(m, b) +} +func (m *Real) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Real.Marshal(b, m, deterministic) +} +func (dst *Real) XXX_Merge(src proto.Message) { + xxx_messageInfo_Real.Merge(dst, src) +} +func (m *Real) XXX_Size() int { + return xxx_messageInfo_Real.Size(m) +} +func (m *Real) XXX_DiscardUnknown() { + xxx_messageInfo_Real.DiscardUnknown(m) +} + +var xxx_messageInfo_Real proto.InternalMessageInfo + +func (m *Real) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Complex struct { + Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Complex) Reset() { *m = Complex{} } +func (m *Complex) String() string { return proto.CompactTextString(m) } +func (*Complex) ProtoMessage() {} +func (*Complex) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{7} +} + +var extRange_Complex = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Complex +} +func (m *Complex) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Complex.Unmarshal(m, b) +} +func (m *Complex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Complex.Marshal(b, m, deterministic) +} +func (dst *Complex) XXX_Merge(src proto.Message) { + xxx_messageInfo_Complex.Merge(dst, src) +} +func (m *Complex) XXX_Size() int { + return xxx_messageInfo_Complex.Size(m) +} +func (m *Complex) XXX_DiscardUnknown() { + xxx_messageInfo_Complex.DiscardUnknown(m) +} + +var xxx_messageInfo_Complex proto.InternalMessageInfo + +func (m *Complex) GetImaginary() float64 { + if m != nil && m.Imaginary != nil { + return *m.Imaginary + } + return 0 +} + +var E_Complex_RealExtension = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*Complex)(nil), + Field: 123, + Name: "jsonpb.Complex.real_extension", + Tag: "bytes,123,opt,name=real_extension,json=realExtension", + Filename: "test_objects.proto", +} + +type KnownTypes struct { + An *types.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"` + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + St *types.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Lv *types.ListValue `protobuf:"bytes,15,opt,name=lv" json:"lv,omitempty"` + Val *types.Value `protobuf:"bytes,16,opt,name=val" json:"val,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{8} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KnownTypes.Unmarshal(m, b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return xxx_messageInfo_KnownTypes.Size(m) +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetAn() *types.Any { + if m != nil { + return m.An + } + return nil +} + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetSt() *types.Struct { + if m != nil { + return m.St + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetLv() *types.ListValue { + if m != nil { + return m.Lv + } + return nil +} + +func (m *KnownTypes) GetVal() *types.Value { + if m != nil { + return m.Val + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +// Test messages for marshaling/unmarshaling required fields. +type MsgWithRequired struct { + Str *string `protobuf:"bytes,1,req,name=str" json:"str,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithRequired) Reset() { *m = MsgWithRequired{} } +func (m *MsgWithRequired) String() string { return proto.CompactTextString(m) } +func (*MsgWithRequired) ProtoMessage() {} +func (*MsgWithRequired) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{9} +} +func (m *MsgWithRequired) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithRequired.Unmarshal(m, b) +} +func (m *MsgWithRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithRequired.Marshal(b, m, deterministic) +} +func (dst *MsgWithRequired) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithRequired.Merge(dst, src) +} +func (m *MsgWithRequired) XXX_Size() int { + return xxx_messageInfo_MsgWithRequired.Size(m) +} +func (m *MsgWithRequired) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithRequired.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithRequired proto.InternalMessageInfo + +func (m *MsgWithRequired) GetStr() string { + if m != nil && m.Str != nil { + return *m.Str + } + return "" +} + +type MsgWithIndirectRequired struct { + Subm *MsgWithRequired `protobuf:"bytes,1,opt,name=subm" json:"subm,omitempty"` + MapField map[string]*MsgWithRequired `protobuf:"bytes,2,rep,name=map_field,json=mapField" json:"map_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + SliceField []*MsgWithRequired `protobuf:"bytes,3,rep,name=slice_field,json=sliceField" json:"slice_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithIndirectRequired) Reset() { *m = MsgWithIndirectRequired{} } +func (m *MsgWithIndirectRequired) String() string { return proto.CompactTextString(m) } +func (*MsgWithIndirectRequired) ProtoMessage() {} +func (*MsgWithIndirectRequired) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{10} +} +func (m *MsgWithIndirectRequired) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithIndirectRequired.Unmarshal(m, b) +} +func (m *MsgWithIndirectRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithIndirectRequired.Marshal(b, m, deterministic) +} +func (dst *MsgWithIndirectRequired) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithIndirectRequired.Merge(dst, src) +} +func (m *MsgWithIndirectRequired) XXX_Size() int { + return xxx_messageInfo_MsgWithIndirectRequired.Size(m) +} +func (m *MsgWithIndirectRequired) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithIndirectRequired.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithIndirectRequired proto.InternalMessageInfo + +func (m *MsgWithIndirectRequired) GetSubm() *MsgWithRequired { + if m != nil { + return m.Subm + } + return nil +} + +func (m *MsgWithIndirectRequired) GetMapField() map[string]*MsgWithRequired { + if m != nil { + return m.MapField + } + return nil +} + +func (m *MsgWithIndirectRequired) GetSliceField() []*MsgWithRequired { + if m != nil { + return m.SliceField + } + return nil +} + +type MsgWithRequiredBytes struct { + Byts []byte `protobuf:"bytes,1,req,name=byts" json:"byts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithRequiredBytes) Reset() { *m = MsgWithRequiredBytes{} } +func (m *MsgWithRequiredBytes) String() string { return proto.CompactTextString(m) } +func (*MsgWithRequiredBytes) ProtoMessage() {} +func (*MsgWithRequiredBytes) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{11} +} +func (m *MsgWithRequiredBytes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithRequiredBytes.Unmarshal(m, b) +} +func (m *MsgWithRequiredBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithRequiredBytes.Marshal(b, m, deterministic) +} +func (dst *MsgWithRequiredBytes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithRequiredBytes.Merge(dst, src) +} +func (m *MsgWithRequiredBytes) XXX_Size() int { + return xxx_messageInfo_MsgWithRequiredBytes.Size(m) +} +func (m *MsgWithRequiredBytes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithRequiredBytes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithRequiredBytes proto.InternalMessageInfo + +func (m *MsgWithRequiredBytes) GetByts() []byte { + if m != nil { + return m.Byts + } + return nil +} + +type MsgWithRequiredWKT struct { + Str *types.StringValue `protobuf:"bytes,1,req,name=str" json:"str,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithRequiredWKT) Reset() { *m = MsgWithRequiredWKT{} } +func (m *MsgWithRequiredWKT) String() string { return proto.CompactTextString(m) } +func (*MsgWithRequiredWKT) ProtoMessage() {} +func (*MsgWithRequiredWKT) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_7c2b1a76c91e4ff3, []int{12} +} +func (m *MsgWithRequiredWKT) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithRequiredWKT.Unmarshal(m, b) +} +func (m *MsgWithRequiredWKT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithRequiredWKT.Marshal(b, m, deterministic) +} +func (dst *MsgWithRequiredWKT) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithRequiredWKT.Merge(dst, src) +} +func (m *MsgWithRequiredWKT) XXX_Size() int { + return xxx_messageInfo_MsgWithRequiredWKT.Size(m) +} +func (m *MsgWithRequiredWKT) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithRequiredWKT.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithRequiredWKT proto.InternalMessageInfo + +func (m *MsgWithRequiredWKT) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +var E_Name = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*string)(nil), + Field: 124, + Name: "jsonpb.name", + Tag: "bytes,124,opt,name=name", + Filename: "test_objects.proto", +} + +var E_Extm = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*MsgWithRequired)(nil), + Field: 125, + Name: "jsonpb.extm", + Tag: "bytes,125,opt,name=extm", + Filename: "test_objects.proto", +} + +func init() { + proto.RegisterType((*Simple)(nil), "jsonpb.Simple") + proto.RegisterType((*NonFinites)(nil), "jsonpb.NonFinites") + proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") + proto.RegisterType((*Widget)(nil), "jsonpb.Widget") + proto.RegisterType((*Maps)(nil), "jsonpb.Maps") + proto.RegisterMapType((map[bool]*Simple)(nil), "jsonpb.Maps.MBoolSimpleEntry") + proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Maps.MInt64StrEntry") + proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") + proto.RegisterType((*Real)(nil), "jsonpb.Real") + proto.RegisterType((*Complex)(nil), "jsonpb.Complex") + proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes") + proto.RegisterType((*MsgWithRequired)(nil), "jsonpb.MsgWithRequired") + proto.RegisterType((*MsgWithIndirectRequired)(nil), "jsonpb.MsgWithIndirectRequired") + proto.RegisterMapType((map[string]*MsgWithRequired)(nil), "jsonpb.MsgWithIndirectRequired.MapFieldEntry") + proto.RegisterType((*MsgWithRequiredBytes)(nil), "jsonpb.MsgWithRequiredBytes") + proto.RegisterType((*MsgWithRequiredWKT)(nil), "jsonpb.MsgWithRequiredWKT") + proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) + proto.RegisterExtension(E_Complex_RealExtension) + proto.RegisterExtension(E_Name) + proto.RegisterExtension(E_Extm) +} + +func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_test_objects_7c2b1a76c91e4ff3) } + +var fileDescriptor_test_objects_7c2b1a76c91e4ff3 = []byte{ + // 1400 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdd, 0x72, 0x13, 0xc7, + 0x12, 0xf6, 0xee, 0x6a, 0xf5, 0xd3, 0xf2, 0x1f, 0x83, 0x01, 0xa1, 0xc3, 0x39, 0xa8, 0x04, 0x87, + 0xa3, 0x03, 0xb1, 0xa8, 0xc8, 0x2e, 0x17, 0x21, 0xb9, 0xc1, 0xd8, 0x04, 0x02, 0x38, 0xa9, 0xb1, + 0x09, 0xb9, 0x53, 0xad, 0xbc, 0x23, 0xb1, 0x64, 0x77, 0x47, 0x99, 0x99, 0xb5, 0x51, 0x25, 0xa9, + 0xf2, 0x33, 0xa4, 0xf2, 0x04, 0xb9, 0xc8, 0x23, 0xe4, 0x22, 0x6f, 0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 0xfb, 0xfa, 0xf9, 0x51, 0x2e, 0xb7, 0x06, 0xfe, 0x13, 0xb9, 0x1f, 0xb6, 0xa0, 0x94, + 0x06, 0x09, 0x9b, 0x19, 0x5a, 0xdf, 0xe1, 0x2d, 0x30, 0xf2, 0xf0, 0x23, 0x28, 0xb1, 0x77, 0x2a, + 0x99, 0x41, 0x7c, 0xff, 0x37, 0x52, 0xe9, 0x94, 0xaf, 0xfc, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x4e, 0x27, 0x31, 0x2f, 0x7c, 0x0c, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto new file mode 100644 index 000000000..f5d81bd4d --- /dev/null +++ b/deps/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto @@ -0,0 +1,175 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +package jsonpb; + +import weak "gogoproto/gogo.proto"; + +// Test message for holding primitive types. +message Simple { + optional bool o_bool = 1; + optional int32 o_int32 = 2; + optional int64 o_int64 = 3; + optional uint32 o_uint32 = 4; + optional uint64 o_uint64 = 5; + optional sint32 o_sint32 = 6; + optional sint64 o_sint64 = 7; + optional float o_float = 8; + optional double o_double = 9; + optional string o_string = 10; + optional bytes o_bytes = 11; + optional bytes o_cast_bytes = 12 [(gogoproto.casttype) = "Bytes"]; +} + +// Test message for holding special non-finites primitives. +message NonFinites { + optional float f_nan = 1; + optional float f_pinf = 2; + optional float f_ninf = 3; + optional double d_nan = 4; + optional double d_pinf = 5; + optional double d_ninf = 6; +} + + +// Test message for holding repeated primitives. +message Repeats { + repeated bool r_bool = 1; + repeated int32 r_int32 = 2; + repeated int64 r_int64 = 3; + repeated uint32 r_uint32 = 4; + repeated uint64 r_uint64 = 5; + repeated sint32 r_sint32 = 6; + repeated sint64 r_sint64 = 7; + repeated float r_float = 8; + repeated double r_double = 9; + repeated string r_string = 10; + repeated bytes r_bytes = 11; +} + +// Test message for holding enums and nested messages. +message Widget { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color color = 1; + repeated Color r_color = 2; + + optional Simple simple = 10; + repeated Simple r_simple = 11; + + optional Repeats repeats = 20; + repeated Repeats r_repeats = 21; +} + +message Maps { + map m_int64_str = 1; + map m_bool_simple = 2; +} + +message MsgWithOneof { + oneof union { + string title = 1; + int64 salary = 2; + string Country = 3; + string home_address = 4; + MsgWithRequired msg_with_required = 5; + } +} + +message Real { + optional double value = 1; + extensions 100 to max; +} + +extend Real { + optional string name = 124; +} + +message Complex { + extend Real { + optional Complex real_extension = 123; + } + optional double imaginary = 1; + extensions 100 to max; +} + +message KnownTypes { + optional google.protobuf.Any an = 14; + optional google.protobuf.Duration dur = 1; + optional google.protobuf.Struct st = 12; + optional google.protobuf.Timestamp ts = 2; + optional google.protobuf.ListValue lv = 15; + optional google.protobuf.Value val = 16; + + optional google.protobuf.DoubleValue dbl = 3; + optional google.protobuf.FloatValue flt = 4; + optional google.protobuf.Int64Value i64 = 5; + optional google.protobuf.UInt64Value u64 = 6; + optional google.protobuf.Int32Value i32 = 7; + optional google.protobuf.UInt32Value u32 = 8; + optional google.protobuf.BoolValue bool = 9; + optional google.protobuf.StringValue str = 10; + optional google.protobuf.BytesValue bytes = 11; +} + +// Test messages for marshaling/unmarshaling required fields. +message MsgWithRequired { + required string str = 1; +} + +message MsgWithIndirectRequired { + optional MsgWithRequired subm = 1; + map map_field = 2; + repeated MsgWithRequired slice_field = 3; +} + +message MsgWithRequiredBytes { + required bytes byts = 1; +} + +message MsgWithRequiredWKT { + required google.protobuf.StringValue str = 1; +} + +extend Real { + optional MsgWithRequired extm = 125; +} diff --git a/deps/github.com/gogo/protobuf/plugin/compare/compare.go b/deps/github.com/gogo/protobuf/plugin/compare/compare.go index 75c0399af..97d0a4a9a 100644 --- a/deps/github.com/gogo/protobuf/plugin/compare/compare.go +++ b/deps/github.com/gogo/protobuf/plugin/compare/compare.go @@ -512,7 +512,7 @@ func (p *plugin) generateMessage(file *generator.FileDescriptor, message *genera p.In() p.generateMsgNullAndTypeCheck(ccTypeName) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) + vanity.TurnOffNullableForNativeTypes(field) p.generateField(file, message, field) p.P(`return 0`) diff --git a/deps/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go b/deps/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go index 1cb77cacb..bc68efe12 100644 --- a/deps/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go +++ b/deps/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go @@ -47,9 +47,10 @@ package embedcheck import ( "fmt" + "os" + "github.com/gogo/protobuf/gogoproto" "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "os" ) type plugin struct { @@ -163,7 +164,7 @@ func (p *plugin) checkOverwrite(message *generator.Descriptor, enablers map[stri desc := p.ObjectNamed(field.GetTypeName()) msg := desc.(*generator.Descriptor) for errStr, enabled := range enablers { - if enabled(msg.File(), msg.DescriptorProto) { + if enabled(msg.File().FileDescriptorProto, msg.DescriptorProto) { fmt.Fprintf(os.Stderr, "WARNING: found non-%v %v with embedded %v %v\n", names, ccTypeName, errStr, fieldname) } } diff --git a/deps/github.com/gogo/protobuf/plugin/equal/equal.go b/deps/github.com/gogo/protobuf/plugin/equal/equal.go index 6a422635d..41a2c9704 100644 --- a/deps/github.com/gogo/protobuf/plugin/equal/equal.go +++ b/deps/github.com/gogo/protobuf/plugin/equal/equal.go @@ -107,10 +107,7 @@ given to the equal plugin, will generate the following code: func (this *B) Equal(that interface{}) bool { if that == nil { - if this == nil { - return true - } - return false + return this == nil } that1, ok := that.(*B) @@ -118,10 +115,7 @@ given to the equal plugin, will generate the following code: return false } if that1 == nil { - if this == nil { - return true - } - return false + return this == nil } else if this == nil { return false } @@ -236,19 +230,15 @@ func (p *plugin) generateNullableField(fieldname string, verbose bool) { func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) { p.P(`if that == nil {`) p.In() - p.P(`if this == nil {`) - p.In() if verbose { + p.P(`if this == nil {`) + p.In() p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - if verbose { + p.Out() + p.P(`}`) p.P(`return `, p.fmtPkg.Use(), `.Errorf("that == nil && this != nil")`) } else { - p.P(`return false`) + p.P(`return this == nil`) } p.Out() p.P(`}`) @@ -274,19 +264,15 @@ func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) { p.P(`}`) p.P(`if that1 == nil {`) p.In() - p.P(`if this == nil {`) - p.In() if verbose { + p.P(`if this == nil {`) + p.In() p.P(`return nil`) - } else { - p.P(`return true`) - } - p.Out() - p.P(`}`) - if verbose { + p.Out() + p.P(`}`) p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is nil && this != nil")`) } else { - p.P(`return false`) + p.P(`return this == nil`) } p.Out() p.P(`} else if this == nil {`) @@ -627,7 +613,7 @@ func (p *plugin) generateMessage(file *generator.FileDescriptor, message *genera p.In() p.generateMsgNullAndTypeCheck(ccTypeName, verbose) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) + vanity.TurnOffNullableForNativeTypes(field) p.generateField(file, message, field, verbose) if verbose { diff --git a/deps/github.com/gogo/protobuf/plugin/gostring/gostring.go b/deps/github.com/gogo/protobuf/plugin/gostring/gostring.go index 024c9f0aa..31e01e898 100644 --- a/deps/github.com/gogo/protobuf/plugin/gostring/gostring.go +++ b/deps/github.com/gogo/protobuf/plugin/gostring/gostring.go @@ -98,11 +98,12 @@ package gostring import ( "fmt" - "github.com/gogo/protobuf/gogoproto" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" "os" "strconv" "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" ) type gostring struct { @@ -156,7 +157,7 @@ func (p *gostring) Generate(file *generator.FileDescriptor) { continue } p.atleastOne = true - packageName := file.PackageName() + packageName := file.GoPackageName() ccTypeName := generator.CamelCaseSlice(message.TypeName()) p.P(`func (this *`, ccTypeName, `) GoString() string {`) @@ -229,8 +230,22 @@ func (p *gostring) Generate(file *generator.FileDescriptor) { p.P(`if this.`, fieldname, ` != nil {`) p.In() } - if nullable || repeated { + if nullable { p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } else if repeated { + if nullable { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } else { + goTyp, _ := p.GoType(message, field) + goTyp = strings.Replace(goTyp, "[]", "", 1) + p.P("vs := make([]*", goTyp, ", len(this.", fieldname, "))") + p.P("for i := range vs {") + p.In() + p.P("vs[i] = &this.", fieldname, "[i]") + p.Out() + p.P("}") + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", vs) + ",\n")`) + } } else { p.P(`s = append(s, "`, fieldname, `: " + `, stringsPkg.Use(), `.Replace(this.`, fieldname, `.GoString()`, ",`&`,``,1)", ` + ",\n")`) } @@ -246,7 +261,7 @@ func (p *gostring) Generate(file *generator.FileDescriptor) { if field.IsEnum() { if nullable && !repeated && !proto3 { goTyp, _ := p.GoType(message, field) - p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, packageName, ".", generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) + p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) } else { p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) } @@ -285,7 +300,6 @@ func (p *gostring) Generate(file *generator.FileDescriptor) { } p.P(`s = append(s, "}")`) - //outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") p.P(`return `, stringsPkg.Use(), `.Join(s, "")`) p.Out() p.P(`}`) @@ -304,20 +318,15 @@ func (p *gostring) Generate(file *generator.FileDescriptor) { p.P(`return "nil"`) p.Out() p.P(`}`) - outFlds := []string{} fieldname := p.GetOneOfFieldName(message, field) - if field.IsMessage() || p.IsGroup(field) { - tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") - tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `)`}, "") - outFlds = append(outFlds, tmp) - } else { - tmp := strings.Join([]string{"`", fieldname, ":` + "}, "") - tmp += strings.Join([]string{fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, ")"}, "") - outFlds = append(outFlds, tmp) - } - outStr := strings.Join([]string{"s := ", stringsPkg.Use(), ".Join([]string{`&", packageName, ".", ccTypeName, "{` + \n"}, "") - outStr += strings.Join(outFlds, ",\n") - outStr += strings.Join([]string{" + `}`", `}`, `,", "`, ")"}, "") + outStr := strings.Join([]string{ + "s := ", + stringsPkg.Use(), ".Join([]string{`&", packageName, ".", ccTypeName, "{` + \n", + "`", fieldname, ":` + ", fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `)`, + " + `}`", + `}`, + `,", "`, + `)`}, "") p.P(outStr) p.P(`return s`) p.Out() diff --git a/deps/github.com/gogo/protobuf/plugin/gostring/gostringtest.go b/deps/github.com/gogo/protobuf/plugin/gostring/gostringtest.go index c7e6c1698..c790e5908 100644 --- a/deps/github.com/gogo/protobuf/plugin/gostring/gostringtest.go +++ b/deps/github.com/gogo/protobuf/plugin/gostring/gostringtest.go @@ -74,7 +74,7 @@ func (p *test) Generate(imports generator.PluginImports, file *generator.FileDes p.P(`_, err := `, parserPkg.Use(), `.ParseExpr(s1)`) p.P(`if err != nil {`) p.In() - p.P(`panic(err)`) + p.P(`t.Fatal(err)`) p.Out() p.P(`}`) p.Out() diff --git a/deps/github.com/gogo/protobuf/plugin/marshalto/marshalto.go b/deps/github.com/gogo/protobuf/plugin/marshalto/marshalto.go index b2631e673..24110cb44 100644 --- a/deps/github.com/gogo/protobuf/plugin/marshalto/marshalto.go +++ b/deps/github.com/gogo/protobuf/plugin/marshalto/marshalto.go @@ -172,28 +172,20 @@ type marshalto struct { *generator.Generator generator.PluginImports atleastOne bool - unsafePkg generator.Single errorsPkg generator.Single protoPkg generator.Single sortKeysPkg generator.Single mathPkg generator.Single typesPkg generator.Single + binaryPkg generator.Single localName string - unsafe bool } func NewMarshal() *marshalto { return &marshalto{} } -func NewUnsafeMarshal() *marshalto { - return &marshalto{unsafe: true} -} - func (p *marshalto) Name() string { - if p.unsafe { - return "unsafemarshaler" - } return "marshalto" } @@ -202,11 +194,13 @@ func (p *marshalto) Init(g *generator.Generator) { } func (p *marshalto) callFixed64(varName ...string) { - p.P(`i = encodeFixed64`, p.localName, `(dAtA, i, uint64(`, strings.Join(varName, ""), `))`) + p.P(p.binaryPkg.Use(), `.LittleEndian.PutUint64(dAtA[i:], uint64(`, strings.Join(varName, ""), `))`) + p.P(`i += 8`) } func (p *marshalto) callFixed32(varName ...string) { - p.P(`i = encodeFixed32`, p.localName, `(dAtA, i, uint32(`, strings.Join(varName, ""), `))`) + p.P(p.binaryPkg.Use(), `.LittleEndian.PutUint32(dAtA[i:], uint32(`, strings.Join(varName, ""), `))`) + p.P(`i += 4`) } func (p *marshalto) callVarint(varName ...string) { @@ -225,46 +219,6 @@ func (p *marshalto) encodeVarint(varName string) { p.P(`i++`) } -func (p *marshalto) encodeFixed64(varName string) { - p.P(`dAtA[i] = uint8(`, varName, `)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 8)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 16)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 24)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 32)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 40)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 48)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 56)`) - p.P(`i++`) -} - -func (p *marshalto) unsafeFixed64(varName string, someType string) { - p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&dAtA[i])) = `, varName) - p.P(`i+=8`) -} - -func (p *marshalto) encodeFixed32(varName string) { - p.P(`dAtA[i] = uint8(`, varName, `)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 8)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 16)`) - p.P(`i++`) - p.P(`dAtA[i] = uint8(`, varName, ` >> 24)`) - p.P(`i++`) -} - -func (p *marshalto) unsafeFixed32(varName string, someType string) { - p.P(`*(*`, someType, `)(`, p.unsafePkg.Use(), `.Pointer(&dAtA[i])) = `, varName) - p.P(`i+=4`) -} - func (p *marshalto) encodeKey(fieldNumber int32, wireType int) { x := uint32(fieldNumber)<<3 | uint32(wireType) i := 0 @@ -428,132 +382,68 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi } switch *field.Type { case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - if !p.unsafe || gogoproto.IsCastType(field) { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) - p.encodeFixed64("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) - p.encodeFixed64("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(*m.`+fieldname, `))`) - } + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) + p.callFixed64("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) + p.callFixed64("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) } else { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed64("num", "float64") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("num", "float64") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`m.`+fieldname, "float64") - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`m.`+fieldname, "float64") - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64(`*m.`+fieldname, `float64`) - } + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(*m.`+fieldname, `))`) } case descriptor.FieldDescriptorProto_TYPE_FLOAT: - if !p.unsafe || gogoproto.IsCastType(field) { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) - p.encodeFixed32("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) - p.encodeFixed32("f" + numGen.Current()) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(*m.`+fieldname, `))`) - } + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) + p.callFixed32("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) + p.callFixed32("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) } else { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed32("num", "float32") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("num", "float32") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`m.`+fieldname, `float32`) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`m.`+fieldname, `float32`) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32(`*m.`+fieldname, "float32") - } + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(*m.`+fieldname, `))`) } case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64, @@ -610,137 +500,65 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi } case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeFixed64("num") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.encodeFixed64("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed64("m." + fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed64("m." + fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed64("*m." + fieldname) - } + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.callFixed64("num") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64("m." + fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed64("m." + fieldname) } else { - typeName := "int64" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED64 { - typeName = "uint64" - } - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 8`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed64("num", typeName) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("num", typeName) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("m."+fieldname, typeName) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("m."+fieldname, typeName) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed64("*m."+fieldname, typeName) - } + p.encodeKey(fieldNumber, wireType) + p.callFixed64("*m." + fieldname) } case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if !p.unsafe { - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeFixed32("num") - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.encodeFixed32("num") - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.callFixed32("m." + fieldname) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.callFixed32("m." + fieldname) - } else { - p.encodeKey(fieldNumber, wireType) - p.callFixed32("*m." + fieldname) - } + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.callFixed32("num") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32("m." + fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed32("m." + fieldname) } else { - typeName := "int32" - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FIXED32 { - typeName = "uint32" - } - if packed { - p.encodeKey(fieldNumber, wireType) - p.callVarint(`len(m.`, fieldname, `) * 4`) - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.unsafeFixed32("num", typeName) - p.Out() - p.P(`}`) - } else if repeated { - p.P(`for _, num := range m.`, fieldname, ` {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("num", typeName) - p.Out() - p.P(`}`) - } else if proto3 { - p.P(`if m.`, fieldname, ` != 0 {`) - p.In() - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("m."+fieldname, typeName) - p.Out() - p.P(`}`) - } else if !nullable { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("m."+fieldname, typeName) - } else { - p.encodeKey(fieldNumber, wireType) - p.unsafeFixed32("*m."+fieldname, typeName) - } + p.encodeKey(fieldNumber, wireType) + p.callFixed32("*m." + fieldname) } case descriptor.FieldDescriptorProto_TYPE_BOOL: if packed { @@ -1240,6 +1058,7 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi func (p *marshalto) Generate(file *generator.FileDescriptor) { numGen := NewNumGen() p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false p.localName = generator.FileName(file) @@ -1249,8 +1068,8 @@ func (p *marshalto) Generate(file *generator.FileDescriptor) { if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { p.protoPkg = p.NewImport("github.com/golang/protobuf/proto") } - p.unsafePkg = p.NewImport("unsafe") p.errorsPkg = p.NewImport("errors") + p.binaryPkg = p.NewImport("encoding/binary") p.typesPkg = p.NewImport("github.com/gogo/protobuf/types") for _, message := range file.Messages() { @@ -1258,21 +1077,9 @@ func (p *marshalto) Generate(file *generator.FileDescriptor) { continue } ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if p.unsafe { - if !gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) - } - } - if !p.unsafe { - if !gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_marshaler and marshalto enabled for %v", ccTypeName)) - } + if !gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) && + !gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue } p.atleastOne = true @@ -1367,7 +1174,7 @@ func (p *marshalto) Generate(file *generator.FileDescriptor) { p.P(`func (m *`, ccTypeName, `) MarshalTo(dAtA []byte) (int, error) {`) p.In() p.P(`i := 0`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(field) + vanity.TurnOffNullableForNativeTypes(field) p.generateField(false, numGen, file, message, field) p.P(`return i, nil`) p.Out() @@ -1376,30 +1183,6 @@ func (p *marshalto) Generate(file *generator.FileDescriptor) { } if p.atleastOne { - p.P(`func encodeFixed64`, p.localName, `(dAtA []byte, offset int, v uint64) int {`) - p.In() - p.P(`dAtA[offset] = uint8(v)`) - p.P(`dAtA[offset+1] = uint8(v >> 8)`) - p.P(`dAtA[offset+2] = uint8(v >> 16)`) - p.P(`dAtA[offset+3] = uint8(v >> 24)`) - p.P(`dAtA[offset+4] = uint8(v >> 32)`) - p.P(`dAtA[offset+5] = uint8(v >> 40)`) - p.P(`dAtA[offset+6] = uint8(v >> 48)`) - p.P(`dAtA[offset+7] = uint8(v >> 56)`) - p.P(`return offset+8`) - p.Out() - p.P(`}`) - - p.P(`func encodeFixed32`, p.localName, `(dAtA []byte, offset int, v uint32) int {`) - p.In() - p.P(`dAtA[offset] = uint8(v)`) - p.P(`dAtA[offset+1] = uint8(v >> 8)`) - p.P(`dAtA[offset+2] = uint8(v >> 16)`) - p.P(`dAtA[offset+3] = uint8(v >> 24)`) - p.P(`return offset+4`) - p.Out() - p.P(`}`) - p.P(`func encodeVarint`, p.localName, `(dAtA []byte, offset int, v uint64) int {`) p.In() p.P(`for v >= 1<<7 {`) @@ -1419,5 +1202,4 @@ func (p *marshalto) Generate(file *generator.FileDescriptor) { func init() { generator.RegisterPlugin(NewMarshal()) - generator.RegisterPlugin(NewUnsafeMarshal()) } diff --git a/deps/github.com/gogo/protobuf/plugin/populate/populate.go b/deps/github.com/gogo/protobuf/plugin/populate/populate.go index 16aee3248..40869581b 100644 --- a/deps/github.com/gogo/protobuf/plugin/populate/populate.go +++ b/deps/github.com/gogo/protobuf/plugin/populate/populate.go @@ -443,7 +443,7 @@ func (p *plugin) GenerateField(file *generator.FileDescriptor, message *generato } } -func (p *plugin) hasLoop(field *descriptor.FieldDescriptorProto, visited []*generator.Descriptor, excludes []*generator.Descriptor) *generator.Descriptor { +func (p *plugin) hasLoop(pkg string, field *descriptor.FieldDescriptorProto, visited []*generator.Descriptor, excludes []*generator.Descriptor) *generator.Descriptor { if field.IsMessage() || p.IsGroup(field) || p.IsMap(field) { var fieldMessage *generator.Descriptor if p.IsMap(field) { @@ -467,11 +467,11 @@ func (p *plugin) hasLoop(field *descriptor.FieldDescriptorProto, visited []*gene return fieldMessage } } - pkg := strings.Split(field.GetTypeName(), ".")[1] + for _, f := range fieldMessage.Field { - if strings.HasPrefix(f.GetTypeName(), "."+pkg+".") { + if strings.HasPrefix(f.GetTypeName(), "."+pkg) { visited = append(visited, fieldMessage) - loopTo := p.hasLoop(f, visited, excludes) + loopTo := p.hasLoop(pkg, f, visited, excludes) if loopTo != nil { return loopTo } @@ -481,13 +481,13 @@ func (p *plugin) hasLoop(field *descriptor.FieldDescriptorProto, visited []*gene return nil } -func (p *plugin) loops(field *descriptor.FieldDescriptorProto, message *generator.Descriptor) int { +func (p *plugin) loops(pkg string, field *descriptor.FieldDescriptorProto, message *generator.Descriptor) int { //fmt.Fprintf(os.Stderr, "loops %v %v\n", field.GetTypeName(), generator.CamelCaseSlice(message.TypeName())) excludes := []*generator.Descriptor{} loops := 0 for { visited := []*generator.Descriptor{} - loopTo := p.hasLoop(field, visited, excludes) + loopTo := p.hasLoop(pkg, field, visited, excludes) if loopTo == nil { break } @@ -522,7 +522,7 @@ func (p *plugin) Generate(file *generator.FileDescriptor) { loopLevels := make([]int, len(message.Field)) maxLoopLevel := 0 for i, field := range message.Field { - loopLevels[i] = p.loops(field, message) + loopLevels[i] = p.loops(file.GetPackage(), field, message) if loopLevels[i] > maxLoopLevel { maxLoopLevel = loopLevels[i] } @@ -534,7 +534,7 @@ func (p *plugin) Generate(file *generator.FileDescriptor) { p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) p.In() p.P(`this := &`, ccTypeName, `{}`) - if gogoproto.IsUnion(message.File(), message.DescriptorProto) && len(message.Field) > 0 { + if gogoproto.IsUnion(message.File().FileDescriptorProto, message.DescriptorProto) && len(message.Field) > 0 { p.P(`fieldNum := r.Intn(`, fmt.Sprintf("%d", ranTotal), `)`) p.P(`switch fieldNum {`) k := 0 @@ -667,7 +667,7 @@ func (p *plugin) Generate(file *generator.FileDescriptor) { p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) p.In() p.P(`this := &`, ccTypeName, `{}`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) + vanity.TurnOffNullableForNativeTypes(f) p.GenerateField(file, message, f) p.P(`return this`) p.Out() diff --git a/deps/github.com/gogo/protobuf/plugin/size/size.go b/deps/github.com/gogo/protobuf/plugin/size/size.go index 014831b12..79cd403be 100644 --- a/deps/github.com/gogo/protobuf/plugin/size/size.go +++ b/deps/github.com/gogo/protobuf/plugin/size/size.go @@ -652,7 +652,7 @@ func (p *size) Generate(file *generator.FileDescriptor) { p.In() p.P(`var l int`) p.P(`_ = l`) - vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly(f) + vanity.TurnOffNullableForNativeTypes(f) p.generateField(false, file, message, f, sizeName) p.P(`return n`) p.Out() diff --git a/deps/github.com/gogo/protobuf/plugin/testgen/testgen.go b/deps/github.com/gogo/protobuf/plugin/testgen/testgen.go index a9364f99a..e0a9287e5 100644 --- a/deps/github.com/gogo/protobuf/plugin/testgen/testgen.go +++ b/deps/github.com/gogo/protobuf/plugin/testgen/testgen.go @@ -270,7 +270,6 @@ func (p *testProto) Generate(imports generator.PluginImports, file *generator.Fi testingPkg := imports.NewImport("testing") randPkg := imports.NewImport("math/rand") timePkg := imports.NewImport("time") - unsafePkg := imports.NewImport("unsafe") protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { protoPkg = imports.NewImport("github.com/golang/protobuf/proto") @@ -280,21 +279,11 @@ func (p *testProto) Generate(imports generator.PluginImports, file *generator.Fi if message.DescriptorProto.GetOptions().GetMapEntry() { continue } - hasUnsafe := gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) || - gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { used = true p.P(`func Test`, ccTypeName, `Proto(t *`, testingPkg.Use(), `.T) {`) p.In() - if hasUnsafe { - p.P(`var bigendian uint32 = 0x01020304`) - p.P(`if *(*byte)(`, unsafePkg.Use(), `.Pointer(&bigendian)) == 1 {`) - p.In() - p.P(`t.Skip("unsafe does not work on big endian architectures")`) - p.Out() - p.P(`}`) - } p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) @@ -351,14 +340,6 @@ func (p *testProto) Generate(imports generator.PluginImports, file *generator.Fi if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) || gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { p.P(`func Test`, ccTypeName, `MarshalTo(t *`, testingPkg.Use(), `.T) {`) p.In() - if hasUnsafe { - p.P(`var bigendian uint32 = 0x01020304`) - p.P(`if *(*byte)(`, unsafePkg.Use(), `.Pointer(&bigendian)) == 1 {`) - p.In() - p.P(`t.Skip("unsafe does not work on big endian architectures")`) - p.Out() - p.P(`}`) - } p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) diff --git a/deps/github.com/gogo/protobuf/plugin/union/union.go b/deps/github.com/gogo/protobuf/plugin/union/union.go index 72edb2498..90def721c 100644 --- a/deps/github.com/gogo/protobuf/plugin/union/union.go +++ b/deps/github.com/gogo/protobuf/plugin/union/union.go @@ -184,7 +184,7 @@ func (p *union) Generate(file *generator.FileDescriptor) { goTyp, _ := p.GoType(message, field) obj := p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) - if gogoproto.IsUnion(obj.File(), obj.DescriptorProto) { + if gogoproto.IsUnion(obj.File().FileDescriptorProto, obj.DescriptorProto) { p.P(`this.`, fieldname, ` = new(`, generator.GoTypeToName(goTyp), `)`) p.P(`if set := this.`, fieldname, `.SetValue(value); set {`) p.In() diff --git a/deps/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go b/deps/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go index 6b67914b0..53265a53c 100644 --- a/deps/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go +++ b/deps/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go @@ -187,13 +187,12 @@ import ( type unmarshal struct { *generator.Generator - unsafe bool generator.PluginImports atleastOne bool ioPkg generator.Single mathPkg generator.Single - unsafePkg generator.Single typesPkg generator.Single + binaryPkg generator.Single localName string } @@ -201,14 +200,7 @@ func NewUnmarshal() *unmarshal { return &unmarshal{} } -func NewUnsafeUnmarshal() *unmarshal { - return &unmarshal{unsafe: true} -} - func (p *unmarshal) Name() string { - if p.unsafe { - return "unsafeunmarshaler" - } return "unmarshal" } @@ -247,20 +239,7 @@ func (p *unmarshal) decodeFixed32(varName string, typeName string) { p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) p.Out() p.P(`}`) - p.P(`iNdEx += 4`) - p.P(varName, ` = `, typeName, `(dAtA[iNdEx-4])`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-3]) << 8`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-2]) << 16`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-1]) << 24`) -} - -func (p *unmarshal) unsafeFixed32(varName string, typeName string) { - p.P(`if iNdEx + 4 > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&dAtA[iNdEx]))`) + p.P(varName, ` = `, typeName, `(`, p.binaryPkg.Use(), `.LittleEndian.Uint32(dAtA[iNdEx:]))`) p.P(`iNdEx += 4`) } @@ -270,25 +249,71 @@ func (p *unmarshal) decodeFixed64(varName string, typeName string) { p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) p.Out() p.P(`}`) + p.P(varName, ` = `, typeName, `(`, p.binaryPkg.Use(), `.LittleEndian.Uint64(dAtA[iNdEx:]))`) p.P(`iNdEx += 8`) - p.P(varName, ` = `, typeName, `(dAtA[iNdEx-8])`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-7]) << 8`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-6]) << 16`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-5]) << 24`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-4]) << 32`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-3]) << 40`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-2]) << 48`) - p.P(varName, ` |= `, typeName, `(dAtA[iNdEx-1]) << 56`) } -func (p *unmarshal) unsafeFixed64(varName string, typeName string) { - p.P(`if iNdEx + 8 > l {`) - p.In() - p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) - p.Out() - p.P(`}`) - p.P(varName, ` = *(*`, typeName, `)(`, p.unsafePkg.Use(), `.Pointer(&dAtA[iNdEx]))`) - p.P(`iNdEx += 8`) +func (p *unmarshal) declareMapField(varName string, nullable bool, customType bool, field *descriptor.FieldDescriptorProto) { + switch field.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + p.P(`var `, varName, ` float64`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + p.P(`var `, varName, ` float32`) + case descriptor.FieldDescriptorProto_TYPE_INT64: + p.P(`var `, varName, ` int64`) + case descriptor.FieldDescriptorProto_TYPE_UINT64: + p.P(`var `, varName, ` uint64`) + case descriptor.FieldDescriptorProto_TYPE_INT32: + p.P(`var `, varName, ` int32`) + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + p.P(`var `, varName, ` uint64`) + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + p.P(`var `, varName, ` uint32`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`var `, varName, ` bool`) + case descriptor.FieldDescriptorProto_TYPE_STRING: + cast, _ := p.GoType(nil, field) + cast = strings.Replace(cast, "*", "", 1) + p.P(`var `, varName, ` `, cast) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if gogoproto.IsStdTime(field) { + p.P(varName, ` := new(time.Time)`) + } else if gogoproto.IsStdDuration(field) { + p.P(varName, ` := new(time.Duration)`) + } else { + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + if nullable { + p.P(`var `, varName, ` *`, msgname) + } else { + p.P(varName, ` := &`, msgname, `{}`) + } + } + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if customType { + _, ctyp, err := generator.GetCustomType(field) + if err != nil { + panic(err) + } + p.P(`var `, varName, `1 `, ctyp) + p.P(`var `, varName, ` = &`, varName, `1`) + } else { + p.P(varName, ` := []byte{}`) + } + case descriptor.FieldDescriptorProto_TYPE_UINT32: + p.P(`var `, varName, ` uint32`) + case descriptor.FieldDescriptorProto_TYPE_ENUM: + typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) + p.P(`var `, varName, ` `, typName) + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + p.P(`var `, varName, ` int32`) + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + p.P(`var `, varName, ` int64`) + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.P(`var `, varName, ` int32`) + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.P(`var `, varName, ` int64`) + } } func (p *unmarshal) mapField(varName string, customType bool, field *descriptor.FieldDescriptorProto) { @@ -296,30 +321,25 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor. case descriptor.FieldDescriptorProto_TYPE_DOUBLE: p.P(`var `, varName, `temp uint64`) p.decodeFixed64(varName+"temp", "uint64") - p.P(varName, ` := `, p.mathPkg.Use(), `.Float64frombits(`, varName, `temp)`) + p.P(varName, ` = `, p.mathPkg.Use(), `.Float64frombits(`, varName, `temp)`) case descriptor.FieldDescriptorProto_TYPE_FLOAT: p.P(`var `, varName, `temp uint32`) p.decodeFixed32(varName+"temp", "uint32") - p.P(varName, ` := `, p.mathPkg.Use(), `.Float32frombits(`, varName, `temp)`) + p.P(varName, ` = `, p.mathPkg.Use(), `.Float32frombits(`, varName, `temp)`) case descriptor.FieldDescriptorProto_TYPE_INT64: - p.P(`var `, varName, ` int64`) p.decodeVarint(varName, "int64") case descriptor.FieldDescriptorProto_TYPE_UINT64: - p.P(`var `, varName, ` uint64`) p.decodeVarint(varName, "uint64") case descriptor.FieldDescriptorProto_TYPE_INT32: - p.P(`var `, varName, ` int32`) p.decodeVarint(varName, "int32") case descriptor.FieldDescriptorProto_TYPE_FIXED64: - p.P(`var `, varName, ` uint64`) p.decodeFixed64(varName, "uint64") case descriptor.FieldDescriptorProto_TYPE_FIXED32: - p.P(`var `, varName, ` uint32`) p.decodeFixed32(varName, "uint32") case descriptor.FieldDescriptorProto_TYPE_BOOL: p.P(`var `, varName, `temp int`) p.decodeVarint(varName+"temp", "int") - p.P(varName, ` := bool(`, varName, `temp != 0)`) + p.P(varName, ` = bool(`, varName, `temp != 0)`) case descriptor.FieldDescriptorProto_TYPE_STRING: p.P(`var stringLen`, varName, ` uint64`) p.decodeVarint("stringLen"+varName, "uint64") @@ -337,7 +357,7 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor. p.P(`}`) cast, _ := p.GoType(nil, field) cast = strings.Replace(cast, "*", "", 1) - p.P(varName, ` := `, cast, `(dAtA[iNdEx:postStringIndex`, varName, `])`) + p.P(varName, ` = `, cast, `(dAtA[iNdEx:postStringIndex`, varName, `])`) p.P(`iNdEx = postStringIndex`, varName) case descriptor.FieldDescriptorProto_TYPE_MESSAGE: p.P(`var mapmsglen int`) @@ -358,17 +378,15 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor. p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) p.Out() p.P(`}`) - desc := p.ObjectNamed(field.GetTypeName()) - msgname := p.TypeName(desc) buf := `dAtA[iNdEx:postmsgIndex]` if gogoproto.IsStdTime(field) { - p.P(varName, ` := new(time.Time)`) p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(`, varName, `, `, buf, `); err != nil {`) } else if gogoproto.IsStdDuration(field) { - p.P(varName, ` := new(time.Duration)`) p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(`, varName, `, `, buf, `); err != nil {`) } else { - p.P(varName, ` := &`, msgname, `{}`) + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + p.P(varName, ` = &`, msgname, `{}`) p.P(`if err := `, varName, `.Unmarshal(`, buf, `); err != nil {`) } p.In() @@ -392,45 +410,35 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor. p.Out() p.P(`}`) if customType { - _, ctyp, err := generator.GetCustomType(field) - if err != nil { - panic(err) - } - p.P(`var `, varName, `1 `, ctyp) - p.P(`var `, varName, ` = &`, varName, `1`) p.P(`if err := `, varName, `.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil {`) p.In() p.P(`return err`) p.Out() p.P(`}`) } else { - p.P(varName, ` := make([]byte, mapbyteLen)`) + p.P(varName, ` = make([]byte, mapbyteLen)`) p.P(`copy(`, varName, `, dAtA[iNdEx:postbytesIndex])`) } p.P(`iNdEx = postbytesIndex`) case descriptor.FieldDescriptorProto_TYPE_UINT32: - p.P(`var `, varName, ` uint32`) p.decodeVarint(varName, "uint32") case descriptor.FieldDescriptorProto_TYPE_ENUM: typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) - p.P(`var `, varName, ` `, typName) p.decodeVarint(varName, typName) case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - p.P(`var `, varName, ` int32`) p.decodeFixed32(varName, "int32") case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - p.P(`var `, varName, ` int64`) p.decodeFixed64(varName, "int64") case descriptor.FieldDescriptorProto_TYPE_SINT32: p.P(`var `, varName, `temp int32`) p.decodeVarint(varName+"temp", "int32") p.P(varName, `temp = int32((uint32(`, varName, `temp) >> 1) ^ uint32(((`, varName, `temp&1)<<31)>>31))`) - p.P(varName, ` := int32(`, varName, `temp)`) + p.P(varName, ` = int32(`, varName, `temp)`) case descriptor.FieldDescriptorProto_TYPE_SINT64: p.P(`var `, varName, `temp uint64`) p.decodeVarint(varName+"temp", "uint64") p.P(varName, `temp = (`, varName, `temp >> 1) ^ uint64((int64(`, varName, `temp&1)<<63)>>63)`) - p.P(varName, ` := int64(`, varName, `temp)`) + p.P(varName, ` = int64(`, varName, `temp)`) } } @@ -452,68 +460,32 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip oneof := field.OneofIndex != nil switch *field.Type { case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - if !p.unsafe || gogoproto.IsCastType(field) { - p.P(`var v uint64`) - p.decodeFixed64("v", "uint64") - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))}`) - } else if repeated { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - } else { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) - p.P(`m.`, fieldname, ` = &v2`) - } + p.P(`var v uint64`) + p.decodeFixed64("v", "uint64") + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))}`) + } else if repeated { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) } else { - if oneof { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64(`m.`+fieldname, "float64") - } else { - p.P(`var v float64`) - p.unsafeFixed64("v", "float64") - p.P(`m.`, fieldname, ` = &v`) - } + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + p.P(`m.`, fieldname, ` = &v2`) } case descriptor.FieldDescriptorProto_TYPE_FLOAT: - if !p.unsafe || gogoproto.IsCastType(field) { - p.P(`var v uint32`) - p.decodeFixed32("v", "uint32") - if oneof { - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))}`) - } else if repeated { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - } else { - p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) - p.P(`m.`, fieldname, ` = &v2`) - } + p.P(`var v uint32`) + p.decodeFixed32("v", "uint32") + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))}`) + } else if repeated { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) } else { - if oneof { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "float32") - } else { - p.P(`var v float32`) - p.unsafeFixed32("v", "float32") - p.P(`m.`, fieldname, ` = &v`) - } + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + p.P(`m.`, fieldname, ` = &v2`) } case descriptor.FieldDescriptorProto_TYPE_INT64: if oneof { @@ -567,74 +539,38 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip p.P(`m.`, fieldname, ` = &v`) } case descriptor.FieldDescriptorProto_TYPE_FIXED64: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed64("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } + if oneof { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed64("m."+fieldname, typ) } else { - if oneof { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64("m."+fieldname, "uint64") - } else { - p.P(`var v uint64`) - p.unsafeFixed64("v", "uint64") - p.P(`m.`, fieldname, ` = &v`) - } + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &v`) } case descriptor.FieldDescriptorProto_TYPE_FIXED32: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed32("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } + if oneof { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed32("m."+fieldname, typ) } else { - if oneof { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "uint32") - } else { - p.P(`var v uint32`) - p.unsafeFixed32("v", "uint32") - p.P(`m.`, fieldname, ` = &v`) - } + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &v`) } case descriptor.FieldDescriptorProto_TYPE_BOOL: p.P(`var v int`) @@ -747,20 +683,63 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip valuegoTyp = valuegoAliasTyp } - p.P(`var keykey uint64`) - p.decodeVarint("keykey", "uint64") - p.mapField("mapkey", false, m.KeyAliasField) p.P(`if m.`, fieldname, ` == nil {`) p.In() p.P(`m.`, fieldname, ` = make(`, m.GoType, `)`) p.Out() p.P(`}`) + + p.declareMapField("mapkey", false, false, m.KeyAliasField) + p.declareMapField("mapvalue", nullable, gogoproto.IsCustomType(field), m.ValueAliasField) + p.P(`for iNdEx < postIndex {`) + p.In() + + p.P(`entryPreIndex := iNdEx`) + p.P(`var wire uint64`) + p.decodeVarint("wire", "uint64") + p.P(`fieldNum := int32(wire >> 3)`) + + p.P(`if fieldNum == 1 {`) + p.In() + p.mapField("mapkey", false, m.KeyAliasField) + p.Out() + p.P(`} else if fieldNum == 2 {`) + p.In() + p.mapField("mapvalue", gogoproto.IsCustomType(field), m.ValueAliasField) + p.Out() + p.P(`} else {`) + p.In() + p.P(`iNdEx = entryPreIndex`) + p.P(`skippy, err := skip`, p.localName, `(dAtA[iNdEx:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`if skippy < 0 {`) + p.In() + p.P(`return ErrInvalidLength`, p.localName) + p.Out() + p.P(`}`) + p.P(`if (iNdEx + skippy) > postIndex {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`iNdEx += skippy`) + p.Out() + p.P(`}`) + + p.Out() + p.P(`}`) + s := `m.` + fieldname if keygoTyp == keygoAliasTyp { s += `[mapkey]` } else { s += `[` + keygoAliasTyp + `(mapkey)]` } + v := `mapvalue` if (m.ValueField.IsMessage() || gogoproto.IsCustomType(field)) && !nullable { v = `*` + v @@ -768,35 +747,8 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip if valuegoTyp != valuegoAliasTyp { v = `((` + valuegoAliasTyp + `)(` + v + `))` } - p.P(`if iNdEx < postIndex {`) - p.In() - p.P(`var valuekey uint64`) - p.decodeVarint("valuekey", "uint64") - p.mapField("mapvalue", gogoproto.IsCustomType(field), m.ValueAliasField) + p.P(s, ` = `, v) - p.Out() - p.P(`} else {`) - p.In() - if gogoproto.IsStdTime(field) { - p.P(`var mapvalue = new(time.Time)`) - if nullable { - p.P(s, ` = mapvalue`) - } else { - p.P(s, ` = *mapvalue`) - } - } else if gogoproto.IsStdDuration(field) { - p.P(`var mapvalue = new(time.Duration)`) - if nullable { - p.P(s, ` = mapvalue`) - } else { - p.P(s, ` = *mapvalue`) - } - } else { - p.P(`var mapvalue `, valuegoAliasTyp) - p.P(s, ` = mapvalue`) - } - p.Out() - p.P(`}`) } else if repeated { if gogoproto.IsStdTime(field) { if nullable { @@ -984,74 +936,38 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip p.P(`m.`, fieldname, ` = &v`) } case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed32("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed32("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } + if oneof { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed32("m."+fieldname, typ) } else { - if oneof { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed32("m."+fieldname, "int32") - } else { - p.P(`var v int32`) - p.unsafeFixed32("v", "int32") - p.P(`m.`, fieldname, ` = &v`) - } + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &v`) } case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - if !p.unsafe || gogoproto.IsCastType(field) { - if oneof { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.P(`m.`, fieldname, ` = 0`) - p.decodeFixed64("m."+fieldname, typ) - } else { - p.P(`var v `, typ) - p.decodeFixed64("v", typ) - p.P(`m.`, fieldname, ` = &v`) - } + if oneof { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed64("m."+fieldname, typ) } else { - if oneof { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) - } else if repeated { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) - } else if proto3 || !nullable { - p.unsafeFixed64("m."+fieldname, "int64") - } else { - p.P(`var v int64`) - p.unsafeFixed64("v", "int64") - p.P(`m.`, fieldname, ` = &v`) - } + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &v`) } case descriptor.FieldDescriptorProto_TYPE_SINT32: p.P(`var v `, typ) @@ -1090,14 +1006,11 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) { p.PluginImports = generator.NewPluginImports(p.Generator) p.atleastOne = false p.localName = generator.FileName(file) - if p.unsafe { - p.localName += "Unsafe" - } p.ioPkg = p.NewImport("io") p.mathPkg = p.NewImport("math") - p.unsafePkg = p.NewImport("unsafe") p.typesPkg = p.NewImport("github.com/gogo/protobuf/types") + p.binaryPkg = p.NewImport("encoding/binary") fmtPkg := p.NewImport("fmt") protoPkg := p.NewImport("github.com/gogo/protobuf/proto") if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { @@ -1106,21 +1019,9 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) { for _, message := range file.Messages() { ccTypeName := generator.CamelCaseSlice(message.TypeName()) - if p.unsafe { - if !gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) - } - } - if !p.unsafe { - if !gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - continue - } - if gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { - panic(fmt.Sprintf("unsafe_unmarshaler and unmarshaler enabled for %v", ccTypeName)) - } + if !gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) && + !gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue } if message.DescriptorProto.GetOptions().GetMapEntry() { continue @@ -1198,6 +1099,22 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) { p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) p.Out() p.P(`}`) + + var fixedTypeSizeBytes int + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: + fixedTypeSizeBytes = 8 + case descriptor.FieldDescriptorProto_TYPE_FLOAT, descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: + fixedTypeSizeBytes = 4 + } + if fixedTypeSizeBytes != 0 { + p.P(`if len(m.`, fieldname, `) == 0 {`) + p.In() + p.P(`m.`, fieldname, ` = make([]`, p.noStarOrSliceType(message, field), `, 0, packedLen/`, fixedTypeSizeBytes, `)`) + p.Out() + p.P(`}`) + } + p.P(`for iNdEx < postIndex {`) p.In() p.field(file, message, field, fieldname, false) @@ -1445,5 +1362,4 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) { func init() { generator.RegisterPlugin(NewUnmarshal()) - generator.RegisterPlugin(NewUnsafeUnmarshal()) } diff --git a/deps/github.com/gogo/protobuf/proto/Makefile b/deps/github.com/gogo/protobuf/proto/Makefile index 41c717573..00d65f327 100644 --- a/deps/github.com/gogo/protobuf/proto/Makefile +++ b/deps/github.com/gogo/protobuf/proto/Makefile @@ -38,6 +38,6 @@ test: install generate-test-pbs generate-test-pbs: make install - make -C testdata - protoc-min-version --version="3.0.0" --proto_path=.:../../../../:../protobuf --gogo_out=Mtestdata/test.proto=github.com/gogo/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. proto3_proto/proto3.proto + make -C test_proto + make -C proto3_proto make diff --git a/deps/github.com/gogo/protobuf/proto/all_test.go b/deps/github.com/gogo/protobuf/proto/all_test.go new file mode 100644 index 000000000..bdb08f20e --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/all_test.go @@ -0,0 +1,2421 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "math" + "math/rand" + "reflect" + "runtime/debug" + "strings" + "sync" + "testing" + "time" + + . "github.com/gogo/protobuf/proto" + . "github.com/gogo/protobuf/proto/test_proto" +) + +var globalO *Buffer + +func old() *Buffer { + if globalO == nil { + globalO = NewBuffer(nil) + } + globalO.Reset() + return globalO +} + +func equalbytes(b1, b2 []byte, t *testing.T) { + if len(b1) != len(b2) { + t.Errorf("wrong lengths: 2*%d != %d", len(b1), len(b2)) + return + } + for i := 0; i < len(b1); i++ { + if b1[i] != b2[i] { + t.Errorf("bad byte[%d]:%x %x: %s %s", i, b1[i], b2[i], b1, b2) + } + } +} + +func initGoTestField() *GoTestField { + f := new(GoTestField) + f.Label = String("label") + f.Type = String("type") + return f +} + +// These are all structurally equivalent but the tag numbers differ. +// (It's remarkable that required, optional, and repeated all have +// 8 letters.) +func initGoTest_RequiredGroup() *GoTest_RequiredGroup { + return &GoTest_RequiredGroup{ + RequiredField: String("required"), + } +} + +func initGoTest_OptionalGroup() *GoTest_OptionalGroup { + return &GoTest_OptionalGroup{ + RequiredField: String("optional"), + } +} + +func initGoTest_RepeatedGroup() *GoTest_RepeatedGroup { + return &GoTest_RepeatedGroup{ + RequiredField: String("repeated"), + } +} + +func initGoTest(setdefaults bool) *GoTest { + pb := new(GoTest) + if setdefaults { + pb.F_BoolDefaulted = Bool(Default_GoTest_F_BoolDefaulted) + pb.F_Int32Defaulted = Int32(Default_GoTest_F_Int32Defaulted) + pb.F_Int64Defaulted = Int64(Default_GoTest_F_Int64Defaulted) + pb.F_Fixed32Defaulted = Uint32(Default_GoTest_F_Fixed32Defaulted) + pb.F_Fixed64Defaulted = Uint64(Default_GoTest_F_Fixed64Defaulted) + pb.F_Uint32Defaulted = Uint32(Default_GoTest_F_Uint32Defaulted) + pb.F_Uint64Defaulted = Uint64(Default_GoTest_F_Uint64Defaulted) + pb.F_FloatDefaulted = Float32(Default_GoTest_F_FloatDefaulted) + pb.F_DoubleDefaulted = Float64(Default_GoTest_F_DoubleDefaulted) + pb.F_StringDefaulted = String(Default_GoTest_F_StringDefaulted) + pb.F_BytesDefaulted = Default_GoTest_F_BytesDefaulted + pb.F_Sint32Defaulted = Int32(Default_GoTest_F_Sint32Defaulted) + pb.F_Sint64Defaulted = Int64(Default_GoTest_F_Sint64Defaulted) + pb.F_Sfixed32Defaulted = Int32(Default_GoTest_F_Sfixed32Defaulted) + pb.F_Sfixed64Defaulted = Int64(Default_GoTest_F_Sfixed64Defaulted) + } + + pb.Kind = GoTest_TIME.Enum() + pb.RequiredField = initGoTestField() + pb.F_BoolRequired = Bool(true) + pb.F_Int32Required = Int32(3) + pb.F_Int64Required = Int64(6) + pb.F_Fixed32Required = Uint32(32) + pb.F_Fixed64Required = Uint64(64) + pb.F_Uint32Required = Uint32(3232) + pb.F_Uint64Required = Uint64(6464) + pb.F_FloatRequired = Float32(3232) + pb.F_DoubleRequired = Float64(6464) + pb.F_StringRequired = String("string") + pb.F_BytesRequired = []byte("bytes") + pb.F_Sint32Required = Int32(-32) + pb.F_Sint64Required = Int64(-64) + pb.F_Sfixed32Required = Int32(-32) + pb.F_Sfixed64Required = Int64(-64) + pb.Requiredgroup = initGoTest_RequiredGroup() + + return pb +} + +func hex(c uint8) uint8 { + if '0' <= c && c <= '9' { + return c - '0' + } + if 'a' <= c && c <= 'f' { + return 10 + c - 'a' + } + if 'A' <= c && c <= 'F' { + return 10 + c - 'A' + } + return 0 +} + +func equal(b []byte, s string, t *testing.T) bool { + if 2*len(b) != len(s) { + // fail(fmt.Sprintf("wrong lengths: 2*%d != %d", len(b), len(s)), b, s, t) + fmt.Printf("wrong lengths: 2*%d != %d\n", len(b), len(s)) + return false + } + for i, j := 0, 0; i < len(b); i, j = i+1, j+2 { + x := hex(s[j])*16 + hex(s[j+1]) + if b[i] != x { + // fail(fmt.Sprintf("bad byte[%d]:%x %x", i, b[i], x), b, s, t) + fmt.Printf("bad byte[%d]:%x %x", i, b[i], x) + return false + } + } + return true +} + +func overify(t *testing.T, pb *GoTest, expected string) { + o := old() + err := o.Marshal(pb) + if err != nil { + fmt.Printf("overify marshal-1 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 1", o.Bytes()) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = o.Unmarshal(pbd) + if err != nil { + t.Fatalf("overify unmarshal err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + o.Reset() + err = o.Marshal(pbd) + if err != nil { + t.Errorf("overify marshal-2 err = %v", err) + o.DebugPrint("", o.Bytes()) + t.Fatalf("string = %s", expected) + } + if !equal(o.Bytes(), expected, t) { + o.DebugPrint("overify neq 2", o.Bytes()) + t.Fatalf("string = %s", expected) + } +} + +// Simple tests for numeric encode/decode primitives (varint, etc.) +func TestNumericPrimitives(t *testing.T) { + for i := uint64(0); i < 1e6; i += 111 { + o := old() + if o.EncodeVarint(i) != nil { + t.Error("EncodeVarint") + break + } + x, e := o.DecodeVarint() + if e != nil { + t.Fatal("DecodeVarint") + } + if x != i { + t.Fatal("varint decode fail:", i, x) + } + + o = old() + if o.EncodeFixed32(i) != nil { + t.Fatal("encFixed32") + } + x, e = o.DecodeFixed32() + if e != nil { + t.Fatal("decFixed32") + } + if x != i { + t.Fatal("fixed32 decode fail:", i, x) + } + + o = old() + if o.EncodeFixed64(i*1234567) != nil { + t.Error("encFixed64") + break + } + x, e = o.DecodeFixed64() + if e != nil { + t.Error("decFixed64") + break + } + if x != i*1234567 { + t.Error("fixed64 decode fail:", i*1234567, x) + break + } + + o = old() + i32 := int32(i - 12345) + if o.EncodeZigzag32(uint64(i32)) != nil { + t.Fatal("EncodeZigzag32") + } + x, e = o.DecodeZigzag32() + if e != nil { + t.Fatal("DecodeZigzag32") + } + if x != uint64(uint32(i32)) { + t.Fatal("zigzag32 decode fail:", i32, x) + } + + o = old() + i64 := int64(i - 12345) + if o.EncodeZigzag64(uint64(i64)) != nil { + t.Fatal("EncodeZigzag64") + } + x, e = o.DecodeZigzag64() + if e != nil { + t.Fatal("DecodeZigzag64") + } + if x != uint64(i64) { + t.Fatal("zigzag64 decode fail:", i64, x) + } + } +} + +// fakeMarshaler is a simple struct implementing Marshaler and Message interfaces. +type fakeMarshaler struct { + b []byte + err error +} + +func (f *fakeMarshaler) Marshal() ([]byte, error) { return f.b, f.err } +func (f *fakeMarshaler) String() string { return fmt.Sprintf("Bytes: %v Error: %v", f.b, f.err) } +func (f *fakeMarshaler) ProtoMessage() {} +func (f *fakeMarshaler) Reset() {} + +type msgWithFakeMarshaler struct { + M *fakeMarshaler `protobuf:"bytes,1,opt,name=fake"` +} + +func (m *msgWithFakeMarshaler) String() string { return CompactTextString(m) } +func (m *msgWithFakeMarshaler) ProtoMessage() {} +func (m *msgWithFakeMarshaler) Reset() {} + +// Simple tests for proto messages that implement the Marshaler interface. +func TestMarshalerEncoding(t *testing.T) { + tests := []struct { + name string + m Message + want []byte + errType reflect.Type + }{ + { + name: "Marshaler that fails", + m: &fakeMarshaler{ + err: errors.New("some marshal err"), + b: []byte{5, 6, 7}, + }, + // Since the Marshal method returned bytes, they should be written to the + // buffer. (For efficiency, we assume that Marshal implementations are + // always correct w.r.t. RequiredNotSetError and output.) + want: []byte{5, 6, 7}, + errType: reflect.TypeOf(errors.New("some marshal err")), + }, + { + name: "Marshaler that fails with RequiredNotSetError", + m: &msgWithFakeMarshaler{ + M: &fakeMarshaler{ + err: &RequiredNotSetError{}, + b: []byte{5, 6, 7}, + }, + }, + // Since there's an error that can be continued after, + // the buffer should be written. + want: []byte{ + 10, 3, // for &msgWithFakeMarshaler + 5, 6, 7, // for &fakeMarshaler + }, + errType: reflect.TypeOf(&RequiredNotSetError{}), + }, + { + name: "Marshaler that succeeds", + m: &fakeMarshaler{ + b: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + want: []byte{0, 1, 2, 3, 4, 127, 255}, + }, + } + for _, test := range tests { + b := NewBuffer(nil) + err := b.Marshal(test.m) + if reflect.TypeOf(err) != test.errType { + t.Errorf("%s: got err %T(%v) wanted %T", test.name, err, err, test.errType) + } + if !reflect.DeepEqual(test.want, b.Bytes()) { + t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) + } + if size := Size(test.m); size != len(b.Bytes()) { + t.Errorf("%s: Size(_) = %v, but marshaled to %v bytes", test.name, size, len(b.Bytes())) + } + + m, mErr := Marshal(test.m) + if !bytes.Equal(b.Bytes(), m) { + t.Errorf("%s: Marshal returned %v, but (*Buffer).Marshal wrote %v", test.name, m, b.Bytes()) + } + if !reflect.DeepEqual(err, mErr) { + t.Errorf("%s: Marshal err = %q, but (*Buffer).Marshal returned %q", + test.name, fmt.Sprint(mErr), fmt.Sprint(err)) + } + } +} + +// Ensure that Buffer.Marshal uses O(N) memory for N messages +func TestBufferMarshalAllocs(t *testing.T) { + value := &OtherMessage{Key: Int64(1)} + msg := &MyMessage{Count: Int32(1), Others: []*OtherMessage{value}} + + reallocSize := func(t *testing.T, items int, prealloc int) (int64, int64) { + var b Buffer + b.SetBuf(make([]byte, 0, prealloc)) + + var allocSpace int64 + prevCap := cap(b.Bytes()) + for i := 0; i < items; i++ { + err := b.Marshal(msg) + if err != nil { + t.Errorf("Marshal err = %q", err) + break + } + if c := cap(b.Bytes()); prevCap != c { + allocSpace += int64(c) + prevCap = c + } + } + needSpace := int64(len(b.Bytes())) + return allocSpace, needSpace + } + + for _, prealloc := range []int{0, 100, 10000} { + for _, items := range []int{1, 2, 5, 10, 20, 50, 100, 200, 500, 1000} { + runtimeSpace, need := reallocSize(t, items, prealloc) + totalSpace := int64(prealloc) + runtimeSpace + + runtimeRatio := float64(runtimeSpace) / float64(need) + totalRatio := float64(totalSpace) / float64(need) + + if totalRatio < 1 || runtimeRatio > 4 { + t.Errorf("needed %dB, allocated %dB total (ratio %.1f), allocated %dB at runtime (ratio %.1f)", + need, totalSpace, totalRatio, runtimeSpace, runtimeRatio) + } + } + } +} + +// Simple tests for bytes +func TestBytesPrimitives(t *testing.T) { + o := old() + bytes := []byte{'n', 'o', 'w', ' ', 'i', 's', ' ', 't', 'h', 'e', ' ', 't', 'i', 'm', 'e'} + if o.EncodeRawBytes(bytes) != nil { + t.Error("EncodeRawBytes") + } + decb, e := o.DecodeRawBytes(false) + if e != nil { + t.Error("DecodeRawBytes") + } + equalbytes(bytes, decb, t) +} + +// Simple tests for strings +func TestStringPrimitives(t *testing.T) { + o := old() + s := "now is the time" + if o.EncodeStringBytes(s) != nil { + t.Error("enc_string") + } + decs, e := o.DecodeStringBytes() + if e != nil { + t.Error("dec_string") + } + if s != decs { + t.Error("string encode/decode fail:", s, decs) + } +} + +// Do we catch the "required bit not set" case? +func TestRequiredBit(t *testing.T) { + o := old() + pb := new(GoTest) + err := o.Marshal(pb) + if err == nil { + t.Error("did not catch missing required fields") + } else if !strings.Contains(err.Error(), "Kind") { + t.Error("wrong error type:", err) + } +} + +// Check that all fields are nil. +// Clearly silly, and a residue from a more interesting test with an earlier, +// different initialization property, but it once caught a compiler bug so +// it lives. +func checkInitialized(pb *GoTest, t *testing.T) { + if pb.F_BoolDefaulted != nil { + t.Error("New or Reset did not set boolean:", *pb.F_BoolDefaulted) + } + if pb.F_Int32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Int32Defaulted) + } + if pb.F_Int64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Int64Defaulted) + } + if pb.F_Fixed32Defaulted != nil { + t.Error("New or Reset did not set fixed32:", *pb.F_Fixed32Defaulted) + } + if pb.F_Fixed64Defaulted != nil { + t.Error("New or Reset did not set fixed64:", *pb.F_Fixed64Defaulted) + } + if pb.F_Uint32Defaulted != nil { + t.Error("New or Reset did not set uint32:", *pb.F_Uint32Defaulted) + } + if pb.F_Uint64Defaulted != nil { + t.Error("New or Reset did not set uint64:", *pb.F_Uint64Defaulted) + } + if pb.F_FloatDefaulted != nil { + t.Error("New or Reset did not set float:", *pb.F_FloatDefaulted) + } + if pb.F_DoubleDefaulted != nil { + t.Error("New or Reset did not set double:", *pb.F_DoubleDefaulted) + } + if pb.F_StringDefaulted != nil { + t.Error("New or Reset did not set string:", *pb.F_StringDefaulted) + } + if pb.F_BytesDefaulted != nil { + t.Error("New or Reset did not set bytes:", string(pb.F_BytesDefaulted)) + } + if pb.F_Sint32Defaulted != nil { + t.Error("New or Reset did not set int32:", *pb.F_Sint32Defaulted) + } + if pb.F_Sint64Defaulted != nil { + t.Error("New or Reset did not set int64:", *pb.F_Sint64Defaulted) + } +} + +// Does Reset() reset? +func TestReset(t *testing.T) { + pb := initGoTest(true) + // muck with some values + pb.F_BoolDefaulted = Bool(false) + pb.F_Int32Defaulted = Int32(237) + pb.F_Int64Defaulted = Int64(12346) + pb.F_Fixed32Defaulted = Uint32(32000) + pb.F_Fixed64Defaulted = Uint64(666) + pb.F_Uint32Defaulted = Uint32(323232) + pb.F_Uint64Defaulted = nil + pb.F_FloatDefaulted = nil + pb.F_DoubleDefaulted = Float64(0) + pb.F_StringDefaulted = String("gotcha") + pb.F_BytesDefaulted = []byte("asdfasdf") + pb.F_Sint32Defaulted = Int32(123) + pb.F_Sint64Defaulted = Int64(789) + pb.Reset() + checkInitialized(pb, t) +} + +// All required fields set, no defaults provided. +func TestEncodeDecode1(t *testing.T) { + pb := initGoTest(false) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 0x20 + "714000000000000000"+ // field 14, encoding 1, value 0x40 + "78a019"+ // field 15, encoding 0, value 0xca0 = 3232 + "8001c032"+ // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2, string "string" + "b304"+ // field 70, encoding 3, start group + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // field 70, encoding 4, end group + "aa0605"+"6279746573"+ // field 101, encoding 2, string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff") // field 105, encoding 1, -64 fixed64 +} + +// All required fields set, defaults provided. +func TestEncodeDecode2(t *testing.T) { + pb := initGoTest(true) + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// All default fields set to their default value by hand +func TestEncodeDecode3(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolDefaulted = Bool(true) + pb.F_Int32Defaulted = Int32(32) + pb.F_Int64Defaulted = Int64(64) + pb.F_Fixed32Defaulted = Uint32(320) + pb.F_Fixed64Defaulted = Uint64(640) + pb.F_Uint32Defaulted = Uint32(3200) + pb.F_Uint64Defaulted = Uint64(6400) + pb.F_FloatDefaulted = Float32(314159) + pb.F_DoubleDefaulted = Float64(271828) + pb.F_StringDefaulted = String("hello, \"world!\"\n") + pb.F_BytesDefaulted = []byte("Bignose") + pb.F_Sint32Defaulted = Int32(-32) + pb.F_Sint64Defaulted = Int64(-64) + pb.F_Sfixed32Defaulted = Int32(-32) + pb.F_Sfixed64Defaulted = Int64(-64) + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// All required fields set, defaults provided, all non-defaulted optional fields have values. +func TestEncodeDecode4(t *testing.T) { + pb := initGoTest(true) + pb.Table = String("hello") + pb.Param = Int32(7) + pb.OptionalField = initGoTestField() + pb.F_BoolOptional = Bool(true) + pb.F_Int32Optional = Int32(32) + pb.F_Int64Optional = Int64(64) + pb.F_Fixed32Optional = Uint32(3232) + pb.F_Fixed64Optional = Uint64(6464) + pb.F_Uint32Optional = Uint32(323232) + pb.F_Uint64Optional = Uint64(646464) + pb.F_FloatOptional = Float32(32.) + pb.F_DoubleOptional = Float64(64.) + pb.F_StringOptional = String("hello") + pb.F_BytesOptional = []byte("Bignose") + pb.F_Sint32Optional = Int32(-32) + pb.F_Sint64Optional = Int64(-64) + pb.F_Sfixed32Optional = Int32(-32) + pb.F_Sfixed64Optional = Int64(-64) + pb.Optionalgroup = initGoTest_OptionalGroup() + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "1205"+"68656c6c6f"+ // field 2, encoding 2, string "hello" + "1807"+ // field 3, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "320d"+"0a056c6162656c120474797065"+ // field 6, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "f00101"+ // field 30, encoding 0, value 1 + "f80120"+ // field 31, encoding 0, value 32 + "800240"+ // field 32, encoding 0, value 64 + "8d02a00c0000"+ // field 33, encoding 5, value 3232 + "91024019000000000000"+ // field 34, encoding 1, value 6464 + "9802a0dd13"+ // field 35, encoding 0, value 323232 + "a002c0ba27"+ // field 36, encoding 0, value 646464 + "ad0200000042"+ // field 37, encoding 5, value 32.0 + "b1020000000000005040"+ // field 38, encoding 1, value 64.0 + "ba0205"+"68656c6c6f"+ // field 39, encoding 2, string "hello" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "d305"+ // start group field 90 level 1 + "da0508"+"6f7074696f6e616c"+ // field 91, encoding 2, string "optional" + "d405"+ // end group field 90 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" + "f0123f"+ // field 302, encoding 0, value 63 + "f8127f"+ // field 303, encoding 0, value 127 + "8513e0ffffff"+ // field 304, encoding 5, -32 fixed32 + "8913c0ffffffffffffff"+ // field 305, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestEncodeDecode5(t *testing.T) { + pb := initGoTest(true) + pb.RepeatedField = []*GoTestField{initGoTestField(), initGoTestField()} + pb.F_BoolRepeated = []bool{false, true} + pb.F_Int32Repeated = []int32{32, 33} + pb.F_Int64Repeated = []int64{64, 65} + pb.F_Fixed32Repeated = []uint32{3232, 3333} + pb.F_Fixed64Repeated = []uint64{6464, 6565} + pb.F_Uint32Repeated = []uint32{323232, 333333} + pb.F_Uint64Repeated = []uint64{646464, 656565} + pb.F_FloatRepeated = []float32{32., 33.} + pb.F_DoubleRepeated = []float64{64., 65.} + pb.F_StringRepeated = []string{"hello", "sailor"} + pb.F_BytesRepeated = [][]byte{[]byte("big"), []byte("nose")} + pb.F_Sint32Repeated = []int32{32, -32} + pb.F_Sint64Repeated = []int64{64, -64} + pb.F_Sfixed32Repeated = []int32{32, -32} + pb.F_Sfixed64Repeated = []int64{64, -64} + pb.Repeatedgroup = []*GoTest_RepeatedGroup{initGoTest_RepeatedGroup(), initGoTest_RepeatedGroup()} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "2a0d"+"0a056c6162656c120474797065"+ // field 5, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "a00100"+ // field 20, encoding 0, value 0 + "a00101"+ // field 20, encoding 0, value 1 + "a80120"+ // field 21, encoding 0, value 32 + "a80121"+ // field 21, encoding 0, value 33 + "b00140"+ // field 22, encoding 0, value 64 + "b00141"+ // field 22, encoding 0, value 65 + "bd01a00c0000"+ // field 23, encoding 5, value 3232 + "bd01050d0000"+ // field 23, encoding 5, value 3333 + "c1014019000000000000"+ // field 24, encoding 1, value 6464 + "c101a519000000000000"+ // field 24, encoding 1, value 6565 + "c801a0dd13"+ // field 25, encoding 0, value 323232 + "c80195ac14"+ // field 25, encoding 0, value 333333 + "d001c0ba27"+ // field 26, encoding 0, value 646464 + "d001b58928"+ // field 26, encoding 0, value 656565 + "dd0100000042"+ // field 27, encoding 5, value 32.0 + "dd0100000442"+ // field 27, encoding 5, value 33.0 + "e1010000000000005040"+ // field 28, encoding 1, value 64.0 + "e1010000000000405040"+ // field 28, encoding 1, value 65.0 + "ea0105"+"68656c6c6f"+ // field 29, encoding 2, string "hello" + "ea0106"+"7361696c6f72"+ // field 29, encoding 2, string "sailor" + "c00201"+ // field 40, encoding 0, value 1 + "c80220"+ // field 41, encoding 0, value 32 + "d00240"+ // field 42, encoding 0, value 64 + "dd0240010000"+ // field 43, encoding 5, value 320 + "e1028002000000000000"+ // field 44, encoding 1, value 640 + "e8028019"+ // field 45, encoding 0, value 3200 + "f0028032"+ // field 46, encoding 0, value 6400 + "fd02e0659948"+ // field 47, encoding 5, value 314159.0 + "81030000000050971041"+ // field 48, encoding 1, value 271828.0 + "8a0310"+"68656c6c6f2c2022776f726c6421220a"+ // field 49, encoding 2 string "hello, \"world!\"\n" + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "8305"+ // start group field 80 level 1 + "8a0508"+"7265706561746564"+ // field 81, encoding 2, string "repeated" + "8405"+ // end group field 80 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "ca0c03"+"626967"+ // field 201, encoding 2, string "big" + "ca0c04"+"6e6f7365"+ // field 201, encoding 2, string "nose" + "d00c40"+ // field 202, encoding 0, value 32 + "d00c3f"+ // field 202, encoding 0, value -32 + "d80c8001"+ // field 203, encoding 0, value 64 + "d80c7f"+ // field 203, encoding 0, value -64 + "e50c20000000"+ // field 204, encoding 5, 32 fixed32 + "e50ce0ffffff"+ // field 204, encoding 5, -32 fixed32 + "e90c4000000000000000"+ // field 205, encoding 1, 64 fixed64 + "e90cc0ffffffffffffff"+ // field 205, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// All required fields set, all packed repeated fields given two values. +func TestEncodeDecode6(t *testing.T) { + pb := initGoTest(false) + pb.F_BoolRepeatedPacked = []bool{false, true} + pb.F_Int32RepeatedPacked = []int32{32, 33} + pb.F_Int64RepeatedPacked = []int64{64, 65} + pb.F_Fixed32RepeatedPacked = []uint32{3232, 3333} + pb.F_Fixed64RepeatedPacked = []uint64{6464, 6565} + pb.F_Uint32RepeatedPacked = []uint32{323232, 333333} + pb.F_Uint64RepeatedPacked = []uint64{646464, 656565} + pb.F_FloatRepeatedPacked = []float32{32., 33.} + pb.F_DoubleRepeatedPacked = []float64{64., 65.} + pb.F_Sint32RepeatedPacked = []int32{32, -32} + pb.F_Sint64RepeatedPacked = []int64{64, -64} + pb.F_Sfixed32RepeatedPacked = []int32{32, -32} + pb.F_Sfixed64RepeatedPacked = []int64{64, -64} + + overify(t, pb, + "0807"+ // field 1, encoding 0, value 7 + "220d"+"0a056c6162656c120474797065"+ // field 4, encoding 2 (GoTestField) + "5001"+ // field 10, encoding 0, value 1 + "5803"+ // field 11, encoding 0, value 3 + "6006"+ // field 12, encoding 0, value 6 + "6d20000000"+ // field 13, encoding 5, value 32 + "714000000000000000"+ // field 14, encoding 1, value 64 + "78a019"+ // field 15, encoding 0, value 3232 + "8001c032"+ // field 16, encoding 0, value 6464 + "8d0100004a45"+ // field 17, encoding 5, value 3232.0 + "9101000000000040b940"+ // field 18, encoding 1, value 6464.0 + "9a0106"+"737472696e67"+ // field 19, encoding 2 string "string" + "9203020001"+ // field 50, encoding 2, 2 bytes, value 0, value 1 + "9a03022021"+ // field 51, encoding 2, 2 bytes, value 32, value 33 + "a203024041"+ // field 52, encoding 2, 2 bytes, value 64, value 65 + "aa0308"+ // field 53, encoding 2, 8 bytes + "a00c0000050d0000"+ // value 3232, value 3333 + "b20310"+ // field 54, encoding 2, 16 bytes + "4019000000000000a519000000000000"+ // value 6464, value 6565 + "ba0306"+ // field 55, encoding 2, 6 bytes + "a0dd1395ac14"+ // value 323232, value 333333 + "c20306"+ // field 56, encoding 2, 6 bytes + "c0ba27b58928"+ // value 646464, value 656565 + "ca0308"+ // field 57, encoding 2, 8 bytes + "0000004200000442"+ // value 32.0, value 33.0 + "d20310"+ // field 58, encoding 2, 16 bytes + "00000000000050400000000000405040"+ // value 64.0, value 65.0 + "b304"+ // start group field 70 level 1 + "ba0408"+"7265717569726564"+ // field 71, encoding 2, string "required" + "b404"+ // end group field 70 level 1 + "aa0605"+"6279746573"+ // field 101, encoding 2 string "bytes" + "b0063f"+ // field 102, encoding 0, 0x3f zigzag32 + "b8067f"+ // field 103, encoding 0, 0x7f zigzag64 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "b21f02"+ // field 502, encoding 2, 2 bytes + "403f"+ // value 32, value -32 + "ba1f03"+ // field 503, encoding 2, 3 bytes + "80017f"+ // value 64, value -64 + "c21f08"+ // field 504, encoding 2, 8 bytes + "20000000e0ffffff"+ // value 32, value -32 + "ca1f10"+ // field 505, encoding 2, 16 bytes + "4000000000000000c0ffffffffffffff") // value 64, value -64 + +} + +// Test that we can encode empty bytes fields. +func TestEncodeDecodeBytes1(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRequired = []byte{} + pb.F_BytesRepeated = [][]byte{{}} + pb.F_BytesOptional = []byte{} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if pbd.F_BytesRequired == nil || len(pbd.F_BytesRequired) != 0 { + t.Error("required empty bytes field is incorrect") + } + if pbd.F_BytesRepeated == nil || len(pbd.F_BytesRepeated) == 1 && pbd.F_BytesRepeated[0] == nil { + t.Error("repeated empty bytes field is incorrect") + } + if pbd.F_BytesOptional == nil || len(pbd.F_BytesOptional) != 0 { + t.Error("optional empty bytes field is incorrect") + } +} + +// Test that we encode nil-valued fields of a repeated bytes field correctly. +// Since entries in a repeated field cannot be nil, nil must mean empty value. +func TestEncodeDecodeBytes2(t *testing.T) { + pb := initGoTest(false) + + // Create our bytes + pb.F_BytesRepeated = [][]byte{nil} + + d, err := Marshal(pb) + if err != nil { + t.Error(err) + } + + pbd := new(GoTest) + if err := Unmarshal(d, pbd); err != nil { + t.Error(err) + } + + if len(pbd.F_BytesRepeated) != 1 || pbd.F_BytesRepeated[0] == nil { + t.Error("Unexpected value for repeated bytes field") + } +} + +// All required fields set, defaults provided, all repeated fields given two values. +func TestSkippingUnrecognizedFields(t *testing.T) { + o := old() + pb := initGoTestField() + + // Marshal it normally. + o.Marshal(pb) + + // Now new a GoSkipTest record. + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + // Marshal it into same buffer. + o.Marshal(skip) + + pbd := new(GoTestField) + o.Unmarshal(pbd) + + // The __unrecognized field should be a marshaling of GoSkipTest + skipd := new(GoSkipTest) + + o.SetBuf(pbd.XXX_unrecognized) + o.Unmarshal(skipd) + + if *skipd.SkipInt32 != *skip.SkipInt32 { + t.Error("skip int32", skipd.SkipInt32) + } + if *skipd.SkipFixed32 != *skip.SkipFixed32 { + t.Error("skip fixed32", skipd.SkipFixed32) + } + if *skipd.SkipFixed64 != *skip.SkipFixed64 { + t.Error("skip fixed64", skipd.SkipFixed64) + } + if *skipd.SkipString != *skip.SkipString { + t.Error("skip string", *skipd.SkipString) + } + if *skipd.Skipgroup.GroupInt32 != *skip.Skipgroup.GroupInt32 { + t.Error("skip group int32", skipd.Skipgroup.GroupInt32) + } + if *skipd.Skipgroup.GroupString != *skip.Skipgroup.GroupString { + t.Error("skip group string", *skipd.Skipgroup.GroupString) + } +} + +// Check that unrecognized fields of a submessage are preserved. +func TestSubmessageUnrecognizedFields(t *testing.T) { + nm := &NewMessage{ + Nested: &NewMessage_Nested{ + Name: String("Nigel"), + FoodGroup: String("carbs"), + }, + } + b, err := Marshal(nm) + if err != nil { + t.Fatalf("Marshal of NewMessage: %v", err) + } + + // Unmarshal into an OldMessage. + om := new(OldMessage) + if err = Unmarshal(b, om); err != nil { + t.Fatalf("Unmarshal to OldMessage: %v", err) + } + exp := &OldMessage{ + Nested: &OldMessage_Nested{ + Name: String("Nigel"), + // normal protocol buffer users should not do this + XXX_unrecognized: []byte("\x12\x05carbs"), + }, + } + if !Equal(om, exp) { + t.Errorf("om = %v, want %v", om, exp) + } + + // Clone the OldMessage. + om = Clone(om).(*OldMessage) + if !Equal(om, exp) { + t.Errorf("Clone(om) = %v, want %v", om, exp) + } + + // Marshal the OldMessage, then unmarshal it into an empty NewMessage. + if b, err = Marshal(om); err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + t.Logf("Marshal(%v) -> %q", om, b) + nm2 := new(NewMessage) + if err := Unmarshal(b, nm2); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + if !Equal(nm, nm2) { + t.Errorf("NewMessage round-trip: %v => %v", nm, nm2) + } +} + +// Check that an int32 field can be upgraded to an int64 field. +func TestNegativeInt32(t *testing.T) { + om := &OldMessage{ + Num: Int32(-1), + } + b, err := Marshal(om) + if err != nil { + t.Fatalf("Marshal of OldMessage: %v", err) + } + + // Check the size. It should be 11 bytes; + // 1 for the field/wire type, and 10 for the negative number. + if len(b) != 11 { + t.Errorf("%v marshaled as %q, wanted 11 bytes", om, b) + } + + // Unmarshal into a NewMessage. + nm := new(NewMessage) + if err := Unmarshal(b, nm); err != nil { + t.Fatalf("Unmarshal to NewMessage: %v", err) + } + want := &NewMessage{ + Num: Int64(-1), + } + if !Equal(nm, want) { + t.Errorf("nm = %v, want %v", nm, want) + } +} + +// Check that we can grow an array (repeated field) to have many elements. +// This test doesn't depend only on our encoding; for variety, it makes sure +// we create, encode, and decode the correct contents explicitly. It's therefore +// a bit messier. +// This test also uses (and hence tests) the Marshal/Unmarshal functions +// instead of the methods. +func TestBigRepeated(t *testing.T) { + pb := initGoTest(true) + + // Create the arrays + const N = 50 // Internally the library starts much smaller. + pb.Repeatedgroup = make([]*GoTest_RepeatedGroup, N) + pb.F_Sint64Repeated = make([]int64, N) + pb.F_Sint32Repeated = make([]int32, N) + pb.F_BytesRepeated = make([][]byte, N) + pb.F_StringRepeated = make([]string, N) + pb.F_DoubleRepeated = make([]float64, N) + pb.F_FloatRepeated = make([]float32, N) + pb.F_Uint64Repeated = make([]uint64, N) + pb.F_Uint32Repeated = make([]uint32, N) + pb.F_Fixed64Repeated = make([]uint64, N) + pb.F_Fixed32Repeated = make([]uint32, N) + pb.F_Int64Repeated = make([]int64, N) + pb.F_Int32Repeated = make([]int32, N) + pb.F_BoolRepeated = make([]bool, N) + pb.RepeatedField = make([]*GoTestField, N) + + // Fill in the arrays with checkable values. + igtf := initGoTestField() + igtrg := initGoTest_RepeatedGroup() + for i := 0; i < N; i++ { + pb.Repeatedgroup[i] = igtrg + pb.F_Sint64Repeated[i] = int64(i) + pb.F_Sint32Repeated[i] = int32(i) + s := fmt.Sprint(i) + pb.F_BytesRepeated[i] = []byte(s) + pb.F_StringRepeated[i] = s + pb.F_DoubleRepeated[i] = float64(i) + pb.F_FloatRepeated[i] = float32(i) + pb.F_Uint64Repeated[i] = uint64(i) + pb.F_Uint32Repeated[i] = uint32(i) + pb.F_Fixed64Repeated[i] = uint64(i) + pb.F_Fixed32Repeated[i] = uint32(i) + pb.F_Int64Repeated[i] = int64(i) + pb.F_Int32Repeated[i] = int32(i) + pb.F_BoolRepeated[i] = i%2 == 0 + pb.RepeatedField[i] = igtf + } + + // Marshal. + buf, _ := Marshal(pb) + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + Unmarshal(buf, pbd) + + // Check the checkable values + for i := uint64(0); i < N; i++ { + if pbd.Repeatedgroup[i] == nil { // TODO: more checking? + t.Error("pbd.Repeatedgroup bad") + } + if x := uint64(pbd.F_Sint64Repeated[i]); x != i { + t.Error("pbd.F_Sint64Repeated bad", x, i) + } + if x := uint64(pbd.F_Sint32Repeated[i]); x != i { + t.Error("pbd.F_Sint32Repeated bad", x, i) + } + s := fmt.Sprint(i) + equalbytes(pbd.F_BytesRepeated[i], []byte(s), t) + if pbd.F_StringRepeated[i] != s { + t.Error("pbd.F_Sint32Repeated bad", pbd.F_StringRepeated[i], i) + } + if x := uint64(pbd.F_DoubleRepeated[i]); x != i { + t.Error("pbd.F_DoubleRepeated bad", x, i) + } + if x := uint64(pbd.F_FloatRepeated[i]); x != i { + t.Error("pbd.F_FloatRepeated bad", x, i) + } + if x := pbd.F_Uint64Repeated[i]; x != i { + t.Error("pbd.F_Uint64Repeated bad", x, i) + } + if x := uint64(pbd.F_Uint32Repeated[i]); x != i { + t.Error("pbd.F_Uint32Repeated bad", x, i) + } + if x := pbd.F_Fixed64Repeated[i]; x != i { + t.Error("pbd.F_Fixed64Repeated bad", x, i) + } + if x := uint64(pbd.F_Fixed32Repeated[i]); x != i { + t.Error("pbd.F_Fixed32Repeated bad", x, i) + } + if x := uint64(pbd.F_Int64Repeated[i]); x != i { + t.Error("pbd.F_Int64Repeated bad", x, i) + } + if x := uint64(pbd.F_Int32Repeated[i]); x != i { + t.Error("pbd.F_Int32Repeated bad", x, i) + } + if x := pbd.F_BoolRepeated[i]; x != (i%2 == 0) { + t.Error("pbd.F_BoolRepeated bad", x, i) + } + if pbd.RepeatedField[i] == nil { // TODO: more checking? + t.Error("pbd.RepeatedField bad") + } + } +} + +func TestBadWireTypeUnknown(t *testing.T) { + var b []byte + fmt.Sscanf("0a01780d00000000080b101612036161611521000000202c220362626225370000002203636363214200000000000000584d5a036464645900000000000056405d63000000", "%x", &b) + + m := new(MyMessage) + if err := Unmarshal(b, m); err != nil { + t.Errorf("unexpected Unmarshal error: %v", err) + } + + var unknown []byte + fmt.Sscanf("0a01780d0000000010161521000000202c2537000000214200000000000000584d5a036464645d63000000", "%x", &unknown) + if !bytes.Equal(m.XXX_unrecognized, unknown) { + t.Errorf("unknown bytes mismatch:\ngot %x\nwant %x", m.XXX_unrecognized, unknown) + } + DiscardUnknown(m) + + want := &MyMessage{Count: Int32(11), Name: String("aaa"), Pet: []string{"bbb", "ccc"}, Bigfloat: Float64(88)} + if !Equal(m, want) { + t.Errorf("message mismatch:\ngot %v\nwant %v", m, want) + } +} + +func encodeDecode(t *testing.T, in, out Message, msg string) { + buf, err := Marshal(in) + if err != nil { + t.Fatalf("failed marshaling %v: %v", msg, err) + } + if err := Unmarshal(buf, out); err != nil { + t.Fatalf("failed unmarshaling %v: %v", msg, err) + } +} + +func TestPackedNonPackedDecoderSwitching(t *testing.T) { + np, p := new(NonPackedTest), new(PackedTest) + + // non-packed -> packed + np.A = []int32{0, 1, 1, 2, 3, 5} + encodeDecode(t, np, p, "non-packed -> packed") + if !reflect.DeepEqual(np.A, p.B) { + t.Errorf("failed non-packed -> packed; np.A=%+v, p.B=%+v", np.A, p.B) + } + + // packed -> non-packed + np.Reset() + p.B = []int32{3, 1, 4, 1, 5, 9} + encodeDecode(t, p, np, "packed -> non-packed") + if !reflect.DeepEqual(p.B, np.A) { + t.Errorf("failed packed -> non-packed; p.B=%+v, np.A=%+v", p.B, np.A) + } +} + +func TestProto1RepeatedGroup(t *testing.T) { + pb := &MessageList{ + Message: []*MessageList_Message{ + { + Name: String("blah"), + Count: Int32(7), + }, + // NOTE: pb.Message[1] is a nil + nil, + }, + } + + o := old() + err := o.Marshal(pb) + if err == nil || !strings.Contains(err.Error(), "repeated field Message has nil") { + t.Fatalf("unexpected or no error when marshaling: %v", err) + } +} + +// Test that enums work. Checks for a bug introduced by making enums +// named types instead of int32: newInt32FromUint64 would crash with +// a type mismatch in reflect.PointTo. +func TestEnum(t *testing.T) { + pb := new(GoEnum) + pb.Foo = FOO_FOO1.Enum() + o := old() + if err := o.Marshal(pb); err != nil { + t.Fatal("error encoding enum:", err) + } + pb1 := new(GoEnum) + if err := o.Unmarshal(pb1); err != nil { + t.Fatal("error decoding enum:", err) + } + if *pb1.Foo != FOO_FOO1 { + t.Error("expected 7 but got ", *pb1.Foo) + } +} + +// Enum types have String methods. Check that enum fields can be printed. +// We don't care what the value actually is, just as long as it doesn't crash. +func TestPrintingNilEnumFields(t *testing.T) { + pb := new(GoEnum) + _ = fmt.Sprintf("%+v", pb) +} + +// Verify that absent required fields cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcement(t *testing.T) { + pb := new(GoTestField) + _, err := Marshal(pb) + if err == nil { + t.Error("marshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Label") { + t.Errorf("marshal: bad error type: %v", err) + } + + // A slightly sneaky, yet valid, proto. It encodes the same required field twice, + // so simply counting the required fields is insufficient. + // field 1, encoding 2, value "hi" + buf := []byte("\x0A\x02hi\x0A\x02hi") + err = Unmarshal(buf, pb) + if err == nil { + t.Error("unmarshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Type") && !strings.Contains(err.Error(), "{Unknown}") { + // TODO: remove unknown cases once we commit to the new unmarshaler. + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +// Verify that absent required fields in groups cause Marshal/Unmarshal to return errors. +func TestRequiredFieldEnforcementGroups(t *testing.T) { + pb := &GoTestRequiredGroupField{Group: &GoTestRequiredGroupField_Group{}} + if _, err := Marshal(pb); err == nil { + t.Error("marshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.Field") { + t.Errorf("marshal: bad error type: %v", err) + } + + buf := []byte{11, 12} + if err := Unmarshal(buf, pb); err == nil { + t.Error("unmarshal: expected error, got nil") + } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.Field") && !strings.Contains(err.Error(), "Group.{Unknown}") { + t.Errorf("unmarshal: bad error type: %v", err) + } +} + +func TestTypedNilMarshal(t *testing.T) { + // A typed nil should return ErrNil and not crash. + { + var m *GoEnum + if _, err := Marshal(m); err != ErrNil { + t.Errorf("Marshal(%#v): got %v, want ErrNil", m, err) + } + } + + { + m := &Communique{Union: &Communique_Msg{Msg: nil}} + if _, err := Marshal(m); err == nil || err == ErrNil { + t.Errorf("Marshal(%#v): got %v, want errOneofHasNil", m, err) + } + } +} + +// A type that implements the Marshaler interface, but is not nillable. +type nonNillableInt uint64 + +func (nni nonNillableInt) Marshal() ([]byte, error) { + return EncodeVarint(uint64(nni)), nil +} + +type NNIMessage struct { + nni nonNillableInt +} + +func (*NNIMessage) Reset() {} +func (*NNIMessage) String() string { return "" } +func (*NNIMessage) ProtoMessage() {} + +type NMMessage struct{} + +func (*NMMessage) Reset() {} +func (*NMMessage) String() string { return "" } +func (*NMMessage) ProtoMessage() {} + +// Verify a type that uses the Marshaler interface, but has a nil pointer. +func TestNilMarshaler(t *testing.T) { + // Try a struct with a Marshaler field that is nil. + // It should be directly marshable. + nmm := new(NMMessage) + if _, err := Marshal(nmm); err != nil { + t.Error("unexpected error marshaling nmm: ", err) + } + + // Try a struct with a Marshaler field that is not nillable. + nnim := new(NNIMessage) + nnim.nni = 7 + var _ Marshaler = nnim.nni // verify it is truly a Marshaler + if _, err := Marshal(nnim); err != nil { + t.Error("unexpected error marshaling nnim: ", err) + } +} + +func TestAllSetDefaults(t *testing.T) { + // Exercise SetDefaults with all scalar field types. + m := &Defaults{ + // NaN != NaN, so override that here. + F_Nan: Float32(1.7), + } + expected := &Defaults{ + F_Bool: Bool(true), + F_Int32: Int32(32), + F_Int64: Int64(64), + F_Fixed32: Uint32(320), + F_Fixed64: Uint64(640), + F_Uint32: Uint32(3200), + F_Uint64: Uint64(6400), + F_Float: Float32(314159), + F_Double: Float64(271828), + F_String: String(`hello, "world!"` + "\n"), + F_Bytes: []byte("Bignose"), + F_Sint32: Int32(-32), + F_Sint64: Int64(-64), + F_Enum: Defaults_GREEN.Enum(), + F_Pinf: Float32(float32(math.Inf(1))), + F_Ninf: Float32(float32(math.Inf(-1))), + F_Nan: Float32(1.7), + StrZero: String(""), + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("SetDefaults failed\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithSetField(t *testing.T) { + // Check that a set value is not overridden. + m := &Defaults{ + F_Int32: Int32(12), + } + SetDefaults(m) + if v := m.GetF_Int32(); v != 12 { + t.Errorf("m.FInt32 = %v, want 12", v) + } +} + +func TestSetDefaultsWithSubMessage(t *testing.T) { + m := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + }, + } + expected := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("gopher"), + Port: Int32(4000), + }, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultsWithRepeatedSubMessage(t *testing.T) { + m := &MyMessage{ + RepInner: []*InnerMessage{{}}, + } + expected := &MyMessage{ + RepInner: []*InnerMessage{{ + Port: Int32(4000), + }}, + } + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestSetDefaultWithRepeatedNonMessage(t *testing.T) { + m := &MyMessage{ + Pet: []string{"turtle", "wombat"}, + } + expected := Clone(m) + SetDefaults(m) + if !Equal(m, expected) { + t.Errorf("\n got %v\nwant %v", m, expected) + } +} + +func TestMaximumTagNumber(t *testing.T) { + m := &MaxTag{ + LastField: String("natural goat essence"), + } + buf, err := Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal failed: %v", err) + } + m2 := new(MaxTag) + if err := Unmarshal(buf, m2); err != nil { + t.Fatalf("proto.Unmarshal failed: %v", err) + } + if got, want := m2.GetLastField(), *m.LastField; got != want { + t.Errorf("got %q, want %q", got, want) + } +} + +func TestJSON(t *testing.T) { + m := &MyMessage{ + Count: Int32(4), + Pet: []string{"bunny", "kitty"}, + Inner: &InnerMessage{ + Host: String("cauchy"), + }, + Bikeshed: MyMessage_GREEN.Enum(), + } + const expected = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":1}` + + b, err := json.Marshal(m) + if err != nil { + t.Fatalf("json.Marshal failed: %v", err) + } + s := string(b) + if s != expected { + t.Errorf("got %s\nwant %s", s, expected) + } + + received := new(MyMessage) + if err := json.Unmarshal(b, received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } + + // Test unmarshalling of JSON with symbolic enum name. + const old = `{"count":4,"pet":["bunny","kitty"],"inner":{"host":"cauchy"},"bikeshed":"GREEN"}` + received.Reset() + if err := json.Unmarshal([]byte(old), received); err != nil { + t.Fatalf("json.Unmarshal failed: %v", err) + } + if !Equal(received, m) { + t.Fatalf("got %s, want %s", received, m) + } +} + +func TestBadWireType(t *testing.T) { + b := []byte{7<<3 | 6} // field 7, wire type 6 + pb := new(OtherMessage) + if err := Unmarshal(b, pb); err == nil { + t.Errorf("Unmarshal did not fail") + } else if !strings.Contains(err.Error(), "unknown wire type") { + t.Errorf("wrong error: %v", err) + } +} + +func TestBytesWithInvalidLength(t *testing.T) { + // If a byte sequence has an invalid (negative) length, Unmarshal should not panic. + b := []byte{2<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0} + Unmarshal(b, new(MyMessage)) +} + +func TestLengthOverflow(t *testing.T) { + // Overflowing a length should not panic. + b := []byte{2<<3 | WireBytes, 1, 1, 3<<3 | WireBytes, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01} + Unmarshal(b, new(MyMessage)) +} + +func TestVarintOverflow(t *testing.T) { + // Overflowing a 64-bit length should not be allowed. + b := []byte{1<<3 | WireVarint, 0x01, 3<<3 | WireBytes, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} + if err := Unmarshal(b, new(MyMessage)); err == nil { + t.Fatalf("Overflowed uint64 length without error") + } +} + +func TestBytesWithInvalidLengthInGroup(t *testing.T) { + // Overflowing a 64-bit length should not be allowed. + b := []byte{0xbb, 0x30, 0xb2, 0x30, 0xb0, 0xb2, 0x83, 0xf1, 0xb0, 0xb2, 0xef, 0xbf, 0xbd, 0x01} + if err := Unmarshal(b, new(MyMessage)); err == nil { + t.Fatalf("Overflowed uint64 length without error") + } +} + +func TestUnmarshalFuzz(t *testing.T) { + const N = 1000 + seed := time.Now().UnixNano() + t.Logf("RNG seed is %d", seed) + rng := rand.New(rand.NewSource(seed)) + buf := make([]byte, 20) + for i := 0; i < N; i++ { + for j := range buf { + buf[j] = byte(rng.Intn(256)) + } + fuzzUnmarshal(t, buf) + } +} + +func TestMergeMessages(t *testing.T) { + pb := &MessageList{Message: []*MessageList_Message{{Name: String("x"), Count: Int32(1)}}} + data, err := Marshal(pb) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + pb1 := new(MessageList) + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("first Unmarshal: %v", err) + } + if err := Unmarshal(data, pb1); err != nil { + t.Fatalf("second Unmarshal: %v", err) + } + if len(pb1.Message) != 1 { + t.Errorf("two Unmarshals produced %d Messages, want 1", len(pb1.Message)) + } + + pb2 := new(MessageList) + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("first UnmarshalMerge: %v", err) + } + if err := UnmarshalMerge(data, pb2); err != nil { + t.Fatalf("second UnmarshalMerge: %v", err) + } + if len(pb2.Message) != 2 { + t.Errorf("two UnmarshalMerges produced %d Messages, want 2", len(pb2.Message)) + } +} + +func TestExtensionMarshalOrder(t *testing.T) { + m := &MyMessage{Count: Int(123)} + if err := SetExtension(m, E_Ext_More, &Ext{Data: String("alpha")}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Text, String("aleph")); err != nil { + t.Fatalf("SetExtension: %v", err) + } + if err := SetExtension(m, E_Ext_Number, Int32(1)); err != nil { + t.Fatalf("SetExtension: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + var orig []byte + for i := 0; i < 100; i++ { + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if i == 0 { + orig = b + continue + } + if !bytes.Equal(b, orig) { + t.Errorf("Bytes differ on attempt #%d", i) + } + } +} + +func TestExtensionMapFieldMarshalDeterministic(t *testing.T) { + m := &MyMessage{Count: Int(123)} + if err := SetExtension(m, E_Ext_More, &Ext{MapField: map[int32]int32{1: 1, 2: 2, 3: 3, 4: 4}}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + marshal := func(m Message) []byte { + var b Buffer + b.SetDeterministic(true) + if err := b.Marshal(m); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + return b.Bytes() + } + + want := marshal(m) + for i := 0; i < 100; i++ { + if got := marshal(m); !bytes.Equal(got, want) { + t.Errorf("Marshal produced inconsistent output with determinism enabled (pass %d).\n got %v\nwant %v", i, got, want) + } + } +} + +// Many extensions, because small maps might not iterate differently on each iteration. +var exts = []*ExtensionDesc{ + E_X201, + E_X202, + E_X203, + E_X204, + E_X205, + E_X206, + E_X207, + E_X208, + E_X209, + E_X210, + E_X211, + E_X212, + E_X213, + E_X214, + E_X215, + E_X216, + E_X217, + E_X218, + E_X219, + E_X220, + E_X221, + E_X222, + E_X223, + E_X224, + E_X225, + E_X226, + E_X227, + E_X228, + E_X229, + E_X230, + E_X231, + E_X232, + E_X233, + E_X234, + E_X235, + E_X236, + E_X237, + E_X238, + E_X239, + E_X240, + E_X241, + E_X242, + E_X243, + E_X244, + E_X245, + E_X246, + E_X247, + E_X248, + E_X249, + E_X250, +} + +func TestMessageSetMarshalOrder(t *testing.T) { + m := &MyMessageSet{} + for _, x := range exts { + if err := SetExtension(m, x, &Empty{}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + } + + buf, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // Serialize m several times, and check we get the same bytes each time. + for i := 0; i < 10; i++ { + b1, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if !bytes.Equal(b1, buf) { + t.Errorf("Bytes differ on re-Marshal #%d", i) + } + + m2 := &MyMessageSet{} + if err = Unmarshal(buf, m2); err != nil { + t.Errorf("Unmarshal: %v", err) + } + b2, err := Marshal(m2) + if err != nil { + t.Errorf("re-Marshal: %v", err) + } + if !bytes.Equal(b2, buf) { + t.Errorf("Bytes differ on round-trip #%d", i) + } + } +} + +func TestUnmarshalMergesMessages(t *testing.T) { + // If a nested message occurs twice in the input, + // the fields should be merged when decoding. + a := &OtherMessage{ + Key: Int64(123), + Inner: &InnerMessage{ + Host: String("polhode"), + Port: Int32(1234), + }, + } + aData, err := Marshal(a) + if err != nil { + t.Fatalf("Marshal(a): %v", err) + } + b := &OtherMessage{ + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Connected: Bool(true), + }, + } + bData, err := Marshal(b) + if err != nil { + t.Fatalf("Marshal(b): %v", err) + } + want := &OtherMessage{ + Key: Int64(123), + Weight: Float32(1.2), + Inner: &InnerMessage{ + Host: String("herpolhode"), + Port: Int32(1234), + Connected: Bool(true), + }, + } + got := new(OtherMessage) + if err := Unmarshal(append(aData, bData...), got); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + if !Equal(got, want) { + t.Errorf("\n got %v\nwant %v", got, want) + } +} + +func TestUnmarshalMergesGroups(t *testing.T) { + // If a nested group occurs twice in the input, + // the fields should be merged when decoding. + a := &GroupNew{ + G: &GroupNew_G{ + X: Int32(7), + Y: Int32(8), + }, + } + aData, err := Marshal(a) + if err != nil { + t.Fatalf("Marshal(a): %v", err) + } + b := &GroupNew{ + G: &GroupNew_G{ + X: Int32(9), + }, + } + bData, err := Marshal(b) + if err != nil { + t.Fatalf("Marshal(b): %v", err) + } + want := &GroupNew{ + G: &GroupNew_G{ + X: Int32(9), + Y: Int32(8), + }, + } + got := new(GroupNew) + if err := Unmarshal(append(aData, bData...), got); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + if !Equal(got, want) { + t.Errorf("\n got %v\nwant %v", got, want) + } +} + +func TestEncodingSizes(t *testing.T) { + tests := []struct { + m Message + n int + }{ + {&Defaults{F_Int32: Int32(math.MaxInt32)}, 6}, + {&Defaults{F_Int32: Int32(math.MinInt32)}, 11}, + {&Defaults{F_Uint32: Uint32(uint32(math.MaxInt32) + 1)}, 6}, + {&Defaults{F_Uint32: Uint32(math.MaxUint32)}, 6}, + } + for _, test := range tests { + b, err := Marshal(test.m) + if err != nil { + t.Errorf("Marshal(%v): %v", test.m, err) + continue + } + if len(b) != test.n { + t.Errorf("Marshal(%v) yielded %d bytes, want %d bytes", test.m, len(b), test.n) + } + } +} + +func TestRequiredNotSetError(t *testing.T) { + pb := initGoTest(false) + pb.RequiredField.Label = nil + pb.F_Int32Required = nil + pb.F_Int64Required = nil + + expected := "0807" + // field 1, encoding 0, value 7 + "2206" + "120474797065" + // field 4, encoding 2 (GoTestField) + "5001" + // field 10, encoding 0, value 1 + "6d20000000" + // field 13, encoding 5, value 0x20 + "714000000000000000" + // field 14, encoding 1, value 0x40 + "78a019" + // field 15, encoding 0, value 0xca0 = 3232 + "8001c032" + // field 16, encoding 0, value 0x1940 = 6464 + "8d0100004a45" + // field 17, encoding 5, value 3232.0 + "9101000000000040b940" + // field 18, encoding 1, value 6464.0 + "9a0106" + "737472696e67" + // field 19, encoding 2, string "string" + "b304" + // field 70, encoding 3, start group + "ba0408" + "7265717569726564" + // field 71, encoding 2, string "required" + "b404" + // field 70, encoding 4, end group + "aa0605" + "6279746573" + // field 101, encoding 2, string "bytes" + "b0063f" + // field 102, encoding 0, 0x3f zigzag32 + "b8067f" + // field 103, encoding 0, 0x7f zigzag64 + "c506e0ffffff" + // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff" // field 105, encoding 1, -64 fixed64 + + o := old() + mbytes, err := Marshal(pb) + if _, ok := err.(*RequiredNotSetError); !ok { + fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", mbytes) + t.Fatalf("expected = %s", expected) + } + if !strings.Contains(err.Error(), "RequiredField.Label") { + t.Errorf("marshal-1 wrong err msg: %v", err) + } + if !equal(mbytes, expected, t) { + o.DebugPrint("neq 1", mbytes) + t.Fatalf("expected = %s", expected) + } + + // Now test Unmarshal by recreating the original buffer. + pbd := new(GoTest) + err = Unmarshal(mbytes, pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", mbytes) + t.Fatalf("string = %s", expected) + } + if !strings.Contains(err.Error(), "RequiredField.Label") && !strings.Contains(err.Error(), "RequiredField.{Unknown}") { + t.Errorf("unmarshal wrong err msg: %v", err) + } + mbytes, err = Marshal(pbd) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) + o.DebugPrint("", mbytes) + t.Fatalf("string = %s", expected) + } + if !strings.Contains(err.Error(), "RequiredField.Label") { + t.Errorf("marshal-2 wrong err msg: %v", err) + } + if !equal(mbytes, expected, t) { + o.DebugPrint("neq 2", mbytes) + t.Fatalf("string = %s", expected) + } +} + +func TestRequiredNotSetErrorWithBadWireTypes(t *testing.T) { + // Required field expects a varint, and properly found a varint. + if err := Unmarshal([]byte{0x08, 0x00}, new(GoEnum)); err != nil { + t.Errorf("Unmarshal = %v, want nil", err) + } + // Required field expects a varint, but found a fixed32 instead. + if err := Unmarshal([]byte{0x0d, 0x00, 0x00, 0x00, 0x00}, new(GoEnum)); err == nil { + t.Errorf("Unmarshal = nil, want RequiredNotSetError") + } + // Required field expects a varint, and found both a varint and fixed32 (ignored). + m := new(GoEnum) + if err := Unmarshal([]byte{0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00}, m); err != nil { + t.Errorf("Unmarshal = %v, want nil", err) + } + if !bytes.Equal(m.XXX_unrecognized, []byte{0x0d, 0x00, 0x00, 0x00, 0x00}) { + t.Errorf("expected fixed32 to appear as unknown bytes: %x", m.XXX_unrecognized) + } +} + +func fuzzUnmarshal(t *testing.T, data []byte) { + defer func() { + if e := recover(); e != nil { + t.Errorf("These bytes caused a panic: %+v", data) + t.Logf("Stack:\n%s", debug.Stack()) + t.FailNow() + } + }() + + pb := new(MyMessage) + Unmarshal(data, pb) +} + +func TestMapFieldMarshal(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + + // b should be the concatenation of these three byte sequences in some order. + parts := []string{ + "\n\a\b\x01\x12\x03Rob", + "\n\a\b\x04\x12\x03Ian", + "\n\b\b\x08\x12\x04Dave", + } + ok := false + for i := range parts { + for j := range parts { + if j == i { + continue + } + for k := range parts { + if k == i || k == j { + continue + } + try := parts[i] + parts[j] + parts[k] + if bytes.Equal(b, []byte(try)) { + ok = true + break + } + } + } + } + if !ok { + t.Fatalf("Incorrect Marshal output.\n got %q\nwant %q (or a permutation of that)", b, parts[0]+parts[1]+parts[2]) + } + t.Logf("FYI b: %q", b) + + (new(Buffer)).DebugPrint("Dump of b", b) +} + +func TestMapFieldDeterministicMarshal(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + } + + marshal := func(m Message) []byte { + var b Buffer + b.SetDeterministic(true) + if err := b.Marshal(m); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + return b.Bytes() + } + + want := marshal(m) + for i := 0; i < 10; i++ { + if got := marshal(m); !bytes.Equal(got, want) { + t.Errorf("Marshal produced inconsistent output with determinism enabled (pass %d).\n got %v\nwant %v", i, got, want) + } + } +} + +func TestMapFieldRoundTrips(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + MsgMapping: map[int64]*FloatingPoint{ + 0x7001: {F: Float64(2.0)}, + }, + ByteMapping: map[bool][]byte{ + false: []byte("that's not right!"), + true: []byte("aye, 'tis true!"), + }, + } + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("FYI b: %q", b) + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v", err) + } + if !Equal(m, m2) { + t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", m, m2) + } +} + +func TestMapFieldWithNil(t *testing.T) { + m1 := &MessageWithMap{ + MsgMapping: map[int64]*FloatingPoint{ + 1: nil, + }, + } + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.MsgMapping[1]; !ok { + t.Error("msg_mapping[1] not present") + } else if v != nil { + t.Errorf("msg_mapping[1] not nil: %v", v) + } +} + +func TestMapFieldWithNilBytes(t *testing.T) { + m1 := &MessageWithMap{ + ByteMapping: map[bool][]byte{ + false: {}, + true: nil, + }, + } + n := Size(m1) + b, err := Marshal(m1) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + if n != len(b) { + t.Errorf("Size(m1) = %d; want len(Marshal(m1)) = %d", n, len(b)) + } + m2 := new(MessageWithMap) + if err := Unmarshal(b, m2); err != nil { + t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) + } + if v, ok := m2.ByteMapping[false]; !ok { + t.Error("byte_mapping[false] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[false] not empty: %#v", v) + } + if v, ok := m2.ByteMapping[true]; !ok { + t.Error("byte_mapping[true] not present") + } else if len(v) != 0 { + t.Errorf("byte_mapping[true] not empty: %#v", v) + } +} + +func TestDecodeMapFieldMissingKey(t *testing.T) { + b := []byte{ + 0x0A, 0x03, // message, tag 1 (name_mapping), of length 3 bytes + // no key + 0x12, 0x01, 0x6D, // string value of length 1 byte, value "m" + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing key: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{0: "m"}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no key was not as expected. got: %v, want %v", got, want) + } +} + +func TestDecodeMapFieldMissingValue(t *testing.T) { + b := []byte{ + 0x0A, 0x02, // message, tag 1 (name_mapping), of length 2 bytes + 0x08, 0x01, // varint key, value 1 + // no value + } + got := &MessageWithMap{} + err := Unmarshal(b, got) + if err != nil { + t.Fatalf("failed to marshal map with missing value: %v", err) + } + want := &MessageWithMap{NameMapping: map[int32]string{1: ""}} + if !Equal(got, want) { + t.Errorf("Unmarshaled map with no value was not as expected. got: %v, want %v", got, want) + } +} + +func TestOneof(t *testing.T) { + m := &Communique{} + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal of empty message with oneof: %v", err) + } + if len(b) != 0 { + t.Errorf("Marshal of empty message yielded too many bytes: %v", b) + } + + m = &Communique{ + Union: &Communique_Name{Name: "Barry"}, + } + + // Round-trip. + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof: %v", err) + } + if len(b) != 7 { // name tag/wire (1) + name len (1) + name (5) + t.Errorf("Incorrect marshal of message with oneof: %v", b) + } + m.Reset() + if err = Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof: %v", err) + } + if x, ok := m.Union.(*Communique_Name); !ok || x.Name != "Barry" { + t.Errorf("After round trip, Union = %+v", m.Union) + } + if name := m.GetName(); name != "Barry" { + t.Errorf("After round trip, GetName = %q, want %q", name, "Barry") + } + + // Let's try with a message in the oneof. + m.Union = &Communique_Msg{Msg: &Strings{StringField: String("deep deep string")}} + b, err = Marshal(m) + if err != nil { + t.Fatalf("Marshal of message with oneof set to message: %v", err) + } + if len(b) != 20 { // msg tag/wire (1) + msg len (1) + msg (1 + 1 + 16) + t.Errorf("Incorrect marshal of message with oneof set to message: %v", b) + } + m.Reset() + if err := Unmarshal(b, m); err != nil { + t.Fatalf("Unmarshal of message with oneof set to message: %v", err) + } + ss, ok := m.Union.(*Communique_Msg) + if !ok || ss.Msg.GetStringField() != "deep deep string" { + t.Errorf("After round trip with oneof set to message, Union = %+v", m.Union) + } +} + +func TestOneofNilBytes(t *testing.T) { + // A oneof with nil byte slice should marshal to tag + 0 (size), with no error. + m := &Communique{Union: &Communique_Data{Data: nil}} + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal failed: %v", err) + } + want := []byte{ + 7<<3 | 2, // tag 7, wire type 2 + 0, // size + } + if !bytes.Equal(b, want) { + t.Errorf("Wrong result of Marshal: got %x, want %x", b, want) + } +} + +func TestInefficientPackedBool(t *testing.T) { + // https://github.com/golang/protobuf/issues/76 + inp := []byte{ + 0x12, 0x02, // 0x12 = 2<<3|2; 2 bytes + // Usually a bool should take a single byte, + // but it is permitted to be any varint. + 0xb9, 0x30, + } + if err := Unmarshal(inp, new(MoreRepeated)); err != nil { + t.Error(err) + } +} + +// Make sure pure-reflect-based implementation handles +// []int32-[]enum conversion correctly. +func TestRepeatedEnum2(t *testing.T) { + pb := &RepeatedEnum{ + Color: []RepeatedEnum_Color{RepeatedEnum_RED}, + } + b, err := Marshal(pb) + if err != nil { + t.Fatalf("Marshal failed: %v", err) + } + x := new(RepeatedEnum) + err = Unmarshal(b, x) + if err != nil { + t.Fatalf("Unmarshal failed: %v", err) + } + if !Equal(pb, x) { + t.Errorf("Incorrect result: want: %v got: %v", pb, x) + } +} + +// TestConcurrentMarshal makes sure that it is safe to marshal +// same message in multiple goroutines concurrently. +func TestConcurrentMarshal(t *testing.T) { + pb := initGoTest(true) + const N = 100 + b := make([][]byte, N) + + var wg sync.WaitGroup + for i := 0; i < N; i++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + var err error + b[i], err = Marshal(pb) + if err != nil { + t.Errorf("marshal error: %v", err) + } + }(i) + } + + wg.Wait() + for i := 1; i < N; i++ { + if !bytes.Equal(b[0], b[i]) { + t.Errorf("concurrent marshal result not same: b[0] = %v, b[%d] = %v", b[0], i, b[i]) + } + } +} + +func TestInvalidUTF8(t *testing.T) { + const wire = "\x12\x04\xde\xea\xca\xfe" + + var m GoTest + if err := Unmarshal([]byte(wire), &m); err == nil { + t.Errorf("Unmarshal error: got nil, want non-nil") + } + + m.Reset() + m.Table = String(wire[2:]) + if _, err := Marshal(&m); err == nil { + t.Errorf("Marshal error: got nil, want non-nil") + } +} + +func TestDeterministicErrorOnCustomMarshaler(t *testing.T) { + u := uint64(0) + in := &CustomDeterministicMarshaler{Field1: &u} + var b1 Buffer + b1.SetDeterministic(true) + err := b1.Marshal(in) + if !strings.Contains(err.Error(), "deterministic") { + t.Fatalf("Expected: %s but got %s", "proto: deterministic not supported by the Marshal method of test_proto.CustomDeterministicMarshaler", err.Error()) + } +} + +// Benchmarks + +func testMsg() *GoTest { + pb := initGoTest(true) + const N = 1000 // Internally the library starts much smaller. + pb.F_Int32Repeated = make([]int32, N) + pb.F_DoubleRepeated = make([]float64, N) + for i := 0; i < N; i++ { + pb.F_Int32Repeated[i] = int32(i) + pb.F_DoubleRepeated[i] = float64(i) + } + return pb +} + +func bytesMsg() *GoTest { + pb := initGoTest(true) + buf := make([]byte, 4000) + for i := range buf { + buf[i] = byte(i) + } + pb.F_BytesDefaulted = buf + return pb +} + +func benchmarkMarshal(b *testing.B, pb Message, marshal func(Message) ([]byte, error)) { + d, _ := marshal(pb) + b.SetBytes(int64(len(d))) + b.ResetTimer() + for i := 0; i < b.N; i++ { + marshal(pb) + } +} + +func benchmarkBufferMarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + p.Reset() + err := p.Marshal(pb0) + return p.Bytes(), err + }) +} + +func benchmarkSize(b *testing.B, pb Message) { + benchmarkMarshal(b, pb, func(pb0 Message) ([]byte, error) { + Size(pb) + return nil, nil + }) +} + +func newOf(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + return reflect.New(in.Type().Elem()).Interface().(Message) +} + +func benchmarkUnmarshal(b *testing.B, pb Message, unmarshal func([]byte, Message) error) { + d, _ := Marshal(pb) + b.SetBytes(int64(len(d))) + pbd := newOf(pb) + + b.ResetTimer() + for i := 0; i < b.N; i++ { + unmarshal(d, pbd) + } +} + +func benchmarkBufferUnmarshal(b *testing.B, pb Message) { + p := NewBuffer(nil) + benchmarkUnmarshal(b, pb, func(d []byte, pb0 Message) error { + p.SetBuf(d) + return p.Unmarshal(pb0) + }) +} + +// Benchmark{Marshal,BufferMarshal,Size,Unmarshal,BufferUnmarshal}{,Bytes} + +func BenchmarkMarshal(b *testing.B) { + benchmarkMarshal(b, testMsg(), Marshal) +} + +func BenchmarkBufferMarshal(b *testing.B) { + benchmarkBufferMarshal(b, testMsg()) +} + +func BenchmarkSize(b *testing.B) { + benchmarkSize(b, testMsg()) +} + +func BenchmarkUnmarshal(b *testing.B) { + benchmarkUnmarshal(b, testMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshal(b *testing.B) { + benchmarkBufferUnmarshal(b, testMsg()) +} + +func BenchmarkMarshalBytes(b *testing.B) { + benchmarkMarshal(b, bytesMsg(), Marshal) +} + +func BenchmarkBufferMarshalBytes(b *testing.B) { + benchmarkBufferMarshal(b, bytesMsg()) +} + +func BenchmarkSizeBytes(b *testing.B) { + benchmarkSize(b, bytesMsg()) +} + +func BenchmarkUnmarshalBytes(b *testing.B) { + benchmarkUnmarshal(b, bytesMsg(), Unmarshal) +} + +func BenchmarkBufferUnmarshalBytes(b *testing.B) { + benchmarkBufferUnmarshal(b, bytesMsg()) +} + +func BenchmarkUnmarshalUnrecognizedFields(b *testing.B) { + b.StopTimer() + pb := initGoTestField() + skip := &GoSkipTest{ + SkipInt32: Int32(32), + SkipFixed32: Uint32(3232), + SkipFixed64: Uint64(6464), + SkipString: String("skipper"), + Skipgroup: &GoSkipTest_SkipGroup{ + GroupInt32: Int32(75), + GroupString: String("wxyz"), + }, + } + + pbd := new(GoTestField) + p := NewBuffer(nil) + p.Marshal(pb) + p.Marshal(skip) + p2 := NewBuffer(nil) + + b.StartTimer() + for i := 0; i < b.N; i++ { + p2.SetBuf(p.Bytes()) + p2.Unmarshal(pbd) + } +} diff --git a/deps/github.com/gogo/protobuf/proto/any_test.go b/deps/github.com/gogo/protobuf/proto/any_test.go new file mode 100644 index 000000000..c0e10f22c --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/any_test.go @@ -0,0 +1,300 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "strings" + "testing" + + "github.com/gogo/protobuf/proto" + + pb "github.com/gogo/protobuf/proto/proto3_proto" + testpb "github.com/gogo/protobuf/proto/test_proto" + "github.com/gogo/protobuf/types" +) + +var ( + expandedMarshaler = proto.TextMarshaler{ExpandAny: true} + expandedCompactMarshaler = proto.TextMarshaler{Compact: true, ExpandAny: true} +) + +// anyEqual reports whether two messages which may be google.protobuf.Any or may +// contain google.protobuf.Any fields are equal. We can't use proto.Equal for +// comparison, because semantically equivalent messages may be marshaled to +// binary in different tag order. Instead, trust that TextMarshaler with +// ExpandAny option works and compare the text marshaling results. +func anyEqual(got, want proto.Message) bool { + // if messages are proto.Equal, no need to marshal. + if proto.Equal(got, want) { + return true + } + g := expandedMarshaler.Text(got) + w := expandedMarshaler.Text(want) + return g == w +} + +type golden struct { + m proto.Message + t, c string +} + +var goldenMessages = makeGolden() + +func makeGolden() []golden { + nested := &pb.Nested{Bunny: "Monty"} + nb, err := proto.Marshal(nested) + if err != nil { + panic(err) + } + m1 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m2 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, + } + m3 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, + } + m4 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, + } + m5 := &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb} + + any1 := &testpb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} + proto.SetExtension(any1, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("foo")}) + proto.SetExtension(any1, testpb.E_Ext_Text, proto.String("bar")) + any1b, err := proto.Marshal(any1) + if err != nil { + panic(err) + } + any2 := &testpb.MyMessage{Count: proto.Int32(42), Bikeshed: testpb.MyMessage_GREEN.Enum(), RepBytes: [][]byte{[]byte("roboto")}} + proto.SetExtension(any2, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("baz")}) + any2b, err := proto.Marshal(any2) + if err != nil { + panic(err) + } + m6 := &pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + ManyThings: []*types.Any{ + {TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, + {TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, + }, + } + + const ( + m1Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m2Golden = ` +name: "David" +result_count: 47 +anything: < + ["http://[::1]/type.googleapis.com/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m3Golden = ` +name: "David" +result_count: 47 +anything: < + ["type.googleapis.com/\"/proto3_proto.Nested"]: < + bunny: "Monty" + > +> +` + m4Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Monty" + > +> +` + m5Golden = ` +[type.googleapis.com/proto3_proto.Nested]: < + bunny: "Monty" +> +` + m6Golden = ` +name: "David" +result_count: 47 +anything: < + [type.googleapis.com/test_proto.MyMessage]: < + count: 47 + name: "David" + [test_proto.Ext.more]: < + data: "foo" + > + [test_proto.Ext.text]: "bar" + > +> +many_things: < + [type.googleapis.com/test_proto.MyMessage]: < + count: 42 + bikeshed: GREEN + rep_bytes: "roboto" + [test_proto.Ext.more]: < + data: "baz" + > + > +> +many_things: < + [type.googleapis.com/test_proto.MyMessage]: < + count: 47 + name: "David" + [test_proto.Ext.more]: < + data: "foo" + > + [test_proto.Ext.text]: "bar" + > +> +` + ) + return []golden{ + {m1, strings.TrimSpace(m1Golden) + "\n", strings.TrimSpace(compact(m1Golden)) + " "}, + {m2, strings.TrimSpace(m2Golden) + "\n", strings.TrimSpace(compact(m2Golden)) + " "}, + {m3, strings.TrimSpace(m3Golden) + "\n", strings.TrimSpace(compact(m3Golden)) + " "}, + {m4, strings.TrimSpace(m4Golden) + "\n", strings.TrimSpace(compact(m4Golden)) + " "}, + {m5, strings.TrimSpace(m5Golden) + "\n", strings.TrimSpace(compact(m5Golden)) + " "}, + {m6, strings.TrimSpace(m6Golden) + "\n", strings.TrimSpace(compact(m6Golden)) + " "}, + } +} + +func TestMarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want { + t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want) + } + if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want { + t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want) + } + } +} + +func TestUnmarshalGolden(t *testing.T) { + for _, tt := range goldenMessages { + want := tt.m + got := proto.Clone(tt.m) + got.Reset() + if err := proto.UnmarshalText(tt.t, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.t, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.t, got, want) + } + got.Reset() + if err := proto.UnmarshalText(tt.c, got); err != nil { + t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.c, err) + } + if !anyEqual(got, want) { + t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.c, got, want) + } + } +} + +func TestMarshalUnknownAny(t *testing.T) { + m := &pb.Message{ + Anything: &types.Any{ + TypeUrl: "foo", + Value: []byte("bar"), + }, + } + want := `anything: < + type_url: "foo" + value: "bar" +> +` + got := expandedMarshaler.Text(m) + if got != want { + t.Errorf("got\n`%s`\nwant\n`%s`", got, want) + } +} + +func TestAmbiguousAny(t *testing.T) { + pb := &types.Any{} + err := proto.UnmarshalText(` + type_url: "ttt/proto3_proto.Nested" + value: "\n\x05Monty" + `, pb) + t.Logf("result: %v (error: %v)", expandedMarshaler.Text(pb), err) + if err != nil { + t.Errorf("failed to parse ambiguous Any message: %v", err) + } +} + +func TestUnmarshalOverwriteAny(t *testing.T) { + pb := &types.Any{} + err := proto.UnmarshalText(` + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Monty" + > + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Rabbit of Caerbannog" + > + `, pb) + want := `line 7: Any message unpacked multiple times, or "type_url" already set` + if err.Error() != want { + t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) + } +} + +func TestUnmarshalAnyMixAndMatch(t *testing.T) { + pb := &types.Any{} + err := proto.UnmarshalText(` + value: "\n\x05Monty" + [type.googleapis.com/a/path/proto3_proto.Nested]: < + bunny: "Rabbit of Caerbannog" + > + `, pb) + want := `line 5: Any message unpacked multiple times, or "value" already set` + if err.Error() != want { + t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) + } +} diff --git a/deps/github.com/gogo/protobuf/proto/clone.go b/deps/github.com/gogo/protobuf/proto/clone.go index 5d4cba4b5..a26b046d9 100644 --- a/deps/github.com/gogo/protobuf/proto/clone.go +++ b/deps/github.com/gogo/protobuf/proto/clone.go @@ -35,22 +35,39 @@ package proto import ( + "fmt" "log" "reflect" "strings" ) // Clone returns a deep copy of a protocol buffer. -func Clone(pb Message) Message { - in := reflect.ValueOf(pb) +func Clone(src Message) Message { + in := reflect.ValueOf(src) if in.IsNil() { - return pb + return src } - out := reflect.New(in.Type().Elem()) - // out is empty so a merge is a deep copy. - mergeStruct(out.Elem(), in.Elem()) - return out.Interface().(Message) + dst := out.Interface().(Message) + Merge(dst, src) + return dst +} + +// Merger is the interface representing objects that can merge messages of the same type. +type Merger interface { + // Merge merges src into this message. + // Required and optional fields that are set in src will be set to that value in dst. + // Elements of repeated fields will be appended. + // + // Merge may panic if called with a different argument type than the receiver. + Merge(src Message) +} + +// generatedMerger is the custom merge method that generated protos will have. +// We must add this method since a generate Merge method will conflict with +// many existing protos that have a Merge data field already defined. +type generatedMerger interface { + XXX_Merge(src Message) } // Merge merges src into dst. @@ -58,17 +75,24 @@ func Clone(pb Message) Message { // Elements of repeated fields will be appended. // Merge panics if src and dst are not the same type, or if dst is nil. func Merge(dst, src Message) { + if m, ok := dst.(Merger); ok { + m.Merge(src) + return + } + in := reflect.ValueOf(src) out := reflect.ValueOf(dst) if out.IsNil() { panic("proto: nil destination") } if in.Type() != out.Type() { - // Explicit test prior to mergeStruct so that mistyped nils will fail - panic("proto: type mismatch") + panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src)) } if in.IsNil() { - // Merging nil into non-nil is a quiet no-op + return // Merge from nil src is a noop + } + if m, ok := dst.(generatedMerger); ok { + m.XXX_Merge(src) return } mergeStruct(out.Elem(), in.Elem()) @@ -89,7 +113,7 @@ func mergeStruct(out, in reflect.Value) { bIn := emIn.GetExtensions() bOut := emOut.GetExtensions() *bOut = append(*bOut, *bIn...) - } else if emIn, ok := extendable(in.Addr().Interface()); ok { + } else if emIn, err := extendable(in.Addr().Interface()); err == nil { emOut, _ := extendable(out.Addr().Interface()) mIn, muIn := emIn.extensionsRead() if mIn != nil { diff --git a/deps/github.com/gogo/protobuf/proto/clone_test.go b/deps/github.com/gogo/protobuf/proto/clone_test.go new file mode 100644 index 000000000..ac4b919b2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/clone_test.go @@ -0,0 +1,397 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/test_proto" +) + +var cloneTestMessage = &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, +} + +func init() { + ext := &pb.Ext{ + Data: proto.String("extension"), + } + if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil { + panic("SetExtension: " + err.Error()) + } +} + +func TestClone(t *testing.T) { + m := proto.Clone(cloneTestMessage).(*pb.MyMessage) + if !proto.Equal(m, cloneTestMessage) { + t.Fatalf("Clone(%v) = %v", cloneTestMessage, m) + } + + // Verify it was a deep copy. + *m.Inner.Port++ + if proto.Equal(m, cloneTestMessage) { + t.Error("Mutating clone changed the original") + } + // Byte fields and repeated fields should be copied. + if &m.Pet[0] == &cloneTestMessage.Pet[0] { + t.Error("Pet: repeated field not copied") + } + if &m.Others[0] == &cloneTestMessage.Others[0] { + t.Error("Others: repeated field not copied") + } + if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] { + t.Error("Others[0].Value: bytes field not copied") + } + if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] { + t.Error("RepBytes: repeated field not copied") + } + if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] { + t.Error("RepBytes[0]: bytes field not copied") + } +} + +func TestCloneNil(t *testing.T) { + var m *pb.MyMessage + if c := proto.Clone(m); !proto.Equal(m, c) { + t.Errorf("Clone(%v) = %v", m, c) + } +} + +var mergeTests = []struct { + src, dst, want proto.Message +}{ + { + src: &pb.MyMessage{ + Count: proto.Int32(42), + }, + dst: &pb.MyMessage{ + Name: proto.String("Dave"), + }, + want: &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + }, + }, + { + src: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + }, + Pet: []string{"horsey"}, + Others: []*pb.OtherMessage{ + { + Value: []byte("some bytes"), + }, + }, + }, + dst: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("niles"), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + { + // Explicitly test a src=nil field + Inner: nil, + }, + }, + }, + want: &pb.MyMessage{ + Inner: &pb.InnerMessage{ + Host: proto.String("hey"), + Connected: proto.Bool(true), + Port: proto.Int32(9099), + }, + Pet: []string{"bunny", "kitty", "horsey"}, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(31415926535), + }, + {}, + { + Value: []byte("some bytes"), + }, + }, + }, + }, + { + src: &pb.MyMessage{ + RepBytes: [][]byte{[]byte("wow")}, + }, + dst: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham")}, + }, + want: &pb.MyMessage{ + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(6), + }, + RepBytes: [][]byte{[]byte("sham"), []byte("wow")}, + }, + }, + // Check that a scalar bytes field replaces rather than appends. + { + src: &pb.OtherMessage{Value: []byte("foo")}, + dst: &pb.OtherMessage{Value: []byte("bar")}, + want: &pb.OtherMessage{Value: []byte("foo")}, + }, + { + src: &pb.MessageWithMap{ + NameMapping: map[int32]string{6: "Nigel"}, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: {F: proto.Float64(2.0)}, + 0x4002: { + F: proto.Float64(2.0), + }, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + dst: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Bruce", // should be overwritten + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4002: { + F: proto.Float64(3.0), + Exact: proto.Bool(true), + }, // the entire message should be overwritten + }, + }, + want: &pb.MessageWithMap{ + NameMapping: map[int32]string{ + 6: "Nigel", + 7: "Andrew", + }, + MsgMapping: map[int64]*pb.FloatingPoint{ + 0x4001: {F: proto.Float64(2.0)}, + 0x4002: { + F: proto.Float64(2.0), + }, + }, + ByteMapping: map[bool][]byte{true: []byte("wowsa")}, + }, + }, + // proto3 shouldn't merge zero values, + // in the same way that proto2 shouldn't merge nils. + { + src: &proto3pb.Message{ + Name: "Aaron", + Data: []byte(""), // zero value, but not nil + }, + dst: &proto3pb.Message{ + HeightInCm: 176, + Data: []byte("texas!"), + }, + want: &proto3pb.Message{ + Name: "Aaron", + HeightInCm: 176, + Data: []byte("texas!"), + }, + }, + // Oneof fields should merge by assignment. + { + src: &pb.Communique{ + Union: &pb.Communique_Number{Number: 41}, + }, + dst: &pb.Communique{ + Union: &pb.Communique_Name{Name: "Bobby Tables"}, + }, + want: &pb.Communique{ + Union: &pb.Communique_Number{Number: 41}, + }, + }, + { // Oneof nil is the same as not set. + src: &pb.Communique{}, + dst: &pb.Communique{Union: &pb.Communique_Name{Name: "Bobby Tables"}}, + want: &pb.Communique{Union: &pb.Communique_Name{Name: "Bobby Tables"}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Number{Number: 1337}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Number{Number: 1337}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Col{Col: pb.MyMessage_RED}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Col{Col: pb.MyMessage_RED}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Data{Data: []byte("hello")}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Data{Data: []byte("hello")}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{BytesField: []byte{1, 2, 3}}}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{BytesField: []byte{1, 2, 3}}}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Msg{}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Msg{}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{StringField: proto.String("123")}}}, + dst: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{BytesField: []byte{1, 2, 3}}}}, + want: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{StringField: proto.String("123"), BytesField: []byte{1, 2, 3}}}}, + }, + { + src: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": {Cute: true}, // replace + "kay_b": {Bunny: "rabbit"}, // insert + }, + }, + dst: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": {Bunny: "lost"}, // replaced + "kay_c": {Bunny: "bunny"}, // keep + }, + }, + want: &proto3pb.Message{ + Terrain: map[string]*proto3pb.Nested{ + "kay_a": {Cute: true}, + "kay_b": {Bunny: "rabbit"}, + "kay_c": {Bunny: "bunny"}, + }, + }, + }, + { + src: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + dst: &pb.GoTest{}, + want: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + }, + { + src: &pb.GoTest{}, + dst: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + want: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + }, + { + src: &pb.GoTest{ + F_BytesRepeated: [][]byte{nil, {}, {0}}, + }, + dst: &pb.GoTest{}, + want: &pb.GoTest{ + F_BytesRepeated: [][]byte{nil, {}, {0}}, + }, + }, + { + src: &pb.MyMessage{ + Others: []*pb.OtherMessage{}, + }, + dst: &pb.MyMessage{}, + want: &pb.MyMessage{ + Others: []*pb.OtherMessage{}, + }, + }, +} + +func TestMerge(t *testing.T) { + for _, m := range mergeTests { + got := proto.Clone(m.dst) + if !proto.Equal(got, m.dst) { + t.Errorf("Clone()\ngot %v\nwant %v", got, m.dst) + continue + } + proto.Merge(got, m.src) + if !proto.Equal(got, m.want) { + t.Errorf("Merge(%v, %v)\ngot %v\nwant %v", m.dst, m.src, got, m.want) + } + } +} diff --git a/deps/github.com/gogo/protobuf/proto/custom_gogo.go b/deps/github.com/gogo/protobuf/proto/custom_gogo.go new file mode 100644 index 000000000..24552483c --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/custom_gogo.go @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import "reflect" + +type custom interface { + Marshal() ([]byte, error) + Unmarshal(data []byte) error + Size() int +} + +var customType = reflect.TypeOf((*custom)(nil)).Elem() diff --git a/deps/github.com/gogo/protobuf/proto/decode.go b/deps/github.com/gogo/protobuf/proto/decode.go index 737f2731d..d9aa3c42d 100644 --- a/deps/github.com/gogo/protobuf/proto/decode.go +++ b/deps/github.com/gogo/protobuf/proto/decode.go @@ -39,8 +39,6 @@ import ( "errors" "fmt" "io" - "os" - "reflect" ) // errOverflow is returned when an integer is too large to be represented. @@ -50,10 +48,6 @@ var errOverflow = errors.New("proto: integer overflow") // wire type is encountered. It does not get returned to user code. var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") -// The fundamental decoders that interpret bytes on the wire. -// Those that take integer types all return uint64 and are -// therefore of type valueDecoder. - // DecodeVarint reads a varint-encoded integer from the slice. // It returns the integer and the number of bytes consumed, or // zero if there is not enough. @@ -267,9 +261,6 @@ func (p *Buffer) DecodeZigzag32() (x uint64, err error) { return } -// These are not ValueDecoders: they produce an array of bytes or a string. -// bytes, embedded messages - // DecodeRawBytes reads a count-delimited byte buffer from the Buffer. // This is the format used for the bytes protocol buffer // type and for embedded messages. @@ -311,81 +302,29 @@ func (p *Buffer) DecodeStringBytes() (s string, err error) { return string(buf), nil } -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -// If the protocol buffer has extensions, and the field matches, add it as an extension. -// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. -func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { - oi := o.index - - err := o.skip(t, tag, wire) - if err != nil { - return err - } - - if !unrecField.IsValid() { - return nil - } - - ptr := structPointer_Bytes(base, unrecField) - - // Add the skipped field to struct field - obuf := o.buf - - o.buf = *ptr - o.EncodeVarint(uint64(tag<<3 | wire)) - *ptr = append(o.buf, obuf[oi:o.index]...) - - o.buf = obuf - - return nil -} - -// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. -func (o *Buffer) skip(t reflect.Type, tag, wire int) error { - - var u uint64 - var err error - - switch wire { - case WireVarint: - _, err = o.DecodeVarint() - case WireFixed64: - _, err = o.DecodeFixed64() - case WireBytes: - _, err = o.DecodeRawBytes(false) - case WireFixed32: - _, err = o.DecodeFixed32() - case WireStartGroup: - for { - u, err = o.DecodeVarint() - if err != nil { - break - } - fwire := int(u & 0x7) - if fwire == WireEndGroup { - break - } - ftag := int(u >> 3) - err = o.skip(t, ftag, fwire) - if err != nil { - break - } - } - default: - err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) - } - return err -} - // Unmarshaler is the interface representing objects that can -// unmarshal themselves. The method should reset the receiver before -// decoding starts. The argument points to data that may be +// unmarshal themselves. The argument points to data that may be // overwritten, so implementations should not keep references to the // buffer. +// Unmarshal implementations should not clear the receiver. +// Any unmarshaled data should be merged into the receiver. +// Callers of Unmarshal that do not want to retain existing data +// should Reset the receiver before calling Unmarshal. type Unmarshaler interface { Unmarshal([]byte) error } +// newUnmarshaler is the interface representing objects that can +// unmarshal themselves. The semantics are identical to Unmarshaler. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newUnmarshaler interface { + XXX_Unmarshal([]byte) error +} + // Unmarshal parses the protocol buffer representation in buf and places the // decoded result in pb. If the struct underlying pb does not match // the data in buf, the results can be unpredictable. @@ -395,7 +334,13 @@ type Unmarshaler interface { // to preserve and append to existing data. func Unmarshal(buf []byte, pb Message) error { pb.Reset() - return UnmarshalMerge(buf, pb) + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) } // UnmarshalMerge parses the protocol buffer representation in buf and @@ -405,8 +350,16 @@ func Unmarshal(buf []byte, pb Message) error { // UnmarshalMerge merges into existing data in pb. // Most code should use Unmarshal instead. func UnmarshalMerge(buf []byte, pb Message) error { - // If the object can unmarshal itself, let it. + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 return u.Unmarshal(buf) } return NewBuffer(buf).Unmarshal(pb) @@ -422,12 +375,17 @@ func (p *Buffer) DecodeMessage(pb Message) error { } // DecodeGroup reads a tag-delimited group from the Buffer. +// StartGroup tag is already consumed. This function consumes +// EndGroup tag. func (p *Buffer) DecodeGroup(pb Message) error { - typ, base, err := getbase(pb) - if err != nil { - return err + b := p.buf[p.index:] + x, y := findEndGroup(b) + if x < 0 { + return io.ErrUnexpectedEOF } - return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) + err := Unmarshal(b[:x], pb) + p.index += y + return err } // Unmarshal parses the protocol buffer representation in the @@ -438,541 +396,33 @@ func (p *Buffer) DecodeGroup(pb Message) error { // Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. func (p *Buffer) Unmarshal(pb Message) error { // If the object can unmarshal itself, let it. - if u, ok := pb.(Unmarshaler); ok { - err := u.Unmarshal(p.buf[p.index:]) + if u, ok := pb.(newUnmarshaler); ok { + err := u.XXX_Unmarshal(p.buf[p.index:]) p.index = len(p.buf) return err } - - typ, base, err := getbase(pb) - if err != nil { - return err - } - - err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) - - if collectStats { - stats.Decode++ - } - - return err -} - -// unmarshalType does the work of unmarshaling a structure. -func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { - var state errorState - required, reqFields := prop.reqCount, uint64(0) - - var err error - for err == nil && o.index < len(o.buf) { - oi := o.index - var u uint64 - u, err = o.DecodeVarint() - if err != nil { - break - } - wire := int(u & 0x7) - if wire == WireEndGroup { - if is_group { - if required > 0 { - // Not enough information to determine the exact field. - // (See below.) - return &RequiredNotSetError{"{Unknown}"} - } - return nil // input is satisfied - } - return fmt.Errorf("proto: %s: wiretype end group for non-group", st) - } - tag := int(u >> 3) - if tag <= 0 { - return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) - } - fieldnum, ok := prop.decoderTags.get(tag) - if !ok { - // Maybe it's an extension? - if prop.extendable { - if e, eok := structPointer_Interface(base, st).(extensionsBytes); eok { - if isExtensionField(e, int32(tag)) { - if err = o.skip(st, tag, wire); err == nil { - ext := e.GetExtensions() - *ext = append(*ext, o.buf[oi:o.index]...) - } - continue - } - } else if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) { - if err = o.skip(st, tag, wire); err == nil { - extmap := e.extensionsWrite() - ext := extmap[int32(tag)] // may be missing - ext.enc = append(ext.enc, o.buf[oi:o.index]...) - extmap[int32(tag)] = ext - } - continue - } - } - // Maybe it's a oneof? - if prop.oneofUnmarshaler != nil { - m := structPointer_Interface(base, st).(Message) - // First return value indicates whether tag is a oneof field. - ok, err = prop.oneofUnmarshaler(m, tag, wire, o) - if err == ErrInternalBadWireType { - // Map the error to something more descriptive. - // Do the formatting here to save generated code space. - err = fmt.Errorf("bad wiretype for oneof field in %T", m) - } - if ok { - continue - } - } - err = o.skipAndSave(st, tag, wire, base, prop.unrecField) - continue - } - p := prop.Prop[fieldnum] - - if p.dec == nil { - fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) - continue - } - dec := p.dec - if wire != WireStartGroup && wire != p.WireType { - if wire == WireBytes && p.packedDec != nil { - // a packable field - dec = p.packedDec - } else { - err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) - continue - } - } - decErr := dec(o, p, base) - if decErr != nil && !state.shouldContinue(decErr, p) { - err = decErr - } - if err == nil && p.Required { - // Successfully decoded a required field. - if tag <= 64 { - // use bitmap for fields 1-64 to catch field reuse. - var mask uint64 = 1 << uint64(tag-1) - if reqFields&mask == 0 { - // new required field - reqFields |= mask - required-- - } - } else { - // This is imprecise. It can be fooled by a required field - // with a tag > 64 that is encoded twice; that's very rare. - // A fully correct implementation would require allocating - // a data structure, which we would like to avoid. - required-- - } - } - } - if err == nil { - if is_group { - return io.ErrUnexpectedEOF - } - if state.err != nil { - return state.err - } - if required > 0 { - // Not enough information to determine the exact field. If we use extra - // CPU, we could determine the field only if the missing required field - // has a tag <= 64 and we check reqFields. - return &RequiredNotSetError{"{Unknown}"} - } - } - return err -} - -// Individual type decoders -// For each, -// u is the decoded value, -// v is a pointer to the field (pointer) in the struct - -// Sizes of the pools to allocate inside the Buffer. -// The goal is modest amortization and allocation -// on at least 16-byte boundaries. -const ( - boolPoolSize = 16 - uint32PoolSize = 8 - uint64PoolSize = 4 -) - -// Decode a bool. -func (o *Buffer) dec_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - if len(o.bools) == 0 { - o.bools = make([]bool, boolPoolSize) - } - o.bools[0] = u != 0 - *structPointer_Bool(base, p.field) = &o.bools[0] - o.bools = o.bools[1:] - return nil -} - -func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - *structPointer_BoolVal(base, p.field) = u != 0 - return nil -} - -// Decode an int32. -func (o *Buffer) dec_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) - return nil -} - -func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) - return nil -} - -// Decode an int64. -func (o *Buffer) dec_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64_Set(structPointer_Word64(base, p.field), o, u) - return nil -} - -func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - word64Val_Set(structPointer_Word64Val(base, p.field), o, u) - return nil -} - -// Decode a string. -func (o *Buffer) dec_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_String(base, p.field) = &s - return nil -} - -func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - *structPointer_StringVal(base, p.field) = s - return nil -} - -// Decode a slice of bytes ([]byte). -func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - *structPointer_Bytes(base, p.field) = b - return nil -} - -// Decode a slice of bools ([]bool). -func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - v := structPointer_BoolSlice(base, p.field) - *v = append(*v, u != 0) - return nil -} - -// Decode a slice of bools ([]bool) in packed format. -func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { - v := structPointer_BoolSlice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded bools - fin := o.index + nb - if fin < o.index { - return errOverflow - } - - y := *v - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - y = append(y, u != 0) - } - - *v = y - return nil -} - -// Decode a slice of int32s ([]int32). -func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - structPointer_Word32Slice(base, p.field).Append(uint32(u)) - return nil -} - -// Decode a slice of int32s ([]int32) in packed format. -func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int32s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(uint32(u)) - } - return nil -} - -// Decode a slice of int64s ([]int64). -func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { - u, err := p.valDec(o) - if err != nil { - return err - } - - structPointer_Word64Slice(base, p.field).Append(u) - return nil -} - -// Decode a slice of int64s ([]int64) in packed format. -func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Slice(base, p.field) - - nn, err := o.DecodeVarint() - if err != nil { - return err - } - nb := int(nn) // number of bytes of encoded int64s - - fin := o.index + nb - if fin < o.index { - return errOverflow - } - for o.index < fin { - u, err := p.valDec(o) - if err != nil { - return err - } - v.Append(u) - } - return nil -} - -// Decode a slice of strings ([]string). -func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { - s, err := o.DecodeStringBytes() - if err != nil { - return err - } - v := structPointer_StringSlice(base, p.field) - *v = append(*v, s) - return nil -} - -// Decode a slice of slice of bytes ([][]byte). -func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - v := structPointer_BytesSlice(base, p.field) - *v = append(*v, b) - return nil -} - -// Decode a map field. -func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - oi := o.index // index at the end of this map entry - o.index -= len(raw) // move buffer back to start of map entry - - mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V - if mptr.Elem().IsNil() { - mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) - } - v := mptr.Elem() // map[K]V - - // Prepare addressable doubly-indirect placeholders for the key and value types. - // See enc_new_map for why. - keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K - keybase := toStructPointer(keyptr.Addr()) // **K - - var valbase structPointer - var valptr reflect.Value - switch p.mtype.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valptr = reflect.ValueOf(&dummy) // *[]byte - valbase = toStructPointer(valptr) // *[]byte - case reflect.Ptr: - // message; valptr is **Msg; need to allocate the intermediate pointer - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valptr.Set(reflect.New(valptr.Type().Elem())) - valbase = toStructPointer(valptr) - default: - // everything else - valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V - valbase = toStructPointer(valptr.Addr()) // **V - } - - // Decode. - // This parses a restricted wire format, namely the encoding of a message - // with two fields. See enc_new_map for the format. - for o.index < oi { - // tagcode for key and value properties are always a single byte - // because they have tags 1 and 2. - tagcode := o.buf[o.index] - o.index++ - switch tagcode { - case p.mkeyprop.tagcode[0]: - if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { - return err - } - case p.mvalprop.tagcode[0]: - if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { - return err - } - default: - // TODO: Should we silently skip this instead? - return fmt.Errorf("proto: bad map data tag %d", raw[0]) - } - } - keyelem, valelem := keyptr.Elem(), valptr.Elem() - if !keyelem.IsValid() { - keyelem = reflect.Zero(p.mtype.Key()) - } - if !valelem.IsValid() { - valelem = reflect.Zero(p.mtype.Elem()) - } - - v.SetMapIndex(keyelem, valelem) - return nil -} - -// Decode a group. -func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - return o.unmarshalType(p.stype, p.sprop, true, bas) -} - -// Decode an embedded message. -func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { - raw, e := o.DecodeRawBytes(false) - if e != nil { - return e - } - - bas := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(bas) { - // allocate new nested message - bas = toStructPointer(reflect.New(p.stype)) - structPointer_SetStructPointer(base, p.field, bas) - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := structPointer_Interface(bas, p.stype) - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, false, bas) - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of embedded messages. -func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, false, base) -} - -// Decode a slice of embedded groups. -func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { - return o.dec_slice_struct(p, true, base) -} - -// Decode a slice of structs ([]*struct). -func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { - v := reflect.New(p.stype) - bas := toStructPointer(v) - structPointer_StructPointerSlice(base, p.field).Append(bas) - - if is_group { - err := o.unmarshalType(p.stype, p.sprop, is_group, bas) - return err - } - - raw, err := o.DecodeRawBytes(false) - if err != nil { + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) return err } - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - iv := v.Interface() - return iv.(Unmarshaler).Unmarshal(raw) - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, is_group, bas) - - o.buf = obuf - o.index = oi - + // Slow workaround for messages that aren't Unmarshalers. + // This includes some hand-coded .pb.go files and + // bootstrap protos. + // TODO: fix all of those and then add Unmarshal to + // the Message interface. Then: + // The cast above and code below can be deleted. + // The old unmarshaler can be deleted. + // Clients can call Unmarshal directly (can already do that, actually). + var info InternalMessageInfo + err := info.Unmarshal(pb, p.buf[p.index:]) + p.index = len(p.buf) return err } diff --git a/deps/github.com/gogo/protobuf/proto/decode_gogo.go b/deps/github.com/gogo/protobuf/proto/decode_gogo.go deleted file mode 100644 index 6fb74de4c..000000000 --- a/deps/github.com/gogo/protobuf/proto/decode_gogo.go +++ /dev/null @@ -1,172 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package proto - -import ( - "reflect" -) - -// Decode a reference to a struct pointer. -func (o *Buffer) dec_ref_struct_message(p *Properties, base structPointer) (err error) { - raw, e := o.DecodeRawBytes(false) - if e != nil { - return e - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - panic("not supported, since this is a pointer receiver") - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - bas := structPointer_FieldPointer(base, p.field) - - err = o.unmarshalType(p.stype, p.sprop, false, bas) - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of references to struct pointers ([]struct). -func (o *Buffer) dec_slice_ref_struct(p *Properties, is_group bool, base structPointer) error { - newBas := appendStructPointer(base, p.field, p.sstype) - - if is_group { - panic("not supported, maybe in future, if requested.") - } - - raw, err := o.DecodeRawBytes(false) - if err != nil { - return err - } - - // If the object can unmarshal itself, let it. - if p.isUnmarshaler { - panic("not supported, since this is not a pointer receiver.") - } - - obuf := o.buf - oi := o.index - o.buf = raw - o.index = 0 - - err = o.unmarshalType(p.stype, p.sprop, is_group, newBas) - - o.buf = obuf - o.index = oi - - return err -} - -// Decode a slice of references to struct pointers. -func (o *Buffer) dec_slice_ref_struct_message(p *Properties, base structPointer) error { - return o.dec_slice_ref_struct(p, false, base) -} - -func setPtrCustomType(base structPointer, f field, v interface{}) { - if v == nil { - return - } - structPointer_SetStructPointer(base, f, toStructPointer(reflect.ValueOf(v))) -} - -func setCustomType(base structPointer, f field, value interface{}) { - if value == nil { - return - } - v := reflect.ValueOf(value).Elem() - t := reflect.TypeOf(value).Elem() - kind := t.Kind() - switch kind { - case reflect.Slice: - slice := reflect.MakeSlice(t, v.Len(), v.Cap()) - reflect.Copy(slice, v) - oldHeader := structPointer_GetSliceHeader(base, f) - oldHeader.Data = slice.Pointer() - oldHeader.Len = v.Len() - oldHeader.Cap = v.Cap() - default: - size := reflect.TypeOf(value).Elem().Size() - structPointer_Copy(toStructPointer(reflect.ValueOf(value)), structPointer_Add(base, f), int(size)) - } -} - -func (o *Buffer) dec_custom_bytes(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - i := reflect.New(p.ctype.Elem()).Interface() - custom := (i).(Unmarshaler) - if err := custom.Unmarshal(b); err != nil { - return err - } - setPtrCustomType(base, p.field, custom) - return nil -} - -func (o *Buffer) dec_custom_ref_bytes(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - i := reflect.New(p.ctype).Interface() - custom := (i).(Unmarshaler) - if err := custom.Unmarshal(b); err != nil { - return err - } - if custom != nil { - setCustomType(base, p.field, custom) - } - return nil -} - -// Decode a slice of bytes ([]byte) into a slice of custom types. -func (o *Buffer) dec_custom_slice_bytes(p *Properties, base structPointer) error { - b, err := o.DecodeRawBytes(true) - if err != nil { - return err - } - i := reflect.New(p.ctype.Elem()).Interface() - custom := (i).(Unmarshaler) - if err := custom.Unmarshal(b); err != nil { - return err - } - newBas := appendStructPointer(base, p.field, p.ctype) - - var zero field - setCustomType(newBas, zero, custom) - - return nil -} diff --git a/deps/github.com/gogo/protobuf/proto/decode_test.go b/deps/github.com/gogo/protobuf/proto/decode_test.go new file mode 100644 index 000000000..03c5d0d58 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/decode_test.go @@ -0,0 +1,259 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build go1.7 + +package proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + tpb "github.com/gogo/protobuf/proto/proto3_proto" +) + +var msgBlackhole = new(tpb.Message) + +// Disabled this Benchmark because it is using features (b.Run) from go1.7 and gogoprotobuf still have compatibility with go1.5 +// BenchmarkVarint32ArraySmall shows the performance on an array of small int32 fields (1 and +// 2 bytes long). +// func BenchmarkVarint32ArraySmall(b *testing.B) { +// for i := uint(1); i <= 10; i++ { +// dist := genInt32Dist([7]int{0, 3, 1}, 1<" } func init() { RegisterType((*duration)(nil), "gogo.protobuf.proto.duration") } - -func (o *Buffer) decDuration() (time.Duration, error) { - b, err := o.DecodeRawBytes(true) - if err != nil { - return 0, err - } - dproto := &duration{} - if err := Unmarshal(b, dproto); err != nil { - return 0, err - } - return durationFromProto(dproto) -} - -func (o *Buffer) dec_duration(p *Properties, base structPointer) error { - d, err := o.decDuration() - if err != nil { - return err - } - word64_Set(structPointer_Word64(base, p.field), o, uint64(d)) - return nil -} - -func (o *Buffer) dec_ref_duration(p *Properties, base structPointer) error { - d, err := o.decDuration() - if err != nil { - return err - } - word64Val_Set(structPointer_Word64Val(base, p.field), o, uint64(d)) - return nil -} - -func (o *Buffer) dec_slice_duration(p *Properties, base structPointer) error { - d, err := o.decDuration() - if err != nil { - return err - } - newBas := appendStructPointer(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))) - var zero field - setPtrCustomType(newBas, zero, &d) - return nil -} - -func (o *Buffer) dec_slice_ref_duration(p *Properties, base structPointer) error { - d, err := o.decDuration() - if err != nil { - return err - } - structPointer_Word64Slice(base, p.field).Append(uint64(d)) - return nil -} - -func size_duration(p *Properties, base structPointer) (n int) { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - dur := structPointer_Interface(structp, durationType).(*time.Duration) - d := durationProto(*dur) - size := Size(d) - return size + sizeVarint(uint64(size)) + len(p.tagcode) -} - -func (o *Buffer) enc_duration(p *Properties, base structPointer) error { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - dur := structPointer_Interface(structp, durationType).(*time.Duration) - d := durationProto(*dur) - data, err := Marshal(d) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_ref_duration(p *Properties, base structPointer) (n int) { - dur := structPointer_InterfaceAt(base, p.field, durationType).(*time.Duration) - d := durationProto(*dur) - size := Size(d) - return size + sizeVarint(uint64(size)) + len(p.tagcode) -} - -func (o *Buffer) enc_ref_duration(p *Properties, base structPointer) error { - dur := structPointer_InterfaceAt(base, p.field, durationType).(*time.Duration) - d := durationProto(*dur) - data, err := Marshal(d) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_slice_duration(p *Properties, base structPointer) (n int) { - pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))).(*[]*time.Duration) - durs := *pdurs - for i := 0; i < len(durs); i++ { - if durs[i] == nil { - return 0 - } - dproto := durationProto(*durs[i]) - size := Size(dproto) - n += len(p.tagcode) + size + sizeVarint(uint64(size)) - } - return n -} - -func (o *Buffer) enc_slice_duration(p *Properties, base structPointer) error { - pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))).(*[]*time.Duration) - durs := *pdurs - for i := 0; i < len(durs); i++ { - if durs[i] == nil { - return errRepeatedHasNil - } - dproto := durationProto(*durs[i]) - data, err := Marshal(dproto) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - } - return nil -} - -func size_slice_ref_duration(p *Properties, base structPointer) (n int) { - pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(durationType)).(*[]time.Duration) - durs := *pdurs - for i := 0; i < len(durs); i++ { - dproto := durationProto(durs[i]) - size := Size(dproto) - n += len(p.tagcode) + size + sizeVarint(uint64(size)) - } - return n -} - -func (o *Buffer) enc_slice_ref_duration(p *Properties, base structPointer) error { - pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(durationType)).(*[]time.Duration) - durs := *pdurs - for i := 0; i < len(durs); i++ { - dproto := durationProto(durs[i]) - data, err := Marshal(dproto) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - } - return nil -} diff --git a/deps/github.com/gogo/protobuf/proto/encode.go b/deps/github.com/gogo/protobuf/proto/encode.go index 2b30f8462..4c35d3373 100644 --- a/deps/github.com/gogo/protobuf/proto/encode.go +++ b/deps/github.com/gogo/protobuf/proto/encode.go @@ -39,23 +39,19 @@ import ( "errors" "fmt" "reflect" - "sort" ) -// RequiredNotSetError is the error returned if Marshal is called with -// a protocol buffer struct whose required fields have not -// all been initialized. It is also the error returned if Unmarshal is -// called with an encoded protocol buffer that does not include all the -// required fields. -// -// When printed, RequiredNotSetError reports the first unset required field in a -// message. If the field cannot be precisely determined, it is reported as -// "{Unknown}". +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. type RequiredNotSetError struct { field string } func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } return fmt.Sprintf("proto: required field %q not set", e.field) } @@ -82,10 +78,6 @@ var ( const maxVarintBytes = 10 // maximum length of a varint -// maxMarshalSize is the largest allowed size of an encoded protobuf, -// since C++ and Java use signed int32s for the size. -const maxMarshalSize = 1<<31 - 1 - // EncodeVarint returns the varint encoding of x. // This is the format for the // int32, int64, uint32, uint64, bool, and enum @@ -119,18 +111,27 @@ func (p *Buffer) EncodeVarint(x uint64) error { // SizeVarint returns the varint encoding size of an integer. func SizeVarint(x uint64) int { - return sizeVarint(x) -} - -func sizeVarint(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n + switch { + case x < 1<<7: + return 1 + case x < 1<<14: + return 2 + case x < 1<<21: + return 3 + case x < 1<<28: + return 4 + case x < 1<<35: + return 5 + case x < 1<<42: + return 6 + case x < 1<<49: + return 7 + case x < 1<<56: + return 8 + case x < 1<<63: + return 9 + } + return 10 } // EncodeFixed64 writes a 64-bit integer to the Buffer. @@ -149,10 +150,6 @@ func (p *Buffer) EncodeFixed64(x uint64) error { return nil } -func sizeFixed64(x uint64) int { - return 8 -} - // EncodeFixed32 writes a 32-bit integer to the Buffer. // This is the format for the // fixed32, sfixed32, and float protocol buffer types. @@ -165,10 +162,6 @@ func (p *Buffer) EncodeFixed32(x uint64) error { return nil } -func sizeFixed32(x uint64) int { - return 4 -} - // EncodeZigzag64 writes a zigzag-encoded 64-bit integer // to the Buffer. // This is the format used for the sint64 protocol buffer type. @@ -177,10 +170,6 @@ func (p *Buffer) EncodeZigzag64(x uint64) error { return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func sizeZigzag64(x uint64) int { - return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - // EncodeZigzag32 writes a zigzag-encoded 32-bit integer // to the Buffer. // This is the format used for the sint32 protocol buffer type. @@ -189,10 +178,6 @@ func (p *Buffer) EncodeZigzag32(x uint64) error { return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) } -func sizeZigzag32(x uint64) int { - return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) -} - // EncodeRawBytes writes a count-delimited byte buffer to the Buffer. // This is the format used for the bytes protocol buffer // type and for embedded messages. @@ -202,11 +187,6 @@ func (p *Buffer) EncodeRawBytes(b []byte) error { return nil } -func sizeRawBytes(b []byte) int { - return sizeVarint(uint64(len(b))) + - len(b) -} - // EncodeStringBytes writes an encoded string to the Buffer. // This is the format used for the proto2 string type. func (p *Buffer) EncodeStringBytes(s string) error { @@ -215,319 +195,17 @@ func (p *Buffer) EncodeStringBytes(s string) error { return nil } -func sizeStringBytes(s string) int { - return sizeVarint(uint64(len(s))) + - len(s) -} - // Marshaler is the interface representing objects that can marshal themselves. type Marshaler interface { Marshal() ([]byte, error) } -// Marshal takes the protocol buffer -// and encodes it into the wire format, returning the data. -func Marshal(pb Message) ([]byte, error) { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - return m.Marshal() - } - p := NewBuffer(nil) - err := p.Marshal(pb) - if p.buf == nil && err == nil { - // Return a non-nil slice on success. - return []byte{}, nil - } - return p.buf, err -} - // EncodeMessage writes the protocol buffer to the Buffer, // prefixed by a varint-encoded length. func (p *Buffer) EncodeMessage(pb Message) error { - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - var state errorState - err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) - } - return err -} - -// Marshal takes the protocol buffer -// and encodes it into the wire format, writing the result to the -// Buffer. -func (p *Buffer) Marshal(pb Message) error { - // Can the object marshal itself? - if m, ok := pb.(Marshaler); ok { - data, err := m.Marshal() - p.buf = append(p.buf, data...) - return err - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return ErrNil - } - if err == nil { - err = p.enc_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Encode++ // Parens are to work around a goimports bug. - } - - if len(p.buf) > maxMarshalSize { - return ErrTooLarge - } - return err -} - -// Size returns the encoded size of a protocol buffer. -func Size(pb Message) (n int) { - // Can the object marshal itself? If so, Size is slow. - // TODO: add Size to Marshaler, or add a Sizer interface. - if m, ok := pb.(Marshaler); ok { - b, _ := m.Marshal() - return len(b) - } - - t, base, err := getbase(pb) - if structPointer_IsNil(base) { - return 0 - } - if err == nil { - n = size_struct(GetProperties(t.Elem()), base) - } - - if collectStats { - (stats).Size++ // Parens are to work around a goimports bug. - } - - return -} - -// Individual type encoders. - -// Encode a bool. -func (o *Buffer) enc_bool(p *Properties, base structPointer) error { - v := *structPointer_Bool(base, p.field) - if v == nil { - return ErrNil - } - x := 0 - if *v { - x = 1 - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { - v := *structPointer_BoolVal(base, p.field) - if !v { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, 1) - return nil -} - -func size_bool(p *Properties, base structPointer) int { - v := *structPointer_Bool(base, p.field) - if v == nil { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -func size_proto3_bool(p *Properties, base structPointer) int { - v := *structPointer_BoolVal(base, p.field) - if !v && !p.oneof { - return 0 - } - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -// Encode an int32. -func (o *Buffer) enc_int32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode a uint32. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return ErrNil - } - x := word32_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32(base, p.field) - if word32_IsNil(v) { - return 0 - } - x := word32_Get(v) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func size_proto3_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode an int64. -func (o *Buffer) enc_int64(p *Properties, base structPointer) error { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return ErrNil - } - x := word64_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func size_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64(base, p.field) - if word64_IsNil(v) { - return 0 - } - x := word64_Get(v) - n += len(p.tagcode) - n += p.valSize(x) - return -} - -func size_proto3_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - if x == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += p.valSize(x) - return -} - -// Encode a string. -func (o *Buffer) enc_string(p *Properties, base structPointer) error { - v := *structPointer_String(base, p.field) - if v == nil { - return ErrNil - } - x := *v - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(x) - return nil -} - -func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { - v := *structPointer_StringVal(base, p.field) - if v == "" { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(v) - return nil -} - -func size_string(p *Properties, base structPointer) (n int) { - v := *structPointer_String(base, p.field) - if v == nil { - return 0 - } - x := *v - n += len(p.tagcode) - n += sizeStringBytes(x) - return -} - -func size_proto3_string(p *Properties, base structPointer) (n int) { - v := *structPointer_StringVal(base, p.field) - if v == "" && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeStringBytes(v) - return + siz := Size(pb) + p.EncodeVarint(uint64(siz)) + return p.Marshal(pb) } // All protocol buffer fields are nillable, but be careful. @@ -538,825 +216,3 @@ func isNil(v reflect.Value) bool { } return false } - -// Encode a message struct. -func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { - var state errorState - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return state.err - } - - o.buf = append(o.buf, p.tagcode...) - return o.enc_len_struct(p.sprop, structp, &state) -} - -func size_struct_message(p *Properties, base structPointer) int { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n0 := len(p.tagcode) - n1 := sizeRawBytes(data) - return n0 + n1 - } - - n0 := len(p.tagcode) - n1 := size_struct(p.sprop, structp) - n2 := sizeVarint(uint64(n1)) // size of encoded length - return n0 + n1 + n2 -} - -// Encode a group struct. -func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { - var state errorState - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return ErrNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - err := o.enc_struct(p.sprop, b) - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return state.err -} - -func size_struct_group(p *Properties, base structPointer) (n int) { - b := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(b) { - return 0 - } - - n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) - n += size_struct(p.sprop, b) - n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) - return -} - -// Encode a slice of bools ([]bool). -func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - for _, x := range s { - o.buf = append(o.buf, p.tagcode...) - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_bool(p *Properties, base structPointer) int { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - return l * (len(p.tagcode) + 1) // each bool takes exactly one byte -} - -// Encode a slice of bools ([]bool) in packed format. -func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(l)) // each bool takes exactly one byte - for _, x := range s { - v := uint64(0) - if x { - v = 1 - } - p.valEnc(o, v) - } - return nil -} - -func size_slice_packed_bool(p *Properties, base structPointer) (n int) { - s := *structPointer_BoolSlice(base, p.field) - l := len(s) - if l == 0 { - return 0 - } - n += len(p.tagcode) - n += sizeVarint(uint64(l)) - n += l // each bool takes exactly one byte - return -} - -// Encode a slice of bytes ([]byte). -func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(s) - return nil -} - -func size_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if s == nil && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if len(s) == 0 && !p.oneof { - return 0 - } - n += len(p.tagcode) - n += sizeRawBytes(s) - return -} - -// Encode a slice of int32s ([]int32). -func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of int32s ([]int32) in packed format. -func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - p.valEnc(buf, uint64(x)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - x := int32(s.Index(i)) // permit sign extension to use full 64-bit range - bufSize += p.valSize(uint64(x)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of uint32s ([]uint32). -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - x := s.Index(i) - p.valEnc(o, uint64(x)) - } - return nil -} - -func size_slice_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - x := s.Index(i) - n += p.valSize(uint64(x)) - } - return -} - -// Encode a slice of uint32s ([]uint32) in packed format. -// Exactly the same as int32, except for no sign extension. -func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, uint64(s.Index(i))) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { - s := structPointer_Word32Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(uint64(s.Index(i))) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of int64s ([]int64). -func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, s.Index(i)) - } - return nil -} - -func size_slice_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - for i := 0; i < l; i++ { - n += len(p.tagcode) - n += p.valSize(s.Index(i)) - } - return -} - -// Encode a slice of int64s ([]int64) in packed format. -func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return ErrNil - } - // TODO: Reuse a Buffer. - buf := NewBuffer(nil) - for i := 0; i < l; i++ { - p.valEnc(buf, s.Index(i)) - } - - o.buf = append(o.buf, p.tagcode...) - o.EncodeVarint(uint64(len(buf.buf))) - o.buf = append(o.buf, buf.buf...) - return nil -} - -func size_slice_packed_int64(p *Properties, base structPointer) (n int) { - s := structPointer_Word64Slice(base, p.field) - l := s.Len() - if l == 0 { - return 0 - } - var bufSize int - for i := 0; i < l; i++ { - bufSize += p.valSize(s.Index(i)) - } - - n += len(p.tagcode) - n += sizeVarint(uint64(bufSize)) - n += bufSize - return -} - -// Encode a slice of slice of bytes ([][]byte). -func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return ErrNil - } - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(ss[i]) - } - return nil -} - -func size_slice_slice_byte(p *Properties, base structPointer) (n int) { - ss := *structPointer_BytesSlice(base, p.field) - l := len(ss) - if l == 0 { - return 0 - } - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeRawBytes(ss[i]) - } - return -} - -// Encode a slice of strings ([]string). -func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - for i := 0; i < l; i++ { - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(ss[i]) - } - return nil -} - -func size_slice_string(p *Properties, base structPointer) (n int) { - ss := *structPointer_StringSlice(base, p.field) - l := len(ss) - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - n += sizeStringBytes(ss[i]) - } - return -} - -// Encode a slice of message structs ([]*struct). -func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return errRepeatedHasNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - continue - } - - o.buf = append(o.buf, p.tagcode...) - err := o.enc_len_struct(p.sprop, structp, &state) - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - } - return state.err -} - -func size_slice_struct_message(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - structp := s.Index(i) - if structPointer_IsNil(structp) { - return // return the size up to this point - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n += sizeRawBytes(data) - continue - } - - n0 := size_struct(p.sprop, structp) - n1 := sizeVarint(uint64(n0)) // size of encoded length - n += n0 + n1 - } - return -} - -// Encode a slice of group structs ([]*struct). -func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { - var state errorState - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return errRepeatedHasNil - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) - - err := o.enc_struct(p.sprop, b) - - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - - o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) - } - return state.err -} - -func size_slice_struct_group(p *Properties, base structPointer) (n int) { - s := structPointer_StructPointerSlice(base, p.field) - l := s.Len() - - n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) - n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) - for i := 0; i < l; i++ { - b := s.Index(i) - if structPointer_IsNil(b) { - return // return size up to this point - } - - n += size_struct(p.sprop, b) - } - return -} - -// Encode an extension map. -func (o *Buffer) enc_map(p *Properties, base structPointer) error { - exts := structPointer_ExtMap(base, p.field) - if err := encodeExtensionsMap(*exts); err != nil { - return err - } - - return o.enc_map_body(*exts) -} - -func (o *Buffer) enc_exts(p *Properties, base structPointer) error { - exts := structPointer_Extensions(base, p.field) - - v, mu := exts.extensionsRead() - if v == nil { - return nil - } - - mu.Lock() - defer mu.Unlock() - if err := encodeExtensionsMap(v); err != nil { - return err - } - - return o.enc_map_body(v) -} - -func (o *Buffer) enc_map_body(v map[int32]Extension) error { - // Fast-path for common cases: zero or one extensions. - if len(v) <= 1 { - for _, e := range v { - o.buf = append(o.buf, e.enc...) - } - return nil - } - - // Sort keys to provide a deterministic encoding. - keys := make([]int, 0, len(v)) - for k := range v { - keys = append(keys, int(k)) - } - sort.Ints(keys) - - for _, k := range keys { - o.buf = append(o.buf, v[int32(k)].enc...) - } - return nil -} - -func size_map(p *Properties, base structPointer) int { - v := structPointer_ExtMap(base, p.field) - return extensionsMapSize(*v) -} - -func size_exts(p *Properties, base structPointer) int { - v := structPointer_Extensions(base, p.field) - return extensionsSize(v) -} - -// Encode a map field. -func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { - var state errorState // XXX: or do we need to plumb this through? - - /* - A map defined as - map map_field = N; - is encoded in the same way as - message MapFieldEntry { - key_type key = 1; - value_type value = 2; - } - repeated MapFieldEntry map_field = N; - */ - - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - if v.Len() == 0 { - return nil - } - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - enc := func() error { - if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { - return err - } - if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil { - return err - } - return nil - } - - // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - - keycopy.Set(key) - valcopy.Set(val) - - o.buf = append(o.buf, p.tagcode...) - if err := o.enc_len_thing(enc, &state); err != nil { - return err - } - } - return nil -} - -func size_new_map(p *Properties, base structPointer) int { - v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V - - keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) - - n := 0 - for _, key := range v.MapKeys() { - val := v.MapIndex(key) - keycopy.Set(key) - valcopy.Set(val) - - // Tag codes for key and val are the responsibility of the sub-sizer. - keysize := p.mkeyprop.size(p.mkeyprop, keybase) - valsize := p.mvalprop.size(p.mvalprop, valbase) - entry := keysize + valsize - // Add on tag code and length of map entry itself. - n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry - } - return n -} - -// mapEncodeScratch returns a new reflect.Value matching the map's value type, -// and a structPointer suitable for passing to an encoder or sizer. -func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { - // Prepare addressable doubly-indirect placeholders for the key and value types. - // This is needed because the element-type encoders expect **T, but the map iteration produces T. - - keycopy = reflect.New(mapType.Key()).Elem() // addressable K - keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K - keyptr.Set(keycopy.Addr()) // - keybase = toStructPointer(keyptr.Addr()) // **K - - // Value types are more varied and require special handling. - switch mapType.Elem().Kind() { - case reflect.Slice: - // []byte - var dummy []byte - valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte - valbase = toStructPointer(valcopy.Addr()) - case reflect.Ptr: - // message; the generated field type is map[K]*Msg (so V is *Msg), - // so we only need one level of indirection. - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valbase = toStructPointer(valcopy.Addr()) - default: - // everything else - valcopy = reflect.New(mapType.Elem()).Elem() // addressable V - valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V - valptr.Set(valcopy.Addr()) // - valbase = toStructPointer(valptr.Addr()) // **V - } - return -} - -// Encode a struct. -func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { - var state errorState - // Encode fields in tag order so that decoders may use optimizations - // that depend on the ordering. - // https://developers.google.com/protocol-buffers/docs/encoding#order - for _, i := range prop.order { - p := prop.Prop[i] - if p.enc != nil { - err := p.enc(o, p, base) - if err != nil { - if err == ErrNil { - if p.Required && state.err == nil { - state.err = &RequiredNotSetError{p.Name} - } - } else if err == errRepeatedHasNil { - // Give more context to nil values in repeated fields. - return errors.New("repeated field " + p.OrigName + " has nil element") - } else if !state.shouldContinue(err, p) { - return err - } - } - if len(o.buf) > maxMarshalSize { - return ErrTooLarge - } - } - } - - // Do oneof fields. - if prop.oneofMarshaler != nil { - m := structPointer_Interface(base, prop.stype).(Message) - if err := prop.oneofMarshaler(m, o); err == ErrNil { - return errOneofHasNil - } else if err != nil { - return err - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - if len(o.buf)+len(v) > maxMarshalSize { - return ErrTooLarge - } - if len(v) > 0 { - o.buf = append(o.buf, v...) - } - } - - return state.err -} - -func size_struct(prop *StructProperties, base structPointer) (n int) { - for _, i := range prop.order { - p := prop.Prop[i] - if p.size != nil { - n += p.size(p, base) - } - } - - // Add unrecognized fields at the end. - if prop.unrecField.IsValid() { - v := *structPointer_Bytes(base, prop.unrecField) - n += len(v) - } - - // Factor in any oneof fields. - if prop.oneofSizer != nil { - m := structPointer_Interface(base, prop.stype).(Message) - n += prop.oneofSizer(m) - } - - return -} - -var zeroes [20]byte // longer than any conceivable sizeVarint - -// Encode a struct, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { - return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) -} - -// Encode something, preceded by its encoded length (as a varint). -func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { - iLen := len(o.buf) - o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length - iMsg := len(o.buf) - err := enc() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - lMsg := len(o.buf) - iMsg - lLen := sizeVarint(uint64(lMsg)) - switch x := lLen - (iMsg - iLen); { - case x > 0: // actual length is x bytes larger than the space we reserved - // Move msg x bytes right. - o.buf = append(o.buf, zeroes[:x]...) - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - case x < 0: // actual length is x bytes smaller than the space we reserved - // Move msg x bytes left. - copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) - o.buf = o.buf[:len(o.buf)+x] // x is negative - } - // Encode the length in the reserved space. - o.buf = o.buf[:iLen] - o.EncodeVarint(uint64(lMsg)) - o.buf = o.buf[:len(o.buf)+lMsg] - return state.err -} - -// errorState maintains the first error that occurs and updates that error -// with additional context. -type errorState struct { - err error -} - -// shouldContinue reports whether encoding should continue upon encountering the -// given error. If the error is RequiredNotSetError, shouldContinue returns true -// and, if this is the first appearance of that error, remembers it for future -// reporting. -// -// If prop is not nil, it may update any error with additional context about the -// field with the error. -func (s *errorState) shouldContinue(err error, prop *Properties) bool { - // Ignore unset required fields. - reqNotSet, ok := err.(*RequiredNotSetError) - if !ok { - return false - } - if s.err == nil { - if prop != nil { - err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} - } - s.err = err - } - return true -} diff --git a/deps/github.com/gogo/protobuf/proto/encode_gogo.go b/deps/github.com/gogo/protobuf/proto/encode_gogo.go index 32111b7f4..0f5fb173e 100644 --- a/deps/github.com/gogo/protobuf/proto/encode_gogo.go +++ b/deps/github.com/gogo/protobuf/proto/encode_gogo.go @@ -3,11 +3,6 @@ // Copyright (c) 2013, The GoGo Authors. All rights reserved. // http://github.com/gogo/protobuf // -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// http://github.com/golang/protobuf/ -// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -18,9 +13,6 @@ // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -36,315 +28,6 @@ package proto -import ( - "reflect" -) - func NewRequiredNotSetError(field string) *RequiredNotSetError { return &RequiredNotSetError{field} } - -type Sizer interface { - Size() int -} - -func (o *Buffer) enc_ext_slice_byte(p *Properties, base structPointer) error { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return ErrNil - } - o.buf = append(o.buf, s...) - return nil -} - -func size_ext_slice_byte(p *Properties, base structPointer) (n int) { - s := *structPointer_Bytes(base, p.field) - if s == nil { - return 0 - } - n += len(s) - return -} - -// Encode a reference to bool pointer. -func (o *Buffer) enc_ref_bool(p *Properties, base structPointer) error { - v := *structPointer_BoolVal(base, p.field) - x := 0 - if v { - x = 1 - } - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_ref_bool(p *Properties, base structPointer) int { - return len(p.tagcode) + 1 // each bool takes exactly one byte -} - -// Encode a reference to int32 pointer. -func (o *Buffer) enc_ref_int32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_ref_int32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := int32(word32Val_Get(v)) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -func (o *Buffer) enc_ref_uint32(p *Properties, base structPointer) error { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, uint64(x)) - return nil -} - -func size_ref_uint32(p *Properties, base structPointer) (n int) { - v := structPointer_Word32Val(base, p.field) - x := word32Val_Get(v) - n += len(p.tagcode) - n += p.valSize(uint64(x)) - return -} - -// Encode a reference to an int64 pointer. -func (o *Buffer) enc_ref_int64(p *Properties, base structPointer) error { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - o.buf = append(o.buf, p.tagcode...) - p.valEnc(o, x) - return nil -} - -func size_ref_int64(p *Properties, base structPointer) (n int) { - v := structPointer_Word64Val(base, p.field) - x := word64Val_Get(v) - n += len(p.tagcode) - n += p.valSize(x) - return -} - -// Encode a reference to a string pointer. -func (o *Buffer) enc_ref_string(p *Properties, base structPointer) error { - v := *structPointer_StringVal(base, p.field) - o.buf = append(o.buf, p.tagcode...) - o.EncodeStringBytes(v) - return nil -} - -func size_ref_string(p *Properties, base structPointer) (n int) { - v := *structPointer_StringVal(base, p.field) - n += len(p.tagcode) - n += sizeStringBytes(v) - return -} - -// Encode a reference to a message struct. -func (o *Buffer) enc_ref_struct_message(p *Properties, base structPointer) error { - var state errorState - structp := structPointer_GetRefStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil - } - - o.buf = append(o.buf, p.tagcode...) - return o.enc_len_struct(p.sprop, structp, &state) -} - -//TODO this is only copied, please fix this -func size_ref_struct_message(p *Properties, base structPointer) int { - structp := structPointer_GetRefStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n0 := len(p.tagcode) - n1 := sizeRawBytes(data) - return n0 + n1 - } - - n0 := len(p.tagcode) - n1 := size_struct(p.sprop, structp) - n2 := sizeVarint(uint64(n1)) // size of encoded length - return n0 + n1 + n2 -} - -// Encode a slice of references to message struct pointers ([]struct). -func (o *Buffer) enc_slice_ref_struct_message(p *Properties, base structPointer) error { - var state errorState - ss := structPointer_StructRefSlice(base, p.field, p.stype.Size()) - l := ss.Len() - for i := 0; i < l; i++ { - structp := ss.Index(i) - if structPointer_IsNil(structp) { - return errRepeatedHasNil - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, err := m.Marshal() - if err != nil && !state.shouldContinue(err, nil) { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - continue - } - - o.buf = append(o.buf, p.tagcode...) - err := o.enc_len_struct(p.sprop, structp, &state) - if err != nil && !state.shouldContinue(err, nil) { - if err == ErrNil { - return errRepeatedHasNil - } - return err - } - - } - return state.err -} - -//TODO this is only copied, please fix this -func size_slice_ref_struct_message(p *Properties, base structPointer) (n int) { - ss := structPointer_StructRefSlice(base, p.field, p.stype.Size()) - l := ss.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - structp := ss.Index(i) - if structPointer_IsNil(structp) { - return // return the size up to this point - } - - // Can the object marshal itself? - if p.isMarshaler { - m := structPointer_Interface(structp, p.stype).(Marshaler) - data, _ := m.Marshal() - n += len(p.tagcode) - n += sizeRawBytes(data) - continue - } - - n0 := size_struct(p.sprop, structp) - n1 := sizeVarint(uint64(n0)) // size of encoded length - n += n0 + n1 - } - return -} - -func (o *Buffer) enc_custom_bytes(p *Properties, base structPointer) error { - i := structPointer_InterfaceRef(base, p.field, p.ctype) - if i == nil { - return ErrNil - } - custom := i.(Marshaler) - data, err := custom.Marshal() - if err != nil { - return err - } - if data == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_custom_bytes(p *Properties, base structPointer) (n int) { - n += len(p.tagcode) - i := structPointer_InterfaceRef(base, p.field, p.ctype) - if i == nil { - return 0 - } - custom := i.(Marshaler) - data, _ := custom.Marshal() - n += sizeRawBytes(data) - return -} - -func (o *Buffer) enc_custom_ref_bytes(p *Properties, base structPointer) error { - custom := structPointer_InterfaceAt(base, p.field, p.ctype).(Marshaler) - data, err := custom.Marshal() - if err != nil { - return err - } - if data == nil { - return ErrNil - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_custom_ref_bytes(p *Properties, base structPointer) (n int) { - n += len(p.tagcode) - i := structPointer_InterfaceAt(base, p.field, p.ctype) - if i == nil { - return 0 - } - custom := i.(Marshaler) - data, _ := custom.Marshal() - n += sizeRawBytes(data) - return -} - -func (o *Buffer) enc_custom_slice_bytes(p *Properties, base structPointer) error { - inter := structPointer_InterfaceRef(base, p.field, p.ctype) - if inter == nil { - return ErrNil - } - slice := reflect.ValueOf(inter) - l := slice.Len() - for i := 0; i < l; i++ { - v := slice.Index(i) - custom := v.Interface().(Marshaler) - data, err := custom.Marshal() - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - } - return nil -} - -func size_custom_slice_bytes(p *Properties, base structPointer) (n int) { - inter := structPointer_InterfaceRef(base, p.field, p.ctype) - if inter == nil { - return 0 - } - slice := reflect.ValueOf(inter) - l := slice.Len() - n += l * len(p.tagcode) - for i := 0; i < l; i++ { - v := slice.Index(i) - custom := v.Interface().(Marshaler) - data, _ := custom.Marshal() - n += sizeRawBytes(data) - } - return -} diff --git a/deps/github.com/gogo/protobuf/proto/encode_test.go b/deps/github.com/gogo/protobuf/proto/encode_test.go new file mode 100644 index 000000000..2176b894d --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/encode_test.go @@ -0,0 +1,84 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build go1.7 + +package proto_test + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + tpb "github.com/gogo/protobuf/proto/proto3_proto" +) + +var ( + blackhole []byte +) + +// Disabled this Benchmark because it is using features (b.Run) from go1.7 and gogoprotobuf still have compatibility with go1.5 +// BenchmarkAny creates increasingly large arbitrary Any messages. The type is always the +// same. +// func BenchmarkAny(b *testing.B) { +// data := make([]byte, 1<<20) +// quantum := 1 << 10 +// for i := uint(0); i <= 10; i++ { +// b.Run(strconv.Itoa(quantum<> 3) - wireType := int(tag & 0x7) - n2, err := size((*ext)[offset+n1:], wireType) - if err != nil { - panic(err) - } - newOffset := offset + n1 + n2 - if fieldNum == theFieldNum { - *ext = append((*ext)[:offset], (*ext)[newOffset:]...) - return offset - } - offset = newOffset - } - return -1 -} - // ClearExtension removes the given extension from pb. func ClearExtension(pb Message, extension *ExtensionDesc) { clearExtension(pb, extension.Field) } func clearExtension(pb Message, fieldNum int32) { - if epb, doki := pb.(extensionsBytes); doki { + if epb, ok := pb.(extensionsBytes); ok { offset := 0 for offset != -1 { offset = deleteExtension(epb, fieldNum, offset) } return } - epb, ok := extendable(pb) - if !ok { + epb, err := extendable(pb) + if err != nil { return } // TODO: Check types, field numbers, etc.? @@ -422,39 +333,33 @@ func clearExtension(pb Message, fieldNum int32) { delete(extmap, fieldNum) } -// GetExtension parses and returns the given extension of pb. -// If the extension is not present and has no default value it returns ErrMissingExtension. +// GetExtension retrieves a proto2 extended field from pb. +// +// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), +// then GetExtension parses the encoded field and returns a Go value of the specified type. +// If the field is not present, then the default value is returned (if one is specified), +// otherwise ErrMissingExtension is reported. +// +// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil), +// then GetExtension returns the raw encoded bytes of the field extension. func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { if epb, doki := pb.(extensionsBytes); doki { ext := epb.GetExtensions() - o := 0 - for o < len(*ext) { - tag, n := DecodeVarint((*ext)[o:]) - fieldNum := int32(tag >> 3) - wireType := int(tag & 0x7) - l, err := size((*ext)[o+n:], wireType) - if err != nil { - return nil, err - } - if int32(fieldNum) == extension.Field { - v, err := decodeExtension((*ext)[o:o+n+l], extension) - if err != nil { - return nil, err - } - return v, nil - } - o += n + l - } - return defaultExtensionValue(extension) + return decodeExtensionFromBytes(extension, *ext) } - epb, ok := extendable(pb) - if !ok { - return nil, errors.New("proto: not an extendable proto") - } - if err := checkExtensionTypes(epb, extension); err != nil { + + epb, err := extendable(pb) + if err != nil { return nil, err } + if extension.ExtendedType != nil { + // can only check type if this is a complete descriptor + if cerr := checkExtensionTypes(epb, extension); cerr != nil { + return nil, cerr + } + } + emap, mu := epb.extensionsRead() if emap == nil { return defaultExtensionValue(extension) @@ -479,6 +384,11 @@ func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { return e.value, nil } + if extension.ExtensionType == nil { + // incomplete descriptor + return e.enc, nil + } + v, err := decodeExtension(e.enc, extension) if err != nil { return nil, err @@ -496,6 +406,11 @@ func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { // defaultExtensionValue returns the default value for extension. // If no default for an extension is defined ErrMissingExtension is returned. func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + if extension.ExtensionType == nil { + // incomplete descriptor, so no default + return nil, ErrMissingExtension + } + t := reflect.TypeOf(extension.ExtensionType) props := extensionProperties(extension) @@ -530,31 +445,28 @@ func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { // decodeExtension decodes an extension encoded in b. func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { - o := NewBuffer(b) - t := reflect.TypeOf(extension.ExtensionType) - - props := extensionProperties(extension) + unmarshal := typeUnmarshaler(t, extension.Tag) // t is a pointer to a struct, pointer to basic type or a slice. - // Allocate a "field" to store the pointer/slice itself; the - // pointer/slice will be stored here. We pass - // the address of this field to props.dec. - // This passes a zero field and a *t and lets props.dec - // interpret it as a *struct{ x t }. + // Allocate space to store the pointer/slice. value := reflect.New(t).Elem() + var err error for { - // Discard wire type and field number varint. It isn't needed. - if _, err := o.DecodeVarint(); err != nil { - return nil, err + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF } + b = b[n:] + wire := int(x) & 7 - if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil { + b, err = unmarshal(b, valToPointer(value.Addr()), wire) + if err != nil { return nil, err } - if o.index >= len(o.buf) { + if len(b) == 0 { break } } @@ -564,9 +476,13 @@ func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { // GetExtensions returns a slice of the extensions present in pb that are also listed in es. // The returned slice has the same length as es; missing extensions will appear as nil elements. func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } extensions = make([]interface{}, len(es)) for i, e := range es { - extensions[i], err = GetExtension(pb, e) + extensions[i], err = GetExtension(epb, e) if err == ErrMissingExtension { err = nil } @@ -581,9 +497,9 @@ func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, e // For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing // just the Field field, which defines the extension's field number. func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { - epb, ok := extendable(pb) - if !ok { - return nil, fmt.Errorf("proto: %T is not an extendable proto.Message", pb) + epb, err := extendable(pb) + if err != nil { + return nil, err } registeredExtensions := RegisteredExtensions(pb) @@ -610,23 +526,18 @@ func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { // SetExtension sets the specified extension of pb to the specified value. func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { - if epb, doki := pb.(extensionsBytes); doki { - ClearExtension(pb, extension) - ext := epb.GetExtensions() - et := reflect.TypeOf(extension.ExtensionType) - props := extensionProperties(extension) - p := NewBuffer(nil) - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(value)) - if err := props.enc(p, props, toStructPointer(x)); err != nil { + if epb, ok := pb.(extensionsBytes); ok { + newb, err := encodeExtension(extension, value) + if err != nil { return err } - *ext = append(*ext, p.buf...) + bb := epb.GetExtensions() + *bb = append(*bb, newb...) return nil } - epb, ok := extendable(pb) - if !ok { - return errors.New("proto: not an extendable proto") + epb, err := extendable(pb) + if err != nil { + return err } if err := checkExtensionTypes(epb, extension); err != nil { return err @@ -656,8 +567,8 @@ func ClearAllExtensions(pb Message) { *ext = []byte{} return } - epb, ok := extendable(pb) - if !ok { + epb, err := extendable(pb) + if err != nil { return } m := epb.extensionsWrite() diff --git a/deps/github.com/gogo/protobuf/proto/extensions_gogo.go b/deps/github.com/gogo/protobuf/proto/extensions_gogo.go index ea6478f00..53ebd8cca 100644 --- a/deps/github.com/gogo/protobuf/proto/extensions_gogo.go +++ b/deps/github.com/gogo/protobuf/proto/extensions_gogo.go @@ -32,12 +32,36 @@ import ( "bytes" "errors" "fmt" + "io" "reflect" "sort" "strings" "sync" ) +type extensionsBytes interface { + Message + ExtensionRangeArray() []ExtensionRange + GetExtensions() *[]byte +} + +type slowExtensionAdapter struct { + extensionsBytes +} + +func (s slowExtensionAdapter) extensionsWrite() map[int32]Extension { + panic("Please report a bug to github.com/gogo/protobuf if you see this message: Writing extensions is not supported for extensions stored in a byte slice field.") +} + +func (s slowExtensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + b := s.GetExtensions() + m, err := BytesToExtensionsMap(*b) + if err != nil { + panic(err) + } + return m, notLocker{} +} + func GetBoolExtension(pb Message, extension *ExtensionDesc, ifnotset bool) bool { if reflect.ValueOf(pb).IsNil() { return ifnotset @@ -56,19 +80,28 @@ func GetBoolExtension(pb Message, extension *ExtensionDesc, ifnotset bool) bool } func (this *Extension) Equal(that *Extension) bool { + if err := this.Encode(); err != nil { + return false + } + if err := that.Encode(); err != nil { + return false + } return bytes.Equal(this.enc, that.enc) } func (this *Extension) Compare(that *Extension) int { + if err := this.Encode(); err != nil { + return 1 + } + if err := that.Encode(); err != nil { + return -1 + } return bytes.Compare(this.enc, that.enc) } func SizeOfInternalExtension(m extendableProto) (n int) { - return SizeOfExtensionMap(m.extensionsWrite()) -} - -func SizeOfExtensionMap(m map[int32]Extension) (n int) { - return extensionsMapSize(m) + info := getMarshalInfo(reflect.TypeOf(m)) + return info.sizeV1Extensions(m.extensionsWrite()) } type sortableMapElem struct { @@ -122,28 +155,26 @@ func EncodeInternalExtension(m extendableProto, data []byte) (n int, err error) } func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) { - if err := encodeExtensionsMap(m); err != nil { - return 0, err - } - keys := make([]int, 0, len(m)) - for k := range m { - keys = append(keys, int(k)) - } - sort.Ints(keys) - for _, k := range keys { - n += copy(data[n:], m[int32(k)].enc) + o := 0 + for _, e := range m { + if err := e.Encode(); err != nil { + return 0, err + } + n := copy(data[o:], e.enc) + if n != len(e.enc) { + return 0, io.ErrShortBuffer + } + o += n } - return n, nil + return o, nil } func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) { - if m[id].value == nil || m[id].desc == nil { - return m[id].enc, nil - } - if err := encodeExtensionsMap(m); err != nil { + e := m[id] + if err := e.Encode(); err != nil { return nil, err } - return m[id].enc, nil + return e.enc, nil } func size(buf []byte, wire int) (int, error) { @@ -218,35 +249,58 @@ func AppendExtension(e Message, tag int32, buf []byte) { } } -func encodeExtension(e *Extension) error { - if e.value == nil || e.desc == nil { - // Extension is only in its encoded form. - return nil +func encodeExtension(extension *ExtensionDesc, value interface{}) ([]byte, error) { + u := getMarshalInfo(reflect.TypeOf(extension.ExtendedType)) + ei := u.getExtElemInfo(extension) + v := value + p := toAddrPointer(&v, ei.isptr) + siz := ei.sizer(p, SizeVarint(ei.wiretag)) + buf := make([]byte, 0, siz) + return ei.marshaler(buf, p, ei.wiretag, false) +} + +func decodeExtensionFromBytes(extension *ExtensionDesc, buf []byte) (interface{}, error) { + o := 0 + for o < len(buf) { + tag, n := DecodeVarint((buf)[o:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + if o+n > len(buf) { + return nil, fmt.Errorf("unable to decode extension") + } + l, err := size((buf)[o+n:], wireType) + if err != nil { + return nil, err + } + if int32(fieldNum) == extension.Field { + if o+n+l > len(buf) { + return nil, fmt.Errorf("unable to decode extension") + } + v, err := decodeExtension((buf)[o:o+n+l], extension) + if err != nil { + return nil, err + } + return v, nil + } + o += n + l } - // We don't skip extensions that have an encoded form set, - // because the extension value may have been mutated after - // the last time this function was called. - - et := reflect.TypeOf(e.desc.ExtensionType) - props := extensionProperties(e.desc) - - p := NewBuffer(nil) - // If e.value has type T, the encoder expects a *struct{ X T }. - // Pass a *T with a zero field and hope it all works out. - x := reflect.New(et) - x.Elem().Set(reflect.ValueOf(e.value)) - if err := props.enc(p, props, toStructPointer(x)); err != nil { - return err + return defaultExtensionValue(extension) +} + +func (this *Extension) Encode() error { + if this.enc == nil { + var err error + this.enc, err = encodeExtension(this.desc, this.value) + if err != nil { + return err + } } - e.enc = p.buf return nil } func (this Extension) GoString() string { - if this.enc == nil { - if err := encodeExtension(&this); err != nil { - panic(err) - } + if err := this.Encode(); err != nil { + return fmt.Sprintf("error encoding extension: %v", err) } return fmt.Sprintf("proto.NewExtension(%#v)", this.enc) } @@ -292,3 +346,23 @@ func GetUnsafeExtensionsMap(extendable Message) map[int32]Extension { pb := extendable.(extendableProto) return pb.extensionsWrite() } + +func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int { + ext := pb.GetExtensions() + for offset < len(*ext) { + tag, n1 := DecodeVarint((*ext)[offset:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + n2, err := size((*ext)[offset+n1:], wireType) + if err != nil { + panic(err) + } + newOffset := offset + n1 + n2 + if fieldNum == theFieldNum { + *ext = append((*ext)[:offset], (*ext)[newOffset:]...) + return offset + } + offset = newOffset + } + return -1 +} diff --git a/deps/github.com/gogo/protobuf/proto/extensions_test.go b/deps/github.com/gogo/protobuf/proto/extensions_test.go new file mode 100644 index 000000000..c126cbb50 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/extensions_test.go @@ -0,0 +1,691 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "bytes" + "fmt" + "io" + "reflect" + "sort" + "strings" + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/proto/test_proto" +) + +func TestGetExtensionsWithMissingExtensions(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", err) + } + exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ + pb.E_Ext_More, + pb.E_Ext_Text, + }) + if err != nil { + t.Fatalf("GetExtensions() failed: %s", err) + } + if exts[0] != ext1 { + t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) + } + if exts[1] != nil { + t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) + } +} + +func TestGetExtensionWithEmptyBuffer(t *testing.T) { + // Make sure that GetExtension returns an error if its + // undecoded buffer is empty. + msg := &pb.MyMessage{} + proto.SetRawExtension(msg, pb.E_Ext_More.Field, []byte{}) + _, err := proto.GetExtension(msg, pb.E_Ext_More) + if want := io.ErrUnexpectedEOF; err != want { + t.Errorf("unexpected error in GetExtension from empty buffer: got %v, want %v", err, want) + } +} + +func TestGetExtensionForIncompleteDesc(t *testing.T) { + msg := &pb.MyMessage{Count: proto.Int32(0)} + extdesc1 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 123456789, + Name: "a.b", + Tag: "varint,123456789,opt", + } + ext1 := proto.Bool(true) + if err := proto.SetExtension(msg, extdesc1, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", err) + } + extdesc2 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 123456790, + Name: "a.c", + Tag: "bytes,123456790,opt", + } + ext2 := []byte{0, 1, 2, 3, 4, 5, 6, 7} + if err := proto.SetExtension(msg, extdesc2, ext2); err != nil { + t.Fatalf("Could not set ext2: %s", err) + } + extdesc3 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*pb.Ext)(nil), + Field: 123456791, + Name: "a.d", + Tag: "bytes,123456791,opt", + } + ext3 := &pb.Ext{Data: proto.String("foo")} + if err := proto.SetExtension(msg, extdesc3, ext3); err != nil { + t.Fatalf("Could not set ext3: %s", err) + } + + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Could not marshal msg: %v", err) + } + if err := proto.Unmarshal(b, msg); err != nil { + t.Fatalf("Could not unmarshal into msg: %v", err) + } + + var expected proto.Buffer + if err := expected.EncodeVarint(uint64((extdesc1.Field << 3) | proto.WireVarint)); err != nil { + t.Fatalf("failed to compute expected prefix for ext1: %s", err) + } + if err := expected.EncodeVarint(1 /* bool true */); err != nil { + t.Fatalf("failed to compute expected value for ext1: %s", err) + } + + if b, err := proto.GetExtension(msg, &proto.ExtensionDesc{Field: extdesc1.Field}); err != nil { + t.Fatalf("Failed to get raw value for ext1: %s", err) + } else if !reflect.DeepEqual(b, expected.Bytes()) { + t.Fatalf("Raw value for ext1: got %v, want %v", b, expected.Bytes()) + } + + expected = proto.Buffer{} // reset + if err := expected.EncodeVarint(uint64((extdesc2.Field << 3) | proto.WireBytes)); err != nil { + t.Fatalf("failed to compute expected prefix for ext2: %s", err) + } + if err := expected.EncodeRawBytes(ext2); err != nil { + t.Fatalf("failed to compute expected value for ext2: %s", err) + } + + if b, err := proto.GetExtension(msg, &proto.ExtensionDesc{Field: extdesc2.Field}); err != nil { + t.Fatalf("Failed to get raw value for ext2: %s", err) + } else if !reflect.DeepEqual(b, expected.Bytes()) { + t.Fatalf("Raw value for ext2: got %v, want %v", b, expected.Bytes()) + } + + expected = proto.Buffer{} // reset + if err := expected.EncodeVarint(uint64((extdesc3.Field << 3) | proto.WireBytes)); err != nil { + t.Fatalf("failed to compute expected prefix for ext3: %s", err) + } + if b, err := proto.Marshal(ext3); err != nil { + t.Fatalf("failed to compute expected value for ext3: %s", err) + } else if err := expected.EncodeRawBytes(b); err != nil { + t.Fatalf("failed to compute expected value for ext3: %s", err) + } + + if b, err := proto.GetExtension(msg, &proto.ExtensionDesc{Field: extdesc3.Field}); err != nil { + t.Fatalf("Failed to get raw value for ext3: %s", err) + } else if !reflect.DeepEqual(b, expected.Bytes()) { + t.Fatalf("Raw value for ext3: got %v, want %v", b, expected.Bytes()) + } +} + +func TestExtensionDescsWithUnregisteredExtensions(t *testing.T) { + msg := &pb.MyMessage{Count: proto.Int32(0)} + extdesc1 := pb.E_Ext_More + if descs, err := proto.ExtensionDescs(msg); len(descs) != 0 || err != nil { + t.Errorf("proto.ExtensionDescs: got %d descs, error %v; want 0, nil", len(descs), err) + } + + ext1 := &pb.Ext{} + if err := proto.SetExtension(msg, extdesc1, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", err) + } + extdesc2 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 123456789, + Name: "a.b", + Tag: "varint,123456789,opt", + } + ext2 := proto.Bool(false) + if err := proto.SetExtension(msg, extdesc2, ext2); err != nil { + t.Fatalf("Could not set ext2: %s", err) + } + + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Could not marshal msg: %v", err) + } + if err = proto.Unmarshal(b, msg); err != nil { + t.Fatalf("Could not unmarshal into msg: %v", err) + } + + descs, err := proto.ExtensionDescs(msg) + if err != nil { + t.Fatalf("proto.ExtensionDescs: got error %v", err) + } + sortExtDescs(descs) + wantDescs := []*proto.ExtensionDesc{extdesc1, {Field: extdesc2.Field}} + if !reflect.DeepEqual(descs, wantDescs) { + t.Errorf("proto.ExtensionDescs(msg) sorted extension ids: got %+v, want %+v", descs, wantDescs) + } +} + +type ExtensionDescSlice []*proto.ExtensionDesc + +func (s ExtensionDescSlice) Len() int { return len(s) } +func (s ExtensionDescSlice) Less(i, j int) bool { return s[i].Field < s[j].Field } +func (s ExtensionDescSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +func sortExtDescs(s []*proto.ExtensionDesc) { + sort.Sort(ExtensionDescSlice(s)) +} + +func TestGetExtensionStability(t *testing.T) { + check := func(m *pb.MyMessage) bool { + ext1, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + ext2, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + return ext1 == ext2 + } + msg := &pb.MyMessage{Count: proto.Int32(4)} + ext0 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { + t.Fatalf("Could not set ext1: %s", ext0) + } + if !check(msg) { + t.Errorf("GetExtension() not stable before marshaling") + } + bb, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Marshal() failed: %s", err) + } + msg1 := &pb.MyMessage{} + err = proto.Unmarshal(bb, msg1) + if err != nil { + t.Fatalf("Unmarshal() failed: %s", err) + } + if !check(msg1) { + t.Errorf("GetExtension() not stable after unmarshaling") + } +} + +func TestGetExtensionDefaults(t *testing.T) { + var setFloat64 float64 = 1 + var setFloat32 float32 = 2 + var setInt32 int32 = 3 + var setInt64 int64 = 4 + var setUint32 uint32 = 5 + var setUint64 uint64 = 6 + var setBool = true + var setBool2 = false + var setString = "Goodnight string" + var setBytes = []byte("Goodnight bytes") + var setEnum = pb.DefaultsMessage_TWO + + type testcase struct { + ext *proto.ExtensionDesc // Extension we are testing. + want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). + def interface{} // Expected value of extension after ClearExtension(). + } + tests := []testcase{ + {pb.E_NoDefaultDouble, setFloat64, nil}, + {pb.E_NoDefaultFloat, setFloat32, nil}, + {pb.E_NoDefaultInt32, setInt32, nil}, + {pb.E_NoDefaultInt64, setInt64, nil}, + {pb.E_NoDefaultUint32, setUint32, nil}, + {pb.E_NoDefaultUint64, setUint64, nil}, + {pb.E_NoDefaultSint32, setInt32, nil}, + {pb.E_NoDefaultSint64, setInt64, nil}, + {pb.E_NoDefaultFixed32, setUint32, nil}, + {pb.E_NoDefaultFixed64, setUint64, nil}, + {pb.E_NoDefaultSfixed32, setInt32, nil}, + {pb.E_NoDefaultSfixed64, setInt64, nil}, + {pb.E_NoDefaultBool, setBool, nil}, + {pb.E_NoDefaultBool, setBool2, nil}, + {pb.E_NoDefaultString, setString, nil}, + {pb.E_NoDefaultBytes, setBytes, nil}, + {pb.E_NoDefaultEnum, setEnum, nil}, + {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, + {pb.E_DefaultFloat, setFloat32, float32(3.14)}, + {pb.E_DefaultInt32, setInt32, int32(42)}, + {pb.E_DefaultInt64, setInt64, int64(43)}, + {pb.E_DefaultUint32, setUint32, uint32(44)}, + {pb.E_DefaultUint64, setUint64, uint64(45)}, + {pb.E_DefaultSint32, setInt32, int32(46)}, + {pb.E_DefaultSint64, setInt64, int64(47)}, + {pb.E_DefaultFixed32, setUint32, uint32(48)}, + {pb.E_DefaultFixed64, setUint64, uint64(49)}, + {pb.E_DefaultSfixed32, setInt32, int32(50)}, + {pb.E_DefaultSfixed64, setInt64, int64(51)}, + {pb.E_DefaultBool, setBool, true}, + {pb.E_DefaultBool, setBool2, true}, + {pb.E_DefaultString, setString, "Hello, string,def=foo"}, + {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, + {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, + } + + checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { + val, err := proto.GetExtension(msg, test.ext) + if err != nil { + if valWant != nil { + return fmt.Errorf("GetExtension(): %s", err) + } + if want := proto.ErrMissingExtension; err != want { + return fmt.Errorf("Unexpected error: got %v, want %v", err, want) + } + return nil + } + + // All proto2 extension values are either a pointer to a value or a slice of values. + ty := reflect.TypeOf(val) + tyWant := reflect.TypeOf(test.ext.ExtensionType) + if got, want := ty, tyWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) + } + tye := ty.Elem() + tyeWant := tyWant.Elem() + if got, want := tye, tyeWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) + } + + // Check the name of the type of the value. + // If it is an enum it will be type int32 with the name of the enum. + if got, want := tye.Name(), tye.Name(); got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) + } + + // Check that value is what we expect. + // If we have a pointer in val, get the value it points to. + valExp := val + if ty.Kind() == reflect.Ptr { + valExp = reflect.ValueOf(val).Elem().Interface() + } + if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { + return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) + } + + return nil + } + + setTo := func(test testcase) interface{} { + setTo := reflect.ValueOf(test.want) + if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { + setTo = reflect.New(typ).Elem() + setTo.Set(reflect.New(setTo.Type().Elem())) + setTo.Elem().Set(reflect.ValueOf(test.want)) + } + return setTo.Interface() + } + + for _, test := range tests { + msg := &pb.DefaultsMessage{} + name := test.ext.Name + + // Check the initial value. + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + + // Set the per-type value and check value. + name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) + if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { + t.Errorf("%s: SetExtension(): %v", name, err) + continue + } + if err := checkVal(test, msg, test.want); err != nil { + t.Errorf("%s: %v", name, err) + continue + } + + // Set and check the value. + name += " (cleared)" + proto.ClearExtension(msg, test.ext) + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + } +} + +func TestNilMessage(t *testing.T) { + name := "nil interface" + if got, err := proto.GetExtension(nil, pb.E_Ext_More); err == nil { + t.Errorf("%s: got %T %v, expected to fail", name, got, got) + } else if !strings.Contains(err.Error(), "extendable") { + t.Errorf("%s: got error %v, expected not-extendable error", name, err) + } + + // Regression tests: all functions of the Extension API + // used to panic when passed (*M)(nil), where M is a concrete message + // type. Now they handle this gracefully as a no-op or reported error. + var nilMsg *pb.MyMessage + desc := pb.E_Ext_More + + isNotExtendable := func(err error) bool { + return strings.Contains(fmt.Sprint(err), "not extendable") + } + + if proto.HasExtension(nilMsg, desc) { + t.Error("HasExtension(nil) = true") + } + + if _, err := proto.GetExtensions(nilMsg, []*proto.ExtensionDesc{desc}); !isNotExtendable(err) { + t.Errorf("GetExtensions(nil) = %q (wrong error)", err) + } + + if _, err := proto.ExtensionDescs(nilMsg); !isNotExtendable(err) { + t.Errorf("ExtensionDescs(nil) = %q (wrong error)", err) + } + + if err := proto.SetExtension(nilMsg, desc, nil); !isNotExtendable(err) { + t.Errorf("SetExtension(nil) = %q (wrong error)", err) + } + + proto.ClearExtension(nilMsg, desc) // no-op + proto.ClearAllExtensions(nilMsg) // no-op +} + +func TestExtensionsRoundTrip(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{ + Data: proto.String("hi"), + } + ext2 := &pb.Ext{ + Data: proto.String("there"), + } + exists := proto.HasExtension(msg, pb.E_Ext_More) + if exists { + t.Error("Extension More present unexpectedly") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Error(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { + t.Error(err) + } + e, err := proto.GetExtension(msg, pb.E_Ext_More) + if err != nil { + t.Error(err) + } + x, ok := e.(*pb.Ext) + if !ok { + t.Errorf("e has type %T, expected test_proto.Ext", e) + } else if *x.Data != "there" { + t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) + } + proto.ClearExtension(msg, pb.E_Ext_More) + if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { + t.Errorf("got %v, expected ErrMissingExtension", e) + } + if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { + t.Error("expected bad extension error, got nil") + } + if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { + t.Error("expected extension err") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { + t.Error("expected some sort of type mismatch error, got nil") + } +} + +func TestNilExtension(t *testing.T) { + msg := &pb.MyMessage{ + Count: proto.Int32(1), + } + if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { + t.Fatal(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { + t.Error("expected SetExtension to fail due to a nil extension") + } else if want := fmt.Sprintf("proto: SetExtension called with nil value of type %T", new(pb.Ext)); err.Error() != want { + t.Errorf("expected error %v, got %v", want, err) + } + // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update + // this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal. +} + +func TestMarshalUnmarshalRepeatedExtension(t *testing.T) { + // Add a repeated extension to the result. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + // Marshal message with a repeated extension. + msg1 := new(pb.OtherMessage) + err := proto.SetExtension(msg1, pb.E_RComplex, test.ext) + if err != nil { + t.Fatalf("[%s] Error setting extension: %v", test.name, err) + } + b, err := proto.Marshal(msg1) + if err != nil { + t.Fatalf("[%s] Error marshaling message: %v", test.name, err) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err = proto.Unmarshal(b, msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_RComplex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.([]*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if len(ext) != len(test.ext) { + t.Errorf("[%s] Wrong length of ComplexExtension: got: %v want: %v\n", test.name, len(ext), len(test.ext)) + } + for i := range test.ext { + if !proto.Equal(ext[i], test.ext[i]) { + t.Errorf("[%s] Wrong value for ComplexExtension[%d]: got: %v want: %v\n", test.name, i, ext[i], test.ext[i]) + } + } + } +} + +func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) { + // We may see multiple instances of the same extension in the wire + // format. For example, the proto compiler may encode custom options in + // this way. Here, we verify that we merge the extensions together. + tests := []struct { + name string + ext []*pb.ComplexExtension + }{ + { + "two fields", + []*pb.ComplexExtension{ + {First: proto.Int32(7)}, + {Second: proto.Int32(11)}, + }, + }, + { + "repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {Third: []int32{2000}}, + }, + }, + { + "two fields and repeated field", + []*pb.ComplexExtension{ + {Third: []int32{1000}}, + {First: proto.Int32(9)}, + {Second: proto.Int32(21)}, + {Third: []int32{2000}}, + }, + }, + } + for _, test := range tests { + var buf bytes.Buffer + var want pb.ComplexExtension + + // Generate a serialized representation of a repeated extension + // by catenating bytes together. + for i, e := range test.ext { + // Merge to create the wanted proto. + proto.Merge(&want, e) + + // serialize the message + msg := new(pb.OtherMessage) + err := proto.SetExtension(msg, pb.E_Complex, e) + if err != nil { + t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err) + } + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err) + } + buf.Write(b) + } + + // Unmarshal and read the merged proto. + msg2 := new(pb.OtherMessage) + err := proto.Unmarshal(buf.Bytes(), msg2) + if err != nil { + t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) + } + e, err := proto.GetExtension(msg2, pb.E_Complex) + if err != nil { + t.Fatalf("[%s] Error getting extension: %v", test.name, err) + } + ext := e.(*pb.ComplexExtension) + if ext == nil { + t.Fatalf("[%s] Invalid extension", test.name) + } + if !proto.Equal(ext, &want) { + t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, &want) + + } + } +} + +func TestClearAllExtensions(t *testing.T) { + // unregistered extension + desc := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 101010100, + Name: "emptyextension", + Tag: "varint,0,opt", + } + m := &pb.MyMessage{} + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } + if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { + t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + if !proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got false, want true", proto.MarshalTextString(m)) + } + proto.ClearAllExtensions(m) + if proto.HasExtension(m, desc) { + t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) + } +} + +func TestMarshalRace(t *testing.T) { + ext := &pb.Ext{} + m := &pb.MyMessage{Count: proto.Int32(4)} + if err := proto.SetExtension(m, pb.E_Ext_More, ext); err != nil { + t.Fatalf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + + b, err := proto.Marshal(m) + if err != nil { + t.Fatalf("Could not marshal message: %v", err) + } + if err := proto.Unmarshal(b, m); err != nil { + t.Fatalf("Could not unmarshal message: %v", err) + } + // after Unmarshal, the extension is in undecoded form. + // GetExtension will decode it lazily. Make sure this does + // not race against Marshal. + + errChan := make(chan error, 6) + for n := 3; n > 0; n-- { + go func() { + _, err := proto.Marshal(m) + errChan <- err + }() + go func() { + _, err := proto.GetExtension(m, pb.E_Ext_More) + errChan <- err + }() + } + for i := 0; i < 6; i++ { + err := <-errChan + if err != nil { + t.Fatal(err) + } + } +} diff --git a/deps/github.com/gogo/protobuf/proto/lib.go b/deps/github.com/gogo/protobuf/proto/lib.go index 7580bb45c..37d178132 100644 --- a/deps/github.com/gogo/protobuf/proto/lib.go +++ b/deps/github.com/gogo/protobuf/proto/lib.go @@ -73,7 +73,6 @@ for a protocol buffer variable v: When the .proto file specifies `syntax="proto3"`, there are some differences: - Non-repeated fields of non-message type are values instead of pointers. - - Getters are only generated for message and oneof fields. - Enum types do not get an Enum method. The simplest way to describe this is to see an example. @@ -266,6 +265,7 @@ package proto import ( "encoding/json" + "errors" "fmt" "log" "reflect" @@ -274,6 +274,8 @@ import ( "sync" ) +var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string") + // Message is implemented by generated protocol buffer messages. type Message interface { Reset() @@ -310,16 +312,7 @@ type Buffer struct { buf []byte // encode/decode byte stream index int // read point - // pools of basic types to amortize allocation. - bools []bool - uint32s []uint32 - uint64s []uint64 - - // extra pools, only used with pointer_reflect.go - int32s []int32 - int64s []int64 - float32s []float32 - float64s []float64 + deterministic bool } // NewBuffer allocates a new Buffer and initializes its internal data to @@ -344,6 +337,30 @@ func (p *Buffer) SetBuf(s []byte) { // Bytes returns the contents of the Buffer. func (p *Buffer) Bytes() []byte { return p.buf } +// SetDeterministic sets whether to use deterministic serialization. +// +// Deterministic serialization guarantees that for a given binary, equal +// messages will always be serialized to the same bytes. This implies: +// +// - Repeated serialization of a message will return the same bytes. +// - Different processes of the same binary (which may be executing on +// different machines) will serialize equal messages to the same bytes. +// +// Note that the deterministic serialization is NOT canonical across +// languages. It is not guaranteed to remain stable over time. It is unstable +// across different builds with schema changes due to unknown fields. +// Users who need canonical serialization (e.g., persistent storage in a +// canonical form, fingerprinting, etc.) should define their own +// canonicalization specification and implement their own serializer rather +// than relying on this API. +// +// If deterministic serialization is requested, map entries will be sorted +// by keys in lexographical order. This is an implementation detail and +// subject to change. +func (p *Buffer) SetDeterministic(deterministic bool) { + p.deterministic = deterministic +} + /* * Helper routines for simplifying the creation of optional fields of basic type. */ @@ -553,9 +570,11 @@ func SetDefaults(pb Message) { setDefaults(reflect.ValueOf(pb), true, false) } -// v is a pointer to a struct. +// v is a struct. func setDefaults(v reflect.Value, recur, zeros bool) { - v = v.Elem() + if v.Kind() == reflect.Ptr { + v = v.Elem() + } defaultMu.RLock() dm, ok := defaults[v.Type()] @@ -657,8 +676,11 @@ func setDefaults(v reflect.Value, recur, zeros bool) { for _, ni := range dm.nested { f := v.Field(ni) - // f is *T or []*T or map[T]*T + // f is *T or T or []*T or []T switch f.Kind() { + case reflect.Struct: + setDefaults(f, recur, zeros) + case reflect.Ptr: if f.IsNil() { continue @@ -668,7 +690,7 @@ func setDefaults(v reflect.Value, recur, zeros bool) { case reflect.Slice: for i := 0; i < f.Len(); i++ { e := f.Index(i) - if e.IsNil() { + if e.Kind() == reflect.Ptr && e.IsNil() { continue } setDefaults(e, recur, zeros) @@ -740,6 +762,9 @@ func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { var canHaveDefault bool switch ft.Kind() { + case reflect.Struct: + nestedMessage = true // non-nullable + case reflect.Ptr: if ft.Elem().Kind() == reflect.Struct { nestedMessage = true @@ -749,7 +774,7 @@ func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMes case reflect.Slice: switch ft.Elem().Kind() { - case reflect.Ptr: + case reflect.Ptr, reflect.Struct: nestedMessage = true // repeated message case reflect.Uint8: canHaveDefault = true // bytes field @@ -832,22 +857,12 @@ func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMes return sf, false, nil } +// mapKeys returns a sort.Interface to be used for sorting the map keys. // Map fields may have key types of non-float scalars, strings and enums. -// The easiest way to sort them in some deterministic order is to use fmt. -// If this turns out to be inefficient we can always consider other options, -// such as doing a Schwartzian transform. - func mapKeys(vs []reflect.Value) sort.Interface { - s := mapKeySorter{ - vs: vs, - // default Less function: textual comparison - less: func(a, b reflect.Value) bool { - return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) - }, - } + s := mapKeySorter{vs: vs} - // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; - // numeric keys are sorted numerically. + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps. if len(vs) == 0 { return s } @@ -856,6 +871,12 @@ func mapKeys(vs []reflect.Value) sort.Interface { s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } case reflect.Uint32, reflect.Uint64: s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + case reflect.Bool: + s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true + case reflect.String: + s.less = func(a, b reflect.Value) bool { return a.String() < b.String() } + default: + panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind())) } return s @@ -896,3 +917,13 @@ const GoGoProtoPackageIsVersion2 = true // ProtoPackageIsVersion1 is referenced from generated protocol buffer files // to assert that that code is compatible with this version of the proto package. const GoGoProtoPackageIsVersion1 = true + +// InternalMessageInfo is a type used internally by generated .pb.go files. +// This type is not intended to be used by non-generated code. +// This type is not subject to any compatibility guarantee. +type InternalMessageInfo struct { + marshal *marshalInfo + unmarshal *unmarshalInfo + merge *mergeInfo + discard *discardInfo +} diff --git a/deps/github.com/gogo/protobuf/proto/lib_gogo.go b/deps/github.com/gogo/protobuf/proto/lib_gogo.go index 4b4f7c909..b3aa39190 100644 --- a/deps/github.com/gogo/protobuf/proto/lib_gogo.go +++ b/deps/github.com/gogo/protobuf/proto/lib_gogo.go @@ -33,6 +33,14 @@ import ( "strconv" ) +type Sizer interface { + Size() int +} + +type ProtoSizer interface { + ProtoSize() int +} + func MarshalJSONEnum(m map[int32]string, value int32) ([]byte, error) { s, ok := m[value] if !ok { diff --git a/deps/github.com/gogo/protobuf/proto/map_test.go b/deps/github.com/gogo/protobuf/proto/map_test.go new file mode 100644 index 000000000..467791bb7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/map_test.go @@ -0,0 +1,70 @@ +package proto_test + +import ( + "fmt" + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" + ppb "github.com/gogo/protobuf/proto/proto3_proto" +) + +func TestMap(t *testing.T) { + var b []byte + fmt.Sscanf("a2010c0a044b657931120456616c31a201130a044b657932120556616c3261120456616c32a201240a044b6579330d05000000120556616c33621a0556616c3361120456616c331505000000a20100a201260a044b657934130a07536f6d6555524c1209536f6d655469746c651a08536e69707065743114", "%x", &b) + + var m ppb.Message + if err := proto.Unmarshal(b, &m); err != nil { + t.Fatalf("proto.Unmarshal error: %v", err) + } + + got := m.StringMap + want := map[string]string{ + "": "", + "Key1": "Val1", + "Key2": "Val2", + "Key3": "Val3", + "Key4": "", + } + + if !reflect.DeepEqual(got, want) { + t.Errorf("maps differ:\ngot %#v\nwant %#v", got, want) + } +} + +func marshalled() []byte { + m := &ppb.IntMaps{} + for i := 0; i < 1000; i++ { + m.Maps = append(m.Maps, &ppb.IntMap{ + Rtt: map[int32]int32{1: 2}, + }) + } + b, err := proto.Marshal(m) + if err != nil { + panic(fmt.Sprintf("Can't marshal %+v: %v", m, err)) + } + return b +} + +func BenchmarkConcurrentMapUnmarshal(b *testing.B) { + in := marshalled() + b.RunParallel(func(pb *testing.PB) { + for pb.Next() { + var out ppb.IntMaps + if err := proto.Unmarshal(in, &out); err != nil { + b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) + } + } + }) +} + +func BenchmarkSequentialMapUnmarshal(b *testing.B) { + in := marshalled() + b.ResetTimer() + for i := 0; i < b.N; i++ { + var out ppb.IntMaps + if err := proto.Unmarshal(in, &out); err != nil { + b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) + } + } +} diff --git a/deps/github.com/gogo/protobuf/proto/message_set.go b/deps/github.com/gogo/protobuf/proto/message_set.go index fd982decd..3b6ca41d5 100644 --- a/deps/github.com/gogo/protobuf/proto/message_set.go +++ b/deps/github.com/gogo/protobuf/proto/message_set.go @@ -42,6 +42,7 @@ import ( "fmt" "reflect" "sort" + "sync" ) // errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. @@ -94,10 +95,7 @@ func (ms *messageSet) find(pb Message) *_MessageSet_Item { } func (ms *messageSet) Has(pb Message) bool { - if ms.find(pb) != nil { - return true - } - return false + return ms.find(pb) != nil } func (ms *messageSet) Unmarshal(pb Message) error { @@ -150,46 +148,42 @@ func skipVarint(buf []byte) []byte { // MarshalMessageSet encodes the extension map represented by m in the message set wire format. // It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. func MarshalMessageSet(exts interface{}) ([]byte, error) { - var m map[int32]Extension + return marshalMessageSet(exts, false) +} + +// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal. +func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) { switch exts := exts.(type) { case *XXX_InternalExtensions: - if err := encodeExtensions(exts); err != nil { - return nil, err - } - m, _ = exts.extensionsRead() + var u marshalInfo + siz := u.sizeMessageSet(exts) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, exts, deterministic) + case map[int32]Extension: - if err := encodeExtensionsMap(exts); err != nil { - return nil, err + // This is an old-style extension map. + // Wrap it in a new-style XXX_InternalExtensions. + ie := XXX_InternalExtensions{ + p: &struct { + mu sync.Mutex + extensionMap map[int32]Extension + }{ + extensionMap: exts, + }, } - m = exts + + var u marshalInfo + siz := u.sizeMessageSet(&ie) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, &ie, deterministic) + default: return nil, errors.New("proto: not an extension map") } - - // Sort extension IDs to provide a deterministic encoding. - // See also enc_map in encode.go. - ids := make([]int, 0, len(m)) - for id := range m { - ids = append(ids, int(id)) - } - sort.Ints(ids) - - ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} - for _, id := range ids { - e := m[int32(id)] - // Remove the wire type and field number varint, as well as the length varint. - msg := skipVarint(skipVarint(e.enc)) - - ms.Item = append(ms.Item, &_MessageSet_Item{ - TypeId: Int32(int32(id)), - Message: msg, - }) - } - return Marshal(ms) } // UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. -// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. func UnmarshalMessageSet(buf []byte, exts interface{}) error { var m map[int32]Extension switch exts := exts.(type) { @@ -235,7 +229,15 @@ func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { var m map[int32]Extension switch exts := exts.(type) { case *XXX_InternalExtensions: - m, _ = exts.extensionsRead() + var mu sync.Locker + m, mu = exts.extensionsRead() + if m != nil { + // Keep the extensions map locked until we're done marshaling to prevent + // races between marshaling and unmarshaling the lazily-{en,de}coded + // values. + mu.Lock() + defer mu.Unlock() + } case map[int32]Extension: m = exts default: @@ -253,15 +255,16 @@ func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { for i, id := range ids { ext := m[id] - if i > 0 { - b.WriteByte(',') - } - msd, ok := messageSetMap[id] if !ok { // Unknown type; we can't render it, so skip it. continue } + + if i > 0 && b.Len() > 1 { + b.WriteByte(',') + } + fmt.Fprintf(&b, `"[%s]":`, msd.name) x := ext.value diff --git a/deps/github.com/gogo/protobuf/proto/message_set_test.go b/deps/github.com/gogo/protobuf/proto/message_set_test.go new file mode 100644 index 000000000..756cea27a --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/message_set_test.go @@ -0,0 +1,77 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "bytes" + "testing" +) + +func TestUnmarshalMessageSetWithDuplicate(t *testing.T) { + // Check that a repeated message set entry will be concatenated. + in := &messageSet{ + Item: []*_MessageSet_Item{ + {TypeId: Int32(12345), Message: []byte("hoo")}, + {TypeId: Int32(12345), Message: []byte("hah")}, + }, + } + b, err := Marshal(in) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + t.Logf("Marshaled bytes: %q", b) + + var extensions XXX_InternalExtensions + if err := UnmarshalMessageSet(b, &extensions); err != nil { + t.Fatalf("UnmarshalMessageSet: %v", err) + } + ext, ok := extensions.p.extensionMap[12345] + if !ok { + t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap) + } + // Skip wire type/field number and length varints. + got := skipVarint(skipVarint(ext.enc)) + if want := []byte("hoohah"); !bytes.Equal(got, want) { + t.Errorf("Combined extension is %q, want %q", got, want) + } +} + +func TestMarshalMessageSetJSON_UnknownType(t *testing.T) { + extMap := map[int32]Extension{12345: {}} + got, err := MarshalMessageSetJSON(extMap) + if err != nil { + t.Fatalf("MarshalMessageSetJSON: %v", err) + } + if want := []byte("{}"); !bytes.Equal(got, want) { + t.Errorf("MarshalMessageSetJSON(%v) = %q, want %q", extMap, got, want) + } +} diff --git a/deps/github.com/gogo/protobuf/proto/pointer_reflect.go b/deps/github.com/gogo/protobuf/proto/pointer_reflect.go index fb512e2e1..b6cad9083 100644 --- a/deps/github.com/gogo/protobuf/proto/pointer_reflect.go +++ b/deps/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -29,7 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build appengine js +// +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. // It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can @@ -38,32 +38,13 @@ package proto import ( - "math" "reflect" + "sync" ) -// A structPointer is a pointer to a struct. -type structPointer struct { - v reflect.Value -} - -// toStructPointer returns a structPointer equivalent to the given reflect value. -// The reflect value must itself be a pointer to a struct. -func toStructPointer(v reflect.Value) structPointer { - return structPointer{v} -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p.v.IsNil() -} +const unsafeAllowed = false -// Interface returns the struct pointer as an interface value. -func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { - return p.v.Interface() -} - -// A field identifies a field in a struct, accessible from a structPointer. +// A field identifies a field in a struct, accessible from a pointer. // In this implementation, a field is identified by the sequence of field indices // passed to reflect's FieldByIndex. type field []int @@ -76,409 +57,301 @@ func toField(f *reflect.StructField) field { // invalidField is an invalid field identifier. var invalidField = field(nil) +// zeroField is a noop when calling pointer.offset. +var zeroField = field([]int{}) + // IsValid reports whether the field identifier is valid. func (f field) IsValid() bool { return f != nil } -// field returns the given field in the struct as a reflect value. -func structPointer_field(p structPointer, f field) reflect.Value { - // Special case: an extension map entry with a value of type T - // passes a *T to the struct-handling code with a zero field, - // expecting that it will be treated as equivalent to *struct{ X T }, - // which has the same memory layout. We have to handle that case - // specially, because reflect will panic if we call FieldByIndex on a - // non-struct. - if f == nil { - return p.v.Elem() - } - - return p.v.Elem().FieldByIndex(f) +// The pointer type is for the table-driven decoder. +// The implementation here uses a reflect.Value of pointer type to +// create a generic pointer. In pointer_unsafe.go we use unsafe +// instead of reflect to implement the same (but faster) interface. +type pointer struct { + v reflect.Value } -// ifield returns the given field in the struct as an interface value. -func structPointer_ifield(p structPointer, f field) interface{} { - return structPointer_field(p, f).Addr().Interface() +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + return pointer{v: reflect.ValueOf(*i)} } -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return structPointer_ifield(p, f).(*[]byte) +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + v := reflect.ValueOf(*i) + u := reflect.New(v.Type()) + u.Elem().Set(v) + return pointer{v: u} } -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return structPointer_ifield(p, f).(*[][]byte) +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{v: v} } -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return structPointer_ifield(p, f).(**bool) +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + return pointer{v: p.v.Elem().FieldByIndex(f).Addr()} } -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return structPointer_ifield(p, f).(*bool) +func (p pointer) isNil() bool { + return p.v.IsNil() } -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return structPointer_ifield(p, f).(*[]bool) +// grow updates the slice s in place to make it one element longer. +// s must be addressable. +// Returns the (addressable) new element. +func grow(s reflect.Value) reflect.Value { + n, m := s.Len(), s.Cap() + if n < m { + s.SetLen(n + 1) + } else { + s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem()))) + } + return s.Index(n) } -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return structPointer_ifield(p, f).(**string) +func (p pointer) toInt64() *int64 { + return p.v.Interface().(*int64) } - -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return structPointer_ifield(p, f).(*string) +func (p pointer) toInt64Ptr() **int64 { + return p.v.Interface().(**int64) } - -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return structPointer_ifield(p, f).(*[]string) +func (p pointer) toInt64Slice() *[]int64 { + return p.v.Interface().(*[]int64) } -// Extensions returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return structPointer_ifield(p, f).(*XXX_InternalExtensions) -} +var int32ptr = reflect.TypeOf((*int32)(nil)) -// ExtMap returns the address of an extension map field in the struct. -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return structPointer_ifield(p, f).(*map[int32]Extension) +func (p pointer) toInt32() *int32 { + return p.v.Convert(int32ptr).Interface().(*int32) } -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return structPointer_field(p, f).Addr() +// The toInt32Ptr/Slice methods don't work because of enums. +// Instead, we must use set/get methods for the int32ptr/slice case. +/* + func (p pointer) toInt32Ptr() **int32 { + return p.v.Interface().(**int32) } - -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - structPointer_field(p, f).Set(q.v) + func (p pointer) toInt32Slice() *[]int32 { + return p.v.Interface().(*[]int32) } - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return structPointer{structPointer_field(p, f)} +*/ +func (p pointer) getInt32Ptr() *int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().(*int32) + } + // an enum + return p.v.Elem().Convert(int32PtrType).Interface().(*int32) +} +func (p pointer) setInt32Ptr(v int32) { + // Allocate value in a *int32. Possibly convert that to a *enum. + // Then assign it to a **int32 or **enum. + // Note: we can convert *int32 to *enum, but we can't convert + // **int32 to **enum! + p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem())) +} + +// getInt32Slice copies []int32 from p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getInt32Slice() []int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().([]int32) + } + // an enum + // Allocate a []int32, then assign []enum's values into it. + // Note: we can't convert []enum to []int32. + slice := p.v.Elem() + s := make([]int32, slice.Len()) + for i := 0; i < slice.Len(); i++ { + s[i] = int32(slice.Index(i).Int()) + } + return s } -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { - return structPointerSlice{structPointer_field(p, f)} +// setInt32Slice copies []int32 into p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setInt32Slice(v []int32) { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + p.v.Elem().Set(reflect.ValueOf(v)) + return + } + // an enum + // Allocate a []enum, then assign []int32's values into it. + // Note: we can't convert []enum to []int32. + slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v)) + for i, x := range v { + slice.Index(i).SetInt(int64(x)) + } + p.v.Elem().Set(slice) } - -// A structPointerSlice represents the address of a slice of pointers to structs -// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. -type structPointerSlice struct { - v reflect.Value +func (p pointer) appendInt32Slice(v int32) { + grow(p.v.Elem()).SetInt(int64(v)) } -func (p structPointerSlice) Len() int { return p.v.Len() } -func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } -func (p structPointerSlice) Append(q structPointer) { - p.v.Set(reflect.Append(p.v, q.v)) +func (p pointer) toUint64() *uint64 { + return p.v.Interface().(*uint64) } - -var ( - int32Type = reflect.TypeOf(int32(0)) - uint32Type = reflect.TypeOf(uint32(0)) - float32Type = reflect.TypeOf(float32(0)) - int64Type = reflect.TypeOf(int64(0)) - uint64Type = reflect.TypeOf(uint64(0)) - float64Type = reflect.TypeOf(float64(0)) -) - -// A word32 represents a field of type *int32, *uint32, *float32, or *enum. -// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. -type word32 struct { - v reflect.Value +func (p pointer) toUint64Ptr() **uint64 { + return p.v.Interface().(**uint64) } - -// IsNil reports whether p is nil. -func word32_IsNil(p word32) bool { - return p.v.IsNil() +func (p pointer) toUint64Slice() *[]uint64 { + return p.v.Interface().(*[]uint64) } - -// Set sets p to point at a newly allocated word with bits set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - t := p.v.Type().Elem() - switch t { - case int32Type: - if len(o.int32s) == 0 { - o.int32s = make([]int32, uint32PoolSize) - } - o.int32s[0] = int32(x) - p.v.Set(reflect.ValueOf(&o.int32s[0])) - o.int32s = o.int32s[1:] - return - case uint32Type: - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - p.v.Set(reflect.ValueOf(&o.uint32s[0])) - o.uint32s = o.uint32s[1:] - return - case float32Type: - if len(o.float32s) == 0 { - o.float32s = make([]float32, uint32PoolSize) - } - o.float32s[0] = math.Float32frombits(x) - p.v.Set(reflect.ValueOf(&o.float32s[0])) - o.float32s = o.float32s[1:] - return - } - - // must be enum - p.v.Set(reflect.New(t)) - p.v.Elem().SetInt(int64(int32(x))) +func (p pointer) toUint32() *uint32 { + return p.v.Interface().(*uint32) } - -// Get gets the bits pointed at by p, as a uint32. -func word32_Get(p word32) uint32 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") +func (p pointer) toUint32Ptr() **uint32 { + return p.v.Interface().(**uint32) } - -// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32{structPointer_field(p, f)} +func (p pointer) toUint32Slice() *[]uint32 { + return p.v.Interface().(*[]uint32) } - -// A word32Val represents a field of type int32, uint32, float32, or enum. -// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. -type word32Val struct { - v reflect.Value +func (p pointer) toBool() *bool { + return p.v.Interface().(*bool) } - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - switch p.v.Type() { - case int32Type: - p.v.SetInt(int64(x)) - return - case uint32Type: - p.v.SetUint(uint64(x)) - return - case float32Type: - p.v.SetFloat(float64(math.Float32frombits(x))) - return - } - - // must be enum - p.v.SetInt(int64(int32(x))) +func (p pointer) toBoolPtr() **bool { + return p.v.Interface().(**bool) } - -// Get gets the bits pointed at by p, as a uint32. -func word32Val_Get(p word32Val) uint32 { - elem := p.v - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") +func (p pointer) toBoolSlice() *[]bool { + return p.v.Interface().(*[]bool) } - -// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val{structPointer_field(p, f)} +func (p pointer) toFloat64() *float64 { + return p.v.Interface().(*float64) } - -// A word32Slice is a slice of 32-bit values. -// That is, v.Type() is []int32, []uint32, []float32, or []enum. -type word32Slice struct { - v reflect.Value +func (p pointer) toFloat64Ptr() **float64 { + return p.v.Interface().(**float64) } - -func (p word32Slice) Append(x uint32) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int32: - elem.SetInt(int64(int32(x))) - case reflect.Uint32: - elem.SetUint(uint64(x)) - case reflect.Float32: - elem.SetFloat(float64(math.Float32frombits(x))) - } +func (p pointer) toFloat64Slice() *[]float64 { + return p.v.Interface().(*[]float64) } - -func (p word32Slice) Len() int { - return p.v.Len() +func (p pointer) toFloat32() *float32 { + return p.v.Interface().(*float32) } - -func (p word32Slice) Index(i int) uint32 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int32: - return uint32(elem.Int()) - case reflect.Uint32: - return uint32(elem.Uint()) - case reflect.Float32: - return math.Float32bits(float32(elem.Float())) - } - panic("unreachable") +func (p pointer) toFloat32Ptr() **float32 { + return p.v.Interface().(**float32) } - -// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) word32Slice { - return word32Slice{structPointer_field(p, f)} +func (p pointer) toFloat32Slice() *[]float32 { + return p.v.Interface().(*[]float32) } - -// word64 is like word32 but for 64-bit values. -type word64 struct { - v reflect.Value +func (p pointer) toString() *string { + return p.v.Interface().(*string) } - -func word64_Set(p word64, o *Buffer, x uint64) { - t := p.v.Type().Elem() - switch t { - case int64Type: - if len(o.int64s) == 0 { - o.int64s = make([]int64, uint64PoolSize) - } - o.int64s[0] = int64(x) - p.v.Set(reflect.ValueOf(&o.int64s[0])) - o.int64s = o.int64s[1:] - return - case uint64Type: - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - p.v.Set(reflect.ValueOf(&o.uint64s[0])) - o.uint64s = o.uint64s[1:] - return - case float64Type: - if len(o.float64s) == 0 { - o.float64s = make([]float64, uint64PoolSize) - } - o.float64s[0] = math.Float64frombits(x) - p.v.Set(reflect.ValueOf(&o.float64s[0])) - o.float64s = o.float64s[1:] - return - } - panic("unreachable") +func (p pointer) toStringPtr() **string { + return p.v.Interface().(**string) } - -func word64_IsNil(p word64) bool { - return p.v.IsNil() +func (p pointer) toStringSlice() *[]string { + return p.v.Interface().(*[]string) } - -func word64_Get(p word64) uint64 { - elem := p.v.Elem() - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) - } - panic("unreachable") +func (p pointer) toBytes() *[]byte { + return p.v.Interface().(*[]byte) } - -func structPointer_Word64(p structPointer, f field) word64 { - return word64{structPointer_field(p, f)} +func (p pointer) toBytesSlice() *[][]byte { + return p.v.Interface().(*[][]byte) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return p.v.Interface().(*XXX_InternalExtensions) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return p.v.Interface().(*map[int32]Extension) +} +func (p pointer) getPointer() pointer { + return pointer{v: p.v.Elem()} +} +func (p pointer) setPointer(q pointer) { + p.v.Elem().Set(q.v) +} +func (p pointer) appendPointer(q pointer) { + grow(p.v.Elem()).Set(q.v) } -// word64Val is like word32Val but for 64-bit values. -type word64Val struct { - v reflect.Value +// getPointerSlice copies []*T from p as a new []pointer. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getPointerSlice() []pointer { + if p.v.IsNil() { + return nil + } + n := p.v.Elem().Len() + s := make([]pointer, n) + for i := 0; i < n; i++ { + s[i] = pointer{v: p.v.Elem().Index(i)} + } + return s } -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - switch p.v.Type() { - case int64Type: - p.v.SetInt(int64(x)) - return - case uint64Type: - p.v.SetUint(x) - return - case float64Type: - p.v.SetFloat(math.Float64frombits(x)) +// setPointerSlice copies []pointer into p as a new []*T. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setPointerSlice(v []pointer) { + if v == nil { + p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem()) return } - panic("unreachable") + s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v)) + for _, p := range v { + s = reflect.Append(s, p.v) + } + p.v.Elem().Set(s) } -func word64Val_Get(p word64Val) uint64 { - elem := p.v - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return elem.Uint() - case reflect.Float64: - return math.Float64bits(elem.Float()) +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + if p.v.Elem().IsNil() { + return pointer{v: p.v.Elem()} } - panic("unreachable") + return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct } -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val{structPointer_field(p, f)} +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + // TODO: check that p.v.Type().Elem() == t? + return p.v } -type word64Slice struct { - v reflect.Value +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p } - -func (p word64Slice) Append(x uint64) { - n, m := p.v.Len(), p.v.Cap() - if n < m { - p.v.SetLen(n + 1) - } else { - t := p.v.Type().Elem() - p.v.Set(reflect.Append(p.v, reflect.Zero(t))) - } - elem := p.v.Index(n) - switch elem.Kind() { - case reflect.Int64: - elem.SetInt(int64(int64(x))) - case reflect.Uint64: - elem.SetUint(uint64(x)) - case reflect.Float64: - elem.SetFloat(float64(math.Float64frombits(x))) - } +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v } - -func (p word64Slice) Len() int { - return p.v.Len() +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p } - -func (p word64Slice) Index(i int) uint64 { - elem := p.v.Index(i) - switch elem.Kind() { - case reflect.Int64: - return uint64(elem.Int()) - case reflect.Uint64: - return uint64(elem.Uint()) - case reflect.Float64: - return math.Float64bits(float64(elem.Float())) - } - panic("unreachable") +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v } - -func structPointer_Word64Slice(p structPointer, f field) word64Slice { - return word64Slice{structPointer_field(p, f)} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v } +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} + +var atomicLock sync.Mutex diff --git a/deps/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/deps/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go index 1763a5f22..7ffd3c29d 100644 --- a/deps/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go +++ b/deps/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go @@ -1,6 +1,6 @@ // Protocol Buffers for Go with Gadgets // -// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// Copyright (c) 2018, The GoGo Authors. All rights reserved. // http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without @@ -26,7 +26,11 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build appengine js +// +build purego appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. package proto @@ -34,52 +38,22 @@ import ( "reflect" ) -func structPointer_FieldPointer(p structPointer, f field) structPointer { - panic("not implemented") -} - -func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer { - panic("not implemented") -} - -func structPointer_InterfaceAt(p structPointer, f field, t reflect.Type) interface{} { - panic("not implemented") -} - -func structPointer_InterfaceRef(p structPointer, f field, t reflect.Type) interface{} { - panic("not implemented") -} - -func structPointer_GetRefStructPointer(p structPointer, f field) structPointer { - panic("not implemented") -} +// TODO: untested, so probably incorrect. -func structPointer_Add(p structPointer, size field) structPointer { - panic("not implemented") +func (p pointer) getRef() pointer { + return pointer{v: p.v.Addr()} } -func structPointer_Len(p structPointer, f field) int { - panic("not implemented") -} - -func structPointer_GetSliceHeader(p structPointer, f field) *reflect.SliceHeader { - panic("not implemented") -} - -func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) { - panic("not implemented") -} - -func structPointer_StructRefSlice(p structPointer, f field, size uintptr) *structRefSlice { - panic("not implemented") -} - -type structRefSlice struct{} - -func (v *structRefSlice) Len() int { - panic("not implemented") +func (p pointer) appendRef(v pointer, typ reflect.Type) { + slice := p.getSlice(typ) + elem := v.asPointerTo(typ).Elem() + newSlice := reflect.Append(slice, elem) + slice.Set(newSlice) } -func (v *structRefSlice) Index(i int) structPointer { - panic("not implemented") +func (p pointer) getSlice(typ reflect.Type) reflect.Value { + sliceTyp := reflect.SliceOf(typ) + slice := p.asPointerTo(sliceTyp) + slice = slice.Elem() + return slice } diff --git a/deps/github.com/gogo/protobuf/proto/pointer_unsafe.go b/deps/github.com/gogo/protobuf/proto/pointer_unsafe.go index 6b5567d47..d55a335d9 100644 --- a/deps/github.com/gogo/protobuf/proto/pointer_unsafe.go +++ b/deps/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -29,7 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build !appengine,!js +// +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. @@ -37,38 +37,13 @@ package proto import ( "reflect" + "sync/atomic" "unsafe" ) -// NOTE: These type_Foo functions would more idiomatically be methods, -// but Go does not allow methods on pointer types, and we must preserve -// some pointer type for the garbage collector. We use these -// funcs with clunky names as our poor approximation to methods. -// -// An alternative would be -// type structPointer struct { p unsafe.Pointer } -// but that does not registerize as well. - -// A structPointer is a pointer to a struct. -type structPointer unsafe.Pointer - -// toStructPointer returns a structPointer equivalent to the given reflect value. -func toStructPointer(v reflect.Value) structPointer { - return structPointer(unsafe.Pointer(v.Pointer())) -} - -// IsNil reports whether p is nil. -func structPointer_IsNil(p structPointer) bool { - return p == nil -} - -// Interface returns the struct pointer, assumed to have element type t, -// as an interface value. -func structPointer_Interface(p structPointer, t reflect.Type) interface{} { - return reflect.NewAt(t, unsafe.Pointer(p)).Interface() -} +const unsafeAllowed = true -// A field identifies a field in a struct, accessible from a structPointer. +// A field identifies a field in a struct, accessible from a pointer. // In this implementation, a field is identified by its byte offset from the start of the struct. type field uintptr @@ -80,191 +55,254 @@ func toField(f *reflect.StructField) field { // invalidField is an invalid field identifier. const invalidField = ^field(0) +// zeroField is a noop when calling pointer.offset. +const zeroField = field(0) + // IsValid reports whether the field identifier is valid. func (f field) IsValid() bool { - return f != ^field(0) + return f != invalidField } -// Bytes returns the address of a []byte field in the struct. -func structPointer_Bytes(p structPointer, f field) *[]byte { - return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// The pointer type below is for the new table-driven encoder/decoder. +// The implementation here uses unsafe.Pointer to create a generic pointer. +// In pointer_reflect.go we use reflect instead of unsafe to implement +// the same (but slower) interface. +type pointer struct { + p unsafe.Pointer } -// BytesSlice returns the address of a [][]byte field in the struct. -func structPointer_BytesSlice(p structPointer, f field) *[][]byte { - return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} +// size of pointer +var ptrSize = unsafe.Sizeof(uintptr(0)) -// Bool returns the address of a *bool field in the struct. -func structPointer_Bool(p structPointer, f field) **bool { - return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + // Super-tricky - read pointer out of data word of interface value. + // Saves ~25ns over the equivalent: + // return valToPointer(reflect.ValueOf(*i)) + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} } -// BoolVal returns the address of a bool field in the struct. -func structPointer_BoolVal(p structPointer, f field) *bool { - return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + // Super-tricky - read or get the address of data word of interface value. + if isptr { + // The interface is of pointer type, thus it is a direct interface. + // The data word is the pointer data itself. We take its address. + return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)} + } + // The interface is not of pointer type. The data word is the pointer + // to the data. + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} } -// BoolSlice returns the address of a []bool field in the struct. -func structPointer_BoolSlice(p structPointer, f field) *[]bool { - return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{p: unsafe.Pointer(v.Pointer())} } -// String returns the address of a *string field in the struct. -func structPointer_String(p structPointer, f field) **string { - return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + // For safety, we should panic if !f.IsValid, however calling panic causes + // this to no longer be inlineable, which is a serious performance cost. + /* + if !f.IsValid() { + panic("invalid field") + } + */ + return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))} } -// StringVal returns the address of a string field in the struct. -func structPointer_StringVal(p structPointer, f field) *string { - return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) isNil() bool { + return p.p == nil } -// StringSlice returns the address of a []string field in the struct. -func structPointer_StringSlice(p structPointer, f field) *[]string { - return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toInt64() *int64 { + return (*int64)(p.p) } - -// ExtMap returns the address of an extension map field in the struct. -func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions { - return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toInt64Ptr() **int64 { + return (**int64)(p.p) } - -func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { - return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toInt64Slice() *[]int64 { + return (*[]int64)(p.p) } - -// NewAt returns the reflect.Value for a pointer to a field in the struct. -func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { - return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) +func (p pointer) toInt32() *int32 { + return (*int32)(p.p) } -// SetStructPointer writes a *struct field in the struct. -func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { - *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q +// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist. +/* + func (p pointer) toInt32Ptr() **int32 { + return (**int32)(p.p) + } + func (p pointer) toInt32Slice() *[]int32 { + return (*[]int32)(p.p) + } +*/ +func (p pointer) getInt32Ptr() *int32 { + return *(**int32)(p.p) } - -// GetStructPointer reads a *struct field in the struct. -func structPointer_GetStructPointer(p structPointer, f field) structPointer { - return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) setInt32Ptr(v int32) { + *(**int32)(p.p) = &v } -// StructPointerSlice the address of a []*struct field in the struct. -func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { - return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +// getInt32Slice loads a []int32 from p. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getInt32Slice() []int32 { + return *(*[]int32)(p.p) } -// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). -type structPointerSlice []structPointer - -func (v *structPointerSlice) Len() int { return len(*v) } -func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } -func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } - -// A word32 is the address of a "pointer to 32-bit value" field. -type word32 **uint32 - -// IsNil reports whether *v is nil. -func word32_IsNil(p word32) bool { - return *p == nil +// setInt32Slice stores a []int32 to p. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setInt32Slice(v []int32) { + *(*[]int32)(p.p) = v } -// Set sets *v to point at a newly allocated word set to x. -func word32_Set(p word32, o *Buffer, x uint32) { - if len(o.uint32s) == 0 { - o.uint32s = make([]uint32, uint32PoolSize) - } - o.uint32s[0] = x - *p = &o.uint32s[0] - o.uint32s = o.uint32s[1:] +// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead? +func (p pointer) appendInt32Slice(v int32) { + s := (*[]int32)(p.p) + *s = append(*s, v) } -// Get gets the value pointed at by *v. -func word32_Get(p word32) uint32 { - return **p +func (p pointer) toUint64() *uint64 { + return (*uint64)(p.p) } - -// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32(p structPointer, f field) word32 { - return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +func (p pointer) toUint64Ptr() **uint64 { + return (**uint64)(p.p) } - -// A word32Val is the address of a 32-bit value field. -type word32Val *uint32 - -// Set sets *p to x. -func word32Val_Set(p word32Val, x uint32) { - *p = x +func (p pointer) toUint64Slice() *[]uint64 { + return (*[]uint64)(p.p) } - -// Get gets the value pointed at by p. -func word32Val_Get(p word32Val) uint32 { - return *p +func (p pointer) toUint32() *uint32 { + return (*uint32)(p.p) } - -// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. -func structPointer_Word32Val(p structPointer, f field) word32Val { - return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +func (p pointer) toUint32Ptr() **uint32 { + return (**uint32)(p.p) } - -// A word32Slice is a slice of 32-bit values. -type word32Slice []uint32 - -func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } -func (v *word32Slice) Len() int { return len(*v) } -func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } - -// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. -func structPointer_Word32Slice(p structPointer, f field) *word32Slice { - return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func (p pointer) toUint32Slice() *[]uint32 { + return (*[]uint32)(p.p) } - -// word64 is like word32 but for 64-bit values. -type word64 **uint64 - -func word64_Set(p word64, o *Buffer, x uint64) { - if len(o.uint64s) == 0 { - o.uint64s = make([]uint64, uint64PoolSize) - } - o.uint64s[0] = x - *p = &o.uint64s[0] - o.uint64s = o.uint64s[1:] +func (p pointer) toBool() *bool { + return (*bool)(p.p) } - -func word64_IsNil(p word64) bool { - return *p == nil +func (p pointer) toBoolPtr() **bool { + return (**bool)(p.p) } - -func word64_Get(p word64) uint64 { - return **p +func (p pointer) toBoolSlice() *[]bool { + return (*[]bool)(p.p) +} +func (p pointer) toFloat64() *float64 { + return (*float64)(p.p) +} +func (p pointer) toFloat64Ptr() **float64 { + return (**float64)(p.p) +} +func (p pointer) toFloat64Slice() *[]float64 { + return (*[]float64)(p.p) +} +func (p pointer) toFloat32() *float32 { + return (*float32)(p.p) +} +func (p pointer) toFloat32Ptr() **float32 { + return (**float32)(p.p) +} +func (p pointer) toFloat32Slice() *[]float32 { + return (*[]float32)(p.p) +} +func (p pointer) toString() *string { + return (*string)(p.p) +} +func (p pointer) toStringPtr() **string { + return (**string)(p.p) +} +func (p pointer) toStringSlice() *[]string { + return (*[]string)(p.p) +} +func (p pointer) toBytes() *[]byte { + return (*[]byte)(p.p) +} +func (p pointer) toBytesSlice() *[][]byte { + return (*[][]byte)(p.p) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return (*XXX_InternalExtensions)(p.p) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return (*map[int32]Extension)(p.p) } -func structPointer_Word64(p structPointer, f field) word64 { - return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +// getPointerSlice loads []*T from p as a []pointer. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getPointerSlice() []pointer { + // Super-tricky - p should point to a []*T where T is a + // message type. We load it as []pointer. + return *(*[]pointer)(p.p) } -// word64Val is like word32Val but for 64-bit values. -type word64Val *uint64 +// setPointerSlice stores []pointer into p as a []*T. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setPointerSlice(v []pointer) { + // Super-tricky - p should point to a []*T where T is a + // message type. We store it as []pointer. + *(*[]pointer)(p.p) = v +} -func word64Val_Set(p word64Val, o *Buffer, x uint64) { - *p = x +// getPointer loads the pointer at p and returns it. +func (p pointer) getPointer() pointer { + return pointer{p: *(*unsafe.Pointer)(p.p)} } -func word64Val_Get(p word64Val) uint64 { - return *p +// setPointer stores the pointer q at p. +func (p pointer) setPointer(q pointer) { + *(*unsafe.Pointer)(p.p) = q.p } -func structPointer_Word64Val(p structPointer, f field) word64Val { - return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +// append q to the slice pointed to by p. +func (p pointer) appendPointer(q pointer) { + s := (*[]unsafe.Pointer)(p.p) + *s = append(*s, q.p) } -// word64Slice is like word32Slice but for 64-bit values. -type word64Slice []uint64 +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + // Super-tricky - read pointer out of data word of interface value. + return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]} +} -func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } -func (v *word64Slice) Len() int { return len(*v) } -func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } +// asPointerTo returns a reflect.Value that is a pointer to an +// object of type t stored at p. +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + return reflect.NewAt(t, p.p) +} -func structPointer_Word64Slice(p structPointer, f field) *word64Slice { - return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) } diff --git a/deps/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/deps/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go index f156a29f0..aca8eed02 100644 --- a/deps/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go +++ b/deps/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -1,6 +1,6 @@ // Protocol Buffers for Go with Gadgets // -// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// Copyright (c) 2018, The GoGo Authors. All rights reserved. // http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without @@ -26,7 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +build !appengine,!js +// +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. @@ -37,92 +37,20 @@ import ( "unsafe" ) -func structPointer_InterfaceAt(p structPointer, f field, t reflect.Type) interface{} { - point := unsafe.Pointer(uintptr(p) + uintptr(f)) - r := reflect.NewAt(t, point) - return r.Interface() +func (p pointer) getRef() pointer { + return pointer{p: (unsafe.Pointer)(&p.p)} } -func structPointer_InterfaceRef(p structPointer, f field, t reflect.Type) interface{} { - point := unsafe.Pointer(uintptr(p) + uintptr(f)) - r := reflect.NewAt(t, point) - if r.Elem().IsNil() { - return nil - } - return r.Elem().Interface() +func (p pointer) appendRef(v pointer, typ reflect.Type) { + slice := p.getSlice(typ) + elem := v.asPointerTo(typ).Elem() + newSlice := reflect.Append(slice, elem) + slice.Set(newSlice) } -func copyUintPtr(oldptr, newptr uintptr, size int) { - oldbytes := make([]byte, 0) - oldslice := (*reflect.SliceHeader)(unsafe.Pointer(&oldbytes)) - oldslice.Data = oldptr - oldslice.Len = size - oldslice.Cap = size - newbytes := make([]byte, 0) - newslice := (*reflect.SliceHeader)(unsafe.Pointer(&newbytes)) - newslice.Data = newptr - newslice.Len = size - newslice.Cap = size - copy(newbytes, oldbytes) -} - -func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) { - copyUintPtr(uintptr(oldptr), uintptr(newptr), size) -} - -func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer { - size := typ.Elem().Size() - - oldHeader := structPointer_GetSliceHeader(base, f) - oldSlice := reflect.NewAt(typ, unsafe.Pointer(oldHeader)).Elem() - newLen := oldHeader.Len + 1 - newSlice := reflect.MakeSlice(typ, newLen, newLen) - reflect.Copy(newSlice, oldSlice) - bas := toStructPointer(newSlice) - oldHeader.Data = uintptr(bas) - oldHeader.Len = newLen - oldHeader.Cap = newLen - - return structPointer(unsafe.Pointer(uintptr(unsafe.Pointer(bas)) + uintptr(uintptr(newLen-1)*size))) -} - -func structPointer_FieldPointer(p structPointer, f field) structPointer { - return structPointer(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -func structPointer_GetRefStructPointer(p structPointer, f field) structPointer { - return structPointer((*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f)))) -} - -func structPointer_GetSliceHeader(p structPointer, f field) *reflect.SliceHeader { - return (*reflect.SliceHeader)(unsafe.Pointer(uintptr(p) + uintptr(f))) -} - -func structPointer_Add(p structPointer, size field) structPointer { - return structPointer(unsafe.Pointer(uintptr(p) + uintptr(size))) -} - -func structPointer_Len(p structPointer, f field) int { - return len(*(*[]interface{})(unsafe.Pointer(structPointer_GetRefStructPointer(p, f)))) -} - -func structPointer_StructRefSlice(p structPointer, f field, size uintptr) *structRefSlice { - return &structRefSlice{p: p, f: f, size: size} -} - -// A structRefSlice represents a slice of structs (themselves submessages or groups). -type structRefSlice struct { - p structPointer - f field - size uintptr -} - -func (v *structRefSlice) Len() int { - return structPointer_Len(v.p, v.f) -} - -func (v *structRefSlice) Index(i int) structPointer { - ss := structPointer_GetStructPointer(v.p, v.f) - ss1 := structPointer_GetRefStructPointer(ss, 0) - return structPointer_Add(ss1, field(uintptr(i)*v.size)) +func (p pointer) getSlice(typ reflect.Type) reflect.Value { + sliceTyp := reflect.SliceOf(typ) + slice := p.asPointerTo(sliceTyp) + slice = slice.Elem() + return slice } diff --git a/deps/github.com/gogo/protobuf/proto/properties.go b/deps/github.com/gogo/protobuf/proto/properties.go index 44b332052..7a5e28efe 100644 --- a/deps/github.com/gogo/protobuf/proto/properties.go +++ b/deps/github.com/gogo/protobuf/proto/properties.go @@ -63,42 +63,6 @@ const ( WireFixed32 = 5 ) -const startSize = 10 // initial slice/string sizes - -// Encoders are defined in encode.go -// An encoder outputs the full representation of a field, including its -// tag and encoder type. -type encoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueEncoder encodes a single integer in a particular encoding. -type valueEncoder func(o *Buffer, x uint64) error - -// Sizers are defined in encode.go -// A sizer returns the encoded size of a field, including its tag and encoder -// type. -type sizer func(prop *Properties, base structPointer) int - -// A valueSizer returns the encoded size of a single integer in a particular -// encoding. -type valueSizer func(x uint64) int - -// Decoders are defined in decode.go -// A decoder creates a value from its wire representation. -// Unrecognized subelements are saved in unrec. -type decoder func(p *Buffer, prop *Properties, base structPointer) error - -// A valueDecoder decodes a single integer in a particular encoding. -type valueDecoder func(o *Buffer) (x uint64, err error) - -// A oneofMarshaler does the marshaling for all oneof fields in a message. -type oneofMarshaler func(Message, *Buffer) error - -// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. -type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) - -// A oneofSizer does the sizing for all oneof fields in a message. -type oneofSizer func(Message) int - // tagMap is an optimization over map[int]int for typical protocol buffer // use-cases. Encoded protocol buffers are often in tag order with small tag // numbers. @@ -145,13 +109,6 @@ type StructProperties struct { decoderTags tagMap // map from proto tag to struct field number decoderOrigNames map[string]int // map from original name to struct field number order []int // list of struct field numbers in tag order - unrecField field // field id of the XXX_unrecognized []byte field - extendable bool // is this an extendable proto - - oneofMarshaler oneofMarshaler - oneofUnmarshaler oneofUnmarshaler - oneofSizer oneofSizer - stype reflect.Type // OneofTypes contains information about the oneof fields in this message. // It is keyed by the original name of a field. @@ -193,39 +150,23 @@ type Properties struct { Default string // default value HasDefault bool // whether an explicit default was provided CustomType string + CastType string StdTime bool StdDuration bool - enc encoder - valEnc valueEncoder // set for bool and numeric types only - field field - tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) - tagbuf [8]byte - stype reflect.Type // set for struct types only - sstype reflect.Type // set for slices of structs types only - ctype reflect.Type // set for custom types only - sprop *StructProperties // set for struct types only - isMarshaler bool - isUnmarshaler bool + stype reflect.Type // set for struct types only + ctype reflect.Type // set for custom types only + sprop *StructProperties // set for struct types only mtype reflect.Type // set for map types only mkeyprop *Properties // set for map types only mvalprop *Properties // set for map types only - - size sizer - valSize valueSizer // set for bool and numeric types only - - dec decoder - valDec valueDecoder // set for bool and numeric types only - - // If this is a packable field, this will be the decoder for the packed version of the field. - packedDec decoder } // String formats the properties in the protobuf struct field tag style. func (p *Properties) String() string { s := p.Wire - s = "," + s += "," s += strconv.Itoa(p.Tag) if p.Required { s += ",req" @@ -271,29 +212,14 @@ func (p *Properties) Parse(s string) { switch p.Wire { case "varint": p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeVarint - p.valDec = (*Buffer).DecodeVarint - p.valSize = sizeVarint case "fixed32": p.WireType = WireFixed32 - p.valEnc = (*Buffer).EncodeFixed32 - p.valDec = (*Buffer).DecodeFixed32 - p.valSize = sizeFixed32 case "fixed64": p.WireType = WireFixed64 - p.valEnc = (*Buffer).EncodeFixed64 - p.valDec = (*Buffer).DecodeFixed64 - p.valSize = sizeFixed64 case "zigzag32": p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag32 - p.valDec = (*Buffer).DecodeZigzag32 - p.valSize = sizeZigzag32 case "zigzag64": p.WireType = WireVarint - p.valEnc = (*Buffer).EncodeZigzag64 - p.valDec = (*Buffer).DecodeZigzag64 - p.valSize = sizeZigzag64 case "bytes", "group": p.WireType = WireBytes // no numeric converter for non-numeric types @@ -308,6 +234,7 @@ func (p *Properties) Parse(s string) { return } +outer: for i := 2; i < len(fields); i++ { f := fields[i] switch { @@ -335,12 +262,14 @@ func (p *Properties) Parse(s string) { if i+1 < len(fields) { // Commas aren't escaped, and def is always last. p.Default += "," + strings.Join(fields[i+1:], ",") - break + break outer } case strings.HasPrefix(f, "embedded="): p.OrigName = strings.Split(f, "=")[1] case strings.HasPrefix(f, "customtype="): p.CustomType = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "casttype="): + p.CastType = strings.Split(f, "=")[1] case f == "stdtime": p.StdTime = true case f == "stdduration": @@ -349,292 +278,43 @@ func (p *Properties) Parse(s string) { } } -func logNoSliceEnc(t1, t2 reflect.Type) { - fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) -} - var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() -// Initialize the fields for encoding and decoding. -func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { - p.enc = nil - p.dec = nil - p.size = nil +// setFieldProps initializes the field properties for submessages and maps. +func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { isMap := typ.Kind() == reflect.Map if len(p.CustomType) > 0 && !isMap { - p.setCustomEncAndDec(typ) + p.ctype = typ p.setTag(lockGetProp) return } if p.StdTime && !isMap { - p.setTimeEncAndDec(typ) p.setTag(lockGetProp) return } if p.StdDuration && !isMap { - p.setDurationEncAndDec(typ) p.setTag(lockGetProp) return } switch t1 := typ; t1.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) - - // proto3 scalar types - - case reflect.Bool: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_bool - p.dec = (*Buffer).dec_proto3_bool - p.size = size_proto3_bool - } else { - p.enc = (*Buffer).enc_ref_bool - p.dec = (*Buffer).dec_proto3_bool - p.size = size_ref_bool - } - case reflect.Int32: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_int32 - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_int32 - } else { - p.enc = (*Buffer).enc_ref_int32 - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_ref_int32 - } - case reflect.Uint32: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_uint32 - p.dec = (*Buffer).dec_proto3_int32 // can reuse - p.size = size_proto3_uint32 - } else { - p.enc = (*Buffer).enc_ref_uint32 - p.dec = (*Buffer).dec_proto3_int32 // can reuse - p.size = size_ref_uint32 - } - case reflect.Int64, reflect.Uint64: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_int64 - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - } else { - p.enc = (*Buffer).enc_ref_int64 - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_ref_int64 - } - case reflect.Float32: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_proto3_uint32 - } else { - p.enc = (*Buffer).enc_ref_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int32 - p.size = size_ref_uint32 - } - case reflect.Float64: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_proto3_int64 - } else { - p.enc = (*Buffer).enc_ref_int64 // can just treat them as bits - p.dec = (*Buffer).dec_proto3_int64 - p.size = size_ref_int64 - } - case reflect.String: - if p.proto3 { - p.enc = (*Buffer).enc_proto3_string - p.dec = (*Buffer).dec_proto3_string - p.size = size_proto3_string - } else { - p.enc = (*Buffer).enc_ref_string - p.dec = (*Buffer).dec_proto3_string - p.size = size_ref_string - } case reflect.Struct: p.stype = typ - p.isMarshaler = isMarshaler(typ) - p.isUnmarshaler = isUnmarshaler(typ) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_ref_struct_message - p.dec = (*Buffer).dec_ref_struct_message - p.size = size_ref_struct_message - } else { - fmt.Fprintf(os.Stderr, "proto: no coders for struct %T\n", typ) - } - case reflect.Ptr: - switch t2 := t1.Elem(); t2.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) - break - case reflect.Bool: - p.enc = (*Buffer).enc_bool - p.dec = (*Buffer).dec_bool - p.size = size_bool - case reflect.Int32: - p.enc = (*Buffer).enc_int32 - p.dec = (*Buffer).dec_int32 - p.size = size_int32 - case reflect.Uint32: - p.enc = (*Buffer).enc_uint32 - p.dec = (*Buffer).dec_int32 // can reuse - p.size = size_uint32 - case reflect.Int64, reflect.Uint64: - p.enc = (*Buffer).enc_int64 - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.Float32: - p.enc = (*Buffer).enc_uint32 // can just treat them as bits - p.dec = (*Buffer).dec_int32 - p.size = size_uint32 - case reflect.Float64: - p.enc = (*Buffer).enc_int64 // can just treat them as bits - p.dec = (*Buffer).dec_int64 - p.size = size_int64 - case reflect.String: - p.enc = (*Buffer).enc_string - p.dec = (*Buffer).dec_string - p.size = size_string - case reflect.Struct: + if t1.Elem().Kind() == reflect.Struct { p.stype = t1.Elem() - p.isMarshaler = isMarshaler(t1) - p.isUnmarshaler = isUnmarshaler(t1) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_struct_message - p.dec = (*Buffer).dec_struct_message - p.size = size_struct_message - } else { - p.enc = (*Buffer).enc_struct_group - p.dec = (*Buffer).dec_struct_group - p.size = size_struct_group - } } - case reflect.Slice: switch t2 := t1.Elem(); t2.Kind() { - default: - logNoSliceEnc(t1, t2) - break - case reflect.Bool: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_bool - p.size = size_slice_packed_bool - } else { - p.enc = (*Buffer).enc_slice_bool - p.size = size_slice_bool - } - p.dec = (*Buffer).dec_slice_bool - p.packedDec = (*Buffer).dec_slice_packed_bool - case reflect.Int32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int32 - p.size = size_slice_packed_int32 - } else { - p.enc = (*Buffer).enc_slice_int32 - p.size = size_slice_int32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Uint32: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case reflect.Int64, reflect.Uint64: - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - case reflect.Uint8: - p.dec = (*Buffer).dec_slice_byte - if p.proto3 { - p.enc = (*Buffer).enc_proto3_slice_byte - p.size = size_proto3_slice_byte - } else { - p.enc = (*Buffer).enc_slice_byte - p.size = size_slice_byte - } - case reflect.Float32, reflect.Float64: - switch t2.Bits() { - case 32: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_uint32 - p.size = size_slice_packed_uint32 - } else { - p.enc = (*Buffer).enc_slice_uint32 - p.size = size_slice_uint32 - } - p.dec = (*Buffer).dec_slice_int32 - p.packedDec = (*Buffer).dec_slice_packed_int32 - case 64: - // can just treat them as bits - if p.Packed { - p.enc = (*Buffer).enc_slice_packed_int64 - p.size = size_slice_packed_int64 - } else { - p.enc = (*Buffer).enc_slice_int64 - p.size = size_slice_int64 - } - p.dec = (*Buffer).dec_slice_int64 - p.packedDec = (*Buffer).dec_slice_packed_int64 - default: - logNoSliceEnc(t1, t2) - break - } - case reflect.String: - p.enc = (*Buffer).enc_slice_string - p.dec = (*Buffer).dec_slice_string - p.size = size_slice_string case reflect.Ptr: switch t3 := t2.Elem(); t3.Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) - break case reflect.Struct: - p.stype = t2.Elem() - p.isMarshaler = isMarshaler(t2) - p.isUnmarshaler = isUnmarshaler(t2) - if p.Wire == "bytes" { - p.enc = (*Buffer).enc_slice_struct_message - p.dec = (*Buffer).dec_slice_struct_message - p.size = size_slice_struct_message - } else { - p.enc = (*Buffer).enc_slice_struct_group - p.dec = (*Buffer).dec_slice_struct_group - p.size = size_slice_struct_group - } - } - case reflect.Slice: - switch t2.Elem().Kind() { - default: - fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) - break - case reflect.Uint8: - p.enc = (*Buffer).enc_slice_slice_byte - p.dec = (*Buffer).dec_slice_slice_byte - p.size = size_slice_slice_byte + p.stype = t3 } case reflect.Struct: - p.setSliceOfNonPointerStructs(t1) + p.stype = t2 } case reflect.Map: - p.enc = (*Buffer).enc_new_map - p.dec = (*Buffer).dec_new_map - p.size = size_new_map p.mtype = t1 p.mkeyprop = &Properties{} @@ -656,20 +336,6 @@ func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lock } func (p *Properties) setTag(lockGetProp bool) { - // precalculate tag code - wire := p.WireType - if p.Packed { - wire = WireBytes - } - x := uint32(p.Tag)<<3 | uint32(wire) - i := 0 - for i = 0; x > 127; i++ { - p.tagbuf[i] = 0x80 | uint8(x&0x7F) - x >>= 7 - } - p.tagbuf[i] = uint8(x) - p.tagcode = p.tagbuf[0 : i+1] - if p.stype != nil { if lockGetProp { p.sprop = GetProperties(p.stype) @@ -680,20 +346,9 @@ func (p *Properties) setTag(lockGetProp bool) { } var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() - unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() ) -// isMarshaler reports whether type t implements Marshaler. -func isMarshaler(t reflect.Type) bool { - return t.Implements(marshalerType) -} - -// isUnmarshaler reports whether type t implements Unmarshaler. -func isUnmarshaler(t reflect.Type) bool { - return t.Implements(unmarshalerType) -} - // Init populates the properties from a protocol buffer struct tag. func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { p.init(typ, name, tag, f, true) @@ -703,14 +358,11 @@ func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructF // "bytes,49,opt,def=hello!" p.Name = name p.OrigName = name - if f != nil { - p.field = toField(f) - } if tag == "" { return } p.Parse(tag) - p.setEncAndDec(typ, f, lockGetProp) + p.setFieldProps(typ, f, lockGetProp) } var ( @@ -760,10 +412,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { propertiesMap[t] = prop // build properties - prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) || - reflect.PtrTo(t).Implements(extendableProtoV1Type) || - reflect.PtrTo(t).Implements(extendableBytesType) - prop.unrecField = invalidField prop.Prop = make([]*Properties, t.NumField()) prop.order = make([]int, t.NumField()) @@ -774,23 +422,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { name := f.Name p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) - if f.Name == "XXX_InternalExtensions" { // special case - p.enc = (*Buffer).enc_exts - p.dec = nil // not needed - p.size = size_exts - } else if f.Name == "XXX_extensions" { // special case - if len(f.Tag.Get("protobuf")) > 0 { - p.enc = (*Buffer).enc_ext_slice_byte - p.dec = nil // not needed - p.size = size_ext_slice_byte - } else { - p.enc = (*Buffer).enc_map - p.dec = nil // not needed - p.size = size_map - } - } else if f.Name == "XXX_unrecognized" { // special case - prop.unrecField = toField(&f) - } oneof := f.Tag.Get("protobuf_oneof") // special case if oneof != "" { isOneofMessage = true @@ -806,9 +437,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { } print("\n") } - if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" { - fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") - } } // Re-order prop.order. @@ -819,8 +447,7 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { } if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok { var oots []interface{} - prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs() - prop.stype = t + _, _, _, oots = om.XXX_OneofFuncs() // Interpret oneof metadata. prop.OneofTypes = make(map[string]*OneofProperties) @@ -870,30 +497,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties { return prop } -// Return the Properties object for the x[0]'th field of the structure. -func propByIndex(t reflect.Type, x []int) *Properties { - if len(x) != 1 { - fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) - return nil - } - prop := GetProperties(t) - return prop.Prop[x[0]] -} - -// Get the address and type of a pointer to a struct from an interface. -func getbase(pb Message) (t reflect.Type, b structPointer, err error) { - if pb == nil { - err = ErrNil - return - } - // get the reflect type of the pointer to the struct. - t = reflect.TypeOf(pb) - // get the address of the struct. - value := reflect.ValueOf(pb) - b = toStructPointer(value) - return -} - // A global registry of enum types. // The generated code will register the generated maps by calling RegisterEnum. @@ -922,20 +525,42 @@ func EnumValueMap(enumType string) map[string]int32 { // A registry of all linked message types. // The string is a fully-qualified proto name ("pkg.Message"). var ( - protoTypes = make(map[string]reflect.Type) - revProtoTypes = make(map[reflect.Type]string) + protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers + protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types + revProtoTypes = make(map[reflect.Type]string) ) // RegisterType is called from generated code and maps from the fully qualified // proto name to the type (pointer to struct) of the protocol buffer. func RegisterType(x Message, name string) { - if _, ok := protoTypes[name]; ok { + if _, ok := protoTypedNils[name]; ok { // TODO: Some day, make this a panic. log.Printf("proto: duplicate proto type registered: %s", name) return } t := reflect.TypeOf(x) - protoTypes[name] = t + if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 { + // Generated code always calls RegisterType with nil x. + // This check is just for extra safety. + protoTypedNils[name] = x + } else { + protoTypedNils[name] = reflect.Zero(t).Interface().(Message) + } + revProtoTypes[t] = name +} + +// RegisterMapType is called from generated code and maps from the fully qualified +// proto name to the native map type of the proto map definition. +func RegisterMapType(x interface{}, name string) { + if reflect.TypeOf(x).Kind() != reflect.Map { + panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name)) + } + if _, ok := protoMapTypes[name]; ok { + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoMapTypes[name] = t revProtoTypes[t] = name } @@ -951,7 +576,14 @@ func MessageName(x Message) string { } // MessageType returns the message type (pointer to struct) for a named message. -func MessageType(name string) reflect.Type { return protoTypes[name] } +// The type is not guaranteed to implement proto.Message if the name refers to a +// map entry. +func MessageType(name string) reflect.Type { + if t, ok := protoTypedNils[name]; ok { + return reflect.TypeOf(t) + } + return protoMapTypes[name] +} // A registry of all linked proto files. var ( diff --git a/deps/github.com/gogo/protobuf/proto/properties_gogo.go b/deps/github.com/gogo/protobuf/proto/properties_gogo.go index b6b7176c5..40ea3dd93 100644 --- a/deps/github.com/gogo/protobuf/proto/properties_gogo.go +++ b/deps/github.com/gogo/protobuf/proto/properties_gogo.go @@ -1,6 +1,6 @@ // Protocol Buffers for Go with Gadgets // -// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// Copyright (c) 2018, The GoGo Authors. All rights reserved. // http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without @@ -29,83 +29,8 @@ package proto import ( - "fmt" - "os" "reflect" ) -func (p *Properties) setCustomEncAndDec(typ reflect.Type) { - p.ctype = typ - if p.Repeated { - p.enc = (*Buffer).enc_custom_slice_bytes - p.dec = (*Buffer).dec_custom_slice_bytes - p.size = size_custom_slice_bytes - } else if typ.Kind() == reflect.Ptr { - p.enc = (*Buffer).enc_custom_bytes - p.dec = (*Buffer).dec_custom_bytes - p.size = size_custom_bytes - } else { - p.enc = (*Buffer).enc_custom_ref_bytes - p.dec = (*Buffer).dec_custom_ref_bytes - p.size = size_custom_ref_bytes - } -} - -func (p *Properties) setDurationEncAndDec(typ reflect.Type) { - if p.Repeated { - if typ.Elem().Kind() == reflect.Ptr { - p.enc = (*Buffer).enc_slice_duration - p.dec = (*Buffer).dec_slice_duration - p.size = size_slice_duration - } else { - p.enc = (*Buffer).enc_slice_ref_duration - p.dec = (*Buffer).dec_slice_ref_duration - p.size = size_slice_ref_duration - } - } else if typ.Kind() == reflect.Ptr { - p.enc = (*Buffer).enc_duration - p.dec = (*Buffer).dec_duration - p.size = size_duration - } else { - p.enc = (*Buffer).enc_ref_duration - p.dec = (*Buffer).dec_ref_duration - p.size = size_ref_duration - } -} - -func (p *Properties) setTimeEncAndDec(typ reflect.Type) { - if p.Repeated { - if typ.Elem().Kind() == reflect.Ptr { - p.enc = (*Buffer).enc_slice_time - p.dec = (*Buffer).dec_slice_time - p.size = size_slice_time - } else { - p.enc = (*Buffer).enc_slice_ref_time - p.dec = (*Buffer).dec_slice_ref_time - p.size = size_slice_ref_time - } - } else if typ.Kind() == reflect.Ptr { - p.enc = (*Buffer).enc_time - p.dec = (*Buffer).dec_time - p.size = size_time - } else { - p.enc = (*Buffer).enc_ref_time - p.dec = (*Buffer).dec_ref_time - p.size = size_ref_time - } - -} - -func (p *Properties) setSliceOfNonPointerStructs(typ reflect.Type) { - t2 := typ.Elem() - p.sstype = typ - p.stype = t2 - p.isMarshaler = isMarshaler(t2) - p.isUnmarshaler = isUnmarshaler(t2) - p.enc = (*Buffer).enc_slice_ref_struct_message - p.dec = (*Buffer).dec_slice_ref_struct_message - p.size = size_slice_ref_struct_message - if p.Wire != "bytes" { - fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T \n", typ, t2) - } -} +var sizerType = reflect.TypeOf((*Sizer)(nil)).Elem() +var protosizerType = reflect.TypeOf((*ProtoSizer)(nil)).Elem() diff --git a/deps/github.com/gogo/protobuf/proto/proto3_proto/Makefile b/deps/github.com/gogo/protobuf/proto/proto3_proto/Makefile new file mode 100644 index 000000000..158782f0a --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/proto3_proto/Makefile @@ -0,0 +1,7 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=\ + Mtest_proto/test.proto=github.com/gogo/protobuf/proto/test_proto,\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. \ + --proto_path=../../protobuf:../:. proto3.proto + diff --git a/deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go b/deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go new file mode 100644 index 000000000..8b222d216 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go @@ -0,0 +1,461 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package proto3_proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import test_proto "github.com/gogo/protobuf/proto/test_proto" +import types "github.com/gogo/protobuf/types" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Message_Humour int32 + +const ( + Message_UNKNOWN Message_Humour = 0 + Message_PUNS Message_Humour = 1 + Message_SLAPSTICK Message_Humour = 2 + Message_BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (x Message_Humour) String() string { + return proto.EnumName(Message_Humour_name, int32(x)) +} +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_proto3_15962acfc6007607, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"` + ShortKey []int32 `protobuf:"varint,19,rep,packed,name=short_key,json=shortKey" json:"short_key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + RFunny []Message_Humour `protobuf:"varint,16,rep,packed,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"` + Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *test_proto.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[string]*test_proto.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Anything *types.Any `protobuf:"bytes,14,opt,name=anything" json:"anything,omitempty"` + ManyThings []*types.Any `protobuf:"bytes,15,rep,name=many_things,json=manyThings" json:"many_things,omitempty"` + Submessage *Message `protobuf:"bytes,17,opt,name=submessage" json:"submessage,omitempty"` + Children []*Message `protobuf:"bytes,18,rep,name=children" json:"children,omitempty"` + StringMap map[string]string `protobuf:"bytes,20,rep,name=string_map,json=stringMap" json:"string_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_15962acfc6007607, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Message) GetHilarity() Message_Humour { + if m != nil { + return m.Hilarity + } + return Message_UNKNOWN +} + +func (m *Message) GetHeightInCm() uint32 { + if m != nil { + return m.HeightInCm + } + return 0 +} + +func (m *Message) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *Message) GetResultCount() int64 { + if m != nil { + return m.ResultCount + } + return 0 +} + +func (m *Message) GetTrueScotsman() bool { + if m != nil { + return m.TrueScotsman + } + return false +} + +func (m *Message) GetScore() float32 { + if m != nil { + return m.Score + } + return 0 +} + +func (m *Message) GetKey() []uint64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Message) GetShortKey() []int32 { + if m != nil { + return m.ShortKey + } + return nil +} + +func (m *Message) GetNested() *Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *Message) GetRFunny() []Message_Humour { + if m != nil { + return m.RFunny + } + return nil +} + +func (m *Message) GetTerrain() map[string]*Nested { + if m != nil { + return m.Terrain + } + return nil +} + +func (m *Message) GetProto2Field() *test_proto.SubDefaults { + if m != nil { + return m.Proto2Field + } + return nil +} + +func (m *Message) GetProto2Value() map[string]*test_proto.SubDefaults { + if m != nil { + return m.Proto2Value + } + return nil +} + +func (m *Message) GetAnything() *types.Any { + if m != nil { + return m.Anything + } + return nil +} + +func (m *Message) GetManyThings() []*types.Any { + if m != nil { + return m.ManyThings + } + return nil +} + +func (m *Message) GetSubmessage() *Message { + if m != nil { + return m.Submessage + } + return nil +} + +func (m *Message) GetChildren() []*Message { + if m != nil { + return m.Children + } + return nil +} + +func (m *Message) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + Cute bool `protobuf:"varint,2,opt,name=cute,proto3" json:"cute,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (m *Nested) String() string { return proto.CompactTextString(m) } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_15962acfc6007607, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nested.Unmarshal(m, b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return xxx_messageInfo_Nested.Size(m) +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +func (m *Nested) GetBunny() string { + if m != nil { + return m.Bunny + } + return "" +} + +func (m *Nested) GetCute() bool { + if m != nil { + return m.Cute + } + return false +} + +type MessageWithMap struct { + ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_15962acfc6007607, []int{2} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +type IntMap struct { + Rtt map[int32]int32 `protobuf:"bytes,1,rep,name=rtt" json:"rtt,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IntMap) Reset() { *m = IntMap{} } +func (m *IntMap) String() string { return proto.CompactTextString(m) } +func (*IntMap) ProtoMessage() {} +func (*IntMap) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_15962acfc6007607, []int{3} +} +func (m *IntMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IntMap.Unmarshal(m, b) +} +func (m *IntMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IntMap.Marshal(b, m, deterministic) +} +func (dst *IntMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_IntMap.Merge(dst, src) +} +func (m *IntMap) XXX_Size() int { + return xxx_messageInfo_IntMap.Size(m) +} +func (m *IntMap) XXX_DiscardUnknown() { + xxx_messageInfo_IntMap.DiscardUnknown(m) +} + +var xxx_messageInfo_IntMap proto.InternalMessageInfo + +func (m *IntMap) GetRtt() map[int32]int32 { + if m != nil { + return m.Rtt + } + return nil +} + +type IntMaps struct { + Maps []*IntMap `protobuf:"bytes,1,rep,name=maps" json:"maps,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IntMaps) Reset() { *m = IntMaps{} } +func (m *IntMaps) String() string { return proto.CompactTextString(m) } +func (*IntMaps) ProtoMessage() {} +func (*IntMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_15962acfc6007607, []int{4} +} +func (m *IntMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IntMaps.Unmarshal(m, b) +} +func (m *IntMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IntMaps.Marshal(b, m, deterministic) +} +func (dst *IntMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_IntMaps.Merge(dst, src) +} +func (m *IntMaps) XXX_Size() int { + return xxx_messageInfo_IntMaps.Size(m) +} +func (m *IntMaps) XXX_DiscardUnknown() { + xxx_messageInfo_IntMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_IntMaps proto.InternalMessageInfo + +func (m *IntMaps) GetMaps() []*IntMap { + if m != nil { + return m.Maps + } + return nil +} + +func init() { + proto.RegisterType((*Message)(nil), "proto3_proto.Message") + proto.RegisterMapType((map[string]*test_proto.SubDefaults)(nil), "proto3_proto.Message.Proto2ValueEntry") + proto.RegisterMapType((map[string]string)(nil), "proto3_proto.Message.StringMapEntry") + proto.RegisterMapType((map[string]*Nested)(nil), "proto3_proto.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "proto3_proto.Nested") + proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "proto3_proto.MessageWithMap.ByteMappingEntry") + proto.RegisterType((*IntMap)(nil), "proto3_proto.IntMap") + proto.RegisterMapType((map[int32]int32)(nil), "proto3_proto.IntMap.RttEntry") + proto.RegisterType((*IntMaps)(nil), "proto3_proto.IntMaps") + proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) +} + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_15962acfc6007607) } + +var fileDescriptor_proto3_15962acfc6007607 = []byte{ + // 771 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xff, 0x6e, 0xe3, 0x44, + 0x10, 0xc7, 0x71, 0x9c, 0x1f, 0xce, 0xd8, 0xed, 0x99, 0x25, 0x27, 0x96, 0x00, 0x92, 0x09, 0x08, + 0x59, 0x88, 0x73, 0x21, 0xa7, 0xa2, 0xd3, 0xe9, 0x04, 0x6a, 0xcb, 0x9d, 0x88, 0xda, 0x86, 0x68, + 0xd3, 0xa3, 0xe2, 0x2f, 0x6b, 0x93, 0x6e, 0x12, 0x8b, 0x78, 0x1d, 0xbc, 0x6b, 0x24, 0xbf, 0x00, + 0x0f, 0xc2, 0x93, 0xa2, 0xdd, 0x75, 0x72, 0xce, 0xc9, 0x85, 0xbf, 0xbc, 0x33, 0xfe, 0xcc, 0x7c, + 0x67, 0x67, 0xc6, 0x06, 0x6f, 0x97, 0x67, 0x32, 0x7b, 0x1e, 0xe9, 0x07, 0xaa, 0xac, 0x58, 0x3f, + 0x86, 0x9f, 0xac, 0xb3, 0x6c, 0xbd, 0x65, 0x67, 0xda, 0x5a, 0x14, 0xab, 0x33, 0xca, 0x4b, 0x03, + 0x0e, 0x9f, 0x4a, 0x26, 0xa4, 0xc1, 0xce, 0xd4, 0xd1, 0xb8, 0x47, 0x7f, 0xf7, 0xa1, 0x77, 0xcb, + 0x84, 0xa0, 0x6b, 0x86, 0x10, 0xb4, 0x39, 0x4d, 0x19, 0xb6, 0x02, 0x2b, 0xec, 0x13, 0x7d, 0x46, + 0x2f, 0xc0, 0xd9, 0x24, 0x5b, 0x9a, 0x27, 0xb2, 0xc4, 0xad, 0xc0, 0x0a, 0x4f, 0xc7, 0x9f, 0x45, + 0x75, 0xc9, 0xa8, 0x0a, 0x8e, 0x7e, 0x29, 0xd2, 0xac, 0xc8, 0xc9, 0x81, 0x46, 0x01, 0x78, 0x1b, + 0x96, 0xac, 0x37, 0x32, 0x4e, 0x78, 0xbc, 0x4c, 0xb1, 0x1d, 0x58, 0xe1, 0x09, 0x01, 0xe3, 0x9b, + 0xf0, 0xab, 0x54, 0xe9, 0x3d, 0x50, 0x49, 0x71, 0x3b, 0xb0, 0x42, 0x8f, 0xe8, 0x33, 0xfa, 0x02, + 0xbc, 0x9c, 0x89, 0x62, 0x2b, 0xe3, 0x65, 0x56, 0x70, 0x89, 0x7b, 0x81, 0x15, 0xda, 0xc4, 0x35, + 0xbe, 0x2b, 0xe5, 0x42, 0x5f, 0xc2, 0x89, 0xcc, 0x0b, 0x16, 0x8b, 0x65, 0x26, 0x45, 0x4a, 0x39, + 0x76, 0x02, 0x2b, 0x74, 0x88, 0xa7, 0x9c, 0xf3, 0xca, 0x87, 0x06, 0xd0, 0x11, 0xcb, 0x2c, 0x67, + 0xb8, 0x1f, 0x58, 0x61, 0x8b, 0x18, 0x03, 0xf9, 0x60, 0xff, 0xc1, 0x4a, 0xdc, 0x09, 0xec, 0xb0, + 0x4d, 0xd4, 0x11, 0x7d, 0x0a, 0x7d, 0xb1, 0xc9, 0x72, 0x19, 0x2b, 0xff, 0x47, 0x81, 0x1d, 0x76, + 0x88, 0xa3, 0x1d, 0xd7, 0xac, 0x44, 0xdf, 0x42, 0x97, 0x33, 0x21, 0xd9, 0x03, 0xee, 0x06, 0x56, + 0xe8, 0x8e, 0x07, 0xc7, 0x57, 0x9f, 0xea, 0x77, 0xa4, 0x62, 0xd0, 0x39, 0xf4, 0xf2, 0x78, 0x55, + 0x70, 0x5e, 0x62, 0x3f, 0xb0, 0xff, 0xb7, 0x53, 0xdd, 0xfc, 0x8d, 0x62, 0xd1, 0x2b, 0xe8, 0x49, + 0x96, 0xe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fe, 0x84, 0xee, 0x84, + 0x4b, 0x55, 0xdb, 0x19, 0xd8, 0xb9, 0x94, 0x55, 0x49, 0x9f, 0x1f, 0x97, 0x64, 0x90, 0x88, 0x48, + 0x69, 0x4a, 0x50, 0xe4, 0xf0, 0x07, 0x70, 0xf6, 0x8e, 0xba, 0x64, 0xa7, 0x41, 0xb2, 0x53, 0x97, + 0x7c, 0x0e, 0x3d, 0x93, 0x4f, 0xa0, 0x10, 0xda, 0x29, 0xdd, 0x89, 0x4a, 0x74, 0xd0, 0x24, 0x4a, + 0x34, 0xb1, 0xe8, 0x9a, 0x57, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x90, 0xaf, 0xe7, 0x60, + 0x06, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto b/deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto new file mode 100644 index 000000000..c81fe1e5e --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto @@ -0,0 +1,89 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +import "google/protobuf/any.proto"; +import "test_proto/test.proto"; + +package proto3_proto; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + repeated int32 short_key = 19; + Nested nested = 6; + repeated Humour r_funny = 16; + + map terrain = 10; + test_proto.SubDefaults proto2_field = 11; + map proto2_value = 13; + + google.protobuf.Any anything = 14; + repeated google.protobuf.Any many_things = 15; + + Message submessage = 17; + repeated Message children = 18; + + map string_map = 20; +} + +message Nested { + string bunny = 1; + bool cute = 2; +} + +message MessageWithMap { + map byte_mapping = 1; +} + + +message IntMap { + map rtt = 1; +} + +message IntMaps { + repeated IntMap maps = 1; +} diff --git a/deps/github.com/gogo/protobuf/proto/proto3_test.go b/deps/github.com/gogo/protobuf/proto/proto3_test.go new file mode 100644 index 000000000..3909aebc5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/proto3_test.go @@ -0,0 +1,151 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "bytes" + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/proto/proto3_proto" + tpb "github.com/gogo/protobuf/proto/test_proto" +) + +func TestProto3ZeroValues(t *testing.T) { + tests := []struct { + desc string + m proto.Message + }{ + {"zero message", &pb.Message{}}, + {"empty bytes field", &pb.Message{Data: []byte{}}}, + } + for _, test := range tests { + b, err := proto.Marshal(test.m) + if err != nil { + t.Errorf("%s: proto.Marshal: %v", test.desc, err) + continue + } + if len(b) > 0 { + t.Errorf("%s: Encoding is non-empty: %q", test.desc, b) + } + } +} + +func TestRoundTripProto3(t *testing.T) { + m := &pb.Message{ + Name: "David", // (2 | 1<<3): 0x0a 0x05 "David" + Hilarity: pb.Message_PUNS, // (0 | 2<<3): 0x10 0x01 + HeightInCm: 178, // (0 | 3<<3): 0x18 0xb2 0x01 + Data: []byte("roboto"), // (2 | 4<<3): 0x20 0x06 "roboto" + ResultCount: 47, // (0 | 7<<3): 0x38 0x2f + TrueScotsman: true, // (0 | 8<<3): 0x40 0x01 + Score: 8.1, // (5 | 9<<3): 0x4d <8.1> + + Key: []uint64{1, 0xdeadbeef}, + Nested: &pb.Nested{ + Bunny: "Monty", + }, + } + t.Logf(" m: %v", m) + + b, err := proto.Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal: %v", err) + } + t.Logf(" b: %q", b) + + m2 := new(pb.Message) + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatalf("proto.Unmarshal: %v", err) + } + t.Logf("m2: %v", m2) + + if !proto.Equal(m, m2) { + t.Errorf("proto.Equal returned false:\n m: %v\nm2: %v", m, m2) + } +} + +func TestGettersForBasicTypesExist(t *testing.T) { + var m pb.Message + if got := m.GetNested().GetBunny(); got != "" { + t.Errorf("m.GetNested().GetBunny() = %q, want empty string", got) + } + if got := m.GetNested().GetCute(); got { + t.Errorf("m.GetNested().GetCute() = %t, want false", got) + } +} + +func TestProto3SetDefaults(t *testing.T) { + in := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: new(tpb.SubDefaults), + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": new(tpb.SubDefaults), + }, + } + + got := proto.Clone(in).(*pb.Message) + proto.SetDefaults(got) + + // There are no defaults in proto3. Everything should be the zero value, but + // we need to remember to set defaults for nested proto2 messages. + want := &pb.Message{ + Terrain: map[string]*pb.Nested{ + "meadow": new(pb.Nested), + }, + Proto2Field: &tpb.SubDefaults{N: proto.Int64(7)}, + Proto2Value: map[string]*tpb.SubDefaults{ + "badlands": {N: proto.Int64(7)}, + }, + } + + if !proto.Equal(got, want) { + t.Errorf("with in = %v\nproto.SetDefaults(in) =>\ngot %v\nwant %v", in, got, want) + } +} + +func TestUnknownFieldPreservation(t *testing.T) { + b1 := "\x0a\x05David" // Known tag 1 + b2 := "\xc2\x0c\x06Google" // Unknown tag 200 + b := []byte(b1 + b2) + + m := new(pb.Message) + if err := proto.Unmarshal(b, m); err != nil { + t.Fatalf("proto.Unmarshal: %v", err) + } + + if !bytes.Equal(m.XXX_unrecognized, []byte(b2)) { + t.Fatalf("mismatching unknown fields:\ngot %q\nwant %q", m.XXX_unrecognized, b2) + } +} diff --git a/deps/github.com/gogo/protobuf/proto/size2_test.go b/deps/github.com/gogo/protobuf/proto/size2_test.go new file mode 100644 index 000000000..7846b0617 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/size2_test.go @@ -0,0 +1,63 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "testing" +) + +// This is a separate file and package from size_test.go because that one uses +// generated messages and thus may not be in package proto without having a circular +// dependency, whereas this file tests unexported details of size.go. + +func TestVarintSize(t *testing.T) { + // Check the edge cases carefully. + testCases := []struct { + n uint64 + size int + }{ + {0, 1}, + {1, 1}, + {127, 1}, + {128, 2}, + {16383, 2}, + {16384, 3}, + {1<<63 - 1, 9}, + {1 << 63, 10}, + } + for _, tc := range testCases { + size := SizeVarint(tc.n) + if size != tc.size { + t.Errorf("sizeVarint(%d) = %d, want %d", tc.n, size, tc.size) + } + } +} diff --git a/deps/github.com/gogo/protobuf/proto/size_test.go b/deps/github.com/gogo/protobuf/proto/size_test.go new file mode 100644 index 000000000..121e26bcc --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/size_test.go @@ -0,0 +1,190 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "log" + "strings" + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/test_proto" +) + +var messageWithExtension1 = &pb.MyMessage{Count: Int32(7)} + +// messageWithExtension2 is in equal_test.go. +var messageWithExtension3 = &pb.MyMessage{Count: Int32(8)} + +func init() { + if err := SetExtension(messageWithExtension1, pb.E_Ext_More, &pb.Ext{Data: String("Abbott")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + if err := SetExtension(messageWithExtension3, pb.E_Ext_More, &pb.Ext{Data: String("Costello")}); err != nil { + log.Panicf("SetExtension: %v", err) + } + + // Force messageWithExtension3 to have the extension encoded. + Marshal(messageWithExtension3) + +} + +// non-pointer custom message +type nonptrMessage struct{} + +func (m nonptrMessage) ProtoMessage() {} +func (m nonptrMessage) Reset() {} +func (m nonptrMessage) String() string { return "" } + +func (m nonptrMessage) Marshal() ([]byte, error) { + return []byte{42}, nil +} + +// custom message embedding a proto.Message +type messageWithEmbedding struct { + *pb.OtherMessage +} + +func (m *messageWithEmbedding) ProtoMessage() {} +func (m *messageWithEmbedding) Reset() {} +func (m *messageWithEmbedding) String() string { return "" } + +func (m *messageWithEmbedding) Marshal() ([]byte, error) { + return []byte{42}, nil +} + +var SizeTests = []struct { + desc string + pb Message +}{ + {"empty", &pb.OtherMessage{}}, + // Basic types. + {"bool", &pb.Defaults{F_Bool: Bool(true)}}, + {"int32", &pb.Defaults{F_Int32: Int32(12)}}, + {"negative int32", &pb.Defaults{F_Int32: Int32(-1)}}, + {"small int64", &pb.Defaults{F_Int64: Int64(1)}}, + {"big int64", &pb.Defaults{F_Int64: Int64(1 << 20)}}, + {"negative int64", &pb.Defaults{F_Int64: Int64(-1)}}, + {"fixed32", &pb.Defaults{F_Fixed32: Uint32(71)}}, + {"fixed64", &pb.Defaults{F_Fixed64: Uint64(72)}}, + {"uint32", &pb.Defaults{F_Uint32: Uint32(123)}}, + {"uint64", &pb.Defaults{F_Uint64: Uint64(124)}}, + {"float", &pb.Defaults{F_Float: Float32(12.6)}}, + {"double", &pb.Defaults{F_Double: Float64(13.9)}}, + {"string", &pb.Defaults{F_String: String("niles")}}, + {"bytes", &pb.Defaults{F_Bytes: []byte("wowsa")}}, + {"bytes, empty", &pb.Defaults{F_Bytes: []byte{}}}, + {"sint32", &pb.Defaults{F_Sint32: Int32(65)}}, + {"sint64", &pb.Defaults{F_Sint64: Int64(67)}}, + {"enum", &pb.Defaults{F_Enum: pb.Defaults_BLUE.Enum()}}, + // Repeated. + {"empty repeated bool", &pb.MoreRepeated{Bools: []bool{}}}, + {"repeated bool", &pb.MoreRepeated{Bools: []bool{false, true, true, false}}}, + {"packed repeated bool", &pb.MoreRepeated{BoolsPacked: []bool{false, true, true, false, true, true, true}}}, + {"repeated int32", &pb.MoreRepeated{Ints: []int32{1, 12203, 1729, -1}}}, + {"repeated int32 packed", &pb.MoreRepeated{IntsPacked: []int32{1, 12203, 1729}}}, + {"repeated int64 packed", &pb.MoreRepeated{Int64SPacked: []int64{ + // Need enough large numbers to verify that the header is counting the number of bytes + // for the field, not the number of elements. + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, 1 << 62, + }}}, + {"repeated string", &pb.MoreRepeated{Strings: []string{"r", "ken", "gri"}}}, + {"repeated fixed", &pb.MoreRepeated{Fixeds: []uint32{1, 2, 3, 4}}}, + // Nested. + {"nested", &pb.OldMessage{Nested: &pb.OldMessage_Nested{Name: String("whatever")}}}, + {"group", &pb.GroupOld{G: &pb.GroupOld_G{X: Int32(12345)}}}, + // Other things. + {"unrecognized", &pb.MoreRepeated{XXX_unrecognized: []byte{13<<3 | 0, 4}}}, + {"extension (unencoded)", messageWithExtension1}, + {"extension (encoded)", messageWithExtension3}, + // proto3 message + {"proto3 empty", &proto3pb.Message{}}, + {"proto3 bool", &proto3pb.Message{TrueScotsman: true}}, + {"proto3 int64", &proto3pb.Message{ResultCount: 1}}, + {"proto3 uint32", &proto3pb.Message{HeightInCm: 123}}, + {"proto3 float", &proto3pb.Message{Score: 12.6}}, + {"proto3 string", &proto3pb.Message{Name: "Snezana"}}, + {"proto3 bytes", &proto3pb.Message{Data: []byte("wowsa")}}, + {"proto3 bytes, empty", &proto3pb.Message{Data: []byte{}}}, + {"proto3 enum", &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 map field with empty bytes", &proto3pb.MessageWithMap{ByteMapping: map[bool][]byte{false: {}}}}, + + {"map field", &pb.MessageWithMap{NameMapping: map[int32]string{1: "Rob", 7: "Andrew"}}}, + {"map field with message", &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{0x7001: {F: Float64(2.0)}}}}, + {"map field with bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: []byte("this time for sure")}}}, + {"map field with empty bytes", &pb.MessageWithMap{ByteMapping: map[bool][]byte{true: {}}}}, + + {"map field with big entry", &pb.MessageWithMap{NameMapping: map[int32]string{8: strings.Repeat("x", 125)}}}, + {"map field with big key and val", &pb.MessageWithMap{StrToStr: map[string]string{strings.Repeat("x", 70): strings.Repeat("y", 70)}}}, + {"map field with big numeric key", &pb.MessageWithMap{NameMapping: map[int32]string{0xf00d: "om nom nom"}}}, + + {"oneof not set", &pb.Oneof{}}, + {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{F_Bool: true}}}, + {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 0}}}, + {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1 << 20}}}, + {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{F_Int64: 42}}}, + {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{F_Fixed32: 43}}}, + {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{F_Fixed64: 44}}}, + {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{F_Uint32: 45}}}, + {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{F_Uint64: 46}}}, + {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{F_Float: 47.1}}}, + {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{F_Double: 48.9}}}, + {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{F_String: "Rhythmic Fman"}}}, + {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{F_Bytes: []byte("let go")}}}, + {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{F_Sint32: 50}}}, + {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{F_Sint64: 51}}}, + {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{F_Enum: pb.MyMessage_BLUE}}}, + {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}}, + {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{F_Message: &pb.GoTestField{Label: String("k"), Type: String("v")}}}}, + {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{FGroup: &pb.Oneof_F_Group{X: Int32(52)}}}}, + {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{F_Largest_Tag: 1}}}, + {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1}, Tormato: &pb.Oneof_Value{Value: 2}}}, + {"non-pointer message", nonptrMessage{}}, + {"custom message with embedding", &messageWithEmbedding{&pb.OtherMessage{}}}, +} + +func TestSize(t *testing.T) { + for _, tc := range SizeTests { + size := Size(tc.pb) + b, err := Marshal(tc.pb) + if err != nil { + t.Errorf("%v: Marshal failed: %v", tc.desc, err) + continue + } + if size != len(b) { + t.Errorf("%v: Size(%v) = %d, want %d", tc.desc, tc.pb, size, len(b)) + t.Logf("%v: bytes: %#v", tc.desc, b) + } + } +} diff --git a/deps/github.com/gogo/protobuf/proto/table_marshal.go b/deps/github.com/gogo/protobuf/proto/table_marshal.go new file mode 100644 index 000000000..3d233d191 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/table_marshal.go @@ -0,0 +1,2799 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "errors" + "fmt" + "math" + "reflect" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// a sizer takes a pointer to a field and the size of its tag, computes the size of +// the encoded data. +type sizer func(pointer, int) int + +// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format), +// marshals the field to the end of the slice, returns the slice and error (if any). +type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) + +// marshalInfo is the information used for marshaling a message. +type marshalInfo struct { + typ reflect.Type + fields []*marshalFieldInfo + unrecognized field // offset of XXX_unrecognized + extensions field // offset of XXX_InternalExtensions + v1extensions field // offset of XXX_extensions + sizecache field // offset of XXX_sizecache + initialized int32 // 0 -- only typ is set, 1 -- fully initialized + messageset bool // uses message set wire format + hasmarshaler bool // has custom marshaler + sync.RWMutex // protect extElems map, also for initialization + extElems map[int32]*marshalElemInfo // info of extension elements + + hassizer bool // has custom sizer + hasprotosizer bool // has custom protosizer + + bytesExtensions field // offset of XXX_extensions where the field type is []byte +} + +// marshalFieldInfo is the information used for marshaling a field of a message. +type marshalFieldInfo struct { + field field + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isPointer bool + required bool // field is required + name string // name of the field, for error reporting + oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements +} + +// marshalElemInfo is the information used for marshaling an extension or oneof element. +type marshalElemInfo struct { + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only) +} + +var ( + marshalInfoMap = map[reflect.Type]*marshalInfo{} + marshalInfoLock sync.Mutex +) + +// getMarshalInfo returns the information to marshal a given type of message. +// The info it returns may not necessarily initialized. +// t is the type of the message (NOT the pointer to it). +func getMarshalInfo(t reflect.Type) *marshalInfo { + marshalInfoLock.Lock() + u, ok := marshalInfoMap[t] + if !ok { + u = &marshalInfo{typ: t} + marshalInfoMap[t] = u + } + marshalInfoLock.Unlock() + return u +} + +// Size is the entry point from generated code, +// and should be ONLY called by generated code. +// It computes the size of encoded data of msg. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Size(msg Message) int { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return 0 + } + return u.size(ptr) +} + +// Marshal is the entry point from generated code, +// and should be ONLY called by generated code. +// It marshals msg to the end of b. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return b, ErrNil + } + return u.marshal(b, ptr, deterministic) +} + +func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo { + // u := a.marshal, but atomically. + // We use an atomic here to ensure memory consistency. + u := atomicLoadMarshalInfo(&a.marshal) + if u == nil { + // Get marshal information from type of message. + t := reflect.ValueOf(msg).Type() + if t.Kind() != reflect.Ptr { + panic(fmt.Sprintf("cannot handle non-pointer message type %v", t)) + } + u = getMarshalInfo(t.Elem()) + // Store it in the cache for later users. + // a.marshal = u, but atomically. + atomicStoreMarshalInfo(&a.marshal, u) + } + return u +} + +// size is the main function to compute the size of the encoded data of a message. +// ptr is the pointer to the message. +func (u *marshalInfo) size(ptr pointer) int { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + // Uses the message's Size method if available + if u.hassizer { + s := ptr.asPointerTo(u.typ).Interface().(Sizer) + return s.Size() + } + // Uses the message's ProtoSize method if available + if u.hasprotosizer { + s := ptr.asPointerTo(u.typ).Interface().(ProtoSizer) + return s.ProtoSize() + } + + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b, _ := m.Marshal() + return len(b) + } + + n := 0 + for _, f := range u.fields { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + n += f.sizer(ptr.offset(f.field), f.tagsize) + } + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + n += u.sizeMessageSet(e) + } else { + n += u.sizeExtensions(e) + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + n += u.sizeV1Extensions(m) + } + if u.bytesExtensions.IsValid() { + s := *ptr.offset(u.bytesExtensions).toBytes() + n += len(s) + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + n += len(s) + } + + // cache the result for use in marshal + if u.sizecache.IsValid() { + atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n)) + } + return n +} + +// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated), +// fall back to compute the size. +func (u *marshalInfo) cachedsize(ptr pointer) int { + if u.sizecache.IsValid() { + return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32())) + } + return u.size(ptr) +} + +// marshal is the main function to marshal a message. It takes a byte slice and appends +// the encoded data to the end of the slice, returns the slice and error (if any). +// ptr is the pointer to the message. +// If deterministic is true, map is marshaled in deterministic order. +func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + if deterministic { + return nil, errors.New("proto: deterministic not supported by the Marshal method of " + u.typ.String()) + } + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b1, err := m.Marshal() + b = append(b, b1...) + return b, err + } + + var err, errreq error + // The old marshaler encodes extensions at beginning. + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + b, err = u.appendMessageSet(b, e, deterministic) + } else { + b, err = u.appendExtensions(b, e, deterministic) + } + if err != nil { + return b, err + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + b, err = u.appendV1Extensions(b, m, deterministic) + if err != nil { + return b, err + } + } + if u.bytesExtensions.IsValid() { + s := *ptr.offset(u.bytesExtensions).toBytes() + b = append(b, s...) + } + for _, f := range u.fields { + if f.required && errreq == nil { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // Required field is not set. + // We record the error but keep going, to give a complete marshaling. + errreq = &RequiredNotSetError{f.name} + continue + } + } + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic) + if err != nil { + if err1, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = &RequiredNotSetError{f.name + "." + err1.field} + } + continue + } + if err == errRepeatedHasNil { + err = errors.New("proto: repeated field " + f.name + " has nil element") + } + return b, err + } + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + b = append(b, s...) + } + return b, errreq +} + +// computeMarshalInfo initializes the marshal info. +func (u *marshalInfo) computeMarshalInfo() { + u.Lock() + defer u.Unlock() + if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock + return + } + + t := u.typ + u.unrecognized = invalidField + u.extensions = invalidField + u.v1extensions = invalidField + u.bytesExtensions = invalidField + u.sizecache = invalidField + isOneofMessage := false + + if reflect.PtrTo(t).Implements(sizerType) { + u.hassizer = true + } + if reflect.PtrTo(t).Implements(protosizerType) { + u.hasprotosizer = true + } + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if reflect.PtrTo(t).Implements(marshalerType) { + u.hasmarshaler = true + atomic.StoreInt32(&u.initialized, 1) + return + } + + n := t.NumField() + + // deal with XXX fields first + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Tag.Get("protobuf_oneof") != "" { + isOneofMessage = true + } + if !strings.HasPrefix(f.Name, "XXX_") { + continue + } + switch f.Name { + case "XXX_sizecache": + u.sizecache = toField(&f) + case "XXX_unrecognized": + u.unrecognized = toField(&f) + case "XXX_InternalExtensions": + u.extensions = toField(&f) + u.messageset = f.Tag.Get("protobuf_messageset") == "1" + case "XXX_extensions": + if f.Type.Kind() == reflect.Map { + u.v1extensions = toField(&f) + } else { + u.bytesExtensions = toField(&f) + } + case "XXX_NoUnkeyedLiteral": + // nothing to do + default: + panic("unknown XXX field: " + f.Name) + } + n-- + } + + // get oneof implementers + var oneofImplementers []interface{} + // gogo: isOneofMessage is needed for embedded oneof messages, without a marshaler and unmarshaler + if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok && isOneofMessage { + _, _, _, oneofImplementers = m.XXX_OneofFuncs() + } + + // normal fields + fields := make([]marshalFieldInfo, n) // batch allocation + u.fields = make([]*marshalFieldInfo, 0, n) + for i, j := 0, 0; i < t.NumField(); i++ { + f := t.Field(i) + + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + field := &fields[j] + j++ + field.name = f.Name + u.fields = append(u.fields, field) + if f.Tag.Get("protobuf_oneof") != "" { + field.computeOneofFieldInfo(&f, oneofImplementers) + continue + } + if f.Tag.Get("protobuf") == "" { + // field has no tag (not in generated message), ignore it + u.fields = u.fields[:len(u.fields)-1] + j-- + continue + } + field.computeMarshalFieldInfo(&f) + } + + // fields are marshaled in tag order on the wire. + sort.Sort(byTag(u.fields)) + + atomic.StoreInt32(&u.initialized, 1) +} + +// helper for sorting fields by tag +type byTag []*marshalFieldInfo + +func (a byTag) Len() int { return len(a) } +func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag } + +// getExtElemInfo returns the information to marshal an extension element. +// The info it returns is initialized. +func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo { + // get from cache first + u.RLock() + e, ok := u.extElems[desc.Field] + u.RUnlock() + if ok { + return e + } + + t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct + tags := strings.Split(desc.Tag, ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizr, marshalr := typeMarshaler(t, tags, false, false) + e = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizr, + marshaler: marshalr, + isptr: t.Kind() == reflect.Ptr, + } + + // update cache + u.Lock() + if u.extElems == nil { + u.extElems = make(map[int32]*marshalElemInfo) + } + u.extElems[desc.Field] = e + u.Unlock() + return e +} + +// computeMarshalFieldInfo fills up the information to marshal a field. +func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) { + // parse protobuf tag of the field. + // tag has format of "bytes,49,opt,name=foo,def=hello!" + tags := strings.Split(f.Tag.Get("protobuf"), ",") + if tags[0] == "" { + return + } + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + if tags[2] == "req" { + fi.required = true + } + fi.setTag(f, tag, wt) + fi.setMarshaler(f, tags) +} + +func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) { + fi.field = toField(f) + fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. + fi.isPointer = true + fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f) + fi.oneofElems = make(map[reflect.Type]*marshalElemInfo) + + ityp := f.Type // interface type + for _, o := range oneofImplementers { + t := reflect.TypeOf(o) + if !t.Implements(ityp) { + continue + } + sf := t.Elem().Field(0) // oneof implementer is a struct with a single field + tags := strings.Split(sf.Tag.Get("protobuf"), ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizr, marshalr := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value + fi.oneofElems[t.Elem()] = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizr, + marshaler: marshalr, + } + } +} + +type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) +} + +// wiretype returns the wire encoding of the type. +func wiretype(encoding string) uint64 { + switch encoding { + case "fixed32": + return WireFixed32 + case "fixed64": + return WireFixed64 + case "varint", "zigzag32", "zigzag64": + return WireVarint + case "bytes": + return WireBytes + case "group": + return WireStartGroup + } + panic("unknown wire type " + encoding) +} + +// setTag fills up the tag (in wire format) and its size in the info of a field. +func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) { + fi.field = toField(f) + fi.wiretag = uint64(tag)<<3 | wt + fi.tagsize = SizeVarint(uint64(tag) << 3) +} + +// setMarshaler fills up the sizer and marshaler in the info of a field. +func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) { + switch f.Type.Kind() { + case reflect.Map: + // map field + fi.isPointer = true + fi.sizer, fi.marshaler = makeMapMarshaler(f) + return + case reflect.Ptr, reflect.Slice: + fi.isPointer = true + } + fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false) +} + +// typeMarshaler returns the sizer and marshaler of a given field. +// t is the type of the field. +// tags is the generated "protobuf" tag of the field. +// If nozero is true, zero value is not marshaled to the wire. +// If oneof is true, it is a oneof field. +func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) { + encoding := tags[0] + + pointer := false + slice := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + packed := false + proto3 := false + ctype := false + isTime := false + isDuration := false + for i := 2; i < len(tags); i++ { + if tags[i] == "packed" { + packed = true + } + if tags[i] == "proto3" { + proto3 = true + } + if strings.HasPrefix(tags[i], "customtype=") { + ctype = true + } + if tags[i] == "stdtime" { + isTime = true + } + if tags[i] == "stdduration" { + isDuration = true + } + } + if !proto3 && !pointer && !slice { + nozero = false + } + + if ctype { + if reflect.PtrTo(t).Implements(customType) { + if slice { + return makeMessageRefSliceMarshaler(getMarshalInfo(t)) + } + if pointer { + return makeCustomPtrMarshaler(getMarshalInfo(t)) + } + return makeCustomMarshaler(getMarshalInfo(t)) + } else { + panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t)) + } + } + + if isTime { + if pointer { + if slice { + return makeTimePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeTimePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeTimeSliceMarshaler(getMarshalInfo(t)) + } + return makeTimeMarshaler(getMarshalInfo(t)) + } + + if isDuration { + if pointer { + if slice { + return makeDurationPtrSliceMarshaler(getMarshalInfo(t)) + } + return makeDurationPtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeDurationSliceMarshaler(getMarshalInfo(t)) + } + return makeDurationMarshaler(getMarshalInfo(t)) + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return sizeBoolPtr, appendBoolPtr + } + if slice { + if packed { + return sizeBoolPackedSlice, appendBoolPackedSlice + } + return sizeBoolSlice, appendBoolSlice + } + if nozero { + return sizeBoolValueNoZero, appendBoolValueNoZero + } + return sizeBoolValue, appendBoolValue + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixed32Ptr, appendFixed32Ptr + } + if slice { + if packed { + return sizeFixed32PackedSlice, appendFixed32PackedSlice + } + return sizeFixed32Slice, appendFixed32Slice + } + if nozero { + return sizeFixed32ValueNoZero, appendFixed32ValueNoZero + } + return sizeFixed32Value, appendFixed32Value + case "varint": + if pointer { + return sizeVarint32Ptr, appendVarint32Ptr + } + if slice { + if packed { + return sizeVarint32PackedSlice, appendVarint32PackedSlice + } + return sizeVarint32Slice, appendVarint32Slice + } + if nozero { + return sizeVarint32ValueNoZero, appendVarint32ValueNoZero + } + return sizeVarint32Value, appendVarint32Value + } + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixedS32Ptr, appendFixedS32Ptr + } + if slice { + if packed { + return sizeFixedS32PackedSlice, appendFixedS32PackedSlice + } + return sizeFixedS32Slice, appendFixedS32Slice + } + if nozero { + return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero + } + return sizeFixedS32Value, appendFixedS32Value + case "varint": + if pointer { + return sizeVarintS32Ptr, appendVarintS32Ptr + } + if slice { + if packed { + return sizeVarintS32PackedSlice, appendVarintS32PackedSlice + } + return sizeVarintS32Slice, appendVarintS32Slice + } + if nozero { + return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero + } + return sizeVarintS32Value, appendVarintS32Value + case "zigzag32": + if pointer { + return sizeZigzag32Ptr, appendZigzag32Ptr + } + if slice { + if packed { + return sizeZigzag32PackedSlice, appendZigzag32PackedSlice + } + return sizeZigzag32Slice, appendZigzag32Slice + } + if nozero { + return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero + } + return sizeZigzag32Value, appendZigzag32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixed64Ptr, appendFixed64Ptr + } + if slice { + if packed { + return sizeFixed64PackedSlice, appendFixed64PackedSlice + } + return sizeFixed64Slice, appendFixed64Slice + } + if nozero { + return sizeFixed64ValueNoZero, appendFixed64ValueNoZero + } + return sizeFixed64Value, appendFixed64Value + case "varint": + if pointer { + return sizeVarint64Ptr, appendVarint64Ptr + } + if slice { + if packed { + return sizeVarint64PackedSlice, appendVarint64PackedSlice + } + return sizeVarint64Slice, appendVarint64Slice + } + if nozero { + return sizeVarint64ValueNoZero, appendVarint64ValueNoZero + } + return sizeVarint64Value, appendVarint64Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixedS64Ptr, appendFixedS64Ptr + } + if slice { + if packed { + return sizeFixedS64PackedSlice, appendFixedS64PackedSlice + } + return sizeFixedS64Slice, appendFixedS64Slice + } + if nozero { + return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero + } + return sizeFixedS64Value, appendFixedS64Value + case "varint": + if pointer { + return sizeVarintS64Ptr, appendVarintS64Ptr + } + if slice { + if packed { + return sizeVarintS64PackedSlice, appendVarintS64PackedSlice + } + return sizeVarintS64Slice, appendVarintS64Slice + } + if nozero { + return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero + } + return sizeVarintS64Value, appendVarintS64Value + case "zigzag64": + if pointer { + return sizeZigzag64Ptr, appendZigzag64Ptr + } + if slice { + if packed { + return sizeZigzag64PackedSlice, appendZigzag64PackedSlice + } + return sizeZigzag64Slice, appendZigzag64Slice + } + if nozero { + return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero + } + return sizeZigzag64Value, appendZigzag64Value + } + case reflect.Float32: + if pointer { + return sizeFloat32Ptr, appendFloat32Ptr + } + if slice { + if packed { + return sizeFloat32PackedSlice, appendFloat32PackedSlice + } + return sizeFloat32Slice, appendFloat32Slice + } + if nozero { + return sizeFloat32ValueNoZero, appendFloat32ValueNoZero + } + return sizeFloat32Value, appendFloat32Value + case reflect.Float64: + if pointer { + return sizeFloat64Ptr, appendFloat64Ptr + } + if slice { + if packed { + return sizeFloat64PackedSlice, appendFloat64PackedSlice + } + return sizeFloat64Slice, appendFloat64Slice + } + if nozero { + return sizeFloat64ValueNoZero, appendFloat64ValueNoZero + } + return sizeFloat64Value, appendFloat64Value + case reflect.String: + if pointer { + return sizeStringPtr, appendStringPtr + } + if slice { + return sizeStringSlice, appendStringSlice + } + if nozero { + return sizeStringValueNoZero, appendStringValueNoZero + } + return sizeStringValue, appendStringValue + case reflect.Slice: + if slice { + return sizeBytesSlice, appendBytesSlice + } + if oneof { + // Oneof bytes field may also have "proto3" tag. + // We want to marshal it as a oneof field. Do this + // check before the proto3 check. + return sizeBytesOneof, appendBytesOneof + } + if proto3 { + return sizeBytes3, appendBytes3 + } + return sizeBytes, appendBytes + case reflect.Struct: + switch encoding { + case "group": + if slice { + return makeGroupSliceMarshaler(getMarshalInfo(t)) + } + return makeGroupMarshaler(getMarshalInfo(t)) + case "bytes": + if pointer { + if slice { + return makeMessageSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageMarshaler(getMarshalInfo(t)) + } else { + if slice { + return makeMessageRefSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageRefMarshaler(getMarshalInfo(t)) + } + } + } + panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding)) +} + +// Below are functions to size/marshal a specific type of a field. +// They are stored in the field's info, and called by function pointers. +// They have type sizer or marshaler. + +func sizeFixed32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixed32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixedS32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFloat32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + return (4 + tagsize) * len(s) +} +func sizeFloat32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixed64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixed64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFixedS64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFloat64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + return (8 + tagsize) * len(s) +} +func sizeFloat64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeVarint32Value(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarint32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarint32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarint64Value(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + return SizeVarint(v) + tagsize +} +func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return SizeVarint(v) + tagsize +} +func sizeVarint64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return SizeVarint(*p) + tagsize +} +func sizeVarint64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(v) + tagsize + } + return n +} +func sizeVarint64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize + } + return n +} +func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize + } + return n +} +func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeBoolValue(_ pointer, tagsize int) int { + return 1 + tagsize +} +func sizeBoolValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toBool() + if !v { + return 0 + } + return 1 + tagsize +} +func sizeBoolPtr(ptr pointer, tagsize int) int { + p := *ptr.toBoolPtr() + if p == nil { + return 0 + } + return 1 + tagsize +} +func sizeBoolSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + return (1 + tagsize) * len(s) +} +func sizeBoolPackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return 0 + } + return len(s) + SizeVarint(uint64(len(s))) + tagsize +} +func sizeStringValue(ptr pointer, tagsize int) int { + v := *ptr.toString() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toString() + if v == "" { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringPtr(ptr pointer, tagsize int) int { + p := *ptr.toStringPtr() + if p == nil { + return 0 + } + v := *p + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringSlice(ptr pointer, tagsize int) int { + s := *ptr.toStringSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} +func sizeBytes(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if v == nil { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytes3(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if len(v) == 0 { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesOneof(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesSlice(ptr pointer, tagsize int) int { + s := *ptr.toBytesSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} + +// appendFixed32 appends an encoded fixed32 to b. +func appendFixed32(b []byte, v uint32) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24)) + return b +} + +// appendFixed64 appends an encoded fixed64 to b. +func appendFixed64(b []byte, v uint64) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24), + byte(v>>32), + byte(v>>40), + byte(v>>48), + byte(v>>56)) + return b +} + +// appendVarint appends an encoded varint to b. +func appendVarint(b []byte, v uint64) []byte { + // TODO: make 1-byte (maybe 2-byte) case inline-able, once we + // have non-leaf inliner. + switch { + case v < 1<<7: + b = append(b, byte(v)) + case v < 1<<14: + b = append(b, + byte(v&0x7f|0x80), + byte(v>>7)) + case v < 1<<21: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte(v>>14)) + case v < 1<<28: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte(v>>21)) + case v < 1<<35: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte(v>>28)) + case v < 1<<42: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte(v>>35)) + case v < 1<<49: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte(v>>42)) + case v < 1<<56: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte(v>>49)) + case v < 1<<63: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte(v>>56)) + default: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte((v>>56)&0x7f|0x80), + 1) + } + return b +} + +func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, *p) + return b, nil +} +func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(*p)) + return b, nil +} +func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(*p)) + return b, nil +} +func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, *p) + return b, nil +} +func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(*p)) + return b, nil +} +func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(*p)) + return b, nil +} +func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, *p) + return b, nil +} +func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + } + return b, nil +} +func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, v) + } + return b, nil +} +func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + if !v { + return b, nil + } + b = appendVarint(b, wiretag) + b = append(b, 1) + return b, nil +} + +func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toBoolPtr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + if *p { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(len(s))) + for _, v := range s { + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if v == "" { + return b, nil + } + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if v == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if len(v) == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBytesSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} + +// makeGroupMarshaler returns the sizer and marshaler for a group. +// u is the marshal info of the underlying message. +func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + return u.size(p) + 2*tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + var err error + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, p, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + return b, err + } +} + +// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice. +// u is the marshal info of the underlying message. +func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + n += u.size(v) + 2*tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err, errreq error + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, v, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + if err != nil { + if _, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = err + } + continue + } + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, errreq + } +} + +// makeMessageMarshaler returns the sizer and marshaler for a message field. +// u is the marshal info of the message. +func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.size(p) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(p) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, p, deterministic) + } +} + +// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice. +// u is the marshal info of the message. +func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err, errreq error + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + if err != nil { + if _, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = err + } + continue + } + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, errreq + } +} + +// makeMapMarshaler returns the sizer and marshaler for a map field. +// f is the pointer to the reflect data structure of the field. +func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { + // figure out key and value type + t := f.Type + keyType := t.Key() + valType := t.Elem() + tags := strings.Split(f.Tag.Get("protobuf"), ",") + keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + for _, t := range tags { + if strings.HasPrefix(t, "customtype=") { + valTags = append(valTags, t) + } + if t == "stdtime" { + valTags = append(valTags, t) + } + if t == "stdduration" { + valTags = append(valTags, t) + } + } + keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map + valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map + keyWireTag := 1<<3 | wiretype(keyTags[0]) + valWireTag := 2<<3 | wiretype(valTags[0]) + + // We create an interface to get the addresses of the map key and value. + // If value is pointer-typed, the interface is a direct interface, the + // idata itself is the value. Otherwise, the idata is the pointer to the + // value. + // Key cannot be pointer-typed. + valIsPtr := valType.Kind() == reflect.Ptr + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(t).Elem() // the map + n := 0 + for _, k := range m.MapKeys() { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(t).Elem() // the map + var err error + keys := m.MapKeys() + if len(keys) > 1 && deterministic { + sort.Sort(mapKeys(keys)) + } + for _, k := range keys { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + b = appendVarint(b, tag) + siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + b = appendVarint(b, uint64(siz)) + b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) + if err != nil { + return b, err + } + b, err = valMarshaler(b, vaddr, valWireTag, deterministic) + if err != nil && err != ErrNil { // allow nil value in map + return b, err + } + } + return b, nil + } +} + +// makeOneOfMarshaler returns the sizer and marshaler for a oneof field. +// fi is the marshal info of the field. +// f is the pointer to the reflect data structure of the field. +func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) { + // Oneof field is an interface. We need to get the actual data type on the fly. + t := f.Type + return func(ptr pointer, _ int) int { + p := ptr.getInterfacePointer() + if p.isNil() { + return 0 + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + e := fi.oneofElems[telem] + return e.sizer(p, e.tagsize) + }, + func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) { + p := ptr.getInterfacePointer() + if p.isNil() { + return b, nil + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() { + return b, errOneofHasNil + } + e := fi.oneofElems[telem] + return e.marshaler(b, p, e.wiretag, deterministic) + } +} + +// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field. +func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + mu.Unlock() + return n +} + +// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b. +func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if err != nil { + return b, err + } + } + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + // Not sure this is required, but the old code does it. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if err != nil { + return b, err + } + } + return b, nil +} + +// message set format is: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } + +// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field +// in message set format (above). +func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for id, e := range m { + n += 2 // start group, end group. tag = 1 (size=1) + n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + siz := len(msgWithLen) + n += siz + 1 // message, tag = 3 (size=1) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, 1) // message, tag = 3 (size=1) + } + mu.Unlock() + return n +} + +// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above) +// to the end of byte slice b. +func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for id, e := range m { + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + if err != nil { + return b, err + } + b = append(b, 1<<3|WireEndGroup) + } + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, id := range keys { + e := m[int32(id)] + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + b = append(b, 1<<3|WireEndGroup) + if err != nil { + return b, err + } + } + return b, nil +} + +// sizeV1Extensions computes the size of encoded data for a V1-API extension field. +func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int { + if m == nil { + return 0 + } + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + return n +} + +// appendV1Extensions marshals a V1-API extension field to the end of byte slice b. +func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) { + if m == nil { + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + var err error + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if err != nil { + return b, err + } + } + return b, nil +} + +// newMarshaler is the interface representing objects that can marshal themselves. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newMarshaler interface { + XXX_Size() int + XXX_Marshal(b []byte, deterministic bool) ([]byte, error) +} + +// Size returns the encoded size of a protocol buffer message. +// This is the main entry point. +func Size(pb Message) int { + if m, ok := pb.(newMarshaler); ok { + return m.XXX_Size() + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + b, _ := m.Marshal() + return len(b) + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return 0 + } + var info InternalMessageInfo + return info.Size(pb) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, returning the data. +// This is the main entry point. +func Marshal(pb Message) ([]byte, error) { + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + b := make([]byte, 0, siz) + return m.XXX_Marshal(b, false) + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + return m.Marshal() + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return nil, ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + b := make([]byte, 0, siz) + return info.Marshal(b, pb, false) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, writing the result to the +// Buffer. +// This is an alternative entry point. It is not necessary to use +// a Buffer for most applications. +func (p *Buffer) Marshal(pb Message) error { + var err error + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + p.grow(siz) // make sure buf has enough capacity + p.buf, err = m.XXX_Marshal(p.buf, p.deterministic) + return err + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + var b []byte + b, err = m.Marshal() + p.buf = append(p.buf, b...) + return err + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + p.grow(siz) // make sure buf has enough capacity + p.buf, err = info.Marshal(p.buf, pb, p.deterministic) + return err +} + +// grow grows the buffer's capacity, if necessary, to guarantee space for +// another n bytes. After grow(n), at least n bytes can be written to the +// buffer without another allocation. +func (p *Buffer) grow(n int) { + need := len(p.buf) + n + if need <= cap(p.buf) { + return + } + newCap := len(p.buf) * 2 + if newCap < need { + newCap = need + } + p.buf = append(make([]byte, 0, newCap), p.buf...) +} diff --git a/deps/github.com/gogo/protobuf/proto/table_marshal_gogo.go b/deps/github.com/gogo/protobuf/proto/table_marshal_gogo.go new file mode 100644 index 000000000..997f57c1e --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/table_marshal_gogo.go @@ -0,0 +1,388 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "reflect" + "time" +) + +// makeMessageRefMarshaler differs a bit from makeMessageMarshaler +// It marshal a message T instead of a *T +func makeMessageRefMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + siz := u.size(ptr) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + b = appendVarint(b, wiretag) + siz := u.cachedsize(ptr) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, ptr, deterministic) + } +} + +// makeMessageRefSliceMarshaler differs quite a lot from makeMessageSliceMarshaler +// It marshals a slice of messages []T instead of []*T +func makeMessageRefSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + e := elem.Interface() + v := toAddrPointer(&e, false) + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + var err, errreq error + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + e := elem.Interface() + v := toAddrPointer(&e, false) + b = appendVarint(b, wiretag) + siz := u.size(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + + if err != nil { + if _, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = err + } + continue + } + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + + return b, errreq + } +} + +func makeCustomPtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom) + siz := m.Size() + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom) + siz := m.Size() + buf, err := m.Marshal() + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + return b, nil + } +} + +func makeCustomMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(u.typ).Interface().(custom) + siz := m.Size() + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(u.typ).Interface().(custom) + siz := m.Size() + buf, err := m.Marshal() + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + return b, nil + } +} + +func makeTimeMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeTimePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeTimeSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(time.Time) + ts, err := timestampProto(t) + if err != nil { + return 0 + } + siz := Size(ts) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(time.Time) + ts, err := timestampProto(t) + if err != nil { + return nil, err + } + siz := Size(ts) + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeTimePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + siz := Size(ts) + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeDurationMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + d := ptr.asPointerTo(u.typ).Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + d := ptr.asPointerTo(u.typ).Interface().(*time.Duration) + dur := durationProto(*d) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeDurationPtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration) + dur := durationProto(*d) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeDurationSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(time.Duration) + dur := durationProto(d) + siz := Size(dur) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(time.Duration) + dur := durationProto(d) + siz := Size(dur) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeDurationPtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} diff --git a/deps/github.com/gogo/protobuf/proto/table_merge.go b/deps/github.com/gogo/protobuf/proto/table_merge.go new file mode 100644 index 000000000..f520106e0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/table_merge.go @@ -0,0 +1,657 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" +) + +// Merge merges the src message into dst. +// This assumes that dst and src of the same type and are non-nil. +func (a *InternalMessageInfo) Merge(dst, src Message) { + mi := atomicLoadMergeInfo(&a.merge) + if mi == nil { + mi = getMergeInfo(reflect.TypeOf(dst).Elem()) + atomicStoreMergeInfo(&a.merge, mi) + } + mi.merge(toPointer(&dst), toPointer(&src)) +} + +type mergeInfo struct { + typ reflect.Type + + initialized int32 // 0: only typ is valid, 1: everything is valid + lock sync.Mutex + + fields []mergeFieldInfo + unrecognized field // Offset of XXX_unrecognized +} + +type mergeFieldInfo struct { + field field // Offset of field, guaranteed to be valid + + // isPointer reports whether the value in the field is a pointer. + // This is true for the following situations: + // * Pointer to struct + // * Pointer to basic type (proto2 only) + // * Slice (first value in slice header is a pointer) + // * String (first value in string header is a pointer) + isPointer bool + + // basicWidth reports the width of the field assuming that it is directly + // embedded in the struct (as is the case for basic types in proto3). + // The possible values are: + // 0: invalid + // 1: bool + // 4: int32, uint32, float32 + // 8: int64, uint64, float64 + basicWidth int + + // Where dst and src are pointers to the types being merged. + merge func(dst, src pointer) +} + +var ( + mergeInfoMap = map[reflect.Type]*mergeInfo{} + mergeInfoLock sync.Mutex +) + +func getMergeInfo(t reflect.Type) *mergeInfo { + mergeInfoLock.Lock() + defer mergeInfoLock.Unlock() + mi := mergeInfoMap[t] + if mi == nil { + mi = &mergeInfo{typ: t} + mergeInfoMap[t] = mi + } + return mi +} + +// merge merges src into dst assuming they are both of type *mi.typ. +func (mi *mergeInfo) merge(dst, src pointer) { + if dst.isNil() { + panic("proto: nil destination") + } + if src.isNil() { + return // Nothing to do. + } + + if atomic.LoadInt32(&mi.initialized) == 0 { + mi.computeMergeInfo() + } + + for _, fi := range mi.fields { + sfp := src.offset(fi.field) + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string + continue + } + if fi.basicWidth > 0 { + switch { + case fi.basicWidth == 1 && !*sfp.toBool(): + continue + case fi.basicWidth == 4 && *sfp.toUint32() == 0: + continue + case fi.basicWidth == 8 && *sfp.toUint64() == 0: + continue + } + } + } + + dfp := dst.offset(fi.field) + fi.merge(dfp, sfp) + } + + // TODO: Make this faster? + out := dst.asPointerTo(mi.typ).Elem() + in := src.asPointerTo(mi.typ).Elem() + if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + if mi.unrecognized.IsValid() { + if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 { + *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...) + } + } +} + +func (mi *mergeInfo) computeMergeInfo() { + mi.lock.Lock() + defer mi.lock.Unlock() + if mi.initialized != 0 { + return + } + t := mi.typ + n := t.NumField() + + props := GetProperties(t) + for i := 0; i < n; i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + + mfi := mergeFieldInfo{field: toField(&f)} + tf := f.Type + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + switch tf.Kind() { + case reflect.Ptr, reflect.Slice, reflect.String: + // As a special case, we assume slices and strings are pointers + // since we know that the first field in the SliceSlice or + // StringHeader is a data pointer. + mfi.isPointer = true + case reflect.Bool: + mfi.basicWidth = 1 + case reflect.Int32, reflect.Uint32, reflect.Float32: + mfi.basicWidth = 4 + case reflect.Int64, reflect.Uint64, reflect.Float64: + mfi.basicWidth = 8 + } + } + + // Unwrap tf to get at its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + tf.Name()) + } + + switch tf.Kind() { + case reflect.Int32: + switch { + case isSlice: // E.g., []int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Slice is not defined (see pointer_reflect.go). + /* + sfsp := src.toInt32Slice() + if *sfsp != nil { + dfsp := dst.toInt32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + */ + sfs := src.getInt32Slice() + if sfs != nil { + dfs := dst.getInt32Slice() + dfs = append(dfs, sfs...) + if dfs == nil { + dfs = []int32{} + } + dst.setInt32Slice(dfs) + } + } + case isPointer: // E.g., *int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Ptr is not defined (see pointer_reflect.go). + /* + sfpp := src.toInt32Ptr() + if *sfpp != nil { + dfpp := dst.toInt32Ptr() + if *dfpp == nil { + *dfpp = Int32(**sfpp) + } else { + **dfpp = **sfpp + } + } + */ + sfp := src.getInt32Ptr() + if sfp != nil { + dfp := dst.getInt32Ptr() + if dfp == nil { + dst.setInt32Ptr(*sfp) + } else { + *dfp = *sfp + } + } + } + default: // E.g., int32 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt32(); v != 0 { + *dst.toInt32() = v + } + } + } + case reflect.Int64: + switch { + case isSlice: // E.g., []int64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toInt64Slice() + if *sfsp != nil { + dfsp := dst.toInt64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + } + case isPointer: // E.g., *int64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toInt64Ptr() + if *sfpp != nil { + dfpp := dst.toInt64Ptr() + if *dfpp == nil { + *dfpp = Int64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., int64 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt64(); v != 0 { + *dst.toInt64() = v + } + } + } + case reflect.Uint32: + switch { + case isSlice: // E.g., []uint32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint32Slice() + if *sfsp != nil { + dfsp := dst.toUint32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint32{} + } + } + } + case isPointer: // E.g., *uint32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint32Ptr() + if *sfpp != nil { + dfpp := dst.toUint32Ptr() + if *dfpp == nil { + *dfpp = Uint32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint32 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint32(); v != 0 { + *dst.toUint32() = v + } + } + } + case reflect.Uint64: + switch { + case isSlice: // E.g., []uint64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint64Slice() + if *sfsp != nil { + dfsp := dst.toUint64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint64{} + } + } + } + case isPointer: // E.g., *uint64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint64Ptr() + if *sfpp != nil { + dfpp := dst.toUint64Ptr() + if *dfpp == nil { + *dfpp = Uint64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint64 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint64(); v != 0 { + *dst.toUint64() = v + } + } + } + case reflect.Float32: + switch { + case isSlice: // E.g., []float32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat32Slice() + if *sfsp != nil { + dfsp := dst.toFloat32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float32{} + } + } + } + case isPointer: // E.g., *float32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat32Ptr() + if *sfpp != nil { + dfpp := dst.toFloat32Ptr() + if *dfpp == nil { + *dfpp = Float32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float32 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat32(); v != 0 { + *dst.toFloat32() = v + } + } + } + case reflect.Float64: + switch { + case isSlice: // E.g., []float64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat64Slice() + if *sfsp != nil { + dfsp := dst.toFloat64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float64{} + } + } + } + case isPointer: // E.g., *float64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat64Ptr() + if *sfpp != nil { + dfpp := dst.toFloat64Ptr() + if *dfpp == nil { + *dfpp = Float64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float64 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat64(); v != 0 { + *dst.toFloat64() = v + } + } + } + case reflect.Bool: + switch { + case isSlice: // E.g., []bool + mfi.merge = func(dst, src pointer) { + sfsp := src.toBoolSlice() + if *sfsp != nil { + dfsp := dst.toBoolSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []bool{} + } + } + } + case isPointer: // E.g., *bool + mfi.merge = func(dst, src pointer) { + sfpp := src.toBoolPtr() + if *sfpp != nil { + dfpp := dst.toBoolPtr() + if *dfpp == nil { + *dfpp = Bool(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., bool + mfi.merge = func(dst, src pointer) { + if v := *src.toBool(); v { + *dst.toBool() = v + } + } + } + case reflect.String: + switch { + case isSlice: // E.g., []string + mfi.merge = func(dst, src pointer) { + sfsp := src.toStringSlice() + if *sfsp != nil { + dfsp := dst.toStringSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []string{} + } + } + } + case isPointer: // E.g., *string + mfi.merge = func(dst, src pointer) { + sfpp := src.toStringPtr() + if *sfpp != nil { + dfpp := dst.toStringPtr() + if *dfpp == nil { + *dfpp = String(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., string + mfi.merge = func(dst, src pointer) { + if v := *src.toString(); v != "" { + *dst.toString() = v + } + } + } + case reflect.Slice: + isProto3 := props.Prop[i].proto3 + switch { + case isPointer: + panic("bad pointer in byte slice case in " + tf.Name()) + case tf.Elem().Kind() != reflect.Uint8: + panic("bad element kind in byte slice case in " + tf.Name()) + case isSlice: // E.g., [][]byte + mfi.merge = func(dst, src pointer) { + sbsp := src.toBytesSlice() + if *sbsp != nil { + dbsp := dst.toBytesSlice() + for _, sb := range *sbsp { + if sb == nil { + *dbsp = append(*dbsp, nil) + } else { + *dbsp = append(*dbsp, append([]byte{}, sb...)) + } + } + if *dbsp == nil { + *dbsp = [][]byte{} + } + } + } + default: // E.g., []byte + mfi.merge = func(dst, src pointer) { + sbp := src.toBytes() + if *sbp != nil { + dbp := dst.toBytes() + if !isProto3 || len(*sbp) > 0 { + *dbp = append([]byte{}, *sbp...) + } + } + } + } + case reflect.Struct: + switch { + case !isPointer: + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + mergeInfo.merge(dst, src) + } + case isSlice: // E.g., []*pb.T + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sps := src.getPointerSlice() + if sps != nil { + dps := dst.getPointerSlice() + for _, sp := range sps { + var dp pointer + if !sp.isNil() { + dp = valToPointer(reflect.New(tf)) + mergeInfo.merge(dp, sp) + } + dps = append(dps, dp) + } + if dps == nil { + dps = []pointer{} + } + dst.setPointerSlice(dps) + } + } + default: // E.g., *pb.T + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sp := src.getPointer() + if !sp.isNil() { + dp := dst.getPointer() + if dp.isNil() { + dp = valToPointer(reflect.New(tf)) + dst.setPointer(dp) + } + mergeInfo.merge(dp, sp) + } + } + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic("bad pointer or slice in map case in " + tf.Name()) + default: // E.g., map[K]V + mfi.merge = func(dst, src pointer) { + sm := src.asPointerTo(tf).Elem() + if sm.Len() == 0 { + return + } + dm := dst.asPointerTo(tf).Elem() + if dm.IsNil() { + dm.Set(reflect.MakeMap(tf)) + } + + switch tf.Elem().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(Clone(val.Interface().(Message))) + dm.SetMapIndex(key, val) + } + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + dm.SetMapIndex(key, val) + } + default: // Basic type (e.g., string) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + dm.SetMapIndex(key, val) + } + } + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic("bad pointer or slice in interface case in " + tf.Name()) + default: // E.g., interface{} + // TODO: Make this faster? + mfi.merge = func(dst, src pointer) { + su := src.asPointerTo(tf).Elem() + if !su.IsNil() { + du := dst.asPointerTo(tf).Elem() + typ := su.Elem().Type() + if du.IsNil() || du.Elem().Type() != typ { + du.Set(reflect.New(typ.Elem())) // Initialize interface if empty + } + sv := su.Elem().Elem().Field(0) + if sv.Kind() == reflect.Ptr && sv.IsNil() { + return + } + dv := du.Elem().Elem().Field(0) + if dv.Kind() == reflect.Ptr && dv.IsNil() { + dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty + } + switch sv.Type().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + Merge(dv.Interface().(Message), sv.Interface().(Message)) + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...))) + default: // Basic type (e.g., string) + dv.Set(sv) + } + } + } + } + default: + panic(fmt.Sprintf("merger not found for type:%s", tf)) + } + mi.fields = append(mi.fields, mfi) + } + + mi.unrecognized = invalidField + if f, ok := t.FieldByName("XXX_unrecognized"); ok { + if f.Type != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + mi.unrecognized = toField(&f) + } + + atomic.StoreInt32(&mi.initialized, 1) +} diff --git a/deps/github.com/gogo/protobuf/proto/table_unmarshal.go b/deps/github.com/gogo/protobuf/proto/table_unmarshal.go new file mode 100644 index 000000000..910e2dd6a --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/table_unmarshal.go @@ -0,0 +1,2048 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "errors" + "fmt" + "io" + "math" + "reflect" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// Unmarshal is the entry point from the generated .pb.go files. +// This function is not intended to be used by non-generated code. +// This function is not subject to any compatibility guarantee. +// msg contains a pointer to a protocol buffer struct. +// b is the data to be unmarshaled into the protocol buffer. +// a is a pointer to a place to store cached unmarshal information. +func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error { + // Load the unmarshal information for this message type. + // The atomic load ensures memory consistency. + u := atomicLoadUnmarshalInfo(&a.unmarshal) + if u == nil { + // Slow path: find unmarshal info for msg, update a with it. + u = getUnmarshalInfo(reflect.TypeOf(msg).Elem()) + atomicStoreUnmarshalInfo(&a.unmarshal, u) + } + // Then do the unmarshaling. + err := u.unmarshal(toPointer(&msg), b) + return err +} + +type unmarshalInfo struct { + typ reflect.Type // type of the protobuf struct + + // 0 = only typ field is initialized + // 1 = completely initialized + initialized int32 + lock sync.Mutex // prevents double initialization + dense []unmarshalFieldInfo // fields indexed by tag # + sparse map[uint64]unmarshalFieldInfo // fields indexed by tag # + reqFields []string // names of required fields + reqMask uint64 // 1< 0 { + // Read tag and wire type. + // Special case 1 and 2 byte varints. + var x uint64 + if b[0] < 128 { + x = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + x = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + x, n = decodeVarint(b) + if n == 0 { + return io.ErrUnexpectedEOF + } + b = b[n:] + } + tag := x >> 3 + wire := int(x) & 7 + + // Dispatch on the tag to one of the unmarshal* functions below. + var f unmarshalFieldInfo + if tag < uint64(len(u.dense)) { + f = u.dense[tag] + } else { + f = u.sparse[tag] + } + if fn := f.unmarshal; fn != nil { + var err error + b, err = fn(b, m.offset(f.field), wire) + if err == nil { + reqMask |= f.reqMask + continue + } + if r, ok := err.(*RequiredNotSetError); ok { + // Remember this error, but keep parsing. We need to produce + // a full parse even if a required field is missing. + rnse = r + reqMask |= f.reqMask + continue + } + if err != errInternalBadWireType { + return err + } + // Fragments with bad wire type are treated as unknown fields. + } + + // Unknown tag. + if !u.unrecognized.IsValid() { + // Don't keep unrecognized data; just skip it. + var err error + b, err = skipField(b, wire) + if err != nil { + return err + } + continue + } + // Keep unrecognized data around. + // maybe in extensions, maybe in the unrecognized field. + z := m.offset(u.unrecognized).toBytes() + var emap map[int32]Extension + var e Extension + for _, r := range u.extensionRanges { + if uint64(r.Start) <= tag && tag <= uint64(r.End) { + if u.extensions.IsValid() { + mp := m.offset(u.extensions).toExtensions() + emap = mp.extensionsWrite() + e = emap[int32(tag)] + z = &e.enc + break + } + if u.oldExtensions.IsValid() { + p := m.offset(u.oldExtensions).toOldExtensions() + emap = *p + if emap == nil { + emap = map[int32]Extension{} + *p = emap + } + e = emap[int32(tag)] + z = &e.enc + break + } + if u.bytesExtensions.IsValid() { + z = m.offset(u.bytesExtensions).toBytes() + break + } + panic("no extensions field available") + } + } + // Use wire type to skip data. + var err error + b0 := b + b, err = skipField(b, wire) + if err != nil { + return err + } + *z = encodeVarint(*z, tag<<3|uint64(wire)) + *z = append(*z, b0[:len(b0)-len(b)]...) + + if emap != nil { + emap[int32(tag)] = e + } + } + if rnse != nil { + // A required field of a submessage/group is missing. Return that error. + return rnse + } + if reqMask != u.reqMask { + // A required field of this message is missing. + for _, n := range u.reqFields { + if reqMask&1 == 0 { + return &RequiredNotSetError{n} + } + reqMask >>= 1 + } + } + return nil +} + +// computeUnmarshalInfo fills in u with information for use +// in unmarshaling protocol buffers of type u.typ. +func (u *unmarshalInfo) computeUnmarshalInfo() { + u.lock.Lock() + defer u.lock.Unlock() + if u.initialized != 0 { + return + } + t := u.typ + n := t.NumField() + + // Set up the "not found" value for the unrecognized byte buffer. + // This is the default for proto3. + u.unrecognized = invalidField + u.extensions = invalidField + u.oldExtensions = invalidField + u.bytesExtensions = invalidField + + // List of the generated type and offset for each oneof field. + type oneofField struct { + ityp reflect.Type // interface type of oneof field + field field // offset in containing message + } + var oneofFields []oneofField + + for i := 0; i < n; i++ { + f := t.Field(i) + if f.Name == "XXX_unrecognized" { + // The byte slice used to hold unrecognized input is special. + if f.Type != reflect.TypeOf(([]byte)(nil)) { + panic("bad type for XXX_unrecognized field: " + f.Type.Name()) + } + u.unrecognized = toField(&f) + continue + } + if f.Name == "XXX_InternalExtensions" { + // Ditto here. + if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) { + panic("bad type for XXX_InternalExtensions field: " + f.Type.Name()) + } + u.extensions = toField(&f) + if f.Tag.Get("protobuf_messageset") == "1" { + u.isMessageSet = true + } + continue + } + if f.Name == "XXX_extensions" { + // An older form of the extensions field. + if f.Type == reflect.TypeOf((map[int32]Extension)(nil)) { + u.oldExtensions = toField(&f) + continue + } else if f.Type == reflect.TypeOf(([]byte)(nil)) { + u.bytesExtensions = toField(&f) + continue + } + panic("bad type for XXX_extensions field: " + f.Type.Name()) + } + if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" { + continue + } + + oneof := f.Tag.Get("protobuf_oneof") + if oneof != "" { + oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)}) + // The rest of oneof processing happens below. + continue + } + + tags := f.Tag.Get("protobuf") + tagArray := strings.Split(tags, ",") + if len(tagArray) < 2 { + panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags) + } + tag, err := strconv.Atoi(tagArray[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tagArray[1]) + } + + name := "" + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + } + + // Extract unmarshaling function from the field (its type and tags). + unmarshal := fieldUnmarshaler(&f) + + // Required field? + var reqMask uint64 + if tagArray[2] == "req" { + bit := len(u.reqFields) + u.reqFields = append(u.reqFields, name) + reqMask = uint64(1) << uint(bit) + // TODO: if we have more than 64 required fields, we end up + // not verifying that all required fields are present. + // Fix this, perhaps using a count of required fields? + } + + // Store the info in the correct slot in the message. + u.setTag(tag, toField(&f), unmarshal, reqMask) + } + + // Find any types associated with oneof fields. + // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it? + fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs") + // gogo: len(oneofFields) > 0 is needed for embedded oneof messages, without a marshaler and unmarshaler + if fn.IsValid() && len(oneofFields) > 0 { + res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{} + for i := res.Len() - 1; i >= 0; i-- { + v := res.Index(i) // interface{} + tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X + typ := tptr.Elem() // Msg_X + + f := typ.Field(0) // oneof implementers have one field + baseUnmarshal := fieldUnmarshaler(&f) + tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1] + tag, err := strconv.Atoi(tagstr) + if err != nil { + panic("protobuf tag field not an integer: " + tagstr) + } + + // Find the oneof field that this struct implements. + // Might take O(n^2) to process all of the oneofs, but who cares. + for _, of := range oneofFields { + if tptr.Implements(of.ityp) { + // We have found the corresponding interface for this struct. + // That lets us know where this struct should be stored + // when we encounter it during unmarshaling. + unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) + u.setTag(tag, of.field, unmarshal, 0) + } + } + } + } + + // Get extension ranges, if any. + fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray") + if fn.IsValid() { + if !u.extensions.IsValid() && !u.oldExtensions.IsValid() && !u.bytesExtensions.IsValid() { + panic("a message with extensions, but no extensions field in " + t.Name()) + } + u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange) + } + + // Explicitly disallow tag 0. This will ensure we flag an error + // when decoding a buffer of all zeros. Without this code, we + // would decode and skip an all-zero buffer of even length. + // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. + u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { + return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) + }, 0) + + // Set mask for required field check. + u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? + for len(u.dense) <= tag { + u.dense = append(u.dense, unmarshalFieldInfo{}) + } + u.dense[tag] = i + return + } + if u.sparse == nil { + u.sparse = map[uint64]unmarshalFieldInfo{} + } + u.sparse[uint64(tag)] = i +} + +// fieldUnmarshaler returns an unmarshaler for the given field. +func fieldUnmarshaler(f *reflect.StructField) unmarshaler { + if f.Type.Kind() == reflect.Map { + return makeUnmarshalMap(f) + } + return typeUnmarshaler(f.Type, f.Tag.Get("protobuf")) +} + +// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair. +func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { + tagArray := strings.Split(tags, ",") + encoding := tagArray[0] + name := "unknown" + ctype := false + isTime := false + isDuration := false + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + if strings.HasPrefix(tag, "customtype=") { + ctype = true + } + if tag == "stdtime" { + isTime = true + } + if tag == "stdduration" { + isDuration = true + } + } + + // Figure out packaging (pointer, slice, or both) + slice := false + pointer := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + if ctype { + if reflect.PtrTo(t).Implements(customType) { + if slice { + return makeUnmarshalCustomSlice(getUnmarshalInfo(t), name) + } + if pointer { + return makeUnmarshalCustomPtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalCustom(getUnmarshalInfo(t), name) + } else { + panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t)) + } + } + + if isTime { + if pointer { + if slice { + return makeUnmarshalTimePtrSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalTimePtr(getUnmarshalInfo(t), name) + } + if slice { + return makeUnmarshalTimeSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalTime(getUnmarshalInfo(t), name) + } + + if isDuration { + if pointer { + if slice { + return makeUnmarshalDurationPtrSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalDurationPtr(getUnmarshalInfo(t), name) + } + if slice { + return makeUnmarshalDurationSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalDuration(getUnmarshalInfo(t), name) + } + + // We'll never have both pointer and slice for basic types. + if pointer && slice && t.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + t.Name()) + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return unmarshalBoolPtr + } + if slice { + return unmarshalBoolSlice + } + return unmarshalBoolValue + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixedS32Ptr + } + if slice { + return unmarshalFixedS32Slice + } + return unmarshalFixedS32Value + case "varint": + // this could be int32 or enum + if pointer { + return unmarshalInt32Ptr + } + if slice { + return unmarshalInt32Slice + } + return unmarshalInt32Value + case "zigzag32": + if pointer { + return unmarshalSint32Ptr + } + if slice { + return unmarshalSint32Slice + } + return unmarshalSint32Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixedS64Ptr + } + if slice { + return unmarshalFixedS64Slice + } + return unmarshalFixedS64Value + case "varint": + if pointer { + return unmarshalInt64Ptr + } + if slice { + return unmarshalInt64Slice + } + return unmarshalInt64Value + case "zigzag64": + if pointer { + return unmarshalSint64Ptr + } + if slice { + return unmarshalSint64Slice + } + return unmarshalSint64Value + } + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixed32Ptr + } + if slice { + return unmarshalFixed32Slice + } + return unmarshalFixed32Value + case "varint": + if pointer { + return unmarshalUint32Ptr + } + if slice { + return unmarshalUint32Slice + } + return unmarshalUint32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixed64Ptr + } + if slice { + return unmarshalFixed64Slice + } + return unmarshalFixed64Value + case "varint": + if pointer { + return unmarshalUint64Ptr + } + if slice { + return unmarshalUint64Slice + } + return unmarshalUint64Value + } + case reflect.Float32: + if pointer { + return unmarshalFloat32Ptr + } + if slice { + return unmarshalFloat32Slice + } + return unmarshalFloat32Value + case reflect.Float64: + if pointer { + return unmarshalFloat64Ptr + } + if slice { + return unmarshalFloat64Slice + } + return unmarshalFloat64Value + case reflect.Map: + panic("map type in typeUnmarshaler in " + t.Name()) + case reflect.Slice: + if pointer { + panic("bad pointer in slice case in " + t.Name()) + } + if slice { + return unmarshalBytesSlice + } + return unmarshalBytesValue + case reflect.String: + if pointer { + return unmarshalStringPtr + } + if slice { + return unmarshalStringSlice + } + return unmarshalStringValue + case reflect.Struct: + // message or group field + if !pointer { + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessage(getUnmarshalInfo(t), name) + } + } + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name) + case "group": + if slice { + return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name) + } + } + panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding)) +} + +// Below are all the unmarshalers for individual fields of various types. + +func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64() = v + return b, nil +} + +func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64() = v + return b, nil +} + +func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64() = v + return b, nil +} + +func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64Ptr() = &v + return b, nil +} + +func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + *f.toInt32() = v + return b, nil +} + +func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + *f.toInt32() = v + return b, nil +} + +func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32() = v + return b, nil +} + +func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32Ptr() = &v + return b, nil +} + +func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64() = v + return b[8:], nil +} + +func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64() = v + return b[8:], nil +} + +func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32() = v + return b[4:], nil +} + +func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32Ptr() = &v + return b[4:], nil +} + +func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + *f.toInt32() = v + return b[4:], nil +} + +func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.setInt32Ptr(v) + return b[4:], nil +} + +func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + return b[4:], nil +} + +func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + // Note: any length varint is allowed, even though any sane + // encoder will use one byte. + // See https://github.com/golang/protobuf/issues/76 + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + // TODO: check if x>1? Tests seem to indicate no. + v := x != 0 + *f.toBool() = v + return b[n:], nil +} + +func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + *f.toBoolPtr() = &v + return b[n:], nil +} + +func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + b = b[n:] + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + return b[n:], nil +} + +func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64() = v + return b[8:], nil +} + +func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64Ptr() = &v + return b[8:], nil +} + +func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32() = v + return b[4:], nil +} + +func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32Ptr() = &v + return b[4:], nil +} + +func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + *f.toString() = v + return b[x:], nil +} + +func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + *f.toStringPtr() = &v + return b[x:], nil +} + +func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + if !utf8.ValidString(v) { + return nil, errInvalidUTF8 + } + s := f.toStringSlice() + *s = append(*s, v) + return b[x:], nil +} + +var emptyBuf [0]byte + +func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // The use of append here is a trick which avoids the zeroing + // that would be required if we used a make/copy pair. + // We append to emptyBuf instead of nil because we want + // a non-nil result even when the length is 0. + v := append(emptyBuf[:], b[:x]...) + *f.toBytes() = v + return b[x:], nil +} + +func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := append(emptyBuf[:], b[:x]...) + s := f.toBytesSlice() + *s = append(*s, v) + return b[x:], nil +} + +func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[y:], err + } +} + +func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[y:], err + } +} + +func makeUnmarshalMap(f *reflect.StructField) unmarshaler { + t := f.Type + kt := t.Key() + vt := t.Elem() + tagArray := strings.Split(f.Tag.Get("protobuf"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + for _, t := range tagArray { + if strings.HasPrefix(t, "customtype=") { + valTags = append(valTags, t) + } + if t == "stdtime" { + valTags = append(valTags, t) + } + if t == "stdduration" { + valTags = append(valTags, t) + } + } + unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key")) + unmarshalVal := typeUnmarshaler(vt, strings.Join(valTags, ",")) + return func(b []byte, f pointer, w int) ([]byte, error) { + // The map entry is a submessage. Figure out how big it is. + if w != WireBytes { + return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes) + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + r := b[x:] // unused data to return + b = b[:x] // data for map entry + + // Note: we could use #keys * #values ~= 200 functions + // to do map decoding without reflection. Probably not worth it. + // Maps will be somewhat slow. Oh well. + + // Read key and value from data. + k := reflect.New(kt) + v := reflect.New(vt) + for len(b) > 0 { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + wire := int(x) & 7 + b = b[n:] + + var err error + switch x >> 3 { + case 1: + b, err = unmarshalKey(b, valToPointer(k), wire) + case 2: + b, err = unmarshalVal(b, valToPointer(v), wire) + default: + err = errInternalBadWireType // skip unknown tag + } + + if err == nil { + continue + } + if err != errInternalBadWireType { + return nil, err + } + + // Skip past unknown fields. + b, err = skipField(b, wire) + if err != nil { + return nil, err + } + } + + // Get map, allocate if needed. + m := f.asPointerTo(t).Elem() // an addressable map[K]T + if m.IsNil() { + m.Set(reflect.MakeMap(t)) + } + + // Insert into map. + m.SetMapIndex(k.Elem(), v.Elem()) + + return r, nil + } +} + +// makeUnmarshalOneof makes an unmarshaler for oneof fields. +// for: +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// typ is the type of the concrete entry for a oneof case (e.g. Msg_X). +// ityp is the interface type of the oneof field (e.g. isMsg_F). +// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). +// Note that this function will be called once for each case in the oneof. +func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler { + sf := typ.Field(0) + field0 := toField(&sf) + return func(b []byte, f pointer, w int) ([]byte, error) { + // Allocate holder for value. + v := reflect.New(typ) + + // Unmarshal data into holder. + // We unmarshal into the first field of the holder object. + var err error + b, err = unmarshal(b, valToPointer(v).offset(field0), w) + if err != nil { + return nil, err + } + + // Write pointer to holder into target field. + f.asPointerTo(ityp).Elem().Set(v) + + return b, nil + } +} + +// Error used by decode internally. +var errInternalBadWireType = errors.New("proto: internal error: bad wiretype") + +// skipField skips past a field of type wire and returns the remaining bytes. +func skipField(b []byte, wire int) ([]byte, error) { + switch wire { + case WireVarint: + _, k := decodeVarint(b) + if k == 0 { + return b, io.ErrUnexpectedEOF + } + b = b[k:] + case WireFixed32: + if len(b) < 4 { + return b, io.ErrUnexpectedEOF + } + b = b[4:] + case WireFixed64: + if len(b) < 8 { + return b, io.ErrUnexpectedEOF + } + b = b[8:] + case WireBytes: + m, k := decodeVarint(b) + if k == 0 || uint64(len(b)-k) < m { + return b, io.ErrUnexpectedEOF + } + b = b[uint64(k)+m:] + case WireStartGroup: + _, i := findEndGroup(b) + if i == -1 { + return b, io.ErrUnexpectedEOF + } + b = b[i:] + default: + return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire) + } + return b, nil +} + +// findEndGroup finds the index of the next EndGroup tag. +// Groups may be nested, so the "next" EndGroup tag is the first +// unpaired EndGroup. +// findEndGroup returns the indexes of the start and end of the EndGroup tag. +// Returns (-1,-1) if it can't find one. +func findEndGroup(b []byte) (int, int) { + depth := 1 + i := 0 + for { + x, n := decodeVarint(b[i:]) + if n == 0 { + return -1, -1 + } + j := i + i += n + switch x & 7 { + case WireVarint: + _, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + case WireFixed32: + if len(b)-4 < i { + return -1, -1 + } + i += 4 + case WireFixed64: + if len(b)-8 < i { + return -1, -1 + } + i += 8 + case WireBytes: + m, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + if uint64(len(b)-i) < m { + return -1, -1 + } + i += int(m) + case WireStartGroup: + depth++ + case WireEndGroup: + depth-- + if depth == 0 { + return j, i + } + default: + return -1, -1 + } + } +} + +// encodeVarint appends a varint-encoded integer to b and returns the result. +func encodeVarint(b []byte, x uint64) []byte { + for x >= 1<<7 { + b = append(b, byte(x&0x7f|0x80)) + x >>= 7 + } + return append(b, byte(x)) +} + +// decodeVarint reads a varint-encoded integer from b. +// Returns the decoded integer and the number of bytes read. +// If there is an error, it returns 0,0. +func decodeVarint(b []byte) (uint64, int) { + var x, y uint64 + if len(b) <= 0 { + goto bad + } + x = uint64(b[0]) + if x < 0x80 { + return x, 1 + } + x -= 0x80 + + if len(b) <= 1 { + goto bad + } + y = uint64(b[1]) + x += y << 7 + if y < 0x80 { + return x, 2 + } + x -= 0x80 << 7 + + if len(b) <= 2 { + goto bad + } + y = uint64(b[2]) + x += y << 14 + if y < 0x80 { + return x, 3 + } + x -= 0x80 << 14 + + if len(b) <= 3 { + goto bad + } + y = uint64(b[3]) + x += y << 21 + if y < 0x80 { + return x, 4 + } + x -= 0x80 << 21 + + if len(b) <= 4 { + goto bad + } + y = uint64(b[4]) + x += y << 28 + if y < 0x80 { + return x, 5 + } + x -= 0x80 << 28 + + if len(b) <= 5 { + goto bad + } + y = uint64(b[5]) + x += y << 35 + if y < 0x80 { + return x, 6 + } + x -= 0x80 << 35 + + if len(b) <= 6 { + goto bad + } + y = uint64(b[6]) + x += y << 42 + if y < 0x80 { + return x, 7 + } + x -= 0x80 << 42 + + if len(b) <= 7 { + goto bad + } + y = uint64(b[7]) + x += y << 49 + if y < 0x80 { + return x, 8 + } + x -= 0x80 << 49 + + if len(b) <= 8 { + goto bad + } + y = uint64(b[8]) + x += y << 56 + if y < 0x80 { + return x, 9 + } + x -= 0x80 << 56 + + if len(b) <= 9 { + goto bad + } + y = uint64(b[9]) + x += y << 63 + if y < 2 { + return x, 10 + } + +bad: + return 0, 0 +} diff --git a/deps/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go b/deps/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go new file mode 100644 index 000000000..00d6c7ad9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go @@ -0,0 +1,385 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +import ( + "io" + "reflect" +) + +func makeUnmarshalMessage(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f // gogo: changed from v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendRef(v, sub.typ) // gogo: changed from f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalCustomPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.New(sub.typ)) + m := s.Interface().(custom) + if err := m.Unmarshal(b[:x]); err != nil { + return nil, err + } + return b[x:], nil + } +} + +func makeUnmarshalCustomSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := reflect.New(sub.typ) + c := m.Interface().(custom) + if err := c.Unmarshal(b[:x]); err != nil { + return nil, err + } + v := valToPointer(m) + f.appendRef(v, sub.typ) + return b[x:], nil + } +} + +func makeUnmarshalCustom(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + + m := f.asPointerTo(sub.typ).Interface().(custom) + if err := m.Unmarshal(b[:x]); err != nil { + return nil, err + } + return b[x:], nil + } +} + +func makeUnmarshalTime(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(t)) + return b[x:], nil + } +} + +func makeUnmarshalTimePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&t)) + return b[x:], nil + } +} + +func makeUnmarshalTimePtrSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&t)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalTimeSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(t)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalDurationPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&d)) + return b[x:], nil + } +} + +func makeUnmarshalDuration(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(d)) + return b[x:], nil + } +} + +func makeUnmarshalDurationPtrSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&d)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalDurationSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(d)) + slice.Set(newSlice) + return b[x:], nil + } +} diff --git a/deps/github.com/gogo/protobuf/proto/test_proto/Makefile b/deps/github.com/gogo/protobuf/proto/test_proto/Makefile new file mode 100644 index 000000000..e71c21a90 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/test_proto/Makefile @@ -0,0 +1,37 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +all: regenerate + +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=paths=source_relative:. test.proto + diff --git a/deps/github.com/gogo/protobuf/proto/test_proto/deterministic.go b/deps/github.com/gogo/protobuf/proto/test_proto/deterministic.go new file mode 100644 index 000000000..6c9f56858 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/test_proto/deterministic.go @@ -0,0 +1,5 @@ +package test_proto + +func (m *CustomDeterministicMarshaler) Marshal() ([]byte, error) { + return []byte{}, nil +} diff --git a/deps/github.com/gogo/protobuf/proto/test_proto/test.pb.go b/deps/github.com/gogo/protobuf/proto/test_proto/test.pb.go new file mode 100644 index 000000000..a1dd3d83c --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/test_proto/test.pb.go @@ -0,0 +1,5159 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: test.proto + +package test_proto // import "github.com/gogo/protobuf/proto/test_proto" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type FOO int32 + +const ( + FOO_FOO1 FOO = 1 +) + +var FOO_name = map[int32]string{ + 1: "FOO1", +} +var FOO_value = map[string]int32{ + "FOO1": 1, +} + +func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p +} +func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) +} +func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") + if err != nil { + return err + } + *x = FOO(value) + return nil +} +func (FOO) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{0} +} + +// An enum, for completeness. +type GoTest_KIND int32 + +const ( + GoTest_VOID GoTest_KIND = 0 + // Basic types + GoTest_BOOL GoTest_KIND = 1 + GoTest_BYTES GoTest_KIND = 2 + GoTest_FINGERPRINT GoTest_KIND = 3 + GoTest_FLOAT GoTest_KIND = 4 + GoTest_INT GoTest_KIND = 5 + GoTest_STRING GoTest_KIND = 6 + GoTest_TIME GoTest_KIND = 7 + // Groupings + GoTest_TUPLE GoTest_KIND = 8 + GoTest_ARRAY GoTest_KIND = 9 + GoTest_MAP GoTest_KIND = 10 + // Table types + GoTest_TABLE GoTest_KIND = 11 + // Functions + GoTest_FUNCTION GoTest_KIND = 12 +) + +var GoTest_KIND_name = map[int32]string{ + 0: "VOID", + 1: "BOOL", + 2: "BYTES", + 3: "FINGERPRINT", + 4: "FLOAT", + 5: "INT", + 6: "STRING", + 7: "TIME", + 8: "TUPLE", + 9: "ARRAY", + 10: "MAP", + 11: "TABLE", + 12: "FUNCTION", +} +var GoTest_KIND_value = map[string]int32{ + "VOID": 0, + "BOOL": 1, + "BYTES": 2, + "FINGERPRINT": 3, + "FLOAT": 4, + "INT": 5, + "STRING": 6, + "TIME": 7, + "TUPLE": 8, + "ARRAY": 9, + "MAP": 10, + "TABLE": 11, + "FUNCTION": 12, +} + +func (x GoTest_KIND) Enum() *GoTest_KIND { + p := new(GoTest_KIND) + *p = x + return p +} +func (x GoTest_KIND) String() string { + return proto.EnumName(GoTest_KIND_name, int32(x)) +} +func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") + if err != nil { + return err + } + *x = GoTest_KIND(value) + return nil +} +func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{2, 0} +} + +type MyMessage_Color int32 + +const ( + MyMessage_RED MyMessage_Color = 0 + MyMessage_GREEN MyMessage_Color = 1 + MyMessage_BLUE MyMessage_Color = 2 +) + +var MyMessage_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var MyMessage_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x MyMessage_Color) Enum() *MyMessage_Color { + p := new(MyMessage_Color) + *p = x + return p +} +func (x MyMessage_Color) String() string { + return proto.EnumName(MyMessage_Color_name, int32(x)) +} +func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") + if err != nil { + return err + } + *x = MyMessage_Color(value) + return nil +} +func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{13, 0} +} + +type DefaultsMessage_DefaultsEnum int32 + +const ( + DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 + DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 + DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 +) + +var DefaultsMessage_DefaultsEnum_name = map[int32]string{ + 0: "ZERO", + 1: "ONE", + 2: "TWO", +} +var DefaultsMessage_DefaultsEnum_value = map[string]int32{ + "ZERO": 0, + "ONE": 1, + "TWO": 2, +} + +func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { + p := new(DefaultsMessage_DefaultsEnum) + *p = x + return p +} +func (x DefaultsMessage_DefaultsEnum) String() string { + return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) +} +func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") + if err != nil { + return err + } + *x = DefaultsMessage_DefaultsEnum(value) + return nil +} +func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{16, 0} +} + +type Defaults_Color int32 + +const ( + Defaults_RED Defaults_Color = 0 + Defaults_GREEN Defaults_Color = 1 + Defaults_BLUE Defaults_Color = 2 +) + +var Defaults_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Defaults_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Defaults_Color) Enum() *Defaults_Color { + p := new(Defaults_Color) + *p = x + return p +} +func (x Defaults_Color) String() string { + return proto.EnumName(Defaults_Color_name, int32(x)) +} +func (x *Defaults_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") + if err != nil { + return err + } + *x = Defaults_Color(value) + return nil +} +func (Defaults_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{21, 0} +} + +type RepeatedEnum_Color int32 + +const ( + RepeatedEnum_RED RepeatedEnum_Color = 1 +) + +var RepeatedEnum_Color_name = map[int32]string{ + 1: "RED", +} +var RepeatedEnum_Color_value = map[string]int32{ + "RED": 1, +} + +func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { + p := new(RepeatedEnum_Color) + *p = x + return p +} +func (x RepeatedEnum_Color) String() string { + return proto.EnumName(RepeatedEnum_Color_name, int32(x)) +} +func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") + if err != nil { + return err + } + *x = RepeatedEnum_Color(value) + return nil +} +func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{23, 0} +} + +type GoEnum struct { + Foo *FOO `protobuf:"varint,1,req,name=foo,enum=test_proto.FOO" json:"foo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoEnum) Reset() { *m = GoEnum{} } +func (m *GoEnum) String() string { return proto.CompactTextString(m) } +func (*GoEnum) ProtoMessage() {} +func (*GoEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{0} +} +func (m *GoEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoEnum.Unmarshal(m, b) +} +func (m *GoEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoEnum.Marshal(b, m, deterministic) +} +func (dst *GoEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoEnum.Merge(dst, src) +} +func (m *GoEnum) XXX_Size() int { + return xxx_messageInfo_GoEnum.Size(m) +} +func (m *GoEnum) XXX_DiscardUnknown() { + xxx_messageInfo_GoEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_GoEnum proto.InternalMessageInfo + +func (m *GoEnum) GetFoo() FOO { + if m != nil && m.Foo != nil { + return *m.Foo + } + return FOO_FOO1 +} + +type GoTestField struct { + Label *string `protobuf:"bytes,1,req,name=Label" json:"Label,omitempty"` + Type *string `protobuf:"bytes,2,req,name=Type" json:"Type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTestField) Reset() { *m = GoTestField{} } +func (m *GoTestField) String() string { return proto.CompactTextString(m) } +func (*GoTestField) ProtoMessage() {} +func (*GoTestField) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{1} +} +func (m *GoTestField) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTestField.Unmarshal(m, b) +} +func (m *GoTestField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTestField.Marshal(b, m, deterministic) +} +func (dst *GoTestField) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTestField.Merge(dst, src) +} +func (m *GoTestField) XXX_Size() int { + return xxx_messageInfo_GoTestField.Size(m) +} +func (m *GoTestField) XXX_DiscardUnknown() { + xxx_messageInfo_GoTestField.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTestField proto.InternalMessageInfo + +func (m *GoTestField) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" +} + +func (m *GoTestField) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +type GoTest struct { + // Some typical parameters + Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,enum=test_proto.GoTest_KIND" json:"Kind,omitempty"` + Table *string `protobuf:"bytes,2,opt,name=Table" json:"Table,omitempty"` + Param *int32 `protobuf:"varint,3,opt,name=Param" json:"Param,omitempty"` + // Required, repeated and optional foreign fields. + RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField" json:"RequiredField,omitempty"` + RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField" json:"RepeatedField,omitempty"` + OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField" json:"OptionalField,omitempty"` + // Required fields of all basic types + F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=FBoolRequired" json:"F_Bool_required,omitempty"` + F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=FInt32Required" json:"F_Int32_required,omitempty"` + F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=FInt64Required" json:"F_Int64_required,omitempty"` + F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=FFixed32Required" json:"F_Fixed32_required,omitempty"` + F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=FFixed64Required" json:"F_Fixed64_required,omitempty"` + F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=FUint32Required" json:"F_Uint32_required,omitempty"` + F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=FUint64Required" json:"F_Uint64_required,omitempty"` + F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=FFloatRequired" json:"F_Float_required,omitempty"` + F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=FDoubleRequired" json:"F_Double_required,omitempty"` + F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=FStringRequired" json:"F_String_required,omitempty"` + F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=FBytesRequired" json:"F_Bytes_required,omitempty"` + F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=FSint32Required" json:"F_Sint32_required,omitempty"` + F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=FSint64Required" json:"F_Sint64_required,omitempty"` + F_Sfixed32Required *int32 `protobuf:"fixed32,104,req,name=F_Sfixed32_required,json=FSfixed32Required" json:"F_Sfixed32_required,omitempty"` + F_Sfixed64Required *int64 `protobuf:"fixed64,105,req,name=F_Sfixed64_required,json=FSfixed64Required" json:"F_Sfixed64_required,omitempty"` + // Repeated fields of all basic types + F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=FBoolRepeated" json:"F_Bool_repeated,omitempty"` + F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=FInt32Repeated" json:"F_Int32_repeated,omitempty"` + F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=FInt64Repeated" json:"F_Int64_repeated,omitempty"` + F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=FFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` + F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=FFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` + F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=FUint32Repeated" json:"F_Uint32_repeated,omitempty"` + F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=FUint64Repeated" json:"F_Uint64_repeated,omitempty"` + F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=FFloatRepeated" json:"F_Float_repeated,omitempty"` + F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=FDoubleRepeated" json:"F_Double_repeated,omitempty"` + F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=FStringRepeated" json:"F_String_repeated,omitempty"` + F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=FBytesRepeated" json:"F_Bytes_repeated,omitempty"` + F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=FSint32Repeated" json:"F_Sint32_repeated,omitempty"` + F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=FSint64Repeated" json:"F_Sint64_repeated,omitempty"` + F_Sfixed32Repeated []int32 `protobuf:"fixed32,204,rep,name=F_Sfixed32_repeated,json=FSfixed32Repeated" json:"F_Sfixed32_repeated,omitempty"` + F_Sfixed64Repeated []int64 `protobuf:"fixed64,205,rep,name=F_Sfixed64_repeated,json=FSfixed64Repeated" json:"F_Sfixed64_repeated,omitempty"` + // Optional fields of all basic types + F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=FBoolOptional" json:"F_Bool_optional,omitempty"` + F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=FInt32Optional" json:"F_Int32_optional,omitempty"` + F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=FInt64Optional" json:"F_Int64_optional,omitempty"` + F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=FFixed32Optional" json:"F_Fixed32_optional,omitempty"` + F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=FFixed64Optional" json:"F_Fixed64_optional,omitempty"` + F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=FUint32Optional" json:"F_Uint32_optional,omitempty"` + F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=FUint64Optional" json:"F_Uint64_optional,omitempty"` + F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=FFloatOptional" json:"F_Float_optional,omitempty"` + F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=FDoubleOptional" json:"F_Double_optional,omitempty"` + F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=FStringOptional" json:"F_String_optional,omitempty"` + F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=FBytesOptional" json:"F_Bytes_optional,omitempty"` + F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=FSint32Optional" json:"F_Sint32_optional,omitempty"` + F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=FSint64Optional" json:"F_Sint64_optional,omitempty"` + F_Sfixed32Optional *int32 `protobuf:"fixed32,304,opt,name=F_Sfixed32_optional,json=FSfixed32Optional" json:"F_Sfixed32_optional,omitempty"` + F_Sfixed64Optional *int64 `protobuf:"fixed64,305,opt,name=F_Sfixed64_optional,json=FSfixed64Optional" json:"F_Sfixed64_optional,omitempty"` + // Default-valued fields of all basic types + F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=FBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` + F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=FInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` + F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=FInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` + F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=FFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` + F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=FFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` + F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=FUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` + F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=FUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` + F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=FFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` + F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=FDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` + F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=FStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` + F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=FBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` + F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=FSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` + F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=FSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` + F_Sfixed32Defaulted *int32 `protobuf:"fixed32,404,opt,name=F_Sfixed32_defaulted,json=FSfixed32Defaulted,def=-32" json:"F_Sfixed32_defaulted,omitempty"` + F_Sfixed64Defaulted *int64 `protobuf:"fixed64,405,opt,name=F_Sfixed64_defaulted,json=FSfixed64Defaulted,def=-64" json:"F_Sfixed64_defaulted,omitempty"` + // Packed repeated fields (no string or bytes). + F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=FBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` + F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=FInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` + F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=FInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` + F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=FFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` + F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=FFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` + F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=FUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` + F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=FUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` + F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=FFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` + F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=FDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` + F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=FSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` + F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=FSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` + F_Sfixed32RepeatedPacked []int32 `protobuf:"fixed32,504,rep,packed,name=F_Sfixed32_repeated_packed,json=FSfixed32RepeatedPacked" json:"F_Sfixed32_repeated_packed,omitempty"` + F_Sfixed64RepeatedPacked []int64 `protobuf:"fixed64,505,rep,packed,name=F_Sfixed64_repeated_packed,json=FSfixed64RepeatedPacked" json:"F_Sfixed64_repeated_packed,omitempty"` + Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` + Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` + Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest) Reset() { *m = GoTest{} } +func (m *GoTest) String() string { return proto.CompactTextString(m) } +func (*GoTest) ProtoMessage() {} +func (*GoTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{2} +} +func (m *GoTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest.Unmarshal(m, b) +} +func (m *GoTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest.Marshal(b, m, deterministic) +} +func (dst *GoTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest.Merge(dst, src) +} +func (m *GoTest) XXX_Size() int { + return xxx_messageInfo_GoTest.Size(m) +} +func (m *GoTest) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest proto.InternalMessageInfo + +const Default_GoTest_F_BoolDefaulted bool = true +const Default_GoTest_F_Int32Defaulted int32 = 32 +const Default_GoTest_F_Int64Defaulted int64 = 64 +const Default_GoTest_F_Fixed32Defaulted uint32 = 320 +const Default_GoTest_F_Fixed64Defaulted uint64 = 640 +const Default_GoTest_F_Uint32Defaulted uint32 = 3200 +const Default_GoTest_F_Uint64Defaulted uint64 = 6400 +const Default_GoTest_F_FloatDefaulted float32 = 314159 +const Default_GoTest_F_DoubleDefaulted float64 = 271828 +const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" + +var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") + +const Default_GoTest_F_Sint32Defaulted int32 = -32 +const Default_GoTest_F_Sint64Defaulted int64 = -64 +const Default_GoTest_F_Sfixed32Defaulted int32 = -32 +const Default_GoTest_F_Sfixed64Defaulted int64 = -64 + +func (m *GoTest) GetKind() GoTest_KIND { + if m != nil && m.Kind != nil { + return *m.Kind + } + return GoTest_VOID +} + +func (m *GoTest) GetTable() string { + if m != nil && m.Table != nil { + return *m.Table + } + return "" +} + +func (m *GoTest) GetParam() int32 { + if m != nil && m.Param != nil { + return *m.Param + } + return 0 +} + +func (m *GoTest) GetRequiredField() *GoTestField { + if m != nil { + return m.RequiredField + } + return nil +} + +func (m *GoTest) GetRepeatedField() []*GoTestField { + if m != nil { + return m.RepeatedField + } + return nil +} + +func (m *GoTest) GetOptionalField() *GoTestField { + if m != nil { + return m.OptionalField + } + return nil +} + +func (m *GoTest) GetF_BoolRequired() bool { + if m != nil && m.F_BoolRequired != nil { + return *m.F_BoolRequired + } + return false +} + +func (m *GoTest) GetF_Int32Required() int32 { + if m != nil && m.F_Int32Required != nil { + return *m.F_Int32Required + } + return 0 +} + +func (m *GoTest) GetF_Int64Required() int64 { + if m != nil && m.F_Int64Required != nil { + return *m.F_Int64Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Required() uint32 { + if m != nil && m.F_Fixed32Required != nil { + return *m.F_Fixed32Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Required() uint64 { + if m != nil && m.F_Fixed64Required != nil { + return *m.F_Fixed64Required + } + return 0 +} + +func (m *GoTest) GetF_Uint32Required() uint32 { + if m != nil && m.F_Uint32Required != nil { + return *m.F_Uint32Required + } + return 0 +} + +func (m *GoTest) GetF_Uint64Required() uint64 { + if m != nil && m.F_Uint64Required != nil { + return *m.F_Uint64Required + } + return 0 +} + +func (m *GoTest) GetF_FloatRequired() float32 { + if m != nil && m.F_FloatRequired != nil { + return *m.F_FloatRequired + } + return 0 +} + +func (m *GoTest) GetF_DoubleRequired() float64 { + if m != nil && m.F_DoubleRequired != nil { + return *m.F_DoubleRequired + } + return 0 +} + +func (m *GoTest) GetF_StringRequired() string { + if m != nil && m.F_StringRequired != nil { + return *m.F_StringRequired + } + return "" +} + +func (m *GoTest) GetF_BytesRequired() []byte { + if m != nil { + return m.F_BytesRequired + } + return nil +} + +func (m *GoTest) GetF_Sint32Required() int32 { + if m != nil && m.F_Sint32Required != nil { + return *m.F_Sint32Required + } + return 0 +} + +func (m *GoTest) GetF_Sint64Required() int64 { + if m != nil && m.F_Sint64Required != nil { + return *m.F_Sint64Required + } + return 0 +} + +func (m *GoTest) GetF_Sfixed32Required() int32 { + if m != nil && m.F_Sfixed32Required != nil { + return *m.F_Sfixed32Required + } + return 0 +} + +func (m *GoTest) GetF_Sfixed64Required() int64 { + if m != nil && m.F_Sfixed64Required != nil { + return *m.F_Sfixed64Required + } + return 0 +} + +func (m *GoTest) GetF_BoolRepeated() []bool { + if m != nil { + return m.F_BoolRepeated + } + return nil +} + +func (m *GoTest) GetF_Int32Repeated() []int32 { + if m != nil { + return m.F_Int32Repeated + } + return nil +} + +func (m *GoTest) GetF_Int64Repeated() []int64 { + if m != nil { + return m.F_Int64Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed32Repeated() []uint32 { + if m != nil { + return m.F_Fixed32Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed64Repeated() []uint64 { + if m != nil { + return m.F_Fixed64Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint32Repeated() []uint32 { + if m != nil { + return m.F_Uint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint64Repeated() []uint64 { + if m != nil { + return m.F_Uint64Repeated + } + return nil +} + +func (m *GoTest) GetF_FloatRepeated() []float32 { + if m != nil { + return m.F_FloatRepeated + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeated() []float64 { + if m != nil { + return m.F_DoubleRepeated + } + return nil +} + +func (m *GoTest) GetF_StringRepeated() []string { + if m != nil { + return m.F_StringRepeated + } + return nil +} + +func (m *GoTest) GetF_BytesRepeated() [][]byte { + if m != nil { + return m.F_BytesRepeated + } + return nil +} + +func (m *GoTest) GetF_Sint32Repeated() []int32 { + if m != nil { + return m.F_Sint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Sint64Repeated() []int64 { + if m != nil { + return m.F_Sint64Repeated + } + return nil +} + +func (m *GoTest) GetF_Sfixed32Repeated() []int32 { + if m != nil { + return m.F_Sfixed32Repeated + } + return nil +} + +func (m *GoTest) GetF_Sfixed64Repeated() []int64 { + if m != nil { + return m.F_Sfixed64Repeated + } + return nil +} + +func (m *GoTest) GetF_BoolOptional() bool { + if m != nil && m.F_BoolOptional != nil { + return *m.F_BoolOptional + } + return false +} + +func (m *GoTest) GetF_Int32Optional() int32 { + if m != nil && m.F_Int32Optional != nil { + return *m.F_Int32Optional + } + return 0 +} + +func (m *GoTest) GetF_Int64Optional() int64 { + if m != nil && m.F_Int64Optional != nil { + return *m.F_Int64Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Optional() uint32 { + if m != nil && m.F_Fixed32Optional != nil { + return *m.F_Fixed32Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Optional() uint64 { + if m != nil && m.F_Fixed64Optional != nil { + return *m.F_Fixed64Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint32Optional() uint32 { + if m != nil && m.F_Uint32Optional != nil { + return *m.F_Uint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint64Optional() uint64 { + if m != nil && m.F_Uint64Optional != nil { + return *m.F_Uint64Optional + } + return 0 +} + +func (m *GoTest) GetF_FloatOptional() float32 { + if m != nil && m.F_FloatOptional != nil { + return *m.F_FloatOptional + } + return 0 +} + +func (m *GoTest) GetF_DoubleOptional() float64 { + if m != nil && m.F_DoubleOptional != nil { + return *m.F_DoubleOptional + } + return 0 +} + +func (m *GoTest) GetF_StringOptional() string { + if m != nil && m.F_StringOptional != nil { + return *m.F_StringOptional + } + return "" +} + +func (m *GoTest) GetF_BytesOptional() []byte { + if m != nil { + return m.F_BytesOptional + } + return nil +} + +func (m *GoTest) GetF_Sint32Optional() int32 { + if m != nil && m.F_Sint32Optional != nil { + return *m.F_Sint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Sint64Optional() int64 { + if m != nil && m.F_Sint64Optional != nil { + return *m.F_Sint64Optional + } + return 0 +} + +func (m *GoTest) GetF_Sfixed32Optional() int32 { + if m != nil && m.F_Sfixed32Optional != nil { + return *m.F_Sfixed32Optional + } + return 0 +} + +func (m *GoTest) GetF_Sfixed64Optional() int64 { + if m != nil && m.F_Sfixed64Optional != nil { + return *m.F_Sfixed64Optional + } + return 0 +} + +func (m *GoTest) GetF_BoolDefaulted() bool { + if m != nil && m.F_BoolDefaulted != nil { + return *m.F_BoolDefaulted + } + return Default_GoTest_F_BoolDefaulted +} + +func (m *GoTest) GetF_Int32Defaulted() int32 { + if m != nil && m.F_Int32Defaulted != nil { + return *m.F_Int32Defaulted + } + return Default_GoTest_F_Int32Defaulted +} + +func (m *GoTest) GetF_Int64Defaulted() int64 { + if m != nil && m.F_Int64Defaulted != nil { + return *m.F_Int64Defaulted + } + return Default_GoTest_F_Int64Defaulted +} + +func (m *GoTest) GetF_Fixed32Defaulted() uint32 { + if m != nil && m.F_Fixed32Defaulted != nil { + return *m.F_Fixed32Defaulted + } + return Default_GoTest_F_Fixed32Defaulted +} + +func (m *GoTest) GetF_Fixed64Defaulted() uint64 { + if m != nil && m.F_Fixed64Defaulted != nil { + return *m.F_Fixed64Defaulted + } + return Default_GoTest_F_Fixed64Defaulted +} + +func (m *GoTest) GetF_Uint32Defaulted() uint32 { + if m != nil && m.F_Uint32Defaulted != nil { + return *m.F_Uint32Defaulted + } + return Default_GoTest_F_Uint32Defaulted +} + +func (m *GoTest) GetF_Uint64Defaulted() uint64 { + if m != nil && m.F_Uint64Defaulted != nil { + return *m.F_Uint64Defaulted + } + return Default_GoTest_F_Uint64Defaulted +} + +func (m *GoTest) GetF_FloatDefaulted() float32 { + if m != nil && m.F_FloatDefaulted != nil { + return *m.F_FloatDefaulted + } + return Default_GoTest_F_FloatDefaulted +} + +func (m *GoTest) GetF_DoubleDefaulted() float64 { + if m != nil && m.F_DoubleDefaulted != nil { + return *m.F_DoubleDefaulted + } + return Default_GoTest_F_DoubleDefaulted +} + +func (m *GoTest) GetF_StringDefaulted() string { + if m != nil && m.F_StringDefaulted != nil { + return *m.F_StringDefaulted + } + return Default_GoTest_F_StringDefaulted +} + +func (m *GoTest) GetF_BytesDefaulted() []byte { + if m != nil && m.F_BytesDefaulted != nil { + return m.F_BytesDefaulted + } + return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) +} + +func (m *GoTest) GetF_Sint32Defaulted() int32 { + if m != nil && m.F_Sint32Defaulted != nil { + return *m.F_Sint32Defaulted + } + return Default_GoTest_F_Sint32Defaulted +} + +func (m *GoTest) GetF_Sint64Defaulted() int64 { + if m != nil && m.F_Sint64Defaulted != nil { + return *m.F_Sint64Defaulted + } + return Default_GoTest_F_Sint64Defaulted +} + +func (m *GoTest) GetF_Sfixed32Defaulted() int32 { + if m != nil && m.F_Sfixed32Defaulted != nil { + return *m.F_Sfixed32Defaulted + } + return Default_GoTest_F_Sfixed32Defaulted +} + +func (m *GoTest) GetF_Sfixed64Defaulted() int64 { + if m != nil && m.F_Sfixed64Defaulted != nil { + return *m.F_Sfixed64Defaulted + } + return Default_GoTest_F_Sfixed64Defaulted +} + +func (m *GoTest) GetF_BoolRepeatedPacked() []bool { + if m != nil { + return m.F_BoolRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { + if m != nil { + return m.F_Int32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { + if m != nil { + return m.F_Int64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Fixed32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Fixed64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Uint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Uint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { + if m != nil { + return m.F_FloatRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { + if m != nil { + return m.F_DoubleRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { + if m != nil { + return m.F_Sint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { + if m != nil { + return m.F_Sint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sfixed32RepeatedPacked() []int32 { + if m != nil { + return m.F_Sfixed32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sfixed64RepeatedPacked() []int64 { + if m != nil { + return m.F_Sfixed64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { + if m != nil { + return m.Requiredgroup + } + return nil +} + +func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { + if m != nil { + return m.Repeatedgroup + } + return nil +} + +func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil +} + +// Required, repeated, and optional groups. +type GoTest_RequiredGroup struct { + RequiredField *string `protobuf:"bytes,71,req,name=RequiredField" json:"RequiredField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } +func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RequiredGroup) ProtoMessage() {} +func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{2, 0} +} +func (m *GoTest_RequiredGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest_RequiredGroup.Unmarshal(m, b) +} +func (m *GoTest_RequiredGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest_RequiredGroup.Marshal(b, m, deterministic) +} +func (dst *GoTest_RequiredGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest_RequiredGroup.Merge(dst, src) +} +func (m *GoTest_RequiredGroup) XXX_Size() int { + return xxx_messageInfo_GoTest_RequiredGroup.Size(m) +} +func (m *GoTest_RequiredGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest_RequiredGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest_RequiredGroup proto.InternalMessageInfo + +func (m *GoTest_RequiredGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_RepeatedGroup struct { + RequiredField *string `protobuf:"bytes,81,req,name=RequiredField" json:"RequiredField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } +func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RepeatedGroup) ProtoMessage() {} +func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{2, 1} +} +func (m *GoTest_RepeatedGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest_RepeatedGroup.Unmarshal(m, b) +} +func (m *GoTest_RepeatedGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest_RepeatedGroup.Marshal(b, m, deterministic) +} +func (dst *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest_RepeatedGroup.Merge(dst, src) +} +func (m *GoTest_RepeatedGroup) XXX_Size() int { + return xxx_messageInfo_GoTest_RepeatedGroup.Size(m) +} +func (m *GoTest_RepeatedGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest_RepeatedGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest_RepeatedGroup proto.InternalMessageInfo + +func (m *GoTest_RepeatedGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,91,req,name=RequiredField" json:"RequiredField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } +func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_OptionalGroup) ProtoMessage() {} +func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{2, 2} +} +func (m *GoTest_OptionalGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest_OptionalGroup.Unmarshal(m, b) +} +func (m *GoTest_OptionalGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest_OptionalGroup.Marshal(b, m, deterministic) +} +func (dst *GoTest_OptionalGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest_OptionalGroup.Merge(dst, src) +} +func (m *GoTest_OptionalGroup) XXX_Size() int { + return xxx_messageInfo_GoTest_OptionalGroup.Size(m) +} +func (m *GoTest_OptionalGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest_OptionalGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest_OptionalGroup proto.InternalMessageInfo + +func (m *GoTest_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +// For testing a group containing a required field. +type GoTestRequiredGroupField struct { + Group *GoTestRequiredGroupField_Group `protobuf:"group,1,req,name=Group,json=group" json:"group,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTestRequiredGroupField) Reset() { *m = GoTestRequiredGroupField{} } +func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) } +func (*GoTestRequiredGroupField) ProtoMessage() {} +func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{3} +} +func (m *GoTestRequiredGroupField) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTestRequiredGroupField.Unmarshal(m, b) +} +func (m *GoTestRequiredGroupField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTestRequiredGroupField.Marshal(b, m, deterministic) +} +func (dst *GoTestRequiredGroupField) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTestRequiredGroupField.Merge(dst, src) +} +func (m *GoTestRequiredGroupField) XXX_Size() int { + return xxx_messageInfo_GoTestRequiredGroupField.Size(m) +} +func (m *GoTestRequiredGroupField) XXX_DiscardUnknown() { + xxx_messageInfo_GoTestRequiredGroupField.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTestRequiredGroupField proto.InternalMessageInfo + +func (m *GoTestRequiredGroupField) GetGroup() *GoTestRequiredGroupField_Group { + if m != nil { + return m.Group + } + return nil +} + +type GoTestRequiredGroupField_Group struct { + Field *int32 `protobuf:"varint,2,req,name=Field" json:"Field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTestRequiredGroupField_Group) Reset() { *m = GoTestRequiredGroupField_Group{} } +func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) } +func (*GoTestRequiredGroupField_Group) ProtoMessage() {} +func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{3, 0} +} +func (m *GoTestRequiredGroupField_Group) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTestRequiredGroupField_Group.Unmarshal(m, b) +} +func (m *GoTestRequiredGroupField_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTestRequiredGroupField_Group.Marshal(b, m, deterministic) +} +func (dst *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(dst, src) +} +func (m *GoTestRequiredGroupField_Group) XXX_Size() int { + return xxx_messageInfo_GoTestRequiredGroupField_Group.Size(m) +} +func (m *GoTestRequiredGroupField_Group) XXX_DiscardUnknown() { + xxx_messageInfo_GoTestRequiredGroupField_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTestRequiredGroupField_Group proto.InternalMessageInfo + +func (m *GoTestRequiredGroupField_Group) GetField() int32 { + if m != nil && m.Field != nil { + return *m.Field + } + return 0 +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +type GoSkipTest struct { + SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` + SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` + SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` + SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` + Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } +func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest) ProtoMessage() {} +func (*GoSkipTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{4} +} +func (m *GoSkipTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoSkipTest.Unmarshal(m, b) +} +func (m *GoSkipTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoSkipTest.Marshal(b, m, deterministic) +} +func (dst *GoSkipTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoSkipTest.Merge(dst, src) +} +func (m *GoSkipTest) XXX_Size() int { + return xxx_messageInfo_GoSkipTest.Size(m) +} +func (m *GoSkipTest) XXX_DiscardUnknown() { + xxx_messageInfo_GoSkipTest.DiscardUnknown(m) +} + +var xxx_messageInfo_GoSkipTest proto.InternalMessageInfo + +func (m *GoSkipTest) GetSkipInt32() int32 { + if m != nil && m.SkipInt32 != nil { + return *m.SkipInt32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed32() uint32 { + if m != nil && m.SkipFixed32 != nil { + return *m.SkipFixed32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed64() uint64 { + if m != nil && m.SkipFixed64 != nil { + return *m.SkipFixed64 + } + return 0 +} + +func (m *GoSkipTest) GetSkipString() string { + if m != nil && m.SkipString != nil { + return *m.SkipString + } + return "" +} + +func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { + if m != nil { + return m.Skipgroup + } + return nil +} + +type GoSkipTest_SkipGroup struct { + GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` + GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } +func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest_SkipGroup) ProtoMessage() {} +func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{4, 0} +} +func (m *GoSkipTest_SkipGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoSkipTest_SkipGroup.Unmarshal(m, b) +} +func (m *GoSkipTest_SkipGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoSkipTest_SkipGroup.Marshal(b, m, deterministic) +} +func (dst *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoSkipTest_SkipGroup.Merge(dst, src) +} +func (m *GoSkipTest_SkipGroup) XXX_Size() int { + return xxx_messageInfo_GoSkipTest_SkipGroup.Size(m) +} +func (m *GoSkipTest_SkipGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoSkipTest_SkipGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoSkipTest_SkipGroup proto.InternalMessageInfo + +func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { + if m != nil && m.GroupInt32 != nil { + return *m.GroupInt32 + } + return 0 +} + +func (m *GoSkipTest_SkipGroup) GetGroupString() string { + if m != nil && m.GroupString != nil { + return *m.GroupString + } + return "" +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +type NonPackedTest struct { + A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } +func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } +func (*NonPackedTest) ProtoMessage() {} +func (*NonPackedTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{5} +} +func (m *NonPackedTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonPackedTest.Unmarshal(m, b) +} +func (m *NonPackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonPackedTest.Marshal(b, m, deterministic) +} +func (dst *NonPackedTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonPackedTest.Merge(dst, src) +} +func (m *NonPackedTest) XXX_Size() int { + return xxx_messageInfo_NonPackedTest.Size(m) +} +func (m *NonPackedTest) XXX_DiscardUnknown() { + xxx_messageInfo_NonPackedTest.DiscardUnknown(m) +} + +var xxx_messageInfo_NonPackedTest proto.InternalMessageInfo + +func (m *NonPackedTest) GetA() []int32 { + if m != nil { + return m.A + } + return nil +} + +type PackedTest struct { + B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PackedTest) Reset() { *m = PackedTest{} } +func (m *PackedTest) String() string { return proto.CompactTextString(m) } +func (*PackedTest) ProtoMessage() {} +func (*PackedTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{6} +} +func (m *PackedTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PackedTest.Unmarshal(m, b) +} +func (m *PackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PackedTest.Marshal(b, m, deterministic) +} +func (dst *PackedTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PackedTest.Merge(dst, src) +} +func (m *PackedTest) XXX_Size() int { + return xxx_messageInfo_PackedTest.Size(m) +} +func (m *PackedTest) XXX_DiscardUnknown() { + xxx_messageInfo_PackedTest.DiscardUnknown(m) +} + +var xxx_messageInfo_PackedTest proto.InternalMessageInfo + +func (m *PackedTest) GetB() []int32 { + if m != nil { + return m.B + } + return nil +} + +type MaxTag struct { + // Maximum possible tag number. + LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MaxTag) Reset() { *m = MaxTag{} } +func (m *MaxTag) String() string { return proto.CompactTextString(m) } +func (*MaxTag) ProtoMessage() {} +func (*MaxTag) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{7} +} +func (m *MaxTag) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MaxTag.Unmarshal(m, b) +} +func (m *MaxTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MaxTag.Marshal(b, m, deterministic) +} +func (dst *MaxTag) XXX_Merge(src proto.Message) { + xxx_messageInfo_MaxTag.Merge(dst, src) +} +func (m *MaxTag) XXX_Size() int { + return xxx_messageInfo_MaxTag.Size(m) +} +func (m *MaxTag) XXX_DiscardUnknown() { + xxx_messageInfo_MaxTag.DiscardUnknown(m) +} + +var xxx_messageInfo_MaxTag proto.InternalMessageInfo + +func (m *MaxTag) GetLastField() string { + if m != nil && m.LastField != nil { + return *m.LastField + } + return "" +} + +type OldMessage struct { + Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldMessage) Reset() { *m = OldMessage{} } +func (m *OldMessage) String() string { return proto.CompactTextString(m) } +func (*OldMessage) ProtoMessage() {} +func (*OldMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{8} +} +func (m *OldMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldMessage.Unmarshal(m, b) +} +func (m *OldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldMessage.Marshal(b, m, deterministic) +} +func (dst *OldMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldMessage.Merge(dst, src) +} +func (m *OldMessage) XXX_Size() int { + return xxx_messageInfo_OldMessage.Size(m) +} +func (m *OldMessage) XXX_DiscardUnknown() { + xxx_messageInfo_OldMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_OldMessage proto.InternalMessageInfo + +func (m *OldMessage) GetNested() *OldMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *OldMessage) GetNum() int32 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type OldMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } +func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*OldMessage_Nested) ProtoMessage() {} +func (*OldMessage_Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{8, 0} +} +func (m *OldMessage_Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldMessage_Nested.Unmarshal(m, b) +} +func (m *OldMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldMessage_Nested.Marshal(b, m, deterministic) +} +func (dst *OldMessage_Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldMessage_Nested.Merge(dst, src) +} +func (m *OldMessage_Nested) XXX_Size() int { + return xxx_messageInfo_OldMessage_Nested.Size(m) +} +func (m *OldMessage_Nested) XXX_DiscardUnknown() { + xxx_messageInfo_OldMessage_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_OldMessage_Nested proto.InternalMessageInfo + +func (m *OldMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +type NewMessage struct { + Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + // This is an int32 in OldMessage. + Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NewMessage) Reset() { *m = NewMessage{} } +func (m *NewMessage) String() string { return proto.CompactTextString(m) } +func (*NewMessage) ProtoMessage() {} +func (*NewMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{9} +} +func (m *NewMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NewMessage.Unmarshal(m, b) +} +func (m *NewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NewMessage.Marshal(b, m, deterministic) +} +func (dst *NewMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NewMessage.Merge(dst, src) +} +func (m *NewMessage) XXX_Size() int { + return xxx_messageInfo_NewMessage.Size(m) +} +func (m *NewMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NewMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NewMessage proto.InternalMessageInfo + +func (m *NewMessage) GetNested() *NewMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *NewMessage) GetNum() int64 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type NewMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } +func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*NewMessage_Nested) ProtoMessage() {} +func (*NewMessage_Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{9, 0} +} +func (m *NewMessage_Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NewMessage_Nested.Unmarshal(m, b) +} +func (m *NewMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NewMessage_Nested.Marshal(b, m, deterministic) +} +func (dst *NewMessage_Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_NewMessage_Nested.Merge(dst, src) +} +func (m *NewMessage_Nested) XXX_Size() int { + return xxx_messageInfo_NewMessage_Nested.Size(m) +} +func (m *NewMessage_Nested) XXX_DiscardUnknown() { + xxx_messageInfo_NewMessage_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_NewMessage_Nested proto.InternalMessageInfo + +func (m *NewMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NewMessage_Nested) GetFoodGroup() string { + if m != nil && m.FoodGroup != nil { + return *m.FoodGroup + } + return "" +} + +type InnerMessage struct { + Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` + Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` + Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InnerMessage) Reset() { *m = InnerMessage{} } +func (m *InnerMessage) String() string { return proto.CompactTextString(m) } +func (*InnerMessage) ProtoMessage() {} +func (*InnerMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{10} +} +func (m *InnerMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InnerMessage.Unmarshal(m, b) +} +func (m *InnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InnerMessage.Marshal(b, m, deterministic) +} +func (dst *InnerMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_InnerMessage.Merge(dst, src) +} +func (m *InnerMessage) XXX_Size() int { + return xxx_messageInfo_InnerMessage.Size(m) +} +func (m *InnerMessage) XXX_DiscardUnknown() { + xxx_messageInfo_InnerMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_InnerMessage proto.InternalMessageInfo + +const Default_InnerMessage_Port int32 = 4000 + +func (m *InnerMessage) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *InnerMessage) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return Default_InnerMessage_Port +} + +func (m *InnerMessage) GetConnected() bool { + if m != nil && m.Connected != nil { + return *m.Connected + } + return false +} + +type OtherMessage struct { + Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` + Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherMessage) Reset() { *m = OtherMessage{} } +func (m *OtherMessage) String() string { return proto.CompactTextString(m) } +func (*OtherMessage) ProtoMessage() {} +func (*OtherMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{11} +} + +var extRange_OtherMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherMessage +} +func (m *OtherMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherMessage.Unmarshal(m, b) +} +func (m *OtherMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherMessage.Marshal(b, m, deterministic) +} +func (dst *OtherMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherMessage.Merge(dst, src) +} +func (m *OtherMessage) XXX_Size() int { + return xxx_messageInfo_OtherMessage.Size(m) +} +func (m *OtherMessage) XXX_DiscardUnknown() { + xxx_messageInfo_OtherMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherMessage proto.InternalMessageInfo + +func (m *OtherMessage) GetKey() int64 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +func (m *OtherMessage) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *OtherMessage) GetWeight() float32 { + if m != nil && m.Weight != nil { + return *m.Weight + } + return 0 +} + +func (m *OtherMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +type RequiredInnerMessage struct { + LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} } +func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } +func (*RequiredInnerMessage) ProtoMessage() {} +func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{12} +} +func (m *RequiredInnerMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequiredInnerMessage.Unmarshal(m, b) +} +func (m *RequiredInnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequiredInnerMessage.Marshal(b, m, deterministic) +} +func (dst *RequiredInnerMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequiredInnerMessage.Merge(dst, src) +} +func (m *RequiredInnerMessage) XXX_Size() int { + return xxx_messageInfo_RequiredInnerMessage.Size(m) +} +func (m *RequiredInnerMessage) XXX_DiscardUnknown() { + xxx_messageInfo_RequiredInnerMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_RequiredInnerMessage proto.InternalMessageInfo + +func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage { + if m != nil { + return m.LeoFinallyWonAnOscar + } + return nil +} + +type MyMessage struct { + Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` + Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` + Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` + Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` + WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"` + RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` + Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color" json:"bikeshed,omitempty"` + Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This field becomes [][]byte in the generated code. + RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` + Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{13} +} + +var extRange_MyMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessage +} +func (m *MyMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessage.Unmarshal(m, b) +} +func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) +} +func (dst *MyMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage.Merge(dst, src) +} +func (m *MyMessage) XXX_Size() int { + return xxx_messageInfo_MyMessage.Size(m) +} +func (m *MyMessage) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage proto.InternalMessageInfo + +func (m *MyMessage) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *MyMessage) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MyMessage) GetQuote() string { + if m != nil && m.Quote != nil { + return *m.Quote + } + return "" +} + +func (m *MyMessage) GetPet() []string { + if m != nil { + return m.Pet + } + return nil +} + +func (m *MyMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +func (m *MyMessage) GetOthers() []*OtherMessage { + if m != nil { + return m.Others + } + return nil +} + +func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage { + if m != nil { + return m.WeMustGoDeeper + } + return nil +} + +func (m *MyMessage) GetRepInner() []*InnerMessage { + if m != nil { + return m.RepInner + } + return nil +} + +func (m *MyMessage) GetBikeshed() MyMessage_Color { + if m != nil && m.Bikeshed != nil { + return *m.Bikeshed + } + return MyMessage_RED +} + +func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *MyMessage) GetRepBytes() [][]byte { + if m != nil { + return m.RepBytes + } + return nil +} + +func (m *MyMessage) GetBigfloat() float64 { + if m != nil && m.Bigfloat != nil { + return *m.Bigfloat + } + return 0 +} + +type MyMessage_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } +func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*MyMessage_SomeGroup) ProtoMessage() {} +func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{13, 0} +} +func (m *MyMessage_SomeGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessage_SomeGroup.Unmarshal(m, b) +} +func (m *MyMessage_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessage_SomeGroup.Marshal(b, m, deterministic) +} +func (dst *MyMessage_SomeGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage_SomeGroup.Merge(dst, src) +} +func (m *MyMessage_SomeGroup) XXX_Size() int { + return xxx_messageInfo_MyMessage_SomeGroup.Size(m) +} +func (m *MyMessage_SomeGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage_SomeGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage_SomeGroup proto.InternalMessageInfo + +func (m *MyMessage_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Ext struct { + Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + MapField map[int32]int32 `protobuf:"bytes,2,rep,name=map_field,json=mapField" json:"map_field,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Ext) Reset() { *m = Ext{} } +func (m *Ext) String() string { return proto.CompactTextString(m) } +func (*Ext) ProtoMessage() {} +func (*Ext) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{14} +} +func (m *Ext) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Ext.Unmarshal(m, b) +} +func (m *Ext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Ext.Marshal(b, m, deterministic) +} +func (dst *Ext) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ext.Merge(dst, src) +} +func (m *Ext) XXX_Size() int { + return xxx_messageInfo_Ext.Size(m) +} +func (m *Ext) XXX_DiscardUnknown() { + xxx_messageInfo_Ext.DiscardUnknown(m) +} + +var xxx_messageInfo_Ext proto.InternalMessageInfo + +func (m *Ext) GetData() string { + if m != nil && m.Data != nil { + return *m.Data + } + return "" +} + +func (m *Ext) GetMapField() map[int32]int32 { + if m != nil { + return m.MapField + } + return nil +} + +var E_Ext_More = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*Ext)(nil), + Field: 103, + Name: "test_proto.Ext.more", + Tag: "bytes,103,opt,name=more", + Filename: "test.proto", +} + +var E_Ext_Text = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*string)(nil), + Field: 104, + Name: "test_proto.Ext.text", + Tag: "bytes,104,opt,name=text", + Filename: "test.proto", +} + +var E_Ext_Number = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 105, + Name: "test_proto.Ext.number", + Tag: "varint,105,opt,name=number", + Filename: "test.proto", +} + +type ComplexExtension struct { + First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` + Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` + Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } +func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } +func (*ComplexExtension) ProtoMessage() {} +func (*ComplexExtension) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{15} +} +func (m *ComplexExtension) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ComplexExtension.Unmarshal(m, b) +} +func (m *ComplexExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ComplexExtension.Marshal(b, m, deterministic) +} +func (dst *ComplexExtension) XXX_Merge(src proto.Message) { + xxx_messageInfo_ComplexExtension.Merge(dst, src) +} +func (m *ComplexExtension) XXX_Size() int { + return xxx_messageInfo_ComplexExtension.Size(m) +} +func (m *ComplexExtension) XXX_DiscardUnknown() { + xxx_messageInfo_ComplexExtension.DiscardUnknown(m) +} + +var xxx_messageInfo_ComplexExtension proto.InternalMessageInfo + +func (m *ComplexExtension) GetFirst() int32 { + if m != nil && m.First != nil { + return *m.First + } + return 0 +} + +func (m *ComplexExtension) GetSecond() int32 { + if m != nil && m.Second != nil { + return *m.Second + } + return 0 +} + +func (m *ComplexExtension) GetThird() []int32 { + if m != nil { + return m.Third + } + return nil +} + +type DefaultsMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } +func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } +func (*DefaultsMessage) ProtoMessage() {} +func (*DefaultsMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{16} +} + +var extRange_DefaultsMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_DefaultsMessage +} +func (m *DefaultsMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DefaultsMessage.Unmarshal(m, b) +} +func (m *DefaultsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DefaultsMessage.Marshal(b, m, deterministic) +} +func (dst *DefaultsMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DefaultsMessage.Merge(dst, src) +} +func (m *DefaultsMessage) XXX_Size() int { + return xxx_messageInfo_DefaultsMessage.Size(m) +} +func (m *DefaultsMessage) XXX_DiscardUnknown() { + xxx_messageInfo_DefaultsMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_DefaultsMessage proto.InternalMessageInfo + +type MyMessageSet struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } +func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } +func (*MyMessageSet) ProtoMessage() {} +func (*MyMessageSet) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{17} +} + +func (m *MyMessageSet) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) +} +func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) +} + +var extRange_MyMessageSet = []proto.ExtensionRange{ + {Start: 100, End: 2147483646}, +} + +func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessageSet +} +func (m *MyMessageSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessageSet.Unmarshal(m, b) +} +func (m *MyMessageSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessageSet.Marshal(b, m, deterministic) +} +func (dst *MyMessageSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessageSet.Merge(dst, src) +} +func (m *MyMessageSet) XXX_Size() int { + return xxx_messageInfo_MyMessageSet.Size(m) +} +func (m *MyMessageSet) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessageSet.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessageSet proto.InternalMessageInfo + +type Empty struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{18} +} +func (m *Empty) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Empty.Unmarshal(m, b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) +} +func (dst *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(dst, src) +} +func (m *Empty) XXX_Size() int { + return xxx_messageInfo_Empty.Size(m) +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +type MessageList struct { + Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageList) Reset() { *m = MessageList{} } +func (m *MessageList) String() string { return proto.CompactTextString(m) } +func (*MessageList) ProtoMessage() {} +func (*MessageList) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{19} +} +func (m *MessageList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageList.Unmarshal(m, b) +} +func (m *MessageList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageList.Marshal(b, m, deterministic) +} +func (dst *MessageList) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageList.Merge(dst, src) +} +func (m *MessageList) XXX_Size() int { + return xxx_messageInfo_MessageList.Size(m) +} +func (m *MessageList) XXX_DiscardUnknown() { + xxx_messageInfo_MessageList.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageList proto.InternalMessageInfo + +func (m *MessageList) GetMessage() []*MessageList_Message { + if m != nil { + return m.Message + } + return nil +} + +type MessageList_Message struct { + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } +func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } +func (*MessageList_Message) ProtoMessage() {} +func (*MessageList_Message) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{19, 0} +} +func (m *MessageList_Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageList_Message.Unmarshal(m, b) +} +func (m *MessageList_Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageList_Message.Marshal(b, m, deterministic) +} +func (dst *MessageList_Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageList_Message.Merge(dst, src) +} +func (m *MessageList_Message) XXX_Size() int { + return xxx_messageInfo_MessageList_Message.Size(m) +} +func (m *MessageList_Message) XXX_DiscardUnknown() { + xxx_messageInfo_MessageList_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageList_Message proto.InternalMessageInfo + +func (m *MessageList_Message) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MessageList_Message) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +type Strings struct { + StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` + BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Strings) Reset() { *m = Strings{} } +func (m *Strings) String() string { return proto.CompactTextString(m) } +func (*Strings) ProtoMessage() {} +func (*Strings) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{20} +} +func (m *Strings) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Strings.Unmarshal(m, b) +} +func (m *Strings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Strings.Marshal(b, m, deterministic) +} +func (dst *Strings) XXX_Merge(src proto.Message) { + xxx_messageInfo_Strings.Merge(dst, src) +} +func (m *Strings) XXX_Size() int { + return xxx_messageInfo_Strings.Size(m) +} +func (m *Strings) XXX_DiscardUnknown() { + xxx_messageInfo_Strings.DiscardUnknown(m) +} + +var xxx_messageInfo_Strings proto.InternalMessageInfo + +func (m *Strings) GetStringField() string { + if m != nil && m.StringField != nil { + return *m.StringField + } + return "" +} + +func (m *Strings) GetBytesField() []byte { + if m != nil { + return m.BytesField + } + return nil +} + +type Defaults struct { + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,def=1" json:"F_Bool,omitempty"` + F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,def=32" json:"F_Int32,omitempty"` + F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,def=64" json:"F_Int64,omitempty"` + F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,def=320" json:"F_Fixed32,omitempty"` + F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,def=640" json:"F_Fixed64,omitempty"` + F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,def=3200" json:"F_Uint32,omitempty"` + F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,def=6400" json:"F_Uint64,omitempty"` + F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,def=314159" json:"F_Float,omitempty"` + F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,def=271828" json:"F_Double,omitempty"` + F_String *string `protobuf:"bytes,10,opt,name=F_String,json=FString,def=hello, \"world!\"\n" json:"F_String,omitempty"` + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,def=Bignose" json:"F_Bytes,omitempty"` + F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,def=-32" json:"F_Sint32,omitempty"` + F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,def=-64" json:"F_Sint64,omitempty"` + F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=test_proto.Defaults_Color,def=1" json:"F_Enum,omitempty"` + // More fields with crazy defaults. + F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=FPinf,def=inf" json:"F_Pinf,omitempty"` + F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=FNinf,def=-inf" json:"F_Ninf,omitempty"` + F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=FNan,def=nan" json:"F_Nan,omitempty"` + // Sub-message. + Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` + // Redundant but explicit defaults. + StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Defaults) Reset() { *m = Defaults{} } +func (m *Defaults) String() string { return proto.CompactTextString(m) } +func (*Defaults) ProtoMessage() {} +func (*Defaults) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{21} +} +func (m *Defaults) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Defaults.Unmarshal(m, b) +} +func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Defaults.Marshal(b, m, deterministic) +} +func (dst *Defaults) XXX_Merge(src proto.Message) { + xxx_messageInfo_Defaults.Merge(dst, src) +} +func (m *Defaults) XXX_Size() int { + return xxx_messageInfo_Defaults.Size(m) +} +func (m *Defaults) XXX_DiscardUnknown() { + xxx_messageInfo_Defaults.DiscardUnknown(m) +} + +var xxx_messageInfo_Defaults proto.InternalMessageInfo + +const Default_Defaults_F_Bool bool = true +const Default_Defaults_F_Int32 int32 = 32 +const Default_Defaults_F_Int64 int64 = 64 +const Default_Defaults_F_Fixed32 uint32 = 320 +const Default_Defaults_F_Fixed64 uint64 = 640 +const Default_Defaults_F_Uint32 uint32 = 3200 +const Default_Defaults_F_Uint64 uint64 = 6400 +const Default_Defaults_F_Float float32 = 314159 +const Default_Defaults_F_Double float64 = 271828 +const Default_Defaults_F_String string = "hello, \"world!\"\n" + +var Default_Defaults_F_Bytes []byte = []byte("Bignose") + +const Default_Defaults_F_Sint32 int32 = -32 +const Default_Defaults_F_Sint64 int64 = -64 +const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN + +var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) +var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) +var Default_Defaults_F_Nan float32 = float32(math.NaN()) + +func (m *Defaults) GetF_Bool() bool { + if m != nil && m.F_Bool != nil { + return *m.F_Bool + } + return Default_Defaults_F_Bool +} + +func (m *Defaults) GetF_Int32() int32 { + if m != nil && m.F_Int32 != nil { + return *m.F_Int32 + } + return Default_Defaults_F_Int32 +} + +func (m *Defaults) GetF_Int64() int64 { + if m != nil && m.F_Int64 != nil { + return *m.F_Int64 + } + return Default_Defaults_F_Int64 +} + +func (m *Defaults) GetF_Fixed32() uint32 { + if m != nil && m.F_Fixed32 != nil { + return *m.F_Fixed32 + } + return Default_Defaults_F_Fixed32 +} + +func (m *Defaults) GetF_Fixed64() uint64 { + if m != nil && m.F_Fixed64 != nil { + return *m.F_Fixed64 + } + return Default_Defaults_F_Fixed64 +} + +func (m *Defaults) GetF_Uint32() uint32 { + if m != nil && m.F_Uint32 != nil { + return *m.F_Uint32 + } + return Default_Defaults_F_Uint32 +} + +func (m *Defaults) GetF_Uint64() uint64 { + if m != nil && m.F_Uint64 != nil { + return *m.F_Uint64 + } + return Default_Defaults_F_Uint64 +} + +func (m *Defaults) GetF_Float() float32 { + if m != nil && m.F_Float != nil { + return *m.F_Float + } + return Default_Defaults_F_Float +} + +func (m *Defaults) GetF_Double() float64 { + if m != nil && m.F_Double != nil { + return *m.F_Double + } + return Default_Defaults_F_Double +} + +func (m *Defaults) GetF_String() string { + if m != nil && m.F_String != nil { + return *m.F_String + } + return Default_Defaults_F_String +} + +func (m *Defaults) GetF_Bytes() []byte { + if m != nil && m.F_Bytes != nil { + return m.F_Bytes + } + return append([]byte(nil), Default_Defaults_F_Bytes...) +} + +func (m *Defaults) GetF_Sint32() int32 { + if m != nil && m.F_Sint32 != nil { + return *m.F_Sint32 + } + return Default_Defaults_F_Sint32 +} + +func (m *Defaults) GetF_Sint64() int64 { + if m != nil && m.F_Sint64 != nil { + return *m.F_Sint64 + } + return Default_Defaults_F_Sint64 +} + +func (m *Defaults) GetF_Enum() Defaults_Color { + if m != nil && m.F_Enum != nil { + return *m.F_Enum + } + return Default_Defaults_F_Enum +} + +func (m *Defaults) GetF_Pinf() float32 { + if m != nil && m.F_Pinf != nil { + return *m.F_Pinf + } + return Default_Defaults_F_Pinf +} + +func (m *Defaults) GetF_Ninf() float32 { + if m != nil && m.F_Ninf != nil { + return *m.F_Ninf + } + return Default_Defaults_F_Ninf +} + +func (m *Defaults) GetF_Nan() float32 { + if m != nil && m.F_Nan != nil { + return *m.F_Nan + } + return Default_Defaults_F_Nan +} + +func (m *Defaults) GetSub() *SubDefaults { + if m != nil { + return m.Sub + } + return nil +} + +func (m *Defaults) GetStrZero() string { + if m != nil && m.StrZero != nil { + return *m.StrZero + } + return "" +} + +type SubDefaults struct { + N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubDefaults) Reset() { *m = SubDefaults{} } +func (m *SubDefaults) String() string { return proto.CompactTextString(m) } +func (*SubDefaults) ProtoMessage() {} +func (*SubDefaults) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{22} +} +func (m *SubDefaults) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubDefaults.Unmarshal(m, b) +} +func (m *SubDefaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubDefaults.Marshal(b, m, deterministic) +} +func (dst *SubDefaults) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubDefaults.Merge(dst, src) +} +func (m *SubDefaults) XXX_Size() int { + return xxx_messageInfo_SubDefaults.Size(m) +} +func (m *SubDefaults) XXX_DiscardUnknown() { + xxx_messageInfo_SubDefaults.DiscardUnknown(m) +} + +var xxx_messageInfo_SubDefaults proto.InternalMessageInfo + +const Default_SubDefaults_N int64 = 7 + +func (m *SubDefaults) GetN() int64 { + if m != nil && m.N != nil { + return *m.N + } + return Default_SubDefaults_N +} + +type RepeatedEnum struct { + Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=test_proto.RepeatedEnum_Color" json:"color,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } +func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } +func (*RepeatedEnum) ProtoMessage() {} +func (*RepeatedEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{23} +} +func (m *RepeatedEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepeatedEnum.Unmarshal(m, b) +} +func (m *RepeatedEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepeatedEnum.Marshal(b, m, deterministic) +} +func (dst *RepeatedEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepeatedEnum.Merge(dst, src) +} +func (m *RepeatedEnum) XXX_Size() int { + return xxx_messageInfo_RepeatedEnum.Size(m) +} +func (m *RepeatedEnum) XXX_DiscardUnknown() { + xxx_messageInfo_RepeatedEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_RepeatedEnum proto.InternalMessageInfo + +func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { + if m != nil { + return m.Color + } + return nil +} + +type MoreRepeated struct { + Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` + BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` + Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` + IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` + Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` + Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` + Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } +func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } +func (*MoreRepeated) ProtoMessage() {} +func (*MoreRepeated) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{24} +} +func (m *MoreRepeated) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MoreRepeated.Unmarshal(m, b) +} +func (m *MoreRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MoreRepeated.Marshal(b, m, deterministic) +} +func (dst *MoreRepeated) XXX_Merge(src proto.Message) { + xxx_messageInfo_MoreRepeated.Merge(dst, src) +} +func (m *MoreRepeated) XXX_Size() int { + return xxx_messageInfo_MoreRepeated.Size(m) +} +func (m *MoreRepeated) XXX_DiscardUnknown() { + xxx_messageInfo_MoreRepeated.DiscardUnknown(m) +} + +var xxx_messageInfo_MoreRepeated proto.InternalMessageInfo + +func (m *MoreRepeated) GetBools() []bool { + if m != nil { + return m.Bools + } + return nil +} + +func (m *MoreRepeated) GetBoolsPacked() []bool { + if m != nil { + return m.BoolsPacked + } + return nil +} + +func (m *MoreRepeated) GetInts() []int32 { + if m != nil { + return m.Ints + } + return nil +} + +func (m *MoreRepeated) GetIntsPacked() []int32 { + if m != nil { + return m.IntsPacked + } + return nil +} + +func (m *MoreRepeated) GetInt64SPacked() []int64 { + if m != nil { + return m.Int64SPacked + } + return nil +} + +func (m *MoreRepeated) GetStrings() []string { + if m != nil { + return m.Strings + } + return nil +} + +func (m *MoreRepeated) GetFixeds() []uint32 { + if m != nil { + return m.Fixeds + } + return nil +} + +type GroupOld struct { + G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupOld) Reset() { *m = GroupOld{} } +func (m *GroupOld) String() string { return proto.CompactTextString(m) } +func (*GroupOld) ProtoMessage() {} +func (*GroupOld) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{25} +} +func (m *GroupOld) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupOld.Unmarshal(m, b) +} +func (m *GroupOld) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupOld.Marshal(b, m, deterministic) +} +func (dst *GroupOld) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupOld.Merge(dst, src) +} +func (m *GroupOld) XXX_Size() int { + return xxx_messageInfo_GroupOld.Size(m) +} +func (m *GroupOld) XXX_DiscardUnknown() { + xxx_messageInfo_GroupOld.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupOld proto.InternalMessageInfo + +func (m *GroupOld) GetG() *GroupOld_G { + if m != nil { + return m.G + } + return nil +} + +type GroupOld_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } +func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } +func (*GroupOld_G) ProtoMessage() {} +func (*GroupOld_G) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{25, 0} +} +func (m *GroupOld_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupOld_G.Unmarshal(m, b) +} +func (m *GroupOld_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupOld_G.Marshal(b, m, deterministic) +} +func (dst *GroupOld_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupOld_G.Merge(dst, src) +} +func (m *GroupOld_G) XXX_Size() int { + return xxx_messageInfo_GroupOld_G.Size(m) +} +func (m *GroupOld_G) XXX_DiscardUnknown() { + xxx_messageInfo_GroupOld_G.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupOld_G proto.InternalMessageInfo + +func (m *GroupOld_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type GroupNew struct { + G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupNew) Reset() { *m = GroupNew{} } +func (m *GroupNew) String() string { return proto.CompactTextString(m) } +func (*GroupNew) ProtoMessage() {} +func (*GroupNew) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{26} +} +func (m *GroupNew) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupNew.Unmarshal(m, b) +} +func (m *GroupNew) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupNew.Marshal(b, m, deterministic) +} +func (dst *GroupNew) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupNew.Merge(dst, src) +} +func (m *GroupNew) XXX_Size() int { + return xxx_messageInfo_GroupNew.Size(m) +} +func (m *GroupNew) XXX_DiscardUnknown() { + xxx_messageInfo_GroupNew.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupNew proto.InternalMessageInfo + +func (m *GroupNew) GetG() *GroupNew_G { + if m != nil { + return m.G + } + return nil +} + +type GroupNew_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } +func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } +func (*GroupNew_G) ProtoMessage() {} +func (*GroupNew_G) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{26, 0} +} +func (m *GroupNew_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupNew_G.Unmarshal(m, b) +} +func (m *GroupNew_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupNew_G.Marshal(b, m, deterministic) +} +func (dst *GroupNew_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupNew_G.Merge(dst, src) +} +func (m *GroupNew_G) XXX_Size() int { + return xxx_messageInfo_GroupNew_G.Size(m) +} +func (m *GroupNew_G) XXX_DiscardUnknown() { + xxx_messageInfo_GroupNew_G.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupNew_G proto.InternalMessageInfo + +func (m *GroupNew_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *GroupNew_G) GetY() int32 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` + Exact *bool `protobuf:"varint,2,opt,name=exact" json:"exact,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{27} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +func (m *FloatingPoint) GetF() float64 { + if m != nil && m.F != nil { + return *m.F + } + return 0 +} + +func (m *FloatingPoint) GetExact() bool { + if m != nil && m.Exact != nil { + return *m.Exact + } + return false +} + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{28} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +func (m *MessageWithMap) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +func (m *MessageWithMap) GetStrToStr() map[string]string { + if m != nil { + return m.StrToStr + } + return nil +} + +type Oneof struct { + // Types that are valid to be assigned to Union: + // *Oneof_F_Bool + // *Oneof_F_Int32 + // *Oneof_F_Int64 + // *Oneof_F_Fixed32 + // *Oneof_F_Fixed64 + // *Oneof_F_Uint32 + // *Oneof_F_Uint64 + // *Oneof_F_Float + // *Oneof_F_Double + // *Oneof_F_String + // *Oneof_F_Bytes + // *Oneof_F_Sint32 + // *Oneof_F_Sint64 + // *Oneof_F_Enum + // *Oneof_F_Message + // *Oneof_FGroup + // *Oneof_F_Largest_Tag + Union isOneof_Union `protobuf_oneof:"union"` + // Types that are valid to be assigned to Tormato: + // *Oneof_Value + Tormato isOneof_Tormato `protobuf_oneof:"tormato"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Oneof) Reset() { *m = Oneof{} } +func (m *Oneof) String() string { return proto.CompactTextString(m) } +func (*Oneof) ProtoMessage() {} +func (*Oneof) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{29} +} +func (m *Oneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Oneof.Unmarshal(m, b) +} +func (m *Oneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Oneof.Marshal(b, m, deterministic) +} +func (dst *Oneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_Oneof.Merge(dst, src) +} +func (m *Oneof) XXX_Size() int { + return xxx_messageInfo_Oneof.Size(m) +} +func (m *Oneof) XXX_DiscardUnknown() { + xxx_messageInfo_Oneof.DiscardUnknown(m) +} + +var xxx_messageInfo_Oneof proto.InternalMessageInfo + +type isOneof_Union interface { + isOneof_Union() +} +type isOneof_Tormato interface { + isOneof_Tormato() +} + +type Oneof_F_Bool struct { + F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,oneof"` +} +type Oneof_F_Int32 struct { + F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,oneof"` +} +type Oneof_F_Int64 struct { + F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,oneof"` +} +type Oneof_F_Fixed32 struct { + F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,oneof"` +} +type Oneof_F_Fixed64 struct { + F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,oneof"` +} +type Oneof_F_Uint32 struct { + F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,oneof"` +} +type Oneof_F_Uint64 struct { + F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,oneof"` +} +type Oneof_F_Float struct { + F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,oneof"` +} +type Oneof_F_Double struct { + F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,oneof"` +} +type Oneof_F_String struct { + F_String string `protobuf:"bytes,10,opt,name=F_String,json=FString,oneof"` +} +type Oneof_F_Bytes struct { + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,oneof"` +} +type Oneof_F_Sint32 struct { + F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,oneof"` +} +type Oneof_F_Sint64 struct { + F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,oneof"` +} +type Oneof_F_Enum struct { + F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=test_proto.MyMessage_Color,oneof"` +} +type Oneof_F_Message struct { + F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=FMessage,oneof"` +} +type Oneof_FGroup struct { + FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` +} +type Oneof_F_Largest_Tag struct { + F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=FLargestTag,oneof"` +} +type Oneof_Value struct { + Value int32 `protobuf:"varint,100,opt,name=value,oneof"` +} + +func (*Oneof_F_Bool) isOneof_Union() {} +func (*Oneof_F_Int32) isOneof_Union() {} +func (*Oneof_F_Int64) isOneof_Union() {} +func (*Oneof_F_Fixed32) isOneof_Union() {} +func (*Oneof_F_Fixed64) isOneof_Union() {} +func (*Oneof_F_Uint32) isOneof_Union() {} +func (*Oneof_F_Uint64) isOneof_Union() {} +func (*Oneof_F_Float) isOneof_Union() {} +func (*Oneof_F_Double) isOneof_Union() {} +func (*Oneof_F_String) isOneof_Union() {} +func (*Oneof_F_Bytes) isOneof_Union() {} +func (*Oneof_F_Sint32) isOneof_Union() {} +func (*Oneof_F_Sint64) isOneof_Union() {} +func (*Oneof_F_Enum) isOneof_Union() {} +func (*Oneof_F_Message) isOneof_Union() {} +func (*Oneof_FGroup) isOneof_Union() {} +func (*Oneof_F_Largest_Tag) isOneof_Union() {} +func (*Oneof_Value) isOneof_Tormato() {} + +func (m *Oneof) GetUnion() isOneof_Union { + if m != nil { + return m.Union + } + return nil +} +func (m *Oneof) GetTormato() isOneof_Tormato { + if m != nil { + return m.Tormato + } + return nil +} + +func (m *Oneof) GetF_Bool() bool { + if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { + return x.F_Bool + } + return false +} + +func (m *Oneof) GetF_Int32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { + return x.F_Int32 + } + return 0 +} + +func (m *Oneof) GetF_Int64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { + return x.F_Int64 + } + return 0 +} + +func (m *Oneof) GetF_Fixed32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { + return x.F_Fixed32 + } + return 0 +} + +func (m *Oneof) GetF_Fixed64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { + return x.F_Fixed64 + } + return 0 +} + +func (m *Oneof) GetF_Uint32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { + return x.F_Uint32 + } + return 0 +} + +func (m *Oneof) GetF_Uint64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { + return x.F_Uint64 + } + return 0 +} + +func (m *Oneof) GetF_Float() float32 { + if x, ok := m.GetUnion().(*Oneof_F_Float); ok { + return x.F_Float + } + return 0 +} + +func (m *Oneof) GetF_Double() float64 { + if x, ok := m.GetUnion().(*Oneof_F_Double); ok { + return x.F_Double + } + return 0 +} + +func (m *Oneof) GetF_String() string { + if x, ok := m.GetUnion().(*Oneof_F_String); ok { + return x.F_String + } + return "" +} + +func (m *Oneof) GetF_Bytes() []byte { + if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { + return x.F_Bytes + } + return nil +} + +func (m *Oneof) GetF_Sint32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { + return x.F_Sint32 + } + return 0 +} + +func (m *Oneof) GetF_Sint64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { + return x.F_Sint64 + } + return 0 +} + +func (m *Oneof) GetF_Enum() MyMessage_Color { + if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { + return x.F_Enum + } + return MyMessage_RED +} + +func (m *Oneof) GetF_Message() *GoTestField { + if x, ok := m.GetUnion().(*Oneof_F_Message); ok { + return x.F_Message + } + return nil +} + +func (m *Oneof) GetFGroup() *Oneof_F_Group { + if x, ok := m.GetUnion().(*Oneof_FGroup); ok { + return x.FGroup + } + return nil +} + +func (m *Oneof) GetF_Largest_Tag() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { + return x.F_Largest_Tag + } + return 0 +} + +func (m *Oneof) GetValue() int32 { + if x, ok := m.GetTormato().(*Oneof_Value); ok { + return x.Value + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ + (*Oneof_F_Bool)(nil), + (*Oneof_F_Int32)(nil), + (*Oneof_F_Int64)(nil), + (*Oneof_F_Fixed32)(nil), + (*Oneof_F_Fixed64)(nil), + (*Oneof_F_Uint32)(nil), + (*Oneof_F_Uint64)(nil), + (*Oneof_F_Float)(nil), + (*Oneof_F_Double)(nil), + (*Oneof_F_String)(nil), + (*Oneof_F_Bytes)(nil), + (*Oneof_F_Sint32)(nil), + (*Oneof_F_Sint64)(nil), + (*Oneof_F_Enum)(nil), + (*Oneof_F_Message)(nil), + (*Oneof_FGroup)(nil), + (*Oneof_F_Largest_Tag)(nil), + (*Oneof_Value)(nil), + } +} + +func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + t := uint64(0) + if x.F_Bool { + t = 1 + } + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Oneof_F_Int32: + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + _ = b.EncodeVarint(4<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.F_Fixed32)) + case *Oneof_F_Fixed64: + _ = b.EncodeVarint(5<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.F_Fixed64)) + case *Oneof_F_Uint32: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + _ = b.EncodeVarint(8<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) + case *Oneof_F_Double: + _ = b.EncodeVarint(9<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.F_Double)) + case *Oneof_F_String: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.F_String) + case *Oneof_F_Bytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.F_Bytes) + case *Oneof_F_Sint32: + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.F_Sint32)) + case *Oneof_F_Sint64: + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.F_Sint64)) + case *Oneof_F_Enum: + _ = b.EncodeVarint(14<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.F_Message); err != nil { + return err + } + case *Oneof_FGroup: + _ = b.EncodeVarint(16<<3 | proto.WireStartGroup) + if err := b.Marshal(x.FGroup); err != nil { + return err + } + _ = b.EncodeVarint(16<<3 | proto.WireEndGroup) + case *Oneof_F_Largest_Tag: + _ = b.EncodeVarint(536870911<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + return fmt.Errorf("Oneof.Union has unexpected type %T", x) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + _ = b.EncodeVarint(100<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Value)) + case nil: + default: + return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) + } + return nil +} + +func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Oneof) + switch tag { + case 1: // union.F_Bool + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Bool{x != 0} + return true, err + case 2: // union.F_Int32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int32{int32(x)} + return true, err + case 3: // union.F_Int64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int64{int64(x)} + return true, err + case 4: // union.F_Fixed32 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Fixed32{uint32(x)} + return true, err + case 5: // union.F_Fixed64 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Fixed64{x} + return true, err + case 6: // union.F_Uint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint32{uint32(x)} + return true, err + case 7: // union.F_Uint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint64{x} + return true, err + case 8: // union.F_Float + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} + return true, err + case 9: // union.F_Double + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Double{math.Float64frombits(x)} + return true, err + case 10: // union.F_String + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Oneof_F_String{x} + return true, err + case 11: // union.F_Bytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Oneof_F_Bytes{x} + return true, err + case 12: // union.F_Sint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Oneof_F_Sint32{int32(x)} + return true, err + case 13: // union.F_Sint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.Union = &Oneof_F_Sint64{int64(x)} + return true, err + case 14: // union.F_Enum + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Enum{MyMessage_Color(x)} + return true, err + case 15: // union.F_Message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(GoTestField) + err := b.DecodeMessage(msg) + m.Union = &Oneof_F_Message{msg} + return true, err + case 16: // union.f_group + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Oneof_F_Group) + err := b.DecodeGroup(msg) + m.Union = &Oneof_FGroup{msg} + return true, err + case 536870911: // union.F_Largest_Tag + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Largest_Tag{int32(x)} + return true, err + case 100: // tormato.value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Tormato = &Oneof_Value{int32(x)} + return true, err + default: + return false, nil + } +} + +func _Oneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + n += 1 // tag and wire + n += 1 + case *Oneof_F_Int32: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + n += 1 // tag and wire + n += 4 + case *Oneof_F_Fixed64: + n += 1 // tag and wire + n += 8 + case *Oneof_F_Uint32: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + n += 1 // tag and wire + n += 4 + case *Oneof_F_Double: + n += 1 // tag and wire + n += 8 + case *Oneof_F_String: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.F_String))) + n += len(x.F_String) + case *Oneof_F_Bytes: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.F_Bytes))) + n += len(x.F_Bytes) + case *Oneof_F_Sint32: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) + case *Oneof_F_Sint64: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) + case *Oneof_F_Enum: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + s := proto.Size(x.F_Message) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Oneof_FGroup: + n += 2 // tag and wire + n += proto.Size(x.FGroup) + n += 2 // tag and wire + case *Oneof_F_Largest_Tag: + n += 10 // tag and wire + n += proto.SizeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.Value)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Oneof_F_Group struct { + X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } +func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } +func (*Oneof_F_Group) ProtoMessage() {} +func (*Oneof_F_Group) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{29, 0} +} +func (m *Oneof_F_Group) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Oneof_F_Group.Unmarshal(m, b) +} +func (m *Oneof_F_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Oneof_F_Group.Marshal(b, m, deterministic) +} +func (dst *Oneof_F_Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_Oneof_F_Group.Merge(dst, src) +} +func (m *Oneof_F_Group) XXX_Size() int { + return xxx_messageInfo_Oneof_F_Group.Size(m) +} +func (m *Oneof_F_Group) XXX_DiscardUnknown() { + xxx_messageInfo_Oneof_F_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_Oneof_F_Group proto.InternalMessageInfo + +func (m *Oneof_F_Group) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Col + // *Communique_Msg + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} +func (*Communique) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{30} +} +func (m *Communique) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique.Unmarshal(m, b) +} +func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique.Marshal(b, m, deterministic) +} +func (dst *Communique) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique.Merge(dst, src) +} +func (m *Communique) XXX_Size() int { + return xxx_messageInfo_Communique.Size(m) +} +func (m *Communique) XXX_DiscardUnknown() { + xxx_messageInfo_Communique.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique proto.InternalMessageInfo + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Col struct { + Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=test_proto.MyMessage_Color,oneof"` +} +type Communique_Msg struct { + Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Col) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetCol() MyMessage_Color { + if x, ok := m.GetUnion().(*Communique_Col); ok { + return x.Col + } + return MyMessage_RED +} + +func (m *Communique) GetMsg() *Strings { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Col)(nil), + (*Communique_Msg)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Name) + case *Communique_Data: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Data) + case *Communique_TempC: + _ = b.EncodeVarint(8<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Col: + _ = b.EncodeVarint(9<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Col)) + case *Communique_Msg: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.col + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Col{MyMessage_Color(x)} + return true, err + case 10: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Strings) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += 1 // tag and wire + n += 8 + case *Communique_Col: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Col)) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomDeterministicMarshaler struct { + Field1 *uint64 `protobuf:"varint,1,opt,name=field1" json:"field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDeterministicMarshaler) Reset() { *m = CustomDeterministicMarshaler{} } +func (m *CustomDeterministicMarshaler) String() string { return proto.CompactTextString(m) } +func (*CustomDeterministicMarshaler) ProtoMessage() {} +func (*CustomDeterministicMarshaler) Descriptor() ([]byte, []int) { + return fileDescriptor_test_800cb821a123159d, []int{31} +} +func (m *CustomDeterministicMarshaler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomDeterministicMarshaler.Unmarshal(m, b) +} +func (m *CustomDeterministicMarshaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomDeterministicMarshaler.Marshal(b, m, deterministic) +} +func (dst *CustomDeterministicMarshaler) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDeterministicMarshaler.Merge(dst, src) +} +func (m *CustomDeterministicMarshaler) XXX_Size() int { + return xxx_messageInfo_CustomDeterministicMarshaler.Size(m) +} +func (m *CustomDeterministicMarshaler) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDeterministicMarshaler.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDeterministicMarshaler proto.InternalMessageInfo + +func (m *CustomDeterministicMarshaler) GetField1() uint64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +var E_Greeting = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: ([]string)(nil), + Field: 106, + Name: "test_proto.greeting", + Tag: "bytes,106,rep,name=greeting", + Filename: "test.proto", +} + +var E_Complex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: (*ComplexExtension)(nil), + Field: 200, + Name: "test_proto.complex", + Tag: "bytes,200,opt,name=complex", + Filename: "test.proto", +} + +var E_RComplex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: ([]*ComplexExtension)(nil), + Field: 201, + Name: "test_proto.r_complex", + Tag: "bytes,201,rep,name=r_complex,json=rComplex", + Filename: "test.proto", +} + +var E_NoDefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "test_proto.no_default_double", + Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", + Filename: "test.proto", +} + +var E_NoDefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 102, + Name: "test_proto.no_default_float", + Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", + Filename: "test.proto", +} + +var E_NoDefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 103, + Name: "test_proto.no_default_int32", + Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", + Filename: "test.proto", +} + +var E_NoDefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 104, + Name: "test_proto.no_default_int64", + Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", + Filename: "test.proto", +} + +var E_NoDefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 105, + Name: "test_proto.no_default_uint32", + Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", + Filename: "test.proto", +} + +var E_NoDefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 106, + Name: "test_proto.no_default_uint64", + Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", + Filename: "test.proto", +} + +var E_NoDefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 107, + Name: "test_proto.no_default_sint32", + Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", + Filename: "test.proto", +} + +var E_NoDefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 108, + Name: "test_proto.no_default_sint64", + Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", + Filename: "test.proto", +} + +var E_NoDefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 109, + Name: "test_proto.no_default_fixed32", + Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", + Filename: "test.proto", +} + +var E_NoDefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 110, + Name: "test_proto.no_default_fixed64", + Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", + Filename: "test.proto", +} + +var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 111, + Name: "test_proto.no_default_sfixed32", + Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", + Filename: "test.proto", +} + +var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 112, + Name: "test_proto.no_default_sfixed64", + Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", + Filename: "test.proto", +} + +var E_NoDefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 113, + Name: "test_proto.no_default_bool", + Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", + Filename: "test.proto", +} + +var E_NoDefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 114, + Name: "test_proto.no_default_string", + Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", + Filename: "test.proto", +} + +var E_NoDefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 115, + Name: "test_proto.no_default_bytes", + Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", + Filename: "test.proto", +} + +var E_NoDefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 116, + Name: "test_proto.no_default_enum", + Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum", + Filename: "test.proto", +} + +var E_DefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 201, + Name: "test_proto.default_double", + Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", + Filename: "test.proto", +} + +var E_DefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 202, + Name: "test_proto.default_float", + Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", + Filename: "test.proto", +} + +var E_DefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 203, + Name: "test_proto.default_int32", + Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", + Filename: "test.proto", +} + +var E_DefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 204, + Name: "test_proto.default_int64", + Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", + Filename: "test.proto", +} + +var E_DefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 205, + Name: "test_proto.default_uint32", + Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", + Filename: "test.proto", +} + +var E_DefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 206, + Name: "test_proto.default_uint64", + Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", + Filename: "test.proto", +} + +var E_DefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 207, + Name: "test_proto.default_sint32", + Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", + Filename: "test.proto", +} + +var E_DefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 208, + Name: "test_proto.default_sint64", + Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", + Filename: "test.proto", +} + +var E_DefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 209, + Name: "test_proto.default_fixed32", + Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", + Filename: "test.proto", +} + +var E_DefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 210, + Name: "test_proto.default_fixed64", + Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", + Filename: "test.proto", +} + +var E_DefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 211, + Name: "test_proto.default_sfixed32", + Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", + Filename: "test.proto", +} + +var E_DefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 212, + Name: "test_proto.default_sfixed64", + Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", + Filename: "test.proto", +} + +var E_DefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 213, + Name: "test_proto.default_bool", + Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", + Filename: "test.proto", +} + +var E_DefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 214, + Name: "test_proto.default_string", + Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string,def=foo", + Filename: "test.proto", +} + +var E_DefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 215, + Name: "test_proto.default_bytes", + Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", + Filename: "test.proto", +} + +var E_DefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 216, + Name: "test_proto.default_enum", + Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1", + Filename: "test.proto", +} + +var E_X201 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 201, + Name: "test_proto.x201", + Tag: "bytes,201,opt,name=x201", + Filename: "test.proto", +} + +var E_X202 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 202, + Name: "test_proto.x202", + Tag: "bytes,202,opt,name=x202", + Filename: "test.proto", +} + +var E_X203 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 203, + Name: "test_proto.x203", + Tag: "bytes,203,opt,name=x203", + Filename: "test.proto", +} + +var E_X204 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 204, + Name: "test_proto.x204", + Tag: "bytes,204,opt,name=x204", + Filename: "test.proto", +} + +var E_X205 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 205, + Name: "test_proto.x205", + Tag: "bytes,205,opt,name=x205", + Filename: "test.proto", +} + +var E_X206 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 206, + Name: "test_proto.x206", + Tag: "bytes,206,opt,name=x206", + Filename: "test.proto", +} + +var E_X207 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 207, + Name: "test_proto.x207", + Tag: "bytes,207,opt,name=x207", + Filename: "test.proto", +} + +var E_X208 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 208, + Name: "test_proto.x208", + Tag: "bytes,208,opt,name=x208", + Filename: "test.proto", +} + +var E_X209 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 209, + Name: "test_proto.x209", + Tag: "bytes,209,opt,name=x209", + Filename: "test.proto", +} + +var E_X210 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 210, + Name: "test_proto.x210", + Tag: "bytes,210,opt,name=x210", + Filename: "test.proto", +} + +var E_X211 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 211, + Name: "test_proto.x211", + Tag: "bytes,211,opt,name=x211", + Filename: "test.proto", +} + +var E_X212 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 212, + Name: "test_proto.x212", + Tag: "bytes,212,opt,name=x212", + Filename: "test.proto", +} + +var E_X213 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 213, + Name: "test_proto.x213", + Tag: "bytes,213,opt,name=x213", + Filename: "test.proto", +} + +var E_X214 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 214, + Name: "test_proto.x214", + Tag: "bytes,214,opt,name=x214", + Filename: "test.proto", +} + +var E_X215 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 215, + Name: "test_proto.x215", + Tag: "bytes,215,opt,name=x215", + Filename: "test.proto", +} + +var E_X216 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 216, + Name: "test_proto.x216", + Tag: "bytes,216,opt,name=x216", + Filename: "test.proto", +} + +var E_X217 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 217, + Name: "test_proto.x217", + Tag: "bytes,217,opt,name=x217", + Filename: "test.proto", +} + +var E_X218 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 218, + Name: "test_proto.x218", + Tag: "bytes,218,opt,name=x218", + Filename: "test.proto", +} + +var E_X219 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 219, + Name: "test_proto.x219", + Tag: "bytes,219,opt,name=x219", + Filename: "test.proto", +} + +var E_X220 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 220, + Name: "test_proto.x220", + Tag: "bytes,220,opt,name=x220", + Filename: "test.proto", +} + +var E_X221 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 221, + Name: "test_proto.x221", + Tag: "bytes,221,opt,name=x221", + Filename: "test.proto", +} + +var E_X222 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 222, + Name: "test_proto.x222", + Tag: "bytes,222,opt,name=x222", + Filename: "test.proto", +} + +var E_X223 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 223, + Name: "test_proto.x223", + Tag: "bytes,223,opt,name=x223", + Filename: "test.proto", +} + +var E_X224 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 224, + Name: "test_proto.x224", + Tag: "bytes,224,opt,name=x224", + Filename: "test.proto", +} + +var E_X225 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 225, + Name: "test_proto.x225", + Tag: "bytes,225,opt,name=x225", + Filename: "test.proto", +} + +var E_X226 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 226, + Name: "test_proto.x226", + Tag: "bytes,226,opt,name=x226", + Filename: "test.proto", +} + +var E_X227 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 227, + Name: "test_proto.x227", + Tag: "bytes,227,opt,name=x227", + Filename: "test.proto", +} + +var E_X228 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 228, + Name: "test_proto.x228", + Tag: "bytes,228,opt,name=x228", + Filename: "test.proto", +} + +var E_X229 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 229, + Name: "test_proto.x229", + Tag: "bytes,229,opt,name=x229", + Filename: "test.proto", +} + +var E_X230 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 230, + Name: "test_proto.x230", + Tag: "bytes,230,opt,name=x230", + Filename: "test.proto", +} + +var E_X231 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 231, + Name: "test_proto.x231", + Tag: "bytes,231,opt,name=x231", + Filename: "test.proto", +} + +var E_X232 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 232, + Name: "test_proto.x232", + Tag: "bytes,232,opt,name=x232", + Filename: "test.proto", +} + +var E_X233 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 233, + Name: "test_proto.x233", + Tag: "bytes,233,opt,name=x233", + Filename: "test.proto", +} + +var E_X234 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 234, + Name: "test_proto.x234", + Tag: "bytes,234,opt,name=x234", + Filename: "test.proto", +} + +var E_X235 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 235, + Name: "test_proto.x235", + Tag: "bytes,235,opt,name=x235", + Filename: "test.proto", +} + +var E_X236 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 236, + Name: "test_proto.x236", + Tag: "bytes,236,opt,name=x236", + Filename: "test.proto", +} + +var E_X237 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 237, + Name: "test_proto.x237", + Tag: "bytes,237,opt,name=x237", + Filename: "test.proto", +} + +var E_X238 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 238, + Name: "test_proto.x238", + Tag: "bytes,238,opt,name=x238", + Filename: "test.proto", +} + +var E_X239 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 239, + Name: "test_proto.x239", + Tag: "bytes,239,opt,name=x239", + Filename: "test.proto", +} + +var E_X240 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 240, + Name: "test_proto.x240", + Tag: "bytes,240,opt,name=x240", + Filename: "test.proto", +} + +var E_X241 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 241, + Name: "test_proto.x241", + Tag: "bytes,241,opt,name=x241", + Filename: "test.proto", +} + +var E_X242 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 242, + Name: "test_proto.x242", + Tag: "bytes,242,opt,name=x242", + Filename: "test.proto", +} + +var E_X243 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 243, + Name: "test_proto.x243", + Tag: "bytes,243,opt,name=x243", + Filename: "test.proto", +} + +var E_X244 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 244, + Name: "test_proto.x244", + Tag: "bytes,244,opt,name=x244", + Filename: "test.proto", +} + +var E_X245 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 245, + Name: "test_proto.x245", + Tag: "bytes,245,opt,name=x245", + Filename: "test.proto", +} + +var E_X246 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 246, + Name: "test_proto.x246", + Tag: "bytes,246,opt,name=x246", + Filename: "test.proto", +} + +var E_X247 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 247, + Name: "test_proto.x247", + Tag: "bytes,247,opt,name=x247", + Filename: "test.proto", +} + +var E_X248 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 248, + Name: "test_proto.x248", + Tag: "bytes,248,opt,name=x248", + Filename: "test.proto", +} + +var E_X249 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 249, + Name: "test_proto.x249", + Tag: "bytes,249,opt,name=x249", + Filename: "test.proto", +} + +var E_X250 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 250, + Name: "test_proto.x250", + Tag: "bytes,250,opt,name=x250", + Filename: "test.proto", +} + +func init() { + proto.RegisterType((*GoEnum)(nil), "test_proto.GoEnum") + proto.RegisterType((*GoTestField)(nil), "test_proto.GoTestField") + proto.RegisterType((*GoTest)(nil), "test_proto.GoTest") + proto.RegisterType((*GoTest_RequiredGroup)(nil), "test_proto.GoTest.RequiredGroup") + proto.RegisterType((*GoTest_RepeatedGroup)(nil), "test_proto.GoTest.RepeatedGroup") + proto.RegisterType((*GoTest_OptionalGroup)(nil), "test_proto.GoTest.OptionalGroup") + proto.RegisterType((*GoTestRequiredGroupField)(nil), "test_proto.GoTestRequiredGroupField") + proto.RegisterType((*GoTestRequiredGroupField_Group)(nil), "test_proto.GoTestRequiredGroupField.Group") + proto.RegisterType((*GoSkipTest)(nil), "test_proto.GoSkipTest") + proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "test_proto.GoSkipTest.SkipGroup") + proto.RegisterType((*NonPackedTest)(nil), "test_proto.NonPackedTest") + proto.RegisterType((*PackedTest)(nil), "test_proto.PackedTest") + proto.RegisterType((*MaxTag)(nil), "test_proto.MaxTag") + proto.RegisterType((*OldMessage)(nil), "test_proto.OldMessage") + proto.RegisterType((*OldMessage_Nested)(nil), "test_proto.OldMessage.Nested") + proto.RegisterType((*NewMessage)(nil), "test_proto.NewMessage") + proto.RegisterType((*NewMessage_Nested)(nil), "test_proto.NewMessage.Nested") + proto.RegisterType((*InnerMessage)(nil), "test_proto.InnerMessage") + proto.RegisterType((*OtherMessage)(nil), "test_proto.OtherMessage") + proto.RegisterType((*RequiredInnerMessage)(nil), "test_proto.RequiredInnerMessage") + proto.RegisterType((*MyMessage)(nil), "test_proto.MyMessage") + proto.RegisterType((*MyMessage_SomeGroup)(nil), "test_proto.MyMessage.SomeGroup") + proto.RegisterType((*Ext)(nil), "test_proto.Ext") + proto.RegisterMapType((map[int32]int32)(nil), "test_proto.Ext.MapFieldEntry") + proto.RegisterType((*ComplexExtension)(nil), "test_proto.ComplexExtension") + proto.RegisterType((*DefaultsMessage)(nil), "test_proto.DefaultsMessage") + proto.RegisterType((*MyMessageSet)(nil), "test_proto.MyMessageSet") + proto.RegisterType((*Empty)(nil), "test_proto.Empty") + proto.RegisterType((*MessageList)(nil), "test_proto.MessageList") + proto.RegisterType((*MessageList_Message)(nil), "test_proto.MessageList.Message") + proto.RegisterType((*Strings)(nil), "test_proto.Strings") + proto.RegisterType((*Defaults)(nil), "test_proto.Defaults") + proto.RegisterType((*SubDefaults)(nil), "test_proto.SubDefaults") + proto.RegisterType((*RepeatedEnum)(nil), "test_proto.RepeatedEnum") + proto.RegisterType((*MoreRepeated)(nil), "test_proto.MoreRepeated") + proto.RegisterType((*GroupOld)(nil), "test_proto.GroupOld") + proto.RegisterType((*GroupOld_G)(nil), "test_proto.GroupOld.G") + proto.RegisterType((*GroupNew)(nil), "test_proto.GroupNew") + proto.RegisterType((*GroupNew_G)(nil), "test_proto.GroupNew.G") + proto.RegisterType((*FloatingPoint)(nil), "test_proto.FloatingPoint") + proto.RegisterType((*MessageWithMap)(nil), "test_proto.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "test_proto.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "test_proto.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "test_proto.MessageWithMap.NameMappingEntry") + proto.RegisterMapType((map[string]string)(nil), "test_proto.MessageWithMap.StrToStrEntry") + proto.RegisterType((*Oneof)(nil), "test_proto.Oneof") + proto.RegisterType((*Oneof_F_Group)(nil), "test_proto.Oneof.F_Group") + proto.RegisterType((*Communique)(nil), "test_proto.Communique") + proto.RegisterType((*CustomDeterministicMarshaler)(nil), "test_proto.CustomDeterministicMarshaler") + proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value) + proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) + proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) + proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) + proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value) + proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) + proto.RegisterExtension(E_Ext_More) + proto.RegisterExtension(E_Ext_Text) + proto.RegisterExtension(E_Ext_Number) + proto.RegisterExtension(E_Greeting) + proto.RegisterExtension(E_Complex) + proto.RegisterExtension(E_RComplex) + proto.RegisterExtension(E_NoDefaultDouble) + proto.RegisterExtension(E_NoDefaultFloat) + proto.RegisterExtension(E_NoDefaultInt32) + proto.RegisterExtension(E_NoDefaultInt64) + proto.RegisterExtension(E_NoDefaultUint32) + proto.RegisterExtension(E_NoDefaultUint64) + proto.RegisterExtension(E_NoDefaultSint32) + proto.RegisterExtension(E_NoDefaultSint64) + proto.RegisterExtension(E_NoDefaultFixed32) + proto.RegisterExtension(E_NoDefaultFixed64) + proto.RegisterExtension(E_NoDefaultSfixed32) + proto.RegisterExtension(E_NoDefaultSfixed64) + proto.RegisterExtension(E_NoDefaultBool) + proto.RegisterExtension(E_NoDefaultString) + proto.RegisterExtension(E_NoDefaultBytes) + proto.RegisterExtension(E_NoDefaultEnum) + proto.RegisterExtension(E_DefaultDouble) + proto.RegisterExtension(E_DefaultFloat) + proto.RegisterExtension(E_DefaultInt32) + proto.RegisterExtension(E_DefaultInt64) + proto.RegisterExtension(E_DefaultUint32) + proto.RegisterExtension(E_DefaultUint64) + proto.RegisterExtension(E_DefaultSint32) + proto.RegisterExtension(E_DefaultSint64) + proto.RegisterExtension(E_DefaultFixed32) + proto.RegisterExtension(E_DefaultFixed64) + proto.RegisterExtension(E_DefaultSfixed32) + proto.RegisterExtension(E_DefaultSfixed64) + proto.RegisterExtension(E_DefaultBool) + proto.RegisterExtension(E_DefaultString) + proto.RegisterExtension(E_DefaultBytes) + proto.RegisterExtension(E_DefaultEnum) + proto.RegisterExtension(E_X201) + proto.RegisterExtension(E_X202) + proto.RegisterExtension(E_X203) + proto.RegisterExtension(E_X204) + proto.RegisterExtension(E_X205) + proto.RegisterExtension(E_X206) + proto.RegisterExtension(E_X207) + proto.RegisterExtension(E_X208) + proto.RegisterExtension(E_X209) + proto.RegisterExtension(E_X210) + proto.RegisterExtension(E_X211) + proto.RegisterExtension(E_X212) + proto.RegisterExtension(E_X213) + proto.RegisterExtension(E_X214) + proto.RegisterExtension(E_X215) + proto.RegisterExtension(E_X216) + proto.RegisterExtension(E_X217) + proto.RegisterExtension(E_X218) + proto.RegisterExtension(E_X219) + proto.RegisterExtension(E_X220) + proto.RegisterExtension(E_X221) + proto.RegisterExtension(E_X222) + proto.RegisterExtension(E_X223) + proto.RegisterExtension(E_X224) + proto.RegisterExtension(E_X225) + proto.RegisterExtension(E_X226) + proto.RegisterExtension(E_X227) + proto.RegisterExtension(E_X228) + proto.RegisterExtension(E_X229) + proto.RegisterExtension(E_X230) + proto.RegisterExtension(E_X231) + proto.RegisterExtension(E_X232) + proto.RegisterExtension(E_X233) + proto.RegisterExtension(E_X234) + proto.RegisterExtension(E_X235) + proto.RegisterExtension(E_X236) + proto.RegisterExtension(E_X237) + proto.RegisterExtension(E_X238) + proto.RegisterExtension(E_X239) + proto.RegisterExtension(E_X240) + proto.RegisterExtension(E_X241) + proto.RegisterExtension(E_X242) + proto.RegisterExtension(E_X243) + proto.RegisterExtension(E_X244) + proto.RegisterExtension(E_X245) + proto.RegisterExtension(E_X246) + proto.RegisterExtension(E_X247) + proto.RegisterExtension(E_X248) + proto.RegisterExtension(E_X249) + proto.RegisterExtension(E_X250) +} + +func init() { proto.RegisterFile("test.proto", fileDescriptor_test_800cb821a123159d) } + +var fileDescriptor_test_800cb821a123159d = []byte{ + // 4710 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0xd9, 0x73, 0x1b, 0x47, + 0x7a, 0xd7, 0x0c, 0xee, 0x0f, 0x20, 0x31, 0x6c, 0xd1, 0x12, 0x44, 0x5d, 0x23, 0xac, 0xbd, 0x86, + 0x25, 0x9b, 0x22, 0x81, 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c, 0x7c, 0x9d, 0x95, 0x4f, 0x63, 0x45, 0x62, 0x4d, 0x57, 0x4b, 0x71, 0x8e, 0x15, 0x78, 0x71, + 0x74, 0xf5, 0xbe, 0xd3, 0x72, 0x03, 0xe8, 0x82, 0xae, 0x96, 0x54, 0x73, 0xbe, 0x8e, 0xc5, 0x61, + 0xd6, 0x7b, 0xce, 0x64, 0xaf, 0x6f, 0x05, 0x50, 0xa2, 0xab, 0x25, 0xc5, 0xcc, 0xd7, 0x59, 0x79, + 0x18, 0xbb, 0xe3, 0x8e, 0x7a, 0x76, 0x37, 0xc0, 0x9e, 0x46, 0x1d, 0xe7, 0xeb, 0xac, 0x3c, 0xdc, + 0x83, 0x3b, 0x47, 0xae, 0x35, 0x0e, 0xa0, 0x96, 0xae, 0x96, 0x72, 0xe6, 0x7c, 0x1d, 0x8b, 0x23, + 0xac, 0x91, 0x39, 0xe8, 0xe8, 0x6a, 0x69, 0x81, 0xb2, 0xce, 0x98, 0x83, 0x9d, 0xc8, 0x1c, 0x74, + 0x75, 0xb5, 0x44, 0x38, 0x56, 0x98, 0x83, 0x65, 0x38, 0x5d, 0x6f, 0xee, 0x74, 0xa2, 0x0b, 0x77, + 0xa0, 0xab, 0xa5, 0xbc, 0xb9, 0x50, 0xf7, 0x6a, 0x66, 0xe1, 0x45, 0xf6, 0x9e, 0xae, 0x96, 0x34, + 0x1f, 0x2f, 0xf0, 0x8b, 0x9a, 0x64, 0x52, 0x2f, 0x2c, 0xea, 0x31, 0x41, 0x93, 0xac, 0x30, 0xac, + 0x49, 0x0e, 0x7c, 0x41, 0x8f, 0x89, 0x9a, 0x8c, 0x20, 0xb1, 0x79, 0x8e, 0x3c, 0xa3, 0xc7, 0x44, + 0x4d, 0x72, 0x64, 0x44, 0x93, 0x1c, 0x7b, 0x56, 0x8f, 0x85, 0x35, 0x39, 0x85, 0x16, 0x99, 0x0b, + 0x7a, 0x2c, 0xac, 0x49, 0x8e, 0x0e, 0x6b, 0x92, 0x83, 0xcf, 0xe9, 0xb1, 0x90, 0x26, 0xa3, 0x58, + 0x91, 0x78, 0x49, 0x8f, 0x85, 0x34, 0x29, 0x8e, 0xce, 0xd3, 0x24, 0x87, 0x9e, 0xd7, 0x63, 0xa2, + 0x26, 0x45, 0x56, 0x5f, 0x93, 0x1c, 0x7a, 0x41, 0x8f, 0x85, 0x34, 0x29, 0x62, 0x7d, 0x4d, 0x72, + 0xec, 0x45, 0x3d, 0x16, 0xd2, 0x24, 0xc7, 0xbe, 0x22, 0x6a, 0x92, 0x43, 0x3f, 0x54, 0xf4, 0x98, + 0x28, 0x4a, 0x0e, 0xbd, 0x16, 0x12, 0x25, 0xc7, 0x7e, 0x44, 0xb1, 0xa2, 0x2a, 0xa3, 0x60, 0x71, + 0x16, 0x3e, 0xa6, 0x60, 0x51, 0x96, 0x1c, 0x7c, 0x3d, 0x22, 0x4b, 0x0e, 0xff, 0x84, 0xc2, 0xc3, + 0xba, 0x9c, 0x36, 0x10, 0xf9, 0x3f, 0xa5, 0x06, 0x61, 0x61, 0x72, 0x83, 0x40, 0x98, 0x0e, 0x77, + 0xa2, 0x85, 0x4b, 0xba, 0xe2, 0x0b, 0xd3, 0xf3, 0xac, 0xa2, 0x30, 0x7d, 0xe0, 0x65, 0x0c, 0x19, + 0x5c, 0x98, 0x53, 0xc8, 0xaa, 0x11, 0x20, 0x75, 0x5d, 0x09, 0x84, 0xe9, 0x23, 0x43, 0xc2, 0xf4, + 0xb1, 0x57, 0x74, 0x45, 0x14, 0xe6, 0x0c, 0xb4, 0xc8, 0x5c, 0xd4, 0x15, 0x51, 0x98, 0x3e, 0x5a, + 0x14, 0xa6, 0x0f, 0xfe, 0x82, 0xae, 0x08, 0xc2, 0x9c, 0xc6, 0x8a, 0xc4, 0x2f, 0xea, 0x8a, 0x20, + 0xcc, 0xf0, 0xe8, 0x98, 0x30, 0x7d, 0xe8, 0x4b, 0xba, 0x12, 0x08, 0x33, 0xcc, 0xca, 0x85, 0xe9, + 0x43, 0xbf,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0x20, 0x7e, + 0x58, 0x5e, 0x59, 0x0d, 0xa7, 0x78, 0xe2, 0xdd, 0x33, 0x73, 0x67, 0xd9, 0xf2, 0x42, 0xe8, 0x92, + 0x7e, 0x30, 0x74, 0x8f, 0x4c, 0xb4, 0xe4, 0x0c, 0x65, 0x09, 0xc3, 0x47, 0x52, 0x86, 0x32, 0x67, + 0xa8, 0x48, 0x18, 0x3e, 0x96, 0x32, 0x54, 0x38, 0x83, 0x21, 0x61, 0xf8, 0x44, 0xca, 0x60, 0x70, + 0x86, 0x35, 0x09, 0xc3, 0xa7, 0x52, 0x86, 0x35, 0xce, 0x50, 0x95, 0x30, 0x7c, 0x55, 0xca, 0x50, + 0xe5, 0x0c, 0x37, 0x24, 0x0c, 0x5f, 0x93, 0x32, 0xdc, 0xe0, 0x0c, 0x37, 0x25, 0x0c, 0x5f, 0x97, + 0x32, 0xdc, 0xe4, 0x0c, 0xb7, 0x24, 0x0c, 0xdf, 0x90, 0x32, 0xdc, 0x62, 0x0c, 0xab, 0x2b, 0x12, + 0x86, 0x6f, 0xca, 0x18, 0x56, 0x57, 0x38, 0x83, 0x4c, 0x93, 0x9f, 0x49, 0x19, 0xb8, 0x26, 0x57, + 0x65, 0x9a, 0xfc, 0x96, 0x94, 0x81, 0x6b, 0x72, 0x55, 0xa6, 0xc9, 0x6f, 0x4b, 0x19, 0xb8, 0x26, + 0x57, 0x65, 0x9a, 0xfc, 0x8e, 0x94, 0x81, 0x6b, 0x72, 0x55, 0xa6, 0xc9, 0xef, 0x4a, 0x19, 0xb8, + 0x26, 0x57, 0x65, 0x9a, 0xfc, 0x9e, 0x94, 0x81, 0x6b, 0x72, 0x55, 0xa6, 0xc9, 0x3f, 0x91, 0x32, + 0x70, 0x4d, 0xae, 0xca, 0x34, 0xf9, 0xa7, 0x52, 0x06, 0xae, 0xc9, 0x55, 0x99, 0x26, 0xff, 0x4c, + 0xca, 0xc0, 0x35, 0x59, 0x96, 0x69, 0xf2, 0xfb, 0x32, 0x86, 0x32, 0xd7, 0x64, 0x59, 0xa6, 0xc9, + 0x3f, 0x97, 0x32, 0x70, 0x4d, 0x96, 0x65, 0x9a, 0xfc, 0x0b, 0x29, 0x03, 0xd7, 0x64, 0x59, 0xa6, + 0xc9, 0x1f, 0x48, 0x19, 0xb8, 0x26, 0xcb, 0x32, 0x4d, 0xfe, 0xa5, 0x94, 0x81, 0x6b, 0xb2, 0x2c, + 0xd3, 0xe4, 0x5f, 0x49, 0x19, 0xb8, 0x26, 0xcb, 0x32, 0x4d, 0xfe, 0xb5, 0x94, 0x81, 0x6b, 0xb2, + 0x2c, 0xd3, 0xe4, 0xdf, 0x48, 0x19, 0xb8, 0x26, 0xcb, 0x32, 0x4d, 0xfe, 0xad, 0x94, 0x81, 0x6b, + 0xb2, 0x2c, 0xd3, 0xe4, 0xdf, 0x49, 0x19, 0xb8, 0x26, 0x2b, 0x32, 0x4d, 0xfe, 0xbd, 0x8c, 0xa1, + 0xc2, 0x35, 0x59, 0x91, 0x69, 0xf2, 0x1f, 0xa4, 0x0c, 0x5c, 0x93, 0x15, 0x99, 0x26, 0xff, 0x51, + 0xca, 0xc0, 0x35, 0x59, 0x91, 0x69, 0xf2, 0x9f, 0xa4, 0x0c, 0x5c, 0x93, 0x15, 0x99, 0x26, 0xff, + 0x59, 0xca, 0xc0, 0x35, 0x59, 0x91, 0x69, 0xf2, 0x5f, 0xa4, 0x0c, 0x5c, 0x93, 0x15, 0x99, 0x26, + 0xff, 0x55, 0xca, 0xc0, 0x35, 0x59, 0x91, 0x69, 0xf2, 0xdf, 0xa4, 0x0c, 0x5c, 0x93, 0x15, 0x99, + 0x26, 0x7f, 0x28, 0x65, 0xe0, 0x9a, 0xac, 0xc8, 0x34, 0xf9, 0xef, 0x52, 0x06, 0xae, 0x49, 0x43, + 0xa6, 0xc9, 0xff, 0x90, 0x31, 0x18, 0x5c, 0x93, 0x86, 0x4c, 0x93, 0xff, 0x29, 0x65, 0xe0, 0x9a, + 0x34, 0x64, 0x9a, 0xfc, 0x2f, 0x29, 0x03, 0xd7, 0xa4, 0x21, 0xd3, 0xe4, 0x7f, 0x4b, 0x19, 0xb8, + 0x26, 0x0d, 0x99, 0x26, 0xff, 0x47, 0xca, 0xc0, 0x35, 0x69, 0xc8, 0x34, 0xf9, 0xbf, 0x52, 0x06, + 0xae, 0x49, 0x43, 0xa6, 0xc9, 0x1f, 0x49, 0x19, 0xb8, 0x26, 0x0d, 0x99, 0x26, 0x7f, 0x2c, 0x65, + 0xe0, 0x9a, 0x34, 0x64, 0x9a, 0xfc, 0x89, 0x94, 0x81, 0x6b, 0xd2, 0x90, 0x69, 0xf2, 0xa7, 0x52, + 0x06, 0xae, 0xc9, 0x35, 0x99, 0x26, 0xff, 0x4f, 0xc6, 0xb0, 0xb6, 0x72, 0xe7, 0xda, 0xe3, 0x57, + 0xba, 0x3d, 0xf7, 0x60, 0xb2, 0xb7, 0xbc, 0xef, 0x0c, 0xae, 0x77, 0x9d, 0xae, 0x73, 0x1d, 0x41, + 0x7b, 0x93, 0x0e, 0x7b, 0xb8, 0x1e, 0x18, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x54, 0xfe, + 0xf9, 0x01, 0xbd, 0x3d, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/proto/test_proto/test.proto b/deps/github.com/gogo/protobuf/proto/test_proto/test.proto new file mode 100644 index 000000000..36f6fa017 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/test_proto/test.proto @@ -0,0 +1,566 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// A feature-rich test file for the protocol compiler and libraries. + +syntax = "proto2"; + +package test_proto; + +option go_package = "github.com/gogo/protobuf/proto/test_proto"; + +enum FOO { FOO1 = 1; }; + +message GoEnum { + required FOO foo = 1; +} + +message GoTestField { + required string Label = 1; + required string Type = 2; +} + +message GoTest { + // An enum, for completeness. + enum KIND { + VOID = 0; + + // Basic types + BOOL = 1; + BYTES = 2; + FINGERPRINT = 3; + FLOAT = 4; + INT = 5; + STRING = 6; + TIME = 7; + + // Groupings + TUPLE = 8; + ARRAY = 9; + MAP = 10; + + // Table types + TABLE = 11; + + // Functions + FUNCTION = 12; // last tag + }; + + // Some typical parameters + required KIND Kind = 1; + optional string Table = 2; + optional int32 Param = 3; + + // Required, repeated and optional foreign fields. + required GoTestField RequiredField = 4; + repeated GoTestField RepeatedField = 5; + optional GoTestField OptionalField = 6; + + // Required fields of all basic types + required bool F_Bool_required = 10; + required int32 F_Int32_required = 11; + required int64 F_Int64_required = 12; + required fixed32 F_Fixed32_required = 13; + required fixed64 F_Fixed64_required = 14; + required uint32 F_Uint32_required = 15; + required uint64 F_Uint64_required = 16; + required float F_Float_required = 17; + required double F_Double_required = 18; + required string F_String_required = 19; + required bytes F_Bytes_required = 101; + required sint32 F_Sint32_required = 102; + required sint64 F_Sint64_required = 103; + required sfixed32 F_Sfixed32_required = 104; + required sfixed64 F_Sfixed64_required = 105; + + // Repeated fields of all basic types + repeated bool F_Bool_repeated = 20; + repeated int32 F_Int32_repeated = 21; + repeated int64 F_Int64_repeated = 22; + repeated fixed32 F_Fixed32_repeated = 23; + repeated fixed64 F_Fixed64_repeated = 24; + repeated uint32 F_Uint32_repeated = 25; + repeated uint64 F_Uint64_repeated = 26; + repeated float F_Float_repeated = 27; + repeated double F_Double_repeated = 28; + repeated string F_String_repeated = 29; + repeated bytes F_Bytes_repeated = 201; + repeated sint32 F_Sint32_repeated = 202; + repeated sint64 F_Sint64_repeated = 203; + repeated sfixed32 F_Sfixed32_repeated = 204; + repeated sfixed64 F_Sfixed64_repeated = 205; + + // Optional fields of all basic types + optional bool F_Bool_optional = 30; + optional int32 F_Int32_optional = 31; + optional int64 F_Int64_optional = 32; + optional fixed32 F_Fixed32_optional = 33; + optional fixed64 F_Fixed64_optional = 34; + optional uint32 F_Uint32_optional = 35; + optional uint64 F_Uint64_optional = 36; + optional float F_Float_optional = 37; + optional double F_Double_optional = 38; + optional string F_String_optional = 39; + optional bytes F_Bytes_optional = 301; + optional sint32 F_Sint32_optional = 302; + optional sint64 F_Sint64_optional = 303; + optional sfixed32 F_Sfixed32_optional = 304; + optional sfixed64 F_Sfixed64_optional = 305; + + // Default-valued fields of all basic types + optional bool F_Bool_defaulted = 40 [default=true]; + optional int32 F_Int32_defaulted = 41 [default=32]; + optional int64 F_Int64_defaulted = 42 [default=64]; + optional fixed32 F_Fixed32_defaulted = 43 [default=320]; + optional fixed64 F_Fixed64_defaulted = 44 [default=640]; + optional uint32 F_Uint32_defaulted = 45 [default=3200]; + optional uint64 F_Uint64_defaulted = 46 [default=6400]; + optional float F_Float_defaulted = 47 [default=314159.]; + optional double F_Double_defaulted = 48 [default=271828.]; + optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; + optional sint32 F_Sint32_defaulted = 402 [default = -32]; + optional sint64 F_Sint64_defaulted = 403 [default = -64]; + optional sfixed32 F_Sfixed32_defaulted = 404 [default = -32]; + optional sfixed64 F_Sfixed64_defaulted = 405 [default = -64]; + + // Packed repeated fields (no string or bytes). + repeated bool F_Bool_repeated_packed = 50 [packed=true]; + repeated int32 F_Int32_repeated_packed = 51 [packed=true]; + repeated int64 F_Int64_repeated_packed = 52 [packed=true]; + repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; + repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; + repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; + repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; + repeated float F_Float_repeated_packed = 57 [packed=true]; + repeated double F_Double_repeated_packed = 58 [packed=true]; + repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; + repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; + repeated sfixed32 F_Sfixed32_repeated_packed = 504 [packed=true]; + repeated sfixed64 F_Sfixed64_repeated_packed = 505 [packed=true]; + + // Required, repeated, and optional groups. + required group RequiredGroup = 70 { + required string RequiredField = 71; + }; + + repeated group RepeatedGroup = 80 { + required string RequiredField = 81; + }; + + optional group OptionalGroup = 90 { + required string RequiredField = 91; + }; +} + +// For testing a group containing a required field. +message GoTestRequiredGroupField { + required group Group = 1 { + required int32 Field = 2; + }; +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +message GoSkipTest { + required int32 skip_int32 = 11; + required fixed32 skip_fixed32 = 12; + required fixed64 skip_fixed64 = 13; + required string skip_string = 14; + required group SkipGroup = 15 { + required int32 group_int32 = 16; + required string group_string = 17; + } +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +message NonPackedTest { + repeated int32 a = 1; +} + +message PackedTest { + repeated int32 b = 1 [packed=true]; +} + +message MaxTag { + // Maximum possible tag number. + optional string last_field = 536870911; +} + +message OldMessage { + message Nested { + optional string name = 1; + } + optional Nested nested = 1; + + optional int32 num = 2; +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +message NewMessage { + message Nested { + optional string name = 1; + optional string food_group = 2; + } + optional Nested nested = 1; + + // This is an int32 in OldMessage. + optional int64 num = 2; +} + +// Smaller tests for ASCII formatting. + +message InnerMessage { + required string host = 1; + optional int32 port = 2 [default=4000]; + optional bool connected = 3; +} + +message OtherMessage { + optional int64 key = 1; + optional bytes value = 2; + optional float weight = 3; + optional InnerMessage inner = 4; + + extensions 100 to max; +} + +message RequiredInnerMessage { + required InnerMessage leo_finally_won_an_oscar = 1; +} + +message MyMessage { + required int32 count = 1; + optional string name = 2; + optional string quote = 3; + repeated string pet = 4; + optional InnerMessage inner = 5; + repeated OtherMessage others = 6; + optional RequiredInnerMessage we_must_go_deeper = 13; + repeated InnerMessage rep_inner = 12; + + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color bikeshed = 7; + + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // This field becomes [][]byte in the generated code. + repeated bytes rep_bytes = 10; + + optional double bigfloat = 11; + + extensions 100 to max; +} + +message Ext { + extend MyMessage { + optional Ext more = 103; + optional string text = 104; + optional int32 number = 105; + } + + optional string data = 1; + map map_field = 2; +} + +extend MyMessage { + repeated string greeting = 106; + // leave field 200 unregistered for testing +} + +message ComplexExtension { + optional int32 first = 1; + optional int32 second = 2; + repeated int32 third = 3; +} + +extend OtherMessage { + optional ComplexExtension complex = 200; + repeated ComplexExtension r_complex = 201; +} + +message DefaultsMessage { + enum DefaultsEnum { + ZERO = 0; + ONE = 1; + TWO = 2; + }; + extensions 100 to max; +} + +extend DefaultsMessage { + optional double no_default_double = 101; + optional float no_default_float = 102; + optional int32 no_default_int32 = 103; + optional int64 no_default_int64 = 104; + optional uint32 no_default_uint32 = 105; + optional uint64 no_default_uint64 = 106; + optional sint32 no_default_sint32 = 107; + optional sint64 no_default_sint64 = 108; + optional fixed32 no_default_fixed32 = 109; + optional fixed64 no_default_fixed64 = 110; + optional sfixed32 no_default_sfixed32 = 111; + optional sfixed64 no_default_sfixed64 = 112; + optional bool no_default_bool = 113; + optional string no_default_string = 114; + optional bytes no_default_bytes = 115; + optional DefaultsMessage.DefaultsEnum no_default_enum = 116; + + optional double default_double = 201 [default = 3.1415]; + optional float default_float = 202 [default = 3.14]; + optional int32 default_int32 = 203 [default = 42]; + optional int64 default_int64 = 204 [default = 43]; + optional uint32 default_uint32 = 205 [default = 44]; + optional uint64 default_uint64 = 206 [default = 45]; + optional sint32 default_sint32 = 207 [default = 46]; + optional sint64 default_sint64 = 208 [default = 47]; + optional fixed32 default_fixed32 = 209 [default = 48]; + optional fixed64 default_fixed64 = 210 [default = 49]; + optional sfixed32 default_sfixed32 = 211 [default = 50]; + optional sfixed64 default_sfixed64 = 212 [default = 51]; + optional bool default_bool = 213 [default = true]; + optional string default_string = 214 [default = "Hello, string,def=foo"]; + optional bytes default_bytes = 215 [default = "Hello, bytes"]; + optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; +} + +message MyMessageSet { + option message_set_wire_format = true; + extensions 100 to max; +} + +message Empty { +} + +extend MyMessageSet { + optional Empty x201 = 201; + optional Empty x202 = 202; + optional Empty x203 = 203; + optional Empty x204 = 204; + optional Empty x205 = 205; + optional Empty x206 = 206; + optional Empty x207 = 207; + optional Empty x208 = 208; + optional Empty x209 = 209; + optional Empty x210 = 210; + optional Empty x211 = 211; + optional Empty x212 = 212; + optional Empty x213 = 213; + optional Empty x214 = 214; + optional Empty x215 = 215; + optional Empty x216 = 216; + optional Empty x217 = 217; + optional Empty x218 = 218; + optional Empty x219 = 219; + optional Empty x220 = 220; + optional Empty x221 = 221; + optional Empty x222 = 222; + optional Empty x223 = 223; + optional Empty x224 = 224; + optional Empty x225 = 225; + optional Empty x226 = 226; + optional Empty x227 = 227; + optional Empty x228 = 228; + optional Empty x229 = 229; + optional Empty x230 = 230; + optional Empty x231 = 231; + optional Empty x232 = 232; + optional Empty x233 = 233; + optional Empty x234 = 234; + optional Empty x235 = 235; + optional Empty x236 = 236; + optional Empty x237 = 237; + optional Empty x238 = 238; + optional Empty x239 = 239; + optional Empty x240 = 240; + optional Empty x241 = 241; + optional Empty x242 = 242; + optional Empty x243 = 243; + optional Empty x244 = 244; + optional Empty x245 = 245; + optional Empty x246 = 246; + optional Empty x247 = 247; + optional Empty x248 = 248; + optional Empty x249 = 249; + optional Empty x250 = 250; +} + +message MessageList { + repeated group Message = 1 { + required string name = 2; + required int32 count = 3; + } +} + +message Strings { + optional string string_field = 1; + optional bytes bytes_field = 2; +} + +message Defaults { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + optional bool F_Bool = 1 [default=true]; + optional int32 F_Int32 = 2 [default=32]; + optional int64 F_Int64 = 3 [default=64]; + optional fixed32 F_Fixed32 = 4 [default=320]; + optional fixed64 F_Fixed64 = 5 [default=640]; + optional uint32 F_Uint32 = 6 [default=3200]; + optional uint64 F_Uint64 = 7 [default=6400]; + optional float F_Float = 8 [default=314159.]; + optional double F_Double = 9 [default=271828.]; + optional string F_String = 10 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes = 11 [default="Bignose"]; + optional sint32 F_Sint32 = 12 [default=-32]; + optional sint64 F_Sint64 = 13 [default=-64]; + optional Color F_Enum = 14 [default=GREEN]; + + // More fields with crazy defaults. + optional float F_Pinf = 15 [default=inf]; + optional float F_Ninf = 16 [default=-inf]; + optional float F_Nan = 17 [default=nan]; + + // Sub-message. + optional SubDefaults sub = 18; + + // Redundant but explicit defaults. + optional string str_zero = 19 [default=""]; +} + +message SubDefaults { + optional int64 n = 1 [default=7]; +} + +message RepeatedEnum { + enum Color { + RED = 1; + } + repeated Color color = 1; +} + +message MoreRepeated { + repeated bool bools = 1; + repeated bool bools_packed = 2 [packed=true]; + repeated int32 ints = 3; + repeated int32 ints_packed = 4 [packed=true]; + repeated int64 int64s_packed = 7 [packed=true]; + repeated string strings = 5; + repeated fixed32 fixeds = 6; +} + +// GroupOld and GroupNew have the same wire format. +// GroupNew has a new field inside a group. + +message GroupOld { + optional group G = 101 { + optional int32 x = 2; + } +} + +message GroupNew { + optional group G = 101 { + optional int32 x = 2; + optional int32 y = 3; + } +} + +message FloatingPoint { + required double f = 1; + optional bool exact = 2; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; + map str_to_str = 4; +} + +message Oneof { + oneof union { + bool F_Bool = 1; + int32 F_Int32 = 2; + int64 F_Int64 = 3; + fixed32 F_Fixed32 = 4; + fixed64 F_Fixed64 = 5; + uint32 F_Uint32 = 6; + uint64 F_Uint64 = 7; + float F_Float = 8; + double F_Double = 9; + string F_String = 10; + bytes F_Bytes = 11; + sint32 F_Sint32 = 12; + sint64 F_Sint64 = 13; + MyMessage.Color F_Enum = 14; + GoTestField F_Message = 15; + group F_Group = 16 { + optional int32 x = 17; + } + int32 F_Largest_Tag = 536870911; + } + + oneof tormato { + int32 value = 100; + } +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + MyMessage.Color col = 9; + Strings msg = 10; + } +} + +message CustomDeterministicMarshaler { + optional uint64 field1 = 1; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/proto/text.go b/deps/github.com/gogo/protobuf/proto/text.go index d63732fcb..4f5706dc5 100644 --- a/deps/github.com/gogo/protobuf/proto/text.go +++ b/deps/github.com/gogo/protobuf/proto/text.go @@ -57,7 +57,6 @@ import ( var ( newline = []byte("\n") spaces = []byte(" ") - gtNewline = []byte(">\n") endBraceNewline = []byte("}\n") backslashN = []byte{'\\', 'n'} backslashR = []byte{'\\', 'r'} @@ -177,11 +176,6 @@ func writeName(w *textWriter, props *Properties) error { return nil } -// raw is the interface satisfied by RawMessage. -type raw interface { - Bytes() []byte -} - func requiresQuotes(u string) bool { // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. for _, ch := range u { @@ -276,6 +270,10 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { props := sprops.Prop[i] name := st.Field(i).Name + if name == "XXX_NoUnkeyedLiteral" { + continue + } + if strings.HasPrefix(name, "XXX_") { // There are two XXX_ fields: // XXX_unrecognized []byte @@ -447,12 +445,6 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if b, ok := fv.Interface().(raw); ok { - if err := writeRaw(w, b.Bytes()); err != nil { - return err - } - continue - } if len(props.Enum) > 0 { if err := tm.writeEnum(w, fv, props); err != nil { @@ -475,7 +467,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { pv = reflect.New(sv.Type()) pv.Elem().Set(sv) } - if pv.Type().Implements(extensionRangeType) { + if _, err := extendable(pv.Interface()); err == nil { if err := tm.writeExtensions(w, pv); err != nil { return err } @@ -484,27 +476,6 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return nil } -// writeRaw writes an uninterpreted raw message. -func writeRaw(w *textWriter, b []byte) error { - if err := w.WriteByte('<'); err != nil { - return err - } - if !w.compact { - if err := w.WriteByte('\n'); err != nil { - return err - } - } - w.indent() - if err := writeUnknownStruct(w, b); err != nil { - return err - } - w.unindent() - if err := w.WriteByte('>'); err != nil { - return err - } - return nil -} - // writeAny writes an arbitrary field. func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { v = reflect.Indirect(v) @@ -522,6 +493,17 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert } return nil } + } else if len(props.CastType) > 0 { + if _, ok := v.Interface().(interface { + String() string + }); ok { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + _, err := fmt.Fprintf(w, "%d", v.Interface()) + return err + } + } } else if props.StdTime { t, ok := v.Interface().(time.Time) if !ok { @@ -531,9 +513,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert if err != nil { return err } - props.StdTime = false - err = tm.writeAny(w, reflect.ValueOf(tproto), props) - props.StdTime = true + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdTime = false + err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy) return err } else if props.StdDuration { d, ok := v.Interface().(time.Duration) @@ -541,9 +523,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) } dproto := durationProto(d) - props.StdDuration = false - err := tm.writeAny(w, reflect.ValueOf(dproto), props) - props.StdDuration = true + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdDuration = false + err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy) return err } } @@ -594,6 +576,19 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert } } w.indent() + if v.CanAddr() { + // Calling v.Interface on a struct causes the reflect package to + // copy the entire struct. This is racy with the new Marshaler + // since we atomically update the XXX_sizecache. + // + // Thus, we retrieve a pointer to the struct if possible to avoid + // a race since v.Interface on the pointer doesn't copy the struct. + // + // If v is not addressable, then we are not worried about a race + // since it implies that the binary Marshaler cannot possibly be + // mutating this value. + v = v.Addr() + } if etm, ok := v.Interface().(encoding.TextMarshaler); ok { text, err := etm.MarshalText() if err != nil { @@ -602,8 +597,13 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert if _, err = w.Write(text); err != nil { return err } - } else if err := tm.writeStruct(w, v); err != nil { - return err + } else { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if err := tm.writeStruct(w, v); err != nil { + return err + } } w.unindent() if err := w.WriteByte(ket); err != nil { diff --git a/deps/github.com/gogo/protobuf/proto/text_parser.go b/deps/github.com/gogo/protobuf/proto/text_parser.go index 9db12e960..fbb000d37 100644 --- a/deps/github.com/gogo/protobuf/proto/text_parser.go +++ b/deps/github.com/gogo/protobuf/proto/text_parser.go @@ -212,7 +212,6 @@ func (p *textParser) advance() { var ( errBadUTF8 = errors.New("proto: bad UTF-8") - errBadHex = errors.New("proto: bad hexadecimal") ) func unquoteC(s string, quote rune) (string, error) { @@ -283,60 +282,47 @@ func unescape(s string) (ch string, tail string, err error) { return "?", s, nil // trigraph workaround case '\'', '"', '\\': return string(r), s, nil - case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': + case '0', '1', '2', '3', '4', '5', '6', '7': if len(s) < 2 { return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) } - base := 8 - ss := s[:2] + ss := string(r) + s[:2] s = s[2:] - if r == 'x' || r == 'X' { - base = 16 - } else { - ss = string(r) + ss - } - i, err := strconv.ParseUint(ss, base, 8) + i, err := strconv.ParseUint(ss, 8, 8) if err != nil { - return "", "", err + return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) } return string([]byte{byte(i)}), s, nil - case 'u', 'U': - n := 4 - if r == 'U' { + case 'x', 'X', 'u', 'U': + var n int + switch r { + case 'x', 'X': + n = 2 + case 'u': + n = 4 + case 'U': n = 8 } if len(s) < n { - return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) - } - - bs := make([]byte, n/2) - for i := 0; i < n; i += 2 { - a, ok1 := unhex(s[i]) - b, ok2 := unhex(s[i+1]) - if !ok1 || !ok2 { - return "", "", errBadHex - } - bs[i/2] = a<<4 | b + return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) } + ss := s[:n] s = s[n:] - return string(bs), s, nil + i, err := strconv.ParseUint(ss, 16, 64) + if err != nil { + return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) + } + if r == 'x' || r == 'X' { + return string([]byte{byte(i)}), s, nil + } + if i > utf8.MaxRune { + return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) + } + return string(i), s, nil } return "", "", fmt.Errorf(`unknown escape \%c`, r) } -// Adapted from src/pkg/strconv/quote.go. -func unhex(b byte) (v byte, ok bool) { - switch { - case '0' <= b && b <= '9': - return b - '0', true - case 'a' <= b && b <= 'f': - return b - 'a' + 10, true - case 'A' <= b && b <= 'F': - return b - 'A' + 10, true - } - return 0, false -} - // Back off the parser by one token. Can only be done between calls to next(). // It makes the next advance() a no-op. func (p *textParser) back() { p.backed = true } @@ -734,6 +720,9 @@ func (p *textParser) consumeExtName() (string, error) { if tok.err != nil { return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) } + if p.done && tok.value != "]" { + return "", p.errorf("unclosed type_url or extension name") + } } return strings.Join(parts, ""), nil } @@ -1001,13 +990,9 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { // UnmarshalText returns *RequiredNotSetError. func UnmarshalText(s string, pb Message) error { if um, ok := pb.(encoding.TextUnmarshaler); ok { - err := um.UnmarshalText([]byte(s)) - return err + return um.UnmarshalText([]byte(s)) } pb.Reset() v := reflect.ValueOf(pb) - if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { - return pe - } - return nil + return newTextParser(s).readStruct(v.Elem(), "") } diff --git a/deps/github.com/gogo/protobuf/proto/text_parser_test.go b/deps/github.com/gogo/protobuf/proto/text_parser_test.go new file mode 100644 index 000000000..ff235cff9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/text_parser_test.go @@ -0,0 +1,706 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "fmt" + "math" + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + . "github.com/gogo/protobuf/proto/test_proto" +) + +type UnmarshalTextTest struct { + in string + err string // if "", no error expected + out *MyMessage +} + +func buildExtStructTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_More, &Ext{ + Data: String("Hello, world!"), + }) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtDataTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + SetExtension(msg, E_Ext_Text, String("Hello, world!")) + SetExtension(msg, E_Ext_Number, Int32(1729)) + return UnmarshalTextTest{in: text, out: msg} +} + +func buildExtRepStringTest(text string) UnmarshalTextTest { + msg := &MyMessage{ + Count: Int32(42), + } + if err := SetExtension(msg, E_Greeting, []string{"bula", "hola"}); err != nil { + panic(err) + } + return UnmarshalTextTest{in: text, out: msg} +} + +var unMarshalTextTests = []UnmarshalTextTest{ + // Basic + { + in: " count:42\n name:\"Dave\" ", + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + }, + }, + + // Empty quoted string + { + in: `count:42 name:""`, + out: &MyMessage{ + Count: Int32(42), + Name: String(""), + }, + }, + + // Quoted string concatenation with double quotes + { + in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenation with single quotes + { + in: "count:42 name: 'My name is '\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string concatenations with mixed quotes + { + in: "count:42 name: 'My name is '\n\"elsewhere\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + { + in: "count:42 name: \"My name is \"\n'elsewhere'", + out: &MyMessage{ + Count: Int32(42), + Name: String("My name is elsewhere"), + }, + }, + + // Quoted string with escaped apostrophe + { + in: `count:42 name: "HOLIDAY - New Year\'s Day"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("HOLIDAY - New Year's Day"), + }, + }, + + // Quoted string with single quote + { + in: `count:42 name: 'Roger "The Ramster" Ramjet'`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`Roger "The Ramster" Ramjet`), + }, + }, + + // Quoted string with all the accepted special characters from the C++ test + { + in: `count:42 name: ` + "\"\\\"A string with \\' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"", + out: &MyMessage{ + Count: Int32(42), + Name: String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces"), + }, + }, + + // Quoted string with quoted backslash + { + in: `count:42 name: "\\'xyz"`, + out: &MyMessage{ + Count: Int32(42), + Name: String(`\'xyz`), + }, + }, + + // Quoted string with UTF-8 bytes. + { + in: "count:42 name: '\303\277\302\201\x00\xAB\xCD\xEF'", + out: &MyMessage{ + Count: Int32(42), + Name: String("\303\277\302\201\x00\xAB\xCD\xEF"), + }, + }, + + // Quoted string with unicode escapes. + { + in: `count: 42 name: "\u0047\U00000047\uffff\U0010ffff"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("GG\uffff\U0010ffff"), + }, + }, + + // Bad quoted string + { + in: `inner: < host: "\0" >` + "\n", + err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, + }, + + // Bad \u escape + { + in: `count: 42 name: "\u000"`, + err: `line 1.16: invalid quoted string "\u000": \u requires 4 following digits`, + }, + + // Bad \U escape + { + in: `count: 42 name: "\U0000000"`, + err: `line 1.16: invalid quoted string "\U0000000": \U requires 8 following digits`, + }, + + // Bad \U escape + { + in: `count: 42 name: "\xxx"`, + err: `line 1.16: invalid quoted string "\xxx": \xxx contains non-hexadecimal digits`, + }, + + // Number too large for int64 + { + in: "count: 1 others { key: 123456789012345678901 }", + err: "line 1.23: invalid int64: 123456789012345678901", + }, + + // Number too large for int32 + { + in: "count: 1234567890123", + err: "line 1.7: invalid int32: 1234567890123", + }, + + // Number in hexadecimal + { + in: "count: 0x2beef", + out: &MyMessage{ + Count: Int32(0x2beef), + }, + }, + + // Number in octal + { + in: "count: 024601", + out: &MyMessage{ + Count: Int32(024601), + }, + }, + + // Floating point number with "f" suffix + { + in: "count: 4 others:< weight: 17.0f >", + out: &MyMessage{ + Count: Int32(4), + Others: []*OtherMessage{ + { + Weight: Float32(17), + }, + }, + }, + }, + + // Floating point positive infinity + { + in: "count: 4 bigfloat: inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(1)), + }, + }, + + // Floating point negative infinity + { + in: "count: 4 bigfloat: -inf", + out: &MyMessage{ + Count: Int32(4), + Bigfloat: Float64(math.Inf(-1)), + }, + }, + + // Number too large for float32 + { + in: "others:< weight: 12345678901234567890123456789012345678901234567890 >", + err: "line 1.17: invalid float32: 12345678901234567890123456789012345678901234567890", + }, + + // Number posing as a quoted string + { + in: `inner: < host: 12 >` + "\n", + err: `line 1.15: invalid string: 12`, + }, + + // Quoted string posing as int32 + { + in: `count: "12"`, + err: `line 1.7: invalid int32: "12"`, + }, + + // Quoted string posing a float32 + { + in: `others:< weight: "17.4" >`, + err: `line 1.17: invalid float32: "17.4"`, + }, + + // unclosed bracket doesn't cause infinite loop + { + in: `[`, + err: `line 1.0: unclosed type_url or extension name`, + }, + + // Enum + { + in: `count:42 bikeshed: BLUE`, + out: &MyMessage{ + Count: Int32(42), + Bikeshed: MyMessage_BLUE.Enum(), + }, + }, + + // Repeated field + { + in: `count:42 pet: "horsey" pet:"bunny"`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated field with list notation + { + in: `count:42 pet: ["horsey", "bunny"]`, + out: &MyMessage{ + Count: Int32(42), + Pet: []string{"horsey", "bunny"}, + }, + }, + + // Repeated message with/without colon and <>/{} + { + in: `count:42 others:{} others{} others:<> others:{}`, + out: &MyMessage{ + Count: Int32(42), + Others: []*OtherMessage{ + {}, + {}, + {}, + {}, + }, + }, + }, + + // Missing colon for inner message + { + in: `count:42 inner < host: "cauchy.syd" >`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("cauchy.syd"), + }, + }, + }, + + // Missing colon for string field + { + in: `name "Dave"`, + err: `line 1.5: expected ':', found "\"Dave\""`, + }, + + // Missing colon for int32 field + { + in: `count 42`, + err: `line 1.6: expected ':', found "42"`, + }, + + // Missing required field + { + in: `name: "Pawel"`, + err: fmt.Sprintf(`proto: required field "%T.count" not set`, MyMessage{}), + out: &MyMessage{ + Name: String("Pawel"), + }, + }, + + // Missing required field in a required submessage + { + in: `count: 42 we_must_go_deeper < leo_finally_won_an_oscar <> >`, + err: fmt.Sprintf(`proto: required field "%T.host" not set`, InnerMessage{}), + out: &MyMessage{ + Count: Int32(42), + WeMustGoDeeper: &RequiredInnerMessage{LeoFinallyWonAnOscar: &InnerMessage{}}, + }, + }, + + // Repeated non-repeated field + { + in: `name: "Rob" name: "Russ"`, + err: `line 1.12: non-repeated field "name" was repeated`, + }, + + // Group + { + in: `count: 17 SomeGroup { group_field: 12 }`, + out: &MyMessage{ + Count: Int32(17), + Somegroup: &MyMessage_SomeGroup{ + GroupField: Int32(12), + }, + }, + }, + + // Semicolon between fields + { + in: `count:3;name:"Calvin"`, + out: &MyMessage{ + Count: Int32(3), + Name: String("Calvin"), + }, + }, + // Comma between fields + { + in: `count:4,name:"Ezekiel"`, + out: &MyMessage{ + Count: Int32(4), + Name: String("Ezekiel"), + }, + }, + + // Boolean false + { + in: `count:42 inner { host: "example.com" connected: false }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean true + { + in: `count:42 inner { host: "example.com" connected: true }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean 0 + { + in: `count:42 inner { host: "example.com" connected: 0 }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean 1 + { + in: `count:42 inner { host: "example.com" connected: 1 }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean f + { + in: `count:42 inner { host: "example.com" connected: f }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean t + { + in: `count:42 inner { host: "example.com" connected: t }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + // Boolean False + { + in: `count:42 inner { host: "example.com" connected: False }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(false), + }, + }, + }, + // Boolean True + { + in: `count:42 inner { host: "example.com" connected: True }`, + out: &MyMessage{ + Count: Int32(42), + Inner: &InnerMessage{ + Host: String("example.com"), + Connected: Bool(true), + }, + }, + }, + + // Extension + buildExtStructTest(`count: 42 [test_proto.Ext.more]:`), + buildExtStructTest(`count: 42 [test_proto.Ext.more] {data:"Hello, world!"}`), + buildExtDataTest(`count: 42 [test_proto.Ext.text]:"Hello, world!" [test_proto.Ext.number]:1729`), + buildExtRepStringTest(`count: 42 [test_proto.greeting]:"bula" [test_proto.greeting]:"hola"`), + + // Big all-in-one + { + in: "count:42 # Meaning\n" + + `name:"Dave" ` + + `quote:"\"I didn't want to go.\"" ` + + `pet:"bunny" ` + + `pet:"kitty" ` + + `pet:"horsey" ` + + `inner:<` + + ` host:"footrest.syd" ` + + ` port:7001 ` + + ` connected:true ` + + `> ` + + `others:<` + + ` key:3735928559 ` + + ` value:"\x01A\a\f" ` + + `> ` + + `others:<` + + " weight:58.9 # Atomic weight of Co\n" + + ` inner:<` + + ` host:"lesha.mtv" ` + + ` port:8002 ` + + ` >` + + `>`, + out: &MyMessage{ + Count: Int32(42), + Name: String("Dave"), + Quote: String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &InnerMessage{ + Host: String("footrest.syd"), + Port: Int32(7001), + Connected: Bool(true), + }, + Others: []*OtherMessage{ + { + Key: Int64(3735928559), + Value: []byte{0x1, 'A', '\a', '\f'}, + }, + { + Weight: Float32(58.9), + Inner: &InnerMessage{ + Host: String("lesha.mtv"), + Port: Int32(8002), + }, + }, + }, + }, + }, +} + +func TestUnmarshalText(t *testing.T) { + for i, test := range unMarshalTextTests { + pb := new(MyMessage) + err := UnmarshalText(test.in, pb) + if test.err == "" { + // We don't expect failure. + if err != nil { + t.Errorf("Test %d: Unexpected error: %v", i, err) + } else if !Equal(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } else { + // We do expect failure. + if err == nil { + t.Errorf("Test %d: Didn't get expected error: %v", i, test.err) + } else if err.Error() != test.err { + t.Errorf("Test %d: Incorrect error.\nHave: %v\nWant: %v", + i, err.Error(), test.err) + } else if _, ok := err.(*RequiredNotSetError); ok && test.out != nil && !Equal(pb, test.out) { + t.Errorf("Test %d: Incorrect populated \nHave: %v\nWant: %v", + i, pb, test.out) + } + } + } +} + +func TestUnmarshalTextCustomMessage(t *testing.T) { + msg := &textMessage{} + if err := UnmarshalText("custom", msg); err != nil { + t.Errorf("Unexpected error from custom unmarshal: %v", err) + } + if UnmarshalText("not custom", msg) == nil { + t.Errorf("Didn't get expected error from custom unmarshal") + } +} + +// Regression test; this caused a panic. +func TestRepeatedEnum(t *testing.T) { + pb := new(RepeatedEnum) + if err := UnmarshalText("color: RED", pb); err != nil { + t.Fatal(err) + } + exp := &RepeatedEnum{ + Color: []RepeatedEnum_Color{RepeatedEnum_RED}, + } + if !Equal(pb, exp) { + t.Errorf("Incorrect populated \nHave: %v\nWant: %v", pb, exp) + } +} + +func TestProto3TextParsing(t *testing.T) { + m := new(proto3pb.Message) + const in = `name: "Wallace" true_scotsman: true` + want := &proto3pb.Message{ + Name: "Wallace", + TrueScotsman: true, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestMapParsing(t *testing.T) { + m := new(MessageWithMap) + const in = `name_mapping: name_mapping:` + + `msg_mapping:,>` + // separating commas are okay + `msg_mapping>` + // no colon after "value" + `msg_mapping:>` + // omitted key + `msg_mapping:` + // omitted value + `byte_mapping:` + + `byte_mapping:<>` // omitted key and value + want := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Beatles", + 1234: "Feist", + }, + MsgMapping: map[int64]*FloatingPoint{ + -4: {F: Float64(2.0)}, + -2: {F: Float64(4.0)}, + 0: {F: Float64(5.0)}, + 1: nil, + }, + ByteMapping: map[bool][]byte{ + false: nil, + true: []byte("so be it"), + }, + } + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } +} + +func TestOneofParsing(t *testing.T) { + const in = `name:"Shrek"` + m := new(Communique) + want := &Communique{Union: &Communique_Name{Name: "Shrek"}} + if err := UnmarshalText(in, m); err != nil { + t.Fatal(err) + } + if !Equal(m, want) { + t.Errorf("\n got %v\nwant %v", m, want) + } + + const inOverwrite = `name:"Shrek" number:42` + m = new(Communique) + testErr := "line 1.13: field 'number' would overwrite already parsed oneof 'Union'" + if err := UnmarshalText(inOverwrite, m); err == nil { + t.Errorf("TestOneofParsing: Didn't get expected error: %v", testErr) + } else if err.Error() != testErr { + t.Errorf("TestOneofParsing: Incorrect error.\nHave: %v\nWant: %v", + err.Error(), testErr) + } + +} + +var benchInput string + +func init() { + benchInput = "count: 4\n" + for i := 0; i < 1000; i++ { + benchInput += "pet: \"fido\"\n" + } + + // Check it is valid input. + pb := new(MyMessage) + err := UnmarshalText(benchInput, pb) + if err != nil { + panic("Bad benchmark input: " + err.Error()) + } +} + +func BenchmarkUnmarshalText(b *testing.B) { + pb := new(MyMessage) + for i := 0; i < b.N; i++ { + UnmarshalText(benchInput, pb) + } + b.SetBytes(int64(len(benchInput))) +} diff --git a/deps/github.com/gogo/protobuf/proto/text_test.go b/deps/github.com/gogo/protobuf/proto/text_test.go new file mode 100644 index 000000000..d7c6a8d29 --- /dev/null +++ b/deps/github.com/gogo/protobuf/proto/text_test.go @@ -0,0 +1,518 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto_test + +import ( + "bytes" + "errors" + "io/ioutil" + "math" + "strings" + "sync" + "testing" + + "github.com/gogo/protobuf/proto" + + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/test_proto" + "github.com/gogo/protobuf/types" +) + +// textMessage implements the methods that allow it to marshal and unmarshal +// itself as text. +type textMessage struct { +} + +func (*textMessage) MarshalText() ([]byte, error) { + return []byte("custom"), nil +} + +func (*textMessage) UnmarshalText(bytes []byte) error { + if string(bytes) != "custom" { + return errors.New("expected 'custom'") + } + return nil +} + +func (*textMessage) Reset() {} +func (*textMessage) String() string { return "" } +func (*textMessage) ProtoMessage() {} + +func newTestMessage() *pb.MyMessage { + msg := &pb.MyMessage{ + Count: proto.Int32(42), + Name: proto.String("Dave"), + Quote: proto.String(`"I didn't want to go."`), + Pet: []string{"bunny", "kitty", "horsey"}, + Inner: &pb.InnerMessage{ + Host: proto.String("footrest.syd"), + Port: proto.Int32(7001), + Connected: proto.Bool(true), + }, + Others: []*pb.OtherMessage{ + { + Key: proto.Int64(0xdeadbeef), + Value: []byte{1, 65, 7, 12}, + }, + { + Weight: proto.Float32(6.022), + Inner: &pb.InnerMessage{ + Host: proto.String("lesha.mtv"), + Port: proto.Int32(8002), + }, + }, + }, + Bikeshed: pb.MyMessage_BLUE.Enum(), + Somegroup: &pb.MyMessage_SomeGroup{ + GroupField: proto.Int32(8), + }, + // One normally wouldn't do this. + // This is an undeclared tag 13, as a varint (wire type 0) with value 4. + XXX_unrecognized: []byte{13<<3 | 0, 4}, + } + ext := &pb.Ext{ + Data: proto.String("Big gobs for big rats"), + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext); err != nil { + panic(err) + } + greetings := []string{"adg", "easy", "cow"} + if err := proto.SetExtension(msg, pb.E_Greeting, greetings); err != nil { + panic(err) + } + + // Add an unknown extension. We marshal a pb.Ext, and fake the ID. + b, err := proto.Marshal(&pb.Ext{Data: proto.String("3G skiing")}) + if err != nil { + panic(err) + } + b = append(proto.EncodeVarint(201<<3|proto.WireBytes), b...) + proto.SetRawExtension(msg, 201, b) + + // Extensions can be plain fields, too, so let's test that. + b = append(proto.EncodeVarint(202<<3|proto.WireVarint), 19) + proto.SetRawExtension(msg, 202, b) + + return msg +} + +const text = `count: 42 +name: "Dave" +quote: "\"I didn't want to go.\"" +pet: "bunny" +pet: "kitty" +pet: "horsey" +inner: < + host: "footrest.syd" + port: 7001 + connected: true +> +others: < + key: 3735928559 + value: "\001A\007\014" +> +others: < + weight: 6.022 + inner: < + host: "lesha.mtv" + port: 8002 + > +> +bikeshed: BLUE +SomeGroup { + group_field: 8 +} +/* 2 unknown bytes */ +13: 4 +[test_proto.Ext.more]: < + data: "Big gobs for big rats" +> +[test_proto.greeting]: "adg" +[test_proto.greeting]: "easy" +[test_proto.greeting]: "cow" +/* 13 unknown bytes */ +201: "\t3G skiing" +/* 3 unknown bytes */ +202: 19 +` + +func TestMarshalText(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, newTestMessage()); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != text { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, text) + } +} + +func TestMarshalTextCustomMessage(t *testing.T) { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, &textMessage{}); err != nil { + t.Fatalf("proto.MarshalText: %v", err) + } + s := buf.String() + if s != "custom" { + t.Errorf("Got %q, expected %q", s, "custom") + } +} +func TestMarshalTextNil(t *testing.T) { + want := "" + tests := []proto.Message{nil, (*pb.MyMessage)(nil)} + for i, test := range tests { + buf := new(bytes.Buffer) + if err := proto.MarshalText(buf, test); err != nil { + t.Fatal(err) + } + if got := buf.String(); got != want { + t.Errorf("%d: got %q want %q", i, got, want) + } + } +} + +func TestMarshalTextUnknownEnum(t *testing.T) { + // The Color enum only specifies values 0-2. + m := &pb.MyMessage{Bikeshed: pb.MyMessage_Color(3).Enum()} + got := m.String() + const want = `bikeshed:3 ` + if got != want { + t.Errorf("\n got %q\nwant %q", got, want) + } +} + +func TestTextOneof(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&pb.Communique{}, ``}, + // scalar field + {&pb.Communique{Union: &pb.Communique_Number{Number: 4}}, `number:4`}, + // message field + {&pb.Communique{Union: &pb.Communique_Msg{ + Msg: &pb.Strings{StringField: proto.String("why hello!")}, + }}, `msg:`}, + // bad oneof (should not panic) + {&pb.Communique{Union: &pb.Communique_Msg{Msg: nil}}, `msg:/* nil */`}, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} + +func BenchmarkMarshalTextBuffered(b *testing.B) { + buf := new(bytes.Buffer) + m := newTestMessage() + for i := 0; i < b.N; i++ { + buf.Reset() + proto.MarshalText(buf, m) + } +} + +func BenchmarkMarshalTextUnbuffered(b *testing.B) { + w := ioutil.Discard + m := newTestMessage() + for i := 0; i < b.N; i++ { + proto.MarshalText(w, m) + } +} + +func compact(src string) string { + // s/[ \n]+/ /g; s/ $//; + dst := make([]byte, len(src)) + space, comment := false, false + j := 0 + for i := 0; i < len(src); i++ { + if strings.HasPrefix(src[i:], "/*") { + comment = true + i++ + continue + } + if comment && strings.HasPrefix(src[i:], "*/") { + comment = false + i++ + continue + } + if comment { + continue + } + c := src[i] + if c == ' ' || c == '\n' { + space = true + continue + } + if j > 0 && (dst[j-1] == ':' || dst[j-1] == '<' || dst[j-1] == '{') { + space = false + } + if c == '{' { + space = false + } + if space { + dst[j] = ' ' + j++ + space = false + } + dst[j] = c + j++ + } + if space { + dst[j] = ' ' + j++ + } + return string(dst[0:j]) +} + +var compactText = compact(text) + +func TestCompactText(t *testing.T) { + s := proto.CompactTextString(newTestMessage()) + if s != compactText { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText) + } +} + +func TestStringEscaping(t *testing.T) { + testCases := []struct { + in *pb.Strings + out string + }{ + { + // Test data from C++ test (TextFormatTest.StringEscape). + // Single divergence: we don't escape apostrophes. + &pb.Strings{StringField: proto.String("\"A string with ' characters \n and \r newlines and \t tabs and \001 slashes \\ and multiple spaces")}, + "string_field: \"\\\"A string with ' characters \\n and \\r newlines and \\t tabs and \\001 slashes \\\\ and multiple spaces\"\n", + }, + { + // Test data from the same C++ test. + &pb.Strings{StringField: proto.String("\350\260\267\346\255\214")}, + "string_field: \"\\350\\260\\267\\346\\255\\214\"\n", + }, + { + // Some UTF-8. + &pb.Strings{StringField: proto.String("\x00\x01\xff\x81")}, + `string_field: "\000\001\377\201"` + "\n", + }, + } + + for i, tc := range testCases { + var buf bytes.Buffer + if err := proto.MarshalText(&buf, tc.in); err != nil { + t.Errorf("proto.MarsalText: %v", err) + continue + } + s := buf.String() + if s != tc.out { + t.Errorf("#%d: Got:\n%s\nExpected:\n%s\n", i, s, tc.out) + continue + } + + // Check round-trip. + pbStrings := new(pb.Strings) + if err := proto.UnmarshalText(s, pbStrings); err != nil { + t.Errorf("#%d: UnmarshalText: %v", i, err) + continue + } + if !proto.Equal(pbStrings, tc.in) { + t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pbStrings) + } + } +} + +// A limitedWriter accepts some output before it fails. +// This is a proxy for something like a nearly-full or imminently-failing disk, +// or a network connection that is about to die. +type limitedWriter struct { + b bytes.Buffer + limit int +} + +var outOfSpace = errors.New("proto: insufficient space") + +func (w *limitedWriter) Write(p []byte) (n int, err error) { + var avail = w.limit - w.b.Len() + if avail <= 0 { + return 0, outOfSpace + } + if len(p) <= avail { + return w.b.Write(p) + } + n, _ = w.b.Write(p[:avail]) + return n, outOfSpace +} + +func TestMarshalTextFailing(t *testing.T) { + // Try lots of different sizes to exercise more error code-paths. + for lim := 0; lim < len(text); lim++ { + buf := new(limitedWriter) + buf.limit = lim + err := proto.MarshalText(buf, newTestMessage()) + // We expect a certain error, but also some partial results in the buffer. + if err != outOfSpace { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", err, outOfSpace) + } + s := buf.b.String() + x := text[:buf.limit] + if s != x { + t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v===\n", s, x) + } + } +} + +func TestFloats(t *testing.T) { + tests := []struct { + f float64 + want string + }{ + {0, "0"}, + {4.7, "4.7"}, + {math.Inf(1), "inf"}, + {math.Inf(-1), "-inf"}, + {math.NaN(), "nan"}, + } + for _, test := range tests { + msg := &pb.FloatingPoint{F: &test.f} + got := strings.TrimSpace(msg.String()) + want := `f:` + test.want + if got != want { + t.Errorf("f=%f: got %q, want %q", test.f, got, want) + } + } +} + +func TestRepeatedNilText(t *testing.T) { + m := &pb.MessageList{ + Message: []*pb.MessageList_Message{ + nil, + { + Name: proto.String("Horse"), + }, + nil, + }, + } + want := `Message +Message { + name: "Horse" +} +Message +` + if s := proto.MarshalTextString(m); s != want { + t.Errorf(" got: %s\nwant: %s", s, want) + } +} + +func TestProto3Text(t *testing.T) { + tests := []struct { + m proto.Message + want string + }{ + // zero message + {&proto3pb.Message{}, ``}, + // zero message except for an empty byte slice + {&proto3pb.Message{Data: []byte{}}, ``}, + // trivial case + {&proto3pb.Message{Name: "Rob", HeightInCm: 175}, `name:"Rob" height_in_cm:175`}, + // empty map + {&pb.MessageWithMap{}, ``}, + // non-empty map; map format is the same as a repeated struct, + // and they are sorted by key (numerically for numeric keys). + { + &pb.MessageWithMap{NameMapping: map[int32]string{ + -1: "Negatory", + 7: "Lucky", + 1234: "Feist", + 6345789: "Otis", + }}, + `name_mapping: ` + + `name_mapping: ` + + `name_mapping: ` + + `name_mapping:`, + }, + // map with nil value; not well-defined, but we shouldn't crash + { + &pb.MessageWithMap{MsgMapping: map[int64]*pb.FloatingPoint{7: nil}}, + `msg_mapping:`, + }, + } + for _, test := range tests { + got := strings.TrimSpace(test.m.String()) + if got != test.want { + t.Errorf("\n got %s\nwant %s", got, test.want) + } + } +} + +func TestRacyMarshal(t *testing.T) { + // This test should be run with the race detector. + + any := &pb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} + proto.SetExtension(any, pb.E_Ext_Text, proto.String("bar")) + b, err := proto.Marshal(any) + if err != nil { + panic(err) + } + m := &proto3pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any), Value: b}, + } + + wantText := proto.MarshalTextString(m) + wantBytes, err := proto.Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal error: %v", err) + } + + var wg sync.WaitGroup + defer wg.Wait() + wg.Add(20) + for i := 0; i < 10; i++ { + go func() { + defer wg.Done() + got := proto.MarshalTextString(m) + if got != wantText { + t.Errorf("proto.MarshalTextString = %q, want %q", got, wantText) + } + }() + go func() { + defer wg.Done() + got, err := proto.Marshal(m) + if !bytes.Equal(got, wantBytes) || err != nil { + t.Errorf("proto.Marshal = (%x, %v), want (%x, nil)", got, err, wantBytes) + } + }() + } +} diff --git a/deps/github.com/gogo/protobuf/proto/timestamp_gogo.go b/deps/github.com/gogo/protobuf/proto/timestamp_gogo.go index d42764743..38439fa99 100644 --- a/deps/github.com/gogo/protobuf/proto/timestamp_gogo.go +++ b/deps/github.com/gogo/protobuf/proto/timestamp_gogo.go @@ -47,183 +47,3 @@ func (*timestamp) String() string { return "timestamp" } func init() { RegisterType((*timestamp)(nil), "gogo.protobuf.proto.timestamp") } - -func (o *Buffer) decTimestamp() (time.Time, error) { - b, err := o.DecodeRawBytes(true) - if err != nil { - return time.Time{}, err - } - tproto := ×tamp{} - if err := Unmarshal(b, tproto); err != nil { - return time.Time{}, err - } - return timestampFromProto(tproto) -} - -func (o *Buffer) dec_time(p *Properties, base structPointer) error { - t, err := o.decTimestamp() - if err != nil { - return err - } - setPtrCustomType(base, p.field, &t) - return nil -} - -func (o *Buffer) dec_ref_time(p *Properties, base structPointer) error { - t, err := o.decTimestamp() - if err != nil { - return err - } - setCustomType(base, p.field, &t) - return nil -} - -func (o *Buffer) dec_slice_time(p *Properties, base structPointer) error { - t, err := o.decTimestamp() - if err != nil { - return err - } - newBas := appendStructPointer(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))) - var zero field - setPtrCustomType(newBas, zero, &t) - return nil -} - -func (o *Buffer) dec_slice_ref_time(p *Properties, base structPointer) error { - t, err := o.decTimestamp() - if err != nil { - return err - } - newBas := appendStructPointer(base, p.field, reflect.SliceOf(timeType)) - var zero field - setCustomType(newBas, zero, &t) - return nil -} - -func size_time(p *Properties, base structPointer) (n int) { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return 0 - } - tim := structPointer_Interface(structp, timeType).(*time.Time) - t, err := timestampProto(*tim) - if err != nil { - return 0 - } - size := Size(t) - return size + sizeVarint(uint64(size)) + len(p.tagcode) -} - -func (o *Buffer) enc_time(p *Properties, base structPointer) error { - structp := structPointer_GetStructPointer(base, p.field) - if structPointer_IsNil(structp) { - return ErrNil - } - tim := structPointer_Interface(structp, timeType).(*time.Time) - t, err := timestampProto(*tim) - if err != nil { - return err - } - data, err := Marshal(t) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_ref_time(p *Properties, base structPointer) (n int) { - tim := structPointer_InterfaceAt(base, p.field, timeType).(*time.Time) - t, err := timestampProto(*tim) - if err != nil { - return 0 - } - size := Size(t) - return size + sizeVarint(uint64(size)) + len(p.tagcode) -} - -func (o *Buffer) enc_ref_time(p *Properties, base structPointer) error { - tim := structPointer_InterfaceAt(base, p.field, timeType).(*time.Time) - t, err := timestampProto(*tim) - if err != nil { - return err - } - data, err := Marshal(t) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - return nil -} - -func size_slice_time(p *Properties, base structPointer) (n int) { - ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))).(*[]*time.Time) - tims := *ptims - for i := 0; i < len(tims); i++ { - if tims[i] == nil { - return 0 - } - tproto, err := timestampProto(*tims[i]) - if err != nil { - return 0 - } - size := Size(tproto) - n += len(p.tagcode) + size + sizeVarint(uint64(size)) - } - return n -} - -func (o *Buffer) enc_slice_time(p *Properties, base structPointer) error { - ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))).(*[]*time.Time) - tims := *ptims - for i := 0; i < len(tims); i++ { - if tims[i] == nil { - return errRepeatedHasNil - } - tproto, err := timestampProto(*tims[i]) - if err != nil { - return err - } - data, err := Marshal(tproto) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - } - return nil -} - -func size_slice_ref_time(p *Properties, base structPointer) (n int) { - ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(timeType)).(*[]time.Time) - tims := *ptims - for i := 0; i < len(tims); i++ { - tproto, err := timestampProto(tims[i]) - if err != nil { - return 0 - } - size := Size(tproto) - n += len(p.tagcode) + size + sizeVarint(uint64(size)) - } - return n -} - -func (o *Buffer) enc_slice_ref_time(p *Properties, base structPointer) error { - ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(timeType)).(*[]time.Time) - tims := *ptims - for i := 0; i < len(tims); i++ { - tproto, err := timestampProto(tims[i]) - if err != nil { - return err - } - data, err := Marshal(tproto) - if err != nil { - return err - } - o.buf = append(o.buf, p.tagcode...) - o.EncodeRawBytes(data) - } - return nil -} diff --git a/deps/github.com/gogo/protobuf/protobuf/Makefile b/deps/github.com/gogo/protobuf/protobuf/Makefile new file mode 100644 index 000000000..9be05e27d --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/Makefile @@ -0,0 +1,64 @@ +URL="https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/" + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogotypes + go install github.com/gogo/protobuf/protoc-min-version + + protoc-min-version \ + --version="3.0.0" \ + --gogotypes_out=../types/ \ + -I=. \ + google/protobuf/any.proto \ + google/protobuf/type.proto \ + google/protobuf/empty.proto \ + google/protobuf/api.proto \ + google/protobuf/timestamp.proto \ + google/protobuf/duration.proto \ + google/protobuf/struct.proto \ + google/protobuf/wrappers.proto \ + google/protobuf/field_mask.proto \ + google/protobuf/source_context.proto + + mv ../types/google/protobuf/*.pb.go ../types/ || true + rmdir ../types/google/protobuf || true + rmdir ../types/google || true + +update: + go install github.com/gogo/protobuf/gogoreplace + + (cd ./google/protobuf && rm descriptor.proto; wget ${URL}/descriptor.proto) + # gogoprotobuf requires users to import gogo.proto which imports descriptor.proto + # The descriptor.proto is only compatible with proto3 just because of the reserved keyword. + # We remove it to stay compatible with previous versions of protoc before proto3 + gogoreplace 'reserved 38;' '//reserved 38;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 8;' '//reserved 8;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 9;' '//reserved 9;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 4;' '//reserved 4;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 5;' '//reserved 5;' ./google/protobuf/descriptor.proto + gogoreplace 'option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";' 'option go_package = "descriptor";' ./google/protobuf/descriptor.proto + + (cd ./google/protobuf/compiler && rm plugin.proto; wget ${URL}/compiler/plugin.proto) + gogoreplace 'option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";' 'option go_package = "plugin_go";' ./google/protobuf/compiler/plugin.proto + + (cd ./google/protobuf && rm any.proto; wget ${URL}/any.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/any";' 'go_package = "types";' ./google/protobuf/any.proto + (cd ./google/protobuf && rm empty.proto; wget ${URL}/empty.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/empty";' 'go_package = "types";' ./google/protobuf/empty.proto + (cd ./google/protobuf && rm timestamp.proto; wget ${URL}/timestamp.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/timestamp";' 'go_package = "types";' ./google/protobuf/timestamp.proto + (cd ./google/protobuf && rm duration.proto; wget ${URL}/duration.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/duration";' 'go_package = "types";' ./google/protobuf/duration.proto + (cd ./google/protobuf && rm struct.proto; wget ${URL}/struct.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/struct;structpb";' 'go_package = "types";' ./google/protobuf/struct.proto + (cd ./google/protobuf && rm wrappers.proto; wget ${URL}/wrappers.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/wrappers";' 'go_package = "types";' ./google/protobuf/wrappers.proto + (cd ./google/protobuf && rm field_mask.proto; wget ${URL}/field_mask.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask";' 'option go_package = "types";' ./google/protobuf/field_mask.proto + (cd ./google/protobuf && rm api.proto; wget ${URL}/api.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/api;api";' 'option go_package = "types";' ./google/protobuf/api.proto + (cd ./google/protobuf && rm type.proto; wget ${URL}/type.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/ptype;ptype";' 'option go_package = "types";' ./google/protobuf/type.proto + (cd ./google/protobuf && rm source_context.proto; wget ${URL}/source_context.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/source_context;source_context";' 'option go_package = "types";' ./google/protobuf/source_context.proto + + diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto new file mode 100644 index 000000000..b6cc7cb2e --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto @@ -0,0 +1,154 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto new file mode 100644 index 000000000..67c1ddbd9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto @@ -0,0 +1,210 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +import "google/protobuf/source_context.proto"; +import "google/protobuf/type.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "ApiProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// Api is a light-weight descriptor for an API Interface. +// +// Interfaces are also described as "protocol buffer services" in some contexts, +// such as by the "service" keyword in a .proto file, but they are different +// from API Services, which represent a concrete implementation of an interface +// as opposed to simply a description of methods and bindings. They are also +// sometimes simply referred to as "APIs" in other contexts, such as the name of +// this message itself. See https://cloud.google.com/apis/design/glossary for +// detailed terminology. +message Api { + + // The fully qualified name of this interface, including package name + // followed by the interface's simple name. + string name = 1; + + // The methods of this interface, in unspecified order. + repeated Method methods = 2; + + // Any metadata attached to the interface. + repeated Option options = 3; + + // A version string for this interface. If specified, must have the form + // `major-version.minor-version`, as in `1.10`. If the minor version is + // omitted, it defaults to zero. If the entire version field is empty, the + // major version is derived from the package name, as outlined below. If the + // field is not empty, the version in the package name will be verified to be + // consistent with what is provided here. + // + // The versioning schema uses [semantic + // versioning](http://semver.org) where the major version number + // indicates a breaking change and the minor version an additive, + // non-breaking change. Both version numbers are signals to users + // what to expect from different versions, and should be carefully + // chosen based on the product plan. + // + // The major version is also reflected in the package name of the + // interface, which must end in `v`, as in + // `google.feature.v1`. For major versions 0 and 1, the suffix can + // be omitted. Zero major versions must only be used for + // experimental, non-GA interfaces. + // + // + string version = 4; + + // Source context for the protocol buffer service represented by this + // message. + SourceContext source_context = 5; + + // Included interfaces. See [Mixin][]. + repeated Mixin mixins = 6; + + // The source syntax of the service. + Syntax syntax = 7; +} + +// Method represents a method of an API interface. +message Method { + + // The simple name of this method. + string name = 1; + + // A URL of the input message type. + string request_type_url = 2; + + // If true, the request is streamed. + bool request_streaming = 3; + + // The URL of the output message type. + string response_type_url = 4; + + // If true, the response is streamed. + bool response_streaming = 5; + + // Any metadata attached to the method. + repeated Option options = 6; + + // The source syntax of this method. + Syntax syntax = 7; +} + +// Declares an API Interface to be included in this interface. The including +// interface must redeclare all the methods from the included interface, but +// documentation and options are inherited as follows: +// +// - If after comment and whitespace stripping, the documentation +// string of the redeclared method is empty, it will be inherited +// from the original method. +// +// - Each annotation belonging to the service config (http, +// visibility) which is not set in the redeclared method will be +// inherited. +// +// - If an http annotation is inherited, the path pattern will be +// modified as follows. Any version prefix will be replaced by the +// version of the including interface plus the [root][] path if +// specified. +// +// Example of a simple mixin: +// +// package google.acl.v1; +// service AccessControl { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v1/{resource=**}:getAcl"; +// } +// } +// +// package google.storage.v2; +// service Storage { +// rpc GetAcl(GetAclRequest) returns (Acl); +// +// // Get a data record. +// rpc GetData(GetDataRequest) returns (Data) { +// option (google.api.http).get = "/v2/{resource=**}"; +// } +// } +// +// Example of a mixin configuration: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// +// The mixin construct implies that all methods in `AccessControl` are +// also declared with same name and request/response types in +// `Storage`. A documentation generator or annotation processor will +// see the effective `Storage.GetAcl` method after inherting +// documentation and annotations as follows: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/{resource=**}:getAcl"; +// } +// ... +// } +// +// Note how the version in the path pattern changed from `v1` to `v2`. +// +// If the `root` field in the mixin is specified, it should be a +// relative path under which inherited HTTP paths are placed. Example: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// root: acls +// +// This implies the following inherited HTTP annotation: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; +// } +// ... +// } +message Mixin { + // The fully qualified name of the interface which is included. + string name = 1; + + // If non-empty specifies a path under which inherited HTTP paths + // are rooted. + string root = 2; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto new file mode 100644 index 000000000..e85c852fc --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto @@ -0,0 +1,167 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// +// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to +// change. +// +// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is +// just a program that reads a CodeGeneratorRequest from stdin and writes a +// CodeGeneratorResponse to stdout. +// +// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead +// of dealing with the raw protocol defined here. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "protoc-gen-$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to protoc. + +syntax = "proto2"; +package google.protobuf.compiler; +option java_package = "com.google.protobuf.compiler"; +option java_outer_classname = "PluginProtos"; + +option go_package = "plugin_go"; + +import "google/protobuf/descriptor.proto"; + +// The version number of protocol compiler. +message Version { + optional int32 major = 1; + optional int32 minor = 2; + optional int32 patch = 3; + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + optional string suffix = 4; +} + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +message CodeGeneratorRequest { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + repeated string file_to_generate = 1; + + // The generator parameter passed on the command-line. + optional string parameter = 2; + + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + // + // Type names of fields and extensions in the FileDescriptorProto are always + // fully qualified. + repeated FileDescriptorProto proto_file = 15; + + // The version number of protocol compiler. + optional Version compiler_version = 3; + +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +message CodeGeneratorResponse { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + optional string error = 1; + + // Represents a single generated file. + message File { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + optional string name = 1; + + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + optional string insertion_point = 2; + + // The file contents. + optional string content = 15; + } + repeated File file = 15; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto new file mode 100644 index 000000000..1598ad7c1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto @@ -0,0 +1,872 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + + +syntax = "proto2"; + +package google.protobuf; +option go_package = "descriptor"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + optional string syntax = 12; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; + optional int32 end = 2; + + optional ExtensionRangeOptions options = 3; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // Range of reserved tag numbers. Reserved tag numbers may not be used by + // fields or extension ranges in the same message. Reserved ranges may + // not overlap. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +message ExtensionRangeOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + }; + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + }; + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + optional Type type = 5; + + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + optional string json_name = 10; + + optional FieldOptions options = 8; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; + + // Range of reserved numeric values. Reserved values may not be used by + // entries in the same enum. Reserved ranges may not overlap. + // + // Note that this is distinct from DescriptorProto.ReservedRange in that it + // is inclusive such that it can appropriately represent the entire int32 + // domain. + message EnumReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. + } + + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + repeated EnumReservedRange reserved_range = 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default=false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default=false]; +} + + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + + +message FileOptions { + + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + optional string java_package = 1; + + + // If set, all the classes from the .proto file are wrapped in a single + // outer class with the given name. This applies to both Proto1 + // (equivalent to the old "--one_java_file" option) and Proto2 (where + // a .proto always translates to a single class, but you may want to + // explicitly choose the class name). + optional string java_outer_classname = 8; + + // If set true, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the outer class + // named by java_outer_classname. However, the outer class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + optional bool java_multiple_files = 10 [default=false]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + optional bool java_string_check_utf8 = 27 [default=false]; + + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default=SPEED]; + + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + optional string go_package = 11; + + + + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + optional bool cc_generic_services = 16 [default=false]; + optional bool java_generic_services = 17 [default=false]; + optional bool py_generic_services = 18 [default=false]; + optional bool php_generic_services = 42 [default=false]; + + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + optional bool deprecated = 23 [default=false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default=false]; + + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. + // See the documentation for the "Options" section above. + extensions 1000 to max; + + //reserved 38; +} + +message MessageOptions { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + optional bool message_set_wire_format = 1 [default=false]; + + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + optional bool no_standard_descriptor_accessor = 2 [default=false]; + + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + optional bool deprecated = 3 [default=false]; + + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementions still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + optional bool map_entry = 7; + + //reserved 8; // javalite_serializable + //reserved 9; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + optional CType ctype = 1 [default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + CORD = 1; + + STRING_PIECE = 2; + } + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + optional bool packed = 2; + + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + optional bool lazy = 5 [default=false]; + + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + optional bool deprecated = 3 [default=false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default=false]; + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + //reserved 4; // removed jtype +} + +message OneofOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + optional bool deprecated = 3 [default=false]; + + //reserved 5; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + optional bool deprecated = 1 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + optional bool deprecated = 33 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + optional bool deprecated = 33 [default=false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = + 34 [default=IDEMPOTENCY_UNKNOWN]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +message UninterpretedOption { + // The name of the uninterpreted option. Each string represents a segment in + // a dot-separated name. is_extension is true iff a segment represents an + // extension (denoted with parentheses in options specs in .proto files). + // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents + // "foo.(bar.baz).qux". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendent. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + repeated Location location = 1; + message Location { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + repeated int32 path = 1 [packed=true]; + + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + repeated int32 span = 2 [packed=true]; + + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed=true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + optional int32 end = 4; + } +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto new file mode 100644 index 000000000..8bbaa8b62 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto @@ -0,0 +1,117 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DurationProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// two Timestamp values is a Duration and it can be added or subtracted +// from a Timestamp. Range is approximately +-10,000 years. +// +// # Examples +// +// Example 1: Compute Duration from two Timestamps in pseudo code. +// +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (durations.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } +// +// Example 3: Compute Duration from datetime.timedelta in Python. +// +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) +// +// # JSON Mapping +// +// In JSON format, the Duration type is encoded as a string rather than an +// object, where the string ends in the suffix "s" (indicating seconds) and +// is preceded by the number of seconds, with nanoseconds expressed as +// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +// microsecond should be expressed in JSON format as "3.000001s". +// +// +message Duration { + + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. Note: these bounds are computed from: + // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + int64 seconds = 1; + + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + int32 nanos = 2; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto new file mode 100644 index 000000000..6057c8522 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto @@ -0,0 +1,52 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "EmptyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +message Empty {} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto new file mode 100644 index 000000000..121619814 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto @@ -0,0 +1,252 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "FieldMaskProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, the existing +// repeated values in the target resource will be overwritten by the new values. +// Note that a repeated field is only allowed in the last position of a `paths` +// string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then the existing sub-message in the target resource is +// overwritten. Given the target message: +// +// f { +// b { +// d : 1 +// x : 2 +// } +// c : 1 +// } +// +// And an update message: +// +// f { +// b { +// d : 10 +// } +// } +// +// then if the field mask is: +// +// paths: "f.b" +// +// then the result will be: +// +// f { +// b { +// d : 10 +// } +// c : 1 +// } +// +// However, if the update mask was: +// +// paths: "f.b.d" +// +// then the result would be: +// +// f { +// b { +// d : 10 +// x : 2 +// } +// c : 1 +// } +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of the all the API methods, which have any FieldMask type +// field in the request, should verify the included field paths, and return +// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +message FieldMask { + // The set of field mask paths. + repeated string paths = 1; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto new file mode 100644 index 000000000..8654578c7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto @@ -0,0 +1,48 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "SourceContextProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// `SourceContext` represents information about the source of a +// protobuf element, like the file in which it is defined. +message SourceContext { + // The path-qualified name of the .proto file that contained the associated + // protobuf element. For example: `"google/protobuf/source_context.proto"`. + string file_name = 1; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto new file mode 100644 index 000000000..4f78641fa --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto @@ -0,0 +1,96 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "StructProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +message Struct { + // Unordered map of dynamically typed values. + map fields = 1; +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +message Value { + // The kind of value. + oneof kind { + // Represents a null value. + NullValue null_value = 1; + // Represents a double value. + double number_value = 2; + // Represents a string value. + string string_value = 3; + // Represents a boolean value. + bool bool_value = 4; + // Represents a structured value. + Struct struct_value = 5; + // Represents a repeated `Value`. + ListValue list_value = 6; + } +} + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +enum NullValue { + // Null value. + NULL_VALUE = 0; +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +message ListValue { + // Repeated field of dynamically typed values. + repeated Value values = 1; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto new file mode 100644 index 000000000..150468b5e --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto @@ -0,0 +1,135 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TimestampProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Timestamp represents a point in time independent of any time zone +// or calendar, represented as seconds and fractions of seconds at +// nanosecond resolution in UTC Epoch time. It is encoded using the +// Proleptic Gregorian Calendar which extends the Gregorian calendar +// backwards to year one. It is encoded assuming all minutes are 60 +// seconds long, i.e. leap seconds are "smeared" so that no leap second +// table is needed for interpretation. Range is from +// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. +// By restricting to that range, we ensure that we can convert to +// and from RFC 3339 date strings. +// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// +// # Examples +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) +// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one +// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- +// ) to obtain a formatter capable of generating timestamps in this format. +// +// +message Timestamp { + + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + int32 nanos = 2; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto new file mode 100644 index 000000000..fcd15bfd7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto @@ -0,0 +1,187 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +import "google/protobuf/any.proto"; +import "google/protobuf/source_context.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TypeProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// A protocol buffer message type. +message Type { + // The fully qualified message name. + string name = 1; + // The list of fields. + repeated Field fields = 2; + // The list of types appearing in `oneof` definitions in this type. + repeated string oneofs = 3; + // The protocol buffer options. + repeated Option options = 4; + // The source context. + SourceContext source_context = 5; + // The source syntax. + Syntax syntax = 6; +} + +// A single field of a message type. +message Field { + // Basic field types. + enum Kind { + // Field type unknown. + TYPE_UNKNOWN = 0; + // Field type double. + TYPE_DOUBLE = 1; + // Field type float. + TYPE_FLOAT = 2; + // Field type int64. + TYPE_INT64 = 3; + // Field type uint64. + TYPE_UINT64 = 4; + // Field type int32. + TYPE_INT32 = 5; + // Field type fixed64. + TYPE_FIXED64 = 6; + // Field type fixed32. + TYPE_FIXED32 = 7; + // Field type bool. + TYPE_BOOL = 8; + // Field type string. + TYPE_STRING = 9; + // Field type group. Proto2 syntax only, and deprecated. + TYPE_GROUP = 10; + // Field type message. + TYPE_MESSAGE = 11; + // Field type bytes. + TYPE_BYTES = 12; + // Field type uint32. + TYPE_UINT32 = 13; + // Field type enum. + TYPE_ENUM = 14; + // Field type sfixed32. + TYPE_SFIXED32 = 15; + // Field type sfixed64. + TYPE_SFIXED64 = 16; + // Field type sint32. + TYPE_SINT32 = 17; + // Field type sint64. + TYPE_SINT64 = 18; + }; + + // Whether a field is optional, required, or repeated. + enum Cardinality { + // For fields with unknown cardinality. + CARDINALITY_UNKNOWN = 0; + // For optional fields. + CARDINALITY_OPTIONAL = 1; + // For required fields. Proto2 syntax only. + CARDINALITY_REQUIRED = 2; + // For repeated fields. + CARDINALITY_REPEATED = 3; + }; + + // The field type. + Kind kind = 1; + // The field cardinality. + Cardinality cardinality = 2; + // The field number. + int32 number = 3; + // The field name. + string name = 4; + // The field type URL, without the scheme, for message or enumeration + // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + string type_url = 6; + // The index of the field type in `Type.oneofs`, for message or enumeration + // types. The first type has index 1; zero means the type is not in the list. + int32 oneof_index = 7; + // Whether to use alternative packed wire representation. + bool packed = 8; + // The protocol buffer options. + repeated Option options = 9; + // The field JSON name. + string json_name = 10; + // The string value of the default value of this field. Proto2 syntax only. + string default_value = 11; +} + +// Enum type definition. +message Enum { + // Enum type name. + string name = 1; + // Enum value definitions. + repeated EnumValue enumvalue = 2; + // Protocol buffer options. + repeated Option options = 3; + // The source context. + SourceContext source_context = 4; + // The source syntax. + Syntax syntax = 5; +} + +// Enum value definition. +message EnumValue { + // Enum value name. + string name = 1; + // Enum value number. + int32 number = 2; + // Protocol buffer options. + repeated Option options = 3; +} + +// A protocol buffer option, which can be attached to a message, field, +// enumeration, etc. +message Option { + // The option's name. For protobuf built-in options (options defined in + // descriptor.proto), this is the short name. For example, `"map_entry"`. + // For custom options, it should be the fully-qualified name. For example, + // `"google.api.http"`. + string name = 1; + // The option's value packed in an Any message. If the value is a primitive, + // the corresponding wrapper type defined in google/protobuf/wrappers.proto + // should be used. If the value is an enum, it should be stored as an int32 + // value using the google.protobuf.Int32Value type. + Any value = 2; +} + +// The syntax in which a protocol buffer element is defined. +enum Syntax { + // Syntax `proto2`. + SYNTAX_PROTO2 = 0; + // Syntax `proto3`. + SYNTAX_PROTO3 = 1; +} diff --git a/deps/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto new file mode 100644 index 000000000..c5632e5ca --- /dev/null +++ b/deps/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto @@ -0,0 +1,118 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "WrappersProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +message DoubleValue { + // The double value. + double value = 1; +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +message FloatValue { + // The float value. + float value = 1; +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +message Int64Value { + // The int64 value. + int64 value = 1; +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +message UInt64Value { + // The uint64 value. + uint64 value = 1; +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +message Int32Value { + // The int32 value. + int32 value = 1; +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +message UInt32Value { + // The uint32 value. + uint32 value = 1; +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +message BoolValue { + // The bool value. + bool value = 1; +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +message StringValue { + // The string value. + string value = 1; +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +message BytesValue { + // The bytes value. + bytes value = 1; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-combo/combo.go b/deps/github.com/gogo/protobuf/protoc-gen-combo/combo.go new file mode 100644 index 000000000..aa0067ece --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-combo/combo.go @@ -0,0 +1,182 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "bufio" + "bytes" + "flag" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "strings" + + "github.com/gogo/protobuf/version" +) + +type MixMatch struct { + Old []string + Filename string + Args []string +} + +func (this MixMatch) Gen(folder string, news []string) { + if err := os.MkdirAll(folder, 0777); err != nil { + panic(err) + } + data, err := ioutil.ReadFile(this.Filename) + if err != nil { + panic(err) + } + content := string(data) + for i, old := range this.Old { + if !strings.Contains(content, old) { + panic(fmt.Errorf("could not find string {%s} to replace with {%s}", old, news[i])) + } + content = strings.Replace(content, old, news[i], 1) + if strings.Contains(content, old) && old != news[i] { + panic(fmt.Errorf("found another string {%s} after it was replaced with {%s}", old, news[i])) + } + } + if err = ioutil.WriteFile(filepath.Join(folder, this.Filename), []byte(content), 0666); err != nil { + panic(err) + } + args := append(this.Args, filepath.Join(folder, this.Filename)) + var regenerate = exec.Command("protoc", args...) + out, err := regenerate.CombinedOutput() + + failed := false + scanner := bufio.NewScanner(bytes.NewReader(out)) + for scanner.Scan() { + text := scanner.Text() + fmt.Println("protoc-gen-combo: ", text) + if !strings.Contains(text, "WARNING") { + failed = true + } + } + + if err != nil { + fmt.Print("protoc-gen-combo: error: ", err) + failed = true + } + + if failed { + os.Exit(1) + } +} + +func filter(ss []string, flag string) ([]string, string) { + s := make([]string, 0, len(ss)) + var v string + for i := range ss { + if strings.Contains(ss[i], flag) { + vs := strings.Split(ss[i], "=") + v = vs[1] + continue + } + s = append(s, ss[i]) + } + return s, v +} + +func filterArgs(ss []string) ([]string, []string) { + var args []string + var flags []string + for i := range ss { + if strings.Contains(ss[i], "=") { + flags = append(flags, ss[i]) + continue + } + args = append(args, ss[i]) + } + return flags, args +} + +func main() { + flag.String("version", "2.3.0", "minimum protoc version") + flag.Bool("default", true, "generate the case where everything is false") + flags, args := filterArgs(os.Args[1:]) + var min string + flags, min = filter(flags, "-version") + if len(min) == 0 { + min = "2.3.1" + } + if !version.AtLeast(min) { + fmt.Printf("protoc version not high enough to parse this proto file\n") + return + } + if len(args) != 1 { + fmt.Printf("protoc-gen-combo expects a filename\n") + os.Exit(1) + } + filename := args[0] + var def string + flags, def = filter(flags, "-default") + if _, err := exec.LookPath("protoc"); err != nil { + panic("cannot find protoc in PATH") + } + m := MixMatch{ + Old: []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }, + Filename: filename, + Args: flags, + } + if def != "false" { + m.Gen("./combos/neither/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + } + m.Gen("./combos/marshaler/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = true;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + m.Gen("./combos/unmarshaler/", []string{ + "option (gogoproto.unmarshaler_all) = true;", + "option (gogoproto.marshaler_all) = false;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) + m.Gen("./combos/both/", []string{ + "option (gogoproto.unmarshaler_all) = true;", + "option (gogoproto.marshaler_all) = true;", + "option (gogoproto.unsafe_unmarshaler_all) = false;", + "option (gogoproto.unsafe_marshaler_all) = false;", + }) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gofast/main.go b/deps/github.com/gogo/protobuf/protoc-gen-gofast/main.go new file mode 100644 index 000000000..3562a81ec --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gofast/main.go @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + + vanity.ForEachFile(files, vanity.TurnOffGogoImport) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/Makefile b/deps/github.com/gogo/protobuf/protoc-gen-gogo/Makefile new file mode 100644 index 000000000..52e2d4e70 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/Makefile @@ -0,0 +1,41 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +all: test + +test: + go test + make -C testdata test + +regenerate: + go test --regenerate + make -C descriptor regenerate + make -C plugin regenerate diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go index e2703901b..44f893b77 100644 --- a/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go @@ -1,35 +1,6 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: descriptor.proto -// DO NOT EDIT! - -/* -Package descriptor is a generated protocol buffer package. - -It is generated from these files: - descriptor.proto - -It has these top-level messages: - FileDescriptorSet - FileDescriptorProto - DescriptorProto - FieldDescriptorProto - OneofDescriptorProto - EnumDescriptorProto - EnumValueDescriptorProto - ServiceDescriptorProto - MethodDescriptorProto - FileOptions - MessageOptions - FieldOptions - OneofOptions - EnumOptions - EnumValueOptions - ServiceOptions - MethodOptions - UninterpretedOption - SourceCodeInfo - GeneratedCodeInfo -*/ + package descriptor import proto "github.com/gogo/protobuf/proto" @@ -139,7 +110,7 @@ func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { return nil } func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{3, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 0} } type FieldDescriptorProto_Label int32 @@ -179,7 +150,7 @@ func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { return nil } func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{3, 1} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 1} } // Generated classes can be optimized for speed or code size. @@ -220,7 +191,7 @@ func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { return nil } func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{9, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{10, 0} } type FieldOptions_CType int32 @@ -260,7 +231,7 @@ func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { return nil } func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{11, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 0} } type FieldOptions_JSType int32 @@ -302,7 +273,7 @@ func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { return nil } func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{11, 1} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 1} } // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, @@ -344,20 +315,41 @@ func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error { return nil } func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{16, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{17, 0} } // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. type FileDescriptorSet struct { - File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } +func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorSet) ProtoMessage() {} +func (*FileDescriptorSet) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{0} +} +func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b) +} +func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic) +} +func (dst *FileDescriptorSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorSet.Merge(dst, src) +} +func (m *FileDescriptorSet) XXX_Size() int { + return xxx_messageInfo_FileDescriptorSet.Size(m) +} +func (m *FileDescriptorSet) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorSet.DiscardUnknown(m) } -func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } -func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorSet) ProtoMessage() {} -func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} } +var xxx_messageInfo_FileDescriptorSet proto.InternalMessageInfo func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { if m != nil { @@ -390,14 +382,35 @@ type FileDescriptorProto struct { SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` // The syntax of the proto file. // The supported values are "proto2" and "proto3". - Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` - XXX_unrecognized []byte `json:"-"` + Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } -func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FileDescriptorProto) ProtoMessage() {} -func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{1} } +func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } +func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorProto) ProtoMessage() {} +func (*FileDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{1} +} +func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b) +} +func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *FileDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorProto.Merge(dst, src) +} +func (m *FileDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FileDescriptorProto.Size(m) +} +func (m *FileDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_FileDescriptorProto proto.InternalMessageInfo func (m *FileDescriptorProto) GetName() string { if m != nil && m.Name != nil { @@ -496,14 +509,35 @@ type DescriptorProto struct { ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` // Reserved field names, which may not be used by fields in the same message. // A given name may only be reserved once. - ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` - XXX_unrecognized []byte `json:"-"` + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } -func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } -func (*DescriptorProto) ProtoMessage() {} -func (*DescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{2} } +func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } +func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto) ProtoMessage() {} +func (*DescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2} +} +func (m *DescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto.Unmarshal(m, b) +} +func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto.Merge(dst, src) +} +func (m *DescriptorProto) XXX_Size() int { + return xxx_messageInfo_DescriptorProto.Size(m) +} +func (m *DescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto proto.InternalMessageInfo func (m *DescriptorProto) GetName() string { if m != nil && m.Name != nil { @@ -576,17 +610,37 @@ func (m *DescriptorProto) GetReservedName() []string { } type DescriptorProto_ExtensionRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } func (*DescriptorProto_ExtensionRange) ProtoMessage() {} func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{2, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 0} +} +func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic) } +func (dst *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(dst, src) +} +func (m *DescriptorProto_ExtensionRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m) +} +func (m *DescriptorProto_ExtensionRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ExtensionRange.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto_ExtensionRange proto.InternalMessageInfo func (m *DescriptorProto_ExtensionRange) GetStart() int32 { if m != nil && m.Start != nil { @@ -602,22 +656,48 @@ func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { return 0 } +func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { + if m != nil { + return m.Options + } + return nil +} + // Range of reserved tag numbers. Reserved tag numbers may not be used by // fields or extension ranges in the same message. Reserved ranges may // not overlap. type DescriptorProto_ReservedRange struct { - Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` - End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } func (*DescriptorProto_ReservedRange) ProtoMessage() {} func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{2, 1} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 1} +} +func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ReservedRange.Merge(dst, src) +} +func (m *DescriptorProto_ReservedRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m) +} +func (m *DescriptorProto_ReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ReservedRange.DiscardUnknown(m) } +var xxx_messageInfo_DescriptorProto_ReservedRange proto.InternalMessageInfo + func (m *DescriptorProto_ReservedRange) GetStart() int32 { if m != nil && m.Start != nil { return *m.Start @@ -632,6 +712,54 @@ func (m *DescriptorProto_ReservedRange) GetEnd() int32 { return 0 } +type ExtensionRangeOptions struct { + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} } +func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) } +func (*ExtensionRangeOptions) ProtoMessage() {} +func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{3} +} + +var extRange_ExtensionRangeOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ExtensionRangeOptions +} +func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b) +} +func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic) +} +func (dst *ExtensionRangeOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionRangeOptions.Merge(dst, src) +} +func (m *ExtensionRangeOptions) XXX_Size() int { + return xxx_messageInfo_ExtensionRangeOptions.Size(m) +} +func (m *ExtensionRangeOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionRangeOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionRangeOptions proto.InternalMessageInfo + +func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + // Describes a field within a message. type FieldDescriptorProto struct { Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` @@ -662,15 +790,36 @@ type FieldDescriptorProto struct { // user has set a "json_name" option on this field, that option's value // will be used. Otherwise, it's deduced from the field's name by converting // it to camelCase. - JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` - Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` + JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` + Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } +func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FieldDescriptorProto) ProtoMessage() {} +func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{4} +} +func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b) +} +func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *FieldDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldDescriptorProto.Merge(dst, src) +} +func (m *FieldDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FieldDescriptorProto.Size(m) +} +func (m *FieldDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FieldDescriptorProto.DiscardUnknown(m) } -func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } -func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*FieldDescriptorProto) ProtoMessage() {} -func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{3} } +var xxx_messageInfo_FieldDescriptorProto proto.InternalMessageInfo func (m *FieldDescriptorProto) GetName() string { if m != nil && m.Name != nil { @@ -744,15 +893,36 @@ func (m *FieldDescriptorProto) GetOptions() *FieldOptions { // Describes a oneof. type OneofDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } -func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*OneofDescriptorProto) ProtoMessage() {} -func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{4} } +func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } +func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*OneofDescriptorProto) ProtoMessage() {} +func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{5} +} +func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b) +} +func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *OneofDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofDescriptorProto.Merge(dst, src) +} +func (m *OneofDescriptorProto) XXX_Size() int { + return xxx_messageInfo_OneofDescriptorProto.Size(m) +} +func (m *OneofDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_OneofDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofDescriptorProto proto.InternalMessageInfo func (m *OneofDescriptorProto) GetName() string { if m != nil && m.Name != nil { @@ -770,16 +940,44 @@ func (m *OneofDescriptorProto) GetOptions() *OneofOptions { // Describes an enum type. type EnumDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` - Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } +func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto) ProtoMessage() {} +func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{6} +} +func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b) +} +func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *EnumDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto.Merge(dst, src) +} +func (m *EnumDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto.Size(m) +} +func (m *EnumDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto.DiscardUnknown(m) } -func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } -func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*EnumDescriptorProto) ProtoMessage() {} -func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{5} } +var xxx_messageInfo_EnumDescriptorProto proto.InternalMessageInfo func (m *EnumDescriptorProto) GetName() string { if m != nil && m.Name != nil { @@ -802,20 +1000,105 @@ func (m *EnumDescriptorProto) GetOptions() *EnumOptions { return nil } +func (m *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *EnumDescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +// Range of reserved numeric values. Reserved values may not be used by +// entries in the same enum. Reserved ranges may not overlap. +// +// Note that this is distinct from DescriptorProto.ReservedRange in that it +// is inclusive such that it can appropriately represent the entire int32 +// domain. +type EnumDescriptorProto_EnumReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumDescriptorProto_EnumReservedRange) Reset() { *m = EnumDescriptorProto_EnumReservedRange{} } +func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} +func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{6, 0} +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic) +} +func (dst *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(dst, src) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumDescriptorProto_EnumReservedRange proto.InternalMessageInfo + +func (m *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + // Describes a value within an enum. type EnumValueDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` - Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } func (*EnumValueDescriptorProto) ProtoMessage() {} func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{6} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{7} +} +func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b) +} +func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *EnumValueDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueDescriptorProto.Merge(dst, src) +} +func (m *EnumValueDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumValueDescriptorProto.Size(m) } +func (m *EnumValueDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueDescriptorProto proto.InternalMessageInfo func (m *EnumValueDescriptorProto) GetName() string { if m != nil && m.Name != nil { @@ -840,16 +1123,37 @@ func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { // Describes a service. type ServiceDescriptorProto struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` - Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` - XXX_unrecognized []byte `json:"-"` + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } +func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*ServiceDescriptorProto) ProtoMessage() {} +func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{8} +} +func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b) +} +func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *ServiceDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceDescriptorProto.Merge(dst, src) +} +func (m *ServiceDescriptorProto) XXX_Size() int { + return xxx_messageInfo_ServiceDescriptorProto.Size(m) +} +func (m *ServiceDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceDescriptorProto.DiscardUnknown(m) } -func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } -func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*ServiceDescriptorProto) ProtoMessage() {} -func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{7} } +var xxx_messageInfo_ServiceDescriptorProto proto.InternalMessageInfo func (m *ServiceDescriptorProto) GetName() string { if m != nil && m.Name != nil { @@ -883,14 +1187,35 @@ type MethodDescriptorProto struct { // Identifies if client streams multiple client messages ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` // Identifies if server streams multiple server messages - ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` - XXX_unrecognized []byte `json:"-"` + ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } +func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*MethodDescriptorProto) ProtoMessage() {} +func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{9} +} +func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b) +} +func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *MethodDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodDescriptorProto.Merge(dst, src) +} +func (m *MethodDescriptorProto) XXX_Size() int { + return xxx_messageInfo_MethodDescriptorProto.Size(m) +} +func (m *MethodDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_MethodDescriptorProto.DiscardUnknown(m) } -func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } -func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } -func (*MethodDescriptorProto) ProtoMessage() {} -func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{8} } +var xxx_messageInfo_MethodDescriptorProto proto.InternalMessageInfo const Default_MethodDescriptorProto_ClientStreaming bool = false const Default_MethodDescriptorProto_ServerStreaming bool = false @@ -957,7 +1282,7 @@ type FileOptions struct { // top-level extensions defined in the file. JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` // This option does nothing. - JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // Deprecated: Do not use. // If set true, then the Java2 code generator will generate code that // throws an exception whenever an attempt is made to assign a non-UTF-8 // byte sequence to a string field. @@ -985,6 +1310,7 @@ type FileOptions struct { CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` + PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_generic_services,omitempty"` // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very @@ -1003,16 +1329,28 @@ type FileOptions struct { // defined. When this options is provided, they will use this value instead // to prefix the types/symbols defined. SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` - // The parser stores options it doesn't recognize here. See above. + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *FileOptions) Reset() { *m = FileOptions{} } -func (m *FileOptions) String() string { return proto.CompactTextString(m) } -func (*FileOptions) ProtoMessage() {} -func (*FileOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{9} } +func (m *FileOptions) Reset() { *m = FileOptions{} } +func (m *FileOptions) String() string { return proto.CompactTextString(m) } +func (*FileOptions) ProtoMessage() {} +func (*FileOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{10} +} var extRange_FileOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1021,6 +1359,23 @@ var extRange_FileOptions = []proto.ExtensionRange{ func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_FileOptions } +func (m *FileOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileOptions.Unmarshal(m, b) +} +func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic) +} +func (dst *FileOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileOptions.Merge(dst, src) +} +func (m *FileOptions) XXX_Size() int { + return xxx_messageInfo_FileOptions.Size(m) +} +func (m *FileOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FileOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FileOptions proto.InternalMessageInfo const Default_FileOptions_JavaMultipleFiles bool = false const Default_FileOptions_JavaStringCheckUtf8 bool = false @@ -1028,6 +1383,7 @@ const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPE const Default_FileOptions_CcGenericServices bool = false const Default_FileOptions_JavaGenericServices bool = false const Default_FileOptions_PyGenericServices bool = false +const Default_FileOptions_PhpGenericServices bool = false const Default_FileOptions_Deprecated bool = false const Default_FileOptions_CcEnableArenas bool = false @@ -1052,6 +1408,7 @@ func (m *FileOptions) GetJavaMultipleFiles() bool { return Default_FileOptions_JavaMultipleFiles } +// Deprecated: Do not use. func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { if m != nil && m.JavaGenerateEqualsAndHash != nil { return *m.JavaGenerateEqualsAndHash @@ -1101,6 +1458,13 @@ func (m *FileOptions) GetPyGenericServices() bool { return Default_FileOptions_PyGenericServices } +func (m *FileOptions) GetPhpGenericServices() bool { + if m != nil && m.PhpGenericServices != nil { + return *m.PhpGenericServices + } + return Default_FileOptions_PhpGenericServices +} + func (m *FileOptions) GetDeprecated() bool { if m != nil && m.Deprecated != nil { return *m.Deprecated @@ -1136,6 +1500,20 @@ func (m *FileOptions) GetSwiftPrefix() string { return "" } +func (m *FileOptions) GetPhpClassPrefix() string { + if m != nil && m.PhpClassPrefix != nil { + return *m.PhpClassPrefix + } + return "" +} + +func (m *FileOptions) GetPhpNamespace() string { + if m != nil && m.PhpNamespace != nil { + return *m.PhpNamespace + } + return "" +} + func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { if m != nil { return m.UninterpretedOption @@ -1196,14 +1574,18 @@ type MessageOptions struct { MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *MessageOptions) Reset() { *m = MessageOptions{} } -func (m *MessageOptions) String() string { return proto.CompactTextString(m) } -func (*MessageOptions) ProtoMessage() {} -func (*MessageOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{10} } +func (m *MessageOptions) Reset() { *m = MessageOptions{} } +func (m *MessageOptions) String() string { return proto.CompactTextString(m) } +func (*MessageOptions) ProtoMessage() {} +func (*MessageOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{11} +} var extRange_MessageOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1212,6 +1594,23 @@ var extRange_MessageOptions = []proto.ExtensionRange{ func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_MessageOptions } +func (m *MessageOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageOptions.Unmarshal(m, b) +} +func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic) +} +func (dst *MessageOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageOptions.Merge(dst, src) +} +func (m *MessageOptions) XXX_Size() int { + return xxx_messageInfo_MessageOptions.Size(m) +} +func (m *MessageOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MessageOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageOptions proto.InternalMessageInfo const Default_MessageOptions_MessageSetWireFormat bool = false const Default_MessageOptions_NoStandardDescriptorAccessor bool = false @@ -1266,13 +1665,15 @@ type FieldOptions struct { Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` // The jstype option determines the JavaScript type used for values of the // field. The option is permitted only for 64 bit integral and fixed types - // (int64, uint64, sint64, fixed64, sfixed64). By default these types are - // represented as JavaScript strings. This avoids loss of precision that can - // happen when a large value is converted to a floating point JavaScript - // numbers. Specifying JS_NUMBER for the jstype causes the generated - // JavaScript code to use the JavaScript "number" type instead of strings. - // This option is an enum to permit additional types to be added, - // e.g. goog.math.Integer. + // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` // Should this field be parsed lazily? Lazy applies only to message-type // fields. It means that when the outer message is initially parsed, the @@ -1312,14 +1713,18 @@ type FieldOptions struct { Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *FieldOptions) Reset() { *m = FieldOptions{} } -func (m *FieldOptions) String() string { return proto.CompactTextString(m) } -func (*FieldOptions) ProtoMessage() {} -func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{11} } +func (m *FieldOptions) Reset() { *m = FieldOptions{} } +func (m *FieldOptions) String() string { return proto.CompactTextString(m) } +func (*FieldOptions) ProtoMessage() {} +func (*FieldOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{12} +} var extRange_FieldOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1328,6 +1733,23 @@ var extRange_FieldOptions = []proto.ExtensionRange{ func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_FieldOptions } +func (m *FieldOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldOptions.Unmarshal(m, b) +} +func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) +} +func (dst *FieldOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldOptions.Merge(dst, src) +} +func (m *FieldOptions) XXX_Size() int { + return xxx_messageInfo_FieldOptions.Size(m) +} +func (m *FieldOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FieldOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldOptions proto.InternalMessageInfo const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL @@ -1387,14 +1809,18 @@ func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { type OneofOptions struct { // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *OneofOptions) Reset() { *m = OneofOptions{} } -func (m *OneofOptions) String() string { return proto.CompactTextString(m) } -func (*OneofOptions) ProtoMessage() {} -func (*OneofOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{12} } +func (m *OneofOptions) Reset() { *m = OneofOptions{} } +func (m *OneofOptions) String() string { return proto.CompactTextString(m) } +func (*OneofOptions) ProtoMessage() {} +func (*OneofOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{13} +} var extRange_OneofOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1403,6 +1829,23 @@ var extRange_OneofOptions = []proto.ExtensionRange{ func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_OneofOptions } +func (m *OneofOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofOptions.Unmarshal(m, b) +} +func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic) +} +func (dst *OneofOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofOptions.Merge(dst, src) +} +func (m *OneofOptions) XXX_Size() int { + return xxx_messageInfo_OneofOptions.Size(m) +} +func (m *OneofOptions) XXX_DiscardUnknown() { + xxx_messageInfo_OneofOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofOptions proto.InternalMessageInfo func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { if m != nil { @@ -1422,14 +1865,18 @@ type EnumOptions struct { Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *EnumOptions) Reset() { *m = EnumOptions{} } -func (m *EnumOptions) String() string { return proto.CompactTextString(m) } -func (*EnumOptions) ProtoMessage() {} -func (*EnumOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{13} } +func (m *EnumOptions) Reset() { *m = EnumOptions{} } +func (m *EnumOptions) String() string { return proto.CompactTextString(m) } +func (*EnumOptions) ProtoMessage() {} +func (*EnumOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{14} +} var extRange_EnumOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1438,6 +1885,23 @@ var extRange_EnumOptions = []proto.ExtensionRange{ func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_EnumOptions } +func (m *EnumOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumOptions.Unmarshal(m, b) +} +func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic) +} +func (dst *EnumOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumOptions.Merge(dst, src) +} +func (m *EnumOptions) XXX_Size() int { + return xxx_messageInfo_EnumOptions.Size(m) +} +func (m *EnumOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumOptions proto.InternalMessageInfo const Default_EnumOptions_Deprecated bool = false @@ -1470,14 +1934,18 @@ type EnumValueOptions struct { Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } -func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } -func (*EnumValueOptions) ProtoMessage() {} -func (*EnumValueOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{14} } +func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } +func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } +func (*EnumValueOptions) ProtoMessage() {} +func (*EnumValueOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{15} +} var extRange_EnumValueOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1486,6 +1954,23 @@ var extRange_EnumValueOptions = []proto.ExtensionRange{ func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_EnumValueOptions } +func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b) +} +func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic) +} +func (dst *EnumValueOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueOptions.Merge(dst, src) +} +func (m *EnumValueOptions) XXX_Size() int { + return xxx_messageInfo_EnumValueOptions.Size(m) +} +func (m *EnumValueOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueOptions proto.InternalMessageInfo const Default_EnumValueOptions_Deprecated bool = false @@ -1511,14 +1996,18 @@ type ServiceOptions struct { Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } -func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } -func (*ServiceOptions) ProtoMessage() {} -func (*ServiceOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{15} } +func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } +func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } +func (*ServiceOptions) ProtoMessage() {} +func (*ServiceOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{16} +} var extRange_ServiceOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1527,6 +2016,23 @@ var extRange_ServiceOptions = []proto.ExtensionRange{ func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_ServiceOptions } +func (m *ServiceOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceOptions.Unmarshal(m, b) +} +func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic) +} +func (dst *ServiceOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceOptions.Merge(dst, src) +} +func (m *ServiceOptions) XXX_Size() int { + return xxx_messageInfo_ServiceOptions.Size(m) +} +func (m *ServiceOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceOptions proto.InternalMessageInfo const Default_ServiceOptions_Deprecated bool = false @@ -1553,14 +2059,18 @@ type MethodOptions struct { IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` proto.XXX_InternalExtensions `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *MethodOptions) Reset() { *m = MethodOptions{} } -func (m *MethodOptions) String() string { return proto.CompactTextString(m) } -func (*MethodOptions) ProtoMessage() {} -func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{16} } +func (m *MethodOptions) Reset() { *m = MethodOptions{} } +func (m *MethodOptions) String() string { return proto.CompactTextString(m) } +func (*MethodOptions) ProtoMessage() {} +func (*MethodOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{17} +} var extRange_MethodOptions = []proto.ExtensionRange{ {Start: 1000, End: 536870911}, @@ -1569,6 +2079,23 @@ var extRange_MethodOptions = []proto.ExtensionRange{ func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { return extRange_MethodOptions } +func (m *MethodOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodOptions.Unmarshal(m, b) +} +func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic) +} +func (dst *MethodOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodOptions.Merge(dst, src) +} +func (m *MethodOptions) XXX_Size() int { + return xxx_messageInfo_MethodOptions.Size(m) +} +func (m *MethodOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MethodOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodOptions proto.InternalMessageInfo const Default_MethodOptions_Deprecated bool = false const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN @@ -1604,19 +2131,40 @@ type UninterpretedOption struct { Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` // The value of the uninterpreted option, in whatever type the tokenizer // identified it as during parsing. Exactly one of these should be set. - IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` - PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` - NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` - DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` - StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` - AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` - XXX_unrecognized []byte `json:"-"` + IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` + PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` + NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` + StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } -func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } -func (*UninterpretedOption) ProtoMessage() {} -func (*UninterpretedOption) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{17} } +func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } +func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption) ProtoMessage() {} +func (*UninterpretedOption) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{18} +} +func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b) +} +func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic) +} +func (dst *UninterpretedOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption.Merge(dst, src) +} +func (m *UninterpretedOption) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption.Size(m) +} +func (m *UninterpretedOption) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption.DiscardUnknown(m) +} + +var xxx_messageInfo_UninterpretedOption proto.InternalMessageInfo func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { if m != nil { @@ -1673,18 +2221,37 @@ func (m *UninterpretedOption) GetAggregateValue() string { // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents // "foo.(bar.baz).qux". type UninterpretedOption_NamePart struct { - NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` - IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` - XXX_unrecognized []byte `json:"-"` + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } func (*UninterpretedOption_NamePart) ProtoMessage() {} func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{17, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{18, 0} +} +func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b) +} +func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic) +} +func (dst *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption_NamePart.Merge(dst, src) +} +func (m *UninterpretedOption_NamePart) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption_NamePart.Size(m) +} +func (m *UninterpretedOption_NamePart) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption_NamePart.DiscardUnknown(m) } +var xxx_messageInfo_UninterpretedOption_NamePart proto.InternalMessageInfo + func (m *UninterpretedOption_NamePart) GetNamePart() string { if m != nil && m.NamePart != nil { return *m.NamePart @@ -1745,14 +2312,35 @@ type SourceCodeInfo struct { // - Code which tries to interpret locations should probably be designed to // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. - Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` - XXX_unrecognized []byte `json:"-"` + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } +func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo) ProtoMessage() {} +func (*SourceCodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{19} +} +func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b) +} +func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic) +} +func (dst *SourceCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo.Merge(dst, src) +} +func (m *SourceCodeInfo) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo.Size(m) +} +func (m *SourceCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo.DiscardUnknown(m) } -func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } -func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } -func (*SourceCodeInfo) ProtoMessage() {} -func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{18} } +var xxx_messageInfo_SourceCodeInfo proto.InternalMessageInfo func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { if m != nil { @@ -1842,15 +2430,34 @@ type SourceCodeInfo_Location struct { LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } func (*SourceCodeInfo_Location) ProtoMessage() {} func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{18, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{19, 0} +} +func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b) +} +func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic) +} +func (dst *SourceCodeInfo_Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo_Location.Merge(dst, src) +} +func (m *SourceCodeInfo_Location) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo_Location.Size(m) } +func (m *SourceCodeInfo_Location) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceCodeInfo_Location proto.InternalMessageInfo func (m *SourceCodeInfo_Location) GetPath() []int32 { if m != nil { @@ -1893,14 +2500,35 @@ func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { type GeneratedCodeInfo struct { // An Annotation connects some span of text in generated code to an element // of its generating .proto file. - Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` - XXX_unrecognized []byte `json:"-"` + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } -func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } -func (*GeneratedCodeInfo) ProtoMessage() {} -func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{19} } +func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } +func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo) ProtoMessage() {} +func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{20} +} +func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic) +} +func (dst *GeneratedCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo.Merge(dst, src) +} +func (m *GeneratedCodeInfo) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo.Size(m) +} +func (m *GeneratedCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo proto.InternalMessageInfo func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { if m != nil { @@ -1921,16 +2549,35 @@ type GeneratedCodeInfo_Annotation struct { // Identifies the ending offset in bytes in the generated code that // relates to the identified offset. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). - End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` - XXX_unrecognized []byte `json:"-"` + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} } func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { - return fileDescriptorDescriptor, []int{19, 0} + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{20, 0} +} +func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic) +} +func (dst *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(dst, src) } +func (m *GeneratedCodeInfo_Annotation) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m) +} +func (m *GeneratedCodeInfo_Annotation) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo_Annotation.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo_Annotation proto.InternalMessageInfo func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 { if m != nil { @@ -1966,9 +2613,11 @@ func init() { proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") + proto.RegisterType((*ExtensionRangeOptions)(nil), "google.protobuf.ExtensionRangeOptions") proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") + proto.RegisterType((*EnumDescriptorProto_EnumReservedRange)(nil), "google.protobuf.EnumDescriptorProto.EnumReservedRange") proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") @@ -1994,157 +2643,164 @@ func init() { proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) } -func init() { proto.RegisterFile("descriptor.proto", fileDescriptorDescriptor) } - -var fileDescriptorDescriptor = []byte{ - // 2379 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x73, 0xdb, 0xc6, - 0x15, 0x37, 0xc1, 0x0f, 0x91, 0x8f, 0x14, 0xb5, 0x5a, 0x29, 0x36, 0x2c, 0xc7, 0xb1, 0xcc, 0xd8, - 0xb5, 0x6c, 0xb7, 0x74, 0x46, 0xfe, 0x88, 0xa3, 0x74, 0xd2, 0xa1, 0x48, 0x58, 0xa1, 0x4b, 0x91, - 0x2c, 0x48, 0x35, 0x76, 0x2e, 0x98, 0x15, 0xb0, 0xa4, 0x60, 0x83, 0x00, 0x02, 0x80, 0xb6, 0x95, - 0x93, 0x67, 0x7a, 0xea, 0x7f, 0xd0, 0xe9, 0x74, 0x7a, 0xc8, 0x25, 0x33, 0xed, 0xbd, 0x87, 0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, - 0xcb, 0x35, 0x2f, 0xe5, 0x39, 0xbf, 0x6a, 0x2d, 0x76, 0x52, 0x13, 0x01, 0xb6, 0x46, 0x00, 0x13, - 0xcb, 0xd2, 0xb2, 0x5d, 0x81, 0x62, 0x78, 0x73, 0xcf, 0x7f, 0xfe, 0x11, 0x9f, 0xb6, 0x20, 0x20, - 0xf6, 0x45, 0x83, 0x37, 0x21, 0x7b, 0x4c, 0x87, 0xa6, 0x1d, 0xde, 0x27, 0x8a, 0x41, 0x74, 0x4b, - 0x99, 0x89, 0x6f, 0x29, 0xf7, 0x9f, 0xc0, 0x86, 0xee, 0x8c, 0x66, 0xd3, 0xdd, 0x47, 0x33, 0x9f, - 0xd7, 0xfe, 0xe7, 0xa9, 0x2f, 0x61, 0xd2, 0x62, 0x7e, 0x23, 0xa5, 0x0f, 0xba, 0xfb, 0x7f, 0x92, - 0xb6, 0x0e, 0x84, 0x5f, 0x37, 0x9a, 0xa6, 0x4a, 0x07, 0x16, 0xd5, 0x59, 0xea, 0xff, 0x0f, 0x00, - 0x00, 0xff, 0xff, 0xa0, 0xbf, 0x63, 0x15, 0xd3, 0x1a, 0x00, 0x00, +func init() { proto.RegisterFile("descriptor.proto", fileDescriptor_descriptor_9588782fb9cbecd6) } + +var fileDescriptor_descriptor_9588782fb9cbecd6 = []byte{ + // 2487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x5f, 0x7d, 0x5a, 0x7a, 0x92, 0xe5, 0xf1, 0xd8, 0x9b, 0x30, 0xde, 0x8f, 0x38, 0xda, 0x8f, + 0x38, 0x49, 0xab, 0x2c, 0x9c, 0xc4, 0xc9, 0x3a, 0xc5, 0xb6, 0xb2, 0xc4, 0x78, 0x95, 0xca, 0x92, + 0x4a, 0xc9, 0xdd, 0x64, 0x8b, 0x82, 0x18, 0x93, 0x23, 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, 0x39, 0xf8, 0x19, 0x6c, + 0x68, 0xf6, 0x68, 0xd6, 0xdd, 0x03, 0x34, 0x73, 0xcd, 0xf7, 0x3e, 0x4f, 0x7c, 0x09, 0x93, 0x16, + 0xf3, 0x7f, 0x89, 0xc4, 0xef, 0x93, 0xa9, 0xc3, 0xce, 0xc1, 0x1f, 0x92, 0x5b, 0x87, 0x42, 0xb5, + 0x13, 0xce, 0x54, 0xa1, 0x7d, 0x93, 0x6a, 0xcc, 0xfb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa3, + 0x58, 0x22, 0x30, 0xdf, 0x1c, 0x00, 0x00, } diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go index bac9913e0..ec6eb168d 100644 --- a/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go @@ -1,35 +1,6 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: descriptor.proto -// DO NOT EDIT! -/* -Package descriptor is a generated protocol buffer package. - -It is generated from these files: - descriptor.proto - -It has these top-level messages: - FileDescriptorSet - FileDescriptorProto - DescriptorProto - FieldDescriptorProto - OneofDescriptorProto - EnumDescriptorProto - EnumValueDescriptorProto - ServiceDescriptorProto - MethodDescriptorProto - FileOptions - MessageOptions - FieldOptions - OneofOptions - EnumOptions - EnumValueOptions - ServiceOptions - MethodOptions - UninterpretedOption - SourceCodeInfo - GeneratedCodeInfo -*/ package descriptor import fmt "fmt" @@ -155,7 +126,7 @@ func (this *DescriptorProto_ExtensionRange) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 6) + s := make([]string, 0, 7) s = append(s, "&descriptor.DescriptorProto_ExtensionRange{") if this.Start != nil { s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") @@ -163,6 +134,9 @@ func (this *DescriptorProto_ExtensionRange) GoString() string { if this.End != nil { s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -187,6 +161,22 @@ func (this *DescriptorProto_ReservedRange) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *ExtensionRangeOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.ExtensionRangeOptions{") + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} func (this *FieldDescriptorProto) GoString() string { if this == nil { return "nil" @@ -200,10 +190,10 @@ func (this *FieldDescriptorProto) GoString() string { s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") } if this.Label != nil { - s = append(s, "Label: "+valueToGoStringDescriptor(this.Label, "descriptor.FieldDescriptorProto_Label")+",\n") + s = append(s, "Label: "+valueToGoStringDescriptor(this.Label, "FieldDescriptorProto_Label")+",\n") } if this.Type != nil { - s = append(s, "Type: "+valueToGoStringDescriptor(this.Type, "descriptor.FieldDescriptorProto_Type")+",\n") + s = append(s, "Type: "+valueToGoStringDescriptor(this.Type, "FieldDescriptorProto_Type")+",\n") } if this.TypeName != nil { s = append(s, "TypeName: "+valueToGoStringDescriptor(this.TypeName, "string")+",\n") @@ -251,7 +241,7 @@ func (this *EnumDescriptorProto) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 9) s = append(s, "&descriptor.EnumDescriptorProto{") if this.Name != nil { s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") @@ -262,6 +252,30 @@ func (this *EnumDescriptorProto) GoString() string { if this.Options != nil { s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") } + if this.ReservedRange != nil { + s = append(s, "ReservedRange: "+fmt.Sprintf("%#v", this.ReservedRange)+",\n") + } + if this.ReservedName != nil { + s = append(s, "ReservedName: "+fmt.Sprintf("%#v", this.ReservedName)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumDescriptorProto_EnumReservedRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.EnumDescriptorProto_EnumReservedRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } if this.XXX_unrecognized != nil { s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") } @@ -344,7 +358,7 @@ func (this *FileOptions) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 20) + s := make([]string, 0, 23) s = append(s, "&descriptor.FileOptions{") if this.JavaPackage != nil { s = append(s, "JavaPackage: "+valueToGoStringDescriptor(this.JavaPackage, "string")+",\n") @@ -362,7 +376,7 @@ func (this *FileOptions) GoString() string { s = append(s, "JavaStringCheckUtf8: "+valueToGoStringDescriptor(this.JavaStringCheckUtf8, "bool")+",\n") } if this.OptimizeFor != nil { - s = append(s, "OptimizeFor: "+valueToGoStringDescriptor(this.OptimizeFor, "descriptor.FileOptions_OptimizeMode")+",\n") + s = append(s, "OptimizeFor: "+valueToGoStringDescriptor(this.OptimizeFor, "FileOptions_OptimizeMode")+",\n") } if this.GoPackage != nil { s = append(s, "GoPackage: "+valueToGoStringDescriptor(this.GoPackage, "string")+",\n") @@ -376,6 +390,9 @@ func (this *FileOptions) GoString() string { if this.PyGenericServices != nil { s = append(s, "PyGenericServices: "+valueToGoStringDescriptor(this.PyGenericServices, "bool")+",\n") } + if this.PhpGenericServices != nil { + s = append(s, "PhpGenericServices: "+valueToGoStringDescriptor(this.PhpGenericServices, "bool")+",\n") + } if this.Deprecated != nil { s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") } @@ -391,6 +408,12 @@ func (this *FileOptions) GoString() string { if this.SwiftPrefix != nil { s = append(s, "SwiftPrefix: "+valueToGoStringDescriptor(this.SwiftPrefix, "string")+",\n") } + if this.PhpClassPrefix != nil { + s = append(s, "PhpClassPrefix: "+valueToGoStringDescriptor(this.PhpClassPrefix, "string")+",\n") + } + if this.PhpNamespace != nil { + s = append(s, "PhpNamespace: "+valueToGoStringDescriptor(this.PhpNamespace, "string")+",\n") + } if this.UninterpretedOption != nil { s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") } @@ -436,13 +459,13 @@ func (this *FieldOptions) GoString() string { s := make([]string, 0, 11) s = append(s, "&descriptor.FieldOptions{") if this.Ctype != nil { - s = append(s, "Ctype: "+valueToGoStringDescriptor(this.Ctype, "descriptor.FieldOptions_CType")+",\n") + s = append(s, "Ctype: "+valueToGoStringDescriptor(this.Ctype, "FieldOptions_CType")+",\n") } if this.Packed != nil { s = append(s, "Packed: "+valueToGoStringDescriptor(this.Packed, "bool")+",\n") } if this.Jstype != nil { - s = append(s, "Jstype: "+valueToGoStringDescriptor(this.Jstype, "descriptor.FieldOptions_JSType")+",\n") + s = append(s, "Jstype: "+valueToGoStringDescriptor(this.Jstype, "FieldOptions_JSType")+",\n") } if this.Lazy != nil { s = append(s, "Lazy: "+valueToGoStringDescriptor(this.Lazy, "bool")+",\n") @@ -549,7 +572,7 @@ func (this *MethodOptions) GoString() string { s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") } if this.IdempotencyLevel != nil { - s = append(s, "IdempotencyLevel: "+valueToGoStringDescriptor(this.IdempotencyLevel, "descriptor.MethodOptions_IdempotencyLevel")+",\n") + s = append(s, "IdempotencyLevel: "+valueToGoStringDescriptor(this.IdempotencyLevel, "MethodOptions_IdempotencyLevel")+",\n") } if this.UninterpretedOption != nil { s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go new file mode 100644 index 000000000..fb55e2720 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go @@ -0,0 +1,31 @@ +package descriptor_test + +import ( + "fmt" + "testing" + + tpb "github.com/gogo/protobuf/proto/test_proto" + "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func TestMessage(t *testing.T) { + var msg *descriptor.DescriptorProto + fd, md := descriptor.ForMessage(msg) + if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want { + t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want) + } + if name, want := md.GetName(), "DescriptorProto"; name != want { + t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want) + } +} + +func Example_options() { + var msg *tpb.MyMessageSet + _, md := descriptor.ForMessage(msg) + if md.GetOptions().GetMessageSetWireFormat() { + fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName()) + } + + // Output: + // MyMessageSet uses option message_set_wire_format. +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/doc.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/doc.go new file mode 100644 index 000000000..15c7cf43c --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/doc.go @@ -0,0 +1,51 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* + A plugin for the Google protocol buffer compiler to generate Go code. + Run it by building this program and putting it in your path with the name + protoc-gen-gogo + That word 'gogo' at the end becomes part of the option string set for the + protocol compiler, so once the protocol compiler (protoc) is installed + you can run + protoc --gogo_out=output_directory input_directory/file.proto + to generate Go bindings for the protocol defined by file.proto. + With that input, the output will be written to + output_directory/go_package/file.pb.go + + The generated code is documented in the package comment for + the library. + + See the README and documentation for protocol buffers to learn more: + https://developers.google.com/protocol-buffers/ + +*/ +package documentation diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go index a40dda233..d9bd66060 100644 --- a/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go @@ -45,7 +45,10 @@ import ( "bufio" "bytes" "compress/gzip" + "crypto/sha256" + "encoding/hex" "fmt" + "go/build" "go/parser" "go/printer" "go/token" @@ -61,6 +64,7 @@ import ( "github.com/gogo/protobuf/gogoproto" "github.com/gogo/protobuf/proto" descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap" plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" ) @@ -108,6 +112,14 @@ func RegisterPlugin(p Plugin) { plugins = append(plugins, p) } +// A GoImportPath is the import path of a Go package. e.g., "google.golang.org/genproto/protobuf". +type GoImportPath string + +func (p GoImportPath) String() string { return strconv.Quote(string(p)) } + +// A GoPackageName is the name of a Go package. e.g., "protobuf". +type GoPackageName string + // Each type we import as a protocol buffer (other than FileDescriptorProto) needs // a pointer to the FileDescriptorProto that represents it. These types achieve that // wrapping by placing each Proto inside a struct with the pointer to its File. The @@ -116,19 +128,21 @@ func RegisterPlugin(p Plugin) { // The file and package name method are common to messages and enums. type common struct { - file *descriptor.FileDescriptorProto // File this object comes from. + file *FileDescriptor // File this object comes from. } -// PackageName is name in the package clause in the generated file. -func (c *common) PackageName() string { return uniquePackageOf(c.file) } +// GoImportPath is the import path of the Go package containing the type. +func (c *common) GoImportPath() GoImportPath { + return c.file.importPath +} -func (c *common) File() *descriptor.FileDescriptorProto { return c.file } +func (c *common) File() *FileDescriptor { return c.file } func fileIsProto3(file *descriptor.FileDescriptorProto) bool { return file.GetSyntax() == "proto3" } -func (c *common) proto3() bool { return fileIsProto3(c.file) } +func (c *common) proto3() bool { return fileIsProto3(c.file.FileDescriptorProto) } // Descriptor represents a protocol buffer message. type Descriptor struct { @@ -154,7 +168,7 @@ func (d *Descriptor) TypeName() []string { for parent := d; parent != nil; parent = parent.parent { n++ } - s := make([]string, n, n) + s := make([]string, n) for parent := d; parent != nil; parent = parent.parent { n-- s[n] = parent.GetName() @@ -292,77 +306,61 @@ type FileDescriptor struct { // This is used for supporting public imports. exported map[Object][]symbol - index int // The index of this file in the list of files to generate code for + fingerprint string // Fingerprint of this file's contents. + importPath GoImportPath // Import path of this file's package. + packageName GoPackageName // Name of this file's Go package. proto3 bool // whether to generate proto3 code for this file } -// PackageName is the package name we'll use in the generated code to refer to this file. -func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) } - // VarName is the variable name we'll use in the generated code to refer // to the compressed bytes of this descriptor. It is not exported, so // it is only valid inside the generated package. -func (d *FileDescriptor) VarName() string { return fmt.Sprintf("fileDescriptor%v", FileName(d)) } +func (d *FileDescriptor) VarName() string { + name := strings.Map(badToUnderscore, baseName(d.GetName())) + return fmt.Sprintf("fileDescriptor_%s_%s", name, d.fingerprint) +} // goPackageOption interprets the file's go_package option. // If there is no go_package, it returns ("", "", false). // If there's a simple name, it returns ("", pkg, true). // If the option implies an import path, it returns (impPath, pkg, true). -func (d *FileDescriptor) goPackageOption() (impPath, pkg string, ok bool) { - pkg = d.GetOptions().GetGoPackage() - if pkg == "" { - return - } - ok = true - // The presence of a slash implies there's an import path. - slash := strings.LastIndex(pkg, "/") - if slash < 0 { - return - } - impPath, pkg = pkg, pkg[slash+1:] - // A semicolon-delimited suffix overrides the package name. - sc := strings.IndexByte(impPath, ';') - if sc < 0 { - return +func (d *FileDescriptor) goPackageOption() (impPath GoImportPath, pkg GoPackageName, ok bool) { + opt := d.GetOptions().GetGoPackage() + if opt == "" { + return "", "", false } - impPath, pkg = impPath[:sc], impPath[sc+1:] - return -} - -// goPackageName returns the Go package name to use in the -// generated Go file. The result explicit reports whether the name -// came from an option go_package statement. If explicit is false, -// the name was derived from the protocol buffer's package statement -// or the input file name. -func (d *FileDescriptor) goPackageName() (name string, explicit bool) { - // Does the file have a "go_package" option? - if _, pkg, ok := d.goPackageOption(); ok { - return pkg, true + // A semicolon-delimited suffix delimits the import path and package name. + sc := strings.Index(opt, ";") + if sc >= 0 { + return GoImportPath(opt[:sc]), cleanPackageName(opt[sc+1:]), true } - - // Does the file have a package clause? - if pkg := d.GetPackage(); pkg != "" { - return pkg, false + // The presence of a slash implies there's an import path. + slash := strings.LastIndex(opt, "/") + if slash >= 0 { + return GoImportPath(opt), cleanPackageName(opt[slash+1:]), true } - // Use the file base name. - return baseName(d.GetName()), false + return "", cleanPackageName(opt), true } // goFileName returns the output name for the generated Go file. -func (d *FileDescriptor) goFileName() string { +func (d *FileDescriptor) goFileName(pathType pathType) string { name := *d.Name if ext := path.Ext(name); ext == ".proto" || ext == ".protodevel" { name = name[:len(name)-len(ext)] } name += ".pb.go" + if pathType == pathTypeSourceRelative { + return name + } + // Does the file have a "go_package" option? // If it does, it may override the filename. if impPath, _, ok := d.goPackageOption(); ok && impPath != "" { // Replace the existing dirname with the declared import path. _, name = path.Split(name) - name = path.Join(impPath, name) + name = path.Join(string(impPath), name) return name } @@ -377,14 +375,13 @@ func (d *FileDescriptor) addExport(obj Object, sym symbol) { type symbol interface { // GenerateAlias should generate an appropriate alias // for the symbol from the named package. - GenerateAlias(g *Generator, pkg string) + GenerateAlias(g *Generator, pkg GoPackageName) } type messageSymbol struct { sym string hasExtensions, isMessageSet bool - hasOneof bool - getters []getterSymbol + oneofTypes []string } type getterSymbol struct { @@ -394,144 +391,11 @@ type getterSymbol struct { genType bool // whether typ contains a generated type (message/group/enum) } -func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) { - remoteSym := pkg + "." + ms.sym - - g.P("type ", ms.sym, " ", remoteSym) - g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }") - g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }") - g.P("func (*", ms.sym, ") ProtoMessage() {}") - if ms.hasExtensions { - g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ", - "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }") - if ms.isMessageSet { - g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ", - "{ return (*", remoteSym, ")(m).Marshal() }") - g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ", - "{ return (*", remoteSym, ")(m).Unmarshal(buf) }") - } - } - if ms.hasOneof { - // Oneofs and public imports do not mix well. - // We can make them work okay for the binary format, - // but they're going to break weirdly for text/JSON. - enc := "_" + ms.sym + "_OneofMarshaler" - dec := "_" + ms.sym + "_OneofUnmarshaler" - size := "_" + ms.sym + "_OneofSizer" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - sizeSig := "(msg " + g.Pkg["proto"] + ".Message) int" - g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", ", size, ", nil") - g.P("}") - - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("enc, _, _, _ := m0.XXX_OneofFuncs()") - g.P("return enc(m0, b)") - g.P("}") - - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("_, dec, _, _ := m0.XXX_OneofFuncs()") - g.P("return dec(m0, tag, wire, b)") - g.P("}") - - g.P("func ", size, sizeSig, " {") - g.P("m := msg.(*", ms.sym, ")") - g.P("m0 := (*", remoteSym, ")(m)") - g.P("_, _, size, _ := m0.XXX_OneofFuncs()") - g.P("return size(m0)") - g.P("}") - } - for _, get := range ms.getters { - - if get.typeName != "" { - g.RecordTypeUse(get.typeName) - } - typ := get.typ - val := "(*" + remoteSym + ")(m)." + get.name + "()" - if get.genType { - // typ will be "*pkg.T" (message/group) or "pkg.T" (enum) - // or "map[t]*pkg.T" (map to message/enum). - // The first two of those might have a "[]" prefix if it is repeated. - // Drop any package qualifier since we have hoisted the type into this package. - rep := strings.HasPrefix(typ, "[]") - if rep { - typ = typ[2:] - } - isMap := strings.HasPrefix(typ, "map[") - star := typ[0] == '*' - if !isMap { // map types handled lower down - typ = typ[strings.Index(typ, ".")+1:] - } - if star { - typ = "*" + typ - } - if rep { - // Go does not permit conversion between slice types where both - // element types are named. That means we need to generate a bit - // of code in this situation. - // typ is the element type. - // val is the expression to get the slice from the imported type. - - ctyp := typ // conversion type expression; "Foo" or "(*Foo)" - if star { - ctyp = "(" + typ + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {") - g.In() - g.P("o := ", val) - g.P("if o == nil {") - g.In() - g.P("return nil") - g.Out() - g.P("}") - g.P("s := make([]", typ, ", len(o))") - g.P("for i, x := range o {") - g.In() - g.P("s[i] = ", ctyp, "(x)") - g.Out() - g.P("}") - g.P("return s") - g.Out() - g.P("}") - continue - } - if isMap { - // Split map[keyTyp]valTyp. - bra, ket := strings.Index(typ, "["), strings.Index(typ, "]") - keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:] - // Drop any package qualifier. - // Only the value type may be foreign. - star := valTyp[0] == '*' - valTyp = valTyp[strings.Index(valTyp, ".")+1:] - if star { - valTyp = "*" + valTyp - } - - maptyp := "map[" + keyTyp + "]" + valTyp - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {") - g.P("o := ", val) - g.P("if o == nil { return nil }") - g.P("s := make(", maptyp, ", len(o))") - g.P("for k, v := range o {") - g.P("s[k] = (", valTyp, ")(v)") - g.P("}") - g.P("return s") - g.P("}") - continue - } - // Convert imported type into the forwarding type. - val = "(" + typ + ")(" + val + ")" - } - - g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }") +func (ms *messageSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { + g.P("type ", ms.sym, " = ", pkg, ".", ms.sym) + for _, name := range ms.oneofTypes { + g.P("type ", name, " = ", pkg, ".", name) } - } type enumSymbol struct { @@ -539,16 +403,11 @@ type enumSymbol struct { proto3 bool // Whether this came from a proto3 file. } -func (es enumSymbol) GenerateAlias(g *Generator, pkg string) { +func (es enumSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { s := es.name - g.P("type ", s, " ", pkg, ".", s) + g.P("type ", s, " = ", pkg, ".", s) g.P("var ", s, "_name = ", pkg, ".", s, "_name") g.P("var ", s, "_value = ", pkg, ".", s, "_value") - g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }") - if !es.proto3 { - g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }") - g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }") - } } type constOrVarSymbol struct { @@ -557,8 +416,8 @@ type constOrVarSymbol struct { cast string // if non-empty, a type cast is required (used for enums) } -func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) { - v := pkg + "." + cs.sym +func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { + v := string(pkg) + "." + cs.sym if cs.cast != "" { v = cs.cast + "(" + v + ")" } @@ -567,21 +426,9 @@ func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) { // Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects. type Object interface { - PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness. + GoImportPath() GoImportPath TypeName() []string - File() *descriptor.FileDescriptorProto -} - -// Each package name we generate must be unique. The package we're generating -// gets its own name but every other package must have a unique name that does -// not conflict in the code we generate. These names are chosen globally (although -// they don't have to be, it simplifies things to do them globally). -func uniquePackageOf(fd *descriptor.FileDescriptorProto) string { - s, ok := uniquePackageName[fd] - if !ok { - log.Fatal("internal error: no package name defined for " + fd.GetName()) - } - return s + File() *FileDescriptor } // Generator is the type whose methods generate the output, stored in the associated response structure. @@ -598,21 +445,33 @@ type Generator struct { Pkg map[string]string // The names under which we import support packages - packageName string // What we're calling ourselves. - allFiles []*FileDescriptor // All files in the tree - allFilesByName map[string]*FileDescriptor // All files by filename. - genFiles []*FileDescriptor // Those files we will generate output for. - file *FileDescriptor // The file we are compiling now. - usedPackages map[string]bool // Names of packages used in current file. - typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. - init []string // Lines to emit in the init function. + outputImportPath GoImportPath // Package we're generating code for. + allFiles []*FileDescriptor // All files in the tree + allFilesByName map[string]*FileDescriptor // All files by filename. + genFiles []*FileDescriptor // Those files we will generate output for. + file *FileDescriptor // The file we are compiling now. + packageNames map[GoImportPath]GoPackageName // Imported package names in the current file. + usedPackages map[GoImportPath]bool // Packages used in current file. + usedPackageNames map[GoPackageName]bool // Package names used in the current file. + typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. + init []string // Lines to emit in the init function. indent string + pathType pathType // How to generate output filenames. writeOutput bool + annotateCode bool // whether to store annotations + annotations []*descriptor.GeneratedCodeInfo_Annotation // annotations to store customImports []string writtenImports map[string]bool // For de-duplicating written imports } +type pathType int + +const ( + pathTypeImport pathType = iota + pathTypeSourceRelative +) + // New creates a new generator and allocates the request and response protobufs. func New() *Generator { g := new(Generator) @@ -620,8 +479,6 @@ func New() *Generator { g.Request = new(plugin.CodeGeneratorRequest) g.Response = new(plugin.CodeGeneratorResponse) g.writtenImports = make(map[string]bool) - uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) - pkgNamesInUse = make(map[string][]*FileDescriptor) return g } @@ -660,8 +517,21 @@ func (g *Generator) CommandLineParameters(parameter string) { g.ImportPrefix = v case "import_path": g.PackageImportPath = v + case "paths": + switch v { + case "import": + g.pathType = pathTypeImport + case "source_relative": + g.pathType = pathTypeSourceRelative + default: + g.Fail(fmt.Sprintf(`Unknown path type %q: want "import" or "source_relative".`, v)) + } case "plugins": pluginList = v + case "annotate_code": + if v == "true" { + g.annotateCode = true + } default: if len(k) > 0 && k[0] == 'M' { g.ImportMap[k[1:]] = v @@ -697,49 +567,48 @@ func (g *Generator) CommandLineParameters(parameter string) { // If its file is in a different package, it returns the package name we're using for this file, plus ".". // Otherwise it returns the empty string. func (g *Generator) DefaultPackageName(obj Object) string { - pkg := obj.PackageName() - if pkg == g.packageName { + importPath := obj.GoImportPath() + if importPath == g.outputImportPath { return "" } - return pkg + "." + return string(g.GoPackageName(importPath)) + "." } -// For each input file, the unique package name to use, underscored. -var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string) - -// Package names already registered. Key is the name from the .proto file; -// value is the name that appears in the generated code. -var pkgNamesInUse = make(map[string][]*FileDescriptor) - -// Create and remember a guaranteed unique package name for this file descriptor. -// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and -// has no file descriptor. -func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { - // Convert dots to underscores before finding a unique alias. - pkg = strings.Map(badToUnderscore, pkg) - - var i = -1 - var ptr *FileDescriptor = nil - for i, ptr = range pkgNamesInUse[pkg] { - if ptr == f { - if i == 0 { - return pkg - } - return pkg + strconv.Itoa(i) - } +// GoPackageName returns the name used for a package. +func (g *Generator) GoPackageName(importPath GoImportPath) GoPackageName { + if name, ok := g.packageNames[importPath]; ok { + return name } - - pkgNamesInUse[pkg] = append(pkgNamesInUse[pkg], f) - i += 1 - - if i > 0 { - pkg = pkg + strconv.Itoa(i) + name := cleanPackageName(baseName(string(importPath))) + for i, orig := 1, name; g.usedPackageNames[name]; i++ { + name = orig + GoPackageName(strconv.Itoa(i)) } + if g.packageNames == nil { + g.packageNames = make(map[GoImportPath]GoPackageName) + } + g.packageNames[importPath] = name + if g.usedPackageNames == nil { + g.usedPackageNames = make(map[GoPackageName]bool) + } + g.usedPackageNames[name] = true + return name +} + +var globalPackageNames = map[GoPackageName]bool{ + "fmt": true, + "math": true, + "proto": true, +} - if f != nil { - uniquePackageName[f.FileDescriptorProto] = pkg +// Create and remember a guaranteed unique package name. Pkg is the candidate name. +// The FileDescriptor parameter is unused. +func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { + name := cleanPackageName(pkg) + for i, orig := 1, name; globalPackageNames[name]; i++ { + name = orig + GoPackageName(strconv.Itoa(i)) } - return pkg + globalPackageNames[name] = true + return string(name) } var isGoKeyword = map[string]bool{ @@ -770,98 +639,84 @@ var isGoKeyword = map[string]bool{ "var": true, } +func cleanPackageName(name string) GoPackageName { + name = strings.Map(badToUnderscore, name) + // Identifier must not be keyword: insert _. + if isGoKeyword[name] { + name = "_" + name + } + // Identifier must not begin with digit: insert _. + if r, _ := utf8.DecodeRuneInString(name); unicode.IsDigit(r) { + name = "_" + name + } + return GoPackageName(name) +} + // defaultGoPackage returns the package name to use, // derived from the import path of the package we're building code for. -func (g *Generator) defaultGoPackage() string { +func (g *Generator) defaultGoPackage() GoPackageName { p := g.PackageImportPath if i := strings.LastIndex(p, "/"); i >= 0 { p = p[i+1:] } - if p == "" { - return "" - } - - p = strings.Map(badToUnderscore, p) - // Identifier must not be keyword: insert _. - if isGoKeyword[p] { - p = "_" + p - } - // Identifier must not begin with digit: insert _. - if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) { - p = "_" + p - } - return p + return cleanPackageName(p) } // SetPackageNames sets the package name for this run. // The package name must agree across all files being generated. // It also defines unique package names for all imported files. func (g *Generator) SetPackageNames() { - // Register the name for this package. It will be the first name - // registered so is guaranteed to be unmodified. - pkg, explicit := g.genFiles[0].goPackageName() + g.outputImportPath = g.genFiles[0].importPath - // Check all files for an explicit go_package option. + defaultPackageNames := make(map[GoImportPath]GoPackageName) for _, f := range g.genFiles { - thisPkg, thisExplicit := f.goPackageName() - if thisExplicit { - if !explicit { - // Let this file's go_package option serve for all input files. - pkg, explicit = thisPkg, true - } else if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } + if _, p, ok := f.goPackageOption(); ok { + defaultPackageNames[f.importPath] = p } } - - // If we don't have an explicit go_package option but we have an - // import path, use that. - if !explicit { - p := g.defaultGoPackage() - if p != "" { - pkg, explicit = p, true + for _, f := range g.genFiles { + if _, p, ok := f.goPackageOption(); ok { + // Source file: option go_package = "quux/bar"; + f.packageName = p + } else if p, ok := defaultPackageNames[f.importPath]; ok { + // A go_package option in another file in the same package. + // + // This is a poor choice in general, since every source file should + // contain a go_package option. Supported mainly for historical + // compatibility. + f.packageName = p + } else if p := g.defaultGoPackage(); p != "" { + // Command-line: import_path=quux/bar. + // + // The import_path flag sets a package name for files which don't + // contain a go_package option. + f.packageName = p + } else if p := f.GetPackage(); p != "" { + // Source file: package quux.bar; + f.packageName = cleanPackageName(p) + } else { + // Source filename. + f.packageName = cleanPackageName(baseName(f.GetName())) } } - // If there was no go_package and no import path to use, - // double-check that all the inputs have the same implicit - // Go package name. - if !explicit { - for _, f := range g.genFiles { - thisPkg, _ := f.goPackageName() - if thisPkg != pkg { - g.Fail("inconsistent package names:", thisPkg, pkg) - } + // Check that all files have a consistent package name and import path. + for _, f := range g.genFiles[1:] { + if a, b := g.genFiles[0].importPath, f.importPath; a != b { + g.Fail(fmt.Sprintf("inconsistent package import paths: %v, %v", a, b)) + } + if a, b := g.genFiles[0].packageName, f.packageName; a != b { + g.Fail(fmt.Sprintf("inconsistent package names: %v, %v", a, b)) } } - g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0]) - - // Register the support package names. They might collide with the - // name of a package we import. + // Names of support packages. These never vary (if there are conflicts, + // we rename the conflicting package), so this could be removed someday. g.Pkg = map[string]string{ - "fmt": RegisterUniquePackageName("fmt", nil), - "math": RegisterUniquePackageName("math", nil), - "proto": RegisterUniquePackageName("proto", nil), - "golang_proto": RegisterUniquePackageName("golang_proto", nil), - } - -AllFiles: - for _, f := range g.allFiles { - for _, genf := range g.genFiles { - if f == genf { - // In this package already. - uniquePackageName[f.FileDescriptorProto] = g.packageName - continue AllFiles - } - } - // The file is a dependency, so we want to ignore its go_package option - // because that is only relevant for its specific generated output. - pkg := f.GetPackage() - if pkg == "" { - pkg = baseName(*f.Name) - } - RegisterUniquePackageName(pkg, f) + "fmt": "fmt", + "math": "math", + "proto": "proto", + "golang_proto": "golang_proto", } } @@ -871,27 +726,51 @@ AllFiles: func (g *Generator) WrapTypes() { g.allFiles = make([]*FileDescriptor, 0, len(g.Request.ProtoFile)) g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles)) + genFileNames := make(map[string]bool) + for _, n := range g.Request.FileToGenerate { + genFileNames[n] = true + } for _, f := range g.Request.ProtoFile { - // We must wrap the descriptors before we wrap the enums - descs := wrapDescriptors(f) - g.buildNestedDescriptors(descs) - enums := wrapEnumDescriptors(f, descs) - g.buildNestedEnums(descs, enums) - exts := wrapExtensions(f) fd := &FileDescriptor{ FileDescriptorProto: f, - desc: descs, - enum: enums, - ext: exts, exported: make(map[Object][]symbol), proto3: fileIsProto3(f), } + // The import path may be set in a number of ways. + if substitution, ok := g.ImportMap[f.GetName()]; ok { + // Command-line: M=foo.proto=quux/bar. + // + // Explicit mapping of source file to import path. + fd.importPath = GoImportPath(substitution) + } else if genFileNames[f.GetName()] && g.PackageImportPath != "" { + // Command-line: import_path=quux/bar. + // + // The import_path flag sets the import path for every file that + // we generate code for. + fd.importPath = GoImportPath(g.PackageImportPath) + } else if p, _, _ := fd.goPackageOption(); p != "" { + // Source file: option go_package = "quux/bar"; + // + // The go_package option sets the import path. Most users should use this. + fd.importPath = p + } else { + // Source filename. + // + // Last resort when nothing else is available. + fd.importPath = GoImportPath(path.Dir(f.GetName())) + } + // We must wrap the descriptors before we wrap the enums + fd.desc = wrapDescriptors(fd) + g.buildNestedDescriptors(fd.desc) + fd.enum = wrapEnumDescriptors(fd, fd.desc) + g.buildNestedEnums(fd.desc, fd.enum) + fd.ext = wrapExtensions(fd) extractComments(fd) g.allFiles = append(g.allFiles, fd) g.allFilesByName[f.GetName()] = fd } for _, fd := range g.allFiles { - fd.imp = wrapImported(fd.FileDescriptorProto, g) + fd.imp = wrapImported(fd, g) } g.genFiles = make([]*FileDescriptor, 0, len(g.Request.FileToGenerate)) @@ -900,11 +779,27 @@ func (g *Generator) WrapTypes() { if fd == nil { g.Fail("could not find file named", fileName) } - fd.index = len(g.genFiles) + fingerprint, err := fingerprintProto(fd.FileDescriptorProto) + if err != nil { + g.Error(err) + } + fd.fingerprint = fingerprint g.genFiles = append(g.genFiles, fd) } } +// fingerprintProto returns a fingerprint for a message. +// The fingerprint is intended to prevent conflicts between generated fileds, +// not to provide cryptographic security. +func fingerprintProto(m proto.Message) (string, error) { + b, err := proto.Marshal(m) + if err != nil { + return "", err + } + h := sha256.Sum256(b) + return hex.EncodeToString(h[:8]), nil +} + // Scan the descriptors in this file. For each one, build the slice of nested descriptors func (g *Generator) buildNestedDescriptors(descs []*Descriptor) { for _, desc := range descs { @@ -937,7 +832,7 @@ func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescripto } // Construct the Descriptor -func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor { +func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *FileDescriptor, index int) *Descriptor { d := &Descriptor{ common: common{file}, DescriptorProto: desc, @@ -974,7 +869,7 @@ func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *d } // Return a slice of all the Descriptors defined within this file -func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor { +func wrapDescriptors(file *FileDescriptor) []*Descriptor { sl := make([]*Descriptor, 0, len(file.MessageType)+10) for i, desc := range file.MessageType { sl = wrapThisDescriptor(sl, desc, nil, file, i) @@ -983,7 +878,7 @@ func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor { } // Wrap this Descriptor, recursively -func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor { +func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *FileDescriptor, index int) []*Descriptor { sl = append(sl, newDescriptor(desc, parent, file, index)) me := sl[len(sl)-1] for i, nested := range desc.NestedType { @@ -993,7 +888,7 @@ func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, pare } // Construct the EnumDescriptor -func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor { +func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *FileDescriptor, index int) *EnumDescriptor { ed := &EnumDescriptor{ common: common{file}, EnumDescriptorProto: desc, @@ -1009,7 +904,7 @@ func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, } // Return a slice of all the EnumDescriptors defined within this file -func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor { +func wrapEnumDescriptors(file *FileDescriptor, descs []*Descriptor) []*EnumDescriptor { sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10) // Top-level enums. for i, enum := range file.EnumType { @@ -1025,7 +920,7 @@ func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descript } // Return a slice of all the top-level ExtensionDescriptors defined within this file. -func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor { +func wrapExtensions(file *FileDescriptor) []*ExtensionDescriptor { var sl []*ExtensionDescriptor for _, field := range file.Extension { sl = append(sl, &ExtensionDescriptor{common{file}, field, nil}) @@ -1034,7 +929,7 @@ func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor } // Return a slice of all the types that are publicly imported into this file. -func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) { +func wrapImported(file *FileDescriptor, g *Generator) (sl []*ImportedDescriptor) { for _, index := range file.PublicDependency { df := g.fileByName(file.Dependency[index]) for _, d := range df.desc { @@ -1134,35 +1029,84 @@ func (g *Generator) ObjectNamed(typeName string) Object { return o } +// AnnotatedAtoms is a list of atoms (as consumed by P) that records the file name and proto AST path from which they originated. +type AnnotatedAtoms struct { + source string + path string + atoms []interface{} +} + +// Annotate records the file name and proto AST path of a list of atoms +// so that a later call to P can emit a link from each atom to its origin. +func Annotate(file *FileDescriptor, path string, atoms ...interface{}) *AnnotatedAtoms { + return &AnnotatedAtoms{source: *file.Name, path: path, atoms: atoms} +} + +// printAtom prints the (atomic, non-annotation) argument to the generated output. +func (g *Generator) printAtom(v interface{}) { + switch v := v.(type) { + case string: + g.WriteString(v) + case *string: + g.WriteString(*v) + case bool: + fmt.Fprint(g, v) + case *bool: + fmt.Fprint(g, *v) + case int: + fmt.Fprint(g, v) + case *int32: + fmt.Fprint(g, *v) + case *int64: + fmt.Fprint(g, *v) + case float64: + fmt.Fprint(g, v) + case *float64: + fmt.Fprint(g, *v) + case GoPackageName: + g.WriteString(string(v)) + case GoImportPath: + g.WriteString(strconv.Quote(string(v))) + default: + g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) + } +} + // P prints the arguments to the generated output. It handles strings and int32s, plus -// handling indirections because they may be *string, etc. +// handling indirections because they may be *string, etc. Any inputs of type AnnotatedAtoms may emit +// annotations in a .meta file in addition to outputting the atoms themselves (if g.annotateCode +// is true). func (g *Generator) P(str ...interface{}) { if !g.writeOutput { return } g.WriteString(g.indent) for _, v := range str { - switch s := v.(type) { - case string: - g.WriteString(s) - case *string: - g.WriteString(*s) - case bool: - fmt.Fprintf(g, "%t", s) - case *bool: - fmt.Fprintf(g, "%t", *s) - case int: - fmt.Fprintf(g, "%d", s) - case *int32: - fmt.Fprintf(g, "%d", *s) - case *int64: - fmt.Fprintf(g, "%d", *s) - case float64: - fmt.Fprintf(g, "%g", s) - case *float64: - fmt.Fprintf(g, "%g", *s) + switch v := v.(type) { + case *AnnotatedAtoms: + begin := int32(g.Len()) + for _, v := range v.atoms { + g.printAtom(v) + } + if g.annotateCode { + end := int32(g.Len()) + var path []int32 + for _, token := range strings.Split(v.path, ",") { + val, err := strconv.ParseInt(token, 10, 32) + if err != nil { + g.Fail("could not parse proto AST path: ", err.Error()) + } + path = append(path, int32(val)) + } + g.annotations = append(g.annotations, &descriptor.GeneratedCodeInfo_Annotation{ + Path: path, + SourceFile: &v.source, + Begin: &begin, + End: &end, + }) + } default: - g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) + g.printAtom(v) } } g.WriteByte('\n') @@ -1174,8 +1118,8 @@ func (g *Generator) addInitf(stmt string, a ...interface{}) { g.init = append(g.init, fmt.Sprintf(stmt, a...)) } -func (g *Generator) PrintImport(alias, pkg string) { - statement := "import " + alias + " " + strconv.Quote(pkg) +func (g *Generator) PrintImport(alias GoPackageName, pkg GoImportPath) { + statement := "import " + string(alias) + " " + strconv.Quote(string(pkg)) if g.writtenImports[statement] { return } @@ -1208,15 +1152,25 @@ func (g *Generator) GenerateAllFiles() { } for _, file := range g.allFiles { g.Reset() + g.annotations = nil g.writeOutput = genFileMap[file] g.generate(file) if !g.writeOutput { continue } + fname := file.goFileName(g.pathType) g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ - Name: proto.String(file.goFileName()), + Name: proto.String(fname), Content: proto.String(g.String()), }) + if g.annotateCode { + // Store the generated code annotations in text, as the protoc plugin protocol requires that + // strings contain valid UTF-8. + g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ + Name: proto.String(file.goFileName(g.pathType) + ".meta"), + Content: proto.String(proto.CompactTextString(&descriptor.GeneratedCodeInfo{Annotation: g.annotations})), + }) + } } } @@ -1227,37 +1181,28 @@ func (g *Generator) runPlugins(file *FileDescriptor) { } } -// FileOf return the FileDescriptor for this FileDescriptorProto. -func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor { - for _, file := range g.allFiles { - if file.FileDescriptorProto == fd { - return file - } - } - g.Fail("could not find file in table:", fd.GetName()) - return nil -} - // Fill the response protocol buffer with the generated output for all the files we're // supposed to generate. func (g *Generator) generate(file *FileDescriptor) { g.customImports = make([]string, 0) - g.file = g.FileOf(file.FileDescriptorProto) - g.usedPackages = make(map[string]bool) - - if g.file.index == 0 { - // For one file in the package, assert version compatibility. - g.P("// This is a compile-time assertion to ensure that this generated file") - g.P("// is compatible with the proto package it is being compiled against.") - g.P("// A compilation error at this line likely means your copy of the") - g.P("// proto package needs to be updated.") - if gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { - g.P("const _ = ", g.Pkg["proto"], ".GoGoProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") - } else { - g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") - } - g.P() + g.file = file + g.usedPackages = make(map[GoImportPath]bool) + g.packageNames = make(map[GoImportPath]GoPackageName) + g.usedPackageNames = make(map[GoPackageName]bool) + for name := range globalPackageNames { + g.usedPackageNames[name] = true + } + + g.P("// This is a compile-time assertion to ensure that this generated file") + g.P("// is compatible with the proto package it is being compiled against.") + g.P("// A compilation error at this line likely means your copy of the") + g.P("// proto package needs to be updated.") + if gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + g.P("const _ = ", g.Pkg["proto"], ".GoGoProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") + } else { + g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") } + g.P() // Reset on each file g.writtenImports = make(map[string]bool) for _, td := range g.file.imp { @@ -1285,29 +1230,41 @@ func (g *Generator) generate(file *FileDescriptor) { // Generate header and imports last, though they appear first in the output. rem := g.Buffer + remAnno := g.annotations g.Buffer = new(bytes.Buffer) + g.annotations = nil g.generateHeader() g.generateImports() if !g.writeOutput { return } + // Adjust the offsets for annotations displaced by the header and imports. + for _, anno := range remAnno { + *anno.Begin += int32(g.Len()) + *anno.End += int32(g.Len()) + g.annotations = append(g.annotations, anno) + } g.Write(rem.Bytes()) - // Reformat generated code. + // Reformat generated code and patch annotation locations. fset := token.NewFileSet() - raw := g.Bytes() - ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) + original := g.Bytes() + if g.annotateCode { + // make a copy independent of g; we'll need it after Reset. + original = append([]byte(nil), original...) + } + ast, err := parser.ParseFile(fset, "", original, parser.ParseComments) if err != nil { // Print out the bad code with line numbers. // This should never happen in practice, but it can while changing generated code, // so consider this a debugging aid. var src bytes.Buffer - s := bufio.NewScanner(bytes.NewReader(raw)) + s := bufio.NewScanner(bytes.NewReader(original)) for line := 1; s.Scan(); line++ { fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes()) } if serr := s.Err(); serr != nil { - g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(raw)) + g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(original)) } else { g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) } @@ -1317,56 +1274,59 @@ func (g *Generator) generate(file *FileDescriptor) { if err != nil { g.Fail("generated Go source code could not be reformatted:", err.Error()) } + if g.annotateCode { + m, err := remap.Compute(original, g.Bytes()) + if err != nil { + g.Fail("formatted generated Go source code could not be mapped back to the original code:", err.Error()) + } + for _, anno := range g.annotations { + new, ok := m.Find(int(*anno.Begin), int(*anno.End)) + if !ok { + g.Fail("span in formatted generated Go source code could not be mapped back to the original code") + } + *anno.Begin = int32(new.Pos) + *anno.End = int32(new.End) + } + } } // Generate the header, including package definition func (g *Generator) generateHeader() { - g.P("// Code generated by protoc-gen-gogo.") - g.P("// source: ", *g.file.Name) - g.P("// DO NOT EDIT!") + g.P("// Code generated by protoc-gen-gogo. DO NOT EDIT.") + if g.file.GetOptions().GetDeprecated() { + g.P("// ", *g.file.Name, " is a deprecated file.") + } else { + g.P("// source: ", *g.file.Name) + } g.P() - name := g.file.PackageName() + importPath, _, _ := g.file.goPackageOption() + if importPath == "" { + g.P("package ", g.file.packageName) + } else { + g.P("package ", g.file.packageName, " // import ", GoImportPath(g.ImportPrefix)+importPath) + } + g.P() - if g.file.index == 0 { - // Generate package docs for the first file in the package. + if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { g.P("/*") - g.P("Package ", name, " is a generated protocol buffer package.") - g.P() - if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { - // not using g.PrintComments because this is a /* */ comment block. - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - line = strings.TrimPrefix(line, " ") - // ensure we don't escape from the block comment - line = strings.Replace(line, "*/", "* /", -1) - g.P(line) - } - g.P() - } - var topMsgs []string - g.P("It is generated from these files:") - for _, f := range g.genFiles { - g.P("\t", f.Name) - for _, msg := range f.desc { - if msg.parent != nil { - continue - } - topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName())) - } - } - g.P() - g.P("It has these top-level messages:") - for _, msg := range topMsgs { - g.P("\t", msg) + // not using g.PrintComments because this is a /* */ comment block. + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + for _, line := range strings.Split(text, "\n") { + line = strings.TrimPrefix(line, " ") + // ensure we don't escape from the block comment + line = strings.Replace(line, "*/", "* /", -1) + g.P(line) } g.P("*/") + g.P() } - - g.P("package ", name) - g.P() } +// deprecationComment is the standard comment added to deprecated +// messages, fields, enums, and enum values. +var deprecationComment = "// Deprecated: Do not use." + // PrintComments prints any comments from the source .proto file. // The path is a comma-separated list of integers. // It returns an indication of whether any comments were printed. @@ -1417,47 +1377,59 @@ func (g *Generator) generateImports() { // do, which is tricky when there's a plugin, just import it and // reference it later. The same argument applies to the fmt and math packages. if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) { - g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/gogo/protobuf/proto") + g.PrintImport(GoPackageName(g.Pkg["proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/gogo/protobuf/proto")) if gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { - g.PrintImport(g.Pkg["golang_proto"], g.ImportPrefix+"github.com/golang/protobuf/proto") + g.PrintImport(GoPackageName(g.Pkg["golang_proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/golang/protobuf/proto")) } } else { - g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/golang/protobuf/proto") + g.PrintImport(GoPackageName(g.Pkg["proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/golang/protobuf/proto")) } - g.PrintImport(g.Pkg["fmt"], "fmt") - g.PrintImport(g.Pkg["math"], "math") + g.PrintImport(GoPackageName(g.Pkg["fmt"]), "fmt") + g.PrintImport(GoPackageName(g.Pkg["math"]), "math") + var ( + imports = make(map[GoImportPath]bool) + strongImports = make(map[GoImportPath]bool) + importPaths []string + ) for i, s := range g.file.Dependency { fd := g.fileByName(s) + importPath := fd.importPath // Do not import our own package. - if fd.PackageName() == g.packageName { + if importPath == g.file.importPath { continue } - filename := fd.goFileName() - // By default, import path is the dirname of the Go filename. - importPath := path.Dir(filename) - if substitution, ok := g.ImportMap[s]; ok { - importPath = substitution + if !imports[importPath] { + importPaths = append(importPaths, string(importPath)) + } + imports[importPath] = true + if !g.weak(int32(i)) { + strongImports[importPath] = true } - importPath = g.ImportPrefix + importPath + } + sort.Strings(importPaths) + for i := range importPaths { + importPath := GoImportPath(importPaths[i]) + packageName := g.GoPackageName(importPath) + fullPath := GoImportPath(g.ImportPrefix) + importPath // Skip weak imports. - if g.weak(int32(i)) { - g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath)) + if !strongImports[importPath] { + g.P("// skipping weak import ", packageName, " ", fullPath) continue } // We need to import all the dependencies, even if we don't reference them, // because other code and tools depend on having the full transitive closure // of protocol buffer types in the binary. - if _, ok := g.usedPackages[fd.PackageName()]; ok { - g.PrintImport(fd.PackageName(), importPath) + if _, ok := g.usedPackages[importPath]; ok { + g.PrintImport(packageName, fullPath) } else { - g.P("import _ ", strconv.Quote(importPath)) + g.P("import _ ", fullPath) } } g.P() for _, s := range g.customImports { s1 := strings.Map(badToUnderscore, s) - g.PrintImport(s1, s) + g.PrintImport(GoPackageName(s1), GoImportPath(s)) } g.P() // TODO: may need to worry about uniqueness across plugins @@ -1482,26 +1454,24 @@ func (g *Generator) generateImports() { } func (g *Generator) generateImported(id *ImportedDescriptor) { - // Don't generate public import symbols for files that we are generating - // code for, since those symbols will already be in this package. - // We can't simply avoid creating the ImportedDescriptor objects, - // because g.genFiles isn't populated at that stage. tn := id.TypeName() sn := tn[len(tn)-1] - df := g.FileOf(id.o.File()) + df := id.o.File() filename := *df.Name - for _, fd := range g.genFiles { - if *fd.Name == filename { - g.P("// Ignoring public import of ", sn, " from ", filename) - g.P() - return - } + if df.importPath == g.file.importPath { + // Don't generate type aliases for files in the same Go package as this one. + g.P("// Ignoring public import of ", sn, " from ", filename) + g.P() + return + } + if !supportTypeAliases { + g.Fail(fmt.Sprintf("%s: public imports require at least go1.9", filename)) } g.P("// ", sn, " from public import ", filename) - g.usedPackages[df.PackageName()] = true + g.usedPackages[df.importPath] = true for _, sym := range df.exported[id.o] { - sym.GenerateAlias(g, df.PackageName()) + sym.GenerateAlias(g, g.GoPackageName(df.importPath)) } g.P() @@ -1515,25 +1485,36 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { ccTypeName := CamelCaseSlice(typeName) ccPrefix := enum.prefix() + deprecatedEnum := "" + if enum.GetOptions().GetDeprecated() { + deprecatedEnum = deprecationComment + } + g.PrintComments(enum.path) - if !gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { + if !gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { ccPrefix = "" } - if gogoproto.HasEnumDecl(enum.file, enum.EnumDescriptorProto) { - g.P("type ", ccTypeName, " int32") + if gogoproto.HasEnumDecl(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { + g.P("type ", Annotate(enum.file, enum.path, ccTypeName), " int32", deprecatedEnum) g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) g.P("const (") g.In() for i, e := range enum.Value { - g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)) + etorPath := fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i) + g.PrintComments(etorPath) + + deprecatedValue := "" + if e.GetOptions().GetDeprecated() { + deprecatedValue = deprecationComment + } name := *e.Name if gogoproto.IsEnumValueCustomName(e) { name = gogoproto.GetEnumValueCustomName(e) } name = ccPrefix + name - g.P(name, " ", ccTypeName, " = ", e.Number) + g.P(Annotate(enum.file, etorPath, name), " ", ccTypeName, " = ", e.Number, " ", deprecatedValue) g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) } g.Out() @@ -1607,10 +1588,15 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { indexes = append([]string{strconv.Itoa(m.index)}, indexes...) } indexes = append(indexes, strconv.Itoa(enum.index)) - g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") + g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) {") + g.In() + g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") + g.Out() + g.P("}") if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" { g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`) } + g.P() } @@ -1673,7 +1659,7 @@ func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptor } enum := "" if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM { - // We avoid using obj.PackageName(), because we want to use the + // We avoid using obj.goPackageNamehe // original (proto-world) package name. obj := g.ObjectNamed(field.GetTypeName()) if id, ok := obj.(*ImportedDescriptor); ok { @@ -1819,12 +1805,6 @@ func (g *Generator) TypeName(obj Object) string { return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName()) } -// TypeNameWithPackage is like TypeName, but always includes the package -// name even if the object is in our own package. -func (g *Generator) TypeNameWithPackage(obj Object) string { - return obj.PackageName() + CamelCaseSlice(obj.TypeName()) -} - // GoType returns a string representing the type name, and the wire type func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) { // TODO: Options. @@ -1972,7 +1952,7 @@ func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorPr if !gogoproto.IsNullable(m.ValueAliasField) { valType = strings.TrimPrefix(valType, "*") } - if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) { + if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) { g.RecordTypeUse(m.ValueAliasField.GetTypeName()) } default: @@ -1991,10 +1971,10 @@ func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorPr } func (g *Generator) RecordTypeUse(t string) { - if obj, ok := g.typeNameToObject[t]; ok { + if _, ok := g.typeNameToObject[t]; ok { // Call ObjectNamed to get the true object to record the use. - obj = g.ObjectNamed(t) - g.usedPackages[obj.PackageName()] = true + obj := g.ObjectNamed(t) + g.usedPackages[obj.GoImportPath()] = true } } @@ -2050,7 +2030,7 @@ func (g *Generator) generateMessage(message *Descriptor) { for _, n := range methodNames { usedNames[n] = true } - if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { + if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) { usedNames["Size"] = true } fieldNames := make(map[*descriptor.FieldDescriptorProto]string) @@ -2100,9 +2080,19 @@ func (g *Generator) generateMessage(message *Descriptor) { fieldGetterNames[field] = fieldGetterName } - if gogoproto.HasTypeDecl(message.file, message.DescriptorProto) { - g.PrintComments(message.path) - g.P("type ", ccTypeName, " struct {") + if gogoproto.HasTypeDecl(message.file.FileDescriptorProto, message.DescriptorProto) { + comments := g.PrintComments(message.path) + + // Guarantee deprecation comments appear after user-provided comments. + if message.GetOptions().GetDeprecated() { + if comments { + // Convention: Separate deprecation comments from original + // comments with an empty line. + g.P("//") + } + g.P(deprecationComment) + } + g.P("type ", Annotate(message.file, message.path, ccTypeName), " struct {") g.In() for i, field := range message.Field { @@ -2135,7 +2125,8 @@ func (g *Generator) generateMessage(message *Descriptor) { // This is the first field of a oneof we haven't seen before. // Generate the union field. - com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)) + oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex) + com := g.PrintComments(oneofFullPath) if com { g.P("//") } @@ -2148,7 +2139,7 @@ func (g *Generator) generateMessage(message *Descriptor) { oneofFieldName[*field.OneofIndex] = fname oneofDisc[*field.OneofIndex] = dname otag := `protobuf_oneof:"` + odp.GetName() + `"` - g.P(fname, " ", dname, " `", otag, "`") + g.P(Annotate(message.file, oneofFullPath, fname), " ", dname, " `", otag, "`") } if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { @@ -2193,24 +2184,45 @@ func (g *Generator) generateMessage(message *Descriptor) { continue } - g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)) - g.P(fieldName, "\t", typename, "\t`", tag, "`") - if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) { + fieldDeprecated := "" + if field.GetOptions().GetDeprecated() { + fieldDeprecated = deprecationComment + } + + fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) + g.PrintComments(fieldFullPath) + g.P(Annotate(message.file, fieldFullPath, fieldName), "\t", typename, "\t`", tag, "`", fieldDeprecated) + if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) { g.RecordTypeUse(field.GetTypeName()) } } + g.P("XXX_NoUnkeyedLiteral\tstruct{} `json:\"-\"`") // prevent unkeyed struct literals if len(message.ExtensionRange) > 0 { if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(g.Pkg["proto"], ".XXX_InternalExtensions `json:\"-\"`") + messageset := "" + if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { + messageset = "protobuf_messageset:\"1\" " + } + g.P(g.Pkg["proto"], ".XXX_InternalExtensions `", messageset, "json:\"-\"`") } else { g.P("XXX_extensions\t\t[]byte `protobuf:\"bytes,0,opt\" json:\"-\"`") } } - if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, message.DescriptorProto) && !message.proto3() { + if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, message.DescriptorProto) { g.P("XXX_unrecognized\t[]byte `json:\"-\"`") } + g.P("XXX_sizecache\tint32 `json:\"-\"`") g.Out() g.P("}") + } else { + // Even if the type does not need to be generated, we need to iterate + // over all its fields to be able to mark as used any imported types + // used by those fields. + for _, field := range message.Field { + if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) { + g.RecordTypeUse(field.GetTypeName()) + } + } } // Update g.Buffer to list valid oneof types. @@ -2221,12 +2233,25 @@ func (g *Generator) generateMessage(message *Descriptor) { all := g.Buffer.Bytes() rem := all[ip:] g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem + oldLen := g.Buffer.Len() for _, field := range message.Field { if field.OneofIndex == nil || *field.OneofIndex != oi { continue } g.P("//\t*", oneofTypeName[field]) } + // If we've inserted text, we also need to fix up affected annotations (as + // they contain offsets that may need to be changed). + offset := int32(g.Buffer.Len() - oldLen) + ip32 := int32(ip) + for _, anno := range g.annotations { + if *anno.Begin >= ip32 { + *anno.Begin += offset + } + if *anno.End >= ip32 { + *anno.End += offset + } + } g.Buffer.Write(rem) } @@ -2240,7 +2265,11 @@ func (g *Generator) generateMessage(message *Descriptor) { for m := message; m != nil; m = m.parent { indexes = append([]string{strconv.Itoa(m.index)}, indexes...) } - g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }") + g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) {") + g.In() + g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") + g.Out() + g.P("}") // TODO: Revisit the decision to use a XXX_WellKnownType method // if we change proto.MessageName to work with multiple equivalents. if message.file.GetPackage() == "google.protobuf" && wellKnownTypes[message.GetName()] { @@ -2254,16 +2283,6 @@ func (g *Generator) generateMessage(message *Descriptor) { if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { isMessageSet = true g.P() - g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(&m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)") - g.Out() - g.P("}") g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {") g.In() g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") @@ -2274,9 +2293,6 @@ func (g *Generator) generateMessage(message *Descriptor) { g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") g.Out() g.P("}") - g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler") - g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)") - g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)") } g.P() @@ -2307,6 +2323,90 @@ func (g *Generator) generateMessage(message *Descriptor) { } } + // TODO: It does not scale to keep adding another method for every + // operation on protos that we want to switch over to using the + // table-driven approach. Instead, we should only add a single method + // that allows getting access to the *InternalMessageInfo struct and then + // calling Unmarshal, Marshal, Merge, Size, and Discard directly on that. + + // Wrapper for table-driven marshaling and unmarshaling. + g.P("func (m *", ccTypeName, ") XXX_Unmarshal(b []byte) error {") + g.In() + if gogoproto.IsUnmarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("return m.Unmarshal(b)") + } else { + g.P("return xxx_messageInfo_", ccTypeName, ".Unmarshal(m, b)") + } + g.Out() + g.P("}") + + g.P("func (m *", ccTypeName, ") XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {") + g.In() + if gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { + if gogoproto.IsStableMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("b = b[:cap(b)]") + g.P("n, err := m.MarshalTo(b)") + g.P("if err != nil {") + g.In() + g.P("return nil, err") + g.Out() + g.P("}") + g.P("return b[:n], nil") + } else { + g.P("if deterministic {") + g.In() + g.P("return xxx_messageInfo_", ccTypeName, ".Marshal(b, m, deterministic)") + g.P("} else {") + g.In() + g.P("b = b[:cap(b)]") + g.P("n, err := m.MarshalTo(b)") + g.P("if err != nil {") + g.In() + g.P("return nil, err") + g.Out() + g.P("}") + g.Out() + g.P("return b[:n], nil") + g.Out() + g.P("}") + } + } else { + g.P("return xxx_messageInfo_", ccTypeName, ".Marshal(b, m, deterministic)") + } + g.Out() + g.P("}") + + g.P("func (dst *", ccTypeName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {") + g.In() + g.P("xxx_messageInfo_", ccTypeName, ".Merge(dst, src)") + g.Out() + g.P("}") + + g.P("func (m *", ccTypeName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message + g.In() + if (gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto)) && + gogoproto.IsSizer(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("return m.Size()") + } else if (gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto)) && + gogoproto.IsProtoSizer(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("return m.ProtoSize()") + } else { + g.P("return xxx_messageInfo_", ccTypeName, ".Size(m)") + } + g.Out() + g.P("}") + + g.P("func (m *", ccTypeName, ") XXX_DiscardUnknown() {") + g.In() + g.P("xxx_messageInfo_", ccTypeName, ".DiscardUnknown(m)") + g.Out() + g.P("}") + + g.P("var xxx_messageInfo_", ccTypeName, " ", g.Pkg["proto"], ".InternalMessageInfo") + // Default constants defNames := make(map[*descriptor.FieldDescriptorProto]string) for _, field := range message.Field { @@ -2329,7 +2429,7 @@ func (g *Generator) generateMessage(message *Descriptor) { case typename == "string": def = strconv.Quote(def) case typename == "[]byte": - def = "[]byte(" + strconv.Quote(def) + ")" + def = "[]byte(" + strconv.Quote(unescape(def)) + ")" kind = "var " case def == "inf", def == "-inf", def == "nan": // These names are known to, and defined by, the protocol language. @@ -2378,7 +2478,7 @@ func (g *Generator) generateMessage(message *Descriptor) { } - if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { + if gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { def = g.DefaultPackageName(obj) + enum.prefix() + def } else { def = g.DefaultPackageName(obj) + def @@ -2390,68 +2490,69 @@ func (g *Generator) generateMessage(message *Descriptor) { g.P() // Oneof per-field types, discriminants and getters. - if message.allowOneof() { - // Generate unexported named types for the discriminant interfaces. - // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug - // that was triggered by using anonymous interfaces here. - // TODO: Revisit this and consider reverting back to anonymous interfaces. - for oi := range message.OneofDecl { - dname := oneofDisc[int32(oi)] - g.P("type ", dname, " interface {") - g.In() - g.P(dname, "()") - if gogoproto.HasEqual(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`Equal(interface{}) bool`) - } - if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`VerboseEqual(interface{}) error`) - } - if gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || - gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`MarshalTo([]byte) (int, error)`) - } - if gogoproto.IsSizer(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`Size() int`) - } - if gogoproto.IsProtoSizer(g.file.FileDescriptorProto, message.DescriptorProto) { - g.P(`ProtoSize() int`) - } - g.Out() - g.P("}") + // Generate unexported named types for the discriminant interfaces. + // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug + // that was triggered by using anonymous interfaces here. + // TODO: Revisit this and consider reverting back to anonymous interfaces. + for oi := range message.OneofDecl { + dname := oneofDisc[int32(oi)] + g.P("type ", dname, " interface {") + g.In() + g.P(dname, "()") + if gogoproto.HasEqual(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`Equal(interface{}) bool`) } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - _, wiretype := g.GoType(message, field) - tag := "protobuf:" + g.goTag(message, field, wiretype) - g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }") - if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) { - g.RecordTypeUse(field.GetTypeName()) - } + if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`VerboseEqual(interface{}) error`) } - g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") + if gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsStableMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`MarshalTo([]byte) (int, error)`) } - g.P() - for oi := range message.OneofDecl { - fname := oneofFieldName[int32(oi)] - g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {") - g.P("if m != nil { return m.", fname, " }") - g.P("return nil") - g.P("}") + if gogoproto.IsSizer(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`Size() int`) } - g.P() + if gogoproto.IsProtoSizer(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P(`ProtoSize() int`) + } + g.Out() + g.P("}") } + g.P() + var oneofTypes []string + for i, field := range message.Field { + if field.OneofIndex == nil { + continue + } + _, wiretype := g.GoType(message, field) + tag := "protobuf:" + g.goTag(message, field, wiretype) + fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) + g.P("type ", Annotate(message.file, fieldFullPath, oneofTypeName[field]), " struct{ ", Annotate(message.file, fieldFullPath, fieldNames[field]), " ", fieldTypes[field], " `", tag, "` }") + if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) { + g.RecordTypeUse(field.GetTypeName()) + } + oneofTypes = append(oneofTypes, oneofTypeName[field]) + } + g.P() + for _, field := range message.Field { + if field.OneofIndex == nil { + continue + } + g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") + } + g.P() + for oi := range message.OneofDecl { + fname := oneofFieldName[int32(oi)] + g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {") + g.P("if m != nil { return m.", fname, " }") + g.P("return nil") + g.P("}") + } + g.P() // Field getters - var getters []getterSymbol - for _, field := range message.Field { + for i, field := range message.Field { oneof := field.OneofIndex != nil && message.allowOneof() if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, message.DescriptorProto) { continue @@ -2472,38 +2573,13 @@ func (g *Generator) generateMessage(message *Descriptor) { typename = typename[1:] star = "*" } + fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) - // Only export getter symbols for basic types, - // and for messages and enums in the same package. - // Groups are not exported. - // Foreign types can't be hoisted through a public import because - // the importer may not already be importing the defining .proto. - // As an example, imagine we have an import tree like this: - // A.proto -> B.proto -> C.proto - // If A publicly imports B, we need to generate the getters from B in A's output, - // but if one such getter returns something from C then we cannot do that - // because A is not importing C already. - var getter, genType bool - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_GROUP: - getter = false - case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM: - // Only export getter if its return type is in this package. - getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName() - genType = true - default: - getter = true - } - if getter { - getters = append(getters, getterSymbol{ - name: mname, - typ: typename, - typeName: field.GetTypeName(), - genType: genType, - }) + if field.GetOptions().GetDeprecated() { + g.P(deprecationComment) } - g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {") + g.P("func (m *", ccTypeName, ") ", Annotate(message.file, fieldFullPath, mname), "() "+typename+" {") g.In() def, hasDef := defNames[field] typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified @@ -2606,7 +2682,7 @@ func (g *Generator) generateMessage(message *Descriptor) { first = gogoproto.GetEnumValueCustomName(enum.Value[0]) } - if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) { + if gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first) } else { g.P("return ", g.DefaultPackageName(obj)+first) @@ -2626,8 +2702,7 @@ func (g *Generator) generateMessage(message *Descriptor) { sym: ccTypeName, hasExtensions: hasExtensions, isMessageSet: isMessageSet, - hasOneof: len(message.OneofDecl) > 0, - getters: getters, + oneofTypes: oneofTypes, } g.file.addExport(message, ms) } @@ -2942,41 +3017,32 @@ func (g *Generator) generateMessage(message *Descriptor) { } g.P("case *", oneofTypeName[field], ":") val := "x." + fieldNames[field] - var wire, varint, fixed string + var varint, fixed string switch *field.Type { case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - wire = "WireFixed64" fixed = "8" case descriptor.FieldDescriptorProto_TYPE_FLOAT: - wire = "WireFixed32" fixed = "4" case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64, descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_ENUM: - wire = "WireVarint" varint = val case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: - wire = "WireFixed64" fixed = "8" case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: - wire = "WireFixed32" fixed = "4" case descriptor.FieldDescriptorProto_TYPE_BOOL: - wire = "WireVarint" fixed = "1" case descriptor.FieldDescriptorProto_TYPE_STRING: - wire = "WireBytes" fixed = "len(" + val + ")" varint = fixed case descriptor.FieldDescriptorProto_TYPE_GROUP: - wire = "WireStartGroup" fixed = g.Pkg["proto"] + ".Size(" + val + ")" case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - wire = "WireBytes" if gogoproto.IsStdTime(field) { if gogoproto.IsNullable(field) { val = "*" + val @@ -2995,7 +3061,6 @@ func (g *Generator) generateMessage(message *Descriptor) { fixed = "s" varint = fixed case descriptor.FieldDescriptorProto_TYPE_BYTES: - wire = "WireBytes" if gogoproto.IsCustomType(field) { fixed = val + ".Size()" } else { @@ -3003,15 +3068,16 @@ func (g *Generator) generateMessage(message *Descriptor) { } varint = fixed case descriptor.FieldDescriptorProto_TYPE_SINT32: - wire = "WireVarint" varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" case descriptor.FieldDescriptorProto_TYPE_SINT64: - wire = "WireVarint" varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" default: g.Fail("unhandled oneof field type ", field.Type.String()) } - g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") + // Tag and wire varint is known statically, + // so don't generate code for that part of the size computation. + tagAndWireSize := proto.SizeVarint(uint64(*field.Number << 3)) // wire doesn't affect varint size + g.P("n += ", tagAndWireSize, " // tag and wire") if varint != "" { g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") } @@ -3019,7 +3085,7 @@ func (g *Generator) generateMessage(message *Descriptor) { g.P("n += ", fixed) } if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + g.P("n += ", tagAndWireSize, " // tag and wire") } } g.P("case nil:") @@ -3045,6 +3111,98 @@ func (g *Generator) generateMessage(message *Descriptor) { if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["golang_proto"], ccTypeName, fullName) } + if gogoproto.HasMessageName(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("func (*", ccTypeName, ") XXX_MessageName() string {") + g.In() + g.P("return ", strconv.Quote(fullName)) + g.Out() + g.P("}") + } + // Register types for native map types. + for _, k := range mapFieldKeys(mapFieldTypes) { + fullName := strings.TrimPrefix(*k.TypeName, ".") + g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["proto"], mapFieldTypes[k], fullName) + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["golang_proto"], mapFieldTypes[k], fullName) + } + } +} + +type byTypeName []*descriptor.FieldDescriptorProto + +func (a byTypeName) Len() int { return len(a) } +func (a byTypeName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byTypeName) Less(i, j int) bool { return *a[i].TypeName < *a[j].TypeName } + +// mapFieldKeys returns the keys of m in a consistent order. +func mapFieldKeys(m map[*descriptor.FieldDescriptorProto]string) []*descriptor.FieldDescriptorProto { + keys := make([]*descriptor.FieldDescriptorProto, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + sort.Sort(byTypeName(keys)) + return keys +} + +var escapeChars = [256]byte{ + 'a': '\a', 'b': '\b', 'f': '\f', 'n': '\n', 'r': '\r', 't': '\t', 'v': '\v', '\\': '\\', '"': '"', '\'': '\'', '?': '?', +} + +// unescape reverses the "C" escaping that protoc does for default values of bytes fields. +// It is best effort in that it effectively ignores malformed input. Seemingly invalid escape +// sequences are conveyed, unmodified, into the decoded result. +func unescape(s string) string { + // NB: Sadly, we can't use strconv.Unquote because protoc will escape both + // single and double quotes, but strconv.Unquote only allows one or the + // other (based on actual surrounding quotes of its input argument). + + var out []byte + for len(s) > 0 { + // regular character, or too short to be valid escape + if s[0] != '\\' || len(s) < 2 { + out = append(out, s[0]) + s = s[1:] + } else if c := escapeChars[s[1]]; c != 0 { + // escape sequence + out = append(out, c) + s = s[2:] + } else if s[1] == 'x' || s[1] == 'X' { + // hex escape, e.g. "\x80 + if len(s) < 4 { + // too short to be valid + out = append(out, s[:2]...) + s = s[2:] + continue + } + v, err := strconv.ParseUint(s[2:4], 16, 8) + if err != nil { + out = append(out, s[:4]...) + } else { + out = append(out, byte(v)) + } + s = s[4:] + } else if '0' <= s[1] && s[1] <= '7' { + // octal escape, can vary from 1 to 3 octal digits; e.g., "\0" "\40" or "\164" + // so consume up to 2 more bytes or up to end-of-string + n := len(s[1:]) - len(strings.TrimLeft(s[1:], "01234567")) + if n > 3 { + n = 3 + } + v, err := strconv.ParseUint(s[1:1+n], 8, 8) + if err != nil { + out = append(out, s[:1+n]...) + } else { + out = append(out, byte(v)) + } + s = s[1+n:] + } else { + // bad escape, just propagate the slash as-is + out = append(out, s[0]) + s = s[1:] + } + } + + return string(out) } func (g *Generator) generateExtension(ext *ExtensionDescriptor) { @@ -3072,10 +3230,15 @@ func (g *Generator) generateExtension(ext *ExtensionDescriptor) { typeName := ext.TypeName() // Special case for proto2 message sets: If this extension is extending - // proto2_bridge.MessageSet, and its final name component is "message_set_extension", + // proto2.bridge.MessageSet, and its final name component is "message_set_extension", // then drop that last component. + // + // TODO: This should be implemented in the text formatter rather than the generator. + // In addition, the situation for when to apply this special case is implemented + // differently in other languages: + // https://github.com/google/protobuf/blob/aff10976/src/google/protobuf/text_format.cc#L1560 mset := false - if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" { + if extDesc.GetOptions().GetMessageSetWireFormat() && typeName[len(typeName)-1] == "message_set_extension" { typeName = typeName[:len(typeName)-1] mset = true } @@ -3354,3 +3517,14 @@ const ( // tag numbers in EnumDescriptorProto enumValuePath = 2 // value ) + +var supportTypeAliases bool + +func init() { + for _, tag := range build.Default.ReleaseTags { + if tag == "go1.9" { + supportTypeAliases = true + return + } + } +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go index d7a406e7c..3c7cf84ba 100644 --- a/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go @@ -118,7 +118,7 @@ func (this *pluginImports) NewImport(pkg string) Single { func (this *pluginImports) GenerateImports(file *FileDescriptor) { for _, s := range this.singles { if s.IsUsed() { - this.generator.PrintImport(s.Name(), s.Location()) + this.generator.PrintImport(GoPackageName(s.Name()), GoImportPath(s.Location())) } } } @@ -137,7 +137,7 @@ type importedPackage struct { importPrefix string } -func newImportedPackage(importPrefix, pkg string) *importedPackage { +func newImportedPackage(importPrefix string, pkg string) *importedPackage { return &importedPackage{ pkg: pkg, importPrefix: importPrefix, @@ -146,7 +146,7 @@ func newImportedPackage(importPrefix, pkg string) *importedPackage { func (this *importedPackage) Use() string { if !this.used { - this.name = RegisterUniquePackageName(this.pkg, nil) + this.name = string(cleanPackageName(this.pkg)) this.used = true } return this.name @@ -182,7 +182,7 @@ func (g *Generator) GetFieldName(message *Descriptor, field *descriptor.FieldDes return fieldname + "_" } } - if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { + if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) { if fieldname == "Size" { return fieldname + "_" } @@ -204,7 +204,7 @@ func (g *Generator) GetOneOfFieldName(message *Descriptor, field *descriptor.Fie return fieldname + "_" } } - if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) { + if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) { if fieldname == "Size" { return fieldname + "_" } @@ -333,20 +333,15 @@ func (g *Generator) GeneratePlugin(p Plugin) { continue } g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ - Name: proto.String(file.goFileName()), + Name: proto.String(file.goFileName(g.pathType)), Content: proto.String(g.String()), }) } } -func (g *Generator) SetFile(file *descriptor.FileDescriptorProto) { - g.file = g.FileOf(file) -} - func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) { g.writtenImports = make(map[string]bool) - g.file = g.FileOf(file.FileDescriptorProto) - g.usedPackages = make(map[string]bool) + g.file = file // Run the plugins before the imports so we know which imports are necessary. p.Generate(file) @@ -445,3 +440,7 @@ func (g *Generator) useTypes() string { g.customImports = append(g.customImports, "github.com/gogo/protobuf/types") return pkg } + +func (d *FileDescriptor) GoPackageName() string { + return string(d.packageName) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go new file mode 100644 index 000000000..a9b61036c --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go @@ -0,0 +1,117 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2017 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package remap handles tracking the locations of Go tokens in a source text +across a rewrite by the Go formatter. +*/ +package remap + +import ( + "fmt" + "go/scanner" + "go/token" +) + +// A Location represents a span of byte offsets in the source text. +type Location struct { + Pos, End int // End is exclusive +} + +// A Map represents a mapping between token locations in an input source text +// and locations in the correspnding output text. +type Map map[Location]Location + +// Find reports whether the specified span is recorded by m, and if so returns +// the new location it was mapped to. If the input span was not found, the +// returned location is the same as the input. +func (m Map) Find(pos, end int) (Location, bool) { + key := Location{ + Pos: pos, + End: end, + } + if loc, ok := m[key]; ok { + return loc, true + } + return key, false +} + +func (m Map) add(opos, oend, npos, nend int) { + m[Location{Pos: opos, End: oend}] = Location{Pos: npos, End: nend} +} + +// Compute constructs a location mapping from input to output. An error is +// reported if any of the tokens of output cannot be mapped. +func Compute(input, output []byte) (Map, error) { + itok := tokenize(input) + otok := tokenize(output) + if len(itok) != len(otok) { + return nil, fmt.Errorf("wrong number of tokens, %d ≠ %d", len(itok), len(otok)) + } + m := make(Map) + for i, ti := range itok { + to := otok[i] + if ti.Token != to.Token { + return nil, fmt.Errorf("token %d type mismatch: %s ≠ %s", i+1, ti, to) + } + m.add(ti.pos, ti.end, to.pos, to.end) + } + return m, nil +} + +// tokinfo records the span and type of a source token. +type tokinfo struct { + pos, end int + token.Token +} + +func tokenize(src []byte) []tokinfo { + fs := token.NewFileSet() + var s scanner.Scanner + s.Init(fs.AddFile("src", fs.Base(), len(src)), src, nil, scanner.ScanComments) + var info []tokinfo + for { + pos, next, lit := s.Scan() + switch next { + case token.SEMICOLON: + continue + } + info = append(info, tokinfo{ + pos: int(pos - 1), + end: int(pos + token.Pos(len(lit)) - 1), + Token: next, + }) + if next == token.EOF { + break + } + } + return info +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap_test.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap_test.go new file mode 100644 index 000000000..ccc7fca03 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap_test.go @@ -0,0 +1,82 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2017 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package remap + +import ( + "go/format" + "testing" +) + +func TestErrors(t *testing.T) { + tests := []struct { + in, out string + }{ + {"", "x"}, + {"x", ""}, + {"var x int = 5\n", "var x = 5\n"}, + {"these are \"one\" thing", "those are 'another' thing"}, + } + for _, test := range tests { + m, err := Compute([]byte(test.in), []byte(test.out)) + if err != nil { + t.Logf("Got expected error: %v", err) + continue + } + t.Errorf("Compute(%q, %q): got %+v, wanted error", test.in, test.out, m) + } +} + +func TestMatching(t *testing.T) { + // The input is a source text that will be rearranged by the formatter. + const input = `package foo +var s int +func main(){} +` + + output, err := format.Source([]byte(input)) + if err != nil { + t.Fatalf("Formatting failed: %v", err) + } + m, err := Compute([]byte(input), output) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + // Verify that the mapped locations have the same text. + for key, val := range m { + want := input[key.Pos:key.End] + got := string(output[val.Pos:val.End]) + if got != want { + t.Errorf("Token at %d:%d: got %q, want %q", key.Pos, key.End, got, want) + } + } +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go new file mode 100644 index 000000000..1af405681 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go @@ -0,0 +1,115 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2013 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package generator + +import ( + "testing" + + "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func TestCamelCase(t *testing.T) { + tests := []struct { + in, want string + }{ + {"one", "One"}, + {"one_two", "OneTwo"}, + {"_my_field_name_2", "XMyFieldName_2"}, + {"Something_Capped", "Something_Capped"}, + {"my_Name", "My_Name"}, + {"OneTwo", "OneTwo"}, + {"_", "X"}, + {"_a_", "XA_"}, + } + for _, tc := range tests { + if got := CamelCase(tc.in); got != tc.want { + t.Errorf("CamelCase(%q) = %q, want %q", tc.in, got, tc.want) + } + } +} + +func TestGoPackageOption(t *testing.T) { + tests := []struct { + in string + impPath GoImportPath + pkg GoPackageName + ok bool + }{ + {"", "", "", false}, + {"foo", "", "foo", true}, + {"github.com/golang/bar", "github.com/golang/bar", "bar", true}, + {"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true}, + } + for _, tc := range tests { + d := &FileDescriptor{ + FileDescriptorProto: &descriptor.FileDescriptorProto{ + Options: &descriptor.FileOptions{ + GoPackage: &tc.in, + }, + }, + } + impPath, pkg, ok := d.goPackageOption() + if impPath != tc.impPath || pkg != tc.pkg || ok != tc.ok { + t.Errorf("go_package = %q => (%q, %q, %t), want (%q, %q, %t)", tc.in, + impPath, pkg, ok, tc.impPath, tc.pkg, tc.ok) + } + } +} + +func TestUnescape(t *testing.T) { + tests := []struct { + in string + out string + }{ + // successful cases, including all kinds of escapes + {"", ""}, + {"foo bar baz frob nitz", "foo bar baz frob nitz"}, + {`\000\001\002\003\004\005\006\007`, string([]byte{0, 1, 2, 3, 4, 5, 6, 7})}, + {`\a\b\f\n\r\t\v\\\?\'\"`, string([]byte{'\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '?', '\'', '"'})}, + {`\x10\x20\x30\x40\x50\x60\x70\x80`, string([]byte{16, 32, 48, 64, 80, 96, 112, 128})}, + // variable length octal escapes + {`\0\018\222\377\3\04\005\6\07`, string([]byte{0, 1, '8', 0222, 255, 3, 4, 5, 6, 7})}, + // malformed escape sequences left as is + {"foo \\g bar", "foo \\g bar"}, + {"foo \\xg0 bar", "foo \\xg0 bar"}, + {"\\", "\\"}, + {"\\x", "\\x"}, + {"\\xf", "\\xf"}, + {"\\777", "\\777"}, // overflows byte + } + for _, tc := range tests { + s := unescape(tc.in) + if s != tc.out { + t.Errorf("doUnescape(%q) = %q; should have been %q", tc.in, s, tc.out) + } + } +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go new file mode 100644 index 000000000..f3486d1d2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go @@ -0,0 +1,407 @@ +package main + +import ( + "bytes" + "flag" + "fmt" + "go/parser" + "go/token" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "regexp" + "runtime" + "strings" + "testing" +) + +// Set --regenerate to regenerate the golden files. +var regenerate = flag.Bool("regenerate", false, "regenerate golden files") + +// When the environment variable RUN_AS_PROTOC_GEN_GO is set, we skip running +// tests and instead act as protoc-gen-gogo. This allows the test binary to +// pass itself to protoc. +func init() { + if os.Getenv("RUN_AS_PROTOC_GEN_GO") != "" { + main() + os.Exit(0) + } +} + +func TestGolden(t *testing.T) { + workdir, err := ioutil.TempDir("", "proto-test") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(workdir) + + // Find all the proto files we need to compile. We assume that each directory + // contains the files for a single package. + packages := map[string][]string{} + err = filepath.Walk("testdata", func(path string, info os.FileInfo, err error) error { + if !strings.HasSuffix(path, ".proto") { + return nil + } + dir := filepath.Dir(path) + packages[dir] = append(packages[dir], path) + return nil + }) + if err != nil { + t.Fatal(err) + } + + // Compile each package, using this binary as protoc-gen-gogo. + for _, sources := range packages { + args := []string{"-Itestdata", "--gogo_out=plugins=grpc,paths=source_relative:" + workdir} + args = append(args, sources...) + protoc(t, args) + } + + // Compare each generated file to the golden version. + filepath.Walk(workdir, func(genPath string, info os.FileInfo, _ error) error { + if info.IsDir() { + return nil + } + + // For each generated file, figure out the path to the corresponding + // golden file in the testdata directory. + relPath, rerr := filepath.Rel(workdir, genPath) + if rerr != nil { + t.Errorf("filepath.Rel(%q, %q): %v", workdir, genPath, rerr) + return nil + } + if filepath.SplitList(relPath)[0] == ".." { + t.Errorf("generated file %q is not relative to %q", genPath, workdir) + } + goldenPath := filepath.Join("testdata", relPath) + + got, gerr := ioutil.ReadFile(genPath) + if gerr != nil { + t.Error(gerr) + return nil + } + if *regenerate { + // If --regenerate set, just rewrite the golden files. + err := ioutil.WriteFile(goldenPath, got, 0666) + if err != nil { + t.Error(err) + } + return nil + } + + want, err := ioutil.ReadFile(goldenPath) + if err != nil { + t.Error(err) + return nil + } + + want = fdescRE.ReplaceAll(want, nil) + got = fdescRE.ReplaceAll(got, nil) + if bytes.Equal(got, want) { + return nil + } + + cmd := exec.Command("diff", "-u", goldenPath, genPath) + out, _ := cmd.CombinedOutput() + t.Errorf("golden file differs: %v\n%v", relPath, string(out)) + return nil + }) +} + +var fdescRE = regexp.MustCompile(`(?ms)^var fileDescriptor.*}`) + +// Source files used by TestParameters. +const ( + aProto = ` +syntax = "proto3"; +package test.alpha; +option go_package = "package/alpha"; +import "beta/b.proto"; +message M { test.beta.M field = 1; }` + + bProto = ` +syntax = "proto3"; +package test.beta; +// no go_package option +message M {}` +) + +func TestParameters(t *testing.T) { + for _, test := range []struct { + parameters string + wantFiles map[string]bool + wantImportsA map[string]bool + wantPackageA string + wantPackageB string + }{{ + parameters: "", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + "github.com/gogo/protobuf/proto": true, + "beta": true, + }, + }, { + parameters: "import_prefix=prefix", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + // This really doesn't seem like useful behavior. + "prefixgithub.com/gogo/protobuf/proto": true, + "prefixbeta": true, + }, + }, { + // import_path only affects the 'package' line. + parameters: "import_path=import/path/of/pkg", + wantPackageA: "alpha", + wantPackageB: "pkg", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + }, { + parameters: "Mbeta/b.proto=package/gamma", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + "github.com/gogo/protobuf/proto": true, + // Rewritten by the M parameter. + "package/gamma": true, + }, + }, { + parameters: "import_prefix=prefix,Mbeta/b.proto=package/gamma", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + // import_prefix applies after M. + "prefixpackage/gamma": true, + }, + }, { + parameters: "paths=source_relative", + wantFiles: map[string]bool{ + "alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + }, { + parameters: "paths=source_relative,import_prefix=prefix", + wantFiles: map[string]bool{ + // import_prefix doesn't affect filenames. + "alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + }} { + name := test.parameters + if name == "" { + name = "defaults" + } + // TODO: Switch to t.Run when we no longer support Go 1.6. + t.Logf("TEST: %v", name) + workdir, werr := ioutil.TempDir("", "proto-test") + if werr != nil { + t.Fatal(werr) + } + defer os.RemoveAll(workdir) + + for _, dir := range []string{"alpha", "beta", "out"} { + if err := os.MkdirAll(filepath.Join(workdir, dir), 0777); err != nil { + t.Fatal(err) + } + } + + if err := ioutil.WriteFile(filepath.Join(workdir, "alpha", "a.proto"), []byte(aProto), 0666); err != nil { + t.Fatal(err) + } + + if err := ioutil.WriteFile(filepath.Join(workdir, "beta", "b.proto"), []byte(bProto), 0666); err != nil { + t.Fatal(err) + } + + protoc(t, []string{ + "-I" + workdir, + "--gogo_out=" + test.parameters + ":" + filepath.Join(workdir, "out"), + filepath.Join(workdir, "alpha", "a.proto"), + }) + protoc(t, []string{ + "-I" + workdir, + "--gogo_out=" + test.parameters + ":" + filepath.Join(workdir, "out"), + filepath.Join(workdir, "beta", "b.proto"), + }) + + contents := make(map[string]string) + gotFiles := make(map[string]bool) + outdir := filepath.Join(workdir, "out") + filepath.Walk(outdir, func(p string, info os.FileInfo, _ error) error { + if info.IsDir() { + return nil + } + base := filepath.Base(p) + if base == "a.pb.go" || base == "b.pb.go" { + b, err := ioutil.ReadFile(p) + if err != nil { + t.Fatal(err) + } + contents[base] = string(b) + } + relPath, _ := filepath.Rel(outdir, p) + gotFiles[relPath] = true + return nil + }) + for got := range gotFiles { + if runtime.GOOS == "windows" { + got = filepath.ToSlash(got) + } + if !test.wantFiles[got] { + t.Skipf("unexpected output file: %v", got) + } + } + for want := range test.wantFiles { + if runtime.GOOS == "windows" { + want = filepath.FromSlash(want) + } + if !gotFiles[want] { + t.Skipf("missing output file: %v", want) + } + } + gotPackageA, gotImports, err := parseFile(contents["a.pb.go"]) + if err != nil { + t.Fatal(err) + } + gotPackageB, _, err := parseFile(contents["b.pb.go"]) + if err != nil { + t.Fatal(err) + } + if got, want := gotPackageA, test.wantPackageA; want != got { + t.Errorf("output file a.pb.go is package %q, want %q", got, want) + } + if got, want := gotPackageB, test.wantPackageB; want != got { + t.Errorf("output file b.pb.go is package %q, want %q", got, want) + } + missingImport := false + WantImport: + for want := range test.wantImportsA { + for _, imp := range gotImports { + if `"`+want+`"` == imp { + continue WantImport + } + } + t.Errorf("output file a.pb.go does not contain expected import %q", want) + missingImport = true + } + if missingImport { + t.Error("got imports:") + for _, imp := range gotImports { + t.Errorf(" %v", imp) + } + } + } +} + +func TestPackageComment(t *testing.T) { + workdir, err := ioutil.TempDir("", "proto-test") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(workdir) + + var packageRE = regexp.MustCompile(`(?m)^package .*`) + + for i, test := range []struct { + goPackageOption string + wantPackage string + }{{ + goPackageOption: ``, + wantPackage: `package proto_package`, + }, { + goPackageOption: `option go_package = "go_package";`, + wantPackage: `package go_package`, + }, { + goPackageOption: `option go_package = "import/path/of/go_package";`, + wantPackage: `package go_package // import "import/path/of/go_package"`, + }, { + goPackageOption: `option go_package = "import/path/of/something;go_package";`, + wantPackage: `package go_package // import "import/path/of/something"`, + }, { + goPackageOption: `option go_package = "import_path;go_package";`, + wantPackage: `package go_package // import "import_path"`, + }} { + srcName := filepath.Join(workdir, fmt.Sprintf("%d.proto", i)) + tgtName := filepath.Join(workdir, fmt.Sprintf("%d.pb.go", i)) + + buf := &bytes.Buffer{} + fmt.Fprintln(buf, `syntax = "proto3";`) + fmt.Fprintln(buf, `package proto_package;`) + fmt.Fprintln(buf, test.goPackageOption) + if err := ioutil.WriteFile(srcName, buf.Bytes(), 0666); err != nil { + t.Fatal(err) + } + + protoc(t, []string{"-I" + workdir, "--gogo_out=paths=source_relative:" + workdir, srcName}) + + out, err := ioutil.ReadFile(tgtName) + if err != nil { + t.Skipf("%v", err) + } + + pkg := packageRE.Find(out) + if pkg == nil { + t.Errorf("generated .pb.go contains no package line\n\nsource:\n%v\n\noutput:\n%v", buf.String(), string(out)) + continue + } + + if got, want := string(pkg), test.wantPackage; got != want { + t.Errorf("unexpected package statement with go_package = %q\n got: %v\nwant: %v", test.goPackageOption, got, want) + } + } +} + +// parseFile returns a file's package name and a list of all packages it imports. +func parseFile(source string) (packageName string, imports []string, err error) { + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, "", source, parser.ImportsOnly) + if err != nil { + return "", nil, err + } + for _, imp := range f.Imports { + imports = append(imports, imp.Path.Value) + } + return f.Name.Name, imports, nil +} + +func protoc(t *testing.T, args []string) { + cmd := exec.Command("protoc-min-version", "--version=3.0.0") + cmd.Args = append(cmd.Args, args...) + // We set the RUN_AS_PROTOC_GEN_GO environment variable to indicate that + // the subprocess should act as a proto compiler rather than a test. + cmd.Env = append(os.Environ(), "RUN_AS_PROTOC_GEN_GO=1") + out, err := cmd.CombinedOutput() + if len(out) > 0 || err != nil { + t.Log("RUNNING: ", strings.Join(cmd.Args, " ")) + } + if len(out) > 0 { + t.Log(string(out)) + } + if err != nil { + t.Fatalf("protoc: %v", err) + } +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go index 359001b47..0b1438d21 100644 --- a/deps/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go @@ -130,19 +130,23 @@ func (g *grpc) GenerateImports(file *generator.FileDescriptor) { return } g.P("import (") - g.P(contextPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, contextPkgPath))) - g.P(grpcPkg, " ", strconv.Quote(path.Join(g.gen.ImportPrefix, grpcPkgPath))) + g.P(contextPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), contextPkgPath))) + g.P(grpcPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), grpcPkgPath))) g.P(")") g.P() } // reservedClientName records whether a client name is reserved on the client side. var reservedClientName = map[string]bool{ -// TODO: do we need any in gRPC? + // TODO: do we need any in gRPC? } func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } +// deprecationComment is the standard comment added to deprecated +// messages, fields, enums, and enum values. +var deprecationComment = "// Deprecated: Do not use." + // generateService generates all the code for the named service. func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) { path := fmt.Sprintf("6,%d", index) // 6 means service. @@ -153,12 +157,18 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi fullServName = pkg + "." + fullServName } servName := generator.CamelCase(origServName) + deprecated := service.GetOptions().GetDeprecated() g.P() - g.P("// Client API for ", servName, " service") - g.P() + g.P(fmt.Sprintf(`// %sClient is the client API for %s service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.`, servName, servName)) // Client interface. + if deprecated { + g.P("//") + g.P(deprecationComment) + } g.P("type ", servName, "Client interface {") for i, method := range service.Method { g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. @@ -174,6 +184,9 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi g.P() // NewClient factory. + if deprecated { + g.P(deprecationComment) + } g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {") g.P("return &", unexport(servName), "Client{cc}") g.P("}") @@ -196,11 +209,13 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr) } - g.P("// Server API for ", servName, " service") - g.P() - // Server interface. serverType := servName + "Server" + g.P("// ", serverType, " is the server API for ", servName, " service.") + if deprecated { + g.P("//") + g.P(deprecationComment) + } g.P("type ", serverType, " interface {") for i, method := range service.Method { g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. @@ -210,6 +225,9 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi g.P() // Server registration. + if deprecated { + g.P(deprecationComment) + } g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {") g.P("s.RegisterService(&", serviceDescVar, `, srv)`) g.P("}") @@ -283,11 +301,14 @@ func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar strin inType := g.typeName(method.GetInputType()) outType := g.typeName(method.GetOutputType()) + if method.GetOptions().GetDeprecated() { + g.P(deprecationComment) + } g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{") if !method.GetServerStreaming() && !method.GetClientStreaming() { g.P("out := new(", outType, ")") // TODO: Pass descExpr to Invoke. - g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`) + g.P(`err := c.cc.Invoke(ctx, "`, sname, `", in, out, opts...)`) g.P("if err != nil { return nil, err }") g.P("return out, nil") g.P("}") @@ -295,7 +316,7 @@ func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar strin return } streamType := unexport(servName) + methName + "Client" - g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`) + g.P("stream, err := c.cc.NewStream(ctx, ", descExpr, `, "`, sname, `", opts...)`) g.P("if err != nil { return nil, err }") g.P("x := &", streamType, "{stream}") if !method.GetClientStreaming() { diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/main.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/main.go new file mode 100644 index 000000000..dd8e79503 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/main.go @@ -0,0 +1,57 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate +// Go code. Run it by building this program and putting it in your path with +// the name +// protoc-gen-gogo +// That word 'gogo' at the end becomes part of the option string set for the +// protocol compiler, so once the protocol compiler (protoc) is installed +// you can run +// protoc --gogo_out=output_directory input_directory/file.proto +// to generate Go bindings for the protocol defined by file.proto. +// With that input, the output will be written to +// output_directory/file.pb.go +// +// The generated code is documented in the package comment for +// the library. +// +// See the README and documentation for protocol buffers to learn more: +// https://developers.google.com/protocol-buffers/ +package main + +import ( + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + command.Write(command.Generate(command.Read())) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go index 0f9f059ca..d6fea3fa0 100644 --- a/deps/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go @@ -1,24 +1,12 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: plugin.proto -// DO NOT EDIT! -/* -Package plugin_go is a generated protocol buffer package. - -It is generated from these files: - plugin.proto - -It has these top-level messages: - Version - CodeGeneratorRequest - CodeGeneratorResponse -*/ package plugin_go import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -38,14 +26,35 @@ type Version struct { Patch *int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"` // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should // be empty for mainline stable releases. - Suffix *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"` - XXX_unrecognized []byte `json:"-"` + Suffix *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Version) Reset() { *m = Version{} } -func (m *Version) String() string { return proto.CompactTextString(m) } -func (*Version) ProtoMessage() {} -func (*Version) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} } +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { + return fileDescriptor_plugin_ac234f81c61f07b3, []int{0} +} +func (m *Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Version.Unmarshal(m, b) +} +func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Version.Marshal(b, m, deterministic) +} +func (dst *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(dst, src) +} +func (m *Version) XXX_Size() int { + return xxx_messageInfo_Version.Size(m) +} +func (m *Version) XXX_DiscardUnknown() { + xxx_messageInfo_Version.DiscardUnknown(m) +} + +var xxx_messageInfo_Version proto.InternalMessageInfo func (m *Version) GetMajor() int32 { if m != nil && m.Major != nil { @@ -94,16 +103,40 @@ type CodeGeneratorRequest struct { // the entire set into memory at once. However, as of this writing, this // is not similarly optimized on protoc's end -- it will store all fields in // memory at once before sending them to the plugin. - ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"` + // + // Type names of fields and extensions in the FileDescriptorProto are always + // fully qualified. + ProtoFile []*descriptor.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"` // The version number of protocol compiler. - CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"` - XXX_unrecognized []byte `json:"-"` + CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } +func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorRequest) ProtoMessage() {} +func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_plugin_ac234f81c61f07b3, []int{1} +} +func (m *CodeGeneratorRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CodeGeneratorRequest.Unmarshal(m, b) +} +func (m *CodeGeneratorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CodeGeneratorRequest.Marshal(b, m, deterministic) +} +func (dst *CodeGeneratorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGeneratorRequest.Merge(dst, src) +} +func (m *CodeGeneratorRequest) XXX_Size() int { + return xxx_messageInfo_CodeGeneratorRequest.Size(m) +} +func (m *CodeGeneratorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGeneratorRequest.DiscardUnknown(m) } -func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } -func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorRequest) ProtoMessage() {} -func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} } +var xxx_messageInfo_CodeGeneratorRequest proto.InternalMessageInfo func (m *CodeGeneratorRequest) GetFileToGenerate() []string { if m != nil { @@ -119,7 +152,7 @@ func (m *CodeGeneratorRequest) GetParameter() string { return "" } -func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto { +func (m *CodeGeneratorRequest) GetProtoFile() []*descriptor.FileDescriptorProto { if m != nil { return m.ProtoFile } @@ -143,15 +176,36 @@ type CodeGeneratorResponse struct { // problem in protoc itself -- such as the input CodeGeneratorRequest being // unparseable -- should be reported by writing a message to stderr and // exiting with a non-zero status code. - Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` - File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` - XXX_unrecognized []byte `json:"-"` + Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` + File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } -func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } -func (*CodeGeneratorResponse) ProtoMessage() {} -func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{2} } +func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } +func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorResponse) ProtoMessage() {} +func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_plugin_ac234f81c61f07b3, []int{2} +} +func (m *CodeGeneratorResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CodeGeneratorResponse.Unmarshal(m, b) +} +func (m *CodeGeneratorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CodeGeneratorResponse.Marshal(b, m, deterministic) +} +func (dst *CodeGeneratorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGeneratorResponse.Merge(dst, src) +} +func (m *CodeGeneratorResponse) XXX_Size() int { + return xxx_messageInfo_CodeGeneratorResponse.Size(m) +} +func (m *CodeGeneratorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGeneratorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeGeneratorResponse proto.InternalMessageInfo func (m *CodeGeneratorResponse) GetError() string { if m != nil && m.Error != nil { @@ -220,16 +274,35 @@ type CodeGeneratorResponse_File struct { // If |insertion_point| is present, |name| must also be present. InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"` // The file contents. - Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` - XXX_unrecognized []byte `json:"-"` + Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} } func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) } func (*CodeGeneratorResponse_File) ProtoMessage() {} func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { - return fileDescriptorPlugin, []int{2, 0} + return fileDescriptor_plugin_ac234f81c61f07b3, []int{2, 0} +} +func (m *CodeGeneratorResponse_File) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CodeGeneratorResponse_File.Unmarshal(m, b) +} +func (m *CodeGeneratorResponse_File) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CodeGeneratorResponse_File.Marshal(b, m, deterministic) +} +func (dst *CodeGeneratorResponse_File) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGeneratorResponse_File.Merge(dst, src) } +func (m *CodeGeneratorResponse_File) XXX_Size() int { + return xxx_messageInfo_CodeGeneratorResponse_File.Size(m) +} +func (m *CodeGeneratorResponse_File) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGeneratorResponse_File.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeGeneratorResponse_File proto.InternalMessageInfo func (m *CodeGeneratorResponse_File) GetName() string { if m != nil && m.Name != nil { @@ -259,9 +332,9 @@ func init() { proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File") } -func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) } +func init() { proto.RegisterFile("plugin.proto", fileDescriptor_plugin_ac234f81c61f07b3) } -var fileDescriptorPlugin = []byte{ +var fileDescriptor_plugin_ac234f81c61f07b3 = []byte{ // 383 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcd, 0x6a, 0xd5, 0x40, 0x14, 0xc7, 0x89, 0x37, 0xb5, 0xe4, 0xb4, 0x34, 0x65, 0xa8, 0x32, 0x94, 0x2e, 0xe2, 0x45, 0x30, diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile new file mode 100644 index 000000000..b85cc0f3e --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile @@ -0,0 +1,35 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +all: test + +test: + go test diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go new file mode 100644 index 000000000..3980aa7f0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go @@ -0,0 +1,234 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// deprecated/deprecated.proto is a deprecated file. + +package deprecated // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated" + +/* +package deprecated contains only deprecated messages and services. +*/ + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// DeprecatedEnum contains deprecated values. +type DeprecatedEnum int32 // Deprecated: Do not use. +const ( + // DEPRECATED is the iota value of this enum. + DeprecatedEnum_DEPRECATED DeprecatedEnum = 0 // Deprecated: Do not use. +) + +var DeprecatedEnum_name = map[int32]string{ + 0: "DEPRECATED", +} +var DeprecatedEnum_value = map[string]int32{ + "DEPRECATED": 0, +} + +func (x DeprecatedEnum) String() string { + return proto.EnumName(DeprecatedEnum_name, int32(x)) +} +func (DeprecatedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_deprecated_1b284d1f30819a6c, []int{0} +} + +// DeprecatedRequest is a request to DeprecatedCall. +// +// Deprecated: Do not use. +type DeprecatedRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeprecatedRequest) Reset() { *m = DeprecatedRequest{} } +func (m *DeprecatedRequest) String() string { return proto.CompactTextString(m) } +func (*DeprecatedRequest) ProtoMessage() {} +func (*DeprecatedRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_deprecated_1b284d1f30819a6c, []int{0} +} +func (m *DeprecatedRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeprecatedRequest.Unmarshal(m, b) +} +func (m *DeprecatedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeprecatedRequest.Marshal(b, m, deterministic) +} +func (dst *DeprecatedRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeprecatedRequest.Merge(dst, src) +} +func (m *DeprecatedRequest) XXX_Size() int { + return xxx_messageInfo_DeprecatedRequest.Size(m) +} +func (m *DeprecatedRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeprecatedRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeprecatedRequest proto.InternalMessageInfo + +// Deprecated: Do not use. +type DeprecatedResponse struct { + // DeprecatedField contains a DeprecatedEnum. + DeprecatedField DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeprecatedResponse) Reset() { *m = DeprecatedResponse{} } +func (m *DeprecatedResponse) String() string { return proto.CompactTextString(m) } +func (*DeprecatedResponse) ProtoMessage() {} +func (*DeprecatedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_deprecated_1b284d1f30819a6c, []int{1} +} +func (m *DeprecatedResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeprecatedResponse.Unmarshal(m, b) +} +func (m *DeprecatedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeprecatedResponse.Marshal(b, m, deterministic) +} +func (dst *DeprecatedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeprecatedResponse.Merge(dst, src) +} +func (m *DeprecatedResponse) XXX_Size() int { + return xxx_messageInfo_DeprecatedResponse.Size(m) +} +func (m *DeprecatedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeprecatedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeprecatedResponse proto.InternalMessageInfo + +// Deprecated: Do not use. +func (m *DeprecatedResponse) GetDeprecatedField() DeprecatedEnum { + if m != nil { + return m.DeprecatedField + } + return DeprecatedEnum_DEPRECATED +} + +func init() { + proto.RegisterType((*DeprecatedRequest)(nil), "deprecated.DeprecatedRequest") + proto.RegisterType((*DeprecatedResponse)(nil), "deprecated.DeprecatedResponse") + proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_value) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// DeprecatedServiceClient is the client API for DeprecatedService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type DeprecatedServiceClient interface { + // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse. + DeprecatedCall(ctx context.Context, in *DeprecatedRequest, opts ...grpc.CallOption) (*DeprecatedResponse, error) +} + +type deprecatedServiceClient struct { + cc *grpc.ClientConn +} + +// Deprecated: Do not use. +func NewDeprecatedServiceClient(cc *grpc.ClientConn) DeprecatedServiceClient { + return &deprecatedServiceClient{cc} +} + +// Deprecated: Do not use. +func (c *deprecatedServiceClient) DeprecatedCall(ctx context.Context, in *DeprecatedRequest, opts ...grpc.CallOption) (*DeprecatedResponse, error) { + out := new(DeprecatedResponse) + err := c.cc.Invoke(ctx, "/deprecated.DeprecatedService/DeprecatedCall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DeprecatedServiceServer is the server API for DeprecatedService service. +// +// Deprecated: Do not use. +type DeprecatedServiceServer interface { + // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse. + DeprecatedCall(context.Context, *DeprecatedRequest) (*DeprecatedResponse, error) +} + +// Deprecated: Do not use. +func RegisterDeprecatedServiceServer(s *grpc.Server, srv DeprecatedServiceServer) { + s.RegisterService(&_DeprecatedService_serviceDesc, srv) +} + +func _DeprecatedService_DeprecatedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeprecatedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeprecatedServiceServer).DeprecatedCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/deprecated.DeprecatedService/DeprecatedCall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeprecatedServiceServer).DeprecatedCall(ctx, req.(*DeprecatedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _DeprecatedService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "deprecated.DeprecatedService", + HandlerType: (*DeprecatedServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeprecatedCall", + Handler: _DeprecatedService_DeprecatedCall_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "deprecated/deprecated.proto", +} + +func init() { + proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_deprecated_1b284d1f30819a6c) +} + +var fileDescriptor_deprecated_1b284d1f30819a6c = []byte{ + // 245 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x49, 0x2d, 0x28, + 0x4a, 0x4d, 0x4e, 0x2c, 0x49, 0x4d, 0xd1, 0x47, 0x30, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, + 0xb8, 0x10, 0x22, 0x4a, 0xe2, 0x5c, 0x82, 0x2e, 0x70, 0x5e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, + 0x89, 0x15, 0x93, 0x04, 0xa3, 0x52, 0x32, 0x97, 0x10, 0xb2, 0x44, 0x71, 0x41, 0x7e, 0x5e, 0x71, + 0xaa, 0x90, 0x27, 0x97, 0x00, 0x42, 0x73, 0x7c, 0x5a, 0x66, 0x6a, 0x4e, 0x8a, 0x04, 0xa3, 0x02, + 0xa3, 0x06, 0x9f, 0x91, 0x94, 0x1e, 0x92, 0x3d, 0x08, 0x9d, 0xae, 0x79, 0xa5, 0xb9, 0x4e, 0x4c, + 0x12, 0x8c, 0x41, 0xfc, 0x08, 0x69, 0x37, 0x90, 0x36, 0x90, 0x25, 0x5a, 0x1a, 0x5c, 0x7c, 0xa8, + 0x4a, 0x85, 0x84, 0xb8, 0xb8, 0x5c, 0x5c, 0x03, 0x82, 0x5c, 0x9d, 0x1d, 0x43, 0x5c, 0x5d, 0x04, + 0x18, 0xa4, 0x98, 0x38, 0x18, 0xa5, 0x98, 0x24, 0x18, 0x8d, 0xf2, 0x90, 0xdd, 0x19, 0x9c, 0x5a, + 0x54, 0x96, 0x99, 0x9c, 0x2a, 0x14, 0x82, 0xac, 0xdd, 0x39, 0x31, 0x27, 0x47, 0x48, 0x16, 0xbb, + 0x2b, 0xa0, 0x1e, 0x93, 0x92, 0xc3, 0x25, 0x0d, 0xf1, 0x9e, 0x12, 0x73, 0x07, 0x13, 0xa3, 0x14, + 0x88, 0x70, 0x72, 0x8c, 0xb2, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x07, 0x5e, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, + 0x9a, 0xa7, 0x0b, 0x96, 0x28, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0x44, 0x0a, 0xe9, 0x1d, + 0x8c, 0x8c, 0x49, 0x6c, 0x60, 0x75, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x28, 0xee, + 0x83, 0x8c, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.proto new file mode 100644 index 000000000..4a4b84139 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.proto @@ -0,0 +1,69 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +// package deprecated contains only deprecated messages and services. +package deprecated; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated"; + +option deprecated = true; // file-level deprecation + +// DeprecatedRequest is a request to DeprecatedCall. +message DeprecatedRequest { + option deprecated = true; +} + +message DeprecatedResponse { + // comment for DeprecatedResponse is omitted to guarantee deprecation + // message doesn't append unnecessary comments. + option deprecated = true; + // DeprecatedField contains a DeprecatedEnum. + DeprecatedEnum deprecated_field = 1 [deprecated=true]; +} + +// DeprecatedEnum contains deprecated values. +enum DeprecatedEnum { + option deprecated = true; + // DEPRECATED is the iota value of this enum. + DEPRECATED = 0 [deprecated=true]; +} + +// DeprecatedService is for making DeprecatedCalls +service DeprecatedService { + option deprecated = true; + + // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse. + rpc DeprecatedCall(DeprecatedRequest) returns (DeprecatedResponse) { + option deprecated = true; + } +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.pb.go new file mode 100644 index 000000000..b40c82c69 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.pb.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: extension_base/extension_base.proto + +package extension_base // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type BaseMessage struct { + Height *int32 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BaseMessage) Reset() { *m = BaseMessage{} } +func (m *BaseMessage) String() string { return proto.CompactTextString(m) } +func (*BaseMessage) ProtoMessage() {} +func (*BaseMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_base_b5c437cd79d90e00, []int{0} +} + +var extRange_BaseMessage = []proto.ExtensionRange{ + {Start: 4, End: 9}, + {Start: 16, End: 536870911}, +} + +func (*BaseMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_BaseMessage +} +func (m *BaseMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BaseMessage.Unmarshal(m, b) +} +func (m *BaseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BaseMessage.Marshal(b, m, deterministic) +} +func (dst *BaseMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_BaseMessage.Merge(dst, src) +} +func (m *BaseMessage) XXX_Size() int { + return xxx_messageInfo_BaseMessage.Size(m) +} +func (m *BaseMessage) XXX_DiscardUnknown() { + xxx_messageInfo_BaseMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_BaseMessage proto.InternalMessageInfo + +func (m *BaseMessage) GetHeight() int32 { + if m != nil && m.Height != nil { + return *m.Height + } + return 0 +} + +// Another message that may be extended, using message_set_wire_format. +type OldStyleMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldStyleMessage) Reset() { *m = OldStyleMessage{} } +func (m *OldStyleMessage) String() string { return proto.CompactTextString(m) } +func (*OldStyleMessage) ProtoMessage() {} +func (*OldStyleMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_base_b5c437cd79d90e00, []int{1} +} + +func (m *OldStyleMessage) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) +} +func (m *OldStyleMessage) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) +} + +var extRange_OldStyleMessage = []proto.ExtensionRange{ + {Start: 100, End: 2147483646}, +} + +func (*OldStyleMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OldStyleMessage +} +func (m *OldStyleMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldStyleMessage.Unmarshal(m, b) +} +func (m *OldStyleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldStyleMessage.Marshal(b, m, deterministic) +} +func (dst *OldStyleMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldStyleMessage.Merge(dst, src) +} +func (m *OldStyleMessage) XXX_Size() int { + return xxx_messageInfo_OldStyleMessage.Size(m) +} +func (m *OldStyleMessage) XXX_DiscardUnknown() { + xxx_messageInfo_OldStyleMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_OldStyleMessage proto.InternalMessageInfo + +func init() { + proto.RegisterType((*BaseMessage)(nil), "extension_base.BaseMessage") + proto.RegisterType((*OldStyleMessage)(nil), "extension_base.OldStyleMessage") +} + +func init() { + proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_extension_base_b5c437cd79d90e00) +} + +var fileDescriptor_extension_base_b5c437cd79d90e00 = []byte{ + // 175 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xad, 0x28, 0x49, + 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x47, 0xe5, 0xea, 0x15, 0x14, + 0xe5, 0x97, 0xe4, 0x0b, 0xf1, 0xa1, 0x8a, 0x2a, 0x99, 0x72, 0x71, 0x3b, 0x25, 0x16, 0xa7, 0xfa, + 0xa6, 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x89, 0x71, 0xb1, 0x65, 0xa4, 0x66, 0xa6, 0x67, 0x94, + 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x06, 0x41, 0x79, 0x5a, 0x2c, 0x1c, 0x2c, 0x02, 0x5c, 0x5a, + 0x1c, 0x1c, 0x02, 0x02, 0x0d, 0x0d, 0x0d, 0x0d, 0x4c, 0x4a, 0xf2, 0x5c, 0xfc, 0xfe, 0x39, 0x29, + 0xc1, 0x25, 0x95, 0x39, 0x30, 0xad, 0x5a, 0x1c, 0x1c, 0x29, 0x02, 0xff, 0xff, 0xff, 0xff, 0xcf, + 0x6e, 0xc5, 0xc4, 0xc1, 0xe8, 0xe4, 0x14, 0xe5, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, + 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e, 0xaf, 0x0f, 0x76, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91, + 0xac, 0x9b, 0x9e, 0x9a, 0xa7, 0x0b, 0x96, 0x28, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0x44, + 0x73, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x60, 0xef, 0xa3, 0xb7, 0xd1, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.proto similarity index 95% rename from deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto rename to deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.proto index 94acfc1bc..055f31ac1 100644 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_base.proto +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.proto @@ -33,6 +33,8 @@ syntax = "proto2"; package extension_base; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base"; + message BaseMessage { optional int32 height = 1; extensions 4 to 9; diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.pb.go new file mode 100644 index 000000000..71968db3e --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.pb.go @@ -0,0 +1,78 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: extension_extra/extension_extra.proto + +package extension_extra // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type ExtraMessage struct { + Width *int32 `protobuf:"varint,1,opt,name=width" json:"width,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtraMessage) Reset() { *m = ExtraMessage{} } +func (m *ExtraMessage) String() string { return proto.CompactTextString(m) } +func (*ExtraMessage) ProtoMessage() {} +func (*ExtraMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_extra_e06efb14fc6ecf89, []int{0} +} +func (m *ExtraMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtraMessage.Unmarshal(m, b) +} +func (m *ExtraMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtraMessage.Marshal(b, m, deterministic) +} +func (dst *ExtraMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtraMessage.Merge(dst, src) +} +func (m *ExtraMessage) XXX_Size() int { + return xxx_messageInfo_ExtraMessage.Size(m) +} +func (m *ExtraMessage) XXX_DiscardUnknown() { + xxx_messageInfo_ExtraMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtraMessage proto.InternalMessageInfo + +func (m *ExtraMessage) GetWidth() int32 { + if m != nil && m.Width != nil { + return *m.Width + } + return 0 +} + +func init() { + proto.RegisterType((*ExtraMessage)(nil), "extension_extra.ExtraMessage") +} + +func init() { + proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_extension_extra_e06efb14fc6ecf89) +} + +var fileDescriptor_extension_extra_e06efb14fc6ecf89 = []byte{ + // 130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xad, 0x28, 0x49, + 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0xad, 0x28, 0x29, 0x4a, 0xd4, 0x47, 0xe3, 0xeb, 0x15, + 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xf1, 0xa3, 0x09, 0x2b, 0xa9, 0x70, 0xf1, 0xb8, 0x82, 0x18, 0xbe, + 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0x42, 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x12, + 0x8c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x93, 0x73, 0x94, 0x63, 0x7a, 0x66, 0x49, 0x46, + 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x7a, 0xbe, 0x3e, 0xd8, 0xbc, 0xa4, 0xd2, + 0x34, 0x08, 0x23, 0x59, 0x37, 0x3d, 0x35, 0x4f, 0x17, 0x2c, 0x51, 0x92, 0x5a, 0x5c, 0x92, 0x92, + 0x58, 0x82, 0xe1, 0x02, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x01, 0x1c, 0x4a, 0xa3, 0x00, + 0x00, 0x00, +} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.proto similarity index 95% rename from deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto rename to deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.proto index fca7f600c..26fafed3c 100644 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra.proto +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.proto @@ -33,6 +33,8 @@ syntax = "proto2"; package extension_extra; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra"; + message ExtraMessage { optional int32 width = 1; } diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go new file mode 100644 index 000000000..645c1e996 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go @@ -0,0 +1,202 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Test that we can use protocol buffers that use extensions. + +package testdata + +import ( + "bytes" + "regexp" + "testing" + + "github.com/gogo/protobuf/proto" + base "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base" + user "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user" +) + +func TestSingleFieldExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(178), + } + + // Use extension within scope of another type. + vol := proto.Uint32(11) + if err := proto.SetExtension(bm, user.E_LoudMessage_Volume, vol); err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, berr := proto.Marshal(bm) + if berr != nil { + t.Fatal("Failed encoding message with extension:", berr) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Decoded message didn't contain extension.") + } + vol_out, err := proto.GetExtension(bm_new, user.E_LoudMessage_Volume) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if v := vol_out.(*uint32); *v != *vol { + t.Errorf("vol_out = %v, expected %v", *v, *vol) + } + proto.ClearExtension(bm_new, user.E_LoudMessage_Volume) + if proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + // Use extension that is itself a message. + um := &user.UserMessage{ + Name: proto.String("Dave"), + Rank: proto.String("Major"), + } + if err := proto.SetExtension(bm, user.E_LoginMessage_UserMessage, um); err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, berr := proto.Marshal(bm) + if berr != nil { + t.Fatal("Failed encoding message with extension:", berr) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Decoded message didn't contain extension.") + } + um_out, err := proto.GetExtension(bm_new, user.E_LoginMessage_UserMessage) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if n := um_out.(*user.UserMessage).Name; *n != *um.Name { + t.Errorf("um_out.Name = %q, expected %q", *n, *um.Name) + } + if r := um_out.(*user.UserMessage).Rank; *r != *um.Rank { + t.Errorf("um_out.Rank = %q, expected %q", *r, *um.Rank) + } + proto.ClearExtension(bm_new, user.E_LoginMessage_UserMessage) + if proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Failed clearing extension.") + } +} + +func TestTopLevelExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + width := proto.Int32(17) + if err := proto.SetExtension(bm, user.E_Width, width); err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, berr := proto.Marshal(bm) + if berr != nil { + t.Fatal("Failed encoding message with extension:", berr) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Decoded message didn't contain extension.") + } + width_out, err := proto.GetExtension(bm_new, user.E_Width) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if w := width_out.(*int32); *w != *width { + t.Errorf("width_out = %v, expected %v", *w, *width) + } + proto.ClearExtension(bm_new, user.E_Width) + if proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageSetWireFormat(t *testing.T) { + osm := new(base.OldStyleMessage) + osp := &user.OldStyleParcel{ + Name: proto.String("Dave"), + Height: proto.Int32(178), + } + + if err := proto.SetExtension(osm, user.E_OldStyleParcel_MessageSetExtension, osp); err != nil { + t.Fatal("Failed setting extension:", err) + } + + buf, berr := proto.Marshal(osm) + if berr != nil { + t.Fatal("Failed encoding message:", berr) + } + + // Data generated from Python implementation. + expected := []byte{ + 11, 16, 209, 15, 26, 9, 10, 4, 68, 97, 118, 101, 16, 178, 1, 12, + } + + if !bytes.Equal(expected, buf) { + t.Errorf("Encoding mismatch.\nwant %+v\n got %+v", expected, buf) + } + + // Check that it is restored correctly. + osm = new(base.OldStyleMessage) + if err := proto.Unmarshal(buf, osm); err != nil { + t.Fatal("Failed decoding message:", err) + } + osp_out, err := proto.GetExtension(osm, user.E_OldStyleParcel_MessageSetExtension) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + osp = osp_out.(*user.OldStyleParcel) + if *osp.Name != "Dave" || *osp.Height != 178 { + t.Errorf("Retrieved extension from decoded message is not correct: %+v", osp) + } +} + +func main() { + // simpler than rigging up gotest + testing.Main(regexp.MatchString, []testing.InternalTest{ + {"TestSingleFieldExtension", TestSingleFieldExtension}, + {"TestMessageExtension", TestMessageExtension}, + {"TestTopLevelExtension", TestTopLevelExtension}, + }, + []testing.InternalBenchmark{}, + []testing.InternalExample{}) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.pb.go new file mode 100644 index 000000000..43c2b469a --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.pb.go @@ -0,0 +1,401 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: extension_user/extension_user.proto + +package extension_user // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import extension_base "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base" +import extension_extra "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type UserMessage struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Rank *string `protobuf:"bytes,2,opt,name=rank" json:"rank,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserMessage) Reset() { *m = UserMessage{} } +func (m *UserMessage) String() string { return proto.CompactTextString(m) } +func (*UserMessage) ProtoMessage() {} +func (*UserMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{0} +} +func (m *UserMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserMessage.Unmarshal(m, b) +} +func (m *UserMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserMessage.Marshal(b, m, deterministic) +} +func (dst *UserMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserMessage.Merge(dst, src) +} +func (m *UserMessage) XXX_Size() int { + return xxx_messageInfo_UserMessage.Size(m) +} +func (m *UserMessage) XXX_DiscardUnknown() { + xxx_messageInfo_UserMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_UserMessage proto.InternalMessageInfo + +func (m *UserMessage) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *UserMessage) GetRank() string { + if m != nil && m.Rank != nil { + return *m.Rank + } + return "" +} + +// Extend inside the scope of another type +type LoudMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoudMessage) Reset() { *m = LoudMessage{} } +func (m *LoudMessage) String() string { return proto.CompactTextString(m) } +func (*LoudMessage) ProtoMessage() {} +func (*LoudMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{1} +} + +var extRange_LoudMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*LoudMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_LoudMessage +} +func (m *LoudMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoudMessage.Unmarshal(m, b) +} +func (m *LoudMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoudMessage.Marshal(b, m, deterministic) +} +func (dst *LoudMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoudMessage.Merge(dst, src) +} +func (m *LoudMessage) XXX_Size() int { + return xxx_messageInfo_LoudMessage.Size(m) +} +func (m *LoudMessage) XXX_DiscardUnknown() { + xxx_messageInfo_LoudMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_LoudMessage proto.InternalMessageInfo + +var E_LoudMessage_Volume = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 8, + Name: "extension_user.LoudMessage.volume", + Tag: "varint,8,opt,name=volume", + Filename: "extension_user/extension_user.proto", +} + +// Extend inside the scope of another type, using a message. +type LoginMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoginMessage) Reset() { *m = LoginMessage{} } +func (m *LoginMessage) String() string { return proto.CompactTextString(m) } +func (*LoginMessage) ProtoMessage() {} +func (*LoginMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{2} +} +func (m *LoginMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoginMessage.Unmarshal(m, b) +} +func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoginMessage.Marshal(b, m, deterministic) +} +func (dst *LoginMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginMessage.Merge(dst, src) +} +func (m *LoginMessage) XXX_Size() int { + return xxx_messageInfo_LoginMessage.Size(m) +} +func (m *LoginMessage) XXX_DiscardUnknown() { + xxx_messageInfo_LoginMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_LoginMessage proto.InternalMessageInfo + +var E_LoginMessage_UserMessage = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*UserMessage)(nil), + Field: 16, + Name: "extension_user.LoginMessage.user_message", + Tag: "bytes,16,opt,name=user_message,json=userMessage", + Filename: "extension_user/extension_user.proto", +} + +type Detail struct { + Color *string `protobuf:"bytes,1,opt,name=color" json:"color,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Detail) Reset() { *m = Detail{} } +func (m *Detail) String() string { return proto.CompactTextString(m) } +func (*Detail) ProtoMessage() {} +func (*Detail) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{3} +} +func (m *Detail) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Detail.Unmarshal(m, b) +} +func (m *Detail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Detail.Marshal(b, m, deterministic) +} +func (dst *Detail) XXX_Merge(src proto.Message) { + xxx_messageInfo_Detail.Merge(dst, src) +} +func (m *Detail) XXX_Size() int { + return xxx_messageInfo_Detail.Size(m) +} +func (m *Detail) XXX_DiscardUnknown() { + xxx_messageInfo_Detail.DiscardUnknown(m) +} + +var xxx_messageInfo_Detail proto.InternalMessageInfo + +func (m *Detail) GetColor() string { + if m != nil && m.Color != nil { + return *m.Color + } + return "" +} + +// An extension of an extension +type Announcement struct { + Words *string `protobuf:"bytes,1,opt,name=words" json:"words,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Announcement) Reset() { *m = Announcement{} } +func (m *Announcement) String() string { return proto.CompactTextString(m) } +func (*Announcement) ProtoMessage() {} +func (*Announcement) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{4} +} +func (m *Announcement) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Announcement.Unmarshal(m, b) +} +func (m *Announcement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Announcement.Marshal(b, m, deterministic) +} +func (dst *Announcement) XXX_Merge(src proto.Message) { + xxx_messageInfo_Announcement.Merge(dst, src) +} +func (m *Announcement) XXX_Size() int { + return xxx_messageInfo_Announcement.Size(m) +} +func (m *Announcement) XXX_DiscardUnknown() { + xxx_messageInfo_Announcement.DiscardUnknown(m) +} + +var xxx_messageInfo_Announcement proto.InternalMessageInfo + +func (m *Announcement) GetWords() string { + if m != nil && m.Words != nil { + return *m.Words + } + return "" +} + +var E_Announcement_LoudExt = &proto.ExtensionDesc{ + ExtendedType: (*LoudMessage)(nil), + ExtensionType: (*Announcement)(nil), + Field: 100, + Name: "extension_user.Announcement.loud_ext", + Tag: "bytes,100,opt,name=loud_ext,json=loudExt", + Filename: "extension_user/extension_user.proto", +} + +// Something that can be put in a message set. +type OldStyleParcel struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Height *int32 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldStyleParcel) Reset() { *m = OldStyleParcel{} } +func (m *OldStyleParcel) String() string { return proto.CompactTextString(m) } +func (*OldStyleParcel) ProtoMessage() {} +func (*OldStyleParcel) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{5} +} +func (m *OldStyleParcel) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldStyleParcel.Unmarshal(m, b) +} +func (m *OldStyleParcel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldStyleParcel.Marshal(b, m, deterministic) +} +func (dst *OldStyleParcel) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldStyleParcel.Merge(dst, src) +} +func (m *OldStyleParcel) XXX_Size() int { + return xxx_messageInfo_OldStyleParcel.Size(m) +} +func (m *OldStyleParcel) XXX_DiscardUnknown() { + xxx_messageInfo_OldStyleParcel.DiscardUnknown(m) +} + +var xxx_messageInfo_OldStyleParcel proto.InternalMessageInfo + +func (m *OldStyleParcel) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *OldStyleParcel) GetHeight() int32 { + if m != nil && m.Height != nil { + return *m.Height + } + return 0 +} + +var E_OldStyleParcel_MessageSetExtension = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.OldStyleMessage)(nil), + ExtensionType: (*OldStyleParcel)(nil), + Field: 2001, + Name: "extension_user.OldStyleParcel", + Tag: "bytes,2001,opt,name=message_set_extension,json=messageSetExtension", + Filename: "extension_user/extension_user.proto", +} + +var E_UserMessage = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*UserMessage)(nil), + Field: 5, + Name: "extension_user.user_message", + Tag: "bytes,5,opt,name=user_message,json=userMessage", + Filename: "extension_user/extension_user.proto", +} + +var E_ExtraMessage = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*extension_extra.ExtraMessage)(nil), + Field: 9, + Name: "extension_user.extra_message", + Tag: "bytes,9,opt,name=extra_message,json=extraMessage", + Filename: "extension_user/extension_user.proto", +} + +var E_Width = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 6, + Name: "extension_user.width", + Tag: "varint,6,opt,name=width", + Filename: "extension_user/extension_user.proto", +} + +var E_Area = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 7, + Name: "extension_user.area", + Tag: "varint,7,opt,name=area", + Filename: "extension_user/extension_user.proto", +} + +var E_Detail = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: ([]*Detail)(nil), + Field: 17, + Name: "extension_user.detail", + Tag: "bytes,17,rep,name=detail", + Filename: "extension_user/extension_user.proto", +} + +func init() { + proto.RegisterType((*UserMessage)(nil), "extension_user.UserMessage") + proto.RegisterType((*LoudMessage)(nil), "extension_user.LoudMessage") + proto.RegisterType((*LoginMessage)(nil), "extension_user.LoginMessage") + proto.RegisterType((*Detail)(nil), "extension_user.Detail") + proto.RegisterType((*Announcement)(nil), "extension_user.Announcement") + proto.RegisterMessageSetType((*OldStyleParcel)(nil), 2001, "extension_user.OldStyleParcel") + proto.RegisterType((*OldStyleParcel)(nil), "extension_user.OldStyleParcel") + proto.RegisterExtension(E_LoudMessage_Volume) + proto.RegisterExtension(E_LoginMessage_UserMessage) + proto.RegisterExtension(E_Announcement_LoudExt) + proto.RegisterExtension(E_OldStyleParcel_MessageSetExtension) + proto.RegisterExtension(E_UserMessage) + proto.RegisterExtension(E_ExtraMessage) + proto.RegisterExtension(E_Width) + proto.RegisterExtension(E_Area) + proto.RegisterExtension(E_Detail) +} + +func init() { + proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_extension_user_026ca4e46735207f) +} + +var fileDescriptor_extension_user_026ca4e46735207f = []byte{ + // 490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x95, 0xdb, 0xc6, 0x4d, 0xc7, 0x69, 0x29, 0x06, 0xaa, 0xa8, 0x40, 0xb1, 0x8c, 0x90, 0x2c, + 0xa4, 0xc6, 0xc2, 0x88, 0x8b, 0x4f, 0x10, 0x91, 0x13, 0x41, 0x20, 0x17, 0x2e, 0x70, 0xb0, 0x36, + 0xf6, 0xe0, 0x58, 0xb5, 0x77, 0xd1, 0xee, 0x9a, 0x06, 0x4e, 0xf9, 0x26, 0xfe, 0x84, 0x3f, 0x42, + 0x5e, 0xaf, 0x5b, 0xc7, 0x48, 0x11, 0xbd, 0x44, 0xfb, 0x66, 0xdf, 0xbc, 0x99, 0x7d, 0x33, 0x31, + 0x3c, 0xc5, 0x95, 0x44, 0x2a, 0x72, 0x46, 0xe3, 0x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63, 0x19, 0xf3, 0xd5, 0x5f, 0x79, 0x51, 0x7d, 0x6b, 0x0e, 0xc9, 0x79, + 0x86, 0xf4, 0x5c, 0x5d, 0x48, 0x14, 0x32, 0x25, 0x92, 0xf4, 0xbe, 0x2b, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0xc5, 0x88, 0x70, 0x88, 0x77, 0x04, 0x00, 0x00, +} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.proto similarity index 94% rename from deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto rename to deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.proto index ff65873dd..6eaacebc9 100644 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/extension_user.proto +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.proto @@ -31,11 +31,13 @@ syntax = "proto2"; -import "extension_base.proto"; -import "extension_extra.proto"; +import "extension_base/extension_base.proto"; +import "extension_extra/extension_extra.proto"; package extension_user; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user"; + message UserMessage { optional string name = 1; optional string rank = 2; diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.pb.go new file mode 100644 index 000000000..8dcafa21b --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.pb.go @@ -0,0 +1,444 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: grpc/grpc.proto + +package testing // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type SimpleRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleRequest) Reset() { *m = SimpleRequest{} } +func (m *SimpleRequest) String() string { return proto.CompactTextString(m) } +func (*SimpleRequest) ProtoMessage() {} +func (*SimpleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{0} +} +func (m *SimpleRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleRequest.Unmarshal(m, b) +} +func (m *SimpleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleRequest.Marshal(b, m, deterministic) +} +func (dst *SimpleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleRequest.Merge(dst, src) +} +func (m *SimpleRequest) XXX_Size() int { + return xxx_messageInfo_SimpleRequest.Size(m) +} +func (m *SimpleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleRequest proto.InternalMessageInfo + +type SimpleResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleResponse) Reset() { *m = SimpleResponse{} } +func (m *SimpleResponse) String() string { return proto.CompactTextString(m) } +func (*SimpleResponse) ProtoMessage() {} +func (*SimpleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{1} +} +func (m *SimpleResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleResponse.Unmarshal(m, b) +} +func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleResponse.Marshal(b, m, deterministic) +} +func (dst *SimpleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleResponse.Merge(dst, src) +} +func (m *SimpleResponse) XXX_Size() int { + return xxx_messageInfo_SimpleResponse.Size(m) +} +func (m *SimpleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleResponse proto.InternalMessageInfo + +type StreamMsg struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StreamMsg) Reset() { *m = StreamMsg{} } +func (m *StreamMsg) String() string { return proto.CompactTextString(m) } +func (*StreamMsg) ProtoMessage() {} +func (*StreamMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{2} +} +func (m *StreamMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StreamMsg.Unmarshal(m, b) +} +func (m *StreamMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StreamMsg.Marshal(b, m, deterministic) +} +func (dst *StreamMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamMsg.Merge(dst, src) +} +func (m *StreamMsg) XXX_Size() int { + return xxx_messageInfo_StreamMsg.Size(m) +} +func (m *StreamMsg) XXX_DiscardUnknown() { + xxx_messageInfo_StreamMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamMsg proto.InternalMessageInfo + +type StreamMsg2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StreamMsg2) Reset() { *m = StreamMsg2{} } +func (m *StreamMsg2) String() string { return proto.CompactTextString(m) } +func (*StreamMsg2) ProtoMessage() {} +func (*StreamMsg2) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{3} +} +func (m *StreamMsg2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StreamMsg2.Unmarshal(m, b) +} +func (m *StreamMsg2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StreamMsg2.Marshal(b, m, deterministic) +} +func (dst *StreamMsg2) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamMsg2.Merge(dst, src) +} +func (m *StreamMsg2) XXX_Size() int { + return xxx_messageInfo_StreamMsg2.Size(m) +} +func (m *StreamMsg2) XXX_DiscardUnknown() { + xxx_messageInfo_StreamMsg2.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamMsg2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SimpleRequest)(nil), "grpc.testing.SimpleRequest") + proto.RegisterType((*SimpleResponse)(nil), "grpc.testing.SimpleResponse") + proto.RegisterType((*StreamMsg)(nil), "grpc.testing.StreamMsg") + proto.RegisterType((*StreamMsg2)(nil), "grpc.testing.StreamMsg2") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// TestClient is the client API for Test service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TestClient interface { + UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) + // This RPC streams from the server only. + Downstream(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (Test_DownstreamClient, error) + // This RPC streams from the client. + Upstream(ctx context.Context, opts ...grpc.CallOption) (Test_UpstreamClient, error) + // This one streams in both directions. + Bidi(ctx context.Context, opts ...grpc.CallOption) (Test_BidiClient, error) +} + +type testClient struct { + cc *grpc.ClientConn +} + +func NewTestClient(cc *grpc.ClientConn) TestClient { + return &testClient{cc} +} + +func (c *testClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) { + out := new(SimpleResponse) + err := c.cc.Invoke(ctx, "/grpc.testing.Test/UnaryCall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *testClient) Downstream(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (Test_DownstreamClient, error) { + stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[0], "/grpc.testing.Test/Downstream", opts...) + if err != nil { + return nil, err + } + x := &testDownstreamClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Test_DownstreamClient interface { + Recv() (*StreamMsg, error) + grpc.ClientStream +} + +type testDownstreamClient struct { + grpc.ClientStream +} + +func (x *testDownstreamClient) Recv() (*StreamMsg, error) { + m := new(StreamMsg) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *testClient) Upstream(ctx context.Context, opts ...grpc.CallOption) (Test_UpstreamClient, error) { + stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[1], "/grpc.testing.Test/Upstream", opts...) + if err != nil { + return nil, err + } + x := &testUpstreamClient{stream} + return x, nil +} + +type Test_UpstreamClient interface { + Send(*StreamMsg) error + CloseAndRecv() (*SimpleResponse, error) + grpc.ClientStream +} + +type testUpstreamClient struct { + grpc.ClientStream +} + +func (x *testUpstreamClient) Send(m *StreamMsg) error { + return x.ClientStream.SendMsg(m) +} + +func (x *testUpstreamClient) CloseAndRecv() (*SimpleResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(SimpleResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *testClient) Bidi(ctx context.Context, opts ...grpc.CallOption) (Test_BidiClient, error) { + stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[2], "/grpc.testing.Test/Bidi", opts...) + if err != nil { + return nil, err + } + x := &testBidiClient{stream} + return x, nil +} + +type Test_BidiClient interface { + Send(*StreamMsg) error + Recv() (*StreamMsg2, error) + grpc.ClientStream +} + +type testBidiClient struct { + grpc.ClientStream +} + +func (x *testBidiClient) Send(m *StreamMsg) error { + return x.ClientStream.SendMsg(m) +} + +func (x *testBidiClient) Recv() (*StreamMsg2, error) { + m := new(StreamMsg2) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TestServer is the server API for Test service. +type TestServer interface { + UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) + // This RPC streams from the server only. + Downstream(*SimpleRequest, Test_DownstreamServer) error + // This RPC streams from the client. + Upstream(Test_UpstreamServer) error + // This one streams in both directions. + Bidi(Test_BidiServer) error +} + +func RegisterTestServer(s *grpc.Server, srv TestServer) { + s.RegisterService(&_Test_serviceDesc, srv) +} + +func _Test_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SimpleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TestServer).UnaryCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.testing.Test/UnaryCall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TestServer).UnaryCall(ctx, req.(*SimpleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Test_Downstream_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SimpleRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TestServer).Downstream(m, &testDownstreamServer{stream}) +} + +type Test_DownstreamServer interface { + Send(*StreamMsg) error + grpc.ServerStream +} + +type testDownstreamServer struct { + grpc.ServerStream +} + +func (x *testDownstreamServer) Send(m *StreamMsg) error { + return x.ServerStream.SendMsg(m) +} + +func _Test_Upstream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(TestServer).Upstream(&testUpstreamServer{stream}) +} + +type Test_UpstreamServer interface { + SendAndClose(*SimpleResponse) error + Recv() (*StreamMsg, error) + grpc.ServerStream +} + +type testUpstreamServer struct { + grpc.ServerStream +} + +func (x *testUpstreamServer) SendAndClose(m *SimpleResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *testUpstreamServer) Recv() (*StreamMsg, error) { + m := new(StreamMsg) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Test_Bidi_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(TestServer).Bidi(&testBidiServer{stream}) +} + +type Test_BidiServer interface { + Send(*StreamMsg2) error + Recv() (*StreamMsg, error) + grpc.ServerStream +} + +type testBidiServer struct { + grpc.ServerStream +} + +func (x *testBidiServer) Send(m *StreamMsg2) error { + return x.ServerStream.SendMsg(m) +} + +func (x *testBidiServer) Recv() (*StreamMsg, error) { + m := new(StreamMsg) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _Test_serviceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.testing.Test", + HandlerType: (*TestServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UnaryCall", + Handler: _Test_UnaryCall_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Downstream", + Handler: _Test_Downstream_Handler, + ServerStreams: true, + }, + { + StreamName: "Upstream", + Handler: _Test_Upstream_Handler, + ClientStreams: true, + }, + { + StreamName: "Bidi", + Handler: _Test_Bidi_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "grpc/grpc.proto", +} + +func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_grpc_9f03674ccb9f2c2b) } + +var fileDescriptor_grpc_9f03674ccb9f2c2b = []byte{ + // 241 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48, + 0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x60, 0x76, 0x49, 0x6a, 0x71, + 0x49, 0x66, 0x5e, 0xba, 0x12, 0x3f, 0x17, 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a, + 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38, + 0x55, 0x89, 0x9b, 0x8b, 0x33, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0xb7, 0x38, 0x5d, 0x89, 0x87, + 0x8b, 0x0b, 0xce, 0x31, 0x32, 0x9a, 0xc1, 0xc4, 0xc5, 0x12, 0x92, 0x5a, 0x5c, 0x22, 0xe4, 0xc6, + 0xc5, 0x19, 0x9a, 0x97, 0x58, 0x54, 0xe9, 0x9c, 0x98, 0x93, 0x23, 0x24, 0xad, 0x87, 0x6c, 0x85, + 0x1e, 0x8a, 0xf9, 0x52, 0x32, 0xd8, 0x25, 0x21, 0x76, 0x09, 0xb9, 0x70, 0x71, 0xb9, 0xe4, 0x97, + 0xe7, 0x15, 0x83, 0xad, 0xc0, 0x6f, 0x90, 0x38, 0x9a, 0x24, 0xcc, 0x55, 0x06, 0x8c, 0x42, 0xce, + 0x5c, 0x1c, 0xa1, 0x05, 0x50, 0x33, 0x70, 0x29, 0xc3, 0xef, 0x10, 0x0d, 0x46, 0x21, 0x5b, 0x2e, + 0x16, 0xa7, 0xcc, 0x94, 0x4c, 0xdc, 0x06, 0x48, 0xe0, 0x90, 0x30, 0xd2, 0x60, 0x34, 0x60, 0x74, + 0x72, 0x88, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0x87, 0x7f, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, 0x9a, 0xa7, + 0x0b, 0x96, 0x00, 0x19, 0x91, 0x92, 0x58, 0x92, 0x08, 0x8e, 0x26, 0x6b, 0xa8, 0x81, 0x49, 0x6c, + 0x60, 0x65, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x54, 0x6e, 0x1b, 0xc2, 0x01, 0x00, + 0x00, +} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.proto similarity index 96% rename from deps/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto rename to deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.proto index b8bc41acd..2b7b8a86a 100644 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/grpc.proto +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.proto @@ -33,6 +33,8 @@ syntax = "proto3"; package grpc.testing; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc;testing"; + message SimpleRequest { } diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.pb.go new file mode 100644 index 000000000..8af8b72c3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.pb.go @@ -0,0 +1,110 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/a.proto + +package import_public // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import sub "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// M from public import import_public/sub/a.proto +type M = sub.M + +// E from public import import_public/sub/a.proto +type E = sub.E + +var E_name = sub.E_name +var E_value = sub.E_value + +const E_ZERO = E(sub.E_ZERO) + +// Ignoring public import of Local from import_public/b.proto + +type Public struct { + M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"` + E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` + Local *Local `protobuf:"bytes,3,opt,name=local" json:"local,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Public) Reset() { *m = Public{} } +func (m *Public) String() string { return proto.CompactTextString(m) } +func (*Public) ProtoMessage() {} +func (*Public) Descriptor() ([]byte, []int) { + return fileDescriptor_a_2f23fa0a8a46426d, []int{0} +} +func (m *Public) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Public.Unmarshal(m, b) +} +func (m *Public) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Public.Marshal(b, m, deterministic) +} +func (dst *Public) XXX_Merge(src proto.Message) { + xxx_messageInfo_Public.Merge(dst, src) +} +func (m *Public) XXX_Size() int { + return xxx_messageInfo_Public.Size(m) +} +func (m *Public) XXX_DiscardUnknown() { + xxx_messageInfo_Public.DiscardUnknown(m) +} + +var xxx_messageInfo_Public proto.InternalMessageInfo + +func (m *Public) GetM() *sub.M { + if m != nil { + return m.M + } + return nil +} + +func (m *Public) GetE() sub.E { + if m != nil { + return m.E + } + return sub.E_ZERO +} + +func (m *Public) GetLocal() *Local { + if m != nil { + return m.Local + } + return nil +} + +func init() { + proto.RegisterType((*Public)(nil), "goproto.test.import_public.Public") +} + +func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_a_2f23fa0a8a46426d) } + +var fileDescriptor_a_2f23fa0a8a46426d = []byte{ + // 197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd4, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48, + 0x49, 0xa2, 0x6a, 0x29, 0x2e, 0x4d, 0x82, 0x69, 0x93, 0x42, 0x33, 0x2d, 0x09, 0x22, 0xac, 0xb4, + 0x98, 0x91, 0x8b, 0x2d, 0x00, 0x2c, 0x24, 0xa4, 0xcf, 0xc5, 0x98, 0x2b, 0xc1, 0xa8, 0xc0, 0xa8, + 0xc1, 0x6d, 0xa4, 0xa8, 0x87, 0xdb, 0x12, 0xbd, 0xe2, 0xd2, 0x24, 0x3d, 0xdf, 0x20, 0xc6, 0x5c, + 0x90, 0x86, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x3e, 0xc2, 0x1a, 0x5c, 0x83, 0x18, 0x53, 0x85, + 0xcc, 0xb9, 0x58, 0x73, 0xf2, 0x93, 0x13, 0x73, 0x24, 0x98, 0x09, 0xdb, 0xe2, 0x03, 0x52, 0x18, + 0x04, 0x51, 0xef, 0xe4, 0x18, 0x65, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, + 0xab, 0x9f, 0x9e, 0x9f, 0x9e, 0xaf, 0x0f, 0xd6, 0x98, 0x54, 0x9a, 0x06, 0x61, 0x24, 0xeb, 0xa6, + 0xa7, 0xe6, 0xe9, 0x82, 0x25, 0x40, 0x66, 0xa5, 0x24, 0x96, 0x24, 0xea, 0xa3, 0x98, 0x17, 0xc0, + 0x10, 0xc0, 0x98, 0xc4, 0x06, 0x56, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x63, 0x98, + 0xb1, 0x5a, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.proto new file mode 100644 index 000000000..7234ca09d --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.proto @@ -0,0 +1,45 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package goproto.test.import_public; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public"; + +import public "import_public/sub/a.proto"; // Different Go package. +import public "import_public/b.proto"; // Same Go package. + +message Public { + goproto.test.import_public.sub.M m = 1; + goproto.test.import_public.sub.E e = 2; + Local local = 3; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.pb.go new file mode 100644 index 000000000..d5268a38c --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.pb.go @@ -0,0 +1,87 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/b.proto + +package import_public // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import sub "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Local struct { + M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"` + E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Local) Reset() { *m = Local{} } +func (m *Local) String() string { return proto.CompactTextString(m) } +func (*Local) ProtoMessage() {} +func (*Local) Descriptor() ([]byte, []int) { + return fileDescriptor_b_64c467639fa1a874, []int{0} +} +func (m *Local) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Local.Unmarshal(m, b) +} +func (m *Local) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Local.Marshal(b, m, deterministic) +} +func (dst *Local) XXX_Merge(src proto.Message) { + xxx_messageInfo_Local.Merge(dst, src) +} +func (m *Local) XXX_Size() int { + return xxx_messageInfo_Local.Size(m) +} +func (m *Local) XXX_DiscardUnknown() { + xxx_messageInfo_Local.DiscardUnknown(m) +} + +var xxx_messageInfo_Local proto.InternalMessageInfo + +func (m *Local) GetM() *sub.M { + if m != nil { + return m.M + } + return nil +} + +func (m *Local) GetE() sub.E { + if m != nil { + return m.E + } + return sub.E_ZERO +} + +func init() { + proto.RegisterType((*Local)(nil), "goproto.test.import_public.Local") +} + +func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_b_64c467639fa1a874) } + +var fileDescriptor_b_64c467639fa1a874 = []byte{ + // 171 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48, + 0x49, 0xa2, 0x6a, 0x29, 0x2e, 0x4d, 0xd2, 0x4f, 0x84, 0x68, 0x53, 0xca, 0xe4, 0x62, 0xf5, 0xc9, + 0x4f, 0x4e, 0xcc, 0x11, 0xd2, 0xe7, 0x62, 0xcc, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, + 0xd4, 0xc3, 0x6d, 0x96, 0x5e, 0x71, 0x69, 0x92, 0x9e, 0x6f, 0x10, 0x63, 0x2e, 0x48, 0x43, 0xaa, + 0x04, 0x93, 0x02, 0xa3, 0x06, 0x1f, 0x61, 0x0d, 0xae, 0x41, 0x8c, 0xa9, 0x4e, 0x8e, 0x51, 0xf6, + 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, + 0x60, 0x4d, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x2e, 0x58, 0x02, 0x64, + 0x4e, 0x4a, 0x62, 0x49, 0xa2, 0x3e, 0x8a, 0x59, 0x49, 0x6c, 0x60, 0x75, 0xc6, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x2e, 0xf6, 0xdd, 0x8a, 0x04, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.proto new file mode 100644 index 000000000..fdcd9ca5d --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.proto @@ -0,0 +1,43 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package goproto.test.import_public; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public"; + +import "import_public/sub/a.proto"; + +message Local { + goproto.test.import_public.sub.M m = 1; + goproto.test.import_public.sub.E e = 2; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.pb.go new file mode 100644 index 000000000..93aeceb63 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/sub/a.proto + +package sub // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type E int32 + +const ( + E_ZERO E = 0 +) + +var E_name = map[int32]string{ + 0: "ZERO", +} +var E_value = map[string]int32{ + "ZERO": 0, +} + +func (x E) String() string { + return proto.EnumName(E_name, int32(x)) +} +func (E) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a_051bb22eaae5295a, []int{0} +} + +type M struct { + // Field using a type in the same Go package, but a different source file. + M2 *M2 `protobuf:"bytes,1,opt,name=m2" json:"m2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_a_051bb22eaae5295a, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M.Unmarshal(m, b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M.Marshal(b, m, deterministic) +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return xxx_messageInfo_M.Size(m) +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func (m *M) GetM2() *M2 { + if m != nil { + return m.M2 + } + return nil +} + +func init() { + proto.RegisterType((*M)(nil), "goproto.test.import_public.sub.M") + proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value) +} + +func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_a_051bb22eaae5295a) } + +var fileDescriptor_a_051bb22eaae5295a = []byte{ + // 169 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd4, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, + 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x49, 0x61, 0xd1, 0x9a, 0x04, 0xd1, 0xaa, 0x64, 0xce, + 0xc5, 0xe8, 0x2b, 0x64, 0xc4, 0xc5, 0x94, 0x6b, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, + 0xa4, 0x87, 0xdf, 0x30, 0x3d, 0x5f, 0xa3, 0x20, 0xa6, 0x5c, 0x23, 0x2d, 0x5e, 0x2e, 0x46, 0x57, + 0x21, 0x0e, 0x2e, 0x96, 0x28, 0xd7, 0x20, 0x7f, 0x01, 0x06, 0x27, 0xd7, 0x28, 0xe7, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0x29, + 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x2e, 0x58, 0x02, 0x64, 0x70, 0x4a, + 0x62, 0x49, 0xa2, 0x3e, 0x86, 0xb3, 0x92, 0xd8, 0xc0, 0x6a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x7a, 0x6a, 0x5c, 0xb5, 0xed, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.proto new file mode 100644 index 000000000..ed0240f40 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.proto @@ -0,0 +1,47 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package goproto.test.import_public.sub; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub"; + +import "import_public/sub/b.proto"; + +message M { + // Field using a type in the same Go package, but a different source file. + M2 m2 = 1; +} + +enum E { + ZERO = 0; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.pb.go new file mode 100644 index 000000000..d43a5c6a0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.pb.go @@ -0,0 +1,67 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/sub/b.proto + +package sub // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M2) Reset() { *m = M2{} } +func (m *M2) String() string { return proto.CompactTextString(m) } +func (*M2) ProtoMessage() {} +func (*M2) Descriptor() ([]byte, []int) { + return fileDescriptor_b_d16d7ba92a37c489, []int{0} +} +func (m *M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M2.Unmarshal(m, b) +} +func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M2.Marshal(b, m, deterministic) +} +func (dst *M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_M2.Merge(dst, src) +} +func (m *M2) XXX_Size() int { + return xxx_messageInfo_M2.Size(m) +} +func (m *M2) XXX_DiscardUnknown() { + xxx_messageInfo_M2.DiscardUnknown(m) +} + +var xxx_messageInfo_M2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M2)(nil), "goproto.test.import_public.sub.M2") +} + +func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_b_d16d7ba92a37c489) } + +var fileDescriptor_b_d16d7ba92a37c489 = []byte{ + // 124 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd2, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, + 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x39, 0xb9, 0x46, + 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, + 0xeb, 0x83, 0x75, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba, 0x60, 0x09, + 0x90, 0x41, 0x29, 0x89, 0x25, 0x89, 0xfa, 0x18, 0x96, 0x26, 0xb1, 0x81, 0xd5, 0x1a, 0x03, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x9f, 0xe4, 0xbf, 0x60, 0x90, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.proto new file mode 100644 index 000000000..25a48e701 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.proto @@ -0,0 +1,39 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package goproto.test.import_public.sub; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub"; + +message M2 { +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.pb.go new file mode 100644 index 000000000..ac828dfbc --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/fmt/m.proto + +package fmt // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_m_33cccd852670578e, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M.Unmarshal(m, b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M.Marshal(b, m, deterministic) +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return xxx_messageInfo_M.Size(m) +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M)(nil), "fmt.M") +} + +func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_m_33cccd852670578e) } + +var fileDescriptor_m_33cccd852670578e = []byte{ + // 106 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x4f, 0xcb, 0x2d, 0xd1, 0xcf, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x62, 0x4e, 0xcb, 0x2d, 0x51, 0x62, 0xe6, 0x62, 0xf4, 0x75, 0xb2, 0x8f, 0xb2, 0x4d, 0xcf, 0x2c, + 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x49, + 0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xc1, 0x12, 0x25, 0xa9, 0xc5, 0x25, + 0x29, 0x89, 0x25, 0x89, 0xfa, 0x48, 0x46, 0x26, 0xb1, 0x81, 0x55, 0x19, 0x03, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xb8, 0x58, 0x3e, 0xf6, 0x68, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.proto new file mode 100644 index 000000000..833186814 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package fmt; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt"; +message M {} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.pb.go new file mode 100644 index 000000000..1c2a010ee --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.pb.go @@ -0,0 +1,130 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_1/m1.proto + +package test_a_1 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type E1 int32 + +const ( + E1_E1_ZERO E1 = 0 +) + +var E1_name = map[int32]string{ + 0: "E1_ZERO", +} +var E1_value = map[string]int32{ + "E1_ZERO": 0, +} + +func (x E1) String() string { + return proto.EnumName(E1_name, int32(x)) +} +func (E1) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_m1_d51bc82db1cbc235, []int{0} +} + +type M1 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M1) Reset() { *m = M1{} } +func (m *M1) String() string { return proto.CompactTextString(m) } +func (*M1) ProtoMessage() {} +func (*M1) Descriptor() ([]byte, []int) { + return fileDescriptor_m1_d51bc82db1cbc235, []int{0} +} +func (m *M1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M1.Unmarshal(m, b) +} +func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M1.Marshal(b, m, deterministic) +} +func (dst *M1) XXX_Merge(src proto.Message) { + xxx_messageInfo_M1.Merge(dst, src) +} +func (m *M1) XXX_Size() int { + return xxx_messageInfo_M1.Size(m) +} +func (m *M1) XXX_DiscardUnknown() { + xxx_messageInfo_M1.DiscardUnknown(m) +} + +var xxx_messageInfo_M1 proto.InternalMessageInfo + +type M1_1 struct { + M1 *M1 `protobuf:"bytes,1,opt,name=m1" json:"m1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M1_1) Reset() { *m = M1_1{} } +func (m *M1_1) String() string { return proto.CompactTextString(m) } +func (*M1_1) ProtoMessage() {} +func (*M1_1) Descriptor() ([]byte, []int) { + return fileDescriptor_m1_d51bc82db1cbc235, []int{1} +} +func (m *M1_1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M1_1.Unmarshal(m, b) +} +func (m *M1_1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M1_1.Marshal(b, m, deterministic) +} +func (dst *M1_1) XXX_Merge(src proto.Message) { + xxx_messageInfo_M1_1.Merge(dst, src) +} +func (m *M1_1) XXX_Size() int { + return xxx_messageInfo_M1_1.Size(m) +} +func (m *M1_1) XXX_DiscardUnknown() { + xxx_messageInfo_M1_1.DiscardUnknown(m) +} + +var xxx_messageInfo_M1_1 proto.InternalMessageInfo + +func (m *M1_1) GetM1() *M1 { + if m != nil { + return m.M1 + } + return nil +} + +func init() { + proto.RegisterType((*M1)(nil), "test.a.M1") + proto.RegisterType((*M1_1)(nil), "test.a.M1_1") + proto.RegisterEnum("test.a.E1", E1_name, E1_value) +} + +func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_m1_d51bc82db1cbc235) } + +var fileDescriptor_m1_d51bc82db1cbc235 = []byte{ + // 163 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd4, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x1a, 0x2a, 0x29, 0x71, 0xb1, 0xf8, 0x1a, 0xc6, 0x1b, 0x0a, 0x49, 0x71, 0x31, 0xe5, 0x1a, 0x4a, + 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x71, 0xe9, 0x41, 0x94, 0xe8, 0xf9, 0x1a, 0x06, 0x31, 0xe5, + 0x1a, 0x6a, 0x09, 0x72, 0x31, 0xb9, 0x1a, 0x0a, 0x71, 0x73, 0xb1, 0xbb, 0x1a, 0xc6, 0x47, 0xb9, + 0x06, 0xf9, 0x0b, 0x30, 0x38, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, + 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x4d, 0x4f, 0x2a, 0x4d, 0x83, 0x30, 0x92, + 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xc1, 0x12, 0x20, 0xc3, 0x52, 0x12, 0x4b, 0x12, 0xf5, 0xd1, 0xdd, + 0x94, 0xc4, 0x06, 0x56, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xd5, 0x3e, 0x41, 0xae, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.proto new file mode 100644 index 000000000..21dcee2cd --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.proto @@ -0,0 +1,44 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1"; + +message M1 {} + +message M1_1 { + M1 m1 = 1; +} + +enum E1 { + E1_ZERO = 0; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.pb.go new file mode 100644 index 000000000..8ce9fb47c --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_1/m2.proto + +package test_a_1 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M2) Reset() { *m = M2{} } +func (m *M2) String() string { return proto.CompactTextString(m) } +func (*M2) ProtoMessage() {} +func (*M2) Descriptor() ([]byte, []int) { + return fileDescriptor_m2_d5c8bd8077345106, []int{0} +} +func (m *M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M2.Unmarshal(m, b) +} +func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M2.Marshal(b, m, deterministic) +} +func (dst *M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_M2.Merge(dst, src) +} +func (m *M2) XXX_Size() int { + return xxx_messageInfo_M2.Size(m) +} +func (m *M2) XXX_DiscardUnknown() { + xxx_messageInfo_M2.DiscardUnknown(m) +} + +var xxx_messageInfo_M2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M2)(nil), "test.a.M2") +} + +func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_m2_d5c8bd8077345106) } + +var fileDescriptor_m2_d5c8bd8077345106 = []byte{ + // 112 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd2, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x1a, 0x39, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, + 0x79, 0xba, 0x60, 0x09, 0x90, 0xc6, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x74, 0xc3, 0x93, 0xd8, 0xc0, + 0x4a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x9b, 0x89, 0x4c, 0x77, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.proto new file mode 100644 index 000000000..bc79954f7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1"; +message M2 {} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.pb.go new file mode 100644 index 000000000..09b9b072a --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_2/m3.proto + +package test_a_2 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M3 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M3) Reset() { *m = M3{} } +func (m *M3) String() string { return proto.CompactTextString(m) } +func (*M3) ProtoMessage() {} +func (*M3) Descriptor() ([]byte, []int) { + return fileDescriptor_m3_064810011afd7503, []int{0} +} +func (m *M3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M3.Unmarshal(m, b) +} +func (m *M3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M3.Marshal(b, m, deterministic) +} +func (dst *M3) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3.Merge(dst, src) +} +func (m *M3) XXX_Size() int { + return xxx_messageInfo_M3.Size(m) +} +func (m *M3) XXX_DiscardUnknown() { + xxx_messageInfo_M3.DiscardUnknown(m) +} + +var xxx_messageInfo_M3 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M3)(nil), "test.a.M3") +} + +func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_m3_064810011afd7503) } + +var fileDescriptor_m3_064810011afd7503 = []byte{ + // 112 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd6, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x1a, 0x3b, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, + 0x79, 0xba, 0x60, 0x09, 0x90, 0xc6, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x74, 0xc3, 0x93, 0xd8, 0xc0, + 0x4a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x11, 0xfd, 0xd0, 0xcb, 0x77, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.proto new file mode 100644 index 000000000..d007b05ae --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2"; +message M3 {} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.pb.go new file mode 100644 index 000000000..208210374 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_2/m4.proto + +package test_a_2 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M4 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M4) Reset() { *m = M4{} } +func (m *M4) String() string { return proto.CompactTextString(m) } +func (*M4) ProtoMessage() {} +func (*M4) Descriptor() ([]byte, []int) { + return fileDescriptor_m4_4d6eef89f3bce729, []int{0} +} +func (m *M4) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M4.Unmarshal(m, b) +} +func (m *M4) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M4.Marshal(b, m, deterministic) +} +func (dst *M4) XXX_Merge(src proto.Message) { + xxx_messageInfo_M4.Merge(dst, src) +} +func (m *M4) XXX_Size() int { + return xxx_messageInfo_M4.Size(m) +} +func (m *M4) XXX_DiscardUnknown() { + xxx_messageInfo_M4.DiscardUnknown(m) +} + +var xxx_messageInfo_M4 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M4)(nil), "test.a.M4") +} + +func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_m4_4d6eef89f3bce729) } + +var fileDescriptor_m4_4d6eef89f3bce729 = []byte{ + // 112 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd1, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x9a, 0x38, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, + 0x79, 0xba, 0x60, 0x09, 0x90, 0xc6, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x74, 0xc3, 0x93, 0xd8, 0xc0, + 0x4a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xb0, 0xe7, 0x44, 0x77, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.proto new file mode 100644 index 000000000..1240520ae --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2"; +message M4 {} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.pb.go new file mode 100644 index 000000000..312383a45 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.pb.go @@ -0,0 +1,67 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_b_1/m1.proto + +package beta // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M1 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M1) Reset() { *m = M1{} } +func (m *M1) String() string { return proto.CompactTextString(m) } +func (*M1) ProtoMessage() {} +func (*M1) Descriptor() ([]byte, []int) { + return fileDescriptor_m1_dbaf48759a325297, []int{0} +} +func (m *M1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M1.Unmarshal(m, b) +} +func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M1.Marshal(b, m, deterministic) +} +func (dst *M1) XXX_Merge(src proto.Message) { + xxx_messageInfo_M1.Merge(dst, src) +} +func (m *M1) XXX_Size() int { + return xxx_messageInfo_M1.Size(m) +} +func (m *M1) XXX_DiscardUnknown() { + xxx_messageInfo_M1.DiscardUnknown(m) +} + +var xxx_messageInfo_M1 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M1)(nil), "test.b.part1.M1") +} + +func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_m1_dbaf48759a325297) } + +var fileDescriptor_m1_dbaf48759a325297 = []byte{ + // 123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd4, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x09, 0xe9, 0x25, 0xe9, 0x15, 0x24, 0x16, 0x95, + 0x18, 0x2a, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x3a, 0x79, 0x46, 0xb9, 0xa7, 0x67, 0x96, 0x64, 0x94, + 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x15, 0x27, 0x95, 0xa6, + 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba, 0x60, 0x09, 0x90, 0xf6, 0x94, 0xc4, 0x92, 0x44, + 0x7d, 0x74, 0x2b, 0xac, 0x93, 0x52, 0x4b, 0x12, 0x93, 0xd8, 0xc0, 0xea, 0x8d, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x23, 0x8f, 0x59, 0x3f, 0x82, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.proto new file mode 100644 index 000000000..ef445b706 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package test.b.part1; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1;beta"; +message M1 {} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.pb.go new file mode 100644 index 000000000..35da5f9d3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.pb.go @@ -0,0 +1,67 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_b_1/m2.proto + +package beta // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M2) Reset() { *m = M2{} } +func (m *M2) String() string { return proto.CompactTextString(m) } +func (*M2) ProtoMessage() {} +func (*M2) Descriptor() ([]byte, []int) { + return fileDescriptor_m2_6eda99829d3a5ac8, []int{0} +} +func (m *M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M2.Unmarshal(m, b) +} +func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M2.Marshal(b, m, deterministic) +} +func (dst *M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_M2.Merge(dst, src) +} +func (m *M2) XXX_Size() int { + return xxx_messageInfo_M2.Size(m) +} +func (m *M2) XXX_DiscardUnknown() { + xxx_messageInfo_M2.DiscardUnknown(m) +} + +var xxx_messageInfo_M2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M2)(nil), "test.b.part2.M2") +} + +func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_m2_6eda99829d3a5ac8) } + +var fileDescriptor_m2_6eda99829d3a5ac8 = []byte{ + // 123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd2, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x09, 0xe9, 0x25, 0xe9, 0x15, 0x24, 0x16, 0x95, + 0x18, 0x29, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x39, 0x79, 0x46, 0xb9, 0xa7, 0x67, 0x96, 0x64, 0x94, + 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x15, 0x27, 0x95, 0xa6, + 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba, 0x60, 0x09, 0x90, 0xf6, 0x94, 0xc4, 0x92, 0x44, + 0x7d, 0x74, 0x2b, 0xac, 0x93, 0x52, 0x4b, 0x12, 0x93, 0xd8, 0xc0, 0xea, 0x8d, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x2d, 0x57, 0xdc, 0x2d, 0x82, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.proto new file mode 100644 index 000000000..115039943 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package test.b.part2; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1;beta"; +message M2 {} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.pb.go new file mode 100644 index 000000000..942d48818 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.pb.go @@ -0,0 +1,80 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_import_a1m1.proto + +package imports // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import test_a_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A1M1 struct { + F *test_a_1.M1 `protobuf:"bytes,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A1M1) Reset() { *m = A1M1{} } +func (m *A1M1) String() string { return proto.CompactTextString(m) } +func (*A1M1) ProtoMessage() {} +func (*A1M1) Descriptor() ([]byte, []int) { + return fileDescriptor_test_import_a1m1_2621f8d5ff4f97af, []int{0} +} +func (m *A1M1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_A1M1.Unmarshal(m, b) +} +func (m *A1M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_A1M1.Marshal(b, m, deterministic) +} +func (dst *A1M1) XXX_Merge(src proto.Message) { + xxx_messageInfo_A1M1.Merge(dst, src) +} +func (m *A1M1) XXX_Size() int { + return xxx_messageInfo_A1M1.Size(m) +} +func (m *A1M1) XXX_DiscardUnknown() { + xxx_messageInfo_A1M1.DiscardUnknown(m) +} + +var xxx_messageInfo_A1M1 proto.InternalMessageInfo + +func (m *A1M1) GetF() *test_a_1.M1 { + if m != nil { + return m.F + } + return nil +} + +func init() { + proto.RegisterType((*A1M1)(nil), "test.A1M1") +} + +func init() { + proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_test_import_a1m1_2621f8d5ff4f97af) +} + +var fileDescriptor_test_import_a1m1_2621f8d5ff4f97af = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x0d, + 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x58, 0x40, 0xe2, 0x52, 0x92, 0x28, 0xaa, 0x12, 0xe3, + 0x0d, 0xf5, 0x61, 0x0a, 0x94, 0x14, 0xb8, 0x58, 0x1c, 0x0d, 0x7d, 0x0d, 0x85, 0x24, 0xb8, 0x18, + 0xd3, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xb8, 0xf4, 0x40, 0xca, 0xf4, 0x12, 0xf5, 0x7c, + 0x0d, 0x83, 0x18, 0xd3, 0x9c, 0xac, 0xa3, 0x2c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, + 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x5a, 0x93, 0x4a, 0xd3, 0x20, 0x8c, 0x64, + 0xdd, 0xf4, 0xd4, 0x3c, 0x5d, 0xb0, 0x04, 0x48, 0x63, 0x4a, 0x62, 0x49, 0xa2, 0x3e, 0xd4, 0xc2, + 0x24, 0x36, 0xb0, 0x0a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xc2, 0xe7, 0xde, 0xa8, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.proto new file mode 100644 index 000000000..7d38ad5c2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.proto @@ -0,0 +1,42 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package test; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports"; + +import "imports/test_a_1/m1.proto"; + +message A1M1 { + test.a.M1 f = 1; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.pb.go new file mode 100644 index 000000000..5da0387f9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.pb.go @@ -0,0 +1,80 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_import_a1m2.proto + +package imports // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import test_a_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A1M2 struct { + F *test_a_1.M2 `protobuf:"bytes,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A1M2) Reset() { *m = A1M2{} } +func (m *A1M2) String() string { return proto.CompactTextString(m) } +func (*A1M2) ProtoMessage() {} +func (*A1M2) Descriptor() ([]byte, []int) { + return fileDescriptor_test_import_a1m2_01f3ba09eb823c21, []int{0} +} +func (m *A1M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_A1M2.Unmarshal(m, b) +} +func (m *A1M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_A1M2.Marshal(b, m, deterministic) +} +func (dst *A1M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_A1M2.Merge(dst, src) +} +func (m *A1M2) XXX_Size() int { + return xxx_messageInfo_A1M2.Size(m) +} +func (m *A1M2) XXX_DiscardUnknown() { + xxx_messageInfo_A1M2.DiscardUnknown(m) +} + +var xxx_messageInfo_A1M2 proto.InternalMessageInfo + +func (m *A1M2) GetF() *test_a_1.M2 { + if m != nil { + return m.F + } + return nil +} + +func init() { + proto.RegisterType((*A1M2)(nil), "test.A1M2") +} + +func init() { + proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_test_import_a1m2_01f3ba09eb823c21) +} + +var fileDescriptor_test_import_a1m2_01f3ba09eb823c21 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x8d, + 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x58, 0x40, 0xe2, 0x52, 0x92, 0x28, 0xaa, 0x12, 0xe3, + 0x0d, 0xf5, 0x61, 0x0a, 0x94, 0x14, 0xb8, 0x58, 0x1c, 0x0d, 0x7d, 0x8d, 0x84, 0x24, 0xb8, 0x18, + 0xd3, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xb8, 0xf4, 0x40, 0xca, 0xf4, 0x12, 0xf5, 0x7c, + 0x8d, 0x82, 0x18, 0xd3, 0x9c, 0xac, 0xa3, 0x2c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, + 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x5a, 0x93, 0x4a, 0xd3, 0x20, 0x8c, 0x64, + 0xdd, 0xf4, 0xd4, 0x3c, 0x5d, 0xb0, 0x04, 0x48, 0x63, 0x4a, 0x62, 0x49, 0xa2, 0x3e, 0xd4, 0xc2, + 0x24, 0x36, 0xb0, 0x0a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x65, 0x04, 0x17, 0xa8, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.proto new file mode 100644 index 000000000..f1445c08c --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.proto @@ -0,0 +1,42 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package test; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports"; + +import "imports/test_a_1/m2.proto"; + +message A1M2 { + test.a.M2 f = 1; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.pb.go new file mode 100644 index 000000000..2a1c5eb0c --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.pb.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_import_all.proto + +package imports // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import fmt1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt" +import test_a_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" +import test_a_2 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2" +import test_b_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type All struct { + Am1 *test_a_1.M1 `protobuf:"bytes,1,opt,name=am1" json:"am1,omitempty"` + Am2 *test_a_1.M2 `protobuf:"bytes,2,opt,name=am2" json:"am2,omitempty"` + Am3 *test_a_2.M3 `protobuf:"bytes,3,opt,name=am3" json:"am3,omitempty"` + Am4 *test_a_2.M4 `protobuf:"bytes,4,opt,name=am4" json:"am4,omitempty"` + Bm1 *test_b_1.M1 `protobuf:"bytes,5,opt,name=bm1" json:"bm1,omitempty"` + Bm2 *test_b_1.M2 `protobuf:"bytes,6,opt,name=bm2" json:"bm2,omitempty"` + Fmt *fmt1.M `protobuf:"bytes,7,opt,name=fmt" json:"fmt,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *All) Reset() { *m = All{} } +func (m *All) String() string { return proto.CompactTextString(m) } +func (*All) ProtoMessage() {} +func (*All) Descriptor() ([]byte, []int) { + return fileDescriptor_test_import_all_a07d58de416f602a, []int{0} +} +func (m *All) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_All.Unmarshal(m, b) +} +func (m *All) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_All.Marshal(b, m, deterministic) +} +func (dst *All) XXX_Merge(src proto.Message) { + xxx_messageInfo_All.Merge(dst, src) +} +func (m *All) XXX_Size() int { + return xxx_messageInfo_All.Size(m) +} +func (m *All) XXX_DiscardUnknown() { + xxx_messageInfo_All.DiscardUnknown(m) +} + +var xxx_messageInfo_All proto.InternalMessageInfo + +func (m *All) GetAm1() *test_a_1.M1 { + if m != nil { + return m.Am1 + } + return nil +} + +func (m *All) GetAm2() *test_a_1.M2 { + if m != nil { + return m.Am2 + } + return nil +} + +func (m *All) GetAm3() *test_a_2.M3 { + if m != nil { + return m.Am3 + } + return nil +} + +func (m *All) GetAm4() *test_a_2.M4 { + if m != nil { + return m.Am4 + } + return nil +} + +func (m *All) GetBm1() *test_b_1.M1 { + if m != nil { + return m.Bm1 + } + return nil +} + +func (m *All) GetBm2() *test_b_1.M2 { + if m != nil { + return m.Bm2 + } + return nil +} + +func (m *All) GetFmt() *fmt1.M { + if m != nil { + return m.Fmt + } + return nil +} + +func init() { + proto.RegisterType((*All)(nil), "test.All") +} + +func init() { + proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_test_import_all_a07d58de416f602a) +} + +var fileDescriptor_test_import_all_a07d58de416f602a = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0x31, 0x4f, 0xf3, 0x30, + 0x10, 0x06, 0x60, 0xe5, 0x73, 0xbf, 0x20, 0x99, 0x05, 0x85, 0xc5, 0x20, 0x90, 0x50, 0x27, 0x96, + 0xda, 0xb2, 0x9d, 0x05, 0x31, 0xc1, 0xde, 0xa5, 0x23, 0x4b, 0xe4, 0x2b, 0x4d, 0xa8, 0x94, 0xc3, + 0x51, 0x7a, 0xfd, 0xbd, 0xfc, 0x15, 0x64, 0x1f, 0x48, 0x10, 0x9a, 0x2d, 0x79, 0x9f, 0xd7, 0x3e, + 0xdb, 0xf2, 0x76, 0x8f, 0x43, 0x1c, 0xe9, 0x60, 0x68, 0x77, 0xa0, 0x86, 0x7f, 0x9a, 0xd0, 0xf7, + 0x7a, 0x18, 0x23, 0xc5, 0x6a, 0x91, 0xe2, 0xeb, 0xab, 0x5f, 0xa5, 0xd0, 0x58, 0x83, 0x96, 0x0b, + 0xa7, 0xc8, 0xcd, 0x90, 0x33, 0xe8, 0xe7, 0xa9, 0x3e, 0x49, 0x30, 0x3f, 0x0b, 0x7e, 0xce, 0xba, + 0xfc, 0xa6, 0x16, 0xc9, 0x20, 0x87, 0xcb, 0x8f, 0x42, 0x8a, 0xa7, 0xbe, 0xaf, 0x6e, 0xa4, 0x08, + 0x68, 0x55, 0x71, 0x57, 0xdc, 0x9f, 0x3b, 0xa9, 0xd3, 0x6a, 0x1d, 0xf4, 0xda, 0x6e, 0x52, 0xcc, + 0xea, 0xd4, 0xbf, 0x89, 0xba, 0xa4, 0x8e, 0xd5, 0x2b, 0x31, 0x51, 0x9f, 0xd4, 0xb3, 0xd6, 0x6a, + 0x31, 0xd1, 0x3a, 0x69, 0x5d, 0x2d, 0xa5, 0x00, 0xb4, 0xea, 0x7f, 0xd6, 0x0b, 0x56, 0xd0, 0x43, + 0x18, 0xc9, 0xe6, 0xe9, 0x80, 0x96, 0x3b, 0x4e, 0x95, 0x7f, 0x3b, 0x2e, 0x9f, 0x01, 0xd0, 0x55, + 0x4a, 0x8a, 0x16, 0x49, 0x9d, 0xe5, 0x4e, 0xa9, 0x5b, 0x24, 0xbd, 0xde, 0xa4, 0xe8, 0xf9, 0xf1, + 0xe5, 0xa1, 0xdb, 0xd3, 0xdb, 0x11, 0xf4, 0x36, 0xa2, 0xe9, 0x62, 0x17, 0x4d, 0xbe, 0x3a, 0x1c, + 0x5b, 0xfe, 0xd8, 0xae, 0xba, 0xdd, 0xfb, 0x2a, 0x43, 0xda, 0xfa, 0x35, 0x50, 0x30, 0x5f, 0x4f, + 0x05, 0x65, 0x6e, 0xf8, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xd4, 0x5c, 0x7f, 0x03, 0x02, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.proto new file mode 100644 index 000000000..ee57d46bd --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.proto @@ -0,0 +1,58 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package test; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports"; + +// test_a_1/m*.proto are in the same Go package and proto package. +// test_a_*/*.proto are in different Go packages, but the same proto package. +// test_b_1/*.proto are in the same Go package, but different proto packages. +// fmt/m.proto has a package name which conflicts with "fmt". +import "imports/test_a_1/m1.proto"; +import "imports/test_a_1/m2.proto"; +import "imports/test_a_2/m3.proto"; +import "imports/test_a_2/m4.proto"; +import "imports/test_b_1/m1.proto"; +import "imports/test_b_1/m2.proto"; +import "imports/fmt/m.proto"; + +message All { + test.a.M1 am1 = 1; + test.a.M2 am2 = 2; + test.a.M3 am3 = 3; + test.a.M4 am4 = 4; + test.b.part1.M1 bm1 = 5; + test.b.part2.M2 bm2 = 6; + fmt.M fmt = 7; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go new file mode 100644 index 000000000..acf010a59 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go @@ -0,0 +1,48 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// A simple binary to link together the protocol buffers in this test. + +package testdata + +import ( + "testing" + + importspb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + multipb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi" + mytestpb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test" +) + +func TestLink(t *testing.T) { + _ = &multipb.Multi1{} + _ = &mytestpb.Request{} + _ = &importspb.All{} +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore new file mode 100644 index 000000000..c61a5e8b0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore @@ -0,0 +1 @@ +*.pb.go diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto new file mode 100644 index 000000000..899c5b1f6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto @@ -0,0 +1,46 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +import "multi/multi2.proto"; +import "multi/multi3.proto"; + +package multitest; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi;multitest"; + +message Multi1 { + required Multi2 multi2 = 1; + optional Multi2.Color color = 2; + optional Multi3.HatType hat_type = 3; +} + diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto new file mode 100644 index 000000000..8445126f0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto @@ -0,0 +1,48 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package multitest; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi;multitest"; + +message Multi2 { + required int32 required_value = 1; + + enum Color { + BLUE = 1; + GREEN = 2; + RED = 3; + }; + optional Color color = 2; +} + diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto new file mode 100644 index 000000000..66c30fd54 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto @@ -0,0 +1,45 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package multitest; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi;multitest"; + +message Multi3 { + enum HatType { + FEDORA = 1; + FEZ = 2; + }; + optional HatType hat_type = 1; +} + diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go new file mode 100644 index 000000000..2798c068f --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go @@ -0,0 +1,1174 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: my_test/test.proto + +package test // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test" + +/* +This package holds interesting messages. +*/ + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type HatType int32 + +const ( + // deliberately skipping 0 + HatType_FEDORA HatType = 1 + HatType_FEZ HatType = 2 +) + +var HatType_name = map[int32]string{ + 1: "FEDORA", + 2: "FEZ", +} +var HatType_value = map[string]int32{ + "FEDORA": 1, + "FEZ": 2, +} + +func (x HatType) Enum() *HatType { + p := new(HatType) + *p = x + return p +} +func (x HatType) String() string { + return proto.EnumName(HatType_name, int32(x)) +} +func (x *HatType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") + if err != nil { + return err + } + *x = HatType(value) + return nil +} +func (HatType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0} +} + +// This enum represents days of the week. +type Days int32 + +const ( + Days_MONDAY Days = 1 + Days_TUESDAY Days = 2 + Days_LUNDI Days = 1 +) + +var Days_name = map[int32]string{ + 1: "MONDAY", + 2: "TUESDAY", + // Duplicate value: 1: "LUNDI", +} +var Days_value = map[string]int32{ + "MONDAY": 1, + "TUESDAY": 2, + "LUNDI": 1, +} + +func (x Days) Enum() *Days { + p := new(Days) + *p = x + return p +} +func (x Days) String() string { + return proto.EnumName(Days_name, int32(x)) +} +func (x *Days) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") + if err != nil { + return err + } + *x = Days(value) + return nil +} +func (Days) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1} +} + +type Request_Color int32 + +const ( + Request_RED Request_Color = 0 + Request_GREEN Request_Color = 1 + Request_BLUE Request_Color = 2 +) + +var Request_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Request_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Request_Color) Enum() *Request_Color { + p := new(Request_Color) + *p = x + return p +} +func (x Request_Color) String() string { + return proto.EnumName(Request_Color_name, int32(x)) +} +func (x *Request_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") + if err != nil { + return err + } + *x = Request_Color(value) + return nil +} +func (Request_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0, 0} +} + +type Reply_Entry_Game int32 + +const ( + Reply_Entry_FOOTBALL Reply_Entry_Game = 1 + Reply_Entry_TENNIS Reply_Entry_Game = 2 +) + +var Reply_Entry_Game_name = map[int32]string{ + 1: "FOOTBALL", + 2: "TENNIS", +} +var Reply_Entry_Game_value = map[string]int32{ + "FOOTBALL": 1, + "TENNIS": 2, +} + +func (x Reply_Entry_Game) Enum() *Reply_Entry_Game { + p := new(Reply_Entry_Game) + *p = x + return p +} +func (x Reply_Entry_Game) String() string { + return proto.EnumName(Reply_Entry_Game_name, int32(x)) +} +func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") + if err != nil { + return err + } + *x = Reply_Entry_Game(value) + return nil +} +func (Reply_Entry_Game) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1, 0, 0} +} + +// This is a message that might be sent somewhere. +type Request struct { + Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"` + // optional imp.ImportedMessage imported_message = 2; + Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"` + Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"` + // optional imp.ImportedMessage.Owner owner = 6; + Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"` + Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This is a map field. It will generate map[int32]string. + NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // This is a map field whose value type is a message. + MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` + // This field should not conflict with any getters. + GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0} +} +func (m *Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request.Unmarshal(m, b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request.Marshal(b, m, deterministic) +} +func (dst *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(dst, src) +} +func (m *Request) XXX_Size() int { + return xxx_messageInfo_Request.Size(m) +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Request proto.InternalMessageInfo + +const Default_Request_Hat HatType = HatType_FEDORA + +var Default_Request_Deadline float32 = float32(math.Inf(1)) + +func (m *Request) GetKey() []int64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Request) GetHue() Request_Color { + if m != nil && m.Hue != nil { + return *m.Hue + } + return Request_RED +} + +func (m *Request) GetHat() HatType { + if m != nil && m.Hat != nil { + return *m.Hat + } + return Default_Request_Hat +} + +func (m *Request) GetDeadline() float32 { + if m != nil && m.Deadline != nil { + return *m.Deadline + } + return Default_Request_Deadline +} + +func (m *Request) GetSomegroup() *Request_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *Request) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *Request) GetMsgMapping() map[int64]*Reply { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *Request) GetReset_() int32 { + if m != nil && m.Reset_ != nil { + return *m.Reset_ + } + return 0 +} + +func (m *Request) GetGetKey_() string { + if m != nil && m.GetKey_ != nil { + return *m.GetKey_ + } + return "" +} + +type Request_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} } +func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Request_SomeGroup) ProtoMessage() {} +func (*Request_SomeGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0, 0} +} +func (m *Request_SomeGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request_SomeGroup.Unmarshal(m, b) +} +func (m *Request_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request_SomeGroup.Marshal(b, m, deterministic) +} +func (dst *Request_SomeGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request_SomeGroup.Merge(dst, src) +} +func (m *Request_SomeGroup) XXX_Size() int { + return xxx_messageInfo_Request_SomeGroup.Size(m) +} +func (m *Request_SomeGroup) XXX_DiscardUnknown() { + xxx_messageInfo_Request_SomeGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_Request_SomeGroup proto.InternalMessageInfo + +func (m *Request_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Reply struct { + Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` + CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Reply) Reset() { *m = Reply{} } +func (m *Reply) String() string { return proto.CompactTextString(m) } +func (*Reply) ProtoMessage() {} +func (*Reply) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1} +} + +var extRange_Reply = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Reply +} +func (m *Reply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Reply.Unmarshal(m, b) +} +func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Reply.Marshal(b, m, deterministic) +} +func (dst *Reply) XXX_Merge(src proto.Message) { + xxx_messageInfo_Reply.Merge(dst, src) +} +func (m *Reply) XXX_Size() int { + return xxx_messageInfo_Reply.Size(m) +} +func (m *Reply) XXX_DiscardUnknown() { + xxx_messageInfo_Reply.DiscardUnknown(m) +} + +var xxx_messageInfo_Reply proto.InternalMessageInfo + +func (m *Reply) GetFound() []*Reply_Entry { + if m != nil { + return m.Found + } + return nil +} + +func (m *Reply) GetCompactKeys() []int32 { + if m != nil { + return m.CompactKeys + } + return nil +} + +type Reply_Entry struct { + KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"` + Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"` + XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Reply_Entry) Reset() { *m = Reply_Entry{} } +func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } +func (*Reply_Entry) ProtoMessage() {} +func (*Reply_Entry) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1, 0} +} +func (m *Reply_Entry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Reply_Entry.Unmarshal(m, b) +} +func (m *Reply_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Reply_Entry.Marshal(b, m, deterministic) +} +func (dst *Reply_Entry) XXX_Merge(src proto.Message) { + xxx_messageInfo_Reply_Entry.Merge(dst, src) +} +func (m *Reply_Entry) XXX_Size() int { + return xxx_messageInfo_Reply_Entry.Size(m) +} +func (m *Reply_Entry) XXX_DiscardUnknown() { + xxx_messageInfo_Reply_Entry.DiscardUnknown(m) +} + +var xxx_messageInfo_Reply_Entry proto.InternalMessageInfo + +const Default_Reply_Entry_Value int64 = 7 + +func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 { + if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil { + return *m.KeyThatNeeds_1234Camel_CasIng + } + return 0 +} + +func (m *Reply_Entry) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return Default_Reply_Entry_Value +} + +func (m *Reply_Entry) GetXMyFieldName_2() int64 { + if m != nil && m.XMyFieldName_2 != nil { + return *m.XMyFieldName_2 + } + return 0 +} + +type OtherBase struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherBase) Reset() { *m = OtherBase{} } +func (m *OtherBase) String() string { return proto.CompactTextString(m) } +func (*OtherBase) ProtoMessage() {} +func (*OtherBase) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{2} +} + +var extRange_OtherBase = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherBase +} +func (m *OtherBase) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherBase.Unmarshal(m, b) +} +func (m *OtherBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherBase.Marshal(b, m, deterministic) +} +func (dst *OtherBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherBase.Merge(dst, src) +} +func (m *OtherBase) XXX_Size() int { + return xxx_messageInfo_OtherBase.Size(m) +} +func (m *OtherBase) XXX_DiscardUnknown() { + xxx_messageInfo_OtherBase.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherBase proto.InternalMessageInfo + +func (m *OtherBase) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type ReplyExtensions struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} } +func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*ReplyExtensions) ProtoMessage() {} +func (*ReplyExtensions) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{3} +} +func (m *ReplyExtensions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplyExtensions.Unmarshal(m, b) +} +func (m *ReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplyExtensions.Marshal(b, m, deterministic) +} +func (dst *ReplyExtensions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplyExtensions.Merge(dst, src) +} +func (m *ReplyExtensions) XXX_Size() int { + return xxx_messageInfo_ReplyExtensions.Size(m) +} +func (m *ReplyExtensions) XXX_DiscardUnknown() { + xxx_messageInfo_ReplyExtensions.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplyExtensions proto.InternalMessageInfo + +var E_ReplyExtensions_Time = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.time", + Tag: "fixed64,101,opt,name=time", + Filename: "my_test/test.proto", +} + +var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 105, + Name: "my.test.ReplyExtensions.carrot", + Tag: "bytes,105,opt,name=carrot", + Filename: "my_test/test.proto", +} + +var E_ReplyExtensions_Donut = &proto.ExtensionDesc{ + ExtendedType: (*OtherBase)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.donut", + Tag: "bytes,101,opt,name=donut", + Filename: "my_test/test.proto", +} + +type OtherReplyExtensions struct { + Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} } +func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*OtherReplyExtensions) ProtoMessage() {} +func (*OtherReplyExtensions) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{4} +} +func (m *OtherReplyExtensions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherReplyExtensions.Unmarshal(m, b) +} +func (m *OtherReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherReplyExtensions.Marshal(b, m, deterministic) +} +func (dst *OtherReplyExtensions) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherReplyExtensions.Merge(dst, src) +} +func (m *OtherReplyExtensions) XXX_Size() int { + return xxx_messageInfo_OtherReplyExtensions.Size(m) +} +func (m *OtherReplyExtensions) XXX_DiscardUnknown() { + xxx_messageInfo_OtherReplyExtensions.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherReplyExtensions proto.InternalMessageInfo + +func (m *OtherReplyExtensions) GetKey() int32 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +type OldReply struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldReply) Reset() { *m = OldReply{} } +func (m *OldReply) String() string { return proto.CompactTextString(m) } +func (*OldReply) ProtoMessage() {} +func (*OldReply) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{5} +} + +func (m *OldReply) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) +} +func (m *OldReply) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) +} + +var extRange_OldReply = []proto.ExtensionRange{ + {Start: 100, End: 2147483646}, +} + +func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OldReply +} +func (m *OldReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldReply.Unmarshal(m, b) +} +func (m *OldReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldReply.Marshal(b, m, deterministic) +} +func (dst *OldReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldReply.Merge(dst, src) +} +func (m *OldReply) XXX_Size() int { + return xxx_messageInfo_OldReply.Size(m) +} +func (m *OldReply) XXX_DiscardUnknown() { + xxx_messageInfo_OldReply.DiscardUnknown(m) +} + +var xxx_messageInfo_OldReply proto.InternalMessageInfo + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Height + // *Communique_Today + // *Communique_Maybe + // *Communique_Delta_ + // *Communique_Msg + // *Communique_Somegroup + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} +func (*Communique) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{6} +} +func (m *Communique) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique.Unmarshal(m, b) +} +func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique.Marshal(b, m, deterministic) +} +func (dst *Communique) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique.Merge(dst, src) +} +func (m *Communique) XXX_Size() int { + return xxx_messageInfo_Communique.Size(m) +} +func (m *Communique) XXX_DiscardUnknown() { + xxx_messageInfo_Communique.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique proto.InternalMessageInfo + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Height struct { + Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` +} +type Communique_Today struct { + Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` +} +type Communique_Maybe struct { + Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` +} +type Communique_Delta_ struct { + Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` +} +type Communique_Msg struct { + Msg *Reply `protobuf:"bytes,16,opt,name=msg,oneof"` +} +type Communique_Somegroup struct { + Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Height) isCommunique_Union() {} +func (*Communique_Today) isCommunique_Union() {} +func (*Communique_Maybe) isCommunique_Union() {} +func (*Communique_Delta_) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} +func (*Communique_Somegroup) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetHeight() float32 { + if x, ok := m.GetUnion().(*Communique_Height); ok { + return x.Height + } + return 0 +} + +func (m *Communique) GetToday() Days { + if x, ok := m.GetUnion().(*Communique_Today); ok { + return x.Today + } + return Days_MONDAY +} + +func (m *Communique) GetMaybe() bool { + if x, ok := m.GetUnion().(*Communique_Maybe); ok { + return x.Maybe + } + return false +} + +func (m *Communique) GetDelta() int32 { + if x, ok := m.GetUnion().(*Communique_Delta_); ok { + return x.Delta + } + return 0 +} + +func (m *Communique) GetMsg() *Reply { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +func (m *Communique) GetSomegroup() *Communique_SomeGroup { + if x, ok := m.GetUnion().(*Communique_Somegroup); ok { + return x.Somegroup + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Height)(nil), + (*Communique_Today)(nil), + (*Communique_Maybe)(nil), + (*Communique_Delta_)(nil), + (*Communique_Msg)(nil), + (*Communique_Somegroup)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Name) + case *Communique_Data: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Data) + case *Communique_TempC: + _ = b.EncodeVarint(8<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Height: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Height))) + case *Communique_Today: + _ = b.EncodeVarint(10<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Today)) + case *Communique_Maybe: + t := uint64(0) + if x.Maybe { + t = 1 + } + _ = b.EncodeVarint(11<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Communique_Delta_: + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Delta)) + case *Communique_Msg: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case *Communique_Somegroup: + _ = b.EncodeVarint(14<<3 | proto.WireStartGroup) + if err := b.Marshal(x.Somegroup); err != nil { + return err + } + _ = b.EncodeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.height + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Communique_Height{math.Float32frombits(uint32(x))} + return true, err + case 10: // union.today + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Today{Days(x)} + return true, err + case 11: // union.maybe + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Maybe{x != 0} + return true, err + case 12: // union.delta + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Communique_Delta_{int32(x)} + return true, err + case 16: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reply) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + case 14: // union.somegroup + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Communique_SomeGroup) + err := b.DecodeGroup(msg) + m.Union = &Communique_Somegroup{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += 1 // tag and wire + n += 8 + case *Communique_Height: + n += 1 // tag and wire + n += 4 + case *Communique_Today: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Today)) + case *Communique_Maybe: + n += 1 // tag and wire + n += 1 + case *Communique_Delta_: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Communique_Somegroup: + n += 1 // tag and wire + n += proto.Size(x.Somegroup) + n += 1 // tag and wire + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Communique_SomeGroup struct { + Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} } +func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Communique_SomeGroup) ProtoMessage() {} +func (*Communique_SomeGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{6, 0} +} +func (m *Communique_SomeGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique_SomeGroup.Unmarshal(m, b) +} +func (m *Communique_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique_SomeGroup.Marshal(b, m, deterministic) +} +func (dst *Communique_SomeGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique_SomeGroup.Merge(dst, src) +} +func (m *Communique_SomeGroup) XXX_Size() int { + return xxx_messageInfo_Communique_SomeGroup.Size(m) +} +func (m *Communique_SomeGroup) XXX_DiscardUnknown() { + xxx_messageInfo_Communique_SomeGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique_SomeGroup proto.InternalMessageInfo + +func (m *Communique_SomeGroup) GetMember() string { + if m != nil && m.Member != nil { + return *m.Member + } + return "" +} + +type Communique_Delta struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique_Delta) Reset() { *m = Communique_Delta{} } +func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } +func (*Communique_Delta) ProtoMessage() {} +func (*Communique_Delta) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{6, 1} +} +func (m *Communique_Delta) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique_Delta.Unmarshal(m, b) +} +func (m *Communique_Delta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique_Delta.Marshal(b, m, deterministic) +} +func (dst *Communique_Delta) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique_Delta.Merge(dst, src) +} +func (m *Communique_Delta) XXX_Size() int { + return xxx_messageInfo_Communique_Delta.Size(m) +} +func (m *Communique_Delta) XXX_DiscardUnknown() { + xxx_messageInfo_Communique_Delta.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique_Delta proto.InternalMessageInfo + +var E_Tag = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*string)(nil), + Field: 103, + Name: "my.test.tag", + Tag: "bytes,103,opt,name=tag", + Filename: "my_test/test.proto", +} + +var E_Donut = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*OtherReplyExtensions)(nil), + Field: 106, + Name: "my.test.donut", + Tag: "bytes,106,opt,name=donut", + Filename: "my_test/test.proto", +} + +func init() { + proto.RegisterType((*Request)(nil), "my.test.Request") + proto.RegisterMapType((map[int64]*Reply)(nil), "my.test.Request.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "my.test.Request.NameMappingEntry") + proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup") + proto.RegisterType((*Reply)(nil), "my.test.Reply") + proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") + proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") + proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") + proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") + proto.RegisterType((*OldReply)(nil), "my.test.OldReply") + proto.RegisterType((*Communique)(nil), "my.test.Communique") + proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") + proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") + proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) + proto.RegisterEnum("my.test.Days", Days_name, Days_value) + proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) + proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) + proto.RegisterExtension(E_ReplyExtensions_Time) + proto.RegisterExtension(E_ReplyExtensions_Carrot) + proto.RegisterExtension(E_ReplyExtensions_Donut) + proto.RegisterExtension(E_Tag) + proto.RegisterExtension(E_Donut) +} + +func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_test_220c5cc0922855ae) } + +var fileDescriptor_test_220c5cc0922855ae = []byte{ + // 1031 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0xce, 0xd8, 0x71, 0x7e, 0x4e, 0x42, 0x6b, 0x46, 0x55, 0x6b, 0x05, 0xed, 0xd6, 0x04, 0x8a, + 0x4c, 0xc5, 0xa6, 0xda, 0x80, 0xc4, 0x2a, 0x88, 0xd5, 0x36, 0x3f, 0x6d, 0xaa, 0x6d, 0x12, 0x69, + 0xda, 0x5e, 0xb0, 0x37, 0xd6, 0x34, 0x9e, 0x3a, 0xa6, 0x19, 0x3b, 0x6b, 0x8f, 0x11, 0xbe, 0xeb, + 0x53, 0xc0, 0x6b, 0x70, 0xcf, 0x0b, 0xf1, 0x16, 0x45, 0x33, 0x0e, 0x49, 0xda, 0xa0, 0xbd, 0xb1, + 0x7c, 0xce, 0xf9, 0xce, 0xe7, 0x39, 0x3f, 0xf3, 0x19, 0x30, 0xcf, 0x5c, 0xc1, 0x12, 0x71, 0x22, + 0x1f, 0xad, 0x45, 0x1c, 0x89, 0x08, 0x97, 0x79, 0xd6, 0x92, 0x66, 0x03, 0xf3, 0x74, 0x2e, 0x82, + 0x13, 0xf5, 0x7c, 0x9d, 0x07, 0x9b, 0xff, 0x14, 0xa1, 0x4c, 0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 0x3f, 0x77, 0x94, 0x7e, 0xbe, 0x58, 0x21, 0xd7, 0xbd, 0x5b, 0x4b, 0xe8, + 0xb0, 0xb0, 0x21, 0xa2, 0x8d, 0xaf, 0x36, 0xc5, 0x68, 0x1f, 0x4a, 0x9c, 0xa9, 0xfe, 0xed, 0xe6, + 0x8a, 0x95, 0x5b, 0x8d, 0x32, 0x18, 0x7d, 0x79, 0xa0, 0x6e, 0x19, 0x8c, 0x34, 0x0c, 0xa2, 0xf0, + 0xf8, 0x25, 0x94, 0x97, 0x72, 0x2f, 0xd7, 0x3c, 0x17, 0x7c, 0x13, 0x49, 0x51, 0x38, 0x1b, 0x7c, + 0x30, 0xb5, 0xe3, 0x16, 0x14, 0x65, 0xe9, 0x32, 0x38, 0x9a, 0x8c, 0xfb, 0xa7, 0xbf, 0x98, 0x08, + 0xd7, 0xa0, 0x7c, 0x7d, 0x33, 0xb8, 0x92, 0x86, 0x26, 0x55, 0xe3, 0xf2, 0x66, 0xdc, 0xbf, 0x30, + 0x51, 0x43, 0x33, 0x51, 0xc7, 0x06, 0x5d, 0x50, 0x7f, 0x6b, 0x5f, 0x7d, 0x75, 0x0c, 0x19, 0xea, + 0xf4, 0xfe, 0x5b, 0xc9, 0xe7, 0x98, 0x5f, 0x55, 0x77, 0x5e, 0x3c, 0x5d, 0xd4, 0xff, 0xdf, 0xc9, + 0xee, 0xbb, 0x0f, 0x6f, 0xfd, 0x40, 0xcc, 0xd2, 0xdb, 0xd6, 0x34, 0xe2, 0x27, 0x7e, 0xe4, 0x47, + 0x27, 0xea, 0xd7, 0x78, 0x9b, 0xde, 0xe5, 0x2f, 0xd3, 0x57, 0x3e, 0x0b, 0x5f, 0xa9, 0x80, 0x24, + 0x93, 0xfb, 0x70, 0xb2, 0xfc, 0xcd, 0xfe, 0x24, 0x1f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x28, + 0xe2, 0x2a, 0xeb, 0x75, 0x07, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto new file mode 100644 index 000000000..c16c2871f --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto @@ -0,0 +1,158 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +// This package holds interesting messages. +package my.test; // dotted package name + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test;test"; + +//import "imp.proto"; +import "multi/multi1.proto"; // unused import + +enum HatType { + // deliberately skipping 0 + FEDORA = 1; + FEZ = 2; +} + +// This enum represents days of the week. +enum Days { + option allow_alias = true; + + MONDAY = 1; + TUESDAY = 2; + LUNDI = 1; // same value as MONDAY +} + +// This is a message that might be sent somewhere. +message Request { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + repeated int64 key = 1; +// optional imp.ImportedMessage imported_message = 2; + optional Color hue = 3; // no default + optional HatType hat = 4 [default=FEDORA]; +// optional imp.ImportedMessage.Owner owner = 6; + optional float deadline = 7 [default=inf]; + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // These foreign types are in imp2.proto, + // which is publicly imported by imp.proto. +// optional imp.PubliclyImportedMessage pub = 10; +// optional imp.PubliclyImportedEnum pub_enum = 13 [default=HAIR]; + + + // This is a map field. It will generate map[int32]string. + map name_mapping = 14; + // This is a map field whose value type is a message. + map msg_mapping = 15; + + optional int32 reset = 12; + // This field should not conflict with any getters. + optional string get_key = 16; +} + +message Reply { + message Entry { + required int64 key_that_needs_1234camel_CasIng = 1; + optional int64 value = 2 [default=7]; + optional int64 _my_field_name_2 = 3; + enum Game { + FOOTBALL = 1; + TENNIS = 2; + } + } + repeated Entry found = 1; + repeated int32 compact_keys = 2 [packed=true]; + extensions 100 to max; +} + +message OtherBase { + optional string name = 1; + extensions 100 to max; +} + +message ReplyExtensions { + extend Reply { + optional double time = 101; + optional ReplyExtensions carrot = 105; + } + extend OtherBase { + optional ReplyExtensions donut = 101; + } +} + +message OtherReplyExtensions { + optional int32 key = 1; +} + +// top-level extension +extend Reply { + optional string tag = 103; + optional OtherReplyExtensions donut = 106; +// optional imp.ImportedMessage elephant = 107; // extend with message from another file. +} + +message OldReply { + // Extensions will be encoded in MessageSet wire format. + option message_set_wire_format = true; + extensions 100 to max; +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + float height = 9; + Days today = 10; + bool maybe = 11; + sint32 delta = 12; // name will conflict with Delta below + Reply msg = 16; // requires two bytes to encode field tag + group SomeGroup = 14 { + optional string member = 15; + } + } + + message Delta {} +} + diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.pb.go b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.pb.go new file mode 100644 index 000000000..af2e8544d --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.pb.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3/proto3.proto + +package proto3 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Request_Flavour int32 + +const ( + Request_SWEET Request_Flavour = 0 + Request_SOUR Request_Flavour = 1 + Request_UMAMI Request_Flavour = 2 + Request_GOPHERLICIOUS Request_Flavour = 3 +) + +var Request_Flavour_name = map[int32]string{ + 0: "SWEET", + 1: "SOUR", + 2: "UMAMI", + 3: "GOPHERLICIOUS", +} +var Request_Flavour_value = map[string]int32{ + "SWEET": 0, + "SOUR": 1, + "UMAMI": 2, + "GOPHERLICIOUS": 3, +} + +func (x Request_Flavour) String() string { + return proto.EnumName(Request_Flavour_name, int32(x)) +} +func (Request_Flavour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_proto3_1eff755e13e61017, []int{0, 0} +} + +type Request struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Key []int64 `protobuf:"varint,2,rep,packed,name=key" json:"key,omitempty"` + Taste Request_Flavour `protobuf:"varint,3,opt,name=taste,proto3,enum=proto3.Request_Flavour" json:"taste,omitempty"` + Book *Book `protobuf:"bytes,4,opt,name=book" json:"book,omitempty"` + Unpacked []int64 `protobuf:"varint,5,rep,name=unpacked" json:"unpacked,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_1eff755e13e61017, []int{0} +} +func (m *Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request.Unmarshal(m, b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request.Marshal(b, m, deterministic) +} +func (dst *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(dst, src) +} +func (m *Request) XXX_Size() int { + return xxx_messageInfo_Request.Size(m) +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Request proto.InternalMessageInfo + +func (m *Request) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Request) GetKey() []int64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Request) GetTaste() Request_Flavour { + if m != nil { + return m.Taste + } + return Request_SWEET +} + +func (m *Request) GetBook() *Book { + if m != nil { + return m.Book + } + return nil +} + +func (m *Request) GetUnpacked() []int64 { + if m != nil { + return m.Unpacked + } + return nil +} + +type Book struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + RawData []byte `protobuf:"bytes,2,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Book) Reset() { *m = Book{} } +func (m *Book) String() string { return proto.CompactTextString(m) } +func (*Book) ProtoMessage() {} +func (*Book) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_1eff755e13e61017, []int{1} +} +func (m *Book) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Book.Unmarshal(m, b) +} +func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Book.Marshal(b, m, deterministic) +} +func (dst *Book) XXX_Merge(src proto.Message) { + xxx_messageInfo_Book.Merge(dst, src) +} +func (m *Book) XXX_Size() int { + return xxx_messageInfo_Book.Size(m) +} +func (m *Book) XXX_DiscardUnknown() { + xxx_messageInfo_Book.DiscardUnknown(m) +} + +var xxx_messageInfo_Book proto.InternalMessageInfo + +func (m *Book) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Book) GetRawData() []byte { + if m != nil { + return m.RawData + } + return nil +} + +func init() { + proto.RegisterType((*Request)(nil), "proto3.Request") + proto.RegisterType((*Book)(nil), "proto3.Book") + proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value) +} + +func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_proto3_1eff755e13e61017) } + +var fileDescriptor_proto3_1eff755e13e61017 = []byte{ + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0x4d, 0x4f, 0xf2, 0x40, + 0x14, 0x85, 0x99, 0x7e, 0xbc, 0xc0, 0x7d, 0xd1, 0x8c, 0x57, 0x13, 0xc7, 0x8d, 0x99, 0xb0, 0xea, + 0x86, 0x92, 0xe0, 0x42, 0x63, 0xdc, 0x88, 0xa2, 0x92, 0x48, 0x30, 0x83, 0xc4, 0xc4, 0x8d, 0x99, + 0xc2, 0x58, 0x49, 0x81, 0xc1, 0x76, 0x2a, 0xf1, 0xcf, 0xfa, 0x5b,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+ 0xd2, 0x48, 0xe6, 0x70, 0x12, 0xb4, 0x44, 0x3d, 0x95, 0xdb, 0x5b, 0x69, 0x64, 0xff, 0xf2, 0xf5, + 0x22, 0x5e, 0x98, 0x8f, 0x3c, 0x0a, 0x67, 0x7a, 0xd5, 0x8d, 0x75, 0xac, 0x6d, 0x82, 0x51, 0xfe, + 0x6e, 0xc5, 0xac, 0x13, 0xab, 0x75, 0xa7, 0x5c, 0x18, 0x95, 0x99, 0x82, 0x51, 0x65, 0x1c, 0x55, + 0xe9, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xe1, 0xfa, 0x46, 0x7b, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.proto b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.proto new file mode 100644 index 000000000..08539761a --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.proto @@ -0,0 +1,55 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package proto3; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3"; + +message Request { + enum Flavour { + SWEET = 0; + SOUR = 1; + UMAMI = 2; + GOPHERLICIOUS = 3; + } + string name = 1; + repeated int64 key = 2; + Flavour taste = 3; + Book book = 4; + repeated int64 unpacked = 5 [packed=false]; +} + +message Book { + string title = 1; + bytes raw_data = 2; +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogofast/main.go b/deps/github.com/gogo/protobuf/protoc-gen-gogofast/main.go new file mode 100644 index 000000000..96c18d9fc --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogofast/main.go @@ -0,0 +1,47 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go b/deps/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go new file mode 100644 index 000000000..ba3e7e155 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go @@ -0,0 +1,50 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) + vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go b/deps/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go new file mode 100644 index 000000000..235bd64af --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go @@ -0,0 +1,59 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) + vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) + + vanity.ForEachFile(files, vanity.TurnOffGoEnumPrefixAll) + vanity.ForEachFile(files, vanity.TurnOffGoEnumStringerAll) + vanity.ForEachFile(files, vanity.TurnOnEnumStringerAll) + + vanity.ForEachFile(files, vanity.TurnOnEqualAll) + vanity.ForEachFile(files, vanity.TurnOnGoStringAll) + vanity.ForEachFile(files, vanity.TurnOffGoStringerAll) + vanity.ForEachFile(files, vanity.TurnOnStringerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go b/deps/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go new file mode 100644 index 000000000..326a3aa86 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go @@ -0,0 +1,76 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "strings" + + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFile(files, vanity.TurnOffGoEnumStringerAll) + vanity.ForEachFile(files, vanity.TurnOnEnumStringerAll) + + vanity.ForEachFile(files, vanity.TurnOnEqualAll) + vanity.ForEachFile(files, vanity.TurnOnGoStringAll) + vanity.ForEachFile(files, vanity.TurnOffGoStringerAll) + + vanity.ForEachFile(files, vanity.TurnOnMessageNameAll) + + for _, file := range files { + if strings.HasSuffix(file.GetName(), "struct.proto") { + // TODO struct can also get a compare method when + // https://github.com/gogo/protobuf/issues/221 is fixed + continue + } + vanity.TurnOnCompareAll(file) + } + + for _, file := range files { + if strings.HasSuffix(file.GetName(), "timestamp.proto") || + strings.HasSuffix(file.GetName(), "duration.proto") { + continue + } + vanity.TurnOnStringerAll(file) + vanity.TurnOnPopulateAll(file) + } + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/deps/github.com/gogo/protobuf/protoc-gen-gostring/main.go b/deps/github.com/gogo/protobuf/protoc-gen-gostring/main.go new file mode 100644 index 000000000..9c7dd6b85 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-gen-gostring/main.go @@ -0,0 +1,42 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "github.com/gogo/protobuf/plugin/gostring" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + p := gostring.NewGoString() + p.Overwrite() + resp := command.GeneratePlugin(req, p, "_gostring.gen.go") + command.Write(resp) +} diff --git a/deps/github.com/gogo/protobuf/protoc-min-version/minversion.go b/deps/github.com/gogo/protobuf/protoc-min-version/minversion.go new file mode 100644 index 000000000..73ea7eae7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/protoc-min-version/minversion.go @@ -0,0 +1,67 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "fmt" + "os" + "os/exec" + "strings" + + "github.com/gogo/protobuf/version" +) + +func filter(ss []string, flag string) ([]string, string) { + s := make([]string, 0, len(ss)) + var v string + for i := range ss { + if strings.Contains(ss[i], flag) { + vs := strings.Split(ss[i], "=") + v = vs[1] + continue + } + s = append(s, ss[i]) + } + return s, v +} + +func main() { + args, min := filter(os.Args[1:], "-version") + if !version.AtLeast(min) { + fmt.Printf("protoc version not high enough to parse this proto file\n") + return + } + gen := exec.Command("protoc", args...) + gen.Stderr = os.Stderr + gen.Stdout = os.Stdout + err := gen.Run() + if err != nil { + panic(err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/.gitignore b/deps/github.com/gogo/protobuf/test/.gitignore new file mode 100644 index 000000000..773a6df9b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/.gitignore @@ -0,0 +1 @@ +*.dat diff --git a/deps/github.com/gogo/protobuf/test/Makefile b/deps/github.com/gogo/protobuf/test/Makefile new file mode 100644 index 000000000..e3002d180 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/Makefile @@ -0,0 +1,39 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-gen-combo + protoc --gogo_out=. --proto_path=../:../../../../:../protobuf/:. thetest.proto + protoc-gen-combo --default=false --gogo_out=. --proto_path=../:../../../../:../protobuf/:. thetest.proto + cp uuid.go ./combos/both/ + cp uuid.go ./combos/marshaler/ + cp uuid.go ./combos/unmarshaler/ + cp bug_test.go ./combos/both/ + cp bug_test.go ./combos/marshaler/ + cp bug_test.go ./combos/unmarshaler/ diff --git a/deps/github.com/gogo/protobuf/test/asymetric-issue125/Makefile b/deps/github.com/gogo/protobuf/test/asymetric-issue125/Makefile new file mode 100644 index 000000000..c42b8cf66 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/asymetric-issue125/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. asym.proto) diff --git a/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go b/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go new file mode 100644 index 000000000..2a906a995 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go @@ -0,0 +1,635 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: asym.proto + +package asym + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M struct { + Arr []MyType `protobuf:"bytes,1,rep,name=arr,customtype=MyType" json:"arr"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_asym_34ee0efbcd9b19e2, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return m.Size() +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +type MyType struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyType) Reset() { *m = MyType{} } +func (m *MyType) String() string { return proto.CompactTextString(m) } +func (*MyType) ProtoMessage() {} +func (*MyType) Descriptor() ([]byte, []int) { + return fileDescriptor_asym_34ee0efbcd9b19e2, []int{1} +} +func (m *MyType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyType.Marshal(b, m, deterministic) +} +func (dst *MyType) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyType.Merge(dst, src) +} +func (m *MyType) XXX_Size() int { + return xxx_messageInfo_MyType.Size(m) +} +func (m *MyType) XXX_DiscardUnknown() { + xxx_messageInfo_MyType.DiscardUnknown(m) +} + +var xxx_messageInfo_MyType proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M)(nil), "asym.M") + proto.RegisterType((*MyType)(nil), "asym.MyType") +} +func (this *M) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *M") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *M but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *M but is not nil && this == nil") + } + if len(this.Arr) != len(that1.Arr) { + return fmt.Errorf("Arr this(%v) Not Equal that(%v)", len(this.Arr), len(that1.Arr)) + } + for i := range this.Arr { + if !this.Arr[i].Equal(that1.Arr[i]) { + return fmt.Errorf("Arr this[%v](%v) Not Equal that[%v](%v)", i, this.Arr[i], i, that1.Arr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *M) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Arr) != len(that1.Arr) { + return false + } + for i := range this.Arr { + if !this.Arr[i].Equal(that1.Arr[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyType) + if !ok { + that2, ok := that.(MyType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyType but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyType) + if !ok { + that2, ok := that.(MyType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *M) 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 *M) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Arr) > 0 { + for _, msg := range m.Arr { + dAtA[i] = 0xa + i++ + i = encodeVarintAsym(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 encodeVarintAsym(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 NewPopulatedM(r randyAsym, easy bool) *M { + this := &M{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.Arr = make([]MyType, v1) + for i := 0; i < v1; i++ { + v2 := NewPopulatedMyType(r) + this.Arr[i] = *v2 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAsym(r, 2) + } + return this +} + +type randyAsym interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAsym(r randyAsym) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAsym(r randyAsym) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneAsym(r) + } + return string(tmps) +} +func randUnrecognizedAsym(r randyAsym, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldAsym(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldAsym(dAtA []byte, r randyAsym, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateAsym(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateAsym(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateAsym(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *M) Size() (n int) { + var l int + _ = l + if len(m.Arr) > 0 { + for _, e := range m.Arr { + l = e.Size() + n += 1 + l + sovAsym(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAsym(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAsym(x uint64) (n int) { + return sovAsym(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *M) 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 ErrIntOverflowAsym + } + 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: M: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arr", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAsym + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAsym + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v MyType + m.Arr = append(m.Arr, v) + if err := m.Arr[len(m.Arr)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAsym(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAsym + } + 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 *MyType) 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 ErrIntOverflowAsym + } + 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: MyType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAsym(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAsym + } + 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 skipAsym(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, ErrIntOverflowAsym + } + 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, ErrIntOverflowAsym + } + 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, ErrIntOverflowAsym + } + 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, ErrInvalidLengthAsym + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAsym + } + 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 := skipAsym(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 ( + ErrInvalidLengthAsym = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAsym = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("asym.proto", fileDescriptor_asym_34ee0efbcd9b19e2) } + +var fileDescriptor_asym_34ee0efbcd9b19e2 = []byte{ + // 158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x2c, 0xae, 0xcc, + 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x72, 0x31, 0xfa, 0x0a, 0x29, 0x70, + 0x31, 0x27, 0x16, 0x15, 0x49, 0x30, 0x2a, 0x30, 0x6b, 0xf0, 0x38, 0xf1, 0x9d, 0xb8, 0x27, 0xcf, + 0x70, 0xeb, 0x9e, 0x3c, 0x9b, 0x6f, 0x65, 0x48, 0x65, 0x41, 0x6a, 0x10, 0x48, 0x4a, 0x49, 0x8a, + 0x0b, 0xca, 0xb5, 0x12, 0xd8, 0xb1, 0x40, 0x9e, 0xe1, 0xc7, 0x02, 0x79, 0x86, 0x8e, 0x85, 0xf2, + 0x0c, 0x0b, 0x16, 0xca, 0x33, 0x38, 0x49, 0x3c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, + 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0x81, 0x2c, 0x72, 0xc1, 0x9e, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto b/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto new file mode 100644 index 000000000..e5a42e5a3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto @@ -0,0 +1,52 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package asym; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +// TODO: renable this once https://github.com/gogo/protobuf/issues/388 is fixed: option (gogoproto.testgen_all) = true; + +message M { + repeated bytes arr = 1 [(gogoproto.customtype) = "MyType", (gogoproto.nullable) = false]; +} + +message MyType { + option (gogoproto.marshaler) = false; + option (gogoproto.sizer) = false; + option (gogoproto.populate) = false; + option (gogoproto.testgen) = false; +} diff --git a/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go b/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go new file mode 100644 index 000000000..708e2665b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go @@ -0,0 +1,40 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package asym + +import ( + "testing" +) + +func TestAsym(t *testing.T) { + m := &M{Arr: []MyType{{}, {}}} + if err := m.VerboseEqual(m); err != nil { + t.Fatalf("should be equal: %v", err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/asymetric-issue125/pop.go b/deps/github.com/gogo/protobuf/test/asymetric-issue125/pop.go new file mode 100644 index 000000000..a7cc5057d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/asymetric-issue125/pop.go @@ -0,0 +1,65 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package asym + +func NewPopulatedMyType(r randyAsym) *MyType { + this := &MyType{} + return this +} + +// TODO: rename this to Marshal once https://github.com/gogo/protobuf/issues/388 is fixed +func (m MyType) DisabledMarshal() (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 *MyType) 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 *MyType) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} diff --git a/deps/github.com/gogo/protobuf/test/bug_test.go b/deps/github.com/gogo/protobuf/test/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/bug_test.go @@ -0,0 +1,252 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/deps/github.com/gogo/protobuf/test/cachedsize/Makefile b/deps/github.com/gogo/protobuf/test/cachedsize/Makefile new file mode 100644 index 000000000..456498eb5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/cachedsize/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. cachedsize.proto) diff --git a/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.pb.go b/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.pb.go new file mode 100644 index 000000000..5572a5c21 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.pb.go @@ -0,0 +1,276 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cachedsize.proto + +package cachedsize + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Foo struct { + Field1 *Bar `protobuf:"bytes,1,opt,name=field1" json:"field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_cachedsize_3c7c595320e5882b, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Foo.Unmarshal(m, b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +func (m *Foo) GetField1() *Bar { + if m != nil { + return m.Field1 + } + return nil +} + +type Bar struct { + Field2 bool `protobuf:"varint,1,opt,name=field2" json:"field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Bar) Reset() { *m = Bar{} } +func (m *Bar) String() string { return proto.CompactTextString(m) } +func (*Bar) ProtoMessage() {} +func (*Bar) Descriptor() ([]byte, []int) { + return fileDescriptor_cachedsize_3c7c595320e5882b, []int{1} +} +func (m *Bar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Bar.Unmarshal(m, b) +} +func (m *Bar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Bar.Marshal(b, m, deterministic) +} +func (dst *Bar) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bar.Merge(dst, src) +} +func (m *Bar) XXX_Size() int { + return xxx_messageInfo_Bar.Size(m) +} +func (m *Bar) XXX_DiscardUnknown() { + xxx_messageInfo_Bar.DiscardUnknown(m) +} + +var xxx_messageInfo_Bar proto.InternalMessageInfo + +func (m *Bar) GetField2() bool { + if m != nil { + return m.Field2 + } + return false +} + +func init() { + proto.RegisterType((*Foo)(nil), "cachedsize.Foo") + proto.RegisterType((*Bar)(nil), "cachedsize.Bar") +} +func (this *Foo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Foo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Foo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Foo but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Bar) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Bar) + if !ok { + that2, ok := that.(Bar) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Bar") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Bar but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Bar but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Bar) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar) + if !ok { + that2, ok := that.(Bar) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Foo) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovCachedsize(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Bar) Size() (n int) { + var l int + _ = l + n += 2 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCachedsize(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCachedsize(x uint64) (n int) { + return sovCachedsize(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("cachedsize.proto", fileDescriptor_cachedsize_3c7c595320e5882b) } + +var fileDescriptor_cachedsize_3c7c595320e5882b = []byte{ + // 162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0x4e, 0x4c, 0xce, + 0x48, 0x4d, 0x29, 0xce, 0xac, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88, + 0x48, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, + 0xe7, 0xeb, 0x83, 0x95, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xaa, 0xa4, + 0xc7, 0xc5, 0xec, 0x96, 0x9f, 0x2f, 0xa4, 0xce, 0xc5, 0x96, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x28, + 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xc4, 0xaf, 0x87, 0x64, 0x89, 0x53, 0x62, 0x51, 0x10, 0x54, + 0x5a, 0x49, 0x99, 0x8b, 0xd9, 0x29, 0xb1, 0x48, 0x48, 0x06, 0xaa, 0xde, 0x08, 0xac, 0x9e, 0xc3, + 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x06, 0xa8, 0x22, 0x23, 0x27, 0x89, 0x07, 0x0f, 0xe5, 0x18, 0x57, + 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xe1, 0xc2, 0x23, 0x39, 0x86, 0x07, 0x8f, 0xe4, 0x18, + 0x3f, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x95, 0xd6, 0x7b, 0xf2, 0xbc, 0x00, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.proto b/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.proto new file mode 100644 index 000000000..fb21d0050 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize.proto @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package cachedsize; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.enum_stringer_all) = true; + +message Foo { + optional Bar field1 = 1; +} + +message Bar { + optional bool field2 = 1 [(gogoproto.nullable) = false]; + } diff --git a/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize_test.go b/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize_test.go new file mode 100644 index 000000000..3cb982e7c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/cachedsize/cachedsize_test.go @@ -0,0 +1,51 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package cachedsize + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestCachedSize(t *testing.T) { + in := &Foo{Field1: &Bar{Field2: true}} + + data, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + out := &Foo{} + err = proto.Unmarshal(data, out) + if err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/Makefile b/deps/github.com/gogo/protobuf/test/casttype/Makefile new file mode 100644 index 000000000..684c2e460 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2015, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --gogo_out=. --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. casttype.proto diff --git a/deps/github.com/gogo/protobuf/test/casttype/casttype.proto b/deps/github.com/gogo/protobuf/test/casttype/casttype.proto new file mode 100644 index 000000000..c726b9ef4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go b/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go new file mode 100644 index 000000000..c4464fc3d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go @@ -0,0 +1,2593 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c3de4173df712bd1, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c3de4173df712bd1, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4261 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x4b, 0x10, 0x1d, 0x83, 0x14, 0xe5, + 0x1f, 0xda, 0x4e, 0x28, 0x8f, 0xfe, 0x05, 0x25, 0x76, 0x09, 0x12, 0x62, 0xa0, 0x12, 0x24, 0xb3, + 0x24, 0x23, 0xcb, 0x69, 0x67, 0x67, 0xb9, 0xb8, 0x04, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, 0x92, + 0xa1, 0xe9, 0x83, 0x1a, 0xb7, 0xcd, 0xa4, 0x9d, 0xfe, 0x77, 0xa6, 0x89, 0xeb, 0xb8, 0x4d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 0xd3, 0x90, 0x61, 0xab, 0xca, 0xb0, 0x6a, 0xf8, + 0x79, 0xba, 0x7b, 0x26, 0x15, 0xb6, 0xd0, 0x2a, 0x44, 0x42, 0xba, 0xbf, 0xea, 0xd9, 0x96, 0x08, + 0x4d, 0xda, 0x05, 0x11, 0xd0, 0xee, 0xcf, 0x76, 0x6f, 0xdc, 0x0f, 0xf5, 0x1f, 0x5e, 0x77, 0x4c, + 0xcd, 0x7e, 0x37, 0x06, 0x09, 0xba, 0x5f, 0x8c, 0x41, 0x66, 0xf3, 0xca, 0x7a, 0x59, 0x5d, 0x5a, + 0xdb, 0x2a, 0xad, 0x94, 0x65, 0x09, 0xe5, 0x00, 0xa8, 0xe0, 0xe2, 0xca, 0xda, 0xc2, 0xa6, 0x1c, + 0x0b, 0x9e, 0x2b, 0xab, 0x9b, 0x67, 0x4e, 0xc9, 0xf1, 0x00, 0xb0, 0xc5, 0x04, 0x89, 0xb0, 0xc2, + 0xc9, 0x13, 0x72, 0x12, 0xc9, 0x90, 0x65, 0x04, 0x95, 0x67, 0xcb, 0x4b, 0x67, 0x4e, 0xc9, 0xc3, + 0x9d, 0x92, 0x93, 0x27, 0xe4, 0x11, 0x34, 0x0a, 0x69, 0x2a, 0x29, 0xad, 0xad, 0xad, 0xc8, 0xa9, + 0x80, 0x73, 0x63, 0x53, 0xa9, 0xac, 0x2e, 0xcb, 0xe9, 0x80, 0x73, 0x59, 0x59, 0xdb, 0x5a, 0x97, + 0x21, 0x60, 0xa8, 0x96, 0x37, 0x36, 0x16, 0x96, 0xcb, 0x72, 0x26, 0xd0, 0x28, 0x5d, 0xd9, 0x2c, + 0x6f, 0xc8, 0xd9, 0x0e, 0xb3, 0x4e, 0x9e, 0x90, 0x47, 0x83, 0x2e, 0xca, 0xab, 0x5b, 0x55, 0x39, + 0x87, 0xc6, 0x61, 0x94, 0x75, 0x21, 0x8c, 0x18, 0xeb, 0x12, 0x9d, 0x39, 0x25, 0xcb, 0x6d, 0x43, + 0x18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0x3e, 0xc7, 0xba, 0x6a, + 0x15, 0x14, 0xf5, 0x21, 0x4c, 0xfe, 0x57, 0xdf, 0xe1, 0x5c, 0x9d, 0xa5, 0x4a, 0x71, 0x85, 0x04, + 0x50, 0x67, 0x41, 0x11, 0x4d, 0xf6, 0xc2, 0x3b, 0x41, 0x0c, 0x75, 0xd4, 0x13, 0xc5, 0x8b, 0x30, + 0xda, 0x51, 0x4c, 0x44, 0x53, 0xfd, 0x1a, 0xa7, 0xca, 0x86, 0x6b, 0x89, 0xe2, 0x69, 0x48, 0x90, + 0xc2, 0x20, 0x1a, 0xfe, 0xeb, 0x1c, 0x4e, 0xd5, 0x8b, 0x9f, 0x80, 0x94, 0x28, 0x08, 0xa2, 0xa1, + 0xbf, 0xc1, 0xa1, 0x01, 0x84, 0xc0, 0x45, 0x31, 0x10, 0x0d, 0xff, 0xbc, 0x80, 0x0b, 0x08, 0x81, + 0x0f, 0xee, 0xc2, 0x1f, 0xfc, 0x56, 0x82, 0x6f, 0xe8, 0xc2, 0x77, 0x17, 0x60, 0x84, 0x57, 0x01, + 0xd1, 0xe8, 0x2f, 0xf0, 0xce, 0x05, 0xa2, 0x78, 0x16, 0x92, 0x03, 0x3a, 0xfc, 0xb7, 0x39, 0x94, + 0xe9, 0x17, 0x17, 0x21, 0x13, 0xca, 0xfc, 0xd1, 0xf0, 0xdf, 0xe1, 0xf0, 0x30, 0x8a, 0x98, 0xce, + 0x33, 0x7f, 0x34, 0xc1, 0xef, 0x0a, 0xd3, 0x39, 0x82, 0xb8, 0x4d, 0x24, 0xfd, 0x68, 0xf4, 0xef, + 0x09, 0xaf, 0x0b, 0x48, 0xf1, 0x19, 0x48, 0x07, 0x1b, 0x79, 0x34, 0xfe, 0xf7, 0x39, 0xbe, 0x8d, + 0x21, 0x1e, 0x08, 0x25, 0x92, 0x68, 0x8a, 0x3f, 0x10, 0x1e, 0x08, 0xa1, 0xc8, 0x32, 0xea, 0x2e, + 0x0e, 0xa2, 0x99, 0xfe, 0x50, 0x2c, 0xa3, 0xae, 0xda, 0x80, 0xcc, 0x26, 0xdd, 0x4f, 0xa3, 0x29, + 0xfe, 0x48, 0xcc, 0x26, 0xd5, 0x27, 0x66, 0x74, 0x67, 0xdb, 0x68, 0x8e, 0x3f, 0x16, 0x66, 0x74, + 0x25, 0xdb, 0xe2, 0x3a, 0xa0, 0xde, 0x4c, 0x1b, 0xcd, 0xf7, 0x45, 0xce, 0x37, 0xde, 0x93, 0x68, + 0x8b, 0x97, 0xe1, 0x50, 0xff, 0x2c, 0x1b, 0xcd, 0xfa, 0xa5, 0x77, 0xba, 0xce, 0x45, 0xe1, 0x24, + 0x5b, 0xdc, 0x6c, 0x6f, 0xd7, 0xe1, 0x0c, 0x1b, 0x4d, 0xfb, 0xe2, 0x3b, 0x9d, 0x3b, 0x76, 0x38, + 0xc1, 0x16, 0x17, 0x00, 0xda, 0xc9, 0x2d, 0x9a, 0xeb, 0x25, 0xce, 0x15, 0x02, 0x91, 0xa5, 0xc1, + 0x73, 0x5b, 0x34, 0xfe, 0xcb, 0x62, 0x69, 0x70, 0x04, 0x59, 0x1a, 0x22, 0xad, 0x45, 0xa3, 0x5f, + 0x16, 0x4b, 0x43, 0x40, 0x48, 0x64, 0x87, 0x32, 0x47, 0x34, 0xc3, 0x57, 0x44, 0x64, 0x87, 0x50, + 0xc5, 0x0b, 0x90, 0xb2, 0x9a, 0xa6, 0x49, 0x02, 0x14, 0xdd, 0xfb, 0x03, 0xb1, 0xfc, 0x4f, 0xdf, + 0xe3, 0x16, 0x08, 0x40, 0xf1, 0x34, 0x24, 0x71, 0x63, 0x1b, 0xd7, 0xa2, 0x90, 0xff, 0xf1, 0x9e, + 0xd8, 0x94, 0x88, 0x76, 0xf1, 0x19, 0x00, 0x76, 0xb4, 0xa7, 0xaf, 0xad, 0x22, 0xb0, 0xff, 0xf9, + 0x1e, 0xff, 0x74, 0xa3, 0x0d, 0x69, 0x13, 0xb0, 0x0f, 0x41, 0xee, 0x4d, 0xf0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0xe2, 0xd7, + 0x70, 0x8b, 0x7f, 0x68, 0x49, 0x7e, 0xa2, 0xc9, 0xf6, 0x97, 0xd0, 0xd2, 0x5c, 0x82, 0x7f, 0xde, + 0x5c, 0x8c, 0x9d, 0x93, 0xa6, 0x9e, 0x06, 0xb9, 0x3b, 0x56, 0x0e, 0x84, 0x57, 0x00, 0xf5, 0xce, + 0x58, 0x98, 0x21, 0xc9, 0x18, 0x1e, 0x0d, 0x33, 0x64, 0x4e, 0xc8, 0x6d, 0x9f, 0x5f, 0x36, 0x4c, + 0xcf, 0xb6, 0x7a, 0x38, 0xbb, 0xfd, 0xff, 0xf3, 0x71, 0xce, 0x16, 0x60, 0x98, 0x09, 0xc9, 0x58, + 0x2a, 0x34, 0x7d, 0xd0, 0x2c, 0xa7, 0xb0, 0x87, 0xd2, 0xca, 0xab, 0x77, 0x0a, 0x43, 0x3f, 0xba, + 0x53, 0x18, 0xfa, 0xd7, 0x3b, 0x85, 0xa1, 0xd7, 0xef, 0x14, 0xa4, 0x37, 0xef, 0x14, 0xa4, 0xb7, + 0xef, 0x14, 0xa4, 0x77, 0xef, 0x14, 0xa4, 0x5b, 0x7b, 0x05, 0xe9, 0x6b, 0x7b, 0x05, 0xe9, 0x9b, + 0x7b, 0x05, 0xe9, 0x7b, 0x7b, 0x05, 0xe9, 0x07, 0x7b, 0x05, 0xe9, 0xd5, 0xbd, 0x82, 0xf4, 0xa3, + 0xbd, 0x82, 0xf4, 0xfa, 0x5e, 0x41, 0x7a, 0x73, 0xaf, 0x30, 0xf4, 0xf6, 0x5e, 0x41, 0x7a, 0x77, + 0xaf, 0x30, 0x74, 0xeb, 0x27, 0x85, 0xa1, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x93, 0x6f, 0x45, + 0x6a, 0xcc, 0x38, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCasttype(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int32Ptr)) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.MyUint64Ptr)) + } + dAtA[i] = 0x20 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + dAtA[i] = 0x2d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + i += 4 + } + dAtA[i] = 0x35 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.MyFloat32)))) + i += 4 + if m.MyFloat64Ptr != nil { + dAtA[i] = 0x39 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + i += 8 + } + dAtA[i] = 0x41 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MyFloat64)))) + i += 8 + if m.MyBytes != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.MyBytes))) + i += copy(dAtA[i:], m.MyBytes) + } + if m.NormalBytes != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.NormalBytes))) + i += copy(dAtA[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + dAtA[i] = 0x58 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + dAtA[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + dAtA[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + dAtA[i] = 0x72 + i++ + v := m.MyNullableMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + dAtA[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.String_ != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCasttype + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], dAtA[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], dAtA[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType == 0 { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + var mapkey github_com_gogo_protobuf_test_casttype.MyStringType + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + 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 *Wilson) 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 ErrIntOverflowCasttype + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + 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 skipCasttype(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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrInvalidLengthCasttype + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttype + } + 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 := skipCasttype(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 ( + ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/casttype.proto", fileDescriptor_casttype_c3de4173df712bd1) +} + +var fileDescriptor_casttype_c3de4173df712bd1 = []byte{ + // 694 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x4c, + 0x18, 0xc7, 0xfd, 0x34, 0x4d, 0x9b, 0x5c, 0x9a, 0xf7, 0x8d, 0x4e, 0x0c, 0x56, 0x24, 0xce, 0x56, + 0xab, 0x22, 0x0f, 0x90, 0x54, 0x69, 0x54, 0xaa, 0x82, 0x18, 0x5c, 0x15, 0xa9, 0x08, 0x17, 0x64, + 0xa8, 0x2a, 0x10, 0x8b, 0xd3, 0x9a, 0x34, 0xc2, 0x89, 0xa3, 0xf8, 0x02, 0xf2, 0x56, 0x95, 0x01, + 0x89, 0xbf, 0x84, 0x91, 0x05, 0x89, 0x91, 0xb1, 0x63, 0x47, 0xa6, 0xb4, 0x36, 0x4b, 0xd9, 0x3a, + 0x56, 0x99, 0xd0, 0xdd, 0x39, 0xb1, 0xfb, 0x03, 0x94, 0xa6, 0xdb, 0x3d, 0x77, 0xcf, 0xf3, 0x79, + 0xbe, 0xf7, 0xdc, 0x73, 0x77, 0xa8, 0xb8, 0xed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 0x4c, 0xf9, 0x7f, 0x5c, 0xf9, 0xfc, 0x95, 0xca, 0x13, 0x7e, 0x42, 0xfb, 0xd2, + 0xfe, 0x91, 0x52, 0x19, 0x59, 0x04, 0x7f, 0x82, 0xb8, 0x86, 0xf3, 0x39, 0xf1, 0x27, 0xae, 0x62, + 0xad, 0x59, 0xb3, 0x77, 0x76, 0xec, 0x1d, 0xa6, 0xe2, 0xff, 0x7f, 0xa8, 0x48, 0xf8, 0x09, 0x15, + 0x2b, 0xac, 0xeb, 0xc7, 0x57, 0x92, 0xe0, 0xe1, 0x67, 0x68, 0x4a, 0x54, 0x58, 0x2e, 0xa8, 0xa0, + 0x65, 0xaf, 0xd9, 0x86, 0xf1, 0xe1, 0x98, 0x11, 0xa6, 0xb8, 0x8c, 0x50, 0xdc, 0x63, 0xb8, 0x80, + 0x52, 0xef, 0x6c, 0x9f, 0xbf, 0xe2, 0x59, 0x93, 0x0d, 0xf1, 0x2d, 0x94, 0x7e, 0x6f, 0x39, 0x5d, + 0x9b, 0xbf, 0xda, 0x93, 0xa6, 0x30, 0x56, 0x26, 0x96, 0xa1, 0xf8, 0x08, 0x15, 0x2e, 0xf6, 0xca, + 0xb5, 0xe2, 0x4d, 0x84, 0x2f, 0x9f, 0x58, 0x92, 0x90, 0x16, 0x84, 0x3b, 0x49, 0x42, 0xae, 0x52, + 0x88, 0x6b, 0xbe, 0xd5, 0x70, 0x3c, 0xb7, 0x75, 0x89, 0x79, 0xb1, 0xfe, 0x37, 0x63, 0xce, 0x12, + 0x34, 0x25, 0x26, 0xd9, 0x5e, 0xd6, 0xf9, 0xf7, 0xc1, 0x7f, 0x39, 0x53, 0x18, 0xfa, 0xd3, 0x83, + 0x80, 0x48, 0x87, 0x01, 0x91, 0x7e, 0x06, 0x44, 0x3a, 0x0e, 0x08, 0x9c, 0x04, 0x04, 0x4e, 0x03, + 0x02, 0x67, 0x01, 0x81, 0xbd, 0x90, 0xc0, 0x97, 0x90, 0xc0, 0xd7, 0x90, 0xc0, 0xf7, 0x90, 0xc0, + 0x8f, 0x90, 0xc0, 0x41, 0x48, 0xe0, 0x30, 0x24, 0x70, 0x1c, 0x12, 0x38, 0x09, 0x89, 0x74, 0x1a, + 0x12, 0x38, 0x0b, 0x89, 0xb4, 0xf7, 0x8b, 0x48, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x0c, + 0x8a, 0xc1, 0xaf, 0x07, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto b/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto new file mode 100644 index 000000000..f4cb9547c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go b/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go new file mode 100644 index 000000000..a2fa7f91f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go b/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go new file mode 100644 index 000000000..6c04deaf8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go @@ -0,0 +1,1649 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c89cc726fec17f61, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c89cc726fec17f61, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4260 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5b, 0x70, 0x1b, 0xd7, + 0x79, 0xe6, 0xe2, 0x42, 0x02, 0x3f, 0x40, 0x70, 0x79, 0x48, 0x4b, 0x10, 0x1d, 0x83, 0x14, 0xe5, + 0x0b, 0x6d, 0x27, 0x94, 0x47, 0x77, 0x41, 0x89, 0x5d, 0x82, 0x84, 0x18, 0xa8, 0x04, 0xc9, 0x2c, + 0xc9, 0xc8, 0x72, 0xda, 0xd9, 0x59, 0x2e, 0x0e, 0xc1, 0x95, 0x16, 0xbb, 0x9b, 0xdd, 0x85, 0x64, + 0x68, 0xfa, 0xa0, 0xc6, 0x6d, 0x33, 0x69, 0xa7, 0xf7, 0xce, 0x34, 0x71, 0x1d, 0xb7, 0xe9, 0x4c, + 0xea, 0x34, 0xbd, 0x25, 0xcd, 0xa5, 0x49, 0x9f, 0xf2, 0x92, 0xd6, 0x4f, 0x9d, 0xe4, 0xad, 0x0f, + 0x1d, 0xd9, 0x62, 0x3c, 0x53, 0x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 0x35, 0x43, 0x55, 0x73, 0x44, + 0x1c, 0x52, 0x5c, 0x84, 0x6c, 0x03, 0x7b, 0x9e, 0x56, 0xc7, 0xaa, 0xdf, 0x72, 0x70, 0x3e, 0x41, + 0x47, 0x3f, 0xd3, 0x33, 0xfa, 0xee, 0x91, 0x67, 0x38, 0x6a, 0xb3, 0xe5, 0x60, 0xb4, 0x00, 0x69, + 0x6c, 0x35, 0x1b, 0x8c, 0x21, 0xb9, 0x8f, 0xff, 0xca, 0x56, 0xb3, 0xd1, 0xcd, 0x92, 0x22, 0x30, + 0x4e, 0x31, 0xe2, 0x61, 0xf7, 0xba, 0xa1, 0xe3, 0xfc, 0x30, 0x25, 0x78, 0xac, 0x87, 0x60, 0x83, + 0xb5, 0x77, 0x73, 0x08, 0x1c, 0x5a, 0x84, 0x34, 0x7e, 0xde, 0xc7, 0x96, 0x67, 0xd8, 0x56, 0x7e, + 0x84, 0x92, 0x3c, 0xd2, 0x67, 0x16, 0xb1, 0x59, 0xeb, 0xa6, 0x68, 0xe3, 0xd0, 0x19, 0x18, 0xb1, + 0x1d, 0xdf, 0xb0, 0x2d, 0x2f, 0x9f, 0x9a, 0x91, 0xe6, 0x32, 0x27, 0x3e, 0xd2, 0x37, 0x10, 0xd6, + 0x98, 0x8e, 0x22, 0x94, 0x51, 0x05, 0x64, 0xcf, 0x6e, 0xba, 0x3a, 0x56, 0x75, 0xbb, 0x86, 0x55, + 0xc3, 0xda, 0xb1, 0xf3, 0x69, 0x4a, 0x30, 0xdd, 0x3b, 0x10, 0xaa, 0xb8, 0x68, 0xd7, 0x70, 0xc5, + 0xda, 0xb1, 0x95, 0x9c, 0xd7, 0xf1, 0x8c, 0x0e, 0xc1, 0xb0, 0xd7, 0xb2, 0x7c, 0xed, 0xf9, 0x7c, + 0x96, 0x46, 0x08, 0x7f, 0x9a, 0xfd, 0xfe, 0x30, 0x8c, 0x0d, 0x12, 0x62, 0x17, 0x20, 0xb9, 0x43, + 0x46, 0x99, 0x8f,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0xd0, + 0xa4, 0x5d, 0x10, 0x01, 0xed, 0xfe, 0x6c, 0xf7, 0xc6, 0xfd, 0x50, 0xff, 0xe1, 0x75, 0xc7, 0xd4, + 0xec, 0x77, 0x63, 0x90, 0xa0, 0xfb, 0xc5, 0x18, 0x64, 0x36, 0xaf, 0xac, 0x97, 0xd5, 0xa5, 0xb5, + 0xad, 0xd2, 0x4a, 0x59, 0x96, 0x50, 0x0e, 0x80, 0x0a, 0x2e, 0xae, 0xac, 0x2d, 0x6c, 0xca, 0xb1, + 0xe0, 0xb9, 0xb2, 0xba, 0x79, 0xe6, 0x94, 0x1c, 0x0f, 0x00, 0x5b, 0x4c, 0x90, 0x08, 0x2b, 0x9c, + 0x3c, 0x21, 0x27, 0x91, 0x0c, 0x59, 0x46, 0x50, 0x79, 0xb6, 0xbc, 0x74, 0xe6, 0x94, 0x3c, 0xdc, + 0x29, 0x39, 0x79, 0x42, 0x1e, 0x41, 0xa3, 0x90, 0xa6, 0x92, 0xd2, 0xda, 0xda, 0x8a, 0x9c, 0x0a, + 0x38, 0x37, 0x36, 0x95, 0xca, 0xea, 0xb2, 0x9c, 0x0e, 0x38, 0x97, 0x95, 0xb5, 0xad, 0x75, 0x19, + 0x02, 0x86, 0x6a, 0x79, 0x63, 0x63, 0x61, 0xb9, 0x2c, 0x67, 0x02, 0x8d, 0xd2, 0x95, 0xcd, 0xf2, + 0x86, 0x9c, 0xed, 0x30, 0xeb, 0xe4, 0x09, 0x79, 0x34, 0xe8, 0xa2, 0xbc, 0xba, 0x55, 0x95, 0x73, + 0x68, 0x1c, 0x46, 0x59, 0x17, 0xc2, 0x88, 0xb1, 0x2e, 0xd1, 0x99, 0x53, 0xb2, 0xdc, 0x36, 0x84, + 0xb1, 0x8c, 0x77, 0x08, 0xce, 0x9c, 0x92, 0xd1, 0xec, 0x22, 0x24, 0x69, 0x74, 0x21, 0x04, 0xb9, + 0x95, 0x85, 0x52, 0x79, 0x45, 0x5d, 0x5b, 0xdf, 0xac, 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 0x25, 0xf8, 0x37, 0xce, 0xc5, + 0xd8, 0x39, 0x69, 0xea, 0x69, 0x90, 0xbb, 0x63, 0xe5, 0x40, 0x78, 0x05, 0x50, 0xef, 0x8c, 0x85, + 0x19, 0x92, 0x8c, 0xe1, 0xd1, 0x30, 0x43, 0xe6, 0x84, 0xdc, 0xf6, 0xf9, 0x65, 0xc3, 0xf4, 0x6c, + 0xab, 0x87, 0xb3, 0xdb, 0xff, 0x3f, 0x1f, 0xe7, 0x6c, 0x01, 0x86, 0x99, 0x90, 0x8c, 0xa5, 0x42, + 0xd3, 0x07, 0xcd, 0x72, 0x0a, 0x7b, 0x28, 0xad, 0xbc, 0x7a, 0xa7, 0x30, 0xf4, 0xa3, 0x3b, 0x85, + 0xa1, 0x7f, 0xbd, 0x53, 0x18, 0x7a, 0xfd, 0x4e, 0x41, 0x7a, 0xf3, 0x4e, 0x41, 0x7a, 0xfb, 0x4e, + 0x41, 0x7a, 0xf7, 0x4e, 0x41, 0xba, 0xb5, 0x57, 0x90, 0xbe, 0xb6, 0x57, 0x90, 0xbe, 0xb1, 0x57, + 0x90, 0xbe, 0xb7, 0x57, 0x90, 0x7e, 0xb0, 0x57, 0x90, 0x5e, 0xdd, 0x2b, 0x48, 0x3f, 0xda, 0x2b, + 0x0c, 0xbd, 0xbe, 0x57, 0x90, 0xde, 0xdc, 0x2b, 0x0c, 0xbd, 0xbd, 0x57, 0x90, 0xde, 0xdd, 0x2b, + 0x0c, 0xdd, 0xfa, 0x49, 0x61, 0xe8, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x91, 0xbd, 0xd2, + 0xd1, 0x38, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCasttype(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int32Ptr)) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.MyUint64Ptr)) + } + dAtA[i] = 0x20 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + dAtA[i] = 0x2d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + i += 4 + } + dAtA[i] = 0x35 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.MyFloat32)))) + i += 4 + if m.MyFloat64Ptr != nil { + dAtA[i] = 0x39 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + i += 8 + } + dAtA[i] = 0x41 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MyFloat64)))) + i += 8 + if m.MyBytes != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.MyBytes))) + i += copy(dAtA[i:], m.MyBytes) + } + if m.NormalBytes != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.NormalBytes))) + i += copy(dAtA[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + dAtA[i] = 0x58 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + dAtA[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + dAtA[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + dAtA[i] = 0x72 + i++ + v := m.MyNullableMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + dAtA[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.String_ != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/casttype.proto", fileDescriptor_casttype_c89cc726fec17f61) +} + +var fileDescriptor_casttype_c89cc726fec17f61 = []byte{ + // 698 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x4c, + 0x18, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0xe6,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0, 0xec, 0x23, 0x58, 0xba, + 0xdc, 0x2b, 0x63, 0xc5, 0x9b, 0x10, 0x5d, 0x3d, 0xb1, 0x24, 0x21, 0x2b, 0x08, 0x77, 0x92, 0x84, + 0x42, 0xb5, 0x14, 0xd7, 0x7c, 0xbb, 0x69, 0x7b, 0x4e, 0xfb, 0x0a, 0xf3, 0x72, 0xfd, 0x6f, 0xc6, + 0x9c, 0xc3, 0x70, 0x4a, 0x4c, 0xb2, 0xbd, 0x6c, 0xf0, 0xef, 0x83, 0xff, 0x72, 0xa6, 0x30, 0xf4, + 0xa7, 0x87, 0x01, 0x96, 0x8e, 0x02, 0x2c, 0xfd, 0x0c, 0xb0, 0x74, 0x12, 0x60, 0x70, 0x1a, 0x60, + 0x70, 0x16, 0x60, 0x70, 0x1e, 0x60, 0xb0, 0x1f, 0x62, 0xf0, 0x25, 0xc4, 0xe0, 0x6b, 0x88, 0xc1, + 0xf7, 0x10, 0x83, 0x1f, 0x21, 0x06, 0x87, 0x21, 0x06, 0x47, 0x21, 0x96, 0x4e, 0x42, 0x0c, 0x4e, + 0x43, 0x2c, 0x9d, 0x85, 0x18, 0x9c, 0x87, 0x58, 0xda, 0xff, 0x85, 0xa5, 0x3f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xec, 0xe2, 0x9e, 0x1c, 0xb4, 0x07, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto b/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto new file mode 100644 index 000000000..5da2b7340 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go b/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go new file mode 100644 index 000000000..3d91782dc --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go b/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go new file mode 100644 index 000000000..fdcf5797a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go @@ -0,0 +1,1426 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_d04722a9b63e08e7, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_d04722a9b63e08e7, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4263 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5b, 0x70, 0x1b, 0xd7, + 0x79, 0xe6, 0xe2, 0x42, 0x02, 0x3f, 0x40, 0x70, 0x79, 0x48, 0x4b, 0x10, 0x13, 0x81, 0x14, 0xe5, + 0x0b, 0x6d, 0x27, 0x94, 0x47,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 0x6c, 0x0c, + 0x53, 0x9b, 0x53, 0x44, 0x40, 0xe2, 0x02, 0x4d, 0x41, 0x8a, 0x2e, 0x93, 0x1a, 0x16, 0xa9, 0x2d, + 0x78, 0x26, 0x81, 0x55, 0xc3, 0x3b, 0x5a, 0xd3, 0xf4, 0xd5, 0x1b, 0x9a, 0xd9, 0xc4, 0x34, 0xe0, + 0xd3, 0x4a, 0x96, 0x0b, 0x3f, 0x45, 0x64, 0x68, 0x1a, 0x32, 0x6c, 0x55, 0x19, 0x56, 0x0d, 0x3f, + 0x4f, 0x77, 0xcf, 0xa4, 0xc2, 0x16, 0x5a, 0x85, 0x48, 0x48, 0xf7, 0xd7, 0x3c, 0xdb, 0x12, 0xa1, + 0x49, 0xbb, 0x20, 0x02, 0xda, 0xfd, 0xb9, 0xee, 0x8d, 0xfb, 0x68, 0xff, 0xe1, 0x75, 0xc7, 0xd4, + 0xec, 0x77, 0x62, 0x90, 0xa0, 0xfb, 0xc5, 0x18, 0x64, 0x36, 0xaf, 0xae, 0x97, 0xd5, 0xa5, 0xb5, + 0xad, 0xd2, 0x4a, 0x59, 0x96, 0x50, 0x0e, 0x80, 0x0a, 0x2e, 0xad, 0xac, 0x2d, 0x6c, 0xca, 0xb1, + 0xe0, 0xb9, 0xb2, 0xba, 0x79, 0xf6, 0xb4, 0x1c, 0x0f, 0x00, 0x5b, 0x4c, 0x90, 0x08, 0x2b, 0x9c, + 0x3a, 0x29, 0x27, 0x91, 0x0c, 0x59, 0x46, 0x50, 0x79, 0xb6, 0xbc, 0x74, 0xf6, 0xb4, 0x3c, 0xdc, + 0x29, 0x39, 0x75, 0x52, 0x1e, 0x41, 0xa3, 0x90, 0xa6, 0x92, 0xd2, 0xda, 0xda, 0x8a, 0x9c, 0x0a, + 0x38, 0x37, 0x36, 0x95, 0xca, 0xea, 0xb2, 0x9c, 0x0e, 0x38, 0x97, 0x95, 0xb5, 0xad, 0x75, 0x19, + 0x02, 0x86, 0x6a, 0x79, 0x63, 0x63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 0xc9, 0xde, 0x82, 0x59, 0x89, 0x90, 0x52, 0xf8, 0x13, 0x5a, 0x86, 0xe1, 0x6b, 0x1e, + 0xe5, 0x1e, 0xa6, 0xdc, 0x0f, 0xdf, 0x9f, 0xfb, 0xf2, 0x06, 0x25, 0x4f, 0x5f, 0xde, 0x50, 0x57, + 0xd7, 0x94, 0xea, 0xc2, 0x8a, 0xc2, 0xe1, 0xe8, 0x08, 0x24, 0x4c, 0xed, 0x56, 0xab, 0x33, 0x15, + 0x51, 0xd1, 0xa0, 0x8e, 0x3f, 0x02, 0x89, 0x9b, 0x58, 0xbb, 0xde, 0x99, 0x00, 0xa8, 0xe8, 0x7d, + 0x0c, 0xfd, 0x13, 0x90, 0xa4, 0xfe, 0x42, 0x00, 0xdc, 0x63, 0xf2, 0x10, 0x4a, 0x41, 0x62, 0x71, + 0x4d, 0x21, 0xe1, 0x2f, 0x43, 0x96, 0x49, 0xd5, 0xf5, 0x4a, 0x79, 0xb1, 0x2c, 0xc7, 0x66, 0xcf, + 0xc0, 0x30, 0x73, 0x02, 0x59, 0x1a, 0x81, 0x1b, 0xe4, 0x21, 0xfe, 0xc8, 0x39, 0x24, 0xd1, 0xba, + 0x55, 0x2d, 0x95, 0x15, 0x39, 0x16, 0x9e, 0x5e, 0x0f, 0xb2, 0xe1, 0xba, 0xf8, 0x83, 0x89, 0xa9, + 0x7f, 0x94, 0x20, 0x13, 0xaa, 0x73, 0x49, 0x81, 0xa2, 0x99, 0xa6, 0x7d, 0x53, 0xd5, 0x4c, 0x43, + 0xf3, 0x78, 0x50, 0x00, 0x15, 0x2d, 0x10, 0xc9, 0xa0, 0x93, 0xf6, 0x81, 0x18, 0xff, 0xb2, 0x04, + 0x72, 0x77, 0x89, 0xd9, 0x65, 0xa0, 0xf4, 0x73, 0x35, 0xf0, 0x25, 0x09, 0x72, 0x9d, 0x75, 0x65, + 0x97, 0x79, 0xc7, 0x7e, 0xae, 0xe6, 0xbd, 0x1e, 0x83, 0xd1, 0x8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0x63, 0x90, 0xad, 0xd9, 0x4d, 0x52, 0x75, 0x31, 0x3d, 0x92, 0x2f, 0x24, 0x25, 0xc3, 0x64, + 0x81, 0x0a, 0xaf, 0xa7, 0xdb, 0xd7, 0x4a, 0x59, 0x25, 0xc3, 0x64, 0x4c, 0xe5, 0x31, 0x18, 0xd3, + 0xea, 0x75, 0x97, 0x90, 0x0b, 0x22, 0x76, 0x42, 0xc8, 0x05, 0x62, 0xaa, 0x38, 0x75, 0x19, 0x52, + 0xc2, 0x0f, 0x24, 0x25, 0x13, 0x4f, 0xa8, 0x0e, 0x3b, 0xf6, 0xc6, 0xe6, 0xd2, 0x4a, 0xca, 0x12, + 0x8d, 0xc7, 0x20, 0x6b, 0x78, 0x6a, 0xfb, 0x96, 0x3c, 0x36, 0x13, 0x9b, 0x4b, 0x29, 0x19, 0xc3, + 0x0b, 0x6e, 0x18, 0x67, 0x5f, 0x89, 0x41, 0xae, 0xf3, 0x96, 0x1f, 0x2d, 0x41, 0xca, 0xb4, 0x75, + 0x8d, 0x86, 0x16, 0x7b, 0xc5, 0x34, 0x17, 0xf1, 0x62, 0x60, 0x7e, 0x85, 0xeb, 0x2b, 0x01, 0x72, + 0xea, 0x5f, 0x24, 0x48, 0x09, 0x31, 0x3a, 0x04, 0x09, 0x47, 0xf3, 0x77, 0x29, 0x5d, 0xb2, 0x14, + 0x93, 0x25, 0x85, 0x3e, 0x13, 0xb9, 0xe7, 0x68, 0x16, 0x0d, 0x01, 0x2e, 0x27, 0xcf, 0x64, 0x5e, + 0x4d, 0xac, 0xd5, 0xe8, 0xf1, 0xc3, 0x6e, 0x34, 0xb0, 0xe5, 0x7b, 0x62, 0x5e, 0xb9, 0x7c, 0x91, + 0x8b, 0xd1, 0x93, 0x30, 0xee, 0xbb, 0x9a, 0x61, 0x76, 0xe8, 0x26, 0xa8, 0xae, 0x2c, 0x1a, 0x02, + 0xe5, 0x22, 0x1c, 0x11, 0xbc, 0x35, 0xec, 0x6b, 0xfa, 0x2e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x30, 0x84, 0xe2, 0x93, 0xed, 0x44, 0xeb, 0xe2, 0xba, 0xe1, 0xf9, 0x2e, 0x2b, + 0x85, 0xef, 0x4f, 0xf5, 0xdd, 0xb7, 0x3a, 0x8b, 0x30, 0x25, 0x04, 0x25, 0x3b, 0x11, 0xbf, 0x42, + 0xa5, 0x27, 0xa5, 0x68, 0xc3, 0xbe, 0x27, 0x76, 0xa2, 0x10, 0x8c, 0xad, 0xcf, 0xb1, 0xae, 0x5a, + 0x05, 0x45, 0x7d, 0x08, 0x93, 0xff, 0xd5, 0x77, 0x38, 0x57, 0x67, 0xa9, 0x52, 0x5c, 0x21, 0x01, + 0xd4, 0x59, 0x50, 0x44, 0x93, 0xbd, 0xf0, 0x4e, 0x10, 0x43, 0x1d, 0xf5, 0x44, 0xf1, 0x12, 0x8c, + 0x76, 0x14, 0x13, 0xd1, 0x54, 0xbf, 0xc6, 0xa9, 0xb2, 0xe1, 0x5a, 0xa2, 0x78, 0x06, 0x12, 0xa4, + 0x30, 0x88, 0x86, 0xff, 0x3a, 0x87, 0x53, 0xf5, 0xe2, 0xc7, 0x21, 0x25, 0x0a, 0x82, 0x68, 0xe8, + 0x6f, 0x70, 0x68, 0x00, 0x21, 0x70, 0x51, 0x0c, 0x44, 0xc3, 0x3f, 0x27, 0xe0, 0x02, 0x42, 0xe0, + 0x83, 0xbb, 0xf0, 0xfb, 0xbf, 0x95, 0xe0, 0x1b, 0xba, 0xf0, 0xdd, 0x45, 0x18, 0xe1, 0x55, 0x40, + 0x34, 0xfa, 0xf3, 0xbc, 0x73, 0x81, 0x28, 0x9e, 0x83, 0xe4, 0x80, 0x0e, 0xff, 0x6d, 0x0e, 0x65, + 0xfa, 0xc5, 0x45, 0xc8, 0x84, 0x32, 0x7f, 0x34, 0xfc, 0x77, 0x38, 0x3c, 0x8c, 0x22, 0xa6, 0xf3, + 0xcc, 0x1f, 0x4d, 0xf0, 0xbb, 0xc2, 0x74, 0x8e, 0x20, 0x6e, 0x13, 0x49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0x41, 0x7a, 0x73, 0xaf, 0x30, 0xf4, 0xf6, 0x5e, 0x41, + 0x7a, 0x77, 0xaf, 0x30, 0x74, 0xfb, 0xc7, 0x85, 0xa1, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x4e, + 0xe5, 0x66, 0x02, 0xcf, 0x38, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCasttype(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/neither/casttype.proto", fileDescriptor_casttype_d04722a9b63e08e7) +} + +var fileDescriptor_casttype_d04722a9b63e08e7 = []byte{ + // 695 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0x06, 0xa2, 0x13, 0x83, 0x55, 0xa9, 0x67, 0xab, 0x55, + 0x91, 0x07, 0x48, 0xaa, 0x34, 0x2a, 0x55, 0x41, 0x0c, 0xae, 0x8a, 0x54, 0x84, 0x0b, 0x32, 0x54, + 0x15, 0x88, 0xc5, 0x69, 0x4d, 0x6a, 0xe1, 0xd8, 0x51, 0x7c, 0x01, 0x79, 0xab, 0xca, 0x80, 0xc4, + 0x5f, 0xc2, 0xc8, 0x82, 0xc4, 0xc8, 0xd8, 0xb1, 0x23, 0x53, 0x5a, 0x9b, 0xa5, 0x6c, 0x1d, 0xab, + 0x4c, 0xe8, 0xee, 0x1c, 0xdb, 0xfd, 0x01, 0x4a, 0xdd, 0xed, 0xde,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18, 0x9c, 0x06, 0x18, + 0x9c, 0x05, 0x18, 0xec, 0x85, 0x18, 0x7c, 0x0d, 0x31, 0xf8, 0x16, 0x62, 0xf0, 0x23, 0xc4, 0xe0, + 0x67, 0x88, 0xc1, 0x41, 0x88, 0x85, 0xc3, 0x10, 0x0b, 0xc7, 0x21, 0x06, 0x27, 0x21, 0x16, 0x4e, + 0x43, 0x0c, 0xce, 0x42, 0x2c, 0xec, 0xfd, 0xc6, 0xc2, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, + 0x22, 0x40, 0x8d, 0xb2, 0x07, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto b/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto new file mode 100644 index 000000000..c726b9ef4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go b/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go new file mode 100644 index 000000000..1906bb498 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go b/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go new file mode 100644 index 000000000..b52187207 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go @@ -0,0 +1,2371 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_bbbbfd21588d9441, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_bbbbfd21588d9441, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4260 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x4b, 0x10, 0x1d, 0x83, 0x14, 0xe5, + 0x1f, 0xda, 0x4e, 0x28, 0x8f, 0xfe, 0x05, 0x25, 0x76, 0x09, 0x12, 0x62, 0xa0, 0x12, 0x24, 0xb3, + 0x24, 0x23, 0xcb, 0x69, 0x67, 0x67, 0xb9, 0xb8, 0x04, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, 0x92, + 0xa1, 0xe9, 0x83, 0x1a, 0xb7, 0xcd, 0xa4, 0x9d, 0xfe, 0x77, 0x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0x96, 0x0b, 0x3f, 0x4d, 0x64, 0x68, 0x1a, 0x32, 0x6c, 0x55, 0x19, 0x56, 0x0d, 0x3f, + 0x4f, 0x77, 0xcf, 0xa4, 0xc2, 0x16, 0x5a, 0x85, 0x48, 0x48, 0xf7, 0x57, 0x3d, 0xdb, 0x12, 0xa1, + 0x49, 0xbb, 0x20, 0x02, 0xda, 0xfd, 0xd9, 0xee, 0x8d, 0xfb, 0xa1, 0xfe, 0xc3, 0xeb, 0x8e, 0xa9, + 0xd9, 0x57, 0x63, 0x90, 0xa0, 0xfb, 0xc5, 0x18, 0x64, 0x36, 0xaf, 0xac, 0x97, 0xd5, 0xa5, 0xb5, + 0xad, 0xd2, 0x4a, 0x59, 0x96, 0x50, 0x0e, 0x80, 0x0a, 0x2e, 0xae, 0xac, 0x2d, 0x6c, 0xca, 0xb1, + 0xe0, 0xb9, 0xb2, 0xba, 0x79, 0xe6, 0x94, 0x1c, 0x0f, 0x00, 0x5b, 0x4c, 0x90, 0x08, 0x2b, 0x9c, + 0x3c, 0x21, 0x27, 0x91, 0x0c, 0x59, 0x46, 0x50, 0x79, 0xb6, 0xbc, 0x74, 0xe6, 0x94, 0x3c, 0xdc, + 0x29, 0x39, 0x79, 0x42, 0x1e, 0x41, 0xa3, 0x90, 0xa6, 0x92, 0xd2, 0xda, 0xda, 0x8a, 0x9c, 0x0a, + 0x38, 0x37, 0x36, 0x95, 0xca, 0xea, 0xb2, 0x9c, 0x0e, 0x38, 0x97, 0x95, 0xb5, 0xad, 0x75, 0x19, + 0x02, 0x86, 0x6a, 0x79, 0x63, 0x63, 0x61, 0xb9, 0x2c, 0x67, 0x02, 0x8d, 0xd2, 0x95, 0xcd, 0xf2, + 0x86, 0x9c, 0xed, 0x30, 0xeb, 0xe4, 0x09, 0x79, 0x34, 0xe8, 0xa2, 0xbc, 0xba, 0x55, 0x95, 0x73, + 0x68, 0x1c, 0x46, 0x59, 0x17, 0xc2, 0x88, 0xb1, 0x2e, 0xd1, 0x99,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0x08, 0x24, 0x4c, 0xed, 0x66, 0xab, 0x33, 0x15, + 0x51, 0xd1, 0xa0, 0x8e, 0x3f, 0x02, 0x89, 0x1b, 0x58, 0xbb, 0xd6, 0x99, 0x00, 0xa8, 0xe8, 0x03, + 0x0c, 0xfd, 0xe3, 0x90, 0xa4, 0xfe, 0x42, 0x00, 0xdc, 0x63, 0xf2, 0x10, 0x4a, 0x41, 0x62, 0x71, + 0x4d, 0x21, 0xe1, 0x2f, 0x43, 0x96, 0x49, 0xd5, 0xf5, 0x4a, 0x79, 0xb1, 0x2c, 0xc7, 0x66, 0x4f, + 0xc3, 0x30, 0x73, 0x02, 0x59, 0x1a, 0x81, 0x1b, 0xe4, 0x21, 0xfe, 0xc8, 0x39, 0x24, 0xd1, 0xba, + 0x55, 0x2d, 0x95, 0x15, 0x39, 0x16, 0x9e, 0x5e, 0x0f, 0xb2, 0xe1, 0xba, 0xf8, 0xc3, 0x89, 0xa9, + 0x7f, 0x92, 0x20, 0x13, 0xaa, 0x73, 0x49, 0x81, 0xa2, 0x99, 0xa6, 0x7d, 0x43, 0xd5, 0x4c, 0x43, + 0xf3, 0x78, 0x50, 0x00, 0x15, 0x2d, 0x10, 0xc9, 0xa0, 0x93, 0xf6, 0xa1, 0x18, 0xff, 0xb2, 0x04, + 0x72, 0x77, 0x89, 0xd9, 0x65, 0xa0, 0xf4, 0x73, 0x35, 0xf0, 0x25, 0x09, 0x72, 0x9d, 0x75, 0x65, + 0x97, 0x79, 0x47, 0x7f, 0xae, 0xe6, 0xbd, 0x11, 0x83, 0xd1, 0x8e, 0x6a, 0x72, 0x50, 0xeb, 0x3e, + 0x0b, 0xe3, 0x46, 0x0d, 0x37, 0x1c, 0xdb, 0xc7, 0x96, 0xde, 0x52, 0x4d, 0x7c, 0x1d, 0x9b, 0xf9, + 0x59, 0xba, 0x51, 0x1c, 0xbf, 0x77, 0xbd, 0x3a, 0x5f, 0x69, 0xe3, 0x56, 0x08, 0xac, 0x38, 0x51, + 0x59,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 0xc8, 0x05, 0x62, 0xaa, 0x38, 0x75, 0x09, 0x52, + 0xc2, 0x0f, 0x24, 0x25, 0x13, 0x4f, 0xa8, 0x0e, 0x3b, 0xf6, 0xc6, 0xe6, 0xd2, 0x4a, 0xca, 0x12, + 0x8d, 0x47, 0x21, 0x6b, 0x78, 0x6a, 0xfb, 0x96, 0x3c, 0x36, 0x13, 0x9b, 0x4b, 0x29, 0x19, 0xc3, + 0x0b, 0x6e, 0x18, 0x67, 0x5f, 0x89, 0x41, 0xae, 0xf3, 0x96, 0x1f, 0x2d, 0x41, 0xca, 0xb4, 0x75, + 0x8d, 0x86, 0x16, 0x7b, 0xc5, 0x34, 0x17, 0xf1, 0x62, 0x60, 0x7e, 0x85, 0xeb, 0x2b, 0x01, 0x72, + 0xea, 0x5f, 0x25, 0x48, 0x09, 0x31, 0x3a, 0x04, 0x09, 0x47, 0xf3, 0x77, 0x29, 0x5d, 0xb2, 0x14, + 0x93, 0x25, 0x85, 0x3e, 0x13, 0xb9, 0xe7, 0x68, 0x16, 0x0d, 0x01, 0x2e, 0x27, 0xcf, 0x64, 0x5e, + 0x4d, 0xac, 0xd5, 0xe8, 0xf1, 0xc3, 0x6e, 0x34, 0xb0, 0xe5, 0x7b, 0x62, 0x5e, 0xb9, 0x7c, 0x91, + 0x8b, 0xd1, 0x93, 0x30, 0xee, 0xbb, 0x9a, 0x61, 0x76, 0xe8, 0x26, 0xa8, 0xae, 0x2c, 0x1a, 0x02, + 0xe5, 0x22, 0x1c, 0x11, 0xbc, 0x35, 0xec, 0x6b, 0xfa, 0x2e, 0xae, 0xb5, 0x41, 0xc3, 0xf4, 0x9a, + 0xe1, 0x30, 0x57, 0x58, 0xe2, 0xed, 0x02, 0x3b, 0xfb, 0x43, 0x09, 0xc6, 0xc5, 0x81, 0xa9, 0x16, + 0x38, 0xab, 0x0a, 0xa0, 0x59, 0x96, 0xed, 0x87, 0xdd, 0xd5, 0x1b, 0xca, 0x3d, 0xb8, 0xf9, 0x85, +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xa2, 0x10, 0x8c, 0xad, 0xcf, 0xb1, 0xae, 0x5a, + 0x05, 0x45, 0x7d, 0x08, 0x93, 0xff, 0xd5, 0x77, 0x39, 0x57, 0x67, 0xa9, 0x52, 0x5c, 0x21, 0x01, + 0xd4, 0x59, 0x50, 0x44, 0x93, 0xbd, 0xf0, 0x6e, 0x10, 0x43, 0x1d, 0xf5, 0x44, 0xf1, 0x22, 0x8c, + 0x76, 0x14, 0x13, 0xd1, 0x54, 0xbf, 0xc6, 0xa9, 0xb2, 0xe1, 0x5a, 0xa2, 0x78, 0x1a, 0x12, 0xa4, + 0x30, 0x88, 0x86, 0xff, 0x3a, 0x87, 0x53, 0xf5, 0xe2, 0x27, 0x20, 0x25, 0x0a, 0x82, 0x68, 0xe8, + 0x6f, 0x70, 0x68, 0x00, 0x21, 0x70, 0x51, 0x0c, 0x44, 0xc3, 0x3f, 0x2f, 0xe0, 0x02, 0x42, 0xe0, + 0x83, 0xbb, 0xf0, 0x7b, 0xbf, 0x95, 0xe0, 0x1b, 0xba, 0xf0, 0xdd, 0x05, 0x18, 0xe1, 0x55, 0x40, + 0x34, 0xfa, 0x0b, 0xbc, 0x73, 0x81, 0x28, 0x9e, 0x85, 0xe4, 0x80, 0x0e, 0xff, 0x6d, 0x0e, 0x65, + 0xfa, 0xc5, 0x45, 0xc8, 0x84, 0x32, 0x7f, 0x34, 0xfc, 0x77, 0x38, 0x3c, 0x8c, 0x22, 0xa6, 0xf3, + 0xcc, 0x1f, 0x4d, 0xf0, 0xbb, 0xc2, 0x74, 0x8e, 0x20, 0x6e, 0x13, 0x49, 0x3f, 0x1a, 0xfd, 0x7b, + 0xc2, 0xeb, 0x02, 0x52, 0x7c, 0x06, 0xd2, 0xc1, 0x46, 0x1e, 0x8d, 0xff, 0x7d, 0x8e, 0x6f, 0x63, + 0x88, 0x07, 0x42, 0x89, 0x24, 0x9a, 0xe2, 0x0f, 0x84, 0x07, 0x42, 0x28, 0xb2, 0x8c, 0xba, 0x8b, + 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zipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCasttype(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCasttype + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], dAtA[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], dAtA[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType == 0 { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + var mapkey github_com_gogo_protobuf_test_casttype.MyStringType + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + 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 *Wilson) 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 ErrIntOverflowCasttype + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + 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 skipCasttype(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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrInvalidLengthCasttype + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttype + } + 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 := skipCasttype(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 ( + ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/casttype.proto", fileDescriptor_casttype_bbbbfd21588d9441) +} + +var fileDescriptor_casttype_bbbbfd21588d9441 = []byte{ + // 698 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0x06, 0xa2, 0x13, 0x83, 0x55, 0x89, 0xb3, 0x69, 0x55, + 0xe4, 0x01, 0x92, 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e8, 0xe2, 0x89, 0xa5, 0x09, 0x59, 0x41, 0xb8, 0x9b, 0x26, + 0x14, 0xaa, 0xa5, 0xa4, 0xe6, 0x9b, 0x4d, 0xdb, 0x77, 0x9d, 0x0b, 0xcc, 0xf3, 0xf5, 0xbf, 0x1e, + 0x73, 0x06, 0xc3, 0x09, 0x31, 0xc9, 0xf6, 0xb2, 0xc6, 0xbf, 0x0f, 0xfe, 0xcb, 0x99, 0xc2, 0xd0, + 0x9f, 0xed, 0x87, 0x58, 0x3a, 0x08, 0xb1, 0xf4, 0x2b, 0xc4, 0xd2, 0x51, 0x88, 0xc1, 0x71, 0x88, + 0xc1, 0x49, 0x88, 0xc1, 0x69, 0x88, 0xc1, 0x6e, 0x84, 0xc1, 0xd7, 0x08, 0x83, 0x6f, 0x11, 0x06, + 0x3f, 0x22, 0x0c, 0x7e, 0x46, 0x18, 0xec, 0x47, 0x58, 0x3a, 0x88, 0x30, 0x38, 0x8a, 0x30, 0x38, + 0x8e, 0xb0, 0x74, 0x12, 0x61, 0x70, 0x1a, 0x61, 0x69, 0xf7, 0x37, 0x96, 0xfe, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xa8, 0xc0, 0xa5, 0xf1, 0xb6, 0x07, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto b/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto new file mode 100644 index 000000000..f43d2c25f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go b/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go new file mode 100644 index 000000000..233a3b67a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/casttype/mytypes.go b/deps/github.com/gogo/protobuf/test/casttype/mytypes.go new file mode 100644 index 000000000..6961260b8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/casttype/mytypes.go @@ -0,0 +1,59 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package casttype + +import ( + "encoding/json" +) + +type MyInt32Type int32 +type MyFloat32Type float32 + +type MyUint64Type uint64 +type MyFloat64Type float64 + +type Bytes []byte + +func (this Bytes) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(this)) +} + +func (this *Bytes) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + *this = *v + return nil +} + +type MyStringType string + +type MyMapType map[string]uint64 diff --git a/deps/github.com/gogo/protobuf/test/castvalue/Makefile b/deps/github.com/gogo/protobuf/test/castvalue/Makefile new file mode 100644 index 000000000..eeaad892c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/Makefile @@ -0,0 +1,40 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + rm -rf combos + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. castvalue.proto + protoc-gen-combo --default=false --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. castvalue.proto + cp mytypes.go ./combos/both/ || true + cp mytypes.go ./combos/marshaler/ || true + cp mytypes.go ./combos/unmarshaler/ || true + cp mytypes.go ./combos/unsafeboth/ || true + cp mytypes.go ./combos/unsafemarshaler/ || true + cp mytypes.go ./combos/unsafeunmarshaler/ || true diff --git a/deps/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go b/deps/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go new file mode 100644 index 000000000..2518dad10 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go @@ -0,0 +1,893 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_87404b9a479f5489, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_87404b9a479f5489, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3921 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x4b, 0x10, 0x1d, 0x43, 0x14, 0x6d, + 0x47, 0xb4, 0x9d, 0x50, 0x19, 0x59, 0x92, 0x25, 0xa8, 0x89, 0x0b, 0x82, 0x10, 0x03, 0x97, 0x7f, + 0x59, 0x90, 0xb1, 0xe5, 0x4c, 0x67, 0x67, 0xb9, 0xb8, 0x00, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, + 0x92, 0xa9, 0xe9, 0x83, 0x3a, 0x4e, 0xdb, 0x49, 0x3b, 0xfd, 0xef, 0x4c, 0x13, 0xd7, 0x71, 0x9b, + 0xce, 0xa4, 0x4e, 0xd3, 0xbf, 0xa4, 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9a, 0x33, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCastvalue(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("castvalue.proto", fileDescriptor_castvalue_87404b9a479f5489) } + +var fileDescriptor_castvalue_87404b9a479f5489 = []byte{ + // 342 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x4e, 0x2c, 0x2e, + 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, + 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, + 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, + 0x99, 0x8b, 0xc3, 0x39, 0xb1, 0xb8, 0x24, 0xb1, 0x3c, 0xb1, 0x52, 0xa8, 0x80, 0x4b, 0x18, 0xc4, + 0xf6, 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xc1, 0xa8, + 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, 0xa6, 0x43, 0x0f, 0x8b, 0x72, 0xd7, 0xbc, + 0x92, 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, 0xba, 0xee, 0xcb, 0x73, 0xf8, 0x56, 0x86, + 0x67, 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x61, 0x33, 0x5a, 0xa8, 0x85, 0x91, 0x4b, 0x1a, 0x8b, 0xb8, + 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, + 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0x7c, 0xd6, 0x48, 0x45, 0x72, 0x49, 0xe0, 0xf2, 0x89, + 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x88, 0x29, + 0xa4, 0xce, 0xc5, 0x0a, 0x76, 0x8b, 0x04, 0x93, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x20, 0x92, 0xeb, + 0xa0, 0x96, 0x41, 0xe4, 0xad, 0x98, 0x2c, 0x18, 0xa5, 0x12, 0xb9, 0x14, 0x08, 0xb9, 0x94, 0x42, + 0x2b, 0x94, 0xe4, 0xb8, 0xd8, 0x20, 0x82, 0x42, 0x22, 0x5c, 0xac, 0x9e, 0x79, 0x25, 0x66, 0x26, + 0x60, 0xa3, 0x98, 0x83, 0x20, 0x1c, 0x27, 0x9f, 0x13, 0x0f, 0xe5, 0x18, 0x2e, 0x3c, 0x94, 0x63, + 0xb8, 0xf1, 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x17, 0x0f, 0xe5, 0x18, 0x3f, 0x3c, 0x94, + 0x63, 0xfc, 0xf1, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x1b, 0x1e, + 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe0, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x0c, 0x17, + 0x1e, 0xc9, 0x31, 0x3c, 0x78, 0x24, 0xc7, 0xf8, 0xe2, 0x91, 0x1c, 0xc3, 0x87, 0x47, 0x72, 0x8c, + 0x3f, 0x1e, 0xc9, 0x31, 0x34, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x8b, + 0x19, 0x68, 0x7d, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/castvalue.proto b/deps/github.com/gogo/protobuf/test/castvalue/castvalue.proto new file mode 100644 index 000000000..35e474361 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go b/deps/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go new file mode 100644 index 000000000..b17489a86 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go new file mode 100644 index 000000000..946f4f6a0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go @@ -0,0 +1,1474 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_a8e85bd7357c5c72, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_a8e85bd7357c5c72, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3930 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0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f6, 0xbd, 0xfb, 0xa5, 0xb1, 0x7f, 0xba, 0x5f, 0x1a, 0x7b, 0xfd, 0x7e, 0x49, 0x7a, + 0xf3, 0x7e, 0x49, 0x7a, 0xfb, 0x7e, 0x49, 0x7a, 0xf7, 0x7e, 0x49, 0xba, 0x77, 0x50, 0x92, 0xbe, + 0x72, 0x50, 0x92, 0xbe, 0x76, 0x50, 0x92, 0xbe, 0x75, 0x50, 0x92, 0xbe, 0x73, 0x50, 0x92, 0x5e, + 0x3b, 0x28, 0x49, 0xdf, 0x3b, 0x28, 0x49, 0xaf, 0x1f, 0x94, 0xa4, 0x37, 0x0f, 0x4a, 0x63, 0x6f, + 0x1f, 0x94, 0xa4, 0x77, 0x0f, 0x4a, 0x63, 0xf7, 0x7e, 0x50, 0x1a, 0xfb, 0xff, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x80, 0x50, 0x88, 0xf5, 0xa6, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCastvalue(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + dAtA[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := 0 + if ((*Wilson)(&v)) != nil { + msgSize = ((*Wilson)(&v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + dAtA[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + msgSize := 0 + if ((*Wilson)(v)) != nil { + msgSize = ((*Wilson)(v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + if ((*Wilson)(v)) != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).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 *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCastvalue + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + 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 *Wilson) 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 ErrIntOverflowCastvalue + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + 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 skipCastvalue(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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrInvalidLengthCastvalue + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalue + } + 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 := skipCastvalue(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 ( + ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/castvalue.proto", fileDescriptor_castvalue_a8e85bd7357c5c72) +} + +var fileDescriptor_castvalue_a8e85bd7357c5c72 = []byte{ + // 354 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0x2a, 0x41, + 0x14, 0xc5, 0xf7, 0xb2, 0xe1, 0x85, 0x37, 0xbc, 0x82, 0xb7, 0x5a, 0x6c, 0x20, 0xb9, 0x6c, 0x68, + 0xa4, 0xd0, 0xdd, 0x84, 0x10, 0x63, 0x2c, 0x31, 0x16, 0x26, 0x62, 0x41, 0xa1, 0xb1, 0x9c, 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x98, 0x9f, 0xfd, 0xc4, 0xc8, 0x11, 0xfd, 0xd4, 0x8b, 0x4d, 0xb0, 0xa0, 0x9c, + 0x6e, 0xcc, 0x47, 0x63, 0x8d, 0xa4, 0x55, 0x17, 0x33, 0x65, 0x41, 0x39, 0x5b, 0xf9, 0xff, 0xae, + 0xdd, 0x0b, 0x2c, 0x79, 0xdf, 0x4e, 0x6d, 0x41, 0x9e, 0x12, 0xeb, 0xbb, 0xa6, 0xbf, 0x44, 0x94, + 0x90, 0xfc, 0x49, 0x44, 0x63, 0x95, 0xa4, 0xf7, 0xba, 0x7c, 0xb3, 0xaa, 0xa2, 0xf4, 0x46, 0xb2, + 0xd4, 0xf6, 0x87, 0x02, 0xb5, 0x91, 0x40, 0xed, 0x5e, 0xa0, 0x36, 0x16, 0x08, 0x13, 0x81, 0x30, + 0x15, 0x08, 0x33, 0x81, 0x30, 0x90, 0x08, 0x57, 0x12, 0xe1, 0x5a, 0x22, 0xdc, 0x48, 0x84, 0x5b, + 0x89, 0x30, 0x94, 0x08, 0x23, 0x89, 0x30, 0x96, 0x08, 0x13, 0x89, 0xda, 0x54, 0x22, 0xcc, 0x24, + 0x6a, 0x83, 0x27, 0xd4, 0x9e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xe0, 0x74, 0x89, 0x89, 0x02, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto new file mode 100644 index 000000000..156639577 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go new file mode 100644 index 000000000..043bdbb09 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go @@ -0,0 +1,31 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package castvalue + +type MyWilson Wilson diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go new file mode 100644 index 000000000..3c4441347 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go @@ -0,0 +1,1022 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_cc68bdd888d8d1a2, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_cc68bdd888d8d1a2, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3929 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x4b, 0x10, 0x9d, 0x40, 0x14, 0x6d, + 0x47, 0xb4, 0x9d, 0x90, 0x19, 0x59, 0x92, 0x25, 0xa8, 0x89, 0x0b, 0x82, 0x10, 0x03, 0x97, 0x7f, + 0x59, 0x90, 0xb1, 0xe5, 0x4c, 0x67, 0x67, 0xb9, 0xb8, 0x00, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, + 0x92, 0xa9, 0xe9, 0x83, 0x3a, 0x4e, 0xdb, 0x49, 0x3b, 0x4d, 0x7f, 0x67, 0x9a, 0xb8, 0x8e, 0xdb, + 0x74, 0x26, 0x75, 0x9a, 0xfe, 0x25, 0x4d, 0x9b, 0x26, 0x7d, 0x4a, 0x1f, 0xd2, 0xfa, 0xa9, 0x93, + 0xbc, 0xf5, 0xa1, 0xd3, 0x5a, 0x8c, 0x67, 0xea, 0xb6, 0x6e, 0xe3, 0xb6, 0x7e, 0xf0, 0x8c, 0x5f, + 0x3a, 0xf7, 0x6f, 0xb1, 0x0b, 0x80, 0x5c, 0x30, 0x1d, 0x3b, 0x4f, 0xc4, 0x9e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, 0xd3, 0xd6, 0x35, 0x1a, 0x5a, 0xec, + 0x13, 0xd3, 0x62, 0xcc, 0x87, 0x81, 0xa5, 0x75, 0xae, 0xaf, 0x04, 0xc8, 0xb9, 0x7f, 0x90, 0x20, + 0x23, 0xc4, 0xe8, 0x14, 0xa4, 0x1c, 0xcd, 0xdf, 0xa7, 0x74, 0xe9, 0x95, 0x84, 0x2c, 0x29, 0xf4, + 0x99, 0xc8, 0x3d, 0x47, 0xb3, 0x68, 0x08, 0x70, 0x39, 0x79, 0x26, 0xeb, 0x6a, 0x62, 0xad, 0x49, + 0x8f, 0x1f, 0x76, 0xa7, 0x83, 0x2d, 0xdf, 0x13, 0xeb, 0xca, 0xe5, 0x55, 0x2e, 0x46, 0x8f, 0xc3, + 0xb4, 0xef, 0x6a, 0x86, 0x19, 0xd1, 0x4d, 0x51, 0x5d, 0x59, 0x0c, 0x04, 0xca, 0x65, 0x38, 0x23, + 0x78, 0x9b, 0xd8, 0xd7, 0xf4, 0x7d, 0xdc, 0xec, 0x81, 0xc6, 0xe9, 0x35, 0xc3, 0x69, 0xae, 0xb0, + 0xca, 0xc7, 0x05, 0x76, 0xe1, 0x07, 0x12, 0x4c, 0x8b, 0x03, 0x53, 0x33, 0x70, 0xd6, 0x06, 0x80, + 0x66, 0x59, 0xb6, 0x1f, 0x76, 0xd7, 0x60, 0x28, 0x0f, 0xe0, 0x96, 0x2a, 0x01, 0x48, 0x09, 0x11, + 0xcc, 0x75, 0x00, 0x7a, 0x23, 0x47, 0xba, 0xed, 0x2c, 0xe4, 0xf8, 0x27, 0x1c, 0xfa, 0x1d, 0x90, + 0x1d, 0xb1, 0x81, 0x89, 0xc8, 0xc9, 0x0a, 0xcd, 0x42, 0x7a, 0x0f, 0xb7, 0x0d, 0x8b, 0x5f, 0xcc, + 0xb2, 0x07, 0x71, 0x11, 0x92, 0x0a, 0x2e, 0x42, 0x56, 0x3e, 0x0d, 0x33, 0xba, 0xdd, 0xe9, 0x37, + 0x77, 0x45,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 0x66, 0xee, 0x06, + 0x14, 0x8f, 0x9a, 0x09, 0x92, 0x21, 0x79, 0x0b, 0x1f, 0xf0, 0x7f, 0x9a, 0x23, 0x3f, 0xd1, 0xf9, + 0xde, 0xbf, 0x16, 0x4a, 0x8b, 0xb9, 0x0b, 0xd3, 0x21, 0xeb, 0xf8, 0xcb, 0xd8, 0x78, 0x39, 0x71, + 0x45, 0x9a, 0xd3, 0x60, 0x3e, 0xce, 0xd2, 0xff, 0xe7, 0x2b, 0x16, 0x4a, 0x30, 0xce, 0x84, 0x68, + 0x16, 0xd2, 0x75, 0xcb, 0xbf, 0x7c, 0x91, 0x52, 0x25, 0x15, 0xf6, 0xb0, 0xb2, 0xfe, 0xea, 0xfd, + 0xd2, 0xd8, 0xf7, 0xef, 0x97, 0xc6, 0xfe, 0xf1, 0x7e, 0x69, 0xec, 0xb5, 0xfb, 0x25, 0xe9, 0x8d, + 0xfb, 0x25, 0xe9, 0xad, 0xfb, 0x25, 0xe9, 0x9d, 0xfb, 0x25, 0xe9, 0xde, 0x61, 0x49, 0xfa, 0xea, + 0x61, 0x49, 0xfa, 0xfa, 0x61, 0x49, 0xfa, 0xf6, 0x61, 0x49, 0xfa, 0xee, 0x61, 0x49, 0x7a, 0xf5, + 0xb0, 0x24, 0x7d, 0xff, 0xb0, 0x34, 0xf6, 0xda, 0x61, 0x49, 0x7a, 0xe3, 0xb0, 0x34, 0xf6, 0xd6, + 0x61, 0x49, 0x7a, 0xe7, 0xb0, 0x34, 0x76, 0xef, 0x87, 0xa5, 0xb1, 0xff, 0x0b, 0x00, 0x00, 0xff, + 0xff, 0x96, 0xdf, 0xa0, 0xf1, 0xab, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCastvalue(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + dAtA[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := 0 + if ((*Wilson)(&v)) != nil { + msgSize = ((*Wilson)(&v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + dAtA[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + msgSize := 0 + if ((*Wilson)(v)) != nil { + msgSize = ((*Wilson)(v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + if ((*Wilson)(v)) != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).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 *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/castvalue.proto", fileDescriptor_castvalue_cc68bdd888d8d1a2) +} + +var fileDescriptor_castvalue_cc68bdd888d8d1a2 = []byte{ + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0x2a, 0x41, + 0x14, 0xc5, 0xe7, 0xb2, 0xe1, 0x85, 0x37, 0xbc, 0x82, 0xb7, 0xef, 0x15, 0x1b, 0x4c, 0x2e, 0x1b, + 0x1a, 0x29, 0x74, 0x37, 0x21, 0xc4, 0x18, 0x4b, 0x8c, 0x85, 0x89, 0x58, 0x50, 0x68, 0x2c, 0x67, + 0xc9, 0xba, 0x10, 0x17, 0x86, 0xec, 0x87, 0x66, 0x3b, 0x0a, 0x2b, 0xff, 0x12, 0x4b, 0x4b, 0x4b, + 0xed, 0x28, 0x29, 0xad, 0x94, 0x19, 0x1b, 0x4a, 0x4a, 0x4a, 0xc3, 0xac, 0xf8, 0x91, 0xe0, 0x47, + 0x62, 0x77, 0xef, 0x99, 0x7b, 0xce, 0xef, 0x0c, 0x35, 0x5b, 0xbc, 0xeb, 0xf0, 0xd0, 0xee, 0xb2, + 0x20, 0x6c, 0x33, 0xdf, 0x0d, 0xec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 0x4f, 0xb3, 0xbb, 0xbd, 0x68, 0xa3, + 0xa6, 0xa2, 0xb4, 0x66, 0xba, 0xd4, 0xf7, 0x86, 0x02, 0xc9, 0x48, 0x20, 0xb9, 0x13, 0x48, 0xc6, + 0x02, 0x61, 0x22, 0x10, 0xa6, 0x02, 0x61, 0x26, 0x10, 0x06, 0x12, 0xe1, 0x52, 0x22, 0x5c, 0x49, + 0x84, 0x6b, 0x89, 0x70, 0x23, 0x11, 0x86, 0x12, 0x61, 0x24, 0x91, 0x8c, 0x25, 0xc2, 0x44, 0x22, + 0x99, 0x4a, 0x84, 0x99, 0x44, 0x32, 0x78, 0x44, 0xf2, 0x14, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x22, + 0x8c, 0x46, 0x8e, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto new file mode 100644 index 000000000..728312b86 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go new file mode 100644 index 000000000..89a89c22c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go @@ -0,0 +1,31 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package castvalue + +type MyWilson Wilson diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go new file mode 100644 index 000000000..76ddf689a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go @@ -0,0 +1,1348 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_92129bf361b9c2b5, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_92129bf361b9c2b5, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3930 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff,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, 0x56, 0x11, 0x9b, 0xcd, 0x7e, 0x8a, 0x1e, 0x0e, 0x5d, 0x86, + 0x09, 0xdb, 0xf1, 0x0d, 0xdb, 0xf2, 0x8a, 0x99, 0x79, 0x69, 0x21, 0x77, 0xe1, 0x03, 0x43, 0x03, + 0x61, 0x93, 0xe9, 0x28, 0x42, 0x19, 0x35, 0x40, 0xf6, 0xec, 0xae, 0xab, 0x63, 0x55, 0xb7, 0x9b, + 0x58, 0x35, 0xac, 0x96, 0x5d, 0xcc, 0x52, 0x82, 0xb3, 0x83, 0x13, 0xa1, 0x8a, 0x35, 0xbb, 0x89, + 0x1b, 0x56, 0xcb, 0x56, 0x0a, 0x5e, 0xe4, 0x19, 0x9d, 0x82, 0x71, 0xef, 0xc0, 0xf2, 0xb5, 0xe7, + 0x8b, 0x79, 0x1a, 0x21, 0xfc, 0xa9, 0xfc, 0x9d, 0x71, 0x98, 0x1a, 0x25, 0xc4, 0xae, 0x41, 0xba, + 0x45, 0x66, 0x59, 0x4c, 0x9c, 0xc4, 0x07, 0x0c, 0x13, 0x75, 0xe2, 0xf8, 0x8f, 0xe9, 0xc4, 0x2a, + 0xe4, 0x2c, 0xec, 0xf9, 0xb8, 0xc9, 0x22, 0x22, 0x39, 0x62, 0x4c, 0x01, 0x03, 0x0d, 0x86, 0x54, + 0xea, 0xc7, 0x0a, 0xa9, 0x67, 0x61, 0x2a, 0x30, 0x49, 0x75, 0x35, 0xab, 0x2d, 0x62, 0x73, 0x29, + 0xce, 0x92, 0xc5, 0xba, 0xc0, 0x29, 0x04, 0xa6, 0x14, 0x70, 0xe4, 0x19, 0xad, 0x00, 0xd8, 0x16, + 0xb6, 0x5b, 0x6a, 0x13, 0xeb, 0x66, 0x31, 0x73, 0x84, 0x97, 0x36, 0x89, 0xca, 0x80, 0x97, 0x6c, + 0x26, 0xd5, 0x4d, 0x74, 0xb5, 0x17, 0x6a, 0x13, 0x47, 0x44, 0xca, 0x3a, 0xdb, 0x64, 0x03, 0xd1, +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bd, 0x7a, + 0xbf, 0x34, 0xf6, 0xfd, 0xfb, 0xa5, 0xb1, 0x7f, 0xbc, 0x5f, 0x1a, 0x7b, 0xed, 0x7e, 0x49, 0x7a, + 0xe3, 0x7e, 0x49, 0x7a, 0xeb, 0x7e, 0x49, 0x7a, 0xe7, 0x7e, 0x49, 0xba, 0x77, 0x58, 0x92, 0xbe, + 0x7a, 0x58, 0x92, 0xbe, 0x7e, 0x58, 0x92, 0xbe, 0x7d, 0x58, 0x92, 0xbe, 0x7b, 0x58, 0x92, 0x5e, + 0x3d, 0x2c, 0x8d, 0x7d, 0xff, 0xb0, 0x24, 0xbd, 0x76, 0x58, 0x92, 0xde, 0x38, 0x2c, 0x8d, 0xbd, + 0x75, 0x58, 0x92, 0xde, 0x39, 0x2c, 0x8d, 0xdd, 0xfb, 0x61, 0x69, 0xec, 0xff, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x0a, 0xd2, 0xf5, 0xa1, 0xad, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringCastvalue(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCastvalue + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + 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 *Wilson) 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 ErrIntOverflowCastvalue + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + 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 skipCastvalue(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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrInvalidLengthCastvalue + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalue + } + 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 := skipCastvalue(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 ( + ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/castvalue.proto", fileDescriptor_castvalue_92129bf361b9c2b5) +} + +var fileDescriptor_castvalue_92129bf361b9c2b5 = []byte{ + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0xf2, 0x50, + 0x14, 0xc6, 0xef, 0xa1, 0xe1, 0x0d, 0xef, 0xc5, 0x01, 0xab, 0x43, 0x83, 0xc9, 0xa1, 0x61, 0x91, + 0x41, 0xdb, 0x84, 0x10, 0x63, 0x1c, 0x31, 0x0e, 0x26, 0xe2, 0xc0, 0xa0, 0x71, 0xbc, 0x25, 0xb5, + 0x10, 0x4b, 0x2f, 0xe9, 0x87, 0xa6, 0x1b, 0x83, 0x93, 0x7f, 0x89, 0xa3, 0xa3, 0xa3, 0x6e, 0x8c, + 0x8c, 0x4e, 0x4a, 0xaf, 0x0b, 0x23, 0x23, 0xa3, 0xe1, 0x56, 0xfc, 0x48, 0xf0, 0x23, 0x71, 0x3b, + 0xe7, 0xb9, 0xe7, 0x79, 0x7e, 0xcf, 0xa5, 0xe5, 0x16, 0xef, 0x5a, 0x3c, 0x30, 0x23, 0xaf, 0xcb, + 0xfc, 0xa0, 0xcd, 0x5c, 0xdb, 0x37, 0x5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b, 0xef, 0x85, 0x5b, 0x35, + 0x19, 0xa5, 0x34, 0xd3, 0xa5, 0x7e, 0x30, 0x48, 0x90, 0x0c, 0x13, 0x24, 0x0f, 0x09, 0x92, 0x51, + 0x82, 0x30, 0x4e, 0x10, 0x26, 0x09, 0xc2, 0x34, 0x41, 0xe8, 0x0b, 0x84, 0x6b, 0x81, 0x70, 0x23, + 0x10, 0x6e, 0x05, 0xc2, 0x9d, 0x40, 0x18, 0x08, 0x24, 0x43, 0x81, 0x30, 0x12, 0x08, 0x63, 0x81, + 0x64, 0x22, 0x10, 0xa6, 0x02, 0x49, 0xff, 0x19, 0xc9, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, + 0xe3, 0x1c, 0x3e, 0x90, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto new file mode 100644 index 000000000..2f046a716 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go new file mode 100644 index 000000000..0369342e9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go @@ -0,0 +1,31 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package castvalue + +type MyWilson Wilson diff --git a/deps/github.com/gogo/protobuf/test/castvalue/mytypes.go b/deps/github.com/gogo/protobuf/test/castvalue/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/castvalue/mytypes.go @@ -0,0 +1,31 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package castvalue + +type MyWilson Wilson diff --git a/deps/github.com/gogo/protobuf/test/combos/both/bug_test.go b/deps/github.com/gogo/protobuf/test/combos/both/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/both/bug_test.go @@ -0,0 +1,252 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/deps/github.com/gogo/protobuf/test/combos/both/t.go b/deps/github.com/gogo/protobuf/test/combos/both/t.go new file mode 100644 index 000000000..4112884ac --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/both/t.go @@ -0,0 +1,77 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) MarshalTo(data []byte) (n int, err error) { + return r.protoType().MarshalTo(data) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/deps/github.com/gogo/protobuf/test/combos/both/thetest.pb.go b/deps/github.com/gogo/protobuf/test/combos/both/thetest.pb.go new file mode 100644 index 000000000..d8a227455 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/both/thetest.pb.go @@ -0,0 +1,45323 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return m.Size() +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return m.Size() +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return m.Size() +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return m.Size() +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return m.Size() +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return m.Size() +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return m.Size() +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return m.Size() +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return m.Size() +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return m.Size() +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return m.Size() +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return m.Size() +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return m.Size() +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return m.Size() +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return m.Size() +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return m.Size() +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return m.Size() +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return m.Size() +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return m.Size() +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return m.Size() +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return m.Size() +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return m.Size() +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "combos/both/thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "combos/both/thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "combos/both/thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "combos/both/thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "combos/both/thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "combos/both/thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "combos/both/thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "combos/both/thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6647 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x70, 0x24, 0x57, + 0x75, 0xbf, 0x7a, 0x7a, 0xa4, 0x1d, 0x1d, 0xbd, 0x5a, 0xad, 0x5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0x21, 0xe8, 0x27, 0x23, 0xf9, 0xd5, + 0xd5, 0x65, 0x2d, 0xe5, 0xc9, 0x5c, 0xdf, 0x30, 0x96, 0xca, 0x57, 0xb4, 0x7e, 0x4f, 0xe6, 0x15, + 0x63, 0x75, 0x73, 0x4d, 0x03, 0x4f, 0xc2, 0x4a, 0x69, 0x7d, 0x3d, 0x77, 0xa5, 0xa4, 0x0d, 0x78, + 0x1c, 0xf9, 0x6b, 0x1b, 0xa5, 0x75, 0x6d, 0x50, 0x50, 0xeb, 0xcc, 0x82, 0x36, 0xe4, 0x3d, 0xa2, + 0x54, 0xde, 0x5c, 0xd1, 0x86, 0xf5, 0x51, 0x18, 0xa2, 0x8f, 0xe0, 0x4a, 0x8c, 0x48, 0x43, 0xe7, + 0x16, 0x35, 0xcd, 0x57, 0x84, 0x4a, 0x19, 0x15, 0x06, 0xce, 0x2d, 0x6a, 0x7a, 0xa6, 0x00, 0xbd, + 0x24, 0xba, 0x74, 0x1d, 0x86, 0x97, 0x73, 0xf9, 0xd2, 0x72, 0x65, 0x75, 0x6d, 0x63, 0x69, 0xb5, + 0x9c, 0x5b, 0xd6, 0x14, 0x7f, 0xcc, 0x28, 0xbd, 0x7b, 0x73, 0xc9, 0x28, 0x15, 0xb5, 0x44, 0x70, + 0x6c, 0xad, 0x94, 0xdb, 0x28, 0x15, 0x35, 0x35, 0x53, 0x85, 0xc3, 0x61, 0x75, 0x32, 0x34, 0x33, + 0x02, 0x2e, 0x4e, 0x74, 0x71, 0x31, 0x91, 0xd5, 0xe1, 0xe2, 0x57, 0x12, 0x30, 0x16, 0xb2, 0x56, + 0x84, 0x3e, 0xe4, 0x61, 0xe8, 0xa5, 0x21, 0x4a, 0x57, 0xcf, 0xfb, 0x42, 0x17, 0x1d, 0x12, 0xb0, + 0x1d, 0x2b, 0x28, 0xc1, 0x05, 0x3b, 0x08, 0xb5, 0x4b, 0x07, 0x81, 0x45, 0x74, 0xd4, 0xf4, 0xff, + 0xd7, 0x51, 0x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dc, 0x97, 0x08, 0xb8, 0x6e, 0x42, 0x72, 0x5d, + 0x22, 0xe0, 0xb6, 0x09, 0xc9, 0x6d, 0x89, 0x80, 0xcb, 0x26, 0x24, 0x97, 0x25, 0x02, 0xee, 0x9a, + 0x90, 0xdc, 0x95, 0x08, 0xb8, 0x6a, 0x42, 0x72, 0x55, 0x22, 0xe0, 0xa6, 0x09, 0xc9, 0x4d, 0x89, + 0x80, 0x8b, 0x26, 0x24, 0x17, 0x25, 0x02, 0xee, 0x99, 0x90, 0xdc, 0x93, 0x08, 0xb8, 0xe6, 0x98, + 0xec, 0x9a, 0x44, 0xd0, 0x2d, 0xc7, 0x64, 0xb7, 0x24, 0x82, 0x2e, 0x39, 0x26, 0xbb, 0x24, 0x11, + 0x74, 0xc7, 0x31, 0xd9, 0x1d, 0x89, 0xa0, 0x2b, 0x7e, 0x9a, 0xe0, 0x1d, 0xe1, 0xba, 0xdb, 0xde, + 0xad, 0xba, 0xb7, 0xd5, 0x11, 0xce, 0x0b, 0xed, 0xc3, 0xc0, 0x82, 0x3e, 0x47, 0x1a, 0xd6, 0x60, + 0xc7, 0x29, 0xad, 0x60, 0xf3, 0x42, 0x63, 0x11, 0x40, 0x58, 0xe1, 0x88, 0xc5, 0xdb, 0xea, 0x0d, + 0xe7, 0x85, 0x36, 0x23, 0x5a, 0xbf, 0x0b, 0x6f, 0x79, 0xc7, 0xf6, 0x62, 0x82, 0x77, 0x6c, 0xcc, + 0xfc, 0x07, 0xed, 0xd8, 0x66, 0xa3, 0x4d, 0xee, 0x19, 0x7b, 0x36, 0xda, 0xd8, 0x1d, 0xab, 0x4e, + 0xdc, 0x0e, 0x6e, 0x36, 0xda, 0xb4, 0x9e, 0x51, 0xdf, 0xdc, 0x7e, 0x8b, 0x45, 0xb0, 0x81, 0x5a, + 0x21, 0x11, 0x7c, 0xd0, 0x7e, 0x6b, 0x5e, 0x28, 0x25, 0x07, 0x8d, 0x60, 0xf5, 0xc0, 0x11, 0x7c, + 0xd0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3, + 0x28, 0x26, 0x33, 0x9b, 0x12, 0xb2, 0x7e, 0x4f, 0xd0, 0xee, 0x63, 0x9e, 0xdd, 0x03, 0x7c, 0xc4, + 0xf6, 0x19, 0xc1, 0xf6, 0xcc, 0x81, 0x98, 0xa9, 0xc3, 0xfe, 0xe7, 0x61, 0x20, 0xf0, 0x14, 0x7d, + 0x86, 0xa9, 0x91, 0x90, 0x81, 0x41, 0x5b, 0x61, 0x8e, 0x0c, 0x82, 0x21, 0xe1, 0xc1, 0x18, 0x1a, + 0x30, 0x71, 0x17, 0x28, 0x31, 0xf3, 0xac, 0x68, 0xe6, 0x70, 0x56, 0x66, 0xea, 0x79, 0x6a, 0x23, + 0x62, 0xee, 0x13, 0x34, 0x38, 0xbb, 0x3b, 0x11, 0x7f, 0xce, 0xf4, 0x82, 0x5a, 0xae, 0x37, 0x32, + 0x0f, 0x02, 0xd0, 0x94, 0x2f, 0x59, 0xbb, 0x4d, 0x29, 0xeb, 0x86, 0xb9, 0x81, 0x37, 0x76, 0xd0, + 0x06, 0x72, 0x08, 0x8b, 0xd8, 0x4f, 0xe1, 0x02, 0x03, 0x34, 0xc5, 0x08, 0xfe, 0xbe, 0x48, 0x7c, + 0x68, 0x27, 0x86, 0x59, 0xd3, 0x94, 0xf5, 0x1a, 0x72, 0x73, 0x96, 0xed, 0xee, 0xa0, 0xb6, 0x84, + 0x58, 0xd0, 0xcf, 0x08, 0x09, 0x3b, 0xbc, 0x70, 0xa7, 0x87, 0xe8, 0x0a, 0x3a, 0x93, 0xf9, 0x22, + 0x51, 0x10, 0xb7, 0x02, 0x1d, 0x13, 0x54, 0x63, 0x4c, 0x50, 0x3f, 0x27, 0xf4, 0x6f, 0xfb, 0xa8, + 0x29, 0xbd, 0x5a, 0x5e, 0x14, 0xde, 0x73, 0xf6, 0x57, 0x56, 0x7c, 0xc7, 0xe4, 0x36, 0xe5, 0x2a, + 0xdf, 0x17, 0xa9, 0x72, 0x97, 0xee, 0xf6, 0xa0, 0x36,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xba, 0x8d, 0x24, 0xf2, + 0x95, 0xbc, 0x78, 0x3b, 0x29, 0x9d, 0x3d, 0x89, 0x7c, 0x97, 0xbd, 0xc8, 0x3b, 0x29, 0x9d, 0x42, + 0x89, 0x7c, 0x57, 0xbc, 0x18, 0x3c, 0x29, 0xdd, 0x55, 0x12, 0xf9, 0x1e, 0xf1, 0xa2, 0xf1, 0xa4, + 0x74, 0x6b, 0x49, 0xe4, 0x5b, 0xf2, 0xe2, 0x72, 0x46, 0xbe, 0xbf, 0x24, 0x32, 0x5e, 0xf5, 0x23, + 0x74, 0x46, 0xbe, 0xc9, 0x24, 0x72, 0xbe, 0xcb, 0x8f, 0xd5, 0x19, 0xf9, 0x4e, 0x93, 0xc8, 0xb9, + 0xec, 0x47, 0xed, 0x8c, 0x7c, 0x56, 0x26, 0x72, 0xae, 0xf8, 0xf1, 0x3b, 0x23, 0x9f, 0x9a, 0x89, + 0x9c, 0x65, 0x3f, 0x92, 0x67, 0xe4, 0xf3, 0x33, 0x91, 0x73, 0xd5, 0xdf, 0x44, 0xff, 0xa6, 0x14, + 0x7e, 0x81, 0x5b, 0x50, 0x19, 0x29, 0xfc, 0x20, 0x24, 0xf4, 0xa4, 0x42, 0x16, 0xe0, 0xf1, 0xc3, + 0x2e, 0x23, 0x85, 0x1d, 0x84, 0x84, 0x5c, 0x46, 0x0a, 0x39, 0x08, 0x09, 0xb7, 0x8c, 0x14, 0x6e, + 0x10, 0x12, 0x6a, 0x19, 0x29, 0xd4, 0x20, 0x24, 0xcc, 0x32, 0x52, 0x98, 0x41, 0x48, 0x88, 0x65, + 0xa4, 0x10, 0x83, 0x90, 0xf0, 0xca, 0x48, 0xe1, 0x05, 0x21, 0xa1, 0x75, 0x42, 0x0e, 0x2d, 0x08, + 0x0b, 0xab, 0x13, 0x72, 0x58, 0x41, 0x58, 0x48, 0xdd, 0x2d, 0x87, 0x54, 0xff, 0xad, 0x97, 0xa7, + 0x7a, 0xf1, 0x50, 0x20, 0x9a, 0x4e, 0xc8, 0xd1, 0x04, 0x61, 0x91, 0x74, 0x42, 0x8e, 0x24, 0x08, + 0x8b, 0xa2, 0x13, 0x72, 0x14, 0x41, 0x58, 0x04, 0xbd, 0x28, 0x47, 0x90, 0x7f, 0xc7, 0x27, 0x23, + 0x1d, 0x29, 0x46, 0x45, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, 0xa4, 0xc6, 0x88, 0x20, 0x35, + 0x46, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x11, 0x41, 0x6a, 0x8c, 0x08, 0x52, 0xe3, 0x44, 0x90, + 0x1a, 0x2b, 0x82, 0xd4, 0x6e, 0x11, 0x74, 0x42, 0xbe, 0xf1, 0x00, 0x61, 0x05, 0xe9, 0x84, 0x7c, + 0xf4, 0x19, 0x1d, 0x42, 0x6a, 0xac, 0x10, 0x52, 0xbb, 0x85, 0xd0, 0x37, 0x55, 0x18, 0x13, 0x42, + 0x88, 0x9d, 0x0f, 0xbd, 0x59, 0x15, 0xe8, 0x5c, 0x8c, 0x0b, 0x16, 0x61, 0x31, 0x75, 0x2e, 0xc6, + 0x21, 0xf5, 0x7e, 0x71, 0xd6, 0x59, 0x85, 0x4a, 0x31, 0xaa, 0xd0, 0x65, 0x2f, 0x86, 0xce, 0xc5, + 0xb8, 0x78, 0xd1, 0x19, 0x7b, 0x17, 0xf6, 0x2b, 0x02, 0x8f, 0xc4, 0x2a, 0x02, 0x4b, 0xb1, 0x8a, + 0xc0, 0x55, 0xdf, 0x83, 0x1f, 0x4a, 0xc0, 0x61, 0xdf, 0x83, 0xf4, 0x13, 0xf9, 0xe9, 0xa6, 0x4c, + 0xe0, 0x88, 0x4a, 0xe7, 0xc7, 0x36, 0x01, 0x37, 0x26, 0x96, 0x6a, 0xfa, 0x9a, 0x78, 0x58, 0x95, + 0x3d, 0xe8, 0x01, 0x4e, 0xc0, 0xe3, 0x6c, 0x33, 0xf4, 0x04, 0xa8, 0x4b, 0x35, 0x87, 0x54,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x48, 0x95, 0x64, 0x9e, 0x70, 0x3d, 0x8b, 0x90, 0x2c, 0xdb, 0x35, 0xf2, + 0xfb, 0x30, 0xe4, 0x07, 0x91, 0x99, 0x91, 0xd9, 0xaf, 0x23, 0x9f, 0x84, 0x54, 0x61, 0xa7, 0xde, + 0xa8, 0xb5, 0x91, 0xc5, 0xce, 0xec, 0xd9, 0x16, 0x3a, 0xc6, 0x18, 0x1e, 0x2d, 0x53, 0x80, 0xd1, + 0xb2, 0x6d, 0xe5, 0xf7, 0xdc, 0x60, 0xdd, 0x98, 0x93, 0x52, 0x84, 0x9d, 0xf9, 0x90, 0xbf, 0x03, + 0xc1, 0x0c, 0xf9, 0xde, 0xef, 0xbe, 0x3c, 0xa5, 0x6c, 0x78, 0xfb, 0xe7, 0x2b, 0x70, 0x94, 0xa5, + 0x4f, 0x87, 0xa8, 0x85, 0x28, 0x51, 0xfd, 0xec, 0x9c, 0x3a, 0x20, 0x6e, 0x09, 0x8b, 0xb3, 0x42, + 0xc5, 0xbd, 0x31, 0xcd, 0x70, 0x53, 0xb4, 0xaf, 0x66, 0xea, 0x81, 0x34, 0x0b, 0x15, 0x37, 0x17, + 0x25, 0x4e, 0xd2, 0xec, 0x6e, 0xe8, 0xf7, 0x68, 0x81, 0x68, 0x08, 0x66, 0xca, 0xc2, 0x6c, 0x06, + 0x06, 0x02, 0x09, 0xab, 0xf7, 0x82, 0x92, 0xd3, 0x7a, 0xf0, 0x7f, 0x79, 0x4d, 0xc1, 0xff, 0x15, + 0xb4, 0xc4, 0xec, 0x3d, 0x30, 0x22, 0xed, 0x5f, 0x62, 0x4a, 0x51, 0x03, 0xfc, 0x5f, 0x49, 0x1b, + 0x98, 0x48, 0x7e, 0xf8, 0x8f, 0x26, 0x7b, 0x66, 0x2f, 0x81, 0xde, 0xb9, 0xd3, 0xa9, 0xf7, 0x41, + 0x22, 0x87, 0x45, 0x1e, 0x85, 0x44, 0x3e, 0xaf, 0x29, 0x13, 0x23, 0xbf, 0xfa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xd6, 0xa4, 0xf2, 0xd2, 0xad, 0x49, 0xe5, 0x7b, 0xb7, 0x26, 0x95, 0x1f, 0xdc, + 0x9a, 0xec, 0xf9, 0xd1, 0xad, 0x49, 0xe5, 0x27, 0xb7, 0x26, 0x7b, 0x9e, 0x7d, 0x65, 0xb2, 0xe7, + 0xf9, 0x57, 0x26, 0x7b, 0x5e, 0x78, 0x65, 0x52, 0xf9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xeb, + 0x29, 0x6c, 0xaf, 0x64, 0x67, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringThetest(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringThetest(m github_com_gogo_protobuf_proto.Message) string { + e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) + if e == nil { + return "nil" + } + s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "})" + return s +} +func (m *NidOptNative) 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 *NidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field5)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) 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 *NidRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f2 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + dAtA[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + dAtA[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + dAtA[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + dAtA[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NinRepNative) 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 *NinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f5 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f6 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f6)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x7 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x7 >= 1<<7 { + dAtA[i] = uint8(uint64(x7)&0x7f | 0x80) + x7 >>= 7 + i++ + } + dAtA[i] = uint8(x7) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x8 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x8 >= 1<<7 { + dAtA[i] = uint8(uint64(x8)&0x7f | 0x80) + x8 >>= 7 + i++ + } + dAtA[i] = uint8(x8) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NidRepPackedNative) 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 *NidRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f9 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f10 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f10)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA12 := make([]byte, len(m.Field3)*10) + var j11 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + dAtA12[j11] = uint8(num) + j11++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j11)) + i += copy(dAtA[i:], dAtA12[:j11]) + } + if len(m.Field4) > 0 { + dAtA14 := make([]byte, len(m.Field4)*10) + var j13 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j13++ + } + dAtA14[j13] = uint8(num) + j13++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j13)) + i += copy(dAtA[i:], dAtA14[:j13]) + } + if len(m.Field5) > 0 { + dAtA16 := make([]byte, len(m.Field5)*10) + var j15 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + dAtA16[j15] = uint8(num) + j15++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j15)) + i += copy(dAtA[i:], dAtA16[:j15]) + } + if len(m.Field6) > 0 { + dAtA18 := make([]byte, len(m.Field6)*10) + var j17 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j17++ + } + dAtA18[j17] = uint8(num) + j17++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j17)) + i += copy(dAtA[i:], dAtA18[:j17]) + } + if len(m.Field7) > 0 { + dAtA19 := make([]byte, len(m.Field7)*5) + var j20 int + for _, num := range m.Field7 { + x21 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x21 >= 1<<7 { + dAtA19[j20] = uint8(uint64(x21)&0x7f | 0x80) + j20++ + x21 >>= 7 + } + dAtA19[j20] = uint8(x21) + j20++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j20)) + i += copy(dAtA[i:], dAtA19[:j20]) + } + if len(m.Field8) > 0 { + var j22 int + dAtA24 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x23 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x23 >= 1<<7 { + dAtA24[j22] = uint8(uint64(x23)&0x7f | 0x80) + j22++ + x23 >>= 7 + } + dAtA24[j22] = uint8(x23) + j22++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j22)) + i += copy(dAtA[i:], dAtA24[:j22]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + 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 *NinRepPackedNative) 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 *NinRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f25 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f25)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f26 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f26)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA28 := make([]byte, len(m.Field3)*10) + var j27 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j27++ + } + dAtA28[j27] = uint8(num) + j27++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j27)) + i += copy(dAtA[i:], dAtA28[:j27]) + } + if len(m.Field4) > 0 { + dAtA30 := make([]byte, len(m.Field4)*10) + var j29 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j29++ + } + dAtA30[j29] = uint8(num) + j29++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j29)) + i += copy(dAtA[i:], dAtA30[:j29]) + } + if len(m.Field5) > 0 { + dAtA32 := make([]byte, len(m.Field5)*10) + var j31 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA32[j31] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j31++ + } + dAtA32[j31] = uint8(num) + j31++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j31)) + i += copy(dAtA[i:], dAtA32[:j31]) + } + if len(m.Field6) > 0 { + dAtA34 := make([]byte, len(m.Field6)*10) + var j33 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA34[j33] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j33++ + } + dAtA34[j33] = uint8(num) + j33++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j33)) + i += copy(dAtA[i:], dAtA34[:j33]) + } + if len(m.Field7) > 0 { + dAtA35 := make([]byte, len(m.Field7)*5) + var j36 int + for _, num := range m.Field7 { + x37 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x37 >= 1<<7 { + dAtA35[j36] = uint8(uint64(x37)&0x7f | 0x80) + j36++ + x37 >>= 7 + } + dAtA35[j36] = uint8(x37) + j36++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j36)) + i += copy(dAtA[i:], dAtA35[:j36]) + } + if len(m.Field8) > 0 { + var j38 int + dAtA40 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x39 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x39 >= 1<<7 { + dAtA40[j38] = uint8(uint64(x39)&0x7f | 0x80) + j38++ + x39 >>= 7 + } + dAtA40[j38] = uint8(x39) + j38++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j38)) + i += copy(dAtA[i:], dAtA40[:j38]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + 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 *NidOptStruct) 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 *NidOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n41, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n42, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n43, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) 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 *NinOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n44, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n45, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n46, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) 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 *NidRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f47 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f47)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f48 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f48)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x49 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x49 >= 1<<7 { + dAtA[i] = uint8(uint64(x49)&0x7f | 0x80) + x49 >>= 7 + i++ + } + dAtA[i] = uint8(x49) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NinRepStruct) 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 *NinRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f50 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f50)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f51 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f51)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x52 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x52 >= 1<<7 { + dAtA[i] = uint8(uint64(x52)&0x7f | 0x80) + x52 >>= 7 + i++ + } + dAtA[i] = uint8(x52) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NidEmbeddedStruct) 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 *NidEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n53, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n54, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if m.Field210 { + 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 *NinEmbeddedStruct) 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 *NinEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n55, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n56, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + 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 *NidNestedStruct) 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 *NidNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n57, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NinNestedStruct) 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 *NinNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n58, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NidOptCustom) 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 *NidOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n59, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n60, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) 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 *CustomDash) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n61, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) 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 *NinOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n62, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n63, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) 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 *NidRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NinRepCustom) 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 *NinRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NinOptNativeUnion) 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 *NinOptNativeUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) 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 *NinOptStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n64, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n65, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) 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 *NinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n66, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n67, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + 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 *NinNestedStructUnion) 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 *NinNestedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n68, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field2.Size())) + n69, err := m.Field2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n70, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) 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 *Tree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Or.Size())) + n71, err := m.Or.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n72, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n73, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) 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 *OrBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n74, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n75, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) 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 *AndBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n76, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n77, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) 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 *Leaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value)) + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.StrValue))) + i += copy(dAtA[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) 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 *DeepTree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n78, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n79, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n79 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n80, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n80 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) 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 *ADeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n81, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n81 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) 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 *AndDeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n82, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n82 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n83, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n83 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) 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 *DeepLeaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Tree.Size())) + n84, err := m.Tree.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n84 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) 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 *Nil) 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 *NidOptEnum) 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 *NidOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) 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 *NinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) 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 *NidRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) 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 *NinRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) 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 *NinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) 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 *AnotherNinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) 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 *AnotherNinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) 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 *Timer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time1)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time2)) + i += 8 + if m.Data != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) 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 *MyExtendable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, 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 *OtherExtenable) 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 *OtherExtenable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.M.Size())) + n85, err := m.M.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field13)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, 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 *NestedDefinition) 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 *NestedDefinition) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n86, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.NM != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NM.Size())) + n87, err := m.NM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) 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 *NestedDefinition_NestedMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.NestedField1)) + i += 8 + } + if m.NNM != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n88, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.NestedNestedField1))) + i += copy(dAtA[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) 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 *NestedScope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.A.Size())) + n89, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n89 + } + if m.B != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.B)) + } + if m.C != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.C.Size())) + n90, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n90 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) 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 *NinOptNativeDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) 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 *CustomContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.CustomStruct.Size())) + n91, err := m.CustomStruct.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n91 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) 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 *CustomNameNidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FieldA)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.FieldB)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldD)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldE)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldF)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldI)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldJ)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldK)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldL)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldN))) + i += copy(dAtA[i:], m.FieldN) + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) 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 *CustomNameNinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldI)) + i += 4 + } + if m.FieldJ != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldJ)) + i += 4 + } + if m.FieldK != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FieldK)) + i += 8 + } + if m.FielL != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FielL)) + i += 8 + } + if m.FieldM != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldN != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldN))) + i += copy(dAtA[i:], *m.FieldN) + } + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) 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 *CustomNameNinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + dAtA[i] = 0x9 + i++ + f92 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f92)) + i += 8 + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x15 + i++ + f93 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f93)) + i += 4 + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + dAtA[i] = 0x38 + i++ + x94 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x94 >= 1<<7 { + dAtA[i] = uint8(uint64(x94)&0x7f | 0x80) + x94 >>= 7 + i++ + } + dAtA[i] = uint8(x94) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + dAtA[i] = 0x40 + i++ + x95 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x95 >= 1<<7 { + dAtA[i] = uint8(uint64(x95)&0x7f | 0x80) + x95 >>= 7 + i++ + } + dAtA[i] = uint8(x95) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + dAtA[i] = 0x72 + 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 len(m.FieldO) > 0 { + for _, b := range m.FieldO { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *CustomNameNinStruct) 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 *CustomNameNinStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC.Size())) + n96, err := m.FieldC.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n96 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldG.Size())) + n97, err := m.FieldG.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n97 + } + if m.FieldH != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldH { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldI != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldI))) + i += copy(dAtA[i:], *m.FieldI) + } + if m.FieldJ != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldJ))) + i += copy(dAtA[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) 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 *CustomNameCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n98, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + } + if m.FieldB != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldB.Size())) + n99, err := m.FieldB.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n99 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(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 *CustomNameNinEmbeddedStructUnion) 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 *CustomNameNinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n100, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n100 + } + if m.FieldA != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n101, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n101 + } + if m.FieldB != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.FieldB { + 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 *CustomNameEnum) 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 *CustomNameEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) 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 *NoExtensionsMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(dAtA[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) 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 *Unrecognized) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field1))) + i += copy(dAtA[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) 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 *UnrecognizedWithInner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) 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 *UnrecognizedWithInner_Inner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) 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 *UnrecognizedWithEmbed) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n102 + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) 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 *UnrecognizedWithEmbed_Embedded) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) 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 *Node) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Label))) + i += copy(dAtA[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NonByteCustomType) 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 *NonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n103, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n103 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptNonByteCustomType) 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 *NidOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n104, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n104 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNonByteCustomType) 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 *NinOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n105, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n105 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNonByteCustomType) 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 *NidRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(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 *NinRepNonByteCustomType) 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 *NinRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(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 *ProtoType) 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 *ProtoType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field2 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintThetest(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 NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) 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 ErrIntOverflowThetest + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field9 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field10 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field11 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field12 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNative) 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 ErrIntOverflowThetest + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepNative) 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 ErrIntOverflowThetest + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepNative) 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 ErrIntOverflowThetest + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptStruct) 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 ErrIntOverflowThetest + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptStruct) 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 ErrIntOverflowThetest + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepStruct) 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 ErrIntOverflowThetest + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepStruct) 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 ErrIntOverflowThetest + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidNestedStruct) 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 ErrIntOverflowThetest + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinNestedStruct) 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 ErrIntOverflowThetest + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptCustom) 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 ErrIntOverflowThetest + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomDash) 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 ErrIntOverflowThetest + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptCustom) 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 ErrIntOverflowThetest + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepCustom) 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 ErrIntOverflowThetest + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepCustom) 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 ErrIntOverflowThetest + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNativeUnion) 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 ErrIntOverflowThetest + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptStructUnion) 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 ErrIntOverflowThetest + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinNestedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Tree) 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 ErrIntOverflowThetest + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *OrBranch) 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 ErrIntOverflowThetest + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AndBranch) 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 ErrIntOverflowThetest + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Leaf) 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 ErrIntOverflowThetest + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *DeepTree) 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 ErrIntOverflowThetest + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *ADeepBranch) 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 ErrIntOverflowThetest + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AndDeepBranch) 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 ErrIntOverflowThetest + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *DeepLeaf) 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 ErrIntOverflowThetest + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Nil) 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 ErrIntOverflowThetest + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptEnum) 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 ErrIntOverflowThetest + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptEnum) 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 ErrIntOverflowThetest + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepEnum) 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 ErrIntOverflowThetest + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepEnum) 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 ErrIntOverflowThetest + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AnotherNinOptEnum) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Timer) 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 ErrIntOverflowThetest + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + m.Time1 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time1 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + m.Time2 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time2 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *MyExtendable) 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 ErrIntOverflowThetest + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *OtherExtenable) 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 ErrIntOverflowThetest + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedDefinition) 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 ErrIntOverflowThetest + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetest + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetest + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedScope) 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 ErrIntOverflowThetest + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNativeDefault) 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 ErrIntOverflowThetest + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomContainer) 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 ErrIntOverflowThetest + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNidOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldA = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldB = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + m.FieldI = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldI = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + m.FieldJ = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + m.FieldK = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldK = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + m.FieldL = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldL = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinRepNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldA) == 0 { + m.FieldA = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldB) == 0 { + m.FieldB = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.FieldH = append(m.FieldH, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.FieldH = append(m.FieldH, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldI) == 0 { + m.FieldI = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldJ) == 0 { + m.FieldJ = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldK) == 0 { + m.FieldK = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldL) == 0 { + m.FieldL = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinStruct) 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 ErrIntOverflowThetest + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], dAtA[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameCustomType) 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 ErrIntOverflowThetest + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-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 FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameEnum) 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 ErrIntOverflowThetest + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NoExtensionsMap) 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 ErrIntOverflowThetest + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Unrecognized) 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 ErrIntOverflowThetest + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-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 Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetest + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetest + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetest + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *ProtoType) 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 ErrIntOverflowThetest + } + 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: ProtoType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 skipThetest(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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrInvalidLengthThetest + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetest + } + 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 := skipThetest(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 ( + ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/thetest.proto", fileDescriptor_thetest_3e4f682cb8349b83) } + +var fileDescriptor_thetest_3e4f682cb8349b83 = []byte{ + // 3081 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0x15, 0xd6, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0xb6, 0x8c, 0xba, 0xa2, 0x37, + 0xb2, 0xca, 0x10, 0xb1, 0x44, 0x51, 0x94, 0x2c, 0x33, 0x4d, 0x0a, 0xf1, 0xc7, 0x8d, 0xdc, 0x88, + 0x32, 0x18, 0xb9, 0xad, 0x81, 0x02, 0x05, 0x25, 0xae, 0x45, 0xa2, 0xd2, 0x52, 0x20, 0x57, 0x69, + 0xdc, 0x43, 0x11, 0xe4, 0x50, 0x04, 0xbd, 0x16, 0x3d, 0xb6, 0x71, 0x51, 0x14, 0x48, 0x6f, 0x39, + 0x14, 0x45, 0x51, 0x14, 0x8d, 0x2f, 0x05, 0xd4, 0x9b, 0xd1, 0x53, 0x11, 0x14, 0x42, 0xc4, 0x5c, + 0x72, 0x0c, 0x7a, 0x69, 0x0e, 0x39, 0x14, 0xbb, 0x3b, 0x3b, 0x3b, 0x33, 0xdc, 0xe5, 0x2e, 0x2d, + 0xb9, 0xcd, 0xc5, 0x16, 0xe7, 0xbd, 0x37, 0xf3, 0xf6, 0x7d, 0xdf, 0x7b, 0xfb, 0x76, 0x66, 0xe0, + 0x6b, 0x7b, 0xed, 0xc3, 0xdd, 0x76, 0x77, 0x69, 0xb7, 0x6d, 0x36, 0x97, 0xcc, 0xa6, 0x6e, 0xea, + 0x5d, 0x73, 0xf1, 0xa8, 0xd3, 0x36, 0xdb, 0x72, 0x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0x73, + 0x9e, 0x7c, 0x45, 0xb9, 0x94, 0x42, 0xe9, 0x38, 0x2f, 0x5f, 0xf1, 0xe4, 0x79, 0x65, 0x2a, 0x85, + 0xd2, 0xe3, 0xbc, 0x3c, 0xef, 0xc9, 0x57, 0x95, 0xe9, 0x14, 0x4a, 0x4f, 0xf2, 0xf2, 0x55, 0xed, + 0x5d, 0x1b, 0x5e, 0xc3, 0x83, 0x77, 0x86, 0x87, 0x97, 0x02, 0x3b, 0xc3, 0x03, 0x4b, 0x21, 0x9d, + 0xe1, 0x21, 0xa5, 0x60, 0xce, 0xf0, 0x60, 0x52, 0x18, 0x67, 0x78, 0x18, 0x29, 0x80, 0x33, 0x3c, + 0x80, 0x14, 0xba, 0x19, 0x1e, 0x3a, 0x0a, 0xda, 0x0c, 0x0f, 0x1a, 0x85, 0x6b, 0x86, 0x87, 0x8b, + 0x02, 0xa5, 0x08, 0x40, 0x79, 0x10, 0x29, 0x02, 0x44, 0x1e, 0x38, 0x8a, 0x00, 0x8e, 0x07, 0x8b, + 0x22, 0xc0, 0xe2, 0x01, 0xa2, 0x08, 0x80, 0x78, 0x50, 0x28, 0x02, 0x14, 0x1e, 0x08, 0x24, 0xc7, + 0x6a, 0xfa, 0x91, 0x4f, 0x8e, 0xe1, 0x81, 0x39, 0x86, 0x07, 0xe6, 0x18, 0x1e, 0x98, 0x63, 0x78, + 0x60, 0x8e, 0xe1, 0x81, 0x39, 0x86, 0x07, 0xe6, 0x18, 0x1e, 0x98, 0x63, 0x78, 0x60, 0x8e, 0xe1, + 0xc1, 0x39, 0x86, 0x43, 0x72, 0x0c, 0x87, 0xe4, 0x18, 0x0e, 0xc9, 0x31, 0x1c, 0x92, 0x63, 0x38, + 0x24, 0xc7, 0x70, 0x60, 0x8e, 0x79, 0xf0, 0xce, 0xf0, 0xf0, 0xfa, 0xe6, 0x18, 0x0e, 0xc8, 0x31, + 0x1c, 0x90, 0x63, 0x38, 0x20, 0xc7, 0x70, 0x40, 0x8e, 0xe1, 0x80, 0x1c, 0xc3, 0x01, 0x39, 0x86, + 0x03, 0x72, 0x0c, 0x07, 0xe5, 0x18, 0x0e, 0xcc, 0x31, 0x1c, 0x98, 0x63, 0x38, 0x30, 0xc7, 0x70, + 0x60, 0x8e, 0xe1, 0xc0, 0x1c, 0xc3, 0x6c, 0x8e, 0xfd, 0x05, 0x83, 0xec, 0xe4, 0xd8, 0x9d, 0xfa, + 0xde, 0x8f, 0xf4, 0x06, 0x81, 0x42, 0x15, 0x32, 0x6d, 0xcc, 0x82, 0x2e, 0xe1, 0x41, 0xa2, 0x0a, + 0xb9, 0xc6, 0xcb, 0x73, 0x54, 0xee, 0x66, 0x1b, 0x2f, 0x5f, 0xa1, 0x72, 0x37, 0xdf, 0x78, 0x79, + 0x9e, 0xca, 0xdd, 0x8c, 0xe3, 0xe5, 0xab, 0x54, 0xee, 0xe6, 0x1c, 0x2f, 0x5f, 0xa3, 0x72, 0x37, + 0xeb, 0x78, 0xf9, 0x0d, 0x2a, 0x77, 0xf3, 0x8e, 0x97, 0xaf, 0x53, 0xb9, 0x9b, 0x79, 0xbc, 0xfc, + 0xa6, 0x9c, 0x12, 0x73, 0xcf, 0x55, 0xa0, 0xd0, 0xa6, 0xc4, 0xec, 0x13, 0x34, 0x96, 0x3d, 0x0d, + 0x37, 0xff, 0x04, 0x8d, 0x9c, 0xa7, 0xe1, 0x66, 0xa0, 0xa0, 0xb1, 0xa2, 0xbd, 0x67, 0xc3, 0x67, + 0x88, 0xf0, 0x25, 0x05, 0xf8, 0x24, 0x06, 0xba, 0xa4, 0x00, 0x9d, 0xc4, 0xc0, 0x96, 0x14, 0x60, + 0x93, 0x18, 0xc8, 0x92, 0x02, 0x64, 0x12, 0x03, 0x57, 0x52, 0x80, 0x4b, 0x62, 0xa0, 0x4a, 0x0a, + 0x50, 0x49, 0x0c, 0x4c, 0x49, 0x01, 0x26, 0x89, 0x81, 0x28, 0x29, 0x40, 0x24, 0x31, 0xf0, 0x24, + 0x05, 0x78, 0x24, 0x06, 0x9a, 0x59, 0x11, 0x1a, 0x89, 0x85, 0x65, 0x56, 0x84, 0x45, 0x62, 0x21, + 0x99, 0x15, 0x21, 0x91, 0x58, 0x38, 0x66, 0x45, 0x38, 0x24, 0x16, 0x8a, 0x2f, 0x25, 0xb7, 0x23, + 0x7c, 0xd3, 0xec, 0x1c, 0xef, 0x99, 0xe7, 0xea, 0x08, 0xb3, 0x5c, 0xfb, 0x30, 0x91, 0x93, 0x17, + 0xed, 0x86, 0x95, 0xed, 0x38, 0x85, 0x37, 0x58, 0x96, 0x6b, 0x2c, 0x18, 0x0b, 0xc3, 0xdf, 0x22, + 0x7f, 0xae, 0xde, 0x30, 0xcb, 0xb5, 0x19, 0xe1, 0xfe, 0xad, 0x3f, 0xf5, 0x8e, 0xed, 0x91, 0xe4, + 0x76, 0x6c, 0x24, 0xfc, 0xc3, 0x76, 0x6c, 0x99, 0xf0, 0x90, 0xd3, 0x60, 0x67, 0xc2, 0x83, 0xdd, + 0xf7, 0xd6, 0x89, 0xda, 0xc1, 0x65, 0xc2, 0x43, 0x4b, 0x83, 0x7a, 0xb1, 0xfd, 0x16, 0x61, 0x70, + 0x4d, 0x3f, 0xf2, 0x61, 0xf0, 0xb0, 0xfd, 0x56, 0x96, 0x2b, 0x25, 0xc3, 0x32, 0x18, 0x0f, 0xcd, + 0xe0, 0x61, 0x3b, 0xaf, 0x2c, 0x57, 0x5e, 0x86, 0x66, 0xf0, 0x53, 0xe8, 0x87, 0x08, 0x83, 0xbd, + 0xf0, 0x0f, 0xdb, 0x0f, 0x65, 0xc2, 0x43, 0xee, 0xcb, 0x60, 0x3c, 0x04, 0x83, 0xa3, 0xf4, 0x47, + 0x99, 0xf0, 0xd0, 0xfa, 0x33, 0xf8, 0xdc, 0xdd, 0xcc, 0xfb, 0x08, 0x2e, 0x57, 0x5b, 0x8d, 0xca, + 0xe1, 0xae, 0xde, 0x68, 0xe8, 0x0d, 0x12, 0xc7, 0x2c, 0x57, 0x09, 0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xe9, 0xa6, 0x38, 0x99, 0x47, 0x36, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/combos/both/thetest.proto b/deps/github.com/gogo/protobuf/test/combos/both/thetest.proto new file mode 100644 index 000000000..70d33c47f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/both/thetest.proto @@ -0,0 +1,649 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go b/deps/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go new file mode 100644 index 000000000..65a41a668 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go @@ -0,0 +1,17878 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/combos/both/uuid.go b/deps/github.com/gogo/protobuf/test/combos/both/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/both/uuid.go @@ -0,0 +1,137 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/deps/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go b/deps/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go @@ -0,0 +1,252 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/deps/github.com/gogo/protobuf/test/combos/marshaler/t.go b/deps/github.com/gogo/protobuf/test/combos/marshaler/t.go new file mode 100644 index 000000000..4112884ac --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/marshaler/t.go @@ -0,0 +1,77 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) MarshalTo(data []byte) (n int, err error) { + return r.protoType().MarshalTo(data) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go b/deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go new file mode 100644 index 000000000..a9df41a02 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go @@ -0,0 +1,31475 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNative.Unmarshal(m, b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return m.Size() +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNative.Unmarshal(m, b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNative.Unmarshal(m, b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNative.Unmarshal(m, b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepPackedNative.Unmarshal(m, b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepPackedNative.Unmarshal(m, b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptStruct.Unmarshal(m, b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStruct.Unmarshal(m, b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepStruct.Unmarshal(m, b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepStruct.Unmarshal(m, b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidEmbeddedStruct.Unmarshal(m, b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStruct.Unmarshal(m, b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidNestedStruct.Unmarshal(m, b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStruct.Unmarshal(m, b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptCustom.Unmarshal(m, b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomDash.Unmarshal(m, b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return m.Size() +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptCustom.Unmarshal(m, b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepCustom.Unmarshal(m, b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepCustom.Unmarshal(m, b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeUnion.Unmarshal(m, b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStructUnion.Unmarshal(m, b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStructUnion.Unmarshal(m, b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tree.Unmarshal(m, b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return m.Size() +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrBranch.Unmarshal(m, b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return m.Size() +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndBranch.Unmarshal(m, b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return m.Size() +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Leaf.Unmarshal(m, b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return m.Size() +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepTree.Unmarshal(m, b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return m.Size() +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ADeepBranch.Unmarshal(m, b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return m.Size() +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndDeepBranch.Unmarshal(m, b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return m.Size() +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepLeaf.Unmarshal(m, b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return m.Size() +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nil.Unmarshal(m, b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return m.Size() +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptEnum.Unmarshal(m, b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnum.Unmarshal(m, b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepEnum.Unmarshal(m, b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepEnum.Unmarshal(m, b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnumDefault.Unmarshal(m, b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnum.Unmarshal(m, b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnumDefault.Unmarshal(m, b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Timer.Unmarshal(m, b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return m.Size() +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyExtendable.Unmarshal(m, b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return m.Size() +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherExtenable.Unmarshal(m, b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return m.Size() +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition.Unmarshal(m, b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedScope.Unmarshal(m, b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return m.Size() +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeDefault.Unmarshal(m, b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomContainer.Unmarshal(m, b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return m.Size() +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNidOptNative.Unmarshal(m, b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinOptNative.Unmarshal(m, b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinRepNative.Unmarshal(m, b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinStruct.Unmarshal(m, b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameCustomType.Unmarshal(m, b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return m.Size() +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameEnum.Unmarshal(m, b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return m.Size() +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NoExtensionsMap.Unmarshal(m, b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return m.Size() +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Unrecognized.Unmarshal(m, b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return m.Size() +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Node.Unmarshal(m, b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return m.Size() +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonByteCustomType.Unmarshal(m, b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoType.Unmarshal(m, b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return m.Size() +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "combos/marshaler/thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6649 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x7b, 0x6c, 0x1c, 0xd7, + 0x79, 0x2f, 0x67, 0x67, 0x49, 0x2d, 0x3f, 0xbe, 0x86, 0x43, 0x89, 0x5a, 0xd3, 0xf2, 0x52, 0x5a, + 0xcb, 0x32, 0xcd, 0xd8, 0x14, 0x45, 0x51, 0xaf, 0x55, 0x6c, 0xdf, 0x7d, 0x49, 0xa6, 0x42, 0x2e, + 0x99, 0x21, 0x19, 0x5b, 0xc9, 0xbd, 0x58, 0x8c, 0x76, 0x0f, 0xc9, 0xb5, 0x77, 0x67, 0x36, 0x3b, + 0x43, 0xdb, 0x34, 0x2e, 0x2e, 0x7c, 0x93, 0x7b, 0x73, 0x93, 0x7b, 0x71, 0xfb, 0x4a, 0x8b, 0x26, + 0x69, 0xe2, 0x38, 0x2d, 0xd2, 0x38, 0xe9, 0x2b, 0x69, 0xd2, 0x34, 0x09, 0x8a, 0xc6, 0xff, 0xa4, + 0x55, 0x81, 0xa2, 0x70, 0xfa, 0x57, 0x11, 0x14, 0x46, 0x2c, 0x07, 0x68, 0xda, 0xba, 0x4d, 0x9a, + 0x1a, 0x68, 0x00, 0xe7, 0x8f, 0xe2, 0xbc, 0x66, 0xe6, 0x9c, 0x9d, 0xe5, 0x0c, 0x2d, 0xdb, 0xc9, + 0x3f, 0xd2, 0xee, 0xf9, 0xbe, 0xdf, 0x37, 0xdf, 0xf9, 0x5e, 0xe7, 0x9b, 0x73, 0x0e, 0x17, 0x7e, + 0x74, 0x09, 0x8e, 0x6f, 0xdb, 0xf6, 0x76, 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d5, 0xca, 0x84, 0x9a, + 0x27, 0x44, 0x7d, 0x16, 0xc6, 0xed, 0x1b, 0x8f, 0xd7, 0x68, 0x48, 0x56, 0xdb, 0x1d, 0xb4, 0xd5, + 0x78, 0x3a, 0x7d, 0x92, 0xd8, 0x77, 0x0c, 0x13, 0x48, 0x40, 0xae, 0x91, 0x61, 0xfd, 0x3e, 0xd0, + 0x6a, 0xce, 0x8e, 0xd9, 0x69, 0x93, 0x9a, 0xec, 0xb4, 0xcd, 0x1a, 0x4a, 0xdf, 0x43, 0x59, 0xe9, + 0x78, 0x85, 0x0f, 0xe3, 0x94, 0x70, 0x9e, 0x6a, 0x6c, 0xb9, 0x5c, 0xe2, 0xbd, 0x34, 0x25, 0xc8, + 0x18, 0x93, 0x36, 0x03, 0x1a, 0x36, 0x85, 0xf0, 0xe0, 0x19, 0xc2, 0x36, 0xda, 0xde, 0x69, 0x07, + 0x9f, 0x7b, 0x37, 0x8c, 0x60, 0x4e, 0xff, 0xa1, 0xf7, 0xd1, 0x86, 0xac, 0xbd, 0x13, 0x78, 0xe2, + 0xdb, 0xd6, 0x1b, 0x67, 0x73, 0x30, 0x1c, 0x8c, 0x4f, 0x7d, 0x10, 0x68, 0x84, 0x6a, 0x0a, 0x6e, + 0x56, 0x8a, 0xab, 0x25, 0xdc, 0x66, 0xbc, 0xbf, 0xac, 0x25, 0x70, 0xbb, 0xb3, 0xbc, 0xb4, 0x51, + 0xae, 0x1a, 0x9b, 0x95, 0x8d, 0xa5, 0x95, 0xb2, 0xa6, 0x06, 0xfb, 0xea, 0xef, 0x24, 0x60, 0x54, + 0x7c, 0x45, 0xd2, 0xdf, 0x0d, 0x47, 0xf9, 0x7e, 0x86, 0x83, 0xdc, 0xea, 0x53, 0x8d, 0x0e, 0x49, + 0x99, 0x96, 0x49, 0x97, 0x2f, 0xcf, 0x69, 0x87, 0x19, 0xd7, 0x3a, 0x72, 0x1f, 0x6d, 0x74, 0x70, + 0x42, 0xb4, 0x4c, 0x57, 0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0x48, 0xb8, 0xc9, 0x14, 0xf1, 0xf8, 0x73, 0xef, 0x83, 0xc3, 0xf8, + 0x33, 0x29, 0x4b, 0x41, 0x4d, 0xa2, 0x37, 0xbc, 0xd2, 0xdf, 0xfd, 0x30, 0x4d, 0xc7, 0x09, 0x4f, + 0x40, 0x40, 0xa7, 0x80, 0x17, 0xb7, 0x91, 0xeb, 0xa2, 0x8e, 0x53, 0x35, 0x9b, 0x61, 0xea, 0x05, + 0x76, 0x0c, 0xd2, 0x9f, 0x7c, 0x4d, 0xf4, 0xe2, 0x55, 0x8a, 0xcc, 0x37, 0x9b, 0xb9, 0x4d, 0x38, + 0x1a, 0x12, 0x15, 0x31, 0x64, 0x7e, 0x8a, 0xc9, 0x3c, 0xdc, 0x15, 0x19, 0x58, 0xec, 0x1a, 0xf0, + 0x71, 0xcf, 0x97, 0x31, 0x64, 0xfe, 0x16, 0x93, 0xa9, 0x33, 0x2c, 0x77, 0x29, 0x96, 0x78, 0x0d, + 0xc6, 0x9f, 0x44, 0x9d, 0x1b, 0xb6, 0xc3, 0x76, 0x69, 0x62, 0x88, 0xfb, 0x34, 0x13, 0x37, 0xc6, + 0x80, 0x64, 0xdb, 0x06, 0xcb, 0xba, 0x04, 0xa9, 0x2d, 0xb3, 0x86, 0x62, 0x88, 0xf8, 0x0c, 0x13, + 0x71, 0x08, 0xf3, 0x63, 0x68, 0x1e, 0x86, 0xb7, 0x6d, 0xb6, 0x32, 0x45, 0xc3, 0x9f, 0x63, 0xf0, + 0x21, 0x8e, 0x61, 0x22, 0xda, 0x76, 0x7b, 0xb7, 0x89, 0x97, 0xad, 0x68, 0x11, 0x9f, 0xe5, 0x22, + 0x38, 0x86, 0x89, 0x38, 0x80, 0x59, 0x9f, 0xe7, 0x22, 0x9c, 0x80, 0x3d, 0x1f, 0x86, 0x21, 0xdb, + 0x6a, 0xee, 0xd9, 0x56, 0x1c, 0x25, 0x3e, 0xc7, 0x24, 0x00, 0x83, 0x60, 0x01, 0x97, 0x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39, + 0x7b, 0x1d, 0x06, 0x3d, 0x8d, 0xde, 0x62, 0xd1, 0x25, 0x3a, 0x35, 0x7d, 0x2a, 0xb8, 0x9e, 0xf0, + 0x7d, 0x4b, 0x3a, 0xa4, 0x1f, 0x87, 0xd4, 0xba, 0xdb, 0xf1, 0x8b, 0x3e, 0xef, 0x48, 0xbd, 0xd1, + 0xec, 0x87, 0x14, 0x48, 0x95, 0x10, 0x6a, 0x13, 0x83, 0xdf, 0x03, 0xc9, 0x92, 0xfd, 0x94, 0xc5, + 0x14, 0x1c, 0x67, 0x16, 0xc5, 0x64, 0x66, 0x53, 0x42, 0xd6, 0xef, 0x09, 0xda, 0x7d, 0xc2, 0xb3, + 0x7b, 0x80, 0x8f, 0xd8, 0x3e, 0x2b, 0xd8, 0x9e, 0x39, 0x10, 0x33, 0x75, 0xd9, 0xff, 0x02, 0x0c, + 0x05, 0x9e, 0xa2, 0xcf, 0x30, 0x35, 0x12, 0x32, 0x30, 0x68, 0x2b, 0xcc, 0x91, 0x45, 0x30, 0x22, + 0x3c, 0x18, 0x43, 0x03, 0x26, 0xee, 0x01, 0x25, 0x66, 0x9e, 0x15, 0xcd, 0x1c, 0xce, 0xca, 0x4c, + 0x3d, 0x4f, 0x6d, 0x44, 0xcc, 0x7d, 0x92, 0x06, 0x67, 0x6f, 0x27, 0xe2, 0xcf, 0xd9, 0x7e, 0x50, + 0x2b, 0x8d, 0x66, 0xf6, 0x41, 0x00, 0x9a, 0xf2, 0x65, 0x6b, 0xb7, 0x25, 0x65, 0xdd, 0x28, 0x37, + 0xf0, 0xc6, 0x0e, 0xda, 0x40, 0x0e, 0x61, 0x11, 0xfb, 0x29, 0x5c, 0x60, 0x80, 0xa6, 0x18, 0xc1, + 0xdf, 0x17, 0x89, 0x0f, 0xed, 0xc4, 0x30, 0x6b, 0x9a, 0xb2, 0x5e, 0x47, 0x6e, 0xde, 0xb2, 0xdd, + 0x1d, 0xd4, 0x91, 0x10, 0x0b, 0xfa, 0x59, 0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b, 0x85, 0x1b, 0x84, 0x84, 0x5a, 0x56, 0x0a, 0x35, 0x08, 0x09, 0xb3, 0xac, 0x14, 0x66, + 0x10, 0x12, 0x62, 0x59, 0x29, 0xc4, 0x20, 0x24, 0xbc, 0xb2, 0x52, 0x78, 0x41, 0x48, 0x68, 0x9d, + 0x94, 0x43, 0x0b, 0xc2, 0xc2, 0xea, 0xa4, 0x1c, 0x56, 0x10, 0x16, 0x52, 0x77, 0xcb, 0x21, 0x35, + 0x78, 0xeb, 0xe5, 0xe9, 0x7e, 0x3c, 0x14, 0x88, 0xa6, 0x93, 0x72, 0x34, 0x41, 0x58, 0x24, 0x9d, + 0x94, 0x23, 0x09, 0xc2, 0xa2, 0xe8, 0xa4, 0x1c, 0x45, 0x10, 0x16, 0x41, 0x2f, 0xca, 0x11, 0xe4, + 0xdf, 0xf1, 0xc9, 0x4a, 0x47, 0x8a, 0x51, 0x11, 0xa4, 0xc6, 0x88, 0x20, 0x35, 0x46, 0x04, 0xa9, + 0x31, 0x22, 0x48, 0x8d, 0x11, 0x41, 0x6a, 0x8c, 0x08, 0x52, 0x63, 0x44, 0x90, 0x1a, 0x23, 0x82, + 0xd4, 0x38, 0x11, 0xa4, 0xc6, 0x8a, 0x20, 0xb5, 0x57, 0x04, 0x9d, 0x94, 0x6f, 0x3c, 0x40, 0x58, + 0x41, 0x3a, 0x29, 0x1f, 0x7d, 0x46, 0x87, 0x90, 0x1a, 0x2b, 0x84, 0xd4, 0x5e, 0x21, 0xf4, 0x6d, + 0x15, 0x26, 0x84, 0x10, 0x62, 0xe7, 0x43, 0x6f, 0x55, 0x05, 0x3a, 0x1f, 0xe3, 0x82, 0x45, 0x58, + 0x4c, 0x9d, 0x8f, 0x71, 0x48, 0xbd, 0x5f, 0x9c, 0x75, 0x57, 0xa1, 0x72, 0x8c, 0x2a, 0x74, 0xc5, + 0x8b, 0xa1, 0xf3, 0x31, 0x2e, 0x5e, 0x74, 0xc7, 0xde, 0xc5, 0xfd, 0x8a,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x7e, 0x8a, 0x85, 0xbd, 0x47, 0x86, 0xb2, 0xcf, 0x91, 0x7f, 0x0d, 0x0f, 0x22, 0xed, 0x82, 0xf0, + 0xc7, 0x2e, 0x4c, 0xdd, 0x03, 0xfd, 0x54, 0xbe, 0xa8, 0xd7, 0x88, 0xa4, 0xd7, 0xe7, 0x43, 0xf4, + 0x22, 0x71, 0xa4, 0x5f, 0x13, 0xf4, 0x0a, 0xbc, 0xae, 0x86, 0xb2, 0xcf, 0xf1, 0xe0, 0x2b, 0xa4, + 0x70, 0xff, 0x47, 0x22, 0x2a, 0x5a, 0xc9, 0x19, 0x48, 0x95, 0x65, 0x9e, 0x70, 0x3d, 0x4b, 0x90, + 0xac, 0xd8, 0x75, 0xf2, 0x23, 0x31, 0xe4, 0x57, 0x91, 0x99, 0x91, 0xd9, 0x4f, 0x24, 0x9f, 0x82, + 0x54, 0x71, 0xa7, 0xd1, 0xac, 0x77, 0x90, 0xc5, 0xce, 0xec, 0xd9, 0x16, 0x3a, 0xc6, 0x18, 0x1e, + 0x2d, 0x5b, 0x84, 0xf1, 0x8a, 0x6d, 0x15, 0xf6, 0xdc, 0x60, 0xdd, 0x98, 0x93, 0x52, 0x84, 0x9d, + 0xf9, 0x90, 0x3f, 0x06, 0xc1, 0x0c, 0x85, 0xfe, 0xef, 0xbd, 0x3c, 0xad, 0x6c, 0x78, 0xfb, 0xe7, + 0x2b, 0x70, 0x94, 0xa5, 0x4f, 0x97, 0xa8, 0x85, 0x28, 0x51, 0x83, 0xec, 0x9c, 0x3a, 0x20, 0x6e, + 0x09, 0x8b, 0xb3, 0x42, 0xc5, 0xbd, 0x39, 0xcd, 0x70, 0x53, 0xb4, 0xaf, 0x66, 0xea, 0x81, 0x34, + 0x0b, 0x15, 0x37, 0x17, 0x25, 0x4e, 0xd2, 0xec, 0x6e, 0x18, 0xf4, 0x68, 0x81, 0x68, 0x08, 0x66, + 0xca, 0xc2, 0x6c, 0x16, 0x86, 0x02, 0x09, 0xab, 0xf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+ 0xbc, 0xb0, 0x71, 0xf3, 0x95, 0x4c, 0xdf, 0x4b, 0xaf, 0x64, 0xfa, 0xfe, 0xee, 0x95, 0x4c, 0xdf, + 0xf7, 0x5f, 0xc9, 0x28, 0x3f, 0x7c, 0x25, 0xa3, 0xfc, 0xf8, 0x95, 0x8c, 0xf2, 0xd3, 0x57, 0x32, + 0xca, 0xb3, 0xb7, 0x32, 0xca, 0x0b, 0xb7, 0x32, 0xca, 0x97, 0x6f, 0x65, 0x94, 0x6f, 0xdc, 0xca, + 0x28, 0x2f, 0xde, 0xca, 0x28, 0x37, 0x6f, 0x65, 0x94, 0x97, 0x6e, 0x65, 0xfa, 0xbe, 0x7f, 0x2b, + 0xa3, 0xfc, 0xf0, 0x56, 0xa6, 0xef, 0xc7, 0xb7, 0x32, 0xca, 0x4f, 0x6f, 0x65, 0xfa, 0x9e, 0x7d, + 0x35, 0xd3, 0xf7, 0xfc, 0xab, 0x99, 0xbe, 0x17, 0x5e, 0xcd, 0x28, 0xff, 0x19, 0x00, 0x00, 0xff, + 0xff, 0xef, 0x11, 0xb7, 0xc0, 0x69, 0x67, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringThetest(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringThetest(m github_com_gogo_protobuf_proto.Message) string { + e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) + if e == nil { + return "nil" + } + s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "})" + return s +} +func (m *NidOptNative) 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 *NidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field5)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) 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 *NidRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f2 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + dAtA[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + dAtA[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + dAtA[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + dAtA[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NinRepNative) 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 *NinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f5 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f6 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f6)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x7 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x7 >= 1<<7 { + dAtA[i] = uint8(uint64(x7)&0x7f | 0x80) + x7 >>= 7 + i++ + } + dAtA[i] = uint8(x7) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x8 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x8 >= 1<<7 { + dAtA[i] = uint8(uint64(x8)&0x7f | 0x80) + x8 >>= 7 + i++ + } + dAtA[i] = uint8(x8) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NidRepPackedNative) 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 *NidRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f9 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f10 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f10)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA12 := make([]byte, len(m.Field3)*10) + var j11 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + dAtA12[j11] = uint8(num) + j11++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j11)) + i += copy(dAtA[i:], dAtA12[:j11]) + } + if len(m.Field4) > 0 { + dAtA14 := make([]byte, len(m.Field4)*10) + var j13 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j13++ + } + dAtA14[j13] = uint8(num) + j13++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j13)) + i += copy(dAtA[i:], dAtA14[:j13]) + } + if len(m.Field5) > 0 { + dAtA16 := make([]byte, len(m.Field5)*10) + var j15 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + dAtA16[j15] = uint8(num) + j15++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j15)) + i += copy(dAtA[i:], dAtA16[:j15]) + } + if len(m.Field6) > 0 { + dAtA18 := make([]byte, len(m.Field6)*10) + var j17 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j17++ + } + dAtA18[j17] = uint8(num) + j17++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j17)) + i += copy(dAtA[i:], dAtA18[:j17]) + } + if len(m.Field7) > 0 { + dAtA19 := make([]byte, len(m.Field7)*5) + var j20 int + for _, num := range m.Field7 { + x21 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x21 >= 1<<7 { + dAtA19[j20] = uint8(uint64(x21)&0x7f | 0x80) + j20++ + x21 >>= 7 + } + dAtA19[j20] = uint8(x21) + j20++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j20)) + i += copy(dAtA[i:], dAtA19[:j20]) + } + if len(m.Field8) > 0 { + var j22 int + dAtA24 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x23 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x23 >= 1<<7 { + dAtA24[j22] = uint8(uint64(x23)&0x7f | 0x80) + j22++ + x23 >>= 7 + } + dAtA24[j22] = uint8(x23) + j22++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j22)) + i += copy(dAtA[i:], dAtA24[:j22]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + 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 *NinRepPackedNative) 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 *NinRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f25 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f25)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f26 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f26)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA28 := make([]byte, len(m.Field3)*10) + var j27 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j27++ + } + dAtA28[j27] = uint8(num) + j27++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j27)) + i += copy(dAtA[i:], dAtA28[:j27]) + } + if len(m.Field4) > 0 { + dAtA30 := make([]byte, len(m.Field4)*10) + var j29 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j29++ + } + dAtA30[j29] = uint8(num) + j29++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j29)) + i += copy(dAtA[i:], dAtA30[:j29]) + } + if len(m.Field5) > 0 { + dAtA32 := make([]byte, len(m.Field5)*10) + var j31 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA32[j31] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j31++ + } + dAtA32[j31] = uint8(num) + j31++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j31)) + i += copy(dAtA[i:], dAtA32[:j31]) + } + if len(m.Field6) > 0 { + dAtA34 := make([]byte, len(m.Field6)*10) + var j33 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA34[j33] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j33++ + } + dAtA34[j33] = uint8(num) + j33++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j33)) + i += copy(dAtA[i:], dAtA34[:j33]) + } + if len(m.Field7) > 0 { + dAtA35 := make([]byte, len(m.Field7)*5) + var j36 int + for _, num := range m.Field7 { + x37 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x37 >= 1<<7 { + dAtA35[j36] = uint8(uint64(x37)&0x7f | 0x80) + j36++ + x37 >>= 7 + } + dAtA35[j36] = uint8(x37) + j36++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j36)) + i += copy(dAtA[i:], dAtA35[:j36]) + } + if len(m.Field8) > 0 { + var j38 int + dAtA40 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x39 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x39 >= 1<<7 { + dAtA40[j38] = uint8(uint64(x39)&0x7f | 0x80) + j38++ + x39 >>= 7 + } + dAtA40[j38] = uint8(x39) + j38++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j38)) + i += copy(dAtA[i:], dAtA40[:j38]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + 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 *NidOptStruct) 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 *NidOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n41, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n42, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n43, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) 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 *NinOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n44, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n45, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n46, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) 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 *NidRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f47 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f47)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f48 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f48)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x49 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x49 >= 1<<7 { + dAtA[i] = uint8(uint64(x49)&0x7f | 0x80) + x49 >>= 7 + i++ + } + dAtA[i] = uint8(x49) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NinRepStruct) 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 *NinRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f50 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f50)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f51 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f51)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x52 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x52 >= 1<<7 { + dAtA[i] = uint8(uint64(x52)&0x7f | 0x80) + x52 >>= 7 + i++ + } + dAtA[i] = uint8(x52) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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 len(m.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *NidEmbeddedStruct) 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 *NidEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n53, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n54, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if m.Field210 { + 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 *NinEmbeddedStruct) 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 *NinEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n55, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n56, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + 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 *NidNestedStruct) 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 *NidNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n57, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NinNestedStruct) 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 *NinNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n58, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NidOptCustom) 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 *NidOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n59, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n60, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) 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 *CustomDash) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n61, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) 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 *NinOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n62, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n63, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) 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 *NidRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NinRepCustom) 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 *NinRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NinOptNativeUnion) 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 *NinOptNativeUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) 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 *NinOptStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n64, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n65, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) 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 *NinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n66, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n67, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + 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 *NinNestedStructUnion) 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 *NinNestedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n68, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field2.Size())) + n69, err := m.Field2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n70, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) 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 *Tree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Or.Size())) + n71, err := m.Or.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n72, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n73, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) 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 *OrBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n74, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n75, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) 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 *AndBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n76, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n77, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) 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 *Leaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value)) + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.StrValue))) + i += copy(dAtA[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) 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 *DeepTree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n78, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n79, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n79 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n80, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n80 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) 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 *ADeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n81, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n81 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) 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 *AndDeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n82, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n82 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n83, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n83 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) 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 *DeepLeaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Tree.Size())) + n84, err := m.Tree.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n84 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) 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 *Nil) 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 *NidOptEnum) 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 *NidOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) 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 *NinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) 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 *NidRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) 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 *NinRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) 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 *NinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) 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 *AnotherNinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) 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 *AnotherNinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) 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 *Timer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time1)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time2)) + i += 8 + if m.Data != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) 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 *MyExtendable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, 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 *OtherExtenable) 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 *OtherExtenable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.M.Size())) + n85, err := m.M.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field13)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, 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 *NestedDefinition) 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 *NestedDefinition) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n86, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.NM != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NM.Size())) + n87, err := m.NM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) 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 *NestedDefinition_NestedMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.NestedField1)) + i += 8 + } + if m.NNM != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n88, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.NestedNestedField1))) + i += copy(dAtA[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) 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 *NestedScope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.A.Size())) + n89, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n89 + } + if m.B != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.B)) + } + if m.C != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.C.Size())) + n90, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n90 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) 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 *NinOptNativeDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) 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 *CustomContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.CustomStruct.Size())) + n91, err := m.CustomStruct.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n91 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) 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 *CustomNameNidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FieldA)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.FieldB)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldD)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldE)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldF)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldI)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldJ)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldK)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldL)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldN))) + i += copy(dAtA[i:], m.FieldN) + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) 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 *CustomNameNinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldI)) + i += 4 + } + if m.FieldJ != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldJ)) + i += 4 + } + if m.FieldK != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FieldK)) + i += 8 + } + if m.FielL != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FielL)) + i += 8 + } + if m.FieldM != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldN != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldN))) + i += copy(dAtA[i:], *m.FieldN) + } + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) 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 *CustomNameNinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + dAtA[i] = 0x9 + i++ + f92 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f92)) + i += 8 + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x15 + i++ + f93 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f93)) + i += 4 + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + dAtA[i] = 0x38 + i++ + x94 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x94 >= 1<<7 { + dAtA[i] = uint8(uint64(x94)&0x7f | 0x80) + x94 >>= 7 + i++ + } + dAtA[i] = uint8(x94) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + dAtA[i] = 0x40 + i++ + x95 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x95 >= 1<<7 { + dAtA[i] = uint8(uint64(x95)&0x7f | 0x80) + x95 >>= 7 + i++ + } + dAtA[i] = uint8(x95) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + dAtA[i] = 0x72 + 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 len(m.FieldO) > 0 { + for _, b := range m.FieldO { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(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 (m *CustomNameNinStruct) 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 *CustomNameNinStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC.Size())) + n96, err := m.FieldC.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n96 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldG.Size())) + n97, err := m.FieldG.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n97 + } + if m.FieldH != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldH { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldI != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldI))) + i += copy(dAtA[i:], *m.FieldI) + } + if m.FieldJ != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldJ))) + i += copy(dAtA[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) 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 *CustomNameCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n98, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + } + if m.FieldB != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldB.Size())) + n99, err := m.FieldB.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n99 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(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 *CustomNameNinEmbeddedStructUnion) 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 *CustomNameNinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n100, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n100 + } + if m.FieldA != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n101, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n101 + } + if m.FieldB != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.FieldB { + 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 *CustomNameEnum) 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 *CustomNameEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) 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 *NoExtensionsMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(dAtA[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) 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 *Unrecognized) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field1))) + i += copy(dAtA[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) 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 *UnrecognizedWithInner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) 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 *UnrecognizedWithInner_Inner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) 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 *UnrecognizedWithEmbed) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n102 + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) 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 *UnrecognizedWithEmbed_Embedded) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) 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 *Node) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Label))) + i += copy(dAtA[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(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 *NonByteCustomType) 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 *NonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n103, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n103 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptNonByteCustomType) 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 *NidOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n104, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n104 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNonByteCustomType) 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 *NinOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n105, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n105 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNonByteCustomType) 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 *NidRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(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 *NinRepNonByteCustomType) 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 *NinRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(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 *ProtoType) 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 *ProtoType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field2 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintThetest(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 NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} + +func init() { + proto.RegisterFile("combos/marshaler/thetest.proto", fileDescriptor_thetest_0843136744e013f8) +} + +var fileDescriptor_thetest_0843136744e013f8 = []byte{ + // 3086 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, + 0xd5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0x16, 0x8c, 0xbe, 0x15, 0xbd, + 0x91, 0xf5, 0x31, 0x44, 0x2c, 0x51, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0x46, 0x6e, + 0x44, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x16, 0xd7, 0x22, 0x51, 0x69, 0x29, 0x90, 0xab, + 0x34, 0xee, 0xa1, 0x08, 0x72, 0x28, 0x82, 0x5e, 0x8b, 0x1e, 0xdb, 0xb8, 0x28, 0x0a, 0xa4, 0xb7, + 0x1c, 0x8a, 0xa2, 0x28, 0x8a, 0xc6, 0x97, 0x02, 0xea, 0xcd, 0xe8, 0xa9, 0x08, 0x0a, 0x21, 0x62, + 0x2e, 0x39, 0x06, 0xbd, 0x34, 0x87, 0x1c, 0x8a, 0xdd, 0x9d, 0x9d, 0x9d, 0x19, 0xee, 0x72, 0x97, + 0x96,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xd2, 0x0d, 0x2a, 0xbd, 0xa9, 0x4c, 0xa4, 0x51, 0xe6, 0x19, + 0x4e, 0x7a, 0x53, 0x56, 0xe1, 0x19, 0xe7, 0xc9, 0x73, 0x0a, 0xa4, 0x51, 0x66, 0x86, 0x88, 0xdd, + 0x41, 0x4f, 0xbe, 0xa2, 0x4c, 0xa6, 0x51, 0x66, 0x9c, 0x97, 0xaf, 0x78, 0xf2, 0xbc, 0x32, 0x95, + 0x46, 0x99, 0x24, 0x2f, 0xcf, 0x7b, 0xf2, 0x55, 0xe5, 0x52, 0x1a, 0x65, 0x12, 0xbc, 0x7c, 0xd5, + 0x93, 0x17, 0x94, 0xe9, 0x34, 0xca, 0x4c, 0xf0, 0xf2, 0x82, 0x27, 0x5f, 0x53, 0x66, 0xd2, 0x28, + 0x33, 0xc5, 0xcb, 0xd7, 0xb4, 0x77, 0x6d, 0x78, 0x0d, 0x0f, 0xde, 0x59, 0x1e, 0x5e, 0x0a, 0xec, + 0x2c, 0x0f, 0x2c, 0x85, 0x74, 0x96, 0x87, 0x94, 0x82, 0x39, 0xcb, 0x83, 0x49, 0x61, 0x9c, 0xe5, + 0x61, 0xa4, 0x00, 0xce, 0xf2, 0x00, 0x52, 0xe8, 0x66, 0x79, 0xe8, 0x28, 0x68, 0xb3, 0x3c, 0x68, + 0x14, 0xae, 0x59, 0x1e, 0x2e, 0x0a, 0x94, 0x22, 0x00, 0xe5, 0x41, 0xa4, 0x08, 0x10, 0x79, 0xe0, + 0x28, 0x02, 0x38, 0x1e, 0x2c, 0x8a, 0x00, 0x8b, 0x07, 0x88, 0x22, 0x00, 0xe2, 0x41, 0xa1, 0x08, + 0x50, 0x78, 0x20, 0x90, 0x1c, 0xab, 0xeb, 0x47, 0x3e, 0x39, 0x86, 0x87, 0xe6, 0x18, 0x1e, 0x9a, + 0x63, 0x78, 0x68, 0x8e, 0xe1, 0xa1, 0x39, 0x86, 0x87, 0xe6, 0x18, 0x1e, 0x9a, 0x63, 0x78, 0x68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 0x21, 0xc2, 0x97, 0x12, 0xe0, 0x93, 0x18, 0xe8, 0x52, 0x02, 0x74, + 0x12, 0x03, 0x5b, 0x4a, 0x80, 0x4d, 0x62, 0x20, 0x4b, 0x09, 0x90, 0x49, 0x0c, 0x5c, 0x29, 0x01, + 0x2e, 0x89, 0x81, 0x2a, 0x25, 0x40, 0x25, 0x31, 0x30, 0xa5, 0x04, 0x98, 0x24, 0x06, 0xa2, 0x94, + 0x00, 0x91, 0xc4, 0xc0, 0x93, 0x12, 0xe0, 0x91, 0x18, 0x68, 0xe6, 0x44, 0x68, 0x24, 0x16, 0x96, + 0x39, 0x11, 0x16, 0x89, 0x85, 0x64, 0x4e, 0x84, 0x44, 0x62, 0xe1, 0x98, 0x13, 0xe1, 0x90, 0x58, + 0x28, 0xbe, 0x94, 0xdc, 0x8e, 0xf0, 0x4d, 0xb3, 0x7b, 0xbc, 0x67, 0x9e, 0xab, 0x23, 0xcc, 0x71, + 0xed, 0xc3, 0x64, 0x5e, 0x5e, 0xb2, 0x1b, 0x56, 0xb6, 0xe3, 0x14, 0xde, 0x60, 0x39, 0xae, 0xb1, + 0x60, 0x2c, 0x0c, 0x7f, 0x8b, 0xc2, 0xb9, 0x7a, 0xc3, 0x1c, 0xd7, 0x66, 0x84, 0xfb, 0xb7, 0xf1, + 0x95, 0x77, 0x6c, 0x8f, 0x25, 0xb7, 0x63, 0x23, 0xe1, 0x1f, 0xb5, 0x63, 0xcb, 0x86, 0x87, 0x9c, + 0x06, 0x3b, 0x1b, 0x1e, 0xec, 0x81, 0xb7, 0x4e, 0xd4, 0x0e, 0x2e, 0x1b, 0x1e, 0x5a, 0x1a, 0xd4, + 0x8b, 0xed, 0xb7, 0x08, 0x83, 0xeb, 0xfa, 0x91, 0x0f, 0x83, 0x47, 0xed, 0xb7, 0x72, 0x5c, 0x29, + 0x19, 0x95, 0xc1, 0x78, 0x64, 0x06, 0x8f, 0xda, 0x79, 0xe5, 0xb8, 0xf2, 0x32, 0x32, 0x83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xc8, 0x26, 0xf0, + 0x63, 0xd2, 0x82, 0xc8, 0x24, 0xf0, 0x63, 0xd1, 0x82, 0xc8, 0x22, 0xf0, 0x63, 0xd0, 0x63, 0x91, + 0x41, 0xde, 0x1d, 0x1f, 0x4d, 0x38, 0x52, 0x0c, 0x63, 0x10, 0x8e, 0xc0, 0x20, 0x1c, 0x81, 0x41, + 0x38, 0x02, 0x83, 0x70, 0x04, 0x06, 0xe1, 0x08, 0x0c, 0xc2, 0x11, 0x18, 0x84, 0x23, 0x30, 0x08, + 0x47, 0x61, 0x10, 0x8e, 0xc4, 0x20, 0x1c, 0xc4, 0xa0, 0x05, 0xf1, 0xc6, 0x03, 0xf8, 0x15, 0xa4, + 0x05, 0xf1, 0xe8, 0x33, 0x9c, 0x42, 0x38, 0x12, 0x85, 0x70, 0x10, 0x85, 0x3e, 0xc2, 0xf0, 0x2c, + 0x47, 0x21, 0x72, 0x3e, 0x74, 0x51, 0x15, 0x68, 0x3d, 0xc2, 0x05, 0x0b, 0x3f, 0x4e, 0xad, 0x47, + 0x38, 0xa4, 0x1e, 0xc6, 0xb3, 0xc1, 0x2a, 0x54, 0x8d, 0x50, 0x85, 0x6e, 0x51, 0x0e, 0xad, 0x47, + 0xb8, 0x78, 0x31, 0xc8, 0xbd, 0x8d, 0x61, 0x45, 0xe0, 0xf5, 0x48, 0x45, 0x60, 0x2b, 0x52, 0x11, + 0xb8, 0xed, 0x21, 0xf8, 0x53, 0x09, 0x9e, 0xf3, 0x10, 0x74, 0xfe, 0xda, 0x7d, 0x78, 0x64, 0x95, + 0x00, 0xef, 0x88, 0x4a, 0x76, 0x8f, 0x6d, 0x18, 0x18, 0xa5, 0xad, 0xa6, 0x7c, 0x87, 0x3f, 0xac, + 0x2a, 0x8e, 0x7a, 0x80, 0xc3, 0x20, 0x4e, 0x36, 0x43, 0x17, 0x00, 0x6f, 0x35, 0x7b, 0x76, 0xb5, + 0xf0, 0x5b, 0xb6, 0x5c, 0xb7, 0xc4, 0x72,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, 0x8a, 0x1e, 0xf7, 0x55, 0x74, 0xd2, + 0x57, 0xd1, 0x93, 0xbe, 0x1a, 0xfb, 0xa4, 0xaf, 0xa2, 0xcf, 0xfa, 0x6a, 0xec, 0xf3, 0xbe, 0x8a, + 0xbe, 0xe8, 0xab, 0xb1, 0x77, 0x3e, 0x55, 0x63, 0x8f, 0x3e, 0x55, 0x63, 0x1f, 0x7c, 0xaa, 0xa2, + 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x3d, 0xd8, 0x02, 0x18, 0x4c, 0x36, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto b/deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto new file mode 100644 index 000000000..ce6cc599e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto @@ -0,0 +1,649 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go b/deps/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go new file mode 100644 index 000000000..8fbfe7fdb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go @@ -0,0 +1,17878 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/combos/marshaler/uuid.go b/deps/github.com/gogo/protobuf/test/combos/marshaler/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/marshaler/uuid.go @@ -0,0 +1,137 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/deps/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go @@ -0,0 +1,252 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/deps/github.com/gogo/protobuf/test/combos/unmarshaler/t.go b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/t.go new file mode 100644 index 000000000..c7c292e82 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/t.go @@ -0,0 +1,73 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go new file mode 100644 index 000000000..eae50c810 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go @@ -0,0 +1,40727 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return xxx_messageInfo_NidOptNative.Size(m) +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return xxx_messageInfo_NinOptNative.Size(m) +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return xxx_messageInfo_NidRepNative.Size(m) +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return xxx_messageInfo_NinRepNative.Size(m) +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NidRepPackedNative.Size(m) +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNative.Size(m) +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return xxx_messageInfo_NidOptStruct.Size(m) +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return xxx_messageInfo_NinOptStruct.Size(m) +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return xxx_messageInfo_NidRepStruct.Size(m) +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return xxx_messageInfo_NinRepStruct.Size(m) +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NidEmbeddedStruct.Size(m) +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStruct.Size(m) +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return xxx_messageInfo_NidNestedStruct.Size(m) +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return xxx_messageInfo_NinNestedStruct.Size(m) +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return xxx_messageInfo_NidOptCustom.Size(m) +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return xxx_messageInfo_CustomDash.Size(m) +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return xxx_messageInfo_NinOptCustom.Size(m) +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return xxx_messageInfo_NidRepCustom.Size(m) +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return xxx_messageInfo_NinRepCustom.Size(m) +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return xxx_messageInfo_NinOptNativeUnion.Size(m) +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return xxx_messageInfo_NinOptStructUnion.Size(m) +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStructUnion.Size(m) +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinNestedStructUnion.Size(m) +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return xxx_messageInfo_Tree.Size(m) +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return xxx_messageInfo_OrBranch.Size(m) +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return xxx_messageInfo_AndBranch.Size(m) +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return xxx_messageInfo_Leaf.Size(m) +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return xxx_messageInfo_DeepTree.Size(m) +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return xxx_messageInfo_ADeepBranch.Size(m) +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return xxx_messageInfo_AndDeepBranch.Size(m) +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return xxx_messageInfo_DeepLeaf.Size(m) +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return xxx_messageInfo_Nil.Size(m) +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return xxx_messageInfo_NidOptEnum.Size(m) +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return xxx_messageInfo_NinOptEnum.Size(m) +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return xxx_messageInfo_NidRepEnum.Size(m) +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return xxx_messageInfo_NinRepEnum.Size(m) +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_NinOptEnumDefault.Size(m) +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnum.Size(m) +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnumDefault.Size(m) +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return xxx_messageInfo_Timer.Size(m) +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return xxx_messageInfo_MyExtendable.Size(m) +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return xxx_messageInfo_OtherExtenable.Size(m) +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return xxx_messageInfo_NestedDefinition.Size(m) +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage.Size(m) +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Size(m) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return xxx_messageInfo_NestedScope.Size(m) +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return xxx_messageInfo_NinOptNativeDefault.Size(m) +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return xxx_messageInfo_CustomContainer.Size(m) +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNidOptNative.Size(m) +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinOptNative.Size(m) +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinRepNative.Size(m) +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return xxx_messageInfo_CustomNameNinStruct.Size(m) +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return xxx_messageInfo_CustomNameCustomType.Size(m) +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Size(m) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return xxx_messageInfo_CustomNameEnum.Size(m) +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return xxx_messageInfo_NoExtensionsMap.Size(m) +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return xxx_messageInfo_Unrecognized.Size(m) +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner.Size(m) +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Size(m) +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed.Size(m) +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Size(m) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return xxx_messageInfo_Node.Size(m) +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NonByteCustomType.Size(m) +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidOptNonByteCustomType.Size(m) +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinOptNonByteCustomType.Size(m) +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidRepNonByteCustomType.Size(m) +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinRepNonByteCustomType.Size(m) +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return xxx_messageInfo_ProtoType.Size(m) +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "combos/unmarshaler/thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6646 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x70, 0x24, 0x57, + 0x75, 0xbf, 0x7a, 0x7a, 0xa4, 0x1d, 0x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xce, 0x2c, 0x68, 0x87, 0xf4, 0x21, 0xe8, 0x27, 0x23, 0xf9, 0xd5, + 0xd5, 0x65, 0x2d, 0xe5, 0xc9, 0x5c, 0xdf, 0x30, 0x96, 0xca, 0x57, 0xb4, 0x7e, 0x4f, 0xe6, 0x15, + 0x63, 0x75, 0x73, 0x4d, 0x03, 0x4f, 0xc2, 0x4a, 0x69, 0x7d, 0x3d, 0x77, 0xa5, 0xa4, 0x0d, 0x78, + 0x1c, 0xf9, 0x6b, 0x1b, 0xa5, 0x75, 0x6d, 0x50, 0x50, 0xeb, 0xcc, 0x82, 0x36, 0xe4, 0x3d, 0xa2, + 0x54, 0xde, 0x5c, 0xd1, 0x86, 0xf5, 0x51, 0x18, 0xa2, 0x8f, 0xe0, 0x4a, 0x8c, 0x48, 0x43, 0xe7, + 0x16, 0x35, 0xcd, 0x57, 0x84, 0x4a, 0x19, 0x15, 0x06, 0xce, 0x2d, 0x6a, 0x7a, 0xa6, 0x00, 0xbd, + 0x24, 0xba, 0x74, 0x1d, 0x86, 0x97, 0x73, 0xf9, 0xd2, 0x72, 0x65, 0x75, 0x6d, 0x63, 0x69, 0xb5, + 0x9c, 0x5b, 0xd6, 0x14, 0x7f, 0xcc, 0x28, 0xbd, 0x7b, 0x73, 0xc9, 0x28, 0x15, 0xb5, 0x44, 0x70, + 0x6c, 0xad, 0x94, 0xdb, 0x28, 0x15, 0x35, 0x35, 0x53, 0x85, 0xc3, 0x61, 0x75, 0x32, 0x34, 0x33, + 0x02, 0x2e, 0x4e, 0x74, 0x71, 0x31, 0x91, 0xd5, 0xe1, 0xe2, 0x57, 0x12, 0x30, 0x16, 0xb2, 0x56, + 0x84, 0x3e, 0xe4, 0x61, 0xe8, 0xa5, 0x21, 0x4a, 0x57, 0xcf, 0xfb, 0x42, 0x17, 0x1d, 0x12, 0xb0, + 0x1d, 0x2b, 0x28, 0xc1, 0x05, 0x3b, 0x08, 0xb5, 0x4b, 0x07, 0x81, 0x45, 0x74, 0xd4, 0xf4, 0xff, + 0xd7, 0x51, 0xd3, 0xe9, 0xb2, 0x77, 0x2e, 0xce, 0xb2, 0x47, 0xc6, 0x0e, 0x56, 0xdb, 0x7b, 0x43, + 0x6a, 0xfb, 0x25, 0x18, 0xed, 0x10, 0x14, 0xbb, 0xc6, 0x7e, 0x50, 0x81, 0x74, 0x37, 0xe3, 0x44, + 0x54, 0xba, 0x84, 0x50, 0xe9, 0x2e, 0xc9, 0x16, 0x3c, 0xde, 0xdd, 0x09, 0x1d, 0xbe, 0xfe, 0x9c, + 0x02, 0xe3, 0xe1, 0x9d, 0x62, 0xa8, 0x0e, 0x0f, 0x41, 0x5f, 0x13, 0xb9, 0x3b, 0x36, 0xef, 0x96, + 0x4e, 0x86, 0xac, 0xc1, 0x98, 0x2c, 0x3b, 0x9b, 0xa1, 0x82, 0x8b, 0xb8, 0xda, 0xad, 0xdd, 0xa3, + 0xda, 0x74, 0x68, 0xfa, 0x91, 0x04, 0x1c, 0x09, 0x15, 0x1e, 0xaa, 0xe8, 0x5d, 0x00, 0x75, 0xab, + 0xb5, 0xeb, 0xd2, 0x8e, 0x88, 0x16, 0xd8, 0x7e, 0x32, 0x42, 0x8a, 0x17, 0x2e, 0x9e, 0xbb, 0xae, + 0x47, 0x57, 0x09, 0x1d, 0xe8, 0x10, 0x61, 0xb8, 0xe0, 0x2b, 0x9a, 0x24, 0x8a, 0x4e, 0x76, 0x99, + 0x69, 0x47, 0x60, 0xce, 0x83, 0x56, 0x6d, 0xd4, 0x91, 0xe5, 0x56, 0x1c, 0xb7, 0x8d, 0xcc, 0x66, + 0xdd, 0xda, 0x26, 0x2b, 0x48, 0x2a, 0xdb, 0xbb, 0x65, 0x36, 0x1c, 0x64, 0x8c, 0x50, 0xf2, 0x3a, + 0xa7, 0x62, 0x04, 0x09, 0xa0, 0x76, 0x00, 0xd1, 0x27, 0x20, 0x28, 0xd9, 0x43, 0x64, 0xbe, 0x9c, + 0x82, 0x81, 0x40, 0x5f, 0xad, 0x1f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, 0x26, 0x24, 0xf7, 0x25, 0x02, 0xae, 0x9b, 0x90, 0x5c, 0x97, 0x08, + 0xb8, 0x6d, 0x42, 0x72, 0x5b, 0x22, 0xe0, 0xb2, 0x09, 0xc9, 0x65, 0x89, 0x80, 0xbb, 0x26, 0x24, + 0x77, 0x25, 0x02, 0xae, 0x9a, 0x90, 0x5c, 0x95, 0x08, 0xb8, 0x69, 0x42, 0x72, 0x53, 0x22, 0xe0, + 0xa2, 0x09, 0xc9, 0x45, 0x89, 0x80, 0x7b, 0x26, 0x24, 0xf7, 0x24, 0x02, 0xae, 0x39, 0x26, 0xbb, + 0x26, 0x11, 0x74, 0xcb, 0x31, 0xd9, 0x2d, 0x89, 0xa0, 0x4b, 0x8e, 0xc9, 0x2e, 0x49, 0x04, 0xdd, + 0x71, 0x4c, 0x76, 0x47, 0x22, 0xe8, 0x8a, 0x9f, 0x26, 0x78, 0x47, 0xb8, 0xee, 0xb6, 0x77, 0xab, + 0xee, 0x6d, 0x75, 0x84, 0xf3, 0x42, 0xfb, 0x30, 0xb0, 0xa0, 0xcf, 0x91, 0x86, 0x35, 0xd8, 0x71, + 0x4a, 0x2b, 0xd8, 0xbc, 0xd0, 0x58, 0x04, 0x10, 0x56, 0x38, 0x62, 0xf1, 0xb6, 0x7a, 0xc3, 0x79, + 0xa1, 0xcd, 0x88, 0xd6, 0xef, 0xc2, 0x5b, 0xde, 0xb1, 0xbd, 0x98, 0xe0, 0x1d, 0x1b, 0x33, 0xff, + 0x41, 0x3b, 0xb6, 0xd9, 0x68, 0x93, 0x7b, 0xc6, 0x9e, 0x8d, 0x36, 0x76, 0xc7, 0xaa, 0x13, 0xb7, + 0x83, 0x9b, 0x8d, 0x36, 0xad, 0x67, 0xd4, 0x37, 0xb7, 0xdf, 0x62, 0x11, 0x6c, 0xa0, 0x56, 0x48, + 0x04, 0x1f, 0xb4, 0xdf, 0x9a, 0x17, 0x4a, 0xc9, 0x41, 0x23, 0x58, 0x3d, 0x70, 0x04, 0x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 0x7e, 0x45, 0x81, 0xc3, 0x52, 0x79, 0xa5, + 0xea, 0x9d, 0x92, 0xd4, 0x3b, 0xda, 0xf9, 0x24, 0xc2, 0x18, 0xd0, 0x2e, 0xe8, 0x5e, 0x09, 0x10, + 0x90, 0xec, 0xf9, 0x7d, 0x51, 0xf2, 0xfb, 0x31, 0x0f, 0x10, 0x62, 0x2e, 0x1e, 0x01, 0x4c, 0x6d, + 0x1b, 0x92, 0x1b, 0x6d, 0x84, 0xf4, 0x49, 0x48, 0xac, 0xb6, 0x99, 0x86, 0xc3, 0x14, 0xbf, 0xda, + 0xce, 0xb7, 0x4d, 0xab, 0xba, 0x63, 0x24, 0x56, 0xdb, 0xfa, 0x71, 0x50, 0x73, 0xec, 0x6f, 0xaf, + 0x07, 0x16, 0x46, 0x28, 0x43, 0xce, 0xaa, 0x31, 0x0e, 0x4c, 0xd3, 0x27, 0x21, 0xb9, 0x8c, 0xcc, + 0x2d, 0xa6, 0x04, 0x50, 0x1e, 0x3c, 0x62, 0x90, 0x71, 0xf6, 0xc0, 0xc7, 0x20, 0xc5, 0x05, 0xeb, + 0x27, 0x30, 0x62, 0xcb, 0x65, 0x8f, 0x65, 0x08, 0xac, 0x0e, 0x5b, 0xb9, 0x08, 0x55, 0x3f, 0x09, + 0xbd, 0x46, 0x7d, 0x7b, 0xc7, 0x65, 0x0f, 0xef, 0x64, 0xa3, 0xe4, 0xcc, 0x35, 0xe8, 0xf7, 0x34, + 0x7a, 0x93, 0x45, 0x17, 0xe9, 0xd4, 0xf4, 0x89, 0xe0, 0x7a, 0xc2, 0xf7, 0x2d, 0xe9, 0x90, 0x3e, + 0x0d, 0xa9, 0x75, 0xb7, 0xed, 0x17, 0x7d, 0xde, 0x91, 0x7a, 0xa3, 0x99, 0x0f, 0x28, 0x90, 0x2a, + 0x22, 0xd4, 0x22, 0x06, 0xbf, 0x07, 0x92, 0x45, 0xfb, 0x29, 0x8b, 0x29, 0x38, 0xca, 0x2c, 0x8a, + 0xc9,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x9d, 0x94, 0x6e, 0x23, 0x89, 0x7c, 0x25, + 0x2f, 0xde, 0x4e, 0x4a, 0x67, 0x4f, 0x22, 0xdf, 0x65, 0x2f, 0xf2, 0x4e, 0x4a, 0xa7, 0x50, 0x22, + 0xdf, 0x15, 0x2f, 0x06, 0x4f, 0x4a, 0x77, 0x95, 0x44, 0xbe, 0x47, 0xbc, 0x68, 0x3c, 0x29, 0xdd, + 0x5a, 0x12, 0xf9, 0x96, 0xbc, 0xb8, 0x9c, 0x91, 0xef, 0x2f, 0x89, 0x8c, 0x57, 0xfd, 0x08, 0x9d, + 0x91, 0x6f, 0x32, 0x89, 0x9c, 0xef, 0xf2, 0x63, 0x75, 0x46, 0xbe, 0xd3, 0x24, 0x72, 0x2e, 0xfb, + 0x51, 0x3b, 0x23, 0x9f, 0x95, 0x89, 0x9c, 0x2b, 0x7e, 0xfc, 0xce, 0xc8, 0xa7, 0x66, 0x22, 0x67, + 0xd9, 0x8f, 0xe4, 0x19, 0xf9, 0xfc, 0x4c, 0xe4, 0x5c, 0xf5, 0x37, 0xd1, 0xbf, 0x29, 0x85, 0x5f, + 0xe0, 0x16, 0x54, 0x46, 0x0a, 0x3f, 0x08, 0x09, 0x3d, 0xa9, 0x90, 0x05, 0x78, 0xfc, 0xb0, 0xcb, + 0x48, 0x61, 0x07, 0x21, 0x21, 0x97, 0x91, 0x42, 0x0e, 0x42, 0xc2, 0x2d, 0x23, 0x85, 0x1b, 0x84, + 0x84, 0x5a, 0x46, 0x0a, 0x35, 0x08, 0x09, 0xb3, 0x8c, 0x14, 0x66, 0x10, 0x12, 0x62, 0x19, 0x29, + 0xc4, 0x20, 0x24, 0xbc, 0x32, 0x52, 0x78, 0x41, 0x48, 0x68, 0x9d, 0x90, 0x43, 0x0b, 0xc2, 0xc2, + 0xea, 0x84, 0x1c, 0x56, 0x10, 0x16, 0x52, 0x77, 0xcb, 0x21, 0xd5, 0x7f, 0xeb, 0xe5, 0xa9, 0x5e, + 0x3c, 0x14, 0x88, 0xa6, 0x13, 0x72, 0x34, 0x41, 0x58, 0x24, 0x9d, 0x90, 0x23, 0x09, 0xc2, 0xa2, + 0xe8, 0x84, 0x1c, 0x45, 0x10, 0x16, 0x41, 0x2f, 0xca, 0x11, 0xe4, 0xdf, 0xf1, 0xc9, 0x48, 0x47, + 0x8a, 0x51, 0x11, 0xa4, 0xc6, 0x88, 0x20, 0x35, 0x46, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x11, + 0x41, 0x6a, 0x8c, 0x08, 0x52, 0x63, 0x44, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x38, 0x11, 0xa4, 0xc6, + 0x8a, 0x20, 0xb5, 0x5b, 0x04, 0x9d, 0x90, 0x6f, 0x3c, 0x40, 0x58, 0x41, 0x3a, 0x21, 0x1f, 0x7d, + 0x46, 0x87, 0x90, 0x1a, 0x2b, 0x84, 0xd4, 0x6e, 0x21, 0xf4, 0x4d, 0x15, 0xc6, 0x84, 0x10, 0x62, + 0xe7, 0x43, 0x6f, 0x56, 0x05, 0x3a, 0x17, 0xe3, 0x82, 0x45, 0x58, 0x4c, 0x9d, 0x8b, 0x71, 0x48, + 0xbd, 0x5f, 0x9c, 0x75, 0x56, 0xa1, 0x52, 0x8c, 0x2a, 0x74, 0xd9, 0x8b, 0xa1, 0x73, 0x31, 0x2e, + 0x5e, 0x74, 0xc6, 0xde, 0x85, 0xfd, 0x8a, 0xc0, 0x23, 0xb1, 0x8a, 0xc0, 0x52, 0xac, 0x22, 0x70, + 0xd5, 0xf7, 0xe0, 0x87, 0x12, 0x70, 0xd8, 0xf7, 0x20, 0xfd, 0x44, 0x7e, 0xc1, 0x29, 0x13, 0x38, + 0xa2, 0xd2, 0xf9, 0xb1, 0x4d, 0xc0, 0x8d, 0x89, 0xa5, 0x9a, 0xbe, 0x26, 0x1e, 0x56, 0x65, 0x0f, + 0x7a, 0x80, 0x13, 0xf0, 0x38, 0xdb, 0x0c, 0x3d, 0x01, 0xea, 0x52, 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dc, 0xb8, 0x35, 0xd9, 0xf3, 0xd2, 0xad, 0x49, 0xe5, 0x7b, 0xb7, 0x26, 0x95, 0x1f, 0xdc, 0x9a, + 0xec, 0xf9, 0xd1, 0xad, 0x49, 0xe5, 0x27, 0xb7, 0x26, 0x7b, 0x9e, 0x7d, 0x65, 0xb2, 0xe7, 0xf9, + 0x57, 0x26, 0x7b, 0x5e, 0x78, 0x65, 0x52, 0xf9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x6f, + 0x45, 0x22, 0x6b, 0x67, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringThetest(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringThetest(m github_com_gogo_protobuf_proto.Message) string { + e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) + if e == nil { + return "nil" + } + s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "})" + return s +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) 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 ErrIntOverflowThetest + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field9 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field10 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field11 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field12 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNative) 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 ErrIntOverflowThetest + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepNative) 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 ErrIntOverflowThetest + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepNative) 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 ErrIntOverflowThetest + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptStruct) 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 ErrIntOverflowThetest + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptStruct) 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 ErrIntOverflowThetest + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepStruct) 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 ErrIntOverflowThetest + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepStruct) 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 ErrIntOverflowThetest + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-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 Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidNestedStruct) 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 ErrIntOverflowThetest + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinNestedStruct) 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 ErrIntOverflowThetest + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptCustom) 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 ErrIntOverflowThetest + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomDash) 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 ErrIntOverflowThetest + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptCustom) 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 ErrIntOverflowThetest + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepCustom) 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 ErrIntOverflowThetest + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepCustom) 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 ErrIntOverflowThetest + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-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 Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNativeUnion) 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 ErrIntOverflowThetest + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptStructUnion) 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 ErrIntOverflowThetest + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinNestedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Tree) 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 ErrIntOverflowThetest + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *OrBranch) 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 ErrIntOverflowThetest + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AndBranch) 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 ErrIntOverflowThetest + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Leaf) 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 ErrIntOverflowThetest + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *DeepTree) 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 ErrIntOverflowThetest + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *ADeepBranch) 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 ErrIntOverflowThetest + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AndDeepBranch) 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 ErrIntOverflowThetest + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *DeepLeaf) 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 ErrIntOverflowThetest + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Nil) 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 ErrIntOverflowThetest + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptEnum) 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 ErrIntOverflowThetest + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptEnum) 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 ErrIntOverflowThetest + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepEnum) 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 ErrIntOverflowThetest + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepEnum) 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 ErrIntOverflowThetest + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AnotherNinOptEnum) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Timer) 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 ErrIntOverflowThetest + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + m.Time1 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time1 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + m.Time2 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time2 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *MyExtendable) 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 ErrIntOverflowThetest + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *OtherExtenable) 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 ErrIntOverflowThetest + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedDefinition) 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 ErrIntOverflowThetest + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetest + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetest + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NestedScope) 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 ErrIntOverflowThetest + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNativeDefault) 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 ErrIntOverflowThetest + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomContainer) 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 ErrIntOverflowThetest + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNidOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldA = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldB = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + m.FieldI = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldI = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + m.FieldJ = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + m.FieldK = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldK = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + m.FieldL = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldL = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinRepNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldA) == 0 { + m.FieldA = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldB) == 0 { + m.FieldB = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.FieldH = append(m.FieldH, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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) + m.FieldH = append(m.FieldH, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldI) == 0 { + m.FieldI = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldJ) == 0 { + m.FieldJ = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldK) == 0 { + m.FieldK = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.FieldL) == 0 { + m.FieldL = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinStruct) 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 ErrIntOverflowThetest + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], dAtA[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameCustomType) 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 ErrIntOverflowThetest + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-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 FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *CustomNameEnum) 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 ErrIntOverflowThetest + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NoExtensionsMap) 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 ErrIntOverflowThetest + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *Unrecognized) 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 ErrIntOverflowThetest + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-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 Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetest + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetest + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetest + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NidRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *NinRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 *ProtoType) 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 ErrIntOverflowThetest + } + 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: ProtoType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + 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 skipThetest(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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrInvalidLengthThetest + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetest + } + 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 := skipThetest(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 ( + ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/thetest.proto", fileDescriptor_thetest_4205beeb65ed6104) +} + +var fileDescriptor_thetest_4205beeb65ed6104 = []byte{ + // 3088 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, + 0xd5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0x16, 0x8c, 0xbe, 0x15, 0xbd, + 0x91, 0xf5, 0x31, 0x44, 0x2c, 0x51, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0x46, 0x6e, + 0x44, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x16, 0xd7, 0x22, 0x51, 0x69, 0x29, 0x90, 0xab, + 0x34, 0xee, 0xa1, 0x08, 0x72, 0x28, 0x82, 0x5e, 0x8b, 0x1e, 0xdb, 0xb8, 0x28, 0x0a, 0xa4, 0xb7, + 0x1c, 0x8a, 0xa2, 0x28, 0x8a, 0xc6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, 0x57, 0xc6, 0xd3, + 0x28, 0x13, 0xe7, 0xa4, 0xeb, 0x54, 0x7a, 0x43, 0x79, 0x26, 0x8d, 0x32, 0x97, 0x39, 0xe9, 0x0d, + 0x2a, 0xdd, 0x50, 0x12, 0x69, 0x94, 0x91, 0x39, 0xe9, 0x06, 0x95, 0xde, 0x54, 0x26, 0xd2, 0x28, + 0xf3, 0x0c, 0x27, 0xbd, 0x29, 0xab, 0xf0, 0x8c, 0xf3, 0xe4, 0x39, 0x05, 0xd2, 0x28, 0x33, 0x43, + 0xc4, 0xee, 0xa0, 0x27, 0x5f, 0x51, 0x26, 0xd3, 0x28, 0x33, 0xce, 0xcb, 0x57, 0x3c, 0x79, 0x5e, + 0x99, 0x4a, 0xa3, 0x4c, 0x92, 0x97, 0xe7, 0x3d, 0xf9, 0xaa, 0x72, 0x29, 0x8d, 0x32, 0x09, 0x5e, + 0xbe, 0xea, 0xc9, 0x0b, 0xca, 0x74, 0x1a, 0x65, 0x26, 0x78, 0x79, 0xc1, 0x93, 0xaf, 0x29, 0x33, + 0x69, 0x94, 0x99, 0xe2, 0xe5, 0x6b, 0xda, 0xbb, 0x36, 0xbc, 0x86, 0x07, 0xef, 0x2c, 0x0f, 0x2f, + 0x05, 0x76, 0x96, 0x07, 0x96, 0x42, 0x3a, 0xcb, 0x43, 0x4a, 0xc1, 0x9c, 0xe5, 0xc1, 0xa4, 0x30, + 0xce, 0xf2, 0x30, 0x52, 0x00, 0x67, 0x79, 0x00, 0x29, 0x74, 0xb3, 0x3c, 0x74, 0x14, 0xb4, 0x59, + 0x1e, 0x34, 0x0a, 0xd7, 0x2c, 0x0f, 0x17, 0x05, 0x4a, 0x11, 0x80, 0xf2, 0x20, 0x52, 0x04, 0x88, + 0x3c, 0x70, 0x14, 0x01, 0x1c, 0x0f, 0x16, 0x45, 0x80, 0xc5, 0x03, 0x44, 0x11, 0x00, 0xf1, 0xa0, + 0x50, 0x04, 0x28, 0x3c, 0x10, 0x48, 0x8e, 0x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5d, 0x04, 0x89, 0x8a, 0xae, 0x1f, 0xd9, 0x01, 0xbf, 0x06, 0xf1, + 0x4a, 0xe7, 0x47, 0x06, 0x71, 0xf0, 0x32, 0x89, 0xa8, 0x25, 0x26, 0x31, 0xb5, 0xc5, 0xf2, 0x35, + 0x36, 0xee, 0xcf, 0xd2, 0xb8, 0x33, 0x7a, 0x76, 0xec, 0x35, 0x2e, 0xf6, 0x04, 0x40, 0x4b, 0x69, + 0x20, 0xfe, 0x37, 0x60, 0x92, 0x59, 0x45, 0xce, 0x10, 0x37, 0x24, 0xd1, 0x90, 0x8d, 0x95, 0xa5, + 0xa1, 0xe9, 0x70, 0x89, 0x5b, 0xd8, 0x32, 0x65, 0x42, 0x1c, 0x60, 0x6a, 0x87, 0x39, 0xcb, 0x87, + 0xd9, 0x5f, 0x95, 0x84, 0x3a, 0xe7, 0xc4, 0xc8, 0x0e, 0xf7, 0x82, 0x43, 0xce, 0x60, 0x10, 0xad, + 0xbf, 0xb5, 0x31, 0xc0, 0xb5, 0xf6, 0x81, 0xf6, 0x2a, 0x80, 0x93, 0xf2, 0x55, 0xe3, 0xf8, 0x50, + 0xc8, 0xba, 0x69, 0x37, 0xc0, 0xbb, 0x2d, 0x7d, 0x57, 0xef, 0xd9, 0x2a, 0x7c, 0x3f, 0x65, 0x15, + 0x18, 0x70, 0x52, 0xcc, 0xb6, 0x7f, 0x29, 0xd4, 0xde, 0xb7, 0x13, 0xb3, 0x54, 0x15, 0x47, 0xf5, + 0x9e, 0x6e, 0x6e, 0x1a, 0x1d, 0xb3, 0xa5, 0x77, 0x05, 0x8b, 0xbc, 0xbc, 0xca, 0x25, 0xec, 0x74, + 0xfe, 0x05, 0x6a, 0x11, 0x68, 0xb4, 0xaa, 0x7d, 0x68, 0x3b, 0x68, 0xb5, 0x02, 0x03, 0x0f, 0x88, + 0x23, 0x3c, 0xa0, 0xbc, 0xce, 0xf5, 0x6f, 0x43, 0xdc, 0x14, 0x3e, 0x2d, 0x6f, 0x72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0xa6, 0xc6, + 0x3e, 0x39, 0x53, 0xd1, 0x67, 0x67, 0x2a, 0xfa, 0xfc, 0x4c, 0x45, 0x5f, 0x9c, 0xa9, 0xe8, 0x9d, + 0xbe, 0x8a, 0x3e, 0xe8, 0xab, 0xe8, 0xc3, 0xbe, 0x8a, 0xfe, 0xd8, 0x57, 0xd1, 0xe3, 0xbe, 0x8a, + 0x4e, 0xfa, 0x6a, 0xec, 0x49, 0x5f, 0x45, 0x9f, 0xf4, 0x55, 0xf4, 0x59, 0x5f, 0x8d, 0x7d, 0xde, + 0x57, 0xd1, 0x17, 0x7d, 0x35, 0xf6, 0xce, 0xa7, 0x6a, 0xec, 0xd1, 0xa7, 0x6a, 0xec, 0x83, 0x4f, + 0x55, 0xf4, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xf6, 0x66, 0xae, 0x4e, 0x36, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto new file mode 100644 index 000000000..af269a3be --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto @@ -0,0 +1,649 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go new file mode 100644 index 000000000..fe360f377 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go @@ -0,0 +1,15974 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go @@ -0,0 +1,137 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/deps/github.com/gogo/protobuf/test/custom-dash-type/customdash.go b/deps/github.com/gogo/protobuf/test/custom-dash-type/customdash.go new file mode 100644 index 000000000..a6af4dc57 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custom-dash-type/customdash.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* + Package custom contains custom types for test and example purposes. + These types are used by the test structures generated by gogoprotobuf. +*/ +package custom + +import ( + "bytes" + "encoding/json" +) + +type Bytes []byte + +func (b Bytes) Marshal() ([]byte, error) { + buffer := make([]byte, len(b)) + _, err := b.MarshalTo(buffer) + return buffer, err +} + +func (b Bytes) MarshalTo(data []byte) (n int, err error) { + copy(data, b) + return len(b), nil +} + +func (b *Bytes) Unmarshal(data []byte) error { + if data == nil { + b = nil + return nil + } + pb := make([]byte, len(data)) + copy(pb, data) + *b = pb + return nil +} + +func (b Bytes) MarshalJSON() ([]byte, error) { + data, err := b.Marshal() + if err != nil { + return nil, err + } + return json.Marshal(data) +} + +func (b *Bytes) Size() int { + return len(*b) +} + +func (b *Bytes) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return b.Unmarshal(*v) +} + +func (this Bytes) Equal(that Bytes) bool { + return bytes.Equal(this, that) +} + +func (this Bytes) Compare(that Bytes) int { + return bytes.Compare(this, that) +} + +type randy interface { + Intn(n int) int +} + +func NewPopulatedBytes(r randy) *Bytes { + l := r.Intn(100) + data := Bytes(make([]byte, l)) + for i := 0; i < l; i++ { + data[i] = byte(r.Intn(255)) + } + return &data +} diff --git a/deps/github.com/gogo/protobuf/test/custom/custom.go b/deps/github.com/gogo/protobuf/test/custom/custom.go new file mode 100644 index 000000000..64daabfc4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custom/custom.go @@ -0,0 +1,154 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* + Package custom contains custom types for test and example purposes. + These types are used by the test structures generated by gogoprotobuf. +*/ +package custom + +import ( + "bytes" + "encoding/json" + "errors" +) + +type Uint128 [2]uint64 + +func (u Uint128) Marshal() ([]byte, error) { + buffer := make([]byte, 16) + _, err := u.MarshalTo(buffer) + return buffer, err +} + +func (u Uint128) MarshalTo(data []byte) (n int, err error) { + PutLittleEndianUint128(data, 0, u) + return 16, nil +} + +func GetLittleEndianUint64(b []byte, offset int) uint64 { + v := uint64(b[offset+7]) << 56 + v += uint64(b[offset+6]) << 48 + v += uint64(b[offset+5]) << 40 + v += uint64(b[offset+4]) << 32 + v += uint64(b[offset+3]) << 24 + v += uint64(b[offset+2]) << 16 + v += uint64(b[offset+1]) << 8 + v += uint64(b[offset]) + return v +} + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +func PutLittleEndianUint128(buffer []byte, offset int, v [2]uint64) { + PutLittleEndianUint64(buffer, offset, v[0]) + PutLittleEndianUint64(buffer, offset+8, v[1]) +} + +func GetLittleEndianUint128(buffer []byte, offset int) (value [2]uint64) { + value[0] = GetLittleEndianUint64(buffer, offset) + value[1] = GetLittleEndianUint64(buffer, offset+8) + return +} + +func (u *Uint128) Unmarshal(data []byte) error { + if data == nil { + u = nil + return nil + } + if len(data) == 0 { + pu := Uint128{} + *u = pu + return nil + } + if len(data) != 16 { + return errors.New("Uint128: invalid length") + } + pu := Uint128(GetLittleEndianUint128(data, 0)) + *u = pu + return nil +} + +func (u Uint128) MarshalJSON() ([]byte, error) { + data, err := u.Marshal() + if err != nil { + return nil, err + } + return json.Marshal(data) +} + +func (u Uint128) Size() int { + return 16 +} + +func (u *Uint128) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return u.Unmarshal(*v) +} + +func (this Uint128) Equal(that Uint128) bool { + return this == that +} + +func (this Uint128) Compare(that Uint128) int { + thisdata, err := this.Marshal() + if err != nil { + panic(err) + } + thatdata, err := that.Marshal() + if err != nil { + panic(err) + } + return bytes.Compare(thisdata, thatdata) +} + +type randy interface { + Intn(n int) int +} + +func NewPopulatedUint128(r randy) *Uint128 { + data := make([]byte, 16) + for i := 0; i < 16; i++ { + data[i] = byte(r.Intn(255)) + } + u := Uint128(GetLittleEndianUint128(data, 0)) + return &u +} diff --git a/deps/github.com/gogo/protobuf/test/custom/custom_test.go b/deps/github.com/gogo/protobuf/test/custom/custom_test.go new file mode 100644 index 000000000..d4fe7bd48 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custom/custom_test.go @@ -0,0 +1,43 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package custom + +import ( + "testing" +) + +func TestUint128(t *testing.T) { + var uint128a = Uint128{0, 1} + buf := make([]byte, 16) + PutLittleEndianUint128(buf, 0, uint128a) + uint128b := GetLittleEndianUint128(buf, 0) + if !uint128a.Equal(uint128b) { + t.Fatalf("%v != %v", uint128a, uint128b) + } +} diff --git a/deps/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile new file mode 100644 index 000000000..ecb3e74ea --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/deps/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go new file mode 100644 index 000000000..2e29d2a0f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go @@ -0,0 +1,34 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package custombytesnonstruct + +import testing "testing" + +func TestCustomBytesNonStruct(t *testing.T) { +} diff --git a/deps/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go new file mode 100644 index 000000000..02d0905b8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go @@ -0,0 +1,36 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package custombytesnonstruct + +type CustomType int + +func (c *CustomType) Unmarshal(data []byte) error { + data[0] = 42 + return nil +} diff --git a/deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go new file mode 100644 index 000000000..775bbfead --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package custombytesnonstruct + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Object struct { + CustomField1 *CustomType `protobuf:"bytes,1,opt,name=CustomField1,customtype=CustomType" json:"CustomField1,omitempty"` + CustomField2 []CustomType `protobuf:"bytes,2,rep,name=CustomField2,customtype=CustomType" json:"CustomField2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_proto_ae179068cc9a7711, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return xxx_messageInfo_Object.Size(m) +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Object)(nil), "custombytesnonstruct.Object") +} +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 ErrIntOverflowProto + } + 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 CustomField1", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v CustomType + m.CustomField1 = &v + if err := m.CustomField1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomField2", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v CustomType + m.CustomField2 = append(m.CustomField2, v) + if err := m.CustomField2[len(m.CustomField2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + 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 skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_ae179068cc9a7711) } + +var fileDescriptor_proto_ae179068cc9a7711 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0x22, 0xc9, 0xa5, 0xc5, 0x25, 0xf9, 0xb9, 0x49, 0x95, 0x25, 0xa9, + 0xc5, 0x79, 0xf9, 0x79, 0xc5, 0x25, 0x45, 0xa5, 0xc9, 0x25, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xc5, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x0c, 0x51, 0x2a, 0xe0, 0x62, 0xf3, 0x4f, 0xca, 0x4a, + 0x4d, 0x2e, 0x11, 0x32, 0xe2, 0xe2, 0x71, 0x06, 0x1b, 0xe8, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x28, + 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe3, 0xc4, 0x77, 0xeb, 0x9e, 0x3c, 0x17, 0x44, 0x3c, 0xa4, 0xb2, + 0x20, 0x35, 0x08, 0x45, 0x0d, 0x9a, 0x1e, 0x23, 0x09, 0x26, 0x05, 0x66, 0x02, 0x7a, 0x8c, 0x9c, + 0x58, 0x2e, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xc6, 0xf3, 0xe3, 0xca, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto new file mode 100644 index 000000000..343b457a7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package custombytesnonstruct; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message Object { + optional bytes CustomField1 = 1 [(gogoproto.customtype) = "CustomType"]; + repeated bytes CustomField2 = 2 [(gogoproto.customtype) = "CustomType"]; +} diff --git a/deps/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto b/deps/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto new file mode 100644 index 000000000..90efda369 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto @@ -0,0 +1,38 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package dashfilename; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; + +message test { + +} diff --git a/deps/github.com/gogo/protobuf/test/dashfilename/df_test.go b/deps/github.com/gogo/protobuf/test/dashfilename/df_test.go new file mode 100644 index 000000000..6266b21bc --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/dashfilename/df_test.go @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package dashfilename + +import ( + "os" + "os/exec" + "testing" +) + +//Issue 16 : https://github.com/gogo/protobuf/issues/detail?id=16 +func TestDashFilename(t *testing.T) { + name := "dash-filename" + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") + data, err := cmd.CombinedOutput() + if err != nil { + t.Fatalf("err = %v: %s", err, string(data)) + } + if err := os.Remove(name + ".pb.go"); err != nil { + panic(err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/dashfilename/doc.go b/deps/github.com/gogo/protobuf/test/dashfilename/doc.go new file mode 100644 index 000000000..b288f33e7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/dashfilename/doc.go @@ -0,0 +1 @@ +package dashfilename diff --git a/deps/github.com/gogo/protobuf/test/data/Makefile b/deps/github.com/gogo/protobuf/test/data/Makefile new file mode 100644 index 000000000..eeb3f5091 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/data/Makefile @@ -0,0 +1,33 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. \ + --proto_path=../../../../../:../../protobuf/:. data.proto diff --git a/deps/github.com/gogo/protobuf/test/data/data.pb.go b/deps/github.com/gogo/protobuf/test/data/data.pb.go new file mode 100644 index 000000000..43257d944 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/data/data.pb.go @@ -0,0 +1,508 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: data.proto + +package data + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MyMessage struct { + MyData uint32 `protobuf:"varint,1,opt,name=my_data,json=myData,proto3" json:"my_data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_data_ad073f7719d49453, []int{0} +} +func (m *MyMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MyMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage.Merge(dst, src) +} +func (m *MyMessage) XXX_Size() int { + return m.Size() +} +func (m *MyMessage) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage proto.InternalMessageInfo + +func (m *MyMessage) GetMyData() uint32 { + if m != nil { + return m.MyData + } + return 0 +} + +func init() { + proto.RegisterType((*MyMessage)(nil), "data.MyMessage") +} +func (this *MyMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyMessage) + if !ok { + that2, ok := that.(MyMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyMessage but is not nil && this == nil") + } + if this.MyData != that1.MyData { + return fmt.Errorf("MyData this(%v) Not Equal that(%v)", this.MyData, that1.MyData) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyMessage) + if !ok { + that2, ok := that.(MyMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyData != that1.MyData { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&data.MyMessage{") + s = append(s, "MyData: "+fmt.Sprintf("%#v", this.MyData)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringData(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *MyMessage) 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 *MyMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MyData != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintData(dAtA, i, uint64(m.MyData)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintData(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 NewPopulatedMyMessage(r randyData, easy bool) *MyMessage { + this := &MyMessage{} + this.MyData = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedData(r, 2) + } + return this +} + +type randyData interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneData(r randyData) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringData(r randyData) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneData(r) + } + return string(tmps) +} +func randUnrecognizedData(r randyData, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldData(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldData(dAtA []byte, r randyData, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateData(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateData(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateData(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MyMessage) Size() (n int) { + var l int + _ = l + if m.MyData != 0 { + n += 1 + sovData(uint64(m.MyData)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovData(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozData(x uint64) (n int) { + return sovData(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MyMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyMessage{`, + `MyData:` + fmt.Sprintf("%v", this.MyData) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringData(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MyMessage) 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 ErrIntOverflowData + } + 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: MyMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyData", wireType) + } + m.MyData = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowData + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MyData |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipData(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthData + } + 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 skipData(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, ErrIntOverflowData + } + 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, ErrIntOverflowData + } + 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, ErrIntOverflowData + } + 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, ErrInvalidLengthData + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowData + } + 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 := skipData(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 ( + ErrInvalidLengthData = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowData = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("data.proto", fileDescriptor_data_ad073f7719d49453) } + +var fileDescriptor_data_ad073f7719d49453 = []byte{ + // 160 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x49, 0x2c, 0x49, + 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x70, 0x71, 0xfa, 0x56, 0xfa, 0xa6, + 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x89, 0x73, 0xb1, 0xe7, 0x56, 0xc6, 0x83, 0x8c, 0x91, 0x60, + 0x54, 0x60, 0xd4, 0xe0, 0x0d, 0x62, 0xcb, 0xad, 0x74, 0x49, 0x2c, 0x49, 0x74, 0xd2, 0xb9, 0xf1, + 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x6c, + 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xc9, 0x31, + 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x49, 0x6c, 0x60, + 0xa3, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x4f, 0xfb, 0xa7, 0x9d, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/data/data.proto b/deps/github.com/gogo/protobuf/test/data/data.proto new file mode 100644 index 000000000..ff6dcd30b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/data/data.proto @@ -0,0 +1,49 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package data; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message MyMessage { + uint32 my_data = 1; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/data/datapb_test.go b/deps/github.com/gogo/protobuf/test/data/datapb_test.go new file mode 100644 index 000000000..f9ebbcc66 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/data/datapb_test.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: data.proto + +package data + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMyMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/defaultconflict/df.proto b/deps/github.com/gogo/protobuf/test/defaultconflict/df.proto new file mode 100644 index 000000000..9ec763d32 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/defaultconflict/df.proto @@ -0,0 +1,40 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.face_all) = true; +option (gogoproto.goproto_getters_all) = false; + +message A { + optional int64 Field1 = 1 [default=1234]; +} + diff --git a/deps/github.com/gogo/protobuf/test/defaultconflict/dg.proto b/deps/github.com/gogo/protobuf/test/defaultconflict/dg.proto new file mode 100644 index 000000000..2d251e278 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/defaultconflict/dg.proto @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_getters_all) = false; + +message A { + optional int64 Field1 = 1 [default=1234]; +} + diff --git a/deps/github.com/gogo/protobuf/test/defaultconflict/doc.go b/deps/github.com/gogo/protobuf/test/defaultconflict/doc.go new file mode 100644 index 000000000..9762d2038 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/defaultconflict/doc.go @@ -0,0 +1 @@ +package defaultcheck diff --git a/deps/github.com/gogo/protobuf/test/defaultconflict/nc.proto b/deps/github.com/gogo/protobuf/test/defaultconflict/nc.proto new file mode 100644 index 000000000..6bddd0794 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/defaultconflict/nc.proto @@ -0,0 +1,37 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1 [default = 1234, (gogoproto.nullable) = false];; +} + diff --git a/deps/github.com/gogo/protobuf/test/defaultconflict/nc_test.go b/deps/github.com/gogo/protobuf/test/defaultconflict/nc_test.go new file mode 100644 index 000000000..522ce9c1c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/defaultconflict/nc_test.go @@ -0,0 +1,68 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package defaultcheck + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func testDefaultConflict(t *testing.T, name string) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove(name + ".pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestNullableDefault(t *testing.T) { + testDefaultConflict(t, "nc") +} + +func TestNullableExtension(t *testing.T) { + testDefaultConflict(t, "nx") +} + +func TestNullableEnum(t *testing.T) { + testDefaultConflict(t, "ne") +} + +func TestFaceDefault(t *testing.T) { + testDefaultConflict(t, "df") +} + +func TestNoGettersDefault(t *testing.T) { + testDefaultConflict(t, "dg") +} diff --git a/deps/github.com/gogo/protobuf/test/defaultconflict/ne.proto b/deps/github.com/gogo/protobuf/test/defaultconflict/ne.proto new file mode 100644 index 000000000..c5664d7a1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/defaultconflict/ne.proto @@ -0,0 +1,42 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +enum E { + P = 10; + Q = 11; +} + +message A { + optional E Field1 = 1 [(gogoproto.nullable) = false]; +} + diff --git a/deps/github.com/gogo/protobuf/test/defaultconflict/nx.proto b/deps/github.com/gogo/protobuf/test/defaultconflict/nx.proto new file mode 100644 index 000000000..1f074e337 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/defaultconflict/nx.proto @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + extensions 1 to max; +} + +extend A { + optional int64 Field1 = 1 [(gogoproto.nullable) = false]; +} + diff --git a/deps/github.com/gogo/protobuf/test/deterministic/Makefile b/deps/github.com/gogo/protobuf/test/deterministic/Makefile new file mode 100644 index 000000000..dbb28154f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/deterministic/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. deterministic.proto \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/deterministic/deterministic.pb.go b/deps/github.com/gogo/protobuf/test/deterministic/deterministic.pb.go new file mode 100644 index 000000000..ad24d7bc1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/deterministic/deterministic.pb.go @@ -0,0 +1,1310 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: deterministic.proto + +package deterministic + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type OrderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrderedMap) Reset() { *m = OrderedMap{} } +func (m *OrderedMap) String() string { return proto.CompactTextString(m) } +func (*OrderedMap) ProtoMessage() {} +func (*OrderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{0} +} +func (m *OrderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrderedMap.Unmarshal(m, b) +} +func (m *OrderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *OrderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderedMap.Merge(dst, src) +} +func (m *OrderedMap) XXX_Size() int { + return m.Size() +} +func (m *OrderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_OrderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderedMap proto.InternalMessageInfo + +func (m *OrderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type UnorderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnorderedMap) Reset() { *m = UnorderedMap{} } +func (m *UnorderedMap) String() string { return proto.CompactTextString(m) } +func (*UnorderedMap) ProtoMessage() {} +func (*UnorderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{1} +} +func (m *UnorderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnorderedMap.Unmarshal(m, b) +} +func (m *UnorderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnorderedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnorderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnorderedMap.Merge(dst, src) +} +func (m *UnorderedMap) XXX_Size() int { + return m.Size() +} +func (m *UnorderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_UnorderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_UnorderedMap proto.InternalMessageInfo + +func (m *UnorderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type MapNoMarshaler struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapNoMarshaler) Reset() { *m = MapNoMarshaler{} } +func (m *MapNoMarshaler) String() string { return proto.CompactTextString(m) } +func (*MapNoMarshaler) ProtoMessage() {} +func (*MapNoMarshaler) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{2} +} +func (m *MapNoMarshaler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapNoMarshaler.Unmarshal(m, b) +} +func (m *MapNoMarshaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapNoMarshaler.Marshal(b, m, deterministic) +} +func (dst *MapNoMarshaler) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapNoMarshaler.Merge(dst, src) +} +func (m *MapNoMarshaler) XXX_Size() int { + return xxx_messageInfo_MapNoMarshaler.Size(m) +} +func (m *MapNoMarshaler) XXX_DiscardUnknown() { + xxx_messageInfo_MapNoMarshaler.DiscardUnknown(m) +} + +var xxx_messageInfo_MapNoMarshaler proto.InternalMessageInfo + +func (m *MapNoMarshaler) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type NestedOrderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NestedMap *NestedMap1 `protobuf:"bytes,2,opt,name=NestedMap" json:"NestedMap,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedOrderedMap) Reset() { *m = NestedOrderedMap{} } +func (m *NestedOrderedMap) String() string { return proto.CompactTextString(m) } +func (*NestedOrderedMap) ProtoMessage() {} +func (*NestedOrderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{3} +} +func (m *NestedOrderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedOrderedMap.Unmarshal(m, b) +} +func (m *NestedOrderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *NestedOrderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedOrderedMap.Merge(dst, src) +} +func (m *NestedOrderedMap) XXX_Size() int { + return m.Size() +} +func (m *NestedOrderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_NestedOrderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedOrderedMap proto.InternalMessageInfo + +func (m *NestedOrderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +func (m *NestedOrderedMap) GetNestedMap() *NestedMap1 { + if m != nil { + return m.NestedMap + } + return nil +} + +type NestedMap1 struct { + NestedStringMap map[string]string `protobuf:"bytes,1,rep,name=NestedStringMap" json:"NestedStringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedMap1) Reset() { *m = NestedMap1{} } +func (m *NestedMap1) String() string { return proto.CompactTextString(m) } +func (*NestedMap1) ProtoMessage() {} +func (*NestedMap1) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{4} +} +func (m *NestedMap1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedMap1.Unmarshal(m, b) +} +func (m *NestedMap1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *NestedMap1) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedMap1.Merge(dst, src) +} +func (m *NestedMap1) XXX_Size() int { + return m.Size() +} +func (m *NestedMap1) XXX_DiscardUnknown() { + xxx_messageInfo_NestedMap1.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedMap1 proto.InternalMessageInfo + +func (m *NestedMap1) GetNestedStringMap() map[string]string { + if m != nil { + return m.NestedStringMap + } + return nil +} + +type NestedUnorderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NestedMap *NestedMap2 `protobuf:"bytes,2,opt,name=NestedMap" json:"NestedMap,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedUnorderedMap) Reset() { *m = NestedUnorderedMap{} } +func (m *NestedUnorderedMap) String() string { return proto.CompactTextString(m) } +func (*NestedUnorderedMap) ProtoMessage() {} +func (*NestedUnorderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{5} +} +func (m *NestedUnorderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedUnorderedMap.Unmarshal(m, b) +} +func (m *NestedUnorderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedUnorderedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedUnorderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedUnorderedMap.Merge(dst, src) +} +func (m *NestedUnorderedMap) XXX_Size() int { + return m.Size() +} +func (m *NestedUnorderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_NestedUnorderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedUnorderedMap proto.InternalMessageInfo + +func (m *NestedUnorderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +func (m *NestedUnorderedMap) GetNestedMap() *NestedMap2 { + if m != nil { + return m.NestedMap + } + return nil +} + +type NestedMap2 struct { + NestedStringMap map[string]string `protobuf:"bytes,1,rep,name=NestedStringMap" json:"NestedStringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedMap2) Reset() { *m = NestedMap2{} } +func (m *NestedMap2) String() string { return proto.CompactTextString(m) } +func (*NestedMap2) ProtoMessage() {} +func (*NestedMap2) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{6} +} +func (m *NestedMap2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedMap2.Unmarshal(m, b) +} +func (m *NestedMap2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedMap2.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedMap2) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedMap2.Merge(dst, src) +} +func (m *NestedMap2) XXX_Size() int { + return m.Size() +} +func (m *NestedMap2) XXX_DiscardUnknown() { + xxx_messageInfo_NestedMap2.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedMap2 proto.InternalMessageInfo + +func (m *NestedMap2) GetNestedStringMap() map[string]string { + if m != nil { + return m.NestedStringMap + } + return nil +} + +func init() { + proto.RegisterType((*OrderedMap)(nil), "deterministic.OrderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.OrderedMap.StringMapEntry") + proto.RegisterType((*UnorderedMap)(nil), "deterministic.UnorderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.UnorderedMap.StringMapEntry") + proto.RegisterType((*MapNoMarshaler)(nil), "deterministic.MapNoMarshaler") + proto.RegisterMapType((map[string]string)(nil), "deterministic.MapNoMarshaler.StringMapEntry") + proto.RegisterType((*NestedOrderedMap)(nil), "deterministic.NestedOrderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedOrderedMap.StringMapEntry") + proto.RegisterType((*NestedMap1)(nil), "deterministic.NestedMap1") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedMap1.NestedStringMapEntry") + proto.RegisterType((*NestedUnorderedMap)(nil), "deterministic.NestedUnorderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedUnorderedMap.StringMapEntry") + proto.RegisterType((*NestedMap2)(nil), "deterministic.NestedMap2") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedMap2.NestedStringMapEntry") +} +func (this *OrderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrderedMap) + if !ok { + that2, ok := that.(OrderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrderedMap) + if !ok { + that2, ok := that.(OrderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnorderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnorderedMap) + if !ok { + that2, ok := that.(UnorderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnorderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnorderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnorderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnorderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnorderedMap) + if !ok { + that2, ok := that.(UnorderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapNoMarshaler) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapNoMarshaler) + if !ok { + that2, ok := that.(MapNoMarshaler) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapNoMarshaler") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapNoMarshaler but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapNoMarshaler but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapNoMarshaler) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapNoMarshaler) + if !ok { + that2, ok := that.(MapNoMarshaler) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedOrderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedOrderedMap) + if !ok { + that2, ok := that.(NestedOrderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedOrderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedOrderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedOrderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return fmt.Errorf("NestedMap this(%v) Not Equal that(%v)", this.NestedMap, that1.NestedMap) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedOrderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedOrderedMap) + if !ok { + that2, ok := that.(NestedOrderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedMap1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedMap1) + if !ok { + that2, ok := that.(NestedMap1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedMap1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedMap1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedMap1 but is not nil && this == nil") + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return fmt.Errorf("NestedStringMap this(%v) Not Equal that(%v)", len(this.NestedStringMap), len(that1.NestedStringMap)) + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return fmt.Errorf("NestedStringMap this[%v](%v) Not Equal that[%v](%v)", i, this.NestedStringMap[i], i, that1.NestedStringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedMap1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedMap1) + if !ok { + that2, ok := that.(NestedMap1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return false + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedUnorderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedUnorderedMap) + if !ok { + that2, ok := that.(NestedUnorderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedUnorderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedUnorderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedUnorderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return fmt.Errorf("NestedMap this(%v) Not Equal that(%v)", this.NestedMap, that1.NestedMap) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedUnorderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedUnorderedMap) + if !ok { + that2, ok := that.(NestedUnorderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedMap2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedMap2) + if !ok { + that2, ok := that.(NestedMap2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedMap2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedMap2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedMap2 but is not nil && this == nil") + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return fmt.Errorf("NestedStringMap this(%v) Not Equal that(%v)", len(this.NestedStringMap), len(that1.NestedStringMap)) + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return fmt.Errorf("NestedStringMap this[%v](%v) Not Equal that[%v](%v)", i, this.NestedStringMap[i], i, that1.NestedStringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedMap2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedMap2) + if !ok { + that2, ok := that.(NestedMap2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return false + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *OrderedMap) 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 *OrderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnorderedMap) 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 *UnorderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedOrderedMap) 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 *NestedOrderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.NestedMap != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(m.NestedMap.Size())) + n1, err := m.NestedMap.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 *NestedMap1) 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 *NestedMap1) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedStringMap) > 0 { + keysForNestedStringMap := make([]string, 0, len(m.NestedStringMap)) + for k := range m.NestedStringMap { + keysForNestedStringMap = append(keysForNestedStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedStringMap) + for _, k := range keysForNestedStringMap { + dAtA[i] = 0xa + i++ + v := m.NestedStringMap[string(k)] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedUnorderedMap) 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 *NestedUnorderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.NestedMap != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(m.NestedMap.Size())) + n2, err := m.NestedMap.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 *NestedMap2) 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 *NestedMap2) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedStringMap) > 0 { + for k := range m.NestedStringMap { + dAtA[i] = 0xa + i++ + v := m.NestedStringMap[k] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintDeterministic(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 *OrderedMap) Size() (n int) { + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnorderedMap) Size() (n int) { + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapNoMarshaler) Size() (n int) { + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedOrderedMap) Size() (n int) { + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.NestedMap != nil { + l = m.NestedMap.Size() + n += 1 + l + sovDeterministic(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedMap1) Size() (n int) { + var l int + _ = l + if len(m.NestedStringMap) > 0 { + for k, v := range m.NestedStringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedUnorderedMap) Size() (n int) { + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.NestedMap != nil { + l = m.NestedMap.Size() + n += 1 + l + sovDeterministic(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedMap2) Size() (n int) { + var l int + _ = l + if len(m.NestedStringMap) > 0 { + for k, v := range m.NestedStringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovDeterministic(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozDeterministic(x uint64) (n int) { + return sovDeterministic(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("deterministic.proto", fileDescriptor_deterministic_f6340fb8decdd007) } + +var fileDescriptor_deterministic_f6340fb8decdd007 = []byte{ + // 385 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12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, 0xbe, 0x89, 0x05, 0x7e, 0xf9, 0xbe, 0x89, 0x45, 0xc5, 0x19, 0x89, 0x39, 0xa9, + 0x45, 0x42, 0x5e, 0x98, 0x8e, 0xd4, 0x41, 0x73, 0x24, 0xaa, 0x0e, 0x9a, 0x39, 0x93, 0xa5, 0x03, + 0xe4, 0xc4, 0x87, 0x8c, 0x5c, 0x02, 0x7e, 0xa9, 0xc5, 0x25, 0xa9, 0x29, 0x48, 0x51, 0xed, 0x83, + 0xe9, 0x48, 0x3d, 0x34, 0x47, 0xa2, 0xeb, 0xc1, 0xed, 0x4c, 0x21, 0x73, 0x2e, 0x4e, 0x88, 0x6a, + 0x90, 0x69, 0x20, 0x67, 0x70, 0x1b, 0x49, 0x62, 0x35, 0xcd, 0x37, 0xb1, 0xc0, 0x30, 0x08, 0xa1, + 0x96, 0x6a, 0x29, 0x65, 0x0b, 0x23, 0x17, 0x17, 0xc2, 0x06, 0xa1, 0x08, 0x2e, 0x7e, 0x08, 0x8f, + 0x38, 0x3f, 0x82, 0xf4, 0xe8, 0xa1, 0x69, 0x80, 0xf8, 0x11, 0xdd, 0x18, 0x29, 0x27, 0x2e, 0x11, + 0x6c, 0x0a, 0xc9, 0x74, 0xf6, 0x53, 0x46, 0x2e, 0x21, 0x88, 0x71, 0x28, 0xc9, 0xdc, 0x0f, 0x33, + 0x72, 0x0c, 0xb0, 0x3a, 0x9c, 0xb8, 0xc4, 0x4e, 0x52, 0xf4, 0x18, 0x51, 0x3f, 0x7a, 0x18, 0x50, + 0xa3, 0xc7, 0x88, 0x8c, 0xe8, 0x31, 0x1a, 0x80, 0xe8, 0x61, 0x70, 0x12, 0x78, 0xf0, 0x50, 0x8e, + 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x3f, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, + 0x97, 0x9b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xcf, 0x58, 0xa8, 0x8c, 0x05, 0x00, + 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/deterministic/deterministic.proto b/deps/github.com/gogo/protobuf/test/deterministic/deterministic.proto new file mode 100644 index 000000000..0be9c2fee --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/deterministic/deterministic.proto @@ -0,0 +1,81 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package deterministic; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.enum_stringer_all) = true; + +message OrderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = true; + map StringMap = 1; +} + +message UnorderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = false; + map StringMap = 1; +} + +message MapNoMarshaler { + option (gogoproto.marshaler) = false; + map StringMap = 1; +} + +message NestedOrderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = true; + map StringMap = 1; + NestedMap1 NestedMap = 2; +} + +message NestedMap1 { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = true; + map NestedStringMap = 1; +} + +message NestedUnorderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = false; + map StringMap = 1; + NestedMap2 NestedMap = 2; +} + +message NestedMap2 { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = false; + map NestedStringMap = 1; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/deterministic/deterministic_test.go b/deps/github.com/gogo/protobuf/test/deterministic/deterministic_test.go new file mode 100644 index 000000000..e6edc530e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/deterministic/deterministic_test.go @@ -0,0 +1,207 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package deterministic + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + "testing" +) + +func getTestMap() map[string]string { + return map[string]string{ + "a": "1", + "b": "2", + "c": "3", + "d": "4", + "e": "5", + "f": "6", + "g": "7", + "h": "8", + "i": "9", + "j": "10", + "k": "11", + "l": "12", + "m": "13", + "n": "14", + } + +} + +func TestOrderedMap(t *testing.T) { + var b proto.Buffer + m := getTestMap() + in := &OrderedMap{ + StringMap: m, + } + if err := b.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b.Bytes() + out := &OrderedMap{} + if err := proto.Unmarshal(data1, out); err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + data2, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same\n", data1, "\n", data2) + } +} + +func TestUnorderedMap(t *testing.T) { + m := getTestMap() + in := &UnorderedMap{ + StringMap: m, + } + var b proto.Buffer + b.SetDeterministic(true) + if err := b.Marshal(in); err == nil { + t.Fatalf("Expected Marshal to return error rejecting deterministic flag") + } +} + +func TestMapNoMarshaler(t *testing.T) { + m := getTestMap() + in := &MapNoMarshaler{ + StringMap: m, + } + + var b1 proto.Buffer + b1.SetDeterministic(true) + if err := b1.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b1.Bytes() + + out := &MapNoMarshaler{} + err := proto.Unmarshal(data1, out) + if err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + + var b2 proto.Buffer + b2.SetDeterministic(true) + if err := b2.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data2 := b2.Bytes() + + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same:\n", data1, "\n", data2) + } +} + +func TestOrderedNestedMap(t *testing.T) { + var b proto.Buffer + in := &NestedOrderedMap{ + StringMap: getTestMap(), + NestedMap: &NestedMap1{ + NestedStringMap: getTestMap(), + }, + } + if err := b.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b.Bytes() + out := &NestedOrderedMap{} + if err := proto.Unmarshal(data1, out); err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + data2, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same\n", data1, "\n", data2) + } +} + +func TestUnorderedNestedMap(t *testing.T) { + in := &NestedUnorderedMap{ + StringMap: getTestMap(), + NestedMap: &NestedMap2{ + NestedStringMap: getTestMap(), + }, + } + var b proto.Buffer + b.SetDeterministic(true) + if err := b.Marshal(in); err == nil { + t.Fatalf("Expected Marshal to return error rejecting deterministic flag") + } +} + +func TestOrderedNestedStructMap(t *testing.T) { + var b proto.Buffer + m := getTestMap() + in := &NestedMap1{ + NestedStringMap: m, + } + if err := b.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b.Bytes() + out := &NestedMap1{} + if err := proto.Unmarshal(data1, out); err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + data2, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same\n", data1, "\n", data2) + } +} + +func TestUnorderedNestedStructMap(t *testing.T) { + m := getTestMap() + in := &NestedMap2{ + NestedStringMap: m, + } + var b proto.Buffer + b.SetDeterministic(true) + if err := b.Marshal(in); err == nil { + t.Fatalf("Expected Marshal to return error rejecting deterministic flag") + } +} diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/.gitignore b/deps/github.com/gogo/protobuf/test/embedconflict/.gitignore new file mode 100644 index 000000000..c61a5e8b0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/.gitignore @@ -0,0 +1 @@ +*.pb.go diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/doc.go b/deps/github.com/gogo/protobuf/test/embedconflict/doc.go new file mode 100644 index 000000000..484e94831 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/doc.go @@ -0,0 +1 @@ +package embedconflict diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/eb.proto b/deps/github.com/gogo/protobuf/test/embedconflict/eb.proto new file mode 100644 index 000000000..80bedac67 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/eb.proto @@ -0,0 +1,38 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message TakesLongTooDebug { + optional bytes Field1 = 1; + optional bytes Field2 = 2 [(gogoproto.nullable)=false, (gogoproto.embed)=true]; +} diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/ec.proto b/deps/github.com/gogo/protobuf/test/embedconflict/ec.proto new file mode 100644 index 000000000..cbf0cd4cf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/ec.proto @@ -0,0 +1,40 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1; + optional B B = 2 [(gogoproto.embed) = true]; +} + +message B { + optional double Field1 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/ec_test.go b/deps/github.com/gogo/protobuf/test/embedconflict/ec_test.go new file mode 100644 index 000000000..94e0e2573 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/ec_test.go @@ -0,0 +1,119 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package embedconflict + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func TestEmbedConflict(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ec.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("ec.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestEmbedMarshaler(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "em.proto") + data, err := cmd.CombinedOutput() + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + if !strings.Contains(dataStr, "WARNING: found non-") || !strings.Contains(dataStr, "unsafe_marshaler") { + t.Errorf("Expected WARNING: found non-[marshaler unsafe_marshaler] C with embedded marshaler D") + } + if err = os.Remove("em.pb.go"); err != nil { + t.Error(err) + } +} + +func TestEmbedExtend(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ee.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("ee.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestCustomName(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "en.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("en.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestRepeatedEmbed(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "er.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("er.pb.go"); err != nil { + t.Error(err) + } + } + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + warning := "ERROR: found repeated embedded field B in message A" + if !strings.Contains(dataStr, warning) { + t.Errorf("Expected " + warning) + } +} + +func TestTakesTooLongToDebug(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "eb.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("eb.pb.go"); err != nil { + t.Error(err) + } + } + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + warning := "ERROR: found embedded bytes field" + if !strings.Contains(dataStr, warning) { + t.Errorf("Expected " + warning) + } +} diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/ee.proto b/deps/github.com/gogo/protobuf/test/embedconflict/ee.proto new file mode 100644 index 000000000..9f5bc38cb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/ee.proto @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message E { + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend E { + optional int64 Field1 = 100 [(gogoproto.embed) = true]; +} diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/em.proto b/deps/github.com/gogo/protobuf/test/embedconflict/em.proto new file mode 100644 index 000000000..f03c1dcd5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/em.proto @@ -0,0 +1,42 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message C { + optional int64 Field1 = 1; + optional D D = 2 [(gogoproto.embed) = true]; +} + +message D { + option (gogoproto.marshaler) = true; + optional double Field2 = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/en.proto b/deps/github.com/gogo/protobuf/test/embedconflict/en.proto new file mode 100644 index 000000000..c11bfd629 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/en.proto @@ -0,0 +1,40 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message F { + optional G G = 2 [(gogoproto.embed) = true, (gogoproto.customname) = "G"]; +} + +message G { + optional int64 Field1 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/embedconflict/er.proto b/deps/github.com/gogo/protobuf/test/embedconflict/er.proto new file mode 100644 index 000000000..da89a622b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/embedconflict/er.proto @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1; + repeated B B = 2 [(gogoproto.embed) = true]; +} + +message B { + optional double Field2 = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/empty-issue70/Makefile b/deps/github.com/gogo/protobuf/test/empty-issue70/Makefile new file mode 100644 index 000000000..770f107ce --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/empty-issue70/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. empty.proto) diff --git a/deps/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go b/deps/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go new file mode 100644 index 000000000..a1091b762 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go @@ -0,0 +1,223 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: empty.proto + +package empty + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TestRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestRequest) Reset() { *m = TestRequest{} } +func (m *TestRequest) String() string { return proto.CompactTextString(m) } +func (*TestRequest) ProtoMessage() {} +func (*TestRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_empty_5bb98b2f7e13ce4b, []int{0} +} +func (m *TestRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestRequest.Marshal(b, m, deterministic) +} +func (dst *TestRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestRequest.Merge(dst, src) +} +func (m *TestRequest) XXX_Size() int { + return xxx_messageInfo_TestRequest.Size(m) +} +func (m *TestRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TestRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TestRequest proto.InternalMessageInfo + +func init() { + proto.RegisterType((*TestRequest)(nil), "empty.TestRequest") +} +func (m *TestRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEmpty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEmpty(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEmpty + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEmpty(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowEmpty + } + 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, ErrInvalidLengthEmpty + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + 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 := skipEmpty(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 ( + ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("empty.proto", fileDescriptor_empty_5bb98b2f7e13ce4b) } + +var fileDescriptor_empty_5bb98b2f7e13ce4b = []byte{ + // 92 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xf1, 0x72, 0x71, 0x87, 0xa4, 0x16, + 0x97, 0x04, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x38, 0xb1, 0x5c, 0x78, 0x24, 0xc7, 0x08, 0x08, + 0x00, 0x00, 0xff, 0xff, 0x0e, 0xe3, 0x23, 0x3d, 0x58, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/empty-issue70/empty.proto b/deps/github.com/gogo/protobuf/test/empty-issue70/empty.proto new file mode 100644 index 000000000..eacfded1f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/empty-issue70/empty.proto @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax="proto2"; + +package empty; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message TestRequest { + +} diff --git a/deps/github.com/gogo/protobuf/test/empty-issue70/empty_test.go b/deps/github.com/gogo/protobuf/test/empty-issue70/empty_test.go new file mode 100644 index 000000000..19e12c215 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/empty-issue70/empty_test.go @@ -0,0 +1,37 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package empty + +import ( + "testing" +) + +func TestEmpty(t *testing.T) { + +} diff --git a/deps/github.com/gogo/protobuf/test/enumcustomname/Makefile b/deps/github.com/gogo/protobuf/test/enumcustomname/Makefile new file mode 100644 index 000000000..b5da30775 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumcustomname/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumcustomname.proto) diff --git a/deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go b/deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go new file mode 100644 index 000000000..8564efb46 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumcustomname.proto + +package enumcustomname + +/* + Package enumcustomname tests the behavior of enum_customname and + enumvalue_customname extensions. +*/ + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test" + +import strconv "strconv" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MyCustomEnum int32 + +const ( + // The following field will take on the custom name and the prefix, joined + // by an underscore. + MyCustomEnum_MyBetterNameA MyCustomEnum = 0 + MyCustomEnum_B MyCustomEnum = 1 +) + +var MyCustomEnum_name = map[int32]string{ + 0: "A", + 1: "B", +} +var MyCustomEnum_value = map[string]int32{ + "A": 0, + "B": 1, +} + +func (x MyCustomEnum) Enum() *MyCustomEnum { + p := new(MyCustomEnum) + *p = x + return p +} +func (x MyCustomEnum) String() string { + return proto.EnumName(MyCustomEnum_name, int32(x)) +} +func (x *MyCustomEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyCustomEnum_value, data, "MyCustomEnum") + if err != nil { + return err + } + *x = MyCustomEnum(value) + return nil +} +func (MyCustomEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{0} +} + +type MyCustomUnprefixedEnum int32 + +const ( + MyBetterNameUnprefixedA MyCustomUnprefixedEnum = 0 + UNPREFIXED_B MyCustomUnprefixedEnum = 1 +) + +var MyCustomUnprefixedEnum_name = map[int32]string{ + 0: "UNPREFIXED_A", + 1: "UNPREFIXED_B", +} +var MyCustomUnprefixedEnum_value = map[string]int32{ + "UNPREFIXED_A": 0, + "UNPREFIXED_B": 1, +} + +func (x MyCustomUnprefixedEnum) Enum() *MyCustomUnprefixedEnum { + p := new(MyCustomUnprefixedEnum) + *p = x + return p +} +func (x MyCustomUnprefixedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MyCustomUnprefixedEnum_name, int32(x)) +} +func (x *MyCustomUnprefixedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyCustomUnprefixedEnum_value, data, "MyCustomUnprefixedEnum") + if err != nil { + return err + } + *x = MyCustomUnprefixedEnum(value) + return nil +} +func (MyCustomUnprefixedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{1} +} + +type MyEnumWithEnumStringer int32 + +const ( + MyEnumWithEnumStringer_EnumValueStringerA MyEnumWithEnumStringer = 0 + MyEnumWithEnumStringer_STRINGER_B MyEnumWithEnumStringer = 1 +) + +var MyEnumWithEnumStringer_name = map[int32]string{ + 0: "STRINGER_A", + 1: "STRINGER_B", +} +var MyEnumWithEnumStringer_value = map[string]int32{ + "STRINGER_A": 0, + "STRINGER_B": 1, +} + +func (x MyEnumWithEnumStringer) Enum() *MyEnumWithEnumStringer { + p := new(MyEnumWithEnumStringer) + *p = x + return p +} +func (x MyEnumWithEnumStringer) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MyEnumWithEnumStringer_name, int32(x)) +} +func (x *MyEnumWithEnumStringer) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyEnumWithEnumStringer_value, data, "MyEnumWithEnumStringer") + if err != nil { + return err + } + *x = MyEnumWithEnumStringer(value) + return nil +} +func (MyEnumWithEnumStringer) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{2} +} + +type OnlyEnums struct { + MyEnum *MyCustomEnum `protobuf:"varint,1,opt,name=my_enum,json=myEnum,enum=enumcustomname.MyCustomEnum" json:"my_enum,omitempty"` + MyEnumDefaultA *MyCustomEnum `protobuf:"varint,2,opt,name=my_enum_default_a,json=myEnumDefaultA,enum=enumcustomname.MyCustomEnum,def=0" json:"my_enum_default_a,omitempty"` + MyEnumDefaultB *MyCustomEnum `protobuf:"varint,3,opt,name=my_enum_default_b,json=myEnumDefaultB,enum=enumcustomname.MyCustomEnum,def=1" json:"my_enum_default_b,omitempty"` + MyUnprefixedEnum *MyCustomUnprefixedEnum `protobuf:"varint,4,opt,name=my_unprefixed_enum,json=myUnprefixedEnum,enum=enumcustomname.MyCustomUnprefixedEnum" json:"my_unprefixed_enum,omitempty"` + MyUnprefixedEnumDefaultA *MyCustomUnprefixedEnum `protobuf:"varint,5,opt,name=my_unprefixed_enum_default_a,json=myUnprefixedEnumDefaultA,enum=enumcustomname.MyCustomUnprefixedEnum,def=0" json:"my_unprefixed_enum_default_a,omitempty"` + MyUnprefixedEnumDefaultB *MyCustomUnprefixedEnum `protobuf:"varint,6,opt,name=my_unprefixed_enum_default_b,json=myUnprefixedEnumDefaultB,enum=enumcustomname.MyCustomUnprefixedEnum,def=1" json:"my_unprefixed_enum_default_b,omitempty"` + YetAnotherTestEnum *test.YetAnotherTestEnum `protobuf:"varint,7,opt,name=yet_another_test_enum,json=yetAnotherTestEnum,enum=test.YetAnotherTestEnum" json:"yet_another_test_enum,omitempty"` + YetAnotherTestEnumDefaultAa *test.YetAnotherTestEnum `protobuf:"varint,8,opt,name=yet_another_test_enum_default_aa,json=yetAnotherTestEnumDefaultAa,enum=test.YetAnotherTestEnum,def=0" json:"yet_another_test_enum_default_aa,omitempty"` + YetAnotherTestEnumDefaultBb *test.YetAnotherTestEnum `protobuf:"varint,9,opt,name=yet_another_test_enum_default_bb,json=yetAnotherTestEnumDefaultBb,enum=test.YetAnotherTestEnum,def=1" json:"yet_another_test_enum_default_bb,omitempty"` + YetYetAnotherTestEnum *test.YetYetAnotherTestEnum `protobuf:"varint,10,opt,name=yet_yet_another_test_enum,json=yetYetAnotherTestEnum,enum=test.YetYetAnotherTestEnum" json:"yet_yet_another_test_enum,omitempty"` + YetYetAnotherTestEnumDefaultCc *test.YetYetAnotherTestEnum `protobuf:"varint,11,opt,name=yet_yet_another_test_enum_default_cc,json=yetYetAnotherTestEnumDefaultCc,enum=test.YetYetAnotherTestEnum,def=0" json:"yet_yet_another_test_enum_default_cc,omitempty"` + YetYetAnotherTestEnumDefaultDd *test.YetYetAnotherTestEnum `protobuf:"varint,12,opt,name=yet_yet_another_test_enum_default_dd,json=yetYetAnotherTestEnumDefaultDd,enum=test.YetYetAnotherTestEnum,def=1" json:"yet_yet_another_test_enum_default_dd,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OnlyEnums) Reset() { *m = OnlyEnums{} } +func (m *OnlyEnums) String() string { return proto.CompactTextString(m) } +func (*OnlyEnums) ProtoMessage() {} +func (*OnlyEnums) Descriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{0} +} +func (m *OnlyEnums) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OnlyEnums.Unmarshal(m, b) +} +func (m *OnlyEnums) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OnlyEnums.Marshal(b, m, deterministic) +} +func (dst *OnlyEnums) XXX_Merge(src proto.Message) { + xxx_messageInfo_OnlyEnums.Merge(dst, src) +} +func (m *OnlyEnums) XXX_Size() int { + return xxx_messageInfo_OnlyEnums.Size(m) +} +func (m *OnlyEnums) XXX_DiscardUnknown() { + xxx_messageInfo_OnlyEnums.DiscardUnknown(m) +} + +var xxx_messageInfo_OnlyEnums proto.InternalMessageInfo + +const Default_OnlyEnums_MyEnumDefaultA MyCustomEnum = MyCustomEnum_MyBetterNameA +const Default_OnlyEnums_MyEnumDefaultB MyCustomEnum = MyCustomEnum_B +const Default_OnlyEnums_MyUnprefixedEnumDefaultA MyCustomUnprefixedEnum = MyBetterNameUnprefixedA +const Default_OnlyEnums_MyUnprefixedEnumDefaultB MyCustomUnprefixedEnum = UNPREFIXED_B +const Default_OnlyEnums_YetAnotherTestEnumDefaultAa test.YetAnotherTestEnum = test.AA +const Default_OnlyEnums_YetAnotherTestEnumDefaultBb test.YetAnotherTestEnum = test.BetterYetBB +const Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_CC +const Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_BetterYetDD + +func (m *OnlyEnums) GetMyEnum() MyCustomEnum { + if m != nil && m.MyEnum != nil { + return *m.MyEnum + } + return MyCustomEnum_MyBetterNameA +} + +func (m *OnlyEnums) GetMyEnumDefaultA() MyCustomEnum { + if m != nil && m.MyEnumDefaultA != nil { + return *m.MyEnumDefaultA + } + return Default_OnlyEnums_MyEnumDefaultA +} + +func (m *OnlyEnums) GetMyEnumDefaultB() MyCustomEnum { + if m != nil && m.MyEnumDefaultB != nil { + return *m.MyEnumDefaultB + } + return Default_OnlyEnums_MyEnumDefaultB +} + +func (m *OnlyEnums) GetMyUnprefixedEnum() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnum != nil { + return *m.MyUnprefixedEnum + } + return MyBetterNameUnprefixedA +} + +func (m *OnlyEnums) GetMyUnprefixedEnumDefaultA() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnumDefaultA != nil { + return *m.MyUnprefixedEnumDefaultA + } + return Default_OnlyEnums_MyUnprefixedEnumDefaultA +} + +func (m *OnlyEnums) GetMyUnprefixedEnumDefaultB() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnumDefaultB != nil { + return *m.MyUnprefixedEnumDefaultB + } + return Default_OnlyEnums_MyUnprefixedEnumDefaultB +} + +func (m *OnlyEnums) GetYetAnotherTestEnum() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnum != nil { + return *m.YetAnotherTestEnum + } + return test.AA +} + +func (m *OnlyEnums) GetYetAnotherTestEnumDefaultAa() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnumDefaultAa != nil { + return *m.YetAnotherTestEnumDefaultAa + } + return Default_OnlyEnums_YetAnotherTestEnumDefaultAa +} + +func (m *OnlyEnums) GetYetAnotherTestEnumDefaultBb() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnumDefaultBb != nil { + return *m.YetAnotherTestEnumDefaultBb + } + return Default_OnlyEnums_YetAnotherTestEnumDefaultBb +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnum() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnum != nil { + return *m.YetYetAnotherTestEnum + } + return test.YetYetAnotherTestEnum_CC +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultCc() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnumDefaultCc != nil { + return *m.YetYetAnotherTestEnumDefaultCc + } + return Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultDd() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnumDefaultDd != nil { + return *m.YetYetAnotherTestEnumDefaultDd + } + return Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd +} + +func init() { + proto.RegisterType((*OnlyEnums)(nil), "enumcustomname.OnlyEnums") + proto.RegisterEnum("enumcustomname.MyCustomEnum", MyCustomEnum_name, MyCustomEnum_value) + proto.RegisterEnum("enumcustomname.MyCustomUnprefixedEnum", MyCustomUnprefixedEnum_name, MyCustomUnprefixedEnum_value) + proto.RegisterEnum("enumcustomname.MyEnumWithEnumStringer", MyEnumWithEnumStringer_name, MyEnumWithEnumStringer_value) +} +func (x MyEnumWithEnumStringer) String() string { + s, ok := MyEnumWithEnumStringer_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +func init() { + proto.RegisterFile("enumcustomname.proto", fileDescriptor_enumcustomname_d428393be9e73607) +} + +var fileDescriptor_enumcustomname_d428393be9e73607 = []byte{ + // 551 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x4f, 0x8f, 0xd2, 0x40, + 0x18, 0xc6, 0x29, 0xba, 0x2c, 0x3b, 0x22, 0xe9, 0x4e, 0x14, 0x47, 0x30, 0x4d, 0xb3, 0x31, 0x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xd7, 0xb3, 0x71, 0xfa, + 0xa0, 0xfe, 0x06, 0x14, 0xa2, 0x87, 0x09, 0x11, 0x90, 0xb0, 0x9c, 0xab, 0x9e, 0xce, 0x17, 0xea, + 0xc3, 0x6e, 0xa8, 0x11, 0xc6, 0x88, 0xdf, 0xb3, 0x28, 0xc1, 0xf0, 0x08, 0x48, 0x9a, 0x2c, 0x55, + 0xe5, 0x9b, 0xa5, 0x52, 0xea, 0x86, 0x6d, 0xb1, 0xc1, 0xbc, 0xa5, 0xfe, 0x1d, 0xc8, 0xf1, 0x25, + 0x86, 0xe7, 0x60, 0xeb, 0xd9, 0xc8, 0xb9, 0x6a, 0x6d, 0xbe, 0x50, 0x9f, 0x6c, 0x3a, 0xde, 0x75, + 0x60, 0x28, 0x6f, 0xc9, 0x39, 0xe6, 0xec, 0xe7, 0x2f, 0x25, 0xf7, 0x7b, 0xa9, 0xe4, 0x6e, 0x96, + 0x4a, 0x65, 0x85, 0xdb, 0x86, 0xd4, 0xbf, 0x81, 0x4a, 0x74, 0xeb, 0xcf, 0x13, 0x36, 0xe6, 0xe7, + 0x25, 0xf3, 0x27, 0xee, 0x88, 0xf8, 0xf0, 0x05, 0x00, 0x97, 0x57, 0xc6, 0x45, 0xef, 0x5d, 0xc7, + 0x10, 0xf0, 0xca, 0x7c, 0xa1, 0x42, 0xae, 0xf8, 0x64, 0x4d, 0x03, 0xb2, 0x92, 0x61, 0x58, 0xde, + 0xd0, 0x71, 0x6a, 0x91, 0x13, 0xff, 0x2c, 0x15, 0xe9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, + 0x65, 0x55, 0xe7, 0xdb, 0x05, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto b/deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto new file mode 100644 index 000000000..0230ddbad --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto @@ -0,0 +1,75 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +// Package enumcustomname tests the behavior of enum_customname and +// enumvalue_customname extensions. +package enumcustomname; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/thetest.proto"; + +enum MyEnum { + option (gogoproto.enum_customname) = "MyCustomEnum"; + + // The following field will take on the custom name and the prefix, joined + // by an underscore. + A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameA"]; + B = 1; // Should be MyCustomEnum_B +} + +enum MyUnprefixedEnum { + option (gogoproto.goproto_enum_prefix) = false; + option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. + option (gogoproto.enum_customname) = "MyCustomUnprefixedEnum"; // no prefix added but type gets name + UNPREFIXED_A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameUnprefixedA"]; + UNPREFIXED_B = 1 ; // Should not pick up prefix above +} + +enum MyEnumWithEnumStringer { + option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. + option (gogoproto.enum_stringer) = true; // ensure it behaves correctly without stringer. + STRINGER_A = 0 [(gogoproto.enumvalue_customname) = "EnumValueStringerA"]; + STRINGER_B = 1; +} + +message OnlyEnums { + optional MyEnum my_enum = 1; + optional MyEnum my_enum_default_a = 2 [default=A]; + optional MyEnum my_enum_default_b = 3 [default=B]; + optional MyUnprefixedEnum my_unprefixed_enum = 4; + optional MyUnprefixedEnum my_unprefixed_enum_default_a = 5 [default=UNPREFIXED_A]; + optional MyUnprefixedEnum my_unprefixed_enum_default_b = 6 [default=UNPREFIXED_B]; + optional test.YetAnotherTestEnum yet_another_test_enum = 7; + optional test.YetAnotherTestEnum yet_another_test_enum_default_aa = 8 [default=AA]; + optional test.YetAnotherTestEnum yet_another_test_enum_default_bb = 9 [default=BB]; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum = 10; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_cc = 11 [default=CC]; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_dd = 12 [default=DD]; +} diff --git a/deps/github.com/gogo/protobuf/test/enumdecl/Makefile b/deps/github.com/gogo/protobuf/test/enumdecl/Makefile new file mode 100644 index 000000000..75d9417ab --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. enumdecl.proto diff --git a/deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go b/deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go new file mode 100644 index 000000000..d50da64d7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go @@ -0,0 +1,486 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdecl.proto + +package enumdecl + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +var MyEnum_name = map[int32]string{ + 0: "A", + 1: "B", +} +var MyEnum_value = map[string]int32{ + "A": 0, + "B": 1, +} + +func (x MyEnum) String() string { + return proto.EnumName(MyEnum_name, int32(x)) +} +func (MyEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumdecl_b298d32d6f1455f8, []int{0} +} + +type Message struct { + EnumeratedField MyEnum `protobuf:"varint,1,opt,name=enumerated_field,json=enumeratedField,proto3,enum=enumdecl.MyEnum" json:"enumerated_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_enumdecl_b298d32d6f1455f8, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetEnumeratedField() MyEnum { + if m != nil { + return m.EnumeratedField + } + return A +} + +func init() { + proto.RegisterType((*Message)(nil), "enumdecl.Message") + proto.RegisterEnum("enumdecl.MyEnum", MyEnum_name, MyEnum_value) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.EnumeratedField != that1.EnumeratedField { + return fmt.Errorf("EnumeratedField this(%v) Not Equal that(%v)", this.EnumeratedField, that1.EnumeratedField) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.EnumeratedField != that1.EnumeratedField { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.EnumeratedField != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintEnumdecl(dAtA, i, uint64(m.EnumeratedField)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintEnumdecl(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 NewPopulatedMessage(r randyEnumdecl, easy bool) *Message { + this := &Message{} + this.EnumeratedField = MyEnum([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumdecl(r, 2) + } + return this +} + +type randyEnumdecl interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEnumdecl(r randyEnumdecl) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEnumdecl(r randyEnumdecl) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneEnumdecl(r) + } + return string(tmps) +} +func randUnrecognizedEnumdecl(r randyEnumdecl, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEnumdecl(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEnumdecl(dAtA []byte, r randyEnumdecl, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEnumdecl(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + var l int + _ = l + if m.EnumeratedField != 0 { + n += 1 + sovEnumdecl(uint64(m.EnumeratedField)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovEnumdecl(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozEnumdecl(x uint64) (n int) { + return sovEnumdecl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) 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 ErrIntOverflowEnumdecl + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumeratedField", wireType) + } + m.EnumeratedField = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEnumdecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EnumeratedField |= (MyEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEnumdecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEnumdecl + } + 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 skipEnumdecl(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, ErrIntOverflowEnumdecl + } + 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, ErrIntOverflowEnumdecl + } + 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, ErrIntOverflowEnumdecl + } + 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, ErrInvalidLengthEnumdecl + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEnumdecl + } + 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 := skipEnumdecl(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 ( + ErrInvalidLengthEnumdecl = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEnumdecl = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("enumdecl.proto", fileDescriptor_enumdecl_b298d32d6f1455f8) } + +var fileDescriptor_enumdecl_b298d32d6f1455f8 = []byte{ + // 205 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcd, 0x2b, 0xcd, + 0x4d, 0x49, 0x4d, 0xce, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x72, 0xe3, 0x62, + 0xf7, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0xb2, 0xe6, 0x12, 0x00, 0x99, 0x92, 0x5a, 0x94, + 0x58, 0x92, 0x9a, 0x12, 0x9f, 0x96, 0x99, 0x9a, 0x93, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x67, + 0x24, 0xa0, 0x07, 0xb7, 0xce, 0xb7, 0xd2, 0x35, 0xaf, 0x34, 0x37, 0x88, 0x1f, 0xa1, 0xd2, 0x0d, + 0xa4, 0x50, 0x4b, 0x81, 0x8b, 0x0d, 0x22, 0x25, 0xc4, 0xca, 0xc5, 0xe8, 0x28, 0xc0, 0x00, 0xa2, + 0x9c, 0x04, 0x18, 0xa5, 0x38, 0x3a, 0x16, 0xcb, 0x31, 0x1c, 0x58, 0x22, 0xc7, 0xe0, 0xa4, 0xf1, + 0xe0, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, + 0x78, 0xe0, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, + 0xc7, 0xf8, 0xe3, 0x91, 0x1c, 0x43, 0xc3, 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0xd3, 0x8c, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x76, 0x04, 0x55, 0xb7, 0xe5, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto b/deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto new file mode 100644 index 000000000..54be1b0ee --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package enumdecl; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +enum MyEnum { + option (gogoproto.enumdecl) = false; + option (gogoproto.goproto_enum_prefix) = false; + A = 0; + B = 1; +} + +message Message { + MyEnum enumerated_field = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go b/deps/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go new file mode 100644 index 000000000..f610e4cc6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdecl.proto + +package enumdecl + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/enumdecl/models.go b/deps/github.com/gogo/protobuf/test/enumdecl/models.go new file mode 100644 index 000000000..cd95bdcb5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl/models.go @@ -0,0 +1,8 @@ +package enumdecl + +type MyEnum int32 + +const ( + A MyEnum = iota + B MyEnum = iota +) diff --git a/deps/github.com/gogo/protobuf/test/enumdecl_all/Makefile b/deps/github.com/gogo/protobuf/test/enumdecl_all/Makefile new file mode 100644 index 000000000..56316b509 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl_all/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. enumdeclall.proto diff --git a/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go b/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go new file mode 100644 index 000000000..0c7c4207c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go @@ -0,0 +1,556 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdeclall.proto + +package enumdeclall + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +var MyEnum_name = map[int32]string{ + 0: "A", + 1: "B", +} +var MyEnum_value = map[string]int32{ + "A": 0, + "B": 1, +} + +func (x MyEnum) String() string { + return proto.EnumName(MyEnum_name, int32(x)) +} +func (MyEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumdeclall_97762bd47095d695, []int{0} +} + +type MyOtherEnum int32 + +const ( + C MyOtherEnum = 0 + D MyOtherEnum = 1 +) + +var MyOtherEnum_name = map[int32]string{ + 0: "C", + 1: "D", +} +var MyOtherEnum_value = map[string]int32{ + "C": 0, + "D": 1, +} + +func (x MyOtherEnum) String() string { + return proto.EnumName(MyOtherEnum_name, int32(x)) +} +func (MyOtherEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumdeclall_97762bd47095d695, []int{1} +} + +type Message struct { + EnumeratedField MyEnum `protobuf:"varint,1,opt,name=enumerated_field,json=enumeratedField,proto3,enum=enumdeclall.MyEnum" json:"enumerated_field,omitempty"` + OtherenumeratedField MyOtherEnum `protobuf:"varint,2,opt,name=otherenumerated_field,json=otherenumeratedField,proto3,enum=enumdeclall.MyOtherEnum" json:"otherenumerated_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_enumdeclall_97762bd47095d695, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetEnumeratedField() MyEnum { + if m != nil { + return m.EnumeratedField + } + return A +} + +func (m *Message) GetOtherenumeratedField() MyOtherEnum { + if m != nil { + return m.OtherenumeratedField + } + return C +} + +func init() { + proto.RegisterType((*Message)(nil), "enumdeclall.Message") + proto.RegisterEnum("enumdeclall.MyEnum", MyEnum_name, MyEnum_value) + proto.RegisterEnum("enumdeclall.MyOtherEnum", MyOtherEnum_name, MyOtherEnum_value) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.EnumeratedField != that1.EnumeratedField { + return fmt.Errorf("EnumeratedField this(%v) Not Equal that(%v)", this.EnumeratedField, that1.EnumeratedField) + } + if this.OtherenumeratedField != that1.OtherenumeratedField { + return fmt.Errorf("OtherenumeratedField this(%v) Not Equal that(%v)", this.OtherenumeratedField, that1.OtherenumeratedField) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.EnumeratedField != that1.EnumeratedField { + return false + } + if this.OtherenumeratedField != that1.OtherenumeratedField { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.EnumeratedField != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintEnumdeclall(dAtA, i, uint64(m.EnumeratedField)) + } + if m.OtherenumeratedField != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintEnumdeclall(dAtA, i, uint64(m.OtherenumeratedField)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintEnumdeclall(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 NewPopulatedMessage(r randyEnumdeclall, easy bool) *Message { + this := &Message{} + this.EnumeratedField = MyEnum([]int32{0, 1}[r.Intn(2)]) + this.OtherenumeratedField = MyOtherEnum([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumdeclall(r, 3) + } + return this +} + +type randyEnumdeclall interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEnumdeclall(r randyEnumdeclall) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEnumdeclall(r randyEnumdeclall) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneEnumdeclall(r) + } + return string(tmps) +} +func randUnrecognizedEnumdeclall(r randyEnumdeclall, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEnumdeclall(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEnumdeclall(dAtA []byte, r randyEnumdeclall, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEnumdeclall(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + var l int + _ = l + if m.EnumeratedField != 0 { + n += 1 + sovEnumdeclall(uint64(m.EnumeratedField)) + } + if m.OtherenumeratedField != 0 { + n += 1 + sovEnumdeclall(uint64(m.OtherenumeratedField)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovEnumdeclall(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozEnumdeclall(x uint64) (n int) { + return sovEnumdeclall(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) 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 ErrIntOverflowEnumdeclall + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumeratedField", wireType) + } + m.EnumeratedField = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEnumdeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EnumeratedField |= (MyEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OtherenumeratedField", wireType) + } + m.OtherenumeratedField = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEnumdeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OtherenumeratedField |= (MyOtherEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEnumdeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEnumdeclall + } + 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 skipEnumdeclall(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, ErrIntOverflowEnumdeclall + } + 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, ErrIntOverflowEnumdeclall + } + 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, ErrIntOverflowEnumdeclall + } + 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, ErrInvalidLengthEnumdeclall + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEnumdeclall + } + 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 := skipEnumdeclall(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 ( + ErrInvalidLengthEnumdeclall = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEnumdeclall = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("enumdeclall.proto", fileDescriptor_enumdeclall_97762bd47095d695) } + +var fileDescriptor_enumdeclall_97762bd47095d695 = []byte{ + // 260 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0xcd, 0x2b, 0xcd, + 0x4d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, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, + 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, + 0x1f, 0x3c, 0x92, 0x63, 0xfc, 0xf1, 0x48, 0x8e, 0xa1, 0xe1, 0xb1, 0x1c, 0xc3, 0x8e, 0xc7, 0x72, + 0x0c, 0x49, 0x6c, 0xe0, 0x40, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x91, 0xd9, 0xaf, + 0x65, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto b/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto new file mode 100644 index 000000000..38b16b6e6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package enumdeclall; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.enumdecl_all) = false; + +enum MyEnum { + option (gogoproto.goproto_enum_prefix) = false; + A = 0; + B = 1; +} + +enum MyOtherEnum { + option (gogoproto.enumdecl) = true; + option (gogoproto.goproto_enum_prefix) = false; + C = 0; + D = 1; +} + +message Message { + MyEnum enumerated_field = 1; + MyOtherEnum otherenumerated_field = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go b/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go new file mode 100644 index 000000000..11a526ced --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdeclall.proto + +package enumdeclall + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/enumdecl_all/models.go b/deps/github.com/gogo/protobuf/test/enumdecl_all/models.go new file mode 100644 index 000000000..bb1aee665 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumdecl_all/models.go @@ -0,0 +1,8 @@ +package enumdeclall + +type MyEnum int32 + +const ( + A MyEnum = iota + B MyEnum = iota +) diff --git a/deps/github.com/gogo/protobuf/test/enumprefix/Makefile b/deps/github.com/gogo/protobuf/test/enumprefix/Makefile new file mode 100644 index 000000000..fbb7b0301 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumprefix/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumprefix.proto) diff --git a/deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go b/deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go new file mode 100644 index 000000000..7f883261a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go @@ -0,0 +1,79 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumprefix.proto + +package enumprefix + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MyMessage struct { + TheField test.TheTestEnum `protobuf:"varint,1,opt,name=TheField,enum=test.TheTestEnum" json:"TheField"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_enumprefix_6ff751a3ee38216f, []int{0} +} +func (m *MyMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessage.Unmarshal(m, b) +} +func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) +} +func (dst *MyMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage.Merge(dst, src) +} +func (m *MyMessage) XXX_Size() int { + return xxx_messageInfo_MyMessage.Size(m) +} +func (m *MyMessage) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage proto.InternalMessageInfo + +func (m *MyMessage) GetTheField() test.TheTestEnum { + if m != nil { + return m.TheField + } + return test.A +} + +func init() { + proto.RegisterType((*MyMessage)(nil), "enumprefix.MyMessage") +} + +func init() { proto.RegisterFile("enumprefix.proto", fileDescriptor_enumprefix_6ff751a3ee38216f) } + +var fileDescriptor_enumprefix_6ff751a3ee38216f = []byte{ + // 149 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcd, 0x2b, 0xcd, + 0x2d, 0x28, 0x4a, 0x4d, 0xcb, 0xac, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88, + 0x48, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, + 0xe7, 0xeb, 0x83, 0x95, 0x24, 0x95, 0xa6, 0xe9, 0x97, 0xa4, 0x16, 0x97, 0xe8, 0x97, 0x64, 0xa4, + 0x82, 0x68, 0x88, 0x46, 0x29, 0x5d, 0x9c, 0x8a, 0x41, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x28, 0x57, + 0x72, 0xe0, 0xe2, 0xf4, 0xad, 0xf4, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x32, 0xe6, 0xe2, + 0x08, 0xc9, 0x48, 0x75, 0xcb, 0x4c, 0xcd, 0x49, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x33, 0x12, + 0xd4, 0x03, 0x1b, 0x1d, 0x92, 0x91, 0x1a, 0x92, 0x5a, 0x5c, 0xe2, 0x9a, 0x57, 0x9a, 0xeb, 0xc4, + 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x5c, 0x21, 0x20, 0x00, 0x00, 0xff, 0xff, 0xda, 0xd1, 0x3c, + 0x03, 0xbc, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto b/deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto new file mode 100644 index 000000000..67f779f9b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto @@ -0,0 +1,37 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package enumprefix; + +import "github.com/gogo/protobuf/test/thetest.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message MyMessage { + optional test.TheTestEnum TheField = 1 [(gogoproto.nullable) = false]; +} diff --git a/deps/github.com/gogo/protobuf/test/enumstringer/Makefile b/deps/github.com/gogo/protobuf/test/enumstringer/Makefile new file mode 100644 index 000000000..67b569859 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumstringer/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumstringer.proto) diff --git a/deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go b/deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go new file mode 100644 index 000000000..dae302e2c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go @@ -0,0 +1,635 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumstringer.proto + +package enumstringer + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TheTestEnum int32 + +const ( + TheTestEnum_A TheTestEnum = 0 + TheTestEnum_B TheTestEnum = 1 + TheTestEnum_C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{0} +} + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (m *NidOptEnum) String() string { return proto.CompactTextString(m) } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{0} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptEnum.Unmarshal(m, b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return xxx_messageInfo_NidOptEnum.Size(m) +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +func (m *NidOptEnum) GetField1() TheTestEnum { + if m != nil { + return m.Field1 + } + return TheTestEnum_A +} + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (m *NinOptEnum) String() string { return proto.CompactTextString(m) } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{1} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnum.Unmarshal(m, b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return xxx_messageInfo_NinOptEnum.Size(m) +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +func (m *NinOptEnum) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return TheTestEnum_A +} + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (m *NidRepEnum) String() string { return proto.CompactTextString(m) } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{2} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepEnum.Unmarshal(m, b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return xxx_messageInfo_NidRepEnum.Size(m) +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +func (m *NidRepEnum) GetField1() []TheTestEnum { + if m != nil { + return m.Field1 + } + return nil +} + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (m *NinRepEnum) String() string { return proto.CompactTextString(m) } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{3} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepEnum.Unmarshal(m, b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return xxx_messageInfo_NinRepEnum.Size(m) +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +func (m *NinRepEnum) GetField1() []TheTestEnum { + if m != nil { + return m.Field1 + } + return nil +} + +func init() { + proto.RegisterType((*NidOptEnum)(nil), "enumstringer.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "enumstringer.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "enumstringer.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "enumstringer.NinRepEnum") + proto.RegisterEnum("enumstringer.TheTestEnum", TheTestEnum_name, TheTestEnum_value) +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedNidOptEnum(r randyEnumstringer, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyEnumstringer, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v1 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNidRepEnum(r randyEnumstringer, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v2) + for i := 0; i < v2; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNinRepEnum(r randyEnumstringer, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v3) + for i := 0; i < v3; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +type randyEnumstringer interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEnumstringer(r randyEnumstringer) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEnumstringer(r randyEnumstringer) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneEnumstringer(r) + } + return string(tmps) +} +func randUnrecognizedEnumstringer(r randyEnumstringer, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEnumstringer(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEnumstringer(dAtA []byte, r randyEnumstringer, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEnumstringer(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("enumstringer.proto", fileDescriptor_enumstringer_cc4e1499449a36f3) } + +var fileDescriptor_enumstringer_cc4e1499449a36f3 = []byte{ + // 208 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4a, 0xcd, 0x2b, 0xcd, + 0x2d, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x4f, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, + 0x41, 0x16, 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, + 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, + 0x59, 0xc9, 0x95, 0x8b, 0xcb, 0x2f, 0x33, 0xc5, 0xbf, 0xa0, 0xc4, 0x35, 0xaf, 0x34, 0x57, 0xc8, + 0x9c, 0x8b, 0xcd, 0x2d, 0x33, 0x35, 0x27, 0xc5, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, 0xcf, 0x48, + 0x52, 0x0f, 0xc5, 0xbe, 0x90, 0x8c, 0xd4, 0x90, 0xd4, 0x62, 0xb0, 0x52, 0x27, 0x96, 0x13, 0xf7, + 0xe4, 0x19, 0x82, 0xa0, 0xca, 0x95, 0xec, 0x41, 0xc6, 0xe4, 0xc1, 0x8c, 0x31, 0x24, 0xda, 0x18, + 0xb8, 0x01, 0x10, 0x77, 0x04, 0xa5, 0x16, 0x60, 0xb8, 0x83, 0x99, 0x74, 0x77, 0xc0, 0x8c, 0x31, + 0x24, 0xda, 0x18, 0x98, 0x01, 0x5a, 0x4a, 0x5c, 0xdc, 0x48, 0xc2, 0x42, 0xac, 0x5c, 0x8c, 0x8e, + 0x02, 0x0c, 0x20, 0xca, 0x49, 0x80, 0x11, 0x44, 0x39, 0x0b, 0x30, 0x39, 0x89, 0x3c, 0x78, 0x28, + 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0xbe, 0x78, + 0x24, 0xc7, 0x00, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xb2, 0x8f, 0xc2, 0x9b, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto b/deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto new file mode 100644 index 000000000..7147ccfb6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto @@ -0,0 +1,62 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package enumstringer; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_enum_stringer_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go b/deps/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go new file mode 100644 index 000000000..8041fc3ab --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go @@ -0,0 +1,438 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumstringer.proto + +package enumstringer + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/enumstringer/string.go b/deps/github.com/gogo/protobuf/test/enumstringer/string.go new file mode 100644 index 000000000..3d9ef7000 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/enumstringer/string.go @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package enumstringer + +func (this TheTestEnum) String() string { + switch this { + case 0: + return "a" + case 1: + return "blabla" + case 2: + return "z" + } + return "3" +} diff --git a/deps/github.com/gogo/protobuf/test/example/Makefile b/deps/github.com/gogo/protobuf/test/example/Makefile new file mode 100644 index 000000000..251767a00 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/example/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc -I=. -I=$(GOPATH)/src -I=$(GOPATH)/src/github.com/gogo/protobuf/protobuf --gogo_out=. example.proto) diff --git a/deps/github.com/gogo/protobuf/test/example/example.pb.go b/deps/github.com/gogo/protobuf/test/example/example.pb.go new file mode 100644 index 000000000..184d98de9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/example/example.pb.go @@ -0,0 +1,2674 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: example.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A struct { + Description string `protobuf:"bytes,1,opt,name=Description" json:"Description"` + Number int64 `protobuf:"varint,2,opt,name=Number" json:"Number"` + Id github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,opt,name=Id,customtype=github.com/gogo/protobuf/test.Uuid" json:"Id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +type B struct { + A `protobuf:"bytes,1,opt,name=A,embedded=A" json:"A"` + G []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=G,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"G"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{1} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +type C struct { + MySize *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{2} +} +func (m *C) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *C) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_C.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *C) XXX_Merge(src proto.Message) { + xxx_messageInfo_C.Merge(dst, src) +} +func (m *C) XXX_Size() int { + return m.Size() +} +func (m *C) XXX_DiscardUnknown() { + xxx_messageInfo_C.DiscardUnknown(m) +} + +var xxx_messageInfo_C proto.InternalMessageInfo + +func (m *C) GetMySize() int64 { + if m != nil && m.MySize != nil { + return *m.MySize + } + return 0 +} + +type U struct { + A *A `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *B `protobuf:"bytes,2,opt,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *U) Reset() { *m = U{} } +func (*U) ProtoMessage() {} +func (*U) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{3} +} +func (m *U) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *U) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_U.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *U) XXX_Merge(src proto.Message) { + xxx_messageInfo_U.Merge(dst, src) +} +func (m *U) XXX_Size() int { + return m.Size() +} +func (m *U) XXX_DiscardUnknown() { + xxx_messageInfo_U.DiscardUnknown(m) +} + +var xxx_messageInfo_U proto.InternalMessageInfo + +func (m *U) GetA() *A { + if m != nil { + return m.A + } + return nil +} + +func (m *U) GetB() *B { + if m != nil { + return m.B + } + return nil +} + +type E struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *E) Reset() { *m = E{} } +func (*E) ProtoMessage() {} +func (*E) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{4} +} + +var extRange_E = []proto.ExtensionRange{ + {Start: 1, End: 536870911}, +} + +func (*E) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_E +} +func (m *E) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *E) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *E) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_E.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *E) XXX_Merge(src proto.Message) { + xxx_messageInfo_E.Merge(dst, src) +} +func (m *E) XXX_Size() int { + return m.Size() +} +func (m *E) XXX_DiscardUnknown() { + xxx_messageInfo_E.DiscardUnknown(m) +} + +var xxx_messageInfo_E proto.InternalMessageInfo + +type R struct { + Recognized *uint32 `protobuf:"varint,1,opt,name=recognized" json:"recognized,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *R) Reset() { *m = R{} } +func (*R) ProtoMessage() {} +func (*R) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{5} +} +func (m *R) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *R) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_R.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *R) XXX_Merge(src proto.Message) { + xxx_messageInfo_R.Merge(dst, src) +} +func (m *R) XXX_Size() int { + return m.Size() +} +func (m *R) XXX_DiscardUnknown() { + xxx_messageInfo_R.DiscardUnknown(m) +} + +var xxx_messageInfo_R proto.InternalMessageInfo + +func (m *R) GetRecognized() uint32 { + if m != nil && m.Recognized != nil { + return *m.Recognized + } + return 0 +} + +type CastType struct { + Int32 *int32 `protobuf:"varint,1,opt,name=Int32,casttype=int32" json:"Int32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CastType) Reset() { *m = CastType{} } +func (*CastType) ProtoMessage() {} +func (*CastType) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{6} +} +func (m *CastType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CastType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CastType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CastType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CastType.Merge(dst, src) +} +func (m *CastType) XXX_Size() int { + return m.Size() +} +func (m *CastType) XXX_DiscardUnknown() { + xxx_messageInfo_CastType.DiscardUnknown(m) +} + +var xxx_messageInfo_CastType proto.InternalMessageInfo + +func (m *CastType) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "test.A") + proto.RegisterType((*B)(nil), "test.B") + proto.RegisterType((*C)(nil), "test.C") + proto.RegisterType((*U)(nil), "test.U") + proto.RegisterType((*E)(nil), "test.E") + proto.RegisterType((*R)(nil), "test.R") + proto.RegisterType((*CastType)(nil), "test.CastType") +} +func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ExampleDescription() +} +func ExampleDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3985 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x6b, 0x70, 0x1b, 0xd7, + 0x75, 0xd6, 0xe2, 0x41, 0x02, 0x07, 0x20, 0xb8, 0xbc, 0xa4, 0x24, 0x88, 0xb6, 0x49, 0x09, 0x7e, + 0x51, 0xb2, 0x43, 0xa5, 0xb2, 0x9e, 0xab, 0x26, 0x2e, 0x00, 0x42, 0x0c, 0x5c, 0xbe, 0xb2, 0x20, + 0xe3, 0x47, 0xa6, 0xb3, 0xb3, 0x5c, 0x5c, 0x82, 0x2b, 0x2d, 0x76, 0x37, 0xbb, 0x0b, 0x49, 0xd4, + 0xf4, 0x87, 0x3a, 0xee, 0x2b, 0xd3, 0x69, 0xd3, 0xd7, 0x4c, 0x13, 0xd7, 0x71, 0xed, 0xce, 0xa4, + 0x76, 0xd3, 0x67, 0x9a, 0x36, 0x4d, 0xfa, 0xa7, 0xf9, 0x93, 0x56, 0xbf, 0x3a, 0xce, 0xbf, 0x4e,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 0xea, 0x1b, 0x20, 0xf7, 0x1b, 0x85, 0x8e, 0xc2, 0x30, 0xb3, 0xe4, + 0x43, 0x68, 0x1a, 0x26, 0xd7, 0xd6, 0xb5, 0x46, 0x7d, 0xa9, 0xa6, 0xd5, 0xae, 0x5c, 0xa9, 0x55, + 0x37, 0x1b, 0xec, 0x06, 0x22, 0xd4, 0xde, 0xec, 0xdd, 0xd4, 0x2f, 0x25, 0x61, 0x7a, 0x88, 0x25, + 0xa8, 0xcc, 0xcf, 0x0e, 0xec, 0x38, 0xf3, 0x89, 0x51, 0xac, 0x5f, 0x24, 0x25, 0x7f, 0x43, 0xf7, + 0x02, 0x7e, 0xd4, 0x38, 0x09, 0xc4, 0x4b, 0x76, 0x60, 0xee, 0x98, 0xd8, 0xe3, 0x17, 0x36, 0xec, + 0x40, 0x31, 0xd9, 0x95, 0xb3, 0x3b, 0x9b, 0x27, 0x01, 0xb9, 0x8e, 0x6f, 0x06, 0xe6, 0x75, 0xac, + 0x99, 0xb6, 0xb8, 0xdd, 0x21, 0x07, 0x8c, 0x94, 0x2a, 0x8b, 0x91, 0xba, 0x1d, 0x84, 0xda, 0x36, + 0x6e, 0xe9, 0x7d, 0xda, 0x24, 0x81, 0x27, 0x55, 0x59, 0x8c, 0x84, 0xda, 0x27, 0x20, 0xdf, 0x74, + 0x3a, 0xa4, 0xeb, 0x62, 0x7a, 0xa4, 0x5e, 0x48, 0x6a, 0x8e, 0xc9, 0x42, 0x15, 0xde, 0x4f, 0x77, + 0xaf, 0x95, 0xf2, 0x6a, 0x8e, 0xc9, 0x98, 0xca, 0xe3, 0x30, 0xa9, 0xb7, 0x5a, 0x1e, 0x21, 0x17, + 0x44, 0xec, 0x84, 0x50, 0x08, 0xc5, 0x54, 0x71, 0xf6, 0x19, 0xc8, 0x08, 0x3f, 0x90, 0x92, 0x4c, + 0x3c, 0xa1, 0xb9, 0xec, 0xd8, 0x9b, 0x58, 0xc8, 0xaa, 0x19, 0x5b, 0x0c, 0x9e, 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db, 0x73, 0x87, 0xde, 0x7a, 0x7b, 0x4e, 0x7a, 0xef, 0xed, + 0x39, 0xe9, 0x87, 0x6f, 0xcf, 0x49, 0xb7, 0xef, 0xcd, 0x49, 0x6f, 0xdc, 0x9b, 0x93, 0xbe, 0x7d, + 0x6f, 0x4e, 0xfa, 0xee, 0xbd, 0x39, 0xe9, 0xce, 0xbd, 0x39, 0xe9, 0xcd, 0x7b, 0x73, 0xd2, 0x5b, + 0xf7, 0xe6, 0xa4, 0x1f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x3a, 0x37, 0xa6, 0x5c, 0x33, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.Description != that1.Description { + return fmt.Errorf("Description this(%v) Not Equal that(%v)", this.Description, that1.Description) + } + if this.Number != that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Description != that1.Description { + return false + } + if this.Number != that1.Number { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *B") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *B but is not nil && this == nil") + } + if !this.A.Equal(&that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if len(this.G) != len(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(&that1.A) { + return false + } + if len(this.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *C) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *C") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *C but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *C but is not nil && this == nil") + } + if this.MySize != nil && that1.MySize != nil { + if *this.MySize != *that1.MySize { + return fmt.Errorf("MySize this(%v) Not Equal that(%v)", *this.MySize, *that1.MySize) + } + } else if this.MySize != nil { + return fmt.Errorf("this.MySize == nil && that.MySize != nil") + } else if that1.MySize != nil { + return fmt.Errorf("MySize this(%v) Not Equal that(%v)", this.MySize, that1.MySize) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MySize != nil && that1.MySize != nil { + if *this.MySize != *that1.MySize { + return false + } + } else if this.MySize != nil { + return false + } else if that1.MySize != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *U) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *U") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *U but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *U but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !this.B.Equal(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *U) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if !this.B.Equal(that1.B) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *E) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*E) + if !ok { + that2, ok := that.(E) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *E") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *E but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *E but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *E) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*E) + if !ok { + that2, ok := that.(E) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *R) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*R) + if !ok { + that2, ok := that.(R) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *R") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *R but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *R but is not nil && this == nil") + } + if this.Recognized != nil && that1.Recognized != nil { + if *this.Recognized != *that1.Recognized { + return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", *this.Recognized, *that1.Recognized) + } + } else if this.Recognized != nil { + return fmt.Errorf("this.Recognized == nil && that.Recognized != nil") + } else if that1.Recognized != nil { + return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", this.Recognized, that1.Recognized) + } + return nil +} +func (this *R) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*R) + if !ok { + that2, ok := that.(R) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Recognized != nil && that1.Recognized != nil { + if *this.Recognized != *that1.Recognized { + return false + } + } else if this.Recognized != nil { + return false + } else if that1.Recognized != nil { + return false + } + return true +} +func (this *CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CastType) + if !ok { + that2, ok := that.(CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CastType but is not nil && this == nil") + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", *this.Int32, *that1.Int32) + } + } else if this.Int32 != nil { + return fmt.Errorf("this.Int32 == nil && that.Int32 != nil") + } else if that1.Int32 != nil { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CastType) + if !ok { + that2, ok := that.(CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return false + } + } else if this.Int32 != nil { + return false + } else if that1.Int32 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type AFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDescription() string + GetNumber() int64 + GetId() github_com_gogo_protobuf_test.Uuid +} + +func (this *A) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAFromFace(this) +} + +func (this *A) GetDescription() string { + return this.Description +} + +func (this *A) GetNumber() int64 { + return this.Number +} + +func (this *A) GetId() github_com_gogo_protobuf_test.Uuid { + return this.Id +} + +func NewAFromFace(that AFace) *A { + this := &A{} + this.Description = that.GetDescription() + this.Number = that.GetNumber() + this.Id = that.GetId() + return this +} + +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.A{") + s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.B{") + s = append(s, "A: "+strings.Replace(this.A.GoString(), `&`, ``, 1)+",\n") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *C) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.C{") + if this.MySize != nil { + s = append(s, "MySize: "+valueToGoStringExample(this.MySize, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *U) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.U{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *E) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.E{") + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *R) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.R{") + if this.Recognized != nil { + s = append(s, "Recognized: "+valueToGoStringExample(this.Recognized, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CastType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CastType{") + if this.Int32 != nil { + s = append(s, "Int32: "+valueToGoStringExample(this.Int32, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringExample(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintExample(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) + dAtA[i] = 0x10 + i++ + i = encodeVarintExample(dAtA, i, uint64(m.Number)) + dAtA[i] = 0x1a + i++ + i = encodeVarintExample(dAtA, i, uint64(m.Id.Size())) + n1, err := m.Id.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 *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintExample(dAtA, i, uint64(m.A.Size())) + n2, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.G) > 0 { + for _, msg := range m.G { + dAtA[i] = 0x12 + i++ + i = encodeVarintExample(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 *C) 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 *C) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MySize != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintExample(dAtA, i, uint64(*m.MySize)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *U) 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 *U) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintExample(dAtA, i, uint64(m.A.Size())) + n3, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.B != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintExample(dAtA, i, uint64(m.B.Size())) + n4, err := m.B.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 *E) 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 *E) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_extensions != nil { + i += copy(dAtA[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *R) 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 *R) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Recognized != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintExample(dAtA, i, uint64(*m.Recognized)) + } + return i, nil +} + +func (m *CastType) 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 *CastType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintExample(dAtA, i, uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintExample(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 NewPopulatedA(r randyExample, easy bool) *A { + this := &A{} + this.Description = string(randStringExample(r)) + this.Number = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + v1 := github_com_gogo_protobuf_test.NewPopulatedUuid(r) + this.Id = *v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 4) + } + return this +} + +func NewPopulatedB(r randyExample, easy bool) *B { + this := &B{} + v2 := NewPopulatedA(r, easy) + this.A = *v2 + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) + for i := 0; i < v3; i++ { + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.G[i] = *v4 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 3) + } + return this +} + +func NewPopulatedC(r randyExample, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.MySize = &v5 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 2) + } + return this +} + +func NewPopulatedU(r randyExample, easy bool) *U { + this := &U{} + fieldNum := r.Intn(2) + switch fieldNum { + case 0: + this.A = NewPopulatedA(r, easy) + case 1: + this.B = NewPopulatedB(r, easy) + } + return this +} + +func NewPopulatedE(r randyExample, easy bool) *E { + this := &E{} + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(536870911) + 1 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldExample(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + return this +} + +func NewPopulatedR(r randyExample, easy bool) *R { + this := &R{} + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Recognized = &v6 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCastType(r randyExample, easy bool) *CastType { + this := &CastType{} + if r.Intn(10) != 0 { + v7 := int32(r.Int63()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Int32 = &v7 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 2) + } + return this +} + +type randyExample interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneExample(r randyExample) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringExample(r randyExample) string { + v8 := r.Intn(100) + tmps := make([]rune, v8) + for i := 0; i < v8; i++ { + tmps[i] = randUTF8RuneExample(r) + } + return string(tmps) +} +func randUnrecognizedExample(r randyExample, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldExample(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldExample(dAtA []byte, r randyExample, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + v9 := r.Int63() + if r.Intn(2) == 0 { + v9 *= -1 + } + dAtA = encodeVarintPopulateExample(dAtA, uint64(v9)) + case 1: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateExample(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateExample(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *A) Size() (n int) { + var l int + _ = l + l = len(m.Description) + n += 1 + l + sovExample(uint64(l)) + n += 1 + sovExample(uint64(m.Number)) + l = m.Id.Size() + n += 1 + l + sovExample(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *B) Size() (n int) { + var l int + _ = l + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + if len(m.G) > 0 { + for _, e := range m.G { + l = e.Size() + n += 1 + l + sovExample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *C) Size() (n int) { + var l int + _ = l + if m.MySize != nil { + n += 1 + sovExample(uint64(*m.MySize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *U) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + } + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovExample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *E) Size() (n int) { + var l int + _ = l + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *R) Size() (n int) { + var l int + _ = l + if m.Recognized != nil { + n += 1 + sovExample(uint64(*m.Recognized)) + } + return n +} + +func (m *CastType) Size() (n int) { + var l int + _ = l + if m.Int32 != nil { + n += 1 + sovExample(uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovExample(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozExample(x uint64) (n int) { + return sovExample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `A:` + strings.Replace(strings.Replace(this.A.String(), "A", "A", 1), `&`, ``, 1) + `,`, + `G:` + fmt.Sprintf("%v", this.G) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *C) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&C{`, + `MySize:` + valueToStringExample(this.MySize) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *U) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&U{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *E) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&E{`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *R) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&R{`, + `Recognized:` + valueToStringExample(this.Recognized) + `,`, + `}`, + }, "") + return s +} +func (this *CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CastType{`, + `Int32:` + valueToStringExample(this.Int32) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringExample(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *U) GetValue() interface{} { + if this.A != nil { + return this.A + } + if this.B != nil { + return this.B + } + return nil +} + +func (this *U) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *A: + this.A = vt + case *B: + this.B = vt + default: + return false + } + return true +} +func (m *A) 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 ErrIntOverflowExample + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + 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 ErrInvalidLengthExample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + 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 *B) 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 ErrIntOverflowExample + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field G", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.G = append(m.G, v) + if err := m.G[len(m.G)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + 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 *C) 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 ErrIntOverflowExample + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MySize", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MySize = &v + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + 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 *U) 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 ErrIntOverflowExample + } + 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: U: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &A{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.B == nil { + m.B = &B{} + } + if err := m.B.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + 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 *E) 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 ErrIntOverflowExample + } + 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: E: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: E: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + if (fieldNum >= 1) && (fieldNum < 536870912) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + 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 *R) 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 ErrIntOverflowExample + } + 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: R: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: R: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Recognized", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Recognized = &v + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CastType) 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 ErrIntOverflowExample + } + 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: CastType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CastType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + 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 skipExample(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, ErrIntOverflowExample + } + 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, ErrIntOverflowExample + } + 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, ErrIntOverflowExample + } + 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, ErrInvalidLengthExample + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExample + } + 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 := skipExample(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 ( + ErrInvalidLengthExample = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowExample = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("example.proto", fileDescriptor_example_32f420a2a58e4270) } + +var fileDescriptor_example_32f420a2a58e4270 = []byte{ + // 425 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xf3, 0x36, 0xdb, 0xba, 0x7d, 0x6d, 0x41, 0x46, 0x0a, 0x41, 0x64, 0x26, 0xac, 0x20, + 0xb1, 0xd6, 0x0d, 0x46, 0x41, 0xd9, 0x5b, 0xa6, 0x4a, 0xc9, 0x41, 0x0f, 0xa3, 0xf9, 0x00, 0x4d, + 0x32, 0xc6, 0x01, 0xb3, 0x13, 0xb2, 0xb3, 0x60, 0x73, 0xda, 0xa3, 0x37, 0xbf, 0x42, 0xbd, 0xf5, + 0x23, 0x78, 0xf4, 0x98, 0x63, 0x8e, 0xe2, 0x61, 0x69, 0xe6, 0x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, + 0x57, 0x99, 0x79, 0xd2, 0x79, 0x21, 0xe0, 0x24, 0x0d, 0xaf, 0x5c, 0xdf, 0x7d, 0x84, 0x63, 0x42, + 0x31, 0xcc, 0xd5, 0x5c, 0xfa, 0xca, 0x3a, 0x47, 0x5b, 0xb1, 0xed, 0xd7, 0x67, 0x6f, 0xd5, 0x5c, + 0x0a, 0xcf, 0xe3, 0xe7, 0x08, 0x7d, 0x72, 0xf0, 0xaf, 0x94, 0x53, 0x39, 0x40, 0xe0, 0xfe, 0x3d, + 0xfe, 0x62, 0x2e, 0x80, 0xa7, 0xe1, 0xc2, 0xa5, 0xdf, 0x41, 0x78, 0x75, 0x18, 0x45, 0x70, 0xbb, + 0x2c, 0xcb, 0x32, 0x48, 0xc3, 0xc5, 0x57, 0x56, 0x8b, 0x1f, 0x22, 0x08, 0x42, 0x11, 0x67, 0x72, + 0xa8, 0xc7, 0x99, 0x9a, 0xcb, 0x91, 0x8f, 0xdd, 0x17, 0x1b, 0x24, 0x0d, 0x97, 0xee, 0xf4, 0x11, + 0x46, 0xc7, 0xa7, 0xb9, 0x79, 0x77, 0x36, 0x95, 0x84, 0xe1, 0x56, 0x2f, 0x33, 0x4f, 0x3b, 0x6b, + 0xcb, 0x9d, 0xdf, 0x15, 0xdb, 0x52, 0x0e, 0x88, 0x6b, 0xce, 0x8f, 0x7e, 0xac, 0x68, 0xed, 0x72, + 0x45, 0xe1, 0x6a, 0x45, 0xe1, 0xd7, 0x8a, 0x42, 0x69, 0x29, 0x5c, 0x58, 0x0a, 0xdf, 0x2c, 0x85, + 0xef, 0x96, 0xc2, 0xc2, 0x52, 0x58, 0x5a, 0x0a, 0x97, 0x96, 0xc2, 0x9f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x71, 0x9d, 0xd3, 0x01, 0x3f, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/example/example.proto b/deps/github.com/gogo/protobuf/test/example/example.proto new file mode 100644 index 000000000..e90aa48dd --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/example/example.proto @@ -0,0 +1,83 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message A { + option (gogoproto.face) = true; + option (gogoproto.goproto_getters) = false; + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable) = false]; +} + +message B { + option (gogoproto.description) = true; + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message C { + optional int64 size = 1 [(gogoproto.customname) = "MySize"]; +} + +message U { + option (gogoproto.onlyone) = true; + optional A A = 1; + optional B B = 2; +} + +message E { + option (gogoproto.goproto_extensions_map) = false; + extensions 1 to max; +} + +message R { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 recognized = 1; +} + +message CastType { + optional int64 Int32 = 1 [(gogoproto.casttype)="int32"]; +} diff --git a/deps/github.com/gogo/protobuf/test/example/example_test.go b/deps/github.com/gogo/protobuf/test/example/example_test.go new file mode 100644 index 000000000..34f4c4367 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/example/example_test.go @@ -0,0 +1,35 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import "testing" + +func TestGetterExists(t *testing.T) { + _ = (&CastType{}).GetInt32() +} diff --git a/deps/github.com/gogo/protobuf/test/example/examplepb_test.go b/deps/github.com/gogo/protobuf/test/example/examplepb_test.go new file mode 100644 index 000000000..24cc44463 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/example/examplepb_test.go @@ -0,0 +1,1656 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: example.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &A{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkBProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*B, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedB(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &B{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*C, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedC(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedC(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &C{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*U, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedU(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedU(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &U{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestEProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestEMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkEProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*E, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedE(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkEProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedE(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &E{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*R, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedR(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedR(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &R{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CastType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CastType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestEJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestEProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &E{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestEProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &E{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &R{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &R{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestExampleDescription(t *testing.T) { + ExampleDescription() +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestEVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestEGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestRGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkASize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkBSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*B, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*C, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedC(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*U, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedU(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestESize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkESize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*E, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedE(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*R, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedR(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CastType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestEStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestRStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCastTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, true) + v := p.GetValue() + msg := &U{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/extension_test.go b/deps/github.com/gogo/protobuf/test/extension_test.go new file mode 100644 index 000000000..351ac3974 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/extension_test.go @@ -0,0 +1,181 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "math" + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//func SetRawExtension(base extendableProto, id int32, b []byte) { +//func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { +//func ClearExtension(pb extendableProto, extension *ExtensionDesc) { +//func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { +//func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { +//func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { + +type extendable interface { + proto.Message + ExtensionRangeArray() []proto.ExtensionRange +} + +func check(t *testing.T, m extendable, fieldA float64, ext *proto.ExtensionDesc) { + if !proto.HasExtension(m, ext) { + t.Fatalf("expected extension to be set") + } + fieldA2Interface, err := proto.GetExtension(m, ext) + if err != nil { + t.Fatal(err) + } + fieldA2 := fieldA2Interface.(*float64) + if fieldA != *fieldA2 { + t.Fatalf("Expected %f got %f", fieldA, *fieldA2) + } + fieldA3Interface, err := proto.GetUnsafeExtension(m, ext.Field) + if err != nil { + t.Fatal(err) + } + fieldA3 := fieldA3Interface.(*float64) + if fieldA != *fieldA3 { + t.Fatalf("Expected %f got %f", fieldA, *fieldA3) + } + proto.ClearExtension(m, ext) + if proto.HasExtension(m, ext) { + t.Fatalf("expected extension to be cleared") + } +} + +var fieldA float64 +var fieldABytes []byte +var extr = math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + +func init() { + fieldA = float64(1.1) + fieldABits := math.Float64bits(fieldA) + x := uint64(uint32(100)<<3 | uint32(proto.WireFixed64)) + fieldABytes = encodeVarintPopulateThetest(nil, x) + fieldABytes = append(fieldABytes, uint8(fieldABits)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>8)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>16)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>24)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>32)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>40)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>48)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>56)) +} + +func TestExtensionsMyExtendable(t *testing.T) { + m := NewPopulatedMyExtendable(extr, false) + err := proto.SetExtension(m, E_FieldA, &fieldA) + if err != nil { + t.Fatal(err) + } + check(t, m, fieldA, E_FieldA) + proto.SetRawExtension(m, 100, fieldABytes) + check(t, m, fieldA, E_FieldA) +} + +func TestExtensionsNoExtensionsMapSetExtension(t *testing.T) { + mm := NewPopulatedMyExtendable(extr, false) + for { + _, err := proto.GetExtension(mm, E_FieldA) + if err == proto.ErrMissingExtension { + // make sure the field that we are going to try to set is not set, + // since the random generator is not smart enough to generate the correct wire type for a defined extended field. + break + } + mm = NewPopulatedMyExtendable(extr, false) + } + data, err := proto.Marshal(mm) + if err != nil { + t.Fatal(err) + } + m := &NoExtensionsMap{} + if err := proto.Unmarshal(data, m); err != nil { + t.Fatal(err) + } + if err := proto.SetExtension(m, E_FieldA1, &fieldA); err != nil { + t.Fatal(err) + } + check(t, m, fieldA, E_FieldA1) +} + +func TestExtensionsNoExtensionsMapSetRawExtension(t *testing.T) { + m := NewPopulatedNoExtensionsMap(extr, false) + proto.SetRawExtension(m, 100, fieldABytes) + check(t, m, fieldA, E_FieldA1) +} + +func TestUnsafeExtension(t *testing.T) { + m := NewPopulatedMyExtendable(extr, false) + err := proto.SetUnsafeExtension(m, E_FieldA.Field, &fieldA) + if err != nil { + t.Fatal(err) + } + check(t, m, fieldA, E_FieldA) +} + +//See another version of this test in proto/extensions_test.go +func TestGetExtensionStability(t *testing.T) { + check := func(m *NoExtensionsMap) bool { + ext1, err := proto.GetExtension(m, E_FieldB1) + if err != nil { + t.Fatalf("GetExtension() 1 failed: %v", err) + } + ext2, err := proto.GetExtension(m, E_FieldB1) + if err != nil { + t.Fatalf("GetExtension() 2 failed: %v", err) + } + return ext1.(*NinOptNative).Equal(ext2) + } + msg := &NoExtensionsMap{Field1: proto.Int64(2)} + ext0 := &NinOptNative{Field1: proto.Float64(1)} + if err := proto.SetExtension(msg, E_FieldB1, ext0); err != nil { + t.Fatalf("Could not set ext1: %s", ext0) + } + if !check(msg) { + t.Errorf("GetExtension() not stable before marshaling") + } + bb, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Marshal() failed: %s", err) + } + msg1 := &NoExtensionsMap{} + err = proto.Unmarshal(bb, msg1) + if err != nil { + t.Fatalf("Unmarshal() failed: %s", err) + } + if !check(msg1) { + t.Errorf("GetExtension() not stable after unmarshaling") + } +} diff --git a/deps/github.com/gogo/protobuf/test/filedotname/Makefile b/deps/github.com/gogo/protobuf/test/filedotname/Makefile new file mode 100644 index 000000000..2833183ce --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/filedotname/Makefile @@ -0,0 +1,31 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --gogo_out=. --proto_path=../../../../../:../../protobuf/:. file.dot.proto diff --git a/deps/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go b/deps/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go new file mode 100644 index 000000000..fe53d3b0e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go @@ -0,0 +1,589 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: file.dot.proto + +package filedotname + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M struct { + A *string `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_file_dot_75a42d5db4a044f0, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M.Unmarshal(m, b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M.Marshal(b, m, deterministic) +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return xxx_messageInfo_M.Size(m) +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M)(nil), "filedotname.M") +} +func (this *M) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return FileDotDescription() +} +func FileDotDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3794 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0xf8, 0x23, 0x91, 0x87, 0x14, 0x05, 0x41, 0xf2, 0x2e, 0x57, 0x8e, 0xb9, 0xbb, 0xb2, + 0x1d, 0xcb, 0x76, 0xa3, 0xcd, 0xac, 0xbd, 0x6b, 0x2f, 0xb7, 0x89, 0x4b, 0x51, 0x5c, 0x85, 0xae, + 0x24, 0x32, 0xa0, 0x14, 0xff, 0x64, 0x3a, 0x18, 0x08, 0xb8, 0xa4, 0xb0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0x00, 0x1d, 0x39, 0xc8, 0xd2, 0x91, 0xa5, 0x1d, 0x94, 0xd3, 0xe7, 0xd2, 0x2b, 0x79, 0x39, 0x24, + 0x91, 0x1e, 0x87, 0x79, 0x67, 0xb0, 0x67, 0x1a, 0x9a, 0x12, 0x52, 0x83, 0x73, 0xe9, 0x95, 0xac, + 0x2c, 0xd2, 0x81, 0xf5, 0xa1, 0xf2, 0x23, 0x30, 0x77, 0x0b, 0xa9, 0x37, 0xc2, 0xaa, 0x05, 0xa2, + 0x5a, 0xc2, 0xe2, 0x90, 0x62, 0x1d, 0x8a, 0x7d, 0xe4, 0x79, 0x6a, 0x0f, 0x29, 0xfe, 0x81, 0x83, + 0xca, 0x19, 0x32, 0xfb, 0x73, 0x63, 0xb3, 0x1f, 0x9d, 0x79, 0x81, 0xa1, 0x76, 0x0e, 0x1c, 0x24, + 0xd5, 0x20, 0x8f, 0xac, 0x41, 0x9f, 0x32, 0x64, 0x8f, 0xf0, 0x5f, 0xc3, 0x1a, 0xf4, 0x47, 0x59, + 0x72, 0x18, 0xc6, 0x28, 0x66, 0x3c, 0xe4, 0xde, 0x34, 0x34, 0x54, 0x9e, 0x26, 0x04, 0x8f, 0x8c, + 0x11, 0x74, 0xe8, 0xf8, 0x28, 0x07, 0xc7, 0x49, 0x75, 0xc8, 0xa3, 0x97, 0x7c, 0x64, 0x79, 0x86, + 0x6d, 0x95, 0x67, 0x08, 0xc9, 0xc3, 0x13, 0x56, 0x11, 0x99, 0xfa, 0x28, 0xc5, 0x10, 0x27, 0x5d, + 0x86, 0x19, 0xdb, 0xf1, 0x0d, 0xdb, 0xf2, 0xca, 0xb9, 0x73, 0xc2, 0x4a, 0xe1, 0xe2, 0x47, 0x26, + 0x06, 0x42, 0x8b, 0xea, 0xc8, 0x5c, 0x59, 0x6a, 0x82, 0xe8, 0xd9, 0x03, 0x57, 0x43, 0x8a, 0x66, + 0xeb, 0x48, 0x31, 0xac, 0xae, 0x5d, 0xce, 0x13, 0x82, 0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59, 0xcf, 0x57, 0x5d, 0x9f, 0x44, 0x61, 0x56, 0xa6, 0x0f, 0x92, 0x08, 0x69, 0x64, 0xe9, 0x24, + 0xcb, 0x65, 0x65, 0xfc, 0xaf, 0xf4, 0x0b, 0xc3, 0x09, 0xa7, 0xc9, 0x84, 0x3f, 0x3a, 0xbe, 0xa2, + 0x11, 0xe6, 0xd1, 0x79, 0x2f, 0x3d, 0x05, 0xb3, 0x91, 0x09, 0x24, 0x7d, 0xf5, 0xf2, 0x2f, 0xc3, + 0x7d, 0x13, 0xa9, 0xa5, 0xe7, 0x61, 0x71, 0x60, 0x19, 0x96, 0x8f, 0x5c, 0xc7, 0x45, 0x38, 0x62, + 0xe9, 0xab, 0xca, 0xff, 0x3e, 0x73, 0x44, 0xcc, 0xed, 0x86, 0xb5, 0x29, 0x8b, 0xbc, 0x30, 0x18, + 0x17, 0x3e, 0x96, 0xcf, 0xbd, 0x3d, 0x23, 0xde, 0xb9, 0x73, 0xe7, 0x4e, 0x6a, 0xf9, 0x0b, 0xd3, + 0xb0, 0x38, 0x69, 0xcf, 0x4c, 0xdc, 0xbe, 0xa7, 0x60, 0xda, 0x1a, 0xf4, 0xf7, 0x90, 0x4b, 0x9c, + 0x94, 0x95, 0xd9, 0x93, 0x54, 0x83, 0xac, 0xa9, 0xee, 0x21, 0xb3, 0x9c, 0x39, 0x27, 0xac, 0x94, + 0x2e, 0x3e, 0x9e, 0x68, 0x57, 0xae, 0x6e, 0x62, 0x88, 0x4c, 0x91, 0xd2, 0x27, 0x21, 0xc3, 0x52, + 0x34, 0x66, 0x78, 0x2c, 0x19, 0x03, 0xde, 0x4b, 0x32, 0xc1, 0x49, 0xf7, 0x43, 0x1e, 0xff, 0xa5, + 0xb1, 0x31, 0x4d, 0x6c, 0xce, 0x61, 0x01, 0x8e, 0x0b, 0x69, 0x09, 0x72, 0x64, 0x9b, 0xe8, 0x88, + 0x97, 0xb6, 0xe0, 0x19, 0x07, 0x96, 0x8e, 0xba, 0xea, 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0x6e, 0x77, 0x36, 0x9b, 0x3b, 0x0d, + 0x45, 0xde, 0xdd, 0xde, 0x69, 0x6e, 0x35, 0xc4, 0x74, 0xb8, 0xaf, 0xfe, 0x7e, 0x0a, 0x4a, 0xd1, + 0x23, 0x92, 0xf4, 0xf3, 0x70, 0x9a, 0xdf, 0x67, 0x78, 0xc8, 0x57, 0x6e, 0x19, 0x2e, 0xd9, 0x32, + 0x7d, 0x95, 0x96, 0xaf, 0x60, 0xd1, 0x16, 0x99, 0x56, 0x07, 0xf9, 0xcf, 0x19, 0x2e, 0xde, 0x10, + 0x7d, 0xd5, 0x97, 0x36, 0xe1, 0xac, 0x65, 0x2b, 0x9e, 0xaf, 0x5a, 0xba, 0xea, 0xea, 0xca, 0xf0, + 0x26, 0x49, 0x51, 0x35, 0x0d, 0x79, 0x9e, 0x4d, 0x4b, 0x55, 0xc0, 0xf2, 0x11, 0xcb, 0xee, 0x30, + 0xe5, 0x61, 0x0e, 0xaf, 0x31, 0xd5, 0x91, 0x00, 0x4b, 0x1f, 0x15, 0x60, 0xf7, 0x43, 0xbe, 0xaf, + 0x3a, 0x0a, 0xb2, 0x7c, 0xf7, 0x80, 0x34, 0xc6, 0x39, 0x39, 0xd7, 0x57, 0x9d, 0x06, 0x7e, 0xfe, + 0x70, 0xce, 0x27, 0xff, 0x96, 0x86, 0x62, 0xb8, 0x39, 0xc6, 0x67, 0x0d, 0x8d, 0xd4, 0x11, 0x81, + 0x64, 0x9a, 0x07, 0x8f, 0x6d, 0xa5, 0x57, 0xeb, 0xb8, 0xc0, 0x54, 0xa7, 0x69, 0xcb, 0x2a, 0x53, + 0x24, 0x2e, 0xee, 0x38, 0xb7, 0x20, 0xda, 0x22, 0xe4, 0x64, 0xf6, 0x24, 0x6d, 0xc0, 0xf4, 0x75, + 0x8f, 0x70, 0x4f, 0x13, 0xee, 0x87, 0x8e, 0xe7, 0x7e, 0xb6, 0x43, 0xc8, 0xf3, 0xcf, 0x76, 0x94, + 0xed, 0x96, 0xbc, 0x55, 0xdb, 0x94, 0x19, 0x5c, 0x3a, 0x03, 0x19, 0x53, 0xbd, 0x7d, 0x10, 0x2d, + 0x45, 0x44, 0x94, 0xd4, 0xf1, 0x67, 0x20, 0x73, 0x0b, 0xa9, 0x37, 0xa2, 0x05, 0x80, 0x88, 0x3e, + 0xc0, 0xd0, 0xbf, 0x00, 0x59, 0xe2, 0x2f, 0x09, 0x80, 0x79, 0x4c, 0x9c, 0x92, 0x72, 0x90, 0xa9, + 0xb7, 0x64, 0x1c, 0xfe, 0x22, 0x14, 0xa9, 0x54, 0x69, 0x37, 0x1b, 0xf5, 0x86, 0x98, 0x5a, 0xbe, + 0x04, 0xd3, 0xd4, 0x09, 0x78, 0x6b, 0x04, 0x6e, 0x10, 0xa7, 0xd8, 0x23, 0xe3, 0x10, 0xf8, 0xe8, + 0xee, 0xd6, 0x5a, 0x43, 0x16, 0x53, 0xe1, 0xe5, 0xf5, 0xa0, 0x18, 0xee, 0x8b, 0x3f, 0x9c, 0x98, + 0xfa, 0x47, 0x01, 0x0a, 0xa1, 0x3e, 0x17, 0x37, 0x28, 0xaa, 0x69, 0xda, 0xb7, 0x14, 0xd5, 0x34, + 0x54, 0x8f, 0x05, 0x05, 0x10, 0x51, 0x0d, 0x4b, 0x92, 0x2e, 0xda, 0x87, 0x62, 0xfc, 0x6b, 0x02, + 0x88, 0xa3, 0x2d, 0xe6, 0x88, 0x81, 0xc2, 0xcf, 0xd4, 0xc0, 0x57, 0x05, 0x28, 0x45, 0xfb, 0xca, + 0x11, 0xf3, 0xce, 0xff, 0x4c, 0xcd, 0x7b, 0x33, 0x05, 0xb3, 0x91, 0x6e, 0x32, 0xa9, 0x75, 0x9f, + 0x83, 0x79, 0x43, 0x47, 0x7d, 0xc7, 0xf6, 0x91, 0xa5, 0x1d, 0x28, 0x26, 0xba, 0x89, 0xcc, 0xf2, + 0x32, 0x49, 0x14, 0x17, 0x8e, 0xef, 0x57, 0x57, 0x9b, 0x43, 0xdc, 0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0x56, 0xeb, 0x30, 0x7b, 0x12, 0xae, 0x7f, + 0x62, 0x5c, 0x45, 0x14, 0x26, 0xd9, 0x80, 0x39, 0x42, 0xa2, 0x0d, 0x3c, 0xdf, 0xee, 0x93, 0xbc, + 0x77, 0x3c, 0xcd, 0x3f, 0xbf, 0x45, 0xf7, 0x4a, 0x09, 0xc3, 0xea, 0x01, 0xaa, 0x5a, 0x05, 0xf2, + 0xc9, 0x49, 0x47, 0x9a, 0x19, 0xc3, 0xf0, 0x06, 0x33, 0x24, 0xd0, 0xaf, 0x7e, 0x06, 0x16, 0xf1, + 0xff, 0x24, 0x2d, 0x85, 0x2d, 0x89, 0xbf, 0xf0, 0x2a, 0xff, 0xf0, 0x65, 0xba, 0x1d, 0x17, 0x02, + 0x82, 0x90, 0x4d, 0xa1, 0x55, 0xec, 0x21, 0xdf, 0x47, 0xae, 0xa7, 0xa8, 0xe6, 0x24, 0xf3, 0x42, + 0x37, 0x06, 0xe5, 0x2f, 0xbe, 0x13, 0x5d, 0xc5, 0x0d, 0x8a, 0xac, 0x99, 0x66, 0x75, 0x17, 0x4e, + 0x4f, 0x88, 0x8a, 0x04, 0x9c, 0xaf, 0x30, 0xce, 0xc5, 0xb1, 0xc8, 0xc0, 0xb4, 0x6d, 0xe0, 0xf2, + 0x60, 0x2d, 0x13, 0x70, 0xfe, 0x31, 0xe3, 0x94, 0x18, 0x96, 0x2f, 0x29, 0x66, 0x7c, 0x16, 0xe6, + 0x6f, 0x22, 0x77, 0xcf, 0xf6, 0xd8, 0x2d, 0x4d, 0x02, 0xba, 0x57, 0x19, 0xdd, 0x1c, 0x03, 0x92, + 0x6b, 0x1b, 0xcc, 0x75, 0x05, 0x72, 0x5d, 0x55, 0x43, 0x09, 0x28, 0xbe, 0xc4, 0x28, 0x66, 0xb0, + 0x3e, 0x86, 0xd6, 0xa0, 0xd8, 0xb3, 0x59, 0x65, 0x8a, 0x87, 0xbf, 0xc6, 0xe0, 0x05, 0x8e, 0x61, + 0x14,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xbb, 0x95, 0xa9, 0x37, 0xef, 0x56, 0x84, 0xb7, 0xef, 0x56, 0x84, 0x77, 0xef, 0x56, 0x84, 0xf7, + 0xef, 0x56, 0x84, 0x3b, 0x87, 0x15, 0xe1, 0xab, 0x87, 0x15, 0xe1, 0x1b, 0x87, 0x15, 0xe1, 0x3b, + 0x87, 0x15, 0xe1, 0x7b, 0x87, 0x15, 0xe1, 0x8d, 0xc3, 0xca, 0xd4, 0x0f, 0x0e, 0x2b, 0x53, 0x6f, + 0x1e, 0x56, 0x84, 0xb7, 0x0f, 0x2b, 0x53, 0xef, 0x1e, 0x56, 0x84, 0xf7, 0x0f, 0x2b, 0x53, 0x77, + 0x7e, 0x54, 0x99, 0xfa, 0x49, 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0xfd, 0xfe, 0x02, 0xca, 0x31, + 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *M) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *M") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *M but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *M but is not nil && this == nil") + } + if this.A != nil && that1.A != nil { + if *this.A != *that1.A { + return fmt.Errorf("A this(%v) Not Equal that(%v)", *this.A, *that1.A) + } + } else if this.A != nil { + return fmt.Errorf("this.A == nil && that.A != nil") + } else if that1.A != nil { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *M) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.A != nil && that1.A != nil { + if *this.A != *that1.A { + return false + } + } else if this.A != nil { + return false + } else if that1.A != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *string +} + +func (this *M) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *M) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMFromFace(this) +} + +func (this *M) GetA() *string { + return this.A +} + +func NewMFromFace(that MFace) *M { + this := &M{} + this.A = that.GetA() + return this +} + +func (this *M) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&filedotname.M{") + if this.A != nil { + s = append(s, "A: "+valueToGoStringFileDot(this.A, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringFileDot(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedM(r randyFileDot, easy bool) *M { + this := &M{} + if r.Intn(10) != 0 { + v1 := string(randStringFileDot(r)) + this.A = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedFileDot(r, 2) + } + return this +} + +type randyFileDot interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneFileDot(r randyFileDot) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringFileDot(r randyFileDot) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneFileDot(r) + } + return string(tmps) +} +func randUnrecognizedFileDot(r randyFileDot, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldFileDot(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldFileDot(dAtA []byte, r randyFileDot, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateFileDot(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *M) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = len(*m.A) + n += 1 + l + sovFileDot(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFileDot(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFileDot(x uint64) (n int) { + return sovFileDot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *M) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&M{`, + `A:` + valueToStringFileDot(this.A) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringFileDot(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("file.dot.proto", fileDescriptor_file_dot_75a42d5db4a044f0) } + +var fileDescriptor_file_dot_75a42d5db4a044f0 = []byte{ + // 179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x24, 0xcb, 0xaf, 0x6e, 0xc2, 0x50, + 0x1c, 0xc5, 0xf1, 0xdf, 0x91, 0xeb, 0x96, 0x25, 0xab, 0x5a, 0x26, 0x4e, 0x96, 0xa9, 0x99, 0xb5, + 0xef, 0x30, 0x0d, 0x86, 0x37, 0x68, 0xe9, 0x1f, 0x9a, 0x50, 0x2e, 0x21, 0xb7, 0xbe, 0x8f, 0x83, + 0x44, 0x22, 0x91, 0x95, 0x95, 0xc8, 0xde, 0x1f, 0xa6, 0xb2, 0xb2, 0x92, 0x70, 0x71, 0xe7, 0x93, + 0x9c, 0x6f, 0xf0, 0x5e, 0x54, 0xdb, 0x3c, 0xca, 0x8c, 0x8d, 0xf6, 0x07, 0x63, 0x4d, 0xf8, 0xfa, + 0x70, 0x66, 0xec, 0x2e, 0xa9, 0xf3, 0xaf, 0xbf, 0xb2, 0xb2, 0x9b, 0x26, 0x8d, 0xd6, 0xa6, 0x8e, + 0x4b, 0x53, 0x9a, 0xd8, 0x7f, 0xd2, 0xa6, 0xf0, 0xf2, 0xf0, 0xeb, 0xd9, 0xfe, 0x7c, 0x04, 0x58, + 0x86, 0x6f, 0x01, 0x92, 0x4f, 0x7c, 0xe3, 0xf7, 0x65, 0x85, 0xe4, 0x7f, 0xd1, 0x39, 0x4a, 0xef, + 0x28, 0x57, 0x47, 0x19, 0x1c, 0x31, 0x3a, 0x62, 0x72, 0xc4, 0xec, 0x88, 0x56, 0x89, 0xa3, 0x12, + 0x27, 0x25, 0xce, 0x4a, 0x5c, 0x94, 0xe8, 0x94, 0xd2, 0x2b, 0x65, 0x50, 0x62, 0x54, 0xca, 0xa4, + 0xc4, 0xac, 0x94, 0xf6, 0x46, 0xb9, 0x07, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x59, 0x32, 0x8a, 0xad, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/filedotname/file.dot.proto b/deps/github.com/gogo/protobuf/test/filedotname/file.dot.proto new file mode 100644 index 000000000..e1a047c48 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/filedotname/file.dot.proto @@ -0,0 +1,62 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package filedotname; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message M { + optional string a = 1; +} + diff --git a/deps/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go b/deps/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go new file mode 100644 index 000000000..76719b8d5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go @@ -0,0 +1,236 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: file.dot.proto + +package filedotname + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*M, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedM(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedM(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &M{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFileDotDescription(t *testing.T) { + FileDotDescription() +} +func TestMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*M, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedM(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/fuzztests/Makefile b/deps/github.com/gogo/protobuf/test/fuzztests/Makefile new file mode 100644 index 000000000..aa82b00fc --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/fuzztests/Makefile @@ -0,0 +1,31 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2015, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogofast + protoc --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. fuzz.proto diff --git a/deps/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go b/deps/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go new file mode 100644 index 000000000..918e205da --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go @@ -0,0 +1,2873 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: fuzz.proto + +package fuzztests + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (m *Nil) String() string { return proto.CompactTextString(m) } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{0} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return m.Size() +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{1} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +func (m *NinRepPackedNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (m *NinOptNative) String() string { return proto.CompactTextString(m) } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{2} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +func (m *NinOptNative) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptNative) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptNative) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NinOptNative) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NinOptNative) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return 0 +} + +func (m *NinOptNative) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptNative) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptNative) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return 0 +} + +func (m *NinOptNative) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return 0 +} + +func (m *NinOptNative) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return 0 +} + +func (m *NinOptNative) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return 0 +} + +func (m *NinOptNative) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return 0 +} + +func (m *NinOptNative) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptNative) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NinOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (m *NinOptStruct) String() string { return proto.CompactTextString(m) } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{3} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +func (m *NinOptStruct) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptStruct) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptStruct) GetField3() *NinOptNative { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinOptStruct) GetField4() *NinOptNative { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinOptStruct) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptStruct) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptStruct) GetField8() *NinOptNative { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinOptStruct) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptStruct) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptStruct) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +func init() { + proto.RegisterType((*Nil)(nil), "fuzztests.Nil") + proto.RegisterType((*NinRepPackedNative)(nil), "fuzztests.NinRepPackedNative") + proto.RegisterType((*NinOptNative)(nil), "fuzztests.NinOptNative") + proto.RegisterType((*NinOptStruct)(nil), "fuzztests.NinOptStruct") +} +func (this *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&fuzztests.Nil{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&fuzztests.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&fuzztests.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringFuzz(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringFuzz(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringFuzz(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringFuzz(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringFuzz(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringFuzz(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringFuzz(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringFuzz(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&fuzztests.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringFuzz(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Nil) 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 *Nil) 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 *NinRepPackedNative) 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 *NinRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f2 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA4 := make([]byte, len(m.Field3)*10) + var j3 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j3)) + i += copy(dAtA[i:], dAtA4[:j3]) + } + if len(m.Field4) > 0 { + dAtA6 := make([]byte, len(m.Field4)*10) + var j5 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + dAtA6[j5] = uint8(num) + j5++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j5)) + i += copy(dAtA[i:], dAtA6[:j5]) + } + if len(m.Field5) > 0 { + dAtA8 := make([]byte, len(m.Field5)*10) + var j7 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + dAtA8[j7] = uint8(num) + j7++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j7)) + i += copy(dAtA[i:], dAtA8[:j7]) + } + if len(m.Field6) > 0 { + dAtA10 := make([]byte, len(m.Field6)*10) + var j9 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j9++ + } + dAtA10[j9] = uint8(num) + j9++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j9)) + i += copy(dAtA[i:], dAtA10[:j9]) + } + if len(m.Field7) > 0 { + dAtA11 := make([]byte, len(m.Field7)*5) + var j12 int + for _, num := range m.Field7 { + x13 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x13 >= 1<<7 { + dAtA11[j12] = uint8(uint64(x13)&0x7f | 0x80) + j12++ + x13 >>= 7 + } + dAtA11[j12] = uint8(x13) + j12++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j12)) + i += copy(dAtA[i:], dAtA11[:j12]) + } + if len(m.Field8) > 0 { + var j14 int + dAtA16 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x15 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x15 >= 1<<7 { + dAtA16[j14] = uint8(uint64(x15)&0x7f | 0x80) + j14++ + x15 >>= 7 + } + dAtA16[j14] = uint8(x15) + j14++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j14)) + i += copy(dAtA[i:], dAtA16[:j14]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + 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 *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintFuzz(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintFuzz(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) 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 *NinOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(m.Field3.Size())) + n17, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(m.Field4.Size())) + n18, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintFuzz(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(m.Field8.Size())) + n19, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintFuzz(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 *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovFuzz(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovFuzz(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovFuzz(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovFuzz(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozFuzz(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozFuzz(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovFuzz(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozFuzz(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFuzz(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFuzz(x uint64) (n int) { + return sovFuzz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Nil) 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 ErrIntOverflowFuzz + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + 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 *NinRepPackedNative) 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 ErrIntOverflowFuzz + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + 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 *NinOptNative) 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 ErrIntOverflowFuzz + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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 ErrInvalidLengthFuzz + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + 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 *NinOptStruct) 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 ErrIntOverflowFuzz + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NinOptNative{} + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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 ErrInvalidLengthFuzz + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + 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 skipFuzz(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, ErrIntOverflowFuzz + } + 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, ErrIntOverflowFuzz + } + 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, ErrIntOverflowFuzz + } + 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, ErrInvalidLengthFuzz + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFuzz + } + 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 := skipFuzz(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 ( + ErrInvalidLengthFuzz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFuzz = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("fuzz.proto", fileDescriptor_fuzz_a9783a48f1b0a0f4) } + +var fileDescriptor_fuzz_a9783a48f1b0a0f4 = []byte{ + // 445 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x6e, 0x1a, 0x41, + 0x10, 0xc7, 0x71, 0xcd, 0x0d, 0x7f, 0xd7, 0x10, 0xf0, 0x15, 0x9b, 0x91, 0x15, 0xa1, 0x15, 0xd5, + 0x34, 0xe1, 0xc2, 0x71, 0xd8, 0xb8, 0x75, 0x91, 0x92, 0x44, 0xce,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x9e, 0x64, 0x67, 0x9e, 0x67, 0xbf, 0x60, 0xf6, 0x7f, 0x8b, 0x9e, + 0xf5, 0xff, 0xfc, 0x1e, 0xc0, 0xf7, 0xcd, 0x00, 0x7e, 0x6e, 0x06, 0xf0, 0x6b, 0x33, 0x80, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x67, 0xe2, 0xa2, 0xc1, 0x04, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/fuzztests/fuzz.proto b/deps/github.com/gogo/protobuf/test/fuzztests/fuzz.proto new file mode 100644 index 000000000..eb01e63c7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/fuzztests/fuzz.proto @@ -0,0 +1,86 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +syntax = "proto2"; +package fuzztests; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; + +message Nil { + +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NinOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NinOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} diff --git a/deps/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go b/deps/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go new file mode 100644 index 000000000..81c8793e8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package fuzztests + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestFuzzUnrecognized(t *testing.T) { + msg := &Nil{} + input := []byte{0x8, 0xaf, 0x81, 0xc9, 0xb3, 0x97, 0xd1, 0xb5, 0xc2, 0x4f, 0x1a, 0x4a, 0x52, 0x48, 0x4e, 0x44, 0x65, 0x51, 0x4b, 0x46, 0x44, 0x33, 0x5a, 0x44, 0x72, 0x38, 0x58, 0x4c, 0x58, 0x70, 0x59, 0x45, 0x71, 0x45, 0x4f, 0x6d, 0x45, 0x4d, 0x54, 0x59, 0x4c, 0x6b, 0x55, 0x7a, 0x6f, 0x6b, 0x5a, 0x69, 0x56, 0x64, 0x46, 0x45, 0x56, 0x4d, 0x70, 0x6a, 0x39, 0x7a, 0x4b, 0x43, 0x4d, 0x6d, 0x76, 0x63, 0x46, 0x4f, 0x31, 0x4a, 0x5a, 0x6b, 0x66, 0x4a, 0x75, 0x51, 0x38, 0x54, 0x54, 0x30, 0x53, 0x61, 0x36, 0x6e, 0x4f, 0x6b, 0x35, 0x54, 0x95, 0x0, 0x0, 0x0, 0x0, 0x12, 0x38, 0x52, 0x36, 0x66, 0x76, 0x41, 0x74, 0x73, 0x7a, 0x39, 0x43, 0x6a, 0x4f, 0x64, 0x59, 0x77, 0x33, 0x30, 0x36, 0x58, 0x75, 0x65, 0x46, 0x4b, 0x46, 0x55, 0x56, 0x71, 0x6d, 0x49, 0x73, 0x4a, 0x4b, 0x78, 0x76, 0x41, 0x65, 0x42, 0x61, 0x5a, 0x30, 0x41, 0x37, 0x45, 0x76, 0x72, 0x31, 0x30, 0x4e, 0x78, 0x6d, 0x33, 0x63, 0x65, 0x66, 0x6b, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatal("expected error") + } +} + +func DisabledTestFuzzPackedIsNotIdempotent(t *testing.T) { + msg := &NinRepPackedNative{} + //original := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51, 0x71, 0x44, 0x65, 0x6f, 0x53, 0x30, 0x44, 0x6a, 0x58, 0x7a, 0x1b, 0x65, 0x62, 0x9c, 0x95, 0xc5, 0x41, 0xcb, 0x48, 0xa, 0x47, 0xf6, 0xd8, 0xd2, 0xd5, 0x8d, 0x6, 0x69, 0x8f, 0xbe, 0x7c, 0xf3, 0xe9, 0x79, 0x3c, 0xca, 0x6, 0x5b} + input := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatal("expected error") + } +} + +func DisabledTestFuzzFieldOrder(t *testing.T) { + msg := &NinOptStruct{} + input := []byte{0x52, 0x57, 0x52, 0x6a, 0x33, 0x56, 0x43, 0x76, 0x32, 0x54, 0x49, 0x4a, 0x55, 0x66, 0x39, 0x52, 0x32, 0x32, 0x73, 0x69, 0x4f, 0x67, 0x66, 0x79, 0x4b, 0x79, 0x5a, 0x55, 0x42, 0x53, 0x38, 0x68, 0x6c, 0x46, 0x79, 0x6b, 0x54, 0x43, 0x63, 0x66, 0x30, 0x6a, 0x33, 0x35, 0x33, 0x7a, 0x41, 0x66, 0x68, 0x57, 0x61, 0x78, 0x51, 0x37, 0x76, 0x52, 0x78, 0x34, 0x56, 0x43, 0x54, 0x31, 0x73, 0x6a, 0x77, 0x63, 0x45, 0x62, 0x62, 0x67, 0x34, 0x6f, 0x64, 0x35, 0x6c, 0x41, 0x45, 0x50, 0x64, 0x6f, 0x46, 0x38, 0x41, 0x4b, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err != nil { + t.Fatal(err) + } +} + +func TestFuzzSint64Overflow(t *testing.T) { + msg := &NinOptNative{} + //original := []byte{0x9, 0x65, 0xb4, 0xfd, 0xbc, 0x5, 0xc7, 0xee, 0x3f, 0x15, 0x48, 0xec, 0x67, 0x3f, 0x18, 0xca, 0xa4, 0xe0, 0xa9, 0x5, 0x20, 0x8e, 0xb7, 0x9f, 0xf5, 0xcf, 0xe9, 0xea, 0xad, 0xfd, 0x1, 0x28, 0xc9, 0xf1, 0xbc, 0x88, 0xc, 0x30, 0xeb, 0x99, 0xbd, 0xa8, 0xe, 0x38, 0xc0, 0xd4, 0xb7, 0xba, 0x7, 0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16, 0x9d, 0x59, 0xf9, 0x31, 0xe0, 0x99, 0x0, 0x0, 0x0, 0x0, 0x61, 0x59, 0x5b, 0xb5, 0x57, 0x56, 0x93, 0x70, 0xde, 0x68, 0x0, 0x72, 0x40, 0x64, 0x5a, 0x5a, 0x61, 0x57, 0x78, 0x68, 0x53, 0x65, 0x66, 0x67, 0x38, 0x38, 0x61, 0x48, 0x44, 0x32, 0x6c, 0x36, 0x50, 0x31, 0x4d, 0x43, 0x39, 0x31, 0x6d, 0x37, 0x34, 0x32, 0x48, 0x6b, 0x4d, 0x70, 0x31, 0x45, 0x73, 0x48, 0x71, 0x4a, 0x69, 0x37, 0x56, 0x53, 0x44, 0x6b, 0x48, 0x45, 0x50, 0x4b, 0x7a, 0x52, 0x49, 0x4c, 0x50, 0x69, 0x44, 0x72, 0x42, 0x56, 0x50, 0x78, 0x62, 0x56, 0x55, 0x7a, 0x5b, 0xb3, 0x6c, 0x59, 0x4c, 0xf1, 0x31, 0xeb, 0xb6, 0x25, 0x1a, 0x26, 0x67, 0x66, 0x97, 0x79, 0xb8, 0x37, 0x8, 0xe1, 0x32, 0x45, 0x6e, 0x6, 0x90, 0x4f, 0xde, 0x26, 0x7a, 0xc6, 0x29, 0x65, 0x4a, 0x69, 0xa7, 0x21, 0xfb, 0x42, 0xda, 0x43, 0x89, 0x27, 0x70, 0x71, 0xde, 0x66, 0xa4, 0x75, 0x2b, 0x5c, 0x96, 0x9f, 0x25, 0x3b, 0xc1, 0x64, 0x14, 0x4, 0x60, 0x8c, 0x58, 0x7e, 0xa1, 0x59, 0x7b, 0x47, 0x18, 0xc, 0x5b, 0x18, 0x63, 0x9, 0xb4, 0xc9, 0x7, 0xf9, 0xae, 0x33, 0xae, 0x2, 0x4a, 0x8b, 0x34, 0x92, 0x40, 0xb, 0xd7, 0x80, 0x60, 0xdb, 0x44, 0x5} + input := []byte{0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16} + if err := proto.Unmarshal(input, msg); err != nil { + return + } +} + +func DisabledTestFuzzOverrideField(t *testing.T) { + msg := &NinOptNative{} + //original := []byte{0x9, 0x73, 0x78, 0x5a, 0xf2, 0xb4, 0x66, 0xe8, 0x3f, 0x15, 0x71, 0xdc, 0x4, 0x3f, 0x18, 0xe5, 0x8e, 0xab, 0xdb, 0x3, 0x20, 0xbe, 0xed, 0xe6, 0xc0, 0xb9, 0xb8, 0xa7, 0xb5, 0x12, 0x28, 0xcb, 0x8c, 0x91, 0xef, 0xc, 0x30, 0x9a, 0xc1, 0xc3, 0xc0, 0xf, 0x38, 0xe8, 0x9b, 0xf0, 0xca, 0x5, 0x40, 0xd2, 0xd7, 0xdd, 0xa3, 0xea, 0xab, 0xec, 0xc2, 0xaa, 0x1, 0x4d, 0xc9, 0x15, 0x0, 0xea, 0x55, 0x72, 0x3e, 0x92, 0xa8, 0x59, 0x3e, 0x87, 0x7d, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x61, 0xca, 0xe7, 0xdb, 0x57, 0xa1, 0xb6, 0x41, 0xf4, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea, 0x82, 0x1, 0x23, 0xed, 0x7a, 0x3, 0x78, 0xee, 0x56, 0x46, 0xd0, 0xe1, 0x17, 0x18, 0x30, 0x9d, 0x2f, 0xac, 0x1c, 0xa, 0x30, 0xa9, 0x8d, 0x10, 0xed, 0xb5, 0x44, 0x36, 0x5e, 0x84, 0x73, 0x5d, 0x38, 0x51, 0x2b, 0x6e, 0xc6, 0xb5} + input := []byte{0x4d, 0xc9, 0x15, 0x0, 0xea, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea} + if err := proto.Unmarshal(input, msg); err != nil { + panic(err) + } + output, err := proto.Marshal(msg) + if err != nil { + t.Fatal(err) + } + if len(input) != len(output) { + t.Logf("%#v", msg) + msg2 := &NinOptNative{} + if err := proto.Unmarshal(output, msg2); err == nil { + t.Logf("%#v", msg2) + } + t.Errorf("expected %#v got %#v", input, output) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzBadWireType(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd30000'0000") + input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0x30, 0x27, 0x30, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected bad wiretype for Field4 error got %#v", msg) + } else { + t.Log(err) + } +} + +func TestFuzzIntegerOverflow(t *testing.T) { + msg := &Nil{} + //input := []byte("\x1500000\x8b\x9b\xa3\xa8\xb6\xe1\xe1\xfe\u061c0") + input := []byte{0x15, 0x30, 0x30, 0x30, 0x30, 0x30, 0x8b, 0x9b, 0xa3, 0xa8, 0xb6, 0xe1, 0xe1, 0xfe, 0xd8, 0x9c, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected integer overflow error %#v", msg) + } else { + t.Log(err) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzUnexpectedEOF(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x16000000000000000000" + "00\xb90") + input := []byte{0x6a, 0x16, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xb9, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected unexpected eof error got %#v", msg) + } else { + t.Log(err) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzCantSkipWireType(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd3000\xa80\xa7000") + input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0xa8, 0x30, 0xa7, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected cant skip wiretype error got %#v", msg) + } else { + t.Log(err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/group/Makefile b/deps/github.com/gogo/protobuf/test/group/Makefile new file mode 100644 index 000000000..ebbbbd2c2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/group/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. group.proto) diff --git a/deps/github.com/gogo/protobuf/test/group/group.pb.go b/deps/github.com/gogo/protobuf/test/group/group.pb.go new file mode 100644 index 000000000..4c1eb4479 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/group/group.pb.go @@ -0,0 +1,1029 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: group.proto + +package group + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Groups1 struct { + G []*Groups1_G `protobuf:"group,1,rep,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups1) Reset() { *m = Groups1{} } +func (*Groups1) ProtoMessage() {} +func (*Groups1) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{0} +} +func (m *Groups1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups1.Unmarshal(m, b) +} +func (m *Groups1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups1.Marshal(b, m, deterministic) +} +func (dst *Groups1) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups1.Merge(dst, src) +} +func (m *Groups1) XXX_Size() int { + return xxx_messageInfo_Groups1.Size(m) +} +func (m *Groups1) XXX_DiscardUnknown() { + xxx_messageInfo_Groups1.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups1 proto.InternalMessageInfo + +type Groups1_G struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups1_G) Reset() { *m = Groups1_G{} } +func (*Groups1_G) ProtoMessage() {} +func (*Groups1_G) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{0, 0} +} +func (m *Groups1_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups1_G.Unmarshal(m, b) +} +func (m *Groups1_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups1_G.Marshal(b, m, deterministic) +} +func (dst *Groups1_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups1_G.Merge(dst, src) +} +func (m *Groups1_G) XXX_Size() int { + return xxx_messageInfo_Groups1_G.Size(m) +} +func (m *Groups1_G) XXX_DiscardUnknown() { + xxx_messageInfo_Groups1_G.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups1_G proto.InternalMessageInfo + +type Groups2 struct { + G *Groups2_G `protobuf:"group,1,opt,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups2) Reset() { *m = Groups2{} } +func (*Groups2) ProtoMessage() {} +func (*Groups2) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{1} +} +func (m *Groups2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups2.Unmarshal(m, b) +} +func (m *Groups2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups2.Marshal(b, m, deterministic) +} +func (dst *Groups2) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups2.Merge(dst, src) +} +func (m *Groups2) XXX_Size() int { + return xxx_messageInfo_Groups2.Size(m) +} +func (m *Groups2) XXX_DiscardUnknown() { + xxx_messageInfo_Groups2.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups2 proto.InternalMessageInfo + +type Groups2_G struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups2_G) Reset() { *m = Groups2_G{} } +func (*Groups2_G) ProtoMessage() {} +func (*Groups2_G) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{1, 0} +} +func (m *Groups2_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups2_G.Unmarshal(m, b) +} +func (m *Groups2_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups2_G.Marshal(b, m, deterministic) +} +func (dst *Groups2_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups2_G.Merge(dst, src) +} +func (m *Groups2_G) XXX_Size() int { + return xxx_messageInfo_Groups2_G.Size(m) +} +func (m *Groups2_G) XXX_DiscardUnknown() { + xxx_messageInfo_Groups2_G.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups2_G proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Groups1)(nil), "group.Groups1") + proto.RegisterType((*Groups1_G)(nil), "group.Groups1.G") + proto.RegisterType((*Groups2)(nil), "group.Groups2") + proto.RegisterType((*Groups2_G)(nil), "group.Groups2.G") +} +func (this *Groups1) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups1_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups2_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func GroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3814 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x53, 0x10, 0x1d, 0x53, 0x12, 0x6d, + 0xc7, 0xb4, 0xdd, 0x50, 0x09, 0x2d, 0xc9, 0x16, 0xd4, 0xc4, 0x05, 0x41, 0x08, 0x81, 0x4b, 0x12, + 0xc8, 0x82, 0x8c, 0x7f, 0x32, 0xed, 0xce, 0x72, 0x71, 0x01, 0xae, 0xb4, 0xd8, 0xdd, 0xec, 0x2e, + 0x24, 0x53, 0xd3, 0x07, 0x75, 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 0x98, 0x0c, + 0x0f, 0x2f, 0x36, 0x47, 0x85, 0x8b, 0x78, 0xf2, 0xb8, 0x76, 0x8f, 0x59, 0x33, 0x62, 0xe9, 0x17, + 0x12, 0xf0, 0xc0, 0x58, 0xf2, 0xb1, 0x86, 0x3e, 0x04, 0x60, 0x58, 0x4e, 0xdf, 0x67, 0x1d, 0x11, + 0x4b, 0xb0, 0x59, 0x2a, 0xa1, 0xc9, 0x8b, 0x24, 0xcf, 0xbe, 0x1f, 0x8c, 0x27, 0xe9, 0x38, 0x30, + 0x11, 0x55, 0x78, 0x66, 0x60, 0x68, 0x8a, 0x1a, 0xba, 0x72, 0xcc, 0x4c, 0x47, 0x02, 0xf3, 0xe3, + 0x20, 0xeb, 0xa6, 0x81, 0x2d, 0x5f, 0xf5, 0x7c, 0x17, 0x6b, 0x3d, 0xc3, 0xea, 0xd2, 0x0a, 0x92, + 0x29, 0xa5, 0x3b, 0x9a, 0xe9, 0x61, 0x65, 0x8e, 0x0d, 0xb7, 0xc4, 0x28, 0x41, 0xd0, 0x00, 0x72, + 0x43, 0x88, 0xe9, 0x08, 0x82, 0x0d, 0x07, 0x88, 0xd5, 0x6f, 0x65, 0x20, 0x17, 0xea, 0xab, 0xd1, + 0x39, 0xc8, 0x5f, 0xd3, 0x6e, 0x68, 0xaa, 0x38, 0x2b, 0x31, 0x4f, 0xe4, 0x88, 0xac, 0xc9, 0xcf, + 0x4b, 0x1f, 0x87, 0x45, 0xaa, 0x62, 0xf7, 0x7d, 0xec, 0xaa, 0xba, 0xa9, 0x79, 0x1e, 0x75, 0x5a, + 0x86, 0xaa, 0x22, 0x32, 0xd6, 0x20, 0x43, 0x15, 0x31, 0x82, 0x2e, 0xc2, 0x02, 0x45, 0xf4, 0xfa, + 0xa6, 0x6f, 0x38, 0x26, 0x56, 0xc9, 0xe9, 0xcd, 0xa3, 0x95, 0x24, 0xb0, 0x6c, 0x9e, 0x68, 0xec, + 0x70, 0x05, 0x62, 0x91, 0x87, 0xb6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 0x98, 0x2a, 0x2e, 0x3f, 0x07, 0x19, 0xe1, 0x07, 0x52, 0x92, 0x89, 0x27, 0x54, + 0x87, 0x1d, 0x7b, 0x13, 0x6b, 0x59, 0x25, 0x63, 0x89, 0xc1, 0x73, 0x90, 0x37, 0x3c, 0x75, 0x70, + 0x4b, 0x9e, 0x38, 0x9b, 0x58, 0xcb, 0x28, 0x39, 0xc3, 0x0b, 0x6e, 0x18, 0x57, 0xdf, 0x48, 0x40, + 0x21, 0x7a, 0xcb, 0x8f, 0xb6, 0x20, 0x63, 0xda, 0xba, 0x46, 0x43, 0x8b, 0x7d, 0x62, 0x5a, 0x8b, + 0xf9, 0x30, 0xb0, 0xbe, 0xcd, 0xf5, 0x95, 0x00, 0xb9, 0xfc, 0x8f, 0x12, 0x64, 0x84, 0x18, 0x2d, + 0x41, 0xca, 0xd1, 0xfc, 0x43, 0x4a, 0x97, 0xde, 0x4c, 0xc8, 0x92, 0x42, 0x9f, 0x89, 0xdc, 0x73, + 0x34, 0x8b, 0x86, 0x00, 0x97, 0x93, 0x67, 0xb2, 0xae, 0x26, 0xd6, 0xda, 0xf4, 0xf8, 0x61, 0xf7, + 0x7a, 0xd8, 0xf2, 0x3d, 0xb1, 0xae, 0x5c, 0x5e, 0xe1, 0x62, 0xf4, 0x24, 0xcc, 0xfb, 0xae, 0x66, + 0x98, 0x11, 0xdd, 0x14, 0xd5, 0x95, 0xc5, 0x40, 0xa0, 0x5c, 0x82, 0xd3, 0x82, 0xb7, 0x8d, 0x7d, + 0x4d, 0x3f, 0xc4, 0xed, 0x01, 0x68, 0x9a, 0x5e, 0x33, 0x9c, 0xe2, 0x0a, 0x5b, 0x7c, 0x5c, 0x60, + 0x57, 0xbf, 0x2f, 0xc1, 0xbc, 0x38, 0x30, 0xb5, 0x03, 0x67, 0xed, 0x00, 0x68, 0x96, 0x65, 0xfb, + 0x61, 0x77, 0x8d, 0x86, 0xf2, 0x08, 0x6e, 0xbd, 0x1c, 0x80, 0x94, 0x10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40, 0xbe, 0x41, 0xaf, 0x55, 0x25, 0x2e, 0xdf, + 0x18, 0xf0, 0x6f, 0x08, 0x7e, 0x69, 0x84, 0x7f, 0xe3, 0x84, 0xfc, 0xc9, 0x01, 0xff, 0xe6, 0x85, + 0xb7, 0xee, 0xac, 0x4c, 0x7d, 0xef, 0xce, 0xca, 0xd4, 0x3f, 0xdd, 0x59, 0x99, 0x7a, 0xfb, 0xce, + 0x8a, 0xf4, 0xc3, 0x3b, 0x2b, 0xd2, 0x8f, 0xee, 0xac, 0x48, 0xb7, 0xef, 0xae, 0x48, 0x5f, 0xbb, + 0xbb, 0x22, 0x7d, 0xe3, 0xee, 0x8a, 0xf4, 0x9d, 0xbb, 0x2b, 0xd2, 0x5b, 0x77, 0x57, 0xa6, 0xbe, + 0x77, 0x77, 0x65, 0xea, 0xed, 0xbb, 0x2b, 0x53, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xe1, + 0x83, 0x3a, 0x56, 0x32, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Groups1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups1) + if !ok { + that2, ok := that.(Groups1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups1 but is not nil && this == nil") + } + if len(this.G) != len(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups1) + if !ok { + that2, ok := that.(Groups1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups1_G) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups1_G) + if !ok { + that2, ok := that.(Groups1_G) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups1_G") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups1_G but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups1_G but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups1_G) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups1_G) + if !ok { + that2, ok := that.(Groups1_G) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups2) + if !ok { + that2, ok := that.(Groups2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups2 but is not nil && this == nil") + } + if !this.G.Equal(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", this.G, that1.G) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups2) + if !ok { + that2, ok := that.(Groups2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.G.Equal(that1.G) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups2_G) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups2_G) + if !ok { + that2, ok := that.(Groups2_G) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups2_G") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups2_G but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups2_G but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups2_G) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups2_G) + if !ok { + that2, ok := that.(Groups2_G) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups1) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&group.Groups1{") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Groups1_G) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&group.Groups1_G{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringGroup(this.Field2, "float64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Groups2) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&group.Groups2{") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Groups2_G) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&group.Groups2_G{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringGroup(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedGroups1(r randyGroup, easy bool) *Groups1 { + this := &Groups1{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.G = make([]*Groups1_G, v1) + for i := 0; i < v1; i++ { + this.G[i] = NewPopulatedGroups1_G(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 2) + } + return this +} + +func NewPopulatedGroups1_G(r randyGroup, easy bool) *Groups1_G { + this := &Groups1_G{} + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float64(r.Float64()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 3) + } + return this +} + +func NewPopulatedGroups2(r randyGroup, easy bool) *Groups2 { + this := &Groups2{} + if r.Intn(10) != 0 { + this.G = NewPopulatedGroups2_G(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 2) + } + return this +} + +func NewPopulatedGroups2_G(r randyGroup, easy bool) *Groups2_G { + this := &Groups2_G{} + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field1 = &v4 + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field2 = make([]float64, v5) + for i := 0; i < v5; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 3) + } + return this +} + +type randyGroup interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneGroup(r randyGroup) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringGroup(r randyGroup) string { + v6 := r.Intn(100) + tmps := make([]rune, v6) + for i := 0; i < v6; i++ { + tmps[i] = randUTF8RuneGroup(r) + } + return string(tmps) +} +func randUnrecognizedGroup(r randyGroup, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldGroup(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldGroup(dAtA []byte, r randyGroup, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + v7 := r.Int63() + if r.Intn(2) == 0 { + v7 *= -1 + } + dAtA = encodeVarintPopulateGroup(dAtA, uint64(v7)) + case 1: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateGroup(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateGroup(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (this *Groups1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups1{`, + `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups1_G", "Groups1_G", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups1_G) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups1_G{`, + `Field1:` + valueToStringGroup(this.Field1) + `,`, + `Field2:` + valueToStringGroup(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups2{`, + `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups2_G", "Groups2_G", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups2_G) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups2_G{`, + `Field1:` + valueToStringGroup(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringGroup(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("group.proto", fileDescriptor_group_3742ba72ecbfc017) } + +var fileDescriptor_group_3742ba72ecbfc017 = []byte{ + // 211 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x2f, 0xca, 0x2f, + 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xc5, 0x71, 0xb1, 0xbb, 0x83, 0xf4, + 0x15, 0x1b, 0x0a, 0xc9, 0x71, 0x31, 0xa6, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x19, 0x09, 0xe8, + 0x41, 0x4c, 0x86, 0x4a, 0xe9, 0xb9, 0x07, 0x31, 0xa6, 0x4b, 0x19, 0x73, 0x31, 0xba, 0x0b, 0x89, + 0x71, 0xb1, 0xb9, 0x65, 0xa6, 0xe6, 0xa4, 0x18, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x41, + 0x79, 0x70, 0x71, 0x23, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x46, 0xa8, 0xb8, 0x11, 0xc2, 0x7c, 0x23, + 0x98, 0xf9, 0x8c, 0x18, 0xe6, 0x1b, 0x91, 0x68, 0x3e, 0x33, 0xc2, 0x7c, 0x27, 0x93, 0x13, 0x0f, + 0xe5, 0x18, 0x2e, 0x3c, 0x94, 0x63, 0xb8, 0xf1, 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x0f, + 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x6c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, + 0x86, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x70, 0xe1, 0x91, 0x1c, + 0xc3, 0x83, 0x47, 0x72, 0x0c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xd8, 0xef, 0x2c, 0x39, + 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/group/group.proto b/deps/github.com/gogo/protobuf/test/group/group.proto new file mode 100644 index 000000000..0dad6569a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/group/group.proto @@ -0,0 +1,65 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package group; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = false; + +message Groups1 { + repeated group G = 1 { + optional int64 Field1 = 1; + optional double Field2 = 2; + } +} + +message Groups2 { + optional group G = 1 { + optional int64 Field1 = 1; + repeated double Field2 = 2; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/group/grouppb_test.go b/deps/github.com/gogo/protobuf/test/group/grouppb_test.go new file mode 100644 index 000000000..e35e57514 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/group/grouppb_test.go @@ -0,0 +1,530 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: group.proto + +package group + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestGroups1Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups1_GProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups2Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups2_GProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups1JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups1_GJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1_G{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups2JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups2_GJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2_G{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups1ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1_GProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1_GProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2_GProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2_GProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroupDescription(t *testing.T) { + GroupDescription() +} +func TestGroups1VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups1_GVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups2VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups2_GVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups1GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups1_GGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups2GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups2_GGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups1Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups1_GStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups2Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups2_GStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/Makefile b/deps/github.com/gogo/protobuf/test/importcustom-issue389/Makefile new file mode 100644 index 000000000..5d3ad1cab --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/Makefile @@ -0,0 +1,4 @@ +regenerate: + (cd imported && make regenerate) + (cd importing && make regenerate) + diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/Makefile b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/Makefile new file mode 100644 index 000000000..c5f75100d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. a.proto \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.pb.go b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.pb.go new file mode 100644 index 000000000..837771f12 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.pb.go @@ -0,0 +1,443 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: a.proto + +package imported + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A struct { + F1 string `protobuf:"bytes,1,opt,name=f1,proto3" json:"f1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_a_b3350f4009dfb5d2, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetF1() string { + if m != nil { + return m.F1 + } + return "" +} + +func init() { + proto.RegisterType((*A)(nil), "imported.A") +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F1 != that1.F1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.F1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintA(dAtA, i, uint64(len(m.F1))) + i += copy(dAtA[i:], m.F1) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintA(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 NewPopulatedA(r randyA, easy bool) *A { + this := &A{} + this.F1 = string(randStringA(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedA(r, 2) + } + return this +} + +type randyA interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneA(r randyA) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringA(r randyA) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneA(r) + } + return string(tmps) +} +func randUnrecognizedA(r randyA, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldA(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldA(dAtA []byte, r randyA, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateA(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateA(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateA(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *A) Size() (n int) { + var l int + _ = l + l = len(m.F1) + if l > 0 { + n += 1 + l + sovA(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovA(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozA(x uint64) (n int) { + return sovA(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) 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 ErrIntOverflowA + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowA + } + 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 ErrInvalidLengthA + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.F1 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipA(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthA + } + 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 skipA(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, ErrIntOverflowA + } + 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, ErrIntOverflowA + } + 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, ErrIntOverflowA + } + 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, ErrInvalidLengthA + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowA + } + 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 := skipA(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 ( + ErrInvalidLengthA = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowA = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("a.proto", fileDescriptor_a_b3350f4009dfb5d2) } + +var fileDescriptor_a_b3350f4009dfb5d2 = []byte{ + // 127 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x62, 0x4f, 0xd4, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc8, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0x49, 0x4d, 0x91, 0xd2, 0x4d, + 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, + 0x2b, 0x48, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x51, 0x49, 0x98, 0x8b, 0xd1, + 0x51, 0x88, 0x8f, 0x8b, 0x29, 0xcd, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x88, 0x29, 0xcd, + 0xd0, 0x49, 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, + 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x93, 0xd8, 0xc0, 0xba, + 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0x12, 0x2a, 0xca, 0x79, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto new file mode 100644 index 000000000..39d65cd1a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package imported; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message A { + string f1 = 1; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/apb_test.go b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/apb_test.go new file mode 100644 index 000000000..409ab1f0b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/apb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: a.proto + +package imported + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/b.go b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/b.go new file mode 100644 index 000000000..058e6a3ac --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/imported/b.go @@ -0,0 +1,55 @@ +package imported + +import ( + "encoding/json" + + "github.com/gogo/protobuf/proto" +) + +type B struct { + A +} + +func (b B) Equal(other B) bool { + return b.A.Equal(other.A) +} + +func (b B) Size() int { + return b.A.Size() +} + +func NewPopulatedB(r randyA) *B { + a := NewPopulatedA(r, true) + if a == nil { + return nil + } + return &B{*a} +} + +func (b B) Marshal() ([]byte, error) { + return proto.Marshal(&b.A) +} + +func (b *B) Unmarshal(data []byte) error { + a := &A{} + err := proto.Unmarshal(data, a) + if err != nil { + return err + } + b.A = *a + return nil +} + +func (b B) MarshalJSON() ([]byte, error) { + return json.Marshal(b.A) +} + +func (b *B) UnmarshalJSON(data []byte) error { + a := &A{} + err := json.Unmarshal(data, a) + if err != nil { + return err + } + *b = B{A: *a} + return nil +} diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/Makefile b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/Makefile new file mode 100644 index 000000000..f29f969c4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. c.proto \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.pb.go b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.pb.go new file mode 100644 index 000000000..5112c22bb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.pb.go @@ -0,0 +1,457 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: c.proto + +package importing + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/importcustom-issue389/imported" + +import github_com_gogo_protobuf_test_importcustom_issue389_imported "github.com/gogo/protobuf/test/importcustom-issue389/imported" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type C struct { + F2 *github_com_gogo_protobuf_test_importcustom_issue389_imported.B `protobuf:"bytes,1,opt,name=f2,customtype=github.com/gogo/protobuf/test/importcustom-issue389/imported.B" json:"f2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (m *C) String() string { return proto.CompactTextString(m) } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { + return fileDescriptor_c_081b796ebd2c7433, []int{0} +} +func (m *C) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *C) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_C.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *C) XXX_Merge(src proto.Message) { + xxx_messageInfo_C.Merge(dst, src) +} +func (m *C) XXX_Size() int { + return m.Size() +} +func (m *C) XXX_DiscardUnknown() { + xxx_messageInfo_C.DiscardUnknown(m) +} + +var xxx_messageInfo_C proto.InternalMessageInfo + +func init() { + proto.RegisterType((*C)(nil), "importing.C") +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.F2 == nil { + if this.F2 != nil { + return false + } + } else if !this.F2.Equal(*that1.F2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *C) 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 *C) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F2 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintC(dAtA, i, uint64(m.F2.Size())) + n1, err := m.F2.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 encodeVarintC(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 NewPopulatedC(r randyC, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + this.F2 = github_com_gogo_protobuf_test_importcustom_issue389_imported.NewPopulatedB(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedC(r, 2) + } + return this +} + +type randyC interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneC(r randyC) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringC(r randyC) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneC(r) + } + return string(tmps) +} +func randUnrecognizedC(r randyC, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldC(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldC(dAtA []byte, r randyC, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateC(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateC(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateC(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *C) Size() (n int) { + var l int + _ = l + if m.F2 != nil { + l = m.F2.Size() + n += 1 + l + sovC(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovC(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozC(x uint64) (n int) { + return sovC(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *C) 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 ErrIntOverflowC + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowC + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthC + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F2 == nil { + m.F2 = &github_com_gogo_protobuf_test_importcustom_issue389_imported.B{} + } + if err := m.F2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipC(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthC + } + 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 skipC(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, ErrIntOverflowC + } + 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, ErrIntOverflowC + } + 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, ErrIntOverflowC + } + 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, ErrInvalidLengthC + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowC + } + 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 := skipC(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 ( + ErrInvalidLengthC = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowC = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("c.proto", fileDescriptor_c_081b796ebd2c7433) } + +var fileDescriptor_c_081b796ebd2c7433 = []byte{ + // 180 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x62, 0x4f, 0xd6, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xc9, 0xcc, 0x4b, 0x97, 0xd2, + 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, + 0x07, 0xab, 0x48, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x53, 0xca, 0x05, 0xa7, + 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x88, 0xb9, 0xc9, 0xa5, 0xc5, 0x25, 0xf9, 0xb9, 0xba, 0x99, + 0xc5, 0xc5, 0xa5, 0xa9, 0xc6, 0x16, 0x96, 0x50, 0xd1, 0xd4, 0x14, 0xfd, 0x44, 0x88, 0x29, 0x4a, + 0x29, 0x5c, 0x8c, 0xce, 0x42, 0xf1, 0x5c, 0x4c, 0x69, 0x46, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, + 0x46, 0xdc, 0x7a, 0x30, 0x35, 0x7a, 0x8e, 0x4e, 0x4e, 0xb7, 0xee, 0xc9, 0xdb, 0x51, 0x62, 0x8f, + 0x9e, 0x53, 0x10, 0x53, 0x9a, 0x91, 0x93, 0xc4, 0x8f, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, + 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, + 0x31, 0x26, 0xb1, 0x81, 0x4d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x06, 0x70, 0x86, 0x94, + 0x11, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.proto b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.proto new file mode 100644 index 000000000..8644d89d2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package importing; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message C { + imported.A f2 = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/importcustom-issue389/imported.B"]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/cpb_test.go b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/cpb_test.go new file mode 100644 index 000000000..9daca36ff --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importcustom-issue389/importing/cpb_test.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: c.proto + +package importing + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/importcustom-issue389/imported" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/importdedup/Makefile b/deps/github.com/gogo/protobuf/test/importdedup/Makefile new file mode 100644 index 000000000..21d823a67 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importdedup/Makefile @@ -0,0 +1,31 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. subpkg/subproto.proto) diff --git a/deps/github.com/gogo/protobuf/test/importdedup/importdedup_test.go b/deps/github.com/gogo/protobuf/test/importdedup/importdedup_test.go new file mode 100644 index 000000000..8bdcc6238 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importdedup/importdedup_test.go @@ -0,0 +1,34 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package importdedup + +import testing "testing" + +func TestImportDedup(t *testing.T) { +} diff --git a/deps/github.com/gogo/protobuf/test/importdedup/proto.pb.go b/deps/github.com/gogo/protobuf/test/importdedup/proto.pb.go new file mode 100644 index 000000000..d12d86974 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importdedup/proto.pb.go @@ -0,0 +1,83 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package importdedup + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" + +import github_com_gogo_protobuf_test_importdedup_subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Object struct { + CustomField *github_com_gogo_protobuf_test_importdedup_subpkg.CustomType `protobuf:"bytes,1,opt,name=CustomField,customtype=github.com/gogo/protobuf/test/importdedup/subpkg.CustomType" json:"CustomField,omitempty"` + SubObject *subpkg.SubObject `protobuf:"bytes,2,opt,name=SubObject" json:"SubObject,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_proto_38d4f6a4f3773b6e, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Object.Unmarshal(m, b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return xxx_messageInfo_Object.Size(m) +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func (m *Object) GetSubObject() *subpkg.SubObject { + if m != nil { + return m.SubObject + } + return nil +} + +func init() { + proto.RegisterType((*Object)(nil), "importdedup.Object") +} + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_38d4f6a4f3773b6e) } + +var fileDescriptor_proto_38d4f6a4f3773b6e = []byte{ + // 175 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xdc, 0x99, 0xb9, 0x05, 0xf9, 0x45, 0x25, 0x29, 0xa9, 0x29, 0xa5, + 0x05, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, + 0xe9, 0xf9, 0xfa, 0x60, 0x35, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x4a, + 0xd9, 0xe3, 0x54, 0x5e, 0x92, 0x5a, 0x5c, 0xa2, 0x8f, 0x64, 0xb2, 0x7e, 0x71, 0x69, 0x52, 0x41, + 0x76, 0x3a, 0x98, 0x42, 0x58, 0xae, 0x34, 0x87, 0x91, 0x8b, 0xcd, 0x3f, 0x29, 0x2b, 0x35, 0xb9, + 0x44, 0x28, 0x91, 0x8b, 0xdb, 0xb9, 0xb4, 0xb8, 0x24, 0x3f, 0xd7, 0x2d, 0x33, 0x35, 0x27, 0x45, + 0x82, 0x51, 0x81, 0x51, 0x83, 0xc7, 0xc9, 0xfe, 0xd6, 0x3d, 0x79, 0x6b, 0x52, 0x2d, 0xd1, 0x83, + 0x98, 0x13, 0x52, 0x59, 0x90, 0x1a, 0x84, 0x6c, 0xa6, 0x90, 0x3e, 0x17, 0x67, 0x70, 0x69, 0x12, + 0xc4, 0x3e, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x41, 0x3d, 0xa8, 0x1e, 0xb8, 0x44, 0x10, + 0x42, 0x0d, 0x20, 0x00, 0x00, 0xff, 0xff, 0x21, 0x11, 0x7d, 0xc2, 0x29, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/importdedup/proto.proto b/deps/github.com/gogo/protobuf/test/importdedup/proto.proto new file mode 100644 index 000000000..5d9c9c827 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importdedup/proto.proto @@ -0,0 +1,40 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package importdedup; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto"; + +message Object { + optional bytes CustomField = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/importdedup/subpkg.CustomType"]; + optional subpkg.SubObject SubObject = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go b/deps/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go new file mode 100644 index 000000000..59ccf729c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go @@ -0,0 +1,31 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package subpkg + +type CustomType struct{} diff --git a/deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go b/deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go new file mode 100644 index 000000000..c8666c5b0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: subpkg/subproto.proto + +package subpkg + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type SubObject struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubObject) Reset() { *m = SubObject{} } +func (m *SubObject) String() string { return proto.CompactTextString(m) } +func (*SubObject) ProtoMessage() {} +func (*SubObject) Descriptor() ([]byte, []int) { + return fileDescriptor_subproto_094c5f22e1aecb1e, []int{0} +} +func (m *SubObject) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubObject.Unmarshal(m, b) +} +func (m *SubObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubObject.Marshal(b, m, deterministic) +} +func (dst *SubObject) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubObject.Merge(dst, src) +} +func (m *SubObject) XXX_Size() int { + return xxx_messageInfo_SubObject.Size(m) +} +func (m *SubObject) XXX_DiscardUnknown() { + xxx_messageInfo_SubObject.DiscardUnknown(m) +} + +var xxx_messageInfo_SubObject proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SubObject)(nil), "subpkg.SubObject") +} + +func init() { proto.RegisterFile("subpkg/subproto.proto", fileDescriptor_subproto_094c5f22e1aecb1e) } + +var fileDescriptor_subproto_094c5f22e1aecb1e = []byte{ + // 88 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0x4d, 0x2a, + 0xc8, 0x4e, 0xd7, 0x07, 0x51, 0x45, 0xf9, 0x25, 0xf9, 0x7a, 0x60, 0x52, 0x88, 0x0d, 0x22, 0x2c, + 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e, + 0xaf, 0x0f, 0x96, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x4d, 0x89, 0x9b, + 0x8b, 0x33, 0xb8, 0x34, 0xc9, 0x3f, 0x29, 0x2b, 0x35, 0xb9, 0x04, 0x10, 0x00, 0x00, 0xff, 0xff, + 0x4e, 0x38, 0xf3, 0x28, 0x5b, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto b/deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto new file mode 100644 index 000000000..b8df5e478 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto @@ -0,0 +1,36 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package subpkg; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message SubObject { + +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/Makefile b/deps/github.com/gogo/protobuf/test/importduplicate/Makefile new file mode 100644 index 000000000..efd3ea248 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/Makefile @@ -0,0 +1,40 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. importduplicate.proto + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. sortkeys/sortable.proto + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. proto/proto.proto + +test: + go test diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go new file mode 100644 index 000000000..8906fb947 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: importduplicate.proto + +package importduplicate + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import proto1 "github.com/gogo/protobuf/test/importduplicate/proto" +import sortkeys "github.com/gogo/protobuf/test/importduplicate/sortkeys" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapAndSortKeys struct { + Key *sortkeys.Object `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + KeyValue map[int32]string `protobuf:"bytes,2,rep,name=keyValue" json:"keyValue,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Value *proto1.Subject `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapAndSortKeys) Reset() { *m = MapAndSortKeys{} } +func (m *MapAndSortKeys) String() string { return proto.CompactTextString(m) } +func (*MapAndSortKeys) ProtoMessage() {} +func (*MapAndSortKeys) Descriptor() ([]byte, []int) { + return fileDescriptor_importduplicate_e9d46e93914bce47, []int{0} +} +func (m *MapAndSortKeys) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapAndSortKeys.Unmarshal(m, b) +} +func (m *MapAndSortKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapAndSortKeys.Marshal(b, m, deterministic) +} +func (dst *MapAndSortKeys) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapAndSortKeys.Merge(dst, src) +} +func (m *MapAndSortKeys) XXX_Size() int { + return xxx_messageInfo_MapAndSortKeys.Size(m) +} +func (m *MapAndSortKeys) XXX_DiscardUnknown() { + xxx_messageInfo_MapAndSortKeys.DiscardUnknown(m) +} + +var xxx_messageInfo_MapAndSortKeys proto.InternalMessageInfo + +func (m *MapAndSortKeys) GetKey() *sortkeys.Object { + if m != nil { + return m.Key + } + return nil +} + +func (m *MapAndSortKeys) GetKeyValue() map[int32]string { + if m != nil { + return m.KeyValue + } + return nil +} + +func (m *MapAndSortKeys) GetValue() *proto1.Subject { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*MapAndSortKeys)(nil), "importduplicate.MapAndSortKeys") + proto.RegisterMapType((map[int32]string)(nil), "importduplicate.MapAndSortKeys.KeyValueEntry") +} +func (this *MapAndSortKeys) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapAndSortKeys) + if !ok { + that2, ok := that.(MapAndSortKeys) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Key.Equal(that1.Key) { + return false + } + if len(this.KeyValue) != len(that1.KeyValue) { + return false + } + for i := range this.KeyValue { + if this.KeyValue[i] != that1.KeyValue[i] { + return false + } + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapAndSortKeys) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&importduplicate.MapAndSortKeys{") + if this.Key != nil { + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + } + keysForKeyValue := make([]int32, 0, len(this.KeyValue)) + for k := range this.KeyValue { + keysForKeyValue = append(keysForKeyValue, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForKeyValue) + mapStringForKeyValue := "map[int32]string{" + for _, k := range keysForKeyValue { + mapStringForKeyValue += fmt.Sprintf("%#v: %#v,", k, this.KeyValue[k]) + } + mapStringForKeyValue += "}" + if this.KeyValue != nil { + s = append(s, "KeyValue: "+mapStringForKeyValue+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringImportduplicate(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedMapAndSortKeys(r randyImportduplicate, easy bool) *MapAndSortKeys { + this := &MapAndSortKeys{} + if r.Intn(10) != 0 { + this.Key = sortkeys.NewPopulatedObject(r, easy) + } + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.KeyValue = make(map[int32]string) + for i := 0; i < v1; i++ { + this.KeyValue[int32(r.Int31())] = randStringImportduplicate(r) + } + } + if r.Intn(10) != 0 { + this.Value = proto1.NewPopulatedSubject(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedImportduplicate(r, 4) + } + return this +} + +type randyImportduplicate interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneImportduplicate(r randyImportduplicate) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringImportduplicate(r randyImportduplicate) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneImportduplicate(r) + } + return string(tmps) +} +func randUnrecognizedImportduplicate(r randyImportduplicate, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldImportduplicate(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldImportduplicate(dAtA []byte, r randyImportduplicate, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateImportduplicate(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { + proto.RegisterFile("importduplicate.proto", fileDescriptor_importduplicate_e9d46e93914bce47) +} + +var fileDescriptor_importduplicate_e9d46e93914bce47 = []byte{ + // 277 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x49, 0x29, 0x2d, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0x47, 0x13, 0x96, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, + 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, + 0x30, 0x0b, 0xa2, 0x5f, 0xca, 0x15, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x34, 0xd3, 0xf5, + 0x8b, 0xf3, 0x8b, 0x4a, 0xb2, 0x53, 0x2b, 0x8b, 0xc1, 0x8c, 0xc4, 0xa4, 0x1c, 0xa8, 0x33, 0xa4, + 0xec, 0x49, 0x33, 0x06, 0xe2, 0x0c, 0x30, 0x09, 0x31, 0x40, 0xe9, 0x11, 0x23, 0x17, 0x9f, 0x6f, + 0x62, 0x81, 0x63, 0x5e, 0x4a, 0x70, 0x7e, 0x51, 0x89, 0x77, 0x6a, 0x65, 0xb1, 0x90, 0x12, 0x17, + 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x80, 0x1e, 0xcc, 0x6a, 0x3d, + 0xff, 0xa4, 0xac, 0xd4, 0xe4, 0x92, 0x20, 0x90, 0xa4, 0x90, 0x27, 0x17, 0x47, 0x76, 0x6a, 0x65, + 0x58, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xae, 0x1e, 0x7a, 0x40, + 0xa1, 0x1a, 0xab, 0xe7, 0x0d, 0x55, 0xef, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd7, 0x2e, 0xa4, + 0xc2, 0xc5, 0x5a, 0x06, 0x36, 0x87, 0x19, 0x6c, 0x21, 0x1f, 0xc4, 0x61, 0x7a, 0xc1, 0xa5, 0x10, + 0xeb, 0x20, 0x92, 0x52, 0xd6, 0x5c, 0xbc, 0x28, 0x06, 0x08, 0x09, 0x20, 0x5c, 0xc9, 0x0a, 0x71, + 0x93, 0x08, 0xcc, 0x20, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0xa8, 0x46, 0x2b, 0x26, 0x0b, 0x46, 0x27, + 0x81, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0xc7, 0x23, + 0x39, 0xc6, 0x24, 0x36, 0xb0, 0x25, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0xcc, 0xec, + 0x38, 0xde, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto new file mode 100644 index 000000000..024cc6ecb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto @@ -0,0 +1,45 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package importduplicate; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto"; +import "github.com/gogo/protobuf/test/importduplicate/proto/proto.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; + +message MapAndSortKeys { + sortkeys.Object key = 1; + map keyValue = 2; + proto.Subject value = 3; +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go new file mode 100644 index 000000000..be385489c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go @@ -0,0 +1,34 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package importduplicate + +import testing "testing" + +func TestImportDuplicate(t *testing.T) { +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go new file mode 100644 index 000000000..1a6288d98 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: importduplicate.proto + +package importduplicate + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/importduplicate/proto" +import _ "github.com/gogo/protobuf/test/importduplicate/sortkeys" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapAndSortKeysProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapAndSortKeys{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapAndSortKeysJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapAndSortKeys{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapAndSortKeysProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapAndSortKeys{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapAndSortKeysProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapAndSortKeys{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapAndSortKeysGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapAndSortKeys(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go b/deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go new file mode 100644 index 000000000..f9691630f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto/proto.proto + +package proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subject struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subject) Reset() { *m = Subject{} } +func (m *Subject) String() string { return proto.CompactTextString(m) } +func (*Subject) ProtoMessage() {} +func (*Subject) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_2eb405ba8c57e5a9, []int{0} +} +func (m *Subject) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subject.Unmarshal(m, b) +} +func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subject.Marshal(b, m, deterministic) +} +func (dst *Subject) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subject.Merge(dst, src) +} +func (m *Subject) XXX_Size() int { + return xxx_messageInfo_Subject.Size(m) +} +func (m *Subject) XXX_DiscardUnknown() { + xxx_messageInfo_Subject.DiscardUnknown(m) +} + +var xxx_messageInfo_Subject proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Subject)(nil), "proto.Subject") +} +func (this *Subject) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subject) + if !ok { + that2, ok := that.(Subject) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Subject) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&proto.Subject{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringProto(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedSubject(r randyProto, easy bool) *Subject { + this := &Subject{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProto(r, 1) + } + return this +} + +type randyProto interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProto(r randyProto) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringProto(r randyProto) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneProto(r) + } + return string(tmps) +} +func randUnrecognizedProto(r randyProto, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldProto(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldProto(dAtA []byte, r randyProto, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateProto(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateProto(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateProto(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("proto/proto.proto", fileDescriptor_proto_2eb405ba8c57e5a9) } + +var fileDescriptor_proto_2eb405ba8c57e5a9 = []byte{ + // 103 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x07, 0x93, 0x7a, 0x60, 0x52, 0x88, 0x15, 0x4c, 0x49, 0xe9, 0xa6, 0x67, 0x96, 0x64, + 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0x43, 0xd5, 0x24, 0x95, 0xa6, 0x81, + 0x79, 0x10, 0x6d, 0x20, 0x16, 0x44, 0x97, 0x12, 0x27, 0x17, 0x7b, 0x70, 0x69, 0x52, 0x56, 0x6a, + 0x72, 0x89, 0x93, 0xc0, 0x87, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, + 0xb8, 0xe3, 0x91, 0x1c, 0x63, 0x12, 0x1b, 0x58, 0x8d, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf0, + 0xc4, 0xe7, 0x73, 0x6e, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.proto b/deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.proto new file mode 100644 index 000000000..122e21a45 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/proto/proto.proto @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package proto; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; + +message Subject { + +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go b/deps/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go new file mode 100644 index 000000000..06af6f367 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto/proto.proto + +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subject{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subject{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subject{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subject{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubjectGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubject(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go b/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go new file mode 100644 index 000000000..cb6b8d31b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sortkeys/sortable.proto + +package sortkeys + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Object struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_sortable_d1adc3e2593f24f3, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Object.Unmarshal(m, b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return xxx_messageInfo_Object.Size(m) +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Object)(nil), "sortkeys.Object") +} +func (this *Object) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Object) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&sortkeys.Object{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringSortable(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedObject(r randySortable, easy bool) *Object { + this := &Object{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSortable(r, 1) + } + return this +} + +type randySortable interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSortable(r randySortable) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringSortable(r randySortable) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneSortable(r) + } + return string(tmps) +} +func randUnrecognizedSortable(r randySortable, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldSortable(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldSortable(dAtA []byte, r randySortable, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateSortable(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateSortable(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateSortable(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("sortkeys/sortable.proto", fileDescriptor_sortable_d1adc3e2593f24f3) } + +var fileDescriptor_sortable_d1adc3e2593f24f3 = []byte{ + // 115 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xce, 0x2f, 0x2a, + 0xc9, 0x4e, 0xad, 0x2c, 0xd6, 0x07, 0x31, 0x12, 0x93, 0x72, 0x52, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, + 0xf2, 0x85, 0x38, 0x60, 0x12, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, + 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0x05, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, + 0x66, 0x41, 0x34, 0x2a, 0x71, 0x70, 0xb1, 0xf9, 0x27, 0x65, 0xa5, 0x26, 0x97, 0x38, 0x09, 0x7c, + 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, + 0x26, 0xb1, 0x81, 0x95, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x1b, 0xba, 0xd6, 0x76, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto b/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto new file mode 100644 index 000000000..5052b2c3b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package sortkeys; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; + +message Object { + +} diff --git a/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go b/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go new file mode 100644 index 000000000..b2e15d99e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sortkeys/sortable.proto + +package sortkeys + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestObjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestObjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestObjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/indeximport-issue72/Makefile b/deps/github.com/gogo/protobuf/test/indeximport-issue72/Makefile new file mode 100644 index 000000000..0a2f73ac4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/indeximport-issue72/Makefile @@ -0,0 +1,31 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (cd index && protoc --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. index.proto) + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. indeximport.proto) diff --git a/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go b/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go new file mode 100644 index 000000000..c1a6721b1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go @@ -0,0 +1,515 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: index.proto + +package index + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type IndexQuery struct { + Key *string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexQuery) Reset() { *m = IndexQuery{} } +func (m *IndexQuery) String() string { return proto.CompactTextString(m) } +func (*IndexQuery) ProtoMessage() {} +func (*IndexQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_index_5bc64712555c00b6, []int{0} +} +func (m *IndexQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IndexQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IndexQuery.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *IndexQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexQuery.Merge(dst, src) +} +func (m *IndexQuery) XXX_Size() int { + return m.Size() +} +func (m *IndexQuery) XXX_DiscardUnknown() { + xxx_messageInfo_IndexQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexQuery proto.InternalMessageInfo + +func (m *IndexQuery) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *IndexQuery) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +func init() { + proto.RegisterType((*IndexQuery)(nil), "index.IndexQuery") +} +func (this *IndexQuery) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IndexQuery) + if !ok { + that2, ok := that.(IndexQuery) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return false + } + } else if this.Key != nil { + return false + } else if that1.Key != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *IndexQuery) 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 *IndexQuery) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Key != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintIndex(dAtA, i, uint64(len(*m.Key))) + i += copy(dAtA[i:], *m.Key) + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintIndex(dAtA, i, uint64(len(*m.Value))) + i += copy(dAtA[i:], *m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIndex(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 NewPopulatedIndexQuery(r randyIndex, easy bool) *IndexQuery { + this := &IndexQuery{} + if r.Intn(10) != 0 { + v1 := string(randStringIndex(r)) + this.Key = &v1 + } + if r.Intn(10) != 0 { + v2 := string(randStringIndex(r)) + this.Value = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIndex(r, 3) + } + return this +} + +type randyIndex interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIndex(r randyIndex) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIndex(r randyIndex) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneIndex(r) + } + return string(tmps) +} +func randUnrecognizedIndex(r randyIndex, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIndex(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIndex(dAtA []byte, r randyIndex, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateIndex(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIndex(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIndex(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *IndexQuery) Size() (n int) { + var l int + _ = l + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovIndex(uint64(l)) + } + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovIndex(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIndex(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIndex(x uint64) (n int) { + return sovIndex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IndexQuery) 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 ErrIntOverflowIndex + } + 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: IndexQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IndexQuery: 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 ErrIntOverflowIndex + } + 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 ErrInvalidLengthIndex + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Key = &s + iNdEx = postIndex + 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 ErrIntOverflowIndex + } + 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 ErrInvalidLengthIndex + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIndex(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIndex + } + 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 skipIndex(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, ErrIntOverflowIndex + } + 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, ErrIntOverflowIndex + } + 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, ErrIntOverflowIndex + } + 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, ErrInvalidLengthIndex + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndex + } + 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 := skipIndex(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 ( + ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("index.proto", fileDescriptor_index_5bc64712555c00b6) } + +var fileDescriptor_index_5bc64712555c00b6 = []byte{ + // 141 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcc, 0x4b, 0x49, + 0xad, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0x99, 0x70, 0x71, 0x79, 0x82, 0xf4, + 0x05, 0x96, 0xa6, 0x16, 0x55, 0x0a, 0x09, 0x70, 0x31, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, + 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, 0xac, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, + 0x60, 0x31, 0x08, 0xc7, 0x49, 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, + 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x3d, 0x8f, 0x44, 0x93, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto b/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto new file mode 100644 index 000000000..3f79b4aa6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto @@ -0,0 +1,45 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package index; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message IndexQuery { + optional string Key = 1; + optional string Value = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go b/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go new file mode 100644 index 000000000..38b732617 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: index.proto + +package index + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestIndexQueryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestIndexQueryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIndexQueryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQuerySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go b/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go new file mode 100644 index 000000000..70d09fe63 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go @@ -0,0 +1,468 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: indeximport.proto + +package indeximport + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import index "github.com/gogo/protobuf/test/indeximport-issue72/index" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type IndexQueries struct { + Queries []*index.IndexQuery `protobuf:"bytes,1,rep,name=Queries" json:"Queries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexQueries) Reset() { *m = IndexQueries{} } +func (m *IndexQueries) String() string { return proto.CompactTextString(m) } +func (*IndexQueries) ProtoMessage() {} +func (*IndexQueries) Descriptor() ([]byte, []int) { + return fileDescriptor_indeximport_e35abb03a00df740, []int{0} +} +func (m *IndexQueries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IndexQueries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IndexQueries.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *IndexQueries) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexQueries.Merge(dst, src) +} +func (m *IndexQueries) XXX_Size() int { + return m.Size() +} +func (m *IndexQueries) XXX_DiscardUnknown() { + xxx_messageInfo_IndexQueries.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexQueries proto.InternalMessageInfo + +func (m *IndexQueries) GetQueries() []*index.IndexQuery { + if m != nil { + return m.Queries + } + return nil +} + +func init() { + proto.RegisterType((*IndexQueries)(nil), "indeximport.IndexQueries") +} +func (this *IndexQueries) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IndexQueries) + if !ok { + that2, ok := that.(IndexQueries) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Queries) != len(that1.Queries) { + return false + } + for i := range this.Queries { + if !this.Queries[i].Equal(that1.Queries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *IndexQueries) 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 *IndexQueries) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Queries) > 0 { + for _, msg := range m.Queries { + dAtA[i] = 0xa + i++ + i = encodeVarintIndeximport(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 encodeVarintIndeximport(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 NewPopulatedIndexQueries(r randyIndeximport, easy bool) *IndexQueries { + this := &IndexQueries{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Queries = make([]*index.IndexQuery, v1) + for i := 0; i < v1; i++ { + this.Queries[i] = index.NewPopulatedIndexQuery(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIndeximport(r, 2) + } + return this +} + +type randyIndeximport interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIndeximport(r randyIndeximport) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIndeximport(r randyIndeximport) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneIndeximport(r) + } + return string(tmps) +} +func randUnrecognizedIndeximport(r randyIndeximport, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIndeximport(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIndeximport(dAtA []byte, r randyIndeximport, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIndeximport(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *IndexQueries) Size() (n int) { + var l int + _ = l + if len(m.Queries) > 0 { + for _, e := range m.Queries { + l = e.Size() + n += 1 + l + sovIndeximport(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIndeximport(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIndeximport(x uint64) (n int) { + return sovIndeximport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IndexQueries) 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 ErrIntOverflowIndeximport + } + 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: IndexQueries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IndexQueries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndeximport + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIndeximport + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queries = append(m.Queries, &index.IndexQuery{}) + if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIndeximport(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIndeximport + } + 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 skipIndeximport(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, ErrIntOverflowIndeximport + } + 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, ErrIntOverflowIndeximport + } + 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, ErrIntOverflowIndeximport + } + 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, ErrInvalidLengthIndeximport + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndeximport + } + 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 := skipIndeximport(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 ( + ErrInvalidLengthIndeximport = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndeximport = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("indeximport.proto", fileDescriptor_indeximport_e35abb03a00df740) } + +var fileDescriptor_indeximport_e35abb03a00df740 = []byte{ + // 168 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcc, 0x4b, 0x49, + 0xad, 0xc8, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, + 0x12, 0x92, 0x72, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0xd3, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x47, 0x52, + 0xaa, 0x9b, 0x59, 0x5c, 0x5c, 0x9a, 0x6a, 0x6e, 0x04, 0x11, 0x83, 0x90, 0x10, 0x13, 0xa5, 0x74, + 0x71, 0x1a, 0x02, 0xe2, 0x81, 0x39, 0x60, 0x16, 0x44, 0xb9, 0x92, 0x35, 0x17, 0x8f, 0x27, 0x48, + 0x77, 0x60, 0x69, 0x6a, 0x51, 0x66, 0x6a, 0xb1, 0x90, 0x36, 0x17, 0x3b, 0x94, 0x29, 0xc1, 0xa8, + 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa8, 0x07, 0x31, 0x1d, 0xae, 0xaa, 0x32, 0x08, 0xa6, 0xc2, 0x49, + 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, + 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xd4, 0x50, 0x15, 0x6f, 0xeb, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto b/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto new file mode 100644 index 000000000..6358b0bf9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto @@ -0,0 +1,46 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package indeximport; + +import "github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message IndexQueries { + repeated index.IndexQuery Queries = 1; +} + diff --git a/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go b/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go new file mode 100644 index 000000000..e427cd73f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: indeximport.proto + +package indeximport + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/indeximport-issue72/index" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestIndexQueriesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestIndexQueriesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIndexQueriesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/int64support/Makefile b/deps/github.com/gogo/protobuf/test/int64support/Makefile new file mode 100644 index 000000000..356ac1214 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/int64support/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc -I=. -I=../../../../../ -I=../../protobuf/ --gogo_out=. object.proto) diff --git a/deps/github.com/gogo/protobuf/test/int64support/object.pb.go b/deps/github.com/gogo/protobuf/test/int64support/object.pb.go new file mode 100644 index 000000000..a38aab6fd --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/int64support/object.pb.go @@ -0,0 +1,510 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: object.proto + +package int64support + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Object struct { + OptionalNumber *int64 `protobuf:"varint,1,opt,name=optional_number,json=optionalNumber" json:"optional_number,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { + return fileDescriptor_object_9a4b0c2b004c02f9, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return m.Size() +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func (m *Object) GetOptionalNumber() int64 { + if m != nil && m.OptionalNumber != nil { + return *m.OptionalNumber + } + return 0 +} + +func init() { + proto.RegisterType((*Object)(nil), "int64support.Object") +} +func (this *Object) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Object") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Object but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Object but is not nil && this == nil") + } + if this.OptionalNumber != nil && that1.OptionalNumber != nil { + if *this.OptionalNumber != *that1.OptionalNumber { + return fmt.Errorf("OptionalNumber this(%v) Not Equal that(%v)", *this.OptionalNumber, *that1.OptionalNumber) + } + } else if this.OptionalNumber != nil { + return fmt.Errorf("this.OptionalNumber == nil && that.OptionalNumber != nil") + } else if that1.OptionalNumber != nil { + return fmt.Errorf("OptionalNumber this(%v) Not Equal that(%v)", this.OptionalNumber, that1.OptionalNumber) + } + return nil +} +func (this *Object) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.OptionalNumber != nil && that1.OptionalNumber != nil { + if *this.OptionalNumber != *that1.OptionalNumber { + return false + } + } else if this.OptionalNumber != nil { + return false + } else if that1.OptionalNumber != nil { + return false + } + return true +} +func (this *Object) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&int64support.Object{") + if this.OptionalNumber != nil { + s = append(s, "OptionalNumber: "+valueToGoStringObject(this.OptionalNumber, "int64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringObject(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *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 m.OptionalNumber != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintObject(dAtA, i, uint64(*m.OptionalNumber)) + } + return i, nil +} + +func encodeVarintObject(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 NewPopulatedObject(r randyObject, easy bool) *Object { + this := &Object{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.OptionalNumber = &v1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyObject interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneObject(r randyObject) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringObject(r randyObject) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneObject(r) + } + return string(tmps) +} +func randUnrecognizedObject(r randyObject, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldObject(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldObject(dAtA []byte, r randyObject, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateObject(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateObject(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateObject(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Object) Size() (n int) { + var l int + _ = l + if m.OptionalNumber != nil { + n += 1 + sovObject(uint64(*m.OptionalNumber)) + } + return n +} + +func sovObject(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozObject(x uint64) (n int) { + return sovObject(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Object) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Object{`, + `OptionalNumber:` + valueToStringObject(this.OptionalNumber) + `,`, + `}`, + }, "") + return s +} +func valueToStringObject(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +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 ErrIntOverflowObject + } + 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalNumber", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObject + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OptionalNumber = &v + default: + iNdEx = preIndex + skippy, err := skipObject(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthObject + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipObject(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, ErrIntOverflowObject + } + 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, ErrIntOverflowObject + } + 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, ErrIntOverflowObject + } + 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, ErrInvalidLengthObject + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowObject + } + 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 := skipObject(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 ( + ErrInvalidLengthObject = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowObject = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("object.proto", fileDescriptor_object_9a4b0c2b004c02f9) } + +var fileDescriptor_object_9a4b0c2b004c02f9 = []byte{ + // 190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x4f, 0xca, 0x4a, + 0x4d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc9, 0xcc, 0x2b, 0x31, 0x33, 0x29, + 0x2e, 0x2d, 0x28, 0xc8, 0x2f, 0x2a, 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, + 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, + 0x1c, 0x30, 0x0b, 0xa2, 0x59, 0xc9, 0x90, 0x8b, 0xcd, 0x1f, 0x6c, 0x98, 0x90, 0x3a, 0x17, 0x7f, + 0x7e, 0x41, 0x49, 0x66, 0x7e, 0x5e, 0x62, 0x4e, 0x7c, 0x5e, 0x69, 0x6e, 0x52, 0x6a, 0x91, 0x04, + 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x1f, 0x4c, 0xd8, 0x0f, 0x2c, 0xea, 0xe4, 0x75, 0xe1, 0xa1, + 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0f, 0x1e, 0xca, 0x31, 0x7e, 0x78, 0x28, 0xc7, 0xf8, 0xe3, + 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, + 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, + 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0xa2, 0x50, 0x5c, + 0x0b, 0x08, 0x00, 0x00, 0xff, 0xff, 0x73, 0x60, 0x3c, 0xd6, 0xca, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/int64support/object.proto b/deps/github.com/gogo/protobuf/test/int64support/object.proto new file mode 100644 index 000000000..68e256a0c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/int64support/object.proto @@ -0,0 +1,24 @@ +package int64support; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "int64support"; +option (gogoproto.benchgen_all) = true; +option (gogoproto.enum_stringer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.gostring_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.verbose_equal_all) = true; + +message Object { + optional int64 optional_number = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/int64support/object_js.go b/deps/github.com/gogo/protobuf/test/int64support/object_js.go new file mode 100644 index 000000000..3fb7ea9d8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/int64support/object_js.go @@ -0,0 +1,63 @@ +package int64support + +import ( + "bytes" + "encoding/json" + "fmt" + "strconv" +) + +var ( + _ = json.Marshaler(new(Object)) + _ = json.Unmarshaler(new(Object)) +) + +func (o *Object) MarshalJSON() ([]byte, error) { + if o.OptionalNumber == nil { + return ([]byte)("{}"), nil + } + return ([]byte)(fmt.Sprintf("{\"optional_number\": %d}", *o.OptionalNumber)), nil +} + +func (o *Object) UnmarshalJSON(b []byte) error { + var ( + trim = func(v []byte) []byte { return bytes.Trim(v, " \n\r\t") } + strip = func(v []byte, first, last byte) ([]byte, error) { + x := len(v) + if x < 2 || v[0] != first || v[x-1] != last { + return nil, fmt.Errorf("failed to strip %q and %q from byte sequence", first, last) + } + return v[1 : x-1], nil + } + ) + b, err := strip(trim(b), '{', '}') + if err != nil { + return err + } + // poor man parser: assume the only commas appear between JSON key-value pairs, + // and that object hierarchy is flat + for xf, f := range bytes.Split(b, ([]byte)(",")) { + parts := bytes.SplitN(f, ([]byte)(":"), 2) + if x := len(parts); x != 2 { + if xf == 0 && (x == 0 || (x == 1 && len(trim(parts[0])) == 0)) { + return nil // empty object + } + return fmt.Errorf("failed to parse field-value seperator char ':'") + } + fieldName, err := strip(trim(parts[0]), '"', '"') + if err != nil { + return err + } + if string(fieldName) != "optional_number" { + continue // ignore unknown field + } + fieldValue := trim(parts[1]) + v, err := strconv.ParseInt(string(fieldValue), 10, 64) + if err != nil { + return err + } + o.OptionalNumber = &v + break + } + return nil +} diff --git a/deps/github.com/gogo/protobuf/test/int64support/object_js_test.go b/deps/github.com/gogo/protobuf/test/int64support/object_js_test.go new file mode 100644 index 000000000..e920d8e85 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/int64support/object_js_test.go @@ -0,0 +1,47 @@ +package int64support + +import ( + "encoding/json" + "testing" +) + +func TestMarshaler(t *testing.T) { + n := int64(1) + b, err := json.Marshal(&Object{OptionalNumber: &n}) + if err != nil { + t.Fatal(err) + } + const expected = "{\"optional_number\":1}" + if string(b) != expected { + t.Fatalf("expected '%s' instead of '%s'", expected, string(b)) + } + + b, err = json.Marshal(new(Object)) + if err != nil { + t.Fatal(err) + } + const expected2 = "{}" + if string(b) != expected2 { + t.Fatalf("expected '%s' instead of '%s'", expected2, string(b)) + } +} + +func TestUnmarshaler(t *testing.T) { + o := new(Object) + err := json.Unmarshal(([]byte)("{\"optional_number\": 1}"), o) + if err != nil { + t.Fatal(err) + } + if n := o.GetOptionalNumber(); n != 1 { + t.Fatalf("expected 1 instead of %d", n) + } + + o = new(Object) + err = json.Unmarshal(([]byte)("{}"), o) + if err != nil { + t.Fatal(err) + } + if o.OptionalNumber != nil { + t.Fatalf("expected nil OptionalNumber instead of %d", *o.OptionalNumber) + } +} diff --git a/deps/github.com/gogo/protobuf/test/int64support/objectpb_test.go b/deps/github.com/gogo/protobuf/test/int64support/objectpb_test.go new file mode 100644 index 000000000..e511e024b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/int64support/objectpb_test.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: object.proto + +package int64support + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestObjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestObjectMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkObjectProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkObjectProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedObject(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Object{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestObjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestObjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestObjectGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestObjectSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkObjectSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestObjectStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/issue260/Makefile b/deps/github.com/gogo/protobuf/test/issue260/Makefile new file mode 100644 index 000000000..a0f5e5294 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue260/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. --proto_path=../../../../../:../../protobuf/:. issue260.proto diff --git a/deps/github.com/gogo/protobuf/test/issue260/README.md b/deps/github.com/gogo/protobuf/test/issue260/README.md new file mode 100644 index 000000000..d25084786 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue260/README.md @@ -0,0 +1,11 @@ +# The Bug + +If in a message the following options are set: + +* `typedecl` `false` +* `go_getters` `false` +* `marshaller` `true` + +And one of the fields is using the `stdtime` and `nullable` `false` extension (to +use `time.Time` instead of the protobuf type), then an import to the _time_ package +is added even if it is not needed. diff --git a/deps/github.com/gogo/protobuf/test/issue260/issue260.pb.go b/deps/github.com/gogo/protobuf/test/issue260/issue260.pb.go new file mode 100644 index 000000000..4022db96d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue260/issue260.pb.go @@ -0,0 +1,1067 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue260.proto + +package issue260 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" + +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *Dropped) Reset() { *m = Dropped{} } +func (m *Dropped) String() string { return proto.CompactTextString(m) } +func (*Dropped) ProtoMessage() {} +func (*Dropped) Descriptor() ([]byte, []int) { + return fileDescriptor_issue260_6a5b9ffe9baf64cb, []int{0} +} +func (m *Dropped) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dropped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dropped.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Dropped) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dropped.Merge(dst, src) +} +func (m *Dropped) XXX_Size() int { + return m.Size() +} +func (m *Dropped) XXX_DiscardUnknown() { + xxx_messageInfo_Dropped.DiscardUnknown(m) +} + +var xxx_messageInfo_Dropped proto.InternalMessageInfo + +func (m *Dropped) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Dropped) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } +func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } +func (*DroppedWithoutGetters) ProtoMessage() {} +func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { + return fileDescriptor_issue260_6a5b9ffe9baf64cb, []int{1} +} +func (m *DroppedWithoutGetters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DroppedWithoutGetters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DroppedWithoutGetters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DroppedWithoutGetters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DroppedWithoutGetters.Merge(dst, src) +} +func (m *DroppedWithoutGetters) XXX_Size() int { + return m.Size() +} +func (m *DroppedWithoutGetters) XXX_DiscardUnknown() { + xxx_messageInfo_DroppedWithoutGetters.DiscardUnknown(m) +} + +var xxx_messageInfo_DroppedWithoutGetters proto.InternalMessageInfo + +type Kept struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Kept) Reset() { *m = Kept{} } +func (m *Kept) String() string { return proto.CompactTextString(m) } +func (*Kept) ProtoMessage() {} +func (*Kept) Descriptor() ([]byte, []int) { + return fileDescriptor_issue260_6a5b9ffe9baf64cb, []int{2} +} +func (m *Kept) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Kept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Kept.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Kept) XXX_Merge(src proto.Message) { + xxx_messageInfo_Kept.Merge(dst, src) +} +func (m *Kept) XXX_Size() int { + return m.Size() +} +func (m *Kept) XXX_DiscardUnknown() { + xxx_messageInfo_Kept.DiscardUnknown(m) +} + +var xxx_messageInfo_Kept proto.InternalMessageInfo + +func (m *Kept) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Kept) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func init() { + proto.RegisterType((*Dropped)(nil), "issue260.Dropped") + proto.RegisterType((*DroppedWithoutGetters)(nil), "issue260.DroppedWithoutGetters") + proto.RegisterType((*Kept)(nil), "issue260.Kept") +} +func (this *Dropped) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Dropped") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Dropped but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Dropped but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Dropped) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DroppedWithoutGetters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") + } + if this.Height != that1.Height { + return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) + } + if this.Width != that1.Width { + return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *DroppedWithoutGetters) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Height != that1.Height { + return false + } + if this.Width != that1.Width { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *Kept) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Kept") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Kept but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Kept but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Kept) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (m *Dropped) 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 *Dropped) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func (m *DroppedWithoutGetters) 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 *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Height)) + } + if m.Width != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Width)) + } + dAtA[i] = 0x1a + i++ + i = encodeVarintIssue260(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + return i, nil +} + +func (m *Kept) 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 *Kept) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func encodeVarintIssue260(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 NewPopulatedDropped(r randyIssue260, easy bool) *Dropped { + this := &Dropped{} + this.Name = string(randStringIssue260(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDroppedWithoutGetters(r randyIssue260, easy bool) *DroppedWithoutGetters { + this := &DroppedWithoutGetters{} + this.Height = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Height *= -1 + } + this.Width = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Width *= -1 + } + v1 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v1 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKept(r randyIssue260, easy bool) *Kept { + this := &Kept{} + this.Name = string(randStringIssue260(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyIssue260 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue260(r randyIssue260) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue260(r randyIssue260) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneIssue260(r) + } + return string(tmps) +} +func randUnrecognizedIssue260(r randyIssue260, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue260(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue260(dAtA []byte, r randyIssue260, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue260(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Dropped) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovIssue260(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovIssue260(uint64(m.Age)) + } + return n +} + +func (m *DroppedWithoutGetters) Size() (n int) { + var l int + _ = l + if m.Height != 0 { + n += 1 + sovIssue260(uint64(m.Height)) + } + if m.Width != 0 { + n += 1 + sovIssue260(uint64(m.Width)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovIssue260(uint64(l)) + return n +} + +func (m *Kept) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovIssue260(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovIssue260(uint64(m.Age)) + } + return n +} + +func sovIssue260(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue260(x uint64) (n int) { + return sovIssue260(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Dropped) 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 ErrIntOverflowIssue260 + } + 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: Dropped: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowIssue260 + } + 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 ErrInvalidLengthIssue260 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue260(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue260 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DroppedWithoutGetters) 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 ErrIntOverflowIssue260 + } + 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: DroppedWithoutGetters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIssue260 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIssue260(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue260 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Kept) 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 ErrIntOverflowIssue260 + } + 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: Kept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Kept: 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 ErrIntOverflowIssue260 + } + 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 ErrInvalidLengthIssue260 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue260(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue260 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue260(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, ErrIntOverflowIssue260 + } + 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, ErrIntOverflowIssue260 + } + 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, ErrIntOverflowIssue260 + } + 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, ErrInvalidLengthIssue260 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue260 + } + 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 := skipIssue260(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 ( + ErrInvalidLengthIssue260 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue260 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue260.proto", fileDescriptor_issue260_6a5b9ffe9baf64cb) } + +var fileDescriptor_issue260_6a5b9ffe9baf64cb = []byte{ + // 307 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x32, 0x33, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4f, 0xcf, + 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x2a, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, + 0x28, 0x50, 0x32, 0xe5, 0x62, 0x77, 0x29, 0xca, 0x2f, 0x28, 0x48, 0x4d, 0x11, 0x12, 0xe2, 0x62, + 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x04, 0xb8, + 0x98, 0x13, 0xd3, 0x53, 0x25, 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x40, 0x4c, 0x2b, 0x96, 0x0f, + 0x0b, 0xe5, 0x19, 0x94, 0x26, 0x33, 0x72, 0x89, 0x42, 0xf5, 0x85, 0x67, 0x96, 0x64, 0xe4, 0x97, + 0x96, 0xb8, 0xa7, 0x96, 0x94, 0xa4, 0x16, 0x15, 0x0b, 0x89, 0x71, 0xb1, 0x65, 0xa4, 0x66, 0xa6, + 0x67, 0x94, 0x80, 0xcd, 0x61, 0x0e, 0x82, 0xf2, 0x84, 0x44, 0xb8, 0x58, 0xcb, 0x33, 0x53, 0x4a, + 0x32, 0xc0, 0x66, 0x31, 0x07, 0x41, 0x38, 0x42, 0x4e, 0x5c, 0x9c, 0x70, 0x17, 0x49, 0x30, 0x2b, + 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xe9, 0x41, 0xdc, 0xac, 0x07, 0x73, 0xb3, 0x5e, 0x08, 0x4c, 0x85, + 0x13, 0xc7, 0x89, 0x7b, 0xf2, 0x0c, 0x13, 0xee, 0xcb, 0x33, 0x06, 0x21, 0xb4, 0x59, 0x71, 0x74, + 0x2c, 0x90, 0x67, 0x00, 0xbb, 0x4a, 0x87, 0x8b, 0xc5, 0x3b, 0xb5, 0xa0, 0x84, 0x38, 0x9f, 0x38, + 0xe9, 0x3c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, + 0xc9, 0x31, 0x1e, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, + 0x1e, 0xc9, 0x31, 0xfe, 0x78, 0x24, 0xc7, 0xd0, 0xf0, 0x58, 0x8e, 0x61, 0xc2, 0x63, 0x39, 0x86, + 0x24, 0x36, 0xb0, 0x73, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x88, 0xbf, 0x62, 0x9b, + 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue260/issue260.proto b/deps/github.com/gogo/protobuf/test/issue260/issue260.proto new file mode 100644 index 000000000..0fafb69ef --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue260/issue260.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package issue260; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; + +message Dropped { + option (gogoproto.typedecl) = false; + string name = 1; + int32 age = 2; +} + +message DroppedWithoutGetters { + option (gogoproto.typedecl) = false; + option (gogoproto.goproto_getters) = false; + int64 height = 1; + int64 width = 2; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} + +message Kept { + string name = 1; + int32 age = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/issue260/issue260pb_test.go b/deps/github.com/gogo/protobuf/test/issue260/issue260pb_test.go new file mode 100644 index 000000000..3a547db72 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue260/issue260pb_test.go @@ -0,0 +1,646 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue260.proto + +package issue260 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestDroppedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDropped(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Dropped{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedWithoutGettersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DroppedWithoutGetters{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKeptMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKeptProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKeptProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKept(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Kept{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedWithoutGettersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKeptJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKeptVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedWithoutGettersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKeptSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/issue260/models.go b/deps/github.com/gogo/protobuf/test/issue260/models.go new file mode 100644 index 000000000..6ef03fc92 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue260/models.go @@ -0,0 +1,40 @@ +package issue260 + +import ( + "encoding/json" + "time" + + "github.com/gogo/protobuf/jsonpb" +) + +type Dropped struct { + Name string + Age int32 +} + +func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} + +func (d *Dropped) Drop() bool { + return true +} + +type DroppedWithoutGetters struct { + Width int64 + Height int64 + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` + NullableTimestamp *time.Time `protobuf:"bytes,4,opt,name=nullable_timestamp,json=nullableTimestamp,stdtime" json:"nullable_timestamp,omitempty"` +} + +func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} diff --git a/deps/github.com/gogo/protobuf/test/issue261/Makefile b/deps/github.com/gogo/protobuf/test/issue261/Makefile new file mode 100644 index 000000000..8e2d9a597 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue261/Makefile @@ -0,0 +1,7 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogoslick + protoc-min-version --version="3.0.0" --gogoslick_out=\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + :. \ + --proto_path=../../../../../:../../protobuf/:. issue261.proto diff --git a/deps/github.com/gogo/protobuf/test/issue261/issue261.pb.go b/deps/github.com/gogo/protobuf/test/issue261/issue261.pb.go new file mode 100644 index 000000000..fccd68750 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue261/issue261.pb.go @@ -0,0 +1,543 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue261.proto + +package issue261 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapStdTypes struct { + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_issue261_ea5bab07e532a045, []int{0} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return m.Size() +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func init() { + proto.RegisterType((*MapStdTypes)(nil), "issue261.MapStdTypes") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "issue261.MapStdTypes.NullableDurationEntry") +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + return true +} +func (this *MapStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&issue261.MapStdTypes{") + keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) + for k := range this.NullableDuration { + keysForNullableDuration = append(keysForNullableDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableDuration) + mapStringForNullableDuration := "map[int32]*time.Duration{" + for _, k := range keysForNullableDuration { + mapStringForNullableDuration += fmt.Sprintf("%#v: %#v,", k, this.NullableDuration[k]) + } + mapStringForNullableDuration += "}" + if this.NullableDuration != nil { + s = append(s, "NullableDuration: "+mapStringForNullableDuration+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringIssue261(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *MapStdTypes) 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 *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + msgSize += 1 + sovIssue261(uint64(msgSize)) + } + mapSize := 1 + sovIssue261(uint64(k)) + msgSize + i = encodeVarintIssue261(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue261(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintIssue261(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*v))) + n1, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + return i, nil +} + +func encodeVarintIssue261(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 *MapStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovIssue261(uint64(l)) + } + mapEntrySize := 1 + sovIssue261(uint64(k)) + l + n += mapEntrySize + 1 + sovIssue261(uint64(mapEntrySize)) + } + } + return n +} + +func sovIssue261(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue261(x uint64) (n int) { + return sovIssue261(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapStdTypes) String() string { + if this == nil { + return "nil" + } + keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) + for k := range this.NullableDuration { + keysForNullableDuration = append(keysForNullableDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableDuration) + mapStringForNullableDuration := "map[int32]*time.Duration{" + for _, k := range keysForNullableDuration { + mapStringForNullableDuration += fmt.Sprintf("%v: %v,", k, this.NullableDuration[k]) + } + mapStringForNullableDuration += "}" + s := strings.Join([]string{`&MapStdTypes{`, + `NullableDuration:` + mapStringForNullableDuration + `,`, + `}`, + }, "") + return s +} +func valueToStringIssue261(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MapStdTypes) 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 ErrIntOverflowIssue261 + } + 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: MapStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIssue261 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthIssue261 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthIssue261 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipIssue261(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue261 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIssue261(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue261 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue261(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, ErrIntOverflowIssue261 + } + 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, ErrIntOverflowIssue261 + } + 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, ErrIntOverflowIssue261 + } + 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, ErrInvalidLengthIssue261 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue261 + } + 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 := skipIssue261(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 ( + ErrInvalidLengthIssue261 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue261 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue261.proto", fileDescriptor_issue261_ea5bab07e532a045) } + +var fileDescriptor_issue261_ea5bab07e532a045 = []byte{ + // 266 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x32, 0x33, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4b, 0xcf, + 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x4a, 0x29, 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0xc8, + 0x2b, 0x9d, 0x61, 0xe4, 0xe2, 0xf6, 0x4d, 0x2c, 0x08, 0x2e, 0x49, 0x09, 0xa9, 0x2c, 0x48, 0x2d, + 0x16, 0x8a, 0xe5, 0x12, 0xc8, 0x2b, 0xcd, 0xc9, 0x49, 0x4c, 0xca, 0x49, 0x75, 0x81, 0xaa, 0x94, + 0x60, 0x56, 0x60, 0xd6, 0xe0, 0x36, 0xd2, 0xd6, 0x83, 0xbb, 0x09, 0x49, 0x83, 0x9e, 0x1f, 0x9a, + 0x6a, 0xd7, 0xbc, 0x92, 0xa2, 0x4a, 0x27, 0x96, 0x19, 0xf7, 0xe5, 0x19, 0x83, 0x30, 0x8c, 0x92, + 0x8a, 0xe3, 0x12, 0xc5, 0xaa, 0x41, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x52, 0x82, 0x51, 0x81, + 0x51, 0x83, 0x35, 0x08, 0xc4, 0x14, 0xd2, 0xe7, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x95, 0x60, + 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd4, 0x83, 0xf8, 0x44, 0x0f, 0xe6, 0x13, 0x3d, 0x98, 0x01, + 0x41, 0x10, 0x75, 0x56, 0x4c, 0x16, 0x8c, 0x4e, 0x3a, 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, + 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, + 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, + 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0x6c, 0x96, 0x31, 0x20, 0x00, 0x00, + 0xff, 0xff, 0xf1, 0xf2, 0x28, 0x08, 0x6e, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue261/issue261.proto b/deps/github.com/gogo/protobuf/test/issue261/issue261.proto new file mode 100644 index 000000000..6f33793f1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue261/issue261.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package issue261; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "google/protobuf/duration.proto"; + +message MapStdTypes { + map nullableDuration = 3 [(gogoproto.stdduration) = true]; +} diff --git a/deps/github.com/gogo/protobuf/test/issue262/Makefile b/deps/github.com/gogo/protobuf/test/issue262/Makefile new file mode 100644 index 000000000..555477909 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue262/Makefile @@ -0,0 +1,5 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogoslick + protoc-min-version --version="3.0.0" --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogoslick_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. timefail.proto diff --git a/deps/github.com/gogo/protobuf/test/issue262/timefail.pb.go b/deps/github.com/gogo/protobuf/test/issue262/timefail.pb.go new file mode 100644 index 000000000..69b8fe655 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue262/timefail.pb.go @@ -0,0 +1,410 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: timefail.proto + +package timefail + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" + +import strings "strings" +import reflect "reflect" + +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TimeFail struct { + TimeTest *time.Time `protobuf:"bytes,1,opt,name=time_test,json=timeTest,stdtime" json:"time_test,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TimeFail) Reset() { *m = TimeFail{} } +func (*TimeFail) ProtoMessage() {} +func (*TimeFail) Descriptor() ([]byte, []int) { + return fileDescriptor_timefail_540b49e689fc70b1, []int{0} +} +func (m *TimeFail) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimeFail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimeFail.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TimeFail) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimeFail.Merge(dst, src) +} +func (m *TimeFail) XXX_Size() int { + return m.Size() +} +func (m *TimeFail) XXX_DiscardUnknown() { + xxx_messageInfo_TimeFail.DiscardUnknown(m) +} + +var xxx_messageInfo_TimeFail proto.InternalMessageInfo + +func (m *TimeFail) GetTimeTest() *time.Time { + if m != nil { + return m.TimeTest + } + return nil +} + +func init() { + proto.RegisterType((*TimeFail)(nil), "timefail.TimeFail") +} +func (this *TimeFail) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TimeFail) + if !ok { + that2, ok := that.(TimeFail) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TimeTest == nil { + if this.TimeTest != nil { + return false + } + } else if !this.TimeTest.Equal(*that1.TimeTest) { + return false + } + return true +} +func (this *TimeFail) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&timefail.TimeFail{") + s = append(s, "TimeTest: "+fmt.Sprintf("%#v", this.TimeTest)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTimefail(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *TimeFail) 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 *TimeFail) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TimeTest != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTimefail(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.TimeTest))) + n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.TimeTest, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func encodeVarintTimefail(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 *TimeFail) Size() (n int) { + var l int + _ = l + if m.TimeTest != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.TimeTest) + n += 1 + l + sovTimefail(uint64(l)) + } + return n +} + +func sovTimefail(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTimefail(x uint64) (n int) { + return sovTimefail(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *TimeFail) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TimeFail{`, + `TimeTest:` + strings.Replace(fmt.Sprintf("%v", this.TimeTest), "Timestamp", "types.Timestamp", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringTimefail(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *TimeFail) 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 ErrIntOverflowTimefail + } + 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: TimeFail: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeFail: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeTest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimefail + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTimefail + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeTest == nil { + m.TimeTest = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.TimeTest, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTimefail(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTimefail + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTimefail(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, ErrIntOverflowTimefail + } + 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, ErrIntOverflowTimefail + } + 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, ErrIntOverflowTimefail + } + 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, ErrInvalidLengthTimefail + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimefail + } + 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 := skipTimefail(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 ( + ErrInvalidLengthTimefail = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTimefail = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("timefail.proto", fileDescriptor_timefail_540b49e689fc70b1) } + +var fileDescriptor_timefail_540b49e689fc70b1 = []byte{ + // 202 bytes of a gzipped FileDescriptorProto +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 0x36, 0xb0, 0x89, 0xc6, 0x80, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xc3, 0xd6, 0xbd, 0x67, 0xeb, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue262/timefail.proto b/deps/github.com/gogo/protobuf/test/issue262/timefail.proto new file mode 100644 index 000000000..06bce8bef --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue262/timefail.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +package timefail; + +message TimeFail { + google.protobuf.Timestamp time_test = 1 [(gogoproto.stdtime) = true]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/issue270/a/a1.proto b/deps/github.com/gogo/protobuf/test/issue270/a/a1.proto new file mode 100644 index 000000000..59dff1394 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue270/a/a1.proto @@ -0,0 +1,12 @@ +syntax = "proto2"; + +package issue270.a; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/issue270/a/a2.proto"; + +option (gogoproto.populate_all) = true; + +message A1 { + optional A2 a2 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/issue270/a/a2.proto b/deps/github.com/gogo/protobuf/test/issue270/a/a2.proto new file mode 100644 index 000000000..1d16ff79a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue270/a/a2.proto @@ -0,0 +1,12 @@ +syntax = "proto2"; + +package issue270.a; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/issue270/b/b.proto"; + +option (gogoproto.populate_all) = true; + +message A2 { + optional issue270.b.B b = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/issue270/b/b.proto b/deps/github.com/gogo/protobuf/test/issue270/b/b.proto new file mode 100644 index 000000000..cb71c2480 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue270/b/b.proto @@ -0,0 +1,6 @@ +syntax = "proto2"; + +package issue270.b; + +message B { +} diff --git a/deps/github.com/gogo/protobuf/test/issue270/doc.go b/deps/github.com/gogo/protobuf/test/issue270/doc.go new file mode 100644 index 000000000..6631cbcfd --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue270/doc.go @@ -0,0 +1 @@ +package issue270 diff --git a/deps/github.com/gogo/protobuf/test/issue270/issue270_test.go b/deps/github.com/gogo/protobuf/test/issue270/issue270_test.go new file mode 100644 index 000000000..b3faaa56e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue270/issue270_test.go @@ -0,0 +1,51 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package issue270 + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func TestPopulateWarning(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "a/a1.proto") + data, err := cmd.CombinedOutput() + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + if err != nil { + t.Error(err) + } else if strings.Contains(dataStr, "WARNING") { + t.Errorf("Unexpected WARNING: %s", dataStr) + } + if err = os.Remove("a/a1.pb.go"); err != nil && !os.IsNotExist(err) { + t.Error(err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/issue312/Makefile b/deps/github.com/gogo/protobuf/test/issue312/Makefile new file mode 100644 index 000000000..db17d4adf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue312/Makefile @@ -0,0 +1,4 @@ +regenerate: + protoc --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogo_out=. issue312.proto + (cd events && make regenerate) diff --git a/deps/github.com/gogo/protobuf/test/issue312/events/Makefile b/deps/github.com/gogo/protobuf/test/issue312/events/Makefile new file mode 100644 index 000000000..fc6be53f5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue312/events/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogo_out=. events.proto diff --git a/deps/github.com/gogo/protobuf/test/issue312/events/events.pb.go b/deps/github.com/gogo/protobuf/test/issue312/events/events.pb.go new file mode 100644 index 000000000..9f4abb12b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue312/events/events.pb.go @@ -0,0 +1,225 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: events.proto + +package events + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import issue312 "github.com/gogo/protobuf/test/issue312" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subtype struct { + State *issue312.TaskState `protobuf:"varint,4,opt,name=state,enum=issue312.TaskState" json:"state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subtype) Reset() { *m = Subtype{} } +func (m *Subtype) String() string { return proto.CompactTextString(m) } +func (*Subtype) ProtoMessage() {} +func (*Subtype) Descriptor() ([]byte, []int) { + return fileDescriptor_events_4681b5f19350f6a9, []int{0} +} +func (m *Subtype) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subtype.Unmarshal(m, b) +} +func (m *Subtype) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subtype.Marshal(b, m, deterministic) +} +func (dst *Subtype) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subtype.Merge(dst, src) +} +func (m *Subtype) XXX_Size() int { + return xxx_messageInfo_Subtype.Size(m) +} +func (m *Subtype) XXX_DiscardUnknown() { + xxx_messageInfo_Subtype.DiscardUnknown(m) +} + +var xxx_messageInfo_Subtype proto.InternalMessageInfo + +func (m *Subtype) GetState() issue312.TaskState { + if m != nil && m.State != nil { + return *m.State + } + return issue312.TaskState_TASK_STAGING +} + +func init() { + proto.RegisterType((*Subtype)(nil), "issue312.events.Subtype") +} +func (this *Subtype) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subtype) + if !ok { + that2, ok := that.(Subtype) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return false + } + } else if this.State != nil { + return false + } else if that1.State != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Subtype) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&events.Subtype{") + if this.State != nil { + s = append(s, "State: "+valueToGoStringEvents(this.State, "issue312.TaskState")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringEvents(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedSubtype(r randyEvents, easy bool) *Subtype { + this := &Subtype{} + if r.Intn(10) != 0 { + v1 := issue312.TaskState([]int32{6, 0, 1}[r.Intn(3)]) + this.State = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEvents(r, 5) + } + return this +} + +type randyEvents interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEvents(r randyEvents) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEvents(r randyEvents) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneEvents(r) + } + return string(tmps) +} +func randUnrecognizedEvents(r randyEvents, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEvents(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEvents(dAtA []byte, r randyEvents, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateEvents(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEvents(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEvents(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("events.proto", fileDescriptor_events_4681b5f19350f6a9) } + +var fileDescriptor_events_4681b5f19350f6a9 = []byte{ + // 162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2d, 0x4b, 0xcd, + 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcf, 0x2c, 0x2e, 0x2e, 0x4d, 0x35, + 0x36, 0x34, 0xd2, 0x83, 0x08, 0x4b, 0x99, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, + 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0x97, 0xa4, 0x16, + 0x97, 0xe8, 0xc3, 0x94, 0xc3, 0x19, 0x10, 0x73, 0xa4, 0x74, 0x71, 0x6a, 0x03, 0xf1, 0xc0, 0x1c, + 0x30, 0x0b, 0xa2, 0x5c, 0xc9, 0x84, 0x8b, 0x3d, 0xb8, 0x34, 0xa9, 0xa4, 0xb2, 0x20, 0x55, 0x48, + 0x93, 0x8b, 0xb5, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x82, 0x45, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x58, + 0x0f, 0x6e, 0x72, 0x48, 0x62, 0x71, 0x76, 0x30, 0x48, 0x2a, 0x08, 0xa2, 0xc2, 0x49, 0xe2, 0xc3, + 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0x31, + 0x8a, 0x0d, 0xe2, 0x6a, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0x76, 0xdc, 0x82, 0xd5, 0x00, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue312/events/events.proto b/deps/github.com/gogo/protobuf/test/issue312/events/events.proto new file mode 100644 index 000000000..23bd12999 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue312/events/events.proto @@ -0,0 +1,17 @@ +syntax = "proto2"; + +package issue312.events; + +import "github.com/gogo/protobuf/test/issue312/issue312.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "events"; +option (gogoproto.gostring_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message Subtype { + optional issue312.TaskState state = 4; +} + diff --git a/deps/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go b/deps/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go new file mode 100644 index 000000000..e12b93005 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go @@ -0,0 +1,114 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: events.proto + +package events + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/issue312" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubtypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subtype{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubtypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subtype{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubtypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subtype{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubtypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subtype{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubtypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubtype(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/issue312/issue312.pb.go b/deps/github.com/gogo/protobuf/test/issue312/issue312.pb.go new file mode 100644 index 000000000..98b0142c4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue312/issue312.pb.go @@ -0,0 +1,79 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue312.proto + +package issue312 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TaskState int32 + +const ( + TaskState_TASK_STAGING TaskState = 6 + TaskState_TASK_STARTING TaskState = 0 + TaskState_TASK_RUNNING TaskState = 1 +) + +var TaskState_name = map[int32]string{ + 6: "TASK_STAGING", + 0: "TASK_STARTING", + 1: "TASK_RUNNING", +} +var TaskState_value = map[string]int32{ + "TASK_STAGING": 6, + "TASK_STARTING": 0, + "TASK_RUNNING": 1, +} + +func (x TaskState) Enum() *TaskState { + p := new(TaskState) + *p = x + return p +} +func (x TaskState) String() string { + return proto.EnumName(TaskState_name, int32(x)) +} +func (x *TaskState) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TaskState_value, data, "TaskState") + if err != nil { + return err + } + *x = TaskState(value) + return nil +} +func (TaskState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_issue312_ffe23d3d41bbbf36, []int{0} +} + +func init() { + proto.RegisterEnum("issue312.TaskState", TaskState_name, TaskState_value) +} + +func init() { proto.RegisterFile("issue312.proto", fileDescriptor_issue312_ffe23d3d41bbbf36) } + +var fileDescriptor_issue312_ffe23d3d41bbbf36 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x36, 0x34, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0xd4, 0x72, 0xe2, 0xe2, + 0x0c, 0x49, 0x2c, 0xce, 0x0e, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x12, 0xe0, 0xe2, 0x09, 0x71, 0x0c, + 0xf6, 0x8e, 0x0f, 0x0e, 0x71, 0x74, 0xf7, 0xf4, 0x73, 0x17, 0x60, 0x13, 0x12, 0xe4, 0xe2, 0x85, + 0x89, 0x04, 0x85, 0x80, 0x84, 0x18, 0xe0, 0x8a, 0x82, 0x42, 0xfd, 0xfc, 0x40, 0x22, 0x8c, 0x4e, + 0x52, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, + 0x72, 0x8c, 0x51, 0x70, 0xe7, 0x00, 0x02, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xdd, 0xde, 0x2a, 0xa9, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue312/issue312.proto b/deps/github.com/gogo/protobuf/test/issue312/issue312.proto new file mode 100644 index 000000000..d409d7dfe --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue312/issue312.proto @@ -0,0 +1,17 @@ +syntax = "proto2"; + +package issue312; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "issue312"; +option (gogoproto.gostring_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +enum TaskState { + TASK_STAGING = 6; + TASK_STARTING = 0; + TASK_RUNNING = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/issue322/Makefile b/deps/github.com/gogo/protobuf/test/issue322/Makefile new file mode 100644 index 000000000..c7748e443 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue322/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogofast + protoc-min-version --version="3.0.0" --gogofast_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/deps/github.com/gogo/protobuf/test/issue322/issue322.pb.go b/deps/github.com/gogo/protobuf/test/issue322/issue322.pb.go new file mode 100644 index 000000000..5057b868f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue322/issue322.pb.go @@ -0,0 +1,601 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue322.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type OneofTest struct { + // Types that are valid to be assigned to Union: + // *OneofTest_I + Union isOneofTest_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofTest) Reset() { *m = OneofTest{} } +func (m *OneofTest) String() string { return proto.CompactTextString(m) } +func (*OneofTest) ProtoMessage() {} +func (*OneofTest) Descriptor() ([]byte, []int) { + return fileDescriptor_issue322_3e2db2f0d45a9027, []int{0} +} +func (m *OneofTest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofTest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofTest.Merge(dst, src) +} +func (m *OneofTest) XXX_Size() int { + return m.Size() +} +func (m *OneofTest) XXX_DiscardUnknown() { + xxx_messageInfo_OneofTest.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofTest proto.InternalMessageInfo + +const Default_OneofTest_I int32 = 4 + +type isOneofTest_Union interface { + isOneofTest_Union() + Equal(interface{}) bool + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofTest_I struct { + I int32 `protobuf:"varint,1,opt,name=i,oneof,def=4"` +} + +func (*OneofTest_I) isOneofTest_Union() {} + +func (m *OneofTest) GetUnion() isOneofTest_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *OneofTest) GetI() int32 { + if x, ok := m.GetUnion().(*OneofTest_I); ok { + return x.I + } + return Default_OneofTest_I +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofTest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofTest_OneofMarshaler, _OneofTest_OneofUnmarshaler, _OneofTest_OneofSizer, []interface{}{ + (*OneofTest_I)(nil), + } +} + +func _OneofTest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofTest) + // union + switch x := m.Union.(type) { + case *OneofTest_I: + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.I)) + case nil: + default: + return fmt.Errorf("OneofTest.Union has unexpected type %T", x) + } + return nil +} + +func _OneofTest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofTest) + switch tag { + case 1: // union.i + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &OneofTest_I{int32(x)} + return true, err + default: + return false, nil + } +} + +func _OneofTest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofTest) + // union + switch x := m.Union.(type) { + case *OneofTest_I: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.I)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*OneofTest)(nil), "test.OneofTest") +} +func (this *OneofTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofTest) + if !ok { + that2, ok := that.(OneofTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Union == nil { + if this.Union != nil { + return false + } + } else if this.Union == nil { + return false + } else if !this.Union.Equal(that1.Union) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofTest_I) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofTest_I) + if !ok { + that2, ok := that.(OneofTest_I) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.I != that1.I { + return false + } + return true +} +func (this *OneofTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.OneofTest{") + if this.Union != nil { + s = append(s, "Union: "+fmt.Sprintf("%#v", this.Union)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofTest_I) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&test.OneofTest_I{` + + `I:` + fmt.Sprintf("%#v", this.I) + `}`}, ", ") + return s +} +func valueToGoStringIssue322(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *OneofTest) 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 *OneofTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Union != nil { + nn1, err := m.Union.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofTest_I) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue322(dAtA, i, uint64(m.I)) + return i, nil +} +func encodeVarintIssue322(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 NewPopulatedOneofTest(r randyIssue322, easy bool) *OneofTest { + this := &OneofTest{} + oneofNumber_Union := []int32{1}[r.Intn(1)] + switch oneofNumber_Union { + case 1: + this.Union = NewPopulatedOneofTest_I(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue322(r, 2) + } + return this +} + +func NewPopulatedOneofTest_I(r randyIssue322, easy bool) *OneofTest_I { + this := &OneofTest_I{} + this.I = int32(r.Int31()) + if r.Intn(2) == 0 { + this.I *= -1 + } + return this +} + +type randyIssue322 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue322(r randyIssue322) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue322(r randyIssue322) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneIssue322(r) + } + return string(tmps) +} +func randUnrecognizedIssue322(r randyIssue322, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue322(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue322(dAtA []byte, r randyIssue322, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue322(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *OneofTest) Size() (n int) { + var l int + _ = l + if m.Union != nil { + n += m.Union.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofTest_I) Size() (n int) { + var l int + _ = l + n += 1 + sovIssue322(uint64(m.I)) + return n +} + +func sovIssue322(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue322(x uint64) (n int) { + return sovIssue322(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *OneofTest) 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 ErrIntOverflowIssue322 + } + 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: OneofTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue322 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Union = &OneofTest_I{v} + default: + iNdEx = preIndex + skippy, err := skipIssue322(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue322 + } + 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 skipIssue322(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, ErrIntOverflowIssue322 + } + 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, ErrIntOverflowIssue322 + } + 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, ErrIntOverflowIssue322 + } + 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, ErrInvalidLengthIssue322 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue322 + } + 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 := skipIssue322(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 ( + ErrInvalidLengthIssue322 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue322 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue322.proto", fileDescriptor_issue322_3e2db2f0d45a9027) } + +var fileDescriptor_issue322_3e2db2f0d45a9027 = []byte{ + // 149 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x36, 0x32, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x29, 0x49, 0x2d, 0x2e, + 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, + 0xcf, 0xd7, 0x07, 0x4b, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa4, 0xa4, + 0xce, 0xc5, 0xe9, 0x9f, 0x97, 0x9a, 0x9f, 0x16, 0x92, 0x5a, 0x5c, 0x22, 0x24, 0xc8, 0xc5, 0x98, + 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6a, 0xc5, 0x68, 0xe2, 0xc1, 0x10, 0xc4, 0x98, 0xe9, 0xc4, + 0xce, 0xc5, 0x5a, 0x9a, 0x97, 0x99, 0x9f, 0xe7, 0x24, 0xf3, 0xe1, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, + 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, + 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x64, 0xd7, + 0x6a, 0x8c, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue322/issue322.proto b/deps/github.com/gogo/protobuf/test/issue322/issue322.proto new file mode 100644 index 000000000..e3045de10 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue322/issue322.proto @@ -0,0 +1,15 @@ +syntax = "proto2"; +package test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message OneofTest { + oneof union { + int32 i = 1 [default = 4]; + } +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/issue322/issue322pb_test.go b/deps/github.com/gogo/protobuf/test/issue322/issue322pb_test.go new file mode 100644 index 000000000..997209d24 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue322/issue322pb_test.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue322.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestOneofTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofTestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOneofTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/issue330/Makefile b/deps/github.com/gogo/protobuf/test/issue330/Makefile new file mode 100644 index 000000000..e085e13d2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue330/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/deps/github.com/gogo/protobuf/test/issue330/issue330.pb.go b/deps/github.com/gogo/protobuf/test/issue330/issue330.pb.go new file mode 100644 index 000000000..7e3468768 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue330/issue330.pb.go @@ -0,0 +1,433 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue330.proto + +package issue330 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Object struct { + Type TypeIdentifier `protobuf:"varint,1,opt,name=type,proto3,casttype=TypeIdentifier" json:"type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_issue330_8ac709e024292525, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return m.Size() +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func (m *Object) GetType() TypeIdentifier { + if m != nil { + return m.Type + } + return 0 +} + +func init() { + proto.RegisterType((*Object)(nil), "issue330.Object") +} +func (this *Object) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +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 m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue330(dAtA, i, uint64(m.Type)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIssue330(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 NewPopulatedObject(r randyIssue330, easy bool) *Object { + this := &Object{} + this.Type = TypeIdentifier(r.Uint32()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue330(r, 2) + } + return this +} + +type randyIssue330 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue330(r randyIssue330) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue330(r randyIssue330) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneIssue330(r) + } + return string(tmps) +} +func randUnrecognizedIssue330(r randyIssue330, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue330(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue330(dAtA []byte, r randyIssue330, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue330(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Object) Size() (n int) { + var l int + _ = l + if m.Type != 0 { + n += 1 + sovIssue330(uint64(m.Type)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue330(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue330(x uint64) (n int) { + return sovIssue330(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +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 ErrIntOverflowIssue330 + } + 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue330 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (TypeIdentifier(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue330(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue330 + } + 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 skipIssue330(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, ErrIntOverflowIssue330 + } + 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, ErrIntOverflowIssue330 + } + 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, ErrIntOverflowIssue330 + } + 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, ErrInvalidLengthIssue330 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue330 + } + 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 := skipIssue330(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 ( + ErrInvalidLengthIssue330 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue330 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue330.proto", fileDescriptor_issue330_8ac709e024292525) } + +var fileDescriptor_issue330_8ac709e024292525 = []byte{ + // 158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x36, 0x36, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x32, 0xe0, 0x62, + 0xf3, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0x11, 0x52, 0xe3, 0x62, 0x29, 0xa9, 0x2c, 0x48, 0x95, 0x60, + 0x54, 0x60, 0xd4, 0xe0, 0x75, 0x12, 0xfa, 0x75, 0x4f, 0x9e, 0x2f, 0xa4, 0xb2, 0x20, 0xd5, 0x33, + 0x25, 0x35, 0xaf, 0x24, 0x33, 0x2d, 0x33, 0xb5, 0x28, 0x08, 0x2c, 0xef, 0x24, 0xf3, 0xe3, 0xa1, + 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x1e, 0x78, 0x24, 0xc7, 0x78, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x26, 0xb1, 0x81, 0x8d, 0x35, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x41, 0xc2, 0x37, 0xa1, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue330/issue330.proto b/deps/github.com/gogo/protobuf/test/issue330/issue330.proto new file mode 100644 index 000000000..4bfdda457 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue330/issue330.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package issue330; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.benchgen_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message Object { + uint32 type = 1 [(gogoproto.casttype) = "TypeIdentifier"]; +} diff --git a/deps/github.com/gogo/protobuf/test/issue330/issue330pb_test.go b/deps/github.com/gogo/protobuf/test/issue330/issue330pb_test.go new file mode 100644 index 000000000..d19f34bff --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue330/issue330pb_test.go @@ -0,0 +1,199 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue330.proto + +package issue330 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestObjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestObjectMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkObjectProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkObjectProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedObject(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Object{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestObjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestObjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkObjectSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/issue330/type.go b/deps/github.com/gogo/protobuf/test/issue330/type.go new file mode 100644 index 000000000..556b21b87 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue330/type.go @@ -0,0 +1,17 @@ +package issue330 + +type TypeIdentifier uint32 + +const ( + UnknownType TypeIdentifier = 0 + UserType TypeIdentifier = 20 +) + +func (t TypeIdentifier) String() string { + switch t { + case 20: + return "User" + default: + return "Unknown" + } +} diff --git a/deps/github.com/gogo/protobuf/test/issue34/Makefile b/deps/github.com/gogo/protobuf/test/issue34/Makefile new file mode 100644 index 000000000..ecb3e74ea --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue34/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/deps/github.com/gogo/protobuf/test/issue34/issue34_test.go b/deps/github.com/gogo/protobuf/test/issue34/issue34_test.go new file mode 100644 index 000000000..a9fbde489 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue34/issue34_test.go @@ -0,0 +1,82 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package issue34 + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestZeroLengthOptionalBytes(t *testing.T) { + roundtrip := func(f *Foo) *Foo { + data, err := proto.Marshal(f) + if err != nil { + panic(err) + } + newF := &Foo{} + err = proto.Unmarshal(data, newF) + if err != nil { + panic(err) + } + return newF + } + + f := &Foo{} + roundtrippedF := roundtrip(f) + if roundtrippedF.Bar != nil { + t.Fatalf("should be nil") + } + + f.Bar = []byte{} + roundtrippedF = roundtrip(f) + if roundtrippedF.Bar == nil { + t.Fatalf("should not be nil") + } + if len(roundtrippedF.Bar) != 0 { + t.Fatalf("should be empty") + } +} + +func TestRepeatedOptional(t *testing.T) { + repeated := &FooWithRepeated{Bar: [][]byte{[]byte("a"), []byte("b")}} + data, err := proto.Marshal(repeated) + if err != nil { + panic(err) + } + optional := &Foo{} + err = proto.Unmarshal(data, optional) + if err != nil { + panic(err) + } + + if !bytes.Equal(optional.Bar, []byte("b")) { + t.Fatalf("should return the last entry") + } +} diff --git a/deps/github.com/gogo/protobuf/test/issue34/proto.pb.go b/deps/github.com/gogo/protobuf/test/issue34/proto.pb.go new file mode 100644 index 000000000..56e05a457 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue34/proto.pb.go @@ -0,0 +1,383 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package issue34 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Foo struct { + Bar []byte `protobuf:"bytes,1,opt,name=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_9c2649a35ed336bb, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +func (m *Foo) GetBar() []byte { + if m != nil { + return m.Bar + } + return nil +} + +type FooWithRepeated struct { + Bar [][]byte `protobuf:"bytes,1,rep,name=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FooWithRepeated) Reset() { *m = FooWithRepeated{} } +func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) } +func (*FooWithRepeated) ProtoMessage() {} +func (*FooWithRepeated) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_9c2649a35ed336bb, []int{1} +} +func (m *FooWithRepeated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FooWithRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FooWithRepeated.Marshal(b, m, deterministic) +} +func (dst *FooWithRepeated) XXX_Merge(src proto.Message) { + xxx_messageInfo_FooWithRepeated.Merge(dst, src) +} +func (m *FooWithRepeated) XXX_Size() int { + return xxx_messageInfo_FooWithRepeated.Size(m) +} +func (m *FooWithRepeated) XXX_DiscardUnknown() { + xxx_messageInfo_FooWithRepeated.DiscardUnknown(m) +} + +var xxx_messageInfo_FooWithRepeated proto.InternalMessageInfo + +func (m *FooWithRepeated) GetBar() [][]byte { + if m != nil { + return m.Bar + } + return nil +} + +func init() { + proto.RegisterType((*Foo)(nil), "issue34.Foo") + proto.RegisterType((*FooWithRepeated)(nil), "issue34.FooWithRepeated") +} +func (m *Foo) 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 ErrIntOverflowProto + } + 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: Foo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bar = append(m.Bar[:0], dAtA[iNdEx:postIndex]...) + if m.Bar == nil { + m.Bar = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + 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 *FooWithRepeated) 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 ErrIntOverflowProto + } + 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: FooWithRepeated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FooWithRepeated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bar = append(m.Bar, make([]byte, postIndex-iNdEx)) + copy(m.Bar[len(m.Bar)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + 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 skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_9c2649a35ed336bb) } + +var fileDescriptor_proto_9c2649a35ed336bb = []byte{ + // 126 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xec, 0x99, 0xc5, 0xc5, 0xa5, 0xa9, 0xc6, 0x26, 0x52, 0xba, 0xe9, + 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, + 0xf9, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xfa, 0x94, 0xc4, 0xb9, 0x98, 0xdd, + 0xf2, 0xf3, 0x85, 0x04, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, + 0x40, 0x4c, 0x25, 0x65, 0x2e, 0x7e, 0xb7, 0xfc, 0xfc, 0xf0, 0xcc, 0x92, 0x8c, 0xa0, 0xd4, 0x82, + 0xd4, 0xc4, 0x92, 0xd4, 0x14, 0x84, 0x22, 0x66, 0xa8, 0x22, 0x27, 0x96, 0x0b, 0x8f, 0xe4, 0x18, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0xb2, 0x1b, 0xef, 0x89, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue34/proto.proto b/deps/github.com/gogo/protobuf/test/issue34/proto.proto new file mode 100644 index 000000000..5531befbb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue34/proto.proto @@ -0,0 +1,43 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package issue34; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message Foo { + optional bytes bar = 1; +} + +message FooWithRepeated { + repeated bytes bar = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/issue427/.gitignore b/deps/github.com/gogo/protobuf/test/issue427/.gitignore new file mode 100644 index 000000000..f66be0383 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue427/.gitignore @@ -0,0 +1,2 @@ +*.pb.go +*_test.go \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/issue427/Makefile b/deps/github.com/gogo/protobuf/test/issue427/Makefile new file mode 100644 index 000000000..5eb2c1685 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue427/Makefile @@ -0,0 +1,7 @@ +test: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + go get -u golang.org/x/net/context + go get -u google.golang.org/grpc + protoc-min-version --version="3.0.0" --gogo_out=plugins=grpc:. --proto_path=../../../../../:../../protobuf/:. issue427.proto + go test ./... diff --git a/deps/github.com/gogo/protobuf/test/issue427/README.md b/deps/github.com/gogo/protobuf/test/issue427/README.md new file mode 100644 index 000000000..e9fd7da7b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue427/README.md @@ -0,0 +1,11 @@ +# The Bug + +Inconsistent package name generation between the import: + +* import golang_org_x_net_context "golang.org/x/net/context" +* import google_golang_org_grpc "google.golang.org/grpc" + +and the dummy vars: + +* var _ context.Context +* var _ grpc.ClientConn diff --git a/deps/github.com/gogo/protobuf/test/issue427/issue427.proto b/deps/github.com/gogo/protobuf/test/issue427/issue427.proto new file mode 100644 index 000000000..c37e7f7c8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue427/issue427.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package issue427; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; + +message Foo { + string foo = 1; +} + +service Bar { + rpc GetBar (Foo) returns (Foo); +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/issue42order/Makefile b/deps/github.com/gogo/protobuf/test/issue42order/Makefile new file mode 100644 index 000000000..5b8e59bdb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue42order/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. issue42.proto) diff --git a/deps/github.com/gogo/protobuf/test/issue42order/issue42.pb.go b/deps/github.com/gogo/protobuf/test/issue42order/issue42.pb.go new file mode 100644 index 000000000..21e9a82ab --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue42order/issue42.pb.go @@ -0,0 +1,648 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue42.proto + +package issue42 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type UnorderedFields struct { + A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` + B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnorderedFields) Reset() { *m = UnorderedFields{} } +func (m *UnorderedFields) String() string { return proto.CompactTextString(m) } +func (*UnorderedFields) ProtoMessage() {} +func (*UnorderedFields) Descriptor() ([]byte, []int) { + return fileDescriptor_issue42_6157ac17a2848d4f, []int{0} +} +func (m *UnorderedFields) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnorderedFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnorderedFields.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnorderedFields) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnorderedFields.Merge(dst, src) +} +func (m *UnorderedFields) XXX_Size() int { + return m.Size() +} +func (m *UnorderedFields) XXX_DiscardUnknown() { + xxx_messageInfo_UnorderedFields.DiscardUnknown(m) +} + +var xxx_messageInfo_UnorderedFields proto.InternalMessageInfo + +func (m *UnorderedFields) GetA() int64 { + if m != nil && m.A != nil { + return *m.A + } + return 0 +} + +func (m *UnorderedFields) GetB() uint64 { + if m != nil && m.B != nil { + return *m.B + } + return 0 +} + +type OrderedFields struct { + B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` + A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrderedFields) Reset() { *m = OrderedFields{} } +func (m *OrderedFields) String() string { return proto.CompactTextString(m) } +func (*OrderedFields) ProtoMessage() {} +func (*OrderedFields) Descriptor() ([]byte, []int) { + return fileDescriptor_issue42_6157ac17a2848d4f, []int{1} +} +func (m *OrderedFields) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderedFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderedFields.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OrderedFields) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderedFields.Merge(dst, src) +} +func (m *OrderedFields) XXX_Size() int { + return m.Size() +} +func (m *OrderedFields) XXX_DiscardUnknown() { + xxx_messageInfo_OrderedFields.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderedFields proto.InternalMessageInfo + +func (m *OrderedFields) GetB() uint64 { + if m != nil && m.B != nil { + return *m.B + } + return 0 +} + +func (m *OrderedFields) GetA() int64 { + if m != nil && m.A != nil { + return *m.A + } + return 0 +} + +func init() { + proto.RegisterType((*UnorderedFields)(nil), "issue42.UnorderedFields") + proto.RegisterType((*OrderedFields)(nil), "issue42.OrderedFields") +} +func (m *UnorderedFields) 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 *UnorderedFields) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.B != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.B)) + i += 8 + } + if m.A != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintIssue42(dAtA, i, uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrderedFields) 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 *OrderedFields) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.B != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.B)) + i += 8 + } + if m.A != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintIssue42(dAtA, i, uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIssue42(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 NewPopulatedUnorderedFields(r randyIssue42, easy bool) *UnorderedFields { + this := &UnorderedFields{} + if r.Intn(10) != 0 { + v1 := uint64(uint64(r.Uint32())) + this.B = &v1 + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.A = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) + } + return this +} + +func NewPopulatedOrderedFields(r randyIssue42, easy bool) *OrderedFields { + this := &OrderedFields{} + if r.Intn(10) != 0 { + v3 := uint64(uint64(r.Uint32())) + this.B = &v3 + } + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.A = &v4 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) + } + return this +} + +type randyIssue42 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue42(r randyIssue42) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue42(r randyIssue42) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneIssue42(r) + } + return string(tmps) +} +func randUnrecognizedIssue42(r randyIssue42, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue42(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue42(dAtA []byte, r randyIssue42, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue42(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *UnorderedFields) Size() (n int) { + var l int + _ = l + if m.B != nil { + n += 9 + } + if m.A != nil { + n += 1 + sovIssue42(uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrderedFields) Size() (n int) { + var l int + _ = l + if m.B != nil { + n += 9 + } + if m.A != nil { + n += 1 + sovIssue42(uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue42(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue42(x uint64) (n int) { + return sovIssue42(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UnorderedFields) 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 ErrIntOverflowIssue42 + } + 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: UnorderedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnorderedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.B = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue42 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.A = &v + default: + iNdEx = preIndex + skippy, err := skipIssue42(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue42 + } + 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 *OrderedFields) 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 ErrIntOverflowIssue42 + } + 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: OrderedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.B = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue42 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.A = &v + default: + iNdEx = preIndex + skippy, err := skipIssue42(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue42 + } + 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 skipIssue42(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, ErrIntOverflowIssue42 + } + 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, ErrIntOverflowIssue42 + } + 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, ErrIntOverflowIssue42 + } + 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, ErrInvalidLengthIssue42 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue42 + } + 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 := skipIssue42(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 ( + ErrInvalidLengthIssue42 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue42 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue42.proto", fileDescriptor_issue42_6157ac17a2848d4f) } + +var fileDescriptor_issue42_6157ac17a2848d4f = []byte{ + // 144 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3, + 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, + 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0xe9, 0x72, 0xf1, 0x87, + 0xe6, 0xe5, 0x17, 0xa5, 0xa4, 0x16, 0xa5, 0xa6, 0xb8, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x0b, 0xf1, + 0x70, 0x31, 0x3a, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x05, 0x31, 0x3a, 0x81, 0x78, 0x8e, 0x12, + 0x5c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x8c, 0x8e, 0x4a, 0xda, 0x5c, 0xbc, 0xfe, 0xc4, 0x2a, 0x76, + 0x12, 0xf8, 0xf1, 0x50, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, + 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x94, 0xa9, 0xfd, 0x9c, 0xb5, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue42order/issue42.proto b/deps/github.com/gogo/protobuf/test/issue42order/issue42.proto new file mode 100644 index 000000000..5e8b77be5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue42order/issue42.proto @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package issue42; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; + +message UnorderedFields { + optional int64 A = 10; + optional fixed64 B = 1; +} + +message OrderedFields { + optional fixed64 B = 1; + optional int64 A = 10; +} diff --git a/deps/github.com/gogo/protobuf/test/issue42order/order_test.go b/deps/github.com/gogo/protobuf/test/issue42order/order_test.go new file mode 100644 index 000000000..571731c7c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue42order/order_test.go @@ -0,0 +1,56 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package issue42 + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestIssue42Order(t *testing.T) { + unordered := NewPopulatedUnorderedFields(math_rand.New(math_rand.NewSource(time.Now().UnixNano())), false) + udata, err := proto.Marshal(unordered) + if err != nil { + t.Fatal(err) + } + ordered := &OrderedFields{} + if err = proto.Unmarshal(udata, ordered); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(ordered) + if err != nil { + t.Fatal(err) + } + if !bytes.Equal(udata, data) { + t.Fatalf("expected data to be marshaled in the same order, please sort fields before marshaling") + } +} diff --git a/deps/github.com/gogo/protobuf/test/issue435/Makefile b/deps/github.com/gogo/protobuf/test/issue435/Makefile new file mode 100644 index 000000000..9f5ceb994 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue435/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --gogo_out=. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/deps/github.com/gogo/protobuf/test/issue435/issue435.pb.go b/deps/github.com/gogo/protobuf/test/issue435/issue435.pb.go new file mode 100644 index 000000000..e6be2e6b3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue435/issue435.pb.go @@ -0,0 +1,129 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue435.proto + +package issue435 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Message struct { + NonnullableOptional SubMessage `protobuf:"bytes,1,opt,name=nonnullable_optional,json=nonnullableOptional" json:"nonnullable_optional"` + NonnullableRepeated []SubMessage `protobuf:"bytes,2,rep,name=nonnullable_repeated,json=nonnullableRepeated" json:"nonnullable_repeated"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_issue435_f2d026e765e48290, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetNonnullableOptional() SubMessage { + if m != nil { + return m.NonnullableOptional + } + return SubMessage{} +} + +func (m *Message) GetNonnullableRepeated() []SubMessage { + if m != nil { + return m.NonnullableRepeated + } + return nil +} + +type SubMessage struct { + Value *int64 `protobuf:"varint,1,opt,name=value,def=7" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubMessage) Reset() { *m = SubMessage{} } +func (m *SubMessage) String() string { return proto.CompactTextString(m) } +func (*SubMessage) ProtoMessage() {} +func (*SubMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_issue435_f2d026e765e48290, []int{1} +} +func (m *SubMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubMessage.Unmarshal(m, b) +} +func (m *SubMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubMessage.Marshal(b, m, deterministic) +} +func (dst *SubMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubMessage.Merge(dst, src) +} +func (m *SubMessage) XXX_Size() int { + return xxx_messageInfo_SubMessage.Size(m) +} +func (m *SubMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SubMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SubMessage proto.InternalMessageInfo + +const Default_SubMessage_Value int64 = 7 + +func (m *SubMessage) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return Default_SubMessage_Value +} + +func init() { + proto.RegisterType((*Message)(nil), "issue435.Message") + proto.RegisterType((*SubMessage)(nil), "issue435.SubMessage") +} + +func init() { proto.RegisterFile("issue435.proto", fileDescriptor_issue435_f2d026e765e48290) } + +var fileDescriptor_issue435_f2d026e765e48290 = []byte{ + // 189 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0x36, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x5a, 0xce, 0xc8, + 0xc5, 0xee, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xe4, 0xcb, 0x25, 0x92, 0x97, 0x9f, 0x97, + 0x57, 0x9a, 0x93, 0x93, 0x98, 0x94, 0x93, 0x1a, 0x9f, 0x5f, 0x50, 0x92, 0x99, 0x9f, 0x97, 0x98, + 0x23, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa2, 0x07, 0xb7, 0x33, 0xb8, 0x34, 0x09, 0xaa, + 0xc7, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0x61, 0x24, 0x7d, 0xfe, 0x50, 0x6d, 0xe8, 0xc6, + 0x15, 0xa5, 0x16, 0xa4, 0x26, 0x96, 0xa4, 0xa6, 0x48, 0x30, 0x29, 0x30, 0x93, 0x60, 0x5c, 0x10, + 0x54, 0x9b, 0x92, 0x2a, 0x17, 0x17, 0x42, 0xa1, 0x90, 0x38, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, + 0x2a, 0xd8, 0x71, 0xcc, 0x56, 0x8c, 0xe6, 0x41, 0x10, 0xbe, 0x13, 0x57, 0x14, 0x3c, 0x2c, 0x00, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x92, 0xfe, 0x57, 0x69, 0x26, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue435/issue435.proto b/deps/github.com/gogo/protobuf/test/issue435/issue435.proto new file mode 100644 index 000000000..cfa56cd2c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue435/issue435.proto @@ -0,0 +1,16 @@ +syntax = "proto2"; + +package issue435; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "issue435"; + +message Message { + optional SubMessage nonnullable_optional = 1 [(gogoproto.nullable) = false]; + repeated SubMessage nonnullable_repeated = 2 [(gogoproto.nullable) = false]; +} + +message SubMessage { + optional int64 value = 1 [default = 7]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/issue435/issue435pb_test.go b/deps/github.com/gogo/protobuf/test/issue435/issue435pb_test.go new file mode 100644 index 000000000..cb80b18ff --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue435/issue435pb_test.go @@ -0,0 +1,22 @@ +package issue435 + +import ( + "testing" + + proto "github.com/gogo/protobuf/proto" +) + +func TestNonnullableDefaults(t *testing.T) { + m := &Message{ + NonnullableOptional: SubMessage{}, + NonnullableRepeated: []SubMessage{{}}, + } + proto.SetDefaults(m) + + if e, a := int64(7), *m.NonnullableOptional.Value; e != a { + t.Errorf("Default not set: want %d, got %d", e, a) + } + if e, a := int64(7), *m.NonnullableRepeated[0].Value; e != a { + t.Errorf("Default not set: want %d, got %d", e, a) + } +} diff --git a/deps/github.com/gogo/protobuf/test/issue438/Makefile b/deps/github.com/gogo/protobuf/test/issue438/Makefile new file mode 100644 index 000000000..241e9cd9e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue438/Makefile @@ -0,0 +1,15 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/api.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/source_context.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/type.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\ + :. --proto_path=../../../../../:../../protobuf/:. issue438.proto diff --git a/deps/github.com/gogo/protobuf/test/issue438/issue438.pb.go b/deps/github.com/gogo/protobuf/test/issue438/issue438.pb.go new file mode 100644 index 000000000..86d15dab2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue438/issue438.pb.go @@ -0,0 +1,485 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue438.proto + +package issue438 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Types struct { + Any *types.Any `protobuf:"bytes,1,opt,name=any" json:"any,omitempty"` + Api *types.Api `protobuf:"bytes,2,opt,name=api" json:"api,omitempty"` + Met *types.Method `protobuf:"bytes,3,opt,name=met" json:"met,omitempty"` + Mx *types.Mixin `protobuf:"bytes,4,opt,name=mx" json:"mx,omitempty"` + Dur *types.Duration `protobuf:"bytes,5,opt,name=dur" json:"dur,omitempty"` + Em *types.Empty `protobuf:"bytes,6,opt,name=em" json:"em,omitempty"` + Fm *types.FieldMask `protobuf:"bytes,7,opt,name=fm" json:"fm,omitempty"` + Sc *types.SourceContext `protobuf:"bytes,8,opt,name=sc" json:"sc,omitempty"` + St *types.Struct `protobuf:"bytes,9,opt,name=st" json:"st,omitempty"` + Val *types.Value `protobuf:"bytes,10,opt,name=val" json:"val,omitempty"` + Nlval types.NullValue `protobuf:"varint,11,opt,name=nlval,proto3,enum=google.protobuf.NullValue" json:"nlval,omitempty"` + Stval *types.StringValue `protobuf:"bytes,12,opt,name=stval" json:"stval,omitempty"` + Bval *types.BoolValue `protobuf:"bytes,13,opt,name=bval" json:"bval,omitempty"` + Strval *types.Struct `protobuf:"bytes,14,opt,name=strval" json:"strval,omitempty"` + Lstv *types.ListValue `protobuf:"bytes,15,opt,name=lstv" json:"lstv,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,16,opt,name=ts" json:"ts,omitempty"` + T *types.Type `protobuf:"bytes,17,opt,name=t" json:"t,omitempty"` + F *types.Field `protobuf:"bytes,18,opt,name=f" json:"f,omitempty"` + En *types.Enum `protobuf:"bytes,19,opt,name=en" json:"en,omitempty"` + Enval *types.EnumValue `protobuf:"bytes,20,opt,name=enval" json:"enval,omitempty"` + Opt *types.Option `protobuf:"bytes,21,opt,name=opt" json:"opt,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,22,opt,name=dbl" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,23,opt,name=flt" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,24,opt,name=i64" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,25,opt,name=u64" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,26,opt,name=i32" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,27,opt,name=u32" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,28,opt,name=bool" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,29,opt,name=str" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,30,opt,name=bytes" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Types) Reset() { *m = Types{} } +func (m *Types) String() string { return proto.CompactTextString(m) } +func (*Types) ProtoMessage() {} +func (*Types) Descriptor() ([]byte, []int) { + return fileDescriptor_issue438_0fea1881269710af, []int{0} +} +func (m *Types) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Types.Unmarshal(m, b) +} +func (m *Types) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Types.Marshal(b, m, deterministic) +} +func (dst *Types) XXX_Merge(src proto.Message) { + xxx_messageInfo_Types.Merge(dst, src) +} +func (m *Types) XXX_Size() int { + return xxx_messageInfo_Types.Size(m) +} +func (m *Types) XXX_DiscardUnknown() { + xxx_messageInfo_Types.DiscardUnknown(m) +} + +var xxx_messageInfo_Types proto.InternalMessageInfo + +func (m *Types) GetAny() *types.Any { + if m != nil { + return m.Any + } + return nil +} + +func (m *Types) GetApi() *types.Api { + if m != nil { + return m.Api + } + return nil +} + +func (m *Types) GetMet() *types.Method { + if m != nil { + return m.Met + } + return nil +} + +func (m *Types) GetMx() *types.Mixin { + if m != nil { + return m.Mx + } + return nil +} + +func (m *Types) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *Types) GetEm() *types.Empty { + if m != nil { + return m.Em + } + return nil +} + +func (m *Types) GetFm() *types.FieldMask { + if m != nil { + return m.Fm + } + return nil +} + +func (m *Types) GetSc() *types.SourceContext { + if m != nil { + return m.Sc + } + return nil +} + +func (m *Types) GetSt() *types.Struct { + if m != nil { + return m.St + } + return nil +} + +func (m *Types) GetVal() *types.Value { + if m != nil { + return m.Val + } + return nil +} + +func (m *Types) GetNlval() types.NullValue { + if m != nil { + return m.Nlval + } + return types.NullValue_NULL_VALUE +} + +func (m *Types) GetStval() *types.StringValue { + if m != nil { + return m.Stval + } + return nil +} + +func (m *Types) GetBval() *types.BoolValue { + if m != nil { + return m.Bval + } + return nil +} + +func (m *Types) GetStrval() *types.Struct { + if m != nil { + return m.Strval + } + return nil +} + +func (m *Types) GetLstv() *types.ListValue { + if m != nil { + return m.Lstv + } + return nil +} + +func (m *Types) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *Types) GetT() *types.Type { + if m != nil { + return m.T + } + return nil +} + +func (m *Types) GetF() *types.Field { + if m != nil { + return m.F + } + return nil +} + +func (m *Types) GetEn() *types.Enum { + if m != nil { + return m.En + } + return nil +} + +func (m *Types) GetEnval() *types.EnumValue { + if m != nil { + return m.Enval + } + return nil +} + +func (m *Types) GetOpt() *types.Option { + if m != nil { + return m.Opt + } + return nil +} + +func (m *Types) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *Types) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *Types) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *Types) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *Types) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *Types) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *Types) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *Types) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *Types) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +func init() { + proto.RegisterType((*Types)(nil), "issue438.Types") +} +func (m *Types) ProtoSize() (n int) { + var l int + _ = l + if m.Any != nil { + l = m.Any.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Api != nil { + l = m.Api.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Met != nil { + l = m.Met.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Mx != nil { + l = m.Mx.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Dur != nil { + l = m.Dur.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Em != nil { + l = m.Em.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Fm != nil { + l = m.Fm.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Sc != nil { + l = m.Sc.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.St != nil { + l = m.St.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Val != nil { + l = m.Val.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Nlval != 0 { + n += 1 + sovIssue438(uint64(m.Nlval)) + } + if m.Stval != nil { + l = m.Stval.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Bval != nil { + l = m.Bval.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Strval != nil { + l = m.Strval.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Lstv != nil { + l = m.Lstv.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.T != nil { + l = m.T.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.F != nil { + l = m.F.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.En != nil { + l = m.En.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Enval != nil { + l = m.Enval.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Opt != nil { + l = m.Opt.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.I64 != nil { + l = m.I64.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.U64 != nil { + l = m.U64.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.I32 != nil { + l = m.I32.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.U32 != nil { + l = m.U32.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Str != nil { + l = m.Str.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue438(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue438(x uint64) (n int) { + return sovIssue438(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("issue438.proto", fileDescriptor_issue438_0fea1881269710af) } + +var fileDescriptor_issue438_0fea1881269710af = []byte{ + // 682 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xd3, 0xef, 0x4e, 0x14, 0x3b, + 0x14, 0x00, 0xf0, 0x3b, 0x33, 0x2c, 0x97, 0x5b, 0xae, 0xa8, 0x95, 0x3f, 0x65, 0xc1, 0x95, 0x28, + 0x22, 0x6a, 0x18, 0x74, 0x77, 0xb3, 0xf1, 0xab, 0x08, 0x26, 0x26, 0xa2, 0x49, 0x41, 0xbf, 0x92, + 0x99, 0xdd, 0xce, 0xd2, 0xd0, 0x99, 0x36, 0xd3, 0x16, 0x77, 0xde, 0xc6, 0x47, 0xf2, 0x11, 0x8c, + 0xbe, 0x88, 0x69, 0xa7, 0xab, 0x66, 0x87, 0x12, 0xbe, 0xcd, 0xe4, 0xfc, 0xce, 0x69, 0x7b, 0x4e, + 0x0b, 0x96, 0xa8, 0x94, 0x9a, 0xf4, 0x7b, 0xaf, 0x62, 0x51, 0x72, 0xc5, 0xe1, 0xc2, 0xf4, 0xbf, + 0xbd, 0x37, 0xa6, 0xea, 0x5c, 0xa7, 0xf1, 0x90, 0xe7, 0xfb, 0x63, 0x3e, 0xe6, 0xfb, 0x16, 0xa4, + 0x3a, 0xb3, 0x7f, 0xf6, 0xc7, 0x7e, 0xd5, 0x89, 0xed, 0xf5, 0x31, 0xe7, 0x63, 0x46, 0xfe, 0xa8, + 0xa4, 0xa8, 0xbc, 0x21, 0x41, 0x5d, 0xa8, 0x33, 0x1b, 0x1a, 0xe9, 0x32, 0x51, 0x94, 0x17, 0x2e, + 0xbe, 0x31, 0x1b, 0x27, 0xb9, 0x50, 0xd3, 0xba, 0x5b, 0xb3, 0xc1, 0x8c, 0x12, 0x36, 0x3a, 0xcb, + 0x13, 0x79, 0xe1, 0xc4, 0xf6, 0xac, 0x90, 0x5c, 0x97, 0x43, 0x72, 0x36, 0xe4, 0x85, 0x22, 0x13, + 0xe5, 0xd4, 0x66, 0x43, 0xa9, 0x52, 0x0f, 0xa7, 0xd1, 0x07, 0xb3, 0x51, 0x45, 0x73, 0x22, 0x55, + 0x92, 0x0b, 0x07, 0xda, 0x0d, 0x50, 0x09, 0xe2, 0x3b, 0xdf, 0x97, 0x32, 0x11, 0x82, 0x94, 0xb2, + 0x8e, 0x3f, 0xfc, 0x06, 0x40, 0xeb, 0xb4, 0x12, 0x44, 0xc2, 0x1d, 0x10, 0x25, 0x45, 0x85, 0x82, + 0xad, 0x60, 0x77, 0xb1, 0xbb, 0x1c, 0xd7, 0x79, 0xf1, 0x34, 0x2f, 0x7e, 0x5d, 0x54, 0xd8, 0x00, + 0xeb, 0x04, 0x45, 0xa1, 0xcf, 0x09, 0x8a, 0x0d, 0x80, 0x4f, 0x41, 0x94, 0x13, 0x85, 0x22, 0xeb, + 0xd6, 0x1a, 0xee, 0x98, 0xa8, 0x73, 0x3e, 0xc2, 0xc6, 0xc0, 0x1d, 0x10, 0xe6, 0x13, 0x34, 0x67, + 0xe5, 0x6a, 0x53, 0xd2, 0x09, 0x2d, 0x70, 0x98, 0x4f, 0xe0, 0x73, 0x10, 0x8d, 0x74, 0x89, 0x5a, + 0x16, 0xae, 0x37, 0xe0, 0xa1, 0x1b, 0x1d, 0x36, 0xca, 0x14, 0x25, 0x39, 0x9a, 0xf7, 0x14, 0x3d, + 0x32, 0x63, 0xc4, 0x21, 0xc9, 0xe1, 0x33, 0x10, 0x66, 0x39, 0xfa, 0xd7, 0xba, 0x76, 0xc3, 0xbd, + 0x35, 0x13, 0x3d, 0x4e, 0xe4, 0x05, 0x0e, 0xb3, 0x1c, 0xc6, 0x20, 0x94, 0x43, 0xb4, 0x60, 0x6d, + 0xa7, 0x61, 0x4f, 0xec, 0x6c, 0xdf, 0xd4, 0xa3, 0xc5, 0xa1, 0x1c, 0xc2, 0x27, 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a, 0xc6, 0x20, 0x1a, 0xa5, 0x0c, 0xad, 0x7a, 0xa6, 0x77, 0xc8, 0x75, 0xca, + 0x88, 0xbb, 0x21, 0xa3, 0x94, 0xc1, 0x3d, 0x10, 0x65, 0x4c, 0xa1, 0x35, 0xeb, 0x37, 0x9a, 0x67, + 0x63, 0x3c, 0x71, 0xad, 0x35, 0xce, 0x70, 0x3a, 0xe8, 0x23, 0xe4, 0xe1, 0xef, 0x0a, 0x35, 0xe8, + 0x3b, 0x4e, 0x07, 0x7d, 0xb3, 0x1b, 0x3d, 0xe8, 0xa3, 0x75, 0xcf, 0x6e, 0x3e, 0xfd, 0xed, 0xf5, + 0xa0, 0x6f, 0xcb, 0xf7, 0xba, 0xa8, 0xed, 0x2f, 0xdf, 0xeb, 0x4e, 0xcb, 0xf7, 0xba, 0xb6, 0x7c, + 0xaf, 0x8b, 0x36, 0xae, 0x29, 0xff, 0xdb, 0x6b, 0xeb, 0xe7, 0x52, 0xce, 0x19, 0xda, 0xbc, 0xc1, + 0x45, 0xe5, 0xdc, 0xdc, 0xbb, 0x48, 0xaa, 0x12, 0xdd, 0xbf, 0xc1, 0x53, 0x30, 0x10, 0xbe, 0x04, + 0xad, 0xb4, 0x52, 0x44, 0xa2, 0x8e, 0xe7, 0x00, 0x07, 0x26, 0xea, 0x46, 0x6b, 0xe5, 0xc1, 0xc2, + 0xf7, 0x1f, 0x9d, 0x7f, 0xbe, 0xfe, 0xec, 0x04, 0xe9, 0xbc, 0x55, 0xbd, 0x5f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x99, 0xa8, 0x9a, 0xae, 0xe4, 0x06, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue438/issue438.proto b/deps/github.com/gogo/protobuf/test/issue438/issue438.proto new file mode 100644 index 000000000..933d1640b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue438/issue438.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package issue438; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/api.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/source_context.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/type.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.protosizer_all) = true; +option (gogoproto.sizer_all) = false; + +message Types { + google.protobuf.Any any = 1; + google.protobuf.Api api = 2; + google.protobuf.Method met = 3; + google.protobuf.Mixin mx = 4; + google.protobuf.Duration dur = 5; + google.protobuf.Empty em = 6; + google.protobuf.FieldMask fm = 7; + google.protobuf.SourceContext sc = 8; + google.protobuf.Struct st = 9; + google.protobuf.Value val = 10; + google.protobuf.NullValue nlval = 11; + google.protobuf.StringValue stval = 12; + google.protobuf.BoolValue bval = 13; + google.protobuf.Struct strval = 14; + google.protobuf.ListValue lstv = 15; + google.protobuf.Timestamp ts = 16; + google.protobuf.Type t = 17; + google.protobuf.Field f = 18; + google.protobuf.Enum en = 19; + google.protobuf.EnumValue enval = 20; + google.protobuf.Option opt = 21; + google.protobuf.DoubleValue dbl = 22; + google.protobuf.FloatValue flt = 23; + google.protobuf.Int64Value i64 = 24; + google.protobuf.UInt64Value u64 = 25; + google.protobuf.Int32Value i32 = 26; + google.protobuf.UInt32Value u32 = 27; + google.protobuf.BoolValue bool = 28; + google.protobuf.StringValue str = 29; + google.protobuf.BytesValue bytes = 30; +} + + diff --git a/deps/github.com/gogo/protobuf/test/issue449/Makefile b/deps/github.com/gogo/protobuf/test/issue449/Makefile new file mode 100644 index 000000000..509db1a5e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue449/Makefile @@ -0,0 +1,34 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" \ + --proto_path=../../../../../:../../protobuf/:. \ + --gogo_out=. issue449.proto diff --git a/deps/github.com/gogo/protobuf/test/issue449/issue449.pb.go b/deps/github.com/gogo/protobuf/test/issue449/issue449.pb.go new file mode 100644 index 000000000..462a95627 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue449/issue449.pb.go @@ -0,0 +1,599 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue449.proto + +package issue449 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type CodeGenMsg struct { + Int64ReqPtr *int64 `protobuf:"varint,1,req,name=Int64ReqPtr" json:"Int64ReqPtr,omitempty"` + Int32OptPtr *int32 `protobuf:"varint,2,opt,name=Int32OptPtr" json:"Int32OptPtr,omitempty"` + Int64Req int64 `protobuf:"varint,3,req,name=Int64Req" json:"Int64Req"` + Int32Opt int32 `protobuf:"varint,4,opt,name=Int32Opt" json:"Int32Opt"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CodeGenMsg) Reset() { *m = CodeGenMsg{} } +func (m *CodeGenMsg) String() string { return proto.CompactTextString(m) } +func (*CodeGenMsg) ProtoMessage() {} +func (*CodeGenMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_issue449_65778f0ef21a6515, []int{0} +} +func (m *CodeGenMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CodeGenMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CodeGenMsg.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CodeGenMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGenMsg.Merge(dst, src) +} +func (m *CodeGenMsg) XXX_Size() int { + return m.Size() +} +func (m *CodeGenMsg) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGenMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeGenMsg proto.InternalMessageInfo + +func (m *CodeGenMsg) GetInt64ReqPtr() int64 { + if m != nil && m.Int64ReqPtr != nil { + return *m.Int64ReqPtr + } + return 0 +} + +func (m *CodeGenMsg) GetInt32OptPtr() int32 { + if m != nil && m.Int32OptPtr != nil { + return *m.Int32OptPtr + } + return 0 +} + +func (m *CodeGenMsg) GetInt64Req() int64 { + if m != nil { + return m.Int64Req + } + return 0 +} + +func (m *CodeGenMsg) GetInt32Opt() int32 { + if m != nil { + return m.Int32Opt + } + return 0 +} + +type NonCodeGenMsg struct { + Int64ReqPtr *int64 `protobuf:"varint,1,req,name=Int64ReqPtr" json:"Int64ReqPtr,omitempty"` + Int32OptPtr *int32 `protobuf:"varint,2,opt,name=Int32OptPtr" json:"Int32OptPtr,omitempty"` + Int64Req int64 `protobuf:"varint,3,req,name=Int64Req" json:"Int64Req"` + Int32Opt int32 `protobuf:"varint,4,opt,name=Int32Opt" json:"Int32Opt"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonCodeGenMsg) Reset() { *m = NonCodeGenMsg{} } +func (m *NonCodeGenMsg) String() string { return proto.CompactTextString(m) } +func (*NonCodeGenMsg) ProtoMessage() {} +func (*NonCodeGenMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_issue449_65778f0ef21a6515, []int{1} +} +func (m *NonCodeGenMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonCodeGenMsg.Unmarshal(m, b) +} +func (m *NonCodeGenMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonCodeGenMsg.Marshal(b, m, deterministic) +} +func (dst *NonCodeGenMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonCodeGenMsg.Merge(dst, src) +} +func (m *NonCodeGenMsg) XXX_Size() int { + return xxx_messageInfo_NonCodeGenMsg.Size(m) +} +func (m *NonCodeGenMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NonCodeGenMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NonCodeGenMsg proto.InternalMessageInfo + +func (m *NonCodeGenMsg) GetInt64ReqPtr() int64 { + if m != nil && m.Int64ReqPtr != nil { + return *m.Int64ReqPtr + } + return 0 +} + +func (m *NonCodeGenMsg) GetInt32OptPtr() int32 { + if m != nil && m.Int32OptPtr != nil { + return *m.Int32OptPtr + } + return 0 +} + +func (m *NonCodeGenMsg) GetInt64Req() int64 { + if m != nil { + return m.Int64Req + } + return 0 +} + +func (m *NonCodeGenMsg) GetInt32Opt() int32 { + if m != nil { + return m.Int32Opt + } + return 0 +} + +func init() { + proto.RegisterType((*CodeGenMsg)(nil), "issue449.CodeGenMsg") + proto.RegisterType((*NonCodeGenMsg)(nil), "issue449.NonCodeGenMsg") +} +func (this *CodeGenMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CodeGenMsg) + if !ok { + that2, ok := that.(CodeGenMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64ReqPtr != nil && that1.Int64ReqPtr != nil { + if *this.Int64ReqPtr != *that1.Int64ReqPtr { + return false + } + } else if this.Int64ReqPtr != nil { + return false + } else if that1.Int64ReqPtr != nil { + return false + } + if this.Int32OptPtr != nil && that1.Int32OptPtr != nil { + if *this.Int32OptPtr != *that1.Int32OptPtr { + return false + } + } else if this.Int32OptPtr != nil { + return false + } else if that1.Int32OptPtr != nil { + return false + } + if this.Int64Req != that1.Int64Req { + return false + } + if this.Int32Opt != that1.Int32Opt { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonCodeGenMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonCodeGenMsg) + if !ok { + that2, ok := that.(NonCodeGenMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64ReqPtr != nil && that1.Int64ReqPtr != nil { + if *this.Int64ReqPtr != *that1.Int64ReqPtr { + return false + } + } else if this.Int64ReqPtr != nil { + return false + } else if that1.Int64ReqPtr != nil { + return false + } + if this.Int32OptPtr != nil && that1.Int32OptPtr != nil { + if *this.Int32OptPtr != *that1.Int32OptPtr { + return false + } + } else if this.Int32OptPtr != nil { + return false + } else if that1.Int32OptPtr != nil { + return false + } + if this.Int64Req != that1.Int64Req { + return false + } + if this.Int32Opt != that1.Int32Opt { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *CodeGenMsg) 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 *CodeGenMsg) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64ReqPtr == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64ReqPtr") + } else { + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(*m.Int64ReqPtr)) + } + if m.Int32OptPtr != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(*m.Int32OptPtr)) + } + dAtA[i] = 0x18 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(m.Int64Req)) + dAtA[i] = 0x20 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(m.Int32Opt)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIssue449(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 *CodeGenMsg) Size() (n int) { + var l int + _ = l + if m.Int64ReqPtr != nil { + n += 1 + sovIssue449(uint64(*m.Int64ReqPtr)) + } + if m.Int32OptPtr != nil { + n += 1 + sovIssue449(uint64(*m.Int32OptPtr)) + } + n += 1 + sovIssue449(uint64(m.Int64Req)) + n += 1 + sovIssue449(uint64(m.Int32Opt)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue449(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue449(x uint64) (n int) { + return sovIssue449(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CodeGenMsg) 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 ErrIntOverflowIssue449 + } + 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: CodeGenMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CodeGenMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64ReqPtr", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64ReqPtr = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32OptPtr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32OptPtr = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Req", wireType) + } + m.Int64Req = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64Req |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Opt", wireType) + } + m.Int32Opt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32Opt |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue449(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue449 + } + 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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64ReqPtr") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64Req") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue449(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, ErrIntOverflowIssue449 + } + 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, ErrIntOverflowIssue449 + } + 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, ErrIntOverflowIssue449 + } + 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, ErrInvalidLengthIssue449 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue449 + } + 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 := skipIssue449(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 ( + ErrInvalidLengthIssue449 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue449 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue449.proto", fileDescriptor_issue449_65778f0ef21a6515) } + +var fileDescriptor_issue449_65778f0ef21a6515 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0xb1, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x5a, 0xc4, 0xc8, + 0xc5, 0xe5, 0x9c, 0x9f, 0x92, 0xea, 0x9e, 0x9a, 0xe7, 0x5b, 0x9c, 0x2e, 0xa4, 0xc0, 0xc5, 0xed, + 0x99, 0x57, 0x62, 0x66, 0x12, 0x94, 0x5a, 0x18, 0x50, 0x52, 0x24, 0xc1, 0xa8, 0xc0, 0xa4, 0xc1, + 0x1c, 0x84, 0x2c, 0x04, 0x55, 0x61, 0x6c, 0xe4, 0x5f, 0x50, 0x02, 0x52, 0xc1, 0xa4, 0xc0, 0xa8, + 0xc1, 0x1a, 0x84, 0x2c, 0x24, 0xa4, 0xc0, 0xc5, 0x01, 0xd3, 0x20, 0xc1, 0x0c, 0x32, 0xc0, 0x89, + 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xb8, 0x28, 0x54, 0x05, 0x58, 0x83, 0x04, 0x0b, 0xc8, 0x00, + 0x24, 0x15, 0x60, 0x51, 0x2b, 0x9e, 0x8e, 0x85, 0xf2, 0x8c, 0x13, 0x16, 0xca, 0x33, 0x2e, 0x58, + 0x28, 0xcf, 0xa8, 0xb4, 0x94, 0x91, 0x8b, 0xd7, 0x2f, 0x3f, 0x6f, 0x90, 0xba, 0x93, 0x61, 0xc2, + 0x42, 0x79, 0x86, 0x05, 0x0b, 0xe5, 0x19, 0x9c, 0x58, 0x56, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, + 0x00, 0xff, 0xff, 0xfd, 0x5a, 0xe2, 0x72, 0x9c, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue449/issue449.proto b/deps/github.com/gogo/protobuf/test/issue449/issue449.proto new file mode 100644 index 000000000..689e4c347 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue449/issue449.proto @@ -0,0 +1,55 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package issue449; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; + +message CodeGenMsg { + option (gogoproto.marshaler) = true; + option (gogoproto.unmarshaler) = true; + option (gogoproto.sizer) = true; + required int64 Int64ReqPtr = 1; + optional int32 Int32OptPtr = 2; + required int64 Int64Req = 3 [(gogoproto.nullable) = false]; + optional int32 Int32Opt = 4 [(gogoproto.nullable) = false]; +} + +message NonCodeGenMsg { + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + option (gogoproto.sizer) = false; + required int64 Int64ReqPtr = 1; + optional int32 Int32OptPtr = 2; + required int64 Int64Req = 3 [(gogoproto.nullable) = false]; + optional int32 Int32Opt = 4 [(gogoproto.nullable) = false]; +} diff --git a/deps/github.com/gogo/protobuf/test/issue449/issue449_test.go b/deps/github.com/gogo/protobuf/test/issue449/issue449_test.go new file mode 100644 index 000000000..163ec1519 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue449/issue449_test.go @@ -0,0 +1,170 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package issue449 + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestCodeGenMsgMarshalUnmarshal(t *testing.T) { + src := &CodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + } + buf, err := proto.Marshal(src) + if err != nil { + t.Fatal(err) + } + dst := &CodeGenMsg{} + if err := proto.Unmarshal(buf, dst); err != nil { + t.Fatal(err) + } + if !src.Equal(dst) { + t.Fatal("message is not equals") + } +} + +func TestNonCodeGenMsgMarshalUnmarshal(t *testing.T) { + src := &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + } + buf, err := proto.Marshal(src) + if err != nil { + t.Fatal(err) + } + dst := &NonCodeGenMsg{} + if err := proto.Unmarshal(buf, dst); err != nil { + t.Fatal(err) + } + if !src.Equal(dst) { + t.Fatal("message is not equals") + } +} + +func TestRequiredFieldCheck(t *testing.T) { + tbl := []struct { + In proto.Message + Success bool + }{ + // Generated Code Message + { + // filled message + In: &CodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + }, + Success: true, + }, + { + // filled message (set zero value) + In: &CodeGenMsg{ + Int64ReqPtr: proto.Int64(0), + Int32OptPtr: proto.Int32(0), + Int64Req: 0, + Int32Opt: 0, + }, + Success: true, + }, + { + // non filled message (Int64ReqPtr is not set) + In: &CodeGenMsg{ + Int64Req: 333, + }, + Success: false, + }, + { + // non filled message (Int64Req is not set, but can't inspect) + In: &CodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + }, + Success: true, + }, + + // Non Generated Code Message + { + // filled message + In: &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + }, + Success: true, + }, + { + // filled message (set zero value) + In: &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(0), + Int32OptPtr: proto.Int32(0), + Int64Req: 0, + Int32Opt: 0, + }, + Success: true, + }, + { + // non filled message (Int64ReqPtr is not set) + In: &NonCodeGenMsg{ + Int64Req: 333, + }, + Success: false, + }, + { + // non filled message (Int64Req is not set, but can't inspect) + In: &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + }, + Success: true, + }, + } + for i, v := range tbl { + _, err := proto.Marshal(v.In) + switch v.Success { + case true: + if err != nil { + t.Fatalf("[%d] failed to proto.Marshal(%v), %s", i, v.In, err) + } + case false: + if err == nil { + t.Fatalf("[%d] required field check is not working", i) + } + if _, ok := err.(*proto.RequiredNotSetError); !ok { + t.Fatalf("[%d] failed to proto.Marshal(%v), %s", i, v.In, err) + } + } + } +} diff --git a/deps/github.com/gogo/protobuf/test/issue8/Makefile b/deps/github.com/gogo/protobuf/test/issue8/Makefile new file mode 100644 index 000000000..ecb3e74ea --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue8/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/deps/github.com/gogo/protobuf/test/issue8/proto.pb.go b/deps/github.com/gogo/protobuf/test/issue8/proto.pb.go new file mode 100644 index 000000000..949321819 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue8/proto.pb.go @@ -0,0 +1,375 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Foo struct { + Bar *uint64 `protobuf:"varint,1,req,name=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_77f3bd346fa75d17, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +func (m *Foo) GetBar() uint64 { + if m != nil && m.Bar != nil { + return *m.Bar + } + return 0 +} + +func init() { + proto.RegisterType((*Foo)(nil), "proto.Foo") +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bar != nil && that1.Bar != nil { + if *this.Bar != *that1.Bar { + return false + } + } else if this.Bar != nil { + return false + } else if that1.Bar != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedFoo(r randyProto, easy bool) *Foo { + this := &Foo{} + v1 := uint64(uint64(r.Uint32())) + this.Bar = &v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProto(r, 2) + } + return this +} + +type randyProto interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProto(r randyProto) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringProto(r randyProto) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneProto(r) + } + return string(tmps) +} +func randUnrecognizedProto(r randyProto, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldProto(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldProto(dAtA []byte, r randyProto, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateProto(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateProto(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateProto(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Foo) 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 ErrIntOverflowProto + } + 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: Foo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bar = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + 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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("bar") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_77f3bd346fa75d17) } + +var fileDescriptor_proto_77f3bd346fa75d17 = []byte{ + // 109 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xac, 0x60, 0x4a, 0x4a, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, + 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x3d, 0x3f, 0x3d, 0x5f, 0x1f, 0x2c, 0x9c, 0x54, 0x9a, 0x06, 0xe6, + 0x81, 0x39, 0x60, 0x16, 0x44, 0x97, 0x92, 0x38, 0x17, 0xb3, 0x5b, 0x7e, 0xbe, 0x90, 0x00, 0x17, + 0x73, 0x52, 0x62, 0x91, 0x04, 0xa3, 0x02, 0x93, 0x06, 0x4b, 0x10, 0x88, 0xe9, 0x24, 0xf0, 0xe3, + 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x08, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x54, 0x06, 0x1b, 0x76, 0x6e, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/issue8/proto.proto b/deps/github.com/gogo/protobuf/test/issue8/proto.proto new file mode 100644 index 000000000..2c9bcf46f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue8/proto.proto @@ -0,0 +1,42 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package proto; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message Foo { + required uint64 bar = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/issue8/protopb_test.go b/deps/github.com/gogo/protobuf/test/issue8/protopb_test.go new file mode 100644 index 000000000..772656d8d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/issue8/protopb_test.go @@ -0,0 +1,98 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFooProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFooJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFooProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFooProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go b/deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go new file mode 100644 index 000000000..1e0b08d22 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go @@ -0,0 +1 @@ +package jsonpb_gogo diff --git a/deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go b/deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go new file mode 100644 index 000000000..ec2558773 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go @@ -0,0 +1,36 @@ +package jsonpb_gogo + +import ( + "testing" + + "github.com/gogo/protobuf/jsonpb" +) + +// customFieldMessage implements protobuf.Message but is not a normal generated message type. +type customFieldMessage struct { + someField string //this is not a proto field +} + +func (m *customFieldMessage) Reset() { + m.someField = "hello" +} + +func (m *customFieldMessage) String() string { + return m.someField +} + +func (m *customFieldMessage) ProtoMessage() { +} + +func TestUnmarshalWithJSONPBUnmarshaler(t *testing.T) { + rawJson := `{}` + marshaler := &jsonpb.Marshaler{} + msg := &customFieldMessage{someField: "Ignore me"} + str, err := marshaler.MarshalToString(msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling message: %v", err) + } + if str != rawJson { + t.Errorf("marshaled JSON was incorrect: got %s, wanted %s", str, rawJson) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/Makefile b/deps/github.com/gogo/protobuf/test/mapdefaults/Makefile new file mode 100644 index 000000000..9318da80b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/Makefile @@ -0,0 +1,35 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2017, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogofast + protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. --gogo_out=. map.proto + find combos -type d -not -name combos -exec cp map_test.go.in {}/map_test.go \; + cp unknown_test.go.in ./combos/unmarshaler/unknown_test.go + cp unknown_test.go.in ./combos/both/unknown_test.go diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go new file mode 100644 index 000000000..c0ee6ca37 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go @@ -0,0 +1,1575 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_746b24fd53d0701f, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return m.Size() +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_746b24fd53d0701f, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return m.Size() +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_746b24fd53d0701f, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return m.Size() +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3896 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6c, 0x23, 0xd7, + 0x75, 0xd6, 0xf0, 0x47, 0x22, 0x0f, 0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04, 0x51, 0x7c, 0x3b, 0x01, + 0x4b, 0x13, 0x46, 0x25, 0x09, 0x12, 0xa6, 0xda, 0xc7, 0x8c, 0xc2, 0x5a, 0x5a, 0x26, 0xff, 0x4b, + 0x79, 0x98, 0xb3, 0x55, 0xed, 0xa6, 0xda, 0x45, 0xf9, 0x18, 0x11, 0xf3, 0x47, 0xa9, 0x00, 0xd0, + 0x46, 0x36, 0x32, 0xdb, 0xc8, 0xd4, 0x0e, 0xf3, 0xf1, 0xd5, 0xf8, 0x5a, 0x5a, 0x0e, 0x48, 0xa4, + 0x27, 0x60, 0xd1, 0x1e, 0x1c, 0x18, 0xba, 0xa6, 0x04, 0xd4, 0x60, 0x35, 0xbe, 0x96, 0x94, 0x45, + 0x3a, 0xb0, 0x39, 0x54, 0x7e, 0x14, 0x16, 0x6e, 0x23, 0xf5, 0x66, 0x50, 0x35, 0x43, 0x54, 0x73, + 0x58, 0x1c, 0x50, 0xac, 0x42, 0xb6, 0x8f, 0x5c, 0x57, 0xed, 0x22, 0xc5, 0x3b, 0xb4, 0x51, 0x3e, + 0x41, 0x66, 0xbf, 0x3a, 0x36, 0xfb, 0xd1, 0x99, 0x67, 0x18, 0x6a, 0xef, 0xd0, 0x46, 0x52, 0x05, + 0xd2, 0xc8, 0x1c, 0xf4, 0x29, 0x43, 0xf2, 0x18, 0xff, 0xd5, 0xcc, 0x41, 0x7f, 0x94, 0x25, 0x85, + 0x61, 0x8c, 0x62, 0xce, 0x45, 0xce, 0x2d, 0x5d, 0x43, 0xf9, 0x59, 0x42, 0xf0, 0xe8, 0x18, 0x41, + 0x8b, 0x8e, 0x8f, 0x72, 0x70, 0x9c, 0x54, 0x85, 0x34, 0x7a, 0xc9, 0x43, 0xa6, 0xab, 0x5b, 0x66, + 0x7e, 0x8e, 0x90, 0x3c, 0x32, 0x61, 0x15, 0x91, 0xd1, 0x1e, 0xa5, 0x18, 0xe2, 0xa4, 0xcb, 0x30, + 0x67, 0xd9, 0x9e, 0x6e, 0x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0x15, 0x84, 0x37, 0x8f, 0x0a, 0xc2, 0xf7, 0x8e, 0x0a, 0xc2, + 0x5b, 0x47, 0x05, 0xe1, 0x87, 0x47, 0x85, 0x99, 0x77, 0x8f, 0x0a, 0xc2, 0xfb, 0x47, 0x85, 0x99, + 0xbb, 0x3f, 0x28, 0xcc, 0x1c, 0xcc, 0x12, 0xdf, 0x5e, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x17, 0x07, 0x64, 0xb4, 0xcd, 0x32, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMap(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *MapTest) 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 *MapTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StrStr) > 0 { + for k := range m.StrStr { + dAtA[i] = 0xa + i++ + v := m.StrStr[k] + mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + i = encodeVarintMap(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FakeMap) 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 *FakeMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for _, msg := range m.Entries { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(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 *FakeMapEntry) 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 *FakeMapEntry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if len(m.Other) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Other))) + i += copy(dAtA[i:], m.Other) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MapTest) 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 ErrIntOverflowMap + } + 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: MapTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StrStr == nil { + m.StrStr = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMap + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMap + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StrStr[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + 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 *FakeMap) 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 ErrIntOverflowMap + } + 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: FakeMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, &FakeMapEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + 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 *FakeMapEntry) 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 ErrIntOverflowMap + } + 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: FakeMapEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMapEntry: 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 ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Other = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + 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 skipMap(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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrInvalidLengthMap + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMap + } + 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 := skipMap(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 ( + ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/map.proto", fileDescriptor_map_746b24fd53d0701f) } + +var fileDescriptor_map_746b24fd53d0701f = []byte{ + // 310 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xbf, 0x4f, 0xc2, 0x40, + 0x14, 0xc7, 0xfb, 0x20, 0xd2, 0x78, 0x38, 0x98, 0x46, 0x93, 0xca, 0xf0, 0x42, 0x98, 0x58, 0x6c, + 0x13, 0x59, 0xc4, 0xc1, 0xc1, 0xa8, 0x93, 0x2c, 0xe0, 0x6e, 0xae, 0x78, 0xfc, 0x08, 0x94, 0x6b, + 0xee, 0x5e, 0x4d, 0x98, 0xe4, 0xcf, 0x71, 0x74, 0xf4, 0x4f, 0x60, 0x64, 0x74, 0xa4, 0xe7, 0xe2, + 0xc8, 0xc8, 0x68, 0xb8, 0x62, 0x52, 0x37, 0xb7, 0xf7, 0xf9, 0xde, 0xe7, 0xee, 0x7d, 0x73, 0xec, + 0xb4, 0x2f, 0xe3, 0x48, 0xea, 0x30, 0x92, 0x34, 0x0a, 0x63, 0x9e, 0x04, 0x89, 0x92, 0x24, 0xbd, + 0x6a, 0xcc, 0x93, 0x67, 0x31, 0xe0, 0xe9, 0x94, 0x74, 0xed, 0x7c, 0x38, 0xa6, 0x51, 0x1a, 0x05, + 0x7d, 0x19, 0x87, 0x43, 0x39, 0x94, 0xa1, 0x75, 0xa2, 0x74, 0x60, 0xc9, 0x82, 0x9d, 0xf2, 0xbb, + 0x8d, 0x57, 0xe6, 0x76, 0x78, 0xf2, 0x28, 0x34, 0x79, 0x6d, 0xe6, 0x6a, 0x52, 0x4f, 0x9a, 0x94, + 0x0f, 0xf5, 0x72, 0xb3, 0x7a, 0x51, 0x0f, 0x0a, 0x0f, 0x07, 0x7b, 0x2d, 0xe8, 0x91, 0xea, 0x91, + 0xba, 0x9b, 0x91, 0x9a, 0x77, 0x2b, 0xda, 0x42, 0xad, 0xcd, 0xaa, 0x85, 0xd8, 0x3b, 0x66, 0xe5, + 0x89, 0x98, 0xfb, 0x50, 0x87, 0xe6, 0x61, 0x77, 0x37, 0x7a, 0x27, 0xec, 0xe0, 0x85, 0x4f, 0x53, + 0xe1, 0x97, 0x6c, 0x96, 0xc3, 0x55, 0xe9, 0x12, 0x1a, 0xd7, 0xcc, 0xbd, 0xe7, 0x13, 0xd1, 0xe1, + 0x89, 0xd7, 0x62, 0xae, 0x98, 0x91, 0x1a, 0x0b, 0xbd, 0x2f, 0x70, 0xf6, 0xa7, 0xc0, 0x5e, 0xcb, + 0x37, 0xff, 0x9a, 0x8d, 0x07, 0x76, 0x54, 0x3c, 0xf8, 0xef, 0xee, 0x5d, 0x2a, 0x69, 0x24, 0x94, + 0x5f, 0xce, 0x53, 0x0b, 0x37, 0xb7, 0xcb, 0x0c, 0x9d, 0x55, 0x86, 0xce, 0x67, 0x86, 0xce, 0x3a, + 0x43, 0xd8, 0x64, 0x08, 0xdb, 0x0c, 0x61, 0x61, 0x10, 0xde, 0x0c, 0xc2, 0xbb, 0x41, 0xf8, 0x30, + 0x08, 0x4b, 0x83, 0xb0, 0x32, 0x08, 0x6b, 0x83, 0xf0, 0x6d, 0xd0, 0xd9, 0x18, 0x84, 0xad, 0x41, + 0x67, 0xf1, 0x85, 0x4e, 0x54, 0xb1, 0x7f, 0xdb, 0xfa, 0x09, 0x00, 0x00, 0xff, 0xff, 0x11, 0xc9, + 0x76, 0xfa, 0xb0, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto new file mode 100644 index 000000000..2de9cdd7f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go new file mode 100644 index 000000000..344592310 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go @@ -0,0 +1,554 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/unknown_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/unknown_test.go new file mode 100644 index 000000000..ba5c920e2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/both/unknown_test.go @@ -0,0 +1,79 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalIgnoreUnknownField(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "key", + Value: "value", + Other: "other", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := &MapTest{} + err = proto.Unmarshal(serializedMsg, msg) + + if err != nil { + var pb proto.Message = msg + _, ok := pb.(proto.Unmarshaler) + if !ok { + // non-codegen implementation returns error when extra tags are + // present. + return + } + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr["key"] + if !ok { + t.Fatal("\"key\" not found in StrStr map.") + } + if val != "value" { + t.Fatalf("Unexpected value for \"value\": %s", val) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go new file mode 100644 index 000000000..a71139215 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go @@ -0,0 +1,1080 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_65406068076b05e6, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapTest.Unmarshal(m, b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return m.Size() +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_65406068076b05e6, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMap.Unmarshal(m, b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return m.Size() +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_65406068076b05e6, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMapEntry.Unmarshal(m, b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return m.Size() +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3894 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6c, 0x23, 0xd7, + 0x75, 0xd6, 0xf0, 0x4f, 0xe4, 0x21, 0x45, 0x8d, 0x46, 0xf2, 0x2e, 0x57, 0x8e, 0xb9, 0x5a, 0xda, + 0x8e, 0x65, 0xbb, 0xa1, 0x82, 0x5d, 0xef, 0x7a, 0x97, 0xdb, 0xd8, 0xa5, 0x28, 0xae, 0x42, 0x57, + 0x12, 0x99, 0xa1, 0x14, 0xff, 0x04, 0xc5, 0x60, 0x34, 0x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0x46, 0x66, 0x07, 0x99, 0xda, 0x61, 0x21, 0xbe, 0x12, 0x5f, 0xcd, 0xc8, 0x01, 0x89, 0xf4, + 0x24, 0x2c, 0xd8, 0x83, 0x7d, 0x43, 0xd7, 0x94, 0x80, 0x1a, 0xac, 0xc4, 0x57, 0x93, 0xb2, 0x48, + 0x07, 0x36, 0x86, 0xca, 0x8f, 0xc1, 0xfc, 0x2d, 0xa4, 0xde, 0x08, 0xaa, 0x66, 0x89, 0x6a, 0x1e, + 0x8b, 0x03, 0x8a, 0x35, 0xc8, 0xf5, 0x91, 0xeb, 0xaa, 0x3d, 0xa4, 0x78, 0x87, 0x36, 0x2a, 0x24, + 0xc8, 0xec, 0x57, 0xc6, 0x66, 0x3f, 0x3a, 0xf3, 0x2c, 0x43, 0xed, 0x1e, 0xda, 0x48, 0xaa, 0x42, + 0x06, 0x99, 0x83, 0x3e, 0x65, 0x48, 0x1e, 0xe3, 0xbf, 0xba, 0x39, 0xe8, 0x8f, 0xb2, 0xa4, 0x31, + 0x8c, 0x51, 0xcc, 0xba, 0xc8, 0xb9, 0xa9, 0x6b, 0xa8, 0x90, 0x22, 0x04, 0x8f, 0x8d, 0x11, 0xb4, + 0xe9, 0xf8, 0x28, 0x07, 0xc7, 0x49, 0x35, 0xc8, 0xa0, 0x97, 0x3d, 0x64, 0xba, 0xba, 0x65, 0x16, + 0x66, 0x09, 0xc9, 0xa3, 0x13, 0x56, 0x11, 0x19, 0x9d, 0x51, 0x8a, 0x21, 0x4e, 0xba, 0x04, 0xb3, + 0x96, 0xed, 0xe9, 0x96, 0xe9, 0x16, 0xd2, 0x2b, 0xc2, 0x6a, 0xf6, 0xfc, 0x47, 0x26, 0x06, 0x42, + 0x93, 0xea, 0xc8, 0x5c, 0x59, 0x6a, 0x80, 0xe8, 0x5a, 0x03, 0x47, 0x43, 0x8a, 0x66, 0x75, 0x90, + 0xa2, 0x9b, 0x5d, 0xab, 0x90, 0x21, 0x04, 0x67, 0xc7, 0x27, 0x42, 0x14, 0x6b, 0x56, 0x07, 0x35, + 0xcc, 0xae, 0x25, 0xe7, 0xdd, 0xd0, 0xb3, 0x74, 0x0a, 0x52, 0xee, 0xa1, 0xe9, 0xa9, 0x2f, 0x17, + 0x72, 0x24, 0x42, 0xd8, 0x53, 0xe9, 0x3b, 0x29, 0x98, 0x9f, 0x26, 0xc4, 0xae, 0x42, 0xb2, 0x8b, + 0x67, 0x59, 0x88, 0x9d, 0xc4, 0x07, 0x14, 0x13, 0x76, 0x62, 0xea, 0x27, 0x74, 0x62, 0x15, 0xb2, + 0x26, 0x72, 0x3d, 0xd4, 0xa1, 0x11, 0x11, 0x9f, 0x32, 0xa6, 0x80, 0x82, 0xc6, 0x43, 0x2a, 0xf1, + 0x13, 0x85, 0xd4, 0x0b, 0x30, 0xef, 0x9b, 0xa4, 0x38, 0xaa, 0xd9, 0xe3, 0xb1, 0xb9, 0x16, 0x65, + 0x49, 0xb9, 0xce, 0x71, 0x32, 0x86, 0xc9, 0x79, 0x14, 0x7a, 0x96, 0x36, 0x00, 0x2c, 0x13, 0x59, + 0x5d, 0xa5, 0x83, 0x34, 0xa3, 0x90, 0x3e, 0xc6, 0x4b, 0x4d, 0xac, 0x32, 0xe6, 0x25, 0x8b, 0x4a, + 0x35, 0x43, 0xba, 0x32, 0x0c, 0xb5, 0xd9, 0x63, 0x22, 0x65, 0x9b, 0x6e, 0xb2, 0xb1, 0x68, 0xdb, + 0x83, 0xbc, 0x83, 0x70, 0xdc, 0xa3, 0x0e, 0x9b, 0x59, 0x86, 0x18, 0x51, 0x8e, 0x9c, 0x99, 0xcc, + 0x60, 0x74, 0x62, 0x73, 0x4e, 0xf0, 0x51, 0x7a, 0x18, 0x7c, 0x81, 0x42, 0xc2, 0x0a, 0x48, 0x16, + 0xca, 0x71, 0xe1, 0x8e, 0xda, 0x47, 0xcb, 0xb7, 0x21, 0x1f, 0x76, 0x8f, 0xb4, 0x04, 0x49, 0xd7, + 0x53, 0x1d, 0x8f, 0x44, 0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xb6, 0x65, + 0x0f, 0x0c, 0x5c, 0xb6, 0xa2, 0x29, 0xfe, 0x98, 0x53, 0x70, 0x0c, 0xa3, 0x38, 0x81, 0x5b, 0xff, + 0x84, 0x53, 0xb8, 0x01, 0x7f, 0x3e, 0x0b, 0x59, 0xcb, 0x34, 0x0e, 0x2d, 0x73, 0x1a, 0x23, 0xbe, + 0xc4, 0x18, 0x80, 0x41, 0x30, 0xc1, 0x55, 0xc8, 0x4c, 0xbb, 0x10, 0x5f, 0x7e, 0x87, 0x6f, 0x0f, + 0xbe, 0x02, 0x9b, 0x30, 0xcf, 0x13, 0x94, 0x6e, 0x99, 0x53, 0x50, 0xfc, 0x19, 0xa3, 0xc8, 0x07, + 0x60, 0x6c, 0x1a, 0x1e, 0x72, 0xbd, 0x1e, 0x9a, 0x86, 0xe4, 0x0d, 0x3e, 0x0d, 0x06, 0x61, 0xae, + 0xdc, 0x47, 0xa6, 0x76, 0x30, 0x1d, 0xc3, 0x57, 0xb8, 0x2b, 0x39, 0x06, 0x53, 0xd4, 0x60, 0xae, + 0xaf, 0x3a, 0xee, 0x81, 0x6a, 0x4c, 0xb5, 0x1c, 0x7f, 0xce, 0x38, 0x72, 0x3e, 0x88, 0x79, 0x64, + 0x60, 0x9e, 0x84, 0xe6, 0xab, 0xdc, 0x23, 0x01, 0x18, 0xdb, 0x7a, 0xae, 0x47, 0xae, 0xb4, 0x4e, + 0xc2, 0xf6, 0x17, 0x7c, 0xeb, 0x51, 0xec, 0x76, 0x90, 0xf1, 0x2a, 0x64, 0x5c, 0xfd, 0xf6, 0x54, + 0x34, 0x7f, 0xc9, 0x57, 0x9a, 0x00, 0x30, 0xf8, 0x45, 0x38, 0x33, 0xb1, 0x4c, 0x4c, 0x41, 0xf6, + 0x57, 0x8c, 0xec, 0xd4, 0x84, 0x52, 0xc1, 0x52, 0xc2, 0x49, 0x29, 0xff, 0x9a, 0xa7, 0x04, 0x34, + 0xc2, 0xd5, 0xc2, 0x67, 0x05, 0x57, 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x20, 0x80, 0xc2, 0xdb, 0x68, 0xb4, 0x39, 0x88, 0x66, 0xfa, 0x7d, 0xbe, 0x8d, 0x46, + 0x7a, 0x03, 0xbc, 0x9a, 0x24, 0x9f, 0x46, 0x53, 0xfc, 0x01, 0x5f, 0x4d, 0xa2, 0x8f, 0xcd, 0x18, + 0xad, 0xb6, 0xd1, 0x1c, 0x7f, 0xc8, 0xcd, 0x18, 0x29, 0xb6, 0x95, 0x16, 0x48, 0xe3, 0x95, 0x36, + 0x9a, 0xef, 0xf3, 0x8c, 0x6f, 0x61, 0xac, 0xd0, 0x56, 0x9e, 0x87, 0x53, 0x93, 0xab, 0x6c, 0x34, + 0xeb, 0x17, 0xde, 0x1b, 0x39, 0x17, 0x05, 0x8b, 0x6c, 0x65, 0x77, 0x98, 0xae, 0x83, 0x15, 0x36, + 0x9a, 0xf6, 0xd5, 0xf7, 0xc2, 0x19, 0x3b, 0x58, 0x60, 0x2b, 0x55, 0x80, 0x61, 0x71, 0x8b, 0xe6, + 0x7a, 0x8d, 0x71, 0x05, 0x40, 0x78, 0x6b, 0xb0, 0xda, 0x16, 0x8d, 0xff, 0x22, 0xdf, 0x1a, 0x0c, + 0x81, 0xb7, 0x06, 0x2f, 0x6b, 0xd1, 0xe8, 0xd7, 0xf9, 0xd6, 0xe0, 0x10, 0x1c, 0xd9, 0x81, 0xca, + 0x11, 0xcd, 0xf0, 0x25, 0x1e, 0xd9, 0x01, 0x54, 0xe5, 0x2a, 0xa4, 0xcd, 0x81, 0x61, 0xe0, 0x00, + 0x95, 0xee, 0xff, 0x03, 0xb1, 0xc2, 0x7f, 0xdc, 0x63, 0x16, 0x70, 0x40, 0xe5, 0x22, 0x24, 0x51, + 0x7f, 0x1f, 0x75, 0xa2, 0x90, 0xff, 0x79, 0x8f, 0x27, 0x25, 0xac, 0x5d, 0x79, 0x16, 0x80, 0x1e, + 0xed, 0xc9, 0x67, 0xab, 0x08, 0xec, 0x7f, 0xdd, 0x63, 0x3f, 0xdd, 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} + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMap(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *MapTest) 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 *MapTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StrStr) > 0 { + for k := range m.StrStr { + dAtA[i] = 0xa + i++ + v := m.StrStr[k] + mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + i = encodeVarintMap(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FakeMap) 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 *FakeMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for _, msg := range m.Entries { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(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 *FakeMapEntry) 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 *FakeMapEntry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if len(m.Other) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Other))) + i += copy(dAtA[i:], m.Other) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/marshaler/map.proto", fileDescriptor_map_65406068076b05e6) } + +var fileDescriptor_map_65406068076b05e6 = []byte{ + // 315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x3a, 0x31, + 0x18, 0xc7, 0xfb, 0x40, 0x7e, 0x5c, 0x7e, 0xc5, 0xc1, 0x5c, 0x1c, 0x4e, 0x86, 0x27, 0x84, 0x89, + 0xc5, 0xbb, 0x44, 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, 0xc7, 0x17, 0x5a, 0x4e, 0xb9, 0x2a, 0x0a, + 0x9c, 0xfe, 0x2a, 0x50, 0x68, 0xf9, 0xe6, 0x1f, 0xb3, 0x75, 0x4f, 0x8f, 0xca, 0x07, 0x7f, 0xdd, + 0x7d, 0x48, 0x85, 0x9e, 0x70, 0x19, 0x54, 0xf3, 0xd4, 0xc1, 0xf5, 0xcd, 0xda, 0x20, 0xd9, 0x18, + 0x24, 0x1f, 0x06, 0xc9, 0xd6, 0x20, 0xec, 0x0c, 0xc2, 0xde, 0x20, 0xac, 0x2c, 0xc2, 0xab, 0x45, + 0x78, 0xb3, 0x08, 0xef, 0x16, 0x61, 0x6d, 0x11, 0x36, 0x16, 0xc9, 0xd6, 0x22, 0x7c, 0x59, 0x24, + 0x3b, 0x8b, 0xb0, 0xb7, 0x48, 0x56, 0x9f, 0x48, 0xe2, 0x9a, 0xfb, 0xdb, 0xce, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xde, 0x50, 0x18, 0x62, 0xb5, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto new file mode 100644 index 000000000..fe9912313 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go new file mode 100644 index 000000000..230919f63 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go @@ -0,0 +1,554 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go new file mode 100644 index 000000000..c284f96fe --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go @@ -0,0 +1,934 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_f8afe0c559a577e0, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapTest.Unmarshal(m, b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return xxx_messageInfo_MapTest.Size(m) +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_f8afe0c559a577e0, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMap.Unmarshal(m, b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return xxx_messageInfo_FakeMap.Size(m) +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_f8afe0c559a577e0, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMapEntry.Unmarshal(m, b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return xxx_messageInfo_FakeMapEntry.Size(m) +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3896 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6c, 0x23, 0xd7, + 0x75, 0x16, 0xff, 0x24, 0xf2, 0x90, 0xa2, 0x46, 0x57, 0xf2, 0x2e, 0x57, 0x8e, 0xb9, 0x5a, 0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9, 0xf6, 0x08, 0x63, 0x6c, 0x25, 0x23, 0xd3, 0xff, 0x51, + 0x01, 0x66, 0x6c, 0x55, 0xbb, 0xa1, 0x76, 0x71, 0x21, 0x4e, 0xc5, 0xe2, 0x11, 0x15, 0x01, 0xda, + 0xd8, 0xc6, 0x66, 0x1b, 0x9b, 0xda, 0x61, 0x21, 0xb1, 0x9c, 0x58, 0xc9, 0xc8, 0x01, 0x09, 0x7a, + 0x12, 0xe6, 0xed, 0xfe, 0xbe, 0xa1, 0x6b, 0x4a, 0x40, 0x0d, 0x96, 0x13, 0x2b, 0x29, 0x59, 0x62, + 0x03, 0x1b, 0x03, 0xe5, 0xc7, 0x60, 0xee, 0x16, 0x56, 0x6f, 0x04, 0x55, 0xb3, 0x54, 0x35, 0x4f, + 0xc4, 0x01, 0xc5, 0x2a, 0xe4, 0x7a, 0xd8, 0x75, 0xd5, 0x2e, 0x56, 0xbc, 0x43, 0x1b, 0x17, 0x92, + 0x74, 0xf6, 0xcb, 0x23, 0xb3, 0x1f, 0x9e, 0x79, 0x96, 0xa3, 0x76, 0x0f, 0x6d, 0x8c, 0x2a, 0x90, + 0xc1, 0x66, 0xbf, 0xc7, 0x18, 0x52, 0xc7, 0xf8, 0xaf, 0x66, 0xf6, 0x7b, 0xc3, 0x2c, 0x69, 0x02, + 0xe3, 0x14, 0x33, 0x2e, 0x76, 0x6e, 0xea, 0x1a, 0x2e, 0x4c, 0x53, 0x82, 0xc7, 0x46, 0x08, 0x5a, + 0x6c, 0x7c, 0x98, 0x43, 0xe0, 0x50, 0x15, 0x32, 0xf8, 0x65, 0x0f, 0x9b, 0xae, 0x6e, 0x99, 0x85, + 0x19, 0x4a, 0xf2, 0xe8, 0x98, 0x55, 0xc4, 0x46, 0x7b, 0x98, 0x62, 0x80, 0x43, 0x97, 0x60, 0xc6, + 0xb2, 0x3d, 0xdd, 0x32, 0xdd, 0x42, 0x7a, 0x39, 0xb6, 0x92, 0x3d, 0xff, 0xb1, 0xb1, 0x81, 0xd0, + 0x60, 0x3a, 0xb2, 0x50, 0x46, 0x75, 0x90, 0x5c, 0xab, 0xef, 0x68, 0x58, 0xd1, 0xac, 0x36, 0x56, + 0x74, 0xb3, 0x63, 0x15, 0x32, 0x94, 0xe0, 0xec, 0xe8, 0x44, 0xa8, 0x62, 0xd5, 0x6a, 0xe3, 0xba, + 0xd9, 0xb1, 0xe4, 0xbc, 0x1b, 0x7a, 0x46, 0xa7, 0x60, 0xda, 0x3d, 0x34, 0x3d, 0xf5, 0xe5, 0x42, + 0x8e, 0x46, 0x08, 0x7f, 0x2a, 0x7d, 0x67, 0x1a, 0xe6, 0x26, 0x09, 0xb1, 0xab, 0x90, 0xea, 0x90, + 0x59, 0x16, 0xe2, 0x27, 0xf1, 0x01, 0xc3, 0x84, 0x9d, 0x38, 0xfd, 0x63, 0x3a, 0xb1, 0x02, 0x59, + 0x13, 0xbb, 0x1e, 0x6e, 0xb3, 0x88, 0x48, 0x4c, 0x18, 0x53, 0xc0, 0x40, 0xa3, 0x21, 0x95, 0xfc, + 0xb1, 0x42, 0xea, 0x05, 0x98, 0xf3, 0x4d, 0x52, 0x1c, 0xd5, 0xec, 0x8a, 0xd8, 0x5c, 0x8b, 0xb2, + 0x64, 0xb5, 0x26, 0x70, 0x32, 0x81, 0xc9, 0x79, 0x1c, 0x7a, 0x46, 0x1b, 0x00, 0x96, 0x89, 0xad, + 0x8e, 0xd2, 0xc6, 0x9a, 0x51, 0x48, 0x1f, 0xe3, 0xa5, 0x06, 0x51, 0x19, 0xf1, 0x92, 0xc5, 0xa4, + 0x9a, 0x81, 0xae, 0x0c, 0x42, 0x6d, 0xe6, 0x98, 0x48, 0xd9, 0x66, 0x9b, 0x6c, 0x24, 0xda, 0xf6, + 0x20, 0xef, 0x60, 0x12, 0xf7, 0xb8, 0xcd, 0x67, 0x96, 0xa1, 0x46, 0xac, 0x46, 0xce, 0x4c, 0xe6, + 0x30, 0x36, 0xb1, 0x59, 0x27, 0xf8, 0x88, 0x1e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 0x2e, 0x1e, 0xca, 0x74, 0x57, + 0x87, 0x3d, 0x78, 0xee, 0xf8, 0x45, 0x18, 0x59, 0xeb, 0x37, 0x62, 0x70, 0x6a, 0x7c, 0xa7, 0x38, + 0xd6, 0x86, 0x67, 0x60, 0xba, 0x87, 0xbd, 0x03, 0x4b, 0x74, 0x4b, 0x1f, 0x1f, 0x53, 0x83, 0xc9, + 0xf0, 0xf0, 0x62, 0x73, 0x54, 0xb0, 0x88, 0x27, 0x8e, 0x6b, 0xf7, 0x98, 0x35, 0x23, 0x96, 0x7e, + 0x21, 0x0e, 0x0f, 0x8c, 0x25, 0x1f, 0x6b, 0xe8, 0x43, 0x00, 0xba, 0x69, 0xf7, 0x3d, 0xd6, 0x11, + 0xb1, 0x04, 0x9b, 0xa1, 0x12, 0x9a, 0xbc, 0x48, 0xf2, 0xec, 0x7b, 0xfe, 0x78, 0x82, 0x8e, 0x03, + 0x13, 0x51, 0x85, 0xcb, 0x03, 0x43, 0x93, 0xd4, 0xd0, 0xe2, 0x31, 0x33, 0x1d, 0x09, 0xcc, 0x4f, + 0x82, 0xa4, 0x19, 0x3a, 0x36, 0x3d, 0xc5, 0xf5, 0x1c, 0xac, 0xf6, 0x74, 0xb3, 0x4b, 0x2b, 0x48, + 0xba, 0x9c, 0xea, 0xa8, 0x86, 0x8b, 0xe5, 0x39, 0x36, 0xdc, 0x12, 0xa3, 0x04, 0x41, 0x03, 0xc8, + 0x09, 0x20, 0xa6, 0x43, 0x08, 0x36, 0xec, 0x23, 0x4a, 0x6f, 0xa6, 0x21, 0x1b, 0xe8, 0xab, 0xd1, + 0x39, 0xc8, 0x5d, 0x57, 0x6f, 0xaa, 0x8a, 0x38, 0x2b, 0x31, 0x4f, 0x64, 0x89, 0xac, 0xc9, 0xcf, + 0x4b, 0x9f, 0x84, 0x45, 0xaa, 0x62, 0xf5, 0x3d, 0xec, 0x28, 0x9a, 0xa1, 0xba, 0x2e, 0x75, 0x5a, + 0x9a, 0xaa, 0x22, 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, 0x47, 0xd5, 0xf0, 0x04, 0x14, 0x5f, 0xe6, 0x14, 0x33, 0x44, 0x9f, 0x40, 0x2b, 0x90, + 0xeb, 0x5a, 0xbc, 0x32, 0x45, 0xc3, 0x5f, 0xe7, 0xf0, 0xac, 0xc0, 0x70, 0x0a, 0xdb, 0xb2, 0xfb, + 0x06, 0x29, 0x5b, 0xd1, 0x14, 0x7f, 0x28, 0x28, 0x04, 0x86, 0x53, 0x9c, 0xc0, 0xad, 0x7f, 0x24, + 0x28, 0xdc, 0x80, 0x3f, 0x9f, 0x85, 0xac, 0x65, 0x1a, 0x87, 0x96, 0x39, 0x89, 0x11, 0x5f, 0xe1, + 0x0c, 0xc0, 0x21, 0x84, 0xe0, 0x2a, 0x64, 0x26, 0x5d, 0x88, 0xaf, 0xbe, 0x2b, 0xb6, 0x87, 0x58, + 0x81, 0x4d, 0x98, 0x13, 0x09, 0x4a, 0xb7, 0xcc, 0x09, 0x28, 0xfe, 0x84, 0x53, 0xe4, 0x03, 0x30, + 0x3e, 0x0d, 0x0f, 0xbb, 0x5e, 0x17, 0x4f, 0x42, 0xf2, 0x86, 0x98, 0x06, 0x87, 0x70, 0x57, 0xee, + 0x63, 0x53, 0x3b, 0x98, 0x8c, 0xe1, 0x6b, 0xc2, 0x95, 0x02, 0x43, 0x28, 0xaa, 0x30, 0xdb, 0x53, + 0x1d, 0xf7, 0x40, 0x35, 0x26, 0x5a, 0x8e, 0x3f, 0xe5, 0x1c, 0x39, 0x1f, 0xc4, 0x3d, 0xd2, 0x37, + 0x4f, 0x42, 0xf3, 0x75, 0xe1, 0x91, 0x00, 0x8c, 0x6f, 0x3d, 0xd7, 0xa3, 0x57, 0x5a, 0x27, 0x61, + 0xfb, 0x33, 0xb1, 0xf5, 0x18, 0x76, 0x3b, 0xc8, 0x78, 0x15, 0x32, 0xae, 0x7e, 0x7b, 0x22, 0x9a, + 0x3f, 0x17, 0x2b, 0x4d, 0x01, 0x04, 0xfc, 0x22, 0x9c, 0x19, 0x5b, 0x26, 0x26, 0x20, 0xfb, 0x0b, + 0x4e, 0x76, 0x6a, 0x4c, 0xa9, 0xe0, 0x29, 0xe1, 0xa4, 0x94, 0x7f, 0x29, 0x52, 0x02, 0x1e, 0xe2, + 0x6a, 0x92, 0xb3, 0x82, 0xab, 0x76, 0x4e, 0xe6, 0xb5, 0xbf, 0x12, 0x5e, 0x63, 0xd8, 0x90, 0xd7, + 0x76, 0xe1, 0x14, 0x67, 0x3c, 0xd9, 0xba, 0x7e, 0x43, 0x24, 0x56, 0x86, 0xde, 0x0b, 0xaf, 0xee, + 0xe7, 0x60, 0xc9, 0x77, 0xa7, 0x68, 0x4a, 0x5d, 0xa5, 0xa7, 0xda, 0x13, 0x30, 0x7f, 0x93, 0x33, + 0x8b, 0x8c, 0xef, 0x77, 0xb5, 0xee, 0xb6, 0x6a, 0x13, 0xf2, 0x17, 0xa0, 0x20, 0xc8, 0xfb, 0xa6, + 0x83, 0x35, 0xab, 0x6b, 0xea, 0xb7, 0x71, 0x7b, 0x02, 0xea, 0xbf, 0x1e, 0x5a, 0xaa, 0xbd, 0x00, + 0x9c, 0x30, 0xd7, 0x41, 0xf2, 0x7b, 0x15, 0x45, 0xef, 0xd9, 0x96, 0xe3, 0x45, 0x30, 0xbe, 0x29, + 0x56, 0xca, 0xc7, 0xd5, 0x29, 0xac, 0x5c, 0x83, 0x3c, 0x7d, 0x9c, 0x34, 0x24, 0xff, 0x86, 0x13, + 0xcd, 0x0e, 0x50, 0x3c, 0x71, 0x68, 0x56, 0xcf, 0x56, 0x9d, 0x49, 0xf2, 0xdf, 0xdf, 0x8a, 0xc4, + 0xc1, 0x21, 0x3c, 0x71, 0x78, 0x87, 0x36, 0x26, 0xd5, 0x7e, 0x02, 0x86, 0x6f, 0x89, 0xc4, 0x21, + 0x30, 0x9c, 0x42, 0x34, 0x0c, 0x13, 0x50, 0xfc, 0x9d, 0xa0, 0x10, 0x18, 0x42, 0xf1, 0x99, 0x41, + 0xa1, 0x75, 0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0xbd, 0xa3, 0x62, 0xec, 0x83, 0xa3, 0xe2, 0xd4, + 0x9d, 0x1f, 0x14, 0xa7, 0xf6, 0xa7, 0xa9, 0x6f, 0x2f, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xb5, 0x10, 0xa6, 0x90, 0xd0, 0x32, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMap(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/neither/map.proto", fileDescriptor_map_f8afe0c559a577e0) } + +var fileDescriptor_map_f8afe0c559a577e0 = []byte{ + // 313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x32, 0x41, + 0x10, 0x87, 0x77, 0x20, 0x2f, 0x97, 0x77, 0xb1, 0x30, 0x17, 0x8b, 0x93, 0x62, 0x42, 0xa8, 0x68, + 0xbc, 0x4b, 0xa4, 0x11, 0x0b, 0x0b, 0xa3, 0x56, 0xd2, 0x80, 0xbd, 0xd9, 0xc3, 0xe5, 0x4f, 0xe0, + 0xd8, 0xcb, 0xee, 0x9e, 0x09, 0x95, 0x7c, 0x1c, 0x4b, 0x4b, 0x3f, 0x02, 0x25, 0xa5, 0x25, 0xb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, 0xa0, 0x9a, 0xa7, 0x0e, 0xae, 0x6f, 0xd6, 0x06, 0xc9, 0xc6, 0x20, 0xf9, + 0x30, 0x48, 0xb6, 0x06, 0x61, 0x67, 0x10, 0xf6, 0x06, 0x61, 0x65, 0x11, 0x5e, 0x2d, 0xc2, 0x9b, + 0x45, 0x78, 0xb7, 0x08, 0x6b, 0x8b, 0x64, 0x63, 0x91, 0x6c, 0x2d, 0xc2, 0x97, 0x45, 0xb2, 0xb3, + 0x08, 0x7b, 0x8b, 0x64, 0xf5, 0x89, 0x24, 0xae, 0xb9, 0xdb, 0x76, 0xbe, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x9d, 0x34, 0x83, 0xd1, 0xb3, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto new file mode 100644 index 000000000..43d5c0dab --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go new file mode 100644 index 000000000..fe46e3468 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go @@ -0,0 +1,470 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go new file mode 100644 index 000000000..6dff48d08 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go @@ -0,0 +1,1429 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_c5bc2daa9ca30987, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return xxx_messageInfo_MapTest.Size(m) +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_c5bc2daa9ca30987, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return xxx_messageInfo_FakeMap.Size(m) +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_c5bc2daa9ca30987, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return xxx_messageInfo_FakeMapEntry.Size(m) +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3895 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6c, 0x23, 0xd7, + 0x75, 0xd6, 0xf0, 0x4f, 0xe4, 0x21, 0x45, 0x8d, 0x46, 0xf2, 0x2e, 0x57, 0xb6, 0xb9, 0x5a, 0xda, + 0x8e, 0x65, 0xbb, 0xa1, 0x82, 0x5d, 0xef, 0x7a, 0x97, 0xdb, 0xd8, 0xa5, 0x28, 0xae, 0x42, 0x57, + 0x12, 0x99, 0xa1, 0x14, 0xff, 0x04, 0xc5, 0x60, 0x34, 0xbc, 0xa4, 0x66, 0x77, 0x38, 0x33, 0x99, + 0x19, 0xee, 0x5a, 0x8b, 0x02, 0xdd, 0xc2, 0xfd, 0x41, 0x50, 0xf4, 0xbf, 0x40, 0x13, 0xd7, 0x71, + 0x9b, 0x02, 0xa9, 0xd3, 0xf4, 0x2f, 0x69, 0xda, 0xfc, 0xf4, 0xa9, 0x2f, 0x69, 0xfd, 0x54, 0x24, + 0x6f, 0x7d, 0xe8, 0x83, 0x57, 0x31, 0xd0, 0xb4, 0x75, 0x1b, 0xb7, 0xf5, 0x83, 0x01, 0xbf, 0x04, + 0xf7, 0x6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0xd6, + 0x44, 0xae, 0x87, 0x3a, 0x34, 0x22, 0xe2, 0x53, 0xc6, 0x14, 0x50, 0xd0, 0x78, 0x48, 0x25, 0x7e, + 0xaa, 0x90, 0x7a, 0x1e, 0xe6, 0x7d, 0x93, 0x14, 0x47, 0x35, 0x7b, 0x3c, 0x36, 0xd7, 0xa2, 0x2c, + 0x29, 0xd7, 0x39, 0x4e, 0xc6, 0x30, 0x39, 0x8f, 0x42, 0xcf, 0xd2, 0x06, 0x80, 0x65, 0x22, 0xab, + 0xab, 0x74, 0x90, 0x66, 0x14, 0xd2, 0xc7, 0x78, 0xa9, 0x89, 0x55, 0xc6, 0xbc, 0x64, 0x51, 0xa9, + 0x66, 0x48, 0x57, 0x86, 0xa1, 0x36, 0x7b, 0x4c, 0xa4, 0x6c, 0xd3, 0x4d, 0x36, 0x16, 0x6d, 0x7b, + 0x90, 0x77, 0x10, 0x8e, 0x7b, 0xd4, 0x61, 0x33, 0xcb, 0x10, 0x23, 0xca, 0x91, 0x33, 0x93, 0x19, + 0x8c, 0x4e, 0x6c, 0xce, 0x09, 0x3e, 0x4a, 0x0f, 0x81, 0x2f, 0x50, 0x48, 0x58, 0x01, 0xc9, 0x42, + 0x39, 0x2e, 0xdc, 0x51, 0xfb, 0x68, 0xf9, 0x36, 0xe4, 0xc3, 0xee, 0x91, 0x96, 0x20, 0xe9, 0x7a, + 0xaa, 0xe3, 0x91, 0x28, 0x4c, 0xca, 0xf4, 0x41, 0x12, 0x21, 0x8e, 0xcc, 0x0e, 0xc9, 0x72, 0x49, + 0x19, 0xff, 0x2b, 0xfd, 0xdc, 0x70, 0xc2, 0x71, 0x32, 0xe1, 0x8f, 0x8d, 0xaf, 0x68, 0x88, 0x79, + 0x74, 0xde, 0xcb, 0x4f, 0xc1, 0x5c, 0x68, 0x02, 0xd3, 0xbe, 0xba, 0xf4, 0x8b, 0x70, 0xdf, 0x44, + 0x6a, 0xe9, 0x79, 0x58, 0x1a, 0x98, 0xba, 0xe9, 0x21, 0xc7, 0x76, 0x10, 0x8e, 0x58, 0xfa, 0xaa, + 0xc2, 0xbf, 0xcf, 0x1e, 0x13, 0x73, 0x7b, 0x41, 0x6d, 0xca, 0x22, 0x2f, 0x0e, 0xc6, 0x85, 0x8f, + 0x67, 0xd2, 0x3f, 0x9a, 0x15, 0xef, 0xdc, 0xb9, 0x73, 0x27, 0x56, 0xfa, 0x42, 0x0a, 0x96, 0x26, + 0xed, 0x99, 0x89, 0xdb, 0xf7, 0x14, 0xa4, 0xcc, 0x41, 0x7f, 0x1f, 0x39, 0xc4, 0x49, 0x49, 0x99, + 0x3d, 0x49, 0x55, 0x48, 0x1a, 0xea, 0x3e, 0x32, 0x0a, 0x89, 0x15, 0x61, 0x35, 0x7f, 0xfe, 0x89, + 0xa9, 0x76, 0x65, 0x79, 0x0b, 0x43, 0x64, 0x8a, 0x94, 0x9e, 0x86, 0x04, 0x4b, 0xd1, 0x98, 0xe1, + 0xf1, 0xe9, 0x18, 0xf0, 0x5e, 0x92, 0x09, 0x4e, 0xba, 0x1f, 0x32, 0xf8, 0x2f, 0x8d, 0x8d, 0x14, + 0xb1, 0x39, 0x8d, 0x05, 0x38, 0x2e, 0xa4, 0x65, 0x48, 0x93, 0x6d, 0xd2, 0x41, 0xbc, 0xb4, 0xf9, + 0xcf, 0x38, 0xb0, 0x3a, 0xa8, 0xab, 0x0e, 0x0c, 0x4f, 0xb9, 0xa9, 0x1a, 0x03, 0x44, 0x02, 0x3e, + 0x23, 0xe7, 0x98, 0xf0, 0x33, 0x58, 0x26, 0x9d, 0x85, 0x2c, 0xdd, 0x55, 0xba, 0xd9, 0x41, 0x2f, + 0x91, 0xec, 0x99, 0x94, 0xe9, 0x46, 0x6b, 0x60, 0x09, 0x7e, 0xfd, 0x75, 0xd7, 0x32, 0x79, 0x68, + 0x92, 0x57, 0x60, 0x01, 0x79, 0xfd, 0x53, 0xa3, 0x89, 0xfb, 0xc1, 0xc9, 0xd3, 0x1b, 0x8d, 0xa9, + 0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41, + 0x4b, 0xa2, 0x2f, 0xbc, 0x0a, 0x3f, 0x78, 0x99, 0x6e, 0xc7, 0x45, 0x9f, 0x20, 0x60, 0x53, 0x60, + 0x15, 0x7b, 0xc8, 0xf3, 0x90, 0xe3, 0x2a, 0xaa, 0x31, 0xc9, 0xbc, 0xc0, 0x8d, 0x41, 0xe1, 0x8b, + 0x6f, 0x87, 0x57, 0x71, 0x93, 0x22, 0xab, 0x86, 0x51, 0xd9, 0x83, 0xd3, 0x13, 0xa2, 0x62, 0x0a, + 0xce, 0x57, 0x18, 0xe7, 0xd2, 0x58, 0x64, 0x60, 0xda, 0x16, 0x70, 0xb9, 0xbf, 0x96, 0x53, 0x70, + 0xfe, 0x11, 0xe3, 0x94, 0x18, 0x96, 0x2f, 0x29, 0x66, 0x7c, 0x16, 0x16, 0x6e, 0x22, 0x67, 0xdf, + 0x72, 0xd9, 0x2d, 0xcd, 0x14, 0x74, 0xaf, 0x32, 0xba, 0x79, 0x06, 0x24, 0xd7, 0x36, 0x98, 0xeb, + 0x0a, 0xa4, 0xbb, 0xaa, 0x86, 0xa6, 0xa0, 0xf8, 0x12, 0xa3, 0x98, 0xc5, 0xfa, 0x18, 0x5a, 0x85, + 0x5c, 0xcf, 0x62, 0x95, 0x29, 0x1a, 0xfe, 0x1a, 0x83, 0x67, 0x39, 0x86, 0x51, 0xd8, 0x96, 0x3d, + 0x30, 0x70, 0xd9, 0x8a, 0xa6, 0xf8, 0x63, 0x4e, 0xc1, 0x31, 0x8c, 0xe2, 0x04, 0x6e, 0xfd, 0x13, + 0x4e, 0xe1, 0x06, 0xfc, 0xf9, 0x0c, 0x64, 0x2d, 0xd3, 0x38, 0xb4, 0xcc, 0x69, 0x8c, 0xf8, 0x32, + 0x63, 0x00, 0x06, 0xc1, 0x04, 0x57, 0x21, 0x33, 0xed, 0x42, 0x7c, 0xe5, 0x6d, 0xbe, 0x3d, 0xf8, + 0x0a, 0x6c, 0xc2, 0x3c, 0x4f, 0x50, 0xba, 0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05, 0x4e, 0x3e, 0x30, + 0x1d, 0xa4, 0x59, 0x3d, 0x53, 0xbf, 0x8d, 0x3a, 0x53, 0x50, 0xff, 0xed, 0xc8, 0x52, 0xed, 0x05, + 0xe0, 0x98, 0xb9, 0x01, 0xa2, 0xdf, 0xab, 0x28, 0x7a, 0xdf, 0xb6, 0x1c, 0x2f, 0x82, 0xf1, 0x9b, + 0x7c, 0xa5, 0x7c, 0x5c, 0x83, 0xc0, 0x2a, 0x75, 0xc8, 0x93, 0xc7, 0x69, 0x43, 0xf2, 0xef, 0x18, + 0xd1, 0xdc, 0x10, 0xc5, 0x12, 0x87, 0x66, 0xf5, 0x6d, 0xd5, 0x99, 0x26, 0xff, 0xfd, 0x3d, 0x4f, + 0x1c, 0x0c, 0xc2, 0x12, 0x87, 0x77, 0x68, 0x23, 0x5c, 0xed, 0xa7, 0x60, 0xf8, 0x16, 0x4f, 0x1c, + 0x1c, 0xc3, 0x28, 0x78, 0xc3, 0x30, 0x05, 0xc5, 0xb7, 0x39, 0x05, 0xc7, 0x60, 0x8a, 0x4f, 0x0f, + 0x0b, 0xad, 0x83, 0x7a, 0xba, 0xeb, 0x39, 0xb4, 0x15, 0xbe, 0x37, 0xd5, 0x77, 0xde, 0x0e, 0x37, + 0x61, 0x72, 0x00, 0x8a, 0x33, 0x11, 0xbb, 0x42, 0x25, 0x27, 0xa5, 0x68, 0xc3, 0xbe, 0xcb, 0x33, + 0x51, 0x00, 0x46, 0xf7, 0xe7, 0xfc, 0x48, 0xaf, 0x22, 0x45, 0xfd, 0x10, 0xa6, 0xf0, 0xcb, 0xef, + 0x32, 0xae, 0x70, 0xab, 0x52, 0xd9, 0xc2, 0x01, 0x14, 0x6e, 0x28, 0xa2, 0xc9, 0x5e, 0x7e, 0xd7, + 0x8f, 0xa1, 0x50, 0x3f, 0x51, 0xb9, 0x06, 0x73, 0xa1, 0x66, 0x22, 0x9a, 0xea, 0x57, 0x18, 0x55, + 0x2e, 0xd8, 0x4b, 0x54, 0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d, 0xae, 0xb2, 0xd1, 0xac, + 0x5f, 0x7c, 0x77, 0xe4, 0x5c, 0x14, 0x2c, 0xb2, 0x95, 0xdd, 0x61, 0xba, 0x0e, 0x56, 0xd8, 0x68, + 0xda, 0x57, 0xde, 0x0d, 0x67, 0xec, 0x60, 0x81, 0xad, 0x54, 0x01, 0x86, 0xc5, 0x2d, 0x9a, 0xeb, + 0x55, 0xc6, 0x15, 0x00, 0xe1, 0xad, 0xc1, 0x6a, 0x5b, 0x34, 0xfe, 0x4b, 0x7c, 0x6b, 0x30, 0x04, + 0xde, 0x1a, 0xbc, 0xac, 0x45, 0xa3, 0x5f, 0xe3, 0x5b, 0x83, 0x43, 0x70, 0x64, 0x07, 0x2a, 0x47, + 0x34, 0xc3, 0x97, 0x79, 0x64, 0x07, 0x50, 0x95, 0xab, 0x90, 0x36, 0x07, 0x86, 0x81, 0x03, 0x54, + 0xba, 0xf7, 0x0f, 0xc4, 0x0a, 0xff, 0xf1, 0x3e, 0xb3, 0x80, 0x03, 0x2a, 0x17, 0x21, 0x89, 0xfa, + 0xfb, 0xa8, 0x13, 0x85, 0xfc, 0xcf, 0xf7, 0x79, 0x52, 0xc2, 0xda, 0x95, 0x67, 0x00, 0xe8, 0xd1, + 0x9e, 0x7c, 0xb6, 0x8a, 0xc0, 0xfe, 0xd7, 0xfb, 0xec, 0xa7, 0x1b, 0x43, 0xc8, 0x90, 0x80, 0xfe, + 0x10, 0xe4, 0xde, 0x04, 0x6f, 0x87, 0x09, 0xc8, 0xac, 0xaf, 0xc0, 0xec, 0x75, 0xd7, 0x32, 0x3d, + 0xb5, 0x17, 0x85, 0xfe, 0x6f, 0x86, 0xe6, 0xfa, 0xd8, 0x61, 0x7d, 0xcb, 0x41, 0x9e, 0xda, 0x73, + 0xa3, 0xb0, 0xff, 0xc3, 0xb0, 0x3e, 0x00, 0x83, 0x35, 0xd5, 0xf5, 0xa6, 0x99, 0xf7, 0x8f, 0x39, + 0x98, 0x03, 0xb0, 0xd1,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x0b, 0x30, 0x8b, 0x4c, 0xcf, 0xd1, 0x91, 0xcb, + 0x0c, 0x38, 0x13, 0x32, 0x80, 0xa9, 0xd1, 0x37, 0x73, 0xcd, 0xd2, 0x16, 0xe4, 0x82, 0x03, 0xd3, + 0xbe, 0x1b, 0x4b, 0x2d, 0xef, 0x80, 0xfd, 0x36, 0x37, 0x23, 0xd3, 0x87, 0xf5, 0x8d, 0x37, 0xee, + 0x16, 0x67, 0xbe, 0x7f, 0xb7, 0x38, 0xf3, 0xaf, 0x77, 0x8b, 0x33, 0x6f, 0xde, 0x2d, 0x0a, 0xef, + 0xdc, 0x2d, 0x0a, 0xef, 0xdd, 0x2d, 0x0a, 0x77, 0x8e, 0x8a, 0xc2, 0x57, 0x8f, 0x8a, 0xc2, 0xd7, + 0x8f, 0x8a, 0xc2, 0x77, 0x8e, 0x8a, 0xc2, 0x1b, 0x47, 0xc5, 0x99, 0xef, 0x1f, 0x15, 0x85, 0x37, + 0x8f, 0x8a, 0xc2, 0x8f, 0x8e, 0x8a, 0x33, 0xef, 0x1c, 0x15, 0x85, 0xf7, 0x8e, 0x8a, 0x33, 0x77, + 0x7e, 0x58, 0x9c, 0xd9, 0x4f, 0x11, 0xdf, 0x5e, 0xf8, 0x49, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, + 0x83, 0xac, 0x31, 0xd4, 0x32, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMap(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MapTest) 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 ErrIntOverflowMap + } + 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: MapTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StrStr == nil { + m.StrStr = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMap + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMap + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StrStr[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + 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 *FakeMap) 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 ErrIntOverflowMap + } + 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: FakeMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, &FakeMapEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + 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 *FakeMapEntry) 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 ErrIntOverflowMap + } + 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: FakeMapEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMapEntry: 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 ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Other = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + 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 skipMap(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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrInvalidLengthMap + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMap + } + 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 := skipMap(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 ( + ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/unmarshaler/map.proto", fileDescriptor_map_c5bc2daa9ca30987) } + +var fileDescriptor_map_c5bc2daa9ca30987 = []byte{ + // 315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xbf, 0x4f, 0x02, 0x31, + 0x14, 0xc7, 0xfb, 0x20, 0x72, 0xb1, 0x38, 0x98, 0x8b, 0xc3, 0x49, 0xcc, 0x0b, 0x61, 0x62, 0xf1, + 0x2e, 0x91, 0x45, 0x1c, 0x1c, 0x8c, 0x3a, 0xc9, 0x02, 0xee, 0xa6, 0x87, 0xe5, 0x47, 0xe0, 0xe8, + 0xa5, 0xed, 0x99, 0x30, 0xc9, 0x9f, 0xe3, 0xe8, 0xe8, 0x9f, 0xc0, 0xc8, 0xe8, 0x48, 0xeb, 0xe2, + 0xc8, 0xc8, 0x68, 0xe8, 0x61, 0x72, 0x6e, 0x6e, 0xef, 0xf3, 0xed, 0xa7, 0x7d, 0xdf, 0x94, 0x9e, + 0xf5, 0x45, 0x12, 0x0b, 0x15, 0x65, 0xb3, 0x84, 0x49, 0x35, 0x62, 0x53, 0x2e, 0xa3, 0x84, 0xa5, + 0x61, 0x2a, 0x85, 0x16, 0x7e, 0x35, 0x61, 0xe9, 0x33, 0x1f, 0xb0, 0x6c, 0xaa, 0x55, 0xed, 0x7c, + 0x38, 0xd6, 0xa3, 0x2c, 0x0e, 0xfb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0xdf, 0xb6, 0x7e, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x44, 0xd1, 0x73, 0x81, 0xb7, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto new file mode 100644 index 000000000..75a379ce4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go new file mode 100644 index 000000000..cce9137fb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go @@ -0,0 +1,470 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/unknown_test.go b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/unknown_test.go new file mode 100644 index 000000000..ba5c920e2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/unknown_test.go @@ -0,0 +1,79 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalIgnoreUnknownField(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "key", + Value: "value", + Other: "other", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := &MapTest{} + err = proto.Unmarshal(serializedMsg, msg) + + if err != nil { + var pb proto.Message = msg + _, ok := pb.(proto.Unmarshaler) + if !ok { + // non-codegen implementation returns error when extra tags are + // present. + return + } + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr["key"] + if !ok { + t.Fatal("\"key\" not found in StrStr map.") + } + if val != "value" { + t.Fatalf("Unexpected value for \"value\": %s", val) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/map.pb.go b/deps/github.com/gogo/protobuf/test/mapdefaults/map.pb.go new file mode 100644 index 000000000..8046683ca --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/map.pb.go @@ -0,0 +1,414 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: map.proto + +/* +Package mapdefaults is a generated protocol buffer package. + +It is generated from these files: + map.proto + +It has these top-level messages: + MapTest +*/ +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (m *MapTest) String() string { return proto.CompactTextString(m) } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} } + +func (m *MapTest) GetStrStr() map[string]string { + if m != nil { + return m.StrStr + } + return nil +} + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") +} +func (m *MapTest) 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 *MapTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StrStr) > 0 { + for k := range m.StrStr { + dAtA[i] = 0xa + i++ + v := m.StrStr[k] + mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + i = encodeVarintMap(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func encodeFixed64Map(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 encodeFixed32Map(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 encodeVarintMap(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 *MapTest) Size() (n int) { + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MapTest) 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 ErrIntOverflowMap + } + 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: MapTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StrStr == nil { + m.StrStr = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMap + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMap + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } + } + m.StrStr[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMap(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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrInvalidLengthMap + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMap + } + 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 := skipMap(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 ( + ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("map.proto", fileDescriptorMap) } + +var fileDescriptorMap = []byte{ + // 161 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcc, 0x4d, 0x2c, 0xd0, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xce, 0x4d, 0x2c, 0x48, 0x49, 0x4d, 0x4b, 0x2c, 0xcd, + 0x29, 0x29, 0x56, 0xaa, 0xe7, 0x62, 0xf7, 0x4d, 0x2c, 0x08, 0x49, 0x2d, 0x2e, 0x11, 0xb2, 0xe4, + 0x62, 0x2f, 0x2e, 0x29, 0x8a, 0x2f, 0x2e, 0x29, 0x92, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x52, + 0xd0, 0x43, 0x52, 0xa9, 0x07, 0x55, 0xa6, 0x17, 0x5c, 0x52, 0x14, 0x5c, 0x52, 0xe4, 0x9a, 0x57, + 0x52, 0x54, 0x19, 0xc4, 0x56, 0x0c, 0xe6, 0x48, 0x59, 0x72, 0x71, 0x23, 0x09, 0x0b, 0x09, 0x70, + 0x31, 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, + 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, 0x60, 0x31, 0x08, 0xc7, 0x8a, 0xc9, 0x82, 0xd1, + 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, + 0x03, 0x3b, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x38, 0xe5, 0x24, 0x74, 0xaf, 0x00, 0x00, + 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/map.proto b/deps/github.com/gogo/protobuf/test/mapdefaults/map.proto new file mode 100644 index 000000000..43d5c0dab --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in b/deps/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in new file mode 100644 index 000000000..e593398c0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in @@ -0,0 +1,137 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + &FakeMapEntry{ + Key: "foo", + Value: "", + }, + &FakeMapEntry{ + Key: "", + Value: "bar", + }, + &FakeMapEntry{ + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + &FakeMapEntry{ + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} + diff --git a/deps/github.com/gogo/protobuf/test/mapdefaults/unknown_test.go.in b/deps/github.com/gogo/protobuf/test/mapdefaults/unknown_test.go.in new file mode 100644 index 000000000..6e2de030a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapdefaults/unknown_test.go.in @@ -0,0 +1,79 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalIgnoreUnknownField(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + &FakeMapEntry{ + Key: "key", + Value: "value", + Other: "other", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := &MapTest{} + err = proto.Unmarshal(serializedMsg, msg) + + if err != nil { + var pb proto.Message = msg + _, ok := pb.(proto.Unmarshaler) + if !ok { + // non-codegen implementation returns error when extra tags are + // present. + return + } + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr["key"] + if !ok { + t.Fatal("\"key\" not found in StrStr map.") + } + if val != "value" { + t.Fatalf("Unexpected value for \"value\": %s", val) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/Makefile b/deps/github.com/gogo/protobuf/test/mapsproto2/Makefile new file mode 100644 index 000000000..6a43fe506 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/Makefile @@ -0,0 +1,35 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + cp header.proto mapsproto2.proto + cat ../theproto3/maps.proto >> mapsproto2.proto + find combos -type d -not -name combos -exec cp mapsproto2_test.go.in {}/mapsproto2_test.go \; + protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. mapsproto2.proto diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go new file mode 100644 index 000000000..ef9089042 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go @@ -0,0 +1,8776 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return m.Size() +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4716 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7b, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xff, 0x0e, 0x1f, 0x12, 0x79, 0x48, 0x51, 0xa3, 0x2b, 0x79, 0x4d, 0xcb, 0xb6, 0x76, 0x57, + 0x7e, 0xc9, 0x6b, 0x5b, 0xb2, 0xe5, 0xdd, 0xf5, 0x9a, 0x1b, 0xdb, 0x7f, 0x4a, 0xe2, 0x6a, 0x65, + 0xeb, 0x95, 0xa1, 0xe4, 0x57, 0x60, 0xcc, 0x7f, 0x34, 0xbc, 0xa4, 0xc6, 0x4b, 0xce, 0xd0, 0x33, + 0xc3, 0xb5, 0x65, 0x14, 0xc5, 0x16, 0xee, 0x03, 0x41, 0xd1, 0x77, 0x81, 0x3a, 0xae, 0xe3, 0xd6, + 0x05, 0x52, 0xa7, 0xe9, 0x2b, 0x69, 0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xcc, 0x9a, 0x1e, 0x4b, 0xbf, 0x98, 0x80, 0xeb, 0x22, 0xc9, 0x23, 0x0d, 0xbd, 0x19, 0xc0, 0x30, + 0xdb, 0x1d, 0x97, 0x75, 0x44, 0x2c, 0xc1, 0x66, 0xa9, 0x84, 0x26, 0x2f, 0x92, 0x3c, 0x3b, 0xae, + 0x37, 0x9e, 0xa4, 0xe3, 0xc0, 0x44, 0x54, 0xe1, 0x7c, 0xd7, 0xd0, 0x14, 0x35, 0x74, 0xa6, 0xcf, + 0x9b, 0xf6, 0x04, 0xe6, 0xbd, 0x20, 0xeb, 0x4d, 0x03, 0x9b, 0xae, 0xea, 0xb8, 0x36, 0xd6, 0x5a, + 0x86, 0xd9, 0xa0, 0x15, 0x24, 0x53, 0x4a, 0xd7, 0xb5, 0xa6, 0x83, 0x95, 0x71, 0x36, 0x5c, 0x15, + 0xa3, 0x04, 0x41, 0x03, 0xc8, 0xf6, 0x21, 0x46, 0x02, 0x08, 0x36, 0xec, 0x21, 0x66, 0xbf, 0x99, + 0x81, 0x9c, 0xaf, 0xaf, 0x46, 0xa7, 0x20, 0xff, 0xac, 0x76, 0x45, 0x53, 0xc5, 0x59, 0x89, 0x79, + 0x22, 0x47, 0x64, 0xdb, 0xfc, 0xbc, 0x74, 0x2f, 0x4c, 0x51, 0x15, 0xab, 0xe3, 0x62, 0x5b, 0xd5, + 0x9b, 0x9a, 0xe3, 0x50, 0xa7, 0x65, 0xa8, 0x2a, 0x22, 0x63, 0x5b, 0x64, 0x68, 0x59, 0x8c, 0xa0, + 0xb3, 0x30, 0x49, 0x11, 0xad, 0x4e, 0xd3, 0x35, 0xda, 0x4d, 0xac, 0x92, 0xd3, 0x9b, 0x43, 0x2b, + 0x89, 0x67, 0xd9, 0x04, 0xd1, 0xd8, 0xe0, 0x0a, 0xc4, 0x22, 0x07, 0xad, 0xc0, 0xcd, 0x14, 0xd6, + 0xc0, 0x26, 0xb6, 0x35, 0x17, 0xab, 0xf8, 0xb9, 0x8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x36, 0xb7, 0x9e, 0xd8, 0x54, 0x64, 0x23, 0xa4, 0xf6, 0x09, 0x6e, 0xf5, 0x6d, 0x90, + 0xc3, 0x46, 0xa1, 0xeb, 0x21, 0xca, 0x2c, 0xf9, 0x18, 0x9a, 0x84, 0xf1, 0xcd, 0x2d, 0xb5, 0xba, + 0xb6, 0x52, 0x51, 0x2b, 0x17, 0x2f, 0x56, 0x96, 0x77, 0xaa, 0xec, 0x06, 0xc2, 0xd3, 0xde, 0x09, + 0x6e, 0xea, 0x57, 0x92, 0x30, 0x19, 0x61, 0x09, 0x2a, 0xf3, 0xb3, 0x03, 0x3b, 0xce, 0xdc, 0x33, + 0x8c, 0xf5, 0xf3, 0xa4, 0xe4, 0x6f, 0x6b, 0xb6, 0xcb, 0x8f, 0x1a, 0x77, 0x02, 0xf1, 0x92, 0xe9, + 0x1a, 0x75, 0x03, 0xdb, 0xfc, 0xc2, 0x86, 0x1d, 0x28, 0xc6, 0xbb, 0x72, 0x76, 0x67, 0x73, 0x37, + 0xa0, 0xb6, 0xe5, 0x18, 0xae, 0x71, 0x05, 0xab, 0x86, 0x29, 0x6e, 0x77, 0xc8, 0x01, 0x23, 0xa5, + 0xc8, 0x62, 0x64, 0xcd, 0x74, 0x3d, 0x6d, 0x13, 0x37, 0xb4, 0x90, 0x36, 0x49, 0xe0, 0x49, 0x45, + 0x16, 0x23, 0x9e, 0xf6, 0x29, 0xc8, 0xd7, 0xac, 0x0e, 0xe9, 0xba, 0x98, 0x1e, 0xa9, 0x17, 0x92, + 0x92, 0x63, 0x32, 0x4f, 0x85, 0xf7, 0xd3, 0xdd, 0x6b, 0xa5, 0xbc, 0x92, 0x63, 0x32, 0xa6, 0x72, + 0x07, 0x8c, 0x6b, 0x8d, 0x86, 0x4d, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0x14, 0x3c, 0x31, 0x55, 0x9c, + 0x7e, 0x14, 0x32, 0xc2, 0x0f, 0xa4, 0x24, 0x13, 0x4f, 0xa8, 0x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8, 0x91, 0x9e, 0x39, 0xec, 0x95, 0x72, 0x71, 0xe6, 0xf8, 0xde, 0xc9, 0x87, 0xeb, + 0x9a, 0xc3, 0x68, 0xf2, 0xb1, 0xe6, 0xf8, 0x78, 0xfc, 0x48, 0x74, 0x01, 0x46, 0x97, 0x2c, 0x8b, + 0x68, 0x16, 0xc7, 0x28, 0xc9, 0xa9, 0x48, 0x12, 0xae, 0xc3, 0x08, 0x04, 0x82, 0xae, 0x0e, 0x0d, + 0x7d, 0x02, 0x2f, 0x0c, 0x5a, 0x1d, 0xa1, 0x25, 0x56, 0x47, 0x3c, 0xfb, 0x77, 0xe0, 0xd2, 0x81, + 0x8b, 0x49, 0x2b, 0x5e, 0x1c, 0x1f, 0x62, 0x07, 0x0a, 0xe5, 0xd0, 0x0e, 0x14, 0x62, 0x54, 0x85, + 0x71, 0x21, 0xab, 0x98, 0x1d, 0x92, 0x83, 0x8b, 0x32, 0xff, 0x71, 0xf9, 0x20, 0x5a, 0xae, 0xcb, + 0x58, 0xc3, 0x0c, 0x68, 0x1b, 0x0a, 0x42, 0xb4, 0xe1, 0xd0, 0x97, 0x9e, 0x88, 0xa8, 0xab, 0x61, + 0x4e, 0xa6, 0xca, 0x28, 0x43, 0xf8, 0xe9, 0x15, 0x38, 0x1e, 0x9d, 0xad, 0xe2, 0xb2, 0xa5, 0xe4, + 0xcf, 0xb2, 0xcb, 0x70, 0x5d, 0x64, 0x66, 0x8a, 0x23, 0x49, 0x84, 0xea, 0x44, 0x20, 0x1d, 0xf9, + 0xc1, 0xe9, 0x08, 0x70, 0xba, 0x17, 0xdc, 0x0d, 0x32, 0x3f, 0x38, 0x19, 0x01, 0x4e, 0xfa, 0xc1, + 0x9f, 0x83, 0x42, 0x30, 0x0f, 0xf9, 0xd1, 0x63, 0x11, 0xe8, 0xb1, 0x08, 0x74, 0xf4, 0xdc, 0xa9, + 0x08, 0x74, 0x2a, 0x84, 0xae, 0xf6, 0x9d, 0x7b, 0x22, 0x02, 0x3d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xde, 0xbf, 0x36, 0x23, 0x7d, 0x78, 0x6d, 0x46, 0xba, 0x7a, 0x38, 0x23, 0x7d, + 0xf5, 0x70, 0x46, 0xfa, 0xfa, 0xe1, 0x8c, 0xf4, 0xed, 0xc3, 0x19, 0xe9, 0xbb, 0x87, 0x33, 0xd2, + 0x9b, 0x87, 0x33, 0xd2, 0xf7, 0x0f, 0x67, 0xa4, 0xb7, 0x0f, 0x67, 0xa4, 0x77, 0x0f, 0x67, 0x8e, + 0xbd, 0x7f, 0x38, 0x23, 0x7d, 0x78, 0x38, 0x73, 0xec, 0xea, 0x4f, 0x66, 0x8e, 0xfd, 0x6f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x7b, 0x12, 0xbe, 0x21, 0x0f, 0x48, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMapsproto2(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomMap) 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 *CustomMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k := range m.Nullable128S { + dAtA[i] = 0xa + i++ + v := m.Nullable128S[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.Uint128S) > 0 { + for k := range m.Uint128S { + dAtA[i] = 0x12 + i++ + v := m.Uint128S[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n2, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if len(m.NullableIds) > 0 { + for k := range m.NullableIds { + dAtA[i] = 0x1a + i++ + v := m.NullableIds[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n3, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + } + } + if len(m.Ids) > 0 { + for k := range m.Ids { + dAtA[i] = 0x22 + i++ + v := m.Ids[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n4, err := v.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 *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n5, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n6, err := v.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 encodeVarintMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) 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 ErrIntOverflowMapsproto2 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.F = &v2 + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 *CustomMap) 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 ErrIntOverflowMapsproto2 + } + 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: CustomMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nullable128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nullable128S == nil { + m.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Nullable128S[mapkey] = ((*github_com_gogo_protobuf_test_custom.Uint128)(mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint128S == nil { + m.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint128S[mapkey] = ((github_com_gogo_protobuf_test_custom.Uint128)(*mapvalue)) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableIds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableIds == nil { + m.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableIds[mapkey] = ((*github_com_gogo_protobuf_test.Uuid)(mapvalue)) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ids == nil { + m.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Ids[mapkey] = ((github_com_gogo_protobuf_test.Uuid)(*mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 *AllMaps) 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 ErrIntOverflowMapsproto2 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 *AllMapsOrdered) 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 ErrIntOverflowMapsproto2 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 skipMapsproto2(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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrInvalidLengthMapsproto2 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2 + } + 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 := skipMapsproto2(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 ( + ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/mapsproto2.proto", fileDescriptor_mapsproto2_7bd3336f77331b84) +} + +var fileDescriptor_mapsproto2_7bd3336f77331b84 = []byte{ + // 1143 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcb, 0x6f, 0x1a, 0x57, + 0x14, 0xc6, 0xb9, 0x3c, 0x0c, 0x5c, 0xde, 0x37, 0x69, 0x85, 0x50, 0x7b, 0x71, 0xe8, 0x8b, 0x90, + 0x14, 0x6c, 0x1a, 0x45, 0x96, 0xd3, 0xa6, 0x32, 0xb6, 0x53, 0xac, 0x14, 0x37, 0x82, 0xa6, 0x2f, + 0xc9, 0x52, 0xc1, 0x3c, 0x82, 0x0a, 0x0c, 0x65, 0x86, 0xa8, 0xde, 0x54, 0xf9, 0x33, 0xba, 0xed, + 0xae, 0xcb, 0x2e, 0xbb, 0xec, 0xd2, 0x52, 0x37, 0x59, 0x46, 0x51, 0x65, 0x85, 0xe9, 0x26, 0xcb, + 0x2c, 0xb3, 0xac, 0xe6, 0xce, 0x83, 0x3b, 0x33, 0x67, 0x66, 0xa0, 0xab, 0x2e, 0xbc, 0xc2, 0x77, + 0x38, 0xdf, 0xef, 0x3b, 0x33, 0x73, 0xef, 0xe1, 0x33, 0x7e, 0xeb, 0x54, 0x18, 0x77, 0x04, 0xb1, + 0xd2, 0x11, 0xa4, 0x47, 0x95, 0x71, 0x7b, 0x2a, 0x4e, 0x67, 0x82, 0x24, 0x54, 0xcb, 0xec, 0x83, + 0xc4, 0xb4, 0x95, 0xf2, 0x45, 0xee, 0xc3, 0xc1, 0x50, 0x7a, 0x34, 0xef, 0x94, 0x4f, 0x85, 0x71, + 0x65, 0x20, 0x0c, 0x84, 0x0a, 0xfb, 0xb2, 0x33, 0xef, 0xb3, 0x15, 0x5b, 0xb0, 0xbf, 0x54, 0x6d, + 0xe1, 0x6d, 0x9c, 0xb8, 0x37, 0x12, 0xda, 0xd2, 0x70, 0x32, 0x78, 0x20, 0x0c, 0x27, 0x12, 0x89, + 0x63, 0xd4, 0xcf, 0xa2, 0x4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2, 0xd7, + 0x0b, 0x8a, 0x9e, 0xc8, 0x14, 0xfd, 0x26, 0x53, 0xf4, 0xbb, 0x4c, 0xd1, 0x1f, 0x32, 0x45, 0x7f, + 0xca, 0x14, 0x9d, 0xcb, 0x14, 0x3d, 0x95, 0x29, 0x7a, 0x21, 0x53, 0xf4, 0x52, 0xa6, 0xbe, 0x57, + 0x32, 0x45, 0xaf, 0x65, 0xea, 0x7b, 0xf2, 0x0f, 0xf5, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xfa, + 0x87, 0xd5, 0x9e, 0xf2, 0x16, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto new file mode 100644 index 000000000..4f8e4ab91 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go new file mode 100644 index 000000000..ee41f57e1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go @@ -0,0 +1,978 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go new file mode 100644 index 000000000..9c7762c32 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go @@ -0,0 +1,4636 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomMap.Unmarshal(m, b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return m.Size() +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4713 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xd6, 0xf0, 0x21, 0x91, 0x87, 0x14, 0x35, 0xba, 0x92, 0xd7, 0xb4, 0x1c, 0x6b, 0x77, 0xe5, + 0x97, 0xbc, 0xb6, 0xb5, 0xb6, 0xbc, 0xbb, 0x5e, 0x73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0x55, 0xbf, 0x15, 0x55, 0xcf, 0x8a, 0x4c, 0x0c, 0x85, 0xdf, 0x0a, 0xef, 0x19, 0xad, 0x00, + 0x5c, 0x34, 0x9e, 0xc7, 0x35, 0x66, 0x46, 0x36, 0x22, 0x19, 0x09, 0x8e, 0xae, 0x1a, 0x23, 0xf1, + 0xe1, 0xd0, 0x2a, 0xe4, 0xaa, 0xf5, 0x2e, 0x0d, 0xf0, 0xff, 0x84, 0x12, 0x69, 0x4a, 0x3d, 0xc4, + 0xe3, 0x47, 0x7a, 0xe6, 0xb0, 0x57, 0xca, 0xc5, 0x99, 0xe3, 0x7b, 0x27, 0x1f, 0xae, 0x6b, 0x0e, + 0xa3, 0xc9, 0xc7, 0x9a, 0xe3, 0xe3, 0xf1, 0x23, 0xd1, 0x05, 0x18, 0x5b, 0xb2, 0x2c, 0xa2, 0x59, + 0x1c, 0xa7, 0x24, 0x27, 0x23, 0x49, 0xb8, 0x0e, 0x23, 0x10, 0x08, 0xba, 0x3a, 0x34, 0xf4, 0x09, + 0xbc, 0x30, 0x68, 0x75, 0x84, 0x96, 0x58, 0x1d, 0xf1, 0xec, 0xdf, 0x81, 0x4b, 0x07, 0x2e, 0x26, + 0xfd, 0x78, 0x71, 0x62, 0x88, 0x1d, 0x28, 0x94, 0x43, 0x3b, 0x50, 0x88, 0x51, 0x15, 0x26, 0x84, + 0xac, 0x62, 0x76, 0x48, 0x0e, 0x2e, 0xca, 0xfc, 0x17, 0xe6, 0x83, 0x68, 0xb9, 0x2e, 0x63, 0x0d, + 0x33, 0xa0, 0x6d, 0x28, 0x08, 0xd1, 0x86, 0x43, 0x5f, 0x7a, 0x32, 0xa2, 0xae, 0x86, 0x39, 0x99, + 0x2a, 0xa3, 0x0c, 0xe1, 0x67, 0x56, 0xe0, 0x58, 0x74, 0xb6, 0x8a, 0xcb, 0x96, 0x92, 0x3f, 0xcb, + 0x2e, 0xc3, 0x75, 0x91, 0x99, 0x29, 0x8e, 0x24, 0x11, 0xaa,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 0x4e, 0xc2, 0x18, 0x9f, 0x1a, 0x8d, 0x42, 0x62, 0xa3, 0x2c, 0x8f, + 0xd0, 0x7f, 0x97, 0x64, 0x89, 0xfe, 0xbb, 0x2c, 0x27, 0x96, 0xd6, 0xdf, 0xb8, 0x36, 0x3b, 0xf2, + 0xbd, 0x6b, 0xb3, 0x23, 0x3f, 0xb8, 0x36, 0x3b, 0xf2, 0xd6, 0xb5, 0x59, 0xe9, 0x9d, 0x6b, 0xb3, + 0xd2, 0x7b, 0xd7, 0x66, 0xa5, 0x0f, 0xae, 0xcd, 0x4a, 0x57, 0x0f, 0x67, 0xa5, 0xaf, 0x1c, 0xce, + 0x4a, 0x5f, 0x3b, 0x9c, 0x95, 0xbe, 0x75, 0x38, 0x2b, 0x7d, 0xe7, 0x70, 0x56, 0x7a, 0xe3, 0x70, + 0x56, 0xfa, 0xde, 0xe1, 0xec, 0xc8, 0x5b, 0x87, 0xb3, 0xd2, 0x3b, 0x87, 0xb3, 0x23, 0xef, 0x1d, + 0xce, 0x4a, 0x1f, 0x1c, 0xce, 0x8e, 0x5c, 0xfd, 0xf1, 0xec, 0xc8, 0xff, 0x07, 0x00, 0x00, 0xff, + 0xff, 0xb6, 0x98, 0xbf, 0xf4, 0x14, 0x48, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMapsproto2(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomMap) 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 *CustomMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k := range m.Nullable128S { + dAtA[i] = 0xa + i++ + v := m.Nullable128S[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.Uint128S) > 0 { + for k := range m.Uint128S { + dAtA[i] = 0x12 + i++ + v := m.Uint128S[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n2, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if len(m.NullableIds) > 0 { + for k := range m.NullableIds { + dAtA[i] = 0x1a + i++ + v := m.NullableIds[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n3, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + } + } + if len(m.Ids) > 0 { + for k := range m.Ids { + dAtA[i] = 0x22 + i++ + v := m.Ids[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n4, err := v.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 *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n5, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n6, err := v.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 encodeVarintMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/mapsproto2.proto", fileDescriptor_mapsproto2_9bd23591ad6768d5) +} + +var fileDescriptor_mapsproto2_9bd23591ad6768d5 = []byte{ + // 1148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0x47, + 0x18, 0xc6, 0x19, 0x30, 0x06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, 0xf4, 0x54, 0xa1, 0xbe, 0x17, 0x0a, 0x45, + 0x2f, 0x15, 0xea, 0x7b, 0xa5, 0x50, 0xf4, 0x5a, 0xa1, 0xbe, 0x27, 0xff, 0x52, 0xdf, 0x7f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xec, 0x4e, 0x18, 0x12, 0xf7, 0x16, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto new file mode 100644 index 000000000..dc972a908 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..a8e0c8974 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go @@ -0,0 +1,978 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go new file mode 100644 index 000000000..fa76a8c94 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go @@ -0,0 +1,3704 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomMap.Unmarshal(m, b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return xxx_messageInfo_CustomMap.Size(m) +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4716 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xd6, 0xf0, 0x21, 0x91, 0x87, 0x14, 0x35, 0xba, 0x92, 0xd7, 0xb4, 0x1c, 0x4b, 0xbb, 0xf2, + 0x4b, 0x5e, 0xdb, 0x92, 0x2d, 0xef, 0xae, 0xd7, 0xdc, 0xd8, 0x2e, 0x25, 0x71, 0xb5, 0xb2, 0xf5, + 0xca, 0x50, 0xf2, 0x2b, 0x30, 0xa6, 0xa3, 0xe1, 0x15, 0x35, 0x5e, 0x72, 0x86, 0x9e, 0x19, 0xae, + 0x2d, 0xa3, 0x28, 0xb6, 0x70, 0x1f, 0x08, 0x8a, 0xbe, 0x0b, 0xd4, 0x71, 0x1d, 0xb7, 0x2e, 0x90, + 0x3a, 0x4d, 0x5f, 0x49, 0xd3, 0xa6, 0x49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x76, 0x42, 0x28, 0x78, 0x62, 0xaa, 0x38, 0xf5, + 0x08, 0x64, 0x84, 0x1f, 0x48, 0x49, 0x26, 0x9e, 0x50, 0x5b, 0xec, 0xd8, 0x9b, 0x98, 0xcb, 0x2a, + 0x19, 0x53, 0x0c, 0x9e, 0x82, 0xbc, 0xe1, 0xa8, 0x9d, 0x5b, 0xf2, 0xc4, 0xc9, 0xc4, 0x5c, 0x46, + 0xc9, 0x19, 0x8e, 0x77, 0xc3, 0x38, 0xfb, 0x7a, 0x02, 0x0a, 0xc1, 0x5b, 0x7e, 0xb4, 0x02, 0x99, + 0x86, 0xa5, 0x6b, 0x34, 0xb4, 0xd8, 0x27, 0xa6, 0xb9, 0x98, 0x0f, 0x03, 0xf3, 0xeb, 0x5c, 0x5f, + 0xf1, 0x90, 0x53, 0xff, 0x22, 0x41, 0x46, 0x88, 0xd1, 0x09, 0x48, 0xb5, 0x34, 0xf7, 0x80, 0xd2, + 0xa5, 0x97, 0x12, 0xb2, 0xa4, 0xd0, 0x67, 0x22, 0x77, 0x5a, 0x9a, 0x49, 0x43, 0x80, 0xcb, 0xc9, + 0x33, 0x59, 0xd7, 0x06, 0xd6, 0x6a, 0xf4, 0xf8, 0x61, 0x35, 0x9b, 0xd8, 0x74, 0x1d, 0xb1, 0xae, + 0x5c, 0xbe, 0xcc, 0xc5, 0xe8, 0x4e, 0x18, 0x77, 0x6d, 0xcd, 0x68, 0x04, 0x74, 0x53, 0x54, 0x57, + 0x16, 0x03, 0x9e, 0x72, 0x09, 0x6e, 0x10, 0xbc, 0x35, 0xec, 0x6a, 0xfa, 0x01, 0xae, 0x75, 0x40, + 0xc3, 0xf4, 0x9a, 0xe1, 0x7a, 0xae, 0xb0, 0xc2, 0xc7, 0x05, 0x76, 0xf6, 0xfb, 0x12, 0x8c, 0x8b, + 0x03, 0x53, 0xcd, 0x73, 0xd6, 0x06, 0x80, 0x66, 0x9a, 0x96, 0xeb, 0x77, 0x57, 0x77, 0x28, 0x77, + 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, 0x18, + 0x0d, 0xf8, 0xf8, 0x58, 0xe0, 0x87, 0x40, 0x0e, 0x7b, 0xe9, 0x58, 0xf8, 0x73, 0x90, 0xf9, 0x28, + 0xb8, 0xd9, 0x1f, 0x20, 0x18, 0x29, 0x37, 0x1a, 0x1b, 0x5a, 0xcb, 0x41, 0x4f, 0xc2, 0x38, 0x3b, + 0x21, 0xec, 0x58, 0x2b, 0xf4, 0x53, 0xd4, 0x86, 0xd6, 0xe2, 0x01, 0x7d, 0x67, 0xc0, 0xdd, 0x1c, + 0x30, 0xdf, 0xa5, 0x4d, 0xe7, 0x57, 0xba, 0x59, 0xd0, 0x63, 0x20, 0x0b, 0x21, 0xdd, 0x5b, 0x84, + 0x99, 0x85, 0xeb, 0xe9, 0xbe, 0xcc, 0x42, 0x99, 0x11, 0x77, 0x71, 0xa0, 0x87, 0x20, 0xb3, 0x66, + 0xba, 0xf7, 0x2d, 0x12, 0x3e, 0x16, 0x83, 0xb3, 0x91, 0x7c, 0x42, 0x89, 0xf1, 0x78, 0x18, 0x8e, + 0x3f, 0x77, 0x86, 0xe0, 0x53, 0xfd, 0xf1, 0x54, 0xa9, 0x83, 0xa7, 0x8f, 0xa8, 0x0c, 0x59, 0xb2, + 0xe6, 0xcc, 0x00, 0xf6, 0x7f, 0x30, 0x6e, 0x8e, 0x24, 0xf0, 0xb4, 0x18, 0x43, 0x07, 0x25, 0x28, + 0x98, 0x0d, 0xc3, 0x31, 0x14, 0x3e, 0x23, 0x3a, 0x28, 0x42, 0x51, 0xf5, 0xac, 0x18, 0xe9, 0x43, + 0x51, 0x0d, 0x59, 0x51, 0xf5, 0x5b, 0x51, 0xf5, 0xac, 0xc8, 0xc4, 0x50, 0xf8, 0xad, 0xf0, 0x9e, + 0xd1, 0x0a, 0xc0, 0x45, 0xe3, 0x79, 0x5c, 0x63, 0x66, 0x64, 0x23, 0x92, 0x91, 0xe0, 0xe8, 0xa8, + 0x31, 0x12, 0x1f, 0x0e, 0xad, 0x42, 0xae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, 0x6b, 0xd3, 0x43, 0x6f, 0x5d, 0x9b, 0x96, 0xde, + 0xb9, 0x36, 0x2d, 0xbd, 0x77, 0x6d, 0x5a, 0xfa, 0xe0, 0xda, 0xb4, 0x74, 0xf5, 0x68, 0x5a, 0xfa, + 0xca, 0xd1, 0xb4, 0xf4, 0xb5, 0xa3, 0x69, 0xe9, 0x5b, 0x47, 0xd3, 0xd2, 0x77, 0x8e, 0xa6, 0xa5, + 0x37, 0x8e, 0xa6, 0x87, 0xbe, 0x77, 0x34, 0x3d, 0xf4, 0xd6, 0xd1, 0xb4, 0xf4, 0xce, 0xd1, 0xf4, + 0xd0, 0x7b, 0x47, 0xd3, 0xd2, 0x07, 0x47, 0xd3, 0x43, 0x57, 0x7f, 0x3c, 0x3d, 0xf4, 0xff, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x36, 0xa1, 0xfd, 0xa0, 0x12, 0x48, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMapsproto2(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/neither/mapsproto2.proto", fileDescriptor_mapsproto2_62fb8c1076af60e4) +} + +var fileDescriptor_mapsproto2_62fb8c1076af60e4 = []byte{ + // 1148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0xc7, + 0x1b, 0xc7, 0x77, 0xc0, 0x36, 0x30, 0xbc, 0x4f, 0xfc, 0xfb, 0x09, 0x21, 0x75, 0x70, 0xe8, 0x1b, + 0x21, 0x29, 0xd8, 0x34, 0x8a, 0x2c, 0xa7, 0x4d, 0x65, 0x6c, 0xa7, 0x58, 0x29, 0x6e, 0x04, 0x4d, + 0xdf, 0x24, 0x4b, 0x05, 0xb3, 0x10, 0x54, 0x60, 0x29, 0xbb, 0x44, 0xf5, 0xa5, 0xca, 0x9f, 0xd1, + 0x6b, 0x6f, 0x3d, 0xf6, 0xd8, 0x63, 0x8f, 0x96, 0x7a, 0xc9, 0x31, 0x8a, 0x2a, 0x2b, 0x6c, 0x2f, + 0x39, 0xe6, 0x98, 0x63, 0xb5, 0xb3, 0xbb, 0x30, 0xbb, 0xfb, 0xec, 0x2e, 0xf4, 0xd4, 0x83, 0x4f, + 0x78, 0x96, 0xe7, 0xfb, 0xf9, 0x3e, 0xbb, 0x3b, 0xf3, 0xf0, 0x35, 0xce, 0x9d, 0x49, 0xc3, 0xb6, + 0x24, 0x97, 0x47, 0x62, 0x5f, 0x79, 0x2c, 0x4e, 0xca, 0xc3, 0xd6, 0x58, 0x1e, 0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2a, 0xd8, 0x5d, 0x05, 0xbb, + 0xff, 0x46, 0xb0, 0xdb, 0x5b, 0xfb, 0xf9, 0x97, 0x1c, 0x2a, 0x5e, 0xc7, 0x21, 0xc3, 0x9a, 0x6c, + 0xe0, 0x40, 0x7d, 0x3f, 0x25, 0xb0, 0xcf, 0x6a, 0x0a, 0xb1, 0xcf, 0x83, 0x54, 0xa0, 0xfa, 0xd9, + 0xc5, 0x8c, 0x0a, 0xcf, 0x66, 0x54, 0x78, 0x3e, 0xa3, 0xc2, 0xcb, 0x19, 0x45, 0xaf, 0x66, 0x14, + 0xbd, 0x9e, 0x51, 0xf4, 0x66, 0x46, 0xd1, 0x53, 0x95, 0xa2, 0x5f, 0x55, 0x8a, 0x7e, 0x53, 0x29, + 0xfa, 0x5d, 0xa5, 0xe8, 0x0f, 0x95, 0xa2, 0x0b, 0x95, 0x0a, 0xcf, 0x54, 0x2a, 0xbc, 0x54, 0x29, + 0x7a, 0xa5, 0x52, 0xe1, 0xb5, 0x4a, 0xd1, 0x1b, 0x95, 0x0a, 0x4f, 0xff, 0xa6, 0xc2, 0x3f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x3c, 0x2b, 0x76, 0x8f, 0xf5, 0x16, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto new file mode 100644 index 000000000..39de58312 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go new file mode 100644 index 000000000..c6c208c69 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go @@ -0,0 +1,866 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go new file mode 100644 index 000000000..01ca6fec2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go @@ -0,0 +1,7845 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return xxx_messageInfo_CustomMap.Size(m) +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4713 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x6b, 0x6c, 0x23, 0xd7, + 0x75, 0xd6, 0xf0, 0x21, 0x91, 0x87, 0x14, 0x35, 0xba, 0x92, 0xd7, 0xb4, 0x1c, 0x6b, 0x77, 0xe5, + 0x97, 0xbc, 0xb6, 0xb5, 0xb6, 0xbc, 0xbb, 0x5e, 0x73, 0x63, 0xbb, 0x94, 0xc4, 0xd5, 0xca, 0xd6, + 0x2b, 0x43, 0xc9, 0xaf, 0xc0, 0x98, 0x8e, 0x86, 0x97, 0xd4, 0x78, 0xc9, 0x19, 0x7a, 0x66, 0xb8, + 0xb6, 0x8c, 0xa2, 0xd8, 0xc2, 0x7d, 0x20, 0x28, 0xfa, 0x2e, 0x50, 0xc7, 0x75, 0xdc, 0xba, 0x40, + 0xea, 0x34, 0x7d, 0x25, 0x4d, 0x9b, 0x26, 0xfd, 0x95, 0x3f, 0x69, 0x0d, 0x14, 0x28, 0x92, 0x7f, + 0x41, 0x10, 0x18, 0x5e, 0xc5, 0x40, 0xdd, 0xd6, 0x6d, 0xdc, 0xd6, 0x3f, 0x5c, 0xf8, 0x4f, 0x71, + 0x5f, 0xc3, 0x99, 0xe1, 0x90, 0x43, 0x19, 0xb0, 0x93, 0x1f, 0xfe, 0xb5, 0x9a, 0x33, 0xe7, 0xfb, + 0xee, 0xb9, 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0x77, 0xb8, 0xf0, 0x93, 0x07, 0x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, 0xa8, 0x0c, 0x59, 0x6c, 0x76, 0x5a, 0x8c, 0x21, 0xdd, 0xc7, 0x7f, 0x15, 0xb3, 0xd3, + 0x0a, 0xb3, 0x64, 0x08, 0x8c, 0x53, 0x8c, 0x39, 0xd8, 0xbe, 0x62, 0xe8, 0xb8, 0x38, 0x4a, 0x09, + 0x6e, 0xef, 0x21, 0xa8, 0xb2, 0xf7, 0x61, 0x0e, 0x81, 0x43, 0xcb, 0x90, 0xc5, 0xcf, 0xbb, 0xd8, + 0x74, 0x0c, 0xcb, 0x2c, 0x8e, 0x51, 0x92, 0x5b, 0x23, 0x56, 0x11, 0x37, 0x6b, 0x61, 0x8a, 0x2e, + 0x0e, 0x9d, 0x83, 0x31, 0xab, 0xed, 0x1a, 0x96, 0xe9, 0x14, 0x33, 0x27, 0xa4, 0xf9, 0xdc, 0xe2, + 0x67, 0x22, 0x03, 0x61, 0x8b, 0xe9, 0x28, 0x42, 0x19, 0xad, 0x81, 0xec, 0x58, 0x1d, 0x5b, 0xc7, + 0xaa, 0x6e, 0xd5, 0xb0, 0x6a, 0x98, 0x75, 0xab, 0x98, 0xa5, 0x04, 0xc7, 0x7b, 0x27, 0x42, 0x15, + 0x97, 0xad, 0x1a, 0x5e, 0x33, 0xeb, 0x96, 0x52, 0x70, 0x02, 0xcf, 0xe8, 0x18, 0x8c, 0x3a, 0x07, + 0xa6, 0xab, 0x3d, 0x5f, 0xcc, 0xd3, 0x08, 0xe1, 0x4f, 0x73, 0xdf, 0x1e, 0x85, 0x89, 0x61, 0x42, + 0xec, 0x02, 0xa4, 0xeb, 0x64, 0x96, 0xc5, 0xc4, 0x51, 0x7c, 0xc0, 0x30, 0x41, 0x27, 0x8e, 0x7e, + 0x44, 0x27, 0x96, 0x21, 0x67, 0x62, 0xc7, 0xc5, 0x35, 0x16, 0x11, 0xc9, 0x21, 0x63, 0x0a, 0x18, + 0xa8, 0x37, 0xa4, 0x52, 0x1f, 0x29, 0xa4, 0x9e, 0x80, 0x09, 0xcf, 0x24, 0xd5, 0xd6, 0xcc, 0x86, + 0x88, 0xcd, 0xd3, 0x71, 0x96, 0x2c, 0x54, 0x04, 0x4e, 0x21, 0x30, 0xa5, 0x80, 0x03, 0xcf, 0x68, + 0x05, 0xc0, 0x32, 0xb1, 0x55, 0x57, 0x6b, 0x58, 0x6f, 0x16, 0x33, 0x7d, 0xbc, 0xb4, 0x45, 0x54, + 0x7a, 0xbc, 0x64, 0x31, 0xa9, 0xde, 0x44, 0x0f, 0x74, 0x43, 0x6d, 0xac, 0x4f, 0xa4, 0x6c, 0xb0, + 0x4d, 0xd6, 0x13, 0x6d, 0xbb, 0x50, 0xb0, 0x31, 0x89, 0x7b, 0x5c, 0xe3, 0x33, 0xcb, 0x52, 0x23, + 0x16, 0x62, 0x67, 0xa6, 0x70, 0x18, 0x9b, 0xd8, 0xb8, 0xed, 0x7f, 0x44, 0x37, 0x83, 0x27, 0x50, + 0x69, 0x58, 0x01, 0xcd, 0x42, 0x79, 0x21, 0xdc, 0xd4, 0x5a, 0x78, 0xe6, 0x05, 0x28, 0x04, 0xdd, + 0x83, 0xa6, 0x21, 0xed, 0xb8, 0x9a, 0xed, 0xd2, 0x28, 0x4c, 0x2b, 0xec, 0x01, 0xc9, 0x90, 0xc4, + 0x66, 0x8d, 0x66, 0xb9, 0xb4, 0x42, 0xfe, 0x44, 0x3f, 0xd7, 0x9d, 0x70, 0x92, 0x4e, 0xf8, 0xb6, + 0xde, 0x15, 0x0d, 0x30, 0x87, 0xe7, 0x3d, 0x73, 0x3f, 0x8c, 0x07, 0x26, 0x30, 0xec, 0xd0, 0x73, + 0xbf, 0x00, 0xd7, 0x45, 0x52, 0xa3, 0x27, 0x60, 0xba, 0x63, 0x1a, 0xa6, 0x8b, 0xed, 0xb6, 0x8d, + 0x49, 0xc4, 0xb2, 0xa1, 0x8a, 0xff, 0x3a, 0xd6, 0x27, 0xe6, 0x76, 0xfd, 0xda, 0x8c, 0x45, 0x99, + 0xea, 0xf4, 0x0a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x2a, 0x00, 0x50, 0xc1, 0xc5, 0xf5, 0xad, + 0xf2, 0x8e, 0x9c, 0xf0, 0x9e, 0xd7, 0x36, 0x77, 0xce, 0x9d, 0x91, 0x93, 0x1e, 0x60, 0x97, 0x09, + 0x52, 0x7e, 0x85, 0xfb, 0x16, 0xe5, 0x34, 0x92, 0x21, 0xcf, 0x08, 0xd6, 0x9e, 0xa8, 0xac, 0x9c, + 0x3b, 0x23, 0x8f, 0x06, 0x25, 0xf7, 0x2d, 0xca, 0x63, 0x68, 0x1c, 0xb2, 0x54, 0xb2, 0xb4, 0xb5, + 0xb5, 0x2e, 0x67, 0x3c, 0xce, 0xea, 0x8e, 0xb2, 0xb6, 0xb9, 0x2a, 0x67, 0x3d, 0xce, 0x55, 0x65, + 0x6b, 0x77, 0x5b, 0x06, 0x8f, 0x61, 0xa3, 0x52, 0xad, 0x96, 0x57, 0x2b, 0x72, 0xce, 0xd3, 0x58, + 0x7a, 0x72, 0xa7, 0x52, 0x95, 0xf3, 0x01, 0xb3, 0xee, 0x5b, 0x94, 0xc7, 0xbd, 0x21, 0x2a, 0x9b, + 0xbb, 0x1b, 0x72, 0x01, 0x4d, 0xc2, 0x38, 0x1b, 0x42, 0x18, 0x31, 0x11, 0x12, 0x9d, 0x3b, 0x23, + 0xcb, 0x5d, 0x43, 0x18, 0xcb, 0x64, 0x40, 0x70, 0xee, 0x8c, 0x8c, 0xe6, 0x96, 0x21, 0x4d, 0xa3, + 0x0b, 0x21, 0x28, 0xac, 0x97, 0x97, 0x2a, 0xeb, 0xea, 0xd6, 0xf6, 0xce, 0xda, 0xd6, 0x66, 0x79, + 0x5d, 0x96, 0xba, 0x32, 0xa5, 0xf2, 0xb9, 0xdd, 0x35, 0xa5, 0xb2, 0x22, 0x27, 0xfc, 0xb2, 0xed, + 0x4a, 0x79, 0xa7, 0xb2, 0x22, 0x27, 0xe7, 0x74, 0x98, 0x8e, 0xca, 0x93, 0x91, 0x3b, 0xc3, 0xb7, + 0xc4, 0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0x3c, 0x96, 0xcf, 0x98, 0x56, + 0x95, 0x2b, 0x77, 0x73, 0x78, 0x99, 0xab, 0x86, 0x02, 0x2c, 0xd9, 0x2f, 0xc0, 0x6e, 0x84, 0x6c, + 0x4b, 0x6b, 0xab, 0xd8, 0x74, 0xed, 0x03, 0xda, 0x18, 0x67, 0x94, 0x4c, 0x4b, 0x6b, 0x57, 0xc8, + 0xf3, 0x27, 0x73, 0x3e, 0xf9, 0x51, 0x12, 0xf2, 0xfe, 0xe6, 0x98, 0x9c, 0x35, 0x74, 0x5a, 0x47, + 0x24, 0x9a, 0x69, 0x6e, 0x1e, 0xd8, 0x4a, 0x2f, 0x2c, 0x93, 0x02, 0x53, 0x1a, 0x65, 0x2d, 0xab, + 0xc2, 0x90, 0xa4, 0xb8, 0x93, 0xdc, 0x82, 0x59, 0x8b, 0x90, 0x51, 0xf8, 0x13, 0x5a, 0x85, 0xd1, + 0x67, 0x1c, 0xca, 0x3d, 0x4a, 0xb9, 0x6f, 0x19, 0xcc, 0xfd, 0x48, 0x95, 0x92, 0x67, 0x1f, 0xa9, + 0xaa, 0x9b, 0x5b, 0xca, 0x46, 0x79, 0x5d, 0xe1, 0x70, 0x74, 0x03, 0xa4, 0x9a, 0xda, 0x0b, 0x07, + 0xc1, 0x52, 0x44, 0x45, 0xc3, 0x3a, 0xfe, 0x06, 0x48, 0x3d, 0x87, 0xb5, 0xcb, 0xc1, 0x02, 0x40, + 0x45, 0x1f, 0x63, 0xe8, 0x9f, 0x86, 0x34, 0xf5, 0x17, 0x02, 0xe0, 0x1e, 0x93, 0x47, 0x50, 0x06, + 0x52, 0xcb, 0x5b, 0x0a, 0x09, 0x7f, 0x19, 0xf2, 0x4c, 0xaa, 0x6e, 0xaf, 0x55, 0x96, 0x2b, 0x72, + 0x62, 0xee, 0x2c, 0x8c, 0x32, 0x27, 0x90, 0xad, 0xe1, 0xb9, 0x41, 0x1e, 0xe1, 0x8f, 0x9c, 0x43, + 0x12, 0x6f, 0x77, 0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x32, 0x23, 0xee, 0xe1, 0x40, 0x0f, 0x41, 0x66, 0xcd, 0x74, 0xef, + 0x5b, 0x24, 0x7c, 0x2c, 0x06, 0xe7, 0x22, 0xf9, 0x84, 0x12, 0xe3, 0xf1, 0x30, 0x1c, 0x7f, 0xee, + 0x0c, 0xc1, 0xa7, 0x06, 0xe3, 0xa9, 0x52, 0x17, 0x4f, 0x1f, 0x51, 0x19, 0xb2, 0x64, 0xcd, 0x99, + 0x01, 0xec, 0xff, 0x61, 0xdc, 0x1c, 0x49, 0xe0, 0x69, 0x31, 0x86, 0x2e, 0x4a, 0x50, 0x30, 0x1b, + 0x46, 0x63, 0x28, 0x7c, 0x46, 0x74, 0x51, 0x84, 0xa2, 0xea, 0x59, 0x31, 0x36, 0x80, 0xa2, 0x1a, + 0xb2, 0xa2, 0xea, 0xb7, 0xa2, 0xea, 0x59, 0x91, 0x89, 0xa1, 0xf0, 0x5b, 0xe1, 0x3d, 0xa3, 0x15, + 0x80, 0x8b, 0xc6, 0xf3, 0xb8, 0xc6, 0xcc, 0xc8, 0x46, 0x24, 0x23, 0xc1, 0xd1, 0x55, 0x63, 0x24, + 0x3e, 0x1c, 0x5a, 0x85, 0x5c, 0xb5, 0xde, 0xa5, 0x01, 0xfe, 0xdf, 0x50, 0x22, 0x4d, 0xa9, 0x87, + 0x78, 0xfc, 0x48, 0xcf, 0x1c, 0x36, 0xa5, 0x5c, 0x9c, 0x39, 0xbe, 0x39, 0xf9, 0x70, 0x5d, 0x73, + 0x18, 0x4d, 0x3e, 0xd6, 0x1c, 0x1f, 0x8f, 0x1f, 0x89, 0x2e, 0xc0, 0xd8, 0x92, 0x65, 0x11, 0xcd, + 0xe2, 0x38, 0x25, 0x39, 0x19, 0x49, 0xc2, 0x75, 0x18, 0x81, 0x40, 0xd0, 0xd5, 0xa1, 0xa1, 0x4f, + 0xe0, 0x85, 0x41, 0xab, 0x23, 0xb4, 0xc4, 0xea, 0x88, 0x67, 0xff, 0x0e, 0x5c, 0x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 0x1f, 0x00, 0x00, 0xff, + 0xff, 0x19, 0x19, 0x31, 0xd0, 0x16, 0x48, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMapsproto2(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) 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 ErrIntOverflowMapsproto2 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.F = &v2 + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 *CustomMap) 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 ErrIntOverflowMapsproto2 + } + 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: CustomMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nullable128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nullable128S == nil { + m.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Nullable128S[mapkey] = ((*github_com_gogo_protobuf_test_custom.Uint128)(mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint128S == nil { + m.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint128S[mapkey] = ((github_com_gogo_protobuf_test_custom.Uint128)(*mapvalue)) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableIds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableIds == nil { + m.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableIds[mapkey] = ((*github_com_gogo_protobuf_test.Uuid)(mapvalue)) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ids == nil { + m.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Ids[mapkey] = ((github_com_gogo_protobuf_test.Uuid)(*mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 *AllMaps) 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 ErrIntOverflowMapsproto2 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 *AllMapsOrdered) 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 ErrIntOverflowMapsproto2 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + 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 skipMapsproto2(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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrInvalidLengthMapsproto2 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2 + } + 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 := skipMapsproto2(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 ( + ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/mapsproto2.proto", fileDescriptor_mapsproto2_4a77fadeb5c37480) +} + +var fileDescriptor_mapsproto2_4a77fadeb5c37480 = []byte{ + // 1150 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0x47, + 0x18, 0xc6, 0x19, 0xb0, 0x0d, 0x0c, 0xdf, 0x93, 0xb4, 0x42, 0x48, 0x1d, 0x1c, 0xd2, 0x0f, 0x42, + 0x52, 0xb0, 0x69, 0x14, 0x59, 0x4e, 0x9b, 0xca, 0xd8, 0x4e, 0xb1, 0x52, 0xdc, 0x08, 0x9a, 0x7e, + 0x49, 0x96, 0x0a, 0x66, 0x21, 0xa8, 0xc0, 0x52, 0x76, 0x37, 0xaa, 0x2f, 0x55, 0xfe, 0x8c, 0x5e, + 0x7b, 0xeb, 0xb1, 0xc7, 0x1e, 0x7b, 0xb4, 0xd4, 0x4b, 0x8e, 0x51, 0x54, 0x59, 0x61, 0x7b, 0xc9, + 0x31, 0xc7, 0x1c, 0xab, 0x9d, 0xdd, 0x85, 0xd9, 0xdd, 0x77, 0x77, 0xa1, 0xa7, 0x1e, 0x7c, 0xc2, + 0xb3, 0xbc, 0xcf, 0xef, 0x79, 0x77, 0x77, 0xe6, 0xe5, 0x31, 0xbe, 0x7e, 0x2a, 0x8e, 0x3a, 0xa2, + 0x54, 0x51, 0xc6, 0xa3, 0xf6, 0x54, 0x7a, 0xdc, 0x1e, 0x0a, 0xd3, 0xca, 0xa8,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x65, 0xb0, 0xbb, 0x0c, 0x76, 0x97, + 0xc1, 0xee, 0xff, 0x11, 0xec, 0x76, 0xd7, 0x7e, 0xf9, 0x35, 0x8f, 0x4a, 0xd7, 0x70, 0xd8, 0xb0, + 0x26, 0x1b, 0x38, 0xd8, 0xd8, 0x4b, 0x07, 0xd8, 0x67, 0x2d, 0x8d, 0xd8, 0xe7, 0x7e, 0x3a, 0x58, + 0xfb, 0xfc, 0x7c, 0x46, 0x03, 0xcf, 0x66, 0x34, 0xf0, 0x7c, 0x46, 0x03, 0x2f, 0x67, 0x14, 0xbd, + 0x9a, 0x51, 0xf4, 0x7a, 0x46, 0xd1, 0x9b, 0x19, 0x45, 0x4f, 0x55, 0x8a, 0x7e, 0x53, 0x29, 0xfa, + 0x5d, 0xa5, 0xe8, 0x0f, 0x95, 0xa2, 0x3f, 0x55, 0x8a, 0xce, 0x55, 0x1a, 0x78, 0xa6, 0x52, 0xf4, + 0x52, 0xa5, 0xe8, 0x95, 0x4a, 0x03, 0xaf, 0x55, 0x8a, 0xde, 0xa8, 0x34, 0xf0, 0xf4, 0x1f, 0x1a, + 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xc4, 0xd5, 0x8e, 0xf9, 0x16, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto new file mode 100644 index 000000000..27a47d6af --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..eee2586d7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go @@ -0,0 +1,866 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/doc.go b/deps/github.com/gogo/protobuf/test/mapsproto2/doc.go new file mode 100644 index 000000000..4276bac39 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/doc.go @@ -0,0 +1 @@ +package mapsproto2 diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/header.proto b/deps/github.com/gogo/protobuf/test/mapsproto2/header.proto new file mode 100644 index 000000000..5d87649a6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/header.proto @@ -0,0 +1,76 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto b/deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto new file mode 100644 index 000000000..39de58312 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in b/deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in new file mode 100644 index 000000000..5ccc86602 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": []byte{}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/merge/Makefile b/deps/github.com/gogo/protobuf/test/merge/Makefile new file mode 100644 index 000000000..4e1176296 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/merge/Makefile @@ -0,0 +1,5 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. \ + --proto_path=../../../../../:../../protobuf/:. merge.proto diff --git a/deps/github.com/gogo/protobuf/test/merge/merge.pb.go b/deps/github.com/gogo/protobuf/test/merge/merge.pb.go new file mode 100644 index 000000000..71ce17b89 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/merge/merge.pb.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: merge.proto + +package merge + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A struct { + B B `protobuf:"bytes,1,opt,name=B" json:"B"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_merge_7440dca413742023, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_A.Unmarshal(m, b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_A.Marshal(b, m, deterministic) +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return xxx_messageInfo_A.Size(m) +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetB() B { + if m != nil { + return m.B + } + return B{} +} + +type B struct { + C int64 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_merge_7440dca413742023, []int{1} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_B.Unmarshal(m, b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_B.Marshal(b, m, deterministic) +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return xxx_messageInfo_B.Size(m) +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +func (m *B) GetC() int64 { + if m != nil { + return m.C + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "merge.A") + proto.RegisterType((*B)(nil), "merge.B") +} + +func init() { proto.RegisterFile("merge.proto", fileDescriptor_merge_7440dca413742023) } + +var fileDescriptor_merge_7440dca413742023 = []byte{ + // 123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x4d, 0x2d, 0x4a, + 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0x29, 0x72, 0x31, 0x3a, 0x0a, 0xc9, + 0x70, 0x31, 0x3a, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x71, 0xe8, 0x41, 0xcc, 0x74, 0x72, + 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x88, 0xd1, 0x49, 0x49, 0x90, 0x8b, 0xd1, 0x49, 0x88, 0x87, + 0x8b, 0x31, 0x19, 0xac, 0x84, 0x39, 0x88, 0x31, 0x39, 0x89, 0x0d, 0xac, 0xd9, 0x18, 0x10, 0x00, + 0x00, 0xff, 0xff, 0x86, 0x7b, 0xb3, 0xe7, 0x81, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/merge/merge.proto b/deps/github.com/gogo/protobuf/test/merge/merge.proto new file mode 100644 index 000000000..b2dbcb5f0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/merge/merge.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package merge; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + B B = 1 [(gogoproto.nullable) = false]; +} + +message B { + int64 c = 1; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/merge/merge_test.go b/deps/github.com/gogo/protobuf/test/merge/merge_test.go new file mode 100644 index 000000000..4b60827fe --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/merge/merge_test.go @@ -0,0 +1,36 @@ +package merge + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestClone1(t *testing.T) { + f1 := &A{} + proto.Clone(f1) +} + +func TestMerge1(t *testing.T) { + f1 := &A{} + f2 := &A{} + proto.Merge(f1, f2) +} + +func TestMerge2(t *testing.T) { + f1 := &A{B: B{C: 1}} + f2 := &A{} + proto.Merge(f1, f2) + if f1.B.C != 1 { + t.Fatalf("got %d want %d", f1.B.C, 1) + } +} + +func TestMerge3(t *testing.T) { + f1 := &A{} + f2 := &A{B: B{C: 1}} + proto.Merge(f1, f2) + if f1.B.C != 1 { + t.Fatalf("got %d want %d", f1.B.C, 1) + } +} diff --git a/deps/github.com/gogo/protobuf/test/mixbench/.gitignore b/deps/github.com/gogo/protobuf/test/mixbench/.gitignore new file mode 100644 index 000000000..95341f35b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/.gitignore @@ -0,0 +1 @@ +mixbench \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/mixbench/marshal.txt b/deps/github.com/gogo/protobuf/test/mixbench/marshal.txt new file mode 100644 index 000000000..58efdca46 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/marshal.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test +BenchmarkNidOptNativeProtoMarshal-8 2000000 831 ns/op 276.72 MB/s +BenchmarkNinOptNativeProtoMarshal-8 2000000 931 ns/op 224.49 MB/s +BenchmarkNidRepNativeProtoMarshal-8 500000 2341 ns/op 349.71 MB/s +BenchmarkNinRepNativeProtoMarshal-8 500000 2500 ns/op 327.56 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 500000 3542 ns/op 105.30 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 500000 3571 ns/op 104.44 MB/s +BenchmarkNidOptStructProtoMarshal-8 500000 2386 ns/op 354.44 MB/s +BenchmarkNinOptStructProtoMarshal-8 500000 2361 ns/op 324.30 MB/s +BenchmarkNidRepStructProtoMarshal-8 200000 5585 ns/op 317.40 MB/s +BenchmarkNinRepStructProtoMarshal-8 200000 5608 ns/op 316.16 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 1000000 1475 ns/op 327.39 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 1000000 1465 ns/op 312.60 MB/s +BenchmarkNidNestedStructProtoMarshal-8 100000 14816 ns/op 278.74 MB/s +BenchmarkNinNestedStructProtoMarshal-8 100000 13744 ns/op 283.03 MB/s +BenchmarkNidOptCustomProtoMarshal-8 3000000 539 ns/op 131.63 MB/s +BenchmarkCustomDashProtoMarshal-8 3000000 474 ns/op 172.86 MB/s +BenchmarkNinOptCustomProtoMarshal-8 3000000 578 ns/op 115.81 MB/s +BenchmarkNidRepCustomProtoMarshal-8 1000000 1700 ns/op 107.04 MB/s +BenchmarkNinRepCustomProtoMarshal-8 1000000 1715 ns/op 106.07 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 5000000 346 ns/op 46.17 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 3000000 518 ns/op 121.60 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 2000000 785 ns/op 189.70 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 2000000 657 ns/op 118.58 MB/s +BenchmarkTreeProtoMarshal-8 3000000 584 ns/op 176.32 MB/s +BenchmarkOrBranchProtoMarshal-8 2000000 997 ns/op 245.52 MB/s +BenchmarkAndBranchProtoMarshal-8 2000000 982 ns/op 249.36 MB/s +BenchmarkLeafProtoMarshal-8 3000000 453 ns/op 213.86 MB/s +BenchmarkDeepTreeProtoMarshal-8 2000000 822 ns/op 176.28 MB/s +BenchmarkADeepBranchProtoMarshal-8 2000000 931 ns/op 196.52 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 1000000 1515 ns/op 219.09 MB/s +BenchmarkDeepLeafProtoMarshal-8 2000000 696 ns/op 200.89 MB/s +BenchmarkNilProtoMarshal-8 10000000 219 ns/op 159.54 MB/s +BenchmarkNidOptEnumProtoMarshal-8 5000000 275 ns/op 134.49 MB/s +BenchmarkNinOptEnumProtoMarshal-8 5000000 314 ns/op 130.50 MB/s +BenchmarkNidRepEnumProtoMarshal-8 3000000 516 ns/op 114.31 MB/s +BenchmarkNinRepEnumProtoMarshal-8 3000000 516 ns/op 114.21 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 5000000 308 ns/op 132.80 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 5000000 311 ns/op 131.65 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 5000000 312 ns/op 131.11 MB/s +BenchmarkTimerProtoMarshal-8 3000000 503 ns/op 208.34 MB/s +BenchmarkMyExtendableProtoMarshal-8 2000000 689 ns/op 117.49 MB/s +BenchmarkOtherExtenableProtoMarshal-8 1000000 1356 ns/op 116.48 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 2000000 919 ns/op 252.30 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 3000000 566 ns/op 210.03 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 5000000 395 ns/op 207.58 MB/s +BenchmarkNestedScopeProtoMarshal-8 2000000 840 ns/op 265.32 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 2000000 932 ns/op 224.11 MB/s +BenchmarkCustomContainerProtoMarshal-8 2000000 680 ns/op 160.07 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 2000000 844 ns/op 272.51 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 2000000 915 ns/op 228.30 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 500000 2346 ns/op 348.99 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 500000 3010 ns/op 318.50 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 1000000 2003 ns/op 106.79 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 2000000 757 ns/op 196.79 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 5000000 375 ns/op 119.68 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 3000000 423 ns/op 191.12 MB/s +BenchmarkUnrecognizedProtoMarshal-8 5000000 279 ns/op 160.80 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 3000000 582 ns/op 161.34 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 10000000 209 ns/op 23.87 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 3000000 497 ns/op 178.98 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 10000000 216 ns/op 23.12 MB/s +BenchmarkNodeProtoMarshal-8 3000000 436 ns/op 231.46 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 2000000 843 ns/op 93.69 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 2000000 851 ns/op 97.47 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 2000000 857 ns/op 92.15 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 500000 2748 ns/op 83.67 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 500000 2750 ns/op 83.62 MB/s +BenchmarkProtoTypeProtoMarshal-8 5000000 395 ns/op 207.07 MB/s +PASS +ok github.com/gogo/protobuf/test 159.241s diff --git a/deps/github.com/gogo/protobuf/test/mixbench/marshaler.txt b/deps/github.com/gogo/protobuf/test/mixbench/marshaler.txt new file mode 100644 index 000000000..e9674c43e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/marshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoMarshal-8 5000000 240 ns/op 955.07 MB/s +BenchmarkNinOptNativeProtoMarshal-8 5000000 277 ns/op 752.54 MB/s +BenchmarkNidRepNativeProtoMarshal-8 1000000 1074 ns/op 762.27 MB/s +BenchmarkNinRepNativeProtoMarshal-8 1000000 1065 ns/op 768.51 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 1000000 1033 ns/op 361.05 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 1000000 1018 ns/op 366.08 MB/s +BenchmarkNidOptStructProtoMarshal-8 1000000 1024 ns/op 825.83 MB/s +BenchmarkNinOptStructProtoMarshal-8 2000000 974 ns/op 785.66 MB/s +BenchmarkNidRepStructProtoMarshal-8 500000 2593 ns/op 683.64 MB/s +BenchmarkNinRepStructProtoMarshal-8 500000 2443 ns/op 725.73 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 3000000 582 ns/op 829.86 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 3000000 557 ns/op 821.40 MB/s +BenchmarkNidNestedStructProtoMarshal-8 200000 7862 ns/op 525.28 MB/s +BenchmarkNinNestedStructProtoMarshal-8 200000 6228 ns/op 624.58 MB/s +BenchmarkNidOptCustomProtoMarshal-8 20000000 95.1 ns/op 746.84 MB/s +BenchmarkCustomDashProtoMarshal-8 20000000 92.5 ns/op 886.08 MB/s +BenchmarkNinOptCustomProtoMarshal-8 20000000 96.2 ns/op 696.51 MB/s +BenchmarkNidRepCustomProtoMarshal-8 5000000 258 ns/op 703.59 MB/s +BenchmarkNinRepCustomProtoMarshal-8 5000000 267 ns/op 679.91 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 68.8 ns/op 232.44 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 10000000 137 ns/op 457.92 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 259 ns/op 573.18 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 212 ns/op 366.72 MB/s +BenchmarkTreeProtoMarshal-8 10000000 154 ns/op 666.39 MB/s +BenchmarkOrBranchProtoMarshal-8 5000000 353 ns/op 692.18 MB/s +BenchmarkAndBranchProtoMarshal-8 5000000 348 ns/op 703.45 MB/s +BenchmarkLeafProtoMarshal-8 20000000 118 ns/op 820.16 MB/s +BenchmarkDeepTreeProtoMarshal-8 5000000 251 ns/op 576.84 MB/s +BenchmarkADeepBranchProtoMarshal-8 5000000 308 ns/op 594.07 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 2000000 604 ns/op 549.21 MB/s +BenchmarkDeepLeafProtoMarshal-8 10000000 213 ns/op 654.76 MB/s +BenchmarkNilProtoMarshal-8 30000000 50.1 ns/op 698.93 MB/s +BenchmarkNidOptEnumProtoMarshal-8 20000000 61.7 ns/op 599.27 MB/s +BenchmarkNinOptEnumProtoMarshal-8 20000000 77.8 ns/op 527.05 MB/s +BenchmarkNidRepEnumProtoMarshal-8 10000000 186 ns/op 316.64 MB/s +BenchmarkNinRepEnumProtoMarshal-8 10000000 183 ns/op 321.59 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 77.9 ns/op 526.44 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 78.9 ns/op 519.95 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 78.6 ns/op 521.58 MB/s +BenchmarkTimerProtoMarshal-8 20000000 103 ns/op 1011.39 MB/s +BenchmarkMyExtendableProtoMarshal-8 3000000 515 ns/op 157.02 MB/s +BenchmarkOtherExtenableProtoMarshal-8 2000000 1000 ns/op 157.91 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 5000000 285 ns/op 811.76 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 142 ns/op 837.36 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 93.3 ns/op 878.69 MB/s +BenchmarkNestedScopeProtoMarshal-8 5000000 260 ns/op 854.95 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 277 ns/op 752.14 MB/s +BenchmarkCustomContainerProtoMarshal-8 10000000 141 ns/op 772.49 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 5000000 242 ns/op 947.27 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 276 ns/op 754.67 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1043 ns/op 785.18 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1294 ns/op 740.75 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 298 ns/op 715.82 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 255 ns/op 583.23 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 20000000 102 ns/op 441.00 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 20000000 118 ns/op 684.15 MB/s +BenchmarkUnrecognizedProtoMarshal-8 20000000 66.4 ns/op 677.96 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 168 ns/op 557.06 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 43.4 ns/op 115.08 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 126 ns/op 704.09 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 43.7 ns/op 114.32 MB/s +BenchmarkNodeProtoMarshal-8 10000000 121 ns/op 833.02 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 641.79 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 130 ns/op 633.95 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 124 ns/op 636.74 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 5000000 387 ns/op 592.85 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 5000000 390 ns/op 589.05 MB/s +BenchmarkProtoTypeProtoMarshal-8 20000000 94.1 ns/op 871.54 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 139.443s diff --git a/deps/github.com/gogo/protobuf/test/mixbench/mixbench.go b/deps/github.com/gogo/protobuf/test/mixbench/mixbench.go new file mode 100644 index 000000000..316afa99c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/mixbench.go @@ -0,0 +1,58 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package main + +import ( + "fmt" + "io/ioutil" + "os/exec" +) + +func bench(folder, rgx string, outFileName string) { + var test = exec.Command("go", "test", "-test.timeout=20m", "-test.v", "-test.run=XXX", "-test.bench="+rgx, folder) + fmt.Printf("benching\n") + out, err := test.CombinedOutput() + fmt.Printf("bench output: %v\n", string(out)) + if err != nil { + panic(err) + } + if err := ioutil.WriteFile(outFileName, out, 0666); err != nil { + panic(err) + } +} + +func main() { + bench("./test/combos/both/", "ProtoMarshal", "./test/mixbench/marshaler.txt") + bench("./test/", "ProtoMarshal", "./test/mixbench/marshal.txt") + bench("./test/combos/both/", "ProtoUnmarshal", "./test/mixbench/unmarshaler.txt") + bench("./test/", "ProtoUnmarshal", "./test/mixbench/unmarshal.txt") + fmt.Println("Running benchcmp will show the performance difference between using reflect and generated code for marshalling and unmarshalling of protocol buffers") + fmt.Println("benchcmp ./test/mixbench/marshal.txt ./test/mixbench/marshaler.txt") + fmt.Println("benchcmp ./test/mixbench/unmarshal.txt ./test/mixbench/unmarshaler.txt") +} diff --git a/deps/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt b/deps/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt new file mode 100644 index 000000000..a0cd56a7b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoMarshal-8 5000000 255 ns/op 898.51 MB/s +BenchmarkNinOptNativeProtoMarshal-8 5000000 292 ns/op 714.19 MB/s +BenchmarkNidRepNativeProtoMarshal-8 1000000 1215 ns/op 673.78 MB/s +BenchmarkNinRepNativeProtoMarshal-8 1000000 1129 ns/op 724.87 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 1000000 1070 ns/op 348.30 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 1000000 1126 ns/op 331.05 MB/s +BenchmarkNidOptStructProtoMarshal-8 1000000 1090 ns/op 775.47 MB/s +BenchmarkNinOptStructProtoMarshal-8 1000000 1077 ns/op 711.02 MB/s +BenchmarkNidRepStructProtoMarshal-8 500000 2826 ns/op 627.36 MB/s +BenchmarkNinRepStructProtoMarshal-8 500000 2585 ns/op 685.69 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 2000000 661 ns/op 729.67 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 2000000 612 ns/op 747.51 MB/s +BenchmarkNidNestedStructProtoMarshal-8 200000 8685 ns/op 475.50 MB/s +BenchmarkNinNestedStructProtoMarshal-8 200000 7278 ns/op 534.43 MB/s +BenchmarkNidOptCustomProtoMarshal-8 20000000 99.3 ns/op 715.23 MB/s +BenchmarkCustomDashProtoMarshal-8 20000000 94.7 ns/op 866.23 MB/s +BenchmarkNinOptCustomProtoMarshal-8 20000000 100 ns/op 663.46 MB/s +BenchmarkNidRepCustomProtoMarshal-8 5000000 275 ns/op 661.13 MB/s +BenchmarkNinRepCustomProtoMarshal-8 5000000 274 ns/op 662.53 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 74.9 ns/op 213.63 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 10000000 150 ns/op 417.38 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 273 ns/op 545.04 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 239 ns/op 325.57 MB/s +BenchmarkTreeProtoMarshal-8 10000000 164 ns/op 627.52 MB/s +BenchmarkOrBranchProtoMarshal-8 5000000 384 ns/op 637.63 MB/s +BenchmarkAndBranchProtoMarshal-8 5000000 386 ns/op 633.51 MB/s +BenchmarkLeafProtoMarshal-8 10000000 123 ns/op 786.11 MB/s +BenchmarkDeepTreeProtoMarshal-8 5000000 258 ns/op 561.33 MB/s +BenchmarkADeepBranchProtoMarshal-8 5000000 327 ns/op 559.19 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 2000000 650 ns/op 510.35 MB/s +BenchmarkDeepLeafProtoMarshal-8 10000000 219 ns/op 638.44 MB/s +BenchmarkNilProtoMarshal-8 30000000 51.0 ns/op 686.29 MB/s +BenchmarkNidOptEnumProtoMarshal-8 20000000 62.5 ns/op 591.74 MB/s +BenchmarkNinOptEnumProtoMarshal-8 20000000 78.7 ns/op 521.09 MB/s +BenchmarkNidRepEnumProtoMarshal-8 10000000 186 ns/op 316.21 MB/s +BenchmarkNinRepEnumProtoMarshal-8 10000000 179 ns/op 328.20 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 81.4 ns/op 503.41 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 85.7 ns/op 478.31 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 83.6 ns/op 490.49 MB/s +BenchmarkTimerProtoMarshal-8 20000000 110 ns/op 952.31 MB/s +BenchmarkMyExtendableProtoMarshal-8 3000000 508 ns/op 159.38 MB/s +BenchmarkOtherExtenableProtoMarshal-8 1000000 1090 ns/op 144.83 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 5000000 302 ns/op 765.71 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 147 ns/op 805.16 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 94.4 ns/op 868.83 MB/s +BenchmarkNestedScopeProtoMarshal-8 5000000 275 ns/op 809.77 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 283 ns/op 737.12 MB/s +BenchmarkCustomContainerProtoMarshal-8 10000000 142 ns/op 765.46 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 5000000 255 ns/op 900.47 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 284 ns/op 735.53 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1056 ns/op 775.01 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1471 ns/op 651.55 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 304 ns/op 703.60 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 268 ns/op 554.35 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 20000000 103 ns/op 435.03 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 20000000 115 ns/op 702.08 MB/s +BenchmarkUnrecognizedProtoMarshal-8 20000000 67.0 ns/op 671.64 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 175 ns/op 536.86 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 47.6 ns/op 105.15 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 134 ns/op 659.48 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 47.1 ns/op 106.07 MB/s +BenchmarkNodeProtoMarshal-8 10000000 125 ns/op 804.09 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 131 ns/op 602.08 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 133 ns/op 623.02 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 134 ns/op 588.03 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 3000000 402 ns/op 570.96 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 3000000 394 ns/op 583.29 MB/s +BenchmarkProtoTypeProtoMarshal-8 20000000 94.3 ns/op 869.83 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 140.308s diff --git a/deps/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt b/deps/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt new file mode 100644 index 000000000..9ad44dce5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoUnmarshal-8 3000000 441 ns/op 520.98 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 638 ns/op 327.14 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 500000 2830 ns/op 289.36 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 2859 ns/op 286.37 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1813 ns/op 205.67 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1793 ns/op 207.96 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 1000000 1876 ns/op 450.92 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 1000000 1992 ns/op 384.38 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 300000 5234 ns/op 338.72 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 300000 5097 ns/op 347.79 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1077 ns/op 448.06 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1088 ns/op 420.67 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 100000 11850 ns/op 348.52 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 200000 11242 ns/op 346.02 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 10000000 196 ns/op 361.07 MB/s +BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 359.22 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 5000000 243 ns/op 275.11 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 2000000 811 ns/op 224.17 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 2000000 812 ns/op 223.94 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 78.0 ns/op 205.18 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 198 ns/op 318.01 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 465 ns/op 320.00 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 329 ns/op 236.72 MB/s +BenchmarkTreeProtoUnmarshal-8 5000000 301 ns/op 341.52 MB/s +BenchmarkOrBranchProtoUnmarshal-8 2000000 788 ns/op 310.72 MB/s +BenchmarkAndBranchProtoUnmarshal-8 2000000 809 ns/op 302.61 MB/s +BenchmarkLeafProtoUnmarshal-8 10000000 226 ns/op 428.13 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 3000000 564 ns/op 256.96 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 2000000 746 ns/op 244.98 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1262 ns/op 263.05 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 3000000 474 ns/op 294.99 MB/s +BenchmarkNilProtoUnmarshal-8 10000000 139 ns/op 251.16 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 10000000 145 ns/op 254.37 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 10000000 204 ns/op 200.49 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 3000000 453 ns/op 130.01 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 3000000 444 ns/op 132.65 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 199 ns/op 205.24 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 208 ns/op 196.86 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 201 ns/op 203.57 MB/s +BenchmarkTimerProtoUnmarshal-8 10000000 235 ns/op 444.92 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 2000000 649 ns/op 124.62 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1348 ns/op 117.15 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 932 ns/op 248.80 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 431 ns/op 275.75 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 219 ns/op 373.17 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 2000000 907 ns/op 245.63 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 663 ns/op 315.15 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 5000000 350 ns/op 310.78 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 483 ns/op 475.48 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 689 ns/op 303.07 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2845 ns/op 287.79 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2730 ns/op 351.21 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 934 ns/op 229.08 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 475 ns/op 313.63 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 271 ns/op 166.03 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 344 ns/op 234.94 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 20000000 86.3 ns/op 521.53 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 411 ns/op 228.40 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 43.9 ns/op 113.80 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 261 ns/op 340.84 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.9 ns/op 113.92 MB/s +BenchmarkNodeProtoUnmarshal-8 5000000 312 ns/op 323.19 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 306 ns/op 257.52 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 292 ns/op 283.61 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 307 ns/op 257.00 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1057 ns/op 217.49 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1043 ns/op 220.36 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 10000000 221 ns/op 369.64 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 152.331s diff --git a/deps/github.com/gogo/protobuf/test/mixbench/unmarshal.txt b/deps/github.com/gogo/protobuf/test/mixbench/unmarshal.txt new file mode 100644 index 000000000..00f352180 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/unmarshal.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test +BenchmarkNidOptNativeProtoUnmarshal-8 2000000 742 ns/op 309.65 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 892 ns/op 234.06 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 300000 3762 ns/op 217.69 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 3750 ns/op 218.40 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 2423 ns/op 153.89 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 2356 ns/op 158.30 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 500000 2595 ns/op 326.01 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 500000 2679 ns/op 285.91 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 200000 7477 ns/op 237.11 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 200000 6672 ns/op 265.70 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1634 ns/op 295.59 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1655 ns/op 276.61 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 100000 16742 ns/op 246.68 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 100000 14573 ns/op 266.92 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 2000000 840 ns/op 84.48 MB/s +BenchmarkCustomDashProtoUnmarshal-8 3000000 573 ns/op 142.95 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 2000000 668 ns/op 100.17 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 500000 3945 ns/op 46.12 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 500000 3939 ns/op 46.20 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 5000000 248 ns/op 64.30 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 3000000 432 ns/op 145.55 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 2000000 767 ns/op 194.07 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 2000000 636 ns/op 122.51 MB/s +BenchmarkTreeProtoUnmarshal-8 2000000 649 ns/op 158.50 MB/s +BenchmarkOrBranchProtoUnmarshal-8 1000000 1312 ns/op 186.65 MB/s +BenchmarkAndBranchProtoUnmarshal-8 1000000 1301 ns/op 188.29 MB/s +BenchmarkLeafProtoUnmarshal-8 3000000 490 ns/op 197.62 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 1000000 1059 ns/op 136.83 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 1000000 1253 ns/op 145.96 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 2041 ns/op 162.62 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 2000000 894 ns/op 156.51 MB/s +BenchmarkNilProtoUnmarshal-8 5000000 362 ns/op 96.48 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 5000000 382 ns/op 96.84 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 3000000 448 ns/op 91.37 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 2000000 796 ns/op 74.10 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 2000000 799 ns/op 73.79 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 3000000 452 ns/op 90.59 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 3000000 446 ns/op 91.74 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 3000000 451 ns/op 90.73 MB/s +BenchmarkTimerProtoUnmarshal-8 3000000 528 ns/op 198.78 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 1000000 1295 ns/op 62.54 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 2420 ns/op 65.28 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 1000000 1501 ns/op 154.48 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 2000000 861 ns/op 138.09 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 3000000 490 ns/op 167.26 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 1000000 1469 ns/op 151.78 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 933 ns/op 223.93 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 1000000 1141 ns/op 95.48 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 2000000 771 ns/op 298.02 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 938 ns/op 222.66 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 3820 ns/op 214.37 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 3613 ns/op 265.38 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 300000 4301 ns/op 49.76 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 2000000 772 ns/op 192.86 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 3000000 569 ns/op 79.04 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 2000000 850 ns/op 95.19 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 5000000 269 ns/op 166.93 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 2000000 858 ns/op 109.44 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 10000000 221 ns/op 22.56 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 2000000 605 ns/op 146.89 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 10000000 222 ns/op 22.45 MB/s +BenchmarkNodeProtoUnmarshal-8 2000000 664 ns/op 152.10 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 2000000 880 ns/op 89.67 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 2000000 953 ns/op 87.07 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 2000000 893 ns/op 88.46 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 500000 3460 ns/op 66.47 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 500000 3452 ns/op 66.63 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 3000000 510 ns/op 160.64 MB/s +PASS +ok github.com/gogo/protobuf/test 160.971s diff --git a/deps/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt b/deps/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt new file mode 100644 index 000000000..69ca32d62 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoUnmarshal-8 3000000 437 ns/op 525.94 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 648 ns/op 322.37 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 500000 2864 ns/op 285.90 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 2820 ns/op 290.41 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1801 ns/op 207.09 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1813 ns/op 205.70 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 1000000 1839 ns/op 459.88 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 1000000 2018 ns/op 379.50 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 300000 5149 ns/op 344.29 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 300000 5018 ns/op 353.26 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1065 ns/op 453.50 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1079 ns/op 424.46 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 100000 11788 ns/op 350.34 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 200000 11113 ns/op 350.03 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 10000000 199 ns/op 355.77 MB/s +BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 359.40 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 5000000 246 ns/op 271.79 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 2000000 801 ns/op 227.02 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 2000000 810 ns/op 224.64 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 80.9 ns/op 197.77 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 201 ns/op 311.92 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 460 ns/op 323.74 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 318 ns/op 245.16 MB/s +BenchmarkTreeProtoUnmarshal-8 5000000 308 ns/op 333.66 MB/s +BenchmarkOrBranchProtoUnmarshal-8 2000000 801 ns/op 305.77 MB/s +BenchmarkAndBranchProtoUnmarshal-8 2000000 786 ns/op 311.55 MB/s +BenchmarkLeafProtoUnmarshal-8 10000000 221 ns/op 437.02 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 3000000 564 ns/op 256.77 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 2000000 734 ns/op 249.07 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1259 ns/op 263.56 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 3000000 473 ns/op 295.86 MB/s +BenchmarkNilProtoUnmarshal-8 10000000 138 ns/op 252.17 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 10000000 143 ns/op 258.45 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 10000000 203 ns/op 201.75 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 3000000 461 ns/op 127.85 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 3000000 445 ns/op 132.38 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 199 ns/op 205.22 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 199 ns/op 205.47 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 203 ns/op 201.78 MB/s +BenchmarkTimerProtoUnmarshal-8 10000000 224 ns/op 468.19 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 2000000 653 ns/op 123.97 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1349 ns/op 117.08 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 936 ns/op 247.70 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 421 ns/op 282.31 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 224 ns/op 364.55 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 2000000 918 ns/op 242.79 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 663 ns/op 315.02 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 5000000 360 ns/op 302.50 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 455 ns/op 504.73 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 667 ns/op 313.20 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2908 ns/op 281.59 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2668 ns/op 359.44 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 926 ns/op 231.07 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 471 ns/op 316.30 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 267 ns/op 168.48 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 341 ns/op 237.47 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 20000000 85.0 ns/op 529.53 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 408 ns/op 230.38 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 45.5 ns/op 109.87 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 261 ns/op 340.78 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.2 ns/op 115.70 MB/s +BenchmarkNodeProtoUnmarshal-8 5000000 310 ns/op 325.74 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 310 ns/op 254.37 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 294 ns/op 281.53 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 308 ns/op 256.49 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1040 ns/op 221.03 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1039 ns/op 221.20 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 10000000 220 ns/op 372.18 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 153.117s diff --git a/deps/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt b/deps/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt new file mode 100644 index 000000000..424080a83 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/unsafeboth +BenchmarkNidOptNativeProtoMarshal-8 10000000 235 ns/op 976.65 MB/s +BenchmarkNinOptNativeProtoMarshal-8 5000000 265 ns/op 788.37 MB/s +BenchmarkNidRepNativeProtoMarshal-8 1000000 1011 ns/op 810.06 MB/s +BenchmarkNinRepNativeProtoMarshal-8 1000000 1004 ns/op 815.63 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 2000000 958 ns/op 389.24 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 2000000 968 ns/op 385.16 MB/s +BenchmarkNidOptStructProtoMarshal-8 2000000 979 ns/op 863.95 MB/s +BenchmarkNinOptStructProtoMarshal-8 2000000 946 ns/op 808.91 MB/s +BenchmarkNidRepStructProtoMarshal-8 500000 2495 ns/op 710.38 MB/s +BenchmarkNinRepStructProtoMarshal-8 500000 2265 ns/op 782.62 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 3000000 561 ns/op 860.52 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 3000000 538 ns/op 849.81 MB/s +BenchmarkNidNestedStructProtoMarshal-8 200000 7308 ns/op 565.10 MB/s +BenchmarkNinNestedStructProtoMarshal-8 200000 6016 ns/op 646.61 MB/s +BenchmarkNidOptCustomProtoMarshal-8 20000000 97.3 ns/op 729.87 MB/s +BenchmarkCustomDashProtoMarshal-8 20000000 92.5 ns/op 886.05 MB/s +BenchmarkNinOptCustomProtoMarshal-8 20000000 97.4 ns/op 687.82 MB/s +BenchmarkNidRepCustomProtoMarshal-8 5000000 258 ns/op 705.25 MB/s +BenchmarkNinRepCustomProtoMarshal-8 5000000 258 ns/op 704.21 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 69.0 ns/op 231.80 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 10000000 138 ns/op 453.62 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 251 ns/op 591.44 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 208 ns/op 373.73 MB/s +BenchmarkTreeProtoMarshal-8 10000000 154 ns/op 664.72 MB/s +BenchmarkOrBranchProtoMarshal-8 5000000 343 ns/op 712.72 MB/s +BenchmarkAndBranchProtoMarshal-8 5000000 344 ns/op 710.24 MB/s +BenchmarkLeafProtoMarshal-8 20000000 117 ns/op 824.42 MB/s +BenchmarkDeepTreeProtoMarshal-8 5000000 247 ns/op 585.23 MB/s +BenchmarkADeepBranchProtoMarshal-8 5000000 301 ns/op 606.06 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 3000000 595 ns/op 557.97 MB/s +BenchmarkDeepLeafProtoMarshal-8 10000000 206 ns/op 676.59 MB/s +BenchmarkNilProtoMarshal-8 30000000 51.2 ns/op 682.93 MB/s +BenchmarkNidOptEnumProtoMarshal-8 20000000 62.0 ns/op 596.44 MB/s +BenchmarkNinOptEnumProtoMarshal-8 20000000 78.6 ns/op 521.93 MB/s +BenchmarkNidRepEnumProtoMarshal-8 10000000 184 ns/op 320.25 MB/s +BenchmarkNinRepEnumProtoMarshal-8 10000000 184 ns/op 319.78 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 78.1 ns/op 525.05 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 77.6 ns/op 528.30 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 79.1 ns/op 518.59 MB/s +BenchmarkTimerProtoMarshal-8 20000000 103 ns/op 1011.16 MB/s +BenchmarkMyExtendableProtoMarshal-8 3000000 465 ns/op 174.04 MB/s +BenchmarkOtherExtenableProtoMarshal-8 2000000 1028 ns/op 153.66 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 5000000 283 ns/op 818.76 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 141 ns/op 838.57 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 94.1 ns/op 871.31 MB/s +BenchmarkNestedScopeProtoMarshal-8 5000000 259 ns/op 857.99 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 272 ns/op 768.10 MB/s +BenchmarkCustomContainerProtoMarshal-8 10000000 141 ns/op 769.72 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 10000000 237 ns/op 968.65 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 290 ns/op 719.58 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1006 ns/op 813.87 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1296 ns/op 739.54 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 300 ns/op 712.96 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 247 ns/op 601.55 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 20000000 107 ns/op 417.49 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 20000000 116 ns/op 695.54 MB/s +BenchmarkUnrecognizedProtoMarshal-8 20000000 66.8 ns/op 673.51 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 171 ns/op 548.84 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 46.7 ns/op 107.10 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 126 ns/op 700.99 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 43.8 ns/op 114.23 MB/s +BenchmarkNodeProtoMarshal-8 10000000 119 ns/op 844.78 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 639.73 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 126 ns/op 657.86 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 641.02 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 5000000 386 ns/op 595.49 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 5000000 382 ns/op 601.83 MB/s +BenchmarkProtoTypeProtoMarshal-8 20000000 94.3 ns/op 869.89 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/unsafeboth 147.234s diff --git a/deps/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt b/deps/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt new file mode 100644 index 000000000..751009e50 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/unsafeboth +BenchmarkNidOptNativeProtoUnmarshal-8 3000000 425 ns/op 540.14 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 612 ns/op 341.01 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 500000 2884 ns/op 283.98 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 2809 ns/op 291.49 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1806 ns/op 206.53 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1769 ns/op 210.78 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 1000000 1820 ns/op 464.71 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 1000000 1932 ns/op 396.30 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 300000 5074 ns/op 349.42 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 300000 4891 ns/op 362.49 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1034 ns/op 466.75 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1061 ns/op 431.37 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 200000 11579 ns/op 356.66 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 200000 10862 ns/op 358.12 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 10000000 202 ns/op 350.76 MB/s +BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 358.70 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 5000000 245 ns/op 272.41 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 2000000 810 ns/op 224.66 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 2000000 812 ns/op 224.11 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 73.2 ns/op 218.58 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 194 ns/op 323.57 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 459 ns/op 324.42 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 315 ns/op 247.13 MB/s +BenchmarkTreeProtoUnmarshal-8 5000000 307 ns/op 335.37 MB/s +BenchmarkOrBranchProtoUnmarshal-8 2000000 782 ns/op 313.01 MB/s +BenchmarkAndBranchProtoUnmarshal-8 2000000 776 ns/op 315.38 MB/s +BenchmarkLeafProtoUnmarshal-8 10000000 218 ns/op 443.71 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 3000000 565 ns/op 256.61 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 2000000 734 ns/op 249.27 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1263 ns/op 262.80 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 3000000 476 ns/op 294.03 MB/s +BenchmarkNilProtoUnmarshal-8 10000000 137 ns/op 254.01 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 10000000 141 ns/op 260.58 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 10000000 200 ns/op 204.30 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 3000000 449 ns/op 131.35 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 3000000 459 ns/op 128.30 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 203 ns/op 201.59 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 201 ns/op 203.75 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 205 ns/op 199.16 MB/s +BenchmarkTimerProtoUnmarshal-8 10000000 223 ns/op 469.62 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 2000000 654 ns/op 123.72 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1353 ns/op 116.72 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 919 ns/op 252.43 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 427 ns/op 278.50 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 216 ns/op 378.01 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 2000000 893 ns/op 249.72 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 671 ns/op 311.36 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 5000000 351 ns/op 310.13 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 446 ns/op 514.92 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 652 ns/op 320.55 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2841 ns/op 288.23 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2639 ns/op 363.30 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 919 ns/op 232.73 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 461 ns/op 322.60 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 270 ns/op 166.20 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 353 ns/op 228.99 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 20000000 85.7 ns/op 525.21 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 415 ns/op 226.40 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 42.6 ns/op 117.47 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 259 ns/op 343.44 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.2 ns/op 115.84 MB/s +BenchmarkNodeProtoUnmarshal-8 5000000 306 ns/op 329.03 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 308 ns/op 256.11 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 292 ns/op 284.10 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 306 ns/op 258.01 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1049 ns/op 219.19 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1046 ns/op 219.68 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 10000000 221 ns/op 370.99 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/unsafeboth 151.728s diff --git a/deps/github.com/gogo/protobuf/test/moredefaults/Makefile b/deps/github.com/gogo/protobuf/test/moredefaults/Makefile new file mode 100644 index 000000000..0d4f698dd --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/moredefaults/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. md.proto) diff --git a/deps/github.com/gogo/protobuf/test/moredefaults/md.pb.go b/deps/github.com/gogo/protobuf/test/moredefaults/md.pb.go new file mode 100644 index 000000000..2abe65cb7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/moredefaults/md.pb.go @@ -0,0 +1,363 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: md.proto + +package moredefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import example "github.com/gogo/protobuf/test/example" + +import bytes "bytes" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MoreDefaultsB struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MoreDefaultsB) Reset() { *m = MoreDefaultsB{} } +func (m *MoreDefaultsB) String() string { return proto.CompactTextString(m) } +func (*MoreDefaultsB) ProtoMessage() {} +func (*MoreDefaultsB) Descriptor() ([]byte, []int) { + return fileDescriptor_md_dba3fb70ca5eb304, []int{0} +} +func (m *MoreDefaultsB) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MoreDefaultsB.Unmarshal(m, b) +} +func (m *MoreDefaultsB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MoreDefaultsB.Marshal(b, m, deterministic) +} +func (dst *MoreDefaultsB) XXX_Merge(src proto.Message) { + xxx_messageInfo_MoreDefaultsB.Merge(dst, src) +} +func (m *MoreDefaultsB) XXX_Size() int { + return xxx_messageInfo_MoreDefaultsB.Size(m) +} +func (m *MoreDefaultsB) XXX_DiscardUnknown() { + xxx_messageInfo_MoreDefaultsB.DiscardUnknown(m) +} + +var xxx_messageInfo_MoreDefaultsB proto.InternalMessageInfo + +func (m *MoreDefaultsB) GetField1() string { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return "" +} + +type MoreDefaultsA struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,def=1234" json:"Field1,omitempty"` + Field2 int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2"` + B1 *MoreDefaultsB `protobuf:"bytes,3,opt,name=B1" json:"B1,omitempty"` + B2 MoreDefaultsB `protobuf:"bytes,4,opt,name=B2" json:"B2"` + A1 *example.A `protobuf:"bytes,5,opt,name=A1" json:"A1,omitempty"` + A2 example.A `protobuf:"bytes,6,opt,name=A2" json:"A2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MoreDefaultsA) Reset() { *m = MoreDefaultsA{} } +func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) } +func (*MoreDefaultsA) ProtoMessage() {} +func (*MoreDefaultsA) Descriptor() ([]byte, []int) { + return fileDescriptor_md_dba3fb70ca5eb304, []int{1} +} +func (m *MoreDefaultsA) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MoreDefaultsA.Unmarshal(m, b) +} +func (m *MoreDefaultsA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MoreDefaultsA.Marshal(b, m, deterministic) +} +func (dst *MoreDefaultsA) XXX_Merge(src proto.Message) { + xxx_messageInfo_MoreDefaultsA.Merge(dst, src) +} +func (m *MoreDefaultsA) XXX_Size() int { + return xxx_messageInfo_MoreDefaultsA.Size(m) +} +func (m *MoreDefaultsA) XXX_DiscardUnknown() { + xxx_messageInfo_MoreDefaultsA.DiscardUnknown(m) +} + +var xxx_messageInfo_MoreDefaultsA proto.InternalMessageInfo + +const Default_MoreDefaultsA_Field1 int64 = 1234 + +func (m *MoreDefaultsA) GetField1() int64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_MoreDefaultsA_Field1 +} + +func (m *MoreDefaultsA) GetField2() int64 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *MoreDefaultsA) GetB1() *MoreDefaultsB { + if m != nil { + return m.B1 + } + return nil +} + +func (m *MoreDefaultsA) GetB2() MoreDefaultsB { + if m != nil { + return m.B2 + } + return MoreDefaultsB{} +} + +func (m *MoreDefaultsA) GetA1() *example.A { + if m != nil { + return m.A1 + } + return nil +} + +func (m *MoreDefaultsA) GetA2() example.A { + if m != nil { + return m.A2 + } + return example.A{} +} + +func init() { + proto.RegisterType((*MoreDefaultsB)(nil), "moredefaults.MoreDefaultsB") + proto.RegisterType((*MoreDefaultsA)(nil), "moredefaults.MoreDefaultsA") +} +func (this *MoreDefaultsB) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MoreDefaultsB) + if !ok { + that2, ok := that.(MoreDefaultsB) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MoreDefaultsA) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MoreDefaultsA) + if !ok { + that2, ok := that.(MoreDefaultsA) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.B1.Equal(that1.B1) { + return false + } + if !this.B2.Equal(&that1.B2) { + return false + } + if !this.A1.Equal(that1.A1) { + return false + } + if !this.A2.Equal(&that1.A2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedMoreDefaultsB(r randyMd, easy bool) *MoreDefaultsB { + this := &MoreDefaultsB{} + if r.Intn(10) != 0 { + v1 := string(randStringMd(r)) + this.Field1 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMd(r, 2) + } + return this +} + +func NewPopulatedMoreDefaultsA(r randyMd, easy bool) *MoreDefaultsA { + this := &MoreDefaultsA{} + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + this.Field2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + if r.Intn(10) != 0 { + this.B1 = NewPopulatedMoreDefaultsB(r, easy) + } + v3 := NewPopulatedMoreDefaultsB(r, easy) + this.B2 = *v3 + if r.Intn(10) != 0 { + this.A1 = example.NewPopulatedA(r, easy) + } + v4 := example.NewPopulatedA(r, easy) + this.A2 = *v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMd(r, 7) + } + return this +} + +type randyMd interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMd(r randyMd) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMd(r randyMd) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneMd(r) + } + return string(tmps) +} +func randUnrecognizedMd(r randyMd, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMd(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMd(dAtA []byte, r randyMd, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateMd(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMd(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMd(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("md.proto", fileDescriptor_md_dba3fb70ca5eb304) } + +var fileDescriptor_md_dba3fb70ca5eb304 = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc8, 0x4d, 0xd1, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc9, 0xcd, 0x2f, 0x4a, 0x4d, 0x49, 0x4d, 0x4b, 0x2c, 0xcd, + 0x29, 0x29, 0x96, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, + 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, + 0x59, 0xca, 0x18, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0xfd, 0xd4, 0x8a, 0xc4, 0xdc, 0x82, 0x9c, + 0x54, 0x18, 0x0d, 0xd1, 0xa4, 0xa4, 0xce, 0xc5, 0xeb, 0x9b, 0x5f, 0x94, 0xea, 0x02, 0xb5, 0xd3, + 0x49, 0x48, 0x8c, 0x8b, 0xcd, 0x2d, 0x33, 0x35, 0x27, 0xc5, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, + 0x33, 0x08, 0xca, 0x53, 0x7a, 0xcc, 0x88, 0xaa, 0xd2, 0x51, 0x48, 0x06, 0x45, 0x25, 0xb3, 0x15, + 0x8b, 0xa1, 0x91, 0xb1, 0x09, 0x4c, 0x3d, 0x5c, 0xd6, 0x48, 0x82, 0x09, 0x24, 0xeb, 0xc4, 0x72, + 0xe2, 0x9e, 0x3c, 0x03, 0x54, 0xd6, 0x48, 0x48, 0x9b, 0x8b, 0xc9, 0xc9, 0x50, 0x82, 0x59, 0x81, + 0x51, 0x83, 0xdb, 0x48, 0x5a, 0x0f, 0xd9, 0xd7, 0x7a, 0x28, 0xce, 0x09, 0x62, 0x72, 0x32, 0x14, + 0x32, 0xe4, 0x62, 0x72, 0x32, 0x92, 0x60, 0x21, 0xa8, 0x18, 0x6a, 0x07, 0x93, 0x93, 0x91, 0x90, + 0x38, 0x17, 0x93, 0xa3, 0xa1, 0x04, 0x2b, 0x58, 0x0b, 0xbb, 0x1e, 0xc8, 0xff, 0x7a, 0x8e, 0x41, + 0x4c, 0x8e, 0x86, 0x42, 0xb2, 0x5c, 0x4c, 0x8e, 0x46, 0x12, 0x6c, 0x28, 0x12, 0x30, 0x7d, 0x8e, + 0x46, 0x4e, 0x02, 0x27, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, + 0x8e, 0x47, 0x72, 0x8c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xf0, 0x3f, 0xeb, 0x9d, 0x01, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/moredefaults/md.proto b/deps/github.com/gogo/protobuf/test/moredefaults/md.proto new file mode 100644 index 000000000..7f5b2190c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/moredefaults/md.proto @@ -0,0 +1,53 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package moredefaults; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/example/example.proto"; + +option (gogoproto.goproto_getters_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message MoreDefaultsB { + optional string Field1 = 1; +} + +message MoreDefaultsA { + optional int64 Field1 = 1 [default=1234]; + optional int64 Field2 = 2 [(gogoproto.nullable) = false]; + optional MoreDefaultsB B1 = 3; + optional MoreDefaultsB B2 = 4 [(gogoproto.nullable) = false]; + optional test.A A1 = 5; + optional test.A A2 = 6 [(gogoproto.nullable) = false]; +} + diff --git a/deps/github.com/gogo/protobuf/test/moredefaults/md_test.go b/deps/github.com/gogo/protobuf/test/moredefaults/md_test.go new file mode 100644 index 000000000..45a8eac56 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/moredefaults/md_test.go @@ -0,0 +1,61 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package moredefaults + +import ( + "testing" + + test "github.com/gogo/protobuf/test/example" +) + +func TestDefaults(t *testing.T) { + b := MoreDefaultsB{} + aa := test.A{} + a := &MoreDefaultsA{} + b2 := a.GetB2() + a2 := a.GetA2() + if a.GetField1() != 1234 { + t.Fatalf("Field1 wrong") + } + if a.GetField2() != 0 { + t.Fatalf("Field2 wrong") + } + if a.GetB1() != nil { + t.Fatalf("B1 wrong") + } + if b2.GetField1() != b.GetField1() { + t.Fatalf("B2 wrong") + } + if a.GetA1() != nil { + t.Fatalf("A1 wrong") + } + if a2.GetNumber() != aa.GetNumber() { + t.Fatalf("A2 wrong") + } +} diff --git a/deps/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go b/deps/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go new file mode 100644 index 000000000..9b85e1190 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go @@ -0,0 +1,176 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: md.proto + +package moredefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/example" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMoreDefaultsBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMoreDefaultsAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMoreDefaultsBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsB{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMoreDefaultsAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsA{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMoreDefaultsBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/nopackage/Makefile b/deps/github.com/gogo/protobuf/test/nopackage/Makefile new file mode 100644 index 000000000..0aa49e25b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/nopackage/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc-min-version --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. nopackage.proto) diff --git a/deps/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go b/deps/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go new file mode 100644 index 000000000..257e8d6c2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go @@ -0,0 +1,422 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: nopackage.proto + +package nopackage + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type M struct { + F map[string]float64 `protobuf:"bytes,1,rep,name=f" json:"f,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_nopackage_085d7f4350f51d1d, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return m.Size() +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func (m *M) GetF() map[string]float64 { + if m != nil { + return m.F + } + return nil +} + +func init() { + proto.RegisterType((*M)(nil), "M") + proto.RegisterMapType((map[string]float64)(nil), "M.FEntry") +} +func (m *M) 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 *M) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.F) > 0 { + for k := range m.F { + dAtA[i] = 0xa + i++ + v := m.F[k] + mapSize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 + i = encodeVarintNopackage(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintNopackage(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintNopackage(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 *M) Size() (n int) { + var l int + _ = l + if len(m.F) > 0 { + for k, v := range m.F { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovNopackage(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovNopackage(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozNopackage(x uint64) (n int) { + return sovNopackage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *M) 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 ErrIntOverflowNopackage + } + 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: M: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNopackage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthNopackage + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipNopackage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthNopackage + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.F[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNopackage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthNopackage + } + 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 skipNopackage(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, ErrIntOverflowNopackage + } + 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, ErrIntOverflowNopackage + } + 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, ErrIntOverflowNopackage + } + 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, ErrInvalidLengthNopackage + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNopackage + } + 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 := skipNopackage(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 ( + ErrInvalidLengthNopackage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNopackage = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("nopackage.proto", fileDescriptor_nopackage_085d7f4350f51d1d) } + +var fileDescriptor_nopackage_085d7f4350f51d1d = []byte{ + // 134 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0xcb, 0x2f, 0x48, + 0x4c, 0xce, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x0a, 0xe2, 0x62, 0xf4, + 0x15, 0x12, 0xe7, 0x62, 0x4c, 0x93, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0xe2, 0xd4, 0xf3, 0xd5, + 0x73, 0x73, 0xcd, 0x2b, 0x29, 0xaa, 0x0c, 0x62, 0x4c, 0x93, 0x32, 0xe1, 0x62, 0x83, 0x70, 0x84, + 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, + 0x11, 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xc6, 0x20, 0x08, + 0xc7, 0x8a, 0xc9, 0x82, 0xd1, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, + 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x5b, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x62, 0x62, + 0xb2, 0xed, 0x7b, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/nopackage/nopackage.proto b/deps/github.com/gogo/protobuf/test/nopackage/nopackage.proto new file mode 100644 index 000000000..cfaed76ba --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/nopackage/nopackage.proto @@ -0,0 +1,33 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +message M { + map f = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/nopackage/nopackage_test.go b/deps/github.com/gogo/protobuf/test/nopackage/nopackage_test.go new file mode 100644 index 000000000..3318a29cd --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/nopackage/nopackage_test.go @@ -0,0 +1,38 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package nopackage + +import ( + "testing" +) + +func TestNoPackage(t *testing.T) { + //should compile + _ = (&M{}).Marshal +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/Makefile b/deps/github.com/gogo/protobuf/test/oneof/Makefile new file mode 100644 index 000000000..d9c0c4c36 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --version="2.6.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. one.proto diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go new file mode 100644 index 000000000..2f4bf06ce --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go @@ -0,0 +1,5551 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return m.Size() +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return m.Size() +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return m.Size() +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4179 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x6b, 0x6c, 0xe4, 0xd6, + 0x75, 0x16, 0xe7, 0x21, 0xcd, 0x9c, 0x19, 0x8d, 0xa8, 0x2b, 0xed, 0xee, 0xac, 0x1c, 0xcf, 0xee, + 0x8e, 0xed, 0x58, 0xb6, 0x63, 0xc9, 0xd6, 0x4a, 0xfb, 0x98, 0x6d, 0xe2, 0x8e, 0xa4, 0x59, 0xad, + 0x5c, 0x49, 0xa3, 0x50, 0x52, 0xfc, 0x08, 0x0a, 0x82, 0xe2, 0x5c, 0x8d, 0xb8, 0xcb, 0x21, 0x19, + 0x92, 0xb3, 0x6b, 0x2d, 0xfa, 0x63, 0x0b, 0xf7, 0x81, 0xa0, 0xe8, 0x2b, 0x2d, 0xd0, 0xc4, 0x75, + 0xdc, 0xa6, 0x40, 0xea, 0x34, 0x7d, 0x25, 0x4d, 0x9b, 0x26, 0xfd, 0xd5, 0x3f, 0x69, 0xfd, 0xab, + 0x70, 0xfe, 0x15, 0x45, 0x61, 0x78, 0x15, 0x03, 0x4d, 0x5b, 0xb7, 0x71, 0x5b, 0x17, 0x30, 0xea, + 0x3f, 0xc5, 0x7d, 0x91, 0x9c, 0x87, 0x96, 0xa3, 0x20, 0xb6, 0x7f, 0x49, 0x3c, 0xe7, 0x7c, 0x1f, + 0xcf, 0x3d, 0xf7, 0xdc, 0x73, 0xcf, 0xbd, 0x1c, 0xf8, 0xd1, 0x65, 0x38, 0xdb, 0xb4, 0xed, 0xa6, + 0x89, 0x67, 0x1d, 0xd7, 0xf6, 0xed, 0xdd, 0xf6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51, 0xfe, 0xe2, 0x30, + 0x4c, 0xf6, 0x5b, 0x33, 0x7d, 0x97, 0xef, 0x49, 0x18, 0xb6, 0xda, 0xad, 0x5d, 0xec, 0xd2, 0x20, + 0xa5, 0x15, 0xfe, 0x84, 0xaa, 0x90, 0x36, 0xb5, 0x5d, 0x6c, 0x16, 0x53, 0x67, 0xa5, 0xe9, 0xc2, + 0xdc, 0x63, 0x03, 0xad, 0xca, 0x99, 0x35, 0x02, 0x51, 0x18, 0x12, 0x7d, 0x0a, 0x52, 0xbc, 0x44, + 0x13, 0x86, 0x47, 0x07, 0x63, 0x20, 0x6b, 0x49, 0xa1, 0x38, 0x74, 0x1f, 0x64, 0xc9, 0x5f, 0x96, + 0x1b, 0xc3, 0xd4, 0xe7, 0x0c, 0x11, 0x90, 0xbc, 0x40, 0x53, 0x90, 0xa1, 0xcb, 0xa4, 0x81, 0xc5, + 0xd6, 0x16, 0x3c, 0x93, 0xc4, 0x6a, 0xe0, 0x3d, 0xad, 0x6d, 0xfa, 0xea, 0x4d, 0xcd, 0x6c, 0x63, + 0x9a, 0xf0, 0x59, 0x25, 0xcf, 0x85, 0x9f, 0x21, 0x32, 0x74, 0x06, 0x72, 0x6c, 0x55, 0x19, 0x56, + 0x03, 0xbf, 0x40, 0xab, 0x67, 0x5a, 0x61, 0x0b, 0x6d, 0x95, 0x48, 0xc8, 0xeb, 0xaf, 0x7b, 0xb6, + 0x25, 0x52, 0x93, 0xbe, 0x82, 0x08, 0xe8, 0xeb, 0x2f, 0x76, 0x17, 0xee, 0xfb, 0xfb, 0x0f, 0xaf, + 0x3b, 0xa7, 0xca, 0xdf, 0x4e, 0x40, 0x8a, 0xd6, 0x8b, 0x31, 0xc8, 0x6d, 0x3f, 0xb7, 0x59, 0x53, + 0x97, 0xeb, 0x3b, 0x8b, 0x6b, 0x35, 0x59, 0x42, 0x05, 0x00, 0x2a, 0xb8, 0xba, 0x56, 0xaf, 0x6e, + 0xcb, 0x89, 0xe0, 0x79, 0x75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f1, 0x41, 0xbc, 0x9f, 0x21, + 0x5b, 0xfe, 0xa6, 0xe6, 0xfa, 0xfc, 0xa8, 0xf1, 0x08, 0x90, 0x28, 0x59, 0xbe, 0xb1, 0x67, 0x60, + 0x97, 0x5f, 0xd8, 0xb0, 0x03, 0xc5, 0x58, 0x28, 0x67, 0x77, 0x36, 0x9f, 0x00, 0xe4, 0xd8, 0x9e, + 0xe1, 0x1b, 0x37, 0xb1, 0x6a, 0x58, 0xe2, 0x76, 0x87, 0x1c, 0x30, 0x52, 0x8a, 0x2c, 0x34, 0xab, + 0x96, 0x1f, 0x58, 0x5b, 0xb8, 0xa9, 0x75, 0x59, 0x93, 0x02, 0x9e, 0x54, 0x64, 0xa1, 0x09, 0xac, + 0xcf, 0x41, 0xbe, 0x61, 0xb7, 0x49, 0xd7, 0xc5, 0xec, 0xc8, 0x7e, 0x21, 0x29, 0x39, 0x26, 0x0b, + 0x4c, 0x78, 0x3f, 0x1d, 0x5e, 0x2b, 0xe5, 0x95, 0x1c, 0x93, 0x31, 0x93, 0x87, 0x61, 0x4c, 0x6b, + 0x36, 0x5d, 0x42, 0x2e, 0x88, 0xd8, 0x09, 0xa1, 0x10, 0x88, 0xa9, 0xe1, 0xd4, 0xd3, 0x90, 0x11, + 0x71, 0x20, 0x5b, 0x32, 0x89, 0x84, 0xea, 0xb0, 0x63, 0x6f, 0x62, 0x3a, 0xab, 0x64, 0x2c, 0xa1, + 0x3c, 0x07, 0x79, 0xc3, 0x53, 0xc3, 0x5b, 0xf2, 0xc4, 0xd9, 0xc4, 0x74, 0x46, 0xc9, 0x19, 0x5e, + 0x70, 0xc3, 0x58, 0x7e, 0x35, 0x01, 0x85, 0xce, 0x5b, 0x7e, 0xb4, 0x0c, 0x19, 0xd3, 0xd6, 0x35, + 0x9a, 0x5a, 0xec, 0x13, 0xd3, 0x74, 0xcc, 0x87, 0x81, 0x99, 0x35, 0x6e, 0xaf, 0x04, 0xc8, 0xa9, + 0x7f, 0x90, 0x20, 0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xf4, 0xde, 0x61, 0x69, + 0xe8, 0xce, 0x0f, 0x4a, 0x43, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x27, 0x0d, 0x8a, 0x92, + 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(*m.Sub))) + i += copy(dAtA[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) 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 *AllTypesOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) 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 *TwoOneofs) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field34))) + i += copy(dAtA[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field35 != nil { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field35))) + i += copy(dAtA[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) 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 *CustomOneof) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Stringy))) + i += copy(dAtA[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *AllTypesOneOf) 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 ErrIntOverflowOne + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *TwoOneofs) 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 ErrIntOverflowOne + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *CustomOneof) 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 ErrIntOverflowOne + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptor_one_1ca237849e17659c) } + +var fileDescriptor_one_1ca237849e17659c = []byte{ + // 596 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00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0x27, 0xf0, 0x39, 0x27, 0xf0, 0x25, 0x27, + 0x70, 0x9b, 0x13, 0x98, 0xe6, 0x04, 0xee, 0x72, 0x02, 0x3f, 0x72, 0x62, 0xdd, 0xe7, 0x04, 0x1e, + 0x72, 0x62, 0xdd, 0x7c, 0x27, 0xd6, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x65, 0xb5, 0xca, + 0x75, 0x04, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/both/one.proto b/deps/github.com/gogo/protobuf/test/oneof/combos/both/one.proto new file mode 100644 index 000000000..a72dde02f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/both/one.proto @@ -0,0 +1,103 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go new file mode 100644 index 000000000..f169ab7ab --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go @@ -0,0 +1,730 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go new file mode 100644 index 000000000..46716d712 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go @@ -0,0 +1,4676 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllTypesOneOf.Unmarshal(m, b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return m.Size() +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TwoOneofs.Unmarshal(m, b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return m.Size() +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomOneof.Unmarshal(m, b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return m.Size() +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4180 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x7a, 0x5d, 0x6c, 0x1c, 0xd7, + 0x75, 0x3f, 0x67, 0x3f, 0xc8, 0xdd, 0xb3, 0xcb, 0xe5, 0xf0, 0x92, 0x96, 0x56, 0x74, 0xbc, 0x92, + 0xd6, 0x76, 0x4c, 0xdb, 0x31, 0x69, 0x53, 0x24, 0x25, 0xad, 0xfe, 0x89, 0xff, 0x4b, 0x72, 0x45, + 0xd1, 0x25, 0xb9, 0xcc, 0x90, 0x8c, 0x3f, 0x82, 0x62, 0x30, 0x9c, 0xbd, 0x5c, 0x8e, 0x34, 0x3b, + 0x33, 0x99, 0x99, 0x95, 0x4c, 0xa1, 0x0f, 0x2a, 0xdc, 0x0f, 0x04, 0x45, 0xbf, 0xd2, 0x02, 0x4d, + 0x5c, 0xc7, 0x6d, 0x0a, 0xa4, 0x4e, 0xd3, 0xaf, 0xa4, 0x69, 0xd3, 0xa4, 0x4f, 0x7d, 0x49, 0xeb, + 0xa7, 0xc2, 0x79, 0x2b, 0x8a, 0xc2, 0xb0, 0x18, 0x03, 0x4d, 0x5b, 0xb7, 0x71, 0x5b, 0x3f, 0x18, + 0xf1, 0x4b, 0x71, 0xbf, 0x66, 0x66, 0x3f, 0xa8, 0x59, 0x06, 0xb5, 0xf3, 0x44, 0xce, 0x39, 0xe7, + 0xf7, 0x9b, 0x73, 0xcf, 0x3d, 0xf7, 0xdc, 0x73, 0xef, 0x2c, 0xfc, 0xe8, 0x32, 0x9c, 0x6b, 0xda, + 0x76, 0xd3, 0xc4, 0xb3, 0x8e, 0x6b, 0xfb, 0xf6, 0x5e, 0x7b, 0x7f, 0xb6, 0x81, 0x3d, 0xdd, 0x35, + 0x1c, 0xdf, 0x76, 0x67, 0xa8, 0x0c, 0x8d, 0x31, 0x8b, 0x19, 0x61, 0x51, 0xde, 0x80, 0xf1, 0xab, + 0x86, 0x89, 0x57, 0x02, 0xc3, 0x6d, 0xec, 0xa3, 0x4b, 0x90, 0xda, 0x37, 0x4c, 0x5c, 0x94, 0xce, + 0x25, 0xa7, 0x73, 0x73, 0x0f, 0xcd, 0x74, 0x81, 0x66, 0x3a, 0x11, 0x5b, 0x44, 0xac, 0x50, 0x44, + 0xf9, 0xed, 0x14, 0x4c, 0xf4, 0xd1, 0x22, 0x04, 0x29, 0x4b, 0x6b, 0x11, 0x46, 0x69, 0x3a, 0xab, + 0xd0, 0xff, 0x51, 0x11, 0x46, 0x1c, 0x4d, 0xbf, 0xa1, 0x35, 0x71, 0x31, 0x41, 0xc5, 0xe2, 0x11, + 0x95, 0x00, 0x1a, 0xd8, 0xc1, 0x56, 0x03, 0x5b, 0xfa, 0x61, 0x31, 0x79, 0x2e, 0x39, 0x9d, 0x55, + 0x22, 0x12, 0xf4, 0x38, 0x8c, 0x3b, 0xed, 0x3d, 0xd3, 0xd0, 0xd5, 0x88, 0x19, 0x9c, 0x4b, 0x4e, + 0xa7, 0x15, 0x99, 0x29, 0x56, 0x42, 0xe3, 0x47, 0x60, 0xec, 0x16, 0xd6, 0x6e, 0x44, 0x4d, 0x73, + 0xd4, 0xb4, 0x40, 0xc4, 0x11, 0xc3, 0x65, 0xc8, 0xb7, 0xb0, 0xe7, 0x69, 0x4d, 0xac, 0xfa, 0x87, + 0x0e, 0x2e, 0xa6, 0xe8, 0xe8, 0xcf, 0xf5, 0x8c, 0xbe, 0x7b, 0xe4, 0x39, 0x8e, 0xda, 0x39, 0x74, + 0x30, 0xaa, 0x42, 0x16, 0x5b, 0xed, 0x16, 0x63, 0x48, 0x1f, 0x13, 0xbf, 0x9a, 0xd5, 0x6e, 0x75, + 0xb3, 0x64, 0x08, 0x8c, 0x53, 0x8c, 0x78, 0xd8, 0xbd, 0x69, 0xe8, 0xb8, 0x38, 0x4c, 0x09, 0x1e, + 0xe9, 0x21, 0xd8, 0x66, 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 0xd2, 0x20, 0xa5, 0x15, 0xfe, 0x84, 0xaa, 0x90, 0x36, 0xb5, 0x3d, 0x6c, 0x16, 0x53, 0xe7, 0xa4, + 0xe9, 0xc2, 0xdc, 0xe3, 0x03, 0xad, 0xca, 0x99, 0x75, 0x02, 0x51, 0x18, 0x12, 0x7d, 0x0a, 0x52, + 0xbc, 0x44, 0x13, 0x86, 0xc7, 0x06, 0x63, 0x20, 0x6b, 0x49, 0xa1, 0x38, 0x74, 0x3f, 0x64, 0xc9, + 0x5f, 0x96, 0x1b, 0xc3, 0xd4, 0xe7, 0x0c, 0x11, 0x90, 0xbc, 0x40, 0x53, 0x90, 0xa1, 0xcb, 0xa4, + 0x81, 0xc5, 0xd6, 0x16, 0x3c, 0x93, 0xc4, 0x6a, 0xe0, 0x7d, 0xad, 0x6d, 0xfa, 0xea, 0x4d, 0xcd, + 0x6c, 0x63, 0x9a, 0xf0, 0x59, 0x25, 0xcf, 0x85, 0x9f, 0x21, 0x32, 0x74, 0x16, 0x72, 0x6c, 0x55, + 0x19, 0x56, 0x03, 0xbf, 0x48, 0xab, 0x67, 0x5a, 0x61, 0x0b, 0x6d, 0x8d, 0x48, 0xc8, 0xeb, 0xaf, + 0x7b, 0xb6, 0x25, 0x52, 0x93, 0xbe, 0x82, 0x08, 0xe8, 0xeb, 0x2f, 0x76, 0x17, 0xee, 0x07, 0xfa, + 0x0f, 0xaf, 0x3b, 0xa7, 0xca, 0xdf, 0x4e, 0x40, 0x8a, 0xd6, 0x8b, 0x31, 0xc8, 0xed, 0x3c, 0xbf, + 0x55, 0x53, 0x57, 0xea, 0xbb, 0x4b, 0xeb, 0x35, 0x59, 0x42, 0x05, 0x00, 0x2a, 0xb8, 0xba, 0x5e, + 0xaf, 0xee, 0xc8, 0x89, 0xe0, 0x79, 0x6d, 0x73, 0x67, 0x71, 0x5e, 0x4e, 0x06, 0x80, 0x5d, 0x26, + 0x48, 0x45, 0x0d, 0x2e, 0xcc, 0xc9, 0x69, 0x24, 0x43, 0x9e, 0x11, 0xac, 0x3d, 0x57, 0x5b, 0x59, + 0x9c, 0x97, 0x87, 0x3b, 0x25, 0x17, 0xe6, 0xe4, 0x11, 0x34, 0x0a, 0x59, 0x2a, 0x59, 0xaa, 0xd7, + 0xd7, 0xe5, 0x4c, 0xc0, 0xb9, 0xbd, 0xa3, 0xac, 0x6d, 0xae, 0xca, 0xd9, 0x80, 0x73, 0x55, 0xa9, + 0xef, 0x6e, 0xc9, 0x10, 0x30, 0x6c, 0xd4, 0xb6, 0xb7, 0xab, 0xab, 0x35, 0x39, 0x17, 0x58, 0x2c, + 0x3d, 0xbf, 0x53, 0xdb, 0x96, 0xf3, 0x1d, 0x6e, 0x5d, 0x98, 0x93, 0x47, 0x83, 0x57, 0xd4, 0x36, + 0x77, 0x37, 0xe4, 0x02, 0x1a, 0x87, 0x51, 0xf6, 0x0a, 0xe1, 0xc4, 0x58, 0x97, 0x68, 0x71, 0x5e, + 0x96, 0x43, 0x47, 0x18, 0xcb, 0x78, 0x87, 0x60, 0x71, 0x5e, 0x46, 0xe5, 0x65, 0x48, 0xd3, 0xec, + 0x42, 0x08, 0x0a, 0xeb, 0xd5, 0xa5, 0xda, 0xba, 0x5a, 0xdf, 0xda, 0x59, 0xab, 0x6f, 0x56, 0xd7, + 0x65, 0x29, 0x94, 0x29, 0xb5, 0x4f, 0xef, 0xae, 0x29, 0xb5, 0x15, 0x39, 0x11, 0x95, 0x6d, 0xd5, + 0xaa, 0x3b, 0xb5, 0x15, 0x39, 0x59, 0xd6, 0x61, 0xb2, 0x5f, 0x9d, 0xec, 0xbb, 0x32, 0x22, 0x53, + 0x9c, 0x38, 0x66, 0x8a, 0x29, 0x57, 0xcf, 0x14, 0xff, 0x20, 0x01, 0x13, 0x7d, 0xf6, 0x8a, 0xbe, + 0x2f, 0x79, 0x1a, 0xd2, 0x2c, 0x45, 0xd9, 0xee, 0xf9, 0x68, 0xdf, 0x4d, 0x87, 0x26, 0x6c, 0xcf, + 0x0e, 0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, 0xce, 0x39, 0xd9, 0x93, 0x19, 0x84, 0x76, + 0x0b, 0x84, 0x3c, 0x98, 0xcb, 0x01, 0x38, 0x7f, 0x97, 0x73, 0x22, 0x8e, 0x15, 0x53, 0x4a, 0x18, + 0x9f, 0x81, 0xf1, 0x9b, 0xd8, 0xdd, 0xb3, 0x3d, 0x7e, 0x4b, 0x33, 0x00, 0xdd, 0x2b, 0x9c, 0x6e, + 0x8c, 0x03, 0xe9, 0xb5, 0x0d, 0xe1, 0xba, 0x0c, 0x99, 0x7d, 0x4d, 0xc7, 0x03, 0x50, 0x7c, 0x99, + 0x53, 0x8c, 0x10, 0x7b, 0x02, 0xad, 0x42, 0xbe, 0x69, 0xf3, 0x9d, 0x29, 0x1e, 0xfe, 0x2a, 0x87, + 0xe7, 0x04, 0x86, 0x53, 0x38, 0xb6, 0xd3, 0x36, 0xc9, 0xb6, 0x15, 0x4f, 0xf1, 0x7b, 0x82, 0x42, + 0x60, 0x38, 0xc5, 0x09, 0xc2, 0xfa, 0xfb, 0x82, 0xc2, 0x8b, 0xc4, 0xf3, 0x69, 0xc8, 0xd9, 0x96, + 0x79, 0x68, 0x5b, 0x83, 0x38, 0xf1, 0x15, 0xce, 0x00, 0x1c, 0x42, 0x08, 0xae, 0x40, 0x76, 0xd0, + 0x89, 0xf8, 0xea, 0x3b, 0x62, 0x79, 0x88, 0x19, 0x58, 0x85, 0x31, 0x51, 0xa0, 0x0c, 0xdb, 0x1a, + 0x80, 0xe2, 0x0f, 0x39, 0x45, 0x21, 0x02, 0xe3, 0xc3, 0xf0, 0xb1, 0xe7, 0x37, 0xf1, 0x20, 0x24, + 0xaf, 0x89, 0x61, 0x70, 0x08, 0x0f, 0xe5, 0x1e, 0xb6, 0xf4, 0x83, 0xc1, 0x18, 0xbe, 0x26, 0x42, + 0x29, 0x30, 0x84, 0x62, 0x19, 0x46, 0x5b, 0x9a, 0xeb, 0x1d, 0x68, 0xe6, 0x40, 0xd3, 0xf1, 0x47, + 0x9c, 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, 0xc9, 0x7f, 0x7a, 0xf3, 0xec, 0x27, 0x8e, 0x5d, 0x41, 0x24, 0x76, + 0xb3, 0xac, 0x06, 0xcf, 0xec, 0x1a, 0x96, 0xff, 0xd4, 0xdc, 0x25, 0x12, 0xe0, 0x90, 0x05, 0xed, + 0x42, 0x66, 0x59, 0xf3, 0xe8, 0xaf, 0xf3, 0xa8, 0xeb, 0xa9, 0xa5, 0x8b, 0x3f, 0x7e, 0xf3, 0xec, + 0x85, 0x18, 0x46, 0x5e, 0x1e, 0x67, 0x36, 0x0e, 0x09, 0xeb, 0xe2, 0x3c, 0x81, 0x5f, 0x1b, 0x52, + 0x02, 0x2a, 0x34, 0x27, 0x5c, 0xdd, 0xd4, 0x5a, 0xec, 0xc7, 0x44, 0xc9, 0x25, 0xf9, 0xe8, 0xcd, + 0xb3, 0xf9, 0x8d, 0xc3, 0x50, 0x1e, 0xba, 0x42, 0x9e, 0x96, 0x32, 0x30, 0xcc, 0x5c, 0x5d, 0x5a, + 0x79, 0xfd, 0x6e, 0x69, 0xe8, 0x8d, 0xbb, 0xa5, 0xa1, 0x7f, 0xbc, 0x5b, 0x1a, 0x7a, 0xeb, 0x6e, + 0x49, 0x7a, 0xf7, 0x6e, 0x49, 0x7a, 0xff, 0x6e, 0x49, 0xba, 0x73, 0x54, 0x92, 0xbe, 0x76, 0x54, + 0x92, 0xbe, 0x71, 0x54, 0x92, 0xbe, 0x73, 0x54, 0x92, 0x5e, 0x3f, 0x2a, 0x49, 0x6f, 0x1c, 0x95, + 0x86, 0xde, 0x3a, 0x2a, 0x49, 0x3f, 0x3c, 0x2a, 0x0d, 0xbd, 0x7b, 0x54, 0x92, 0xde, 0x3f, 0x2a, + 0x0d, 0xdd, 0xf9, 0x41, 0x69, 0xe8, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x05, 0xb9, 0x2a, + 0x97, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(*m.Sub))) + i += copy(dAtA[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) 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 *AllTypesOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) 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 *TwoOneofs) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field34))) + i += copy(dAtA[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field35 != nil { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field35))) + i += copy(dAtA[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) 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 *CustomOneof) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Stringy))) + i += copy(dAtA[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptor_one_2f6d76776b72edfd) } + +var fileDescriptor_one_2f6d76776b72edfd = []byte{ + // 601 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x4f, 0xdb, 0x4e, + 0x14, 0x00, 0xf0, 0x7b, 0x84, 0x84, 0x70, 0x09, 0x5f, 0xf2, 0xf5, 0x74, 0x65, 0x38, 0x4e, 0x69, + 0x2b, 0xdd, 0x50, 0x12, 0xe2, 0x24, 0xfc, 0x18, 0x6b, 0xaa, 0x2a, 0x0b, 0x45, 0x32, 0x30, 0xa3, + 0x98, 0x1e, 0x21, 0x52, 0xe2, 0x43, 0x39, 0x5b, 0xc8, 0x1b, 0x7f, 0x43, 0xff, 0x8a, 0x8e, 0x1d, + 0xfb, 0x27, 0x30, 0x32, 0x56, 0x1d, 0x22, 0xec, 0x2e, 0x1d, 0x19, 0x51, 0xa7, 0xea, 0x6c, 0x72, + 0x57, 0xa9, 0xaa, 0xba, 0x74, 0x8a, 0xdf, 0xfb, 0xf8, 0x5e, 0xde, 0xf3, 0xdd, 0xe1, 0x8d, 0x73, + 0x39, 0x0d, 0xa4, 0x6a, 0x4f, 0x87, 0x33, 0x75, 0x39, 0x9c, 0x88, 0x59, 0x5b, 0x86, 0xa2, 0x75, + 0x35, 0x93, 0x91, 0x74, 0x4a, 0x32, 0x14, 0x1b, 0x5b, 0xa3, 0x71, 0x74, 0x19, 0x07, 0xad, 0x73, + 0x39, 0x6d, 0x8f, 0xe4, 0x48, 0xb6, 0x73, 0x0b, 0xe2, 0x8b, 0x3c, 0xca, 0x83, 0xfc, 0xa9, 0x58, + 0xd3, 0x7c, 0x86, 0xcb, 0xc7, 0x71, 0x10, 0x24, 0x4e, 0x03, 0x97, 0x54, 0x1c, 0x10, 0x60, 0xc0, + 0x57, 0x7d,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 0x8a, + 0x8e, 0xbc, 0x2a, 0xae, 0x14, 0xad, 0x7a, 0x6f, 0x6e, 0x53, 0x8a, 0xee, 0x52, 0x8a, 0xbe, 0xa4, + 0x14, 0xdd, 0xa7, 0x14, 0x1e, 0x52, 0x0a, 0x8f, 0x29, 0x85, 0x9b, 0x8c, 0xc2, 0xc7, 0x8c, 0xc2, + 0xa7, 0x8c, 0xc2, 0xe7, 0x8c, 0xc2, 0x6d, 0x46, 0xe1, 0x2e, 0xa3, 0xe8, 0x3e, 0xa3, 0xf0, 0x3d, + 0xa3, 0xe8, 0x21, 0xa3, 0xf0, 0x98, 0x51, 0x74, 0xf3, 0x8d, 0xa2, 0x9f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xcf, 0xa5, 0xfc, 0x33, 0x7a, 0x04, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto b/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto new file mode 100644 index 000000000..d9a8204e2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto @@ -0,0 +1,103 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go new file mode 100644 index 000000000..32ee49205 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go @@ -0,0 +1,730 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go new file mode 100644 index 000000000..a814bf9c9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go @@ -0,0 +1,4268 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllTypesOneOf.Unmarshal(m, b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return xxx_messageInfo_AllTypesOneOf.Size(m) +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TwoOneofs.Unmarshal(m, b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return xxx_messageInfo_TwoOneofs.Size(m) +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomOneof.Unmarshal(m, b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return xxx_messageInfo_CustomOneof.Size(m) +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4181 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00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x56, 0x71, 0x84, 0x92, 0x3c, 0xdc, 0x67, 0x16, 0xb1, 0xd9, 0xe8, 0xa6, 0x08, 0x71, 0x68, 0x11, + 0x46, 0x6c, 0xc7, 0x37, 0x6c, 0xcb, 0x2b, 0x66, 0xce, 0x49, 0xd3, 0xb9, 0xb9, 0x8f, 0xf5, 0x4d, + 0x84, 0x3a, 0xb3, 0x51, 0x84, 0x31, 0x5a, 0x03, 0xd9, 0xb3, 0xdb, 0xae, 0x8e, 0x55, 0xdd, 0x6e, + 0x60, 0xd5, 0xb0, 0xf6, 0xed, 0x62, 0x96, 0x12, 0x9c, 0xed, 0x1d, 0x08, 0x35, 0x5c, 0xb6, 0x1b, + 0x78, 0xcd, 0xda, 0xb7, 0x95, 0x82, 0xd7, 0xf1, 0x8c, 0x4e, 0xc1, 0xb0, 0x77, 0x68, 0xf9, 0xda, + 0x8b, 0xc5, 0x3c, 0xcd, 0x10, 0xfe, 0x54, 0xfe, 0xee, 0x30, 0x8c, 0x0d, 0x92, 0x62, 0x57, 0x20, + 0xbd, 0x4f, 0x46, 0x59, 0x4c, 0x9c, 0x24, 0x06, 0x0c, 0xd3, 0x19, 0xc4, 0xe1, 0x1f, 0x33, 0x88, + 0x55, 0xc8, 0x59, 0xd8, 0xf3, 0x71, 0x83, 0x65, 0x44, 0x72, 0xc0, 0x9c, 0x02, 0x06, 0xea, 0x4d, + 0xa9, 0xd4, 0x8f, 0x95, 0x52, 0xcf, 0xc1, 0x58, 0xe0, 0x92, 0xea, 0x6a, 0x56, 0x53, 0xe4, 0xe6, + 0x6c, 0x9c, 0x27, 0x33, 0x35, 0x81, 0x53, 0x08, 0x4c, 0x29, 0xe0, 0x8e, 0x67, 0xb4, 0x02, 0x60, + 0x5b, 0xd8, 0xde, 0x57, 0x1b, 0x58, 0x37, 0x8b, 0x99, 0x63, 0xa2, 0x54, 0x27, 0x26, 0x3d, 0x51, + 0xb2, 0x99, 0x54, 0x37, 0xd1, 0xe5, 0x30, 0xd5, 0x46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, 0xf9, 0xe7, 0x24, 0xe4, 0xa3, 0xcd, 0x31, 0x39, 0x6b, 0xe8, 0x74, 0x1f, 0x91, 0x68, 0xa5, + 0x79, 0xf0, 0x9e, 0xad, 0xf4, 0xcc, 0x32, 0xd9, 0x60, 0x2a, 0xc3, 0xac, 0x65, 0x55, 0x18, 0x92, + 0x6c, 0xee, 0xa4, 0xb6, 0x60, 0xd6, 0x22, 0x64, 0x14, 0xfe, 0x84, 0x56, 0x61, 0xf8, 0xba, 0x47, + 0xb9, 0x87, 0x29, 0xf7, 0x43, 0xf7, 0xe6, 0x7e, 0x66, 0x9b, 0x92, 0x67, 0x9f, 0xd9, 0x56, 0x37, + 0xeb, 0xca, 0x46, 0x75, 0x5d, 0xe1, 0x70, 0x74, 0x06, 0x52, 0xa6, 0x76, 0xfb, 0xb0, 0x73, 0x2b, + 0xa2, 0xa2, 0x41, 0x03, 0x7f, 0x06, 0x52, 0xb7, 0xb0, 0x76, 0xa3, 0x73, 0x03, 0xa0, 0xa2, 0x0f, + 0x31, 0xf5, 0x67, 0x21, 0x4d, 0xe3, 0x85, 0x00, 0x78, 0xc4, 0xe4, 0x21, 0x94, 0x81, 0xd4, 0x72, + 0x5d, 0x21, 0xe9, 0x2f, 0x43, 0x9e, 0x49, 0xd5, 0xad, 0xb5, 0xda, 0x72, 0x4d, 0x4e, 0x94, 0x17, + 0x60, 0x98, 0x05, 0x81, 0x2c, 0x8d, 0x20, 0x0c, 0xf2, 0x10, 0x7f, 0xe4, 0x1c, 0x92, 0xd0, 0xee, + 0x6e, 0x2c, 0xd5, 0x14, 0x39, 0x11, 0x9d, 0x5e, 0x0f, 0xf2, 0xd1, 0xbe, 0xf8, 0xa3, 0xc9, 0xa9, + 0xbf, 0x91, 0x20, 0x17, 0xe9, 0x73, 0x49, 0x83, 0xa2, 0x99, 0xa6, 0x7d, 0x4b, 0xd5, 0x4c, 0x43, + 0xf3, 0x78, 0x52, 0x00, 0x15, 0x55, 0x89, 0x64, 0xd0, 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1, 0x3d, + 0xc3, 0x37, 0x6e, 0x62, 0xd5, 0xb0, 0xc4, 0xed, 0x0e, 0x39, 0x60, 0xa4, 0x14, 0x59, 0x68, 0xd6, + 0x2c, 0x3f, 0xb0, 0xb6, 0x70, 0x53, 0xeb, 0xb2, 0x26, 0x05, 0x3c, 0xa9, 0xc8, 0x42, 0x13, 0x58, + 0x9f, 0x87, 0x7c, 0xc3, 0x6e, 0x93, 0xae, 0x8b, 0xd9, 0x91, 0xfd, 0x42, 0x52, 0x72, 0x4c, 0x16, + 0x98, 0xf0, 0x7e, 0x3a, 0xbc, 0x56, 0xca, 0x2b, 0x39, 0x26, 0x63, 0x26, 0x8f, 0xc0, 0x98, 0xd6, + 0x6c, 0xba, 0x84, 0x5c, 0x10, 0xb1, 0x13, 0x42, 0x21, 0x10, 0x53, 0xc3, 0xa9, 0x67, 0x20, 0x23, + 0xe2, 0x40, 0xb6, 0x64, 0x12, 0x09, 0xd5, 0x61, 0xc7, 0xde, 0xc4, 0x74, 0x56, 0xc9, 0x58, 0x42, + 0x79, 0x1e, 0xf2, 0x86, 0xa7, 0x86, 0xb7, 0xe4, 0x89, 0x73, 0x89, 0xe9, 0x8c, 0x92, 0x33, 0xbc, + 0xe0, 0x86, 0xb1, 0xfc, 0x5a, 0x02, 0x0a, 0x9d, 0xb7, 0xfc, 0x68, 0x05, 0x32, 0xa6, 0xad, 0x6b, + 0x34, 0xb5, 0xd8, 0x27, 0xa6, 0xe9, 0x98, 0x0f, 0x03, 0x33, 0xeb, 0xdc, 0x5e, 0x09, 0x90, 0x53, + 0xff, 0x20, 0x41, 0x46, 0x88, 0xd1, 0x29, 0x48, 0x39, 0x9a, 0x7f, 0x40, 0xe9, 0xd2, 0x4b, 0x09, + 0x59, 0x52, 0xe8, 0x33, 0x91, 0x7b, 0x8e, 0x66, 0xd1, 0x14, 0xe0, 0x72, 0xf2, 0x4c, 0xe6, 0xd5, + 0xc4, 0x5a, 0x83, 0x1e, 0x3f, 0xec, 0x56,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, 0xbb, 0x86, 0xe5, 0x3f, 0x35, 0x77, 0x89, 0x04, 0x38, 0x64, 0x41, + 0xbb, 0x90, 0x59, 0xd6, 0x3c, 0xfa, 0xdb, 0x3c, 0xea, 0x7a, 0x6a, 0xe9, 0xe2, 0xff, 0xbe, 0x79, + 0xf6, 0x42, 0x0c, 0x23, 0x2f, 0x8e, 0x33, 0x1b, 0x87, 0x84, 0x75, 0x71, 0x9e, 0xc0, 0xaf, 0x0d, + 0x29, 0x01, 0x15, 0x9a, 0x13, 0xae, 0x6e, 0x6a, 0x2d, 0xf6, 0x53, 0xa2, 0xe4, 0x92, 0x7c, 0xf4, + 0xe6, 0xd9, 0xfc, 0xc6, 0x61, 0x28, 0x0f, 0x5d, 0x21, 0x4f, 0x4b, 0x19, 0x18, 0x66, 0xae, 0x2e, + 0xad, 0xbc, 0x7e, 0xb7, 0x34, 0xf4, 0xc6, 0xdd, 0xd2, 0xd0, 0x3f, 0xde, 0x2d, 0x0d, 0xbd, 0x75, + 0xb7, 0x24, 0xbd, 0x7b, 0xb7, 0x24, 0xbd, 0x7f, 0xb7, 0x24, 0xdd, 0x39, 0x2a, 0x49, 0x5f, 0x3b, + 0x2a, 0x49, 0xdf, 0x38, 0x2a, 0x49, 0xdf, 0x39, 0x2a, 0x49, 0xaf, 0x1f, 0x95, 0x86, 0xde, 0x38, + 0x2a, 0x0d, 0xbd, 0x75, 0x54, 0x92, 0x7e, 0x78, 0x54, 0x1a, 0x7a, 0xf7, 0xa8, 0x24, 0xbd, 0x7f, + 0x54, 0x1a, 0xba, 0xf3, 0x83, 0xd2, 0xd0, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xeb, 0xeb, 0x0d, + 0x37, 0x95, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptor_one_1be15a5672864d55) } + +var fileDescriptor_one_1be15a5672864d55 = []byte{ + // 598 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x4f, 0x1b, 0x3f, + 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0x70, 0xc2, 0x97, 0x7c, 0x6f, 0x72, 0x19, 0x8c, 0x95, 0xb6, + 0x92, 0x87, 0x92, 0x90, 0x4b, 0xc2, 0x8f, 0xb1, 0x47, 0x55, 0x65, 0xa1, 0x48, 0x07, 0xcc, 0x28, + 0x47, 0x4d, 0x88, 0x44, 0xce, 0x08, 0xfb, 0x84, 0xb2, 0xf1, 0x37, 0xf4, 0xaf, 0xe8, 0xd8, 0xb1, + 0x7f, 0x02, 0x23, 0x63, 0xd5, 0x21, 0xe2, 0xae, 0x4b, 0x47, 0x46, 0xd4, 0xa9, 0xf2, 0x1d, 0xb1, + 0x2b, 0x55, 0x55, 0x97, 0x4e, 0xb9, 0xf7, 0x3e, 0xe7, 0x97, 0xf7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f, 0xf3, 0x35, 0xad, 0xe3, 0x71, 0xac, 0x3b, 0xfe, 0x8e, 0xf9, + 0xc0, 0xae, 0x8a, 0x77, 0x8c, 0xab, 0x7b, 0x43, 0xa5, 0xf3, 0x8a, 0xa6, 0xf5, 0xc5, 0x60, 0xfb, + 0xc7, 0x6c, 0xbd, 0xfb, 0x97, 0x8a, 0x43, 0xa5, 0xf5, 0xf4, 0x52, 0xb4, 0xf6, 0xa7, 0xa6, 0xea, + 0x56, 0xcf, 0x2c, 0x1f, 0xa0, 0xd0, 0x96, 0xf2, 0xfc, 0x79, 0xab, 0xef, 0x86, 0x13, 0x41, 0x5e, + 0x9a, 0xeb, 0x12, 0x34, 0xb2, 0xd9, 0x7a, 0x7d, 0x7f, 0xea, 0xf2, 0xae, 0x15, 0x13, 0x05, 0x55, + 0x5c, 0x29, 0x5a, 0x0d, 0xde, 0xdc, 0xa6, 0x14, 0xdd, 0xa5, 0x14, 0x7d, 0x49, 0x29, 0xba, 0x4f, + 0x29, 0x3c, 0xa4, 0x14, 0x1e, 0x53, 0x0a, 0x37, 0x19, 0x85, 0x8f, 0x19, 0x85, 0x4f, 0x19, 0x85, + 0xcf, 0x19, 0x85, 0xdb, 0x8c, 0xa2, 0xbb, 0x8c, 0xa2, 0xfb, 0x8c, 0xc2, 0xf7, 0x8c, 0xa2, 0x87, + 0x8c, 0xc2, 0x63, 0x46, 0xd1, 0xcd, 0x37, 0x8a, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x27, + 0x4d, 0xb9, 0x78, 0x04, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto b/deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto new file mode 100644 index 000000000..66d4b4496 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto @@ -0,0 +1,103 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go new file mode 100644 index 000000000..f83992357 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go @@ -0,0 +1,618 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go new file mode 100644 index 000000000..5d602f6ed --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go @@ -0,0 +1,5144 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return xxx_messageInfo_AllTypesOneOf.Size(m) +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return xxx_messageInfo_TwoOneofs.Size(m) +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return xxx_messageInfo_CustomOneof.Size(m) +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4179 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x24, 0xd7, + 0x55, 0x56, 0xcf, 0x8f, 0x34, 0x73, 0x66, 0x34, 0x6a, 0x5d, 0xc9, 0xeb, 0x59, 0xd9, 0x9e, 0xdd, + 0x1d, 0xdb, 0xb1, 0x6c, 0xc7, 0x92, 0xad, 0x95, 0xb4, 0xbb, 0xb3, 0x24, 0x66, 0x24, 0xcd, 0x6a, + 0x65, 0x24, 0x8d, 0xd2, 0x92, 0xe2, 0x9f, 0x14, 0xd5, 0xd5, 0xea, 0xb9, 0x1a, 0xf5, 0x6e, 0x4f, + 0x77, 0xa7, 0xb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0xd1, 0x9d, 0x24, 0xf0, 0x6c, + 0x9c, 0x58, 0x6c, 0x70, 0x03, 0xe2, 0x91, 0x87, 0x56, 0xe0, 0x01, 0x0a, 0x6b, 0x62, 0x0b, 0xbb, + 0x9a, 0x8f, 0x55, 0xfc, 0xd9, 0xb6, 0x66, 0x7a, 0xaa, 0x66, 0x35, 0xd4, 0x03, 0xcd, 0x3b, 0x28, + 0x4e, 0x12, 0x82, 0xa5, 0x44, 0x51, 0x52, 0x4e, 0x13, 0xc3, 0x55, 0x6e, 0x57, 0xa3, 0x66, 0x55, + 0xab, 0x71, 0x55, 0xf3, 0x0e, 0x50, 0x05, 0x4e, 0x51, 0x16, 0xcf, 0x77, 0x0d, 0xab, 0xa9, 0xea, + 0x07, 0x58, 0xbf, 0xae, 0xb6, 0xfd, 0xfd, 0x8b, 0xc5, 0xfb, 0xa2, 0xef, 0xa7, 0x1e, 0x6e, 0x53, + 0x9b, 0x65, 0x62, 0xb2, 0xeb, 0xef, 0x5f, 0x44, 0xdb, 0x90, 0x27, 0x93, 0xd1, 0x32, 0x6e, 0x61, + 0x75, 0xdf, 0x76, 0xe9, 0xd6, 0x58, 0xe8, 0x53, 0x9a, 0x22, 0x11, 0x9c, 0xa9, 0x73, 0xc0, 0x86, + 0xdd, 0xc0, 0x95, 0xf4, 0xf6, 0x56, 0xad, 0xb6, 0xa2, 0xe4, 0x04, 0xcb, 0x15, 0xdb, 0x25, 0x09, + 0xd5, 0xb4, 0x83, 0x00, 0xe7, 0x58, 0x42, 0x35, 0x6d, 0x11, 0xde, 0x05, 0x98, 0xd0, 0x75, 0x36, + 0x66, 0x43, 0x57, 0xf9, 0x19, 0xcb, 0x2b, 0xca, 0x1d, 0xc1, 0xd2, 0xf5, 0x55, 0x66, 0xc0, 0x73, + 0xdc, 0x43, 0x97, 0xe0, 0x9e, 0x30, 0x58, 0x51, 0xe0, 0x78, 0xcf, 0x28, 0xbb, 0xa1, 0x0b, 0x30, + 0xe1, 0x1c, 0xf6,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x7d, 0x66, 0x5b, 0xdd, + 0xac, 0x2b, 0x1b, 0xd5, 0x75, 0x85, 0xc3, 0xd1, 0x69, 0x48, 0x99, 0xda, 0xad, 0xc3, 0xce, 0xad, + 0x88, 0x8a, 0x06, 0x0d, 0xfc, 0x69, 0x48, 0xdd, 0xc4, 0xda, 0xf5, 0xce, 0x0d, 0x80, 0x8a, 0x3e, + 0xc4, 0xd4, 0x9f, 0x85, 0x34, 0x8d, 0x17, 0x02, 0xe0, 0x11, 0x93, 0x87, 0x50, 0x06, 0x52, 0xcb, + 0x75, 0x85, 0xa4, 0xbf, 0x0c, 0x79, 0x26, 0x55, 0xb7, 0xd6, 0x6a, 0xcb, 0x35, 0x39, 0x51, 0x5e, + 0x80, 0x61, 0x16, 0x04, 0xb2, 0x34, 0x82, 0x30, 0xc8, 0x43, 0xfc, 0x91, 0x73, 0x48, 0x42, 0xbb, + 0xbb, 0xb1, 0x54, 0x53, 0xe4, 0x44, 0x74, 0x7a, 0x3d, 0xc8, 0x47, 0xfb, 0xe2, 0x8f, 0x26, 0xa7, + 0xfe, 0x46, 0x82, 0x5c, 0xa4, 0xcf, 0x25, 0x0d, 0x8a, 0x66, 0x9a, 0xf6, 0x4d, 0x55, 0x33, 0x0d, + 0xcd, 0xe3, 0x49, 0x01, 0x54, 0x54, 0x25, 0x92, 0x41, 0x27, 0xed, 0x23, 0x71, 0xfe, 0x55, 0x09, + 0xe4, 0xee, 0x16, 0xb3, 0xcb, 0x41, 0xe9, 0x27, 0xea, 0xe0, 0x2b, 0x12, 0x14, 0x3a, 0xfb, 0xca, + 0x2e, 0xf7, 0xce, 0xfd, 0x44, 0xdd, 0x7b, 0x2b, 0x01, 0xa3, 0x1d, 0xdd, 0xe4, 0xa0, 0xde, 0x7d, + 0x16, 0xc6, 0x8d, 0x06, 0x6e, 0x39, 0xb6, 0x8f, 0x2d, 0xfd, 0x50, 0x35, 0xf1, 0x0d, 0x6c, 0x16, + 0xcb, 0xb4, 0x50, 0xcc, 0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xb1, 0x9f, 0x13, 0x25, 0x97, 0xe4, 0xa3, 0x37, 0xcf, + 0xe4, 0x37, 0x0e, 0x43, 0x79, 0xe8, 0x0a, 0x79, 0x5a, 0xca, 0xc0, 0x30, 0x73, 0x75, 0x69, 0xe5, + 0xf5, 0x3b, 0xa5, 0xa1, 0x37, 0xee, 0x94, 0x86, 0xfe, 0xf1, 0x4e, 0x69, 0xe8, 0xad, 0x3b, 0x25, + 0xe9, 0xdd, 0x3b, 0x25, 0xe9, 0xfd, 0x3b, 0x25, 0xe9, 0xf6, 0x51, 0x49, 0xfa, 0xea, 0x51, 0x49, + 0xfa, 0xfa, 0x51, 0x49, 0xfa, 0xf6, 0x51, 0x49, 0x7a, 0xfd, 0xa8, 0x34, 0xf4, 0xc6, 0x51, 0x49, + 0x7a, 0xeb, 0xa8, 0x24, 0xfd, 0xe0, 0xa8, 0x34, 0xf4, 0xee, 0x51, 0x49, 0x7a, 0xff, 0xa8, 0x34, + 0x74, 0xfb, 0xfb, 0xa5, 0xa1, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xc6, 0x74, 0xaf, 0x99, + 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *AllTypesOneOf) 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 ErrIntOverflowOne + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *TwoOneofs) 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 ErrIntOverflowOne + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *CustomOneof) 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 ErrIntOverflowOne + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptor_one_539b073fce05cef9) } + +var fileDescriptor_one_539b073fce05cef9 = []byte{ + // 602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x4f, 0x1b, 0x31, + 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0x70, 0x42, 0x49, 0x6f, 0x72, 0x51, 0x65, 0xac, 0xb4, 0x95, + 0x3c, 0x94, 0x84, 0x5c, 0x12, 0xfe, 0x8c, 0x3d, 0xaa, 0x2a, 0x0b, 0x45, 0x3a, 0x60, 0x46, 0x39, + 0x6a, 0x42, 0xa4, 0xe4, 0x8c, 0xe2, 0x3b, 0xa1, 0x6c, 0x7c, 0x86, 0x7e, 0x8a, 0x8e, 0x1d, 0xfb, + 0x11, 0x18, 0x33, 0x56, 0x1d, 0x22, 0xee, 0xba, 0x74, 0x64, 0x44, 0x9d, 0x2a, 0xdf, 0x11, 0xbb, + 0x52, 0x55, 0x75, 0xe9, 0x94, 0x7b, 0xef, 0x77, 0x7e, 0x79, 0xef, 0x6c, 0xe3, 0xe7, 0xe7, 0x72, + 0x1c, 0x48, 0xd5, 0x8c, 0xc3, 0x71, 0x7f, 0xa2, 0x2e, 0xfb, 0x23, 0x31, 0x69, 0xca, 0x50, 0x34, + 0xae, 0x26, 0x32, 0x92, 0x4e, 0x41, 0x86, 0x62, 0x63, 0x6b, 0x30, 0x8c, 0x2e, 0xe3, 0xa0, 0x71, + 0x2e, 0xc7, 0xcd, 0x81, 0x1c, 0xc8, 0x66, 0x66, 0x41, 0x7c, 0x91, 0x45, 0x59, 0x90, 0x3d, 0xe5, + 0x6b, 0xea, 0xcf, 0x70, 0xf1, 0x38, 0x0e, 0x82, 0xa9, 0x53, 0xc3, 0x05, 0x15, 0x07, 0x04, 0x18, + 0xf0, 0x55, 0x5f, 0x3f, 0xd6, 0xe7, 0x05, 0xbc, 0xf6, 0x66, 0x34, 0x3a, 0x99, 0x5e, 0x09, 0x75, + 0x14, 0x8a, 0xa3, 0x0b, 0x87, 0xe0, 0xd2, 0xbb, 0xa1, 0x18, 0x7d, 0x68, 0x65, 0xaf, 0x41, 0x0f, + 0xf9, 0x8f, 0xb1, 0x11, 0x97, 0x2c, 0x31, 0xe0, 0x4b, 0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4b, 0x4a, 0xe1, 0x36, 0xa5, 0x68, 0x96, 0x52, 0xb8, 0x4b, 0x29, 0xfc, + 0x48, 0x29, 0xba, 0x4f, 0x29, 0x3c, 0xa4, 0x14, 0xdd, 0x7c, 0xa7, 0xe8, 0x57, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xdd, 0x1c, 0x58, 0x6c, 0x7c, 0x04, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto b/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto new file mode 100644 index 000000000..633f01224 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto @@ -0,0 +1,103 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go new file mode 100644 index 000000000..6c02de23b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go @@ -0,0 +1,618 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof/doc.go b/deps/github.com/gogo/protobuf/test/oneof/doc.go new file mode 100644 index 000000000..b9f2ff176 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/doc.go @@ -0,0 +1 @@ +package one diff --git a/deps/github.com/gogo/protobuf/test/oneof/one.proto b/deps/github.com/gogo/protobuf/test/oneof/one.proto new file mode 100644 index 000000000..66d4b4496 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof/one.proto @@ -0,0 +1,103 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/deps/github.com/gogo/protobuf/test/oneof3/Makefile b/deps/github.com/gogo/protobuf/test/oneof3/Makefile new file mode 100644 index 000000000..b42ef60ee --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. one.proto diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go new file mode 100644 index 000000000..d87c65775 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go @@ -0,0 +1,3364 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_475397b14a80232f, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_475397b14a80232f, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return m.Size() +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3999 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0xe3, 0xe6, + 0x75, 0x16, 0x78, 0x13, 0x79, 0x48, 0x51, 0x10, 0x24, 0xef, 0x72, 0xe5, 0x98, 0xab, 0x95, 0xed, + 0x58, 0xb6, 0x6b, 0xc9, 0xd6, 0xae, 0xf6, 0xc2, 0x6d, 0xe2, 0x52, 0x12, 0x57, 0x2b, 0x57, 0x12, + 0x15, 0x50, 0x8a, 0x2f, 0x99, 0x0e, 0x06, 0x04, 0x7f, 0x52, 0xd8, 0x05, 0x01, 0x04, 0x00, 0x77, + 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xed, 0xb0, 0x94, 0x9c, 0x4b, 0x2e, 0xe4, 0xe4, 0x90, 0x44, 0x7a, + 0x12, 0xa6, 0xec, 0x5e, 0xd3, 0xd0, 0x35, 0x25, 0x64, 0x06, 0x73, 0xc9, 0x85, 0xb4, 0x2c, 0x52, + 0xc5, 0x7a, 0x60, 0xfc, 0x18, 0x4c, 0xde, 0x46, 0xea, 0xcd, 0xb0, 0x69, 0x9e, 0x98, 0x16, 0xb1, + 0x38, 0x64, 0xb8, 0x06, 0x85, 0x2e, 0x72, 0x5d, 0xb5, 0x83, 0x14, 0xef, 0xd0, 0x46, 0xa5, 0x14, + 0x99, 0xfd, 0xdc, 0xc0, 0xec, 0xfb, 0x67, 0x9e, 0x67, 0xa8, 0xbd, 0x43, 0x1b, 0x49, 0x55, 0xc8, + 0x21, 0xb3, 0xd7, 0xa5, 0x0c, 0xe9, 0x63, 0xfc, 0x57, 0x33, 0x7b, 0xdd, 0x7e, 0x96, 0x2c, 0x86, + 0x31, 0x8a, 0x71, 0x17, 0x39, 0xb7, 0x74, 0x0d, 0x95, 0x32, 0x84, 0xe0, 0xb1, 0x01, 0x82, 0x06, + 0xd5, 0xf7, 0x73, 0x70, 0x9c, 0xb4, 0x06, 0x39, 0xf4, 0xb2, 0x87, 0x4c, 0x57, 0xb7, 0xcc, 0xd2, + 0x38, 0x21, 0x79, 0x74, 0xc8, 0x2a, 0x22, 0xa3, 0xd5, 0x4f, 0x11, 0xe0, 0xa4, 0x8b, 0x30, 0x6e, + 0xd9, 0x9e, 0x6e, 0x99, 0x6e, 0x29, 0x3b, 0x27, 0x2c, 0xe4, 0x97, 0x3f, 0x36, 0x34, 0x10, 0xea, + 0xd4, 0x46, 0xe6, 0xc6, 0xd2, 0x26, 0x88, 0xae, 0xd5, 0x73, 0x34, 0xa4, 0x68, 0x56, 0x0b, 0x29, + 0xba, 0xd9, 0xb6, 0x4a, 0x39, 0x42, 0x70, 0x76, 0x70, 0x22, 0xc4, 0x70, 0xcd, 0x6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d, 0xc1, 0x04, 0x7d, 0x05, 0x1f, 0xc4, 0x64, 0x9f, 0xe8, 0xe2, 0x05, 0x51, 0x0c, 0x06, + 0x42, 0x59, 0xa6, 0x22, 0x82, 0x8b, 0x17, 0x44, 0x69, 0x7e, 0x0d, 0xd2, 0x24, 0xba, 0x24, 0x09, + 0x8a, 0x5b, 0xd5, 0xd5, 0xda, 0x96, 0x52, 0xdf, 0xdd, 0xdb, 0xac, 0xef, 0x54, 0xb7, 0x44, 0x21, + 0x90, 0xc9, 0xb5, 0x4f, 0xed, 0x6f, 0xca, 0xb5, 0x75, 0x31, 0x11, 0x96, 0xed, 0xd6, 0xaa, 0x7b, + 0xb5, 0x75, 0x31, 0x39, 0xaf, 0xc1, 0xcc, 0xb0, 0x3c, 0x39, 0x74, 0x67, 0x84, 0x96, 0x38, 0x71, + 0xcc, 0x12, 0x13, 0xae, 0x81, 0x25, 0xfe, 0x61, 0x02, 0xa6, 0x87, 0xd4, 0x8a, 0xa1, 0x2f, 0x79, + 0x16, 0xd2, 0x34, 0x44, 0x69, 0xf5, 0x7c, 0x7c, 0x68, 0xd1, 0x21, 0x01, 0x3b, 0x50, 0x41, 0x09, + 0x2e, 0xdc, 0x41, 0x24, 0x8f, 0xe9, 0x20, 0x30, 0xc5, 0x40, 0x4e, 0xff, 0xa5, 0x81, 0x9c, 0x4e, + 0xcb, 0xde, 0xc5, 0x51, 0xca, 0x1e, 0x91, 0x9d, 0x2c, 0xb7, 0xa7, 0x87, 0xe4, 0xf6, 0xab, 0x30, + 0x35, 0x40, 0x34, 0x72, 0x8e, 0x7d, 0x45, 0x80, 0xd2, 0x71, 0xce, 0x89, 0xc9, 0x74, 0x89, 0x48, + 0xa6, 0xbb, 0xda, 0xef, 0xc1, 0x73, 0xc7, 0x2f, 0xc2, 0xc0, 0x5a, 0xbf, 0x21, 0xc0, 0xa9, 0xe1, + 0x9d, 0xe2, 0xd0, 0x31, 0x7c, 0x12, 0x32, 0x5d, 0xe4, 0x1d, 0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 0x74, 0x06, 0x52, 0x86, 0x7a, 0xe7, 0x30, 0x5a, 0x8a, 0x88, 0x68, + 0x54, 0xc7, 0x9f, 0x81, 0xd4, 0x6d, 0xa4, 0xde, 0x8c, 0x16, 0x00, 0x22, 0xfa, 0x10, 0x43, 0x7f, + 0x09, 0xd2, 0xc4, 0x5f, 0x12, 0x00, 0xf3, 0x98, 0x38, 0x26, 0x65, 0x21, 0xb5, 0x56, 0x97, 0x71, + 0xf8, 0x8b, 0x50, 0xa0, 0x52, 0x65, 0x77, 0xb3, 0xb6, 0x56, 0x13, 0x13, 0xf3, 0x2b, 0x90, 0xa1, + 0x4e, 0xc0, 0x5b, 0xc3, 0x77, 0x83, 0x38, 0xc6, 0x1e, 0x19, 0x87, 0xc0, 0xb5, 0xfb, 0xdb, 0xab, + 0x35, 0x59, 0x4c, 0x84, 0x97, 0xd7, 0x85, 0x42, 0xb8, 0x2f, 0xfe, 0x68, 0x62, 0xea, 0x1f, 0x05, + 0xc8, 0x87, 0xfa, 0x5c, 0xdc, 0xa0, 0xa8, 0x86, 0x61, 0xdd, 0x56, 0x54, 0x43, 0x57, 0x5d, 0x16, + 0x14, 0x40, 0x44, 0x55, 0x2c, 0x19, 0x75, 0xd1, 0x3e, 0x92, 0xc1, 0xbf, 0x2e, 0x80, 0xd8, 0xdf, + 0x62, 0xf6, 0x0d, 0x50, 0xf8, 0x99, 0x0e, 0xf0, 0x35, 0x01, 0x8a, 0xd1, 0xbe, 0xb2, 0x6f, 0x78, + 0xe7, 0x7e, 0xa6, 0xc3, 0x7b, 0x2b, 0x01, 0x13, 0x91, 0x6e, 0x72, 0xd4, 0xd1, 0x7d, 0x16, 0xa6, + 0xf4, 0x16, 0xea, 0xda, 0x96, 0x87, 0x4c, 0xed, 0x50, 0x31, 0xd0, 0x2d, 0x64, 0x94, 0xe6, 0x49, + 0xa2, 0x58, 0xba, 0x7f, 0xbf, 0xba, 0xb8, 0x19, 0xe0, 0xb6, 0x30, 0xac, 0x32, 0xb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x44, 0xf4, 0x84, 0x50, 0xf4, 0xc5, 0xc4, 0x70, 0xf6, 0x39, 0xc8, 0x72, 0x3f, + 0xe0, 0x92, 0x8c, 0x3d, 0xa1, 0xd8, 0xf4, 0xd8, 0x9b, 0x58, 0xc8, 0xc9, 0x59, 0x93, 0x2b, 0xcf, + 0x41, 0x41, 0x77, 0x95, 0xe0, 0x96, 0x3c, 0x31, 0x97, 0x58, 0xc8, 0xca, 0x79, 0xdd, 0xf5, 0x6f, + 0x18, 0xe7, 0xdf, 0x48, 0x40, 0x31, 0x7a, 0xcb, 0x2f, 0xad, 0x43, 0xd6, 0xb0, 0x34, 0x95, 0x84, + 0x16, 0xfd, 0xc4, 0xb4, 0x10, 0xf3, 0x61, 0x60, 0x71, 0x8b, 0xd9, 0xcb, 0x3e, 0x72, 0xf6, 0x5f, + 0x05, 0xc8, 0x72, 0xb1, 0x74, 0x0a, 0x52, 0xb6, 0xea, 0x1d, 0x10, 0xba, 0xf4, 0x6a, 0x42, 0x14, + 0x64, 0xf2, 0x8c, 0xe5, 0xae, 0xad, 0x9a, 0x24, 0x04, 0x98, 0x1c, 0x3f, 0xe3, 0x75, 0x35, 0x90, + 0xda, 0x22, 0xc7, 0x0f, 0xab, 0xdb, 0x45, 0xa6, 0xe7, 0xf2, 0x75, 0x65, 0xf2, 0x35, 0x26, 0x96, + 0x9e, 0x84, 0x29, 0xcf, 0x51, 0x75, 0x23, 0x62, 0x9b, 0x22, 0xb6, 0x22, 0x57, 0xf8, 0xc6, 0x15, + 0x38, 0xc3, 0x79, 0x5b, 0xc8, 0x53, 0xb5, 0x03, 0xd4, 0x0a, 0x40, 0x19, 0x72, 0xcd, 0x70, 0x9a, + 0x19, 0xac, 0x33, 0x3d, 0xc7, 0xce, 0x7f, 0x5f, 0x80, 0x29, 0x7e, 0x60, 0x6a, 0xf9, 0xce, 0xda, + 0x06, 0x50, 0x4d, 0xd3, 0xf2, 0xc2, 0xee, 0x1a, 0x0c, 0xe5, 0x01, 0xd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x29, 0xfe, 0x98, 0x53, 0x70, 0x0c, 0xa3, 0x38, + 0x81, 0x5b, 0xff, 0x84, 0x53, 0xb8, 0x21, 0x7f, 0x3e, 0x0b, 0x79, 0xcb, 0x34, 0x0e, 0x2d, 0x73, + 0x94, 0x41, 0x7c, 0x99, 0x31, 0x00, 0x83, 0x60, 0x82, 0xab, 0x90, 0x1b, 0x75, 0x21, 0xbe, 0xf2, + 0x0e, 0xdf, 0x1e, 0x7c, 0x05, 0x36, 0x60, 0x92, 0x27, 0x28, 0xdd, 0x32, 0x47, 0xa0, 0xf8, 0x33, + 0x46, 0x51, 0x0c, 0xc1, 0xd8, 0x34, 0x3c, 0xe4, 0x7a, 0x1d, 0x34, 0x0a, 0xc9, 0x1b, 0x7c, 0x1a, + 0x0c, 0xc2, 0x5c, 0xd9, 0x44, 0xa6, 0x76, 0x30, 0x1a, 0xc3, 0x57, 0xb9, 0x2b, 0x39, 0x06, 0x53, + 0xac, 0xc1, 0x44, 0x57, 0x75, 0xdc, 0x03, 0xd5, 0x18, 0x69, 0x39, 0xfe, 0x9c, 0x71, 0x14, 0x7c, + 0x10, 0xf3, 0x48, 0xcf, 0x3c, 0x09, 0xcd, 0xd7, 0xb8, 0x47, 0x42, 0x30, 0xb6, 0xf5, 0x5c, 0x8f, + 0x5c, 0x69, 0x9d, 0x84, 0xed, 0x2f, 0xf8, 0xd6, 0xa3, 0xd8, 0xed, 0x30, 0xe3, 0x55, 0xc8, 0xb9, + 0xfa, 0x9d, 0x91, 0x68, 0xfe, 0x92, 0xaf, 0x34, 0x01, 0x60, 0xf0, 0x8b, 0x70, 0x66, 0x68, 0x99, + 0x18, 0x81, 0xec, 0xaf, 0x18, 0xd9, 0xa9, 0x21, 0xa5, 0x82, 0xa5, 0x84, 0x93, 0x52, 0xfe, 0x35, + 0x4f, 0x09, 0xa8, 0x8f, 0x6b, 0x17, 0x9f, 0x15, 0x5c, 0xb5, 0x7d, 0x32, 0xaf, 0xfd, 0x0d, 0xf7, + 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5, 0xcf, 0xd5, 0x02, 0x90, 0x9b, + 0x0f, 0x85, 0xfc, 0xf2, 0x76, 0x75, 0xfd, 0xcd, 0x7b, 0xe5, 0xb1, 0xef, 0xdd, 0x2b, 0x8f, 0xfd, + 0xdb, 0xbd, 0xf2, 0xd8, 0x5b, 0xf7, 0xca, 0xc2, 0xbb, 0xf7, 0xca, 0xc2, 0xfb, 0xf7, 0xca, 0xc2, + 0xdd, 0xa3, 0xb2, 0xf0, 0xd5, 0xa3, 0xb2, 0xf0, 0xf5, 0xa3, 0xb2, 0xf0, 0xed, 0xa3, 0xb2, 0xf0, + 0xe6, 0x51, 0x59, 0xf8, 0xde, 0x51, 0x59, 0x78, 0xeb, 0xa8, 0x2c, 0xfc, 0xe8, 0xa8, 0x3c, 0xf6, + 0xee, 0x51, 0x59, 0x78, 0xff, 0xa8, 0x3c, 0x76, 0xf7, 0x87, 0xe5, 0xb1, 0x66, 0x86, 0x84, 0xd1, + 0xf9, 0x9f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x98, 0x65, 0x08, 0x1e, 0xb0, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Sub))) + i += copy(dAtA[i:], m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf) 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 *SampleOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *SampleOneOf) 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 ErrIntOverflowOne + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptor_one_475397b14a80232f) } + +var fileDescriptor_one_475397b14a80232f = []byte{ + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, + 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0x9e, 0x54, 0xe9, 0x95, 0xe1, 0xc9, 0x62, + 0xf2, 0x42, 0xd2, 0xdc, 0x25, 0xfc, 0x58, 0x51, 0x55, 0x65, 0xa9, 0x90, 0xc2, 0x1f, 0x80, 0x30, + 0x75, 0x0e, 0x24, 0xee, 0x8c, 0x7a, 0x77, 0x43, 0x37, 0xfe, 0x9c, 0x8e, 0x1d, 0xfb, 0x27, 0x30, + 0x32, 0x76, 0xe8, 0xc0, 0xb9, 0x4b, 0x47, 0x46, 0xc6, 0x2a, 0x97, 0xf2, 0xbc, 0xbd, 0xaf, 0x3f, + 0xf6, 0x60, 0xfb, 0x2b, 0xdf, 0x5d, 0xb9, 0xdc, 0xb8, 0x72, 0x6c, 0x5c, 0x75, 0x3d, 0x76, 0x85, + 0x1d, 0xdd, 0x7d, 0x75, 0x95, 0x8b, 0x23, 0x57, 0xd8, 0xbd, 0x83, 0xec, 0xa6, 0xba, 0xae, 0xcd, + 0xe8, 0xca, 0xe5, 0xe3, 0xcc, 0x65, 0x6e, 0xdc, 0x9a, 0xa9, 0x97, 0x6d, 0x6a, 0x43, 0x3b, 0xad, + 0xcf, 0xec, 0xbf, 0x97, 0x9d, 0xf3, 0xda, 0x98, 0x6f, 0xf1, 0x50, 0x46, 0x65, 0x6d, 0x10, 0x14, + 0xe8, 0xed, 0xc5, 0x6a, 0x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b2, 0xba, 0x70, 0x85, 0x75, 0xcb, + 0xd3, 0x8f, 0x0f, 0x0d, 0x89, 0xc7, 0x86, 0xc4, 0xaf, 0x86, 0xc4, 0x53, 0x43, 0xf0, 0xdc, 0x10, + 0xbc, 0x34, 0x04, 0xf7, 0x9e, 0xe0, 0xbb, 0x27, 0xf8, 0xe1, 0x09, 0x7e, 0x7a, 0x82, 0x07, 0x4f, + 0xf0, 0xe8, 0x09, 0x9e, 0x3c, 0xc1, 0x5f, 0x4f, 0xe2, 0xd9, 0x13, 0xbc, 0x78, 0x12, 0xf7, 0x7f, + 0x48, 0x98, 0x6e, 0x5b, 0xa3, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x42, 0xd6, 0x88, + 0x93, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto b/deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto new file mode 100644 index 000000000..51876e235 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto @@ -0,0 +1,82 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go new file mode 100644 index 000000000..d3e09e969 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go @@ -0,0 +1,378 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go new file mode 100644 index 000000000..273fa21d7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go @@ -0,0 +1,2827 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_c146381302ae1a39, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_c146381302ae1a39, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SampleOneOf.Unmarshal(m, b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return m.Size() +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3997 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0x7f, 0x45, 0x1e, 0x52, 0x14, 0x74, 0x25, 0xef, 0x72, 0xe5, 0x98, 0xab, 0x95, 0xed, + 0x58, 0xb6, 0x6b, 0xc9, 0xd6, 0xae, 0xf6, 0x87, 0xdb, 0xc4, 0xa5, 0x24, 0xae, 0x56, 0xae, 0x24, + 0x2a, 0xa0, 0x14, 0xff, 0x64, 0x3a, 0x18, 0x10, 0xbc, 0xa4, 0xb0, 0x0b, 0x02, 0x08, 0x00, 0xee, + 0x5a, 0x3b, 0x7d, 0xd8, 0x8e, 0xfb, 0x33, 0x99, 0x4e, 0xff, 0x3b, 0x53, 0xc7, 0x75, 0xdc, 0xa6, + 0x33, 0xa9, 0xd3, 0xf4, 0x2f,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0x27, 0x07, 0x57, 0xb4, 0x87, 0xb9, 0x7f, + 0xde, 0xb3, 0x97, 0x60, 0xa2, 0x67, 0x02, 0xa3, 0xbe, 0x7a, 0xfe, 0x17, 0xe1, 0x81, 0xa1, 0xd4, + 0xe8, 0x05, 0x98, 0xe9, 0x9a, 0xba, 0xe9, 0x61, 0xc7, 0x76, 0x30, 0x89, 0x58, 0xf6, 0xaa, 0xe2, + 0xbf, 0x8d, 0x1f, 0x13, 0x73, 0xfb, 0x61, 0x6b, 0xc6, 0x22, 0x4f, 0x77, 0x07, 0x85, 0x4f, 0x64, + 0x33, 0x3f, 0x1a, 0x97, 0xee, 0xde, 0xbd, 0x7b, 0x37, 0x3e, 0xff, 0x6a, 0x1a, 0x66, 0x86, 0xed, + 0x99, 0xa1, 0xdb, 0xf7, 0x14, 0xa4, 0xcd, 0x6e, 0xa7, 0x81, 0x1d, 0xea, 0xa4, 0x94, 0xcc, 0x9f, + 0x50, 0x05, 0x52, 0x86, 0xda, 0xc0, 0x46, 0x31, 0x39, 0x17, 0x5b, 0x28, 0x2c, 0x3f, 0x39, 0xd2, + 0xae, 0x5c, 0xdc, 0x22, 0x10, 0x99, 0x21, 0xd1, 0xa7, 0x21, 0xc9, 0x53, 0x34, 0x61, 0x78, 0x62, + 0x34, 0x06, 0xb2, 0x97, 0x64, 0x8a, 0x43, 0x0f, 0x42, 0x96, 0xfc, 0x65, 0xb1, 0x91, 0xa6, 0x63, + 0xce, 0x10, 0x01, 0x89, 0x0b, 0x34, 0x0b, 0x19, 0xba, 0x4d, 0x9a, 0x58, 0x94, 0x36, 0xff, 0x99, + 0x04, 0x56, 0x13, 0xb7, 0xd4, 0xae, 0xe1, 0x29, 0xb7, 0x54, 0xa3, 0x8b, 0x69, 0xc0, 0x67, 0xe5, + 0x3c, 0x17, 0x7e, 0x96, 0xc8, 0xd0, 0x59, 0xc8, 0xb1, 0x5d, 0xa5, 0x9b, 0x4d, 0xfc, 0x32, 0xcd, + 0x9e, 0x29, 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, 0x34, + 0xf6, 0xf6, 0xbd, 0x52, 0xec, 0xbd, 0x7b, 0xa5, 0xd8, 0x07, 0xf7, 0x4a, 0xb1, 0xbb, 0x47, 0xa5, + 0xd8, 0x57, 0x8f, 0x4a, 0xb1, 0xaf, 0x1f, 0x95, 0x62, 0xdf, 0x3e, 0x2a, 0xc5, 0xde, 0x3a, 0x2a, + 0xc5, 0xbe, 0x77, 0x54, 0x1a, 0x7b, 0xfb, 0xa8, 0x14, 0xfb, 0xd1, 0x51, 0x69, 0xec, 0xbd, 0xa3, + 0x52, 0xec, 0x83, 0xa3, 0xd2, 0xd8, 0xdd, 0x1f, 0x96, 0xc6, 0x1a, 0x69, 0x1a, 0x46, 0xe7, 0xff, + 0x3f, 0x00, 0x00, 0xff, 0xff, 0x84, 0x35, 0xfb, 0xc7, 0xb5, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Sub))) + i += copy(dAtA[i:], m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf) 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 *SampleOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptor_one_c146381302ae1a39) } + +var fileDescriptor_one_c146381302ae1a39 = []byte{ + // 407 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, + 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0x9a, 0xe1, 0xc9, 0x62, 0xf2, + 0x42, 0xd2, 0xdc, 0x25, 0xfc, 0x58, 0x51, 0x55, 0x65, 0xa9, 0x90, 0xc2, 0x1f, 0x80, 0x62, 0xea, + 0x04, 0xa4, 0x5c, 0x8c, 0x72, 0x77, 0x43, 0x37, 0xfe, 0x9c, 0x8e, 0x1d, 0xfb, 0x27, 0x30, 0x32, + 0x76, 0xe8, 0xc0, 0xb9, 0x4b, 0x47, 0x46, 0xc6, 0x2a, 0x97, 0xf2, 0xbc, 0xbd, 0xaf, 0x3f, 0xf6, + 0x60, 0xfb, 0x2b, 0x7b, 0x37, 0x2e, 0x33, 0x2e, 0x1f, 0x64, 0xb3, 0x75, 0x7e, 0x3b, 0x5b, 0xda, + 0xf5, 0xc0, 0xad, 0x6c, 0xff, 0x7e, 0xed, 0x0a, 0x17, 0x47, 0x6e, 0x65, 0x7b, 0xc7, 0x8b, 0xbb, + 0xe2, 0xb6, 0x34, 0xfd, 0x1b, 0x97, 0x0d, 0x16, 0x6e, 0xe1, 0x06, 0xb5, 0x99, 0x72, 0x5e, 0xa7, + 0x3a, 0xd4, 0xd3, 0xf6, 0xcc, 0xd1, 0x07, 0xd9, 0xb8, 0x2a, 0x8d, 0xf9, 0x16, 0x77, 0x65, 0x94, + 0x97, 0x06, 0x41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7e, 0xd1, 0x91, 0xb2, 0xb0, 0x79, 0x71, 0xed, + 0x56, 0xd6, 0xcd, 0x2f, 0x3e, 0x3d, 0x56, 0x24, 0x9e, 0x2a, 0x12, 0xbf, 0x2a, 0x12, 0xcf, 0x15, + 0xc1, 0x4b, 0x45, 0xf0, 0x5a, 0x11, 0x3c, 0x78, 0x82, 0xef, 0x9e, 0xe0, 0x87, 0x27, 0xf8, 0xe9, + 0x09, 0x1e, 0x3d, 0xc1, 0x93, 0x27, 0xf1, 0xec, 0x09, 0xfe, 0x7a, 0x12, 0x2f, 0x9e, 0xe0, 0xd5, + 0x93, 0x78, 0xf8, 0x43, 0xc2, 0x34, 0xeb, 0x1a, 0xa5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, + 0x55, 0x0b, 0x2b, 0x98, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto b/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto new file mode 100644 index 000000000..32ea8482c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto @@ -0,0 +1,82 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go new file mode 100644 index 000000000..1e88016bc --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go @@ -0,0 +1,378 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go new file mode 100644 index 000000000..2e8a9f3fb --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go @@ -0,0 +1,2607 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_827a0063df79db69, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_827a0063df79db69, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SampleOneOf.Unmarshal(m, b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return xxx_messageInfo_SampleOneOf.Size(m) +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4001 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0x7f, 0x45, 0x1e, 0x52, 0x14, 0x74, 0x25, 0xef, 0x72, 0xe5, 0x98, 0xab, 0x95, 0xed, + 0x58, 0xb6, 0x6b, 0xc9, 0xd6, 0xae, 0xf6, 0x87, 0xdb, 0xc4, 0xa5, 0x24, 0xae, 0x56, 0xae, 0x24, + 0x2a, 0xa0, 0x14, 0xff, 0x64, 0x3a, 0x18, 0x10, 0xbc, 0xa4, 0xb0, 0x0b, 0x02, 0x08, 0x00, 0xee, + 0x5a, 0x3b, 0x7d, 0xd8, 0x8e, 0xfb, 0x33, 0x99, 0x4e, 0xff, 0x3b, 0x6d, 0xe2, 0x3a, 0x6e, 0xd3, + 0x99, 0xd4, 0x69, 0xfa, 0x97, 0x34, 0x6d, 0x9a, 0xf4, 0xa9, 0x2f, 0x69, 0xfd, 0xd4, 0x49, 0xde, + 0xfa, 0x90, 0x07, 0xaf, 0xe2, 0x99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e, 0x60, 0x98, 0x5e, 0x27, 0xa6, 0x7f, 0x42, 0x27, 0x56, 0x20, 0x67, 0x62, + 0xd7, 0xc3, 0x4d, 0x16, 0x11, 0x89, 0x11, 0x63, 0x0a, 0x18, 0x68, 0x30, 0xa4, 0x92, 0x3f, 0x51, + 0x48, 0xbd, 0x00, 0x93, 0xfe, 0x90, 0x14, 0x47, 0x35, 0xdb, 0x22, 0x36, 0x97, 0xa2, 0x46, 0xb2, + 0x58, 0x15, 0x38, 0x99, 0xc0, 0xe4, 0x02, 0xee, 0x79, 0x46, 0xeb, 0x00, 0x96, 0x89, 0xad, 0x96, + 0xd2, 0xc4, 0x9a, 0x51, 0xcc, 0x1c, 0xe3, 0xa5, 0x1a, 0x31, 0x19, 0xf0, 0x92, 0xc5, 0xa4, 0x9a, + 0x81, 0xae, 0x04, 0xa1, 0x36, 0x7e, 0x4c, 0xa4, 0x6c, 0xb3, 0x4d, 0x36, 0x10, 0x6d, 0xfb, 0x50, + 0x70, 0x30, 0x89, 0x7b, 0xdc, 0xe4, 0x33, 0xcb, 0xd2, 0x41, 0x2c, 0x46, 0xce, 0x4c, 0xe6, 0x30, + 0x36, 0xb1, 0x09, 0x27, 0xfc, 0x88, 0x1e, 0x06, 0x5f, 0xa0, 0xd0, 0xb0, 0x02, 0x9a, 0x85, 0xf2, + 0x42, 0xb8, 0xa3, 0x76, 0xf0, 0xec, 0x1d, 0x28, 0xf4, 0xba, 0x07, 0xcd, 0x40, 0xca, 0xf5, 0x54, + 0xc7, 0xa3, 0x51, 0x98, 0x92, 0xd9, 0x03, 0x92, 0x20, 0x81, 0xcd, 0x26, 0xcd, 0x72, 0x29, 0x99, + 0xfc, 0x8b, 0x7e, 0x2e, 0x98, 0x70, 0x82, 0x4e, 0xf8, 0xe3, 0x83, 0x2b, 0xda, 0xc3, 0xdc, 0x3f, + 0xef, 0xd9, 0x4b, 0x30, 0xd1, 0x33, 0x81, 0x51, 0x5f, 0x3d, 0xff, 0x8b, 0xf0, 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+ 0x11, 0x4b, 0xb0, 0x59, 0x2a, 0xa1, 0xc9, 0x8b, 0x24, 0xcf, 0xae, 0xe7, 0xeb, 0x13, 0x54, 0x0f, + 0x4c, 0x44, 0x0d, 0x2e, 0x07, 0x03, 0x4d, 0xd2, 0x81, 0x96, 0x8e, 0x99, 0xe9, 0x40, 0x60, 0x3e, + 0x0d, 0x92, 0x66, 0xe8, 0xd8, 0xf4, 0x14, 0xd7, 0x73, 0xb0, 0xda, 0xd1, 0xcd, 0x36, 0xad, 0x20, + 0x99, 0x72, 0xaa, 0xa5, 0x1a, 0x2e, 0x96, 0x27, 0x99, 0xba, 0x2e, 0xb4, 0x04, 0x41, 0x03, 0xc8, + 0x09, 0x21, 0xd2, 0x3d, 0x08, 0xa6, 0xf6, 0x11, 0xf3, 0xdf, 0xc8, 0x40, 0x2e, 0xd4, 0x57, 0xa3, + 0x73, 0x90, 0xbf, 0xa1, 0xde, 0x52, 0x15, 0x71, 0x56, 0x62, 0x9e, 0xc8, 0x11, 0xd9, 0x2e, 0x3f, + 0x2f, 0x3d, 0x0d, 0x33, 0xd4, 0xc4, 0xea, 0x7a, 0xd8, 0x51, 0x34, 0x43, 0x75, 0x5d, 0xea, 0xb4, + 0x0c, 0x35, 0x45, 0x44, 0x57, 0x23, 0xaa, 0x35, 0xa1, 0x41, 0x2b, 0x30, 0x4d, 0x11, 0x9d, 0xae, + 0xe1, 0xe9, 0xb6, 0x81, 0x15, 0x72, 0x7a, 0x73, 0x69, 0x25, 0xf1, 0x47, 0x36, 0x45, 0x2c, 0xb6, + 0xb9, 0x01, 0x19, 0x91, 0x8b, 0xd6, 0xe1, 0x21, 0x0a, 0x6b, 0x63, 0x13, 0x3b, 0xaa, 0x87, 0x15, + 0xfc, 0xd9, 0xae, 0x6a, 0xb8, 0x8a, 0x6a, 0x36, 0x95, 0x03, 0xd5, 0x3d, 0x28, 0xce, 0x10, 0x82, + 0xd5, 0x78, 0x31, 0x26, 0x9f, 0x21, 0x86, 0x1b, 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0x1a, + 0xac, 0xb4, 0xd1, 0x7c, 0x9f, 0xe7, 0x7c, 0x53, 0x03, 0x85, 0xb6, 0xfc, 0x3c, 0x9c, 0x1a, 0x5e, + 0x65, 0xa3, 0x59, 0xbf, 0xf0, 0x5e, 0xdf, 0xb9, 0x28, 0x5c, 0x64, 0xcb, 0x7b, 0x41, 0xba, 0x0e, + 0x57, 0xd8, 0x68, 0xda, 0x57, 0xdf, 0xeb, 0xcd, 0xd8, 0xe1, 0x02, 0x5b, 0xae, 0x00, 0x04, 0xc5, + 0x2d, 0x9a, 0xeb, 0x35, 0xce, 0x15, 0x02, 0x91, 0xad, 0xc1, 0x6b, 0x5b, 0x34, 0xfe, 0x8b, 0x62, + 0x6b, 0x70, 0x04, 0xd9, 0x1a, 0xa2, 0xac, 0x45, 0xa3, 0x5f, 0x17, 0x5b, 0x43, 0x40, 0x48, 0x64, + 0x87, 0x2a, 0x47, 0x34, 0xc3, 0x97, 0x44, 0x64, 0x87, 0x50, 0xe5, 0xab, 0x90, 0x31, 0xbb, 0x86, + 0x41, 0x02, 0x14, 0xdd, 0xff, 0x07, 0x62, 0xc5, 0xff, 0xf8, 0x80, 0x8f, 0x40, 0x00, 0xca, 0x2b, + 0x90, 0xc2, 0x9d, 0x06, 0x6e, 0x46, 0x21, 0xff, 0xf3, 0x03, 0x91, 0x94, 0x88, 0x75, 0xf9, 0x59, + 0x00, 0x76, 0xb4, 0xa7, 0x9f, 0xad, 0x22, 0xb0, 0xff, 0xf5, 0x01, 0xff, 0xe9, 0x46, 0x00, 0x09, + 0x08, 0xd8, 0x0f, 0x41, 0xee, 0x4f, 0xf0, 0x4e, 0x2f, 0x01, 0x9d, 0xf5, 0x15, 0x18, 0xbf, 0xe1, + 0x5a, 0xa6, 0xa7, 0xb6, 0xa3, 0xd0, 0xff, 0xcd, 0xd1, 0xc2, 0x9e, 0x38, 0xac, 0x63, 0x39, 0xd8, + 0x53, 0xdb, 0x6e, 0x14, 0xf6, 0x7f, 0x38, 0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0x8f, 0x4a, 0xb1, 0xaf, 0x1c, 0x95, 0x62, 0x5f, 0x3b, 0x2a, 0xc5, 0xbe, 0x75, 0x54, 0x8a, + 0xbd, 0x79, 0x54, 0x1a, 0xfb, 0xee, 0x51, 0x69, 0xec, 0xad, 0xa3, 0x52, 0xec, 0x87, 0x47, 0xa5, + 0xb1, 0x77, 0x8f, 0x4a, 0xb1, 0xf7, 0x8f, 0x4a, 0x63, 0x77, 0x7f, 0x50, 0x1a, 0x6b, 0xa4, 0x69, + 0x18, 0x9d, 0xff, 0x71, 0x00, 0x00, 0x00, 0xff, 0xff, 0x74, 0x12, 0x73, 0xc8, 0xb3, 0x33, 0x00, + 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptor_one_827a0063df79db69) } + +var fileDescriptor_one_827a0063df79db69 = []byte{ + // 405 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, + 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0xca, 0xf0, 0x64, 0x31, 0x79, + 0x21, 0x69, 0xee, 0x12, 0x7e, 0xac, 0xa8, 0xaa, 0xb2, 0x54, 0x48, 0xe1, 0x0f, 0x40, 0x98, 0x3a, + 0x21, 0x12, 0x77, 0x46, 0xdc, 0xdd, 0xd0, 0x8d, 0x3f, 0xa7, 0x63, 0xc7, 0xfe, 0x09, 0x8c, 0x8c, + 0x1d, 0x3a, 0x70, 0xee, 0xd2, 0x91, 0x31, 0x63, 0x95, 0x4b, 0x79, 0xde, 0xde, 0xd7, 0x1f, 0x7b, + 0xb0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 0x36, 0x0a, 0x96, 0x60, 0x4f, 0x81, 0xee, 0x07, 0x4b, + 0x82, 0xa5, 0xb8, 0xa7, 0x40, 0xef, 0x04, 0x4b, 0x83, 0x8d, 0xf1, 0xdd, 0xfa, 0xfd, 0x83, 0x8d, + 0x83, 0x4d, 0x70, 0x5f, 0x81, 0xee, 0x05, 0x9b, 0xc4, 0x47, 0xb2, 0x5b, 0x54, 0xe6, 0x2a, 0xb3, + 0x45, 0x71, 0xbd, 0xb0, 0xd8, 0x57, 0xa0, 0xbb, 0x89, 0x1c, 0xac, 0x1b, 0xd1, 0x7c, 0xea, 0x54, + 0xcc, 0x64, 0x51, 0x99, 0x2f, 0x1b, 0x3f, 0xef, 0x49, 0x59, 0xda, 0xa2, 0xbc, 0x72, 0xb9, 0x75, + 0xf3, 0xf3, 0x4f, 0x4f, 0x35, 0x89, 0xe7, 0x9a, 0xc4, 0xaf, 0x9a, 0xc4, 0x4b, 0x4d, 0xf0, 0x5a, + 0x13, 0xac, 0x6a, 0x82, 0x47, 0x4f, 0xf0, 0xdd, 0x13, 0xfc, 0xf0, 0x04, 0x3f, 0x3d, 0xc1, 0x93, + 0x27, 0xf1, 0xec, 0x49, 0xbc, 0x78, 0x82, 0xbf, 0x9e, 0xc4, 0xab, 0x27, 0x58, 0x79, 0x12, 0x8f, + 0x7f, 0x48, 0x98, 0x76, 0x53, 0xa3, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x04, 0xd2, + 0x98, 0x96, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto b/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto new file mode 100644 index 000000000..2eca9a07f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto @@ -0,0 +1,82 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go new file mode 100644 index 000000000..26f1250cf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go new file mode 100644 index 000000000..86945daad --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go @@ -0,0 +1,3144 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f1bc4354e19d7a9, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f1bc4354e19d7a9, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return xxx_messageInfo_SampleOneOf.Size(m) +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3998 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x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0x8a, 0xd8, 0x68, 0xf6, 0x53, 0x04, 0x38, 0x74, 0x11, 0xc6, 0x2d, 0xdb, + 0xd3, 0x2d, 0xd3, 0x2d, 0x66, 0xe6, 0x62, 0x0b, 0xb9, 0xe5, 0x87, 0x86, 0x06, 0x42, 0x8d, 0xd9, + 0xc8, 0xc2, 0x18, 0x6d, 0x82, 0xe4, 0x5a, 0x5d, 0x47, 0xc3, 0x8a, 0x66, 0x35, 0xb1, 0xa2, 0x9b, + 0x2d, 0xab, 0x98, 0xa5, 0x04, 0x67, 0x07, 0x27, 0x42, 0x0d, 0xd7, 0xac, 0x26, 0xde, 0x34, 0x5b, + 0x96, 0x5c, 0x70, 0x7b, 0x9e, 0xd1, 0x29, 0x48, 0xbb, 0x87, 0xa6, 0xa7, 0xbe, 0x52, 0xcc, 0xd3, + 0x08, 0xe1, 0x4f, 0xf3, 0xdf, 0x49, 0xc3, 0xe4, 0x28, 0x21, 0x76, 0x15, 0x52, 0x2d, 0x32, 0xcb, + 0x62, 0xfc, 0x24, 0x3e, 0x60, 0x98, 0x5e, 0x27, 0xa6, 0x7f, 0x42, 0x27, 0x56, 0x20, 0x67, 0x62, + 0xd7, 0xc3, 0x4d, 0x16, 0x11, 0x89, 0x11, 0x63, 0x0a, 0x18, 0x68, 0x30, 0xa4, 0x92, 0x3f, 0x51, + 0x48, 0xbd, 0x08, 0x93, 0xfe, 0x90, 0x14, 0x47, 0x35, 0xdb, 0x22, 0x36, 0x97, 0xa2, 0x46, 0xb2, + 0x58, 0x15, 0x38, 0x99, 0xc0, 0xe4, 0x02, 0xee, 0x79, 0x46, 0xeb, 0x00, 0x96, 0x89, 0xad, 0x96, + 0xd2, 0xc4, 0x9a, 0x51, 0xcc, 0x1c, 0xe3, 0xa5, 0x1a, 0x31, 0x19, 0xf0, 0x92, 0xc5, 0xa4, 0x9a, + 0x81, 0xae, 0x04, 0xa1, 0x36, 0x7e, 0x4c, 0xa4, 0x6c, 0xb3, 0x4d, 0x36, 0x10, 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77, 0xbe, 0x38, 0x41, 0x42, 0x24, 0xd0, 0x9d, 0x0f, 0x74, 0x17, 0x8a, 0x05, 0xe2, 0xff, + 0x40, 0x77, 0x21, 0xd0, 0xad, 0x14, 0x27, 0xe7, 0x62, 0x0b, 0xf9, 0x40, 0xb7, 0x82, 0x9e, 0x86, + 0x9c, 0xdb, 0x6d, 0x28, 0x3c, 0x1d, 0xd2, 0x5f, 0xf2, 0xe4, 0x96, 0x61, 0x91, 0x44, 0x04, 0x5d, + 0xd4, 0xeb, 0x63, 0x32, 0xb8, 0xdd, 0x06, 0x4f, 0xa3, 0xab, 0x79, 0xa0, 0x17, 0x20, 0x0a, 0xfd, + 0x01, 0xee, 0xea, 0xfa, 0x5b, 0xf7, 0x4a, 0x63, 0xdf, 0xbb, 0x57, 0x1a, 0xfb, 0xd7, 0x7b, 0xa5, + 0xb1, 0xb7, 0xef, 0x95, 0x62, 0xef, 0xdd, 0x2b, 0xc5, 0x3e, 0xb8, 0x57, 0x8a, 0xdd, 0x3d, 0x2a, + 0xc5, 0xbe, 0x7a, 0x54, 0x8a, 0x7d, 0xfd, 0xa8, 0x14, 0xfb, 0xf6, 0x51, 0x29, 0xf6, 0xd6, 0x51, + 0x69, 0xec, 0x7b, 0x47, 0xa5, 0xd8, 0xdb, 0x47, 0xa5, 0xd8, 0x8f, 0x8e, 0x4a, 0x63, 0xef, 0x1d, + 0x95, 0x62, 0x1f, 0x1c, 0x95, 0xc6, 0xee, 0xfe, 0xb0, 0x34, 0xd6, 0x48, 0xd3, 0x30, 0x3a, 0xff, + 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x78, 0x40, 0x7b, 0x37, 0xb7, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 *SampleOneOf) 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 ErrIntOverflowOne + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + 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 skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptor_one_2f1bc4354e19d7a9) } + +var fileDescriptor_one_2f1bc4354e19d7a9 = []byte{ + // 409 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 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x9e, 0xe0, 0xc9, 0x93, 0x78, 0xf6, 0x04, 0x2f, 0x9e, 0xe0, 0x8f, 0x27, 0xf1, 0xea, + 0x09, 0xd6, 0x9e, 0xc4, 0xe3, 0x6f, 0x12, 0xa6, 0x59, 0xd7, 0x28, 0xfd, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0x3b, 0xfb, 0xd3, 0x99, 0x9a, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto b/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto new file mode 100644 index 000000000..d8b550438 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto @@ -0,0 +1,82 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go b/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go new file mode 100644 index 000000000..71272c161 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/oneof3/doc.go b/deps/github.com/gogo/protobuf/test/oneof3/doc.go new file mode 100644 index 000000000..e668df5e0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/doc.go @@ -0,0 +1 @@ +package oneof3 diff --git a/deps/github.com/gogo/protobuf/test/oneof3/one.proto b/deps/github.com/gogo/protobuf/test/oneof3/one.proto new file mode 100644 index 000000000..2eca9a07f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneof3/one.proto @@ -0,0 +1,82 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/deps/github.com/gogo/protobuf/test/oneofembed/Makefile b/deps/github.com/gogo/protobuf/test/oneofembed/Makefile new file mode 100644 index 000000000..c68629fad --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneofembed/Makefile @@ -0,0 +1,31 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + protoc-min-version --proto_path=../../../../../:../../protobuf/:. --version="3.0.0" --gogo_out=. *.proto + diff --git a/deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go b/deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go new file mode 100644 index 000000000..889aab629 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go @@ -0,0 +1,434 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oneofembed.proto + +package proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Foo struct { + *Bar `protobuf:"bytes,1,opt,name=bar,embedded=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_oneofembed_d85d6690bc6cfd92, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Foo.Unmarshal(m, b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +type Bar struct { + // Types that are valid to be assigned to Pick: + // *Bar_A + // *Bar_B + Pick isBar_Pick `protobuf_oneof:"pick"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Bar) Reset() { *m = Bar{} } +func (m *Bar) String() string { return proto.CompactTextString(m) } +func (*Bar) ProtoMessage() {} +func (*Bar) Descriptor() ([]byte, []int) { + return fileDescriptor_oneofembed_d85d6690bc6cfd92, []int{1} +} +func (m *Bar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Bar.Unmarshal(m, b) +} +func (m *Bar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Bar.Marshal(b, m, deterministic) +} +func (dst *Bar) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bar.Merge(dst, src) +} +func (m *Bar) XXX_Size() int { + return xxx_messageInfo_Bar.Size(m) +} +func (m *Bar) XXX_DiscardUnknown() { + xxx_messageInfo_Bar.DiscardUnknown(m) +} + +var xxx_messageInfo_Bar proto.InternalMessageInfo + +type isBar_Pick interface { + isBar_Pick() + Equal(interface{}) bool +} + +type Bar_A struct { + A bool `protobuf:"varint,11,opt,name=a,proto3,oneof"` +} +type Bar_B struct { + B bool `protobuf:"varint,12,opt,name=b,proto3,oneof"` +} + +func (*Bar_A) isBar_Pick() {} +func (*Bar_B) isBar_Pick() {} + +func (m *Bar) GetPick() isBar_Pick { + if m != nil { + return m.Pick + } + return nil +} + +func (m *Bar) GetA() bool { + if x, ok := m.GetPick().(*Bar_A); ok { + return x.A + } + return false +} + +func (m *Bar) GetB() bool { + if x, ok := m.GetPick().(*Bar_B); ok { + return x.B + } + return false +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Bar) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Bar_OneofMarshaler, _Bar_OneofUnmarshaler, _Bar_OneofSizer, []interface{}{ + (*Bar_A)(nil), + (*Bar_B)(nil), + } +} + +func _Bar_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Bar) + // pick + switch x := m.Pick.(type) { + case *Bar_A: + t := uint64(0) + if x.A { + t = 1 + } + _ = b.EncodeVarint(11<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Bar_B: + t := uint64(0) + if x.B { + t = 1 + } + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("Bar.Pick has unexpected type %T", x) + } + return nil +} + +func _Bar_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Bar) + switch tag { + case 11: // pick.a + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Pick = &Bar_A{x != 0} + return true, err + case 12: // pick.b + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Pick = &Bar_B{x != 0} + return true, err + default: + return false, nil + } +} + +func _Bar_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Bar) + // pick + switch x := m.Pick.(type) { + case *Bar_A: + n += 1 // tag and wire + n += 1 + case *Bar_B: + n += 1 // tag and wire + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Foo)(nil), "proto.Foo") + proto.RegisterType((*Bar)(nil), "proto.Bar") +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Bar.Equal(that1.Bar) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Bar) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar) + if !ok { + that2, ok := that.(Bar) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Pick == nil { + if this.Pick != nil { + return false + } + } else if this.Pick == nil { + return false + } else if !this.Pick.Equal(that1.Pick) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Bar_A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar_A) + if !ok { + that2, ok := that.(Bar_A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.A != that1.A { + return false + } + return true +} +func (this *Bar_B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar_B) + if !ok { + that2, ok := that.(Bar_B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.B != that1.B { + return false + } + return true +} +func NewPopulatedFoo(r randyOneofembed, easy bool) *Foo { + this := &Foo{} + if r.Intn(10) != 0 { + this.Bar = NewPopulatedBar(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOneofembed(r, 2) + } + return this +} + +func NewPopulatedBar(r randyOneofembed, easy bool) *Bar { + this := &Bar{} + oneofNumber_Pick := []int32{11, 12}[r.Intn(2)] + switch oneofNumber_Pick { + case 11: + this.Pick = NewPopulatedBar_A(r, easy) + case 12: + this.Pick = NewPopulatedBar_B(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOneofembed(r, 13) + } + return this +} + +func NewPopulatedBar_A(r randyOneofembed, easy bool) *Bar_A { + this := &Bar_A{} + this.A = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedBar_B(r randyOneofembed, easy bool) *Bar_B { + this := &Bar_B{} + this.B = bool(bool(r.Intn(2) == 0)) + return this +} + +type randyOneofembed interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOneofembed(r randyOneofembed) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOneofembed(r randyOneofembed) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneOneofembed(r) + } + return string(tmps) +} +func randUnrecognizedOneofembed(r randyOneofembed, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOneofembed(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOneofembed(dAtA []byte, r randyOneofembed, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOneofembed(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("oneofembed.proto", fileDescriptor_oneofembed_d85d6690bc6cfd92) } + +var fileDescriptor_oneofembed_d85d6690bc6cfd92 = []byte{ + // 171 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0xcf, 0x4b, 0xcd, + 0x4f, 0x4b, 0xcd, 0x4d, 0x4a, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, + 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, + 0xf9, 0xfa, 0x60, 0xe1, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xba, 0x94, 0x34, + 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x94, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, + 0x35, 0xb8, 0x8d, 0xb8, 0x20, 0x72, 0x7a, 0x4e, 0x89, 0x45, 0x4e, 0x2c, 0x17, 0xee, 0xc9, 0x33, + 0x06, 0x81, 0x24, 0x95, 0x74, 0xb9, 0x98, 0x9d, 0x12, 0x8b, 0x84, 0xf8, 0xb8, 0x18, 0x13, 0x25, + 0xb8, 0x15, 0x18, 0x35, 0x38, 0x3c, 0x18, 0x82, 0x18, 0x13, 0x41, 0xfc, 0x24, 0x09, 0x1e, 0x18, + 0x3f, 0xc9, 0x89, 0x8d, 0x8b, 0xa5, 0x20, 0x33, 0x39, 0xdb, 0x89, 0xe7, 0xc7, 0x43, 0x39, 0xc6, + 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x1b, 0x69, 0x0c, 0x08, 0x00, + 0x00, 0xff, 0xff, 0x56, 0x58, 0x05, 0x27, 0xb8, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto b/deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto new file mode 100644 index 000000000..8c1ee3835 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto @@ -0,0 +1,46 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package proto; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message Foo { + Bar bar = 1 [(gogoproto.embed) = true]; +} + +message Bar { + oneof pick { + bool a = 11; + bool b = 12; + } +} diff --git a/deps/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go b/deps/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go new file mode 100644 index 000000000..25a832d4f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oneofembed.proto + +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFooProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBarProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFooJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBarJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Bar{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFooProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFooProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBarProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBarProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/packed/Makefile b/deps/github.com/gogo/protobuf/test/packed/Makefile new file mode 100644 index 000000000..9d195810f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/packed/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. packed.proto) diff --git a/deps/github.com/gogo/protobuf/test/packed/doc.go b/deps/github.com/gogo/protobuf/test/packed/doc.go new file mode 100644 index 000000000..e20ab1e95 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/packed/doc.go @@ -0,0 +1 @@ +package packed diff --git a/deps/github.com/gogo/protobuf/test/packed/packed.pb.go b/deps/github.com/gogo/protobuf/test/packed/packed.pb.go new file mode 100644 index 000000000..32020b12f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/packed/packed.pb.go @@ -0,0 +1,4365 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packed.proto + +package packed + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import io "io" +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (m *NinRepNative) String() string { return proto.CompactTextString(m) } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{0} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return xxx_messageInfo_NinRepNative.Size(m) +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +func (m *NinRepNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{1} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNative.Size(m) +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +func (m *NinRepPackedNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepNativeUnsafe struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNativeUnsafe) Reset() { *m = NinRepNativeUnsafe{} } +func (m *NinRepNativeUnsafe) String() string { return proto.CompactTextString(m) } +func (*NinRepNativeUnsafe) ProtoMessage() {} +func (*NinRepNativeUnsafe) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{2} +} +func (m *NinRepNativeUnsafe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNativeUnsafe.Unmarshal(m, b) +} +func (m *NinRepNativeUnsafe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNativeUnsafe.Marshal(b, m, deterministic) +} +func (dst *NinRepNativeUnsafe) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNativeUnsafe.Merge(dst, src) +} +func (m *NinRepNativeUnsafe) XXX_Size() int { + return xxx_messageInfo_NinRepNativeUnsafe.Size(m) +} +func (m *NinRepNativeUnsafe) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNativeUnsafe.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNativeUnsafe proto.InternalMessageInfo + +func (m *NinRepNativeUnsafe) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepPackedNativeUnsafe struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNativeUnsafe) Reset() { *m = NinRepPackedNativeUnsafe{} } +func (m *NinRepPackedNativeUnsafe) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNativeUnsafe) ProtoMessage() {} +func (*NinRepPackedNativeUnsafe) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{3} +} +func (m *NinRepPackedNativeUnsafe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepPackedNativeUnsafe.Unmarshal(m, b) +} +func (m *NinRepPackedNativeUnsafe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNativeUnsafe.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNativeUnsafe) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNativeUnsafe.Merge(dst, src) +} +func (m *NinRepPackedNativeUnsafe) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNativeUnsafe.Size(m) +} +func (m *NinRepPackedNativeUnsafe) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNativeUnsafe.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNativeUnsafe proto.InternalMessageInfo + +func (m *NinRepPackedNativeUnsafe) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +func init() { + proto.RegisterType((*NinRepNative)(nil), "packed.NinRepNative") + proto.RegisterType((*NinRepPackedNative)(nil), "packed.NinRepPackedNative") + proto.RegisterType((*NinRepNativeUnsafe)(nil), "packed.NinRepNativeUnsafe") + proto.RegisterType((*NinRepPackedNativeUnsafe)(nil), "packed.NinRepPackedNativeUnsafe") +} +func NewPopulatedNinRepNative(r randyPacked, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.Field1 = make([]float64, v1) + for i := 0; i < v1; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field2 = make([]float32, v2) + for i := 0; i < v2; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Field3 = make([]int32, v3) + for i := 0; i < v3; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Field4 = make([]int64, v4) + for i := 0; i < v4; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field5 = make([]uint32, v5) + for i := 0; i < v5; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Field6 = make([]uint64, v6) + for i := 0; i < v6; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.Field7 = make([]int32, v7) + for i := 0; i < v7; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Field8 = make([]int64, v8) + for i := 0; i < v8; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Field9 = make([]uint32, v9) + for i := 0; i < v9; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field10 = make([]int32, v10) + for i := 0; i < v10; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Field11 = make([]uint64, v11) + for i := 0; i < v11; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Field12 = make([]int64, v12) + for i := 0; i < v12; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Field13 = make([]bool, v13) + for i := 0; i < v13; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyPacked, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Field1 = make([]float64, v14) + for i := 0; i < v14; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Field2 = make([]float32, v15) + for i := 0; i < v15; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Field3 = make([]int32, v16) + for i := 0; i < v16; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field4 = make([]int64, v17) + for i := 0; i < v17; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field5 = make([]uint32, v18) + for i := 0; i < v18; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field6 = make([]uint64, v19) + for i := 0; i < v19; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field7 = make([]int32, v20) + for i := 0; i < v20; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field8 = make([]int64, v21) + for i := 0; i < v21; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field9 = make([]uint32, v22) + for i := 0; i < v22; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field10 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field11 = make([]uint64, v24) + for i := 0; i < v24; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field12 = make([]int64, v25) + for i := 0; i < v25; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field13 = make([]bool, v26) + for i := 0; i < v26; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepNativeUnsafe(r randyPacked, easy bool) *NinRepNativeUnsafe { + this := &NinRepNativeUnsafe{} + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field1 = make([]float64, v27) + for i := 0; i < v27; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field2 = make([]float32, v28) + for i := 0; i < v28; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field3 = make([]int32, v29) + for i := 0; i < v29; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field4 = make([]int64, v30) + for i := 0; i < v30; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field5 = make([]uint32, v31) + for i := 0; i < v31; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.Field6 = make([]uint64, v32) + for i := 0; i < v32; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field7 = make([]int32, v33) + for i := 0; i < v33; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field8 = make([]int64, v34) + for i := 0; i < v34; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field9 = make([]uint32, v35) + for i := 0; i < v35; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field10 = make([]int32, v36) + for i := 0; i < v36; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field11 = make([]uint64, v37) + for i := 0; i < v37; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field12 = make([]int64, v38) + for i := 0; i < v38; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field13 = make([]bool, v39) + for i := 0; i < v39; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNativeUnsafe(r randyPacked, easy bool) *NinRepPackedNativeUnsafe { + this := &NinRepPackedNativeUnsafe{} + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field1 = make([]float64, v40) + for i := 0; i < v40; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field2 = make([]float32, v41) + for i := 0; i < v41; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field3 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field4 = make([]int64, v43) + for i := 0; i < v43; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field5 = make([]uint32, v44) + for i := 0; i < v44; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field6 = make([]uint64, v45) + for i := 0; i < v45; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field7 = make([]int32, v46) + for i := 0; i < v46; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field8 = make([]int64, v47) + for i := 0; i < v47; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Field9 = make([]uint32, v48) + for i := 0; i < v48; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field10 = make([]int32, v49) + for i := 0; i < v49; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field11 = make([]uint64, v50) + for i := 0; i < v50; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field12 = make([]int64, v51) + for i := 0; i < v51; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field13 = make([]bool, v52) + for i := 0; i < v52; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +type randyPacked interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RunePacked(r randyPacked) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringPacked(r randyPacked) string { + v53 := r.Intn(100) + tmps := make([]rune, v53) + for i := 0; i < v53; i++ { + tmps[i] = randUTF8RunePacked(r) + } + return string(tmps) +} +func randUnrecognizedPacked(r randyPacked, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldPacked(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldPacked(dAtA []byte, r randyPacked, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + v54 := r.Int63() + if r.Intn(2) == 0 { + v54 *= -1 + } + dAtA = encodeVarintPopulatePacked(dAtA, uint64(v54)) + case 1: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulatePacked(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulatePacked(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NinRepNative) 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 ErrIntOverflowPacked + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + 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 *NinRepPackedNative) 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 ErrIntOverflowPacked + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + 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 *NinRepNativeUnsafe) 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 ErrIntOverflowPacked + } + 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: NinRepNativeUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + 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 *NinRepPackedNativeUnsafe) 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 ErrIntOverflowPacked + } + 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: NinRepPackedNativeUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + 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) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + 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 skipPacked(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, ErrIntOverflowPacked + } + 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, ErrIntOverflowPacked + } + 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, ErrIntOverflowPacked + } + 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, ErrInvalidLengthPacked + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPacked + } + 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 := skipPacked(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 ( + ErrInvalidLengthPacked = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPacked = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("packed.proto", fileDescriptor_packed_0c54be3753617b96) } + +var fileDescriptor_packed_0c54be3753617b96 = []byte{ + // 388 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x92, 0xbf, 0x4e, 0xfa, 0x50, + 0x14, 0xc7, 0xd3, 0x9e, 0x52, 0xf8, 0xdd, 0x1f, 0x44, 0xec, 0x60, 0x4e, 0x08, 0xd1, 0x1b, 0xa6, + 0xbb, 0x08, 0xb6, 0xe5, 0xaf, 0x23, 0x83, 0x23, 0x31, 0x24, 0x3e, 0x00, 0x7f, 0x0a, 0x36, 0x2a, + 0x25, 0x0a, 0x3e, 0x86, 0x71, 0xf0, 0x05, 0x7c, 0x13, 0x1f, 0xc2, 0xc9, 0xcd, 0xb7, 0x70, 0x34, + 0xb4, 0xa7, 0xa7, 0x17, 0x1c, 0x1d, 0x5c, 0xd8, 0xb8, 0x9f, 0x4f, 0x18, 0xfa, 0xf9, 0x1e, 0x51, + 0x5c, 0x8e, 0x26, 0x37, 0xc1, 0xb4, 0xbe, 0xbc, 0x8f, 0x56, 0x91, 0x63, 0x27, 0xaf, 0xca, 0xe9, + 0x3c, 0x5c, 0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xec, 0x28, 0xb4, 0xe6, 0x9a, 0xec, + 0x28, 0xb6, 0xe6, 0x5a, 0xec, 0x28, 0xb8, 0xe6, 0xda, 0xec, 0x28, 0xba, 0xe6, 0x3a, 0xec, 0x28, + 0xbc, 0xe6, 0xba, 0xec, 0x28, 0xbe, 0xe6, 0x7a, 0x4e, 0x75, 0x67, 0x80, 0x58, 0xf2, 0x08, 0xd5, + 0x9d, 0x11, 0x74, 0xeb, 0x66, 0x96, 0x86, 0xd0, 0xad, 0x97, 0x59, 0x1a, 0x43, 0xb7, 0xe9, 0x20, + 0x1f, 0x66, 0x3a, 0x48, 0x32, 0xc5, 0xd5, 0xe2, 0x61, 0x34, 0xdb, 0x5f, 0xfb, 0xaf, 0xaf, 0xfd, + 0x6d, 0x13, 0xf7, 0x05, 0x04, 0xfe, 0xbc, 0x76, 0x4a, 0xbc, 0xbf, 0xf9, 0x3f, 0xb8, 0xf9, 0xcd, + 0x2c, 0x7d, 0xeb, 0xeb, 0xf3, 0xd8, 0xf8, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x13, 0x20, 0xf1, 0x6c, + 0x27, 0x06, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/packed/packed.proto b/deps/github.com/gogo/protobuf/test/packed/packed.proto new file mode 100644 index 000000000..f37df6e3d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/packed/packed.proto @@ -0,0 +1,103 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package packed; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; + +message NinRepNative { + option (gogoproto.unmarshaler) = true; + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; +} + +message NinRepPackedNative { + option (gogoproto.unmarshaler) = true; + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NinRepNativeUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; +} + +message NinRepPackedNativeUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} diff --git a/deps/github.com/gogo/protobuf/test/packed/packed_test.go b/deps/github.com/gogo/protobuf/test/packed/packed_test.go new file mode 100644 index 000000000..aed365db2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/packed/packed_test.go @@ -0,0 +1,378 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package packed + +import ( + "bytes" + "fmt" + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "runtime" + "testing" + "time" + "unsafe" +) + +func TestIssue436(t *testing.T) { + n := 1 << 22 // Makes for 32 MiB + + m := &runtime.MemStats{} + + msgNormal := &NinRepNative{ + Field1: make([]float64, n), + } + dataNormal, err := proto.Marshal(msgNormal) + if err != nil { + t.Fatal(err) + } + + normalmsg := &NinRepNative{} + runtime.ReadMemStats(m) + beforeNormal := m.TotalAlloc + err = proto.Unmarshal(dataNormal, normalmsg) + runtime.ReadMemStats(m) + afterNormal := m.TotalAlloc + if err != nil { + t.Fatal(err) + } + + msgPacked := &NinRepPackedNative{ + Field1: make([]float64, n), + } + dataPacked, err := proto.Marshal(msgPacked) + if err != nil { + t.Fatal(err) + } + + packedmsg := &NinRepPackedNative{} + runtime.ReadMemStats(m) + beforePacked := m.TotalAlloc + err = proto.Unmarshal(dataPacked, packedmsg) + runtime.ReadMemStats(m) + afterPacked := m.TotalAlloc + if err != nil { + t.Fatal(err) + } + + totalNormal := afterNormal - beforeNormal + totalPacked := afterPacked - beforePacked + usedRatio := float64(totalPacked) / float64(totalNormal) + if usedRatio > 0.5 { + t.Fatalf("unmarshaling packed msg allocated too much memory:\nnormal:\t\t%d bytes\npacked:\t\t%d bytes\nused ratio:\t%.2f%%", totalNormal, totalPacked, usedRatio*100) + } +} + +/* +https://github.com/gogo/protobuf/issues/detail?id=21 +https://developers.google.com/protocol-buffers/docs/proto#options +In 2.3.0 and later, this change is safe, as parsers for packable fields will always accept both formats, +*/ +func TestSafeIssue21(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedNinRepNative(popr, true) + data1, err := proto.Marshal(msg1) + if err != nil { + t.Fatal(err) + } + packedmsg := &NinRepPackedNative{} + err = proto.Unmarshal(data1, packedmsg) + if err != nil { + t.Fatal(err) + } + if len(packedmsg.XXX_unrecognized) != 0 { + t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") + } + if err := VerboseEqual(msg1, packedmsg); err != nil { + t.Fatalf("%v", err) + } +} + +func TestUnsafeIssue21(t *testing.T) { + var bigendian uint32 = 0x01020304 + if *(*byte)(unsafe.Pointer(&bigendian)) == 1 { + t.Skip("unsafe does not work on big endian architectures") + } + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedNinRepNativeUnsafe(popr, true) + data1, err := proto.Marshal(msg1) + if err != nil { + t.Fatal(err) + } + packedmsg := &NinRepPackedNativeUnsafe{} + err = proto.Unmarshal(data1, packedmsg) + if err != nil { + t.Fatal(err) + } + if len(packedmsg.XXX_unrecognized) != 0 { + t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") + } + if err := VerboseEqualUnsafe(msg1, packedmsg); err != nil { + t.Fatalf("%v", err) + } +} + +func VerboseEqual(this *NinRepNative, that *NinRepPackedNative) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } else if this == nil { + return fmt.Errorf("that != nil && this == nil") + } + + if len(this.Field1) != len(that.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) + } + } + if len(this.Field2) != len(that.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) + } + } + if len(this.Field3) != len(that.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) + } + } + if len(this.Field4) != len(that.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) + } + } + if len(this.Field5) != len(that.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) + } + } + if len(this.Field6) != len(that.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) + } + } + if len(this.Field7) != len(that.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) + } + } + if len(this.Field8) != len(that.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) + } + } + if len(this.Field9) != len(that.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) + } + } + if len(this.Field10) != len(that.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) + } + } + if len(this.Field11) != len(that.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) + } + } + if len(this.Field12) != len(that.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) + } + } + if len(this.Field13) != len(that.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) + } + return nil +} + +func VerboseEqualUnsafe(this *NinRepNativeUnsafe, that *NinRepPackedNativeUnsafe) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } else if this == nil { + return fmt.Errorf("that != nil && this == nil") + } + + if len(this.Field1) != len(that.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) + } + } + if len(this.Field2) != len(that.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) + } + } + if len(this.Field3) != len(that.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) + } + } + if len(this.Field4) != len(that.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) + } + } + if len(this.Field5) != len(that.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) + } + } + if len(this.Field6) != len(that.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) + } + } + if len(this.Field7) != len(that.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) + } + } + if len(this.Field8) != len(that.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) + } + } + if len(this.Field9) != len(that.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) + } + } + if len(this.Field10) != len(that.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) + } + } + if len(this.Field11) != len(that.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) + } + } + if len(this.Field12) != len(that.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) + } + } + if len(this.Field13) != len(that.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) + } + return nil +} diff --git a/deps/github.com/gogo/protobuf/test/proto3extension/Makefile b/deps/github.com/gogo/protobuf/test/proto3extension/Makefile new file mode 100644 index 000000000..4477b52d3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/proto3extension/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go b/deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go new file mode 100644 index 000000000..b158a0576 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go @@ -0,0 +1,58 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3ext.proto + +package proto3extension + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +var E_Primary = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51234, + Name: "proto3extension.primary", + Tag: "varint,51234,opt,name=primary", + Filename: "proto3ext.proto", +} + +var E_Index = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51235, + Name: "proto3extension.index", + Tag: "varint,51235,opt,name=index", + Filename: "proto3ext.proto", +} + +func init() { + proto.RegisterExtension(E_Primary) + proto.RegisterExtension(E_Index) +} + +func init() { proto.RegisterFile("proto3ext.proto", fileDescriptor_proto3ext_326ff12b79dc1085) } + +var fileDescriptor_proto3ext_326ff12b79dc1085 = []byte{ + // 137 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0x4e, 0xad, 0x28, 0xd1, 0x03, 0xb3, 0x84, 0x10, 0x02, 0xa9, 0x79, 0xc5, 0x99, 0xf9, + 0x79, 0x52, 0x0a, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0xf1, 0xa4, 0xd2, 0x34, 0xfd, + 0x94, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xfc, 0x22, 0x88, 0x16, 0x2b, 0x4b, 0x2e, 0xf6, + 0x82, 0xa2, 0xcc, 0xdc, 0xc4, 0xa2, 0x4a, 0x21, 0x59, 0x3d, 0x88, 0x6a, 0x3d, 0x98, 0x6a, 0x3d, + 0xb7, 0xcc, 0xd4, 0x9c, 0x14, 0xff, 0x82, 0x92, 0xcc, 0xfc, 0xbc, 0x62, 0x89, 0x45, 0x13, 0x98, + 0x15, 0x18, 0x35, 0x38, 0x82, 0x60, 0xea, 0xad, 0x4c, 0xb9, 0x58, 0x33, 0xf3, 0x52, 0x52, 0x2b, + 0x08, 0x69, 0x5c, 0x0c, 0xd5, 0x08, 0x51, 0x9d, 0xc4, 0x06, 0x71, 0x24, 0x20, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xd4, 0x32, 0x01, 0xbe, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto b/deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto new file mode 100644 index 000000000..8249f7a99 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package proto3extension; + +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.FieldOptions { + bool primary = 51234; + bool index = 51235; +} + diff --git a/deps/github.com/gogo/protobuf/test/protosize/Makefile b/deps/github.com/gogo/protobuf/test/protosize/Makefile new file mode 100644 index 000000000..dea154ae0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/protosize/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. protosize.proto) diff --git a/deps/github.com/gogo/protobuf/test/protosize/protosize.pb.go b/deps/github.com/gogo/protobuf/test/protosize/protosize.pb.go new file mode 100644 index 000000000..5d08c705f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/protosize/protosize.pb.go @@ -0,0 +1,616 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: protosize.proto + +package protosize + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type SizeMessage struct { + Size *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + ProtoSize_ *int64 `protobuf:"varint,2,opt,name=proto_size,json=protoSize" json:"proto_size,omitempty"` + Equal_ *bool `protobuf:"varint,3,opt,name=Equal" json:"Equal,omitempty"` + String_ *string `protobuf:"bytes,4,opt,name=String" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SizeMessage) Reset() { *m = SizeMessage{} } +func (m *SizeMessage) String() string { return proto.CompactTextString(m) } +func (*SizeMessage) ProtoMessage() {} +func (*SizeMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_protosize_06b2b18dea724cd1, []int{0} +} +func (m *SizeMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SizeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SizeMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SizeMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SizeMessage.Merge(dst, src) +} +func (m *SizeMessage) XXX_Size() int { + return m.ProtoSize() +} +func (m *SizeMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SizeMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SizeMessage proto.InternalMessageInfo + +func (m *SizeMessage) GetSize() int64 { + if m != nil && m.Size != nil { + return *m.Size + } + return 0 +} + +func (m *SizeMessage) GetProtoSize_() int64 { + if m != nil && m.ProtoSize_ != nil { + return *m.ProtoSize_ + } + return 0 +} + +func (m *SizeMessage) GetEqual_() bool { + if m != nil && m.Equal_ != nil { + return *m.Equal_ + } + return false +} + +func (m *SizeMessage) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func init() { + proto.RegisterType((*SizeMessage)(nil), "protosize.SizeMessage") +} +func (this *SizeMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SizeMessage) + if !ok { + that2, ok := that.(SizeMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Size != nil && that1.Size != nil { + if *this.Size != *that1.Size { + return false + } + } else if this.Size != nil { + return false + } else if that1.Size != nil { + return false + } + if this.ProtoSize_ != nil && that1.ProtoSize_ != nil { + if *this.ProtoSize_ != *that1.ProtoSize_ { + return false + } + } else if this.ProtoSize_ != nil { + return false + } else if that1.ProtoSize_ != nil { + return false + } + if this.Equal_ != nil && that1.Equal_ != nil { + if *this.Equal_ != *that1.Equal_ { + return false + } + } else if this.Equal_ != nil { + return false + } else if that1.Equal_ != nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *SizeMessage) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SizeMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Size != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintProtosize(dAtA, i, uint64(*m.Size)) + } + if m.ProtoSize_ != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintProtosize(dAtA, i, uint64(*m.ProtoSize_)) + } + if m.Equal_ != nil { + dAtA[i] = 0x18 + i++ + if *m.Equal_ { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.String_ != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintProtosize(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintProtosize(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 NewPopulatedSizeMessage(r randyProtosize, easy bool) *SizeMessage { + this := &SizeMessage{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Size = &v1 + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.ProtoSize_ = &v2 + } + if r.Intn(10) != 0 { + v3 := bool(bool(r.Intn(2) == 0)) + this.Equal_ = &v3 + } + if r.Intn(10) != 0 { + v4 := string(randStringProtosize(r)) + this.String_ = &v4 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProtosize(r, 5) + } + return this +} + +type randyProtosize interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProtosize(r randyProtosize) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringProtosize(r randyProtosize) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneProtosize(r) + } + return string(tmps) +} +func randUnrecognizedProtosize(r randyProtosize, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldProtosize(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldProtosize(dAtA []byte, r randyProtosize, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateProtosize(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *SizeMessage) ProtoSize() (n int) { + var l int + _ = l + if m.Size != nil { + n += 1 + sovProtosize(uint64(*m.Size)) + } + if m.ProtoSize_ != nil { + n += 1 + sovProtosize(uint64(*m.ProtoSize_)) + } + if m.Equal_ != nil { + n += 2 + } + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovProtosize(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovProtosize(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProtosize(x uint64) (n int) { + return sovProtosize(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SizeMessage) 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 ErrIntOverflowProtosize + } + 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: SizeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SizeMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Size = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProtoSize_", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProtoSize_ = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Equal_ = &b + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + 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 ErrInvalidLengthProtosize + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProtosize(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProtosize + } + 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 skipProtosize(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, ErrIntOverflowProtosize + } + 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, ErrIntOverflowProtosize + } + 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, ErrIntOverflowProtosize + } + 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, ErrInvalidLengthProtosize + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProtosize + } + 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 := skipProtosize(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 ( + ErrInvalidLengthProtosize = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProtosize = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("protosize.proto", fileDescriptor_protosize_06b2b18dea724cd1) } + +var fileDescriptor_protosize_06b2b18dea724cd1 = []byte{ + // 182 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0xca, 0x2f, + 0xc9, 0x2f, 0xce, 0xac, 0x4a, 0xd5, 0x03, 0xb3, 0x84, 0x38, 0xe1, 0x02, 0x52, 0xba, 0xe9, 0x99, + 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xa9, + 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0x3a, 0x95, 0xf2, 0xb8, 0xb8, 0x83, 0x33, + 0xab, 0x52, 0x7d, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x85, 0x84, 0xb8, 0x58, 0x40, 0xa6, 0x48, + 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x81, 0xd9, 0x42, 0xb2, 0x5c, 0x5c, 0x60, 0xb5, 0xf1, 0x60, + 0x19, 0x26, 0xb0, 0x0c, 0xc4, 0x42, 0x90, 0x4e, 0x21, 0x11, 0x2e, 0x56, 0xd7, 0xc2, 0xd2, 0xc4, + 0x1c, 0x09, 0x66, 0x05, 0x46, 0x0d, 0x8e, 0x20, 0x08, 0x47, 0x48, 0x8c, 0x8b, 0x2d, 0xb8, 0xa4, + 0x28, 0x33, 0x2f, 0x5d, 0x82, 0x45, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0x73, 0x92, 0xf8, 0xf1, + 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x1d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, + 0xf0, 0x48, 0x8e, 0x71, 0xc1, 0x63, 0x39, 0x46, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xf7, + 0x87, 0xb3, 0xd5, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/protosize/protosize.proto b/deps/github.com/gogo/protobuf/test/protosize/protosize.proto new file mode 100644 index 000000000..f2d10c1c8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/protosize/protosize.proto @@ -0,0 +1,46 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package protosize; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.protosizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.equal_all) = true; + +message SizeMessage { + optional int64 size = 1; + optional int64 proto_size = 2; + optional bool Equal = 3; + optional string String = 4; +} diff --git a/deps/github.com/gogo/protobuf/test/protosize/protosize_test.go b/deps/github.com/gogo/protobuf/test/protosize/protosize_test.go new file mode 100644 index 000000000..1a6d46768 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/protosize/protosize_test.go @@ -0,0 +1,37 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package protosize + +// We expect that Size field will have no suffix and ProtoSize will be present +var ( + _ = SizeMessage{}.Size + _ = (&SizeMessage{}).GetSize + + _ = (&SizeMessage{}).ProtoSize +) diff --git a/deps/github.com/gogo/protobuf/test/protosize/protosizepb_test.go b/deps/github.com/gogo/protobuf/test/protosize/protosizepb_test.go new file mode 100644 index 000000000..0b6fbdc9c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/protosize/protosizepb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: protosize.proto + +package protosize + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSizeMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSizeMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + size := p.ProtoSize() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSizeMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.ProtoSize() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/registration/.gitignore b/deps/github.com/gogo/protobuf/test/registration/.gitignore new file mode 100644 index 000000000..c6064dff9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/registration/.gitignore @@ -0,0 +1,2 @@ +*.pb.go +*_test.go diff --git a/deps/github.com/gogo/protobuf/test/registration/Makefile b/deps/github.com/gogo/protobuf/test/registration/Makefile new file mode 100644 index 000000000..03a096d89 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/registration/Makefile @@ -0,0 +1,33 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2017, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +test: + go install github.com/gogo/protobuf/protoc-gen-gogo + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. registration.proto) + cp registration_test.go.in registration_test.go + go test ./... diff --git a/deps/github.com/gogo/protobuf/test/registration/registration.proto b/deps/github.com/gogo/protobuf/test/registration/registration.proto new file mode 100644 index 000000000..d8543a18b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/registration/registration.proto @@ -0,0 +1,45 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package registration; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_registration) = true; + +enum AnEnum { + A_VALUE = 0; + ANOTHER_VALUE = 1; +} + +message AMessage { + string a_string = 1; + uint32 a_uint = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/registration/registration_test.go.in b/deps/github.com/gogo/protobuf/test/registration/registration_test.go.in new file mode 100644 index 000000000..93c843c73 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/registration/registration_test.go.in @@ -0,0 +1,85 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package registration + +import ( + "testing" + + gogoproto "github.com/gogo/protobuf/proto" + golangproto "github.com/golang/protobuf/proto" +) + +func TestEnumRegistered(t *testing.T) { + wantMap := map[string]int32{ + "A_VALUE": 0, + "ANOTHER_VALUE": 1, + } + gotMap := golangproto.EnumValueMap("registration.AnEnum") + for k, want := range wantMap { + got, ok := gotMap[k] + if !ok { + t.Errorf("Enum value %q was not registered with golang/protobuf", k) + } + if got != want { + t.Errorf("Enum value %q was different with golang/protobuf: want %v, got %v", k, want, got) + } + } + gotMap = gogoproto.EnumValueMap("registration.AnEnum") + for k, want := range wantMap { + got, ok := gotMap[k] + if !ok { + t.Errorf("Enum value %q was not registered with gogo/protobuf", k) + } + if got != want { + t.Errorf("Enum value %q was different with gogo/protobuf: want %v, got %v", k, want, got) + } + } +} + +func TestMessageRegistered(t *testing.T) { + got := golangproto.MessageType("registration.AMessage") + if got == nil { + t.Error(`Message "AMessage" was not registered with golang/protobuf`) + } + got = gogoproto.MessageType("registration.AMessage") + if got == nil { + t.Error(`Message "AMessage" was not registered with gogo/protobuf`) + } +} + +func TestFileRegistered(t *testing.T) { + got := golangproto.FileDescriptor("registration.proto") + if got == nil { + t.Error(`File "registration.proto" was not registered with golang/protobuf`) + } + got = gogoproto.FileDescriptor("registration.proto") + if got == nil { + t.Error(`File "registration.proto" was not registered with gogo/protobuf`) + } +} diff --git a/deps/github.com/gogo/protobuf/test/required/Makefile b/deps/github.com/gogo/protobuf/test/required/Makefile new file mode 100644 index 000000000..34e6f70c6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/required/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. requiredexample.proto) diff --git a/deps/github.com/gogo/protobuf/test/required/requiredexample.pb.go b/deps/github.com/gogo/protobuf/test/required/requiredexample.pb.go new file mode 100644 index 000000000..b8d7bdec5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/required/requiredexample.pb.go @@ -0,0 +1,2257 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: requiredexample.proto + +package required + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type RequiredExample struct { + TheRequiredString *string `protobuf:"bytes,1,req,name=theRequiredString" json:"theRequiredString,omitempty"` + TheOptionalString *string `protobuf:"bytes,2,opt,name=theOptionalString" json:"theOptionalString,omitempty"` + TheRepeatedStrings []string `protobuf:"bytes,3,rep,name=theRepeatedStrings" json:"theRepeatedStrings,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequiredExample) Reset() { *m = RequiredExample{} } +func (m *RequiredExample) String() string { return proto.CompactTextString(m) } +func (*RequiredExample) ProtoMessage() {} +func (*RequiredExample) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{0} +} +func (m *RequiredExample) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequiredExample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequiredExample.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RequiredExample) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequiredExample.Merge(dst, src) +} +func (m *RequiredExample) XXX_Size() int { + return m.Size() +} +func (m *RequiredExample) XXX_DiscardUnknown() { + xxx_messageInfo_RequiredExample.DiscardUnknown(m) +} + +var xxx_messageInfo_RequiredExample proto.InternalMessageInfo + +func (m *RequiredExample) GetTheRequiredString() string { + if m != nil && m.TheRequiredString != nil { + return *m.TheRequiredString + } + return "" +} + +func (m *RequiredExample) GetTheOptionalString() string { + if m != nil && m.TheOptionalString != nil { + return *m.TheOptionalString + } + return "" +} + +func (m *RequiredExample) GetTheRepeatedStrings() []string { + if m != nil { + return m.TheRepeatedStrings + } + return nil +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,req,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,req,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,req,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,req,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (m *NidOptNative) String() string { return proto.CompactTextString(m) } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{1} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return m.Size() +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +func (m *NidOptNative) GetField1() float64 { + if m != nil { + return m.Field1 + } + return 0 +} + +func (m *NidOptNative) GetField2() float32 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *NidOptNative) GetField3() int32 { + if m != nil { + return m.Field3 + } + return 0 +} + +func (m *NidOptNative) GetField4() int64 { + if m != nil { + return m.Field4 + } + return 0 +} + +func (m *NidOptNative) GetField5() uint32 { + if m != nil { + return m.Field5 + } + return 0 +} + +func (m *NidOptNative) GetField6() uint64 { + if m != nil { + return m.Field6 + } + return 0 +} + +func (m *NidOptNative) GetField7() int32 { + if m != nil { + return m.Field7 + } + return 0 +} + +func (m *NidOptNative) GetField8() int64 { + if m != nil { + return m.Field8 + } + return 0 +} + +func (m *NidOptNative) GetField9() uint32 { + if m != nil { + return m.Field9 + } + return 0 +} + +func (m *NidOptNative) GetField10() int32 { + if m != nil { + return m.Field10 + } + return 0 +} + +func (m *NidOptNative) GetField11() uint64 { + if m != nil { + return m.Field11 + } + return 0 +} + +func (m *NidOptNative) GetField12() int64 { + if m != nil { + return m.Field12 + } + return 0 +} + +func (m *NidOptNative) GetField13() bool { + if m != nil { + return m.Field13 + } + return false +} + +func (m *NidOptNative) GetField14() string { + if m != nil { + return m.Field14 + } + return "" +} + +func (m *NidOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,req,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,req,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,req,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,req,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (m *NinOptNative) String() string { return proto.CompactTextString(m) } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{2} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +func (m *NinOptNative) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptNative) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptNative) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NinOptNative) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NinOptNative) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return 0 +} + +func (m *NinOptNative) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptNative) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptNative) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return 0 +} + +func (m *NinOptNative) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return 0 +} + +func (m *NinOptNative) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return 0 +} + +func (m *NinOptNative) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return 0 +} + +func (m *NinOptNative) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return 0 +} + +func (m *NinOptNative) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptNative) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NestedNinOptNative struct { + NestedNinOpts []*NinOptNative `protobuf:"bytes,1,rep,name=NestedNinOpts" json:"NestedNinOpts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedNinOptNative) Reset() { *m = NestedNinOptNative{} } +func (m *NestedNinOptNative) String() string { return proto.CompactTextString(m) } +func (*NestedNinOptNative) ProtoMessage() {} +func (*NestedNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{3} +} +func (m *NestedNinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedNinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedNinOptNative.Merge(dst, src) +} +func (m *NestedNinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NestedNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NestedNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedNinOptNative proto.InternalMessageInfo + +func (m *NestedNinOptNative) GetNestedNinOpts() []*NinOptNative { + if m != nil { + return m.NestedNinOpts + } + return nil +} + +func init() { + proto.RegisterType((*RequiredExample)(nil), "required.RequiredExample") + proto.RegisterType((*NidOptNative)(nil), "required.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "required.NinOptNative") + proto.RegisterType((*NestedNinOptNative)(nil), "required.NestedNinOptNative") +} +func (m *RequiredExample) 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 *RequiredExample) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TheRequiredString == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") + } else { + dAtA[i] = 0xa + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.TheRequiredString))) + i += copy(dAtA[i:], *m.TheRequiredString) + } + if m.TheOptionalString != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.TheOptionalString))) + i += copy(dAtA[i:], *m.TheOptionalString) + } + if len(m.TheRepeatedStrings) > 0 { + for _, s := range m.TheRepeatedStrings { + dAtA[i] = 0x1a + 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.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptNative) 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 *NidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field3)) + dAtA[i] = 0x20 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field4)) + dAtA[i] = 0x28 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field5)) + dAtA[i] = 0x30 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } else { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } else { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } else { + dAtA[i] = 0x18 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } else { + dAtA[i] = 0x20 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } else { + dAtA[i] = 0x28 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } else { + dAtA[i] = 0x30 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } else { + dAtA[i] = 0x38 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } else { + dAtA[i] = 0x40 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } else { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } else { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } else { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } else { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } else { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } else { + dAtA[i] = 0x72 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } else { + dAtA[i] = 0x7a + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedNinOptNative) 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 *NestedNinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedNinOpts) > 0 { + for _, msg := range m.NestedNinOpts { + dAtA[i] = 0xa + i++ + i = encodeVarintRequiredexample(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 encodeVarintRequiredexample(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 NewPopulatedRequiredExample(r randyRequiredexample, easy bool) *RequiredExample { + this := &RequiredExample{} + v1 := string(randStringRequiredexample(r)) + this.TheRequiredString = &v1 + if r.Intn(10) != 0 { + v2 := string(randStringRequiredexample(r)) + this.TheOptionalString = &v2 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.TheRepeatedStrings = make([]string, v3) + for i := 0; i < v3; i++ { + this.TheRepeatedStrings[i] = string(randStringRequiredexample(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 4) + } + return this +} + +func NewPopulatedNidOptNative(r randyRequiredexample, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringRequiredexample(r)) + v4 := r.Intn(100) + this.Field15 = make([]byte, v4) + for i := 0; i < v4; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyRequiredexample, easy bool) *NinOptNative { + this := &NinOptNative{} + v5 := float64(r.Float64()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field1 = &v5 + v6 := float32(r.Float32()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field2 = &v6 + v7 := int32(r.Int31()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Field3 = &v7 + v8 := int64(r.Int63()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field4 = &v8 + v9 := uint32(r.Uint32()) + this.Field5 = &v9 + v10 := uint64(uint64(r.Uint32())) + this.Field6 = &v10 + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field7 = &v11 + v12 := int64(r.Int63()) + if r.Intn(2) == 0 { + v12 *= -1 + } + this.Field8 = &v12 + v13 := uint32(r.Uint32()) + this.Field9 = &v13 + v14 := int32(r.Int31()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Field10 = &v14 + v15 := uint64(uint64(r.Uint32())) + this.Field11 = &v15 + v16 := int64(r.Int63()) + if r.Intn(2) == 0 { + v16 *= -1 + } + this.Field12 = &v16 + v17 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v17 + v18 := string(randStringRequiredexample(r)) + this.Field14 = &v18 + v19 := r.Intn(100) + this.Field15 = make([]byte, v19) + for i := 0; i < v19; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) + } + return this +} + +func NewPopulatedNestedNinOptNative(r randyRequiredexample, easy bool) *NestedNinOptNative { + this := &NestedNinOptNative{} + if r.Intn(10) != 0 { + v20 := r.Intn(5) + this.NestedNinOpts = make([]*NinOptNative, v20) + for i := 0; i < v20; i++ { + this.NestedNinOpts[i] = NewPopulatedNinOptNative(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 2) + } + return this +} + +type randyRequiredexample interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneRequiredexample(r randyRequiredexample) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringRequiredexample(r randyRequiredexample) string { + v21 := r.Intn(100) + tmps := make([]rune, v21) + for i := 0; i < v21; i++ { + tmps[i] = randUTF8RuneRequiredexample(r) + } + return string(tmps) +} +func randUnrecognizedRequiredexample(r randyRequiredexample, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldRequiredexample(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldRequiredexample(dAtA []byte, r randyRequiredexample, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + v22 := r.Int63() + if r.Intn(2) == 0 { + v22 *= -1 + } + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(v22)) + case 1: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateRequiredexample(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *RequiredExample) Size() (n int) { + var l int + _ = l + if m.TheRequiredString != nil { + l = len(*m.TheRequiredString) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.TheOptionalString != nil { + l = len(*m.TheOptionalString) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if len(m.TheRepeatedStrings) > 0 { + for _, s := range m.TheRepeatedStrings { + l = len(s) + n += 1 + l + sovRequiredexample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovRequiredexample(uint64(m.Field3)) + n += 1 + sovRequiredexample(uint64(m.Field4)) + n += 1 + sovRequiredexample(uint64(m.Field5)) + n += 1 + sovRequiredexample(uint64(m.Field6)) + n += 1 + sozRequiredexample(uint64(m.Field7)) + n += 1 + sozRequiredexample(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovRequiredexample(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozRequiredexample(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozRequiredexample(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedNinOptNative) Size() (n int) { + var l int + _ = l + if len(m.NestedNinOpts) > 0 { + for _, e := range m.NestedNinOpts { + l = e.Size() + n += 1 + l + sovRequiredexample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovRequiredexample(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozRequiredexample(x uint64) (n int) { + return sovRequiredexample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RequiredExample) 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 ErrIntOverflowRequiredexample + } + 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: RequiredExample: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequiredExample: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheRequiredString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.TheRequiredString = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheOptionalString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.TheOptionalString = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheRepeatedStrings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TheRepeatedStrings = append(m.TheRepeatedStrings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + 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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptNative) 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 ErrIntOverflowRequiredexample + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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) + m.Field8 = int64(v) + hasFields[0] |= uint64(0x00000080) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field9 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + hasFields[0] |= uint64(0x00000100) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field10 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + hasFields[0] |= uint64(0x00000200) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field11 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + hasFields[0] |= uint64(0x00000400) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field12 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + hasFields[0] |= uint64(0x00000800) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + hasFields[0] |= uint64(0x00001000) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + 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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowRequiredexample + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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.Field8 = &v2 + hasFields[0] |= uint64(0x00000080) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + hasFields[0] |= uint64(0x00000100) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + hasFields[0] |= uint64(0x00000200) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + hasFields[0] |= uint64(0x00000400) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + hasFields[0] |= uint64(0x00000800) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + hasFields[0] |= uint64(0x00001000) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + 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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedNinOptNative) 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 ErrIntOverflowRequiredexample + } + 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: NestedNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNinOpts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NestedNinOpts = append(m.NestedNinOpts, &NinOptNative{}) + if err := m.NestedNinOpts[len(m.NestedNinOpts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + 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 skipRequiredexample(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, ErrIntOverflowRequiredexample + } + 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, ErrIntOverflowRequiredexample + } + 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, ErrIntOverflowRequiredexample + } + 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, ErrInvalidLengthRequiredexample + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRequiredexample + } + 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 := skipRequiredexample(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 ( + ErrInvalidLengthRequiredexample = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRequiredexample = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("requiredexample.proto", fileDescriptor_requiredexample_2673f47f43fdf851) +} + +var fileDescriptor_requiredexample_2673f47f43fdf851 = []byte{ + // 469 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xd4, 0xdd, 0x8e, 0xd2, 0x40, + 0x14, 0xc0, 0x71, 0x3b, 0x65, 0xf9, 0x98, 0x05, 0xd9, 0x6d, 0xe2, 0xe4, 0xc4, 0x98, 0x7a, 0xc2, + 0xd5, 0x5c, 0x68, 0x57, 0x0a, 0xec, 0x47, 0xe2, 0xd5, 0x26, 0x7a, 0xc9, 0x26, 0xf5, 0x09, 0x58, + 0x19, 0xd9, 0x26, 0x2c, 0xad, 0x30, 0x18, 0xaf, 0x7d, 0x0f, 0xdf, 0x67, 0x2f, 0x7d, 0x00, 0x63, + 0x94, 0xa7, 0xf0, 0xd2, 0x58, 0xda, 0x33, 0x9c, 0xea, 0x1d, 0x3d, 0xff, 0x33, 0x13, 0xc8, 0x8f, + 0x54, 0x3e, 0x59, 0x9b, 0x8f, 0xdb, 0x74, 0x6d, 0xe6, 0xe6, 0xf3, 0xec, 0x3e, 0x5f, 0x9a, 0x28, + 0x5f, 0x67, 0x36, 0x0b, 0xda, 0xd5, 0xf8, 0xe9, 0xcb, 0x45, 0x6a, 0xef, 0xb6, 0xb7, 0xd1, 0xfb, + 0xec, 0xfe, 0x6c, 0x91, 0x2d, 0xb2, 0xb3, 0x62, 0xe1, 0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0x97, 0xb9, + 0x1a, 0xba, 0x3e, 0x84, 0x63, 0x14, 0xba, 0xc9, 0xfb, 0xd0, 0xf5, 0x18, 0xba, 0x28, 0xf4, 0x09, + 0xef, 0xb1, 0xeb, 0x23, 0xe8, 0xa1, 0xd0, 0x6d, 0xde, 0x47, 0xae, 0x8f, 0xe1, 0xf1, 0xdf, 0x3f, + 0x08, 0xef, 0x63, 0xd7, 0x27, 0xd0, 0x47, 0xa1, 0xbb, 0xbc, 0x4f, 0x06, 0x5f, 0x0a, 0xde, 0x95, + 0xe3, 0x55, 0x9c, 0x97, 0x60, 0x15, 0x87, 0x25, 0x52, 0xc5, 0x49, 0x09, 0x53, 0x71, 0x4c, 0x62, + 0x54, 0x9c, 0x91, 0x00, 0x15, 0x07, 0x24, 0x3a, 0xc5, 0xe9, 0x08, 0x4d, 0x71, 0x34, 0xe2, 0x52, + 0x9c, 0x8b, 0xa0, 0xa0, 0x06, 0xe5, 0x88, 0xa0, 0x46, 0xe4, 0x70, 0xa0, 0x86, 0xe3, 0x58, 0xa0, + 0xc6, 0xe2, 0x40, 0xa0, 0x06, 0xe2, 0x28, 0xa0, 0x46, 0xe1, 0x10, 0x12, 0x19, 0x4c, 0xcd, 0xc6, + 0x9a, 0x39, 0x93, 0x78, 0x2d, 0x7b, 0x87, 0xd3, 0x0d, 0x78, 0xe8, 0xeb, 0xe3, 0x58, 0x45, 0xd5, + 0xab, 0x26, 0x3a, 0x5c, 0x4f, 0xf8, 0xf2, 0xf5, 0xc9, 0xef, 0x5f, 0xa1, 0xf7, 0xb0, 0x0b, 0xbd, + 0x6f, 0xbb, 0xd0, 0xfb, 0xb9, 0x0b, 0xbd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x03, 0x9e, 0xae, + 0x5f, 0xba, 0x04, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/required/requiredexample.proto b/deps/github.com/gogo/protobuf/test/required/requiredexample.proto new file mode 100644 index 000000000..33215936e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/required/requiredexample.proto @@ -0,0 +1,83 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package required; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; + +message RequiredExample { + required string theRequiredString = 1; + optional string theOptionalString = 2; + repeated string theRepeatedStrings = 3; +} + +message NidOptNative { + required double Field1 = 1 [(gogoproto.nullable) = false]; + required float Field2 = 2 [(gogoproto.nullable) = false]; + required int32 Field3 = 3 [(gogoproto.nullable) = false]; + required int64 Field4 = 4 [(gogoproto.nullable) = false]; + required uint32 Field5 = 5 [(gogoproto.nullable) = false]; + required uint64 Field6 = 6 [(gogoproto.nullable) = false]; + required sint32 Field7 = 7 [(gogoproto.nullable) = false]; + required sint64 Field8 = 8 [(gogoproto.nullable) = false]; + required fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + required sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + required fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + required sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + required bool Field13 = 13 [(gogoproto.nullable) = false]; + required string Field14 = 14 [(gogoproto.nullable) = false]; + required bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + required double Field1 = 1; + required float Field2 = 2; + required int32 Field3 = 3; + required int64 Field4 = 4; + required uint32 Field5 = 5; + required uint64 Field6 = 6; + required sint32 Field7 = 7; + required sint64 Field8 = 8; + required fixed32 Field9 = 9; + required sfixed32 Field10 = 10; + required fixed64 Field11 = 11; + required sfixed64 Field12 = 12; + required bool Field13 = 13; + required string Field14 = 14; + required bytes Field15 = 15; +} + +message NestedNinOptNative { + repeated NinOptNative NestedNinOpts = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go b/deps/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go new file mode 100644 index 000000000..b9c26375e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go @@ -0,0 +1,181 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package required + +import ( + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/test" + "math/rand" + "reflect" + "strconv" + "testing" + "time" +) + +func TestMarshalToErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { + data := RequiredExample{} + buf, err := proto.Marshal(&data) + if err == nil { + t.Fatalf("err == nil; was %v instead", err) + } + if err.Error() != `proto: required field "theRequiredString" not set` { + t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) + } + if len(buf) != 0 { + t.Fatalf(`len(buf) != 0; was %d instead`, len(buf)) + } +} + +func TestMarshalToSucceedsWhenRequiredFieldIsPresent(t *testing.T) { + data := RequiredExample{ + TheRequiredString: proto.String("present"), + } + buf, err := proto.Marshal(&data) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } + if len(buf) == 0 { + t.Fatalf(`len(buf) == 0; expected nonzero`) + } +} + +func TestUnmarshalErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { + missingRequiredField := []byte{0x12, 0x8, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c} + data := RequiredExample{} + err := proto.Unmarshal(missingRequiredField, &data) + if err == nil { + t.Fatalf("err == nil; was %v instead", err) + } + if err.Error() != `proto: required field "theRequiredString" not set` { + t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) + } +} + +func TestUnmarshalSucceedsWhenRequiredIsNotPresent(t *testing.T) { + dataOut := RequiredExample{ + TheRequiredString: proto.String("present"), + } + encodedMessage, err := proto.Marshal(&dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := RequiredExample{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } +} + +func TestUnmarshalPopulatedOptionalFieldsAsRequiredSucceeds(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := test.NewPopulatedNidOptNative(r, true) + encodedMessage, err := proto.Marshal(dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := NidOptNative{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } +} + +func TestUnmarshalPartiallyPopulatedOptionalFieldsFails(t *testing.T) { + // Fill in all fields, then randomly remove one. + dataOut := &test.NinOptNative{ + Field1: proto.Float64(0), + Field2: proto.Float32(0), + Field3: proto.Int32(0), + Field4: proto.Int64(0), + Field5: proto.Uint32(0), + Field6: proto.Uint64(0), + Field7: proto.Int32(0), + Field8: proto.Int64(0), + Field9: proto.Uint32(0), + Field10: proto.Int32(0), + Field11: proto.Uint64(0), + Field12: proto.Int64(0), + Field13: proto.Bool(false), + Field14: proto.String("0"), + Field15: []byte("0"), + } + r := rand.New(rand.NewSource(time.Now().UnixNano())) + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := NidOptNative{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } +} + +func TestMarshalFailsWithoutAllFieldsSet(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := NewPopulatedNinOptNative(r, true) + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } + if len(encodedMessage) > 0 { + t.Fatalf("Got some bytes from marshal, expected none.") + } +} + +func TestMissingFieldsOnRepeatedNestedTypes(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := &NestedNinOptNative{ + NestedNinOpts: []*NinOptNative{ + NewPopulatedNinOptNative(r, true), + NewPopulatedNinOptNative(r, true), + NewPopulatedNinOptNative(r, true), + }, + } + middle := dataOut.GetNestedNinOpts()[1] + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(middle).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } + if len(encodedMessage) > 0 { + t.Fatalf("Got some bytes from marshal, expected none.") + } +} diff --git a/deps/github.com/gogo/protobuf/test/sizerconflict/doc.go b/deps/github.com/gogo/protobuf/test/sizerconflict/doc.go new file mode 100644 index 000000000..66ef52c40 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/sizerconflict/doc.go @@ -0,0 +1 @@ +package sizerconflict diff --git a/deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto b/deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto new file mode 100644 index 000000000..66345af80 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto @@ -0,0 +1,43 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; +package sizerconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = true; + +message Value { + oneof type { + int64 type_one = 1; + uint64 type_two = 2; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go b/deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go new file mode 100644 index 000000000..907b923f7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package sizerconflict + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func TestSizerConflict(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:./", "sizerconflict.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("sizerconflict.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} diff --git a/deps/github.com/gogo/protobuf/test/sizeunderscore/Makefile b/deps/github.com/gogo/protobuf/test/sizeunderscore/Makefile new file mode 100644 index 000000000..fca7b2afa --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/sizeunderscore/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. sizeunderscore.proto) diff --git a/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go b/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go new file mode 100644 index 000000000..2a23f0ef2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go @@ -0,0 +1,565 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sizeunderscore.proto + +package sizeunderscore + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type SizeMessage struct { + Size_ *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + Equal_ *bool `protobuf:"varint,2,opt,name=Equal" json:"Equal,omitempty"` + String_ *string `protobuf:"bytes,3,opt,name=String" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SizeMessage) Reset() { *m = SizeMessage{} } +func (m *SizeMessage) String() string { return proto.CompactTextString(m) } +func (*SizeMessage) ProtoMessage() {} +func (*SizeMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_sizeunderscore_50ebf86ef0019e26, []int{0} +} +func (m *SizeMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SizeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SizeMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SizeMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SizeMessage.Merge(dst, src) +} +func (m *SizeMessage) XXX_Size() int { + return m.Size() +} +func (m *SizeMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SizeMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SizeMessage proto.InternalMessageInfo + +func (m *SizeMessage) GetSize_() int64 { + if m != nil && m.Size_ != nil { + return *m.Size_ + } + return 0 +} + +func (m *SizeMessage) GetEqual_() bool { + if m != nil && m.Equal_ != nil { + return *m.Equal_ + } + return false +} + +func (m *SizeMessage) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func init() { + proto.RegisterType((*SizeMessage)(nil), "sizeunderscore.SizeMessage") +} +func (this *SizeMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SizeMessage) + if !ok { + that2, ok := that.(SizeMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Size_ != nil && that1.Size_ != nil { + if *this.Size_ != *that1.Size_ { + return false + } + } else if this.Size_ != nil { + return false + } else if that1.Size_ != nil { + return false + } + if this.Equal_ != nil && that1.Equal_ != nil { + if *this.Equal_ != *that1.Equal_ { + return false + } + } else if this.Equal_ != nil { + return false + } else if that1.Equal_ != nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *SizeMessage) 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 *SizeMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Size_ != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintSizeunderscore(dAtA, i, uint64(*m.Size_)) + } + if m.Equal_ != nil { + dAtA[i] = 0x10 + i++ + if *m.Equal_ { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.String_ != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintSizeunderscore(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintSizeunderscore(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 NewPopulatedSizeMessage(r randySizeunderscore, easy bool) *SizeMessage { + this := &SizeMessage{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Size_ = &v1 + } + if r.Intn(10) != 0 { + v2 := bool(bool(r.Intn(2) == 0)) + this.Equal_ = &v2 + } + if r.Intn(10) != 0 { + v3 := string(randStringSizeunderscore(r)) + this.String_ = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSizeunderscore(r, 4) + } + return this +} + +type randySizeunderscore interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSizeunderscore(r randySizeunderscore) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringSizeunderscore(r randySizeunderscore) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneSizeunderscore(r) + } + return string(tmps) +} +func randUnrecognizedSizeunderscore(r randySizeunderscore, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldSizeunderscore(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldSizeunderscore(dAtA []byte, r randySizeunderscore, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateSizeunderscore(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *SizeMessage) Size() (n int) { + var l int + _ = l + if m.Size_ != nil { + n += 1 + sovSizeunderscore(uint64(*m.Size_)) + } + if m.Equal_ != nil { + n += 2 + } + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovSizeunderscore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSizeunderscore(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSizeunderscore(x uint64) (n int) { + return sovSizeunderscore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SizeMessage) 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 ErrIntOverflowSizeunderscore + } + 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: SizeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SizeMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Size_ = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Equal_ = &b + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + 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 ErrInvalidLengthSizeunderscore + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSizeunderscore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSizeunderscore + } + 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 skipSizeunderscore(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, ErrIntOverflowSizeunderscore + } + 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, ErrIntOverflowSizeunderscore + } + 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, ErrIntOverflowSizeunderscore + } + 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, ErrInvalidLengthSizeunderscore + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSizeunderscore + } + 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 := skipSizeunderscore(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 ( + ErrInvalidLengthSizeunderscore = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSizeunderscore = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("sizeunderscore.proto", fileDescriptor_sizeunderscore_50ebf86ef0019e26) +} + +var fileDescriptor_sizeunderscore_50ebf86ef0019e26 = []byte{ + // 174 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0xce, 0xac, 0x4a, + 0x2d, 0xcd, 0x4b, 0x49, 0x2d, 0x2a, 0x4e, 0xce, 0x2f, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0xe2, 0x43, 0x15, 0x95, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, + 0x0b, 0xa2, 0x5d, 0xc9, 0x9f, 0x8b, 0x3b, 0x38, 0xb3, 0x2a, 0xd5, 0x37, 0xb5, 0xb8, 0x38, 0x31, + 0x3d, 0x55, 0x48, 0x88, 0x8b, 0x05, 0x64, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x98, + 0x2d, 0x24, 0xc2, 0xc5, 0xea, 0x5a, 0x58, 0x9a, 0x98, 0x23, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x11, + 0x04, 0xe1, 0x08, 0x89, 0x71, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2b, 0x30, + 0x6a, 0x70, 0x06, 0x41, 0x79, 0x4e, 0x12, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0xb8, + 0xe3, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, + 0x08, 0x08, 0x00, 0x00, 0xff, 0xff, 0x37, 0x1c, 0x48, 0xa4, 0xc0, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto b/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto new file mode 100644 index 000000000..922f53229 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto @@ -0,0 +1,45 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package sizeunderscore; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.equal_all) = true; + +message SizeMessage { + optional int64 size = 1; + optional bool Equal = 2; + optional string String = 3; +} diff --git a/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go b/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go new file mode 100644 index 000000000..8267cd7a9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sizeunderscore.proto + +package sizeunderscore + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSizeMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSizeMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSizeMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/stdtypes/Makefile b/deps/github.com/gogo/protobuf/test/stdtypes/Makefile new file mode 100644 index 000000000..82c4c8c0b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/stdtypes/Makefile @@ -0,0 +1,39 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types\ + :. \ + --proto_path=../../../../../:../../protobuf/:. stdtypes.proto + +test: + go test -race -run=TestConcurrentTextMarshal . \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go b/deps/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go new file mode 100644 index 000000000..fd1181fff --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go @@ -0,0 +1,31 @@ +package stdtypes + +import ( + "io/ioutil" + "sync" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestConcurrentTextMarshal(t *testing.T) { + // Verify that there are no race conditions when calling + // TextMarshaler.Marshal on a protobuf message that contains a StdDuration + + std := StdTypes{} + var wg sync.WaitGroup + + tm := proto.TextMarshaler{} + + for i := 0; i < 2; i++ { + wg.Add(1) + go func() { + defer wg.Done() + err := tm.Marshal(ioutil.Discard, &std) + if err != nil { + t.Fatal(err) + } + }() + } + wg.Wait() +} diff --git a/deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go b/deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go new file mode 100644 index 000000000..83785a7a6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go @@ -0,0 +1,1444 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stdtypes.proto + +package stdtypes + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_bc26b660d02d7cef, []int{0} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StdTypes.Unmarshal(m, b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return xxx_messageInfo_StdTypes.Size(m) +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_bc26b660d02d7cef, []int{1} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepStdTypes.Unmarshal(m, b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return xxx_messageInfo_RepStdTypes.Size(m) +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_bc26b660d02d7cef, []int{2} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapStdTypes.Unmarshal(m, b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return xxx_messageInfo_MapStdTypes.Size(m) +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_bc26b660d02d7cef, []int{3} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofStdTypes.Unmarshal(m, b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return xxx_messageInfo_OneofStdTypes.Size(m) +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*StdTypes)(nil), "stdtypes.StdTypes") + proto.RegisterType((*RepStdTypes)(nil), "stdtypes.RepStdTypes") + proto.RegisterType((*MapStdTypes)(nil), "stdtypes.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "stdtypes.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "stdtypes.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "stdtypes.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]time.Time)(nil), "stdtypes.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofStdTypes)(nil), "stdtypes.OneofStdTypes") +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (this *StdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&stdtypes.StdTypes{") + s = append(s, "NullableTimestamp: "+fmt.Sprintf("%#v", this.NullableTimestamp)+",\n") + s = append(s, "NullableDuration: "+fmt.Sprintf("%#v", this.NullableDuration)+",\n") + s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") + s = append(s, "Duration: "+fmt.Sprintf("%#v", this.Duration)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RepStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&stdtypes.RepStdTypes{") + s = append(s, "NullableTimestamps: "+fmt.Sprintf("%#v", this.NullableTimestamps)+",\n") + s = append(s, "NullableDurations: "+fmt.Sprintf("%#v", this.NullableDurations)+",\n") + s = append(s, "Timestamps: "+fmt.Sprintf("%#v", this.Timestamps)+",\n") + s = append(s, "Durations: "+fmt.Sprintf("%#v", this.Durations)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MapStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&stdtypes.MapStdTypes{") + keysForNullableTimestamp := make([]int32, 0, len(this.NullableTimestamp)) + for k := range this.NullableTimestamp { + keysForNullableTimestamp = append(keysForNullableTimestamp, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableTimestamp) + mapStringForNullableTimestamp := "map[int32]*time.Time{" + for _, k := range keysForNullableTimestamp { + mapStringForNullableTimestamp += fmt.Sprintf("%#v: %#v,", k, this.NullableTimestamp[k]) + } + mapStringForNullableTimestamp += "}" + if this.NullableTimestamp != nil { + s = append(s, "NullableTimestamp: "+mapStringForNullableTimestamp+",\n") + } + keysForTimestamp := make([]int32, 0, len(this.Timestamp)) + for k := range this.Timestamp { + keysForTimestamp = append(keysForTimestamp, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForTimestamp) + mapStringForTimestamp := "map[int32]time.Time{" + for _, k := range keysForTimestamp { + mapStringForTimestamp += fmt.Sprintf("%#v: %#v,", k, this.Timestamp[k]) + } + mapStringForTimestamp += "}" + if this.Timestamp != nil { + s = append(s, "Timestamp: "+mapStringForTimestamp+",\n") + } + keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) + for k := range this.NullableDuration { + keysForNullableDuration = append(keysForNullableDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableDuration) + mapStringForNullableDuration := "map[int32]*time.Duration{" + for _, k := range keysForNullableDuration { + mapStringForNullableDuration += fmt.Sprintf("%#v: %#v,", k, this.NullableDuration[k]) + } + mapStringForNullableDuration += "}" + if this.NullableDuration != nil { + s = append(s, "NullableDuration: "+mapStringForNullableDuration+",\n") + } + keysForDuration := make([]int32, 0, len(this.Duration)) + for k := range this.Duration { + keysForDuration = append(keysForDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForDuration) + mapStringForDuration := "map[int32]time.Duration{" + for _, k := range keysForDuration { + mapStringForDuration += fmt.Sprintf("%#v: %#v,", k, this.Duration[k]) + } + mapStringForDuration += "}" + if this.Duration != nil { + s = append(s, "Duration: "+mapStringForDuration+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&stdtypes.OneofStdTypes{") + if this.OneOfStdTimes != nil { + s = append(s, "OneOfStdTimes: "+fmt.Sprintf("%#v", this.OneOfStdTimes)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofStdTypes_Timestamp) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_Timestamp{` + + `Timestamp:` + fmt.Sprintf("%#v", this.Timestamp) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_Duration) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_Duration{` + + `Duration:` + fmt.Sprintf("%#v", this.Duration) + `}`}, ", ") + return s +} +func valueToGoStringStdtypes(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedStdTypes(r randyStdtypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + v1 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v1 + v2 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v2 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 5) + } + return this +} + +func NewPopulatedRepStdTypes(r randyStdtypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v3 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v3) + for i := 0; i < v3; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v4) + for i := 0; i < v4; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.Timestamps = make([]time.Time, v5) + for i := 0; i < v5; i++ { + v6 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v6 + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(5) + this.Durations = make([]time.Duration, v7) + for i := 0; i < v7; i++ { + v8 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v8 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 5) + } + return this +} + +func NewPopulatedMapStdTypes(r randyStdtypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v9; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v10; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v11; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v12; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 5) + } + return this +} + +func NewPopulatedOneofStdTypes(r randyStdtypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 3) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyStdtypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyStdtypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} + +type randyStdtypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneStdtypes(r randyStdtypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringStdtypes(r randyStdtypes) string { + v13 := r.Intn(100) + tmps := make([]rune, v13) + for i := 0; i < v13; i++ { + tmps[i] = randUTF8RuneStdtypes(r) + } + return string(tmps) +} +func randUnrecognizedStdtypes(r randyStdtypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldStdtypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldStdtypes(dAtA []byte, r randyStdtypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + v14 := r.Int63() + if r.Intn(2) == 0 { + v14 *= -1 + } + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(v14)) + case 1: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateStdtypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *StdTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovStdtypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovStdtypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovStdtypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes) Size() (n int) { + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} + +func sovStdtypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozStdtypes(x uint64) (n int) { + return sovStdtypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("stdtypes.proto", fileDescriptor_stdtypes_bc26b660d02d7cef) } + +var fileDescriptor_stdtypes_bc26b660d02d7cef = []byte{ + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x31, 0x6f, 0xd3, 0x40, + 0x1c, 0xc5, 0x7d, 0x4e, 0x82, 0xd2, 0x7f, 0xd4, 0x52, 0x4e, 0x02, 0x19, 0x0f, 0x97, 0x2a, 0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, 0x44, 0xd7, 0x3a, + 0xf1, 0x23, 0xbe, 0x09, 0xb5, 0xf7, 0x8e, 0x1f, 0xba, 0xe9, 0xb1, 0x3c, 0xa5, 0x19, 0x9d, 0x64, + 0xf0, 0xae, 0x7e, 0x07, 0x99, 0x2f, 0x61, 0xed, 0x8c, 0xc8, 0xaf, 0xe1, 0xa2, 0x32, 0x37, 0xc5, + 0x06, 0xed, 0xd9, 0x0d, 0x16, 0xf7, 0x31, 0xcf, 0x7f, 0x01, 0xab, 0x67, 0xc1, 0x6d, 0x7d, 0x46, + 0xb0, 0xba, 0x37, 0x74, 0xe9, 0x61, 0xd6, 0xef, 0x07, 0xf9, 0xf6, 0x2d, 0x79, 0x87, 0x6e, 0x6b, + 0xf9, 0xc6, 0xdd, 0xcb, 0x55, 0x62, 0xb9, 0x5b, 0x73, 0x5b, 0x93, 0x35, 0xb0, 0xcf, 0x73, 0x47, + 0x7b, 0xdc, 0x51, 0xcc, 0xb4, 0x37, 0x8f, 0xa7, 0x04, 0xfd, 0x9b, 0x12, 0x74, 0x32, 0x25, 0xe8, + 0x4b, 0x44, 0xd0, 0xf7, 0x88, 0xa0, 0x1f, 0x11, 0x41, 0x47, 0x11, 0xd1, 0x7e, 0x46, 0x44, 0x3b, + 0x8e, 0x08, 0x3a, 0x89, 0x88, 0xf6, 0xe1, 0x2f, 0xd1, 0xba, 0xe7, 0xf8, 0x1e, 0xb7, 0xff, 0x07, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x68, 0x05, 0x4b, 0xab, 0x06, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto b/deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto new file mode 100644 index 000000000..fb69b7327 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto @@ -0,0 +1,78 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package stdtypes; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go b/deps/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go new file mode 100644 index 000000000..d2d91cca8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go @@ -0,0 +1,795 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stdtypes.proto + +package stdtypes + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestRepStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOneofStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/t.go b/deps/github.com/gogo/protobuf/test/t.go new file mode 100644 index 000000000..c7c292e82 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/t.go @@ -0,0 +1,73 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/deps/github.com/gogo/protobuf/test/tags/Makefile b/deps/github.com/gogo/protobuf/test/tags/Makefile new file mode 100644 index 000000000..e1105dc5e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/tags/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. tags.proto) diff --git a/deps/github.com/gogo/protobuf/test/tags/doc.go b/deps/github.com/gogo/protobuf/test/tags/doc.go new file mode 100644 index 000000000..2eee96184 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/tags/doc.go @@ -0,0 +1 @@ +package tags diff --git a/deps/github.com/gogo/protobuf/test/tags/tags.pb.go b/deps/github.com/gogo/protobuf/test/tags/tags.pb.go new file mode 100644 index 000000000..7fedc1627 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/tags/tags.pb.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tags.proto + +package tags + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Outside struct { + *Inside `protobuf:"bytes,1,opt,name=Inside,embedded=Inside" json:""` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"MyField2" xml:",comment"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Outside) Reset() { *m = Outside{} } +func (m *Outside) String() string { return proto.CompactTextString(m) } +func (*Outside) ProtoMessage() {} +func (*Outside) Descriptor() ([]byte, []int) { + return fileDescriptor_tags_156838d323721841, []int{0} +} +func (m *Outside) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Outside.Unmarshal(m, b) +} +func (m *Outside) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Outside.Marshal(b, m, deterministic) +} +func (dst *Outside) XXX_Merge(src proto.Message) { + xxx_messageInfo_Outside.Merge(dst, src) +} +func (m *Outside) XXX_Size() int { + return xxx_messageInfo_Outside.Size(m) +} +func (m *Outside) XXX_DiscardUnknown() { + xxx_messageInfo_Outside.DiscardUnknown(m) +} + +var xxx_messageInfo_Outside proto.InternalMessageInfo + +func (m *Outside) GetField2() string { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return "" +} + +type Inside struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"MyField1" xml:",chardata"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Inside) Reset() { *m = Inside{} } +func (m *Inside) String() string { return proto.CompactTextString(m) } +func (*Inside) ProtoMessage() {} +func (*Inside) Descriptor() ([]byte, []int) { + return fileDescriptor_tags_156838d323721841, []int{1} +} +func (m *Inside) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Inside.Unmarshal(m, b) +} +func (m *Inside) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Inside.Marshal(b, m, deterministic) +} +func (dst *Inside) XXX_Merge(src proto.Message) { + xxx_messageInfo_Inside.Merge(dst, src) +} +func (m *Inside) XXX_Size() int { + return xxx_messageInfo_Inside.Size(m) +} +func (m *Inside) XXX_DiscardUnknown() { + xxx_messageInfo_Inside.DiscardUnknown(m) +} + +var xxx_messageInfo_Inside proto.InternalMessageInfo + +func (m *Inside) GetField1() string { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return "" +} + +func init() { + proto.RegisterType((*Outside)(nil), "tags.Outside") + proto.RegisterType((*Inside)(nil), "tags.Inside") +} +func NewPopulatedOutside(r randyTags, easy bool) *Outside { + this := &Outside{} + if r.Intn(10) != 0 { + this.Inside = NewPopulatedInside(r, easy) + } + if r.Intn(10) != 0 { + v1 := string(randStringTags(r)) + this.Field2 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTags(r, 3) + } + return this +} + +func NewPopulatedInside(r randyTags, easy bool) *Inside { + this := &Inside{} + if r.Intn(10) != 0 { + v2 := string(randStringTags(r)) + this.Field1 = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTags(r, 2) + } + return this +} + +type randyTags interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTags(r randyTags) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTags(r randyTags) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneTags(r) + } + return string(tmps) +} +func randUnrecognizedTags(r randyTags, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTags(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTags(dAtA []byte, r randyTags, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateTags(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTags(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTags(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("tags.proto", fileDescriptor_tags_156838d323721841) } + +var fileDescriptor_tags_156838d323721841 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x4c, 0x2f, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0x15, 0x72, 0xb1, 0xfb, 0x97, 0x96, 0x14, + 0x67, 0xa6, 0xa4, 0x0a, 0xe9, 0x71, 0xb1, 0x79, 0xe6, 0x81, 0x58, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, + 0xdc, 0x46, 0x3c, 0x7a, 0x60, 0xc3, 0x21, 0x62, 0x4e, 0x1c, 0x17, 0xee, 0xc9, 0x33, 0xbe, 0xba, + 0x27, 0xcf, 0x10, 0x04, 0x55, 0x25, 0x64, 0xc6, 0xc5, 0xe6, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x24, + 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xf7, 0xea, 0x9e, 0x3c, 0x87, 0x6f, 0x25, 0x44, 0xec, + 0xd3, 0x3d, 0x79, 0xbe, 0x8a, 0xdc, 0x1c, 0x2b, 0x25, 0x9d, 0xe4, 0xfc, 0xdc, 0xdc, 0xd4, 0xbc, + 0x12, 0xa5, 0x20, 0xa8, 0x6a, 0x25, 0x47, 0x98, 0x3d, 0x42, 0xe6, 0x50, 0x13, 0x0c, 0xc1, 0x36, + 0x72, 0x3a, 0xc9, 0x23, 0x99, 0x60, 0xf8, 0xe9, 0x9e, 0x3c, 0x3f, 0xd4, 0x84, 0x8c, 0xc4, 0xa2, + 0x94, 0xc4, 0x92, 0x44, 0x98, 0x11, 0x86, 0x4e, 0x2c, 0x3f, 0x1e, 0xca, 0x31, 0x02, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x57, 0x12, 0x09, 0x10, 0xfd, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/tags/tags.proto b/deps/github.com/gogo/protobuf/test/tags/tags.proto new file mode 100644 index 000000000..f4ef2a68d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/tags/tags.proto @@ -0,0 +1,44 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package tags; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; + +message Outside { + optional Inside Inside = 1 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + optional string Field2 = 2 [(gogoproto.jsontag) = "MyField2", (gogoproto.moretags) = "xml:\",comment\""]; +} + +message Inside { + optional string Field1 = 1 [(gogoproto.jsontag) = "MyField1", (gogoproto.moretags) = "xml:\",chardata\""]; +} diff --git a/deps/github.com/gogo/protobuf/test/tags/tags_test.go b/deps/github.com/gogo/protobuf/test/tags/tags_test.go new file mode 100644 index 000000000..18db0f8a2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/tags/tags_test.go @@ -0,0 +1,119 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package tags + +import ( + "bytes" + "encoding/json" + "encoding/xml" + math_rand "math/rand" + "testing" + "time" +) + +type MyJson struct { + MyField1 string + MyField2 string +} + +func NewPopulatedMyJson(r randyTags) *MyJson { + this := &MyJson{} + if r.Intn(10) != 0 { + this.MyField1 = randStringTags(r) + } + if r.Intn(10) != 0 { + this.MyField2 = randStringTags(r) + } + return this +} + +func TestJson(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedMyJson(popr) + data, err := json.Marshal(msg1) + if err != nil { + panic(err) + } + outside := &Outside{} + err = json.Unmarshal(data, outside) + if err != nil { + panic(err) + } + if outside.GetField1() != msg1.MyField1 { + t.Fatalf("proto field1 %s != %s", outside.GetField1(), msg1.MyField1) + } + if outside.GetField2() != msg1.MyField2 { + t.Fatalf("proto field2 %s != %s", outside.GetField2(), msg1.MyField2) + } + data2, err := json.Marshal(outside) + if err != nil { + panic(err) + } + msg2 := &MyJson{} + err = json.Unmarshal(data2, msg2) + if err != nil { + panic(err) + } + if msg2.MyField1 != msg1.MyField1 { + t.Fatalf("proto field1 %s != %s", msg2.MyField1, msg1.MyField1) + } + if msg2.MyField2 != msg1.MyField2 { + t.Fatalf("proto field2 %s != %s", msg2.MyField2, msg1.MyField2) + } +} + +func TestXml(t *testing.T) { + s := "Field1Value0" + field1 := "Field1Value" + field2 := "Field2Value" + msg1 := &Outside{} + err := xml.Unmarshal([]byte(s), msg1) + if err != nil { + panic(err) + } + msg2 := &Outside{ + Inside: &Inside{ + Field1: &field1, + }, + Field2: &field2, + } + if msg1.GetField1() != msg2.GetField1() { + t.Fatalf("field1 expected %s got %s", msg2.GetField1(), msg1.GetField1()) + } + if err != nil { + panic(err) + } + data, err := xml.Marshal(msg2) + if err != nil { + panic(err) + } + if !bytes.Equal(data, []byte(s)) { + t.Fatalf("expected %s got %s", s, string(data)) + } +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/Makefile b/deps/github.com/gogo/protobuf/test/theproto3/Makefile new file mode 100644 index 000000000..fe1b67619 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/Makefile @@ -0,0 +1,36 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + cp header.proto theproto3.proto + cat maps.proto >> theproto3.proto + cat footer.proto >> theproto3.proto + protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. theproto3.proto + find combos -type d -not -name combos -exec cp proto3_test.go.in {}/proto3_test.go \; diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go new file mode 100644 index 000000000..4a46c2986 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go @@ -0,0 +1,11572 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return m.Size() +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return m.Size() +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return m.Size() +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return m.Size() +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7971 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0xde, 0x34, 0x1a, 0x24, 0xc1, 0x1f, 0x20, 0xd9, 0x6c, 0xce, 0x50, 0x10, 0x35, 0x26, 0x67, + 0xa0, 0xd1, 0x88, 0xa2, 0x2d, 0xce, 0x0c, 0x87, 0x73, 0xc3, 0x58, 0xd2, 0x02,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, 0x31, 0x46, 0x03, + 0xce, 0x3b, 0xd6, 0xd6, 0xde, 0xb6, 0x01, 0x01, 0xc3, 0x46, 0x79, 0x67, 0xa7, 0x70, 0xa7, 0x6c, + 0xa4, 0x03, 0x89, 0xe2, 0xbd, 0xdd, 0xf2, 0x8e, 0x91, 0x91, 0xd4, 0xba, 0xba, 0x64, 0x8c, 0x05, + 0xa7, 0x28, 0x6f, 0xee, 0x6d, 0x18, 0xe3, 0xe6, 0x24, 0x8c, 0xd1, 0x53, 0x70, 0x25, 0x26, 0x94, + 0xa1, 0xeb, 0xcb, 0x86, 0x11, 0x2a, 0x42, 0x59, 0x26, 0xa5, 0x81, 0xeb, 0xcb, 0x86, 0x99, 0x2b, + 0xc1, 0x10, 0x89, 0x2e, 0xd3, 0x84, 0xf1, 0xf5, 0x42, 0xb1, 0xbc, 0x5e, 0xd9, 0xda, 0xde, 0x5d, + 0xdb, 0xda, 0x2c, 0xac, 0x1b, 0x5a, 0x38, 0x66, 0x95, 0x3f, 0xbe, 0xb7, 0x66, 0x95, 0x57, 0x8c, + 0x84, 0x38, 0xb6, 0x5d, 0x2e, 0xec, 0x96, 0x57, 0x0c, 0x3d, 0x57, 0x85, 0xd3, 0x51, 0x75, 0x32, + 0x32, 0x33, 0x04, 0x17, 0x27, 0x7a, 0xb8, 0x98, 0x70, 0x75, 0xb9, 0xf8, 0xbb, 0x09, 0x98, 0x8a, + 0x58, 0x2b, 0x22, 0x4f, 0xf2, 0x1c, 0x0c, 0xd1, 0x10, 0xa5, 0xab, 0xe7, 0x53, 0x91, 0x8b, 0x0e, + 0x09, 0xd8, 0xae, 0x15, 0x94, 0xe0, 0xc4, 0x0e, 0x42, 0xef, 0xd1, 0x41, 0x60, 0x8a, 0xae, 0x9a, + 0xfe, 0x67, 0xbb, 0x6a, 0x3a, 0x5d, 0xf6, 0xae, 0x0f, 0xb2, 0xec, 0x91, 0xb1, 0x93, 0xd5, 0xf6, + 0xa1, 0x88, 0xda, 0x7e, 0x1b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xc9, 0x3a, 0xa2, 0x91, + 0x4a, 0xf3, 0x78, 0xdf, 0x56, 0x7a, 0xb1, 0x84, 0x17, 0x98, 0xfc, 0x30, 0x6d, 0x59, 0x2d, 0x8a, + 0xc4, 0x8b, 0x3b, 0xae, 0x2d, 0x88, 0xb6, 0x08, 0x29, 0x8b, 0x1d, 0x99, 0x77, 0x60, 0xf8, 0x65, + 0x8f, 0x70, 0x0f, 0x13, 0xee, 0x0b, 0xfd, 0xb9, 0xef, 0xee, 0x10, 0xf2, 0xd1, 0xbb, 0x3b, 0x95, + 0xcd, 0x2d, 0x6b, 0xa3, 0xb0, 0x6e, 0x31, 0xb8, 0xf9, 0x28, 0x24, 0x1b, 0xf6, 0x1b, 0xc7, 0xf2, + 0x52, 0x44, 0x86, 0x06, 0x35, 0xfc, 0xa3, 0x90, 0x7c, 0x0d, 0xd9, 0xaf, 0xc8, 0x0b, 0x00, 0x19, + 0xfa, 0x00, 0x43, 0xff, 0x12, 0x0c, 0x11, 0x7b, 0x99, 0x00, 0xcc, 0x62, 0xc6, 0x29, 0x33, 0x05, + 0xc9, 0xd2, 0x96, 0x85, 0xc3, 0xdf, 0x80, 0x0c, 0x1d, 0xad, 0x6c, 0xaf, 0x95, 0x4b, 0x65, 0x23, + 0x91, 0xbb, 0x06, 0xc3, 0xd4, 0x08, 0x38, 0x35, 0x02, 0x33, 0x18, 0xa7, 0xd8, 0x21, 0xe3, 0xd0, + 0xf8, 0xec, 0xde, 0x46, 0xb1, 0x6c, 0x19, 0x09, 0xd1, 0xbd, 0x1e, 0x64, 0xc4, 0xbe, 0xf8, 0xa7, + 0x13, 0x53, 0xbf, 0xa7, 0x41, 0x5a, 0xe8, 0x73, 0x71, 0x83, 0x62, 0x37, 0x1a, 0xee, 0x6b, 0x15, + 0xbb, 0x51, 0xb7, 0x3d, 0x16, 0x14, 0x40, 0x86, 0x0a, 0x78, 0x64, 0x50, 0xa7, 0xfd, 0x54, 0x94, + 0xff, 0x82, 0x06, 0x86, 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 0x6c, + 0x22, 0xc7, 0xf7, 0xb8, 0x5f, 0xd9, 0x78, 0x89, 0x0d, 0x9b, 0x1f, 0x86, 0x49, 0xbf, 0x6d, 0xd7, + 0x1b, 0x92, 0x6c, 0x92, 0xc8, 0x1a, 0x7c, 0x22, 0x10, 0xce, 0xc3, 0xa3, 0x9c, 0xb7, 0x86, 0x7c, + 0xbb, 0x7a, 0x84, 0x6a, 0x21, 0x68, 0x98, 0x3c, 0x66, 0x78, 0x84, 0x09, 0xac, 0xb0, 0x79, 0x8e, + 0xcd, 0xfd, 0x81, 0x06, 0x93, 0xfc, 0x86, 0xa9, 0x16, 0x18, 0x6b, 0x03, 0xc0, 0x76, 0x1c, 0xd7, + 0x17, 0xcd, 0xd5, 0x1d, 0xca, 0x5d, 0xb8, 0xc5, 0x42, 0x00, 0xb2, 0x04, 0x82, 0x99, 0x26, 0x40, + 0x38, 0xd3, 0xd3, 0x6c, 0x73, 0x90, 0x66, 0x5b, 0x38, 0x64, 0x1f, 0x90, 0xde, 0x62, 0x03, 0x1d, + 0xc2, 0x77, 0x56, 0xe6, 0x69, 0x18, 0xda, 0x47, 0x87, 0x75, 0x87, 0x3d, 0x98, 0xa5, 0x07, 0xfc, + 0x41, 0x48, 0x32, 0x78, 0x10, 0x52, 0x7c, 0x09, 0xa6, 0xaa, 0x6e, 0x53, 0x55, 0xb7, 0x68, 0x28, + 0xb7, 0xf9, 0xde, 0xf3, 0xda, 0x27, 0x21, 0x6c, 0x31, 0x7f, 0xac, 0x69, 0xff, 0x30, 0xa1, 0xdf, + 0xd9, 0x2e, 0xfe, 0x46, 0x62, 0xe6, 0x0e, 0x85, 0x6e, 0xf3, 0x2b, 0xb5, 0xd0, 0x41, 0x03, 0x55, + 0xb1, 0xf6, 0xf0, 0xe5, 0x79, 0x78, 0xfa, 0xb0, 0xee, 0x1f, 0x75, 0xf6, 0x17, 0xab, 0x6e, 0xf3, + 0xd2, 0xa1, 0x7b, 0xe8, 0x86, 0x5b, 0x9f,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, 0xec, 0xa2, 0xf2, 0x36, 0x92, 0x2c, 0x57, 0x0e, 0xe2, + 0xed, 0xa2, 0xb2, 0xf7, 0x24, 0xcb, 0xad, 0x06, 0x91, 0x77, 0x51, 0xd9, 0x85, 0x92, 0xe5, 0xee, + 0x04, 0x31, 0x78, 0x51, 0x79, 0x57, 0x49, 0x96, 0x7b, 0x3e, 0x88, 0xc6, 0x8b, 0xca, 0x5b, 0x4b, + 0xb2, 0xdc, 0x5a, 0x10, 0x97, 0xf3, 0xea, 0xfb, 0x4b, 0xb2, 0xe0, 0xdd, 0x30, 0x42, 0xe7, 0xd5, + 0x37, 0x99, 0x64, 0xc9, 0x8f, 0x85, 0xb1, 0x3a, 0xaf, 0xbe, 0xd3, 0x24, 0x4b, 0xae, 0x87, 0x51, + 0x3b, 0xaf, 0xee, 0x95, 0xc9, 0x92, 0x1b, 0x61, 0xfc, 0xce, 0xab, 0xbb, 0x66, 0xb2, 0xe4, 0x66, + 0x18, 0xc9, 0xf3, 0xea, 0xfe, 0x99, 0x2c, 0xb9, 0x15, 0x3e, 0x44, 0xff, 0x7d, 0x25, 0xfc, 0x84, + 0xb7, 0xa0, 0x72, 0x4a, 0xf8, 0x41, 0x44, 0xe8, 0x29, 0x85, 0x4c, 0x90, 0x09, 0xc3, 0x2e, 0xa7, + 0x84, 0x1d, 0x44, 0x84, 0x5c, 0x4e, 0x09, 0x39, 0x88, 0x08, 0xb7, 0x9c, 0x12, 0x6e, 0x10, 0x11, + 0x6a, 0x39, 0x25, 0xd4, 0x20, 0x22, 0xcc, 0x72, 0x4a, 0x98, 0x41, 0x44, 0x88, 0xe5, 0x94, 0x10, + 0x83, 0x88, 0xf0, 0xca, 0x29, 0xe1, 0x05, 0x11, 0xa1, 0x75, 0x41, 0x0d, 0x2d, 0x88, 0x0a, 0xab, + 0x0b, 0x6a, 0x58, 0x41, 0x54, 0x48, 0x3d, 0xae, 0x86, 0xd4, 0xe8, 0x83, 0x77, 0xe6, 0x86, 0xf0, + 0x90, 0x10, 0x4d, 0x17, 0xd4, 0x68, 0x82, 0xa8, 0x48, 0xba, 0xa0, 0x46, 0x12, 0x44, 0x45, 0xd1, + 0x05, 0x35, 0x8a, 0x20, 0x2a, 0x82, 0xde, 0x56, 0x23, 0x28, 0x7c, 0xc7, 0x27, 0xa7, 0x6c, 0x29, + 0xc6, 0x45, 0x90, 0x3e, 0x40, 0x04, 0xe9, 0x03, 0x44, 0x90, 0x3e, 0x40, 0x04, 0xe9, 0x03, 0x44, + 0x90, 0x3e, 0x40, 0x04, 0xe9, 0x03, 0x44, 0x90, 0x3e, 0x40, 0x04, 0xe9, 0x83, 0x44, 0x90, 0x3e, + 0x50, 0x04, 0xe9, 0xbd, 0x22, 0xe8, 0x82, 0xfa, 0xc6, 0x03, 0x44, 0x15, 0xa4, 0x0b, 0xea, 0xd6, + 0x67, 0x7c, 0x08, 0xe9, 0x03, 0x85, 0x90, 0xde, 0x2b, 0x84, 0x7e, 0x5f, 0x87, 0x29, 0x29, 0x84, + 0xd8, 0xfe, 0xd0, 0xfb, 0x55, 0x81, 0xae, 0x0f, 0xf0, 0x82, 0x45, 0x54, 0x4c, 0x5d, 0x1f, 0x60, + 0x93, 0xba, 0x5f, 0x9c, 0x75, 0x57, 0xa1, 0xf2, 0x00, 0x55, 0x68, 0x35, 0x88, 0xa1, 0xeb, 0x03, + 0xbc, 0x78, 0xd1, 0x1d, 0x7b, 0x37, 0xfb, 0x15, 0x81, 0xe7, 0x07, 0x2a, 0x02, 0x6b, 0x03, 0x15, + 0x81, 0xbb, 0xa1, 0x07, 0x7f, 0x39, 0x01, 0xa7, 0x43, 0x0f, 0xd2, 0x4f, 0xe4, 0x87, 0x9d, 0x72, + 0xc2, 0x16, 0x95, 0xc9, 0xb7, 0x6d, 0x04, 0x37, 0x26, 0xd6, 0x6a, 0xe6, 0xb6, 0xbc, 0x59, 0x95, + 0x3f, 0xe9, 0x06, 0x8e, 0xe0, 0x71, 0xf6, 0x30, 0xf4, 0x02, 0x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 0x20, + 0x6a, 0x10, 0x1c, 0x9b, 0x45, 0x80, 0xd5, 0xfa, 0xeb, 0xa8, 0x46, 0x55, 0xa0, 0x7f, 0x38, 0x28, + 0x17, 0xc1, 0x10, 0x0a, 0x51, 0x0a, 0x01, 0x65, 0x96, 0x21, 0xbd, 0x73, 0x10, 0x92, 0x40, 0x57, + 0x1e, 0x07, 0x6a, 0x1c, 0x28, 0x2c, 0x22, 0x2e, 0x50, 0x85, 0x5e, 0x4c, 0xba, 0xbf, 0x2a, 0xc2, + 0xd5, 0x08, 0xa8, 0x50, 0x15, 0x4a, 0x92, 0x89, 0x51, 0x45, 0x60, 0x11, 0x71, 0xb8, 0x18, 0x16, + 0x5d, 0x17, 0x4b, 0xb2, 0xaa, 0x34, 0x17, 0x41, 0xc1, 0x24, 0x58, 0x31, 0x64, 0x47, 0xc4, 0x23, + 0x24, 0xc8, 0x31, 0x78, 0xbc, 0xb7, 0x47, 0xb8, 0x0c, 0xf7, 0x08, 0x3f, 0x16, 0xf3, 0x8c, 0xbc, + 0xca, 0x8a, 0x79, 0x26, 0x62, 0xf3, 0x8c, 0x8b, 0x2a, 0x79, 0xc6, 0x87, 0xcd, 0x8f, 0xc3, 0x04, + 0x1f, 0xc3, 0xe5, 0x09, 0x93, 0x1a, 0xec, 0x4f, 0xab, 0xf5, 0x26, 0x65, 0x92, 0x94, 0x53, 0xc5, + 0x9b, 0x9b, 0x30, 0xce, 0x87, 0x36, 0x3c, 0x72, 0xb9, 0x93, 0xec, 0xaf, 0x66, 0xf4, 0x66, 0xa4, + 0x82, 0x94, 0x50, 0x41, 0xcf, 0xac, 0xc0, 0x74, 0x74, 0x35, 0x12, 0xcb, 0xef, 0x28, 0x2d, 0xbf, + 0xa7, 0xc5, 0xf2, 0xab, 0x89, 0xe5, 0xbb, 0x04, 0x67, 0x22, 0x6b, 0x4f, 0x1c, 0x49, 0x42, 0x24, + 0xb9, 0x0d, 0x63, 0x52, 0xc9, 0x11, 0xc1, 0x43, 0x11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 0xe6, 0x05, 0x0b, 0x77, 0x71, + 0x2c, 0x46, 0x7c, 0xa2, 0xbb, 0x50, 0x74, 0x4d, 0x96, 0x07, 0x67, 0x0a, 0x30, 0x15, 0x21, 0x76, + 0x92, 0x05, 0x39, 0x77, 0x1e, 0x46, 0x37, 0x5d, 0x9f, 0xfe, 0x64, 0x8e, 0x79, 0x5a, 0xd8, 0x55, + 0x28, 0x26, 0x8c, 0x53, 0x04, 0xbc, 0x70, 0x1e, 0x46, 0x58, 0xf6, 0x9b, 0xc3, 0x90, 0xd8, 0x28, + 0x18, 0xa7, 0xc8, 0xff, 0x45, 0x43, 0x23, 0xff, 0x97, 0x8c, 0x44, 0x71, 0xfd, 0xfd, 0xdc, 0x62, + 0xda, 0x1f, 0xa6, 0xe6, 0xf9, 0x93, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xac, 0xe5, 0x9c, 0xe5, + 0x81, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Hilarity != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if len(m.Key) > 0 { + dAtA2 := make([]byte, len(m.Key)*10) + var j1 int + for _, num := range m.Key { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if m.Nested != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Nested.Size())) + n3, err := m.Nested.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ResultCount != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + dAtA[i] = 0x40 + i++ + if m.TrueScotsman { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Score != 0 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i += 4 + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + dAtA[i] = 0x52 + i++ + v := m.Terrain[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n4, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + } + if m.Proto2Field != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Proto2Field.Size())) + n5, err := m.Proto2Field.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + dAtA[i] = 0x6a + i++ + v := m.Proto2Value[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n6, err := v.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 *Nested) 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 *Nested) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Bunny))) + i += copy(dAtA[i:], m.Bunny) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n7, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n8, err := v.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 *MessageWithMap) 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 *MessageWithMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + dAtA[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + dAtA[i] = 0x12 + i++ + v := m.MsgMapping[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sozTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n9, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + dAtA[i] = 0x1a + i++ + v := m.ByteMapping[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + 1 + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Uint128Pair) 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 *Uint128Pair) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Left.Size())) + n10, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + if m.Right != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Right.Size())) + n11, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ContainsNestedMap) 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 *ContainsNestedMap) 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 *ContainsNestedMap_NestedMap) 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 *ContainsNestedMap_NestedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + dAtA[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NotPacked) 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 *NotPacked) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + for _, num := range m.Key { + dAtA[i] = 0x28 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) 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 ErrIntOverflowTheproto3 + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + var mapkey int64 + var mapvalue *Nested + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Nested{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &both.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*both.NinOptEnum) + } + var mapkey int64 + var mapvalue *both.NinOptEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &both.NinOptEnum{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *Nested) 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 ErrIntOverflowTheproto3 + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *AllMaps) 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 ErrIntOverflowTheproto3 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *AllMapsOrdered) 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 ErrIntOverflowTheproto3 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *MessageWithMap) 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 ErrIntOverflowTheproto3 + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + var mapkey int32 + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + var mapkey int64 + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + var mapkey bool + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *FloatingPoint) 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 ErrIntOverflowTheproto3 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.F = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *Uint128Pair) 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 ErrIntOverflowTheproto3 + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *ContainsNestedMap) 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 ErrIntOverflowTheproto3 + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3 + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *NotPacked) 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 ErrIntOverflowTheproto3 + } + 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: NotPacked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NotPacked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 skipTheproto3(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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrInvalidLengthTheproto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3 + } + 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 := skipTheproto3(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 ( + ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/theproto3.proto", fileDescriptor_theproto3_4dec23a2a081e9e0) +} + +var fileDescriptor_theproto3_4dec23a2a081e9e0 = []byte{ + // 1602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0x8b, 0xa5, 0x65, 0x05, + 0x48, 0x94, 0x60, 0x23, 0x67, 0x9d, 0x64, 0x37, 0xeb, 0xa6, 0x4d, 0x2d, 0xc5, 0x42, 0xdc, 0xd8, + 0x8a, 0x2b, 0xd9, 0x71, 0x8b, 0x00, 0x35, 0x28, 0x9b, 0x96, 0x88, 0x48, 0xa4, 0x21, 0x8e, 0x82, + 0xfa, 0x96, 0x3f, 0xa3, 0xb7, 0xa2, 0xb7, 0x1e, 0x8b, 0x1c, 0x8a, 0x1e, 0xdb, 0x9b, 0x8f, 0x01, + 0x7a, 0x29, 0x7a, 0x08, 0x62, 0xf5, 0x92, 0x63, 0x8e, 0x39, 0x16, 0x33, 0x43, 0x49, 0x23, 0x72, + 0x28, 0x36, 0xbd, 0xf4, 0xe2, 0x93, 0x38, 0xcf, 0xef, 0xfb, 0x99, 0xc7, 0xe1, 0xcc, 0xe3, 0x17, + 0x34, 0xfc, 0xf3, 0xc0, 0xea, 0xb5, 0x2c, 0x7b, 0xb9, 0x65, 0x91, 0xce, 0x32, 0xe9, 0xe8, 0xc7, + 0x7d, 0x8b, 0x58, 0x37, 0xcb, 0xec, 0x07, 0xa7, 0xc6, 0x81, 0x85, 0xeb, 0x6d, 0x83, 0x74, 0x06, + 0xad, 0xf2, 0x81, 0xd5, 0x5b, 0x6e, 0x5b, 0x6d, 0x6b, 0x99, 0xc5, 0x5b, 0x83, 0x23, 0x36, 0x62, + 0x03, 0x76, 0xc5, 0x95, 0x0b, 0xff, 0xf3, 0x4d, 0x27, 0xba, 0x4d, 0x96, 0x5d, 0x93, 0xd2, 0x18, + 0x17, 0x16, 0x7f, 0x8a, 0x41, 0x62, 0x4b, 0xb7, 0x6d, 0xad, 0xad, 0x63, 0x0c, 0x51, 0x53, 0xeb, + 0xe9, 0x79, 0x54, 0x40, 0xa5, 0x54, 0x83, 0x5d, 0xe3, 0xdb, 0x90, 0xec, 0x18, 0x5d, 0xad, 0x6f, + 0x90, 0x93, 0x7c, 0xb8, 0x80, 0x4a, 0xb9, 0x95, 0x7f, 0x94, 0x27, 0x65, 0x3b, 0xca, 0xf2, 0x83, + 0x41, 0xcf, 0x1a, 0xf4, 0x1b, 0xe3, 0x54, 0x5c, 0x80, 0x4c, 0x47, 0x37, 0xda, 0x1d, 0xb2, 0x6f, + 0x98, 0xfb, 0x07, 0xbd, 0x7c, 0xa4, 0x80, 0x4a, 0xd9, 0x06, 0xf0, 0xd8, 0x86, 0x59, 0xed, 0xd1, + 0xc9, 0x0e, 0x35, 0xa2, 0xe5, 0xa3, 0x05, 0x54, 0xca, 0x34, 0xd8, 0x35, 0x56, 0x20, 0xf2, 0x54, + 0x3f, 0xc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 0x08, + 0xa3, 0x15, 0x24, 0xb4, 0x51, 0x0a, 0xa7, 0x8c, 0x15, 0x8e, 0xfa, 0xbf, 0xb7, 0xa8, 0x3a, 0x3a, + 0x4b, 0xcd, 0x52, 0x26, 0x6a, 0x36, 0xc4, 0xf7, 0x20, 0xb5, 0x6b, 0x8c, 0x26, 0x8f, 0x31, 0xf9, + 0x92, 0x44, 0x3e, 0xce, 0xe1, 0xfa, 0x89, 0x66, 0x04, 0xe0, 0xf3, 0xc7, 0x67, 0x02, 0x84, 0x02, + 0x26, 0x1a, 0x0a, 0x68, 0x8e, 0x2b, 0x48, 0xf8, 0x02, 0x9a, 0xae, 0x0a, 0x9a, 0x62, 0x05, 0xcd, + 0x71, 0x05, 0xc9, 0x99, 0x00, 0xb1, 0x82, 0xf1, 0x18, 0x57, 0x00, 0x6a, 0xc6, 0x97, 0xfa, 0x21, + 0x2f, 0x21, 0xc5, 0x08, 0x45, 0x09, 0x61, 0x92, 0xc4, 0x11, 0x82, 0x0a, 0xaf, 0x43, 0xba, 0x79, + 0x34, 0x81, 0x80, 0xe7, 0x1c, 0x8f, 0xcb, 0x38, 0x72, 0x51, 0x44, 0xdd, 0xb8, 0x14, 0x7e, 0x33, + 0xe9, 0xd9, 0xa5, 0x08, 0x77, 0x23, 0xa8, 0x26, 0xa5, 0x70, 0x48, 0x26, 0xa0, 0x14, 0x81, 0x22, + 0xea, 0x68, 0x33, 0xac, 0x58, 0x16, 0xcd, 0x74, 0xba, 0xd2, 0xa2, 0x04, 0xe1, 0x64, 0x38, 0xcd, + 0xd0, 0x19, 0xb1, 0x27, 0xc2, 0x36, 0x39, 0x15, 0xe7, 0xfc, 0x9f, 0xc8, 0x28, 0x67, 0xf4, 0x44, + 0x46, 0x63, 0xf1, 0x9c, 0x55, 0x4e, 0x88, 0x6e, 0x53, 0xce, 0x5c, 0xe0, 0x39, 0x1b, 0xa5, 0xba, + 0xce, 0xd9, 0x28, 0x8c, 0x3f, 0x85, 0xb9, 0x51, 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0x86, 0x2a, + 0xfa, 0x61, 0xa8, 0xa2, 0x1f, 0x87, 0x2a, 0x3a, 0x1d, 0xaa, 0xe8, 0xe5, 0x50, 0x45, 0xaf, 0x87, + 0x2a, 0x7a, 0x33, 0x54, 0x43, 0x6f, 0x87, 0x2a, 0x7a, 0x37, 0x54, 0x43, 0xcf, 0x7f, 0x53, 0x43, + 0xad, 0x38, 0x5f, 0x9e, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x77, 0x56, 0x01, 0x1d, 0x60, 0x1a, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto new file mode 100644 index 000000000..d1f929884 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go new file mode 100644 index 000000000..26bdb0bd2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go @@ -0,0 +1,2407 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNotPackedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go new file mode 100644 index 000000000..8265079e0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go @@ -0,0 +1,6526 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nested.Unmarshal(m, b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return m.Size() +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return m.Size() +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Uint128Pair.Unmarshal(m, b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return m.Size() +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NotPacked.Unmarshal(m, b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return m.Size() +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7981 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0x1e, 0x1b, 0x0d, 0x90, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x1c, + 0x68, 0x34, 0xa2, 0x68, 0x8b, 0xc3, 0xe1, 0x70, 0x6e, 0x18, 0x4b, 0x5a, 0x00, 0x04, 0x47, 0x1c, + 0x93, 0x20, 0xdd, 0x24, 0x2d, 0x8d, 0x95, 0x04, 0xd5, 0x04, 0x0e, 0x49, 0x48, 0x40, 0x37, 0x16, + 0xdd, 0x90, 0x44, 0x55, 0x2a, 0xa5, 0xac, 0x93, 0x8d, 0x37, 0xa9, 0x5c, 0x37, 0xa9, 0x78, 0x1d, + 0x5f, 0xe4, 0xa4, 0x1c, 0x7b, 0x37, 0x37, 0xaf, 0x77, 0xe3, 0xec, 0x6e, 0xa5, 0xb2, 0xca, 0x83, + 0x93, 0xc9, 0x4b, 0xca, 0x9b, 0xbc, 0xa4, 0x5c, 0x29, 0x95, 0x35, 0xf6, 0x56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x61, 0x62, 0x90, 0x10, 0xbb, 0x05, 0x89, + 0x43, 0x7c, 0x95, 0x99, 0xd8, 0x69, 0x6c, 0x40, 0x31, 0xb2, 0x11, 0x87, 0x1f, 0xd0, 0x88, 0x79, + 0x48, 0x59, 0xc8, 0x71, 0x51, 0x8d, 0x46, 0x84, 0x3a, 0x60, 0x4c, 0x01, 0x05, 0x75, 0x87, 0x54, + 0xfc, 0x81, 0x42, 0xea, 0x25, 0x98, 0xf0, 0x54, 0xaa, 0xb4, 0x4d, 0xeb, 0x88, 0xc7, 0xe6, 0xa5, + 0x28, 0x4d, 0x96, 0x4a, 0x1c, 0x67, 0x60, 0x98, 0x31, 0x8e, 0xa4, 0x63, 0x7d, 0x0d, 0xc0, 0xb6, + 0x90, 0x7d, 0x58, 0xa9, 0xa1, 0x6a, 0x23, 0x93, 0xec, 0x61, 0xa5, 0x6d, 0x2c, 0xd2, 0x65, 0x25, + 0x9b, 0x8e, 0x56, 0x1b, 0xfa, 0x4d, 0x3f, 0xd4, 0x46, 0x7a, 0x44, 0xca, 0x16, 0x4d, 0xb2, 0xae, + 0x68, 0xdb, 0x87, 0xf1, 0x36, 0xc2, 0x71, 0x8f, 0x6a, 0xec, 0xca, 0x46, 0x89, 0x12, 0x4b, 0x91, + 0x57, 0x66, 0x30, 0x18, 0xbd, 0xb0, 0xb1, 0xb6, 0x78, 0xa8, 0x3f, 0x01, 0xde, 0x40, 0x85, 0x84, + 0x15, 0x90, 0x2a, 0x94, 0xe6, 0x83, 0x65, 0xb3, 0x89, 0x66, 0xde, 0x84, 0x71, 0xd9, 0x3c, 0xfa, + 0x19, 0x48, 0x38, 0xae, 0xd9, 0x76, 0x49, 0x14, 0x26, 0x0c, 0x7a, 0xa0, 0x6b, 0xa0, 0x22, 0xab, + 0x46, 0xaa, 0x5c, 0xc2, 0xc0, 0x1f, 0xf5, 0x5f, 0xf0, 0x2f, 0x58, 0x25, 0x17, 0x7c, 0xb1, 0xdb, + 0xa3, 0x12, 0x73,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x14, 0x91, + 0xa1, 0x41, 0x0d, 0xff, 0x28, 0xc4, 0x5f, 0x47, 0xe6, 0xab, 0xf2, 0x02, 0x40, 0x86, 0x3e, 0xc0, + 0xd0, 0xbf, 0x04, 0x09, 0x62, 0x2f, 0x1d, 0x80, 0x59, 0x4c, 0x1b, 0xd2, 0x93, 0x10, 0x2f, 0x6e, + 0x1b, 0x38, 0xfc, 0x35, 0x48, 0xd3, 0xd1, 0xca, 0xce, 0x46, 0xa9, 0x58, 0xd2, 0x62, 0xd9, 0xab, + 0x30, 0x4c, 0x8d, 0x80, 0x53, 0xc3, 0x33, 0x83, 0x36, 0xc4, 0x0e, 0x19, 0x87, 0xc2, 0x67, 0xf7, + 0xb7, 0x0a, 0x25, 0x43, 0x8b, 0x89, 0xee, 0x75, 0x20, 0x2d, 0xf6, 0xc5, 0x3f, 0x9b, 0x98, 0xfa, + 0x3d, 0x05, 0x52, 0x42, 0x9f, 0x8b, 0x1b, 0x14, 0xb3, 0xd1, 0xb0, 0x5f, 0xaf, 0x98, 0x8d, 0xba, + 0xe9, 0xb0, 0xa0, 0x00, 0x32, 0x94, 0xc7, 0x23, 0x83, 0x3a, 0xed, 0x67, 0xa2, 0xfc, 0x17, 0x15, + 0xd0, 0x82, 0x2d, 0x66, 0x40, 0x41, 0xe5, 0xe7, 0xaa, 0xe0, 0xe7, 0x15, 0x18, 0x97, 0xfb, 0xca, + 0x80, 0x7a, 0xe7, 0x7f, 0xae, 0xea, 0x7d, 0x37, 0x06, 0x63, 0x52, 0x37, 0x39, 0xa8, 0x76, 0xbf, + 0x08, 0x93, 0xf5, 0x1a, 0x6a, 0xb6, 0x6c, 0x17, 0x59, 0xd5, 0x93, 0x4a, 0x03, 0xbd, 0x86, 0x1a, + 0x99, 0x2c, 0x29, 0x14, 0x97, 0xfa, 0xf7, 0xab, 0x4b, 0x1b, 0x3e, 0x6e, 0x13, 0xc3, 0x72, 0x53, + 0x1b, 0x6b, 0xa5, 0xad, 0x9d, 0xed, 0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 0x56, 0x17, 0x82, 0xef, 0x34, 0xc9, 0x92, 0x9b, 0x7e, 0xd4, 0x2e, + 0x04, 0xf7, 0xca, 0x64, 0xc9, 0x2d, 0x3f, 0x7e, 0x17, 0x82, 0xbb, 0x66, 0xb2, 0x64, 0xd9, 0x8f, + 0xe4, 0x85, 0xe0, 0xfe, 0x99, 0x2c, 0xb9, 0xed, 0x3f, 0x44, 0xff, 0xfd, 0x40, 0xf8, 0x09, 0x6f, + 0x41, 0x65, 0x03, 0xe1, 0x07, 0x21, 0xa1, 0x17, 0x28, 0x64, 0x82, 0x8c, 0x1f, 0x76, 0xd9, 0x40, + 0xd8, 0x41, 0x48, 0xc8, 0x65, 0x03, 0x21, 0x07, 0x21, 0xe1, 0x96, 0x0d, 0x84, 0x1b, 0x84, 0x84, + 0x5a, 0x36, 0x10, 0x6a, 0x10, 0x12, 0x66, 0xd9, 0x40, 0x98, 0x41, 0x48, 0x88, 0x65, 0x03, 0x21, + 0x06, 0x21, 0xe1, 0x95, 0x0d, 0x84, 0x17, 0x84, 0x84, 0xd6, 0x85, 0x60, 0x68, 0x41, 0x58, 0x58, + 0x5d, 0x08, 0x86, 0x15, 0x84, 0x85, 0xd4, 0x13, 0xc1, 0x90, 0x1a, 0xbd, 0xff, 0xee, 0x5c, 0x02, + 0x0f, 0x09, 0xd1, 0x74, 0x21, 0x18, 0x4d, 0x10, 0x16, 0x49, 0x17, 0x82, 0x91, 0x04, 0x61, 0x51, + 0x74, 0x21, 0x18, 0x45, 0x10, 0x16, 0x41, 0xef, 0x04, 0x23, 0xc8, 0x7f, 0xc7, 0x27, 0x1b, 0xd8, + 0x52, 0x8c, 0x8a, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, + 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x89, 0x20, + 0x75, 0xa0, 0x08, 0x52, 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, 0x5b, 0x79, 0x6d, 0x88, 0xfc, 0x5f, 0xd0, 0x14, 0xf2, 0x7f, 0x51, + 0x8b, 0x15, 0x36, 0x1f, 0x70, 0x9f, 0x69, 0x28, 0x6c, 0x9f, 0xe9, 0x60, 0x98, 0x9a, 0xe7, 0xff, + 0x07, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xd5, 0xc9, 0x94, 0xea, 0x81, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Hilarity != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if len(m.Key) > 0 { + dAtA2 := make([]byte, len(m.Key)*10) + var j1 int + for _, num := range m.Key { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if m.Nested != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Nested.Size())) + n3, err := m.Nested.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ResultCount != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + dAtA[i] = 0x40 + i++ + if m.TrueScotsman { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Score != 0 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i += 4 + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + dAtA[i] = 0x52 + i++ + v := m.Terrain[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n4, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + } + if m.Proto2Field != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Proto2Field.Size())) + n5, err := m.Proto2Field.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + dAtA[i] = 0x6a + i++ + v := m.Proto2Value[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n6, err := v.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 *Nested) 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 *Nested) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Bunny))) + i += copy(dAtA[i:], m.Bunny) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n7, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n8, err := v.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 *MessageWithMap) 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 *MessageWithMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + dAtA[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + dAtA[i] = 0x12 + i++ + v := m.MsgMapping[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sozTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n9, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + dAtA[i] = 0x1a + i++ + v := m.ByteMapping[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + 1 + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Uint128Pair) 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 *Uint128Pair) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Left.Size())) + n10, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + if m.Right != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Right.Size())) + n11, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ContainsNestedMap) 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 *ContainsNestedMap) 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 *ContainsNestedMap_NestedMap) 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 *ContainsNestedMap_NestedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + dAtA[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NotPacked) 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 *NotPacked) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + for _, num := range m.Key { + dAtA[i] = 0x28 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/theproto3.proto", fileDescriptor_theproto3_2741054169128c6d) +} + +var fileDescriptor_theproto3_2741054169128c6d = []byte{ + // 1610 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0x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, 0xba, 0xdd, 0x2d, 0xed, 0xd8, 0xc1, 0x7b, 0x30, 0xdf, 0x24, 0xb6, 0x61, 0xb6, 0x77, + 0xac, 0xfb, 0x56, 0xbf, 0xd5, 0xd5, 0xb7, 0xb4, 0xe3, 0x3c, 0x62, 0x4b, 0x7b, 0x55, 0xb8, 0x6f, + 0x37, 0xbd, 0xec, 0xc9, 0xe5, 0x0b, 0xec, 0x65, 0xe0, 0x1d, 0x50, 0x86, 0xc1, 0x5a, 0xd7, 0xd2, + 0x08, 0xe5, 0x86, 0x19, 0xb7, 0x34, 0x83, 0x3b, 0x4c, 0xe5, 0x58, 0x0f, 0x01, 0xdf, 0x85, 0xe4, + 0x86, 0x49, 0x6e, 0xae, 0x50, 0x5a, 0x84, 0xd1, 0x0a, 0x12, 0xda, 0x30, 0x85, 0x53, 0x46, 0x0a, + 0x57, 0xfd, 0xbf, 0x5b, 0x54, 0x1d, 0x9d, 0xa5, 0x66, 0x29, 0x63, 0x35, 0x1b, 0xe2, 0x7b, 0x90, + 0xda, 0x35, 0x86, 0x93, 0xc7, 0x98, 0x7c, 0x49, 0x22, 0x1f, 0xe5, 0x70, 0xfd, 0x58, 0x33, 0x04, + 0xf0, 0xf9, 0xe3, 0x33, 0x01, 0x42, 0x01, 0x63, 0x0d, 0x05, 0x34, 0x47, 0x15, 0x24, 0x7c, 0x01, + 0xcd, 0xa9, 0x0a, 0x9a, 0x62, 0x05, 0xcd, 0x51, 0x05, 0xc9, 0x99, 0x00, 0xb1, 0x82, 0xd1, 0x18, + 0x57, 0x00, 0x6a, 0xc6, 0x57, 0xfa, 0x21, 0x2f, 0x21, 0xc5, 0x08, 0x45, 0x09, 0x61, 0x9c, 0xc4, + 0x11, 0x82, 0x0a, 0xaf, 0x43, 0xba, 0x79, 0x34, 0x86, 0x80, 0xe7, 0x1c, 0x8f, 0xca, 0x38, 0x9a, + 0xa2, 0x88, 0xba, 0x51, 0x29, 0xfc, 0x66, 0xd2, 0xb3, 0x4b, 0x11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18, 0x06, 0xbd, 0x51, 0x80, 0x96, + 0xd6, 0x3a, 0x21, 0xe3, 0xd2, 0x22, 0x41, 0xa5, 0xd1, 0x67, 0x3a, 0x59, 0x5a, 0x6b, 0x1c, 0xa1, + 0xdb, 0x76, 0xba, 0xf6, 0xa0, 0x4e, 0x37, 0xb1, 0x79, 0xf6, 0x60, 0x6e, 0xaa, 0x5a, 0xc9, 0x99, + 0xff, 0x0b, 0xcf, 0x86, 0x16, 0x36, 0x5d, 0x79, 0xd0, 0x99, 0x10, 0x37, 0x64, 0xf1, 0xdf, 0x90, + 0x9d, 0x60, 0xe3, 0x0c, 0xa0, 0x23, 0x26, 0x45, 0x0d, 0x74, 0x54, 0xfc, 0x06, 0x41, 0x9a, 0xf6, + 0xc9, 0xff, 0xae, 0xdc, 0xd9, 0xd6, 0x0c, 0x1b, 0x3f, 0x80, 0x68, 0x57, 0x3f, 0x22, 0x2c, 0x21, + 0x53, 0xb9, 0x75, 0xfa, 0x6a, 0x31, 0xf4, 0xdb, 0xab, 0xc5, 0xff, 0x04, 0xfc, 0x97, 0xa0, 0xef, + 0x10, 0xab, 0x57, 0x76, 0x39, 0x0d, 0x46, 0xc0, 0x35, 0x88, 0xd9, 0x46, 0xbb, 0x43, 0x78, 0x49, + 0x95, 0x1b, 0xef, 0x8d, 0xe1, 0xf2, 0xe2, 0x29, 0x82, 0xf9, 0xaa, 0x65, 0x12, 0xcd, 0x30, 0x1d, + 0xfe, 0xb5, 0x96, 0xbe, 0x21, 0x5f, 0x20, 0x48, 0x8d, 0x46, 0xb8, 0x05, 0xb9, 0xd1, 0x80, 0x7d, + 0x04, 0x77, 0x77, 0xea, 0xaa, 0xb0, 0xc2, 0x1e, 0x46, 0x59, 0x72, 0xc5, 0xc4, 0xee, 0x3b, 0x79, + 0x32, 0xb8, 0xb0, 0x06, 0x17, 0x24, 0x69, 0xef, 0xf3, 0x42, 0x2e, 0x2e, 0x41, 0xaa, 0x6e, 0x91, + 0x6d, 0xed, 0xe0, 0x29, 0xfb, 0xe4, 0x3c, 0xfe, 0x9f, 0x45, 0x25, 0xac, 0x84, 0x98, 0xf8, 0xda, + 0x12, 0x24, 0xdc, 0xd3, 0x8f, 0xe3, 0x10, 0xde, 0x5a, 0x53, 0x42, 0xec, 0xb7, 0xa2, 0x20, 0xf6, + 0x5b, 0x55, 0xc2, 0x95, 0xcd, 0xd3, 0x33, 0x35, 0xf4, 0xf2, 0x4c, 0x0d, 0xfd, 0x7a, 0xa6, 0x86, + 0x5e, 0x9f, 0xa9, 0xe8, 0xcd, 0x99, 0x8a, 0xde, 0x9e, 0xa9, 0xe8, 0xdd, 0x99, 0x8a, 0x9e, 0x0f, + 0x54, 0xf4, 0xdd, 0x40, 0x45, 0xdf, 0x0f, 0x54, 0xf4, 0xe3, 0x40, 0x45, 0x3f, 0x0d, 0x54, 0x74, + 0x3a, 0x50, 0xd1, 0xcb, 0x81, 0x1a, 0x7a, 0x3d, 0x50, 0xd1, 0x9b, 0x81, 0x1a, 0x7a, 0x3b, 0x50, + 0xd1, 0xbb, 0x81, 0x1a, 0x7a, 0xfe, 0xbb, 0x1a, 0x6a, 0xc5, 0xf9, 0xf2, 0xfc, 0x11, 0x00, 0x00, + 0xff, 0xff, 0x63, 0x09, 0xf8, 0x62, 0x65, 0x1a, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto new file mode 100644 index 000000000..56f8584bd --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go new file mode 100644 index 000000000..cc62a01f0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go @@ -0,0 +1,2407 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNotPackedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go new file mode 100644 index 000000000..cde5a883a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go @@ -0,0 +1,5267 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nested.Unmarshal(m, b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return xxx_messageInfo_Nested.Size(m) +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Uint128Pair.Unmarshal(m, b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return xxx_messageInfo_Uint128Pair.Size(m) +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap.Size(m) +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Size(m) +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NotPacked.Unmarshal(m, b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return xxx_messageInfo_NotPacked.Size(m) +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7987 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0x1e, 0x1b, 0x0d, 0x92, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x33, + 0xd0, 0x68, 0x44, 0xd1, 0x16, 0x67, 0x86, 0xc3, 0xb9, 0x61, 0x2c, 0x69, 0x01, 0x10, 0x1c, 0x71, + 0x4c, 0x82, 0x74, 0x93, 0xb4, 0x34, 0x56, 0x12, 0x54, 0x13, 0x38, 0x24, 0x5b, 0x02, 0xba, 0xb1, + 0xe8, 0x86, 0x24, 0xaa, 0x52, 0x29, 0x65, 0x9d, 0x6c, 0xbc, 0x49, 0xe5, 0xba, 0x49, 0xc5, 0xeb, + 0xf8, 0x22, 0x27, 0xe5, 0xd8, 0xbb, 0xb9, 0x79, 0xbd, 0x1b, 0x67, 0x77, 0x2b, 0x95, 0x55, 0x1e, + 0x9c, 0x4c, 0x5e, 0x52, 0xda, 0xe4, 0x25, 0xe5, 0x4a, 0xa9, 0xac, 0x91, 0x53, 0x71, 0x12, 0x27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0x83, 0x58, 0x5d, 0x08, 0xbf, 0xd3, 0x24, 0x4b, 0x6e, 0x04, 0x51, + 0xbb, 0x10, 0xde, 0x2b, 0x93, 0x25, 0x37, 0x83, 0xf8, 0x5d, 0x08, 0xef, 0x9a, 0xc9, 0x92, 0x95, + 0x20, 0x92, 0x17, 0xc2, 0xfb, 0x67, 0xb2, 0xe4, 0x56, 0xf0, 0x10, 0xfd, 0xf7, 0x43, 0xe1, 0x27, + 0xbc, 0x05, 0x95, 0x0b, 0x85, 0x1f, 0x44, 0x84, 0x5e, 0xa8, 0x90, 0x09, 0x32, 0x41, 0xd8, 0xe5, + 0x42, 0x61, 0x07, 0x11, 0x21, 0x97, 0x0b, 0x85, 0x1c, 0x44, 0x84, 0x5b, 0x2e, 0x14, 0x6e, 0x10, + 0x11, 0x6a, 0xb9, 0x50, 0xa8, 0x41, 0x44, 0x98, 0xe5, 0x42, 0x61, 0x06, 0x11, 0x21, 0x96, 0x0b, + 0x85, 0x18, 0x44, 0x84, 0x57, 0x2e, 0x14, 0x5e, 0x10, 0x11, 0x5a, 0xe7, 0xc3, 0xa1, 0x05, 0x51, + 0x61, 0x75, 0x3e, 0x1c, 0x56, 0x10, 0x15, 0x52, 0x8f, 0x85, 0x43, 0x6a, 0xec, 0xfe, 0x3b, 0xf3, + 0xc3, 0x78, 0x48, 0x88, 0xa6, 0xf3, 0xe1, 0x68, 0x82, 0xa8, 0x48, 0x3a, 0x1f, 0x8e, 0x24, 0x88, + 0x8a, 0xa2, 0xf3, 0xe1, 0x28, 0x82, 0xa8, 0x08, 0x7a, 0x2b, 0x1c, 0x41, 0xc1, 0x3b, 0x3e, 0xb9, + 0xd0, 0x96, 0x62, 0x5c, 0x04, 0xa9, 0x03, 0x44, 0x90, 0x3a, 0x40, 0x04, 0xa9, 0x03, 0x44, 0x90, + 0x3a, 0x40, 0x04, 0xa9, 0x03, 0x44, 0x90, 0x3a, 0x40, 0x04, 0xa9, 0x03, 0x44, 0x90, 0x3a, 0x48,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79, 0x98, 0xa2, 0x3f, 0x5b, 0xb1, 0xeb, 0xac, 0x92, 0xdf, 0x47, 0xc4, + 0x85, 0x41, 0x61, 0x7f, 0xc1, 0x20, 0xb8, 0x6e, 0x26, 0xbe, 0xd4, 0x25, 0x4b, 0x0d, 0xdc, 0xcd, + 0xa1, 0xef, 0x82, 0xc6, 0x07, 0xd7, 0x1a, 0x8e, 0xe9, 0x61, 0xde, 0x04, 0xfb, 0xf9, 0xc2, 0xde, + 0xbc, 0x5c, 0x94, 0xd2, 0x76, 0x31, 0xe8, 0x9f, 0x80, 0xd4, 0xba, 0xed, 0x5d, 0x59, 0xc6, 0x6c, + 0xfc, 0xaf, 0x03, 0x75, 0xb3, 0x71, 0x11, 0xca, 0xe2, 0x23, 0x18, 0xfa, 0xda, 0x0a, 0x46, 0x27, + 0xfb, 0xa1, 0x89, 0x48, 0x80, 0x26, 0x87, 0xfa, 0xb3, 0x30, 0x86, 0xef, 0x4c, 0xe8, 0xc9, 0x87, + 0x79, 0xdb, 0xda, 0x05, 0xf7, 0x65, 0x28, 0x3e, 0xc0, 0x70, 0x02, 0x7a, 0xfe, 0x91, 0xbe, 0x04, + 0x82, 0x02, 0x01, 0x06, 0x13, 0xec, 0xf8, 0x1a, 0x8c, 0xf6, 0x24, 0xd8, 0x09, 0x69, 0xb0, 0x23, + 0x6a, 0xb0, 0xe3, 0x6b, 0x90, 0xea, 0x4b, 0x20, 0x6a, 0xe0, 0x1f, 0xeb, 0x45, 0x80, 0x35, 0xeb, + 0x35, 0x54, 0xa7, 0x2a, 0xd0, 0xbf, 0x1d, 0x94, 0x8b, 0x60, 0x08, 0x84, 0x28, 0x85, 0x80, 0xd2, + 0xcb, 0x90, 0xde, 0x39, 0x08, 0x48, 0xa0, 0x2b, 0x8f, 0x7d, 0x35, 0x0e, 0x42, 0x2c, 0x22, 0xce, + 0x57, 0x85, 0x5e, 0x4c, 0xba, 0xbf, 0x2a, 0xc2, 0xd5, 0x08, 0xa8, 0x40, 0x15, 0x4a, 0x92, 0x89, + 0x51, 0x45, 0x60, 0x11, 0x71, 0xb8, 0x18, 0x16, 0x1d, 0x07, 0x4b, 0xb2, 0xaa, 0x34, 0x1f, 0x41, + 0xc1, 0x24, 0x58, 0x31, 0x64, 0x47, 0xc4, 0x23, 0x24, 0xc8, 0x31, 0x78, 0xa2, 0xb7, 0x47, 0xb8, + 0x0c, 0xf7, 0x08, 0x3f, 0x16, 0xf3, 0x8c, 0xbc, 0xcd, 0x8a, 0x79, 0x26, 0x63, 0xf3, 0x8c, 0x8b, + 0x86, 0xf2, 0x8c, 0x0f, 0xeb, 0x9f, 0x82, 0x49, 0x3e, 0x86, 0xcb, 0x13, 0x26, 0xd5, 0xd8, 0x5f, + 0x57, 0xeb, 0x4d, 0xca, 0x24, 0x29, 0x67, 0x18, 0xaf, 0x57, 0x60, 0x82, 0x0f, 0x6d, 0xba, 0xe4, + 0x72, 0xa7, 0xd8, 0x1f, 0xce, 0xe8, 0xcd, 0x48, 0x05, 0x29, 0x61, 0x08, 0x3d, 0xbb, 0x0a, 0x33, + 0xd1, 0xd5, 0x48, 0x2c, 0xbf, 0x63, 0xb4, 0xfc, 0x9e, 0x12, 0xcb, 0xaf, 0x22, 0x96, 0xef, 0x12, + 0x9c, 0x8e, 0xac, 0x3d, 0x71, 0x24, 0x09, 0x91, 0xe4, 0x16, 0x8c, 0x4b, 0x25, 0x47, 0x04, 0x0f, + 0x47, 0x80, 0x87, 0xbb, 0xc1, 0x41, 0x68, 0x45, 0xac, 0x1e, 0x12, 0x58, 0x15, 0xc1, 0x9f, 0x80, + 0x09, 0xb9, 0xde, 0x88, 0xe8, 0xf1, 0x08, 0xf4, 0x78, 0x04, 0x3a, 0xfa, 0xdc, 0xc9, 0x08, 0x74, + 0x32, 0x84, 0xde, 0xe9, 0x79, 0xee, 0xa9, 0x08, 0xf4, 0x54, 0x04, 0x3a, 0xfa, 0xdc, 0x7a, 0x04, + 0x5a, 0x17, 0xd1, 0x4f, 0xc3, 0x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x2c, 0x68, 0x43, 0xe4, 0xff, 0xa2, 0xa6, 0x90, 0xff, + 0x4b, 0x5a, 0xa2, 0xb8, 0xf1, 0x00, 0xbb, 0x4c, 0x43, 0x6f, 0xdf, 0x9f, 0x1b, 0x8a, 0xda, 0x65, + 0xda, 0x1f, 0xa1, 0xe6, 0xf9, 0x93, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x03, 0x59, 0x0e, 0xe8, + 0x81, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/neither/theproto3.proto", fileDescriptor_theproto3_637a0f64ba0c048e) +} + +var fileDescriptor_theproto3_637a0f64ba0c048e = []byte{ + // 1609 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0xb2, 0x02, + 0x24, 0x4a, 0xb0, 0x91, 0xb3, 0x4e, 0xb2, 0x9b, 0xba, 0x69, 0x53, 0x4b, 0xb1, 0x10, 0x37, 0xb6, + 0xe2, 0x4a, 0x76, 0xdc, 0x22, 0x40, 0x0d, 0xca, 0xa6, 0x25, 0x22, 0x12, 0x69, 0x88, 0xa3, 0xa0, + 0xbe, 0xe5, 0xcf, 0xe8, 0xad, 0xe8, 0xad, 0xc7, 0x22, 0x87, 0xa2, 0xc7, 0xf6, 0xe6, 0x63, 0x80, + 0x5e, 0x8a, 0x1e, 0x82, 0x58, 0xbd,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0x95, 0x63, 0x3d, 0x04, 0x7c, 0x17, 0x92, 0x1b, + 0x26, 0xb9, 0xb9, 0x42, 0x69, 0x11, 0x46, 0x2b, 0x48, 0x68, 0xa3, 0x14, 0x4e, 0x19, 0x2b, 0x1c, + 0xf5, 0xff, 0x6e, 0x51, 0x75, 0x74, 0x96, 0x9a, 0xa5, 0x4c, 0xd4, 0x6c, 0x88, 0xef, 0x41, 0x6a, + 0xd7, 0x18, 0x4d, 0x1e, 0x63, 0xf2, 0x25, 0x89, 0x7c, 0x9c, 0xc3, 0xf5, 0x13, 0xcd, 0x08, 0xc0, + 0xe7, 0x8f, 0xcf, 0x04, 0x08, 0x05, 0x4c, 0x34, 0x14, 0xd0, 0x1c, 0x57, 0x90, 0xf0, 0x05, 0x34, + 0x5d, 0x15, 0x34, 0xc5, 0x0a, 0x9a, 0xe3, 0x0a, 0x92, 0x33, 0x01, 0x62, 0x05, 0xe3, 0x31, 0xae, + 0x00, 0xd4, 0x8c, 0xaf, 0xf4, 0x43, 0x5e, 0x42, 0x8a, 0x11, 0x8a, 0x12, 0xc2, 0x24, 0x89, 0x23, + 0x04, 0x15, 0x5e, 0x87, 0x74, 0xf3, 0x68, 0x02, 0x01, 0xcf, 0x39, 0x1e, 0x97, 0x71, 0xe4, 0xa2, + 0x88, 0xba, 0x71, 0x29, 0xfc, 0x66, 0xd2, 0xb3, 0x4b, 0x11, 0xee, 0x46, 0x50, 0x4d, 0x4a, 0xe1, + 0x90, 0x4c, 0x40, 0x29, 0x02, 0x45, 0xd4, 0xd1, 0x66, 0x58, 0xb1, 0x2c, 0x9a, 0xe9, 0x74, 0xa5, + 0x45, 0x09, 0xc2, 0xc9, 0x70, 0x9a, 0xa1, 0x33, 0x62, 0x4f, 0x84, 0x6d, 0x72, 0x2a, 0xce, 0xf9, + 0x3f, 0x91, 0x51, 0xce, 0xe8, 0x89, 0x8c, 0xc6, 0xe2, 0x39, 0xab, 0x9c, 0x10, 0xdd, 0xa6, 0x9c, + 0xb9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x8a, 0x9e, 0x0f, 0x55, 0xf4, + 0xdd, 0x50, 0x45, 0xdf, 0x0f, 0x55, 0xf4, 0xe3, 0x50, 0x45, 0x3f, 0x0d, 0x55, 0x74, 0x3a, 0x54, + 0x43, 0x2f, 0x87, 0x6a, 0xe8, 0xf5, 0x50, 0x45, 0x6f, 0x86, 0x6a, 0xe8, 0xed, 0x50, 0x45, 0xef, + 0x86, 0x6a, 0xe8, 0xf9, 0xef, 0x6a, 0xa8, 0x15, 0xe7, 0xcb, 0xf3, 0x47, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xe2, 0x1d, 0x88, 0x27, 0x63, 0x1a, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto new file mode 100644 index 000000000..0f4525cdc --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go new file mode 100644 index 000000000..2cfc912f0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go @@ -0,0 +1,2127 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go new file mode 100644 index 000000000..f8b838003 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go @@ -0,0 +1,10313 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import encoding_binary "encoding/binary" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return xxx_messageInfo_Nested.Size(m) +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return xxx_messageInfo_Uint128Pair.Size(m) +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap.Size(m) +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Size(m) +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return xxx_messageInfo_NotPacked.Size(m) +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 7980 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0x1e, 0x1b, 0x0d, 0x90, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1e, 0x91, 0x33, + 0xd0, 0x68, 0x44, 0xd1, 0x16, 0x87, 0xc3, 0xe1, 0xdc, 0x30, 0x96, 0xb4, 0xb8, 0x71, 0xc4, 0x31, + 0x09, 0xd2, 0x4d, 0xd2,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, 0x38, 0xfe, + 0x9f, 0xc6, 0xc6, 0x28, 0xd1, 0x39, 0x89, 0x07, 0x70, 0x5c, 0xe8, 0x73, 0x90, 0x24, 0x69, 0x52, + 0x47, 0x7c, 0x69, 0xf3, 0x8e, 0x71, 0x60, 0xd5, 0xd1, 0xa1, 0xd9, 0x6d, 0xba, 0xd5, 0x57, 0xcd, + 0x66, 0x17, 0x91, 0x80, 0x1f, 0x37, 0xd2, 0x6c, 0xf0, 0x13, 0x78, 0x4c, 0x5f, 0x80, 0x14, 0xcd, + 0xaa, 0x86, 0x55, 0x47, 0xaf, 0x93, 0xea, 0x99, 0x30, 0x68, 0xa2, 0x6d, 0xe0, 0x11, 0x7c, 0xfa, + 0x97, 0x1d, 0xdb, 0xe2, 0xa1, 0x49, 0x4e, 0x81, 0x07, 0xc8, 0xe9, 0x6f, 0x04, 0x0b, 0xf7, 0x63, + 0xe1, 0x97, 0x17, 0x8c, 0xa9, 0xec, 0x37, 0x62, 0x10, 0x27, 0xf5, 0x62, 0x0a, 0x52, 0x7b, 0xf7, + 0x76, 0xca, 0xd5, 0xd2, 0xf6, 0x7e, 0x61, 0xb3, 0xac, 0x29, 0xfa, 0x24, 0x00, 0x19, 0x58, 0xdf, + 0xdc, 0xce, 0xef, 0x69, 0x31, 0xef, 0x78, 0xa3, 0xb2, 0x77, 0x7d, 0x4d, 0x53, 0x3d, 0xc0, 0x3e, + 0x1d, 0x88, 0x8b, 0x02, 0x57, 0x57, 0xb5, 0x84, 0xae, 0x41, 0x9a, 0x12, 0x6c, 0xbc, 0x58, 0x2e, + 0x5d, 0x5f, 0xd3, 0x46, 0xe5, 0x91, 0xab, 0xab, 0xda, 0x98, 0x3e, 0x01, 0xe3, 0x64, 0xa4, 0xb0, + 0xbd, 0xbd, 0xa9, 0x25, 0x3d, 0xce, 0xdd, 0x3d, 0x63, 0xa3, 0x72, 0x47, 0x1b, 0xf7, 0x38, 0xef, + 0x18, 0xdb, 0xfb, 0x3b, 0x1a, 0x78,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, 0xb5, 0x68, 0xf4, 0x17, 0x78, 0x6a, 0x70, 0x08, 0x8e, 0x6c, + 0x61, 0xe5, 0x88, 0x66, 0xf8, 0x12, 0x8f, 0x6c, 0x01, 0x95, 0xbb, 0x0d, 0x49, 0xab, 0xdb, 0x6c, + 0xe2, 0x00, 0xd5, 0x07, 0xbf, 0x20, 0x96, 0xf9, 0xef, 0x3f, 0x61, 0x1a, 0x70, 0x40, 0xee, 0x1a, + 0x24, 0x50, 0xeb, 0x00, 0xd5, 0xa3, 0x90, 0xff, 0xe3, 0x27, 0xbc, 0x28, 0x61, 0xe9, 0xdc, 0x73, + 0x00, 0xf4, 0xd6, 0x9e, 0x6c, 0x5b, 0x45, 0x60, 0xff, 0xe7, 0x4f, 0xd8, 0xab, 0x1b, 0x3e, 0xc4, + 0x27, 0xa0, 0x2f, 0x82, 0x0c, 0x26, 0xf8, 0x81, 0x4c, 0x40, 0xae, 0xfa, 0x16, 0x8c, 0xbd, 0xec, + 0xd8, 0x96, 0x6b, 0x1e, 0x45, 0xa1, 0xff, 0x17, 0x43, 0x73, 0x79, 0x6c, 0xb0, 0x96, 0xdd, 0x41, + 0xae, 0x79, 0xe4, 0x44, 0x61, 0xff, 0x37, 0xc3, 0x7a, 0x00, 0x0c, 0xae, 0x99, 0x8e, 0x3b, 0xcc, + 0x75, 0xff, 0x11, 0x07, 0x73, 0x00, 0x56, 0x1a, 0x7f, 0x7e, 0x05, 0x9d, 0x44, 0x61, 0x7f, 0xc8, + 0x95, 0x66, 0xf2, 0xb9, 0x67, 0x60, 0x1c, 0x7f, 0xa4, 0xef, 0x63, 0x45, 0x80, 0xff, 0x0f, 0x03, + 0xfb, 0x08, 0x7c, 0x66, 0xc7, 0xad, 0xbb, 0x8d, 0x68, 0x63, 0xff, 0x31, 0xf3, 0x34, 0x97, 0xcf, + 0xe5, 0x21, 0xe5, 0xb8, 0xf5, 0x7a, 0x97, 0xf5, 0x57, 0x11, 0xf0, 0xff, 0xfb, 0x13, 0xef,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0xca, 0x5e, 0xbc, 0x5d, 0x0a, + 0xec, 0x3d, 0xc9, 0x72, 0xeb, 0x5e, 0xe4, 0x5d, 0x0a, 0xec, 0x42, 0xc9, 0x72, 0x77, 0xbc, 0x18, + 0xbc, 0x14, 0x78, 0x57, 0x49, 0x96, 0x7b, 0xde, 0x8b, 0xc6, 0x4b, 0x81, 0xb7, 0x96, 0x64, 0xb9, + 0x0d, 0x2f, 0x2e, 0x17, 0x83, 0xef, 0x2f, 0xc9, 0x82, 0x77, 0xfd, 0x08, 0x5d, 0x0c, 0xbe, 0xc9, + 0x24, 0x4b, 0x7e, 0xcc, 0x8f, 0xd5, 0xc5, 0xe0, 0x3b, 0x4d, 0xb2, 0xe4, 0xa6, 0x1f, 0xb5, 0x8b, + 0xc1, 0xbd, 0x32, 0x59, 0x72, 0xcb, 0x8f, 0xdf, 0xc5, 0xe0, 0xae, 0x99, 0x2c, 0x59, 0xf1, 0x23, + 0x79, 0x31, 0xb8, 0x7f, 0x26, 0x4b, 0x6e, 0xfb, 0x0f, 0xd1, 0x7f, 0x3f, 0x10, 0x7e, 0xc2, 0x5b, + 0x50, 0xd9, 0x40, 0xf8, 0x41, 0x48, 0xe8, 0x05, 0x0a, 0x99, 0x20, 0xe3, 0x87, 0x5d, 0x36, 0x10, + 0x76, 0x10, 0x12, 0x72, 0xd9, 0x40, 0xc8, 0x41, 0x48, 0xb8, 0x65, 0x03, 0xe1, 0x06, 0x21, 0xa1, + 0x96, 0x0d, 0x84, 0x1a, 0x84, 0x84, 0x59, 0x36, 0x10, 0x66, 0x10, 0x12, 0x62, 0xd9, 0x40, 0x88, + 0x41, 0x48, 0x78, 0x65, 0x03, 0xe1, 0x05, 0x21, 0xa1, 0x75, 0x31, 0x18, 0x5a, 0x10, 0x16, 0x56, + 0x17, 0x83, 0x61, 0x05, 0x61, 0x21, 0xf5, 0x78, 0x30, 0xa4, 0xc6, 0x1f, 0xbc, 0xb3, 0x90, 0xc0, + 0x43, 0x42, 0x34, 0x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0x37, 0xa0, 0xc1, 0xae, 0xa8, 0xc1, 0xae, + 0xa7, 0x41, 0x72, 0x20, 0x81, 0xa8, 0x81, 0x77, 0xac, 0x17, 0x00, 0xd6, 0x1b, 0xaf, 0xa3, 0x3a, + 0x55, 0x81, 0xfe, 0xfd, 0xa0, 0x6c, 0x08, 0x83, 0x2f, 0x44, 0x29, 0x04, 0x94, 0x5e, 0x86, 0xd4, + 0xee, 0xa1, 0x4f, 0x02, 0x3d, 0x79, 0xec, 0xa9, 0x71, 0x18, 0x60, 0x11, 0x71, 0x9e, 0x2a, 0xf4, + 0x62, 0x52, 0x83, 0x55, 0x11, 0xae, 0x46, 0x40, 0xf9, 0xaa, 0x50, 0x92, 0x74, 0x84, 0x2a, 0x02, + 0x8b, 0x88, 0xc3, 0xc5, 0xb0, 0x60, 0xdb, 0x58, 0x92, 0x55, 0xa5, 0x85, 0x10, 0x0a, 0x26, 0xc1, + 0x8a, 0x21, 0x3b, 0x22, 0x1e, 0x21, 0x41, 0x8e, 0xc1, 0x93, 0xfd, 0x3d, 0xc2, 0x65, 0xb8, 0x47, + 0xf8, 0xb1, 0x98, 0x67, 0xe4, 0x8d, 0x56, 0xcc, 0x33, 0x15, 0x99, 0x67, 0x5c, 0x34, 0x90, 0x67, + 0x7c, 0x58, 0xff, 0x38, 0x4c, 0xf1, 0x31, 0x5c, 0x9e, 0x30, 0xa9, 0xc6, 0xfe, 0xc2, 0x5a, 0x7f, + 0x52, 0x26, 0x49, 0x39, 0x83, 0x78, 0xbd, 0x02, 0x93, 0x7c, 0x68, 0xcb, 0x21, 0x97, 0x3b, 0xcd, + 0xfe, 0x78, 0x46, 0x7f, 0x46, 0x2a, 0x48, 0x09, 0x03, 0xe8, 0xb9, 0x12, 0xcc, 0x86, 0x57, 0x23, + 0xb1, 0xfc, 0x8e, 0xd3, 0xf2, 0x7b, 0x46, 0x2c, 0xbf, 0x8a, 0x58, 0xbe, 0x8b, 0x70, 0x36, 0xb4, + 0xf6, 0x44, 0x91, 0xc4, 0x44, 0x92, 0xdb, 0x30, 0x21, 0x95, 0x1c, 0x11, 0x9c, 0x08, 0x01, 0x27, + 0x7a, 0xc1, 0x7e, 0x68, 0x85, 0xac, 0x1e, 0x12, 0x58, 0x15, 0xc1, 0x1f, 0x85, 0x49, 0xb9, 0xde, + 0x88, 0xe8, 0x89, 0x10, 0xf4, 0x44, 0x08, 0x3a, 0xfc, 0xdc, 0xf1, 0x10, 0x74, 0x3c, 0x80, 0xde, + 0xed, 0x7b, 0xee, 0xe9, 0x10, 0xf4, 0x74, 0x08, 0x3a, 0xfc, 0xdc, 0x7a, 0x08, 0x5a, 0x17, 0xd1, + 0xcf, 0xc0, 0x54, 0xa0, 0xc4, 0x88, 0xf0, 0xb1, 0x10, 0xf8, 0x98, 0x08, 0x7f, 0x16, 0xb4, 0x60, + 0x71, 0x11, 0xf1, 0x53, 0x21, 0xf8, 0xa9, 0xb0, 0xd3, 0x87, 0x6b, 0x3f, 0x1a, 0x02, 0x1f, 0x0d, + 0x3d, 0x7d, 0x38, 0x5e, 0x0b, 0xc1, 0x6b, 0x22, 0x3e, 0x07, 0x69, 0xb1, 0x9a, 0x88, 0xd8, 0x64, + 0x08, 0x36, 0x19, 0xb4, 0xbb, 0x54, 0x4c, 0xa2, 0x22, 0x7d, 0xbc, 0x4f, 0xba, 0x48, 0x25, 0x24, + 0x8a, 0x24, 0x2d, 0x92, 0x7c, 0x02, 0xce, 0x84, 0x95, 0x8c, 0x10, 0x8e, 0x45, 0x91, 0x63, 0x12, + 0xf7, 0x88, 0x7e, 0xb3, 0x67, 0xb6, 0x03, 0x8d, 0xd3, 0xdc, 0x4b, 0x30, 0x13, 0x52, 0x38, 0x42, + 0x68, 0x97, 0xe5, 0x6e, 0x2c, 0x23, 0xd0, 0x92, 0x22, 0xd0, 0xb0, 0x8e, 0x76, 0xec, 0x86, 0xe5, + 0x8a, 0x5d, 0xd9, 0x37, 0x66, 0x60, 0x92, 0x95, 0xa7, 0xed, 0x4e, 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60, 0xdc, 0x3b, 0xd2, 0x0f, 0x60, 0xd2, 0x3b, 0xa0, 0x2f, 0xd9, 0xd3, + 0x48, 0xcd, 0x09, 0x16, 0xee, 0xe1, 0x58, 0x0e, 0xf9, 0x44, 0x37, 0xa3, 0xe8, 0x9a, 0x2c, 0x0f, + 0xce, 0xe5, 0x61, 0x26, 0x44, 0xec, 0x34, 0x0b, 0x72, 0xf6, 0x02, 0x8c, 0x57, 0x6c, 0x97, 0xfe, + 0x72, 0x8e, 0x7e, 0x46, 0xd8, 0x55, 0x28, 0xc4, 0xb4, 0x11, 0x02, 0x5e, 0xba, 0x00, 0x63, 0x2c, + 0xfb, 0xf5, 0x51, 0x88, 0x6d, 0xe5, 0xb5, 0x11, 0xf2, 0x7f, 0x41, 0x53, 0xc8, 0xff, 0x45, 0x2d, + 0x56, 0xd8, 0x7c, 0x88, 0x9d, 0xa6, 0x91, 0x7e, 0x3b, 0x4d, 0x07, 0xa3, 0xd4, 0x3c, 0xff, 0x3f, + 0x00, 0x00, 0xff, 0xff, 0x59, 0xa3, 0x4d, 0xdb, 0xec, 0x81, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTheproto3(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) 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 ErrIntOverflowTheproto3 + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + var mapkey int64 + var mapvalue *Nested + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Nested{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &both.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*both.NinOptEnum) + } + var mapkey int64 + var mapvalue *both.NinOptEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &both.NinOptEnum{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *Nested) 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 ErrIntOverflowTheproto3 + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *AllMaps) 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 ErrIntOverflowTheproto3 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *AllMapsOrdered) 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 ErrIntOverflowTheproto3 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *MessageWithMap) 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 ErrIntOverflowTheproto3 + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + var mapkey int32 + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + var mapkey int64 + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + var mapkey bool + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *FloatingPoint) 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 ErrIntOverflowTheproto3 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.F = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *Uint128Pair) 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 ErrIntOverflowTheproto3 + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *ContainsNestedMap) 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 ErrIntOverflowTheproto3 + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3 + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 *NotPacked) 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 ErrIntOverflowTheproto3 + } + 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: NotPacked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NotPacked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + 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 skipTheproto3(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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrInvalidLengthTheproto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3 + } + 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 := skipTheproto3(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 ( + ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/theproto3.proto", fileDescriptor_theproto3_42f7388870cddc3f) +} + +var fileDescriptor_theproto3_42f7388870cddc3f = []byte{ + // 1612 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0xb2, 0x02, + 0x24, 0x4a, 0xb0, 0x91, 0xb3, 0x4e, 0xb2, 0x9b, 0xba, 0x69, 0x53, 0x4b, 0xb1, 0x10, 0x37, 0xb6, + 0xe2, 0x4a, 0x76, 0xdc, 0x22, 0x40, 0x0d, 0xca, 0xa6, 0x25, 0x22, 0x12, 0x69, 0x90, 0xa3, 0xa0, + 0xbe, 0xe5, 0xcf, 0xe8, 0xad, 0xe8, 0xad, 0xc7, 0x22, 0x87, 0xa2, 0xc7, 0xf6, 0xe6, 0x63, 0x80, + 0x5e, 0x8a, 0x1e, 0x82, 0x58, 0xbd, 0xe4, 0x98, 0x63, 0x8e, 0xc5, 0xcc, 0x50, 0xd2, 0x48, 0x1c, + 0x8a, 0x4d, 0x2f, 0xbd, 0xf8, 0x24, 0xce, 0xf3, 0xfb, 0x7e, 0xe6, 0x71, 0x38, 0xf3, 0xf8, 0x05, + 0x0d, 0xc5, 0x03, 0xab, 0xd7, 0xb2, 0x9c, 0xe5, 0xbe, 0xd9, 0xd3, 0x6c, 0xa7, 0xa3, 0x75, 0x75, + 0x7b, 0x99, 0x74, 0x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, 0x18, 0x93, 0x2f, 0x49, 0xe4, 0xa3, 0x1c, 0xae, 0x1f, 0x6b, + 0x86, 0x00, 0x3e, 0x7f, 0x7c, 0x26, 0x40, 0x28, 0x60, 0xac, 0xa1, 0x80, 0xe6, 0xa8, 0x82, 0x84, + 0x2f, 0xa0, 0x39, 0x55, 0x41, 0x53, 0xac, 0xa0, 0x39, 0xaa, 0x20, 0x39, 0x13, 0x20, 0x56, 0x30, + 0x1a, 0xe3, 0x0a, 0x40, 0xcd, 0xf8, 0x4a, 0x3f, 0xe4, 0x25, 0xa4, 0x18, 0xa1, 0x28, 0x21, 0x8c, + 0x93, 0x38, 0x42, 0x50, 0xe1, 0x75, 0x48, 0x37, 0x8f, 0xc6, 0x10, 0xf0, 0x9c, 0xe3, 0x51, 0x19, + 0x47, 0x53, 0x14, 0x51, 0x37, 0x2a, 0x85, 0xdf, 0x4c, 0x7a, 0x76, 0x29, 0xc2, 0xdd, 0x08, 0xaa, + 0x71, 0x29, 0x1c, 0x92, 0x09, 0x28, 0x45, 0xa0, 0x88, 0x3a, 0xda, 0x0c, 0x2b, 0x96, 0x45, 0x33, + 0xdd, 0xae, 0xb4, 0x28, 0x41, 0xb8, 0x19, 0x6e, 0x33, 0x74, 0x47, 0xec, 0x89, 0xb0, 0x4d, 0x4e, + 0xc5, 0x39, 0xff, 0x27, 0x32, 0xcc, 0x19, 0x3e, 0x91, 0xe1, 0x58, 0x3c, 0x67, 0x95, 0x13, 0xa2, + 0x3b, 0x94, 0x33, 0x17, 0x78, 0xce, 0x86, 0xa9, 0x53, 0xe7, 0x6c, 0x18, 0xc6, 0x9f, 0xc1, 0xdc, + 0x30, 0x46, 0xdb, 0x13, 0x85, 0x2a, 0x0c, 0x7a, 0x65, 0x06, 0xd4, 0xcd, 0xe4, 0xcc, 0x69, 0x3d, + 0xae, 0x43, 0x6e, 0x18, 0xda, 0x72, 0xd8, 0xed, 0xce, 0x33, 0xe2, 0xe5, 0x19, 0x44, 0x9e, 0xc8, +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, 0x2a, 0x7a, 0x37, 0x50, 0x43, 0xcf, 0x7f, 0x57, 0x43, 0xad, 0x38, 0x5f, 0x9e, 0x3f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xda, 0xba, 0x48, 0xa4, 0x67, 0x1a, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto new file mode 100644 index 000000000..0c130b73f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go new file mode 100644 index 000000000..13880043d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go @@ -0,0 +1,2127 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/theproto3/doc.go b/deps/github.com/gogo/protobuf/test/theproto3/doc.go new file mode 100644 index 000000000..e559a27ba --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/doc.go @@ -0,0 +1 @@ +package theproto3 diff --git a/deps/github.com/gogo/protobuf/test/theproto3/footer.proto b/deps/github.com/gogo/protobuf/test/theproto3/footer.proto new file mode 100644 index 000000000..abf45e72e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/footer.proto @@ -0,0 +1,25 @@ + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/theproto3/header.proto b/deps/github.com/gogo/protobuf/test/theproto3/header.proto new file mode 100644 index 000000000..314e48f29 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/header.proto @@ -0,0 +1,95 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/maps.proto b/deps/github.com/gogo/protobuf/test/theproto3/maps.proto new file mode 100644 index 000000000..18aff7ae7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/maps.proto @@ -0,0 +1,48 @@ + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in b/deps/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/deps/github.com/gogo/protobuf/test/theproto3/theproto3.proto b/deps/github.com/gogo/protobuf/test/theproto3/theproto3.proto new file mode 100644 index 000000000..0f4525cdc --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/theproto3/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2014 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/thetest.pb.go b/deps/github.com/gogo/protobuf/test/thetest.pb.go new file mode 100644 index 000000000..32fc8807b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/thetest.pb.go @@ -0,0 +1,26872 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNative.Unmarshal(m, b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return xxx_messageInfo_NidOptNative.Size(m) +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNative.Unmarshal(m, b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return xxx_messageInfo_NinOptNative.Size(m) +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNative.Unmarshal(m, b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return xxx_messageInfo_NidRepNative.Size(m) +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNative.Unmarshal(m, b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return xxx_messageInfo_NinRepNative.Size(m) +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepPackedNative.Unmarshal(m, b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NidRepPackedNative.Size(m) +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepPackedNative.Unmarshal(m, b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNative.Size(m) +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptStruct.Unmarshal(m, b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return xxx_messageInfo_NidOptStruct.Size(m) +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStruct.Unmarshal(m, b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return xxx_messageInfo_NinOptStruct.Size(m) +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepStruct.Unmarshal(m, b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return xxx_messageInfo_NidRepStruct.Size(m) +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepStruct.Unmarshal(m, b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return xxx_messageInfo_NinRepStruct.Size(m) +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidEmbeddedStruct.Unmarshal(m, b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NidEmbeddedStruct.Size(m) +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStruct.Unmarshal(m, b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStruct.Size(m) +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidNestedStruct.Unmarshal(m, b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return xxx_messageInfo_NidNestedStruct.Size(m) +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStruct.Unmarshal(m, b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return xxx_messageInfo_NinNestedStruct.Size(m) +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptCustom.Unmarshal(m, b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return xxx_messageInfo_NidOptCustom.Size(m) +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomDash.Unmarshal(m, b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return xxx_messageInfo_CustomDash.Size(m) +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptCustom.Unmarshal(m, b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return xxx_messageInfo_NinOptCustom.Size(m) +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepCustom.Unmarshal(m, b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return xxx_messageInfo_NidRepCustom.Size(m) +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepCustom.Unmarshal(m, b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return xxx_messageInfo_NinRepCustom.Size(m) +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeUnion.Unmarshal(m, b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return xxx_messageInfo_NinOptNativeUnion.Size(m) +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStructUnion.Unmarshal(m, b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return xxx_messageInfo_NinOptStructUnion.Size(m) +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStructUnion.Size(m) +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStructUnion.Unmarshal(m, b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinNestedStructUnion.Size(m) +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tree.Unmarshal(m, b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return xxx_messageInfo_Tree.Size(m) +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrBranch.Unmarshal(m, b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return xxx_messageInfo_OrBranch.Size(m) +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndBranch.Unmarshal(m, b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return xxx_messageInfo_AndBranch.Size(m) +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Leaf.Unmarshal(m, b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return xxx_messageInfo_Leaf.Size(m) +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepTree.Unmarshal(m, b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return xxx_messageInfo_DeepTree.Size(m) +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ADeepBranch.Unmarshal(m, b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return xxx_messageInfo_ADeepBranch.Size(m) +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndDeepBranch.Unmarshal(m, b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return xxx_messageInfo_AndDeepBranch.Size(m) +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepLeaf.Unmarshal(m, b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return xxx_messageInfo_DeepLeaf.Size(m) +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nil.Unmarshal(m, b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return xxx_messageInfo_Nil.Size(m) +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptEnum.Unmarshal(m, b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return xxx_messageInfo_NidOptEnum.Size(m) +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnum.Unmarshal(m, b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return xxx_messageInfo_NinOptEnum.Size(m) +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepEnum.Unmarshal(m, b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return xxx_messageInfo_NidRepEnum.Size(m) +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepEnum.Unmarshal(m, b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return xxx_messageInfo_NinRepEnum.Size(m) +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnumDefault.Unmarshal(m, b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_NinOptEnumDefault.Size(m) +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnum.Unmarshal(m, b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnum.Size(m) +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnumDefault.Unmarshal(m, b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnumDefault.Size(m) +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Timer.Unmarshal(m, b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return xxx_messageInfo_Timer.Size(m) +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyExtendable.Unmarshal(m, b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return xxx_messageInfo_MyExtendable.Size(m) +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherExtenable.Unmarshal(m, b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return xxx_messageInfo_OtherExtenable.Size(m) +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition.Unmarshal(m, b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return xxx_messageInfo_NestedDefinition.Size(m) +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage.Size(m) +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Size(m) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedScope.Unmarshal(m, b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return xxx_messageInfo_NestedScope.Size(m) +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeDefault.Unmarshal(m, b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return xxx_messageInfo_NinOptNativeDefault.Size(m) +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomContainer.Unmarshal(m, b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return xxx_messageInfo_CustomContainer.Size(m) +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNidOptNative.Unmarshal(m, b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNidOptNative.Size(m) +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinOptNative.Unmarshal(m, b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinOptNative.Size(m) +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinRepNative.Unmarshal(m, b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinRepNative.Size(m) +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinStruct.Unmarshal(m, b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return xxx_messageInfo_CustomNameNinStruct.Size(m) +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameCustomType.Unmarshal(m, b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return xxx_messageInfo_CustomNameCustomType.Size(m) +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Size(m) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameEnum.Unmarshal(m, b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return xxx_messageInfo_CustomNameEnum.Size(m) +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NoExtensionsMap.Unmarshal(m, b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return xxx_messageInfo_NoExtensionsMap.Size(m) +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Unrecognized.Unmarshal(m, b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return xxx_messageInfo_Unrecognized.Size(m) +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner.Size(m) +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Size(m) +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed.Size(m) +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Size(m) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Node.Unmarshal(m, b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return xxx_messageInfo_Node.Size(m) +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonByteCustomType.Unmarshal(m, b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NonByteCustomType.Size(m) +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidOptNonByteCustomType.Size(m) +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinOptNonByteCustomType.Size(m) +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidRepNonByteCustomType.Size(m) +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinRepNonByteCustomType.Size(m) +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoType.Unmarshal(m, b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return xxx_messageInfo_ProtoType.Size(m) +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6636 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x70, 0x24, 0x57, + 0x75, 0xbf, 0x7a, 0x7a, 0xa4, 0x1d, 0x1d, 0xbd, 0x5a, 0xad, 0x5d, 0xed, 0x58, 0x5e, 0x4b, 0xda, + 0xf1, 0x7a, 0x2d, 0x0b, 0x5b, 0xab, 0xd5, 0x6a, 0x5f, 0xb3, 0xd8, 0xfe, 0xcf, 0x6b, 0xd7, 0x5a, + 0xa4, 0x91, 0x68, 0x49, 0xd8, 0x0b, 0xff, 0x7f, 0x4d, 0xf5, 0xce, 0x5c, 0x49, 0x63, 0xcf, 0x74, + 0x0f, 0xd3, 0x2d, 0xdb, 0x72, 0xfd, 0x2b, 0xe5, 0x40, 0x42, 0x20, 0xa9, 0x3c, 0x49, 0x2a, 0x40, + 0xc0, 0x98, 0xa4, 0x08, 0x86, 0xbc, 0x20, 0x10, 0x02, 0x24, 0x15, 0xfc, 0x85, 0x64, 0xf3, 0x25, + 0x65, 0xf2, 0x29, 0x45, 0xa5, 0x5c, 0xec, 0x9a, 0xaa, 0x90, 0xc4, 0x09, 0x84, 0xb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a6, 0x00, 0xbd, + 0x24, 0xba, 0x74, 0x1d, 0x86, 0x97, 0x73, 0xf9, 0xd2, 0x72, 0x65, 0x75, 0x6d, 0x63, 0x69, 0xb5, + 0x9c, 0x5b, 0xd6, 0x14, 0x7f, 0xcc, 0x28, 0xbd, 0x7b, 0x73, 0xc9, 0x28, 0x15, 0xb5, 0x44, 0x70, + 0x6c, 0xad, 0x94, 0xdb, 0x28, 0x15, 0x35, 0x35, 0x53, 0x85, 0xc3, 0x61, 0x75, 0x32, 0x34, 0x33, + 0x02, 0x2e, 0x4e, 0x74, 0x71, 0x31, 0x91, 0xd5, 0xe1, 0xe2, 0x57, 0x12, 0x30, 0x16, 0xb2, 0x56, + 0x84, 0x3e, 0xe4, 0x61, 0xe8, 0xa5, 0x21, 0x4a, 0x57, 0xcf, 0xfb, 0x42, 0x17, 0x1d, 0x12, 0xb0, + 0x1d, 0x2b, 0x28, 0xc1, 0x05, 0x3b, 0x08, 0xb5, 0x4b, 0x07, 0x81, 0x45, 0x74, 0xd4, 0xf4, 0xff, + 0xd7, 0x51, 0xd3, 0xe9, 0xb2, 0x77, 0x2e, 0xce, 0xb2, 0x47, 0xc6, 0x0e, 0x56, 0xdb, 0x7b, 0x43, + 0x6a, 0xfb, 0x25, 0x18, 0xed, 0x10, 0x14, 0xbb, 0xc6, 0x7e, 0x50, 0x81, 0x74, 0x37, 0xe3, 0x44, + 0x54, 0xba, 0x84, 0x50, 0xe9, 0x2e, 0xc9, 0x16, 0x3c, 0xde, 0xdd, 0x09, 0x1d, 0xbe, 0xfe, 0x9c, + 0x02, 0xe3, 0xe1, 0x9d, 0x62, 0xa8, 0x0e, 0x0f, 0x41, 0x5f, 0x13, 0xb9, 0x3b, 0x36, 0xef, 0x96, + 0x4e, 0x86, 0xac, 0xc1, 0x98, 0x2c, 0x3b, 0x9b, 0xa1, 0x82, 0x8b, 0xb8, 0xda, 0xad, 0xdd, 0xa3, + 0xda, 0x74, 0x68, 0xfa, 0x91, 0x04, 0x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0xb8, + 0x14, 0x91, 0xa1, 0xb8, 0x86, 0xbf, 0x03, 0x92, 0x4f, 0x21, 0xf3, 0x09, 0x71, 0x01, 0x20, 0x43, + 0x6f, 0x61, 0xe8, 0x9f, 0x82, 0x5e, 0x62, 0x2f, 0x1d, 0x80, 0x59, 0x4c, 0xeb, 0xd1, 0x53, 0x90, + 0x2c, 0xac, 0x1a, 0x38, 0xfc, 0x35, 0x18, 0xa4, 0xa3, 0x95, 0xb5, 0xa5, 0x52, 0xa1, 0xa4, 0x25, + 0x32, 0x67, 0xa1, 0x8f, 0x1a, 0x01, 0xa7, 0x86, 0x67, 0x06, 0xad, 0x87, 0x7d, 0x65, 0x32, 0x14, + 0x4e, 0xdd, 0x5c, 0xc9, 0x97, 0x0c, 0x2d, 0x11, 0x74, 0xaf, 0x03, 0x83, 0xc1, 0xbe, 0xf8, 0xed, + 0x89, 0xa9, 0x6f, 0x28, 0x30, 0x10, 0xe8, 0x73, 0x71, 0x83, 0x62, 0x36, 0x1a, 0xf6, 0x53, 0x15, + 0xb3, 0x51, 0x37, 0x1d, 0x16, 0x14, 0x40, 0x86, 0x72, 0x78, 0x24, 0xae, 0xd3, 0xde, 0x16, 0xe5, + 0x9f, 0x53, 0x40, 0x93, 0x5b, 0x4c, 0x49, 0x41, 0xe5, 0xa7, 0xaa, 0xe0, 0x27, 0x15, 0x18, 0x16, + 0xfb, 0x4a, 0x49, 0xbd, 0xe3, 0x3f, 0x55, 0xf5, 0xbe, 0x9b, 0x80, 0x21, 0xa1, 0x9b, 0x8c, 0xab, + 0xdd, 0xfb, 0x61, 0xb4, 0x5e, 0x43, 0xcd, 0x96, 0xed, 0x22, 0xab, 0xba, 0x57, 0x69, 0xa0, 0x27, + 0x51, 0x23, 0x9d, 0x21, 0x85, 0xe2, 0xd4, 0xfe, 0xfd, 0xea, 0xdc, 0x92, 0x8f, 0x5b, 0xc6, 0xb0, + 0xec, 0xd8, 0x52, 0xb1, 0xb4, 0xb2, 0xb6, 0xba, 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80, 0x63, 0x98, 0x88, + 0x96, 0xdd, 0xda, 0x6d, 0xe0, 0x65, 0x2b, 0x5a, 0xc4, 0xa7, 0xb9, 0x08, 0x8e, 0x61, 0x22, 0x0e, + 0x60, 0xd6, 0xe7, 0xb9, 0x08, 0x27, 0x60, 0xcf, 0x87, 0x61, 0xc0, 0xb6, 0x1a, 0x7b, 0xb6, 0x15, + 0x47, 0x89, 0xcf, 0x30, 0x09, 0xc0, 0x20, 0x58, 0xc0, 0x25, 0xe8, 0x8f, 0xeb, 0x88, 0xcf, 0xbe, + 0xca, 0xd3, 0x83, 0x7b, 0xe0, 0x0a, 0x8c, 0xf0, 0x02, 0x55, 0xb7, 0xad, 0x18, 0x22, 0xfe, 0x90, + 0x89, 0x18, 0x0e, 0xc0, 0xd8, 0x34, 0x5c, 0xe4, 0xb8, 0xdb, 0x28, 0x8e, 0x90, 0xcf, 0xf1, 0x69, + 0x30, 0x08, 0x33, 0xe5, 0x75, 0x64, 0x55, 0x77, 0xe2, 0x49, 0x78, 0x81, 0x9b, 0x92, 0x63, 0xb0, + 0x88, 0x02, 0x0c, 0x35, 0xcd, 0xb6, 0xb3, 0x63, 0x36, 0x62, 0xb9, 0xe3, 0xf3, 0x4c, 0xc6, 0xa0, + 0x07, 0x62, 0x16, 0xd9, 0xb5, 0x0e, 0x22, 0xe6, 0x0b, 0xdc, 0x22, 0x01, 0x18, 0x4b, 0x3d, 0xc7, + 0x25, 0x5b, 0x5a, 0x07, 0x91, 0xf6, 0x47, 0x3c, 0xf5, 0x28, 0x76, 0x25, 0x28, 0xf1, 0x12, 0xf4, + 0x3b, 0xf5, 0x67, 0x62, 0x89, 0xf9, 0x63, 0xee, 0x69, 0x02, 0xc0, 0xe0, 0x6b, 0x70, 0x47, 0xe8, + 0x32, 0x11, 0x43, 0xd8, 0x9f, 0x30, 0x61, 0xe3, 0x21, 0x4b, 0x05, 0x2b, 0x09, 0x07, 0x15, 0xf9, + 0xa7, 0xbc, 0x24, 0x20, 0x49,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x88, 0x41, 0xc6, 0xd9, + 0x03, 0x1f, 0x83, 0x14, 0x17, 0xac, 0x9f, 0xc0, 0x88, 0x2d, 0x97, 0x3d, 0x96, 0x21, 0xb0, 0x3a, + 0x6c, 0xe5, 0x22, 0x54, 0xfd, 0x24, 0xf4, 0x1a, 0xf5, 0xed, 0x1d, 0x97, 0x3d, 0xbc, 0x93, 0x8d, + 0x92, 0x33, 0xd7, 0xa0, 0xdf, 0xd3, 0xe8, 0x4d, 0x16, 0x5d, 0xa4, 0x53, 0xd3, 0x27, 0x82, 0xeb, + 0x09, 0xdf, 0xb7, 0xa4, 0x43, 0xfa, 0x34, 0xa4, 0xd6, 0xdd, 0xb6, 0x5f, 0xf4, 0x79, 0x47, 0xea, + 0x8d, 0x66, 0x3e, 0xa0, 0x40, 0xaa, 0x88, 0x50, 0x8b, 0x18, 0xfc, 0x1e, 0x48, 0x16, 0xed, 0xa7, + 0x2c, 0xa6, 0xe0, 0x28, 0xb3, 0x28, 0x26, 0x33, 0x9b, 0x12, 0xb2, 0x7e, 0x4f, 0xd0, 0xee, 0x63, + 0x9e, 0xdd, 0x03, 0x7c, 0xc4, 0xf6, 0x19, 0xc1, 0xf6, 0xcc, 0x81, 0x98, 0xa9, 0xc3, 0xfe, 0xe7, + 0x61, 0x20, 0xf0, 0x14, 0x7d, 0x86, 0xa9, 0x91, 0x90, 0x81, 0x41, 0x5b, 0x61, 0x8e, 0x0c, 0x82, + 0x21, 0xe1, 0xc1, 0x18, 0x1a, 0x30, 0x71, 0x17, 0x28, 0x31, 0xf3, 0xac, 0x68, 0xe6, 0x70, 0x56, + 0x66, 0xea, 0x79, 0x6a, 0x23, 0x62, 0xee, 0x13, 0x34, 0x38, 0xbb, 0x3b, 0x11, 0x7f, 0xce, 0xf4, + 0x82, 0x5a, 0xae, 0x37, 0x32, 0x0f, 0x02, 0xd0, 0x94, 0x2f, 0x59, 0xbb, 0x4d, 0x29, 0xeb, 0x86, + 0xb9, 0x81, 0x37, 0x76, 0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73, 0xd5, + 0xdf, 0x44, 0xff, 0xa6, 0x14, 0x7e, 0x81, 0x5b, 0x50, 0x19, 0x29, 0xfc, 0x20, 0x24, 0xf4, 0xa4, + 0x42, 0x16, 0xe0, 0xf1, 0xc3, 0x2e, 0x23, 0x85, 0x1d, 0x84, 0x84, 0x5c, 0x46, 0x0a, 0x39, 0x08, + 0x09, 0xb7, 0x8c, 0x14, 0x6e, 0x10, 0x12, 0x6a, 0x19, 0x29, 0xd4, 0x20, 0x24, 0xcc, 0x32, 0x52, + 0x98, 0x41, 0x48, 0x88, 0x65, 0xa4, 0x10, 0x83, 0x90, 0xf0, 0xca, 0x48, 0xe1, 0x05, 0x21, 0xa1, + 0x75, 0x42, 0x0e, 0x2d, 0x08, 0x0b, 0xab, 0x13, 0x72, 0x58, 0x41, 0x58, 0x48, 0xdd, 0x2d, 0x87, + 0x54, 0xff, 0xad, 0x97, 0xa7, 0x7a, 0xf1, 0x50, 0x20, 0x9a, 0x4e, 0xc8, 0xd1, 0x04, 0x61, 0x91, + 0x74, 0x42, 0x8e, 0x24, 0x08, 0x8b, 0xa2, 0x13, 0x72, 0x14, 0x41, 0x58, 0x04, 0xbd, 0x28, 0x47, + 0x90, 0x7f, 0xc7, 0x27, 0x23, 0x1d, 0x29, 0x46, 0x45, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, + 0xa4, 0xc6, 0x88, 0x20, 0x35, 0x46, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x11, 0x41, 0x6a, 0x8c, + 0x08, 0x52, 0xe3, 0x44, 0x90, 0x1a, 0x2b, 0x82, 0xd4, 0x6e, 0x11, 0x74, 0x42, 0xbe, 0xf1, 0x00, + 0x61, 0x05, 0xe9, 0x84, 0x7c, 0xf4, 0x19, 0x1d, 0x42, 0x6a, 0xac, 0x10, 0x52, 0xbb, 0x85, 0xd0, + 0x37, 0x55, 0x18, 0x13, 0x42, 0x88, 0x9d, 0x0f, 0xbd, 0x59, 0x15, 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xd8, 0x22, + 0x9f, 0x3b, 0xad, 0x1f, 0xe1, 0x39, 0x2a, 0x54, 0x60, 0x66, 0x20, 0xce, 0x95, 0x2d, 0x30, 0x40, + 0xbe, 0x2b, 0xa0, 0xbb, 0x95, 0x38, 0x32, 0xfb, 0x08, 0x13, 0x52, 0xe8, 0x2a, 0x24, 0xc2, 0x54, + 0x1c, 0x9e, 0xdf, 0xb8, 0x71, 0x73, 0xb2, 0xe7, 0xa5, 0x9b, 0x93, 0x3d, 0xff, 0x74, 0x73, 0xb2, + 0xe7, 0xbb, 0x37, 0x27, 0x95, 0xef, 0xdf, 0x9c, 0x54, 0x7e, 0x78, 0x73, 0x52, 0xf9, 0xf1, 0xcd, + 0x49, 0xe5, 0xd9, 0x5b, 0x93, 0xca, 0x0b, 0xb7, 0x26, 0x95, 0x2f, 0xde, 0x9a, 0x54, 0xbe, 0x76, + 0x6b, 0x52, 0x79, 0xf1, 0xd6, 0xa4, 0x72, 0xe3, 0xd6, 0x64, 0xcf, 0x4b, 0xb7, 0x26, 0x7b, 0xbe, + 0x7b, 0x6b, 0x52, 0xf9, 0xfe, 0xad, 0xc9, 0x9e, 0x1f, 0xde, 0x9a, 0x54, 0x7e, 0x7c, 0x6b, 0xb2, + 0xe7, 0xd9, 0x57, 0x26, 0x7b, 0x9e, 0x7f, 0x65, 0xb2, 0xe7, 0x85, 0x57, 0x26, 0x95, 0xff, 0x0d, + 0x00, 0x00, 0xff, 0xff, 0xad, 0xc5, 0x4a, 0xfd, 0x58, 0x67, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringThetest(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringThetest(m github_com_gogo_protobuf_proto.Message) string { + e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) + if e == nil { + return "nil" + } + s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "})" + return s +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} + +func init() { proto.RegisterFile("thetest.proto", fileDescriptor_thetest_14aea7c379120fb7) } + +var fileDescriptor_thetest_14aea7c379120fb7 = []byte{ + // 3070 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0xf5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0xf4, 0x45, 0x6f, 0x62, 0x65, 0xc1, 0xe8, 0xbf, 0xa2, 0x37, + 0xb2, 0xfe, 0x0c, 0x11, 0x4b, 0x14, 0x45, 0xc9, 0x32, 0xd3, 0xa4, 0xe0, 0x97, 0x1b, 0xb9, 0x11, + 0x65, 0x30, 0x72, 0x5b, 0x03, 0x05, 0x0a, 0x5a, 0x5c, 0x4b, 0x44, 0xe5, 0xa5, 0x40, 0xae, 0xd2, + 0xb8, 0x87, 0x22, 0xc8, 0xa1, 0x08, 0x7a, 0x2d, 0x7a, 0x6c, 0xe3, 0xa2, 0x28, 0x90, 0xde, 0x72, + 0x28, 0x8a, 0xa2, 0x28, 0x1a, 0x5f, 0x0a, 0xa8, 0x37, 0xa3, 0xa7, 0x22, 0x28, 0x84, 0x88, 0xb9, + 0xe4, 0x18, 0xf4, 0xd2, 0x1c, 0x72, 0x28, 0x76, 0x77, 0x76, 0x76, 0x66, 0xb8, 0xcb, 0x5d, 0x5a, + 0x4a, 0x9b, 0x8b, 0x2d, 0xce, 0x7b, 0x6f, 0xe6, 0xed, 0xfb, 0xfd, 0xde, 0xdb, 0xb7, 0x33, 0x03, + 0xd3, 0xe6, 0x81, 0x6e, 0xea, 0x3d, 0x73, 0xf9, 0xa8, 0xdb, 0x31, 0x3b, 0x72, 0xdc, 0xfa, 0x3b, + 0x75, 0x6d, 0xbf, 0x6d, 0x1e, 0x1c, 0xdf, 0x5b, 0xde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+ 0xc9, 0x0b, 0xca, 0x4c, 0x1a, 0x65, 0x26, 0x78, 0x79, 0xc1, 0x93, 0xaf, 0x2b, 0xb3, 0x69, 0x94, + 0x99, 0xe2, 0xe5, 0xeb, 0xda, 0xbb, 0x36, 0xbc, 0x86, 0x07, 0xef, 0x1c, 0x0f, 0x2f, 0x05, 0x76, + 0x8e, 0x07, 0x96, 0x42, 0x3a, 0xc7, 0x43, 0x4a, 0xc1, 0x9c, 0xe3, 0xc1, 0xa4, 0x30, 0xce, 0xf1, + 0x30, 0x52, 0x00, 0xe7, 0x78, 0x00, 0x29, 0x74, 0x73, 0x3c, 0x74, 0x14, 0xb4, 0x39, 0x1e, 0x34, + 0x0a, 0xd7, 0x1c, 0x0f, 0x17, 0x05, 0x4a, 0x11, 0x80, 0xf2, 0x20, 0x52, 0x04, 0x88, 0x3c, 0x70, + 0x14, 0x01, 0x1c, 0x0f, 0x16, 0x45, 0x80, 0xc5, 0x03, 0x44, 0x11, 0x00, 0xf1, 0xa0, 0x50, 0x04, + 0x28, 0x3c, 0x10, 0x48, 0x8e, 0x35, 0xf4, 0x23, 0x9f, 0x1c, 0xc3, 0x43, 0x73, 0x0c, 0x0f, 0xcd, + 0x31, 0x3c, 0x34, 0xc7, 0xf0, 0xd0, 0x1c, 0xc3, 0x43, 0x73, 0x0c, 0x0f, 0xcd, 0x31, 0x3c, 0x34, + 0xc7, 0xf0, 0xd0, 0x1c, 0xc3, 0xc3, 0x73, 0x0c, 0x87, 0xe4, 0x18, 0x0e, 0xc9, 0x31, 0x1c, 0x92, + 0x63, 0x38, 0x24, 0xc7, 0x70, 0x48, 0x8e, 0xe1, 0xc0, 0x1c, 0xf3, 0xe0, 0x9d, 0xe3, 0xe1, 0xf5, + 0xcd, 0x31, 0x1c, 0x90, 0x63, 0x38, 0x20, 0xc7, 0x70, 0x40, 0x8e, 0xe1, 0x80, 0x1c, 0xc3, 0x01, + 0x39, 0x86, 0x03, 0x72, 0x0c, 0x07, 0xe4, 0x18,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1, 0x26, + 0x13, 0xaf, 0xf9, 0x6d, 0x8f, 0xab, 0x19, 0xf1, 0x4e, 0x13, 0xaf, 0xf9, 0x86, 0xc7, 0xda, 0x8c, + 0x78, 0x56, 0xc6, 0x6b, 0x6e, 0x7b, 0xfc, 0xcd, 0x88, 0xa7, 0x66, 0xbc, 0x66, 0xdd, 0x63, 0x72, + 0x46, 0x3c, 0x3f, 0xe3, 0x35, 0x77, 0xbc, 0x4d, 0xf4, 0x8f, 0x04, 0xfa, 0x31, 0xb7, 0xa0, 0x34, + 0x81, 0x7e, 0xe0, 0x43, 0x3d, 0xa1, 0x90, 0x31, 0x3a, 0x1e, 0xed, 0x34, 0x81, 0x76, 0xe0, 0x43, + 0x39, 0x4d, 0xa0, 0x1c, 0xf8, 0xd0, 0x4d, 0x13, 0xe8, 0x06, 0x3e, 0x54, 0xd3, 0x04, 0xaa, 0x81, + 0x0f, 0xcd, 0x34, 0x81, 0x66, 0xe0, 0x43, 0x31, 0x4d, 0xa0, 0x18, 0xf8, 0xd0, 0x4b, 0x13, 0xe8, + 0x05, 0x3e, 0xd4, 0x5a, 0x14, 0xa9, 0x05, 0x7e, 0xb4, 0x5a, 0x14, 0x69, 0x05, 0x7e, 0x94, 0x7a, + 0x51, 0xa4, 0xd4, 0x44, 0xff, 0x74, 0x61, 0xcc, 0x1a, 0x62, 0xd8, 0xb4, 0x28, 0xb2, 0x09, 0xfc, + 0x98, 0xb4, 0x28, 0x32, 0x09, 0xfc, 0x58, 0xb4, 0x28, 0xb2, 0x08, 0xfc, 0x18, 0xf4, 0x58, 0x64, + 0x90, 0x77, 0xc7, 0x47, 0x13, 0x8e, 0x14, 0xc3, 0x18, 0x84, 0x23, 0x30, 0x08, 0x47, 0x60, 0x10, + 0x8e, 0xc0, 0x20, 0x1c, 0x81, 0x41, 0x38, 0x02, 0x83, 0x70, 0x04, 0x06, 0xe1, 0x08, 0x0c, 0xc2, + 0x51, 0x18, 0x84, 0x23, 0x31, 0x08, 0x07, 0x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} diff --git a/deps/github.com/gogo/protobuf/test/thetest.proto b/deps/github.com/gogo/protobuf/test/thetest.proto new file mode 100644 index 000000000..4d25c0b4e --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/thetest.proto @@ -0,0 +1,649 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/deps/github.com/gogo/protobuf/test/thetestpb_test.go b/deps/github.com/gogo/protobuf/test/thetestpb_test.go new file mode 100644 index 000000000..20835577d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/thetestpb_test.go @@ -0,0 +1,15974 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/typedecl/Makefile b/deps/github.com/gogo/protobuf/test/typedecl/Makefile new file mode 100644 index 000000000..5b924dfe7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedecl.proto diff --git a/deps/github.com/gogo/protobuf/test/typedecl/models.go b/deps/github.com/gogo/protobuf/test/typedecl/models.go new file mode 100644 index 000000000..765b46193 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl/models.go @@ -0,0 +1,41 @@ +package typedecl + +import ( + "encoding/json" + + "github.com/gogo/protobuf/jsonpb" +) + +type Dropped struct { + Name string + Age int32 +} + +func (d *Dropped) Drop() bool { + return true +} + +func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} + +type DroppedWithoutGetters struct { + Width int64 + Height int64 +} + +func (d *DroppedWithoutGetters) GetHeight() int64 { + return d.Height +} + +func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} diff --git a/deps/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go b/deps/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go new file mode 100644 index 000000000..b5d9ab9a0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go @@ -0,0 +1,1009 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedecl.proto + +package typedecl + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *Dropped) Reset() { *m = Dropped{} } +func (m *Dropped) String() string { return proto.CompactTextString(m) } +func (*Dropped) ProtoMessage() {} +func (*Dropped) Descriptor() ([]byte, []int) { + return fileDescriptor_typedecl_3980e2f1b7c625af, []int{0} +} +func (m *Dropped) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dropped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dropped.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Dropped) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dropped.Merge(dst, src) +} +func (m *Dropped) XXX_Size() int { + return m.Size() +} +func (m *Dropped) XXX_DiscardUnknown() { + xxx_messageInfo_Dropped.DiscardUnknown(m) +} + +var xxx_messageInfo_Dropped proto.InternalMessageInfo + +func (m *Dropped) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Dropped) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } +func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } +func (*DroppedWithoutGetters) ProtoMessage() {} +func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { + return fileDescriptor_typedecl_3980e2f1b7c625af, []int{1} +} +func (m *DroppedWithoutGetters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DroppedWithoutGetters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DroppedWithoutGetters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DroppedWithoutGetters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DroppedWithoutGetters.Merge(dst, src) +} +func (m *DroppedWithoutGetters) XXX_Size() int { + return m.Size() +} +func (m *DroppedWithoutGetters) XXX_DiscardUnknown() { + xxx_messageInfo_DroppedWithoutGetters.DiscardUnknown(m) +} + +var xxx_messageInfo_DroppedWithoutGetters proto.InternalMessageInfo + +type Kept struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Kept) Reset() { *m = Kept{} } +func (m *Kept) String() string { return proto.CompactTextString(m) } +func (*Kept) ProtoMessage() {} +func (*Kept) Descriptor() ([]byte, []int) { + return fileDescriptor_typedecl_3980e2f1b7c625af, []int{2} +} +func (m *Kept) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Kept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Kept.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Kept) XXX_Merge(src proto.Message) { + xxx_messageInfo_Kept.Merge(dst, src) +} +func (m *Kept) XXX_Size() int { + return m.Size() +} +func (m *Kept) XXX_DiscardUnknown() { + xxx_messageInfo_Kept.DiscardUnknown(m) +} + +var xxx_messageInfo_Kept proto.InternalMessageInfo + +func (m *Kept) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Kept) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func init() { + proto.RegisterType((*Dropped)(nil), "typedecl.Dropped") + proto.RegisterType((*DroppedWithoutGetters)(nil), "typedecl.DroppedWithoutGetters") + proto.RegisterType((*Kept)(nil), "typedecl.Kept") +} +func (this *Dropped) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Dropped") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Dropped but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Dropped but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Dropped) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DroppedWithoutGetters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") + } + if this.Height != that1.Height { + return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) + } + if this.Width != that1.Width { + return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) + } + return nil +} +func (this *DroppedWithoutGetters) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Height != that1.Height { + return false + } + if this.Width != that1.Width { + return false + } + return true +} +func (this *Kept) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Kept") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Kept but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Kept but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Kept) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (m *Dropped) 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 *Dropped) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func (m *DroppedWithoutGetters) 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 *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Height)) + } + if m.Width != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Width)) + } + return i, nil +} + +func (m *Kept) 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 *Kept) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func encodeVarintTypedecl(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 NewPopulatedDropped(r randyTypedecl, easy bool) *Dropped { + this := &Dropped{} + this.Name = string(randStringTypedecl(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDroppedWithoutGetters(r randyTypedecl, easy bool) *DroppedWithoutGetters { + this := &DroppedWithoutGetters{} + this.Height = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Height *= -1 + } + this.Width = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Width *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKept(r randyTypedecl, easy bool) *Kept { + this := &Kept{} + this.Name = string(randStringTypedecl(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTypedecl interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypedecl(r randyTypedecl) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypedecl(r randyTypedecl) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneTypedecl(r) + } + return string(tmps) +} +func randUnrecognizedTypedecl(r randyTypedecl, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypedecl(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypedecl(dAtA []byte, r randyTypedecl, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypedecl(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Dropped) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedecl(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedecl(uint64(m.Age)) + } + return n +} + +func (m *DroppedWithoutGetters) Size() (n int) { + var l int + _ = l + if m.Height != 0 { + n += 1 + sovTypedecl(uint64(m.Height)) + } + if m.Width != 0 { + n += 1 + sovTypedecl(uint64(m.Width)) + } + return n +} + +func (m *Kept) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedecl(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedecl(uint64(m.Age)) + } + return n +} + +func sovTypedecl(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypedecl(x uint64) (n int) { + return sovTypedecl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Dropped) 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 ErrIntOverflowTypedecl + } + 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: Dropped: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowTypedecl + } + 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 ErrInvalidLengthTypedecl + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedecl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DroppedWithoutGetters) 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 ErrIntOverflowTypedecl + } + 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: DroppedWithoutGetters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedecl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Kept) 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 ErrIntOverflowTypedecl + } + 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: Kept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Kept: 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 ErrIntOverflowTypedecl + } + 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 ErrInvalidLengthTypedecl + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedecl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypedecl(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, ErrIntOverflowTypedecl + } + 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, ErrIntOverflowTypedecl + } + 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, ErrIntOverflowTypedecl + } + 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, ErrInvalidLengthTypedecl + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypedecl + } + 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 := skipTypedecl(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 ( + ErrInvalidLengthTypedecl = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypedecl = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("typedecl.proto", fileDescriptor_typedecl_3980e2f1b7c625af) } + +var fileDescriptor_typedecl_3980e2f1b7c625af = []byte{ + // 246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0xa9, 0x2c, 0x48, + 0x4d, 0x49, 0x4d, 0xce, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x32, 0xe5, 0x62, + 0x77, 0x29, 0xca, 0x2f, 0x28, 0x48, 0x4d, 0x11, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, + 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x04, 0xb8, 0x98, 0x13, 0xd3, 0x53, 0x25, + 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x40, 0x4c, 0x2b, 0x96, 0x0f, 0x0b, 0xe5, 0x19, 0x94, 0xfc, + 0xb9, 0x44, 0xa1, 0xda, 0xc2, 0x33, 0x4b, 0x32, 0xf2, 0x4b, 0x4b, 0xdc, 0x53, 0x4b, 0x4a, 0x52, + 0x8b, 0x8a, 0x85, 0xc4, 0xb8, 0xd8, 0x32, 0x52, 0x33, 0xd3, 0x33, 0x4a, 0xc0, 0xc6, 0x30, 0x07, + 0x41, 0x79, 0x42, 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x60, 0xa3, 0x98, 0x83, 0x20, + 0x1c, 0x2b, 0x8e, 0x8e, 0x05, 0xf2, 0x0c, 0x60, 0x03, 0x75, 0xb8, 0x58, 0xbc, 0x53, 0x0b, 0x4a, + 0x88, 0x73, 0x84, 0x93, 0xce, 0x83, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, + 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x81, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, + 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8f, 0x47, 0x72, 0x0c, 0x0d, 0x8f, 0xe5, 0x18, 0x26, + 0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0x7b, 0xd5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x57, + 0x14, 0x5c, 0x35, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/typedecl/typedecl.proto b/deps/github.com/gogo/protobuf/test/typedecl/typedecl.proto new file mode 100644 index 000000000..162a1c6c3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl/typedecl.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package typedecl; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; + +message Dropped { + option (gogoproto.typedecl) = false; + string name = 1; + int32 age = 2; +} + +message DroppedWithoutGetters { + option (gogoproto.typedecl) = false; + option (gogoproto.goproto_getters) = false; + int64 height = 1; + int64 width = 2; +} + +message Kept { + string name = 1; + int32 age = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go b/deps/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go new file mode 100644 index 000000000..f2cf4f272 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go @@ -0,0 +1,645 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedecl.proto + +package typedecl + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestDroppedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDropped(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Dropped{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedWithoutGettersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DroppedWithoutGetters{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKeptMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKeptProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKeptProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKept(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Kept{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedWithoutGettersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKeptJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKeptVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedWithoutGettersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKeptSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/typedecl_all/Makefile b/deps/github.com/gogo/protobuf/test/typedecl_all/Makefile new file mode 100644 index 000000000..994417461 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl_all/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedeclall.proto diff --git a/deps/github.com/gogo/protobuf/test/typedecl_all/models.go b/deps/github.com/gogo/protobuf/test/typedecl_all/models.go new file mode 100644 index 000000000..ce078f9df --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl_all/models.go @@ -0,0 +1,41 @@ +package typedeclall + +import ( + "encoding/json" + + "github.com/gogo/protobuf/jsonpb" +) + +type Dropped struct { + Name string + Age int32 +} + +func (d *Dropped) Drop() bool { + return true +} + +func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} + +type DroppedWithoutGetters struct { + Width int64 + Height int64 +} + +func (d *DroppedWithoutGetters) GetHeight() int64 { + return d.Height +} + +func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} diff --git a/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go b/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go new file mode 100644 index 000000000..73e53d5e5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go @@ -0,0 +1,1009 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedeclall.proto + +package typedeclall + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *Dropped) Reset() { *m = Dropped{} } +func (m *Dropped) String() string { return proto.CompactTextString(m) } +func (*Dropped) ProtoMessage() {} +func (*Dropped) Descriptor() ([]byte, []int) { + return fileDescriptor_typedeclall_37fb6c37f980aef5, []int{0} +} +func (m *Dropped) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dropped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dropped.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Dropped) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dropped.Merge(dst, src) +} +func (m *Dropped) XXX_Size() int { + return m.Size() +} +func (m *Dropped) XXX_DiscardUnknown() { + xxx_messageInfo_Dropped.DiscardUnknown(m) +} + +var xxx_messageInfo_Dropped proto.InternalMessageInfo + +func (m *Dropped) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Dropped) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } +func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } +func (*DroppedWithoutGetters) ProtoMessage() {} +func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { + return fileDescriptor_typedeclall_37fb6c37f980aef5, []int{1} +} +func (m *DroppedWithoutGetters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DroppedWithoutGetters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DroppedWithoutGetters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DroppedWithoutGetters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DroppedWithoutGetters.Merge(dst, src) +} +func (m *DroppedWithoutGetters) XXX_Size() int { + return m.Size() +} +func (m *DroppedWithoutGetters) XXX_DiscardUnknown() { + xxx_messageInfo_DroppedWithoutGetters.DiscardUnknown(m) +} + +var xxx_messageInfo_DroppedWithoutGetters proto.InternalMessageInfo + +type Kept struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Kept) Reset() { *m = Kept{} } +func (m *Kept) String() string { return proto.CompactTextString(m) } +func (*Kept) ProtoMessage() {} +func (*Kept) Descriptor() ([]byte, []int) { + return fileDescriptor_typedeclall_37fb6c37f980aef5, []int{2} +} +func (m *Kept) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Kept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Kept.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Kept) XXX_Merge(src proto.Message) { + xxx_messageInfo_Kept.Merge(dst, src) +} +func (m *Kept) XXX_Size() int { + return m.Size() +} +func (m *Kept) XXX_DiscardUnknown() { + xxx_messageInfo_Kept.DiscardUnknown(m) +} + +var xxx_messageInfo_Kept proto.InternalMessageInfo + +func (m *Kept) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Kept) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func init() { + proto.RegisterType((*Dropped)(nil), "typedeclall.Dropped") + proto.RegisterType((*DroppedWithoutGetters)(nil), "typedeclall.DroppedWithoutGetters") + proto.RegisterType((*Kept)(nil), "typedeclall.Kept") +} +func (this *Dropped) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Dropped") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Dropped but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Dropped but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Dropped) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DroppedWithoutGetters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") + } + if this.Height != that1.Height { + return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) + } + if this.Width != that1.Width { + return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) + } + return nil +} +func (this *DroppedWithoutGetters) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Height != that1.Height { + return false + } + if this.Width != that1.Width { + return false + } + return true +} +func (this *Kept) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Kept") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Kept but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Kept but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Kept) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (m *Dropped) 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 *Dropped) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func (m *DroppedWithoutGetters) 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 *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Height)) + } + if m.Width != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Width)) + } + return i, nil +} + +func (m *Kept) 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 *Kept) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func encodeVarintTypedeclall(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 NewPopulatedDropped(r randyTypedeclall, easy bool) *Dropped { + this := &Dropped{} + this.Name = string(randStringTypedeclall(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDroppedWithoutGetters(r randyTypedeclall, easy bool) *DroppedWithoutGetters { + this := &DroppedWithoutGetters{} + this.Height = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Height *= -1 + } + this.Width = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Width *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKept(r randyTypedeclall, easy bool) *Kept { + this := &Kept{} + this.Name = string(randStringTypedeclall(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTypedeclall interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypedeclall(r randyTypedeclall) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypedeclall(r randyTypedeclall) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneTypedeclall(r) + } + return string(tmps) +} +func randUnrecognizedTypedeclall(r randyTypedeclall, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypedeclall(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypedeclall(dAtA []byte, r randyTypedeclall, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypedeclall(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Dropped) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedeclall(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedeclall(uint64(m.Age)) + } + return n +} + +func (m *DroppedWithoutGetters) Size() (n int) { + var l int + _ = l + if m.Height != 0 { + n += 1 + sovTypedeclall(uint64(m.Height)) + } + if m.Width != 0 { + n += 1 + sovTypedeclall(uint64(m.Width)) + } + return n +} + +func (m *Kept) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedeclall(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedeclall(uint64(m.Age)) + } + return n +} + +func sovTypedeclall(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypedeclall(x uint64) (n int) { + return sovTypedeclall(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Dropped) 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 ErrIntOverflowTypedeclall + } + 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: Dropped: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowTypedeclall + } + 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 ErrInvalidLengthTypedeclall + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclall + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DroppedWithoutGetters) 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 ErrIntOverflowTypedeclall + } + 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: DroppedWithoutGetters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclall + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Kept) 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 ErrIntOverflowTypedeclall + } + 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: Kept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Kept: 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 ErrIntOverflowTypedeclall + } + 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 ErrInvalidLengthTypedeclall + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclall + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypedeclall(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, ErrIntOverflowTypedeclall + } + 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, ErrIntOverflowTypedeclall + } + 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, ErrIntOverflowTypedeclall + } + 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, ErrInvalidLengthTypedeclall + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypedeclall + } + 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 := skipTypedeclall(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 ( + ErrInvalidLengthTypedeclall = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypedeclall = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("typedeclall.proto", fileDescriptor_typedeclall_37fb6c37f980aef5) } + +var fileDescriptor_typedeclall_37fb6c37f980aef5 = []byte{ + // 253 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0xa9, 0x2c, 0x48, + 0x4d, 0x49, 0x4d, 0xce, 0x49, 0xcc, 0xc9, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, + 0x12, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x57, + 0x49, 0x9f, 0x8b, 0xdd, 0xa5, 0x28, 0xbf, 0xa0, 0x20, 0x35, 0x45, 0x48, 0x88, 0x8b, 0x25, 0x2f, + 0x31, 0x37, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xcc, 0x16, 0x12, 0xe0, 0x62, 0x4e, + 0x4c, 0x4f, 0x95, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x0d, 0x02, 0x31, 0x95, 0xbc, 0xb9, 0x44, 0xa1, + 0x1a, 0xc2, 0x33, 0x4b, 0x32, 0xf2, 0x4b, 0x4b, 0xdc, 0x53, 0x4b, 0x4a, 0x52, 0x8b, 0x8a, 0x85, + 0xc4, 0xb8, 0xd8, 0x32, 0x52, 0x33, 0xd3, 0x33, 0x4a, 0xc0, 0x06, 0x30, 0x07, 0x41, 0x79, 0x42, + 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x60, 0x43, 0x98, 0x83, 0x20, 0x1c, 0x2b, 0x96, + 0x8e, 0x05, 0xf2, 0x0c, 0x4a, 0x46, 0x5c, 0x2c, 0xde, 0xa9, 0x05, 0x25, 0xc4, 0x59, 0x6d, 0xc5, + 0xf2, 0x61, 0xa1, 0x3c, 0xa3, 0x93, 0xc1, 0x83, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, + 0x78, 0x24, 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x81, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, + 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8f, 0x47, 0x72, 0x0c, 0x0d, 0x8f, 0xe5, + 0x18, 0x26, 0x3c, 0x96, 0x63, 0xd8, 0xf0, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 0x55, 0x63, 0x40, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xed, 0x3d, 0x95, 0x3b, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto b/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto new file mode 100644 index 000000000..8e380c296 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package typedeclall; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.typedecl_all) = false; + +message Dropped { + string name = 1; + int32 age = 2; +} + +message DroppedWithoutGetters { + option (gogoproto.goproto_getters) = false; + int64 height = 1; + int64 width = 2; +} + +message Kept { + option (gogoproto.typedecl) = true; + string name = 1; + int32 age = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go b/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go new file mode 100644 index 000000000..efd51948f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go @@ -0,0 +1,645 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedeclall.proto + +package typedeclall + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestDroppedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDropped(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Dropped{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedWithoutGettersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DroppedWithoutGetters{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKeptMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKeptProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKeptProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKept(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Kept{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedWithoutGettersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKeptJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKeptVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedWithoutGettersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKeptSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/typedeclimport/Makefile b/deps/github.com/gogo/protobuf/test/typedeclimport/Makefile new file mode 100644 index 000000000..d8a8e1f3f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedeclimport/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedeclimport.proto + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. ./subpkg/subpkg.proto \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/typedeclimport/models.go b/deps/github.com/gogo/protobuf/test/typedeclimport/models.go new file mode 100644 index 000000000..4044b91b6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedeclimport/models.go @@ -0,0 +1,7 @@ +package typedeclimport + +import subpkg "github.com/gogo/protobuf/test/typedeclimport/subpkg" + +type SomeMessage struct { + Imported subpkg.AnotherMessage +} diff --git a/deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.pb.go b/deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.pb.go new file mode 100644 index 000000000..27496204d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.pb.go @@ -0,0 +1,383 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: subpkg/subpkg.proto + +/* +Package subpkg is a generated protocol buffer package. + +It is generated from these files: + subpkg/subpkg.proto + +It has these top-level messages: + AnotherMessage +*/ +package subpkg + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type AnotherMessage struct { + Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` +} + +func (m *AnotherMessage) Reset() { *m = AnotherMessage{} } +func (m *AnotherMessage) String() string { return proto.CompactTextString(m) } +func (*AnotherMessage) ProtoMessage() {} +func (*AnotherMessage) Descriptor() ([]byte, []int) { return fileDescriptorSubpkg, []int{0} } + +func (m *AnotherMessage) GetFoo() string { + if m != nil { + return m.Foo + } + return "" +} + +func init() { + proto.RegisterType((*AnotherMessage)(nil), "subpkg.AnotherMessage") +} +func (this *AnotherMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherMessage) + if !ok { + that2, ok := that.(AnotherMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherMessage but is not nil && this == nil") + } + if this.Foo != that1.Foo { + return fmt.Errorf("Foo this(%v) Not Equal that(%v)", this.Foo, that1.Foo) + } + return nil +} +func (this *AnotherMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherMessage) + if !ok { + that2, ok := that.(AnotherMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Foo != that1.Foo { + return false + } + return true +} +func (m *AnotherMessage) 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 *AnotherMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Foo) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintSubpkg(dAtA, i, uint64(len(m.Foo))) + i += copy(dAtA[i:], m.Foo) + } + return i, nil +} + +func encodeFixed64Subpkg(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 encodeFixed32Subpkg(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 encodeVarintSubpkg(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 *AnotherMessage) Size() (n int) { + var l int + _ = l + l = len(m.Foo) + if l > 0 { + n += 1 + l + sovSubpkg(uint64(l)) + } + return n +} + +func sovSubpkg(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSubpkg(x uint64) (n int) { + return sovSubpkg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AnotherMessage) 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 ErrIntOverflowSubpkg + } + 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: AnotherMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubpkg + } + 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 ErrInvalidLengthSubpkg + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Foo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSubpkg(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSubpkg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSubpkg(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, ErrIntOverflowSubpkg + } + 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, ErrIntOverflowSubpkg + } + 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, ErrIntOverflowSubpkg + } + 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, ErrInvalidLengthSubpkg + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSubpkg + } + 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 := skipSubpkg(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 ( + ErrInvalidLengthSubpkg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSubpkg = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("subpkg/subpkg.proto", fileDescriptorSubpkg) } + +var fileDescriptorSubpkg = []byte{ + // 137 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x2e, 0x4d, 0x2a, + 0xc8, 0x4e, 0xd7, 0x87, 0x50, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x6c, 0x10, 0x9e, 0x94, + 0x6e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x7a, 0xbe, + 0x3e, 0x58, 0x3a, 0xa9, 0x34, 0x0d, 0xcc, 0x03, 0x73, 0xc0, 0x2c, 0x88, 0x36, 0x25, 0x25, 0x2e, + 0x3e, 0xc7, 0xbc, 0xfc, 0x92, 0x8c, 0xd4, 0x22, 0xdf, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x21, + 0x01, 0x2e, 0xe6, 0xb4, 0xfc, 0x7c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0xd3, 0x49, + 0xe4, 0xc1, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, + 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x24, 0x36, 0xb0, 0x01, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x37, 0x5d, 0xf6, 0x73, 0x8e, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto b/deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto new file mode 100644 index 000000000..2e20c9e7b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package subpkg; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; + +message AnotherMessage { + string foo = 1; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go b/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go new file mode 100644 index 000000000..a738d11ff --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go @@ -0,0 +1,384 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedeclimport.proto + +/* +Package typedeclimport is a generated protocol buffer package. + +It is generated from these files: + typedeclimport.proto + +It has these top-level messages: + SomeMessage +*/ +package typedeclimport + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import subpkg "github.com/gogo/protobuf/test/typedeclimport/subpkg" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *SomeMessage) Reset() { *m = SomeMessage{} } +func (m *SomeMessage) String() string { return proto.CompactTextString(m) } +func (*SomeMessage) ProtoMessage() {} +func (*SomeMessage) Descriptor() ([]byte, []int) { return fileDescriptorTypedeclimport, []int{0} } + +func (m *SomeMessage) GetImported() subpkg.AnotherMessage { + if m != nil { + return m.Imported + } + return subpkg.AnotherMessage{} +} + +func init() { + proto.RegisterType((*SomeMessage)(nil), "typedeclimport.SomeMessage") +} +func (this *SomeMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SomeMessage) + if !ok { + that2, ok := that.(SomeMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SomeMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SomeMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SomeMessage but is not nil && this == nil") + } + if !this.Imported.Equal(&that1.Imported) { + return fmt.Errorf("Imported this(%v) Not Equal that(%v)", this.Imported, that1.Imported) + } + return nil +} +func (this *SomeMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SomeMessage) + if !ok { + that2, ok := that.(SomeMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Imported.Equal(&that1.Imported) { + return false + } + return true +} +func (m *SomeMessage) 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 *SomeMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintTypedeclimport(dAtA, i, uint64(m.Imported.Size())) + n1, err := m.Imported.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + return i, nil +} + +func encodeFixed64Typedeclimport(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 encodeFixed32Typedeclimport(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 encodeVarintTypedeclimport(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 *SomeMessage) Size() (n int) { + var l int + _ = l + l = m.Imported.Size() + n += 1 + l + sovTypedeclimport(uint64(l)) + return n +} + +func sovTypedeclimport(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypedeclimport(x uint64) (n int) { + return sovTypedeclimport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SomeMessage) 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 ErrIntOverflowTypedeclimport + } + 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: SomeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SomeMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Imported", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclimport + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypedeclimport + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Imported.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypedeclimport(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclimport + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypedeclimport(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, ErrIntOverflowTypedeclimport + } + 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, ErrIntOverflowTypedeclimport + } + 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, ErrIntOverflowTypedeclimport + } + 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, ErrInvalidLengthTypedeclimport + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypedeclimport + } + 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 := skipTypedeclimport(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 ( + ErrInvalidLengthTypedeclimport = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypedeclimport = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("typedeclimport.proto", fileDescriptorTypedeclimport) } + +var fileDescriptorTypedeclimport = []byte{ + // 189 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0xa9, 0x2c, 0x48, + 0x4d, 0x49, 0x4d, 0xce, 0xc9, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0xe2, 0x43, 0x15, 0x95, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, + 0x0b, 0xa2, 0x5d, 0xca, 0x01, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x54, 0xc3, 0xf5, 0x8b, + 0x4b, 0x93, 0x0a, 0xb2, 0xd3, 0xa1, 0x14, 0xc4, 0x04, 0x25, 0x5f, 0x2e, 0xee, 0xe0, 0xfc, 0xdc, + 0x54, 0xdf, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x21, 0x0b, 0x2e, 0x0e, 0x88, 0xe2, 0xd4, 0x14, + 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x31, 0x3d, 0xa8, 0x7a, 0xc7, 0xbc, 0xfc, 0x92, 0x8c, + 0xd4, 0x22, 0xa8, 0x4a, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xe0, 0xaa, 0xad, 0x58, 0x3e, + 0x2c, 0x94, 0x67, 0x70, 0x12, 0x79, 0xf0, 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, + 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x89, 0x0d, 0x6c, 0x97, 0x31, + 0x20, 0x00, 0x00, 0xff, 0xff, 0x54, 0x23, 0xca, 0x44, 0x04, 0x01, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto b/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto new file mode 100644 index 000000000..8ab8dbf24 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package typedeclimport; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto"; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; + +message SomeMessage { + option (gogoproto.typedecl) = false; + subpkg.AnotherMessage imported = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go b/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go new file mode 100644 index 000000000..bea4cae73 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go @@ -0,0 +1,7 @@ +package typedeclimport + +import "testing" + +func Test(t *testing.T) { + // No need to do anything, if this test runs, it means it works +} diff --git a/deps/github.com/gogo/protobuf/test/types/Makefile b/deps/github.com/gogo/protobuf/test/types/Makefile new file mode 100644 index 000000000..7f489b367 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/Makefile @@ -0,0 +1,39 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --version="3.0.0" --gogo_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \ + --proto_path=../../../../../:../../protobuf/:. types.proto + find combos -type d -not -name combos -exec cp types_test.go.in {}/types_test.go \; diff --git a/deps/github.com/gogo/protobuf/test/types/combos/both/types.pb.go b/deps/github.com/gogo/protobuf/test/types/combos/both/types.pb.go new file mode 100644 index 000000000..daecdb21a --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/both/types.pb.go @@ -0,0 +1,6222 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return m.Size() +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return m.Size() +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return m.Size() +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return m.Size() +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_d941a2fa3776b329, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (m *KnownTypes) 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 *KnownTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Dur != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dur.Size())) + n1, err := m.Dur.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Ts != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Ts.Size())) + n2, err := m.Ts.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Dbl != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dbl.Size())) + n3, err := m.Dbl.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.Flt != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Flt.Size())) + n4, err := m.Flt.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.I64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I64.Size())) + n5, err := m.I64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.U64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U64.Size())) + n6, err := m.U64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.I32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I32.Size())) + n7, err := m.I32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.U32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U32.Size())) + n8, err := m.U32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.Bool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bool.Size())) + n9, err := m.Bool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.Str != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Str.Size())) + n10, err := m.Str.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Bytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bytes.Size())) + n11, err := m.Bytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProtoTypes) 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 *ProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableTimestamp.Size())) + n12, err := m.NullableTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableDuration.Size())) + n13, err := m.NullableDuration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n14, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n15, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *StdTypes) 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 *StdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp))) + n16, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.NullableTimestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration))) + n17, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.NullableDuration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n18, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration))) + n19, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, 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 *RepProtoTypes) 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 *RepProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(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 *RepStdTypes) 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 *RepStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(msg, 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 *MapProtoTypes) 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 *MapProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n20, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n21, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n22, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n23, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MapStdTypes) 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 *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*v))) + n24, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)))) + n25, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*v))) + n26, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)))) + n27, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes) 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 *OneofProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfProtoTimes != nil { + nn28, err := m.OneOfProtoTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn28 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n29, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + } + return i, nil +} +func (m *OneofProtoTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n30, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + } + return i, nil +} +func (m *OneofStdTypes) 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 *OneofStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfStdTimes != nil { + nn31, err := m.OneOfStdTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn31 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofStdTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp))) + n32, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + return i, nil +} +func (m *OneofStdTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration))) + n33, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Duration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + } + return i, nil +} +func encodeVarintTypes(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 NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + v3 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v3 + v4 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v5) + for i := 0; i < v5; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v6) + for i := 0; i < v6; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v7) + for i := 0; i < v7; i++ { + v8 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v8 + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(5) + this.Durations = make([]types.Duration, v9) + for i := 0; i < v9; i++ { + v10 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v10 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v11 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v11) + for i := 0; i < v11; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v12) + for i := 0; i < v12; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(5) + this.Timestamps = make([]time.Time, v13) + for i := 0; i < v13; i++ { + v14 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v14 + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(5) + this.Durations = make([]time.Duration, v15) + for i := 0; i < v15; i++ { + v16 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v16 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v17; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v18; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v19; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v20; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v21; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v22; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v23; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v24; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v25 := r.Intn(100) + tmps := make([]rune, v25) + for i := 0; i < v25; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v26 := r.Int63() + if r.Intn(2) == 0 { + v26 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *KnownTypes) 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 ErrIntOverflowTypes + } + 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: KnownTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KnownTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dur", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dur == nil { + m.Dur = &types.Duration{} + } + if err := m.Dur.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ts == nil { + m.Ts = &types.Timestamp{} + } + if err := m.Ts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dbl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dbl == nil { + m.Dbl = &types.DoubleValue{} + } + if err := m.Dbl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Flt == nil { + m.Flt = &types.FloatValue{} + } + if err := m.Flt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I64 == nil { + m.I64 = &types.Int64Value{} + } + if err := m.I64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U64 == nil { + m.U64 = &types.UInt64Value{} + } + if err := m.U64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I32 == nil { + m.I32 = &types.Int32Value{} + } + if err := m.I32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U32 == nil { + m.U32 = &types.UInt32Value{} + } + if err := m.U32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bool == nil { + m.Bool = &types.BoolValue{} + } + if err := m.Bool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Str == nil { + m.Str = &types.StringValue{} + } + if err := m.Str.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bytes == nil { + m.Bytes = &types.BytesValue{} + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ProtoTypes) 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 ErrIntOverflowTypes + } + 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: ProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = &types.Timestamp{} + } + if err := m.NullableTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = &types.Duration{} + } + if err := m.NullableDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *StdTypes) 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 ErrIntOverflowTypes + } + 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: StdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *RepProtoTypes) 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 ErrIntOverflowTypes + } + 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: RepProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, &types.Timestamp{}) + if err := m.NullableTimestamps[len(m.NullableTimestamps)-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 NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, &types.Duration{}) + if err := m.NullableDurations[len(m.NullableDurations)-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 Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, types.Timestamp{}) + if err := m.Timestamps[len(m.Timestamps)-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 Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, types.Duration{}) + if err := m.Durations[len(m.Durations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *RepStdTypes) 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 ErrIntOverflowTypes + } + 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: RepStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, new(time.Time)) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamps[len(m.NullableTimestamps)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, new(time.Duration)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDurations[len(m.NullableDurations)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, time.Time{}) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&(m.Timestamps[len(m.Timestamps)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, time.Duration(0)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&(m.Durations[len(m.Durations)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *MapProtoTypes) 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 ErrIntOverflowTypes + } + 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: MapProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*types.Timestamp) + } + var mapkey int32 + var mapvalue *types.Timestamp + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]types.Timestamp) + } + var mapkey int32 + mapvalue := &types.Timestamp{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*types.Duration) + } + var mapkey int32 + var mapvalue *types.Duration + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]types.Duration) + } + var mapkey int32 + mapvalue := &types.Duration{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *MapStdTypes) 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 ErrIntOverflowTypes + } + 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: MapStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *OneofProtoTypes) 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 ErrIntOverflowTypes + } + 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: OneofProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Timestamp{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Duration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Duration{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *OneofStdTypes) 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 ErrIntOverflowTypes + } + 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: OneofStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Time) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Duration) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + 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 := skipTypes(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 ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/types.proto", fileDescriptor_types_d941a2fa3776b329) } + +var fileDescriptor_types_d941a2fa3776b329 = []byte{ + // 923 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x8f, 0xdb, 0x44, + 0x1c, 0xdd, 0xb1, 0x9d, 0xb2, 0xfb, 0x5b, 0x2d, 0x6d, 0x2d, 0x01, 0x26, 0x20, 0x67, 0x09, 0x97, + 0xa5, 0x55, 0x1d, 0x48, 0xa2, 0x80, 0x16, 0x15, 0x8a, 0xb5, 0x6d, 0xb7, 0x54, 0xdb, 0xad, 0xd2, + 0xb2, 0x02, 0x24, 0x10, 0x76, 0xe3, 0xa4, 0x11, 0x8e, 0x27, 0xb2, 0xc7, 0x54, 0xb9, 0xf1, 0x11, + 0x38, 0x82, 0xb8, 0xd0, 0x1b, 0x12, 0xdc, 0xe1, 0xc8, 0x05, 0xa9, 0x37, 0xf8, 0x04, 0xd0, 0x86, + 0x0b, 0x1f, 0xa1, 0x47, 0x34, 0xe3, 0xf1, 0xbf, 0x78, 0xec, 0x90, 0x48, 0x2b, 0x2e, 0xdc, 0xd6, + 0xeb, 0xf7, 0x9e, 0x9f, 0x9f, 0xdf, 0xef, 0x37, 0x81, 0x17, 0xee, 0xe1, 0x89, 0x8d, 0x83, 0x96, + 0x8d, 0xc9, 0xfd, 0x16, 0x99, 0x4d, 0x9d, 0xc0, 0x98, 0xfa, 0x98, 0x60, 0xb5, 0xc6, 0x2e, 0xea, + 0x97, 0x46, 0x63, 0x72, 0x3f, 0xb4, 0x8d, 0x7b, 0x78, 0xd2, 0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a2, 0x9a, 0xe6, 0xde, 0xe3, 0x27, 0x3a, 0x7a, 0xfa, 0x44, 0x47, 0xdf, 0xcf, 0x75, 0xf4, + 0xf3, 0x5c, 0x47, 0xbf, 0xcc, 0x75, 0xf4, 0x68, 0xae, 0xa3, 0xdf, 0xe7, 0x3a, 0x7a, 0x3c, 0xd7, + 0xd1, 0xd3, 0xb9, 0xbe, 0xf1, 0xe5, 0x5f, 0xfa, 0x86, 0x7d, 0x86, 0xe9, 0x77, 0xfe, 0x09, 0x00, + 0x00, 0xff, 0xff, 0x48, 0x89, 0xae, 0xdb, 0x94, 0x0e, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/both/types.proto b/deps/github.com/gogo/protobuf/test/types/combos/both/types.proto new file mode 100644 index 000000000..6c0377763 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/both/types.proto @@ -0,0 +1,131 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/types/combos/both/types_test.go b/deps/github.com/gogo/protobuf/test/types/combos/both/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/both/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go b/deps/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go new file mode 100644 index 000000000..3f23ff65f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go @@ -0,0 +1,1966 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKnownTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go new file mode 100644 index 000000000..f0408acb9 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go @@ -0,0 +1,3774 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KnownTypes.Unmarshal(m, b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return m.Size() +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoTypes.Unmarshal(m, b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StdTypes.Unmarshal(m, b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return m.Size() +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepProtoTypes.Unmarshal(m, b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepStdTypes.Unmarshal(m, b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return m.Size() +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapProtoTypes.Unmarshal(m, b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapStdTypes.Unmarshal(m, b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return m.Size() +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofProtoTypes.Unmarshal(m, b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_f8a2648e6b1ebf0f, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofStdTypes.Unmarshal(m, b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (m *KnownTypes) 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 *KnownTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Dur != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dur.Size())) + n1, err := m.Dur.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Ts != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Ts.Size())) + n2, err := m.Ts.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Dbl != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dbl.Size())) + n3, err := m.Dbl.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.Flt != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Flt.Size())) + n4, err := m.Flt.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.I64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I64.Size())) + n5, err := m.I64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.U64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U64.Size())) + n6, err := m.U64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.I32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I32.Size())) + n7, err := m.I32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.U32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U32.Size())) + n8, err := m.U32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.Bool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bool.Size())) + n9, err := m.Bool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.Str != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Str.Size())) + n10, err := m.Str.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Bytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bytes.Size())) + n11, err := m.Bytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProtoTypes) 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 *ProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableTimestamp.Size())) + n12, err := m.NullableTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableDuration.Size())) + n13, err := m.NullableDuration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n14, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n15, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *StdTypes) 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 *StdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp))) + n16, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.NullableTimestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration))) + n17, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.NullableDuration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n18, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration))) + n19, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, 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 *RepProtoTypes) 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 *RepProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(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 *RepStdTypes) 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 *RepStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(msg, 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 *MapProtoTypes) 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 *MapProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n20, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n21, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n22, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n23, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MapStdTypes) 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 *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*v))) + n24, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)))) + n25, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*v))) + n26, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)))) + n27, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes) 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 *OneofProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfProtoTimes != nil { + nn28, err := m.OneOfProtoTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn28 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n29, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + } + return i, nil +} +func (m *OneofProtoTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n30, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + } + return i, nil +} +func (m *OneofStdTypes) 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 *OneofStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfStdTimes != nil { + nn31, err := m.OneOfStdTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn31 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofStdTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp))) + n32, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + return i, nil +} +func (m *OneofStdTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration))) + n33, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Duration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + } + return i, nil +} +func encodeVarintTypes(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 NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + v3 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v3 + v4 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v5) + for i := 0; i < v5; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v6) + for i := 0; i < v6; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v7) + for i := 0; i < v7; i++ { + v8 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v8 + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(5) + this.Durations = make([]types.Duration, v9) + for i := 0; i < v9; i++ { + v10 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v10 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v11 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v11) + for i := 0; i < v11; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v12) + for i := 0; i < v12; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(5) + this.Timestamps = make([]time.Time, v13) + for i := 0; i < v13; i++ { + v14 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v14 + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(5) + this.Durations = make([]time.Duration, v15) + for i := 0; i < v15; i++ { + v16 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v16 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v17; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v18; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v19; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v20; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v21; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v22; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v23; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v24; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v25 := r.Intn(100) + tmps := make([]rune, v25) + for i := 0; i < v25; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v26 := r.Int63() + if r.Intn(2) == 0 { + v26 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("combos/marshaler/types.proto", fileDescriptor_types_f8a2648e6b1ebf0f) } + +var fileDescriptor_types_f8a2648e6b1ebf0f = []byte{ + // 927 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0xdb, 0x54, + 0x18, 0x8d, 0x7f, 0x52, 0x32, 0x5f, 0x14, 0xda, 0x5a, 0x02, 0x99, 0x50, 0x39, 0x43, 0xd8, 0x0c, + 0xad, 0xea, 0x40, 0x12, 0x05, 0x34, 0xa8, 0x50, 0xac, 0x69, 0x3b, 0xa5, 0x9a, 0x4e, 0x95, 0x96, + 0x11, 0x20, 0x81, 0xb0, 0x1b, 0x27, 0x8d, 0x70, 0x7c, 0x23, 0xfb, 0x9a, 0x2a, 0x3b, 0x1e, 0x81, + 0x25, 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 0xcb, 0xd1, 0xcc, 0x6a, 0x71, 0x4e, 0xa3, 0xff, 0x1b, 0xfd, 0x1f, + 0x34, 0xfa, 0x1b, 0x01, 0xce, 0x1e, 0xbb, 0x36, 0x1a, 0xa7, 0x76, 0xf3, 0x7e, 0xba, 0x76, 0x6b, + 0x7f, 0x2f, 0x1d, 0x66, 0x76, 0xe6, 0x9b, 0xa9, 0x2e, 0xac, 0xf3, 0x71, 0x98, 0x5a, 0x67, 0xc6, + 0x79, 0xea, 0xe3, 0x98, 0xf9, 0x20, 0x7a, 0xed, 0x47, 0x02, 0x34, 0xa8, 0xb7, 0x78, 0xde, 0xae, + 0x6e, 0xe4, 0x2c, 0x1c, 0xac, 0xac, 0xbf, 0x2b, 0x1b, 0xf8, 0x0b, 0x0b, 0x9f, 0x71, 0x79, 0x96, + 0x3a, 0x3a, 0xa6, 0x8e, 0x88, 0xa6, 0xb1, 0xf7, 0xe4, 0xa9, 0x26, 0x3c, 0x7b, 0xaa, 0x09, 0xdf, + 0x2f, 0x35, 0xe1, 0xe7, 0xa5, 0x26, 0xfc, 0xb2, 0xd4, 0x84, 0xc7, 0x4b, 0x4d, 0xf8, 0x7d, 0xa9, + 0x55, 0x9e, 0x2c, 0x35, 0xe1, 0xd9, 0x52, 0xab, 0x7c, 0xf9, 0x97, 0x56, 0xb1, 0xce, 0x50, 0xfd, + 0xde, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x8a, 0x72, 0x25, 0x99, 0x0e, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto new file mode 100644 index 000000000..05cb95567 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto @@ -0,0 +1,131 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go new file mode 100644 index 000000000..ab6bbb52c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go @@ -0,0 +1,1966 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKnownTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go b/deps/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go new file mode 100644 index 000000000..b0ef5cbc4 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go @@ -0,0 +1,2937 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KnownTypes.Unmarshal(m, b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return xxx_messageInfo_KnownTypes.Size(m) +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoTypes.Unmarshal(m, b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return xxx_messageInfo_ProtoTypes.Size(m) +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StdTypes.Unmarshal(m, b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return xxx_messageInfo_StdTypes.Size(m) +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepProtoTypes.Unmarshal(m, b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return xxx_messageInfo_RepProtoTypes.Size(m) +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepStdTypes.Unmarshal(m, b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return xxx_messageInfo_RepStdTypes.Size(m) +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapProtoTypes.Unmarshal(m, b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return xxx_messageInfo_MapProtoTypes.Size(m) +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapStdTypes.Unmarshal(m, b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return xxx_messageInfo_MapStdTypes.Size(m) +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofProtoTypes.Unmarshal(m, b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return xxx_messageInfo_OneofProtoTypes.Size(m) +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_c5bf548d49a2d5e3, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofStdTypes.Unmarshal(m, b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return xxx_messageInfo_OneofStdTypes.Size(m) +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + v3 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v3 + v4 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v5) + for i := 0; i < v5; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v6) + for i := 0; i < v6; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v7) + for i := 0; i < v7; i++ { + v8 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v8 + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(5) + this.Durations = make([]types.Duration, v9) + for i := 0; i < v9; i++ { + v10 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v10 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v11 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v11) + for i := 0; i < v11; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v12) + for i := 0; i < v12; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(5) + this.Timestamps = make([]time.Time, v13) + for i := 0; i < v13; i++ { + v14 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v14 + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(5) + this.Durations = make([]time.Duration, v15) + for i := 0; i < v15; i++ { + v16 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v16 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v17; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v18; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v19; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v20; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v21; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v22; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v23; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v24; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v25 := r.Intn(100) + tmps := make([]rune, v25) + for i := 0; i < v25; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v26 := r.Int63() + if r.Intn(2) == 0 { + v26 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("combos/neither/types.proto", fileDescriptor_types_c5bf548d49a2d5e3) } + +var fileDescriptor_types_c5bf548d49a2d5e3 = []byte{ + // 925 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0xdb, 0x54, + 0x18, 0x8d, 0x7f, 0x52, 0x32, 0x5f, 0x14, 0xda, 0x5a, 0x02, 0x99, 0x80, 0x9c, 0x21, 0x6c, 0x86, + 0x56, 0x75, 0x20, 0x89, 0x02, 0x1a, 0x54, 0x28, 0xd6, 0xb4, 0x9d, 0x52, 0x4d, 0xa7, 0x4a, 0xcb, + 0x08, 0x90, 0x40, 0xd8, 0x8d, 0x93, 0x46, 0x38, 0xbe, 0x91, 0x7d, 0x4d, 0x95, 0x1d, 0x8f, 0xc0, + 0x12, 0xc4, 0x86, 0xee, 0x90, 0x60, 0x0f, 0x4b, 0x36, 0x48, 0xdd, 0xc1, 0x13, 0x40, 0x1b, 0x36, + 0x3c, 0x42, 0x97, 0xe8, 0x5e, 0x5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d6, 0xfe, 0x5e, + 0x3a, 0xcc, 0xec, 0xcc, 0xb7, 0x52, 0x5d, 0x58, 0xe7, 0xe3, 0x30, 0xb5, 0xce, 0x8c, 0xf3, 0xd4, + 0xc7, 0x31, 0xf3, 0x41, 0xf4, 0xda, 0x0f, 0x05, 0x68, 0x50, 0x6f, 0xf1, 0xbc, 0x5d, 0xd9, 0xc8, + 0x59, 0x38, 0x58, 0x59, 0x7f, 0x97, 0x37, 0xf0, 0x17, 0x16, 0x3e, 0xe3, 0xf2, 0x2c, 0x75, 0x74, + 0x4c, 0x1d, 0x11, 0x4d, 0x63, 0xef, 0xf1, 0x13, 0x4d, 0x78, 0xfa, 0x44, 0x13, 0x7e, 0x58, 0x6a, + 0xc2, 0x2f, 0x4b, 0x4d, 0xf8, 0x75, 0xa9, 0x09, 0x8f, 0x96, 0x5a, 0xe5, 0x8f, 0xa5, 0x56, 0x79, + 0xbc, 0xd4, 0x84, 0xa7, 0x4b, 0xad, 0xf2, 0xd5, 0xdf, 0x5a, 0xc5, 0x3a, 0x43, 0xf5, 0x7b, 0xff, + 0x06, 0x00, 0x00, 0xff, 0xff, 0x72, 0x11, 0x02, 0x8e, 0x97, 0x0e, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/neither/types.proto b/deps/github.com/gogo/protobuf/test/types/combos/neither/types.proto new file mode 100644 index 000000000..3c26fae20 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/neither/types.proto @@ -0,0 +1,131 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/types/combos/neither/types_test.go b/deps/github.com/gogo/protobuf/test/types/combos/neither/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/neither/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go b/deps/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go new file mode 100644 index 000000000..2a282c784 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go @@ -0,0 +1,1714 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go new file mode 100644 index 000000000..60611008c --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go @@ -0,0 +1,5387 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return xxx_messageInfo_KnownTypes.Size(m) +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return xxx_messageInfo_ProtoTypes.Size(m) +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return xxx_messageInfo_StdTypes.Size(m) +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return xxx_messageInfo_RepProtoTypes.Size(m) +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return xxx_messageInfo_RepStdTypes.Size(m) +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return xxx_messageInfo_MapProtoTypes.Size(m) +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return xxx_messageInfo_MapStdTypes.Size(m) +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return xxx_messageInfo_OneofProtoTypes.Size(m) +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_cfade28d66c5afd2, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return xxx_messageInfo_OneofStdTypes.Size(m) +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + v3 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v3 + v4 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v5) + for i := 0; i < v5; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v6) + for i := 0; i < v6; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v7) + for i := 0; i < v7; i++ { + v8 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v8 + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(5) + this.Durations = make([]types.Duration, v9) + for i := 0; i < v9; i++ { + v10 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v10 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v11 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v11) + for i := 0; i < v11; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v12) + for i := 0; i < v12; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(5) + this.Timestamps = make([]time.Time, v13) + for i := 0; i < v13; i++ { + v14 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v14 + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(5) + this.Durations = make([]time.Duration, v15) + for i := 0; i < v15; i++ { + v16 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v16 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v17; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v18; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v19; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v20; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v21; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v22; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v23; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v24; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 5) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 3) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v25 := r.Intn(100) + tmps := make([]rune, v25) + for i := 0; i < v25; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v26 := r.Int63() + if r.Intn(2) == 0 { + v26 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *KnownTypes) 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 ErrIntOverflowTypes + } + 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: KnownTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KnownTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dur", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dur == nil { + m.Dur = &types.Duration{} + } + if err := m.Dur.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ts == nil { + m.Ts = &types.Timestamp{} + } + if err := m.Ts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dbl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dbl == nil { + m.Dbl = &types.DoubleValue{} + } + if err := m.Dbl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Flt == nil { + m.Flt = &types.FloatValue{} + } + if err := m.Flt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I64 == nil { + m.I64 = &types.Int64Value{} + } + if err := m.I64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U64 == nil { + m.U64 = &types.UInt64Value{} + } + if err := m.U64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I32 == nil { + m.I32 = &types.Int32Value{} + } + if err := m.I32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U32 == nil { + m.U32 = &types.UInt32Value{} + } + if err := m.U32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bool == nil { + m.Bool = &types.BoolValue{} + } + if err := m.Bool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Str == nil { + m.Str = &types.StringValue{} + } + if err := m.Str.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bytes == nil { + m.Bytes = &types.BytesValue{} + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *ProtoTypes) 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 ErrIntOverflowTypes + } + 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: ProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = &types.Timestamp{} + } + if err := m.NullableTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = &types.Duration{} + } + if err := m.NullableDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *StdTypes) 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 ErrIntOverflowTypes + } + 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: StdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *RepProtoTypes) 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 ErrIntOverflowTypes + } + 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: RepProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, &types.Timestamp{}) + if err := m.NullableTimestamps[len(m.NullableTimestamps)-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 NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, &types.Duration{}) + if err := m.NullableDurations[len(m.NullableDurations)-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 Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, types.Timestamp{}) + if err := m.Timestamps[len(m.Timestamps)-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 Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, types.Duration{}) + if err := m.Durations[len(m.Durations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *RepStdTypes) 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 ErrIntOverflowTypes + } + 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: RepStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, new(time.Time)) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamps[len(m.NullableTimestamps)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, new(time.Duration)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDurations[len(m.NullableDurations)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, time.Time{}) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&(m.Timestamps[len(m.Timestamps)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, time.Duration(0)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&(m.Durations[len(m.Durations)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *MapProtoTypes) 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 ErrIntOverflowTypes + } + 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: MapProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*types.Timestamp) + } + var mapkey int32 + var mapvalue *types.Timestamp + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]types.Timestamp) + } + var mapkey int32 + mapvalue := &types.Timestamp{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*types.Duration) + } + var mapkey int32 + var mapvalue *types.Duration + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]types.Duration) + } + var mapkey int32 + mapvalue := &types.Duration{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *MapStdTypes) 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 ErrIntOverflowTypes + } + 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: MapStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *OneofProtoTypes) 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 ErrIntOverflowTypes + } + 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: OneofProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Timestamp{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Duration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Duration{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 *OneofStdTypes) 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 ErrIntOverflowTypes + } + 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: OneofStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Time) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Duration) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + 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 skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + 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 := skipTypes(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 ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/types.proto", fileDescriptor_types_cfade28d66c5afd2) +} + +var fileDescriptor_types_cfade28d66c5afd2 = []byte{ + // 928 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0xdb, 0x54, + 0x18, 0x8d, 0x7f, 0x52, 0x32, 0x5f, 0x14, 0xda, 0x5a, 0x02, 0x99, 0x80, 0x9c, 0x21, 0x6c, 0x86, + 0x56, 0x75, 0x20, 0x89, 0x02, 0x1a, 0x54, 0x28, 0xd6, 0xb4, 0x9d, 0x52, 0x4d, 0xa7, 0x4a, 0xcb, + 0x08, 0x90, 0x40, 0xd8, 0x8d, 0x93, 0x46, 0x38, 0xbe, 0x91, 0x7d, 0x4d, 0x95, 0x1d, 0x8f, 0xc0, + 0x12, 0xc4, 0x86, 0xee, 0x90, 0x60, 0x0f, 0x4b, 0x36, 0x48, 0xdd, 0xc1, 0x13, 0x40, 0x1b, 0x36, + 0x3c, 0x42, 0x97, 0xe8, 0x5e, 0x5f, 0xff, 0xc5, 0xd7, 0x0e, 0x89, 0x34, 0x62, 0xd3, 0xdd, 0x78, + 0x7c, 0xce, 0xf1, 0xf1, 0xf1, 0xf9, 0xbe, 0x1b, 0xd0, 0xee, 0xa1, 0x99, 0x85, 0xfc, 0x4e, 0xe0, + 0xce, 0x4c, 0xcf, 0xbf, 0x6f, 0x3a, 0xb6, 0xd7, 0xc1, 0x8b, 0xb9, 0xed, 0xeb, 0x73, 0x0f, 0x61, + 0xa4, 0x54, 0xe9, 0x45, 0xf3, 0xd2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xe3, 0xf2, + 0x2c, 0x75, 0x74, 0x4c, 0x1d, 0x11, 0x4d, 0x63, 0xef, 0xf1, 0x13, 0x4d, 0x78, 0xfa, 0x44, 0x13, + 0x7e, 0x58, 0x6a, 0xc2, 0x2f, 0x4b, 0x4d, 0xf8, 0x75, 0xa9, 0x09, 0x8f, 0x96, 0x5a, 0xe5, 0x8f, + 0xa5, 0x26, 0x3c, 0x5e, 0x6a, 0xc2, 0xd3, 0xa5, 0x56, 0xf9, 0xea, 0x6f, 0xad, 0x62, 0x9d, 0xa1, + 0xfa, 0xbd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xea, 0x00, 0x6a, 0x9b, 0x0e, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto new file mode 100644 index 000000000..0fd0bb6a8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto @@ -0,0 +1,131 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go new file mode 100644 index 000000000..3ac8d8fa8 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go @@ -0,0 +1,1714 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/types/types.proto b/deps/github.com/gogo/protobuf/test/types/types.proto new file mode 100644 index 000000000..3c26fae20 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/types.proto @@ -0,0 +1,131 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/types/types_test.go.in b/deps/github.com/gogo/protobuf/test/types/types_test.go.in new file mode 100644 index 000000000..fcb0974e0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/types/types_test.go.in @@ -0,0 +1,243 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "testing" + "time" + math_rand "math/rand" + + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/jsonpb" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/deps/github.com/gogo/protobuf/test/unmarshalmerge/Makefile b/deps/github.com/gogo/protobuf/test/unmarshalmerge/Makefile new file mode 100644 index 000000000..e9fa8934d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unmarshalmerge/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unmarshalmerge.proto) diff --git a/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go new file mode 100644 index 000000000..14663633d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go @@ -0,0 +1,1596 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unmarshalmerge.proto + +package unmarshalmerge + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Big struct { + Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"` + Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Big) Reset() { *m = Big{} } +func (*Big) ProtoMessage() {} +func (*Big) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{0} +} +func (m *Big) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Big) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Big.Marshal(b, m, deterministic) +} +func (dst *Big) XXX_Merge(src proto.Message) { + xxx_messageInfo_Big.Merge(dst, src) +} +func (m *Big) XXX_Size() int { + return xxx_messageInfo_Big.Size(m) +} +func (m *Big) XXX_DiscardUnknown() { + xxx_messageInfo_Big.DiscardUnknown(m) +} + +var xxx_messageInfo_Big proto.InternalMessageInfo + +func (m *Big) GetSub() *Sub { + if m != nil { + return m.Sub + } + return nil +} + +func (m *Big) GetNumber() int64 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +type BigUnsafe struct { + Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"` + Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BigUnsafe) Reset() { *m = BigUnsafe{} } +func (*BigUnsafe) ProtoMessage() {} +func (*BigUnsafe) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{1} +} +func (m *BigUnsafe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BigUnsafe.Unmarshal(m, b) +} +func (m *BigUnsafe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BigUnsafe.Marshal(b, m, deterministic) +} +func (dst *BigUnsafe) XXX_Merge(src proto.Message) { + xxx_messageInfo_BigUnsafe.Merge(dst, src) +} +func (m *BigUnsafe) XXX_Size() int { + return xxx_messageInfo_BigUnsafe.Size(m) +} +func (m *BigUnsafe) XXX_DiscardUnknown() { + xxx_messageInfo_BigUnsafe.DiscardUnknown(m) +} + +var xxx_messageInfo_BigUnsafe proto.InternalMessageInfo + +func (m *BigUnsafe) GetSub() *Sub { + if m != nil { + return m.Sub + } + return nil +} + +func (m *BigUnsafe) GetNumber() int64 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +type Sub struct { + SubNumber *int64 `protobuf:"varint,1,opt,name=SubNumber" json:"SubNumber,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Sub) Reset() { *m = Sub{} } +func (*Sub) ProtoMessage() {} +func (*Sub) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{2} +} +func (m *Sub) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Sub.Marshal(b, m, deterministic) +} +func (dst *Sub) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sub.Merge(dst, src) +} +func (m *Sub) XXX_Size() int { + return xxx_messageInfo_Sub.Size(m) +} +func (m *Sub) XXX_DiscardUnknown() { + xxx_messageInfo_Sub.DiscardUnknown(m) +} + +var xxx_messageInfo_Sub proto.InternalMessageInfo + +func (m *Sub) GetSubNumber() int64 { + if m != nil && m.SubNumber != nil { + return *m.SubNumber + } + return 0 +} + +type IntMerge struct { + Int64 int64 `protobuf:"varint,1,req,name=Int64" json:"Int64"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32" json:"Int32"` + Sint32 int32 `protobuf:"zigzag32,3,req,name=Sint32" json:"Sint32"` + Sint64 int64 `protobuf:"zigzag64,4,opt,name=Sint64" json:"Sint64"` + Uint64 uint64 `protobuf:"varint,5,opt,name=Uint64" json:"Uint64"` + Uint32 uint32 `protobuf:"varint,6,req,name=Uint32" json:"Uint32"` + Fixed64 uint64 `protobuf:"fixed64,7,opt,name=Fixed64" json:"Fixed64"` + Fixed32 uint32 `protobuf:"fixed32,8,opt,name=Fixed32" json:"Fixed32"` + Sfixed32 int32 `protobuf:"fixed32,9,req,name=Sfixed32" json:"Sfixed32"` + Sfixed64 int64 `protobuf:"fixed64,10,opt,name=Sfixed64" json:"Sfixed64"` + Bool bool `protobuf:"varint,11,opt,name=Bool" json:"Bool"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IntMerge) Reset() { *m = IntMerge{} } +func (*IntMerge) ProtoMessage() {} +func (*IntMerge) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{3} +} +func (m *IntMerge) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IntMerge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IntMerge.Marshal(b, m, deterministic) +} +func (dst *IntMerge) XXX_Merge(src proto.Message) { + xxx_messageInfo_IntMerge.Merge(dst, src) +} +func (m *IntMerge) XXX_Size() int { + return xxx_messageInfo_IntMerge.Size(m) +} +func (m *IntMerge) XXX_DiscardUnknown() { + xxx_messageInfo_IntMerge.DiscardUnknown(m) +} + +var xxx_messageInfo_IntMerge proto.InternalMessageInfo + +func (m *IntMerge) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *IntMerge) GetInt32() int32 { + if m != nil { + return m.Int32 + } + return 0 +} + +func (m *IntMerge) GetSint32() int32 { + if m != nil { + return m.Sint32 + } + return 0 +} + +func (m *IntMerge) GetSint64() int64 { + if m != nil { + return m.Sint64 + } + return 0 +} + +func (m *IntMerge) GetUint64() uint64 { + if m != nil { + return m.Uint64 + } + return 0 +} + +func (m *IntMerge) GetUint32() uint32 { + if m != nil { + return m.Uint32 + } + return 0 +} + +func (m *IntMerge) GetFixed64() uint64 { + if m != nil { + return m.Fixed64 + } + return 0 +} + +func (m *IntMerge) GetFixed32() uint32 { + if m != nil { + return m.Fixed32 + } + return 0 +} + +func (m *IntMerge) GetSfixed32() int32 { + if m != nil { + return m.Sfixed32 + } + return 0 +} + +func (m *IntMerge) GetSfixed64() int64 { + if m != nil { + return m.Sfixed64 + } + return 0 +} + +func (m *IntMerge) GetBool() bool { + if m != nil { + return m.Bool + } + return false +} + +func init() { + proto.RegisterType((*Big)(nil), "unmarshalmerge.Big") + proto.RegisterType((*BigUnsafe)(nil), "unmarshalmerge.BigUnsafe") + proto.RegisterType((*Sub)(nil), "unmarshalmerge.Sub") + proto.RegisterType((*IntMerge)(nil), "unmarshalmerge.IntMerge") +} +func (this *Big) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Big) + if !ok { + that2, ok := that.(Big) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Big") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Big but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Big but is not nil && this == nil") + } + if !this.Sub.Equal(that1.Sub) { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) + } + } else if this.Number != nil { + return fmt.Errorf("this.Number == nil && that.Number != nil") + } else if that1.Number != nil { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Big) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Big) + if !ok { + that2, ok := that.(Big) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Sub.Equal(that1.Sub) { + return false + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return false + } + } else if this.Number != nil { + return false + } else if that1.Number != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BigUnsafe) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*BigUnsafe) + if !ok { + that2, ok := that.(BigUnsafe) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *BigUnsafe") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *BigUnsafe but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *BigUnsafe but is not nil && this == nil") + } + if !this.Sub.Equal(that1.Sub) { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) + } + } else if this.Number != nil { + return fmt.Errorf("this.Number == nil && that.Number != nil") + } else if that1.Number != nil { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *BigUnsafe) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BigUnsafe) + if !ok { + that2, ok := that.(BigUnsafe) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Sub.Equal(that1.Sub) { + return false + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return false + } + } else if this.Number != nil { + return false + } else if that1.Number != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Sub) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Sub) + if !ok { + that2, ok := that.(Sub) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Sub") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Sub but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Sub but is not nil && this == nil") + } + if this.SubNumber != nil && that1.SubNumber != nil { + if *this.SubNumber != *that1.SubNumber { + return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", *this.SubNumber, *that1.SubNumber) + } + } else if this.SubNumber != nil { + return fmt.Errorf("this.SubNumber == nil && that.SubNumber != nil") + } else if that1.SubNumber != nil { + return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", this.SubNumber, that1.SubNumber) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Sub) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Sub) + if !ok { + that2, ok := that.(Sub) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SubNumber != nil && that1.SubNumber != nil { + if *this.SubNumber != *that1.SubNumber { + return false + } + } else if this.SubNumber != nil { + return false + } else if that1.SubNumber != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *IntMerge) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*IntMerge) + if !ok { + that2, ok := that.(IntMerge) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *IntMerge") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *IntMerge but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *IntMerge but is not nil && this == nil") + } + if this.Int64 != that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.Sint32 != that1.Sint32 { + return fmt.Errorf("Sint32 this(%v) Not Equal that(%v)", this.Sint32, that1.Sint32) + } + if this.Sint64 != that1.Sint64 { + return fmt.Errorf("Sint64 this(%v) Not Equal that(%v)", this.Sint64, that1.Sint64) + } + if this.Uint64 != that1.Uint64 { + return fmt.Errorf("Uint64 this(%v) Not Equal that(%v)", this.Uint64, that1.Uint64) + } + if this.Uint32 != that1.Uint32 { + return fmt.Errorf("Uint32 this(%v) Not Equal that(%v)", this.Uint32, that1.Uint32) + } + if this.Fixed64 != that1.Fixed64 { + return fmt.Errorf("Fixed64 this(%v) Not Equal that(%v)", this.Fixed64, that1.Fixed64) + } + if this.Fixed32 != that1.Fixed32 { + return fmt.Errorf("Fixed32 this(%v) Not Equal that(%v)", this.Fixed32, that1.Fixed32) + } + if this.Sfixed32 != that1.Sfixed32 { + return fmt.Errorf("Sfixed32 this(%v) Not Equal that(%v)", this.Sfixed32, that1.Sfixed32) + } + if this.Sfixed64 != that1.Sfixed64 { + return fmt.Errorf("Sfixed64 this(%v) Not Equal that(%v)", this.Sfixed64, that1.Sfixed64) + } + if this.Bool != that1.Bool { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *IntMerge) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IntMerge) + if !ok { + that2, ok := that.(IntMerge) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != that1.Int64 { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.Sint32 != that1.Sint32 { + return false + } + if this.Sint64 != that1.Sint64 { + return false + } + if this.Uint64 != that1.Uint64 { + return false + } + if this.Uint32 != that1.Uint32 { + return false + } + if this.Fixed64 != that1.Fixed64 { + return false + } + if this.Fixed32 != that1.Fixed32 { + return false + } + if this.Sfixed32 != that1.Sfixed32 { + return false + } + if this.Sfixed64 != that1.Sfixed64 { + return false + } + if this.Bool != that1.Bool { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Big) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unmarshalmerge.Big{") + if this.Sub != nil { + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BigUnsafe) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unmarshalmerge.BigUnsafe{") + if this.Sub != nil { + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Sub) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unmarshalmerge.Sub{") + if this.SubNumber != nil { + s = append(s, "SubNumber: "+valueToGoStringUnmarshalmerge(this.SubNumber, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *IntMerge) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 15) + s = append(s, "&unmarshalmerge.IntMerge{") + s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + s = append(s, "Sint32: "+fmt.Sprintf("%#v", this.Sint32)+",\n") + s = append(s, "Sint64: "+fmt.Sprintf("%#v", this.Sint64)+",\n") + s = append(s, "Uint64: "+fmt.Sprintf("%#v", this.Uint64)+",\n") + s = append(s, "Uint32: "+fmt.Sprintf("%#v", this.Uint32)+",\n") + s = append(s, "Fixed64: "+fmt.Sprintf("%#v", this.Fixed64)+",\n") + s = append(s, "Fixed32: "+fmt.Sprintf("%#v", this.Fixed32)+",\n") + s = append(s, "Sfixed32: "+fmt.Sprintf("%#v", this.Sfixed32)+",\n") + s = append(s, "Sfixed64: "+fmt.Sprintf("%#v", this.Sfixed64)+",\n") + s = append(s, "Bool: "+fmt.Sprintf("%#v", this.Bool)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringUnmarshalmerge(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func NewPopulatedBig(r randyUnmarshalmerge, easy bool) *Big { + this := &Big{} + if r.Intn(10) != 0 { + this.Sub = NewPopulatedSub(r, easy) + } + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Number = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) + } + return this +} + +func NewPopulatedBigUnsafe(r randyUnmarshalmerge, easy bool) *BigUnsafe { + this := &BigUnsafe{} + if r.Intn(10) != 0 { + this.Sub = NewPopulatedSub(r, easy) + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Number = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) + } + return this +} + +func NewPopulatedSub(r randyUnmarshalmerge, easy bool) *Sub { + this := &Sub{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.SubNumber = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 2) + } + return this +} + +func NewPopulatedIntMerge(r randyUnmarshalmerge, easy bool) *IntMerge { + this := &IntMerge{} + this.Int64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64 *= -1 + } + this.Int32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + this.Sint32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32 *= -1 + } + this.Sint64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64 *= -1 + } + this.Uint64 = uint64(uint64(r.Uint32())) + this.Uint32 = uint32(r.Uint32()) + this.Fixed64 = uint64(uint64(r.Uint32())) + this.Fixed32 = uint32(r.Uint32()) + this.Sfixed32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32 *= -1 + } + this.Sfixed64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64 *= -1 + } + this.Bool = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 12) + } + return this +} + +type randyUnmarshalmerge interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnmarshalmerge(r randyUnmarshalmerge) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringUnmarshalmerge(r randyUnmarshalmerge) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneUnmarshalmerge(r) + } + return string(tmps) +} +func randUnrecognizedUnmarshalmerge(r randyUnmarshalmerge, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldUnmarshalmerge(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldUnmarshalmerge(dAtA []byte, r randyUnmarshalmerge, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateUnmarshalmerge(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (this *Big) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Big{`, + `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, + `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BigUnsafe) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BigUnsafe{`, + `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, + `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Sub) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Sub{`, + `SubNumber:` + valueToStringUnmarshalmerge(this.SubNumber) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *IntMerge) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IntMerge{`, + `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `Sint32:` + fmt.Sprintf("%v", this.Sint32) + `,`, + `Sint64:` + fmt.Sprintf("%v", this.Sint64) + `,`, + `Uint64:` + fmt.Sprintf("%v", this.Uint64) + `,`, + `Uint32:` + fmt.Sprintf("%v", this.Uint32) + `,`, + `Fixed64:` + fmt.Sprintf("%v", this.Fixed64) + `,`, + `Fixed32:` + fmt.Sprintf("%v", this.Fixed32) + `,`, + `Sfixed32:` + fmt.Sprintf("%v", this.Sfixed32) + `,`, + `Sfixed64:` + fmt.Sprintf("%v", this.Sfixed64) + `,`, + `Bool:` + fmt.Sprintf("%v", this.Bool) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnmarshalmerge(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Big) 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 ErrIntOverflowUnmarshalmerge + } + 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: Big: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Big: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnmarshalmerge + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sub == nil { + m.Sub = &Sub{} + } + if err := m.Sub.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Number = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + 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 *BigUnsafe) 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 ErrIntOverflowUnmarshalmerge + } + 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: BigUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BigUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnmarshalmerge + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sub == nil { + m.Sub = &Sub{} + } + if err := m.Sub.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Number = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + 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 *Sub) 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 ErrIntOverflowUnmarshalmerge + } + 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: Sub: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubNumber", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SubNumber = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + 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 *IntMerge) 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 ErrIntOverflowUnmarshalmerge + } + 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: IntMerge: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IntMerge: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Sint32 = v + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + 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) + m.Sint64 = int64(v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64", wireType) + } + m.Uint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uint64 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32", wireType) + } + m.Uint32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uint32 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000004) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64", wireType) + } + m.Fixed64 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Fixed64 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32", wireType) + } + m.Fixed32 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Fixed32 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32", wireType) + } + m.Sfixed32 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Sfixed32 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + hasFields[0] |= uint64(0x00000008) + case 10: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64", wireType) + } + m.Sfixed64 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Sfixed64 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bool = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + 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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sint32") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Uint32") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sfixed32") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnmarshalmerge(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, ErrIntOverflowUnmarshalmerge + } + 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, ErrIntOverflowUnmarshalmerge + } + 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, ErrIntOverflowUnmarshalmerge + } + 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, ErrInvalidLengthUnmarshalmerge + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnmarshalmerge + } + 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 := skipUnmarshalmerge(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 ( + ErrInvalidLengthUnmarshalmerge = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnmarshalmerge = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("unmarshalmerge.proto", fileDescriptor_unmarshalmerge_5567ee50c42503cc) +} + +var fileDescriptor_unmarshalmerge_5567ee50c42503cc = []byte{ + // 386 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd0, 0xcd, 0x8a, 0x9b, 0x50, + 0x14, 0x07, 0xf0, 0x1c, 0x35, 0xc6, 0xdc, 0xd0, 0xaf, 0xdb, 0x52, 0x2e, 0x21, 0xdc, 0x5c, 0x02, + 0x85, 0xdb, 0x45, 0x13, 0x50, 0x71, 0xd1, 0xa5, 0x8b, 0x42, 0x0a, 0x2d, 0x25, 0x92, 0x07, 0x88, + 0xad, 0x31, 0x42, 0xd4, 0x62, 0x14, 0xba, 0xec, 0x23, 0xf4, 0x15, 0xba, 0x9b, 0x47, 0x98, 0x65, + 0x96, 0xf3, 0x08, 0xb3, 0x0a, 0xa3, 0x4f, 0x30, 0xcb, 0x59, 0x0e, 0x5e, 0x6f, 0x3e, 0x9c, 0xed, + 0xec, 0x3c, 0xff, 0xdf, 0xdf, 0x73, 0xe0, 0xa2, 0x77, 0x45, 0x12, 0xaf, 0xb2, 0xdd, 0x66, 0xb5, + 0x8d, 0x83, 0x2c, 0x0c, 0xa6, 0xbf, 0xb3, 0x34, 0x4f, 0xf1, 0xcb, 0x76, 0x3a, 0xfc, 0x14, 0x46, + 0xf9, 0xa6, 0xf0, 0xa7, 0x3f, 0xd3, 0x78, 0x16, 0xa6, 0x61, 0x3a, 0x13, 0x35, 0xbf, 0x58, 0x8b, + 0x49, 0x0c, 0xe2, 0xab, 0xf9, 0x7d, 0xf2, 0x15, 0xa9, 0x6e, 0x14, 0xe2, 0x0f, 0x48, 0xf5, 0x0a, + 0x9f, 0x00, 0x03, 0x3e, 0x30, 0xdf, 0x4e, 0x9f, 0x5c, 0xf2, 0x0a, 0x7f, 0x51, 0x3b, 0x7e, 0x8f, + 0xf4, 0xef, 0x45, 0xec, 0x07, 0x19, 0x51, 0x18, 0x70, 0x75, 0x21, 0xa7, 0xcf, 0xda, 0xbf, 0x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0x14, 0x1e, 0x4a, 0x0a, 0x7f, 0x2b, 0x0a, 0x57, 0x15, 0x85, 0xeb, + 0x8a, 0xc2, 0xbe, 0xa2, 0xf0, 0x18, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x4e, 0xc7, 0x4e, 0xa1, 0x02, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto new file mode 100644 index 000000000..1fdbceaf5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto @@ -0,0 +1,75 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package unmarshalmerge; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.goproto_stringer_all) = false; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; + +message Big { + option (gogoproto.unmarshaler) = true; + optional Sub Sub = 1; + optional int64 Number = 2; +} + +message BigUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + optional Sub Sub = 1; + optional int64 Number = 2; +} + +message Sub { + option (gogoproto.unmarshaler) = true; + optional int64 SubNumber = 1; +} + +message IntMerge { + option (gogoproto.unmarshaler) = true; + required int64 Int64 = 1 [(gogoproto.nullable) = false]; + optional int32 Int32 = 2 [(gogoproto.nullable) = false]; + required sint32 Sint32 = 3 [(gogoproto.nullable) = false]; + optional sint64 Sint64 = 4 [(gogoproto.nullable) = false]; + optional uint64 Uint64 = 5 [(gogoproto.nullable) = false]; + required uint32 Uint32 = 6 [(gogoproto.nullable) = false]; + optional fixed64 Fixed64 = 7 [(gogoproto.nullable) = false]; + optional fixed32 Fixed32 = 8 [(gogoproto.nullable) = false]; + required sfixed32 Sfixed32 = 9 [(gogoproto.nullable) = false]; + optional sfixed64 Sfixed64 = 10 [(gogoproto.nullable) = false]; + optional bool Bool = 11 [(gogoproto.nullable) = false]; +} diff --git a/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go new file mode 100644 index 000000000..b842ef9bf --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go @@ -0,0 +1,99 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package unmarshalmerge + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + "time" +) + +func TestUnmarshalMerge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, true) + if p.GetSub() == nil { + p.Sub = &Sub{SubNumber: proto.Int64(12345)} + } + data, err := proto.Marshal(p) + if err != nil { + t.Fatal(err) + } + s := &Sub{} + b := &Big{ + Sub: s, + } + err = proto.UnmarshalMerge(data, b) + if err != nil { + t.Fatal(err) + } + if s.GetSubNumber() != p.GetSub().GetSubNumber() { + t.Fatalf("should have unmarshaled subnumber into sub") + } +} + +func TestUnsafeUnmarshalMerge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, true) + if p.GetSub() == nil { + p.Sub = &Sub{SubNumber: proto.Int64(12345)} + } + data, err := proto.Marshal(p) + if err != nil { + t.Fatal(err) + } + s := &Sub{} + b := &BigUnsafe{ + Sub: s, + } + err = proto.UnmarshalMerge(data, b) + if err != nil { + t.Fatal(err) + } + + if s.GetSubNumber() != p.GetSub().GetSubNumber() { + t.Fatalf("should have unmarshaled subnumber into sub") + } +} + +func TestInt64Merge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, true) + p2 := NewPopulatedIntMerge(popr, true) + data, err := proto.Marshal(p2) + if err != nil { + t.Fatal(err) + } + if err := proto.UnmarshalMerge(data, p); err != nil { + t.Fatal(err) + } + if !p.Equal(p2) { + t.Fatalf("exptected %#v but got %#v", p2, p) + } +} diff --git a/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go new file mode 100644 index 000000000..74fd20533 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go @@ -0,0 +1,692 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unmarshalmerge.proto + +package unmarshalmerge + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import unsafe "unsafe" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestBigProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Big{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkBigProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Big, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedBig(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBigProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBig(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Big{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBigUnsafeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkBigUnsafeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*BigUnsafe, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedBigUnsafe(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBigUnsafe(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &BigUnsafe{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestSubProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkSubProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Sub, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedSub(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkSubProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSub(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Sub{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestIntMergeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkIntMergeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*IntMerge, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedIntMerge(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkIntMergeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedIntMerge(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &IntMerge{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBigJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Big{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBigUnsafeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BigUnsafe{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Sub{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIntMergeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IntMerge{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBigProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Big{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Big{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigUnsafeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigUnsafeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIntMergeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIntMergeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Big{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBigUnsafeVerboseEqual(t *testing.T) { + var bigendian uint32 = 0x01020304 + if *(*byte)(unsafe.Pointer(&bigendian)) == 1 { + t.Skip("unsafe does not work on big endian architectures") + } + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestIntMergeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBigGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBigUnsafeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestIntMergeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBigStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBigUnsafeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSubStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestIntMergeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/unrecognized/Makefile b/deps/github.com/gogo/protobuf/test/unrecognized/Makefile new file mode 100644 index 000000000..f09551ae7 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognized/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognized.proto) diff --git a/deps/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go b/deps/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go new file mode 100644 index 000000000..16751014b --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go @@ -0,0 +1,200 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package unrecognized + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestNewOld(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + newer := NewPopulatedA(popr, true) + data1, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + older := &OldA{} + if err = proto.Unmarshal(data1, older); err != nil { + panic(err) + } + data2, err := proto.Marshal(older) + if err != nil { + panic(err) + } + bluer := &A{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := newer.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) + } +} + +func TestOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldA(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &A{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldA{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } +} + +func TestOldNewOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldA(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &A{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldA{} + if err = proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err = older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } + + data3, err := proto.Marshal(bluer) + if err != nil { + panic(err) + } + purple := &A{} + if err = proto.Unmarshal(data3, purple); err != nil { + panic(err) + } + data4, err := proto.Marshal(purple) + if err != nil { + panic(err) + } + magenta := &OldA{} + if err := proto.Unmarshal(data4, magenta); err != nil { + panic(err) + } + if err := older.VerboseEqual(magenta); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) + } +} + +func TestOldUToU(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldU(popr, true) + // need optional field to be always initialized, to check it's lost in this test + older.Field1 = proto.String(randStringUnrecognized(popr)) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + + newer := &U{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + + older2 := &OldU{} + if err := proto.Unmarshal(data2, older2); err != nil { + panic(err) + } + + // check that Field1 is lost + if older2.Field1 != nil { + t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) + } + + // now restore Field1 and messages should be equal now + older2.Field1 = older.Field1 + if err := older.VerboseEqual(older2); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) + } +} + +func TestOldUnoM(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldUnoM(popr, true) + // need optional field to be always initialized, to check it's lost in this test + older.Field1 = proto.String(randStringUnrecognized(popr)) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + + newer := &UnoM{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + + older2 := &OldUnoM{} + if err := proto.Unmarshal(data2, older2); err != nil { + panic(err) + } + + // check that Field1 is lost + if older2.Field1 != nil { + t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) + } + + // now restore Field1 and messages should be equal now + older2.Field1 = older.Field1 + if err := older.VerboseEqual(older2); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go b/deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go new file mode 100644 index 000000000..1e8520e63 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go @@ -0,0 +1,4355 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognized.proto + +package unrecognized + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A struct { + Field1 *int64 `protobuf:"varint,2,opt,name=Field1" json:"Field1,omitempty"` + B []*B `protobuf:"bytes,1,rep,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +type B struct { + C *C `protobuf:"bytes,1,opt,name=C" json:"C,omitempty"` + D *D `protobuf:"bytes,2,opt,name=D" json:"D,omitempty"` + F *OldC `protobuf:"bytes,5,opt,name=F" json:"F,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{1} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +type D struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *D) Reset() { *m = D{} } +func (*D) ProtoMessage() {} +func (*D) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{2} +} +func (m *D) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *D) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_D.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *D) XXX_Merge(src proto.Message) { + xxx_messageInfo_D.Merge(dst, src) +} +func (m *D) XXX_Size() int { + return m.Size() +} +func (m *D) XXX_DiscardUnknown() { + xxx_messageInfo_D.DiscardUnknown(m) +} + +var xxx_messageInfo_D proto.InternalMessageInfo + +type C struct { + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *string `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *float64 `protobuf:"fixed64,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 [][]byte `protobuf:"bytes,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 *int64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7" json:"Field7,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{3} +} +func (m *C) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *C) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_C.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *C) XXX_Merge(src proto.Message) { + xxx_messageInfo_C.Merge(dst, src) +} +func (m *C) XXX_Size() int { + return m.Size() +} +func (m *C) XXX_DiscardUnknown() { + xxx_messageInfo_C.DiscardUnknown(m) +} + +var xxx_messageInfo_C proto.InternalMessageInfo + +type U struct { + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 *uint32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *U) Reset() { *m = U{} } +func (*U) ProtoMessage() {} +func (*U) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{4} +} +func (m *U) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *U) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_U.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *U) XXX_Merge(src proto.Message) { + xxx_messageInfo_U.Merge(dst, src) +} +func (m *U) XXX_Size() int { + return m.Size() +} +func (m *U) XXX_DiscardUnknown() { + xxx_messageInfo_U.DiscardUnknown(m) +} + +var xxx_messageInfo_U proto.InternalMessageInfo + +type UnoM struct { + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 *uint32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnoM) Reset() { *m = UnoM{} } +func (*UnoM) ProtoMessage() {} +func (*UnoM) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{5} +} +func (m *UnoM) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnoM.Unmarshal(m, b) +} +func (m *UnoM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnoM.Marshal(b, m, deterministic) +} +func (dst *UnoM) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnoM.Merge(dst, src) +} +func (m *UnoM) XXX_Size() int { + return xxx_messageInfo_UnoM.Size(m) +} +func (m *UnoM) XXX_DiscardUnknown() { + xxx_messageInfo_UnoM.DiscardUnknown(m) +} + +var xxx_messageInfo_UnoM proto.InternalMessageInfo + +type OldA struct { + Field1 *int64 `protobuf:"varint,2,opt,name=Field1" json:"Field1,omitempty"` + B []*OldB `protobuf:"bytes,1,rep,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldA) Reset() { *m = OldA{} } +func (*OldA) ProtoMessage() {} +func (*OldA) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{6} +} +func (m *OldA) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldA.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldA) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldA.Merge(dst, src) +} +func (m *OldA) XXX_Size() int { + return m.Size() +} +func (m *OldA) XXX_DiscardUnknown() { + xxx_messageInfo_OldA.DiscardUnknown(m) +} + +var xxx_messageInfo_OldA proto.InternalMessageInfo + +type OldB struct { + C *OldC `protobuf:"bytes,1,opt,name=C" json:"C,omitempty"` + F *OldC `protobuf:"bytes,5,opt,name=F" json:"F,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldB) Reset() { *m = OldB{} } +func (*OldB) ProtoMessage() {} +func (*OldB) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{7} +} +func (m *OldB) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldB.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldB) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldB.Merge(dst, src) +} +func (m *OldB) XXX_Size() int { + return m.Size() +} +func (m *OldB) XXX_DiscardUnknown() { + xxx_messageInfo_OldB.DiscardUnknown(m) +} + +var xxx_messageInfo_OldB proto.InternalMessageInfo + +type OldC struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *string `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field6 *int64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7" json:"Field7,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldC) Reset() { *m = OldC{} } +func (*OldC) ProtoMessage() {} +func (*OldC) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{8} +} +func (m *OldC) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldC.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldC) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldC.Merge(dst, src) +} +func (m *OldC) XXX_Size() int { + return m.Size() +} +func (m *OldC) XXX_DiscardUnknown() { + xxx_messageInfo_OldC.DiscardUnknown(m) +} + +var xxx_messageInfo_OldC proto.InternalMessageInfo + +type OldU struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldU) Reset() { *m = OldU{} } +func (*OldU) ProtoMessage() {} +func (*OldU) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{9} +} +func (m *OldU) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldU.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldU) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldU.Merge(dst, src) +} +func (m *OldU) XXX_Size() int { + return m.Size() +} +func (m *OldU) XXX_DiscardUnknown() { + xxx_messageInfo_OldU.DiscardUnknown(m) +} + +var xxx_messageInfo_OldU proto.InternalMessageInfo + +type OldUnoM struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldUnoM) Reset() { *m = OldUnoM{} } +func (*OldUnoM) ProtoMessage() {} +func (*OldUnoM) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{10} +} +func (m *OldUnoM) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldUnoM.Unmarshal(m, b) +} +func (m *OldUnoM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldUnoM.Marshal(b, m, deterministic) +} +func (dst *OldUnoM) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldUnoM.Merge(dst, src) +} +func (m *OldUnoM) XXX_Size() int { + return xxx_messageInfo_OldUnoM.Size(m) +} +func (m *OldUnoM) XXX_DiscardUnknown() { + xxx_messageInfo_OldUnoM.DiscardUnknown(m) +} + +var xxx_messageInfo_OldUnoM proto.InternalMessageInfo + +func init() { + proto.RegisterType((*A)(nil), "unrecognized.A") + proto.RegisterType((*B)(nil), "unrecognized.B") + proto.RegisterType((*D)(nil), "unrecognized.D") + proto.RegisterType((*C)(nil), "unrecognized.C") + proto.RegisterType((*U)(nil), "unrecognized.U") + proto.RegisterType((*UnoM)(nil), "unrecognized.UnoM") + proto.RegisterType((*OldA)(nil), "unrecognized.OldA") + proto.RegisterType((*OldB)(nil), "unrecognized.OldB") + proto.RegisterType((*OldC)(nil), "unrecognized.OldC") + proto.RegisterType((*OldU)(nil), "unrecognized.OldU") + proto.RegisterType((*OldUnoM)(nil), "unrecognized.OldUnoM") +} +func (this *A) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *D) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *C) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *U) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *UnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldA) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldB) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldC) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldU) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldUnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func UnrecognizedDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4003 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0xf8, 0x23, 0x91, 0x87, 0x14, 0x05, 0x41, 0xb2, 0xcc, 0x95, 0x63, 0x49, 0x4b, 0xdb, + 0xb1, 0x6c, 0x37, 0xda, 0x54, 0xde, 0xd5, 0x7a, 0xb9, 0x4d, 0x1c, 0x8a, 0xa4, 0x64, 0x6d, 0x25, + 0x51, 0x81, 0xc4, 0xf8, 0x27, 0xd3, 0xc1, 0x40, 0xe0, 0x25, 0x85, 0x5d, 0x10, 0x40, 0x00, 0x70, + 0xd7, 0xda, 0xe9, 0x74, 0xb6, 0xe3, 0xfe, 0x65, 0x3a, 0x6d, 0xd3, 0xa6, 0x33, 0x4d, 0x5c, 0xc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, 0xde, 0xa1, 0xa1, 0x6b, 0x4a, 0x40, 0x0d, 0x96, 0x92, 0xcb, 0x69, + 0x59, 0xa4, 0x03, 0xb5, 0xbe, 0xf2, 0xe3, 0x30, 0x75, 0x03, 0xa9, 0xd7, 0x82, 0xaa, 0x39, 0xa2, + 0x5a, 0xc0, 0xe2, 0x80, 0x62, 0x15, 0xf2, 0x5d, 0xe4, 0xba, 0x6a, 0x07, 0x29, 0xde, 0xb1, 0x8d, + 0x8a, 0x29, 0x32, 0xfb, 0xa5, 0xa1, 0xd9, 0x0f, 0xce, 0x3c, 0xc7, 0x50, 0x07, 0xc7, 0x36, 0x92, + 0x2a, 0x90, 0x45, 0x66, 0xaf, 0x4b, 0x19, 0xd2, 0x27, 0xf8, 0xaf, 0x6e, 0xf6, 0xba, 0x83, 0x2c, + 0x19, 0x0c, 0x63, 0x14, 0x13, 0x2e, 0x72, 0xae, 0xeb, 0x1a, 0x2a, 0x8e, 0x13, 0x82, 0xc7, 0x87, + 0x08, 0xf6, 0xe9, 0xf8, 0x20, 0x07, 0xc7, 0x49, 0x55, 0xc8, 0xa2, 0x97, 0x3d, 0x64, 0xba, 0xba, + 0x65, 0x16, 0x27, 0x08, 0xc9, 0x63, 0x23, 0x56, 0x11, 0x19, 0xad, 0x41, 0x8a, 0x3e, 0x4e, 0x5a, + 0x83, 0x09, 0xcb, 0xf6, 0x74, 0xcb, 0x74, 0x8b, 0x99, 0x25, 0x61, 0x39, 0xb7, 0xfa, 0x91, 0x91, + 0x81, 0xd0, 0xa0, 0x3a, 0x32, 0x57, 0x96, 0xb6, 0x40, 0x74, 0xad, 0x9e, 0xa3, 0x21, 0x45, 0xb3, + 0x5a, 0x48, 0xd1, 0xcd, 0xb6, 0x55, 0xcc, 0x12, 0x82, 0xc5, 0xe1, 0x89, 0x10, 0xc5, 0xaa, 0xd5, + 0x42, 0x5b, 0x66, 0xdb, 0x92, 0x0b, 0x6e, 0xe8, 0x59, 0x9a, 0x83, 0x71, 0xf7, 0xd8, 0xf4, 0xd4, + 0x97, 0x8b, 0x79, 0x12, 0x21, 0xec, 0xa9, 0xf4, 0xbd, 0x71, 0x98, 0x8a, 0x13, 0x62, 0x97, 0x21, + 0xdd, 0xc6, 0xb3, 0x2c, 0x26, 0x4e, 0xe3, 0x03, 0x8a, 0x09, 0x3b, 0x71, 0xfc, 0x7d, 0x3a, 0xb1, + 0x02, 0x39, 0x13, 0xb9, 0x1e, 0x6a, 0xd1, 0x88, 0x48, 0xc6, 0x8c, 0x29, 0xa0, 0xa0, 0xe1, 0x90, + 0x4a, 0xbd, 0xaf, 0x90, 0x7a, 0x01, 0xa6, 0x7c, 0x93, 0x14, 0x47, 0x35, 0x3b, 0x3c, 0x36, 0xcf, + 0x45, 0x59, 0xb2, 0x52, 0xe7, 0x38, 0x19, 0xc3, 0xe4, 0x02, 0x0a, 0x3d, 0x4b, 0x35, 0x00, 0xcb, + 0x44, 0x56, 0x5b, 0x69, 0x21, 0xcd, 0x28, 0x66, 0x4e, 0xf0, 0x52, 0x03, 0xab, 0x0c, 0x79, 0xc9, + 0xa2, 0x52, 0xcd, 0x90, 0x2e, 0xf5, 0x43, 0x6d, 0xe2, 0x84, 0x48, 0xd9, 0xa1, 0x9b, 0x6c, 0x28, + 0xda, 0x9a, 0x50, 0x70, 0x10, 0x8e, 0x7b, 0xd4, 0x62, 0x33, 0xcb, 0x12, 0x23, 0x56, 0x22, 0x67, + 0x26, 0x33, 0x18, 0x9d, 0xd8, 0xa4, 0x13, 0x7c, 0x94, 0x1e, 0x01, 0x5f, 0xa0, 0x90, 0xb0, 0x02, + 0x92, 0x85, 0xf2, 0x5c, 0xb8, 0xab, 0x76, 0xd1, 0xfc, 0x4d, 0x28, 0x84, 0xdd, 0x23, 0xcd, 0x42, + 0xda, 0xf5, 0x54, 0xc7, 0x23, 0x51, 0x98, 0x96, 0xe9, 0x83, 0x24, 0x42, 0x12, 0x99, 0x2d, 0x92, + 0xe5, 0xd2, 0x32, 0xfe, 0x53, 0x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b9, 0x9e, 0xd5, 0x25, 0x79, + 0xef, 0xfe, 0x34, 0xff, 0xf0, 0x0e, 0xdd, 0x2b, 0x05, 0x0c, 0xab, 0xfa, 0xa8, 0x72, 0x19, 0xc8, + 0x27, 0xa7, 0x16, 0xd2, 0x8c, 0x08, 0x86, 0x37, 0x99, 0x21, 0xbe, 0x7e, 0xf9, 0x33, 0x30, 0x8b, + 0xff, 0x26, 0x69, 0x29, 0x68, 0x49, 0xf4, 0x85, 0x57, 0xf1, 0x07, 0xaf, 0xd0, 0xed, 0x38, 0xe3, + 0x13, 0x04, 0x6c, 0x0a, 0xac, 0x62, 0x07, 0x79, 0x1e, 0x72, 0x5c, 0x45, 0x35, 0x46, 0x99, 0x17, + 0xb8, 0x31, 0x28, 0x7e, 0xf9, 0xdd, 0xf0, 0x2a, 0x6e, 0x52, 0x64, 0xc5, 0x30, 0xca, 0x4d, 0x78, + 0x70, 0x44, 0x54, 0xc4, 0xe0, 0x7c, 0x95, 0x71, 0xce, 0x0e, 0x45, 0x06, 0xa6, 0xdd, 0x03, 0x2e, + 0xf7, 0xd7, 0x32, 0x06, 0xe7, 0xef, 0x33, 0x4e, 0x89, 0x61, 0xf9, 0x92, 0x62, 0xc6, 0x2b, 0x30, + 0x7d, 0x1d, 0x39, 0x87, 0x96, 0xcb, 0x6e, 0x69, 0x62, 0xd0, 0xbd, 0xc6, 0xe8, 0xa6, 0x18, 0x90, + 0x5c, 0xdb, 0x60, 0xae, 0x4b, 0x90, 0x69, 0xab, 0x1a, 0x8a, 0x41, 0xf1, 0x15, 0x46, 0x31, 0x81, + 0xf5, 0x31, 0xb4, 0x02, 0xf9, 0x8e, 0xc5, 0x2a, 0x53, 0x34, 0xfc, 0x75, 0x06, 0xcf, 0x71, 0x0c, + 0xa3, 0xb0, 0x2d, 0xbb, 0x67, 0xe0, 0xb2, 0x15, 0x4d, 0xf1, 0x07, 0x9c, 0x82, 0x63, 0x18, 0xc5, + 0x29, 0xdc, 0xfa, 0x55, 0x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 0x8e, 0x7c, 0x7f, 0xc0, 0xeb, 0xa5, 0x4d, + 0x98, 0xc0, 0xb8, 0xe0, 0xc2, 0xc4, 0x84, 0x96, 0xf3, 0xc1, 0x85, 0x59, 0x3f, 0xff, 0xe6, 0x9d, + 0x85, 0xb1, 0xb7, 0xee, 0x2c, 0x8c, 0xfd, 0xd3, 0x9d, 0x85, 0xb1, 0xb7, 0xef, 0x2c, 0x08, 0x3f, + 0xba, 0xb3, 0x20, 0xfc, 0xf8, 0xce, 0x82, 0x70, 0xeb, 0xee, 0x82, 0xf0, 0xf5, 0xbb, 0x0b, 0xc2, + 0x37, 0xef, 0x2e, 0x08, 0xdf, 0xbd, 0xbb, 0x20, 0xbc, 0x79, 0x77, 0x41, 0x78, 0xeb, 0xee, 0x82, + 0xf0, 0xf6, 0xdd, 0x05, 0xe1, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x3b, 0x5a, 0xd3, 0x18, + 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.B) != len(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) + } + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.B) != len(that1.B) { + return false + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return false + } + } + return true +} +func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *B") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *B but is not nil && this == nil") + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !this.D.Equal(that1.D) { + return fmt.Errorf("D this(%v) Not Equal that(%v)", this.D, that1.D) + } + if !this.F.Equal(that1.F) { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !this.D.Equal(that1.D) { + return false + } + if !this.F.Equal(that1.F) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *D) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*D) + if !ok { + that2, ok := that.(D) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *D") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *D but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *D but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *D) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*D) + if !ok { + that2, ok := that.(D) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *C) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *C") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *C but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *C but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if !bytes.Equal(this.Field5[i], that1.Field5[i]) { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if !bytes.Equal(this.Field5[i], that1.Field5[i]) { + return false + } + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *U) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *U") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *U but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *U but is not nil && this == nil") + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *U) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + return true +} +func (this *UnoM) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnoM) + if !ok { + that2, ok := that.(UnoM) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnoM") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnoM but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnoM but is not nil && this == nil") + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *UnoM) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnoM) + if !ok { + that2, ok := that.(UnoM) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + return true +} +func (this *OldA) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldA) + if !ok { + that2, ok := that.(OldA) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldA") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldA but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldA but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.B) != len(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) + } + } + return nil +} +func (this *OldA) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldA) + if !ok { + that2, ok := that.(OldA) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.B) != len(that1.B) { + return false + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return false + } + } + return true +} +func (this *OldB) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldB) + if !ok { + that2, ok := that.(OldB) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldB") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldB but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldB but is not nil && this == nil") + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !this.F.Equal(that1.F) { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldB) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldB) + if !ok { + that2, ok := that.(OldB) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !this.F.Equal(that1.F) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldC) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldC) + if !ok { + that2, ok := that.(OldC) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldC") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldC but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldC but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldC) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldC) + if !ok { + that2, ok := that.(OldC) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldU) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldU) + if !ok { + that2, ok := that.(OldU) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldU") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldU but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldU but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldU) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldU) + if !ok { + that2, ok := that.(OldU) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldUnoM) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldUnoM) + if !ok { + that2, ok := that.(OldUnoM) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldUnoM") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldUnoM but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldUnoM but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldUnoM) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldUnoM) + if !ok { + that2, ok := that.(OldUnoM) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.A{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognized.B{") + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.D != nil { + s = append(s, "D: "+fmt.Sprintf("%#v", this.D)+",\n") + } + if this.F != nil { + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *D) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unrecognized.D{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *C) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&unrecognized.C{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringUnrecognized(this.Field4, "float64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *U) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.U{") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnoM) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.UnoM{") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldA) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldA{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldB) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldB{") + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.F != nil { + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldC) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&unrecognized.OldC{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldU) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldU{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldUnoM) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldUnoM{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringUnrecognized(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + for _, msg := range m.B { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field1 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.C != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.C.Size())) + n1, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.D != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.D.Size())) + n2, err := m.D.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.F != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.F.Size())) + n3, err := m.F.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 *D) 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 *D) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *C) 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 *C) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field2 != nil { + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field2)))) + i += 8 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(*m.Field3))) + i += copy(dAtA[i:], *m.Field3) + } + if m.Field4 != nil { + dAtA[i] = 0x21 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field4)))) + i += 8 + } + if len(m.Field5) > 0 { + for _, b := range m.Field5 { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x3d + i++ + f4 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f4)) + i += 4 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *U) 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 *U) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x11 + i++ + f5 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) + i += 8 + } + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field3)) + } + return i, nil +} + +func (m *OldA) 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 *OldA) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + for _, msg := range m.B { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field1 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *OldB) 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 *OldB) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.C != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.C.Size())) + n6, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.F != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.F.Size())) + n7, err := m.F.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OldC) 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 *OldC) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field2)))) + i += 8 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(*m.Field3))) + i += copy(dAtA[i:], *m.Field3) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x3d + i++ + f8 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f8)) + i += 4 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OldU) 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 *OldU) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(*m.Field1))) + i += copy(dAtA[i:], *m.Field1) + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x11 + i++ + f9 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintUnrecognized(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 NewPopulatedA(r randyUnrecognized, easy bool) *A { + this := &A{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.B = make([]*B, v1) + for i := 0; i < v1; i++ { + this.B[i] = NewPopulatedB(r, easy) + } + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedB(r randyUnrecognized, easy bool) *B { + this := &B{} + if r.Intn(10) != 0 { + this.C = NewPopulatedC(r, easy) + } + if r.Intn(10) != 0 { + this.D = NewPopulatedD(r, easy) + } + if r.Intn(10) != 0 { + this.F = NewPopulatedOldC(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) + } + return this +} + +func NewPopulatedD(r randyUnrecognized, easy bool) *D { + this := &D{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field1 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 2) + } + return this +} + +func NewPopulatedC(r randyUnrecognized, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + v4 := float64(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field2 = &v4 + } + if r.Intn(10) != 0 { + v5 := string(randStringUnrecognized(r)) + this.Field3 = &v5 + } + if r.Intn(10) != 0 { + v6 := float64(r.Float64()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field4 = &v6 + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.Field5 = make([][]byte, v7) + for i := 0; i < v7; i++ { + v8 := r.Intn(100) + this.Field5[i] = make([]byte, v8) + for j := 0; j < v8; j++ { + this.Field5[i][j] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field6 = &v9 + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field7 = make([]float32, v10) + for i := 0; i < v10; i++ { + this.Field7[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) + } + return this +} + +func NewPopulatedU(r randyUnrecognized, easy bool) *U { + this := &U{} + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Field2 = make([]float64, v11) + for i := 0; i < v11; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := uint32(r.Uint32()) + this.Field3 = &v12 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnoM(r randyUnrecognized, easy bool) *UnoM { + this := &UnoM{} + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Field2 = make([]float64, v13) + for i := 0; i < v13; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := uint32(r.Uint32()) + this.Field3 = &v14 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOldA(r randyUnrecognized, easy bool) *OldA { + this := &OldA{} + if r.Intn(10) != 0 { + v15 := r.Intn(5) + this.B = make([]*OldB, v15) + for i := 0; i < v15; i++ { + this.B[i] = NewPopulatedOldB(r, easy) + } + } + if r.Intn(10) != 0 { + v16 := int64(r.Int63()) + if r.Intn(2) == 0 { + v16 *= -1 + } + this.Field1 = &v16 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOldB(r randyUnrecognized, easy bool) *OldB { + this := &OldB{} + if r.Intn(10) != 0 { + this.C = NewPopulatedOldC(r, easy) + } + if r.Intn(10) != 0 { + this.F = NewPopulatedOldC(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) + } + return this +} + +func NewPopulatedOldC(r randyUnrecognized, easy bool) *OldC { + this := &OldC{} + if r.Intn(10) != 0 { + v17 := int64(r.Int63()) + if r.Intn(2) == 0 { + v17 *= -1 + } + this.Field1 = &v17 + } + if r.Intn(10) != 0 { + v18 := float64(r.Float64()) + if r.Intn(2) == 0 { + v18 *= -1 + } + this.Field2 = &v18 + } + if r.Intn(10) != 0 { + v19 := string(randStringUnrecognized(r)) + this.Field3 = &v19 + } + if r.Intn(10) != 0 { + v20 := int64(r.Int63()) + if r.Intn(2) == 0 { + v20 *= -1 + } + this.Field6 = &v20 + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field7 = make([]float32, v21) + for i := 0; i < v21; i++ { + this.Field7[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) + } + return this +} + +func NewPopulatedOldU(r randyUnrecognized, easy bool) *OldU { + this := &OldU{} + if r.Intn(10) != 0 { + v22 := string(randStringUnrecognized(r)) + this.Field1 = &v22 + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field2 = make([]float64, v23) + for i := 0; i < v23; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) + } + return this +} + +func NewPopulatedOldUnoM(r randyUnrecognized, easy bool) *OldUnoM { + this := &OldUnoM{} + if r.Intn(10) != 0 { + v24 := string(randStringUnrecognized(r)) + this.Field1 = &v24 + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field2 = make([]float64, v25) + for i := 0; i < v25; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) + } + return this +} + +type randyUnrecognized interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnrecognized(r randyUnrecognized) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringUnrecognized(r randyUnrecognized) string { + v26 := r.Intn(100) + tmps := make([]rune, v26) + for i := 0; i < v26; i++ { + tmps[i] = randUTF8RuneUnrecognized(r) + } + return string(tmps) +} +func randUnrecognizedUnrecognized(r randyUnrecognized, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldUnrecognized(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldUnrecognized(dAtA []byte, r randyUnrecognized, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + v27 := r.Int63() + if r.Intn(2) == 0 { + v27 *= -1 + } + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(v27)) + case 1: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateUnrecognized(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *A) Size() (n int) { + var l int + _ = l + if len(m.B) > 0 { + for _, e := range m.B { + l = e.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + return n +} + +func (m *B) Size() (n int) { + var l int + _ = l + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.D != nil { + l = m.D.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *D) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *C) Size() (n int) { + var l int + _ = l + if m.Field2 != nil { + n += 9 + } + if m.Field3 != nil { + l = len(*m.Field3) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.Field4 != nil { + n += 9 + } + if len(m.Field5) > 0 { + for _, b := range m.Field5 { + l = len(b) + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field6 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + n += 5 * len(m.Field7) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *U) Size() (n int) { + var l int + _ = l + if len(m.Field2) > 0 { + n += 9 * len(m.Field2) + } + if m.Field3 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field3)) + } + return n +} + +func (m *OldA) Size() (n int) { + var l int + _ = l + if len(m.B) > 0 { + for _, e := range m.B { + l = e.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + return n +} + +func (m *OldB) Size() (n int) { + var l int + _ = l + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OldC) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 9 + } + if m.Field3 != nil { + l = len(*m.Field3) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + n += 5 * len(m.Field7) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OldU) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if len(m.Field2) > 0 { + n += 9 * len(m.Field2) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovUnrecognized(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozUnrecognized(x uint64) (n int) { + return sovUnrecognized(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "C", "C", 1) + `,`, + `D:` + strings.Replace(fmt.Sprintf("%v", this.D), "D", "D", 1) + `,`, + `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *D) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&D{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *C) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&C{`, + `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `Field4:` + valueToStringUnrecognized(this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *U) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&U{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *UnoM) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnoM{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *OldA) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldA{`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "OldB", "OldB", 1) + `,`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *OldB) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldB{`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "OldC", "OldC", 1) + `,`, + `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldC) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldC{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldU) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldU{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldUnoM) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldUnoM{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnrecognized(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *A) 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 ErrIntOverflowUnrecognized + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = append(m.B, &B{}) + if err := m.B[len(m.B)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *B) 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 ErrIntOverflowUnrecognized + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &C{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.D == nil { + m.D = &D{} + } + if err := m.D.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = &OldC{} + } + if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + 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 *D) 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 ErrIntOverflowUnrecognized + } + 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: D: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: D: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + 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 *C) 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 ErrIntOverflowUnrecognized + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field3 = &s + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field4 = &v2 + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field5 = append(m.Field5, make([]byte, postIndex-iNdEx)) + copy(m.Field5[len(m.Field5)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field7) == 0 { + m.Field7 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + 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 *U) 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 ErrIntOverflowUnrecognized + } + 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: U: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldA) 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 ErrIntOverflowUnrecognized + } + 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: OldA: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldA: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = append(m.B, &OldB{}) + if err := m.B[len(m.B)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldB) 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 ErrIntOverflowUnrecognized + } + 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: OldB: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldB: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &OldC{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = &OldC{} + } + if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + 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 *OldC) 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 ErrIntOverflowUnrecognized + } + 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: OldC: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldC: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field3 = &s + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field7) == 0 { + m.Field7 = make([]float32, 0, packedLen/4) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + 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 *OldU) 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 ErrIntOverflowUnrecognized + } + 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: OldU: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldU: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + case 2: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field2) == 0 { + m.Field2 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + 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 skipUnrecognized(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, ErrIntOverflowUnrecognized + } + 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, ErrIntOverflowUnrecognized + } + 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, ErrIntOverflowUnrecognized + } + 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, ErrInvalidLengthUnrecognized + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnrecognized + } + 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 := skipUnrecognized(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 ( + ErrInvalidLengthUnrecognized = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnrecognized = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("unrecognized.proto", fileDescriptor_unrecognized_05a73f113b0c8d63) } + +var fileDescriptor_unrecognized_05a73f113b0c8d63 = []byte{ + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xbd, 0x4e, 0xc2, 0x50, + 0x18, 0xed, 0x47, 0x0b, 0x84, 0x2b, 0x46, 0xd3, 0xc1, 0xdc, 0x68, 0xbc, 0x6d, 0x3a, 0x75, 0x11, + 0x22, 0xbf, 0x91, 0x49, 0xda, 0xa6, 0x1a, 0x13, 0x43, 0xd2, 0x84, 0x17, 0x80, 0x62, 0x25, 0x41, + 0x6a, 0x08, 0x2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, 0xe3, 0x15, 0x2c, 0x30, 0xff, 0x2b, + 0x31, 0x5e, 0xc5, 0x69, 0x99, 0x57, 0xf3, 0x11, 0x5e, 0x8d, 0xf1, 0x1a, 0xce, 0x30, 0xee, 0xb5, + 0x18, 0xaf, 0xe3, 0xac, 0xcc, 0xab, 0xa9, 0x08, 0xaf, 0x2b, 0x27, 0x08, 0xda, 0x4b, 0xa1, 0xf8, + 0x8d, 0xa1, 0xb6, 0x17, 0xa1, 0xa2, 0x93, 0x9e, 0x23, 0xa1, 0x3d, 0x74, 0x2f, 0xff, 0xbc, 0xbd, + 0xfb, 0xe8, 0x49, 0xdc, 0x93, 0x27, 0x71, 0x2f, 0x9e, 0xc4, 0x51, 0x25, 0x13, 0x09, 0xad, 0x81, + 0xdd, 0x0c, 0x2f, 0xbc, 0x68, 0x78, 0xf5, 0xc2, 0x09, 0x4a, 0xbe, 0xa0, 0x3a, 0x5a, 0xa8, 0xb3, + 0xe8, 0x79, 0x6d, 0x53, 0x7a, 0x82, 0x2e, 0xef, 0xa9, 0x96, 0xbe, 0xa9, 0xce, 0x7f, 0x17, 0x99, + 0xb4, 0x98, 0x1a, 0xf5, 0x6f, 0xff, 0xf2, 0xcf, 0xad, 0xf5, 0x67, 0xae, 0xae, 0x9c, 0xa1, 0x6c, + 0xb8, 0xc7, 0x16, 0x93, 0x70, 0xb5, 0x91, 0x67, 0x8b, 0xd1, 0x2a, 0x53, 0x9f, 0x70, 0x33, 0x9f, + 0x70, 0x1f, 0x3e, 0xe1, 0xe6, 0x3e, 0x81, 0x4f, 0x9f, 0xc0, 0x97, 0x4f, 0xe0, 0x21, 0x20, 0xf0, + 0x1a, 0x10, 0x78, 0x0b, 0x08, 0xbc, 0x07, 0x04, 0xa6, 0x01, 0x81, 0x59, 0x40, 0x60, 0x1e, 0x10, + 0xf8, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x75, 0x16, 0xec, 0x6e, 0xfb, 0x03, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto b/deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto new file mode 100644 index 000000000..483227a33 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto @@ -0,0 +1,131 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package unrecognized; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +message A { + option (gogoproto.goproto_unrecognized) = false; + optional int64 Field1 = 2; + repeated B B = 1; +} + +message B { + optional C C = 1; + optional D D = 2; + optional OldC F = 5; +} + +message D { + optional int64 Field1 = 1; +} + +message C { + optional double Field2 = 2; + optional string Field3 = 3; + optional double Field4 = 4; + repeated bytes Field5 = 5; + optional int64 Field6 = 6; + repeated float Field7 = 7; +} + +message U { + // unserializing U as OldU must leave Field1 unset + option (gogoproto.goproto_unrecognized) = false; + repeated double Field2 = 2; + optional uint32 Field3 = 3; +} + +message UnoM { + // disable marshal/unmarshal generation here + // to check that reflection based code handles missing XXX_unrecognized field coorectly + option (gogoproto.sizer) = false; + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + // unserializing U as OldU must leave Field1 unset + option (gogoproto.goproto_unrecognized) = false; + + repeated double Field2 = 2; + optional uint32 Field3 = 3; +} + +message OldA { + // OldA == A, so removing unrecognized should not affect anything, tests must pass + option (gogoproto.goproto_unrecognized) = false; + optional int64 Field1 = 2; + repeated OldB B = 1; +} + +message OldB { + optional OldC C = 1; + optional OldC F = 5; +} + +message OldC { + optional int64 Field1 = 1; + optional double Field2 = 2; + optional string Field3 = 3; + optional int64 Field6 = 6; + repeated float Field7 = 7; +} + +message OldU { + optional string Field1 = 1; + repeated double Field2 = 2; +} + +message OldUnoM { + // disable marshal/unmarshal generation here + // to check that reflection based code handles missing XXX_unrecognized field coorectly + option (gogoproto.sizer) = false; + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + + optional string Field1 = 1; + repeated double Field2 = 2; +} diff --git a/deps/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go b/deps/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go new file mode 100644 index 000000000..d508a0ab0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go @@ -0,0 +1,1862 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognized.proto + +package unrecognized + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnoMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnoM{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldUnoMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldUnoM{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &D{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &D{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedDescription(t *testing.T) { + UnrecognizedDescription() +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnoMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldUnoMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnoMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldUnoMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnoMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldUnoMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile new file mode 100644 index 000000000..5ea242c4d --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognizedgroup.proto) diff --git a/deps/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go new file mode 100644 index 000000000..893cb5dea --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go @@ -0,0 +1,128 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package unrecognizedgroup + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestNewOld(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + newer := NewPopulatedNewNoGroup(popr, true) + data1, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + older := &OldWithGroup{} + if err = proto.Unmarshal(data1, older); err != nil { + panic(err) + } + data2, err := proto.Marshal(older) + if err != nil { + panic(err) + } + bluer := &NewNoGroup{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := newer.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) + } +} + +func TestOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldWithGroup(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &NewNoGroup{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldWithGroup{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } +} + +func TestOldNewOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldWithGroup(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &NewNoGroup{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldWithGroup{} + if err = proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err = older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } + + data3, err := proto.Marshal(bluer) + if err != nil { + panic(err) + } + purple := &NewNoGroup{} + if err = proto.Unmarshal(data3, purple); err != nil { + panic(err) + } + data4, err := proto.Marshal(purple) + if err != nil { + panic(err) + } + magenta := &OldWithGroup{} + if err := proto.Unmarshal(data4, magenta); err != nil { + panic(err) + } + if err := older.VerboseEqual(magenta); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) + } +} diff --git a/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go new file mode 100644 index 000000000..108f2d37f --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go @@ -0,0 +1,1816 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognizedgroup.proto + +package unrecognizedgroup + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type NewNoGroup struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` + A *A `protobuf:"bytes,5,opt,name=A" json:"A,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NewNoGroup) Reset() { *m = NewNoGroup{} } +func (*NewNoGroup) ProtoMessage() {} +func (*NewNoGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{0} +} +func (m *NewNoGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NewNoGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NewNoGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NewNoGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_NewNoGroup.Merge(dst, src) +} +func (m *NewNoGroup) XXX_Size() int { + return m.Size() +} +func (m *NewNoGroup) XXX_DiscardUnknown() { + xxx_messageInfo_NewNoGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_NewNoGroup proto.InternalMessageInfo + +type A struct { + AField *int64 `protobuf:"varint,1,opt,name=AField" json:"AField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{1} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +type OldWithGroup struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Group1 *OldWithGroup_Group1 `protobuf:"group,2,opt,name=Group1,json=group1" json:"group1,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` + Group2 *OldWithGroup_Group2 `protobuf:"group,4,opt,name=Group2,json=group2" json:"group2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldWithGroup) Reset() { *m = OldWithGroup{} } +func (*OldWithGroup) ProtoMessage() {} +func (*OldWithGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{2} +} +func (m *OldWithGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldWithGroup.Unmarshal(m, b) +} +func (m *OldWithGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldWithGroup.Marshal(b, m, deterministic) +} +func (dst *OldWithGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldWithGroup.Merge(dst, src) +} +func (m *OldWithGroup) XXX_Size() int { + return xxx_messageInfo_OldWithGroup.Size(m) +} +func (m *OldWithGroup) XXX_DiscardUnknown() { + xxx_messageInfo_OldWithGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_OldWithGroup proto.InternalMessageInfo + +type OldWithGroup_Group1 struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *int32 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldWithGroup_Group1) Reset() { *m = OldWithGroup_Group1{} } +func (*OldWithGroup_Group1) ProtoMessage() {} +func (*OldWithGroup_Group1) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{2, 0} +} +func (m *OldWithGroup_Group1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldWithGroup_Group1.Unmarshal(m, b) +} +func (m *OldWithGroup_Group1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldWithGroup_Group1.Marshal(b, m, deterministic) +} +func (dst *OldWithGroup_Group1) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldWithGroup_Group1.Merge(dst, src) +} +func (m *OldWithGroup_Group1) XXX_Size() int { + return xxx_messageInfo_OldWithGroup_Group1.Size(m) +} +func (m *OldWithGroup_Group1) XXX_DiscardUnknown() { + xxx_messageInfo_OldWithGroup_Group1.DiscardUnknown(m) +} + +var xxx_messageInfo_OldWithGroup_Group1 proto.InternalMessageInfo + +type OldWithGroup_Group2 struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldWithGroup_Group2) Reset() { *m = OldWithGroup_Group2{} } +func (*OldWithGroup_Group2) ProtoMessage() {} +func (*OldWithGroup_Group2) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{2, 1} +} +func (m *OldWithGroup_Group2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldWithGroup_Group2.Unmarshal(m, b) +} +func (m *OldWithGroup_Group2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldWithGroup_Group2.Marshal(b, m, deterministic) +} +func (dst *OldWithGroup_Group2) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldWithGroup_Group2.Merge(dst, src) +} +func (m *OldWithGroup_Group2) XXX_Size() int { + return xxx_messageInfo_OldWithGroup_Group2.Size(m) +} +func (m *OldWithGroup_Group2) XXX_DiscardUnknown() { + xxx_messageInfo_OldWithGroup_Group2.DiscardUnknown(m) +} + +var xxx_messageInfo_OldWithGroup_Group2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*NewNoGroup)(nil), "unrecognizedgroup.NewNoGroup") + proto.RegisterType((*A)(nil), "unrecognizedgroup.A") + proto.RegisterType((*OldWithGroup)(nil), "unrecognizedgroup.OldWithGroup") + proto.RegisterType((*OldWithGroup_Group1)(nil), "unrecognizedgroup.OldWithGroup.Group1") + proto.RegisterType((*OldWithGroup_Group2)(nil), "unrecognizedgroup.OldWithGroup.Group2") +} +func (this *NewNoGroup) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *A) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup_Group1) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup_Group2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func UnrecognizedgroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3892 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0x1b, 0xe7, + 0x75, 0xd6, 0xe2, 0x46, 0xe0, 0x00, 0x04, 0x97, 0x4b, 0x9a, 0x82, 0xe8, 0x98, 0xa2, 0xe0, 0x1b, + 0x65, 0x37, 0x54, 0x4c, 0x59, 0xb2, 0x04, 0x35, 0x76, 0x41, 0x10, 0x62, 0xe0, 0x92, 0x04, 0xb2, + 0x20, 0xe3, 0x4b, 0xa6, 0xb3, 0xb3, 0x5c, 0xfc, 0x00, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, 0x92, + 0xa9, 0xe9, 0x83, 0x3a, 0xee, 0x2d, 0xd3, 0x69, 0x9b, 0x5e, 0x66, 0x9a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xd2, 0x02, 0x64, 0xdc, 0x43, 0xd3, 0x53, 0x5f, + 0x29, 0x15, 0x48, 0x84, 0xb0, 0xa7, 0xf2, 0x37, 0x33, 0x30, 0x13, 0x27, 0xc4, 0xae, 0x41, 0xba, + 0x8b, 0x67, 0x59, 0x4a, 0x9c, 0xc4, 0x07, 0x14, 0x13, 0x76, 0x62, 0xe6, 0xc7, 0x74, 0x62, 0x15, + 0xf2, 0x26, 0x72, 0x3d, 0xd4, 0xa1, 0x11, 0x91, 0x8c, 0x19, 0x53, 0x40, 0x41, 0xe3, 0x21, 0x95, + 0xfa, 0xb1, 0x42, 0xea, 0x45, 0x98, 0xf1, 0x4d, 0x52, 0x1c, 0xd5, 0xec, 0xf1, 0xd8, 0xbc, 0x10, + 0x65, 0xc9, 0x6a, 0x9d, 0xe3, 0x64, 0x0c, 0x93, 0x8b, 0x28, 0xf4, 0x2c, 0x6d, 0x00, 0x58, 0x26, + 0xb2, 0xba, 0x4a, 0x07, 0x69, 0x46, 0x29, 0x7b, 0x84, 0x97, 0x9a, 0x58, 0x65, 0xcc, 0x4b, 0x16, + 0x95, 0x6a, 0x86, 0x74, 0x75, 0x18, 0x6a, 0x53, 0x47, 0x44, 0xca, 0x36, 0xdd, 0x64, 0x63, 0xd1, + 0xb6, 0x07, 0x45, 0x07, 0xe1, 0xb8, 0x47, 0x1d, 0x36, 0xb3, 0x1c, 0x31, 0x62, 0x35, 0x72, 0x66, + 0x32, 0x83, 0xd1, 0x89, 0x4d, 0x3b, 0xc1, 0x47, 0xe9, 0x61, 0xf0, 0x05, 0x0a, 0x09, 0x2b, 0x20, + 0x59, 0xa8, 0xc0, 0x85, 0x3b, 0x6a, 0x1f, 0x2d, 0xde, 0x81, 0x62, 0xd8, 0x3d, 0xd2, 0x3c, 0xa4, + 0x5d, 0x4f, 0x75, 0x3c, 0x12, 0x85, 0x69, 0x99, 0x3e, 0x48, 0x22, 0x24, 0x91, 0xd9, 0x21, 0x59, + 0x2e, 0x2d, 0xe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 0x85, 0x5f, 0xbd, 0x77, 0x56, 0xf8, 0xcc, 0xbd, 0xb3, 0xc2, 0x17, 0xee, 0x9d, 0x15, 0xca, + 0xe7, 0x41, 0xa8, 0x62, 0xba, 0x2a, 0x61, 0xe0, 0xaf, 0xa1, 0x4f, 0x23, 0xaa, 0xff, 0x98, 0x80, + 0x42, 0xd3, 0xe8, 0xbc, 0xa0, 0x7b, 0x07, 0xc7, 0x5b, 0xf7, 0x2c, 0x64, 0xc8, 0xfb, 0x9e, 0x22, + 0x57, 0xbd, 0xb0, 0xf6, 0xd8, 0x04, 0x53, 0x82, 0x44, 0xab, 0xe4, 0xdf, 0xa7, 0x64, 0x86, 0x3a, + 0x72, 0x76, 0x9c, 0x77, 0x8d, 0xdc, 0x09, 0xc7, 0xe5, 0x5d, 0x63, 0xbc, 0x6b, 0x8b, 0x2d, 0xc8, + 0x6c, 0x86, 0xdf, 0x70, 0x94, 0x5f, 0xd7, 0xf8, 0x0f, 0xe7, 0xe8, 0xd3, 0x51, 0x16, 0x2d, 0x5e, + 0x61, 0x8c, 0x6b, 0xb1, 0x18, 0x87, 0xc8, 0xb5, 0xf5, 0x95, 0x6f, 0xdf, 0x5f, 0x3a, 0xf5, 0xcf, + 0xf7, 0x97, 0x4e, 0xfd, 0xcb, 0xfd, 0xa5, 0x53, 0xdf, 0xbd, 0xbf, 0x24, 0xfc, 0xe0, 0xfe, 0x92, + 0xf0, 0xc3, 0xfb, 0x4b, 0xc2, 0xdd, 0xb7, 0x96, 0x84, 0x2f, 0xbd, 0xb5, 0x24, 0x7c, 0xe5, 0xad, + 0x25, 0xe1, 0x1b, 0x6f, 0x2d, 0x09, 0x3f, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x55, 0x5d, 0xb3, 0xaa, + 0x8a, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *NewNoGroup) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NewNoGroup) + if !ok { + that2, ok := that.(NewNoGroup) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NewNoGroup") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NewNoGroup but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NewNoGroup but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NewNoGroup) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NewNoGroup) + if !ok { + that2, ok := that.(NewNoGroup) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !this.A.Equal(that1.A) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.AField != nil && that1.AField != nil { + if *this.AField != *that1.AField { + return fmt.Errorf("AField this(%v) Not Equal that(%v)", *this.AField, *that1.AField) + } + } else if this.AField != nil { + return fmt.Errorf("this.AField == nil && that.AField != nil") + } else if that1.AField != nil { + return fmt.Errorf("AField this(%v) Not Equal that(%v)", this.AField, that1.AField) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.AField != nil && that1.AField != nil { + if *this.AField != *that1.AField { + return false + } + } else if this.AField != nil { + return false + } else if that1.AField != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup) + if !ok { + that2, ok := that.(OldWithGroup) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Group1.Equal(that1.Group1) { + return fmt.Errorf("Group1 this(%v) Not Equal that(%v)", this.Group1, that1.Group1) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !this.Group2.Equal(that1.Group2) { + return fmt.Errorf("Group2 this(%v) Not Equal that(%v)", this.Group2, that1.Group2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldWithGroup) + if !ok { + that2, ok := that.(OldWithGroup) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !this.Group1.Equal(that1.Group1) { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !this.Group2.Equal(that1.Group2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup_Group1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup_Group1) + if !ok { + that2, ok := that.(OldWithGroup_Group1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup_Group1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup_Group1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup_Group1 but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup_Group1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldWithGroup_Group1) + if !ok { + that2, ok := that.(OldWithGroup_Group1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup_Group2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup_Group2) + if !ok { + that2, ok := that.(OldWithGroup_Group2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup_Group2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup_Group2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup_Group2 but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup_Group2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldWithGroup_Group2) + if !ok { + that2, ok := that.(OldWithGroup_Group2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NewNoGroup) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognizedgroup.NewNoGroup{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unrecognizedgroup.A{") + if this.AField != nil { + s = append(s, "AField: "+valueToGoStringUnrecognizedgroup(this.AField, "int64")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldWithGroup) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&unrecognizedgroup.OldWithGroup{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Group1 != nil { + s = append(s, "Group1: "+fmt.Sprintf("%#v", this.Group1)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Group2 != nil { + s = append(s, "Group2: "+fmt.Sprintf("%#v", this.Group2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldWithGroup_Group1) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognizedgroup.OldWithGroup_Group1{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognizedgroup(this.Field2, "int32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldWithGroup_Group2) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognizedgroup.OldWithGroup_Group2{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringUnrecognizedgroup(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *NewNoGroup) 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 *NewNoGroup) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognizedgroup(dAtA, i, uint64(*m.Field1)) + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x19 + i++ + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if m.A != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognizedgroup(dAtA, i, uint64(m.A.Size())) + n2, err := m.A.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 *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AField != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognizedgroup(dAtA, i, uint64(*m.AField)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintUnrecognizedgroup(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 NewPopulatedNewNoGroup(r randyUnrecognizedgroup, easy bool) *NewNoGroup { + this := &NewNoGroup{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Field1 = &v1 + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field3 = make([]float64, v2) + for i := 0; i < v2; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + this.A = NewPopulatedA(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 6) + } + return this +} + +func NewPopulatedA(r randyUnrecognizedgroup, easy bool) *A { + this := &A{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.AField = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 2) + } + return this +} + +func NewPopulatedOldWithGroup(r randyUnrecognizedgroup, easy bool) *OldWithGroup { + this := &OldWithGroup{} + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field1 = &v4 + } + if r.Intn(10) != 0 { + this.Group1 = NewPopulatedOldWithGroup_Group1(r, easy) + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field3 = make([]float64, v5) + for i := 0; i < v5; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + this.Group2 = NewPopulatedOldWithGroup_Group2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 5) + } + return this +} + +func NewPopulatedOldWithGroup_Group1(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group1 { + this := &OldWithGroup_Group1{} + if r.Intn(10) != 0 { + v6 := int64(r.Int63()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field1 = &v6 + } + if r.Intn(10) != 0 { + v7 := int32(r.Int31()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Field2 = &v7 + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Field3 = make([]float64, v8) + for i := 0; i < v8; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 4) + } + return this +} + +func NewPopulatedOldWithGroup_Group2(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group2 { + this := &OldWithGroup_Group2{} + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field1 = &v9 + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field2 = make([]float64, v10) + for i := 0; i < v10; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 3) + } + return this +} + +type randyUnrecognizedgroup interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnrecognizedgroup(r randyUnrecognizedgroup) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringUnrecognizedgroup(r randyUnrecognizedgroup) string { + v11 := r.Intn(100) + tmps := make([]rune, v11) + for i := 0; i < v11; i++ { + tmps[i] = randUTF8RuneUnrecognizedgroup(r) + } + return string(tmps) +} +func randUnrecognizedUnrecognizedgroup(r randyUnrecognizedgroup, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldUnrecognizedgroup(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldUnrecognizedgroup(dAtA []byte, r randyUnrecognizedgroup, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + v12 := r.Int63() + if r.Intn(2) == 0 { + v12 *= -1 + } + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(v12)) + case 1: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateUnrecognizedgroup(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NewNoGroup) Size() (n int) { + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognizedgroup(uint64(*m.Field1)) + } + if len(m.Field3) > 0 { + n += 9 * len(m.Field3) + } + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnrecognizedgroup(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *A) Size() (n int) { + var l int + _ = l + if m.AField != nil { + n += 1 + sovUnrecognizedgroup(uint64(*m.AField)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovUnrecognizedgroup(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozUnrecognizedgroup(x uint64) (n int) { + return sovUnrecognizedgroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NewNoGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NewNoGroup{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `AField:` + valueToStringUnrecognizedgroup(this.AField) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Group1:` + strings.Replace(fmt.Sprintf("%v", this.Group1), "OldWithGroup_Group1", "OldWithGroup_Group1", 1) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Group2:` + strings.Replace(fmt.Sprintf("%v", this.Group2), "OldWithGroup_Group2", "OldWithGroup_Group2", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup_Group1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup_Group1{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field2:` + valueToStringUnrecognizedgroup(this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup_Group2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup_Group2{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnrecognizedgroup(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *NewNoGroup) 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 ErrIntOverflowUnrecognizedgroup + } + 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: NewNoGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NewNoGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 3: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field3 = append(m.Field3, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if len(m.Field3) == 0 { + m.Field3 = make([]float64, 0, packedLen/8) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field3 = append(m.Field3, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &A{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognizedgroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + 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 *A) 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 ErrIntOverflowUnrecognizedgroup + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AField", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AField = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognizedgroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + 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 skipUnrecognizedgroup(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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrInvalidLengthUnrecognizedgroup + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnrecognizedgroup + } + 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 := skipUnrecognizedgroup(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 ( + ErrInvalidLengthUnrecognizedgroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnrecognizedgroup = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("unrecognizedgroup.proto", fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338) +} + +var fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338 = []byte{ + // 305 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xcd, 0x2b, 0x4a, + 0x4d, 0xce, 0x4f, 0xcf, 0xcb, 0xac, 0x4a, 0x4d, 0x49, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x90, 0x90, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, + 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, + 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x82, 0x52, 0x1e, 0x17, 0x97, 0x5f, 0x6a, 0xb9, 0x5f, 0xbe, 0x3b, + 0x48, 0xb3, 0x90, 0x18, 0x17, 0x9b, 0x5b, 0x66, 0x6a, 0x4e, 0x8a, 0xa1, 0x04, 0xa3, 0x02, 0xa3, + 0x06, 0x73, 0x10, 0x94, 0x07, 0x17, 0x37, 0x96, 0x60, 0x56, 0x60, 0xd6, 0x60, 0x84, 0x8a, 0x1b, + 0x0b, 0x29, 0x71, 0x31, 0x3a, 0x4a, 0xb0, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x89, 0xe8, 0x61, 0x3a, + 0xd2, 0x31, 0x88, 0xd1, 0xd1, 0x8a, 0xa7, 0x63, 0xa1, 0x3c, 0xe3, 0x84, 0x85, 0xf2, 0x8c, 0x0b, + 0x16, 0xca, 0x33, 0x2a, 0x69, 0x72, 0x31, 0x3a, 0x82, 0x8c, 0x73, 0x04, 0x9b, 0x00, 0xb3, 0x06, + 0xc2, 0x43, 0x53, 0x7a, 0x8a, 0x89, 0x8b, 0xc7, 0x3f, 0x27, 0x25, 0x3c, 0xb3, 0x24, 0x03, 0xbf, + 0xeb, 0xec, 0xb8, 0xd8, 0xc0, 0xf6, 0x19, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x19, 0xa9, 0x61, + 0x71, 0x0a, 0xb2, 0x41, 0x7a, 0x60, 0xd2, 0x30, 0x08, 0xaa, 0x0b, 0xa7, 0xef, 0x60, 0xe6, 0x1a, + 0x49, 0xb0, 0x90, 0x60, 0xae, 0x11, 0xd4, 0x5c, 0x23, 0xa9, 0x00, 0x2e, 0x36, 0x77, 0x54, 0x1b, + 0x70, 0x85, 0xab, 0x11, 0xd8, 0xe5, 0xac, 0x50, 0x71, 0x23, 0x5c, 0x2e, 0x92, 0xb2, 0x80, 0x9a, + 0x68, 0x44, 0x94, 0x89, 0x08, 0x9d, 0x46, 0x4e, 0x1a, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, + 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0xc3, 0x83, 0x87, 0x72, 0x8c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, + 0x28, 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x0d, 0x8f, 0xe4, 0x18, 0x77, + 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xef, 0x1c, 0xa5, 0xe4, 0x6d, 0x02, 0x00, + 0x00, +} diff --git a/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto new file mode 100644 index 000000000..2e5813658 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto @@ -0,0 +1,77 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package unrecognizedgroup; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +message NewNoGroup { + option (gogoproto.unmarshaler) = true; + option (gogoproto.marshaler) = true; + option (gogoproto.sizer) = true; + optional int64 Field1 = 1; + repeated double Field3 = 3; + optional A A = 5; +} + +message A { + option (gogoproto.unmarshaler) = true; + option (gogoproto.marshaler) = true; + option (gogoproto.sizer) = true; + optional int64 AField = 1; +} + +message OldWithGroup { + optional int64 Field1 = 1; + optional group Group1 = 2 { + optional int64 Field1 = 1; + optional int32 Field2 = 2; + repeated double Field3 = 3; + } + repeated double Field3 = 3; + optional group Group2 = 4 { + optional int64 Field1 = 1; + repeated double Field2 = 2; + } +} + diff --git a/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go new file mode 100644 index 000000000..b27f08737 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go @@ -0,0 +1,756 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognizedgroup.proto + +package unrecognizedgroup + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNewNoGroupProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNewNoGroupMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldWithGroup_Group1Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldWithGroup_Group2Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNewNoGroupJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroupJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroup_Group1JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group1{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroup_Group2JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group2{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNewNoGroupProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNewNoGroupProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group1ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group1ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group2ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group2ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedgroupDescription(t *testing.T) { + UnrecognizedgroupDescription() +} +func TestNewNoGroupVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroupVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroup_Group1VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroup_Group2VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNewNoGroupGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldWithGroupGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldWithGroup_Group1GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldWithGroup_Group2GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNewNoGroupSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestNewNoGroupStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroupStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroup_Group1Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroup_Group2Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/deps/github.com/gogo/protobuf/test/uuid.go b/deps/github.com/gogo/protobuf/test/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/uuid.go @@ -0,0 +1,137 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/deps/github.com/gogo/protobuf/test/uuid_test.go b/deps/github.com/gogo/protobuf/test/uuid_test.go new file mode 100644 index 000000000..5f3b72801 --- /dev/null +++ b/deps/github.com/gogo/protobuf/test/uuid_test.go @@ -0,0 +1,51 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestBugUuid(t *testing.T) { + u := &CustomContainer{CustomStruct: NidOptCustom{Id: Uuid{}}} + data, err := proto.Marshal(u) + if err != nil { + panic(err) + } + u2 := &CustomContainer{} + err = proto.Unmarshal(data, u2) + if err != nil { + panic(err) + } + t.Logf("%+v", u2) + if u2.CustomStruct.Id != nil { + t.Fatalf("should be nil") + } +} diff --git a/deps/github.com/gogo/protobuf/types/any.go b/deps/github.com/gogo/protobuf/types/any.go new file mode 100644 index 000000000..df4787de3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/any.go @@ -0,0 +1,140 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +// This file implements functions to marshal proto.Message to/from +// google.protobuf.Any message. + +import ( + "fmt" + "reflect" + "strings" + + "github.com/gogo/protobuf/proto" +) + +const googleApis = "type.googleapis.com/" + +// AnyMessageName returns the name of the message contained in a google.protobuf.Any message. +// +// Note that regular type assertions should be done using the Is +// function. AnyMessageName is provided for less common use cases like filtering a +// sequence of Any messages based on a set of allowed message type names. +func AnyMessageName(any *Any) (string, error) { + if any == nil { + return "", fmt.Errorf("message is nil") + } + slash := strings.LastIndex(any.TypeUrl, "/") + if slash < 0 { + return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) + } + return any.TypeUrl[slash+1:], nil +} + +// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any. +func MarshalAny(pb proto.Message) (*Any, error) { + value, err := proto.Marshal(pb) + if err != nil { + return nil, err + } + return &Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil +} + +// DynamicAny is a value that can be passed to UnmarshalAny to automatically +// allocate a proto.Message for the type specified in a google.protobuf.Any +// message. The allocated message is stored in the embedded proto.Message. +// +// Example: +// +// var x ptypes.DynamicAny +// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } +// fmt.Printf("unmarshaled message: %v", x.Message) +type DynamicAny struct { + proto.Message +} + +// Empty returns a new proto.Message of the type specified in a +// google.protobuf.Any message. It returns an error if corresponding message +// type isn't linked in. +func EmptyAny(any *Any) (proto.Message, error) { + aname, err := AnyMessageName(any) + if err != nil { + return nil, err + } + + t := proto.MessageType(aname) + if t == nil { + return nil, fmt.Errorf("any: message type %q isn't linked in", aname) + } + return reflect.New(t.Elem()).Interface().(proto.Message), nil +} + +// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any +// message and places the decoded result in pb. It returns an error if type of +// contents of Any message does not match type of pb message. +// +// pb can be a proto.Message, or a *DynamicAny. +func UnmarshalAny(any *Any, pb proto.Message) error { + if d, ok := pb.(*DynamicAny); ok { + if d.Message == nil { + var err error + d.Message, err = EmptyAny(any) + if err != nil { + return err + } + } + return UnmarshalAny(any, d.Message) + } + + aname, err := AnyMessageName(any) + if err != nil { + return err + } + + mname := proto.MessageName(pb) + if aname != mname { + return fmt.Errorf("mismatched message type: got %q want %q", aname, mname) + } + return proto.Unmarshal(any.Value, pb) +} + +// Is returns true if any value contains a given message type. +func Is(any *Any, pb proto.Message) bool { + // The following is equivalent to AnyMessageName(any) == proto.MessageName(pb), + // but it avoids scanning TypeUrl for the slash. + if any == nil { + return false + } + name := proto.MessageName(pb) + prefix := len(any.TypeUrl) - len(name) + return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name +} diff --git a/deps/github.com/gogo/protobuf/types/any.pb.go b/deps/github.com/gogo/protobuf/types/any.pb.go new file mode 100644 index 000000000..6e3ffcc0e --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/any.pb.go @@ -0,0 +1,700 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/any.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +type Any struct { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // Must be a valid serialized protocol buffer of the above specified type. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Any) Reset() { *m = Any{} } +func (*Any) ProtoMessage() {} +func (*Any) Descriptor() ([]byte, []int) { + return fileDescriptor_any_f098d1a3c592d16a, []int{0} +} +func (*Any) XXX_WellKnownType() string { return "Any" } +func (m *Any) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Any.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Any) XXX_Merge(src proto.Message) { + xxx_messageInfo_Any.Merge(dst, src) +} +func (m *Any) XXX_Size() int { + return m.Size() +} +func (m *Any) XXX_DiscardUnknown() { + xxx_messageInfo_Any.DiscardUnknown(m) +} + +var xxx_messageInfo_Any proto.InternalMessageInfo + +func (m *Any) GetTypeUrl() string { + if m != nil { + return m.TypeUrl + } + return "" +} + +func (m *Any) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (*Any) XXX_MessageName() string { + return "google.protobuf.Any" +} +func init() { + proto.RegisterType((*Any)(nil), "google.protobuf.Any") +} +func (this *Any) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Any) + if !ok { + that2, ok := that.(Any) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.TypeUrl != that1.TypeUrl { + if this.TypeUrl < that1.TypeUrl { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Value, that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Any) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Any) + if !ok { + that2, ok := that.(Any) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.TypeUrl != that1.TypeUrl { + return false + } + if !bytes.Equal(this.Value, that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Any) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Any{") + s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringAny(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Any) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.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 len(m.TypeUrl) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAny(dAtA, i, uint64(len(m.TypeUrl))) + i += copy(dAtA[i:], m.TypeUrl) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAny(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintAny(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 NewPopulatedAny(r randyAny, easy bool) *Any { + this := &Any{} + this.TypeUrl = string(randStringAny(r)) + v1 := r.Intn(100) + this.Value = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Value[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAny(r, 3) + } + return this +} + +type randyAny interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAny(r randyAny) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAny(r randyAny) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneAny(r) + } + return string(tmps) +} +func randUnrecognizedAny(r randyAny, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldAny(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldAny(dAtA []byte, r randyAny, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateAny(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateAny(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateAny(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Any) Size() (n int) { + var l int + _ = l + l = len(m.TypeUrl) + if l > 0 { + n += 1 + l + sovAny(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovAny(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAny(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAny(x uint64) (n int) { + return sovAny(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Any) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Any{`, + `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringAny(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Any) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Any: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAny + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAny + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAny(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAny + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAny(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAny + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAny + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowAny + } + 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, ErrInvalidLengthAny + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAny + } + 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 := skipAny(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 ( + ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAny = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_any_f098d1a3c592d16a) } + +var fileDescriptor_any_f098d1a3c592d16a = []byte{ + // 211 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, + 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a, + 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, + 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, + 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xaa, 0xbf, 0xf1, 0x50, 0x8e, + 0xe1, 0xc3, 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x1b, 0x1e, 0xc9, 0x31, 0xae, 0x78, 0x24, + 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, + 0x24, 0xc7, 0xf0, 0x01, 0x24, 0xfe, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0x46, 0x2e, 0xe1, 0xe4, + 0xfc, 0x5c, 0x3d, 0x34, 0xeb, 0x9d, 0x38, 0x1c, 0xf3, 0x2a, 0x03, 0x40, 0x9c, 0x00, 0xc6, 0x28, + 0x56, 0x90, 0x8d, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x94, + 0x06, 0x40, 0x95, 0xea, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, 0x94, + 0x25, 0xb1, 0x81, 0xcd, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x81, 0x82, 0xd3, 0xed, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/any_test.go b/deps/github.com/gogo/protobuf/types/any_test.go new file mode 100644 index 000000000..5e41cb2e3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/any_test.go @@ -0,0 +1,153 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func TestMarshalUnmarshal(t *testing.T) { + orig := &Any{Value: []byte("test")} + + packed, err := MarshalAny(orig) + if err != nil { + t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err) + } + + unpacked := &Any{} + err = UnmarshalAny(packed, unpacked) + if err != nil || !proto.Equal(unpacked, orig) { + t.Errorf("got: %v, %+v; want nil, %+v", err, unpacked, orig) + } +} + +func TestIs(t *testing.T) { + a, err := MarshalAny(&pb.FileDescriptorProto{}) + if err != nil { + t.Fatal(err) + } + if Is(a, &pb.DescriptorProto{}) { + // No spurious match for message names of different length. + t.Error("FileDescriptorProto is not a DescriptorProto, but Is says it is") + } + if Is(a, &pb.EnumDescriptorProto{}) { + // No spurious match for message names of equal length. + t.Error("FileDescriptorProto is not an EnumDescriptorProto, but Is says it is") + } + if !Is(a, &pb.FileDescriptorProto{}) { + t.Error("FileDescriptorProto is indeed a FileDescriptorProto, but Is says it is not") + } +} + +func TestIsDifferentUrlPrefixes(t *testing.T) { + m := &pb.FileDescriptorProto{} + a := &Any{TypeUrl: "foo/bar/" + proto.MessageName(m)} + if !Is(a, m) { + t.Errorf("message with type url %q didn't satisfy Is for type %q", a.TypeUrl, proto.MessageName(m)) + } +} + +func TestIsCornerCases(t *testing.T) { + m := &pb.FileDescriptorProto{} + if Is(nil, m) { + t.Errorf("message with nil type url incorrectly claimed to be %q", proto.MessageName(m)) + } + noPrefix := &Any{TypeUrl: proto.MessageName(m)} + if Is(noPrefix, m) { + t.Errorf("message with type url %q incorrectly claimed to be %q", noPrefix.TypeUrl, proto.MessageName(m)) + } + shortPrefix := &Any{TypeUrl: "/" + proto.MessageName(m)} + if !Is(shortPrefix, m) { + t.Errorf("message with type url %q didn't satisfy Is for type %q", shortPrefix.TypeUrl, proto.MessageName(m)) + } +} + +func TestUnmarshalDynamic(t *testing.T) { + want := &pb.FileDescriptorProto{Name: proto.String("foo")} + a, err := MarshalAny(want) + if err != nil { + t.Fatal(err) + } + var got DynamicAny + if err := UnmarshalAny(a, &got); err != nil { + t.Fatal(err) + } + if !proto.Equal(got.Message, want) { + t.Errorf("invalid result from UnmarshalAny, got %q want %q", got.Message, want) + } +} + +func TestEmpty(t *testing.T) { + want := &pb.FileDescriptorProto{} + a, err := MarshalAny(want) + if err != nil { + t.Fatal(err) + } + got, err := EmptyAny(a) + if err != nil { + t.Fatal(err) + } + if !proto.Equal(got, want) { + t.Errorf("unequal empty message, got %q, want %q", got, want) + } + + // that's a valid type_url for a message which shouldn't be linked into this + // test binary. We want an error. + a.TypeUrl = "type.googleapis.com/google.protobuf.TestAny" + if _, err := EmptyAny(a); err == nil { + t.Errorf("got no error for an attempt to create a message of type %q, which shouldn't be linked in", a.TypeUrl) + } +} + +func TestEmptyCornerCases(t *testing.T) { + _, err := EmptyAny(nil) + if err == nil { + t.Error("expected Empty for nil to fail") + } + want := &pb.FileDescriptorProto{} + noPrefix := &Any{TypeUrl: proto.MessageName(want)} + _, err = EmptyAny(noPrefix) + if err == nil { + t.Errorf("expected Empty for any type %q to fail", noPrefix.TypeUrl) + } + shortPrefix := &Any{TypeUrl: "/" + proto.MessageName(want)} + got, err := EmptyAny(shortPrefix) + if err != nil { + t.Errorf("Empty for any type %q failed: %s", shortPrefix.TypeUrl, err) + } + if !proto.Equal(got, want) { + t.Errorf("Empty for any type %q differs, got %q, want %q", shortPrefix.TypeUrl, got, want) + } +} diff --git a/deps/github.com/gogo/protobuf/types/api.pb.go b/deps/github.com/gogo/protobuf/types/api.pb.go new file mode 100644 index 000000000..84b044380 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/api.pb.go @@ -0,0 +1,2058 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/api.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// Api is a light-weight descriptor for an API Interface. +// +// Interfaces are also described as "protocol buffer services" in some contexts, +// such as by the "service" keyword in a .proto file, but they are different +// from API Services, which represent a concrete implementation of an interface +// as opposed to simply a description of methods and bindings. They are also +// sometimes simply referred to as "APIs" in other contexts, such as the name of +// this message itself. See https://cloud.google.com/apis/design/glossary for +// detailed terminology. +type Api struct { + // The fully qualified name of this interface, including package name + // followed by the interface's simple name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The methods of this interface, in unspecified order. + Methods []*Method `protobuf:"bytes,2,rep,name=methods" json:"methods,omitempty"` + // Any metadata attached to the interface. + Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"` + // A version string for this interface. If specified, must have the form + // `major-version.minor-version`, as in `1.10`. If the minor version is + // omitted, it defaults to zero. If the entire version field is empty, the + // major version is derived from the package name, as outlined below. If the + // field is not empty, the version in the package name will be verified to be + // consistent with what is provided here. + // + // The versioning schema uses [semantic + // versioning](http://semver.org) where the major version number + // indicates a breaking change and the minor version an additive, + // non-breaking change. Both version numbers are signals to users + // what to expect from different versions, and should be carefully + // chosen based on the product plan. + // + // The major version is also reflected in the package name of the + // interface, which must end in `v`, as in + // `google.feature.v1`. For major versions 0 and 1, the suffix can + // be omitted. Zero major versions must only be used for + // experimental, non-GA interfaces. + // + // + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + // Source context for the protocol buffer service represented by this + // message. + SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"` + // Included interfaces. See [Mixin][]. + Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins" json:"mixins,omitempty"` + // The source syntax of the service. + Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Api) Reset() { *m = Api{} } +func (*Api) ProtoMessage() {} +func (*Api) Descriptor() ([]byte, []int) { + return fileDescriptor_api_a4406062c749da1f, []int{0} +} +func (m *Api) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Api) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Api.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Api) XXX_Merge(src proto.Message) { + xxx_messageInfo_Api.Merge(dst, src) +} +func (m *Api) XXX_Size() int { + return m.Size() +} +func (m *Api) XXX_DiscardUnknown() { + xxx_messageInfo_Api.DiscardUnknown(m) +} + +var xxx_messageInfo_Api proto.InternalMessageInfo + +func (m *Api) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Api) GetMethods() []*Method { + if m != nil { + return m.Methods + } + return nil +} + +func (m *Api) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Api) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Api) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Api) GetMixins() []*Mixin { + if m != nil { + return m.Mixins + } + return nil +} + +func (m *Api) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Api) XXX_MessageName() string { + return "google.protobuf.Api" +} + +// Method represents a method of an API interface. +type Method struct { + // The simple name of this method. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A URL of the input message type. + RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl,proto3" json:"request_type_url,omitempty"` + // If true, the request is streamed. + RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming,proto3" json:"request_streaming,omitempty"` + // The URL of the output message type. + ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl,proto3" json:"response_type_url,omitempty"` + // If true, the response is streamed. + ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming,proto3" json:"response_streaming,omitempty"` + // Any metadata attached to the method. + Options []*Option `protobuf:"bytes,6,rep,name=options" json:"options,omitempty"` + // The source syntax of this method. + Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Method) Reset() { *m = Method{} } +func (*Method) ProtoMessage() {} +func (*Method) Descriptor() ([]byte, []int) { + return fileDescriptor_api_a4406062c749da1f, []int{1} +} +func (m *Method) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Method) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Method.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Method) XXX_Merge(src proto.Message) { + xxx_messageInfo_Method.Merge(dst, src) +} +func (m *Method) XXX_Size() int { + return m.Size() +} +func (m *Method) XXX_DiscardUnknown() { + xxx_messageInfo_Method.DiscardUnknown(m) +} + +var xxx_messageInfo_Method proto.InternalMessageInfo + +func (m *Method) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Method) GetRequestTypeUrl() string { + if m != nil { + return m.RequestTypeUrl + } + return "" +} + +func (m *Method) GetRequestStreaming() bool { + if m != nil { + return m.RequestStreaming + } + return false +} + +func (m *Method) GetResponseTypeUrl() string { + if m != nil { + return m.ResponseTypeUrl + } + return "" +} + +func (m *Method) GetResponseStreaming() bool { + if m != nil { + return m.ResponseStreaming + } + return false +} + +func (m *Method) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Method) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Method) XXX_MessageName() string { + return "google.protobuf.Method" +} + +// Declares an API Interface to be included in this interface. The including +// interface must redeclare all the methods from the included interface, but +// documentation and options are inherited as follows: +// +// - If after comment and whitespace stripping, the documentation +// string of the redeclared method is empty, it will be inherited +// from the original method. +// +// - Each annotation belonging to the service config (http, +// visibility) which is not set in the redeclared method will be +// inherited. +// +// - If an http annotation is inherited, the path pattern will be +// modified as follows. Any version prefix will be replaced by the +// version of the including interface plus the [root][] path if +// specified. +// +// Example of a simple mixin: +// +// package google.acl.v1; +// service AccessControl { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v1/{resource=**}:getAcl"; +// } +// } +// +// package google.storage.v2; +// service Storage { +// rpc GetAcl(GetAclRequest) returns (Acl); +// +// // Get a data record. +// rpc GetData(GetDataRequest) returns (Data) { +// option (google.api.http).get = "/v2/{resource=**}"; +// } +// } +// +// Example of a mixin configuration: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// +// The mixin construct implies that all methods in `AccessControl` are +// also declared with same name and request/response types in +// `Storage`. A documentation generator or annotation processor will +// see the effective `Storage.GetAcl` method after inherting +// documentation and annotations as follows: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/{resource=**}:getAcl"; +// } +// ... +// } +// +// Note how the version in the path pattern changed from `v1` to `v2`. +// +// If the `root` field in the mixin is specified, it should be a +// relative path under which inherited HTTP paths are placed. Example: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// root: acls +// +// This implies the following inherited HTTP annotation: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; +// } +// ... +// } +type Mixin struct { + // The fully qualified name of the interface which is included. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If non-empty specifies a path under which inherited HTTP paths + // are rooted. + Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Mixin) Reset() { *m = Mixin{} } +func (*Mixin) ProtoMessage() {} +func (*Mixin) Descriptor() ([]byte, []int) { + return fileDescriptor_api_a4406062c749da1f, []int{2} +} +func (m *Mixin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Mixin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Mixin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Mixin) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mixin.Merge(dst, src) +} +func (m *Mixin) XXX_Size() int { + return m.Size() +} +func (m *Mixin) XXX_DiscardUnknown() { + xxx_messageInfo_Mixin.DiscardUnknown(m) +} + +var xxx_messageInfo_Mixin proto.InternalMessageInfo + +func (m *Mixin) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Mixin) GetRoot() string { + if m != nil { + return m.Root + } + return "" +} + +func (*Mixin) XXX_MessageName() string { + return "google.protobuf.Mixin" +} +func init() { + proto.RegisterType((*Api)(nil), "google.protobuf.Api") + proto.RegisterType((*Method)(nil), "google.protobuf.Method") + proto.RegisterType((*Mixin)(nil), "google.protobuf.Mixin") +} +func (this *Api) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Api) + if !ok { + that2, ok := that.(Api) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Methods) != len(that1.Methods) { + if len(this.Methods) < len(that1.Methods) { + return -1 + } + return 1 + } + for i := range this.Methods { + if c := this.Methods[i].Compare(that1.Methods[i]); c != 0 { + return c + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.Version != that1.Version { + if this.Version < that1.Version { + return -1 + } + return 1 + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if len(this.Mixins) != len(that1.Mixins) { + if len(this.Mixins) < len(that1.Mixins) { + return -1 + } + return 1 + } + for i := range this.Mixins { + if c := this.Mixins[i].Compare(that1.Mixins[i]); c != 0 { + return c + } + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Method) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Method) + if !ok { + that2, ok := that.(Method) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.RequestTypeUrl != that1.RequestTypeUrl { + if this.RequestTypeUrl < that1.RequestTypeUrl { + return -1 + } + return 1 + } + if this.RequestStreaming != that1.RequestStreaming { + if !this.RequestStreaming { + return -1 + } + return 1 + } + if this.ResponseTypeUrl != that1.ResponseTypeUrl { + if this.ResponseTypeUrl < that1.ResponseTypeUrl { + return -1 + } + return 1 + } + if this.ResponseStreaming != that1.ResponseStreaming { + if !this.ResponseStreaming { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Mixin) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Mixin) + if !ok { + that2, ok := that.(Mixin) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.Root != that1.Root { + if this.Root < that1.Root { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Api) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Api) + if !ok { + that2, ok := that.(Api) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Methods) != len(that1.Methods) { + return false + } + for i := range this.Methods { + if !this.Methods[i].Equal(that1.Methods[i]) { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.Version != that1.Version { + return false + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if len(this.Mixins) != len(that1.Mixins) { + return false + } + for i := range this.Mixins { + if !this.Mixins[i].Equal(that1.Mixins[i]) { + return false + } + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Method) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Method) + if !ok { + that2, ok := that.(Method) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.RequestTypeUrl != that1.RequestTypeUrl { + return false + } + if this.RequestStreaming != that1.RequestStreaming { + return false + } + if this.ResponseTypeUrl != that1.ResponseTypeUrl { + return false + } + if this.ResponseStreaming != that1.ResponseStreaming { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Mixin) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Mixin) + if !ok { + that2, ok := that.(Mixin) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Root != that1.Root { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Api) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&types.Api{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Methods != nil { + s = append(s, "Methods: "+fmt.Sprintf("%#v", this.Methods)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + if this.Mixins != nil { + s = append(s, "Mixins: "+fmt.Sprintf("%#v", this.Mixins)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Method) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&types.Method{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "RequestTypeUrl: "+fmt.Sprintf("%#v", this.RequestTypeUrl)+",\n") + s = append(s, "RequestStreaming: "+fmt.Sprintf("%#v", this.RequestStreaming)+",\n") + s = append(s, "ResponseTypeUrl: "+fmt.Sprintf("%#v", this.ResponseTypeUrl)+",\n") + s = append(s, "ResponseStreaming: "+fmt.Sprintf("%#v", this.ResponseStreaming)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Mixin) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Mixin{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Root: "+fmt.Sprintf("%#v", this.Root)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringApi(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Api) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Api) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Methods) > 0 { + for _, msg := range m.Methods { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x1a + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Version) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + } + if m.SourceContext != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SourceContext.Size())) + n1, err := m.SourceContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.Mixins) > 0 { + for _, msg := range m.Mixins { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Syntax != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Method) 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 *Method) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.RequestTypeUrl) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.RequestTypeUrl))) + i += copy(dAtA[i:], m.RequestTypeUrl) + } + if m.RequestStreaming { + dAtA[i] = 0x18 + i++ + if m.RequestStreaming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.ResponseTypeUrl) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ResponseTypeUrl))) + i += copy(dAtA[i:], m.ResponseTypeUrl) + } + if m.ResponseStreaming { + dAtA[i] = 0x28 + i++ + if m.ResponseStreaming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x32 + i++ + i = encodeVarintApi(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Syntax != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Mixin) 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 *Mixin) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Root) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Root))) + i += copy(dAtA[i:], m.Root) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintApi(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 NewPopulatedApi(r randyApi, easy bool) *Api { + this := &Api{} + this.Name = string(randStringApi(r)) + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Methods = make([]*Method, v1) + for i := 0; i < v1; i++ { + this.Methods[i] = NewPopulatedMethod(r, easy) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Options = make([]*Option, v2) + for i := 0; i < v2; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.Version = string(randStringApi(r)) + if r.Intn(10) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(5) + this.Mixins = make([]*Mixin, v3) + for i := 0; i < v3; i++ { + this.Mixins[i] = NewPopulatedMixin(r, easy) + } + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 8) + } + return this +} + +func NewPopulatedMethod(r randyApi, easy bool) *Method { + this := &Method{} + this.Name = string(randStringApi(r)) + this.RequestTypeUrl = string(randStringApi(r)) + this.RequestStreaming = bool(bool(r.Intn(2) == 0)) + this.ResponseTypeUrl = string(randStringApi(r)) + this.ResponseStreaming = bool(bool(r.Intn(2) == 0)) + if r.Intn(10) != 0 { + v4 := r.Intn(5) + this.Options = make([]*Option, v4) + for i := 0; i < v4; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 8) + } + return this +} + +func NewPopulatedMixin(r randyApi, easy bool) *Mixin { + this := &Mixin{} + this.Name = string(randStringApi(r)) + this.Root = string(randStringApi(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 3) + } + return this +} + +type randyApi interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneApi(r randyApi) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringApi(r randyApi) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneApi(r) + } + return string(tmps) +} +func randUnrecognizedApi(r randyApi, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldApi(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldApi(dAtA []byte, r randyApi, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateApi(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateApi(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateApi(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Api) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Methods) > 0 { + for _, e := range m.Methods { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Mixins) > 0 { + for _, e := range m.Mixins { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Syntax != 0 { + n += 1 + sovApi(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Method) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RequestTypeUrl) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.RequestStreaming { + n += 2 + } + l = len(m.ResponseTypeUrl) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ResponseStreaming { + n += 2 + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Syntax != 0 { + n += 1 + sovApi(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Mixin) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Root) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovApi(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozApi(x uint64) (n int) { + return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Api) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Api{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Methods:` + strings.Replace(fmt.Sprintf("%v", this.Methods), "Method", "Method", 1) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Mixins:` + strings.Replace(fmt.Sprintf("%v", this.Mixins), "Mixin", "Mixin", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Method) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Method{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `RequestTypeUrl:` + fmt.Sprintf("%v", this.RequestTypeUrl) + `,`, + `RequestStreaming:` + fmt.Sprintf("%v", this.RequestStreaming) + `,`, + `ResponseTypeUrl:` + fmt.Sprintf("%v", this.ResponseTypeUrl) + `,`, + `ResponseStreaming:` + fmt.Sprintf("%v", this.ResponseStreaming) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Mixin) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Mixin{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Root:` + fmt.Sprintf("%v", this.Root) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringApi(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Api) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Api: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Api: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Methods = append(m.Methods, &Method{}) + if err := m.Methods[len(m.Methods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mixins", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mixins = append(m.Mixins, &Mixin{}) + if err := m.Mixins[len(m.Mixins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Method) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Method: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Method: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStreaming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RequestStreaming = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResponseTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseStreaming", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ResponseStreaming = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Mixin) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mixin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mixin: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Root = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipApi(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowApi + } + 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, ErrInvalidLengthApi + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowApi + } + 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 := skipApi(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 ( + ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("google/protobuf/api.proto", fileDescriptor_api_a4406062c749da1f) } + +var fileDescriptor_api_a4406062c749da1f = []byte{ + // 467 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xeb, 0xbb, 0xe4, 0x52, 0x5c, 0x91, 0x82, 0x91, 0xc0, 0x64, 0xb0, 0x4e, 0x15, 0xc3, + 0x09, 0xc4, 0x45, 0x94, 0x4f, 0xd0, 0x20, 0xd4, 0x01, 0x21, 0xa2, 0x0b, 0x08, 0x89, 0x25, 0x4a, + 0x83, 0x09, 0x96, 0xee, 0x6c, 0x63, 0x3b, 0x90, 0x4c, 0xf0, 0x59, 0x98, 0x10, 0x23, 0xdf, 0x80, + 0xad, 0x23, 0x23, 0x23, 0xb9, 0x2e, 0x8c, 0x1d, 0x19, 0x91, 0x7d, 0xe7, 0xa6, 0x5c, 0x83, 0x04, + 0x9b, 0xdf, 0xfb, 0xff, 0xfc, 0xf7, 0x7b, 0x7f, 0xc3, 0x9b, 0x33, 0x21, 0x66, 0x39, 0xed, 0x4b, + 0x25, 0x8c, 0x38, 0x9a, 0xbf, 0xea, 0x4f, 0x24, 0x4b, 0x5d, 0x81, 0x76, 0x2b, 0x29, 0xf5, 0x52, + 0xef, 0x56, 0x93, 0xd5, 0x62, 0xae, 0xa6, 0x74, 0x3c, 0x15, 0xdc, 0xd0, 0x85, 0xa9, 0xc0, 0x5e, + 0xaf, 0x49, 0x99, 0xa5, 0xac, 0x4d, 0xf6, 0xbe, 0x06, 0x30, 0x3c, 0x90, 0x0c, 0x21, 0xd8, 0xe2, + 0x93, 0x82, 0x62, 0x10, 0x83, 0xe4, 0x52, 0xe6, 0xce, 0xe8, 0x1e, 0xec, 0x14, 0xd4, 0xbc, 0x16, + 0x2f, 0x35, 0x0e, 0xe2, 0x30, 0xd9, 0xd9, 0xbf, 0x91, 0x36, 0x06, 0x48, 0x1f, 0x3b, 0x3d, 0xf3, + 0x9c, 0xbd, 0x22, 0xa4, 0x61, 0x82, 0x6b, 0x1c, 0xfe, 0xe5, 0xca, 0x13, 0xa7, 0x67, 0x9e, 0x43, + 0x18, 0x76, 0xde, 0x52, 0xa5, 0x99, 0xe0, 0xb8, 0xe5, 0x1e, 0xf7, 0x25, 0x7a, 0x08, 0xbb, 0x7f, + 0xee, 0x83, 0xdb, 0x31, 0x48, 0x76, 0xf6, 0xc9, 0x05, 0xcf, 0x91, 0xc3, 0x1e, 0x54, 0x54, 0x76, + 0x59, 0x9f, 0x2f, 0x51, 0x0a, 0xa3, 0x82, 0x2d, 0x18, 0xd7, 0x38, 0x72, 0x23, 0x5d, 0xbf, 0xb8, + 0x85, 0x95, 0xb3, 0x9a, 0x42, 0x7d, 0x18, 0xe9, 0x25, 0x37, 0x93, 0x05, 0xee, 0xc4, 0x20, 0xe9, + 0x6e, 0x58, 0x61, 0xe4, 0xe4, 0xac, 0xc6, 0xf6, 0xbe, 0x04, 0x30, 0xaa, 0x82, 0xd8, 0x18, 0x63, + 0x02, 0xaf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 0x00, 0xff, 0xff, 0x2b, 0x64, 0x40, 0x40, 0xa1, + 0x03, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/doc.go b/deps/github.com/gogo/protobuf/types/doc.go new file mode 100644 index 000000000..ff2810af1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/doc.go @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package types contains code for interacting with well-known types. +*/ +package types diff --git a/deps/github.com/gogo/protobuf/types/duration.go b/deps/github.com/gogo/protobuf/types/duration.go new file mode 100644 index 000000000..475d61f1d --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/duration.go @@ -0,0 +1,100 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +// This file implements conversions between google.protobuf.Duration +// and time.Duration. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Range of a Duration in seconds, as specified in + // google/protobuf/duration.proto. This is about 10,000 years in seconds. + maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) + minSeconds = -maxSeconds +) + +// validateDuration determines whether the Duration is valid according to the +// definition in google/protobuf/duration.proto. A valid Duration +// may still be too large to fit into a time.Duration (the range of Duration +// is about 10,000 years, and the range of time.Duration is about 290). +func validateDuration(d *Duration) error { + if d == nil { + return errors.New("duration: nil Duration") + } + if d.Seconds < minSeconds || d.Seconds > maxSeconds { + return fmt.Errorf("duration: %#v: seconds out of range", d) + } + if d.Nanos <= -1e9 || d.Nanos >= 1e9 { + return fmt.Errorf("duration: %#v: nanos out of range", d) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { + return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) + } + return nil +} + +// DurationFromProto converts a Duration to a time.Duration. DurationFromProto +// returns an error if the Duration is invalid or is too large to be +// represented in a time.Duration. +func DurationFromProto(p *Duration) (time.Duration, error) { + if err := validateDuration(p); err != nil { + return 0, err + } + d := time.Duration(p.Seconds) * time.Second + if int64(d/time.Second) != p.Seconds { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + if p.Nanos != 0 { + d += time.Duration(p.Nanos) + if (d < 0) != (p.Nanos < 0) { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a Duration. +func DurationProto(d time.Duration) *Duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &Duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} diff --git a/deps/github.com/gogo/protobuf/types/duration.pb.go b/deps/github.com/gogo/protobuf/types/duration.pb.go new file mode 100644 index 000000000..345e0f323 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/duration.pb.go @@ -0,0 +1,534 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/duration.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// two Timestamp values is a Duration and it can be added or subtracted +// from a Timestamp. Range is approximately +-10,000 years. +// +// # Examples +// +// Example 1: Compute Duration from two Timestamps in pseudo code. +// +// Timestamp start = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (durations.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// end.nanos -= 1000000000; +// } +// +// Example 3: Compute Duration from datetime.timedelta in Python. +// +// td = datetime.timedelta(days=3, minutes=10) +// duration = Duration() +// duration.FromTimedelta(td) +// +// # JSON Mapping +// +// In JSON format, the Duration type is encoded as a string rather than an +// object, where the string ends in the suffix "s" (indicating seconds) and +// is preceded by the number of seconds, with nanoseconds expressed as +// fractional seconds. For example, 3 seconds with 0 nanoseconds should be +// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should +// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 +// microsecond should be expressed in JSON format as "3.000001s". +// +// +type Duration struct { + // Signed seconds of the span of time. Must be from -315,576,000,000 + // to +315,576,000,000 inclusive. Note: these bounds are computed from: + // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + // Signed fractions of a second at nanosecond resolution of the span + // of time. Durations less than one second are represented with a 0 + // `seconds` field and a positive or negative `nanos` field. For durations + // of one second or more, a non-zero value for the `nanos` field must be + // of the same sign as the `seconds` field. Must be from -999,999,999 + // to +999,999,999 inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Duration) Reset() { *m = Duration{} } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { + return fileDescriptor_duration_187e4d5f80a83848, []int{0} +} +func (*Duration) XXX_WellKnownType() string { return "Duration" } +func (m *Duration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Duration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Duration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Duration.Merge(dst, src) +} +func (m *Duration) XXX_Size() int { + return m.Size() +} +func (m *Duration) XXX_DiscardUnknown() { + xxx_messageInfo_Duration.DiscardUnknown(m) +} + +var xxx_messageInfo_Duration proto.InternalMessageInfo + +func (m *Duration) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Duration) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +func (*Duration) XXX_MessageName() string { + return "google.protobuf.Duration" +} +func init() { + proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") +} +func (this *Duration) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Duration) + if !ok { + that2, ok := that.(Duration) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Seconds != that1.Seconds { + if this.Seconds < that1.Seconds { + return -1 + } + return 1 + } + if this.Nanos != that1.Nanos { + if this.Nanos < that1.Nanos { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Duration) + if !ok { + that2, ok := that.(Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Seconds != that1.Seconds { + return false + } + if this.Nanos != that1.Nanos { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Duration) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Duration{") + s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") + s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringDuration(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Duration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Duration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Seconds != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDuration(dAtA, i, uint64(m.Seconds)) + } + if m.Nanos != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDuration(dAtA, i, uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintDuration(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 *Duration) Size() (n int) { + var l int + _ = l + if m.Seconds != 0 { + n += 1 + sovDuration(uint64(m.Seconds)) + } + if m.Nanos != 0 { + n += 1 + sovDuration(uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovDuration(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozDuration(x uint64) (n int) { + return sovDuration(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Duration) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Duration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) + } + m.Seconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seconds |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) + } + m.Nanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanos |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDuration(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDuration + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDuration(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDuration + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDuration + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowDuration + } + 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, ErrInvalidLengthDuration + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDuration + } + 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 := skipDuration(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 ( + ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDuration = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_duration_187e4d5f80a83848) +} + +var fileDescriptor_duration_187e4d5f80a83848 = []byte{ + // 209 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a, + 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56, + 0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5, + 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e, + 0x7e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xe3, 0x54, 0x7f, 0xe3, 0xa1, 0x1c, + 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, + 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, 0x31, 0x7c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, + 0xb1, 0x1c, 0xe3, 0x89, 0xc7, 0x72, 0x8c, 0x5c, 0xc2, 0xc9, 0xf9, 0xb9, 0x7a, 0x68, 0x56, 0x3b, + 0xf1, 0xc2, 0x2c, 0x0e, 0x00, 0x89, 0x04, 0x30, 0x46, 0xb1, 0x96, 0x54, 0x16, 0xa4, 0x16, 0xff, + 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0xa2, 0x25, 0x00, + 0xaa, 0x45, 0x2f, 0x3c, 0x35, 0x27, 0xc7, 0x3b, 0x2f, 0xbf, 0x3c, 0x2f, 0x04, 0xa4, 0x32, 0x89, + 0x0d, 0x6c, 0x96, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x1c, 0x64, 0x4e, 0xf6, 0x00, 0x00, + 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/duration_gogo.go b/deps/github.com/gogo/protobuf/types/duration_gogo.go new file mode 100644 index 000000000..90e7670e2 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/duration_gogo.go @@ -0,0 +1,100 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "fmt" + "time" +) + +func NewPopulatedDuration(r interface { + Int63() int64 +}, easy bool) *Duration { + this := &Duration{} + maxSecs := time.Hour.Nanoseconds() / 1e9 + max := 2 * maxSecs + s := int64(r.Int63()) % max + s -= maxSecs + neg := int64(1) + if s < 0 { + neg = -1 + } + this.Seconds = s + this.Nanos = int32(neg * (r.Int63() % 1e9)) + return this +} + +func (d *Duration) String() string { + td, err := DurationFromProto(d) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return td.String() +} + +func NewPopulatedStdDuration(r interface { + Int63() int64 +}, easy bool) *time.Duration { + dur := NewPopulatedDuration(r, easy) + d, err := DurationFromProto(dur) + if err != nil { + return nil + } + return &d +} + +func SizeOfStdDuration(d time.Duration) int { + dur := DurationProto(d) + return dur.Size() +} + +func StdDurationMarshal(d time.Duration) ([]byte, error) { + size := SizeOfStdDuration(d) + buf := make([]byte, size) + _, err := StdDurationMarshalTo(d, buf) + return buf, err +} + +func StdDurationMarshalTo(d time.Duration, data []byte) (int, error) { + dur := DurationProto(d) + return dur.MarshalTo(data) +} + +func StdDurationUnmarshal(d *time.Duration, data []byte) error { + dur := &Duration{} + if err := dur.Unmarshal(data); err != nil { + return err + } + dd, err := DurationFromProto(dur) + if err != nil { + return err + } + *d = dd + return nil +} diff --git a/deps/github.com/gogo/protobuf/types/duration_test.go b/deps/github.com/gogo/protobuf/types/duration_test.go new file mode 100644 index 000000000..7f2bcb429 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/duration_test.go @@ -0,0 +1,120 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "math" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +const ( + minGoSeconds = math.MinInt64 / int64(1e9) + maxGoSeconds = math.MaxInt64 / int64(1e9) +) + +var durationTests = []struct { + proto *Duration + isValid bool + inRange bool + dur time.Duration +}{ + // The zero duration. + {&Duration{Seconds: 0, Nanos: 0}, true, true, 0}, + // Some ordinary non-zero durations. + {&Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second}, + {&Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second}, + {&Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987}, + {&Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)}, + // The largest duration representable in Go. + {&Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64}, + // The smallest duration representable in Go. + {&Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64}, + {nil, false, false, 0}, + {&Duration{Seconds: -100, Nanos: 987}, false, false, 0}, + {&Duration{Seconds: 100, Nanos: -987}, false, false, 0}, + {&Duration{Seconds: math.MinInt64, Nanos: 0}, false, false, 0}, + {&Duration{Seconds: math.MaxInt64, Nanos: 0}, false, false, 0}, + // The largest valid duration. + {&Duration{Seconds: maxSeconds, Nanos: 1e9 - 1}, true, false, 0}, + // The smallest valid duration. + {&Duration{Seconds: minSeconds, Nanos: -(1e9 - 1)}, true, false, 0}, + // The smallest invalid duration above the valid range. + {&Duration{Seconds: maxSeconds + 1, Nanos: 0}, false, false, 0}, + // The largest invalid duration below the valid range. + {&Duration{Seconds: minSeconds - 1, Nanos: -(1e9 - 1)}, false, false, 0}, + // One nanosecond past the largest duration representable in Go. + {&Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0}, + // One nanosecond past the smallest duration representable in Go. + {&Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0}, + // One second past the largest duration representable in Go. + {&Duration{Seconds: maxGoSeconds + 1, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0}, + // One second past the smallest duration representable in Go. + {&Duration{Seconds: minGoSeconds - 1, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, false, 0}, +} + +func TestValidateDuration(t *testing.T) { + for _, test := range durationTests { + err := validateDuration(test.proto) + gotValid := (err == nil) + if gotValid != test.isValid { + t.Errorf("validateDuration(%v) = %t, want %t", test.proto, gotValid, test.isValid) + } + } +} + +func TestDurationFromProto(t *testing.T) { + for _, test := range durationTests { + got, err := DurationFromProto(test.proto) + gotOK := (err == nil) + wantOK := test.isValid && test.inRange + if gotOK != wantOK { + t.Errorf("DurationFromProto(%v) ok = %t, want %t", test.proto, gotOK, wantOK) + } + if err == nil && got != test.dur { + t.Errorf("DurationFromProto(%v) = %v, want %v", test.proto, got, test.dur) + } + } +} + +func TestDurationProto(t *testing.T) { + for _, test := range durationTests { + if test.isValid && test.inRange { + got := DurationProto(test.dur) + if !proto.Equal(got, test.proto) { + t.Errorf("DurationProto(%v) = %v, want %v", test.dur, got, test.proto) + } + } + } +} diff --git a/deps/github.com/gogo/protobuf/types/empty.pb.go b/deps/github.com/gogo/protobuf/types/empty.pb.go new file mode 100644 index 000000000..07f4a3381 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/empty.pb.go @@ -0,0 +1,477 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/empty.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// A generic empty message that you can re-use to avoid defining duplicated +// empty messages in your APIs. A typical example is to use it as the request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +type Empty struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_empty_b366a5cbb7c614df, []int{0} +} +func (*Empty) XXX_WellKnownType() string { return "Empty" } +func (m *Empty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(dst, src) +} +func (m *Empty) XXX_Size() int { + return m.Size() +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +func (*Empty) XXX_MessageName() string { + return "google.protobuf.Empty" +} +func init() { + proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") +} +func (this *Empty) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Empty) + if !ok { + that2, ok := that.(Empty) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Empty) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Empty) + if !ok { + that2, ok := that.(Empty) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Empty) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&types.Empty{") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringEmpty(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Empty) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Empty) 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 encodeVarintEmpty(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 NewPopulatedEmpty(r randyEmpty, easy bool) *Empty { + this := &Empty{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEmpty(r, 1) + } + return this +} + +type randyEmpty interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEmpty(r randyEmpty) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEmpty(r randyEmpty) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneEmpty(r) + } + return string(tmps) +} +func randUnrecognizedEmpty(r randyEmpty, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEmpty(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEmpty(dAtA []byte, r randyEmpty, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEmpty(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Empty) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovEmpty(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozEmpty(x uint64) (n int) { + return sovEmpty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Empty) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Empty{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringEmpty(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Empty) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEmpty + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Empty: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEmpty(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEmpty + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEmpty(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowEmpty + } + 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, ErrInvalidLengthEmpty + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + 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 := skipEmpty(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 ( + ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_empty_b366a5cbb7c614df) } + +var fileDescriptor_empty_b366a5cbb7c614df = []byte{ + // 176 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, + 0x90, 0xbc, 0x53, 0x0b, 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, + 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, + 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe8, 0xc4, 0x05, + 0x36, 0x2e, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0xfe, 0xc1, 0xc8, + 0xb8, 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x7d, 0x00, 0x54, 0xbd, + 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x65, 0x12, 0x1b, 0xd8, + 0x20, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xbe, 0xb6, 0x31, 0xc6, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/field_mask.pb.go b/deps/github.com/gogo/protobuf/types/field_mask.pb.go new file mode 100644 index 000000000..d7e1a4688 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/field_mask.pb.go @@ -0,0 +1,766 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/field_mask.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, the existing +// repeated values in the target resource will be overwritten by the new values. +// Note that a repeated field is only allowed in the last position of a `paths` +// string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then the existing sub-message in the target resource is +// overwritten. Given the target message: +// +// f { +// b { +// d : 1 +// x : 2 +// } +// c : 1 +// } +// +// And an update message: +// +// f { +// b { +// d : 10 +// } +// } +// +// then if the field mask is: +// +// paths: "f.b" +// +// then the result will be: +// +// f { +// b { +// d : 10 +// } +// c : 1 +// } +// +// However, if the update mask was: +// +// paths: "f.b.d" +// +// then the result would be: +// +// f { +// b { +// d : 10 +// x : 2 +// } +// c : 1 +// } +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of the all the API methods, which have any FieldMask type +// field in the request, should verify the included field paths, and return +// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +type FieldMask struct { + // The set of field mask paths. + Paths []string `protobuf:"bytes,1,rep,name=paths" json:"paths,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldMask) Reset() { *m = FieldMask{} } +func (*FieldMask) ProtoMessage() {} +func (*FieldMask) Descriptor() ([]byte, []int) { + return fileDescriptor_field_mask_f1676d06eb3d88ba, []int{0} +} +func (m *FieldMask) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FieldMask.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FieldMask) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldMask.Merge(dst, src) +} +func (m *FieldMask) XXX_Size() int { + return m.Size() +} +func (m *FieldMask) XXX_DiscardUnknown() { + xxx_messageInfo_FieldMask.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldMask proto.InternalMessageInfo + +func (m *FieldMask) GetPaths() []string { + if m != nil { + return m.Paths + } + return nil +} + +func (*FieldMask) XXX_MessageName() string { + return "google.protobuf.FieldMask" +} +func init() { + proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask") +} +func (this *FieldMask) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*FieldMask) + if !ok { + that2, ok := that.(FieldMask) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Paths) != len(that1.Paths) { + if len(this.Paths) < len(that1.Paths) { + return -1 + } + return 1 + } + for i := range this.Paths { + if this.Paths[i] != that1.Paths[i] { + if this.Paths[i] < that1.Paths[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *FieldMask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FieldMask) + if !ok { + that2, ok := that.(FieldMask) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Paths) != len(that1.Paths) { + return false + } + for i := range this.Paths { + if this.Paths[i] != that1.Paths[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FieldMask) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.FieldMask{") + s = append(s, "Paths: "+fmt.Sprintf("%#v", this.Paths)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringFieldMask(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *FieldMask) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FieldMask) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Paths) > 0 { + for _, s := range m.Paths { + dAtA[i] = 0xa + 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.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintFieldMask(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 NewPopulatedFieldMask(r randyFieldMask, easy bool) *FieldMask { + this := &FieldMask{} + v1 := r.Intn(10) + this.Paths = make([]string, v1) + for i := 0; i < v1; i++ { + this.Paths[i] = string(randStringFieldMask(r)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedFieldMask(r, 2) + } + return this +} + +type randyFieldMask interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneFieldMask(r randyFieldMask) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringFieldMask(r randyFieldMask) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneFieldMask(r) + } + return string(tmps) +} +func randUnrecognizedFieldMask(r randyFieldMask, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldFieldMask(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldFieldMask(dAtA []byte, r randyFieldMask, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateFieldMask(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FieldMask) Size() (n int) { + var l int + _ = l + if len(m.Paths) > 0 { + for _, s := range m.Paths { + l = len(s) + n += 1 + l + sovFieldMask(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFieldMask(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFieldMask(x uint64) (n int) { + return sovFieldMask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FieldMask) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FieldMask{`, + `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringFieldMask(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FieldMask) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFieldMask + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FieldMask: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FieldMask: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFieldMask + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthFieldMask + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFieldMask(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFieldMask + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFieldMask(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFieldMask + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFieldMask + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowFieldMask + } + 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, ErrInvalidLengthFieldMask + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFieldMask + } + 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 := skipFieldMask(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 ( + ErrInvalidLengthFieldMask = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFieldMask = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor_field_mask_f1676d06eb3d88ba) +} + +var fileDescriptor_field_mask_f1676d06eb3d88ba = []byte{ + // 200 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd, + 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54, + 0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x26, 0x16, 0x67, 0x0b, 0x89, 0x70, 0xb1, 0x16, + 0x24, 0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0xad, 0x8c, + 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, + 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x80, 0xc4, 0x1f, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7, + 0xc8, 0x25, 0x9c, 0x9c, 0x9f, 0xab, 0x87, 0x66, 0x95, 0x13, 0x1f, 0xdc, 0xa2, 0x00, 0x90, 0x50, + 0x00, 0x63, 0x14, 0x6b, 0x49, 0x65, 0x41, 0x6a, 0xf1, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, + 0x4c, 0x72, 0xee, 0x10, 0x0d, 0x01, 0x50, 0x0d, 0x7a, 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, + 0xe5, 0x79, 0x21, 0x20, 0x65, 0x49, 0x6c, 0x60, 0x93, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xcf, 0xae, 0x5b, 0xec, 0xe6, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/protosize.go b/deps/github.com/gogo/protobuf/types/protosize.go new file mode 100644 index 000000000..3a2d1b7e1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/protosize.go @@ -0,0 +1,34 @@ +package types + +func (m *Any) ProtoSize() (n int) { return m.Size() } +func (m *Api) ProtoSize() (n int) { return m.Size() } +func (m *Method) ProtoSize() (n int) { return m.Size() } +func (m *Mixin) ProtoSize() (n int) { return m.Size() } +func (m *Duration) ProtoSize() (n int) { return m.Size() } +func (m *Empty) ProtoSize() (n int) { return m.Size() } +func (m *FieldMask) ProtoSize() (n int) { return m.Size() } +func (m *SourceContext) ProtoSize() (n int) { return m.Size() } +func (m *Struct) ProtoSize() (n int) { return m.Size() } +func (m *Value) ProtoSize() (n int) { return m.Size() } +func (m *Value_NullValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_NumberValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_StringValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_BoolValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_StructValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_ListValue) ProtoSize() (n int) { return m.Size() } +func (m *ListValue) ProtoSize() (n int) { return m.Size() } +func (m *Timestamp) ProtoSize() (n int) { return m.Size() } +func (m *Type) ProtoSize() (n int) { return m.Size() } +func (m *Field) ProtoSize() (n int) { return m.Size() } +func (m *Enum) ProtoSize() (n int) { return m.Size() } +func (m *EnumValue) ProtoSize() (n int) { return m.Size() } +func (m *Option) ProtoSize() (n int) { return m.Size() } +func (m *DoubleValue) ProtoSize() (n int) { return m.Size() } +func (m *FloatValue) ProtoSize() (n int) { return m.Size() } +func (m *Int64Value) ProtoSize() (n int) { return m.Size() } +func (m *UInt64Value) ProtoSize() (n int) { return m.Size() } +func (m *Int32Value) ProtoSize() (n int) { return m.Size() } +func (m *UInt32Value) ProtoSize() (n int) { return m.Size() } +func (m *BoolValue) ProtoSize() (n int) { return m.Size() } +func (m *StringValue) ProtoSize() (n int) { return m.Size() } +func (m *BytesValue) ProtoSize() (n int) { return m.Size() } diff --git a/deps/github.com/gogo/protobuf/types/source_context.pb.go b/deps/github.com/gogo/protobuf/types/source_context.pb.go new file mode 100644 index 000000000..d28bcc853 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/source_context.pb.go @@ -0,0 +1,535 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/source_context.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// `SourceContext` represents information about the source of a +// protobuf element, like the file in which it is defined. +type SourceContext struct { + // The path-qualified name of the .proto file that contained the associated + // protobuf element. For example: `"google/protobuf/source_context.proto"`. + FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceContext) Reset() { *m = SourceContext{} } +func (*SourceContext) ProtoMessage() {} +func (*SourceContext) Descriptor() ([]byte, []int) { + return fileDescriptor_source_context_b387e69fb08d10e5, []int{0} +} +func (m *SourceContext) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SourceContext.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SourceContext) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceContext.Merge(dst, src) +} +func (m *SourceContext) XXX_Size() int { + return m.Size() +} +func (m *SourceContext) XXX_DiscardUnknown() { + xxx_messageInfo_SourceContext.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceContext proto.InternalMessageInfo + +func (m *SourceContext) GetFileName() string { + if m != nil { + return m.FileName + } + return "" +} + +func (*SourceContext) XXX_MessageName() string { + return "google.protobuf.SourceContext" +} +func init() { + proto.RegisterType((*SourceContext)(nil), "google.protobuf.SourceContext") +} +func (this *SourceContext) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*SourceContext) + if !ok { + that2, ok := that.(SourceContext) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FileName != that1.FileName { + if this.FileName < that1.FileName { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *SourceContext) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SourceContext) + if !ok { + that2, ok := that.(SourceContext) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FileName != that1.FileName { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SourceContext) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.SourceContext{") + s = append(s, "FileName: "+fmt.Sprintf("%#v", this.FileName)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringSourceContext(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *SourceContext) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SourceContext) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FileName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintSourceContext(dAtA, i, uint64(len(m.FileName))) + i += copy(dAtA[i:], m.FileName) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintSourceContext(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 NewPopulatedSourceContext(r randySourceContext, easy bool) *SourceContext { + this := &SourceContext{} + this.FileName = string(randStringSourceContext(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSourceContext(r, 2) + } + return this +} + +type randySourceContext interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSourceContext(r randySourceContext) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringSourceContext(r randySourceContext) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneSourceContext(r) + } + return string(tmps) +} +func randUnrecognizedSourceContext(r randySourceContext, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldSourceContext(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldSourceContext(dAtA []byte, r randySourceContext, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateSourceContext(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *SourceContext) Size() (n int) { + var l int + _ = l + l = len(m.FileName) + if l > 0 { + n += 1 + l + sovSourceContext(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSourceContext(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSourceContext(x uint64) (n int) { + return sovSourceContext(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *SourceContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SourceContext{`, + `FileName:` + fmt.Sprintf("%v", this.FileName) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringSourceContext(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *SourceContext) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSourceContext + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SourceContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SourceContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSourceContext + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSourceContext + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSourceContext(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSourceContext + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSourceContext(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSourceContext + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSourceContext + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowSourceContext + } + 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, ErrInvalidLengthSourceContext + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSourceContext + } + 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 := skipSourceContext(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 ( + ErrInvalidLengthSourceContext = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSourceContext = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/source_context.proto", fileDescriptor_source_context_b387e69fb08d10e5) +} + +var fileDescriptor_source_context_b387e69fb08d10e5 = []byte{ + // 212 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xce, 0x2f, 0x2d, + 0x4a, 0x4e, 0x8d, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0xd1, 0x03, 0x8b, 0x0b, 0xf1, 0x43, + 0x54, 0xe9, 0xc1, 0x54, 0x29, 0xe9, 0x70, 0xf1, 0x06, 0x83, 0x15, 0x3a, 0x43, 0xd4, 0x09, 0x49, + 0x73, 0x71, 0xa6, 0x65, 0xe6, 0xa4, 0xc6, 0xe7, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x06, 0x71, 0x80, 0x04, 0xfc, 0x12, 0x73, 0x53, 0x9d, 0x3a, 0x19, 0x6f, 0x3c, 0x94, 0x63, + 0xf8, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, + 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, + 0xc9, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x4b, 0x38, 0x39, + 0x3f, 0x57, 0x0f, 0xcd, 0x56, 0x27, 0x21, 0x14, 0x3b, 0x03, 0x40, 0xc2, 0x01, 0x8c, 0x51, 0xac, + 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, + 0x34, 0x05, 0x40, 0x35, 0xe9, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, + 0x94, 0x25, 0xb1, 0x81, 0x4d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x37, 0x2a, 0xa1, + 0xf9, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/struct.pb.go b/deps/github.com/gogo/protobuf/types/struct.pb.go new file mode 100644 index 000000000..3ccc0d3dc --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/struct.pb.go @@ -0,0 +1,1959 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/struct.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strconv "strconv" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +type NullValue int32 + +const ( + // Null value. + NullValue_NULL_VALUE NullValue = 0 +) + +var NullValue_name = map[int32]string{ + 0: "NULL_VALUE", +} +var NullValue_value = map[string]int32{ + "NULL_VALUE": 0, +} + +func (NullValue) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{0} +} +func (NullValue) XXX_WellKnownType() string { return "NullValue" } + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +type Struct struct { + // Unordered map of dynamically typed values. + Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Struct) Reset() { *m = Struct{} } +func (*Struct) ProtoMessage() {} +func (*Struct) Descriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{0} +} +func (*Struct) XXX_WellKnownType() string { return "Struct" } +func (m *Struct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Struct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Struct) XXX_Merge(src proto.Message) { + xxx_messageInfo_Struct.Merge(dst, src) +} +func (m *Struct) XXX_Size() int { + return m.Size() +} +func (m *Struct) XXX_DiscardUnknown() { + xxx_messageInfo_Struct.DiscardUnknown(m) +} + +var xxx_messageInfo_Struct proto.InternalMessageInfo + +func (m *Struct) GetFields() map[string]*Value { + if m != nil { + return m.Fields + } + return nil +} + +func (*Struct) XXX_MessageName() string { + return "google.protobuf.Struct" +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +type Value struct { + // The kind of value. + // + // Types that are valid to be assigned to Kind: + // *Value_NullValue + // *Value_NumberValue + // *Value_StringValue + // *Value_BoolValue + // *Value_StructValue + // *Value_ListValue + Kind isValue_Kind `protobuf_oneof:"kind"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Value) Reset() { *m = Value{} } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{1} +} +func (*Value) XXX_WellKnownType() string { return "Value" } +func (m *Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Value.Merge(dst, src) +} +func (m *Value) XXX_Size() int { + return m.Size() +} +func (m *Value) XXX_DiscardUnknown() { + xxx_messageInfo_Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Value proto.InternalMessageInfo + +type isValue_Kind interface { + isValue_Kind() + Equal(interface{}) bool + MarshalTo([]byte) (int, error) + Size() int +} + +type Value_NullValue struct { + NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"` +} +type Value_NumberValue struct { + NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"` +} +type Value_StringValue struct { + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` +} +type Value_BoolValue struct { + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"` +} +type Value_StructValue struct { + StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"` +} +type Value_ListValue struct { + ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"` +} + +func (*Value_NullValue) isValue_Kind() {} +func (*Value_NumberValue) isValue_Kind() {} +func (*Value_StringValue) isValue_Kind() {} +func (*Value_BoolValue) isValue_Kind() {} +func (*Value_StructValue) isValue_Kind() {} +func (*Value_ListValue) isValue_Kind() {} + +func (m *Value) GetKind() isValue_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *Value) GetNullValue() NullValue { + if x, ok := m.GetKind().(*Value_NullValue); ok { + return x.NullValue + } + return NullValue_NULL_VALUE +} + +func (m *Value) GetNumberValue() float64 { + if x, ok := m.GetKind().(*Value_NumberValue); ok { + return x.NumberValue + } + return 0 +} + +func (m *Value) GetStringValue() string { + if x, ok := m.GetKind().(*Value_StringValue); ok { + return x.StringValue + } + return "" +} + +func (m *Value) GetBoolValue() bool { + if x, ok := m.GetKind().(*Value_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *Value) GetStructValue() *Struct { + if x, ok := m.GetKind().(*Value_StructValue); ok { + return x.StructValue + } + return nil +} + +func (m *Value) GetListValue() *ListValue { + if x, ok := m.GetKind().(*Value_ListValue); ok { + return x.ListValue + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ + (*Value_NullValue)(nil), + (*Value_NumberValue)(nil), + (*Value_StringValue)(nil), + (*Value_BoolValue)(nil), + (*Value_StructValue)(nil), + (*Value_ListValue)(nil), + } +} + +func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Value) + // kind + switch x := m.Kind.(type) { + case *Value_NullValue: + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.NullValue)) + case *Value_NumberValue: + _ = b.EncodeVarint(2<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.NumberValue)) + case *Value_StringValue: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.StringValue) + case *Value_BoolValue: + t := uint64(0) + if x.BoolValue { + t = 1 + } + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Value_StructValue: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.StructValue); err != nil { + return err + } + case *Value_ListValue: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ListValue); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Value.Kind has unexpected type %T", x) + } + return nil +} + +func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Value) + switch tag { + case 1: // kind.null_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Kind = &Value_NullValue{NullValue(x)} + return true, err + case 2: // kind.number_value + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Kind = &Value_NumberValue{math.Float64frombits(x)} + return true, err + case 3: // kind.string_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Kind = &Value_StringValue{x} + return true, err + case 4: // kind.bool_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Kind = &Value_BoolValue{x != 0} + return true, err + case 5: // kind.struct_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Struct) + err := b.DecodeMessage(msg) + m.Kind = &Value_StructValue{msg} + return true, err + case 6: // kind.list_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ListValue) + err := b.DecodeMessage(msg) + m.Kind = &Value_ListValue{msg} + return true, err + default: + return false, nil + } +} + +func _Value_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Value) + // kind + switch x := m.Kind.(type) { + case *Value_NullValue: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.NullValue)) + case *Value_NumberValue: + n += 1 // tag and wire + n += 8 + case *Value_StringValue: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.StringValue))) + n += len(x.StringValue) + case *Value_BoolValue: + n += 1 // tag and wire + n += 1 + case *Value_StructValue: + s := proto.Size(x.StructValue) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Value_ListValue: + s := proto.Size(x.ListValue) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func (*Value) XXX_MessageName() string { + return "google.protobuf.Value" +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +type ListValue struct { + // Repeated field of dynamically typed values. + Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListValue) Reset() { *m = ListValue{} } +func (*ListValue) ProtoMessage() {} +func (*ListValue) Descriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{2} +} +func (*ListValue) XXX_WellKnownType() string { return "ListValue" } +func (m *ListValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ListValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListValue.Merge(dst, src) +} +func (m *ListValue) XXX_Size() int { + return m.Size() +} +func (m *ListValue) XXX_DiscardUnknown() { + xxx_messageInfo_ListValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ListValue proto.InternalMessageInfo + +func (m *ListValue) GetValues() []*Value { + if m != nil { + return m.Values + } + return nil +} + +func (*ListValue) XXX_MessageName() string { + return "google.protobuf.ListValue" +} +func init() { + proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") + proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry") + proto.RegisterType((*Value)(nil), "google.protobuf.Value") + proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") + proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) +} +func (x NullValue) String() string { + s, ok := NullValue_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Struct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Struct) + if !ok { + that2, ok := that.(Struct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Fields) != len(that1.Fields) { + return false + } + for i := range this.Fields { + if !this.Fields[i].Equal(that1.Fields[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value) + if !ok { + that2, ok := that.(Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Kind == nil { + if this.Kind != nil { + return false + } + } else if this.Kind == nil { + return false + } else if !this.Kind.Equal(that1.Kind) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_NullValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_NullValue) + if !ok { + that2, ok := that.(Value_NullValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NullValue != that1.NullValue { + return false + } + return true +} +func (this *Value_NumberValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_NumberValue) + if !ok { + that2, ok := that.(Value_NumberValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NumberValue != that1.NumberValue { + return false + } + return true +} +func (this *Value_StringValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_StringValue) + if !ok { + that2, ok := that.(Value_StringValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.StringValue != that1.StringValue { + return false + } + return true +} +func (this *Value_BoolValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_BoolValue) + if !ok { + that2, ok := that.(Value_BoolValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.BoolValue != that1.BoolValue { + return false + } + return true +} +func (this *Value_StructValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_StructValue) + if !ok { + that2, ok := that.(Value_StructValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.StructValue.Equal(that1.StructValue) { + return false + } + return true +} +func (this *Value_ListValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_ListValue) + if !ok { + that2, ok := that.(Value_ListValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.ListValue.Equal(that1.ListValue) { + return false + } + return true +} +func (this *ListValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ListValue) + if !ok { + that2, ok := that.(ListValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Values) != len(that1.Values) { + return false + } + for i := range this.Values { + if !this.Values[i].Equal(that1.Values[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Struct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Struct{") + keysForFields := make([]string, 0, len(this.Fields)) + for k := range this.Fields { + keysForFields = append(keysForFields, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForFields) + mapStringForFields := "map[string]*Value{" + for _, k := range keysForFields { + mapStringForFields += fmt.Sprintf("%#v: %#v,", k, this.Fields[k]) + } + mapStringForFields += "}" + if this.Fields != nil { + s = append(s, "Fields: "+mapStringForFields+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&types.Value{") + if this.Kind != nil { + s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value_NullValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_NullValue{` + + `NullValue:` + fmt.Sprintf("%#v", this.NullValue) + `}`}, ", ") + return s +} +func (this *Value_NumberValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_NumberValue{` + + `NumberValue:` + fmt.Sprintf("%#v", this.NumberValue) + `}`}, ", ") + return s +} +func (this *Value_StringValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_StringValue{` + + `StringValue:` + fmt.Sprintf("%#v", this.StringValue) + `}`}, ", ") + return s +} +func (this *Value_BoolValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_BoolValue{` + + `BoolValue:` + fmt.Sprintf("%#v", this.BoolValue) + `}`}, ", ") + return s +} +func (this *Value_StructValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_StructValue{` + + `StructValue:` + fmt.Sprintf("%#v", this.StructValue) + `}`}, ", ") + return s +} +func (this *Value_ListValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_ListValue{` + + `ListValue:` + fmt.Sprintf("%#v", this.ListValue) + `}`}, ", ") + return s +} +func (this *ListValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.ListValue{") + if this.Values != nil { + s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringStruct(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Struct) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Struct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Fields) > 0 { + for k := range m.Fields { + dAtA[i] = 0xa + i++ + v := m.Fields[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovStruct(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovStruct(uint64(len(k))) + msgSize + i = encodeVarintStruct(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintStruct(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStruct(dAtA, i, uint64(v.Size())) + n1, err := v.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 *Value) 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 *Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Kind != nil { + nn2, err := m.Kind.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn2 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Value_NullValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintStruct(dAtA, i, uint64(m.NullValue)) + return i, nil +} +func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) + i += 8 + return i, nil +} +func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x1a + i++ + i = encodeVarintStruct(dAtA, i, uint64(len(m.StringValue))) + i += copy(dAtA[i:], m.StringValue) + return i, nil +} +func (m *Value_BoolValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + if m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *Value_StructValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.StructValue != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintStruct(dAtA, i, uint64(m.StructValue.Size())) + n3, err := m.StructValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} +func (m *Value_ListValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ListValue != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintStruct(dAtA, i, uint64(m.ListValue.Size())) + n4, err := m.ListValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *ListValue) 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 *ListValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Values) > 0 { + for _, msg := range m.Values { + dAtA[i] = 0xa + i++ + i = encodeVarintStruct(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 encodeVarintStruct(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 NewPopulatedStruct(r randyStruct, easy bool) *Struct { + this := &Struct{} + if r.Intn(10) == 0 { + v1 := r.Intn(10) + this.Fields = make(map[string]*Value) + for i := 0; i < v1; i++ { + this.Fields[randStringStruct(r)] = NewPopulatedValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 2) + } + return this +} + +func NewPopulatedValue(r randyStruct, easy bool) *Value { + this := &Value{} + oneofNumber_Kind := []int32{1, 2, 3, 4, 5, 6}[r.Intn(6)] + switch oneofNumber_Kind { + case 1: + this.Kind = NewPopulatedValue_NullValue(r, easy) + case 2: + this.Kind = NewPopulatedValue_NumberValue(r, easy) + case 3: + this.Kind = NewPopulatedValue_StringValue(r, easy) + case 4: + this.Kind = NewPopulatedValue_BoolValue(r, easy) + case 5: + this.Kind = NewPopulatedValue_StructValue(r, easy) + case 6: + this.Kind = NewPopulatedValue_ListValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 7) + } + return this +} + +func NewPopulatedValue_NullValue(r randyStruct, easy bool) *Value_NullValue { + this := &Value_NullValue{} + this.NullValue = NullValue([]int32{0}[r.Intn(1)]) + return this +} +func NewPopulatedValue_NumberValue(r randyStruct, easy bool) *Value_NumberValue { + this := &Value_NumberValue{} + this.NumberValue = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NumberValue *= -1 + } + return this +} +func NewPopulatedValue_StringValue(r randyStruct, easy bool) *Value_StringValue { + this := &Value_StringValue{} + this.StringValue = string(randStringStruct(r)) + return this +} +func NewPopulatedValue_BoolValue(r randyStruct, easy bool) *Value_BoolValue { + this := &Value_BoolValue{} + this.BoolValue = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedValue_StructValue(r randyStruct, easy bool) *Value_StructValue { + this := &Value_StructValue{} + this.StructValue = NewPopulatedStruct(r, easy) + return this +} +func NewPopulatedValue_ListValue(r randyStruct, easy bool) *Value_ListValue { + this := &Value_ListValue{} + this.ListValue = NewPopulatedListValue(r, easy) + return this +} +func NewPopulatedListValue(r randyStruct, easy bool) *ListValue { + this := &ListValue{} + if r.Intn(10) == 0 { + v2 := r.Intn(5) + this.Values = make([]*Value, v2) + for i := 0; i < v2; i++ { + this.Values[i] = NewPopulatedValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 2) + } + return this +} + +type randyStruct interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneStruct(r randyStruct) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringStruct(r randyStruct) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneStruct(r) + } + return string(tmps) +} +func randUnrecognizedStruct(r randyStruct, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldStruct(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldStruct(dAtA []byte, r randyStruct, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateStruct(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateStruct(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateStruct(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Struct) Size() (n int) { + var l int + _ = l + if len(m.Fields) > 0 { + for k, v := range m.Fields { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovStruct(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovStruct(uint64(len(k))) + l + n += mapEntrySize + 1 + sovStruct(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Value) Size() (n int) { + var l int + _ = l + if m.Kind != nil { + n += m.Kind.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Value_NullValue) Size() (n int) { + var l int + _ = l + n += 1 + sovStruct(uint64(m.NullValue)) + return n +} +func (m *Value_NumberValue) Size() (n int) { + var l int + _ = l + n += 9 + return n +} +func (m *Value_StringValue) Size() (n int) { + var l int + _ = l + l = len(m.StringValue) + n += 1 + l + sovStruct(uint64(l)) + return n +} +func (m *Value_BoolValue) Size() (n int) { + var l int + _ = l + n += 2 + return n +} +func (m *Value_StructValue) Size() (n int) { + var l int + _ = l + if m.StructValue != nil { + l = m.StructValue.Size() + n += 1 + l + sovStruct(uint64(l)) + } + return n +} +func (m *Value_ListValue) Size() (n int) { + var l int + _ = l + if m.ListValue != nil { + l = m.ListValue.Size() + n += 1 + l + sovStruct(uint64(l)) + } + return n +} +func (m *ListValue) Size() (n int) { + var l int + _ = l + if len(m.Values) > 0 { + for _, e := range m.Values { + l = e.Size() + n += 1 + l + sovStruct(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovStruct(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozStruct(x uint64) (n int) { + return sovStruct(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Struct) String() string { + if this == nil { + return "nil" + } + keysForFields := make([]string, 0, len(this.Fields)) + for k := range this.Fields { + keysForFields = append(keysForFields, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForFields) + mapStringForFields := "map[string]*Value{" + for _, k := range keysForFields { + mapStringForFields += fmt.Sprintf("%v: %v,", k, this.Fields[k]) + } + mapStringForFields += "}" + s := strings.Join([]string{`&Struct{`, + `Fields:` + mapStringForFields + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_NullValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_NullValue{`, + `NullValue:` + fmt.Sprintf("%v", this.NullValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_NumberValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_NumberValue{`, + `NumberValue:` + fmt.Sprintf("%v", this.NumberValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_StringValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_StringValue{`, + `StringValue:` + fmt.Sprintf("%v", this.StringValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_BoolValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_BoolValue{`, + `BoolValue:` + fmt.Sprintf("%v", this.BoolValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_StructValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_StructValue{`, + `StructValue:` + strings.Replace(fmt.Sprintf("%v", this.StructValue), "Struct", "Struct", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Value_ListValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_ListValue{`, + `ListValue:` + strings.Replace(fmt.Sprintf("%v", this.ListValue), "ListValue", "ListValue", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListValue{`, + `Values:` + strings.Replace(fmt.Sprintf("%v", this.Values), "Value", "Value", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringStruct(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Struct) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Struct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fields == nil { + m.Fields = make(map[string]*Value) + } + var mapkey string + var mapvalue *Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthStruct + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthStruct + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthStruct + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fields[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) + } + var v NullValue + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NullValue(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Kind = &Value_NullValue{v} + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Kind = &Value_NumberValue{float64(math.Float64frombits(v))} + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = &Value_StringValue{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Kind = &Value_BoolValue{b} + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Struct{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &Value_StructValue{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ListValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &Value_ListValue{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, &Value{}) + if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStruct(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStruct + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStruct + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowStruct + } + 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, ErrInvalidLengthStruct + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStruct + } + 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 := skipStruct(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 ( + ErrInvalidLengthStruct = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStruct = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_struct_7f9d36853146434f) +} + +var fileDescriptor_struct_7f9d36853146434f = []byte{ + // 439 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x6b, 0xd4, 0x40, + 0x14, 0xc6, 0xf3, 0xb2, 0xdd, 0xe0, 0xbe, 0x48, 0x2d, 0x23, 0xe8, 0x52, 0x65, 0x5c, 0xb6, 0x97, + 0x45, 0x24, 0x85, 0xf5, 0x22, 0xae, 0x17, 0x17, 0x6a, 0x0b, 0x86, 0x12, 0xa3, 0xad, 0xe0, 0x65, + 0x31, 0x69, 0xba, 0x84, 0x4e, 0x67, 0x4a, 0x32, 0xa3, 0xec, 0x4d, 0xff, 0x0b, 0xcf, 0x9e, 0xc4, + 0xa3, 0x7f, 0x85, 0x47, 0x8f, 0x1e, 0xdd, 0x78, 0xf1, 0xd8, 0x63, 0x8f, 0x32, 0x33, 0x49, 0x94, + 0x2e, 0xbd, 0xe5, 0x7d, 0xf3, 0x7b, 0xdf, 0x7b, 0xdf, 0x0b, 0xde, 0x9d, 0x0b, 0x31, 0x67, 0xd9, + 0xf6, 0x59, 0x21, 0xa4, 0x48, 0xd4, 0xf1, 0x76, 0x29, 0x0b, 0x95, 0xca, 0xc0, 0xd4, 0xe4, 0x86, + 0x7d, 0x0d, 0x9a, 0xd7, 0xe1, 0x27, 0x40, 0xef, 0xa5, 0x21, 0xc8, 0x04, 0xbd, 0xe3, 0x3c, 0x63, + 0x47, 0x65, 0x1f, 0x06, 0x9d, 0x91, 0x3f, 0xde, 0x0a, 0x2e, 0xc1, 0x81, 0x05, 0x83, 0x67, 0x86, + 0xda, 0xe1, 0xb2, 0x58, 0xc4, 0x75, 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, 0x0f, 0xc2, 0x70, 0x76, + 0xf8, 0x34, 0x3c, 0xd8, 0xd9, 0x70, 0xa6, 0x1f, 0xe1, 0xe7, 0x92, 0x3a, 0xe7, 0x4b, 0x0a, 0x17, + 0x4b, 0x0a, 0x1f, 0x2a, 0x0a, 0x5f, 0x2a, 0x0a, 0xdf, 0x2b, 0x0a, 0x3f, 0x2a, 0x0a, 0xbf, 0x2a, + 0x0a, 0x7f, 0x2a, 0xea, 0x9c, 0x6b, 0xed, 0x37, 0x05, 0xbc, 0x99, 0x8a, 0xd3, 0xcb, 0xe3, 0xa6, + 0xbe, 0x4d, 0x1e, 0xe9, 0x3a, 0x82, 0x37, 0x5d, 0xb9, 0x38, 0xcb, 0xca, 0x0b, 0x80, 0xcf, 0x6e, + 0x67, 0x37, 0x9a, 0x7e, 0x75, 0xe9, 0xae, 0x6d, 0x88, 0x9a, 0xfd, 0x5e, 0x67, 0x8c, 0x3d, 0xe7, + 0xe2, 0x3d, 0x7f, 0xa5, 0xc9, 0xc4, 0x33, 0x4e, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xad, + 0x84, 0x08, 0xae, 0xe5, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/timestamp.go b/deps/github.com/gogo/protobuf/types/timestamp.go new file mode 100644 index 000000000..7ae54d8b3 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/timestamp.go @@ -0,0 +1,132 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +// This file implements operations on google.protobuf.Timestamp. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range +// [0001-01-01, 10000-01-01) and has a Nanos field +// in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes +// the problem. +// +// Every valid Timestamp can be represented by a time.Time, but the converse is not true. +func validateTimestamp(ts *Timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) + } + return nil +} + +// TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return value +// is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +func TimestampFromProto(ts *Timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(ts) +} + +// TimestampNow returns a google.protobuf.Timestamp for the current time. +func TimestampNow() *Timestamp { + ts, err := TimestampProto(time.Now()) + if err != nil { + panic("ptypes: time.Now() out of Timestamp range") + } + return ts +} + +// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. +// It returns an error if the resulting Timestamp is invalid. +func TimestampProto(t time.Time) (*Timestamp, error) { + seconds := t.Unix() + nanos := int32(t.Sub(time.Unix(seconds, 0))) + ts := &Timestamp{ + Seconds: seconds, + Nanos: nanos, + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} + +// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid +// Timestamps, it returns an error message in parentheses. +func TimestampString(ts *Timestamp) string { + t, err := TimestampFromProto(ts) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return t.Format(time.RFC3339Nano) +} diff --git a/deps/github.com/gogo/protobuf/types/timestamp.pb.go b/deps/github.com/gogo/protobuf/types/timestamp.pb.go new file mode 100644 index 000000000..4d4dc6bfd --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/timestamp.pb.go @@ -0,0 +1,552 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/timestamp.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// A Timestamp represents a point in time independent of any time zone +// or calendar, represented as seconds and fractions of seconds at +// nanosecond resolution in UTC Epoch time. It is encoded using the +// Proleptic Gregorian Calendar which extends the Gregorian calendar +// backwards to year one. It is encoded assuming all minutes are 60 +// seconds long, i.e. leap seconds are "smeared" so that no leap second +// table is needed for interpretation. Range is from +// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. +// By restricting to that range, we ensure that we can convert to +// and from RFC 3339 date strings. +// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// +// # Examples +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) +// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one +// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- +// ) to obtain a formatter capable of generating timestamps in this format. +// +// +type Timestamp struct { + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { + return fileDescriptor_timestamp_820f61227bd8f1e8, []int{0} +} +func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } +func (m *Timestamp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Timestamp) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timestamp.Merge(dst, src) +} +func (m *Timestamp) XXX_Size() int { + return m.Size() +} +func (m *Timestamp) XXX_DiscardUnknown() { + xxx_messageInfo_Timestamp.DiscardUnknown(m) +} + +var xxx_messageInfo_Timestamp proto.InternalMessageInfo + +func (m *Timestamp) GetSeconds() int64 { + if m != nil { + return m.Seconds + } + return 0 +} + +func (m *Timestamp) GetNanos() int32 { + if m != nil { + return m.Nanos + } + return 0 +} + +func (*Timestamp) XXX_MessageName() string { + return "google.protobuf.Timestamp" +} +func init() { + proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") +} +func (this *Timestamp) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timestamp) + if !ok { + that2, ok := that.(Timestamp) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Seconds != that1.Seconds { + if this.Seconds < that1.Seconds { + return -1 + } + return 1 + } + if this.Nanos != that1.Nanos { + if this.Nanos < that1.Nanos { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timestamp) + if !ok { + that2, ok := that.(Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Seconds != that1.Seconds { + return false + } + if this.Nanos != that1.Nanos { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timestamp) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Timestamp{") + s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") + s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTimestamp(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Timestamp) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Seconds != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTimestamp(dAtA, i, uint64(m.Seconds)) + } + if m.Nanos != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTimestamp(dAtA, i, uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintTimestamp(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 *Timestamp) Size() (n int) { + var l int + _ = l + if m.Seconds != 0 { + n += 1 + sovTimestamp(uint64(m.Seconds)) + } + if m.Nanos != 0 { + n += 1 + sovTimestamp(uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTimestamp(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTimestamp(x uint64) (n int) { + return sovTimestamp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Timestamp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) + } + m.Seconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seconds |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) + } + m.Nanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanos |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTimestamp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTimestamp + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTimestamp(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimestamp + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimestamp + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowTimestamp + } + 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, ErrInvalidLengthTimestamp + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimestamp + } + 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 := skipTimestamp(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 ( + ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTimestamp = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_timestamp_820f61227bd8f1e8) +} + +var fileDescriptor_timestamp_820f61227bd8f1e8 = []byte{ + // 212 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d, + 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x03, 0x0b, 0x09, 0xf1, 0x43, 0x14, 0xe8, 0xc1, 0x14, 0x28, + 0x59, 0x73, 0x71, 0x86, 0xc0, 0xd4, 0x08, 0x49, 0x70, 0xb1, 0x17, 0xa7, 0x26, 0xe7, 0xe7, 0xa5, + 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x22, 0x5c, 0xac, 0x79, 0x89, + 0x79, 0xf9, 0xc5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x53, 0x03, 0xe3, 0x8d, + 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, + 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, 0x24, 0xc7, 0xf0, 0xe1, 0x91, 0x1c, + 0xe3, 0x8a, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, + 0x59, 0xee, 0xc4, 0x07, 0xb7, 0x3a, 0x00, 0x24, 0x14, 0xc0, 0x18, 0xc5, 0x5a, 0x52, 0x59, 0x90, + 0x5a, 0xfc, 0x83, 0x91, 0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, + 0x9e, 0x00, 0xa8, 0x1e, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc, 0xf2, 0xbc, 0x10, 0x90, + 0xca, 0x24, 0x36, 0xb0, 0x61, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x23, 0x83, 0xdd, + 0xfa, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/timestamp_gogo.go b/deps/github.com/gogo/protobuf/types/timestamp_gogo.go new file mode 100644 index 000000000..e03fa1315 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/timestamp_gogo.go @@ -0,0 +1,94 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "time" +) + +func NewPopulatedTimestamp(r interface { + Int63() int64 +}, easy bool) *Timestamp { + this := &Timestamp{} + ns := int64(r.Int63()) + this.Seconds = ns / 1e9 + this.Nanos = int32(ns % 1e9) + return this +} + +func (ts *Timestamp) String() string { + return TimestampString(ts) +} + +func NewPopulatedStdTime(r interface { + Int63() int64 +}, easy bool) *time.Time { + timestamp := NewPopulatedTimestamp(r, easy) + t, err := TimestampFromProto(timestamp) + if err != nil { + return nil + } + return &t +} + +func SizeOfStdTime(t time.Time) int { + ts, err := TimestampProto(t) + if err != nil { + return 0 + } + return ts.Size() +} + +func StdTimeMarshal(t time.Time) ([]byte, error) { + size := SizeOfStdTime(t) + buf := make([]byte, size) + _, err := StdTimeMarshalTo(t, buf) + return buf, err +} + +func StdTimeMarshalTo(t time.Time, data []byte) (int, error) { + ts, err := TimestampProto(t) + if err != nil { + return 0, err + } + return ts.MarshalTo(data) +} + +func StdTimeUnmarshal(t *time.Time, data []byte) error { + ts := &Timestamp{} + if err := ts.Unmarshal(data); err != nil { + return err + } + tt, err := TimestampFromProto(ts) + if err != nil { + return err + } + *t = tt + return nil +} diff --git a/deps/github.com/gogo/protobuf/types/timestamp_test.go b/deps/github.com/gogo/protobuf/types/timestamp_test.go new file mode 100644 index 000000000..6af8631e5 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/timestamp_test.go @@ -0,0 +1,152 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package types + +import ( + "math" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +var tests = []struct { + ts *Timestamp + valid bool + t time.Time +}{ + // The timestamp representing the Unix epoch date. + {&Timestamp{Seconds: 0, Nanos: 0}, true, utcDate(1970, 1, 1)}, + // The smallest representable timestamp. + {&Timestamp{Seconds: math.MinInt64, Nanos: math.MinInt32}, false, + time.Unix(math.MinInt64, math.MinInt32).UTC()}, + // The smallest representable timestamp with non-negative nanos. + {&Timestamp{Seconds: math.MinInt64, Nanos: 0}, false, time.Unix(math.MinInt64, 0).UTC()}, + // The earliest valid timestamp. + {&Timestamp{Seconds: minValidSeconds, Nanos: 0}, true, utcDate(1, 1, 1)}, + //"0001-01-01T00:00:00Z"}, + // The largest representable timestamp. + {&Timestamp{Seconds: math.MaxInt64, Nanos: math.MaxInt32}, false, + time.Unix(math.MaxInt64, math.MaxInt32).UTC()}, + // The largest representable timestamp with nanos in range. + {&Timestamp{Seconds: math.MaxInt64, Nanos: 1e9 - 1}, false, + time.Unix(math.MaxInt64, 1e9-1).UTC()}, + // The largest valid timestamp. + {&Timestamp{Seconds: maxValidSeconds - 1, Nanos: 1e9 - 1}, true, + time.Date(9999, 12, 31, 23, 59, 59, 1e9-1, time.UTC)}, + // The smallest invalid timestamp that is larger than the valid range. + {&Timestamp{Seconds: maxValidSeconds, Nanos: 0}, false, time.Unix(maxValidSeconds, 0).UTC()}, + // A date before the epoch. + {&Timestamp{Seconds: -281836800, Nanos: 0}, true, utcDate(1961, 1, 26)}, + // A date after the epoch. + {&Timestamp{Seconds: 1296000000, Nanos: 0}, true, utcDate(2011, 1, 26)}, + // A date after the epoch, in the middle of the day. + {&Timestamp{Seconds: 1296012345, Nanos: 940483}, true, + time.Date(2011, 1, 26, 3, 25, 45, 940483, time.UTC)}, +} + +func TestValidateTimestamp(t *testing.T) { + for _, s := range tests { + got := validateTimestamp(s.ts) + if (got == nil) != s.valid { + t.Errorf("validateTimestamp(%v) = %v, want %v", s.ts, got, s.valid) + } + } +} + +func TestTimestampFromProto(t *testing.T) { + for _, s := range tests { + got, err := TimestampFromProto(s.ts) + if (err == nil) != s.valid { + t.Errorf("TimestampFromProto(%v) error = %v, but valid = %t", s.ts, err, s.valid) + } else if s.valid && got != s.t { + t.Errorf("TimestampFromProto(%v) = %v, want %v", s.ts, got, s.t) + } + } + // Special case: a nil TimestampFromProto is an error, but returns the 0 Unix time. + got, err := TimestampFromProto(nil) + want := time.Unix(0, 0).UTC() + if got != want { + t.Errorf("TimestampFromProto(nil) = %v, want %v", got, want) + } + if err == nil { + t.Errorf("TimestampFromProto(nil) error = nil, expected error") + } +} + +func TestTimestampProto(t *testing.T) { + for _, s := range tests { + got, err := TimestampProto(s.t) + if (err == nil) != s.valid { + t.Errorf("TimestampProto(%v) error = %v, but valid = %t", s.t, err, s.valid) + } else if s.valid && !proto.Equal(got, s.ts) { + t.Errorf("TimestampProto(%v) = %v, want %v", s.t, got, s.ts) + } + } + // No corresponding special case here: no time.Time results in a nil Timestamp. +} + +func TestTimestampString(t *testing.T) { + for _, test := range []struct { + ts *Timestamp + want string + }{ + // Not much testing needed because presumably time.Format is + // well-tested. + {&Timestamp{Seconds: 0, Nanos: 0}, "1970-01-01T00:00:00Z"}, + {&Timestamp{Seconds: minValidSeconds - 1, Nanos: 0}, "(timestamp: &types.Timestamp{Seconds: -62135596801,\nNanos: 0,\n} before 0001-01-01)"}, + } { + got := TimestampString(test.ts) + if got != test.want { + t.Errorf("TimestampString(%v) = %q, want %q", test.ts, got, test.want) + } + } +} + +func utcDate(year, month, day int) time.Time { + return time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC) +} + +func TestTimestampNow(t *testing.T) { + // Bracket the expected time. + before := time.Now() + ts := TimestampNow() + after := time.Now() + + tm, err := TimestampFromProto(ts) + if err != nil { + t.Errorf("between %v and %v\nTimestampNow() = %v\nwhich is invalid (%v)", before, after, ts, err) + } + if tm.Before(before) || tm.After(after) { + t.Errorf("between %v and %v\nTimestamp(TimestampNow()) = %v", before, after, tm) + } +} diff --git a/deps/github.com/gogo/protobuf/types/type.pb.go b/deps/github.com/gogo/protobuf/types/type.pb.go new file mode 100644 index 000000000..552695c03 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/type.pb.go @@ -0,0 +1,3228 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/type.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// The syntax in which a protocol buffer element is defined. +type Syntax int32 + +const ( + // Syntax `proto2`. + Syntax_SYNTAX_PROTO2 Syntax = 0 + // Syntax `proto3`. + Syntax_SYNTAX_PROTO3 Syntax = 1 +) + +var Syntax_name = map[int32]string{ + 0: "SYNTAX_PROTO2", + 1: "SYNTAX_PROTO3", +} +var Syntax_value = map[string]int32{ + "SYNTAX_PROTO2": 0, + "SYNTAX_PROTO3": 1, +} + +func (Syntax) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{0} +} + +// Basic field types. +type Field_Kind int32 + +const ( + // Field type unknown. + Field_TYPE_UNKNOWN Field_Kind = 0 + // Field type double. + Field_TYPE_DOUBLE Field_Kind = 1 + // Field type float. + Field_TYPE_FLOAT Field_Kind = 2 + // Field type int64. + Field_TYPE_INT64 Field_Kind = 3 + // Field type uint64. + Field_TYPE_UINT64 Field_Kind = 4 + // Field type int32. + Field_TYPE_INT32 Field_Kind = 5 + // Field type fixed64. + Field_TYPE_FIXED64 Field_Kind = 6 + // Field type fixed32. + Field_TYPE_FIXED32 Field_Kind = 7 + // Field type bool. + Field_TYPE_BOOL Field_Kind = 8 + // Field type string. + Field_TYPE_STRING Field_Kind = 9 + // Field type group. Proto2 syntax only, and deprecated. + Field_TYPE_GROUP Field_Kind = 10 + // Field type message. + Field_TYPE_MESSAGE Field_Kind = 11 + // Field type bytes. + Field_TYPE_BYTES Field_Kind = 12 + // Field type uint32. + Field_TYPE_UINT32 Field_Kind = 13 + // Field type enum. + Field_TYPE_ENUM Field_Kind = 14 + // Field type sfixed32. + Field_TYPE_SFIXED32 Field_Kind = 15 + // Field type sfixed64. + Field_TYPE_SFIXED64 Field_Kind = 16 + // Field type sint32. + Field_TYPE_SINT32 Field_Kind = 17 + // Field type sint64. + Field_TYPE_SINT64 Field_Kind = 18 +) + +var Field_Kind_name = map[int32]string{ + 0: "TYPE_UNKNOWN", + 1: "TYPE_DOUBLE", + 2: "TYPE_FLOAT", + 3: "TYPE_INT64", + 4: "TYPE_UINT64", + 5: "TYPE_INT32", + 6: "TYPE_FIXED64", + 7: "TYPE_FIXED32", + 8: "TYPE_BOOL", + 9: "TYPE_STRING", + 10: "TYPE_GROUP", + 11: "TYPE_MESSAGE", + 12: "TYPE_BYTES", + 13: "TYPE_UINT32", + 14: "TYPE_ENUM", + 15: "TYPE_SFIXED32", + 16: "TYPE_SFIXED64", + 17: "TYPE_SINT32", + 18: "TYPE_SINT64", +} +var Field_Kind_value = map[string]int32{ + "TYPE_UNKNOWN": 0, + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18, +} + +func (Field_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{1, 0} +} + +// Whether a field is optional, required, or repeated. +type Field_Cardinality int32 + +const ( + // For fields with unknown cardinality. + Field_CARDINALITY_UNKNOWN Field_Cardinality = 0 + // For optional fields. + Field_CARDINALITY_OPTIONAL Field_Cardinality = 1 + // For required fields. Proto2 syntax only. + Field_CARDINALITY_REQUIRED Field_Cardinality = 2 + // For repeated fields. + Field_CARDINALITY_REPEATED Field_Cardinality = 3 +) + +var Field_Cardinality_name = map[int32]string{ + 0: "CARDINALITY_UNKNOWN", + 1: "CARDINALITY_OPTIONAL", + 2: "CARDINALITY_REQUIRED", + 3: "CARDINALITY_REPEATED", +} +var Field_Cardinality_value = map[string]int32{ + "CARDINALITY_UNKNOWN": 0, + "CARDINALITY_OPTIONAL": 1, + "CARDINALITY_REQUIRED": 2, + "CARDINALITY_REPEATED": 3, +} + +func (Field_Cardinality) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{1, 1} +} + +// A protocol buffer message type. +type Type struct { + // The fully qualified message name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The list of fields. + Fields []*Field `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"` + // The list of types appearing in `oneof` definitions in this type. + Oneofs []string `protobuf:"bytes,3,rep,name=oneofs" json:"oneofs,omitempty"` + // The protocol buffer options. + Options []*Option `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"` + // The source context. + SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"` + // The source syntax. + Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Type) Reset() { *m = Type{} } +func (*Type) ProtoMessage() {} +func (*Type) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{0} +} +func (m *Type) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Type.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Type) XXX_Merge(src proto.Message) { + xxx_messageInfo_Type.Merge(dst, src) +} +func (m *Type) XXX_Size() int { + return m.Size() +} +func (m *Type) XXX_DiscardUnknown() { + xxx_messageInfo_Type.DiscardUnknown(m) +} + +var xxx_messageInfo_Type proto.InternalMessageInfo + +func (m *Type) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Type) GetFields() []*Field { + if m != nil { + return m.Fields + } + return nil +} + +func (m *Type) GetOneofs() []string { + if m != nil { + return m.Oneofs + } + return nil +} + +func (m *Type) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Type) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Type) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Type) XXX_MessageName() string { + return "google.protobuf.Type" +} + +// A single field of a message type. +type Field struct { + // The field type. + Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty"` + // The field cardinality. + Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"` + // The field number. + Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + // The field name. + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // The field type URL, without the scheme, for message or enumeration + // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // The index of the field type in `Type.oneofs`, for message or enumeration + // types. The first type has index 1; zero means the type is not in the list. + OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty"` + // Whether to use alternative packed wire representation. + Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"` + // The protocol buffer options. + Options []*Option `protobuf:"bytes,9,rep,name=options" json:"options,omitempty"` + // The field JSON name. + JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"` + // The string value of the default value of this field. Proto2 syntax only. + DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Field) Reset() { *m = Field{} } +func (*Field) ProtoMessage() {} +func (*Field) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{1} +} +func (m *Field) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Field.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Field) XXX_Merge(src proto.Message) { + xxx_messageInfo_Field.Merge(dst, src) +} +func (m *Field) XXX_Size() int { + return m.Size() +} +func (m *Field) XXX_DiscardUnknown() { + xxx_messageInfo_Field.DiscardUnknown(m) +} + +var xxx_messageInfo_Field proto.InternalMessageInfo + +func (m *Field) GetKind() Field_Kind { + if m != nil { + return m.Kind + } + return Field_TYPE_UNKNOWN +} + +func (m *Field) GetCardinality() Field_Cardinality { + if m != nil { + return m.Cardinality + } + return Field_CARDINALITY_UNKNOWN +} + +func (m *Field) GetNumber() int32 { + if m != nil { + return m.Number + } + return 0 +} + +func (m *Field) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Field) GetTypeUrl() string { + if m != nil { + return m.TypeUrl + } + return "" +} + +func (m *Field) GetOneofIndex() int32 { + if m != nil { + return m.OneofIndex + } + return 0 +} + +func (m *Field) GetPacked() bool { + if m != nil { + return m.Packed + } + return false +} + +func (m *Field) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Field) GetJsonName() string { + if m != nil { + return m.JsonName + } + return "" +} + +func (m *Field) GetDefaultValue() string { + if m != nil { + return m.DefaultValue + } + return "" +} + +func (*Field) XXX_MessageName() string { + return "google.protobuf.Field" +} + +// Enum type definition. +type Enum struct { + // Enum type name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Enum value definitions. + Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue" json:"enumvalue,omitempty"` + // Protocol buffer options. + Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"` + // The source context. + SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"` + // The source syntax. + Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Enum) Reset() { *m = Enum{} } +func (*Enum) ProtoMessage() {} +func (*Enum) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{2} +} +func (m *Enum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Enum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Enum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Enum) XXX_Merge(src proto.Message) { + xxx_messageInfo_Enum.Merge(dst, src) +} +func (m *Enum) XXX_Size() int { + return m.Size() +} +func (m *Enum) XXX_DiscardUnknown() { + xxx_messageInfo_Enum.DiscardUnknown(m) +} + +var xxx_messageInfo_Enum proto.InternalMessageInfo + +func (m *Enum) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Enum) GetEnumvalue() []*EnumValue { + if m != nil { + return m.Enumvalue + } + return nil +} + +func (m *Enum) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Enum) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Enum) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Enum) XXX_MessageName() string { + return "google.protobuf.Enum" +} + +// Enum value definition. +type EnumValue struct { + // Enum value name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Enum value number. + Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` + // Protocol buffer options. + Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumValue) Reset() { *m = EnumValue{} } +func (*EnumValue) ProtoMessage() {} +func (*EnumValue) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{3} +} +func (m *EnumValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EnumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EnumValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *EnumValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValue.Merge(dst, src) +} +func (m *EnumValue) XXX_Size() int { + return m.Size() +} +func (m *EnumValue) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValue.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValue proto.InternalMessageInfo + +func (m *EnumValue) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *EnumValue) GetNumber() int32 { + if m != nil { + return m.Number + } + return 0 +} + +func (m *EnumValue) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (*EnumValue) XXX_MessageName() string { + return "google.protobuf.EnumValue" +} + +// A protocol buffer option, which can be attached to a message, field, +// enumeration, etc. +type Option struct { + // The option's name. For protobuf built-in options (options defined in + // descriptor.proto), this is the short name. For example, `"map_entry"`. + // For custom options, it should be the fully-qualified name. For example, + // `"google.api.http"`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The option's value packed in an Any message. If the value is a primitive, + // the corresponding wrapper type defined in google/protobuf/wrappers.proto + // should be used. If the value is an enum, it should be stored as an int32 + // value using the google.protobuf.Int32Value type. + Value *Any `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Option) Reset() { *m = Option{} } +func (*Option) ProtoMessage() {} +func (*Option) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{4} +} +func (m *Option) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Option.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Option) XXX_Merge(src proto.Message) { + xxx_messageInfo_Option.Merge(dst, src) +} +func (m *Option) XXX_Size() int { + return m.Size() +} +func (m *Option) XXX_DiscardUnknown() { + xxx_messageInfo_Option.DiscardUnknown(m) +} + +var xxx_messageInfo_Option proto.InternalMessageInfo + +func (m *Option) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Option) GetValue() *Any { + if m != nil { + return m.Value + } + return nil +} + +func (*Option) XXX_MessageName() string { + return "google.protobuf.Option" +} +func init() { + proto.RegisterType((*Type)(nil), "google.protobuf.Type") + proto.RegisterType((*Field)(nil), "google.protobuf.Field") + proto.RegisterType((*Enum)(nil), "google.protobuf.Enum") + proto.RegisterType((*EnumValue)(nil), "google.protobuf.EnumValue") + proto.RegisterType((*Option)(nil), "google.protobuf.Option") + proto.RegisterEnum("google.protobuf.Syntax", Syntax_name, Syntax_value) + proto.RegisterEnum("google.protobuf.Field_Kind", Field_Kind_name, Field_Kind_value) + proto.RegisterEnum("google.protobuf.Field_Cardinality", Field_Cardinality_name, Field_Cardinality_value) +} +func (this *Type) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Type) + if !ok { + that2, ok := that.(Type) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Fields) != len(that1.Fields) { + if len(this.Fields) < len(that1.Fields) { + return -1 + } + return 1 + } + for i := range this.Fields { + if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 { + return c + } + } + if len(this.Oneofs) != len(that1.Oneofs) { + if len(this.Oneofs) < len(that1.Oneofs) { + return -1 + } + return 1 + } + for i := range this.Oneofs { + if this.Oneofs[i] != that1.Oneofs[i] { + if this.Oneofs[i] < that1.Oneofs[i] { + return -1 + } + return 1 + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Field) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Field) + if !ok { + that2, ok := that.(Field) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Kind != that1.Kind { + if this.Kind < that1.Kind { + return -1 + } + return 1 + } + if this.Cardinality != that1.Cardinality { + if this.Cardinality < that1.Cardinality { + return -1 + } + return 1 + } + if this.Number != that1.Number { + if this.Number < that1.Number { + return -1 + } + return 1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.TypeUrl != that1.TypeUrl { + if this.TypeUrl < that1.TypeUrl { + return -1 + } + return 1 + } + if this.OneofIndex != that1.OneofIndex { + if this.OneofIndex < that1.OneofIndex { + return -1 + } + return 1 + } + if this.Packed != that1.Packed { + if !this.Packed { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.JsonName != that1.JsonName { + if this.JsonName < that1.JsonName { + return -1 + } + return 1 + } + if this.DefaultValue != that1.DefaultValue { + if this.DefaultValue < that1.DefaultValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Enum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Enum) + if !ok { + that2, ok := that.(Enum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Enumvalue) != len(that1.Enumvalue) { + if len(this.Enumvalue) < len(that1.Enumvalue) { + return -1 + } + return 1 + } + for i := range this.Enumvalue { + if c := this.Enumvalue[i].Compare(that1.Enumvalue[i]); c != 0 { + return c + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *EnumValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*EnumValue) + if !ok { + that2, ok := that.(EnumValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.Number != that1.Number { + if this.Number < that1.Number { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Option) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Option) + if !ok { + that2, ok := that.(Option) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (x Syntax) String() string { + s, ok := Syntax_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Field_Kind) String() string { + s, ok := Field_Kind_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Field_Cardinality) String() string { + s, ok := Field_Cardinality_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Type) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Type) + if !ok { + that2, ok := that.(Type) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Fields) != len(that1.Fields) { + return false + } + for i := range this.Fields { + if !this.Fields[i].Equal(that1.Fields[i]) { + return false + } + } + if len(this.Oneofs) != len(that1.Oneofs) { + return false + } + for i := range this.Oneofs { + if this.Oneofs[i] != that1.Oneofs[i] { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Field) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Field) + if !ok { + that2, ok := that.(Field) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Kind != that1.Kind { + return false + } + if this.Cardinality != that1.Cardinality { + return false + } + if this.Number != that1.Number { + return false + } + if this.Name != that1.Name { + return false + } + if this.TypeUrl != that1.TypeUrl { + return false + } + if this.OneofIndex != that1.OneofIndex { + return false + } + if this.Packed != that1.Packed { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.JsonName != that1.JsonName { + return false + } + if this.DefaultValue != that1.DefaultValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Enum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Enum) + if !ok { + that2, ok := that.(Enum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Enumvalue) != len(that1.Enumvalue) { + return false + } + for i := range this.Enumvalue { + if !this.Enumvalue[i].Equal(that1.Enumvalue[i]) { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *EnumValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*EnumValue) + if !ok { + that2, ok := that.(EnumValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Number != that1.Number { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Option) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Option) + if !ok { + that2, ok := that.(Option) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Type) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&types.Type{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Fields != nil { + s = append(s, "Fields: "+fmt.Sprintf("%#v", this.Fields)+",\n") + } + s = append(s, "Oneofs: "+fmt.Sprintf("%#v", this.Oneofs)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Field) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&types.Field{") + s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") + s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") + s = append(s, "OneofIndex: "+fmt.Sprintf("%#v", this.OneofIndex)+",\n") + s = append(s, "Packed: "+fmt.Sprintf("%#v", this.Packed)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "JsonName: "+fmt.Sprintf("%#v", this.JsonName)+",\n") + s = append(s, "DefaultValue: "+fmt.Sprintf("%#v", this.DefaultValue)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Enum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&types.Enum{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Enumvalue != nil { + s = append(s, "Enumvalue: "+fmt.Sprintf("%#v", this.Enumvalue)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&types.EnumValue{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Option) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Option{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringType(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Type) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Type) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Fields) > 0 { + for _, msg := range m.Fields { + dAtA[i] = 0x12 + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Oneofs) > 0 { + for _, s := range m.Oneofs { + dAtA[i] = 0x1a + 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 len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x22 + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.SourceContext != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size())) + n1, err := m.SourceContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Syntax != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Field) 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 *Field) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Kind != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Kind)) + } + if m.Cardinality != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Cardinality)) + } + if m.Number != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Number)) + } + if len(m.Name) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.TypeUrl) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.TypeUrl))) + i += copy(dAtA[i:], m.TypeUrl) + } + if m.OneofIndex != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintType(dAtA, i, uint64(m.OneofIndex)) + } + if m.Packed { + dAtA[i] = 0x40 + i++ + if m.Packed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x4a + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.JsonName) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.JsonName))) + i += copy(dAtA[i:], m.JsonName) + } + if len(m.DefaultValue) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.DefaultValue))) + i += copy(dAtA[i:], m.DefaultValue) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Enum) 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 *Enum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Enumvalue) > 0 { + for _, msg := range m.Enumvalue { + dAtA[i] = 0x12 + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x1a + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.SourceContext != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size())) + n2, err := m.SourceContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Syntax != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *EnumValue) 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 *EnumValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Number != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Number)) + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x1a + i++ + i = encodeVarintType(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 *Option) 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 *Option) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintType(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 encodeVarintType(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 NewPopulatedType(r randyType, easy bool) *Type { + this := &Type{} + this.Name = string(randStringType(r)) + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Fields = make([]*Field, v1) + for i := 0; i < v1; i++ { + this.Fields[i] = NewPopulatedField(r, easy) + } + } + v2 := r.Intn(10) + this.Oneofs = make([]string, v2) + for i := 0; i < v2; i++ { + this.Oneofs[i] = string(randStringType(r)) + } + if r.Intn(10) != 0 { + v3 := r.Intn(5) + this.Options = make([]*Option, v3) + for i := 0; i < v3; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if r.Intn(10) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 7) + } + return this +} + +func NewPopulatedField(r randyType, easy bool) *Field { + this := &Field{} + this.Kind = Field_Kind([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}[r.Intn(19)]) + this.Cardinality = Field_Cardinality([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Number = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + this.Name = string(randStringType(r)) + this.TypeUrl = string(randStringType(r)) + this.OneofIndex = int32(r.Int31()) + if r.Intn(2) == 0 { + this.OneofIndex *= -1 + } + this.Packed = bool(bool(r.Intn(2) == 0)) + if r.Intn(10) != 0 { + v4 := r.Intn(5) + this.Options = make([]*Option, v4) + for i := 0; i < v4; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.JsonName = string(randStringType(r)) + this.DefaultValue = string(randStringType(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 12) + } + return this +} + +func NewPopulatedEnum(r randyType, easy bool) *Enum { + this := &Enum{} + this.Name = string(randStringType(r)) + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.Enumvalue = make([]*EnumValue, v5) + for i := 0; i < v5; i++ { + this.Enumvalue[i] = NewPopulatedEnumValue(r, easy) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(5) + this.Options = make([]*Option, v6) + for i := 0; i < v6; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if r.Intn(10) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 6) + } + return this +} + +func NewPopulatedEnumValue(r randyType, easy bool) *EnumValue { + this := &EnumValue{} + this.Name = string(randStringType(r)) + this.Number = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + if r.Intn(10) != 0 { + v7 := r.Intn(5) + this.Options = make([]*Option, v7) + for i := 0; i < v7; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 4) + } + return this +} + +func NewPopulatedOption(r randyType, easy bool) *Option { + this := &Option{} + this.Name = string(randStringType(r)) + if r.Intn(10) != 0 { + this.Value = NewPopulatedAny(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 3) + } + return this +} + +type randyType interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneType(r randyType) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringType(r randyType) string { + v8 := r.Intn(100) + tmps := make([]rune, v8) + for i := 0; i < v8; i++ { + tmps[i] = randUTF8RuneType(r) + } + return string(tmps) +} +func randUnrecognizedType(r randyType, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldType(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldType(dAtA []byte, r randyType, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + v9 := r.Int63() + if r.Intn(2) == 0 { + v9 *= -1 + } + dAtA = encodeVarintPopulateType(dAtA, uint64(v9)) + case 1: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateType(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateType(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Type) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if len(m.Fields) > 0 { + for _, e := range m.Fields { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Oneofs) > 0 { + for _, s := range m.Oneofs { + l = len(s) + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.Syntax != 0 { + n += 1 + sovType(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Field) Size() (n int) { + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovType(uint64(m.Kind)) + } + if m.Cardinality != 0 { + n += 1 + sovType(uint64(m.Cardinality)) + } + if m.Number != 0 { + n += 1 + sovType(uint64(m.Number)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + l = len(m.TypeUrl) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.OneofIndex != 0 { + n += 1 + sovType(uint64(m.OneofIndex)) + } + if m.Packed { + n += 2 + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + l = len(m.JsonName) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + l = len(m.DefaultValue) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Enum) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if len(m.Enumvalue) > 0 { + for _, e := range m.Enumvalue { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.Syntax != 0 { + n += 1 + sovType(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *EnumValue) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.Number != 0 { + n += 1 + sovType(uint64(m.Number)) + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Option) Size() (n int) { + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovType(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozType(x uint64) (n int) { + return sovType(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Type) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Type{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Fields:` + strings.Replace(fmt.Sprintf("%v", this.Fields), "Field", "Field", 1) + `,`, + `Oneofs:` + fmt.Sprintf("%v", this.Oneofs) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Field) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Field{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, + `OneofIndex:` + fmt.Sprintf("%v", this.OneofIndex) + `,`, + `Packed:` + fmt.Sprintf("%v", this.Packed) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `JsonName:` + fmt.Sprintf("%v", this.JsonName) + `,`, + `DefaultValue:` + fmt.Sprintf("%v", this.DefaultValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Enum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Enum{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Enumvalue:` + strings.Replace(fmt.Sprintf("%v", this.Enumvalue), "EnumValue", "EnumValue", 1) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *EnumValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EnumValue{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Option) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Option{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + strings.Replace(fmt.Sprintf("%v", this.Value), "Any", "Any", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringType(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Type) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Type: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Type: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fields = append(m.Fields, &Field{}) + if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Oneofs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Oneofs = append(m.Oneofs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Field) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Field: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= (Field_Kind(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType) + } + m.Cardinality = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Cardinality |= (Field_Cardinality(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OneofIndex", wireType) + } + m.OneofIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OneofIndex |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Packed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Packed = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JsonName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DefaultValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Enum) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Enum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Enumvalue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Enumvalue = append(m.Enumvalue, &EnumValue{}) + if err := m.Enumvalue[len(m.Enumvalue)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EnumValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EnumValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EnumValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Option) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Option: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Option: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &Any{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipType(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowType + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowType + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowType + } + 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, ErrInvalidLengthType + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowType + } + 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 := skipType(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 ( + ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowType = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("google/protobuf/type.proto", fileDescriptor_type_0082d870c49329d7) } + +var fileDescriptor_type_0082d870c49329d7 = []byte{ + // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x73, 0xda, 0x46, + 0x14, 0xf6, 0x0a, 0x21, 0xa3, 0x87, 0xc1, 0x9b, 0x4d, 0x26, 0x51, 0x9c, 0x19, 0x95, 0xa1, 0x3d, + 0x30, 0x39, 0xe0, 0x29, 0x78, 0x3c, 0xbd, 0x82, 0x91, 0x29, 0x63, 0x22, 0xa9, 0x8b, 0x68, 0xe2, + 0x5e, 0x18, 0x0c, 0x72, 0x86, 0x44, 0xac, 0x18, 0x24, 0x5a, 0x73, 0xeb, 0x4c, 0xcf, 0xfd, 0x27, + 0x7a, 0xea, 0xf4, 0xdc, 0x3f, 0xc2, 0xc7, 0x1e, 0x7b, 0xac, 0xc9, 0xa5, 0xc7, 0x1c, 0x73, 0x6b, + 0x67, 0x57, 0x20, 0x8b, 0x1f, 0x9d, 0x49, 0xdb, 0x1b, 0xef, 0xfb, 0xbe, 0xf7, 0x73, 0x9f, 0x1e, + 0x70, 0xf4, 0xda, 0xf7, 0x5f, 0x7b, 0xee, 0xf1, 0x64, 0xea, 0x87, 0xfe, 0xd5, 0xec, 0xfa, 0x38, + 0x9c, 0x4f, 0xdc, 0xb2, 0xb0, 0xc8, 0x61, 0xc4, 0x95,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0x70, 0xa4, 0x3f, 0xee, 0x70, + 0xbc, 0x01, 0x35, 0x6e, 0x61, 0xe7, 0x14, 0xee, 0x3f, 0x6c, 0x69, 0xed, 0xc3, 0xfe, 0xf7, 0x3d, + 0x16, 0xbf, 0x04, 0x25, 0x82, 0x76, 0x26, 0x7a, 0x0e, 0xe9, 0xd5, 0xa8, 0x79, 0xe3, 0x8f, 0xb6, + 0xc2, 0xd5, 0xd8, 0x9c, 0x46, 0x92, 0xe7, 0x65, 0x50, 0xa2, 0x3e, 0xf8, 0xb2, 0x75, 0x2e, 0x4d, + 0xa7, 0xf6, 0xaa, 0x67, 0x53, 0xcb, 0xb1, 0x2a, 0x78, 0x6f, 0x13, 0xaa, 0x62, 0x54, 0xff, 0x01, + 0xfd, 0x7e, 0xa7, 0xef, 0xbd, 0xbf, 0xd3, 0xd1, 0x87, 0x3b, 0x1d, 0x7d, 0xbf, 0xd0, 0xd1, 0xcf, + 0x0b, 0x1d, 0xdd, 0x2e, 0x74, 0xf4, 0xdb, 0x42, 0x47, 0x7f, 0x2c, 0x74, 0xf4, 0xe7, 0x42, 0xdf, + 0x7b, 0xcf, 0xf1, 0x77, 0x3a, 0xba, 0x7d, 0xa7, 0x23, 0x78, 0x38, 0xf0, 0xc7, 0x9b, 0x25, 0xd4, + 0x55, 0xfe, 0x9f, 0x63, 0x73, 0xcb, 0x46, 0xdf, 0xa4, 0xf9, 0xd1, 0x0a, 0x3e, 0x20, 0xf4, 0x93, + 0x94, 0x6a, 0xda, 0xf5, 0x5f, 0x24, 0xbd, 0x19, 0xc9, 0xed, 0x55, 0xc5, 0x2f, 0x5d, 0xcf, 0xbb, + 0x60, 0xfe, 0x77, 0x8c, 0xbb, 0x05, 0x57, 0x8a, 0x88, 0x53, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0xbc, 0x2a, 0x5e, 0x82, 0x2b, 0x07, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/types/wrappers.pb.go b/deps/github.com/gogo/protobuf/types/wrappers.pb.go new file mode 100644 index 000000000..5ac9f7196 --- /dev/null +++ b/deps/github.com/gogo/protobuf/types/wrappers.pb.go @@ -0,0 +1,2641 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/wrappers.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +type DoubleValue struct { + // The double value. + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DoubleValue) Reset() { *m = DoubleValue{} } +func (*DoubleValue) ProtoMessage() {} +func (*DoubleValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{0} +} +func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" } +func (m *DoubleValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DoubleValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleValue.Merge(dst, src) +} +func (m *DoubleValue) XXX_Size() int { + return m.Size() +} +func (m *DoubleValue) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleValue.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleValue proto.InternalMessageInfo + +func (m *DoubleValue) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*DoubleValue) XXX_MessageName() string { + return "google.protobuf.DoubleValue" +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +type FloatValue struct { + // The float value. + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatValue) Reset() { *m = FloatValue{} } +func (*FloatValue) ProtoMessage() {} +func (*FloatValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{1} +} +func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" } +func (m *FloatValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatValue.Merge(dst, src) +} +func (m *FloatValue) XXX_Size() int { + return m.Size() +} +func (m *FloatValue) XXX_DiscardUnknown() { + xxx_messageInfo_FloatValue.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatValue proto.InternalMessageInfo + +func (m *FloatValue) GetValue() float32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*FloatValue) XXX_MessageName() string { + return "google.protobuf.FloatValue" +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +type Int64Value struct { + // The int64 value. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int64Value) Reset() { *m = Int64Value{} } +func (*Int64Value) ProtoMessage() {} +func (*Int64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{2} +} +func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" } +func (m *Int64Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Int64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int64Value.Merge(dst, src) +} +func (m *Int64Value) XXX_Size() int { + return m.Size() +} +func (m *Int64Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int64Value proto.InternalMessageInfo + +func (m *Int64Value) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*Int64Value) XXX_MessageName() string { + return "google.protobuf.Int64Value" +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +type UInt64Value struct { + // The uint64 value. + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt64Value) Reset() { *m = UInt64Value{} } +func (*UInt64Value) ProtoMessage() {} +func (*UInt64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{3} +} +func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" } +func (m *UInt64Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UInt64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt64Value.Merge(dst, src) +} +func (m *UInt64Value) XXX_Size() int { + return m.Size() +} +func (m *UInt64Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt64Value proto.InternalMessageInfo + +func (m *UInt64Value) GetValue() uint64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*UInt64Value) XXX_MessageName() string { + return "google.protobuf.UInt64Value" +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +type Int32Value struct { + // The int32 value. + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int32Value) Reset() { *m = Int32Value{} } +func (*Int32Value) ProtoMessage() {} +func (*Int32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{4} +} +func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" } +func (m *Int32Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Int32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int32Value.Merge(dst, src) +} +func (m *Int32Value) XXX_Size() int { + return m.Size() +} +func (m *Int32Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int32Value proto.InternalMessageInfo + +func (m *Int32Value) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*Int32Value) XXX_MessageName() string { + return "google.protobuf.Int32Value" +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +type UInt32Value struct { + // The uint32 value. + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt32Value) Reset() { *m = UInt32Value{} } +func (*UInt32Value) ProtoMessage() {} +func (*UInt32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{5} +} +func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" } +func (m *UInt32Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UInt32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt32Value.Merge(dst, src) +} +func (m *UInt32Value) XXX_Size() int { + return m.Size() +} +func (m *UInt32Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt32Value proto.InternalMessageInfo + +func (m *UInt32Value) GetValue() uint32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*UInt32Value) XXX_MessageName() string { + return "google.protobuf.UInt32Value" +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +type BoolValue struct { + // The bool value. + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoolValue) Reset() { *m = BoolValue{} } +func (*BoolValue) ProtoMessage() {} +func (*BoolValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{6} +} +func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" } +func (m *BoolValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BoolValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolValue.Merge(dst, src) +} +func (m *BoolValue) XXX_Size() int { + return m.Size() +} +func (m *BoolValue) XXX_DiscardUnknown() { + xxx_messageInfo_BoolValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolValue proto.InternalMessageInfo + +func (m *BoolValue) GetValue() bool { + if m != nil { + return m.Value + } + return false +} + +func (*BoolValue) XXX_MessageName() string { + return "google.protobuf.BoolValue" +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +type StringValue struct { + // The string value. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringValue) Reset() { *m = StringValue{} } +func (*StringValue) ProtoMessage() {} +func (*StringValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{7} +} +func (*StringValue) XXX_WellKnownType() string { return "StringValue" } +func (m *StringValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StringValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *StringValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringValue.Merge(dst, src) +} +func (m *StringValue) XXX_Size() int { + return m.Size() +} +func (m *StringValue) XXX_DiscardUnknown() { + xxx_messageInfo_StringValue.DiscardUnknown(m) +} + +var xxx_messageInfo_StringValue proto.InternalMessageInfo + +func (m *StringValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (*StringValue) XXX_MessageName() string { + return "google.protobuf.StringValue" +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +type BytesValue struct { + // The bytes value. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BytesValue) Reset() { *m = BytesValue{} } +func (*BytesValue) ProtoMessage() {} +func (*BytesValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{8} +} +func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" } +func (m *BytesValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BytesValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BytesValue.Merge(dst, src) +} +func (m *BytesValue) XXX_Size() int { + return m.Size() +} +func (m *BytesValue) XXX_DiscardUnknown() { + xxx_messageInfo_BytesValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BytesValue proto.InternalMessageInfo + +func (m *BytesValue) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (*BytesValue) XXX_MessageName() string { + return "google.protobuf.BytesValue" +} +func init() { + proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue") + proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue") + proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value") + proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value") + proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value") + proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value") + proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue") + proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue") + proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") +} +func (this *DoubleValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DoubleValue) + if !ok { + that2, ok := that.(DoubleValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *FloatValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*FloatValue) + if !ok { + that2, ok := that.(FloatValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Int64Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Int64Value) + if !ok { + that2, ok := that.(Int64Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UInt64Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UInt64Value) + if !ok { + that2, ok := that.(UInt64Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Int32Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Int32Value) + if !ok { + that2, ok := that.(Int32Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UInt32Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UInt32Value) + if !ok { + that2, ok := that.(UInt32Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *BoolValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*BoolValue) + if !ok { + that2, ok := that.(BoolValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if !this.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *StringValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*StringValue) + if !ok { + that2, ok := that.(StringValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *BytesValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*BytesValue) + if !ok { + that2, ok := that.(BytesValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.Value, that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DoubleValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DoubleValue) + if !ok { + that2, ok := that.(DoubleValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatValue) + if !ok { + that2, ok := that.(FloatValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Int64Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Int64Value) + if !ok { + that2, ok := that.(Int64Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UInt64Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UInt64Value) + if !ok { + that2, ok := that.(UInt64Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Int32Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Int32Value) + if !ok { + that2, ok := that.(Int32Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UInt32Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UInt32Value) + if !ok { + that2, ok := that.(UInt32Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BoolValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BoolValue) + if !ok { + that2, ok := that.(BoolValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StringValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StringValue) + if !ok { + that2, ok := that.(StringValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BytesValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BytesValue) + if !ok { + that2, ok := that.(BytesValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Value, that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DoubleValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.DoubleValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FloatValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.FloatValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Int64Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Int64Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UInt64Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.UInt64Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Int32Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Int32Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UInt32Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.UInt32Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BoolValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.BoolValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *StringValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.StringValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *BytesValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.BytesValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringWrappers(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *DoubleValue) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DoubleValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FloatValue) 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 *FloatValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value)))) + i += 4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Int64Value) 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 *Int64Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UInt64Value) 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 *UInt64Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Int32Value) 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 *Int32Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UInt32Value) 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 *UInt32Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BoolValue) 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 *BoolValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value { + dAtA[i] = 0x8 + i++ + if m.Value { + 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 *StringValue) 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 *StringValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Value) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BytesValue) 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 *BytesValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Value) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintWrappers(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 NewPopulatedDoubleValue(r randyWrappers, easy bool) *DoubleValue { + this := &DoubleValue{} + this.Value = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedFloatValue(r randyWrappers, easy bool) *FloatValue { + this := &FloatValue{} + this.Value = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedInt64Value(r randyWrappers, easy bool) *Int64Value { + this := &Int64Value{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedUInt64Value(r randyWrappers, easy bool) *UInt64Value { + this := &UInt64Value{} + this.Value = uint64(uint64(r.Uint32())) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedInt32Value(r randyWrappers, easy bool) *Int32Value { + this := &Int32Value{} + this.Value = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedUInt32Value(r randyWrappers, easy bool) *UInt32Value { + this := &UInt32Value{} + this.Value = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedBoolValue(r randyWrappers, easy bool) *BoolValue { + this := &BoolValue{} + this.Value = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedStringValue(r randyWrappers, easy bool) *StringValue { + this := &StringValue{} + this.Value = string(randStringWrappers(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedBytesValue(r randyWrappers, easy bool) *BytesValue { + this := &BytesValue{} + v1 := r.Intn(100) + this.Value = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Value[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +type randyWrappers interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneWrappers(r randyWrappers) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringWrappers(r randyWrappers) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneWrappers(r) + } + return string(tmps) +} +func randUnrecognizedWrappers(r randyWrappers, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldWrappers(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldWrappers(dAtA []byte, r randyWrappers, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateWrappers(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *DoubleValue) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatValue) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Int64Value) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UInt64Value) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Int32Value) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UInt32Value) Size() (n int) { + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BoolValue) Size() (n int) { + var l int + _ = l + if m.Value { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StringValue) Size() (n int) { + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovWrappers(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BytesValue) Size() (n int) { + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovWrappers(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovWrappers(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozWrappers(x uint64) (n int) { + return sovWrappers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *DoubleValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DoubleValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Int64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UInt64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UInt64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Int32Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int32Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UInt32Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UInt32Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BoolValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BoolValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *StringValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StringValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BytesValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BytesValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringWrappers(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *DoubleValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DoubleValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DoubleValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FloatValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Value = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Int64Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Int64Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int64Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UInt64Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UInt64Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UInt64Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Int32Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Int32Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int32Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UInt32Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UInt32Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UInt32Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BoolValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BoolValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BoolValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StringValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StringValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StringValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthWrappers + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BytesValue) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BytesValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BytesValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWrappers + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWrappers(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + 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, ErrIntOverflowWrappers + } + 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, ErrInvalidLengthWrappers + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + 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 := skipWrappers(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 ( + ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_wrappers_c5239a825c7dfb53) +} + +var fileDescriptor_wrappers_c5239a825c7dfb53 = []byte{ + // 285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c, + 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca, + 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c, + 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5, + 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13, + 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8, + 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca, + 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a, + 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x3b, + 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xd8, 0xf0, 0x48, + 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, + 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, + 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x45, 0x87, 0x13, 0x6f, 0x38, 0x34, 0xbe, 0x02, + 0x40, 0x22, 0x01, 0x8c, 0x51, 0xac, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x3f, 0x18, 0x19, 0x17, 0x31, + 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0x68, 0x09, 0x80, 0x6a, 0xd1, 0x0b, 0x4f, + 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4c, 0x62, 0x03, 0x9b, 0x65, 0x0c, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x31, 0x55, 0x64, 0x90, 0x0a, 0x02, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/field.go b/deps/github.com/gogo/protobuf/vanity/field.go index 9c5e2263c..62cdddfab 100644 --- a/deps/github.com/gogo/protobuf/vanity/field.go +++ b/deps/github.com/gogo/protobuf/vanity/field.go @@ -72,6 +72,13 @@ func TurnOffNullable(field *descriptor.FieldDescriptorProto) { SetBoolFieldOption(gogoproto.E_Nullable, false)(field) } +func TurnOffNullableForNativeTypes(field *descriptor.FieldDescriptorProto) { + if field.IsRepeated() || field.IsMessage() { + return + } + SetBoolFieldOption(gogoproto.E_Nullable, false)(field) +} + func TurnOffNullableForNativeTypesWithoutDefaultsOnly(field *descriptor.FieldDescriptorProto) { if field.IsRepeated() || field.IsMessage() { return diff --git a/deps/github.com/gogo/protobuf/vanity/file.go b/deps/github.com/gogo/protobuf/vanity/file.go index e7b56de1f..d1877bb26 100644 --- a/deps/github.com/gogo/protobuf/vanity/file.go +++ b/deps/github.com/gogo/protobuf/vanity/file.go @@ -179,3 +179,11 @@ func TurnOffGogoImport(file *descriptor.FileDescriptorProto) { func TurnOnCompareAll(file *descriptor.FileDescriptorProto) { SetBoolFileOption(gogoproto.E_CompareAll, true)(file) } + +func TurnOnMessageNameAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_MessagenameAll, true)(file) +} + +func TurnOnGoRegistration(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoRegistration, true)(file) +} diff --git a/deps/github.com/gogo/protobuf/vanity/msg.go b/deps/github.com/gogo/protobuf/vanity/msg.go index 7ff2b9879..b9a67b500 100644 --- a/deps/github.com/gogo/protobuf/vanity/msg.go +++ b/deps/github.com/gogo/protobuf/vanity/msg.go @@ -140,3 +140,7 @@ func TurnOffGoUnrecognized(msg *descriptor.DescriptorProto) { func TurnOnCompare(msg *descriptor.DescriptorProto) { SetBoolMessageOption(gogoproto.E_Compare, true)(msg) } + +func TurnOnMessageName(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Messagename, true)(msg) +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/Makefile b/deps/github.com/gogo/protobuf/vanity/test/Makefile new file mode 100644 index 000000000..0958c4a9e --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/Makefile @@ -0,0 +1,46 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogofast + protoc --gogofast_out=./fast/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ proto3.proto + go install github.com/gogo/protobuf/protoc-gen-gogofaster + protoc --gogofaster_out=./faster/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ proto3.proto + go install github.com/gogo/protobuf/protoc-gen-gogoslick + protoc --gogoslick_out=./slick/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ proto3.proto + +test: + go install github.com/gogo/protobuf/protoc-gen-gofast + protoc --gofast_out=./gofast/ vanity.proto + go test ./... diff --git a/deps/github.com/gogo/protobuf/vanity/test/doc.go b/deps/github.com/gogo/protobuf/vanity/test/doc.go new file mode 100644 index 000000000..56e540407 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/doc.go @@ -0,0 +1 @@ +package test diff --git a/deps/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go b/deps/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go new file mode 100644 index 000000000..bf41bc750 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go @@ -0,0 +1,410 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogovanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type B struct { + String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` + Int64 *int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64,omitempty"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_gogovanity_77d0a6938d93e1f7, []int{0} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil && m.Int64 != nil { + return *m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.Int64 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int64)) + } + if m.Int32 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintGogovanity(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 *B) Size() (n int) { + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + if m.Int64 != nil { + n += 1 + sovGogovanity(uint64(*m.Int64)) + } + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + 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 skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("gogovanity.proto", fileDescriptor_gogovanity_77d0a6938d93e1f7) } + +var fileDescriptor_gogovanity_77d0a6938d93e1f7 = []byte{ + // 157 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x05, 0x73, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0x04, 0x15, 0x13, 0x12, 0xe1, 0x62, 0xf5, 0xcc, + 0x2b, 0x31, 0x33, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x0e, 0x82, 0x70, 0x84, 0xa4, 0xc0, 0xa2, + 0xc6, 0x46, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xac, 0x56, 0x2c, 0x86, 0x46, 0xc6, 0x26, 0x41, 0x10, + 0x21, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x11, + 0x10, 0x00, 0x00, 0xff, 0xff, 0x35, 0x73, 0x31, 0x4a, 0xac, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go b/deps/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go new file mode 100644 index 000000000..bd1696314 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (m *Aproto3) String() string { return proto.CompactTextString(m) } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_7d4345ceecd7203e, []int{0} +} +func (m *Aproto3) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aproto3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aproto3.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Aproto3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aproto3.Merge(dst, src) +} +func (m *Aproto3) XXX_Size() int { + return m.Size() +} +func (m *Aproto3) XXX_DiscardUnknown() { + xxx_messageInfo_Aproto3.DiscardUnknown(m) +} + +var xxx_messageInfo_Aproto3 proto.InternalMessageInfo + +func (m *Aproto3) GetB() string { + if m != nil { + return m.B + } + return "" +} + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (m *Aproto3) 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 *Aproto3) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintProto3(dAtA, i, uint64(len(m.B))) + i += copy(dAtA[i:], m.B) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintProto3(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 *Aproto3) Size() (n int) { + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + 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 skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_7d4345ceecd7203e) } + +var fileDescriptor_proto3_7d4345ceecd7203e = []byte{ + // 82 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0x46, 0x27, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, + 0x31, 0x89, 0x0d, 0xa2, 0x06, 0x10, 0x00, 0x00, 0xff, 0xff, 0x97, 0x18, 0x92, 0x84, 0x45, 0x00, + 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go b/deps/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go new file mode 100644 index 000000000..3ad1c2429 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go @@ -0,0 +1,377 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: vanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A struct { + Strings *string `protobuf:"bytes,1,opt,name=Strings" json:"Strings,omitempty"` + Int *int64 `protobuf:"varint,2,req,name=Int" json:"Int,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_vanity_62f5a5ee00b3fc23, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetStrings() string { + if m != nil && m.Strings != nil { + return *m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil && m.Int != nil { + return *m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Strings != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVanity(dAtA, i, uint64(len(*m.Strings))) + i += copy(dAtA[i:], *m.Strings) + } + if m.Int == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } else { + dAtA[i] = 0x10 + i++ + i = encodeVarintVanity(dAtA, i, uint64(*m.Int)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintVanity(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 *A) Size() (n int) { + var l int + _ = l + if m.Strings != nil { + l = len(*m.Strings) + n += 1 + l + sovVanity(uint64(l)) + } + if m.Int != nil { + n += 1 + sovVanity(uint64(*m.Int)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) 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 ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Strings = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + 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 github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("vanity.proto", fileDescriptor_vanity_62f5a5ee00b3fc23) } + +var fileDescriptor_vanity_62f5a5ee00b3fc23 = []byte{ + // 97 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xf4, 0xb9, 0x18, + 0x1d, 0x85, 0x24, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x83, 0x60, 0x5c, 0x21, 0x01, 0x2e, 0x66, 0xcf, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x26, + 0x0d, 0xe6, 0x20, 0x10, 0xd3, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, + 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x7a, 0xd7, 0x63, 0x55, 0x00, 0x00, + 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go b/deps/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go new file mode 100644 index 000000000..acc290b1c --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go @@ -0,0 +1,398 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogovanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type B struct { + String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` + Int64 int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_gogovanity_3d56375bbc5ff070, []int{0} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(m.Int64)) + if m.Int32 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int32)) + } + return i, nil +} + +func encodeVarintGogovanity(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 *B) Size() (n int) { + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + n += 1 + sovGogovanity(uint64(m.Int64)) + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("gogovanity.proto", fileDescriptor_gogovanity_3d56375bbc5ff070) } + +var fileDescriptor_gogovanity_3d56375bbc5ff070 = []byte{ + // 163 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0x04, 0x15, 0x13, 0x92, 0xe2, 0x62, 0xf5, 0xcc, + 0x2b, 0x31, 0x33, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x06, 0x4b, 0x32, 0x04, 0x41, 0x84, 0xa0, + 0x72, 0xc6, 0x46, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xac, 0x56, 0x2c, 0x86, 0x46, 0xc6, 0x26, 0x41, + 0x10, 0x21, 0x27, 0x81, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, + 0x71, 0xc2, 0x63, 0x39, 0x06, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xde, 0x29, 0x72, 0xb6, + 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go b/deps/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go new file mode 100644 index 000000000..2e61cb552 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (m *Aproto3) String() string { return proto.CompactTextString(m) } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_efd1bbd2b7dd033b, []int{0} +} +func (m *Aproto3) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aproto3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aproto3.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Aproto3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aproto3.Merge(dst, src) +} +func (m *Aproto3) XXX_Size() int { + return m.Size() +} +func (m *Aproto3) XXX_DiscardUnknown() { + xxx_messageInfo_Aproto3.DiscardUnknown(m) +} + +var xxx_messageInfo_Aproto3 proto.InternalMessageInfo + +func (m *Aproto3) GetB() string { + if m != nil { + return m.B + } + return "" +} + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (m *Aproto3) 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 *Aproto3) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintProto3(dAtA, i, uint64(len(m.B))) + i += copy(dAtA[i:], m.B) + } + return i, nil +} + +func encodeVarintProto3(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 *Aproto3) Size() (n int) { + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_efd1bbd2b7dd033b) } + +var fileDescriptor_proto3_efd1bbd2b7dd033b = []byte{ + // 87 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0x46, 0x27, 0x27, 0x81, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, + 0x71, 0xc2, 0x63, 0x39, 0x86, 0x24, 0x36, 0x88, 0x3a, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x77, + 0x21, 0xa3, 0xc0, 0x49, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go b/deps/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go new file mode 100644 index 000000000..8b96679de --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go @@ -0,0 +1,356 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: vanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A struct { + Strings string `protobuf:"bytes,1,opt,name=Strings" json:"Strings"` + Int int64 `protobuf:"varint,2,req,name=Int" json:"Int"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_vanity_ee422b61c12e2be7, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetStrings() string { + if m != nil { + return m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil { + return m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintVanity(dAtA, i, uint64(len(m.Strings))) + i += copy(dAtA[i:], m.Strings) + dAtA[i] = 0x10 + i++ + i = encodeVarintVanity(dAtA, i, uint64(m.Int)) + return i, nil +} + +func encodeVarintVanity(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 *A) Size() (n int) { + var l int + _ = l + l = len(m.Strings) + n += 1 + l + sovVanity(uint64(l)) + n += 1 + sovVanity(uint64(m.Int)) + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) 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 ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + m.Int = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("vanity.proto", fileDescriptor_vanity_ee422b61c12e2be7) } + +var fileDescriptor_vanity_ee422b61c12e2be7 = []byte{ + // 109 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, + 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0x09, 0x0a, 0x89, 0x71, 0x31, 0x7b, + 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x40, 0x02, 0x4e, 0x02, 0x27, 0x1e, + 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x80, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0x0d, 0x52, 0xbb, 0x65, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/gofast/.gitignore b/deps/github.com/gogo/protobuf/vanity/test/gofast/.gitignore new file mode 100644 index 000000000..9b0b440dc --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/gofast/.gitignore @@ -0,0 +1 @@ +*.pb.go \ No newline at end of file diff --git a/deps/github.com/gogo/protobuf/vanity/test/gogovanity.proto b/deps/github.com/gogo/protobuf/vanity/test/gogovanity.proto new file mode 100644 index 000000000..b0f9279a1 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/gogovanity.proto @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package vanity; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message B { + optional string String = 1 [(gogoproto.nullable) = true]; + optional int64 Int64 = 2; + optional int32 Int32 = 3 [default = 1234]; +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/proto3.proto b/deps/github.com/gogo/protobuf/vanity/test/proto3.proto new file mode 100644 index 000000000..aa2f4ac51 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/proto3.proto @@ -0,0 +1,35 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package vanity; + +message Aproto3 { + string B = 1; +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go b/deps/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go new file mode 100644 index 000000000..dd3941395 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go @@ -0,0 +1,487 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogovanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type B struct { + String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` + Int64 int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_gogovanity_fc574e04ada47644, []int{0} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if this.Int64 != that1.Int64 { + return false + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return false + } + } else if this.Int32 != nil { + return false + } else if that1.Int32 != nil { + return false + } + return true +} +func (this *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&vanity.B{") + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringGogovanity(this.String_, "string")+",\n") + } + s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") + if this.Int32 != nil { + s = append(s, "Int32: "+valueToGoStringGogovanity(this.Int32, "int32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringGogovanity(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(m.Int64)) + if m.Int32 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int32)) + } + return i, nil +} + +func encodeVarintGogovanity(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 *B) Size() (n int) { + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + n += 1 + sovGogovanity(uint64(m.Int64)) + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `String_:` + valueToStringGogovanity(this.String_) + `,`, + `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, + `Int32:` + valueToStringGogovanity(this.Int32) + `,`, + `}`, + }, "") + return s +} +func valueToStringGogovanity(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("gogovanity.proto", fileDescriptor_gogovanity_fc574e04ada47644) } + +var fileDescriptor_gogovanity_fc574e04ada47644 = []byte{ + // 192 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0x04, 0x15, 0x13, 0x92, 0xe2, 0x62, 0xf5, 0xcc, + 0x2b, 0x31, 0x33, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x06, 0x4b, 0x32, 0x04, 0x41, 0x84, 0xa0, + 0x72, 0xc6, 0x46, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xac, 0x56, 0x2c, 0x86, 0x46, 0xc6, 0x26, 0x41, + 0x10, 0x21, 0x27, 0x9d, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e, + 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, + 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, + 0x2c, 0xc7, 0x00, 0x08, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x7e, 0xee, 0xf2, 0xd2, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go b/deps/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go new file mode 100644 index 000000000..49a471ecf --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go @@ -0,0 +1,386 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_5ebceb1b2969522e, []int{0} +} +func (m *Aproto3) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aproto3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aproto3.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Aproto3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aproto3.Merge(dst, src) +} +func (m *Aproto3) XXX_Size() int { + return m.Size() +} +func (m *Aproto3) XXX_DiscardUnknown() { + xxx_messageInfo_Aproto3.DiscardUnknown(m) +} + +var xxx_messageInfo_Aproto3 proto.InternalMessageInfo + +func (m *Aproto3) GetB() string { + if m != nil { + return m.B + } + return "" +} + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (this *Aproto3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Aproto3) + if !ok { + that2, ok := that.(Aproto3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.B != that1.B { + return false + } + return true +} +func (this *Aproto3) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&vanity.Aproto3{") + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringProto3(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Aproto3) 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 *Aproto3) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintProto3(dAtA, i, uint64(len(m.B))) + i += copy(dAtA[i:], m.B) + } + return i, nil +} + +func encodeVarintProto3(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 *Aproto3) Size() (n int) { + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Aproto3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Aproto3{`, + `B:` + fmt.Sprintf("%v", this.B) + `,`, + `}`, + }, "") + return s +} +func valueToStringProto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_5ebceb1b2969522e) } + +var fileDescriptor_proto3_5ebceb1b2969522e = []byte{ + // 116 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0x46, 0x27, 0x27, 0x9d, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e, + 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, + 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, + 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0x31, 0x03, 0x10, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xa0, 0x15, 0x6b, + 0x65, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go b/deps/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go new file mode 100644 index 000000000..deea95ced --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go @@ -0,0 +1,425 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: vanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type A struct { + Strings string `protobuf:"bytes,1,opt,name=Strings" json:"Strings"` + Int int64 `protobuf:"varint,2,req,name=Int" json:"Int"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_vanity_a964ed6473033f4a, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetStrings() string { + if m != nil { + return m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil { + return m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Strings != that1.Strings { + return false + } + if this.Int != that1.Int { + return false + } + return true +} +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&vanity.A{") + s = append(s, "Strings: "+fmt.Sprintf("%#v", this.Strings)+",\n") + s = append(s, "Int: "+fmt.Sprintf("%#v", this.Int)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringVanity(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintVanity(dAtA, i, uint64(len(m.Strings))) + i += copy(dAtA[i:], m.Strings) + dAtA[i] = 0x10 + i++ + i = encodeVarintVanity(dAtA, i, uint64(m.Int)) + return i, nil +} + +func encodeVarintVanity(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 *A) Size() (n int) { + var l int + _ = l + l = len(m.Strings) + n += 1 + l + sovVanity(uint64(l)) + n += 1 + sovVanity(uint64(m.Int)) + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, + `Int:` + fmt.Sprintf("%v", this.Int) + `,`, + `}`, + }, "") + return s +} +func valueToStringVanity(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *A) 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 ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + m.Int = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("vanity.proto", fileDescriptor_vanity_a964ed6473033f4a) } + +var fileDescriptor_vanity_a964ed6473033f4a = []byte{ + // 138 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, + 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0x09, 0x0a, 0x89, 0x71, 0x31, 0x7b, + 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x40, 0x02, 0x4e, 0x3a, 0x17, 0x1e, + 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, + 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, + 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0x01, 0x10, 0x00, 0x00, + 0xff, 0xff, 0x4d, 0xd9, 0xba, 0x18, 0x81, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/vanity.proto b/deps/github.com/gogo/protobuf/vanity/test/vanity.proto new file mode 100644 index 000000000..c21750bc0 --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/vanity.proto @@ -0,0 +1,36 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; + +package vanity; + +message A { + optional string Strings = 1; + required int64 Int = 2; +} diff --git a/deps/github.com/gogo/protobuf/vanity/test/vanity_test.go b/deps/github.com/gogo/protobuf/vanity/test/vanity_test.go new file mode 100644 index 000000000..a0e5b824a --- /dev/null +++ b/deps/github.com/gogo/protobuf/vanity/test/vanity_test.go @@ -0,0 +1,93 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package test + +import ( + fast "github.com/gogo/protobuf/vanity/test/fast" + faster "github.com/gogo/protobuf/vanity/test/faster" + slick "github.com/gogo/protobuf/vanity/test/slick" + "testing" +) + +func TestFast(t *testing.T) { + _ = (&fast.A{}).Marshal + _ = (&fast.A{}).MarshalTo + _ = (&fast.A{}).Unmarshal + _ = (&fast.A{}).Size + + _ = (&fast.B{}).Marshal + _ = (&fast.B{}).MarshalTo + _ = (&fast.B{}).Unmarshal + _ = (&fast.B{}).Size +} + +func TestFaster(t *testing.T) { + _ = (&faster.A{}).Marshal + _ = (&faster.A{}).MarshalTo + _ = (&faster.A{}).Unmarshal + _ = (&faster.A{}).Size + + _ = (&faster.A{}).Strings == "" + + _ = (&faster.B{}).Marshal + _ = (&faster.B{}).MarshalTo + _ = (&faster.B{}).Unmarshal + _ = (&faster.B{}).Size + + _ = (&faster.B{}).String_ == nil + _ = (&faster.B{}).Int64 == 0 + _ = (&faster.B{}).Int32 == nil + if (&faster.B{}).GetInt32() != 1234 { + t.Fatalf("expected default") + } +} + +func TestSlick(t *testing.T) { + _ = (&slick.A{}).Marshal + _ = (&slick.A{}).MarshalTo + _ = (&slick.A{}).Unmarshal + _ = (&slick.A{}).Size + + _ = (&slick.A{}).Strings == "" + + _ = (&slick.A{}).GoString + _ = (&slick.A{}).String + + _ = (&slick.B{}).Marshal + _ = (&slick.B{}).MarshalTo + _ = (&slick.B{}).Unmarshal + _ = (&slick.B{}).Size + + _ = (&slick.B{}).String_ == nil + _ = (&slick.B{}).Int64 == 0 + _ = (&slick.B{}).Int32 == nil + if (&slick.B{}).GetInt32() != 1234 { + t.Fatalf("expected default") + } +} diff --git a/deps/github.com/gogo/protobuf/version/version.go b/deps/github.com/gogo/protobuf/version/version.go new file mode 100644 index 000000000..b2951ec1e --- /dev/null +++ b/deps/github.com/gogo/protobuf/version/version.go @@ -0,0 +1,78 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package version + +import ( + "fmt" + "os/exec" + "strconv" + "strings" +) + +func Get() string { + versionBytes, _ := exec.Command("protoc", "--version").CombinedOutput() + version := strings.TrimSpace(string(versionBytes)) + versions := strings.Split(version, " ") + if len(versions) != 2 { + panic("version string returned from protoc is separated with a space: " + version) + } + return versions[1] +} + +func parseVersion(version string) (int, error) { + versions := strings.Split(version, ".") + if len(versions) != 3 { + return 0, fmt.Errorf("version does not have 3 numbers separated by dots: %s", version) + } + n := 0 + for _, v := range versions { + i, err := strconv.Atoi(v) + if err != nil { + return 0, err + } + n = n*10 + i + } + return n, nil +} + +func less(this, that string) bool { + thisNum, err := parseVersion(this) + if err != nil { + panic(err) + } + thatNum, err := parseVersion(that) + if err != nil { + panic(err) + } + return thisNum <= thatNum +} + +func AtLeast(v string) bool { + return less(v, Get()) +} diff --git a/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/bug_report.md b/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..cb9fc37c8 --- /dev/null +++ b/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,20 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +**What version of protobuf and what language are you using?** +Version: (e.g., `v1.1.0`, `89a0c16f`, etc) + +**What did you do?** +If possible, provide a recipe for reproducing the error. +A complete runnable program is good with `.proto` and `.go` source code. + +**What did you expect to see?** + +**What did you see instead?** + +Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs). + +**Anything else we should know about your project / environment?** diff --git a/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/feature_request.md b/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..b904f1f84 --- /dev/null +++ b/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/question.md b/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 000000000..bfa6ddea8 --- /dev/null +++ b/deps/github.com/golang/protobuf/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,7 @@ +--- +name: Question +about: Questions and troubleshooting + +--- + + diff --git a/deps/github.com/golang/protobuf/Make.protobuf b/deps/github.com/golang/protobuf/Make.protobuf deleted file mode 100644 index 15071de10..000000000 --- a/deps/github.com/golang/protobuf/Make.protobuf +++ /dev/null @@ -1,40 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Includable Makefile to add a rule for generating .pb.go files from .proto files -# (Google protocol buffer descriptions). -# Typical use if myproto.proto is a file in package mypackage in this directory: -# -# include $(GOROOT)/src/pkg/github.com/golang/protobuf/Make.protobuf - -%.pb.go: %.proto - protoc --go_out=. $< - diff --git a/deps/github.com/golang/protobuf/Makefile b/deps/github.com/golang/protobuf/Makefile index 4c7901f90..7a51c95bb 100644 --- a/deps/github.com/golang/protobuf/Makefile +++ b/deps/github.com/golang/protobuf/Makefile @@ -36,6 +36,7 @@ install: test: go test ./... ./protoc-gen-go/testdata + go test -tags purego ./... ./protoc-gen-go/testdata go build ./protoc-gen-go/testdata/grpc/grpc.pb.go make -C conformance test diff --git a/deps/github.com/golang/protobuf/README.md b/deps/github.com/golang/protobuf/README.md index e0e6a3b64..61820bed6 100644 --- a/deps/github.com/golang/protobuf/README.md +++ b/deps/github.com/golang/protobuf/README.md @@ -83,15 +83,19 @@ be: - Relative to the import path: - protoc --go_out=. inputs/x.proto - # writes ./github.com/golang/protobuf/p/x.pb.go +```shell + protoc --go_out=. inputs/x.proto + # writes ./github.com/golang/protobuf/p/x.pb.go +``` (This can work well with `--go_out=$GOPATH`.) - Relative to the input file: - protoc --go_out=paths=source_relative:. inputs/x.proto - # generate ./inputs/x.pb.go +```shell +protoc --go_out=paths=source_relative:. inputs/x.proto +# generate ./inputs/x.pb.go +``` ## Generated code ## @@ -157,9 +161,6 @@ Consider file test.proto, containing required string label = 1; optional int32 type = 2 [default=77]; repeated int64 reps = 3; - optional group OptionalGroup = 4 { - required string RequiredField = 5; - } } ``` @@ -176,13 +177,10 @@ To create and play with a Test object from the example package, ) func main() { - test := &example.Test { + test := &example.Test{ Label: proto.String("hello"), Type: proto.Int32(17), Reps: []int64{1, 2, 3}, - Optionalgroup: &example.Test_OptionalGroup { - RequiredField: proto.String("good bye"), - }, } data, err := proto.Marshal(test) if err != nil { diff --git a/deps/github.com/golang/protobuf/_conformance/Makefile b/deps/github.com/golang/protobuf/_conformance/Makefile deleted file mode 100644 index 89800e2d9..000000000 --- a/deps/github.com/golang/protobuf/_conformance/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2016 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers,Mgoogle/protobuf/field_mask.proto=google.golang.org/genproto/protobuf:. conformance_proto/conformance.proto diff --git a/deps/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go b/deps/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go deleted file mode 100644 index ec354eada..000000000 --- a/deps/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go +++ /dev/null @@ -1,1885 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: conformance_proto/conformance.proto - -/* -Package conformance is a generated protocol buffer package. - -It is generated from these files: - conformance_proto/conformance.proto - -It has these top-level messages: - ConformanceRequest - ConformanceResponse - TestAllTypes - ForeignMessage -*/ -package conformance - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/any" -import google_protobuf1 "github.com/golang/protobuf/ptypes/duration" -import google_protobuf2 "google.golang.org/genproto/protobuf" -import google_protobuf3 "github.com/golang/protobuf/ptypes/struct" -import google_protobuf4 "github.com/golang/protobuf/ptypes/timestamp" -import google_protobuf5 "github.com/golang/protobuf/ptypes/wrappers" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type WireFormat int32 - -const ( - WireFormat_UNSPECIFIED WireFormat = 0 - WireFormat_PROTOBUF WireFormat = 1 - WireFormat_JSON WireFormat = 2 -) - -var WireFormat_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "PROTOBUF", - 2: "JSON", -} -var WireFormat_value = map[string]int32{ - "UNSPECIFIED": 0, - "PROTOBUF": 1, - "JSON": 2, -} - -func (x WireFormat) String() string { - return proto.EnumName(WireFormat_name, int32(x)) -} -func (WireFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -type ForeignEnum int32 - -const ( - ForeignEnum_FOREIGN_FOO ForeignEnum = 0 - ForeignEnum_FOREIGN_BAR ForeignEnum = 1 - ForeignEnum_FOREIGN_BAZ ForeignEnum = 2 -) - -var ForeignEnum_name = map[int32]string{ - 0: "FOREIGN_FOO", - 1: "FOREIGN_BAR", - 2: "FOREIGN_BAZ", -} -var ForeignEnum_value = map[string]int32{ - "FOREIGN_FOO": 0, - "FOREIGN_BAR": 1, - "FOREIGN_BAZ": 2, -} - -func (x ForeignEnum) String() string { - return proto.EnumName(ForeignEnum_name, int32(x)) -} -func (ForeignEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -type TestAllTypes_NestedEnum int32 - -const ( - TestAllTypes_FOO TestAllTypes_NestedEnum = 0 - TestAllTypes_BAR TestAllTypes_NestedEnum = 1 - TestAllTypes_BAZ TestAllTypes_NestedEnum = 2 - TestAllTypes_NEG TestAllTypes_NestedEnum = -1 -) - -var TestAllTypes_NestedEnum_name = map[int32]string{ - 0: "FOO", - 1: "BAR", - 2: "BAZ", - -1: "NEG", -} -var TestAllTypes_NestedEnum_value = map[string]int32{ - "FOO": 0, - "BAR": 1, - "BAZ": 2, - "NEG": -1, -} - -func (x TestAllTypes_NestedEnum) String() string { - return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x)) -} -func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -// Represents a single test case's input. The testee should: -// -// 1. parse this proto (which should always succeed) -// 2. parse the protobuf or JSON payload in "payload" (which may fail) -// 3. if the parse succeeded, serialize the message in the requested format. -type ConformanceRequest struct { - // The payload (whether protobuf of JSON) is always for a TestAllTypes proto - // (see below). - // - // Types that are valid to be assigned to Payload: - // *ConformanceRequest_ProtobufPayload - // *ConformanceRequest_JsonPayload - Payload isConformanceRequest_Payload `protobuf_oneof:"payload"` - // Which format should the testee serialize its message to? - RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,enum=conformance.WireFormat" json:"requested_output_format,omitempty"` -} - -func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} } -func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) } -func (*ConformanceRequest) ProtoMessage() {} -func (*ConformanceRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -type isConformanceRequest_Payload interface { - isConformanceRequest_Payload() -} - -type ConformanceRequest_ProtobufPayload struct { - ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` -} -type ConformanceRequest_JsonPayload struct { - JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,oneof"` -} - -func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {} -func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} - -func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *ConformanceRequest) GetProtobufPayload() []byte { - if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok { - return x.ProtobufPayload - } - return nil -} - -func (m *ConformanceRequest) GetJsonPayload() string { - if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok { - return x.JsonPayload - } - return "" -} - -func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat { - if m != nil { - return m.RequestedOutputFormat - } - return WireFormat_UNSPECIFIED -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{ - (*ConformanceRequest_ProtobufPayload)(nil), - (*ConformanceRequest_JsonPayload)(nil), - } -} - -func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ConformanceRequest) - // payload - switch x := m.Payload.(type) { - case *ConformanceRequest_ProtobufPayload: - b.EncodeVarint(1<<3 | proto.WireBytes) - b.EncodeRawBytes(x.ProtobufPayload) - case *ConformanceRequest_JsonPayload: - b.EncodeVarint(2<<3 | proto.WireBytes) - b.EncodeStringBytes(x.JsonPayload) - case nil: - default: - return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x) - } - return nil -} - -func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ConformanceRequest) - switch tag { - case 1: // payload.protobuf_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Payload = &ConformanceRequest_ProtobufPayload{x} - return true, err - case 2: // payload.json_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Payload = &ConformanceRequest_JsonPayload{x} - return true, err - default: - return false, nil - } -} - -func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ConformanceRequest) - // payload - switch x := m.Payload.(type) { - case *ConformanceRequest_ProtobufPayload: - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) - n += len(x.ProtobufPayload) - case *ConformanceRequest_JsonPayload: - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.JsonPayload))) - n += len(x.JsonPayload) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Represents a single test case's output. -type ConformanceResponse struct { - // Types that are valid to be assigned to Result: - // *ConformanceResponse_ParseError - // *ConformanceResponse_SerializeError - // *ConformanceResponse_RuntimeError - // *ConformanceResponse_ProtobufPayload - // *ConformanceResponse_JsonPayload - // *ConformanceResponse_Skipped - Result isConformanceResponse_Result `protobuf_oneof:"result"` -} - -func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} } -func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) } -func (*ConformanceResponse) ProtoMessage() {} -func (*ConformanceResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -type isConformanceResponse_Result interface { - isConformanceResponse_Result() -} - -type ConformanceResponse_ParseError struct { - ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,oneof"` -} -type ConformanceResponse_SerializeError struct { - SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,oneof"` -} -type ConformanceResponse_RuntimeError struct { - RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,oneof"` -} -type ConformanceResponse_ProtobufPayload struct { - ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` -} -type ConformanceResponse_JsonPayload struct { - JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,oneof"` -} -type ConformanceResponse_Skipped struct { - Skipped string `protobuf:"bytes,5,opt,name=skipped,oneof"` -} - -func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} -func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} -func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} -func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} -func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} -func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} - -func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { - if m != nil { - return m.Result - } - return nil -} - -func (m *ConformanceResponse) GetParseError() string { - if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok { - return x.ParseError - } - return "" -} - -func (m *ConformanceResponse) GetSerializeError() string { - if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok { - return x.SerializeError - } - return "" -} - -func (m *ConformanceResponse) GetRuntimeError() string { - if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok { - return x.RuntimeError - } - return "" -} - -func (m *ConformanceResponse) GetProtobufPayload() []byte { - if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok { - return x.ProtobufPayload - } - return nil -} - -func (m *ConformanceResponse) GetJsonPayload() string { - if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok { - return x.JsonPayload - } - return "" -} - -func (m *ConformanceResponse) GetSkipped() string { - if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok { - return x.Skipped - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ConformanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{ - (*ConformanceResponse_ParseError)(nil), - (*ConformanceResponse_SerializeError)(nil), - (*ConformanceResponse_RuntimeError)(nil), - (*ConformanceResponse_ProtobufPayload)(nil), - (*ConformanceResponse_JsonPayload)(nil), - (*ConformanceResponse_Skipped)(nil), - } -} - -func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ConformanceResponse) - // result - switch x := m.Result.(type) { - case *ConformanceResponse_ParseError: - b.EncodeVarint(1<<3 | proto.WireBytes) - b.EncodeStringBytes(x.ParseError) - case *ConformanceResponse_SerializeError: - b.EncodeVarint(6<<3 | proto.WireBytes) - b.EncodeStringBytes(x.SerializeError) - case *ConformanceResponse_RuntimeError: - b.EncodeVarint(2<<3 | proto.WireBytes) - b.EncodeStringBytes(x.RuntimeError) - case *ConformanceResponse_ProtobufPayload: - b.EncodeVarint(3<<3 | proto.WireBytes) - b.EncodeRawBytes(x.ProtobufPayload) - case *ConformanceResponse_JsonPayload: - b.EncodeVarint(4<<3 | proto.WireBytes) - b.EncodeStringBytes(x.JsonPayload) - case *ConformanceResponse_Skipped: - b.EncodeVarint(5<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Skipped) - case nil: - default: - return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x) - } - return nil -} - -func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ConformanceResponse) - switch tag { - case 1: // result.parse_error - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_ParseError{x} - return true, err - case 6: // result.serialize_error - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_SerializeError{x} - return true, err - case 2: // result.runtime_error - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_RuntimeError{x} - return true, err - case 3: // result.protobuf_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Result = &ConformanceResponse_ProtobufPayload{x} - return true, err - case 4: // result.json_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_JsonPayload{x} - return true, err - case 5: // result.skipped - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_Skipped{x} - return true, err - default: - return false, nil - } -} - -func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ConformanceResponse) - // result - switch x := m.Result.(type) { - case *ConformanceResponse_ParseError: - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.ParseError))) - n += len(x.ParseError) - case *ConformanceResponse_SerializeError: - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.SerializeError))) - n += len(x.SerializeError) - case *ConformanceResponse_RuntimeError: - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.RuntimeError))) - n += len(x.RuntimeError) - case *ConformanceResponse_ProtobufPayload: - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) - n += len(x.ProtobufPayload) - case *ConformanceResponse_JsonPayload: - n += proto.SizeVarint(4<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.JsonPayload))) - n += len(x.JsonPayload) - case *ConformanceResponse_Skipped: - n += proto.SizeVarint(5<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Skipped))) - n += len(x.Skipped) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// This proto includes every type of field in both singular and repeated -// forms. -type TestAllTypes struct { - // Singular - OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32" json:"optional_int32,omitempty"` - OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64" json:"optional_int64,omitempty"` - OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32" json:"optional_uint32,omitempty"` - OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64" json:"optional_uint64,omitempty"` - OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32" json:"optional_sint32,omitempty"` - OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64" json:"optional_sint64,omitempty"` - OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32" json:"optional_fixed32,omitempty"` - OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64" json:"optional_fixed64,omitempty"` - OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32" json:"optional_sfixed32,omitempty"` - OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64" json:"optional_sfixed64,omitempty"` - OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat" json:"optional_float,omitempty"` - OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble" json:"optional_double,omitempty"` - OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool" json:"optional_bool,omitempty"` - OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString" json:"optional_string,omitempty"` - OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"` - OptionalNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage" json:"optional_nested_message,omitempty"` - OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage" json:"optional_foreign_message,omitempty"` - OptionalNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"` - OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"` - OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece" json:"optional_string_piece,omitempty"` - OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord" json:"optional_cord,omitempty"` - RecursiveMessage *TestAllTypes `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage" json:"recursive_message,omitempty"` - // Repeated - RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32" json:"repeated_int32,omitempty"` - RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64" json:"repeated_int64,omitempty"` - RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32" json:"repeated_uint32,omitempty"` - RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64" json:"repeated_uint64,omitempty"` - RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32" json:"repeated_sint32,omitempty"` - RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64" json:"repeated_sint64,omitempty"` - RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32" json:"repeated_fixed32,omitempty"` - RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64" json:"repeated_fixed64,omitempty"` - RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32" json:"repeated_sfixed32,omitempty"` - RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64" json:"repeated_sfixed64,omitempty"` - RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat" json:"repeated_float,omitempty"` - RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble" json:"repeated_double,omitempty"` - RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool" json:"repeated_bool,omitempty"` - RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString" json:"repeated_string,omitempty"` - RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"` - RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage" json:"repeated_nested_message,omitempty"` - RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage" json:"repeated_foreign_message,omitempty"` - RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,enum=conformance.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"` - RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,enum=conformance.ForeignEnum" json:"repeated_foreign_enum,omitempty"` - RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece" json:"repeated_string_piece,omitempty"` - RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord" json:"repeated_cord,omitempty"` - // Map - MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` - MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` - MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` - MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` - MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` - MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=conformance.TestAllTypes_NestedEnum"` - MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=conformance.ForeignEnum"` - // Types that are valid to be assigned to OneofField: - // *TestAllTypes_OneofUint32 - // *TestAllTypes_OneofNestedMessage - // *TestAllTypes_OneofString - // *TestAllTypes_OneofBytes - // *TestAllTypes_OneofBool - // *TestAllTypes_OneofUint64 - // *TestAllTypes_OneofFloat - // *TestAllTypes_OneofDouble - // *TestAllTypes_OneofEnum - OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"` - // Well-known types - OptionalBoolWrapper *google_protobuf5.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper" json:"optional_bool_wrapper,omitempty"` - OptionalInt32Wrapper *google_protobuf5.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper" json:"optional_int32_wrapper,omitempty"` - OptionalInt64Wrapper *google_protobuf5.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper" json:"optional_int64_wrapper,omitempty"` - OptionalUint32Wrapper *google_protobuf5.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper" json:"optional_uint32_wrapper,omitempty"` - OptionalUint64Wrapper *google_protobuf5.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper" json:"optional_uint64_wrapper,omitempty"` - OptionalFloatWrapper *google_protobuf5.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper" json:"optional_float_wrapper,omitempty"` - OptionalDoubleWrapper *google_protobuf5.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper" json:"optional_double_wrapper,omitempty"` - OptionalStringWrapper *google_protobuf5.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper" json:"optional_string_wrapper,omitempty"` - OptionalBytesWrapper *google_protobuf5.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper" json:"optional_bytes_wrapper,omitempty"` - RepeatedBoolWrapper []*google_protobuf5.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper" json:"repeated_bool_wrapper,omitempty"` - RepeatedInt32Wrapper []*google_protobuf5.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper" json:"repeated_int32_wrapper,omitempty"` - RepeatedInt64Wrapper []*google_protobuf5.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper" json:"repeated_int64_wrapper,omitempty"` - RepeatedUint32Wrapper []*google_protobuf5.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper" json:"repeated_uint32_wrapper,omitempty"` - RepeatedUint64Wrapper []*google_protobuf5.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper" json:"repeated_uint64_wrapper,omitempty"` - RepeatedFloatWrapper []*google_protobuf5.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper" json:"repeated_float_wrapper,omitempty"` - RepeatedDoubleWrapper []*google_protobuf5.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper" json:"repeated_double_wrapper,omitempty"` - RepeatedStringWrapper []*google_protobuf5.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper" json:"repeated_string_wrapper,omitempty"` - RepeatedBytesWrapper []*google_protobuf5.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper" json:"repeated_bytes_wrapper,omitempty"` - OptionalDuration *google_protobuf1.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration" json:"optional_duration,omitempty"` - OptionalTimestamp *google_protobuf4.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp" json:"optional_timestamp,omitempty"` - OptionalFieldMask *google_protobuf2.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask" json:"optional_field_mask,omitempty"` - OptionalStruct *google_protobuf3.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct" json:"optional_struct,omitempty"` - OptionalAny *google_protobuf.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny" json:"optional_any,omitempty"` - OptionalValue *google_protobuf3.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue" json:"optional_value,omitempty"` - RepeatedDuration []*google_protobuf1.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration" json:"repeated_duration,omitempty"` - RepeatedTimestamp []*google_protobuf4.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp" json:"repeated_timestamp,omitempty"` - RepeatedFieldmask []*google_protobuf2.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask" json:"repeated_fieldmask,omitempty"` - RepeatedStruct []*google_protobuf3.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct" json:"repeated_struct,omitempty"` - RepeatedAny []*google_protobuf.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny" json:"repeated_any,omitempty"` - RepeatedValue []*google_protobuf3.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue" json:"repeated_value,omitempty"` - // Test field-name-to-JSON-name convention. - // (protobuf says names can be any valid C/C++ identifier.) - Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1" json:"fieldname1,omitempty"` - FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"` - XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3" json:"_field_name3,omitempty"` - Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"` - Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"` - Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"` - FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"` - FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8" json:"FieldName8,omitempty"` - Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"` - Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10" json:"Field_Name10,omitempty"` - FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11" json:"FIELD_NAME11,omitempty"` - FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12" json:"FIELD_name12,omitempty"` - XFieldName13 int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13" json:"__field_name13,omitempty"` - X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14" json:"__Field_name14,omitempty"` - Field_Name15 int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"` - Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"` - FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"` - FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18" json:"Field_name18__,omitempty"` -} - -func (m *TestAllTypes) Reset() { *m = TestAllTypes{} } -func (m *TestAllTypes) String() string { return proto.CompactTextString(m) } -func (*TestAllTypes) ProtoMessage() {} -func (*TestAllTypes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -type isTestAllTypes_OneofField interface { - isTestAllTypes_OneofField() -} - -type TestAllTypes_OneofUint32 struct { - OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,oneof"` -} -type TestAllTypes_OneofNestedMessage struct { - OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,oneof"` -} -type TestAllTypes_OneofString struct { - OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,oneof"` -} -type TestAllTypes_OneofBytes struct { - OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` -} -type TestAllTypes_OneofBool struct { - OneofBool bool `protobuf:"varint,115,opt,name=oneof_bool,json=oneofBool,oneof"` -} -type TestAllTypes_OneofUint64 struct { - OneofUint64 uint64 `protobuf:"varint,116,opt,name=oneof_uint64,json=oneofUint64,oneof"` -} -type TestAllTypes_OneofFloat struct { - OneofFloat float32 `protobuf:"fixed32,117,opt,name=oneof_float,json=oneofFloat,oneof"` -} -type TestAllTypes_OneofDouble struct { - OneofDouble float64 `protobuf:"fixed64,118,opt,name=oneof_double,json=oneofDouble,oneof"` -} -type TestAllTypes_OneofEnum struct { - OneofEnum TestAllTypes_NestedEnum `protobuf:"varint,119,opt,name=oneof_enum,json=oneofEnum,enum=conformance.TestAllTypes_NestedEnum,oneof"` -} - -func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofBool) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofUint64) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofFloat) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofDouble) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofEnum) isTestAllTypes_OneofField() {} - -func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { - if m != nil { - return m.OneofField - } - return nil -} - -func (m *TestAllTypes) GetOptionalInt32() int32 { - if m != nil { - return m.OptionalInt32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalInt64() int64 { - if m != nil { - return m.OptionalInt64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalUint32() uint32 { - if m != nil { - return m.OptionalUint32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalUint64() uint64 { - if m != nil { - return m.OptionalUint64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSint32() int32 { - if m != nil { - return m.OptionalSint32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSint64() int64 { - if m != nil { - return m.OptionalSint64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalFixed32() uint32 { - if m != nil { - return m.OptionalFixed32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalFixed64() uint64 { - if m != nil { - return m.OptionalFixed64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSfixed32() int32 { - if m != nil { - return m.OptionalSfixed32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSfixed64() int64 { - if m != nil { - return m.OptionalSfixed64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalFloat() float32 { - if m != nil { - return m.OptionalFloat - } - return 0 -} - -func (m *TestAllTypes) GetOptionalDouble() float64 { - if m != nil { - return m.OptionalDouble - } - return 0 -} - -func (m *TestAllTypes) GetOptionalBool() bool { - if m != nil { - return m.OptionalBool - } - return false -} - -func (m *TestAllTypes) GetOptionalString() string { - if m != nil { - return m.OptionalString - } - return "" -} - -func (m *TestAllTypes) GetOptionalBytes() []byte { - if m != nil { - return m.OptionalBytes - } - return nil -} - -func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage { - if m != nil { - return m.OptionalNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage { - if m != nil { - return m.OptionalForeignMessage - } - return nil -} - -func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum { - if m != nil { - return m.OptionalNestedEnum - } - return TestAllTypes_FOO -} - -func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum { - if m != nil { - return m.OptionalForeignEnum - } - return ForeignEnum_FOREIGN_FOO -} - -func (m *TestAllTypes) GetOptionalStringPiece() string { - if m != nil { - return m.OptionalStringPiece - } - return "" -} - -func (m *TestAllTypes) GetOptionalCord() string { - if m != nil { - return m.OptionalCord - } - return "" -} - -func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes { - if m != nil { - return m.RecursiveMessage - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt32() []int32 { - if m != nil { - return m.RepeatedInt32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt64() []int64 { - if m != nil { - return m.RepeatedInt64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint32() []uint32 { - if m != nil { - return m.RepeatedUint32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint64() []uint64 { - if m != nil { - return m.RepeatedUint64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSint32() []int32 { - if m != nil { - return m.RepeatedSint32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSint64() []int64 { - if m != nil { - return m.RepeatedSint64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFixed32() []uint32 { - if m != nil { - return m.RepeatedFixed32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFixed64() []uint64 { - if m != nil { - return m.RepeatedFixed64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSfixed32() []int32 { - if m != nil { - return m.RepeatedSfixed32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSfixed64() []int64 { - if m != nil { - return m.RepeatedSfixed64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFloat() []float32 { - if m != nil { - return m.RepeatedFloat - } - return nil -} - -func (m *TestAllTypes) GetRepeatedDouble() []float64 { - if m != nil { - return m.RepeatedDouble - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBool() []bool { - if m != nil { - return m.RepeatedBool - } - return nil -} - -func (m *TestAllTypes) GetRepeatedString() []string { - if m != nil { - return m.RepeatedString - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBytes() [][]byte { - if m != nil { - return m.RepeatedBytes - } - return nil -} - -func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage { - if m != nil { - return m.RepeatedNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage { - if m != nil { - return m.RepeatedForeignMessage - } - return nil -} - -func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum { - if m != nil { - return m.RepeatedNestedEnum - } - return nil -} - -func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum { - if m != nil { - return m.RepeatedForeignEnum - } - return nil -} - -func (m *TestAllTypes) GetRepeatedStringPiece() []string { - if m != nil { - return m.RepeatedStringPiece - } - return nil -} - -func (m *TestAllTypes) GetRepeatedCord() []string { - if m != nil { - return m.RepeatedCord - } - return nil -} - -func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 { - if m != nil { - return m.MapInt32Int32 - } - return nil -} - -func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 { - if m != nil { - return m.MapInt64Int64 - } - return nil -} - -func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 { - if m != nil { - return m.MapUint32Uint32 - } - return nil -} - -func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 { - if m != nil { - return m.MapUint64Uint64 - } - return nil -} - -func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 { - if m != nil { - return m.MapSint32Sint32 - } - return nil -} - -func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 { - if m != nil { - return m.MapSint64Sint64 - } - return nil -} - -func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 { - if m != nil { - return m.MapFixed32Fixed32 - } - return nil -} - -func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 { - if m != nil { - return m.MapFixed64Fixed64 - } - return nil -} - -func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 { - if m != nil { - return m.MapSfixed32Sfixed32 - } - return nil -} - -func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 { - if m != nil { - return m.MapSfixed64Sfixed64 - } - return nil -} - -func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 { - if m != nil { - return m.MapInt32Float - } - return nil -} - -func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 { - if m != nil { - return m.MapInt32Double - } - return nil -} - -func (m *TestAllTypes) GetMapBoolBool() map[bool]bool { - if m != nil { - return m.MapBoolBool - } - return nil -} - -func (m *TestAllTypes) GetMapStringString() map[string]string { - if m != nil { - return m.MapStringString - } - return nil -} - -func (m *TestAllTypes) GetMapStringBytes() map[string][]byte { - if m != nil { - return m.MapStringBytes - } - return nil -} - -func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage { - if m != nil { - return m.MapStringNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetMapStringForeignMessage() map[string]*ForeignMessage { - if m != nil { - return m.MapStringForeignMessage - } - return nil -} - -func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum { - if m != nil { - return m.MapStringNestedEnum - } - return nil -} - -func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum { - if m != nil { - return m.MapStringForeignEnum - } - return nil -} - -func (m *TestAllTypes) GetOneofUint32() uint32 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok { - return x.OneofUint32 - } - return 0 -} - -func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok { - return x.OneofNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetOneofString() string { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok { - return x.OneofString - } - return "" -} - -func (m *TestAllTypes) GetOneofBytes() []byte { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok { - return x.OneofBytes - } - return nil -} - -func (m *TestAllTypes) GetOneofBool() bool { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofBool); ok { - return x.OneofBool - } - return false -} - -func (m *TestAllTypes) GetOneofUint64() uint64 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint64); ok { - return x.OneofUint64 - } - return 0 -} - -func (m *TestAllTypes) GetOneofFloat() float32 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofFloat); ok { - return x.OneofFloat - } - return 0 -} - -func (m *TestAllTypes) GetOneofDouble() float64 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofDouble); ok { - return x.OneofDouble - } - return 0 -} - -func (m *TestAllTypes) GetOneofEnum() TestAllTypes_NestedEnum { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofEnum); ok { - return x.OneofEnum - } - return TestAllTypes_FOO -} - -func (m *TestAllTypes) GetOptionalBoolWrapper() *google_protobuf5.BoolValue { - if m != nil { - return m.OptionalBoolWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalInt32Wrapper() *google_protobuf5.Int32Value { - if m != nil { - return m.OptionalInt32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalInt64Wrapper() *google_protobuf5.Int64Value { - if m != nil { - return m.OptionalInt64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalUint32Wrapper() *google_protobuf5.UInt32Value { - if m != nil { - return m.OptionalUint32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalUint64Wrapper() *google_protobuf5.UInt64Value { - if m != nil { - return m.OptionalUint64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalFloatWrapper() *google_protobuf5.FloatValue { - if m != nil { - return m.OptionalFloatWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalDoubleWrapper() *google_protobuf5.DoubleValue { - if m != nil { - return m.OptionalDoubleWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalStringWrapper() *google_protobuf5.StringValue { - if m != nil { - return m.OptionalStringWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalBytesWrapper() *google_protobuf5.BytesValue { - if m != nil { - return m.OptionalBytesWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBoolWrapper() []*google_protobuf5.BoolValue { - if m != nil { - return m.RepeatedBoolWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt32Wrapper() []*google_protobuf5.Int32Value { - if m != nil { - return m.RepeatedInt32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt64Wrapper() []*google_protobuf5.Int64Value { - if m != nil { - return m.RepeatedInt64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint32Wrapper() []*google_protobuf5.UInt32Value { - if m != nil { - return m.RepeatedUint32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint64Wrapper() []*google_protobuf5.UInt64Value { - if m != nil { - return m.RepeatedUint64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFloatWrapper() []*google_protobuf5.FloatValue { - if m != nil { - return m.RepeatedFloatWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedDoubleWrapper() []*google_protobuf5.DoubleValue { - if m != nil { - return m.RepeatedDoubleWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedStringWrapper() []*google_protobuf5.StringValue { - if m != nil { - return m.RepeatedStringWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBytesWrapper() []*google_protobuf5.BytesValue { - if m != nil { - return m.RepeatedBytesWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalDuration() *google_protobuf1.Duration { - if m != nil { - return m.OptionalDuration - } - return nil -} - -func (m *TestAllTypes) GetOptionalTimestamp() *google_protobuf4.Timestamp { - if m != nil { - return m.OptionalTimestamp - } - return nil -} - -func (m *TestAllTypes) GetOptionalFieldMask() *google_protobuf2.FieldMask { - if m != nil { - return m.OptionalFieldMask - } - return nil -} - -func (m *TestAllTypes) GetOptionalStruct() *google_protobuf3.Struct { - if m != nil { - return m.OptionalStruct - } - return nil -} - -func (m *TestAllTypes) GetOptionalAny() *google_protobuf.Any { - if m != nil { - return m.OptionalAny - } - return nil -} - -func (m *TestAllTypes) GetOptionalValue() *google_protobuf3.Value { - if m != nil { - return m.OptionalValue - } - return nil -} - -func (m *TestAllTypes) GetRepeatedDuration() []*google_protobuf1.Duration { - if m != nil { - return m.RepeatedDuration - } - return nil -} - -func (m *TestAllTypes) GetRepeatedTimestamp() []*google_protobuf4.Timestamp { - if m != nil { - return m.RepeatedTimestamp - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFieldmask() []*google_protobuf2.FieldMask { - if m != nil { - return m.RepeatedFieldmask - } - return nil -} - -func (m *TestAllTypes) GetRepeatedStruct() []*google_protobuf3.Struct { - if m != nil { - return m.RepeatedStruct - } - return nil -} - -func (m *TestAllTypes) GetRepeatedAny() []*google_protobuf.Any { - if m != nil { - return m.RepeatedAny - } - return nil -} - -func (m *TestAllTypes) GetRepeatedValue() []*google_protobuf3.Value { - if m != nil { - return m.RepeatedValue - } - return nil -} - -func (m *TestAllTypes) GetFieldname1() int32 { - if m != nil { - return m.Fieldname1 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName2() int32 { - if m != nil { - return m.FieldName2 - } - return 0 -} - -func (m *TestAllTypes) GetXFieldName3() int32 { - if m != nil { - return m.XFieldName3 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name4_() int32 { - if m != nil { - return m.Field_Name4_ - } - return 0 -} - -func (m *TestAllTypes) GetField0Name5() int32 { - if m != nil { - return m.Field0Name5 - } - return 0 -} - -func (m *TestAllTypes) GetField_0Name6() int32 { - if m != nil { - return m.Field_0Name6 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName7() int32 { - if m != nil { - return m.FieldName7 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName8() int32 { - if m != nil { - return m.FieldName8 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name9() int32 { - if m != nil { - return m.Field_Name9 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name10() int32 { - if m != nil { - return m.Field_Name10 - } - return 0 -} - -func (m *TestAllTypes) GetFIELD_NAME11() int32 { - if m != nil { - return m.FIELD_NAME11 - } - return 0 -} - -func (m *TestAllTypes) GetFIELDName12() int32 { - if m != nil { - return m.FIELDName12 - } - return 0 -} - -func (m *TestAllTypes) GetXFieldName13() int32 { - if m != nil { - return m.XFieldName13 - } - return 0 -} - -func (m *TestAllTypes) GetX_FieldName14() int32 { - if m != nil { - return m.X_FieldName14 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name15() int32 { - if m != nil { - return m.Field_Name15 - } - return 0 -} - -func (m *TestAllTypes) GetField__Name16() int32 { - if m != nil { - return m.Field__Name16 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName17__() int32 { - if m != nil { - return m.FieldName17__ - } - return 0 -} - -func (m *TestAllTypes) GetFieldName18__() int32 { - if m != nil { - return m.FieldName18__ - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{ - (*TestAllTypes_OneofUint32)(nil), - (*TestAllTypes_OneofNestedMessage)(nil), - (*TestAllTypes_OneofString)(nil), - (*TestAllTypes_OneofBytes)(nil), - (*TestAllTypes_OneofBool)(nil), - (*TestAllTypes_OneofUint64)(nil), - (*TestAllTypes_OneofFloat)(nil), - (*TestAllTypes_OneofDouble)(nil), - (*TestAllTypes_OneofEnum)(nil), - } -} - -func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TestAllTypes) - // oneof_field - switch x := m.OneofField.(type) { - case *TestAllTypes_OneofUint32: - b.EncodeVarint(111<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.OneofUint32)) - case *TestAllTypes_OneofNestedMessage: - b.EncodeVarint(112<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.OneofNestedMessage); err != nil { - return err - } - case *TestAllTypes_OneofString: - b.EncodeVarint(113<<3 | proto.WireBytes) - b.EncodeStringBytes(x.OneofString) - case *TestAllTypes_OneofBytes: - b.EncodeVarint(114<<3 | proto.WireBytes) - b.EncodeRawBytes(x.OneofBytes) - case *TestAllTypes_OneofBool: - t := uint64(0) - if x.OneofBool { - t = 1 - } - b.EncodeVarint(115<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *TestAllTypes_OneofUint64: - b.EncodeVarint(116<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.OneofUint64)) - case *TestAllTypes_OneofFloat: - b.EncodeVarint(117<<3 | proto.WireFixed32) - b.EncodeFixed32(uint64(math.Float32bits(x.OneofFloat))) - case *TestAllTypes_OneofDouble: - b.EncodeVarint(118<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.OneofDouble)) - case *TestAllTypes_OneofEnum: - b.EncodeVarint(119<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.OneofEnum)) - case nil: - default: - return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x) - } - return nil -} - -func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TestAllTypes) - switch tag { - case 111: // oneof_field.oneof_uint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofUint32{uint32(x)} - return true, err - case 112: // oneof_field.oneof_nested_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TestAllTypes_NestedMessage) - err := b.DecodeMessage(msg) - m.OneofField = &TestAllTypes_OneofNestedMessage{msg} - return true, err - case 113: // oneof_field.oneof_string - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.OneofField = &TestAllTypes_OneofString{x} - return true, err - case 114: // oneof_field.oneof_bytes - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.OneofField = &TestAllTypes_OneofBytes{x} - return true, err - case 115: // oneof_field.oneof_bool - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofBool{x != 0} - return true, err - case 116: // oneof_field.oneof_uint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofUint64{x} - return true, err - case 117: // oneof_field.oneof_float - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.OneofField = &TestAllTypes_OneofFloat{math.Float32frombits(uint32(x))} - return true, err - case 118: // oneof_field.oneof_double - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.OneofField = &TestAllTypes_OneofDouble{math.Float64frombits(x)} - return true, err - case 119: // oneof_field.oneof_enum - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofEnum{TestAllTypes_NestedEnum(x)} - return true, err - default: - return false, nil - } -} - -func _TestAllTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TestAllTypes) - // oneof_field - switch x := m.OneofField.(type) { - case *TestAllTypes_OneofUint32: - n += proto.SizeVarint(111<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.OneofUint32)) - case *TestAllTypes_OneofNestedMessage: - s := proto.Size(x.OneofNestedMessage) - n += proto.SizeVarint(112<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *TestAllTypes_OneofString: - n += proto.SizeVarint(113<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.OneofString))) - n += len(x.OneofString) - case *TestAllTypes_OneofBytes: - n += proto.SizeVarint(114<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.OneofBytes))) - n += len(x.OneofBytes) - case *TestAllTypes_OneofBool: - n += proto.SizeVarint(115<<3 | proto.WireVarint) - n += 1 - case *TestAllTypes_OneofUint64: - n += proto.SizeVarint(116<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.OneofUint64)) - case *TestAllTypes_OneofFloat: - n += proto.SizeVarint(117<<3 | proto.WireFixed32) - n += 4 - case *TestAllTypes_OneofDouble: - n += proto.SizeVarint(118<<3 | proto.WireFixed64) - n += 8 - case *TestAllTypes_OneofEnum: - n += proto.SizeVarint(119<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.OneofEnum)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type TestAllTypes_NestedMessage struct { - A int32 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"` - Corecursive *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"` -} - -func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} } -func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) } -func (*TestAllTypes_NestedMessage) ProtoMessage() {} -func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -func (m *TestAllTypes_NestedMessage) GetA() int32 { - if m != nil { - return m.A - } - return 0 -} - -func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes { - if m != nil { - return m.Corecursive - } - return nil -} - -type ForeignMessage struct { - C int32 `protobuf:"varint,1,opt,name=c" json:"c,omitempty"` -} - -func (m *ForeignMessage) Reset() { *m = ForeignMessage{} } -func (m *ForeignMessage) String() string { return proto.CompactTextString(m) } -func (*ForeignMessage) ProtoMessage() {} -func (*ForeignMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *ForeignMessage) GetC() int32 { - if m != nil { - return m.C - } - return 0 -} - -func init() { - proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest") - proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse") - proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes") - proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage") - proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage") - proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value) - proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value) - proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value) -} - -func init() { proto.RegisterFile("conformance_proto/conformance.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 2737 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0xd9, 0x72, 0xdb, 0xc8, - 0xd5, 0x16, 0x08, 0x59, 0x4b, 0x93, 0x92, 0xa8, 0xd6, 0xd6, 0x96, 0x5d, 0x63, 0x58, 0xb2, 0x7f, - 0xd3, 0xf6, 0x8c, 0xac, 0x05, 0x86, 0x65, 0xcf, 0x3f, 0x8e, 0x45, 0x9b, 0xb4, 0xe4, 0x8c, 0x25, - 0x17, 0x64, 0x8d, 0xab, 0x9c, 0x0b, 0x06, 0xa6, 0x20, 0x15, 0xc7, 0x24, 0xc1, 0x01, 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7a, 0x2f, 0x8c, 0x1a, 0xaf, 0x7c, 0x91, 0xd6, 0x73, 0x24, 0xad, 0x67, - 0x33, 0x73, 0xe0, 0x16, 0xc5, 0x1a, 0x9e, 0xce, 0xcb, 0x60, 0x32, 0xf4, 0x3b, 0xbe, 0x87, 0xf3, - 0x48, 0x6f, 0xe6, 0x0b, 0x96, 0x89, 0xd5, 0x86, 0x5b, 0x85, 0xda, 0xc8, 0x30, 0xc7, 0x46, 0x96, - 0x65, 0x62, 0xb5, 0x91, 0x60, 0x54, 0x1b, 0x04, 0x8c, 0xa9, 0xcd, 0x45, 0xcb, 0xc4, 0x6a, 0xc3, - 0xcd, 0xb1, 0xda, 0x28, 0x40, 0xc7, 0x46, 0x4b, 0x96, 0x89, 0xd5, 0x46, 0x06, 0x6a, 0x8c, 0x4c, - 0x6d, 0x96, 0x2d, 0x13, 0xab, 0x0d, 0x37, 0xef, 0x27, 0x19, 0x99, 0xda, 0x5c, 0xb2, 0x4c, 0xac, - 0x36, 0x32, 0x90, 0xaa, 0x8d, 0x00, 0x72, 0x59, 0xb8, 0x6c, 0x99, 0x58, 0x6d, 0xb8, 0x5d, 0x52, - 0x1b, 0x15, 0xea, 0xd8, 0xe8, 0xff, 0x2c, 0x13, 0xab, 0x8d, 0x02, 0xa5, 0x6a, 0x13, 0xbb, 0xe7, - 0xb4, 0x57, 0x2c, 0x13, 0xab, 0x8d, 0x08, 0x40, 0x52, 0x1b, 0x0d, 0xec, 0xd8, 0xa8, 0x64, 0x99, - 0x58, 0x6d, 0x54, 0x30, 0x55, 0x9b, 0x38, 0x08, 0xa2, 0x36, 0x57, 0x2d, 0x13, 0xab, 0x8d, 0x08, - 0x81, 0xab, 0x8d, 0x80, 0x31, 0xb5, 0xb9, 0x66, 0x99, 0x58, 0x6d, 0xb8, 0x39, 0x56, 0x1b, 0x01, - 0x24, 0x6a, 0x73, 0xdd, 0x32, 0xb1, 0xda, 0x70, 0x23, 0x57, 0x9b, 0x38, 0x42, 0xaa, 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0x42, 0x76, 0x7e, 0x55, 0x06, 0x69, 0x77, - 0x02, 0xa5, 0x9f, 0x52, 0xbb, 0x4b, 0x56, 0x9e, 0x04, 0xc6, 0x4d, 0x8f, 0xbc, 0xea, 0x00, 0x49, - 0xa0, 0xcb, 0xc9, 0x69, 0x18, 0x27, 0x41, 0x32, 0xc2, 0x0e, 0x38, 0x2b, 0x11, 0x6b, 0x87, 0xe4, - 0x43, 0xe2, 0xe1, 0xe6, 0x00, 0x1e, 0x94, 0x63, 0x91, 0x7a, 0x9a, 0x6f, 0xa5, 0x5e, 0x84, 0x11, - 0x58, 0x94, 0x3c, 0xea, 0xa7, 0xe6, 0x36, 0x71, 0xe9, 0x0c, 0xe0, 0x52, 0x3d, 0x33, 0xa9, 0xcf, - 0x85, 0x56, 0xfa, 0x55, 0x78, 0x0c, 0xe6, 0x93, 0xdb, 0x24, 0x47, 0xdf, 0xce, 0x20, 0xf7, 0x80, - 0xb4, 0x0d, 0x7c, 0xf4, 0x49, 0xf7, 0x80, 0x76, 0x05, 0xbe, 0x0f, 0x16, 0x52, 0x76, 0x47, 0x3c, - 0x3d, 0x22, 0x9e, 0x36, 0x06, 0xdf, 0x5a, 0xec, 0x6a, 0xb6, 0x95, 0x72, 0x09, 0x2e, 0x83, 0x42, - 0xd0, 0xf6, 0x83, 0x23, 0x7e, 0xdc, 0x04, 0xf8, 0x11, 0x7b, 0x7b, 0xc8, 0xcd, 0x13, 0x2b, 0x3b, - 0x3c, 0x3e, 0x06, 0x66, 0x29, 0x48, 0xab, 0x6d, 0xe7, 0xb5, 0x1e, 0xb7, 0xb6, 0x87, 0x5c, 0x48, - 0x68, 0xd4, 0x5a, 0x8a, 0x08, 0x58, 0xb7, 0x7f, 0xc0, 0x27, 0x12, 0xc4, 0xca, 0x7a, 0xf7, 0x22, - 0xa0, 0x5f, 0x59, 0xdb, 0x86, 0x6c, 0xbc, 0x01, 0x88, 0x91, 0x76, 0xe1, 0x05, 0x00, 0x18, 0x04, - 0xdf,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 0x7f, 0x46, 0x79, 0x42, 0x8c, 0xa2, 0xf0, 0xa9, 0xb2, - 0xf4, 0x06, 0x98, 0xd4, 0x06, 0x92, 0x05, 0x60, 0xd4, 0xf9, 0x81, 0x52, 0xbf, 0x76, 0x13, 0x80, - 0xf8, 0xdf, 0x30, 0xc1, 0x29, 0x90, 0x3f, 0xd8, 0xdd, 0x7f, 0x52, 0xb9, 0xbf, 0x53, 0xdd, 0xa9, - 0x3c, 0x28, 0x0e, 0xc1, 0x02, 0x18, 0x7b, 0xe2, 0xee, 0x3d, 0xdd, 0x2b, 0x1f, 0x54, 0x8b, 0x06, - 0x1c, 0x03, 0xc3, 0x8f, 0xf6, 0xf7, 0x76, 0x8b, 0xb9, 0x6b, 0xf7, 0x40, 0x5e, 0x9e, 0x07, 0x4e, - 0x81, 0x7c, 0x75, 0xcf, 0xad, 0xec, 0x3c, 0xdc, 0xad, 0xd1, 0x48, 0x25, 0x03, 0x8d, 0x58, 0x31, - 0x3c, 0x2f, 0xe6, 0xca, 0x17, 0xc1, 0x85, 0x7a, 0xd0, 0x4a, 0xfc, 0x61, 0x26, 0x25, 0xe7, 0xc5, - 0x08, 0xb1, 0x6e, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x33, 0xc2, 0x0c, 0xb6, 0xeb, 0x26, 0x00, - 0x00, -} diff --git a/deps/github.com/golang/protobuf/conformance/internal/conformance_proto/conformance.pb.go b/deps/github.com/golang/protobuf/conformance/internal/conformance_proto/conformance.pb.go index 0498b1f11..15102e857 100644 --- a/deps/github.com/golang/protobuf/conformance/internal/conformance_proto/conformance.pb.go +++ b/deps/github.com/golang/protobuf/conformance/internal/conformance_proto/conformance.pb.go @@ -156,12 +156,14 @@ type isConformanceRequest_Payload interface { type ConformanceRequest_ProtobufPayload struct { ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` } + type ConformanceRequest_JsonPayload struct { JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"` } func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {} -func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} + +func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { if m != nil { @@ -303,28 +305,38 @@ type isConformanceResponse_Result interface { type ConformanceResponse_ParseError struct { ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"` } + type ConformanceResponse_SerializeError struct { SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"` } + type ConformanceResponse_RuntimeError struct { RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"` } + type ConformanceResponse_ProtobufPayload struct { ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` } + type ConformanceResponse_JsonPayload struct { JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"` } + type ConformanceResponse_Skipped struct { Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"` } -func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} -func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} -func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} +func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} + +func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} + +func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} + func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} -func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} -func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} + +func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} + +func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { if m != nil { @@ -648,35 +660,6 @@ func (m *TestAllTypes) XXX_DiscardUnknown() { var xxx_messageInfo_TestAllTypes proto.InternalMessageInfo -type isTestAllTypes_OneofField interface { - isTestAllTypes_OneofField() -} - -type TestAllTypes_OneofUint32 struct { - OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"` -} -type TestAllTypes_OneofNestedMessage struct { - OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"` -} -type TestAllTypes_OneofString struct { - OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"` -} -type TestAllTypes_OneofBytes struct { - OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` -} - -func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} - -func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { - if m != nil { - return m.OneofField - } - return nil -} - func (m *TestAllTypes) GetOptionalInt32() int32 { if m != nil { return m.OptionalInt32 @@ -1111,6 +1094,41 @@ func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum { return nil } +type isTestAllTypes_OneofField interface { + isTestAllTypes_OneofField() +} + +type TestAllTypes_OneofUint32 struct { + OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"` +} + +type TestAllTypes_OneofNestedMessage struct { + OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"` +} + +type TestAllTypes_OneofString struct { + OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"` +} + +type TestAllTypes_OneofBytes struct { + OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` +} + +func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} + +func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} + +func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} + +func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} + +func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { + if m != nil { + return m.OneofField + } + return nil +} + func (m *TestAllTypes) GetOneofUint32() uint32 { if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok { return x.OneofUint32 diff --git a/deps/github.com/golang/protobuf/jsonpb/jsonpb.go b/deps/github.com/golang/protobuf/jsonpb/jsonpb.go index a569810fe..ada2b78e8 100644 --- a/deps/github.com/golang/protobuf/jsonpb/jsonpb.go +++ b/deps/github.com/golang/protobuf/jsonpb/jsonpb.go @@ -106,6 +106,9 @@ func defaultResolveAny(typeUrl string) (proto.Message, error) { // way they are marshaled to JSON. Messages that implement this should // also implement JSONPBUnmarshaler so that the custom format can be // parsed. +// +// The JSON marshaling must follow the proto to JSON specification: +// https://developers.google.com/protocol-buffers/docs/proto3#json type JSONPBMarshaler interface { MarshalJSONPB(*Marshaler) ([]byte, error) } @@ -114,6 +117,9 @@ type JSONPBMarshaler interface { // the way they are unmarshaled from JSON. Messages that implement this // should also implement JSONPBMarshaler so that the custom format can be // produced. +// +// The JSON unmarshaling must follow the JSON to proto specification: +// https://developers.google.com/protocol-buffers/docs/proto3#json type JSONPBUnmarshaler interface { UnmarshalJSONPB(*Unmarshaler, []byte) error } @@ -565,6 +571,7 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle out.write(m.Indent) } + // TODO handle map key prop properly b, err := json.Marshal(k.Interface()) if err != nil { return err @@ -586,7 +593,11 @@ func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v refle out.write(` `) } - if err := m.marshalValue(out, prop, v.MapIndex(k), indent+m.Indent); err != nil { + vprop := prop + if prop != nil && prop.MapValProp != nil { + vprop = prop.MapValProp + } + if err := m.marshalValue(out, vprop, v.MapIndex(k), indent+m.Indent); err != nil { return err } } @@ -1010,16 +1021,22 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe k = reflect.ValueOf(ks) } else { k = reflect.New(targetType.Key()).Elem() - // TODO: pass the correct Properties if needed. - if err := u.unmarshalValue(k, json.RawMessage(ks), nil); err != nil { + var kprop *proto.Properties + if prop != nil && prop.MapKeyProp != nil { + kprop = prop.MapKeyProp + } + if err := u.unmarshalValue(k, json.RawMessage(ks), kprop); err != nil { return err } } // Unmarshal map value. v := reflect.New(targetType.Elem()).Elem() - // TODO: pass the correct Properties if needed. - if err := u.unmarshalValue(v, raw, nil); err != nil { + var vprop *proto.Properties + if prop != nil && prop.MapValProp != nil { + vprop = prop.MapValProp + } + if err := u.unmarshalValue(v, raw, vprop); err != nil { return err } target.SetMapIndex(k, v) @@ -1105,6 +1122,8 @@ func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s mapKeys) Less(i, j int) bool { if k := s[i].Kind(); k == s[j].Kind() { switch k { + case reflect.String: + return s[i].String() < s[j].String() case reflect.Int32, reflect.Int64: return s[i].Int() < s[j].Int() case reflect.Uint32, reflect.Uint64: diff --git a/deps/github.com/golang/protobuf/jsonpb/jsonpb_test.go b/deps/github.com/golang/protobuf/jsonpb/jsonpb_test.go index 1f47d3bc2..45a13d45a 100644 --- a/deps/github.com/golang/protobuf/jsonpb/jsonpb_test.go +++ b/deps/github.com/golang/protobuf/jsonpb/jsonpb_test.go @@ -453,8 +453,7 @@ var marshalingTests = []struct { {"map", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}}, `{"buggy":{"1234":"yup"}}`}, {"map", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`}, - // TODO: This is broken. - //{"map", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}`}, + {"map", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}}`}, {"map", Marshaler{EnumsAsInts: true}, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":2}}`}, {"map", marshaler, &pb.Mappy{S32Booly: map[int32]bool{1: true, 3: false, 10: true, 12: false}}, `{"s32booly":{"1":true,"3":false,"10":true,"12":false}}`}, {"map", marshaler, &pb.Mappy{S64Booly: map[int64]bool{1: true, 3: false, 10: true, 12: false}}, `{"s64booly":{"1":true,"3":false,"10":true,"12":false}}`}, @@ -573,7 +572,7 @@ func TestMarshalIllegalTime(t *testing.T) { func TestMarshalJSONPBMarshaler(t *testing.T) { rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` - msg := dynamicMessage{rawJson: rawJson} + msg := dynamicMessage{RawJson: rawJson} str, err := new(Marshaler).MarshalToString(&msg) if err != nil { t.Errorf("an unexpected error occurred when marshalling JSONPBMarshaler: %v", err) @@ -584,7 +583,7 @@ func TestMarshalJSONPBMarshaler(t *testing.T) { } func TestMarshalAnyJSONPBMarshaler(t *testing.T) { - msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`} + msg := dynamicMessage{RawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`} a, err := ptypes.MarshalAny(&msg) if err != nil { t.Errorf("an unexpected error occurred when marshalling to Any: %v", err) @@ -602,7 +601,7 @@ func TestMarshalAnyJSONPBMarshaler(t *testing.T) { } func TestMarshalWithCustomValidation(t *testing.T) { - msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`, dummy: &dynamicMessage{}} + msg := dynamicMessage{RawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`, Dummy: &dynamicMessage{}} js, err := new(Marshaler).MarshalToString(&msg) if err != nil { @@ -748,8 +747,7 @@ var unmarshalingTests = []struct { {"Any with message and indent", Unmarshaler{}, anySimplePrettyJSON, anySimple}, {"Any with WKT", Unmarshaler{}, anyWellKnownJSON, anyWellKnown}, {"Any with WKT and indent", Unmarshaler{}, anyWellKnownPrettyJSON, anyWellKnown}, - // TODO: This is broken. - //{"map", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, + {"map", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, {"map", Unmarshaler{}, `{"enumy":{"XIV":2}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, {"oneof", Unmarshaler{}, `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{31000}}}, {"oneof spec name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{"Australia"}}}, @@ -854,7 +852,7 @@ func TestUnmarshaling(t *testing.T) { err := tt.unmarshaler.Unmarshal(strings.NewReader(tt.json), p) if err != nil { - t.Errorf("%s: %v", tt.desc, err) + t.Errorf("unmarshalling %s: %v", tt.desc, err) continue } @@ -1013,8 +1011,8 @@ func TestUnmarshalJSONPBUnmarshaler(t *testing.T) { if err := Unmarshal(strings.NewReader(rawJson), &msg); err != nil { t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) } - if msg.rawJson != rawJson { - t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.rawJson, rawJson) + if msg.RawJson != rawJson { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.RawJson, rawJson) } } @@ -1038,7 +1036,7 @@ func TestUnmarshalAnyJSONPBUnmarshaler(t *testing.T) { t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) } - dm := &dynamicMessage{rawJson: `{"baz":[0,1,2,3],"foo":"bar"}`} + dm := &dynamicMessage{RawJson: `{"baz":[0,1,2,3],"foo":"bar"}`} var want anypb.Any if b, err := proto.Marshal(dm); err != nil { t.Errorf("an unexpected error occurred when marshaling message: %v", err) @@ -1099,30 +1097,30 @@ func (s *stringField) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { // dynamicMessage implements protobuf.Message but is not a normal generated message type. // It provides implementations of JSONPBMarshaler and JSONPBUnmarshaler for JSON support. type dynamicMessage struct { - rawJson string `protobuf:"bytes,1,opt,name=rawJson"` + RawJson string `protobuf:"bytes,1,opt,name=rawJson"` // an unexported nested message is present just to ensure that it // won't result in a panic (see issue #509) - dummy *dynamicMessage `protobuf:"bytes,2,opt,name=dummy"` + Dummy *dynamicMessage `protobuf:"bytes,2,opt,name=dummy"` } func (m *dynamicMessage) Reset() { - m.rawJson = "{}" + m.RawJson = "{}" } func (m *dynamicMessage) String() string { - return m.rawJson + return m.RawJson } func (m *dynamicMessage) ProtoMessage() { } func (m *dynamicMessage) MarshalJSONPB(jm *Marshaler) ([]byte, error) { - return []byte(m.rawJson), nil + return []byte(m.RawJson), nil } func (m *dynamicMessage) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { - m.rawJson = string(js) + m.RawJson = string(js) return nil } diff --git a/deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile b/deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile deleted file mode 100644 index eeda8ae53..000000000 --- a/deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2015 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers:. *.proto diff --git a/deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go index 6c15fd107..ab7b53f72 100644 --- a/deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go +++ b/deps/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go @@ -612,23 +612,31 @@ type isMsgWithOneof_Union interface { type MsgWithOneof_Title struct { Title string `protobuf:"bytes,1,opt,name=title,oneof"` } + type MsgWithOneof_Salary struct { Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` } + type MsgWithOneof_Country struct { Country string `protobuf:"bytes,3,opt,name=Country,oneof"` } + type MsgWithOneof_HomeAddress struct { HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"` } + type MsgWithOneof_MsgWithRequired struct { MsgWithRequired *MsgWithRequired `protobuf:"bytes,5,opt,name=msg_with_required,json=msgWithRequired,oneof"` } -func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} -func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} -func (*MsgWithOneof_Country) isMsgWithOneof_Union() {} -func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} + +func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} + +func (*MsgWithOneof_Country) isMsgWithOneof_Union() {} + +func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {} + func (*MsgWithOneof_MsgWithRequired) isMsgWithOneof_Union() {} func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { diff --git a/deps/github.com/golang/protobuf/proto/Makefile b/deps/github.com/golang/protobuf/proto/Makefile deleted file mode 100644 index e2e0651a9..000000000 --- a/deps/github.com/golang/protobuf/proto/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -install: - go install - -test: install generate-test-pbs - go test - - -generate-test-pbs: - make install - make -C testdata - protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto - make diff --git a/deps/github.com/golang/protobuf/proto/all_test.go b/deps/github.com/golang/protobuf/proto/all_test.go index d7b671aee..1bea4b6e8 100644 --- a/deps/github.com/golang/protobuf/proto/all_test.go +++ b/deps/github.com/golang/protobuf/proto/all_test.go @@ -2256,26 +2256,32 @@ func TestInvalidUTF8(t *testing.T) { label string proto2 Message proto3 Message + want []byte }{{ label: "Scalar", proto2: &TestUTF8{Scalar: String(invalidUTF8)}, proto3: &pb3.TestUTF8{Scalar: invalidUTF8}, + want: []byte{0x0a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, }, { label: "Vector", proto2: &TestUTF8{Vector: []string{invalidUTF8}}, proto3: &pb3.TestUTF8{Vector: []string{invalidUTF8}}, + want: []byte{0x12, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, }, { label: "Oneof", proto2: &TestUTF8{Oneof: &TestUTF8_Field{invalidUTF8}}, proto3: &pb3.TestUTF8{Oneof: &pb3.TestUTF8_Field{invalidUTF8}}, + want: []byte{0x1a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, }, { label: "MapKey", proto2: &TestUTF8{MapKey: map[string]int64{invalidUTF8: 0}}, proto3: &pb3.TestUTF8{MapKey: map[string]int64{invalidUTF8: 0}}, + want: []byte{0x22, 0x0b, 0x0a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff, 0x10, 0x00}, }, { label: "MapValue", proto2: &TestUTF8{MapValue: map[int64]string{0: invalidUTF8}}, proto3: &pb3.TestUTF8{MapValue: map[int64]string{0: invalidUTF8}}, + want: []byte{0x2a, 0x0b, 0x08, 0x00, 0x12, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, }} for _, tt := range tests { @@ -2284,22 +2290,59 @@ func TestInvalidUTF8(t *testing.T) { if err != nil { t.Errorf("Marshal(proto2.%s) = %v, want nil", tt.label, err) } - tt.proto2.Reset() - err = Unmarshal(b, tt.proto2) - if err != nil { + if !bytes.Equal(b, tt.want) { + t.Errorf("Marshal(proto2.%s) = %x, want %x", tt.label, b, tt.want) + } + + m := Clone(tt.proto2) + m.Reset() + if err = Unmarshal(tt.want, m); err != nil { t.Errorf("Unmarshal(proto2.%s) = %v, want nil", tt.label, err) } + if !Equal(m, tt.proto2) { + t.Errorf("proto2.%s: output mismatch:\ngot %v\nwant %v", tt.label, m, tt.proto2) + } // Proto3 should validate UTF-8. - _, err = Marshal(tt.proto3) + b, err = Marshal(tt.proto3) if err == nil { t.Errorf("Marshal(proto3.%s) = %v, want non-nil", tt.label, err) } - tt.proto3.Reset() - err = Unmarshal(b, tt.proto3) + if !bytes.Equal(b, tt.want) { + t.Errorf("Marshal(proto3.%s) = %x, want %x", tt.label, b, tt.want) + } + + m = Clone(tt.proto3) + m.Reset() + err = Unmarshal(tt.want, m) if err == nil { t.Errorf("Unmarshal(proto3.%s) = %v, want non-nil", tt.label, err) } + if !Equal(m, tt.proto3) { + t.Errorf("proto3.%s: output mismatch:\ngot %v\nwant %v", tt.label, m, tt.proto2) + } + } +} + +func TestRequired(t *testing.T) { + // The F_BoolRequired field appears after all of the required fields. + // It should still be handled even after multiple required field violations. + m := &GoTest{F_BoolRequired: Bool(true)} + got, err := Marshal(m) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("Marshal() = %v, want RequiredNotSetError error", err) + } + if want := []byte{0x50, 0x01}; !bytes.Equal(got, want) { + t.Errorf("Marshal() = %x, want %x", got, want) + } + + m = new(GoTest) + err = Unmarshal(got, m) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("Marshal() = %v, want RequiredNotSetError error", err) + } + if !m.GetF_BoolRequired() { + t.Error("m.F_BoolRequired = false, want true") } } diff --git a/deps/github.com/golang/protobuf/proto/deprecated.go b/deps/github.com/golang/protobuf/proto/deprecated.go new file mode 100644 index 000000000..69de0ea0e --- /dev/null +++ b/deps/github.com/golang/protobuf/proto/deprecated.go @@ -0,0 +1,38 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Deprecated: do not use. +type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 } + +// Deprecated: do not use. +func GetStats() Stats { return Stats{} } diff --git a/deps/github.com/golang/protobuf/proto/encode.go b/deps/github.com/golang/protobuf/proto/encode.go index 4c35d3373..3abfed2cf 100644 --- a/deps/github.com/golang/protobuf/proto/encode.go +++ b/deps/github.com/golang/protobuf/proto/encode.go @@ -37,24 +37,9 @@ package proto import ( "errors" - "fmt" "reflect" ) -// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. -// Marshal reports this when a required field is not initialized. -// Unmarshal reports this when a required field is missing from the wire data. -type RequiredNotSetError struct { - field string -} - -func (e *RequiredNotSetError) Error() string { - if e.field == "" { - return fmt.Sprintf("proto: required field not set") - } - return fmt.Sprintf("proto: required field %q not set", e.field) -} - var ( // errRepeatedHasNil is the error returned if Marshal is called with // a struct with a repeated field containing a nil element. diff --git a/deps/github.com/golang/protobuf/proto/extensions.go b/deps/github.com/golang/protobuf/proto/extensions.go index 816a3b9d6..dacdd22d2 100644 --- a/deps/github.com/golang/protobuf/proto/extensions.go +++ b/deps/github.com/golang/protobuf/proto/extensions.go @@ -488,7 +488,7 @@ func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error } typ := reflect.TypeOf(extension.ExtensionType) if typ != reflect.TypeOf(value) { - return errors.New("proto: bad extension value type") + return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType) } // nil extension values need to be caught early, because the // encoder can't distinguish an ErrNil due to a nil extension diff --git a/deps/github.com/golang/protobuf/proto/lib.go b/deps/github.com/golang/protobuf/proto/lib.go index 0e2191b8a..c076dbdb9 100644 --- a/deps/github.com/golang/protobuf/proto/lib.go +++ b/deps/github.com/golang/protobuf/proto/lib.go @@ -265,7 +265,6 @@ package proto import ( "encoding/json" - "errors" "fmt" "log" "reflect" @@ -274,34 +273,73 @@ import ( "sync" ) -var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string") +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } -// Message is implemented by generated protocol buffer messages. -type Message interface { - Reset() - String() string - ProtoMessage() +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true } -// Stats records allocation details about the protocol buffer encoders -// and decoders. Useful for tuning the library itself. -type Stats struct { - Emalloc uint64 // mallocs in encode - Dmalloc uint64 // mallocs in decode - Encode uint64 // number of encodes - Decode uint64 // number of decodes - Chit uint64 // number of cache hits - Cmiss uint64 // number of cache misses - Size uint64 // number of sizes +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false } -// Set to true to enable stats collection. -const collectStats = false +type nonFatal struct{ E error } -var stats Stats +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} -// GetStats returns a copy of the global Stats structure. -func GetStats() Stats { return stats } +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} // A Buffer is a buffer manager for marshaling and unmarshaling // protocol buffers. It may be reused between invocations to diff --git a/deps/github.com/golang/protobuf/proto/properties.go b/deps/github.com/golang/protobuf/proto/properties.go index 1f272c06a..dce098e6e 100644 --- a/deps/github.com/golang/protobuf/proto/properties.go +++ b/deps/github.com/golang/protobuf/proto/properties.go @@ -148,9 +148,9 @@ type Properties struct { stype reflect.Type // set for struct types only sprop *StructProperties // set for struct types only - mtype reflect.Type // set for map types only - mkeyprop *Properties // set for map types only - mvalprop *Properties // set for map types only + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only } // String formats the properties in the protobuf struct field tag style. @@ -275,16 +275,16 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc case reflect.Map: p.mtype = t1 - p.mkeyprop = &Properties{} - p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) - p.mvalprop = &Properties{} + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} vtype := p.mtype.Elem() if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { // The value type is not a message (*T) or bytes ([]byte), // so we need encoders for the pointer to this type. vtype = reflect.PtrTo(vtype) } - p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) } if p.stype != nil { @@ -334,9 +334,6 @@ func GetProperties(t reflect.Type) *StructProperties { sprop, ok := propertiesMap[t] propertiesMu.RUnlock() if ok { - if collectStats { - stats.Chit++ - } return sprop } @@ -349,14 +346,8 @@ func GetProperties(t reflect.Type) *StructProperties { // getPropertiesLocked requires that propertiesMu is held. func getPropertiesLocked(t reflect.Type) *StructProperties { if prop, ok := propertiesMap[t]; ok { - if collectStats { - stats.Chit++ - } return prop } - if collectStats { - stats.Cmiss++ - } prop := new(StructProperties) // in case of recursive protos, fill this in now. diff --git a/deps/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go b/deps/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go index 7a7d4e9d8..2bd399231 100644 --- a/deps/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go +++ b/deps/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go @@ -428,6 +428,20 @@ func (m *TestUTF8) XXX_DiscardUnknown() { var xxx_messageInfo_TestUTF8 proto.InternalMessageInfo +func (m *TestUTF8) GetScalar() string { + if m != nil { + return m.Scalar + } + return "" +} + +func (m *TestUTF8) GetVector() []string { + if m != nil { + return m.Vector + } + return nil +} + type isTestUTF8_Oneof interface { isTestUTF8_Oneof() } @@ -445,20 +459,6 @@ func (m *TestUTF8) GetOneof() isTestUTF8_Oneof { return nil } -func (m *TestUTF8) GetScalar() string { - if m != nil { - return m.Scalar - } - return "" -} - -func (m *TestUTF8) GetVector() []string { - if m != nil { - return m.Vector - } - return nil -} - func (m *TestUTF8) GetField() string { if x, ok := m.GetOneof().(*TestUTF8_Field); ok { return x.Field diff --git a/deps/github.com/golang/protobuf/proto/table_marshal.go b/deps/github.com/golang/protobuf/proto/table_marshal.go index 9eda8459d..b16794496 100644 --- a/deps/github.com/golang/protobuf/proto/table_marshal.go +++ b/deps/github.com/golang/protobuf/proto/table_marshal.go @@ -231,7 +231,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte return b, err } - var err, errreq error + var err, errLater error // The old marshaler encodes extensions at beginning. if u.extensions.IsValid() { e := ptr.offset(u.extensions).toExtensions() @@ -252,11 +252,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte } } for _, f := range u.fields { - if f.required && errreq == nil { + if f.required { if ptr.offset(f.field).getPointer().isNil() { // Required field is not set. // We record the error but keep going, to give a complete marshaling. - errreq = &RequiredNotSetError{f.name} + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } continue } } @@ -269,8 +271,8 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte if err1, ok := err.(*RequiredNotSetError); ok { // Required field in submessage is not set. // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = &RequiredNotSetError{f.name + "." + err1.field} + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} } continue } @@ -278,8 +280,11 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte err = errors.New("proto: repeated field " + f.name + " has nil element") } if err == errInvalidUTF8 { - fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name - err = fmt.Errorf("proto: string field %q contains invalid UTF-8", fullName) + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue } return b, err } @@ -288,7 +293,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte s := *ptr.offset(u.unrecognized).toBytes() b = append(b, s...) } - return b, errreq + return b, errLater } // computeMarshalInfo initializes the marshal info. @@ -2038,52 +2043,68 @@ func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, e return b, nil } func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool v := *ptr.toString() if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool v := *ptr.toString() if v == "" { return b, nil } if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool p := *ptr.toStringPtr() if p == nil { return b, nil } v := *p if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool s := *ptr.toStringSlice() for _, v := range s { if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + invalidUTF8 = true } b = appendVarint(b, wiretag) b = appendVarint(b, uint64(len(v))) b = append(b, v...) } + if invalidUTF8 { + return b, errInvalidUTF8 + } return b, nil } func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { @@ -2162,7 +2183,8 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2170,22 +2192,14 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, wiretag) // start group b, err = u.marshal(b, v, deterministic) b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2229,7 +2243,8 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { s := ptr.getPointerSlice() - var err, errreq error + var err error + var nerr nonFatal for _, v := range s { if v.isNil() { return b, errRepeatedHasNil @@ -2239,22 +2254,14 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { b = appendVarint(b, uint64(siz)) b, err = u.marshal(b, v, deterministic) - if err != nil { - if _, ok := err.(*RequiredNotSetError); ok { - // Required field in submessage is not set. - // We record the error but keep going, to give a complete marshaling. - if errreq == nil { - errreq = err - } - continue - } + if !nerr.Merge(err) { if err == ErrNil { err = errRepeatedHasNil } return b, err } } - return b, errreq + return b, nerr.E } } @@ -2278,6 +2285,25 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { // value. // Key cannot be pointer-typed. valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } return func(ptr pointer, tagsize int) int { m := ptr.asPointerTo(t).Elem() // the map n := 0 @@ -2298,24 +2324,26 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { if len(keys) > 1 && deterministic { sort.Sort(mapKeys(keys)) } + + var nerr nonFatal for _, k := range keys { ki := k.Interface() vi := m.MapIndex(k).Interface() kaddr := toAddrPointer(&ki, false) // pointer to key vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value b = appendVarint(b, tag) - siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) b = appendVarint(b, uint64(siz)) b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b, err = valMarshaler(b, vaddr, valWireTag, deterministic) - if err != nil && err != ErrNil { // allow nil value in map + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map return b, err } } - return b, nil + return b, nerr.E } } @@ -2388,6 +2416,7 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2407,11 +2436,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2438,11 +2467,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // message set format is: @@ -2499,6 +2528,7 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de defer mu.Unlock() var err error + var nerr nonFatal // Fast-path for common cases: zero or one extensions. // Don't bother sorting the keys. @@ -2525,12 +2555,12 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } b = append(b, 1<<3|WireEndGroup) } - return b, nil + return b, nerr.E } // Sort the keys to provide a deterministic encoding. @@ -2564,11 +2594,11 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) b = append(b, 1<<3|WireEndGroup) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // sizeV1Extensions computes the size of encoded data for a V1-API extension field. @@ -2611,6 +2641,7 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ sort.Ints(keys) var err error + var nerr nonFatal for _, k := range keys { e := m[int32(k)] if e.value == nil || e.desc == nil { @@ -2627,11 +2658,11 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ v := e.value p := toAddrPointer(&v, ei.isptr) b, err = ei.marshaler(b, p, ei.wiretag, deterministic) - if err != nil { + if !nerr.Merge(err) { return b, err } } - return b, nil + return b, nerr.E } // newMarshaler is the interface representing objects that can marshal themselves. diff --git a/deps/github.com/golang/protobuf/proto/table_unmarshal.go b/deps/github.com/golang/protobuf/proto/table_unmarshal.go index 90ec6c215..ebf1caa56 100644 --- a/deps/github.com/golang/protobuf/proto/table_unmarshal.go +++ b/deps/github.com/golang/protobuf/proto/table_unmarshal.go @@ -138,8 +138,8 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if u.isMessageSet { return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions()) } - var reqMask uint64 // bitmask of required fields we've seen. - var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage. + var reqMask uint64 // bitmask of required fields we've seen. + var errLater error for len(b) > 0 { // Read tag and wire type. // Special case 1 and 2 byte varints. @@ -178,14 +178,19 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { if r, ok := err.(*RequiredNotSetError); ok { // Remember this error, but keep parsing. We need to produce // a full parse even if a required field is missing. - rnse = r + if errLater == nil { + errLater = r + } reqMask |= f.reqMask continue } if err != errInternalBadWireType { if err == errInvalidUTF8 { - fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name - err = fmt.Errorf("proto: string field %q contains invalid UTF-8", fullName) + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue } return err } @@ -245,20 +250,16 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error { emap[int32(tag)] = e } } - if rnse != nil { - // A required field of a submessage/group is missing. Return that error. - return rnse - } - if reqMask != u.reqMask { + if reqMask != u.reqMask && errLater == nil { // A required field of this message is missing. for _, n := range u.reqFields { if reqMask&1 == 0 { - return &RequiredNotSetError{n} + errLater = &RequiredNotSetError{n} } reqMask >>= 1 } } - return nil + return errLater } // computeUnmarshalInfo fills in u with information for use @@ -1529,10 +1530,10 @@ func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) + *f.toString() = v if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + return b[x:], errInvalidUTF8 } - *f.toString() = v return b[x:], nil } @@ -1549,10 +1550,10 @@ func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) + *f.toStringPtr() = &v if !utf8.ValidString(v) { - return nil, errInvalidUTF8 + return b[x:], errInvalidUTF8 } - *f.toStringPtr() = &v return b[x:], nil } @@ -1569,11 +1570,11 @@ func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { return nil, io.ErrUnexpectedEOF } v := string(b[:x]) - if !utf8.ValidString(v) { - return nil, errInvalidUTF8 - } s := f.toStringSlice() *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } return b[x:], nil } @@ -1755,6 +1756,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Maps will be somewhat slow. Oh well. // Read key and value from data. + var nerr nonFatal k := reflect.New(kt) v := reflect.New(vt) for len(b) > 0 { @@ -1775,7 +1777,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { err = errInternalBadWireType // skip unknown tag } - if err == nil { + if nerr.Merge(err) { continue } if err != errInternalBadWireType { @@ -1798,7 +1800,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // Insert into map. m.SetMapIndex(k.Elem(), v.Elem()) - return r, nil + return r, nerr.E } } @@ -1824,15 +1826,16 @@ func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshal // Unmarshal data into holder. // We unmarshal into the first field of the holder object. var err error + var nerr nonFatal b, err = unmarshal(b, valToPointer(v).offset(field0), w) - if err != nil { + if !nerr.Merge(err) { return nil, err } // Write pointer to holder into target field. f.asPointerTo(ityp).Elem().Set(v) - return b, nil + return b, nerr.E } } diff --git a/deps/github.com/golang/protobuf/proto/test_proto/test.pb.go b/deps/github.com/golang/protobuf/proto/test_proto/test.pb.go index 570227b1b..dc3ef673c 100644 --- a/deps/github.com/golang/protobuf/proto/test_proto/test.pb.go +++ b/deps/github.com/golang/protobuf/proto/test_proto/test.pb.go @@ -3083,83 +3083,108 @@ var xxx_messageInfo_Oneof proto.InternalMessageInfo type isOneof_Union interface { isOneof_Union() } -type isOneof_Tormato interface { - isOneof_Tormato() -} type Oneof_F_Bool struct { F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,oneof"` } + type Oneof_F_Int32 struct { F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,oneof"` } + type Oneof_F_Int64 struct { F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,oneof"` } + type Oneof_F_Fixed32 struct { F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,oneof"` } + type Oneof_F_Fixed64 struct { F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,oneof"` } + type Oneof_F_Uint32 struct { F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,oneof"` } + type Oneof_F_Uint64 struct { F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,oneof"` } + type Oneof_F_Float struct { F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,oneof"` } + type Oneof_F_Double struct { F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,oneof"` } + type Oneof_F_String struct { F_String string `protobuf:"bytes,10,opt,name=F_String,json=FString,oneof"` } + type Oneof_F_Bytes struct { F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,oneof"` } + type Oneof_F_Sint32 struct { F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,oneof"` } + type Oneof_F_Sint64 struct { F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,oneof"` } + type Oneof_F_Enum struct { F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=test_proto.MyMessage_Color,oneof"` } + type Oneof_F_Message struct { F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=FMessage,oneof"` } + type Oneof_FGroup struct { FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` } + type Oneof_F_Largest_Tag struct { F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=FLargestTag,oneof"` } -type Oneof_Value struct { - Value int32 `protobuf:"varint,100,opt,name=value,oneof"` -} -func (*Oneof_F_Bool) isOneof_Union() {} -func (*Oneof_F_Int32) isOneof_Union() {} -func (*Oneof_F_Int64) isOneof_Union() {} -func (*Oneof_F_Fixed32) isOneof_Union() {} -func (*Oneof_F_Fixed64) isOneof_Union() {} -func (*Oneof_F_Uint32) isOneof_Union() {} -func (*Oneof_F_Uint64) isOneof_Union() {} -func (*Oneof_F_Float) isOneof_Union() {} -func (*Oneof_F_Double) isOneof_Union() {} -func (*Oneof_F_String) isOneof_Union() {} -func (*Oneof_F_Bytes) isOneof_Union() {} -func (*Oneof_F_Sint32) isOneof_Union() {} -func (*Oneof_F_Sint64) isOneof_Union() {} -func (*Oneof_F_Enum) isOneof_Union() {} -func (*Oneof_F_Message) isOneof_Union() {} -func (*Oneof_FGroup) isOneof_Union() {} +func (*Oneof_F_Bool) isOneof_Union() {} + +func (*Oneof_F_Int32) isOneof_Union() {} + +func (*Oneof_F_Int64) isOneof_Union() {} + +func (*Oneof_F_Fixed32) isOneof_Union() {} + +func (*Oneof_F_Fixed64) isOneof_Union() {} + +func (*Oneof_F_Uint32) isOneof_Union() {} + +func (*Oneof_F_Uint64) isOneof_Union() {} + +func (*Oneof_F_Float) isOneof_Union() {} + +func (*Oneof_F_Double) isOneof_Union() {} + +func (*Oneof_F_String) isOneof_Union() {} + +func (*Oneof_F_Bytes) isOneof_Union() {} + +func (*Oneof_F_Sint32) isOneof_Union() {} + +func (*Oneof_F_Sint64) isOneof_Union() {} + +func (*Oneof_F_Enum) isOneof_Union() {} + +func (*Oneof_F_Message) isOneof_Union() {} + +func (*Oneof_FGroup) isOneof_Union() {} + func (*Oneof_F_Largest_Tag) isOneof_Union() {} -func (*Oneof_Value) isOneof_Tormato() {} func (m *Oneof) GetUnion() isOneof_Union { if m != nil { @@ -3167,12 +3192,6 @@ func (m *Oneof) GetUnion() isOneof_Union { } return nil } -func (m *Oneof) GetTormato() isOneof_Tormato { - if m != nil { - return m.Tormato - } - return nil -} func (m *Oneof) GetF_Bool() bool { if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { @@ -3293,6 +3312,23 @@ func (m *Oneof) GetF_Largest_Tag() int32 { return 0 } +type isOneof_Tormato interface { + isOneof_Tormato() +} + +type Oneof_Value struct { + Value int32 `protobuf:"varint,100,opt,name=value,oneof"` +} + +func (*Oneof_Value) isOneof_Tormato() {} + +func (m *Oneof) GetTormato() isOneof_Tormato { + if m != nil { + return m.Tormato + } + return nil +} + func (m *Oneof) GetValue() int32 { if x, ok := m.GetTormato().(*Oneof_Value); ok { return x.Value @@ -3598,7 +3634,7 @@ func _Oneof_OneofSizer(msg proto.Message) (n int) { n += proto.Size(x.FGroup) n += 2 // tag and wire case *Oneof_F_Largest_Tag: - n += 10 // tag and wire + n += 5 // tag and wire n += proto.SizeVarint(uint64(x.F_Largest_Tag)) case nil: default: @@ -3695,6 +3731,13 @@ func (m *Communique) XXX_DiscardUnknown() { var xxx_messageInfo_Communique proto.InternalMessageInfo +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + type isCommunique_Union interface { isCommunique_Union() } @@ -3702,28 +3745,38 @@ type isCommunique_Union interface { type Communique_Number struct { Number int32 `protobuf:"varint,5,opt,name=number,oneof"` } + type Communique_Name struct { Name string `protobuf:"bytes,6,opt,name=name,oneof"` } + type Communique_Data struct { Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` } + type Communique_TempC struct { TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` } + type Communique_Col struct { Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=test_proto.MyMessage_Color,oneof"` } + type Communique_Msg struct { Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` } func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Col) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} + +func (*Communique_Name) isCommunique_Union() {} + +func (*Communique_Data) isCommunique_Union() {} + +func (*Communique_TempC) isCommunique_Union() {} + +func (*Communique_Col) isCommunique_Union() {} + +func (*Communique_Msg) isCommunique_Union() {} func (m *Communique) GetUnion() isCommunique_Union { if m != nil { @@ -3732,13 +3785,6 @@ func (m *Communique) GetUnion() isCommunique_Union { return nil } -func (m *Communique) GetMakeMeCry() bool { - if m != nil && m.MakeMeCry != nil { - return *m.MakeMeCry - } - return false -} - func (m *Communique) GetNumber() int32 { if x, ok := m.GetUnion().(*Communique_Number); ok { return x.Number @@ -3945,6 +3991,20 @@ func (m *TestUTF8) XXX_DiscardUnknown() { var xxx_messageInfo_TestUTF8 proto.InternalMessageInfo +func (m *TestUTF8) GetScalar() string { + if m != nil && m.Scalar != nil { + return *m.Scalar + } + return "" +} + +func (m *TestUTF8) GetVector() []string { + if m != nil { + return m.Vector + } + return nil +} + type isTestUTF8_Oneof interface { isTestUTF8_Oneof() } @@ -3962,20 +4022,6 @@ func (m *TestUTF8) GetOneof() isTestUTF8_Oneof { return nil } -func (m *TestUTF8) GetScalar() string { - if m != nil && m.Scalar != nil { - return *m.Scalar - } - return "" -} - -func (m *TestUTF8) GetVector() []string { - if m != nil { - return m.Vector - } - return nil -} - func (m *TestUTF8) GetField() string { if x, ok := m.GetOneof().(*TestUTF8_Field); ok { return x.Field diff --git a/deps/github.com/golang/protobuf/proto/testdata/Makefile b/deps/github.com/golang/protobuf/proto/testdata/Makefile deleted file mode 100644 index fc288628a..000000000 --- a/deps/github.com/golang/protobuf/proto/testdata/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -include ../../Make.protobuf - -all: regenerate - -regenerate: - rm -f test.pb.go - make test.pb.go - -# The following rules are just aids to development. Not needed for typical testing. - -diff: regenerate - git diff test.pb.go - -restore: - cp test.pb.go.golden test.pb.go - -preserve: - cp test.pb.go test.pb.go.golden diff --git a/deps/github.com/golang/protobuf/proto/testdata/golden_test.go b/deps/github.com/golang/protobuf/proto/testdata/golden_test.go deleted file mode 100644 index 7172d0e96..000000000 --- a/deps/github.com/golang/protobuf/proto/testdata/golden_test.go +++ /dev/null @@ -1,86 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Verify that the compiler output for test.proto is unchanged. - -package testdata - -import ( - "crypto/sha1" - "fmt" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "testing" -) - -// sum returns in string form (for easy comparison) the SHA-1 hash of the named file. -func sum(t *testing.T, name string) string { - data, err := ioutil.ReadFile(name) - if err != nil { - t.Fatal(err) - } - t.Logf("sum(%q): length is %d", name, len(data)) - hash := sha1.New() - _, err = hash.Write(data) - if err != nil { - t.Fatal(err) - } - return fmt.Sprintf("% x", hash.Sum(nil)) -} - -func run(t *testing.T, name string, args ...string) { - cmd := exec.Command(name, args...) - cmd.Stdin = os.Stdin - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - err := cmd.Run() - if err != nil { - t.Fatal(err) - } -} - -func TestGolden(t *testing.T) { - // Compute the original checksum. - goldenSum := sum(t, "test.pb.go") - // Run the proto compiler. - run(t, "protoc", "--go_out="+os.TempDir(), "test.proto") - newFile := filepath.Join(os.TempDir(), "test.pb.go") - defer os.Remove(newFile) - // Compute the new checksum. - newSum := sum(t, newFile) - // Verify - if newSum != goldenSum { - run(t, "diff", "-u", "test.pb.go", newFile) - t.Fatal("Code generated by protoc-gen-go has changed; update test.pb.go") - } -} diff --git a/deps/github.com/golang/protobuf/proto/testdata/test.pb.go b/deps/github.com/golang/protobuf/proto/testdata/test.pb.go deleted file mode 100644 index e980d1a03..000000000 --- a/deps/github.com/golang/protobuf/proto/testdata/test.pb.go +++ /dev/null @@ -1,4147 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: test.proto - -/* -Package testdata is a generated protocol buffer package. - -It is generated from these files: - test.proto - -It has these top-level messages: - GoEnum - GoTestField - GoTest - GoTestRequiredGroupField - GoSkipTest - NonPackedTest - PackedTest - MaxTag - OldMessage - NewMessage - InnerMessage - OtherMessage - RequiredInnerMessage - MyMessage - Ext - ComplexExtension - DefaultsMessage - MyMessageSet - Empty - MessageList - Strings - Defaults - SubDefaults - RepeatedEnum - MoreRepeated - GroupOld - GroupNew - FloatingPoint - MessageWithMap - Oneof - Communique -*/ -package testdata - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type FOO int32 - -const ( - FOO_FOO1 FOO = 1 -) - -var FOO_name = map[int32]string{ - 1: "FOO1", -} -var FOO_value = map[string]int32{ - "FOO1": 1, -} - -func (x FOO) Enum() *FOO { - p := new(FOO) - *p = x - return p -} -func (x FOO) String() string { - return proto.EnumName(FOO_name, int32(x)) -} -func (x *FOO) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") - if err != nil { - return err - } - *x = FOO(value) - return nil -} -func (FOO) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -// An enum, for completeness. -type GoTest_KIND int32 - -const ( - GoTest_VOID GoTest_KIND = 0 - // Basic types - GoTest_BOOL GoTest_KIND = 1 - GoTest_BYTES GoTest_KIND = 2 - GoTest_FINGERPRINT GoTest_KIND = 3 - GoTest_FLOAT GoTest_KIND = 4 - GoTest_INT GoTest_KIND = 5 - GoTest_STRING GoTest_KIND = 6 - GoTest_TIME GoTest_KIND = 7 - // Groupings - GoTest_TUPLE GoTest_KIND = 8 - GoTest_ARRAY GoTest_KIND = 9 - GoTest_MAP GoTest_KIND = 10 - // Table types - GoTest_TABLE GoTest_KIND = 11 - // Functions - GoTest_FUNCTION GoTest_KIND = 12 -) - -var GoTest_KIND_name = map[int32]string{ - 0: "VOID", - 1: "BOOL", - 2: "BYTES", - 3: "FINGERPRINT", - 4: "FLOAT", - 5: "INT", - 6: "STRING", - 7: "TIME", - 8: "TUPLE", - 9: "ARRAY", - 10: "MAP", - 11: "TABLE", - 12: "FUNCTION", -} -var GoTest_KIND_value = map[string]int32{ - "VOID": 0, - "BOOL": 1, - "BYTES": 2, - "FINGERPRINT": 3, - "FLOAT": 4, - "INT": 5, - "STRING": 6, - "TIME": 7, - "TUPLE": 8, - "ARRAY": 9, - "MAP": 10, - "TABLE": 11, - "FUNCTION": 12, -} - -func (x GoTest_KIND) Enum() *GoTest_KIND { - p := new(GoTest_KIND) - *p = x - return p -} -func (x GoTest_KIND) String() string { - return proto.EnumName(GoTest_KIND_name, int32(x)) -} -func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") - if err != nil { - return err - } - *x = GoTest_KIND(value) - return nil -} -func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -type MyMessage_Color int32 - -const ( - MyMessage_RED MyMessage_Color = 0 - MyMessage_GREEN MyMessage_Color = 1 - MyMessage_BLUE MyMessage_Color = 2 -) - -var MyMessage_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var MyMessage_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x MyMessage_Color) Enum() *MyMessage_Color { - p := new(MyMessage_Color) - *p = x - return p -} -func (x MyMessage_Color) String() string { - return proto.EnumName(MyMessage_Color_name, int32(x)) -} -func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") - if err != nil { - return err - } - *x = MyMessage_Color(value) - return nil -} -func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{13, 0} } - -type DefaultsMessage_DefaultsEnum int32 - -const ( - DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 - DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 - DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 -) - -var DefaultsMessage_DefaultsEnum_name = map[int32]string{ - 0: "ZERO", - 1: "ONE", - 2: "TWO", -} -var DefaultsMessage_DefaultsEnum_value = map[string]int32{ - "ZERO": 0, - "ONE": 1, - "TWO": 2, -} - -func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { - p := new(DefaultsMessage_DefaultsEnum) - *p = x - return p -} -func (x DefaultsMessage_DefaultsEnum) String() string { - return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) -} -func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") - if err != nil { - return err - } - *x = DefaultsMessage_DefaultsEnum(value) - return nil -} -func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{16, 0} -} - -type Defaults_Color int32 - -const ( - Defaults_RED Defaults_Color = 0 - Defaults_GREEN Defaults_Color = 1 - Defaults_BLUE Defaults_Color = 2 -) - -var Defaults_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Defaults_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Defaults_Color) Enum() *Defaults_Color { - p := new(Defaults_Color) - *p = x - return p -} -func (x Defaults_Color) String() string { - return proto.EnumName(Defaults_Color_name, int32(x)) -} -func (x *Defaults_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") - if err != nil { - return err - } - *x = Defaults_Color(value) - return nil -} -func (Defaults_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{21, 0} } - -type RepeatedEnum_Color int32 - -const ( - RepeatedEnum_RED RepeatedEnum_Color = 1 -) - -var RepeatedEnum_Color_name = map[int32]string{ - 1: "RED", -} -var RepeatedEnum_Color_value = map[string]int32{ - "RED": 1, -} - -func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { - p := new(RepeatedEnum_Color) - *p = x - return p -} -func (x RepeatedEnum_Color) String() string { - return proto.EnumName(RepeatedEnum_Color_name, int32(x)) -} -func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") - if err != nil { - return err - } - *x = RepeatedEnum_Color(value) - return nil -} -func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{23, 0} } - -type GoEnum struct { - Foo *FOO `protobuf:"varint,1,req,name=foo,enum=testdata.FOO" json:"foo,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoEnum) Reset() { *m = GoEnum{} } -func (m *GoEnum) String() string { return proto.CompactTextString(m) } -func (*GoEnum) ProtoMessage() {} -func (*GoEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *GoEnum) GetFoo() FOO { - if m != nil && m.Foo != nil { - return *m.Foo - } - return FOO_FOO1 -} - -type GoTestField struct { - Label *string `protobuf:"bytes,1,req,name=Label" json:"Label,omitempty"` - Type *string `protobuf:"bytes,2,req,name=Type" json:"Type,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestField) Reset() { *m = GoTestField{} } -func (m *GoTestField) String() string { return proto.CompactTextString(m) } -func (*GoTestField) ProtoMessage() {} -func (*GoTestField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *GoTestField) GetLabel() string { - if m != nil && m.Label != nil { - return *m.Label - } - return "" -} - -func (m *GoTestField) GetType() string { - if m != nil && m.Type != nil { - return *m.Type - } - return "" -} - -type GoTest struct { - // Some typical parameters - Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,enum=testdata.GoTest_KIND" json:"Kind,omitempty"` - Table *string `protobuf:"bytes,2,opt,name=Table" json:"Table,omitempty"` - Param *int32 `protobuf:"varint,3,opt,name=Param" json:"Param,omitempty"` - // Required, repeated and optional foreign fields. - RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField" json:"RequiredField,omitempty"` - RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField" json:"RepeatedField,omitempty"` - OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField" json:"OptionalField,omitempty"` - // Required fields of all basic types - F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=FBoolRequired" json:"F_Bool_required,omitempty"` - F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=FInt32Required" json:"F_Int32_required,omitempty"` - F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=FInt64Required" json:"F_Int64_required,omitempty"` - F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=FFixed32Required" json:"F_Fixed32_required,omitempty"` - F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=FFixed64Required" json:"F_Fixed64_required,omitempty"` - F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=FUint32Required" json:"F_Uint32_required,omitempty"` - F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=FUint64Required" json:"F_Uint64_required,omitempty"` - F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=FFloatRequired" json:"F_Float_required,omitempty"` - F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=FDoubleRequired" json:"F_Double_required,omitempty"` - F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=FStringRequired" json:"F_String_required,omitempty"` - F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=FBytesRequired" json:"F_Bytes_required,omitempty"` - F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=FSint32Required" json:"F_Sint32_required,omitempty"` - F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=FSint64Required" json:"F_Sint64_required,omitempty"` - // Repeated fields of all basic types - F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=FBoolRepeated" json:"F_Bool_repeated,omitempty"` - F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=FInt32Repeated" json:"F_Int32_repeated,omitempty"` - F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=FInt64Repeated" json:"F_Int64_repeated,omitempty"` - F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=FFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` - F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=FFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` - F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=FUint32Repeated" json:"F_Uint32_repeated,omitempty"` - F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=FUint64Repeated" json:"F_Uint64_repeated,omitempty"` - F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=FFloatRepeated" json:"F_Float_repeated,omitempty"` - F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=FDoubleRepeated" json:"F_Double_repeated,omitempty"` - F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=FStringRepeated" json:"F_String_repeated,omitempty"` - F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=FBytesRepeated" json:"F_Bytes_repeated,omitempty"` - F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=FSint32Repeated" json:"F_Sint32_repeated,omitempty"` - F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=FSint64Repeated" json:"F_Sint64_repeated,omitempty"` - // Optional fields of all basic types - F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=FBoolOptional" json:"F_Bool_optional,omitempty"` - F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=FInt32Optional" json:"F_Int32_optional,omitempty"` - F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=FInt64Optional" json:"F_Int64_optional,omitempty"` - F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=FFixed32Optional" json:"F_Fixed32_optional,omitempty"` - F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=FFixed64Optional" json:"F_Fixed64_optional,omitempty"` - F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=FUint32Optional" json:"F_Uint32_optional,omitempty"` - F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=FUint64Optional" json:"F_Uint64_optional,omitempty"` - F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=FFloatOptional" json:"F_Float_optional,omitempty"` - F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=FDoubleOptional" json:"F_Double_optional,omitempty"` - F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=FStringOptional" json:"F_String_optional,omitempty"` - F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=FBytesOptional" json:"F_Bytes_optional,omitempty"` - F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=FSint32Optional" json:"F_Sint32_optional,omitempty"` - F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=FSint64Optional" json:"F_Sint64_optional,omitempty"` - // Default-valued fields of all basic types - F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=FBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` - F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=FInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` - F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=FInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` - F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=FFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` - F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=FFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` - F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=FUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` - F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=FUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` - F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=FFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` - F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=FDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` - F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=FStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` - F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=FBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` - F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=FSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` - F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=FSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` - // Packed repeated fields (no string or bytes). - F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=FBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` - F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=FInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` - F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=FInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` - F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=FFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` - F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=FFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` - F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=FUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` - F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=FUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` - F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=FFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` - F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=FDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` - F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=FSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` - F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=FSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` - Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` - Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` - Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest) Reset() { *m = GoTest{} } -func (m *GoTest) String() string { return proto.CompactTextString(m) } -func (*GoTest) ProtoMessage() {} -func (*GoTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -const Default_GoTest_F_BoolDefaulted bool = true -const Default_GoTest_F_Int32Defaulted int32 = 32 -const Default_GoTest_F_Int64Defaulted int64 = 64 -const Default_GoTest_F_Fixed32Defaulted uint32 = 320 -const Default_GoTest_F_Fixed64Defaulted uint64 = 640 -const Default_GoTest_F_Uint32Defaulted uint32 = 3200 -const Default_GoTest_F_Uint64Defaulted uint64 = 6400 -const Default_GoTest_F_FloatDefaulted float32 = 314159 -const Default_GoTest_F_DoubleDefaulted float64 = 271828 -const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" - -var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") - -const Default_GoTest_F_Sint32Defaulted int32 = -32 -const Default_GoTest_F_Sint64Defaulted int64 = -64 - -func (m *GoTest) GetKind() GoTest_KIND { - if m != nil && m.Kind != nil { - return *m.Kind - } - return GoTest_VOID -} - -func (m *GoTest) GetTable() string { - if m != nil && m.Table != nil { - return *m.Table - } - return "" -} - -func (m *GoTest) GetParam() int32 { - if m != nil && m.Param != nil { - return *m.Param - } - return 0 -} - -func (m *GoTest) GetRequiredField() *GoTestField { - if m != nil { - return m.RequiredField - } - return nil -} - -func (m *GoTest) GetRepeatedField() []*GoTestField { - if m != nil { - return m.RepeatedField - } - return nil -} - -func (m *GoTest) GetOptionalField() *GoTestField { - if m != nil { - return m.OptionalField - } - return nil -} - -func (m *GoTest) GetF_BoolRequired() bool { - if m != nil && m.F_BoolRequired != nil { - return *m.F_BoolRequired - } - return false -} - -func (m *GoTest) GetF_Int32Required() int32 { - if m != nil && m.F_Int32Required != nil { - return *m.F_Int32Required - } - return 0 -} - -func (m *GoTest) GetF_Int64Required() int64 { - if m != nil && m.F_Int64Required != nil { - return *m.F_Int64Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Required() uint32 { - if m != nil && m.F_Fixed32Required != nil { - return *m.F_Fixed32Required - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Required() uint64 { - if m != nil && m.F_Fixed64Required != nil { - return *m.F_Fixed64Required - } - return 0 -} - -func (m *GoTest) GetF_Uint32Required() uint32 { - if m != nil && m.F_Uint32Required != nil { - return *m.F_Uint32Required - } - return 0 -} - -func (m *GoTest) GetF_Uint64Required() uint64 { - if m != nil && m.F_Uint64Required != nil { - return *m.F_Uint64Required - } - return 0 -} - -func (m *GoTest) GetF_FloatRequired() float32 { - if m != nil && m.F_FloatRequired != nil { - return *m.F_FloatRequired - } - return 0 -} - -func (m *GoTest) GetF_DoubleRequired() float64 { - if m != nil && m.F_DoubleRequired != nil { - return *m.F_DoubleRequired - } - return 0 -} - -func (m *GoTest) GetF_StringRequired() string { - if m != nil && m.F_StringRequired != nil { - return *m.F_StringRequired - } - return "" -} - -func (m *GoTest) GetF_BytesRequired() []byte { - if m != nil { - return m.F_BytesRequired - } - return nil -} - -func (m *GoTest) GetF_Sint32Required() int32 { - if m != nil && m.F_Sint32Required != nil { - return *m.F_Sint32Required - } - return 0 -} - -func (m *GoTest) GetF_Sint64Required() int64 { - if m != nil && m.F_Sint64Required != nil { - return *m.F_Sint64Required - } - return 0 -} - -func (m *GoTest) GetF_BoolRepeated() []bool { - if m != nil { - return m.F_BoolRepeated - } - return nil -} - -func (m *GoTest) GetF_Int32Repeated() []int32 { - if m != nil { - return m.F_Int32Repeated - } - return nil -} - -func (m *GoTest) GetF_Int64Repeated() []int64 { - if m != nil { - return m.F_Int64Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed32Repeated() []uint32 { - if m != nil { - return m.F_Fixed32Repeated - } - return nil -} - -func (m *GoTest) GetF_Fixed64Repeated() []uint64 { - if m != nil { - return m.F_Fixed64Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint32Repeated() []uint32 { - if m != nil { - return m.F_Uint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Uint64Repeated() []uint64 { - if m != nil { - return m.F_Uint64Repeated - } - return nil -} - -func (m *GoTest) GetF_FloatRepeated() []float32 { - if m != nil { - return m.F_FloatRepeated - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeated() []float64 { - if m != nil { - return m.F_DoubleRepeated - } - return nil -} - -func (m *GoTest) GetF_StringRepeated() []string { - if m != nil { - return m.F_StringRepeated - } - return nil -} - -func (m *GoTest) GetF_BytesRepeated() [][]byte { - if m != nil { - return m.F_BytesRepeated - } - return nil -} - -func (m *GoTest) GetF_Sint32Repeated() []int32 { - if m != nil { - return m.F_Sint32Repeated - } - return nil -} - -func (m *GoTest) GetF_Sint64Repeated() []int64 { - if m != nil { - return m.F_Sint64Repeated - } - return nil -} - -func (m *GoTest) GetF_BoolOptional() bool { - if m != nil && m.F_BoolOptional != nil { - return *m.F_BoolOptional - } - return false -} - -func (m *GoTest) GetF_Int32Optional() int32 { - if m != nil && m.F_Int32Optional != nil { - return *m.F_Int32Optional - } - return 0 -} - -func (m *GoTest) GetF_Int64Optional() int64 { - if m != nil && m.F_Int64Optional != nil { - return *m.F_Int64Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed32Optional() uint32 { - if m != nil && m.F_Fixed32Optional != nil { - return *m.F_Fixed32Optional - } - return 0 -} - -func (m *GoTest) GetF_Fixed64Optional() uint64 { - if m != nil && m.F_Fixed64Optional != nil { - return *m.F_Fixed64Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint32Optional() uint32 { - if m != nil && m.F_Uint32Optional != nil { - return *m.F_Uint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Uint64Optional() uint64 { - if m != nil && m.F_Uint64Optional != nil { - return *m.F_Uint64Optional - } - return 0 -} - -func (m *GoTest) GetF_FloatOptional() float32 { - if m != nil && m.F_FloatOptional != nil { - return *m.F_FloatOptional - } - return 0 -} - -func (m *GoTest) GetF_DoubleOptional() float64 { - if m != nil && m.F_DoubleOptional != nil { - return *m.F_DoubleOptional - } - return 0 -} - -func (m *GoTest) GetF_StringOptional() string { - if m != nil && m.F_StringOptional != nil { - return *m.F_StringOptional - } - return "" -} - -func (m *GoTest) GetF_BytesOptional() []byte { - if m != nil { - return m.F_BytesOptional - } - return nil -} - -func (m *GoTest) GetF_Sint32Optional() int32 { - if m != nil && m.F_Sint32Optional != nil { - return *m.F_Sint32Optional - } - return 0 -} - -func (m *GoTest) GetF_Sint64Optional() int64 { - if m != nil && m.F_Sint64Optional != nil { - return *m.F_Sint64Optional - } - return 0 -} - -func (m *GoTest) GetF_BoolDefaulted() bool { - if m != nil && m.F_BoolDefaulted != nil { - return *m.F_BoolDefaulted - } - return Default_GoTest_F_BoolDefaulted -} - -func (m *GoTest) GetF_Int32Defaulted() int32 { - if m != nil && m.F_Int32Defaulted != nil { - return *m.F_Int32Defaulted - } - return Default_GoTest_F_Int32Defaulted -} - -func (m *GoTest) GetF_Int64Defaulted() int64 { - if m != nil && m.F_Int64Defaulted != nil { - return *m.F_Int64Defaulted - } - return Default_GoTest_F_Int64Defaulted -} - -func (m *GoTest) GetF_Fixed32Defaulted() uint32 { - if m != nil && m.F_Fixed32Defaulted != nil { - return *m.F_Fixed32Defaulted - } - return Default_GoTest_F_Fixed32Defaulted -} - -func (m *GoTest) GetF_Fixed64Defaulted() uint64 { - if m != nil && m.F_Fixed64Defaulted != nil { - return *m.F_Fixed64Defaulted - } - return Default_GoTest_F_Fixed64Defaulted -} - -func (m *GoTest) GetF_Uint32Defaulted() uint32 { - if m != nil && m.F_Uint32Defaulted != nil { - return *m.F_Uint32Defaulted - } - return Default_GoTest_F_Uint32Defaulted -} - -func (m *GoTest) GetF_Uint64Defaulted() uint64 { - if m != nil && m.F_Uint64Defaulted != nil { - return *m.F_Uint64Defaulted - } - return Default_GoTest_F_Uint64Defaulted -} - -func (m *GoTest) GetF_FloatDefaulted() float32 { - if m != nil && m.F_FloatDefaulted != nil { - return *m.F_FloatDefaulted - } - return Default_GoTest_F_FloatDefaulted -} - -func (m *GoTest) GetF_DoubleDefaulted() float64 { - if m != nil && m.F_DoubleDefaulted != nil { - return *m.F_DoubleDefaulted - } - return Default_GoTest_F_DoubleDefaulted -} - -func (m *GoTest) GetF_StringDefaulted() string { - if m != nil && m.F_StringDefaulted != nil { - return *m.F_StringDefaulted - } - return Default_GoTest_F_StringDefaulted -} - -func (m *GoTest) GetF_BytesDefaulted() []byte { - if m != nil && m.F_BytesDefaulted != nil { - return m.F_BytesDefaulted - } - return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) -} - -func (m *GoTest) GetF_Sint32Defaulted() int32 { - if m != nil && m.F_Sint32Defaulted != nil { - return *m.F_Sint32Defaulted - } - return Default_GoTest_F_Sint32Defaulted -} - -func (m *GoTest) GetF_Sint64Defaulted() int64 { - if m != nil && m.F_Sint64Defaulted != nil { - return *m.F_Sint64Defaulted - } - return Default_GoTest_F_Sint64Defaulted -} - -func (m *GoTest) GetF_BoolRepeatedPacked() []bool { - if m != nil { - return m.F_BoolRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { - if m != nil { - return m.F_Int32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { - if m != nil { - return m.F_Int64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Fixed32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Fixed64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { - if m != nil { - return m.F_Uint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { - if m != nil { - return m.F_Uint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { - if m != nil { - return m.F_FloatRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { - if m != nil { - return m.F_DoubleRepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { - if m != nil { - return m.F_Sint32RepeatedPacked - } - return nil -} - -func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { - if m != nil { - return m.F_Sint64RepeatedPacked - } - return nil -} - -func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { - if m != nil { - return m.Requiredgroup - } - return nil -} - -func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { - if m != nil { - return m.Repeatedgroup - } - return nil -} - -func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { - if m != nil { - return m.Optionalgroup - } - return nil -} - -// Required, repeated, and optional groups. -type GoTest_RequiredGroup struct { - RequiredField *string `protobuf:"bytes,71,req,name=RequiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } -func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RequiredGroup) ProtoMessage() {} -func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } - -func (m *GoTest_RequiredGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_RepeatedGroup struct { - RequiredField *string `protobuf:"bytes,81,req,name=RequiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } -func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_RepeatedGroup) ProtoMessage() {} -func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 1} } - -func (m *GoTest_RepeatedGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -type GoTest_OptionalGroup struct { - RequiredField *string `protobuf:"bytes,91,req,name=RequiredField" json:"RequiredField,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } -func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } -func (*GoTest_OptionalGroup) ProtoMessage() {} -func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 2} } - -func (m *GoTest_OptionalGroup) GetRequiredField() string { - if m != nil && m.RequiredField != nil { - return *m.RequiredField - } - return "" -} - -// For testing a group containing a required field. -type GoTestRequiredGroupField struct { - Group *GoTestRequiredGroupField_Group `protobuf:"group,1,req,name=Group,json=group" json:"group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestRequiredGroupField) Reset() { *m = GoTestRequiredGroupField{} } -func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) } -func (*GoTestRequiredGroupField) ProtoMessage() {} -func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *GoTestRequiredGroupField) GetGroup() *GoTestRequiredGroupField_Group { - if m != nil { - return m.Group - } - return nil -} - -type GoTestRequiredGroupField_Group struct { - Field *int32 `protobuf:"varint,2,req,name=Field" json:"Field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoTestRequiredGroupField_Group) Reset() { *m = GoTestRequiredGroupField_Group{} } -func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) } -func (*GoTestRequiredGroupField_Group) ProtoMessage() {} -func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{3, 0} -} - -func (m *GoTestRequiredGroupField_Group) GetField() int32 { - if m != nil && m.Field != nil { - return *m.Field - } - return 0 -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -type GoSkipTest struct { - SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` - SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` - SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` - SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` - Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } -func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest) ProtoMessage() {} -func (*GoSkipTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *GoSkipTest) GetSkipInt32() int32 { - if m != nil && m.SkipInt32 != nil { - return *m.SkipInt32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed32() uint32 { - if m != nil && m.SkipFixed32 != nil { - return *m.SkipFixed32 - } - return 0 -} - -func (m *GoSkipTest) GetSkipFixed64() uint64 { - if m != nil && m.SkipFixed64 != nil { - return *m.SkipFixed64 - } - return 0 -} - -func (m *GoSkipTest) GetSkipString() string { - if m != nil && m.SkipString != nil { - return *m.SkipString - } - return "" -} - -func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { - if m != nil { - return m.Skipgroup - } - return nil -} - -type GoSkipTest_SkipGroup struct { - GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` - GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } -func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } -func (*GoSkipTest_SkipGroup) ProtoMessage() {} -func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4, 0} } - -func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { - if m != nil && m.GroupInt32 != nil { - return *m.GroupInt32 - } - return 0 -} - -func (m *GoSkipTest_SkipGroup) GetGroupString() string { - if m != nil && m.GroupString != nil { - return *m.GroupString - } - return "" -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -type NonPackedTest struct { - A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } -func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } -func (*NonPackedTest) ProtoMessage() {} -func (*NonPackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *NonPackedTest) GetA() []int32 { - if m != nil { - return m.A - } - return nil -} - -type PackedTest struct { - B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *PackedTest) Reset() { *m = PackedTest{} } -func (m *PackedTest) String() string { return proto.CompactTextString(m) } -func (*PackedTest) ProtoMessage() {} -func (*PackedTest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *PackedTest) GetB() []int32 { - if m != nil { - return m.B - } - return nil -} - -type MaxTag struct { - // Maximum possible tag number. - LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MaxTag) Reset() { *m = MaxTag{} } -func (m *MaxTag) String() string { return proto.CompactTextString(m) } -func (*MaxTag) ProtoMessage() {} -func (*MaxTag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } - -func (m *MaxTag) GetLastField() string { - if m != nil && m.LastField != nil { - return *m.LastField - } - return "" -} - -type OldMessage struct { - Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage) Reset() { *m = OldMessage{} } -func (m *OldMessage) String() string { return proto.CompactTextString(m) } -func (*OldMessage) ProtoMessage() {} -func (*OldMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } - -func (m *OldMessage) GetNested() *OldMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *OldMessage) GetNum() int32 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type OldMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } -func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*OldMessage_Nested) ProtoMessage() {} -func (*OldMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} } - -func (m *OldMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -type NewMessage struct { - Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` - // This is an int32 in OldMessage. - Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage) Reset() { *m = NewMessage{} } -func (m *NewMessage) String() string { return proto.CompactTextString(m) } -func (*NewMessage) ProtoMessage() {} -func (*NewMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } - -func (m *NewMessage) GetNested() *NewMessage_Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *NewMessage) GetNum() int64 { - if m != nil && m.Num != nil { - return *m.Num - } - return 0 -} - -type NewMessage_Nested struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } -func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } -func (*NewMessage_Nested) ProtoMessage() {} -func (*NewMessage_Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9, 0} } - -func (m *NewMessage_Nested) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *NewMessage_Nested) GetFoodGroup() string { - if m != nil && m.FoodGroup != nil { - return *m.FoodGroup - } - return "" -} - -type InnerMessage struct { - Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` - Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` - Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *InnerMessage) Reset() { *m = InnerMessage{} } -func (m *InnerMessage) String() string { return proto.CompactTextString(m) } -func (*InnerMessage) ProtoMessage() {} -func (*InnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } - -const Default_InnerMessage_Port int32 = 4000 - -func (m *InnerMessage) GetHost() string { - if m != nil && m.Host != nil { - return *m.Host - } - return "" -} - -func (m *InnerMessage) GetPort() int32 { - if m != nil && m.Port != nil { - return *m.Port - } - return Default_InnerMessage_Port -} - -func (m *InnerMessage) GetConnected() bool { - if m != nil && m.Connected != nil { - return *m.Connected - } - return false -} - -type OtherMessage struct { - Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` - Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` - Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherMessage) Reset() { *m = OtherMessage{} } -func (m *OtherMessage) String() string { return proto.CompactTextString(m) } -func (*OtherMessage) ProtoMessage() {} -func (*OtherMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } - -var extRange_OtherMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherMessage -} - -func (m *OtherMessage) GetKey() int64 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -func (m *OtherMessage) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *OtherMessage) GetWeight() float32 { - if m != nil && m.Weight != nil { - return *m.Weight - } - return 0 -} - -func (m *OtherMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -type RequiredInnerMessage struct { - LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} } -func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } -func (*RequiredInnerMessage) ProtoMessage() {} -func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage { - if m != nil { - return m.LeoFinallyWonAnOscar - } - return nil -} - -type MyMessage struct { - Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` - Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` - Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` - Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` - Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` - Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` - WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"` - RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` - Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=testdata.MyMessage_Color" json:"bikeshed,omitempty"` - Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` - // This field becomes [][]byte in the generated code. - RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` - Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage) Reset() { *m = MyMessage{} } -func (m *MyMessage) String() string { return proto.CompactTextString(m) } -func (*MyMessage) ProtoMessage() {} -func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } - -var extRange_MyMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessage -} - -func (m *MyMessage) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -func (m *MyMessage) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MyMessage) GetQuote() string { - if m != nil && m.Quote != nil { - return *m.Quote - } - return "" -} - -func (m *MyMessage) GetPet() []string { - if m != nil { - return m.Pet - } - return nil -} - -func (m *MyMessage) GetInner() *InnerMessage { - if m != nil { - return m.Inner - } - return nil -} - -func (m *MyMessage) GetOthers() []*OtherMessage { - if m != nil { - return m.Others - } - return nil -} - -func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage { - if m != nil { - return m.WeMustGoDeeper - } - return nil -} - -func (m *MyMessage) GetRepInner() []*InnerMessage { - if m != nil { - return m.RepInner - } - return nil -} - -func (m *MyMessage) GetBikeshed() MyMessage_Color { - if m != nil && m.Bikeshed != nil { - return *m.Bikeshed - } - return MyMessage_RED -} - -func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *MyMessage) GetRepBytes() [][]byte { - if m != nil { - return m.RepBytes - } - return nil -} - -func (m *MyMessage) GetBigfloat() float64 { - if m != nil && m.Bigfloat != nil { - return *m.Bigfloat - } - return 0 -} - -type MyMessage_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } -func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*MyMessage_SomeGroup) ProtoMessage() {} -func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13, 0} } - -func (m *MyMessage_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Ext struct { - Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Ext) Reset() { *m = Ext{} } -func (m *Ext) String() string { return proto.CompactTextString(m) } -func (*Ext) ProtoMessage() {} -func (*Ext) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } - -func (m *Ext) GetData() string { - if m != nil && m.Data != nil { - return *m.Data - } - return "" -} - -var E_Ext_More = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*Ext)(nil), - Field: 103, - Name: "testdata.Ext.more", - Tag: "bytes,103,opt,name=more", - Filename: "test.proto", -} - -var E_Ext_Text = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*string)(nil), - Field: 104, - Name: "testdata.Ext.text", - Tag: "bytes,104,opt,name=text", - Filename: "test.proto", -} - -var E_Ext_Number = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 105, - Name: "testdata.Ext.number", - Tag: "varint,105,opt,name=number", - Filename: "test.proto", -} - -type ComplexExtension struct { - First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` - Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` - Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } -func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } -func (*ComplexExtension) ProtoMessage() {} -func (*ComplexExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } - -func (m *ComplexExtension) GetFirst() int32 { - if m != nil && m.First != nil { - return *m.First - } - return 0 -} - -func (m *ComplexExtension) GetSecond() int32 { - if m != nil && m.Second != nil { - return *m.Second - } - return 0 -} - -func (m *ComplexExtension) GetThird() []int32 { - if m != nil { - return m.Third - } - return nil -} - -type DefaultsMessage struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } -func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } -func (*DefaultsMessage) ProtoMessage() {} -func (*DefaultsMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } - -var extRange_DefaultsMessage = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_DefaultsMessage -} - -type MyMessageSet struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } -func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } -func (*MyMessageSet) ProtoMessage() {} -func (*MyMessageSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } - -func (m *MyMessageSet) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(&m.XXX_InternalExtensions) -} -func (m *MyMessageSet) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions) -} -func (m *MyMessageSet) MarshalJSON() ([]byte, error) { - return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) -} -func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { - return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) -} - -// ensure MyMessageSet satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*MyMessageSet)(nil) -var _ proto.Unmarshaler = (*MyMessageSet)(nil) - -var extRange_MyMessageSet = []proto.ExtensionRange{ - {100, 2147483646}, -} - -func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyMessageSet -} - -type Empty struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } - -type MessageList struct { - Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList) Reset() { *m = MessageList{} } -func (m *MessageList) String() string { return proto.CompactTextString(m) } -func (*MessageList) ProtoMessage() {} -func (*MessageList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } - -func (m *MessageList) GetMessage() []*MessageList_Message { - if m != nil { - return m.Message - } - return nil -} - -type MessageList_Message struct { - Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` - Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } -func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } -func (*MessageList_Message) ProtoMessage() {} -func (*MessageList_Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19, 0} } - -func (m *MessageList_Message) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -func (m *MessageList_Message) GetCount() int32 { - if m != nil && m.Count != nil { - return *m.Count - } - return 0 -} - -type Strings struct { - StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` - BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Strings) Reset() { *m = Strings{} } -func (m *Strings) String() string { return proto.CompactTextString(m) } -func (*Strings) ProtoMessage() {} -func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } - -func (m *Strings) GetStringField() string { - if m != nil && m.StringField != nil { - return *m.StringField - } - return "" -} - -func (m *Strings) GetBytesField() []byte { - if m != nil { - return m.BytesField - } - return nil -} - -type Defaults struct { - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,def=1" json:"F_Bool,omitempty"` - F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,def=32" json:"F_Int32,omitempty"` - F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,def=64" json:"F_Int64,omitempty"` - F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,def=320" json:"F_Fixed32,omitempty"` - F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,def=640" json:"F_Fixed64,omitempty"` - F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,def=3200" json:"F_Uint32,omitempty"` - F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,def=6400" json:"F_Uint64,omitempty"` - F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,def=314159" json:"F_Float,omitempty"` - F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,def=271828" json:"F_Double,omitempty"` - F_String *string `protobuf:"bytes,10,opt,name=F_String,json=FString,def=hello, \"world!\"\n" json:"F_String,omitempty"` - F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,def=Bignose" json:"F_Bytes,omitempty"` - F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,def=-32" json:"F_Sint32,omitempty"` - F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,def=-64" json:"F_Sint64,omitempty"` - F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=testdata.Defaults_Color,def=1" json:"F_Enum,omitempty"` - // More fields with crazy defaults. - F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=FPinf,def=inf" json:"F_Pinf,omitempty"` - F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=FNinf,def=-inf" json:"F_Ninf,omitempty"` - F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=FNan,def=nan" json:"F_Nan,omitempty"` - // Sub-message. - Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` - // Redundant but explicit defaults. - StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Defaults) Reset() { *m = Defaults{} } -func (m *Defaults) String() string { return proto.CompactTextString(m) } -func (*Defaults) ProtoMessage() {} -func (*Defaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } - -const Default_Defaults_F_Bool bool = true -const Default_Defaults_F_Int32 int32 = 32 -const Default_Defaults_F_Int64 int64 = 64 -const Default_Defaults_F_Fixed32 uint32 = 320 -const Default_Defaults_F_Fixed64 uint64 = 640 -const Default_Defaults_F_Uint32 uint32 = 3200 -const Default_Defaults_F_Uint64 uint64 = 6400 -const Default_Defaults_F_Float float32 = 314159 -const Default_Defaults_F_Double float64 = 271828 -const Default_Defaults_F_String string = "hello, \"world!\"\n" - -var Default_Defaults_F_Bytes []byte = []byte("Bignose") - -const Default_Defaults_F_Sint32 int32 = -32 -const Default_Defaults_F_Sint64 int64 = -64 -const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN - -var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) -var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) -var Default_Defaults_F_Nan float32 = float32(math.NaN()) - -func (m *Defaults) GetF_Bool() bool { - if m != nil && m.F_Bool != nil { - return *m.F_Bool - } - return Default_Defaults_F_Bool -} - -func (m *Defaults) GetF_Int32() int32 { - if m != nil && m.F_Int32 != nil { - return *m.F_Int32 - } - return Default_Defaults_F_Int32 -} - -func (m *Defaults) GetF_Int64() int64 { - if m != nil && m.F_Int64 != nil { - return *m.F_Int64 - } - return Default_Defaults_F_Int64 -} - -func (m *Defaults) GetF_Fixed32() uint32 { - if m != nil && m.F_Fixed32 != nil { - return *m.F_Fixed32 - } - return Default_Defaults_F_Fixed32 -} - -func (m *Defaults) GetF_Fixed64() uint64 { - if m != nil && m.F_Fixed64 != nil { - return *m.F_Fixed64 - } - return Default_Defaults_F_Fixed64 -} - -func (m *Defaults) GetF_Uint32() uint32 { - if m != nil && m.F_Uint32 != nil { - return *m.F_Uint32 - } - return Default_Defaults_F_Uint32 -} - -func (m *Defaults) GetF_Uint64() uint64 { - if m != nil && m.F_Uint64 != nil { - return *m.F_Uint64 - } - return Default_Defaults_F_Uint64 -} - -func (m *Defaults) GetF_Float() float32 { - if m != nil && m.F_Float != nil { - return *m.F_Float - } - return Default_Defaults_F_Float -} - -func (m *Defaults) GetF_Double() float64 { - if m != nil && m.F_Double != nil { - return *m.F_Double - } - return Default_Defaults_F_Double -} - -func (m *Defaults) GetF_String() string { - if m != nil && m.F_String != nil { - return *m.F_String - } - return Default_Defaults_F_String -} - -func (m *Defaults) GetF_Bytes() []byte { - if m != nil && m.F_Bytes != nil { - return m.F_Bytes - } - return append([]byte(nil), Default_Defaults_F_Bytes...) -} - -func (m *Defaults) GetF_Sint32() int32 { - if m != nil && m.F_Sint32 != nil { - return *m.F_Sint32 - } - return Default_Defaults_F_Sint32 -} - -func (m *Defaults) GetF_Sint64() int64 { - if m != nil && m.F_Sint64 != nil { - return *m.F_Sint64 - } - return Default_Defaults_F_Sint64 -} - -func (m *Defaults) GetF_Enum() Defaults_Color { - if m != nil && m.F_Enum != nil { - return *m.F_Enum - } - return Default_Defaults_F_Enum -} - -func (m *Defaults) GetF_Pinf() float32 { - if m != nil && m.F_Pinf != nil { - return *m.F_Pinf - } - return Default_Defaults_F_Pinf -} - -func (m *Defaults) GetF_Ninf() float32 { - if m != nil && m.F_Ninf != nil { - return *m.F_Ninf - } - return Default_Defaults_F_Ninf -} - -func (m *Defaults) GetF_Nan() float32 { - if m != nil && m.F_Nan != nil { - return *m.F_Nan - } - return Default_Defaults_F_Nan -} - -func (m *Defaults) GetSub() *SubDefaults { - if m != nil { - return m.Sub - } - return nil -} - -func (m *Defaults) GetStrZero() string { - if m != nil && m.StrZero != nil { - return *m.StrZero - } - return "" -} - -type SubDefaults struct { - N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SubDefaults) Reset() { *m = SubDefaults{} } -func (m *SubDefaults) String() string { return proto.CompactTextString(m) } -func (*SubDefaults) ProtoMessage() {} -func (*SubDefaults) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } - -const Default_SubDefaults_N int64 = 7 - -func (m *SubDefaults) GetN() int64 { - if m != nil && m.N != nil { - return *m.N - } - return Default_SubDefaults_N -} - -type RepeatedEnum struct { - Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=testdata.RepeatedEnum_Color" json:"color,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } -func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } -func (*RepeatedEnum) ProtoMessage() {} -func (*RepeatedEnum) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } - -func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { - if m != nil { - return m.Color - } - return nil -} - -type MoreRepeated struct { - Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` - BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` - Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` - IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` - Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` - Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` - Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } -func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } -func (*MoreRepeated) ProtoMessage() {} -func (*MoreRepeated) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } - -func (m *MoreRepeated) GetBools() []bool { - if m != nil { - return m.Bools - } - return nil -} - -func (m *MoreRepeated) GetBoolsPacked() []bool { - if m != nil { - return m.BoolsPacked - } - return nil -} - -func (m *MoreRepeated) GetInts() []int32 { - if m != nil { - return m.Ints - } - return nil -} - -func (m *MoreRepeated) GetIntsPacked() []int32 { - if m != nil { - return m.IntsPacked - } - return nil -} - -func (m *MoreRepeated) GetInt64SPacked() []int64 { - if m != nil { - return m.Int64SPacked - } - return nil -} - -func (m *MoreRepeated) GetStrings() []string { - if m != nil { - return m.Strings - } - return nil -} - -func (m *MoreRepeated) GetFixeds() []uint32 { - if m != nil { - return m.Fixeds - } - return nil -} - -type GroupOld struct { - G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld) Reset() { *m = GroupOld{} } -func (m *GroupOld) String() string { return proto.CompactTextString(m) } -func (*GroupOld) ProtoMessage() {} -func (*GroupOld) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } - -func (m *GroupOld) GetG() *GroupOld_G { - if m != nil { - return m.G - } - return nil -} - -type GroupOld_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } -func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } -func (*GroupOld_G) ProtoMessage() {} -func (*GroupOld_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25, 0} } - -func (m *GroupOld_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -type GroupNew struct { - G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew) Reset() { *m = GroupNew{} } -func (m *GroupNew) String() string { return proto.CompactTextString(m) } -func (*GroupNew) ProtoMessage() {} -func (*GroupNew) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } - -func (m *GroupNew) GetG() *GroupNew_G { - if m != nil { - return m.G - } - return nil -} - -type GroupNew_G struct { - X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` - Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } -func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } -func (*GroupNew_G) ProtoMessage() {} -func (*GroupNew_G) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26, 0} } - -func (m *GroupNew_G) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -func (m *GroupNew_G) GetY() int32 { - if m != nil && m.Y != nil { - return *m.Y - } - return 0 -} - -type FloatingPoint struct { - F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` - Exact *bool `protobuf:"varint,2,opt,name=exact" json:"exact,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } -func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } -func (*FloatingPoint) ProtoMessage() {} -func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } - -func (m *FloatingPoint) GetF() float64 { - if m != nil && m.F != nil { - return *m.F - } - return 0 -} - -func (m *FloatingPoint) GetExact() bool { - if m != nil && m.Exact != nil { - return *m.Exact - } - return false -} - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } -func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } -func (*MessageWithMap) ProtoMessage() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } - -func (m *MessageWithMap) GetNameMapping() map[int32]string { - if m != nil { - return m.NameMapping - } - return nil -} - -func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { - if m != nil { - return m.MsgMapping - } - return nil -} - -func (m *MessageWithMap) GetByteMapping() map[bool][]byte { - if m != nil { - return m.ByteMapping - } - return nil -} - -func (m *MessageWithMap) GetStrToStr() map[string]string { - if m != nil { - return m.StrToStr - } - return nil -} - -type Oneof struct { - // Types that are valid to be assigned to Union: - // *Oneof_F_Bool - // *Oneof_F_Int32 - // *Oneof_F_Int64 - // *Oneof_F_Fixed32 - // *Oneof_F_Fixed64 - // *Oneof_F_Uint32 - // *Oneof_F_Uint64 - // *Oneof_F_Float - // *Oneof_F_Double - // *Oneof_F_String - // *Oneof_F_Bytes - // *Oneof_F_Sint32 - // *Oneof_F_Sint64 - // *Oneof_F_Enum - // *Oneof_F_Message - // *Oneof_FGroup - // *Oneof_F_Largest_Tag - Union isOneof_Union `protobuf_oneof:"union"` - // Types that are valid to be assigned to Tormato: - // *Oneof_Value - Tormato isOneof_Tormato `protobuf_oneof:"tormato"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Oneof) Reset() { *m = Oneof{} } -func (m *Oneof) String() string { return proto.CompactTextString(m) } -func (*Oneof) ProtoMessage() {} -func (*Oneof) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } - -type isOneof_Union interface { - isOneof_Union() -} -type isOneof_Tormato interface { - isOneof_Tormato() -} - -type Oneof_F_Bool struct { - F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,oneof"` -} -type Oneof_F_Int32 struct { - F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,oneof"` -} -type Oneof_F_Int64 struct { - F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,oneof"` -} -type Oneof_F_Fixed32 struct { - F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,oneof"` -} -type Oneof_F_Fixed64 struct { - F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,oneof"` -} -type Oneof_F_Uint32 struct { - F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,oneof"` -} -type Oneof_F_Uint64 struct { - F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,oneof"` -} -type Oneof_F_Float struct { - F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,oneof"` -} -type Oneof_F_Double struct { - F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,oneof"` -} -type Oneof_F_String struct { - F_String string `protobuf:"bytes,10,opt,name=F_String,json=FString,oneof"` -} -type Oneof_F_Bytes struct { - F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,oneof"` -} -type Oneof_F_Sint32 struct { - F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,oneof"` -} -type Oneof_F_Sint64 struct { - F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,oneof"` -} -type Oneof_F_Enum struct { - F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=testdata.MyMessage_Color,oneof"` -} -type Oneof_F_Message struct { - F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=FMessage,oneof"` -} -type Oneof_FGroup struct { - FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` -} -type Oneof_F_Largest_Tag struct { - F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=FLargestTag,oneof"` -} -type Oneof_Value struct { - Value int32 `protobuf:"varint,100,opt,name=value,oneof"` -} - -func (*Oneof_F_Bool) isOneof_Union() {} -func (*Oneof_F_Int32) isOneof_Union() {} -func (*Oneof_F_Int64) isOneof_Union() {} -func (*Oneof_F_Fixed32) isOneof_Union() {} -func (*Oneof_F_Fixed64) isOneof_Union() {} -func (*Oneof_F_Uint32) isOneof_Union() {} -func (*Oneof_F_Uint64) isOneof_Union() {} -func (*Oneof_F_Float) isOneof_Union() {} -func (*Oneof_F_Double) isOneof_Union() {} -func (*Oneof_F_String) isOneof_Union() {} -func (*Oneof_F_Bytes) isOneof_Union() {} -func (*Oneof_F_Sint32) isOneof_Union() {} -func (*Oneof_F_Sint64) isOneof_Union() {} -func (*Oneof_F_Enum) isOneof_Union() {} -func (*Oneof_F_Message) isOneof_Union() {} -func (*Oneof_FGroup) isOneof_Union() {} -func (*Oneof_F_Largest_Tag) isOneof_Union() {} -func (*Oneof_Value) isOneof_Tormato() {} - -func (m *Oneof) GetUnion() isOneof_Union { - if m != nil { - return m.Union - } - return nil -} -func (m *Oneof) GetTormato() isOneof_Tormato { - if m != nil { - return m.Tormato - } - return nil -} - -func (m *Oneof) GetF_Bool() bool { - if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { - return x.F_Bool - } - return false -} - -func (m *Oneof) GetF_Int32() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { - return x.F_Int32 - } - return 0 -} - -func (m *Oneof) GetF_Int64() int64 { - if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { - return x.F_Int64 - } - return 0 -} - -func (m *Oneof) GetF_Fixed32() uint32 { - if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { - return x.F_Fixed32 - } - return 0 -} - -func (m *Oneof) GetF_Fixed64() uint64 { - if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { - return x.F_Fixed64 - } - return 0 -} - -func (m *Oneof) GetF_Uint32() uint32 { - if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { - return x.F_Uint32 - } - return 0 -} - -func (m *Oneof) GetF_Uint64() uint64 { - if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { - return x.F_Uint64 - } - return 0 -} - -func (m *Oneof) GetF_Float() float32 { - if x, ok := m.GetUnion().(*Oneof_F_Float); ok { - return x.F_Float - } - return 0 -} - -func (m *Oneof) GetF_Double() float64 { - if x, ok := m.GetUnion().(*Oneof_F_Double); ok { - return x.F_Double - } - return 0 -} - -func (m *Oneof) GetF_String() string { - if x, ok := m.GetUnion().(*Oneof_F_String); ok { - return x.F_String - } - return "" -} - -func (m *Oneof) GetF_Bytes() []byte { - if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { - return x.F_Bytes - } - return nil -} - -func (m *Oneof) GetF_Sint32() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { - return x.F_Sint32 - } - return 0 -} - -func (m *Oneof) GetF_Sint64() int64 { - if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { - return x.F_Sint64 - } - return 0 -} - -func (m *Oneof) GetF_Enum() MyMessage_Color { - if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { - return x.F_Enum - } - return MyMessage_RED -} - -func (m *Oneof) GetF_Message() *GoTestField { - if x, ok := m.GetUnion().(*Oneof_F_Message); ok { - return x.F_Message - } - return nil -} - -func (m *Oneof) GetFGroup() *Oneof_F_Group { - if x, ok := m.GetUnion().(*Oneof_FGroup); ok { - return x.FGroup - } - return nil -} - -func (m *Oneof) GetF_Largest_Tag() int32 { - if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { - return x.F_Largest_Tag - } - return 0 -} - -func (m *Oneof) GetValue() int32 { - if x, ok := m.GetTormato().(*Oneof_Value); ok { - return x.Value - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Oneof) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ - (*Oneof_F_Bool)(nil), - (*Oneof_F_Int32)(nil), - (*Oneof_F_Int64)(nil), - (*Oneof_F_Fixed32)(nil), - (*Oneof_F_Fixed64)(nil), - (*Oneof_F_Uint32)(nil), - (*Oneof_F_Uint64)(nil), - (*Oneof_F_Float)(nil), - (*Oneof_F_Double)(nil), - (*Oneof_F_String)(nil), - (*Oneof_F_Bytes)(nil), - (*Oneof_F_Sint32)(nil), - (*Oneof_F_Sint64)(nil), - (*Oneof_F_Enum)(nil), - (*Oneof_F_Message)(nil), - (*Oneof_FGroup)(nil), - (*Oneof_F_Largest_Tag)(nil), - (*Oneof_Value)(nil), - } -} - -func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Oneof) - // union - switch x := m.Union.(type) { - case *Oneof_F_Bool: - t := uint64(0) - if x.F_Bool { - t = 1 - } - b.EncodeVarint(1<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *Oneof_F_Int32: - b.EncodeVarint(2<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Int32)) - case *Oneof_F_Int64: - b.EncodeVarint(3<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Int64)) - case *Oneof_F_Fixed32: - b.EncodeVarint(4<<3 | proto.WireFixed32) - b.EncodeFixed32(uint64(x.F_Fixed32)) - case *Oneof_F_Fixed64: - b.EncodeVarint(5<<3 | proto.WireFixed64) - b.EncodeFixed64(uint64(x.F_Fixed64)) - case *Oneof_F_Uint32: - b.EncodeVarint(6<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Uint32)) - case *Oneof_F_Uint64: - b.EncodeVarint(7<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Uint64)) - case *Oneof_F_Float: - b.EncodeVarint(8<<3 | proto.WireFixed32) - b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) - case *Oneof_F_Double: - b.EncodeVarint(9<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.F_Double)) - case *Oneof_F_String: - b.EncodeVarint(10<<3 | proto.WireBytes) - b.EncodeStringBytes(x.F_String) - case *Oneof_F_Bytes: - b.EncodeVarint(11<<3 | proto.WireBytes) - b.EncodeRawBytes(x.F_Bytes) - case *Oneof_F_Sint32: - b.EncodeVarint(12<<3 | proto.WireVarint) - b.EncodeZigzag32(uint64(x.F_Sint32)) - case *Oneof_F_Sint64: - b.EncodeVarint(13<<3 | proto.WireVarint) - b.EncodeZigzag64(uint64(x.F_Sint64)) - case *Oneof_F_Enum: - b.EncodeVarint(14<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Enum)) - case *Oneof_F_Message: - b.EncodeVarint(15<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.F_Message); err != nil { - return err - } - case *Oneof_FGroup: - b.EncodeVarint(16<<3 | proto.WireStartGroup) - if err := b.Marshal(x.FGroup); err != nil { - return err - } - b.EncodeVarint(16<<3 | proto.WireEndGroup) - case *Oneof_F_Largest_Tag: - b.EncodeVarint(536870911<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.F_Largest_Tag)) - case nil: - default: - return fmt.Errorf("Oneof.Union has unexpected type %T", x) - } - // tormato - switch x := m.Tormato.(type) { - case *Oneof_Value: - b.EncodeVarint(100<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Value)) - case nil: - default: - return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) - } - return nil -} - -func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Oneof) - switch tag { - case 1: // union.F_Bool - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Bool{x != 0} - return true, err - case 2: // union.F_Int32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Int32{int32(x)} - return true, err - case 3: // union.F_Int64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Int64{int64(x)} - return true, err - case 4: // union.F_Fixed32 - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Oneof_F_Fixed32{uint32(x)} - return true, err - case 5: // union.F_Fixed64 - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Oneof_F_Fixed64{x} - return true, err - case 6: // union.F_Uint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Uint32{uint32(x)} - return true, err - case 7: // union.F_Uint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Uint64{x} - return true, err - case 8: // union.F_Float - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} - return true, err - case 9: // union.F_Double - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Oneof_F_Double{math.Float64frombits(x)} - return true, err - case 10: // union.F_String - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Oneof_F_String{x} - return true, err - case 11: // union.F_Bytes - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Oneof_F_Bytes{x} - return true, err - case 12: // union.F_Sint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.Union = &Oneof_F_Sint32{int32(x)} - return true, err - case 13: // union.F_Sint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag64() - m.Union = &Oneof_F_Sint64{int64(x)} - return true, err - case 14: // union.F_Enum - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Enum{MyMessage_Color(x)} - return true, err - case 15: // union.F_Message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(GoTestField) - err := b.DecodeMessage(msg) - m.Union = &Oneof_F_Message{msg} - return true, err - case 16: // union.f_group - if wire != proto.WireStartGroup { - return true, proto.ErrInternalBadWireType - } - msg := new(Oneof_F_Group) - err := b.DecodeGroup(msg) - m.Union = &Oneof_FGroup{msg} - return true, err - case 536870911: // union.F_Largest_Tag - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Oneof_F_Largest_Tag{int32(x)} - return true, err - case 100: // tormato.value - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Tormato = &Oneof_Value{int32(x)} - return true, err - default: - return false, nil - } -} - -func _Oneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Oneof) - // union - switch x := m.Union.(type) { - case *Oneof_F_Bool: - n += proto.SizeVarint(1<<3 | proto.WireVarint) - n += 1 - case *Oneof_F_Int32: - n += proto.SizeVarint(2<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Int32)) - case *Oneof_F_Int64: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Int64)) - case *Oneof_F_Fixed32: - n += proto.SizeVarint(4<<3 | proto.WireFixed32) - n += 4 - case *Oneof_F_Fixed64: - n += proto.SizeVarint(5<<3 | proto.WireFixed64) - n += 8 - case *Oneof_F_Uint32: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Uint32)) - case *Oneof_F_Uint64: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Uint64)) - case *Oneof_F_Float: - n += proto.SizeVarint(8<<3 | proto.WireFixed32) - n += 4 - case *Oneof_F_Double: - n += proto.SizeVarint(9<<3 | proto.WireFixed64) - n += 8 - case *Oneof_F_String: - n += proto.SizeVarint(10<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.F_String))) - n += len(x.F_String) - case *Oneof_F_Bytes: - n += proto.SizeVarint(11<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.F_Bytes))) - n += len(x.F_Bytes) - case *Oneof_F_Sint32: - n += proto.SizeVarint(12<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) - case *Oneof_F_Sint64: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) - case *Oneof_F_Enum: - n += proto.SizeVarint(14<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Enum)) - case *Oneof_F_Message: - s := proto.Size(x.F_Message) - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Oneof_FGroup: - n += proto.SizeVarint(16<<3 | proto.WireStartGroup) - n += proto.Size(x.FGroup) - n += proto.SizeVarint(16<<3 | proto.WireEndGroup) - case *Oneof_F_Largest_Tag: - n += proto.SizeVarint(536870911<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.F_Largest_Tag)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // tormato - switch x := m.Tormato.(type) { - case *Oneof_Value: - n += proto.SizeVarint(100<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Value)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Oneof_F_Group struct { - X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } -func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } -func (*Oneof_F_Group) ProtoMessage() {} -func (*Oneof_F_Group) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29, 0} } - -func (m *Oneof_F_Group) GetX() int32 { - if m != nil && m.X != nil { - return *m.X - } - return 0 -} - -type Communique struct { - MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` - // This is a oneof, called "union". - // - // Types that are valid to be assigned to Union: - // *Communique_Number - // *Communique_Name - // *Communique_Data - // *Communique_TempC - // *Communique_Col - // *Communique_Msg - Union isCommunique_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique) Reset() { *m = Communique{} } -func (m *Communique) String() string { return proto.CompactTextString(m) } -func (*Communique) ProtoMessage() {} -func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } - -type isCommunique_Union interface { - isCommunique_Union() -} - -type Communique_Number struct { - Number int32 `protobuf:"varint,5,opt,name=number,oneof"` -} -type Communique_Name struct { - Name string `protobuf:"bytes,6,opt,name=name,oneof"` -} -type Communique_Data struct { - Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` -} -type Communique_TempC struct { - TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` -} -type Communique_Col struct { - Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=testdata.MyMessage_Color,oneof"` -} -type Communique_Msg struct { - Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` -} - -func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Col) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} - -func (m *Communique) GetUnion() isCommunique_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *Communique) GetMakeMeCry() bool { - if m != nil && m.MakeMeCry != nil { - return *m.MakeMeCry - } - return false -} - -func (m *Communique) GetNumber() int32 { - if x, ok := m.GetUnion().(*Communique_Number); ok { - return x.Number - } - return 0 -} - -func (m *Communique) GetName() string { - if x, ok := m.GetUnion().(*Communique_Name); ok { - return x.Name - } - return "" -} - -func (m *Communique) GetData() []byte { - if x, ok := m.GetUnion().(*Communique_Data); ok { - return x.Data - } - return nil -} - -func (m *Communique) GetTempC() float64 { - if x, ok := m.GetUnion().(*Communique_TempC); ok { - return x.TempC - } - return 0 -} - -func (m *Communique) GetCol() MyMessage_Color { - if x, ok := m.GetUnion().(*Communique_Col); ok { - return x.Col - } - return MyMessage_RED -} - -func (m *Communique) GetMsg() *Strings { - if x, ok := m.GetUnion().(*Communique_Msg); ok { - return x.Msg - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ - (*Communique_Number)(nil), - (*Communique_Name)(nil), - (*Communique_Data)(nil), - (*Communique_TempC)(nil), - (*Communique_Col)(nil), - (*Communique_Msg)(nil), - } -} - -func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - b.EncodeVarint(5<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Number)) - case *Communique_Name: - b.EncodeVarint(6<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Name) - case *Communique_Data: - b.EncodeVarint(7<<3 | proto.WireBytes) - b.EncodeRawBytes(x.Data) - case *Communique_TempC: - b.EncodeVarint(8<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.TempC)) - case *Communique_Col: - b.EncodeVarint(9<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Col)) - case *Communique_Msg: - b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("Communique.Union has unexpected type %T", x) - } - return nil -} - -func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Communique) - switch tag { - case 5: // union.number - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Number{int32(x)} - return true, err - case 6: // union.name - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Communique_Name{x} - return true, err - case 7: // union.data - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Communique_Data{x} - return true, err - case 8: // union.temp_c - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Communique_TempC{math.Float64frombits(x)} - return true, err - case 9: // union.col - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Col{MyMessage_Color(x)} - return true, err - case 10: // union.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Strings) - err := b.DecodeMessage(msg) - m.Union = &Communique_Msg{msg} - return true, err - default: - return false, nil - } -} - -func _Communique_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Number)) - case *Communique_Name: - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Name))) - n += len(x.Name) - case *Communique_Data: - n += proto.SizeVarint(7<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Data))) - n += len(x.Data) - case *Communique_TempC: - n += proto.SizeVarint(8<<3 | proto.WireFixed64) - n += 8 - case *Communique_Col: - n += proto.SizeVarint(9<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Col)) - case *Communique_Msg: - s := proto.Size(x.Msg) - n += proto.SizeVarint(10<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -var E_Greeting = &proto.ExtensionDesc{ - ExtendedType: (*MyMessage)(nil), - ExtensionType: ([]string)(nil), - Field: 106, - Name: "testdata.greeting", - Tag: "bytes,106,rep,name=greeting", - Filename: "test.proto", -} - -var E_Complex = &proto.ExtensionDesc{ - ExtendedType: (*OtherMessage)(nil), - ExtensionType: (*ComplexExtension)(nil), - Field: 200, - Name: "testdata.complex", - Tag: "bytes,200,opt,name=complex", - Filename: "test.proto", -} - -var E_RComplex = &proto.ExtensionDesc{ - ExtendedType: (*OtherMessage)(nil), - ExtensionType: ([]*ComplexExtension)(nil), - Field: 201, - Name: "testdata.r_complex", - Tag: "bytes,201,rep,name=r_complex,json=rComplex", - Filename: "test.proto", -} - -var E_NoDefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 101, - Name: "testdata.no_default_double", - Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", - Filename: "test.proto", -} - -var E_NoDefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 102, - Name: "testdata.no_default_float", - Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", - Filename: "test.proto", -} - -var E_NoDefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 103, - Name: "testdata.no_default_int32", - Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", - Filename: "test.proto", -} - -var E_NoDefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 104, - Name: "testdata.no_default_int64", - Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", - Filename: "test.proto", -} - -var E_NoDefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 105, - Name: "testdata.no_default_uint32", - Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", - Filename: "test.proto", -} - -var E_NoDefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 106, - Name: "testdata.no_default_uint64", - Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", - Filename: "test.proto", -} - -var E_NoDefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 107, - Name: "testdata.no_default_sint32", - Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", - Filename: "test.proto", -} - -var E_NoDefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 108, - Name: "testdata.no_default_sint64", - Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", - Filename: "test.proto", -} - -var E_NoDefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 109, - Name: "testdata.no_default_fixed32", - Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", - Filename: "test.proto", -} - -var E_NoDefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 110, - Name: "testdata.no_default_fixed64", - Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", - Filename: "test.proto", -} - -var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 111, - Name: "testdata.no_default_sfixed32", - Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", - Filename: "test.proto", -} - -var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 112, - Name: "testdata.no_default_sfixed64", - Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", - Filename: "test.proto", -} - -var E_NoDefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 113, - Name: "testdata.no_default_bool", - Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", - Filename: "test.proto", -} - -var E_NoDefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 114, - Name: "testdata.no_default_string", - Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", - Filename: "test.proto", -} - -var E_NoDefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 115, - Name: "testdata.no_default_bytes", - Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", - Filename: "test.proto", -} - -var E_NoDefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 116, - Name: "testdata.no_default_enum", - Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum", - Filename: "test.proto", -} - -var E_DefaultDouble = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float64)(nil), - Field: 201, - Name: "testdata.default_double", - Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", - Filename: "test.proto", -} - -var E_DefaultFloat = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*float32)(nil), - Field: 202, - Name: "testdata.default_float", - Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", - Filename: "test.proto", -} - -var E_DefaultInt32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 203, - Name: "testdata.default_int32", - Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", - Filename: "test.proto", -} - -var E_DefaultInt64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 204, - Name: "testdata.default_int64", - Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", - Filename: "test.proto", -} - -var E_DefaultUint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 205, - Name: "testdata.default_uint32", - Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", - Filename: "test.proto", -} - -var E_DefaultUint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 206, - Name: "testdata.default_uint64", - Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", - Filename: "test.proto", -} - -var E_DefaultSint32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 207, - Name: "testdata.default_sint32", - Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", - Filename: "test.proto", -} - -var E_DefaultSint64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 208, - Name: "testdata.default_sint64", - Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", - Filename: "test.proto", -} - -var E_DefaultFixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint32)(nil), - Field: 209, - Name: "testdata.default_fixed32", - Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", - Filename: "test.proto", -} - -var E_DefaultFixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*uint64)(nil), - Field: 210, - Name: "testdata.default_fixed64", - Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", - Filename: "test.proto", -} - -var E_DefaultSfixed32 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int32)(nil), - Field: 211, - Name: "testdata.default_sfixed32", - Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", - Filename: "test.proto", -} - -var E_DefaultSfixed64 = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*int64)(nil), - Field: 212, - Name: "testdata.default_sfixed64", - Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", - Filename: "test.proto", -} - -var E_DefaultBool = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 213, - Name: "testdata.default_bool", - Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", - Filename: "test.proto", -} - -var E_DefaultString = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*string)(nil), - Field: 214, - Name: "testdata.default_string", - Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string", - Filename: "test.proto", -} - -var E_DefaultBytes = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: ([]byte)(nil), - Field: 215, - Name: "testdata.default_bytes", - Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", - Filename: "test.proto", -} - -var E_DefaultEnum = &proto.ExtensionDesc{ - ExtendedType: (*DefaultsMessage)(nil), - ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), - Field: 216, - Name: "testdata.default_enum", - Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=testdata.DefaultsMessage_DefaultsEnum,def=1", - Filename: "test.proto", -} - -var E_X201 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 201, - Name: "testdata.x201", - Tag: "bytes,201,opt,name=x201", - Filename: "test.proto", -} - -var E_X202 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 202, - Name: "testdata.x202", - Tag: "bytes,202,opt,name=x202", - Filename: "test.proto", -} - -var E_X203 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 203, - Name: "testdata.x203", - Tag: "bytes,203,opt,name=x203", - Filename: "test.proto", -} - -var E_X204 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 204, - Name: "testdata.x204", - Tag: "bytes,204,opt,name=x204", - Filename: "test.proto", -} - -var E_X205 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 205, - Name: "testdata.x205", - Tag: "bytes,205,opt,name=x205", - Filename: "test.proto", -} - -var E_X206 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 206, - Name: "testdata.x206", - Tag: "bytes,206,opt,name=x206", - Filename: "test.proto", -} - -var E_X207 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 207, - Name: "testdata.x207", - Tag: "bytes,207,opt,name=x207", - Filename: "test.proto", -} - -var E_X208 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 208, - Name: "testdata.x208", - Tag: "bytes,208,opt,name=x208", - Filename: "test.proto", -} - -var E_X209 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 209, - Name: "testdata.x209", - Tag: "bytes,209,opt,name=x209", - Filename: "test.proto", -} - -var E_X210 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 210, - Name: "testdata.x210", - Tag: "bytes,210,opt,name=x210", - Filename: "test.proto", -} - -var E_X211 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 211, - Name: "testdata.x211", - Tag: "bytes,211,opt,name=x211", - Filename: "test.proto", -} - -var E_X212 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 212, - Name: "testdata.x212", - Tag: "bytes,212,opt,name=x212", - Filename: "test.proto", -} - -var E_X213 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 213, - Name: "testdata.x213", - Tag: "bytes,213,opt,name=x213", - Filename: "test.proto", -} - -var E_X214 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 214, - Name: "testdata.x214", - Tag: "bytes,214,opt,name=x214", - Filename: "test.proto", -} - -var E_X215 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 215, - Name: "testdata.x215", - Tag: "bytes,215,opt,name=x215", - Filename: "test.proto", -} - -var E_X216 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 216, - Name: "testdata.x216", - Tag: "bytes,216,opt,name=x216", - Filename: "test.proto", -} - -var E_X217 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 217, - Name: "testdata.x217", - Tag: "bytes,217,opt,name=x217", - Filename: "test.proto", -} - -var E_X218 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 218, - Name: "testdata.x218", - Tag: "bytes,218,opt,name=x218", - Filename: "test.proto", -} - -var E_X219 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 219, - Name: "testdata.x219", - Tag: "bytes,219,opt,name=x219", - Filename: "test.proto", -} - -var E_X220 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 220, - Name: "testdata.x220", - Tag: "bytes,220,opt,name=x220", - Filename: "test.proto", -} - -var E_X221 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 221, - Name: "testdata.x221", - Tag: "bytes,221,opt,name=x221", - Filename: "test.proto", -} - -var E_X222 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 222, - Name: "testdata.x222", - Tag: "bytes,222,opt,name=x222", - Filename: "test.proto", -} - -var E_X223 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 223, - Name: "testdata.x223", - Tag: "bytes,223,opt,name=x223", - Filename: "test.proto", -} - -var E_X224 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 224, - Name: "testdata.x224", - Tag: "bytes,224,opt,name=x224", - Filename: "test.proto", -} - -var E_X225 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 225, - Name: "testdata.x225", - Tag: "bytes,225,opt,name=x225", - Filename: "test.proto", -} - -var E_X226 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 226, - Name: "testdata.x226", - Tag: "bytes,226,opt,name=x226", - Filename: "test.proto", -} - -var E_X227 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 227, - Name: "testdata.x227", - Tag: "bytes,227,opt,name=x227", - Filename: "test.proto", -} - -var E_X228 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 228, - Name: "testdata.x228", - Tag: "bytes,228,opt,name=x228", - Filename: "test.proto", -} - -var E_X229 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 229, - Name: "testdata.x229", - Tag: "bytes,229,opt,name=x229", - Filename: "test.proto", -} - -var E_X230 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 230, - Name: "testdata.x230", - Tag: "bytes,230,opt,name=x230", - Filename: "test.proto", -} - -var E_X231 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 231, - Name: "testdata.x231", - Tag: "bytes,231,opt,name=x231", - Filename: "test.proto", -} - -var E_X232 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 232, - Name: "testdata.x232", - Tag: "bytes,232,opt,name=x232", - Filename: "test.proto", -} - -var E_X233 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 233, - Name: "testdata.x233", - Tag: "bytes,233,opt,name=x233", - Filename: "test.proto", -} - -var E_X234 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 234, - Name: "testdata.x234", - Tag: "bytes,234,opt,name=x234", - Filename: "test.proto", -} - -var E_X235 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 235, - Name: "testdata.x235", - Tag: "bytes,235,opt,name=x235", - Filename: "test.proto", -} - -var E_X236 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 236, - Name: "testdata.x236", - Tag: "bytes,236,opt,name=x236", - Filename: "test.proto", -} - -var E_X237 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 237, - Name: "testdata.x237", - Tag: "bytes,237,opt,name=x237", - Filename: "test.proto", -} - -var E_X238 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 238, - Name: "testdata.x238", - Tag: "bytes,238,opt,name=x238", - Filename: "test.proto", -} - -var E_X239 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 239, - Name: "testdata.x239", - Tag: "bytes,239,opt,name=x239", - Filename: "test.proto", -} - -var E_X240 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 240, - Name: "testdata.x240", - Tag: "bytes,240,opt,name=x240", - Filename: "test.proto", -} - -var E_X241 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 241, - Name: "testdata.x241", - Tag: "bytes,241,opt,name=x241", - Filename: "test.proto", -} - -var E_X242 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 242, - Name: "testdata.x242", - Tag: "bytes,242,opt,name=x242", - Filename: "test.proto", -} - -var E_X243 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 243, - Name: "testdata.x243", - Tag: "bytes,243,opt,name=x243", - Filename: "test.proto", -} - -var E_X244 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 244, - Name: "testdata.x244", - Tag: "bytes,244,opt,name=x244", - Filename: "test.proto", -} - -var E_X245 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 245, - Name: "testdata.x245", - Tag: "bytes,245,opt,name=x245", - Filename: "test.proto", -} - -var E_X246 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 246, - Name: "testdata.x246", - Tag: "bytes,246,opt,name=x246", - Filename: "test.proto", -} - -var E_X247 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 247, - Name: "testdata.x247", - Tag: "bytes,247,opt,name=x247", - Filename: "test.proto", -} - -var E_X248 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 248, - Name: "testdata.x248", - Tag: "bytes,248,opt,name=x248", - Filename: "test.proto", -} - -var E_X249 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 249, - Name: "testdata.x249", - Tag: "bytes,249,opt,name=x249", - Filename: "test.proto", -} - -var E_X250 = &proto.ExtensionDesc{ - ExtendedType: (*MyMessageSet)(nil), - ExtensionType: (*Empty)(nil), - Field: 250, - Name: "testdata.x250", - Tag: "bytes,250,opt,name=x250", - Filename: "test.proto", -} - -func init() { - proto.RegisterType((*GoEnum)(nil), "testdata.GoEnum") - proto.RegisterType((*GoTestField)(nil), "testdata.GoTestField") - proto.RegisterType((*GoTest)(nil), "testdata.GoTest") - proto.RegisterType((*GoTest_RequiredGroup)(nil), "testdata.GoTest.RequiredGroup") - proto.RegisterType((*GoTest_RepeatedGroup)(nil), "testdata.GoTest.RepeatedGroup") - proto.RegisterType((*GoTest_OptionalGroup)(nil), "testdata.GoTest.OptionalGroup") - proto.RegisterType((*GoTestRequiredGroupField)(nil), "testdata.GoTestRequiredGroupField") - proto.RegisterType((*GoTestRequiredGroupField_Group)(nil), "testdata.GoTestRequiredGroupField.Group") - proto.RegisterType((*GoSkipTest)(nil), "testdata.GoSkipTest") - proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "testdata.GoSkipTest.SkipGroup") - proto.RegisterType((*NonPackedTest)(nil), "testdata.NonPackedTest") - proto.RegisterType((*PackedTest)(nil), "testdata.PackedTest") - proto.RegisterType((*MaxTag)(nil), "testdata.MaxTag") - proto.RegisterType((*OldMessage)(nil), "testdata.OldMessage") - proto.RegisterType((*OldMessage_Nested)(nil), "testdata.OldMessage.Nested") - proto.RegisterType((*NewMessage)(nil), "testdata.NewMessage") - proto.RegisterType((*NewMessage_Nested)(nil), "testdata.NewMessage.Nested") - proto.RegisterType((*InnerMessage)(nil), "testdata.InnerMessage") - proto.RegisterType((*OtherMessage)(nil), "testdata.OtherMessage") - proto.RegisterType((*RequiredInnerMessage)(nil), "testdata.RequiredInnerMessage") - proto.RegisterType((*MyMessage)(nil), "testdata.MyMessage") - proto.RegisterType((*MyMessage_SomeGroup)(nil), "testdata.MyMessage.SomeGroup") - proto.RegisterType((*Ext)(nil), "testdata.Ext") - proto.RegisterType((*ComplexExtension)(nil), "testdata.ComplexExtension") - proto.RegisterType((*DefaultsMessage)(nil), "testdata.DefaultsMessage") - proto.RegisterType((*MyMessageSet)(nil), "testdata.MyMessageSet") - proto.RegisterType((*Empty)(nil), "testdata.Empty") - proto.RegisterType((*MessageList)(nil), "testdata.MessageList") - proto.RegisterType((*MessageList_Message)(nil), "testdata.MessageList.Message") - proto.RegisterType((*Strings)(nil), "testdata.Strings") - proto.RegisterType((*Defaults)(nil), "testdata.Defaults") - proto.RegisterType((*SubDefaults)(nil), "testdata.SubDefaults") - proto.RegisterType((*RepeatedEnum)(nil), "testdata.RepeatedEnum") - proto.RegisterType((*MoreRepeated)(nil), "testdata.MoreRepeated") - proto.RegisterType((*GroupOld)(nil), "testdata.GroupOld") - proto.RegisterType((*GroupOld_G)(nil), "testdata.GroupOld.G") - proto.RegisterType((*GroupNew)(nil), "testdata.GroupNew") - proto.RegisterType((*GroupNew_G)(nil), "testdata.GroupNew.G") - proto.RegisterType((*FloatingPoint)(nil), "testdata.FloatingPoint") - proto.RegisterType((*MessageWithMap)(nil), "testdata.MessageWithMap") - proto.RegisterType((*Oneof)(nil), "testdata.Oneof") - proto.RegisterType((*Oneof_F_Group)(nil), "testdata.Oneof.F_Group") - proto.RegisterType((*Communique)(nil), "testdata.Communique") - proto.RegisterEnum("testdata.FOO", FOO_name, FOO_value) - proto.RegisterEnum("testdata.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) - proto.RegisterEnum("testdata.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) - proto.RegisterEnum("testdata.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) - proto.RegisterEnum("testdata.Defaults_Color", Defaults_Color_name, Defaults_Color_value) - proto.RegisterEnum("testdata.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) - proto.RegisterExtension(E_Ext_More) - proto.RegisterExtension(E_Ext_Text) - proto.RegisterExtension(E_Ext_Number) - proto.RegisterExtension(E_Greeting) - proto.RegisterExtension(E_Complex) - proto.RegisterExtension(E_RComplex) - proto.RegisterExtension(E_NoDefaultDouble) - proto.RegisterExtension(E_NoDefaultFloat) - proto.RegisterExtension(E_NoDefaultInt32) - proto.RegisterExtension(E_NoDefaultInt64) - proto.RegisterExtension(E_NoDefaultUint32) - proto.RegisterExtension(E_NoDefaultUint64) - proto.RegisterExtension(E_NoDefaultSint32) - proto.RegisterExtension(E_NoDefaultSint64) - proto.RegisterExtension(E_NoDefaultFixed32) - proto.RegisterExtension(E_NoDefaultFixed64) - proto.RegisterExtension(E_NoDefaultSfixed32) - proto.RegisterExtension(E_NoDefaultSfixed64) - proto.RegisterExtension(E_NoDefaultBool) - proto.RegisterExtension(E_NoDefaultString) - proto.RegisterExtension(E_NoDefaultBytes) - proto.RegisterExtension(E_NoDefaultEnum) - proto.RegisterExtension(E_DefaultDouble) - proto.RegisterExtension(E_DefaultFloat) - proto.RegisterExtension(E_DefaultInt32) - proto.RegisterExtension(E_DefaultInt64) - proto.RegisterExtension(E_DefaultUint32) - proto.RegisterExtension(E_DefaultUint64) - proto.RegisterExtension(E_DefaultSint32) - proto.RegisterExtension(E_DefaultSint64) - proto.RegisterExtension(E_DefaultFixed32) - proto.RegisterExtension(E_DefaultFixed64) - proto.RegisterExtension(E_DefaultSfixed32) - proto.RegisterExtension(E_DefaultSfixed64) - proto.RegisterExtension(E_DefaultBool) - proto.RegisterExtension(E_DefaultString) - proto.RegisterExtension(E_DefaultBytes) - proto.RegisterExtension(E_DefaultEnum) - proto.RegisterExtension(E_X201) - proto.RegisterExtension(E_X202) - proto.RegisterExtension(E_X203) - proto.RegisterExtension(E_X204) - proto.RegisterExtension(E_X205) - proto.RegisterExtension(E_X206) - proto.RegisterExtension(E_X207) - proto.RegisterExtension(E_X208) - proto.RegisterExtension(E_X209) - proto.RegisterExtension(E_X210) - proto.RegisterExtension(E_X211) - proto.RegisterExtension(E_X212) - proto.RegisterExtension(E_X213) - proto.RegisterExtension(E_X214) - proto.RegisterExtension(E_X215) - proto.RegisterExtension(E_X216) - proto.RegisterExtension(E_X217) - proto.RegisterExtension(E_X218) - proto.RegisterExtension(E_X219) - proto.RegisterExtension(E_X220) - proto.RegisterExtension(E_X221) - proto.RegisterExtension(E_X222) - proto.RegisterExtension(E_X223) - proto.RegisterExtension(E_X224) - proto.RegisterExtension(E_X225) - proto.RegisterExtension(E_X226) - proto.RegisterExtension(E_X227) - proto.RegisterExtension(E_X228) - proto.RegisterExtension(E_X229) - proto.RegisterExtension(E_X230) - proto.RegisterExtension(E_X231) - proto.RegisterExtension(E_X232) - proto.RegisterExtension(E_X233) - proto.RegisterExtension(E_X234) - proto.RegisterExtension(E_X235) - proto.RegisterExtension(E_X236) - proto.RegisterExtension(E_X237) - proto.RegisterExtension(E_X238) - proto.RegisterExtension(E_X239) - proto.RegisterExtension(E_X240) - proto.RegisterExtension(E_X241) - proto.RegisterExtension(E_X242) - proto.RegisterExtension(E_X243) - proto.RegisterExtension(E_X244) - proto.RegisterExtension(E_X245) - proto.RegisterExtension(E_X246) - proto.RegisterExtension(E_X247) - proto.RegisterExtension(E_X248) - proto.RegisterExtension(E_X249) - proto.RegisterExtension(E_X250) -} - -func init() { proto.RegisterFile("test.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 4453 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0xc9, 0x77, 0xdb, 0x48, - 0x7a, 0x37, 0xc0, 0xfd, 0x23, 0x25,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x7e, 0xb7, 0x1f, 0x1c, 0x70, 0x51, 0x95, 0x2b, 0x73, 0x46, 0xb1, - 0xc9, 0xea, 0xa7, 0xb1, 0xa2, 0x61, 0x45, 0x95, 0x2b, 0x49, 0x8e, 0x15, 0xec, 0xe2, 0xec, 0x9a, - 0x03, 0xbb, 0xe3, 0xf8, 0xd0, 0x05, 0x55, 0xae, 0xc8, 0xc6, 0x7c, 0x13, 0xab, 0x83, 0x56, 0x1f, - 0xdb, 0x47, 0xfb, 0x03, 0xd3, 0x87, 0x12, 0x55, 0xae, 0x48, 0x46, 0xb1, 0xc9, 0xea, 0x83, 0xd8, - 0x5d, 0x67, 0xdc, 0xb7, 0x7a, 0x3e, 0xf6, 0x3c, 0xea, 0xb7, 0xd8, 0x64, 0xf5, 0xc1, 0x11, 0x3c, - 0x3c, 0x71, 0xcc, 0x89, 0x0f, 0x35, 0x55, 0xb9, 0x52, 0x30, 0xe6, 0x9b, 0x58, 0x1d, 0xb2, 0x1a, - 0x5a, 0x83, 0x43, 0x55, 0xae, 0x2c, 0x50, 0xab, 0x33, 0xd6, 0x60, 0x37, 0xb4, 0x06, 0x3d, 0x55, - 0xae, 0x10, 0x8e, 0x15, 0xd6, 0x40, 0xd4, 0x0c, 0x13, 0x62, 0x69, 0x51, 0x4d, 0x08, 0x9a, 0x61, - 0x95, 0x41, 0xcd, 0x70, 0xe0, 0x6b, 0x6a, 0x42, 0xd4, 0x4c, 0x08, 0x89, 0x9d, 0x73, 0xe4, 0x05, - 0x35, 0x21, 0x6a, 0x86, 0x23, 0x43, 0x9a, 0xe1, 0xd8, 0xd7, 0xd5, 0x44, 0x50, 0x33, 0x53, 0x68, - 0xd1, 0x72, 0x49, 0x4d, 0x04, 0x35, 0xc3, 0xd1, 0x41, 0xcd, 0x70, 0xf0, 0x45, 0x35, 0x11, 0xd0, - 0x4c, 0x18, 0x2b, 0x1a, 0x5e, 0x52, 0x13, 0x01, 0xcd, 0x88, 0xb3, 0x73, 0x35, 0xc3, 0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fa, 0xb6, 0x45, 0xf5, 0x7c, 0xd8, 0x1f, 0xa3, 0x17, 0xc1, 0xb7, - 0x62, 0x2c, 0xd0, 0x53, 0x3d, 0x31, 0x0f, 0x6c, 0xab, 0xcb, 0x1d, 0x26, 0x2f, 0x51, 0xb4, 0xf3, - 0xac, 0x3f, 0xa6, 0x0e, 0x84, 0xfa, 0x79, 0x56, 0x28, 0x6f, 0x40, 0x91, 0xe7, 0x18, 0x13, 0xde, - 0x71, 0xf9, 0x06, 0x14, 0xdc, 0x2a, 0x7c, 0x38, 0xcf, 0x42, 0xf2, 0x83, 0x86, 0xd1, 0x52, 0xce, - 0xd1, 0x65, 0x6d, 0x6d, 0x37, 0x14, 0x89, 0xfe, 0xd8, 0x7b, 0xbf, 0x15, 0x58, 0xca, 0x4b, 0x50, - 0xf0, 0xc6, 0xbe, 0x6b, 0x3a, 0xd8, 0x42, 0x03, 0x42, 0xa6, 0x2e, 0x67, 0xa5, 0x72, 0x06, 0x52, - 0x8d, 0xe1, 0xc8, 0x39, 0x29, 0xff, 0x22, 0xe4, 0x39, 0xe8, 0x69, 0x7f, 0xe2, 0x90, 0x3b, 0x90, - 0x19, 0xf2, 0xf9, 0x4a, 0x78, 0xdd, 0x13, 0x35, 0xe5, 0xe3, 0xdc, 0xdf, 0x86, 0x8b, 0x5e, 0xaa, - 0x42, 0x46, 0xf0, 0xa5, 0xfc, 0xa8, 0xcb, 0xe2, 0x51, 0x67, 0x4e, 0x21, 0x21, 0x38, 0x85, 0xf2, - 0x16, 0x64, 0x58, 0x04, 0x9c, 0x60, 0x54, 0x67, 0xa9, 0x22, 0x13, 0x13, 0xdb, 0xf9, 0x3c, 0xab, - 0x63, 0x17, 0x95, 0xab, 0x90, 0x47, 0xc1, 0x72, 0x04, 0x73, 0x9d, 0x80, 0x55, 0x4c, 0x6e, 0xbf, - 0x9f, 0x82, 0xac, 0xbb, 0x52, 0x64, 0x19, 0xd2, 0x2c, 0x3f, 0x43, 0x53, 0xee, 0xfb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0xd6, 0xfe, 0x27, 0x86, 0xcd, 0xb5, 0xa6, 0x47, 0x6b, 0xed, - 0xc7, 0x31, 0x6c, 0xae, 0x35, 0x3d, 0x5a, 0x6b, 0x3f, 0x89, 0x61, 0x73, 0xad, 0xe9, 0xd1, 0x5a, - 0xfb, 0xdf, 0x18, 0x36, 0xd7, 0x9a, 0x1e, 0xad, 0xb5, 0xff, 0x8b, 0x61, 0x73, 0xad, 0xad, 0x47, - 0x6b, 0xed, 0xff, 0xa3, 0xd9, 0xeb, 0xab, 0x3f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x00, 0xcd, - 0x32, 0x57, 0x39, 0x00, 0x00, -} diff --git a/deps/github.com/golang/protobuf/proto/testdata/test.proto b/deps/github.com/golang/protobuf/proto/testdata/test.proto deleted file mode 100644 index 70e3cfcda..000000000 --- a/deps/github.com/golang/protobuf/proto/testdata/test.proto +++ /dev/null @@ -1,548 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// A feature-rich test file for the protocol compiler and libraries. - -syntax = "proto2"; - -package testdata; - -enum FOO { FOO1 = 1; }; - -message GoEnum { - required FOO foo = 1; -} - -message GoTestField { - required string Label = 1; - required string Type = 2; -} - -message GoTest { - // An enum, for completeness. - enum KIND { - VOID = 0; - - // Basic types - BOOL = 1; - BYTES = 2; - FINGERPRINT = 3; - FLOAT = 4; - INT = 5; - STRING = 6; - TIME = 7; - - // Groupings - TUPLE = 8; - ARRAY = 9; - MAP = 10; - - // Table types - TABLE = 11; - - // Functions - FUNCTION = 12; // last tag - }; - - // Some typical parameters - required KIND Kind = 1; - optional string Table = 2; - optional int32 Param = 3; - - // Required, repeated and optional foreign fields. - required GoTestField RequiredField = 4; - repeated GoTestField RepeatedField = 5; - optional GoTestField OptionalField = 6; - - // Required fields of all basic types - required bool F_Bool_required = 10; - required int32 F_Int32_required = 11; - required int64 F_Int64_required = 12; - required fixed32 F_Fixed32_required = 13; - required fixed64 F_Fixed64_required = 14; - required uint32 F_Uint32_required = 15; - required uint64 F_Uint64_required = 16; - required float F_Float_required = 17; - required double F_Double_required = 18; - required string F_String_required = 19; - required bytes F_Bytes_required = 101; - required sint32 F_Sint32_required = 102; - required sint64 F_Sint64_required = 103; - - // Repeated fields of all basic types - repeated bool F_Bool_repeated = 20; - repeated int32 F_Int32_repeated = 21; - repeated int64 F_Int64_repeated = 22; - repeated fixed32 F_Fixed32_repeated = 23; - repeated fixed64 F_Fixed64_repeated = 24; - repeated uint32 F_Uint32_repeated = 25; - repeated uint64 F_Uint64_repeated = 26; - repeated float F_Float_repeated = 27; - repeated double F_Double_repeated = 28; - repeated string F_String_repeated = 29; - repeated bytes F_Bytes_repeated = 201; - repeated sint32 F_Sint32_repeated = 202; - repeated sint64 F_Sint64_repeated = 203; - - // Optional fields of all basic types - optional bool F_Bool_optional = 30; - optional int32 F_Int32_optional = 31; - optional int64 F_Int64_optional = 32; - optional fixed32 F_Fixed32_optional = 33; - optional fixed64 F_Fixed64_optional = 34; - optional uint32 F_Uint32_optional = 35; - optional uint64 F_Uint64_optional = 36; - optional float F_Float_optional = 37; - optional double F_Double_optional = 38; - optional string F_String_optional = 39; - optional bytes F_Bytes_optional = 301; - optional sint32 F_Sint32_optional = 302; - optional sint64 F_Sint64_optional = 303; - - // Default-valued fields of all basic types - optional bool F_Bool_defaulted = 40 [default=true]; - optional int32 F_Int32_defaulted = 41 [default=32]; - optional int64 F_Int64_defaulted = 42 [default=64]; - optional fixed32 F_Fixed32_defaulted = 43 [default=320]; - optional fixed64 F_Fixed64_defaulted = 44 [default=640]; - optional uint32 F_Uint32_defaulted = 45 [default=3200]; - optional uint64 F_Uint64_defaulted = 46 [default=6400]; - optional float F_Float_defaulted = 47 [default=314159.]; - optional double F_Double_defaulted = 48 [default=271828.]; - optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; - optional sint32 F_Sint32_defaulted = 402 [default = -32]; - optional sint64 F_Sint64_defaulted = 403 [default = -64]; - - // Packed repeated fields (no string or bytes). - repeated bool F_Bool_repeated_packed = 50 [packed=true]; - repeated int32 F_Int32_repeated_packed = 51 [packed=true]; - repeated int64 F_Int64_repeated_packed = 52 [packed=true]; - repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; - repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; - repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; - repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; - repeated float F_Float_repeated_packed = 57 [packed=true]; - repeated double F_Double_repeated_packed = 58 [packed=true]; - repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; - repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; - - // Required, repeated, and optional groups. - required group RequiredGroup = 70 { - required string RequiredField = 71; - }; - - repeated group RepeatedGroup = 80 { - required string RequiredField = 81; - }; - - optional group OptionalGroup = 90 { - required string RequiredField = 91; - }; -} - -// For testing a group containing a required field. -message GoTestRequiredGroupField { - required group Group = 1 { - required int32 Field = 2; - }; -} - -// For testing skipping of unrecognized fields. -// Numbers are all big, larger than tag numbers in GoTestField, -// the message used in the corresponding test. -message GoSkipTest { - required int32 skip_int32 = 11; - required fixed32 skip_fixed32 = 12; - required fixed64 skip_fixed64 = 13; - required string skip_string = 14; - required group SkipGroup = 15 { - required int32 group_int32 = 16; - required string group_string = 17; - } -} - -// For testing packed/non-packed decoder switching. -// A serialized instance of one should be deserializable as the other. -message NonPackedTest { - repeated int32 a = 1; -} - -message PackedTest { - repeated int32 b = 1 [packed=true]; -} - -message MaxTag { - // Maximum possible tag number. - optional string last_field = 536870911; -} - -message OldMessage { - message Nested { - optional string name = 1; - } - optional Nested nested = 1; - - optional int32 num = 2; -} - -// NewMessage is wire compatible with OldMessage; -// imagine it as a future version. -message NewMessage { - message Nested { - optional string name = 1; - optional string food_group = 2; - } - optional Nested nested = 1; - - // This is an int32 in OldMessage. - optional int64 num = 2; -} - -// Smaller tests for ASCII formatting. - -message InnerMessage { - required string host = 1; - optional int32 port = 2 [default=4000]; - optional bool connected = 3; -} - -message OtherMessage { - optional int64 key = 1; - optional bytes value = 2; - optional float weight = 3; - optional InnerMessage inner = 4; - - extensions 100 to max; -} - -message RequiredInnerMessage { - required InnerMessage leo_finally_won_an_oscar = 1; -} - -message MyMessage { - required int32 count = 1; - optional string name = 2; - optional string quote = 3; - repeated string pet = 4; - optional InnerMessage inner = 5; - repeated OtherMessage others = 6; - optional RequiredInnerMessage we_must_go_deeper = 13; - repeated InnerMessage rep_inner = 12; - - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - }; - optional Color bikeshed = 7; - - optional group SomeGroup = 8 { - optional int32 group_field = 9; - } - - // This field becomes [][]byte in the generated code. - repeated bytes rep_bytes = 10; - - optional double bigfloat = 11; - - extensions 100 to max; -} - -message Ext { - extend MyMessage { - optional Ext more = 103; - optional string text = 104; - optional int32 number = 105; - } - - optional string data = 1; -} - -extend MyMessage { - repeated string greeting = 106; -} - -message ComplexExtension { - optional int32 first = 1; - optional int32 second = 2; - repeated int32 third = 3; -} - -extend OtherMessage { - optional ComplexExtension complex = 200; - repeated ComplexExtension r_complex = 201; -} - -message DefaultsMessage { - enum DefaultsEnum { - ZERO = 0; - ONE = 1; - TWO = 2; - }; - extensions 100 to max; -} - -extend DefaultsMessage { - optional double no_default_double = 101; - optional float no_default_float = 102; - optional int32 no_default_int32 = 103; - optional int64 no_default_int64 = 104; - optional uint32 no_default_uint32 = 105; - optional uint64 no_default_uint64 = 106; - optional sint32 no_default_sint32 = 107; - optional sint64 no_default_sint64 = 108; - optional fixed32 no_default_fixed32 = 109; - optional fixed64 no_default_fixed64 = 110; - optional sfixed32 no_default_sfixed32 = 111; - optional sfixed64 no_default_sfixed64 = 112; - optional bool no_default_bool = 113; - optional string no_default_string = 114; - optional bytes no_default_bytes = 115; - optional DefaultsMessage.DefaultsEnum no_default_enum = 116; - - optional double default_double = 201 [default = 3.1415]; - optional float default_float = 202 [default = 3.14]; - optional int32 default_int32 = 203 [default = 42]; - optional int64 default_int64 = 204 [default = 43]; - optional uint32 default_uint32 = 205 [default = 44]; - optional uint64 default_uint64 = 206 [default = 45]; - optional sint32 default_sint32 = 207 [default = 46]; - optional sint64 default_sint64 = 208 [default = 47]; - optional fixed32 default_fixed32 = 209 [default = 48]; - optional fixed64 default_fixed64 = 210 [default = 49]; - optional sfixed32 default_sfixed32 = 211 [default = 50]; - optional sfixed64 default_sfixed64 = 212 [default = 51]; - optional bool default_bool = 213 [default = true]; - optional string default_string = 214 [default = "Hello, string"]; - optional bytes default_bytes = 215 [default = "Hello, bytes"]; - optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; -} - -message MyMessageSet { - option message_set_wire_format = true; - extensions 100 to max; -} - -message Empty { -} - -extend MyMessageSet { - optional Empty x201 = 201; - optional Empty x202 = 202; - optional Empty x203 = 203; - optional Empty x204 = 204; - optional Empty x205 = 205; - optional Empty x206 = 206; - optional Empty x207 = 207; - optional Empty x208 = 208; - optional Empty x209 = 209; - optional Empty x210 = 210; - optional Empty x211 = 211; - optional Empty x212 = 212; - optional Empty x213 = 213; - optional Empty x214 = 214; - optional Empty x215 = 215; - optional Empty x216 = 216; - optional Empty x217 = 217; - optional Empty x218 = 218; - optional Empty x219 = 219; - optional Empty x220 = 220; - optional Empty x221 = 221; - optional Empty x222 = 222; - optional Empty x223 = 223; - optional Empty x224 = 224; - optional Empty x225 = 225; - optional Empty x226 = 226; - optional Empty x227 = 227; - optional Empty x228 = 228; - optional Empty x229 = 229; - optional Empty x230 = 230; - optional Empty x231 = 231; - optional Empty x232 = 232; - optional Empty x233 = 233; - optional Empty x234 = 234; - optional Empty x235 = 235; - optional Empty x236 = 236; - optional Empty x237 = 237; - optional Empty x238 = 238; - optional Empty x239 = 239; - optional Empty x240 = 240; - optional Empty x241 = 241; - optional Empty x242 = 242; - optional Empty x243 = 243; - optional Empty x244 = 244; - optional Empty x245 = 245; - optional Empty x246 = 246; - optional Empty x247 = 247; - optional Empty x248 = 248; - optional Empty x249 = 249; - optional Empty x250 = 250; -} - -message MessageList { - repeated group Message = 1 { - required string name = 2; - required int32 count = 3; - } -} - -message Strings { - optional string string_field = 1; - optional bytes bytes_field = 2; -} - -message Defaults { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - } - - // Default-valued fields of all basic types. - // Same as GoTest, but copied here to make testing easier. - optional bool F_Bool = 1 [default=true]; - optional int32 F_Int32 = 2 [default=32]; - optional int64 F_Int64 = 3 [default=64]; - optional fixed32 F_Fixed32 = 4 [default=320]; - optional fixed64 F_Fixed64 = 5 [default=640]; - optional uint32 F_Uint32 = 6 [default=3200]; - optional uint64 F_Uint64 = 7 [default=6400]; - optional float F_Float = 8 [default=314159.]; - optional double F_Double = 9 [default=271828.]; - optional string F_String = 10 [default="hello, \"world!\"\n"]; - optional bytes F_Bytes = 11 [default="Bignose"]; - optional sint32 F_Sint32 = 12 [default=-32]; - optional sint64 F_Sint64 = 13 [default=-64]; - optional Color F_Enum = 14 [default=GREEN]; - - // More fields with crazy defaults. - optional float F_Pinf = 15 [default=inf]; - optional float F_Ninf = 16 [default=-inf]; - optional float F_Nan = 17 [default=nan]; - - // Sub-message. - optional SubDefaults sub = 18; - - // Redundant but explicit defaults. - optional string str_zero = 19 [default=""]; -} - -message SubDefaults { - optional int64 n = 1 [default=7]; -} - -message RepeatedEnum { - enum Color { - RED = 1; - } - repeated Color color = 1; -} - -message MoreRepeated { - repeated bool bools = 1; - repeated bool bools_packed = 2 [packed=true]; - repeated int32 ints = 3; - repeated int32 ints_packed = 4 [packed=true]; - repeated int64 int64s_packed = 7 [packed=true]; - repeated string strings = 5; - repeated fixed32 fixeds = 6; -} - -// GroupOld and GroupNew have the same wire format. -// GroupNew has a new field inside a group. - -message GroupOld { - optional group G = 101 { - optional int32 x = 2; - } -} - -message GroupNew { - optional group G = 101 { - optional int32 x = 2; - optional int32 y = 3; - } -} - -message FloatingPoint { - required double f = 1; - optional bool exact = 2; -} - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; - map str_to_str = 4; -} - -message Oneof { - oneof union { - bool F_Bool = 1; - int32 F_Int32 = 2; - int64 F_Int64 = 3; - fixed32 F_Fixed32 = 4; - fixed64 F_Fixed64 = 5; - uint32 F_Uint32 = 6; - uint64 F_Uint64 = 7; - float F_Float = 8; - double F_Double = 9; - string F_String = 10; - bytes F_Bytes = 11; - sint32 F_Sint32 = 12; - sint64 F_Sint64 = 13; - MyMessage.Color F_Enum = 14; - GoTestField F_Message = 15; - group F_Group = 16 { - optional int32 x = 17; - } - int32 F_Largest_Tag = 536870911; - } - - oneof tormato { - int32 value = 100; - } -} - -message Communique { - optional bool make_me_cry = 1; - - // This is a oneof, called "union". - oneof union { - int32 number = 5; - string name = 6; - bytes data = 7; - double temp_c = 8; - MyMessage.Color col = 9; - Strings msg = 10; - } -} diff --git a/deps/github.com/golang/protobuf/proto/text.go b/deps/github.com/golang/protobuf/proto/text.go index 2205fdaad..1aaee725b 100644 --- a/deps/github.com/golang/protobuf/proto/text.go +++ b/deps/github.com/golang/protobuf/proto/text.go @@ -353,7 +353,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { @@ -370,7 +370,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { return err } } - if err := tm.writeAny(w, val, props.mvalprop); err != nil { + if err := tm.writeAny(w, val, props.MapValProp); err != nil { return err } if err := w.WriteByte('\n'); err != nil { diff --git a/deps/github.com/golang/protobuf/proto/text_parser.go b/deps/github.com/golang/protobuf/proto/text_parser.go index 0685bae36..bb55a3af2 100644 --- a/deps/github.com/golang/protobuf/proto/text_parser.go +++ b/deps/github.com/golang/protobuf/proto/text_parser.go @@ -630,17 +630,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error { if err := p.consumeToken(":"); err != nil { return err } - if err := p.readAny(key, props.mkeyprop); err != nil { + if err := p.readAny(key, props.MapKeyProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { return err } case "value": - if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { return err } - if err := p.readAny(val, props.mvalprop); err != nil { + if err := p.readAny(val, props.MapValProp); err != nil { return err } if err := p.consumeOptionalSeparator(); err != nil { diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/Makefile b/deps/github.com/golang/protobuf/protoc-gen-go/Makefile deleted file mode 100644 index a42cc3717..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -test: - cd testdata && make test diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile b/deps/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile deleted file mode 100644 index f706871a6..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/descriptor/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Not stored here, but descriptor.proto is in https://github.com/google/protobuf/ -# at src/google/protobuf/descriptor.proto -regenerate: - @echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION - cp $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto . - protoc --go_out=../../../../.. -I$(HOME)/src/protobuf/include $(HOME)/src/protobuf/include/google/protobuf/descriptor.proto diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/generator/Makefile b/deps/github.com/golang/protobuf/protoc-gen-go/generator/Makefile deleted file mode 100644 index b5715c357..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/generator/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -include $(GOROOT)/src/Make.inc - -TARG=github.com/golang/protobuf/compiler/generator -GOFILES=\ - generator.go\ - -DEPS=../descriptor ../plugin ../../proto - -include $(GOROOT)/src/Make.pkg diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/generator/generator.go b/deps/github.com/golang/protobuf/protoc-gen-go/generator/generator.go index a2e0a5fa5..c13a9f1e6 100644 --- a/deps/github.com/golang/protobuf/protoc-gen-go/generator/generator.go +++ b/deps/github.com/golang/protobuf/protoc-gen-go/generator/generator.go @@ -1261,16 +1261,28 @@ func (g *Generator) PrintComments(path string) bool { if !g.writeOutput { return false } - if loc, ok := g.file.comments[path]; ok { - text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") - for _, line := range strings.Split(text, "\n") { - g.P("// ", strings.TrimPrefix(line, " ")) - } + if c, ok := g.makeComments(path); ok { + g.P(c) return true } return false } +// makeComments generates the comment string for the field, no "\n" at the end +func (g *Generator) makeComments(path string) (string, bool) { + loc, ok := g.file.comments[path] + if !ok { + return "", false + } + w := new(bytes.Buffer) + nl := "" + for _, line := range strings.Split(strings.TrimSuffix(loc.GetLeadingComments(), "\n"), "\n") { + fmt.Fprintf(w, "%s// %s", nl, strings.TrimPrefix(line, " ")) + nl = "\n" + } + return w.String(), true +} + func (g *Generator) fileByName(filename string) *FileDescriptor { return g.allFilesByName[filename] } @@ -1384,7 +1396,6 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { g.P("type ", Annotate(enum.file, enum.path, ccTypeName), " int32", deprecatedEnum) g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) g.P("const (") - g.In() for i, e := range enum.Value { etorPath := fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i) g.PrintComments(etorPath) @@ -1398,10 +1409,8 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { g.P(Annotate(enum.file, etorPath, name), " ", ccTypeName, " = ", e.Number, " ", deprecatedValue) g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) } - g.Out() g.P(")") g.P("var ", ccTypeName, "_name = map[int32]string{") - g.In() generated := make(map[int32]bool) // avoid duplicate values for _, e := range enum.Value { duplicate := "" @@ -1411,44 +1420,33 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",") generated[*e.Number] = true } - g.Out() g.P("}") g.P("var ", ccTypeName, "_value = map[string]int32{") - g.In() for _, e := range enum.Value { g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") } - g.Out() g.P("}") if !enum.proto3() { g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") - g.In() g.P("p := new(", ccTypeName, ")") g.P("*p = x") g.P("return p") - g.Out() g.P("}") } g.P("func (x ", ccTypeName, ") String() string {") - g.In() g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") - g.Out() g.P("}") if !enum.proto3() { g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") - g.In() g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`) g.P("if err != nil {") - g.In() g.P("return err") - g.Out() g.P("}") g.P("*x = ", ccTypeName, "(value)") g.P("return nil") - g.Out() g.P("}") } @@ -1459,9 +1457,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) { } indexes = append(indexes, strconv.Itoa(enum.index)) g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) {") - g.In() g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") - g.Out() g.P("}") if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" { g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`) @@ -1708,334 +1704,505 @@ var wellKnownTypes = map[string]bool{ "BytesValue": true, } -// Generate the type and default constant definitions for this Descriptor. -func (g *Generator) generateMessage(message *Descriptor) { - // The full type name - typeName := message.TypeName() - // The full type name, CamelCased. - ccTypeName := CamelCaseSlice(typeName) - - usedNames := make(map[string]bool) - for _, n := range methodNames { - usedNames[n] = true +// getterDefault finds the default value for the field to return from a getter, +// regardless of if it's a built in default or explicit from the source. Returns e.g. "nil", `""`, "Default_MessageType_FieldName" +func (g *Generator) getterDefault(field *descriptor.FieldDescriptorProto, goMessageType string) string { + if isRepeated(field) { + return "nil" } - fieldNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string) - fieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) - - oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto - oneofDisc := make(map[int32]string) // name of discriminator method - oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star - oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer - - comments := g.PrintComments(message.path) - - // Guarantee deprecation comments appear after user-provided comments. - if message.GetOptions().GetDeprecated() { - if comments { - // Convention: Separate deprecation comments from original - // comments with an empty line. - g.P("//") + if def := field.GetDefaultValue(); def != "" { + defaultConstant := g.defaultConstantName(goMessageType, field.GetName()) + if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { + return defaultConstant } - g.P(deprecationComment) + return "append([]byte(nil), " + defaultConstant + "...)" } - - g.P("type ", Annotate(message.file, message.path, ccTypeName), " struct {") - g.In() - - // allocNames finds a conflict-free variation of the given strings, - // consistently mutating their suffixes. - // It returns the same number of strings. - allocNames := func(ns ...string) []string { - Loop: - for { - for _, n := range ns { - if usedNames[n] { - for i := range ns { - ns[i] += "_" - } - continue Loop - } - } - for _, n := range ns { - usedNames[n] = true - } - return ns + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + return "false" + case descriptor.FieldDescriptorProto_TYPE_STRING: + return `""` + case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_BYTES: + return "nil" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + obj := g.ObjectNamed(field.GetTypeName()) + var enum *EnumDescriptor + if id, ok := obj.(*ImportedDescriptor); ok { + // The enum type has been publicly imported. + enum, _ = id.o.(*EnumDescriptor) + } else { + enum, _ = obj.(*EnumDescriptor) } - } - - for i, field := range message.Field { - // Allocate the getter and the field at the same time so name - // collisions create field/method consistent names. - // TODO: This allocation occurs based on the order of the fields - // in the proto file, meaning that a change in the field - // ordering can change generated Method/Field names. - base := CamelCase(*field.Name) - ns := allocNames(base, "Get"+base) - fieldName, fieldGetterName := ns[0], ns[1] - typename, wiretype := g.GoType(message, field) - jsonName := *field.Name - tag := fmt.Sprintf("protobuf:%s json:%q", g.goTag(message, field, wiretype), jsonName+",omitempty") - - fieldNames[field] = fieldName - fieldGetterNames[field] = fieldGetterName - - oneof := field.OneofIndex != nil - if oneof && oneofFieldName[*field.OneofIndex] == "" { - odp := message.OneofDecl[int(*field.OneofIndex)] - fname := allocNames(CamelCase(odp.GetName()))[0] - - // This is the first field of a oneof we haven't seen before. - // Generate the union field. - oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex) - com := g.PrintComments(oneofFullPath) - if com { - g.P("//") - } - g.P("// Types that are valid to be assigned to ", fname, ":") - // Generate the rest of this comment later, - // when we've computed any disambiguation. - oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len() - - dname := "is" + ccTypeName + "_" + fname - oneofFieldName[*field.OneofIndex] = fname - oneofDisc[*field.OneofIndex] = dname - tag := `protobuf_oneof:"` + odp.GetName() + `"` - g.P(Annotate(message.file, oneofFullPath, fname), " ", dname, " `", tag, "`") + if enum == nil { + log.Printf("don't know how to generate getter for %s", field.GetName()) + return "nil" + } + if len(enum.Value) == 0 { + return "0 // empty enum" } + first := enum.Value[0].GetName() + return g.DefaultPackageName(obj) + enum.prefix() + first + default: + return "0" + } +} - if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { - desc := g.ObjectNamed(field.GetTypeName()) - if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { - // Figure out the Go types and tags for the key and value types. - keyField, valField := d.Field[0], d.Field[1] - keyType, keyWire := g.GoType(d, keyField) - valType, valWire := g.GoType(d, valField) - keyTag, valTag := g.goTag(d, keyField, keyWire), g.goTag(d, valField, valWire) +// defaultConstantName builds the name of the default constant from the message +// type name and the untouched field name, e.g. "Default_MessageType_FieldName" +func (g *Generator) defaultConstantName(goMessageType, protoFieldName string) string { + return "Default_" + goMessageType + "_" + CamelCase(protoFieldName) +} - // We don't use stars, except for message-typed values. - // Message and enum types are the only two possibly foreign types used in maps, - // so record their use. They are not permitted as map keys. - keyType = strings.TrimPrefix(keyType, "*") - switch *valField.Type { - case descriptor.FieldDescriptorProto_TYPE_ENUM: - valType = strings.TrimPrefix(valType, "*") - g.RecordTypeUse(valField.GetTypeName()) - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - g.RecordTypeUse(valField.GetTypeName()) - default: - valType = strings.TrimPrefix(valType, "*") - } +// The different types of fields in a message and how to actually print them +// Most of the logic for generateMessage is in the methods of these types. +// +// Note that the content of the field is irrelevant, a simpleField can contain +// anything from a scalar to a group (which is just a message). +// +// Extension fields (and message sets) are however handled separately. +// +// simpleField - a field that is neiter weak nor oneof, possibly repeated +// oneofField - field containing list of subfields: +// - oneofSubField - a field within the oneof - typename = fmt.Sprintf("map[%s]%s", keyType, valType) - mapFieldTypes[field] = typename // record for the getter generation +// msgCtx contais the context for the generator functions. +type msgCtx struct { + goName string // Go struct name of the message, e.g. MessageName + message *Descriptor // The descriptor for the message +} - tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", keyTag, valTag) - } - } +// fieldCommon contains data common to all types of fields. +type fieldCommon struct { + goName string // Go name of field, e.g. "FieldName" or "Descriptor_" + protoName string // Name of field in proto language, e.g. "field_name" or "descriptor" + getterName string // Name of the getter, e.g. "GetFieldName" or "GetDescriptor_" + goType string // The Go type as a string, e.g. "*int32" or "*OtherMessage" + tags string // The tag string/annotation for the type, e.g. `protobuf:"varint,8,opt,name=region_id,json=regionId"` + fullPath string // The full path of the field as used by Annotate etc, e.g. "4,0,2,0" +} - fieldTypes[field] = typename +// getProtoName gets the proto name of a field, e.g. "field_name" or "descriptor". +func (f *fieldCommon) getProtoName() string { + return f.protoName +} - if oneof { - tname := ccTypeName + "_" + fieldName - // It is possible for this to collide with a message or enum - // nested in this message. Check for collisions. - for { - ok := true - for _, desc := range message.nested { - if CamelCaseSlice(desc.TypeName()) == tname { - ok = false - break - } - } - for _, enum := range message.enums { - if CamelCaseSlice(enum.TypeName()) == tname { - ok = false - break - } - } - if !ok { - tname += "_" - continue - } - break - } +// getGoType returns the go type of the field as a string, e.g. "*int32". +func (f *fieldCommon) getGoType() string { + return f.goType +} - oneofTypeName[field] = tname - continue - } +// simpleField is not weak, not a oneof, not an extension. Can be required, optional or repeated. +type simpleField struct { + fieldCommon + protoTypeName string // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration" + protoType descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64 + deprecated string // Deprecation comment, if any, e.g. "// Deprecated: Do not use." + getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName" + protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5" + comment string // The full comment for the field, e.g. "// Useful information" +} - fieldDeprecated := "" - if field.GetOptions().GetDeprecated() { - fieldDeprecated = deprecationComment - } +// decl prints the declaration of the field in the struct (if any). +func (f *simpleField) decl(g *Generator, mc *msgCtx) { + g.P(f.comment, Annotate(mc.message.file, f.fullPath, f.goName), "\t", f.goType, "\t`", f.tags, "`", f.deprecated) +} - fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) - g.PrintComments(fieldFullPath) - g.P(Annotate(message.file, fieldFullPath, fieldName), "\t", typename, "\t`", tag, "`", fieldDeprecated) - g.RecordTypeUse(field.GetTypeName()) +// getter prints the getter for the field. +func (f *simpleField) getter(g *Generator, mc *msgCtx) { + star := "" + tname := f.goType + if needsStar(f.protoType) && tname[0] == '*' { + tname = tname[1:] + star = "*" } - g.P("XXX_NoUnkeyedLiteral\tstruct{} `json:\"-\"`") // prevent unkeyed struct literals - if len(message.ExtensionRange) > 0 { - messageset := "" - if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { - messageset = "protobuf_messageset:\"1\" " - } - g.P(g.Pkg["proto"], ".XXX_InternalExtensions `", messageset, "json:\"-\"`") + if f.deprecated != "" { + g.P(f.deprecated) } - g.P("XXX_unrecognized\t[]byte `json:\"-\"`") - g.P("XXX_sizecache\tint32 `json:\"-\"`") - g.Out() - g.P("}") - - // Update g.Buffer to list valid oneof types. - // We do this down here, after we've disambiguated the oneof type names. - // We go in reverse order of insertion point to avoid invalidating offsets. - for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- { - ip := oneofInsertPoints[oi] - all := g.Buffer.Bytes() - rem := all[ip:] - g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem - oldLen := g.Buffer.Len() - for _, field := range message.Field { - if field.OneofIndex == nil || *field.OneofIndex != oi { - continue - } - g.P("//\t*", oneofTypeName[field]) - } - // If we've inserted text, we also need to fix up affected annotations (as - // they contain offsets that may need to be changed). - offset := int32(g.Buffer.Len() - oldLen) - ip32 := int32(ip) - for _, anno := range g.annotations { - if *anno.Begin >= ip32 { - *anno.Begin += offset - } - if *anno.End >= ip32 { - *anno.End += offset - } - } - g.Buffer.Write(rem) + g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, f.fullPath, f.getterName), "() "+tname+" {") + if f.getterDef == "nil" { // Simpler getter + g.P("if m != nil {") + g.P("return m." + f.goName) + g.P("}") + g.P("return nil") + g.P("}") + g.P() + return } - - // Reset, String and ProtoMessage methods. - g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }") - g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") - g.P("func (*", ccTypeName, ") ProtoMessage() {}") - var indexes []string - for m := message; m != nil; m = m.parent { - indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + if mc.message.proto3() { + g.P("if m != nil {") + } else { + g.P("if m != nil && m." + f.goName + " != nil {") } - g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) {") - g.In() - g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") - g.Out() + g.P("return " + star + "m." + f.goName) g.P("}") - // TODO: Revisit the decision to use a XXX_WellKnownType method - // if we change proto.MessageName to work with multiple equivalents. - if message.file.GetPackage() == "google.protobuf" && wellKnownTypes[message.GetName()] { - g.P("func (*", ccTypeName, `) XXX_WellKnownType() string { return "`, message.GetName(), `" }`) - } - - // Extension support methods - var hasExtensions, isMessageSet bool - if len(message.ExtensionRange) > 0 { - hasExtensions = true - // message_set_wire_format only makes sense when extensions are defined. - if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() { - isMessageSet = true - g.P() - g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {") - g.In() - g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") - g.Out() - g.P("}") - g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {") - g.In() - g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") - g.Out() - g.P("}") - } + g.P("return ", f.getterDef) + g.P("}") + g.P() +} - g.P() - g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{") - g.In() - for _, r := range message.ExtensionRange { - end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends - g.P("{Start: ", r.Start, ", End: ", end, "},") - } - g.Out() - g.P("}") - g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") - g.In() - g.P("return extRange_", ccTypeName) - g.Out() - g.P("}") - } +// setter prints the setter method of the field. +func (f *simpleField) setter(g *Generator, mc *msgCtx) { + // No setter for regular fields yet +} - // TODO: It does not scale to keep adding another method for every - // operation on protos that we want to switch over to using the - // table-driven approach. Instead, we should only add a single method - // that allows getting access to the *InternalMessageInfo struct and then - // calling Unmarshal, Marshal, Merge, Size, and Discard directly on that. +// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5". +func (f *simpleField) getProtoDef() string { + return f.protoDef +} - // Wrapper for table-driven marshaling and unmarshaling. - g.P("func (m *", ccTypeName, ") XXX_Unmarshal(b []byte) error {") - g.In() - g.P("return xxx_messageInfo_", ccTypeName, ".Unmarshal(m, b)") - g.Out() - g.P("}") +// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration". +func (f *simpleField) getProtoTypeName() string { + return f.protoTypeName +} - g.P("func (m *", ccTypeName, ") XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {") - g.In() - g.P("return xxx_messageInfo_", ccTypeName, ".Marshal(b, m, deterministic)") - g.Out() - g.P("}") +// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64. +func (f *simpleField) getProtoType() descriptor.FieldDescriptorProto_Type { + return f.protoType +} - g.P("func (dst *", ccTypeName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {") - g.In() - g.P("xxx_messageInfo_", ccTypeName, ".Merge(dst, src)") - g.Out() - g.P("}") +// oneofSubFields are kept slize held by each oneofField. They do not appear in the top level slize of fields for the message. +type oneofSubField struct { + fieldCommon + protoTypeName string // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration" + protoType descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64 + oneofTypeName string // Type name of the enclosing struct, e.g. "MessageName_FieldName" + fieldNumber int // Actual field number, as defined in proto, e.g. 12 + getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName" + protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5" +} - g.P("func (m *", ccTypeName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message - g.In() - g.P("return xxx_messageInfo_", ccTypeName, ".Size(m)") - g.Out() - g.P("}") +// wireTypeName returns a textual wire type, needed for oneof sub fields in generated code. +func (f *oneofSubField) wireTypeName() string { + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64, + descriptor.FieldDescriptorProto_TYPE_DOUBLE: + return "WireFixed64" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32, + descriptor.FieldDescriptorProto_TYPE_FLOAT: + return "WireFixed32" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + return "WireStartGroup" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE, + descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + return "WireBytes" + default: // All others are Varints + return "WireVarint" + } +} - g.P("func (m *", ccTypeName, ") XXX_DiscardUnknown() {") - g.In() - g.P("xxx_messageInfo_", ccTypeName, ".DiscardUnknown(m)") - g.Out() - g.P("}") +// typedNil prints a nil casted to the pointer to this field. +// - for XXX_OneofFuncs +func (f *oneofSubField) typedNil(g *Generator) { + g.P("(*", f.oneofTypeName, ")(nil),") +} - g.P("var xxx_messageInfo_", ccTypeName, " ", g.Pkg["proto"], ".InternalMessageInfo") +// marshalCase prints the case matching this oneof subfield in the marshalling code. +func (f *oneofSubField) marshalCase(g *Generator) { + g.P("case *", f.oneofTypeName, ":") + wire := f.wireTypeName() + var pre, post string + val := "x." + f.goName // overridden for TYPE_BOOL + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" + post = "))" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" + post = ")))" + case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64: + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_ENUM: + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: + pre, post = "b.EncodeFixed64(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: + pre, post = "b.EncodeFixed32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + g.P("t := uint64(0)") + g.P("if ", val, " { t = 1 }") + val = "t" + pre, post = "b.EncodeVarint(", ")" + case descriptor.FieldDescriptorProto_TYPE_STRING: + pre, post = "b.EncodeStringBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + pre, post = "b.Marshal(", ")" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + pre, post = "b.EncodeMessage(", ")" + case descriptor.FieldDescriptorProto_TYPE_BYTES: + pre, post = "b.EncodeRawBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + pre, post = "b.EncodeZigzag32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + pre, post = "b.EncodeZigzag64(uint64(", "))" + default: + g.Fail("unhandled oneof field type ", f.protoType.String()) + } + g.P("b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".", wire, ")") + if t := f.protoType; t != descriptor.FieldDescriptorProto_TYPE_GROUP && t != descriptor.FieldDescriptorProto_TYPE_MESSAGE { + g.P(pre, val, post) + } else { + g.P("if err := ", pre, val, post, "; err != nil {") + g.P("return err") + g.P("}") + } + if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + } +} - // Default constants - defNames := make(map[*descriptor.FieldDescriptorProto]string) - for _, field := range message.Field { - def := field.GetDefaultValue() - if def == "" { - continue - } - fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name) - defNames[field] = fieldname - typename, _ := g.GoType(message, field) - if typename[0] == '*' { - typename = typename[1:] - } - kind := "const " - switch { - case typename == "bool": - case typename == "string": - def = strconv.Quote(def) - case typename == "[]byte": - def = "[]byte(" + strconv.Quote(unescape(def)) + ")" - kind = "var " - case def == "inf", def == "-inf", def == "nan": - // These names are known to, and defined by, the protocol language. +// unmarshalCase prints the case matching this oneof subfield in the unmarshalling code. +func (f *oneofSubField) unmarshalCase(g *Generator, origOneofName string, oneofName string) { + g.P("case ", f.fieldNumber, ": // ", origOneofName, ".", f.getProtoName()) + g.P("if wire != ", g.Pkg["proto"], ".", f.wireTypeName(), " {") + g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") + g.P("}") + lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP + var dec, cast, cast2 string + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" + case descriptor.FieldDescriptorProto_TYPE_INT64: + dec, cast = "b.DecodeVarint()", "int64" + case descriptor.FieldDescriptorProto_TYPE_UINT64: + dec = "b.DecodeVarint()" + case descriptor.FieldDescriptorProto_TYPE_INT32: + dec, cast = "b.DecodeVarint()", "int32" + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + dec = "b.DecodeFixed64()" + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + dec, cast = "b.DecodeFixed32()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + dec = "b.DecodeVarint()" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_STRING: + dec = "b.DecodeStringBytes()" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + g.P("msg := new(", f.goType[1:], ")") // drop star + lhs = "err" + dec = "b.DecodeGroup(msg)" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + g.P("msg := new(", f.goType[1:], ")") // drop star + lhs = "err" + dec = "b.DecodeMessage(msg)" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_BYTES: + dec = "b.DecodeRawBytes(true)" + case descriptor.FieldDescriptorProto_TYPE_UINT32: + dec, cast = "b.DecodeVarint()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + dec, cast = "b.DecodeVarint()", f.goType + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + dec, cast = "b.DecodeFixed32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + dec, cast = "b.DecodeFixed64()", "int64" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + dec, cast = "b.DecodeZigzag32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + dec, cast = "b.DecodeZigzag64()", "int64" + default: + g.Fail("unhandled oneof field type ", f.protoType.String()) + } + g.P(lhs, " := ", dec) + val := "x" + if cast != "" { + val = cast + "(" + val + ")" + } + if cast2 != "" { + val = cast2 + "(" + val + ")" + } + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + val += " != 0" + case descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE: + val = "msg" + } + g.P("m.", oneofName, " = &", f.oneofTypeName, "{", val, "}") + g.P("return true, err") +} + +// sizerCase prints the case matching this oneof subfield in the sizer code. +func (f *oneofSubField) sizerCase(g *Generator) { + g.P("case *", f.oneofTypeName, ":") + val := "x." + f.goName + var varint, fixed string + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64, descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_ENUM: + varint = val + case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + fixed = "1" + case descriptor.FieldDescriptorProto_TYPE_STRING: + fixed = "len(" + val + ")" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_GROUP: + fixed = g.Pkg["proto"] + ".Size(" + val + ")" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") + fixed = "s" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_BYTES: + fixed = "len(" + val + ")" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_SINT32: + varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" + default: + g.Fail("unhandled oneof field type ", f.protoType.String()) + } + // Tag and wire varint is known statically, + // so don't generate code for that part of the size computation. + tagAndWireSize := proto.SizeVarint(uint64(f.fieldNumber << 3)) // wire doesn't affect varint size + g.P("n += ", tagAndWireSize, " // tag and wire") + if varint != "" { + g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") + } + if fixed != "" { + g.P("n += ", fixed) + } + if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("n += ", tagAndWireSize, " // tag and wire") + } +} + +// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5". +func (f *oneofSubField) getProtoDef() string { + return f.protoDef +} + +// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration". +func (f *oneofSubField) getProtoTypeName() string { + return f.protoTypeName +} + +// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64. +func (f *oneofSubField) getProtoType() descriptor.FieldDescriptorProto_Type { + return f.protoType +} + +// oneofField represents the oneof on top level. +// The alternative fields within the oneof are represented by oneofSubField. +type oneofField struct { + fieldCommon + subFields []*oneofSubField // All the possible oneof fields + comment string // The full comment for the field, e.g. "// Types that are valid to be assigned to MyOneof:\n\\" +} + +// decl prints the declaration of the field in the struct (if any). +func (f *oneofField) decl(g *Generator, mc *msgCtx) { + comment := f.comment + for _, sf := range f.subFields { + comment += "//\t*" + sf.oneofTypeName + "\n" + } + g.P(comment, Annotate(mc.message.file, f.fullPath, f.goName), " ", f.goType, " `", f.tags, "`") +} + +// getter for a oneof field will print additional discriminators and interfaces for the oneof, +// also it prints all the getters for the sub fields. +func (f *oneofField) getter(g *Generator, mc *msgCtx) { + // The discriminator type + g.P("type ", f.goType, " interface {") + g.P(f.goType, "()") + g.P("}") + g.P() + // The subField types, fulfilling the discriminator type contract + for _, sf := range f.subFields { + g.P("type ", Annotate(mc.message.file, sf.fullPath, sf.oneofTypeName), " struct {") + g.P(Annotate(mc.message.file, sf.fullPath, sf.goName), " ", sf.goType, " `", sf.tags, "`") + g.P("}") + g.P() + } + for _, sf := range f.subFields { + g.P("func (*", sf.oneofTypeName, ") ", f.goType, "() {}") + g.P() + } + // Getter for the oneof field + g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, f.fullPath, f.getterName), "() ", f.goType, " {") + g.P("if m != nil { return m.", f.goName, " }") + g.P("return nil") + g.P("}") + g.P() + // Getters for each oneof + for _, sf := range f.subFields { + g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, sf.fullPath, sf.getterName), "() "+sf.goType+" {") + g.P("if x, ok := m.", f.getterName, "().(*", sf.oneofTypeName, "); ok {") + g.P("return x.", sf.goName) + g.P("}") + g.P("return ", sf.getterDef) + g.P("}") + g.P() + } +} + +// setter prints the setter method of the field. +func (f *oneofField) setter(g *Generator, mc *msgCtx) { + // No setters for oneof yet +} + +// topLevelField interface implemented by all types of fields on the top level (not oneofSubField). +type topLevelField interface { + decl(g *Generator, mc *msgCtx) // print declaration within the struct + getter(g *Generator, mc *msgCtx) // print getter + setter(g *Generator, mc *msgCtx) // print setter if applicable +} + +// defField interface implemented by all types of fields that can have defaults (not oneofField, but instead oneofSubField). +type defField interface { + getProtoDef() string // default value explicitly stated in the proto file, e.g "yoshi" or "5" + getProtoName() string // proto name of a field, e.g. "field_name" or "descriptor" + getGoType() string // go type of the field as a string, e.g. "*int32" + getProtoTypeName() string // protobuf type name for the field, e.g. ".google.protobuf.Duration" + getProtoType() descriptor.FieldDescriptorProto_Type // *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64 +} + +// generateDefaultConstants adds constants for default values if needed, which is only if the default value is. +// explicit in the proto. +func (g *Generator) generateDefaultConstants(mc *msgCtx, topLevelFields []topLevelField) { + // Collect fields that can have defaults + dFields := []defField{} + for _, pf := range topLevelFields { + if f, ok := pf.(*oneofField); ok { + for _, osf := range f.subFields { + dFields = append(dFields, osf) + } + continue + } + dFields = append(dFields, pf.(defField)) + } + for _, df := range dFields { + def := df.getProtoDef() + if def == "" { + continue + } + fieldname := g.defaultConstantName(mc.goName, df.getProtoName()) + typename := df.getGoType() + if typename[0] == '*' { + typename = typename[1:] + } + kind := "const " + switch { + case typename == "bool": + case typename == "string": + def = strconv.Quote(def) + case typename == "[]byte": + def = "[]byte(" + strconv.Quote(unescape(def)) + ")" + kind = "var " + case def == "inf", def == "-inf", def == "nan": + // These names are known to, and defined by, the protocol language. switch def { case "inf": def = "math.Inf(1)" @@ -2044,13 +2211,13 @@ func (g *Generator) generateMessage(message *Descriptor) { case "nan": def = "math.NaN()" } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT { + if df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT { def = "float32(" + def + ")" } kind = "var " - case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM: + case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_ENUM: // Must be an enum. Need to construct the prefixed name. - obj := g.ObjectNamed(field.GetTypeName()) + obj := g.ObjectNamed(df.getProtoTypeName()) var enum *EnumDescriptor if id, ok := obj.(*ImportedDescriptor); ok { // The enum type has been publicly imported. @@ -2065,455 +2232,456 @@ func (g *Generator) generateMessage(message *Descriptor) { def = g.DefaultPackageName(obj) + enum.prefix() + def } g.P(kind, fieldname, " ", typename, " = ", def) - g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""}) + g.file.addExport(mc.message, constOrVarSymbol{fieldname, kind, ""}) } g.P() +} - // Oneof per-field types, discriminants and getters. - // - // Generate unexported named types for the discriminant interfaces. - // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug - // that was triggered by using anonymous interfaces here. - // TODO: Revisit this and consider reverting back to anonymous interfaces. - for oi := range message.OneofDecl { - dname := oneofDisc[int32(oi)] - g.P("type ", dname, " interface {") - g.In() - g.P(dname, "()") - g.Out() - g.P("}") +// generateInternalStructFields just adds the XXX_ fields to the message struct. +func (g *Generator) generateInternalStructFields(mc *msgCtx, topLevelFields []topLevelField) { + g.P("XXX_NoUnkeyedLiteral\tstruct{} `json:\"-\"`") // prevent unkeyed struct literals + if len(mc.message.ExtensionRange) > 0 { + messageset := "" + if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() { + messageset = "protobuf_messageset:\"1\" " + } + g.P(g.Pkg["proto"], ".XXX_InternalExtensions `", messageset, "json:\"-\"`") } - g.P() - var oneofTypes []string - for i, field := range message.Field { - if field.OneofIndex == nil { - continue + g.P("XXX_unrecognized\t[]byte `json:\"-\"`") + g.P("XXX_sizecache\tint32 `json:\"-\"`") + +} + +// generateOneofFuncs adds all the utility functions for oneof, including marshalling, unmarshalling and sizer. +func (g *Generator) generateOneofFuncs(mc *msgCtx, topLevelFields []topLevelField) { + ofields := []*oneofField{} + for _, f := range topLevelFields { + if o, ok := f.(*oneofField); ok { + ofields = append(ofields, o) } - _, wiretype := g.GoType(message, field) - tag := "protobuf:" + g.goTag(message, field, wiretype) - fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) - g.P("type ", Annotate(message.file, fieldFullPath, oneofTypeName[field]), " struct{ ", Annotate(message.file, fieldFullPath, fieldNames[field]), " ", fieldTypes[field], " `", tag, "` }") - g.RecordTypeUse(field.GetTypeName()) - oneofTypes = append(oneofTypes, oneofTypeName[field]) } + if len(ofields) == 0 { + return + } + enc := "_" + mc.goName + "_OneofMarshaler" + dec := "_" + mc.goName + "_OneofUnmarshaler" + size := "_" + mc.goName + "_OneofSizer" + encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" + decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" + sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" + + // OneofFuncs + g.P("// XXX_OneofFuncs is for the internal use of the proto package.") + g.P("func (*", mc.goName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") + g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") + for _, of := range ofields { + for _, sf := range of.subFields { + sf.typedNil(g) + } + } + g.P("}") + g.P("}") g.P() - for _, field := range message.Field { - if field.OneofIndex == nil { - continue + + // marshaler + g.P("func ", enc, encSig, " {") + g.P("m := msg.(*", mc.goName, ")") + for _, of := range ofields { + g.P("// ", of.getProtoName()) + g.P("switch x := m.", of.goName, ".(type) {") + for _, sf := range of.subFields { + // also fills in field.wire + sf.marshalCase(g) + } + g.P("case nil:") + g.P("default:") + g.P(" return ", g.Pkg["fmt"], `.Errorf("`, mc.goName, ".", of.goName, ` has unexpected type %T", x)`) + g.P("}") + } + g.P("return nil") + g.P("}") + g.P() + + // unmarshaler + g.P("func ", dec, decSig, " {") + g.P("m := msg.(*", mc.goName, ")") + g.P("switch tag {") + for _, of := range ofields { + for _, sf := range of.subFields { + sf.unmarshalCase(g, of.getProtoName(), of.goName) } - g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}") } + g.P("default:") + g.P("return false, nil") + g.P("}") + g.P("}") g.P() - for oi := range message.OneofDecl { - fname := oneofFieldName[int32(oi)] - oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, oi) - g.P("func (m *", ccTypeName, ") ", Annotate(message.file, oneofFullPath, "Get"+fname), "() ", oneofDisc[int32(oi)], " {") - g.P("if m != nil { return m.", fname, " }") - g.P("return nil") + + // sizer + g.P("func ", size, sizeSig, " {") + g.P("m := msg.(*", mc.goName, ")") + for _, of := range ofields { + g.P("// ", of.getProtoName()) + g.P("switch x := m.", of.goName, ".(type) {") + for _, sf := range of.subFields { + // also fills in field.wire + sf.sizerCase(g) + } + g.P("case nil:") + g.P("default:") + g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") g.P("}") } + g.P("return n") + g.P("}") g.P() +} - // Field getters - for i, field := range message.Field { - oneof := field.OneofIndex != nil +// generateMessageStruct adds the actual struct with it's members (but not methods) to the output. +func (g *Generator) generateMessageStruct(mc *msgCtx, topLevelFields []topLevelField) { + comments := g.PrintComments(mc.message.path) - fname := fieldNames[field] - typename, _ := g.GoType(message, field) - if t, ok := mapFieldTypes[field]; ok { - typename = t - } - mname := fieldGetterNames[field] - star := "" - if needsStar(*field.Type) && typename[0] == '*' { - typename = typename[1:] - star = "*" + // Guarantee deprecation comments appear after user-provided comments. + if mc.message.GetOptions().GetDeprecated() { + if comments { + // Convention: Separate deprecation comments from original + // comments with an empty line. + g.P("//") } - fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) + g.P(deprecationComment) + } - if field.GetOptions().GetDeprecated() { - g.P(deprecationComment) - } + g.P("type ", Annotate(mc.message.file, mc.message.path, mc.goName), " struct {") + for _, pf := range topLevelFields { + pf.decl(g, mc) + } + g.generateInternalStructFields(mc, topLevelFields) + g.P("}") +} - g.P("func (m *", ccTypeName, ") ", Annotate(message.file, fieldFullPath, mname), "() "+typename+" {") - g.In() - def, hasDef := defNames[field] - typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BYTES: - typeDefaultIsNil = !hasDef - case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: - typeDefaultIsNil = true - } - if isRepeated(field) { - typeDefaultIsNil = true - } - if typeDefaultIsNil && !oneof { - // A bytes field with no explicit default needs less generated code, - // as does a message or group field, or a repeated field. - g.P("if m != nil {") - g.In() - g.P("return m." + fname) - g.Out() - g.P("}") - g.P("return nil") - g.Out() - g.P("}") +// generateGetters adds getters for all fields, including oneofs and weak fields when applicable. +func (g *Generator) generateGetters(mc *msgCtx, topLevelFields []topLevelField) { + for _, pf := range topLevelFields { + pf.getter(g, mc) + } +} + +// generateSetters add setters for all fields, including oneofs and weak fields when applicable. +func (g *Generator) generateSetters(mc *msgCtx, topLevelFields []topLevelField) { + for _, pf := range topLevelFields { + pf.setter(g, mc) + } +} + +// generateCommonMethods adds methods to the message that are not on a per field basis. +func (g *Generator) generateCommonMethods(mc *msgCtx) { + // Reset, String and ProtoMessage methods. + g.P("func (m *", mc.goName, ") Reset() { *m = ", mc.goName, "{} }") + g.P("func (m *", mc.goName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") + g.P("func (*", mc.goName, ") ProtoMessage() {}") + var indexes []string + for m := mc.message; m != nil; m = m.parent { + indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + } + g.P("func (*", mc.goName, ") Descriptor() ([]byte, []int) {") + g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") + g.P("}") + // TODO: Revisit the decision to use a XXX_WellKnownType method + // if we change proto.MessageName to work with multiple equivalents. + if mc.message.file.GetPackage() == "google.protobuf" && wellKnownTypes[mc.message.GetName()] { + g.P("func (*", mc.goName, `) XXX_WellKnownType() string { return "`, mc.message.GetName(), `" }`) + } + + // Extension support methods + if len(mc.message.ExtensionRange) > 0 { + // message_set_wire_format only makes sense when extensions are defined. + if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() { g.P() - continue - } - if !oneof { - if message.proto3() { - g.P("if m != nil {") - } else { - g.P("if m != nil && m." + fname + " != nil {") - } - g.In() - g.P("return " + star + "m." + fname) - g.Out() + g.P("func (m *", mc.goName, ") MarshalJSON() ([]byte, error) {") + g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") g.P("}") - } else { - uname := oneofFieldName[*field.OneofIndex] - tname := oneofTypeName[field] - g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {") - g.P("return x.", fname) + g.P("func (m *", mc.goName, ") UnmarshalJSON(buf []byte) error {") + g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") g.P("}") } - if hasDef { - if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { - g.P("return " + def) - } else { - // The default is a []byte var. - // Make a copy when returning it to be safe. - g.P("return append([]byte(nil), ", def, "...)") - } - } else { - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - g.P("return false") - case descriptor.FieldDescriptorProto_TYPE_STRING: - g.P(`return ""`) - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE, - descriptor.FieldDescriptorProto_TYPE_BYTES: - // This is only possible for oneof fields. - g.P("return nil") - case descriptor.FieldDescriptorProto_TYPE_ENUM: - // The default default for an enum is the first value in the enum, - // not zero. - obj := g.ObjectNamed(field.GetTypeName()) - var enum *EnumDescriptor - if id, ok := obj.(*ImportedDescriptor); ok { - // The enum type has been publicly imported. - enum, _ = id.o.(*EnumDescriptor) - } else { - enum, _ = obj.(*EnumDescriptor) - } - if enum == nil { - log.Printf("don't know how to generate getter for %s", field.GetName()) - continue - } - if len(enum.Value) == 0 { - g.P("return 0 // empty enum") - } else { - first := enum.Value[0].GetName() - g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first) - } - default: - g.P("return 0") - } + + g.P() + g.P("var extRange_", mc.goName, " = []", g.Pkg["proto"], ".ExtensionRange{") + for _, r := range mc.message.ExtensionRange { + end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends + g.P("{Start: ", r.Start, ", End: ", end, "},") } - g.Out() g.P("}") - g.P() + g.P("func (*", mc.goName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") + g.P("return extRange_", mc.goName) + g.P("}") } - if !message.group { - ms := &messageSymbol{ - sym: ccTypeName, - hasExtensions: hasExtensions, - isMessageSet: isMessageSet, - oneofTypes: oneofTypes, - } - g.file.addExport(message, ms) - } + // TODO: It does not scale to keep adding another method for every + // operation on protos that we want to switch over to using the + // table-driven approach. Instead, we should only add a single method + // that allows getting access to the *InternalMessageInfo struct and then + // calling Unmarshal, Marshal, Merge, Size, and Discard directly on that. - // Oneof functions - if len(message.OneofDecl) > 0 { - fieldWire := make(map[*descriptor.FieldDescriptorProto]string) + // Wrapper for table-driven marshaling and unmarshaling. + g.P("func (m *", mc.goName, ") XXX_Unmarshal(b []byte) error {") + g.P("return xxx_messageInfo_", mc.goName, ".Unmarshal(m, b)") + g.P("}") - // method - enc := "_" + ccTypeName + "_OneofMarshaler" - dec := "_" + ccTypeName + "_OneofUnmarshaler" - size := "_" + ccTypeName + "_OneofSizer" - encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" - decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" - sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" + g.P("func (m *", mc.goName, ") XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {") + g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)") + g.P("}") - g.P("// XXX_OneofFuncs is for the internal use of the proto package.") - g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") - g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } - g.P("(*", oneofTypeName[field], ")(nil),") - } - g.P("}") - g.P("}") - g.P() + g.P("func (dst *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {") + g.P("xxx_messageInfo_", mc.goName, ".Merge(dst, src)") + g.P("}") - // marshaler - g.P("func ", enc, encSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - for oi, odp := range message.OneofDecl { - g.P("// ", odp.GetName()) - fname := oneofFieldName[int32(oi)] - g.P("switch x := m.", fname, ".(type) {") - for _, field := range message.Field { - if field.OneofIndex == nil || int(*field.OneofIndex) != oi { - continue - } - g.P("case *", oneofTypeName[field], ":") - var wire, pre, post string - val := "x." + fieldNames[field] // overridden for TYPE_BOOL - canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - wire = "WireFixed64" - pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" - post = "))" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - wire = "WireFixed32" - pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" - post = ")))" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - wire = "WireVarint" - pre, post = "b.EncodeVarint(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - wire = "WireFixed64" - pre, post = "b.EncodeFixed64(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - wire = "WireFixed32" - pre, post = "b.EncodeFixed32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - // bool needs special handling. - g.P("t := uint64(0)") - g.P("if ", val, " { t = 1 }") - val = "t" - wire = "WireVarint" - pre, post = "b.EncodeVarint(", ")" - case descriptor.FieldDescriptorProto_TYPE_STRING: - wire = "WireBytes" - pre, post = "b.EncodeStringBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - wire = "WireStartGroup" - pre, post = "b.Marshal(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - wire = "WireBytes" - pre, post = "b.EncodeMessage(", ")" - canFail = true - case descriptor.FieldDescriptorProto_TYPE_BYTES: - wire = "WireBytes" - pre, post = "b.EncodeRawBytes(", ")" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - wire = "WireVarint" - pre, post = "b.EncodeZigzag32(uint64(", "))" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - wire = "WireVarint" - pre, post = "b.EncodeZigzag64(uint64(", "))" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - fieldWire[field] = wire - g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")") - if !canFail { - g.P(pre, val, post) - } else { - g.P("if err := ", pre, val, post, "; err != nil {") - g.P("return err") - g.P("}") - } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + g.P("func (m *", mc.goName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message + g.P("return xxx_messageInfo_", mc.goName, ".Size(m)") + g.P("}") + + g.P("func (m *", mc.goName, ") XXX_DiscardUnknown() {") + g.P("xxx_messageInfo_", mc.goName, ".DiscardUnknown(m)") + g.P("}") + + g.P("var xxx_messageInfo_", mc.goName, " ", g.Pkg["proto"], ".InternalMessageInfo") + g.P() +} + +// Generate the type, methods and default constant definitions for this Descriptor. +func (g *Generator) generateMessage(message *Descriptor) { + topLevelFields := []topLevelField{} + oFields := make(map[int32]*oneofField) + // The full type name + typeName := message.TypeName() + // The full type name, CamelCased. + goTypeName := CamelCaseSlice(typeName) + + usedNames := make(map[string]bool) + for _, n := range methodNames { + usedNames[n] = true + } + + // allocNames finds a conflict-free variation of the given strings, + // consistently mutating their suffixes. + // It returns the same number of strings. + allocNames := func(ns ...string) []string { + Loop: + for { + for _, n := range ns { + if usedNames[n] { + for i := range ns { + ns[i] += "_" + } + continue Loop } } - g.P("case nil:") - g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`) - g.P("}") + for _, n := range ns { + usedNames[n] = true + } + return ns } - g.P("return nil") - g.P("}") - g.P() + } - // unmarshaler - g.P("func ", dec, decSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - g.P("switch tag {") - for _, field := range message.Field { - if field.OneofIndex == nil { - continue - } + mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) // keep track of the map fields to be added later + + // Build a structure more suitable for generating the text in one pass + for i, field := range message.Field { + // Allocate the getter and the field at the same time so name + // collisions create field/method consistent names. + // TODO: This allocation occurs based on the order of the fields + // in the proto file, meaning that a change in the field + // ordering can change generated Method/Field names. + base := CamelCase(*field.Name) + ns := allocNames(base, "Get"+base) + fieldName, fieldGetterName := ns[0], ns[1] + typename, wiretype := g.GoType(message, field) + jsonName := *field.Name + tag := fmt.Sprintf("protobuf:%s json:%q", g.goTag(message, field, wiretype), jsonName+",omitempty") + + oneof := field.OneofIndex != nil + if oneof && oFields[*field.OneofIndex] == nil { odp := message.OneofDecl[int(*field.OneofIndex)] - g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name) - g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {") - g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") - g.P("}") - lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP - var dec, cast, cast2 string - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" - case descriptor.FieldDescriptorProto_TYPE_INT64: - dec, cast = "b.DecodeVarint()", "int64" - case descriptor.FieldDescriptorProto_TYPE_UINT64: - dec = "b.DecodeVarint()" - case descriptor.FieldDescriptorProto_TYPE_INT32: - dec, cast = "b.DecodeVarint()", "int32" - case descriptor.FieldDescriptorProto_TYPE_FIXED64: - dec = "b.DecodeFixed64()" - case descriptor.FieldDescriptorProto_TYPE_FIXED32: - dec, cast = "b.DecodeFixed32()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - dec = "b.DecodeVarint()" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_STRING: - dec = "b.DecodeStringBytes()" - case descriptor.FieldDescriptorProto_TYPE_GROUP: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeGroup(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - g.P("msg := new(", fieldTypes[field][1:], ")") // drop star - lhs = "err" - dec = "b.DecodeMessage(msg)" - // handled specially below - case descriptor.FieldDescriptorProto_TYPE_BYTES: - dec = "b.DecodeRawBytes(true)" - case descriptor.FieldDescriptorProto_TYPE_UINT32: - dec, cast = "b.DecodeVarint()", "uint32" - case descriptor.FieldDescriptorProto_TYPE_ENUM: - dec, cast = "b.DecodeVarint()", fieldTypes[field] - case descriptor.FieldDescriptorProto_TYPE_SFIXED32: - dec, cast = "b.DecodeFixed32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SFIXED64: - dec, cast = "b.DecodeFixed64()", "int64" - case descriptor.FieldDescriptorProto_TYPE_SINT32: - dec, cast = "b.DecodeZigzag32()", "int32" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - dec, cast = "b.DecodeZigzag64()", "int64" - default: - g.Fail("unhandled oneof field type ", field.Type.String()) - } - g.P(lhs, " := ", dec) - val := "x" - if cast != "" { - val = cast + "(" + val + ")" - } - if cast2 != "" { - val = cast2 + "(" + val + ")" + base := CamelCase(odp.GetName()) + names := allocNames(base, "Get"+base) + fname, gname := names[0], names[1] + + // This is the first field of a oneof we haven't seen before. + // Generate the union field. + oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex) + c, ok := g.makeComments(oneofFullPath) + if ok { + c += "\n//\n" } - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BOOL: - val += " != 0" - case descriptor.FieldDescriptorProto_TYPE_GROUP, - descriptor.FieldDescriptorProto_TYPE_MESSAGE: - val = "msg" + c += "// Types that are valid to be assigned to " + fname + ":\n" + // Generate the rest of this comment later, + // when we've computed any disambiguation. + + dname := "is" + goTypeName + "_" + fname + tag := `protobuf_oneof:"` + odp.GetName() + `"` + of := oneofField{ + fieldCommon: fieldCommon{ + goName: fname, + getterName: gname, + goType: dname, + tags: tag, + protoName: odp.GetName(), + fullPath: oneofFullPath, + }, + comment: c, } - g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}") - g.P("return true, err") + topLevelFields = append(topLevelFields, &of) + oFields[*field.OneofIndex] = &of } - g.P("default: return false, nil") - g.P("}") - g.P("}") - g.P() - // sizer - g.P("func ", size, sizeSig, " {") - g.P("m := msg.(*", ccTypeName, ")") - for oi, odp := range message.OneofDecl { - g.P("// ", odp.GetName()) - fname := oneofFieldName[int32(oi)] - g.P("switch x := m.", fname, ".(type) {") - for _, field := range message.Field { - if field.OneofIndex == nil || int(*field.OneofIndex) != oi { - continue - } - g.P("case *", oneofTypeName[field], ":") - val := "x." + fieldNames[field] - var varint, fixed string - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE: - fixed = "8" - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - fixed = "4" - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_ENUM: - varint = val - case descriptor.FieldDescriptorProto_TYPE_FIXED64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - fixed = "8" - case descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - fixed = "4" - case descriptor.FieldDescriptorProto_TYPE_BOOL: - fixed = "1" - case descriptor.FieldDescriptorProto_TYPE_STRING: - fixed = "len(" + val + ")" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_GROUP: - fixed = g.Pkg["proto"] + ".Size(" + val + ")" + if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { + desc := g.ObjectNamed(field.GetTypeName()) + if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { + // Figure out the Go types and tags for the key and value types. + keyField, valField := d.Field[0], d.Field[1] + keyType, keyWire := g.GoType(d, keyField) + valType, valWire := g.GoType(d, valField) + keyTag, valTag := g.goTag(d, keyField, keyWire), g.goTag(d, valField, valWire) + + // We don't use stars, except for message-typed values. + // Message and enum types are the only two possibly foreign types used in maps, + // so record their use. They are not permitted as map keys. + keyType = strings.TrimPrefix(keyType, "*") + switch *valField.Type { + case descriptor.FieldDescriptorProto_TYPE_ENUM: + valType = strings.TrimPrefix(valType, "*") + g.RecordTypeUse(valField.GetTypeName()) case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") - fixed = "s" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_BYTES: - fixed = "len(" + val + ")" - varint = fixed - case descriptor.FieldDescriptorProto_TYPE_SINT32: - varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" - case descriptor.FieldDescriptorProto_TYPE_SINT64: - varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" + g.RecordTypeUse(valField.GetTypeName()) default: - g.Fail("unhandled oneof field type ", field.Type.String()) + valType = strings.TrimPrefix(valType, "*") + } + + typename = fmt.Sprintf("map[%s]%s", keyType, valType) + mapFieldTypes[field] = typename // record for the getter generation + + tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", keyTag, valTag) + } + } + + dvalue := g.getterDefault(field, goTypeName) + if oneof { + tname := goTypeName + "_" + fieldName + // It is possible for this to collide with a message or enum + // nested in this message. Check for collisions. + for { + ok := true + for _, desc := range message.nested { + if CamelCaseSlice(desc.TypeName()) == tname { + ok = false + break + } } - // Tag and wire varint is known statically, - // so don't generate code for that part of the size computation. - tagAndWireSize := proto.SizeVarint(uint64(*field.Number << 3)) // wire doesn't affect varint size - g.P("n += ", tagAndWireSize, " // tag and wire") - if varint != "" { - g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") + for _, enum := range message.enums { + if CamelCaseSlice(enum.TypeName()) == tname { + ok = false + break + } } - if fixed != "" { - g.P("n += ", fixed) + if !ok { + tname += "_" + continue } - if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { - g.P("n += ", tagAndWireSize, " // tag and wire") + break + } + + oneofField := oFields[*field.OneofIndex] + tag := "protobuf:" + g.goTag(message, field, wiretype) + sf := oneofSubField{ + fieldCommon: fieldCommon{ + goName: fieldName, + getterName: fieldGetterName, + goType: typename, + tags: tag, + protoName: field.GetName(), + fullPath: fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i), + }, + protoTypeName: field.GetTypeName(), + fieldNumber: int(*field.Number), + protoType: *field.Type, + getterDef: dvalue, + protoDef: field.GetDefaultValue(), + oneofTypeName: tname, + } + oneofField.subFields = append(oneofField.subFields, &sf) + g.RecordTypeUse(field.GetTypeName()) + continue + } + + fieldDeprecated := "" + if field.GetOptions().GetDeprecated() { + fieldDeprecated = deprecationComment + } + + fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) + c, ok := g.makeComments(fieldFullPath) + if ok { + c += "\n" + } + rf := simpleField{ + fieldCommon: fieldCommon{ + goName: fieldName, + getterName: fieldGetterName, + goType: typename, + tags: tag, + protoName: field.GetName(), + fullPath: fieldFullPath, + }, + protoTypeName: field.GetTypeName(), + protoType: *field.Type, + deprecated: fieldDeprecated, + getterDef: dvalue, + protoDef: field.GetDefaultValue(), + comment: c, + } + var pf topLevelField = &rf + + topLevelFields = append(topLevelFields, pf) + g.RecordTypeUse(field.GetTypeName()) + } + + mc := &msgCtx{ + goName: goTypeName, + message: message, + } + + g.generateMessageStruct(mc, topLevelFields) + g.P() + g.generateCommonMethods(mc) + g.P() + g.generateDefaultConstants(mc, topLevelFields) + g.P() + g.generateGetters(mc, topLevelFields) + g.P() + g.generateSetters(mc, topLevelFields) + g.P() + g.generateOneofFuncs(mc, topLevelFields) + g.P() + + if !message.group { + + var oneofTypes []string + for _, f := range topLevelFields { + if of, ok := f.(*oneofField); ok { + for _, osf := range of.subFields { + oneofTypes = append(oneofTypes, osf.oneofTypeName) } } - g.P("case nil:") - g.P("default:") - g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") - g.P("}") } - g.P("return n") - g.P("}") - g.P() + + opts := message.Options + ms := &messageSymbol{ + sym: goTypeName, + hasExtensions: len(message.ExtensionRange) > 0, + isMessageSet: opts != nil && opts.GetMessageSetWireFormat(), + oneofTypes: oneofTypes, + } + g.file.addExport(message, ms) } for _, ext := range message.ext { @@ -2525,12 +2693,13 @@ func (g *Generator) generateMessage(message *Descriptor) { fullName = *g.file.Package + "." + fullName } - g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName) + g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], goTypeName, fullName) // Register types for native map types. for _, k := range mapFieldKeys(mapFieldTypes) { fullName := strings.TrimPrefix(*k.TypeName, ".") g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["proto"], mapFieldTypes[k], fullName) } + } type byTypeName []*descriptor.FieldDescriptorProto @@ -2656,7 +2825,6 @@ func (g *Generator) generateExtension(ext *ExtensionDescriptor) { } g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{") - g.In() g.P("ExtendedType: (", extendedType, ")(nil),") g.P("ExtensionType: (", fieldType, ")(nil),") g.P("Field: ", field.Number, ",") @@ -2664,7 +2832,6 @@ func (g *Generator) generateExtension(ext *ExtensionDescriptor) { g.P("Tag: ", tag, ",") g.P(`Filename: "`, g.file.GetName(), `",`) - g.Out() g.P("}") g.P() @@ -2692,11 +2859,9 @@ func (g *Generator) generateInitFunction() { return } g.P("func init() {") - g.In() for _, l := range g.init { g.P(l) } - g.Out() g.P("}") g.init = nil } @@ -2722,7 +2887,6 @@ func (g *Generator) generateFileDescriptor(file *FileDescriptor) { g.P() g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }") g.P("var ", v, " = []byte{") - g.In() g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto") for len(b) > 0 { n := 16 @@ -2738,7 +2902,6 @@ func (g *Generator) generateFileDescriptor(file *FileDescriptor) { b = b[n:] } - g.Out() g.P("}") } diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile b/deps/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile deleted file mode 100644 index bc0463d57..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/plugin/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Not stored here, but plugin.proto is in https://github.com/google/protobuf/ -# at src/google/protobuf/compiler/plugin.proto -# Also we need to fix an import. -regenerate: - @echo WARNING! THIS RULE IS PROBABLY NOT RIGHT FOR YOUR INSTALLATION - cp $(HOME)/src/protobuf/include/google/protobuf/compiler/plugin.proto . - protoc --go_out=Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor:../../../../.. \ - -I$(HOME)/src/protobuf/include $(HOME)/src/protobuf/include/google/protobuf/compiler/plugin.proto - -restore: - cp plugin.pb.golden plugin.pb.go - -preserve: - cp plugin.pb.go plugin.pb.golden diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile deleted file mode 100644 index a0bf9fefd..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2010 The Go Authors. All rights reserved. -# https://github.com/golang/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -all: - @echo run make test - -include ../../Make.protobuf - -test: golden testbuild - -#test: golden testbuild extension_test -# ./extension_test -# @echo PASS - -my_test/test.pb.go: my_test/test.proto - protoc --go_out=Mmulti/multi1.proto=github.com/golang/protobuf/protoc-gen-go/testdata/multi:. $< - -golden: - make -B my_test/test.pb.go - sed -i -e '/return.*fileDescriptor/d' my_test/test.pb.go - sed -i -e '/^var fileDescriptor/,/^}/d' my_test/test.pb.go - sed -i -e '/proto.RegisterFile.*fileDescriptor/d' my_test/test.pb.go - gofmt -w my_test/test.pb.go - diff -w my_test/test.pb.go my_test/test.pb.go.golden - -nuke: clean - -testbuild: regenerate - go test - -regenerate: - # Invoke protoc once to generate three independent .pb.go files in the same package. - protoc --go_out=. multi/multi1.proto multi/multi2.proto multi/multi3.proto - -#extension_test: extension_test.$O -# $(LD) -L. -o $@ $< - -#multi.a: multi3.pb.$O multi2.pb.$O multi1.pb.$O -# rm -f multi.a -# $(QUOTED_GOBIN)/gopack grc $@ $< - -#test.pb.go: imp.pb.go -#multi1.pb.go: multi2.pb.go multi3.pb.go -#main.$O: imp.pb.$O test.pb.$O multi.a -#extension_test.$O: extension_base.pb.$O extension_extra.pb.$O extension_user.pb.$O diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden deleted file mode 100644 index 784a4f865..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.pb.go.golden +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by protoc-gen-go. -// source: imp.proto -// DO NOT EDIT! - -package imp - -import proto "github.com/golang/protobuf/proto" -import "math" -import "os" -import imp1 "imp2.pb" - -// Reference proto & math imports to suppress error if they are not otherwise used. -var _ = proto.GetString -var _ = math.Inf - -// Types from public import imp2.proto -type PubliclyImportedMessage imp1.PubliclyImportedMessage - -func (this *PubliclyImportedMessage) Reset() { (*imp1.PubliclyImportedMessage)(this).Reset() } -func (this *PubliclyImportedMessage) String() string { - return (*imp1.PubliclyImportedMessage)(this).String() -} - -// PubliclyImportedMessage from public import imp.proto - -type ImportedMessage_Owner int32 - -const ( - ImportedMessage_DAVE ImportedMessage_Owner = 1 - ImportedMessage_MIKE ImportedMessage_Owner = 2 -) - -var ImportedMessage_Owner_name = map[int32]string{ - 1: "DAVE", - 2: "MIKE", -} -var ImportedMessage_Owner_value = map[string]int32{ - "DAVE": 1, - "MIKE": 2, -} - -// NewImportedMessage_Owner is deprecated. Use x.Enum() instead. -func NewImportedMessage_Owner(x ImportedMessage_Owner) *ImportedMessage_Owner { - e := ImportedMessage_Owner(x) - return &e -} -func (x ImportedMessage_Owner) Enum() *ImportedMessage_Owner { - p := new(ImportedMessage_Owner) - *p = x - return p -} -func (x ImportedMessage_Owner) String() string { - return proto.EnumName(ImportedMessage_Owner_name, int32(x)) -} - -type ImportedMessage struct { - Field *int64 `protobuf:"varint,1,req,name=field" json:"field,omitempty"` - XXX_extensions map[int32][]byte `json:",omitempty"` - XXX_unrecognized []byte `json:",omitempty"` -} - -func (this *ImportedMessage) Reset() { *this = ImportedMessage{} } -func (this *ImportedMessage) String() string { return proto.CompactTextString(this) } - -var extRange_ImportedMessage = []proto.ExtensionRange{ - proto.ExtensionRange{90, 100}, -} - -func (*ImportedMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ImportedMessage -} -func (this *ImportedMessage) ExtensionMap() map[int32][]byte { - if this.XXX_extensions == nil { - this.XXX_extensions = make(map[int32][]byte) - } - return this.XXX_extensions -} - -type ImportedExtendable struct { - XXX_extensions map[int32][]byte `json:",omitempty"` - XXX_unrecognized []byte `json:",omitempty"` -} - -func (this *ImportedExtendable) Reset() { *this = ImportedExtendable{} } -func (this *ImportedExtendable) String() string { return proto.CompactTextString(this) } - -func (this *ImportedExtendable) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(this.ExtensionMap()) -} -func (this *ImportedExtendable) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, this.ExtensionMap()) -} -// ensure ImportedExtendable satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*ImportedExtendable)(nil) -var _ proto.Unmarshaler = (*ImportedExtendable)(nil) - -var extRange_ImportedExtendable = []proto.ExtensionRange{ - proto.ExtensionRange{100, 536870911}, -} - -func (*ImportedExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ImportedExtendable -} -func (this *ImportedExtendable) ExtensionMap() map[int32][]byte { - if this.XXX_extensions == nil { - this.XXX_extensions = make(map[int32][]byte) - } - return this.XXX_extensions -} - -func init() { - proto.RegisterEnum("imp.ImportedMessage_Owner", ImportedMessage_Owner_name, ImportedMessage_Owner_value) -} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto deleted file mode 100644 index 156e078d1..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2010 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package imp; - -import "imp2.proto"; -import "imp3.proto"; - -message ImportedMessage { - required int64 field = 1; - - // The forwarded getters for these fields are fiddly to get right. - optional ImportedMessage2 local_msg = 2; - optional ForeignImportedMessage foreign_msg = 3; // in imp3.proto - optional Owner enum_field = 4; - oneof union { - int32 state = 9; - } - - repeated string name = 5; - repeated Owner boss = 6; - repeated ImportedMessage2 memo = 7; - - map msg_map = 8; - - enum Owner { - DAVE = 1; - MIKE = 2; - } - - extensions 90 to 100; -} - -message ImportedMessage2 { -} - -message ImportedExtendable { - option message_set_wire_format = true; - extensions 100 to max; -} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto deleted file mode 100644 index 3bb0632b2..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp2.proto +++ /dev/null @@ -1,43 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2011 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package imp; - -message PubliclyImportedMessage { - optional int64 field = 1; -} - -enum PubliclyImportedEnum { - GLASSES = 1; - HAIR = 2; -} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto deleted file mode 100644 index 58fc7598b..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/imp3.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2012 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; - -package imp; - -message ForeignImportedMessage { - optional string tuber = 1; -} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go index 8cf6a698f..a033f8b06 100644 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go +++ b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go @@ -669,6 +669,13 @@ func (m *Communique) XXX_DiscardUnknown() { var xxx_messageInfo_Communique proto.InternalMessageInfo +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + type isCommunique_Union interface { isCommunique_Union() } @@ -676,43 +683,61 @@ type isCommunique_Union interface { type Communique_Number struct { Number int32 `protobuf:"varint,5,opt,name=number,oneof"` } + type Communique_Name struct { Name string `protobuf:"bytes,6,opt,name=name,oneof"` } + type Communique_Data struct { Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` } + type Communique_TempC struct { TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` } + type Communique_Height struct { Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` } + type Communique_Today struct { Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` } + type Communique_Maybe struct { Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` } + type Communique_Delta_ struct { Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` } + type Communique_Msg struct { Msg *Reply `protobuf:"bytes,16,opt,name=msg,oneof"` } + type Communique_Somegroup struct { Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` } -func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Height) isCommunique_Union() {} -func (*Communique_Today) isCommunique_Union() {} -func (*Communique_Maybe) isCommunique_Union() {} -func (*Communique_Delta_) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} +func (*Communique_Number) isCommunique_Union() {} + +func (*Communique_Name) isCommunique_Union() {} + +func (*Communique_Data) isCommunique_Union() {} + +func (*Communique_TempC) isCommunique_Union() {} + +func (*Communique_Height) isCommunique_Union() {} + +func (*Communique_Today) isCommunique_Union() {} + +func (*Communique_Maybe) isCommunique_Union() {} + +func (*Communique_Delta_) isCommunique_Union() {} + +func (*Communique_Msg) isCommunique_Union() {} + func (*Communique_Somegroup) isCommunique_Union() {} func (m *Communique) GetUnion() isCommunique_Union { @@ -722,13 +747,6 @@ func (m *Communique) GetUnion() isCommunique_Union { return nil } -func (m *Communique) GetMakeMeCry() bool { - if m != nil && m.MakeMeCry != nil { - return *m.MakeMeCry - } - return false -} - func (m *Communique) GetNumber() int32 { if x, ok := m.GetUnion().(*Communique_Number); ok { return x.Number diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden deleted file mode 100644 index 1954e3fb7..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/my_test/test.pb.go.golden +++ /dev/null @@ -1,870 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: my_test/test.proto - -/* -Package my_test is a generated protocol buffer package. - -This package holds interesting messages. - -It is generated from these files: - my_test/test.proto - -It has these top-level messages: - Request - Reply - OtherBase - ReplyExtensions - OtherReplyExtensions - OldReply - Communique -*/ -package my_test - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi" - -// 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 HatType int32 - -const ( - // deliberately skipping 0 - HatType_FEDORA HatType = 1 - HatType_FEZ HatType = 2 -) - -var HatType_name = map[int32]string{ - 1: "FEDORA", - 2: "FEZ", -} -var HatType_value = map[string]int32{ - "FEDORA": 1, - "FEZ": 2, -} - -func (x HatType) Enum() *HatType { - p := new(HatType) - *p = x - return p -} -func (x HatType) String() string { - return proto.EnumName(HatType_name, int32(x)) -} -func (x *HatType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") - if err != nil { - return err - } - *x = HatType(value) - return nil -} - -// This enum represents days of the week. -type Days int32 - -const ( - Days_MONDAY Days = 1 - Days_TUESDAY Days = 2 - Days_LUNDI Days = 1 -) - -var Days_name = map[int32]string{ - 1: "MONDAY", - 2: "TUESDAY", - // Duplicate value: 1: "LUNDI", -} -var Days_value = map[string]int32{ - "MONDAY": 1, - "TUESDAY": 2, - "LUNDI": 1, -} - -func (x Days) Enum() *Days { - p := new(Days) - *p = x - return p -} -func (x Days) String() string { - return proto.EnumName(Days_name, int32(x)) -} -func (x *Days) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") - if err != nil { - return err - } - *x = Days(value) - return nil -} - -type Request_Color int32 - -const ( - Request_RED Request_Color = 0 - Request_GREEN Request_Color = 1 - Request_BLUE Request_Color = 2 -) - -var Request_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Request_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Request_Color) Enum() *Request_Color { - p := new(Request_Color) - *p = x - return p -} -func (x Request_Color) String() string { - return proto.EnumName(Request_Color_name, int32(x)) -} -func (x *Request_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") - if err != nil { - return err - } - *x = Request_Color(value) - return nil -} - -type Reply_Entry_Game int32 - -const ( - Reply_Entry_FOOTBALL Reply_Entry_Game = 1 - Reply_Entry_TENNIS Reply_Entry_Game = 2 -) - -var Reply_Entry_Game_name = map[int32]string{ - 1: "FOOTBALL", - 2: "TENNIS", -} -var Reply_Entry_Game_value = map[string]int32{ - "FOOTBALL": 1, - "TENNIS": 2, -} - -func (x Reply_Entry_Game) Enum() *Reply_Entry_Game { - p := new(Reply_Entry_Game) - *p = x - return p -} -func (x Reply_Entry_Game) String() string { - return proto.EnumName(Reply_Entry_Game_name, int32(x)) -} -func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") - if err != nil { - return err - } - *x = Reply_Entry_Game(value) - return nil -} - -// This is a message that might be sent somewhere. -type Request struct { - Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"` - // optional imp.ImportedMessage imported_message = 2; - Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"` - Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"` - // optional imp.ImportedMessage.Owner owner = 6; - Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"` - Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` - // This is a map field. It will generate map[int32]string. - NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // This is a map field whose value type is a message. - MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` - // This field should not conflict with any getters. - GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} - -const Default_Request_Hat HatType = HatType_FEDORA - -var Default_Request_Deadline float32 = float32(math.Inf(1)) - -func (m *Request) GetKey() []int64 { - if m != nil { - return m.Key - } - return nil -} - -func (m *Request) GetHue() Request_Color { - if m != nil && m.Hue != nil { - return *m.Hue - } - return Request_RED -} - -func (m *Request) GetHat() HatType { - if m != nil && m.Hat != nil { - return *m.Hat - } - return Default_Request_Hat -} - -func (m *Request) GetDeadline() float32 { - if m != nil && m.Deadline != nil { - return *m.Deadline - } - return Default_Request_Deadline -} - -func (m *Request) GetSomegroup() *Request_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *Request) GetNameMapping() map[int32]string { - if m != nil { - return m.NameMapping - } - return nil -} - -func (m *Request) GetMsgMapping() map[int64]*Reply { - if m != nil { - return m.MsgMapping - } - return nil -} - -func (m *Request) GetReset_() int32 { - if m != nil && m.Reset_ != nil { - return *m.Reset_ - } - return 0 -} - -func (m *Request) GetGetKey_() string { - if m != nil && m.GetKey_ != nil { - return *m.GetKey_ - } - return "" -} - -type Request_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} } -func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*Request_SomeGroup) ProtoMessage() {} - -func (m *Request_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Reply struct { - Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` - CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Reply) Reset() { *m = Reply{} } -func (m *Reply) String() string { return proto.CompactTextString(m) } -func (*Reply) ProtoMessage() {} - -var extRange_Reply = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Reply -} - -func (m *Reply) GetFound() []*Reply_Entry { - if m != nil { - return m.Found - } - return nil -} - -func (m *Reply) GetCompactKeys() []int32 { - if m != nil { - return m.CompactKeys - } - return nil -} - -type Reply_Entry struct { - KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"` - Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"` - XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Reply_Entry) Reset() { *m = Reply_Entry{} } -func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } -func (*Reply_Entry) ProtoMessage() {} - -const Default_Reply_Entry_Value int64 = 7 - -func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 { - if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil { - return *m.KeyThatNeeds_1234Camel_CasIng - } - return 0 -} - -func (m *Reply_Entry) GetValue() int64 { - if m != nil && m.Value != nil { - return *m.Value - } - return Default_Reply_Entry_Value -} - -func (m *Reply_Entry) GetXMyFieldName_2() int64 { - if m != nil && m.XMyFieldName_2 != nil { - return *m.XMyFieldName_2 - } - return 0 -} - -type OtherBase struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherBase) Reset() { *m = OtherBase{} } -func (m *OtherBase) String() string { return proto.CompactTextString(m) } -func (*OtherBase) ProtoMessage() {} - -var extRange_OtherBase = []proto.ExtensionRange{ - {100, 536870911}, -} - -func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherBase -} - -func (m *OtherBase) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type ReplyExtensions struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} } -func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } -func (*ReplyExtensions) ProtoMessage() {} - -var E_ReplyExtensions_Time = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*float64)(nil), - Field: 101, - Name: "my.test.ReplyExtensions.time", - Tag: "fixed64,101,opt,name=time", - Filename: "my_test/test.proto", -} - -var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*ReplyExtensions)(nil), - Field: 105, - Name: "my.test.ReplyExtensions.carrot", - Tag: "bytes,105,opt,name=carrot", - Filename: "my_test/test.proto", -} - -var E_ReplyExtensions_Donut = &proto.ExtensionDesc{ - ExtendedType: (*OtherBase)(nil), - ExtensionType: (*ReplyExtensions)(nil), - Field: 101, - Name: "my.test.ReplyExtensions.donut", - Tag: "bytes,101,opt,name=donut", - Filename: "my_test/test.proto", -} - -type OtherReplyExtensions struct { - Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} } -func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } -func (*OtherReplyExtensions) ProtoMessage() {} - -func (m *OtherReplyExtensions) GetKey() int32 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -type OldReply struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldReply) Reset() { *m = OldReply{} } -func (m *OldReply) String() string { return proto.CompactTextString(m) } -func (*OldReply) ProtoMessage() {} - -func (m *OldReply) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(&m.XXX_InternalExtensions) -} -func (m *OldReply) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions) -} -func (m *OldReply) MarshalJSON() ([]byte, error) { - return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) -} -func (m *OldReply) UnmarshalJSON(buf []byte) error { - return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) -} - -// ensure OldReply satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*OldReply)(nil) -var _ proto.Unmarshaler = (*OldReply)(nil) - -var extRange_OldReply = []proto.ExtensionRange{ - {100, 2147483646}, -} - -func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OldReply -} - -type Communique struct { - MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` - // This is a oneof, called "union". - // - // Types that are valid to be assigned to Union: - // *Communique_Number - // *Communique_Name - // *Communique_Data - // *Communique_TempC - // *Communique_Height - // *Communique_Today - // *Communique_Maybe - // *Communique_Delta_ - // *Communique_Msg - // *Communique_Somegroup - Union isCommunique_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique) Reset() { *m = Communique{} } -func (m *Communique) String() string { return proto.CompactTextString(m) } -func (*Communique) ProtoMessage() {} - -type isCommunique_Union interface { - isCommunique_Union() -} - -type Communique_Number struct { - Number int32 `protobuf:"varint,5,opt,name=number,oneof"` -} -type Communique_Name struct { - Name string `protobuf:"bytes,6,opt,name=name,oneof"` -} -type Communique_Data struct { - Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` -} -type Communique_TempC struct { - TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` -} -type Communique_Height struct { - Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` -} -type Communique_Today struct { - Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` -} -type Communique_Maybe struct { - Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` -} -type Communique_Delta_ struct { - Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` -} -type Communique_Msg struct { - Msg *Reply `protobuf:"bytes,13,opt,name=msg,oneof"` -} -type Communique_Somegroup struct { - Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` -} - -func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Height) isCommunique_Union() {} -func (*Communique_Today) isCommunique_Union() {} -func (*Communique_Maybe) isCommunique_Union() {} -func (*Communique_Delta_) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} -func (*Communique_Somegroup) isCommunique_Union() {} - -func (m *Communique) GetUnion() isCommunique_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *Communique) GetMakeMeCry() bool { - if m != nil && m.MakeMeCry != nil { - return *m.MakeMeCry - } - return false -} - -func (m *Communique) GetNumber() int32 { - if x, ok := m.GetUnion().(*Communique_Number); ok { - return x.Number - } - return 0 -} - -func (m *Communique) GetName() string { - if x, ok := m.GetUnion().(*Communique_Name); ok { - return x.Name - } - return "" -} - -func (m *Communique) GetData() []byte { - if x, ok := m.GetUnion().(*Communique_Data); ok { - return x.Data - } - return nil -} - -func (m *Communique) GetTempC() float64 { - if x, ok := m.GetUnion().(*Communique_TempC); ok { - return x.TempC - } - return 0 -} - -func (m *Communique) GetHeight() float32 { - if x, ok := m.GetUnion().(*Communique_Height); ok { - return x.Height - } - return 0 -} - -func (m *Communique) GetToday() Days { - if x, ok := m.GetUnion().(*Communique_Today); ok { - return x.Today - } - return Days_MONDAY -} - -func (m *Communique) GetMaybe() bool { - if x, ok := m.GetUnion().(*Communique_Maybe); ok { - return x.Maybe - } - return false -} - -func (m *Communique) GetDelta() int32 { - if x, ok := m.GetUnion().(*Communique_Delta_); ok { - return x.Delta - } - return 0 -} - -func (m *Communique) GetMsg() *Reply { - if x, ok := m.GetUnion().(*Communique_Msg); ok { - return x.Msg - } - return nil -} - -func (m *Communique) GetSomegroup() *Communique_SomeGroup { - if x, ok := m.GetUnion().(*Communique_Somegroup); ok { - return x.Somegroup - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*Communique) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ - (*Communique_Number)(nil), - (*Communique_Name)(nil), - (*Communique_Data)(nil), - (*Communique_TempC)(nil), - (*Communique_Height)(nil), - (*Communique_Today)(nil), - (*Communique_Maybe)(nil), - (*Communique_Delta_)(nil), - (*Communique_Msg)(nil), - (*Communique_Somegroup)(nil), - } -} - -func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - b.EncodeVarint(5<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Number)) - case *Communique_Name: - b.EncodeVarint(6<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Name) - case *Communique_Data: - b.EncodeVarint(7<<3 | proto.WireBytes) - b.EncodeRawBytes(x.Data) - case *Communique_TempC: - b.EncodeVarint(8<<3 | proto.WireFixed64) - b.EncodeFixed64(math.Float64bits(x.TempC)) - case *Communique_Height: - b.EncodeVarint(9<<3 | proto.WireFixed32) - b.EncodeFixed32(uint64(math.Float32bits(x.Height))) - case *Communique_Today: - b.EncodeVarint(10<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.Today)) - case *Communique_Maybe: - t := uint64(0) - if x.Maybe { - t = 1 - } - b.EncodeVarint(11<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *Communique_Delta_: - b.EncodeVarint(12<<3 | proto.WireVarint) - b.EncodeZigzag32(uint64(x.Delta)) - case *Communique_Msg: - b.EncodeVarint(13<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case *Communique_Somegroup: - b.EncodeVarint(14<<3 | proto.WireStartGroup) - if err := b.Marshal(x.Somegroup); err != nil { - return err - } - b.EncodeVarint(14<<3 | proto.WireEndGroup) - case nil: - default: - return fmt.Errorf("Communique.Union has unexpected type %T", x) - } - return nil -} - -func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*Communique) - switch tag { - case 5: // union.number - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Number{int32(x)} - return true, err - case 6: // union.name - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Union = &Communique_Name{x} - return true, err - case 7: // union.data - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Union = &Communique_Data{x} - return true, err - case 8: // union.temp_c - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.Union = &Communique_TempC{math.Float64frombits(x)} - return true, err - case 9: // union.height - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Communique_Height{math.Float32frombits(uint32(x))} - return true, err - case 10: // union.today - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Today{Days(x)} - return true, err - case 11: // union.maybe - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Maybe{x != 0} - return true, err - case 12: // union.delta - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.Union = &Communique_Delta_{int32(x)} - return true, err - case 13: // union.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Reply) - err := b.DecodeMessage(msg) - m.Union = &Communique_Msg{msg} - return true, err - case 14: // union.somegroup - if wire != proto.WireStartGroup { - return true, proto.ErrInternalBadWireType - } - msg := new(Communique_SomeGroup) - err := b.DecodeGroup(msg) - m.Union = &Communique_Somegroup{msg} - return true, err - default: - return false, nil - } -} - -func _Communique_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Number)) - case *Communique_Name: - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Name))) - n += len(x.Name) - case *Communique_Data: - n += proto.SizeVarint(7<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Data))) - n += len(x.Data) - case *Communique_TempC: - n += proto.SizeVarint(8<<3 | proto.WireFixed64) - n += 8 - case *Communique_Height: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *Communique_Today: - n += proto.SizeVarint(10<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Today)) - case *Communique_Maybe: - n += proto.SizeVarint(11<<3 | proto.WireVarint) - n += 1 - case *Communique_Delta_: - n += proto.SizeVarint(12<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) - case *Communique_Msg: - s := proto.Size(x.Msg) - n += proto.SizeVarint(13<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Communique_Somegroup: - n += proto.SizeVarint(14<<3 | proto.WireStartGroup) - n += proto.Size(x.Somegroup) - n += proto.SizeVarint(14<<3 | proto.WireEndGroup) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Communique_SomeGroup struct { - Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} } -func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*Communique_SomeGroup) ProtoMessage() {} - -func (m *Communique_SomeGroup) GetMember() string { - if m != nil && m.Member != nil { - return *m.Member - } - return "" -} - -type Communique_Delta struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique_Delta) Reset() { *m = Communique_Delta{} } -func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } -func (*Communique_Delta) ProtoMessage() {} - -var E_Tag = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*string)(nil), - Field: 103, - Name: "my.test.tag", - Tag: "bytes,103,opt,name=tag", - Filename: "my_test/test.proto", -} - -var E_Donut = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*OtherReplyExtensions)(nil), - Field: 106, - Name: "my.test.donut", - Tag: "bytes,106,opt,name=donut", - Filename: "my_test/test.proto", -} - -func init() { - proto.RegisterType((*Request)(nil), "my.test.Request") - proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup") - proto.RegisterType((*Reply)(nil), "my.test.Reply") - proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") - proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") - proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") - proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") - proto.RegisterType((*OldReply)(nil), "my.test.OldReply") - proto.RegisterType((*Communique)(nil), "my.test.Communique") - proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") - proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") - proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) - proto.RegisterEnum("my.test.Days", Days_name, Days_value) - proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) - proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) - proto.RegisterExtension(E_ReplyExtensions_Time) - proto.RegisterExtension(E_ReplyExtensions_Carrot) - proto.RegisterExtension(E_ReplyExtensions_Donut) - proto.RegisterExtension(E_Tag) - proto.RegisterExtension(E_Donut) -} diff --git a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto b/deps/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto deleted file mode 100644 index 869b9af5a..000000000 --- a/deps/github.com/golang/protobuf/protoc-gen-go/testdata/proto3.proto +++ /dev/null @@ -1,53 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2014 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package proto3; - -message Request { - enum Flavour { - SWEET = 0; - SOUR = 1; - UMAMI = 2; - GOPHERLICIOUS = 3; - } - string name = 1; - repeated int64 key = 2; - Flavour taste = 3; - Book book = 4; - repeated int64 unpacked = 5 [packed=false]; -} - -message Book { - string title = 1; - bytes raw_data = 2; -} diff --git a/deps/github.com/golang/protobuf/ptypes/regen.sh b/deps/github.com/golang/protobuf/ptypes/regen.sh deleted file mode 100755 index b50a9414a..000000000 --- a/deps/github.com/golang/protobuf/ptypes/regen.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -e -# -# This script fetches and rebuilds the "well-known types" protocol buffers. -# To run this you will need protoc and goprotobuf installed; -# see https://github.com/golang/protobuf for instructions. -# You also need Go and Git installed. - -PKG=github.com/golang/protobuf/ptypes -UPSTREAM=https://github.com/google/protobuf -UPSTREAM_SUBDIR=src/google/protobuf -PROTO_FILES=(any duration empty struct timestamp wrappers) - -function die() { - echo 1>&2 $* - exit 1 -} - -# Sanity check that the right tools are accessible. -for tool in go git protoc protoc-gen-go; do - q=$(which $tool) || die "didn't find $tool" - echo 1>&2 "$tool: $q" -done - -tmpdir=$(mktemp -d -t regen-wkt.XXXXXX) -trap 'rm -rf $tmpdir' EXIT - -echo -n 1>&2 "finding package dir... " -pkgdir=$(go list -f '{{.Dir}}' $PKG) -echo 1>&2 $pkgdir -base=$(echo $pkgdir | sed "s,/$PKG\$,,") -echo 1>&2 "base: $base" -cd "$base" - -echo 1>&2 "fetching latest protos... " -git clone -q $UPSTREAM $tmpdir - -for file in ${PROTO_FILES[@]}; do - echo 1>&2 "* $file" - protoc --go_out=. -I$tmpdir/src $tmpdir/src/google/protobuf/$file.proto || die - cp $tmpdir/src/google/protobuf/$file.proto $PKG/$file -done - -echo 1>&2 "All OK" diff --git a/deps/github.com/golang/protobuf/ptypes/struct/struct.pb.go b/deps/github.com/golang/protobuf/ptypes/struct/struct.pb.go index 2ac3e6586..ee6382e14 100644 --- a/deps/github.com/golang/protobuf/ptypes/struct/struct.pb.go +++ b/deps/github.com/golang/protobuf/ptypes/struct/struct.pb.go @@ -146,28 +146,38 @@ type isValue_Kind interface { type Value_NullValue struct { NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"` } + type Value_NumberValue struct { NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"` } + type Value_StringValue struct { StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` } + type Value_BoolValue struct { BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"` } + type Value_StructValue struct { StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"` } + type Value_ListValue struct { ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"` } -func (*Value_NullValue) isValue_Kind() {} +func (*Value_NullValue) isValue_Kind() {} + func (*Value_NumberValue) isValue_Kind() {} + func (*Value_StringValue) isValue_Kind() {} -func (*Value_BoolValue) isValue_Kind() {} + +func (*Value_BoolValue) isValue_Kind() {} + func (*Value_StructValue) isValue_Kind() {} -func (*Value_ListValue) isValue_Kind() {} + +func (*Value_ListValue) isValue_Kind() {} func (m *Value) GetKind() isValue_Kind { if m != nil { diff --git a/deps/github.com/google/btree/.travis.yml b/deps/github.com/google/btree/.travis.yml new file mode 100644 index 000000000..4f2ee4d97 --- /dev/null +++ b/deps/github.com/google/btree/.travis.yml @@ -0,0 +1 @@ +language: go diff --git a/deps/github.com/google/btree/LICENSE b/deps/github.com/google/btree/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/deps/github.com/google/btree/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/deps/github.com/google/btree/README.md b/deps/github.com/google/btree/README.md new file mode 100644 index 000000000..6062a4dac --- /dev/null +++ b/deps/github.com/google/btree/README.md @@ -0,0 +1,12 @@ +# BTree implementation for Go + +![Travis CI Build Status](https://api.travis-ci.org/google/btree.svg?branch=master) + +This package provides an in-memory B-Tree implementation for Go, useful as +an ordered, mutable data structure. + +The API is based off of the wonderful +http://godoc.org/github.com/petar/GoLLRB/llrb, and is meant to allow btree to +act as a drop-in replacement for gollrb trees. + +See http://godoc.org/github.com/google/btree for documentation. diff --git a/deps/github.com/google/btree/btree.go b/deps/github.com/google/btree/btree.go new file mode 100644 index 000000000..fc5aaaa13 --- /dev/null +++ b/deps/github.com/google/btree/btree.go @@ -0,0 +1,649 @@ +// Copyright 2014 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package btree implements in-memory B-Trees of arbitrary degree. +// +// btree implements an in-memory B-Tree for use as an ordered data structure. +// It is not meant for persistent storage solutions. +// +// It has a flatter structure than an equivalent red-black or other binary tree, +// which in some cases yields better memory usage and/or performance. +// See some discussion on the matter here: +// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// Note, though, that this project is in no way related to the C++ B-Tree +// implmentation written about there. +// +// Within this tree, each node contains a slice of items and a (possibly nil) +// slice of children. For basic numeric values or raw structs, this can cause +// efficiency differences when compared to equivalent C++ template code that +// stores values in arrays within the node: +// * Due to the overhead of storing values as interfaces (each +// value needs to be stored as the value itself, then 2 words for the +// interface pointing to that value and its type), resulting in higher +// memory use. +// * Since interfaces can point to values anywhere in memory, values are +// most likely not stored in contiguous blocks, resulting in a higher +// number of cache misses. +// These issues don't tend to matter, though, when working with strings or other +// heap-allocated structures, since C++-equivalent structures also must store +// pointers and also distribute their values across the heap. +// +// This implementation is designed to be a drop-in replacement to gollrb.LLRB +// trees, (http://github.com/petar/gollrb), an excellent and probably the most +// widely used ordered tree implementation in the Go ecosystem currently. +// Its functions, therefore, exactly mirror those of +// llrb.LLRB where possible. Unlike gollrb, though, we currently don't +// support storing multiple equivalent values or backwards iteration. +package btree + +import ( + "fmt" + "io" + "sort" + "strings" +) + +// Item represents a single object in the tree. +type Item interface { + // Less tests whether the current item is less than the given argument. + // + // This must provide a strict weak ordering. + // If !a.Less(b) && !b.Less(a), we treat this to mean a == b (i.e. we can only + // hold one of either a or b in the tree). + Less(than Item) bool +} + +const ( + DefaultFreeListSize = 32 +) + +// FreeList represents a free list of btree nodes. By default each +// BTree has its own FreeList, but multiple BTrees can share the same +// FreeList. +// Two Btrees using the same freelist are not safe for concurrent write access. +type FreeList struct { + freelist []*node +} + +// NewFreeList creates a new free list. +// size is the maximum size of the returned free list. +func NewFreeList(size int) *FreeList { + return &FreeList{freelist: make([]*node, 0, size)} +} + +func (f *FreeList) newNode() (n *node) { + index := len(f.freelist) - 1 + if index < 0 { + return new(node) + } + f.freelist, n = f.freelist[:index], f.freelist[index] + return +} + +func (f *FreeList) freeNode(n *node) { + if len(f.freelist) < cap(f.freelist) { + f.freelist = append(f.freelist, n) + } +} + +// ItemIterator allows callers of Ascend* to iterate in-order over portions of +// the tree. When this function returns false, iteration will stop and the +// associated Ascend* function will immediately return. +type ItemIterator func(i Item) bool + +// New creates a new B-Tree with the given degree. +// +// New(2), for example, will create a 2-3-4 tree (each node contains 1-3 items +// and 2-4 children). +func New(degree int) *BTree { + return NewWithFreeList(degree, NewFreeList(DefaultFreeListSize)) +} + +// NewWithFreeList creates a new B-Tree that uses the given node free list. +func NewWithFreeList(degree int, f *FreeList) *BTree { + if degree <= 1 { + panic("bad degree") + } + return &BTree{ + degree: degree, + freelist: f, + } +} + +// items stores items in a node. +type items []Item + +// insertAt inserts a value into the given index, pushing all subsequent values +// forward. +func (s *items) insertAt(index int, item Item) { + *s = append(*s, nil) + if index < len(*s) { + copy((*s)[index+1:], (*s)[index:]) + } + (*s)[index] = item +} + +// removeAt removes a value at a given index, pulling all subsequent values +// back. +func (s *items) removeAt(index int) Item { + item := (*s)[index] + (*s)[index] = nil + copy((*s)[index:], (*s)[index+1:]) + *s = (*s)[:len(*s)-1] + return item +} + +// pop removes and returns the last element in the list. +func (s *items) pop() (out Item) { + index := len(*s) - 1 + out = (*s)[index] + (*s)[index] = nil + *s = (*s)[:index] + return +} + +// find returns the index where the given item should be inserted into this +// list. 'found' is true if the item already exists in the list at the given +// index. +func (s items) find(item Item) (index int, found bool) { + i := sort.Search(len(s), func(i int) bool { + return item.Less(s[i]) + }) + if i > 0 && !s[i-1].Less(item) { + return i - 1, true + } + return i, false +} + +// children stores child nodes in a node. +type children []*node + +// insertAt inserts a value into the given index, pushing all subsequent values +// forward. +func (s *children) insertAt(index int, n *node) { + *s = append(*s, nil) + if index < len(*s) { + copy((*s)[index+1:], (*s)[index:]) + } + (*s)[index] = n +} + +// removeAt removes a value at a given index, pulling all subsequent values +// back. +func (s *children) removeAt(index int) *node { + n := (*s)[index] + (*s)[index] = nil + copy((*s)[index:], (*s)[index+1:]) + *s = (*s)[:len(*s)-1] + return n +} + +// pop removes and returns the last element in the list. +func (s *children) pop() (out *node) { + index := len(*s) - 1 + out = (*s)[index] + (*s)[index] = nil + *s = (*s)[:index] + return +} + +// node is an internal node in a tree. +// +// It must at all times maintain the invariant that either +// * len(children) == 0, len(items) unconstrained +// * len(children) == len(items) + 1 +type node struct { + items items + children children + t *BTree +} + +// split splits the given node at the given index. The current node shrinks, +// and this function returns the item that existed at that index and a new node +// containing all items/children after it. +func (n *node) split(i int) (Item, *node) { + item := n.items[i] + next := n.t.newNode() + next.items = append(next.items, n.items[i+1:]...) + n.items = n.items[:i] + if len(n.children) > 0 { + next.children = append(next.children, n.children[i+1:]...) + n.children = n.children[:i+1] + } + return item, next +} + +// maybeSplitChild checks if a child should be split, and if so splits it. +// Returns whether or not a split occurred. +func (n *node) maybeSplitChild(i, maxItems int) bool { + if len(n.children[i].items) < maxItems { + return false + } + first := n.children[i] + item, second := first.split(maxItems / 2) + n.items.insertAt(i, item) + n.children.insertAt(i+1, second) + return true +} + +// insert inserts an item into the subtree rooted at this node, making sure +// no nodes in the subtree exceed maxItems items. Should an equivalent item be +// be found/replaced by insert, it will be returned. +func (n *node) insert(item Item, maxItems int) Item { + i, found := n.items.find(item) + if found { + out := n.items[i] + n.items[i] = item + return out + } + if len(n.children) == 0 { + n.items.insertAt(i, item) + return nil + } + if n.maybeSplitChild(i, maxItems) { + inTree := n.items[i] + switch { + case item.Less(inTree): + // no change, we want first split node + case inTree.Less(item): + i++ // we want second split node + default: + out := n.items[i] + n.items[i] = item + return out + } + } + return n.children[i].insert(item, maxItems) +} + +// get finds the given key in the subtree and returns it. +func (n *node) get(key Item) Item { + i, found := n.items.find(key) + if found { + return n.items[i] + } else if len(n.children) > 0 { + return n.children[i].get(key) + } + return nil +} + +// min returns the first item in the subtree. +func min(n *node) Item { + if n == nil { + return nil + } + for len(n.children) > 0 { + n = n.children[0] + } + if len(n.items) == 0 { + return nil + } + return n.items[0] +} + +// max returns the last item in the subtree. +func max(n *node) Item { + if n == nil { + return nil + } + for len(n.children) > 0 { + n = n.children[len(n.children)-1] + } + if len(n.items) == 0 { + return nil + } + return n.items[len(n.items)-1] +} + +// toRemove details what item to remove in a node.remove call. +type toRemove int + +const ( + removeItem toRemove = iota // removes the given item + removeMin // removes smallest item in the subtree + removeMax // removes largest item in the subtree +) + +// remove removes an item from the subtree rooted at this node. +func (n *node) remove(item Item, minItems int, typ toRemove) Item { + var i int + var found bool + switch typ { + case removeMax: + if len(n.children) == 0 { + return n.items.pop() + } + i = len(n.items) + case removeMin: + if len(n.children) == 0 { + return n.items.removeAt(0) + } + i = 0 + case removeItem: + i, found = n.items.find(item) + if len(n.children) == 0 { + if found { + return n.items.removeAt(i) + } + return nil + } + default: + panic("invalid type") + } + // If we get to here, we have children. + child := n.children[i] + if len(child.items) <= minItems { + return n.growChildAndRemove(i, item, minItems, typ) + } + // Either we had enough items to begin with, or we've done some + // merging/stealing, because we've got enough now and we're ready to return + // stuff. + if found { + // The item exists at index 'i', and the child we've selected can give us a + // predecessor, since if we've gotten here it's got > minItems items in it. + out := n.items[i] + // We use our special-case 'remove' call with typ=maxItem to pull the + // predecessor of item i (the rightmost leaf of our immediate left child) + // and set it into where we pulled the item from. + n.items[i] = child.remove(nil, minItems, removeMax) + return out + } + // Final recursive call. Once we're here, we know that the item isn't in this + // node and that the child is big enough to remove from. + return child.remove(item, minItems, typ) +} + +// growChildAndRemove grows child 'i' to make sure it's possible to remove an +// item from it while keeping it at minItems, then calls remove to actually +// remove it. +// +// Most documentation says we have to do two sets of special casing: +// 1) item is in this node +// 2) item is in child +// In both cases, we need to handle the two subcases: +// A) node has enough values that it can spare one +// B) node doesn't have enough values +// For the latter, we have to check: +// a) left sibling has node to spare +// b) right sibling has node to spare +// c) we must merge +// To simplify our code here, we handle cases #1 and #2 the same: +// If a node doesn't have enough items, we make sure it does (using a,b,c). +// We then simply redo our remove call, and the second time (regardless of +// whether we're in case 1 or 2), we'll have enough items and can guarantee +// that we hit case A. +func (n *node) growChildAndRemove(i int, item Item, minItems int, typ toRemove) Item { + child := n.children[i] + if i > 0 && len(n.children[i-1].items) > minItems { + // Steal from left child + stealFrom := n.children[i-1] + stolenItem := stealFrom.items.pop() + child.items.insertAt(0, n.items[i-1]) + n.items[i-1] = stolenItem + if len(stealFrom.children) > 0 { + child.children.insertAt(0, stealFrom.children.pop()) + } + } else if i < len(n.items) && len(n.children[i+1].items) > minItems { + // steal from right child + stealFrom := n.children[i+1] + stolenItem := stealFrom.items.removeAt(0) + child.items = append(child.items, n.items[i]) + n.items[i] = stolenItem + if len(stealFrom.children) > 0 { + child.children = append(child.children, stealFrom.children.removeAt(0)) + } + } else { + if i >= len(n.items) { + i-- + child = n.children[i] + } + // merge with right child + mergeItem := n.items.removeAt(i) + mergeChild := n.children.removeAt(i + 1) + child.items = append(child.items, mergeItem) + child.items = append(child.items, mergeChild.items...) + child.children = append(child.children, mergeChild.children...) + n.t.freeNode(mergeChild) + } + return n.remove(item, minItems, typ) +} + +// iterate provides a simple method for iterating over elements in the tree. +// It could probably use some work to be extra-efficient (it calls from() a +// little more than it should), but it works pretty well for now. +// +// It requires that 'from' and 'to' both return true for values we should hit +// with the iterator. It should also be the case that 'from' returns true for +// values less than or equal to values 'to' returns true for, and 'to' +// returns true for values greater than or equal to those that 'from' +// does. +func (n *node) iterate(from, to func(Item) bool, iter ItemIterator) bool { + for i, item := range n.items { + if !from(item) { + continue + } + if len(n.children) > 0 && !n.children[i].iterate(from, to, iter) { + return false + } + if !to(item) { + return false + } + if !iter(item) { + return false + } + } + if len(n.children) > 0 { + return n.children[len(n.children)-1].iterate(from, to, iter) + } + return true +} + +// Used for testing/debugging purposes. +func (n *node) print(w io.Writer, level int) { + fmt.Fprintf(w, "%sNODE:%v\n", strings.Repeat(" ", level), n.items) + for _, c := range n.children { + c.print(w, level+1) + } +} + +// BTree is an implementation of a B-Tree. +// +// BTree stores Item instances in an ordered structure, allowing easy insertion, +// removal, and iteration. +// +// Write operations are not safe for concurrent mutation by multiple +// goroutines, but Read operations are. +type BTree struct { + degree int + length int + root *node + freelist *FreeList +} + +// maxItems returns the max number of items to allow per node. +func (t *BTree) maxItems() int { + return t.degree*2 - 1 +} + +// minItems returns the min number of items to allow per node (ignored for the +// root node). +func (t *BTree) minItems() int { + return t.degree - 1 +} + +func (t *BTree) newNode() (n *node) { + n = t.freelist.newNode() + n.t = t + return +} + +func (t *BTree) freeNode(n *node) { + for i := range n.items { + n.items[i] = nil // clear to allow GC + } + n.items = n.items[:0] + for i := range n.children { + n.children[i] = nil // clear to allow GC + } + n.children = n.children[:0] + n.t = nil // clear to allow GC + t.freelist.freeNode(n) +} + +// ReplaceOrInsert adds the given item to the tree. If an item in the tree +// already equals the given one, it is removed from the tree and returned. +// Otherwise, nil is returned. +// +// nil cannot be added to the tree (will panic). +func (t *BTree) ReplaceOrInsert(item Item) Item { + if item == nil { + panic("nil item being added to BTree") + } + if t.root == nil { + t.root = t.newNode() + t.root.items = append(t.root.items, item) + t.length++ + return nil + } else if len(t.root.items) >= t.maxItems() { + item2, second := t.root.split(t.maxItems() / 2) + oldroot := t.root + t.root = t.newNode() + t.root.items = append(t.root.items, item2) + t.root.children = append(t.root.children, oldroot, second) + } + out := t.root.insert(item, t.maxItems()) + if out == nil { + t.length++ + } + return out +} + +// Delete removes an item equal to the passed in item from the tree, returning +// it. If no such item exists, returns nil. +func (t *BTree) Delete(item Item) Item { + return t.deleteItem(item, removeItem) +} + +// DeleteMin removes the smallest item in the tree and returns it. +// If no such item exists, returns nil. +func (t *BTree) DeleteMin() Item { + return t.deleteItem(nil, removeMin) +} + +// DeleteMax removes the largest item in the tree and returns it. +// If no such item exists, returns nil. +func (t *BTree) DeleteMax() Item { + return t.deleteItem(nil, removeMax) +} + +func (t *BTree) deleteItem(item Item, typ toRemove) Item { + if t.root == nil || len(t.root.items) == 0 { + return nil + } + out := t.root.remove(item, t.minItems(), typ) + if len(t.root.items) == 0 && len(t.root.children) > 0 { + oldroot := t.root + t.root = t.root.children[0] + t.freeNode(oldroot) + } + if out != nil { + t.length-- + } + return out +} + +// AscendRange calls the iterator for every value in the tree within the range +// [greaterOrEqual, lessThan), until iterator returns false. +func (t *BTree) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate( + func(a Item) bool { return !a.Less(greaterOrEqual) }, + func(a Item) bool { return a.Less(lessThan) }, + iterator) +} + +// AscendLessThan calls the iterator for every value in the tree within the range +// [first, pivot), until iterator returns false. +func (t *BTree) AscendLessThan(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate( + func(a Item) bool { return true }, + func(a Item) bool { return a.Less(pivot) }, + iterator) +} + +// AscendGreaterOrEqual calls the iterator for every value in the tree within +// the range [pivot, last], until iterator returns false. +func (t *BTree) AscendGreaterOrEqual(pivot Item, iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate( + func(a Item) bool { return !a.Less(pivot) }, + func(a Item) bool { return true }, + iterator) +} + +// Ascend calls the iterator for every value in the tree within the range +// [first, last], until iterator returns false. +func (t *BTree) Ascend(iterator ItemIterator) { + if t.root == nil { + return + } + t.root.iterate( + func(a Item) bool { return true }, + func(a Item) bool { return true }, + iterator) +} + +// Get looks for the key item in the tree, returning it. It returns nil if +// unable to find that item. +func (t *BTree) Get(key Item) Item { + if t.root == nil { + return nil + } + return t.root.get(key) +} + +// Min returns the smallest item in the tree, or nil if the tree is empty. +func (t *BTree) Min() Item { + return min(t.root) +} + +// Max returns the largest item in the tree, or nil if the tree is empty. +func (t *BTree) Max() Item { + return max(t.root) +} + +// Has returns true if the given key is in the tree. +func (t *BTree) Has(key Item) bool { + return t.Get(key) != nil +} + +// Len returns the number of items currently in the tree. +func (t *BTree) Len() int { + return t.length +} + +// Int implements the Item interface for integers. +type Int int + +// Less returns true if int(a) < int(b). +func (a Int) Less(b Item) bool { + return a < b.(Int) +} diff --git a/deps/github.com/google/btree/btree_mem.go b/deps/github.com/google/btree/btree_mem.go new file mode 100644 index 000000000..cb95b7fa1 --- /dev/null +++ b/deps/github.com/google/btree/btree_mem.go @@ -0,0 +1,76 @@ +// Copyright 2014 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build ignore + +// This binary compares memory usage between btree and gollrb. +package main + +import ( + "flag" + "fmt" + "math/rand" + "runtime" + "time" + + "github.com/google/btree" + "github.com/petar/GoLLRB/llrb" +) + +var ( + size = flag.Int("size", 1000000, "size of the tree to build") + degree = flag.Int("degree", 8, "degree of btree") + gollrb = flag.Bool("llrb", false, "use llrb instead of btree") +) + +func main() { + flag.Parse() + vals := rand.Perm(*size) + var t, v interface{} + v = vals + var stats runtime.MemStats + for i := 0; i < 10; i++ { + runtime.GC() + } + fmt.Println("-------- BEFORE ----------") + runtime.ReadMemStats(&stats) + fmt.Printf("%+v\n", stats) + start := time.Now() + if *gollrb { + tr := llrb.New() + for _, v := range vals { + tr.ReplaceOrInsert(llrb.Int(v)) + } + t = tr // keep it around + } else { + tr := btree.New(*degree) + for _, v := range vals { + tr.ReplaceOrInsert(btree.Int(v)) + } + t = tr // keep it around + } + fmt.Printf("%v inserts in %v\n", *size, time.Since(start)) + fmt.Println("-------- AFTER ----------") + runtime.ReadMemStats(&stats) + fmt.Printf("%+v\n", stats) + for i := 0; i < 10; i++ { + runtime.GC() + } + fmt.Println("-------- AFTER GC ----------") + runtime.ReadMemStats(&stats) + fmt.Printf("%+v\n", stats) + if t == v { + fmt.Println("to make sure vals and tree aren't GC'd") + } +} diff --git a/deps/github.com/googleapis/gnostic/.gitignore b/deps/github.com/googleapis/gnostic/.gitignore index f013590fb..2a9d09b79 100644 --- a/deps/github.com/googleapis/gnostic/.gitignore +++ b/deps/github.com/googleapis/gnostic/.gitignore @@ -7,6 +7,10 @@ # Swift .build Packages +# Node +node_modules +package-lock.json +bundle.json # vi *.swp # vscode diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go b/deps/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go index 5351f36f3..4fd44c45e 100644 --- a/deps/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go +++ b/deps/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go @@ -7105,15 +7105,15 @@ func (m *Any) ToRawInfo() interface{} { // ToRawInfo returns a description of ApiKeySecurity suitable for JSON or YAML export. func (m *ApiKeySecurity) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) - } - if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) - } - if m.In != "" { - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) - } + if m == nil { + return info + } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7129,9 +7129,11 @@ func (m *ApiKeySecurity) ToRawInfo() interface{} { // ToRawInfo returns a description of BasicAuthenticationSecurity suitable for JSON or YAML export. func (m *BasicAuthenticationSecurity) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7147,21 +7149,21 @@ func (m *BasicAuthenticationSecurity) ToRawInfo() interface{} { // ToRawInfo returns a description of BodyParameter suitable for JSON or YAML export. func (m *BodyParameter) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } - if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) - } - if m.In != "" { - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) if m.Required != false { info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) } - if m.Schema != nil { - info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) // &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.VendorExtension != nil { for _, item := range m.VendorExtension { @@ -7175,6 +7177,9 @@ func (m *BodyParameter) ToRawInfo() interface{} { // ToRawInfo returns a description of Contact suitable for JSON or YAML export. func (m *Contact) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7196,6 +7201,9 @@ func (m *Contact) ToRawInfo() interface{} { // ToRawInfo returns a description of Default suitable for JSON or YAML export. func (m *Default) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7208,6 +7216,9 @@ func (m *Default) ToRawInfo() interface{} { // ToRawInfo returns a description of Definitions suitable for JSON or YAML export. func (m *Definitions) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7220,12 +7231,13 @@ func (m *Definitions) ToRawInfo() interface{} { // ToRawInfo returns a description of Document suitable for JSON or YAML export. func (m *Document) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Swagger != "" { - info = append(info, yaml.MapItem{Key: "swagger", Value: m.Swagger}) - } - if m.Info != nil { - info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "swagger", Value: m.Swagger}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()}) // &{Name:info Type:Info StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Host != "" { info = append(info, yaml.MapItem{Key: "host", Value: m.Host}) @@ -7242,9 +7254,8 @@ func (m *Document) ToRawInfo() interface{} { if len(m.Produces) != 0 { info = append(info, yaml.MapItem{Key: "produces", Value: m.Produces}) } - if m.Paths != nil { - info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()}) // &{Name:paths Type:Paths StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Definitions != nil { info = append(info, yaml.MapItem{Key: "definitions", Value: m.Definitions.ToRawInfo()}) @@ -7294,6 +7305,9 @@ func (m *Document) ToRawInfo() interface{} { // ToRawInfo returns a description of Examples suitable for JSON or YAML export. func (m *Examples) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7306,12 +7320,14 @@ func (m *Examples) ToRawInfo() interface{} { // ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export. func (m *ExternalDocs) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } - if m.Url != "" { - info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) if m.VendorExtension != nil { for _, item := range m.VendorExtension { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7324,6 +7340,9 @@ func (m *ExternalDocs) ToRawInfo() interface{} { // ToRawInfo returns a description of FileSchema suitable for JSON or YAML export. func (m *FileSchema) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Format != "" { info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) } @@ -7340,9 +7359,8 @@ func (m *FileSchema) ToRawInfo() interface{} { if len(m.Required) != 0 { info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) } - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) if m.ReadOnly != false { info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly}) } @@ -7366,6 +7384,9 @@ func (m *FileSchema) ToRawInfo() interface{} { // ToRawInfo returns a description of FormDataParameterSubSchema suitable for JSON or YAML export. func (m *FormDataParameterSubSchema) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Required != false { info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) } @@ -7451,9 +7472,11 @@ func (m *FormDataParameterSubSchema) ToRawInfo() interface{} { // ToRawInfo returns a description of Header suitable for JSON or YAML export. func (m *Header) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) if m.Format != "" { info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) } @@ -7524,6 +7547,9 @@ func (m *Header) ToRawInfo() interface{} { // ToRawInfo returns a description of HeaderParameterSubSchema suitable for JSON or YAML export. func (m *HeaderParameterSubSchema) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Required != false { info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) } @@ -7606,6 +7632,9 @@ func (m *HeaderParameterSubSchema) ToRawInfo() interface{} { // ToRawInfo returns a description of Headers suitable for JSON or YAML export. func (m *Headers) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7618,12 +7647,13 @@ func (m *Headers) ToRawInfo() interface{} { // ToRawInfo returns a description of Info suitable for JSON or YAML export. func (m *Info) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Title != "" { - info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) - } - if m.Version != "" { - info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7650,6 +7680,9 @@ func (m *Info) ToRawInfo() interface{} { // ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export. func (m *ItemsItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if len(m.Schema) != 0 { items := make([]interface{}, 0) for _, item := range m.Schema { @@ -7664,9 +7697,11 @@ func (m *ItemsItem) ToRawInfo() interface{} { // ToRawInfo returns a description of JsonReference suitable for JSON or YAML export. func (m *JsonReference) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.XRef != "" { - info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7676,9 +7711,11 @@ func (m *JsonReference) ToRawInfo() interface{} { // ToRawInfo returns a description of License suitable for JSON or YAML export. func (m *License) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) if m.Url != "" { info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) } @@ -7694,6 +7731,9 @@ func (m *License) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedAny suitable for JSON or YAML export. func (m *NamedAny) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7704,6 +7744,9 @@ func (m *NamedAny) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedHeader suitable for JSON or YAML export. func (m *NamedHeader) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7714,6 +7757,9 @@ func (m *NamedHeader) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedParameter suitable for JSON or YAML export. func (m *NamedParameter) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7724,6 +7770,9 @@ func (m *NamedParameter) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export. func (m *NamedPathItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7734,6 +7783,9 @@ func (m *NamedPathItem) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedResponse suitable for JSON or YAML export. func (m *NamedResponse) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7744,6 +7796,9 @@ func (m *NamedResponse) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedResponseValue suitable for JSON or YAML export. func (m *NamedResponseValue) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7754,6 +7809,9 @@ func (m *NamedResponseValue) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedSchema suitable for JSON or YAML export. func (m *NamedSchema) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7764,6 +7822,9 @@ func (m *NamedSchema) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedSecurityDefinitionsItem suitable for JSON or YAML export. func (m *NamedSecurityDefinitionsItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7774,6 +7835,9 @@ func (m *NamedSecurityDefinitionsItem) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedString suitable for JSON or YAML export. func (m *NamedString) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7786,6 +7850,9 @@ func (m *NamedString) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedStringArray suitable for JSON or YAML export. func (m *NamedStringArray) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7823,22 +7890,21 @@ func (m *NonBodyParameter) ToRawInfo() interface{} { // ToRawInfo returns a description of Oauth2AccessCodeSecurity suitable for JSON or YAML export. func (m *Oauth2AccessCodeSecurity) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) - } - if m.Flow != "" { - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) if m.Scopes != nil { info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) } // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} - if m.AuthorizationUrl != "" { - info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) - } - if m.TokenUrl != "" { - info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7854,19 +7920,19 @@ func (m *Oauth2AccessCodeSecurity) ToRawInfo() interface{} { // ToRawInfo returns a description of Oauth2ApplicationSecurity suitable for JSON or YAML export. func (m *Oauth2ApplicationSecurity) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) - } - if m.Flow != "" { - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) if m.Scopes != nil { info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) } // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} - if m.TokenUrl != "" { - info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7882,19 +7948,19 @@ func (m *Oauth2ApplicationSecurity) ToRawInfo() interface{} { // ToRawInfo returns a description of Oauth2ImplicitSecurity suitable for JSON or YAML export. func (m *Oauth2ImplicitSecurity) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) - } - if m.Flow != "" { - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) if m.Scopes != nil { info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) } // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} - if m.AuthorizationUrl != "" { - info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7910,19 +7976,19 @@ func (m *Oauth2ImplicitSecurity) ToRawInfo() interface{} { // ToRawInfo returns a description of Oauth2PasswordSecurity suitable for JSON or YAML export. func (m *Oauth2PasswordSecurity) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) - } - if m.Flow != "" { - info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) if m.Scopes != nil { info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) } // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} - if m.TokenUrl != "" { - info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7938,6 +8004,9 @@ func (m *Oauth2PasswordSecurity) ToRawInfo() interface{} { // ToRawInfo returns a description of Oauth2Scopes suitable for JSON or YAML export. func (m *Oauth2Scopes) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } // &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:} return info } @@ -7945,6 +8014,9 @@ func (m *Oauth2Scopes) ToRawInfo() interface{} { // ToRawInfo returns a description of Operation suitable for JSON or YAML export. func (m *Operation) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if len(m.Tags) != 0 { info = append(info, yaml.MapItem{Key: "tags", Value: m.Tags}) } @@ -7975,9 +8047,8 @@ func (m *Operation) ToRawInfo() interface{} { info = append(info, yaml.MapItem{Key: "parameters", Value: items}) } // &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.} - if m.Responses != nil { - info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) // &{Name:responses Type:Responses StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if len(m.Schemes) != 0 { info = append(info, yaml.MapItem{Key: "schemes", Value: m.Schemes}) @@ -8022,6 +8093,9 @@ func (m *Parameter) ToRawInfo() interface{} { // ToRawInfo returns a description of ParameterDefinitions suitable for JSON or YAML export. func (m *ParameterDefinitions) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8051,6 +8125,9 @@ func (m *ParametersItem) ToRawInfo() interface{} { // ToRawInfo returns a description of PathItem suitable for JSON or YAML export. func (m *PathItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.XRef != "" { info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) } @@ -8102,9 +8179,11 @@ func (m *PathItem) ToRawInfo() interface{} { // ToRawInfo returns a description of PathParameterSubSchema suitable for JSON or YAML export. func (m *PathParameterSubSchema) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Required != false { - info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) if m.In != "" { info = append(info, yaml.MapItem{Key: "in", Value: m.In}) } @@ -8184,6 +8263,9 @@ func (m *PathParameterSubSchema) ToRawInfo() interface{} { // ToRawInfo returns a description of Paths suitable for JSON or YAML export. func (m *Paths) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.VendorExtension != nil { for _, item := range m.VendorExtension { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8202,6 +8284,9 @@ func (m *Paths) ToRawInfo() interface{} { // ToRawInfo returns a description of PrimitivesItems suitable for JSON or YAML export. func (m *PrimitivesItems) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Type != "" { info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) } @@ -8272,6 +8357,9 @@ func (m *PrimitivesItems) ToRawInfo() interface{} { // ToRawInfo returns a description of Properties suitable for JSON or YAML export. func (m *Properties) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8284,6 +8372,9 @@ func (m *Properties) ToRawInfo() interface{} { // ToRawInfo returns a description of QueryParameterSubSchema suitable for JSON or YAML export. func (m *QueryParameterSubSchema) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Required != false { info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) } @@ -8369,9 +8460,11 @@ func (m *QueryParameterSubSchema) ToRawInfo() interface{} { // ToRawInfo returns a description of Response suitable for JSON or YAML export. func (m *Response) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) if m.Schema != nil { info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) } @@ -8396,6 +8489,9 @@ func (m *Response) ToRawInfo() interface{} { // ToRawInfo returns a description of ResponseDefinitions suitable for JSON or YAML export. func (m *ResponseDefinitions) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8425,6 +8521,9 @@ func (m *ResponseValue) ToRawInfo() interface{} { // ToRawInfo returns a description of Responses suitable for JSON or YAML export. func (m *Responses) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.ResponseCode != nil { for _, item := range m.ResponseCode { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8443,6 +8542,9 @@ func (m *Responses) ToRawInfo() interface{} { // ToRawInfo returns a description of Schema suitable for JSON or YAML export. func (m *Schema) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.XRef != "" { info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) } @@ -8588,6 +8690,9 @@ func (m *SchemaItem) ToRawInfo() interface{} { // ToRawInfo returns a description of SecurityDefinitions suitable for JSON or YAML export. func (m *SecurityDefinitions) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8637,6 +8742,9 @@ func (m *SecurityDefinitionsItem) ToRawInfo() interface{} { // ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export. func (m *SecurityRequirement) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8654,9 +8762,11 @@ func (m *StringArray) ToRawInfo() interface{} { // ToRawInfo returns a description of Tag suitable for JSON or YAML export. func (m *Tag) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -8676,6 +8786,9 @@ func (m *Tag) ToRawInfo() interface{} { // ToRawInfo returns a description of TypeItem suitable for JSON or YAML export. func (m *TypeItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if len(m.Value) != 0 { info = append(info, yaml.MapItem{Key: "value", Value: m.Value}) } @@ -8685,6 +8798,9 @@ func (m *TypeItem) ToRawInfo() interface{} { // ToRawInfo returns a description of VendorExtension suitable for JSON or YAML export. func (m *VendorExtension) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8697,6 +8813,9 @@ func (m *VendorExtension) ToRawInfo() interface{} { // ToRawInfo returns a description of Xml suitable for JSON or YAML export. func (m *Xml) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.go b/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.go index d3dde986b..2dbbf0054 100644 --- a/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.go +++ b/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.go @@ -971,26 +971,6 @@ func NewExampleOrReference(in interface{}, context *compiler.Context) (*ExampleO return x, compiler.NewErrorGroupOrNil(errors) } -// NewExamples creates an object of type Examples if possible, returning an error if not. -func NewExamples(in interface{}, context *compiler.Context) (*Examples, error) { - errors := make([]error, 0) - x := &Examples{} - m, ok := compiler.UnpackMap(in) - if !ok { - message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) - errors = append(errors, compiler.NewError(context, message)) - } else { - allowedKeys := []string{} - var allowedPatterns []*regexp.Regexp - invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) - if len(invalidKeys) > 0 { - message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) - errors = append(errors, compiler.NewError(context, message)) - } - } - return x, compiler.NewErrorGroupOrNil(errors) -} - // NewExamplesOrReferences creates an object of type ExamplesOrReferences if possible, returning an error if not. func NewExamplesOrReferences(in interface{}, context *compiler.Context) (*ExamplesOrReferences, error) { errors := make([]error, 0) @@ -5380,12 +5360,6 @@ func (m *ExampleOrReference) ResolveReferences(root string) (interface{}, error) return nil, compiler.NewErrorGroupOrNil(errors) } -// ResolveReferences resolves references found inside Examples objects. -func (m *Examples) ResolveReferences(root string) (interface{}, error) { - errors := make([]error, 0) - return nil, compiler.NewErrorGroupOrNil(errors) -} - // ResolveReferences resolves references found inside ExamplesOrReferences objects. func (m *ExamplesOrReferences) ResolveReferences(root string) (interface{}, error) { errors := make([]error, 0) @@ -6740,6 +6714,9 @@ func (m *AnyOrExpression) ToRawInfo() interface{} { // ToRawInfo returns a description of AnysOrExpressions suitable for JSON or YAML export. func (m *AnysOrExpressions) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -6752,6 +6729,9 @@ func (m *AnysOrExpressions) ToRawInfo() interface{} { // ToRawInfo returns a description of Callback suitable for JSON or YAML export. func (m *Callback) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Path != nil { for _, item := range m.Path { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -6787,6 +6767,9 @@ func (m *CallbackOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of CallbacksOrReferences suitable for JSON or YAML export. func (m *CallbacksOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -6799,6 +6782,9 @@ func (m *CallbacksOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of Components suitable for JSON or YAML export. func (m *Components) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Schemas != nil { info = append(info, yaml.MapItem{Key: "schemas", Value: m.Schemas.ToRawInfo()}) } @@ -6847,6 +6833,9 @@ func (m *Components) ToRawInfo() interface{} { // ToRawInfo returns a description of Contact suitable for JSON or YAML export. func (m *Contact) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -6887,9 +6876,11 @@ func (m *DefaultType) ToRawInfo() interface{} { // ToRawInfo returns a description of Discriminator suitable for JSON or YAML export. func (m *Discriminator) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.PropertyName != "" { - info = append(info, yaml.MapItem{Key: "propertyName", Value: m.PropertyName}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "propertyName", Value: m.PropertyName}) if m.Mapping != nil { info = append(info, yaml.MapItem{Key: "mapping", Value: m.Mapping.ToRawInfo()}) } @@ -6900,12 +6891,13 @@ func (m *Discriminator) ToRawInfo() interface{} { // ToRawInfo returns a description of Document suitable for JSON or YAML export. func (m *Document) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Openapi != "" { - info = append(info, yaml.MapItem{Key: "openapi", Value: m.Openapi}) - } - if m.Info != nil { - info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "openapi", Value: m.Openapi}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()}) // &{Name:info Type:Info StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if len(m.Servers) != 0 { items := make([]interface{}, 0) @@ -6915,9 +6907,8 @@ func (m *Document) ToRawInfo() interface{} { info = append(info, yaml.MapItem{Key: "servers", Value: items}) } // &{Name:servers Type:Server StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} - if m.Paths != nil { - info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()}) // &{Name:paths Type:Paths StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Components != nil { info = append(info, yaml.MapItem{Key: "components", Value: m.Components.ToRawInfo()}) @@ -6955,6 +6946,9 @@ func (m *Document) ToRawInfo() interface{} { // ToRawInfo returns a description of Encoding suitable for JSON or YAML export. func (m *Encoding) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.ContentType != "" { info = append(info, yaml.MapItem{Key: "contentType", Value: m.ContentType}) } @@ -6983,6 +6977,9 @@ func (m *Encoding) ToRawInfo() interface{} { // ToRawInfo returns a description of Encodings suitable for JSON or YAML export. func (m *Encodings) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -6995,6 +6992,9 @@ func (m *Encodings) ToRawInfo() interface{} { // ToRawInfo returns a description of Example suitable for JSON or YAML export. func (m *Example) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Summary != "" { info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary}) } @@ -7031,15 +7031,12 @@ func (m *ExampleOrReference) ToRawInfo() interface{} { return nil } -// ToRawInfo returns a description of Examples suitable for JSON or YAML export. -func (m *Examples) ToRawInfo() interface{} { - info := yaml.MapSlice{} - return info -} - // ToRawInfo returns a description of ExamplesOrReferences suitable for JSON or YAML export. func (m *ExamplesOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7052,6 +7049,9 @@ func (m *ExamplesOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of Expression suitable for JSON or YAML export. func (m *Expression) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7064,12 +7064,14 @@ func (m *Expression) ToRawInfo() interface{} { // ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export. func (m *ExternalDocs) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } - if m.Url != "" { - info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) if m.SpecificationExtension != nil { for _, item := range m.SpecificationExtension { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7082,6 +7084,9 @@ func (m *ExternalDocs) ToRawInfo() interface{} { // ToRawInfo returns a description of Header suitable for JSON or YAML export. func (m *Header) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7148,6 +7153,9 @@ func (m *HeaderOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of HeadersOrReferences suitable for JSON or YAML export. func (m *HeadersOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7160,9 +7168,11 @@ func (m *HeadersOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of Info suitable for JSON or YAML export. func (m *Info) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Title != "" { - info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7177,9 +7187,8 @@ func (m *Info) ToRawInfo() interface{} { info = append(info, yaml.MapItem{Key: "license", Value: m.License.ToRawInfo()}) } // &{Name:license Type:License StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} - if m.Version != "" { - info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) if m.SpecificationExtension != nil { for _, item := range m.SpecificationExtension { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7192,6 +7201,9 @@ func (m *Info) ToRawInfo() interface{} { // ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export. func (m *ItemsItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if len(m.SchemaOrReference) != 0 { items := make([]interface{}, 0) for _, item := range m.SchemaOrReference { @@ -7206,9 +7218,11 @@ func (m *ItemsItem) ToRawInfo() interface{} { // ToRawInfo returns a description of License suitable for JSON or YAML export. func (m *License) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) if m.Url != "" { info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) } @@ -7224,6 +7238,9 @@ func (m *License) ToRawInfo() interface{} { // ToRawInfo returns a description of Link suitable for JSON or YAML export. func (m *Link) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.OperationRef != "" { info = append(info, yaml.MapItem{Key: "operationRef", Value: m.OperationRef}) } @@ -7274,6 +7291,9 @@ func (m *LinkOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of LinksOrReferences suitable for JSON or YAML export. func (m *LinksOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7286,6 +7306,9 @@ func (m *LinksOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of MediaType suitable for JSON or YAML export. func (m *MediaType) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Schema != nil { info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) } @@ -7314,6 +7337,9 @@ func (m *MediaType) ToRawInfo() interface{} { // ToRawInfo returns a description of MediaTypes suitable for JSON or YAML export. func (m *MediaTypes) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7326,6 +7352,9 @@ func (m *MediaTypes) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedAny suitable for JSON or YAML export. func (m *NamedAny) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7336,6 +7365,9 @@ func (m *NamedAny) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedAnyOrExpression suitable for JSON or YAML export. func (m *NamedAnyOrExpression) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7346,6 +7378,9 @@ func (m *NamedAnyOrExpression) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedCallbackOrReference suitable for JSON or YAML export. func (m *NamedCallbackOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7356,6 +7391,9 @@ func (m *NamedCallbackOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedEncoding suitable for JSON or YAML export. func (m *NamedEncoding) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7366,6 +7404,9 @@ func (m *NamedEncoding) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedExampleOrReference suitable for JSON or YAML export. func (m *NamedExampleOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7376,6 +7417,9 @@ func (m *NamedExampleOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedHeaderOrReference suitable for JSON or YAML export. func (m *NamedHeaderOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7386,6 +7430,9 @@ func (m *NamedHeaderOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedLinkOrReference suitable for JSON or YAML export. func (m *NamedLinkOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7396,6 +7443,9 @@ func (m *NamedLinkOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedMediaType suitable for JSON or YAML export. func (m *NamedMediaType) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7406,6 +7456,9 @@ func (m *NamedMediaType) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedParameterOrReference suitable for JSON or YAML export. func (m *NamedParameterOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7416,6 +7469,9 @@ func (m *NamedParameterOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export. func (m *NamedPathItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7426,6 +7482,9 @@ func (m *NamedPathItem) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedRequestBodyOrReference suitable for JSON or YAML export. func (m *NamedRequestBodyOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7436,6 +7495,9 @@ func (m *NamedRequestBodyOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedResponseOrReference suitable for JSON or YAML export. func (m *NamedResponseOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7446,6 +7508,9 @@ func (m *NamedResponseOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedSchemaOrReference suitable for JSON or YAML export. func (m *NamedSchemaOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7456,6 +7521,9 @@ func (m *NamedSchemaOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedSecuritySchemeOrReference suitable for JSON or YAML export. func (m *NamedSecuritySchemeOrReference) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7466,6 +7534,9 @@ func (m *NamedSecuritySchemeOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedServerVariable suitable for JSON or YAML export. func (m *NamedServerVariable) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7476,6 +7547,9 @@ func (m *NamedServerVariable) ToRawInfo() interface{} { // ToRawInfo returns a description of NamedString suitable for JSON or YAML export. func (m *NamedString) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } @@ -7488,6 +7562,9 @@ func (m *NamedString) ToRawInfo() interface{} { // ToRawInfo returns a description of OauthFlow suitable for JSON or YAML export. func (m *OauthFlow) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AuthorizationUrl != "" { info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) } @@ -7513,6 +7590,9 @@ func (m *OauthFlow) ToRawInfo() interface{} { // ToRawInfo returns a description of OauthFlows suitable for JSON or YAML export. func (m *OauthFlows) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Implicit != nil { info = append(info, yaml.MapItem{Key: "implicit", Value: m.Implicit.ToRawInfo()}) } @@ -7541,6 +7621,9 @@ func (m *OauthFlows) ToRawInfo() interface{} { // ToRawInfo returns a description of Object suitable for JSON or YAML export. func (m *Object) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7553,6 +7636,9 @@ func (m *Object) ToRawInfo() interface{} { // ToRawInfo returns a description of Operation suitable for JSON or YAML export. func (m *Operation) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if len(m.Tags) != 0 { info = append(info, yaml.MapItem{Key: "tags", Value: m.Tags}) } @@ -7581,9 +7667,8 @@ func (m *Operation) ToRawInfo() interface{} { info = append(info, yaml.MapItem{Key: "requestBody", Value: m.RequestBody.ToRawInfo()}) } // &{Name:requestBody Type:RequestBodyOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} - if m.Responses != nil { - info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) // &{Name:responses Type:Responses StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Callbacks != nil { info = append(info, yaml.MapItem{Key: "callbacks", Value: m.Callbacks.ToRawInfo()}) @@ -7620,12 +7705,13 @@ func (m *Operation) ToRawInfo() interface{} { // ToRawInfo returns a description of Parameter suitable for JSON or YAML export. func (m *Parameter) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) - } - if m.In != "" { - info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + // always include this required field. + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -7692,6 +7778,9 @@ func (m *ParameterOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of ParametersOrReferences suitable for JSON or YAML export. func (m *ParametersOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7704,6 +7793,9 @@ func (m *ParametersOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of PathItem suitable for JSON or YAML export. func (m *PathItem) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.XRef != "" { info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) } @@ -7773,6 +7865,9 @@ func (m *PathItem) ToRawInfo() interface{} { // ToRawInfo returns a description of Paths suitable for JSON or YAML export. func (m *Paths) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Path != nil { for _, item := range m.Path { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7791,6 +7886,9 @@ func (m *Paths) ToRawInfo() interface{} { // ToRawInfo returns a description of Properties suitable for JSON or YAML export. func (m *Properties) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7803,15 +7901,20 @@ func (m *Properties) ToRawInfo() interface{} { // ToRawInfo returns a description of Reference suitable for JSON or YAML export. func (m *Reference) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.XRef != "" { - info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) return info } // ToRawInfo returns a description of RequestBodiesOrReferences suitable for JSON or YAML export. func (m *RequestBodiesOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7824,12 +7927,14 @@ func (m *RequestBodiesOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of RequestBody suitable for JSON or YAML export. func (m *RequestBody) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } - if m.Content != nil { - info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()}) // &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} if m.Required != false { info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) @@ -7863,9 +7968,11 @@ func (m *RequestBodyOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of Response suitable for JSON or YAML export. func (m *Response) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Description != "" { - info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) if m.Headers != nil { info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()}) } @@ -7907,6 +8014,9 @@ func (m *ResponseOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of Responses suitable for JSON or YAML export. func (m *Responses) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Default != nil { info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) } @@ -7929,6 +8039,9 @@ func (m *Responses) ToRawInfo() interface{} { // ToRawInfo returns a description of ResponsesOrReferences suitable for JSON or YAML export. func (m *ResponsesOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -7941,6 +8054,9 @@ func (m *ResponsesOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of Schema suitable for JSON or YAML export. func (m *Schema) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Nullable != false { info = append(info, yaml.MapItem{Key: "nullable", Value: m.Nullable}) } @@ -8108,6 +8224,9 @@ func (m *SchemaOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of SchemasOrReferences suitable for JSON or YAML export. func (m *SchemasOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8120,15 +8239,20 @@ func (m *SchemasOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export. func (m *SecurityRequirement) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } return info } // ToRawInfo returns a description of SecurityScheme suitable for JSON or YAML export. func (m *SecurityScheme) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Type != "" { - info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -8180,6 +8304,9 @@ func (m *SecuritySchemeOrReference) ToRawInfo() interface{} { // ToRawInfo returns a description of SecuritySchemesOrReferences suitable for JSON or YAML export. func (m *SecuritySchemesOrReferences) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8192,9 +8319,11 @@ func (m *SecuritySchemesOrReferences) ToRawInfo() interface{} { // ToRawInfo returns a description of Server suitable for JSON or YAML export. func (m *Server) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Url != "" { - info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -8214,12 +8343,14 @@ func (m *Server) ToRawInfo() interface{} { // ToRawInfo returns a description of ServerVariable suitable for JSON or YAML export. func (m *ServerVariable) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if len(m.Enum) != 0 { info = append(info, yaml.MapItem{Key: "enum", Value: m.Enum}) } - if m.Default != "" { - info = append(info, yaml.MapItem{Key: "default", Value: m.Default}) - } + // always include this required field. + info = append(info, yaml.MapItem{Key: "default", Value: m.Default}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -8235,6 +8366,9 @@ func (m *ServerVariable) ToRawInfo() interface{} { // ToRawInfo returns a description of ServerVariables suitable for JSON or YAML export. func (m *ServerVariables) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.AdditionalProperties != nil { for _, item := range m.AdditionalProperties { info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) @@ -8271,6 +8405,9 @@ func (m *StringArray) ToRawInfo() interface{} { // ToRawInfo returns a description of Strings suitable for JSON or YAML export. func (m *Strings) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } // &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:} return info } @@ -8278,9 +8415,11 @@ func (m *Strings) ToRawInfo() interface{} { // ToRawInfo returns a description of Tag suitable for JSON or YAML export. func (m *Tag) ToRawInfo() interface{} { info := yaml.MapSlice{} - if m.Name != "" { - info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + if m == nil { + return info } + // always include this required field. + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) if m.Description != "" { info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) } @@ -8300,6 +8439,9 @@ func (m *Tag) ToRawInfo() interface{} { // ToRawInfo returns a description of Xml suitable for JSON or YAML export. func (m *Xml) ToRawInfo() interface{} { info := yaml.MapSlice{} + if m == nil { + return info + } if m.Name != "" { info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) } diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.pb.go b/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.pb.go index f1320287d..26e98c7c2 100644 --- a/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.pb.go +++ b/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.pb.go @@ -24,7 +24,6 @@ It has these top-level messages: Encodings Example ExampleOrReference - Examples ExamplesOrReferences Expression ExternalDocs @@ -1169,14 +1168,6 @@ func _ExampleOrReference_OneofSizer(msg proto.Message) (n int) { return n } -type Examples struct { -} - -func (m *Examples) Reset() { *m = Examples{} } -func (m *Examples) String() string { return proto.CompactTextString(m) } -func (*Examples) ProtoMessage() {} -func (*Examples) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } - type ExamplesOrReferences struct { AdditionalProperties []*NamedExampleOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` } @@ -1184,7 +1175,7 @@ type ExamplesOrReferences struct { func (m *ExamplesOrReferences) Reset() { *m = ExamplesOrReferences{} } func (m *ExamplesOrReferences) String() string { return proto.CompactTextString(m) } func (*ExamplesOrReferences) ProtoMessage() {} -func (*ExamplesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } +func (*ExamplesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func (m *ExamplesOrReferences) GetAdditionalProperties() []*NamedExampleOrReference { if m != nil { @@ -1200,7 +1191,7 @@ type Expression struct { func (m *Expression) Reset() { *m = Expression{} } func (m *Expression) String() string { return proto.CompactTextString(m) } func (*Expression) ProtoMessage() {} -func (*Expression) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (*Expression) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } func (m *Expression) GetAdditionalProperties() []*NamedAny { if m != nil { @@ -1219,7 +1210,7 @@ type ExternalDocs struct { func (m *ExternalDocs) Reset() { *m = ExternalDocs{} } func (m *ExternalDocs) String() string { return proto.CompactTextString(m) } func (*ExternalDocs) ProtoMessage() {} -func (*ExternalDocs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +func (*ExternalDocs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } func (m *ExternalDocs) GetDescription() string { if m != nil { @@ -1261,7 +1252,7 @@ type Header struct { func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } +func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } func (m *Header) GetDescription() string { if m != nil { @@ -1357,7 +1348,7 @@ type HeaderOrReference struct { func (m *HeaderOrReference) Reset() { *m = HeaderOrReference{} } func (m *HeaderOrReference) String() string { return proto.CompactTextString(m) } func (*HeaderOrReference) ProtoMessage() {} -func (*HeaderOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +func (*HeaderOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } type isHeaderOrReference_Oneof interface { isHeaderOrReference_Oneof() @@ -1475,7 +1466,7 @@ type HeadersOrReferences struct { func (m *HeadersOrReferences) Reset() { *m = HeadersOrReferences{} } func (m *HeadersOrReferences) String() string { return proto.CompactTextString(m) } func (*HeadersOrReferences) ProtoMessage() {} -func (*HeadersOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (*HeadersOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } func (m *HeadersOrReferences) GetAdditionalProperties() []*NamedHeaderOrReference { if m != nil { @@ -1498,7 +1489,7 @@ type Info struct { func (m *Info) Reset() { *m = Info{} } func (m *Info) String() string { return proto.CompactTextString(m) } func (*Info) ProtoMessage() {} -func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } +func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } func (m *Info) GetTitle() string { if m != nil { @@ -1556,7 +1547,7 @@ type ItemsItem struct { func (m *ItemsItem) Reset() { *m = ItemsItem{} } func (m *ItemsItem) String() string { return proto.CompactTextString(m) } func (*ItemsItem) ProtoMessage() {} -func (*ItemsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } +func (*ItemsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } func (m *ItemsItem) GetSchemaOrReference() []*SchemaOrReference { if m != nil { @@ -1575,7 +1566,7 @@ type License struct { func (m *License) Reset() { *m = License{} } func (m *License) String() string { return proto.CompactTextString(m) } func (*License) ProtoMessage() {} -func (*License) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } +func (*License) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } func (m *License) GetName() string { if m != nil { @@ -1612,7 +1603,7 @@ type Link struct { func (m *Link) Reset() { *m = Link{} } func (m *Link) String() string { return proto.CompactTextString(m) } func (*Link) ProtoMessage() {} -func (*Link) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } +func (*Link) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } func (m *Link) GetOperationRef() string { if m != nil { @@ -1673,7 +1664,7 @@ type LinkOrReference struct { func (m *LinkOrReference) Reset() { *m = LinkOrReference{} } func (m *LinkOrReference) String() string { return proto.CompactTextString(m) } func (*LinkOrReference) ProtoMessage() {} -func (*LinkOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } +func (*LinkOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } type isLinkOrReference_Oneof interface { isLinkOrReference_Oneof() @@ -1791,7 +1782,7 @@ type LinksOrReferences struct { func (m *LinksOrReferences) Reset() { *m = LinksOrReferences{} } func (m *LinksOrReferences) String() string { return proto.CompactTextString(m) } func (*LinksOrReferences) ProtoMessage() {} -func (*LinksOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } +func (*LinksOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } func (m *LinksOrReferences) GetAdditionalProperties() []*NamedLinkOrReference { if m != nil { @@ -1812,7 +1803,7 @@ type MediaType struct { func (m *MediaType) Reset() { *m = MediaType{} } func (m *MediaType) String() string { return proto.CompactTextString(m) } func (*MediaType) ProtoMessage() {} -func (*MediaType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } +func (*MediaType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } func (m *MediaType) GetSchema() *SchemaOrReference { if m != nil { @@ -1856,7 +1847,7 @@ type MediaTypes struct { func (m *MediaTypes) Reset() { *m = MediaTypes{} } func (m *MediaTypes) String() string { return proto.CompactTextString(m) } func (*MediaTypes) ProtoMessage() {} -func (*MediaTypes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } +func (*MediaTypes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } func (m *MediaTypes) GetAdditionalProperties() []*NamedMediaType { if m != nil { @@ -1876,7 +1867,7 @@ type NamedAny struct { func (m *NamedAny) Reset() { *m = NamedAny{} } func (m *NamedAny) String() string { return proto.CompactTextString(m) } func (*NamedAny) ProtoMessage() {} -func (*NamedAny) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } +func (*NamedAny) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } func (m *NamedAny) GetName() string { if m != nil { @@ -1903,7 +1894,7 @@ type NamedAnyOrExpression struct { func (m *NamedAnyOrExpression) Reset() { *m = NamedAnyOrExpression{} } func (m *NamedAnyOrExpression) String() string { return proto.CompactTextString(m) } func (*NamedAnyOrExpression) ProtoMessage() {} -func (*NamedAnyOrExpression) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } +func (*NamedAnyOrExpression) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } func (m *NamedAnyOrExpression) GetName() string { if m != nil { @@ -1930,7 +1921,7 @@ type NamedCallbackOrReference struct { func (m *NamedCallbackOrReference) Reset() { *m = NamedCallbackOrReference{} } func (m *NamedCallbackOrReference) String() string { return proto.CompactTextString(m) } func (*NamedCallbackOrReference) ProtoMessage() {} -func (*NamedCallbackOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } +func (*NamedCallbackOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } func (m *NamedCallbackOrReference) GetName() string { if m != nil { @@ -1957,7 +1948,7 @@ type NamedEncoding struct { func (m *NamedEncoding) Reset() { *m = NamedEncoding{} } func (m *NamedEncoding) String() string { return proto.CompactTextString(m) } func (*NamedEncoding) ProtoMessage() {} -func (*NamedEncoding) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } +func (*NamedEncoding) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } func (m *NamedEncoding) GetName() string { if m != nil { @@ -1984,7 +1975,7 @@ type NamedExampleOrReference struct { func (m *NamedExampleOrReference) Reset() { *m = NamedExampleOrReference{} } func (m *NamedExampleOrReference) String() string { return proto.CompactTextString(m) } func (*NamedExampleOrReference) ProtoMessage() {} -func (*NamedExampleOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } +func (*NamedExampleOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } func (m *NamedExampleOrReference) GetName() string { if m != nil { @@ -2011,7 +2002,7 @@ type NamedHeaderOrReference struct { func (m *NamedHeaderOrReference) Reset() { *m = NamedHeaderOrReference{} } func (m *NamedHeaderOrReference) String() string { return proto.CompactTextString(m) } func (*NamedHeaderOrReference) ProtoMessage() {} -func (*NamedHeaderOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } +func (*NamedHeaderOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } func (m *NamedHeaderOrReference) GetName() string { if m != nil { @@ -2038,7 +2029,7 @@ type NamedLinkOrReference struct { func (m *NamedLinkOrReference) Reset() { *m = NamedLinkOrReference{} } func (m *NamedLinkOrReference) String() string { return proto.CompactTextString(m) } func (*NamedLinkOrReference) ProtoMessage() {} -func (*NamedLinkOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } +func (*NamedLinkOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } func (m *NamedLinkOrReference) GetName() string { if m != nil { @@ -2065,7 +2056,7 @@ type NamedMediaType struct { func (m *NamedMediaType) Reset() { *m = NamedMediaType{} } func (m *NamedMediaType) String() string { return proto.CompactTextString(m) } func (*NamedMediaType) ProtoMessage() {} -func (*NamedMediaType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } +func (*NamedMediaType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } func (m *NamedMediaType) GetName() string { if m != nil { @@ -2092,7 +2083,7 @@ type NamedParameterOrReference struct { func (m *NamedParameterOrReference) Reset() { *m = NamedParameterOrReference{} } func (m *NamedParameterOrReference) String() string { return proto.CompactTextString(m) } func (*NamedParameterOrReference) ProtoMessage() {} -func (*NamedParameterOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } +func (*NamedParameterOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } func (m *NamedParameterOrReference) GetName() string { if m != nil { @@ -2119,7 +2110,7 @@ type NamedPathItem struct { func (m *NamedPathItem) Reset() { *m = NamedPathItem{} } func (m *NamedPathItem) String() string { return proto.CompactTextString(m) } func (*NamedPathItem) ProtoMessage() {} -func (*NamedPathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } +func (*NamedPathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } func (m *NamedPathItem) GetName() string { if m != nil { @@ -2146,7 +2137,7 @@ type NamedRequestBodyOrReference struct { func (m *NamedRequestBodyOrReference) Reset() { *m = NamedRequestBodyOrReference{} } func (m *NamedRequestBodyOrReference) String() string { return proto.CompactTextString(m) } func (*NamedRequestBodyOrReference) ProtoMessage() {} -func (*NamedRequestBodyOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } +func (*NamedRequestBodyOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } func (m *NamedRequestBodyOrReference) GetName() string { if m != nil { @@ -2173,7 +2164,7 @@ type NamedResponseOrReference struct { func (m *NamedResponseOrReference) Reset() { *m = NamedResponseOrReference{} } func (m *NamedResponseOrReference) String() string { return proto.CompactTextString(m) } func (*NamedResponseOrReference) ProtoMessage() {} -func (*NamedResponseOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } +func (*NamedResponseOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } func (m *NamedResponseOrReference) GetName() string { if m != nil { @@ -2200,7 +2191,7 @@ type NamedSchemaOrReference struct { func (m *NamedSchemaOrReference) Reset() { *m = NamedSchemaOrReference{} } func (m *NamedSchemaOrReference) String() string { return proto.CompactTextString(m) } func (*NamedSchemaOrReference) ProtoMessage() {} -func (*NamedSchemaOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } +func (*NamedSchemaOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } func (m *NamedSchemaOrReference) GetName() string { if m != nil { @@ -2227,7 +2218,7 @@ type NamedSecuritySchemeOrReference struct { func (m *NamedSecuritySchemeOrReference) Reset() { *m = NamedSecuritySchemeOrReference{} } func (m *NamedSecuritySchemeOrReference) String() string { return proto.CompactTextString(m) } func (*NamedSecuritySchemeOrReference) ProtoMessage() {} -func (*NamedSecuritySchemeOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } +func (*NamedSecuritySchemeOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } func (m *NamedSecuritySchemeOrReference) GetName() string { if m != nil { @@ -2254,7 +2245,7 @@ type NamedServerVariable struct { func (m *NamedServerVariable) Reset() { *m = NamedServerVariable{} } func (m *NamedServerVariable) String() string { return proto.CompactTextString(m) } func (*NamedServerVariable) ProtoMessage() {} -func (*NamedServerVariable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } +func (*NamedServerVariable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } func (m *NamedServerVariable) GetName() string { if m != nil { @@ -2281,7 +2272,7 @@ type NamedString struct { func (m *NamedString) Reset() { *m = NamedString{} } func (m *NamedString) String() string { return proto.CompactTextString(m) } func (*NamedString) ProtoMessage() {} -func (*NamedString) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } +func (*NamedString) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } func (m *NamedString) GetName() string { if m != nil { @@ -2309,7 +2300,7 @@ type OauthFlow struct { func (m *OauthFlow) Reset() { *m = OauthFlow{} } func (m *OauthFlow) String() string { return proto.CompactTextString(m) } func (*OauthFlow) ProtoMessage() {} -func (*OauthFlow) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } +func (*OauthFlow) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } func (m *OauthFlow) GetAuthorizationUrl() string { if m != nil { @@ -2358,7 +2349,7 @@ type OauthFlows struct { func (m *OauthFlows) Reset() { *m = OauthFlows{} } func (m *OauthFlows) String() string { return proto.CompactTextString(m) } func (*OauthFlows) ProtoMessage() {} -func (*OauthFlows) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } +func (*OauthFlows) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } func (m *OauthFlows) GetImplicit() *OauthFlow { if m != nil { @@ -2402,7 +2393,7 @@ type Object struct { func (m *Object) Reset() { *m = Object{} } func (m *Object) String() string { return proto.CompactTextString(m) } func (*Object) ProtoMessage() {} -func (*Object) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } +func (*Object) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } func (m *Object) GetAdditionalProperties() []*NamedAny { if m != nil { @@ -2431,7 +2422,7 @@ type Operation struct { func (m *Operation) Reset() { *m = Operation{} } func (m *Operation) String() string { return proto.CompactTextString(m) } func (*Operation) ProtoMessage() {} -func (*Operation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} } +func (*Operation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } func (m *Operation) GetTags() []string { if m != nil { @@ -2545,7 +2536,7 @@ type Parameter struct { func (m *Parameter) Reset() { *m = Parameter{} } func (m *Parameter) String() string { return proto.CompactTextString(m) } func (*Parameter) ProtoMessage() {} -func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{51} } +func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} } func (m *Parameter) GetName() string { if m != nil { @@ -2655,7 +2646,7 @@ type ParameterOrReference struct { func (m *ParameterOrReference) Reset() { *m = ParameterOrReference{} } func (m *ParameterOrReference) String() string { return proto.CompactTextString(m) } func (*ParameterOrReference) ProtoMessage() {} -func (*ParameterOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{52} } +func (*ParameterOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{51} } type isParameterOrReference_Oneof interface { isParameterOrReference_Oneof() @@ -2773,7 +2764,7 @@ type ParametersOrReferences struct { func (m *ParametersOrReferences) Reset() { *m = ParametersOrReferences{} } func (m *ParametersOrReferences) String() string { return proto.CompactTextString(m) } func (*ParametersOrReferences) ProtoMessage() {} -func (*ParametersOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{53} } +func (*ParametersOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{52} } func (m *ParametersOrReferences) GetAdditionalProperties() []*NamedParameterOrReference { if m != nil { @@ -2803,7 +2794,7 @@ type PathItem struct { func (m *PathItem) Reset() { *m = PathItem{} } func (m *PathItem) String() string { return proto.CompactTextString(m) } func (*PathItem) ProtoMessage() {} -func (*PathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{54} } +func (*PathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{53} } func (m *PathItem) GetXRef() string { if m != nil { @@ -2912,7 +2903,7 @@ type Paths struct { func (m *Paths) Reset() { *m = Paths{} } func (m *Paths) String() string { return proto.CompactTextString(m) } func (*Paths) ProtoMessage() {} -func (*Paths) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{55} } +func (*Paths) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{54} } func (m *Paths) GetPath() []*NamedPathItem { if m != nil { @@ -2935,7 +2926,7 @@ type Properties struct { func (m *Properties) Reset() { *m = Properties{} } func (m *Properties) String() string { return proto.CompactTextString(m) } func (*Properties) ProtoMessage() {} -func (*Properties) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56} } +func (*Properties) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{55} } func (m *Properties) GetAdditionalProperties() []*NamedSchemaOrReference { if m != nil { @@ -2952,7 +2943,7 @@ type Reference struct { func (m *Reference) Reset() { *m = Reference{} } func (m *Reference) String() string { return proto.CompactTextString(m) } func (*Reference) ProtoMessage() {} -func (*Reference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} } +func (*Reference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56} } func (m *Reference) GetXRef() string { if m != nil { @@ -2968,7 +2959,7 @@ type RequestBodiesOrReferences struct { func (m *RequestBodiesOrReferences) Reset() { *m = RequestBodiesOrReferences{} } func (m *RequestBodiesOrReferences) String() string { return proto.CompactTextString(m) } func (*RequestBodiesOrReferences) ProtoMessage() {} -func (*RequestBodiesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{58} } +func (*RequestBodiesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} } func (m *RequestBodiesOrReferences) GetAdditionalProperties() []*NamedRequestBodyOrReference { if m != nil { @@ -2988,7 +2979,7 @@ type RequestBody struct { func (m *RequestBody) Reset() { *m = RequestBody{} } func (m *RequestBody) String() string { return proto.CompactTextString(m) } func (*RequestBody) ProtoMessage() {} -func (*RequestBody) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{59} } +func (*RequestBody) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{58} } func (m *RequestBody) GetDescription() string { if m != nil { @@ -3028,7 +3019,7 @@ type RequestBodyOrReference struct { func (m *RequestBodyOrReference) Reset() { *m = RequestBodyOrReference{} } func (m *RequestBodyOrReference) String() string { return proto.CompactTextString(m) } func (*RequestBodyOrReference) ProtoMessage() {} -func (*RequestBodyOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{60} } +func (*RequestBodyOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{59} } type isRequestBodyOrReference_Oneof interface { isRequestBodyOrReference_Oneof() @@ -3151,7 +3142,7 @@ type Response struct { func (m *Response) Reset() { *m = Response{} } func (m *Response) String() string { return proto.CompactTextString(m) } func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{61} } +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{60} } func (m *Response) GetDescription() string { if m != nil { @@ -3198,7 +3189,7 @@ type ResponseOrReference struct { func (m *ResponseOrReference) Reset() { *m = ResponseOrReference{} } func (m *ResponseOrReference) String() string { return proto.CompactTextString(m) } func (*ResponseOrReference) ProtoMessage() {} -func (*ResponseOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{62} } +func (*ResponseOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{61} } type isResponseOrReference_Oneof interface { isResponseOrReference_Oneof() @@ -3319,7 +3310,7 @@ type Responses struct { func (m *Responses) Reset() { *m = Responses{} } func (m *Responses) String() string { return proto.CompactTextString(m) } func (*Responses) ProtoMessage() {} -func (*Responses) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{63} } +func (*Responses) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{62} } func (m *Responses) GetDefault() *ResponseOrReference { if m != nil { @@ -3349,7 +3340,7 @@ type ResponsesOrReferences struct { func (m *ResponsesOrReferences) Reset() { *m = ResponsesOrReferences{} } func (m *ResponsesOrReferences) String() string { return proto.CompactTextString(m) } func (*ResponsesOrReferences) ProtoMessage() {} -func (*ResponsesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{64} } +func (*ResponsesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{63} } func (m *ResponsesOrReferences) GetAdditionalProperties() []*NamedResponseOrReference { if m != nil { @@ -3401,7 +3392,7 @@ type Schema struct { func (m *Schema) Reset() { *m = Schema{} } func (m *Schema) String() string { return proto.CompactTextString(m) } func (*Schema) ProtoMessage() {} -func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{65} } +func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{64} } func (m *Schema) GetNullable() bool { if m != nil { @@ -3665,7 +3656,7 @@ type SchemaOrReference struct { func (m *SchemaOrReference) Reset() { *m = SchemaOrReference{} } func (m *SchemaOrReference) String() string { return proto.CompactTextString(m) } func (*SchemaOrReference) ProtoMessage() {} -func (*SchemaOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{66} } +func (*SchemaOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{65} } type isSchemaOrReference_Oneof interface { isSchemaOrReference_Oneof() @@ -3783,7 +3774,7 @@ type SchemasOrReferences struct { func (m *SchemasOrReferences) Reset() { *m = SchemasOrReferences{} } func (m *SchemasOrReferences) String() string { return proto.CompactTextString(m) } func (*SchemasOrReferences) ProtoMessage() {} -func (*SchemasOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{67} } +func (*SchemasOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{66} } func (m *SchemasOrReferences) GetAdditionalProperties() []*NamedSchemaOrReference { if m != nil { @@ -3799,7 +3790,7 @@ type SecurityRequirement struct { func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} } func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) } func (*SecurityRequirement) ProtoMessage() {} -func (*SecurityRequirement) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{68} } +func (*SecurityRequirement) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{67} } // Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery. type SecurityScheme struct { @@ -3817,7 +3808,7 @@ type SecurityScheme struct { func (m *SecurityScheme) Reset() { *m = SecurityScheme{} } func (m *SecurityScheme) String() string { return proto.CompactTextString(m) } func (*SecurityScheme) ProtoMessage() {} -func (*SecurityScheme) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{69} } +func (*SecurityScheme) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{68} } func (m *SecurityScheme) GetType() string { if m != nil { @@ -3892,7 +3883,7 @@ type SecuritySchemeOrReference struct { func (m *SecuritySchemeOrReference) Reset() { *m = SecuritySchemeOrReference{} } func (m *SecuritySchemeOrReference) String() string { return proto.CompactTextString(m) } func (*SecuritySchemeOrReference) ProtoMessage() {} -func (*SecuritySchemeOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{70} } +func (*SecuritySchemeOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{69} } type isSecuritySchemeOrReference_Oneof interface { isSecuritySchemeOrReference_Oneof() @@ -4010,7 +4001,7 @@ type SecuritySchemesOrReferences struct { func (m *SecuritySchemesOrReferences) Reset() { *m = SecuritySchemesOrReferences{} } func (m *SecuritySchemesOrReferences) String() string { return proto.CompactTextString(m) } func (*SecuritySchemesOrReferences) ProtoMessage() {} -func (*SecuritySchemesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{71} } +func (*SecuritySchemesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{70} } func (m *SecuritySchemesOrReferences) GetAdditionalProperties() []*NamedSecuritySchemeOrReference { if m != nil { @@ -4030,7 +4021,7 @@ type Server struct { func (m *Server) Reset() { *m = Server{} } func (m *Server) String() string { return proto.CompactTextString(m) } func (*Server) ProtoMessage() {} -func (*Server) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{72} } +func (*Server) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{71} } func (m *Server) GetUrl() string { if m != nil { @@ -4071,7 +4062,7 @@ type ServerVariable struct { func (m *ServerVariable) Reset() { *m = ServerVariable{} } func (m *ServerVariable) String() string { return proto.CompactTextString(m) } func (*ServerVariable) ProtoMessage() {} -func (*ServerVariable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{73} } +func (*ServerVariable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{72} } func (m *ServerVariable) GetEnum() []string { if m != nil { @@ -4108,7 +4099,7 @@ type ServerVariables struct { func (m *ServerVariables) Reset() { *m = ServerVariables{} } func (m *ServerVariables) String() string { return proto.CompactTextString(m) } func (*ServerVariables) ProtoMessage() {} -func (*ServerVariables) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{74} } +func (*ServerVariables) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{73} } func (m *ServerVariables) GetAdditionalProperties() []*NamedServerVariable { if m != nil { @@ -4129,7 +4120,7 @@ type SpecificationExtension struct { func (m *SpecificationExtension) Reset() { *m = SpecificationExtension{} } func (m *SpecificationExtension) String() string { return proto.CompactTextString(m) } func (*SpecificationExtension) ProtoMessage() {} -func (*SpecificationExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{75} } +func (*SpecificationExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{74} } type isSpecificationExtension_Oneof interface { isSpecificationExtension_Oneof() @@ -4267,7 +4258,7 @@ type StringArray struct { func (m *StringArray) Reset() { *m = StringArray{} } func (m *StringArray) String() string { return proto.CompactTextString(m) } func (*StringArray) ProtoMessage() {} -func (*StringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{76} } +func (*StringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{75} } func (m *StringArray) GetValue() []string { if m != nil { @@ -4283,7 +4274,7 @@ type Strings struct { func (m *Strings) Reset() { *m = Strings{} } func (m *Strings) String() string { return proto.CompactTextString(m) } func (*Strings) ProtoMessage() {} -func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{77} } +func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{76} } func (m *Strings) GetAdditionalProperties() []*NamedString { if m != nil { @@ -4303,7 +4294,7 @@ type Tag struct { func (m *Tag) Reset() { *m = Tag{} } func (m *Tag) String() string { return proto.CompactTextString(m) } func (*Tag) ProtoMessage() {} -func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{78} } +func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{77} } func (m *Tag) GetName() string { if m != nil { @@ -4346,7 +4337,7 @@ type Xml struct { func (m *Xml) Reset() { *m = Xml{} } func (m *Xml) String() string { return proto.CompactTextString(m) } func (*Xml) ProtoMessage() {} -func (*Xml) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{79} } +func (*Xml) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{78} } func (m *Xml) GetName() string { if m != nil { @@ -4407,7 +4398,6 @@ func init() { proto.RegisterType((*Encodings)(nil), "openapi.v3.Encodings") proto.RegisterType((*Example)(nil), "openapi.v3.Example") proto.RegisterType((*ExampleOrReference)(nil), "openapi.v3.ExampleOrReference") - proto.RegisterType((*Examples)(nil), "openapi.v3.Examples") proto.RegisterType((*ExamplesOrReferences)(nil), "openapi.v3.ExamplesOrReferences") proto.RegisterType((*Expression)(nil), "openapi.v3.Expression") proto.RegisterType((*ExternalDocs)(nil), "openapi.v3.ExternalDocs") @@ -4476,7 +4466,7 @@ func init() { func init() { proto.RegisterFile("OpenAPIv3/OpenAPIv3.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 3544 bytes of a gzipped FileDescriptorProto + // 3539 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x49, 0x6f, 0x1c, 0x47, 0x96, 0x66, 0xd6, 0x5e, 0xaf, 0xb8, 0x06, 0x17, 0x95, 0x24, 0x4b, 0xa2, 0x48, 0xc9, 0x92, 0xb5, 0xda, 0x92, 0xe5, 0xb1, 0x61, 0x7b, 0x3c, 0x94, 0x44, 0x83, 0x02, 0x24, 0x97, 0x26, 0x25, 0xdb, @@ -4551,152 +4541,152 @@ var fileDescriptor0 = []byte{ 0xea, 0x93, 0x11, 0xe4, 0x45, 0x98, 0x8f, 0x44, 0x8d, 0xe3, 0x2b, 0x8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47, - 0xc9, 0x74, 0x8e, 0x20, 0x8e, 0xc9, 0xec, 0x60, 0xa5, 0x30, 0x3b, 0x58, 0x3d, 0x5a, 0x76, 0xb0, - 0x76, 0x48, 0x76, 0xb0, 0x9e, 0x93, 0x1d, 0x6c, 0x1c, 0x96, 0x1d, 0x6c, 0x16, 0x67, 0x07, 0x61, - 0xc2, 0x8b, 0x59, 0x6b, 0x8c, 0x8b, 0xd9, 0xec, 0x71, 0xb2, 0x83, 0x73, 0xc7, 0xce, 0x0e, 0xce, - 0x4f, 0x20, 0x33, 0xff, 0xa3, 0xc1, 0x8a, 0x32, 0xb8, 0xbc, 0x03, 0xcd, 0x48, 0xe3, 0x55, 0xce, - 0x27, 0xea, 0x44, 0x2f, 0xe3, 0x11, 0xf2, 0xd8, 0x77, 0xf8, 0x10, 0xd6, 0xd4, 0xcf, 0x06, 0xd0, - 0x17, 0xc5, 0x16, 0xfc, 0xa2, 0xe2, 0x21, 0x8a, 0xc2, 0x8c, 0xa9, 0x4d, 0xfa, 0xdf, 0x2a, 0xd0, - 0x88, 0x22, 0xdf, 0x25, 0xa8, 0x24, 0x92, 0x43, 0x65, 0x9d, 0xf4, 0x8f, 0x65, 0xd0, 0x2f, 0x41, - 0x79, 0x8f, 0x84, 0x4a, 0x4f, 0x18, 0xa5, 0x9d, 0x28, 0x82, 0x02, 0xbd, 0x41, 0x28, 0xd2, 0x82, - 0x79, 0x40, 0x6f, 0x10, 0xa2, 0x37, 0xa0, 0xe2, 0xb9, 0x41, 0x28, 0x72, 0x3b, 0x39, 0x48, 0x06, - 0x41, 0xd7, 0xa1, 0xd6, 0x23, 0x16, 0x09, 0x89, 0xb0, 0xd1, 0x39, 0x60, 0x01, 0x42, 0x37, 0xa1, - 0xee, 0xb2, 0x59, 0x2b, 0xed, 0x71, 0x8c, 0x97, 0x28, 0x3a, 0x95, 0x7d, 0x82, 0x7b, 0xc2, 0x10, - 0xe7, 0x4d, 0x85, 0x42, 0xe8, 0xbd, 0xc7, 0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, 0x1e, 0xd8, 0x2c, 0xf2, 0xd0, 0x74, 0xf9, 0x89, 0xae, 0xc2, - 0x12, 0x39, 0x30, 0xac, 0x41, 0x60, 0xbe, 0x24, 0x5d, 0x89, 0x99, 0x65, 0xe3, 0x2e, 0x46, 0x84, - 0x47, 0x02, 0x4c, 0xd9, 0x98, 0x0e, 0x83, 0xcc, 0x09, 0x36, 0xfc, 0x73, 0x84, 0x8d, 0xc0, 0xcc, - 0x8f, 0xb2, 0x11, 0xe0, 0x33, 0x00, 0x36, 0x3e, 0xe8, 0x5a, 0xc4, 0xd9, 0x0b, 0xf7, 0xdb, 0x0b, - 0xeb, 0xda, 0xe5, 0xb2, 0xde, 0xb4, 0xf1, 0xc1, 0x43, 0xd6, 0xc0, 0xc8, 0xa6, 0x23, 0xc9, 0x8b, - 0x82, 0x6c, 0x3a, 0x82, 0xdc, 0x86, 0xba, 0x87, 0x43, 0xba, 0xbd, 0xed, 0x25, 0x1e, 0xb4, 0x8a, - 0x4f, 0x2a, 0x05, 0x94, 0xaf, 0x19, 0x12, 0x3b, 0x68, 0x23, 0xd6, 0xaf, 0x61, 0xe3, 0x03, 0x56, - 0x00, 0x66, 0x44, 0xd3, 0x11, 0xc4, 0x65, 0x41, 0x34, 0x1d, 0x4e, 0x3c, 0x0f, 0xb3, 0x03, 0xc7, - 0x7c, 0x31, 0x20, 0x82, 0xbe, 0xc2, 0x66, 0xde, 0xe2, 0x6d, 0x1c, 0x72, 0x11, 0xe6, 0x29, 0xf3, - 0x84, 0x7a, 0xac, 0x32, 0x26, 0x73, 0x36, 0x3e, 0x48, 0xc4, 0x17, 0x14, 0x66, 0x3a, 0x49, 0xd8, - 0x9a, 0x80, 0x99, 0x4e, 0x02, 0x96, 0x74, 0x97, 0x27, 0x58, 0x8a, 0x25, 0x76, 0x97, 0x9b, 0x50, - 0x21, 0xce, 0xc0, 0x6e, 0xb7, 0xb3, 0xef, 0xfb, 0xa8, 0xac, 0x30, 0x22, 0xcb, 0xcf, 0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x04, + 0x31, 0xc4, 0x0b, 0x38, 0xcb, 0x87, 0x48, 0x65, 0x80, 0x0f, 0x1b, 0xea, 0xfd, 0xf4, 0x50, 0x17, + 0xf3, 0x13, 0xcd, 0x8a, 0x21, 0xbf, 0x84, 0x65, 0x31, 0x24, 0x8d, 0x07, 0x3e, 0xc3, 0xbe, 0x89, + 0x77, 0x2d, 0xf5, 0x38, 0x6f, 0xa6, 0xc7, 0x39, 0x95, 0x0d, 0x2b, 0x64, 0x77, 0xc9, 0xfc, 0x9f, + 0xa0, 0xc5, 0x99, 0xb3, 0x4c, 0xa5, 0x92, 0xe9, 0x4a, 0x92, 0x69, 0x53, 0x76, 0xfc, 0xab, 0x06, + 0xcd, 0x0e, 0x1e, 0x84, 0xfb, 0x1f, 0x5b, 0xee, 0x2b, 0x74, 0x15, 0x96, 0xe8, 0xff, 0xae, 0x6f, + 0xfe, 0x07, 0xf7, 0x46, 0x34, 0x62, 0xe4, 0x4c, 0x16, 0x53, 0x84, 0x4f, 0x7d, 0x0b, 0x9d, 0x86, + 0x66, 0xe8, 0x3e, 0x27, 0x1c, 0xc4, 0x99, 0x36, 0x58, 0x03, 0x25, 0x9e, 0x83, 0x96, 0x4f, 0xfa, + 0x3e, 0x09, 0xf6, 0x19, 0x99, 0x07, 0xf5, 0x20, 0x9a, 0x28, 0xe0, 0x2a, 0xf5, 0xe5, 0xae, 0x17, + 0x15, 0x21, 0x94, 0x09, 0x57, 0x01, 0x99, 0xb6, 0x97, 0xfc, 0x7d, 0x09, 0x20, 0x5a, 0x34, 0x73, + 0xdb, 0xa6, 0xed, 0x59, 0xa6, 0x61, 0x86, 0x22, 0xb0, 0x48, 0x59, 0x8b, 0x08, 0xa9, 0x47, 0x30, + 0xda, 0xc5, 0xc3, 0x41, 0xf0, 0xca, 0xf5, 0x7b, 0x2a, 0x03, 0x93, 0xe8, 0x22, 0x61, 0xe8, 0x3e, + 0x20, 0xc3, 0x32, 0x89, 0x13, 0x76, 0x0d, 0x9f, 0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0x03, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x96, 0x1a, 0x1f, 0x3b, + 0x3b, 0x00, 0x00, } diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto b/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto index f9a75c52c..dc2c1ec09 100644 --- a/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto +++ b/deps/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto @@ -158,9 +158,6 @@ message ExampleOrReference { } } -message Examples { -} - message ExamplesOrReferences { repeated NamedExampleOrReference additional_properties = 1; } diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/openapi-3.0.json b/deps/github.com/googleapis/gnostic/OpenAPIv3/openapi-3.0.json index 49c0d3a19..aad0d1b65 100644 --- a/deps/github.com/googleapis/gnostic/OpenAPIv3/openapi-3.0.json +++ b/deps/github.com/googleapis/gnostic/OpenAPIv3/openapi-3.0.json @@ -694,11 +694,6 @@ } } }, - "examples": { - "type": "object", - "description": "", - "additionalProperties": false - }, "reference": { "type": "object", "description": "A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.", diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.md b/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.0.md similarity index 100% rename from deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.md rename to deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.0.md diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.1.md b/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.1.md new file mode 100644 index 000000000..0a8a83435 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.1.md @@ -0,0 +1,3380 @@ +# OpenAPI Specification + +#### Version 3.0.1 + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here. + +This document is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html). + +## Introduction + +The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. + +An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases. + +## Table of Contents + + +- [Definitions](#definitions) + - [OpenAPI Document](#oasDocument) + - [Path Templating](#pathTemplating) + - [Media Types](#mediaTypes) + - [HTTP Status Codes](#httpCodes) +- [Specification](#specification) + - [Versions](#versions) + - [Format](#format) + - [Document Structure](#documentStructure) + - [Data Types](#dataTypes) + - [Rich Text Formatting](#richText) + - [Relative References In URLs](#relativeReferences) + - [Schema](#schema) + - [OpenAPI Object](#oasObject) + - [Info Object](#infoObject) + - [Contact Object](#contactObject) + - [License Object](#licenseObject) + - [Server Object](#serverObject) + - [Server Variable Object](#serverVariableObject) + - [Components Object](#componentsObject) + - [Paths Object](#pathsObject) + - [Path Item Object](#pathItemObject) + - [Operation Object](#operationObject) + - [External Documentation Object](#externalDocumentationObject) + - [Parameter Object](#parameterObject) + - [Request Body Object](#requestBodyObject) + - [Media Type Object](#mediaTypeObject) + - [Encoding Object](#encodingObject) + - [Responses Object](#responsesObject) + - [Response Object](#responseObject) + - [Callback Object](#callbackObject) + - [Example Object](#exampleObject) + - [Link Object](#linkObject) + - [Header Object](#headerObject) + - [Tag Object](#tagObject) + - [Reference Object](#referenceObject) + - [Schema Object](#schemaObject) + - [Discriminator Object](#discriminatorObject) + - [XML Object](#xmlObject) + - [Security Scheme Object](#securitySchemeObject) + - [OAuth Flows Object](#oauthFlowsObject) + - [OAuth Flow Object](#oauthFlowObject) + - [Security Requirement Object](#securityRequirementObject) + - [Specification Extensions](#specificationExtensions) + - [Security Filtering](#securityFiltering) +- [Appendix A: Revision History](#revisionHistory) + + + + +## Definitions + +##### OpenAPI Document +A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification. + +##### Path Templating +Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters. + +##### Media Types +Media type definitions are spread across several resources. +The media type definitions SHOULD be in compliance with [RFC6838](https://tools.ietf.org/html/rfc6838). + +Some examples of possible media type definitions: +``` + text/plain; charset=utf-8 + application/json + application/vnd.github+json + application/vnd.github.v3+json + application/vnd.github.v3.raw+json + application/vnd.github.v3.text+json + application/vnd.github.v3.html+json + application/vnd.github.v3.full+json + application/vnd.github.v3.diff + application/vnd.github.v3.patch +``` +##### HTTP Status Codes +The HTTP Status Codes are used to indicate the status of the executed operation. +The available status codes are defined by [RFC7231](https://tools.ietf.org/html/rfc7231#section-6) and registered status codes are listed in the [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml). + +## Specification + +### Versions + +The OpenAPI Specification is versioned using [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) (semver) and follows the semver specification. + +The `major`.`minor` portion of the semver (for example `3.0`) SHALL designate the OAS feature set. Typically, *`.patch`* versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.\* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between `3.0.0` and `3.0.1` for example. + +Subsequent minor version releases of the OpenAPI Specification (incrementing the `minor` version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical `3.1.0` specification SHOULD be usable with tooling designed for `3.0.0`. + +An OpenAPI document compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named [`swagger`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swaggerObject) and value `"2.0"`.) + +### Format + +An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format. + +For example, if a field has an array value, the JSON array representation will be used: + +```json +{ + "field": [ 1, 2, 3 ] +} +``` +All field names in the specification are **case sensitive**. + +The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name. + +Patterned fields MUST have unique names within the containing object. + +In order to preserve the ability to round-trip between YAML and JSON formats, YAML version [1.2](http://www.yaml.org/spec/1.2/spec.html) is RECOMMENDED along with some additional constraints: + +- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231). +- Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](http://yaml.org/spec/1.2/spec.html#id2802346). + +**Note:** While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML. + +### Document Structure + +An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, `$ref` fields MUST be used in the specification to reference those parts as follows from the [JSON Schema](http://json-schema.org) definitions. + +It is RECOMMENDED that the root OpenAPI document be named: `openapi.json` or `openapi.yaml`. + +### Data Types + +Primitive data types in the OAS are based on the types supported by the [JSON Schema Specification Wright Draft 00](https://tools.ietf.org/html/draft-wright-json-schema-00#section-4.2). +Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part. +`null` is not supported as a type (see [`nullable`](#schemaNullable) for an alternative solution). +Models are defined using the [Schema Object](#schemaObject), which is an extended subset of JSON Schema Specification Wright Draft 00. + +Primitives have an optional modifier property: `format`. +OAS uses several known formats to define in fine detail the data type being used. +However, to support documentation needs, the `format` property is an open `string`-valued property, and can have any value. +Formats such as `"email"`, `"uuid"`, and so on, MAY be used even though undefined by this specification. +Types that are not accompanied by a `format` property follow the type definition in the JSON Schema. Tools that do not recognize a specific `format` MAY default back to the `type` alone, as if the `format` is not specified. + +The formats defined by the OAS are: + +Common Name | [`type`](#dataTypes) | [`format`](#dataTypeFormat) | Comments +----------- | ------ | -------- | -------- +integer | `integer` | `int32` | signed 32 bits +long | `integer` | `int64` | signed 64 bits +float | `number` | `float` | | +double | `number` | `double` | | +string | `string` | | | +byte | `string` | `byte` | base64 encoded characters +binary | `string` | `binary` | any sequence of octets +boolean | `boolean` | | | +date | `string` | `date` | As defined by `full-date` - [RFC3339](https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +dateTime | `string` | `date-time` | As defined by `date-time` - [RFC3339](https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +password | `string` | `password` | A hint to UIs to obscure input. + +### Rich Text Formatting +Throughout the specification `description` fields are noted as supporting CommonMark markdown formatting. +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by [CommonMark 0.27](http://spec.commonmark.org/0.27/). Tooling MAY choose to ignore some CommonMark features to address security concerns. + +### Relative References in URLs + +Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-4.2). +Relative references are resolved using the URLs defined in the [`Server Object`](#serverObject) as a Base URI. + +Relative references used in `$ref` are processed as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03), using the URL of the current document as the base URI. See also the [Reference Object](#referenceObject). + +### Schema + +In the following description, if a field is not explicitly **REQUIRED** or described with a MUST or SHALL, it can be considered OPTIONAL. + +#### OpenAPI Object + +This is the root document object of the [OpenAPI document](#oasDocument). + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +openapi | `string` | **REQUIRED**. This string MUST be the [semantic version number](https://semver.org/spec/v2.0.0.html) of the [OpenAPI Specification version](#versions) that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is *not* related to the API [`info.version`](#infoVersion) string. +info | [Info Object](#infoObject) | **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required. +servers | [[Server Object](#serverObject)] | An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a [Server Object](#serverObject) with a [url](#serverUrl) value of `/`. +paths | [Paths Object](#pathsObject) | **REQUIRED**. The available paths and operations for the API. +components | [Components Object](#componentsObject) | An element to hold various schemas for the specification. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. +tags | [[Tag Object](#tagObject)] | A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the [Operation Object](#operationObject) must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### Info Object + +The object provides metadata about the API. +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +title | `string` | **REQUIRED**. The title of the application. +description | `string` | A short description of the application. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +termsOfService | `string` | A URL to the Terms of Service for the API. MUST be in the format of a URL. +contact | [Contact Object](#contactObject) | The contact information for the exposed API. +license | [License Object](#licenseObject) | The license information for the exposed API. +version | `string` | **REQUIRED**. The version of the OpenAPI document (which is distinct from the [OpenAPI Specification version](#oasVersion) or the API implementation version). + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Info Object Example: + +```json +{ + "title": "Sample Pet Store App", + "description": "This is a sample server for a pet store.", + "termsOfService": "http://example.com/terms/", + "contact": { + "name": "API Support", + "url": "http://www.example.com/support", + "email": "support@example.com" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0.1" +} +``` + +```yaml +title: Sample Pet Store App +description: This is a sample server for a pet store. +termsOfService: http://example.com/terms/ +contact: + name: API Support + url: http://www.example.com/support + email: support@example.com +license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html +version: 1.0.1 +``` + +#### Contact Object + +Contact information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | The identifying name of the contact person/organization. +url | `string` | The URL pointing to the contact information. MUST be in the format of a URL. +email | `string` | The email address of the contact person/organization. MUST be in the format of an email address. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Contact Object Example: + +```json +{ + "name": "API Support", + "url": "http://www.example.com/support", + "email": "support@example.com" +} +``` + +```yaml +name: API Support +url: http://www.example.com/support +email: support@example.com +``` + +#### License Object + +License information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The license name used for the API. +url | `string` | A URL to the license used for the API. MUST be in the format of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### License Object Example: + +```json +{ + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" +} +``` + +```yaml +name: Apache 2.0 +url: https://www.apache.org/licenses/LICENSE-2.0.html +``` + +#### Server Object + +An object representing a Server. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +url | `string` | **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`. +description | `string` | An optional string describing the host designated by the URL. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +variables | Map[`string`, [Server Variable Object](#serverVariableObject)] | A map between a variable name and its value. The value is used for substitution in the server's URL template. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Server Object Example + +A single server would be described as: + +```json +{ + "url": "https://development.gigantic-server.com/v1", + "description": "Development server" +} +``` + +```yaml +url: https://development.gigantic-server.com/v1 +description: Development server +``` + +The following shows how multiple servers can be described, for example, at the OpenAPI Object's [`servers`](#oasServers): + +```json +{ + "servers": [ + { + "url": "https://development.gigantic-server.com/v1", + "description": "Development server" + }, + { + "url": "https://staging.gigantic-server.com/v1", + "description": "Staging server" + }, + { + "url": "https://api.gigantic-server.com/v1", + "description": "Production server" + } + ] +} +``` + +```yaml +servers: +- url: https://development.gigantic-server.com/v1 + description: Development server +- url: https://staging.gigantic-server.com/v1 + description: Staging server +- url: https://api.gigantic-server.com/v1 + description: Production server +``` + +The following shows how variables can be used for a server configuration: + +```json +{ + "servers": [ + { + "url": "https://{username}.gigantic-server.com:{port}/{basePath}", + "description": "The production API server", + "variables": { + "username": { + "default": "demo", + "description": "this value is assigned by the service provider, in this example `gigantic-server.com`" + }, + "port": { + "enum": [ + "8443", + "443" + ], + "default": "8443" + }, + "basePath": { + "default": "v2" + } + } + } + ] +} +``` + +```yaml +servers: +- url: https://{username}.gigantic-server.com:{port}/{basePath} + description: The production API server + variables: + username: + # note! no enum here means it is an open value + default: demo + description: this value is assigned by the service provider, in this example `gigantic-server.com` + port: + enum: + - '8443' + - '443' + default: '8443' + basePath: + # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2` + default: v2 +``` + + +#### Server Variable Object + +An object representing a Server Variable for server URL template substitution. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +enum | [`string`] | An enumeration of string values to be used if the substitution options are from a limited set. +default | `string` | **REQUIRED**. The default value to use for substitution, and to send, if an alternate value is _not_ supplied. Unlike the [Schema Object's](#schemaObject) `default`, this value MUST be provided by the consumer. +description | `string` | An optional description for the server variable. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### Components Object + +Holds a set of reusable objects for different aspects of the OAS. +All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. + + +##### Fixed Fields + +Field Name | Type | Description +---|:---|--- + schemas | Map[`string`, [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject). + responses | Map[`string`, [Response Object](#responseObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Response Objects](#responseObject). + parameters | Map[`string`, [Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Parameter Objects](#parameterObject). + examples | Map[`string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Example Objects](#exampleObject). + requestBodies | Map[`string`, [Request Body Object](#requestBodyObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Request Body Objects](#requestBodyObject). + headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Header Objects](#headerObject). + securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject). + links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Link Objects](#linkObject). + callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Callback Objects](#callbackObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\.\-_]+$`. + +Field Name Examples: + +``` +User +User_1 +User_Name +user-name +my.org.User +``` + +##### Components Object Example + +```json +"components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + } + }, + "parameters": { + "skipParam": { + "name": "skip", + "in": "query", + "description": "number of items to skip", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "limitParam": { + "name": "limit", + "in": "query", + "description": "max records to return", + "required": true, + "schema" : { + "type": "integer", + "format": "int32" + } + } + }, + "responses": { + "NotFound": { + "description": "Entity not found." + }, + "IllegalInput": { + "description": "Illegal input for operation." + }, + "GeneralError": { + "description": "General Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeneralError" + } + } + } + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + }, + "petstore_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "http://example.org/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + } + } +} +``` + +```yaml +components: + schemas: + Category: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + parameters: + skipParam: + name: skip + in: query + description: number of items to skip + required: true + schema: + type: integer + format: int32 + limitParam: + name: limit + in: query + description: max records to return + required: true + schema: + type: integer + format: int32 + responses: + NotFound: + description: Entity not found. + IllegalInput: + description: Illegal input for operation. + GeneralError: + description: General Error + content: + application/json: + schema: + $ref: '#/components/schemas/GeneralError' + securitySchemes: + api_key: + type: apiKey + name: api_key + in: header + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: http://example.org/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + + +#### Paths Object + +Holds the relative paths to the individual endpoints and their operations. +The path is appended to the URL from the [`Server Object`](#serverObject) in order to construct the full URL. The Paths MAY be empty, due to [ACL constraints](#securityFiltering). + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +/{path} | [Path Item Object](#pathItemObject) | A relative path to an individual endpoint. The field name MUST begin with a slash. The path is **appended** (no relative URL resolution) to the expanded URL from the [`Server Object`](#serverObject)'s `url` field in order to construct the full URL. [Path templating](#pathTemplating) is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Path Templating Matching + +Assuming the following paths, the concrete definition, `/pets/mine`, will be matched first if used: + +``` + /pets/{petId} + /pets/mine +``` + +The following paths are considered identical and invalid: + +``` + /pets/{petId} + /pets/{name} +``` + +The following may lead to ambiguous resolution: + +``` + /{entity}/me + /books/{id} +``` + +##### Paths Object Example + +```json +{ + "/pets": { + "get": { + "description": "Returns all pets from the system that the user has access to", + "responses": { + "200": { + "description": "A list of pets.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pet" + } + } + } + } + } + } + } + } +} +``` + +```yaml +/pets: + get: + description: Returns all pets from the system that the user has access to + responses: + '200': + description: A list of pets. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/pet' +``` + +#### Path Item Object + +Describes the operations available on a single path. +A Path Item MAY be empty, due to [ACL constraints](#securityFiltering). +The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +$ref | `string` | Allows for an external definition of this path item. The referenced structure MUST be in the format of a [Path Item Object](#pathItemObject). If there are conflicts between the referenced definition and this Path Item's definition, the behavior is *undefined*. +summary| `string` | An optional, string summary, intended to apply to all operations in this path. +description | `string` | An optional, string description, intended to apply to all operations in this path. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +get | [Operation Object](#operationObject) | A definition of a GET operation on this path. +put | [Operation Object](#operationObject) | A definition of a PUT operation on this path. +post | [Operation Object](#operationObject) | A definition of a POST operation on this path. +delete | [Operation Object](#operationObject) | A definition of a DELETE operation on this path. +options | [Operation Object](#operationObject) | A definition of a OPTIONS operation on this path. +head | [Operation Object](#operationObject) | A definition of a HEAD operation on this path. +patch | [Operation Object](#operationObject) | A definition of a PATCH operation on this path. +trace | [Operation Object](#operationObject) | A definition of a TRACE operation on this path. +servers | [[Server Object](#serverObject)] | An alternative `server` array to service all operations in this path. +parameters | [[Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). The list can use the [Reference Object](#referenceObject) to link to parameters that are defined at the [OpenAPI Object's components/parameters](#componentsParameters). + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Path Item Object Example + +```json +{ + "get": { + "description": "Returns pets based on ID", + "summary": "Find pets by ID", + "operationId": "getPetsById", + "responses": { + "200": { + "description": "pet response", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "default": { + "description": "error payload", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/ErrorModel" + } + } + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to use", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "simple" + } + ] +} +``` + +```yaml +get: + description: Returns pets based on ID + summary: Find pets by ID + operationId: getPetsById + responses: + '200': + description: pet response + content: + '*/*' : + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + default: + description: error payload + content: + 'text/html': + schema: + $ref: '#/components/schemas/ErrorModel' +parameters: +- name: id + in: path + description: ID of pet to use + required: true + schema: + type: array + style: simple + items: + type: string +``` + +#### Operation Object + +Describes a single API operation on a path. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +tags | [`string`] | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. +summary | `string` | A short summary of what the operation does. +description | `string` | A verbose explanation of the operation behavior. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this operation. +operationId | `string` | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. +parameters | [[Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | A list of parameters that are applicable for this operation. If a parameter is already defined at the [Path Item](#pathItemParameters), the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). The list can use the [Reference Object](#referenceObject) to link to parameters that are defined at the [OpenAPI Object's components/parameters](#componentsParameters). +requestBody | [Request Body Object](#requestBodyObject) \| [Reference Object](#referenceObject) | The request body applicable for this operation. The `requestBody` is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231](https://tools.ietf.org/html/rfc7231#section-4.3.1) has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, `requestBody` SHALL be ignored by consumers. +responses | [Responses Object](#responsesObject) | **REQUIRED**. The list of possible responses as they are returned from executing this operation. +callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a [Callback Object](#callbackObject) that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. +deprecated | `boolean` | Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level [`security`](#oasSecurity). To remove a top-level security declaration, an empty array can be used. +servers | [[Server Object](#serverObject)] | An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Operation Object Example + +```json +{ + "tags": [ + "pet" + ], + "summary": "Updates a pet in the store with form data", + "operationId": "updatePetWithForm", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet that needs to be updated", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Updated name of the pet", + "type": "string" + }, + "status": { + "description": "Updated status of the pet", + "type": "string" + } + }, + "required": ["status"] + } + } + } + }, + "responses": { + "200": { + "description": "Pet updated.", + "content": { + "application/json": {}, + "application/xml": {} + } + }, + "405": { + "description": "Invalid input", + "content": { + "application/json": {}, + "application/xml": {} + } + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] +} +``` + +```yaml +tags: +- pet +summary: Updates a pet in the store with form data +operationId: updatePetWithForm +parameters: +- name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: string +requestBody: + content: + 'application/x-www-form-urlencoded': + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + required: + - status +responses: + '200': + description: Pet updated. + content: + 'application/json': {} + 'application/xml': {} + '405': + description: Invalid input + content: + 'application/json': {} + 'application/xml': {} +security: +- petstore_auth: + - write:pets + - read:pets +``` + + +#### External Documentation Object + +Allows referencing an external resource for extended documentation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +description | `string` | A short description of the target documentation. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +url | `string` | **REQUIRED**. The URL for the target documentation. Value MUST be in the format of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### External Documentation Object Example + +```json +{ + "description": "Find more info here", + "url": "https://example.com" +} +``` + +```yaml +description: Find more info here +url: https://example.com +``` + +#### Parameter Object + +Describes a single operation parameter. + +A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). + +##### Parameter Locations +There are four possible parameter locations specified by the `in` field: +* path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`. +* query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`. +* header - Custom headers that are expected as part of the request. Note that [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive. +* cookie - Used to pass a specific cookie value to the API. + + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The name of the parameter. Parameter names are *case sensitive*.
  • If [`in`](#parameterIn) is `"path"`, the `name` field MUST correspond to the associated path segment from the [path](#pathsPath) field in the [Paths Object](#pathsObject). See [Path Templating](#pathTemplating) for further information.
  • If [`in`](#parameterIn) is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
  • For all other cases, the `name` corresponds to the parameter name used by the [`in`](#parameterIn) property.
+in | `string` | **REQUIRED**. The location of the parameter. Possible values are "query", "header", "path" or "cookie". +description | `string` | A brief description of the parameter. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +required | `boolean` | Determines whether this parameter is mandatory. If the [parameter location](#parameterIn) is "path", this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`. + deprecated | `boolean` | Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. + allowEmptyValue | `boolean` | Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If [`style`](#parameterStyle) is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. + +The rules for serialization of the parameter are specified in one of two ways. +For simpler scenarios, a [`schema`](#parameterSchema) and [`style`](#parameterStyle) can describe the structure and syntax of the parameter. + +Field Name | Type | Description +---|:---:|--- +style | `string` | Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`. +explode | `boolean` | When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When [`style`](#parameterStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. +allowReserved | `boolean` | Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`. +schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the parameter. +example | Any | Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema. + +For more complex scenarios, the [`content`](#parameterContent) property can define the media type and schema of the parameter. +A parameter MUST contain either a `schema` property, or a `content` property, but not both. +When `example` or `examples` are provided in conjunction with the `schema` object, the example MUST follow the prescribed serialization strategy for the parameter. + + +Field Name | Type | Description +---|:---:|--- +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry. + +##### Style Values + +In order to support common ways of serializing simple parameters, a set of `style` values are defined. + +`style` | [`type`](#dataTypes) | `in` | Comments +----------- | ------ | -------- | -------- +matrix | `primitive`, `array`, `object` | `path` | Path-style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7) +label | `primitive`, `array`, `object` | `path` | Label style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5) +form | `primitive`, `array`, `object` | `query`, `cookie` | Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8). This option replaces `collectionFormat` with a `csv` (when `explode` is false) or `multi` (when `explode` is true) value from OpenAPI 2.0. +simple | `array` | `path`, `header` | Simple style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.2). This option replaces `collectionFormat` with a `csv` value from OpenAPI 2.0. +spaceDelimited | `array` | `query` | Space separated array values. This option replaces `collectionFormat` equal to `ssv` from OpenAPI 2.0. +pipeDelimited | `array` | `query` | Pipe separated array values. This option replaces `collectionFormat` equal to `pipes` from OpenAPI 2.0. +deepObject | `object` | `query` | Provides a simple way of rendering nested objects using form parameters. + + +##### Style Examples + +Assume a parameter named `color` has one of the following values: + +``` + string -> "blue" + array -> ["blue","black","brown"] + object -> { "R": 100, "G": 200, "B": 150 } +``` +The following table shows examples of rendering differences for each value. + +[`style`](#dataTypeFormat) | `explode` | `empty` | `string` | `array` | `object` +----------- | ------ | -------- | -------- | --------|------- +matrix | false | ;color | ;color=blue | ;color=blue,black,brown | ;color=R,100,G,200,B,150 +matrix | true | ;color | ;color=blue | ;color=blue;color=black;color=brown | ;R=100;G=200;B=150 +label | false | . | .blue | .blue.black.brown | .R.100.G.200.B.150 +label | true | . | .blue | .blue.black.brown | .R=100.G=200.B=150 +form | false | color= | color=blue | color=blue,black,brown | color=R,100,G,200,B,150 +form | true | color= | color=blue | color=blue&color=black&color=brown | R=100&G=200&B=150 +simple | false | n/a | blue | blue,black,brown | R,100,G,200,B,150 +simple | true | n/a | blue | blue,black,brown | R=100,G=200,B=150 +spaceDelimited | false | n/a | n/a | blue%20black%20brown | R%20100%20G%20200%20B%20150 +pipeDelimited | false | n/a | n/a | blue\|black\|brown | R\|100\|G\|200|G\|150 +deepObject | true | n/a | n/a | n/a | color[R]=100&color[G]=200&color[B]=150 + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Parameter Object Examples + +A header parameter with an array of 64 bit integer numbers: + +```json +{ + "name": "token", + "in": "header", + "description": "token to be passed as a header", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "style": "simple" +} +``` + +```yaml +name: token +in: header +description: token to be passed as a header +required: true +schema: + type: array + items: + type: integer + format: int64 +style: simple +``` + +A path parameter of a string value: +```json +{ + "name": "username", + "in": "path", + "description": "username to fetch", + "required": true, + "schema": { + "type": "string" + } +} +``` + +```yaml +name: username +in: path +description: username to fetch +required: true +schema: + type: string +``` + +An optional query parameter of a string value, allowing multiple values by repeating the query parameter: +```json +{ + "name": "id", + "in": "query", + "description": "ID of the object to fetch", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form", + "explode": true +} +``` + +```yaml +name: id +in: query +description: ID of the object to fetch +required: false +schema: + type: array + items: + type: string +style: form +explode: true +``` + +A free-form query parameter, allowing undefined parameters of a specific type: +```json +{ + "in": "query", + "name": "freeForm", + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer" + }, + }, + "style": "form" +} +``` + +```yaml +in: query +name: freeForm +schema: + type: object + additionalProperties: + type: integer +style: form +``` + +A complex parameter using `content` to define serialization: + +```json +{ + "in": "query", + "name": "coordinates", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "lat", + "long" + ], + "properties": { + "lat": { + "type": "number" + }, + "long": { + "type": "number" + } + } + } + } + } +} +``` + +```yaml +in: query +name: coordinates +content: + application/json: + schema: + type: object + required: + - lat + - long + properties: + lat: + type: number + long: + type: number +``` + +#### Request Body Object + +Describes a single request body. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +description | `string` | A brief description of the request body. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | **REQUIRED**. The content of the request body. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* +required | `boolean` | Determines if the request body is required in the request. Defaults to `false`. + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Request Body Examples + +A request body with a referenced model definition. +```json +{ + "description": "user to add to the system", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": { + "user" : { + "summary": "User Example", + "externalValue": "http://foo.bar/examples/user-example.json" + } + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": { + "user" : { + "summary": "User example in XML", + "externalValue": "http://foo.bar/examples/user-example.xml" + } + } + }, + "text/plain": { + "examples": { + "user" : { + "summary": "User example in Plain text", + "externalValue": "http://foo.bar/examples/user-example.txt" + } + } + }, + "*/*": { + "examples": { + "user" : { + "summary": "User example in other format", + "externalValue": "http://foo.bar/examples/user-example.whatever" + } + } + } + } +} +``` + +```yaml +description: user to add to the system +content: + 'application/json': + schema: + $ref: '#/components/schemas/User' + examples: + user: + summary: User Example + externalValue: 'http://foo.bar/examples/user-example.json' + 'application/xml': + schema: + $ref: '#/components/schemas/User' + examples: + user: + summary: User Example in XML + externalValue: 'http://foo.bar/examples/user-example.xml' + 'text/plain': + examples: + user: + summary: User example in text plain format + externalValue: 'http://foo.bar/examples/user-example.txt' + '*/*': + examples: + user: + summary: User example in other format + externalValue: 'http://foo.bar/examples/user-example.whatever' +``` + +A body parameter that is an array of string values: +```json +{ + "description": "user to add to the system", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } +} +``` + +```yaml +description: user to add to the system +required: true +content: + text/plain: + schema: + type: array + items: + type: string +``` + + +#### Media Type Object +Each Media Type Object provides schema and examples for the media type identified by its key. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the request body. +example | Any | Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema. +examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema. +encoding | Map[`string`, [Encoding Object](#encodingObject)] | A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Media Type Examples + +```js +{ + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + }, + "examples": { + "cat" : { + "summary": "An example of a cat", + "value": + { + "name": "Fluffy", + "petType": "Cat", + "color": "White", + "gender": "male", + "breed": "Persian" + } + }, + "dog": { + "summary": "An example of a dog with a cat's name", + "value" : { + "name": "Puma", + "petType": "Dog", + "color": "Black", + "gender": "Female", + "breed": "Mixed" + }, + "frog": { + "$ref": "#/components/examples/frog-example" + } + } + } + } +} +``` + +```yaml +application/json: + schema: + $ref: "#/components/schemas/Pet" + examples: + cat: + summary: An example of a cat + value: + name: Fluffy + petType: Cat + color: White + gender: male + breed: Persian + dog: + summary: An example of a dog with a cat's name + value: + name: Puma + petType: Dog + color: Black + gender: Female + breed: Mixed + frog: + $ref: "#/components/examples/frog-example" +``` + +##### Considerations for File Uploads + +In contrast with the 2.0 specification, `file` input/output content in OpenAPI is described with the same semantics as any other schema type. Specifically: + +```yaml +# content transferred with base64 encoding +schema: + type: string + format: base64 +``` + +```yaml +# content transferred in binary (octet-stream): +schema: + type: string + format: binary +``` + +These examples apply to either input payloads of file uploads or response payloads. + +A `requestBody` for submitting a file in a `POST` operation may look like the following example: + +```yaml +requestBody: + content: + application/octet-stream: + # any media type is accepted, functionally equivalent to `*/*` + schema: + # a binary file of any type + type: string + format: binary +``` + +In addition, specific media types MAY be specified: + +```yaml +# multiple, specific media types may be specified: +requestBody: + content: + # a binary file of type png or jpeg + 'image/jpeg': + schema: + type: string + format: binary + 'image/png': + schema: + type: string + format: binary +``` + +To upload multiple files, a `multipart` media type MUST be used: + +```yaml +requestBody: + content: + multipart/form-data: + schema: + properties: + # The property name 'file' will be used for all files. + file: + type: array + items: + type: string + format: binary + +``` + +##### Support for x-www-form-urlencoded Request Bodies + +To submit content using form url encoding via [RFC1866](https://tools.ietf.org/html/rfc1866), the following +definition may be used: + +```yaml +requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + id: + type: string + format: uuid + address: + # complex types are stringified to support RFC 1866 + type: object + properties: {} +``` + +In this example, the contents in the `requestBody` MUST be stringified per [RFC1866](https://tools.ietf.org/html/rfc1866/) when passed to the server. In addition, the `address` field complex object will be stringified. + +When passing complex objects in the `application/x-www-form-urlencoded` content type, the default serialization strategy of such properties is described in the [`Encoding Object`](#encodingObject)'s [`style`](#encodingStyle) property as `form`. + +##### Special Considerations for `multipart` Content + +It is common to use `multipart/form-data` as a `Content-Type` when transferring request bodies to operations. In contrast to 2.0, a `schema` is REQUIRED to define the input parameters to the operation when using `multipart` content. This supports complex structures as well as supporting mechanisms for multiple file uploads. + +When passing in `multipart` types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default `Content-Type`s are defined for `multipart`: + +* If the property is a primitive, or an array of primitive values, the default Content-Type is `text/plain` +* If the property is complex, or an array of complex values, the default Content-Type is `application/json` +* If the property is a `type: string` with `format: binary` or `format: base64` (aka a file object), the default Content-Type is `application/octet-stream` + + +Examples: + +```yaml +requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + id: + type: string + format: uuid + address: + # default Content-Type for objects is `application/json` + type: object + properties: {} + profileImage: + # default Content-Type for string/binary is `application/octet-stream` + type: string + format: binary + children: + # default Content-Type for arrays is based on the `inner` type (text/plain here) + type: array + items: + type: string + addresses: + # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example) + type: array + items: + type: '#/components/schemas/Address' +``` + +An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies. + +#### Encoding Object + +A single encoding definition applied to a single schema property. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +contentType | `string` | The Content-Type for encoding a specific property. Default value depends on the property type: for `string` with `format` being `binary` – `application/octet-stream`; for other primitive types – `text/plain`; for `object` - `application/json`; for `array` – the default is defined based on the inner type. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types. +headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a `multipart`. +style | `string` | Describes how a specific property value will be serialized depending on its type. See [Parameter Object](#parameterObject) for details on the [`style`](#parameterStyle) property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. +explode | `boolean` | When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When [`style`](#encodingStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. +allowReserved | `boolean` | Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Encoding Object Example + +```yaml +requestBody: + content: + multipart/mixed: + schema: + type: object + properties: + id: + # default is text/plain + type: string + format: uuid + address: + # default is application/json + type: object + properties: {} + historyMetadata: + # need to declare XML format! + description: metadata in XML format + type: object + properties: {} + profileImage: + # default is application/octet-stream, need to declare an image type only! + type: string + format: binary + encoding: + historyMetadata: + # require XML Content-Type in utf-8 encoding + contentType: application/xml; charset=utf-8 + profileImage: + # only accept png/jpeg + contentType: image/png, image/jpeg + headers: + X-Rate-Limit-Limit: + description: The number of allowed requests in the current period + schema: + type: integer +``` + +#### Responses Object + +A container for the expected responses of an operation. +The container maps a HTTP response code to the expected response. + +The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. +However, documentation is expected to cover a successful operation response and any known errors. + +The `default` MAY be used as a default response object for all HTTP codes +that are not covered individually by the specification. + +The `Responses Object` MUST contain at least one response code, and it +SHOULD be the response for a successful operation call. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +default | [Response Object](#responseObject) \| [Reference Object](#referenceObject) | The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A [Reference Object](#referenceObject) can link to a response that the [OpenAPI Object's components/responses](#componentsResponses) section defines. + +##### Patterned Fields +Field Pattern | Type | Description +---|:---:|--- +[HTTP Status Code](#httpCodes) | [Response Object](#responseObject) \| [Reference Object](#referenceObject) | Any [HTTP status code](#httpCodes) can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A [Reference Object](#referenceObject) can link to a response that is defined in the [OpenAPI Object's components/responses](#componentsResponses) section. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. The following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code. + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Responses Object Example + +A 200 response for a successful operation and a default response for others (implying an error): + +```json +{ + "200": { + "description": "a pet to be returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorModel" + } + } + } + } +} +``` + +```yaml +'200': + description: a pet to be returned + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' +default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorModel' +``` + +#### Response Object +Describes a single response from an API Operation, including design-time, static +`links` to operations based on the response. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +description | `string` | **REQUIRED**. A short description of the response. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | Maps a header name to its definition. [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored. +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | A map containing descriptions of potential response payloads. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* +links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for [Component Objects](#componentsObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Response Object Examples + +Response of an array of a complex type: + +```json +{ + "description": "A complex object array response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VeryComplexType" + } + } + } + } +} +``` + +```yaml +description: A complex object array response +content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VeryComplexType' +``` + +Response with a string type: + +```json +{ + "description": "A simple string response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + +} +``` + +```yaml +description: A simple string response +content: + text/plain: + schema: + type: string +``` + +Plain text response with headers: + +```json +{ + "description": "A simple string response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "headers": { + "X-Rate-Limit-Limit": { + "description": "The number of allowed requests in the current period", + "schema": { + "type": "integer" + } + }, + "X-Rate-Limit-Remaining": { + "description": "The number of remaining requests in the current period", + "schema": { + "type": "integer" + } + }, + "X-Rate-Limit-Reset": { + "description": "The number of seconds left in the current period", + "schema": { + "type": "integer" + } + } + } +} +``` + +```yaml +description: A simple string response +content: + text/plain: + schema: + type: string + example: 'whoa!' +headers: + X-Rate-Limit-Limit: + description: The number of allowed requests in the current period + schema: + type: integer + X-Rate-Limit-Remaining: + description: The number of remaining requests in the current period + schema: + type: integer + X-Rate-Limit-Reset: + description: The number of seconds left in the current period + schema: + type: integer +``` + +Response with no return value: + +```json +{ + "description": "object created" +} +``` + +```yaml +description: object created +``` + +#### Callback Object + +A map of possible out-of band callbacks related to the parent operation. +Each value in the map is a [Path Item Object](#pathItemObject) that describes a set of requests that may be initiated by the API provider and the expected responses. +The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. + +##### Patterned Fields +Field Pattern | Type | Description +---|:---:|--- +{expression} | [Path Item Object](#pathItemObject) | A Path Item Object used to define a callback request and expected responses. A [complete example](../examples/v3.0/callback-example.yaml) is available. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Key Expression + +The key that identifies the [Path Item Object](#pathItemObject) is a [runtime expression](#runtimeExpression) that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. +A simple example might be `$request.body#/url`. +However, using a [runtime expression](#runtimeExpression) the complete HTTP message can be accessed. +This includes accessing any part of a body that a JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) can reference. + +For example, given the following HTTP request: + +```http +POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1 +Host: example.org +Content-Type: application/json +Content-Length: 187 + +{ + "failedUrl" : "http://clientdomain.com/failed", + "successUrls" : [ + "http://clientdomain.com/fast", + "http://clientdomain.com/medium", + "http://clientdomain.com/slow" + ] +} + +201 Created +Location: http://example.org/subscription/1 +``` + +The following examples show how the various expressions evaluate, assuming the callback operation has a path parameter named `eventType` and a query parameter named `queryUrl`. + +Expression | Value +---|:--- +$url | http://example.org/subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning +$method | POST +$request.path.eventType | myevent +$request.query.queryUrl | http://clientdomain.com/stillrunning +$request.header.content-Type | application/json +$request.body#/failedUrl | http://clientdomain.com/stillrunning +$request.body#/successUrls/2 | http://clientdomain.com/medium +$response.header.Location | http://example.org/subscription/1 + + +##### Callback Object Example + +The following example shows a callback to the URL specified by the `id` and `email` property in the request body. + +```yaml +myWebhook: + 'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}': + post: + requestBody: + description: Callback payload + content: + 'application/json': + schema: + $ref: '#/components/schemas/SomePayload' + responses: + '200': + description: webhook successfully processed and no retries will be performed +``` + + +#### Example Object + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +summary | `string` | Short description for the example. +description | `string` | Long description for the example. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +value | Any | Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. +externalValue | `string` | A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +In all cases, the example value is expected to be compatible with the type schema +of its associated value. Tooling implementations MAY choose to +validate compatibility automatically, and reject the example value(s) if incompatible. + +##### Example Object Example + +```yaml +# in a model +schemas: + properties: + name: + type: string + examples: + name: + $ref: http://example.org/petapi-examples/openapi.json#/components/examples/name-example + +# in a request body: + requestBody: + content: + 'application/json': + schema: + $ref: '#/components/schemas/Address' + examples: + foo: + summary: A foo example + value: {"foo": "bar"} + bar: + summary: A bar example + value: {"bar": "baz"} + 'application/xml': + examples: + xmlExample: + summary: This is an example in XML + externalValue: 'http://example.org/examples/address-example.xml' + 'text/plain': + examples: + textExample: + summary: This is a text example + externalValue: 'http://foo.bar/examples/address-example.txt' + + +# in a parameter + parameters: + - name: 'zipCode' + in: 'query' + schema: + type: 'string' + format: 'zip-code' + examples: + zip-example: + $ref: '#/components/examples/zip-example' + +# in a response + responses: + '200': + description: your car appointment has been booked + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + examples: + confirmation-success: + $ref: '#/components/examples/confirmation-success' +``` + + +#### Link Object + +The `Link object` represents a possible design-time link for a response. +The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. + +Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. + +For computing links, and providing instructions to execute them, a [runtime expression](#runtimeExpression) is used for accessing values in an operation and using them as parameters while invoking the linked operation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +operationRef | `string` | A relative or absolute reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operationObject). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OpenAPI definition. +operationId | `string` | The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field. +parameters | Map[`string`, Any \| [{expression}](#runtimeExpression)] | A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the [parameter location](#parameterIn) `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path.id). +requestBody | Any \| [{expression}](#runtimeExpression) | A literal value or [{expression}](#runtimeExpression) to use as a request body when calling the target operation. +description | `string` | A description of the link. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +server | [Server Object](#serverObject) | A server object to be used by the target operation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +A linked operation MUST be identified using either an `operationRef` or `operationId`. +In the case of an `operationId`, it MUST be unique and resolved in the scope of the OAS document. +Because of the potential for name clashes, the `operationRef` syntax is preferred +for specifications with external references. + +##### Examples + +Computing a link from a request operation where the `$request.path.id` is used to pass a request parameter to the linked operation. + +```yaml +paths: + /users/{id}: + parameters: + - name: id + in: path + required: true + description: the user identifier, as userId + schema: + type: string + get: + responses: + '200': + description: the user being returned + content: + application/json: + schema: + type: object + properties: + uuid: # the unique user id + type: string + format: uuid + links: + address: + # the target link operationId + operationId: getUserAddress + parameters: + # get the `id` field from the request path parameter named `id` + userId: $request.path.id + # the path item of the linked operation + /users/{userid}/address: + parameters: + - name: userid + in: path + required: true + description: the user identifier, as userId + schema: + type: string + # linked operation + get: + operationId: getUserAddress + responses: + '200': + description: the user's address +``` + +When a runtime expression fails to evaluate, no parameter value is passed to the target operation. + +Values from the response body can be used to drive a linked operation. + +```yaml +links: + address: + operationId: getUserAddressByUUID + parameters: + # get the `uuid` field from the `uuid` field in the response body + userUuid: $response.body#/uuid +``` + +Clients follow all links at their discretion. +Neither permissions, nor the capability to make a successful call to that link, is guaranteed +solely by the existence of a relationship. + + +##### OperationRef Examples + +As references to `operationId` MAY NOT be possible (the `operationId` is an optional +value), references MAY also be made through a relative `operationRef`: + +```yaml +links: + UserRepositories: + # returns array of '#/components/schemas/repository' + operationRef: '#/paths/~12.0~1repositories~1{username}/get' + parameters: + username: $response.body#/username +``` + +or an absolute `operationRef`: + +```yaml +links: + UserRepositories: + # returns array of '#/components/schemas/repository' + operationRef: 'https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get' + parameters: + username: $response.body#/username +``` + +Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when +using JSON references. + + +##### Runtime Expressions + +Runtime expressions allow defining values based on information that will only be available within the HTTP message in an actual API call. +This mechanism is used by [Link Objects](#linkObject) and [Callback Objects](#callbackObject). + +The runtime expression is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax + +``` + expression = ( "$url" | "$method" | "$statusCode" | "$request." source | "$response." source ) + source = ( header-reference | query-reference | path-reference | body-reference ) + header-reference = "header." token + query-reference = "query." name + path-reference = "path." name + body-reference = "body" ["#" fragment] + fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901) + name = *( char ) + char = as per RFC [7159](https://tools.ietf.org/html/rfc7159#section-7) + token = as per RFC [7230](https://tools.ietf.org/html/rfc7230#section-3.2.6) +``` + +The `name` identifier is case-sensitive, whereas `token` is not. + +The table below provides examples of runtime expressions and examples of their use in a value: + +##### Examples + +Source Location | example expression | notes +---|:---|:---| +HTTP Method | `$method` | The allowable values for the `$method` will be those for the HTTP operation. +Requested media type | `$request.header.accept` | +Request parameter | `$request.path.id` | Request parameters MUST be declared in the `parameters` section of the parent operation or they cannot be evaluated. This includes request headers. +Request body property | `$request.body#/user/uuid` | In operations which accept payloads, references may be made to portions of the `requestBody` or the entire body. +Request URL | `$url` | +Response value | `$response.body#/status` | In operations which return payloads, references may be made to portions of the response body or the entire body. +Response header | `$response.header.Server` | Single header values only are available + +Runtime expressions preserve the type of the referenced value. +Expressions can be embedded into string values by surrounding the expression with `{}` curly braces. + +#### Header Object + +The Header Object follows the structure of the [Parameter Object](#parameterObject) with the following changes: + +1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. +1. `in` MUST NOT be specified, it is implicitly in `header`. +1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, [`style`](#parameterStyle)). + +##### Header Object Example + +A simple header of type `integer`: + +```json +{ + "description": "The number of allowed requests in the current period", + "schema": { + "type": "integer" + } +} +``` + +```yaml +description: The number of allowed requests in the current period +schema: + type: integer +``` + +#### Tag Object + +Adds metadata to a single tag that is used by the [Operation Object](#operationObject). +It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The name of the tag. +description | `string` | A short description for the tag. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this tag. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Tag Object Example + +```json +{ + "name": "pet", + "description": "Pets operations" +} +``` + +```yaml +name: pet +description: Pets operations +``` + + +#### Reference Object + +A simple object to allow referencing other components in the specification, internally and externally. + +The Reference Object is defined by [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and follows the same structure, behavior and rules. + +For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +$ref | `string` | **REQUIRED**. The reference string. + +This object cannot be extended with additional properties and any properties added SHALL be ignored. + +##### Reference Object Example + +```json +{ + "$ref": "#/components/schemas/Pet" +} +``` + +```yaml +$ref: '#/components/schemas/Pet' +``` + +##### Relative Schema Document Example +```json +{ + "$ref": "Pet.json" +} +``` + +```yaml +$ref: Pet.yaml +``` + +##### Relative Documents With Embedded Schema Example +```json +{ + "$ref": "definitions.json#/Pet" +} +``` + +```yaml +$ref: definitions.yaml#/Pet +``` + +#### Schema Object + +The Schema Object allows the definition of input and output data types. +These types can be objects, but also primitives and arrays. +This object is an extended subset of the [JSON Schema Specification Wright Draft 00](http://json-schema.org/). + +For more information about the properties, see [JSON Schema Core](https://tools.ietf.org/html/draft-wright-json-schema-00) and [JSON Schema Validation](https://tools.ietf.org/html/draft-wright-json-schema-validation-00). +Unless stated otherwise, the property definitions follow the JSON Schema. + +##### Properties + +The following properties are taken directly from the JSON Schema definition and follow the same specifications: + +- title +- multipleOf +- maximum +- exclusiveMaximum +- minimum +- exclusiveMinimum +- maxLength +- minLength +- pattern (This string SHOULD be a valid regular expression, according to the [ECMA 262 regular expression](https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5) dialect) +- maxItems +- minItems +- uniqueItems +- maxProperties +- minProperties +- required +- enum + +The following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification. +- type - Value MUST be a string. Multiple types via an array are not supported. +- allOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- oneOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- anyOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- not - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. `items` MUST be present if the `type` is `array`. +- properties - Property definitions MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced). +- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- description - [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +- format - See [Data Type Formats](#dataTypeFormat) for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats. +- default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if `type` is `string`, then `default` can be `"foo"` but cannot be `1`. + +Alternatively, any time a Schema Object can be used, a [Reference Object](#referenceObject) can be used in its place. This allows referencing definitions instead of defining them inline. + +Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported. + +Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation: + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +nullable | `boolean` | Allows sending a `null` value for the defined schema. Default value is `false`. +discriminator | [Discriminator Object](#discriminatorObject) | Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See [Composition and Inheritance](#schemaComposition) for more details. +readOnly | `boolean` | Relevant only for Schema `"properties"` definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as `readOnly` being `true` and is in the `required` list, the `required` will take effect on the response only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. +writeOnly | `boolean` | Relevant only for Schema `"properties"` definitions. Declares the property as "write only". Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as `writeOnly` being `true` and is in the `required` list, the `required` will take effect on the request only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. +xml | [XML Object](#xmlObject) | This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this schema. +example | Any | A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary. + deprecated | `boolean` | Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is `false`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +###### Composition and Inheritance (Polymorphism) + +The OpenAPI Specification allows combining and extending model definitions using the `allOf` property of JSON Schema, in effect offering model composition. +`allOf` takes an array of object definitions that are validated *independently* but together compose a single object. + +While composition offers model extensibility, it does not imply a hierarchy between the models. +To support polymorphism, the OpenAPI Specification adds the `discriminator` field. +When used, the `discriminator` will be the name of the property that decides which schema definition validates the structure of the model. +As such, the `discriminator` field MUST be a required field. +There are two ways to define the value of a discriminator for an inheriting instance. +- Use the schema name. +- Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. +As such, inline schema definitions, which do not have a given id, *cannot* be used in polymorphism. + +###### XML Modeling + +The [xml](#schemaXml) property allows extra definitions when translating the JSON definition to XML. +The [XML Object](#xmlObject) contains additional information about the available options. + +##### Schema Object Examples + +###### Primitive Sample + +```json +{ + "type": "string", + "format": "email" +} +``` + +```yaml +type: string +format: email +``` + +###### Simple Model + +```json +{ + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "age": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } +} +``` + +```yaml +type: object +required: +- name +properties: + name: + type: string + address: + $ref: '#/components/schemas/Address' + age: + type: integer + format: int32 + minimum: 0 +``` + +###### Model with Map/Dictionary Properties + +For a simple string to string mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "type": "string" + } +} +``` + +```yaml +type: object +additionalProperties: + type: string +``` + +For a string to model mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComplexModel" + } +} +``` + +```yaml +type: object +additionalProperties: + $ref: '#/components/schemas/ComplexModel' +``` + +###### Model with Example + +```json +{ + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "example": { + "name": "Puma", + "id": 1 + } +} +``` + +```yaml +type: object +properties: + id: + type: integer + format: int64 + name: + type: string +required: +- name +example: + name: Puma + id: 1 +``` + +###### Models with Composition + +```json +{ + "components": { + "schemas": { + "ErrorModel": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer", + "minimum": 100, + "maximum": 600 + } + } + }, + "ExtendedErrorModel": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorModel" + }, + { + "type": "object", + "required": [ + "rootCause" + ], + "properties": { + "rootCause": { + "type": "string" + } + } + } + ] + } + } + } +} +``` + +```yaml +components: + schemas: + ErrorModel: + type: object + required: + - message + - code + properties: + message: + type: string + code: + type: integer + minimum: 100 + maximum: 600 + ExtendedErrorModel: + allOf: + - $ref: '#/components/schemas/ErrorModel' + - type: object + required: + - rootCause + properties: + rootCause: + type: string +``` + +###### Models with Polymorphism Support + +```json +{ + "components": { + "schemas": { + "Pet": { + "type": "object", + "discriminator": { + "propertyName": "petType" + }, + "properties": { + "name": { + "type": "string" + }, + "petType": { + "type": "string" + } + }, + "required": [ + "name", + "petType" + ] + }, + "Cat": { + "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "huntingSkill": { + "type": "string", + "description": "The measured skill for hunting", + "default": "lazy", + "enum": [ + "clueless", + "lazy", + "adventurous", + "aggressive" + ] + } + }, + "required": [ + "huntingSkill" + ] + } + ] + }, + "Dog": { + "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "packSize": { + "type": "integer", + "format": "int32", + "description": "the size of the pack the dog is from", + "default": 0, + "minimum": 0 + } + }, + "required": [ + "packSize" + ] + } + ] + } + } + } +} +``` + +```yaml +components: + schemas: + Pet: + type: object + discriminator: + propertyName: petType + properties: + name: + type: string + petType: + type: string + required: + - name + - petType + Cat: ## "Cat" will be used as the discriminator value + description: A representation of a cat + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + huntingSkill: + type: string + description: The measured skill for hunting + enum: + - clueless + - lazy + - adventurous + - aggressive + required: + - huntingSkill + Dog: ## "Dog" will be used as the discriminator value + description: A representation of a dog + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + packSize: + type: integer + format: int32 + description: the size of the pack the dog is from + default: 0 + minimum: 0 + required: + - packSize +``` + +#### Discriminator Object + +When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. + +When using the discriminator, _inline_ schemas will not be considered. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +propertyName | `string` | **REQUIRED**. The name of the property in the payload that will hold the discriminator value. + mapping | Map[`string`, `string`] | An object to hold mappings between payload values and schema names or references. + +The discriminator attribute is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. + +In OAS 3.0, a response payload MAY be described to be exactly one of any number of types: + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' +``` + +which means the payload _MUST_, by validation, match exactly one of the schemas described by `Cat`, `Dog`, or `Lizard`. In this case, a discriminator MAY act as a "hint" to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use: + + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' + discriminator: + propertyName: pet_type +``` + +The expectation now is that a property with name `pet_type` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload: + +``` +{ + "id": 12345, + "pet_type": "Cat" +} +``` + +Will indicate that the `Cat` schema be used in conjunction with this payload. + +In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional `mapping` definition MAY be used: + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' + - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json' + discriminator: + propertyName: pet_type + mapping: + dog: '#/components/schemas/Dog' + monster: 'https://gigantic-server.com/schemas/Monster/schema.json' +``` + +Here the discriminator _value_ of `dog` will map to the schema `#/components/schemas/Dog`, rather than the default (implicit) value of `Dog`. If the discriminator _value_ does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison. + +When used in conjunction with the `anyOf` construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload. + +In both the `oneOf` and `anyOf` use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an `allOf` construct may be used as an alternate schema. + +For example: + +``` +components: + schemas: + Pet: + type: object + required: + - pet_type + properties: + pet_type: + type: string + discriminator: + propertyName: pet_type + mapping: + cachorro: Dog + Cat: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Cat` + properties: + name: + type: string + Dog: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Dog` + properties: + bark: + type: string + Lizard: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Lizard` + properties: + lovesRocks: + type: boolean +``` + +a payload like this: + +``` +{ + "pet_type": "Cat", + "name": "misty" +} +``` + +will indicate that the `Cat` schema be used. Likewise this schema: + +``` +{ + "pet_type": "cachorro", + "bark": "soft" +} +``` + +will map to `Dog` because of the definition in the `mappings` element. + + +#### XML Object + +A metadata object that allows for more fine-tuned XML model definitions. + +When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. +See examples for expected behavior. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored. +namespace | `string` | The URI of the namespace definition. Value MUST be in the form of an absolute URI. +prefix | `string` | The prefix to be used for the [name](#xmlName). +attribute | `boolean` | Declares whether the property definition translates to an attribute instead of an element. Default value is `false`. +wrapped | `boolean` | MAY be used only for an array definition. Signifies whether the array is wrapped (for example, ``) or unwrapped (``). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### XML Object Examples + +The examples of the XML object definitions are included inside a property definition of a [Schema Object](#schemaObject) with a sample of the XML representation of it. + +###### No XML Element + +Basic string property: + +```json +{ + "animals": { + "type": "string" + } +} +``` + +```yaml +animals: + type: string +``` + +```xml +... +``` + +Basic string array property ([`wrapped`](#xmlWrapped) is `false` by default): + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string +``` + +```xml +... +... +... +``` + +###### XML Name Replacement + +```json +{ + "animals": { + "type": "string", + "xml": { + "name": "animal" + } + } +} +``` + +```yaml +animals: + type: string + xml: + name: animal +``` + +```xml +... +``` + + +###### XML Attribute, Prefix and Namespace + +In this example, a full model definition is shown. + +```json +{ + "Person": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "xml": { + "attribute": true + } + }, + "name": { + "type": "string", + "xml": { + "namespace": "http://example.com/schema/sample", + "prefix": "sample" + } + } + } + } +} +``` + +```yaml +Person: + type: object + properties: + id: + type: integer + format: int32 + xml: + attribute: true + name: + type: string + xml: + namespace: http://example.com/schema/sample + prefix: sample +``` + +```xml + + example + +``` + +###### XML Arrays + +Changing the element names: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal +``` + +```xml +value +value +``` + +The external `name` property has no effect on the XML: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "name": "aliens" + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + name: aliens +``` + +```xml +value +value +``` + +Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + wrapped: true +``` + +```xml + + value + value + +``` + +To overcome the naming problem in the example above, the following definition can be used: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + wrapped: true +``` + +```xml + + value + value + +``` + +Affecting both internal and external names: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "name": "aliens", + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + name: aliens + wrapped: true +``` + +```xml + + value + value + +``` + +If we change the external element but not the internal ones: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "name": "aliens", + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: aliens + wrapped: true +``` + +```xml + + value + value + +``` + +#### Security Scheme Object + +Defines a security scheme that can be used by the operations. +Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in [RFC6749](https://tools.ietf.org/html/rfc6749), and [OpenID Connect Discovery](https://tools.ietf.org/html/draft-ietf-oauth-discovery-06). + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +type | `string` | Any | **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`. +description | `string` | Any | A short description for security scheme. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +name | `string` | `apiKey` | **REQUIRED**. The name of the header, query or cookie parameter to be used. +in | `string` | `apiKey` | **REQUIRED**. The location of the API key. Valid values are `"query"`, `"header"` or `"cookie"`. +scheme | `string` | `http` | **REQUIRED**. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). +bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. +flows | [OAuth Flows Object](#oauthFlowsObject) | `oauth2` | **REQUIRED**. An object containing configuration information for the flow types supported. +openIdConnectUrl | `string` | `openIdConnect` | **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Security Scheme Object Example + +###### Basic Authentication Sample + +```json +{ + "type": "http", + "scheme": "basic" +} +``` + +```yaml +type: http +scheme: basic +``` + +###### API Key Sample + +```json +{ + "type": "apiKey", + "name": "api_key", + "in": "header" +} +``` + +```yaml +type: apiKey +name: api_key +in: header +``` + +###### JWT Bearer Sample + +```json +{ + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", +} +``` + +```yaml +type: http +scheme: bearer +bearerFormat: JWT +``` + +###### Implicit OAuth2 Sample + +```json +{ + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } +} +``` + +```yaml +type: oauth2 +flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + +#### OAuth Flows Object + +Allows configuration of the supported OAuth Flows. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow +password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Password flow +clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0. +authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### OAuth Flow Object + +Configuration details for a supported OAuth Flow + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +authorizationUrl | `string` | `oauth2` (`"implicit"`, `"authorizationCode"`) | **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of a URL. +tokenUrl | `string` | `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`) | **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of a URL. +refreshUrl | `string` | `oauth2` | The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. +scopes | Map[`string`, `string`] | `oauth2` | **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### OAuth Flow Object Examples + +```JSON +{ + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + }, + "authorizationCode": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } +} +``` + +```YAML +type: oauth2 +flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + authorizationCode: + authorizationUrl: https://example.com/api/oauth/dialog + tokenUrl: https://example.com/api/oauth/token + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + + +#### Security Requirement Object + +Lists the required security schemes to execute this operation. +The name used for each property MUST correspond to a security scheme declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). + +Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. + +When a list of Security Requirement Objects is defined on the [Open API object](#oasObject) or [Operation Object](#operationObject), only one of Security Requirement Objects in the list needs to be satisfied to authorize the request. + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +{name} | [`string`] | Each name MUST correspond to a security scheme which is declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty. + +##### Security Requirement Object Examples + +###### Non-OAuth2 Security Requirement + +```json +{ + "api_key": [] +} +``` + +```yaml +api_key: [] +``` + +###### OAuth2 Security Requirement + +```json +{ + "petstore_auth": [ + "write:pets", + "read:pets" + ] +} +``` + +```yaml +petstore_auth: +- write:pets +- read:pets +``` + +### Specification Extensions + +While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points. + +The extensions properties are implemented as patterned fields that are always prefixed by `"x-"`. + +Field Pattern | Type | Description +---|:---:|--- +^x- | Any | Allows extensions to the OpenAPI Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. Can have any valid JSON format value. + +The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced). + +### Security Filtering + +Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation. + +The reasoning is to allow an additional layer of access control over the documentation. +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization. + +Two examples of this: + +1. The [Paths Object](#pathsObject) MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can't access any documentation. They'd still have access to the [Info Object](#infoObject) which may contain additional information regarding authentication. +2. The [Path Item Object](#pathItemObject) MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the [Paths Object](#pathsObject), so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see. + +## Appendix A: Revision History + +Version | Date | Notes +--- | --- | --- +3.0.1 | 2017-12-06 | Patch release of the OpenAPI Specification 3.0.1 +3.0.0 | 2017-07-26 | Release of the OpenAPI Specification 3.0.0 +3.0.0-rc2 | 2017-06-16 | rc2 of the 3.0 specification +3.0.0-rc1 | 2017-04-27 | rc1 of the 3.0 specification +3.0.0-rc0 | 2017-02-28 | Implementer's Draft of the 3.0 specification +2.0 | 2015-12-31 | Donation of Swagger 2.0 to the Open API Initiative +2.0 | 2014-09-08 | Release of Swagger 2.0 +1.2 | 2014-03-14 | Initial release of the formal document. +1.1 | 2012-08-22 | Release of Swagger 1.1 +1.0 | 2011-08-10 | First release of the Swagger Specification diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/README.md b/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/README.md index 3987bd7b9..9ac297a5c 100644 --- a/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/README.md +++ b/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/README.md @@ -4,10 +4,7 @@ This directory contains a support tool that reads (scrapes) the Markdown text specification for OpenAPI 3.0 and builds a corresponding JSON schema. -It also contains "3.0.md", a local copy of the OpenAPI specification -with modifications that fix minor inconsistencies and make it easier -to read. We hope to have these changes merged into the official -document. +It also contains "3.0.1.md", a local copy of the OpenAPI specification. ## Disclaimer diff --git a/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/main.go b/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/main.go index 45509c0b9..1f3d03784 100644 --- a/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/main.go +++ b/deps/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/main.go @@ -303,7 +303,7 @@ func (m *SchemaModel) objectWithID(id string) *SchemaObject { // NewSchemaModel returns a new SchemaModel. func NewSchemaModel(filename string) (schemaModel *SchemaModel, err error) { - b, err := ioutil.ReadFile("3.0.md") + b, err := ioutil.ReadFile("3.0.1.md") if err != nil { return nil, err } diff --git a/deps/github.com/googleapis/gnostic/apps/disco/openapiv3.go b/deps/github.com/googleapis/gnostic/apps/disco/openapiv3.go index 763014aef..6c274572a 100644 --- a/deps/github.com/googleapis/gnostic/apps/disco/openapiv3.go +++ b/deps/github.com/googleapis/gnostic/apps/disco/openapiv3.go @@ -18,8 +18,8 @@ import ( "net/url" "strings" - discovery "github.com/googleapis/gnostic/discovery" openapi3 "github.com/googleapis/gnostic/OpenAPIv3" + discovery "github.com/googleapis/gnostic/discovery" ) func pathForMethod(path string) string { @@ -59,9 +59,9 @@ func buildOpenAPI3SchemaOrReferenceForSchema(schema *discovery.Schema) *openapi3 } } if schema.Items != nil { - s2 := buildOpenAPI3SchemaOrReferenceForSchema(schema.Items) - s.Items = &openapi3.ItemsItem{} - s.Items.SchemaOrReference = append(s.Items.SchemaOrReference, s2) + s.Items = &openapi3.ItemsItem{ + SchemaOrReference: []*openapi3.SchemaOrReference{buildOpenAPI3SchemaOrReferenceForSchema(schema.Items)}, + } } if (schema.Properties != nil) && (len(schema.Properties.AdditionalProperties) > 0) { s.Properties = &openapi3.Properties{} diff --git a/deps/github.com/googleapis/gnostic/examples/v2.0/yaml/empty-v2.yaml b/deps/github.com/googleapis/gnostic/examples/v2.0/yaml/empty-v2.yaml new file mode 100644 index 000000000..c5c6bc652 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/examples/v2.0/yaml/empty-v2.yaml @@ -0,0 +1,6 @@ +swagger: "2.0" +info: + version: "" + title: "" + description: "" +paths: diff --git a/deps/github.com/googleapis/gnostic/examples/v3.0/yaml/empty-v3.yaml b/deps/github.com/googleapis/gnostic/examples/v3.0/yaml/empty-v3.yaml new file mode 100644 index 000000000..b3b0425af --- /dev/null +++ b/deps/github.com/googleapis/gnostic/examples/v3.0/yaml/empty-v3.yaml @@ -0,0 +1,6 @@ +openapi: "3.0" +info: + version: + title: + description: +paths: diff --git a/deps/github.com/googleapis/gnostic/generate-gnostic/generate-compiler.go b/deps/github.com/googleapis/gnostic/generate-gnostic/generate-compiler.go index db988213b..442568c09 100644 --- a/deps/github.com/googleapis/gnostic/generate-gnostic/generate-compiler.go +++ b/deps/github.com/googleapis/gnostic/generate-gnostic/generate-compiler.go @@ -798,14 +798,17 @@ func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeNam code.Print("return nil") } else { code.Print("info := yaml.MapSlice{}") + code.Print("if m == nil {return info}") for _, propertyModel := range typeModel.Properties { + isRequired := typeModel.IsRequired(propertyModel.Name) switch propertyModel.Type { case "string": propertyName := propertyModel.Name if !propertyModel.Repeated { - code.Print("if m.%s != \"\" {", propertyModel.FieldName()) + code.PrintIf(isRequired, "// always include this required field.") + code.PrintIf(!isRequired, "if m.%s != \"\" {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) - code.Print("}") + code.PrintIf(!isRequired, "}") } else { code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) @@ -814,9 +817,10 @@ func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeNam case "bool": propertyName := propertyModel.Name if !propertyModel.Repeated { - code.Print("if m.%s != false {", propertyModel.FieldName()) + code.PrintIf(isRequired, "// always include this required field.") + code.PrintIf(!isRequired, "if m.%s != false {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) - code.Print("}") + code.PrintIf(!isRequired, "}") } else { code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) @@ -825,9 +829,10 @@ func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeNam case "int": propertyName := propertyModel.Name if !propertyModel.Repeated { - code.Print("if m.%s != 0 {", propertyModel.FieldName()) + code.PrintIf(isRequired, "// always include this required field.") + code.PrintIf(!isRequired, "if m.%s != 0 {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) - code.Print("}") + code.PrintIf(!isRequired, "}") } else { code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) @@ -836,9 +841,10 @@ func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeNam case "float": propertyName := propertyModel.Name if !propertyModel.Repeated { - code.Print("if m.%s != 0.0 {", propertyModel.FieldName()) + code.PrintIf(isRequired, "// always include this required field.") + code.PrintIf(!isRequired, "if m.%s != 0.0 {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) - code.Print("}") + code.PrintIf(!isRequired, "}") } else { code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) @@ -849,7 +855,8 @@ func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeNam if propertyName == "value" { code.Print("// %+v", propertyModel) } else if !propertyModel.Repeated { - code.Print("if m.%s != nil {", propertyModel.FieldName()) + code.PrintIf(isRequired, "// always include this required field.") + code.PrintIf(!isRequired, "if m.%s != nil {", propertyModel.FieldName()) if propertyModel.Type == "TypeItem" { code.Print("if len(m.Type.Value) == 1 {") code.Print("info = append(info, yaml.MapItem{Key:\"type\", Value:m.Type.Value[0]})") @@ -870,7 +877,7 @@ func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeNam code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s.ToRawInfo()})", propertyName, propertyModel.FieldName()) } - code.Print("}") + code.PrintIf(!isRequired, "}") code.Print("// %+v", propertyModel) } else if propertyModel.MapType == "string" { code.Print("// %+v", propertyModel) diff --git a/deps/github.com/googleapis/gnostic/generate-gnostic/types.go b/deps/github.com/googleapis/gnostic/generate-gnostic/types.go index e0859f795..5148d8290 100644 --- a/deps/github.com/googleapis/gnostic/generate-gnostic/types.go +++ b/deps/github.com/googleapis/gnostic/generate-gnostic/types.go @@ -130,3 +130,12 @@ func NewTypeModel() *TypeModel { typeModel.Properties = make([]*TypeProperty, 0) return typeModel } + +func (typeModel *TypeModel) IsRequired(propertyName string) bool { + for _, requiredName := range typeModel.Required { + if requiredName == propertyName { + return true + } + } + return false +} diff --git a/deps/github.com/googleapis/gnostic/gnostic.go b/deps/github.com/googleapis/gnostic/gnostic.go index 31ed1a260..960041521 100644 --- a/deps/github.com/googleapis/gnostic/gnostic.go +++ b/deps/github.com/googleapis/gnostic/gnostic.go @@ -41,6 +41,7 @@ import ( "path/filepath" "regexp" "strings" + "time" "github.com/golang/protobuf/proto" "github.com/googleapis/gnostic/OpenAPIv2" @@ -92,7 +93,7 @@ type pluginCall struct { } // Invokes a plugin. -func (p *pluginCall) perform(document proto.Message, sourceFormat int, sourceName string) ([]*plugins.Message, error) { +func (p *pluginCall) perform(document proto.Message, sourceFormat int, sourceName string, timePlugins bool) ([]*plugins.Message, error) { if p.Name != "" { request := &plugins.Request{} @@ -168,7 +169,12 @@ func (p *pluginCall) perform(document proto.Message, sourceFormat int, sourceNam cmd := exec.Command(executableName, "-plugin") cmd.Stdin = bytes.NewReader(requestBytes) cmd.Stderr = os.Stderr + pluginStartTime := time.Now() output, err := cmd.Output() + pluginElapsedTime := time.Since(pluginStartTime) + if timePlugins { + fmt.Printf("> %s (%s)\n", executableName, pluginElapsedTime) + } if err != nil { return nil, err } @@ -251,6 +257,7 @@ type Gnostic struct { pluginCalls []*pluginCall extensionHandlers []compiler.ExtensionHandler sourceFormat int + timePlugins bool } // Initialize a structure to store global application state. @@ -278,6 +285,7 @@ Options: to process OpenAPI specification extensions. --resolve-refs Explicitly resolve $ref references. This could have problems with recursive definitions. + --time-plugins Report plugin runtimes. ` // Initialize internal structures. g.pluginCalls = make([]*pluginCall, 0) @@ -324,6 +332,8 @@ func (g *Gnostic) readOptions() { g.extensionHandlers = append(g.extensionHandlers, extensionHandler) } else if arg == "--resolve-refs" { g.resolveReferences = true + } else if arg == "--time-plugins" { + g.timePlugins = true } else if arg[0] == '-' && arg[1] == '-' { // try letting the option specify a plugin with no output files (or unwanted output files) // this is useful for calling plugins like linters that only return messages @@ -535,7 +545,7 @@ func (g *Gnostic) performActions(message proto.Message) (err error) { // Call all specified plugins. messages := make([]*plugins.Message, 0) for _, p := range g.pluginCalls { - pluginMessages, err := p.perform(message, g.sourceFormat, g.sourceName) + pluginMessages, err := p.perform(message, g.sourceFormat, g.sourceName, g.timePlugins) if err != nil { writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") defer os.Exit(-1) // run all plugins, even when some have errors diff --git a/deps/github.com/googleapis/gnostic/gnostic_test.go b/deps/github.com/googleapis/gnostic/gnostic_test.go index 22eaee827..7057d7654 100644 --- a/deps/github.com/googleapis/gnostic/gnostic_test.go +++ b/deps/github.com/googleapis/gnostic/gnostic_test.go @@ -10,17 +10,18 @@ import ( ) func testCompiler(t *testing.T, inputFile string, referenceFile string, expectErrors bool) { - textFile := strings.Replace(filepath.Base(inputFile), filepath.Ext(inputFile), ".text", 1) + outputFormat := filepath.Ext(referenceFile)[1:] + outputFile := strings.Replace(filepath.Base(inputFile), filepath.Ext(inputFile), "."+outputFormat, 1) errorsFile := strings.Replace(filepath.Base(inputFile), filepath.Ext(inputFile), ".errors", 1) // remove any preexisting output files - os.Remove(textFile) + os.Remove(outputFile) os.Remove(errorsFile) // run the compiler var err error var cmd = exec.Command( "gnostic", inputFile, - "--text-out=.", + "--"+outputFormat+"-out=.", "--errors-out=.", "--resolve-refs") //t.Log(cmd.Args) @@ -30,19 +31,19 @@ func testCompiler(t *testing.T, inputFile string, referenceFile string, expectEr t.FailNow() } // verify the output against a reference - var outputFile string + var testFile string if expectErrors { - outputFile = errorsFile + testFile = errorsFile } else { - outputFile = textFile + testFile = outputFile } - err = exec.Command("diff", outputFile, referenceFile).Run() + err = exec.Command("diff", testFile, referenceFile).Run() if err != nil { t.Logf("Diff failed: %+v", err) t.FailNow() } else { // if the test succeeded, clean up - os.Remove(textFile) + os.Remove(outputFile) os.Remove(errorsFile) } } @@ -451,3 +452,17 @@ func TestPetstoreJSON_30(t *testing.T) { "examples/v3.0/json/petstore.json", "test/v3.0/petstore.text") } + +// Test that empty required fields are exported. + +func TestEmptyRequiredFields_v2(t *testing.T) { + testNormal(t, + "examples/v2.0/yaml/empty-v2.yaml", + "test/v2.0/json/empty-v2.json") +} + +func TestEmptyRequiredFields_v3(t *testing.T) { + testNormal(t, + "examples/v3.0/yaml/empty-v3.yaml", + "test/v3.0/json/empty-v3.json") +} diff --git a/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/Makefile b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/Makefile new file mode 100644 index 000000000..61de67ee3 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/Makefile @@ -0,0 +1,19 @@ + +GNOSTIC = $(GOPATH)/src/github.com/googleapis/gnostic + +plugin: + node_modules/.bin/pbjs -t json \ + $(GNOSTIC)/OpenAPIv2/OpenAPIv2.proto \ + $(GNOSTIC)/OpenAPIv3/OpenAPIv3.proto \ + $(GNOSTIC)/discovery/discovery.proto \ + $(GNOSTIC)/surface/surface.proto \ + $(GNOSTIC)/plugins/plugin.proto \ + > bundle.json + node_modules/.bin/nexe gnostic-lint-responses.js + mv gnostic-lint-responses $(GOPATH)/bin + +run: plugin + gnostic $(GNOSTIC)/examples/v2.0/yaml/petstore.yaml --lint-responses + +setup: + npm install diff --git a/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/README.md b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/README.md new file mode 100644 index 000000000..e932dd70b --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/README.md @@ -0,0 +1,15 @@ +This directory contains a gnostic linter written with node. + +It is built using [dcodeIO/Protobuf.js](https://github.com/dcodeIO/ProtoBuf.js). + +### SETUP + +- Install node. +- Run `make setup` to install node dependencies. + +### TRY IT + +- Run `make run` to test-run the plugin. + + + diff --git a/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/gnostic-lint-responses.js b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/gnostic-lint-responses.js new file mode 100644 index 000000000..1c389a497 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/gnostic-lint-responses.js @@ -0,0 +1,83 @@ +// import libraries +const protobuf = require("protobufjs"); +const getStdin = require("get-stdin"); +const find = require("lodash/find"); +const forEach = require("lodash/forEach"); +const pick = require("lodash/pick"); + +// import messages +const root = protobuf.Root.fromJSON(require("./bundle.json")); +const Request = root.lookupType("gnostic.plugin.v1.Request"); +const Response = root.lookupType("gnostic.plugin.v1.Response"); +const Document = root.lookupType("openapi.v2.Document"); + +getStdin.buffer().then(buffer => { + const request = Request.decode(buffer); + var messages = []; + for (var j in request.models) { + const m = request.models[j]; + if (m.type_url == "openapi.v2.Document") { + const openapi2 = Document.decode(m.value); + const paths = openapi2.paths.path; + for (var i in paths) { + const path = paths[i]; + // console.error('path %s\n\n', path.name) + + // Arrays MUST NOT be returned as the top-level structure in a response body. + let pathOps = pick(path.value, ["get","head","post", "put", "patch", "delete", "options"]); + forEach(pathOps, (op, opKey) => { + if (op != null) { + forEach(op.responses.responseCode, responseObj => { + // console.error('responseObj is %j', responseObj) + name = responseObj.name; + response = responseObj.value.response; + if (response.schema && response.schema.schema) { + if (!response.schema.schema._ref) { + if ( + response.schema.schema.type != null && + response.schema.schema.type.value == "array" + ) { + messages.push({ + level: 3, + code: "NO_ARRAY_RESPONSES", + text: "Arrays MUST NOT be returned as the top-level structure in a response body.", + keys: ["paths", path.name, opKey, "responses", name, "schema"] + }); + } + } else { + let schemaName = response.schema.schema._ref.match(/#\/definitions\/(\w+)/); + if (schemaName) { + const definitions = openapi2.definitions.additionalProperties; + const schemaKvp = find(definitions, {name: schemaName[1] + }); + //console.error('schemaKvp.value.type = %s', schemaKvp.value.type.value) + if (schemaKvp && schemaKvp.value.type && schemaKvp.value.type.value.indexOf("array") >= 0) { + messages.push({ + level: 3, + code: "NO_ARRAY_RESPONSES", + text: "Arrays MUST NOT be returned as the top-level structure in a response body.", + keys: ["paths", path.name, opKey, "responses", name, "schema" ] + }); + } + } + } + } + }); + } + }); + } + } + } + + const payload = { + messages: messages + }; + + // Verify the payload if necessary (i.e. when possibly incomplete or invalid) + const errMsg = Response.verify(payload); + if (errMsg) throw Error(errMsg); + + const message = Response.create(payload); + process.stdout.write(Response.encode(message).finish()); +}) +.catch(err => console.error(err)); diff --git a/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/package.json b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/package.json new file mode 100644 index 000000000..e6b1d0158 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/package.json @@ -0,0 +1,19 @@ +{ + "name": "gnostic-lint-responses", + "version": "1.0.0", + "description": "Gnostic linter plugin to check responses", + "main": "gnostic-lint-responses.js", + "repository": "git@github.com:googleapis/gnostic.git", + "author": "Mike Kistler", + "license": "Apache-2.0", + "dependencies": { + "get-stdin": "^5.0.1", + "lodash": "^4.17.5", + "nexe": "^2.0.0-rc.24", + "protobufjs": "^6.8.4" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } +} diff --git a/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Makefile b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Makefile new file mode 100644 index 000000000..b7a141125 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Makefile @@ -0,0 +1,18 @@ + +TGT=gnostic-lint-responses-swift + +BINDIR=.build/debug + +all: + swift build + +install: all + cp $(BINDIR)/$(TGT) $(GOPATH)/bin/$(TGT) + +clean : + rm -rf Packages + rm -rf .build + rm -f Package.pins Package.resolved + +run: + gnostic ../../../examples/v2.0/yaml/petstore.yaml --lint-responses-swift diff --git a/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Package.swift b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Package.swift new file mode 100644 index 000000000..9877a4180 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Package.swift @@ -0,0 +1,26 @@ +// Copyright 2018 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import PackageDescription + +let package = Package( + name: "gnostic-lint-responses-swift", + targets: [ + Target(name: "gnostic-lint-responses-swift", dependencies: [ "Gnostic" ]), + Target(name: "Gnostic") + ], + dependencies: [ + .Package(url: "https://github.com/apple/swift-protobuf.git", Version(1,0,2)) + ] +) diff --git a/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/README.md b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/README.md new file mode 100644 index 000000000..178f6a237 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/README.md @@ -0,0 +1,12 @@ +This directory contains a gnostic linter written with Swift. + +### SETUP + +- Install protoc (https://github.com/google/protobuf) +- Install the Swift Protocol Buffer plugin (https://github.com/apple/swift-protobuf) +- Run `sh compile-protos` to generate Protocol Buffer support code. +- Run `make install` to build and install the plugin. + +### TRY IT + +- Run `make run` to test-run the plugin. diff --git a/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/io.swift b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/io.swift new file mode 100644 index 000000000..38d5f34a1 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/io.swift @@ -0,0 +1,77 @@ +// Copyright 2018 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import Foundation + +// The I/O code below is derived from Apple's swift-protobuf project. +// https://github.com/apple/swift-protobuf +// BEGIN swift-protobuf derivation + +#if os(Linux) + import Glibc +#else + import Darwin.C +#endif + +enum PluginError: Error { + /// Raised for any errors reading the input + case readFailure +} + +// Alias clib's write() so Stdout.write(bytes:) can call it. +private let _write = write + +class Stdin { + static func readall() throws -> Data { + let fd: Int32 = 0 + let buffSize = 32 + var buff = [UInt8]() + while true { + var fragment = [UInt8](repeating: 0, count: buffSize) + let count = read(fd, &fragment, buffSize) + if count < 0 { + throw PluginError.readFailure + } + if count < buffSize { + buff += fragment[0..) -> () in + _ = _write(1, p, bytes.count) + } + } + static func write(_ string: String) { + self.write(bytes:string.data(using:.utf8)!) + } +} + +class Stderr { + static func write(bytes: Data) { + bytes.withUnsafeBytes { (p: UnsafePointer) -> () in + _ = _write(2, p, bytes.count) + } + } + static func write(_ string: String) { + self.write(bytes:string.data(using:.utf8)!) + } +} + +// END swift-protobuf derivation diff --git a/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/main.swift b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/main.swift new file mode 100644 index 000000000..affbc7012 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/main.swift @@ -0,0 +1,116 @@ +// Copyright 2018 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import Foundation +import Gnostic + +extension Gnostic_Plugin_V1_Response { + mutating func message(level:Gnostic_Plugin_V1_Message.Level, + code:String, + text:String, + path:[String]=[]) { + var message = Gnostic_Plugin_V1_Message() + message.level = level + message.code = code + message.text = text + message.keys = path + messages.append(message) + } +} + +class ResponseLinter { + var document : Openapi_V2_Document = Openapi_V2_Document() + + func run(_ request : Gnostic_Plugin_V1_Request, + _ response : inout Gnostic_Plugin_V1_Response) throws { + for model in request.models { + if model.typeURL == "openapi.v2.Document" { + let document = try Openapi_V2_Document(serializedData: model.value) + self.document = document + for pair in document.paths.path { + let path = ["paths", pair.name] + let v = pair.value + if v.hasGet { + checkOperation(v.get, path:path + ["get"], response:&response) + } + if v.hasPost { + checkOperation(v.post, path:path + ["post"], response:&response) + } + if v.hasPut { + checkOperation(v.put, path:path + ["put"], response:&response) + } + if v.hasDelete { + checkOperation(v.delete, path:path + ["delete"], response:&response) + } + } + } + } + } + + func checkOperation(_ operation:Openapi_V2_Operation, + path:[String], + response:inout Gnostic_Plugin_V1_Response) { + for responseCode in operation.responses.responseCode { + let code = responseCode.name + if responseCode.value.response.hasSchema { + var schema = responseCode.value.response.schema.schema + if schema.ref != "" { + if let resolvedSchema = resolveReference(schema.ref) { + schema = resolvedSchema + } + } + checkSchemaType(schema, path: path + ["responses", code, "schema"], response: &response) + } + } + } + + func checkSchemaType(_ schema:Openapi_V2_Schema, + path:[String], + response:inout Gnostic_Plugin_V1_Response) { + if schema.hasType { + for type in schema.type.value { + if type == "array" { + response.message( + level: .error, + code: "NO_ARRAY_RESPONSES", + text: "Arrays MUST NOT be returned as the top-level structure in a response body.", + path: path) + } + } + } + } + + func resolveReference(_ reference:String) -> Openapi_V2_Schema? { + let prefix = "#/definitions/" + if reference.hasPrefix(prefix) { + let schemaName = reference.dropFirst(prefix.count) + for pair in document.definitions.additionalProperties { + if pair.name == schemaName { + return pair.value + } + } + } + return nil + } +} + +func main() throws { + let request = try Gnostic_Plugin_V1_Request(serializedData: Stdin.readall()) + var response = Gnostic_Plugin_V1_Response() + try ResponseLinter().run(request, &response) + let serializedResponse = try response.serializedData() + Stdout.write(bytes: serializedResponse) +} + +try main() diff --git a/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/compile-protos b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/compile-protos new file mode 100644 index 000000000..61aa9f897 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/compile-protos @@ -0,0 +1,54 @@ +#!/bin/sh +# +# Copyright 2018 Google Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Use this script to run protoc and swift-proto to generate +# support code for gnostic protos. + +GNOSTIC=$GOPATH/src/github.com/googleapis/gnostic + +PROTOS=( + plugins/plugin.proto + OpenAPIv2/OpenAPIv2.proto + OpenAPIv3/OpenAPIv3.proto + surface/surface.proto + discovery/discovery.proto +) + +mkdir -p Sources/Gnostic + +# remove old compiled pb files +rm -rf Sources/Gnostic/*.pb.swift + +# remove any prior compilations +rm -rf Sources/Gnostic/github.com + +# compile protos +for proto in "${PROTOS[@]}" +do + echo "COMPILING $proto" + protoc $GNOSTIC/$proto \ + --swift_opt=Visibility=Public \ + --swift_out=Sources/Gnostic \ + --proto_path=$GOPATH/src + +# relocate compiled protos +find Sources/Gnostic/github.com -name "*.pb.swift" -exec mv {} Sources/Gnostic \; + +# remove scaffolding of compilation +rm -rf Sources/Gnostic/github.com + +done + diff --git a/deps/github.com/googleapis/gnostic/plugins/environment.go b/deps/github.com/googleapis/gnostic/plugins/environment.go index 79a0867f2..bd6a8a1ce 100644 --- a/deps/github.com/googleapis/gnostic/plugins/environment.go +++ b/deps/github.com/googleapis/gnostic/plugins/environment.go @@ -105,7 +105,7 @@ When the -plugin option is specified, these flags are ignored.`) env.Request.AddModel("openapi.v2.Document", documentv2) // include experimental API surface model surfaceModel, err := surface.NewModelFromOpenAPI2(documentv2) - if err != nil { + if err == nil { env.Request.AddModel("surface.v1.Model", surfaceModel) } return env, err @@ -117,7 +117,7 @@ When the -plugin option is specified, these flags are ignored.`) env.Request.AddModel("openapi.v3.Document", documentv3) // include experimental API surface model surfaceModel, err := surface.NewModelFromOpenAPI3(documentv3) - if err != nil { + if err == nil { env.Request.AddModel("surface.v1.Model", surfaceModel) } return env, err diff --git a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/main.go b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/main.go index 2a2b35451..72ff44c59 100644 --- a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/main.go +++ b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/main.go @@ -1,9 +1,13 @@ +// +build ignore +// This file is omitted when getting with `go get github.com/googleapis/gnostic/...` + package main import ( "fmt" - "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/apis_guru" "sort" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/apis_guru" ) func main() { diff --git a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore/bookstore.go b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore/bookstore.go new file mode 100644 index 000000000..1f7dec7db --- /dev/null +++ b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore/bookstore.go @@ -0,0 +1,19 @@ +/* + Copyright 2017 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package bookstore exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package bookstore diff --git a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample/sample.go b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample/sample.go new file mode 100644 index 000000000..18cd0ddc8 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample/sample.go @@ -0,0 +1,19 @@ +/* + Copyright 2017 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package sample exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package sample diff --git a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/main.go b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/main.go index 1bd3448ee..81c357921 100644 --- a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/main.go +++ b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/main.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd" ) diff --git a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd/xkcd.go b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd/xkcd.go new file mode 100644 index 000000000..7309ab188 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd/xkcd.go @@ -0,0 +1,19 @@ +/* + Copyright 2017 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package xkcd exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package xkcd diff --git a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore/bookstore.go b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore/bookstore.go new file mode 100644 index 000000000..1f7dec7db --- /dev/null +++ b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore/bookstore.go @@ -0,0 +1,19 @@ +/* + Copyright 2017 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package bookstore exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package bookstore diff --git a/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener/urlshortener.go b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener/urlshortener.go new file mode 100644 index 000000000..5084f9c12 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener/urlshortener.go @@ -0,0 +1,19 @@ +/* + Copyright 2017 Google Inc. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +// Package urlshortener exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package urlshortener diff --git a/deps/github.com/googleapis/gnostic/plugins/plugin.pb.go b/deps/github.com/googleapis/gnostic/plugins/plugin.pb.go index 3356e3384..89094baa9 100644 --- a/deps/github.com/googleapis/gnostic/plugins/plugin.pb.go +++ b/deps/github.com/googleapis/gnostic/plugins/plugin.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: plugin.proto +// source: plugins/plugin.proto /* Package gnostic_plugin_v1 is a generated protocol buffer package. It is generated from these files: - plugin.proto + plugins/plugin.proto It has these top-level messages: Version @@ -331,42 +331,42 @@ func init() { proto.RegisterEnum("gnostic.plugin.v1.Message_Level", Message_Level_name, Message_Level_value) } -func init() { proto.RegisterFile("plugin.proto", fileDescriptor0) } +func init() { proto.RegisterFile("plugins/plugin.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 537 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x51, 0x6f, 0xd3, 0x3c, - 0x14, 0xfd, 0xd2, 0x24, 0x6b, 0x73, 0xbb, 0x6f, 0x04, 0x6b, 0x82, 0x50, 0x21, 0xad, 0xca, 0x0b, - 0x7d, 0x80, 0x4c, 0x2b, 0x62, 0x4f, 0xbc, 0xb4, 0xd2, 0x5a, 0x4d, 0x8c, 0xb4, 0xb2, 0x80, 0x3d, - 0x56, 0x5e, 0xea, 0xa6, 0x81, 0x24, 0x0e, 0xb6, 0x53, 0xad, 0x3f, 0x81, 0xbf, 0xc1, 0x2f, 0xe1, - 0x97, 0x21, 0x64, 0x3b, 0xad, 0x86, 0x28, 0x0f, 0xbc, 0x9d, 0x7b, 0x74, 0x7c, 0xee, 0xbd, 0xc7, - 0x17, 0x8e, 0xab, 0xbc, 0x4e, 0xb3, 0x32, 0xaa, 0x38, 0x93, 0x0c, 0x3d, 0x4e, 0x4b, 0x26, 0x64, - 0x96, 0x44, 0x0d, 0xbb, 0xb9, 0xe8, 0x3d, 0x4b, 0x19, 0x4b, 0x73, 0x7a, 0xae, 0x05, 0x77, 0xf5, - 0xea, 0x9c, 0x94, 0x5b, 0xa3, 0x0e, 0x13, 0x68, 0x7f, 0xa2, 0x5c, 0x64, 0xac, 0x44, 0xa7, 0xe0, - 0x16, 0xe4, 0x33, 0xe3, 0x81, 0xd5, 0xb7, 0x06, 0x2e, 0x36, 0x85, 0x66, 0xb3, 0x92, 0xf1, 0xa0, - 0xd5, 0xb0, 0xaa, 0x50, 0x6c, 0x45, 0x64, 0xb2, 0x0e, 0x6c, 0xc3, 0xea, 0x02, 0x3d, 0x81, 0x23, - 0x51, 0xaf, 0x56, 0xd9, 0x7d, 0xe0, 0xf4, 0xad, 0x81, 0x87, 0x9b, 0x2a, 0x7c, 0x03, 0xde, 0x9c, - 0x70, 0x52, 0x50, 0x49, 0x39, 0x42, 0xe0, 0x94, 0xa4, 0xa0, 0xba, 0x8b, 0x87, 0x35, 0x56, 0x76, - 0x1b, 0x92, 0xd7, 0x54, 0x37, 0xf1, 0xb0, 0x29, 0xc2, 0x9f, 0x16, 0xb4, 0x31, 0xfd, 0x5a, 0x53, - 0x21, 0xd1, 0x19, 0x74, 0x05, 0xab, 0x79, 0x42, 0x17, 0x0f, 0x1e, 0x83, 0xa1, 0x62, 0x65, 0x71, - 0x06, 0x5d, 0x56, 0xcb, 0xaa, 0x96, 0x8b, 0x8a, 0xc8, 0x75, 0x63, 0x04, 0x86, 0x9a, 0x13, 0xb9, - 0x46, 0x6f, 0x01, 0xaa, 0xdd, 0x10, 0x22, 0xb0, 0xfb, 0xf6, 0xa0, 0x3b, 0x7c, 0x1e, 0xfd, 0x11, - 0x56, 0xb4, 0x9f, 0x14, 0x3f, 0xd0, 0xa3, 0x2b, 0xf0, 0x13, 0x56, 0x54, 0x59, 0x4e, 0xf9, 0x62, - 0x63, 0x02, 0xd3, 0x4b, 0x76, 0x87, 0xbd, 0x03, 0x1e, 0x4d, 0xa4, 0xf8, 0xd1, 0xee, 0xcd, 0x2e, - 0xe3, 0x97, 0x70, 0x54, 0xb0, 0x25, 0xcd, 0x45, 0xe0, 0xea, 0x01, 0x4e, 0x23, 0xf3, 0x35, 0xd1, - 0xee, 0x6b, 0xa2, 0x51, 0xb9, 0xc5, 0x8d, 0x26, 0xfc, 0x61, 0x41, 0xfb, 0x3d, 0x15, 0x82, 0xa4, - 0x14, 0x5d, 0x82, 0x9b, 0xd3, 0x0d, 0xcd, 0xf5, 0xea, 0x27, 0xc3, 0xfe, 0x81, 0xae, 0x8d, 0x34, - 0xba, 0x51, 0x3a, 0x6c, 0xe4, 0x2a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0xaf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xca, 0x22, 0xc2, 0xeb, 0xcd, 0x03, 0x00, 0x00, + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xc5, 0xb1, 0xdd, 0xc4, 0x13, 0x28, 0x66, 0x55, 0x81, 0xa9, 0x90, 0x1a, 0xf9, 0x42, 0x0e, + 0xe0, 0xa8, 0x41, 0xf4, 0xc4, 0x25, 0x91, 0x9a, 0xa8, 0xa2, 0x38, 0xd1, 0x0a, 0xe8, 0x31, 0xda, + 0x3a, 0x1b, 0xc7, 0x60, 0x7b, 0xcd, 0xee, 0x3a, 0x6a, 0x3e, 0x81, 0xdf, 0xe0, 0x4b, 0xf8, 0x32, + 0x84, 0x76, 0xd7, 0x89, 0x8a, 0x08, 0x07, 0x4e, 0x7e, 0xf3, 0xf4, 0xfc, 0x66, 0xe6, 0xed, 0xc0, + 0x49, 0x95, 0xd7, 0x69, 0x56, 0x8a, 0x81, 0xf9, 0x46, 0x15, 0x67, 0x92, 0xa1, 0x27, 0x69, 0xc9, + 0x84, 0xcc, 0x92, 0xa8, 0x61, 0x37, 0xe7, 0xa7, 0xcf, 0x53, 0xc6, 0xd2, 0x9c, 0x0e, 0xb4, 0xe0, + 0xb6, 0x5e, 0x0d, 0x48, 0xb9, 0x35, 0xea, 0x30, 0x81, 0xf6, 0x67, 0xca, 0x45, 0xc6, 0x4a, 0x74, + 0x02, 0x6e, 0x41, 0xbe, 0x30, 0x1e, 0x58, 0x3d, 0xab, 0xef, 0x62, 0x53, 0x68, 0x36, 0x2b, 0x19, + 0x0f, 0x5a, 0x0d, 0xab, 0x0a, 0xc5, 0x56, 0x44, 0x26, 0xeb, 0xc0, 0x36, 0xac, 0x2e, 0xd0, 0x53, + 0x38, 0x12, 0xf5, 0x6a, 0x95, 0xdd, 0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x97, 0xa0, 0x65, 0xe7, 0xd5, 0x03, 0x00, 0x00, } diff --git a/deps/github.com/googleapis/gnostic/printer/code.go b/deps/github.com/googleapis/gnostic/printer/code.go index 1afc252f1..f8fd3db47 100644 --- a/deps/github.com/googleapis/gnostic/printer/code.go +++ b/deps/github.com/googleapis/gnostic/printer/code.go @@ -38,6 +38,20 @@ func (c *Code) Print(args ...interface{}) { c.text += "\n" } +// PrintIf adds a line of code using the current indentation if a condition is true. Accepts printf-style format strings and arguments. +func (c *Code) PrintIf(condition bool, args ...interface{}) { + if !condition { + return + } + if len(args) > 0 { + for i := 0; i < c.indent; i++ { + c.text += indentation + } + c.text += fmt.Sprintf(args[0].(string), args[1:]...) + } + c.text += "\n" +} + // String returns the accumulated code as a string. func (c *Code) String() string { return c.text diff --git a/deps/github.com/googleapis/gnostic/surface/model_openapiv2.go b/deps/github.com/googleapis/gnostic/surface/model_openapiv2.go index 903d27ea7..47418dfa0 100644 --- a/deps/github.com/googleapis/gnostic/surface/model_openapiv2.go +++ b/deps/github.com/googleapis/gnostic/surface/model_openapiv2.go @@ -58,19 +58,21 @@ func (b *OpenAPI2Builder) build(document *openapiv2.Document) (err error) { } } // Collect service method descriptions from Paths section. - for _, pair := range document.Paths.Path { - v := pair.Value - if v.Get != nil { - b.buildMethodFromOperation(v.Get, "GET", pair.Name) - } - if v.Post != nil { - b.buildMethodFromOperation(v.Post, "POST", pair.Name) - } - if v.Put != nil { - b.buildMethodFromOperation(v.Put, "PUT", pair.Name) - } - if v.Delete != nil { - b.buildMethodFromOperation(v.Delete, "DELETE", pair.Name) + if document.Paths != nil { + for _, pair := range document.Paths.Path { + v := pair.Value + if v.Get != nil { + b.buildMethodFromOperation(v.Get, "GET", pair.Name) + } + if v.Post != nil { + b.buildMethodFromOperation(v.Post, "POST", pair.Name) + } + if v.Put != nil { + b.buildMethodFromOperation(v.Put, "PUT", pair.Name) + } + if v.Delete != nil { + b.buildMethodFromOperation(v.Delete, "DELETE", pair.Name) + } } } return err diff --git a/deps/github.com/googleapis/gnostic/surface/model_openapiv3.go b/deps/github.com/googleapis/gnostic/surface/model_openapiv3.go index e0892cf1b..70e039317 100644 --- a/deps/github.com/googleapis/gnostic/surface/model_openapiv3.go +++ b/deps/github.com/googleapis/gnostic/surface/model_openapiv3.go @@ -19,8 +19,9 @@ import ( "fmt" "log" - openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" "strings" + + openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" ) // NewModelFromOpenAPIv3 builds a model of an API service for use in code generation. @@ -63,8 +64,10 @@ func (b *OpenAPI3Builder) build(document *openapiv3.Document) (err error) { } } // Collect service method descriptions from each PathItem. - for _, pair := range document.Paths.Path { - b.buildMethodFromPathItem(pair.Name, pair.Value) + if document.Paths != nil { + for _, pair := range document.Paths.Path { + b.buildMethodFromPathItem(pair.Name, pair.Value) + } } return err } @@ -270,13 +273,14 @@ func (b *OpenAPI3Builder) typeForSchema(schema *openapiv3.Schema) (kind FieldKin case "array": if schema.Items != nil { // we have an array.., but of what? - items := schema.Items.SchemaOrReference - if len(items) == 1 { - if items[0].GetReference().GetXRef() != "" { - return FieldKind_ARRAY, typeForRef(items[0].GetReference().GetXRef()), format - } else if items[0].GetSchema().Type == "string" { + items := schema.Items + if items != nil { + a := items.GetSchemaOrReference() + if a[0].GetReference().GetXRef() != "" { + return FieldKind_ARRAY, typeForRef(a[0].GetReference().GetXRef()), format + } else if a[0].GetSchema().Type == "string" { return FieldKind_ARRAY, "string", format - } else if items[0].GetSchema().Type == "object" { + } else if a[0].GetSchema().Type == "object" { return FieldKind_ARRAY, "interface{}", format } } diff --git a/deps/github.com/googleapis/gnostic/test/v2.0/json/empty-v2.json b/deps/github.com/googleapis/gnostic/test/v2.0/json/empty-v2.json new file mode 100644 index 000000000..c93e9f8ec --- /dev/null +++ b/deps/github.com/googleapis/gnostic/test/v2.0/json/empty-v2.json @@ -0,0 +1,9 @@ +{ + "swagger": "2.0", + "info": { + "title": "", + "version": "" + }, + "paths": { + } +} diff --git a/deps/github.com/googleapis/gnostic/test/v3.0/json/empty-v3.json b/deps/github.com/googleapis/gnostic/test/v3.0/json/empty-v3.json new file mode 100644 index 000000000..4eaf112e7 --- /dev/null +++ b/deps/github.com/googleapis/gnostic/test/v3.0/json/empty-v3.json @@ -0,0 +1,9 @@ +{ + "openapi": "3.0", + "info": { + "title": "", + "version": "" + }, + "paths": { + } +} diff --git a/deps/github.com/gophercloud/gophercloud/errors.go b/deps/github.com/gophercloud/gophercloud/errors.go index 88fd2ac67..2466932ef 100644 --- a/deps/github.com/gophercloud/gophercloud/errors.go +++ b/deps/github.com/gophercloud/gophercloud/errors.go @@ -72,6 +72,11 @@ type ErrDefault401 struct { ErrUnexpectedResponseCode } +// ErrDefault403 is the default error type returned on a 403 HTTP response code. +type ErrDefault403 struct { + ErrUnexpectedResponseCode +} + // ErrDefault404 is the default error type returned on a 404 HTTP response code. type ErrDefault404 struct { ErrUnexpectedResponseCode @@ -108,6 +113,13 @@ func (e ErrDefault400) Error() string { func (e ErrDefault401) Error() string { return "Authentication failed" } +func (e ErrDefault403) Error() string { + e.DefaultErrString = fmt.Sprintf( + "Request forbidden: [%s %s], error message: %s", + e.Method, e.URL, e.Body, + ) + return e.choseErrString() +} func (e ErrDefault404) Error() string { return "Resource not found" } @@ -141,6 +153,12 @@ type Err401er interface { Error401(ErrUnexpectedResponseCode) error } +// Err403er is the interface resource error types implement to override the error message +// from a 403 error. +type Err403er interface { + Error403(ErrUnexpectedResponseCode) error +} + // Err404er is the interface resource error types implement to override the error message // from a 404 error. type Err404er interface { diff --git a/deps/github.com/gophercloud/gophercloud/openstack/client.go b/deps/github.com/gophercloud/gophercloud/openstack/client.go index 5a52e5791..85705d212 100644 --- a/deps/github.com/gophercloud/gophercloud/openstack/client.go +++ b/deps/github.com/gophercloud/gophercloud/openstack/client.go @@ -394,3 +394,9 @@ func NewLoadBalancerV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi sc.ResourceBase = sc.Endpoint + "v2.0/" return sc, err } + +// NewClusteringV1 creates a ServiceClient that may be used with the v1 clustering +// package. +func NewClusteringV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) { + return initClientOpts(client, eo, "clustering") +} diff --git a/deps/github.com/gophercloud/gophercloud/openstack/endpoint_location.go b/deps/github.com/gophercloud/gophercloud/openstack/endpoint_location.go index 070ea7cbe..12c8aebcf 100644 --- a/deps/github.com/gophercloud/gophercloud/openstack/endpoint_location.go +++ b/deps/github.com/gophercloud/gophercloud/openstack/endpoint_location.go @@ -84,7 +84,7 @@ func V3EndpointURL(catalog *tokens3.ServiceCatalog, opts gophercloud.EndpointOpt return "", err } if (opts.Availability == gophercloud.Availability(endpoint.Interface)) && - (opts.Region == "" || endpoint.Region == opts.Region) { + (opts.Region == "" || endpoint.Region == opts.Region || endpoint.RegionID == opts.Region) { endpoints = append(endpoints, endpoint) } } diff --git a/deps/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go b/deps/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go index 6e78d1cbd..ebdca58f6 100644 --- a/deps/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go +++ b/deps/github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/results.go @@ -13,6 +13,7 @@ import ( type Endpoint struct { ID string `json:"id"` Region string `json:"region"` + RegionID string `json:"region_id"` Interface string `json:"interface"` URL string `json:"url"` } diff --git a/deps/github.com/gophercloud/gophercloud/params.go b/deps/github.com/gophercloud/gophercloud/params.go index 687af3dc0..28ad90685 100644 --- a/deps/github.com/gophercloud/gophercloud/params.go +++ b/deps/github.com/gophercloud/gophercloud/params.go @@ -115,10 +115,15 @@ func BuildRequestBody(opts interface{}, parent string) (map[string]interface{}, } } + jsonTag := f.Tag.Get("json") + if jsonTag == "-" { + continue + } + if v.Kind() == reflect.Struct || (v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct) { if zero { //fmt.Printf("value before change: %+v\n", optsValue.Field(i)) - if jsonTag := f.Tag.Get("json"); jsonTag != "" { + if jsonTag != "" { jsonTagPieces := strings.Split(jsonTag, ",") if len(jsonTagPieces) > 1 && jsonTagPieces[1] == "omitempty" { if v.CanSet() { diff --git a/deps/github.com/gophercloud/gophercloud/provider_client.go b/deps/github.com/gophercloud/gophercloud/provider_client.go index 72daeb0a3..17e451274 100644 --- a/deps/github.com/gophercloud/gophercloud/provider_client.go +++ b/deps/github.com/gophercloud/gophercloud/provider_client.go @@ -126,6 +126,36 @@ func (client *ProviderClient) SetToken(t string) { client.TokenID = t } +//Reauthenticate calls client.ReauthFunc in a thread-safe way. If this is +//called because of a 401 response, the caller may pass the previous token. In +//this case, the reauthentication can be skipped if another thread has already +//reauthenticated in the meantime. If no previous token is known, an empty +//string should be passed instead to force unconditional reauthentication. +func (client *ProviderClient) Reauthenticate(previousToken string) (err error) { + if client.ReauthFunc == nil { + return nil + } + + if client.mut == nil { + return client.ReauthFunc() + } + client.mut.Lock() + defer client.mut.Unlock() + + client.reauthmut.Lock() + client.reauthmut.reauthing = true + client.reauthmut.Unlock() + + if previousToken == "" || client.TokenID == previousToken { + err = client.ReauthFunc() + } + + client.reauthmut.Lock() + client.reauthmut.reauthing = false + client.reauthmut.Unlock() + return +} + // RequestOpts customizes the behavior of the provider.Request() method. type RequestOpts struct { // JSONBody, if provided, will be encoded as JSON and used as the body of the HTTP request. The @@ -254,21 +284,7 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts) } case http.StatusUnauthorized: if client.ReauthFunc != nil { - if client.mut != nil { - client.mut.Lock() - client.reauthmut.Lock() - client.reauthmut.reauthing = true - client.reauthmut.Unlock() - if curtok := client.TokenID; curtok == prereqtok { - err = client.ReauthFunc() - } - client.reauthmut.Lock() - client.reauthmut.reauthing = false - client.reauthmut.Unlock() - client.mut.Unlock() - } else { - err = client.ReauthFunc() - } + err = client.Reauthenticate(prereqtok) if err != nil { e := &ErrUnableToReauthenticate{} e.ErrOriginal = respErr @@ -298,6 +314,11 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts) if error401er, ok := errType.(Err401er); ok { err = error401er.Error401(respErr) } + case http.StatusForbidden: + err = ErrDefault403{respErr} + if error403er, ok := errType.(Err403er); ok { + err = error403er.Error403(respErr) + } case http.StatusNotFound: err = ErrDefault404{respErr} if error404er, ok := errType.(Err404er); ok { diff --git a/deps/github.com/gosimple/slug/.gitignore b/deps/github.com/gosimple/slug/.gitignore deleted file mode 100644 index 25d190e2b..000000000 --- a/deps/github.com/gosimple/slug/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -_* -cover*.out diff --git a/deps/github.com/gosimple/slug/LICENSE b/deps/github.com/gosimple/slug/LICENSE deleted file mode 100644 index a612ad981..000000000 --- a/deps/github.com/gosimple/slug/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/deps/github.com/gosimple/slug/README.md b/deps/github.com/gosimple/slug/README.md deleted file mode 100644 index b1f16b281..000000000 --- a/deps/github.com/gosimple/slug/README.md +++ /dev/null @@ -1,54 +0,0 @@ -slug -==== - -Package `slug` generate slug from unicode string, URL-friendly slugify with -multiple languages support. - -[![GoDoc](https://godoc.org/github.com/gosimple/slug?status.png)](https://godoc.org/github.com/gosimple/slug) -[![Build Status](https://drone.io/github.com/gosimple/slug/status.png)](https://drone.io/github.com/gosimple/slug/latest) - -[Documentation online](http://godoc.org/github.com/gosimple/slug) - -## Example - - package main - - import( - "github.com/gosimple/slug" - "fmt" - ) - - func main () { - text := slug.Make("Hellö Wörld хелло ворлд") - fmt.Println(text) // Will print: "hello-world-khello-vorld" - - someText := slug.Make("影師") - fmt.Println(someText) // Will print: "ying-shi" - - enText := slug.MakeLang("This & that", "en") - fmt.Println(enText) // Will print: "this-and-that" - - deText := slug.MakeLang("Diese & Dass", "de") - fmt.Println(deText) // Will print: "diese-und-dass" - - slug.CustomSub = map[string]string{ - "water": "sand", - } - textSub := slug.Make("water is hot") - fmt.Println(textSub) // Will print: "sand-is-hot" - } - -### Requests or bugs? - - -## Installation - - go get -u github.com/gosimple/slug - -## License - -The source files are distributed under the -[Mozilla Public License, version 2.0](http://mozilla.org/MPL/2.0/), -unless otherwise noted. -Please read the [FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html) -if you have further questions regarding the license. diff --git a/deps/github.com/gosimple/slug/doc.go b/deps/github.com/gosimple/slug/doc.go deleted file mode 100644 index ffbe2c223..000000000 --- a/deps/github.com/gosimple/slug/doc.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2013 by Dobrosław Żybort. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -/* -Package slug generate slug from unicode string, URL-friendly slugify with -multiple languages support. - -Example: - - package main - - import( - "github.com/gosimple/slug" - "fmt" - ) - - func main () { - text := slug.Make("Hellö Wörld хелло ворлд") - fmt.Println(text) // Will print hello-world-khello-vorld - - someText := slug.Make("影師") - fmt.Println(someText) // Will print: ying-shi - - enText := slug.MakeLang("This & that", "en") - fmt.Println(enText) // Will print 'this-and-that' - - deText := slug.MakeLang("Diese & Dass", "de") - fmt.Println(deText) // Will print 'diese-und-dass' - - slug.CustomSub = map[string]string{ - "water": "sand", - } - textSub := slug.Make("water is hot") - fmt.Println(textSub) // Will print 'sand-is-hot' - } - -Requests or bugs? - -https://github.com/gosimple/slug/issues -*/ -package slug diff --git a/deps/github.com/gosimple/slug/languages_substitution.go b/deps/github.com/gosimple/slug/languages_substitution.go deleted file mode 100644 index ba8ad0181..000000000 --- a/deps/github.com/gosimple/slug/languages_substitution.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2013 by Dobrosław Żybort. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -package slug - -func init() { - // Merge language subs with the default one - for _, sub := range []*map[rune]string{&deSub, &enSub, &plSub, &esSub} { - for key, value := range defaultSub { - (*sub)[key] = value - } - } -} - -var defaultSub = map[rune]string{ - '"': "", - '\'': "", - '’': "", - '‒': "-", // figure dash - '–': "-", // en dash - '—': "-", // em dash - '―': "-", // horizontal bar -} - -var deSub = map[rune]string{ - '&': "und", - '@': "an", -} - -var enSub = map[rune]string{ - '&': "and", - '@': "at", -} - -var plSub = map[rune]string{ - '&': "i", - '@': "na", -} - -var esSub = map[rune]string{ - '&': "y", - '@': "en", -} - -var grSub = map[rune]string{ - '&': "kai", - 'η': "i", - 'ή': "i", - 'Η': "i", - 'ι': "i", - 'ί': "i", - 'Ι': "i", - 'χ': "x", - 'Χ': "x", -} diff --git a/deps/github.com/gosimple/slug/slug.go b/deps/github.com/gosimple/slug/slug.go deleted file mode 100644 index bd3ec51aa..000000000 --- a/deps/github.com/gosimple/slug/slug.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2013 by Dobrosław Żybort. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -package slug - -import ( - "bytes" - "regexp" - "sort" - "strings" - - "github.com/rainycape/unidecode" -) - -var ( - // CustomSub stores custom substitution map - CustomSub map[string]string - // CustomRuneSub stores custom rune substitution map - CustomRuneSub map[rune]string - - // MaxLength stores maximum slug length. - // It's smart so it will cat slug after full word. - // By default slugs aren't shortened. - // If MaxLength is smaller than length of the first word, then returned - // slug will contain only substring from the first word truncated - // after MaxLength. - MaxLength int - - regexpNonAuthorizedChars = regexp.MustCompile("[^a-z0-9-_]") - regexpMultipleDashes = regexp.MustCompile("-+") -) - -//============================================================================= - -// Make returns slug generated from provided string. Will use "en" as language -// substitution. -func Make(s string) (slug string) { - return MakeLang(s, "en") -} - -// MakeLang returns slug generated from provided string and will use provided -// language for chars substitution. -func MakeLang(s string, lang string) (slug string) { - slug = strings.TrimSpace(s) - - // Custom substitutions - // Always substitute runes first - slug = SubstituteRune(slug, CustomRuneSub) - slug = Substitute(slug, CustomSub) - - // Process string with selected substitution language - switch lang { - case "de": - slug = SubstituteRune(slug, deSub) - case "en": - slug = SubstituteRune(slug, enSub) - case "pl": - slug = SubstituteRune(slug, plSub) - case "es": - slug = SubstituteRune(slug, esSub) - case "gr": - slug = SubstituteRune(slug, grSub) - default: // fallback to "en" if lang not found - slug = SubstituteRune(slug, enSub) - } - - // Process all non ASCII symbols - slug = unidecode.Unidecode(slug) - - slug = strings.ToLower(slug) - - // Process all remaining symbols - slug = regexpNonAuthorizedChars.ReplaceAllString(slug, "-") - slug = regexpMultipleDashes.ReplaceAllString(slug, "-") - slug = strings.Trim(slug, "-") - - if MaxLength > 0 { - slug = smartTruncate(slug) - } - - return slug -} - -// Substitute returns string with superseded all substrings from -// provided substitution map. Substitution map will be applied in alphabetic -// order. Many passes, on one substitution another one could apply. -func Substitute(s string, sub map[string]string) (buf string) { - buf = s - var keys []string - for k := range sub { - keys = append(keys, k) - } - sort.Strings(keys) - - for _, key := range keys { - buf = strings.Replace(buf, key, sub[key], -1) - } - return -} - -// SubstituteRune substitutes string chars with provided rune -// substitution map. One pass. -func SubstituteRune(s string, sub map[rune]string) string { - var buf bytes.Buffer - for _, c := range s { - if d, ok := sub[c]; ok { - buf.WriteString(d) - } else { - buf.WriteRune(c) - } - } - return buf.String() -} - -func smartTruncate(text string) string { - if len(text) < MaxLength { - return text - } - - var truncated string - words := strings.SplitAfter(text, "-") - // If MaxLength is smaller than length of the first word return word - // truncated after MaxLength. - if len(words[0]) > MaxLength { - return words[0][:MaxLength] - } - for _, word := range words { - if len(truncated)+len(word)-1 <= MaxLength { - truncated = truncated + word - } else { - break - } - } - return strings.Trim(truncated, "-") -} - -// IsSlug returns True if provided text does not contain white characters, -// punctuation, all letters are lower case and only from ASCII range. -// It could contain `-` and `_` but not at the beginning or end of the text. -// It should be in range of the MaxLength var if specified. -// All output from slug.Make(text) should pass this test. -func IsSlug(text string) bool { - if text == "" || - (MaxLength > 0 && len(text) > MaxLength) || - text[0] == '-' || text[0] == '_' || - text[len(text)-1] == '-' || text[len(text)-1] == '_' { - return false - } - for _, c := range text { - if (c < 'a' || c > 'z') && c != '-' && c != '_' && (c < '0' || c > '9') { - return false - } - } - return true -} diff --git a/deps/github.com/gosimple/slug/slug_test.go b/deps/github.com/gosimple/slug/slug_test.go deleted file mode 100644 index e5570d74f..000000000 --- a/deps/github.com/gosimple/slug/slug_test.go +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright 2013 by Dobrosław Żybort. All rights reserved. -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at http://mozilla.org/MPL/2.0/. - -package slug - -import ( - "testing" -) - -//============================================================================= - -func TestSlugMake(t *testing.T) { - var testCases = []struct { - in string - want string - }{ - {"DOBROSLAWZYBORT", "dobroslawzybort"}, - {"Dobroslaw Zybort", "dobroslaw-zybort"}, - {" Dobroslaw Zybort ?", "dobroslaw-zybort"}, - {"Dobrosław Żybort", "dobroslaw-zybort"}, - {"Ala ma 6 kotów.", "ala-ma-6-kotow"}, - - {"áÁàÀãÃâÂäÄąĄą̊Ą̊", "aaaaaaaaaaaaaa"}, - {"ćĆĉĈçÇ", "cccccc"}, - {"éÉèÈẽẼêÊëËęĘ", "eeeeeeeeeeee"}, - {"íÍìÌĩĨîÎïÏįĮ", "iiiiiiiiiiii"}, - {"łŁ", "ll"}, - {"ńŃ", "nn"}, - {"óÓòÒõÕôÔöÖǫǪǭǬø", "ooooooooooooooo"}, - {"śŚ", "ss"}, - {"úÚùÙũŨûÛüÜųŲ", "uuuuuuuuuuuu"}, - {"y̨Y̨", "yy"}, - {"źŹżŹ", "zzzz"}, - {"·/,:;`˜'\"", ""}, - {"2000–2013", "2000-2013"}, - {"style—not", "style-not"}, - {"test_slug", "test_slug"}, - {"Æ", "ae"}, - {"Ich heiße", "ich-heisse"}, - - {"This & that", "this-and-that"}, - {"fácil €", "facil-eu"}, - {"smile ☺", "smile"}, - {"Hellö Wörld хелло ворлд", "hello-world-khello-vorld"}, - {"\"C'est déjà l’été.\"", "cest-deja-lete"}, - {"jaja---lol-méméméoo--a", "jaja-lol-mememeoo-a"}, - {"影師", "ying-shi"}, - } - - for index, st := range testCases { - got := Make(st.in) - if got != st.want { - t.Errorf( - "%d. Make(%#v) = %#v; want %#v", - index, st.in, got, st.want) - } - } -} - -func TestSlugMakeLang(t *testing.T) { - var testCases = []struct { - lang string - in string - want string - }{ - {"en", "This & that", "this-and-that"}, - {"de", "This & that", "this-und-that"}, - {"pl", "This & that", "this-i-that"}, - {"es", "This & that", "this-y-that"}, - {"gr", "This & that", "this-kai-that"}, - {"test", "This & that", "this-and-that"}, // unknown lang, fallback to "en" - } - - for index, smlt := range testCases { - got := MakeLang(smlt.in, smlt.lang) - if got != smlt.want { - t.Errorf( - "%d. MakeLang(%#v, %#v) = %#v; want %#v", - index, smlt.in, smlt.lang, got, smlt.want) - } - } -} - -func TestSlugMakeUserSubstituteLang(t *testing.T) { - var testCases = []struct { - cSub map[string]string - lang string - in string - want string - }{ - {map[string]string{"'": " "}, "en", "That's great", "that-s-great"}, - {map[string]string{"&": "or"}, "en", "This & that", "this-or-that"}, // by default "&" => "and" - {map[string]string{"&": "or"}, "de", "This & that", "this-or-that"}, // by default "&" => "und" - {map[string]string{"&": "or", "@": "the"}, "de", "@ This & that", "the-this-or-that"}, // by default "&" => "und", "@" => "an" - } - - for index, smust := range testCases { - CustomSub = smust.cSub - got := MakeLang(smust.in, smust.lang) - if got != smust.want { - t.Errorf( - "%d. %#v; MakeLang(%#v, %#v) = %#v; want %#v", - index, smust.cSub, smust.in, smust.lang, - got, smust.want) - - } - } -} - -func TestSlugMakeSubstituteOrderLang(t *testing.T) { - // Always substitute runes first - var testCases = []struct { - rSub map[rune]string - sSub map[string]string - in string - want string - }{ - {map[rune]string{'o': "left"}, map[string]string{"o": "right"}, "o o", "left-left"}, - {map[rune]string{'o': "left", 'a': "r"}, map[string]string{"o": "right"}, "o a o", "left-r-left"}, - {map[rune]string{'o': "left"}, map[string]string{"o": "right", "a": "r"}, "a o a o", "r-left-r-left"}, - {map[rune]string{'&': "down"}, map[string]string{"&": "up"}, "&", "down"}, - } - - for index, smsot := range testCases { - CustomRuneSub = smsot.rSub - CustomSub = smsot.sSub - got := Make(smsot.in) - if got != smsot.want { - t.Errorf( - "%d. %#v; %#v; Make(%#v) = %#v; want %#v", - index, smsot.rSub, smsot.sSub, smsot.in, - got, smsot.want) - - } - } -} - -func TestSubstituteLang(t *testing.T) { - var testCases = []struct { - cSub map[string]string - in string - want string - }{ - {map[string]string{"o": "no"}, "o o o", "no no no"}, - {map[string]string{"o": "no", "a": "or"}, "o a o", "no nor no"}, - {map[string]string{"a": "or", "o": "no"}, "o a o", "no nor no"}, - {map[string]string{"'": " "}, "That's great", "That s great"}, - } - - for index, sst := range testCases { - got := Substitute(sst.in, sst.cSub) - if got != sst.want { - t.Errorf( - "%d. Substitute(%#v, %#v) = %#v; want %#v", - index, sst.in, sst.cSub, got, sst.want) - } - } -} - -func TestSubstituteRuneLang(t *testing.T) { - var testCases = []struct { - cSub map[rune]string - in string - want string - }{ - {map[rune]string{'o': "no"}, "o o o", "no no no"}, - {map[rune]string{'o': "no", 'a': "or"}, "o a o", "no or no"}, - {map[rune]string{'a': "or", 'o': "no"}, "o a o", "no or no"}, - {map[rune]string{'\'': " "}, "That's great", "That s great"}, - } - - for index, ssrt := range testCases { - got := SubstituteRune(ssrt.in, ssrt.cSub) - if got != ssrt.want { - t.Errorf( - "%d. SubstituteRune(%#v, %#v) = %#v; want %#v", - index, ssrt.in, ssrt.cSub, got, ssrt.want) - } - } -} - -func TestSlugMakeSmartTruncate(t *testing.T) { - var testCases = []struct { - in string - maxLength int - want string - }{ - {"DOBROSLAWZYBORT", 100, "dobroslawzybort"}, - {"Dobroslaw Zybort", 100, "dobroslaw-zybort"}, - {"Dobroslaw Zybort", 12, "dobroslaw"}, - {" Dobroslaw Zybort ?", 12, "dobroslaw"}, - {"Ala ma 6 kotów.", 10, "ala-ma-6"}, - {"Dobrosław Żybort", 5, "dobro"}, - } - - for index, smstt := range testCases { - MaxLength = smstt.maxLength - got := Make(smstt.in) - if got != smstt.want { - t.Errorf( - "%d. MaxLength = %v; Make(%#v) = %#v; want %#v", - index, smstt.maxLength, smstt.in, got, smstt.want) - } - } -} - -func TestIsSlug(t *testing.T) { - MaxLength = 0 - type args struct { - text string - } - tests := []struct { - name string - args args - want bool - }{ - {"some", args{"some"}, true}, - {"with -", args{"some-more"}, true}, - {"with _", args{"some_more"}, true}, - {"with numbers", args{"number-2"}, true}, - {"empty string", args{""}, false}, - {"upper case", args{"Some-more"}, false}, - {"space", args{"some more"}, false}, - {"starts with '-'", args{"-some"}, false}, - {"ends with '-'", args{"some-"}, false}, - {"starts with '_'", args{"_some"}, false}, - {"ends with '_'", args{"some_"}, false}, - {"outside ASCII", args{"Dobrosław Żybort"}, false}, - {"outside ASCII –", args{"2000–2013"}, false}, - {"smile ☺", args{"smile ☺"}, false}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := IsSlug(tt.args.text); got != tt.want { - t.Errorf("IsSlug() = %v, want %v", got, tt.want) - } - }) - } - - t.Run("MaxLength", func(t *testing.T) { - MaxLength = 4 - if got := IsSlug("012345"); got != false { - t.Errorf("IsSlug() = %v, want %v", got, false) - } - MaxLength = 0 - }) -} - -func BenchmarkMakeShortAscii(b *testing.B) { - b.ReportAllocs() - for n := 0; n < b.N; n++ { - Make("Hello world") - } -} -func BenchmarkMakeShort(b *testing.B) { - b.ReportAllocs() - for n := 0; n < b.N; n++ { - Make("хелло ворлд") - } -} - -func BenchmarkMakeShortSymbols(b *testing.B) { - b.ReportAllocs() - for n := 0; n < b.N; n++ { - Make("·/,:;`˜'\" &€£¥") - } -} - -func BenchmarkMakeMediumAscii(b *testing.B) { - b.ReportAllocs() - for n := 0; n < b.N; n++ { - Make("ABCDE FGHIJ KLMNO PQRST UWXYZ ABCDE FGHIJ KLMNO PQRST UWXYZ ABCDE") - } -} - -func BenchmarkMakeMedium(b *testing.B) { - b.ReportAllocs() - for n := 0; n < b.N; n++ { - Make("ヲァィゥェ ォャュョッ ーアイウエ オカキクケ コサシスセ ソタチツテ トナニヌネ ノハヒフヘ ホマミムメ モヤユヨラ リルレロワ") - } -} - -func BenchmarkMakeLongAscii(b *testing.B) { - longStr := "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi " + - "pulvinar sodales ultrices. Nulla facilisi. Sed at vestibulum erat. Ut " + - "sit amet urna posuere, sagittis eros ac, varius nisi. Morbi ullamcorper " + - "odio at nunc pulvinar mattis. Vestibulum rutrum, ante eu dictum mattis, " + - "elit risus finibus nunc, consectetur facilisis eros leo ut sapien. Sed " + - "pulvinar volutpat mi. Cras semper mi ac eros accumsan, at feugiat massa " + - "elementum. Morbi eget dolor sit amet purus condimentum egestas non ut " + - "sapien. Duis feugiat magna vitae nisi lobortis, quis finibus sem " + - "sollicitudin. Pellentesque eleifend blandit ipsum, ut porta arcu " + - "ultricies et. Fusce vel ipsum porta, placerat diam ac, consectetur " + - "magna. Nulla in porta sem. Suspendisse commodo, felis in molestie " + - "ultricies, arcu ipsum aliquet turpis, elementum dapibus ipsum lorem a " + - "nisl. Etiam varius imperdiet placerat. Aliquam euismod lacus arcu, " + - "ultrices hendrerit est pellentesque vel. Aliquam sit amet laoreet leo. " + - "Integer eros libero, mollis sed posuere." - - b.ReportAllocs() - b.ResetTimer() - for n := 0; n < b.N; n++ { - Make(longStr) - } -} - -func BenchmarkSubstituteRuneShort(b *testing.B) { - shortStr := "Hello/Hi world" - subs := map[rune]string{'o': "no", '/': "slash"} - - b.ReportAllocs() - b.ResetTimer() - for n := 0; n < b.N; n++ { - SubstituteRune(shortStr, subs) - } -} - -func BenchmarkSubstituteRuneLong(b *testing.B) { - longStr := "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi " + - "pulvinar sodales ultrices. Nulla facilisi. Sed at vestibulum erat. Ut " + - "sit amet urna posuere, sagittis eros ac, varius nisi. Morbi ullamcorper " + - "odio at nunc pulvinar mattis. Vestibulum rutrum, ante eu dictum mattis, " + - "elit risus finibus nunc, consectetur facilisis eros leo ut sapien. Sed " + - "pulvinar volutpat mi. Cras semper mi ac eros accumsan, at feugiat massa " + - "elementum. Morbi eget dolor sit amet purus condimentum egestas non ut " + - "sapien. Duis feugiat magna vitae nisi lobortis, quis finibus sem " + - "sollicitudin. Pellentesque eleifend blandit ipsum, ut porta arcu " + - "ultricies et. Fusce vel ipsum porta, placerat diam ac, consectetur " + - "magna. Nulla in porta sem. Suspendisse commodo, felis in molestie " + - "ultricies, arcu ipsum aliquet turpis, elementum dapibus ipsum lorem a " + - "nisl. Etiam varius imperdiet placerat. Aliquam euismod lacus arcu, " + - "ultrices hendrerit est pellentesque vel. Aliquam sit amet laoreet leo. " + - "Integer eros libero, mollis sed posuere." - subs := map[rune]string{ - 'o': "no", - '/': "slash", - 'i': "done", - 'E': "es", - 'a': "ASD", - '1': "one", - 'l': "onetwo", - } - - b.ReportAllocs() - b.ResetTimer() - for n := 0; n < b.N; n++ { - SubstituteRune(longStr, subs) - } -} - -func BenchmarkSmartTruncateShort(b *testing.B) { - shortStr := "Hello-world" - MaxLength = 8 - - b.ReportAllocs() - b.ResetTimer() - for n := 0; n < b.N; n++ { - smartTruncate(shortStr) - } -} - -func BenchmarkSmartTruncateLong(b *testing.B) { - longStr := "Lorem-ipsum-dolor-sit-amet,-consectetur-adipiscing-elit.-Morbi-" + - "pulvinar-sodales-ultrices.-Nulla-facilisi.-Sed-at-vestibulum-erat.-Ut-" + - "sit-amet-urna-posuere,-sagittis-eros-ac,-varius-nisi.-Morbi-ullamcorper-" + - "odio-at-nunc-pulvinar-mattis.-Vestibulum-rutrum,-ante-eu-dictum-mattis,-" + - "elit-risus-finibus-nunc,-consectetur-facilisis-eros-leo-ut-sapien.-Sed-" + - "pulvinar-volutpat-mi.-Cras-semper-mi-ac-eros-accumsan,-at-feugiat-massa-" + - "elementum.-Morbi-eget-dolor-sit-amet-purus-condimentum-egestas-non-ut-" + - "sapien.-Duis-feugiat-magna-vitae-nisi-lobortis,-quis-finibus-sem-" + - "sollicitudin.-Pellentesque-eleifend-blandit-ipsum,-ut-porta-arcu-" + - "ultricies-et.-Fusce-vel-ipsum-porta,-placerat-diam-ac,-consectetur-" + - "magna.-Nulla-in-porta-sem.-Suspendisse-commodo,-felis-in-molestie-" + - "ultricies,-arcu-ipsum-aliquet-turpis,-elementum-dapibus-ipsum-lorem-a-" + - "nisl.-Etiam-varius-imperdiet-placerat.-Aliquam-euismod-lacus-arcu,-" + - "ultrices-hendrerit-est-pellentesque-vel.-Aliquam-sit-amet-laoreet-leo.-" + - "Integer-eros-libero,-mollis-sed-posuere." - MaxLength = 256 - - b.ReportAllocs() - b.ResetTimer() - for n := 0; n < b.N; n++ { - smartTruncate(longStr) - } -} - -func BenchmarkIsSlugShort(b *testing.B) { - shortStr := "hello-world" - - b.ReportAllocs() - b.ResetTimer() - for n := 0; n < b.N; n++ { - IsSlug(shortStr) - } -} - -func BenchmarkIsSlugLong(b *testing.B) { - longStr := "lorem-ipsum-dolor-sit-amet-consectetur-adipiscing-elit-morbi-" + - "pulvinar-sodales-ultrices-nulla-facilisi-sed-at-vestibulum-erat-ut-" + - "sit-amet-urna-posuere-sagittis-eros-ac-varius-nisi-morbi-ullamcorper-" + - "odio-at-nunc-pulvinar-mattis-vestibulum-rutrum-ante-eu-dictum-mattis,-" + - "elit-risus-finibus-nunc-consectetur-facilisis-eros-leo-ut-sapien-sed-" + - "pulvinar-volutpat-mi-cras-semper-mi-ac-eros-accumsan-at-feugiat-massa-" + - "elementum-morbi-eget-dolor-sit-amet-purus-condimentum-egestas-non-ut-" + - "sapien-duis-feugiat-magna-vitae-nisi-lobortis-quis-finibus-sem-" + - "sollicitudin-pellentesque-eleifend-blandit-ipsum-ut-porta-arcu-" + - "ultricies-et-fusce-vel-ipsum-porta-placerat-diam-ac-consectetur-" + - "magna-nulla-in-porta-sem-suspendisse-commodo-felis-in-molestie-" + - "ultricies-arcu-ipsum-aliquet-turpis-elementum-dapibus-ipsum-lorem-a-" + - "nisl-etiam-varius-imperdiet-placerat-aliquam-euismod-lacus-arcu-" + - "ultrices-hendrerit-est-pellentesque-vel-aliquam-sit-amet-laoreet-leo-" + - "integer-eros-libero-mollis-sed-posuere" - - b.ReportAllocs() - b.ResetTimer() - for n := 0; n < b.N; n++ { - IsSlug(longStr) - } -} diff --git a/deps/github.com/gregjones/httpcache/.travis.yml b/deps/github.com/gregjones/httpcache/.travis.yml new file mode 100644 index 000000000..2bca4c599 --- /dev/null +++ b/deps/github.com/gregjones/httpcache/.travis.yml @@ -0,0 +1,18 @@ +sudo: false +language: go +go: + - 1.6.x + - 1.7.x + - 1.8.x + - master +matrix: + allow_failures: + - go: master + fast_finish: true +install: + - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). +script: + - go get -t -v ./... + - diff -u <(echo -n) <(gofmt -d .) + - go tool vet . + - go test -v -race ./... diff --git a/deps/github.com/gregjones/httpcache/LICENSE.txt b/deps/github.com/gregjones/httpcache/LICENSE.txt new file mode 100644 index 000000000..81316beb0 --- /dev/null +++ b/deps/github.com/gregjones/httpcache/LICENSE.txt @@ -0,0 +1,7 @@ +Copyright © 2012 Greg Jones (greg.jones@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/deps/github.com/gregjones/httpcache/README.md b/deps/github.com/gregjones/httpcache/README.md new file mode 100644 index 000000000..61bd830e5 --- /dev/null +++ b/deps/github.com/gregjones/httpcache/README.md @@ -0,0 +1,24 @@ +httpcache +========= + +[![Build Status](https://travis-ci.org/gregjones/httpcache.svg?branch=master)](https://travis-ci.org/gregjones/httpcache) [![GoDoc](https://godoc.org/github.com/gregjones/httpcache?status.svg)](https://godoc.org/github.com/gregjones/httpcache) + +Package httpcache provides a http.RoundTripper implementation that works as a mostly RFC-compliant cache for http responses. + +It is only suitable for use as a 'private' cache (i.e. for a web-browser or an API-client and not for a shared proxy). + +Cache Backends +-------------- + +- The built-in 'memory' cache stores responses in an in-memory map. +- [`github.com/gregjones/httpcache/diskcache`](https://github.com/gregjones/httpcache/tree/master/diskcache) provides a filesystem-backed cache using the [diskv](https://github.com/peterbourgon/diskv) library. +- [`github.com/gregjones/httpcache/memcache`](https://github.com/gregjones/httpcache/tree/master/memcache) provides memcache implementations, for both App Engine and 'normal' memcache servers. +- [`sourcegraph.com/sourcegraph/s3cache`](https://sourcegraph.com/github.com/sourcegraph/s3cache) uses Amazon S3 for storage. +- [`github.com/gregjones/httpcache/leveldbcache`](https://github.com/gregjones/httpcache/tree/master/leveldbcache) provides a filesystem-backed cache using [leveldb](https://github.com/syndtr/goleveldb/leveldb). +- [`github.com/die-net/lrucache`](https://github.com/die-net/lrucache) provides an in-memory cache that will evict least-recently used entries. +- [`github.com/die-net/lrucache/twotier`](https://github.com/die-net/lrucache/tree/master/twotier) allows caches to be combined, for example to use lrucache above with a persistent disk-cache. + +License +------- + +- [MIT License](LICENSE.txt) diff --git a/deps/github.com/gregjones/httpcache/diskcache/diskcache.go b/deps/github.com/gregjones/httpcache/diskcache/diskcache.go new file mode 100644 index 000000000..42e3129d8 --- /dev/null +++ b/deps/github.com/gregjones/httpcache/diskcache/diskcache.go @@ -0,0 +1,61 @@ +// Package diskcache provides an implementation of httpcache.Cache that uses the diskv package +// to supplement an in-memory map with persistent storage +// +package diskcache + +import ( + "bytes" + "crypto/md5" + "encoding/hex" + "github.com/peterbourgon/diskv" + "io" +) + +// Cache is an implementation of httpcache.Cache that supplements the in-memory map with persistent storage +type Cache struct { + d *diskv.Diskv +} + +// Get returns the response corresponding to key if present +func (c *Cache) Get(key string) (resp []byte, ok bool) { + key = keyToFilename(key) + resp, err := c.d.Read(key) + if err != nil { + return []byte{}, false + } + return resp, true +} + +// Set saves a response to the cache as key +func (c *Cache) Set(key string, resp []byte) { + key = keyToFilename(key) + c.d.WriteStream(key, bytes.NewReader(resp), true) +} + +// Delete removes the response with key from the cache +func (c *Cache) Delete(key string) { + key = keyToFilename(key) + c.d.Erase(key) +} + +func keyToFilename(key string) string { + h := md5.New() + io.WriteString(h, key) + return hex.EncodeToString(h.Sum(nil)) +} + +// New returns a new Cache that will store files in basePath +func New(basePath string) *Cache { + return &Cache{ + d: diskv.New(diskv.Options{ + BasePath: basePath, + CacheSizeMax: 100 * 1024 * 1024, // 100MB + }), + } +} + +// NewWithDiskv returns a new Cache using the provided Diskv as underlying +// storage. +func NewWithDiskv(d *diskv.Diskv) *Cache { + return &Cache{d} +} diff --git a/deps/github.com/gregjones/httpcache/httpcache.go b/deps/github.com/gregjones/httpcache/httpcache.go new file mode 100644 index 000000000..8239edc2c --- /dev/null +++ b/deps/github.com/gregjones/httpcache/httpcache.go @@ -0,0 +1,553 @@ +// Package httpcache provides a http.RoundTripper implementation that works as a +// mostly RFC-compliant cache for http responses. +// +// It is only suitable for use as a 'private' cache (i.e. for a web-browser or an API-client +// and not for a shared proxy). +// +package httpcache + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/http/httputil" + "strings" + "sync" + "time" +) + +const ( + stale = iota + fresh + transparent + // XFromCache is the header added to responses that are returned from the cache + XFromCache = "X-From-Cache" +) + +// A Cache interface is used by the Transport to store and retrieve responses. +type Cache interface { + // Get returns the []byte representation of a cached response and a bool + // set to true if the value isn't empty + Get(key string) (responseBytes []byte, ok bool) + // Set stores the []byte representation of a response against a key + Set(key string, responseBytes []byte) + // Delete removes the value associated with the key + Delete(key string) +} + +// cacheKey returns the cache key for req. +func cacheKey(req *http.Request) string { + return req.URL.String() +} + +// CachedResponse returns the cached http.Response for req if present, and nil +// otherwise. +func CachedResponse(c Cache, req *http.Request) (resp *http.Response, err error) { + cachedVal, ok := c.Get(cacheKey(req)) + if !ok { + return + } + + b := bytes.NewBuffer(cachedVal) + return http.ReadResponse(bufio.NewReader(b), req) +} + +// MemoryCache is an implemtation of Cache that stores responses in an in-memory map. +type MemoryCache struct { + mu sync.RWMutex + items map[string][]byte +} + +// Get returns the []byte representation of the response and true if present, false if not +func (c *MemoryCache) Get(key string) (resp []byte, ok bool) { + c.mu.RLock() + resp, ok = c.items[key] + c.mu.RUnlock() + return resp, ok +} + +// Set saves response resp to the cache with key +func (c *MemoryCache) Set(key string, resp []byte) { + c.mu.Lock() + c.items[key] = resp + c.mu.Unlock() +} + +// Delete removes key from the cache +func (c *MemoryCache) Delete(key string) { + c.mu.Lock() + delete(c.items, key) + c.mu.Unlock() +} + +// NewMemoryCache returns a new Cache that will store items in an in-memory map +func NewMemoryCache() *MemoryCache { + c := &MemoryCache{items: map[string][]byte{}} + return c +} + +// Transport is an implementation of http.RoundTripper that will return values from a cache +// where possible (avoiding a network request) and will additionally add validators (etag/if-modified-since) +// to repeated requests allowing servers to return 304 / Not Modified +type Transport struct { + // The RoundTripper interface actually used to make requests + // If nil, http.DefaultTransport is used + Transport http.RoundTripper + Cache Cache + // If true, responses returned from the cache will be given an extra header, X-From-Cache + MarkCachedResponses bool +} + +// NewTransport returns a new Transport with the +// provided Cache implementation and MarkCachedResponses set to true +func NewTransport(c Cache) *Transport { + return &Transport{Cache: c, MarkCachedResponses: true} +} + +// Client returns an *http.Client that caches responses. +func (t *Transport) Client() *http.Client { + return &http.Client{Transport: t} +} + +// varyMatches will return false unless all of the cached values for the headers listed in Vary +// match the new request +func varyMatches(cachedResp *http.Response, req *http.Request) bool { + for _, header := range headerAllCommaSepValues(cachedResp.Header, "vary") { + header = http.CanonicalHeaderKey(header) + if header != "" && req.Header.Get(header) != cachedResp.Header.Get("X-Varied-"+header) { + return false + } + } + return true +} + +// RoundTrip takes a Request and returns a Response +// +// If there is a fresh Response already in cache, then it will be returned without connecting to +// the server. +// +// If there is a stale Response, then any validators it contains will be set on the new request +// to give the server a chance to respond with NotModified. If this happens, then the cached Response +// will be returned. +func (t *Transport) RoundTrip(req *http.Request) (resp *http.Response, err error) { + cacheKey := cacheKey(req) + cacheable := (req.Method == "GET" || req.Method == "HEAD") && req.Header.Get("range") == "" + var cachedResp *http.Response + if cacheable { + cachedResp, err = CachedResponse(t.Cache, req) + } else { + // Need to invalidate an existing value + t.Cache.Delete(cacheKey) + } + + transport := t.Transport + if transport == nil { + transport = http.DefaultTransport + } + + if cacheable && cachedResp != nil && err == nil { + if t.MarkCachedResponses { + cachedResp.Header.Set(XFromCache, "1") + } + + if varyMatches(cachedResp, req) { + // Can only use cached value if the new request doesn't Vary significantly + freshness := getFreshness(cachedResp.Header, req.Header) + if freshness == fresh { + return cachedResp, nil + } + + if freshness == stale { + var req2 *http.Request + // Add validators if caller hasn't already done so + etag := cachedResp.Header.Get("etag") + if etag != "" && req.Header.Get("etag") == "" { + req2 = cloneRequest(req) + req2.Header.Set("if-none-match", etag) + } + lastModified := cachedResp.Header.Get("last-modified") + if lastModified != "" && req.Header.Get("last-modified") == "" { + if req2 == nil { + req2 = cloneRequest(req) + } + req2.Header.Set("if-modified-since", lastModified) + } + if req2 != nil { + req = req2 + } + } + } + + resp, err = transport.RoundTrip(req) + if err == nil && req.Method == "GET" && resp.StatusCode == http.StatusNotModified { + // Replace the 304 response with the one from cache, but update with some new headers + endToEndHeaders := getEndToEndHeaders(resp.Header) + for _, header := range endToEndHeaders { + cachedResp.Header[header] = resp.Header[header] + } + cachedResp.Status = fmt.Sprintf("%d %s", http.StatusOK, http.StatusText(http.StatusOK)) + cachedResp.StatusCode = http.StatusOK + + resp = cachedResp + } else if (err != nil || (cachedResp != nil && resp.StatusCode >= 500)) && + req.Method == "GET" && canStaleOnError(cachedResp.Header, req.Header) { + // In case of transport failure and stale-if-error activated, returns cached content + // when available + cachedResp.Status = fmt.Sprintf("%d %s", http.StatusOK, http.StatusText(http.StatusOK)) + cachedResp.StatusCode = http.StatusOK + return cachedResp, nil + } else { + if err != nil || resp.StatusCode != http.StatusOK { + t.Cache.Delete(cacheKey) + } + if err != nil { + return nil, err + } + } + } else { + reqCacheControl := parseCacheControl(req.Header) + if _, ok := reqCacheControl["only-if-cached"]; ok { + resp = newGatewayTimeoutResponse(req) + } else { + resp, err = transport.RoundTrip(req) + if err != nil { + return nil, err + } + } + } + + if cacheable && canStore(parseCacheControl(req.Header), parseCacheControl(resp.Header)) { + for _, varyKey := range headerAllCommaSepValues(resp.Header, "vary") { + varyKey = http.CanonicalHeaderKey(varyKey) + fakeHeader := "X-Varied-" + varyKey + reqValue := req.Header.Get(varyKey) + if reqValue != "" { + resp.Header.Set(fakeHeader, reqValue) + } + } + switch req.Method { + case "GET": + // Delay caching until EOF is reached. + resp.Body = &cachingReadCloser{ + R: resp.Body, + OnEOF: func(r io.Reader) { + resp := *resp + resp.Body = ioutil.NopCloser(r) + respBytes, err := httputil.DumpResponse(&resp, true) + if err == nil { + t.Cache.Set(cacheKey, respBytes) + } + }, + } + default: + respBytes, err := httputil.DumpResponse(resp, true) + if err == nil { + t.Cache.Set(cacheKey, respBytes) + } + } + } else { + t.Cache.Delete(cacheKey) + } + return resp, nil +} + +// ErrNoDateHeader indicates that the HTTP headers contained no Date header. +var ErrNoDateHeader = errors.New("no Date header") + +// Date parses and returns the value of the Date header. +func Date(respHeaders http.Header) (date time.Time, err error) { + dateHeader := respHeaders.Get("date") + if dateHeader == "" { + err = ErrNoDateHeader + return + } + + return time.Parse(time.RFC1123, dateHeader) +} + +type realClock struct{} + +func (c *realClock) since(d time.Time) time.Duration { + return time.Since(d) +} + +type timer interface { + since(d time.Time) time.Duration +} + +var clock timer = &realClock{} + +// getFreshness will return one of fresh/stale/transparent based on the cache-control +// values of the request and the response +// +// fresh indicates the response can be returned +// stale indicates that the response needs validating before it is returned +// transparent indicates the response should not be used to fulfil the request +// +// Because this is only a private cache, 'public' and 'private' in cache-control aren't +// signficant. Similarly, smax-age isn't used. +func getFreshness(respHeaders, reqHeaders http.Header) (freshness int) { + respCacheControl := parseCacheControl(respHeaders) + reqCacheControl := parseCacheControl(reqHeaders) + if _, ok := reqCacheControl["no-cache"]; ok { + return transparent + } + if _, ok := respCacheControl["no-cache"]; ok { + return stale + } + if _, ok := reqCacheControl["only-if-cached"]; ok { + return fresh + } + + date, err := Date(respHeaders) + if err != nil { + return stale + } + currentAge := clock.since(date) + + var lifetime time.Duration + var zeroDuration time.Duration + + // If a response includes both an Expires header and a max-age directive, + // the max-age directive overrides the Expires header, even if the Expires header is more restrictive. + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err = time.ParseDuration(maxAge + "s") + if err != nil { + lifetime = zeroDuration + } + } else { + expiresHeader := respHeaders.Get("Expires") + if expiresHeader != "" { + expires, err := time.Parse(time.RFC1123, expiresHeader) + if err != nil { + lifetime = zeroDuration + } else { + lifetime = expires.Sub(date) + } + } + } + + if maxAge, ok := reqCacheControl["max-age"]; ok { + // the client is willing to accept a response whose age is no greater than the specified time in seconds + lifetime, err = time.ParseDuration(maxAge + "s") + if err != nil { + lifetime = zeroDuration + } + } + if minfresh, ok := reqCacheControl["min-fresh"]; ok { + // the client wants a response that will still be fresh for at least the specified number of seconds. + minfreshDuration, err := time.ParseDuration(minfresh + "s") + if err == nil { + currentAge = time.Duration(currentAge + minfreshDuration) + } + } + + if maxstale, ok := reqCacheControl["max-stale"]; ok { + // Indicates that the client is willing to accept a response that has exceeded its expiration time. + // If max-stale is assigned a value, then the client is willing to accept a response that has exceeded + // its expiration time by no more than the specified number of seconds. + // If no value is assigned to max-stale, then the client is willing to accept a stale response of any age. + // + // Responses served only because of a max-stale value are supposed to have a Warning header added to them, + // but that seems like a hassle, and is it actually useful? If so, then there needs to be a different + // return-value available here. + if maxstale == "" { + return fresh + } + maxstaleDuration, err := time.ParseDuration(maxstale + "s") + if err == nil { + currentAge = time.Duration(currentAge - maxstaleDuration) + } + } + + if lifetime > currentAge { + return fresh + } + + return stale +} + +// Returns true if either the request or the response includes the stale-if-error +// cache control extension: https://tools.ietf.org/html/rfc5861 +func canStaleOnError(respHeaders, reqHeaders http.Header) bool { + respCacheControl := parseCacheControl(respHeaders) + reqCacheControl := parseCacheControl(reqHeaders) + + var err error + lifetime := time.Duration(-1) + + if staleMaxAge, ok := respCacheControl["stale-if-error"]; ok { + if staleMaxAge != "" { + lifetime, err = time.ParseDuration(staleMaxAge + "s") + if err != nil { + return false + } + } else { + return true + } + } + if staleMaxAge, ok := reqCacheControl["stale-if-error"]; ok { + if staleMaxAge != "" { + lifetime, err = time.ParseDuration(staleMaxAge + "s") + if err != nil { + return false + } + } else { + return true + } + } + + if lifetime >= 0 { + date, err := Date(respHeaders) + if err != nil { + return false + } + currentAge := clock.since(date) + if lifetime > currentAge { + return true + } + } + + return false +} + +func getEndToEndHeaders(respHeaders http.Header) []string { + // These headers are always hop-by-hop + hopByHopHeaders := map[string]struct{}{ + "Connection": struct{}{}, + "Keep-Alive": struct{}{}, + "Proxy-Authenticate": struct{}{}, + "Proxy-Authorization": struct{}{}, + "Te": struct{}{}, + "Trailers": struct{}{}, + "Transfer-Encoding": struct{}{}, + "Upgrade": struct{}{}, + } + + for _, extra := range strings.Split(respHeaders.Get("connection"), ",") { + // any header listed in connection, if present, is also considered hop-by-hop + if strings.Trim(extra, " ") != "" { + hopByHopHeaders[http.CanonicalHeaderKey(extra)] = struct{}{} + } + } + endToEndHeaders := []string{} + for respHeader, _ := range respHeaders { + if _, ok := hopByHopHeaders[respHeader]; !ok { + endToEndHeaders = append(endToEndHeaders, respHeader) + } + } + return endToEndHeaders +} + +func canStore(reqCacheControl, respCacheControl cacheControl) (canStore bool) { + if _, ok := respCacheControl["no-store"]; ok { + return false + } + if _, ok := reqCacheControl["no-store"]; ok { + return false + } + return true +} + +func newGatewayTimeoutResponse(req *http.Request) *http.Response { + var braw bytes.Buffer + braw.WriteString("HTTP/1.1 504 Gateway Timeout\r\n\r\n") + resp, err := http.ReadResponse(bufio.NewReader(&braw), req) + if err != nil { + panic(err) + } + return resp +} + +// cloneRequest returns a clone of the provided *http.Request. +// The clone is a shallow copy of the struct and its Header map. +// (This function copyright goauth2 authors: https://code.google.com/p/goauth2) +func cloneRequest(r *http.Request) *http.Request { + // shallow copy of the struct + r2 := new(http.Request) + *r2 = *r + // deep copy of the Header + r2.Header = make(http.Header) + for k, s := range r.Header { + r2.Header[k] = s + } + return r2 +} + +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// headerAllCommaSepValues returns all comma-separated values (each +// with whitespace trimmed) for header name in headers. According to +// Section 4.2 of the HTTP/1.1 spec +// (http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2), +// values from multiple occurrences of a header should be concatenated, if +// the header's value is a comma-separated list. +func headerAllCommaSepValues(headers http.Header, name string) []string { + var vals []string + for _, val := range headers[http.CanonicalHeaderKey(name)] { + fields := strings.Split(val, ",") + for i, f := range fields { + fields[i] = strings.TrimSpace(f) + } + vals = append(vals, fields...) + } + return vals +} + +// cachingReadCloser is a wrapper around ReadCloser R that calls OnEOF +// handler with a full copy of the content read from R when EOF is +// reached. +type cachingReadCloser struct { + // Underlying ReadCloser. + R io.ReadCloser + // OnEOF is called with a copy of the content of R when EOF is reached. + OnEOF func(io.Reader) + + buf bytes.Buffer // buf stores a copy of the content of R. +} + +// Read reads the next len(p) bytes from R or until R is drained. The +// return value n is the number of bytes read. If R has no data to +// return, err is io.EOF and OnEOF is called with a full copy of what +// has been read so far. +func (r *cachingReadCloser) Read(p []byte) (n int, err error) { + n, err = r.R.Read(p) + r.buf.Write(p[:n]) + if err == io.EOF { + r.OnEOF(bytes.NewReader(r.buf.Bytes())) + } + return n, err +} + +func (r *cachingReadCloser) Close() error { + return r.R.Close() +} + +// NewMemoryCacheTransport returns a new Transport using the in-memory cache implementation +func NewMemoryCacheTransport() *Transport { + c := NewMemoryCache() + t := NewTransport(c) + return t +} diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignore b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignore new file mode 100644 index 000000000..364c624e6 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/.gitignore @@ -0,0 +1,198 @@ +# Created by .ignore support plugin (hsz.mobi) +coverage.txt +### Go template +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof +### Windows template +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk +### Kate template +# Swap Files # +.*.kate-swp +.swp.* +### SublimeText template +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json +### Linux template +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea +.idea/tasks.xml +.idea/dictionaries +.idea/vcs.xml +.idea/jsLibraryMappings.xml + +# Sensitive or high-churn files: +.idea/dataSources.ids +.idea/dataSources.xml +.idea/dataSources.local.xml +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml + +# Gradle: +.idea/gradle.xml +.idea/libraries + +# Mongo Explorer plugin: +.idea/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties +### Xcode template +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint +### Eclipse template + +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# Eclipse Core +.project + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.yml b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.yml new file mode 100644 index 000000000..47d7f90b3 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/.travis.yml @@ -0,0 +1,18 @@ +sudo: false +language: go +go: + - 1.6.x + - 1.7.x + - 1.8.x + +install: + - go get github.com/prometheus/client_golang/prometheus + - go get google.golang.org/grpc + - go get golang.org/x/net/context + - go get github.com/stretchr/testify + +script: + - ./test_all.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE new file mode 100644 index 000000000..b2b065037 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/README.md b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/README.md new file mode 100644 index 000000000..616547a78 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/README.md @@ -0,0 +1,247 @@ +# Go gRPC Interceptors for Prometheus monitoring + +[![Travis Build](https://travis-ci.org/grpc-ecosystem/go-grpc-prometheus.svg)](https://travis-ci.org/grpc-ecosystem/go-grpc-prometheus) +[![Go Report Card](https://goreportcard.com/badge/github.com/grpc-ecosystem/go-grpc-prometheus)](http://goreportcard.com/report/grpc-ecosystem/go-grpc-prometheus) +[![GoDoc](http://img.shields.io/badge/GoDoc-Reference-blue.svg)](https://godoc.org/github.com/grpc-ecosystem/go-grpc-prometheus) +[![SourceGraph](https://sourcegraph.com/github.com/grpc-ecosystem/go-grpc-prometheus/-/badge.svg)](https://sourcegraph.com/github.com/grpc-ecosystem/go-grpc-prometheus/?badge) +[![codecov](https://codecov.io/gh/grpc-ecosystem/go-grpc-prometheus/branch/master/graph/badge.svg)](https://codecov.io/gh/grpc-ecosystem/go-grpc-prometheus) +[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) + +[Prometheus](https://prometheus.io/) monitoring for your [gRPC Go](https://github.com/grpc/grpc-go) servers and clients. + +A sister implementation for [gRPC Java](https://github.com/grpc/grpc-java) (same metrics, same semantics) is in [grpc-ecosystem/java-grpc-prometheus](https://github.com/grpc-ecosystem/java-grpc-prometheus). + +## Interceptors + +[gRPC Go](https://github.com/grpc/grpc-go) recently acquired support for Interceptors, i.e. middleware that is executed +by a gRPC Server before the request is passed onto the user's application logic. It is a perfect way to implement +common patterns: auth, logging and... monitoring. + +To use Interceptors in chains, please see [`go-grpc-middleware`](https://github.com/mwitkow/go-grpc-middleware). + +## Usage + +There are two types of interceptors: client-side and server-side. This package provides monitoring Interceptors for both. + +### Server-side + +```go +import "github.com/grpc-ecosystem/go-grpc-prometheus" +... + // Initialize your gRPC server's interceptor. + myServer := grpc.NewServer( + grpc.StreamInterceptor(grpc_prometheus.StreamServerInterceptor), + grpc.UnaryInterceptor(grpc_prometheus.UnaryServerInterceptor), + ) + // Register your gRPC service implementations. + myservice.RegisterMyServiceServer(s.server, &myServiceImpl{}) + // After all your registrations, make sure all of the Prometheus metrics are initialized. + grpc_prometheus.Register(myServer) + // Register Prometheus metrics handler. + http.Handle("/metrics", prometheus.Handler()) +... +``` + +### Client-side + +```go +import "github.com/grpc-ecosystem/go-grpc-prometheus" +... + clientConn, err = grpc.Dial( + address, + grpc.WithUnaryInterceptor(UnaryClientInterceptor), + grpc.WithStreamInterceptor(StreamClientInterceptor) + ) + client = pb_testproto.NewTestServiceClient(clientConn) + resp, err := client.PingEmpty(s.ctx, &myservice.Request{Msg: "hello"}) +... +``` + +# Metrics + +## Labels + +All server-side metrics start with `grpc_server` as Prometheus subsystem name. All client-side metrics start with `grpc_client`. Both of them have mirror-concepts. Similarly all methods +contain the same rich labels: + + * `grpc_service` - the [gRPC service](http://www.grpc.io/docs/#defining-a-service) name, which is the combination of protobuf `package` and + the `grpc_service` section name. E.g. for `package = mwitkow.testproto` and + `service TestService` the label will be `grpc_service="mwitkow.testproto.TestService"` + * `grpc_method` - the name of the method called on the gRPC service. E.g. + `grpc_method="Ping"` + * `grpc_type` - the gRPC [type of request](http://www.grpc.io/docs/guides/concepts.html#rpc-life-cycle). + Differentiating between the two is important especially for latency measurements. + + - `unary` is single request, single response RPC + - `client_stream` is a multi-request, single response RPC + - `server_stream` is a single request, multi-response RPC + - `bidi_stream` is a multi-request, multi-response RPC + + +Additionally for completed RPCs, the following labels are used: + + * `grpc_code` - the human-readable [gRPC status code](https://github.com/grpc/grpc-go/blob/master/codes/codes.go). + The list of all statuses is to long, but here are some common ones: + + - `OK` - means the RPC was successful + - `IllegalArgument` - RPC contained bad values + - `Internal` - server-side error not disclosed to the clients + +## Counters + +The counters and their up to date documentation is in [server_reporter.go](server_reporter.go) and [client_reporter.go](client_reporter.go) +the respective Prometheus handler (usually `/metrics`). + +For the purpose of this documentation we will only discuss `grpc_server` metrics. The `grpc_client` ones contain mirror concepts. + +For simplicity, let's assume we're tracking a single server-side RPC call of [`mwitkow.testproto.TestService`](examples/testproto/test.proto), +calling the method `PingList`. The call succeeds and returns 20 messages in the stream. + +First, immediately after the server receives the call it will increment the +`grpc_server_started_total` and start the handling time clock (if histograms are enabled). + +```jsoniq +grpc_server_started_total{grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream"} 1 +``` + +Then the user logic gets invoked. It receives one message from the client containing the request +(it's a `server_stream`): + +```jsoniq +grpc_server_msg_received_total{grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream"} 1 +``` + +The user logic may return an error, or send multiple messages back to the client. In this case, on +each of the 20 messages sent back, a counter will be incremented: + +```jsoniq +grpc_server_msg_sent_total{grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream"} 20 +``` + +After the call completes, it's status (`OK` or other [gRPC status code](https://github.com/grpc/grpc-go/blob/master/codes/codes.go)) +and the relevant call labels increment the `grpc_server_handled_total` counter. + +```jsoniq +grpc_server_handled_total{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream"} 1 +``` + +## Histograms + +[Prometheus histograms](https://prometheus.io/docs/concepts/metric_types/#histogram) are a great way +to measure latency distributions of your RPCs. However since it is bad practice to have metrics +of [high cardinality](https://prometheus.io/docs/practices/instrumentation/#do-not-overuse-labels)) +the latency monitoring metrics are disabled by default. To enable them please call the following +in your server initialization code: + +```jsoniq +grpc_prometheus.EnableHandlingTimeHistogram() +``` + +After the call completes, it's handling time will be recorded in a [Prometheus histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) +variable `grpc_server_handling_seconds`. It contains three sub-metrics: + + * `grpc_server_handling_seconds_count` - the count of all completed RPCs by status and method + * `grpc_server_handling_seconds_sum` - cumulative time of RPCs by status and method, useful for + calculating average handling times + * `grpc_server_handling_seconds_bucket` - contains the counts of RPCs by status and method in respective + handling-time buckets. These buckets can be used by Prometheus to estimate SLAs (see [here](https://prometheus.io/docs/practices/histograms/)) + +The counter values will look as follows: + +```jsoniq +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="0.005"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="0.01"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="0.025"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="0.05"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="0.1"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="0.25"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="0.5"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="1"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="2.5"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="5"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="10"} 1 +grpc_server_handling_seconds_bucket{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream",le="+Inf"} 1 +grpc_server_handling_seconds_sum{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream"} 0.0003866430000000001 +grpc_server_handling_seconds_count{grpc_code="OK",grpc_method="PingList",grpc_service="mwitkow.testproto.TestService",grpc_type="server_stream"} 1 +``` + + +## Useful query examples + +Prometheus philosophy is to provide the most detailed metrics possible to the monitoring system, and +let the aggregations be handled there. The verbosity of above metrics make it possible to have that +flexibility. Here's a couple of useful monitoring queries: + + +### request inbound rate +```jsoniq +sum(rate(grpc_server_started_total{job="foo"}[1m])) by (grpc_service) +``` +For `job="foo"` (common label to differentiate between Prometheus monitoring targets), calculate the +rate of requests per second (1 minute window) for each gRPC `grpc_service` that the job has. Please note +how the `grpc_method` is being omitted here: all methods of a given gRPC service will be summed together. + +### unary request error rate +```jsoniq +sum(rate(grpc_server_handled_total{job="foo",grpc_type="unary",grpc_code!="OK"}[1m])) by (grpc_service) +``` +For `job="foo"`, calculate the per-`grpc_service` rate of `unary` (1:1) RPCs that failed, i.e. the +ones that didn't finish with `OK` code. + +### unary request error percentage +```jsoniq +sum(rate(grpc_server_handled_total{job="foo",grpc_type="unary",grpc_code!="OK"}[1m])) by (grpc_service) + / +sum(rate(grpc_server_started_total{job="foo",grpc_type="unary"}[1m])) by (grpc_service) + * 100.0 +``` +For `job="foo"`, calculate the percentage of failed requests by service. It's easy to notice that +this is a combination of the two above examples. This is an example of a query you would like to +[alert on](https://prometheus.io/docs/alerting/rules/) in your system for SLA violations, e.g. +"no more than 1% requests should fail". + +### average response stream size +```jsoniq +sum(rate(grpc_server_msg_sent_total{job="foo",grpc_type="server_stream"}[10m])) by (grpc_service) + / +sum(rate(grpc_server_started_total{job="foo",grpc_type="server_stream"}[10m])) by (grpc_service) +``` +For `job="foo"` what is the `grpc_service`-wide `10m` average of messages returned for all ` +server_stream` RPCs. This allows you to track the stream sizes returned by your system, e.g. allows +you to track when clients started to send "wide" queries that ret +Note the divisor is the number of started RPCs, in order to account for in-flight requests. + +### 99%-tile latency of unary requests +```jsoniq +histogram_quantile(0.99, + sum(rate(grpc_server_handling_seconds_bucket{job="foo",grpc_type="unary"}[5m])) by (grpc_service,le) +) +``` +For `job="foo"`, returns an 99%-tile [quantile estimation](https://prometheus.io/docs/practices/histograms/#quantiles) +of the handling time of RPCs per service. Please note the `5m` rate, this means that the quantile +estimation will take samples in a rolling `5m` window. When combined with other quantiles +(e.g. 50%, 90%), this query gives you tremendous insight into the responsiveness of your system +(e.g. impact of caching). + +### percentage of slow unary queries (>250ms) +```jsoniq +100.0 - ( +sum(rate(grpc_server_handling_seconds_bucket{job="foo",grpc_type="unary",le="0.25"}[5m])) by (grpc_service) + / +sum(rate(grpc_server_handling_seconds_count{job="foo",grpc_type="unary"}[5m])) by (grpc_service) +) * 100.0 +``` +For `job="foo"` calculate the by-`grpc_service` fraction of slow requests that took longer than `0.25` +seconds. This query is relatively complex, since the Prometheus aggregations use `le` (less or equal) +buckets, meaning that counting "fast" requests fractions is easier. However, simple maths helps. +This is an example of a query you would like to alert on in your system for SLA violations, +e.g. "less than 1% of requests are slower than 250ms". + + +## Status + +This code has been used since August 2015 as the basis for monitoring of *production* gRPC micro services at [Improbable](https://improbable.io). + +## License + +`go-grpc-prometheus` is released under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details. diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/client.go b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/client.go new file mode 100644 index 000000000..d9e87b2f7 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/client.go @@ -0,0 +1,72 @@ +// Copyright 2016 Michal Witkowski. All Rights Reserved. +// See LICENSE for licensing terms. + +// gRPC Prometheus monitoring interceptors for client-side gRPC. + +package grpc_prometheus + +import ( + "io" + + "golang.org/x/net/context" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" +) + +// UnaryClientInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Unary RPCs. +func UnaryClientInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + monitor := newClientReporter(Unary, method) + monitor.SentMessage() + err := invoker(ctx, method, req, reply, cc, opts...) + if err != nil { + monitor.ReceivedMessage() + } + monitor.Handled(grpc.Code(err)) + return err +} + +// StreamServerInterceptor is a gRPC client-side interceptor that provides Prometheus monitoring for Streaming RPCs. +func StreamClientInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption) (grpc.ClientStream, error) { + monitor := newClientReporter(clientStreamType(desc), method) + clientStream, err := streamer(ctx, desc, cc, method, opts...) + if err != nil { + monitor.Handled(grpc.Code(err)) + return nil, err + } + return &monitoredClientStream{clientStream, monitor}, nil +} + +func clientStreamType(desc *grpc.StreamDesc) grpcType { + if desc.ClientStreams && !desc.ServerStreams { + return ClientStream + } else if !desc.ClientStreams && desc.ServerStreams { + return ServerStream + } + return BidiStream +} + +// monitoredClientStream wraps grpc.ClientStream allowing each Sent/Recv of message to increment counters. +type monitoredClientStream struct { + grpc.ClientStream + monitor *clientReporter +} + +func (s *monitoredClientStream) SendMsg(m interface{}) error { + err := s.ClientStream.SendMsg(m) + if err == nil { + s.monitor.SentMessage() + } + return err +} + +func (s *monitoredClientStream) RecvMsg(m interface{}) error { + err := s.ClientStream.RecvMsg(m) + if err == nil { + s.monitor.ReceivedMessage() + } else if err == io.EOF { + s.monitor.Handled(codes.OK) + } else { + s.monitor.Handled(grpc.Code(err)) + } + return err +} diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go new file mode 100644 index 000000000..16b761553 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/client_reporter.go @@ -0,0 +1,111 @@ +// Copyright 2016 Michal Witkowski. All Rights Reserved. +// See LICENSE for licensing terms. + +package grpc_prometheus + +import ( + "time" + + "google.golang.org/grpc/codes" + + prom "github.com/prometheus/client_golang/prometheus" +) + +var ( + clientStartedCounter = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "client", + Name: "started_total", + Help: "Total number of RPCs started on the client.", + }, []string{"grpc_type", "grpc_service", "grpc_method"}) + + clientHandledCounter = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "client", + Name: "handled_total", + Help: "Total number of RPCs completed by the client, regardless of success or failure.", + }, []string{"grpc_type", "grpc_service", "grpc_method", "grpc_code"}) + + clientStreamMsgReceived = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "client", + Name: "msg_received_total", + Help: "Total number of RPC stream messages received by the client.", + }, []string{"grpc_type", "grpc_service", "grpc_method"}) + + clientStreamMsgSent = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "client", + Name: "msg_sent_total", + Help: "Total number of gRPC stream messages sent by the client.", + }, []string{"grpc_type", "grpc_service", "grpc_method"}) + + clientHandledHistogramEnabled = false + clientHandledHistogramOpts = prom.HistogramOpts{ + Namespace: "grpc", + Subsystem: "client", + Name: "handling_seconds", + Help: "Histogram of response latency (seconds) of the gRPC until it is finished by the application.", + Buckets: prom.DefBuckets, + } + clientHandledHistogram *prom.HistogramVec +) + +func init() { + prom.MustRegister(clientStartedCounter) + prom.MustRegister(clientHandledCounter) + prom.MustRegister(clientStreamMsgReceived) + prom.MustRegister(clientStreamMsgSent) +} + +// EnableClientHandlingTimeHistogram turns on recording of handling time of RPCs. +// Histogram metrics can be very expensive for Prometheus to retain and query. +func EnableClientHandlingTimeHistogram(opts ...HistogramOption) { + for _, o := range opts { + o(&clientHandledHistogramOpts) + } + if !clientHandledHistogramEnabled { + clientHandledHistogram = prom.NewHistogramVec( + clientHandledHistogramOpts, + []string{"grpc_type", "grpc_service", "grpc_method"}, + ) + prom.Register(clientHandledHistogram) + } + clientHandledHistogramEnabled = true +} + +type clientReporter struct { + rpcType grpcType + serviceName string + methodName string + startTime time.Time +} + +func newClientReporter(rpcType grpcType, fullMethod string) *clientReporter { + r := &clientReporter{rpcType: rpcType} + if clientHandledHistogramEnabled { + r.startTime = time.Now() + } + r.serviceName, r.methodName = splitMethodName(fullMethod) + clientStartedCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + return r +} + +func (r *clientReporter) ReceivedMessage() { + clientStreamMsgReceived.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() +} + +func (r *clientReporter) SentMessage() { + clientStreamMsgSent.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() +} + +func (r *clientReporter) Handled(code codes.Code) { + clientHandledCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName, code.String()).Inc() + if clientHandledHistogramEnabled { + clientHandledHistogram.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Observe(time.Since(r.startTime).Seconds()) + } +} diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/server.go b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/server.go new file mode 100644 index 000000000..f85c8c237 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/server.go @@ -0,0 +1,74 @@ +// Copyright 2016 Michal Witkowski. All Rights Reserved. +// See LICENSE for licensing terms. + +// gRPC Prometheus monitoring interceptors for server-side gRPC. + +package grpc_prometheus + +import ( + "golang.org/x/net/context" + "google.golang.org/grpc" +) + +// PreregisterServices takes a gRPC server and pre-initializes all counters to 0. +// This allows for easier monitoring in Prometheus (no missing metrics), and should be called *after* all services have +// been registered with the server. +func Register(server *grpc.Server) { + serviceInfo := server.GetServiceInfo() + for serviceName, info := range serviceInfo { + for _, mInfo := range info.Methods { + preRegisterMethod(serviceName, &mInfo) + } + } +} + +// UnaryServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Unary RPCs. +func UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + monitor := newServerReporter(Unary, info.FullMethod) + monitor.ReceivedMessage() + resp, err := handler(ctx, req) + monitor.Handled(grpc.Code(err)) + if err == nil { + monitor.SentMessage() + } + return resp, err +} + +// StreamServerInterceptor is a gRPC server-side interceptor that provides Prometheus monitoring for Streaming RPCs. +func StreamServerInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { + monitor := newServerReporter(streamRpcType(info), info.FullMethod) + err := handler(srv, &monitoredServerStream{ss, monitor}) + monitor.Handled(grpc.Code(err)) + return err +} + +func streamRpcType(info *grpc.StreamServerInfo) grpcType { + if info.IsClientStream && !info.IsServerStream { + return ClientStream + } else if !info.IsClientStream && info.IsServerStream { + return ServerStream + } + return BidiStream +} + +// monitoredStream wraps grpc.ServerStream allowing each Sent/Recv of message to increment counters. +type monitoredServerStream struct { + grpc.ServerStream + monitor *serverReporter +} + +func (s *monitoredServerStream) SendMsg(m interface{}) error { + err := s.ServerStream.SendMsg(m) + if err == nil { + s.monitor.SentMessage() + } + return err +} + +func (s *monitoredServerStream) RecvMsg(m interface{}) error { + err := s.ServerStream.RecvMsg(m) + if err == nil { + s.monitor.ReceivedMessage() + } + return err +} diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go new file mode 100644 index 000000000..628a89056 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/server_reporter.go @@ -0,0 +1,157 @@ +// Copyright 2016 Michal Witkowski. All Rights Reserved. +// See LICENSE for licensing terms. + +package grpc_prometheus + +import ( + "time" + + "google.golang.org/grpc/codes" + + prom "github.com/prometheus/client_golang/prometheus" + "google.golang.org/grpc" +) + +type grpcType string + +const ( + Unary grpcType = "unary" + ClientStream grpcType = "client_stream" + ServerStream grpcType = "server_stream" + BidiStream grpcType = "bidi_stream" +) + +var ( + serverStartedCounter = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "server", + Name: "started_total", + Help: "Total number of RPCs started on the server.", + }, []string{"grpc_type", "grpc_service", "grpc_method"}) + + serverHandledCounter = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "server", + Name: "handled_total", + Help: "Total number of RPCs completed on the server, regardless of success or failure.", + }, []string{"grpc_type", "grpc_service", "grpc_method", "grpc_code"}) + + serverStreamMsgReceived = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "server", + Name: "msg_received_total", + Help: "Total number of RPC stream messages received on the server.", + }, []string{"grpc_type", "grpc_service", "grpc_method"}) + + serverStreamMsgSent = prom.NewCounterVec( + prom.CounterOpts{ + Namespace: "grpc", + Subsystem: "server", + Name: "msg_sent_total", + Help: "Total number of gRPC stream messages sent by the server.", + }, []string{"grpc_type", "grpc_service", "grpc_method"}) + + serverHandledHistogramEnabled = false + serverHandledHistogramOpts = prom.HistogramOpts{ + Namespace: "grpc", + Subsystem: "server", + Name: "handling_seconds", + Help: "Histogram of response latency (seconds) of gRPC that had been application-level handled by the server.", + Buckets: prom.DefBuckets, + } + serverHandledHistogram *prom.HistogramVec +) + +func init() { + prom.MustRegister(serverStartedCounter) + prom.MustRegister(serverHandledCounter) + prom.MustRegister(serverStreamMsgReceived) + prom.MustRegister(serverStreamMsgSent) +} + +type HistogramOption func(*prom.HistogramOpts) + +// WithHistogramBuckets allows you to specify custom bucket ranges for histograms if EnableHandlingTimeHistogram is on. +func WithHistogramBuckets(buckets []float64) HistogramOption { + return func(o *prom.HistogramOpts) { o.Buckets = buckets } +} + +// EnableHandlingTimeHistogram turns on recording of handling time of RPCs for server-side interceptors. +// Histogram metrics can be very expensive for Prometheus to retain and query. +func EnableHandlingTimeHistogram(opts ...HistogramOption) { + for _, o := range opts { + o(&serverHandledHistogramOpts) + } + if !serverHandledHistogramEnabled { + serverHandledHistogram = prom.NewHistogramVec( + serverHandledHistogramOpts, + []string{"grpc_type", "grpc_service", "grpc_method"}, + ) + prom.Register(serverHandledHistogram) + } + serverHandledHistogramEnabled = true +} + +type serverReporter struct { + rpcType grpcType + serviceName string + methodName string + startTime time.Time +} + +func newServerReporter(rpcType grpcType, fullMethod string) *serverReporter { + r := &serverReporter{rpcType: rpcType} + if serverHandledHistogramEnabled { + r.startTime = time.Now() + } + r.serviceName, r.methodName = splitMethodName(fullMethod) + serverStartedCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() + return r +} + +func (r *serverReporter) ReceivedMessage() { + serverStreamMsgReceived.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() +} + +func (r *serverReporter) SentMessage() { + serverStreamMsgSent.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Inc() +} + +func (r *serverReporter) Handled(code codes.Code) { + serverHandledCounter.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName, code.String()).Inc() + if serverHandledHistogramEnabled { + serverHandledHistogram.WithLabelValues(string(r.rpcType), r.serviceName, r.methodName).Observe(time.Since(r.startTime).Seconds()) + } +} + +// preRegisterMethod is invoked on Register of a Server, allowing all gRPC services labels to be pre-populated. +func preRegisterMethod(serviceName string, mInfo *grpc.MethodInfo) { + methodName := mInfo.Name + methodType := string(typeFromMethodInfo(mInfo)) + // These are just references (no increments), as just referencing will create the labels but not set values. + serverStartedCounter.GetMetricWithLabelValues(methodType, serviceName, methodName) + serverStreamMsgReceived.GetMetricWithLabelValues(methodType, serviceName, methodName) + serverStreamMsgSent.GetMetricWithLabelValues(methodType, serviceName, methodName) + if serverHandledHistogramEnabled { + serverHandledHistogram.GetMetricWithLabelValues(methodType, serviceName, methodName) + } + for _, code := range allCodes { + serverHandledCounter.GetMetricWithLabelValues(methodType, serviceName, methodName, code.String()) + } +} + +func typeFromMethodInfo(mInfo *grpc.MethodInfo) grpcType { + if mInfo.IsClientStream == false && mInfo.IsServerStream == false { + return Unary + } + if mInfo.IsClientStream == true && mInfo.IsServerStream == false { + return ClientStream + } + if mInfo.IsClientStream == false && mInfo.IsServerStream == true { + return ServerStream + } + return BidiStream +} diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/test_all.sh b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/test_all.sh new file mode 100755 index 000000000..e1e780080 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/test_all.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e +echo "" > coverage.txt + +for d in $(go list ./... | grep -v vendor); do + echo -e "TESTS FOR: for \033[0;35m${d}\033[0m" + go test -race -v -coverprofile=profile.coverage.out -covermode=atomic $d + if [ -f profile.coverage.out ]; then + cat profile.coverage.out >> coverage.txt + rm profile.coverage.out + fi + echo "" +done diff --git a/deps/github.com/grpc-ecosystem/go-grpc-prometheus/util.go b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/util.go new file mode 100644 index 000000000..372460ac4 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/go-grpc-prometheus/util.go @@ -0,0 +1,27 @@ +// Copyright 2016 Michal Witkowski. All Rights Reserved. +// See LICENSE for licensing terms. + +package grpc_prometheus + +import ( + "strings" + + "google.golang.org/grpc/codes" +) + +var ( + allCodes = []codes.Code{ + codes.OK, codes.Canceled, codes.Unknown, codes.InvalidArgument, codes.DeadlineExceeded, codes.NotFound, + codes.AlreadyExists, codes.PermissionDenied, codes.Unauthenticated, codes.ResourceExhausted, + codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.Unimplemented, codes.Internal, + codes.Unavailable, codes.DataLoss, + } +) + +func splitMethodName(fullMethodName string) (string, string) { + fullMethodName = strings.TrimPrefix(fullMethodName, "/") // remove leading slash + if i := strings.Index(fullMethodName, "/"); i >= 0 { + return fullMethodName[:i], fullMethodName[i+1:] + } + return "unknown", "unknown" +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt b/deps/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt new file mode 100644 index 000000000..364516251 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/LICENSE.txt @@ -0,0 +1,27 @@ +Copyright (c) 2015, Gengo, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Gengo, Inc. nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go new file mode 100644 index 000000000..6e0eb27e2 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/context.go @@ -0,0 +1,187 @@ +package runtime + +import ( + "fmt" + "net" + "net/http" + "strconv" + "strings" + "time" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// MetadataHeaderPrefix is the http prefix that represents custom metadata +// parameters to or from a gRPC call. +const MetadataHeaderPrefix = "Grpc-Metadata-" + +// MetadataPrefix is the prefix for grpc-gateway supplied custom metadata fields. +const MetadataPrefix = "grpcgateway-" + +// MetadataTrailerPrefix is prepended to gRPC metadata as it is converted to +// HTTP headers in a response handled by grpc-gateway +const MetadataTrailerPrefix = "Grpc-Trailer-" + +const metadataGrpcTimeout = "Grpc-Timeout" + +const xForwardedFor = "X-Forwarded-For" +const xForwardedHost = "X-Forwarded-Host" + +var ( + // DefaultContextTimeout is used for gRPC call context.WithTimeout whenever a Grpc-Timeout inbound + // header isn't present. If the value is 0 the sent `context` will not have a timeout. + DefaultContextTimeout = 0 * time.Second +) + +/* +AnnotateContext adds context information such as metadata from the request. + +At a minimum, the RemoteAddr is included in the fashion of "X-Forwarded-For", +except that the forwarded destination is not another HTTP service but rather +a gRPC service. +*/ +func AnnotateContext(ctx context.Context, mux *ServeMux, req *http.Request) (context.Context, error) { + var pairs []string + timeout := DefaultContextTimeout + if tm := req.Header.Get(metadataGrpcTimeout); tm != "" { + var err error + timeout, err = timeoutDecode(tm) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid grpc-timeout: %s", tm) + } + } + + for key, vals := range req.Header { + for _, val := range vals { + // For backwards-compatibility, pass through 'authorization' header with no prefix. + if strings.ToLower(key) == "authorization" { + pairs = append(pairs, "authorization", val) + } + if h, ok := mux.incomingHeaderMatcher(key); ok { + pairs = append(pairs, h, val) + } + } + } + if host := req.Header.Get(xForwardedHost); host != "" { + pairs = append(pairs, strings.ToLower(xForwardedHost), host) + } else if req.Host != "" { + pairs = append(pairs, strings.ToLower(xForwardedHost), req.Host) + } + + if addr := req.RemoteAddr; addr != "" { + if remoteIP, _, err := net.SplitHostPort(addr); err == nil { + if fwd := req.Header.Get(xForwardedFor); fwd == "" { + pairs = append(pairs, strings.ToLower(xForwardedFor), remoteIP) + } else { + pairs = append(pairs, strings.ToLower(xForwardedFor), fmt.Sprintf("%s, %s", fwd, remoteIP)) + } + } else { + grpclog.Printf("invalid remote addr: %s", addr) + } + } + + if timeout != 0 { + ctx, _ = context.WithTimeout(ctx, timeout) + } + if len(pairs) == 0 { + return ctx, nil + } + md := metadata.Pairs(pairs...) + if mux.metadataAnnotator != nil { + md = metadata.Join(md, mux.metadataAnnotator(ctx, req)) + } + return metadata.NewOutgoingContext(ctx, md), nil +} + +// ServerMetadata consists of metadata sent from gRPC server. +type ServerMetadata struct { + HeaderMD metadata.MD + TrailerMD metadata.MD +} + +type serverMetadataKey struct{} + +// NewServerMetadataContext creates a new context with ServerMetadata +func NewServerMetadataContext(ctx context.Context, md ServerMetadata) context.Context { + return context.WithValue(ctx, serverMetadataKey{}, md) +} + +// ServerMetadataFromContext returns the ServerMetadata in ctx +func ServerMetadataFromContext(ctx context.Context) (md ServerMetadata, ok bool) { + md, ok = ctx.Value(serverMetadataKey{}).(ServerMetadata) + return +} + +func timeoutDecode(s string) (time.Duration, error) { + size := len(s) + if size < 2 { + return 0, fmt.Errorf("timeout string is too short: %q", s) + } + d, ok := timeoutUnitToDuration(s[size-1]) + if !ok { + return 0, fmt.Errorf("timeout unit is not recognized: %q", s) + } + t, err := strconv.ParseInt(s[:size-1], 10, 64) + if err != nil { + return 0, err + } + return d * time.Duration(t), nil +} + +func timeoutUnitToDuration(u uint8) (d time.Duration, ok bool) { + switch u { + case 'H': + return time.Hour, true + case 'M': + return time.Minute, true + case 'S': + return time.Second, true + case 'm': + return time.Millisecond, true + case 'u': + return time.Microsecond, true + case 'n': + return time.Nanosecond, true + default: + } + return +} + +// isPermanentHTTPHeader checks whether hdr belongs to the list of +// permenant request headers maintained by IANA. +// http://www.iana.org/assignments/message-headers/message-headers.xml +func isPermanentHTTPHeader(hdr string) bool { + switch hdr { + case + "Accept", + "Accept-Charset", + "Accept-Language", + "Accept-Ranges", + "Authorization", + "Cache-Control", + "Content-Type", + "Cookie", + "Date", + "Expect", + "From", + "Host", + "If-Match", + "If-Modified-Since", + "If-None-Match", + "If-Schedule-Tag-Match", + "If-Unmodified-Since", + "Max-Forwards", + "Origin", + "Pragma", + "Referer", + "User-Agent", + "Via", + "Warning": + return true + } + return false +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/convert.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/convert.go new file mode 100644 index 000000000..1af5cc4eb --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/convert.go @@ -0,0 +1,58 @@ +package runtime + +import ( + "strconv" +) + +// String just returns the given string. +// It is just for compatibility to other types. +func String(val string) (string, error) { + return val, nil +} + +// Bool converts the given string representation of a boolean value into bool. +func Bool(val string) (bool, error) { + return strconv.ParseBool(val) +} + +// Float64 converts the given string representation into representation of a floating point number into float64. +func Float64(val string) (float64, error) { + return strconv.ParseFloat(val, 64) +} + +// Float32 converts the given string representation of a floating point number into float32. +func Float32(val string) (float32, error) { + f, err := strconv.ParseFloat(val, 32) + if err != nil { + return 0, err + } + return float32(f), nil +} + +// Int64 converts the given string representation of an integer into int64. +func Int64(val string) (int64, error) { + return strconv.ParseInt(val, 0, 64) +} + +// Int32 converts the given string representation of an integer into int32. +func Int32(val string) (int32, error) { + i, err := strconv.ParseInt(val, 0, 32) + if err != nil { + return 0, err + } + return int32(i), nil +} + +// Uint64 converts the given string representation of an integer into uint64. +func Uint64(val string) (uint64, error) { + return strconv.ParseUint(val, 0, 64) +} + +// Uint32 converts the given string representation of an integer into uint32. +func Uint32(val string) (uint32, error) { + i, err := strconv.ParseUint(val, 0, 32) + if err != nil { + return 0, err + } + return uint32(i), nil +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go new file mode 100644 index 000000000..b6e5ddf7a --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/doc.go @@ -0,0 +1,5 @@ +/* +Package runtime contains runtime helper functions used by +servers which protoc-gen-grpc-gateway generates. +*/ +package runtime diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/errors.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/errors.go new file mode 100644 index 000000000..8eebdcf49 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/errors.go @@ -0,0 +1,127 @@ +package runtime + +import ( + "io" + "net/http" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// HTTPStatusFromCode converts a gRPC error code into the corresponding HTTP response status. +func HTTPStatusFromCode(code codes.Code) int { + switch code { + case codes.OK: + return http.StatusOK + case codes.Canceled: + return http.StatusRequestTimeout + case codes.Unknown: + return http.StatusInternalServerError + case codes.InvalidArgument: + return http.StatusBadRequest + case codes.DeadlineExceeded: + return http.StatusRequestTimeout + case codes.NotFound: + return http.StatusNotFound + case codes.AlreadyExists: + return http.StatusConflict + case codes.PermissionDenied: + return http.StatusForbidden + case codes.Unauthenticated: + return http.StatusUnauthorized + case codes.ResourceExhausted: + return http.StatusForbidden + case codes.FailedPrecondition: + return http.StatusPreconditionFailed + case codes.Aborted: + return http.StatusConflict + case codes.OutOfRange: + return http.StatusBadRequest + case codes.Unimplemented: + return http.StatusNotImplemented + case codes.Internal: + return http.StatusInternalServerError + case codes.Unavailable: + return http.StatusServiceUnavailable + case codes.DataLoss: + return http.StatusInternalServerError + } + + grpclog.Printf("Unknown gRPC error code: %v", code) + return http.StatusInternalServerError +} + +var ( + // HTTPError replies to the request with the error. + // You can set a custom function to this variable to customize error format. + HTTPError = DefaultHTTPError + // OtherErrorHandler handles the following error used by the gateway: StatusMethodNotAllowed StatusNotFound and StatusBadRequest + OtherErrorHandler = DefaultOtherErrorHandler +) + +type errorBody struct { + Error string `protobuf:"bytes,1,name=error" json:"error"` + Code int32 `protobuf:"varint,2,name=code" json:"code"` +} + +//Make this also conform to proto.Message for builtin JSONPb Marshaler +func (e *errorBody) Reset() { *e = errorBody{} } +func (e *errorBody) String() string { return proto.CompactTextString(e) } +func (*errorBody) ProtoMessage() {} + +// DefaultHTTPError is the default implementation of HTTPError. +// If "err" is an error from gRPC system, the function replies with the status code mapped by HTTPStatusFromCode. +// If otherwise, it replies with http.StatusInternalServerError. +// +// The response body returned by this function is a JSON object, +// which contains a member whose key is "error" and whose value is err.Error(). +func DefaultHTTPError(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, _ *http.Request, err error) { + const fallback = `{"error": "failed to marshal error message"}` + + w.Header().Del("Trailer") + w.Header().Set("Content-Type", marshaler.ContentType()) + + s, ok := status.FromError(err) + if !ok { + s = status.New(codes.Unknown, err.Error()) + } + + body := &errorBody{ + Error: s.Message(), + Code: int32(s.Code()), + } + + buf, merr := marshaler.Marshal(body) + if merr != nil { + grpclog.Printf("Failed to marshal error message %q: %v", body, merr) + w.WriteHeader(http.StatusInternalServerError) + if _, err := io.WriteString(w, fallback); err != nil { + grpclog.Printf("Failed to write response: %v", err) + } + return + } + + md, ok := ServerMetadataFromContext(ctx) + if !ok { + grpclog.Printf("Failed to extract ServerMetadata from context") + } + + handleForwardResponseServerMetadata(w, mux, md) + handleForwardResponseTrailerHeader(w, md) + st := HTTPStatusFromCode(s.Code()) + w.WriteHeader(st) + if _, err := w.Write(buf); err != nil { + grpclog.Printf("Failed to write response: %v", err) + } + + handleForwardResponseTrailer(w, md) +} + +// DefaultOtherErrorHandler is the default implementation of OtherErrorHandler. +// It simply writes a string representation of the given error into "w". +func DefaultOtherErrorHandler(w http.ResponseWriter, _ *http.Request, msg string, code int) { + http.Error(w, msg, code) +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/handler.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/handler.go new file mode 100644 index 000000000..ae6a5d551 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/handler.go @@ -0,0 +1,169 @@ +package runtime + +import ( + "fmt" + "io" + "net/http" + "net/textproto" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime/internal" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// ForwardResponseStream forwards the stream from gRPC server to REST client. +func ForwardResponseStream(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, req *http.Request, recv func() (proto.Message, error), opts ...func(context.Context, http.ResponseWriter, proto.Message) error) { + f, ok := w.(http.Flusher) + if !ok { + grpclog.Printf("Flush not supported in %T", w) + http.Error(w, "unexpected type of web server", http.StatusInternalServerError) + return + } + + md, ok := ServerMetadataFromContext(ctx) + if !ok { + grpclog.Printf("Failed to extract ServerMetadata from context") + http.Error(w, "unexpected error", http.StatusInternalServerError) + return + } + handleForwardResponseServerMetadata(w, mux, md) + + w.Header().Set("Transfer-Encoding", "chunked") + w.Header().Set("Content-Type", marshaler.ContentType()) + if err := handleForwardResponseOptions(ctx, w, nil, opts); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + w.WriteHeader(http.StatusOK) + f.Flush() + for { + resp, err := recv() + if err == io.EOF { + return + } + if err != nil { + handleForwardResponseStreamError(marshaler, w, err) + return + } + if err := handleForwardResponseOptions(ctx, w, resp, opts); err != nil { + handleForwardResponseStreamError(marshaler, w, err) + return + } + + buf, err := marshaler.Marshal(streamChunk(resp, nil)) + if err != nil { + grpclog.Printf("Failed to marshal response chunk: %v", err) + return + } + if _, err = w.Write(buf); err != nil { + grpclog.Printf("Failed to send response chunk: %v", err) + return + } + f.Flush() + } +} + +func handleForwardResponseServerMetadata(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) { + for k, vs := range md.HeaderMD { + if h, ok := mux.outgoingHeaderMatcher(k); ok { + for _, v := range vs { + w.Header().Add(h, v) + } + } + } +} + +func handleForwardResponseTrailerHeader(w http.ResponseWriter, md ServerMetadata) { + for k := range md.TrailerMD { + tKey := textproto.CanonicalMIMEHeaderKey(fmt.Sprintf("%s%s", MetadataTrailerPrefix, k)) + w.Header().Add("Trailer", tKey) + } +} + +func handleForwardResponseTrailer(w http.ResponseWriter, md ServerMetadata) { + for k, vs := range md.TrailerMD { + tKey := fmt.Sprintf("%s%s", MetadataTrailerPrefix, k) + for _, v := range vs { + w.Header().Add(tKey, v) + } + } +} + +// ForwardResponseMessage forwards the message "resp" from gRPC server to REST client. +func ForwardResponseMessage(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, req *http.Request, resp proto.Message, opts ...func(context.Context, http.ResponseWriter, proto.Message) error) { + md, ok := ServerMetadataFromContext(ctx) + if !ok { + grpclog.Printf("Failed to extract ServerMetadata from context") + } + + handleForwardResponseServerMetadata(w, mux, md) + handleForwardResponseTrailerHeader(w, md) + w.Header().Set("Content-Type", marshaler.ContentType()) + if err := handleForwardResponseOptions(ctx, w, resp, opts); err != nil { + HTTPError(ctx, mux, marshaler, w, req, err) + return + } + + buf, err := marshaler.Marshal(resp) + if err != nil { + grpclog.Printf("Marshal error: %v", err) + HTTPError(ctx, mux, marshaler, w, req, err) + return + } + + if _, err = w.Write(buf); err != nil { + grpclog.Printf("Failed to write response: %v", err) + } + + handleForwardResponseTrailer(w, md) +} + +func handleForwardResponseOptions(ctx context.Context, w http.ResponseWriter, resp proto.Message, opts []func(context.Context, http.ResponseWriter, proto.Message) error) error { + if len(opts) == 0 { + return nil + } + for _, opt := range opts { + if err := opt(ctx, w, resp); err != nil { + grpclog.Printf("Error handling ForwardResponseOptions: %v", err) + return err + } + } + return nil +} + +func handleForwardResponseStreamError(marshaler Marshaler, w http.ResponseWriter, err error) { + buf, merr := marshaler.Marshal(streamChunk(nil, err)) + if merr != nil { + grpclog.Printf("Failed to marshal an error: %v", merr) + return + } + if _, werr := fmt.Fprintf(w, "%s\n", buf); werr != nil { + grpclog.Printf("Failed to notify error to client: %v", werr) + return + } +} + +func streamChunk(result proto.Message, err error) map[string]proto.Message { + if err != nil { + grpcCode := codes.Unknown + if s, ok := status.FromError(err); ok { + grpcCode = s.Code() + } + httpCode := HTTPStatusFromCode(grpcCode) + return map[string]proto.Message{ + "error": &internal.StreamError{ + GrpcCode: int32(grpcCode), + HttpCode: int32(httpCode), + Message: err.Error(), + HttpStatus: http.StatusText(httpCode), + }, + } + } + if result == nil { + return streamChunk(nil, fmt.Errorf("empty response")) + } + return map[string]proto.Message{"result": result} +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.pb.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.pb.go new file mode 100644 index 000000000..44550f393 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.pb.go @@ -0,0 +1,92 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: runtime/internal/stream_chunk.proto + +/* +Package internal is a generated protocol buffer package. + +It is generated from these files: + runtime/internal/stream_chunk.proto + +It has these top-level messages: + StreamError +*/ +package internal + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// StreamError is a response type which is returned when +// streaming rpc returns an error. +type StreamError struct { + GrpcCode int32 `protobuf:"varint,1,opt,name=grpc_code,json=grpcCode" json:"grpc_code,omitempty"` + HttpCode int32 `protobuf:"varint,2,opt,name=http_code,json=httpCode" json:"http_code,omitempty"` + Message string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` + HttpStatus string `protobuf:"bytes,4,opt,name=http_status,json=httpStatus" json:"http_status,omitempty"` +} + +func (m *StreamError) Reset() { *m = StreamError{} } +func (m *StreamError) String() string { return proto.CompactTextString(m) } +func (*StreamError) ProtoMessage() {} +func (*StreamError) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *StreamError) GetGrpcCode() int32 { + if m != nil { + return m.GrpcCode + } + return 0 +} + +func (m *StreamError) GetHttpCode() int32 { + if m != nil { + return m.HttpCode + } + return 0 +} + +func (m *StreamError) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *StreamError) GetHttpStatus() string { + if m != nil { + return m.HttpStatus + } + return "" +} + +func init() { + proto.RegisterType((*StreamError)(nil), "grpc.gateway.runtime.StreamError") +} + +func init() { proto.RegisterFile("runtime/internal/stream_chunk.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 181 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x34, 0x8e, 0xbf, 0xee, 0x82, 0x30, + 0x14, 0x85, 0xd3, 0xdf, 0x1f, 0x85, 0xcb, 0x46, 0x1c, 0x9a, 0x38, 0x48, 0x74, 0x61, 0x82, 0xc1, + 0x37, 0xd0, 0xf8, 0x02, 0xb0, 0xb9, 0x90, 0x0a, 0x37, 0x40, 0x94, 0x96, 0xdc, 0x5e, 0x62, 0x5c, + 0x7d, 0x72, 0xd3, 0x22, 0xe3, 0xf9, 0xbe, 0x73, 0x92, 0x03, 0x07, 0x9a, 0x34, 0xf7, 0x03, 0xe6, + 0xbd, 0x66, 0x24, 0xad, 0x1e, 0xb9, 0x65, 0x42, 0x35, 0x54, 0x75, 0x37, 0xe9, 0x7b, 0x36, 0x92, + 0x61, 0x13, 0x6f, 0x5a, 0x1a, 0xeb, 0xac, 0x55, 0x8c, 0x4f, 0xf5, 0xca, 0xbe, 0x8b, 0xfd, 0x5b, + 0x40, 0x54, 0xfa, 0xf2, 0x85, 0xc8, 0x50, 0xbc, 0x85, 0xd0, 0xf5, 0xaa, 0xda, 0x34, 0x28, 0x45, + 0x22, 0xd2, 0xff, 0x22, 0x70, 0xe0, 0x6c, 0x1a, 0x74, 0xb2, 0x63, 0x1e, 0x67, 0xf9, 0x33, 0x4b, + 0x07, 0xbc, 0x94, 0xb0, 0x1e, 0xd0, 0x5a, 0xd5, 0xa2, 0xfc, 0x4d, 0x44, 0x1a, 0x16, 0x4b, 0x8c, + 0x77, 0x10, 0xf9, 0x99, 0x65, 0xc5, 0x93, 0x95, 0x7f, 0xde, 0x82, 0x43, 0xa5, 0x27, 0x27, 0xb8, + 0x06, 0xcb, 0xf3, 0xdb, 0xca, 0xbf, 0x3d, 0x7e, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x07, 0x92, + 0xb6, 0xd4, 0x00, 0x00, 0x00, +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto new file mode 100644 index 000000000..f7fba56c3 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/internal/stream_chunk.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package grpc.gateway.runtime; +option go_package = "internal"; + +// StreamError is a response type which is returned when +// streaming rpc returns an error. +message StreamError { + int32 grpc_code = 1; + int32 http_code = 2; + string message = 3; + string http_status = 4; +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go new file mode 100644 index 000000000..0acd2ca29 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_json.go @@ -0,0 +1,37 @@ +package runtime + +import ( + "encoding/json" + "io" +) + +// JSONBuiltin is a Marshaler which marshals/unmarshals into/from JSON +// with the standard "encoding/json" package of Golang. +// Although it is generally faster for simple proto messages than JSONPb, +// it does not support advanced features of protobuf, e.g. map, oneof, .... +type JSONBuiltin struct{} + +// ContentType always Returns "application/json". +func (*JSONBuiltin) ContentType() string { + return "application/json" +} + +// Marshal marshals "v" into JSON +func (j *JSONBuiltin) Marshal(v interface{}) ([]byte, error) { + return json.Marshal(v) +} + +// Unmarshal unmarshals JSON data into "v". +func (j *JSONBuiltin) Unmarshal(data []byte, v interface{}) error { + return json.Unmarshal(data, v) +} + +// NewDecoder returns a Decoder which reads JSON stream from "r". +func (j *JSONBuiltin) NewDecoder(r io.Reader) Decoder { + return json.NewDecoder(r) +} + +// NewEncoder returns an Encoder which writes JSON stream into "w". +func (j *JSONBuiltin) NewEncoder(w io.Writer) Encoder { + return json.NewEncoder(w) +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_jsonpb.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_jsonpb.go new file mode 100644 index 000000000..49f13f7fc --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshal_jsonpb.go @@ -0,0 +1,184 @@ +package runtime + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "reflect" + + "github.com/golang/protobuf/jsonpb" + "github.com/golang/protobuf/proto" +) + +// JSONPb is a Marshaler which marshals/unmarshals into/from JSON +// with the "github.com/golang/protobuf/jsonpb". +// It supports fully functionality of protobuf unlike JSONBuiltin. +type JSONPb jsonpb.Marshaler + +// ContentType always returns "application/json". +func (*JSONPb) ContentType() string { + return "application/json" +} + +// Marshal marshals "v" into JSON +// Currently it can marshal only proto.Message. +// TODO(yugui) Support fields of primitive types in a message. +func (j *JSONPb) Marshal(v interface{}) ([]byte, error) { + if _, ok := v.(proto.Message); !ok { + return j.marshalNonProtoField(v) + } + + var buf bytes.Buffer + if err := j.marshalTo(&buf, v); err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +func (j *JSONPb) marshalTo(w io.Writer, v interface{}) error { + p, ok := v.(proto.Message) + if !ok { + buf, err := j.marshalNonProtoField(v) + if err != nil { + return err + } + _, err = w.Write(buf) + return err + } + return (*jsonpb.Marshaler)(j).Marshal(w, p) +} + +// marshalNonProto marshals a non-message field of a protobuf message. +// This function does not correctly marshals arbitary data structure into JSON, +// but it is only capable of marshaling non-message field values of protobuf, +// i.e. primitive types, enums; pointers to primitives or enums; maps from +// integer/string types to primitives/enums/pointers to messages. +func (j *JSONPb) marshalNonProtoField(v interface{}) ([]byte, error) { + rv := reflect.ValueOf(v) + for rv.Kind() == reflect.Ptr { + if rv.IsNil() { + return []byte("null"), nil + } + rv = rv.Elem() + } + + if rv.Kind() == reflect.Map { + m := make(map[string]*json.RawMessage) + for _, k := range rv.MapKeys() { + buf, err := j.Marshal(rv.MapIndex(k).Interface()) + if err != nil { + return nil, err + } + m[fmt.Sprintf("%v", k.Interface())] = (*json.RawMessage)(&buf) + } + if j.Indent != "" { + return json.MarshalIndent(m, "", j.Indent) + } + return json.Marshal(m) + } + if enum, ok := rv.Interface().(protoEnum); ok && !j.EnumsAsInts { + return json.Marshal(enum.String()) + } + return json.Marshal(rv.Interface()) +} + +// Unmarshal unmarshals JSON "data" into "v" +// Currently it can marshal only proto.Message. +// TODO(yugui) Support fields of primitive types in a message. +func (j *JSONPb) Unmarshal(data []byte, v interface{}) error { + return unmarshalJSONPb(data, v) +} + +// NewDecoder returns a Decoder which reads JSON stream from "r". +func (j *JSONPb) NewDecoder(r io.Reader) Decoder { + d := json.NewDecoder(r) + return DecoderFunc(func(v interface{}) error { return decodeJSONPb(d, v) }) +} + +// NewEncoder returns an Encoder which writes JSON stream into "w". +func (j *JSONPb) NewEncoder(w io.Writer) Encoder { + return EncoderFunc(func(v interface{}) error { return j.marshalTo(w, v) }) +} + +func unmarshalJSONPb(data []byte, v interface{}) error { + d := json.NewDecoder(bytes.NewReader(data)) + return decodeJSONPb(d, v) +} + +func decodeJSONPb(d *json.Decoder, v interface{}) error { + p, ok := v.(proto.Message) + if !ok { + return decodeNonProtoField(d, v) + } + unmarshaler := &jsonpb.Unmarshaler{AllowUnknownFields: true} + return unmarshaler.UnmarshalNext(d, p) +} + +func decodeNonProtoField(d *json.Decoder, v interface{}) error { + rv := reflect.ValueOf(v) + if rv.Kind() != reflect.Ptr { + return fmt.Errorf("%T is not a pointer", v) + } + for rv.Kind() == reflect.Ptr { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + if rv.Type().ConvertibleTo(typeProtoMessage) { + unmarshaler := &jsonpb.Unmarshaler{AllowUnknownFields: true} + return unmarshaler.UnmarshalNext(d, rv.Interface().(proto.Message)) + } + rv = rv.Elem() + } + if rv.Kind() == reflect.Map { + if rv.IsNil() { + rv.Set(reflect.MakeMap(rv.Type())) + } + conv, ok := convFromType[rv.Type().Key().Kind()] + if !ok { + return fmt.Errorf("unsupported type of map field key: %v", rv.Type().Key()) + } + + m := make(map[string]*json.RawMessage) + if err := d.Decode(&m); err != nil { + return err + } + for k, v := range m { + result := conv.Call([]reflect.Value{reflect.ValueOf(k)}) + if err := result[1].Interface(); err != nil { + return err.(error) + } + bk := result[0] + bv := reflect.New(rv.Type().Elem()) + if err := unmarshalJSONPb([]byte(*v), bv.Interface()); err != nil { + return err + } + rv.SetMapIndex(bk, bv.Elem()) + } + return nil + } + if _, ok := rv.Interface().(protoEnum); ok { + var repr interface{} + if err := d.Decode(&repr); err != nil { + return err + } + switch repr.(type) { + case string: + // TODO(yugui) Should use proto.StructProperties? + return fmt.Errorf("unmarshaling of symbolic enum %q not supported: %T", repr, rv.Interface()) + case float64: + rv.Set(reflect.ValueOf(int32(repr.(float64))).Convert(rv.Type())) + return nil + default: + return fmt.Errorf("cannot assign %#v into Go type %T", repr, rv.Interface()) + } + } + return d.Decode(v) +} + +type protoEnum interface { + fmt.Stringer + EnumDescriptor() ([]byte, []int) +} + +var typeProtoMessage = reflect.TypeOf((*proto.Message)(nil)).Elem() diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler.go new file mode 100644 index 000000000..6d434f13c --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler.go @@ -0,0 +1,42 @@ +package runtime + +import ( + "io" +) + +// Marshaler defines a conversion between byte sequence and gRPC payloads / fields. +type Marshaler interface { + // Marshal marshals "v" into byte sequence. + Marshal(v interface{}) ([]byte, error) + // Unmarshal unmarshals "data" into "v". + // "v" must be a pointer value. + Unmarshal(data []byte, v interface{}) error + // NewDecoder returns a Decoder which reads byte sequence from "r". + NewDecoder(r io.Reader) Decoder + // NewEncoder returns an Encoder which writes bytes sequence into "w". + NewEncoder(w io.Writer) Encoder + // ContentType returns the Content-Type which this marshaler is responsible for. + ContentType() string +} + +// Decoder decodes a byte sequence +type Decoder interface { + Decode(v interface{}) error +} + +// Encoder encodes gRPC payloads / fields into byte sequence. +type Encoder interface { + Encode(v interface{}) error +} + +// DecoderFunc adapts an decoder function into Decoder. +type DecoderFunc func(v interface{}) error + +// Decode delegates invocations to the underlying function itself. +func (f DecoderFunc) Decode(v interface{}) error { return f(v) } + +// EncoderFunc adapts an encoder function into Encoder +type EncoderFunc func(v interface{}) error + +// Encode delegates invocations to the underlying function itself. +func (f EncoderFunc) Encode(v interface{}) error { return f(v) } diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler_registry.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler_registry.go new file mode 100644 index 000000000..928f07332 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/marshaler_registry.go @@ -0,0 +1,91 @@ +package runtime + +import ( + "errors" + "net/http" +) + +// MIMEWildcard is the fallback MIME type used for requests which do not match +// a registered MIME type. +const MIMEWildcard = "*" + +var ( + acceptHeader = http.CanonicalHeaderKey("Accept") + contentTypeHeader = http.CanonicalHeaderKey("Content-Type") + + defaultMarshaler = &JSONPb{OrigName: true} +) + +// MarshalerForRequest returns the inbound/outbound marshalers for this request. +// It checks the registry on the ServeMux for the MIME type set by the Content-Type header. +// If it isn't set (or the request Content-Type is empty), checks for "*". +// If there are multiple Content-Type headers set, choose the first one that it can +// exactly match in the registry. +// Otherwise, it follows the above logic for "*"/InboundMarshaler/OutboundMarshaler. +func MarshalerForRequest(mux *ServeMux, r *http.Request) (inbound Marshaler, outbound Marshaler) { + for _, acceptVal := range r.Header[acceptHeader] { + if m, ok := mux.marshalers.mimeMap[acceptVal]; ok { + outbound = m + break + } + } + + for _, contentTypeVal := range r.Header[contentTypeHeader] { + if m, ok := mux.marshalers.mimeMap[contentTypeVal]; ok { + inbound = m + break + } + } + + if inbound == nil { + inbound = mux.marshalers.mimeMap[MIMEWildcard] + } + if outbound == nil { + outbound = inbound + } + + return inbound, outbound +} + +// marshalerRegistry is a mapping from MIME types to Marshalers. +type marshalerRegistry struct { + mimeMap map[string]Marshaler +} + +// add adds a marshaler for a case-sensitive MIME type string ("*" to match any +// MIME type). +func (m marshalerRegistry) add(mime string, marshaler Marshaler) error { + if len(mime) == 0 { + return errors.New("empty MIME type") + } + + m.mimeMap[mime] = marshaler + + return nil +} + +// makeMarshalerMIMERegistry returns a new registry of marshalers. +// It allows for a mapping of case-sensitive Content-Type MIME type string to runtime.Marshaler interfaces. +// +// For example, you could allow the client to specify the use of the runtime.JSONPb marshaler +// with a "applicaton/jsonpb" Content-Type and the use of the runtime.JSONBuiltin marshaler +// with a "application/json" Content-Type. +// "*" can be used to match any Content-Type. +// This can be attached to a ServerMux with the marshaler option. +func makeMarshalerMIMERegistry() marshalerRegistry { + return marshalerRegistry{ + mimeMap: map[string]Marshaler{ + MIMEWildcard: defaultMarshaler, + }, + } +} + +// WithMarshalerOption returns a ServeMuxOption which associates inbound and outbound +// Marshalers to a MIME type in mux. +func WithMarshalerOption(mime string, marshaler Marshaler) ServeMuxOption { + return func(mux *ServeMux) { + if err := mux.marshalers.add(mime, marshaler); err != nil { + panic(err) + } + } +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/mux.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/mux.go new file mode 100644 index 000000000..205bc4309 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/mux.go @@ -0,0 +1,260 @@ +package runtime + +import ( + "fmt" + "net/http" + "net/textproto" + "strings" + + "github.com/golang/protobuf/proto" + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// A HandlerFunc handles a specific pair of path pattern and HTTP method. +type HandlerFunc func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) + +// ServeMux is a request multiplexer for grpc-gateway. +// It matches http requests to patterns and invokes the corresponding handler. +type ServeMux struct { + // handlers maps HTTP method to a list of handlers. + handlers map[string][]handler + forwardResponseOptions []func(context.Context, http.ResponseWriter, proto.Message) error + marshalers marshalerRegistry + incomingHeaderMatcher HeaderMatcherFunc + outgoingHeaderMatcher HeaderMatcherFunc + metadataAnnotator func(context.Context, *http.Request) metadata.MD + protoErrorHandler ProtoErrorHandlerFunc +} + +// ServeMuxOption is an option that can be given to a ServeMux on construction. +type ServeMuxOption func(*ServeMux) + +// WithForwardResponseOption returns a ServeMuxOption representing the forwardResponseOption. +// +// forwardResponseOption is an option that will be called on the relevant context.Context, +// http.ResponseWriter, and proto.Message before every forwarded response. +// +// The message may be nil in the case where just a header is being sent. +func WithForwardResponseOption(forwardResponseOption func(context.Context, http.ResponseWriter, proto.Message) error) ServeMuxOption { + return func(serveMux *ServeMux) { + serveMux.forwardResponseOptions = append(serveMux.forwardResponseOptions, forwardResponseOption) + } +} + +// HeaderMatcherFunc checks whether a header key should be forwarded to/from gRPC context. +type HeaderMatcherFunc func(string) (string, bool) + +// DefaultHeaderMatcher is used to pass http request headers to/from gRPC context. This adds permanent HTTP header +// keys (as specified by the IANA) to gRPC context with grpcgateway- prefix. HTTP headers that start with +// 'Grpc-Metadata-' are mapped to gRPC metadata after removing prefix 'Grpc-Metadata-'. +func DefaultHeaderMatcher(key string) (string, bool) { + key = textproto.CanonicalMIMEHeaderKey(key) + if isPermanentHTTPHeader(key) { + return MetadataPrefix + key, true + } else if strings.HasPrefix(key, MetadataHeaderPrefix) { + return key[len(MetadataHeaderPrefix):], true + } + return "", false +} + +// WithIncomingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for incoming request to gateway. +// +// This matcher will be called with each header in http.Request. If matcher returns true, that header will be +// passed to gRPC context. To transform the header before passing to gRPC context, matcher should return modified header. +func WithIncomingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption { + return func(mux *ServeMux) { + mux.incomingHeaderMatcher = fn + } +} + +// WithOutgoingHeaderMatcher returns a ServeMuxOption representing a headerMatcher for outgoing response from gateway. +// +// This matcher will be called with each header in response header metadata. If matcher returns true, that header will be +// passed to http response returned from gateway. To transform the header before passing to response, +// matcher should return modified header. +func WithOutgoingHeaderMatcher(fn HeaderMatcherFunc) ServeMuxOption { + return func(mux *ServeMux) { + mux.outgoingHeaderMatcher = fn + } +} + +// WithMetadata returns a ServeMuxOption for passing metadata to a gRPC context. +// +// This can be used by services that need to read from http.Request and modify gRPC context. A common use case +// is reading token from cookie and adding it in gRPC context. +func WithMetadata(annotator func(context.Context, *http.Request) metadata.MD) ServeMuxOption { + return func(serveMux *ServeMux) { + serveMux.metadataAnnotator = annotator + } +} + +// WithProtoErrorHandler returns a ServeMuxOption for passing metadata to a gRPC context. +// +// This can be used to handle an error as general proto message defined by gRPC. +// The response including body and status is not backward compatible with the default error handler. +// When this option is used, HTTPError and OtherErrorHandler are overwritten on initialization. +func WithProtoErrorHandler(fn ProtoErrorHandlerFunc) ServeMuxOption { + return func(serveMux *ServeMux) { + serveMux.protoErrorHandler = fn + } +} + +// NewServeMux returns a new ServeMux whose internal mapping is empty. +func NewServeMux(opts ...ServeMuxOption) *ServeMux { + serveMux := &ServeMux{ + handlers: make(map[string][]handler), + forwardResponseOptions: make([]func(context.Context, http.ResponseWriter, proto.Message) error, 0), + marshalers: makeMarshalerMIMERegistry(), + } + + for _, opt := range opts { + opt(serveMux) + } + + if serveMux.protoErrorHandler != nil { + HTTPError = serveMux.protoErrorHandler + // OtherErrorHandler is no longer used when protoErrorHandler is set. + // Overwritten by a special error handler to return Unknown. + OtherErrorHandler = func(w http.ResponseWriter, r *http.Request, _ string, _ int) { + ctx := context.Background() + _, outboundMarshaler := MarshalerForRequest(serveMux, r) + sterr := status.Error(codes.Unknown, "unexpected use of OtherErrorHandler") + serveMux.protoErrorHandler(ctx, serveMux, outboundMarshaler, w, r, sterr) + } + } + + if serveMux.incomingHeaderMatcher == nil { + serveMux.incomingHeaderMatcher = DefaultHeaderMatcher + } + + if serveMux.outgoingHeaderMatcher == nil { + serveMux.outgoingHeaderMatcher = func(key string) (string, bool) { + return fmt.Sprintf("%s%s", MetadataHeaderPrefix, key), true + } + } + + return serveMux +} + +// Handle associates "h" to the pair of HTTP method and path pattern. +func (s *ServeMux) Handle(meth string, pat Pattern, h HandlerFunc) { + s.handlers[meth] = append(s.handlers[meth], handler{pat: pat, h: h}) +} + +// ServeHTTP dispatches the request to the first handler whose pattern matches to r.Method and r.Path. +func (s *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + + path := r.URL.Path + if !strings.HasPrefix(path, "/") { + if s.protoErrorHandler != nil { + _, outboundMarshaler := MarshalerForRequest(s, r) + sterr := status.Error(codes.InvalidArgument, http.StatusText(http.StatusBadRequest)) + s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr) + } else { + OtherErrorHandler(w, r, http.StatusText(http.StatusBadRequest), http.StatusBadRequest) + } + return + } + + components := strings.Split(path[1:], "/") + l := len(components) + var verb string + if idx := strings.LastIndex(components[l-1], ":"); idx == 0 { + if s.protoErrorHandler != nil { + _, outboundMarshaler := MarshalerForRequest(s, r) + sterr := status.Error(codes.Unimplemented, http.StatusText(http.StatusNotImplemented)) + s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr) + } else { + OtherErrorHandler(w, r, http.StatusText(http.StatusNotFound), http.StatusNotFound) + } + return + } else if idx > 0 { + c := components[l-1] + components[l-1], verb = c[:idx], c[idx+1:] + } + + if override := r.Header.Get("X-HTTP-Method-Override"); override != "" && isPathLengthFallback(r) { + r.Method = strings.ToUpper(override) + if err := r.ParseForm(); err != nil { + if s.protoErrorHandler != nil { + _, outboundMarshaler := MarshalerForRequest(s, r) + sterr := status.Error(codes.InvalidArgument, err.Error()) + s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr) + } else { + OtherErrorHandler(w, r, err.Error(), http.StatusBadRequest) + } + return + } + } + for _, h := range s.handlers[r.Method] { + pathParams, err := h.pat.Match(components, verb) + if err != nil { + continue + } + h.h(w, r, pathParams) + return + } + + // lookup other methods to handle fallback from GET to POST and + // to determine if it is MethodNotAllowed or NotFound. + for m, handlers := range s.handlers { + if m == r.Method { + continue + } + for _, h := range handlers { + pathParams, err := h.pat.Match(components, verb) + if err != nil { + continue + } + // X-HTTP-Method-Override is optional. Always allow fallback to POST. + if isPathLengthFallback(r) { + if err := r.ParseForm(); err != nil { + if s.protoErrorHandler != nil { + _, outboundMarshaler := MarshalerForRequest(s, r) + sterr := status.Error(codes.InvalidArgument, err.Error()) + s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr) + } else { + OtherErrorHandler(w, r, err.Error(), http.StatusBadRequest) + } + return + } + h.h(w, r, pathParams) + return + } + if s.protoErrorHandler != nil { + _, outboundMarshaler := MarshalerForRequest(s, r) + sterr := status.Error(codes.Unimplemented, http.StatusText(http.StatusMethodNotAllowed)) + s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr) + } else { + OtherErrorHandler(w, r, http.StatusText(http.StatusMethodNotAllowed), http.StatusMethodNotAllowed) + } + return + } + } + + if s.protoErrorHandler != nil { + _, outboundMarshaler := MarshalerForRequest(s, r) + sterr := status.Error(codes.Unimplemented, http.StatusText(http.StatusNotImplemented)) + s.protoErrorHandler(ctx, s, outboundMarshaler, w, r, sterr) + } else { + OtherErrorHandler(w, r, http.StatusText(http.StatusNotFound), http.StatusNotFound) + } +} + +// GetForwardResponseOptions returns the ForwardResponseOptions associated with this ServeMux. +func (s *ServeMux) GetForwardResponseOptions() []func(context.Context, http.ResponseWriter, proto.Message) error { + return s.forwardResponseOptions +} + +func isPathLengthFallback(r *http.Request) bool { + return r.Method == "POST" && r.Header.Get("Content-Type") == "application/x-www-form-urlencoded" +} + +type handler struct { + pat Pattern + h HandlerFunc +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/pattern.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/pattern.go new file mode 100644 index 000000000..8a9ec2cda --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/pattern.go @@ -0,0 +1,227 @@ +package runtime + +import ( + "errors" + "fmt" + "strings" + + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc/grpclog" +) + +var ( + // ErrNotMatch indicates that the given HTTP request path does not match to the pattern. + ErrNotMatch = errors.New("not match to the path pattern") + // ErrInvalidPattern indicates that the given definition of Pattern is not valid. + ErrInvalidPattern = errors.New("invalid pattern") +) + +type op struct { + code utilities.OpCode + operand int +} + +// Pattern is a template pattern of http request paths defined in github.com/googleapis/googleapis/google/api/http.proto. +type Pattern struct { + // ops is a list of operations + ops []op + // pool is a constant pool indexed by the operands or vars. + pool []string + // vars is a list of variables names to be bound by this pattern + vars []string + // stacksize is the max depth of the stack + stacksize int + // tailLen is the length of the fixed-size segments after a deep wildcard + tailLen int + // verb is the VERB part of the path pattern. It is empty if the pattern does not have VERB part. + verb string +} + +// NewPattern returns a new Pattern from the given definition values. +// "ops" is a sequence of op codes. "pool" is a constant pool. +// "verb" is the verb part of the pattern. It is empty if the pattern does not have the part. +// "version" must be 1 for now. +// It returns an error if the given definition is invalid. +func NewPattern(version int, ops []int, pool []string, verb string) (Pattern, error) { + if version != 1 { + grpclog.Printf("unsupported version: %d", version) + return Pattern{}, ErrInvalidPattern + } + + l := len(ops) + if l%2 != 0 { + grpclog.Printf("odd number of ops codes: %d", l) + return Pattern{}, ErrInvalidPattern + } + + var ( + typedOps []op + stack, maxstack int + tailLen int + pushMSeen bool + vars []string + ) + for i := 0; i < l; i += 2 { + op := op{code: utilities.OpCode(ops[i]), operand: ops[i+1]} + switch op.code { + case utilities.OpNop: + continue + case utilities.OpPush: + if pushMSeen { + tailLen++ + } + stack++ + case utilities.OpPushM: + if pushMSeen { + grpclog.Printf("pushM appears twice") + return Pattern{}, ErrInvalidPattern + } + pushMSeen = true + stack++ + case utilities.OpLitPush: + if op.operand < 0 || len(pool) <= op.operand { + grpclog.Printf("negative literal index: %d", op.operand) + return Pattern{}, ErrInvalidPattern + } + if pushMSeen { + tailLen++ + } + stack++ + case utilities.OpConcatN: + if op.operand <= 0 { + grpclog.Printf("negative concat size: %d", op.operand) + return Pattern{}, ErrInvalidPattern + } + stack -= op.operand + if stack < 0 { + grpclog.Print("stack underflow") + return Pattern{}, ErrInvalidPattern + } + stack++ + case utilities.OpCapture: + if op.operand < 0 || len(pool) <= op.operand { + grpclog.Printf("variable name index out of bound: %d", op.operand) + return Pattern{}, ErrInvalidPattern + } + v := pool[op.operand] + op.operand = len(vars) + vars = append(vars, v) + stack-- + if stack < 0 { + grpclog.Printf("stack underflow") + return Pattern{}, ErrInvalidPattern + } + default: + grpclog.Printf("invalid opcode: %d", op.code) + return Pattern{}, ErrInvalidPattern + } + + if maxstack < stack { + maxstack = stack + } + typedOps = append(typedOps, op) + } + return Pattern{ + ops: typedOps, + pool: pool, + vars: vars, + stacksize: maxstack, + tailLen: tailLen, + verb: verb, + }, nil +} + +// MustPattern is a helper function which makes it easier to call NewPattern in variable initialization. +func MustPattern(p Pattern, err error) Pattern { + if err != nil { + grpclog.Fatalf("Pattern initialization failed: %v", err) + } + return p +} + +// Match examines components if it matches to the Pattern. +// If it matches, the function returns a mapping from field paths to their captured values. +// If otherwise, the function returns an error. +func (p Pattern) Match(components []string, verb string) (map[string]string, error) { + if p.verb != verb { + return nil, ErrNotMatch + } + + var pos int + stack := make([]string, 0, p.stacksize) + captured := make([]string, len(p.vars)) + l := len(components) + for _, op := range p.ops { + switch op.code { + case utilities.OpNop: + continue + case utilities.OpPush, utilities.OpLitPush: + if pos >= l { + return nil, ErrNotMatch + } + c := components[pos] + if op.code == utilities.OpLitPush { + if lit := p.pool[op.operand]; c != lit { + return nil, ErrNotMatch + } + } + stack = append(stack, c) + pos++ + case utilities.OpPushM: + end := len(components) + if end < pos+p.tailLen { + return nil, ErrNotMatch + } + end -= p.tailLen + stack = append(stack, strings.Join(components[pos:end], "/")) + pos = end + case utilities.OpConcatN: + n := op.operand + l := len(stack) - n + stack = append(stack[:l], strings.Join(stack[l:], "/")) + case utilities.OpCapture: + n := len(stack) - 1 + captured[op.operand] = stack[n] + stack = stack[:n] + } + } + if pos < l { + return nil, ErrNotMatch + } + bindings := make(map[string]string) + for i, val := range captured { + bindings[p.vars[i]] = val + } + return bindings, nil +} + +// Verb returns the verb part of the Pattern. +func (p Pattern) Verb() string { return p.verb } + +func (p Pattern) String() string { + var stack []string + for _, op := range p.ops { + switch op.code { + case utilities.OpNop: + continue + case utilities.OpPush: + stack = append(stack, "*") + case utilities.OpLitPush: + stack = append(stack, p.pool[op.operand]) + case utilities.OpPushM: + stack = append(stack, "**") + case utilities.OpConcatN: + n := op.operand + l := len(stack) - n + stack = append(stack[:l], strings.Join(stack[l:], "/")) + case utilities.OpCapture: + n := len(stack) - 1 + stack[n] = fmt.Sprintf("{%s=%s}", p.vars[op.operand], stack[n]) + } + } + segs := strings.Join(stack, "/") + if p.verb != "" { + return fmt.Sprintf("/%s:%s", segs, p.verb) + } + return "/" + segs +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto2_convert.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto2_convert.go new file mode 100644 index 000000000..a3151e2a5 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto2_convert.go @@ -0,0 +1,80 @@ +package runtime + +import ( + "github.com/golang/protobuf/proto" +) + +// StringP returns a pointer to a string whose pointee is same as the given string value. +func StringP(val string) (*string, error) { + return proto.String(val), nil +} + +// BoolP parses the given string representation of a boolean value, +// and returns a pointer to a bool whose value is same as the parsed value. +func BoolP(val string) (*bool, error) { + b, err := Bool(val) + if err != nil { + return nil, err + } + return proto.Bool(b), nil +} + +// Float64P parses the given string representation of a floating point number, +// and returns a pointer to a float64 whose value is same as the parsed number. +func Float64P(val string) (*float64, error) { + f, err := Float64(val) + if err != nil { + return nil, err + } + return proto.Float64(f), nil +} + +// Float32P parses the given string representation of a floating point number, +// and returns a pointer to a float32 whose value is same as the parsed number. +func Float32P(val string) (*float32, error) { + f, err := Float32(val) + if err != nil { + return nil, err + } + return proto.Float32(f), nil +} + +// Int64P parses the given string representation of an integer +// and returns a pointer to a int64 whose value is same as the parsed integer. +func Int64P(val string) (*int64, error) { + i, err := Int64(val) + if err != nil { + return nil, err + } + return proto.Int64(i), nil +} + +// Int32P parses the given string representation of an integer +// and returns a pointer to a int32 whose value is same as the parsed integer. +func Int32P(val string) (*int32, error) { + i, err := Int32(val) + if err != nil { + return nil, err + } + return proto.Int32(i), err +} + +// Uint64P parses the given string representation of an integer +// and returns a pointer to a uint64 whose value is same as the parsed integer. +func Uint64P(val string) (*uint64, error) { + i, err := Uint64(val) + if err != nil { + return nil, err + } + return proto.Uint64(i), err +} + +// Uint32P parses the given string representation of an integer +// and returns a pointer to a uint32 whose value is same as the parsed integer. +func Uint32P(val string) (*uint32, error) { + i, err := Uint32(val) + if err != nil { + return nil, err + } + return proto.Uint32(i), err +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto_errors.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto_errors.go new file mode 100644 index 000000000..b1b089273 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/proto_errors.go @@ -0,0 +1,61 @@ +package runtime + +import ( + "io" + "net/http" + + "golang.org/x/net/context" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/status" +) + +// ProtoErrorHandlerFunc handles the error as a gRPC error generated via status package and replies to the request. +type ProtoErrorHandlerFunc func(context.Context, *ServeMux, Marshaler, http.ResponseWriter, *http.Request, error) + +var _ ProtoErrorHandlerFunc = DefaultHTTPProtoErrorHandler + +// DefaultHTTPProtoErrorHandler is an implementation of HTTPError. +// If "err" is an error from gRPC system, the function replies with the status code mapped by HTTPStatusFromCode. +// If otherwise, it replies with http.StatusInternalServerError. +// +// The response body returned by this function is a Status message marshaled by a Marshaler. +// +// Do not set this function to HTTPError variable directly, use WithProtoErrorHandler option instead. +func DefaultHTTPProtoErrorHandler(ctx context.Context, mux *ServeMux, marshaler Marshaler, w http.ResponseWriter, _ *http.Request, err error) { + // return Internal when Marshal failed + const fallback = `{"code": 13, "message": "failed to marshal error message"}` + + w.Header().Del("Trailer") + w.Header().Set("Content-Type", marshaler.ContentType()) + + s, ok := status.FromError(err) + if !ok { + s = status.New(codes.Unknown, err.Error()) + } + + buf, merr := marshaler.Marshal(s.Proto()) + if merr != nil { + grpclog.Printf("Failed to marshal error message %q: %v", s.Proto(), merr) + w.WriteHeader(http.StatusInternalServerError) + if _, err := io.WriteString(w, fallback); err != nil { + grpclog.Printf("Failed to write response: %v", err) + } + return + } + + md, ok := ServerMetadataFromContext(ctx) + if !ok { + grpclog.Printf("Failed to extract ServerMetadata from context") + } + + handleForwardResponseServerMetadata(w, mux, md) + handleForwardResponseTrailerHeader(w, md) + st := HTTPStatusFromCode(s.Code()) + w.WriteHeader(st) + if _, err := w.Write(buf); err != nil { + grpclog.Printf("Failed to write response: %v", err) + } + + handleForwardResponseTrailer(w, md) +} diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/query.go b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/query.go new file mode 100644 index 000000000..c00e0b914 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/runtime/query.go @@ -0,0 +1,279 @@ +package runtime + +import ( + "fmt" + "net/url" + "reflect" + "strconv" + "strings" + "time" + + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc/grpclog" +) + +// PopulateQueryParameters populates "values" into "msg". +// A value is ignored if its key starts with one of the elements in "filter". +func PopulateQueryParameters(msg proto.Message, values url.Values, filter *utilities.DoubleArray) error { + for key, values := range values { + fieldPath := strings.Split(key, ".") + if filter.HasCommonPrefix(fieldPath) { + continue + } + if err := populateFieldValueFromPath(msg, fieldPath, values); err != nil { + return err + } + } + return nil +} + +// PopulateFieldFromPath sets a value in a nested Protobuf structure. +// It instantiates missing protobuf fields as it goes. +func PopulateFieldFromPath(msg proto.Message, fieldPathString string, value string) error { + fieldPath := strings.Split(fieldPathString, ".") + return populateFieldValueFromPath(msg, fieldPath, []string{value}) +} + +func populateFieldValueFromPath(msg proto.Message, fieldPath []string, values []string) error { + m := reflect.ValueOf(msg) + if m.Kind() != reflect.Ptr { + return fmt.Errorf("unexpected type %T: %v", msg, msg) + } + var props *proto.Properties + m = m.Elem() + for i, fieldName := range fieldPath { + isLast := i == len(fieldPath)-1 + if !isLast && m.Kind() != reflect.Struct { + return fmt.Errorf("non-aggregate type in the mid of path: %s", strings.Join(fieldPath, ".")) + } + var f reflect.Value + var err error + f, props, err = fieldByProtoName(m, fieldName) + if err != nil { + return err + } else if !f.IsValid() { + grpclog.Printf("field not found in %T: %s", msg, strings.Join(fieldPath, ".")) + return nil + } + + switch f.Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, reflect.String, reflect.Uint32, reflect.Uint64: + if !isLast { + return fmt.Errorf("unexpected nested field %s in %s", fieldPath[i+1], strings.Join(fieldPath[:i+1], ".")) + } + m = f + case reflect.Slice: + // TODO(yugui) Support []byte + if !isLast { + return fmt.Errorf("unexpected repeated field in %s", strings.Join(fieldPath, ".")) + } + return populateRepeatedField(f, values, props) + case reflect.Ptr: + if f.IsNil() { + m = reflect.New(f.Type().Elem()) + f.Set(m.Convert(f.Type())) + } + m = f.Elem() + continue + case reflect.Struct: + m = f + continue + default: + return fmt.Errorf("unexpected type %s in %T", f.Type(), msg) + } + } + switch len(values) { + case 0: + return fmt.Errorf("no value of field: %s", strings.Join(fieldPath, ".")) + case 1: + default: + grpclog.Printf("too many field values: %s", strings.Join(fieldPath, ".")) + } + return populateField(m, values[0], props) +} + +// fieldByProtoName looks up a field whose corresponding protobuf field name is "name". +// "m" must be a struct value. It returns zero reflect.Value if no such field found. +func fieldByProtoName(m reflect.Value, name string) (reflect.Value, *proto.Properties, error) { + props := proto.GetProperties(m.Type()) + + // look up field name in oneof map + if op, ok := props.OneofTypes[name]; ok { + v := reflect.New(op.Type.Elem()) + field := m.Field(op.Field) + if !field.IsNil() { + return reflect.Value{}, nil, fmt.Errorf("field already set for %s oneof", props.Prop[op.Field].OrigName) + } + field.Set(v) + return v.Elem().Field(0), op.Prop, nil + } + + for _, p := range props.Prop { + if p.OrigName == name { + return m.FieldByName(p.Name), p, nil + } + if p.JSONName == name { + return m.FieldByName(p.Name), p, nil + } + } + return reflect.Value{}, nil, nil +} + +func populateRepeatedField(f reflect.Value, values []string, props *proto.Properties) error { + elemType := f.Type().Elem() + + // is the destination field a slice of an enumeration type? + if enumValMap := proto.EnumValueMap(props.Enum); enumValMap != nil { + return populateFieldEnumRepeated(f, values, enumValMap) + } + + conv, ok := convFromType[elemType.Kind()] + if !ok { + return fmt.Errorf("unsupported field type %s", elemType) + } + f.Set(reflect.MakeSlice(f.Type(), len(values), len(values)).Convert(f.Type())) + for i, v := range values { + result := conv.Call([]reflect.Value{reflect.ValueOf(v)}) + if err := result[1].Interface(); err != nil { + return err.(error) + } + f.Index(i).Set(result[0].Convert(f.Index(i).Type())) + } + return nil +} + +func populateField(f reflect.Value, value string, props *proto.Properties) error { + // Handle well known type + type wkt interface { + XXX_WellKnownType() string + } + if wkt, ok := f.Addr().Interface().(wkt); ok { + switch wkt.XXX_WellKnownType() { + case "Timestamp": + if value == "null" { + f.Field(0).SetInt(0) + f.Field(1).SetInt(0) + return nil + } + + t, err := time.Parse(time.RFC3339Nano, value) + if err != nil { + return fmt.Errorf("bad Timestamp: %v", err) + } + f.Field(0).SetInt(int64(t.Unix())) + f.Field(1).SetInt(int64(t.Nanosecond())) + return nil + case "DoubleValue": + fallthrough + case "FloatValue": + float64Val, err := strconv.ParseFloat(value, 64) + if err != nil { + return fmt.Errorf("bad DoubleValue: %s", value) + } + f.Field(0).SetFloat(float64Val) + return nil + case "Int64Value": + fallthrough + case "Int32Value": + int64Val, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return fmt.Errorf("bad DoubleValue: %s", value) + } + f.Field(0).SetInt(int64Val) + return nil + case "UInt64Value": + fallthrough + case "UInt32Value": + uint64Val, err := strconv.ParseUint(value, 10, 64) + if err != nil { + return fmt.Errorf("bad DoubleValue: %s", value) + } + f.Field(0).SetUint(uint64Val) + return nil + case "BoolValue": + if value == "true" { + f.Field(0).SetBool(true) + } else if value == "false" { + f.Field(0).SetBool(false) + } else { + return fmt.Errorf("bad BoolValue: %s", value) + } + return nil + case "StringValue": + f.Field(0).SetString(value) + return nil + } + } + + // is the destination field an enumeration type? + if enumValMap := proto.EnumValueMap(props.Enum); enumValMap != nil { + return populateFieldEnum(f, value, enumValMap) + } + + conv, ok := convFromType[f.Kind()] + if !ok { + return fmt.Errorf("unsupported field type %T", f) + } + result := conv.Call([]reflect.Value{reflect.ValueOf(value)}) + if err := result[1].Interface(); err != nil { + return err.(error) + } + f.Set(result[0].Convert(f.Type())) + return nil +} + +func convertEnum(value string, t reflect.Type, enumValMap map[string]int32) (reflect.Value, error) { + // see if it's an enumeration string + if enumVal, ok := enumValMap[value]; ok { + return reflect.ValueOf(enumVal).Convert(t), nil + } + + // check for an integer that matches an enumeration value + eVal, err := strconv.Atoi(value) + if err != nil { + return reflect.Value{}, fmt.Errorf("%s is not a valid %s", value, t) + } + for _, v := range enumValMap { + if v == int32(eVal) { + return reflect.ValueOf(eVal).Convert(t), nil + } + } + return reflect.Value{}, fmt.Errorf("%s is not a valid %s", value, t) +} + +func populateFieldEnum(f reflect.Value, value string, enumValMap map[string]int32) error { + cval, err := convertEnum(value, f.Type(), enumValMap) + if err != nil { + return err + } + f.Set(cval) + return nil +} + +func populateFieldEnumRepeated(f reflect.Value, values []string, enumValMap map[string]int32) error { + elemType := f.Type().Elem() + f.Set(reflect.MakeSlice(f.Type(), len(values), len(values)).Convert(f.Type())) + for i, v := range values { + result, err := convertEnum(v, elemType, enumValMap) + if err != nil { + return err + } + f.Index(i).Set(result) + } + return nil +} + +var ( + convFromType = map[reflect.Kind]reflect.Value{ + reflect.String: reflect.ValueOf(String), + reflect.Bool: reflect.ValueOf(Bool), + reflect.Float64: reflect.ValueOf(Float64), + reflect.Float32: reflect.ValueOf(Float32), + reflect.Int64: reflect.ValueOf(Int64), + reflect.Int32: reflect.ValueOf(Int32), + reflect.Uint64: reflect.ValueOf(Uint64), + reflect.Uint32: reflect.ValueOf(Uint32), + // TODO(yugui) Support []byte + } +) diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go b/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go new file mode 100644 index 000000000..cf79a4d58 --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/doc.go @@ -0,0 +1,2 @@ +// Package utilities provides members for internal use in grpc-gateway. +package utilities diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go b/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go new file mode 100644 index 000000000..28ad9461f --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/pattern.go @@ -0,0 +1,22 @@ +package utilities + +// An OpCode is a opcode of compiled path patterns. +type OpCode int + +// These constants are the valid values of OpCode. +const ( + // OpNop does nothing + OpNop = OpCode(iota) + // OpPush pushes a component to stack + OpPush + // OpLitPush pushes a component to stack if it matches to the literal + OpLitPush + // OpPushM concatenates the remaining components and pushes it to stack + OpPushM + // OpConcatN pops N items from stack, concatenates them and pushes it back to stack + OpConcatN + // OpCapture pops an item and binds it to the variable + OpCapture + // OpEnd is the least postive invalid opcode. + OpEnd +) diff --git a/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/trie.go b/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/trie.go new file mode 100644 index 000000000..c2b7b30dd --- /dev/null +++ b/deps/github.com/grpc-ecosystem/grpc-gateway/utilities/trie.go @@ -0,0 +1,177 @@ +package utilities + +import ( + "sort" +) + +// DoubleArray is a Double Array implementation of trie on sequences of strings. +type DoubleArray struct { + // Encoding keeps an encoding from string to int + Encoding map[string]int + // Base is the base array of Double Array + Base []int + // Check is the check array of Double Array + Check []int +} + +// NewDoubleArray builds a DoubleArray from a set of sequences of strings. +func NewDoubleArray(seqs [][]string) *DoubleArray { + da := &DoubleArray{Encoding: make(map[string]int)} + if len(seqs) == 0 { + return da + } + + encoded := registerTokens(da, seqs) + sort.Sort(byLex(encoded)) + + root := node{row: -1, col: -1, left: 0, right: len(encoded)} + addSeqs(da, encoded, 0, root) + + for i := len(da.Base); i > 0; i-- { + if da.Check[i-1] != 0 { + da.Base = da.Base[:i] + da.Check = da.Check[:i] + break + } + } + return da +} + +func registerTokens(da *DoubleArray, seqs [][]string) [][]int { + var result [][]int + for _, seq := range seqs { + var encoded []int + for _, token := range seq { + if _, ok := da.Encoding[token]; !ok { + da.Encoding[token] = len(da.Encoding) + } + encoded = append(encoded, da.Encoding[token]) + } + result = append(result, encoded) + } + for i := range result { + result[i] = append(result[i], len(da.Encoding)) + } + return result +} + +type node struct { + row, col int + left, right int +} + +func (n node) value(seqs [][]int) int { + return seqs[n.row][n.col] +} + +func (n node) children(seqs [][]int) []*node { + var result []*node + lastVal := int(-1) + last := new(node) + for i := n.left; i < n.right; i++ { + if lastVal == seqs[i][n.col+1] { + continue + } + last.right = i + last = &node{ + row: i, + col: n.col + 1, + left: i, + } + result = append(result, last) + } + last.right = n.right + return result +} + +func addSeqs(da *DoubleArray, seqs [][]int, pos int, n node) { + ensureSize(da, pos) + + children := n.children(seqs) + var i int + for i = 1; ; i++ { + ok := func() bool { + for _, child := range children { + code := child.value(seqs) + j := i + code + ensureSize(da, j) + if da.Check[j] != 0 { + return false + } + } + return true + }() + if ok { + break + } + } + da.Base[pos] = i + for _, child := range children { + code := child.value(seqs) + j := i + code + da.Check[j] = pos + 1 + } + terminator := len(da.Encoding) + for _, child := range children { + code := child.value(seqs) + if code == terminator { + continue + } + j := i + code + addSeqs(da, seqs, j, *child) + } +} + +func ensureSize(da *DoubleArray, i int) { + for i >= len(da.Base) { + da.Base = append(da.Base, make([]int, len(da.Base)+1)...) + da.Check = append(da.Check, make([]int, len(da.Check)+1)...) + } +} + +type byLex [][]int + +func (l byLex) Len() int { return len(l) } +func (l byLex) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l byLex) Less(i, j int) bool { + si := l[i] + sj := l[j] + var k int + for k = 0; k < len(si) && k < len(sj); k++ { + if si[k] < sj[k] { + return true + } + if si[k] > sj[k] { + return false + } + } + if k < len(sj) { + return true + } + return false +} + +// HasCommonPrefix determines if any sequence in the DoubleArray is a prefix of the given sequence. +func (da *DoubleArray) HasCommonPrefix(seq []string) bool { + if len(da.Base) == 0 { + return false + } + + var i int + for _, t := range seq { + code, ok := da.Encoding[t] + if !ok { + break + } + j := da.Base[i] + code + if len(da.Check) <= j || da.Check[j] != i+1 { + break + } + i = j + } + j := da.Base[i] + len(da.Encoding) + if len(da.Check) <= j || da.Check[j] != i+1 { + return false + } + return true +} diff --git a/deps/github.com/howeyc/gopass/.travis.yml b/deps/github.com/howeyc/gopass/.travis.yml deleted file mode 100644 index cc5d509fd..000000000 --- a/deps/github.com/howeyc/gopass/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: go - -os: - - linux - - osx - -go: - - 1.3 - - 1.4 - - 1.5 - - tip diff --git a/deps/github.com/howeyc/gopass/LICENSE.txt b/deps/github.com/howeyc/gopass/LICENSE.txt deleted file mode 100644 index 14f74708a..000000000 --- a/deps/github.com/howeyc/gopass/LICENSE.txt +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2012 Chris Howey - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/github.com/howeyc/gopass/OPENSOLARIS.LICENSE b/deps/github.com/howeyc/gopass/OPENSOLARIS.LICENSE deleted file mode 100644 index da23621dc..000000000 --- a/deps/github.com/howeyc/gopass/OPENSOLARIS.LICENSE +++ /dev/null @@ -1,384 +0,0 @@ -Unless otherwise noted, all files in this distribution are released -under the Common Development and Distribution License (CDDL). -Exceptions are noted within the associated source files. - --------------------------------------------------------------------- - - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 - -1. Definitions. - - 1.1. "Contributor" means each individual or entity that creates - or contributes to the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Software, prior Modifications used by a Contributor (if any), - and the Modifications made by that particular Contributor. - - 1.3. "Covered Software" means (a) the Original Software, or (b) - Modifications, or (c) the combination of files containing - Original Software with files containing Modifications, in - each case including portions thereof. - - 1.4. "Executable" means the Covered Software in any form other - than Source Code. - - 1.5. "Initial Developer" means the individual or entity that first - makes Original Software available under this License. - - 1.6. "Larger Work" means a work which combines Covered Software or - portions thereof with code not governed by the terms of this - License. - - 1.7. "License" means this document. - - 1.8. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed - herein. - - 1.9. "Modifications" means the Source Code and Executable form of - any of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original - Software or previous Modifications; - - B. Any new file that contains any part of the Original - Software or previous Modifications; or - - C. Any new file that is contributed or otherwise made - available under the terms of this License. - - 1.10. "Original Software" means the Source Code and Executable - form of computer software code that is originally released - under this License. - - 1.11. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, - process, and apparatus claims, in any patent Licensable by - grantor. - - 1.12. "Source Code" means (a) the common form of computer software - code in which modifications are made and (b) associated - documentation included in or with such code. - - 1.13. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms - of, this License. For legal entities, "You" includes any - entity which 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. - - 2.1. The Initial Developer Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, the Initial - Developer hereby grants You a world-wide, royalty-free, - non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, - reproduce, modify, display, perform, sublicense and - distribute the Original Software (or portions thereof), - with or without Modifications, and/or as part of a Larger - Work; and - - (b) under Patent Claims infringed by the making, using or - selling of Original Software, to make, have made, use, - practice, sell, and offer for sale, and/or otherwise - dispose of the Original Software (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are - effective on the date Initial Developer first distributes - or otherwise makes the Original Software available to a - third party under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original - Software, or (2) for infringements caused by: (i) the - modification of the Original Software, or (ii) the - combination of the Original Software with other software - or devices. - - 2.2. Contributor Grant. - - Conditioned upon Your compliance with Section 3.1 below and - subject to third party intellectual property claims, 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 Contributor to use, reproduce, - modify, display, perform, sublicense and distribute the - Modifications created by such Contributor (or portions - thereof), either on an unmodified basis, with other - Modifications, as Covered Software and/or as part of a - Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either - alone and/or in combination with its Contributor Version - (or portions of such combination), to make, use, sell, - offer for sale, have made, and/or otherwise dispose of: - (1) Modifications made by that Contributor (or portions - thereof); and (2) the combination of Modifications made by - that Contributor with its Contributor Version (or portions - of such combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first distributes or - otherwise makes the Modifications available to a third - party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted - from the Contributor Version; (2) for infringements caused - by: (i) third party modifications of Contributor Version, - or (ii) the combination of Modifications made by that - Contributor with other software (except as part of the - Contributor Version) or other devices; or (3) under Patent - Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - - 3.1. Availability of Source Code. - - Any Covered Software that You distribute or otherwise make - available in Executable form must also be made available in Source - Code form and that Source Code form must be distributed only under - the terms of this License. You must include a copy of this - License with every copy of the Source Code form of the Covered - Software You distribute or otherwise make available. You must - inform recipients of any such Covered Software in Executable form - as to how they can obtain such Covered Software in Source Code - form in a reasonable manner on or through a medium customarily - used for software exchange. - - 3.2. Modifications. - - The Modifications that You create or to which You contribute are - governed by the terms of this License. You represent that You - believe Your Modifications are Your original creation(s) and/or - You have sufficient rights to grant the rights conveyed by this - License. - - 3.3. Required Notices. - - You must include a notice in each of Your Modifications that - identifies You as the Contributor of the Modification. You may - not remove or alter any copyright, patent or trademark notices - contained within the Covered Software, or any notices of licensing - or any descriptive text giving attribution to any Contributor or - the Initial Developer. - - 3.4. Application of Additional Terms. - - You may not offer or impose any terms on any Covered Software in - Source Code form that alters or restricts the applicable version - of this License or the recipients' rights hereunder. 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 the Initial Developer or 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 the Initial Developer and every - Contributor for any liability incurred by the Initial Developer or - such Contributor as a result of warranty, support, indemnity or - liability terms You offer. - - 3.5. Distribution of Executable Versions. - - You may distribute the Executable form of the Covered Software - under the terms of this License or under the terms of a license of - Your choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable form does not attempt to - limit or alter the recipient's rights in the Source Code form from - the rights set forth in this License. If You distribute the - Covered Software in Executable form under a different license, You - must make it absolutely clear that any terms which differ from - this License are offered by You alone, not by the Initial - Developer or Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred - by the Initial Developer or such Contributor as a result of any - such terms You offer. - - 3.6. Larger Works. - - You may create a Larger Work by combining Covered Software with - other code not governed by the terms of this License and - distribute the Larger Work as a single product. In such a case, - You must make sure the requirements of this License are fulfilled - for the Covered Software. - -4. Versions of the License. - - 4.1. New Versions. - - Sun Microsystems, Inc. is the initial license steward and may - publish revised and/or new versions of this License from time to - time. Each version will be given a distinguishing version number. - Except as provided in Section 4.3, no one other than the license - steward has the right to modify this License. - - 4.2. Effect of New Versions. - - You may always continue to use, distribute or otherwise make the - Covered Software available under the terms of the version of the - License under which You originally received the Covered Software. - If the Initial Developer includes a notice in the Original - Software prohibiting it from being distributed or otherwise made - available under any subsequent version of the License, You must - distribute and make the Covered Software available under the terms - of the version of the License under which You originally received - the Covered Software. Otherwise, You may also choose to use, - distribute or otherwise make the Covered Software available under - the terms of any subsequent version of the License published by - the license steward. - - 4.3. Modified Versions. - - When You are an Initial Developer and You want to create a new - license for Your Original Software, You may create and use a - modified version of this License if You: (a) rename the license - and remove any references to the name of the license steward - (except to note that the license differs from this License); and - (b) otherwise make it clear that the license contains terms which - differ from this License. - -5. DISCLAIMER OF WARRANTY. - - COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" - BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - 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 THE - INITIAL DEVELOPER OR ANY OTHER 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 HEREUNDER EXCEPT UNDER THIS - DISCLAIMER. - -6. TERMINATION. - - 6.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. - Provisions which, by their nature, must remain in effect beyond - the termination of this License shall survive. - - 6.2. If You assert a patent infringement claim (excluding - declaratory judgment actions) against Initial Developer or a - Contributor (the Initial Developer or Contributor against whom You - assert such claim is referred to as "Participant") alleging that - the Participant Software (meaning the Contributor Version where - the Participant is a Contributor or the Original Software where - the Participant is the Initial Developer) directly or indirectly - infringes any patent, then any and all rights granted directly or - indirectly to You by such Participant, the Initial Developer (if - the Initial Developer is not the Participant) and all Contributors - under Sections 2.1 and/or 2.2 of this License shall, upon 60 days - notice from Participant terminate prospectively and automatically - at the expiration of such 60 day notice period, unless if within - such 60 day period You withdraw Your claim with respect to the - Participant Software against such Participant either unilaterally - or pursuant to a written agreement with Participant. - - 6.3. In the event of termination under Sections 6.1 or 6.2 above, - all end user licenses that have been validly granted by You or any - distributor hereunder prior to termination (excluding licenses - granted to You by any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE - LIABLE TO ANY PERSON FOR ANY 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. U.S. GOVERNMENT END USERS. - - The Covered Software is a "commercial item," as that term is - defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial - computer software" (as that term is defined at 48 - C.F.R. 252.227-7014(a)(1)) and "commercial computer software - documentation" as such terms are used in 48 C.F.R. 12.212 - (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 - C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all - U.S. Government End Users acquire Covered Software with only those - rights set forth herein. This U.S. Government Rights clause is in - lieu of, and supersedes, any other FAR, DFAR, or other clause or - provision that addresses Government rights in computer software - under this License. - -9. MISCELLANEOUS. - - This License represents the complete agreement concerning 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. This License shall be governed - by the law of the jurisdiction specified in a notice contained - within the Original Software (except to the extent applicable law, - if any, provides otherwise), excluding such jurisdiction's - conflict-of-law provisions. Any litigation relating to this - License shall be subject to the jurisdiction of the courts located - in the jurisdiction and venue specified in a notice contained - within the Original Software, with the losing party responsible - for costs, including, without limitation, court costs and - reasonable attorneys' fees and expenses. The application of the - United Nations Convention on Contracts for the International Sale - of Goods is expressly excluded. Any law or regulation which - provides that the language of a contract shall be construed - against the drafter shall not apply to this License. You agree - that You alone are responsible for compliance with the United - States export administration regulations (and the export control - laws and regulation of any other countries) when You use, - distribute or otherwise make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or - indirectly, out of its utilization of rights under this License - and You agree to work with Initial Developer and Contributors to - distribute such responsibility on an equitable basis. Nothing - herein is intended or shall be deemed to constitute any admission - of liability. - --------------------------------------------------------------------- - -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND -DISTRIBUTION LICENSE (CDDL) - -For Covered Software in this distribution, this License shall -be governed by the laws of the State of California (excluding -conflict-of-law provisions). - -Any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of -California and the state courts of the State of California, with -venue lying in Santa Clara County, California. diff --git a/deps/github.com/howeyc/gopass/README.md b/deps/github.com/howeyc/gopass/README.md deleted file mode 100644 index 2d6a4e72c..000000000 --- a/deps/github.com/howeyc/gopass/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# getpasswd in Go [![GoDoc](https://godoc.org/github.com/howeyc/gopass?status.svg)](https://godoc.org/github.com/howeyc/gopass) [![Build Status](https://secure.travis-ci.org/howeyc/gopass.png?branch=master)](http://travis-ci.org/howeyc/gopass) - -Retrieve password from user terminal or piped input without echo. - -Verified on BSD, Linux, and Windows. - -Example: -```go -package main - -import "fmt" -import "github.com/howeyc/gopass" - -func main() { - fmt.Printf("Password: ") - - // Silent. For printing *'s use gopass.GetPasswdMasked() - pass, err := gopass.GetPasswd() - if err != nil { - // Handle gopass.ErrInterrupted or getch() read error - } - - // Do something with pass -} -``` - -Caution: Multi-byte characters not supported! diff --git a/deps/github.com/howeyc/gopass/pass.go b/deps/github.com/howeyc/gopass/pass.go deleted file mode 100644 index f5bd5a51a..000000000 --- a/deps/github.com/howeyc/gopass/pass.go +++ /dev/null @@ -1,110 +0,0 @@ -package gopass - -import ( - "errors" - "fmt" - "io" - "os" -) - -type FdReader interface { - io.Reader - Fd() uintptr -} - -var defaultGetCh = func(r io.Reader) (byte, error) { - buf := make([]byte, 1) - if n, err := r.Read(buf); n == 0 || err != nil { - if err != nil { - return 0, err - } - return 0, io.EOF - } - return buf[0], nil -} - -var ( - maxLength = 512 - ErrInterrupted = errors.New("interrupted") - ErrMaxLengthExceeded = fmt.Errorf("maximum byte limit (%v) exceeded", maxLength) - - // Provide variable so that tests can provide a mock implementation. - getch = defaultGetCh -) - -// getPasswd returns the input read from terminal. -// If prompt is not empty, it will be output as a prompt to the user -// If masked is true, typing will be matched by asterisks on the screen. -// Otherwise, typing will echo nothing. -func getPasswd(prompt string, masked bool, r FdReader, w io.Writer) ([]byte, error) { - var err error - var pass, bs, mask []byte - if masked { - bs = []byte("\b \b") - mask = []byte("*") - } - - if isTerminal(r.Fd()) { - if oldState, err := makeRaw(r.Fd()); err != nil { - return pass, err - } else { - defer func() { - restore(r.Fd(), oldState) - fmt.Fprintln(w) - }() - } - } - - if prompt != "" { - fmt.Fprint(w, prompt) - } - - // Track total bytes read, not just bytes in the password. This ensures any - // errors that might flood the console with nil or -1 bytes infinitely are - // capped. - var counter int - for counter = 0; counter <= maxLength; counter++ { - if v, e := getch(r); e != nil { - err = e - break - } else if v == 127 || v == 8 { - if l := len(pass); l > 0 { - pass = pass[:l-1] - fmt.Fprint(w, string(bs)) - } - } else if v == 13 || v == 10 { - break - } else if v == 3 { - err = ErrInterrupted - break - } else if v != 0 { - pass = append(pass, v) - fmt.Fprint(w, string(mask)) - } - } - - if counter > maxLength { - err = ErrMaxLengthExceeded - } - - return pass, err -} - -// GetPasswd returns the password read from the terminal without echoing input. -// The returned byte array does not include end-of-line characters. -func GetPasswd() ([]byte, error) { - return getPasswd("", false, os.Stdin, os.Stdout) -} - -// GetPasswdMasked returns the password read from the terminal, echoing asterisks. -// The returned byte array does not include end-of-line characters. -func GetPasswdMasked() ([]byte, error) { - return getPasswd("", true, os.Stdin, os.Stdout) -} - -// GetPasswdPrompt prompts the user and returns the password read from the terminal. -// If mask is true, then asterisks are echoed. -// The returned byte array does not include end-of-line characters. -func GetPasswdPrompt(prompt string, mask bool, r FdReader, w io.Writer) ([]byte, error) { - return getPasswd(prompt, mask, r, w) -} diff --git a/deps/github.com/howeyc/gopass/terminal.go b/deps/github.com/howeyc/gopass/terminal.go deleted file mode 100644 index 083564146..000000000 --- a/deps/github.com/howeyc/gopass/terminal.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build !solaris - -package gopass - -import "golang.org/x/crypto/ssh/terminal" - -type terminalState struct { - state *terminal.State -} - -func isTerminal(fd uintptr) bool { - return terminal.IsTerminal(int(fd)) -} - -func makeRaw(fd uintptr) (*terminalState, error) { - state, err := terminal.MakeRaw(int(fd)) - - return &terminalState{ - state: state, - }, err -} - -func restore(fd uintptr, oldState *terminalState) error { - return terminal.Restore(int(fd), oldState.state) -} diff --git a/deps/github.com/howeyc/gopass/terminal_solaris.go b/deps/github.com/howeyc/gopass/terminal_solaris.go deleted file mode 100644 index 257e1b4e8..000000000 --- a/deps/github.com/howeyc/gopass/terminal_solaris.go +++ /dev/null @@ -1,69 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -// Below is derived from Solaris source, so CDDL license is included. - -package gopass - -import ( - "syscall" - - "golang.org/x/sys/unix" -) - -type terminalState struct { - state *unix.Termios -} - -// isTerminal returns true if there is a terminal attached to the given -// file descriptor. -// Source: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c -func isTerminal(fd uintptr) bool { - var termio unix.Termio - err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) - return err == nil -} - -// makeRaw puts the terminal connected to the given file descriptor into raw -// mode and returns the previous state of the terminal so that it can be -// restored. -// Source: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libast/common/uwin/getpass.c -func makeRaw(fd uintptr) (*terminalState, error) { - oldTermiosPtr, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) - if err != nil { - return nil, err - } - oldTermios := *oldTermiosPtr - - newTermios := oldTermios - newTermios.Lflag &^= syscall.ECHO | syscall.ECHOE | syscall.ECHOK | syscall.ECHONL - if err := unix.IoctlSetTermios(int(fd), unix.TCSETS, &newTermios); err != nil { - return nil, err - } - - return &terminalState{ - state: oldTermiosPtr, - }, nil -} - -func restore(fd uintptr, oldState *terminalState) error { - return unix.IoctlSetTermios(int(fd), unix.TCSETS, oldState.state) -} diff --git a/deps/github.com/imdario/mergo/.gitignore b/deps/github.com/imdario/mergo/.gitignore new file mode 100644 index 000000000..529c3412b --- /dev/null +++ b/deps/github.com/imdario/mergo/.gitignore @@ -0,0 +1,33 @@ +#### joe made this: http://goel.io/joe + +#### go #### +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ + +#### vim #### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-v][a-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags diff --git a/deps/github.com/imdario/mergo/.travis.yml b/deps/github.com/imdario/mergo/.travis.yml index 9d91c6339..b13a50ed1 100644 --- a/deps/github.com/imdario/mergo/.travis.yml +++ b/deps/github.com/imdario/mergo/.travis.yml @@ -1,2 +1,7 @@ language: go -install: go get -t +install: + - go get -t + - go get golang.org/x/tools/cmd/cover + - go get github.com/mattn/goveralls +script: + - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN diff --git a/deps/github.com/imdario/mergo/CODE_OF_CONDUCT.md b/deps/github.com/imdario/mergo/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..469b44907 --- /dev/null +++ b/deps/github.com/imdario/mergo/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/deps/github.com/imdario/mergo/README.md b/deps/github.com/imdario/mergo/README.md index cdcea0f65..d1cefa871 100644 --- a/deps/github.com/imdario/mergo/README.md +++ b/deps/github.com/imdario/mergo/README.md @@ -2,14 +2,72 @@ A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. -Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region Marche. - -![Mergo dall'alto](http://www.comune.mergo.an.it/Siti/Mergo/Immagini/Foto/mergo_dall_alto.jpg) +Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche. ## Status -It is ready for production use. It works fine although it may use more of testing. Here some projects in the wild using Mergo: +It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc](https://github.com/imdario/mergo#mergo-in-the-wild). + +[![GoDoc][3]][4] +[![GoCard][5]][6] +[![Build Status][1]][2] +[![Coverage Status][7]][8] +[![Sourcegraph][9]][10] +[1]: https://travis-ci.org/imdario/mergo.png +[2]: https://travis-ci.org/imdario/mergo +[3]: https://godoc.org/github.com/imdario/mergo?status.svg +[4]: https://godoc.org/github.com/imdario/mergo +[5]: https://goreportcard.com/badge/imdario/mergo +[6]: https://goreportcard.com/report/github.com/imdario/mergo +[7]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master +[8]: https://coveralls.io/github/imdario/mergo?branch=master +[9]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg +[10]: https://sourcegraph.com/github.com/imdario/mergo?badge + +### Latest release + +[Release v0.3.4](https://github.com/imdario/mergo/releases/tag/v0.3.4). + +### Important note + +Please keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2) Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). An optional/variadic argument has been added, so it won't break existing code. + +If you were using Mergo **before** April 6th 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause (I hope it won't!) in existing projects after the change (release 0.2.0). + +### Donations + +If Mergo is useful to you, consider buying me a coffee, a beer or making a monthly donation so I can keep building great free software. :heart_eyes: + +Buy Me a Coffee at ko-fi.com +[![Beerpay](https://beerpay.io/imdario/mergo/badge.svg)](https://beerpay.io/imdario/mergo) +[![Beerpay](https://beerpay.io/imdario/mergo/make-wish.svg)](https://beerpay.io/imdario/mergo) +Donate using Liberapay + +### Mergo in the wild + +- [moby/moby](https://github.com/moby/moby) +- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) +- [vmware/dispatch](https://github.com/vmware/dispatch) +- [Shopify/themekit](https://github.com/Shopify/themekit) +- [imdario/zas](https://github.com/imdario/zas) +- [matcornic/hermes](https://github.com/matcornic/hermes) +- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go) +- [kataras/iris](https://github.com/kataras/iris) +- [michaelsauter/crane](https://github.com/michaelsauter/crane) +- [go-task/task](https://github.com/go-task/task) +- [sensu/uchiwa](https://github.com/sensu/uchiwa) +- [ory/hydra](https://github.com/ory/hydra) +- [sisatech/vcli](https://github.com/sisatech/vcli) +- [dairycart/dairycart](https://github.com/dairycart/dairycart) +- [projectcalico/felix](https://github.com/projectcalico/felix) +- [resin-os/balena](https://github.com/resin-os/balena) +- [go-kivik/kivik](https://github.com/go-kivik/kivik) +- [Telefonica/govice](https://github.com/Telefonica/govice) +- [supergiant/supergiant](supergiant/supergiant) +- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce) +- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy) +- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel) - [EagerIO/Stout](https://github.com/EagerIO/Stout) - [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api) - [russross/canvasassignments](https://github.com/russross/canvasassignments) @@ -17,12 +75,17 @@ It is ready for production use. It works fine although it may use more of testin - [casualjim/exeggutor](https://github.com/casualjim/exeggutor) - [divshot/gitling](https://github.com/divshot/gitling) - [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) - -[![Build Status][1]][2] -[![GoDoc](https://godoc.org/github.com/imdario/mergo?status.svg)](https://godoc.org/github.com/imdario/mergo) - -[1]: https://travis-ci.org/imdario/mergo.png -[2]: https://travis-ci.org/imdario/mergo +- [andrerocker/deploy42](https://github.com/andrerocker/deploy42) +- [elwinar/rambler](https://github.com/elwinar/rambler) +- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman) +- [jfbus/impressionist](https://github.com/jfbus/impressionist) +- [Jmeyering/zealot](https://github.com/Jmeyering/zealot) +- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host) +- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go) +- [thoas/picfit](https://github.com/thoas/picfit) +- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) +- [jnuthong/item_search](https://github.com/jnuthong/item_search) +- [bukalapak/snowboard](https://github.com/bukalapak/snowboard) ## Installation @@ -35,25 +98,116 @@ It is ready for production use. It works fine although it may use more of testin ## Usage -You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. Also maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). +You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are not considered zero values](https://golang.org/ref/spec#The_zero_value) either. Also maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). + +```go +if err := mergo.Merge(&dst, src); err != nil { + // ... +} +``` - if err := mergo.Merge(&dst, src); err != nil { - // ... - } +Also, you can merge overwriting values using the transformer `WithOverride`. -Additionally, you can map a map[string]interface{} to a struct (and otherwise, from struct to map), following the same restrictions as in Merge(). Keys are capitalized to find each corresponding exported field. +```go +if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { + // ... +} +``` - if err := mergo.Map(&dst, srcMap); err != nil { - // ... - } +Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field. -Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as map[string]interface{}. They will be just assigned as values. +```go +if err := mergo.Map(&dst, srcMap); err != nil { + // ... +} +``` + +Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values. More information and examples in [godoc documentation](http://godoc.org/github.com/imdario/mergo). +### Nice example + +```go +package main + +import ( + "fmt" + "github.com/imdario/mergo" +) + +type Foo struct { + A string + B int64 +} + +func main() { + src := Foo{ + A: "one", + B: 2, + } + dest := Foo{ + A: "two", + } + mergo.Merge(&dest, src) + fmt.Println(dest) + // Will print + // {two 2} +} +``` + Note: if test are failing due missing package, please execute: - go get gopkg.in/yaml.v1 + go get gopkg.in/yaml.v2 + +### Transformers + +Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`? + +```go +package main + +import ( + "fmt" + "github.com/imdario/mergo" + "reflect" + "time" +) + +type timeTransfomer struct { +} + +func (t timeTransfomer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { + if typ == reflect.TypeOf(time.Time{}) { + return func(dst, src reflect.Value) error { + if dst.CanSet() { + isZero := dst.MethodByName("IsZero") + result := isZero.Call([]reflect.Value{}) + if result[0].Bool() { + dst.Set(src) + } + } + return nil + } + } + return nil +} + +type Snapshot struct { + Time time.Time + // ... +} + +func main() { + src := Snapshot{time.Now()} + dest := Snapshot{} + mergo.Merge(&dest, src, mergo.WithTransformers(timeTransfomer{})) + fmt.Println(dest) + // Will print + // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } +} +``` + ## Contact me diff --git a/deps/github.com/imdario/mergo/map.go b/deps/github.com/imdario/mergo/map.go index 44361e88b..6ea38e636 100644 --- a/deps/github.com/imdario/mergo/map.go +++ b/deps/github.com/imdario/mergo/map.go @@ -31,7 +31,8 @@ func isExported(field reflect.StructField) bool { // Traverses recursively both values, assigning src's fields values to dst. // The map argument tracks comparisons that have already been seen, which allows // short circuiting on recursive types. -func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { +func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { + overwrite := config.Overwrite if dst.CanAddr() { addr := dst.UnsafeAddr() h := 17 * addr @@ -57,10 +58,17 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err } fieldName := field.Name fieldName = changeInitialCase(fieldName, unicode.ToLower) - if v, ok := dstMap[fieldName]; !ok || isEmptyValue(reflect.ValueOf(v)) { + if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v)) || overwrite) { dstMap[fieldName] = src.Field(i).Interface() } } + case reflect.Ptr: + if dst.IsNil() { + v := reflect.New(dst.Type().Elem()) + dst.Set(v) + } + dst = dst.Elem() + fallthrough case reflect.Struct: srcMap := src.Interface().(map[string]interface{}) for key := range srcMap { @@ -85,21 +93,24 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err srcKind = reflect.Ptr } } + if !srcElement.IsValid() { continue } if srcKind == dstKind { - if err = deepMerge(dstElement, srcElement, visited, depth+1); err != nil { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { return } - } else { - if srcKind == reflect.Map { - if err = deepMap(dstElement, srcElement, visited, depth+1); err != nil { - return - } - } else { - return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) + } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return } + } else if srcKind == reflect.Map { + if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } else { + return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) } } } @@ -117,18 +128,35 @@ func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err // doesn't apply if dst is a map. // This is separated method from Merge because it is cleaner and it keeps sane // semantics: merging equal types, mapping different (restricted) types. -func Map(dst, src interface{}) error { +func Map(dst, src interface{}, opts ...func(*Config)) error { + return _map(dst, src, opts...) +} + +// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by +// non-empty src attribute values. +// Deprecated: Use Map(…) with WithOverride +func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { + return _map(dst, src, append(opts, WithOverride)...) +} + +func _map(dst, src interface{}, opts ...func(*Config)) error { var ( vDst, vSrc reflect.Value err error ) + config := &Config{} + + for _, opt := range opts { + opt(config) + } + if vDst, vSrc, err = resolveValues(dst, src); err != nil { return err } // To be friction-less, we redirect equal-type arguments // to deepMerge. Only because arguments can be anything. if vSrc.Kind() == vDst.Kind() { - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0) + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) } switch vSrc.Kind() { case reflect.Struct: @@ -142,5 +170,5 @@ func Map(dst, src interface{}) error { default: return ErrNotSupported } - return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0) + return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config) } diff --git a/deps/github.com/imdario/mergo/merge.go b/deps/github.com/imdario/mergo/merge.go index 5d328b1fe..706b22069 100644 --- a/deps/github.com/imdario/mergo/merge.go +++ b/deps/github.com/imdario/mergo/merge.go @@ -12,10 +12,34 @@ import ( "reflect" ) +func hasExportedField(dst reflect.Value) (exported bool) { + for i, n := 0, dst.NumField(); i < n; i++ { + field := dst.Type().Field(i) + if field.Anonymous && dst.Field(i).Kind() == reflect.Struct { + exported = exported || hasExportedField(dst.Field(i)) + } else { + exported = exported || len(field.PkgPath) == 0 + } + } + return +} + +type Config struct { + Overwrite bool + AppendSlice bool + Transformers Transformers +} + +type Transformers interface { + Transformer(reflect.Type) func(dst, src reflect.Value) error +} + // Traverses recursively both values, assigning src's fields values to dst. // The map argument tracks comparisons that have already been seen, which allows // short circuiting on recursive types. -func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { +func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { + overwrite := config.Overwrite + if !src.IsValid() { return } @@ -32,68 +56,190 @@ func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (e // Remember, remember... visited[h] = &visit{addr, typ, seen} } + + if config.Transformers != nil && !isEmptyValue(dst) { + if fn := config.Transformers.Transformer(dst.Type()); fn != nil { + err = fn(dst, src) + return + } + } + switch dst.Kind() { case reflect.Struct: - for i, n := 0, dst.NumField(); i < n; i++ { - if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1); err != nil { - return + if hasExportedField(dst) { + for i, n := 0, dst.NumField(); i < n; i++ { + if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil { + return + } + } + } else { + if dst.CanSet() && !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) { + dst.Set(src) } } case reflect.Map: + if dst.IsNil() && !src.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } for _, key := range src.MapKeys() { srcElement := src.MapIndex(key) if !srcElement.IsValid() { continue } dstElement := dst.MapIndex(key) - switch reflect.TypeOf(srcElement.Interface()).Kind() { - case reflect.Struct: + switch srcElement.Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice: + if srcElement.IsNil() { + continue + } fallthrough - case reflect.Map: - if err = deepMerge(dstElement, srcElement, visited, depth+1); err != nil { - return + default: + if !srcElement.CanInterface() { + continue + } + switch reflect.TypeOf(srcElement.Interface()).Kind() { + case reflect.Struct: + fallthrough + case reflect.Ptr: + fallthrough + case reflect.Map: + srcMapElm := srcElement + dstMapElm := dstElement + if srcMapElm.CanInterface() { + srcMapElm = reflect.ValueOf(srcMapElm.Interface()) + if dstMapElm.IsValid() { + dstMapElm = reflect.ValueOf(dstMapElm.Interface()) + } + } + if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil { + return + } + case reflect.Slice: + srcSlice := reflect.ValueOf(srcElement.Interface()) + + var dstSlice reflect.Value + if !dstElement.IsValid() || dstElement.IsNil() { + dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len()) + } else { + dstSlice = reflect.ValueOf(dstElement.Interface()) + } + + if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { + dstSlice = srcSlice + } else if config.AppendSlice { + dstSlice = reflect.AppendSlice(dstSlice, srcSlice) + } + dst.SetMapIndex(key, dstSlice) } } - if !dstElement.IsValid() { + if dstElement.IsValid() && reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map { + continue + } + + if srcElement.IsValid() && (overwrite || (!dstElement.IsValid() || isEmptyValue(dstElement))) { + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } dst.SetMapIndex(key, srcElement) } } + case reflect.Slice: + if !dst.CanSet() { + break + } + if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { + dst.Set(src) + } else if config.AppendSlice { + dst.Set(reflect.AppendSlice(dst, src)) + } case reflect.Ptr: fallthrough case reflect.Interface: if src.IsNil() { break - } else if dst.IsNil() { - if dst.CanSet() && isEmptyValue(dst) { + } + if src.Kind() != reflect.Interface { + if dst.IsNil() || overwrite { + if dst.CanSet() && (overwrite || isEmptyValue(dst)) { + dst.Set(src) + } + } else if src.Kind() == reflect.Ptr { + if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { + return + } + } else if dst.Elem().Type() == src.Type() { + if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { + return + } + } else { + return ErrDifferentArgumentsTypes + } + break + } + if dst.IsNil() || overwrite { + if dst.CanSet() && (overwrite || isEmptyValue(dst)) { dst.Set(src) } - } else if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1); err != nil { + } else if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { return } default: - if dst.CanSet() && !isEmptyValue(src) { + if dst.CanSet() && !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) { dst.Set(src) } } return } -// Merge sets fields' values in dst from src if they have a zero -// value of their type. -// dst and src must be valid same-type structs and dst must be -// a pointer to struct. -// It won't merge unexported (private) fields and will do recursively -// any exported field. -func Merge(dst, src interface{}) error { +// Merge will fill any empty for value type attributes on the dst struct using corresponding +// src attributes if they themselves are not empty. dst and src must be valid same-type structs +// and dst must be a pointer to struct. +// It won't merge unexported (private) fields and will do recursively any exported field. +func Merge(dst, src interface{}, opts ...func(*Config)) error { + return merge(dst, src, opts...) +} + +// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overriden by +// non-empty src attribute values. +// Deprecated: use Merge(…) with WithOverride +func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { + return merge(dst, src, append(opts, WithOverride)...) +} + +// WithTransformers adds transformers to merge, allowing to customize the merging of some types. +func WithTransformers(transformers Transformers) func(*Config) { + return func(config *Config) { + config.Transformers = transformers + } +} + +// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values. +func WithOverride(config *Config) { + config.Overwrite = true +} + +// WithAppendSlice will make merge append slices instead of overwriting it +func WithAppendSlice(config *Config) { + config.AppendSlice = true +} + +func merge(dst, src interface{}, opts ...func(*Config)) error { var ( vDst, vSrc reflect.Value err error ) + + config := &Config{} + + for _, opt := range opts { + opt(config) + } + if vDst, vSrc, err = resolveValues(dst, src); err != nil { return err } if vDst.Type() != vSrc.Type() { return ErrDifferentArgumentsTypes } - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0) + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) } diff --git a/deps/github.com/imdario/mergo/mergo.go b/deps/github.com/imdario/mergo/mergo.go index f8a0991ec..a82fea2fd 100644 --- a/deps/github.com/imdario/mergo/mergo.go +++ b/deps/github.com/imdario/mergo/mergo.go @@ -32,7 +32,7 @@ type visit struct { next *visit } -// From src/pkg/encoding/json. +// From src/pkg/encoding/json/encode.go. func isEmptyValue(v reflect.Value) bool { switch v.Kind() { case reflect.Array, reflect.Map, reflect.Slice, reflect.String: @@ -46,7 +46,14 @@ func isEmptyValue(v reflect.Value) bool { case reflect.Float32, reflect.Float64: return v.Float() == 0 case reflect.Interface, reflect.Ptr: + if v.IsNil() { + return true + } + return isEmptyValue(v.Elem()) + case reflect.Func: return v.IsNil() + case reflect.Invalid: + return true } return false } diff --git a/deps/github.com/jinzhu/gorm/.codeclimate.yml b/deps/github.com/jinzhu/gorm/.codeclimate.yml deleted file mode 100644 index 51aba50cb..000000000 --- a/deps/github.com/jinzhu/gorm/.codeclimate.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -engines: - gofmt: - enabled: true - govet: - enabled: true - golint: - enabled: true -ratings: - paths: - - "**.go" diff --git a/deps/github.com/jinzhu/gorm/.github/ISSUE_TEMPLATE.md b/deps/github.com/jinzhu/gorm/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index a0b64bfa7..000000000 --- a/deps/github.com/jinzhu/gorm/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,45 +0,0 @@ -Your issue may already be reported! Please search on the [issue track](https://github.com/jinzhu/gorm/issues) before creating one. - -### What version of Go are you using (`go version`)? - - -### Which database and its version are you using? - - -### Please provide a complete runnable program to reproduce your issue. **IMPORTANT** - -Need to runnable with [GORM's docker compose config](https://github.com/jinzhu/gorm/blob/master/docker-compose.yml) or please provides your config. - -```go -package main - -import ( - "github.com/jinzhu/gorm" - _ "github.com/jinzhu/gorm/dialects/mssql" - _ "github.com/jinzhu/gorm/dialects/mysql" - _ "github.com/jinzhu/gorm/dialects/postgres" - _ "github.com/jinzhu/gorm/dialects/sqlite" -) - -var db *gorm.DB - -func init() { - var err error - db, err = gorm.Open("sqlite3", "test.db") - // db, err = gorm.Open("postgres", "user=gorm password=gorm DB.name=gorm port=9920 sslmode=disable") - // db, err = gorm.Open("mysql", "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True") - // db, err = gorm.Open("mssql", "sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm") - if err != nil { - panic(err) - } - db.LogMode(true) -} - -func main() { - if /* failure condition */ { - fmt.Println("failed") - } else { - fmt.Println("success") - } -} -``` diff --git a/deps/github.com/jinzhu/gorm/.github/PULL_REQUEST_TEMPLATE.md b/deps/github.com/jinzhu/gorm/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b467b6ce9..000000000 --- a/deps/github.com/jinzhu/gorm/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -Make sure these boxes checked before submitting your pull request. - -- [] Do only one thing -- [] No API-breaking changes -- [] New code/logic commented & tested - -For significant changes like big bug fixes, new features, please open an issue to make an agreement on an implementation design/plan first before starting it. - -### What did this pull request do? diff --git a/deps/github.com/jinzhu/gorm/.gitignore b/deps/github.com/jinzhu/gorm/.gitignore deleted file mode 100644 index 01dc5ce07..000000000 --- a/deps/github.com/jinzhu/gorm/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -documents -_book diff --git a/deps/github.com/jinzhu/gorm/License b/deps/github.com/jinzhu/gorm/License deleted file mode 100644 index 037e1653e..000000000 --- a/deps/github.com/jinzhu/gorm/License +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-NOW Jinzhu - -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/deps/github.com/jinzhu/gorm/README.md b/deps/github.com/jinzhu/gorm/README.md deleted file mode 100644 index 0c5c7ea6c..000000000 --- a/deps/github.com/jinzhu/gorm/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# GORM - -The fantastic ORM library for Golang, aims to be developer friendly. - -[![go report card](https://goreportcard.com/badge/github.com/jinzhu/gorm "go report card")](https://goreportcard.com/report/github.com/jinzhu/gorm) -[![wercker status](https://app.wercker.com/status/8596cace912c9947dd9c8542ecc8cb8b/s/master "wercker status")](https://app.wercker.com/project/byKey/8596cace912c9947dd9c8542ecc8cb8b) -[![Join the chat at https://gitter.im/jinzhu/gorm](https://img.shields.io/gitter/room/jinzhu/gorm.svg)](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Open Collective Backer](https://opencollective.com/gorm/tiers/backer/badge.svg?label=backer&color=brightgreen "Open Collective Backer")](https://opencollective.com/gorm) -[![Open Collective Sponsor](https://opencollective.com/gorm/tiers/sponsor/badge.svg?label=sponsor&color=brightgreen "Open Collective Sponsor")](https://opencollective.com/gorm) -[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT) -[![GoDoc](https://godoc.org/github.com/jinzhu/gorm?status.svg)](https://godoc.org/github.com/jinzhu/gorm) - -## Overview - -* Full-Featured ORM (almost) -* Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism) -* Hooks (Before/After Create/Save/Update/Delete/Find) -* Preloading (eager loading) -* Transactions -* Composite Primary Key -* SQL Builder -* Auto Migrations -* Logger -* Extendable, write Plugins based on GORM callbacks -* Every feature comes with tests -* Developer Friendly - -## Getting Started - -* GORM Guides [http://gorm.io](http://gorm.io) - -## Contributing - -[You can help to deliver a better GORM, check out things you can do](http://gorm.io/contribute.html) - -## License - -© Jinzhu, 2013~time.Now - -Released under the [MIT License](https://github.com/jinzhu/gorm/blob/master/License) diff --git a/deps/github.com/jinzhu/gorm/association.go b/deps/github.com/jinzhu/gorm/association.go deleted file mode 100644 index 8c6d9864b..000000000 --- a/deps/github.com/jinzhu/gorm/association.go +++ /dev/null @@ -1,375 +0,0 @@ -package gorm - -import ( - "errors" - "fmt" - "reflect" -) - -// Association Mode contains some helper methods to handle relationship things easily. -type Association struct { - Error error - scope *Scope - column string - field *Field -} - -// Find find out all related associations -func (association *Association) Find(value interface{}) *Association { - association.scope.related(value, association.column) - return association.setErr(association.scope.db.Error) -} - -// Append append new associations for many2many, has_many, replace current association for has_one, belongs_to -func (association *Association) Append(values ...interface{}) *Association { - if association.Error != nil { - return association - } - - if relationship := association.field.Relationship; relationship.Kind == "has_one" { - return association.Replace(values...) - } - return association.saveAssociations(values...) -} - -// Replace replace current associations with new one -func (association *Association) Replace(values ...interface{}) *Association { - if association.Error != nil { - return association - } - - var ( - relationship = association.field.Relationship - scope = association.scope - field = association.field.Field - newDB = scope.NewDB() - ) - - // Append new values - association.field.Set(reflect.Zero(association.field.Field.Type())) - association.saveAssociations(values...) - - // Belongs To - if relationship.Kind == "belongs_to" { - // Set foreign key to be null when clearing value (length equals 0) - if len(values) == 0 { - // Set foreign key to be nil - var foreignKeyMap = map[string]interface{}{} - for _, foreignKey := range relationship.ForeignDBNames { - foreignKeyMap[foreignKey] = nil - } - association.setErr(newDB.Model(scope.Value).UpdateColumn(foreignKeyMap).Error) - } - } else { - // Polymorphic Relations - if relationship.PolymorphicDBName != "" { - newDB = newDB.Where(fmt.Sprintf("%v = ?", scope.Quote(relationship.PolymorphicDBName)), relationship.PolymorphicValue) - } - - // Delete Relations except new created - if len(values) > 0 { - var associationForeignFieldNames, associationForeignDBNames []string - if relationship.Kind == "many_to_many" { - // if many to many relations, get association fields name from association foreign keys - associationScope := scope.New(reflect.New(field.Type()).Interface()) - for idx, dbName := range relationship.AssociationForeignFieldNames { - if field, ok := associationScope.FieldByName(dbName); ok { - associationForeignFieldNames = append(associationForeignFieldNames, field.Name) - associationForeignDBNames = append(associationForeignDBNames, relationship.AssociationForeignDBNames[idx]) - } - } - } else { - // If has one/many relations, use primary keys - for _, field := range scope.New(reflect.New(field.Type()).Interface()).PrimaryFields() { - associationForeignFieldNames = append(associationForeignFieldNames, field.Name) - associationForeignDBNames = append(associationForeignDBNames, field.DBName) - } - } - - newPrimaryKeys := scope.getColumnAsArray(associationForeignFieldNames, field.Interface()) - - if len(newPrimaryKeys) > 0 { - sql := fmt.Sprintf("%v NOT IN (%v)", toQueryCondition(scope, associationForeignDBNames), toQueryMarks(newPrimaryKeys)) - newDB = newDB.Where(sql, toQueryValues(newPrimaryKeys)...) - } - } - - if relationship.Kind == "many_to_many" { - // if many to many relations, delete related relations from join table - var sourceForeignFieldNames []string - - for _, dbName := range relationship.ForeignFieldNames { - if field, ok := scope.FieldByName(dbName); ok { - sourceForeignFieldNames = append(sourceForeignFieldNames, field.Name) - } - } - - if sourcePrimaryKeys := scope.getColumnAsArray(sourceForeignFieldNames, scope.Value); len(sourcePrimaryKeys) > 0 { - newDB = newDB.Where(fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.ForeignDBNames), toQueryMarks(sourcePrimaryKeys)), toQueryValues(sourcePrimaryKeys)...) - - association.setErr(relationship.JoinTableHandler.Delete(relationship.JoinTableHandler, newDB)) - } - } else if relationship.Kind == "has_one" || relationship.Kind == "has_many" { - // has_one or has_many relations, set foreign key to be nil (TODO or delete them?) - var foreignKeyMap = map[string]interface{}{} - for idx, foreignKey := range relationship.ForeignDBNames { - foreignKeyMap[foreignKey] = nil - if field, ok := scope.FieldByName(relationship.AssociationForeignFieldNames[idx]); ok { - newDB = newDB.Where(fmt.Sprintf("%v = ?", scope.Quote(foreignKey)), field.Field.Interface()) - } - } - - fieldValue := reflect.New(association.field.Field.Type()).Interface() - association.setErr(newDB.Model(fieldValue).UpdateColumn(foreignKeyMap).Error) - } - } - return association -} - -// Delete remove relationship between source & passed arguments, but won't delete those arguments -func (association *Association) Delete(values ...interface{}) *Association { - if association.Error != nil { - return association - } - - var ( - relationship = association.field.Relationship - scope = association.scope - field = association.field.Field - newDB = scope.NewDB() - ) - - if len(values) == 0 { - return association - } - - var deletingResourcePrimaryFieldNames, deletingResourcePrimaryDBNames []string - for _, field := range scope.New(reflect.New(field.Type()).Interface()).PrimaryFields() { - deletingResourcePrimaryFieldNames = append(deletingResourcePrimaryFieldNames, field.Name) - deletingResourcePrimaryDBNames = append(deletingResourcePrimaryDBNames, field.DBName) - } - - deletingPrimaryKeys := scope.getColumnAsArray(deletingResourcePrimaryFieldNames, values...) - - if relationship.Kind == "many_to_many" { - // source value's foreign keys - for idx, foreignKey := range relationship.ForeignDBNames { - if field, ok := scope.FieldByName(relationship.ForeignFieldNames[idx]); ok { - newDB = newDB.Where(fmt.Sprintf("%v = ?", scope.Quote(foreignKey)), field.Field.Interface()) - } - } - - // get association's foreign fields name - var associationScope = scope.New(reflect.New(field.Type()).Interface()) - var associationForeignFieldNames []string - for _, associationDBName := range relationship.AssociationForeignFieldNames { - if field, ok := associationScope.FieldByName(associationDBName); ok { - associationForeignFieldNames = append(associationForeignFieldNames, field.Name) - } - } - - // association value's foreign keys - deletingPrimaryKeys := scope.getColumnAsArray(associationForeignFieldNames, values...) - sql := fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.AssociationForeignDBNames), toQueryMarks(deletingPrimaryKeys)) - newDB = newDB.Where(sql, toQueryValues(deletingPrimaryKeys)...) - - association.setErr(relationship.JoinTableHandler.Delete(relationship.JoinTableHandler, newDB)) - } else { - var foreignKeyMap = map[string]interface{}{} - for _, foreignKey := range relationship.ForeignDBNames { - foreignKeyMap[foreignKey] = nil - } - - if relationship.Kind == "belongs_to" { - // find with deleting relation's foreign keys - primaryKeys := scope.getColumnAsArray(relationship.AssociationForeignFieldNames, values...) - newDB = newDB.Where( - fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.ForeignDBNames), toQueryMarks(primaryKeys)), - toQueryValues(primaryKeys)..., - ) - - // set foreign key to be null if there are some records affected - modelValue := reflect.New(scope.GetModelStruct().ModelType).Interface() - if results := newDB.Model(modelValue).UpdateColumn(foreignKeyMap); results.Error == nil { - if results.RowsAffected > 0 { - scope.updatedAttrsWithValues(foreignKeyMap) - } - } else { - association.setErr(results.Error) - } - } else if relationship.Kind == "has_one" || relationship.Kind == "has_many" { - // find all relations - primaryKeys := scope.getColumnAsArray(relationship.AssociationForeignFieldNames, scope.Value) - newDB = newDB.Where( - fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.ForeignDBNames), toQueryMarks(primaryKeys)), - toQueryValues(primaryKeys)..., - ) - - // only include those deleting relations - newDB = newDB.Where( - fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, deletingResourcePrimaryDBNames), toQueryMarks(deletingPrimaryKeys)), - toQueryValues(deletingPrimaryKeys)..., - ) - - // set matched relation's foreign key to be null - fieldValue := reflect.New(association.field.Field.Type()).Interface() - association.setErr(newDB.Model(fieldValue).UpdateColumn(foreignKeyMap).Error) - } - } - - // Remove deleted records from source's field - if association.Error == nil { - if field.Kind() == reflect.Slice { - leftValues := reflect.Zero(field.Type()) - - for i := 0; i < field.Len(); i++ { - reflectValue := field.Index(i) - primaryKey := scope.getColumnAsArray(deletingResourcePrimaryFieldNames, reflectValue.Interface())[0] - var isDeleted = false - for _, pk := range deletingPrimaryKeys { - if equalAsString(primaryKey, pk) { - isDeleted = true - break - } - } - if !isDeleted { - leftValues = reflect.Append(leftValues, reflectValue) - } - } - - association.field.Set(leftValues) - } else if field.Kind() == reflect.Struct { - primaryKey := scope.getColumnAsArray(deletingResourcePrimaryFieldNames, field.Interface())[0] - for _, pk := range deletingPrimaryKeys { - if equalAsString(primaryKey, pk) { - association.field.Set(reflect.Zero(field.Type())) - break - } - } - } - } - - return association -} - -// Clear remove relationship between source & current associations, won't delete those associations -func (association *Association) Clear() *Association { - return association.Replace() -} - -// Count return the count of current associations -func (association *Association) Count() int { - var ( - count = 0 - relationship = association.field.Relationship - scope = association.scope - fieldValue = association.field.Field.Interface() - query = scope.DB() - ) - - if relationship.Kind == "many_to_many" { - query = relationship.JoinTableHandler.JoinWith(relationship.JoinTableHandler, query, scope.Value) - } else if relationship.Kind == "has_many" || relationship.Kind == "has_one" { - primaryKeys := scope.getColumnAsArray(relationship.AssociationForeignFieldNames, scope.Value) - query = query.Where( - fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.ForeignDBNames), toQueryMarks(primaryKeys)), - toQueryValues(primaryKeys)..., - ) - } else if relationship.Kind == "belongs_to" { - primaryKeys := scope.getColumnAsArray(relationship.ForeignFieldNames, scope.Value) - query = query.Where( - fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relationship.AssociationForeignDBNames), toQueryMarks(primaryKeys)), - toQueryValues(primaryKeys)..., - ) - } - - if relationship.PolymorphicType != "" { - query = query.Where( - fmt.Sprintf("%v.%v = ?", scope.New(fieldValue).QuotedTableName(), scope.Quote(relationship.PolymorphicDBName)), - relationship.PolymorphicValue, - ) - } - - if err := query.Model(fieldValue).Count(&count).Error; err != nil { - association.Error = err - } - return count -} - -// saveAssociations save passed values as associations -func (association *Association) saveAssociations(values ...interface{}) *Association { - var ( - scope = association.scope - field = association.field - relationship = field.Relationship - ) - - saveAssociation := func(reflectValue reflect.Value) { - // value has to been pointer - if reflectValue.Kind() != reflect.Ptr { - reflectPtr := reflect.New(reflectValue.Type()) - reflectPtr.Elem().Set(reflectValue) - reflectValue = reflectPtr - } - - // value has to been saved for many2many - if relationship.Kind == "many_to_many" { - if scope.New(reflectValue.Interface()).PrimaryKeyZero() { - association.setErr(scope.NewDB().Save(reflectValue.Interface()).Error) - } - } - - // Assign Fields - var fieldType = field.Field.Type() - var setFieldBackToValue, setSliceFieldBackToValue bool - if reflectValue.Type().AssignableTo(fieldType) { - field.Set(reflectValue) - } else if reflectValue.Type().Elem().AssignableTo(fieldType) { - // if field's type is struct, then need to set value back to argument after save - setFieldBackToValue = true - field.Set(reflectValue.Elem()) - } else if fieldType.Kind() == reflect.Slice { - if reflectValue.Type().AssignableTo(fieldType.Elem()) { - field.Set(reflect.Append(field.Field, reflectValue)) - } else if reflectValue.Type().Elem().AssignableTo(fieldType.Elem()) { - // if field's type is slice of struct, then need to set value back to argument after save - setSliceFieldBackToValue = true - field.Set(reflect.Append(field.Field, reflectValue.Elem())) - } - } - - if relationship.Kind == "many_to_many" { - association.setErr(relationship.JoinTableHandler.Add(relationship.JoinTableHandler, scope.NewDB(), scope.Value, reflectValue.Interface())) - } else { - association.setErr(scope.NewDB().Select(field.Name).Save(scope.Value).Error) - - if setFieldBackToValue { - reflectValue.Elem().Set(field.Field) - } else if setSliceFieldBackToValue { - reflectValue.Elem().Set(field.Field.Index(field.Field.Len() - 1)) - } - } - } - - for _, value := range values { - reflectValue := reflect.ValueOf(value) - indirectReflectValue := reflect.Indirect(reflectValue) - if indirectReflectValue.Kind() == reflect.Struct { - saveAssociation(reflectValue) - } else if indirectReflectValue.Kind() == reflect.Slice { - for i := 0; i < indirectReflectValue.Len(); i++ { - saveAssociation(indirectReflectValue.Index(i)) - } - } else { - association.setErr(errors.New("invalid value type")) - } - } - return association -} - -func (association *Association) setErr(err error) *Association { - if err != nil { - association.Error = err - } - return association -} diff --git a/deps/github.com/jinzhu/gorm/association_test.go b/deps/github.com/jinzhu/gorm/association_test.go deleted file mode 100644 index 60d0cf485..000000000 --- a/deps/github.com/jinzhu/gorm/association_test.go +++ /dev/null @@ -1,1050 +0,0 @@ -package gorm_test - -import ( - "fmt" - "os" - "reflect" - "sort" - "testing" - - "github.com/jinzhu/gorm" -) - -func TestBelongsTo(t *testing.T) { - post := Post{ - Title: "post belongs to", - Body: "body belongs to", - Category: Category{Name: "Category 1"}, - MainCategory: Category{Name: "Main Category 1"}, - } - - if err := DB.Save(&post).Error; err != nil { - t.Error("Got errors when save post", err) - } - - if post.Category.ID == 0 || post.MainCategory.ID == 0 { - t.Errorf("Category's primary key should be updated") - } - - if post.CategoryId.Int64 == 0 || post.MainCategoryId == 0 { - t.Errorf("post's foreign key should be updated") - } - - // Query - var category1 Category - DB.Model(&post).Association("Category").Find(&category1) - if category1.Name != "Category 1" { - t.Errorf("Query belongs to relations with Association") - } - - var mainCategory1 Category - DB.Model(&post).Association("MainCategory").Find(&mainCategory1) - if mainCategory1.Name != "Main Category 1" { - t.Errorf("Query belongs to relations with Association") - } - - var category11 Category - DB.Model(&post).Related(&category11) - if category11.Name != "Category 1" { - t.Errorf("Query belongs to relations with Related") - } - - if DB.Model(&post).Association("Category").Count() != 1 { - t.Errorf("Post's category count should be 1") - } - - if DB.Model(&post).Association("MainCategory").Count() != 1 { - t.Errorf("Post's main category count should be 1") - } - - // Append - var category2 = Category{ - Name: "Category 2", - } - DB.Model(&post).Association("Category").Append(&category2) - - if category2.ID == 0 { - t.Errorf("Category should has ID when created with Append") - } - - var category21 Category - DB.Model(&post).Related(&category21) - - if category21.Name != "Category 2" { - t.Errorf("Category should be updated with Append") - } - - if DB.Model(&post).Association("Category").Count() != 1 { - t.Errorf("Post's category count should be 1") - } - - // Replace - var category3 = Category{ - Name: "Category 3", - } - DB.Model(&post).Association("Category").Replace(&category3) - - if category3.ID == 0 { - t.Errorf("Category should has ID when created with Replace") - } - - var category31 Category - DB.Model(&post).Related(&category31) - if category31.Name != "Category 3" { - t.Errorf("Category should be updated with Replace") - } - - if DB.Model(&post).Association("Category").Count() != 1 { - t.Errorf("Post's category count should be 1") - } - - // Delete - DB.Model(&post).Association("Category").Delete(&category2) - if DB.Model(&post).Related(&Category{}).RecordNotFound() { - t.Errorf("Should not delete any category when Delete a unrelated Category") - } - - if post.Category.Name == "" { - t.Errorf("Post's category should not be reseted when Delete a unrelated Category") - } - - DB.Model(&post).Association("Category").Delete(&category3) - - if post.Category.Name != "" { - t.Errorf("Post's category should be reseted after Delete") - } - - var category41 Category - DB.Model(&post).Related(&category41) - if category41.Name != "" { - t.Errorf("Category should be deleted with Delete") - } - - if count := DB.Model(&post).Association("Category").Count(); count != 0 { - t.Errorf("Post's category count should be 0 after Delete, but got %v", count) - } - - // Clear - DB.Model(&post).Association("Category").Append(&Category{ - Name: "Category 2", - }) - - if DB.Model(&post).Related(&Category{}).RecordNotFound() { - t.Errorf("Should find category after append") - } - - if post.Category.Name == "" { - t.Errorf("Post's category should has value after Append") - } - - DB.Model(&post).Association("Category").Clear() - - if post.Category.Name != "" { - t.Errorf("Post's category should be cleared after Clear") - } - - if !DB.Model(&post).Related(&Category{}).RecordNotFound() { - t.Errorf("Should not find any category after Clear") - } - - if count := DB.Model(&post).Association("Category").Count(); count != 0 { - t.Errorf("Post's category count should be 0 after Clear, but got %v", count) - } - - // Check Association mode with soft delete - category6 := Category{ - Name: "Category 6", - } - DB.Model(&post).Association("Category").Append(&category6) - - if count := DB.Model(&post).Association("Category").Count(); count != 1 { - t.Errorf("Post's category count should be 1 after Append, but got %v", count) - } - - DB.Delete(&category6) - - if count := DB.Model(&post).Association("Category").Count(); count != 0 { - t.Errorf("Post's category count should be 0 after the category has been deleted, but got %v", count) - } - - if err := DB.Model(&post).Association("Category").Find(&Category{}).Error; err == nil { - t.Errorf("Post's category is not findable after Delete") - } - - if count := DB.Unscoped().Model(&post).Association("Category").Count(); count != 1 { - t.Errorf("Post's category count should be 1 when query with Unscoped, but got %v", count) - } - - if err := DB.Unscoped().Model(&post).Association("Category").Find(&Category{}).Error; err != nil { - t.Errorf("Post's category should be findable when query with Unscoped, got %v", err) - } -} - -func TestBelongsToOverrideForeignKey1(t *testing.T) { - type Profile struct { - gorm.Model - Name string - } - - type User struct { - gorm.Model - Profile Profile `gorm:"ForeignKey:ProfileRefer"` - ProfileRefer int - } - - if relation, ok := DB.NewScope(&User{}).FieldByName("Profile"); ok { - if relation.Relationship.Kind != "belongs_to" || - !reflect.DeepEqual(relation.Relationship.ForeignFieldNames, []string{"ProfileRefer"}) || - !reflect.DeepEqual(relation.Relationship.AssociationForeignFieldNames, []string{"ID"}) { - t.Errorf("Override belongs to foreign key with tag") - } - } -} - -func TestBelongsToOverrideForeignKey2(t *testing.T) { - type Profile struct { - gorm.Model - Refer string - Name string - } - - type User struct { - gorm.Model - Profile Profile `gorm:"ForeignKey:ProfileID;AssociationForeignKey:Refer"` - ProfileID int - } - - if relation, ok := DB.NewScope(&User{}).FieldByName("Profile"); ok { - if relation.Relationship.Kind != "belongs_to" || - !reflect.DeepEqual(relation.Relationship.ForeignFieldNames, []string{"ProfileID"}) || - !reflect.DeepEqual(relation.Relationship.AssociationForeignFieldNames, []string{"Refer"}) { - t.Errorf("Override belongs to foreign key with tag") - } - } -} - -func TestHasOne(t *testing.T) { - user := User{ - Name: "has one", - CreditCard: CreditCard{Number: "411111111111"}, - } - - if err := DB.Save(&user).Error; err != nil { - t.Error("Got errors when save user", err.Error()) - } - - if user.CreditCard.UserId.Int64 == 0 { - t.Errorf("CreditCard's foreign key should be updated") - } - - // Query - var creditCard1 CreditCard - DB.Model(&user).Related(&creditCard1) - - if creditCard1.Number != "411111111111" { - t.Errorf("Query has one relations with Related") - } - - var creditCard11 CreditCard - DB.Model(&user).Association("CreditCard").Find(&creditCard11) - - if creditCard11.Number != "411111111111" { - t.Errorf("Query has one relations with Related") - } - - if DB.Model(&user).Association("CreditCard").Count() != 1 { - t.Errorf("User's credit card count should be 1") - } - - // Append - var creditcard2 = CreditCard{ - Number: "411111111112", - } - DB.Model(&user).Association("CreditCard").Append(&creditcard2) - - if creditcard2.ID == 0 { - t.Errorf("Creditcard should has ID when created with Append") - } - - var creditcard21 CreditCard - DB.Model(&user).Related(&creditcard21) - if creditcard21.Number != "411111111112" { - t.Errorf("CreditCard should be updated with Append") - } - - if DB.Model(&user).Association("CreditCard").Count() != 1 { - t.Errorf("User's credit card count should be 1") - } - - // Replace - var creditcard3 = CreditCard{ - Number: "411111111113", - } - DB.Model(&user).Association("CreditCard").Replace(&creditcard3) - - if creditcard3.ID == 0 { - t.Errorf("Creditcard should has ID when created with Replace") - } - - var creditcard31 CreditCard - DB.Model(&user).Related(&creditcard31) - if creditcard31.Number != "411111111113" { - t.Errorf("CreditCard should be updated with Replace") - } - - if DB.Model(&user).Association("CreditCard").Count() != 1 { - t.Errorf("User's credit card count should be 1") - } - - // Delete - DB.Model(&user).Association("CreditCard").Delete(&creditcard2) - var creditcard4 CreditCard - DB.Model(&user).Related(&creditcard4) - if creditcard4.Number != "411111111113" { - t.Errorf("Should not delete credit card when Delete a unrelated CreditCard") - } - - if DB.Model(&user).Association("CreditCard").Count() != 1 { - t.Errorf("User's credit card count should be 1") - } - - DB.Model(&user).Association("CreditCard").Delete(&creditcard3) - if !DB.Model(&user).Related(&CreditCard{}).RecordNotFound() { - t.Errorf("Should delete credit card with Delete") - } - - if DB.Model(&user).Association("CreditCard").Count() != 0 { - t.Errorf("User's credit card count should be 0 after Delete") - } - - // Clear - var creditcard5 = CreditCard{ - Number: "411111111115", - } - DB.Model(&user).Association("CreditCard").Append(&creditcard5) - - if DB.Model(&user).Related(&CreditCard{}).RecordNotFound() { - t.Errorf("Should added credit card with Append") - } - - if DB.Model(&user).Association("CreditCard").Count() != 1 { - t.Errorf("User's credit card count should be 1") - } - - DB.Model(&user).Association("CreditCard").Clear() - if !DB.Model(&user).Related(&CreditCard{}).RecordNotFound() { - t.Errorf("Credit card should be deleted with Clear") - } - - if DB.Model(&user).Association("CreditCard").Count() != 0 { - t.Errorf("User's credit card count should be 0 after Clear") - } - - // Check Association mode with soft delete - var creditcard6 = CreditCard{ - Number: "411111111116", - } - DB.Model(&user).Association("CreditCard").Append(&creditcard6) - - if count := DB.Model(&user).Association("CreditCard").Count(); count != 1 { - t.Errorf("User's credit card count should be 1 after Append, but got %v", count) - } - - DB.Delete(&creditcard6) - - if count := DB.Model(&user).Association("CreditCard").Count(); count != 0 { - t.Errorf("User's credit card count should be 0 after credit card deleted, but got %v", count) - } - - if err := DB.Model(&user).Association("CreditCard").Find(&CreditCard{}).Error; err == nil { - t.Errorf("User's creditcard is not findable after Delete") - } - - if count := DB.Unscoped().Model(&user).Association("CreditCard").Count(); count != 1 { - t.Errorf("User's credit card count should be 1 when query with Unscoped, but got %v", count) - } - - if err := DB.Unscoped().Model(&user).Association("CreditCard").Find(&CreditCard{}).Error; err != nil { - t.Errorf("User's creditcard should be findable when query with Unscoped, got %v", err) - } -} - -func TestHasOneOverrideForeignKey1(t *testing.T) { - type Profile struct { - gorm.Model - Name string - UserRefer uint - } - - type User struct { - gorm.Model - Profile Profile `gorm:"ForeignKey:UserRefer"` - } - - if relation, ok := DB.NewScope(&User{}).FieldByName("Profile"); ok { - if relation.Relationship.Kind != "has_one" || - !reflect.DeepEqual(relation.Relationship.ForeignFieldNames, []string{"UserRefer"}) || - !reflect.DeepEqual(relation.Relationship.AssociationForeignFieldNames, []string{"ID"}) { - t.Errorf("Override belongs to foreign key with tag") - } - } -} - -func TestHasOneOverrideForeignKey2(t *testing.T) { - type Profile struct { - gorm.Model - Name string - UserID uint - } - - type User struct { - gorm.Model - Refer string - Profile Profile `gorm:"ForeignKey:UserID;AssociationForeignKey:Refer"` - } - - if relation, ok := DB.NewScope(&User{}).FieldByName("Profile"); ok { - if relation.Relationship.Kind != "has_one" || - !reflect.DeepEqual(relation.Relationship.ForeignFieldNames, []string{"UserID"}) || - !reflect.DeepEqual(relation.Relationship.AssociationForeignFieldNames, []string{"Refer"}) { - t.Errorf("Override belongs to foreign key with tag") - } - } -} - -func TestHasMany(t *testing.T) { - post := Post{ - Title: "post has many", - Body: "body has many", - Comments: []*Comment{{Content: "Comment 1"}, {Content: "Comment 2"}}, - } - - if err := DB.Save(&post).Error; err != nil { - t.Error("Got errors when save post", err) - } - - for _, comment := range post.Comments { - if comment.PostId == 0 { - t.Errorf("comment's PostID should be updated") - } - } - - var compareComments = func(comments []Comment, contents []string) bool { - var commentContents []string - for _, comment := range comments { - commentContents = append(commentContents, comment.Content) - } - sort.Strings(commentContents) - sort.Strings(contents) - return reflect.DeepEqual(commentContents, contents) - } - - // Query - if DB.First(&Comment{}, "content = ?", "Comment 1").Error != nil { - t.Errorf("Comment 1 should be saved") - } - - var comments1 []Comment - DB.Model(&post).Association("Comments").Find(&comments1) - if !compareComments(comments1, []string{"Comment 1", "Comment 2"}) { - t.Errorf("Query has many relations with Association") - } - - var comments11 []Comment - DB.Model(&post).Related(&comments11) - if !compareComments(comments11, []string{"Comment 1", "Comment 2"}) { - t.Errorf("Query has many relations with Related") - } - - if DB.Model(&post).Association("Comments").Count() != 2 { - t.Errorf("Post's comments count should be 2") - } - - // Append - DB.Model(&post).Association("Comments").Append(&Comment{Content: "Comment 3"}) - - var comments2 []Comment - DB.Model(&post).Related(&comments2) - if !compareComments(comments2, []string{"Comment 1", "Comment 2", "Comment 3"}) { - t.Errorf("Append new record to has many relations") - } - - if DB.Model(&post).Association("Comments").Count() != 3 { - t.Errorf("Post's comments count should be 3 after Append") - } - - // Delete - DB.Model(&post).Association("Comments").Delete(comments11) - - var comments3 []Comment - DB.Model(&post).Related(&comments3) - if !compareComments(comments3, []string{"Comment 3"}) { - t.Errorf("Delete an existing resource for has many relations") - } - - if DB.Model(&post).Association("Comments").Count() != 1 { - t.Errorf("Post's comments count should be 1 after Delete 2") - } - - // Replace - DB.Model(&Post{Id: 999}).Association("Comments").Replace() - - var comments4 []Comment - DB.Model(&post).Related(&comments4) - if len(comments4) == 0 { - t.Errorf("Replace for other resource should not clear all comments") - } - - DB.Model(&post).Association("Comments").Replace(&Comment{Content: "Comment 4"}, &Comment{Content: "Comment 5"}) - - var comments41 []Comment - DB.Model(&post).Related(&comments41) - if !compareComments(comments41, []string{"Comment 4", "Comment 5"}) { - t.Errorf("Replace has many relations") - } - - // Clear - DB.Model(&Post{Id: 999}).Association("Comments").Clear() - - var comments5 []Comment - DB.Model(&post).Related(&comments5) - if len(comments5) == 0 { - t.Errorf("Clear should not clear all comments") - } - - DB.Model(&post).Association("Comments").Clear() - - var comments51 []Comment - DB.Model(&post).Related(&comments51) - if len(comments51) != 0 { - t.Errorf("Clear has many relations") - } - - // Check Association mode with soft delete - var comment6 = Comment{ - Content: "comment 6", - } - DB.Model(&post).Association("Comments").Append(&comment6) - - if count := DB.Model(&post).Association("Comments").Count(); count != 1 { - t.Errorf("post's comments count should be 1 after Append, but got %v", count) - } - - DB.Delete(&comment6) - - if count := DB.Model(&post).Association("Comments").Count(); count != 0 { - t.Errorf("post's comments count should be 0 after comment been deleted, but got %v", count) - } - - var comments6 []Comment - if DB.Model(&post).Association("Comments").Find(&comments6); len(comments6) != 0 { - t.Errorf("post's comments count should be 0 when find with Find, but got %v", len(comments6)) - } - - if count := DB.Unscoped().Model(&post).Association("Comments").Count(); count != 1 { - t.Errorf("post's comments count should be 1 when query with Unscoped, but got %v", count) - } - - var comments61 []Comment - if DB.Unscoped().Model(&post).Association("Comments").Find(&comments61); len(comments61) != 1 { - t.Errorf("post's comments count should be 1 when query with Unscoped, but got %v", len(comments61)) - } -} - -func TestHasManyOverrideForeignKey1(t *testing.T) { - type Profile struct { - gorm.Model - Name string - UserRefer uint - } - - type User struct { - gorm.Model - Profile []Profile `gorm:"ForeignKey:UserRefer"` - } - - if relation, ok := DB.NewScope(&User{}).FieldByName("Profile"); ok { - if relation.Relationship.Kind != "has_many" || - !reflect.DeepEqual(relation.Relationship.ForeignFieldNames, []string{"UserRefer"}) || - !reflect.DeepEqual(relation.Relationship.AssociationForeignFieldNames, []string{"ID"}) { - t.Errorf("Override belongs to foreign key with tag") - } - } -} - -func TestHasManyOverrideForeignKey2(t *testing.T) { - type Profile struct { - gorm.Model - Name string - UserID uint - } - - type User struct { - gorm.Model - Refer string - Profile []Profile `gorm:"ForeignKey:UserID;AssociationForeignKey:Refer"` - } - - if relation, ok := DB.NewScope(&User{}).FieldByName("Profile"); ok { - if relation.Relationship.Kind != "has_many" || - !reflect.DeepEqual(relation.Relationship.ForeignFieldNames, []string{"UserID"}) || - !reflect.DeepEqual(relation.Relationship.AssociationForeignFieldNames, []string{"Refer"}) { - t.Errorf("Override belongs to foreign key with tag") - } - } -} - -func TestManyToMany(t *testing.T) { - DB.Raw("delete from languages") - var languages = []Language{{Name: "ZH"}, {Name: "EN"}} - user := User{Name: "Many2Many", Languages: languages} - DB.Save(&user) - - // Query - var newLanguages []Language - DB.Model(&user).Related(&newLanguages, "Languages") - if len(newLanguages) != len([]string{"ZH", "EN"}) { - t.Errorf("Query many to many relations") - } - - DB.Model(&user).Association("Languages").Find(&newLanguages) - if len(newLanguages) != len([]string{"ZH", "EN"}) { - t.Errorf("Should be able to find many to many relations") - } - - if DB.Model(&user).Association("Languages").Count() != len([]string{"ZH", "EN"}) { - t.Errorf("Count should return correct result") - } - - // Append - DB.Model(&user).Association("Languages").Append(&Language{Name: "DE"}) - if DB.Where("name = ?", "DE").First(&Language{}).RecordNotFound() { - t.Errorf("New record should be saved when append") - } - - languageA := Language{Name: "AA"} - DB.Save(&languageA) - DB.Model(&User{Id: user.Id}).Association("Languages").Append(&languageA) - - languageC := Language{Name: "CC"} - DB.Save(&languageC) - DB.Model(&user).Association("Languages").Append(&[]Language{{Name: "BB"}, languageC}) - - DB.Model(&User{Id: user.Id}).Association("Languages").Append(&[]Language{{Name: "DD"}, {Name: "EE"}}) - - totalLanguages := []string{"ZH", "EN", "DE", "AA", "BB", "CC", "DD", "EE"} - - if DB.Model(&user).Association("Languages").Count() != len(totalLanguages) { - t.Errorf("All appended languages should be saved") - } - - // Delete - user.Languages = []Language{} - DB.Model(&user).Association("Languages").Find(&user.Languages) - - var language Language - DB.Where("name = ?", "EE").First(&language) - DB.Model(&user).Association("Languages").Delete(language, &language) - - if DB.Model(&user).Association("Languages").Count() != len(totalLanguages)-1 || len(user.Languages) != len(totalLanguages)-1 { - t.Errorf("Relations should be deleted with Delete") - } - if DB.Where("name = ?", "EE").First(&Language{}).RecordNotFound() { - t.Errorf("Language EE should not be deleted") - } - - DB.Where("name IN (?)", []string{"CC", "DD"}).Find(&languages) - - user2 := User{Name: "Many2Many_User2", Languages: languages} - DB.Save(&user2) - - DB.Model(&user).Association("Languages").Delete(languages, &languages) - if DB.Model(&user).Association("Languages").Count() != len(totalLanguages)-3 || len(user.Languages) != len(totalLanguages)-3 { - t.Errorf("Relations should be deleted with Delete") - } - - if DB.Model(&user2).Association("Languages").Count() == 0 { - t.Errorf("Other user's relations should not be deleted") - } - - // Replace - var languageB Language - DB.Where("name = ?", "BB").First(&languageB) - DB.Model(&user).Association("Languages").Replace(languageB) - if len(user.Languages) != 1 || DB.Model(&user).Association("Languages").Count() != 1 { - t.Errorf("Relations should be replaced") - } - - DB.Model(&user).Association("Languages").Replace() - if len(user.Languages) != 0 || DB.Model(&user).Association("Languages").Count() != 0 { - t.Errorf("Relations should be replaced with empty") - } - - DB.Model(&user).Association("Languages").Replace(&[]Language{{Name: "FF"}, {Name: "JJ"}}) - if len(user.Languages) != 2 || DB.Model(&user).Association("Languages").Count() != len([]string{"FF", "JJ"}) { - t.Errorf("Relations should be replaced") - } - - // Clear - DB.Model(&user).Association("Languages").Clear() - if len(user.Languages) != 0 || DB.Model(&user).Association("Languages").Count() != 0 { - t.Errorf("Relations should be cleared") - } - - // Check Association mode with soft delete - var language6 = Language{ - Name: "language 6", - } - DB.Model(&user).Association("Languages").Append(&language6) - - if count := DB.Model(&user).Association("Languages").Count(); count != 1 { - t.Errorf("user's languages count should be 1 after Append, but got %v", count) - } - - DB.Delete(&language6) - - if count := DB.Model(&user).Association("Languages").Count(); count != 0 { - t.Errorf("user's languages count should be 0 after language been deleted, but got %v", count) - } - - var languages6 []Language - if DB.Model(&user).Association("Languages").Find(&languages6); len(languages6) != 0 { - t.Errorf("user's languages count should be 0 when find with Find, but got %v", len(languages6)) - } - - if count := DB.Unscoped().Model(&user).Association("Languages").Count(); count != 1 { - t.Errorf("user's languages count should be 1 when query with Unscoped, but got %v", count) - } - - var languages61 []Language - if DB.Unscoped().Model(&user).Association("Languages").Find(&languages61); len(languages61) != 1 { - t.Errorf("user's languages count should be 1 when query with Unscoped, but got %v", len(languages61)) - } -} - -func TestRelated(t *testing.T) { - user := User{ - Name: "jinzhu", - BillingAddress: Address{Address1: "Billing Address - Address 1"}, - ShippingAddress: Address{Address1: "Shipping Address - Address 1"}, - Emails: []Email{{Email: "jinzhu@example.com"}, {Email: "jinzhu-2@example@example.com"}}, - CreditCard: CreditCard{Number: "1234567890"}, - Company: Company{Name: "company1"}, - } - - if err := DB.Save(&user).Error; err != nil { - t.Errorf("No error should happen when saving user") - } - - if user.CreditCard.ID == 0 { - t.Errorf("After user save, credit card should have id") - } - - if user.BillingAddress.ID == 0 { - t.Errorf("After user save, billing address should have id") - } - - if user.Emails[0].Id == 0 { - t.Errorf("After user save, billing address should have id") - } - - var emails []Email - DB.Model(&user).Related(&emails) - if len(emails) != 2 { - t.Errorf("Should have two emails") - } - - var emails2 []Email - DB.Model(&user).Where("email = ?", "jinzhu@example.com").Related(&emails2) - if len(emails2) != 1 { - t.Errorf("Should have two emails") - } - - var emails3 []*Email - DB.Model(&user).Related(&emails3) - if len(emails3) != 2 { - t.Errorf("Should have two emails") - } - - var user1 User - DB.Model(&user).Related(&user1.Emails) - if len(user1.Emails) != 2 { - t.Errorf("Should have only one email match related condition") - } - - var address1 Address - DB.Model(&user).Related(&address1, "BillingAddressId") - if address1.Address1 != "Billing Address - Address 1" { - t.Errorf("Should get billing address from user correctly") - } - - user1 = User{} - DB.Model(&address1).Related(&user1, "BillingAddressId") - if DB.NewRecord(user1) { - t.Errorf("Should get user from address correctly") - } - - var user2 User - DB.Model(&emails[0]).Related(&user2) - if user2.Id != user.Id || user2.Name != user.Name { - t.Errorf("Should get user from email correctly") - } - - var creditcard CreditCard - var user3 User - DB.First(&creditcard, "number = ?", "1234567890") - DB.Model(&creditcard).Related(&user3) - if user3.Id != user.Id || user3.Name != user.Name { - t.Errorf("Should get user from credit card correctly") - } - - if !DB.Model(&CreditCard{}).Related(&User{}).RecordNotFound() { - t.Errorf("RecordNotFound for Related") - } - - var company Company - if DB.Model(&user).Related(&company, "Company").RecordNotFound() || company.Name != "company1" { - t.Errorf("RecordNotFound for Related") - } -} - -func TestForeignKey(t *testing.T) { - for _, structField := range DB.NewScope(&User{}).GetStructFields() { - for _, foreignKey := range []string{"BillingAddressID", "ShippingAddressId", "CompanyID"} { - if structField.Name == foreignKey && !structField.IsForeignKey { - t.Errorf(fmt.Sprintf("%v should be foreign key", foreignKey)) - } - } - } - - for _, structField := range DB.NewScope(&Email{}).GetStructFields() { - for _, foreignKey := range []string{"UserId"} { - if structField.Name == foreignKey && !structField.IsForeignKey { - t.Errorf(fmt.Sprintf("%v should be foreign key", foreignKey)) - } - } - } - - for _, structField := range DB.NewScope(&Post{}).GetStructFields() { - for _, foreignKey := range []string{"CategoryId", "MainCategoryId"} { - if structField.Name == foreignKey && !structField.IsForeignKey { - t.Errorf(fmt.Sprintf("%v should be foreign key", foreignKey)) - } - } - } - - for _, structField := range DB.NewScope(&Comment{}).GetStructFields() { - for _, foreignKey := range []string{"PostId"} { - if structField.Name == foreignKey && !structField.IsForeignKey { - t.Errorf(fmt.Sprintf("%v should be foreign key", foreignKey)) - } - } - } -} - -func testForeignKey(t *testing.T, source interface{}, sourceFieldName string, target interface{}, targetFieldName string) { - if dialect := os.Getenv("GORM_DIALECT"); dialect == "" || dialect == "sqlite" { - // sqlite does not support ADD CONSTRAINT in ALTER TABLE - return - } - targetScope := DB.NewScope(target) - targetTableName := targetScope.TableName() - modelScope := DB.NewScope(source) - modelField, ok := modelScope.FieldByName(sourceFieldName) - if !ok { - t.Fatalf(fmt.Sprintf("Failed to get field by name: %v", sourceFieldName)) - } - targetField, ok := targetScope.FieldByName(targetFieldName) - if !ok { - t.Fatalf(fmt.Sprintf("Failed to get field by name: %v", targetFieldName)) - } - dest := fmt.Sprintf("%v(%v)", targetTableName, targetField.DBName) - err := DB.Model(source).AddForeignKey(modelField.DBName, dest, "CASCADE", "CASCADE").Error - if err != nil { - t.Fatalf(fmt.Sprintf("Failed to create foreign key: %v", err)) - } -} - -func TestLongForeignKey(t *testing.T) { - testForeignKey(t, &NotSoLongTableName{}, "ReallyLongThingID", &ReallyLongTableNameToTestMySQLNameLengthLimit{}, "ID") -} - -func TestLongForeignKeyWithShortDest(t *testing.T) { - testForeignKey(t, &ReallyLongThingThatReferencesShort{}, "ShortID", &Short{}, "ID") -} - -func TestHasManyChildrenWithOneStruct(t *testing.T) { - category := Category{ - Name: "main", - Categories: []Category{ - {Name: "sub1"}, - {Name: "sub2"}, - }, - } - - DB.Save(&category) -} - -func TestAutoSaveBelongsToAssociation(t *testing.T) { - type Company struct { - gorm.Model - Name string - } - - type User struct { - gorm.Model - Name string - CompanyID uint - Company Company `gorm:"association_autoupdate:false;association_autocreate:false;"` - } - - DB.Where("name = ?", "auto_save_association").Delete(&Company{}) - DB.AutoMigrate(&Company{}, &User{}) - - DB.Save(&User{Name: "jinzhu", Company: Company{Name: "auto_save_association"}}) - - if !DB.Where("name = ?", "auto_save_association").First(&Company{}).RecordNotFound() { - t.Errorf("Company auto_save_association should not have been saved when autosave is false") - } - - // if foreign key is set, this should be saved even if association isn't - company := Company{Name: "auto_save_association"} - DB.Save(&company) - - company.Name = "auto_save_association_new_name" - user := User{Name: "jinzhu", Company: company} - - DB.Save(&user) - - if !DB.Where("name = ?", "auto_save_association_new_name").First(&Company{}).RecordNotFound() { - t.Errorf("Company should not have been updated") - } - - if DB.Where("id = ? AND company_id = ?", user.ID, company.ID).First(&User{}).RecordNotFound() { - t.Errorf("User's foreign key should have been saved") - } - - user2 := User{Name: "jinzhu_2", Company: Company{Name: "auto_save_association_2"}} - DB.Set("gorm:association_autocreate", true).Save(&user2) - if DB.Where("name = ?", "auto_save_association_2").First(&Company{}).RecordNotFound() { - t.Errorf("Company auto_save_association_2 should been created when autocreate is true") - } - - user2.Company.Name = "auto_save_association_2_newname" - DB.Set("gorm:association_autoupdate", true).Save(&user2) - - if DB.Where("name = ?", "auto_save_association_2_newname").First(&Company{}).RecordNotFound() { - t.Errorf("Company should been updated") - } -} - -func TestAutoSaveHasOneAssociation(t *testing.T) { - type Company struct { - gorm.Model - UserID uint - Name string - } - - type User struct { - gorm.Model - Name string - Company Company `gorm:"association_autoupdate:false;association_autocreate:false;"` - } - - DB.Where("name = ?", "auto_save_has_one_association").Delete(&Company{}) - DB.AutoMigrate(&Company{}, &User{}) - - DB.Save(&User{Name: "jinzhu", Company: Company{Name: "auto_save_has_one_association"}}) - - if !DB.Where("name = ?", "auto_save_has_one_association").First(&Company{}).RecordNotFound() { - t.Errorf("Company auto_save_has_one_association should not have been saved when autosave is false") - } - - company := Company{Name: "auto_save_has_one_association"} - DB.Save(&company) - - company.Name = "auto_save_has_one_association_new_name" - user := User{Name: "jinzhu", Company: company} - - DB.Save(&user) - - if !DB.Where("name = ?", "auto_save_has_one_association_new_name").First(&Company{}).RecordNotFound() { - t.Errorf("Company should not have been updated") - } - - if !DB.Where("name = ? AND user_id = ?", "auto_save_has_one_association", user.ID).First(&Company{}).RecordNotFound() { - t.Errorf("Company should not have been updated") - } - - if user.Company.UserID == 0 { - t.Errorf("UserID should be assigned") - } - - company.Name = "auto_save_has_one_association_2_new_name" - DB.Set("gorm:association_autoupdate", true).Save(&user) - - if DB.Where("name = ? AND user_id = ?", "auto_save_has_one_association_new_name", user.ID).First(&Company{}).RecordNotFound() { - t.Errorf("Company should been updated") - } - - user2 := User{Name: "jinzhu_2", Company: Company{Name: "auto_save_has_one_association_2"}} - DB.Set("gorm:association_autocreate", true).Save(&user2) - if DB.Where("name = ?", "auto_save_has_one_association_2").First(&Company{}).RecordNotFound() { - t.Errorf("Company auto_save_has_one_association_2 should been created when autocreate is true") - } -} - -func TestAutoSaveMany2ManyAssociation(t *testing.T) { - type Company struct { - gorm.Model - Name string - } - - type User struct { - gorm.Model - Name string - Companies []Company `gorm:"many2many:user_companies;association_autoupdate:false;association_autocreate:false;"` - } - - DB.AutoMigrate(&Company{}, &User{}) - - DB.Save(&User{Name: "jinzhu", Companies: []Company{{Name: "auto_save_m2m_association"}}}) - - if !DB.Where("name = ?", "auto_save_m2m_association").First(&Company{}).RecordNotFound() { - t.Errorf("Company auto_save_m2m_association should not have been saved when autosave is false") - } - - company := Company{Name: "auto_save_m2m_association"} - DB.Save(&company) - - company.Name = "auto_save_m2m_association_new_name" - user := User{Name: "jinzhu", Companies: []Company{company, {Name: "auto_save_m2m_association_new_name_2"}}} - - DB.Save(&user) - - if !DB.Where("name = ?", "auto_save_m2m_association_new_name").First(&Company{}).RecordNotFound() { - t.Errorf("Company should not have been updated") - } - - if !DB.Where("name = ?", "auto_save_m2m_association_new_name_2").First(&Company{}).RecordNotFound() { - t.Errorf("Company should not been created") - } - - if DB.Model(&user).Association("Companies").Count() != 1 { - t.Errorf("Relationship should been saved") - } - - DB.Set("gorm:association_autoupdate", true).Set("gorm:association_autocreate", true).Save(&user) - - if DB.Where("name = ?", "auto_save_m2m_association_new_name").First(&Company{}).RecordNotFound() { - t.Errorf("Company should been updated") - } - - if DB.Where("name = ?", "auto_save_m2m_association_new_name_2").First(&Company{}).RecordNotFound() { - t.Errorf("Company should been created") - } - - if DB.Model(&user).Association("Companies").Count() != 2 { - t.Errorf("Relationship should been updated") - } -} diff --git a/deps/github.com/jinzhu/gorm/callback.go b/deps/github.com/jinzhu/gorm/callback.go deleted file mode 100644 index a4382147b..000000000 --- a/deps/github.com/jinzhu/gorm/callback.go +++ /dev/null @@ -1,242 +0,0 @@ -package gorm - -import "log" - -// DefaultCallback default callbacks defined by gorm -var DefaultCallback = &Callback{} - -// Callback is a struct that contains all CRUD callbacks -// Field `creates` contains callbacks will be call when creating object -// Field `updates` contains callbacks will be call when updating object -// Field `deletes` contains callbacks will be call when deleting object -// Field `queries` contains callbacks will be call when querying object with query methods like Find, First, Related, Association... -// Field `rowQueries` contains callbacks will be call when querying object with Row, Rows... -// Field `processors` contains all callback processors, will be used to generate above callbacks in order -type Callback struct { - creates []*func(scope *Scope) - updates []*func(scope *Scope) - deletes []*func(scope *Scope) - queries []*func(scope *Scope) - rowQueries []*func(scope *Scope) - processors []*CallbackProcessor -} - -// CallbackProcessor contains callback informations -type CallbackProcessor struct { - name string // current callback's name - before string // register current callback before a callback - after string // register current callback after a callback - replace bool // replace callbacks with same name - remove bool // delete callbacks with same name - kind string // callback type: create, update, delete, query, row_query - processor *func(scope *Scope) // callback handler - parent *Callback -} - -func (c *Callback) clone() *Callback { - return &Callback{ - creates: c.creates, - updates: c.updates, - deletes: c.deletes, - queries: c.queries, - rowQueries: c.rowQueries, - processors: c.processors, - } -} - -// Create could be used to register callbacks for creating object -// db.Callback().Create().After("gorm:create").Register("plugin:run_after_create", func(*Scope) { -// // business logic -// ... -// -// // set error if some thing wrong happened, will rollback the creating -// scope.Err(errors.New("error")) -// }) -func (c *Callback) Create() *CallbackProcessor { - return &CallbackProcessor{kind: "create", parent: c} -} - -// Update could be used to register callbacks for updating object, refer `Create` for usage -func (c *Callback) Update() *CallbackProcessor { - return &CallbackProcessor{kind: "update", parent: c} -} - -// Delete could be used to register callbacks for deleting object, refer `Create` for usage -func (c *Callback) Delete() *CallbackProcessor { - return &CallbackProcessor{kind: "delete", parent: c} -} - -// Query could be used to register callbacks for querying objects with query methods like `Find`, `First`, `Related`, `Association`... -// Refer `Create` for usage -func (c *Callback) Query() *CallbackProcessor { - return &CallbackProcessor{kind: "query", parent: c} -} - -// RowQuery could be used to register callbacks for querying objects with `Row`, `Rows`, refer `Create` for usage -func (c *Callback) RowQuery() *CallbackProcessor { - return &CallbackProcessor{kind: "row_query", parent: c} -} - -// After insert a new callback after callback `callbackName`, refer `Callbacks.Create` -func (cp *CallbackProcessor) After(callbackName string) *CallbackProcessor { - cp.after = callbackName - return cp -} - -// Before insert a new callback before callback `callbackName`, refer `Callbacks.Create` -func (cp *CallbackProcessor) Before(callbackName string) *CallbackProcessor { - cp.before = callbackName - return cp -} - -// Register a new callback, refer `Callbacks.Create` -func (cp *CallbackProcessor) Register(callbackName string, callback func(scope *Scope)) { - if cp.kind == "row_query" { - if cp.before == "" && cp.after == "" && callbackName != "gorm:row_query" { - log.Printf("Registing RowQuery callback %v without specify order with Before(), After(), applying Before('gorm:row_query') by default for compatibility...\n", callbackName) - cp.before = "gorm:row_query" - } - } - - cp.name = callbackName - cp.processor = &callback - cp.parent.processors = append(cp.parent.processors, cp) - cp.parent.reorder() -} - -// Remove a registered callback -// db.Callback().Create().Remove("gorm:update_time_stamp_when_create") -func (cp *CallbackProcessor) Remove(callbackName string) { - log.Printf("[info] removing callback `%v` from %v\n", callbackName, fileWithLineNum()) - cp.name = callbackName - cp.remove = true - cp.parent.processors = append(cp.parent.processors, cp) - cp.parent.reorder() -} - -// Replace a registered callback with new callback -// db.Callback().Create().Replace("gorm:update_time_stamp_when_create", func(*Scope) { -// scope.SetColumn("Created", now) -// scope.SetColumn("Updated", now) -// }) -func (cp *CallbackProcessor) Replace(callbackName string, callback func(scope *Scope)) { - log.Printf("[info] replacing callback `%v` from %v\n", callbackName, fileWithLineNum()) - cp.name = callbackName - cp.processor = &callback - cp.replace = true - cp.parent.processors = append(cp.parent.processors, cp) - cp.parent.reorder() -} - -// Get registered callback -// db.Callback().Create().Get("gorm:create") -func (cp *CallbackProcessor) Get(callbackName string) (callback func(scope *Scope)) { - for _, p := range cp.parent.processors { - if p.name == callbackName && p.kind == cp.kind && !cp.remove { - return *p.processor - } - } - return nil -} - -// getRIndex get right index from string slice -func getRIndex(strs []string, str string) int { - for i := len(strs) - 1; i >= 0; i-- { - if strs[i] == str { - return i - } - } - return -1 -} - -// sortProcessors sort callback processors based on its before, after, remove, replace -func sortProcessors(cps []*CallbackProcessor) []*func(scope *Scope) { - var ( - allNames, sortedNames []string - sortCallbackProcessor func(c *CallbackProcessor) - ) - - for _, cp := range cps { - // show warning message the callback name already exists - if index := getRIndex(allNames, cp.name); index > -1 && !cp.replace && !cp.remove { - log.Printf("[warning] duplicated callback `%v` from %v\n", cp.name, fileWithLineNum()) - } - allNames = append(allNames, cp.name) - } - - sortCallbackProcessor = func(c *CallbackProcessor) { - if getRIndex(sortedNames, c.name) == -1 { // if not sorted - if c.before != "" { // if defined before callback - if index := getRIndex(sortedNames, c.before); index != -1 { - // if before callback already sorted, append current callback just after it - sortedNames = append(sortedNames[:index], append([]string{c.name}, sortedNames[index:]...)...) - } else if index := getRIndex(allNames, c.before); index != -1 { - // if before callback exists but haven't sorted, append current callback to last - sortedNames = append(sortedNames, c.name) - sortCallbackProcessor(cps[index]) - } - } - - if c.after != "" { // if defined after callback - if index := getRIndex(sortedNames, c.after); index != -1 { - // if after callback already sorted, append current callback just before it - sortedNames = append(sortedNames[:index+1], append([]string{c.name}, sortedNames[index+1:]...)...) - } else if index := getRIndex(allNames, c.after); index != -1 { - // if after callback exists but haven't sorted - cp := cps[index] - // set after callback's before callback to current callback - if cp.before == "" { - cp.before = c.name - } - sortCallbackProcessor(cp) - } - } - - // if current callback haven't been sorted, append it to last - if getRIndex(sortedNames, c.name) == -1 { - sortedNames = append(sortedNames, c.name) - } - } - } - - for _, cp := range cps { - sortCallbackProcessor(cp) - } - - var sortedFuncs []*func(scope *Scope) - for _, name := range sortedNames { - if index := getRIndex(allNames, name); !cps[index].remove { - sortedFuncs = append(sortedFuncs, cps[index].processor) - } - } - - return sortedFuncs -} - -// reorder all registered processors, and reset CRUD callbacks -func (c *Callback) reorder() { - var creates, updates, deletes, queries, rowQueries []*CallbackProcessor - - for _, processor := range c.processors { - if processor.name != "" { - switch processor.kind { - case "create": - creates = append(creates, processor) - case "update": - updates = append(updates, processor) - case "delete": - deletes = append(deletes, processor) - case "query": - queries = append(queries, processor) - case "row_query": - rowQueries = append(rowQueries, processor) - } - } - } - - c.creates = sortProcessors(creates) - c.updates = sortProcessors(updates) - c.deletes = sortProcessors(deletes) - c.queries = sortProcessors(queries) - c.rowQueries = sortProcessors(rowQueries) -} diff --git a/deps/github.com/jinzhu/gorm/callback_create.go b/deps/github.com/jinzhu/gorm/callback_create.go deleted file mode 100644 index e7fe6f868..000000000 --- a/deps/github.com/jinzhu/gorm/callback_create.go +++ /dev/null @@ -1,164 +0,0 @@ -package gorm - -import ( - "fmt" - "strings" -) - -// Define callbacks for creating -func init() { - DefaultCallback.Create().Register("gorm:begin_transaction", beginTransactionCallback) - DefaultCallback.Create().Register("gorm:before_create", beforeCreateCallback) - DefaultCallback.Create().Register("gorm:save_before_associations", saveBeforeAssociationsCallback) - DefaultCallback.Create().Register("gorm:update_time_stamp", updateTimeStampForCreateCallback) - DefaultCallback.Create().Register("gorm:create", createCallback) - DefaultCallback.Create().Register("gorm:force_reload_after_create", forceReloadAfterCreateCallback) - DefaultCallback.Create().Register("gorm:save_after_associations", saveAfterAssociationsCallback) - DefaultCallback.Create().Register("gorm:after_create", afterCreateCallback) - DefaultCallback.Create().Register("gorm:commit_or_rollback_transaction", commitOrRollbackTransactionCallback) -} - -// beforeCreateCallback will invoke `BeforeSave`, `BeforeCreate` method before creating -func beforeCreateCallback(scope *Scope) { - if !scope.HasError() { - scope.CallMethod("BeforeSave") - } - if !scope.HasError() { - scope.CallMethod("BeforeCreate") - } -} - -// updateTimeStampForCreateCallback will set `CreatedAt`, `UpdatedAt` when creating -func updateTimeStampForCreateCallback(scope *Scope) { - if !scope.HasError() { - now := NowFunc() - - if createdAtField, ok := scope.FieldByName("CreatedAt"); ok { - if createdAtField.IsBlank { - createdAtField.Set(now) - } - } - - if updatedAtField, ok := scope.FieldByName("UpdatedAt"); ok { - if updatedAtField.IsBlank { - updatedAtField.Set(now) - } - } - } -} - -// createCallback the callback used to insert data into database -func createCallback(scope *Scope) { - if !scope.HasError() { - defer scope.trace(NowFunc()) - - var ( - columns, placeholders []string - blankColumnsWithDefaultValue []string - ) - - for _, field := range scope.Fields() { - if scope.changeableField(field) { - if field.IsNormal { - if field.IsBlank && field.HasDefaultValue { - blankColumnsWithDefaultValue = append(blankColumnsWithDefaultValue, scope.Quote(field.DBName)) - scope.InstanceSet("gorm:blank_columns_with_default_value", blankColumnsWithDefaultValue) - } else if !field.IsPrimaryKey || !field.IsBlank { - columns = append(columns, scope.Quote(field.DBName)) - placeholders = append(placeholders, scope.AddToVars(field.Field.Interface())) - } - } else if field.Relationship != nil && field.Relationship.Kind == "belongs_to" { - for _, foreignKey := range field.Relationship.ForeignDBNames { - if foreignField, ok := scope.FieldByName(foreignKey); ok && !scope.changeableField(foreignField) { - columns = append(columns, scope.Quote(foreignField.DBName)) - placeholders = append(placeholders, scope.AddToVars(foreignField.Field.Interface())) - } - } - } - } - } - - var ( - returningColumn = "*" - quotedTableName = scope.QuotedTableName() - primaryField = scope.PrimaryField() - extraOption string - ) - - if str, ok := scope.Get("gorm:insert_option"); ok { - extraOption = fmt.Sprint(str) - } - - if primaryField != nil { - returningColumn = scope.Quote(primaryField.DBName) - } - - lastInsertIDReturningSuffix := scope.Dialect().LastInsertIDReturningSuffix(quotedTableName, returningColumn) - - if len(columns) == 0 { - scope.Raw(fmt.Sprintf( - "INSERT INTO %v %v%v%v", - quotedTableName, - scope.Dialect().DefaultValueStr(), - addExtraSpaceIfExist(extraOption), - addExtraSpaceIfExist(lastInsertIDReturningSuffix), - )) - } else { - scope.Raw(fmt.Sprintf( - "INSERT INTO %v (%v) VALUES (%v)%v%v", - scope.QuotedTableName(), - strings.Join(columns, ","), - strings.Join(placeholders, ","), - addExtraSpaceIfExist(extraOption), - addExtraSpaceIfExist(lastInsertIDReturningSuffix), - )) - } - - // execute create sql - if lastInsertIDReturningSuffix == "" || primaryField == nil { - if result, err := scope.SQLDB().Exec(scope.SQL, scope.SQLVars...); scope.Err(err) == nil { - // set rows affected count - scope.db.RowsAffected, _ = result.RowsAffected() - - // set primary value to primary field - if primaryField != nil && primaryField.IsBlank { - if primaryValue, err := result.LastInsertId(); scope.Err(err) == nil { - scope.Err(primaryField.Set(primaryValue)) - } - } - } - } else { - if primaryField.Field.CanAddr() { - if err := scope.SQLDB().QueryRow(scope.SQL, scope.SQLVars...).Scan(primaryField.Field.Addr().Interface()); scope.Err(err) == nil { - primaryField.IsBlank = false - scope.db.RowsAffected = 1 - } - } else { - scope.Err(ErrUnaddressable) - } - } - } -} - -// forceReloadAfterCreateCallback will reload columns that having default value, and set it back to current object -func forceReloadAfterCreateCallback(scope *Scope) { - if blankColumnsWithDefaultValue, ok := scope.InstanceGet("gorm:blank_columns_with_default_value"); ok { - db := scope.DB().New().Table(scope.TableName()).Select(blankColumnsWithDefaultValue.([]string)) - for _, field := range scope.Fields() { - if field.IsPrimaryKey && !field.IsBlank { - db = db.Where(fmt.Sprintf("%v = ?", field.DBName), field.Field.Interface()) - } - } - db.Scan(scope.Value) - } -} - -// afterCreateCallback will invoke `AfterCreate`, `AfterSave` method after creating -func afterCreateCallback(scope *Scope) { - if !scope.HasError() { - scope.CallMethod("AfterCreate") - } - if !scope.HasError() { - scope.CallMethod("AfterSave") - } -} diff --git a/deps/github.com/jinzhu/gorm/callback_delete.go b/deps/github.com/jinzhu/gorm/callback_delete.go deleted file mode 100644 index 73d908806..000000000 --- a/deps/github.com/jinzhu/gorm/callback_delete.go +++ /dev/null @@ -1,63 +0,0 @@ -package gorm - -import ( - "errors" - "fmt" -) - -// Define callbacks for deleting -func init() { - DefaultCallback.Delete().Register("gorm:begin_transaction", beginTransactionCallback) - DefaultCallback.Delete().Register("gorm:before_delete", beforeDeleteCallback) - DefaultCallback.Delete().Register("gorm:delete", deleteCallback) - DefaultCallback.Delete().Register("gorm:after_delete", afterDeleteCallback) - DefaultCallback.Delete().Register("gorm:commit_or_rollback_transaction", commitOrRollbackTransactionCallback) -} - -// beforeDeleteCallback will invoke `BeforeDelete` method before deleting -func beforeDeleteCallback(scope *Scope) { - if scope.DB().HasBlockGlobalUpdate() && !scope.hasConditions() { - scope.Err(errors.New("Missing WHERE clause while deleting")) - return - } - if !scope.HasError() { - scope.CallMethod("BeforeDelete") - } -} - -// deleteCallback used to delete data from database or set deleted_at to current time (when using with soft delete) -func deleteCallback(scope *Scope) { - if !scope.HasError() { - var extraOption string - if str, ok := scope.Get("gorm:delete_option"); ok { - extraOption = fmt.Sprint(str) - } - - deletedAtField, hasDeletedAtField := scope.FieldByName("DeletedAt") - - if !scope.Search.Unscoped && hasDeletedAtField { - scope.Raw(fmt.Sprintf( - "UPDATE %v SET %v=%v%v%v", - scope.QuotedTableName(), - scope.Quote(deletedAtField.DBName), - scope.AddToVars(NowFunc()), - addExtraSpaceIfExist(scope.CombinedConditionSql()), - addExtraSpaceIfExist(extraOption), - )).Exec() - } else { - scope.Raw(fmt.Sprintf( - "DELETE FROM %v%v%v", - scope.QuotedTableName(), - addExtraSpaceIfExist(scope.CombinedConditionSql()), - addExtraSpaceIfExist(extraOption), - )).Exec() - } - } -} - -// afterDeleteCallback will invoke `AfterDelete` method after deleting -func afterDeleteCallback(scope *Scope) { - if !scope.HasError() { - scope.CallMethod("AfterDelete") - } -} diff --git a/deps/github.com/jinzhu/gorm/callback_query.go b/deps/github.com/jinzhu/gorm/callback_query.go deleted file mode 100644 index ba10cc7db..000000000 --- a/deps/github.com/jinzhu/gorm/callback_query.go +++ /dev/null @@ -1,99 +0,0 @@ -package gorm - -import ( - "errors" - "fmt" - "reflect" -) - -// Define callbacks for querying -func init() { - DefaultCallback.Query().Register("gorm:query", queryCallback) - DefaultCallback.Query().Register("gorm:preload", preloadCallback) - DefaultCallback.Query().Register("gorm:after_query", afterQueryCallback) -} - -// queryCallback used to query data from database -func queryCallback(scope *Scope) { - if _, skip := scope.InstanceGet("gorm:skip_query_callback"); skip { - return - } - - defer scope.trace(NowFunc()) - - var ( - isSlice, isPtr bool - resultType reflect.Type - results = scope.IndirectValue() - ) - - if orderBy, ok := scope.Get("gorm:order_by_primary_key"); ok { - if primaryField := scope.PrimaryField(); primaryField != nil { - scope.Search.Order(fmt.Sprintf("%v.%v %v", scope.QuotedTableName(), scope.Quote(primaryField.DBName), orderBy)) - } - } - - if value, ok := scope.Get("gorm:query_destination"); ok { - results = indirect(reflect.ValueOf(value)) - } - - if kind := results.Kind(); kind == reflect.Slice { - isSlice = true - resultType = results.Type().Elem() - results.Set(reflect.MakeSlice(results.Type(), 0, 0)) - - if resultType.Kind() == reflect.Ptr { - isPtr = true - resultType = resultType.Elem() - } - } else if kind != reflect.Struct { - scope.Err(errors.New("unsupported destination, should be slice or struct")) - return - } - - scope.prepareQuerySQL() - - if !scope.HasError() { - scope.db.RowsAffected = 0 - if str, ok := scope.Get("gorm:query_option"); ok { - scope.SQL += addExtraSpaceIfExist(fmt.Sprint(str)) - } - - if rows, err := scope.SQLDB().Query(scope.SQL, scope.SQLVars...); scope.Err(err) == nil { - defer rows.Close() - - columns, _ := rows.Columns() - for rows.Next() { - scope.db.RowsAffected++ - - elem := results - if isSlice { - elem = reflect.New(resultType).Elem() - } - - scope.scan(rows, columns, scope.New(elem.Addr().Interface()).Fields()) - - if isSlice { - if isPtr { - results.Set(reflect.Append(results, elem.Addr())) - } else { - results.Set(reflect.Append(results, elem)) - } - } - } - - if err := rows.Err(); err != nil { - scope.Err(err) - } else if scope.db.RowsAffected == 0 && !isSlice { - scope.Err(ErrRecordNotFound) - } - } - } -} - -// afterQueryCallback will invoke `AfterFind` method after querying -func afterQueryCallback(scope *Scope) { - if !scope.HasError() { - scope.CallMethod("AfterFind") - } -} diff --git a/deps/github.com/jinzhu/gorm/callback_query_preload.go b/deps/github.com/jinzhu/gorm/callback_query_preload.go deleted file mode 100644 index 30f6b585a..000000000 --- a/deps/github.com/jinzhu/gorm/callback_query_preload.go +++ /dev/null @@ -1,387 +0,0 @@ -package gorm - -import ( - "errors" - "fmt" - "reflect" - "strconv" - "strings" -) - -// preloadCallback used to preload associations -func preloadCallback(scope *Scope) { - if _, skip := scope.InstanceGet("gorm:skip_query_callback"); skip { - return - } - - if _, ok := scope.Get("gorm:auto_preload"); ok { - autoPreload(scope) - } - - if scope.Search.preload == nil || scope.HasError() { - return - } - - var ( - preloadedMap = map[string]bool{} - fields = scope.Fields() - ) - - for _, preload := range scope.Search.preload { - var ( - preloadFields = strings.Split(preload.schema, ".") - currentScope = scope - currentFields = fields - ) - - for idx, preloadField := range preloadFields { - var currentPreloadConditions []interface{} - - if currentScope == nil { - continue - } - - // if not preloaded - if preloadKey := strings.Join(preloadFields[:idx+1], "."); !preloadedMap[preloadKey] { - - // assign search conditions to last preload - if idx == len(preloadFields)-1 { - currentPreloadConditions = preload.conditions - } - - for _, field := range currentFields { - if field.Name != preloadField || field.Relationship == nil { - continue - } - - switch field.Relationship.Kind { - case "has_one": - currentScope.handleHasOnePreload(field, currentPreloadConditions) - case "has_many": - currentScope.handleHasManyPreload(field, currentPreloadConditions) - case "belongs_to": - currentScope.handleBelongsToPreload(field, currentPreloadConditions) - case "many_to_many": - currentScope.handleManyToManyPreload(field, currentPreloadConditions) - default: - scope.Err(errors.New("unsupported relation")) - } - - preloadedMap[preloadKey] = true - break - } - - if !preloadedMap[preloadKey] { - scope.Err(fmt.Errorf("can't preload field %s for %s", preloadField, currentScope.GetModelStruct().ModelType)) - return - } - } - - // preload next level - if idx < len(preloadFields)-1 { - currentScope = currentScope.getColumnAsScope(preloadField) - if currentScope != nil { - currentFields = currentScope.Fields() - } - } - } - } -} - -func autoPreload(scope *Scope) { - for _, field := range scope.Fields() { - if field.Relationship == nil { - continue - } - - if val, ok := field.TagSettings["PRELOAD"]; ok { - if preload, err := strconv.ParseBool(val); err != nil { - scope.Err(errors.New("invalid preload option")) - return - } else if !preload { - continue - } - } - - scope.Search.Preload(field.Name) - } -} - -func (scope *Scope) generatePreloadDBWithConditions(conditions []interface{}) (*DB, []interface{}) { - var ( - preloadDB = scope.NewDB() - preloadConditions []interface{} - ) - - for _, condition := range conditions { - if scopes, ok := condition.(func(*DB) *DB); ok { - preloadDB = scopes(preloadDB) - } else { - preloadConditions = append(preloadConditions, condition) - } - } - - return preloadDB, preloadConditions -} - -// handleHasOnePreload used to preload has one associations -func (scope *Scope) handleHasOnePreload(field *Field, conditions []interface{}) { - relation := field.Relationship - - // get relations's primary keys - primaryKeys := scope.getColumnAsArray(relation.AssociationForeignFieldNames, scope.Value) - if len(primaryKeys) == 0 { - return - } - - // preload conditions - preloadDB, preloadConditions := scope.generatePreloadDBWithConditions(conditions) - - // find relations - query := fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relation.ForeignDBNames), toQueryMarks(primaryKeys)) - values := toQueryValues(primaryKeys) - if relation.PolymorphicType != "" { - query += fmt.Sprintf(" AND %v = ?", scope.Quote(relation.PolymorphicDBName)) - values = append(values, relation.PolymorphicValue) - } - - results := makeSlice(field.Struct.Type) - scope.Err(preloadDB.Where(query, values...).Find(results, preloadConditions...).Error) - - // assign find results - var ( - resultsValue = indirect(reflect.ValueOf(results)) - indirectScopeValue = scope.IndirectValue() - ) - - if indirectScopeValue.Kind() == reflect.Slice { - for j := 0; j < indirectScopeValue.Len(); j++ { - for i := 0; i < resultsValue.Len(); i++ { - result := resultsValue.Index(i) - foreignValues := getValueFromFields(result, relation.ForeignFieldNames) - if indirectValue := indirect(indirectScopeValue.Index(j)); equalAsString(getValueFromFields(indirectValue, relation.AssociationForeignFieldNames), foreignValues) { - indirectValue.FieldByName(field.Name).Set(result) - break - } - } - } - } else { - for i := 0; i < resultsValue.Len(); i++ { - result := resultsValue.Index(i) - scope.Err(field.Set(result)) - } - } -} - -// handleHasManyPreload used to preload has many associations -func (scope *Scope) handleHasManyPreload(field *Field, conditions []interface{}) { - relation := field.Relationship - - // get relations's primary keys - primaryKeys := scope.getColumnAsArray(relation.AssociationForeignFieldNames, scope.Value) - if len(primaryKeys) == 0 { - return - } - - // preload conditions - preloadDB, preloadConditions := scope.generatePreloadDBWithConditions(conditions) - - // find relations - query := fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relation.ForeignDBNames), toQueryMarks(primaryKeys)) - values := toQueryValues(primaryKeys) - if relation.PolymorphicType != "" { - query += fmt.Sprintf(" AND %v = ?", scope.Quote(relation.PolymorphicDBName)) - values = append(values, relation.PolymorphicValue) - } - - results := makeSlice(field.Struct.Type) - scope.Err(preloadDB.Where(query, values...).Find(results, preloadConditions...).Error) - - // assign find results - var ( - resultsValue = indirect(reflect.ValueOf(results)) - indirectScopeValue = scope.IndirectValue() - ) - - if indirectScopeValue.Kind() == reflect.Slice { - preloadMap := make(map[string][]reflect.Value) - for i := 0; i < resultsValue.Len(); i++ { - result := resultsValue.Index(i) - foreignValues := getValueFromFields(result, relation.ForeignFieldNames) - preloadMap[toString(foreignValues)] = append(preloadMap[toString(foreignValues)], result) - } - - for j := 0; j < indirectScopeValue.Len(); j++ { - object := indirect(indirectScopeValue.Index(j)) - objectRealValue := getValueFromFields(object, relation.AssociationForeignFieldNames) - f := object.FieldByName(field.Name) - if results, ok := preloadMap[toString(objectRealValue)]; ok { - f.Set(reflect.Append(f, results...)) - } else { - f.Set(reflect.MakeSlice(f.Type(), 0, 0)) - } - } - } else { - scope.Err(field.Set(resultsValue)) - } -} - -// handleBelongsToPreload used to preload belongs to associations -func (scope *Scope) handleBelongsToPreload(field *Field, conditions []interface{}) { - relation := field.Relationship - - // preload conditions - preloadDB, preloadConditions := scope.generatePreloadDBWithConditions(conditions) - - // get relations's primary keys - primaryKeys := scope.getColumnAsArray(relation.ForeignFieldNames, scope.Value) - if len(primaryKeys) == 0 { - return - } - - // find relations - results := makeSlice(field.Struct.Type) - scope.Err(preloadDB.Where(fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, relation.AssociationForeignDBNames), toQueryMarks(primaryKeys)), toQueryValues(primaryKeys)...).Find(results, preloadConditions...).Error) - - // assign find results - var ( - resultsValue = indirect(reflect.ValueOf(results)) - indirectScopeValue = scope.IndirectValue() - ) - - for i := 0; i < resultsValue.Len(); i++ { - result := resultsValue.Index(i) - if indirectScopeValue.Kind() == reflect.Slice { - value := getValueFromFields(result, relation.AssociationForeignFieldNames) - for j := 0; j < indirectScopeValue.Len(); j++ { - object := indirect(indirectScopeValue.Index(j)) - if equalAsString(getValueFromFields(object, relation.ForeignFieldNames), value) { - object.FieldByName(field.Name).Set(result) - } - } - } else { - scope.Err(field.Set(result)) - } - } -} - -// handleManyToManyPreload used to preload many to many associations -func (scope *Scope) handleManyToManyPreload(field *Field, conditions []interface{}) { - var ( - relation = field.Relationship - joinTableHandler = relation.JoinTableHandler - fieldType = field.Struct.Type.Elem() - foreignKeyValue interface{} - foreignKeyType = reflect.ValueOf(&foreignKeyValue).Type() - linkHash = map[string][]reflect.Value{} - isPtr bool - ) - - if fieldType.Kind() == reflect.Ptr { - isPtr = true - fieldType = fieldType.Elem() - } - - var sourceKeys = []string{} - for _, key := range joinTableHandler.SourceForeignKeys() { - sourceKeys = append(sourceKeys, key.DBName) - } - - // preload conditions - preloadDB, preloadConditions := scope.generatePreloadDBWithConditions(conditions) - - // generate query with join table - newScope := scope.New(reflect.New(fieldType).Interface()) - preloadDB = preloadDB.Table(newScope.TableName()).Model(newScope.Value) - - if len(preloadDB.search.selects) == 0 { - preloadDB = preloadDB.Select("*") - } - - preloadDB = joinTableHandler.JoinWith(joinTableHandler, preloadDB, scope.Value) - - // preload inline conditions - if len(preloadConditions) > 0 { - preloadDB = preloadDB.Where(preloadConditions[0], preloadConditions[1:]...) - } - - rows, err := preloadDB.Rows() - - if scope.Err(err) != nil { - return - } - defer rows.Close() - - columns, _ := rows.Columns() - for rows.Next() { - var ( - elem = reflect.New(fieldType).Elem() - fields = scope.New(elem.Addr().Interface()).Fields() - ) - - // register foreign keys in join tables - var joinTableFields []*Field - for _, sourceKey := range sourceKeys { - joinTableFields = append(joinTableFields, &Field{StructField: &StructField{DBName: sourceKey, IsNormal: true}, Field: reflect.New(foreignKeyType).Elem()}) - } - - scope.scan(rows, columns, append(fields, joinTableFields...)) - - scope.New(elem.Addr().Interface()). - InstanceSet("gorm:skip_query_callback", true). - callCallbacks(scope.db.parent.callbacks.queries) - - var foreignKeys = make([]interface{}, len(sourceKeys)) - // generate hashed forkey keys in join table - for idx, joinTableField := range joinTableFields { - if !joinTableField.Field.IsNil() { - foreignKeys[idx] = joinTableField.Field.Elem().Interface() - } - } - hashedSourceKeys := toString(foreignKeys) - - if isPtr { - linkHash[hashedSourceKeys] = append(linkHash[hashedSourceKeys], elem.Addr()) - } else { - linkHash[hashedSourceKeys] = append(linkHash[hashedSourceKeys], elem) - } - } - - if err := rows.Err(); err != nil { - scope.Err(err) - } - - // assign find results - var ( - indirectScopeValue = scope.IndirectValue() - fieldsSourceMap = map[string][]reflect.Value{} - foreignFieldNames = []string{} - ) - - for _, dbName := range relation.ForeignFieldNames { - if field, ok := scope.FieldByName(dbName); ok { - foreignFieldNames = append(foreignFieldNames, field.Name) - } - } - - if indirectScopeValue.Kind() == reflect.Slice { - for j := 0; j < indirectScopeValue.Len(); j++ { - object := indirect(indirectScopeValue.Index(j)) - key := toString(getValueFromFields(object, foreignFieldNames)) - fieldsSourceMap[key] = append(fieldsSourceMap[key], object.FieldByName(field.Name)) - } - } else if indirectScopeValue.IsValid() { - key := toString(getValueFromFields(indirectScopeValue, foreignFieldNames)) - fieldsSourceMap[key] = append(fieldsSourceMap[key], indirectScopeValue.FieldByName(field.Name)) - } - for source, link := range linkHash { - for i, field := range fieldsSourceMap[source] { - //If not 0 this means Value is a pointer and we already added preloaded models to it - if fieldsSourceMap[source][i].Len() != 0 { - continue - } - field.Set(reflect.Append(fieldsSourceMap[source][i], link...)) - } - - } -} diff --git a/deps/github.com/jinzhu/gorm/callback_row_query.go b/deps/github.com/jinzhu/gorm/callback_row_query.go deleted file mode 100644 index c2ff4a083..000000000 --- a/deps/github.com/jinzhu/gorm/callback_row_query.go +++ /dev/null @@ -1,30 +0,0 @@ -package gorm - -import "database/sql" - -// Define callbacks for row query -func init() { - DefaultCallback.RowQuery().Register("gorm:row_query", rowQueryCallback) -} - -type RowQueryResult struct { - Row *sql.Row -} - -type RowsQueryResult struct { - Rows *sql.Rows - Error error -} - -// queryCallback used to query data from database -func rowQueryCallback(scope *Scope) { - if result, ok := scope.InstanceGet("row_query_result"); ok { - scope.prepareQuerySQL() - - if rowResult, ok := result.(*RowQueryResult); ok { - rowResult.Row = scope.SQLDB().QueryRow(scope.SQL, scope.SQLVars...) - } else if rowsResult, ok := result.(*RowsQueryResult); ok { - rowsResult.Rows, rowsResult.Error = scope.SQLDB().Query(scope.SQL, scope.SQLVars...) - } - } -} diff --git a/deps/github.com/jinzhu/gorm/callback_save.go b/deps/github.com/jinzhu/gorm/callback_save.go deleted file mode 100644 index ef2671418..000000000 --- a/deps/github.com/jinzhu/gorm/callback_save.go +++ /dev/null @@ -1,170 +0,0 @@ -package gorm - -import ( - "reflect" - "strings" -) - -func beginTransactionCallback(scope *Scope) { - scope.Begin() -} - -func commitOrRollbackTransactionCallback(scope *Scope) { - scope.CommitOrRollback() -} - -func saveAssociationCheck(scope *Scope, field *Field) (autoUpdate bool, autoCreate bool, saveReference bool, r *Relationship) { - checkTruth := func(value interface{}) bool { - if v, ok := value.(bool); ok && !v { - return false - } - - if v, ok := value.(string); ok { - v = strings.ToLower(v) - if v == "false" || v != "skip" { - return false - } - } - - return true - } - - if scope.changeableField(field) && !field.IsBlank && !field.IsIgnored { - if r = field.Relationship; r != nil { - autoUpdate, autoCreate, saveReference = true, true, true - - if value, ok := scope.Get("gorm:save_associations"); ok { - autoUpdate = checkTruth(value) - autoCreate = autoUpdate - } else if value, ok := field.TagSettings["SAVE_ASSOCIATIONS"]; ok { - autoUpdate = checkTruth(value) - autoCreate = autoUpdate - } - - if value, ok := scope.Get("gorm:association_autoupdate"); ok { - autoUpdate = checkTruth(value) - } else if value, ok := field.TagSettings["ASSOCIATION_AUTOUPDATE"]; ok { - autoUpdate = checkTruth(value) - } - - if value, ok := scope.Get("gorm:association_autocreate"); ok { - autoCreate = checkTruth(value) - } else if value, ok := field.TagSettings["ASSOCIATION_AUTOCREATE"]; ok { - autoCreate = checkTruth(value) - } - - if value, ok := scope.Get("gorm:association_save_reference"); ok { - saveReference = checkTruth(value) - } else if value, ok := field.TagSettings["ASSOCIATION_SAVE_REFERENCE"]; ok { - saveReference = checkTruth(value) - } - } - } - - return -} - -func saveBeforeAssociationsCallback(scope *Scope) { - for _, field := range scope.Fields() { - autoUpdate, autoCreate, saveReference, relationship := saveAssociationCheck(scope, field) - - if relationship != nil && relationship.Kind == "belongs_to" { - fieldValue := field.Field.Addr().Interface() - newScope := scope.New(fieldValue) - - if newScope.PrimaryKeyZero() { - if autoCreate { - scope.Err(scope.NewDB().Save(fieldValue).Error) - } - } else if autoUpdate { - scope.Err(scope.NewDB().Save(fieldValue).Error) - } - - if saveReference { - if len(relationship.ForeignFieldNames) != 0 { - // set value's foreign key - for idx, fieldName := range relationship.ForeignFieldNames { - associationForeignName := relationship.AssociationForeignDBNames[idx] - if foreignField, ok := scope.New(fieldValue).FieldByName(associationForeignName); ok { - scope.Err(scope.SetColumn(fieldName, foreignField.Field.Interface())) - } - } - } - } - } - } -} - -func saveAfterAssociationsCallback(scope *Scope) { - for _, field := range scope.Fields() { - autoUpdate, autoCreate, saveReference, relationship := saveAssociationCheck(scope, field) - - if relationship != nil && (relationship.Kind == "has_one" || relationship.Kind == "has_many" || relationship.Kind == "many_to_many") { - value := field.Field - - switch value.Kind() { - case reflect.Slice: - for i := 0; i < value.Len(); i++ { - newDB := scope.NewDB() - elem := value.Index(i).Addr().Interface() - newScope := newDB.NewScope(elem) - - if saveReference { - if relationship.JoinTableHandler == nil && len(relationship.ForeignFieldNames) != 0 { - for idx, fieldName := range relationship.ForeignFieldNames { - associationForeignName := relationship.AssociationForeignDBNames[idx] - if f, ok := scope.FieldByName(associationForeignName); ok { - scope.Err(newScope.SetColumn(fieldName, f.Field.Interface())) - } - } - } - - if relationship.PolymorphicType != "" { - scope.Err(newScope.SetColumn(relationship.PolymorphicType, relationship.PolymorphicValue)) - } - } - - if newScope.PrimaryKeyZero() { - if autoCreate { - scope.Err(newDB.Save(elem).Error) - } - } else if autoUpdate { - scope.Err(newDB.Save(elem).Error) - } - - if !scope.New(newScope.Value).PrimaryKeyZero() && saveReference { - if joinTableHandler := relationship.JoinTableHandler; joinTableHandler != nil { - scope.Err(joinTableHandler.Add(joinTableHandler, newDB, scope.Value, newScope.Value)) - } - } - } - default: - elem := value.Addr().Interface() - newScope := scope.New(elem) - - if saveReference { - if len(relationship.ForeignFieldNames) != 0 { - for idx, fieldName := range relationship.ForeignFieldNames { - associationForeignName := relationship.AssociationForeignDBNames[idx] - if f, ok := scope.FieldByName(associationForeignName); ok { - scope.Err(newScope.SetColumn(fieldName, f.Field.Interface())) - } - } - } - - if relationship.PolymorphicType != "" { - scope.Err(newScope.SetColumn(relationship.PolymorphicType, relationship.PolymorphicValue)) - } - } - - if newScope.PrimaryKeyZero() { - if autoCreate { - scope.Err(scope.NewDB().Save(elem).Error) - } - } else if autoUpdate { - scope.Err(scope.NewDB().Save(elem).Error) - } - } - } - } -} diff --git a/deps/github.com/jinzhu/gorm/callback_system_test.go b/deps/github.com/jinzhu/gorm/callback_system_test.go deleted file mode 100644 index 13ca3f428..000000000 --- a/deps/github.com/jinzhu/gorm/callback_system_test.go +++ /dev/null @@ -1,112 +0,0 @@ -package gorm - -import ( - "reflect" - "runtime" - "strings" - "testing" -) - -func equalFuncs(funcs []*func(s *Scope), fnames []string) bool { - var names []string - for _, f := range funcs { - fnames := strings.Split(runtime.FuncForPC(reflect.ValueOf(*f).Pointer()).Name(), ".") - names = append(names, fnames[len(fnames)-1]) - } - return reflect.DeepEqual(names, fnames) -} - -func create(s *Scope) {} -func beforeCreate1(s *Scope) {} -func beforeCreate2(s *Scope) {} -func afterCreate1(s *Scope) {} -func afterCreate2(s *Scope) {} - -func TestRegisterCallback(t *testing.T) { - var callback = &Callback{} - - callback.Create().Register("before_create1", beforeCreate1) - callback.Create().Register("before_create2", beforeCreate2) - callback.Create().Register("create", create) - callback.Create().Register("after_create1", afterCreate1) - callback.Create().Register("after_create2", afterCreate2) - - if !equalFuncs(callback.creates, []string{"beforeCreate1", "beforeCreate2", "create", "afterCreate1", "afterCreate2"}) { - t.Errorf("register callback") - } -} - -func TestRegisterCallbackWithOrder(t *testing.T) { - var callback1 = &Callback{} - callback1.Create().Register("before_create1", beforeCreate1) - callback1.Create().Register("create", create) - callback1.Create().Register("after_create1", afterCreate1) - callback1.Create().Before("after_create1").Register("after_create2", afterCreate2) - if !equalFuncs(callback1.creates, []string{"beforeCreate1", "create", "afterCreate2", "afterCreate1"}) { - t.Errorf("register callback with order") - } - - var callback2 = &Callback{} - - callback2.Update().Register("create", create) - callback2.Update().Before("create").Register("before_create1", beforeCreate1) - callback2.Update().After("after_create2").Register("after_create1", afterCreate1) - callback2.Update().Before("before_create1").Register("before_create2", beforeCreate2) - callback2.Update().Register("after_create2", afterCreate2) - - if !equalFuncs(callback2.updates, []string{"beforeCreate2", "beforeCreate1", "create", "afterCreate2", "afterCreate1"}) { - t.Errorf("register callback with order") - } -} - -func TestRegisterCallbackWithComplexOrder(t *testing.T) { - var callback1 = &Callback{} - - callback1.Query().Before("after_create1").After("before_create1").Register("create", create) - callback1.Query().Register("before_create1", beforeCreate1) - callback1.Query().Register("after_create1", afterCreate1) - - if !equalFuncs(callback1.queries, []string{"beforeCreate1", "create", "afterCreate1"}) { - t.Errorf("register callback with order") - } - - var callback2 = &Callback{} - - callback2.Delete().Before("after_create1").After("before_create1").Register("create", create) - callback2.Delete().Before("create").Register("before_create1", beforeCreate1) - callback2.Delete().After("before_create1").Register("before_create2", beforeCreate2) - callback2.Delete().Register("after_create1", afterCreate1) - callback2.Delete().After("after_create1").Register("after_create2", afterCreate2) - - if !equalFuncs(callback2.deletes, []string{"beforeCreate1", "beforeCreate2", "create", "afterCreate1", "afterCreate2"}) { - t.Errorf("register callback with order") - } -} - -func replaceCreate(s *Scope) {} - -func TestReplaceCallback(t *testing.T) { - var callback = &Callback{} - - callback.Create().Before("after_create1").After("before_create1").Register("create", create) - callback.Create().Register("before_create1", beforeCreate1) - callback.Create().Register("after_create1", afterCreate1) - callback.Create().Replace("create", replaceCreate) - - if !equalFuncs(callback.creates, []string{"beforeCreate1", "replaceCreate", "afterCreate1"}) { - t.Errorf("replace callback") - } -} - -func TestRemoveCallback(t *testing.T) { - var callback = &Callback{} - - callback.Create().Before("after_create1").After("before_create1").Register("create", create) - callback.Create().Register("before_create1", beforeCreate1) - callback.Create().Register("after_create1", afterCreate1) - callback.Create().Remove("create") - - if !equalFuncs(callback.creates, []string{"beforeCreate1", "afterCreate1"}) { - t.Errorf("remove callback") - } -} diff --git a/deps/github.com/jinzhu/gorm/callback_update.go b/deps/github.com/jinzhu/gorm/callback_update.go deleted file mode 100644 index 373bd7266..000000000 --- a/deps/github.com/jinzhu/gorm/callback_update.go +++ /dev/null @@ -1,119 +0,0 @@ -package gorm - -import ( - "errors" - "fmt" - "sort" - "strings" -) - -// Define callbacks for updating -func init() { - DefaultCallback.Update().Register("gorm:assign_updating_attributes", assignUpdatingAttributesCallback) - DefaultCallback.Update().Register("gorm:begin_transaction", beginTransactionCallback) - DefaultCallback.Update().Register("gorm:before_update", beforeUpdateCallback) - DefaultCallback.Update().Register("gorm:save_before_associations", saveBeforeAssociationsCallback) - DefaultCallback.Update().Register("gorm:update_time_stamp", updateTimeStampForUpdateCallback) - DefaultCallback.Update().Register("gorm:update", updateCallback) - DefaultCallback.Update().Register("gorm:save_after_associations", saveAfterAssociationsCallback) - DefaultCallback.Update().Register("gorm:after_update", afterUpdateCallback) - DefaultCallback.Update().Register("gorm:commit_or_rollback_transaction", commitOrRollbackTransactionCallback) -} - -// assignUpdatingAttributesCallback assign updating attributes to model -func assignUpdatingAttributesCallback(scope *Scope) { - if attrs, ok := scope.InstanceGet("gorm:update_interface"); ok { - if updateMaps, hasUpdate := scope.updatedAttrsWithValues(attrs); hasUpdate { - scope.InstanceSet("gorm:update_attrs", updateMaps) - } else { - scope.SkipLeft() - } - } -} - -// beforeUpdateCallback will invoke `BeforeSave`, `BeforeUpdate` method before updating -func beforeUpdateCallback(scope *Scope) { - if scope.DB().HasBlockGlobalUpdate() && !scope.hasConditions() { - scope.Err(errors.New("Missing WHERE clause while updating")) - return - } - if _, ok := scope.Get("gorm:update_column"); !ok { - if !scope.HasError() { - scope.CallMethod("BeforeSave") - } - if !scope.HasError() { - scope.CallMethod("BeforeUpdate") - } - } -} - -// updateTimeStampForUpdateCallback will set `UpdatedAt` when updating -func updateTimeStampForUpdateCallback(scope *Scope) { - if _, ok := scope.Get("gorm:update_column"); !ok { - scope.SetColumn("UpdatedAt", NowFunc()) - } -} - -// updateCallback the callback used to update data to database -func updateCallback(scope *Scope) { - if !scope.HasError() { - var sqls []string - - if updateAttrs, ok := scope.InstanceGet("gorm:update_attrs"); ok { - // Sort the column names so that the generated SQL is the same every time. - updateMap := updateAttrs.(map[string]interface{}) - var columns []string - for c := range updateMap { - columns = append(columns, c) - } - sort.Strings(columns) - - for _, column := range columns { - value := updateMap[column] - sqls = append(sqls, fmt.Sprintf("%v = %v", scope.Quote(column), scope.AddToVars(value))) - } - } else { - for _, field := range scope.Fields() { - if scope.changeableField(field) { - if !field.IsPrimaryKey && field.IsNormal { - sqls = append(sqls, fmt.Sprintf("%v = %v", scope.Quote(field.DBName), scope.AddToVars(field.Field.Interface()))) - } else if relationship := field.Relationship; relationship != nil && relationship.Kind == "belongs_to" { - for _, foreignKey := range relationship.ForeignDBNames { - if foreignField, ok := scope.FieldByName(foreignKey); ok && !scope.changeableField(foreignField) { - sqls = append(sqls, - fmt.Sprintf("%v = %v", scope.Quote(foreignField.DBName), scope.AddToVars(foreignField.Field.Interface()))) - } - } - } - } - } - } - - var extraOption string - if str, ok := scope.Get("gorm:update_option"); ok { - extraOption = fmt.Sprint(str) - } - - if len(sqls) > 0 { - scope.Raw(fmt.Sprintf( - "UPDATE %v SET %v%v%v", - scope.QuotedTableName(), - strings.Join(sqls, ", "), - addExtraSpaceIfExist(scope.CombinedConditionSql()), - addExtraSpaceIfExist(extraOption), - )).Exec() - } - } -} - -// afterUpdateCallback will invoke `AfterUpdate`, `AfterSave` method after updating -func afterUpdateCallback(scope *Scope) { - if _, ok := scope.Get("gorm:update_column"); !ok { - if !scope.HasError() { - scope.CallMethod("AfterUpdate") - } - if !scope.HasError() { - scope.CallMethod("AfterSave") - } - } -} diff --git a/deps/github.com/jinzhu/gorm/callbacks_test.go b/deps/github.com/jinzhu/gorm/callbacks_test.go deleted file mode 100644 index a58913d76..000000000 --- a/deps/github.com/jinzhu/gorm/callbacks_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package gorm_test - -import ( - "errors" - - "github.com/jinzhu/gorm" - - "reflect" - "testing" -) - -func (s *Product) BeforeCreate() (err error) { - if s.Code == "Invalid" { - err = errors.New("invalid product") - } - s.BeforeCreateCallTimes = s.BeforeCreateCallTimes + 1 - return -} - -func (s *Product) BeforeUpdate() (err error) { - if s.Code == "dont_update" { - err = errors.New("can't update") - } - s.BeforeUpdateCallTimes = s.BeforeUpdateCallTimes + 1 - return -} - -func (s *Product) BeforeSave() (err error) { - if s.Code == "dont_save" { - err = errors.New("can't save") - } - s.BeforeSaveCallTimes = s.BeforeSaveCallTimes + 1 - return -} - -func (s *Product) AfterFind() { - s.AfterFindCallTimes = s.AfterFindCallTimes + 1 -} - -func (s *Product) AfterCreate(tx *gorm.DB) { - tx.Model(s).UpdateColumn(Product{AfterCreateCallTimes: s.AfterCreateCallTimes + 1}) -} - -func (s *Product) AfterUpdate() { - s.AfterUpdateCallTimes = s.AfterUpdateCallTimes + 1 -} - -func (s *Product) AfterSave() (err error) { - if s.Code == "after_save_error" { - err = errors.New("can't save") - } - s.AfterSaveCallTimes = s.AfterSaveCallTimes + 1 - return -} - -func (s *Product) BeforeDelete() (err error) { - if s.Code == "dont_delete" { - err = errors.New("can't delete") - } - s.BeforeDeleteCallTimes = s.BeforeDeleteCallTimes + 1 - return -} - -func (s *Product) AfterDelete() (err error) { - if s.Code == "after_delete_error" { - err = errors.New("can't delete") - } - s.AfterDeleteCallTimes = s.AfterDeleteCallTimes + 1 - return -} - -func (s *Product) GetCallTimes() []int64 { - return []int64{s.BeforeCreateCallTimes, s.BeforeSaveCallTimes, s.BeforeUpdateCallTimes, s.AfterCreateCallTimes, s.AfterSaveCallTimes, s.AfterUpdateCallTimes, s.BeforeDeleteCallTimes, s.AfterDeleteCallTimes, s.AfterFindCallTimes} -} - -func TestRunCallbacks(t *testing.T) { - p := Product{Code: "unique_code", Price: 100} - DB.Save(&p) - - if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 1, 0, 1, 1, 0, 0, 0, 0}) { - t.Errorf("Callbacks should be invoked successfully, %v", p.GetCallTimes()) - } - - DB.Where("Code = ?", "unique_code").First(&p) - if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 1, 0, 1, 0, 0, 0, 0, 1}) { - t.Errorf("After callbacks values are not saved, %v", p.GetCallTimes()) - } - - p.Price = 200 - DB.Save(&p) - if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 2, 1, 1, 1, 1, 0, 0, 1}) { - t.Errorf("After update callbacks should be invoked successfully, %v", p.GetCallTimes()) - } - - var products []Product - DB.Find(&products, "code = ?", "unique_code") - if products[0].AfterFindCallTimes != 2 { - t.Errorf("AfterFind callbacks should work with slice") - } - - DB.Where("Code = ?", "unique_code").First(&p) - if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 2, 1, 1, 0, 0, 0, 0, 2}) { - t.Errorf("After update callbacks values are not saved, %v", p.GetCallTimes()) - } - - DB.Delete(&p) - if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 2, 1, 1, 0, 0, 1, 1, 2}) { - t.Errorf("After delete callbacks should be invoked successfully, %v", p.GetCallTimes()) - } - - if DB.Where("Code = ?", "unique_code").First(&p).Error == nil { - t.Errorf("Can't find a deleted record") - } -} - -func TestCallbacksWithErrors(t *testing.T) { - p := Product{Code: "Invalid", Price: 100} - if DB.Save(&p).Error == nil { - t.Errorf("An error from before create callbacks happened when create with invalid value") - } - - if DB.Where("code = ?", "Invalid").First(&Product{}).Error == nil { - t.Errorf("Should not save record that have errors") - } - - if DB.Save(&Product{Code: "dont_save", Price: 100}).Error == nil { - t.Errorf("An error from after create callbacks happened when create with invalid value") - } - - p2 := Product{Code: "update_callback", Price: 100} - DB.Save(&p2) - - p2.Code = "dont_update" - if DB.Save(&p2).Error == nil { - t.Errorf("An error from before update callbacks happened when update with invalid value") - } - - if DB.Where("code = ?", "update_callback").First(&Product{}).Error != nil { - t.Errorf("Record Should not be updated due to errors happened in before update callback") - } - - if DB.Where("code = ?", "dont_update").First(&Product{}).Error == nil { - t.Errorf("Record Should not be updated due to errors happened in before update callback") - } - - p2.Code = "dont_save" - if DB.Save(&p2).Error == nil { - t.Errorf("An error from before save callbacks happened when update with invalid value") - } - - p3 := Product{Code: "dont_delete", Price: 100} - DB.Save(&p3) - if DB.Delete(&p3).Error == nil { - t.Errorf("An error from before delete callbacks happened when delete") - } - - if DB.Where("Code = ?", "dont_delete").First(&p3).Error != nil { - t.Errorf("An error from before delete callbacks happened") - } - - p4 := Product{Code: "after_save_error", Price: 100} - DB.Save(&p4) - if err := DB.First(&Product{}, "code = ?", "after_save_error").Error; err == nil { - t.Errorf("Record should be reverted if get an error in after save callback") - } - - p5 := Product{Code: "after_delete_error", Price: 100} - DB.Save(&p5) - if err := DB.First(&Product{}, "code = ?", "after_delete_error").Error; err != nil { - t.Errorf("Record should be found") - } - - DB.Delete(&p5) - if err := DB.First(&Product{}, "code = ?", "after_delete_error").Error; err != nil { - t.Errorf("Record shouldn't be deleted because of an error happened in after delete callback") - } -} diff --git a/deps/github.com/jinzhu/gorm/create_test.go b/deps/github.com/jinzhu/gorm/create_test.go deleted file mode 100644 index 925606437..000000000 --- a/deps/github.com/jinzhu/gorm/create_test.go +++ /dev/null @@ -1,231 +0,0 @@ -package gorm_test - -import ( - "os" - "reflect" - "testing" - "time" - - "github.com/jinzhu/now" -) - -func TestCreate(t *testing.T) { - float := 35.03554004971999 - now := time.Now() - user := User{Name: "CreateUser", Age: 18, Birthday: &now, UserNum: Num(111), PasswordHash: []byte{'f', 'a', 'k', '4'}, Latitude: float} - - if !DB.NewRecord(user) || !DB.NewRecord(&user) { - t.Error("User should be new record before create") - } - - if count := DB.Save(&user).RowsAffected; count != 1 { - t.Error("There should be one record be affected when create record") - } - - if DB.NewRecord(user) || DB.NewRecord(&user) { - t.Error("User should not new record after save") - } - - var newUser User - if err := DB.First(&newUser, user.Id).Error; err != nil { - t.Errorf("No error should happen, but got %v", err) - } - - if !reflect.DeepEqual(newUser.PasswordHash, []byte{'f', 'a', 'k', '4'}) { - t.Errorf("User's PasswordHash should be saved ([]byte)") - } - - if newUser.Age != 18 { - t.Errorf("User's Age should be saved (int)") - } - - if newUser.UserNum != Num(111) { - t.Errorf("User's UserNum should be saved (custom type), but got %v", newUser.UserNum) - } - - if newUser.Latitude != float { - t.Errorf("Float64 should not be changed after save") - } - - if user.CreatedAt.IsZero() { - t.Errorf("Should have created_at after create") - } - - if newUser.CreatedAt.IsZero() { - t.Errorf("Should have created_at after create") - } - - DB.Model(user).Update("name", "create_user_new_name") - DB.First(&user, user.Id) - if user.CreatedAt.Format(time.RFC3339Nano) != newUser.CreatedAt.Format(time.RFC3339Nano) { - t.Errorf("CreatedAt should not be changed after update") - } -} - -func TestCreateEmptyStrut(t *testing.T) { - type EmptyStruct struct { - ID uint - } - DB.AutoMigrate(&EmptyStruct{}) - - if err := DB.Create(&EmptyStruct{}).Error; err != nil { - t.Errorf("No error should happen when creating user, but got %v", err) - } -} - -func TestCreateWithExistingTimestamp(t *testing.T) { - user := User{Name: "CreateUserExistingTimestamp"} - - timeA := now.MustParse("2016-01-01") - user.CreatedAt = timeA - user.UpdatedAt = timeA - DB.Save(&user) - - if user.CreatedAt.UTC().Format(time.RFC3339) != timeA.UTC().Format(time.RFC3339) { - t.Errorf("CreatedAt should not be changed") - } - - if user.UpdatedAt.UTC().Format(time.RFC3339) != timeA.UTC().Format(time.RFC3339) { - t.Errorf("UpdatedAt should not be changed") - } - - var newUser User - DB.First(&newUser, user.Id) - - if newUser.CreatedAt.UTC().Format(time.RFC3339) != timeA.UTC().Format(time.RFC3339) { - t.Errorf("CreatedAt should not be changed") - } - - if newUser.UpdatedAt.UTC().Format(time.RFC3339) != timeA.UTC().Format(time.RFC3339) { - t.Errorf("UpdatedAt should not be changed") - } -} - -type AutoIncrementUser struct { - User - Sequence uint `gorm:"AUTO_INCREMENT"` -} - -func TestCreateWithAutoIncrement(t *testing.T) { - if dialect := os.Getenv("GORM_DIALECT"); dialect != "postgres" { - t.Skip("Skipping this because only postgres properly support auto_increment on a non-primary_key column") - } - - DB.AutoMigrate(&AutoIncrementUser{}) - - user1 := AutoIncrementUser{} - user2 := AutoIncrementUser{} - - DB.Create(&user1) - DB.Create(&user2) - - if user2.Sequence-user1.Sequence != 1 { - t.Errorf("Auto increment should apply on Sequence") - } -} - -func TestCreateWithNoGORMPrimayKey(t *testing.T) { - if dialect := os.Getenv("GORM_DIALECT"); dialect == "mssql" { - t.Skip("Skipping this because MSSQL will return identity only if the table has an Id column") - } - - jt := JoinTable{From: 1, To: 2} - err := DB.Create(&jt).Error - if err != nil { - t.Errorf("No error should happen when create a record without a GORM primary key. But in the database this primary key exists and is the union of 2 or more fields\n But got: %s", err) - } -} - -func TestCreateWithNoStdPrimaryKeyAndDefaultValues(t *testing.T) { - animal := Animal{Name: "Ferdinand"} - if DB.Save(&animal).Error != nil { - t.Errorf("No error should happen when create a record without std primary key") - } - - if animal.Counter == 0 { - t.Errorf("No std primary key should be filled value after create") - } - - if animal.Name != "Ferdinand" { - t.Errorf("Default value should be overrided") - } - - // Test create with default value not overrided - an := Animal{From: "nerdz"} - - if DB.Save(&an).Error != nil { - t.Errorf("No error should happen when create an record without std primary key") - } - - // We must fetch the value again, to have the default fields updated - // (We can't do this in the update statements, since sql default can be expressions - // And be different from the fields' type (eg. a time.Time fields has a default value of "now()" - DB.Model(Animal{}).Where(&Animal{Counter: an.Counter}).First(&an) - - if an.Name != "galeone" { - t.Errorf("Default value should fill the field. But got %v", an.Name) - } -} - -func TestAnonymousScanner(t *testing.T) { - user := User{Name: "anonymous_scanner", Role: Role{Name: "admin"}} - DB.Save(&user) - - var user2 User - DB.First(&user2, "name = ?", "anonymous_scanner") - if user2.Role.Name != "admin" { - t.Errorf("Should be able to get anonymous scanner") - } - - if !user2.Role.IsAdmin() { - t.Errorf("Should be able to get anonymous scanner") - } -} - -func TestAnonymousField(t *testing.T) { - user := User{Name: "anonymous_field", Company: Company{Name: "company"}} - DB.Save(&user) - - var user2 User - DB.First(&user2, "name = ?", "anonymous_field") - DB.Model(&user2).Related(&user2.Company) - if user2.Company.Name != "company" { - t.Errorf("Should be able to get anonymous field") - } -} - -func TestSelectWithCreate(t *testing.T) { - user := getPreparedUser("select_user", "select_with_create") - DB.Select("Name", "BillingAddress", "CreditCard", "Company", "Emails").Create(user) - - var queryuser User - DB.Preload("BillingAddress").Preload("ShippingAddress"). - Preload("CreditCard").Preload("Emails").Preload("Company").First(&queryuser, user.Id) - - if queryuser.Name != user.Name || queryuser.Age == user.Age { - t.Errorf("Should only create users with name column") - } - - if queryuser.BillingAddressID.Int64 == 0 || queryuser.ShippingAddressId != 0 || - queryuser.CreditCard.ID == 0 || len(queryuser.Emails) == 0 { - t.Errorf("Should only create selected relationships") - } -} - -func TestOmitWithCreate(t *testing.T) { - user := getPreparedUser("omit_user", "omit_with_create") - DB.Omit("Name", "BillingAddress", "CreditCard", "Company", "Emails").Create(user) - - var queryuser User - DB.Preload("BillingAddress").Preload("ShippingAddress"). - Preload("CreditCard").Preload("Emails").Preload("Company").First(&queryuser, user.Id) - - if queryuser.Name == user.Name || queryuser.Age != user.Age { - t.Errorf("Should only create users with age column") - } - - if queryuser.BillingAddressID.Int64 != 0 || queryuser.ShippingAddressId == 0 || - queryuser.CreditCard.ID != 0 || len(queryuser.Emails) != 0 { - t.Errorf("Should not create omitted relationships") - } -} diff --git a/deps/github.com/jinzhu/gorm/customize_column_test.go b/deps/github.com/jinzhu/gorm/customize_column_test.go deleted file mode 100644 index 5e19d6f4c..000000000 --- a/deps/github.com/jinzhu/gorm/customize_column_test.go +++ /dev/null @@ -1,346 +0,0 @@ -package gorm_test - -import ( - "testing" - "time" - - "github.com/jinzhu/gorm" -) - -type CustomizeColumn struct { - ID int64 `gorm:"column:mapped_id; primary_key:yes"` - Name string `gorm:"column:mapped_name"` - Date *time.Time `gorm:"column:mapped_time"` -} - -// Make sure an ignored field does not interfere with another field's custom -// column name that matches the ignored field. -type CustomColumnAndIgnoredFieldClash struct { - Body string `sql:"-"` - RawBody string `gorm:"column:body"` -} - -func TestCustomizeColumn(t *testing.T) { - col := "mapped_name" - DB.DropTable(&CustomizeColumn{}) - DB.AutoMigrate(&CustomizeColumn{}) - - scope := DB.NewScope(&CustomizeColumn{}) - if !scope.Dialect().HasColumn(scope.TableName(), col) { - t.Errorf("CustomizeColumn should have column %s", col) - } - - col = "mapped_id" - if scope.PrimaryKey() != col { - t.Errorf("CustomizeColumn should have primary key %s, but got %q", col, scope.PrimaryKey()) - } - - expected := "foo" - now := time.Now() - cc := CustomizeColumn{ID: 666, Name: expected, Date: &now} - - if count := DB.Create(&cc).RowsAffected; count != 1 { - t.Error("There should be one record be affected when create record") - } - - var cc1 CustomizeColumn - DB.First(&cc1, 666) - - if cc1.Name != expected { - t.Errorf("Failed to query CustomizeColumn") - } - - cc.Name = "bar" - DB.Save(&cc) - - var cc2 CustomizeColumn - DB.First(&cc2, 666) - if cc2.Name != "bar" { - t.Errorf("Failed to query CustomizeColumn") - } -} - -func TestCustomColumnAndIgnoredFieldClash(t *testing.T) { - DB.DropTable(&CustomColumnAndIgnoredFieldClash{}) - if err := DB.AutoMigrate(&CustomColumnAndIgnoredFieldClash{}).Error; err != nil { - t.Errorf("Should not raise error: %s", err) - } -} - -type CustomizePerson struct { - IdPerson string `gorm:"column:idPerson;primary_key:true"` - Accounts []CustomizeAccount `gorm:"many2many:PersonAccount;associationforeignkey:idAccount;foreignkey:idPerson"` -} - -type CustomizeAccount struct { - IdAccount string `gorm:"column:idAccount;primary_key:true"` - Name string -} - -func TestManyToManyWithCustomizedColumn(t *testing.T) { - DB.DropTable(&CustomizePerson{}, &CustomizeAccount{}, "PersonAccount") - DB.AutoMigrate(&CustomizePerson{}, &CustomizeAccount{}) - - account := CustomizeAccount{IdAccount: "account", Name: "id1"} - person := CustomizePerson{ - IdPerson: "person", - Accounts: []CustomizeAccount{account}, - } - - if err := DB.Create(&account).Error; err != nil { - t.Errorf("no error should happen, but got %v", err) - } - - if err := DB.Create(&person).Error; err != nil { - t.Errorf("no error should happen, but got %v", err) - } - - var person1 CustomizePerson - scope := DB.NewScope(nil) - if err := DB.Preload("Accounts").First(&person1, scope.Quote("idPerson")+" = ?", person.IdPerson).Error; err != nil { - t.Errorf("no error should happen when preloading customized column many2many relations, but got %v", err) - } - - if len(person1.Accounts) != 1 || person1.Accounts[0].IdAccount != "account" { - t.Errorf("should preload correct accounts") - } -} - -type CustomizeUser struct { - gorm.Model - Email string `sql:"column:email_address"` -} - -type CustomizeInvitation struct { - gorm.Model - Address string `sql:"column:invitation"` - Person *CustomizeUser `gorm:"foreignkey:Email;associationforeignkey:invitation"` -} - -func TestOneToOneWithCustomizedColumn(t *testing.T) { - DB.DropTable(&CustomizeUser{}, &CustomizeInvitation{}) - DB.AutoMigrate(&CustomizeUser{}, &CustomizeInvitation{}) - - user := CustomizeUser{ - Email: "hello@example.com", - } - invitation := CustomizeInvitation{ - Address: "hello@example.com", - } - - DB.Create(&user) - DB.Create(&invitation) - - var invitation2 CustomizeInvitation - if err := DB.Preload("Person").Find(&invitation2, invitation.ID).Error; err != nil { - t.Errorf("no error should happen, but got %v", err) - } - - if invitation2.Person.Email != user.Email { - t.Errorf("Should preload one to one relation with customize foreign keys") - } -} - -type PromotionDiscount struct { - gorm.Model - Name string - Coupons []*PromotionCoupon `gorm:"ForeignKey:discount_id"` - Rule *PromotionRule `gorm:"ForeignKey:discount_id"` - Benefits []PromotionBenefit `gorm:"ForeignKey:promotion_id"` -} - -type PromotionBenefit struct { - gorm.Model - Name string - PromotionID uint - Discount PromotionDiscount `gorm:"ForeignKey:promotion_id"` -} - -type PromotionCoupon struct { - gorm.Model - Code string - DiscountID uint - Discount PromotionDiscount -} - -type PromotionRule struct { - gorm.Model - Name string - Begin *time.Time - End *time.Time - DiscountID uint - Discount *PromotionDiscount -} - -func TestOneToManyWithCustomizedColumn(t *testing.T) { - DB.DropTable(&PromotionDiscount{}, &PromotionCoupon{}) - DB.AutoMigrate(&PromotionDiscount{}, &PromotionCoupon{}) - - discount := PromotionDiscount{ - Name: "Happy New Year", - Coupons: []*PromotionCoupon{ - {Code: "newyear1"}, - {Code: "newyear2"}, - }, - } - - if err := DB.Create(&discount).Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - var discount1 PromotionDiscount - if err := DB.Preload("Coupons").First(&discount1, "id = ?", discount.ID).Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - if len(discount.Coupons) != 2 { - t.Errorf("should find two coupons") - } - - var coupon PromotionCoupon - if err := DB.Preload("Discount").First(&coupon, "code = ?", "newyear1").Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - if coupon.Discount.Name != "Happy New Year" { - t.Errorf("should preload discount from coupon") - } -} - -func TestHasOneWithPartialCustomizedColumn(t *testing.T) { - DB.DropTable(&PromotionDiscount{}, &PromotionRule{}) - DB.AutoMigrate(&PromotionDiscount{}, &PromotionRule{}) - - var begin = time.Now() - var end = time.Now().Add(24 * time.Hour) - discount := PromotionDiscount{ - Name: "Happy New Year 2", - Rule: &PromotionRule{ - Name: "time_limited", - Begin: &begin, - End: &end, - }, - } - - if err := DB.Create(&discount).Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - var discount1 PromotionDiscount - if err := DB.Preload("Rule").First(&discount1, "id = ?", discount.ID).Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - if discount.Rule.Begin.Format(time.RFC3339Nano) != begin.Format(time.RFC3339Nano) { - t.Errorf("Should be able to preload Rule") - } - - var rule PromotionRule - if err := DB.Preload("Discount").First(&rule, "name = ?", "time_limited").Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - if rule.Discount.Name != "Happy New Year 2" { - t.Errorf("should preload discount from rule") - } -} - -func TestBelongsToWithPartialCustomizedColumn(t *testing.T) { - DB.DropTable(&PromotionDiscount{}, &PromotionBenefit{}) - DB.AutoMigrate(&PromotionDiscount{}, &PromotionBenefit{}) - - discount := PromotionDiscount{ - Name: "Happy New Year 3", - Benefits: []PromotionBenefit{ - {Name: "free cod"}, - {Name: "free shipping"}, - }, - } - - if err := DB.Create(&discount).Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - var discount1 PromotionDiscount - if err := DB.Preload("Benefits").First(&discount1, "id = ?", discount.ID).Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - if len(discount.Benefits) != 2 { - t.Errorf("should find two benefits") - } - - var benefit PromotionBenefit - if err := DB.Preload("Discount").First(&benefit, "name = ?", "free cod").Error; err != nil { - t.Errorf("no error should happen but got %v", err) - } - - if benefit.Discount.Name != "Happy New Year 3" { - t.Errorf("should preload discount from coupon") - } -} - -type SelfReferencingUser struct { - gorm.Model - Name string - Friends []*SelfReferencingUser `gorm:"many2many:UserFriends;association_jointable_foreignkey:friend_id"` -} - -func TestSelfReferencingMany2ManyColumn(t *testing.T) { - DB.DropTable(&SelfReferencingUser{}, "UserFriends") - DB.AutoMigrate(&SelfReferencingUser{}) - - friend1 := SelfReferencingUser{Name: "friend1_m2m"} - if err := DB.Create(&friend1).Error; err != nil { - t.Errorf("no error should happen, but got %v", err) - } - - friend2 := SelfReferencingUser{Name: "friend2_m2m"} - if err := DB.Create(&friend2).Error; err != nil { - t.Errorf("no error should happen, but got %v", err) - } - - user := SelfReferencingUser{ - Name: "self_m2m", - Friends: []*SelfReferencingUser{&friend1, &friend2}, - } - - if err := DB.Create(&user).Error; err != nil { - t.Errorf("no error should happen, but got %v", err) - } - - if DB.Model(&user).Association("Friends").Count() != 2 { - t.Errorf("Should find created friends correctly") - } - - var newUser = SelfReferencingUser{} - - if err := DB.Preload("Friends").First(&newUser, "id = ?", user.ID).Error; err != nil { - t.Errorf("no error should happen, but got %v", err) - } - - if len(newUser.Friends) != 2 { - t.Errorf("Should preload created frineds for self reference m2m") - } - - DB.Model(&newUser).Association("Friends").Append(&SelfReferencingUser{Name: "friend3_m2m"}) - if DB.Model(&user).Association("Friends").Count() != 3 { - t.Errorf("Should find created friends correctly") - } - - DB.Model(&newUser).Association("Friends").Replace(&SelfReferencingUser{Name: "friend4_m2m"}) - if DB.Model(&user).Association("Friends").Count() != 1 { - t.Errorf("Should find created friends correctly") - } - - friend := SelfReferencingUser{} - DB.Model(&newUser).Association("Friends").Find(&friend) - if friend.Name != "friend4_m2m" { - t.Errorf("Should find created friends correctly") - } - - DB.Model(&newUser).Association("Friends").Delete(friend) - if DB.Model(&user).Association("Friends").Count() != 0 { - t.Errorf("All friends should be deleted") - } -} diff --git a/deps/github.com/jinzhu/gorm/delete_test.go b/deps/github.com/jinzhu/gorm/delete_test.go deleted file mode 100644 index 043641f70..000000000 --- a/deps/github.com/jinzhu/gorm/delete_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package gorm_test - -import ( - "testing" - "time" -) - -func TestDelete(t *testing.T) { - user1, user2 := User{Name: "delete1"}, User{Name: "delete2"} - DB.Save(&user1) - DB.Save(&user2) - - if err := DB.Delete(&user1).Error; err != nil { - t.Errorf("No error should happen when delete a record, err=%s", err) - } - - if !DB.Where("name = ?", user1.Name).First(&User{}).RecordNotFound() { - t.Errorf("User can't be found after delete") - } - - if DB.Where("name = ?", user2.Name).First(&User{}).RecordNotFound() { - t.Errorf("Other users that not deleted should be found-able") - } -} - -func TestInlineDelete(t *testing.T) { - user1, user2 := User{Name: "inline_delete1"}, User{Name: "inline_delete2"} - DB.Save(&user1) - DB.Save(&user2) - - if DB.Delete(&User{}, user1.Id).Error != nil { - t.Errorf("No error should happen when delete a record") - } else if !DB.Where("name = ?", user1.Name).First(&User{}).RecordNotFound() { - t.Errorf("User can't be found after delete") - } - - if err := DB.Delete(&User{}, "name = ?", user2.Name).Error; err != nil { - t.Errorf("No error should happen when delete a record, err=%s", err) - } else if !DB.Where("name = ?", user2.Name).First(&User{}).RecordNotFound() { - t.Errorf("User can't be found after delete") - } -} - -func TestSoftDelete(t *testing.T) { - type User struct { - Id int64 - Name string - DeletedAt *time.Time - } - DB.AutoMigrate(&User{}) - - user := User{Name: "soft_delete"} - DB.Save(&user) - DB.Delete(&user) - - if DB.First(&User{}, "name = ?", user.Name).Error == nil { - t.Errorf("Can't find a soft deleted record") - } - - if err := DB.Unscoped().First(&User{}, "name = ?", user.Name).Error; err != nil { - t.Errorf("Should be able to find soft deleted record with Unscoped, but err=%s", err) - } - - DB.Unscoped().Delete(&user) - if !DB.Unscoped().First(&User{}, "name = ?", user.Name).RecordNotFound() { - t.Errorf("Can't find permanently deleted record") - } -} - -func TestSoftDeleteWithCustomizedDeletedAtColumnName(t *testing.T) { - creditCard := CreditCard{Number: "411111111234567"} - DB.Save(&creditCard) - DB.Delete(&creditCard) - - if deletedAtField, ok := DB.NewScope(&CreditCard{}).FieldByName("DeletedAt"); !ok || deletedAtField.DBName != "deleted_time" { - t.Errorf("CreditCard's DeletedAt's column name should be `deleted_time`") - } - - if DB.First(&CreditCard{}, "number = ?", creditCard.Number).Error == nil { - t.Errorf("Can't find a soft deleted record") - } - - if err := DB.Unscoped().First(&CreditCard{}, "number = ?", creditCard.Number).Error; err != nil { - t.Errorf("Should be able to find soft deleted record with Unscoped, but err=%s", err) - } - - DB.Unscoped().Delete(&creditCard) - if !DB.Unscoped().First(&CreditCard{}, "number = ?", creditCard.Number).RecordNotFound() { - t.Errorf("Can't find permanently deleted record") - } -} diff --git a/deps/github.com/jinzhu/gorm/dialect.go b/deps/github.com/jinzhu/gorm/dialect.go deleted file mode 100644 index 506a6e867..000000000 --- a/deps/github.com/jinzhu/gorm/dialect.go +++ /dev/null @@ -1,136 +0,0 @@ -package gorm - -import ( - "database/sql" - "fmt" - "reflect" - "strconv" - "strings" -) - -// Dialect interface contains behaviors that differ across SQL database -type Dialect interface { - // GetName get dialect's name - GetName() string - - // SetDB set db for dialect - SetDB(db SQLCommon) - - // BindVar return the placeholder for actual values in SQL statements, in many dbs it is "?", Postgres using $1 - BindVar(i int) string - // Quote quotes field name to avoid SQL parsing exceptions by using a reserved word as a field name - Quote(key string) string - // DataTypeOf return data's sql type - DataTypeOf(field *StructField) string - - // HasIndex check has index or not - HasIndex(tableName string, indexName string) bool - // HasForeignKey check has foreign key or not - HasForeignKey(tableName string, foreignKeyName string) bool - // RemoveIndex remove index - RemoveIndex(tableName string, indexName string) error - // HasTable check has table or not - HasTable(tableName string) bool - // HasColumn check has column or not - HasColumn(tableName string, columnName string) bool - // ModifyColumn modify column's type - ModifyColumn(tableName string, columnName string, typ string) error - - // LimitAndOffsetSQL return generated SQL with Limit and Offset, as mssql has special case - LimitAndOffsetSQL(limit, offset interface{}) string - // SelectFromDummyTable return select values, for most dbs, `SELECT values` just works, mysql needs `SELECT value FROM DUAL` - SelectFromDummyTable() string - // LastInsertIdReturningSuffix most dbs support LastInsertId, but postgres needs to use `RETURNING` - LastInsertIDReturningSuffix(tableName, columnName string) string - // DefaultValueStr - DefaultValueStr() string - - // BuildKeyName returns a valid key name (foreign key, index key) for the given table, field and reference - BuildKeyName(kind, tableName string, fields ...string) string - - // CurrentDatabase return current database name - CurrentDatabase() string -} - -var dialectsMap = map[string]Dialect{} - -func newDialect(name string, db SQLCommon) Dialect { - if value, ok := dialectsMap[name]; ok { - dialect := reflect.New(reflect.TypeOf(value).Elem()).Interface().(Dialect) - dialect.SetDB(db) - return dialect - } - - fmt.Printf("`%v` is not officially supported, running under compatibility mode.\n", name) - commontDialect := &commonDialect{} - commontDialect.SetDB(db) - return commontDialect -} - -// RegisterDialect register new dialect -func RegisterDialect(name string, dialect Dialect) { - dialectsMap[name] = dialect -} - -// GetDialect gets the dialect for the specified dialect name -func GetDialect(name string) (dialect Dialect, ok bool) { - dialect, ok = dialectsMap[name] - return -} - -// ParseFieldStructForDialect get field's sql data type -var ParseFieldStructForDialect = func(field *StructField, dialect Dialect) (fieldValue reflect.Value, sqlType string, size int, additionalType string) { - // Get redirected field type - var ( - reflectType = field.Struct.Type - dataType = field.TagSettings["TYPE"] - ) - - for reflectType.Kind() == reflect.Ptr { - reflectType = reflectType.Elem() - } - - // Get redirected field value - fieldValue = reflect.Indirect(reflect.New(reflectType)) - - if gormDataType, ok := fieldValue.Interface().(interface { - GormDataType(Dialect) string - }); ok { - dataType = gormDataType.GormDataType(dialect) - } - - // Get scanner's real value - if dataType == "" { - var getScannerValue func(reflect.Value) - getScannerValue = func(value reflect.Value) { - fieldValue = value - if _, isScanner := reflect.New(fieldValue.Type()).Interface().(sql.Scanner); isScanner && fieldValue.Kind() == reflect.Struct { - getScannerValue(fieldValue.Field(0)) - } - } - getScannerValue(fieldValue) - } - - // Default Size - if num, ok := field.TagSettings["SIZE"]; ok { - size, _ = strconv.Atoi(num) - } else { - size = 255 - } - - // Default type from tag setting - additionalType = field.TagSettings["NOT NULL"] + " " + field.TagSettings["UNIQUE"] - if value, ok := field.TagSettings["DEFAULT"]; ok { - additionalType = additionalType + " DEFAULT " + value - } - - return fieldValue, dataType, size, strings.TrimSpace(additionalType) -} - -func currentDatabaseAndTable(dialect Dialect, tableName string) (string, string) { - if strings.Contains(tableName, ".") { - splitStrings := strings.SplitN(tableName, ".", 2) - return splitStrings[0], splitStrings[1] - } - return dialect.CurrentDatabase(), tableName -} diff --git a/deps/github.com/jinzhu/gorm/dialect_common.go b/deps/github.com/jinzhu/gorm/dialect_common.go deleted file mode 100644 index b9f0c7da7..000000000 --- a/deps/github.com/jinzhu/gorm/dialect_common.go +++ /dev/null @@ -1,176 +0,0 @@ -package gorm - -import ( - "fmt" - "reflect" - "regexp" - "strconv" - "strings" - "time" -) - -// DefaultForeignKeyNamer contains the default foreign key name generator method -type DefaultForeignKeyNamer struct { -} - -type commonDialect struct { - db SQLCommon - DefaultForeignKeyNamer -} - -func init() { - RegisterDialect("common", &commonDialect{}) -} - -func (commonDialect) GetName() string { - return "common" -} - -func (s *commonDialect) SetDB(db SQLCommon) { - s.db = db -} - -func (commonDialect) BindVar(i int) string { - return "$$$" // ? -} - -func (commonDialect) Quote(key string) string { - return fmt.Sprintf(`"%s"`, key) -} - -func (s *commonDialect) fieldCanAutoIncrement(field *StructField) bool { - if value, ok := field.TagSettings["AUTO_INCREMENT"]; ok { - return strings.ToLower(value) != "false" - } - return field.IsPrimaryKey -} - -func (s *commonDialect) DataTypeOf(field *StructField) string { - var dataValue, sqlType, size, additionalType = ParseFieldStructForDialect(field, s) - - if sqlType == "" { - switch dataValue.Kind() { - case reflect.Bool: - sqlType = "BOOLEAN" - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uintptr: - if s.fieldCanAutoIncrement(field) { - sqlType = "INTEGER AUTO_INCREMENT" - } else { - sqlType = "INTEGER" - } - case reflect.Int64, reflect.Uint64: - if s.fieldCanAutoIncrement(field) { - sqlType = "BIGINT AUTO_INCREMENT" - } else { - sqlType = "BIGINT" - } - case reflect.Float32, reflect.Float64: - sqlType = "FLOAT" - case reflect.String: - if size > 0 && size < 65532 { - sqlType = fmt.Sprintf("VARCHAR(%d)", size) - } else { - sqlType = "VARCHAR(65532)" - } - case reflect.Struct: - if _, ok := dataValue.Interface().(time.Time); ok { - sqlType = "TIMESTAMP" - } - default: - if _, ok := dataValue.Interface().([]byte); ok { - if size > 0 && size < 65532 { - sqlType = fmt.Sprintf("BINARY(%d)", size) - } else { - sqlType = "BINARY(65532)" - } - } - } - } - - if sqlType == "" { - panic(fmt.Sprintf("invalid sql type %s (%s) for commonDialect", dataValue.Type().Name(), dataValue.Kind().String())) - } - - if strings.TrimSpace(additionalType) == "" { - return sqlType - } - return fmt.Sprintf("%v %v", sqlType, additionalType) -} - -func (s commonDialect) HasIndex(tableName string, indexName string) bool { - var count int - currentDatabase, tableName := currentDatabaseAndTable(&s, tableName) - s.db.QueryRow("SELECT count(*) FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema = ? AND table_name = ? AND index_name = ?", currentDatabase, tableName, indexName).Scan(&count) - return count > 0 -} - -func (s commonDialect) RemoveIndex(tableName string, indexName string) error { - _, err := s.db.Exec(fmt.Sprintf("DROP INDEX %v", indexName)) - return err -} - -func (s commonDialect) HasForeignKey(tableName string, foreignKeyName string) bool { - return false -} - -func (s commonDialect) HasTable(tableName string) bool { - var count int - currentDatabase, tableName := currentDatabaseAndTable(&s, tableName) - s.db.QueryRow("SELECT count(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = ? AND table_name = ?", currentDatabase, tableName).Scan(&count) - return count > 0 -} - -func (s commonDialect) HasColumn(tableName string, columnName string) bool { - var count int - currentDatabase, tableName := currentDatabaseAndTable(&s, tableName) - s.db.QueryRow("SELECT count(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = ? AND table_name = ? AND column_name = ?", currentDatabase, tableName, columnName).Scan(&count) - return count > 0 -} - -func (s commonDialect) ModifyColumn(tableName string, columnName string, typ string) error { - _, err := s.db.Exec(fmt.Sprintf("ALTER TABLE %v ALTER COLUMN %v TYPE %v", tableName, columnName, typ)) - return err -} - -func (s commonDialect) CurrentDatabase() (name string) { - s.db.QueryRow("SELECT DATABASE()").Scan(&name) - return -} - -func (commonDialect) LimitAndOffsetSQL(limit, offset interface{}) (sql string) { - if limit != nil { - if parsedLimit, err := strconv.ParseInt(fmt.Sprint(limit), 0, 0); err == nil && parsedLimit >= 0 { - sql += fmt.Sprintf(" LIMIT %d", parsedLimit) - } - } - if offset != nil { - if parsedOffset, err := strconv.ParseInt(fmt.Sprint(offset), 0, 0); err == nil && parsedOffset >= 0 { - sql += fmt.Sprintf(" OFFSET %d", parsedOffset) - } - } - return -} - -func (commonDialect) SelectFromDummyTable() string { - return "" -} - -func (commonDialect) LastInsertIDReturningSuffix(tableName, columnName string) string { - return "" -} - -func (commonDialect) DefaultValueStr() string { - return "DEFAULT VALUES" -} - -// BuildKeyName returns a valid key name (foreign key, index key) for the given table, field and reference -func (DefaultForeignKeyNamer) BuildKeyName(kind, tableName string, fields ...string) string { - keyName := fmt.Sprintf("%s_%s_%s", kind, tableName, strings.Join(fields, "_")) - keyName = regexp.MustCompile("[^a-zA-Z0-9]+").ReplaceAllString(keyName, "_") - return keyName -} - -// IsByteArrayOrSlice returns true of the reflected value is an array or slice -func IsByteArrayOrSlice(value reflect.Value) bool { - return (value.Kind() == reflect.Array || value.Kind() == reflect.Slice) && value.Type().Elem() == reflect.TypeOf(uint8(0)) -} diff --git a/deps/github.com/jinzhu/gorm/dialect_mysql.go b/deps/github.com/jinzhu/gorm/dialect_mysql.go deleted file mode 100644 index b162badee..000000000 --- a/deps/github.com/jinzhu/gorm/dialect_mysql.go +++ /dev/null @@ -1,191 +0,0 @@ -package gorm - -import ( - "crypto/sha1" - "fmt" - "reflect" - "regexp" - "strconv" - "strings" - "time" - "unicode/utf8" -) - -type mysql struct { - commonDialect -} - -func init() { - RegisterDialect("mysql", &mysql{}) -} - -func (mysql) GetName() string { - return "mysql" -} - -func (mysql) Quote(key string) string { - return fmt.Sprintf("`%s`", key) -} - -// Get Data Type for MySQL Dialect -func (s *mysql) DataTypeOf(field *StructField) string { - var dataValue, sqlType, size, additionalType = ParseFieldStructForDialect(field, s) - - // MySQL allows only one auto increment column per table, and it must - // be a KEY column. - if _, ok := field.TagSettings["AUTO_INCREMENT"]; ok { - if _, ok = field.TagSettings["INDEX"]; !ok && !field.IsPrimaryKey { - delete(field.TagSettings, "AUTO_INCREMENT") - } - } - - if sqlType == "" { - switch dataValue.Kind() { - case reflect.Bool: - sqlType = "boolean" - case reflect.Int8: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "tinyint AUTO_INCREMENT" - } else { - sqlType = "tinyint" - } - case reflect.Int, reflect.Int16, reflect.Int32: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "int AUTO_INCREMENT" - } else { - sqlType = "int" - } - case reflect.Uint8: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "tinyint unsigned AUTO_INCREMENT" - } else { - sqlType = "tinyint unsigned" - } - case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uintptr: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "int unsigned AUTO_INCREMENT" - } else { - sqlType = "int unsigned" - } - case reflect.Int64: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "bigint AUTO_INCREMENT" - } else { - sqlType = "bigint" - } - case reflect.Uint64: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "bigint unsigned AUTO_INCREMENT" - } else { - sqlType = "bigint unsigned" - } - case reflect.Float32, reflect.Float64: - sqlType = "double" - case reflect.String: - if size > 0 && size < 65532 { - sqlType = fmt.Sprintf("varchar(%d)", size) - } else { - sqlType = "longtext" - } - case reflect.Struct: - if _, ok := dataValue.Interface().(time.Time); ok { - precision := "" - if p, ok := field.TagSettings["PRECISION"]; ok { - precision = fmt.Sprintf("(%s)", p) - } - - if _, ok := field.TagSettings["NOT NULL"]; ok { - sqlType = fmt.Sprintf("timestamp%v", precision) - } else { - sqlType = fmt.Sprintf("timestamp%v NULL", precision) - } - } - default: - if IsByteArrayOrSlice(dataValue) { - if size > 0 && size < 65532 { - sqlType = fmt.Sprintf("varbinary(%d)", size) - } else { - sqlType = "longblob" - } - } - } - } - - if sqlType == "" { - panic(fmt.Sprintf("invalid sql type %s (%s) for mysql", dataValue.Type().Name(), dataValue.Kind().String())) - } - - if strings.TrimSpace(additionalType) == "" { - return sqlType - } - return fmt.Sprintf("%v %v", sqlType, additionalType) -} - -func (s mysql) RemoveIndex(tableName string, indexName string) error { - _, err := s.db.Exec(fmt.Sprintf("DROP INDEX %v ON %v", indexName, s.Quote(tableName))) - return err -} - -func (s mysql) ModifyColumn(tableName string, columnName string, typ string) error { - _, err := s.db.Exec(fmt.Sprintf("ALTER TABLE %v MODIFY COLUMN %v %v", tableName, columnName, typ)) - return err -} - -func (s mysql) LimitAndOffsetSQL(limit, offset interface{}) (sql string) { - if limit != nil { - if parsedLimit, err := strconv.ParseInt(fmt.Sprint(limit), 0, 0); err == nil && parsedLimit >= 0 { - sql += fmt.Sprintf(" LIMIT %d", parsedLimit) - - if offset != nil { - if parsedOffset, err := strconv.ParseInt(fmt.Sprint(offset), 0, 0); err == nil && parsedOffset >= 0 { - sql += fmt.Sprintf(" OFFSET %d", parsedOffset) - } - } - } - } - return -} - -func (s mysql) HasForeignKey(tableName string, foreignKeyName string) bool { - var count int - currentDatabase, tableName := currentDatabaseAndTable(&s, tableName) - s.db.QueryRow("SELECT count(*) FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA=? AND TABLE_NAME=? AND CONSTRAINT_NAME=? AND CONSTRAINT_TYPE='FOREIGN KEY'", currentDatabase, tableName, foreignKeyName).Scan(&count) - return count > 0 -} - -func (s mysql) CurrentDatabase() (name string) { - s.db.QueryRow("SELECT DATABASE()").Scan(&name) - return -} - -func (mysql) SelectFromDummyTable() string { - return "FROM DUAL" -} - -func (s mysql) BuildKeyName(kind, tableName string, fields ...string) string { - keyName := s.commonDialect.BuildKeyName(kind, tableName, fields...) - if utf8.RuneCountInString(keyName) <= 64 { - return keyName - } - h := sha1.New() - h.Write([]byte(keyName)) - bs := h.Sum(nil) - - // sha1 is 40 characters, keep first 24 characters of destination - destRunes := []rune(regexp.MustCompile("[^a-zA-Z0-9]+").ReplaceAllString(fields[0], "_")) - if len(destRunes) > 24 { - destRunes = destRunes[:24] - } - - return fmt.Sprintf("%s%x", string(destRunes), bs) -} - -func (mysql) DefaultValueStr() string { - return "VALUES()" -} diff --git a/deps/github.com/jinzhu/gorm/dialect_postgres.go b/deps/github.com/jinzhu/gorm/dialect_postgres.go deleted file mode 100644 index c44c6a5b5..000000000 --- a/deps/github.com/jinzhu/gorm/dialect_postgres.go +++ /dev/null @@ -1,143 +0,0 @@ -package gorm - -import ( - "encoding/json" - "fmt" - "reflect" - "strings" - "time" -) - -type postgres struct { - commonDialect -} - -func init() { - RegisterDialect("postgres", &postgres{}) - RegisterDialect("cloudsqlpostgres", &postgres{}) -} - -func (postgres) GetName() string { - return "postgres" -} - -func (postgres) BindVar(i int) string { - return fmt.Sprintf("$%v", i) -} - -func (s *postgres) DataTypeOf(field *StructField) string { - var dataValue, sqlType, size, additionalType = ParseFieldStructForDialect(field, s) - - if sqlType == "" { - switch dataValue.Kind() { - case reflect.Bool: - sqlType = "boolean" - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uintptr: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "serial" - } else { - sqlType = "integer" - } - case reflect.Int64, reflect.Uint32, reflect.Uint64: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "bigserial" - } else { - sqlType = "bigint" - } - case reflect.Float32, reflect.Float64: - sqlType = "numeric" - case reflect.String: - if _, ok := field.TagSettings["SIZE"]; !ok { - size = 0 // if SIZE haven't been set, use `text` as the default type, as there are no performance different - } - - if size > 0 && size < 65532 { - sqlType = fmt.Sprintf("varchar(%d)", size) - } else { - sqlType = "text" - } - case reflect.Struct: - if _, ok := dataValue.Interface().(time.Time); ok { - sqlType = "timestamp with time zone" - } - case reflect.Map: - if dataValue.Type().Name() == "Hstore" { - sqlType = "hstore" - } - default: - if IsByteArrayOrSlice(dataValue) { - sqlType = "bytea" - - if isUUID(dataValue) { - sqlType = "uuid" - } - - if isJSON(dataValue) { - sqlType = "jsonb" - } - } - } - } - - if sqlType == "" { - panic(fmt.Sprintf("invalid sql type %s (%s) for postgres", dataValue.Type().Name(), dataValue.Kind().String())) - } - - if strings.TrimSpace(additionalType) == "" { - return sqlType - } - return fmt.Sprintf("%v %v", sqlType, additionalType) -} - -func (s postgres) HasIndex(tableName string, indexName string) bool { - var count int - s.db.QueryRow("SELECT count(*) FROM pg_indexes WHERE tablename = $1 AND indexname = $2 AND schemaname = CURRENT_SCHEMA()", tableName, indexName).Scan(&count) - return count > 0 -} - -func (s postgres) HasForeignKey(tableName string, foreignKeyName string) bool { - var count int - s.db.QueryRow("SELECT count(con.conname) FROM pg_constraint con WHERE $1::regclass::oid = con.conrelid AND con.conname = $2 AND con.contype='f'", tableName, foreignKeyName).Scan(&count) - return count > 0 -} - -func (s postgres) HasTable(tableName string) bool { - var count int - s.db.QueryRow("SELECT count(*) FROM INFORMATION_SCHEMA.tables WHERE table_name = $1 AND table_type = 'BASE TABLE' AND table_schema = CURRENT_SCHEMA()", tableName).Scan(&count) - return count > 0 -} - -func (s postgres) HasColumn(tableName string, columnName string) bool { - var count int - s.db.QueryRow("SELECT count(*) FROM INFORMATION_SCHEMA.columns WHERE table_name = $1 AND column_name = $2 AND table_schema = CURRENT_SCHEMA()", tableName, columnName).Scan(&count) - return count > 0 -} - -func (s postgres) CurrentDatabase() (name string) { - s.db.QueryRow("SELECT CURRENT_DATABASE()").Scan(&name) - return -} - -func (s postgres) LastInsertIDReturningSuffix(tableName, key string) string { - return fmt.Sprintf("RETURNING %v.%v", tableName, key) -} - -func (postgres) SupportLastInsertID() bool { - return false -} - -func isUUID(value reflect.Value) bool { - if value.Kind() != reflect.Array || value.Type().Len() != 16 { - return false - } - typename := value.Type().Name() - lower := strings.ToLower(typename) - return "uuid" == lower || "guid" == lower -} - -func isJSON(value reflect.Value) bool { - _, ok := value.Interface().(json.RawMessage) - return ok -} diff --git a/deps/github.com/jinzhu/gorm/dialect_sqlite3.go b/deps/github.com/jinzhu/gorm/dialect_sqlite3.go deleted file mode 100644 index f26f6be30..000000000 --- a/deps/github.com/jinzhu/gorm/dialect_sqlite3.go +++ /dev/null @@ -1,107 +0,0 @@ -package gorm - -import ( - "fmt" - "reflect" - "strings" - "time" -) - -type sqlite3 struct { - commonDialect -} - -func init() { - RegisterDialect("sqlite3", &sqlite3{}) -} - -func (sqlite3) GetName() string { - return "sqlite3" -} - -// Get Data Type for Sqlite Dialect -func (s *sqlite3) DataTypeOf(field *StructField) string { - var dataValue, sqlType, size, additionalType = ParseFieldStructForDialect(field, s) - - if sqlType == "" { - switch dataValue.Kind() { - case reflect.Bool: - sqlType = "bool" - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uintptr: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "integer primary key autoincrement" - } else { - sqlType = "integer" - } - case reflect.Int64, reflect.Uint64: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "integer primary key autoincrement" - } else { - sqlType = "bigint" - } - case reflect.Float32, reflect.Float64: - sqlType = "real" - case reflect.String: - if size > 0 && size < 65532 { - sqlType = fmt.Sprintf("varchar(%d)", size) - } else { - sqlType = "text" - } - case reflect.Struct: - if _, ok := dataValue.Interface().(time.Time); ok { - sqlType = "datetime" - } - default: - if IsByteArrayOrSlice(dataValue) { - sqlType = "blob" - } - } - } - - if sqlType == "" { - panic(fmt.Sprintf("invalid sql type %s (%s) for sqlite3", dataValue.Type().Name(), dataValue.Kind().String())) - } - - if strings.TrimSpace(additionalType) == "" { - return sqlType - } - return fmt.Sprintf("%v %v", sqlType, additionalType) -} - -func (s sqlite3) HasIndex(tableName string, indexName string) bool { - var count int - s.db.QueryRow(fmt.Sprintf("SELECT count(*) FROM sqlite_master WHERE tbl_name = ? AND sql LIKE '%%INDEX %v ON%%'", indexName), tableName).Scan(&count) - return count > 0 -} - -func (s sqlite3) HasTable(tableName string) bool { - var count int - s.db.QueryRow("SELECT count(*) FROM sqlite_master WHERE type='table' AND name=?", tableName).Scan(&count) - return count > 0 -} - -func (s sqlite3) HasColumn(tableName string, columnName string) bool { - var count int - s.db.QueryRow(fmt.Sprintf("SELECT count(*) FROM sqlite_master WHERE tbl_name = ? AND (sql LIKE '%%\"%v\" %%' OR sql LIKE '%%%v %%');\n", columnName, columnName), tableName).Scan(&count) - return count > 0 -} - -func (s sqlite3) CurrentDatabase() (name string) { - var ( - ifaces = make([]interface{}, 3) - pointers = make([]*string, 3) - i int - ) - for i = 0; i < 3; i++ { - ifaces[i] = &pointers[i] - } - if err := s.db.QueryRow("PRAGMA database_list").Scan(ifaces...); err != nil { - return - } - if pointers[1] != nil { - name = *pointers[1] - } - return -} diff --git a/deps/github.com/jinzhu/gorm/dialects/mssql/mssql.go b/deps/github.com/jinzhu/gorm/dialects/mssql/mssql.go deleted file mode 100644 index a8d3c45a7..000000000 --- a/deps/github.com/jinzhu/gorm/dialects/mssql/mssql.go +++ /dev/null @@ -1,203 +0,0 @@ -package mssql - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "time" - - _ "github.com/denisenkom/go-mssqldb" - "github.com/jinzhu/gorm" -) - -func setIdentityInsert(scope *gorm.Scope) { - if scope.Dialect().GetName() == "mssql" { - for _, field := range scope.PrimaryFields() { - if _, ok := field.TagSettings["AUTO_INCREMENT"]; ok && !field.IsBlank { - scope.NewDB().Exec(fmt.Sprintf("SET IDENTITY_INSERT %v ON", scope.TableName())) - scope.InstanceSet("mssql:identity_insert_on", true) - } - } - } -} - -func turnOffIdentityInsert(scope *gorm.Scope) { - if scope.Dialect().GetName() == "mssql" { - if _, ok := scope.InstanceGet("mssql:identity_insert_on"); ok { - scope.NewDB().Exec(fmt.Sprintf("SET IDENTITY_INSERT %v OFF", scope.TableName())) - } - } -} - -func init() { - gorm.DefaultCallback.Create().After("gorm:begin_transaction").Register("mssql:set_identity_insert", setIdentityInsert) - gorm.DefaultCallback.Create().Before("gorm:commit_or_rollback_transaction").Register("mssql:turn_off_identity_insert", turnOffIdentityInsert) - gorm.RegisterDialect("mssql", &mssql{}) -} - -type mssql struct { - db gorm.SQLCommon - gorm.DefaultForeignKeyNamer -} - -func (mssql) GetName() string { - return "mssql" -} - -func (s *mssql) SetDB(db gorm.SQLCommon) { - s.db = db -} - -func (mssql) BindVar(i int) string { - return "$$$" // ? -} - -func (mssql) Quote(key string) string { - return fmt.Sprintf(`[%s]`, key) -} - -func (s *mssql) DataTypeOf(field *gorm.StructField) string { - var dataValue, sqlType, size, additionalType = gorm.ParseFieldStructForDialect(field, s) - - if sqlType == "" { - switch dataValue.Kind() { - case reflect.Bool: - sqlType = "bit" - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uintptr: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "int IDENTITY(1,1)" - } else { - sqlType = "int" - } - case reflect.Int64, reflect.Uint64: - if s.fieldCanAutoIncrement(field) { - field.TagSettings["AUTO_INCREMENT"] = "AUTO_INCREMENT" - sqlType = "bigint IDENTITY(1,1)" - } else { - sqlType = "bigint" - } - case reflect.Float32, reflect.Float64: - sqlType = "float" - case reflect.String: - if size > 0 && size < 8000 { - sqlType = fmt.Sprintf("nvarchar(%d)", size) - } else { - sqlType = "nvarchar(max)" - } - case reflect.Struct: - if _, ok := dataValue.Interface().(time.Time); ok { - sqlType = "datetimeoffset" - } - default: - if gorm.IsByteArrayOrSlice(dataValue) { - if size > 0 && size < 8000 { - sqlType = fmt.Sprintf("varbinary(%d)", size) - } else { - sqlType = "varbinary(max)" - } - } - } - } - - if sqlType == "" { - panic(fmt.Sprintf("invalid sql type %s (%s) for mssql", dataValue.Type().Name(), dataValue.Kind().String())) - } - - if strings.TrimSpace(additionalType) == "" { - return sqlType - } - return fmt.Sprintf("%v %v", sqlType, additionalType) -} - -func (s mssql) fieldCanAutoIncrement(field *gorm.StructField) bool { - if value, ok := field.TagSettings["AUTO_INCREMENT"]; ok { - return value != "FALSE" - } - return field.IsPrimaryKey -} - -func (s mssql) HasIndex(tableName string, indexName string) bool { - var count int - s.db.QueryRow("SELECT count(*) FROM sys.indexes WHERE name=? AND object_id=OBJECT_ID(?)", indexName, tableName).Scan(&count) - return count > 0 -} - -func (s mssql) RemoveIndex(tableName string, indexName string) error { - _, err := s.db.Exec(fmt.Sprintf("DROP INDEX %v ON %v", indexName, s.Quote(tableName))) - return err -} - -func (s mssql) HasForeignKey(tableName string, foreignKeyName string) bool { - var count int - currentDatabase, tableName := currentDatabaseAndTable(&s, tableName) - s.db.QueryRow(`SELECT count(*) - FROM sys.foreign_keys as F inner join sys.tables as T on F.parent_object_id=T.object_id - inner join information_schema.tables as I on I.TABLE_NAME = T.name - WHERE F.name = ? - AND T.Name = ? AND I.TABLE_CATALOG = ?;`, foreignKeyName, tableName, currentDatabase).Scan(&count) - return count > 0 -} - -func (s mssql) HasTable(tableName string) bool { - var count int - currentDatabase, tableName := currentDatabaseAndTable(&s, tableName) - s.db.QueryRow("SELECT count(*) FROM INFORMATION_SCHEMA.tables WHERE table_name = ? AND table_catalog = ?", tableName, currentDatabase).Scan(&count) - return count > 0 -} - -func (s mssql) HasColumn(tableName string, columnName string) bool { - var count int - currentDatabase, tableName := currentDatabaseAndTable(&s, tableName) - s.db.QueryRow("SELECT count(*) FROM information_schema.columns WHERE table_catalog = ? AND table_name = ? AND column_name = ?", currentDatabase, tableName, columnName).Scan(&count) - return count > 0 -} - -func (s mssql) ModifyColumn(tableName string, columnName string, typ string) error { - _, err := s.db.Exec(fmt.Sprintf("ALTER TABLE %v ALTER COLUMN %v %v", tableName, columnName, typ)) - return err -} - -func (s mssql) CurrentDatabase() (name string) { - s.db.QueryRow("SELECT DB_NAME() AS [Current Database]").Scan(&name) - return -} - -func (mssql) LimitAndOffsetSQL(limit, offset interface{}) (sql string) { - if offset != nil { - if parsedOffset, err := strconv.ParseInt(fmt.Sprint(offset), 0, 0); err == nil && parsedOffset >= 0 { - sql += fmt.Sprintf(" OFFSET %d ROWS", parsedOffset) - } - } - if limit != nil { - if parsedLimit, err := strconv.ParseInt(fmt.Sprint(limit), 0, 0); err == nil && parsedLimit >= 0 { - if sql == "" { - // add default zero offset - sql += " OFFSET 0 ROWS" - } - sql += fmt.Sprintf(" FETCH NEXT %d ROWS ONLY", parsedLimit) - } - } - return -} - -func (mssql) SelectFromDummyTable() string { - return "" -} - -func (mssql) LastInsertIDReturningSuffix(tableName, columnName string) string { - return "" -} - -func (mssql) DefaultValueStr() string { - return "DEFAULT VALUES" -} - -func currentDatabaseAndTable(dialect gorm.Dialect, tableName string) (string, string) { - if strings.Contains(tableName, ".") { - splitStrings := strings.SplitN(tableName, ".", 2) - return splitStrings[0], splitStrings[1] - } - return dialect.CurrentDatabase(), tableName -} diff --git a/deps/github.com/jinzhu/gorm/dialects/mysql/mysql.go b/deps/github.com/jinzhu/gorm/dialects/mysql/mysql.go deleted file mode 100644 index 9deba48ae..000000000 --- a/deps/github.com/jinzhu/gorm/dialects/mysql/mysql.go +++ /dev/null @@ -1,3 +0,0 @@ -package mysql - -import _ "github.com/go-sql-driver/mysql" diff --git a/deps/github.com/jinzhu/gorm/dialects/postgres/postgres.go b/deps/github.com/jinzhu/gorm/dialects/postgres/postgres.go deleted file mode 100644 index 424e8bdc4..000000000 --- a/deps/github.com/jinzhu/gorm/dialects/postgres/postgres.go +++ /dev/null @@ -1,80 +0,0 @@ -package postgres - -import ( - "database/sql" - "database/sql/driver" - - "encoding/json" - "errors" - "fmt" - _ "github.com/lib/pq" - "github.com/lib/pq/hstore" -) - -type Hstore map[string]*string - -// Value get value of Hstore -func (h Hstore) Value() (driver.Value, error) { - hstore := hstore.Hstore{Map: map[string]sql.NullString{}} - if len(h) == 0 { - return nil, nil - } - - for key, value := range h { - var s sql.NullString - if value != nil { - s.String = *value - s.Valid = true - } - hstore.Map[key] = s - } - return hstore.Value() -} - -// Scan scan value into Hstore -func (h *Hstore) Scan(value interface{}) error { - hstore := hstore.Hstore{} - - if err := hstore.Scan(value); err != nil { - return err - } - - if len(hstore.Map) == 0 { - return nil - } - - *h = Hstore{} - for k := range hstore.Map { - if hstore.Map[k].Valid { - s := hstore.Map[k].String - (*h)[k] = &s - } else { - (*h)[k] = nil - } - } - - return nil -} - -// Jsonb Postgresql's JSONB data type -type Jsonb struct { - json.RawMessage -} - -// Value get value of Jsonb -func (j Jsonb) Value() (driver.Value, error) { - if len(j.RawMessage) == 0 { - return nil, nil - } - return j.MarshalJSON() -} - -// Scan scan value into Jsonb -func (j *Jsonb) Scan(value interface{}) error { - bytes, ok := value.([]byte) - if !ok { - return errors.New(fmt.Sprint("Failed to unmarshal JSONB value:", value)) - } - - return json.Unmarshal(bytes, j) -} diff --git a/deps/github.com/jinzhu/gorm/dialects/sqlite/sqlite.go b/deps/github.com/jinzhu/gorm/dialects/sqlite/sqlite.go deleted file mode 100644 index 069ad3a90..000000000 --- a/deps/github.com/jinzhu/gorm/dialects/sqlite/sqlite.go +++ /dev/null @@ -1,3 +0,0 @@ -package sqlite - -import _ "github.com/mattn/go-sqlite3" diff --git a/deps/github.com/jinzhu/gorm/docker-compose.yml b/deps/github.com/jinzhu/gorm/docker-compose.yml deleted file mode 100644 index 79bf5fc39..000000000 --- a/deps/github.com/jinzhu/gorm/docker-compose.yml +++ /dev/null @@ -1,30 +0,0 @@ -version: '3' - -services: - mysql: - image: 'mysql:latest' - ports: - - 9910:3306 - environment: - - MYSQL_DATABASE=gorm - - MYSQL_USER=gorm - - MYSQL_PASSWORD=gorm - - MYSQL_RANDOM_ROOT_PASSWORD="yes" - postgres: - image: 'postgres:latest' - ports: - - 9920:5432 - environment: - - POSTGRES_USER=gorm - - POSTGRES_DB=gorm - - POSTGRES_PASSWORD=gorm - mssql: - image: 'mcmoe/mssqldocker:latest' - ports: - - 9930:1433 - environment: - - ACCEPT_EULA=Y - - SA_PASSWORD=LoremIpsum86 - - MSSQL_DB=gorm - - MSSQL_USER=gorm - - MSSQL_PASSWORD=LoremIpsum86 diff --git a/deps/github.com/jinzhu/gorm/embedded_struct_test.go b/deps/github.com/jinzhu/gorm/embedded_struct_test.go deleted file mode 100644 index 5f8ece573..000000000 --- a/deps/github.com/jinzhu/gorm/embedded_struct_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package gorm_test - -import "testing" - -type BasePost struct { - Id int64 - Title string - URL string -} - -type Author struct { - ID string - Name string - Email string -} - -type HNPost struct { - BasePost - Author `gorm:"embedded_prefix:user_"` // Embedded struct - Upvotes int32 -} - -type EngadgetPost struct { - BasePost BasePost `gorm:"embedded"` - Author Author `gorm:"embedded;embedded_prefix:author_"` // Embedded struct - ImageUrl string -} - -func TestPrefixColumnNameForEmbeddedStruct(t *testing.T) { - dialect := DB.NewScope(&EngadgetPost{}).Dialect() - engadgetPostScope := DB.NewScope(&EngadgetPost{}) - if !dialect.HasColumn(engadgetPostScope.TableName(), "author_id") || !dialect.HasColumn(engadgetPostScope.TableName(), "author_name") || !dialect.HasColumn(engadgetPostScope.TableName(), "author_email") { - t.Errorf("should has prefix for embedded columns") - } - - if len(engadgetPostScope.PrimaryFields()) != 1 { - t.Errorf("should have only one primary field with embedded struct, but got %v", len(engadgetPostScope.PrimaryFields())) - } - - hnScope := DB.NewScope(&HNPost{}) - if !dialect.HasColumn(hnScope.TableName(), "user_id") || !dialect.HasColumn(hnScope.TableName(), "user_name") || !dialect.HasColumn(hnScope.TableName(), "user_email") { - t.Errorf("should has prefix for embedded columns") - } -} - -func TestSaveAndQueryEmbeddedStruct(t *testing.T) { - DB.Save(&HNPost{BasePost: BasePost{Title: "news"}}) - DB.Save(&HNPost{BasePost: BasePost{Title: "hn_news"}}) - var news HNPost - if err := DB.First(&news, "title = ?", "hn_news").Error; err != nil { - t.Errorf("no error should happen when query with embedded struct, but got %v", err) - } else if news.Title != "hn_news" { - t.Errorf("embedded struct's value should be scanned correctly") - } - - DB.Save(&EngadgetPost{BasePost: BasePost{Title: "engadget_news"}}) - var egNews EngadgetPost - if err := DB.First(&egNews, "title = ?", "engadget_news").Error; err != nil { - t.Errorf("no error should happen when query with embedded struct, but got %v", err) - } else if egNews.BasePost.Title != "engadget_news" { - t.Errorf("embedded struct's value should be scanned correctly") - } - - if DB.NewScope(&HNPost{}).PrimaryField() == nil { - t.Errorf("primary key with embedded struct should works") - } - - for _, field := range DB.NewScope(&HNPost{}).Fields() { - if field.Name == "BasePost" { - t.Errorf("scope Fields should not contain embedded struct") - } - } -} - -func TestEmbeddedPointerTypeStruct(t *testing.T) { - type HNPost struct { - *BasePost - Upvotes int32 - } - - DB.Create(&HNPost{BasePost: &BasePost{Title: "embedded_pointer_type"}}) - - var hnPost HNPost - if err := DB.First(&hnPost, "title = ?", "embedded_pointer_type").Error; err != nil { - t.Errorf("No error should happen when find embedded pointer type, but got %v", err) - } - - if hnPost.Title != "embedded_pointer_type" { - t.Errorf("Should find correct value for embedded pointer type") - } -} diff --git a/deps/github.com/jinzhu/gorm/errors.go b/deps/github.com/jinzhu/gorm/errors.go deleted file mode 100644 index da2cf13cb..000000000 --- a/deps/github.com/jinzhu/gorm/errors.go +++ /dev/null @@ -1,72 +0,0 @@ -package gorm - -import ( - "errors" - "strings" -) - -var ( - // ErrRecordNotFound record not found error, happens when haven't find any matched data when looking up with a struct - ErrRecordNotFound = errors.New("record not found") - // ErrInvalidSQL invalid SQL error, happens when you passed invalid SQL - ErrInvalidSQL = errors.New("invalid SQL") - // ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback` - ErrInvalidTransaction = errors.New("no valid transaction") - // ErrCantStartTransaction can't start transaction when you are trying to start one with `Begin` - ErrCantStartTransaction = errors.New("can't start transaction") - // ErrUnaddressable unaddressable value - ErrUnaddressable = errors.New("using unaddressable value") -) - -// Errors contains all happened errors -type Errors []error - -// IsRecordNotFoundError returns current error has record not found error or not -func IsRecordNotFoundError(err error) bool { - if errs, ok := err.(Errors); ok { - for _, err := range errs { - if err == ErrRecordNotFound { - return true - } - } - } - return err == ErrRecordNotFound -} - -// GetErrors gets all happened errors -func (errs Errors) GetErrors() []error { - return errs -} - -// Add adds an error -func (errs Errors) Add(newErrors ...error) Errors { - for _, err := range newErrors { - if err == nil { - continue - } - - if errors, ok := err.(Errors); ok { - errs = errs.Add(errors...) - } else { - ok = true - for _, e := range errs { - if err == e { - ok = false - } - } - if ok { - errs = append(errs, err) - } - } - } - return errs -} - -// Error format happened errors -func (errs Errors) Error() string { - var errors = []string{} - for _, e := range errs { - errors = append(errors, e.Error()) - } - return strings.Join(errors, "; ") -} diff --git a/deps/github.com/jinzhu/gorm/errors_test.go b/deps/github.com/jinzhu/gorm/errors_test.go deleted file mode 100644 index 9a428dec0..000000000 --- a/deps/github.com/jinzhu/gorm/errors_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package gorm_test - -import ( - "errors" - "testing" - - "github.com/jinzhu/gorm" -) - -func TestErrorsCanBeUsedOutsideGorm(t *testing.T) { - errs := []error{errors.New("First"), errors.New("Second")} - - gErrs := gorm.Errors(errs) - gErrs = gErrs.Add(errors.New("Third")) - gErrs = gErrs.Add(gErrs) - - if gErrs.Error() != "First; Second; Third" { - t.Fatalf("Gave wrong error, got %s", gErrs.Error()) - } -} diff --git a/deps/github.com/jinzhu/gorm/field.go b/deps/github.com/jinzhu/gorm/field.go deleted file mode 100644 index 11c410b0f..000000000 --- a/deps/github.com/jinzhu/gorm/field.go +++ /dev/null @@ -1,58 +0,0 @@ -package gorm - -import ( - "database/sql" - "errors" - "fmt" - "reflect" -) - -// Field model field definition -type Field struct { - *StructField - IsBlank bool - Field reflect.Value -} - -// Set set a value to the field -func (field *Field) Set(value interface{}) (err error) { - if !field.Field.IsValid() { - return errors.New("field value not valid") - } - - if !field.Field.CanAddr() { - return ErrUnaddressable - } - - reflectValue, ok := value.(reflect.Value) - if !ok { - reflectValue = reflect.ValueOf(value) - } - - fieldValue := field.Field - if reflectValue.IsValid() { - if reflectValue.Type().ConvertibleTo(fieldValue.Type()) { - fieldValue.Set(reflectValue.Convert(fieldValue.Type())) - } else { - if fieldValue.Kind() == reflect.Ptr { - if fieldValue.IsNil() { - fieldValue.Set(reflect.New(field.Struct.Type.Elem())) - } - fieldValue = fieldValue.Elem() - } - - if reflectValue.Type().ConvertibleTo(fieldValue.Type()) { - fieldValue.Set(reflectValue.Convert(fieldValue.Type())) - } else if scanner, ok := fieldValue.Addr().Interface().(sql.Scanner); ok { - err = scanner.Scan(reflectValue.Interface()) - } else { - err = fmt.Errorf("could not convert argument of field %s from %s to %s", field.Name, reflectValue.Type(), fieldValue.Type()) - } - } - } else { - field.Field.Set(reflect.Zero(field.Field.Type())) - } - - field.IsBlank = isBlank(field.Field) - return err -} diff --git a/deps/github.com/jinzhu/gorm/field_test.go b/deps/github.com/jinzhu/gorm/field_test.go deleted file mode 100644 index 30e9a778d..000000000 --- a/deps/github.com/jinzhu/gorm/field_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package gorm_test - -import ( - "testing" - - "github.com/jinzhu/gorm" -) - -type CalculateField struct { - gorm.Model - Name string - Children []CalculateFieldChild - Category CalculateFieldCategory - EmbeddedField -} - -type EmbeddedField struct { - EmbeddedName string `sql:"NOT NULL;DEFAULT:'hello'"` -} - -type CalculateFieldChild struct { - gorm.Model - CalculateFieldID uint - Name string -} - -type CalculateFieldCategory struct { - gorm.Model - CalculateFieldID uint - Name string -} - -func TestCalculateField(t *testing.T) { - var field CalculateField - var scope = DB.NewScope(&field) - if field, ok := scope.FieldByName("Children"); !ok || field.Relationship == nil { - t.Errorf("Should calculate fields correctly for the first time") - } - - if field, ok := scope.FieldByName("Category"); !ok || field.Relationship == nil { - t.Errorf("Should calculate fields correctly for the first time") - } - - if field, ok := scope.FieldByName("embedded_name"); !ok { - t.Errorf("should find embedded field") - } else if _, ok := field.TagSettings["NOT NULL"]; !ok { - t.Errorf("should find embedded field's tag settings") - } -} diff --git a/deps/github.com/jinzhu/gorm/interface.go b/deps/github.com/jinzhu/gorm/interface.go deleted file mode 100644 index 55128f7fc..000000000 --- a/deps/github.com/jinzhu/gorm/interface.go +++ /dev/null @@ -1,20 +0,0 @@ -package gorm - -import "database/sql" - -// SQLCommon is the minimal database connection functionality gorm requires. Implemented by *sql.DB. -type SQLCommon interface { - Exec(query string, args ...interface{}) (sql.Result, error) - Prepare(query string) (*sql.Stmt, error) - Query(query string, args ...interface{}) (*sql.Rows, error) - QueryRow(query string, args ...interface{}) *sql.Row -} - -type sqlDb interface { - Begin() (*sql.Tx, error) -} - -type sqlTx interface { - Commit() error - Rollback() error -} diff --git a/deps/github.com/jinzhu/gorm/join_table_handler.go b/deps/github.com/jinzhu/gorm/join_table_handler.go deleted file mode 100644 index a036d46d2..000000000 --- a/deps/github.com/jinzhu/gorm/join_table_handler.go +++ /dev/null @@ -1,211 +0,0 @@ -package gorm - -import ( - "errors" - "fmt" - "reflect" - "strings" -) - -// JoinTableHandlerInterface is an interface for how to handle many2many relations -type JoinTableHandlerInterface interface { - // initialize join table handler - Setup(relationship *Relationship, tableName string, source reflect.Type, destination reflect.Type) - // Table return join table's table name - Table(db *DB) string - // Add create relationship in join table for source and destination - Add(handler JoinTableHandlerInterface, db *DB, source interface{}, destination interface{}) error - // Delete delete relationship in join table for sources - Delete(handler JoinTableHandlerInterface, db *DB, sources ...interface{}) error - // JoinWith query with `Join` conditions - JoinWith(handler JoinTableHandlerInterface, db *DB, source interface{}) *DB - // SourceForeignKeys return source foreign keys - SourceForeignKeys() []JoinTableForeignKey - // DestinationForeignKeys return destination foreign keys - DestinationForeignKeys() []JoinTableForeignKey -} - -// JoinTableForeignKey join table foreign key struct -type JoinTableForeignKey struct { - DBName string - AssociationDBName string -} - -// JoinTableSource is a struct that contains model type and foreign keys -type JoinTableSource struct { - ModelType reflect.Type - ForeignKeys []JoinTableForeignKey -} - -// JoinTableHandler default join table handler -type JoinTableHandler struct { - TableName string `sql:"-"` - Source JoinTableSource `sql:"-"` - Destination JoinTableSource `sql:"-"` -} - -// SourceForeignKeys return source foreign keys -func (s *JoinTableHandler) SourceForeignKeys() []JoinTableForeignKey { - return s.Source.ForeignKeys -} - -// DestinationForeignKeys return destination foreign keys -func (s *JoinTableHandler) DestinationForeignKeys() []JoinTableForeignKey { - return s.Destination.ForeignKeys -} - -// Setup initialize a default join table handler -func (s *JoinTableHandler) Setup(relationship *Relationship, tableName string, source reflect.Type, destination reflect.Type) { - s.TableName = tableName - - s.Source = JoinTableSource{ModelType: source} - s.Source.ForeignKeys = []JoinTableForeignKey{} - for idx, dbName := range relationship.ForeignFieldNames { - s.Source.ForeignKeys = append(s.Source.ForeignKeys, JoinTableForeignKey{ - DBName: relationship.ForeignDBNames[idx], - AssociationDBName: dbName, - }) - } - - s.Destination = JoinTableSource{ModelType: destination} - s.Destination.ForeignKeys = []JoinTableForeignKey{} - for idx, dbName := range relationship.AssociationForeignFieldNames { - s.Destination.ForeignKeys = append(s.Destination.ForeignKeys, JoinTableForeignKey{ - DBName: relationship.AssociationForeignDBNames[idx], - AssociationDBName: dbName, - }) - } -} - -// Table return join table's table name -func (s JoinTableHandler) Table(db *DB) string { - return DefaultTableNameHandler(db, s.TableName) -} - -func (s JoinTableHandler) updateConditionMap(conditionMap map[string]interface{}, db *DB, joinTableSources []JoinTableSource, sources ...interface{}) { - for _, source := range sources { - scope := db.NewScope(source) - modelType := scope.GetModelStruct().ModelType - - for _, joinTableSource := range joinTableSources { - if joinTableSource.ModelType == modelType { - for _, foreignKey := range joinTableSource.ForeignKeys { - if field, ok := scope.FieldByName(foreignKey.AssociationDBName); ok { - conditionMap[foreignKey.DBName] = field.Field.Interface() - } - } - break - } - } - } -} - -// Add create relationship in join table for source and destination -func (s JoinTableHandler) Add(handler JoinTableHandlerInterface, db *DB, source interface{}, destination interface{}) error { - var ( - scope = db.NewScope("") - conditionMap = map[string]interface{}{} - ) - - // Update condition map for source - s.updateConditionMap(conditionMap, db, []JoinTableSource{s.Source}, source) - - // Update condition map for destination - s.updateConditionMap(conditionMap, db, []JoinTableSource{s.Destination}, destination) - - var assignColumns, binVars, conditions []string - var values []interface{} - for key, value := range conditionMap { - assignColumns = append(assignColumns, scope.Quote(key)) - binVars = append(binVars, `?`) - conditions = append(conditions, fmt.Sprintf("%v = ?", scope.Quote(key))) - values = append(values, value) - } - - for _, value := range values { - values = append(values, value) - } - - quotedTable := scope.Quote(handler.Table(db)) - sql := fmt.Sprintf( - "INSERT INTO %v (%v) SELECT %v %v WHERE NOT EXISTS (SELECT * FROM %v WHERE %v)", - quotedTable, - strings.Join(assignColumns, ","), - strings.Join(binVars, ","), - scope.Dialect().SelectFromDummyTable(), - quotedTable, - strings.Join(conditions, " AND "), - ) - - return db.Exec(sql, values...).Error -} - -// Delete delete relationship in join table for sources -func (s JoinTableHandler) Delete(handler JoinTableHandlerInterface, db *DB, sources ...interface{}) error { - var ( - scope = db.NewScope(nil) - conditions []string - values []interface{} - conditionMap = map[string]interface{}{} - ) - - s.updateConditionMap(conditionMap, db, []JoinTableSource{s.Source, s.Destination}, sources...) - - for key, value := range conditionMap { - conditions = append(conditions, fmt.Sprintf("%v = ?", scope.Quote(key))) - values = append(values, value) - } - - return db.Table(handler.Table(db)).Where(strings.Join(conditions, " AND "), values...).Delete("").Error -} - -// JoinWith query with `Join` conditions -func (s JoinTableHandler) JoinWith(handler JoinTableHandlerInterface, db *DB, source interface{}) *DB { - var ( - scope = db.NewScope(source) - tableName = handler.Table(db) - quotedTableName = scope.Quote(tableName) - joinConditions []string - values []interface{} - ) - - if s.Source.ModelType == scope.GetModelStruct().ModelType { - destinationTableName := db.NewScope(reflect.New(s.Destination.ModelType).Interface()).QuotedTableName() - for _, foreignKey := range s.Destination.ForeignKeys { - joinConditions = append(joinConditions, fmt.Sprintf("%v.%v = %v.%v", quotedTableName, scope.Quote(foreignKey.DBName), destinationTableName, scope.Quote(foreignKey.AssociationDBName))) - } - - var foreignDBNames []string - var foreignFieldNames []string - - for _, foreignKey := range s.Source.ForeignKeys { - foreignDBNames = append(foreignDBNames, foreignKey.DBName) - if field, ok := scope.FieldByName(foreignKey.AssociationDBName); ok { - foreignFieldNames = append(foreignFieldNames, field.Name) - } - } - - foreignFieldValues := scope.getColumnAsArray(foreignFieldNames, scope.Value) - - var condString string - if len(foreignFieldValues) > 0 { - var quotedForeignDBNames []string - for _, dbName := range foreignDBNames { - quotedForeignDBNames = append(quotedForeignDBNames, tableName+"."+dbName) - } - - condString = fmt.Sprintf("%v IN (%v)", toQueryCondition(scope, quotedForeignDBNames), toQueryMarks(foreignFieldValues)) - - keys := scope.getColumnAsArray(foreignFieldNames, scope.Value) - values = append(values, toQueryValues(keys)) - } else { - condString = fmt.Sprintf("1 <> 1") - } - - return db.Joins(fmt.Sprintf("INNER JOIN %v ON %v", quotedTableName, strings.Join(joinConditions, " AND "))). - Where(condString, toQueryValues(foreignFieldValues)...) - } - - db.Error = errors.New("wrong source type for join table handler") - return db -} diff --git a/deps/github.com/jinzhu/gorm/join_table_test.go b/deps/github.com/jinzhu/gorm/join_table_test.go deleted file mode 100644 index 6d5f427d1..000000000 --- a/deps/github.com/jinzhu/gorm/join_table_test.go +++ /dev/null @@ -1,117 +0,0 @@ -package gorm_test - -import ( - "fmt" - "strconv" - "testing" - "time" - - "github.com/jinzhu/gorm" -) - -type Person struct { - Id int - Name string - Addresses []*Address `gorm:"many2many:person_addresses;"` -} - -type PersonAddress struct { - gorm.JoinTableHandler - PersonID int - AddressID int - DeletedAt *time.Time - CreatedAt time.Time -} - -func (*PersonAddress) Add(handler gorm.JoinTableHandlerInterface, db *gorm.DB, foreignValue interface{}, associationValue interface{}) error { - foreignPrimaryKey, _ := strconv.Atoi(fmt.Sprint(db.NewScope(foreignValue).PrimaryKeyValue())) - associationPrimaryKey, _ := strconv.Atoi(fmt.Sprint(db.NewScope(associationValue).PrimaryKeyValue())) - if result := db.Unscoped().Model(&PersonAddress{}).Where(map[string]interface{}{ - "person_id": foreignPrimaryKey, - "address_id": associationPrimaryKey, - }).Update(map[string]interface{}{ - "person_id": foreignPrimaryKey, - "address_id": associationPrimaryKey, - "deleted_at": gorm.Expr("NULL"), - }).RowsAffected; result == 0 { - return db.Create(&PersonAddress{ - PersonID: foreignPrimaryKey, - AddressID: associationPrimaryKey, - }).Error - } - - return nil -} - -func (*PersonAddress) Delete(handler gorm.JoinTableHandlerInterface, db *gorm.DB, sources ...interface{}) error { - return db.Delete(&PersonAddress{}).Error -} - -func (pa *PersonAddress) JoinWith(handler gorm.JoinTableHandlerInterface, db *gorm.DB, source interface{}) *gorm.DB { - table := pa.Table(db) - return db.Joins("INNER JOIN person_addresses ON person_addresses.address_id = addresses.id").Where(fmt.Sprintf("%v.deleted_at IS NULL OR %v.deleted_at <= '0001-01-02'", table, table)) -} - -func TestJoinTable(t *testing.T) { - DB.Exec("drop table person_addresses;") - DB.AutoMigrate(&Person{}) - DB.SetJoinTableHandler(&Person{}, "Addresses", &PersonAddress{}) - - address1 := &Address{Address1: "address 1"} - address2 := &Address{Address1: "address 2"} - person := &Person{Name: "person", Addresses: []*Address{address1, address2}} - DB.Save(person) - - DB.Model(person).Association("Addresses").Delete(address1) - - if DB.Find(&[]PersonAddress{}, "person_id = ?", person.Id).RowsAffected != 1 { - t.Errorf("Should found one address") - } - - if DB.Model(person).Association("Addresses").Count() != 1 { - t.Errorf("Should found one address") - } - - if DB.Unscoped().Find(&[]PersonAddress{}, "person_id = ?", person.Id).RowsAffected != 2 { - t.Errorf("Found two addresses with Unscoped") - } - - if DB.Model(person).Association("Addresses").Clear(); DB.Model(person).Association("Addresses").Count() != 0 { - t.Errorf("Should deleted all addresses") - } -} - -func TestEmbeddedMany2ManyRelationship(t *testing.T) { - type EmbeddedPerson struct { - ID int - Name string - Addresses []*Address `gorm:"many2many:person_addresses;"` - } - - type NewPerson struct { - EmbeddedPerson - ExternalID uint - } - DB.Exec("drop table person_addresses;") - DB.AutoMigrate(&NewPerson{}) - - address1 := &Address{Address1: "address 1"} - address2 := &Address{Address1: "address 2"} - person := &NewPerson{ExternalID: 100, EmbeddedPerson: EmbeddedPerson{Name: "person", Addresses: []*Address{address1, address2}}} - if err := DB.Save(person).Error; err != nil { - t.Errorf("no error should return when save embedded many2many relationship, but got %v", err) - } - - if err := DB.Model(person).Association("Addresses").Delete(address1).Error; err != nil { - t.Errorf("no error should return when delete embedded many2many relationship, but got %v", err) - } - - association := DB.Model(person).Association("Addresses") - if count := association.Count(); count != 1 || association.Error != nil { - t.Errorf("Should found one address, but got %v, error is %v", count, association.Error) - } - - if association.Clear(); association.Count() != 0 { - t.Errorf("Should deleted all addresses") - } -} diff --git a/deps/github.com/jinzhu/gorm/logger.go b/deps/github.com/jinzhu/gorm/logger.go deleted file mode 100644 index 4324a2e40..000000000 --- a/deps/github.com/jinzhu/gorm/logger.go +++ /dev/null @@ -1,119 +0,0 @@ -package gorm - -import ( - "database/sql/driver" - "fmt" - "log" - "os" - "reflect" - "regexp" - "strconv" - "time" - "unicode" -) - -var ( - defaultLogger = Logger{log.New(os.Stdout, "\r\n", 0)} - sqlRegexp = regexp.MustCompile(`\?`) - numericPlaceHolderRegexp = regexp.MustCompile(`\$\d+`) -) - -func isPrintable(s string) bool { - for _, r := range s { - if !unicode.IsPrint(r) { - return false - } - } - return true -} - -var LogFormatter = func(values ...interface{}) (messages []interface{}) { - if len(values) > 1 { - var ( - sql string - formattedValues []string - level = values[0] - currentTime = "\n\033[33m[" + NowFunc().Format("2006-01-02 15:04:05") + "]\033[0m" - source = fmt.Sprintf("\033[35m(%v)\033[0m", values[1]) - ) - - messages = []interface{}{source, currentTime} - - if level == "sql" { - // duration - messages = append(messages, fmt.Sprintf(" \033[36;1m[%.2fms]\033[0m ", float64(values[2].(time.Duration).Nanoseconds()/1e4)/100.0)) - // sql - - for _, value := range values[4].([]interface{}) { - indirectValue := reflect.Indirect(reflect.ValueOf(value)) - if indirectValue.IsValid() { - value = indirectValue.Interface() - if t, ok := value.(time.Time); ok { - formattedValues = append(formattedValues, fmt.Sprintf("'%v'", t.Format("2006-01-02 15:04:05"))) - } else if b, ok := value.([]byte); ok { - if str := string(b); isPrintable(str) { - formattedValues = append(formattedValues, fmt.Sprintf("'%v'", str)) - } else { - formattedValues = append(formattedValues, "''") - } - } else if r, ok := value.(driver.Valuer); ok { - if value, err := r.Value(); err == nil && value != nil { - formattedValues = append(formattedValues, fmt.Sprintf("'%v'", value)) - } else { - formattedValues = append(formattedValues, "NULL") - } - } else { - formattedValues = append(formattedValues, fmt.Sprintf("'%v'", value)) - } - } else { - formattedValues = append(formattedValues, "NULL") - } - } - - // differentiate between $n placeholders or else treat like ? - if numericPlaceHolderRegexp.MatchString(values[3].(string)) { - sql = values[3].(string) - for index, value := range formattedValues { - placeholder := fmt.Sprintf(`\$%d([^\d]|$)`, index+1) - sql = regexp.MustCompile(placeholder).ReplaceAllString(sql, value+"$1") - } - } else { - formattedValuesLength := len(formattedValues) - for index, value := range sqlRegexp.Split(values[3].(string), -1) { - sql += value - if index < formattedValuesLength { - sql += formattedValues[index] - } - } - } - - messages = append(messages, sql) - messages = append(messages, fmt.Sprintf(" \n\033[36;31m[%v]\033[0m ", strconv.FormatInt(values[5].(int64), 10)+" rows affected or returned ")) - } else { - messages = append(messages, "\033[31;1m") - messages = append(messages, values[2:]...) - messages = append(messages, "\033[0m") - } - } - - return -} - -type logger interface { - Print(v ...interface{}) -} - -// LogWriter log writer interface -type LogWriter interface { - Println(v ...interface{}) -} - -// Logger default logger -type Logger struct { - LogWriter -} - -// Print format & print log -func (logger Logger) Print(values ...interface{}) { - logger.Println(LogFormatter(values...)...) -} diff --git a/deps/github.com/jinzhu/gorm/main.go b/deps/github.com/jinzhu/gorm/main.go deleted file mode 100644 index 25c3a06b4..000000000 --- a/deps/github.com/jinzhu/gorm/main.go +++ /dev/null @@ -1,781 +0,0 @@ -package gorm - -import ( - "database/sql" - "errors" - "fmt" - "reflect" - "strings" - "time" -) - -// DB contains information for current db connection -type DB struct { - Value interface{} - Error error - RowsAffected int64 - - // single db - db SQLCommon - blockGlobalUpdate bool - logMode int - logger logger - search *search - values map[string]interface{} - - // global db - parent *DB - callbacks *Callback - dialect Dialect - singularTable bool -} - -// Open initialize a new db connection, need to import driver first, e.g: -// -// import _ "github.com/go-sql-driver/mysql" -// func main() { -// db, err := gorm.Open("mysql", "user:password@/dbname?charset=utf8&parseTime=True&loc=Local") -// } -// GORM has wrapped some drivers, for easier to remember driver's import path, so you could import the mysql driver with -// import _ "github.com/jinzhu/gorm/dialects/mysql" -// // import _ "github.com/jinzhu/gorm/dialects/postgres" -// // import _ "github.com/jinzhu/gorm/dialects/sqlite" -// // import _ "github.com/jinzhu/gorm/dialects/mssql" -func Open(dialect string, args ...interface{}) (db *DB, err error) { - if len(args) == 0 { - err = errors.New("invalid database source") - return nil, err - } - var source string - var dbSQL SQLCommon - - switch value := args[0].(type) { - case string: - var driver = dialect - if len(args) == 1 { - source = value - } else if len(args) >= 2 { - driver = value - source = args[1].(string) - } - dbSQL, err = sql.Open(driver, source) - case SQLCommon: - dbSQL = value - default: - return nil, fmt.Errorf("invalid database source: %v is not a valid type", value) - } - - db = &DB{ - db: dbSQL, - logger: defaultLogger, - values: map[string]interface{}{}, - callbacks: DefaultCallback, - dialect: newDialect(dialect, dbSQL), - } - db.parent = db - if err != nil { - return - } - // Send a ping to make sure the database connection is alive. - if d, ok := dbSQL.(*sql.DB); ok { - if err = d.Ping(); err != nil { - d.Close() - } - } - return -} - -// New clone a new db connection without search conditions -func (s *DB) New() *DB { - clone := s.clone() - clone.search = nil - clone.Value = nil - return clone -} - -type closer interface { - Close() error -} - -// Close close current db connection. If database connection is not an io.Closer, returns an error. -func (s *DB) Close() error { - if db, ok := s.parent.db.(closer); ok { - return db.Close() - } - return errors.New("can't close current db") -} - -// DB get `*sql.DB` from current connection -// If the underlying database connection is not a *sql.DB, returns nil -func (s *DB) DB() *sql.DB { - db, _ := s.db.(*sql.DB) - return db -} - -// CommonDB return the underlying `*sql.DB` or `*sql.Tx` instance, mainly intended to allow coexistence with legacy non-GORM code. -func (s *DB) CommonDB() SQLCommon { - return s.db -} - -// Dialect get dialect -func (s *DB) Dialect() Dialect { - return s.parent.dialect -} - -// Callback return `Callbacks` container, you could add/change/delete callbacks with it -// db.Callback().Create().Register("update_created_at", updateCreated) -// Refer https://jinzhu.github.io/gorm/development.html#callbacks -func (s *DB) Callback() *Callback { - s.parent.callbacks = s.parent.callbacks.clone() - return s.parent.callbacks -} - -// SetLogger replace default logger -func (s *DB) SetLogger(log logger) { - s.logger = log -} - -// LogMode set log mode, `true` for detailed logs, `false` for no log, default, will only print error logs -func (s *DB) LogMode(enable bool) *DB { - if enable { - s.logMode = 2 - } else { - s.logMode = 1 - } - return s -} - -// BlockGlobalUpdate if true, generates an error on update/delete without where clause. -// This is to prevent eventual error with empty objects updates/deletions -func (s *DB) BlockGlobalUpdate(enable bool) *DB { - s.blockGlobalUpdate = enable - return s -} - -// HasBlockGlobalUpdate return state of block -func (s *DB) HasBlockGlobalUpdate() bool { - return s.blockGlobalUpdate -} - -// SingularTable use singular table by default -func (s *DB) SingularTable(enable bool) { - modelStructsMap = newModelStructsMap() - s.parent.singularTable = enable -} - -// NewScope create a scope for current operation -func (s *DB) NewScope(value interface{}) *Scope { - dbClone := s.clone() - dbClone.Value = value - return &Scope{db: dbClone, Search: dbClone.search.clone(), Value: value} -} - -// QueryExpr returns the query as expr object -func (s *DB) QueryExpr() *expr { - scope := s.NewScope(s.Value) - scope.InstanceSet("skip_bindvar", true) - scope.prepareQuerySQL() - - return Expr(scope.SQL, scope.SQLVars...) -} - -// SubQuery returns the query as sub query -func (s *DB) SubQuery() *expr { - scope := s.NewScope(s.Value) - scope.InstanceSet("skip_bindvar", true) - scope.prepareQuerySQL() - - return Expr(fmt.Sprintf("(%v)", scope.SQL), scope.SQLVars...) -} - -// Where return a new relation, filter records with given conditions, accepts `map`, `struct` or `string` as conditions, refer http://jinzhu.github.io/gorm/crud.html#query -func (s *DB) Where(query interface{}, args ...interface{}) *DB { - return s.clone().search.Where(query, args...).db -} - -// Or filter records that match before conditions or this one, similar to `Where` -func (s *DB) Or(query interface{}, args ...interface{}) *DB { - return s.clone().search.Or(query, args...).db -} - -// Not filter records that don't match current conditions, similar to `Where` -func (s *DB) Not(query interface{}, args ...interface{}) *DB { - return s.clone().search.Not(query, args...).db -} - -// Limit specify the number of records to be retrieved -func (s *DB) Limit(limit interface{}) *DB { - return s.clone().search.Limit(limit).db -} - -// Offset specify the number of records to skip before starting to return the records -func (s *DB) Offset(offset interface{}) *DB { - return s.clone().search.Offset(offset).db -} - -// Order specify order when retrieve records from database, set reorder to `true` to overwrite defined conditions -// db.Order("name DESC") -// db.Order("name DESC", true) // reorder -// db.Order(gorm.Expr("name = ? DESC", "first")) // sql expression -func (s *DB) Order(value interface{}, reorder ...bool) *DB { - return s.clone().search.Order(value, reorder...).db -} - -// Select specify fields that you want to retrieve from database when querying, by default, will select all fields; -// When creating/updating, specify fields that you want to save to database -func (s *DB) Select(query interface{}, args ...interface{}) *DB { - return s.clone().search.Select(query, args...).db -} - -// Omit specify fields that you want to ignore when saving to database for creating, updating -func (s *DB) Omit(columns ...string) *DB { - return s.clone().search.Omit(columns...).db -} - -// Group specify the group method on the find -func (s *DB) Group(query string) *DB { - return s.clone().search.Group(query).db -} - -// Having specify HAVING conditions for GROUP BY -func (s *DB) Having(query interface{}, values ...interface{}) *DB { - return s.clone().search.Having(query, values...).db -} - -// Joins specify Joins conditions -// db.Joins("JOIN emails ON emails.user_id = users.id AND emails.email = ?", "jinzhu@example.org").Find(&user) -func (s *DB) Joins(query string, args ...interface{}) *DB { - return s.clone().search.Joins(query, args...).db -} - -// Scopes pass current database connection to arguments `func(*DB) *DB`, which could be used to add conditions dynamically -// func AmountGreaterThan1000(db *gorm.DB) *gorm.DB { -// return db.Where("amount > ?", 1000) -// } -// -// func OrderStatus(status []string) func (db *gorm.DB) *gorm.DB { -// return func (db *gorm.DB) *gorm.DB { -// return db.Scopes(AmountGreaterThan1000).Where("status in (?)", status) -// } -// } -// -// db.Scopes(AmountGreaterThan1000, OrderStatus([]string{"paid", "shipped"})).Find(&orders) -// Refer https://jinzhu.github.io/gorm/crud.html#scopes -func (s *DB) Scopes(funcs ...func(*DB) *DB) *DB { - for _, f := range funcs { - s = f(s) - } - return s -} - -// Unscoped return all record including deleted record, refer Soft Delete https://jinzhu.github.io/gorm/crud.html#soft-delete -func (s *DB) Unscoped() *DB { - return s.clone().search.unscoped().db -} - -// Attrs initialize struct with argument if record not found with `FirstOrInit` https://jinzhu.github.io/gorm/crud.html#firstorinit or `FirstOrCreate` https://jinzhu.github.io/gorm/crud.html#firstorcreate -func (s *DB) Attrs(attrs ...interface{}) *DB { - return s.clone().search.Attrs(attrs...).db -} - -// Assign assign result with argument regardless it is found or not with `FirstOrInit` https://jinzhu.github.io/gorm/crud.html#firstorinit or `FirstOrCreate` https://jinzhu.github.io/gorm/crud.html#firstorcreate -func (s *DB) Assign(attrs ...interface{}) *DB { - return s.clone().search.Assign(attrs...).db -} - -// First find first record that match given conditions, order by primary key -func (s *DB) First(out interface{}, where ...interface{}) *DB { - newScope := s.NewScope(out) - newScope.Search.Limit(1) - return newScope.Set("gorm:order_by_primary_key", "ASC"). - inlineCondition(where...).callCallbacks(s.parent.callbacks.queries).db -} - -// Take return a record that match given conditions, the order will depend on the database implementation -func (s *DB) Take(out interface{}, where ...interface{}) *DB { - newScope := s.NewScope(out) - newScope.Search.Limit(1) - return newScope.inlineCondition(where...).callCallbacks(s.parent.callbacks.queries).db -} - -// Last find last record that match given conditions, order by primary key -func (s *DB) Last(out interface{}, where ...interface{}) *DB { - newScope := s.NewScope(out) - newScope.Search.Limit(1) - return newScope.Set("gorm:order_by_primary_key", "DESC"). - inlineCondition(where...).callCallbacks(s.parent.callbacks.queries).db -} - -// Find find records that match given conditions -func (s *DB) Find(out interface{}, where ...interface{}) *DB { - return s.NewScope(out).inlineCondition(where...).callCallbacks(s.parent.callbacks.queries).db -} - -// Scan scan value to a struct -func (s *DB) Scan(dest interface{}) *DB { - return s.NewScope(s.Value).Set("gorm:query_destination", dest).callCallbacks(s.parent.callbacks.queries).db -} - -// Row return `*sql.Row` with given conditions -func (s *DB) Row() *sql.Row { - return s.NewScope(s.Value).row() -} - -// Rows return `*sql.Rows` with given conditions -func (s *DB) Rows() (*sql.Rows, error) { - return s.NewScope(s.Value).rows() -} - -// ScanRows scan `*sql.Rows` to give struct -func (s *DB) ScanRows(rows *sql.Rows, result interface{}) error { - var ( - scope = s.NewScope(result) - clone = scope.db - columns, err = rows.Columns() - ) - - if clone.AddError(err) == nil { - scope.scan(rows, columns, scope.Fields()) - } - - return clone.Error -} - -// Pluck used to query single column from a model as a map -// var ages []int64 -// db.Find(&users).Pluck("age", &ages) -func (s *DB) Pluck(column string, value interface{}) *DB { - return s.NewScope(s.Value).pluck(column, value).db -} - -// Count get how many records for a model -func (s *DB) Count(value interface{}) *DB { - return s.NewScope(s.Value).count(value).db -} - -// Related get related associations -func (s *DB) Related(value interface{}, foreignKeys ...string) *DB { - return s.NewScope(s.Value).related(value, foreignKeys...).db -} - -// FirstOrInit find first matched record or initialize a new one with given conditions (only works with struct, map conditions) -// https://jinzhu.github.io/gorm/crud.html#firstorinit -func (s *DB) FirstOrInit(out interface{}, where ...interface{}) *DB { - c := s.clone() - if result := c.First(out, where...); result.Error != nil { - if !result.RecordNotFound() { - return result - } - c.NewScope(out).inlineCondition(where...).initialize() - } else { - c.NewScope(out).updatedAttrsWithValues(c.search.assignAttrs) - } - return c -} - -// FirstOrCreate find first matched record or create a new one with given conditions (only works with struct, map conditions) -// https://jinzhu.github.io/gorm/crud.html#firstorcreate -func (s *DB) FirstOrCreate(out interface{}, where ...interface{}) *DB { - c := s.clone() - if result := s.First(out, where...); result.Error != nil { - if !result.RecordNotFound() { - return result - } - return c.NewScope(out).inlineCondition(where...).initialize().callCallbacks(c.parent.callbacks.creates).db - } else if len(c.search.assignAttrs) > 0 { - return c.NewScope(out).InstanceSet("gorm:update_interface", c.search.assignAttrs).callCallbacks(c.parent.callbacks.updates).db - } - return c -} - -// Update update attributes with callbacks, refer: https://jinzhu.github.io/gorm/crud.html#update -func (s *DB) Update(attrs ...interface{}) *DB { - return s.Updates(toSearchableMap(attrs...), true) -} - -// Updates update attributes with callbacks, refer: https://jinzhu.github.io/gorm/crud.html#update -func (s *DB) Updates(values interface{}, ignoreProtectedAttrs ...bool) *DB { - return s.NewScope(s.Value). - Set("gorm:ignore_protected_attrs", len(ignoreProtectedAttrs) > 0). - InstanceSet("gorm:update_interface", values). - callCallbacks(s.parent.callbacks.updates).db -} - -// UpdateColumn update attributes without callbacks, refer: https://jinzhu.github.io/gorm/crud.html#update -func (s *DB) UpdateColumn(attrs ...interface{}) *DB { - return s.UpdateColumns(toSearchableMap(attrs...)) -} - -// UpdateColumns update attributes without callbacks, refer: https://jinzhu.github.io/gorm/crud.html#update -func (s *DB) UpdateColumns(values interface{}) *DB { - return s.NewScope(s.Value). - Set("gorm:update_column", true). - Set("gorm:save_associations", false). - InstanceSet("gorm:update_interface", values). - callCallbacks(s.parent.callbacks.updates).db -} - -// Save update value in database, if the value doesn't have primary key, will insert it -func (s *DB) Save(value interface{}) *DB { - scope := s.NewScope(value) - if !scope.PrimaryKeyZero() { - newDB := scope.callCallbacks(s.parent.callbacks.updates).db - if newDB.Error == nil && newDB.RowsAffected == 0 { - return s.New().FirstOrCreate(value) - } - return newDB - } - return scope.callCallbacks(s.parent.callbacks.creates).db -} - -// Create insert the value into database -func (s *DB) Create(value interface{}) *DB { - scope := s.NewScope(value) - return scope.callCallbacks(s.parent.callbacks.creates).db -} - -// Delete delete value match given conditions, if the value has primary key, then will including the primary key as condition -func (s *DB) Delete(value interface{}, where ...interface{}) *DB { - return s.NewScope(value).inlineCondition(where...).callCallbacks(s.parent.callbacks.deletes).db -} - -// Raw use raw sql as conditions, won't run it unless invoked by other methods -// db.Raw("SELECT name, age FROM users WHERE name = ?", 3).Scan(&result) -func (s *DB) Raw(sql string, values ...interface{}) *DB { - return s.clone().search.Raw(true).Where(sql, values...).db -} - -// Exec execute raw sql -func (s *DB) Exec(sql string, values ...interface{}) *DB { - scope := s.NewScope(nil) - generatedSQL := scope.buildCondition(map[string]interface{}{"query": sql, "args": values}, true) - generatedSQL = strings.TrimSuffix(strings.TrimPrefix(generatedSQL, "("), ")") - scope.Raw(generatedSQL) - return scope.Exec().db -} - -// Model specify the model you would like to run db operations -// // update all users's name to `hello` -// db.Model(&User{}).Update("name", "hello") -// // if user's primary key is non-blank, will use it as condition, then will only update the user's name to `hello` -// db.Model(&user).Update("name", "hello") -func (s *DB) Model(value interface{}) *DB { - c := s.clone() - c.Value = value - return c -} - -// Table specify the table you would like to run db operations -func (s *DB) Table(name string) *DB { - clone := s.clone() - clone.search.Table(name) - clone.Value = nil - return clone -} - -// Debug start debug mode -func (s *DB) Debug() *DB { - return s.clone().LogMode(true) -} - -// Begin begin a transaction -func (s *DB) Begin() *DB { - c := s.clone() - if db, ok := c.db.(sqlDb); ok && db != nil { - tx, err := db.Begin() - c.db = interface{}(tx).(SQLCommon) - c.AddError(err) - } else { - c.AddError(ErrCantStartTransaction) - } - return c -} - -// Commit commit a transaction -func (s *DB) Commit() *DB { - var emptySQLTx *sql.Tx - if db, ok := s.db.(sqlTx); ok && db != nil && db != emptySQLTx { - s.AddError(db.Commit()) - } else { - s.AddError(ErrInvalidTransaction) - } - return s -} - -// Rollback rollback a transaction -func (s *DB) Rollback() *DB { - var emptySQLTx *sql.Tx - if db, ok := s.db.(sqlTx); ok && db != nil && db != emptySQLTx { - s.AddError(db.Rollback()) - } else { - s.AddError(ErrInvalidTransaction) - } - return s -} - -// NewRecord check if value's primary key is blank -func (s *DB) NewRecord(value interface{}) bool { - return s.NewScope(value).PrimaryKeyZero() -} - -// RecordNotFound check if returning ErrRecordNotFound error -func (s *DB) RecordNotFound() bool { - for _, err := range s.GetErrors() { - if err == ErrRecordNotFound { - return true - } - } - return false -} - -// CreateTable create table for models -func (s *DB) CreateTable(models ...interface{}) *DB { - db := s.Unscoped() - for _, model := range models { - db = db.NewScope(model).createTable().db - } - return db -} - -// DropTable drop table for models -func (s *DB) DropTable(values ...interface{}) *DB { - db := s.clone() - for _, value := range values { - if tableName, ok := value.(string); ok { - db = db.Table(tableName) - } - - db = db.NewScope(value).dropTable().db - } - return db -} - -// DropTableIfExists drop table if it is exist -func (s *DB) DropTableIfExists(values ...interface{}) *DB { - db := s.clone() - for _, value := range values { - if s.HasTable(value) { - db.AddError(s.DropTable(value).Error) - } - } - return db -} - -// HasTable check has table or not -func (s *DB) HasTable(value interface{}) bool { - var ( - scope = s.NewScope(value) - tableName string - ) - - if name, ok := value.(string); ok { - tableName = name - } else { - tableName = scope.TableName() - } - - has := scope.Dialect().HasTable(tableName) - s.AddError(scope.db.Error) - return has -} - -// AutoMigrate run auto migration for given models, will only add missing fields, won't delete/change current data -func (s *DB) AutoMigrate(values ...interface{}) *DB { - db := s.Unscoped() - for _, value := range values { - db = db.NewScope(value).autoMigrate().db - } - return db -} - -// ModifyColumn modify column to type -func (s *DB) ModifyColumn(column string, typ string) *DB { - scope := s.NewScope(s.Value) - scope.modifyColumn(column, typ) - return scope.db -} - -// DropColumn drop a column -func (s *DB) DropColumn(column string) *DB { - scope := s.NewScope(s.Value) - scope.dropColumn(column) - return scope.db -} - -// AddIndex add index for columns with given name -func (s *DB) AddIndex(indexName string, columns ...string) *DB { - scope := s.Unscoped().NewScope(s.Value) - scope.addIndex(false, indexName, columns...) - return scope.db -} - -// AddUniqueIndex add unique index for columns with given name -func (s *DB) AddUniqueIndex(indexName string, columns ...string) *DB { - scope := s.Unscoped().NewScope(s.Value) - scope.addIndex(true, indexName, columns...) - return scope.db -} - -// RemoveIndex remove index with name -func (s *DB) RemoveIndex(indexName string) *DB { - scope := s.NewScope(s.Value) - scope.removeIndex(indexName) - return scope.db -} - -// AddForeignKey Add foreign key to the given scope, e.g: -// db.Model(&User{}).AddForeignKey("city_id", "cities(id)", "RESTRICT", "RESTRICT") -func (s *DB) AddForeignKey(field string, dest string, onDelete string, onUpdate string) *DB { - scope := s.NewScope(s.Value) - scope.addForeignKey(field, dest, onDelete, onUpdate) - return scope.db -} - -// RemoveForeignKey Remove foreign key from the given scope, e.g: -// db.Model(&User{}).RemoveForeignKey("city_id", "cities(id)") -func (s *DB) RemoveForeignKey(field string, dest string) *DB { - scope := s.clone().NewScope(s.Value) - scope.removeForeignKey(field, dest) - return scope.db -} - -// Association start `Association Mode` to handler relations things easir in that mode, refer: https://jinzhu.github.io/gorm/associations.html#association-mode -func (s *DB) Association(column string) *Association { - var err error - var scope = s.Set("gorm:association:source", s.Value).NewScope(s.Value) - - if primaryField := scope.PrimaryField(); primaryField.IsBlank { - err = errors.New("primary key can't be nil") - } else { - if field, ok := scope.FieldByName(column); ok { - if field.Relationship == nil || len(field.Relationship.ForeignFieldNames) == 0 { - err = fmt.Errorf("invalid association %v for %v", column, scope.IndirectValue().Type()) - } else { - return &Association{scope: scope, column: column, field: field} - } - } else { - err = fmt.Errorf("%v doesn't have column %v", scope.IndirectValue().Type(), column) - } - } - - return &Association{Error: err} -} - -// Preload preload associations with given conditions -// db.Preload("Orders", "state NOT IN (?)", "cancelled").Find(&users) -func (s *DB) Preload(column string, conditions ...interface{}) *DB { - return s.clone().search.Preload(column, conditions...).db -} - -// Set set setting by name, which could be used in callbacks, will clone a new db, and update its setting -func (s *DB) Set(name string, value interface{}) *DB { - return s.clone().InstantSet(name, value) -} - -// InstantSet instant set setting, will affect current db -func (s *DB) InstantSet(name string, value interface{}) *DB { - s.values[name] = value - return s -} - -// Get get setting by name -func (s *DB) Get(name string) (value interface{}, ok bool) { - value, ok = s.values[name] - return -} - -// SetJoinTableHandler set a model's join table handler for a relation -func (s *DB) SetJoinTableHandler(source interface{}, column string, handler JoinTableHandlerInterface) { - scope := s.NewScope(source) - for _, field := range scope.GetModelStruct().StructFields { - if field.Name == column || field.DBName == column { - if many2many := field.TagSettings["MANY2MANY"]; many2many != "" { - source := (&Scope{Value: source}).GetModelStruct().ModelType - destination := (&Scope{Value: reflect.New(field.Struct.Type).Interface()}).GetModelStruct().ModelType - handler.Setup(field.Relationship, many2many, source, destination) - field.Relationship.JoinTableHandler = handler - if table := handler.Table(s); scope.Dialect().HasTable(table) { - s.Table(table).AutoMigrate(handler) - } - } - } - } -} - -// AddError add error to the db -func (s *DB) AddError(err error) error { - if err != nil { - if err != ErrRecordNotFound { - if s.logMode == 0 { - go s.print(fileWithLineNum(), err) - } else { - s.log(err) - } - - errors := Errors(s.GetErrors()) - errors = errors.Add(err) - if len(errors) > 1 { - err = errors - } - } - - s.Error = err - } - return err -} - -// GetErrors get happened errors from the db -func (s *DB) GetErrors() []error { - if errs, ok := s.Error.(Errors); ok { - return errs - } else if s.Error != nil { - return []error{s.Error} - } - return []error{} -} - -//////////////////////////////////////////////////////////////////////////////// -// Private Methods For DB -//////////////////////////////////////////////////////////////////////////////// - -func (s *DB) clone() *DB { - db := &DB{ - db: s.db, - parent: s.parent, - logger: s.logger, - logMode: s.logMode, - values: map[string]interface{}{}, - Value: s.Value, - Error: s.Error, - blockGlobalUpdate: s.blockGlobalUpdate, - } - - for key, value := range s.values { - db.values[key] = value - } - - if s.search == nil { - db.search = &search{limit: -1, offset: -1} - } else { - db.search = s.search.clone() - } - - db.search.db = db - return db -} - -func (s *DB) print(v ...interface{}) { - s.logger.Print(v...) -} - -func (s *DB) log(v ...interface{}) { - if s != nil && s.logMode == 2 { - s.print(append([]interface{}{"log", fileWithLineNum()}, v...)...) - } -} - -func (s *DB) slog(sql string, t time.Time, vars ...interface{}) { - if s.logMode == 2 { - s.print("sql", fileWithLineNum(), NowFunc().Sub(t), sql, vars, s.RowsAffected) - } -} diff --git a/deps/github.com/jinzhu/gorm/main_test.go b/deps/github.com/jinzhu/gorm/main_test.go deleted file mode 100644 index 265e0be73..000000000 --- a/deps/github.com/jinzhu/gorm/main_test.go +++ /dev/null @@ -1,966 +0,0 @@ -package gorm_test - -import ( - "database/sql" - "database/sql/driver" - "fmt" - "os" - "path/filepath" - "reflect" - "strconv" - "strings" - "testing" - "time" - - "github.com/erikstmartin/go-testdb" - "github.com/jinzhu/gorm" - _ "github.com/jinzhu/gorm/dialects/mssql" - _ "github.com/jinzhu/gorm/dialects/mysql" - "github.com/jinzhu/gorm/dialects/postgres" - _ "github.com/jinzhu/gorm/dialects/sqlite" - "github.com/jinzhu/now" -) - -var ( - DB *gorm.DB - t1, t2, t3, t4, t5 time.Time -) - -func init() { - var err error - - if DB, err = OpenTestConnection(); err != nil { - panic(fmt.Sprintf("No error should happen when connecting to test database, but got err=%+v", err)) - } - - runMigration() -} - -func OpenTestConnection() (db *gorm.DB, err error) { - dbDSN := os.Getenv("GORM_DSN") - switch os.Getenv("GORM_DIALECT") { - case "mysql": - fmt.Println("testing mysql...") - if dbDSN == "" { - dbDSN = "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" - } - db, err = gorm.Open("mysql", dbDSN) - case "postgres": - fmt.Println("testing postgres...") - if dbDSN == "" { - dbDSN = "user=gorm password=gorm DB.name=gorm port=9920 sslmode=disable" - } - db, err = gorm.Open("postgres", dbDSN) - case "mssql": - // CREATE LOGIN gorm WITH PASSWORD = 'LoremIpsum86'; - // CREATE DATABASE gorm; - // USE gorm; - // CREATE USER gorm FROM LOGIN gorm; - // sp_changedbowner 'gorm'; - fmt.Println("testing mssql...") - if dbDSN == "" { - dbDSN = "sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" - } - db, err = gorm.Open("mssql", dbDSN) - default: - fmt.Println("testing sqlite3...") - db, err = gorm.Open("sqlite3", filepath.Join(os.TempDir(), "gorm.db")) - } - - // db.SetLogger(Logger{log.New(os.Stdout, "\r\n", 0)}) - // db.SetLogger(log.New(os.Stdout, "\r\n", 0)) - if debug := os.Getenv("DEBUG"); debug == "true" { - db.LogMode(true) - } else if debug == "false" { - db.LogMode(false) - } - - db.DB().SetMaxIdleConns(10) - - return -} - -func TestOpen_ReturnsError_WithBadArgs(t *testing.T) { - stringRef := "foo" - testCases := []interface{}{42, time.Now(), &stringRef} - for _, tc := range testCases { - t.Run(fmt.Sprintf("%v", tc), func(t *testing.T) { - _, err := gorm.Open("postgresql", tc) - if err == nil { - t.Error("Should got error with invalid database source") - } - if !strings.HasPrefix(err.Error(), "invalid database source:") { - t.Errorf("Should got error starting with \"invalid database source:\", but got %q", err.Error()) - } - }) - } -} - -func TestStringPrimaryKey(t *testing.T) { - type UUIDStruct struct { - ID string `gorm:"primary_key"` - Name string - } - DB.DropTable(&UUIDStruct{}) - DB.AutoMigrate(&UUIDStruct{}) - - data := UUIDStruct{ID: "uuid", Name: "hello"} - if err := DB.Save(&data).Error; err != nil || data.ID != "uuid" || data.Name != "hello" { - t.Errorf("string primary key should not be populated") - } - - data = UUIDStruct{ID: "uuid", Name: "hello world"} - if err := DB.Save(&data).Error; err != nil || data.ID != "uuid" || data.Name != "hello world" { - t.Errorf("string primary key should not be populated") - } -} - -func TestExceptionsWithInvalidSql(t *testing.T) { - var columns []string - if DB.Where("sdsd.zaaa = ?", "sd;;;aa").Pluck("aaa", &columns).Error == nil { - t.Errorf("Should got error with invalid SQL") - } - - if DB.Model(&User{}).Where("sdsd.zaaa = ?", "sd;;;aa").Pluck("aaa", &columns).Error == nil { - t.Errorf("Should got error with invalid SQL") - } - - if DB.Where("sdsd.zaaa = ?", "sd;;;aa").Find(&User{}).Error == nil { - t.Errorf("Should got error with invalid SQL") - } - - var count1, count2 int64 - DB.Model(&User{}).Count(&count1) - if count1 <= 0 { - t.Errorf("Should find some users") - } - - if DB.Where("name = ?", "jinzhu; delete * from users").First(&User{}).Error == nil { - t.Errorf("Should got error with invalid SQL") - } - - DB.Model(&User{}).Count(&count2) - if count1 != count2 { - t.Errorf("No user should not be deleted by invalid SQL") - } -} - -func TestSetTable(t *testing.T) { - DB.Create(getPreparedUser("pluck_user1", "pluck_user")) - DB.Create(getPreparedUser("pluck_user2", "pluck_user")) - DB.Create(getPreparedUser("pluck_user3", "pluck_user")) - - if err := DB.Table("users").Where("role = ?", "pluck_user").Pluck("age", &[]int{}).Error; err != nil { - t.Error("No errors should happen if set table for pluck", err) - } - - var users []User - if DB.Table("users").Find(&[]User{}).Error != nil { - t.Errorf("No errors should happen if set table for find") - } - - if DB.Table("invalid_table").Find(&users).Error == nil { - t.Errorf("Should got error when table is set to an invalid table") - } - - DB.Exec("drop table deleted_users;") - if DB.Table("deleted_users").CreateTable(&User{}).Error != nil { - t.Errorf("Create table with specified table") - } - - DB.Table("deleted_users").Save(&User{Name: "DeletedUser"}) - - var deletedUsers []User - DB.Table("deleted_users").Find(&deletedUsers) - if len(deletedUsers) != 1 { - t.Errorf("Query from specified table") - } - - DB.Save(getPreparedUser("normal_user", "reset_table")) - DB.Table("deleted_users").Save(getPreparedUser("deleted_user", "reset_table")) - var user1, user2, user3 User - DB.Where("role = ?", "reset_table").First(&user1).Table("deleted_users").First(&user2).Table("").First(&user3) - if (user1.Name != "normal_user") || (user2.Name != "deleted_user") || (user3.Name != "normal_user") { - t.Errorf("unset specified table with blank string") - } -} - -type Order struct { -} - -type Cart struct { -} - -func (c Cart) TableName() string { - return "shopping_cart" -} - -func TestHasTable(t *testing.T) { - type Foo struct { - Id int - Stuff string - } - DB.DropTable(&Foo{}) - - // Table should not exist at this point, HasTable should return false - if ok := DB.HasTable("foos"); ok { - t.Errorf("Table should not exist, but does") - } - if ok := DB.HasTable(&Foo{}); ok { - t.Errorf("Table should not exist, but does") - } - - // We create the table - if err := DB.CreateTable(&Foo{}).Error; err != nil { - t.Errorf("Table should be created") - } - - // And now it should exits, and HasTable should return true - if ok := DB.HasTable("foos"); !ok { - t.Errorf("Table should exist, but HasTable informs it does not") - } - if ok := DB.HasTable(&Foo{}); !ok { - t.Errorf("Table should exist, but HasTable informs it does not") - } -} - -func TestTableName(t *testing.T) { - DB := DB.Model("") - if DB.NewScope(Order{}).TableName() != "orders" { - t.Errorf("Order's table name should be orders") - } - - if DB.NewScope(&Order{}).TableName() != "orders" { - t.Errorf("&Order's table name should be orders") - } - - if DB.NewScope([]Order{}).TableName() != "orders" { - t.Errorf("[]Order's table name should be orders") - } - - if DB.NewScope(&[]Order{}).TableName() != "orders" { - t.Errorf("&[]Order's table name should be orders") - } - - DB.SingularTable(true) - if DB.NewScope(Order{}).TableName() != "order" { - t.Errorf("Order's singular table name should be order") - } - - if DB.NewScope(&Order{}).TableName() != "order" { - t.Errorf("&Order's singular table name should be order") - } - - if DB.NewScope([]Order{}).TableName() != "order" { - t.Errorf("[]Order's singular table name should be order") - } - - if DB.NewScope(&[]Order{}).TableName() != "order" { - t.Errorf("&[]Order's singular table name should be order") - } - - if DB.NewScope(&Cart{}).TableName() != "shopping_cart" { - t.Errorf("&Cart's singular table name should be shopping_cart") - } - - if DB.NewScope(Cart{}).TableName() != "shopping_cart" { - t.Errorf("Cart's singular table name should be shopping_cart") - } - - if DB.NewScope(&[]Cart{}).TableName() != "shopping_cart" { - t.Errorf("&[]Cart's singular table name should be shopping_cart") - } - - if DB.NewScope([]Cart{}).TableName() != "shopping_cart" { - t.Errorf("[]Cart's singular table name should be shopping_cart") - } - DB.SingularTable(false) -} - -func TestNullValues(t *testing.T) { - DB.DropTable(&NullValue{}) - DB.AutoMigrate(&NullValue{}) - - if err := DB.Save(&NullValue{ - Name: sql.NullString{String: "hello", Valid: true}, - Gender: &sql.NullString{String: "M", Valid: true}, - Age: sql.NullInt64{Int64: 18, Valid: true}, - Male: sql.NullBool{Bool: true, Valid: true}, - Height: sql.NullFloat64{Float64: 100.11, Valid: true}, - AddedAt: NullTime{Time: time.Now(), Valid: true}, - }).Error; err != nil { - t.Errorf("Not error should raise when test null value") - } - - var nv NullValue - DB.First(&nv, "name = ?", "hello") - - if nv.Name.String != "hello" || nv.Gender.String != "M" || nv.Age.Int64 != 18 || nv.Male.Bool != true || nv.Height.Float64 != 100.11 || nv.AddedAt.Valid != true { - t.Errorf("Should be able to fetch null value") - } - - if err := DB.Save(&NullValue{ - Name: sql.NullString{String: "hello-2", Valid: true}, - Gender: &sql.NullString{String: "F", Valid: true}, - Age: sql.NullInt64{Int64: 18, Valid: false}, - Male: sql.NullBool{Bool: true, Valid: true}, - Height: sql.NullFloat64{Float64: 100.11, Valid: true}, - AddedAt: NullTime{Time: time.Now(), Valid: false}, - }).Error; err != nil { - t.Errorf("Not error should raise when test null value") - } - - var nv2 NullValue - DB.First(&nv2, "name = ?", "hello-2") - if nv2.Name.String != "hello-2" || nv2.Gender.String != "F" || nv2.Age.Int64 != 0 || nv2.Male.Bool != true || nv2.Height.Float64 != 100.11 || nv2.AddedAt.Valid != false { - t.Errorf("Should be able to fetch null value") - } - - if err := DB.Save(&NullValue{ - Name: sql.NullString{String: "hello-3", Valid: false}, - Gender: &sql.NullString{String: "M", Valid: true}, - Age: sql.NullInt64{Int64: 18, Valid: false}, - Male: sql.NullBool{Bool: true, Valid: true}, - Height: sql.NullFloat64{Float64: 100.11, Valid: true}, - AddedAt: NullTime{Time: time.Now(), Valid: false}, - }).Error; err == nil { - t.Errorf("Can't save because of name can't be null") - } -} - -func TestNullValuesWithFirstOrCreate(t *testing.T) { - var nv1 = NullValue{ - Name: sql.NullString{String: "first_or_create", Valid: true}, - Gender: &sql.NullString{String: "M", Valid: true}, - } - - var nv2 NullValue - result := DB.Where(nv1).FirstOrCreate(&nv2) - - if result.RowsAffected != 1 { - t.Errorf("RowsAffected should be 1 after create some record") - } - - if result.Error != nil { - t.Errorf("Should not raise any error, but got %v", result.Error) - } - - if nv2.Name.String != "first_or_create" || nv2.Gender.String != "M" { - t.Errorf("first or create with nullvalues") - } - - if err := DB.Where(nv1).Assign(NullValue{Age: sql.NullInt64{Int64: 18, Valid: true}}).FirstOrCreate(&nv2).Error; err != nil { - t.Errorf("Should not raise any error, but got %v", err) - } - - if nv2.Age.Int64 != 18 { - t.Errorf("should update age to 18") - } -} - -func TestTransaction(t *testing.T) { - tx := DB.Begin() - u := User{Name: "transcation"} - if err := tx.Save(&u).Error; err != nil { - t.Errorf("No error should raise") - } - - if err := tx.First(&User{}, "name = ?", "transcation").Error; err != nil { - t.Errorf("Should find saved record") - } - - if sqlTx, ok := tx.CommonDB().(*sql.Tx); !ok || sqlTx == nil { - t.Errorf("Should return the underlying sql.Tx") - } - - tx.Rollback() - - if err := tx.First(&User{}, "name = ?", "transcation").Error; err == nil { - t.Errorf("Should not find record after rollback") - } - - tx2 := DB.Begin() - u2 := User{Name: "transcation-2"} - if err := tx2.Save(&u2).Error; err != nil { - t.Errorf("No error should raise") - } - - if err := tx2.First(&User{}, "name = ?", "transcation-2").Error; err != nil { - t.Errorf("Should find saved record") - } - - tx2.Commit() - - if err := DB.First(&User{}, "name = ?", "transcation-2").Error; err != nil { - t.Errorf("Should be able to find committed record") - } -} - -func TestRow(t *testing.T) { - user1 := User{Name: "RowUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "RowUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "RowUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - - row := DB.Table("users").Where("name = ?", user2.Name).Select("age").Row() - var age int64 - row.Scan(&age) - if age != 10 { - t.Errorf("Scan with Row") - } -} - -func TestRows(t *testing.T) { - user1 := User{Name: "RowsUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "RowsUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "RowsUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - - rows, err := DB.Table("users").Where("name = ? or name = ?", user2.Name, user3.Name).Select("name, age").Rows() - if err != nil { - t.Errorf("Not error should happen, got %v", err) - } - - count := 0 - for rows.Next() { - var name string - var age int64 - rows.Scan(&name, &age) - count++ - } - - if count != 2 { - t.Errorf("Should found two records") - } -} - -func TestScanRows(t *testing.T) { - user1 := User{Name: "ScanRowsUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "ScanRowsUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "ScanRowsUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - - rows, err := DB.Table("users").Where("name = ? or name = ?", user2.Name, user3.Name).Select("name, age").Rows() - if err != nil { - t.Errorf("Not error should happen, got %v", err) - } - - type Result struct { - Name string - Age int - } - - var results []Result - for rows.Next() { - var result Result - if err := DB.ScanRows(rows, &result); err != nil { - t.Errorf("should get no error, but got %v", err) - } - results = append(results, result) - } - - if !reflect.DeepEqual(results, []Result{{Name: "ScanRowsUser2", Age: 10}, {Name: "ScanRowsUser3", Age: 20}}) { - t.Errorf("Should find expected results") - } -} - -func TestScan(t *testing.T) { - user1 := User{Name: "ScanUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "ScanUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "ScanUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - - type result struct { - Name string - Age int - } - - var res result - DB.Table("users").Select("name, age").Where("name = ?", user3.Name).Scan(&res) - if res.Name != user3.Name { - t.Errorf("Scan into struct should work") - } - - var doubleAgeRes = &result{} - if err := DB.Table("users").Select("age + age as age").Where("name = ?", user3.Name).Scan(&doubleAgeRes).Error; err != nil { - t.Errorf("Scan to pointer of pointer") - } - if doubleAgeRes.Age != res.Age*2 { - t.Errorf("Scan double age as age") - } - - var ress []result - DB.Table("users").Select("name, age").Where("name in (?)", []string{user2.Name, user3.Name}).Scan(&ress) - if len(ress) != 2 || ress[0].Name != user2.Name || ress[1].Name != user3.Name { - t.Errorf("Scan into struct map") - } -} - -func TestRaw(t *testing.T) { - user1 := User{Name: "ExecRawSqlUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "ExecRawSqlUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "ExecRawSqlUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - - type result struct { - Name string - Email string - } - - var ress []result - DB.Raw("SELECT name, age FROM users WHERE name = ? or name = ?", user2.Name, user3.Name).Scan(&ress) - if len(ress) != 2 || ress[0].Name != user2.Name || ress[1].Name != user3.Name { - t.Errorf("Raw with scan") - } - - rows, _ := DB.Raw("select name, age from users where name = ?", user3.Name).Rows() - count := 0 - for rows.Next() { - count++ - } - if count != 1 { - t.Errorf("Raw with Rows should find one record with name 3") - } - - DB.Exec("update users set name=? where name in (?)", "jinzhu", []string{user1.Name, user2.Name, user3.Name}) - if DB.Where("name in (?)", []string{user1.Name, user2.Name, user3.Name}).First(&User{}).Error != gorm.ErrRecordNotFound { - t.Error("Raw sql to update records") - } -} - -func TestGroup(t *testing.T) { - rows, err := DB.Select("name").Table("users").Group("name").Rows() - - if err == nil { - defer rows.Close() - for rows.Next() { - var name string - rows.Scan(&name) - } - } else { - t.Errorf("Should not raise any error") - } -} - -func TestJoins(t *testing.T) { - var user = User{ - Name: "joins", - CreditCard: CreditCard{Number: "411111111111"}, - Emails: []Email{{Email: "join1@example.com"}, {Email: "join2@example.com"}}, - } - DB.Save(&user) - - var users1 []User - DB.Joins("left join emails on emails.user_id = users.id").Where("name = ?", "joins").Find(&users1) - if len(users1) != 2 { - t.Errorf("should find two users using left join") - } - - var users2 []User - DB.Joins("left join emails on emails.user_id = users.id AND emails.email = ?", "join1@example.com").Where("name = ?", "joins").First(&users2) - if len(users2) != 1 { - t.Errorf("should find one users using left join with conditions") - } - - var users3 []User - DB.Joins("join emails on emails.user_id = users.id AND emails.email = ?", "join1@example.com").Joins("join credit_cards on credit_cards.user_id = users.id AND credit_cards.number = ?", "411111111111").Where("name = ?", "joins").First(&users3) - if len(users3) != 1 { - t.Errorf("should find one users using multiple left join conditions") - } - - var users4 []User - DB.Joins("join emails on emails.user_id = users.id AND emails.email = ?", "join1@example.com").Joins("join credit_cards on credit_cards.user_id = users.id AND credit_cards.number = ?", "422222222222").Where("name = ?", "joins").First(&users4) - if len(users4) != 0 { - t.Errorf("should find no user when searching with unexisting credit card") - } - - var users5 []User - db5 := DB.Joins("join emails on emails.user_id = users.id AND emails.email = ?", "join1@example.com").Joins("join credit_cards on credit_cards.user_id = users.id AND credit_cards.number = ?", "411111111111").Where(User{Id: 1}).Where(Email{Id: 1}).Not(Email{Id: 10}).First(&users5) - if db5.Error != nil { - t.Errorf("Should not raise error for join where identical fields in different tables. Error: %s", db5.Error.Error()) - } -} - -func TestJoinsWithSelect(t *testing.T) { - type result struct { - Name string - Email string - } - - user := User{ - Name: "joins_with_select", - Emails: []Email{{Email: "join1@example.com"}, {Email: "join2@example.com"}}, - } - DB.Save(&user) - - var results []result - DB.Table("users").Select("name, emails.email").Joins("left join emails on emails.user_id = users.id").Where("name = ?", "joins_with_select").Scan(&results) - if len(results) != 2 || results[0].Email != "join1@example.com" || results[1].Email != "join2@example.com" { - t.Errorf("Should find all two emails with Join select") - } -} - -func TestHaving(t *testing.T) { - rows, err := DB.Select("name, count(*) as total").Table("users").Group("name").Having("name IN (?)", []string{"2", "3"}).Rows() - - if err == nil { - defer rows.Close() - for rows.Next() { - var name string - var total int64 - rows.Scan(&name, &total) - - if name == "2" && total != 1 { - t.Errorf("Should have one user having name 2") - } - if name == "3" && total != 2 { - t.Errorf("Should have two users having name 3") - } - } - } else { - t.Errorf("Should not raise any error") - } -} - -func TestQueryBuilderSubselectInWhere(t *testing.T) { - user := User{Name: "query_expr_select_ruser1", Email: "root@user1.com", Age: 32} - DB.Save(&user) - user = User{Name: "query_expr_select_ruser2", Email: "nobody@user2.com", Age: 16} - DB.Save(&user) - user = User{Name: "query_expr_select_ruser3", Email: "root@user3.com", Age: 64} - DB.Save(&user) - user = User{Name: "query_expr_select_ruser4", Email: "somebody@user3.com", Age: 128} - DB.Save(&user) - - var users []User - DB.Select("*").Where("name IN (?)", DB. - Select("name").Table("users").Where("name LIKE ?", "query_expr_select%").QueryExpr()).Find(&users) - - if len(users) != 4 { - t.Errorf("Four users should be found, instead found %d", len(users)) - } - - DB.Select("*").Where("name LIKE ?", "query_expr_select%").Where("age >= (?)", DB. - Select("AVG(age)").Table("users").Where("name LIKE ?", "query_expr_select%").QueryExpr()).Find(&users) - - if len(users) != 2 { - t.Errorf("Two users should be found, instead found %d", len(users)) - } -} - -func TestQueryBuilderRawQueryWithSubquery(t *testing.T) { - user := User{Name: "subquery_test_user1", Age: 10} - DB.Save(&user) - user = User{Name: "subquery_test_user2", Age: 11} - DB.Save(&user) - user = User{Name: "subquery_test_user3", Age: 12} - DB.Save(&user) - - var count int - err := DB.Raw("select count(*) from (?) tmp", - DB.Table("users"). - Select("name"). - Where("age >= ? and name in (?)", 10, []string{"subquery_test_user1", "subquery_test_user2"}). - Group("name"). - QueryExpr(), - ).Count(&count).Error - - if err != nil { - t.Errorf("Expected to get no errors, but got %v", err) - } - if count != 2 { - t.Errorf("Row count must be 2, instead got %d", count) - } - - err = DB.Raw("select count(*) from (?) tmp", - DB.Table("users"). - Select("name"). - Where("name LIKE ?", "subquery_test%"). - Not("age <= ?", 10).Not("name in (?)", []string{"subquery_test_user1", "subquery_test_user2"}). - Group("name"). - QueryExpr(), - ).Count(&count).Error - - if err != nil { - t.Errorf("Expected to get no errors, but got %v", err) - } - if count != 1 { - t.Errorf("Row count must be 1, instead got %d", count) - } -} - -func TestQueryBuilderSubselectInHaving(t *testing.T) { - user := User{Name: "query_expr_having_ruser1", Email: "root@user1.com", Age: 64} - DB.Save(&user) - user = User{Name: "query_expr_having_ruser2", Email: "root@user2.com", Age: 128} - DB.Save(&user) - user = User{Name: "query_expr_having_ruser3", Email: "root@user1.com", Age: 64} - DB.Save(&user) - user = User{Name: "query_expr_having_ruser4", Email: "root@user2.com", Age: 128} - DB.Save(&user) - - var users []User - DB.Select("AVG(age) as avgage").Where("name LIKE ?", "query_expr_having_%").Group("email").Having("AVG(age) > (?)", DB. - Select("AVG(age)").Where("name LIKE ?", "query_expr_having_%").Table("users").QueryExpr()).Find(&users) - - if len(users) != 1 { - t.Errorf("Two user group should be found, instead found %d", len(users)) - } -} - -func DialectHasTzSupport() bool { - // NB: mssql and FoundationDB do not support time zones. - if dialect := os.Getenv("GORM_DIALECT"); dialect == "foundation" { - return false - } - return true -} - -func TestTimeWithZone(t *testing.T) { - var format = "2006-01-02 15:04:05 -0700" - var times []time.Time - GMT8, _ := time.LoadLocation("Asia/Shanghai") - times = append(times, time.Date(2013, 02, 19, 1, 51, 49, 123456789, GMT8)) - times = append(times, time.Date(2013, 02, 18, 17, 51, 49, 123456789, time.UTC)) - - for index, vtime := range times { - name := "time_with_zone_" + strconv.Itoa(index) - user := User{Name: name, Birthday: &vtime} - - if !DialectHasTzSupport() { - // If our driver dialect doesn't support TZ's, just use UTC for everything here. - utcBirthday := user.Birthday.UTC() - user.Birthday = &utcBirthday - } - - DB.Save(&user) - expectedBirthday := "2013-02-18 17:51:49 +0000" - foundBirthday := user.Birthday.UTC().Format(format) - if foundBirthday != expectedBirthday { - t.Errorf("User's birthday should not be changed after save for name=%s, expected bday=%+v but actual value=%+v", name, expectedBirthday, foundBirthday) - } - - var findUser, findUser2, findUser3 User - DB.First(&findUser, "name = ?", name) - foundBirthday = findUser.Birthday.UTC().Format(format) - if foundBirthday != expectedBirthday { - t.Errorf("User's birthday should not be changed after find for name=%s, expected bday=%+v but actual value=%+v", name, expectedBirthday, foundBirthday) - } - - if DB.Where("id = ? AND birthday >= ?", findUser.Id, user.Birthday.Add(-time.Minute)).First(&findUser2).RecordNotFound() { - t.Errorf("User should be found") - } - - if !DB.Where("id = ? AND birthday >= ?", findUser.Id, user.Birthday.Add(time.Minute)).First(&findUser3).RecordNotFound() { - t.Errorf("User should not be found") - } - } -} - -func TestHstore(t *testing.T) { - type Details struct { - Id int64 - Bulk postgres.Hstore - } - - if dialect := os.Getenv("GORM_DIALECT"); dialect != "postgres" { - t.Skip() - } - - if err := DB.Exec("CREATE EXTENSION IF NOT EXISTS hstore").Error; err != nil { - fmt.Println("\033[31mHINT: Must be superuser to create hstore extension (ALTER USER gorm WITH SUPERUSER;)\033[0m") - panic(fmt.Sprintf("No error should happen when create hstore extension, but got %+v", err)) - } - - DB.Exec("drop table details") - - if err := DB.CreateTable(&Details{}).Error; err != nil { - panic(fmt.Sprintf("No error should happen when create table, but got %+v", err)) - } - - bankAccountId, phoneNumber, opinion := "123456", "14151321232", "sharkbait" - bulk := map[string]*string{ - "bankAccountId": &bankAccountId, - "phoneNumber": &phoneNumber, - "opinion": &opinion, - } - d := Details{Bulk: bulk} - DB.Save(&d) - - var d2 Details - if err := DB.First(&d2).Error; err != nil { - t.Errorf("Got error when tried to fetch details: %+v", err) - } - - for k := range bulk { - if r, ok := d2.Bulk[k]; ok { - if res, _ := bulk[k]; *res != *r { - t.Errorf("Details should be equal") - } - } else { - t.Errorf("Details should be existed") - } - } -} - -func TestSetAndGet(t *testing.T) { - if value, ok := DB.Set("hello", "world").Get("hello"); !ok { - t.Errorf("Should be able to get setting after set") - } else { - if value.(string) != "world" { - t.Errorf("Setted value should not be changed") - } - } - - if _, ok := DB.Get("non_existing"); ok { - t.Errorf("Get non existing key should return error") - } -} - -func TestCompatibilityMode(t *testing.T) { - DB, _ := gorm.Open("testdb", "") - testdb.SetQueryFunc(func(query string) (driver.Rows, error) { - columns := []string{"id", "name", "age"} - result := ` - 1,Tim,20 - 2,Joe,25 - 3,Bob,30 - ` - return testdb.RowsFromCSVString(columns, result), nil - }) - - var users []User - DB.Find(&users) - if (users[0].Name != "Tim") || len(users) != 3 { - t.Errorf("Unexcepted result returned") - } -} - -func TestOpenExistingDB(t *testing.T) { - DB.Save(&User{Name: "jnfeinstein"}) - dialect := os.Getenv("GORM_DIALECT") - - db, err := gorm.Open(dialect, DB.DB()) - if err != nil { - t.Errorf("Should have wrapped the existing DB connection") - } - - var user User - if db.Where("name = ?", "jnfeinstein").First(&user).Error == gorm.ErrRecordNotFound { - t.Errorf("Should have found existing record") - } -} - -func TestDdlErrors(t *testing.T) { - var err error - - if err = DB.Close(); err != nil { - t.Errorf("Closing DDL test db connection err=%s", err) - } - defer func() { - // Reopen DB connection. - if DB, err = OpenTestConnection(); err != nil { - t.Fatalf("Failed re-opening db connection: %s", err) - } - }() - - if err := DB.Find(&User{}).Error; err == nil { - t.Errorf("Expected operation on closed db to produce an error, but err was nil") - } -} - -func TestOpenWithOneParameter(t *testing.T) { - db, err := gorm.Open("dialect") - if db != nil { - t.Error("Open with one parameter returned non nil for db") - } - if err == nil { - t.Error("Open with one parameter returned err as nil") - } -} - -func TestBlockGlobalUpdate(t *testing.T) { - db := DB.New() - db.Create(&Toy{Name: "Stuffed Animal", OwnerType: "Nobody"}) - - err := db.Model(&Toy{}).Update("OwnerType", "Human").Error - if err != nil { - t.Error("Unexpected error on global update") - } - - err = db.Delete(&Toy{}).Error - if err != nil { - t.Error("Unexpected error on global delete") - } - - db.BlockGlobalUpdate(true) - - db.Create(&Toy{Name: "Stuffed Animal", OwnerType: "Nobody"}) - - err = db.Model(&Toy{}).Update("OwnerType", "Human").Error - if err == nil { - t.Error("Expected error on global update") - } - - err = db.Model(&Toy{}).Where(&Toy{OwnerType: "Martian"}).Update("OwnerType", "Astronaut").Error - if err != nil { - t.Error("Unxpected error on conditional update") - } - - err = db.Delete(&Toy{}).Error - if err == nil { - t.Error("Expected error on global delete") - } - err = db.Where(&Toy{OwnerType: "Martian"}).Delete(&Toy{}).Error - if err != nil { - t.Error("Unexpected error on conditional delete") - } -} - -func BenchmarkGorm(b *testing.B) { - b.N = 2000 - for x := 0; x < b.N; x++ { - e := strconv.Itoa(x) + "benchmark@example.org" - now := time.Now() - email := EmailWithIdx{Email: e, UserAgent: "pc", RegisteredAt: &now} - // Insert - DB.Save(&email) - // Query - DB.First(&EmailWithIdx{}, "email = ?", e) - // Update - DB.Model(&email).UpdateColumn("email", "new-"+e) - // Delete - DB.Delete(&email) - } -} - -func BenchmarkRawSql(b *testing.B) { - DB, _ := sql.Open("postgres", "user=gorm DB.ame=gorm sslmode=disable") - DB.SetMaxIdleConns(10) - insertSql := "INSERT INTO emails (user_id,email,user_agent,registered_at,created_at,updated_at) VALUES ($1,$2,$3,$4,$5,$6) RETURNING id" - querySql := "SELECT * FROM emails WHERE email = $1 ORDER BY id LIMIT 1" - updateSql := "UPDATE emails SET email = $1, updated_at = $2 WHERE id = $3" - deleteSql := "DELETE FROM orders WHERE id = $1" - - b.N = 2000 - for x := 0; x < b.N; x++ { - var id int64 - e := strconv.Itoa(x) + "benchmark@example.org" - now := time.Now() - email := EmailWithIdx{Email: e, UserAgent: "pc", RegisteredAt: &now} - // Insert - DB.QueryRow(insertSql, email.UserId, email.Email, email.UserAgent, email.RegisteredAt, time.Now(), time.Now()).Scan(&id) - // Query - rows, _ := DB.Query(querySql, email.Email) - rows.Close() - // Update - DB.Exec(updateSql, "new-"+e, time.Now(), id) - // Delete - DB.Exec(deleteSql, id) - } -} - -func parseTime(str string) *time.Time { - t := now.New(time.Now().UTC()).MustParse(str) - return &t -} diff --git a/deps/github.com/jinzhu/gorm/migration_test.go b/deps/github.com/jinzhu/gorm/migration_test.go deleted file mode 100644 index 7c6944856..000000000 --- a/deps/github.com/jinzhu/gorm/migration_test.go +++ /dev/null @@ -1,485 +0,0 @@ -package gorm_test - -import ( - "database/sql" - "database/sql/driver" - "errors" - "fmt" - "os" - "reflect" - "strconv" - "testing" - "time" - - "github.com/jinzhu/gorm" -) - -type User struct { - Id int64 - Age int64 - UserNum Num - Name string `sql:"size:255"` - Email string - Birthday *time.Time // Time - CreatedAt time.Time // CreatedAt: Time of record is created, will be insert automatically - UpdatedAt time.Time // UpdatedAt: Time of record is updated, will be updated automatically - Emails []Email // Embedded structs - BillingAddress Address // Embedded struct - BillingAddressID sql.NullInt64 // Embedded struct's foreign key - ShippingAddress Address // Embedded struct - ShippingAddressId int64 // Embedded struct's foreign key - CreditCard CreditCard - Latitude float64 - Languages []Language `gorm:"many2many:user_languages;"` - CompanyID *int - Company Company - Role Role - Password EncryptedData - PasswordHash []byte - IgnoreMe int64 `sql:"-"` - IgnoreStringSlice []string `sql:"-"` - Ignored struct{ Name string } `sql:"-"` - IgnoredPointer *User `sql:"-"` -} - -type NotSoLongTableName struct { - Id int64 - ReallyLongThingID int64 - ReallyLongThing ReallyLongTableNameToTestMySQLNameLengthLimit -} - -type ReallyLongTableNameToTestMySQLNameLengthLimit struct { - Id int64 -} - -type ReallyLongThingThatReferencesShort struct { - Id int64 - ShortID int64 - Short Short -} - -type Short struct { - Id int64 -} - -type CreditCard struct { - ID int8 - Number string - UserId sql.NullInt64 - CreatedAt time.Time `sql:"not null"` - UpdatedAt time.Time - DeletedAt *time.Time `sql:"column:deleted_time"` -} - -type Email struct { - Id int16 - UserId int - Email string `sql:"type:varchar(100);"` - CreatedAt time.Time - UpdatedAt time.Time -} - -type Address struct { - ID int - Address1 string - Address2 string - Post string - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt *time.Time -} - -type Language struct { - gorm.Model - Name string - Users []User `gorm:"many2many:user_languages;"` -} - -type Product struct { - Id int64 - Code string - Price int64 - CreatedAt time.Time - UpdatedAt time.Time - AfterFindCallTimes int64 - BeforeCreateCallTimes int64 - AfterCreateCallTimes int64 - BeforeUpdateCallTimes int64 - AfterUpdateCallTimes int64 - BeforeSaveCallTimes int64 - AfterSaveCallTimes int64 - BeforeDeleteCallTimes int64 - AfterDeleteCallTimes int64 -} - -type Company struct { - Id int64 - Name string - Owner *User `sql:"-"` -} - -type EncryptedData []byte - -func (data *EncryptedData) Scan(value interface{}) error { - if b, ok := value.([]byte); ok { - if len(b) < 3 || b[0] != '*' || b[1] != '*' || b[2] != '*' { - return errors.New("Too short") - } - - *data = b[3:] - return nil - } - - return errors.New("Bytes expected") -} - -func (data EncryptedData) Value() (driver.Value, error) { - if len(data) > 0 && data[0] == 'x' { - //needed to test failures - return nil, errors.New("Should not start with 'x'") - } - - //prepend asterisks - return append([]byte("***"), data...), nil -} - -type Role struct { - Name string `gorm:"size:256"` -} - -func (role *Role) Scan(value interface{}) error { - if b, ok := value.([]uint8); ok { - role.Name = string(b) - } else { - role.Name = value.(string) - } - return nil -} - -func (role Role) Value() (driver.Value, error) { - return role.Name, nil -} - -func (role Role) IsAdmin() bool { - return role.Name == "admin" -} - -type Num int64 - -func (i *Num) Scan(src interface{}) error { - switch s := src.(type) { - case []byte: - n, _ := strconv.Atoi(string(s)) - *i = Num(n) - case int64: - *i = Num(s) - default: - return errors.New("Cannot scan NamedInt from " + reflect.ValueOf(src).String()) - } - return nil -} - -type Animal struct { - Counter uint64 `gorm:"primary_key:yes"` - Name string `sql:"DEFAULT:'galeone'"` - From string //test reserved sql keyword as field name - Age time.Time `sql:"DEFAULT:current_timestamp"` - unexported string // unexported value - CreatedAt time.Time - UpdatedAt time.Time -} - -type JoinTable struct { - From uint64 - To uint64 - Time time.Time `sql:"default: null"` -} - -type Post struct { - Id int64 - CategoryId sql.NullInt64 - MainCategoryId int64 - Title string - Body string - Comments []*Comment - Category Category - MainCategory Category -} - -type Category struct { - gorm.Model - Name string - - Categories []Category - CategoryID *uint -} - -type Comment struct { - gorm.Model - PostId int64 - Content string - Post Post -} - -// Scanner -type NullValue struct { - Id int64 - Name sql.NullString `sql:"not null"` - Gender *sql.NullString `sql:"not null"` - Age sql.NullInt64 - Male sql.NullBool - Height sql.NullFloat64 - AddedAt NullTime -} - -type NullTime struct { - Time time.Time - Valid bool -} - -func (nt *NullTime) Scan(value interface{}) error { - if value == nil { - nt.Valid = false - return nil - } - nt.Time, nt.Valid = value.(time.Time), true - return nil -} - -func (nt NullTime) Value() (driver.Value, error) { - if !nt.Valid { - return nil, nil - } - return nt.Time, nil -} - -func getPreparedUser(name string, role string) *User { - var company Company - DB.Where(Company{Name: role}).FirstOrCreate(&company) - - return &User{ - Name: name, - Age: 20, - Role: Role{role}, - BillingAddress: Address{Address1: fmt.Sprintf("Billing Address %v", name)}, - ShippingAddress: Address{Address1: fmt.Sprintf("Shipping Address %v", name)}, - CreditCard: CreditCard{Number: fmt.Sprintf("123456%v", name)}, - Emails: []Email{ - {Email: fmt.Sprintf("user_%v@example1.com", name)}, {Email: fmt.Sprintf("user_%v@example2.com", name)}, - }, - Company: company, - Languages: []Language{ - {Name: fmt.Sprintf("lang_1_%v", name)}, - {Name: fmt.Sprintf("lang_2_%v", name)}, - }, - } -} - -func runMigration() { - if err := DB.DropTableIfExists(&User{}).Error; err != nil { - fmt.Printf("Got error when try to delete table users, %+v\n", err) - } - - for _, table := range []string{"animals", "user_languages"} { - DB.Exec(fmt.Sprintf("drop table %v;", table)) - } - - values := []interface{}{&Short{}, &ReallyLongThingThatReferencesShort{}, &ReallyLongTableNameToTestMySQLNameLengthLimit{}, &NotSoLongTableName{}, &Product{}, &Email{}, &Address{}, &CreditCard{}, &Company{}, &Role{}, &Language{}, &HNPost{}, &EngadgetPost{}, &Animal{}, &User{}, &JoinTable{}, &Post{}, &Category{}, &Comment{}, &Cat{}, &Dog{}, &Hamster{}, &Toy{}, &ElementWithIgnoredField{}} - for _, value := range values { - DB.DropTable(value) - } - if err := DB.AutoMigrate(values...).Error; err != nil { - panic(fmt.Sprintf("No error should happen when create table, but got %+v", err)) - } -} - -func TestIndexes(t *testing.T) { - if err := DB.Model(&Email{}).AddIndex("idx_email_email", "email").Error; err != nil { - t.Errorf("Got error when tried to create index: %+v", err) - } - - scope := DB.NewScope(&Email{}) - if !scope.Dialect().HasIndex(scope.TableName(), "idx_email_email") { - t.Errorf("Email should have index idx_email_email") - } - - if err := DB.Model(&Email{}).RemoveIndex("idx_email_email").Error; err != nil { - t.Errorf("Got error when tried to remove index: %+v", err) - } - - if scope.Dialect().HasIndex(scope.TableName(), "idx_email_email") { - t.Errorf("Email's index idx_email_email should be deleted") - } - - if err := DB.Model(&Email{}).AddIndex("idx_email_email_and_user_id", "user_id", "email").Error; err != nil { - t.Errorf("Got error when tried to create index: %+v", err) - } - - if !scope.Dialect().HasIndex(scope.TableName(), "idx_email_email_and_user_id") { - t.Errorf("Email should have index idx_email_email_and_user_id") - } - - if err := DB.Model(&Email{}).RemoveIndex("idx_email_email_and_user_id").Error; err != nil { - t.Errorf("Got error when tried to remove index: %+v", err) - } - - if scope.Dialect().HasIndex(scope.TableName(), "idx_email_email_and_user_id") { - t.Errorf("Email's index idx_email_email_and_user_id should be deleted") - } - - if err := DB.Model(&Email{}).AddUniqueIndex("idx_email_email_and_user_id", "user_id", "email").Error; err != nil { - t.Errorf("Got error when tried to create index: %+v", err) - } - - if !scope.Dialect().HasIndex(scope.TableName(), "idx_email_email_and_user_id") { - t.Errorf("Email should have index idx_email_email_and_user_id") - } - - if DB.Save(&User{Name: "unique_indexes", Emails: []Email{{Email: "user1@example.comiii"}, {Email: "user1@example.com"}, {Email: "user1@example.com"}}}).Error == nil { - t.Errorf("Should get to create duplicate record when having unique index") - } - - var user = User{Name: "sample_user"} - DB.Save(&user) - if DB.Model(&user).Association("Emails").Append(Email{Email: "not-1duplicated@gmail.com"}, Email{Email: "not-duplicated2@gmail.com"}).Error != nil { - t.Errorf("Should get no error when append two emails for user") - } - - if DB.Model(&user).Association("Emails").Append(Email{Email: "duplicated@gmail.com"}, Email{Email: "duplicated@gmail.com"}).Error == nil { - t.Errorf("Should get no duplicated email error when insert duplicated emails for a user") - } - - if err := DB.Model(&Email{}).RemoveIndex("idx_email_email_and_user_id").Error; err != nil { - t.Errorf("Got error when tried to remove index: %+v", err) - } - - if scope.Dialect().HasIndex(scope.TableName(), "idx_email_email_and_user_id") { - t.Errorf("Email's index idx_email_email_and_user_id should be deleted") - } - - if DB.Save(&User{Name: "unique_indexes", Emails: []Email{{Email: "user1@example.com"}, {Email: "user1@example.com"}}}).Error != nil { - t.Errorf("Should be able to create duplicated emails after remove unique index") - } -} - -type EmailWithIdx struct { - Id int64 - UserId int64 - Email string `sql:"index:idx_email_agent"` - UserAgent string `sql:"index:idx_email_agent"` - RegisteredAt *time.Time `sql:"unique_index"` - CreatedAt time.Time - UpdatedAt time.Time -} - -func TestAutoMigration(t *testing.T) { - DB.AutoMigrate(&Address{}) - DB.DropTable(&EmailWithIdx{}) - if err := DB.AutoMigrate(&EmailWithIdx{}).Error; err != nil { - t.Errorf("Auto Migrate should not raise any error") - } - - now := time.Now() - DB.Save(&EmailWithIdx{Email: "jinzhu@example.org", UserAgent: "pc", RegisteredAt: &now}) - - scope := DB.NewScope(&EmailWithIdx{}) - if !scope.Dialect().HasIndex(scope.TableName(), "idx_email_agent") { - t.Errorf("Failed to create index") - } - - if !scope.Dialect().HasIndex(scope.TableName(), "uix_email_with_idxes_registered_at") { - t.Errorf("Failed to create index") - } - - var bigemail EmailWithIdx - DB.First(&bigemail, "user_agent = ?", "pc") - if bigemail.Email != "jinzhu@example.org" || bigemail.UserAgent != "pc" || bigemail.RegisteredAt.IsZero() { - t.Error("Big Emails should be saved and fetched correctly") - } -} - -type MultipleIndexes struct { - ID int64 - UserID int64 `sql:"unique_index:uix_multipleindexes_user_name,uix_multipleindexes_user_email;index:idx_multipleindexes_user_other"` - Name string `sql:"unique_index:uix_multipleindexes_user_name"` - Email string `sql:"unique_index:,uix_multipleindexes_user_email"` - Other string `sql:"index:,idx_multipleindexes_user_other"` -} - -func TestMultipleIndexes(t *testing.T) { - if err := DB.DropTableIfExists(&MultipleIndexes{}).Error; err != nil { - fmt.Printf("Got error when try to delete table multiple_indexes, %+v\n", err) - } - - DB.AutoMigrate(&MultipleIndexes{}) - if err := DB.AutoMigrate(&EmailWithIdx{}).Error; err != nil { - t.Errorf("Auto Migrate should not raise any error") - } - - DB.Save(&MultipleIndexes{UserID: 1, Name: "jinzhu", Email: "jinzhu@example.org", Other: "foo"}) - - scope := DB.NewScope(&MultipleIndexes{}) - if !scope.Dialect().HasIndex(scope.TableName(), "uix_multipleindexes_user_name") { - t.Errorf("Failed to create index") - } - - if !scope.Dialect().HasIndex(scope.TableName(), "uix_multipleindexes_user_email") { - t.Errorf("Failed to create index") - } - - if !scope.Dialect().HasIndex(scope.TableName(), "uix_multiple_indexes_email") { - t.Errorf("Failed to create index") - } - - if !scope.Dialect().HasIndex(scope.TableName(), "idx_multipleindexes_user_other") { - t.Errorf("Failed to create index") - } - - if !scope.Dialect().HasIndex(scope.TableName(), "idx_multiple_indexes_other") { - t.Errorf("Failed to create index") - } - - var mutipleIndexes MultipleIndexes - DB.First(&mutipleIndexes, "name = ?", "jinzhu") - if mutipleIndexes.Email != "jinzhu@example.org" || mutipleIndexes.Name != "jinzhu" { - t.Error("MutipleIndexes should be saved and fetched correctly") - } - - // Check unique constraints - if err := DB.Save(&MultipleIndexes{UserID: 1, Name: "name1", Email: "jinzhu@example.org", Other: "foo"}).Error; err == nil { - t.Error("MultipleIndexes unique index failed") - } - - if err := DB.Save(&MultipleIndexes{UserID: 1, Name: "name1", Email: "foo@example.org", Other: "foo"}).Error; err != nil { - t.Error("MultipleIndexes unique index failed") - } - - if err := DB.Save(&MultipleIndexes{UserID: 2, Name: "name1", Email: "jinzhu@example.org", Other: "foo"}).Error; err == nil { - t.Error("MultipleIndexes unique index failed") - } - - if err := DB.Save(&MultipleIndexes{UserID: 2, Name: "name1", Email: "foo2@example.org", Other: "foo"}).Error; err != nil { - t.Error("MultipleIndexes unique index failed") - } -} - -func TestModifyColumnType(t *testing.T) { - if dialect := os.Getenv("GORM_DIALECT"); dialect != "postgres" && dialect != "mysql" && dialect != "mssql" { - t.Skip("Skipping this because only postgres, mysql and mssql support altering a column type") - } - - type ModifyColumnType struct { - gorm.Model - Name1 string `gorm:"length:100"` - Name2 string `gorm:"length:200"` - } - DB.DropTable(&ModifyColumnType{}) - DB.CreateTable(&ModifyColumnType{}) - - name2Field, _ := DB.NewScope(&ModifyColumnType{}).FieldByName("Name2") - name2Type := DB.Dialect().DataTypeOf(name2Field.StructField) - - if err := DB.Model(&ModifyColumnType{}).ModifyColumn("name1", name2Type).Error; err != nil { - t.Errorf("No error should happen when ModifyColumn, but got %v", err) - } -} diff --git a/deps/github.com/jinzhu/gorm/model.go b/deps/github.com/jinzhu/gorm/model.go deleted file mode 100644 index f37ff7eaa..000000000 --- a/deps/github.com/jinzhu/gorm/model.go +++ /dev/null @@ -1,14 +0,0 @@ -package gorm - -import "time" - -// Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embedded in your models -// type User struct { -// gorm.Model -// } -type Model struct { - ID uint `gorm:"primary_key"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt *time.Time `sql:"index"` -} diff --git a/deps/github.com/jinzhu/gorm/model_struct.go b/deps/github.com/jinzhu/gorm/model_struct.go deleted file mode 100644 index f571e2e86..000000000 --- a/deps/github.com/jinzhu/gorm/model_struct.go +++ /dev/null @@ -1,629 +0,0 @@ -package gorm - -import ( - "database/sql" - "errors" - "go/ast" - "reflect" - "strings" - "sync" - "time" - - "github.com/jinzhu/inflection" -) - -// DefaultTableNameHandler default table name handler -var DefaultTableNameHandler = func(db *DB, defaultTableName string) string { - return defaultTableName -} - -type safeModelStructsMap struct { - m map[reflect.Type]*ModelStruct - l *sync.RWMutex -} - -func (s *safeModelStructsMap) Set(key reflect.Type, value *ModelStruct) { - s.l.Lock() - defer s.l.Unlock() - s.m[key] = value -} - -func (s *safeModelStructsMap) Get(key reflect.Type) *ModelStruct { - s.l.RLock() - defer s.l.RUnlock() - return s.m[key] -} - -func newModelStructsMap() *safeModelStructsMap { - return &safeModelStructsMap{l: new(sync.RWMutex), m: make(map[reflect.Type]*ModelStruct)} -} - -var modelStructsMap = newModelStructsMap() - -// ModelStruct model definition -type ModelStruct struct { - PrimaryFields []*StructField - StructFields []*StructField - ModelType reflect.Type - defaultTableName string -} - -// TableName get model's table name -func (s *ModelStruct) TableName(db *DB) string { - if s.defaultTableName == "" && db != nil && s.ModelType != nil { - // Set default table name - if tabler, ok := reflect.New(s.ModelType).Interface().(tabler); ok { - s.defaultTableName = tabler.TableName() - } else { - tableName := ToDBName(s.ModelType.Name()) - if db == nil || !db.parent.singularTable { - tableName = inflection.Plural(tableName) - } - s.defaultTableName = tableName - } - } - - return DefaultTableNameHandler(db, s.defaultTableName) -} - -// StructField model field's struct definition -type StructField struct { - DBName string - Name string - Names []string - IsPrimaryKey bool - IsNormal bool - IsIgnored bool - IsScanner bool - HasDefaultValue bool - Tag reflect.StructTag - TagSettings map[string]string - Struct reflect.StructField - IsForeignKey bool - Relationship *Relationship -} - -func (structField *StructField) clone() *StructField { - clone := &StructField{ - DBName: structField.DBName, - Name: structField.Name, - Names: structField.Names, - IsPrimaryKey: structField.IsPrimaryKey, - IsNormal: structField.IsNormal, - IsIgnored: structField.IsIgnored, - IsScanner: structField.IsScanner, - HasDefaultValue: structField.HasDefaultValue, - Tag: structField.Tag, - TagSettings: map[string]string{}, - Struct: structField.Struct, - IsForeignKey: structField.IsForeignKey, - } - - if structField.Relationship != nil { - relationship := *structField.Relationship - clone.Relationship = &relationship - } - - for key, value := range structField.TagSettings { - clone.TagSettings[key] = value - } - - return clone -} - -// Relationship described the relationship between models -type Relationship struct { - Kind string - PolymorphicType string - PolymorphicDBName string - PolymorphicValue string - ForeignFieldNames []string - ForeignDBNames []string - AssociationForeignFieldNames []string - AssociationForeignDBNames []string - JoinTableHandler JoinTableHandlerInterface -} - -func getForeignField(column string, fields []*StructField) *StructField { - for _, field := range fields { - if field.Name == column || field.DBName == column || field.DBName == ToDBName(column) { - return field - } - } - return nil -} - -// GetModelStruct get value's model struct, relationships based on struct and tag definition -func (scope *Scope) GetModelStruct() *ModelStruct { - var modelStruct ModelStruct - // Scope value can't be nil - if scope.Value == nil { - return &modelStruct - } - - reflectType := reflect.ValueOf(scope.Value).Type() - for reflectType.Kind() == reflect.Slice || reflectType.Kind() == reflect.Ptr { - reflectType = reflectType.Elem() - } - - // Scope value need to be a struct - if reflectType.Kind() != reflect.Struct { - return &modelStruct - } - - // Get Cached model struct - if value := modelStructsMap.Get(reflectType); value != nil { - return value - } - - modelStruct.ModelType = reflectType - - // Get all fields - for i := 0; i < reflectType.NumField(); i++ { - if fieldStruct := reflectType.Field(i); ast.IsExported(fieldStruct.Name) { - field := &StructField{ - Struct: fieldStruct, - Name: fieldStruct.Name, - Names: []string{fieldStruct.Name}, - Tag: fieldStruct.Tag, - TagSettings: parseTagSetting(fieldStruct.Tag), - } - - // is ignored field - if _, ok := field.TagSettings["-"]; ok { - field.IsIgnored = true - } else { - if _, ok := field.TagSettings["PRIMARY_KEY"]; ok { - field.IsPrimaryKey = true - modelStruct.PrimaryFields = append(modelStruct.PrimaryFields, field) - } - - if _, ok := field.TagSettings["DEFAULT"]; ok { - field.HasDefaultValue = true - } - - if _, ok := field.TagSettings["AUTO_INCREMENT"]; ok && !field.IsPrimaryKey { - field.HasDefaultValue = true - } - - indirectType := fieldStruct.Type - for indirectType.Kind() == reflect.Ptr { - indirectType = indirectType.Elem() - } - - fieldValue := reflect.New(indirectType).Interface() - if _, isScanner := fieldValue.(sql.Scanner); isScanner { - // is scanner - field.IsScanner, field.IsNormal = true, true - if indirectType.Kind() == reflect.Struct { - for i := 0; i < indirectType.NumField(); i++ { - for key, value := range parseTagSetting(indirectType.Field(i).Tag) { - if _, ok := field.TagSettings[key]; !ok { - field.TagSettings[key] = value - } - } - } - } - } else if _, isTime := fieldValue.(*time.Time); isTime { - // is time - field.IsNormal = true - } else if _, ok := field.TagSettings["EMBEDDED"]; ok || fieldStruct.Anonymous { - // is embedded struct - for _, subField := range scope.New(fieldValue).GetModelStruct().StructFields { - subField = subField.clone() - subField.Names = append([]string{fieldStruct.Name}, subField.Names...) - if prefix, ok := field.TagSettings["EMBEDDED_PREFIX"]; ok { - subField.DBName = prefix + subField.DBName - } - - if subField.IsPrimaryKey { - if _, ok := subField.TagSettings["PRIMARY_KEY"]; ok { - modelStruct.PrimaryFields = append(modelStruct.PrimaryFields, subField) - } else { - subField.IsPrimaryKey = false - } - } - - if subField.Relationship != nil && subField.Relationship.JoinTableHandler != nil { - if joinTableHandler, ok := subField.Relationship.JoinTableHandler.(*JoinTableHandler); ok { - newJoinTableHandler := &JoinTableHandler{} - newJoinTableHandler.Setup(subField.Relationship, joinTableHandler.TableName, reflectType, joinTableHandler.Destination.ModelType) - subField.Relationship.JoinTableHandler = newJoinTableHandler - } - } - - modelStruct.StructFields = append(modelStruct.StructFields, subField) - } - continue - } else { - // build relationships - switch indirectType.Kind() { - case reflect.Slice: - defer func(field *StructField) { - var ( - relationship = &Relationship{} - toScope = scope.New(reflect.New(field.Struct.Type).Interface()) - foreignKeys []string - associationForeignKeys []string - elemType = field.Struct.Type - ) - - if foreignKey := field.TagSettings["FOREIGNKEY"]; foreignKey != "" { - foreignKeys = strings.Split(foreignKey, ",") - } - - if foreignKey := field.TagSettings["ASSOCIATION_FOREIGNKEY"]; foreignKey != "" { - associationForeignKeys = strings.Split(foreignKey, ",") - } else if foreignKey := field.TagSettings["ASSOCIATIONFOREIGNKEY"]; foreignKey != "" { - associationForeignKeys = strings.Split(foreignKey, ",") - } - - for elemType.Kind() == reflect.Slice || elemType.Kind() == reflect.Ptr { - elemType = elemType.Elem() - } - - if elemType.Kind() == reflect.Struct { - if many2many := field.TagSettings["MANY2MANY"]; many2many != "" { - relationship.Kind = "many_to_many" - - { // Foreign Keys for Source - joinTableDBNames := []string{} - - if foreignKey := field.TagSettings["JOINTABLE_FOREIGNKEY"]; foreignKey != "" { - joinTableDBNames = strings.Split(foreignKey, ",") - } - - // if no foreign keys defined with tag - if len(foreignKeys) == 0 { - for _, field := range modelStruct.PrimaryFields { - foreignKeys = append(foreignKeys, field.DBName) - } - } - - for idx, foreignKey := range foreignKeys { - if foreignField := getForeignField(foreignKey, modelStruct.StructFields); foreignField != nil { - // source foreign keys (db names) - relationship.ForeignFieldNames = append(relationship.ForeignFieldNames, foreignField.DBName) - - // setup join table foreign keys for source - if len(joinTableDBNames) > idx { - // if defined join table's foreign key - relationship.ForeignDBNames = append(relationship.ForeignDBNames, joinTableDBNames[idx]) - } else { - defaultJointableForeignKey := ToDBName(reflectType.Name()) + "_" + foreignField.DBName - relationship.ForeignDBNames = append(relationship.ForeignDBNames, defaultJointableForeignKey) - } - } - } - } - - { // Foreign Keys for Association (Destination) - associationJoinTableDBNames := []string{} - - if foreignKey := field.TagSettings["ASSOCIATION_JOINTABLE_FOREIGNKEY"]; foreignKey != "" { - associationJoinTableDBNames = strings.Split(foreignKey, ",") - } - - // if no association foreign keys defined with tag - if len(associationForeignKeys) == 0 { - for _, field := range toScope.PrimaryFields() { - associationForeignKeys = append(associationForeignKeys, field.DBName) - } - } - - for idx, name := range associationForeignKeys { - if field, ok := toScope.FieldByName(name); ok { - // association foreign keys (db names) - relationship.AssociationForeignFieldNames = append(relationship.AssociationForeignFieldNames, field.DBName) - - // setup join table foreign keys for association - if len(associationJoinTableDBNames) > idx { - relationship.AssociationForeignDBNames = append(relationship.AssociationForeignDBNames, associationJoinTableDBNames[idx]) - } else { - // join table foreign keys for association - joinTableDBName := ToDBName(elemType.Name()) + "_" + field.DBName - relationship.AssociationForeignDBNames = append(relationship.AssociationForeignDBNames, joinTableDBName) - } - } - } - } - - joinTableHandler := JoinTableHandler{} - joinTableHandler.Setup(relationship, many2many, reflectType, elemType) - relationship.JoinTableHandler = &joinTableHandler - field.Relationship = relationship - } else { - // User has many comments, associationType is User, comment use UserID as foreign key - var associationType = reflectType.Name() - var toFields = toScope.GetStructFields() - relationship.Kind = "has_many" - - if polymorphic := field.TagSettings["POLYMORPHIC"]; polymorphic != "" { - // Dog has many toys, tag polymorphic is Owner, then associationType is Owner - // Toy use OwnerID, OwnerType ('dogs') as foreign key - if polymorphicType := getForeignField(polymorphic+"Type", toFields); polymorphicType != nil { - associationType = polymorphic - relationship.PolymorphicType = polymorphicType.Name - relationship.PolymorphicDBName = polymorphicType.DBName - // if Dog has multiple set of toys set name of the set (instead of default 'dogs') - if value, ok := field.TagSettings["POLYMORPHIC_VALUE"]; ok { - relationship.PolymorphicValue = value - } else { - relationship.PolymorphicValue = scope.TableName() - } - polymorphicType.IsForeignKey = true - } - } - - // if no foreign keys defined with tag - if len(foreignKeys) == 0 { - // if no association foreign keys defined with tag - if len(associationForeignKeys) == 0 { - for _, field := range modelStruct.PrimaryFields { - foreignKeys = append(foreignKeys, associationType+field.Name) - associationForeignKeys = append(associationForeignKeys, field.Name) - } - } else { - // generate foreign keys from defined association foreign keys - for _, scopeFieldName := range associationForeignKeys { - if foreignField := getForeignField(scopeFieldName, modelStruct.StructFields); foreignField != nil { - foreignKeys = append(foreignKeys, associationType+foreignField.Name) - associationForeignKeys = append(associationForeignKeys, foreignField.Name) - } - } - } - } else { - // generate association foreign keys from foreign keys - if len(associationForeignKeys) == 0 { - for _, foreignKey := range foreignKeys { - if strings.HasPrefix(foreignKey, associationType) { - associationForeignKey := strings.TrimPrefix(foreignKey, associationType) - if foreignField := getForeignField(associationForeignKey, modelStruct.StructFields); foreignField != nil { - associationForeignKeys = append(associationForeignKeys, associationForeignKey) - } - } - } - if len(associationForeignKeys) == 0 && len(foreignKeys) == 1 { - associationForeignKeys = []string{scope.PrimaryKey()} - } - } else if len(foreignKeys) != len(associationForeignKeys) { - scope.Err(errors.New("invalid foreign keys, should have same length")) - return - } - } - - for idx, foreignKey := range foreignKeys { - if foreignField := getForeignField(foreignKey, toFields); foreignField != nil { - if associationField := getForeignField(associationForeignKeys[idx], modelStruct.StructFields); associationField != nil { - // source foreign keys - foreignField.IsForeignKey = true - relationship.AssociationForeignFieldNames = append(relationship.AssociationForeignFieldNames, associationField.Name) - relationship.AssociationForeignDBNames = append(relationship.AssociationForeignDBNames, associationField.DBName) - - // association foreign keys - relationship.ForeignFieldNames = append(relationship.ForeignFieldNames, foreignField.Name) - relationship.ForeignDBNames = append(relationship.ForeignDBNames, foreignField.DBName) - } - } - } - - if len(relationship.ForeignFieldNames) != 0 { - field.Relationship = relationship - } - } - } else { - field.IsNormal = true - } - }(field) - case reflect.Struct: - defer func(field *StructField) { - var ( - // user has one profile, associationType is User, profile use UserID as foreign key - // user belongs to profile, associationType is Profile, user use ProfileID as foreign key - associationType = reflectType.Name() - relationship = &Relationship{} - toScope = scope.New(reflect.New(field.Struct.Type).Interface()) - toFields = toScope.GetStructFields() - tagForeignKeys []string - tagAssociationForeignKeys []string - ) - - if foreignKey := field.TagSettings["FOREIGNKEY"]; foreignKey != "" { - tagForeignKeys = strings.Split(foreignKey, ",") - } - - if foreignKey := field.TagSettings["ASSOCIATION_FOREIGNKEY"]; foreignKey != "" { - tagAssociationForeignKeys = strings.Split(foreignKey, ",") - } else if foreignKey := field.TagSettings["ASSOCIATIONFOREIGNKEY"]; foreignKey != "" { - tagAssociationForeignKeys = strings.Split(foreignKey, ",") - } - - if polymorphic := field.TagSettings["POLYMORPHIC"]; polymorphic != "" { - // Cat has one toy, tag polymorphic is Owner, then associationType is Owner - // Toy use OwnerID, OwnerType ('cats') as foreign key - if polymorphicType := getForeignField(polymorphic+"Type", toFields); polymorphicType != nil { - associationType = polymorphic - relationship.PolymorphicType = polymorphicType.Name - relationship.PolymorphicDBName = polymorphicType.DBName - // if Cat has several different types of toys set name for each (instead of default 'cats') - if value, ok := field.TagSettings["POLYMORPHIC_VALUE"]; ok { - relationship.PolymorphicValue = value - } else { - relationship.PolymorphicValue = scope.TableName() - } - polymorphicType.IsForeignKey = true - } - } - - // Has One - { - var foreignKeys = tagForeignKeys - var associationForeignKeys = tagAssociationForeignKeys - // if no foreign keys defined with tag - if len(foreignKeys) == 0 { - // if no association foreign keys defined with tag - if len(associationForeignKeys) == 0 { - for _, primaryField := range modelStruct.PrimaryFields { - foreignKeys = append(foreignKeys, associationType+primaryField.Name) - associationForeignKeys = append(associationForeignKeys, primaryField.Name) - } - } else { - // generate foreign keys form association foreign keys - for _, associationForeignKey := range tagAssociationForeignKeys { - if foreignField := getForeignField(associationForeignKey, modelStruct.StructFields); foreignField != nil { - foreignKeys = append(foreignKeys, associationType+foreignField.Name) - associationForeignKeys = append(associationForeignKeys, foreignField.Name) - } - } - } - } else { - // generate association foreign keys from foreign keys - if len(associationForeignKeys) == 0 { - for _, foreignKey := range foreignKeys { - if strings.HasPrefix(foreignKey, associationType) { - associationForeignKey := strings.TrimPrefix(foreignKey, associationType) - if foreignField := getForeignField(associationForeignKey, modelStruct.StructFields); foreignField != nil { - associationForeignKeys = append(associationForeignKeys, associationForeignKey) - } - } - } - if len(associationForeignKeys) == 0 && len(foreignKeys) == 1 { - associationForeignKeys = []string{scope.PrimaryKey()} - } - } else if len(foreignKeys) != len(associationForeignKeys) { - scope.Err(errors.New("invalid foreign keys, should have same length")) - return - } - } - - for idx, foreignKey := range foreignKeys { - if foreignField := getForeignField(foreignKey, toFields); foreignField != nil { - if scopeField := getForeignField(associationForeignKeys[idx], modelStruct.StructFields); scopeField != nil { - foreignField.IsForeignKey = true - // source foreign keys - relationship.AssociationForeignFieldNames = append(relationship.AssociationForeignFieldNames, scopeField.Name) - relationship.AssociationForeignDBNames = append(relationship.AssociationForeignDBNames, scopeField.DBName) - - // association foreign keys - relationship.ForeignFieldNames = append(relationship.ForeignFieldNames, foreignField.Name) - relationship.ForeignDBNames = append(relationship.ForeignDBNames, foreignField.DBName) - } - } - } - } - - if len(relationship.ForeignFieldNames) != 0 { - relationship.Kind = "has_one" - field.Relationship = relationship - } else { - var foreignKeys = tagForeignKeys - var associationForeignKeys = tagAssociationForeignKeys - - if len(foreignKeys) == 0 { - // generate foreign keys & association foreign keys - if len(associationForeignKeys) == 0 { - for _, primaryField := range toScope.PrimaryFields() { - foreignKeys = append(foreignKeys, field.Name+primaryField.Name) - associationForeignKeys = append(associationForeignKeys, primaryField.Name) - } - } else { - // generate foreign keys with association foreign keys - for _, associationForeignKey := range associationForeignKeys { - if foreignField := getForeignField(associationForeignKey, toFields); foreignField != nil { - foreignKeys = append(foreignKeys, field.Name+foreignField.Name) - associationForeignKeys = append(associationForeignKeys, foreignField.Name) - } - } - } - } else { - // generate foreign keys & association foreign keys - if len(associationForeignKeys) == 0 { - for _, foreignKey := range foreignKeys { - if strings.HasPrefix(foreignKey, field.Name) { - associationForeignKey := strings.TrimPrefix(foreignKey, field.Name) - if foreignField := getForeignField(associationForeignKey, toFields); foreignField != nil { - associationForeignKeys = append(associationForeignKeys, associationForeignKey) - } - } - } - if len(associationForeignKeys) == 0 && len(foreignKeys) == 1 { - associationForeignKeys = []string{toScope.PrimaryKey()} - } - } else if len(foreignKeys) != len(associationForeignKeys) { - scope.Err(errors.New("invalid foreign keys, should have same length")) - return - } - } - - for idx, foreignKey := range foreignKeys { - if foreignField := getForeignField(foreignKey, modelStruct.StructFields); foreignField != nil { - if associationField := getForeignField(associationForeignKeys[idx], toFields); associationField != nil { - foreignField.IsForeignKey = true - - // association foreign keys - relationship.AssociationForeignFieldNames = append(relationship.AssociationForeignFieldNames, associationField.Name) - relationship.AssociationForeignDBNames = append(relationship.AssociationForeignDBNames, associationField.DBName) - - // source foreign keys - relationship.ForeignFieldNames = append(relationship.ForeignFieldNames, foreignField.Name) - relationship.ForeignDBNames = append(relationship.ForeignDBNames, foreignField.DBName) - } - } - } - - if len(relationship.ForeignFieldNames) != 0 { - relationship.Kind = "belongs_to" - field.Relationship = relationship - } - } - }(field) - default: - field.IsNormal = true - } - } - } - - // Even it is ignored, also possible to decode db value into the field - if value, ok := field.TagSettings["COLUMN"]; ok { - field.DBName = value - } else { - field.DBName = ToDBName(fieldStruct.Name) - } - - modelStruct.StructFields = append(modelStruct.StructFields, field) - } - } - - if len(modelStruct.PrimaryFields) == 0 { - if field := getForeignField("id", modelStruct.StructFields); field != nil { - field.IsPrimaryKey = true - modelStruct.PrimaryFields = append(modelStruct.PrimaryFields, field) - } - } - - modelStructsMap.Set(reflectType, &modelStruct) - - return &modelStruct -} - -// GetStructFields get model's field structs -func (scope *Scope) GetStructFields() (fields []*StructField) { - return scope.GetModelStruct().StructFields -} - -func parseTagSetting(tags reflect.StructTag) map[string]string { - setting := map[string]string{} - for _, str := range []string{tags.Get("sql"), tags.Get("gorm")} { - tags := strings.Split(str, ";") - for _, value := range tags { - v := strings.Split(value, ":") - k := strings.TrimSpace(strings.ToUpper(v[0])) - if len(v) >= 2 { - setting[k] = strings.Join(v[1:], ":") - } else { - setting[k] = k - } - } - } - return setting -} diff --git a/deps/github.com/jinzhu/gorm/multi_primary_keys_test.go b/deps/github.com/jinzhu/gorm/multi_primary_keys_test.go deleted file mode 100644 index 32a147724..000000000 --- a/deps/github.com/jinzhu/gorm/multi_primary_keys_test.go +++ /dev/null @@ -1,381 +0,0 @@ -package gorm_test - -import ( - "os" - "reflect" - "sort" - "testing" -) - -type Blog struct { - ID uint `gorm:"primary_key"` - Locale string `gorm:"primary_key"` - Subject string - Body string - Tags []Tag `gorm:"many2many:blog_tags;"` - SharedTags []Tag `gorm:"many2many:shared_blog_tags;ForeignKey:id;AssociationForeignKey:id"` - LocaleTags []Tag `gorm:"many2many:locale_blog_tags;ForeignKey:id,locale;AssociationForeignKey:id"` -} - -type Tag struct { - ID uint `gorm:"primary_key"` - Locale string `gorm:"primary_key"` - Value string - Blogs []*Blog `gorm:"many2many:blogs_tags"` -} - -func compareTags(tags []Tag, contents []string) bool { - var tagContents []string - for _, tag := range tags { - tagContents = append(tagContents, tag.Value) - } - sort.Strings(tagContents) - sort.Strings(contents) - return reflect.DeepEqual(tagContents, contents) -} - -func TestManyToManyWithMultiPrimaryKeys(t *testing.T) { - if dialect := os.Getenv("GORM_DIALECT"); dialect != "" && dialect != "sqlite" && dialect != "mssql" { - DB.DropTable(&Blog{}, &Tag{}) - DB.DropTable("blog_tags") - DB.CreateTable(&Blog{}, &Tag{}) - blog := Blog{ - Locale: "ZH", - Subject: "subject", - Body: "body", - Tags: []Tag{ - {Locale: "ZH", Value: "tag1"}, - {Locale: "ZH", Value: "tag2"}, - }, - } - - DB.Save(&blog) - if !compareTags(blog.Tags, []string{"tag1", "tag2"}) { - t.Errorf("Blog should has two tags") - } - - // Append - var tag3 = &Tag{Locale: "ZH", Value: "tag3"} - DB.Model(&blog).Association("Tags").Append([]*Tag{tag3}) - if !compareTags(blog.Tags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Blog should has three tags after Append") - } - - if DB.Model(&blog).Association("Tags").Count() != 3 { - t.Errorf("Blog should has three tags after Append") - } - - var tags []Tag - DB.Model(&blog).Related(&tags, "Tags") - if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Should find 3 tags with Related") - } - - var blog1 Blog - DB.Preload("Tags").Find(&blog1) - if !compareTags(blog1.Tags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Preload many2many relations") - } - - // Replace - var tag5 = &Tag{Locale: "ZH", Value: "tag5"} - var tag6 = &Tag{Locale: "ZH", Value: "tag6"} - DB.Model(&blog).Association("Tags").Replace(tag5, tag6) - var tags2 []Tag - DB.Model(&blog).Related(&tags2, "Tags") - if !compareTags(tags2, []string{"tag5", "tag6"}) { - t.Errorf("Should find 2 tags after Replace") - } - - if DB.Model(&blog).Association("Tags").Count() != 2 { - t.Errorf("Blog should has three tags after Replace") - } - - // Delete - DB.Model(&blog).Association("Tags").Delete(tag5) - var tags3 []Tag - DB.Model(&blog).Related(&tags3, "Tags") - if !compareTags(tags3, []string{"tag6"}) { - t.Errorf("Should find 1 tags after Delete") - } - - if DB.Model(&blog).Association("Tags").Count() != 1 { - t.Errorf("Blog should has three tags after Delete") - } - - DB.Model(&blog).Association("Tags").Delete(tag3) - var tags4 []Tag - DB.Model(&blog).Related(&tags4, "Tags") - if !compareTags(tags4, []string{"tag6"}) { - t.Errorf("Tag should not be deleted when Delete with a unrelated tag") - } - - // Clear - DB.Model(&blog).Association("Tags").Clear() - if DB.Model(&blog).Association("Tags").Count() != 0 { - t.Errorf("All tags should be cleared") - } - } -} - -func TestManyToManyWithCustomizedForeignKeys(t *testing.T) { - if dialect := os.Getenv("GORM_DIALECT"); dialect != "" && dialect != "sqlite" && dialect != "mssql" { - DB.DropTable(&Blog{}, &Tag{}) - DB.DropTable("shared_blog_tags") - DB.CreateTable(&Blog{}, &Tag{}) - blog := Blog{ - Locale: "ZH", - Subject: "subject", - Body: "body", - SharedTags: []Tag{ - {Locale: "ZH", Value: "tag1"}, - {Locale: "ZH", Value: "tag2"}, - }, - } - DB.Save(&blog) - - blog2 := Blog{ - ID: blog.ID, - Locale: "EN", - } - DB.Create(&blog2) - - if !compareTags(blog.SharedTags, []string{"tag1", "tag2"}) { - t.Errorf("Blog should has two tags") - } - - // Append - var tag3 = &Tag{Locale: "ZH", Value: "tag3"} - DB.Model(&blog).Association("SharedTags").Append([]*Tag{tag3}) - if !compareTags(blog.SharedTags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Blog should has three tags after Append") - } - - if DB.Model(&blog).Association("SharedTags").Count() != 3 { - t.Errorf("Blog should has three tags after Append") - } - - if DB.Model(&blog2).Association("SharedTags").Count() != 3 { - t.Errorf("Blog should has three tags after Append") - } - - var tags []Tag - DB.Model(&blog).Related(&tags, "SharedTags") - if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Should find 3 tags with Related") - } - - DB.Model(&blog2).Related(&tags, "SharedTags") - if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Should find 3 tags with Related") - } - - var blog1 Blog - DB.Preload("SharedTags").Find(&blog1) - if !compareTags(blog1.SharedTags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Preload many2many relations") - } - - var tag4 = &Tag{Locale: "ZH", Value: "tag4"} - DB.Model(&blog2).Association("SharedTags").Append(tag4) - - DB.Model(&blog).Related(&tags, "SharedTags") - if !compareTags(tags, []string{"tag1", "tag2", "tag3", "tag4"}) { - t.Errorf("Should find 3 tags with Related") - } - - DB.Model(&blog2).Related(&tags, "SharedTags") - if !compareTags(tags, []string{"tag1", "tag2", "tag3", "tag4"}) { - t.Errorf("Should find 3 tags with Related") - } - - // Replace - var tag5 = &Tag{Locale: "ZH", Value: "tag5"} - var tag6 = &Tag{Locale: "ZH", Value: "tag6"} - DB.Model(&blog2).Association("SharedTags").Replace(tag5, tag6) - var tags2 []Tag - DB.Model(&blog).Related(&tags2, "SharedTags") - if !compareTags(tags2, []string{"tag5", "tag6"}) { - t.Errorf("Should find 2 tags after Replace") - } - - DB.Model(&blog2).Related(&tags2, "SharedTags") - if !compareTags(tags2, []string{"tag5", "tag6"}) { - t.Errorf("Should find 2 tags after Replace") - } - - if DB.Model(&blog).Association("SharedTags").Count() != 2 { - t.Errorf("Blog should has three tags after Replace") - } - - // Delete - DB.Model(&blog).Association("SharedTags").Delete(tag5) - var tags3 []Tag - DB.Model(&blog).Related(&tags3, "SharedTags") - if !compareTags(tags3, []string{"tag6"}) { - t.Errorf("Should find 1 tags after Delete") - } - - if DB.Model(&blog).Association("SharedTags").Count() != 1 { - t.Errorf("Blog should has three tags after Delete") - } - - DB.Model(&blog2).Association("SharedTags").Delete(tag3) - var tags4 []Tag - DB.Model(&blog).Related(&tags4, "SharedTags") - if !compareTags(tags4, []string{"tag6"}) { - t.Errorf("Tag should not be deleted when Delete with a unrelated tag") - } - - // Clear - DB.Model(&blog2).Association("SharedTags").Clear() - if DB.Model(&blog).Association("SharedTags").Count() != 0 { - t.Errorf("All tags should be cleared") - } - } -} - -func TestManyToManyWithCustomizedForeignKeys2(t *testing.T) { - if dialect := os.Getenv("GORM_DIALECT"); dialect != "" && dialect != "sqlite" && dialect != "mssql" { - DB.DropTable(&Blog{}, &Tag{}) - DB.DropTable("locale_blog_tags") - DB.CreateTable(&Blog{}, &Tag{}) - blog := Blog{ - Locale: "ZH", - Subject: "subject", - Body: "body", - LocaleTags: []Tag{ - {Locale: "ZH", Value: "tag1"}, - {Locale: "ZH", Value: "tag2"}, - }, - } - DB.Save(&blog) - - blog2 := Blog{ - ID: blog.ID, - Locale: "EN", - } - DB.Create(&blog2) - - // Append - var tag3 = &Tag{Locale: "ZH", Value: "tag3"} - DB.Model(&blog).Association("LocaleTags").Append([]*Tag{tag3}) - if !compareTags(blog.LocaleTags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Blog should has three tags after Append") - } - - if DB.Model(&blog).Association("LocaleTags").Count() != 3 { - t.Errorf("Blog should has three tags after Append") - } - - if DB.Model(&blog2).Association("LocaleTags").Count() != 0 { - t.Errorf("EN Blog should has 0 tags after ZH Blog Append") - } - - var tags []Tag - DB.Model(&blog).Related(&tags, "LocaleTags") - if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Should find 3 tags with Related") - } - - DB.Model(&blog2).Related(&tags, "LocaleTags") - if len(tags) != 0 { - t.Errorf("Should find 0 tags with Related for EN Blog") - } - - var blog1 Blog - DB.Preload("LocaleTags").Find(&blog1, "locale = ? AND id = ?", "ZH", blog.ID) - if !compareTags(blog1.LocaleTags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Preload many2many relations") - } - - var tag4 = &Tag{Locale: "ZH", Value: "tag4"} - DB.Model(&blog2).Association("LocaleTags").Append(tag4) - - DB.Model(&blog).Related(&tags, "LocaleTags") - if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("Should find 3 tags with Related for EN Blog") - } - - DB.Model(&blog2).Related(&tags, "LocaleTags") - if !compareTags(tags, []string{"tag4"}) { - t.Errorf("Should find 1 tags with Related for EN Blog") - } - - // Replace - var tag5 = &Tag{Locale: "ZH", Value: "tag5"} - var tag6 = &Tag{Locale: "ZH", Value: "tag6"} - DB.Model(&blog2).Association("LocaleTags").Replace(tag5, tag6) - - var tags2 []Tag - DB.Model(&blog).Related(&tags2, "LocaleTags") - if !compareTags(tags2, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("CN Blog's tags should not be changed after EN Blog Replace") - } - - var blog11 Blog - DB.Preload("LocaleTags").First(&blog11, "id = ? AND locale = ?", blog.ID, blog.Locale) - if !compareTags(blog11.LocaleTags, []string{"tag1", "tag2", "tag3"}) { - t.Errorf("CN Blog's tags should not be changed after EN Blog Replace") - } - - DB.Model(&blog2).Related(&tags2, "LocaleTags") - if !compareTags(tags2, []string{"tag5", "tag6"}) { - t.Errorf("Should find 2 tags after Replace") - } - - var blog21 Blog - DB.Preload("LocaleTags").First(&blog21, "id = ? AND locale = ?", blog2.ID, blog2.Locale) - if !compareTags(blog21.LocaleTags, []string{"tag5", "tag6"}) { - t.Errorf("EN Blog's tags should be changed after Replace") - } - - if DB.Model(&blog).Association("LocaleTags").Count() != 3 { - t.Errorf("ZH Blog should has three tags after Replace") - } - - if DB.Model(&blog2).Association("LocaleTags").Count() != 2 { - t.Errorf("EN Blog should has two tags after Replace") - } - - // Delete - DB.Model(&blog).Association("LocaleTags").Delete(tag5) - - if DB.Model(&blog).Association("LocaleTags").Count() != 3 { - t.Errorf("ZH Blog should has three tags after Delete with EN's tag") - } - - if DB.Model(&blog2).Association("LocaleTags").Count() != 2 { - t.Errorf("EN Blog should has two tags after ZH Blog Delete with EN's tag") - } - - DB.Model(&blog2).Association("LocaleTags").Delete(tag5) - - if DB.Model(&blog).Association("LocaleTags").Count() != 3 { - t.Errorf("ZH Blog should has three tags after EN Blog Delete with EN's tag") - } - - if DB.Model(&blog2).Association("LocaleTags").Count() != 1 { - t.Errorf("EN Blog should has 1 tags after EN Blog Delete with EN's tag") - } - - // Clear - DB.Model(&blog2).Association("LocaleTags").Clear() - if DB.Model(&blog).Association("LocaleTags").Count() != 3 { - t.Errorf("ZH Blog's tags should not be cleared when clear EN Blog's tags") - } - - if DB.Model(&blog2).Association("LocaleTags").Count() != 0 { - t.Errorf("EN Blog's tags should be cleared when clear EN Blog's tags") - } - - DB.Model(&blog).Association("LocaleTags").Clear() - if DB.Model(&blog).Association("LocaleTags").Count() != 0 { - t.Errorf("ZH Blog's tags should be cleared when clear ZH Blog's tags") - } - - if DB.Model(&blog2).Association("LocaleTags").Count() != 0 { - t.Errorf("EN Blog's tags should be cleared") - } - } -} diff --git a/deps/github.com/jinzhu/gorm/pointer_test.go b/deps/github.com/jinzhu/gorm/pointer_test.go deleted file mode 100644 index 2a68a5ab2..000000000 --- a/deps/github.com/jinzhu/gorm/pointer_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package gorm_test - -import "testing" - -type PointerStruct struct { - ID int64 - Name *string - Num *int -} - -type NormalStruct struct { - ID int64 - Name string - Num int -} - -func TestPointerFields(t *testing.T) { - DB.DropTable(&PointerStruct{}) - DB.AutoMigrate(&PointerStruct{}) - var name = "pointer struct 1" - var num = 100 - pointerStruct := PointerStruct{Name: &name, Num: &num} - if DB.Create(&pointerStruct).Error != nil { - t.Errorf("Failed to save pointer struct") - } - - var pointerStructResult PointerStruct - if err := DB.First(&pointerStructResult, "id = ?", pointerStruct.ID).Error; err != nil || *pointerStructResult.Name != name || *pointerStructResult.Num != num { - t.Errorf("Failed to query saved pointer struct") - } - - var tableName = DB.NewScope(&PointerStruct{}).TableName() - - var normalStruct NormalStruct - DB.Table(tableName).First(&normalStruct) - if normalStruct.Name != name || normalStruct.Num != num { - t.Errorf("Failed to query saved Normal struct") - } - - var nilPointerStruct = PointerStruct{} - if err := DB.Create(&nilPointerStruct).Error; err != nil { - t.Error("Failed to save nil pointer struct", err) - } - - var pointerStruct2 PointerStruct - if err := DB.First(&pointerStruct2, "id = ?", nilPointerStruct.ID).Error; err != nil { - t.Error("Failed to query saved nil pointer struct", err) - } - - var normalStruct2 NormalStruct - if err := DB.Table(tableName).First(&normalStruct2, "id = ?", nilPointerStruct.ID).Error; err != nil { - t.Error("Failed to query saved nil pointer struct", err) - } - - var partialNilPointerStruct1 = PointerStruct{Num: &num} - if err := DB.Create(&partialNilPointerStruct1).Error; err != nil { - t.Error("Failed to save partial nil pointer struct", err) - } - - var pointerStruct3 PointerStruct - if err := DB.First(&pointerStruct3, "id = ?", partialNilPointerStruct1.ID).Error; err != nil || *pointerStruct3.Num != num { - t.Error("Failed to query saved partial nil pointer struct", err) - } - - var normalStruct3 NormalStruct - if err := DB.Table(tableName).First(&normalStruct3, "id = ?", partialNilPointerStruct1.ID).Error; err != nil || normalStruct3.Num != num { - t.Error("Failed to query saved partial pointer struct", err) - } - - var partialNilPointerStruct2 = PointerStruct{Name: &name} - if err := DB.Create(&partialNilPointerStruct2).Error; err != nil { - t.Error("Failed to save partial nil pointer struct", err) - } - - var pointerStruct4 PointerStruct - if err := DB.First(&pointerStruct4, "id = ?", partialNilPointerStruct2.ID).Error; err != nil || *pointerStruct4.Name != name { - t.Error("Failed to query saved partial nil pointer struct", err) - } - - var normalStruct4 NormalStruct - if err := DB.Table(tableName).First(&normalStruct4, "id = ?", partialNilPointerStruct2.ID).Error; err != nil || normalStruct4.Name != name { - t.Error("Failed to query saved partial pointer struct", err) - } -} diff --git a/deps/github.com/jinzhu/gorm/polymorphic_test.go b/deps/github.com/jinzhu/gorm/polymorphic_test.go deleted file mode 100644 index d1ecfbbb6..000000000 --- a/deps/github.com/jinzhu/gorm/polymorphic_test.go +++ /dev/null @@ -1,366 +0,0 @@ -package gorm_test - -import ( - "reflect" - "sort" - "testing" -) - -type Cat struct { - Id int - Name string - Toy Toy `gorm:"polymorphic:Owner;"` -} - -type Dog struct { - Id int - Name string - Toys []Toy `gorm:"polymorphic:Owner;"` -} - -type Hamster struct { - Id int - Name string - PreferredToy Toy `gorm:"polymorphic:Owner;polymorphic_value:hamster_preferred"` - OtherToy Toy `gorm:"polymorphic:Owner;polymorphic_value:hamster_other"` -} - -type Toy struct { - Id int - Name string - OwnerId int - OwnerType string -} - -var compareToys = func(toys []Toy, contents []string) bool { - var toyContents []string - for _, toy := range toys { - toyContents = append(toyContents, toy.Name) - } - sort.Strings(toyContents) - sort.Strings(contents) - return reflect.DeepEqual(toyContents, contents) -} - -func TestPolymorphic(t *testing.T) { - cat := Cat{Name: "Mr. Bigglesworth", Toy: Toy{Name: "cat toy"}} - dog := Dog{Name: "Pluto", Toys: []Toy{{Name: "dog toy 1"}, {Name: "dog toy 2"}}} - DB.Save(&cat).Save(&dog) - - if DB.Model(&cat).Association("Toy").Count() != 1 { - t.Errorf("Cat's toys count should be 1") - } - - if DB.Model(&dog).Association("Toys").Count() != 2 { - t.Errorf("Dog's toys count should be 2") - } - - // Query - var catToys []Toy - if DB.Model(&cat).Related(&catToys, "Toy").RecordNotFound() { - t.Errorf("Did not find any has one polymorphic association") - } else if len(catToys) != 1 { - t.Errorf("Should have found only one polymorphic has one association") - } else if catToys[0].Name != cat.Toy.Name { - t.Errorf("Should have found the proper has one polymorphic association") - } - - var dogToys []Toy - if DB.Model(&dog).Related(&dogToys, "Toys").RecordNotFound() { - t.Errorf("Did not find any polymorphic has many associations") - } else if len(dogToys) != len(dog.Toys) { - t.Errorf("Should have found all polymorphic has many associations") - } - - var catToy Toy - DB.Model(&cat).Association("Toy").Find(&catToy) - if catToy.Name != cat.Toy.Name { - t.Errorf("Should find has one polymorphic association") - } - - var dogToys1 []Toy - DB.Model(&dog).Association("Toys").Find(&dogToys1) - if !compareToys(dogToys1, []string{"dog toy 1", "dog toy 2"}) { - t.Errorf("Should find has many polymorphic association") - } - - // Append - DB.Model(&cat).Association("Toy").Append(&Toy{ - Name: "cat toy 2", - }) - - var catToy2 Toy - DB.Model(&cat).Association("Toy").Find(&catToy2) - if catToy2.Name != "cat toy 2" { - t.Errorf("Should update has one polymorphic association with Append") - } - - if DB.Model(&cat).Association("Toy").Count() != 1 { - t.Errorf("Cat's toys count should be 1 after Append") - } - - if DB.Model(&dog).Association("Toys").Count() != 2 { - t.Errorf("Should return two polymorphic has many associations") - } - - DB.Model(&dog).Association("Toys").Append(&Toy{ - Name: "dog toy 3", - }) - - var dogToys2 []Toy - DB.Model(&dog).Association("Toys").Find(&dogToys2) - if !compareToys(dogToys2, []string{"dog toy 1", "dog toy 2", "dog toy 3"}) { - t.Errorf("Dog's toys should be updated with Append") - } - - if DB.Model(&dog).Association("Toys").Count() != 3 { - t.Errorf("Should return three polymorphic has many associations") - } - - // Replace - DB.Model(&cat).Association("Toy").Replace(&Toy{ - Name: "cat toy 3", - }) - - var catToy3 Toy - DB.Model(&cat).Association("Toy").Find(&catToy3) - if catToy3.Name != "cat toy 3" { - t.Errorf("Should update has one polymorphic association with Replace") - } - - if DB.Model(&cat).Association("Toy").Count() != 1 { - t.Errorf("Cat's toys count should be 1 after Replace") - } - - if DB.Model(&dog).Association("Toys").Count() != 3 { - t.Errorf("Should return three polymorphic has many associations") - } - - DB.Model(&dog).Association("Toys").Replace(&Toy{ - Name: "dog toy 4", - }, []Toy{ - {Name: "dog toy 5"}, {Name: "dog toy 6"}, {Name: "dog toy 7"}, - }) - - var dogToys3 []Toy - DB.Model(&dog).Association("Toys").Find(&dogToys3) - if !compareToys(dogToys3, []string{"dog toy 4", "dog toy 5", "dog toy 6", "dog toy 7"}) { - t.Errorf("Dog's toys should be updated with Replace") - } - - if DB.Model(&dog).Association("Toys").Count() != 4 { - t.Errorf("Should return three polymorphic has many associations") - } - - // Delete - DB.Model(&cat).Association("Toy").Delete(&catToy2) - - var catToy4 Toy - DB.Model(&cat).Association("Toy").Find(&catToy4) - if catToy4.Name != "cat toy 3" { - t.Errorf("Should not update has one polymorphic association when Delete a unrelated Toy") - } - - if DB.Model(&cat).Association("Toy").Count() != 1 { - t.Errorf("Cat's toys count should be 1") - } - - if DB.Model(&dog).Association("Toys").Count() != 4 { - t.Errorf("Dog's toys count should be 4") - } - - DB.Model(&cat).Association("Toy").Delete(&catToy3) - - if !DB.Model(&cat).Related(&Toy{}, "Toy").RecordNotFound() { - t.Errorf("Toy should be deleted with Delete") - } - - if DB.Model(&cat).Association("Toy").Count() != 0 { - t.Errorf("Cat's toys count should be 0 after Delete") - } - - if DB.Model(&dog).Association("Toys").Count() != 4 { - t.Errorf("Dog's toys count should not be changed when delete cat's toy") - } - - DB.Model(&dog).Association("Toys").Delete(&dogToys2) - - if DB.Model(&dog).Association("Toys").Count() != 4 { - t.Errorf("Dog's toys count should not be changed when delete unrelated toys") - } - - DB.Model(&dog).Association("Toys").Delete(&dogToys3) - - if DB.Model(&dog).Association("Toys").Count() != 0 { - t.Errorf("Dog's toys count should be deleted with Delete") - } - - // Clear - DB.Model(&cat).Association("Toy").Append(&Toy{ - Name: "cat toy 2", - }) - - if DB.Model(&cat).Association("Toy").Count() != 1 { - t.Errorf("Cat's toys should be added with Append") - } - - DB.Model(&cat).Association("Toy").Clear() - - if DB.Model(&cat).Association("Toy").Count() != 0 { - t.Errorf("Cat's toys should be cleared with Clear") - } - - DB.Model(&dog).Association("Toys").Append(&Toy{ - Name: "dog toy 8", - }) - - if DB.Model(&dog).Association("Toys").Count() != 1 { - t.Errorf("Dog's toys should be added with Append") - } - - DB.Model(&dog).Association("Toys").Clear() - - if DB.Model(&dog).Association("Toys").Count() != 0 { - t.Errorf("Dog's toys should be cleared with Clear") - } -} - -func TestNamedPolymorphic(t *testing.T) { - hamster := Hamster{Name: "Mr. Hammond", PreferredToy: Toy{Name: "bike"}, OtherToy: Toy{Name: "treadmill"}} - DB.Save(&hamster) - - hamster2 := Hamster{} - DB.Preload("PreferredToy").Preload("OtherToy").Find(&hamster2, hamster.Id) - if hamster2.PreferredToy.Id != hamster.PreferredToy.Id || hamster2.PreferredToy.Name != hamster.PreferredToy.Name { - t.Errorf("Hamster's preferred toy couldn't be preloaded") - } - if hamster2.OtherToy.Id != hamster.OtherToy.Id || hamster2.OtherToy.Name != hamster.OtherToy.Name { - t.Errorf("Hamster's other toy couldn't be preloaded") - } - - // clear to omit Toy.Id in count - hamster2.PreferredToy = Toy{} - hamster2.OtherToy = Toy{} - - if DB.Model(&hamster2).Association("PreferredToy").Count() != 1 { - t.Errorf("Hamster's preferred toy count should be 1") - } - - if DB.Model(&hamster2).Association("OtherToy").Count() != 1 { - t.Errorf("Hamster's other toy count should be 1") - } - - // Query - var hamsterToys []Toy - if DB.Model(&hamster).Related(&hamsterToys, "PreferredToy").RecordNotFound() { - t.Errorf("Did not find any has one polymorphic association") - } else if len(hamsterToys) != 1 { - t.Errorf("Should have found only one polymorphic has one association") - } else if hamsterToys[0].Name != hamster.PreferredToy.Name { - t.Errorf("Should have found the proper has one polymorphic association") - } - - if DB.Model(&hamster).Related(&hamsterToys, "OtherToy").RecordNotFound() { - t.Errorf("Did not find any has one polymorphic association") - } else if len(hamsterToys) != 1 { - t.Errorf("Should have found only one polymorphic has one association") - } else if hamsterToys[0].Name != hamster.OtherToy.Name { - t.Errorf("Should have found the proper has one polymorphic association") - } - - hamsterToy := Toy{} - DB.Model(&hamster).Association("PreferredToy").Find(&hamsterToy) - if hamsterToy.Name != hamster.PreferredToy.Name { - t.Errorf("Should find has one polymorphic association") - } - hamsterToy = Toy{} - DB.Model(&hamster).Association("OtherToy").Find(&hamsterToy) - if hamsterToy.Name != hamster.OtherToy.Name { - t.Errorf("Should find has one polymorphic association") - } - - // Append - DB.Model(&hamster).Association("PreferredToy").Append(&Toy{ - Name: "bike 2", - }) - DB.Model(&hamster).Association("OtherToy").Append(&Toy{ - Name: "treadmill 2", - }) - - hamsterToy = Toy{} - DB.Model(&hamster).Association("PreferredToy").Find(&hamsterToy) - if hamsterToy.Name != "bike 2" { - t.Errorf("Should update has one polymorphic association with Append") - } - - hamsterToy = Toy{} - DB.Model(&hamster).Association("OtherToy").Find(&hamsterToy) - if hamsterToy.Name != "treadmill 2" { - t.Errorf("Should update has one polymorphic association with Append") - } - - if DB.Model(&hamster2).Association("PreferredToy").Count() != 1 { - t.Errorf("Hamster's toys count should be 1 after Append") - } - - if DB.Model(&hamster2).Association("OtherToy").Count() != 1 { - t.Errorf("Hamster's toys count should be 1 after Append") - } - - // Replace - DB.Model(&hamster).Association("PreferredToy").Replace(&Toy{ - Name: "bike 3", - }) - DB.Model(&hamster).Association("OtherToy").Replace(&Toy{ - Name: "treadmill 3", - }) - - hamsterToy = Toy{} - DB.Model(&hamster).Association("PreferredToy").Find(&hamsterToy) - if hamsterToy.Name != "bike 3" { - t.Errorf("Should update has one polymorphic association with Replace") - } - - hamsterToy = Toy{} - DB.Model(&hamster).Association("OtherToy").Find(&hamsterToy) - if hamsterToy.Name != "treadmill 3" { - t.Errorf("Should update has one polymorphic association with Replace") - } - - if DB.Model(&hamster2).Association("PreferredToy").Count() != 1 { - t.Errorf("hamster's toys count should be 1 after Replace") - } - - if DB.Model(&hamster2).Association("OtherToy").Count() != 1 { - t.Errorf("hamster's toys count should be 1 after Replace") - } - - // Clear - DB.Model(&hamster).Association("PreferredToy").Append(&Toy{ - Name: "bike 2", - }) - DB.Model(&hamster).Association("OtherToy").Append(&Toy{ - Name: "treadmill 2", - }) - - if DB.Model(&hamster).Association("PreferredToy").Count() != 1 { - t.Errorf("Hamster's toys should be added with Append") - } - if DB.Model(&hamster).Association("OtherToy").Count() != 1 { - t.Errorf("Hamster's toys should be added with Append") - } - - DB.Model(&hamster).Association("PreferredToy").Clear() - - if DB.Model(&hamster2).Association("PreferredToy").Count() != 0 { - t.Errorf("Hamster's preferred toy should be cleared with Clear") - } - if DB.Model(&hamster2).Association("OtherToy").Count() != 1 { - t.Errorf("Hamster's other toy should be still available") - } - - DB.Model(&hamster).Association("OtherToy").Clear() - if DB.Model(&hamster).Association("OtherToy").Count() != 0 { - t.Errorf("Hamster's other toy should be cleared with Clear") - } -} diff --git a/deps/github.com/jinzhu/gorm/preload_test.go b/deps/github.com/jinzhu/gorm/preload_test.go deleted file mode 100644 index 311ad0be1..000000000 --- a/deps/github.com/jinzhu/gorm/preload_test.go +++ /dev/null @@ -1,1675 +0,0 @@ -package gorm_test - -import ( - "database/sql" - "encoding/json" - "os" - "reflect" - "testing" - - "github.com/jinzhu/gorm" -) - -func getPreloadUser(name string) *User { - return getPreparedUser(name, "Preload") -} - -func checkUserHasPreloadData(user User, t *testing.T) { - u := getPreloadUser(user.Name) - if user.BillingAddress.Address1 != u.BillingAddress.Address1 { - t.Error("Failed to preload user's BillingAddress") - } - - if user.ShippingAddress.Address1 != u.ShippingAddress.Address1 { - t.Error("Failed to preload user's ShippingAddress") - } - - if user.CreditCard.Number != u.CreditCard.Number { - t.Error("Failed to preload user's CreditCard") - } - - if user.Company.Name != u.Company.Name { - t.Error("Failed to preload user's Company") - } - - if len(user.Emails) != len(u.Emails) { - t.Error("Failed to preload user's Emails") - } else { - var found int - for _, e1 := range u.Emails { - for _, e2 := range user.Emails { - if e1.Email == e2.Email { - found++ - break - } - } - } - if found != len(u.Emails) { - t.Error("Failed to preload user's email details") - } - } -} - -func TestPreload(t *testing.T) { - user1 := getPreloadUser("user1") - DB.Save(user1) - - preloadDB := DB.Where("role = ?", "Preload").Preload("BillingAddress").Preload("ShippingAddress"). - Preload("CreditCard").Preload("Emails").Preload("Company") - var user User - preloadDB.Find(&user) - checkUserHasPreloadData(user, t) - - user2 := getPreloadUser("user2") - DB.Save(user2) - - user3 := getPreloadUser("user3") - DB.Save(user3) - - var users []User - preloadDB.Find(&users) - - for _, user := range users { - checkUserHasPreloadData(user, t) - } - - var users2 []*User - preloadDB.Find(&users2) - - for _, user := range users2 { - checkUserHasPreloadData(*user, t) - } - - var users3 []*User - preloadDB.Preload("Emails", "email = ?", user3.Emails[0].Email).Find(&users3) - - for _, user := range users3 { - if user.Name == user3.Name { - if len(user.Emails) != 1 { - t.Errorf("should only preload one emails for user3 when with condition") - } - } else if len(user.Emails) != 0 { - t.Errorf("should not preload any emails for other users when with condition") - } else if user.Emails == nil { - t.Errorf("should return an empty slice to indicate zero results") - } - } -} - -func TestAutoPreload(t *testing.T) { - user1 := getPreloadUser("auto_user1") - DB.Save(user1) - - preloadDB := DB.Set("gorm:auto_preload", true).Where("role = ?", "Preload") - var user User - preloadDB.Find(&user) - checkUserHasPreloadData(user, t) - - user2 := getPreloadUser("auto_user2") - DB.Save(user2) - - var users []User - preloadDB.Find(&users) - - for _, user := range users { - checkUserHasPreloadData(user, t) - } - - var users2 []*User - preloadDB.Find(&users2) - - for _, user := range users2 { - checkUserHasPreloadData(*user, t) - } -} - -func TestNestedPreload1(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1 Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2 Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level3{Level2: Level2{Level1: Level1{Value: "value"}}} - if err := DB.Create(&want).Error; err != nil { - t.Error(err) - } - - var got Level3 - if err := DB.Preload("Level2").Preload("Level2.Level1").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } - - if err := DB.Preload("Level2").Preload("Level2.Level1").Find(&got, "name = ?", "not_found").Error; err != gorm.ErrRecordNotFound { - t.Error(err) - } -} - -func TestNestedPreload2(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1s []*Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2s []Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level3{ - Level2s: []Level2{ - { - Level1s: []*Level1{ - {Value: "value1"}, - {Value: "value2"}, - }, - }, - { - Level1s: []*Level1{ - {Value: "value3"}, - }, - }, - }, - } - if err := DB.Create(&want).Error; err != nil { - t.Error(err) - } - - var got Level3 - if err := DB.Preload("Level2s.Level1s").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestNestedPreload3(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1 Level1 - Level3ID uint - } - Level3 struct { - Name string - ID uint - Level2s []Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level3{ - Level2s: []Level2{ - {Level1: Level1{Value: "value1"}}, - {Level1: Level1{Value: "value2"}}, - }, - } - if err := DB.Create(&want).Error; err != nil { - t.Error(err) - } - - var got Level3 - if err := DB.Preload("Level2s.Level1").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestNestedPreload4(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1s []Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2 Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level3{ - Level2: Level2{ - Level1s: []Level1{ - {Value: "value1"}, - {Value: "value2"}, - }, - }, - } - if err := DB.Create(&want).Error; err != nil { - t.Error(err) - } - - var got Level3 - if err := DB.Preload("Level2.Level1s").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -// Slice: []Level3 -func TestNestedPreload5(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1 Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2 Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := make([]Level3, 2) - want[0] = Level3{Level2: Level2{Level1: Level1{Value: "value"}}} - if err := DB.Create(&want[0]).Error; err != nil { - t.Error(err) - } - want[1] = Level3{Level2: Level2{Level1: Level1{Value: "value2"}}} - if err := DB.Create(&want[1]).Error; err != nil { - t.Error(err) - } - - var got []Level3 - if err := DB.Preload("Level2").Preload("Level2.Level1").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestNestedPreload6(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1s []Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2s []Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := make([]Level3, 2) - want[0] = Level3{ - Level2s: []Level2{ - { - Level1s: []Level1{ - {Value: "value1"}, - {Value: "value2"}, - }, - }, - { - Level1s: []Level1{ - {Value: "value3"}, - }, - }, - }, - } - if err := DB.Create(&want[0]).Error; err != nil { - t.Error(err) - } - - want[1] = Level3{ - Level2s: []Level2{ - { - Level1s: []Level1{ - {Value: "value3"}, - {Value: "value4"}, - }, - }, - { - Level1s: []Level1{ - {Value: "value5"}, - }, - }, - }, - } - if err := DB.Create(&want[1]).Error; err != nil { - t.Error(err) - } - - var got []Level3 - if err := DB.Preload("Level2s.Level1s").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestNestedPreload7(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1 Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2s []Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := make([]Level3, 2) - want[0] = Level3{ - Level2s: []Level2{ - {Level1: Level1{Value: "value1"}}, - {Level1: Level1{Value: "value2"}}, - }, - } - if err := DB.Create(&want[0]).Error; err != nil { - t.Error(err) - } - - want[1] = Level3{ - Level2s: []Level2{ - {Level1: Level1{Value: "value3"}}, - {Level1: Level1{Value: "value4"}}, - }, - } - if err := DB.Create(&want[1]).Error; err != nil { - t.Error(err) - } - - var got []Level3 - if err := DB.Preload("Level2s.Level1").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestNestedPreload8(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - Level2ID uint - } - Level2 struct { - ID uint - Level1s []Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2 Level2 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := make([]Level3, 2) - want[0] = Level3{ - Level2: Level2{ - Level1s: []Level1{ - {Value: "value1"}, - {Value: "value2"}, - }, - }, - } - if err := DB.Create(&want[0]).Error; err != nil { - t.Error(err) - } - want[1] = Level3{ - Level2: Level2{ - Level1s: []Level1{ - {Value: "value3"}, - {Value: "value4"}, - }, - }, - } - if err := DB.Create(&want[1]).Error; err != nil { - t.Error(err) - } - - var got []Level3 - if err := DB.Preload("Level2.Level1s").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestNestedPreload9(t *testing.T) { - type ( - Level0 struct { - ID uint - Value string - Level1ID uint - } - Level1 struct { - ID uint - Value string - Level2ID uint - Level2_1ID uint - Level0s []Level0 - } - Level2 struct { - ID uint - Level1s []Level1 - Level3ID uint - } - Level2_1 struct { - ID uint - Level1s []Level1 - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level2 Level2 - Level2_1 Level2_1 - } - ) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level2_1{}) - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists(&Level0{}) - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}, &Level2_1{}, &Level0{}).Error; err != nil { - t.Error(err) - } - - want := make([]Level3, 2) - want[0] = Level3{ - Level2: Level2{ - Level1s: []Level1{ - {Value: "value1"}, - {Value: "value2"}, - }, - }, - Level2_1: Level2_1{ - Level1s: []Level1{ - { - Value: "value1-1", - Level0s: []Level0{{Value: "Level0-1"}}, - }, - { - Value: "value2-2", - Level0s: []Level0{{Value: "Level0-2"}}, - }, - }, - }, - } - if err := DB.Create(&want[0]).Error; err != nil { - t.Error(err) - } - want[1] = Level3{ - Level2: Level2{ - Level1s: []Level1{ - {Value: "value3"}, - {Value: "value4"}, - }, - }, - Level2_1: Level2_1{ - Level1s: []Level1{ - { - Value: "value3-3", - Level0s: []Level0{}, - }, - { - Value: "value4-4", - Level0s: []Level0{}, - }, - }, - }, - } - if err := DB.Create(&want[1]).Error; err != nil { - t.Error(err) - } - - var got []Level3 - if err := DB.Preload("Level2").Preload("Level2.Level1s").Preload("Level2_1").Preload("Level2_1.Level1s").Preload("Level2_1.Level1s.Level0s").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -type LevelA1 struct { - ID uint - Value string -} - -type LevelA2 struct { - ID uint - Value string - LevelA3s []*LevelA3 -} - -type LevelA3 struct { - ID uint - Value string - LevelA1ID sql.NullInt64 - LevelA1 *LevelA1 - LevelA2ID sql.NullInt64 - LevelA2 *LevelA2 -} - -func TestNestedPreload10(t *testing.T) { - DB.DropTableIfExists(&LevelA3{}) - DB.DropTableIfExists(&LevelA2{}) - DB.DropTableIfExists(&LevelA1{}) - - if err := DB.AutoMigrate(&LevelA1{}, &LevelA2{}, &LevelA3{}).Error; err != nil { - t.Error(err) - } - - levelA1 := &LevelA1{Value: "foo"} - if err := DB.Save(levelA1).Error; err != nil { - t.Error(err) - } - - want := []*LevelA2{ - { - Value: "bar", - LevelA3s: []*LevelA3{ - { - Value: "qux", - LevelA1: levelA1, - }, - }, - }, - { - Value: "bar 2", - LevelA3s: []*LevelA3{}, - }, - } - for _, levelA2 := range want { - if err := DB.Save(levelA2).Error; err != nil { - t.Error(err) - } - } - - var got []*LevelA2 - if err := DB.Preload("LevelA3s.LevelA1").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -type LevelB1 struct { - ID uint - Value string - LevelB3s []*LevelB3 -} - -type LevelB2 struct { - ID uint - Value string -} - -type LevelB3 struct { - ID uint - Value string - LevelB1ID sql.NullInt64 - LevelB1 *LevelB1 - LevelB2s []*LevelB2 `gorm:"many2many:levelb1_levelb3_levelb2s"` -} - -func TestNestedPreload11(t *testing.T) { - DB.DropTableIfExists(&LevelB2{}) - DB.DropTableIfExists(&LevelB3{}) - DB.DropTableIfExists(&LevelB1{}) - if err := DB.AutoMigrate(&LevelB1{}, &LevelB2{}, &LevelB3{}).Error; err != nil { - t.Error(err) - } - - levelB1 := &LevelB1{Value: "foo"} - if err := DB.Create(levelB1).Error; err != nil { - t.Error(err) - } - - levelB3 := &LevelB3{ - Value: "bar", - LevelB1ID: sql.NullInt64{Valid: true, Int64: int64(levelB1.ID)}, - } - if err := DB.Create(levelB3).Error; err != nil { - t.Error(err) - } - levelB1.LevelB3s = []*LevelB3{levelB3} - - want := []*LevelB1{levelB1} - var got []*LevelB1 - if err := DB.Preload("LevelB3s.LevelB2s").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -type LevelC1 struct { - ID uint - Value string - LevelC2ID uint -} - -type LevelC2 struct { - ID uint - Value string - LevelC1 LevelC1 -} - -type LevelC3 struct { - ID uint - Value string - LevelC2ID uint - LevelC2 LevelC2 -} - -func TestNestedPreload12(t *testing.T) { - DB.DropTableIfExists(&LevelC2{}) - DB.DropTableIfExists(&LevelC3{}) - DB.DropTableIfExists(&LevelC1{}) - if err := DB.AutoMigrate(&LevelC1{}, &LevelC2{}, &LevelC3{}).Error; err != nil { - t.Error(err) - } - - level2 := LevelC2{ - Value: "c2", - LevelC1: LevelC1{ - Value: "c1", - }, - } - DB.Create(&level2) - - want := []LevelC3{ - { - Value: "c3-1", - LevelC2: level2, - }, { - Value: "c3-2", - LevelC2: level2, - }, - } - - for i := range want { - if err := DB.Create(&want[i]).Error; err != nil { - t.Error(err) - } - } - - var got []LevelC3 - if err := DB.Preload("LevelC2").Preload("LevelC2.LevelC1").Find(&got).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestManyToManyPreloadWithMultiPrimaryKeys(t *testing.T) { - if dialect := os.Getenv("GORM_DIALECT"); dialect == "" || dialect == "sqlite" || dialect == "mssql" { - return - } - - type ( - Level1 struct { - ID uint `gorm:"primary_key;"` - LanguageCode string `gorm:"primary_key"` - Value string - } - Level2 struct { - ID uint `gorm:"primary_key;"` - LanguageCode string `gorm:"primary_key"` - Value string - Level1s []Level1 `gorm:"many2many:levels;"` - } - ) - - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists("levels") - - if err := DB.AutoMigrate(&Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level2{Value: "Bob", LanguageCode: "ru", Level1s: []Level1{ - {Value: "ru", LanguageCode: "ru"}, - {Value: "en", LanguageCode: "en"}, - }} - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - - want2 := Level2{Value: "Tom", LanguageCode: "zh", Level1s: []Level1{ - {Value: "zh", LanguageCode: "zh"}, - {Value: "de", LanguageCode: "de"}, - }} - if err := DB.Save(&want2).Error; err != nil { - t.Error(err) - } - - var got Level2 - if err := DB.Preload("Level1s").Find(&got, "value = ?", "Bob").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } - - var got2 Level2 - if err := DB.Preload("Level1s").Find(&got2, "value = ?", "Tom").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got2, want2) { - t.Errorf("got %s; want %s", toJSONString(got2), toJSONString(want2)) - } - - var got3 []Level2 - if err := DB.Preload("Level1s").Find(&got3, "value IN (?)", []string{"Bob", "Tom"}).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got3, []Level2{got, got2}) { - t.Errorf("got %s; want %s", toJSONString(got3), toJSONString([]Level2{got, got2})) - } - - var got4 []Level2 - if err := DB.Preload("Level1s", "value IN (?)", []string{"zh", "ru"}).Find(&got4, "value IN (?)", []string{"Bob", "Tom"}).Error; err != nil { - t.Error(err) - } - - var ruLevel1 Level1 - var zhLevel1 Level1 - DB.First(&ruLevel1, "value = ?", "ru") - DB.First(&zhLevel1, "value = ?", "zh") - - got.Level1s = []Level1{ruLevel1} - got2.Level1s = []Level1{zhLevel1} - if !reflect.DeepEqual(got4, []Level2{got, got2}) { - t.Errorf("got %s; want %s", toJSONString(got4), toJSONString([]Level2{got, got2})) - } - - if err := DB.Preload("Level1s").Find(&got4, "value IN (?)", []string{"non-existing"}).Error; err != nil { - t.Error(err) - } -} - -func TestManyToManyPreloadForNestedPointer(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - } - Level2 struct { - ID uint - Value string - Level1s []*Level1 `gorm:"many2many:levels;"` - } - Level3 struct { - ID uint - Value string - Level2ID sql.NullInt64 - Level2 *Level2 - } - ) - - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists("levels") - - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level3{ - Value: "Bob", - Level2: &Level2{ - Value: "Foo", - Level1s: []*Level1{ - {Value: "ru"}, - {Value: "en"}, - }, - }, - } - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - - want2 := Level3{ - Value: "Tom", - Level2: &Level2{ - Value: "Bar", - Level1s: []*Level1{ - {Value: "zh"}, - {Value: "de"}, - }, - }, - } - if err := DB.Save(&want2).Error; err != nil { - t.Error(err) - } - - var got Level3 - if err := DB.Preload("Level2.Level1s").Find(&got, "value = ?", "Bob").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } - - var got2 Level3 - if err := DB.Preload("Level2.Level1s").Find(&got2, "value = ?", "Tom").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got2, want2) { - t.Errorf("got %s; want %s", toJSONString(got2), toJSONString(want2)) - } - - var got3 []Level3 - if err := DB.Preload("Level2.Level1s").Find(&got3, "value IN (?)", []string{"Bob", "Tom"}).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got3, []Level3{got, got2}) { - t.Errorf("got %s; want %s", toJSONString(got3), toJSONString([]Level3{got, got2})) - } - - var got4 []Level3 - if err := DB.Preload("Level2.Level1s", "value IN (?)", []string{"zh", "ru"}).Find(&got4, "value IN (?)", []string{"Bob", "Tom"}).Error; err != nil { - t.Error(err) - } - - var got5 Level3 - DB.Preload("Level2.Level1s").Find(&got5, "value = ?", "bogus") - - var ruLevel1 Level1 - var zhLevel1 Level1 - DB.First(&ruLevel1, "value = ?", "ru") - DB.First(&zhLevel1, "value = ?", "zh") - - got.Level2.Level1s = []*Level1{&ruLevel1} - got2.Level2.Level1s = []*Level1{&zhLevel1} - if !reflect.DeepEqual(got4, []Level3{got, got2}) { - t.Errorf("got %s; want %s", toJSONString(got4), toJSONString([]Level3{got, got2})) - } -} - -func TestNestedManyToManyPreload(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - } - Level2 struct { - ID uint - Value string - Level1s []*Level1 `gorm:"many2many:level1_level2;"` - } - Level3 struct { - ID uint - Value string - Level2s []Level2 `gorm:"many2many:level2_level3;"` - } - ) - - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists("level1_level2") - DB.DropTableIfExists("level2_level3") - - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level3{ - Value: "Level3", - Level2s: []Level2{ - { - Value: "Bob", - Level1s: []*Level1{ - {Value: "ru"}, - {Value: "en"}, - }, - }, { - Value: "Tom", - Level1s: []*Level1{ - {Value: "zh"}, - {Value: "de"}, - }, - }, - }, - } - - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - - var got Level3 - if err := DB.Preload("Level2s").Preload("Level2s.Level1s").Find(&got, "value = ?", "Level3").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } - - if err := DB.Preload("Level2s.Level1s").Find(&got, "value = ?", "not_found").Error; err != gorm.ErrRecordNotFound { - t.Error(err) - } -} - -func TestNestedManyToManyPreload2(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - } - Level2 struct { - ID uint - Value string - Level1s []*Level1 `gorm:"many2many:level1_level2;"` - } - Level3 struct { - ID uint - Value string - Level2ID sql.NullInt64 - Level2 *Level2 - } - ) - - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists("level1_level2") - - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level3{ - Value: "Level3", - Level2: &Level2{ - Value: "Bob", - Level1s: []*Level1{ - {Value: "ru"}, - {Value: "en"}, - }, - }, - } - - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - - var got Level3 - if err := DB.Preload("Level2.Level1s").Find(&got, "value = ?", "Level3").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } - - if err := DB.Preload("Level2.Level1s").Find(&got, "value = ?", "not_found").Error; err != gorm.ErrRecordNotFound { - t.Error(err) - } -} - -func TestNestedManyToManyPreload3(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - } - Level2 struct { - ID uint - Value string - Level1s []*Level1 `gorm:"many2many:level1_level2;"` - } - Level3 struct { - ID uint - Value string - Level2ID sql.NullInt64 - Level2 *Level2 - } - ) - - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists("level1_level2") - - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - level1Zh := &Level1{Value: "zh"} - level1Ru := &Level1{Value: "ru"} - level1En := &Level1{Value: "en"} - - level21 := &Level2{ - Value: "Level2-1", - Level1s: []*Level1{level1Zh, level1Ru}, - } - - level22 := &Level2{ - Value: "Level2-2", - Level1s: []*Level1{level1Zh, level1En}, - } - - wants := []*Level3{ - { - Value: "Level3-1", - Level2: level21, - }, - { - Value: "Level3-2", - Level2: level22, - }, - { - Value: "Level3-3", - Level2: level21, - }, - } - - for _, want := range wants { - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - } - - var gots []*Level3 - if err := DB.Preload("Level2.Level1s", func(db *gorm.DB) *gorm.DB { - return db.Order("level1.id ASC") - }).Find(&gots).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(gots, wants) { - t.Errorf("got %s; want %s", toJSONString(gots), toJSONString(wants)) - } -} - -func TestNestedManyToManyPreload3ForStruct(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - } - Level2 struct { - ID uint - Value string - Level1s []Level1 `gorm:"many2many:level1_level2;"` - } - Level3 struct { - ID uint - Value string - Level2ID sql.NullInt64 - Level2 Level2 - } - ) - - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists("level1_level2") - - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - level1Zh := Level1{Value: "zh"} - level1Ru := Level1{Value: "ru"} - level1En := Level1{Value: "en"} - - level21 := Level2{ - Value: "Level2-1", - Level1s: []Level1{level1Zh, level1Ru}, - } - - level22 := Level2{ - Value: "Level2-2", - Level1s: []Level1{level1Zh, level1En}, - } - - wants := []*Level3{ - { - Value: "Level3-1", - Level2: level21, - }, - { - Value: "Level3-2", - Level2: level22, - }, - { - Value: "Level3-3", - Level2: level21, - }, - } - - for _, want := range wants { - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - } - - var gots []*Level3 - if err := DB.Preload("Level2.Level1s", func(db *gorm.DB) *gorm.DB { - return db.Order("level1.id ASC") - }).Find(&gots).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(gots, wants) { - t.Errorf("got %s; want %s", toJSONString(gots), toJSONString(wants)) - } -} - -func TestNestedManyToManyPreload4(t *testing.T) { - type ( - Level4 struct { - ID uint - Value string - Level3ID uint - } - Level3 struct { - ID uint - Value string - Level4s []*Level4 - } - Level2 struct { - ID uint - Value string - Level3s []*Level3 `gorm:"many2many:level2_level3;"` - } - Level1 struct { - ID uint - Value string - Level2s []*Level2 `gorm:"many2many:level1_level2;"` - } - ) - - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level4{}) - DB.DropTableIfExists("level1_level2") - DB.DropTableIfExists("level2_level3") - - dummy := Level1{ - Value: "Level1", - Level2s: []*Level2{{ - Value: "Level2", - Level3s: []*Level3{{ - Value: "Level3", - Level4s: []*Level4{{ - Value: "Level4", - }}, - }}, - }}, - } - - if err := DB.AutoMigrate(&Level4{}, &Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - if err := DB.Save(&dummy).Error; err != nil { - t.Error(err) - } - - var level1 Level1 - if err := DB.Preload("Level2s").Preload("Level2s.Level3s").Preload("Level2s.Level3s.Level4s").First(&level1).Error; err != nil { - t.Error(err) - } -} - -func TestManyToManyPreloadForPointer(t *testing.T) { - type ( - Level1 struct { - ID uint - Value string - } - Level2 struct { - ID uint - Value string - Level1s []*Level1 `gorm:"many2many:levels;"` - } - ) - - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - DB.DropTableIfExists("levels") - - if err := DB.AutoMigrate(&Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level2{Value: "Bob", Level1s: []*Level1{ - {Value: "ru"}, - {Value: "en"}, - }} - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - - want2 := Level2{Value: "Tom", Level1s: []*Level1{ - {Value: "zh"}, - {Value: "de"}, - }} - if err := DB.Save(&want2).Error; err != nil { - t.Error(err) - } - - var got Level2 - if err := DB.Preload("Level1s").Find(&got, "value = ?", "Bob").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } - - var got2 Level2 - if err := DB.Preload("Level1s").Find(&got2, "value = ?", "Tom").Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got2, want2) { - t.Errorf("got %s; want %s", toJSONString(got2), toJSONString(want2)) - } - - var got3 []Level2 - if err := DB.Preload("Level1s").Find(&got3, "value IN (?)", []string{"Bob", "Tom"}).Error; err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got3, []Level2{got, got2}) { - t.Errorf("got %s; want %s", toJSONString(got3), toJSONString([]Level2{got, got2})) - } - - var got4 []Level2 - if err := DB.Preload("Level1s", "value IN (?)", []string{"zh", "ru"}).Find(&got4, "value IN (?)", []string{"Bob", "Tom"}).Error; err != nil { - t.Error(err) - } - - var got5 Level2 - DB.Preload("Level1s").First(&got5, "value = ?", "bogus") - - var ruLevel1 Level1 - var zhLevel1 Level1 - DB.First(&ruLevel1, "value = ?", "ru") - DB.First(&zhLevel1, "value = ?", "zh") - - got.Level1s = []*Level1{&ruLevel1} - got2.Level1s = []*Level1{&zhLevel1} - if !reflect.DeepEqual(got4, []Level2{got, got2}) { - t.Errorf("got %s; want %s", toJSONString(got4), toJSONString([]Level2{got, got2})) - } -} - -func TestNilPointerSlice(t *testing.T) { - type ( - Level3 struct { - ID uint - Value string - } - Level2 struct { - ID uint - Value string - Level3ID uint - Level3 *Level3 - } - Level1 struct { - ID uint - Value string - Level2ID uint - Level2 *Level2 - } - ) - - DB.DropTableIfExists(&Level3{}) - DB.DropTableIfExists(&Level2{}) - DB.DropTableIfExists(&Level1{}) - - if err := DB.AutoMigrate(&Level3{}, &Level2{}, &Level1{}).Error; err != nil { - t.Error(err) - } - - want := Level1{ - Value: "Bob", - Level2: &Level2{ - Value: "en", - Level3: &Level3{ - Value: "native", - }, - }, - } - if err := DB.Save(&want).Error; err != nil { - t.Error(err) - } - - want2 := Level1{ - Value: "Tom", - Level2: nil, - } - if err := DB.Save(&want2).Error; err != nil { - t.Error(err) - } - - var got []Level1 - if err := DB.Preload("Level2").Preload("Level2.Level3").Find(&got).Error; err != nil { - t.Error(err) - } - - if len(got) != 2 { - t.Errorf("got %v items, expected 2", len(got)) - } - - if !reflect.DeepEqual(got[0], want) && !reflect.DeepEqual(got[1], want) { - t.Errorf("got %s; want array containing %s", toJSONString(got), toJSONString(want)) - } - - if !reflect.DeepEqual(got[0], want2) && !reflect.DeepEqual(got[1], want2) { - t.Errorf("got %s; want array containing %s", toJSONString(got), toJSONString(want2)) - } -} - -func TestNilPointerSlice2(t *testing.T) { - type ( - Level4 struct { - ID uint - } - Level3 struct { - ID uint - Level4ID sql.NullInt64 `sql:"index"` - Level4 *Level4 - } - Level2 struct { - ID uint - Level3s []*Level3 `gorm:"many2many:level2_level3s"` - } - Level1 struct { - ID uint - Level2ID sql.NullInt64 `sql:"index"` - Level2 *Level2 - } - ) - - DB.DropTableIfExists(new(Level4)) - DB.DropTableIfExists(new(Level3)) - DB.DropTableIfExists(new(Level2)) - DB.DropTableIfExists(new(Level1)) - - if err := DB.AutoMigrate(new(Level4), new(Level3), new(Level2), new(Level1)).Error; err != nil { - t.Error(err) - } - - want := new(Level1) - if err := DB.Save(want).Error; err != nil { - t.Error(err) - } - - got := new(Level1) - err := DB.Preload("Level2.Level3s.Level4").Last(&got).Error - if err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestPrefixedPreloadDuplication(t *testing.T) { - type ( - Level4 struct { - ID uint - Name string - Level3ID uint - } - Level3 struct { - ID uint - Name string - Level4s []*Level4 - } - Level2 struct { - ID uint - Name string - Level3ID sql.NullInt64 `sql:"index"` - Level3 *Level3 - } - Level1 struct { - ID uint - Name string - Level2ID sql.NullInt64 `sql:"index"` - Level2 *Level2 - } - ) - - DB.DropTableIfExists(new(Level3)) - DB.DropTableIfExists(new(Level4)) - DB.DropTableIfExists(new(Level2)) - DB.DropTableIfExists(new(Level1)) - - if err := DB.AutoMigrate(new(Level3), new(Level4), new(Level2), new(Level1)).Error; err != nil { - t.Error(err) - } - - lvl := &Level3{} - if err := DB.Save(lvl).Error; err != nil { - t.Error(err) - } - - sublvl1 := &Level4{Level3ID: lvl.ID} - if err := DB.Save(sublvl1).Error; err != nil { - t.Error(err) - } - sublvl2 := &Level4{Level3ID: lvl.ID} - if err := DB.Save(sublvl2).Error; err != nil { - t.Error(err) - } - - lvl.Level4s = []*Level4{sublvl1, sublvl2} - - want1 := Level1{ - Level2: &Level2{ - Level3: lvl, - }, - } - if err := DB.Save(&want1).Error; err != nil { - t.Error(err) - } - - want2 := Level1{ - Level2: &Level2{ - Level3: lvl, - }, - } - if err := DB.Save(&want2).Error; err != nil { - t.Error(err) - } - - want := []Level1{want1, want2} - - var got []Level1 - err := DB.Preload("Level2.Level3.Level4s").Find(&got).Error - if err != nil { - t.Error(err) - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("got %s; want %s", toJSONString(got), toJSONString(want)) - } -} - -func TestPreloadManyToManyCallbacks(t *testing.T) { - type ( - Level2 struct { - ID uint - Name string - } - Level1 struct { - ID uint - Name string - Level2s []Level2 `gorm:"many2many:level1_level2s;AssociationForeignKey:ID;ForeignKey:ID"` - } - ) - - DB.DropTableIfExists("level1_level2s") - DB.DropTableIfExists(new(Level1)) - DB.DropTableIfExists(new(Level2)) - - if err := DB.AutoMigrate(new(Level1), new(Level2)).Error; err != nil { - t.Error(err) - } - - lvl := Level1{ - Name: "l1", - Level2s: []Level2{ - Level2{Name: "l2-1"}, Level2{Name: "l2-2"}, - }, - } - DB.Save(&lvl) - - called := 0 - - DB.Callback().Query().After("gorm:query").Register("TestPreloadManyToManyCallbacks", func(scope *gorm.Scope) { - called = called + 1 - }) - - DB.Preload("Level2s").First(&Level1{}, "id = ?", lvl.ID) - - if called != 3 { - t.Errorf("Wanted callback to be called 3 times but got %d", called) - } -} - -func toJSONString(v interface{}) []byte { - r, _ := json.MarshalIndent(v, "", " ") - return r -} diff --git a/deps/github.com/jinzhu/gorm/query_test.go b/deps/github.com/jinzhu/gorm/query_test.go deleted file mode 100644 index fac7d4d89..000000000 --- a/deps/github.com/jinzhu/gorm/query_test.go +++ /dev/null @@ -1,773 +0,0 @@ -package gorm_test - -import ( - "fmt" - "reflect" - - "github.com/jinzhu/gorm" - - "testing" - "time" -) - -func TestFirstAndLast(t *testing.T) { - DB.Save(&User{Name: "user1", Emails: []Email{{Email: "user1@example.com"}}}) - DB.Save(&User{Name: "user2", Emails: []Email{{Email: "user2@example.com"}}}) - - var user1, user2, user3, user4 User - DB.First(&user1) - DB.Order("id").Limit(1).Find(&user2) - - ptrOfUser3 := &user3 - DB.Last(&ptrOfUser3) - DB.Order("id desc").Limit(1).Find(&user4) - if user1.Id != user2.Id || user3.Id != user4.Id { - t.Errorf("First and Last should by order by primary key") - } - - var users []User - DB.First(&users) - if len(users) != 1 { - t.Errorf("Find first record as slice") - } - - var user User - if DB.Joins("left join emails on emails.user_id = users.id").First(&user).Error != nil { - t.Errorf("Should not raise any error when order with Join table") - } - - if user.Email != "" { - t.Errorf("User's Email should be blank as no one set it") - } -} - -func TestFirstAndLastWithNoStdPrimaryKey(t *testing.T) { - DB.Save(&Animal{Name: "animal1"}) - DB.Save(&Animal{Name: "animal2"}) - - var animal1, animal2, animal3, animal4 Animal - DB.First(&animal1) - DB.Order("counter").Limit(1).Find(&animal2) - - DB.Last(&animal3) - DB.Order("counter desc").Limit(1).Find(&animal4) - if animal1.Counter != animal2.Counter || animal3.Counter != animal4.Counter { - t.Errorf("First and Last should work correctly") - } -} - -func TestFirstAndLastWithRaw(t *testing.T) { - user1 := User{Name: "user", Emails: []Email{{Email: "user1@example.com"}}} - user2 := User{Name: "user", Emails: []Email{{Email: "user2@example.com"}}} - DB.Save(&user1) - DB.Save(&user2) - - var user3, user4 User - DB.Raw("select * from users WHERE name = ?", "user").First(&user3) - if user3.Id != user1.Id { - t.Errorf("Find first record with raw") - } - - DB.Raw("select * from users WHERE name = ?", "user").Last(&user4) - if user4.Id != user2.Id { - t.Errorf("Find last record with raw") - } -} - -func TestUIntPrimaryKey(t *testing.T) { - var animal Animal - DB.First(&animal, uint64(1)) - if animal.Counter != 1 { - t.Errorf("Fetch a record from with a non-int primary key should work, but failed") - } - - DB.Model(Animal{}).Where(Animal{Counter: uint64(2)}).Scan(&animal) - if animal.Counter != 2 { - t.Errorf("Fetch a record from with a non-int primary key should work, but failed") - } -} - -func TestCustomizedTypePrimaryKey(t *testing.T) { - type ID uint - type CustomizedTypePrimaryKey struct { - ID ID - Name string - } - - DB.AutoMigrate(&CustomizedTypePrimaryKey{}) - - p1 := CustomizedTypePrimaryKey{Name: "p1"} - p2 := CustomizedTypePrimaryKey{Name: "p2"} - p3 := CustomizedTypePrimaryKey{Name: "p3"} - DB.Create(&p1) - DB.Create(&p2) - DB.Create(&p3) - - var p CustomizedTypePrimaryKey - - if err := DB.First(&p, p2.ID).Error; err == nil { - t.Errorf("Should return error for invalid query condition") - } - - if err := DB.First(&p, "id = ?", p2.ID).Error; err != nil { - t.Errorf("No error should happen when querying with customized type for primary key, got err %v", err) - } - - if p.Name != "p2" { - t.Errorf("Should find correct value when querying with customized type for primary key") - } -} - -func TestStringPrimaryKeyForNumericValueStartingWithZero(t *testing.T) { - type AddressByZipCode struct { - ZipCode string `gorm:"primary_key"` - Address string - } - - DB.AutoMigrate(&AddressByZipCode{}) - DB.Create(&AddressByZipCode{ZipCode: "00501", Address: "Holtsville"}) - - var address AddressByZipCode - DB.First(&address, "00501") - if address.ZipCode != "00501" { - t.Errorf("Fetch a record from with a string primary key for a numeric value starting with zero should work, but failed, zip code is %v", address.ZipCode) - } -} - -func TestFindAsSliceOfPointers(t *testing.T) { - DB.Save(&User{Name: "user"}) - - var users []User - DB.Find(&users) - - var userPointers []*User - DB.Find(&userPointers) - - if len(users) == 0 || len(users) != len(userPointers) { - t.Errorf("Find slice of pointers") - } -} - -func TestSearchWithPlainSQL(t *testing.T) { - user1 := User{Name: "PlainSqlUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "PlainSqlUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "PlainSqlUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - scopedb := DB.Where("name LIKE ?", "%PlainSqlUser%") - - if DB.Where("name = ?", user1.Name).First(&User{}).RecordNotFound() { - t.Errorf("Search with plain SQL") - } - - if DB.Where("name LIKE ?", "%"+user1.Name+"%").First(&User{}).RecordNotFound() { - t.Errorf("Search with plan SQL (regexp)") - } - - var users []User - DB.Find(&users, "name LIKE ? and age > ?", "%PlainSqlUser%", 1) - if len(users) != 2 { - t.Errorf("Should found 2 users that age > 1, but got %v", len(users)) - } - - DB.Where("name LIKE ?", "%PlainSqlUser%").Where("age >= ?", 1).Find(&users) - if len(users) != 3 { - t.Errorf("Should found 3 users that age >= 1, but got %v", len(users)) - } - - scopedb.Where("age <> ?", 20).Find(&users) - if len(users) != 2 { - t.Errorf("Should found 2 users age != 20, but got %v", len(users)) - } - - scopedb.Where("birthday > ?", parseTime("2000-1-1")).Find(&users) - if len(users) != 2 { - t.Errorf("Should found 2 users's birthday > 2000-1-1, but got %v", len(users)) - } - - scopedb.Where("birthday > ?", "2002-10-10").Find(&users) - if len(users) != 2 { - t.Errorf("Should found 2 users's birthday >= 2002-10-10, but got %v", len(users)) - } - - scopedb.Where("birthday >= ?", "2010-1-1").Where("birthday < ?", "2020-1-1").Find(&users) - if len(users) != 1 { - t.Errorf("Should found 1 users's birthday < 2020-1-1 and >= 2010-1-1, but got %v", len(users)) - } - - DB.Where("name in (?)", []string{user1.Name, user2.Name}).Find(&users) - if len(users) != 2 { - t.Errorf("Should found 2 users, but got %v", len(users)) - } - - DB.Where("id in (?)", []int64{user1.Id, user2.Id, user3.Id}).Find(&users) - if len(users) != 3 { - t.Errorf("Should found 3 users, but got %v", len(users)) - } - - DB.Where("id in (?)", user1.Id).Find(&users) - if len(users) != 1 { - t.Errorf("Should found 1 users, but got %v", len(users)) - } - - if err := DB.Where("id IN (?)", []string{}).Find(&users).Error; err != nil { - t.Error("no error should happen when query with empty slice, but got: ", err) - } - - if err := DB.Not("id IN (?)", []string{}).Find(&users).Error; err != nil { - t.Error("no error should happen when query with empty slice, but got: ", err) - } - - if DB.Where("name = ?", "none existing").Find(&[]User{}).RecordNotFound() { - t.Errorf("Should not get RecordNotFound error when looking for none existing records") - } -} - -func TestSearchWithTwoDimensionalArray(t *testing.T) { - var users []User - user1 := User{Name: "2DSearchUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "2DSearchUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "2DSearchUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Create(&user1) - DB.Create(&user2) - DB.Create(&user3) - - if dialect := DB.Dialect().GetName(); dialect == "mysql" || dialect == "postgres" { - if err := DB.Where("(name, age) IN (?)", [][]interface{}{{"2DSearchUser1", 1}, {"2DSearchUser2", 10}}).Find(&users).Error; err != nil { - t.Errorf("No error should happen when query with 2D array, but got %v", err) - - if len(users) != 2 { - t.Errorf("Should find 2 users with 2D array, but got %v", len(users)) - } - } - } - - if dialect := DB.Dialect().GetName(); dialect == "mssql" { - if err := DB.Joins("JOIN (VALUES ?) AS x (col1, col2) ON x.col1 = name AND x.col2 = age", [][]interface{}{{"2DSearchUser1", 1}, {"2DSearchUser2", 10}}).Find(&users).Error; err != nil { - t.Errorf("No error should happen when query with 2D array, but got %v", err) - - if len(users) != 2 { - t.Errorf("Should find 2 users with 2D array, but got %v", len(users)) - } - } - } -} - -func TestSearchWithStruct(t *testing.T) { - user1 := User{Name: "StructSearchUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "StructSearchUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "StructSearchUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - - if DB.Where(user1.Id).First(&User{}).RecordNotFound() { - t.Errorf("Search with primary key") - } - - if DB.First(&User{}, user1.Id).RecordNotFound() { - t.Errorf("Search with primary key as inline condition") - } - - if DB.First(&User{}, fmt.Sprintf("%v", user1.Id)).RecordNotFound() { - t.Errorf("Search with primary key as inline condition") - } - - var users []User - DB.Where([]int64{user1.Id, user2.Id, user3.Id}).Find(&users) - if len(users) != 3 { - t.Errorf("Should found 3 users when search with primary keys, but got %v", len(users)) - } - - var user User - DB.First(&user, &User{Name: user1.Name}) - if user.Id == 0 || user.Name != user1.Name { - t.Errorf("Search first record with inline pointer of struct") - } - - DB.First(&user, User{Name: user1.Name}) - if user.Id == 0 || user.Name != user1.Name { - t.Errorf("Search first record with inline struct") - } - - DB.Where(&User{Name: user1.Name}).First(&user) - if user.Id == 0 || user.Name != user1.Name { - t.Errorf("Search first record with where struct") - } - - DB.Find(&users, &User{Name: user2.Name}) - if len(users) != 1 { - t.Errorf("Search all records with inline struct") - } -} - -func TestSearchWithMap(t *testing.T) { - companyID := 1 - user1 := User{Name: "MapSearchUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "MapSearchUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "MapSearchUser3", Age: 20, Birthday: parseTime("2020-1-1")} - user4 := User{Name: "MapSearchUser4", Age: 30, Birthday: parseTime("2020-1-1"), CompanyID: &companyID} - DB.Save(&user1).Save(&user2).Save(&user3).Save(&user4) - - var user User - DB.First(&user, map[string]interface{}{"name": user1.Name}) - if user.Id == 0 || user.Name != user1.Name { - t.Errorf("Search first record with inline map") - } - - user = User{} - DB.Where(map[string]interface{}{"name": user2.Name}).First(&user) - if user.Id == 0 || user.Name != user2.Name { - t.Errorf("Search first record with where map") - } - - var users []User - DB.Where(map[string]interface{}{"name": user3.Name}).Find(&users) - if len(users) != 1 { - t.Errorf("Search all records with inline map") - } - - DB.Find(&users, map[string]interface{}{"name": user3.Name}) - if len(users) != 1 { - t.Errorf("Search all records with inline map") - } - - DB.Find(&users, map[string]interface{}{"name": user4.Name, "company_id": nil}) - if len(users) != 0 { - t.Errorf("Search all records with inline map containing null value finding 0 records") - } - - DB.Find(&users, map[string]interface{}{"name": user1.Name, "company_id": nil}) - if len(users) != 1 { - t.Errorf("Search all records with inline map containing null value finding 1 record") - } - - DB.Find(&users, map[string]interface{}{"name": user4.Name, "company_id": companyID}) - if len(users) != 1 { - t.Errorf("Search all records with inline multiple value map") - } -} - -func TestSearchWithEmptyChain(t *testing.T) { - user1 := User{Name: "ChainSearchUser1", Age: 1, Birthday: parseTime("2000-1-1")} - user2 := User{Name: "ChainearchUser2", Age: 10, Birthday: parseTime("2010-1-1")} - user3 := User{Name: "ChainearchUser3", Age: 20, Birthday: parseTime("2020-1-1")} - DB.Save(&user1).Save(&user2).Save(&user3) - - if DB.Where("").Where("").First(&User{}).Error != nil { - t.Errorf("Should not raise any error if searching with empty strings") - } - - if DB.Where(&User{}).Where("name = ?", user1.Name).First(&User{}).Error != nil { - t.Errorf("Should not raise any error if searching with empty struct") - } - - if DB.Where(map[string]interface{}{}).Where("name = ?", user1.Name).First(&User{}).Error != nil { - t.Errorf("Should not raise any error if searching with empty map") - } -} - -func TestSelect(t *testing.T) { - user1 := User{Name: "SelectUser1"} - DB.Save(&user1) - - var user User - DB.Where("name = ?", user1.Name).Select("name").Find(&user) - if user.Id != 0 { - t.Errorf("Should not have ID because only selected name, %+v", user.Id) - } - - if user.Name != user1.Name { - t.Errorf("Should have user Name when selected it") - } -} - -func TestOrderAndPluck(t *testing.T) { - user1 := User{Name: "OrderPluckUser1", Age: 1} - user2 := User{Name: "OrderPluckUser2", Age: 10} - user3 := User{Name: "OrderPluckUser3", Age: 20} - DB.Save(&user1).Save(&user2).Save(&user3) - scopedb := DB.Model(&User{}).Where("name like ?", "%OrderPluckUser%") - - var user User - scopedb.Order(gorm.Expr("case when name = ? then 0 else 1 end", "OrderPluckUser2")).First(&user) - if user.Name != "OrderPluckUser2" { - t.Errorf("Order with sql expression") - } - - var ages []int64 - scopedb.Order("age desc").Pluck("age", &ages) - if ages[0] != 20 { - t.Errorf("The first age should be 20 when order with age desc") - } - - var ages1, ages2 []int64 - scopedb.Order("age desc").Pluck("age", &ages1).Pluck("age", &ages2) - if !reflect.DeepEqual(ages1, ages2) { - t.Errorf("The first order is the primary order") - } - - var ages3, ages4 []int64 - scopedb.Model(&User{}).Order("age desc").Pluck("age", &ages3).Order("age", true).Pluck("age", &ages4) - if reflect.DeepEqual(ages3, ages4) { - t.Errorf("Reorder should work") - } - - var names []string - var ages5 []int64 - scopedb.Model(User{}).Order("name").Order("age desc").Pluck("age", &ages5).Pluck("name", &names) - if names != nil && ages5 != nil { - if !(names[0] == user1.Name && names[1] == user2.Name && names[2] == user3.Name && ages5[2] == 20) { - t.Errorf("Order with multiple orders") - } - } else { - t.Errorf("Order with multiple orders") - } - - var ages6 []int64 - if err := scopedb.Order("").Pluck("age", &ages6).Error; err != nil { - t.Errorf("An empty string as order clause produces invalid queries") - } - - DB.Model(User{}).Select("name, age").Find(&[]User{}) -} - -func TestLimit(t *testing.T) { - user1 := User{Name: "LimitUser1", Age: 1} - user2 := User{Name: "LimitUser2", Age: 10} - user3 := User{Name: "LimitUser3", Age: 20} - user4 := User{Name: "LimitUser4", Age: 10} - user5 := User{Name: "LimitUser5", Age: 20} - DB.Save(&user1).Save(&user2).Save(&user3).Save(&user4).Save(&user5) - - var users1, users2, users3 []User - DB.Order("age desc").Limit(3).Find(&users1).Limit(5).Find(&users2).Limit(-1).Find(&users3) - - if len(users1) != 3 || len(users2) != 5 || len(users3) <= 5 { - t.Errorf("Limit should works") - } -} - -func TestOffset(t *testing.T) { - for i := 0; i < 20; i++ { - DB.Save(&User{Name: fmt.Sprintf("OffsetUser%v", i)}) - } - var users1, users2, users3, users4 []User - DB.Limit(100).Where("name like ?", "OffsetUser%").Order("age desc").Find(&users1).Offset(3).Find(&users2).Offset(5).Find(&users3).Offset(-1).Find(&users4) - - if (len(users1) != len(users4)) || (len(users1)-len(users2) != 3) || (len(users1)-len(users3) != 5) { - t.Errorf("Offset should work") - } -} - -func TestOr(t *testing.T) { - user1 := User{Name: "OrUser1", Age: 1} - user2 := User{Name: "OrUser2", Age: 10} - user3 := User{Name: "OrUser3", Age: 20} - DB.Save(&user1).Save(&user2).Save(&user3) - - var users []User - DB.Where("name = ?", user1.Name).Or("name = ?", user2.Name).Find(&users) - if len(users) != 2 { - t.Errorf("Find users with or") - } -} - -func TestCount(t *testing.T) { - user1 := User{Name: "CountUser1", Age: 1} - user2 := User{Name: "CountUser2", Age: 10} - user3 := User{Name: "CountUser3", Age: 20} - - DB.Save(&user1).Save(&user2).Save(&user3) - var count, count1, count2 int64 - var users []User - - if err := DB.Where("name = ?", user1.Name).Or("name = ?", user3.Name).Find(&users).Count(&count).Error; err != nil { - t.Errorf(fmt.Sprintf("Count should work, but got err %v", err)) - } - - if count != int64(len(users)) { - t.Errorf("Count() method should get correct value") - } - - DB.Model(&User{}).Where("name = ?", user1.Name).Count(&count1).Or("name in (?)", []string{user2.Name, user3.Name}).Count(&count2) - if count1 != 1 || count2 != 3 { - t.Errorf("Multiple count in chain") - } - - var count3 int - if err := DB.Model(&User{}).Where("name in (?)", []string{user2.Name, user2.Name, user3.Name}).Group("id").Count(&count3).Error; err != nil { - t.Errorf("Not error should happen, but got %v", err) - } - - if count3 != 2 { - t.Errorf("Should get correct count, but got %v", count3) - } -} - -func TestNot(t *testing.T) { - DB.Create(getPreparedUser("user1", "not")) - DB.Create(getPreparedUser("user2", "not")) - DB.Create(getPreparedUser("user3", "not")) - - user4 := getPreparedUser("user4", "not") - user4.Company = Company{} - DB.Create(user4) - - DB := DB.Where("role = ?", "not") - - var users1, users2, users3, users4, users5, users6, users7, users8, users9 []User - if DB.Find(&users1).RowsAffected != 4 { - t.Errorf("should find 4 not users") - } - DB.Not(users1[0].Id).Find(&users2) - - if len(users1)-len(users2) != 1 { - t.Errorf("Should ignore the first users with Not") - } - - DB.Not([]int{}).Find(&users3) - if len(users1)-len(users3) != 0 { - t.Errorf("Should find all users with a blank condition") - } - - var name3Count int64 - DB.Table("users").Where("name = ?", "user3").Count(&name3Count) - DB.Not("name", "user3").Find(&users4) - if len(users1)-len(users4) != int(name3Count) { - t.Errorf("Should find all users's name not equal 3") - } - - DB.Not("name = ?", "user3").Find(&users4) - if len(users1)-len(users4) != int(name3Count) { - t.Errorf("Should find all users's name not equal 3") - } - - DB.Not("name <> ?", "user3").Find(&users4) - if len(users4) != int(name3Count) { - t.Errorf("Should find all users's name not equal 3") - } - - DB.Not(User{Name: "user3"}).Find(&users5) - - if len(users1)-len(users5) != int(name3Count) { - t.Errorf("Should find all users's name not equal 3") - } - - DB.Not(map[string]interface{}{"name": "user3"}).Find(&users6) - if len(users1)-len(users6) != int(name3Count) { - t.Errorf("Should find all users's name not equal 3") - } - - DB.Not(map[string]interface{}{"name": "user3", "company_id": nil}).Find(&users7) - if len(users1)-len(users7) != 2 { // not user3 or user4 - t.Errorf("Should find all user's name not equal to 3 who do not have company id") - } - - DB.Not("name", []string{"user3"}).Find(&users8) - if len(users1)-len(users8) != int(name3Count) { - t.Errorf("Should find all users's name not equal 3") - } - - var name2Count int64 - DB.Table("users").Where("name = ?", "user2").Count(&name2Count) - DB.Not("name", []string{"user3", "user2"}).Find(&users9) - if len(users1)-len(users9) != (int(name3Count) + int(name2Count)) { - t.Errorf("Should find all users's name not equal 3") - } -} - -func TestFillSmallerStruct(t *testing.T) { - user1 := User{Name: "SmallerUser", Age: 100} - DB.Save(&user1) - type SimpleUser struct { - Name string - Id int64 - UpdatedAt time.Time - CreatedAt time.Time - } - - var simpleUser SimpleUser - DB.Table("users").Where("name = ?", user1.Name).First(&simpleUser) - - if simpleUser.Id == 0 || simpleUser.Name == "" { - t.Errorf("Should fill data correctly into smaller struct") - } -} - -func TestFindOrInitialize(t *testing.T) { - var user1, user2, user3, user4, user5, user6 User - DB.Where(&User{Name: "find or init", Age: 33}).FirstOrInit(&user1) - if user1.Name != "find or init" || user1.Id != 0 || user1.Age != 33 { - t.Errorf("user should be initialized with search value") - } - - DB.Where(User{Name: "find or init", Age: 33}).FirstOrInit(&user2) - if user2.Name != "find or init" || user2.Id != 0 || user2.Age != 33 { - t.Errorf("user should be initialized with search value") - } - - DB.FirstOrInit(&user3, map[string]interface{}{"name": "find or init 2"}) - if user3.Name != "find or init 2" || user3.Id != 0 { - t.Errorf("user should be initialized with inline search value") - } - - DB.Where(&User{Name: "find or init"}).Attrs(User{Age: 44}).FirstOrInit(&user4) - if user4.Name != "find or init" || user4.Id != 0 || user4.Age != 44 { - t.Errorf("user should be initialized with search value and attrs") - } - - DB.Where(&User{Name: "find or init"}).Assign("age", 44).FirstOrInit(&user4) - if user4.Name != "find or init" || user4.Id != 0 || user4.Age != 44 { - t.Errorf("user should be initialized with search value and assign attrs") - } - - DB.Save(&User{Name: "find or init", Age: 33}) - DB.Where(&User{Name: "find or init"}).Attrs("age", 44).FirstOrInit(&user5) - if user5.Name != "find or init" || user5.Id == 0 || user5.Age != 33 { - t.Errorf("user should be found and not initialized by Attrs") - } - - DB.Where(&User{Name: "find or init", Age: 33}).FirstOrInit(&user6) - if user6.Name != "find or init" || user6.Id == 0 || user6.Age != 33 { - t.Errorf("user should be found with FirstOrInit") - } - - DB.Where(&User{Name: "find or init"}).Assign(User{Age: 44}).FirstOrInit(&user6) - if user6.Name != "find or init" || user6.Id == 0 || user6.Age != 44 { - t.Errorf("user should be found and updated with assigned attrs") - } -} - -func TestFindOrCreate(t *testing.T) { - var user1, user2, user3, user4, user5, user6, user7, user8 User - DB.Where(&User{Name: "find or create", Age: 33}).FirstOrCreate(&user1) - if user1.Name != "find or create" || user1.Id == 0 || user1.Age != 33 { - t.Errorf("user should be created with search value") - } - - DB.Where(&User{Name: "find or create", Age: 33}).FirstOrCreate(&user2) - if user1.Id != user2.Id || user2.Name != "find or create" || user2.Id == 0 || user2.Age != 33 { - t.Errorf("user should be created with search value") - } - - DB.FirstOrCreate(&user3, map[string]interface{}{"name": "find or create 2"}) - if user3.Name != "find or create 2" || user3.Id == 0 { - t.Errorf("user should be created with inline search value") - } - - DB.Where(&User{Name: "find or create 3"}).Attrs("age", 44).FirstOrCreate(&user4) - if user4.Name != "find or create 3" || user4.Id == 0 || user4.Age != 44 { - t.Errorf("user should be created with search value and attrs") - } - - updatedAt1 := user4.UpdatedAt - DB.Where(&User{Name: "find or create 3"}).Assign("age", 55).FirstOrCreate(&user4) - if updatedAt1.Format(time.RFC3339Nano) == user4.UpdatedAt.Format(time.RFC3339Nano) { - t.Errorf("UpdateAt should be changed when update values with assign") - } - - DB.Where(&User{Name: "find or create 4"}).Assign(User{Age: 44}).FirstOrCreate(&user4) - if user4.Name != "find or create 4" || user4.Id == 0 || user4.Age != 44 { - t.Errorf("user should be created with search value and assigned attrs") - } - - DB.Where(&User{Name: "find or create"}).Attrs("age", 44).FirstOrInit(&user5) - if user5.Name != "find or create" || user5.Id == 0 || user5.Age != 33 { - t.Errorf("user should be found and not initialized by Attrs") - } - - DB.Where(&User{Name: "find or create"}).Assign(User{Age: 44}).FirstOrCreate(&user6) - if user6.Name != "find or create" || user6.Id == 0 || user6.Age != 44 { - t.Errorf("user should be found and updated with assigned attrs") - } - - DB.Where(&User{Name: "find or create"}).Find(&user7) - if user7.Name != "find or create" || user7.Id == 0 || user7.Age != 44 { - t.Errorf("user should be found and updated with assigned attrs") - } - - DB.Where(&User{Name: "find or create embedded struct"}).Assign(User{Age: 44, CreditCard: CreditCard{Number: "1231231231"}, Emails: []Email{{Email: "jinzhu@assign_embedded_struct.com"}, {Email: "jinzhu-2@assign_embedded_struct.com"}}}).FirstOrCreate(&user8) - if DB.Where("email = ?", "jinzhu-2@assign_embedded_struct.com").First(&Email{}).RecordNotFound() { - t.Errorf("embedded struct email should be saved") - } - - if DB.Where("email = ?", "1231231231").First(&CreditCard{}).RecordNotFound() { - t.Errorf("embedded struct credit card should be saved") - } -} - -func TestSelectWithEscapedFieldName(t *testing.T) { - user1 := User{Name: "EscapedFieldNameUser", Age: 1} - user2 := User{Name: "EscapedFieldNameUser", Age: 10} - user3 := User{Name: "EscapedFieldNameUser", Age: 20} - DB.Save(&user1).Save(&user2).Save(&user3) - - var names []string - DB.Model(User{}).Where(&User{Name: "EscapedFieldNameUser"}).Pluck("\"name\"", &names) - - if len(names) != 3 { - t.Errorf("Expected 3 name, but got: %d", len(names)) - } -} - -func TestSelectWithVariables(t *testing.T) { - DB.Save(&User{Name: "jinzhu"}) - - rows, _ := DB.Table("users").Select("? as fake", gorm.Expr("name")).Rows() - - if !rows.Next() { - t.Errorf("Should have returned at least one row") - } else { - columns, _ := rows.Columns() - if !reflect.DeepEqual(columns, []string{"fake"}) { - t.Errorf("Should only contains one column") - } - } - - rows.Close() -} - -func TestSelectWithArrayInput(t *testing.T) { - DB.Save(&User{Name: "jinzhu", Age: 42}) - - var user User - DB.Select([]string{"name", "age"}).Where("age = 42 AND name = 'jinzhu'").First(&user) - - if user.Name != "jinzhu" || user.Age != 42 { - t.Errorf("Should have selected both age and name") - } -} - -func TestPluckWithSelect(t *testing.T) { - var ( - user = User{Name: "matematik7_pluck_with_select", Age: 25} - combinedName = fmt.Sprintf("%v%v", user.Name, user.Age) - combineUserAgeSQL = fmt.Sprintf("concat(%v, %v)", DB.Dialect().Quote("name"), DB.Dialect().Quote("age")) - ) - - if dialect := DB.Dialect().GetName(); dialect == "sqlite3" { - combineUserAgeSQL = fmt.Sprintf("(%v || %v)", DB.Dialect().Quote("name"), DB.Dialect().Quote("age")) - } - - DB.Save(&user) - - selectStr := combineUserAgeSQL + " as user_age" - var userAges []string - err := DB.Model(&User{}).Where("age = ?", 25).Select(selectStr).Pluck("user_age", &userAges).Error - if err != nil { - t.Error(err) - } - - if len(userAges) != 1 || userAges[0] != combinedName { - t.Errorf("Should correctly pluck with select, got: %s", userAges) - } - - selectStr = combineUserAgeSQL + fmt.Sprintf(" as %v", DB.Dialect().Quote("user_age")) - userAges = userAges[:0] - err = DB.Model(&User{}).Where("age = ?", 25).Select(selectStr).Pluck("user_age", &userAges).Error - if err != nil { - t.Error(err) - } - - if len(userAges) != 1 || userAges[0] != combinedName { - t.Errorf("Should correctly pluck with select, got: %s", userAges) - } -} diff --git a/deps/github.com/jinzhu/gorm/scaner_test.go b/deps/github.com/jinzhu/gorm/scaner_test.go deleted file mode 100644 index 9e251dd6c..000000000 --- a/deps/github.com/jinzhu/gorm/scaner_test.go +++ /dev/null @@ -1,139 +0,0 @@ -package gorm_test - -import ( - "database/sql/driver" - "encoding/json" - "errors" - "testing" - - "github.com/jinzhu/gorm" -) - -func TestScannableSlices(t *testing.T) { - if err := DB.AutoMigrate(&RecordWithSlice{}).Error; err != nil { - t.Errorf("Should create table with slice values correctly: %s", err) - } - - r1 := RecordWithSlice{ - Strings: ExampleStringSlice{"a", "b", "c"}, - Structs: ExampleStructSlice{ - {"name1", "value1"}, - {"name2", "value2"}, - }, - } - - if err := DB.Save(&r1).Error; err != nil { - t.Errorf("Should save record with slice values") - } - - var r2 RecordWithSlice - - if err := DB.Find(&r2).Error; err != nil { - t.Errorf("Should fetch record with slice values") - } - - if len(r2.Strings) != 3 || r2.Strings[0] != "a" || r2.Strings[1] != "b" || r2.Strings[2] != "c" { - t.Errorf("Should have serialised and deserialised a string array") - } - - if len(r2.Structs) != 2 || r2.Structs[0].Name != "name1" || r2.Structs[0].Value != "value1" || r2.Structs[1].Name != "name2" || r2.Structs[1].Value != "value2" { - t.Errorf("Should have serialised and deserialised a struct array") - } -} - -type RecordWithSlice struct { - ID uint64 - Strings ExampleStringSlice `sql:"type:text"` - Structs ExampleStructSlice `sql:"type:text"` -} - -type ExampleStringSlice []string - -func (l ExampleStringSlice) Value() (driver.Value, error) { - bytes, err := json.Marshal(l) - return string(bytes), err -} - -func (l *ExampleStringSlice) Scan(input interface{}) error { - switch value := input.(type) { - case string: - return json.Unmarshal([]byte(value), l) - case []byte: - return json.Unmarshal(value, l) - default: - return errors.New("not supported") - } -} - -type ExampleStruct struct { - Name string - Value string -} - -type ExampleStructSlice []ExampleStruct - -func (l ExampleStructSlice) Value() (driver.Value, error) { - bytes, err := json.Marshal(l) - return string(bytes), err -} - -func (l *ExampleStructSlice) Scan(input interface{}) error { - switch value := input.(type) { - case string: - return json.Unmarshal([]byte(value), l) - case []byte: - return json.Unmarshal(value, l) - default: - return errors.New("not supported") - } -} - -type ScannerDataType struct { - Street string `sql:"TYPE:varchar(24)"` -} - -func (ScannerDataType) Value() (driver.Value, error) { - return nil, nil -} - -func (*ScannerDataType) Scan(input interface{}) error { - return nil -} - -type ScannerDataTypeTestStruct struct { - Field1 int - ScannerDataType *ScannerDataType `sql:"TYPE:json"` -} - -type ScannerDataType2 struct { - Street string `sql:"TYPE:varchar(24)"` -} - -func (ScannerDataType2) Value() (driver.Value, error) { - return nil, nil -} - -func (*ScannerDataType2) Scan(input interface{}) error { - return nil -} - -type ScannerDataTypeTestStruct2 struct { - Field1 int - ScannerDataType *ScannerDataType2 -} - -func TestScannerDataType(t *testing.T) { - scope := gorm.Scope{Value: &ScannerDataTypeTestStruct{}} - if field, ok := scope.FieldByName("ScannerDataType"); ok { - if DB.Dialect().DataTypeOf(field.StructField) != "json" { - t.Errorf("data type for scanner is wrong") - } - } - - scope = gorm.Scope{Value: &ScannerDataTypeTestStruct2{}} - if field, ok := scope.FieldByName("ScannerDataType"); ok { - if DB.Dialect().DataTypeOf(field.StructField) != "varchar(24)" { - t.Errorf("data type for scanner is wrong") - } - } -} diff --git a/deps/github.com/jinzhu/gorm/scope.go b/deps/github.com/jinzhu/gorm/scope.go deleted file mode 100644 index 397ccf0be..000000000 --- a/deps/github.com/jinzhu/gorm/scope.go +++ /dev/null @@ -1,1381 +0,0 @@ -package gorm - -import ( - "bytes" - "database/sql" - "database/sql/driver" - "errors" - "fmt" - "reflect" - "regexp" - "strings" - "time" -) - -// Scope contain current operation's information when you perform any operation on the database -type Scope struct { - Search *search - Value interface{} - SQL string - SQLVars []interface{} - db *DB - instanceID string - primaryKeyField *Field - skipLeft bool - fields *[]*Field - selectAttrs *[]string -} - -// IndirectValue return scope's reflect value's indirect value -func (scope *Scope) IndirectValue() reflect.Value { - return indirect(reflect.ValueOf(scope.Value)) -} - -// New create a new Scope without search information -func (scope *Scope) New(value interface{}) *Scope { - return &Scope{db: scope.NewDB(), Search: &search{}, Value: value} -} - -//////////////////////////////////////////////////////////////////////////////// -// Scope DB -//////////////////////////////////////////////////////////////////////////////// - -// DB return scope's DB connection -func (scope *Scope) DB() *DB { - return scope.db -} - -// NewDB create a new DB without search information -func (scope *Scope) NewDB() *DB { - if scope.db != nil { - db := scope.db.clone() - db.search = nil - db.Value = nil - return db - } - return nil -} - -// SQLDB return *sql.DB -func (scope *Scope) SQLDB() SQLCommon { - return scope.db.db -} - -// Dialect get dialect -func (scope *Scope) Dialect() Dialect { - return scope.db.parent.dialect -} - -// Quote used to quote string to escape them for database -func (scope *Scope) Quote(str string) string { - if strings.Index(str, ".") != -1 { - newStrs := []string{} - for _, str := range strings.Split(str, ".") { - newStrs = append(newStrs, scope.Dialect().Quote(str)) - } - return strings.Join(newStrs, ".") - } - - return scope.Dialect().Quote(str) -} - -// Err add error to Scope -func (scope *Scope) Err(err error) error { - if err != nil { - scope.db.AddError(err) - } - return err -} - -// HasError check if there are any error -func (scope *Scope) HasError() bool { - return scope.db.Error != nil -} - -// Log print log message -func (scope *Scope) Log(v ...interface{}) { - scope.db.log(v...) -} - -// SkipLeft skip remaining callbacks -func (scope *Scope) SkipLeft() { - scope.skipLeft = true -} - -// Fields get value's fields -func (scope *Scope) Fields() []*Field { - if scope.fields == nil { - var ( - fields []*Field - indirectScopeValue = scope.IndirectValue() - isStruct = indirectScopeValue.Kind() == reflect.Struct - ) - - for _, structField := range scope.GetModelStruct().StructFields { - if isStruct { - fieldValue := indirectScopeValue - for _, name := range structField.Names { - if fieldValue.Kind() == reflect.Ptr && fieldValue.IsNil() { - fieldValue.Set(reflect.New(fieldValue.Type().Elem())) - } - fieldValue = reflect.Indirect(fieldValue).FieldByName(name) - } - fields = append(fields, &Field{StructField: structField, Field: fieldValue, IsBlank: isBlank(fieldValue)}) - } else { - fields = append(fields, &Field{StructField: structField, IsBlank: true}) - } - } - scope.fields = &fields - } - - return *scope.fields -} - -// FieldByName find `gorm.Field` with field name or db name -func (scope *Scope) FieldByName(name string) (field *Field, ok bool) { - var ( - dbName = ToDBName(name) - mostMatchedField *Field - ) - - for _, field := range scope.Fields() { - if field.Name == name || field.DBName == name { - return field, true - } - if field.DBName == dbName { - mostMatchedField = field - } - } - return mostMatchedField, mostMatchedField != nil -} - -// PrimaryFields return scope's primary fields -func (scope *Scope) PrimaryFields() (fields []*Field) { - for _, field := range scope.Fields() { - if field.IsPrimaryKey { - fields = append(fields, field) - } - } - return fields -} - -// PrimaryField return scope's main primary field, if defined more that one primary fields, will return the one having column name `id` or the first one -func (scope *Scope) PrimaryField() *Field { - if primaryFields := scope.GetModelStruct().PrimaryFields; len(primaryFields) > 0 { - if len(primaryFields) > 1 { - if field, ok := scope.FieldByName("id"); ok { - return field - } - } - return scope.PrimaryFields()[0] - } - return nil -} - -// PrimaryKey get main primary field's db name -func (scope *Scope) PrimaryKey() string { - if field := scope.PrimaryField(); field != nil { - return field.DBName - } - return "" -} - -// PrimaryKeyZero check main primary field's value is blank or not -func (scope *Scope) PrimaryKeyZero() bool { - field := scope.PrimaryField() - return field == nil || field.IsBlank -} - -// PrimaryKeyValue get the primary key's value -func (scope *Scope) PrimaryKeyValue() interface{} { - if field := scope.PrimaryField(); field != nil && field.Field.IsValid() { - return field.Field.Interface() - } - return 0 -} - -// HasColumn to check if has column -func (scope *Scope) HasColumn(column string) bool { - for _, field := range scope.GetStructFields() { - if field.IsNormal && (field.Name == column || field.DBName == column) { - return true - } - } - return false -} - -// SetColumn to set the column's value, column could be field or field's name/dbname -func (scope *Scope) SetColumn(column interface{}, value interface{}) error { - var updateAttrs = map[string]interface{}{} - if attrs, ok := scope.InstanceGet("gorm:update_attrs"); ok { - updateAttrs = attrs.(map[string]interface{}) - defer scope.InstanceSet("gorm:update_attrs", updateAttrs) - } - - if field, ok := column.(*Field); ok { - updateAttrs[field.DBName] = value - return field.Set(value) - } else if name, ok := column.(string); ok { - var ( - dbName = ToDBName(name) - mostMatchedField *Field - ) - for _, field := range scope.Fields() { - if field.DBName == value { - updateAttrs[field.DBName] = value - return field.Set(value) - } - if (field.DBName == dbName) || (field.Name == name && mostMatchedField == nil) { - mostMatchedField = field - } - } - - if mostMatchedField != nil { - updateAttrs[mostMatchedField.DBName] = value - return mostMatchedField.Set(value) - } - } - return errors.New("could not convert column to field") -} - -// CallMethod call scope value's method, if it is a slice, will call its element's method one by one -func (scope *Scope) CallMethod(methodName string) { - if scope.Value == nil { - return - } - - if indirectScopeValue := scope.IndirectValue(); indirectScopeValue.Kind() == reflect.Slice { - for i := 0; i < indirectScopeValue.Len(); i++ { - scope.callMethod(methodName, indirectScopeValue.Index(i)) - } - } else { - scope.callMethod(methodName, indirectScopeValue) - } -} - -// AddToVars add value as sql's vars, used to prevent SQL injection -func (scope *Scope) AddToVars(value interface{}) string { - _, skipBindVar := scope.InstanceGet("skip_bindvar") - - if expr, ok := value.(*expr); ok { - exp := expr.expr - for _, arg := range expr.args { - if skipBindVar { - scope.AddToVars(arg) - } else { - exp = strings.Replace(exp, "?", scope.AddToVars(arg), 1) - } - } - return exp - } - - scope.SQLVars = append(scope.SQLVars, value) - - if skipBindVar { - return "?" - } - return scope.Dialect().BindVar(len(scope.SQLVars)) -} - -// SelectAttrs return selected attributes -func (scope *Scope) SelectAttrs() []string { - if scope.selectAttrs == nil { - attrs := []string{} - for _, value := range scope.Search.selects { - if str, ok := value.(string); ok { - attrs = append(attrs, str) - } else if strs, ok := value.([]string); ok { - attrs = append(attrs, strs...) - } else if strs, ok := value.([]interface{}); ok { - for _, str := range strs { - attrs = append(attrs, fmt.Sprintf("%v", str)) - } - } - } - scope.selectAttrs = &attrs - } - return *scope.selectAttrs -} - -// OmitAttrs return omitted attributes -func (scope *Scope) OmitAttrs() []string { - return scope.Search.omits -} - -type tabler interface { - TableName() string -} - -type dbTabler interface { - TableName(*DB) string -} - -// TableName return table name -func (scope *Scope) TableName() string { - if scope.Search != nil && len(scope.Search.tableName) > 0 { - return scope.Search.tableName - } - - if tabler, ok := scope.Value.(tabler); ok { - return tabler.TableName() - } - - if tabler, ok := scope.Value.(dbTabler); ok { - return tabler.TableName(scope.db) - } - - return scope.GetModelStruct().TableName(scope.db.Model(scope.Value)) -} - -// QuotedTableName return quoted table name -func (scope *Scope) QuotedTableName() (name string) { - if scope.Search != nil && len(scope.Search.tableName) > 0 { - if strings.Index(scope.Search.tableName, " ") != -1 { - return scope.Search.tableName - } - return scope.Quote(scope.Search.tableName) - } - - return scope.Quote(scope.TableName()) -} - -// CombinedConditionSql return combined condition sql -func (scope *Scope) CombinedConditionSql() string { - joinSQL := scope.joinsSQL() - whereSQL := scope.whereSQL() - if scope.Search.raw { - whereSQL = strings.TrimSuffix(strings.TrimPrefix(whereSQL, "WHERE ("), ")") - } - return joinSQL + whereSQL + scope.groupSQL() + - scope.havingSQL() + scope.orderSQL() + scope.limitAndOffsetSQL() -} - -// Raw set raw sql -func (scope *Scope) Raw(sql string) *Scope { - scope.SQL = strings.Replace(sql, "$$$", "?", -1) - return scope -} - -// Exec perform generated SQL -func (scope *Scope) Exec() *Scope { - defer scope.trace(NowFunc()) - - if !scope.HasError() { - if result, err := scope.SQLDB().Exec(scope.SQL, scope.SQLVars...); scope.Err(err) == nil { - if count, err := result.RowsAffected(); scope.Err(err) == nil { - scope.db.RowsAffected = count - } - } - } - return scope -} - -// Set set value by name -func (scope *Scope) Set(name string, value interface{}) *Scope { - scope.db.InstantSet(name, value) - return scope -} - -// Get get setting by name -func (scope *Scope) Get(name string) (interface{}, bool) { - return scope.db.Get(name) -} - -// InstanceID get InstanceID for scope -func (scope *Scope) InstanceID() string { - if scope.instanceID == "" { - scope.instanceID = fmt.Sprintf("%v%v", &scope, &scope.db) - } - return scope.instanceID -} - -// InstanceSet set instance setting for current operation, but not for operations in callbacks, like saving associations callback -func (scope *Scope) InstanceSet(name string, value interface{}) *Scope { - return scope.Set(name+scope.InstanceID(), value) -} - -// InstanceGet get instance setting from current operation -func (scope *Scope) InstanceGet(name string) (interface{}, bool) { - return scope.Get(name + scope.InstanceID()) -} - -// Begin start a transaction -func (scope *Scope) Begin() *Scope { - if db, ok := scope.SQLDB().(sqlDb); ok { - if tx, err := db.Begin(); err == nil { - scope.db.db = interface{}(tx).(SQLCommon) - scope.InstanceSet("gorm:started_transaction", true) - } - } - return scope -} - -// CommitOrRollback commit current transaction if no error happened, otherwise will rollback it -func (scope *Scope) CommitOrRollback() *Scope { - if _, ok := scope.InstanceGet("gorm:started_transaction"); ok { - if db, ok := scope.db.db.(sqlTx); ok { - if scope.HasError() { - db.Rollback() - } else { - scope.Err(db.Commit()) - } - scope.db.db = scope.db.parent.db - } - } - return scope -} - -//////////////////////////////////////////////////////////////////////////////// -// Private Methods For *gorm.Scope -//////////////////////////////////////////////////////////////////////////////// - -func (scope *Scope) callMethod(methodName string, reflectValue reflect.Value) { - // Only get address from non-pointer - if reflectValue.CanAddr() && reflectValue.Kind() != reflect.Ptr { - reflectValue = reflectValue.Addr() - } - - if methodValue := reflectValue.MethodByName(methodName); methodValue.IsValid() { - switch method := methodValue.Interface().(type) { - case func(): - method() - case func(*Scope): - method(scope) - case func(*DB): - newDB := scope.NewDB() - method(newDB) - scope.Err(newDB.Error) - case func() error: - scope.Err(method()) - case func(*Scope) error: - scope.Err(method(scope)) - case func(*DB) error: - newDB := scope.NewDB() - scope.Err(method(newDB)) - scope.Err(newDB.Error) - default: - scope.Err(fmt.Errorf("unsupported function %v", methodName)) - } - } -} - -var ( - columnRegexp = regexp.MustCompile("^[a-zA-Z\\d]+(\\.[a-zA-Z\\d]+)*$") // only match string like `name`, `users.name` - isNumberRegexp = regexp.MustCompile("^\\s*\\d+\\s*$") // match if string is number - comparisonRegexp = regexp.MustCompile("(?i) (=|<>|(>|<)(=?)|LIKE|IS|IN) ") - countingQueryRegexp = regexp.MustCompile("(?i)^count(.+)$") -) - -func (scope *Scope) quoteIfPossible(str string) string { - if columnRegexp.MatchString(str) { - return scope.Quote(str) - } - return str -} - -func (scope *Scope) scan(rows *sql.Rows, columns []string, fields []*Field) { - var ( - ignored interface{} - values = make([]interface{}, len(columns)) - selectFields []*Field - selectedColumnsMap = map[string]int{} - resetFields = map[int]*Field{} - ) - - for index, column := range columns { - values[index] = &ignored - - selectFields = fields - if idx, ok := selectedColumnsMap[column]; ok { - selectFields = selectFields[idx+1:] - } - - for fieldIndex, field := range selectFields { - if field.DBName == column { - if field.Field.Kind() == reflect.Ptr { - values[index] = field.Field.Addr().Interface() - } else { - reflectValue := reflect.New(reflect.PtrTo(field.Struct.Type)) - reflectValue.Elem().Set(field.Field.Addr()) - values[index] = reflectValue.Interface() - resetFields[index] = field - } - - selectedColumnsMap[column] = fieldIndex - - if field.IsNormal { - break - } - } - } - } - - scope.Err(rows.Scan(values...)) - - for index, field := range resetFields { - if v := reflect.ValueOf(values[index]).Elem().Elem(); v.IsValid() { - field.Field.Set(v) - } - } -} - -func (scope *Scope) primaryCondition(value interface{}) string { - return fmt.Sprintf("(%v.%v = %v)", scope.QuotedTableName(), scope.Quote(scope.PrimaryKey()), value) -} - -func (scope *Scope) buildCondition(clause map[string]interface{}, include bool) (str string) { - var ( - quotedTableName = scope.QuotedTableName() - quotedPrimaryKey = scope.Quote(scope.PrimaryKey()) - equalSQL = "=" - inSQL = "IN" - ) - - // If building not conditions - if !include { - equalSQL = "<>" - inSQL = "NOT IN" - } - - switch value := clause["query"].(type) { - case sql.NullInt64: - return fmt.Sprintf("(%v.%v %s %v)", quotedTableName, quotedPrimaryKey, equalSQL, value.Int64) - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - return fmt.Sprintf("(%v.%v %s %v)", quotedTableName, quotedPrimaryKey, equalSQL, value) - case []int, []int8, []int16, []int32, []int64, []uint, []uint8, []uint16, []uint32, []uint64, []string, []interface{}: - if !include && reflect.ValueOf(value).Len() == 0 { - return - } - str = fmt.Sprintf("(%v.%v %s (?))", quotedTableName, quotedPrimaryKey, inSQL) - clause["args"] = []interface{}{value} - case string: - if isNumberRegexp.MatchString(value) { - return fmt.Sprintf("(%v.%v %s %v)", quotedTableName, quotedPrimaryKey, equalSQL, scope.AddToVars(value)) - } - - if value != "" { - if !include { - if comparisonRegexp.MatchString(value) { - str = fmt.Sprintf("NOT (%v)", value) - } else { - str = fmt.Sprintf("(%v.%v NOT IN (?))", quotedTableName, scope.Quote(value)) - } - } else { - str = fmt.Sprintf("(%v)", value) - } - } - case map[string]interface{}: - var sqls []string - for key, value := range value { - if value != nil { - sqls = append(sqls, fmt.Sprintf("(%v.%v %s %v)", quotedTableName, scope.Quote(key), equalSQL, scope.AddToVars(value))) - } else { - if !include { - sqls = append(sqls, fmt.Sprintf("(%v.%v IS NOT NULL)", quotedTableName, scope.Quote(key))) - } else { - sqls = append(sqls, fmt.Sprintf("(%v.%v IS NULL)", quotedTableName, scope.Quote(key))) - } - } - } - return strings.Join(sqls, " AND ") - case interface{}: - var sqls []string - newScope := scope.New(value) - - if len(newScope.Fields()) == 0 { - scope.Err(fmt.Errorf("invalid query condition: %v", value)) - return - } - - for _, field := range newScope.Fields() { - if !field.IsIgnored && !field.IsBlank { - sqls = append(sqls, fmt.Sprintf("(%v.%v %s %v)", quotedTableName, scope.Quote(field.DBName), equalSQL, scope.AddToVars(field.Field.Interface()))) - } - } - return strings.Join(sqls, " AND ") - default: - scope.Err(fmt.Errorf("invalid query condition: %v", value)) - return - } - - replacements := []string{} - args := clause["args"].([]interface{}) - for _, arg := range args { - var err error - switch reflect.ValueOf(arg).Kind() { - case reflect.Slice: // For where("id in (?)", []int64{1,2}) - if scanner, ok := interface{}(arg).(driver.Valuer); ok { - arg, err = scanner.Value() - replacements = append(replacements, scope.AddToVars(arg)) - } else if b, ok := arg.([]byte); ok { - replacements = append(replacements, scope.AddToVars(b)) - } else if as, ok := arg.([][]interface{}); ok { - var tempMarks []string - for _, a := range as { - var arrayMarks []string - for _, v := range a { - arrayMarks = append(arrayMarks, scope.AddToVars(v)) - } - - if len(arrayMarks) > 0 { - tempMarks = append(tempMarks, fmt.Sprintf("(%v)", strings.Join(arrayMarks, ","))) - } - } - - if len(tempMarks) > 0 { - replacements = append(replacements, strings.Join(tempMarks, ",")) - } - } else if values := reflect.ValueOf(arg); values.Len() > 0 { - var tempMarks []string - for i := 0; i < values.Len(); i++ { - tempMarks = append(tempMarks, scope.AddToVars(values.Index(i).Interface())) - } - replacements = append(replacements, strings.Join(tempMarks, ",")) - } else { - replacements = append(replacements, scope.AddToVars(Expr("NULL"))) - } - default: - if valuer, ok := interface{}(arg).(driver.Valuer); ok { - arg, err = valuer.Value() - } - - replacements = append(replacements, scope.AddToVars(arg)) - } - - if err != nil { - scope.Err(err) - } - } - - buff := bytes.NewBuffer([]byte{}) - i := 0 - for _, s := range str { - if s == '?' && len(replacements) > i { - buff.WriteString(replacements[i]) - i++ - } else { - buff.WriteRune(s) - } - } - - str = buff.String() - - return -} - -func (scope *Scope) buildSelectQuery(clause map[string]interface{}) (str string) { - switch value := clause["query"].(type) { - case string: - str = value - case []string: - str = strings.Join(value, ", ") - } - - args := clause["args"].([]interface{}) - replacements := []string{} - for _, arg := range args { - switch reflect.ValueOf(arg).Kind() { - case reflect.Slice: - values := reflect.ValueOf(arg) - var tempMarks []string - for i := 0; i < values.Len(); i++ { - tempMarks = append(tempMarks, scope.AddToVars(values.Index(i).Interface())) - } - replacements = append(replacements, strings.Join(tempMarks, ",")) - default: - if valuer, ok := interface{}(arg).(driver.Valuer); ok { - arg, _ = valuer.Value() - } - replacements = append(replacements, scope.AddToVars(arg)) - } - } - - buff := bytes.NewBuffer([]byte{}) - i := 0 - for pos, char := range str { - if str[pos] == '?' { - buff.WriteString(replacements[i]) - i++ - } else { - buff.WriteRune(char) - } - } - - str = buff.String() - - return -} - -func (scope *Scope) whereSQL() (sql string) { - var ( - quotedTableName = scope.QuotedTableName() - deletedAtField, hasDeletedAtField = scope.FieldByName("DeletedAt") - primaryConditions, andConditions, orConditions []string - ) - - if !scope.Search.Unscoped && hasDeletedAtField { - sql := fmt.Sprintf("%v.%v IS NULL", quotedTableName, scope.Quote(deletedAtField.DBName)) - primaryConditions = append(primaryConditions, sql) - } - - if !scope.PrimaryKeyZero() { - for _, field := range scope.PrimaryFields() { - sql := fmt.Sprintf("%v.%v = %v", quotedTableName, scope.Quote(field.DBName), scope.AddToVars(field.Field.Interface())) - primaryConditions = append(primaryConditions, sql) - } - } - - for _, clause := range scope.Search.whereConditions { - if sql := scope.buildCondition(clause, true); sql != "" { - andConditions = append(andConditions, sql) - } - } - - for _, clause := range scope.Search.orConditions { - if sql := scope.buildCondition(clause, true); sql != "" { - orConditions = append(orConditions, sql) - } - } - - for _, clause := range scope.Search.notConditions { - if sql := scope.buildCondition(clause, false); sql != "" { - andConditions = append(andConditions, sql) - } - } - - orSQL := strings.Join(orConditions, " OR ") - combinedSQL := strings.Join(andConditions, " AND ") - if len(combinedSQL) > 0 { - if len(orSQL) > 0 { - combinedSQL = combinedSQL + " OR " + orSQL - } - } else { - combinedSQL = orSQL - } - - if len(primaryConditions) > 0 { - sql = "WHERE " + strings.Join(primaryConditions, " AND ") - if len(combinedSQL) > 0 { - sql = sql + " AND (" + combinedSQL + ")" - } - } else if len(combinedSQL) > 0 { - sql = "WHERE " + combinedSQL - } - return -} - -func (scope *Scope) selectSQL() string { - if len(scope.Search.selects) == 0 { - if len(scope.Search.joinConditions) > 0 { - return fmt.Sprintf("%v.*", scope.QuotedTableName()) - } - return "*" - } - return scope.buildSelectQuery(scope.Search.selects) -} - -func (scope *Scope) orderSQL() string { - if len(scope.Search.orders) == 0 || scope.Search.ignoreOrderQuery { - return "" - } - - var orders []string - for _, order := range scope.Search.orders { - if str, ok := order.(string); ok { - orders = append(orders, scope.quoteIfPossible(str)) - } else if expr, ok := order.(*expr); ok { - exp := expr.expr - for _, arg := range expr.args { - exp = strings.Replace(exp, "?", scope.AddToVars(arg), 1) - } - orders = append(orders, exp) - } - } - return " ORDER BY " + strings.Join(orders, ",") -} - -func (scope *Scope) limitAndOffsetSQL() string { - return scope.Dialect().LimitAndOffsetSQL(scope.Search.limit, scope.Search.offset) -} - -func (scope *Scope) groupSQL() string { - if len(scope.Search.group) == 0 { - return "" - } - return " GROUP BY " + scope.Search.group -} - -func (scope *Scope) havingSQL() string { - if len(scope.Search.havingConditions) == 0 { - return "" - } - - var andConditions []string - for _, clause := range scope.Search.havingConditions { - if sql := scope.buildCondition(clause, true); sql != "" { - andConditions = append(andConditions, sql) - } - } - - combinedSQL := strings.Join(andConditions, " AND ") - if len(combinedSQL) == 0 { - return "" - } - - return " HAVING " + combinedSQL -} - -func (scope *Scope) joinsSQL() string { - var joinConditions []string - for _, clause := range scope.Search.joinConditions { - if sql := scope.buildCondition(clause, true); sql != "" { - joinConditions = append(joinConditions, strings.TrimSuffix(strings.TrimPrefix(sql, "("), ")")) - } - } - - return strings.Join(joinConditions, " ") + " " -} - -func (scope *Scope) prepareQuerySQL() { - if scope.Search.raw { - scope.Raw(scope.CombinedConditionSql()) - } else { - scope.Raw(fmt.Sprintf("SELECT %v FROM %v %v", scope.selectSQL(), scope.QuotedTableName(), scope.CombinedConditionSql())) - } - return -} - -func (scope *Scope) inlineCondition(values ...interface{}) *Scope { - if len(values) > 0 { - scope.Search.Where(values[0], values[1:]...) - } - return scope -} - -func (scope *Scope) callCallbacks(funcs []*func(s *Scope)) *Scope { - for _, f := range funcs { - (*f)(scope) - if scope.skipLeft { - break - } - } - return scope -} - -func convertInterfaceToMap(values interface{}, withIgnoredField bool) map[string]interface{} { - var attrs = map[string]interface{}{} - - switch value := values.(type) { - case map[string]interface{}: - return value - case []interface{}: - for _, v := range value { - for key, value := range convertInterfaceToMap(v, withIgnoredField) { - attrs[key] = value - } - } - case interface{}: - reflectValue := reflect.ValueOf(values) - - switch reflectValue.Kind() { - case reflect.Map: - for _, key := range reflectValue.MapKeys() { - attrs[ToDBName(key.Interface().(string))] = reflectValue.MapIndex(key).Interface() - } - default: - for _, field := range (&Scope{Value: values}).Fields() { - if !field.IsBlank && (withIgnoredField || !field.IsIgnored) { - attrs[field.DBName] = field.Field.Interface() - } - } - } - } - return attrs -} - -func (scope *Scope) updatedAttrsWithValues(value interface{}) (results map[string]interface{}, hasUpdate bool) { - if scope.IndirectValue().Kind() != reflect.Struct { - return convertInterfaceToMap(value, false), true - } - - results = map[string]interface{}{} - - for key, value := range convertInterfaceToMap(value, true) { - if field, ok := scope.FieldByName(key); ok && scope.changeableField(field) { - if _, ok := value.(*expr); ok { - hasUpdate = true - results[field.DBName] = value - } else { - err := field.Set(value) - if field.IsNormal { - hasUpdate = true - if err == ErrUnaddressable { - results[field.DBName] = value - } else { - results[field.DBName] = field.Field.Interface() - } - } - } - } - } - return -} - -func (scope *Scope) row() *sql.Row { - defer scope.trace(NowFunc()) - - result := &RowQueryResult{} - scope.InstanceSet("row_query_result", result) - scope.callCallbacks(scope.db.parent.callbacks.rowQueries) - - return result.Row -} - -func (scope *Scope) rows() (*sql.Rows, error) { - defer scope.trace(NowFunc()) - - result := &RowsQueryResult{} - scope.InstanceSet("row_query_result", result) - scope.callCallbacks(scope.db.parent.callbacks.rowQueries) - - return result.Rows, result.Error -} - -func (scope *Scope) initialize() *Scope { - for _, clause := range scope.Search.whereConditions { - scope.updatedAttrsWithValues(clause["query"]) - } - scope.updatedAttrsWithValues(scope.Search.initAttrs) - scope.updatedAttrsWithValues(scope.Search.assignAttrs) - return scope -} - -func (scope *Scope) isQueryForColumn(query interface{}, column string) bool { - queryStr := strings.ToLower(fmt.Sprint(query)) - if queryStr == column { - return true - } - - if strings.HasSuffix(queryStr, "as "+column) { - return true - } - - if strings.HasSuffix(queryStr, "as "+scope.Quote(column)) { - return true - } - - return false -} - -func (scope *Scope) pluck(column string, value interface{}) *Scope { - dest := reflect.Indirect(reflect.ValueOf(value)) - if dest.Kind() != reflect.Slice { - scope.Err(fmt.Errorf("results should be a slice, not %s", dest.Kind())) - return scope - } - - if query, ok := scope.Search.selects["query"]; !ok || !scope.isQueryForColumn(query, column) { - scope.Search.Select(column) - } - - rows, err := scope.rows() - if scope.Err(err) == nil { - defer rows.Close() - for rows.Next() { - elem := reflect.New(dest.Type().Elem()).Interface() - scope.Err(rows.Scan(elem)) - dest.Set(reflect.Append(dest, reflect.ValueOf(elem).Elem())) - } - - if err := rows.Err(); err != nil { - scope.Err(err) - } - } - return scope -} - -func (scope *Scope) count(value interface{}) *Scope { - if query, ok := scope.Search.selects["query"]; !ok || !countingQueryRegexp.MatchString(fmt.Sprint(query)) { - if len(scope.Search.group) != 0 { - scope.Search.Select("count(*) FROM ( SELECT count(*) as name ") - scope.Search.group += " ) AS count_table" - } else { - scope.Search.Select("count(*)") - } - } - scope.Search.ignoreOrderQuery = true - scope.Err(scope.row().Scan(value)) - return scope -} - -func (scope *Scope) typeName() string { - typ := scope.IndirectValue().Type() - - for typ.Kind() == reflect.Slice || typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - - return typ.Name() -} - -// trace print sql log -func (scope *Scope) trace(t time.Time) { - if len(scope.SQL) > 0 { - scope.db.slog(scope.SQL, t, scope.SQLVars...) - } -} - -func (scope *Scope) changeableField(field *Field) bool { - if selectAttrs := scope.SelectAttrs(); len(selectAttrs) > 0 { - for _, attr := range selectAttrs { - if field.Name == attr || field.DBName == attr { - return true - } - } - return false - } - - for _, attr := range scope.OmitAttrs() { - if field.Name == attr || field.DBName == attr { - return false - } - } - - return true -} - -func (scope *Scope) related(value interface{}, foreignKeys ...string) *Scope { - toScope := scope.db.NewScope(value) - tx := scope.db.Set("gorm:association:source", scope.Value) - - for _, foreignKey := range append(foreignKeys, toScope.typeName()+"Id", scope.typeName()+"Id") { - fromField, _ := scope.FieldByName(foreignKey) - toField, _ := toScope.FieldByName(foreignKey) - - if fromField != nil { - if relationship := fromField.Relationship; relationship != nil { - if relationship.Kind == "many_to_many" { - joinTableHandler := relationship.JoinTableHandler - scope.Err(joinTableHandler.JoinWith(joinTableHandler, tx, scope.Value).Find(value).Error) - } else if relationship.Kind == "belongs_to" { - for idx, foreignKey := range relationship.ForeignDBNames { - if field, ok := scope.FieldByName(foreignKey); ok { - tx = tx.Where(fmt.Sprintf("%v = ?", scope.Quote(relationship.AssociationForeignDBNames[idx])), field.Field.Interface()) - } - } - scope.Err(tx.Find(value).Error) - } else if relationship.Kind == "has_many" || relationship.Kind == "has_one" { - for idx, foreignKey := range relationship.ForeignDBNames { - if field, ok := scope.FieldByName(relationship.AssociationForeignDBNames[idx]); ok { - tx = tx.Where(fmt.Sprintf("%v = ?", scope.Quote(foreignKey)), field.Field.Interface()) - } - } - - if relationship.PolymorphicType != "" { - tx = tx.Where(fmt.Sprintf("%v = ?", scope.Quote(relationship.PolymorphicDBName)), relationship.PolymorphicValue) - } - scope.Err(tx.Find(value).Error) - } - } else { - sql := fmt.Sprintf("%v = ?", scope.Quote(toScope.PrimaryKey())) - scope.Err(tx.Where(sql, fromField.Field.Interface()).Find(value).Error) - } - return scope - } else if toField != nil { - sql := fmt.Sprintf("%v = ?", scope.Quote(toField.DBName)) - scope.Err(tx.Where(sql, scope.PrimaryKeyValue()).Find(value).Error) - return scope - } - } - - scope.Err(fmt.Errorf("invalid association %v", foreignKeys)) - return scope -} - -// getTableOptions return the table options string or an empty string if the table options does not exist -func (scope *Scope) getTableOptions() string { - tableOptions, ok := scope.Get("gorm:table_options") - if !ok { - return "" - } - return " " + tableOptions.(string) -} - -func (scope *Scope) createJoinTable(field *StructField) { - if relationship := field.Relationship; relationship != nil && relationship.JoinTableHandler != nil { - joinTableHandler := relationship.JoinTableHandler - joinTable := joinTableHandler.Table(scope.db) - if !scope.Dialect().HasTable(joinTable) { - toScope := &Scope{Value: reflect.New(field.Struct.Type).Interface()} - - var sqlTypes, primaryKeys []string - for idx, fieldName := range relationship.ForeignFieldNames { - if field, ok := scope.FieldByName(fieldName); ok { - foreignKeyStruct := field.clone() - foreignKeyStruct.IsPrimaryKey = false - foreignKeyStruct.TagSettings["IS_JOINTABLE_FOREIGNKEY"] = "true" - delete(foreignKeyStruct.TagSettings, "AUTO_INCREMENT") - sqlTypes = append(sqlTypes, scope.Quote(relationship.ForeignDBNames[idx])+" "+scope.Dialect().DataTypeOf(foreignKeyStruct)) - primaryKeys = append(primaryKeys, scope.Quote(relationship.ForeignDBNames[idx])) - } - } - - for idx, fieldName := range relationship.AssociationForeignFieldNames { - if field, ok := toScope.FieldByName(fieldName); ok { - foreignKeyStruct := field.clone() - foreignKeyStruct.IsPrimaryKey = false - foreignKeyStruct.TagSettings["IS_JOINTABLE_FOREIGNKEY"] = "true" - delete(foreignKeyStruct.TagSettings, "AUTO_INCREMENT") - sqlTypes = append(sqlTypes, scope.Quote(relationship.AssociationForeignDBNames[idx])+" "+scope.Dialect().DataTypeOf(foreignKeyStruct)) - primaryKeys = append(primaryKeys, scope.Quote(relationship.AssociationForeignDBNames[idx])) - } - } - - scope.Err(scope.NewDB().Exec(fmt.Sprintf("CREATE TABLE %v (%v, PRIMARY KEY (%v))%s", scope.Quote(joinTable), strings.Join(sqlTypes, ","), strings.Join(primaryKeys, ","), scope.getTableOptions())).Error) - } - scope.NewDB().Table(joinTable).AutoMigrate(joinTableHandler) - } -} - -func (scope *Scope) createTable() *Scope { - var tags []string - var primaryKeys []string - var primaryKeyInColumnType = false - for _, field := range scope.GetModelStruct().StructFields { - if field.IsNormal { - sqlTag := scope.Dialect().DataTypeOf(field) - - // Check if the primary key constraint was specified as - // part of the column type. If so, we can only support - // one column as the primary key. - if strings.Contains(strings.ToLower(sqlTag), "primary key") { - primaryKeyInColumnType = true - } - - tags = append(tags, scope.Quote(field.DBName)+" "+sqlTag) - } - - if field.IsPrimaryKey { - primaryKeys = append(primaryKeys, scope.Quote(field.DBName)) - } - scope.createJoinTable(field) - } - - var primaryKeyStr string - if len(primaryKeys) > 0 && !primaryKeyInColumnType { - primaryKeyStr = fmt.Sprintf(", PRIMARY KEY (%v)", strings.Join(primaryKeys, ",")) - } - - scope.Raw(fmt.Sprintf("CREATE TABLE %v (%v %v)%s", scope.QuotedTableName(), strings.Join(tags, ","), primaryKeyStr, scope.getTableOptions())).Exec() - - scope.autoIndex() - return scope -} - -func (scope *Scope) dropTable() *Scope { - scope.Raw(fmt.Sprintf("DROP TABLE %v%s", scope.QuotedTableName(), scope.getTableOptions())).Exec() - return scope -} - -func (scope *Scope) modifyColumn(column string, typ string) { - scope.db.AddError(scope.Dialect().ModifyColumn(scope.QuotedTableName(), scope.Quote(column), typ)) -} - -func (scope *Scope) dropColumn(column string) { - scope.Raw(fmt.Sprintf("ALTER TABLE %v DROP COLUMN %v", scope.QuotedTableName(), scope.Quote(column))).Exec() -} - -func (scope *Scope) addIndex(unique bool, indexName string, column ...string) { - if scope.Dialect().HasIndex(scope.TableName(), indexName) { - return - } - - var columns []string - for _, name := range column { - columns = append(columns, scope.quoteIfPossible(name)) - } - - sqlCreate := "CREATE INDEX" - if unique { - sqlCreate = "CREATE UNIQUE INDEX" - } - - scope.Raw(fmt.Sprintf("%s %v ON %v(%v) %v", sqlCreate, indexName, scope.QuotedTableName(), strings.Join(columns, ", "), scope.whereSQL())).Exec() -} - -func (scope *Scope) addForeignKey(field string, dest string, onDelete string, onUpdate string) { - // Compatible with old generated key - keyName := scope.Dialect().BuildKeyName(scope.TableName(), field, dest, "foreign") - - if scope.Dialect().HasForeignKey(scope.TableName(), keyName) { - return - } - var query = `ALTER TABLE %s ADD CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s ON DELETE %s ON UPDATE %s;` - scope.Raw(fmt.Sprintf(query, scope.QuotedTableName(), scope.quoteIfPossible(keyName), scope.quoteIfPossible(field), dest, onDelete, onUpdate)).Exec() -} - -func (scope *Scope) removeForeignKey(field string, dest string) { - keyName := scope.Dialect().BuildKeyName(scope.TableName(), field, dest, "foreign") - - if !scope.Dialect().HasForeignKey(scope.TableName(), keyName) { - return - } - var query = `ALTER TABLE %s DROP CONSTRAINT %s;` - scope.Raw(fmt.Sprintf(query, scope.QuotedTableName(), scope.quoteIfPossible(keyName))).Exec() -} - -func (scope *Scope) removeIndex(indexName string) { - scope.Dialect().RemoveIndex(scope.TableName(), indexName) -} - -func (scope *Scope) autoMigrate() *Scope { - tableName := scope.TableName() - quotedTableName := scope.QuotedTableName() - - if !scope.Dialect().HasTable(tableName) { - scope.createTable() - } else { - for _, field := range scope.GetModelStruct().StructFields { - if !scope.Dialect().HasColumn(tableName, field.DBName) { - if field.IsNormal { - sqlTag := scope.Dialect().DataTypeOf(field) - scope.Raw(fmt.Sprintf("ALTER TABLE %v ADD %v %v;", quotedTableName, scope.Quote(field.DBName), sqlTag)).Exec() - } - } - scope.createJoinTable(field) - } - scope.autoIndex() - } - return scope -} - -func (scope *Scope) autoIndex() *Scope { - var indexes = map[string][]string{} - var uniqueIndexes = map[string][]string{} - - for _, field := range scope.GetStructFields() { - if name, ok := field.TagSettings["INDEX"]; ok { - names := strings.Split(name, ",") - - for _, name := range names { - if name == "INDEX" || name == "" { - name = scope.Dialect().BuildKeyName("idx", scope.TableName(), field.DBName) - } - indexes[name] = append(indexes[name], field.DBName) - } - } - - if name, ok := field.TagSettings["UNIQUE_INDEX"]; ok { - names := strings.Split(name, ",") - - for _, name := range names { - if name == "UNIQUE_INDEX" || name == "" { - name = scope.Dialect().BuildKeyName("uix", scope.TableName(), field.DBName) - } - uniqueIndexes[name] = append(uniqueIndexes[name], field.DBName) - } - } - } - - for name, columns := range indexes { - if db := scope.NewDB().Table(scope.TableName()).Model(scope.Value).AddIndex(name, columns...); db.Error != nil { - scope.db.AddError(db.Error) - } - } - - for name, columns := range uniqueIndexes { - if db := scope.NewDB().Table(scope.TableName()).Model(scope.Value).AddUniqueIndex(name, columns...); db.Error != nil { - scope.db.AddError(db.Error) - } - } - - return scope -} - -func (scope *Scope) getColumnAsArray(columns []string, values ...interface{}) (results [][]interface{}) { - for _, value := range values { - indirectValue := indirect(reflect.ValueOf(value)) - - switch indirectValue.Kind() { - case reflect.Slice: - for i := 0; i < indirectValue.Len(); i++ { - var result []interface{} - var object = indirect(indirectValue.Index(i)) - var hasValue = false - for _, column := range columns { - field := object.FieldByName(column) - if hasValue || !isBlank(field) { - hasValue = true - } - result = append(result, field.Interface()) - } - - if hasValue { - results = append(results, result) - } - } - case reflect.Struct: - var result []interface{} - var hasValue = false - for _, column := range columns { - field := indirectValue.FieldByName(column) - if hasValue || !isBlank(field) { - hasValue = true - } - result = append(result, field.Interface()) - } - - if hasValue { - results = append(results, result) - } - } - } - - return -} - -func (scope *Scope) getColumnAsScope(column string) *Scope { - indirectScopeValue := scope.IndirectValue() - - switch indirectScopeValue.Kind() { - case reflect.Slice: - if fieldStruct, ok := scope.GetModelStruct().ModelType.FieldByName(column); ok { - fieldType := fieldStruct.Type - if fieldType.Kind() == reflect.Slice || fieldType.Kind() == reflect.Ptr { - fieldType = fieldType.Elem() - } - - resultsMap := map[interface{}]bool{} - results := reflect.New(reflect.SliceOf(reflect.PtrTo(fieldType))).Elem() - - for i := 0; i < indirectScopeValue.Len(); i++ { - result := indirect(indirect(indirectScopeValue.Index(i)).FieldByName(column)) - - if result.Kind() == reflect.Slice { - for j := 0; j < result.Len(); j++ { - if elem := result.Index(j); elem.CanAddr() && resultsMap[elem.Addr()] != true { - resultsMap[elem.Addr()] = true - results = reflect.Append(results, elem.Addr()) - } - } - } else if result.CanAddr() && resultsMap[result.Addr()] != true { - resultsMap[result.Addr()] = true - results = reflect.Append(results, result.Addr()) - } - } - return scope.New(results.Interface()) - } - case reflect.Struct: - if field := indirectScopeValue.FieldByName(column); field.CanAddr() { - return scope.New(field.Addr().Interface()) - } - } - return nil -} - -func (scope *Scope) hasConditions() bool { - return !scope.PrimaryKeyZero() || - len(scope.Search.whereConditions) > 0 || - len(scope.Search.orConditions) > 0 || - len(scope.Search.notConditions) > 0 -} diff --git a/deps/github.com/jinzhu/gorm/scope_test.go b/deps/github.com/jinzhu/gorm/scope_test.go deleted file mode 100644 index 3018f3509..000000000 --- a/deps/github.com/jinzhu/gorm/scope_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package gorm_test - -import ( - "encoding/hex" - "math/rand" - "strings" - "testing" - - "github.com/jinzhu/gorm" -) - -func NameIn1And2(d *gorm.DB) *gorm.DB { - return d.Where("name in (?)", []string{"ScopeUser1", "ScopeUser2"}) -} - -func NameIn2And3(d *gorm.DB) *gorm.DB { - return d.Where("name in (?)", []string{"ScopeUser2", "ScopeUser3"}) -} - -func NameIn(names []string) func(d *gorm.DB) *gorm.DB { - return func(d *gorm.DB) *gorm.DB { - return d.Where("name in (?)", names) - } -} - -func TestScopes(t *testing.T) { - user1 := User{Name: "ScopeUser1", Age: 1} - user2 := User{Name: "ScopeUser2", Age: 1} - user3 := User{Name: "ScopeUser3", Age: 2} - DB.Save(&user1).Save(&user2).Save(&user3) - - var users1, users2, users3 []User - DB.Scopes(NameIn1And2).Find(&users1) - if len(users1) != 2 { - t.Errorf("Should found two users's name in 1, 2") - } - - DB.Scopes(NameIn1And2, NameIn2And3).Find(&users2) - if len(users2) != 1 { - t.Errorf("Should found one user's name is 2") - } - - DB.Scopes(NameIn([]string{user1.Name, user3.Name})).Find(&users3) - if len(users3) != 2 { - t.Errorf("Should found two users's name in 1, 3") - } -} - -func randName() string { - data := make([]byte, 8) - rand.Read(data) - - return "n-" + hex.EncodeToString(data) -} - -func TestValuer(t *testing.T) { - name := randName() - - origUser := User{Name: name, Age: 1, Password: EncryptedData("pass1"), PasswordHash: []byte("abc")} - if err := DB.Save(&origUser).Error; err != nil { - t.Errorf("No error should happen when saving user, but got %v", err) - } - - var user2 User - if err := DB.Where("name = ? AND password = ? AND password_hash = ?", name, EncryptedData("pass1"), []byte("abc")).First(&user2).Error; err != nil { - t.Errorf("No error should happen when querying user with valuer, but got %v", err) - } -} - -func TestFailedValuer(t *testing.T) { - name := randName() - - err := DB.Exec("INSERT INTO users(name, password) VALUES(?, ?)", name, EncryptedData("xpass1")).Error - - if err == nil { - t.Errorf("There should be an error should happen when insert data") - } else if !strings.HasPrefix(err.Error(), "Should not start with") { - t.Errorf("The error should be returned from Valuer, but get %v", err) - } -} diff --git a/deps/github.com/jinzhu/gorm/search.go b/deps/github.com/jinzhu/gorm/search.go deleted file mode 100644 index 901385956..000000000 --- a/deps/github.com/jinzhu/gorm/search.go +++ /dev/null @@ -1,153 +0,0 @@ -package gorm - -import ( - "fmt" -) - -type search struct { - db *DB - whereConditions []map[string]interface{} - orConditions []map[string]interface{} - notConditions []map[string]interface{} - havingConditions []map[string]interface{} - joinConditions []map[string]interface{} - initAttrs []interface{} - assignAttrs []interface{} - selects map[string]interface{} - omits []string - orders []interface{} - preload []searchPreload - offset interface{} - limit interface{} - group string - tableName string - raw bool - Unscoped bool - ignoreOrderQuery bool -} - -type searchPreload struct { - schema string - conditions []interface{} -} - -func (s *search) clone() *search { - clone := *s - return &clone -} - -func (s *search) Where(query interface{}, values ...interface{}) *search { - s.whereConditions = append(s.whereConditions, map[string]interface{}{"query": query, "args": values}) - return s -} - -func (s *search) Not(query interface{}, values ...interface{}) *search { - s.notConditions = append(s.notConditions, map[string]interface{}{"query": query, "args": values}) - return s -} - -func (s *search) Or(query interface{}, values ...interface{}) *search { - s.orConditions = append(s.orConditions, map[string]interface{}{"query": query, "args": values}) - return s -} - -func (s *search) Attrs(attrs ...interface{}) *search { - s.initAttrs = append(s.initAttrs, toSearchableMap(attrs...)) - return s -} - -func (s *search) Assign(attrs ...interface{}) *search { - s.assignAttrs = append(s.assignAttrs, toSearchableMap(attrs...)) - return s -} - -func (s *search) Order(value interface{}, reorder ...bool) *search { - if len(reorder) > 0 && reorder[0] { - s.orders = []interface{}{} - } - - if value != nil && value != "" { - s.orders = append(s.orders, value) - } - return s -} - -func (s *search) Select(query interface{}, args ...interface{}) *search { - s.selects = map[string]interface{}{"query": query, "args": args} - return s -} - -func (s *search) Omit(columns ...string) *search { - s.omits = columns - return s -} - -func (s *search) Limit(limit interface{}) *search { - s.limit = limit - return s -} - -func (s *search) Offset(offset interface{}) *search { - s.offset = offset - return s -} - -func (s *search) Group(query string) *search { - s.group = s.getInterfaceAsSQL(query) - return s -} - -func (s *search) Having(query interface{}, values ...interface{}) *search { - if val, ok := query.(*expr); ok { - s.havingConditions = append(s.havingConditions, map[string]interface{}{"query": val.expr, "args": val.args}) - } else { - s.havingConditions = append(s.havingConditions, map[string]interface{}{"query": query, "args": values}) - } - return s -} - -func (s *search) Joins(query string, values ...interface{}) *search { - s.joinConditions = append(s.joinConditions, map[string]interface{}{"query": query, "args": values}) - return s -} - -func (s *search) Preload(schema string, values ...interface{}) *search { - var preloads []searchPreload - for _, preload := range s.preload { - if preload.schema != schema { - preloads = append(preloads, preload) - } - } - preloads = append(preloads, searchPreload{schema, values}) - s.preload = preloads - return s -} - -func (s *search) Raw(b bool) *search { - s.raw = b - return s -} - -func (s *search) unscoped() *search { - s.Unscoped = true - return s -} - -func (s *search) Table(name string) *search { - s.tableName = name - return s -} - -func (s *search) getInterfaceAsSQL(value interface{}) (str string) { - switch value.(type) { - case string, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - str = fmt.Sprintf("%v", value) - default: - s.db.AddError(ErrInvalidSQL) - } - - if str == "-1" { - return "" - } - return -} diff --git a/deps/github.com/jinzhu/gorm/search_test.go b/deps/github.com/jinzhu/gorm/search_test.go deleted file mode 100644 index 4db7ab6a5..000000000 --- a/deps/github.com/jinzhu/gorm/search_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package gorm - -import ( - "reflect" - "testing" -) - -func TestCloneSearch(t *testing.T) { - s := new(search) - s.Where("name = ?", "jinzhu").Order("name").Attrs("name", "jinzhu").Select("name, age") - - s1 := s.clone() - s1.Where("age = ?", 20).Order("age").Attrs("email", "a@e.org").Select("email") - - if reflect.DeepEqual(s.whereConditions, s1.whereConditions) { - t.Errorf("Where should be copied") - } - - if reflect.DeepEqual(s.orders, s1.orders) { - t.Errorf("Order should be copied") - } - - if reflect.DeepEqual(s.initAttrs, s1.initAttrs) { - t.Errorf("InitAttrs should be copied") - } - - if reflect.DeepEqual(s.Select, s1.Select) { - t.Errorf("selectStr should be copied") - } -} diff --git a/deps/github.com/jinzhu/gorm/test_all.sh b/deps/github.com/jinzhu/gorm/test_all.sh deleted file mode 100755 index 5cfb3321a..000000000 --- a/deps/github.com/jinzhu/gorm/test_all.sh +++ /dev/null @@ -1,5 +0,0 @@ -dialects=("postgres" "mysql" "mssql" "sqlite") - -for dialect in "${dialects[@]}" ; do - DEBUG=false GORM_DIALECT=${dialect} go test -done diff --git a/deps/github.com/jinzhu/gorm/update_test.go b/deps/github.com/jinzhu/gorm/update_test.go deleted file mode 100644 index 85d53e5f0..000000000 --- a/deps/github.com/jinzhu/gorm/update_test.go +++ /dev/null @@ -1,465 +0,0 @@ -package gorm_test - -import ( - "testing" - "time" - - "github.com/jinzhu/gorm" -) - -func TestUpdate(t *testing.T) { - product1 := Product{Code: "product1code"} - product2 := Product{Code: "product2code"} - - DB.Save(&product1).Save(&product2).Update("code", "product2newcode") - - if product2.Code != "product2newcode" { - t.Errorf("Record should be updated") - } - - DB.First(&product1, product1.Id) - DB.First(&product2, product2.Id) - updatedAt1 := product1.UpdatedAt - - if DB.First(&Product{}, "code = ?", product1.Code).RecordNotFound() { - t.Errorf("Product1 should not be updated") - } - - if !DB.First(&Product{}, "code = ?", "product2code").RecordNotFound() { - t.Errorf("Product2's code should be updated") - } - - if DB.First(&Product{}, "code = ?", "product2newcode").RecordNotFound() { - t.Errorf("Product2's code should be updated") - } - - DB.Table("products").Where("code in (?)", []string{"product1code"}).Update("code", "product1newcode") - - var product4 Product - DB.First(&product4, product1.Id) - if updatedAt1.Format(time.RFC3339Nano) != product4.UpdatedAt.Format(time.RFC3339Nano) { - t.Errorf("updatedAt should be updated if something changed") - } - - if !DB.First(&Product{}, "code = 'product1code'").RecordNotFound() { - t.Errorf("Product1's code should be updated") - } - - if DB.First(&Product{}, "code = 'product1newcode'").RecordNotFound() { - t.Errorf("Product should not be changed to 789") - } - - if DB.Model(product2).Update("CreatedAt", time.Now().Add(time.Hour)).Error != nil { - t.Error("No error should raise when update with CamelCase") - } - - if DB.Model(&product2).UpdateColumn("CreatedAt", time.Now().Add(time.Hour)).Error != nil { - t.Error("No error should raise when update_column with CamelCase") - } - - var products []Product - DB.Find(&products) - if count := DB.Model(Product{}).Update("CreatedAt", time.Now().Add(2*time.Hour)).RowsAffected; count != int64(len(products)) { - t.Error("RowsAffected should be correct when do batch update") - } - - DB.First(&product4, product4.Id) - updatedAt4 := product4.UpdatedAt - DB.Model(&product4).Update("price", gorm.Expr("price + ? - ?", 100, 50)) - var product5 Product - DB.First(&product5, product4.Id) - if product5.Price != product4.Price+100-50 { - t.Errorf("Update with expression") - } - if product4.UpdatedAt.Format(time.RFC3339Nano) == updatedAt4.Format(time.RFC3339Nano) { - t.Errorf("Update with expression should update UpdatedAt") - } -} - -func TestUpdateWithNoStdPrimaryKeyAndDefaultValues(t *testing.T) { - animal := Animal{Name: "Ferdinand"} - DB.Save(&animal) - updatedAt1 := animal.UpdatedAt - - DB.Save(&animal).Update("name", "Francis") - - if updatedAt1.Format(time.RFC3339Nano) == animal.UpdatedAt.Format(time.RFC3339Nano) { - t.Errorf("updatedAt should not be updated if nothing changed") - } - - var animals []Animal - DB.Find(&animals) - if count := DB.Model(Animal{}).Update("CreatedAt", time.Now().Add(2*time.Hour)).RowsAffected; count != int64(len(animals)) { - t.Error("RowsAffected should be correct when do batch update") - } - - animal = Animal{From: "somewhere"} // No name fields, should be filled with the default value (galeone) - DB.Save(&animal).Update("From", "a nice place") // The name field shoul be untouched - DB.First(&animal, animal.Counter) - if animal.Name != "galeone" { - t.Errorf("Name fields shouldn't be changed if untouched, but got %v", animal.Name) - } - - // When changing a field with a default value, the change must occur - animal.Name = "amazing horse" - DB.Save(&animal) - DB.First(&animal, animal.Counter) - if animal.Name != "amazing horse" { - t.Errorf("Update a filed with a default value should occur. But got %v\n", animal.Name) - } - - // When changing a field with a default value with blank value - animal.Name = "" - DB.Save(&animal) - DB.First(&animal, animal.Counter) - if animal.Name != "" { - t.Errorf("Update a filed to blank with a default value should occur. But got %v\n", animal.Name) - } -} - -func TestUpdates(t *testing.T) { - product1 := Product{Code: "product1code", Price: 10} - product2 := Product{Code: "product2code", Price: 10} - DB.Save(&product1).Save(&product2) - DB.Model(&product1).Updates(map[string]interface{}{"code": "product1newcode", "price": 100}) - if product1.Code != "product1newcode" || product1.Price != 100 { - t.Errorf("Record should be updated also with map") - } - - DB.First(&product1, product1.Id) - DB.First(&product2, product2.Id) - updatedAt2 := product2.UpdatedAt - - if DB.First(&Product{}, "code = ? and price = ?", product2.Code, product2.Price).RecordNotFound() { - t.Errorf("Product2 should not be updated") - } - - if DB.First(&Product{}, "code = ?", "product1newcode").RecordNotFound() { - t.Errorf("Product1 should be updated") - } - - DB.Table("products").Where("code in (?)", []string{"product2code"}).Updates(Product{Code: "product2newcode"}) - if !DB.First(&Product{}, "code = 'product2code'").RecordNotFound() { - t.Errorf("Product2's code should be updated") - } - - var product4 Product - DB.First(&product4, product2.Id) - if updatedAt2.Format(time.RFC3339Nano) != product4.UpdatedAt.Format(time.RFC3339Nano) { - t.Errorf("updatedAt should be updated if something changed") - } - - if DB.First(&Product{}, "code = ?", "product2newcode").RecordNotFound() { - t.Errorf("product2's code should be updated") - } - - updatedAt4 := product4.UpdatedAt - DB.Model(&product4).Updates(map[string]interface{}{"price": gorm.Expr("price + ?", 100)}) - var product5 Product - DB.First(&product5, product4.Id) - if product5.Price != product4.Price+100 { - t.Errorf("Updates with expression") - } - // product4's UpdatedAt will be reset when updating - if product4.UpdatedAt.Format(time.RFC3339Nano) == updatedAt4.Format(time.RFC3339Nano) { - t.Errorf("Updates with expression should update UpdatedAt") - } -} - -func TestUpdateColumn(t *testing.T) { - product1 := Product{Code: "product1code", Price: 10} - product2 := Product{Code: "product2code", Price: 20} - DB.Save(&product1).Save(&product2).UpdateColumn(map[string]interface{}{"code": "product2newcode", "price": 100}) - if product2.Code != "product2newcode" || product2.Price != 100 { - t.Errorf("product 2 should be updated with update column") - } - - var product3 Product - DB.First(&product3, product1.Id) - if product3.Code != "product1code" || product3.Price != 10 { - t.Errorf("product 1 should not be updated") - } - - DB.First(&product2, product2.Id) - updatedAt2 := product2.UpdatedAt - DB.Model(product2).UpdateColumn("code", "update_column_new") - var product4 Product - DB.First(&product4, product2.Id) - if updatedAt2.Format(time.RFC3339Nano) != product4.UpdatedAt.Format(time.RFC3339Nano) { - t.Errorf("updatedAt should not be updated with update column") - } - - DB.Model(&product4).UpdateColumn("price", gorm.Expr("price + 100 - 50")) - var product5 Product - DB.First(&product5, product4.Id) - if product5.Price != product4.Price+100-50 { - t.Errorf("UpdateColumn with expression") - } - if product5.UpdatedAt.Format(time.RFC3339Nano) != product4.UpdatedAt.Format(time.RFC3339Nano) { - t.Errorf("UpdateColumn with expression should not update UpdatedAt") - } -} - -func TestSelectWithUpdate(t *testing.T) { - user := getPreparedUser("select_user", "select_with_update") - DB.Create(user) - - var reloadUser User - DB.First(&reloadUser, user.Id) - reloadUser.Name = "new_name" - reloadUser.Age = 50 - reloadUser.BillingAddress = Address{Address1: "New Billing Address"} - reloadUser.ShippingAddress = Address{Address1: "New ShippingAddress Address"} - reloadUser.CreditCard = CreditCard{Number: "987654321"} - reloadUser.Emails = []Email{ - {Email: "new_user_1@example1.com"}, {Email: "new_user_2@example2.com"}, {Email: "new_user_3@example2.com"}, - } - reloadUser.Company = Company{Name: "new company"} - - DB.Select("Name", "BillingAddress", "CreditCard", "Company", "Emails").Save(&reloadUser) - - var queryUser User - DB.Preload("BillingAddress").Preload("ShippingAddress"). - Preload("CreditCard").Preload("Emails").Preload("Company").First(&queryUser, user.Id) - - if queryUser.Name == user.Name || queryUser.Age != user.Age { - t.Errorf("Should only update users with name column") - } - - if queryUser.BillingAddressID.Int64 == user.BillingAddressID.Int64 || - queryUser.ShippingAddressId != user.ShippingAddressId || - queryUser.CreditCard.ID == user.CreditCard.ID || - len(queryUser.Emails) == len(user.Emails) || queryUser.Company.Id == user.Company.Id { - t.Errorf("Should only update selected relationships") - } -} - -func TestSelectWithUpdateWithMap(t *testing.T) { - user := getPreparedUser("select_user", "select_with_update_map") - DB.Create(user) - - updateValues := map[string]interface{}{ - "Name": "new_name", - "Age": 50, - "BillingAddress": Address{Address1: "New Billing Address"}, - "ShippingAddress": Address{Address1: "New ShippingAddress Address"}, - "CreditCard": CreditCard{Number: "987654321"}, - "Emails": []Email{ - {Email: "new_user_1@example1.com"}, {Email: "new_user_2@example2.com"}, {Email: "new_user_3@example2.com"}, - }, - "Company": Company{Name: "new company"}, - } - - var reloadUser User - DB.First(&reloadUser, user.Id) - DB.Model(&reloadUser).Select("Name", "BillingAddress", "CreditCard", "Company", "Emails").Update(updateValues) - - var queryUser User - DB.Preload("BillingAddress").Preload("ShippingAddress"). - Preload("CreditCard").Preload("Emails").Preload("Company").First(&queryUser, user.Id) - - if queryUser.Name == user.Name || queryUser.Age != user.Age { - t.Errorf("Should only update users with name column") - } - - if queryUser.BillingAddressID.Int64 == user.BillingAddressID.Int64 || - queryUser.ShippingAddressId != user.ShippingAddressId || - queryUser.CreditCard.ID == user.CreditCard.ID || - len(queryUser.Emails) == len(user.Emails) || queryUser.Company.Id == user.Company.Id { - t.Errorf("Should only update selected relationships") - } -} - -func TestOmitWithUpdate(t *testing.T) { - user := getPreparedUser("omit_user", "omit_with_update") - DB.Create(user) - - var reloadUser User - DB.First(&reloadUser, user.Id) - reloadUser.Name = "new_name" - reloadUser.Age = 50 - reloadUser.BillingAddress = Address{Address1: "New Billing Address"} - reloadUser.ShippingAddress = Address{Address1: "New ShippingAddress Address"} - reloadUser.CreditCard = CreditCard{Number: "987654321"} - reloadUser.Emails = []Email{ - {Email: "new_user_1@example1.com"}, {Email: "new_user_2@example2.com"}, {Email: "new_user_3@example2.com"}, - } - reloadUser.Company = Company{Name: "new company"} - - DB.Omit("Name", "BillingAddress", "CreditCard", "Company", "Emails").Save(&reloadUser) - - var queryUser User - DB.Preload("BillingAddress").Preload("ShippingAddress"). - Preload("CreditCard").Preload("Emails").Preload("Company").First(&queryUser, user.Id) - - if queryUser.Name != user.Name || queryUser.Age == user.Age { - t.Errorf("Should only update users with name column") - } - - if queryUser.BillingAddressID.Int64 != user.BillingAddressID.Int64 || - queryUser.ShippingAddressId == user.ShippingAddressId || - queryUser.CreditCard.ID != user.CreditCard.ID || - len(queryUser.Emails) != len(user.Emails) || queryUser.Company.Id != user.Company.Id { - t.Errorf("Should only update relationships that not omitted") - } -} - -func TestOmitWithUpdateWithMap(t *testing.T) { - user := getPreparedUser("select_user", "select_with_update_map") - DB.Create(user) - - updateValues := map[string]interface{}{ - "Name": "new_name", - "Age": 50, - "BillingAddress": Address{Address1: "New Billing Address"}, - "ShippingAddress": Address{Address1: "New ShippingAddress Address"}, - "CreditCard": CreditCard{Number: "987654321"}, - "Emails": []Email{ - {Email: "new_user_1@example1.com"}, {Email: "new_user_2@example2.com"}, {Email: "new_user_3@example2.com"}, - }, - "Company": Company{Name: "new company"}, - } - - var reloadUser User - DB.First(&reloadUser, user.Id) - DB.Model(&reloadUser).Omit("Name", "BillingAddress", "CreditCard", "Company", "Emails").Update(updateValues) - - var queryUser User - DB.Preload("BillingAddress").Preload("ShippingAddress"). - Preload("CreditCard").Preload("Emails").Preload("Company").First(&queryUser, user.Id) - - if queryUser.Name != user.Name || queryUser.Age == user.Age { - t.Errorf("Should only update users with name column") - } - - if queryUser.BillingAddressID.Int64 != user.BillingAddressID.Int64 || - queryUser.ShippingAddressId == user.ShippingAddressId || - queryUser.CreditCard.ID != user.CreditCard.ID || - len(queryUser.Emails) != len(user.Emails) || queryUser.Company.Id != user.Company.Id { - t.Errorf("Should only update relationships not omitted") - } -} - -func TestSelectWithUpdateColumn(t *testing.T) { - user := getPreparedUser("select_user", "select_with_update_map") - DB.Create(user) - - updateValues := map[string]interface{}{"Name": "new_name", "Age": 50} - - var reloadUser User - DB.First(&reloadUser, user.Id) - DB.Model(&reloadUser).Select("Name").UpdateColumn(updateValues) - - var queryUser User - DB.First(&queryUser, user.Id) - - if queryUser.Name == user.Name || queryUser.Age != user.Age { - t.Errorf("Should only update users with name column") - } -} - -func TestOmitWithUpdateColumn(t *testing.T) { - user := getPreparedUser("select_user", "select_with_update_map") - DB.Create(user) - - updateValues := map[string]interface{}{"Name": "new_name", "Age": 50} - - var reloadUser User - DB.First(&reloadUser, user.Id) - DB.Model(&reloadUser).Omit("Name").UpdateColumn(updateValues) - - var queryUser User - DB.First(&queryUser, user.Id) - - if queryUser.Name != user.Name || queryUser.Age == user.Age { - t.Errorf("Should omit name column when update user") - } -} - -func TestUpdateColumnsSkipsAssociations(t *testing.T) { - user := getPreparedUser("update_columns_user", "special_role") - user.Age = 99 - address1 := "first street" - user.BillingAddress = Address{Address1: address1} - DB.Save(user) - - // Update a single field of the user and verify that the changed address is not stored. - newAge := int64(100) - user.BillingAddress.Address1 = "second street" - db := DB.Model(user).UpdateColumns(User{Age: newAge}) - if db.RowsAffected != 1 { - t.Errorf("Expected RowsAffected=1 but instead RowsAffected=%v", DB.RowsAffected) - } - - // Verify that Age now=`newAge`. - freshUser := &User{Id: user.Id} - DB.First(freshUser) - if freshUser.Age != newAge { - t.Errorf("Expected freshly queried user to have Age=%v but instead found Age=%v", newAge, freshUser.Age) - } - - // Verify that user's BillingAddress.Address1 is not changed and is still "first street". - DB.First(&freshUser.BillingAddress, freshUser.BillingAddressID) - if freshUser.BillingAddress.Address1 != address1 { - t.Errorf("Expected user's BillingAddress.Address1=%s to remain unchanged after UpdateColumns invocation, but BillingAddress.Address1=%s", address1, freshUser.BillingAddress.Address1) - } -} - -func TestUpdatesWithBlankValues(t *testing.T) { - product := Product{Code: "product1", Price: 10} - DB.Save(&product) - - DB.Model(&Product{Id: product.Id}).Updates(&Product{Price: 100}) - - var product1 Product - DB.First(&product1, product.Id) - - if product1.Code != "product1" || product1.Price != 100 { - t.Errorf("product's code should not be updated") - } -} - -type ElementWithIgnoredField struct { - Id int64 - Value string - IgnoredField int64 `sql:"-"` -} - -func (e ElementWithIgnoredField) TableName() string { - return "element_with_ignored_field" -} - -func TestUpdatesTableWithIgnoredValues(t *testing.T) { - elem := ElementWithIgnoredField{Value: "foo", IgnoredField: 10} - DB.Save(&elem) - - DB.Table(elem.TableName()). - Where("id = ?", elem.Id). - // DB.Model(&ElementWithIgnoredField{Id: elem.Id}). - Updates(&ElementWithIgnoredField{Value: "bar", IgnoredField: 100}) - - var elem1 ElementWithIgnoredField - err := DB.First(&elem1, elem.Id).Error - if err != nil { - t.Errorf("error getting an element from database: %s", err.Error()) - } - - if elem1.IgnoredField != 0 { - t.Errorf("element's ignored field should not be updated") - } -} - -func TestUpdateDecodeVirtualAttributes(t *testing.T) { - var user = User{ - Name: "jinzhu", - IgnoreMe: 88, - } - - DB.Save(&user) - - DB.Model(&user).Updates(User{Name: "jinzhu2", IgnoreMe: 100}) - - if user.IgnoreMe != 100 { - t.Errorf("should decode virtual attributes to struct, so it could be used in callbacks") - } -} diff --git a/deps/github.com/jinzhu/gorm/utils.go b/deps/github.com/jinzhu/gorm/utils.go deleted file mode 100644 index 99b532c53..000000000 --- a/deps/github.com/jinzhu/gorm/utils.go +++ /dev/null @@ -1,287 +0,0 @@ -package gorm - -import ( - "bytes" - "database/sql/driver" - "fmt" - "reflect" - "regexp" - "runtime" - "strings" - "sync" - "time" -) - -// NowFunc returns current time, this function is exported in order to be able -// to give the flexibility to the developer to customize it according to their -// needs, e.g: -// gorm.NowFunc = func() time.Time { -// return time.Now().UTC() -// } -var NowFunc = func() time.Time { - return time.Now() -} - -// Copied from golint -var commonInitialisms = []string{"API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "LHS", "QPS", "RAM", "RHS", "RPC", "SLA", "SMTP", "SSH", "TLS", "TTL", "UID", "UI", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XSRF", "XSS"} -var commonInitialismsReplacer *strings.Replacer - -var goSrcRegexp = regexp.MustCompile(`jinzhu/gorm/.*.go`) -var goTestRegexp = regexp.MustCompile(`jinzhu/gorm/.*test.go`) - -func init() { - var commonInitialismsForReplacer []string - for _, initialism := range commonInitialisms { - commonInitialismsForReplacer = append(commonInitialismsForReplacer, initialism, strings.Title(strings.ToLower(initialism))) - } - commonInitialismsReplacer = strings.NewReplacer(commonInitialismsForReplacer...) -} - -type safeMap struct { - m map[string]string - l *sync.RWMutex -} - -func (s *safeMap) Set(key string, value string) { - s.l.Lock() - defer s.l.Unlock() - s.m[key] = value -} - -func (s *safeMap) Get(key string) string { - s.l.RLock() - defer s.l.RUnlock() - return s.m[key] -} - -func newSafeMap() *safeMap { - return &safeMap{l: new(sync.RWMutex), m: make(map[string]string)} -} - -var smap = newSafeMap() - -type strCase bool - -const ( - lower strCase = false - upper strCase = true -) - -// ToDBName convert string to db name -func ToDBName(name string) string { - if v := smap.Get(name); v != "" { - return v - } - - if name == "" { - return "" - } - - var ( - value = commonInitialismsReplacer.Replace(name) - buf = bytes.NewBufferString("") - lastCase, currCase, nextCase, nextNumber strCase - ) - - for i, v := range value[:len(value)-1] { - nextCase = strCase(value[i+1] >= 'A' && value[i+1] <= 'Z') - nextNumber = strCase(value[i+1] >= '0' && value[i+1] <= '9') - - if i > 0 { - if currCase == upper { - if lastCase == upper && (nextCase == upper || nextNumber == upper) { - buf.WriteRune(v) - } else { - if value[i-1] != '_' && value[i+1] != '_' { - buf.WriteRune('_') - } - buf.WriteRune(v) - } - } else { - buf.WriteRune(v) - if i == len(value)-2 && (nextCase == upper && nextNumber == lower) { - buf.WriteRune('_') - } - } - } else { - currCase = upper - buf.WriteRune(v) - } - lastCase = currCase - currCase = nextCase - } - - buf.WriteByte(value[len(value)-1]) - - s := strings.ToLower(buf.String()) - smap.Set(name, s) - return s -} - -// SQL expression -type expr struct { - expr string - args []interface{} -} - -// Expr generate raw SQL expression, for example: -// DB.Model(&product).Update("price", gorm.Expr("price * ? + ?", 2, 100)) -func Expr(expression string, args ...interface{}) *expr { - return &expr{expr: expression, args: args} -} - -func indirect(reflectValue reflect.Value) reflect.Value { - for reflectValue.Kind() == reflect.Ptr { - reflectValue = reflectValue.Elem() - } - return reflectValue -} - -func toQueryMarks(primaryValues [][]interface{}) string { - var results []string - - for _, primaryValue := range primaryValues { - var marks []string - for range primaryValue { - marks = append(marks, "?") - } - - if len(marks) > 1 { - results = append(results, fmt.Sprintf("(%v)", strings.Join(marks, ","))) - } else { - results = append(results, strings.Join(marks, "")) - } - } - return strings.Join(results, ",") -} - -func toQueryCondition(scope *Scope, columns []string) string { - var newColumns []string - for _, column := range columns { - newColumns = append(newColumns, scope.Quote(column)) - } - - if len(columns) > 1 { - return fmt.Sprintf("(%v)", strings.Join(newColumns, ",")) - } - return strings.Join(newColumns, ",") -} - -func toQueryValues(values [][]interface{}) (results []interface{}) { - for _, value := range values { - for _, v := range value { - results = append(results, v) - } - } - return -} - -func fileWithLineNum() string { - for i := 2; i < 15; i++ { - _, file, line, ok := runtime.Caller(i) - if ok && (!goSrcRegexp.MatchString(file) || goTestRegexp.MatchString(file)) { - return fmt.Sprintf("%v:%v", file, line) - } - } - return "" -} - -func isBlank(value reflect.Value) bool { - switch value.Kind() { - case reflect.String: - return value.Len() == 0 - case reflect.Bool: - return !value.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return value.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return value.Uint() == 0 - case reflect.Float32, reflect.Float64: - return value.Float() == 0 - case reflect.Interface, reflect.Ptr: - return value.IsNil() - } - - return reflect.DeepEqual(value.Interface(), reflect.Zero(value.Type()).Interface()) -} - -func toSearchableMap(attrs ...interface{}) (result interface{}) { - if len(attrs) > 1 { - if str, ok := attrs[0].(string); ok { - result = map[string]interface{}{str: attrs[1]} - } - } else if len(attrs) == 1 { - if attr, ok := attrs[0].(map[string]interface{}); ok { - result = attr - } - - if attr, ok := attrs[0].(interface{}); ok { - result = attr - } - } - return -} - -func equalAsString(a interface{}, b interface{}) bool { - return toString(a) == toString(b) -} - -func toString(str interface{}) string { - if values, ok := str.([]interface{}); ok { - var results []string - for _, value := range values { - results = append(results, toString(value)) - } - return strings.Join(results, "_") - } else if bytes, ok := str.([]byte); ok { - return string(bytes) - } else if reflectValue := reflect.Indirect(reflect.ValueOf(str)); reflectValue.IsValid() { - return fmt.Sprintf("%v", reflectValue.Interface()) - } - return "" -} - -func makeSlice(elemType reflect.Type) interface{} { - if elemType.Kind() == reflect.Slice { - elemType = elemType.Elem() - } - sliceType := reflect.SliceOf(elemType) - slice := reflect.New(sliceType) - slice.Elem().Set(reflect.MakeSlice(sliceType, 0, 0)) - return slice.Interface() -} - -func strInSlice(a string, list []string) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -// getValueFromFields return given fields's value -func getValueFromFields(value reflect.Value, fieldNames []string) (results []interface{}) { - // If value is a nil pointer, Indirect returns a zero Value! - // Therefor we need to check for a zero value, - // as FieldByName could panic - if indirectValue := reflect.Indirect(value); indirectValue.IsValid() { - for _, fieldName := range fieldNames { - if fieldValue := indirectValue.FieldByName(fieldName); fieldValue.IsValid() { - result := fieldValue.Interface() - if r, ok := result.(driver.Valuer); ok { - result, _ = r.Value() - } - results = append(results, result) - } - } - } - return -} - -func addExtraSpaceIfExist(str string) string { - if str != "" { - return " " + str - } - return "" -} diff --git a/deps/github.com/jinzhu/gorm/utils_test.go b/deps/github.com/jinzhu/gorm/utils_test.go deleted file mode 100644 index 086c44505..000000000 --- a/deps/github.com/jinzhu/gorm/utils_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package gorm_test - -import ( - "testing" - - "github.com/jinzhu/gorm" -) - -func TestToDBNameGenerateFriendlyName(t *testing.T) { - var maps = map[string]string{ - "": "", - "X": "x", - "ThisIsATest": "this_is_a_test", - "PFAndESI": "pf_and_esi", - "AbcAndJkl": "abc_and_jkl", - "EmployeeID": "employee_id", - "SKU_ID": "sku_id", - "UTF8": "utf8", - "Level1": "level1", - "SHA256Hash": "sha256_hash", - "FieldX": "field_x", - "HTTPAndSMTP": "http_and_smtp", - "HTTPServerHandlerForURLID": "http_server_handler_for_url_id", - "UUID": "uuid", - "HTTPURL": "http_url", - "HTTP_URL": "http_url", - "ThisIsActuallyATestSoWeMayBeAbleToUseThisCodeInGormPackageAlsoIdCanBeUsedAtTheEndAsID": "this_is_actually_a_test_so_we_may_be_able_to_use_this_code_in_gorm_package_also_id_can_be_used_at_the_end_as_id", - } - - for key, value := range maps { - if gorm.ToDBName(key) != value { - t.Errorf("%v ToDBName should equal %v, but got %v", key, value, gorm.ToDBName(key)) - } - } -} diff --git a/deps/github.com/jinzhu/gorm/wercker.yml b/deps/github.com/jinzhu/gorm/wercker.yml deleted file mode 100644 index 0c3e73ef1..000000000 --- a/deps/github.com/jinzhu/gorm/wercker.yml +++ /dev/null @@ -1,148 +0,0 @@ -# use the default golang container from Docker Hub -box: golang - -services: - - name: mariadb - id: mariadb:latest - env: - MYSQL_DATABASE: gorm - MYSQL_USER: gorm - MYSQL_PASSWORD: gorm - MYSQL_RANDOM_ROOT_PASSWORD: "yes" - - name: mysql57 - id: mysql:5.7 - env: - MYSQL_DATABASE: gorm - MYSQL_USER: gorm - MYSQL_PASSWORD: gorm - MYSQL_RANDOM_ROOT_PASSWORD: "yes" - - name: mysql56 - id: mysql:5.6 - env: - MYSQL_DATABASE: gorm - MYSQL_USER: gorm - MYSQL_PASSWORD: gorm - MYSQL_RANDOM_ROOT_PASSWORD: "yes" - - name: mysql55 - id: mysql:5.5 - env: - MYSQL_DATABASE: gorm - MYSQL_USER: gorm - MYSQL_PASSWORD: gorm - MYSQL_RANDOM_ROOT_PASSWORD: "yes" - - name: postgres - id: postgres:latest - env: - POSTGRES_USER: gorm - POSTGRES_PASSWORD: gorm - POSTGRES_DB: gorm - - name: postgres96 - id: postgres:9.6 - env: - POSTGRES_USER: gorm - POSTGRES_PASSWORD: gorm - POSTGRES_DB: gorm - - name: postgres95 - id: postgres:9.5 - env: - POSTGRES_USER: gorm - POSTGRES_PASSWORD: gorm - POSTGRES_DB: gorm - - name: postgres94 - id: postgres:9.4 - env: - POSTGRES_USER: gorm - POSTGRES_PASSWORD: gorm - POSTGRES_DB: gorm - - name: postgres93 - id: postgres:9.3 - env: - POSTGRES_USER: gorm - POSTGRES_PASSWORD: gorm - POSTGRES_DB: gorm - - name: mssql - id: mcmoe/mssqldocker:latest - env: - ACCEPT_EULA: Y - SA_PASSWORD: LoremIpsum86 - MSSQL_DB: gorm - MSSQL_USER: gorm - MSSQL_PASSWORD: LoremIpsum86 - -# The steps that will be executed in the build pipeline -build: - # The steps that will be executed on build - steps: - # Sets the go workspace and places you package - # at the right place in the workspace tree - - setup-go-workspace - - # Gets the dependencies - - script: - name: go get - code: | - cd $WERCKER_SOURCE_DIR - go version - go get -t ./... - - # Build the project - - script: - name: go build - code: | - go build ./... - - # Test the project - - script: - name: test sqlite - code: | - go test ./... - - - script: - name: test mariadb - code: | - GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(mariadb:3306)/gorm?charset=utf8&parseTime=True" go test ./... - - - script: - name: test mysql5.7 - code: | - GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(mysql57:3306)/gorm?charset=utf8&parseTime=True" go test ./... - - - script: - name: test mysql5.6 - code: | - GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(mysql56:3306)/gorm?charset=utf8&parseTime=True" go test ./... - - - script: - name: test mysql5.5 - code: | - GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(mysql55:3306)/gorm?charset=utf8&parseTime=True" go test ./... - - - script: - name: test postgres - code: | - GORM_DIALECT=postgres GORM_DSN="host=postgres user=gorm password=gorm DB.name=gorm port=5432 sslmode=disable" go test ./... - - - script: - name: test postgres96 - code: | - GORM_DIALECT=postgres GORM_DSN="host=postgres96 user=gorm password=gorm DB.name=gorm port=5432 sslmode=disable" go test ./... - - - script: - name: test postgres95 - code: | - GORM_DIALECT=postgres GORM_DSN="host=postgres95 user=gorm password=gorm DB.name=gorm port=5432 sslmode=disable" go test ./... - - - script: - name: test postgres94 - code: | - GORM_DIALECT=postgres GORM_DSN="host=postgres94 user=gorm password=gorm DB.name=gorm port=5432 sslmode=disable" go test ./... - - - script: - name: test postgres93 - code: | - GORM_DIALECT=postgres GORM_DSN="host=postgres93 user=gorm password=gorm DB.name=gorm port=5432 sslmode=disable" go test ./... - - - script: - name: test mssql - code: | - GORM_DIALECT=mssql GORM_DSN="sqlserver://gorm:LoremIpsum86@mssql:1433?database=gorm" go test ./... diff --git a/deps/github.com/jinzhu/inflection/LICENSE b/deps/github.com/jinzhu/inflection/LICENSE deleted file mode 100644 index a1ca9a0ff..000000000 --- a/deps/github.com/jinzhu/inflection/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 - Jinzhu - -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/deps/github.com/jinzhu/inflection/README.md b/deps/github.com/jinzhu/inflection/README.md deleted file mode 100644 index a3de33614..000000000 --- a/deps/github.com/jinzhu/inflection/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Inflection - -Inflection pluralizes and singularizes English nouns - -[![wercker status](https://app.wercker.com/status/f8c7432b097d1f4ce636879670be0930/s/master "wercker status")](https://app.wercker.com/project/byKey/f8c7432b097d1f4ce636879670be0930) - -## Basic Usage - -```go -inflection.Plural("person") => "people" -inflection.Plural("Person") => "People" -inflection.Plural("PERSON") => "PEOPLE" -inflection.Plural("bus") => "buses" -inflection.Plural("BUS") => "BUSES" -inflection.Plural("Bus") => "Buses" - -inflection.Singular("people") => "person" -inflection.Singular("People") => "Person" -inflection.Singular("PEOPLE") => "PERSON" -inflection.Singular("buses") => "bus" -inflection.Singular("BUSES") => "BUS" -inflection.Singular("Buses") => "Bus" - -inflection.Plural("FancyPerson") => "FancyPeople" -inflection.Singular("FancyPeople") => "FancyPerson" -``` - -## Register Rules - -Standard rules are from Rails's ActiveSupport (https://github.com/rails/rails/blob/master/activesupport/lib/active_support/inflections.rb) - -If you want to register more rules, follow: - -``` -inflection.AddUncountable("fish") -inflection.AddIrregular("person", "people") -inflection.AddPlural("(bu)s$", "${1}ses") # "bus" => "buses" / "BUS" => "BUSES" / "Bus" => "Buses" -inflection.AddSingular("(bus)(es)?$", "${1}") # "buses" => "bus" / "Buses" => "Bus" / "BUSES" => "BUS" -``` - -## Contributing - -You can help to make the project better, check out [http://gorm.io/contribute.html](http://gorm.io/contribute.html) for things you can do. - -## Author - -**jinzhu** - -* -* -* - -## License - -Released under the [MIT License](http://www.opensource.org/licenses/MIT). diff --git a/deps/github.com/jinzhu/inflection/inflections.go b/deps/github.com/jinzhu/inflection/inflections.go deleted file mode 100644 index 606263bb7..000000000 --- a/deps/github.com/jinzhu/inflection/inflections.go +++ /dev/null @@ -1,273 +0,0 @@ -/* -Package inflection pluralizes and singularizes English nouns. - - inflection.Plural("person") => "people" - inflection.Plural("Person") => "People" - inflection.Plural("PERSON") => "PEOPLE" - - inflection.Singular("people") => "person" - inflection.Singular("People") => "Person" - inflection.Singular("PEOPLE") => "PERSON" - - inflection.Plural("FancyPerson") => "FancydPeople" - inflection.Singular("FancyPeople") => "FancydPerson" - -Standard rules are from Rails's ActiveSupport (https://github.com/rails/rails/blob/master/activesupport/lib/active_support/inflections.rb) - -If you want to register more rules, follow: - - inflection.AddUncountable("fish") - inflection.AddIrregular("person", "people") - inflection.AddPlural("(bu)s$", "${1}ses") # "bus" => "buses" / "BUS" => "BUSES" / "Bus" => "Buses" - inflection.AddSingular("(bus)(es)?$", "${1}") # "buses" => "bus" / "Buses" => "Bus" / "BUSES" => "BUS" -*/ -package inflection - -import ( - "regexp" - "strings" -) - -type inflection struct { - regexp *regexp.Regexp - replace string -} - -// Regular is a regexp find replace inflection -type Regular struct { - find string - replace string -} - -// Irregular is a hard replace inflection, -// containing both singular and plural forms -type Irregular struct { - singular string - plural string -} - -// RegularSlice is a slice of Regular inflections -type RegularSlice []Regular - -// IrregularSlice is a slice of Irregular inflections -type IrregularSlice []Irregular - -var pluralInflections = RegularSlice{ - {"([a-z])$", "${1}s"}, - {"s$", "s"}, - {"^(ax|test)is$", "${1}es"}, - {"(octop|vir)us$", "${1}i"}, - {"(octop|vir)i$", "${1}i"}, - {"(alias|status)$", "${1}es"}, - {"(bu)s$", "${1}ses"}, - {"(buffal|tomat)o$", "${1}oes"}, - {"([ti])um$", "${1}a"}, - {"([ti])a$", "${1}a"}, - {"sis$", "ses"}, - {"(?:([^f])fe|([lr])f)$", "${1}${2}ves"}, - {"(hive)$", "${1}s"}, - {"([^aeiouy]|qu)y$", "${1}ies"}, - {"(x|ch|ss|sh)$", "${1}es"}, - {"(matr|vert|ind)(?:ix|ex)$", "${1}ices"}, - {"^(m|l)ouse$", "${1}ice"}, - {"^(m|l)ice$", "${1}ice"}, - {"^(ox)$", "${1}en"}, - {"^(oxen)$", "${1}"}, - {"(quiz)$", "${1}zes"}, -} - -var singularInflections = RegularSlice{ - {"s$", ""}, - {"(ss)$", "${1}"}, - {"(n)ews$", "${1}ews"}, - {"([ti])a$", "${1}um"}, - {"((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$", "${1}sis"}, - {"(^analy)(sis|ses)$", "${1}sis"}, - {"([^f])ves$", "${1}fe"}, - {"(hive)s$", "${1}"}, - {"(tive)s$", "${1}"}, - {"([lr])ves$", "${1}f"}, - {"([^aeiouy]|qu)ies$", "${1}y"}, - {"(s)eries$", "${1}eries"}, - {"(m)ovies$", "${1}ovie"}, - {"(c)ookies$", "${1}ookie"}, - {"(x|ch|ss|sh)es$", "${1}"}, - {"^(m|l)ice$", "${1}ouse"}, - {"(bus)(es)?$", "${1}"}, - {"(o)es$", "${1}"}, - {"(shoe)s$", "${1}"}, - {"(cris|test)(is|es)$", "${1}is"}, - {"^(a)x[ie]s$", "${1}xis"}, - {"(octop|vir)(us|i)$", "${1}us"}, - {"(alias|status)(es)?$", "${1}"}, - {"^(ox)en", "${1}"}, - {"(vert|ind)ices$", "${1}ex"}, - {"(matr)ices$", "${1}ix"}, - {"(quiz)zes$", "${1}"}, - {"(database)s$", "${1}"}, -} - -var irregularInflections = IrregularSlice{ - {"person", "people"}, - {"man", "men"}, - {"child", "children"}, - {"sex", "sexes"}, - {"move", "moves"}, - {"mombie", "mombies"}, -} - -var uncountableInflections = []string{"equipment", "information", "rice", "money", "species", "series", "fish", "sheep", "jeans", "police"} - -var compiledPluralMaps []inflection -var compiledSingularMaps []inflection - -func compile() { - compiledPluralMaps = []inflection{} - compiledSingularMaps = []inflection{} - for _, uncountable := range uncountableInflections { - inf := inflection{ - regexp: regexp.MustCompile("^(?i)(" + uncountable + ")$"), - replace: "${1}", - } - compiledPluralMaps = append(compiledPluralMaps, inf) - compiledSingularMaps = append(compiledSingularMaps, inf) - } - - for _, value := range irregularInflections { - infs := []inflection{ - inflection{regexp: regexp.MustCompile(strings.ToUpper(value.singular) + "$"), replace: strings.ToUpper(value.plural)}, - inflection{regexp: regexp.MustCompile(strings.Title(value.singular) + "$"), replace: strings.Title(value.plural)}, - inflection{regexp: regexp.MustCompile(value.singular + "$"), replace: value.plural}, - } - compiledPluralMaps = append(compiledPluralMaps, infs...) - } - - for _, value := range irregularInflections { - infs := []inflection{ - inflection{regexp: regexp.MustCompile(strings.ToUpper(value.plural) + "$"), replace: strings.ToUpper(value.singular)}, - inflection{regexp: regexp.MustCompile(strings.Title(value.plural) + "$"), replace: strings.Title(value.singular)}, - inflection{regexp: regexp.MustCompile(value.plural + "$"), replace: value.singular}, - } - compiledSingularMaps = append(compiledSingularMaps, infs...) - } - - for i := len(pluralInflections) - 1; i >= 0; i-- { - value := pluralInflections[i] - infs := []inflection{ - inflection{regexp: regexp.MustCompile(strings.ToUpper(value.find)), replace: strings.ToUpper(value.replace)}, - inflection{regexp: regexp.MustCompile(value.find), replace: value.replace}, - inflection{regexp: regexp.MustCompile("(?i)" + value.find), replace: value.replace}, - } - compiledPluralMaps = append(compiledPluralMaps, infs...) - } - - for i := len(singularInflections) - 1; i >= 0; i-- { - value := singularInflections[i] - infs := []inflection{ - inflection{regexp: regexp.MustCompile(strings.ToUpper(value.find)), replace: strings.ToUpper(value.replace)}, - inflection{regexp: regexp.MustCompile(value.find), replace: value.replace}, - inflection{regexp: regexp.MustCompile("(?i)" + value.find), replace: value.replace}, - } - compiledSingularMaps = append(compiledSingularMaps, infs...) - } -} - -func init() { - compile() -} - -// AddPlural adds a plural inflection -func AddPlural(find, replace string) { - pluralInflections = append(pluralInflections, Regular{find, replace}) - compile() -} - -// AddSingular adds a singular inflection -func AddSingular(find, replace string) { - singularInflections = append(singularInflections, Regular{find, replace}) - compile() -} - -// AddIrregular adds an irregular inflection -func AddIrregular(singular, plural string) { - irregularInflections = append(irregularInflections, Irregular{singular, plural}) - compile() -} - -// AddUncountable adds an uncountable inflection -func AddUncountable(values ...string) { - uncountableInflections = append(uncountableInflections, values...) - compile() -} - -// GetPlural retrieves the plural inflection values -func GetPlural() RegularSlice { - plurals := make(RegularSlice, len(pluralInflections)) - copy(plurals, pluralInflections) - return plurals -} - -// GetSingular retrieves the singular inflection values -func GetSingular() RegularSlice { - singulars := make(RegularSlice, len(singularInflections)) - copy(singulars, singularInflections) - return singulars -} - -// GetIrregular retrieves the irregular inflection values -func GetIrregular() IrregularSlice { - irregular := make(IrregularSlice, len(irregularInflections)) - copy(irregular, irregularInflections) - return irregular -} - -// GetUncountable retrieves the uncountable inflection values -func GetUncountable() []string { - uncountables := make([]string, len(uncountableInflections)) - copy(uncountables, uncountableInflections) - return uncountables -} - -// SetPlural sets the plural inflections slice -func SetPlural(inflections RegularSlice) { - pluralInflections = inflections - compile() -} - -// SetSingular sets the singular inflections slice -func SetSingular(inflections RegularSlice) { - singularInflections = inflections - compile() -} - -// SetIrregular sets the irregular inflections slice -func SetIrregular(inflections IrregularSlice) { - irregularInflections = inflections - compile() -} - -// SetUncountable sets the uncountable inflections slice -func SetUncountable(inflections []string) { - uncountableInflections = inflections - compile() -} - -// Plural converts a word to its plural form -func Plural(str string) string { - for _, inflection := range compiledPluralMaps { - if inflection.regexp.MatchString(str) { - return inflection.regexp.ReplaceAllString(str, inflection.replace) - } - } - return str -} - -// Singular converts a word to its singular form -func Singular(str string) string { - for _, inflection := range compiledSingularMaps { - if inflection.regexp.MatchString(str) { - return inflection.regexp.ReplaceAllString(str, inflection.replace) - } - } - return str -} diff --git a/deps/github.com/jinzhu/inflection/inflections_test.go b/deps/github.com/jinzhu/inflection/inflections_test.go deleted file mode 100644 index 689e1dfb1..000000000 --- a/deps/github.com/jinzhu/inflection/inflections_test.go +++ /dev/null @@ -1,213 +0,0 @@ -package inflection - -import ( - "strings" - "testing" -) - -var inflections = map[string]string{ - "star": "stars", - "STAR": "STARS", - "Star": "Stars", - "bus": "buses", - "fish": "fish", - "mouse": "mice", - "query": "queries", - "ability": "abilities", - "agency": "agencies", - "movie": "movies", - "archive": "archives", - "index": "indices", - "wife": "wives", - "safe": "saves", - "half": "halves", - "move": "moves", - "salesperson": "salespeople", - "person": "people", - "spokesman": "spokesmen", - "man": "men", - "woman": "women", - "basis": "bases", - "diagnosis": "diagnoses", - "diagnosis_a": "diagnosis_as", - "datum": "data", - "medium": "media", - "stadium": "stadia", - "analysis": "analyses", - "node_child": "node_children", - "child": "children", - "experience": "experiences", - "day": "days", - "comment": "comments", - "foobar": "foobars", - "newsletter": "newsletters", - "old_news": "old_news", - "news": "news", - "series": "series", - "species": "species", - "quiz": "quizzes", - "perspective": "perspectives", - "ox": "oxen", - "photo": "photos", - "buffalo": "buffaloes", - "tomato": "tomatoes", - "dwarf": "dwarves", - "elf": "elves", - "information": "information", - "equipment": "equipment", - "criterion": "criteria", -} - -// storage is used to restore the state of the global variables -// on each test execution, to ensure no global state pollution -type storage struct { - singulars RegularSlice - plurals RegularSlice - irregulars IrregularSlice - uncountables []string -} - -var backup = storage{} - -func init() { - AddIrregular("criterion", "criteria") - copy(backup.singulars, singularInflections) - copy(backup.plurals, pluralInflections) - copy(backup.irregulars, irregularInflections) - copy(backup.uncountables, uncountableInflections) -} - -func restore() { - copy(singularInflections, backup.singulars) - copy(pluralInflections, backup.plurals) - copy(irregularInflections, backup.irregulars) - copy(uncountableInflections, backup.uncountables) -} - -func TestPlural(t *testing.T) { - for key, value := range inflections { - if v := Plural(strings.ToUpper(key)); v != strings.ToUpper(value) { - t.Errorf("%v's plural should be %v, but got %v", strings.ToUpper(key), strings.ToUpper(value), v) - } - - if v := Plural(strings.Title(key)); v != strings.Title(value) { - t.Errorf("%v's plural should be %v, but got %v", strings.Title(key), strings.Title(value), v) - } - - if v := Plural(key); v != value { - t.Errorf("%v's plural should be %v, but got %v", key, value, v) - } - } -} - -func TestSingular(t *testing.T) { - for key, value := range inflections { - if v := Singular(strings.ToUpper(value)); v != strings.ToUpper(key) { - t.Errorf("%v's singular should be %v, but got %v", strings.ToUpper(value), strings.ToUpper(key), v) - } - - if v := Singular(strings.Title(value)); v != strings.Title(key) { - t.Errorf("%v's singular should be %v, but got %v", strings.Title(value), strings.Title(key), v) - } - - if v := Singular(value); v != key { - t.Errorf("%v's singular should be %v, but got %v", value, key, v) - } - } -} - -func TestAddPlural(t *testing.T) { - defer restore() - ln := len(pluralInflections) - AddPlural("", "") - if ln+1 != len(pluralInflections) { - t.Errorf("Expected len %d, got %d", ln+1, len(pluralInflections)) - } -} - -func TestAddSingular(t *testing.T) { - defer restore() - ln := len(singularInflections) - AddSingular("", "") - if ln+1 != len(singularInflections) { - t.Errorf("Expected len %d, got %d", ln+1, len(singularInflections)) - } -} - -func TestAddIrregular(t *testing.T) { - defer restore() - ln := len(irregularInflections) - AddIrregular("", "") - if ln+1 != len(irregularInflections) { - t.Errorf("Expected len %d, got %d", ln+1, len(irregularInflections)) - } -} - -func TestAddUncountable(t *testing.T) { - defer restore() - ln := len(uncountableInflections) - AddUncountable("", "") - if ln+2 != len(uncountableInflections) { - t.Errorf("Expected len %d, got %d", ln+2, len(uncountableInflections)) - } -} - -func TestGetPlural(t *testing.T) { - plurals := GetPlural() - if len(plurals) != len(pluralInflections) { - t.Errorf("Expected len %d, got %d", len(plurals), len(pluralInflections)) - } -} - -func TestGetSingular(t *testing.T) { - singular := GetSingular() - if len(singular) != len(singularInflections) { - t.Errorf("Expected len %d, got %d", len(singular), len(singularInflections)) - } -} - -func TestGetIrregular(t *testing.T) { - irregular := GetIrregular() - if len(irregular) != len(irregularInflections) { - t.Errorf("Expected len %d, got %d", len(irregular), len(irregularInflections)) - } -} - -func TestGetUncountable(t *testing.T) { - uncountables := GetUncountable() - if len(uncountables) != len(uncountableInflections) { - t.Errorf("Expected len %d, got %d", len(uncountables), len(uncountableInflections)) - } -} - -func TestSetPlural(t *testing.T) { - defer restore() - SetPlural(RegularSlice{{}, {}}) - if len(pluralInflections) != 2 { - t.Errorf("Expected len 2, got %d", len(pluralInflections)) - } -} - -func TestSetSingular(t *testing.T) { - defer restore() - SetSingular(RegularSlice{{}, {}}) - if len(singularInflections) != 2 { - t.Errorf("Expected len 2, got %d", len(singularInflections)) - } -} - -func TestSetIrregular(t *testing.T) { - defer restore() - SetIrregular(IrregularSlice{{}, {}}) - if len(irregularInflections) != 2 { - t.Errorf("Expected len 2, got %d", len(irregularInflections)) - } -} - -func TestSetUncountable(t *testing.T) { - defer restore() - SetUncountable([]string{"", ""}) - if len(uncountableInflections) != 2 { - t.Errorf("Expected len 2, got %d", len(uncountableInflections)) - } -} diff --git a/deps/github.com/jinzhu/inflection/wercker.yml b/deps/github.com/jinzhu/inflection/wercker.yml deleted file mode 100644 index 5e6ce981d..000000000 --- a/deps/github.com/jinzhu/inflection/wercker.yml +++ /dev/null @@ -1,23 +0,0 @@ -box: golang - -build: - steps: - - setup-go-workspace - - # Gets the dependencies - - script: - name: go get - code: | - go get - - # Build the project - - script: - name: go build - code: | - go build ./... - - # Test the project - - script: - name: go test - code: | - go test ./... diff --git a/deps/github.com/jinzhu/now/Guardfile b/deps/github.com/jinzhu/now/Guardfile deleted file mode 100644 index 0b860b065..000000000 --- a/deps/github.com/jinzhu/now/Guardfile +++ /dev/null @@ -1,3 +0,0 @@ -guard 'gotest' do - watch(%r{\.go$}) -end diff --git a/deps/github.com/jinzhu/now/License b/deps/github.com/jinzhu/now/License deleted file mode 100644 index 037e1653e..000000000 --- a/deps/github.com/jinzhu/now/License +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-NOW Jinzhu - -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/deps/github.com/jinzhu/now/README.md b/deps/github.com/jinzhu/now/README.md deleted file mode 100644 index 23b88c5b5..000000000 --- a/deps/github.com/jinzhu/now/README.md +++ /dev/null @@ -1,116 +0,0 @@ -## Now - -Now is a time toolkit for golang - -[![wercker status](https://app.wercker.com/status/a350da4eae6cb28a35687ba41afb565a/s/master "wercker status")](https://app.wercker.com/project/byKey/a350da4eae6cb28a35687ba41afb565a) - -## Install - -``` -go get -u github.com/jinzhu/now -``` - -## Usage - -Calculating time based on current time - -```go -import "github.com/jinzhu/now" - -time.Now() // 2013-11-18 17:51:49.123456789 Mon - -now.BeginningOfMinute() // 2013-11-18 17:51:00 Mon -now.BeginningOfHour() // 2013-11-18 17:00:00 Mon -now.BeginningOfDay() // 2013-11-18 00:00:00 Mon -now.BeginningOfWeek() // 2013-11-17 00:00:00 Sun -now.BeginningOfMonth() // 2013-11-01 00:00:00 Fri -now.BeginningOfQuarter() // 2013-10-01 00:00:00 Tue -now.BeginningOfYear() // 2013-01-01 00:00:00 Tue - -now.WeekStartDay = time.Monday // Set Monday as first day, default is Sunday -now.BeginningOfWeek() // 2013-11-18 00:00:00 Mon - -now.EndOfMinute() // 2013-11-18 17:51:59.999999999 Mon -now.EndOfHour() // 2013-11-18 17:59:59.999999999 Mon -now.EndOfDay() // 2013-11-18 23:59:59.999999999 Mon -now.EndOfWeek() // 2013-11-23 23:59:59.999999999 Sat -now.EndOfMonth() // 2013-11-30 23:59:59.999999999 Sat -now.EndOfQuarter() // 2013-12-31 23:59:59.999999999 Tue -now.EndOfYear() // 2013-12-31 23:59:59.999999999 Tue - -now.WeekStartDay = time.Monday // Set Monday as first day, default is Sunday -now.EndOfWeek() // 2013-11-24 23:59:59.999999999 Sun -``` - -Calculating time based on another time - -```go -t := time.Date(2013, 02, 18, 17, 51, 49, 123456789, time.Now().Location()) -now.New(t).EndOfMonth() // 2013-02-28 23:59:59.999999999 Thu -``` - -### Monday/Sunday - -Don't be bothered with the `WeekStartDay` setting, you can use `Monday`, `Sunday` - -```go -now.Monday() // 2013-11-18 00:00:00 Mon -now.Sunday() // 2013-11-24 00:00:00 Sun (Next Sunday) -now.EndOfSunday() // 2013-11-24 23:59:59.999999999 Sun (End of next Sunday) - -t := time.Date(2013, 11, 24, 17, 51, 49, 123456789, time.Now().Location()) // 2013-11-24 17:51:49.123456789 Sun -now.New(t).Monday() // 2013-11-18 00:00:00 Sun (Last Monday if today is Sunday) -now.New(t).Sunday() // 2013-11-24 00:00:00 Sun (Beginning Of Today if today is Sunday) -now.New(t).EndOfSunday() // 2013-11-24 23:59:59.999999999 Sun (End of Today if today is Sunday) -``` - -### Parse String to Time - -```go -time.Now() // 2013-11-18 17:51:49.123456789 Mon - -// Parse(string) (time.Time, error) -t, err := now.Parse("2017") // 2017-01-01 00:00:00, nil -t, err := now.Parse("2017-10") // 2017-10-01 00:00:00, nil -t, err := now.Parse("2017-10-13") // 2017-10-13 00:00:00, nil -t, err := now.Parse("1999-12-12 12") // 1999-12-12 12:00:00, nil -t, err := now.Parse("1999-12-12 12:20") // 1999-12-12 12:20:00, nil -t, err := now.Parse("1999-12-12 12:20:21") // 1999-12-12 12:20:00, nil -t, err := now.Parse("10-13") // 2013-10-13 00:00:00, nil -t, err := now.Parse("12:20") // 2013-11-18 12:20:00, nil -t, err := now.Parse("12:20:13") // 2013-11-18 12:20:13, nil -t, err := now.Parse("14") // 2013-11-18 14:00:00, nil -t, err := now.Parse("99:99") // 2013-11-18 12:20:00, Can't parse string as time: 99:99 - -// MustParse must parse string to time or it will panic -now.MustParse("2013-01-13") // 2013-01-13 00:00:00 -now.MustParse("02-17") // 2013-02-17 00:00:00 -now.MustParse("2-17") // 2013-02-17 00:00:00 -now.MustParse("8") // 2013-11-18 08:00:00 -now.MustParse("2002-10-12 22:14") // 2002-10-12 22:14:00 -now.MustParse("99:99") // panic: Can't parse string as time: 99:99 -``` - -Extend `now` to support more formats is quite easy, just update `now.TimeFormats` with other time layouts, e.g: - -```go -now.TimeFormats = append(now.TimeFormats, "02 Jan 2006 15:04") -``` - -Please send me pull requests if you want a format to be supported officially - -## Contributing - -You can help to make the project better, check out [http://gorm.io/contribute.html](http://gorm.io/contribute.html) for things you can do. - -# Author - -**jinzhu** - -* -* -* - -## License - -Released under the [MIT License](http://www.opensource.org/licenses/MIT). diff --git a/deps/github.com/jinzhu/now/main.go b/deps/github.com/jinzhu/now/main.go deleted file mode 100644 index 9c9f95ccf..000000000 --- a/deps/github.com/jinzhu/now/main.go +++ /dev/null @@ -1,138 +0,0 @@ -// Package now is a time toolkit for golang. -// -// More details README here: https://github.com/jinzhu/now -// -// import "github.com/jinzhu/now" -// -// now.BeginningOfMinute() // 2013-11-18 17:51:00 Mon -// now.BeginningOfDay() // 2013-11-18 00:00:00 Mon -// now.EndOfDay() // 2013-11-18 23:59:59.999999999 Mon -package now - -import "time" - -// WeekStartDay set week start day, default is sunday -var WeekStartDay = time.Sunday - -// TimeFormats default time formats will be parsed as -var TimeFormats = []string{"1/2/2006", "1/2/2006 15:4:5", "2006", "2006-1", "2006-1-2", "2006-1-2 15", "2006-1-2 15:4", "2006-1-2 15:4:5", "1-2", "15:4:5", "15:4", "15", "15:4:5 Jan 2, 2006 MST", "2006-01-02 15:04:05.999999999 -0700 MST"} - -// Now now struct -type Now struct { - time.Time -} - -// New initialize Now with time -func New(t time.Time) *Now { - return &Now{t} -} - -// BeginningOfMinute beginning of minute -func BeginningOfMinute() time.Time { - return New(time.Now()).BeginningOfMinute() -} - -// BeginningOfHour beginning of hour -func BeginningOfHour() time.Time { - return New(time.Now()).BeginningOfHour() -} - -// BeginningOfDay beginning of day -func BeginningOfDay() time.Time { - return New(time.Now()).BeginningOfDay() -} - -// BeginningOfWeek beginning of week -func BeginningOfWeek() time.Time { - return New(time.Now()).BeginningOfWeek() -} - -// BeginningOfMonth beginning of month -func BeginningOfMonth() time.Time { - return New(time.Now()).BeginningOfMonth() -} - -// BeginningOfQuarter beginning of quarter -func BeginningOfQuarter() time.Time { - return New(time.Now()).BeginningOfQuarter() -} - -// BeginningOfYear beginning of year -func BeginningOfYear() time.Time { - return New(time.Now()).BeginningOfYear() -} - -// EndOfMinute end of minute -func EndOfMinute() time.Time { - return New(time.Now()).EndOfMinute() -} - -// EndOfHour end of hour -func EndOfHour() time.Time { - return New(time.Now()).EndOfHour() -} - -// EndOfDay end of day -func EndOfDay() time.Time { - return New(time.Now()).EndOfDay() -} - -// EndOfWeek end of week -func EndOfWeek() time.Time { - return New(time.Now()).EndOfWeek() -} - -// EndOfMonth end of month -func EndOfMonth() time.Time { - return New(time.Now()).EndOfMonth() -} - -// EndOfQuarter end of quarter -func EndOfQuarter() time.Time { - return New(time.Now()).EndOfQuarter() -} - -// EndOfYear end of year -func EndOfYear() time.Time { - return New(time.Now()).EndOfYear() -} - -// Monday monday -func Monday() time.Time { - return New(time.Now()).Monday() -} - -// Sunday sunday -func Sunday() time.Time { - return New(time.Now()).Sunday() -} - -// EndOfSunday end of sunday -func EndOfSunday() time.Time { - return New(time.Now()).EndOfSunday() -} - -// Parse parse string to time -func Parse(strs ...string) (time.Time, error) { - return New(time.Now()).Parse(strs...) -} - -// ParseInLocation parse string to time in location -func ParseInLocation(loc *time.Location, strs ...string) (time.Time, error) { - return New(time.Now().In(loc)).Parse(strs...) -} - -// MustParse must parse string to time or will panic -func MustParse(strs ...string) time.Time { - return New(time.Now()).MustParse(strs...) -} - -// MustParseInLocation must parse string to time in location or will panic -func MustParseInLocation(loc *time.Location, strs ...string) time.Time { - return New(time.Now().In(loc)).MustParse(strs...) -} - -// Between check now between the begin, end time or not -func Between(time1, time2 string) bool { - return New(time.Now()).Between(time1, time2) -} diff --git a/deps/github.com/jinzhu/now/now.go b/deps/github.com/jinzhu/now/now.go deleted file mode 100644 index a4f957dae..000000000 --- a/deps/github.com/jinzhu/now/now.go +++ /dev/null @@ -1,203 +0,0 @@ -package now - -import ( - "errors" - "regexp" - "time" -) - -// BeginningOfMinute beginning of minute -func (now *Now) BeginningOfMinute() time.Time { - return now.Truncate(time.Minute) -} - -// BeginningOfHour beginning of hour -func (now *Now) BeginningOfHour() time.Time { - y, m, d := now.Date() - return time.Date(y, m, d, now.Time.Hour(), 0, 0, 0, now.Time.Location()) -} - -// BeginningOfDay beginning of day -func (now *Now) BeginningOfDay() time.Time { - y, m, d := now.Date() - return time.Date(y, m, d, 0, 0, 0, 0, now.Time.Location()) -} - -// BeginningOfWeek beginning of week -func (now *Now) BeginningOfWeek() time.Time { - t := now.BeginningOfDay() - weekday := int(t.Weekday()) - - if WeekStartDay != time.Sunday { - weekStartDayInt := int(WeekStartDay) - - if weekday < weekStartDayInt { - weekday = weekday + 7 - weekStartDayInt - } else { - weekday = weekday - weekStartDayInt - } - } - return t.AddDate(0, 0, -weekday) -} - -// BeginningOfMonth beginning of month -func (now *Now) BeginningOfMonth() time.Time { - y, m, _ := now.Date() - return time.Date(y, m, 1, 0, 0, 0, 0, now.Location()) -} - -// BeginningOfQuarter beginning of quarter -func (now *Now) BeginningOfQuarter() time.Time { - month := now.BeginningOfMonth() - offset := (int(month.Month()) - 1) % 3 - return month.AddDate(0, -offset, 0) -} - -// BeginningOfYear BeginningOfYear beginning of year -func (now *Now) BeginningOfYear() time.Time { - y, _, _ := now.Date() - return time.Date(y, time.January, 1, 0, 0, 0, 0, now.Location()) -} - -// EndOfMinute end of minute -func (now *Now) EndOfMinute() time.Time { - return now.BeginningOfMinute().Add(time.Minute - time.Nanosecond) -} - -// EndOfHour end of hour -func (now *Now) EndOfHour() time.Time { - return now.BeginningOfHour().Add(time.Hour - time.Nanosecond) -} - -// EndOfDay end of day -func (now *Now) EndOfDay() time.Time { - y, m, d := now.Date() - return time.Date(y, m, d, 23, 59, 59, int(time.Second-time.Nanosecond), now.Location()) -} - -// EndOfWeek end of week -func (now *Now) EndOfWeek() time.Time { - return now.BeginningOfWeek().AddDate(0, 0, 7).Add(-time.Nanosecond) -} - -// EndOfMonth end of month -func (now *Now) EndOfMonth() time.Time { - return now.BeginningOfMonth().AddDate(0, 1, 0).Add(-time.Nanosecond) -} - -// EndOfQuarter end of quarter -func (now *Now) EndOfQuarter() time.Time { - return now.BeginningOfQuarter().AddDate(0, 3, 0).Add(-time.Nanosecond) -} - -// EndOfYear end of year -func (now *Now) EndOfYear() time.Time { - return now.BeginningOfYear().AddDate(1, 0, 0).Add(-time.Nanosecond) -} - -// Monday monday -func (now *Now) Monday() time.Time { - t := now.BeginningOfDay() - weekday := int(t.Weekday()) - if weekday == 0 { - weekday = 7 - } - return t.AddDate(0, 0, -weekday+1) -} - -// Sunday sunday -func (now *Now) Sunday() time.Time { - t := now.BeginningOfDay() - weekday := int(t.Weekday()) - if weekday == 0 { - return t - } - return t.AddDate(0, 0, (7 - weekday)) -} - -// EndOfSunday end of sunday -func (now *Now) EndOfSunday() time.Time { - return New(now.Sunday()).EndOfDay() -} - -func parseWithFormat(str string) (t time.Time, err error) { - for _, format := range TimeFormats { - t, err = time.Parse(format, str) - if err == nil { - return - } - } - err = errors.New("Can't parse string as time: " + str) - return -} - -var hasTimeRegexp = regexp.MustCompile(`(\s+|^\s*)\d{1,2}((:\d{1,2})*|((:\d{1,2}){2}\.(\d{3}|\d{6}|\d{9})))\s*$`) // match 15:04:05, 15:04:05.000, 15:04:05.000000 15, 2017-01-01 15:04, etc -var onlyTimeRegexp = regexp.MustCompile(`^\s*\d{1,2}((:\d{1,2})*|((:\d{1,2}){2}\.(\d{3}|\d{6}|\d{9})))\s*$`) // match 15:04:05, 15, 15:04:05.000, 15:04:05.000000, etc - -// Parse parse string to time -func (now *Now) Parse(strs ...string) (t time.Time, err error) { - var ( - setCurrentTime bool - parseTime []int - currentTime = []int{now.Nanosecond(), now.Second(), now.Minute(), now.Hour(), now.Day(), int(now.Month()), now.Year()} - currentLocation = now.Location() - onlyTimeInStr = true - ) - - for _, str := range strs { - hasTimeInStr := hasTimeRegexp.MatchString(str) // match 15:04:05, 15 - onlyTimeInStr = hasTimeInStr && onlyTimeInStr && onlyTimeRegexp.MatchString(str) - if t, err = parseWithFormat(str); err == nil { - location := t.Location() - if location.String() == "UTC" { - location = currentLocation - } - - parseTime = []int{t.Nanosecond(), t.Second(), t.Minute(), t.Hour(), t.Day(), int(t.Month()), t.Year()} - - for i, v := range parseTime { - // Don't reset hour, minute, second if current time str including time - if hasTimeInStr && i <= 3 { - continue - } - - // If value is zero, replace it with current time - if v == 0 { - if setCurrentTime { - parseTime[i] = currentTime[i] - } - } else { - setCurrentTime = true - } - - // if current time only includes time, should change day, month to current time - if onlyTimeInStr { - if i == 4 || i == 5 { - parseTime[i] = currentTime[i] - continue - } - } - } - - t = time.Date(parseTime[6], time.Month(parseTime[5]), parseTime[4], parseTime[3], parseTime[2], parseTime[1], parseTime[0], location) - currentTime = []int{t.Nanosecond(), t.Second(), t.Minute(), t.Hour(), t.Day(), int(t.Month()), t.Year()} - } - } - return -} - -// MustParse must parse string to time or it will panic -func (now *Now) MustParse(strs ...string) (t time.Time) { - t, err := now.Parse(strs...) - if err != nil { - panic(err) - } - return t -} - -// Between check time between the begin, end time or not -func (now *Now) Between(begin, end string) bool { - beginTime := now.MustParse(begin) - endTime := now.MustParse(end) - return now.After(beginTime) && now.Before(endTime) -} diff --git a/deps/github.com/jinzhu/now/now_test.go b/deps/github.com/jinzhu/now/now_test.go deleted file mode 100644 index 1e0a9c966..000000000 --- a/deps/github.com/jinzhu/now/now_test.go +++ /dev/null @@ -1,344 +0,0 @@ -package now - -import ( - "testing" - "time" -) - -var ( - format = "2006-01-02 15:04:05.999999999" - locationCaracas *time.Location - locationBerlin *time.Location - timeCaracas time.Time -) - -func init() { - var err error - if locationCaracas, err = time.LoadLocation("America/Caracas"); err != nil { - panic(err) - } - - if locationBerlin, err = time.LoadLocation("Europe/Berlin"); err != nil { - panic(err) - } - - timeCaracas = time.Date(2016, 1, 1, 12, 10, 0, 0, locationCaracas) -} - -func assertT(t *testing.T) func(time.Time, string, string) { - return func(actual time.Time, expected string, msg string) { - actualStr := actual.Format(format) - if actualStr != expected { - t.Errorf("Failed %s: actual: %v, expected: %v", msg, actualStr, expected) - } - } -} - -func TestBeginningOf(t *testing.T) { - assert := assertT(t) - - n := time.Date(2013, 11, 18, 17, 51, 49, 123456789, time.UTC) - - assert(New(n).BeginningOfMinute(), "2013-11-18 17:51:00", "BeginningOfMinute") - - WeekStartDay = time.Monday - assert(New(n).BeginningOfWeek(), "2013-11-18 00:00:00", "BeginningOfWeek, FirstDayMonday") - - WeekStartDay = time.Tuesday - assert(New(n).BeginningOfWeek(), "2013-11-12 00:00:00", "BeginningOfWeek, FirstDayTuesday") - - WeekStartDay = time.Wednesday - assert(New(n).BeginningOfWeek(), "2013-11-13 00:00:00", "BeginningOfWeek, FirstDayWednesday") - - WeekStartDay = time.Thursday - assert(New(n).BeginningOfWeek(), "2013-11-14 00:00:00", "BeginningOfWeek, FirstDayThursday") - - WeekStartDay = time.Friday - assert(New(n).BeginningOfWeek(), "2013-11-15 00:00:00", "BeginningOfWeek, FirstDayFriday") - - WeekStartDay = time.Saturday - assert(New(n).BeginningOfWeek(), "2013-11-16 00:00:00", "BeginningOfWeek, FirstDaySaturday") - - WeekStartDay = time.Sunday - assert(New(n).BeginningOfWeek(), "2013-11-17 00:00:00", "BeginningOfWeek, FirstDaySunday") - - assert(New(n).BeginningOfHour(), "2013-11-18 17:00:00", "BeginningOfHour") - - // Truncate with hour bug - assert(New(timeCaracas).BeginningOfHour(), "2016-01-01 12:00:00", "BeginningOfHour Caracas") - - assert(New(n).BeginningOfDay(), "2013-11-18 00:00:00", "BeginningOfDay") - - location, err := time.LoadLocation("Japan") - if err != nil { - t.Fatalf("Error loading location: %v", err) - } - beginningOfDay := time.Date(2015, 05, 01, 0, 0, 0, 0, location) - assert(New(beginningOfDay).BeginningOfDay(), "2015-05-01 00:00:00", "BeginningOfDay") - - // DST - dstBeginningOfDay := time.Date(2017, 10, 29, 10, 0, 0, 0, locationBerlin) - assert(New(dstBeginningOfDay).BeginningOfDay(), "2017-10-29 00:00:00", "BeginningOfDay DST") - - assert(New(n).BeginningOfWeek(), "2013-11-17 00:00:00", "BeginningOfWeek") - - dstBegginingOfWeek := time.Date(2017, 10, 30, 12, 0, 0, 0, locationBerlin) - assert(New(dstBegginingOfWeek).BeginningOfWeek(), "2017-10-29 00:00:00", "BeginningOfWeek") - - dstBegginingOfWeek = time.Date(2017, 10, 29, 12, 0, 0, 0, locationBerlin) - assert(New(dstBegginingOfWeek).BeginningOfWeek(), "2017-10-29 00:00:00", "BeginningOfWeek") - - WeekStartDay = time.Monday - assert(New(n).BeginningOfWeek(), "2013-11-18 00:00:00", "BeginningOfWeek, FirstDayMonday") - dstBegginingOfWeek = time.Date(2017, 10, 24, 12, 0, 0, 0, locationBerlin) - assert(New(dstBegginingOfWeek).BeginningOfWeek(), "2017-10-23 00:00:00", "BeginningOfWeek, FirstDayMonday") - - dstBegginingOfWeek = time.Date(2017, 10, 29, 12, 0, 0, 0, locationBerlin) - assert(New(dstBegginingOfWeek).BeginningOfWeek(), "2017-10-23 00:00:00", "BeginningOfWeek, FirstDayMonday") - - WeekStartDay = time.Sunday - - assert(New(n).BeginningOfMonth(), "2013-11-01 00:00:00", "BeginningOfMonth") - - // DST - dstBeginningOfMonth := time.Date(2017, 10, 31, 0, 0, 0, 0, locationBerlin) - assert(New(dstBeginningOfMonth).BeginningOfMonth(), "2017-10-01 00:00:00", "BeginningOfMonth DST") - - assert(New(n).BeginningOfQuarter(), "2013-10-01 00:00:00", "BeginningOfQuarter") - - // DST - assert(New(dstBeginningOfMonth).BeginningOfQuarter(), "2017-10-01 00:00:00", "BeginningOfQuarter DST") - dstBeginningOfQuarter := time.Date(2017, 11, 24, 0, 0, 0, 0, locationBerlin) - assert(New(dstBeginningOfQuarter).BeginningOfQuarter(), "2017-10-01 00:00:00", "BeginningOfQuarter DST") - - assert(New(n.AddDate(0, -1, 0)).BeginningOfQuarter(), "2013-10-01 00:00:00", "BeginningOfQuarter") - - assert(New(n.AddDate(0, 1, 0)).BeginningOfQuarter(), "2013-10-01 00:00:00", "BeginningOfQuarter") - - // DST - assert(New(dstBeginningOfQuarter).BeginningOfYear(), "2017-01-01 00:00:00", "BeginningOfYear DST") - - assert(New(timeCaracas).BeginningOfYear(), "2016-01-01 00:00:00", "BeginningOfYear Caracas") -} - -func TestEndOf(t *testing.T) { - assert := assertT(t) - - n := time.Date(2013, 11, 18, 17, 51, 49, 123456789, time.UTC) - - assert(New(n).EndOfMinute(), "2013-11-18 17:51:59.999999999", "EndOfMinute") - - assert(New(n).EndOfHour(), "2013-11-18 17:59:59.999999999", "EndOfHour") - - assert(New(timeCaracas).EndOfHour(), "2016-01-01 12:59:59.999999999", "EndOfHour Caracas") - - assert(New(n).EndOfDay(), "2013-11-18 23:59:59.999999999", "EndOfDay") - - dstEndOfDay := time.Date(2017, 10, 29, 1, 0, 0, 0, locationBerlin) - assert(New(dstEndOfDay).EndOfDay(), "2017-10-29 23:59:59.999999999", "EndOfDay DST") - - WeekStartDay = time.Tuesday - assert(New(n).EndOfWeek(), "2013-11-18 23:59:59.999999999", "EndOfWeek, FirstDayTuesday") - - WeekStartDay = time.Wednesday - assert(New(n).EndOfWeek(), "2013-11-19 23:59:59.999999999", "EndOfWeek, FirstDayWednesday") - - WeekStartDay = time.Thursday - assert(New(n).EndOfWeek(), "2013-11-20 23:59:59.999999999", "EndOfWeek, FirstDayThursday") - - WeekStartDay = time.Friday - assert(New(n).EndOfWeek(), "2013-11-21 23:59:59.999999999", "EndOfWeek, FirstDayFriday") - - WeekStartDay = time.Saturday - assert(New(n).EndOfWeek(), "2013-11-22 23:59:59.999999999", "EndOfWeek, FirstDaySaturday") - - WeekStartDay = time.Sunday - assert(New(n).EndOfWeek(), "2013-11-23 23:59:59.999999999", "EndOfWeek, FirstDaySunday") - - WeekStartDay = time.Monday - assert(New(n).EndOfWeek(), "2013-11-24 23:59:59.999999999", "EndOfWeek, FirstDayMonday") - - dstEndOfWeek := time.Date(2017, 10, 24, 12, 0, 0, 0, locationBerlin) - assert(New(dstEndOfWeek).EndOfWeek(), "2017-10-29 23:59:59.999999999", "EndOfWeek, FirstDayMonday") - - dstEndOfWeek = time.Date(2017, 10, 29, 12, 0, 0, 0, locationBerlin) - assert(New(dstEndOfWeek).EndOfWeek(), "2017-10-29 23:59:59.999999999", "EndOfWeek, FirstDayMonday") - - WeekStartDay = time.Sunday - assert(New(n).EndOfWeek(), "2013-11-23 23:59:59.999999999", "EndOfWeek") - - dstEndOfWeek = time.Date(2017, 10, 29, 0, 0, 0, 0, locationBerlin) - assert(New(dstEndOfWeek).EndOfWeek(), "2017-11-04 23:59:59.999999999", "EndOfWeek") - - dstEndOfWeek = time.Date(2017, 10, 29, 12, 0, 0, 0, locationBerlin) - assert(New(dstEndOfWeek).EndOfWeek(), "2017-11-04 23:59:59.999999999", "EndOfWeek") - - assert(New(n).EndOfMonth(), "2013-11-30 23:59:59.999999999", "EndOfMonth") - - assert(New(n).EndOfQuarter(), "2013-12-31 23:59:59.999999999", "EndOfQuarter") - - assert(New(n.AddDate(0, -1, 0)).EndOfQuarter(), "2013-12-31 23:59:59.999999999", "EndOfQuarter") - - assert(New(n.AddDate(0, 1, 0)).EndOfQuarter(), "2013-12-31 23:59:59.999999999", "EndOfQuarter") - - assert(New(n).EndOfYear(), "2013-12-31 23:59:59.999999999", "EndOfYear") - - n1 := time.Date(2013, 02, 18, 17, 51, 49, 123456789, time.UTC) - assert(New(n1).EndOfMonth(), "2013-02-28 23:59:59.999999999", "EndOfMonth for 2013/02") - - n2 := time.Date(1900, 02, 18, 17, 51, 49, 123456789, time.UTC) - assert(New(n2).EndOfMonth(), "1900-02-28 23:59:59.999999999", "EndOfMonth") -} - -func TestMondayAndSunday(t *testing.T) { - assert := assertT(t) - - n := time.Date(2013, 11, 19, 17, 51, 49, 123456789, time.UTC) - n2 := time.Date(2013, 11, 24, 17, 51, 49, 123456789, time.UTC) - nDst := time.Date(2017, 10, 29, 10, 0, 0, 0, locationBerlin) - - assert(New(n).Monday(), "2013-11-18 00:00:00", "Monday") - - assert(New(n2).Monday(), "2013-11-18 00:00:00", "Monday") - - assert(New(timeCaracas).Monday(), "2015-12-28 00:00:00", "Monday Caracas") - - assert(New(nDst).Monday(), "2017-10-23 00:00:00", "Monday DST") - - assert(New(n).Sunday(), "2013-11-24 00:00:00", "Sunday") - - assert(New(n2).Sunday(), "2013-11-24 00:00:00", "Sunday") - - assert(New(timeCaracas).Sunday(), "2016-01-03 00:00:00", "Sunday Caracas") - - assert(New(nDst).Sunday(), "2017-10-29 00:00:00", "Sunday DST") - - assert(New(n).EndOfSunday(), "2013-11-24 23:59:59.999999999", "EndOfSunday") - - assert(New(timeCaracas).EndOfSunday(), "2016-01-03 23:59:59.999999999", "EndOfSunday Caracas") - - assert(New(nDst).EndOfSunday(), "2017-10-29 23:59:59.999999999", "EndOfSunday DST") - - assert(New(n).BeginningOfWeek(), "2013-11-17 00:00:00", "BeginningOfWeek, FirstDayMonday") - - WeekStartDay = time.Monday - assert(New(n).BeginningOfWeek(), "2013-11-18 00:00:00", "BeginningOfWeek, FirstDayMonday") -} - -func TestParse(t *testing.T) { - assert := assertT(t) - - n := time.Date(2013, 11, 18, 17, 51, 49, 123456789, time.UTC) - - assert(New(n).MustParse("2002"), "2002-01-01 00:00:00", "Parse 2002") - - assert(New(n).MustParse("2002-10"), "2002-10-01 00:00:00", "Parse 2002-10") - - assert(New(n).MustParse("2002-10-12"), "2002-10-12 00:00:00", "Parse 2002-10-12") - - assert(New(n).MustParse("2002-10-12 22"), "2002-10-12 22:00:00", "Parse 2002-10-12 22") - - assert(New(n).MustParse("2002-10-12 22:14"), "2002-10-12 22:14:00", "Parse 2002-10-12 22:14") - - assert(New(n).MustParse("2002-10-12 2:4"), "2002-10-12 02:04:00", "Parse 2002-10-12 2:4") - - assert(New(n).MustParse("2002-10-12 02:04"), "2002-10-12 02:04:00", "Parse 2002-10-12 02:04") - - assert(New(n).MustParse("2002-10-12 22:14:56"), "2002-10-12 22:14:56", "Parse 2002-10-12 22:14:56") - - assert(New(n).MustParse("2002-10-12 00:14:56"), "2002-10-12 00:14:56", "Parse 2002-10-12 00:14:56") - - assert(New(n).MustParse("2013-12-19 23:28:09.999999999 +0800 CST"), "2013-12-19 23:28:09.999999999", "Parse two strings 2013-12-19 23:28:09.999999999 +0800 CST") - - assert(New(n).MustParse("10-12"), "2013-10-12 00:00:00", "Parse 10-12") - - assert(New(n).MustParse("18"), "2013-11-18 18:00:00", "Parse 18 as hour") - - assert(New(n).MustParse("18:20"), "2013-11-18 18:20:00", "Parse 18:20") - - assert(New(n).MustParse("00:01"), "2013-11-18 00:01:00", "Parse 00:01") - - assert(New(n).MustParse("00:00:00"), "2013-11-18 00:00:00", "Parse 00:00:00") - - assert(New(n).MustParse("18:20:39"), "2013-11-18 18:20:39", "Parse 18:20:39") - - assert(New(n).MustParse("18:20:39", "2011-01-01"), "2011-01-01 18:20:39", "Parse two strings 18:20:39, 2011-01-01") - - assert(New(n).MustParse("2011-1-1", "18:20:39"), "2011-01-01 18:20:39", "Parse two strings 2011-01-01, 18:20:39") - - assert(New(n).MustParse("2011-01-01", "18"), "2011-01-01 18:00:00", "Parse two strings 2011-01-01, 18") - - TimeFormats = append(TimeFormats, "02 Jan 15:04") - assert(New(n).MustParse("04 Feb 12:09"), "2013-02-04 12:09:00", "Parse 04 Feb 12:09 with specified format") - - assert(New(n).MustParse("23:28:9 Dec 19, 2013 PST"), "2013-12-19 23:28:09", "Parse 23:28:9 Dec 19, 2013 PST") - - if New(n).MustParse("23:28:9 Dec 19, 2013 PST").Location().String() != "PST" { - t.Errorf("Parse 23:28:9 Dec 19, 2013 PST shouldn't lose time zone") - } - - n2 := New(n).MustParse("23:28:9 Dec 19, 2013 PST") - if New(n2).MustParse("10:20").Location().String() != "PST" { - t.Errorf("Parse 10:20 shouldn't change time zone") - } - - TimeFormats = append(TimeFormats, "2006-01-02T15:04:05.0") - if MustParseInLocation(time.UTC, "2018-02-13T15:17:06.0").String() != "2018-02-13 15:17:06 +0000 UTC" { - t.Errorf("ParseInLocation 2018-02-13T15:17:06.0") - } - - TimeFormats = append(TimeFormats, "2006-01-02 15:04:05.000") - assert(New(n).MustParse("2018-04-20 21:22:23.473"), "2018-04-20 21:22:23.473", "Parse 2018/04/20 21:22:23.473") - - TimeFormats = append(TimeFormats, "15:04:05.000") - assert(New(n).MustParse("13:00:01.365"), "2013-11-18 13:00:01.365", "Parse 13:00:01.365") - - TimeFormats = append(TimeFormats, "2006-01-02 15:04:05.000000") - assert(New(n).MustParse("2010-01-01 07:24:23.131384"), "2010-01-01 07:24:23.131384", "Parse 2010-01-01 07:24:23.131384") - assert(New(n).MustParse("00:00:00.182736"), "2013-11-18 00:00:00.182736", "Parse 00:00:00.182736") -} - -func TestBetween(t *testing.T) { - tm := time.Date(2015, 06, 30, 17, 51, 49, 123456789, time.Now().Location()) - if !New(tm).Between("23:28:9 Dec 19, 2013 PST", "23:28:9 Dec 19, 2015 PST") { - t.Errorf("Between") - } - - if !New(tm).Between("2015-05-12 12:20", "2015-06-30 17:51:50") { - t.Errorf("Between") - } -} - -func Example() { - time.Now() // 2013-11-18 17:51:49.123456789 Mon - - BeginningOfMinute() // 2013-11-18 17:51:00 Mon - BeginningOfHour() // 2013-11-18 17:00:00 Mon - BeginningOfDay() // 2013-11-18 00:00:00 Mon - BeginningOfWeek() // 2013-11-17 00:00:00 Sun - - WeekStartDay = time.Monday // Set Monday as first day - BeginningOfWeek() // 2013-11-18 00:00:00 Mon - BeginningOfMonth() // 2013-11-01 00:00:00 Fri - BeginningOfQuarter() // 2013-10-01 00:00:00 Tue - BeginningOfYear() // 2013-01-01 00:00:00 Tue - - EndOfMinute() // 2013-11-18 17:51:59.999999999 Mon - EndOfHour() // 2013-11-18 17:59:59.999999999 Mon - EndOfDay() // 2013-11-18 23:59:59.999999999 Mon - EndOfWeek() // 2013-11-23 23:59:59.999999999 Sat - - WeekStartDay = time.Monday // Set Monday as first day - EndOfWeek() // 2013-11-24 23:59:59.999999999 Sun - EndOfMonth() // 2013-11-30 23:59:59.999999999 Sat - EndOfQuarter() // 2013-12-31 23:59:59.999999999 Tue - EndOfYear() // 2013-12-31 23:59:59.999999999 Tue - - // Use another time - t := time.Date(2013, 02, 18, 17, 51, 49, 123456789, time.UTC) - New(t).EndOfMonth() // 2013-02-28 23:59:59.999999999 Thu - - Monday() // 2013-11-18 00:00:00 Mon - Sunday() // 2013-11-24 00:00:00 Sun - EndOfSunday() // 2013-11-24 23:59:59.999999999 Sun -} diff --git a/deps/github.com/jinzhu/now/wercker.yml b/deps/github.com/jinzhu/now/wercker.yml deleted file mode 100644 index 5e6ce981d..000000000 --- a/deps/github.com/jinzhu/now/wercker.yml +++ /dev/null @@ -1,23 +0,0 @@ -box: golang - -build: - steps: - - setup-go-workspace - - # Gets the dependencies - - script: - name: go get - code: | - go get - - # Build the project - - script: - name: go build - code: | - go build ./... - - # Test the project - - script: - name: go test - code: | - go test ./... diff --git a/deps/github.com/json-iterator/go/Gopkg.lock b/deps/github.com/json-iterator/go/Gopkg.lock index f34f5b4ad..3719afe8e 100644 --- a/deps/github.com/json-iterator/go/Gopkg.lock +++ b/deps/github.com/json-iterator/go/Gopkg.lock @@ -2,32 +2,26 @@ [[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - branch = "master" - name = "github.com/google/gofuzz" + name = "github.com/json-iterator/go" packages = ["."] - revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" + revision = "ca39e5af3ece67bbcda3d0f4f56a8e24d9f2dad4" + version = "1.1.3" [[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" + name = "github.com/modern-go/concurrent" + packages = ["."] + revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" + version = "1.0.0" [[projects]] - name = "github.com/stretchr/testify" - packages = ["assert","require"] - revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0" - version = "v1.1.4" + name = "github.com/modern-go/reflect2" + packages = ["."] + revision = "1df9eeb2bb81f327b96228865c5687bc2194af3f" + version = "1.0.0" [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "f8b7cf3941d3792cbbd570bb53c093adaf774334d1162c651565c97a58dc9d09" + inputs-digest = "56a0b9e9e61d2bc8af5e1b68537401b7f4d60805eda3d107058f3171aa5cf793" solver-name = "gps-cdcl" solver-version = 1 diff --git a/deps/github.com/json-iterator/go/Gopkg.toml b/deps/github.com/json-iterator/go/Gopkg.toml index 0ac55ef87..5801ffa1e 100644 --- a/deps/github.com/json-iterator/go/Gopkg.toml +++ b/deps/github.com/json-iterator/go/Gopkg.toml @@ -19,15 +19,8 @@ # name = "github.com/x/y" # version = "2.4.0" +ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"] [[constraint]] - name = "github.com/davecgh/go-spew" - version = "1.1.0" - -[[constraint]] - branch = "master" - name = "github.com/google/gofuzz" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.1.4" + name = "github.com/modern-go/reflect2" + version = "1.0.0" diff --git a/deps/github.com/json-iterator/go/README.md b/deps/github.com/json-iterator/go/README.md index 3a0d68098..54d5afe95 100644 --- a/deps/github.com/json-iterator/go/README.md +++ b/deps/github.com/json-iterator/go/README.md @@ -8,6 +8,8 @@ A high-performance 100% compatible drop-in replacement of "encoding/json" +You can also use thrift like JSON using [thrift-iterator](https://github.com/thrift-iterator/go) + ``` Go开发者们请加入我们,滴滴出行平台技术部 taowen@didichuxing.com ``` @@ -29,6 +31,9 @@ Raw Result (easyjson requires static code generation) | easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op | | jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op | +Always benchmark with your own workload. +The result depends heavily on the data input. + # Usage 100% compatibility with standard lib diff --git a/deps/github.com/json-iterator/go/adapter.go b/deps/github.com/json-iterator/go/adapter.go new file mode 100644 index 000000000..f371bfed7 --- /dev/null +++ b/deps/github.com/json-iterator/go/adapter.go @@ -0,0 +1,148 @@ +package jsoniter + +import ( + "bytes" + "io" +) + +// RawMessage to make replace json with jsoniter +type RawMessage []byte + +// Unmarshal adapts to json/encoding Unmarshal API +// +// Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v. +// Refer to https://godoc.org/encoding/json#Unmarshal for more information +func Unmarshal(data []byte, v interface{}) error { + return ConfigDefault.Unmarshal(data, v) +} + +// UnmarshalFromString convenient method to read from string instead of []byte +func UnmarshalFromString(str string, v interface{}) error { + return ConfigDefault.UnmarshalFromString(str, v) +} + +// Get quick method to get value from deeply nested JSON structure +func Get(data []byte, path ...interface{}) Any { + return ConfigDefault.Get(data, path...) +} + +// Marshal adapts to json/encoding Marshal API +// +// Marshal returns the JSON encoding of v, adapts to json/encoding Marshal API +// Refer to https://godoc.org/encoding/json#Marshal for more information +func Marshal(v interface{}) ([]byte, error) { + return ConfigDefault.Marshal(v) +} + +// MarshalIndent same as json.MarshalIndent. Prefix is not supported. +func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { + return ConfigDefault.MarshalIndent(v, prefix, indent) +} + +// MarshalToString convenient method to write as string instead of []byte +func MarshalToString(v interface{}) (string, error) { + return ConfigDefault.MarshalToString(v) +} + +// NewDecoder adapts to json/stream NewDecoder API. +// +// NewDecoder returns a new decoder that reads from r. +// +// Instead of a json/encoding Decoder, an Decoder is returned +// Refer to https://godoc.org/encoding/json#NewDecoder for more information +func NewDecoder(reader io.Reader) *Decoder { + return ConfigDefault.NewDecoder(reader) +} + +// Decoder reads and decodes JSON values from an input stream. +// Decoder provides identical APIs with json/stream Decoder (Token() and UseNumber() are in progress) +type Decoder struct { + iter *Iterator +} + +// Decode decode JSON into interface{} +func (adapter *Decoder) Decode(obj interface{}) error { + if adapter.iter.head == adapter.iter.tail && adapter.iter.reader != nil { + if !adapter.iter.loadMore() { + return io.EOF + } + } + adapter.iter.ReadVal(obj) + err := adapter.iter.Error + if err == io.EOF { + return nil + } + return adapter.iter.Error +} + +// More is there more? +func (adapter *Decoder) More() bool { + iter := adapter.iter + if iter.Error != nil { + return false + } + if iter.head != iter.tail { + return true + } + return iter.loadMore() +} + +// Buffered remaining buffer +func (adapter *Decoder) Buffered() io.Reader { + remaining := adapter.iter.buf[adapter.iter.head:adapter.iter.tail] + return bytes.NewReader(remaining) +} + +// UseNumber causes the Decoder to unmarshal a number into an interface{} as a +// Number instead of as a float64. +func (adapter *Decoder) UseNumber() { + cfg := adapter.iter.cfg.configBeforeFrozen + cfg.UseNumber = true + adapter.iter.cfg = cfg.frozeWithCacheReuse() +} + +// DisallowUnknownFields causes the Decoder to return an error when the destination +// is a struct and the input contains object keys which do not match any +// non-ignored, exported fields in the destination. +func (adapter *Decoder) DisallowUnknownFields() { + cfg := adapter.iter.cfg.configBeforeFrozen + cfg.DisallowUnknownFields = true + adapter.iter.cfg = cfg.frozeWithCacheReuse() +} + +// NewEncoder same as json.NewEncoder +func NewEncoder(writer io.Writer) *Encoder { + return ConfigDefault.NewEncoder(writer) +} + +// Encoder same as json.Encoder +type Encoder struct { + stream *Stream +} + +// Encode encode interface{} as JSON to io.Writer +func (adapter *Encoder) Encode(val interface{}) error { + adapter.stream.WriteVal(val) + adapter.stream.WriteRaw("\n") + adapter.stream.Flush() + return adapter.stream.Error +} + +// SetIndent set the indention. Prefix is not supported +func (adapter *Encoder) SetIndent(prefix, indent string) { + config := adapter.stream.cfg.configBeforeFrozen + config.IndentionStep = len(indent) + adapter.stream.cfg = config.frozeWithCacheReuse() +} + +// SetEscapeHTML escape html by default, set to false to disable +func (adapter *Encoder) SetEscapeHTML(escapeHTML bool) { + config := adapter.stream.cfg.configBeforeFrozen + config.EscapeHTML = escapeHTML + adapter.stream.cfg = config.frozeWithCacheReuse() +} + +// Valid reports whether data is a valid JSON encoding. +func Valid(data []byte) bool { + return ConfigDefault.Valid(data) +} diff --git a/deps/github.com/json-iterator/go/any.go b/deps/github.com/json-iterator/go/any.go new file mode 100644 index 000000000..daecfed61 --- /dev/null +++ b/deps/github.com/json-iterator/go/any.go @@ -0,0 +1,321 @@ +package jsoniter + +import ( + "errors" + "fmt" + "github.com/modern-go/reflect2" + "io" + "reflect" + "strconv" + "unsafe" +) + +// Any generic object representation. +// The lazy json implementation holds []byte and parse lazily. +type Any interface { + LastError() error + ValueType() ValueType + MustBeValid() Any + ToBool() bool + ToInt() int + ToInt32() int32 + ToInt64() int64 + ToUint() uint + ToUint32() uint32 + ToUint64() uint64 + ToFloat32() float32 + ToFloat64() float64 + ToString() string + ToVal(val interface{}) + Get(path ...interface{}) Any + Size() int + Keys() []string + GetInterface() interface{} + WriteTo(stream *Stream) +} + +type baseAny struct{} + +func (any *baseAny) Get(path ...interface{}) Any { + return &invalidAny{baseAny{}, fmt.Errorf("GetIndex %v from simple value", path)} +} + +func (any *baseAny) Size() int { + return 0 +} + +func (any *baseAny) Keys() []string { + return []string{} +} + +func (any *baseAny) ToVal(obj interface{}) { + panic("not implemented") +} + +// WrapInt32 turn int32 into Any interface +func WrapInt32(val int32) Any { + return &int32Any{baseAny{}, val} +} + +// WrapInt64 turn int64 into Any interface +func WrapInt64(val int64) Any { + return &int64Any{baseAny{}, val} +} + +// WrapUint32 turn uint32 into Any interface +func WrapUint32(val uint32) Any { + return &uint32Any{baseAny{}, val} +} + +// WrapUint64 turn uint64 into Any interface +func WrapUint64(val uint64) Any { + return &uint64Any{baseAny{}, val} +} + +// WrapFloat64 turn float64 into Any interface +func WrapFloat64(val float64) Any { + return &floatAny{baseAny{}, val} +} + +// WrapString turn string into Any interface +func WrapString(val string) Any { + return &stringAny{baseAny{}, val} +} + +// Wrap turn a go object into Any interface +func Wrap(val interface{}) Any { + if val == nil { + return &nilAny{} + } + asAny, isAny := val.(Any) + if isAny { + return asAny + } + typ := reflect2.TypeOf(val) + switch typ.Kind() { + case reflect.Slice: + return wrapArray(val) + case reflect.Struct: + return wrapStruct(val) + case reflect.Map: + return wrapMap(val) + case reflect.String: + return WrapString(val.(string)) + case reflect.Int: + if strconv.IntSize == 32 { + return WrapInt32(int32(val.(int))) + } + return WrapInt64(int64(val.(int))) + case reflect.Int8: + return WrapInt32(int32(val.(int8))) + case reflect.Int16: + return WrapInt32(int32(val.(int16))) + case reflect.Int32: + return WrapInt32(val.(int32)) + case reflect.Int64: + return WrapInt64(val.(int64)) + case reflect.Uint: + if strconv.IntSize == 32 { + return WrapUint32(uint32(val.(uint))) + } + return WrapUint64(uint64(val.(uint))) + case reflect.Uintptr: + if ptrSize == 32 { + return WrapUint32(uint32(val.(uintptr))) + } + return WrapUint64(uint64(val.(uintptr))) + case reflect.Uint8: + return WrapUint32(uint32(val.(uint8))) + case reflect.Uint16: + return WrapUint32(uint32(val.(uint16))) + case reflect.Uint32: + return WrapUint32(uint32(val.(uint32))) + case reflect.Uint64: + return WrapUint64(val.(uint64)) + case reflect.Float32: + return WrapFloat64(float64(val.(float32))) + case reflect.Float64: + return WrapFloat64(val.(float64)) + case reflect.Bool: + if val.(bool) == true { + return &trueAny{} + } + return &falseAny{} + } + return &invalidAny{baseAny{}, fmt.Errorf("unsupported type: %v", typ)} +} + +// ReadAny read next JSON element as an Any object. It is a better json.RawMessage. +func (iter *Iterator) ReadAny() Any { + return iter.readAny() +} + +func (iter *Iterator) readAny() Any { + c := iter.nextToken() + switch c { + case '"': + iter.unreadByte() + return &stringAny{baseAny{}, iter.ReadString()} + case 'n': + iter.skipThreeBytes('u', 'l', 'l') // null + return &nilAny{} + case 't': + iter.skipThreeBytes('r', 'u', 'e') // true + return &trueAny{} + case 'f': + iter.skipFourBytes('a', 'l', 's', 'e') // false + return &falseAny{} + case '{': + return iter.readObjectAny() + case '[': + return iter.readArrayAny() + case '-': + return iter.readNumberAny(false) + case 0: + return &invalidAny{baseAny{}, errors.New("input is empty")} + default: + return iter.readNumberAny(true) + } +} + +func (iter *Iterator) readNumberAny(positive bool) Any { + iter.startCapture(iter.head - 1) + iter.skipNumber() + lazyBuf := iter.stopCapture() + return &numberLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} +} + +func (iter *Iterator) readObjectAny() Any { + iter.startCapture(iter.head - 1) + iter.skipObject() + lazyBuf := iter.stopCapture() + return &objectLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} +} + +func (iter *Iterator) readArrayAny() Any { + iter.startCapture(iter.head - 1) + iter.skipArray() + lazyBuf := iter.stopCapture() + return &arrayLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} +} + +func locateObjectField(iter *Iterator, target string) []byte { + var found []byte + iter.ReadObjectCB(func(iter *Iterator, field string) bool { + if field == target { + found = iter.SkipAndReturnBytes() + return false + } + iter.Skip() + return true + }) + return found +} + +func locateArrayElement(iter *Iterator, target int) []byte { + var found []byte + n := 0 + iter.ReadArrayCB(func(iter *Iterator) bool { + if n == target { + found = iter.SkipAndReturnBytes() + return false + } + iter.Skip() + n++ + return true + }) + return found +} + +func locatePath(iter *Iterator, path []interface{}) Any { + for i, pathKeyObj := range path { + switch pathKey := pathKeyObj.(type) { + case string: + valueBytes := locateObjectField(iter, pathKey) + if valueBytes == nil { + return newInvalidAny(path[i:]) + } + iter.ResetBytes(valueBytes) + case int: + valueBytes := locateArrayElement(iter, pathKey) + if valueBytes == nil { + return newInvalidAny(path[i:]) + } + iter.ResetBytes(valueBytes) + case int32: + if '*' == pathKey { + return iter.readAny().Get(path[i:]...) + } + return newInvalidAny(path[i:]) + default: + return newInvalidAny(path[i:]) + } + } + if iter.Error != nil && iter.Error != io.EOF { + return &invalidAny{baseAny{}, iter.Error} + } + return iter.readAny() +} + +var anyType = reflect2.TypeOfPtr((*Any)(nil)).Elem() + +func createDecoderOfAny(ctx *ctx, typ reflect2.Type) ValDecoder { + if typ == anyType { + return &directAnyCodec{} + } + if typ.Implements(anyType) { + return &anyCodec{ + valType: typ, + } + } + return nil +} + +func createEncoderOfAny(ctx *ctx, typ reflect2.Type) ValEncoder { + if typ == anyType { + return &directAnyCodec{} + } + if typ.Implements(anyType) { + return &anyCodec{ + valType: typ, + } + } + return nil +} + +type anyCodec struct { + valType reflect2.Type +} + +func (codec *anyCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + panic("not implemented") +} + +func (codec *anyCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + obj := codec.valType.UnsafeIndirect(ptr) + any := obj.(Any) + any.WriteTo(stream) +} + +func (codec *anyCodec) IsEmpty(ptr unsafe.Pointer) bool { + obj := codec.valType.UnsafeIndirect(ptr) + any := obj.(Any) + return any.Size() == 0 +} + +type directAnyCodec struct { +} + +func (codec *directAnyCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + *(*Any)(ptr) = iter.readAny() +} + +func (codec *directAnyCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + any := *(*Any)(ptr) + any.WriteTo(stream) +} + +func (codec *directAnyCodec) IsEmpty(ptr unsafe.Pointer) bool { + any := *(*Any)(ptr) + return any.Size() == 0 +} diff --git a/deps/github.com/json-iterator/go/feature_any_array.go b/deps/github.com/json-iterator/go/any_array.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_array.go rename to deps/github.com/json-iterator/go/any_array.go diff --git a/deps/github.com/json-iterator/go/feature_any_bool.go b/deps/github.com/json-iterator/go/any_bool.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_bool.go rename to deps/github.com/json-iterator/go/any_bool.go diff --git a/deps/github.com/json-iterator/go/feature_any_float.go b/deps/github.com/json-iterator/go/any_float.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_float.go rename to deps/github.com/json-iterator/go/any_float.go diff --git a/deps/github.com/json-iterator/go/feature_any_int32.go b/deps/github.com/json-iterator/go/any_int32.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_int32.go rename to deps/github.com/json-iterator/go/any_int32.go diff --git a/deps/github.com/json-iterator/go/feature_any_int64.go b/deps/github.com/json-iterator/go/any_int64.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_int64.go rename to deps/github.com/json-iterator/go/any_int64.go diff --git a/deps/github.com/json-iterator/go/feature_any_invalid.go b/deps/github.com/json-iterator/go/any_invalid.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_invalid.go rename to deps/github.com/json-iterator/go/any_invalid.go diff --git a/deps/github.com/json-iterator/go/feature_any_nil.go b/deps/github.com/json-iterator/go/any_nil.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_nil.go rename to deps/github.com/json-iterator/go/any_nil.go diff --git a/deps/github.com/json-iterator/go/any_number.go b/deps/github.com/json-iterator/go/any_number.go new file mode 100644 index 000000000..9d1e901a6 --- /dev/null +++ b/deps/github.com/json-iterator/go/any_number.go @@ -0,0 +1,123 @@ +package jsoniter + +import ( + "io" + "unsafe" +) + +type numberLazyAny struct { + baseAny + cfg *frozenConfig + buf []byte + err error +} + +func (any *numberLazyAny) ValueType() ValueType { + return NumberValue +} + +func (any *numberLazyAny) MustBeValid() Any { + return any +} + +func (any *numberLazyAny) LastError() error { + return any.err +} + +func (any *numberLazyAny) ToBool() bool { + return any.ToFloat64() != 0 +} + +func (any *numberLazyAny) ToInt() int { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadInt() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToInt32() int32 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadInt32() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToInt64() int64 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadInt64() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToUint() uint { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadUint() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToUint32() uint32 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadUint32() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToUint64() uint64 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadUint64() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToFloat32() float32 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadFloat32() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToFloat64() float64 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadFloat64() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToString() string { + return *(*string)(unsafe.Pointer(&any.buf)) +} + +func (any *numberLazyAny) WriteTo(stream *Stream) { + stream.Write(any.buf) +} + +func (any *numberLazyAny) GetInterface() interface{} { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + return iter.Read() +} diff --git a/deps/github.com/json-iterator/go/feature_any_object.go b/deps/github.com/json-iterator/go/any_object.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_object.go rename to deps/github.com/json-iterator/go/any_object.go diff --git a/deps/github.com/json-iterator/go/any_str.go b/deps/github.com/json-iterator/go/any_str.go new file mode 100644 index 000000000..a4b93c78c --- /dev/null +++ b/deps/github.com/json-iterator/go/any_str.go @@ -0,0 +1,166 @@ +package jsoniter + +import ( + "fmt" + "strconv" +) + +type stringAny struct { + baseAny + val string +} + +func (any *stringAny) Get(path ...interface{}) Any { + if len(path) == 0 { + return any + } + return &invalidAny{baseAny{}, fmt.Errorf("GetIndex %v from simple value", path)} +} + +func (any *stringAny) Parse() *Iterator { + return nil +} + +func (any *stringAny) ValueType() ValueType { + return StringValue +} + +func (any *stringAny) MustBeValid() Any { + return any +} + +func (any *stringAny) LastError() error { + return nil +} + +func (any *stringAny) ToBool() bool { + str := any.ToString() + if str == "0" { + return false + } + for _, c := range str { + switch c { + case ' ', '\n', '\r', '\t': + default: + return true + } + } + return false +} + +func (any *stringAny) ToInt() int { + return int(any.ToInt64()) + +} + +func (any *stringAny) ToInt32() int32 { + return int32(any.ToInt64()) +} + +func (any *stringAny) ToInt64() int64 { + if any.val == "" { + return 0 + } + + flag := 1 + startPos := 0 + endPos := 0 + if any.val[0] == '+' || any.val[0] == '-' { + startPos = 1 + } + + if any.val[0] == '-' { + flag = -1 + } + + for i := startPos; i < len(any.val); i++ { + if any.val[i] >= '0' && any.val[i] <= '9' { + endPos = i + 1 + } else { + break + } + } + parsed, _ := strconv.ParseInt(any.val[startPos:endPos], 10, 64) + return int64(flag) * parsed +} + +func (any *stringAny) ToUint() uint { + return uint(any.ToUint64()) +} + +func (any *stringAny) ToUint32() uint32 { + return uint32(any.ToUint64()) +} + +func (any *stringAny) ToUint64() uint64 { + if any.val == "" { + return 0 + } + + startPos := 0 + endPos := 0 + + if any.val[0] == '-' { + return 0 + } + if any.val[0] == '+' { + startPos = 1 + } + + for i := startPos; i < len(any.val); i++ { + if any.val[i] >= '0' && any.val[i] <= '9' { + endPos = i + 1 + } else { + break + } + } + parsed, _ := strconv.ParseUint(any.val[startPos:endPos], 10, 64) + return parsed +} + +func (any *stringAny) ToFloat32() float32 { + return float32(any.ToFloat64()) +} + +func (any *stringAny) ToFloat64() float64 { + if len(any.val) == 0 { + return 0 + } + + // first char invalid + if any.val[0] != '+' && any.val[0] != '-' && (any.val[0] > '9' || any.val[0] < '0') { + return 0 + } + + // extract valid num expression from string + // eg 123true => 123, -12.12xxa => -12.12 + endPos := 1 + for i := 1; i < len(any.val); i++ { + if any.val[i] == '.' || any.val[i] == 'e' || any.val[i] == 'E' || any.val[i] == '+' || any.val[i] == '-' { + endPos = i + 1 + continue + } + + // end position is the first char which is not digit + if any.val[i] >= '0' && any.val[i] <= '9' { + endPos = i + 1 + } else { + endPos = i + break + } + } + parsed, _ := strconv.ParseFloat(any.val[:endPos], 64) + return parsed +} + +func (any *stringAny) ToString() string { + return any.val +} + +func (any *stringAny) WriteTo(stream *Stream) { + stream.WriteString(any.val) +} + +func (any *stringAny) GetInterface() interface{} { + return any.val +} diff --git a/deps/github.com/json-iterator/go/feature_any_uint32.go b/deps/github.com/json-iterator/go/any_uint32.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_uint32.go rename to deps/github.com/json-iterator/go/any_uint32.go diff --git a/deps/github.com/json-iterator/go/feature_any_uint64.go b/deps/github.com/json-iterator/go/any_uint64.go similarity index 100% rename from deps/github.com/json-iterator/go/feature_any_uint64.go rename to deps/github.com/json-iterator/go/any_uint64.go diff --git a/deps/github.com/json-iterator/go/config.go b/deps/github.com/json-iterator/go/config.go new file mode 100644 index 000000000..835819129 --- /dev/null +++ b/deps/github.com/json-iterator/go/config.go @@ -0,0 +1,372 @@ +package jsoniter + +import ( + "encoding/json" + "io" + "reflect" + "sync" + "unsafe" + + "github.com/modern-go/concurrent" + "github.com/modern-go/reflect2" +) + +// Config customize how the API should behave. +// The API is created from Config by Froze. +type Config struct { + IndentionStep int + MarshalFloatWith6Digits bool + EscapeHTML bool + SortMapKeys bool + UseNumber bool + DisallowUnknownFields bool + TagKey string + OnlyTaggedField bool + ValidateJsonRawMessage bool + ObjectFieldMustBeSimpleString bool + CaseSensitive bool +} + +// API the public interface of this package. +// Primary Marshal and Unmarshal. +type API interface { + IteratorPool + StreamPool + MarshalToString(v interface{}) (string, error) + Marshal(v interface{}) ([]byte, error) + MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) + UnmarshalFromString(str string, v interface{}) error + Unmarshal(data []byte, v interface{}) error + Get(data []byte, path ...interface{}) Any + NewEncoder(writer io.Writer) *Encoder + NewDecoder(reader io.Reader) *Decoder + Valid(data []byte) bool + RegisterExtension(extension Extension) + DecoderOf(typ reflect2.Type) ValDecoder + EncoderOf(typ reflect2.Type) ValEncoder +} + +// ConfigDefault the default API +var ConfigDefault = Config{ + EscapeHTML: true, +}.Froze() + +// ConfigCompatibleWithStandardLibrary tries to be 100% compatible with standard library behavior +var ConfigCompatibleWithStandardLibrary = Config{ + EscapeHTML: true, + SortMapKeys: true, + ValidateJsonRawMessage: true, +}.Froze() + +// ConfigFastest marshals float with only 6 digits precision +var ConfigFastest = Config{ + EscapeHTML: false, + MarshalFloatWith6Digits: true, // will lose precession + ObjectFieldMustBeSimpleString: true, // do not unescape object field +}.Froze() + +type frozenConfig struct { + configBeforeFrozen Config + sortMapKeys bool + indentionStep int + objectFieldMustBeSimpleString bool + onlyTaggedField bool + disallowUnknownFields bool + decoderCache *concurrent.Map + encoderCache *concurrent.Map + extensions []Extension + streamPool *sync.Pool + iteratorPool *sync.Pool + caseSensitive bool +} + +func (cfg *frozenConfig) initCache() { + cfg.decoderCache = concurrent.NewMap() + cfg.encoderCache = concurrent.NewMap() +} + +func (cfg *frozenConfig) addDecoderToCache(cacheKey uintptr, decoder ValDecoder) { + cfg.decoderCache.Store(cacheKey, decoder) +} + +func (cfg *frozenConfig) addEncoderToCache(cacheKey uintptr, encoder ValEncoder) { + cfg.encoderCache.Store(cacheKey, encoder) +} + +func (cfg *frozenConfig) getDecoderFromCache(cacheKey uintptr) ValDecoder { + decoder, found := cfg.decoderCache.Load(cacheKey) + if found { + return decoder.(ValDecoder) + } + return nil +} + +func (cfg *frozenConfig) getEncoderFromCache(cacheKey uintptr) ValEncoder { + encoder, found := cfg.encoderCache.Load(cacheKey) + if found { + return encoder.(ValEncoder) + } + return nil +} + +var cfgCache = concurrent.NewMap() + +func getFrozenConfigFromCache(cfg Config) *frozenConfig { + obj, found := cfgCache.Load(cfg) + if found { + return obj.(*frozenConfig) + } + return nil +} + +func addFrozenConfigToCache(cfg Config, frozenConfig *frozenConfig) { + cfgCache.Store(cfg, frozenConfig) +} + +// Froze forge API from config +func (cfg Config) Froze() API { + api := &frozenConfig{ + sortMapKeys: cfg.SortMapKeys, + indentionStep: cfg.IndentionStep, + objectFieldMustBeSimpleString: cfg.ObjectFieldMustBeSimpleString, + onlyTaggedField: cfg.OnlyTaggedField, + disallowUnknownFields: cfg.DisallowUnknownFields, + caseSensitive: cfg.CaseSensitive, + } + api.streamPool = &sync.Pool{ + New: func() interface{} { + return NewStream(api, nil, 512) + }, + } + api.iteratorPool = &sync.Pool{ + New: func() interface{} { + return NewIterator(api) + }, + } + api.initCache() + encoderExtension := EncoderExtension{} + decoderExtension := DecoderExtension{} + if cfg.MarshalFloatWith6Digits { + api.marshalFloatWith6Digits(encoderExtension) + } + if cfg.EscapeHTML { + api.escapeHTML(encoderExtension) + } + if cfg.UseNumber { + api.useNumber(decoderExtension) + } + if cfg.ValidateJsonRawMessage { + api.validateJsonRawMessage(encoderExtension) + } + if len(encoderExtension) > 0 { + api.extensions = append(api.extensions, encoderExtension) + } + if len(decoderExtension) > 0 { + api.extensions = append(api.extensions, decoderExtension) + } + api.configBeforeFrozen = cfg + return api +} + +func (cfg Config) frozeWithCacheReuse() *frozenConfig { + api := getFrozenConfigFromCache(cfg) + if api != nil { + return api + } + api = cfg.Froze().(*frozenConfig) + addFrozenConfigToCache(cfg, api) + return api +} + +func (cfg *frozenConfig) validateJsonRawMessage(extension EncoderExtension) { + encoder := &funcEncoder{func(ptr unsafe.Pointer, stream *Stream) { + rawMessage := *(*json.RawMessage)(ptr) + iter := cfg.BorrowIterator([]byte(rawMessage)) + iter.Read() + if iter.Error != nil { + stream.WriteRaw("null") + } else { + cfg.ReturnIterator(iter) + stream.WriteRaw(string(rawMessage)) + } + }, func(ptr unsafe.Pointer) bool { + return false + }} + extension[reflect2.TypeOfPtr((*json.RawMessage)(nil)).Elem()] = encoder + extension[reflect2.TypeOfPtr((*RawMessage)(nil)).Elem()] = encoder +} + +func (cfg *frozenConfig) useNumber(extension DecoderExtension) { + extension[reflect2.TypeOfPtr((*interface{})(nil)).Elem()] = &funcDecoder{func(ptr unsafe.Pointer, iter *Iterator) { + exitingValue := *((*interface{})(ptr)) + if exitingValue != nil && reflect.TypeOf(exitingValue).Kind() == reflect.Ptr { + iter.ReadVal(exitingValue) + return + } + if iter.WhatIsNext() == NumberValue { + *((*interface{})(ptr)) = json.Number(iter.readNumberAsString()) + } else { + *((*interface{})(ptr)) = iter.Read() + } + }} +} +func (cfg *frozenConfig) getTagKey() string { + tagKey := cfg.configBeforeFrozen.TagKey + if tagKey == "" { + return "json" + } + return tagKey +} + +func (cfg *frozenConfig) RegisterExtension(extension Extension) { + cfg.extensions = append(cfg.extensions, extension) +} + +type lossyFloat32Encoder struct { +} + +func (encoder *lossyFloat32Encoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteFloat32Lossy(*((*float32)(ptr))) +} + +func (encoder *lossyFloat32Encoder) IsEmpty(ptr unsafe.Pointer) bool { + return *((*float32)(ptr)) == 0 +} + +type lossyFloat64Encoder struct { +} + +func (encoder *lossyFloat64Encoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteFloat64Lossy(*((*float64)(ptr))) +} + +func (encoder *lossyFloat64Encoder) IsEmpty(ptr unsafe.Pointer) bool { + return *((*float64)(ptr)) == 0 +} + +// EnableLossyFloatMarshalling keeps 10**(-6) precision +// for float variables for better performance. +func (cfg *frozenConfig) marshalFloatWith6Digits(extension EncoderExtension) { + // for better performance + extension[reflect2.TypeOfPtr((*float32)(nil)).Elem()] = &lossyFloat32Encoder{} + extension[reflect2.TypeOfPtr((*float64)(nil)).Elem()] = &lossyFloat64Encoder{} +} + +type htmlEscapedStringEncoder struct { +} + +func (encoder *htmlEscapedStringEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + str := *((*string)(ptr)) + stream.WriteStringWithHTMLEscaped(str) +} + +func (encoder *htmlEscapedStringEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return *((*string)(ptr)) == "" +} + +func (cfg *frozenConfig) escapeHTML(encoderExtension EncoderExtension) { + encoderExtension[reflect2.TypeOfPtr((*string)(nil)).Elem()] = &htmlEscapedStringEncoder{} +} + +func (cfg *frozenConfig) cleanDecoders() { + typeDecoders = map[string]ValDecoder{} + fieldDecoders = map[string]ValDecoder{} + *cfg = *(cfg.configBeforeFrozen.Froze().(*frozenConfig)) +} + +func (cfg *frozenConfig) cleanEncoders() { + typeEncoders = map[string]ValEncoder{} + fieldEncoders = map[string]ValEncoder{} + *cfg = *(cfg.configBeforeFrozen.Froze().(*frozenConfig)) +} + +func (cfg *frozenConfig) MarshalToString(v interface{}) (string, error) { + stream := cfg.BorrowStream(nil) + defer cfg.ReturnStream(stream) + stream.WriteVal(v) + if stream.Error != nil { + return "", stream.Error + } + return string(stream.Buffer()), nil +} + +func (cfg *frozenConfig) Marshal(v interface{}) ([]byte, error) { + stream := cfg.BorrowStream(nil) + defer cfg.ReturnStream(stream) + stream.WriteVal(v) + if stream.Error != nil { + return nil, stream.Error + } + result := stream.Buffer() + copied := make([]byte, len(result)) + copy(copied, result) + return copied, nil +} + +func (cfg *frozenConfig) MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { + if prefix != "" { + panic("prefix is not supported") + } + for _, r := range indent { + if r != ' ' { + panic("indent can only be space") + } + } + newCfg := cfg.configBeforeFrozen + newCfg.IndentionStep = len(indent) + return newCfg.frozeWithCacheReuse().Marshal(v) +} + +func (cfg *frozenConfig) UnmarshalFromString(str string, v interface{}) error { + data := []byte(str) + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + iter.ReadVal(v) + c := iter.nextToken() + if c == 0 { + if iter.Error == io.EOF { + return nil + } + return iter.Error + } + iter.ReportError("Unmarshal", "there are bytes left after unmarshal") + return iter.Error +} + +func (cfg *frozenConfig) Get(data []byte, path ...interface{}) Any { + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + return locatePath(iter, path) +} + +func (cfg *frozenConfig) Unmarshal(data []byte, v interface{}) error { + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + iter.ReadVal(v) + c := iter.nextToken() + if c == 0 { + if iter.Error == io.EOF { + return nil + } + return iter.Error + } + iter.ReportError("Unmarshal", "there are bytes left after unmarshal") + return iter.Error +} + +func (cfg *frozenConfig) NewEncoder(writer io.Writer) *Encoder { + stream := NewStream(cfg, writer, 512) + return &Encoder{stream} +} + +func (cfg *frozenConfig) NewDecoder(reader io.Reader) *Decoder { + iter := Parse(cfg, reader, 512) + return &Decoder{iter} +} + +func (cfg *frozenConfig) Valid(data []byte) bool { + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + iter.Skip() + return iter.Error == nil +} diff --git a/deps/github.com/json-iterator/go/feature_adapter.go b/deps/github.com/json-iterator/go/feature_adapter.go deleted file mode 100644 index 0214b711a..000000000 --- a/deps/github.com/json-iterator/go/feature_adapter.go +++ /dev/null @@ -1,133 +0,0 @@ -package jsoniter - -import ( - "bytes" - "io" -) - -// RawMessage to make replace json with jsoniter -type RawMessage []byte - -// Unmarshal adapts to json/encoding Unmarshal API -// -// Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v. -// Refer to https://godoc.org/encoding/json#Unmarshal for more information -func Unmarshal(data []byte, v interface{}) error { - return ConfigDefault.Unmarshal(data, v) -} - -func lastNotSpacePos(data []byte) int { - for i := len(data) - 1; i >= 0; i-- { - if data[i] != ' ' && data[i] != '\t' && data[i] != '\r' && data[i] != '\n' { - return i + 1 - } - } - return 0 -} - -// UnmarshalFromString convenient method to read from string instead of []byte -func UnmarshalFromString(str string, v interface{}) error { - return ConfigDefault.UnmarshalFromString(str, v) -} - -// Get quick method to get value from deeply nested JSON structure -func Get(data []byte, path ...interface{}) Any { - return ConfigDefault.Get(data, path...) -} - -// Marshal adapts to json/encoding Marshal API -// -// Marshal returns the JSON encoding of v, adapts to json/encoding Marshal API -// Refer to https://godoc.org/encoding/json#Marshal for more information -func Marshal(v interface{}) ([]byte, error) { - return ConfigDefault.Marshal(v) -} - -// MarshalIndent same as json.MarshalIndent. Prefix is not supported. -func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { - return ConfigDefault.MarshalIndent(v, prefix, indent) -} - -// MarshalToString convenient method to write as string instead of []byte -func MarshalToString(v interface{}) (string, error) { - return ConfigDefault.MarshalToString(v) -} - -// NewDecoder adapts to json/stream NewDecoder API. -// -// NewDecoder returns a new decoder that reads from r. -// -// Instead of a json/encoding Decoder, an Decoder is returned -// Refer to https://godoc.org/encoding/json#NewDecoder for more information -func NewDecoder(reader io.Reader) *Decoder { - return ConfigDefault.NewDecoder(reader) -} - -// Decoder reads and decodes JSON values from an input stream. -// Decoder provides identical APIs with json/stream Decoder (Token() and UseNumber() are in progress) -type Decoder struct { - iter *Iterator -} - -// Decode decode JSON into interface{} -func (adapter *Decoder) Decode(obj interface{}) error { - adapter.iter.ReadVal(obj) - err := adapter.iter.Error - if err == io.EOF { - return nil - } - return adapter.iter.Error -} - -// More is there more? -func (adapter *Decoder) More() bool { - return adapter.iter.head != adapter.iter.tail -} - -// Buffered remaining buffer -func (adapter *Decoder) Buffered() io.Reader { - remaining := adapter.iter.buf[adapter.iter.head:adapter.iter.tail] - return bytes.NewReader(remaining) -} - -// UseNumber for number JSON element, use float64 or json.NumberValue (alias of string) -func (adapter *Decoder) UseNumber() { - origCfg := adapter.iter.cfg.configBeforeFrozen - origCfg.UseNumber = true - adapter.iter.cfg = origCfg.Froze().(*frozenConfig) -} - -// NewEncoder same as json.NewEncoder -func NewEncoder(writer io.Writer) *Encoder { - return ConfigDefault.NewEncoder(writer) -} - -// Encoder same as json.Encoder -type Encoder struct { - stream *Stream -} - -// Encode encode interface{} as JSON to io.Writer -func (adapter *Encoder) Encode(val interface{}) error { - adapter.stream.WriteVal(val) - adapter.stream.WriteRaw("\n") - adapter.stream.Flush() - return adapter.stream.Error -} - -// SetIndent set the indention. Prefix is not supported -func (adapter *Encoder) SetIndent(prefix, indent string) { - adapter.stream.cfg.indentionStep = len(indent) -} - -// SetEscapeHTML escape html by default, set to false to disable -func (adapter *Encoder) SetEscapeHTML(escapeHTML bool) { - config := adapter.stream.cfg.configBeforeFrozen - config.EscapeHTML = escapeHTML - adapter.stream.cfg = config.Froze().(*frozenConfig) -} - -// Valid reports whether data is a valid JSON encoding. -func Valid(data []byte) bool { - return ConfigDefault.Valid(data) -} diff --git a/deps/github.com/json-iterator/go/feature_any.go b/deps/github.com/json-iterator/go/feature_any.go deleted file mode 100644 index 87716d1fc..000000000 --- a/deps/github.com/json-iterator/go/feature_any.go +++ /dev/null @@ -1,245 +0,0 @@ -package jsoniter - -import ( - "errors" - "fmt" - "io" - "reflect" -) - -// Any generic object representation. -// The lazy json implementation holds []byte and parse lazily. -type Any interface { - LastError() error - ValueType() ValueType - MustBeValid() Any - ToBool() bool - ToInt() int - ToInt32() int32 - ToInt64() int64 - ToUint() uint - ToUint32() uint32 - ToUint64() uint64 - ToFloat32() float32 - ToFloat64() float64 - ToString() string - ToVal(val interface{}) - Get(path ...interface{}) Any - // TODO: add Set - Size() int - Keys() []string - GetInterface() interface{} - WriteTo(stream *Stream) -} - -type baseAny struct{} - -func (any *baseAny) Get(path ...interface{}) Any { - return &invalidAny{baseAny{}, fmt.Errorf("Get %v from simple value", path)} -} - -func (any *baseAny) Size() int { - return 0 -} - -func (any *baseAny) Keys() []string { - return []string{} -} - -func (any *baseAny) ToVal(obj interface{}) { - panic("not implemented") -} - -// WrapInt32 turn int32 into Any interface -func WrapInt32(val int32) Any { - return &int32Any{baseAny{}, val} -} - -// WrapInt64 turn int64 into Any interface -func WrapInt64(val int64) Any { - return &int64Any{baseAny{}, val} -} - -// WrapUint32 turn uint32 into Any interface -func WrapUint32(val uint32) Any { - return &uint32Any{baseAny{}, val} -} - -// WrapUint64 turn uint64 into Any interface -func WrapUint64(val uint64) Any { - return &uint64Any{baseAny{}, val} -} - -// WrapFloat64 turn float64 into Any interface -func WrapFloat64(val float64) Any { - return &floatAny{baseAny{}, val} -} - -// WrapString turn string into Any interface -func WrapString(val string) Any { - return &stringAny{baseAny{}, val} -} - -// Wrap turn a go object into Any interface -func Wrap(val interface{}) Any { - if val == nil { - return &nilAny{} - } - asAny, isAny := val.(Any) - if isAny { - return asAny - } - typ := reflect.TypeOf(val) - switch typ.Kind() { - case reflect.Slice: - return wrapArray(val) - case reflect.Struct: - return wrapStruct(val) - case reflect.Map: - return wrapMap(val) - case reflect.String: - return WrapString(val.(string)) - case reflect.Int: - return WrapInt64(int64(val.(int))) - case reflect.Int8: - return WrapInt32(int32(val.(int8))) - case reflect.Int16: - return WrapInt32(int32(val.(int16))) - case reflect.Int32: - return WrapInt32(val.(int32)) - case reflect.Int64: - return WrapInt64(val.(int64)) - case reflect.Uint: - return WrapUint64(uint64(val.(uint))) - case reflect.Uint8: - return WrapUint32(uint32(val.(uint8))) - case reflect.Uint16: - return WrapUint32(uint32(val.(uint16))) - case reflect.Uint32: - return WrapUint32(uint32(val.(uint32))) - case reflect.Uint64: - return WrapUint64(val.(uint64)) - case reflect.Float32: - return WrapFloat64(float64(val.(float32))) - case reflect.Float64: - return WrapFloat64(val.(float64)) - case reflect.Bool: - if val.(bool) == true { - return &trueAny{} - } - return &falseAny{} - } - return &invalidAny{baseAny{}, fmt.Errorf("unsupported type: %v", typ)} -} - -// ReadAny read next JSON element as an Any object. It is a better json.RawMessage. -func (iter *Iterator) ReadAny() Any { - return iter.readAny() -} - -func (iter *Iterator) readAny() Any { - c := iter.nextToken() - switch c { - case '"': - iter.unreadByte() - return &stringAny{baseAny{}, iter.ReadString()} - case 'n': - iter.skipThreeBytes('u', 'l', 'l') // null - return &nilAny{} - case 't': - iter.skipThreeBytes('r', 'u', 'e') // true - return &trueAny{} - case 'f': - iter.skipFourBytes('a', 'l', 's', 'e') // false - return &falseAny{} - case '{': - return iter.readObjectAny() - case '[': - return iter.readArrayAny() - case '-': - return iter.readNumberAny(false) - case 0: - return &invalidAny{baseAny{}, errors.New("input is empty")} - default: - return iter.readNumberAny(true) - } -} - -func (iter *Iterator) readNumberAny(positive bool) Any { - iter.startCapture(iter.head - 1) - iter.skipNumber() - lazyBuf := iter.stopCapture() - return &numberLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} -} - -func (iter *Iterator) readObjectAny() Any { - iter.startCapture(iter.head - 1) - iter.skipObject() - lazyBuf := iter.stopCapture() - return &objectLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} -} - -func (iter *Iterator) readArrayAny() Any { - iter.startCapture(iter.head - 1) - iter.skipArray() - lazyBuf := iter.stopCapture() - return &arrayLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} -} - -func locateObjectField(iter *Iterator, target string) []byte { - var found []byte - iter.ReadObjectCB(func(iter *Iterator, field string) bool { - if field == target { - found = iter.SkipAndReturnBytes() - return false - } - iter.Skip() - return true - }) - return found -} - -func locateArrayElement(iter *Iterator, target int) []byte { - var found []byte - n := 0 - iter.ReadArrayCB(func(iter *Iterator) bool { - if n == target { - found = iter.SkipAndReturnBytes() - return false - } - iter.Skip() - n++ - return true - }) - return found -} - -func locatePath(iter *Iterator, path []interface{}) Any { - for i, pathKeyObj := range path { - switch pathKey := pathKeyObj.(type) { - case string: - valueBytes := locateObjectField(iter, pathKey) - if valueBytes == nil { - return newInvalidAny(path[i:]) - } - iter.ResetBytes(valueBytes) - case int: - valueBytes := locateArrayElement(iter, pathKey) - if valueBytes == nil { - return newInvalidAny(path[i:]) - } - iter.ResetBytes(valueBytes) - case int32: - if '*' == pathKey { - return iter.readAny().Get(path[i:]...) - } - return newInvalidAny(path[i:]) - default: - return newInvalidAny(path[i:]) - } - } - if iter.Error != nil && iter.Error != io.EOF { - return &invalidAny{baseAny{}, iter.Error} - } - return iter.readAny() -} diff --git a/deps/github.com/json-iterator/go/feature_any_number.go b/deps/github.com/json-iterator/go/feature_any_number.go deleted file mode 100644 index 4e1c27641..000000000 --- a/deps/github.com/json-iterator/go/feature_any_number.go +++ /dev/null @@ -1,104 +0,0 @@ -package jsoniter - -import "unsafe" - -type numberLazyAny struct { - baseAny - cfg *frozenConfig - buf []byte - err error -} - -func (any *numberLazyAny) ValueType() ValueType { - return NumberValue -} - -func (any *numberLazyAny) MustBeValid() Any { - return any -} - -func (any *numberLazyAny) LastError() error { - return any.err -} - -func (any *numberLazyAny) ToBool() bool { - return any.ToFloat64() != 0 -} - -func (any *numberLazyAny) ToInt() int { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadInt() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToInt32() int32 { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadInt32() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToInt64() int64 { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadInt64() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToUint() uint { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadUint() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToUint32() uint32 { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadUint32() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToUint64() uint64 { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadUint64() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToFloat32() float32 { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadFloat32() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToFloat64() float64 { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - val := iter.ReadFloat64() - any.err = iter.Error - return val -} - -func (any *numberLazyAny) ToString() string { - return *(*string)(unsafe.Pointer(&any.buf)) -} - -func (any *numberLazyAny) WriteTo(stream *Stream) { - stream.Write(any.buf) -} - -func (any *numberLazyAny) GetInterface() interface{} { - iter := any.cfg.BorrowIterator(any.buf) - defer any.cfg.ReturnIterator(iter) - return iter.Read() -} diff --git a/deps/github.com/json-iterator/go/feature_any_string.go b/deps/github.com/json-iterator/go/feature_any_string.go deleted file mode 100644 index abf060bd5..000000000 --- a/deps/github.com/json-iterator/go/feature_any_string.go +++ /dev/null @@ -1,166 +0,0 @@ -package jsoniter - -import ( - "fmt" - "strconv" -) - -type stringAny struct { - baseAny - val string -} - -func (any *stringAny) Get(path ...interface{}) Any { - if len(path) == 0 { - return any - } - return &invalidAny{baseAny{}, fmt.Errorf("Get %v from simple value", path)} -} - -func (any *stringAny) Parse() *Iterator { - return nil -} - -func (any *stringAny) ValueType() ValueType { - return StringValue -} - -func (any *stringAny) MustBeValid() Any { - return any -} - -func (any *stringAny) LastError() error { - return nil -} - -func (any *stringAny) ToBool() bool { - str := any.ToString() - if str == "0" { - return false - } - for _, c := range str { - switch c { - case ' ', '\n', '\r', '\t': - default: - return true - } - } - return false -} - -func (any *stringAny) ToInt() int { - return int(any.ToInt64()) - -} - -func (any *stringAny) ToInt32() int32 { - return int32(any.ToInt64()) -} - -func (any *stringAny) ToInt64() int64 { - if any.val == "" { - return 0 - } - - flag := 1 - startPos := 0 - endPos := 0 - if any.val[0] == '+' || any.val[0] == '-' { - startPos = 1 - } - - if any.val[0] == '-' { - flag = -1 - } - - for i := startPos; i < len(any.val); i++ { - if any.val[i] >= '0' && any.val[i] <= '9' { - endPos = i + 1 - } else { - break - } - } - parsed, _ := strconv.ParseInt(any.val[startPos:endPos], 10, 64) - return int64(flag) * parsed -} - -func (any *stringAny) ToUint() uint { - return uint(any.ToUint64()) -} - -func (any *stringAny) ToUint32() uint32 { - return uint32(any.ToUint64()) -} - -func (any *stringAny) ToUint64() uint64 { - if any.val == "" { - return 0 - } - - startPos := 0 - endPos := 0 - - if any.val[0] == '-' { - return 0 - } - if any.val[0] == '+' { - startPos = 1 - } - - for i := startPos; i < len(any.val); i++ { - if any.val[i] >= '0' && any.val[i] <= '9' { - endPos = i + 1 - } else { - break - } - } - parsed, _ := strconv.ParseUint(any.val[startPos:endPos], 10, 64) - return parsed -} - -func (any *stringAny) ToFloat32() float32 { - return float32(any.ToFloat64()) -} - -func (any *stringAny) ToFloat64() float64 { - if len(any.val) == 0 { - return 0 - } - - // first char invalid - if any.val[0] != '+' && any.val[0] != '-' && (any.val[0] > '9' || any.val[0] < '0') { - return 0 - } - - // extract valid num expression from string - // eg 123true => 123, -12.12xxa => -12.12 - endPos := 1 - for i := 1; i < len(any.val); i++ { - if any.val[i] == '.' || any.val[i] == 'e' || any.val[i] == 'E' || any.val[i] == '+' || any.val[i] == '-' { - endPos = i + 1 - continue - } - - // end position is the first char which is not digit - if any.val[i] >= '0' && any.val[i] <= '9' { - endPos = i + 1 - } else { - endPos = i - break - } - } - parsed, _ := strconv.ParseFloat(any.val[:endPos], 64) - return parsed -} - -func (any *stringAny) ToString() string { - return any.val -} - -func (any *stringAny) WriteTo(stream *Stream) { - stream.WriteString(any.val) -} - -func (any *stringAny) GetInterface() interface{} { - return any.val -} diff --git a/deps/github.com/json-iterator/go/feature_config.go b/deps/github.com/json-iterator/go/feature_config.go deleted file mode 100644 index 78a2ce1a5..000000000 --- a/deps/github.com/json-iterator/go/feature_config.go +++ /dev/null @@ -1,348 +0,0 @@ -package jsoniter - -import ( - "encoding/json" - "errors" - "io" - "reflect" - "sync/atomic" - "unsafe" -) - -// Config customize how the API should behave. -// The API is created from Config by Froze. -type Config struct { - IndentionStep int - MarshalFloatWith6Digits bool - EscapeHTML bool - SortMapKeys bool - UseNumber bool - TagKey string - ValidateJsonRawMessage bool - ObjectFieldMustBeSimpleString bool -} - -type frozenConfig struct { - configBeforeFrozen Config - sortMapKeys bool - indentionStep int - objectFieldMustBeSimpleString bool - decoderCache unsafe.Pointer - encoderCache unsafe.Pointer - extensions []Extension - streamPool chan *Stream - iteratorPool chan *Iterator -} - -// API the public interface of this package. -// Primary Marshal and Unmarshal. -type API interface { - IteratorPool - StreamPool - MarshalToString(v interface{}) (string, error) - Marshal(v interface{}) ([]byte, error) - MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) - UnmarshalFromString(str string, v interface{}) error - Unmarshal(data []byte, v interface{}) error - Get(data []byte, path ...interface{}) Any - NewEncoder(writer io.Writer) *Encoder - NewDecoder(reader io.Reader) *Decoder - Valid(data []byte) bool - RegisterExtension(extension Extension) -} - -// ConfigDefault the default API -var ConfigDefault = Config{ - EscapeHTML: true, -}.Froze() - -// ConfigCompatibleWithStandardLibrary tries to be 100% compatible with standard library behavior -var ConfigCompatibleWithStandardLibrary = Config{ - EscapeHTML: true, - SortMapKeys: true, - ValidateJsonRawMessage: true, -}.Froze() - -// ConfigFastest marshals float with only 6 digits precision -var ConfigFastest = Config{ - EscapeHTML: false, - MarshalFloatWith6Digits: true, // will lose precession - ObjectFieldMustBeSimpleString: true, // do not unescape object field -}.Froze() - -// Froze forge API from config -func (cfg Config) Froze() API { - // TODO: cache frozen config - frozenConfig := &frozenConfig{ - sortMapKeys: cfg.SortMapKeys, - indentionStep: cfg.IndentionStep, - objectFieldMustBeSimpleString: cfg.ObjectFieldMustBeSimpleString, - streamPool: make(chan *Stream, 16), - iteratorPool: make(chan *Iterator, 16), - } - atomic.StorePointer(&frozenConfig.decoderCache, unsafe.Pointer(&map[string]ValDecoder{})) - atomic.StorePointer(&frozenConfig.encoderCache, unsafe.Pointer(&map[string]ValEncoder{})) - if cfg.MarshalFloatWith6Digits { - frozenConfig.marshalFloatWith6Digits() - } - if cfg.EscapeHTML { - frozenConfig.escapeHTML() - } - if cfg.UseNumber { - frozenConfig.useNumber() - } - if cfg.ValidateJsonRawMessage { - frozenConfig.validateJsonRawMessage() - } - frozenConfig.configBeforeFrozen = cfg - return frozenConfig -} - -func (cfg *frozenConfig) validateJsonRawMessage() { - encoder := &funcEncoder{func(ptr unsafe.Pointer, stream *Stream) { - rawMessage := *(*json.RawMessage)(ptr) - iter := cfg.BorrowIterator([]byte(rawMessage)) - iter.Read() - if iter.Error != nil { - stream.WriteRaw("null") - } else { - cfg.ReturnIterator(iter) - stream.WriteRaw(string(rawMessage)) - } - }, func(ptr unsafe.Pointer) bool { - return false - }} - cfg.addEncoderToCache(reflect.TypeOf((*json.RawMessage)(nil)).Elem(), encoder) - cfg.addEncoderToCache(reflect.TypeOf((*RawMessage)(nil)).Elem(), encoder) -} - -func (cfg *frozenConfig) useNumber() { - cfg.addDecoderToCache(reflect.TypeOf((*interface{})(nil)).Elem(), &funcDecoder{func(ptr unsafe.Pointer, iter *Iterator) { - if iter.WhatIsNext() == NumberValue { - *((*interface{})(ptr)) = json.Number(iter.readNumberAsString()) - } else { - *((*interface{})(ptr)) = iter.Read() - } - }}) -} -func (cfg *frozenConfig) getTagKey() string { - tagKey := cfg.configBeforeFrozen.TagKey - if tagKey == "" { - return "json" - } - return tagKey -} - -func (cfg *frozenConfig) RegisterExtension(extension Extension) { - cfg.extensions = append(cfg.extensions, extension) -} - -type lossyFloat32Encoder struct { -} - -func (encoder *lossyFloat32Encoder) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteFloat32Lossy(*((*float32)(ptr))) -} - -func (encoder *lossyFloat32Encoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *lossyFloat32Encoder) IsEmpty(ptr unsafe.Pointer) bool { - return *((*float32)(ptr)) == 0 -} - -type lossyFloat64Encoder struct { -} - -func (encoder *lossyFloat64Encoder) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteFloat64Lossy(*((*float64)(ptr))) -} - -func (encoder *lossyFloat64Encoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *lossyFloat64Encoder) IsEmpty(ptr unsafe.Pointer) bool { - return *((*float64)(ptr)) == 0 -} - -// EnableLossyFloatMarshalling keeps 10**(-6) precision -// for float variables for better performance. -func (cfg *frozenConfig) marshalFloatWith6Digits() { - // for better performance - cfg.addEncoderToCache(reflect.TypeOf((*float32)(nil)).Elem(), &lossyFloat32Encoder{}) - cfg.addEncoderToCache(reflect.TypeOf((*float64)(nil)).Elem(), &lossyFloat64Encoder{}) -} - -type htmlEscapedStringEncoder struct { -} - -func (encoder *htmlEscapedStringEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - str := *((*string)(ptr)) - stream.WriteStringWithHTMLEscaped(str) -} - -func (encoder *htmlEscapedStringEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *htmlEscapedStringEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return *((*string)(ptr)) == "" -} - -func (cfg *frozenConfig) escapeHTML() { - cfg.addEncoderToCache(reflect.TypeOf((*string)(nil)).Elem(), &htmlEscapedStringEncoder{}) -} - -func (cfg *frozenConfig) addDecoderToCache(cacheKey reflect.Type, decoder ValDecoder) { - done := false - for !done { - ptr := atomic.LoadPointer(&cfg.decoderCache) - cache := *(*map[reflect.Type]ValDecoder)(ptr) - copied := map[reflect.Type]ValDecoder{} - for k, v := range cache { - copied[k] = v - } - copied[cacheKey] = decoder - done = atomic.CompareAndSwapPointer(&cfg.decoderCache, ptr, unsafe.Pointer(&copied)) - } -} - -func (cfg *frozenConfig) addEncoderToCache(cacheKey reflect.Type, encoder ValEncoder) { - done := false - for !done { - ptr := atomic.LoadPointer(&cfg.encoderCache) - cache := *(*map[reflect.Type]ValEncoder)(ptr) - copied := map[reflect.Type]ValEncoder{} - for k, v := range cache { - copied[k] = v - } - copied[cacheKey] = encoder - done = atomic.CompareAndSwapPointer(&cfg.encoderCache, ptr, unsafe.Pointer(&copied)) - } -} - -func (cfg *frozenConfig) getDecoderFromCache(cacheKey reflect.Type) ValDecoder { - ptr := atomic.LoadPointer(&cfg.decoderCache) - cache := *(*map[reflect.Type]ValDecoder)(ptr) - return cache[cacheKey] -} - -func (cfg *frozenConfig) getEncoderFromCache(cacheKey reflect.Type) ValEncoder { - ptr := atomic.LoadPointer(&cfg.encoderCache) - cache := *(*map[reflect.Type]ValEncoder)(ptr) - return cache[cacheKey] -} - -func (cfg *frozenConfig) cleanDecoders() { - typeDecoders = map[string]ValDecoder{} - fieldDecoders = map[string]ValDecoder{} - *cfg = *(cfg.configBeforeFrozen.Froze().(*frozenConfig)) -} - -func (cfg *frozenConfig) cleanEncoders() { - typeEncoders = map[string]ValEncoder{} - fieldEncoders = map[string]ValEncoder{} - *cfg = *(cfg.configBeforeFrozen.Froze().(*frozenConfig)) -} - -func (cfg *frozenConfig) MarshalToString(v interface{}) (string, error) { - stream := cfg.BorrowStream(nil) - defer cfg.ReturnStream(stream) - stream.WriteVal(v) - if stream.Error != nil { - return "", stream.Error - } - return string(stream.Buffer()), nil -} - -func (cfg *frozenConfig) Marshal(v interface{}) ([]byte, error) { - stream := cfg.BorrowStream(nil) - defer cfg.ReturnStream(stream) - stream.WriteVal(v) - if stream.Error != nil { - return nil, stream.Error - } - result := stream.Buffer() - copied := make([]byte, len(result)) - copy(copied, result) - return copied, nil -} - -func (cfg *frozenConfig) MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { - if prefix != "" { - panic("prefix is not supported") - } - for _, r := range indent { - if r != ' ' { - panic("indent can only be space") - } - } - newCfg := cfg.configBeforeFrozen - newCfg.IndentionStep = len(indent) - return newCfg.Froze().Marshal(v) -} - -func (cfg *frozenConfig) UnmarshalFromString(str string, v interface{}) error { - data := []byte(str) - data = data[:lastNotSpacePos(data)] - iter := cfg.BorrowIterator(data) - defer cfg.ReturnIterator(iter) - iter.ReadVal(v) - if iter.head == iter.tail { - iter.loadMore() - } - if iter.Error == io.EOF { - return nil - } - if iter.Error == nil { - iter.ReportError("UnmarshalFromString", "there are bytes left after unmarshal") - } - return iter.Error -} - -func (cfg *frozenConfig) Get(data []byte, path ...interface{}) Any { - iter := cfg.BorrowIterator(data) - defer cfg.ReturnIterator(iter) - return locatePath(iter, path) -} - -func (cfg *frozenConfig) Unmarshal(data []byte, v interface{}) error { - data = data[:lastNotSpacePos(data)] - iter := cfg.BorrowIterator(data) - defer cfg.ReturnIterator(iter) - typ := reflect.TypeOf(v) - if typ.Kind() != reflect.Ptr { - // return non-pointer error - return errors.New("the second param must be ptr type") - } - iter.ReadVal(v) - if iter.head == iter.tail { - iter.loadMore() - } - if iter.Error == io.EOF { - return nil - } - if iter.Error == nil { - iter.ReportError("Unmarshal", "there are bytes left after unmarshal") - } - return iter.Error -} - -func (cfg *frozenConfig) NewEncoder(writer io.Writer) *Encoder { - stream := NewStream(cfg, writer, 512) - return &Encoder{stream} -} - -func (cfg *frozenConfig) NewDecoder(reader io.Reader) *Decoder { - iter := Parse(cfg, reader, 512) - return &Decoder{iter} -} - -func (cfg *frozenConfig) Valid(data []byte) bool { - iter := cfg.BorrowIterator(data) - defer cfg.ReturnIterator(iter) - iter.Skip() - return iter.Error == nil -} diff --git a/deps/github.com/json-iterator/go/feature_iter_float.go b/deps/github.com/json-iterator/go/feature_iter_float.go deleted file mode 100644 index 86f459912..000000000 --- a/deps/github.com/json-iterator/go/feature_iter_float.go +++ /dev/null @@ -1,341 +0,0 @@ -package jsoniter - -import ( - "io" - "math/big" - "strconv" - "strings" - "unsafe" -) - -var floatDigits []int8 - -const invalidCharForNumber = int8(-1) -const endOfNumber = int8(-2) -const dotInNumber = int8(-3) - -func init() { - floatDigits = make([]int8, 256) - for i := 0; i < len(floatDigits); i++ { - floatDigits[i] = invalidCharForNumber - } - for i := int8('0'); i <= int8('9'); i++ { - floatDigits[i] = i - int8('0') - } - floatDigits[','] = endOfNumber - floatDigits[']'] = endOfNumber - floatDigits['}'] = endOfNumber - floatDigits[' '] = endOfNumber - floatDigits['\t'] = endOfNumber - floatDigits['\n'] = endOfNumber - floatDigits['.'] = dotInNumber -} - -// ReadBigFloat read big.Float -func (iter *Iterator) ReadBigFloat() (ret *big.Float) { - str := iter.readNumberAsString() - if iter.Error != nil && iter.Error != io.EOF { - return nil - } - prec := 64 - if len(str) > prec { - prec = len(str) - } - val, _, err := big.ParseFloat(str, 10, uint(prec), big.ToZero) - if err != nil { - iter.Error = err - return nil - } - return val -} - -// ReadBigInt read big.Int -func (iter *Iterator) ReadBigInt() (ret *big.Int) { - str := iter.readNumberAsString() - if iter.Error != nil && iter.Error != io.EOF { - return nil - } - ret = big.NewInt(0) - var success bool - ret, success = ret.SetString(str, 10) - if !success { - iter.ReportError("ReadBigInt", "invalid big int") - return nil - } - return ret -} - -//ReadFloat32 read float32 -func (iter *Iterator) ReadFloat32() (ret float32) { - c := iter.nextToken() - if c == '-' { - return -iter.readPositiveFloat32() - } - iter.unreadByte() - return iter.readPositiveFloat32() -} - -func (iter *Iterator) readPositiveFloat32() (ret float32) { - value := uint64(0) - c := byte(' ') - i := iter.head - // first char - if i == iter.tail { - return iter.readFloat32SlowPath() - } - c = iter.buf[i] - i++ - ind := floatDigits[c] - switch ind { - case invalidCharForNumber: - return iter.readFloat32SlowPath() - case endOfNumber: - iter.ReportError("readFloat32", "empty number") - return - case dotInNumber: - iter.ReportError("readFloat32", "leading dot is invalid") - return - case 0: - if i == iter.tail { - return iter.readFloat32SlowPath() - } - c = iter.buf[i] - switch c { - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - iter.ReportError("readFloat32", "leading zero is invalid") - return - } - } - value = uint64(ind) - // chars before dot -non_decimal_loop: - for ; i < iter.tail; i++ { - c = iter.buf[i] - ind := floatDigits[c] - switch ind { - case invalidCharForNumber: - return iter.readFloat32SlowPath() - case endOfNumber: - iter.head = i - return float32(value) - case dotInNumber: - break non_decimal_loop - } - if value > uint64SafeToMultiple10 { - return iter.readFloat32SlowPath() - } - value = (value << 3) + (value << 1) + uint64(ind) // value = value * 10 + ind; - } - // chars after dot - if c == '.' { - i++ - decimalPlaces := 0 - if i == iter.tail { - return iter.readFloat32SlowPath() - } - for ; i < iter.tail; i++ { - c = iter.buf[i] - ind := floatDigits[c] - switch ind { - case endOfNumber: - if decimalPlaces > 0 && decimalPlaces < len(pow10) { - iter.head = i - return float32(float64(value) / float64(pow10[decimalPlaces])) - } - // too many decimal places - return iter.readFloat32SlowPath() - case invalidCharForNumber: - fallthrough - case dotInNumber: - return iter.readFloat32SlowPath() - } - decimalPlaces++ - if value > uint64SafeToMultiple10 { - return iter.readFloat32SlowPath() - } - value = (value << 3) + (value << 1) + uint64(ind) - } - } - return iter.readFloat32SlowPath() -} - -func (iter *Iterator) readNumberAsString() (ret string) { - strBuf := [16]byte{} - str := strBuf[0:0] -load_loop: - for { - for i := iter.head; i < iter.tail; i++ { - c := iter.buf[i] - switch c { - case '+', '-', '.', 'e', 'E', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - str = append(str, c) - continue - default: - iter.head = i - break load_loop - } - } - if !iter.loadMore() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - return - } - if len(str) == 0 { - iter.ReportError("readNumberAsString", "invalid number") - } - return *(*string)(unsafe.Pointer(&str)) -} - -func (iter *Iterator) readFloat32SlowPath() (ret float32) { - str := iter.readNumberAsString() - if iter.Error != nil && iter.Error != io.EOF { - return - } - errMsg := validateFloat(str) - if errMsg != "" { - iter.ReportError("readFloat32SlowPath", errMsg) - return - } - val, err := strconv.ParseFloat(str, 32) - if err != nil { - iter.Error = err - return - } - return float32(val) -} - -// ReadFloat64 read float64 -func (iter *Iterator) ReadFloat64() (ret float64) { - c := iter.nextToken() - if c == '-' { - return -iter.readPositiveFloat64() - } - iter.unreadByte() - return iter.readPositiveFloat64() -} - -func (iter *Iterator) readPositiveFloat64() (ret float64) { - value := uint64(0) - c := byte(' ') - i := iter.head - // first char - if i == iter.tail { - return iter.readFloat64SlowPath() - } - c = iter.buf[i] - i++ - ind := floatDigits[c] - switch ind { - case invalidCharForNumber: - return iter.readFloat64SlowPath() - case endOfNumber: - iter.ReportError("readFloat64", "empty number") - return - case dotInNumber: - iter.ReportError("readFloat64", "leading dot is invalid") - return - case 0: - if i == iter.tail { - return iter.readFloat64SlowPath() - } - c = iter.buf[i] - switch c { - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - iter.ReportError("readFloat64", "leading zero is invalid") - return - } - } - value = uint64(ind) - // chars before dot -non_decimal_loop: - for ; i < iter.tail; i++ { - c = iter.buf[i] - ind := floatDigits[c] - switch ind { - case invalidCharForNumber: - return iter.readFloat64SlowPath() - case endOfNumber: - iter.head = i - return float64(value) - case dotInNumber: - break non_decimal_loop - } - if value > uint64SafeToMultiple10 { - return iter.readFloat64SlowPath() - } - value = (value << 3) + (value << 1) + uint64(ind) // value = value * 10 + ind; - } - // chars after dot - if c == '.' { - i++ - decimalPlaces := 0 - if i == iter.tail { - return iter.readFloat64SlowPath() - } - for ; i < iter.tail; i++ { - c = iter.buf[i] - ind := floatDigits[c] - switch ind { - case endOfNumber: - if decimalPlaces > 0 && decimalPlaces < len(pow10) { - iter.head = i - return float64(value) / float64(pow10[decimalPlaces]) - } - // too many decimal places - return iter.readFloat64SlowPath() - case invalidCharForNumber: - fallthrough - case dotInNumber: - return iter.readFloat64SlowPath() - } - decimalPlaces++ - if value > uint64SafeToMultiple10 { - return iter.readFloat64SlowPath() - } - value = (value << 3) + (value << 1) + uint64(ind) - } - } - return iter.readFloat64SlowPath() -} - -func (iter *Iterator) readFloat64SlowPath() (ret float64) { - str := iter.readNumberAsString() - if iter.Error != nil && iter.Error != io.EOF { - return - } - errMsg := validateFloat(str) - if errMsg != "" { - iter.ReportError("readFloat64SlowPath", errMsg) - return - } - val, err := strconv.ParseFloat(str, 64) - if err != nil { - iter.Error = err - return - } - return val -} - -func validateFloat(str string) string { - // strconv.ParseFloat is not validating `1.` or `1.e1` - if len(str) == 0 { - return "empty number" - } - if str[0] == '-' { - return "-- is not valid" - } - dotPos := strings.IndexByte(str, '.') - if dotPos != -1 { - if dotPos == len(str)-1 { - return "dot can not be last character" - } - switch str[dotPos+1] { - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - default: - return "missing digit after dot" - } - } - return "" -} diff --git a/deps/github.com/json-iterator/go/feature_iter_int.go b/deps/github.com/json-iterator/go/feature_iter_int.go deleted file mode 100644 index 4781c6393..000000000 --- a/deps/github.com/json-iterator/go/feature_iter_int.go +++ /dev/null @@ -1,339 +0,0 @@ -package jsoniter - -import ( - "math" - "strconv" -) - -var intDigits []int8 - -const uint32SafeToMultiply10 = uint32(0xffffffff)/10 - 1 -const uint64SafeToMultiple10 = uint64(0xffffffffffffffff)/10 - 1 - -func init() { - intDigits = make([]int8, 256) - for i := 0; i < len(intDigits); i++ { - intDigits[i] = invalidCharForNumber - } - for i := int8('0'); i <= int8('9'); i++ { - intDigits[i] = i - int8('0') - } -} - -// ReadUint read uint -func (iter *Iterator) ReadUint() uint { - return uint(iter.ReadUint64()) -} - -// ReadInt read int -func (iter *Iterator) ReadInt() int { - return int(iter.ReadInt64()) -} - -// ReadInt8 read int8 -func (iter *Iterator) ReadInt8() (ret int8) { - c := iter.nextToken() - if c == '-' { - val := iter.readUint32(iter.readByte()) - if val > math.MaxInt8+1 { - iter.ReportError("ReadInt8", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return -int8(val) - } - val := iter.readUint32(c) - if val > math.MaxInt8 { - iter.ReportError("ReadInt8", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return int8(val) -} - -// ReadUint8 read uint8 -func (iter *Iterator) ReadUint8() (ret uint8) { - val := iter.readUint32(iter.nextToken()) - if val > math.MaxUint8 { - iter.ReportError("ReadUint8", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return uint8(val) -} - -// ReadInt16 read int16 -func (iter *Iterator) ReadInt16() (ret int16) { - c := iter.nextToken() - if c == '-' { - val := iter.readUint32(iter.readByte()) - if val > math.MaxInt16+1 { - iter.ReportError("ReadInt16", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return -int16(val) - } - val := iter.readUint32(c) - if val > math.MaxInt16 { - iter.ReportError("ReadInt16", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return int16(val) -} - -// ReadUint16 read uint16 -func (iter *Iterator) ReadUint16() (ret uint16) { - val := iter.readUint32(iter.nextToken()) - if val > math.MaxUint16 { - iter.ReportError("ReadUint16", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return uint16(val) -} - -// ReadInt32 read int32 -func (iter *Iterator) ReadInt32() (ret int32) { - c := iter.nextToken() - if c == '-' { - val := iter.readUint32(iter.readByte()) - if val > math.MaxInt32+1 { - iter.ReportError("ReadInt32", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return -int32(val) - } - val := iter.readUint32(c) - if val > math.MaxInt32 { - iter.ReportError("ReadInt32", "overflow: "+strconv.FormatInt(int64(val), 10)) - return - } - return int32(val) -} - -// ReadUint32 read uint32 -func (iter *Iterator) ReadUint32() (ret uint32) { - return iter.readUint32(iter.nextToken()) -} - -func (iter *Iterator) readUint32(c byte) (ret uint32) { - ind := intDigits[c] - if ind == 0 { - iter.assertInteger() - return 0 // single zero - } - if ind == invalidCharForNumber { - iter.ReportError("readUint32", "unexpected character: "+string([]byte{byte(ind)})) - return - } - value := uint32(ind) - if iter.tail-iter.head > 10 { - i := iter.head - ind2 := intDigits[iter.buf[i]] - if ind2 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value - } - i++ - ind3 := intDigits[iter.buf[i]] - if ind3 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*10 + uint32(ind2) - } - //iter.head = i + 1 - //value = value * 100 + uint32(ind2) * 10 + uint32(ind3) - i++ - ind4 := intDigits[iter.buf[i]] - if ind4 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*100 + uint32(ind2)*10 + uint32(ind3) - } - i++ - ind5 := intDigits[iter.buf[i]] - if ind5 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*1000 + uint32(ind2)*100 + uint32(ind3)*10 + uint32(ind4) - } - i++ - ind6 := intDigits[iter.buf[i]] - if ind6 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*10000 + uint32(ind2)*1000 + uint32(ind3)*100 + uint32(ind4)*10 + uint32(ind5) - } - i++ - ind7 := intDigits[iter.buf[i]] - if ind7 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*100000 + uint32(ind2)*10000 + uint32(ind3)*1000 + uint32(ind4)*100 + uint32(ind5)*10 + uint32(ind6) - } - i++ - ind8 := intDigits[iter.buf[i]] - if ind8 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*1000000 + uint32(ind2)*100000 + uint32(ind3)*10000 + uint32(ind4)*1000 + uint32(ind5)*100 + uint32(ind6)*10 + uint32(ind7) - } - i++ - ind9 := intDigits[iter.buf[i]] - value = value*10000000 + uint32(ind2)*1000000 + uint32(ind3)*100000 + uint32(ind4)*10000 + uint32(ind5)*1000 + uint32(ind6)*100 + uint32(ind7)*10 + uint32(ind8) - iter.head = i - if ind9 == invalidCharForNumber { - iter.assertInteger() - return value - } - } - for { - for i := iter.head; i < iter.tail; i++ { - ind = intDigits[iter.buf[i]] - if ind == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value - } - if value > uint32SafeToMultiply10 { - value2 := (value << 3) + (value << 1) + uint32(ind) - if value2 < value { - iter.ReportError("readUint32", "overflow") - return - } - value = value2 - continue - } - value = (value << 3) + (value << 1) + uint32(ind) - } - if !iter.loadMore() { - iter.assertInteger() - return value - } - } -} - -// ReadInt64 read int64 -func (iter *Iterator) ReadInt64() (ret int64) { - c := iter.nextToken() - if c == '-' { - val := iter.readUint64(iter.readByte()) - if val > math.MaxInt64+1 { - iter.ReportError("ReadInt64", "overflow: "+strconv.FormatUint(uint64(val), 10)) - return - } - return -int64(val) - } - val := iter.readUint64(c) - if val > math.MaxInt64 { - iter.ReportError("ReadInt64", "overflow: "+strconv.FormatUint(uint64(val), 10)) - return - } - return int64(val) -} - -// ReadUint64 read uint64 -func (iter *Iterator) ReadUint64() uint64 { - return iter.readUint64(iter.nextToken()) -} - -func (iter *Iterator) readUint64(c byte) (ret uint64) { - ind := intDigits[c] - if ind == 0 { - iter.assertInteger() - return 0 // single zero - } - if ind == invalidCharForNumber { - iter.ReportError("readUint64", "unexpected character: "+string([]byte{byte(ind)})) - return - } - value := uint64(ind) - if iter.tail-iter.head > 10 { - i := iter.head - ind2 := intDigits[iter.buf[i]] - if ind2 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value - } - i++ - ind3 := intDigits[iter.buf[i]] - if ind3 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*10 + uint64(ind2) - } - //iter.head = i + 1 - //value = value * 100 + uint32(ind2) * 10 + uint32(ind3) - i++ - ind4 := intDigits[iter.buf[i]] - if ind4 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*100 + uint64(ind2)*10 + uint64(ind3) - } - i++ - ind5 := intDigits[iter.buf[i]] - if ind5 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*1000 + uint64(ind2)*100 + uint64(ind3)*10 + uint64(ind4) - } - i++ - ind6 := intDigits[iter.buf[i]] - if ind6 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*10000 + uint64(ind2)*1000 + uint64(ind3)*100 + uint64(ind4)*10 + uint64(ind5) - } - i++ - ind7 := intDigits[iter.buf[i]] - if ind7 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*100000 + uint64(ind2)*10000 + uint64(ind3)*1000 + uint64(ind4)*100 + uint64(ind5)*10 + uint64(ind6) - } - i++ - ind8 := intDigits[iter.buf[i]] - if ind8 == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value*1000000 + uint64(ind2)*100000 + uint64(ind3)*10000 + uint64(ind4)*1000 + uint64(ind5)*100 + uint64(ind6)*10 + uint64(ind7) - } - i++ - ind9 := intDigits[iter.buf[i]] - value = value*10000000 + uint64(ind2)*1000000 + uint64(ind3)*100000 + uint64(ind4)*10000 + uint64(ind5)*1000 + uint64(ind6)*100 + uint64(ind7)*10 + uint64(ind8) - iter.head = i - if ind9 == invalidCharForNumber { - iter.assertInteger() - return value - } - } - for { - for i := iter.head; i < iter.tail; i++ { - ind = intDigits[iter.buf[i]] - if ind == invalidCharForNumber { - iter.head = i - iter.assertInteger() - return value - } - if value > uint64SafeToMultiple10 { - value2 := (value << 3) + (value << 1) + uint64(ind) - if value2 < value { - iter.ReportError("readUint64", "overflow") - return - } - value = value2 - continue - } - value = (value << 3) + (value << 1) + uint64(ind) - } - if !iter.loadMore() { - iter.assertInteger() - return value - } - } -} - -func (iter *Iterator) assertInteger() { - if iter.head < len(iter.buf) && iter.buf[iter.head] == '.' { - iter.ReportError("assertInteger", "can not decode float as int") - } -} diff --git a/deps/github.com/json-iterator/go/feature_iter_object.go b/deps/github.com/json-iterator/go/feature_iter_object.go deleted file mode 100644 index dfd91fa60..000000000 --- a/deps/github.com/json-iterator/go/feature_iter_object.go +++ /dev/null @@ -1,267 +0,0 @@ -package jsoniter - -import ( - "fmt" - "unicode" - "unsafe" -) - -// ReadObject read one field from object. -// If object ended, returns empty string. -// Otherwise, returns the field name. -func (iter *Iterator) ReadObject() (ret string) { - c := iter.nextToken() - switch c { - case 'n': - iter.skipThreeBytes('u', 'l', 'l') - return "" // null - case '{': - c = iter.nextToken() - if c == '"' { - iter.unreadByte() - if iter.cfg.objectFieldMustBeSimpleString { - return string(iter.readObjectFieldAsBytes()) - } else { - field := iter.ReadString() - c = iter.nextToken() - if c != ':' { - iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) - } - return field - } - } - if c == '}' { - return "" // end of object - } - iter.ReportError("ReadObject", `expect " after {, but found `+string([]byte{c})) - return - case ',': - if iter.cfg.objectFieldMustBeSimpleString { - return string(iter.readObjectFieldAsBytes()) - } else { - field := iter.ReadString() - c = iter.nextToken() - if c != ':' { - iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) - } - return field - } - case '}': - return "" // end of object - default: - iter.ReportError("ReadObject", fmt.Sprintf(`expect { or , or } or n, but found %s`, string([]byte{c}))) - return - } -} - -func (iter *Iterator) readFieldHash() int32 { - hash := int64(0x811c9dc5) - c := iter.nextToken() - if c == '"' { - for { - for i := iter.head; i < iter.tail; i++ { - // require ascii string and no escape - b := iter.buf[i] - if !iter.cfg.objectFieldMustBeSimpleString && b == '\\' { - iter.head = i - for _, b := range iter.readStringSlowPath() { - if 'A' <= b && b <= 'Z' { - b += 'a' - 'A' - } - hash ^= int64(b) - hash *= 0x1000193 - } - c = iter.nextToken() - if c != ':' { - iter.ReportError("readFieldHash", `expect :, but found `+string([]byte{c})) - return 0 - } - return int32(hash) - } - if b == '"' { - iter.head = i + 1 - c = iter.nextToken() - if c != ':' { - iter.ReportError("readFieldHash", `expect :, but found `+string([]byte{c})) - return 0 - } - return int32(hash) - } - if 'A' <= b && b <= 'Z' { - b += 'a' - 'A' - } - hash ^= int64(b) - hash *= 0x1000193 - } - if !iter.loadMore() { - iter.ReportError("readFieldHash", `incomplete field name`) - return 0 - } - } - } - iter.ReportError("readFieldHash", `expect ", but found `+string([]byte{c})) - return 0 -} - -func calcHash(str string) int32 { - hash := int64(0x811c9dc5) - for _, b := range str { - hash ^= int64(unicode.ToLower(b)) - hash *= 0x1000193 - } - return int32(hash) -} - -// ReadObjectCB read object with callback, the key is ascii only and field name not copied -func (iter *Iterator) ReadObjectCB(callback func(*Iterator, string) bool) bool { - c := iter.nextToken() - var fieldBytes []byte - var field string - if c == '{' { - c = iter.nextToken() - if c == '"' { - iter.unreadByte() - if iter.cfg.objectFieldMustBeSimpleString { - fieldBytes = iter.readObjectFieldAsBytes() - field = *(*string)(unsafe.Pointer(&fieldBytes)) - } else { - field = iter.ReadString() - c = iter.nextToken() - if c != ':' { - iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) - } - } - if !callback(iter, field) { - return false - } - c = iter.nextToken() - for c == ',' { - if iter.cfg.objectFieldMustBeSimpleString { - fieldBytes = iter.readObjectFieldAsBytes() - field = *(*string)(unsafe.Pointer(&fieldBytes)) - } else { - field = iter.ReadString() - c = iter.nextToken() - if c != ':' { - iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) - } - } - if !callback(iter, field) { - return false - } - c = iter.nextToken() - } - if c != '}' { - iter.ReportError("ReadObjectCB", `object not ended with }`) - return false - } - return true - } - if c == '}' { - return true - } - iter.ReportError("ReadObjectCB", `expect " after }, but found `+string([]byte{c})) - return false - } - if c == 'n' { - iter.skipThreeBytes('u', 'l', 'l') - return true // null - } - iter.ReportError("ReadObjectCB", `expect { or n, but found `+string([]byte{c})) - return false -} - -// ReadMapCB read map with callback, the key can be any string -func (iter *Iterator) ReadMapCB(callback func(*Iterator, string) bool) bool { - c := iter.nextToken() - if c == '{' { - c = iter.nextToken() - if c == '"' { - iter.unreadByte() - field := iter.ReadString() - if iter.nextToken() != ':' { - iter.ReportError("ReadMapCB", "expect : after object field, but found "+string([]byte{c})) - return false - } - if !callback(iter, field) { - return false - } - c = iter.nextToken() - for c == ',' { - field = iter.ReadString() - if iter.nextToken() != ':' { - iter.ReportError("ReadMapCB", "expect : after object field, but found "+string([]byte{c})) - return false - } - if !callback(iter, field) { - return false - } - c = iter.nextToken() - } - if c != '}' { - iter.ReportError("ReadMapCB", `object not ended with }`) - return false - } - return true - } - if c == '}' { - return true - } - iter.ReportError("ReadMapCB", `expect " after }, but found `+string([]byte{c})) - return false - } - if c == 'n' { - iter.skipThreeBytes('u', 'l', 'l') - return true // null - } - iter.ReportError("ReadMapCB", `expect { or n, but found `+string([]byte{c})) - return false -} - -func (iter *Iterator) readObjectStart() bool { - c := iter.nextToken() - if c == '{' { - c = iter.nextToken() - if c == '}' { - return false - } - iter.unreadByte() - return true - } else if c == 'n' { - iter.skipThreeBytes('u', 'l', 'l') - return false - } - iter.ReportError("readObjectStart", "expect { or n, but found "+string([]byte{c})) - return false -} - -func (iter *Iterator) readObjectFieldAsBytes() (ret []byte) { - str := iter.ReadStringAsSlice() - if iter.skipWhitespacesWithoutLoadMore() { - if ret == nil { - ret = make([]byte, len(str)) - copy(ret, str) - } - if !iter.loadMore() { - return - } - } - if iter.buf[iter.head] != ':' { - iter.ReportError("readObjectFieldAsBytes", "expect : after object field, but found "+string([]byte{iter.buf[iter.head]})) - return - } - iter.head++ - if iter.skipWhitespacesWithoutLoadMore() { - if ret == nil { - ret = make([]byte, len(str)) - copy(ret, str) - } - if !iter.loadMore() { - return - } - } - if ret == nil { - return str - } - return ret -} diff --git a/deps/github.com/json-iterator/go/feature_json_number.go b/deps/github.com/json-iterator/go/feature_json_number.go deleted file mode 100644 index e187b200a..000000000 --- a/deps/github.com/json-iterator/go/feature_json_number.go +++ /dev/null @@ -1,31 +0,0 @@ -package jsoniter - -import ( - "encoding/json" - "strconv" -) - -type Number string - -// String returns the literal text of the number. -func (n Number) String() string { return string(n) } - -// Float64 returns the number as a float64. -func (n Number) Float64() (float64, error) { - return strconv.ParseFloat(string(n), 64) -} - -// Int64 returns the number as an int64. -func (n Number) Int64() (int64, error) { - return strconv.ParseInt(string(n), 10, 64) -} - -func CastJsonNumber(val interface{}) (string, bool) { - switch typedVal := val.(type) { - case json.Number: - return string(typedVal), true - case Number: - return string(typedVal), true - } - return "", false -} diff --git a/deps/github.com/json-iterator/go/feature_pool.go b/deps/github.com/json-iterator/go/feature_pool.go deleted file mode 100644 index 52d38e685..000000000 --- a/deps/github.com/json-iterator/go/feature_pool.go +++ /dev/null @@ -1,59 +0,0 @@ -package jsoniter - -import ( - "io" -) - -// IteratorPool a thread safe pool of iterators with same configuration -type IteratorPool interface { - BorrowIterator(data []byte) *Iterator - ReturnIterator(iter *Iterator) -} - -// StreamPool a thread safe pool of streams with same configuration -type StreamPool interface { - BorrowStream(writer io.Writer) *Stream - ReturnStream(stream *Stream) -} - -func (cfg *frozenConfig) BorrowStream(writer io.Writer) *Stream { - select { - case stream := <-cfg.streamPool: - stream.Reset(writer) - return stream - default: - return NewStream(cfg, writer, 512) - } -} - -func (cfg *frozenConfig) ReturnStream(stream *Stream) { - stream.Error = nil - stream.Attachment = nil - select { - case cfg.streamPool <- stream: - return - default: - return - } -} - -func (cfg *frozenConfig) BorrowIterator(data []byte) *Iterator { - select { - case iter := <-cfg.iteratorPool: - iter.ResetBytes(data) - return iter - default: - return ParseBytes(cfg, data) - } -} - -func (cfg *frozenConfig) ReturnIterator(iter *Iterator) { - iter.Error = nil - iter.Attachment = nil - select { - case cfg.iteratorPool <- iter: - return - default: - return - } -} diff --git a/deps/github.com/json-iterator/go/feature_reflect.go b/deps/github.com/json-iterator/go/feature_reflect.go deleted file mode 100644 index bed7764ed..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect.go +++ /dev/null @@ -1,727 +0,0 @@ -package jsoniter - -import ( - "encoding" - "encoding/json" - "fmt" - "reflect" - "time" - "unsafe" -) - -// ValDecoder is an internal type registered to cache as needed. -// Don't confuse jsoniter.ValDecoder with json.Decoder. -// For json.Decoder's adapter, refer to jsoniter.AdapterDecoder(todo link). -// -// Reflection on type to create decoders, which is then cached -// Reflection on value is avoided as we can, as the reflect.Value itself will allocate, with following exceptions -// 1. create instance of new value, for example *int will need a int to be allocated -// 2. append to slice, if the existing cap is not enough, allocate will be done using Reflect.New -// 3. assignment to map, both key and value will be reflect.Value -// For a simple struct binding, it will be reflect.Value free and allocation free -type ValDecoder interface { - Decode(ptr unsafe.Pointer, iter *Iterator) -} - -// ValEncoder is an internal type registered to cache as needed. -// Don't confuse jsoniter.ValEncoder with json.Encoder. -// For json.Encoder's adapter, refer to jsoniter.AdapterEncoder(todo godoc link). -type ValEncoder interface { - IsEmpty(ptr unsafe.Pointer) bool - Encode(ptr unsafe.Pointer, stream *Stream) - EncodeInterface(val interface{}, stream *Stream) -} - -type checkIsEmpty interface { - IsEmpty(ptr unsafe.Pointer) bool -} - -// WriteToStream the default implementation for TypeEncoder method EncodeInterface -func WriteToStream(val interface{}, stream *Stream, encoder ValEncoder) { - e := (*emptyInterface)(unsafe.Pointer(&val)) - if e.word == nil { - stream.WriteNil() - return - } - if reflect.TypeOf(val).Kind() == reflect.Ptr { - encoder.Encode(unsafe.Pointer(&e.word), stream) - } else { - encoder.Encode(e.word, stream) - } -} - -var jsonNumberType reflect.Type -var jsoniterNumberType reflect.Type -var jsonRawMessageType reflect.Type -var jsoniterRawMessageType reflect.Type -var anyType reflect.Type -var marshalerType reflect.Type -var unmarshalerType reflect.Type -var textMarshalerType reflect.Type -var textUnmarshalerType reflect.Type - -func init() { - jsonNumberType = reflect.TypeOf((*json.Number)(nil)).Elem() - jsoniterNumberType = reflect.TypeOf((*Number)(nil)).Elem() - jsonRawMessageType = reflect.TypeOf((*json.RawMessage)(nil)).Elem() - jsoniterRawMessageType = reflect.TypeOf((*RawMessage)(nil)).Elem() - anyType = reflect.TypeOf((*Any)(nil)).Elem() - marshalerType = reflect.TypeOf((*json.Marshaler)(nil)).Elem() - unmarshalerType = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() - textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() - textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() -} - -type OptionalDecoder struct { - ValueType reflect.Type - ValueDecoder ValDecoder -} - -func (decoder *OptionalDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if iter.ReadNil() { - *((*unsafe.Pointer)(ptr)) = nil - } else { - if *((*unsafe.Pointer)(ptr)) == nil { - //pointer to null, we have to allocate memory to hold the value - value := reflect.New(decoder.ValueType) - newPtr := extractInterface(value.Interface()).word - decoder.ValueDecoder.Decode(newPtr, iter) - *((*uintptr)(ptr)) = uintptr(newPtr) - } else { - //reuse existing instance - decoder.ValueDecoder.Decode(*((*unsafe.Pointer)(ptr)), iter) - } - } -} - -type deferenceDecoder struct { - // only to deference a pointer - valueType reflect.Type - valueDecoder ValDecoder -} - -func (decoder *deferenceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if *((*unsafe.Pointer)(ptr)) == nil { - //pointer to null, we have to allocate memory to hold the value - value := reflect.New(decoder.valueType) - newPtr := extractInterface(value.Interface()).word - decoder.valueDecoder.Decode(newPtr, iter) - *((*uintptr)(ptr)) = uintptr(newPtr) - } else { - //reuse existing instance - decoder.valueDecoder.Decode(*((*unsafe.Pointer)(ptr)), iter) - } -} - -type OptionalEncoder struct { - ValueEncoder ValEncoder -} - -func (encoder *OptionalEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - if *((*unsafe.Pointer)(ptr)) == nil { - stream.WriteNil() - } else { - encoder.ValueEncoder.Encode(*((*unsafe.Pointer)(ptr)), stream) - } -} - -func (encoder *OptionalEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *OptionalEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return *((*unsafe.Pointer)(ptr)) == nil -} - -type optionalMapEncoder struct { - valueEncoder ValEncoder -} - -func (encoder *optionalMapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - if *((*unsafe.Pointer)(ptr)) == nil { - stream.WriteNil() - } else { - encoder.valueEncoder.Encode(*((*unsafe.Pointer)(ptr)), stream) - } -} - -func (encoder *optionalMapEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *optionalMapEncoder) IsEmpty(ptr unsafe.Pointer) bool { - p := *((*unsafe.Pointer)(ptr)) - return p == nil || encoder.valueEncoder.IsEmpty(p) -} - -type placeholderEncoder struct { - cfg *frozenConfig - cacheKey reflect.Type -} - -func (encoder *placeholderEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - encoder.getRealEncoder().Encode(ptr, stream) -} - -func (encoder *placeholderEncoder) EncodeInterface(val interface{}, stream *Stream) { - encoder.getRealEncoder().EncodeInterface(val, stream) -} - -func (encoder *placeholderEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return encoder.getRealEncoder().IsEmpty(ptr) -} - -func (encoder *placeholderEncoder) getRealEncoder() ValEncoder { - for i := 0; i < 500; i++ { - realDecoder := encoder.cfg.getEncoderFromCache(encoder.cacheKey) - _, isPlaceholder := realDecoder.(*placeholderEncoder) - if isPlaceholder { - time.Sleep(10 * time.Millisecond) - } else { - return realDecoder - } - } - panic(fmt.Sprintf("real encoder not found for cache key: %v", encoder.cacheKey)) -} - -type placeholderDecoder struct { - cfg *frozenConfig - cacheKey reflect.Type -} - -func (decoder *placeholderDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - for i := 0; i < 500; i++ { - realDecoder := decoder.cfg.getDecoderFromCache(decoder.cacheKey) - _, isPlaceholder := realDecoder.(*placeholderDecoder) - if isPlaceholder { - time.Sleep(10 * time.Millisecond) - } else { - realDecoder.Decode(ptr, iter) - return - } - } - panic(fmt.Sprintf("real decoder not found for cache key: %v", decoder.cacheKey)) -} - -// emptyInterface is the header for an interface{} value. -type emptyInterface struct { - typ unsafe.Pointer - word unsafe.Pointer -} - -// emptyInterface is the header for an interface with method (not interface{}) -type nonEmptyInterface struct { - // see ../runtime/iface.go:/Itab - itab *struct { - ityp unsafe.Pointer // static interface type - typ unsafe.Pointer // dynamic concrete type - link unsafe.Pointer - bad int32 - unused int32 - fun [100000]unsafe.Pointer // method table - } - word unsafe.Pointer -} - -// ReadVal copy the underlying JSON into go interface, same as json.Unmarshal -func (iter *Iterator) ReadVal(obj interface{}) { - typ := reflect.TypeOf(obj) - cacheKey := typ.Elem() - decoder, err := decoderOfType(iter.cfg, cacheKey) - if err != nil { - iter.Error = err - return - } - e := (*emptyInterface)(unsafe.Pointer(&obj)) - decoder.Decode(e.word, iter) -} - -// WriteVal copy the go interface into underlying JSON, same as json.Marshal -func (stream *Stream) WriteVal(val interface{}) { - if nil == val { - stream.WriteNil() - return - } - typ := reflect.TypeOf(val) - cacheKey := typ - encoder, err := encoderOfType(stream.cfg, cacheKey) - if err != nil { - stream.Error = err - return - } - encoder.EncodeInterface(val, stream) -} - -type prefix string - -func (p prefix) addToDecoder(decoder ValDecoder, err error) (ValDecoder, error) { - if err != nil { - return nil, fmt.Errorf("%s: %s", p, err.Error()) - } - return decoder, err -} - -func (p prefix) addToEncoder(encoder ValEncoder, err error) (ValEncoder, error) { - if err != nil { - return nil, fmt.Errorf("%s: %s", p, err.Error()) - } - return encoder, err -} - -func decoderOfType(cfg *frozenConfig, typ reflect.Type) (ValDecoder, error) { - cacheKey := typ - decoder := cfg.getDecoderFromCache(cacheKey) - if decoder != nil { - return decoder, nil - } - decoder = getTypeDecoderFromExtension(cfg, typ) - if decoder != nil { - cfg.addDecoderToCache(cacheKey, decoder) - return decoder, nil - } - decoder = &placeholderDecoder{cfg: cfg, cacheKey: cacheKey} - cfg.addDecoderToCache(cacheKey, decoder) - decoder, err := createDecoderOfType(cfg, typ) - for _, extension := range extensions { - decoder = extension.DecorateDecoder(typ, decoder) - } - for _, extension := range cfg.extensions { - decoder = extension.DecorateDecoder(typ, decoder) - } - cfg.addDecoderToCache(cacheKey, decoder) - return decoder, err -} - -func createDecoderOfType(cfg *frozenConfig, typ reflect.Type) (ValDecoder, error) { - typeName := typ.String() - if typ == jsonRawMessageType { - return &jsonRawMessageCodec{}, nil - } - if typ == jsoniterRawMessageType { - return &jsoniterRawMessageCodec{}, nil - } - if typ.AssignableTo(jsonNumberType) { - return &jsonNumberCodec{}, nil - } - if typ.AssignableTo(jsoniterNumberType) { - return &jsoniterNumberCodec{}, nil - } - if typ.Implements(unmarshalerType) { - templateInterface := reflect.New(typ).Elem().Interface() - var decoder ValDecoder = &unmarshalerDecoder{extractInterface(templateInterface)} - if typ.Kind() == reflect.Ptr { - decoder = &OptionalDecoder{typ.Elem(), decoder} - } - return decoder, nil - } - if reflect.PtrTo(typ).Implements(unmarshalerType) { - templateInterface := reflect.New(typ).Interface() - var decoder ValDecoder = &unmarshalerDecoder{extractInterface(templateInterface)} - return decoder, nil - } - if typ.Implements(textUnmarshalerType) { - templateInterface := reflect.New(typ).Elem().Interface() - var decoder ValDecoder = &textUnmarshalerDecoder{extractInterface(templateInterface)} - if typ.Kind() == reflect.Ptr { - decoder = &OptionalDecoder{typ.Elem(), decoder} - } - return decoder, nil - } - if reflect.PtrTo(typ).Implements(textUnmarshalerType) { - templateInterface := reflect.New(typ).Interface() - var decoder ValDecoder = &textUnmarshalerDecoder{extractInterface(templateInterface)} - return decoder, nil - } - if typ.Kind() == reflect.Slice && typ.Elem().Kind() == reflect.Uint8 { - sliceDecoder, err := prefix("[slice]").addToDecoder(decoderOfSlice(cfg, typ)) - if err != nil { - return nil, err - } - return &base64Codec{sliceDecoder: sliceDecoder}, nil - } - if typ.Implements(anyType) { - return &anyCodec{}, nil - } - switch typ.Kind() { - case reflect.String: - if typeName != "string" { - return decoderOfType(cfg, reflect.TypeOf((*string)(nil)).Elem()) - } - return &stringCodec{}, nil - case reflect.Int: - if typeName != "int" { - return decoderOfType(cfg, reflect.TypeOf((*int)(nil)).Elem()) - } - return &intCodec{}, nil - case reflect.Int8: - if typeName != "int8" { - return decoderOfType(cfg, reflect.TypeOf((*int8)(nil)).Elem()) - } - return &int8Codec{}, nil - case reflect.Int16: - if typeName != "int16" { - return decoderOfType(cfg, reflect.TypeOf((*int16)(nil)).Elem()) - } - return &int16Codec{}, nil - case reflect.Int32: - if typeName != "int32" { - return decoderOfType(cfg, reflect.TypeOf((*int32)(nil)).Elem()) - } - return &int32Codec{}, nil - case reflect.Int64: - if typeName != "int64" { - return decoderOfType(cfg, reflect.TypeOf((*int64)(nil)).Elem()) - } - return &int64Codec{}, nil - case reflect.Uint: - if typeName != "uint" { - return decoderOfType(cfg, reflect.TypeOf((*uint)(nil)).Elem()) - } - return &uintCodec{}, nil - case reflect.Uint8: - if typeName != "uint8" { - return decoderOfType(cfg, reflect.TypeOf((*uint8)(nil)).Elem()) - } - return &uint8Codec{}, nil - case reflect.Uint16: - if typeName != "uint16" { - return decoderOfType(cfg, reflect.TypeOf((*uint16)(nil)).Elem()) - } - return &uint16Codec{}, nil - case reflect.Uint32: - if typeName != "uint32" { - return decoderOfType(cfg, reflect.TypeOf((*uint32)(nil)).Elem()) - } - return &uint32Codec{}, nil - case reflect.Uintptr: - if typeName != "uintptr" { - return decoderOfType(cfg, reflect.TypeOf((*uintptr)(nil)).Elem()) - } - return &uintptrCodec{}, nil - case reflect.Uint64: - if typeName != "uint64" { - return decoderOfType(cfg, reflect.TypeOf((*uint64)(nil)).Elem()) - } - return &uint64Codec{}, nil - case reflect.Float32: - if typeName != "float32" { - return decoderOfType(cfg, reflect.TypeOf((*float32)(nil)).Elem()) - } - return &float32Codec{}, nil - case reflect.Float64: - if typeName != "float64" { - return decoderOfType(cfg, reflect.TypeOf((*float64)(nil)).Elem()) - } - return &float64Codec{}, nil - case reflect.Bool: - if typeName != "bool" { - return decoderOfType(cfg, reflect.TypeOf((*bool)(nil)).Elem()) - } - return &boolCodec{}, nil - case reflect.Interface: - if typ.NumMethod() == 0 { - return &emptyInterfaceCodec{}, nil - } - return &nonEmptyInterfaceCodec{}, nil - case reflect.Struct: - return prefix(fmt.Sprintf("[%s]", typeName)).addToDecoder(decoderOfStruct(cfg, typ)) - case reflect.Array: - return prefix("[array]").addToDecoder(decoderOfArray(cfg, typ)) - case reflect.Slice: - return prefix("[slice]").addToDecoder(decoderOfSlice(cfg, typ)) - case reflect.Map: - return prefix("[map]").addToDecoder(decoderOfMap(cfg, typ)) - case reflect.Ptr: - return prefix("[optional]").addToDecoder(decoderOfOptional(cfg, typ)) - default: - return nil, fmt.Errorf("unsupported type: %v", typ) - } -} - -func encoderOfType(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - cacheKey := typ - encoder := cfg.getEncoderFromCache(cacheKey) - if encoder != nil { - return encoder, nil - } - encoder = getTypeEncoderFromExtension(cfg, typ) - if encoder != nil { - cfg.addEncoderToCache(cacheKey, encoder) - return encoder, nil - } - encoder = &placeholderEncoder{cfg: cfg, cacheKey: cacheKey} - cfg.addEncoderToCache(cacheKey, encoder) - encoder, err := createEncoderOfType(cfg, typ) - for _, extension := range extensions { - encoder = extension.DecorateEncoder(typ, encoder) - } - for _, extension := range cfg.extensions { - encoder = extension.DecorateEncoder(typ, encoder) - } - cfg.addEncoderToCache(cacheKey, encoder) - return encoder, err -} - -func createEncoderOfType(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - if typ == jsonRawMessageType { - return &jsonRawMessageCodec{}, nil - } - if typ == jsoniterRawMessageType { - return &jsoniterRawMessageCodec{}, nil - } - if typ.AssignableTo(jsonNumberType) { - return &jsonNumberCodec{}, nil - } - if typ.AssignableTo(jsoniterNumberType) { - return &jsoniterNumberCodec{}, nil - } - if typ.Implements(marshalerType) { - checkIsEmpty, err := createCheckIsEmpty(cfg, typ) - if err != nil { - return nil, err - } - templateInterface := reflect.New(typ).Elem().Interface() - var encoder ValEncoder = &marshalerEncoder{ - templateInterface: extractInterface(templateInterface), - checkIsEmpty: checkIsEmpty, - } - if typ.Kind() == reflect.Ptr { - encoder = &OptionalEncoder{encoder} - } - return encoder, nil - } - if reflect.PtrTo(typ).Implements(marshalerType) { - checkIsEmpty, err := createCheckIsEmpty(cfg, reflect.PtrTo(typ)) - if err != nil { - return nil, err - } - templateInterface := reflect.New(typ).Interface() - var encoder ValEncoder = &marshalerEncoder{ - templateInterface: extractInterface(templateInterface), - checkIsEmpty: checkIsEmpty, - } - return encoder, nil - } - if typ.Implements(textMarshalerType) { - checkIsEmpty, err := createCheckIsEmpty(cfg, typ) - if err != nil { - return nil, err - } - templateInterface := reflect.New(typ).Elem().Interface() - var encoder ValEncoder = &textMarshalerEncoder{ - templateInterface: extractInterface(templateInterface), - checkIsEmpty: checkIsEmpty, - } - if typ.Kind() == reflect.Ptr { - encoder = &OptionalEncoder{encoder} - } - return encoder, nil - } - if typ.Kind() == reflect.Slice && typ.Elem().Kind() == reflect.Uint8 { - return &base64Codec{}, nil - } - if typ.Implements(anyType) { - return &anyCodec{}, nil - } - return createEncoderOfSimpleType(cfg, typ) -} - -func createCheckIsEmpty(cfg *frozenConfig, typ reflect.Type) (checkIsEmpty, error) { - kind := typ.Kind() - switch kind { - case reflect.String: - return &stringCodec{}, nil - case reflect.Int: - return &intCodec{}, nil - case reflect.Int8: - return &int8Codec{}, nil - case reflect.Int16: - return &int16Codec{}, nil - case reflect.Int32: - return &int32Codec{}, nil - case reflect.Int64: - return &int64Codec{}, nil - case reflect.Uint: - return &uintCodec{}, nil - case reflect.Uint8: - return &uint8Codec{}, nil - case reflect.Uint16: - return &uint16Codec{}, nil - case reflect.Uint32: - return &uint32Codec{}, nil - case reflect.Uintptr: - return &uintptrCodec{}, nil - case reflect.Uint64: - return &uint64Codec{}, nil - case reflect.Float32: - return &float32Codec{}, nil - case reflect.Float64: - return &float64Codec{}, nil - case reflect.Bool: - return &boolCodec{}, nil - case reflect.Interface: - if typ.NumMethod() == 0 { - return &emptyInterfaceCodec{}, nil - } - return &nonEmptyInterfaceCodec{}, nil - case reflect.Struct: - return &structEncoder{}, nil - case reflect.Array: - return &arrayEncoder{}, nil - case reflect.Slice: - return &sliceEncoder{}, nil - case reflect.Map: - return encoderOfMap(cfg, typ) - case reflect.Ptr: - return &OptionalEncoder{}, nil - default: - return nil, fmt.Errorf("unsupported type: %v", typ) - } -} - -func createEncoderOfSimpleType(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - typeName := typ.String() - kind := typ.Kind() - switch kind { - case reflect.String: - if typeName != "string" { - return encoderOfType(cfg, reflect.TypeOf((*string)(nil)).Elem()) - } - return &stringCodec{}, nil - case reflect.Int: - if typeName != "int" { - return encoderOfType(cfg, reflect.TypeOf((*int)(nil)).Elem()) - } - return &intCodec{}, nil - case reflect.Int8: - if typeName != "int8" { - return encoderOfType(cfg, reflect.TypeOf((*int8)(nil)).Elem()) - } - return &int8Codec{}, nil - case reflect.Int16: - if typeName != "int16" { - return encoderOfType(cfg, reflect.TypeOf((*int16)(nil)).Elem()) - } - return &int16Codec{}, nil - case reflect.Int32: - if typeName != "int32" { - return encoderOfType(cfg, reflect.TypeOf((*int32)(nil)).Elem()) - } - return &int32Codec{}, nil - case reflect.Int64: - if typeName != "int64" { - return encoderOfType(cfg, reflect.TypeOf((*int64)(nil)).Elem()) - } - return &int64Codec{}, nil - case reflect.Uint: - if typeName != "uint" { - return encoderOfType(cfg, reflect.TypeOf((*uint)(nil)).Elem()) - } - return &uintCodec{}, nil - case reflect.Uint8: - if typeName != "uint8" { - return encoderOfType(cfg, reflect.TypeOf((*uint8)(nil)).Elem()) - } - return &uint8Codec{}, nil - case reflect.Uint16: - if typeName != "uint16" { - return encoderOfType(cfg, reflect.TypeOf((*uint16)(nil)).Elem()) - } - return &uint16Codec{}, nil - case reflect.Uint32: - if typeName != "uint32" { - return encoderOfType(cfg, reflect.TypeOf((*uint32)(nil)).Elem()) - } - return &uint32Codec{}, nil - case reflect.Uintptr: - if typeName != "uintptr" { - return encoderOfType(cfg, reflect.TypeOf((*uintptr)(nil)).Elem()) - } - return &uintptrCodec{}, nil - case reflect.Uint64: - if typeName != "uint64" { - return encoderOfType(cfg, reflect.TypeOf((*uint64)(nil)).Elem()) - } - return &uint64Codec{}, nil - case reflect.Float32: - if typeName != "float32" { - return encoderOfType(cfg, reflect.TypeOf((*float32)(nil)).Elem()) - } - return &float32Codec{}, nil - case reflect.Float64: - if typeName != "float64" { - return encoderOfType(cfg, reflect.TypeOf((*float64)(nil)).Elem()) - } - return &float64Codec{}, nil - case reflect.Bool: - if typeName != "bool" { - return encoderOfType(cfg, reflect.TypeOf((*bool)(nil)).Elem()) - } - return &boolCodec{}, nil - case reflect.Interface: - if typ.NumMethod() == 0 { - return &emptyInterfaceCodec{}, nil - } - return &nonEmptyInterfaceCodec{}, nil - case reflect.Struct: - return prefix(fmt.Sprintf("[%s]", typeName)).addToEncoder(encoderOfStruct(cfg, typ)) - case reflect.Array: - return prefix("[array]").addToEncoder(encoderOfArray(cfg, typ)) - case reflect.Slice: - return prefix("[slice]").addToEncoder(encoderOfSlice(cfg, typ)) - case reflect.Map: - return prefix("[map]").addToEncoder(encoderOfMap(cfg, typ)) - case reflect.Ptr: - return prefix("[optional]").addToEncoder(encoderOfOptional(cfg, typ)) - default: - return nil, fmt.Errorf("unsupported type: %v", typ) - } -} - -func decoderOfOptional(cfg *frozenConfig, typ reflect.Type) (ValDecoder, error) { - elemType := typ.Elem() - decoder, err := decoderOfType(cfg, elemType) - if err != nil { - return nil, err - } - return &OptionalDecoder{elemType, decoder}, nil -} - -func encoderOfOptional(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - elemType := typ.Elem() - elemEncoder, err := encoderOfType(cfg, elemType) - if err != nil { - return nil, err - } - encoder := &OptionalEncoder{elemEncoder} - if elemType.Kind() == reflect.Map { - encoder = &OptionalEncoder{encoder} - } - return encoder, nil -} - -func decoderOfMap(cfg *frozenConfig, typ reflect.Type) (ValDecoder, error) { - decoder, err := decoderOfType(cfg, typ.Elem()) - if err != nil { - return nil, err - } - mapInterface := reflect.New(typ).Interface() - return &mapDecoder{typ, typ.Key(), typ.Elem(), decoder, extractInterface(mapInterface)}, nil -} - -func extractInterface(val interface{}) emptyInterface { - return *((*emptyInterface)(unsafe.Pointer(&val))) -} - -func encoderOfMap(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - elemType := typ.Elem() - encoder, err := encoderOfType(cfg, elemType) - if err != nil { - return nil, err - } - mapInterface := reflect.New(typ).Elem().Interface() - if cfg.sortMapKeys { - return &sortKeysMapEncoder{typ, elemType, encoder, *((*emptyInterface)(unsafe.Pointer(&mapInterface)))}, nil - } - return &mapEncoder{typ, elemType, encoder, *((*emptyInterface)(unsafe.Pointer(&mapInterface)))}, nil -} diff --git a/deps/github.com/json-iterator/go/feature_reflect_array.go b/deps/github.com/json-iterator/go/feature_reflect_array.go deleted file mode 100644 index d661fb6fe..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect_array.go +++ /dev/null @@ -1,99 +0,0 @@ -package jsoniter - -import ( - "fmt" - "io" - "reflect" - "unsafe" -) - -func decoderOfArray(cfg *frozenConfig, typ reflect.Type) (ValDecoder, error) { - decoder, err := decoderOfType(cfg, typ.Elem()) - if err != nil { - return nil, err - } - return &arrayDecoder{typ, typ.Elem(), decoder}, nil -} - -func encoderOfArray(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - encoder, err := encoderOfType(cfg, typ.Elem()) - if err != nil { - return nil, err - } - if typ.Elem().Kind() == reflect.Map { - encoder = &OptionalEncoder{encoder} - } - return &arrayEncoder{typ, typ.Elem(), encoder}, nil -} - -type arrayEncoder struct { - arrayType reflect.Type - elemType reflect.Type - elemEncoder ValEncoder -} - -func (encoder *arrayEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteArrayStart() - elemPtr := unsafe.Pointer(ptr) - encoder.elemEncoder.Encode(elemPtr, stream) - for i := 1; i < encoder.arrayType.Len(); i++ { - stream.WriteMore() - elemPtr = unsafe.Pointer(uintptr(elemPtr) + encoder.elemType.Size()) - encoder.elemEncoder.Encode(unsafe.Pointer(elemPtr), stream) - } - stream.WriteArrayEnd() - if stream.Error != nil && stream.Error != io.EOF { - stream.Error = fmt.Errorf("%v: %s", encoder.arrayType, stream.Error.Error()) - } -} - -func (encoder *arrayEncoder) EncodeInterface(val interface{}, stream *Stream) { - // special optimization for interface{} - e := (*emptyInterface)(unsafe.Pointer(&val)) - if e.word == nil { - stream.WriteArrayStart() - stream.WriteNil() - stream.WriteArrayEnd() - return - } - elemType := encoder.arrayType.Elem() - if encoder.arrayType.Len() == 1 && (elemType.Kind() == reflect.Ptr || elemType.Kind() == reflect.Map) { - ptr := uintptr(e.word) - e.word = unsafe.Pointer(&ptr) - } - if reflect.TypeOf(val).Kind() == reflect.Ptr { - encoder.Encode(unsafe.Pointer(&e.word), stream) - } else { - encoder.Encode(e.word, stream) - } -} - -func (encoder *arrayEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return false -} - -type arrayDecoder struct { - arrayType reflect.Type - elemType reflect.Type - elemDecoder ValDecoder -} - -func (decoder *arrayDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - decoder.doDecode(ptr, iter) - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.arrayType, iter.Error.Error()) - } -} - -func (decoder *arrayDecoder) doDecode(ptr unsafe.Pointer, iter *Iterator) { - offset := uintptr(0) - iter.ReadArrayCB(func(iter *Iterator) bool { - if offset < decoder.arrayType.Size() { - decoder.elemDecoder.Decode(unsafe.Pointer(uintptr(ptr)+offset), iter) - offset += decoder.elemType.Size() - } else { - iter.Skip() - } - return true - }) -} diff --git a/deps/github.com/json-iterator/go/feature_reflect_extension.go b/deps/github.com/json-iterator/go/feature_reflect_extension.go deleted file mode 100644 index c129076bc..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect_extension.go +++ /dev/null @@ -1,435 +0,0 @@ -package jsoniter - -import ( - "fmt" - "reflect" - "sort" - "strings" - "unicode" - "unsafe" -) - -var typeDecoders = map[string]ValDecoder{} -var fieldDecoders = map[string]ValDecoder{} -var typeEncoders = map[string]ValEncoder{} -var fieldEncoders = map[string]ValEncoder{} -var extensions = []Extension{} - -// StructDescriptor describe how should we encode/decode the struct -type StructDescriptor struct { - onePtrEmbedded bool - onePtrOptimization bool - Type reflect.Type - Fields []*Binding -} - -// GetField get one field from the descriptor by its name. -// Can not use map here to keep field orders. -func (structDescriptor *StructDescriptor) GetField(fieldName string) *Binding { - for _, binding := range structDescriptor.Fields { - if binding.Field.Name == fieldName { - return binding - } - } - return nil -} - -// Binding describe how should we encode/decode the struct field -type Binding struct { - levels []int - Field *reflect.StructField - FromNames []string - ToNames []string - Encoder ValEncoder - Decoder ValDecoder -} - -// Extension the one for all SPI. Customize encoding/decoding by specifying alternate encoder/decoder. -// Can also rename fields by UpdateStructDescriptor. -type Extension interface { - UpdateStructDescriptor(structDescriptor *StructDescriptor) - CreateDecoder(typ reflect.Type) ValDecoder - CreateEncoder(typ reflect.Type) ValEncoder - DecorateDecoder(typ reflect.Type, decoder ValDecoder) ValDecoder - DecorateEncoder(typ reflect.Type, encoder ValEncoder) ValEncoder -} - -// DummyExtension embed this type get dummy implementation for all methods of Extension -type DummyExtension struct { -} - -// UpdateStructDescriptor No-op -func (extension *DummyExtension) UpdateStructDescriptor(structDescriptor *StructDescriptor) { -} - -// CreateDecoder No-op -func (extension *DummyExtension) CreateDecoder(typ reflect.Type) ValDecoder { - return nil -} - -// CreateEncoder No-op -func (extension *DummyExtension) CreateEncoder(typ reflect.Type) ValEncoder { - return nil -} - -// DecorateDecoder No-op -func (extension *DummyExtension) DecorateDecoder(typ reflect.Type, decoder ValDecoder) ValDecoder { - return decoder -} - -// DecorateEncoder No-op -func (extension *DummyExtension) DecorateEncoder(typ reflect.Type, encoder ValEncoder) ValEncoder { - return encoder -} - -type funcDecoder struct { - fun DecoderFunc -} - -func (decoder *funcDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - decoder.fun(ptr, iter) -} - -type funcEncoder struct { - fun EncoderFunc - isEmptyFunc func(ptr unsafe.Pointer) bool -} - -func (encoder *funcEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - encoder.fun(ptr, stream) -} - -func (encoder *funcEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *funcEncoder) IsEmpty(ptr unsafe.Pointer) bool { - if encoder.isEmptyFunc == nil { - return false - } - return encoder.isEmptyFunc(ptr) -} - -// DecoderFunc the function form of TypeDecoder -type DecoderFunc func(ptr unsafe.Pointer, iter *Iterator) - -// EncoderFunc the function form of TypeEncoder -type EncoderFunc func(ptr unsafe.Pointer, stream *Stream) - -// RegisterTypeDecoderFunc register TypeDecoder for a type with function -func RegisterTypeDecoderFunc(typ string, fun DecoderFunc) { - typeDecoders[typ] = &funcDecoder{fun} -} - -// RegisterTypeDecoder register TypeDecoder for a typ -func RegisterTypeDecoder(typ string, decoder ValDecoder) { - typeDecoders[typ] = decoder -} - -// RegisterFieldDecoderFunc register TypeDecoder for a struct field with function -func RegisterFieldDecoderFunc(typ string, field string, fun DecoderFunc) { - RegisterFieldDecoder(typ, field, &funcDecoder{fun}) -} - -// RegisterFieldDecoder register TypeDecoder for a struct field -func RegisterFieldDecoder(typ string, field string, decoder ValDecoder) { - fieldDecoders[fmt.Sprintf("%s/%s", typ, field)] = decoder -} - -// RegisterTypeEncoderFunc register TypeEncoder for a type with encode/isEmpty function -func RegisterTypeEncoderFunc(typ string, fun EncoderFunc, isEmptyFunc func(unsafe.Pointer) bool) { - typeEncoders[typ] = &funcEncoder{fun, isEmptyFunc} -} - -// RegisterTypeEncoder register TypeEncoder for a type -func RegisterTypeEncoder(typ string, encoder ValEncoder) { - typeEncoders[typ] = encoder -} - -// RegisterFieldEncoderFunc register TypeEncoder for a struct field with encode/isEmpty function -func RegisterFieldEncoderFunc(typ string, field string, fun EncoderFunc, isEmptyFunc func(unsafe.Pointer) bool) { - RegisterFieldEncoder(typ, field, &funcEncoder{fun, isEmptyFunc}) -} - -// RegisterFieldEncoder register TypeEncoder for a struct field -func RegisterFieldEncoder(typ string, field string, encoder ValEncoder) { - fieldEncoders[fmt.Sprintf("%s/%s", typ, field)] = encoder -} - -// RegisterExtension register extension -func RegisterExtension(extension Extension) { - extensions = append(extensions, extension) -} - -func getTypeDecoderFromExtension(cfg *frozenConfig, typ reflect.Type) ValDecoder { - decoder := _getTypeDecoderFromExtension(cfg, typ) - if decoder != nil { - for _, extension := range extensions { - decoder = extension.DecorateDecoder(typ, decoder) - } - for _, extension := range cfg.extensions { - decoder = extension.DecorateDecoder(typ, decoder) - } - } - return decoder -} -func _getTypeDecoderFromExtension(cfg *frozenConfig, typ reflect.Type) ValDecoder { - for _, extension := range extensions { - decoder := extension.CreateDecoder(typ) - if decoder != nil { - return decoder - } - } - for _, extension := range cfg.extensions { - decoder := extension.CreateDecoder(typ) - if decoder != nil { - return decoder - } - } - typeName := typ.String() - decoder := typeDecoders[typeName] - if decoder != nil { - return decoder - } - if typ.Kind() == reflect.Ptr { - decoder := typeDecoders[typ.Elem().String()] - if decoder != nil { - return &OptionalDecoder{typ.Elem(), decoder} - } - } - return nil -} - -func getTypeEncoderFromExtension(cfg *frozenConfig, typ reflect.Type) ValEncoder { - encoder := _getTypeEncoderFromExtension(cfg, typ) - if encoder != nil { - for _, extension := range extensions { - encoder = extension.DecorateEncoder(typ, encoder) - } - for _, extension := range cfg.extensions { - encoder = extension.DecorateEncoder(typ, encoder) - } - } - return encoder -} - -func _getTypeEncoderFromExtension(cfg *frozenConfig, typ reflect.Type) ValEncoder { - for _, extension := range extensions { - encoder := extension.CreateEncoder(typ) - if encoder != nil { - return encoder - } - } - for _, extension := range cfg.extensions { - encoder := extension.CreateEncoder(typ) - if encoder != nil { - return encoder - } - } - typeName := typ.String() - encoder := typeEncoders[typeName] - if encoder != nil { - return encoder - } - if typ.Kind() == reflect.Ptr { - encoder := typeEncoders[typ.Elem().String()] - if encoder != nil { - return &OptionalEncoder{encoder} - } - } - return nil -} - -func describeStruct(cfg *frozenConfig, typ reflect.Type) (*StructDescriptor, error) { - embeddedBindings := []*Binding{} - bindings := []*Binding{} - for i := 0; i < typ.NumField(); i++ { - field := typ.Field(i) - tag := field.Tag.Get(cfg.getTagKey()) - tagParts := strings.Split(tag, ",") - if tag == "-" { - continue - } - if field.Anonymous && (tag == "" || tagParts[0] == "") { - if field.Type.Kind() == reflect.Struct { - structDescriptor, err := describeStruct(cfg, field.Type) - if err != nil { - return nil, err - } - for _, binding := range structDescriptor.Fields { - binding.levels = append([]int{i}, binding.levels...) - omitempty := binding.Encoder.(*structFieldEncoder).omitempty - binding.Encoder = &structFieldEncoder{&field, binding.Encoder, omitempty} - binding.Decoder = &structFieldDecoder{&field, binding.Decoder} - embeddedBindings = append(embeddedBindings, binding) - } - continue - } else if field.Type.Kind() == reflect.Ptr && field.Type.Elem().Kind() == reflect.Struct { - structDescriptor, err := describeStruct(cfg, field.Type.Elem()) - if err != nil { - return nil, err - } - for _, binding := range structDescriptor.Fields { - binding.levels = append([]int{i}, binding.levels...) - omitempty := binding.Encoder.(*structFieldEncoder).omitempty - binding.Encoder = &OptionalEncoder{binding.Encoder} - binding.Encoder = &structFieldEncoder{&field, binding.Encoder, omitempty} - binding.Decoder = &deferenceDecoder{field.Type.Elem(), binding.Decoder} - binding.Decoder = &structFieldDecoder{&field, binding.Decoder} - embeddedBindings = append(embeddedBindings, binding) - } - continue - } - } - fieldNames := calcFieldNames(field.Name, tagParts[0], tag) - fieldCacheKey := fmt.Sprintf("%s/%s", typ.String(), field.Name) - decoder := fieldDecoders[fieldCacheKey] - if decoder == nil { - var err error - decoder, err = decoderOfType(cfg, field.Type) - if len(fieldNames) > 0 && err != nil { - return nil, err - } - } - encoder := fieldEncoders[fieldCacheKey] - if encoder == nil { - var err error - encoder, err = encoderOfType(cfg, field.Type) - if len(fieldNames) > 0 && err != nil { - return nil, err - } - // map is stored as pointer in the struct, - // and treat nil or empty map as empty field - if encoder != nil && field.Type.Kind() == reflect.Map { - encoder = &optionalMapEncoder{encoder} - } - } - binding := &Binding{ - Field: &field, - FromNames: fieldNames, - ToNames: fieldNames, - Decoder: decoder, - Encoder: encoder, - } - binding.levels = []int{i} - bindings = append(bindings, binding) - } - return createStructDescriptor(cfg, typ, bindings, embeddedBindings), nil -} -func createStructDescriptor(cfg *frozenConfig, typ reflect.Type, bindings []*Binding, embeddedBindings []*Binding) *StructDescriptor { - onePtrEmbedded := false - onePtrOptimization := false - if typ.NumField() == 1 { - firstField := typ.Field(0) - switch firstField.Type.Kind() { - case reflect.Ptr: - if firstField.Anonymous && firstField.Type.Elem().Kind() == reflect.Struct { - onePtrEmbedded = true - } - fallthrough - case reflect.Map: - onePtrOptimization = true - case reflect.Struct: - onePtrOptimization = isStructOnePtr(firstField.Type) - } - } - structDescriptor := &StructDescriptor{ - onePtrEmbedded: onePtrEmbedded, - onePtrOptimization: onePtrOptimization, - Type: typ, - Fields: bindings, - } - for _, extension := range extensions { - extension.UpdateStructDescriptor(structDescriptor) - } - for _, extension := range cfg.extensions { - extension.UpdateStructDescriptor(structDescriptor) - } - processTags(structDescriptor, cfg) - // merge normal & embedded bindings & sort with original order - allBindings := sortableBindings(append(embeddedBindings, structDescriptor.Fields...)) - sort.Sort(allBindings) - structDescriptor.Fields = allBindings - return structDescriptor -} - -func isStructOnePtr(typ reflect.Type) bool { - if typ.NumField() == 1 { - firstField := typ.Field(0) - switch firstField.Type.Kind() { - case reflect.Ptr: - return true - case reflect.Map: - return true - case reflect.Struct: - return isStructOnePtr(firstField.Type) - } - } - return false -} - -type sortableBindings []*Binding - -func (bindings sortableBindings) Len() int { - return len(bindings) -} - -func (bindings sortableBindings) Less(i, j int) bool { - left := bindings[i].levels - right := bindings[j].levels - k := 0 - for { - if left[k] < right[k] { - return true - } else if left[k] > right[k] { - return false - } - k++ - } -} - -func (bindings sortableBindings) Swap(i, j int) { - bindings[i], bindings[j] = bindings[j], bindings[i] -} - -func processTags(structDescriptor *StructDescriptor, cfg *frozenConfig) { - for _, binding := range structDescriptor.Fields { - shouldOmitEmpty := false - tagParts := strings.Split(binding.Field.Tag.Get(cfg.getTagKey()), ",") - for _, tagPart := range tagParts[1:] { - if tagPart == "omitempty" { - shouldOmitEmpty = true - } else if tagPart == "string" { - if binding.Field.Type.Kind() == reflect.String { - binding.Decoder = &stringModeStringDecoder{binding.Decoder, cfg} - binding.Encoder = &stringModeStringEncoder{binding.Encoder, cfg} - } else { - binding.Decoder = &stringModeNumberDecoder{binding.Decoder} - binding.Encoder = &stringModeNumberEncoder{binding.Encoder} - } - } - } - binding.Decoder = &structFieldDecoder{binding.Field, binding.Decoder} - binding.Encoder = &structFieldEncoder{binding.Field, binding.Encoder, shouldOmitEmpty} - } -} - -func calcFieldNames(originalFieldName string, tagProvidedFieldName string, wholeTag string) []string { - // ignore? - if wholeTag == "-" { - return []string{} - } - // rename? - var fieldNames []string - if tagProvidedFieldName == "" { - fieldNames = []string{originalFieldName} - } else { - fieldNames = []string{tagProvidedFieldName} - } - // private? - isNotExported := unicode.IsLower(rune(originalFieldName[0])) - if isNotExported { - fieldNames = []string{} - } - return fieldNames -} diff --git a/deps/github.com/json-iterator/go/feature_reflect_map.go b/deps/github.com/json-iterator/go/feature_reflect_map.go deleted file mode 100644 index 005671e01..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect_map.go +++ /dev/null @@ -1,244 +0,0 @@ -package jsoniter - -import ( - "encoding" - "encoding/json" - "reflect" - "sort" - "strconv" - "unsafe" -) - -type mapDecoder struct { - mapType reflect.Type - keyType reflect.Type - elemType reflect.Type - elemDecoder ValDecoder - mapInterface emptyInterface -} - -func (decoder *mapDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - // dark magic to cast unsafe.Pointer back to interface{} using reflect.Type - mapInterface := decoder.mapInterface - mapInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&mapInterface)) - realVal := reflect.ValueOf(*realInterface).Elem() - if iter.ReadNil() { - realVal.Set(reflect.Zero(decoder.mapType)) - return - } - if realVal.IsNil() { - realVal.Set(reflect.MakeMap(realVal.Type())) - } - iter.ReadMapCB(func(iter *Iterator, keyStr string) bool { - elem := reflect.New(decoder.elemType) - decoder.elemDecoder.Decode(unsafe.Pointer(elem.Pointer()), iter) - // to put into map, we have to use reflection - keyType := decoder.keyType - // TODO: remove this from loop - switch { - case keyType.Kind() == reflect.String: - realVal.SetMapIndex(reflect.ValueOf(keyStr).Convert(keyType), elem.Elem()) - return true - case keyType.Implements(textUnmarshalerType): - textUnmarshaler := reflect.New(keyType.Elem()).Interface().(encoding.TextUnmarshaler) - err := textUnmarshaler.UnmarshalText([]byte(keyStr)) - if err != nil { - iter.ReportError("read map key as TextUnmarshaler", err.Error()) - return false - } - realVal.SetMapIndex(reflect.ValueOf(textUnmarshaler), elem.Elem()) - return true - case reflect.PtrTo(keyType).Implements(textUnmarshalerType): - textUnmarshaler := reflect.New(keyType).Interface().(encoding.TextUnmarshaler) - err := textUnmarshaler.UnmarshalText([]byte(keyStr)) - if err != nil { - iter.ReportError("read map key as TextUnmarshaler", err.Error()) - return false - } - realVal.SetMapIndex(reflect.ValueOf(textUnmarshaler).Elem(), elem.Elem()) - return true - default: - switch keyType.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - n, err := strconv.ParseInt(keyStr, 10, 64) - if err != nil || reflect.Zero(keyType).OverflowInt(n) { - iter.ReportError("read map key as int64", "read int64 failed") - return false - } - realVal.SetMapIndex(reflect.ValueOf(n).Convert(keyType), elem.Elem()) - return true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - n, err := strconv.ParseUint(keyStr, 10, 64) - if err != nil || reflect.Zero(keyType).OverflowUint(n) { - iter.ReportError("read map key as uint64", "read uint64 failed") - return false - } - realVal.SetMapIndex(reflect.ValueOf(n).Convert(keyType), elem.Elem()) - return true - } - } - iter.ReportError("read map key", "unexpected map key type "+keyType.String()) - return true - }) -} - -type mapEncoder struct { - mapType reflect.Type - elemType reflect.Type - elemEncoder ValEncoder - mapInterface emptyInterface -} - -func (encoder *mapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - mapInterface := encoder.mapInterface - mapInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&mapInterface)) - realVal := reflect.ValueOf(*realInterface) - stream.WriteObjectStart() - for i, key := range realVal.MapKeys() { - if i != 0 { - stream.WriteMore() - } - encodeMapKey(key, stream) - if stream.indention > 0 { - stream.writeTwoBytes(byte(':'), byte(' ')) - } else { - stream.writeByte(':') - } - val := realVal.MapIndex(key).Interface() - encoder.elemEncoder.EncodeInterface(val, stream) - } - stream.WriteObjectEnd() -} - -func encodeMapKey(key reflect.Value, stream *Stream) { - if key.Kind() == reflect.String { - stream.WriteString(key.String()) - return - } - if tm, ok := key.Interface().(encoding.TextMarshaler); ok { - buf, err := tm.MarshalText() - if err != nil { - stream.Error = err - return - } - stream.writeByte('"') - stream.Write(buf) - stream.writeByte('"') - return - } - switch key.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - stream.writeByte('"') - stream.WriteInt64(key.Int()) - stream.writeByte('"') - return - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - stream.writeByte('"') - stream.WriteUint64(key.Uint()) - stream.writeByte('"') - return - } - stream.Error = &json.UnsupportedTypeError{Type: key.Type()} -} - -func (encoder *mapEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *mapEncoder) IsEmpty(ptr unsafe.Pointer) bool { - mapInterface := encoder.mapInterface - mapInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&mapInterface)) - realVal := reflect.ValueOf(*realInterface) - return realVal.Len() == 0 -} - -type sortKeysMapEncoder struct { - mapType reflect.Type - elemType reflect.Type - elemEncoder ValEncoder - mapInterface emptyInterface -} - -func (encoder *sortKeysMapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - mapInterface := encoder.mapInterface - mapInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&mapInterface)) - realVal := reflect.ValueOf(*realInterface) - - // Extract and sort the keys. - keys := realVal.MapKeys() - sv := stringValues(make([]reflectWithString, len(keys))) - for i, v := range keys { - sv[i].v = v - if err := sv[i].resolve(); err != nil { - stream.Error = err - return - } - } - sort.Sort(sv) - - stream.WriteObjectStart() - for i, key := range sv { - if i != 0 { - stream.WriteMore() - } - stream.WriteVal(key.s) // might need html escape, so can not WriteString directly - if stream.indention > 0 { - stream.writeTwoBytes(byte(':'), byte(' ')) - } else { - stream.writeByte(':') - } - val := realVal.MapIndex(key.v).Interface() - encoder.elemEncoder.EncodeInterface(val, stream) - } - stream.WriteObjectEnd() -} - -// stringValues is a slice of reflect.Value holding *reflect.StringValue. -// It implements the methods to sort by string. -type stringValues []reflectWithString - -type reflectWithString struct { - v reflect.Value - s string -} - -func (w *reflectWithString) resolve() error { - if w.v.Kind() == reflect.String { - w.s = w.v.String() - return nil - } - if tm, ok := w.v.Interface().(encoding.TextMarshaler); ok { - buf, err := tm.MarshalText() - w.s = string(buf) - return err - } - switch w.v.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - w.s = strconv.FormatInt(w.v.Int(), 10) - return nil - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - w.s = strconv.FormatUint(w.v.Uint(), 10) - return nil - } - return &json.UnsupportedTypeError{Type: w.v.Type()} -} - -func (sv stringValues) Len() int { return len(sv) } -func (sv stringValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } -func (sv stringValues) Less(i, j int) bool { return sv[i].s < sv[j].s } - -func (encoder *sortKeysMapEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *sortKeysMapEncoder) IsEmpty(ptr unsafe.Pointer) bool { - mapInterface := encoder.mapInterface - mapInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&mapInterface)) - realVal := reflect.ValueOf(*realInterface) - return realVal.Len() == 0 -} diff --git a/deps/github.com/json-iterator/go/feature_reflect_native.go b/deps/github.com/json-iterator/go/feature_reflect_native.go deleted file mode 100644 index 95bd1e87c..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect_native.go +++ /dev/null @@ -1,764 +0,0 @@ -package jsoniter - -import ( - "encoding" - "encoding/base64" - "encoding/json" - "reflect" - "unsafe" -) - -type stringCodec struct { -} - -func (codec *stringCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*string)(ptr)) = iter.ReadString() -} - -func (codec *stringCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - str := *((*string)(ptr)) - stream.WriteString(str) -} - -func (codec *stringCodec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *stringCodec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*string)(ptr)) == "" -} - -type intCodec struct { -} - -func (codec *intCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*int)(ptr)) = iter.ReadInt() - } -} - -func (codec *intCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteInt(*((*int)(ptr))) -} - -func (codec *intCodec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *intCodec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*int)(ptr)) == 0 -} - -type uintptrCodec struct { -} - -func (codec *uintptrCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*uintptr)(ptr)) = uintptr(iter.ReadUint64()) - } -} - -func (codec *uintptrCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteUint64(uint64(*((*uintptr)(ptr)))) -} - -func (codec *uintptrCodec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *uintptrCodec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*uintptr)(ptr)) == 0 -} - -type int8Codec struct { -} - -func (codec *int8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*int8)(ptr)) = iter.ReadInt8() - } -} - -func (codec *int8Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteInt8(*((*int8)(ptr))) -} - -func (codec *int8Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *int8Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*int8)(ptr)) == 0 -} - -type int16Codec struct { -} - -func (codec *int16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*int16)(ptr)) = iter.ReadInt16() - } -} - -func (codec *int16Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteInt16(*((*int16)(ptr))) -} - -func (codec *int16Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *int16Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*int16)(ptr)) == 0 -} - -type int32Codec struct { -} - -func (codec *int32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*int32)(ptr)) = iter.ReadInt32() - } -} - -func (codec *int32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteInt32(*((*int32)(ptr))) -} - -func (codec *int32Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *int32Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*int32)(ptr)) == 0 -} - -type int64Codec struct { -} - -func (codec *int64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*int64)(ptr)) = iter.ReadInt64() - } -} - -func (codec *int64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteInt64(*((*int64)(ptr))) -} - -func (codec *int64Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *int64Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*int64)(ptr)) == 0 -} - -type uintCodec struct { -} - -func (codec *uintCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*uint)(ptr)) = iter.ReadUint() - return - } -} - -func (codec *uintCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteUint(*((*uint)(ptr))) -} - -func (codec *uintCodec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *uintCodec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*uint)(ptr)) == 0 -} - -type uint8Codec struct { -} - -func (codec *uint8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*uint8)(ptr)) = iter.ReadUint8() - } -} - -func (codec *uint8Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteUint8(*((*uint8)(ptr))) -} - -func (codec *uint8Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *uint8Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*uint8)(ptr)) == 0 -} - -type uint16Codec struct { -} - -func (codec *uint16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*uint16)(ptr)) = iter.ReadUint16() - } -} - -func (codec *uint16Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteUint16(*((*uint16)(ptr))) -} - -func (codec *uint16Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *uint16Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*uint16)(ptr)) == 0 -} - -type uint32Codec struct { -} - -func (codec *uint32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*uint32)(ptr)) = iter.ReadUint32() - } -} - -func (codec *uint32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteUint32(*((*uint32)(ptr))) -} - -func (codec *uint32Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *uint32Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*uint32)(ptr)) == 0 -} - -type uint64Codec struct { -} - -func (codec *uint64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*uint64)(ptr)) = iter.ReadUint64() - } -} - -func (codec *uint64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteUint64(*((*uint64)(ptr))) -} - -func (codec *uint64Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *uint64Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*uint64)(ptr)) == 0 -} - -type float32Codec struct { -} - -func (codec *float32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*float32)(ptr)) = iter.ReadFloat32() - } -} - -func (codec *float32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteFloat32(*((*float32)(ptr))) -} - -func (codec *float32Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *float32Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*float32)(ptr)) == 0 -} - -type float64Codec struct { -} - -func (codec *float64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*float64)(ptr)) = iter.ReadFloat64() - } -} - -func (codec *float64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteFloat64(*((*float64)(ptr))) -} - -func (codec *float64Codec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *float64Codec) IsEmpty(ptr unsafe.Pointer) bool { - return *((*float64)(ptr)) == 0 -} - -type boolCodec struct { -} - -func (codec *boolCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.ReadNil() { - *((*bool)(ptr)) = iter.ReadBool() - } -} - -func (codec *boolCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteBool(*((*bool)(ptr))) -} - -func (codec *boolCodec) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, codec) -} - -func (codec *boolCodec) IsEmpty(ptr unsafe.Pointer) bool { - return !(*((*bool)(ptr))) -} - -type emptyInterfaceCodec struct { -} - -func (codec *emptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - existing := *((*interface{})(ptr)) - - // Checking for both typed and untyped nil pointers. - if existing != nil && - reflect.TypeOf(existing).Kind() == reflect.Ptr && - !reflect.ValueOf(existing).IsNil() { - - var ptrToExisting interface{} - for { - elem := reflect.ValueOf(existing).Elem() - if elem.Kind() != reflect.Ptr || elem.IsNil() { - break - } - ptrToExisting = existing - existing = elem.Interface() - } - - if iter.ReadNil() { - if ptrToExisting != nil { - nilPtr := reflect.Zero(reflect.TypeOf(ptrToExisting).Elem()) - reflect.ValueOf(ptrToExisting).Elem().Set(nilPtr) - } else { - *((*interface{})(ptr)) = nil - } - } else { - iter.ReadVal(existing) - } - - return - } - - if iter.ReadNil() { - *((*interface{})(ptr)) = nil - } else { - *((*interface{})(ptr)) = iter.Read() - } -} - -func (codec *emptyInterfaceCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteVal(*((*interface{})(ptr))) -} - -func (codec *emptyInterfaceCodec) EncodeInterface(val interface{}, stream *Stream) { - stream.WriteVal(val) -} - -func (codec *emptyInterfaceCodec) IsEmpty(ptr unsafe.Pointer) bool { - emptyInterface := (*emptyInterface)(ptr) - return emptyInterface.typ == nil -} - -type nonEmptyInterfaceCodec struct { -} - -func (codec *nonEmptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - nonEmptyInterface := (*nonEmptyInterface)(ptr) - if nonEmptyInterface.itab == nil { - iter.ReportError("read non-empty interface", "do not know which concrete type to decode to") - return - } - var i interface{} - e := (*emptyInterface)(unsafe.Pointer(&i)) - e.typ = nonEmptyInterface.itab.typ - e.word = nonEmptyInterface.word - iter.ReadVal(&i) - if e.word == nil { - nonEmptyInterface.itab = nil - } - nonEmptyInterface.word = e.word -} - -func (codec *nonEmptyInterfaceCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - nonEmptyInterface := (*nonEmptyInterface)(ptr) - var i interface{} - if nonEmptyInterface.itab != nil { - e := (*emptyInterface)(unsafe.Pointer(&i)) - e.typ = nonEmptyInterface.itab.typ - e.word = nonEmptyInterface.word - } - stream.WriteVal(i) -} - -func (codec *nonEmptyInterfaceCodec) EncodeInterface(val interface{}, stream *Stream) { - stream.WriteVal(val) -} - -func (codec *nonEmptyInterfaceCodec) IsEmpty(ptr unsafe.Pointer) bool { - nonEmptyInterface := (*nonEmptyInterface)(ptr) - return nonEmptyInterface.word == nil -} - -type anyCodec struct { -} - -func (codec *anyCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*Any)(ptr)) = iter.ReadAny() -} - -func (codec *anyCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - (*((*Any)(ptr))).WriteTo(stream) -} - -func (codec *anyCodec) EncodeInterface(val interface{}, stream *Stream) { - (val.(Any)).WriteTo(stream) -} - -func (codec *anyCodec) IsEmpty(ptr unsafe.Pointer) bool { - return (*((*Any)(ptr))).Size() == 0 -} - -type jsonNumberCodec struct { -} - -func (codec *jsonNumberCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - switch iter.WhatIsNext() { - case StringValue: - *((*json.Number)(ptr)) = json.Number(iter.ReadString()) - case NilValue: - iter.skipFourBytes('n', 'u', 'l', 'l') - *((*json.Number)(ptr)) = "" - default: - *((*json.Number)(ptr)) = json.Number([]byte(iter.readNumberAsString())) - } -} - -func (codec *jsonNumberCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteRaw(string(*((*json.Number)(ptr)))) -} - -func (codec *jsonNumberCodec) EncodeInterface(val interface{}, stream *Stream) { - stream.WriteRaw(string(val.(json.Number))) -} - -func (codec *jsonNumberCodec) IsEmpty(ptr unsafe.Pointer) bool { - return len(*((*json.Number)(ptr))) == 0 -} - -type jsoniterNumberCodec struct { -} - -func (codec *jsoniterNumberCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - switch iter.WhatIsNext() { - case StringValue: - *((*Number)(ptr)) = Number(iter.ReadString()) - case NilValue: - iter.skipFourBytes('n', 'u', 'l', 'l') - *((*Number)(ptr)) = "" - default: - *((*Number)(ptr)) = Number([]byte(iter.readNumberAsString())) - } -} - -func (codec *jsoniterNumberCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteRaw(string(*((*Number)(ptr)))) -} - -func (codec *jsoniterNumberCodec) EncodeInterface(val interface{}, stream *Stream) { - stream.WriteRaw(string(val.(Number))) -} - -func (codec *jsoniterNumberCodec) IsEmpty(ptr unsafe.Pointer) bool { - return len(*((*Number)(ptr))) == 0 -} - -type jsonRawMessageCodec struct { -} - -func (codec *jsonRawMessageCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*json.RawMessage)(ptr)) = json.RawMessage(iter.SkipAndReturnBytes()) -} - -func (codec *jsonRawMessageCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteRaw(string(*((*json.RawMessage)(ptr)))) -} - -func (codec *jsonRawMessageCodec) EncodeInterface(val interface{}, stream *Stream) { - stream.WriteRaw(string(val.(json.RawMessage))) -} - -func (codec *jsonRawMessageCodec) IsEmpty(ptr unsafe.Pointer) bool { - return len(*((*json.RawMessage)(ptr))) == 0 -} - -type jsoniterRawMessageCodec struct { -} - -func (codec *jsoniterRawMessageCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { - *((*RawMessage)(ptr)) = RawMessage(iter.SkipAndReturnBytes()) -} - -func (codec *jsoniterRawMessageCodec) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteRaw(string(*((*RawMessage)(ptr)))) -} - -func (codec *jsoniterRawMessageCodec) EncodeInterface(val interface{}, stream *Stream) { - stream.WriteRaw(string(val.(RawMessage))) -} - -func (codec *jsoniterRawMessageCodec) IsEmpty(ptr unsafe.Pointer) bool { - return len(*((*RawMessage)(ptr))) == 0 -} - -type base64Codec struct { - sliceDecoder ValDecoder -} - -func (codec *base64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { - if iter.ReadNil() { - ptrSlice := (*sliceHeader)(ptr) - ptrSlice.Len = 0 - ptrSlice.Cap = 0 - ptrSlice.Data = nil - return - } - switch iter.WhatIsNext() { - case StringValue: - encoding := base64.StdEncoding - src := iter.SkipAndReturnBytes() - src = src[1 : len(src)-1] - decodedLen := encoding.DecodedLen(len(src)) - dst := make([]byte, decodedLen) - len, err := encoding.Decode(dst, src) - if err != nil { - iter.ReportError("decode base64", err.Error()) - } else { - dst = dst[:len] - dstSlice := (*sliceHeader)(unsafe.Pointer(&dst)) - ptrSlice := (*sliceHeader)(ptr) - ptrSlice.Data = dstSlice.Data - ptrSlice.Cap = dstSlice.Cap - ptrSlice.Len = dstSlice.Len - } - case ArrayValue: - codec.sliceDecoder.Decode(ptr, iter) - default: - iter.ReportError("base64Codec", "invalid input") - } -} - -func (codec *base64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { - src := *((*[]byte)(ptr)) - if len(src) == 0 { - stream.WriteNil() - return - } - encoding := base64.StdEncoding - stream.writeByte('"') - toGrow := encoding.EncodedLen(len(src)) - stream.ensure(toGrow) - encoding.Encode(stream.buf[stream.n:], src) - stream.n += toGrow - stream.writeByte('"') -} - -func (codec *base64Codec) EncodeInterface(val interface{}, stream *Stream) { - ptr := extractInterface(val).word - src := *((*[]byte)(ptr)) - if len(src) == 0 { - stream.WriteNil() - return - } - encoding := base64.StdEncoding - stream.writeByte('"') - toGrow := encoding.EncodedLen(len(src)) - stream.ensure(toGrow) - encoding.Encode(stream.buf[stream.n:], src) - stream.n += toGrow - stream.writeByte('"') -} - -func (codec *base64Codec) IsEmpty(ptr unsafe.Pointer) bool { - return len(*((*[]byte)(ptr))) == 0 -} - -type stringModeNumberDecoder struct { - elemDecoder ValDecoder -} - -func (decoder *stringModeNumberDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - c := iter.nextToken() - if c != '"' { - iter.ReportError("stringModeNumberDecoder", `expect ", but found `+string([]byte{c})) - return - } - decoder.elemDecoder.Decode(ptr, iter) - if iter.Error != nil { - return - } - c = iter.readByte() - if c != '"' { - iter.ReportError("stringModeNumberDecoder", `expect ", but found `+string([]byte{c})) - return - } -} - -type stringModeStringDecoder struct { - elemDecoder ValDecoder - cfg *frozenConfig -} - -func (decoder *stringModeStringDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - decoder.elemDecoder.Decode(ptr, iter) - str := *((*string)(ptr)) - tempIter := decoder.cfg.BorrowIterator([]byte(str)) - defer decoder.cfg.ReturnIterator(tempIter) - *((*string)(ptr)) = tempIter.ReadString() -} - -type stringModeNumberEncoder struct { - elemEncoder ValEncoder -} - -func (encoder *stringModeNumberEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.writeByte('"') - encoder.elemEncoder.Encode(ptr, stream) - stream.writeByte('"') -} - -func (encoder *stringModeNumberEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *stringModeNumberEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return encoder.elemEncoder.IsEmpty(ptr) -} - -type stringModeStringEncoder struct { - elemEncoder ValEncoder - cfg *frozenConfig -} - -func (encoder *stringModeStringEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - tempStream := encoder.cfg.BorrowStream(nil) - defer encoder.cfg.ReturnStream(tempStream) - encoder.elemEncoder.Encode(ptr, tempStream) - stream.WriteString(string(tempStream.Buffer())) -} - -func (encoder *stringModeStringEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *stringModeStringEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return encoder.elemEncoder.IsEmpty(ptr) -} - -type marshalerEncoder struct { - templateInterface emptyInterface - checkIsEmpty checkIsEmpty -} - -func (encoder *marshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - templateInterface := encoder.templateInterface - templateInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&templateInterface)) - marshaler, ok := (*realInterface).(json.Marshaler) - if !ok { - stream.WriteVal(nil) - return - } - - bytes, err := marshaler.MarshalJSON() - if err != nil { - stream.Error = err - } else { - stream.Write(bytes) - } -} -func (encoder *marshalerEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *marshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return encoder.checkIsEmpty.IsEmpty(ptr) -} - -type textMarshalerEncoder struct { - templateInterface emptyInterface - checkIsEmpty checkIsEmpty -} - -func (encoder *textMarshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - templateInterface := encoder.templateInterface - templateInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&templateInterface)) - marshaler := (*realInterface).(encoding.TextMarshaler) - bytes, err := marshaler.MarshalText() - if err != nil { - stream.Error = err - } else { - stream.WriteString(string(bytes)) - } -} - -func (encoder *textMarshalerEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *textMarshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return encoder.checkIsEmpty.IsEmpty(ptr) -} - -type unmarshalerDecoder struct { - templateInterface emptyInterface -} - -func (decoder *unmarshalerDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - templateInterface := decoder.templateInterface - templateInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&templateInterface)) - unmarshaler := (*realInterface).(json.Unmarshaler) - iter.nextToken() - iter.unreadByte() // skip spaces - bytes := iter.SkipAndReturnBytes() - err := unmarshaler.UnmarshalJSON(bytes) - if err != nil { - iter.ReportError("unmarshalerDecoder", err.Error()) - } -} - -type textUnmarshalerDecoder struct { - templateInterface emptyInterface -} - -func (decoder *textUnmarshalerDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - templateInterface := decoder.templateInterface - templateInterface.word = ptr - realInterface := (*interface{})(unsafe.Pointer(&templateInterface)) - unmarshaler := (*realInterface).(encoding.TextUnmarshaler) - str := iter.ReadString() - err := unmarshaler.UnmarshalText([]byte(str)) - if err != nil { - iter.ReportError("textUnmarshalerDecoder", err.Error()) - } -} diff --git a/deps/github.com/json-iterator/go/feature_reflect_object.go b/deps/github.com/json-iterator/go/feature_reflect_object.go deleted file mode 100644 index 59b1235c0..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect_object.go +++ /dev/null @@ -1,196 +0,0 @@ -package jsoniter - -import ( - "fmt" - "io" - "reflect" - "strings" - "unsafe" -) - -func encoderOfStruct(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - type bindingTo struct { - binding *Binding - toName string - ignored bool - } - orderedBindings := []*bindingTo{} - structDescriptor, err := describeStruct(cfg, typ) - if err != nil { - return nil, err - } - for _, binding := range structDescriptor.Fields { - for _, toName := range binding.ToNames { - new := &bindingTo{ - binding: binding, - toName: toName, - } - for _, old := range orderedBindings { - if old.toName != toName { - continue - } - old.ignored, new.ignored = resolveConflictBinding(cfg, old.binding, new.binding) - } - orderedBindings = append(orderedBindings, new) - } - } - if len(orderedBindings) == 0 { - return &emptyStructEncoder{}, nil - } - finalOrderedFields := []structFieldTo{} - for _, bindingTo := range orderedBindings { - if !bindingTo.ignored { - finalOrderedFields = append(finalOrderedFields, structFieldTo{ - encoder: bindingTo.binding.Encoder.(*structFieldEncoder), - toName: bindingTo.toName, - }) - } - } - return &structEncoder{structDescriptor.onePtrEmbedded, structDescriptor.onePtrOptimization, finalOrderedFields}, nil -} - -func resolveConflictBinding(cfg *frozenConfig, old, new *Binding) (ignoreOld, ignoreNew bool) { - newTagged := new.Field.Tag.Get(cfg.getTagKey()) != "" - oldTagged := old.Field.Tag.Get(cfg.getTagKey()) != "" - if newTagged { - if oldTagged { - if len(old.levels) > len(new.levels) { - return true, false - } else if len(new.levels) > len(old.levels) { - return false, true - } else { - return true, true - } - } else { - return true, false - } - } else { - if oldTagged { - return true, false - } - if len(old.levels) > len(new.levels) { - return true, false - } else if len(new.levels) > len(old.levels) { - return false, true - } else { - return true, true - } - } -} - -func decoderOfStruct(cfg *frozenConfig, typ reflect.Type) (ValDecoder, error) { - bindings := map[string]*Binding{} - structDescriptor, err := describeStruct(cfg, typ) - if err != nil { - return nil, err - } - for _, binding := range structDescriptor.Fields { - for _, fromName := range binding.FromNames { - old := bindings[fromName] - if old == nil { - bindings[fromName] = binding - continue - } - ignoreOld, ignoreNew := resolveConflictBinding(cfg, old, binding) - if ignoreOld { - delete(bindings, fromName) - } - if !ignoreNew { - bindings[fromName] = binding - } - } - } - fields := map[string]*structFieldDecoder{} - for k, binding := range bindings { - fields[strings.ToLower(k)] = binding.Decoder.(*structFieldDecoder) - } - return createStructDecoder(typ, fields) -} - -type structFieldEncoder struct { - field *reflect.StructField - fieldEncoder ValEncoder - omitempty bool -} - -func (encoder *structFieldEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - fieldPtr := unsafe.Pointer(uintptr(ptr) + encoder.field.Offset) - encoder.fieldEncoder.Encode(fieldPtr, stream) - if stream.Error != nil && stream.Error != io.EOF { - stream.Error = fmt.Errorf("%s: %s", encoder.field.Name, stream.Error.Error()) - } -} - -func (encoder *structFieldEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *structFieldEncoder) IsEmpty(ptr unsafe.Pointer) bool { - fieldPtr := unsafe.Pointer(uintptr(ptr) + encoder.field.Offset) - return encoder.fieldEncoder.IsEmpty(fieldPtr) -} - -type structEncoder struct { - onePtrEmbedded bool - onePtrOptimization bool - fields []structFieldTo -} - -type structFieldTo struct { - encoder *structFieldEncoder - toName string -} - -func (encoder *structEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteObjectStart() - isNotFirst := false - for _, field := range encoder.fields { - if field.encoder.omitempty && field.encoder.IsEmpty(ptr) { - continue - } - if isNotFirst { - stream.WriteMore() - } - stream.WriteObjectField(field.toName) - field.encoder.Encode(ptr, stream) - isNotFirst = true - } - stream.WriteObjectEnd() -} - -func (encoder *structEncoder) EncodeInterface(val interface{}, stream *Stream) { - e := (*emptyInterface)(unsafe.Pointer(&val)) - if encoder.onePtrOptimization { - if e.word == nil && encoder.onePtrEmbedded { - stream.WriteObjectStart() - stream.WriteObjectEnd() - return - } - ptr := uintptr(e.word) - e.word = unsafe.Pointer(&ptr) - } - if reflect.TypeOf(val).Kind() == reflect.Ptr { - encoder.Encode(unsafe.Pointer(&e.word), stream) - } else { - encoder.Encode(e.word, stream) - } -} - -func (encoder *structEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return false -} - -type emptyStructEncoder struct { -} - -func (encoder *emptyStructEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - stream.WriteEmptyObject() -} - -func (encoder *emptyStructEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *emptyStructEncoder) IsEmpty(ptr unsafe.Pointer) bool { - return false -} diff --git a/deps/github.com/json-iterator/go/feature_reflect_slice.go b/deps/github.com/json-iterator/go/feature_reflect_slice.go deleted file mode 100644 index 51a8daecf..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect_slice.go +++ /dev/null @@ -1,147 +0,0 @@ -package jsoniter - -import ( - "fmt" - "io" - "reflect" - "unsafe" -) - -func decoderOfSlice(cfg *frozenConfig, typ reflect.Type) (ValDecoder, error) { - decoder, err := decoderOfType(cfg, typ.Elem()) - if err != nil { - return nil, err - } - return &sliceDecoder{typ, typ.Elem(), decoder}, nil -} - -func encoderOfSlice(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error) { - encoder, err := encoderOfType(cfg, typ.Elem()) - if err != nil { - return nil, err - } - if typ.Elem().Kind() == reflect.Map { - encoder = &OptionalEncoder{encoder} - } - return &sliceEncoder{typ, typ.Elem(), encoder}, nil -} - -type sliceEncoder struct { - sliceType reflect.Type - elemType reflect.Type - elemEncoder ValEncoder -} - -func (encoder *sliceEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { - slice := (*sliceHeader)(ptr) - if slice.Data == nil { - stream.WriteNil() - return - } - if slice.Len == 0 { - stream.WriteEmptyArray() - return - } - stream.WriteArrayStart() - elemPtr := unsafe.Pointer(slice.Data) - encoder.elemEncoder.Encode(unsafe.Pointer(elemPtr), stream) - for i := 1; i < slice.Len; i++ { - stream.WriteMore() - elemPtr = unsafe.Pointer(uintptr(elemPtr) + encoder.elemType.Size()) - encoder.elemEncoder.Encode(unsafe.Pointer(elemPtr), stream) - } - stream.WriteArrayEnd() - if stream.Error != nil && stream.Error != io.EOF { - stream.Error = fmt.Errorf("%v: %s", encoder.sliceType, stream.Error.Error()) - } -} - -func (encoder *sliceEncoder) EncodeInterface(val interface{}, stream *Stream) { - WriteToStream(val, stream, encoder) -} - -func (encoder *sliceEncoder) IsEmpty(ptr unsafe.Pointer) bool { - slice := (*sliceHeader)(ptr) - return slice.Len == 0 -} - -type sliceDecoder struct { - sliceType reflect.Type - elemType reflect.Type - elemDecoder ValDecoder -} - -// sliceHeader is a safe version of SliceHeader used within this package. -type sliceHeader struct { - Data unsafe.Pointer - Len int - Cap int -} - -func (decoder *sliceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - decoder.doDecode(ptr, iter) - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.sliceType, iter.Error.Error()) - } -} - -func (decoder *sliceDecoder) doDecode(ptr unsafe.Pointer, iter *Iterator) { - slice := (*sliceHeader)(ptr) - if iter.ReadNil() { - slice.Len = 0 - slice.Cap = 0 - slice.Data = nil - return - } - reuseSlice(slice, decoder.sliceType, 4) - slice.Len = 0 - offset := uintptr(0) - iter.ReadArrayCB(func(iter *Iterator) bool { - growOne(slice, decoder.sliceType, decoder.elemType) - decoder.elemDecoder.Decode(unsafe.Pointer(uintptr(slice.Data)+offset), iter) - offset += decoder.elemType.Size() - return true - }) -} - -// grow grows the slice s so that it can hold extra more values, allocating -// more capacity if needed. It also returns the old and new slice lengths. -func growOne(slice *sliceHeader, sliceType reflect.Type, elementType reflect.Type) { - newLen := slice.Len + 1 - if newLen <= slice.Cap { - slice.Len = newLen - return - } - newCap := slice.Cap - if newCap == 0 { - newCap = 1 - } else { - for newCap < newLen { - if slice.Len < 1024 { - newCap += newCap - } else { - newCap += newCap / 4 - } - } - } - newVal := reflect.MakeSlice(sliceType, newLen, newCap) - dst := unsafe.Pointer(newVal.Pointer()) - // copy old array into new array - originalBytesCount := slice.Len * int(elementType.Size()) - srcSliceHeader := (unsafe.Pointer)(&sliceHeader{slice.Data, originalBytesCount, originalBytesCount}) - dstSliceHeader := (unsafe.Pointer)(&sliceHeader{dst, originalBytesCount, originalBytesCount}) - copy(*(*[]byte)(dstSliceHeader), *(*[]byte)(srcSliceHeader)) - slice.Data = dst - slice.Len = newLen - slice.Cap = newCap -} - -func reuseSlice(slice *sliceHeader, sliceType reflect.Type, expectedCap int) { - if expectedCap <= slice.Cap { - return - } - newVal := reflect.MakeSlice(sliceType, 0, expectedCap) - dst := unsafe.Pointer(newVal.Pointer()) - slice.Data = dst - slice.Cap = expectedCap -} diff --git a/deps/github.com/json-iterator/go/feature_reflect_struct_decoder.go b/deps/github.com/json-iterator/go/feature_reflect_struct_decoder.go deleted file mode 100644 index e6ced77c2..000000000 --- a/deps/github.com/json-iterator/go/feature_reflect_struct_decoder.go +++ /dev/null @@ -1,934 +0,0 @@ -package jsoniter - -import ( - "fmt" - "io" - "reflect" - "strings" - "unsafe" -) - -func createStructDecoder(typ reflect.Type, fields map[string]*structFieldDecoder) (ValDecoder, error) { - knownHash := map[int32]struct{}{ - 0: {}, - } - switch len(fields) { - case 0: - return &skipObjectDecoder{typ}, nil - case 1: - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - return &oneFieldStructDecoder{typ, fieldHash, fieldDecoder}, nil - } - case 2: - var fieldHash1 int32 - var fieldHash2 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldHash1 == 0 { - fieldHash1 = fieldHash - fieldDecoder1 = fieldDecoder - } else { - fieldHash2 = fieldHash - fieldDecoder2 = fieldDecoder - } - } - return &twoFieldsStructDecoder{typ, fieldHash1, fieldDecoder1, fieldHash2, fieldDecoder2}, nil - case 3: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } - } - return &threeFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3}, nil - case 4: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldName4 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - var fieldDecoder4 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else if fieldName3 == 0 { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } else { - fieldName4 = fieldHash - fieldDecoder4 = fieldDecoder - } - } - return &fourFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3, - fieldName4, fieldDecoder4}, nil - case 5: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldName4 int32 - var fieldName5 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - var fieldDecoder4 *structFieldDecoder - var fieldDecoder5 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else if fieldName3 == 0 { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } else if fieldName4 == 0 { - fieldName4 = fieldHash - fieldDecoder4 = fieldDecoder - } else { - fieldName5 = fieldHash - fieldDecoder5 = fieldDecoder - } - } - return &fiveFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3, - fieldName4, fieldDecoder4, fieldName5, fieldDecoder5}, nil - case 6: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldName4 int32 - var fieldName5 int32 - var fieldName6 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - var fieldDecoder4 *structFieldDecoder - var fieldDecoder5 *structFieldDecoder - var fieldDecoder6 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else if fieldName3 == 0 { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } else if fieldName4 == 0 { - fieldName4 = fieldHash - fieldDecoder4 = fieldDecoder - } else if fieldName5 == 0 { - fieldName5 = fieldHash - fieldDecoder5 = fieldDecoder - } else { - fieldName6 = fieldHash - fieldDecoder6 = fieldDecoder - } - } - return &sixFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3, - fieldName4, fieldDecoder4, fieldName5, fieldDecoder5, fieldName6, fieldDecoder6}, nil - case 7: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldName4 int32 - var fieldName5 int32 - var fieldName6 int32 - var fieldName7 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - var fieldDecoder4 *structFieldDecoder - var fieldDecoder5 *structFieldDecoder - var fieldDecoder6 *structFieldDecoder - var fieldDecoder7 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else if fieldName3 == 0 { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } else if fieldName4 == 0 { - fieldName4 = fieldHash - fieldDecoder4 = fieldDecoder - } else if fieldName5 == 0 { - fieldName5 = fieldHash - fieldDecoder5 = fieldDecoder - } else if fieldName6 == 0 { - fieldName6 = fieldHash - fieldDecoder6 = fieldDecoder - } else { - fieldName7 = fieldHash - fieldDecoder7 = fieldDecoder - } - } - return &sevenFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3, - fieldName4, fieldDecoder4, fieldName5, fieldDecoder5, fieldName6, fieldDecoder6, - fieldName7, fieldDecoder7}, nil - case 8: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldName4 int32 - var fieldName5 int32 - var fieldName6 int32 - var fieldName7 int32 - var fieldName8 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - var fieldDecoder4 *structFieldDecoder - var fieldDecoder5 *structFieldDecoder - var fieldDecoder6 *structFieldDecoder - var fieldDecoder7 *structFieldDecoder - var fieldDecoder8 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else if fieldName3 == 0 { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } else if fieldName4 == 0 { - fieldName4 = fieldHash - fieldDecoder4 = fieldDecoder - } else if fieldName5 == 0 { - fieldName5 = fieldHash - fieldDecoder5 = fieldDecoder - } else if fieldName6 == 0 { - fieldName6 = fieldHash - fieldDecoder6 = fieldDecoder - } else if fieldName7 == 0 { - fieldName7 = fieldHash - fieldDecoder7 = fieldDecoder - } else { - fieldName8 = fieldHash - fieldDecoder8 = fieldDecoder - } - } - return &eightFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3, - fieldName4, fieldDecoder4, fieldName5, fieldDecoder5, fieldName6, fieldDecoder6, - fieldName7, fieldDecoder7, fieldName8, fieldDecoder8}, nil - case 9: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldName4 int32 - var fieldName5 int32 - var fieldName6 int32 - var fieldName7 int32 - var fieldName8 int32 - var fieldName9 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - var fieldDecoder4 *structFieldDecoder - var fieldDecoder5 *structFieldDecoder - var fieldDecoder6 *structFieldDecoder - var fieldDecoder7 *structFieldDecoder - var fieldDecoder8 *structFieldDecoder - var fieldDecoder9 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else if fieldName3 == 0 { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } else if fieldName4 == 0 { - fieldName4 = fieldHash - fieldDecoder4 = fieldDecoder - } else if fieldName5 == 0 { - fieldName5 = fieldHash - fieldDecoder5 = fieldDecoder - } else if fieldName6 == 0 { - fieldName6 = fieldHash - fieldDecoder6 = fieldDecoder - } else if fieldName7 == 0 { - fieldName7 = fieldHash - fieldDecoder7 = fieldDecoder - } else if fieldName8 == 0 { - fieldName8 = fieldHash - fieldDecoder8 = fieldDecoder - } else { - fieldName9 = fieldHash - fieldDecoder9 = fieldDecoder - } - } - return &nineFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3, - fieldName4, fieldDecoder4, fieldName5, fieldDecoder5, fieldName6, fieldDecoder6, - fieldName7, fieldDecoder7, fieldName8, fieldDecoder8, fieldName9, fieldDecoder9}, nil - case 10: - var fieldName1 int32 - var fieldName2 int32 - var fieldName3 int32 - var fieldName4 int32 - var fieldName5 int32 - var fieldName6 int32 - var fieldName7 int32 - var fieldName8 int32 - var fieldName9 int32 - var fieldName10 int32 - var fieldDecoder1 *structFieldDecoder - var fieldDecoder2 *structFieldDecoder - var fieldDecoder3 *structFieldDecoder - var fieldDecoder4 *structFieldDecoder - var fieldDecoder5 *structFieldDecoder - var fieldDecoder6 *structFieldDecoder - var fieldDecoder7 *structFieldDecoder - var fieldDecoder8 *structFieldDecoder - var fieldDecoder9 *structFieldDecoder - var fieldDecoder10 *structFieldDecoder - for fieldName, fieldDecoder := range fields { - fieldHash := calcHash(fieldName) - _, known := knownHash[fieldHash] - if known { - return &generalStructDecoder{typ, fields}, nil - } - knownHash[fieldHash] = struct{}{} - if fieldName1 == 0 { - fieldName1 = fieldHash - fieldDecoder1 = fieldDecoder - } else if fieldName2 == 0 { - fieldName2 = fieldHash - fieldDecoder2 = fieldDecoder - } else if fieldName3 == 0 { - fieldName3 = fieldHash - fieldDecoder3 = fieldDecoder - } else if fieldName4 == 0 { - fieldName4 = fieldHash - fieldDecoder4 = fieldDecoder - } else if fieldName5 == 0 { - fieldName5 = fieldHash - fieldDecoder5 = fieldDecoder - } else if fieldName6 == 0 { - fieldName6 = fieldHash - fieldDecoder6 = fieldDecoder - } else if fieldName7 == 0 { - fieldName7 = fieldHash - fieldDecoder7 = fieldDecoder - } else if fieldName8 == 0 { - fieldName8 = fieldHash - fieldDecoder8 = fieldDecoder - } else if fieldName9 == 0 { - fieldName9 = fieldHash - fieldDecoder9 = fieldDecoder - } else { - fieldName10 = fieldHash - fieldDecoder10 = fieldDecoder - } - } - return &tenFieldsStructDecoder{typ, - fieldName1, fieldDecoder1, fieldName2, fieldDecoder2, fieldName3, fieldDecoder3, - fieldName4, fieldDecoder4, fieldName5, fieldDecoder5, fieldName6, fieldDecoder6, - fieldName7, fieldDecoder7, fieldName8, fieldDecoder8, fieldName9, fieldDecoder9, - fieldName10, fieldDecoder10}, nil - } - return &generalStructDecoder{typ, fields}, nil -} - -type generalStructDecoder struct { - typ reflect.Type - fields map[string]*structFieldDecoder -} - -func (decoder *generalStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - var fieldBytes []byte - var field string - if iter.cfg.objectFieldMustBeSimpleString { - fieldBytes = iter.readObjectFieldAsBytes() - field = *(*string)(unsafe.Pointer(&fieldBytes)) - } else { - field = iter.ReadString() - c := iter.nextToken() - if c != ':' { - iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) - } - } - fieldDecoder := decoder.fields[strings.ToLower(field)] - if fieldDecoder == nil { - iter.Skip() - } else { - fieldDecoder.Decode(ptr, iter) - } - for iter.nextToken() == ',' { - if iter.cfg.objectFieldMustBeSimpleString { - fieldBytes := iter.readObjectFieldAsBytes() - field = *(*string)(unsafe.Pointer(&fieldBytes)) - } else { - field = iter.ReadString() - c := iter.nextToken() - if c != ':' { - iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) - } - } - fieldDecoder = decoder.fields[strings.ToLower(field)] - if fieldDecoder == nil { - iter.Skip() - } else { - fieldDecoder.Decode(ptr, iter) - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type skipObjectDecoder struct { - typ reflect.Type -} - -func (decoder *skipObjectDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - valueType := iter.WhatIsNext() - if valueType != ObjectValue && valueType != NilValue { - iter.ReportError("skipObjectDecoder", "expect object or null") - return - } - iter.Skip() -} - -type oneFieldStructDecoder struct { - typ reflect.Type - fieldHash int32 - fieldDecoder *structFieldDecoder -} - -func (decoder *oneFieldStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - if iter.readFieldHash() == decoder.fieldHash { - decoder.fieldDecoder.Decode(ptr, iter) - } else { - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type twoFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder -} - -func (decoder *twoFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type threeFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder -} - -func (decoder *threeFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type fourFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder - fieldHash4 int32 - fieldDecoder4 *structFieldDecoder -} - -func (decoder *fourFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - case decoder.fieldHash4: - decoder.fieldDecoder4.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type fiveFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder - fieldHash4 int32 - fieldDecoder4 *structFieldDecoder - fieldHash5 int32 - fieldDecoder5 *structFieldDecoder -} - -func (decoder *fiveFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - case decoder.fieldHash4: - decoder.fieldDecoder4.Decode(ptr, iter) - case decoder.fieldHash5: - decoder.fieldDecoder5.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type sixFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder - fieldHash4 int32 - fieldDecoder4 *structFieldDecoder - fieldHash5 int32 - fieldDecoder5 *structFieldDecoder - fieldHash6 int32 - fieldDecoder6 *structFieldDecoder -} - -func (decoder *sixFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - case decoder.fieldHash4: - decoder.fieldDecoder4.Decode(ptr, iter) - case decoder.fieldHash5: - decoder.fieldDecoder5.Decode(ptr, iter) - case decoder.fieldHash6: - decoder.fieldDecoder6.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type sevenFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder - fieldHash4 int32 - fieldDecoder4 *structFieldDecoder - fieldHash5 int32 - fieldDecoder5 *structFieldDecoder - fieldHash6 int32 - fieldDecoder6 *structFieldDecoder - fieldHash7 int32 - fieldDecoder7 *structFieldDecoder -} - -func (decoder *sevenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - case decoder.fieldHash4: - decoder.fieldDecoder4.Decode(ptr, iter) - case decoder.fieldHash5: - decoder.fieldDecoder5.Decode(ptr, iter) - case decoder.fieldHash6: - decoder.fieldDecoder6.Decode(ptr, iter) - case decoder.fieldHash7: - decoder.fieldDecoder7.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type eightFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder - fieldHash4 int32 - fieldDecoder4 *structFieldDecoder - fieldHash5 int32 - fieldDecoder5 *structFieldDecoder - fieldHash6 int32 - fieldDecoder6 *structFieldDecoder - fieldHash7 int32 - fieldDecoder7 *structFieldDecoder - fieldHash8 int32 - fieldDecoder8 *structFieldDecoder -} - -func (decoder *eightFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - case decoder.fieldHash4: - decoder.fieldDecoder4.Decode(ptr, iter) - case decoder.fieldHash5: - decoder.fieldDecoder5.Decode(ptr, iter) - case decoder.fieldHash6: - decoder.fieldDecoder6.Decode(ptr, iter) - case decoder.fieldHash7: - decoder.fieldDecoder7.Decode(ptr, iter) - case decoder.fieldHash8: - decoder.fieldDecoder8.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type nineFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder - fieldHash4 int32 - fieldDecoder4 *structFieldDecoder - fieldHash5 int32 - fieldDecoder5 *structFieldDecoder - fieldHash6 int32 - fieldDecoder6 *structFieldDecoder - fieldHash7 int32 - fieldDecoder7 *structFieldDecoder - fieldHash8 int32 - fieldDecoder8 *structFieldDecoder - fieldHash9 int32 - fieldDecoder9 *structFieldDecoder -} - -func (decoder *nineFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - case decoder.fieldHash4: - decoder.fieldDecoder4.Decode(ptr, iter) - case decoder.fieldHash5: - decoder.fieldDecoder5.Decode(ptr, iter) - case decoder.fieldHash6: - decoder.fieldDecoder6.Decode(ptr, iter) - case decoder.fieldHash7: - decoder.fieldDecoder7.Decode(ptr, iter) - case decoder.fieldHash8: - decoder.fieldDecoder8.Decode(ptr, iter) - case decoder.fieldHash9: - decoder.fieldDecoder9.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type tenFieldsStructDecoder struct { - typ reflect.Type - fieldHash1 int32 - fieldDecoder1 *structFieldDecoder - fieldHash2 int32 - fieldDecoder2 *structFieldDecoder - fieldHash3 int32 - fieldDecoder3 *structFieldDecoder - fieldHash4 int32 - fieldDecoder4 *structFieldDecoder - fieldHash5 int32 - fieldDecoder5 *structFieldDecoder - fieldHash6 int32 - fieldDecoder6 *structFieldDecoder - fieldHash7 int32 - fieldDecoder7 *structFieldDecoder - fieldHash8 int32 - fieldDecoder8 *structFieldDecoder - fieldHash9 int32 - fieldDecoder9 *structFieldDecoder - fieldHash10 int32 - fieldDecoder10 *structFieldDecoder -} - -func (decoder *tenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - if !iter.readObjectStart() { - return - } - for { - switch iter.readFieldHash() { - case decoder.fieldHash1: - decoder.fieldDecoder1.Decode(ptr, iter) - case decoder.fieldHash2: - decoder.fieldDecoder2.Decode(ptr, iter) - case decoder.fieldHash3: - decoder.fieldDecoder3.Decode(ptr, iter) - case decoder.fieldHash4: - decoder.fieldDecoder4.Decode(ptr, iter) - case decoder.fieldHash5: - decoder.fieldDecoder5.Decode(ptr, iter) - case decoder.fieldHash6: - decoder.fieldDecoder6.Decode(ptr, iter) - case decoder.fieldHash7: - decoder.fieldDecoder7.Decode(ptr, iter) - case decoder.fieldHash8: - decoder.fieldDecoder8.Decode(ptr, iter) - case decoder.fieldHash9: - decoder.fieldDecoder9.Decode(ptr, iter) - case decoder.fieldHash10: - decoder.fieldDecoder10.Decode(ptr, iter) - default: - iter.Skip() - } - if iter.isObjectEnd() { - break - } - } - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%v: %s", decoder.typ, iter.Error.Error()) - } -} - -type structFieldDecoder struct { - field *reflect.StructField - fieldDecoder ValDecoder -} - -func (decoder *structFieldDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { - fieldPtr := unsafe.Pointer(uintptr(ptr) + decoder.field.Offset) - decoder.fieldDecoder.Decode(fieldPtr, iter) - if iter.Error != nil && iter.Error != io.EOF { - iter.Error = fmt.Errorf("%s: %s", decoder.field.Name, iter.Error.Error()) - } -} diff --git a/deps/github.com/json-iterator/go/feature_stream.go b/deps/github.com/json-iterator/go/feature_stream.go deleted file mode 100644 index 97355eb5b..000000000 --- a/deps/github.com/json-iterator/go/feature_stream.go +++ /dev/null @@ -1,308 +0,0 @@ -package jsoniter - -import ( - "io" -) - -// stream is a io.Writer like object, with JSON specific write functions. -// Error is not returned as return value, but stored as Error member on this stream instance. -type Stream struct { - cfg *frozenConfig - out io.Writer - buf []byte - n int - Error error - indention int - Attachment interface{} // open for customized encoder -} - -// NewStream create new stream instance. -// cfg can be jsoniter.ConfigDefault. -// out can be nil if write to internal buffer. -// bufSize is the initial size for the internal buffer in bytes. -func NewStream(cfg API, out io.Writer, bufSize int) *Stream { - return &Stream{ - cfg: cfg.(*frozenConfig), - out: out, - buf: make([]byte, bufSize), - n: 0, - Error: nil, - indention: 0, - } -} - -// Pool returns a pool can provide more stream with same configuration -func (stream *Stream) Pool() StreamPool { - return stream.cfg -} - -// Reset reuse this stream instance by assign a new writer -func (stream *Stream) Reset(out io.Writer) { - stream.out = out - stream.n = 0 -} - -// Available returns how many bytes are unused in the buffer. -func (stream *Stream) Available() int { - return len(stream.buf) - stream.n -} - -// Buffered returns the number of bytes that have been written into the current buffer. -func (stream *Stream) Buffered() int { - return stream.n -} - -// Buffer if writer is nil, use this method to take the result -func (stream *Stream) Buffer() []byte { - return stream.buf[:stream.n] -} - -// Write writes the contents of p into the buffer. -// It returns the number of bytes written. -// If nn < len(p), it also returns an error explaining -// why the write is short. -func (stream *Stream) Write(p []byte) (nn int, err error) { - for len(p) > stream.Available() && stream.Error == nil { - if stream.out == nil { - stream.growAtLeast(len(p)) - } else { - var n int - if stream.Buffered() == 0 { - // Large write, empty buffer. - // Write directly from p to avoid copy. - n, stream.Error = stream.out.Write(p) - } else { - n = copy(stream.buf[stream.n:], p) - stream.n += n - stream.Flush() - } - nn += n - p = p[n:] - } - } - if stream.Error != nil { - return nn, stream.Error - } - n := copy(stream.buf[stream.n:], p) - stream.n += n - nn += n - return nn, nil -} - -// WriteByte writes a single byte. -func (stream *Stream) writeByte(c byte) { - if stream.Error != nil { - return - } - if stream.Available() < 1 { - stream.growAtLeast(1) - } - stream.buf[stream.n] = c - stream.n++ -} - -func (stream *Stream) writeTwoBytes(c1 byte, c2 byte) { - if stream.Error != nil { - return - } - if stream.Available() < 2 { - stream.growAtLeast(2) - } - stream.buf[stream.n] = c1 - stream.buf[stream.n+1] = c2 - stream.n += 2 -} - -func (stream *Stream) writeThreeBytes(c1 byte, c2 byte, c3 byte) { - if stream.Error != nil { - return - } - if stream.Available() < 3 { - stream.growAtLeast(3) - } - stream.buf[stream.n] = c1 - stream.buf[stream.n+1] = c2 - stream.buf[stream.n+2] = c3 - stream.n += 3 -} - -func (stream *Stream) writeFourBytes(c1 byte, c2 byte, c3 byte, c4 byte) { - if stream.Error != nil { - return - } - if stream.Available() < 4 { - stream.growAtLeast(4) - } - stream.buf[stream.n] = c1 - stream.buf[stream.n+1] = c2 - stream.buf[stream.n+2] = c3 - stream.buf[stream.n+3] = c4 - stream.n += 4 -} - -func (stream *Stream) writeFiveBytes(c1 byte, c2 byte, c3 byte, c4 byte, c5 byte) { - if stream.Error != nil { - return - } - if stream.Available() < 5 { - stream.growAtLeast(5) - } - stream.buf[stream.n] = c1 - stream.buf[stream.n+1] = c2 - stream.buf[stream.n+2] = c3 - stream.buf[stream.n+3] = c4 - stream.buf[stream.n+4] = c5 - stream.n += 5 -} - -// Flush writes any buffered data to the underlying io.Writer. -func (stream *Stream) Flush() error { - if stream.out == nil { - return nil - } - if stream.Error != nil { - return stream.Error - } - if stream.n == 0 { - return nil - } - n, err := stream.out.Write(stream.buf[0:stream.n]) - if n < stream.n && err == nil { - err = io.ErrShortWrite - } - if err != nil { - if n > 0 && n < stream.n { - copy(stream.buf[0:stream.n-n], stream.buf[n:stream.n]) - } - stream.n -= n - stream.Error = err - return err - } - stream.n = 0 - return nil -} - -func (stream *Stream) ensure(minimal int) { - available := stream.Available() - if available < minimal { - stream.growAtLeast(minimal) - } -} - -func (stream *Stream) growAtLeast(minimal int) { - if stream.out != nil { - stream.Flush() - if stream.Available() >= minimal { - return - } - } - toGrow := len(stream.buf) - if toGrow < minimal { - toGrow = minimal - } - newBuf := make([]byte, len(stream.buf)+toGrow) - copy(newBuf, stream.Buffer()) - stream.buf = newBuf -} - -// WriteRaw write string out without quotes, just like []byte -func (stream *Stream) WriteRaw(s string) { - stream.ensure(len(s)) - if stream.Error != nil { - return - } - n := copy(stream.buf[stream.n:], s) - stream.n += n -} - -// WriteNil write null to stream -func (stream *Stream) WriteNil() { - stream.writeFourBytes('n', 'u', 'l', 'l') -} - -// WriteTrue write true to stream -func (stream *Stream) WriteTrue() { - stream.writeFourBytes('t', 'r', 'u', 'e') -} - -// WriteFalse write false to stream -func (stream *Stream) WriteFalse() { - stream.writeFiveBytes('f', 'a', 'l', 's', 'e') -} - -// WriteBool write true or false into stream -func (stream *Stream) WriteBool(val bool) { - if val { - stream.WriteTrue() - } else { - stream.WriteFalse() - } -} - -// WriteObjectStart write { with possible indention -func (stream *Stream) WriteObjectStart() { - stream.indention += stream.cfg.indentionStep - stream.writeByte('{') - stream.writeIndention(0) -} - -// WriteObjectField write "field": with possible indention -func (stream *Stream) WriteObjectField(field string) { - stream.WriteString(field) - if stream.indention > 0 { - stream.writeTwoBytes(':', ' ') - } else { - stream.writeByte(':') - } -} - -// WriteObjectEnd write } with possible indention -func (stream *Stream) WriteObjectEnd() { - stream.writeIndention(stream.cfg.indentionStep) - stream.indention -= stream.cfg.indentionStep - stream.writeByte('}') -} - -// WriteEmptyObject write {} -func (stream *Stream) WriteEmptyObject() { - stream.writeByte('{') - stream.writeByte('}') -} - -// WriteMore write , with possible indention -func (stream *Stream) WriteMore() { - stream.writeByte(',') - stream.writeIndention(0) -} - -// WriteArrayStart write [ with possible indention -func (stream *Stream) WriteArrayStart() { - stream.indention += stream.cfg.indentionStep - stream.writeByte('[') - stream.writeIndention(0) -} - -// WriteEmptyArray write [] -func (stream *Stream) WriteEmptyArray() { - stream.writeTwoBytes('[', ']') -} - -// WriteArrayEnd write ] with possible indention -func (stream *Stream) WriteArrayEnd() { - stream.writeIndention(stream.cfg.indentionStep) - stream.indention -= stream.cfg.indentionStep - stream.writeByte(']') -} - -func (stream *Stream) writeIndention(delta int) { - if stream.indention == 0 { - return - } - stream.writeByte('\n') - toWrite := stream.indention - delta - stream.ensure(toWrite) - for i := 0; i < toWrite && stream.n < len(stream.buf); i++ { - stream.buf[stream.n] = ' ' - stream.n++ - } -} diff --git a/deps/github.com/json-iterator/go/feature_stream_float.go b/deps/github.com/json-iterator/go/feature_stream_float.go deleted file mode 100644 index 9a404e11d..000000000 --- a/deps/github.com/json-iterator/go/feature_stream_float.go +++ /dev/null @@ -1,96 +0,0 @@ -package jsoniter - -import ( - "math" - "strconv" -) - -var pow10 []uint64 - -func init() { - pow10 = []uint64{1, 10, 100, 1000, 10000, 100000, 1000000} -} - -// WriteFloat32 write float32 to stream -func (stream *Stream) WriteFloat32(val float32) { - abs := math.Abs(float64(val)) - fmt := byte('f') - // Note: Must use float32 comparisons for underlying float32 value to get precise cutoffs right. - if abs != 0 { - if float32(abs) < 1e-6 || float32(abs) >= 1e21 { - fmt = 'e' - } - } - stream.WriteRaw(strconv.FormatFloat(float64(val), fmt, -1, 32)) -} - -// WriteFloat32Lossy write float32 to stream with ONLY 6 digits precision although much much faster -func (stream *Stream) WriteFloat32Lossy(val float32) { - if val < 0 { - stream.writeByte('-') - val = -val - } - if val > 0x4ffffff { - stream.WriteFloat32(val) - return - } - precision := 6 - exp := uint64(1000000) // 6 - lval := uint64(float64(val)*float64(exp) + 0.5) - stream.WriteUint64(lval / exp) - fval := lval % exp - if fval == 0 { - return - } - stream.writeByte('.') - stream.ensure(10) - for p := precision - 1; p > 0 && fval < pow10[p]; p-- { - stream.writeByte('0') - } - stream.WriteUint64(fval) - for stream.buf[stream.n-1] == '0' { - stream.n-- - } -} - -// WriteFloat64 write float64 to stream -func (stream *Stream) WriteFloat64(val float64) { - abs := math.Abs(val) - fmt := byte('f') - // Note: Must use float32 comparisons for underlying float32 value to get precise cutoffs right. - if abs != 0 { - if abs < 1e-6 || abs >= 1e21 { - fmt = 'e' - } - } - stream.WriteRaw(strconv.FormatFloat(float64(val), fmt, -1, 64)) -} - -// WriteFloat64Lossy write float64 to stream with ONLY 6 digits precision although much much faster -func (stream *Stream) WriteFloat64Lossy(val float64) { - if val < 0 { - stream.writeByte('-') - val = -val - } - if val > 0x4ffffff { - stream.WriteFloat64(val) - return - } - precision := 6 - exp := uint64(1000000) // 6 - lval := uint64(val*float64(exp) + 0.5) - stream.WriteUint64(lval / exp) - fval := lval % exp - if fval == 0 { - return - } - stream.writeByte('.') - stream.ensure(10) - for p := precision - 1; p > 0 && fval < pow10[p]; p-- { - stream.writeByte('0') - } - stream.WriteUint64(fval) - for stream.buf[stream.n-1] == '0' { - stream.n-- - } -} diff --git a/deps/github.com/json-iterator/go/feature_stream_int.go b/deps/github.com/json-iterator/go/feature_stream_int.go deleted file mode 100644 index 7cfd522c1..000000000 --- a/deps/github.com/json-iterator/go/feature_stream_int.go +++ /dev/null @@ -1,320 +0,0 @@ -package jsoniter - -var digits []uint32 - -func init() { - digits = make([]uint32, 1000) - for i := uint32(0); i < 1000; i++ { - digits[i] = (((i / 100) + '0') << 16) + ((((i / 10) % 10) + '0') << 8) + i%10 + '0' - if i < 10 { - digits[i] += 2 << 24 - } else if i < 100 { - digits[i] += 1 << 24 - } - } -} - -func writeFirstBuf(buf []byte, v uint32, n int) int { - start := v >> 24 - if start == 0 { - buf[n] = byte(v >> 16) - n++ - buf[n] = byte(v >> 8) - n++ - } else if start == 1 { - buf[n] = byte(v >> 8) - n++ - } - buf[n] = byte(v) - n++ - return n -} - -func writeBuf(buf []byte, v uint32, n int) { - buf[n] = byte(v >> 16) - buf[n+1] = byte(v >> 8) - buf[n+2] = byte(v) -} - -// WriteUint8 write uint8 to stream -func (stream *Stream) WriteUint8(val uint8) { - stream.ensure(3) - stream.n = writeFirstBuf(stream.buf, digits[val], stream.n) -} - -// WriteInt8 write int8 to stream -func (stream *Stream) WriteInt8(nval int8) { - stream.ensure(4) - n := stream.n - var val uint8 - if nval < 0 { - val = uint8(-nval) - stream.buf[n] = '-' - n++ - } else { - val = uint8(nval) - } - stream.n = writeFirstBuf(stream.buf, digits[val], n) -} - -// WriteUint16 write uint16 to stream -func (stream *Stream) WriteUint16(val uint16) { - stream.ensure(5) - q1 := val / 1000 - if q1 == 0 { - stream.n = writeFirstBuf(stream.buf, digits[val], stream.n) - return - } - r1 := val - q1*1000 - n := writeFirstBuf(stream.buf, digits[q1], stream.n) - writeBuf(stream.buf, digits[r1], n) - stream.n = n + 3 - return -} - -// WriteInt16 write int16 to stream -func (stream *Stream) WriteInt16(nval int16) { - stream.ensure(6) - n := stream.n - var val uint16 - if nval < 0 { - val = uint16(-nval) - stream.buf[n] = '-' - n++ - } else { - val = uint16(nval) - } - q1 := val / 1000 - if q1 == 0 { - stream.n = writeFirstBuf(stream.buf, digits[val], n) - return - } - r1 := val - q1*1000 - n = writeFirstBuf(stream.buf, digits[q1], n) - writeBuf(stream.buf, digits[r1], n) - stream.n = n + 3 - return -} - -// WriteUint32 write uint32 to stream -func (stream *Stream) WriteUint32(val uint32) { - stream.ensure(10) - n := stream.n - q1 := val / 1000 - if q1 == 0 { - stream.n = writeFirstBuf(stream.buf, digits[val], n) - return - } - r1 := val - q1*1000 - q2 := q1 / 1000 - if q2 == 0 { - n := writeFirstBuf(stream.buf, digits[q1], n) - writeBuf(stream.buf, digits[r1], n) - stream.n = n + 3 - return - } - r2 := q1 - q2*1000 - q3 := q2 / 1000 - if q3 == 0 { - n = writeFirstBuf(stream.buf, digits[q2], n) - } else { - r3 := q2 - q3*1000 - stream.buf[n] = byte(q3 + '0') - n++ - writeBuf(stream.buf, digits[r3], n) - n += 3 - } - writeBuf(stream.buf, digits[r2], n) - writeBuf(stream.buf, digits[r1], n+3) - stream.n = n + 6 -} - -// WriteInt32 write int32 to stream -func (stream *Stream) WriteInt32(nval int32) { - stream.ensure(11) - n := stream.n - var val uint32 - if nval < 0 { - val = uint32(-nval) - stream.buf[n] = '-' - n++ - } else { - val = uint32(nval) - } - q1 := val / 1000 - if q1 == 0 { - stream.n = writeFirstBuf(stream.buf, digits[val], n) - return - } - r1 := val - q1*1000 - q2 := q1 / 1000 - if q2 == 0 { - n := writeFirstBuf(stream.buf, digits[q1], n) - writeBuf(stream.buf, digits[r1], n) - stream.n = n + 3 - return - } - r2 := q1 - q2*1000 - q3 := q2 / 1000 - if q3 == 0 { - n = writeFirstBuf(stream.buf, digits[q2], n) - } else { - r3 := q2 - q3*1000 - stream.buf[n] = byte(q3 + '0') - n++ - writeBuf(stream.buf, digits[r3], n) - n += 3 - } - writeBuf(stream.buf, digits[r2], n) - writeBuf(stream.buf, digits[r1], n+3) - stream.n = n + 6 -} - -// WriteUint64 write uint64 to stream -func (stream *Stream) WriteUint64(val uint64) { - stream.ensure(20) - n := stream.n - q1 := val / 1000 - if q1 == 0 { - stream.n = writeFirstBuf(stream.buf, digits[val], n) - return - } - r1 := val - q1*1000 - q2 := q1 / 1000 - if q2 == 0 { - n := writeFirstBuf(stream.buf, digits[q1], n) - writeBuf(stream.buf, digits[r1], n) - stream.n = n + 3 - return - } - r2 := q1 - q2*1000 - q3 := q2 / 1000 - if q3 == 0 { - n = writeFirstBuf(stream.buf, digits[q2], n) - writeBuf(stream.buf, digits[r2], n) - writeBuf(stream.buf, digits[r1], n+3) - stream.n = n + 6 - return - } - r3 := q2 - q3*1000 - q4 := q3 / 1000 - if q4 == 0 { - n = writeFirstBuf(stream.buf, digits[q3], n) - writeBuf(stream.buf, digits[r3], n) - writeBuf(stream.buf, digits[r2], n+3) - writeBuf(stream.buf, digits[r1], n+6) - stream.n = n + 9 - return - } - r4 := q3 - q4*1000 - q5 := q4 / 1000 - if q5 == 0 { - n = writeFirstBuf(stream.buf, digits[q4], n) - writeBuf(stream.buf, digits[r4], n) - writeBuf(stream.buf, digits[r3], n+3) - writeBuf(stream.buf, digits[r2], n+6) - writeBuf(stream.buf, digits[r1], n+9) - stream.n = n + 12 - return - } - r5 := q4 - q5*1000 - q6 := q5 / 1000 - if q6 == 0 { - n = writeFirstBuf(stream.buf, digits[q5], n) - } else { - n = writeFirstBuf(stream.buf, digits[q6], n) - r6 := q5 - q6*1000 - writeBuf(stream.buf, digits[r6], n) - n += 3 - } - writeBuf(stream.buf, digits[r5], n) - writeBuf(stream.buf, digits[r4], n+3) - writeBuf(stream.buf, digits[r3], n+6) - writeBuf(stream.buf, digits[r2], n+9) - writeBuf(stream.buf, digits[r1], n+12) - stream.n = n + 15 -} - -// WriteInt64 write int64 to stream -func (stream *Stream) WriteInt64(nval int64) { - stream.ensure(20) - n := stream.n - var val uint64 - if nval < 0 { - val = uint64(-nval) - stream.buf[n] = '-' - n++ - } else { - val = uint64(nval) - } - q1 := val / 1000 - if q1 == 0 { - stream.n = writeFirstBuf(stream.buf, digits[val], n) - return - } - r1 := val - q1*1000 - q2 := q1 / 1000 - if q2 == 0 { - n := writeFirstBuf(stream.buf, digits[q1], n) - writeBuf(stream.buf, digits[r1], n) - stream.n = n + 3 - return - } - r2 := q1 - q2*1000 - q3 := q2 / 1000 - if q3 == 0 { - n = writeFirstBuf(stream.buf, digits[q2], n) - writeBuf(stream.buf, digits[r2], n) - writeBuf(stream.buf, digits[r1], n+3) - stream.n = n + 6 - return - } - r3 := q2 - q3*1000 - q4 := q3 / 1000 - if q4 == 0 { - n = writeFirstBuf(stream.buf, digits[q3], n) - writeBuf(stream.buf, digits[r3], n) - writeBuf(stream.buf, digits[r2], n+3) - writeBuf(stream.buf, digits[r1], n+6) - stream.n = n + 9 - return - } - r4 := q3 - q4*1000 - q5 := q4 / 1000 - if q5 == 0 { - n = writeFirstBuf(stream.buf, digits[q4], n) - writeBuf(stream.buf, digits[r4], n) - writeBuf(stream.buf, digits[r3], n+3) - writeBuf(stream.buf, digits[r2], n+6) - writeBuf(stream.buf, digits[r1], n+9) - stream.n = n + 12 - return - } - r5 := q4 - q5*1000 - q6 := q5 / 1000 - if q6 == 0 { - n = writeFirstBuf(stream.buf, digits[q5], n) - } else { - stream.buf[n] = byte(q6 + '0') - n++ - r6 := q5 - q6*1000 - writeBuf(stream.buf, digits[r6], n) - n += 3 - } - writeBuf(stream.buf, digits[r5], n) - writeBuf(stream.buf, digits[r4], n+3) - writeBuf(stream.buf, digits[r3], n+6) - writeBuf(stream.buf, digits[r2], n+9) - writeBuf(stream.buf, digits[r1], n+12) - stream.n = n + 15 -} - -// WriteInt write int to stream -func (stream *Stream) WriteInt(val int) { - stream.WriteInt64(int64(val)) -} - -// WriteUint write uint to stream -func (stream *Stream) WriteUint(val uint) { - stream.WriteUint64(uint64(val)) -} diff --git a/deps/github.com/json-iterator/go/feature_stream_string.go b/deps/github.com/json-iterator/go/feature_stream_string.go deleted file mode 100644 index 334282f05..000000000 --- a/deps/github.com/json-iterator/go/feature_stream_string.go +++ /dev/null @@ -1,396 +0,0 @@ -package jsoniter - -import ( - "unicode/utf8" -) - -// htmlSafeSet holds the value true if the ASCII character with the given -// array position can be safely represented inside a JSON string, embedded -// inside of HTML \nEnde\n\r", - expected: "Hallo\n\nEnde\n\n", - }, - } - - p := UGCPolicy() - - for ii, test := range tests { - out := p.Sanitize(test.in) - if out != test.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - test.in, - out, - test.expected, - ) - } - } -} diff --git a/deps/github.com/microcosm-cc/bluemonday/policy.go b/deps/github.com/microcosm-cc/bluemonday/policy.go deleted file mode 100644 index 1bbdd42ba..000000000 --- a/deps/github.com/microcosm-cc/bluemonday/policy.go +++ /dev/null @@ -1,551 +0,0 @@ -// Copyright (c) 2014, David Kitchen -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the organisation (Microcosm) nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package bluemonday - -import ( - "net/url" - "regexp" - "strings" -) - -// Policy encapsulates the whitelist of HTML elements and attributes that will -// be applied to the sanitised HTML. -// -// You should use bluemonday.NewPolicy() to create a blank policy as the -// unexported fields contain maps that need to be initialized. -type Policy struct { - - // Declares whether the maps have been initialized, used as a cheap check to - // ensure that those using Policy{} directly won't cause nil pointer - // exceptions - initialized bool - - // If true then we add spaces when stripping tags, specifically the closing - // tag is replaced by a space character. - addSpaces bool - - // When true, add rel="nofollow" to HTML anchors - requireNoFollow bool - - // When true, add rel="nofollow" to HTML anchors - // Will add for href="http://foo" - // Will skip for href="/foo" or href="foo" - requireNoFollowFullyQualifiedLinks bool - - // When true add target="_blank" to fully qualified links - // Will add for href="http://foo" - // Will skip for href="/foo" or href="foo" - addTargetBlankToFullyQualifiedLinks bool - - // When true, URLs must be parseable by "net/url" url.Parse() - requireParseableURLs bool - - // When true, u, _ := url.Parse("url"); !u.IsAbs() is permitted - allowRelativeURLs bool - - // When true, allow data attributes. - allowDataAttributes bool - - // map[htmlElementName]map[htmlAttributeName]attrPolicy - elsAndAttrs map[string]map[string]attrPolicy - - // map[htmlAttributeName]attrPolicy - globalAttrs map[string]attrPolicy - - // If urlPolicy is nil, all URLs with matching schema are allowed. - // Otherwise, only the URLs with matching schema and urlPolicy(url) - // returning true are allowed. - allowURLSchemes map[string]urlPolicy - - // If an element has had all attributes removed as a result of a policy - // being applied, then the element would be removed from the output. - // - // However some elements are valid and have strong layout meaning without - // any attributes, i.e.
. To prevent those being removed we maintain - // a list of elements that are allowed to have no attributes and that will - // be maintained in the output HTML. - setOfElementsAllowedWithoutAttrs map[string]struct{} - - setOfElementsToSkipContent map[string]struct{} -} - -type attrPolicy struct { - - // optional pattern to match, when not nil the regexp needs to match - // otherwise the attribute is removed - regexp *regexp.Regexp -} - -type attrPolicyBuilder struct { - p *Policy - - attrNames []string - regexp *regexp.Regexp - allowEmpty bool -} - -type urlPolicy func(url *url.URL) (allowUrl bool) - -// init initializes the maps if this has not been done already -func (p *Policy) init() { - if !p.initialized { - p.elsAndAttrs = make(map[string]map[string]attrPolicy) - p.globalAttrs = make(map[string]attrPolicy) - p.allowURLSchemes = make(map[string]urlPolicy) - p.setOfElementsAllowedWithoutAttrs = make(map[string]struct{}) - p.setOfElementsToSkipContent = make(map[string]struct{}) - p.initialized = true - } -} - -// NewPolicy returns a blank policy with nothing whitelisted or permitted. This -// is the recommended way to start building a policy and you should now use -// AllowAttrs() and/or AllowElements() to construct the whitelist of HTML -// elements and attributes. -func NewPolicy() *Policy { - - p := Policy{} - - p.addDefaultElementsWithoutAttrs() - p.addDefaultSkipElementContent() - - return &p -} - -// AllowAttrs takes a range of HTML attribute names and returns an -// attribute policy builder that allows you to specify the pattern and scope of -// the whitelisted attribute. -// -// The attribute policy is only added to the core policy when either Globally() -// or OnElements(...) are called. -func (p *Policy) AllowAttrs(attrNames ...string) *attrPolicyBuilder { - - p.init() - - abp := attrPolicyBuilder{ - p: p, - allowEmpty: false, - } - - for _, attrName := range attrNames { - abp.attrNames = append(abp.attrNames, strings.ToLower(attrName)) - } - - return &abp -} - -// AllowDataAttributes whitelists all data attributes. We can't specify the name -// of each attribute exactly as they are customized. -// -// NOTE: These values are not sanitized and applications that evaluate or process -// them without checking and verification of the input may be at risk if this option -// is enabled. This is a 'caveat emptor' option and the person enabling this option -// needs to fully understand the potential impact with regards to whatever application -// will be consuming the sanitized HTML afterwards, i.e. if you know you put a link in a -// data attribute and use that to automatically load some new window then you're giving -// the author of a HTML fragment the means to open a malicious destination automatically. -// Use with care! -func (p *Policy) AllowDataAttributes() { - p.allowDataAttributes = true -} - -// AllowNoAttrs says that attributes on element are optional. -// -// The attribute policy is only added to the core policy when OnElements(...) -// are called. -func (p *Policy) AllowNoAttrs() *attrPolicyBuilder { - - p.init() - - abp := attrPolicyBuilder{ - p: p, - allowEmpty: true, - } - return &abp -} - -// AllowNoAttrs says that attributes on element are optional. -// -// The attribute policy is only added to the core policy when OnElements(...) -// are called. -func (abp *attrPolicyBuilder) AllowNoAttrs() *attrPolicyBuilder { - - abp.allowEmpty = true - - return abp -} - -// Matching allows a regular expression to be applied to a nascent attribute -// policy, and returns the attribute policy. Calling this more than once will -// replace the existing regexp. -func (abp *attrPolicyBuilder) Matching(regex *regexp.Regexp) *attrPolicyBuilder { - - abp.regexp = regex - - return abp -} - -// OnElements will bind an attribute policy to a given range of HTML elements -// and return the updated policy -func (abp *attrPolicyBuilder) OnElements(elements ...string) *Policy { - - for _, element := range elements { - element = strings.ToLower(element) - - for _, attr := range abp.attrNames { - - if _, ok := abp.p.elsAndAttrs[element]; !ok { - abp.p.elsAndAttrs[element] = make(map[string]attrPolicy) - } - - ap := attrPolicy{} - if abp.regexp != nil { - ap.regexp = abp.regexp - } - - abp.p.elsAndAttrs[element][attr] = ap - } - - if abp.allowEmpty { - abp.p.setOfElementsAllowedWithoutAttrs[element] = struct{}{} - - if _, ok := abp.p.elsAndAttrs[element]; !ok { - abp.p.elsAndAttrs[element] = make(map[string]attrPolicy) - } - } - } - - return abp.p -} - -// Globally will bind an attribute policy to all HTML elements and return the -// updated policy -func (abp *attrPolicyBuilder) Globally() *Policy { - - for _, attr := range abp.attrNames { - if _, ok := abp.p.globalAttrs[attr]; !ok { - abp.p.globalAttrs[attr] = attrPolicy{} - } - - ap := attrPolicy{} - if abp.regexp != nil { - ap.regexp = abp.regexp - } - - abp.p.globalAttrs[attr] = ap - } - - return abp.p -} - -// AllowElements will append HTML elements to the whitelist without applying an -// attribute policy to those elements (the elements are permitted -// sans-attributes) -func (p *Policy) AllowElements(names ...string) *Policy { - p.init() - - for _, element := range names { - element = strings.ToLower(element) - - if _, ok := p.elsAndAttrs[element]; !ok { - p.elsAndAttrs[element] = make(map[string]attrPolicy) - } - } - - return p -} - -// RequireNoFollowOnLinks will result in all tags having a rel="nofollow" -// added to them if one does not already exist -// -// Note: This requires p.RequireParseableURLs(true) and will enable it. -func (p *Policy) RequireNoFollowOnLinks(require bool) *Policy { - - p.requireNoFollow = require - p.requireParseableURLs = true - - return p -} - -// RequireNoFollowOnFullyQualifiedLinks will result in all tags that point -// to a non-local destination (i.e. starts with a protocol and has a host) -// having a rel="nofollow" added to them if one does not already exist -// -// Note: This requires p.RequireParseableURLs(true) and will enable it. -func (p *Policy) RequireNoFollowOnFullyQualifiedLinks(require bool) *Policy { - - p.requireNoFollowFullyQualifiedLinks = require - p.requireParseableURLs = true - - return p -} - -// AddTargetBlankToFullyQualifiedLinks will result in all tags that point -// to a non-local destination (i.e. starts with a protocol and has a host) -// having a target="_blank" added to them if one does not already exist -// -// Note: This requires p.RequireParseableURLs(true) and will enable it. -func (p *Policy) AddTargetBlankToFullyQualifiedLinks(require bool) *Policy { - - p.addTargetBlankToFullyQualifiedLinks = require - p.requireParseableURLs = true - - return p -} - -// RequireParseableURLs will result in all URLs requiring that they be parseable -// by "net/url" url.Parse() -// This applies to: -// - a.href -// - area.href -// - blockquote.cite -// - img.src -// - link.href -// - script.src -func (p *Policy) RequireParseableURLs(require bool) *Policy { - - p.requireParseableURLs = require - - return p -} - -// AllowRelativeURLs enables RequireParseableURLs and then permits URLs that -// are parseable, have no schema information and url.IsAbs() returns false -// This permits local URLs -func (p *Policy) AllowRelativeURLs(require bool) *Policy { - - p.RequireParseableURLs(true) - p.allowRelativeURLs = require - - return p -} - -// AllowURLSchemes will append URL schemes to the whitelist -// Example: p.AllowURLSchemes("mailto", "http", "https") -func (p *Policy) AllowURLSchemes(schemes ...string) *Policy { - p.init() - - p.RequireParseableURLs(true) - - for _, scheme := range schemes { - scheme = strings.ToLower(scheme) - - // Allow all URLs with matching scheme. - p.allowURLSchemes[scheme] = nil - } - - return p -} - -// AllowURLSchemeWithCustomPolicy will append URL schemes with -// a custom URL policy to the whitelist. -// Only the URLs with matching schema and urlPolicy(url) -// returning true will be allowed. -func (p *Policy) AllowURLSchemeWithCustomPolicy( - scheme string, - urlPolicy func(url *url.URL) (allowUrl bool), -) *Policy { - - p.init() - - p.RequireParseableURLs(true) - - scheme = strings.ToLower(scheme) - - p.allowURLSchemes[scheme] = urlPolicy - - return p -} - -// AddSpaceWhenStrippingTag states whether to add a single space " " when -// removing tags that are not whitelisted by the policy. -// -// This is useful if you expect to strip tags in dense markup and may lose the -// value of whitespace. -// -// For example: "

Hello

World

"" would be sanitized to "HelloWorld" -// with the default value of false, but you may wish to sanitize this to -// " Hello World " by setting AddSpaceWhenStrippingTag to true as this would -// retain the intent of the text. -func (p *Policy) AddSpaceWhenStrippingTag(allow bool) *Policy { - - p.addSpaces = allow - - return p -} - -// SkipElementsContent adds the HTML elements whose tags is needed to be removed -// with its content. -func (p *Policy) SkipElementsContent(names ...string) *Policy { - - p.init() - - for _, element := range names { - element = strings.ToLower(element) - - if _, ok := p.setOfElementsToSkipContent[element]; !ok { - p.setOfElementsToSkipContent[element] = struct{}{} - } - } - - return p -} - -// AllowElementsContent marks the HTML elements whose content should be -// retained after removing the tag. -func (p *Policy) AllowElementsContent(names ...string) *Policy { - - p.init() - - for _, element := range names { - delete(p.setOfElementsToSkipContent, strings.ToLower(element)) - } - - return p -} - -// addDefaultElementsWithoutAttrs adds the HTML elements that we know are valid -// without any attributes to an internal map. -// i.e. we know that
is valid, but isn't valid as the "dir" attr -// is mandatory -func (p *Policy) addDefaultElementsWithoutAttrs() { - p.init() - - p.setOfElementsAllowedWithoutAttrs["abbr"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["acronym"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["article"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["aside"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["audio"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["b"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["bdi"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["blockquote"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["body"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["br"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["button"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["canvas"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["caption"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["center"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["cite"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["code"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["col"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["colgroup"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["datalist"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["dd"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["del"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["details"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["dfn"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["div"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["dl"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["dt"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["em"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["fieldset"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["figcaption"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["figure"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["footer"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["h1"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["h2"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["h3"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["h4"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["h5"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["h6"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["head"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["header"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["hgroup"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["hr"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["html"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["i"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["ins"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["kbd"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["li"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["mark"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["marquee"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["nav"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["ol"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["optgroup"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["option"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["p"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["pre"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["q"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["rp"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["rt"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["ruby"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["s"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["samp"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["script"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["section"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["select"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["small"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["span"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["strike"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["strong"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["style"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["sub"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["summary"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["sup"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["svg"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["table"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["tbody"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["td"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["textarea"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["tfoot"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["th"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["thead"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["title"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["time"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["tr"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["tt"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["u"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["ul"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["var"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["video"] = struct{}{} - p.setOfElementsAllowedWithoutAttrs["wbr"] = struct{}{} - -} - -// addDefaultSkipElementContent adds the HTML elements that we should skip -// rendering the character content of, if the element itself is not allowed. -// This is all character data that the end user would not normally see. -// i.e. if we exclude a tag. -func (p *Policy) addDefaultSkipElementContent() { - p.init() - - p.setOfElementsToSkipContent["frame"] = struct{}{} - p.setOfElementsToSkipContent["frameset"] = struct{}{} - p.setOfElementsToSkipContent["iframe"] = struct{}{} - p.setOfElementsToSkipContent["noembed"] = struct{}{} - p.setOfElementsToSkipContent["noframes"] = struct{}{} - p.setOfElementsToSkipContent["noscript"] = struct{}{} - p.setOfElementsToSkipContent["nostyle"] = struct{}{} - p.setOfElementsToSkipContent["object"] = struct{}{} - p.setOfElementsToSkipContent["script"] = struct{}{} - p.setOfElementsToSkipContent["style"] = struct{}{} - p.setOfElementsToSkipContent["title"] = struct{}{} -} diff --git a/deps/github.com/microcosm-cc/bluemonday/policy_test.go b/deps/github.com/microcosm-cc/bluemonday/policy_test.go deleted file mode 100644 index ee9e2be6d..000000000 --- a/deps/github.com/microcosm-cc/bluemonday/policy_test.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2014, David Kitchen -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the organisation (Microcosm) nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package bluemonday - -import "testing" - -func TestAllowElementsContent(t *testing.T) { - policy := NewPolicy().AllowElementsContent("iframe", "script") - - tests := []test{ - { - in: "", - expected: "this is fallback content", - }, - { - in: "", - expected: "var a = 10; alert(a);", - }, - } - - for ii, test := range tests { - out := policy.Sanitize(test.in) - if out != test.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - test.in, - out, - test.expected, - ) - } - } -} diff --git a/deps/github.com/microcosm-cc/bluemonday/sanitize.go b/deps/github.com/microcosm-cc/bluemonday/sanitize.go deleted file mode 100644 index 65ed89b79..000000000 --- a/deps/github.com/microcosm-cc/bluemonday/sanitize.go +++ /dev/null @@ -1,581 +0,0 @@ -// Copyright (c) 2014, David Kitchen -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the organisation (Microcosm) nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package bluemonday - -import ( - "bytes" - "io" - "net/url" - "regexp" - "strings" - - "golang.org/x/net/html" -) - -var ( - dataAttribute = regexp.MustCompile("^data-.+") - dataAttributeXMLPrefix = regexp.MustCompile("^xml.+") - dataAttributeInvalidChars = regexp.MustCompile("[A-Z;]+") -) - -// Sanitize takes a string that contains a HTML fragment or document and applies -// the given policy whitelist. -// -// It returns a HTML string that has been sanitized by the policy or an empty -// string if an error has occurred (most likely as a consequence of extremely -// malformed input) -func (p *Policy) Sanitize(s string) string { - if strings.TrimSpace(s) == "" { - return s - } - - return p.sanitize(strings.NewReader(s)).String() -} - -// SanitizeBytes takes a []byte that contains a HTML fragment or document and applies -// the given policy whitelist. -// -// It returns a []byte containing the HTML that has been sanitized by the policy -// or an empty []byte if an error has occurred (most likely as a consequence of -// extremely malformed input) -func (p *Policy) SanitizeBytes(b []byte) []byte { - if len(bytes.TrimSpace(b)) == 0 { - return b - } - - return p.sanitize(bytes.NewReader(b)).Bytes() -} - -// SanitizeReader takes an io.Reader that contains a HTML fragment or document -// and applies the given policy whitelist. -// -// It returns a bytes.Buffer containing the HTML that has been sanitized by the -// policy. Errors during sanitization will merely return an empty result. -func (p *Policy) SanitizeReader(r io.Reader) *bytes.Buffer { - return p.sanitize(r) -} - -// Performs the actual sanitization process. -func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { - - // It is possible that the developer has created the policy via: - // p := bluemonday.Policy{} - // rather than: - // p := bluemonday.NewPolicy() - // If this is the case, and if they haven't yet triggered an action that - // would initiliaze the maps, then we need to do that. - p.init() - - var ( - buff bytes.Buffer - skipElementContent bool - skippingElementsCount int64 - skipClosingTag bool - closingTagToSkipStack []string - mostRecentlyStartedToken string - ) - - tokenizer := html.NewTokenizer(r) - for { - if tokenizer.Next() == html.ErrorToken { - err := tokenizer.Err() - if err == io.EOF { - // End of input means end of processing - return &buff - } - - // Raw tokenizer error - return &bytes.Buffer{} - } - - token := tokenizer.Token() - switch token.Type { - case html.DoctypeToken: - - // DocType is not handled as there is no safe parsing mechanism - // provided by golang.org/x/net/html for the content, and this can - // be misused to insert HTML tags that are not then sanitized - // - // One might wish to recursively sanitize here using the same policy - // but I will need to do some further testing before considering - // this. - - case html.CommentToken: - - // Comments are ignored by default - - case html.StartTagToken: - - mostRecentlyStartedToken = token.Data - - aps, ok := p.elsAndAttrs[token.Data] - if !ok { - if _, ok := p.setOfElementsToSkipContent[token.Data]; ok { - skipElementContent = true - skippingElementsCount++ - } - if p.addSpaces { - buff.WriteString(" ") - } - break - } - - if len(token.Attr) != 0 { - token.Attr = p.sanitizeAttrs(token.Data, token.Attr, aps) - } - - if len(token.Attr) == 0 { - if !p.allowNoAttrs(token.Data) { - skipClosingTag = true - closingTagToSkipStack = append(closingTagToSkipStack, token.Data) - if p.addSpaces { - buff.WriteString(" ") - } - break - } - } - - if !skipElementContent { - buff.WriteString(token.String()) - } - - case html.EndTagToken: - - if mostRecentlyStartedToken == token.Data { - mostRecentlyStartedToken = "" - } - - if skipClosingTag && closingTagToSkipStack[len(closingTagToSkipStack)-1] == token.Data { - closingTagToSkipStack = closingTagToSkipStack[:len(closingTagToSkipStack)-1] - if len(closingTagToSkipStack) == 0 { - skipClosingTag = false - } - if p.addSpaces { - buff.WriteString(" ") - } - break - } - - if _, ok := p.elsAndAttrs[token.Data]; !ok { - if _, ok := p.setOfElementsToSkipContent[token.Data]; ok { - skippingElementsCount-- - if skippingElementsCount == 0 { - skipElementContent = false - } - } - if p.addSpaces { - buff.WriteString(" ") - } - break - } - - if !skipElementContent { - buff.WriteString(token.String()) - } - - case html.SelfClosingTagToken: - - aps, ok := p.elsAndAttrs[token.Data] - if !ok { - if p.addSpaces { - buff.WriteString(" ") - } - break - } - - if len(token.Attr) != 0 { - token.Attr = p.sanitizeAttrs(token.Data, token.Attr, aps) - } - - if len(token.Attr) == 0 && !p.allowNoAttrs(token.Data) { - if p.addSpaces { - buff.WriteString(" ") - } - break - } - - if !skipElementContent { - buff.WriteString(token.String()) - } - - case html.TextToken: - - if !skipElementContent { - switch mostRecentlyStartedToken { - case "script": - // not encouraged, but if a policy allows JavaScript we - // should not HTML escape it as that would break the output - buff.WriteString(token.Data) - case "style": - // not encouraged, but if a policy allows CSS styles we - // should not HTML escape it as that would break the output - buff.WriteString(token.Data) - default: - // HTML escape the text - buff.WriteString(token.String()) - } - } - default: - // A token that didn't exist in the html package when we wrote this - return &bytes.Buffer{} - } - } -} - -// sanitizeAttrs takes a set of element attribute policies and the global -// attribute policies and applies them to the []html.Attribute returning a set -// of html.Attributes that match the policies -func (p *Policy) sanitizeAttrs( - elementName string, - attrs []html.Attribute, - aps map[string]attrPolicy, -) []html.Attribute { - - if len(attrs) == 0 { - return attrs - } - - // Builds a new attribute slice based on the whether the attribute has been - // whitelisted explicitly or globally. - cleanAttrs := []html.Attribute{} - for _, htmlAttr := range attrs { - if p.allowDataAttributes { - // If we see a data attribute, let it through. - if isDataAttribute(htmlAttr.Key) { - cleanAttrs = append(cleanAttrs, htmlAttr) - continue - } - } - // Is there an element specific attribute policy that applies? - if ap, ok := aps[htmlAttr.Key]; ok { - if ap.regexp != nil { - if ap.regexp.MatchString(htmlAttr.Val) { - cleanAttrs = append(cleanAttrs, htmlAttr) - continue - } - } else { - cleanAttrs = append(cleanAttrs, htmlAttr) - continue - } - } - - // Is there a global attribute policy that applies? - if ap, ok := p.globalAttrs[htmlAttr.Key]; ok { - - if ap.regexp != nil { - if ap.regexp.MatchString(htmlAttr.Val) { - cleanAttrs = append(cleanAttrs, htmlAttr) - } - } else { - cleanAttrs = append(cleanAttrs, htmlAttr) - } - } - } - - if len(cleanAttrs) == 0 { - // If nothing was allowed, let's get out of here - return cleanAttrs - } - // cleanAttrs now contains the attributes that are permitted - - if linkable(elementName) { - if p.requireParseableURLs { - // Ensure URLs are parseable: - // - a.href - // - area.href - // - link.href - // - blockquote.cite - // - q.cite - // - img.src - // - script.src - tmpAttrs := []html.Attribute{} - for _, htmlAttr := range cleanAttrs { - switch elementName { - case "a", "area", "link": - if htmlAttr.Key == "href" { - if u, ok := p.validURL(htmlAttr.Val); ok { - htmlAttr.Val = u - tmpAttrs = append(tmpAttrs, htmlAttr) - } - break - } - tmpAttrs = append(tmpAttrs, htmlAttr) - case "blockquote", "q": - if htmlAttr.Key == "cite" { - if u, ok := p.validURL(htmlAttr.Val); ok { - htmlAttr.Val = u - tmpAttrs = append(tmpAttrs, htmlAttr) - } - break - } - tmpAttrs = append(tmpAttrs, htmlAttr) - case "img", "script": - if htmlAttr.Key == "src" { - if u, ok := p.validURL(htmlAttr.Val); ok { - htmlAttr.Val = u - tmpAttrs = append(tmpAttrs, htmlAttr) - } - break - } - tmpAttrs = append(tmpAttrs, htmlAttr) - default: - tmpAttrs = append(tmpAttrs, htmlAttr) - } - } - cleanAttrs = tmpAttrs - } - - if (p.requireNoFollow || - p.requireNoFollowFullyQualifiedLinks || - p.addTargetBlankToFullyQualifiedLinks) && - len(cleanAttrs) > 0 { - - // Add rel="nofollow" if a "href" exists - switch elementName { - case "a", "area", "link": - var hrefFound bool - var externalLink bool - for _, htmlAttr := range cleanAttrs { - if htmlAttr.Key == "href" { - hrefFound = true - - u, err := url.Parse(htmlAttr.Val) - if err != nil { - continue - } - if u.Host != "" { - externalLink = true - } - - continue - } - } - - if hrefFound { - var ( - noFollowFound bool - targetBlankFound bool - ) - - addNoFollow := (p.requireNoFollow || - externalLink && p.requireNoFollowFullyQualifiedLinks) - - addTargetBlank := (externalLink && - p.addTargetBlankToFullyQualifiedLinks) - - tmpAttrs := []html.Attribute{} - for _, htmlAttr := range cleanAttrs { - - var appended bool - if htmlAttr.Key == "rel" && addNoFollow { - - if strings.Contains(htmlAttr.Val, "nofollow") { - noFollowFound = true - tmpAttrs = append(tmpAttrs, htmlAttr) - appended = true - } else { - htmlAttr.Val += " nofollow" - noFollowFound = true - tmpAttrs = append(tmpAttrs, htmlAttr) - appended = true - } - } - - if elementName == "a" && htmlAttr.Key == "target" { - if htmlAttr.Val == "_blank" { - targetBlankFound = true - } - if addTargetBlank && !targetBlankFound { - htmlAttr.Val = "_blank" - targetBlankFound = true - tmpAttrs = append(tmpAttrs, htmlAttr) - appended = true - } - } - - if !appended { - tmpAttrs = append(tmpAttrs, htmlAttr) - } - } - if noFollowFound || targetBlankFound { - cleanAttrs = tmpAttrs - } - - if addNoFollow && !noFollowFound { - rel := html.Attribute{} - rel.Key = "rel" - rel.Val = "nofollow" - cleanAttrs = append(cleanAttrs, rel) - } - - if elementName == "a" && addTargetBlank && !targetBlankFound { - rel := html.Attribute{} - rel.Key = "target" - rel.Val = "_blank" - targetBlankFound = true - cleanAttrs = append(cleanAttrs, rel) - } - - if targetBlankFound { - // target="_blank" has a security risk that allows the - // opened window/tab to issue JavaScript calls against - // window.opener, which in effect allow the destination - // of the link to control the source: - // https://dev.to/ben/the-targetblank-vulnerability-by-example - // - // To mitigate this risk, we need to add a specific rel - // attribute if it is not already present. - // rel="noopener" - // - // Unfortunately this is processing the rel twice (we - // already looked at it earlier ^^) as we cannot be sure - // of the ordering of the href and rel, and whether we - // have fully satisfied that we need to do this. This - // double processing only happens *if* target="_blank" - // is true. - var noOpenerAdded bool - tmpAttrs := []html.Attribute{} - for _, htmlAttr := range cleanAttrs { - var appended bool - if htmlAttr.Key == "rel" { - if strings.Contains(htmlAttr.Val, "noopener") { - noOpenerAdded = true - tmpAttrs = append(tmpAttrs, htmlAttr) - } else { - htmlAttr.Val += " noopener" - noOpenerAdded = true - tmpAttrs = append(tmpAttrs, htmlAttr) - } - - appended = true - } - if !appended { - tmpAttrs = append(tmpAttrs, htmlAttr) - } - } - if noOpenerAdded { - cleanAttrs = tmpAttrs - } else { - // rel attr was not found, or else noopener would - // have been added already - rel := html.Attribute{} - rel.Key = "rel" - rel.Val = "noopener" - cleanAttrs = append(cleanAttrs, rel) - } - - } - } - default: - } - } - } - - return cleanAttrs -} - -func (p *Policy) allowNoAttrs(elementName string) bool { - _, ok := p.setOfElementsAllowedWithoutAttrs[elementName] - return ok -} - -func (p *Policy) validURL(rawurl string) (string, bool) { - if p.requireParseableURLs { - // URLs are valid if when space is trimmed the URL is valid - rawurl = strings.TrimSpace(rawurl) - - // URLs cannot contain whitespace, unless it is a data-uri - if (strings.Contains(rawurl, " ") || - strings.Contains(rawurl, "\t") || - strings.Contains(rawurl, "\n")) && - !strings.HasPrefix(rawurl, `data:`) { - return "", false - } - - // URLs are valid if they parse - u, err := url.Parse(rawurl) - if err != nil { - return "", false - } - - if u.Scheme != "" { - - urlPolicy, ok := p.allowURLSchemes[u.Scheme] - if !ok { - return "", false - - } - - if urlPolicy == nil || urlPolicy(u) == true { - return u.String(), true - } - - return "", false - } - - if p.allowRelativeURLs { - if u.String() != "" { - return u.String(), true - } - } - - return "", false - } - - return rawurl, true -} - -func linkable(elementName string) bool { - switch elementName { - case "a", "area", "blockquote", "img", "link", "script": - return true - default: - return false - } -} - -func isDataAttribute(val string) bool { - if !dataAttribute.MatchString(val) { - return false - } - rest := strings.Split(val, "data-") - if len(rest) == 1 { - return false - } - // data-xml* is invalid. - if dataAttributeXMLPrefix.MatchString(rest[1]) { - return false - } - // no uppercase or semi-colons allowed. - if dataAttributeInvalidChars.MatchString(rest[1]) { - return false - } - return true -} diff --git a/deps/github.com/microcosm-cc/bluemonday/sanitize_go1.8_test.go b/deps/github.com/microcosm-cc/bluemonday/sanitize_go1.8_test.go deleted file mode 100644 index a6d00a940..000000000 --- a/deps/github.com/microcosm-cc/bluemonday/sanitize_go1.8_test.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2014, David Kitchen -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the organisation (Microcosm) nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build go1.8 - -package bluemonday - -import ( - "sync" - "testing" -) - -func TestXSSGo18(t *testing.T) { - - p := UGCPolicy() - - tests := []test{ - { - in: ``, - expected: ``, - }, - { - in: "", - expected: ``, - }, - } - - // These tests are run concurrently to enable the race detector to pick up - // potential issues - wg := sync.WaitGroup{} - wg.Add(len(tests)) - for ii, tt := range tests { - go func(ii int, tt test) { - out := p.Sanitize(tt.in) - if out != tt.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - tt.in, - out, - tt.expected, - ) - } - wg.Done() - }(ii, tt) - } - wg.Wait() -} diff --git a/deps/github.com/microcosm-cc/bluemonday/sanitize_ltgo1.8_test.go b/deps/github.com/microcosm-cc/bluemonday/sanitize_ltgo1.8_test.go deleted file mode 100644 index a2000ce42..000000000 --- a/deps/github.com/microcosm-cc/bluemonday/sanitize_ltgo1.8_test.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2014, David Kitchen -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the organisation (Microcosm) nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// +build go1.1,!go1.8 - -package bluemonday - -import ( - "sync" - "testing" -) - -func TestXSSLTGo18(t *testing.T) { - - p := UGCPolicy() - - tests := []test{ - { - in: ``, - expected: ``, - }, - { - in: "", - expected: ``, - }, - } - - // These tests are run concurrently to enable the race detector to pick up - // potential issues - wg := sync.WaitGroup{} - wg.Add(len(tests)) - for ii, tt := range tests { - go func(ii int, tt test) { - out := p.Sanitize(tt.in) - if out != tt.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - tt.in, - out, - tt.expected, - ) - } - wg.Done() - }(ii, tt) - } - wg.Wait() -} diff --git a/deps/github.com/microcosm-cc/bluemonday/sanitize_test.go b/deps/github.com/microcosm-cc/bluemonday/sanitize_test.go deleted file mode 100644 index 85a68b148..000000000 --- a/deps/github.com/microcosm-cc/bluemonday/sanitize_test.go +++ /dev/null @@ -1,1724 +0,0 @@ -// Copyright (c) 2014, David Kitchen -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * Neither the name of the organisation (Microcosm) nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package bluemonday - -import ( - "encoding/base64" - "net/url" - "regexp" - "strings" - "sync" - "testing" -) - -// test is a simple input vs output struct used to construct a slice of many -// tests to run within a single test method. -type test struct { - in string - expected string -} - -func TestEmpty(t *testing.T) { - p := StrictPolicy() - - if "" != p.Sanitize(``) { - t.Error("Empty string is not empty") - } -} - -func TestSignatureBehaviour(t *testing.T) { - // https://github.com/microcosm-cc/bluemonday/issues/8 - p := UGCPolicy() - - input := "Hi.\n" - - if output := p.Sanitize(input); output != input { - t.Errorf(`Sanitize() input = %s, output = %s`, input, output) - } - - if output := string(p.SanitizeBytes([]byte(input))); output != input { - t.Errorf(`SanitizeBytes() input = %s, output = %s`, input, output) - } - - if output := p.SanitizeReader( - strings.NewReader(input), - ).String(); output != input { - - t.Errorf(`SanitizeReader() input = %s, output = %s`, input, output) - } - - input = "\t\n \n\t" - - if output := p.Sanitize(input); output != input { - t.Errorf(`Sanitize() input = %s, output = %s`, input, output) - } - - if output := string(p.SanitizeBytes([]byte(input))); output != input { - t.Errorf(`SanitizeBytes() input = %s, output = %s`, input, output) - } - - if output := p.SanitizeReader( - strings.NewReader(input), - ).String(); output != input { - - t.Errorf(`SanitizeReader() input = %s, output = %s`, input, output) - } -} - -func TestLinks(t *testing.T) { - - tests := []test{ - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `Red dot`, - expected: `Red dot`, - }, - { - in: ``, - expected: ``, - }, - } - - p := UGCPolicy() - p.RequireParseableURLs(true) - - // These tests are run concurrently to enable the race detector to pick up - // potential issues - wg := sync.WaitGroup{} - wg.Add(len(tests)) - for ii, tt := range tests { - go func(ii int, tt test) { - out := p.Sanitize(tt.in) - if out != tt.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - tt.in, - out, - tt.expected, - ) - } - wg.Done() - }(ii, tt) - } - wg.Wait() -} - -func TestLinkTargets(t *testing.T) { - - tests := []test{ - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `Red dot`, - expected: `Red dot`, - }, - { - in: ``, - expected: ``, - }, - } - - p := UGCPolicy() - p.RequireParseableURLs(true) - p.RequireNoFollowOnLinks(false) - p.RequireNoFollowOnFullyQualifiedLinks(true) - p.AddTargetBlankToFullyQualifiedLinks(true) - - // These tests are run concurrently to enable the race detector to pick up - // potential issues - wg := sync.WaitGroup{} - wg.Add(len(tests)) - for ii, tt := range tests { - go func(ii int, tt test) { - out := p.Sanitize(tt.in) - if out != tt.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - tt.in, - out, - tt.expected, - ) - } - wg.Done() - }(ii, tt) - } - wg.Wait() -} - -func TestStyling(t *testing.T) { - - tests := []test{ - { - in: `Hello World`, - expected: `Hello World`, - }, - { - in: `Hello World`, - expected: `Hello World`, - }, - } - - p := UGCPolicy() - p.AllowStyling() - - // These tests are run concurrently to enable the race detector to pick up - // potential issues - wg := sync.WaitGroup{} - wg.Add(len(tests)) - for ii, tt := range tests { - go func(ii int, tt test) { - out := p.Sanitize(tt.in) - if out != tt.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - tt.in, - out, - tt.expected, - ) - } - wg.Done() - }(ii, tt) - } - wg.Wait() -} - -func TestEmptyAttributes(t *testing.T) { - - p := UGCPolicy() - // Do not do this, especially without a Matching() clause, this is a test - p.AllowAttrs("disabled").OnElements("textarea") - - tests := []test{ - // Empty elements - { - in: `` + - `
Styled by span
`, - expected: `` + - `
Styled by span
`, - }, - { - in: `foo
bar`, - expected: `foo
bar`, - }, - { - in: `foo
bar`, - expected: `foo
bar`, - }, - { - in: `foo
bar`, - expected: `foo
bar`, - }, - { - in: `foo
bar`, - expected: `foo
bar`, - }, - } - - for ii, test := range tests { - out := p.Sanitize(test.in) - if out != test.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - test.in, - out, - test.expected, - ) - } - } -} - -func TestDataAttributes(t *testing.T) { - - p := UGCPolicy() - p.AllowDataAttributes() - - tests := []test{ - { - in: `

text

`, - expected: `

text

`, - }, - { - in: `

text

`, - expected: `

text

`, - }, - { - in: `

text

`, - expected: `

text

`, - }, - { - in: `

text

`, - expected: `

text

`, - }, - } - - for ii, test := range tests { - out := p.Sanitize(test.in) - if out != test.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - test.in, - out, - test.expected, - ) - } - } -} - -func TestDataUri(t *testing.T) { - - p := UGCPolicy() - p.AllowURLSchemeWithCustomPolicy( - "data", - func(url *url.URL) (allowUrl bool) { - // Allows PNG images only - const prefix = "image/png;base64," - if !strings.HasPrefix(url.Opaque, prefix) { - return false - } - if _, err := base64.StdEncoding.DecodeString(url.Opaque[len(prefix):]); err != nil { - return false - } - if url.RawQuery != "" || url.Fragment != "" { - return false - } - return true - }, - ) - - tests := []test{ - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - } - - for ii, test := range tests { - out := p.Sanitize(test.in) - if out != test.expected { - t.Errorf( - "test %d failed;\ninput : %s\noutput : %s\nexpected: %s", - ii, - test.in, - out, - test.expected, - ) - } - } -} - -func TestAntiSamy(t *testing.T) { - - standardUrls := regexp.MustCompile(`(?i)^https?|mailto`) - - p := NewPolicy() - - p.AllowElements( - "a", "b", "br", "div", "font", "i", "img", "input", "li", "ol", "p", - "span", "td", "ul", - ) - p.AllowAttrs("checked", "type").OnElements("input") - p.AllowAttrs("color").OnElements("font") - p.AllowAttrs("href").Matching(standardUrls).OnElements("a") - p.AllowAttrs("src").Matching(standardUrls).OnElements("img") - p.AllowAttrs("class", "id", "title").Globally() - p.AllowAttrs("char").Matching( - regexp.MustCompile(`p{L}`), // Single character or HTML entity only - ).OnElements("td") - - tests := []test{ - // Base64 strings - // - // first string is - //
click here - { - in: `PGEgLSBocmVmPSJodHRwOi8vd3d3Lm93YXNwLm9yZyI+Y2xpY2sgaGVyZTwvYT4=`, - expected: `PGEgLSBocmVmPSJodHRwOi8vd3d3Lm93YXNwLm9yZyI+Y2xpY2sgaGVyZTwvYT4=`, - }, - // the rest are randomly generated 300 byte sequences which generate - // parser errors, turned into Strings - { - in: `uz0sEy5aDiok6oufQRaYPyYOxbtlACRnfrOnUVIbOstiaoB95iw+dJYuO5sI9nudhRtSYLANlcdgO0pRb+65qKDwZ5o6GJRMWv4YajZk+7Q3W/GN295XmyWUpxuyPGVi7d5fhmtYaYNW6vxyKK1Wjn9IEhIrfvNNjtEF90vlERnz3wde4WMaKMeciqgDXuZHE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q8g/iGXlaaAcQ0t9Gy+y005Z9wpr2JWWzishL+1JZp9D4SY/r3NHDphN4MNdLHMNBRPSIgfsaSqfLraIt+zWIycsd+nksVxtPv9wcyXy51E1qlHr6Uygz2VZYD9q9zyxEX4wRP2VEewHYUomL9d1F6gGG5fN3z82bQ4hI9uDirWhneWazUOQBRud5otPOm9`, - }, - { - in: `C3c+d5Q9lyTafPLdelG1TKaLFinw1TOjyI6KkrQyHKkttfnO58WFvScl1TiRcB/iHxKahskoE2+VRLUIhctuDU4sUvQh/g9Arw0LAA4QTxuLFt01XYdigurz4FT15ox2oDGGGrRb3VGjDTXK1OWVJoLMW95EVqyMc9F+Fdej85LHE+8WesIfacjUQtTG1tzYVQTfubZq0+qxXws8QrxMLFtVE38tbeXo+Ok1/U5TUa6FjWflEfvKY3XVcl8RKkXua7fVz/Blj8Gh+dWe2cOxa0lpM75ZHyz9adQrB2Pb4571E4u2xI5un0R0MFJZBQuPDc1G5rPhyk+Hb4LRG3dS0m8IASQUOskv93z978L1+Abu9CLP6d6s5p+BzWxhMUqwQXC/CCpTywrkJ0RG`, - expected: `C3c+d5Q9lyTafPLdelG1TKaLFinw1TOjyI6KkrQyHKkttfnO58WFvScl1TiRcB/iHxKahskoE2+VRLUIhctuDU4sUvQh/g9Arw0LAA4QTxuLFt01XYdigurz4FT15ox2oDGGGrRb3VGjDTXK1OWVJoLMW95EVqyMc9F+Fdej85LHE+8WesIfacjUQtTG1tzYVQTfubZq0+qxXws8QrxMLFtVE38tbeXo+Ok1/U5TUa6FjWflEfvKY3XVcl8RKkXua7fVz/Blj8Gh+dWe2cOxa0lpM75ZHyz9adQrB2Pb4571E4u2xI5un0R0MFJZBQuPDc1G5rPhyk+Hb4LRG3dS0m8IASQUOskv93z978L1+Abu9CLP6d6s5p+BzWxhMUqwQXC/CCpTywrkJ0RG`, - }, - // Basic XSS - { - in: `test`, - expected: `test`, - }, - { - in: `<<<><`, - expected: ``, - }, - { - in: "", - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `
`, - expected: ``, - }, - { - in: `
`, - expected: ``, - }, - { - in: `
`, - expected: `
`, - }, - { - in: `
`, - expected: `
`, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: "", - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `PT SRC="http://ha.ckers.org/xss.js">`, - expected: `PT SRC="http://ha.ckers.org/xss.js">`, - }, - { - in: `PT SRC="http://ha.ckers.org/xss.js">`, - expected: `PT SRC="http://ha.ckers.org/xss.js">`, - }, - { - in: ``, - expected: ``, - }, - { - in: "", - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ` +ADw-SCRIPT+AD4-alert('XSS')`, - expected: ` +ADw-SCRIPT+AD4-alert('XSS')`, - }, - { - in: ``, - expected: ``, - }, - { - in: `alert("XSS")'); ?>`, - expected: `alert("XSS")'); ?>`, - }, - { - in: ``, - expected: ``, - }, - { - in: ` - - -"> -`, - expected: "\n\n\n">\n", - }, - { - in: ` -`, - expected: ` -`, - }, - { - in: ` -`, - expected: ` -`, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `
`, - expected: `
`, - }, - { - in: `
`, - expected: `
`, - }, - { - in: `
`, - expected: `
`, - }, - { - in: `
`, - expected: `
`, - }, - { - in: `
`, - expected: `

-#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end tag (strong) in table context caused voodoo mode. -Line: 1 Col: 20 End tag (strong) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 24 Unexpected end tag (b) in table context caused voodoo mode. -Line: 1 Col: 24 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 29 Unexpected end tag (em) in table context caused voodoo mode. -Line: 1 Col: 29 End tag (em) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 33 Unexpected end tag (i) in table context caused voodoo mode. -Line: 1 Col: 33 End tag (i) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 37 Unexpected end tag (u) in table context caused voodoo mode. -Line: 1 Col: 37 End tag (u) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 46 Unexpected end tag (strike) in table context caused voodoo mode. -Line: 1 Col: 46 End tag (strike) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 50 Unexpected end tag (s) in table context caused voodoo mode. -Line: 1 Col: 50 End tag (s) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 58 Unexpected end tag (blink) in table context caused voodoo mode. -Line: 1 Col: 58 Unexpected end tag (blink). Ignored. -Line: 1 Col: 63 Unexpected end tag (tt) in table context caused voodoo mode. -Line: 1 Col: 63 End tag (tt) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 69 Unexpected end tag (pre) in table context caused voodoo mode. -Line: 1 Col: 69 End tag (pre) seen too early. Expected other end tag. -Line: 1 Col: 75 Unexpected end tag (big) in table context caused voodoo mode. -Line: 1 Col: 75 End tag (big) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 83 Unexpected end tag (small) in table context caused voodoo mode. -Line: 1 Col: 83 End tag (small) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 90 Unexpected end tag (font) in table context caused voodoo mode. -Line: 1 Col: 90 End tag (font) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 99 Unexpected end tag (select) in table context caused voodoo mode. -Line: 1 Col: 99 Unexpected end tag (select). Ignored. -Line: 1 Col: 104 Unexpected end tag (h1) in table context caused voodoo mode. -Line: 1 Col: 104 End tag (h1) seen too early. Expected other end tag. -Line: 1 Col: 109 Unexpected end tag (h2) in table context caused voodoo mode. -Line: 1 Col: 109 End tag (h2) seen too early. Expected other end tag. -Line: 1 Col: 114 Unexpected end tag (h3) in table context caused voodoo mode. -Line: 1 Col: 114 End tag (h3) seen too early. Expected other end tag. -Line: 1 Col: 119 Unexpected end tag (h4) in table context caused voodoo mode. -Line: 1 Col: 119 End tag (h4) seen too early. Expected other end tag. -Line: 1 Col: 124 Unexpected end tag (h5) in table context caused voodoo mode. -Line: 1 Col: 124 End tag (h5) seen too early. Expected other end tag. -Line: 1 Col: 129 Unexpected end tag (h6) in table context caused voodoo mode. -Line: 1 Col: 129 End tag (h6) seen too early. Expected other end tag. -Line: 1 Col: 136 Unexpected end tag (body) in the table row phase. Ignored. -Line: 1 Col: 141 Unexpected end tag (br) in table context caused voodoo mode. -Line: 1 Col: 141 Unexpected end tag (br). Treated as br element. -Line: 1 Col: 145 Unexpected end tag (a) in table context caused voodoo mode. -Line: 1 Col: 145 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 151 Unexpected end tag (img) in table context caused voodoo mode. -Line: 1 Col: 151 This element (img) has no end tag. -Line: 1 Col: 159 Unexpected end tag (title) in table context caused voodoo mode. -Line: 1 Col: 159 Unexpected end tag (title). Ignored. -Line: 1 Col: 166 Unexpected end tag (span) in table context caused voodoo mode. -Line: 1 Col: 166 Unexpected end tag (span). Ignored. -Line: 1 Col: 174 Unexpected end tag (style) in table context caused voodoo mode. -Line: 1 Col: 174 Unexpected end tag (style). Ignored. -Line: 1 Col: 183 Unexpected end tag (script) in table context caused voodoo mode. -Line: 1 Col: 183 Unexpected end tag (script). Ignored. -Line: 1 Col: 196 Unexpected end tag (th). Ignored. -Line: 1 Col: 201 Unexpected end tag (td). Ignored. -Line: 1 Col: 206 Unexpected end tag (tr). Ignored. -Line: 1 Col: 214 This element (frame) has no end tag. -Line: 1 Col: 221 This element (area) has no end tag. -Line: 1 Col: 228 Unexpected end tag (link). Ignored. -Line: 1 Col: 236 This element (param) has no end tag. -Line: 1 Col: 241 This element (hr) has no end tag. -Line: 1 Col: 249 This element (input) has no end tag. -Line: 1 Col: 255 Unexpected end tag (col). Ignored. -Line: 1 Col: 262 Unexpected end tag (base). Ignored. -Line: 1 Col: 269 Unexpected end tag (meta). Ignored. -Line: 1 Col: 280 This element (basefont) has no end tag. -Line: 1 Col: 290 This element (bgsound) has no end tag. -Line: 1 Col: 298 This element (embed) has no end tag. -Line: 1 Col: 307 This element (spacer) has no end tag. -Line: 1 Col: 311 Unexpected end tag (p). Ignored. -Line: 1 Col: 316 End tag (dd) seen too early. Expected other end tag. -Line: 1 Col: 321 End tag (dt) seen too early. Expected other end tag. -Line: 1 Col: 331 Unexpected end tag (caption). Ignored. -Line: 1 Col: 342 Unexpected end tag (colgroup). Ignored. -Line: 1 Col: 350 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 358 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 366 Unexpected end tag (thead). Ignored. -Line: 1 Col: 376 End tag (address) seen too early. Expected other end tag. -Line: 1 Col: 389 End tag (blockquote) seen too early. Expected other end tag. -Line: 1 Col: 398 End tag (center) seen too early. Expected other end tag. -Line: 1 Col: 404 Unexpected end tag (dir). Ignored. -Line: 1 Col: 410 End tag (div) seen too early. Expected other end tag. -Line: 1 Col: 415 End tag (dl) seen too early. Expected other end tag. -Line: 1 Col: 426 End tag (fieldset) seen too early. Expected other end tag. -Line: 1 Col: 436 End tag (listing) seen too early. Expected other end tag. -Line: 1 Col: 443 End tag (menu) seen too early. Expected other end tag. -Line: 1 Col: 448 End tag (ol) seen too early. Expected other end tag. -Line: 1 Col: 453 End tag (ul) seen too early. Expected other end tag. -Line: 1 Col: 458 End tag (li) seen too early. Expected other end tag. -Line: 1 Col: 465 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 471 This element (wbr) has no end tag. -Line: 1 Col: 487 End tag (button) seen too early. Expected other end tag. -Line: 1 Col: 497 End tag (marquee) seen too early. Expected other end tag. -Line: 1 Col: 506 End tag (object) seen too early. Expected other end tag. -Line: 1 Col: 524 Unexpected end tag (html). Ignored. -Line: 1 Col: 524 Unexpected end tag (frameset). Ignored. -Line: 1 Col: 531 Unexpected end tag (head). Ignored. -Line: 1 Col: 540 Unexpected end tag (iframe). Ignored. -Line: 1 Col: 548 This element (image) has no end tag. -Line: 1 Col: 558 This element (isindex) has no end tag. -Line: 1 Col: 568 Unexpected end tag (noembed). Ignored. -Line: 1 Col: 579 Unexpected end tag (noframes). Ignored. -Line: 1 Col: 590 Unexpected end tag (noscript). Ignored. -Line: 1 Col: 601 Unexpected end tag (optgroup). Ignored. -Line: 1 Col: 610 Unexpected end tag (option). Ignored. -Line: 1 Col: 622 Unexpected end tag (plaintext). Ignored. -Line: 1 Col: 633 Unexpected end tag (textarea). Ignored. -#document -| -| -| -|
-|
`, - }, - { - in: ``, - expected: `
`, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `
`, - expected: `
`, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `
  • XSS
    `, - expected: `
    • XSS
      `, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: ``, - expected: ``, - }, - { - in: `\";alert('XSS');//`, - expected: `\";alert('XSS');//`, - }, - { - in: ` -#errors -Line: 1 Col: 9 Unexpected end tag (strong). Expected DOCTYPE. -Line: 1 Col: 9 Unexpected end tag (strong) after the (implied) root element. -Line: 1 Col: 13 Unexpected end tag (b) after the (implied) root element. -Line: 1 Col: 18 Unexpected end tag (em) after the (implied) root element. -Line: 1 Col: 22 Unexpected end tag (i) after the (implied) root element. -Line: 1 Col: 26 Unexpected end tag (u) after the (implied) root element. -Line: 1 Col: 35 Unexpected end tag (strike) after the (implied) root element. -Line: 1 Col: 39 Unexpected end tag (s) after the (implied) root element. -Line: 1 Col: 47 Unexpected end tag (blink) after the (implied) root element. -Line: 1 Col: 52 Unexpected end tag (tt) after the (implied) root element. -Line: 1 Col: 58 Unexpected end tag (pre) after the (implied) root element. -Line: 1 Col: 64 Unexpected end tag (big) after the (implied) root element. -Line: 1 Col: 72 Unexpected end tag (small) after the (implied) root element. -Line: 1 Col: 79 Unexpected end tag (font) after the (implied) root element. -Line: 1 Col: 88 Unexpected end tag (select) after the (implied) root element. -Line: 1 Col: 93 Unexpected end tag (h1) after the (implied) root element. -Line: 1 Col: 98 Unexpected end tag (h2) after the (implied) root element. -Line: 1 Col: 103 Unexpected end tag (h3) after the (implied) root element. -Line: 1 Col: 108 Unexpected end tag (h4) after the (implied) root element. -Line: 1 Col: 113 Unexpected end tag (h5) after the (implied) root element. -Line: 1 Col: 118 Unexpected end tag (h6) after the (implied) root element. -Line: 1 Col: 125 Unexpected end tag (body) after the (implied) root element. -Line: 1 Col: 130 Unexpected end tag (br). Treated as br element. -Line: 1 Col: 134 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 140 This element (img) has no end tag. -Line: 1 Col: 148 Unexpected end tag (title). Ignored. -Line: 1 Col: 155 Unexpected end tag (span). Ignored. -Line: 1 Col: 163 Unexpected end tag (style). Ignored. -Line: 1 Col: 172 Unexpected end tag (script). Ignored. -Line: 1 Col: 180 Unexpected end tag (table). Ignored. -Line: 1 Col: 185 Unexpected end tag (th). Ignored. -Line: 1 Col: 190 Unexpected end tag (td). Ignored. -Line: 1 Col: 195 Unexpected end tag (tr). Ignored. -Line: 1 Col: 203 This element (frame) has no end tag. -Line: 1 Col: 210 This element (area) has no end tag. -Line: 1 Col: 217 Unexpected end tag (link). Ignored. -Line: 1 Col: 225 This element (param) has no end tag. -Line: 1 Col: 230 This element (hr) has no end tag. -Line: 1 Col: 238 This element (input) has no end tag. -Line: 1 Col: 244 Unexpected end tag (col). Ignored. -Line: 1 Col: 251 Unexpected end tag (base). Ignored. -Line: 1 Col: 258 Unexpected end tag (meta). Ignored. -Line: 1 Col: 269 This element (basefont) has no end tag. -Line: 1 Col: 279 This element (bgsound) has no end tag. -Line: 1 Col: 287 This element (embed) has no end tag. -Line: 1 Col: 296 This element (spacer) has no end tag. -Line: 1 Col: 300 Unexpected end tag (p). Ignored. -Line: 1 Col: 305 End tag (dd) seen too early. Expected other end tag. -Line: 1 Col: 310 End tag (dt) seen too early. Expected other end tag. -Line: 1 Col: 320 Unexpected end tag (caption). Ignored. -Line: 1 Col: 331 Unexpected end tag (colgroup). Ignored. -Line: 1 Col: 339 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 347 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 355 Unexpected end tag (thead). Ignored. -Line: 1 Col: 365 End tag (address) seen too early. Expected other end tag. -Line: 1 Col: 378 End tag (blockquote) seen too early. Expected other end tag. -Line: 1 Col: 387 End tag (center) seen too early. Expected other end tag. -Line: 1 Col: 393 Unexpected end tag (dir). Ignored. -Line: 1 Col: 399 End tag (div) seen too early. Expected other end tag. -Line: 1 Col: 404 End tag (dl) seen too early. Expected other end tag. -Line: 1 Col: 415 End tag (fieldset) seen too early. Expected other end tag. -Line: 1 Col: 425 End tag (listing) seen too early. Expected other end tag. -Line: 1 Col: 432 End tag (menu) seen too early. Expected other end tag. -Line: 1 Col: 437 End tag (ol) seen too early. Expected other end tag. -Line: 1 Col: 442 End tag (ul) seen too early. Expected other end tag. -Line: 1 Col: 447 End tag (li) seen too early. Expected other end tag. -Line: 1 Col: 454 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 460 This element (wbr) has no end tag. -Line: 1 Col: 476 End tag (button) seen too early. Expected other end tag. -Line: 1 Col: 486 End tag (marquee) seen too early. Expected other end tag. -Line: 1 Col: 495 End tag (object) seen too early. Expected other end tag. -Line: 1 Col: 513 Unexpected end tag (html). Ignored. -Line: 1 Col: 513 Unexpected end tag (frameset). Ignored. -Line: 1 Col: 520 Unexpected end tag (head). Ignored. -Line: 1 Col: 529 Unexpected end tag (iframe). Ignored. -Line: 1 Col: 537 This element (image) has no end tag. -Line: 1 Col: 547 This element (isindex) has no end tag. -Line: 1 Col: 557 Unexpected end tag (noembed). Ignored. -Line: 1 Col: 568 Unexpected end tag (noframes). Ignored. -Line: 1 Col: 579 Unexpected end tag (noscript). Ignored. -Line: 1 Col: 590 Unexpected end tag (optgroup). Ignored. -Line: 1 Col: 599 Unexpected end tag (option). Ignored. -Line: 1 Col: 611 Unexpected end tag (plaintext). Ignored. -Line: 1 Col: 622 Unexpected end tag (textarea). Ignored. -#document -| -| -| -|
      -|

      - -#data -


-| -| -|

- -#data - -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 1 Col: 10 Expected closing tag. Unexpected end of file. -#document -| -| -| diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests10.dat b/deps/golang.org/x/net/html/testdata/webkit/tests10.dat deleted file mode 100644 index 4f8df86f2..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests10.dat +++ /dev/null @@ -1,799 +0,0 @@ -#data - -#errors -#document -| -| -| -| -| - -#data -a -#errors -29: Bogus comment -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| - -#data - -#errors -35: Stray “svg” start tag. -42: Stray end tag “svg” -#document -| -| -| -| -| -#errors -43: Stray “svg” start tag. -50: Stray end tag “svg” -#document -| -| -| -| -|

-#errors -34: Start tag “svg” seen in “table”. -41: Stray end tag “svg”. -#document -| -| -| -| -| -| - -#data -
foo
-#errors -34: Start tag “svg” seen in “table”. -46: Stray end tag “g”. -53: Stray end tag “svg”. -#document -| -| -| -| -| -| -| "foo" -| - -#data -
foobar
-#errors -34: Start tag “svg” seen in “table”. -46: Stray end tag “g”. -58: Stray end tag “g”. -65: Stray end tag “svg”. -#document -| -| -| -| -| -| -| "foo" -| -| "bar" -| - -#data -
foobar
-#errors -41: Start tag “svg” seen in “table”. -53: Stray end tag “g”. -65: Stray end tag “g”. -72: Stray end tag “svg”. -#document -| -| -| -| -| -| -| "foo" -| -| "bar" -| -| - -#data -
foobar
-#errors -45: Start tag “svg” seen in “table”. -57: Stray end tag “g”. -69: Stray end tag “g”. -76: Stray end tag “svg”. -#document -| -| -| -| -| -| -| "foo" -| -| "bar" -| -| -| - -#data -
foobar
-#errors -#document -| -| -| -| -| -| -| -|
-| -| -| "foo" -| -| "bar" - -#data -
foobar

baz

-#errors -#document -| -| -| -| -| -| -| -| \x0a\x09\x09\x0a\x09\x09{{$file}}:\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09{{len\x20.Lines}}\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09{{range\x20.Lines}}\x0a\x09\x09\x09{{html\x20.}}\x0a\x09\x09{{end}}\x0a\x09\x09{{if\x20not\x20$.Complete}}\x0a\x09\x09\x09...\x0a\x09\x09{{end}}\x0a\x09\x09\x0a\x09\x09\x0a\x09{{end}}\x0a\x09{{if\x20not\x20$.Complete}}\x0a\x09\x09...\x0a\x09{{end}}\x0a\x09
-| -| -| "foo" -| -| "bar" -|

-| "baz" - -#data -
foobar

baz

-#errors -#document -| -| -| -| -| -| \x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09{{index\x20.\x200\x20|\x20infoKind_html}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09
-| -| -| "foo" -| -| "bar" -|

-| "baz" - -#data -
foobar

baz

quux -#errors -70: HTML start tag “p” in a foreign namespace context. -81: “table” closed but “caption” was still open. -#document -| -| -| -| -| -| \x0a\x09\x09{{end}}\x0a\x09\x09
-| -| -| "foo" -| -| "bar" -|

-| "baz" -|

-| "quux" - -#data -
foobarbaz

quux -#errors -78: “table” closed but “caption” was still open. -78: Unclosed elements on stack. -#document -| -| -| -| -| -| ').appendTo(tocTable);\x0a\x20\x20var\x20tocRow\x20=\x20$('').appendTo(tocBody);\x0a\x0a\x20\x20//\x201st\x20column\x0a\x20\x20$('').appendTo(tocRow).append(dl1);\x0a\x20\x20//\x202nd\x20column\x0a\x20\x20$(']\",\"i\"),bv=/^(?:checkbox|radio)$/,bw=/checked\\s*(?:[^=]|=\\s*.checked.)/i,bx=/\\/(java|ecma)script/i,by=/^\\s*\\s*$/g,bz={option:[1,\"\",\"\"],legend:[1,\"
\",\"
\"],thead:[1,\"
-| -| -| "foo" -| -| "bar" -| "baz" -|

-| "quux" - -#data -foobar

baz

quux -#errors -44: Start tag “svg” seen in “table”. -56: Stray end tag “g”. -68: Stray end tag “g”. -71: HTML start tag “p” in a foreign namespace context. -71: Start tag “p” seen in “table”. -#document -| -| -| -| -| -| -| "foo" -| -| "bar" -|

-| "baz" -| -| -|

-| "quux" - -#data -

quux -#errors -50: Stray “svg” start tag. -54: Stray “g” start tag. -62: Stray end tag “g” -66: Stray “g” start tag. -74: Stray end tag “g” -77: Stray “p” start tag. -88: “table” end tag with “select” open. -#document -| -| -| -| -| -| -| -| \x0a\x09File\x0a\x09 \x0a\x09Bytes\x0a\x09 \x0a\x09Modified\x0a\x0a\x0a\x09\x0a\x0a{{range\x20.}}\x0a\x0a\x09{{$name_html\x20:=\x20fileInfoName\x20.\x20|\x20html}}\x0a\x09{{$name_html}}\x0a\x09\x0a\x09{{html\x20.Size}}\x0a\x09\x0a\x09{{fileInfoTime\x20.\x20|\x20html}}\x0a\x0a{{end}}\x0a\x0a
-|

quux -#errors -36: Start tag “select” seen in “table”. -42: Stray “svg” start tag. -46: Stray “g” start tag. -54: Stray end tag “g” -58: Stray “g” start tag. -66: Stray end tag “g” -69: Stray “p” start tag. -80: “table” end tag with “select” open. -#document -| -| -| -| -| -|

-| "quux" - -#data -foobar

baz -#errors -41: Stray “svg” start tag. -68: HTML start tag “p” in a foreign namespace context. -#document -| -| -| -| -| -| -| "foo" -| -| "bar" -|

-| "baz" - -#data -foobar

baz -#errors -34: Stray “svg” start tag. -61: HTML start tag “p” in a foreign namespace context. -#document -| -| -| -| -| -| -| "foo" -| -| "bar" -|

-| "baz" - -#data -

-#errors -31: Stray “svg” start tag. -35: Stray “g” start tag. -40: Stray end tag “g” -44: Stray “g” start tag. -49: Stray end tag “g” -52: Stray “p” start tag. -58: Stray “span” start tag. -58: End of file seen and there were open elements. -#document -| -| -| -| - -#data -

-#errors -42: Stray “svg” start tag. -46: Stray “g” start tag. -51: Stray end tag “g” -55: Stray “g” start tag. -60: Stray end tag “g” -63: Stray “p” start tag. -69: Stray “span” start tag. -#document -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| xlink:href="foo" -| -| xlink href="foo" - -#data - -#errors -#document -| -| -| -| -| xlink:href="foo" -| xml:lang="en" -| -| -| xlink href="foo" -| xml lang="en" - -#data - -#errors -#document -| -| -| -| -| xlink:href="foo" -| xml:lang="en" -| -| -| xlink href="foo" -| xml lang="en" - -#data -bar -#errors -#document -| -| -| -| -| xlink:href="foo" -| xml:lang="en" -| -| -| xlink href="foo" -| xml lang="en" -| "bar" - -#data - -#errors -#document -| -| -| -| - -#data -

a -#errors -#document -| -| -| -|
-| -| "a" - -#data -
a -#errors -#document -| -| -| -|
-| -| -| "a" - -#data -
-#errors -#document -| -| -| -|
-| -| -| - -#data -
a -#errors -#document -| -| -| -|
-| -| -| -| -| "a" - -#data -

a -#errors -#document -| -| -| -|

-| -| -| -|

-| "a" - -#data -
    a -#errors -40: HTML start tag “ul” in a foreign namespace context. -41: End of file in a foreign namespace context. -#document -| -| -| -| -| -| -|
    -| -|
      -| "a" - -#data -
        a -#errors -35: HTML start tag “ul” in a foreign namespace context. -36: End of file in a foreign namespace context. -#document -| -| -| -| -| -| -| -|
          -| "a" - -#data -

          -#errors -#document -| -| -| -| -|

          -| -| -|

          - -#data -

          -#errors -#document -| -| -| -| -|

          -| -| -|

          - -#data -

          -#errors -#document -| -| -| -|

          -| -| -| -|

          -|

          - -#data -
          -#errors -#document -| -| -| -| -| -|
          -| -|
          -| -| - -#data -
          -#errors -#document -| -| -| -| -| -| -| -|
          -|
          -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data -

-#errors -#document -| -| -| -| -|
-| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| -| - -#data -
-#errors -#document -| -| -| -| -| -| -| -|
-| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| -| -| -| -| -| -| -| -| diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests11.dat b/deps/golang.org/x/net/html/testdata/webkit/tests11.dat deleted file mode 100644 index 638cde479..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests11.dat +++ /dev/null @@ -1,482 +0,0 @@ -#data - -#errors -#document -| -| -| -| -| -| attributeName="" -| attributeType="" -| baseFrequency="" -| baseProfile="" -| calcMode="" -| clipPathUnits="" -| contentScriptType="" -| contentStyleType="" -| diffuseConstant="" -| edgeMode="" -| externalResourcesRequired="" -| filterRes="" -| filterUnits="" -| glyphRef="" -| gradientTransform="" -| gradientUnits="" -| kernelMatrix="" -| kernelUnitLength="" -| keyPoints="" -| keySplines="" -| keyTimes="" -| lengthAdjust="" -| limitingConeAngle="" -| markerHeight="" -| markerUnits="" -| markerWidth="" -| maskContentUnits="" -| maskUnits="" -| numOctaves="" -| pathLength="" -| patternContentUnits="" -| patternTransform="" -| patternUnits="" -| pointsAtX="" -| pointsAtY="" -| pointsAtZ="" -| preserveAlpha="" -| preserveAspectRatio="" -| primitiveUnits="" -| refX="" -| refY="" -| repeatCount="" -| repeatDur="" -| requiredExtensions="" -| requiredFeatures="" -| specularConstant="" -| specularExponent="" -| spreadMethod="" -| startOffset="" -| stdDeviation="" -| stitchTiles="" -| surfaceScale="" -| systemLanguage="" -| tableValues="" -| targetX="" -| targetY="" -| textLength="" -| viewBox="" -| viewTarget="" -| xChannelSelector="" -| yChannelSelector="" -| zoomAndPan="" - -#data - -#errors -#document -| -| -| -| -| -| attributeName="" -| attributeType="" -| baseFrequency="" -| baseProfile="" -| calcMode="" -| clipPathUnits="" -| contentScriptType="" -| contentStyleType="" -| diffuseConstant="" -| edgeMode="" -| externalResourcesRequired="" -| filterRes="" -| filterUnits="" -| glyphRef="" -| gradientTransform="" -| gradientUnits="" -| kernelMatrix="" -| kernelUnitLength="" -| keyPoints="" -| keySplines="" -| keyTimes="" -| lengthAdjust="" -| limitingConeAngle="" -| markerHeight="" -| markerUnits="" -| markerWidth="" -| maskContentUnits="" -| maskUnits="" -| numOctaves="" -| pathLength="" -| patternContentUnits="" -| patternTransform="" -| patternUnits="" -| pointsAtX="" -| pointsAtY="" -| pointsAtZ="" -| preserveAlpha="" -| preserveAspectRatio="" -| primitiveUnits="" -| refX="" -| refY="" -| repeatCount="" -| repeatDur="" -| requiredExtensions="" -| requiredFeatures="" -| specularConstant="" -| specularExponent="" -| spreadMethod="" -| startOffset="" -| stdDeviation="" -| stitchTiles="" -| surfaceScale="" -| systemLanguage="" -| tableValues="" -| targetX="" -| targetY="" -| textLength="" -| viewBox="" -| viewTarget="" -| xChannelSelector="" -| yChannelSelector="" -| zoomAndPan="" - -#data - -#errors -#document -| -| -| -| -| -| attributeName="" -| attributeType="" -| baseFrequency="" -| baseProfile="" -| calcMode="" -| clipPathUnits="" -| contentScriptType="" -| contentStyleType="" -| diffuseConstant="" -| edgeMode="" -| externalResourcesRequired="" -| filterRes="" -| filterUnits="" -| glyphRef="" -| gradientTransform="" -| gradientUnits="" -| kernelMatrix="" -| kernelUnitLength="" -| keyPoints="" -| keySplines="" -| keyTimes="" -| lengthAdjust="" -| limitingConeAngle="" -| markerHeight="" -| markerUnits="" -| markerWidth="" -| maskContentUnits="" -| maskUnits="" -| numOctaves="" -| pathLength="" -| patternContentUnits="" -| patternTransform="" -| patternUnits="" -| pointsAtX="" -| pointsAtY="" -| pointsAtZ="" -| preserveAlpha="" -| preserveAspectRatio="" -| primitiveUnits="" -| refX="" -| refY="" -| repeatCount="" -| repeatDur="" -| requiredExtensions="" -| requiredFeatures="" -| specularConstant="" -| specularExponent="" -| spreadMethod="" -| startOffset="" -| stdDeviation="" -| stitchTiles="" -| surfaceScale="" -| systemLanguage="" -| tableValues="" -| targetX="" -| targetY="" -| textLength="" -| viewBox="" -| viewTarget="" -| xChannelSelector="" -| yChannelSelector="" -| zoomAndPan="" - -#data - -#errors -#document -| -| -| -| -| -| attributename="" -| attributetype="" -| basefrequency="" -| baseprofile="" -| calcmode="" -| clippathunits="" -| contentscripttype="" -| contentstyletype="" -| diffuseconstant="" -| edgemode="" -| externalresourcesrequired="" -| filterres="" -| filterunits="" -| glyphref="" -| gradienttransform="" -| gradientunits="" -| kernelmatrix="" -| kernelunitlength="" -| keypoints="" -| keysplines="" -| keytimes="" -| lengthadjust="" -| limitingconeangle="" -| markerheight="" -| markerunits="" -| markerwidth="" -| maskcontentunits="" -| maskunits="" -| numoctaves="" -| pathlength="" -| patterncontentunits="" -| patterntransform="" -| patternunits="" -| pointsatx="" -| pointsaty="" -| pointsatz="" -| preservealpha="" -| preserveaspectratio="" -| primitiveunits="" -| refx="" -| refy="" -| repeatcount="" -| repeatdur="" -| requiredextensions="" -| requiredfeatures="" -| specularconstant="" -| specularexponent="" -| spreadmethod="" -| startoffset="" -| stddeviation="" -| stitchtiles="" -| surfacescale="" -| systemlanguage="" -| tablevalues="" -| targetx="" -| targety="" -| textlength="" -| viewbox="" -| viewtarget="" -| xchannelselector="" -| ychannelselector="" -| zoomandpan="" - -#data - -#errors -#document -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests12.dat b/deps/golang.org/x/net/html/testdata/webkit/tests12.dat deleted file mode 100644 index 63107d277..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests12.dat +++ /dev/null @@ -1,62 +0,0 @@ -#data -

foobazeggs

spam

quuxbar -#errors -#document -| -| -| -| -|

-| "foo" -| -| -| -| "baz" -| -| -| -| -| "eggs" -| -| -|

-| "spam" -| -| -| -| \x0a\x09{{$name_html\x20:=\x20html\x20.Name}}\x0a\x09\x0a\x09 \x0a\x09\x0a\x0a{{end}}\x0a
-| -| -| "quux" -| "bar" - -#data -foobazeggs

spam
quuxbar -#errors -#document -| -| -| -| -| "foo" -| -| -| -| "baz" -| -| -| -| -| "eggs" -| -| -|

-| "spam" -| -| -| -|
-| -| -| "quux" -| "bar" diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests14.dat b/deps/golang.org/x/net/html/testdata/webkit/tests14.dat deleted file mode 100644 index b8713f885..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests14.dat +++ /dev/null @@ -1,74 +0,0 @@ -#data - -#errors -#document -| -| -| -| -| - -#data - -#errors -#document -| -| -| -| -| -| - -#data - -#errors -15: Unexpected start tag html -#document -| -| -| abc:def="gh" -| -| -| - -#data - -#errors -15: Unexpected start tag html -#document -| -| -| xml:lang="bar" -| -| - -#data - -#errors -#document -| -| -| 123="456" -| -| - -#data - -#errors -#document -| -| -| 123="456" -| 789="012" -| -| - -#data - -#errors -#document -| -| -| -| -| 789="012" diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests15.dat b/deps/golang.org/x/net/html/testdata/webkit/tests15.dat deleted file mode 100644 index 6ce1c0d16..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests15.dat +++ /dev/null @@ -1,208 +0,0 @@ -#data -

X -#errors -Line: 1 Col: 31 Unexpected end tag (p). Ignored. -Line: 1 Col: 36 Expected closing tag. Unexpected end of file. -#document -| -| -| -| -|

-| -| -| -| -| -| -| " " -|

-| "X" - -#data -

-

X -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected end tag (p). Ignored. -Line: 2 Col: 4 Expected closing tag. Unexpected end of file. -#document -| -| -| -|

-| -| -| -| -| -| -| " -" -|

-| "X" - -#data - -#errors -Line: 1 Col: 22 Unexpected end tag (html) after the (implied) root element. -#document -| -| -| -| -| " " - -#data - -#errors -Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element. -#document -| -| -| -| -| - -#data - -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end tag (html) after the (implied) root element. -#document -| -| -| -| - -#data -X -#errors -Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element. -#document -| -| -| -| -| -| "X" - -#data -<!doctype html><table> X<meta></table> -#errors -Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 30 Unexpected start tag (meta) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " X" -| <meta> -| <table> - -#data -<!doctype html><table> x</table> -#errors -Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " x" -| <table> - -#data -<!doctype html><table> x </table> -#errors -Line: 1 Col: 25 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " x " -| <table> - -#data -<!doctype html><table><tr> x</table> -#errors -Line: 1 Col: 28 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " x" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table>X<style> <tr>x </style> </table> -#errors -Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" -| <table> -| <style> -| " <tr>x " -| " " - -#data -<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div> -#errors -Line: 1 Col: 30 Unexpected start tag (a) in table context caused voodoo mode. -Line: 1 Col: 37 Unexpected end tag (a) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| <a> -| "foo" -| <table> -| " " -| <tbody> -| <tr> -| <td> -| "bar" -| " " - -#data -<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes> -#errors -6: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -13: Stray start tag “frame”. -21: Stray end tag “frame”. -29: Stray end tag “frame”. -39: “frameset” start tag after “body” already open. -105: End of file seen inside an [R]CDATA element. -105: End of file seen and there were open elements. -XXX: These errors are wrong, please fix me! -#document -| <html> -| <head> -| <frameset> -| <frame> -| <frameset> -| <frame> -| <noframes> -| "</frameset><noframes>" - -#data -<!DOCTYPE html><object></html> -#errors -1: Expected closing tag. Unexpected end of file -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <object> diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests16.dat b/deps/golang.org/x/net/html/testdata/webkit/tests16.dat deleted file mode 100644 index c8ef66f0e..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests16.dat +++ /dev/null @@ -1,2299 +0,0 @@ -#data -<!doctype html><script> -#errors -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| <body> - -#data -<!doctype html><script>a -#errors -Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "a" -| <body> - -#data -<!doctype html><script>< -#errors -Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<" -| <body> - -#data -<!doctype html><script></ -#errors -Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</" -| <body> - -#data -<!doctype html><script></S -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</S" -| <body> - -#data -<!doctype html><script></SC -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SC" -| <body> - -#data -<!doctype html><script></SCR -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCR" -| <body> - -#data -<!doctype html><script></SCRI -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCRI" -| <body> - -#data -<!doctype html><script></SCRIP -#errors -Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCRIP" -| <body> - -#data -<!doctype html><script></SCRIPT -#errors -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCRIPT" -| <body> - -#data -<!doctype html><script></SCRIPT -#errors -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| <body> - -#data -<!doctype html><script></s -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</s" -| <body> - -#data -<!doctype html><script></sc -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</sc" -| <body> - -#data -<!doctype html><script></scr -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</scr" -| <body> - -#data -<!doctype html><script></scri -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</scri" -| <body> - -#data -<!doctype html><script></scrip -#errors -Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</scrip" -| <body> - -#data -<!doctype html><script></script -#errors -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</script" -| <body> - -#data -<!doctype html><script></script -#errors -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| <body> - -#data -<!doctype html><script><! -#errors -Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!" -| <body> - -#data -<!doctype html><script><!a -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!a" -| <body> - -#data -<!doctype html><script><!- -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!-" -| <body> - -#data -<!doctype html><script><!-a -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!-a" -| <body> - -#data -<!doctype html><script><!-- -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<!doctype html><script><!--a -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--a" -| <body> - -#data -<!doctype html><script><!--< -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<" -| <body> - -#data -<!doctype html><script><!--<a -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<a" -| <body> - -#data -<!doctype html><script><!--</ -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--</" -| <body> - -#data -<!doctype html><script><!--</script -#errors -Line: 1 Col: 35 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--</script" -| <body> - -#data -<!doctype html><script><!--</script -#errors -Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<!doctype html><script><!--<s -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<s" -| <body> - -#data -<!doctype html><script><!--<script -#errors -Line: 1 Col: 34 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script" -| <body> - -#data -<!doctype html><script><!--<script -#errors -Line: 1 Col: 35 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script " -| <body> - -#data -<!doctype html><script><!--<script < -#errors -Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script <" -| <body> - -#data -<!doctype html><script><!--<script <a -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script <a" -| <body> - -#data -<!doctype html><script><!--<script </ -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </" -| <body> - -#data -<!doctype html><script><!--<script </s -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </s" -| <body> - -#data -<!doctype html><script><!--<script </script -#errors -Line: 1 Col: 43 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script" -| <body> - -#data -<!doctype html><script><!--<script </scripta -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </scripta" -| <body> - -#data -<!doctype html><script><!--<script </script -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script </script> -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script>" -| <body> - -#data -<!doctype html><script><!--<script </script/ -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script/" -| <body> - -#data -<!doctype html><script><!--<script </script < -#errors -Line: 1 Col: 45 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script <" -| <body> - -#data -<!doctype html><script><!--<script </script <a -#errors -Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script <a" -| <body> - -#data -<!doctype html><script><!--<script </script </ -#errors -Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script </" -| <body> - -#data -<!doctype html><script><!--<script </script </script -#errors -Line: 1 Col: 52 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script </script" -| <body> - -#data -<!doctype html><script><!--<script </script </script -#errors -Line: 1 Col: 53 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script </script </script/ -#errors -Line: 1 Col: 53 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script </script </script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script - -#errors -Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -" -| <body> - -#data -<!doctype html><script><!--<script -a -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -a" -| <body> - -#data -<!doctype html><script><!--<script -< -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -<" -| <body> - -#data -<!doctype html><script><!--<script -- -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --" -| <body> - -#data -<!doctype html><script><!--<script --a -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --a" -| <body> - -#data -<!doctype html><script><!--<script --< -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --<" -| <body> - -#data -<!doctype html><script><!--<script --> -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script -->< -#errors -Line: 1 Col: 39 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --><" -| <body> - -#data -<!doctype html><script><!--<script --></ -#errors -Line: 1 Col: 40 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --></" -| <body> - -#data -<!doctype html><script><!--<script --></script -#errors -Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --></script" -| <body> - -#data -<!doctype html><script><!--<script --></script -#errors -Line: 1 Col: 47 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script --></script/ -#errors -Line: 1 Col: 47 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script --></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script><\/script>--></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script><\/script>-->" -| <body> - -#data -<!doctype html><script><!--<script></scr'+'ipt>--></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt>-->" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>--><!--</script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>--><!--" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>-- ></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>-- >" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>- -></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- ->" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>- - ></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- - >" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>-></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>->" -| <body> - -#data -<!doctype html><script><!--<script>--!></script>X -#errors -Line: 1 Col: 49 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script>--!></script>X" -| <body> - -#data -<!doctype html><script><!--<scr'+'ipt></script>--></script> -#errors -Line: 1 Col: 59 Unexpected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<scr'+'ipt>" -| <body> -| "-->" - -#data -<!doctype html><script><!--<script></scr'+'ipt></script>X -#errors -Line: 1 Col: 57 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt></script>X" -| <body> - -#data -<!doctype html><style><!--<style></style>--></style> -#errors -Line: 1 Col: 52 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--<style>" -| <body> -| "-->" - -#data -<!doctype html><style><!--</style>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--" -| <body> -| "X" - -#data -<!doctype html><style><!--...</style>...--></style> -#errors -Line: 1 Col: 51 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--..." -| <body> -| "...-->" - -#data -<!doctype html><style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>" -| <body> -| "X" - -#data -<!doctype html><style><!--...<style><!--...--!></style>--></style> -#errors -Line: 1 Col: 66 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--...<style><!--...--!>" -| <body> -| "-->" - -#data -<!doctype html><style><!--...</style><!-- --><style>@import ...</style> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--..." -| <!-- --> -| <style> -| "@import ..." -| <body> - -#data -<!doctype html><style>...<style><!--...</style><!-- --></style> -#errors -Line: 1 Col: 63 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "...<style><!--..." -| <!-- --> -| <body> - -#data -<!doctype html><style>...<!--[if IE]><style>...</style>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "...<!--[if IE]><style>..." -| <body> -| "X" - -#data -<!doctype html><title><!--<title>--> -#errors -Line: 1 Col: 52 Unexpected end tag (title). -#document -| -| -| -| -| "<!--<title>" -| <body> -| "-->" - -#data -<!doctype html><title></title> -#errors -#document -| -| -| -| -| "" -| - -#data -foo/title><link></head><body>X -#errors -Line: 1 Col: 52 Unexpected end of file. Expected end tag (title). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "foo/title><link></head><body>X" -| <body> - -#data -<!doctype html><noscript><!--<noscript></noscript>--></noscript> -#errors -Line: 1 Col: 64 Unexpected end tag (noscript). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noscript> -| "<!--<noscript>" -| <body> -| "-->" - -#data -<!doctype html><noscript><!--</noscript>X<noscript>--></noscript> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noscript> -| "<!--" -| <body> -| "X" -| <noscript> -| "-->" - -#data -<!doctype html><noscript><iframe></noscript>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noscript> -| "<iframe>" -| <body> -| "X" - -#data -<!doctype html><noframes><!--<noframes></noframes>--></noframes> -#errors -Line: 1 Col: 64 Unexpected end tag (noframes). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noframes> -| "<!--<noframes>" -| <body> -| "-->" - -#data -<!doctype html><noframes><body><script><!--...</script></body></noframes></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noframes> -| "<body><script><!--...</script></body>" -| <body> - -#data -<!doctype html><textarea><!--<textarea></textarea>--></textarea> -#errors -Line: 1 Col: 64 Unexpected end tag (textarea). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "<!--<textarea>" -| "-->" - -#data -<!doctype html><textarea></textarea></textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "</textarea>" - -#data -<!doctype html><textarea><</textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "<" - -#data -<!doctype html><textarea>a<b</textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "a<b" - -#data -<!doctype html><iframe><!--<iframe></iframe>--></iframe> -#errors -Line: 1 Col: 56 Unexpected end tag (iframe). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <iframe> -| "<!--<iframe>" -| "-->" - -#data -<!doctype html><iframe>...<!--X->...<!--/X->...</iframe> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <iframe> -| "...<!--X->...<!--/X->..." - -#data -<!doctype html><xmp><!--<xmp></xmp>--></xmp> -#errors -Line: 1 Col: 44 Unexpected end tag (xmp). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <xmp> -| "<!--<xmp>" -| "-->" - -#data -<!doctype html><noembed><!--<noembed></noembed>--></noembed> -#errors -Line: 1 Col: 60 Unexpected end tag (noembed). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <noembed> -| "<!--<noembed>" -| "-->" - -#data -<script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 8 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| <body> - -#data -<script>a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 9 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "a" -| <body> - -#data -<script>< -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 9 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<" -| <body> - -#data -<script></ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 10 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</" -| <body> - -#data -<script></S -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</S" -| <body> - -#data -<script></SC -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SC" -| <body> - -#data -<script></SCR -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCR" -| <body> - -#data -<script></SCRI -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCRI" -| <body> - -#data -<script></SCRIP -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 15 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCRIP" -| <body> - -#data -<script></SCRIPT -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCRIPT" -| <body> - -#data -<script></SCRIPT -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 17 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| <body> - -#data -<script></s -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</s" -| <body> - -#data -<script></sc -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</sc" -| <body> - -#data -<script></scr -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</scr" -| <body> - -#data -<script></scri -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</scri" -| <body> - -#data -<script></scrip -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 15 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</scrip" -| <body> - -#data -<script></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</script" -| <body> - -#data -<script></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 17 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| <body> - -#data -<script><! -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 10 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!" -| <body> - -#data -<script><!a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!a" -| <body> - -#data -<script><!- -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!-" -| <body> - -#data -<script><!-a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!-a" -| <body> - -#data -<script><!-- -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<script><!--a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--a" -| <body> - -#data -<script><!--< -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<" -| <body> - -#data -<script><!--<a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<a" -| <body> - -#data -<script><!--</ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--</" -| <body> - -#data -<script><!--</script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--</script" -| <body> - -#data -<script><!--</script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<script><!--<s -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<s" -| <body> - -#data -<script><!--<script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 19 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script" -| <body> - -#data -<script><!--<script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script " -| <body> - -#data -<script><!--<script < -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script <" -| <body> - -#data -<script><!--<script <a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script <a" -| <body> - -#data -<script><!--<script </ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </" -| <body> - -#data -<script><!--<script </s -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </s" -| <body> - -#data -<script><!--<script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script" -| <body> - -#data -<script><!--<script </scripta -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </scripta" -| <body> - -#data -<script><!--<script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script </script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script>" -| <body> - -#data -<script><!--<script </script/ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script/" -| <body> - -#data -<script><!--<script </script < -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script <" -| <body> - -#data -<script><!--<script </script <a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script <a" -| <body> - -#data -<script><!--<script </script </ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script </" -| <body> - -#data -<script><!--<script </script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script </script" -| <body> - -#data -<script><!--<script </script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script </script </script/ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script </script </script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script - -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -" -| <body> - -#data -<script><!--<script -a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -a" -| <body> - -#data -<script><!--<script -- -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --" -| <body> - -#data -<script><!--<script --a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --a" -| <body> - -#data -<script><!--<script --> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script -->< -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --><" -| <body> - -#data -<script><!--<script --></ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --></" -| <body> - -#data -<script><!--<script --></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --></script" -| <body> - -#data -<script><!--<script --></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script --></script/ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script --></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script><\/script>--></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script><\/script>-->" -| <body> - -#data -<script><!--<script></scr'+'ipt>--></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt>-->" -| <body> - -#data -<script><!--<script></script><script></script></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>" -| <body> - -#data -<script><!--<script></script><script></script>--><!--</script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>--><!--" -| <body> - -#data -<script><!--<script></script><script></script>-- ></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>-- >" -| <body> - -#data -<script><!--<script></script><script></script>- -></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- ->" -| <body> - -#data -<script><!--<script></script><script></script>- - ></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- - >" -| <body> - -#data -<script><!--<script></script><script></script>-></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>->" -| <body> - -#data -<script><!--<script>--!></script>X -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 34 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script>--!></script>X" -| <body> - -#data -<script><!--<scr'+'ipt></script>--></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 44 Unexpected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<scr'+'ipt>" -| <body> -| "-->" - -#data -<script><!--<script></scr'+'ipt></script>X -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 42 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt></script>X" -| <body> - -#data -<style><!--<style></style>--></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 37 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "<!--<style>" -| <body> -| "-->" - -#data -<style><!--</style>X -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "<!--" -| <body> -| "X" - -#data -<style><!--...</style>...--></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 36 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "<!--..." -| <body> -| "...-->" - -#data -<style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>" -| <body> -| "X" - -#data -<style><!--...<style><!--...--!></style>--></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 51 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "<!--...<style><!--...--!>" -| <body> -| "-->" - -#data -<style><!--...</style><!-- --><style>@import ...</style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "<!--..." -| <!-- --> -| <style> -| "@import ..." -| <body> - -#data -<style>...<style><!--...</style><!-- --></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 48 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "...<style><!--..." -| <!-- --> -| <body> - -#data -<style>...<!--[if IE]><style>...</style>X -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "...<!--[if IE]><style>..." -| <body> -| "X" - -#data -<title><!--<title>--> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -Line: 1 Col: 37 Unexpected end tag (title). -#document -| -| -| -| "<!--<title>" -| <body> -| "-->" - -#data -<title></title> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -#document -| -| -| -| "" -| - -#data -foo/title><link></head><body>X -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -Line: 1 Col: 37 Unexpected end of file. Expected end tag (title). -#document -| <html> -| <head> -| <title> -| "foo/title><link></head><body>X" -| <body> - -#data -<noscript><!--<noscript></noscript>--></noscript> -#errors -Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. -Line: 1 Col: 49 Unexpected end tag (noscript). -#document -| <html> -| <head> -| <noscript> -| "<!--<noscript>" -| <body> -| "-->" - -#data -<noscript><!--</noscript>X<noscript>--></noscript> -#errors -Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. -#document -| <html> -| <head> -| <noscript> -| "<!--" -| <body> -| "X" -| <noscript> -| "-->" - -#data -<noscript><iframe></noscript>X -#errors -Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. -#document -| <html> -| <head> -| <noscript> -| "<iframe>" -| <body> -| "X" - -#data -<noframes><!--<noframes></noframes>--></noframes> -#errors -Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE. -Line: 1 Col: 49 Unexpected end tag (noframes). -#document -| <html> -| <head> -| <noframes> -| "<!--<noframes>" -| <body> -| "-->" - -#data -<noframes><body><script><!--...</script></body></noframes></html> -#errors -Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE. -#document -| <html> -| <head> -| <noframes> -| "<body><script><!--...</script></body>" -| <body> - -#data -<textarea><!--<textarea></textarea>--></textarea> -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -Line: 1 Col: 49 Unexpected end tag (textarea). -#document -| <html> -| <head> -| <body> -| <textarea> -| "<!--<textarea>" -| "-->" - -#data -<textarea></textarea></textarea> -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <textarea> -| "</textarea>" - -#data -<iframe><!--<iframe></iframe>--></iframe> -#errors -Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. -Line: 1 Col: 41 Unexpected end tag (iframe). -#document -| <html> -| <head> -| <body> -| <iframe> -| "<!--<iframe>" -| "-->" - -#data -<iframe>...<!--X->...<!--/X->...</iframe> -#errors -Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <iframe> -| "...<!--X->...<!--/X->..." - -#data -<xmp><!--<xmp></xmp>--></xmp> -#errors -Line: 1 Col: 5 Unexpected start tag (xmp). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end tag (xmp). -#document -| <html> -| <head> -| <body> -| <xmp> -| "<!--<xmp>" -| "-->" - -#data -<noembed><!--<noembed></noembed>--></noembed> -#errors -Line: 1 Col: 9 Unexpected start tag (noembed). Expected DOCTYPE. -Line: 1 Col: 45 Unexpected end tag (noembed). -#document -| <html> -| <head> -| <body> -| <noembed> -| "<!--<noembed>" -| "-->" - -#data -<!doctype html><table> - -#errors -Line 2 Col 0 Unexpected end of file. Expected table content. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| " -" - -#data -<!doctype html><table><td><span><font></span><span> -#errors -Line 1 Col 26 Unexpected table cell start tag (td) in the table body phase. -Line 1 Col 45 Unexpected end tag (span). -Line 1 Col 51 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <span> -| <font> -| <font> -| <span> - -#data -<!doctype html><form><table></form><form></table></form> -#errors -35: Stray end tag “form”. -41: Start tag “form” seen in “table”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <table> -| <form> diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests17.dat b/deps/golang.org/x/net/html/testdata/webkit/tests17.dat deleted file mode 100644 index 7b555f888..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests17.dat +++ /dev/null @@ -1,153 +0,0 @@ -#data -<!doctype html><table><tbody><select><tr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><tr><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<!doctype html><table><tr><td><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <select> -| <td> - -#data -<!doctype html><table><tr><th><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <th> -| <select> -| <td> - -#data -<!doctype html><table><caption><select><tr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <select> -| <tbody> -| <tr> - -#data -<!doctype html><select><tr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><th> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><tbody> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><thead> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><tfoot> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><caption> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><table><tr></table>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| "a" diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests18.dat b/deps/golang.org/x/net/html/testdata/webkit/tests18.dat deleted file mode 100644 index 680e1f068..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests18.dat +++ /dev/null @@ -1,269 +0,0 @@ -#data -<!doctype html><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" - -#data -<!doctype html><table><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> - -#data -<!doctype html><table><tbody><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> -| <tbody> - -#data -<!doctype html><table><tbody><tr><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><tbody><tr><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><td><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <plaintext> -| "</plaintext>" - -#data -<!doctype html><table><caption><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <plaintext> -| "</plaintext>" - -#data -<!doctype html><table><tr><style></script></style>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "abc" -| <table> -| <tbody> -| <tr> -| <style> -| "</script>" - -#data -<!doctype html><table><tr><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "abc" -| <table> -| <tbody> -| <tr> -| <script> -| "</style>" - -#data -<!doctype html><table><caption><style></script></style>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <style> -| "</script>" -| "abc" - -#data -<!doctype html><table><td><style></script></style>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <style> -| "</script>" -| "abc" - -#data -<!doctype html><select><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <script> -| "</style>" -| "abc" - -#data -<!doctype html><table><select><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <script> -| "</style>" -| "abc" -| <table> - -#data -<!doctype html><table><tr><select><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <script> -| "</style>" -| "abc" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><frameset></frameset><noframes>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" - -#data -<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" -| <!-- abc --> - -#data -<!doctype html><frameset></frameset></html><noframes>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" - -#data -<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" -| <!-- abc --> - -#data -<!doctype html><table><tr></tbody><tfoot> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <tfoot> - -#data -<!doctype html><table><td><svg></svg>abc<td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| "abc" -| <td> diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests19.dat b/deps/golang.org/x/net/html/testdata/webkit/tests19.dat deleted file mode 100644 index 0d62f5a5b..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests19.dat +++ /dev/null @@ -1,1237 +0,0 @@ -#data -<!doctype html><math><mn DefinitionUrl="foo"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mn> -| definitionURL="foo" - -#data -<!doctype html><html></p><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <!-- foo --> -| <head> -| <body> - -#data -<!doctype html><head></head></p><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <!-- foo --> -| <body> - -#data -<!doctype html><body><p><pre> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <pre> - -#data -<!doctype html><body><p><listing> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <listing> - -#data -<!doctype html><p><plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <plaintext> - -#data -<!doctype html><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <h1> - -#data -<!doctype html><form><isindex> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> - -#data -<!doctype html><isindex action="POST"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| action="POST" -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| <hr> - -#data -<!doctype html><isindex prompt="this is isindex"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "this is isindex" -| <input> -| name="isindex" -| <hr> - -#data -<!doctype html><isindex type="hidden"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| type="hidden" -| <hr> - -#data -<!doctype html><isindex name="foo"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| <hr> - -#data -<!doctype html><ruby><p><rp> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <p> -| <rp> - -#data -<!doctype html><ruby><div><span><rp> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <span> -| <rp> - -#data -<!doctype html><ruby><div><p><rp> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <p> -| <rp> - -#data -<!doctype html><ruby><p><rt> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <p> -| <rt> - -#data -<!doctype html><ruby><div><span><rt> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <span> -| <rt> - -#data -<!doctype html><ruby><div><p><rt> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <p> -| <rt> - -#data -<!doctype html><math/><foo> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <foo> - -#data -<!doctype html><svg/><foo> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <foo> - -#data -<!doctype html><div></body><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| <!-- foo --> - -#data -<!doctype html><h1><div><h3><span></h1>foo -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <h1> -| <div> -| <h3> -| <span> -| "foo" - -#data -<!doctype html><p></h3>foo -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| "foo" - -#data -<!doctype html><h3><li>abc</h2>foo -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <h3> -| <li> -| "abc" -| "foo" - -#data -<!doctype html><table>abc<!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "abc" -| <table> -| <!-- foo --> - -#data -<!doctype html><table> <!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| " " -| <!-- foo --> - -#data -<!doctype html><table> b <!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " b " -| <table> -| <!-- foo --> - -#data -<!doctype html><select><option><option> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> -| <option> - -#data -<!doctype html><select><option></optgroup> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> - -#data -<!doctype html><select><option></optgroup> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> - -#data -<!doctype html><p><math><mi><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mi> -| <p> -| <h1> - -#data -<!doctype html><p><math><mo><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mo> -| <p> -| <h1> - -#data -<!doctype html><p><math><mn><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mn> -| <p> -| <h1> - -#data -<!doctype html><p><math><ms><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math ms> -| <p> -| <h1> - -#data -<!doctype html><p><math><mtext><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mtext> -| <p> -| <h1> - -#data -<!doctype html><frameset></noframes> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><html c=d><body></html><html a=b> -#errors -#document -| <!DOCTYPE html> -| <html> -| a="b" -| c="d" -| <head> -| <body> - -#data -<!doctype html><html c=d><frameset></frameset></html><html a=b> -#errors -#document -| <!DOCTYPE html> -| <html> -| a="b" -| c="d" -| <head> -| <frameset> - -#data -<!doctype html><html><frameset></frameset></html><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <!-- foo --> - -#data -<!doctype html><html><frameset></frameset></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| " " - -#data -<!doctype html><html><frameset></frameset></html>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><html><frameset></frameset></html><p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><html><frameset></frameset></html></p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<html><frameset></frameset></html><!doctype html> -#errors -#document -| <html> -| <head> -| <frameset> - -#data -<!doctype html><body><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<!doctype html><p><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><p>a<frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| "a" - -#data -<!doctype html><p> <frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><pre><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> - -#data -<!doctype html><listing><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <listing> - -#data -<!doctype html><li><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <li> - -#data -<!doctype html><dd><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <dd> - -#data -<!doctype html><dt><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <dt> - -#data -<!doctype html><button><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <button> - -#data -<!doctype html><applet><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <applet> - -#data -<!doctype html><marquee><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <marquee> - -#data -<!doctype html><object><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <object> - -#data -<!doctype html><table><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> - -#data -<!doctype html><area><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <area> - -#data -<!doctype html><basefont><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <basefont> -| <frameset> - -#data -<!doctype html><bgsound><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <bgsound> -| <frameset> - -#data -<!doctype html><br><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <br> - -#data -<!doctype html><embed><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <embed> - -#data -<!doctype html><img><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <img> - -#data -<!doctype html><input><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <input> - -#data -<!doctype html><keygen><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <keygen> - -#data -<!doctype html><wbr><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <wbr> - -#data -<!doctype html><hr><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <hr> - -#data -<!doctype html><textarea></textarea><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> - -#data -<!doctype html><xmp></xmp><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <xmp> - -#data -<!doctype html><iframe></iframe><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <iframe> - -#data -<!doctype html><select></select><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><svg></svg><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><math></math><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><svg><foreignObject><div> <frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><svg>a</svg><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| "a" - -#data -<!doctype html><svg> </svg><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<html>aaa<frameset></frameset> -#errors -#document -| <html> -| <head> -| <body> -| "aaa" - -#data -<html> a <frameset></frameset> -#errors -#document -| <html> -| <head> -| <body> -| "a " - -#data -<!doctype html><div><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><div><body><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> - -#data -<!doctype html><p><math></p>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| "a" - -#data -<!doctype html><p><math><mn><span></p>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mn> -| <span> -| <p> -| "a" - -#data -<!doctype html><math></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> - -#data -<!doctype html><meta charset="ascii"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <meta> -| charset="ascii" -| <body> - -#data -<!doctype html><meta http-equiv="content-type" content="text/html;charset=ascii"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <meta> -| content="text/html;charset=ascii" -| http-equiv="content-type" -| <body> - -#data -<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset="utf8"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <!-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --> -| <meta> -| charset="utf8" -| <body> - -#data -<!doctype html><html a=b><head></head><html c=d> -#errors -#document -| <!DOCTYPE html> -| <html> -| a="b" -| c="d" -| <head> -| <body> - -#data -<!doctype html><image/> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <img> - -#data -<!doctype html>a<i>b<table>c<b>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "a" -| <i> -| "bc" -| <b> -| "de" -| "f" -| <table> - -#data -<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <b> -| <i> -| "c" -| <a> -| "d" -| <a> -| "e" -| <a> -| "f" -| <table> - -#data -<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <b> -| <i> -| "c" -| <a> -| "d" -| <a> -| "e" -| <a> -| "f" - -#data -<!doctype html><table><i>a<b>b<div>c</i> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <i> -| "c" -| <table> - -#data -<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <b> -| <i> -| "c" -| <a> -| "d" -| <a> -| "e" -| <a> -| "f" -| <table> - -#data -<!doctype html><table><i>a<div>b<tr>c<b>d</i>e -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <div> -| "b" -| <i> -| "c" -| <b> -| "d" -| <b> -| "e" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><td><table><i>a<div>b<b>c</i>d -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <i> -| "a" -| <div> -| <i> -| "b" -| <b> -| "c" -| <b> -| "d" -| <table> - -#data -<!doctype html><body><bgsound> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <bgsound> - -#data -<!doctype html><body><basefont> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <basefont> - -#data -<!doctype html><a><b></a><basefont> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <a> -| <b> -| <basefont> - -#data -<!doctype html><a><b></a><bgsound> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <a> -| <b> -| <bgsound> - -#data -<!doctype html><figcaption><article></figcaption>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <figcaption> -| <article> -| "a" - -#data -<!doctype html><summary><article></summary>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <summary> -| <article> -| "a" - -#data -<!doctype html><p><a><plaintext>b -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <a> -| <plaintext> -| <a> -| "b" - -#data -<!DOCTYPE html><div>a<a></div>b<p>c</p>d -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| "a" -| <a> -| <a> -| "b" -| <p> -| "c" -| "d" diff --git a/deps/golang.org/x/net/html/testdata/webkit/tests2.dat b/deps/golang.org/x/net/html/testdata/webkit/tests2.dat deleted file mode 100644 index 60d859221..000000000 --- a/deps/golang.org/x/net/html/testdata/webkit/tests2.dat +++ /dev/null @@ -1,763 +0,0 @@ -#data -<!DOCTYPE html>Test -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "Test" - -#data -<textarea>test</div>test -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -Line: 1 Col: 24 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <textarea> -| "test</div>test" - -#data -<table><td> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 11 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<table><td>test</tbody></table> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| "test" - -#data -<frame>test -#errors -Line: 1 Col: 7 Unexpected start tag (frame). Expected DOCTYPE. -Line: 1 Col: 7 Unexpected start tag frame. Ignored. -#document -| <html> -| <head> -| <body> -| "test" - -#data -<!DOCTYPE html><frameset>test -#errors -Line: 1 Col: 29 Unepxected characters in the frameset phase. Characters ignored. -Line: 1 Col: 29 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><frameset><!DOCTYPE html> -#errors -Line: 1 Col: 40 Unexpected DOCTYPE. Ignored. -Line: 1 Col: 40 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><font><p><b>test</font> -#errors -Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <font> -| <p> -| <font> -| <b> -| "test" - -#data -<!DOCTYPE html><dt><div><dd> -#errors -Line: 1 Col: 28 Missing end tag (div, dt). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <dt> -| <div> -| <dd> - -#data -<script></x -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</x" -| <body> - -#data -<table><plaintext><td> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 18 Unexpected start tag (plaintext) in table context caused voodoo mode. -Line: 1 Col: 22 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <plaintext> -| "<td>" -| <table> - -#data -<plaintext></plaintext> -#errors -Line: 1 Col: 11 Unexpected start tag (plaintext). Expected DOCTYPE. -Line: 1 Col: 23 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" - -#data -<!DOCTYPE html><table><tr>TEST -#errors -Line: 1 Col: 30 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 30 Unexpected end of file. Expected table content. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "TEST" -| <table> -| <tbody> -| <tr> - -#data -<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4> -#errors -Line: 1 Col: 37 Unexpected start tag (body). -Line: 1 Col: 53 Unexpected start tag (body). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| t1="1" -| t2="2" -| t3="3" -| t4="4" - -#data -</b test -#errors -Line: 1 Col: 8 Unexpected end of file in attribute name. -Line: 1 Col: 8 End tag contains unexpected attributes. -Line: 1 Col: 8 Unexpected end tag (b). Expected DOCTYPE. -Line: 1 Col: 8 Unexpected end tag (b) after the (implied) root element. -#document -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html></b test<b &=&>X -#errors -Line: 1 Col: 32 Named entity didn't end with ';'. -Line: 1 Col: 33 End tag contains unexpected attributes. -Line: 1 Col: 33 Unexpected end tag (b) after the (implied) root element. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" - -#data -<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -Line: 1 Col: 54 Unexpected end of file in the tag name. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| type="text/x-foobar;baz" -| "X</SCRipt" -| <body> - -#data -& -#errors -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&" - -#data -&# -#errors -Line: 1 Col: 1 Numeric entity expected. Got end of file instead. -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&#" - -#data -&#X -#errors -Line: 1 Col: 3 Numeric entity expected but none found. -Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&#X" - -#data -&#x -#errors -Line: 1 Col: 3 Numeric entity expected but none found. -Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&#x" - -#data -- -#errors -Line: 1 Col: 4 Numeric entity didn't end with ';'. -Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "-" - -#data -&x-test -#errors -Line: 1 Col: 1 Named entity expected. Got none. -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&x-test" - -#data -<!doctypehtml><p><li> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <li> - -#data -<!doctypehtml><p><dt> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <dt> - -#data -<!doctypehtml><p><dd> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <dd> - -#data -<!doctypehtml><p><form> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -Line: 1 Col: 23 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <form> - -#data -<!DOCTYPE html><p></P>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| "X" - -#data -& -#errors -Line: 1 Col: 4 Named entity didn't end with ';'. -Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&" - -#data -&AMp; -#errors -Line: 1 Col: 1 Named entity expected. Got none. -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&AMp;" - -#data -<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY> -#errors -Line: 1 Col: 110 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly> - -#data -<!DOCTYPE html>X</body>X -#errors -Line: 1 Col: 24 Unexpected non-space characters in the after body phase. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "XX" - -#data -<!DOCTYPE html><!-- X -#errors -Line: 1 Col: 21 Unexpected end of file in comment. -#document -| <!DOCTYPE html> -| <!-- X --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><table><caption>test TEST</caption><td>test -#errors -Line: 1 Col: 54 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 58 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| "test TEST" -| <tbody> -| <tr> -| <td> -| "test" - -#data -<!DOCTYPE html><select><option><optgroup> -#errors -Line: 1 Col: 41 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> -| <optgroup> - -#data -<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option> -#errors -Line: 1 Col: 68 Unexpected select start tag in the select phase treated as select end tag. -Line: 1 Col: 76 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <optgroup> -| <option> -| <option> -| <option> - -#data -<!DOCTYPE html><select><optgroup><option><optgroup> -#errors -Line: 1 Col: 51 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <optgroup> -| <option> -| <optgroup> - -#data -<!DOCTYPE html><datalist><option>foo</datalist>bar -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <datalist> -| <option> -| "foo" -| "bar" - -#data -<!DOCTYPE html><font><input><input></font> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <font> -| <input> -| <input> - -#data -<!DOCTYPE html><!-- XXX - XXX --> -#errors -#document -| <!DOCTYPE html> -| <!-- XXX - XXX --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><!-- XXX - XXX -#errors -Line: 1 Col: 29 Unexpected end of file in comment (-) -#document -| <!DOCTYPE html> -| <!-- XXX - XXX --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><!-- XXX - XXX - XXX --> -#errors -#document -| <!DOCTYPE html> -| <!-- XXX - XXX - XXX --> -| <html> -| <head> -| <body> - -#data -<isindex test=x name=x> -#errors -Line: 1 Col: 23 Unexpected start tag (isindex). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected start tag isindex. Don't use it! -#document -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| test="x" -| <hr> - -#data -test -test -#errors -Line: 2 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "test -test" - -#data -<!DOCTYPE html><body><title>test</body> -#errors -#document -| -| -| -| -| -| "test</body>" - -#data -<!DOCTYPE html><body><title>X -#errors -#document -| -| -| -| -| -| "X" -| <meta> -| name="z" -| <link> -| rel="foo" -| <style> -| " -x { content:"</style" } " - -#data -<!DOCTYPE html><select><optgroup></optgroup></select> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <optgroup> - -#data - - -#errors -Line: 2 Col: 1 Unexpected End of file. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html> <html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><script> -</script> <title>x -#errors -#document -| -| -| -| -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected start tag (script) that can be in head. Moved. -#document -| -| -| -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 28 Unexpected start tag (style) that can be in head. Moved. -#document -| -| -| -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -#document -| -| -| -| -| "x" -| x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (style). -#document -| -| -| --> x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| -| -| x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| -| -| x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| -| -| x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| -| -|

-#errors -#document -| -| -| -| -| -| ddd -#errors -#document -| -| -| -#errors -#document -| -| -| -| -|
  • -| -| ", - " -
    << Back to Go HTTP/2 demo server`) - }) -} - -func httpsHost() string { - if *hostHTTPS != "" { - return *hostHTTPS - } - if v := *httpsAddr; strings.HasPrefix(v, ":") { - return "localhost" + v - } else { - return v - } -} - -func httpHost() string { - if *hostHTTP != "" { - return *hostHTTP - } - if v := *httpAddr; strings.HasPrefix(v, ":") { - return "localhost" + v - } else { - return v - } -} - -func serveProdTLS(autocertManager *autocert.Manager) error { - srv := &http.Server{ - TLSConfig: &tls.Config{ - GetCertificate: autocertManager.GetCertificate, - }, - } - http2.ConfigureServer(srv, &http2.Server{ - NewWriteScheduler: func() http2.WriteScheduler { - return http2.NewPriorityWriteScheduler(nil) - }, - }) - ln, err := net.Listen("tcp", ":443") - if err != nil { - return err - } - return srv.Serve(tls.NewListener(tcpKeepAliveListener{ln.(*net.TCPListener)}, srv.TLSConfig)) -} - -type tcpKeepAliveListener struct { - *net.TCPListener -} - -func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) { - tc, err := ln.AcceptTCP() - if err != nil { - return - } - tc.SetKeepAlive(true) - tc.SetKeepAlivePeriod(3 * time.Minute) - return tc, nil -} - -func serveProd() error { - log.Printf("running in production mode") - - storageClient, err := storage.NewClient(context.Background()) - if err != nil { - log.Fatalf("storage.NewClient: %v", err) - } - autocertManager := &autocert.Manager{ - Prompt: autocert.AcceptTOS, - HostPolicy: autocert.HostWhitelist("http2.golang.org"), - Cache: autocertcache.NewGoogleCloudStorageCache(storageClient, "golang-h2demo-autocert"), - } - - errc := make(chan error, 2) - go func() { errc <- http.ListenAndServe(":80", autocertManager.HTTPHandler(http.DefaultServeMux)) }() - go func() { errc <- serveProdTLS(autocertManager) }() - return <-errc -} - -const idleTimeout = 5 * time.Minute -const activeTimeout = 10 * time.Minute - -// TODO: put this into the standard library and actually send -// PING frames and GOAWAY, etc: golang.org/issue/14204 -func idleTimeoutHook() func(net.Conn, http.ConnState) { - var mu sync.Mutex - m := map[net.Conn]*time.Timer{} - return func(c net.Conn, cs http.ConnState) { - mu.Lock() - defer mu.Unlock() - if t, ok := m[c]; ok { - delete(m, c) - t.Stop() - } - var d time.Duration - switch cs { - case http.StateNew, http.StateIdle: - d = idleTimeout - case http.StateActive: - d = activeTimeout - default: - return - } - m[c] = time.AfterFunc(d, func() { - log.Printf("closing idle conn %v after %v", c.RemoteAddr(), d) - go c.Close() - }) - } -} - -func main() { - var srv http.Server - flag.BoolVar(&http2.VerboseLogs, "verbose", false, "Verbose HTTP/2 debugging.") - flag.Parse() - srv.Addr = *httpsAddr - srv.ConnState = idleTimeoutHook() - - registerHandlers() - - if *prod { - *hostHTTP = "http2.golang.org" - *hostHTTPS = "http2.golang.org" - log.Fatal(serveProd()) - } - - url := "https://" + httpsHost() + "/" - log.Printf("Listening on " + url) - http2.ConfigureServer(&srv, &http2.Server{}) - - if *httpAddr != "" { - go func() { - log.Printf("Listening on http://" + httpHost() + "/ (for unencrypted HTTP/1)") - log.Fatal(http.ListenAndServe(*httpAddr, nil)) - }() - } - - go func() { - log.Fatal(srv.ListenAndServeTLS("server.crt", "server.key")) - }() - select {} -} diff --git a/deps/golang.org/x/net/http2/h2demo/launch.go b/deps/golang.org/x/net/http2/h2demo/launch.go deleted file mode 100644 index df0866a30..000000000 --- a/deps/golang.org/x/net/http2/h2demo/launch.go +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -import ( - "bufio" - "bytes" - "encoding/json" - "flag" - "fmt" - "io" - "io/ioutil" - "log" - "net/http" - "os" - "strings" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - compute "google.golang.org/api/compute/v1" -) - -var ( - proj = flag.String("project", "symbolic-datum-552", "name of Project") - zone = flag.String("zone", "us-central1-a", "GCE zone") - mach = flag.String("machinetype", "n1-standard-1", "Machine type") - instName = flag.String("instance_name", "http2-demo", "Name of VM instance.") - sshPub = flag.String("ssh_public_key", "", "ssh public key file to authorize. Can modify later in Google's web UI anyway.") - staticIP = flag.String("static_ip", "130.211.116.44", "Static IP to use. If empty, automatic.") - - writeObject = flag.String("write_object", "", "If non-empty, a VM isn't created and the flag value is Google Cloud Storage bucket/object to write. The contents from stdin.") - publicObject = flag.Bool("write_object_is_public", false, "Whether the object created by --write_object should be public.") -) - -func readFile(v string) string { - slurp, err := ioutil.ReadFile(v) - if err != nil { - log.Fatalf("Error reading %s: %v", v, err) - } - return strings.TrimSpace(string(slurp)) -} - -var config = &oauth2.Config{ - // The client-id and secret should be for an "Installed Application" when using - // the CLI. Later we'll use a web application with a callback. - ClientID: readFile("client-id.dat"), - ClientSecret: readFile("client-secret.dat"), - Endpoint: google.Endpoint, - Scopes: []string{ - compute.DevstorageFullControlScope, - compute.ComputeScope, - "https://www.googleapis.com/auth/sqlservice", - "https://www.googleapis.com/auth/sqlservice.admin", - }, - RedirectURL: "urn:ietf:wg:oauth:2.0:oob", -} - -const baseConfig = `#cloud-config -coreos: - units: - - name: h2demo.service - command: start - content: | - [Unit] - Description=HTTP2 Demo - - [Service] - ExecStartPre=/bin/bash -c 'mkdir -p /opt/bin && curl -s -o /opt/bin/h2demo http://storage.googleapis.com/http2-demo-server-tls/h2demo && chmod +x /opt/bin/h2demo' - ExecStart=/opt/bin/h2demo --prod - RestartSec=5s - Restart=always - Type=simple - - [Install] - WantedBy=multi-user.target -` - -func main() { - flag.Parse() - if *proj == "" { - log.Fatalf("Missing --project flag") - } - prefix := "https://www.googleapis.com/compute/v1/projects/" + *proj - machType := prefix + "/zones/" + *zone + "/machineTypes/" + *mach - - const tokenFileName = "token.dat" - tokenFile := tokenCacheFile(tokenFileName) - tokenSource := oauth2.ReuseTokenSource(nil, tokenFile) - token, err := tokenSource.Token() - if err != nil { - if *writeObject != "" { - log.Fatalf("Can't use --write_object without a valid token.dat file already cached.") - } - log.Printf("Error getting token from %s: %v", tokenFileName, err) - log.Printf("Get auth code from %v", config.AuthCodeURL("my-state")) - fmt.Print("\nEnter auth code: ") - sc := bufio.NewScanner(os.Stdin) - sc.Scan() - authCode := strings.TrimSpace(sc.Text()) - token, err = config.Exchange(oauth2.NoContext, authCode) - if err != nil { - log.Fatalf("Error exchanging auth code for a token: %v", err) - } - if err := tokenFile.WriteToken(token); err != nil { - log.Fatalf("Error writing to %s: %v", tokenFileName, err) - } - tokenSource = oauth2.ReuseTokenSource(token, nil) - } - - oauthClient := oauth2.NewClient(oauth2.NoContext, tokenSource) - - if *writeObject != "" { - writeCloudStorageObject(oauthClient) - return - } - - computeService, _ := compute.New(oauthClient) - - natIP := *staticIP - if natIP == "" { - // Try to find it by name. - aggAddrList, err := computeService.Addresses.AggregatedList(*proj).Do() - if err != nil { - log.Fatal(err) - } - // http://godoc.org/code.google.com/p/google-api-go-client/compute/v1#AddressAggregatedList - IPLoop: - for _, asl := range aggAddrList.Items { - for _, addr := range asl.Addresses { - if addr.Name == *instName+"-ip" && addr.Status == "RESERVED" { - natIP = addr.Address - break IPLoop - } - } - } - } - - cloudConfig := baseConfig - if *sshPub != "" { - key := strings.TrimSpace(readFile(*sshPub)) - cloudConfig += fmt.Sprintf("\nssh_authorized_keys:\n - %s\n", key) - } - if os.Getenv("USER") == "bradfitz" { - cloudConfig += fmt.Sprintf("\nssh_authorized_keys:\n - %s\n", "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwks9dwWKlRC+73gRbvYtVg0vdCwDSuIlyt4z6xa/YU/jTDynM4R4W10hm2tPjy8iR1k8XhDv4/qdxe6m07NjG/By1tkmGpm1mGwho4Pr5kbAAy/Qg+NLCSdAYnnE00FQEcFOC15GFVMOW2AzDGKisReohwH9eIzHPzdYQNPRWXE= bradfitz@papag.bradfitz.com") - } - const maxCloudConfig = 32 << 10 // per compute API docs - if len(cloudConfig) > maxCloudConfig { - log.Fatalf("cloud config length of %d bytes is over %d byte limit", len(cloudConfig), maxCloudConfig) - } - - instance := &compute.Instance{ - Name: *instName, - Description: "Go Builder", - MachineType: machType, - Disks: []*compute.AttachedDisk{instanceDisk(computeService)}, - Tags: &compute.Tags{ - Items: []string{"http-server", "https-server"}, - }, - Metadata: &compute.Metadata{ - Items: []*compute.MetadataItems{ - { - Key: "user-data", - Value: &cloudConfig, - }, - }, - }, - NetworkInterfaces: []*compute.NetworkInterface{ - { - AccessConfigs: []*compute.AccessConfig{ - { - Type: "ONE_TO_ONE_NAT", - Name: "External NAT", - NatIP: natIP, - }, - }, - Network: prefix + "/global/networks/default", - }, - }, - ServiceAccounts: []*compute.ServiceAccount{ - { - Email: "default", - Scopes: []string{ - compute.DevstorageFullControlScope, - compute.ComputeScope, - }, - }, - }, - } - - log.Printf("Creating instance...") - op, err := computeService.Instances.Insert(*proj, *zone, instance).Do() - if err != nil { - log.Fatalf("Failed to create instance: %v", err) - } - opName := op.Name - log.Printf("Created. Waiting on operation %v", opName) -OpLoop: - for { - time.Sleep(2 * time.Second) - op, err := computeService.ZoneOperations.Get(*proj, *zone, opName).Do() - if err != nil { - log.Fatalf("Failed to get op %s: %v", opName, err) - } - switch op.Status { - case "PENDING", "RUNNING": - log.Printf("Waiting on operation %v", opName) - continue - case "DONE": - if op.Error != nil { - for _, operr := range op.Error.Errors { - log.Printf("Error: %+v", operr) - } - log.Fatalf("Failed to start.") - } - log.Printf("Success. %+v", op) - break OpLoop - default: - log.Fatalf("Unknown status %q: %+v", op.Status, op) - } - } - - inst, err := computeService.Instances.Get(*proj, *zone, *instName).Do() - if err != nil { - log.Fatalf("Error getting instance after creation: %v", err) - } - ij, _ := json.MarshalIndent(inst, "", " ") - log.Printf("Instance: %s", ij) -} - -func instanceDisk(svc *compute.Service) *compute.AttachedDisk { - const imageURL = "https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-444-5-0-v20141016" - diskName := *instName + "-disk" - - return &compute.AttachedDisk{ - AutoDelete: true, - Boot: true, - Type: "PERSISTENT", - InitializeParams: &compute.AttachedDiskInitializeParams{ - DiskName: diskName, - SourceImage: imageURL, - DiskSizeGb: 50, - }, - } -} - -func writeCloudStorageObject(httpClient *http.Client) { - content := os.Stdin - const maxSlurp = 1 << 20 - var buf bytes.Buffer - n, err := io.CopyN(&buf, content, maxSlurp) - if err != nil && err != io.EOF { - log.Fatalf("Error reading from stdin: %v, %v", n, err) - } - contentType := http.DetectContentType(buf.Bytes()) - - req, err := http.NewRequest("PUT", "https://storage.googleapis.com/"+*writeObject, io.MultiReader(&buf, content)) - if err != nil { - log.Fatal(err) - } - req.Header.Set("x-goog-api-version", "2") - if *publicObject { - req.Header.Set("x-goog-acl", "public-read") - } - req.Header.Set("Content-Type", contentType) - res, err := httpClient.Do(req) - if err != nil { - log.Fatal(err) - } - if res.StatusCode != 200 { - res.Write(os.Stderr) - log.Fatalf("Failed.") - } - log.Printf("Success.") - os.Exit(0) -} - -type tokenCacheFile string - -func (f tokenCacheFile) Token() (*oauth2.Token, error) { - slurp, err := ioutil.ReadFile(string(f)) - if err != nil { - return nil, err - } - t := new(oauth2.Token) - if err := json.Unmarshal(slurp, t); err != nil { - return nil, err - } - return t, nil -} - -func (f tokenCacheFile) WriteToken(t *oauth2.Token) error { - jt, err := json.Marshal(t) - if err != nil { - return err - } - return ioutil.WriteFile(string(f), jt, 0600) -} diff --git a/deps/golang.org/x/net/http2/h2demo/rootCA.key b/deps/golang.org/x/net/http2/h2demo/rootCA.key deleted file mode 100644 index a15a6abaf..000000000 --- a/deps/golang.org/x/net/http2/h2demo/rootCA.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAt5fAjp4fTcekWUTfzsp0kyih1OYbsGL0KX1eRbSSR8Od0+9Q -62Hyny+GFwMTb4A/KU8mssoHvcceSAAbwfbxFK/+s51TobqUnORZrOoTZjkUygby -XDSK99YBbcR1Pip8vwMTm4XKuLtCigeBBdjjAQdgUO28LENGlsMnmeYkJfODVGnV -mr5Ltb9ANA8IKyTfsnHJ4iOCS/PlPbUj2q7YnoVLposUBMlgUb/CykX3mOoLb4yJ -JQyA/iST6ZxiIEj36D4yWZ5lg7YJl+UiiBQHGCnPdGyipqV06ex0heYWcaiW8LWZ -SUQ93jQ+WVCH8hT7DQO1dmsvUmXlq/JeAlwQ/QIDA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o3+OJenoZmoNzNJl2WPW5MeBUzSh8T/bgyjFTdqFHF5WiYRD/lfHj -x9Glyw2nutuT4hlOqHvKhgTYdDMsF2oQ72fe3v8Q5FU7FuKndNPEAyvKNXZaShVA -hnlhv5DjXKb0wFWnt5PCCiQLtzG0yyHaITrrEme7FikkIcTxaX/Y ------END RSA PRIVATE KEY----- diff --git a/deps/golang.org/x/net/http2/h2demo/rootCA.pem b/deps/golang.org/x/net/http2/h2demo/rootCA.pem deleted file mode 100644 index 3a323e774..000000000 --- a/deps/golang.org/x/net/http2/h2demo/rootCA.pem +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEWjCCA0KgAwIBAgIJALfRlWsI8YQHMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNV -BAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEUMBIG -A1UEChMLQnJhZGZpdHppbmMxEjAQBgNVBAMTCWxvY2FsaG9zdDEdMBsGCSqGSIb3 -DQEJARYOYnJhZEBkYW5nYS5jb20wHhcNMTQwNzE1MjA0NjA1WhcNMTcwNTA0MjA0 -NjA1WjB7MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiBG -cmFuY2lzY28xFDASBgNVBAoTC0JyYWRmaXR6aW5jMRIwEAYDVQQDEwlsb2NhbGhv -c3QxHTAbBgkqhkiG9w0BCQEWDmJyYWRAZGFuZ2EuY29tMIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAt5fAjp4fTcekWUTfzsp0kyih1OYbsGL0KX1eRbSS -R8Od0+9Q62Hyny+GFwMTb4A/KU8mssoHvcceSAAbwfbxFK/+s51TobqUnORZrOoT -ZjkUygbyXDSK99YBbcR1Pip8vwMTm4XKuLtCigeBBdjjAQdgUO28LENGlsMnmeYk -JfODVGnVmr5Ltb9ANA8IKyTfsnHJ4iOCS/PlPbUj2q7YnoVLposUBMlgUb/CykX3 -mOoLb4yJJQyA/iST6ZxiIEj36D4yWZ5lg7YJl+UiiBQHGCnPdGyipqV06ex0heYW -caiW8LWZSUQ93jQ+WVCH8hT7DQO1dmsvUmXlq/JeAlwQ/QIDAQABo4HgMIHdMB0G -A1UdDgQWBBRcAROthS4P4U7vTfjByC569R7E6DCBrQYDVR0jBIGlMIGigBRcAROt -hS4P4U7vTfjByC569R7E6KF/pH0wezELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB -MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRQwEgYDVQQKEwtCcmFkZml0emluYzES -MBAGA1UEAxMJbG9jYWxob3N0MR0wGwYJKoZIhvcNAQkBFg5icmFkQGRhbmdhLmNv -bYIJALfRlWsI8YQHMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAG6h -U9f9sNH0/6oBbGGy2EVU0UgITUQIrFWo9rFkrW5k/XkDjQm+3lzjT0iGR4IxE/Ao -eU6sQhua7wrWeFEn47GL98lnCsJdD7oZNhFmQ95Tb/LnDUjs5Yj9brP0NWzXfYU4 -UK2ZnINJRcJpB8iRCaCxE8DdcUF0XqIEq6pA272snoLmiXLMvNl3kYEdm+je6voD -58SNVEUsztzQyXmJEhCpwVI0A6QCjzXj+qvpmw3ZZHi8JwXei8ZZBLTSFBki8Z7n -sH9BBH38/SzUmAN4QHSPy1gjqm00OAE8NaYDkh/bzE4d7mLGGMWp/WE3KPSu82HF -kPe6XoSbiLm/kxk32T0= ------END CERTIFICATE----- diff --git a/deps/golang.org/x/net/http2/h2demo/rootCA.srl b/deps/golang.org/x/net/http2/h2demo/rootCA.srl deleted file mode 100644 index 6db389188..000000000 --- a/deps/golang.org/x/net/http2/h2demo/rootCA.srl +++ /dev/null @@ -1 +0,0 @@ -E2CE26BF3285059C diff --git a/deps/golang.org/x/net/http2/h2demo/server.crt b/deps/golang.org/x/net/http2/h2demo/server.crt deleted file mode 100644 index c59059bd6..000000000 --- a/deps/golang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lcL0FalF2AjqV02WTHYNQk7YF/oeO7NKBoEgvGvKG3x+xaOeBI -dwvdq175ZsGul30h+QjrRlXhH/twcuaT3GSdoysDl9cCYE8f1Mk8PD6gan3uBCJU -90p6/CbU71bGbfpM2PHot2fm ------END CERTIFICATE----- diff --git a/deps/golang.org/x/net/http2/h2demo/server.key b/deps/golang.org/x/net/http2/h2demo/server.key deleted file mode 100644 index f329c1421..000000000 --- a/deps/golang.org/x/net/http2/h2demo/server.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAs1Y9CyLFrdL8VQWN1WaifDqaZFnoqjHhCMlc1TfG2zA+InDi -fx2lgZD3o8FeNnAcfM2sPlk3+ZleOYw9P/CklFVDlvqmpCv9ss/BEp/dDaWvy1Lm -J4c2dbQJfmTxn7CV1H3TsVJvKdwFmdoABb41NoBp6+NNO7OtDyhbIMiCI0pL3Nef -b3HLA7hIMo3DYbORTtJLTIH9W8YKrEWL0lwHLrYFx/UdutZnv+HjdmO6vCN4na55 -mjws/vjKQUmc7xeY7Xe20xDEG2oDKVkL2eD7FfyrYMS3rO1ExP2KSqlXYG/1S9I/ -fz88F0GK7HX55b5WjZCl2J3ERVdnv/0MQv+sYQIDAQABAoIBADQ2spUwbY+bcz4p -3M66ECrNQTBggP40gYl2XyHxGGOu2xhZ94f9ELf1hjRWU2DUKWco1rJcdZClV6q3 -qwmXvcM2Q/SMS8JW0ImkNVl/0/NqPxGatEnj8zY30d/L8hGFb0orzFu/XYA5gCP4 -NbN2WrXgk3ZLeqwcNxHHtSiJWGJ/fPyeDWAu/apy75u9Xf2GlzBZmV6HYD9EfK80 -LTlI60f5FO487CrJnboL7ovPJrIHn+k05xRQqwma4orpz932rTXnTjs9Lg6KtbQN -a7PrqfAntIISgr11a66Mng3IYH1lYqJsWJJwX/xHT4WLEy0EH4/0+PfYemJekz2+ -Co62drECgYEA6O9zVJZXrLSDsIi54cfxA7nEZWm5CAtkYWeAHa4EJ+IlZ7gIf9sL -W8oFcEfFGpvwVqWZ+AsQ70dsjXAv3zXaG0tmg9FtqWp7pzRSMPidifZcQwWkKeTO -gJnFmnVyed8h6GfjTEu4gxo1/S5U0V+mYSha01z5NTnN6ltKx1Or3b0CgYEAxRgm -S30nZxnyg/V7ys61AZhst1DG2tkZXEMcA7dYhabMoXPJAP/EfhlWwpWYYUs/u0gS -Wwmf5IivX5TlYScgmkvb/NYz0u4ZmOXkLTnLPtdKKFXhjXJcHjUP67jYmOxNlJLp -V4vLRnFxTpffAV+OszzRxsXX6fvruwZBANYJeXUCgYBVouLFsFgfWGYp2rpr9XP4 -KK25kvrBqF6JKOIDB1zjxNJ3pUMKrl8oqccCFoCyXa4oTM2kUX0yWxHfleUjrMq4 -yimwQKiOZmV7fVLSSjSw6e/VfBd0h3gb82ygcplZkN0IclkwTY5SNKqwn/3y07V5 -drqdhkrgdJXtmQ6O5YYECQKBgATERcDToQ1USlI4sKrB/wyv1AlG8dg/IebiVJ4e -ZAyvcQmClFzq0qS+FiQUnB/WQw9TeeYrwGs1hxBHuJh16srwhLyDrbMvQP06qh8R -48F8UXXSRec22dV9MQphaROhu2qZdv1AC0WD3tqov6L33aqmEOi+xi8JgbT/PLk5 -c/c1AoGBAI1A/02ryksW6/wc7/6SP2M2rTy4m1sD/GnrTc67EHnRcVBdKO6qH2RY -nqC8YcveC2ZghgPTDsA3VGuzuBXpwY6wTyV99q6jxQJ6/xcrD9/NUG6Uwv/xfCxl -IJLeBYEqQundSSny3VtaAUK8Ul1nxpTvVRNwtcyWTo8RHAAyNPWd ------END RSA PRIVATE KEY----- diff --git a/deps/golang.org/x/net/http2/h2demo/service.yaml b/deps/golang.org/x/net/http2/h2demo/service.yaml deleted file mode 100644 index 2b7d54119..000000000 --- a/deps/golang.org/x/net/http2/h2demo/service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: h2demo -spec: - externalTrafficPolicy: Local - ports: - - port: 80 - targetPort: 80 - name: http - - port: 443 - targetPort: 443 - name: https - selector: - app: h2demo - type: LoadBalancer - loadBalancerIP: 130.211.116.44 diff --git a/deps/golang.org/x/net/http2/h2demo/tmpl.go b/deps/golang.org/x/net/http2/h2demo/tmpl.go deleted file mode 100644 index 504d6a78a..000000000 --- a/deps/golang.org/x/net/http2/h2demo/tmpl.go +++ /dev/null @@ -1,1991 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build h2demo - -package main - -import "html/template" - -var pushTmpl = template.Must(template.New("serverpush").Parse(` - - - - - - - - - HTTP/2 Server Push Demo - - - - - - - - - -
    -Note: This page exists for demonstration purposes. For the actual cmd/go docs, go to golang.org/cmd/go. -
    - - - -
    -... -
    - - - - -
    -
    -
    -
    - Run - Format - - - -
    -
    - - -
    -
    - - -

    Command go

    - - - - - - - - - - - - - - -

    -Go is a tool for managing Go source code. -

    -

    -Usage: -

    -
    go command [arguments]
    -
    -

    -The commands are: -

    -
    build       compile packages and dependencies
    -clean       remove object files
    -doc         show documentation for package or symbol
    -env         print Go environment information
    -bug         start a bug report
    -fix         run go tool fix on packages
    -fmt         run gofmt on package sources
    -generate    generate Go files by processing source
    -get         download and install packages and dependencies
    -install     compile and install packages and dependencies
    -list        list packages
    -run         compile and run Go program
    -test        test packages
    -tool        run specified go tool
    -version     print Go version
    -vet         run go tool vet on packages
    -
    -

    -Use "go help [command]" for more information about a command. -

    -

    -Additional help topics: -

    -
    c           calling between Go and C
    -buildmode   description of build modes
    -filetype    file types
    -gopath      GOPATH environment variable
    -environment environment variables
    -importpath  import path syntax
    -packages    description of package lists
    -testflag    description of testing flags
    -testfunc    description of testing functions
    -
    -

    -Use "go help [topic]" for more information about that topic. -

    -

    Compile packages and dependencies

    -

    -Usage: -

    -
    go build [-o output] [-i] [build flags] [packages]
    -
    -

    -Build compiles the packages named by the import paths, -along with their dependencies, but it does not install the results. -

    -

    -If the arguments to build are a list of .go files, build treats -them as a list of source files specifying a single package. -

    -

    -When compiling a single main package, build writes -the resulting executable to an output file named after -the first source file ('go build ed.go rx.go' writes 'ed' or 'ed.exe') -or the source code directory ('go build unix/sam' writes 'sam' or 'sam.exe'). -The '.exe' suffix is added when writing a Windows executable. -

    -

    -When compiling multiple packages or a single non-main package, -build compiles the packages but discards the resulting object, -serving only as a check that the packages can be built. -

    -

    -When compiling packages, build ignores files that end in '_test.go'. -

    -

    -The -o flag, only allowed when compiling a single package, -forces build to write the resulting executable or object -to the named output file, instead of the default behavior described -in the last two paragraphs. -

    -

    -The -i flag installs the packages that are dependencies of the target. -

    -

    -The build flags are shared by the build, clean, get, install, list, run, -and test commands: -

    -
    -a
    -	force rebuilding of packages that are already up-to-date.
    --n
    -	print the commands but do not run them.
    --p n
    -	the number of programs, such as build commands or
    -	test binaries, that can be run in parallel.
    -	The default is the number of CPUs available.
    --race
    -	enable data race detection.
    -	Supported only on linux/amd64, freebsd/amd64, darwin/amd64 and windows/amd64.
    --msan
    -	enable interoperation with memory sanitizer.
    -	Supported only on linux/amd64,
    -	and only with Clang/LLVM as the host C compiler.
    --v
    -	print the names of packages as they are compiled.
    --work
    -	print the name of the temporary work directory and
    -	do not delete it when exiting.
    --x
    -	print the commands.
    -
    --asmflags 'flag list'
    -	arguments to pass on each go tool asm invocation.
    --buildmode mode
    -	build mode to use. See 'go help buildmode' for more.
    --compiler name
    -	name of compiler to use, as in runtime.Compiler (gccgo or gc).
    --gccgoflags 'arg list'
    -	arguments to pass on each gccgo compiler/linker invocation.
    --gcflags 'arg list'
    -	arguments to pass on each go tool compile invocation.
    --installsuffix suffix
    -	a suffix to use in the name of the package installation directory,
    -	in order to keep output separate from default builds.
    -	If using the -race flag, the install suffix is automatically set to race
    -	or, if set explicitly, has _race appended to it.  Likewise for the -msan
    -	flag.  Using a -buildmode option that requires non-default compile flags
    -	has a similar effect.
    --ldflags 'flag list'
    -	arguments to pass on each go tool link invocation.
    --linkshared
    -	link against shared libraries previously created with
    -	-buildmode=shared.
    --pkgdir dir
    -	install and load all packages from dir instead of the usual locations.
    -	For example, when building with a non-standard configuration,
    -	use -pkgdir to keep generated packages in a separate location.
    --tags 'tag list'
    -	a list of build tags to consider satisfied during the build.
    -	For more information about build tags, see the description of
    -	build constraints in the documentation for the go/build package.
    --toolexec 'cmd args'
    -	a program to use to invoke toolchain programs like vet and asm.
    -	For example, instead of running asm, the go command will run
    -	'cmd args /path/to/asm <arguments for asm>'.
    -
    -

    -The list flags accept a space-separated list of strings. To embed spaces -in an element in the list, surround it with either single or double quotes. -

    -

    -For more about specifying packages, see 'go help packages'. -For more about where packages and binaries are installed, -run 'go help gopath'. -For more about calling between Go and C/C++, run 'go help c'. -

    -

    -Note: Build adheres to certain conventions such as those described -by 'go help gopath'. Not all projects can follow these conventions, -however. Installations that have their own conventions or that use -a separate software build system may choose to use lower-level -invocations such as 'go tool compile' and 'go tool link' to avoid -some of the overheads and design decisions of the build tool. -

    -

    -See also: go install, go get, go clean. -

    -

    Remove object files

    -

    -Usage: -

    -
    go clean [-i] [-r] [-n] [-x] [build flags] [packages]
    -
    -

    -Clean removes object files from package source directories. -The go command builds most objects in a temporary directory, -so go clean is mainly concerned with object files left by other -tools or by manual invocations of go build. -

    -

    -Specifically, clean removes the following files from each of the -source directories corresponding to the import paths: -

    -
    _obj/            old object directory, left from Makefiles
    -_test/           old test directory, left from Makefiles
    -_testmain.go     old gotest file, left from Makefiles
    -test.out         old test log, left from Makefiles
    -build.out        old test log, left from Makefiles
    -*.[568ao]        object files, left from Makefiles
    -
    -DIR(.exe)        from go build
    -DIR.test(.exe)   from go test -c
    -MAINFILE(.exe)   from go build MAINFILE.go
    -*.so             from SWIG
    -
    -

    -In the list, DIR represents the final path element of the -directory, and MAINFILE is the base name of any Go source -file in the directory that is not included when building -the package. -

    -

    -The -i flag causes clean to remove the corresponding installed -archive or binary (what 'go install' would create). -

    -

    -The -n flag causes clean to print the remove commands it would execute, -but not run them. -

    -

    -The -r flag causes clean to be applied recursively to all the -dependencies of the packages named by the import paths. -

    -

    -The -x flag causes clean to print remove commands as it executes them. -

    -

    -For more about build flags, see 'go help build'. -

    -

    -For more about specifying packages, see 'go help packages'. -

    -

    Show documentation for package or symbol

    -

    -Usage: -

    -
    go doc [-u] [-c] [package|[package.]symbol[.method]]
    -
    -

    -Doc prints the documentation comments associated with the item identified by its -arguments (a package, const, func, type, var, or method) followed by a one-line -summary of each of the first-level items "under" that item (package-level -declarations for a package, methods for a type, etc.). -

    -

    -Doc accepts zero, one, or two arguments. -

    -

    -Given no arguments, that is, when run as -

    -
    go doc
    -
    -

    -it prints the package documentation for the package in the current directory. -If the package is a command (package main), the exported symbols of the package -are elided from the presentation unless the -cmd flag is provided. -

    -

    -When run with one argument, the argument is treated as a Go-syntax-like -representation of the item to be documented. What the argument selects depends -on what is installed in GOROOT and GOPATH, as well as the form of the argument, -which is schematically one of these: -

    -
    go doc <pkg>
    -go doc <sym>[.<method>]
    -go doc [<pkg>.]<sym>[.<method>]
    -go doc [<pkg>.][<sym>.]<method>
    -
    -

    -The first item in this list matched by the argument is the one whose documentation -is printed. (See the examples below.) However, if the argument starts with a capital -letter it is assumed to identify a symbol or method in the current directory. -

    -

    -For packages, the order of scanning is determined lexically in breadth-first order. -That is, the package presented is the one that matches the search and is nearest -the root and lexically first at its level of the hierarchy. The GOROOT tree is -always scanned in its entirety before GOPATH. -

    -

    -If there is no package specified or matched, the package in the current -directory is selected, so "go doc Foo" shows the documentation for symbol Foo in -the current package. -

    -

    -The package path must be either a qualified path or a proper suffix of a -path. The go tool's usual package mechanism does not apply: package path -elements like . and ... are not implemented by go doc. -

    -

    -When run with two arguments, the first must be a full package path (not just a -suffix), and the second is a symbol or symbol and method; this is similar to the -syntax accepted by godoc: -

    -
    go doc <pkg> <sym>[.<method>]
    -
    -

    -In all forms, when matching symbols, lower-case letters in the argument match -either case but upper-case letters match exactly. This means that there may be -multiple matches of a lower-case argument in a package if different symbols have -different cases. If this occurs, documentation for all matches is printed. -

    -

    -Examples: -

    -
    go doc
    -	Show documentation for current package.
    -go doc Foo
    -	Show documentation for Foo in the current package.
    -	(Foo starts with a capital letter so it cannot match
    -	a package path.)
    -go doc encoding/json
    -	Show documentation for the encoding/json package.
    -go doc json
    -	Shorthand for encoding/json.
    -go doc json.Number (or go doc json.number)
    -	Show documentation and method summary for json.Number.
    -go doc json.Number.Int64 (or go doc json.number.int64)
    -	Show documentation for json.Number's Int64 method.
    -go doc cmd/doc
    -	Show package docs for the doc command.
    -go doc -cmd cmd/doc
    -	Show package docs and exported symbols within the doc command.
    -go doc template.new
    -	Show documentation for html/template's New function.
    -	(html/template is lexically before text/template)
    -go doc text/template.new # One argument
    -	Show documentation for text/template's New function.
    -go doc text/template new # Two arguments
    -	Show documentation for text/template's New function.
    -
    -At least in the current tree, these invocations all print the
    -documentation for json.Decoder's Decode method:
    -
    -go doc json.Decoder.Decode
    -go doc json.decoder.decode
    -go doc json.decode
    -cd go/src/encoding/json; go doc decode
    -
    -

    -Flags: -

    -
    -c
    -	Respect case when matching symbols.
    --cmd
    -	Treat a command (package main) like a regular package.
    -	Otherwise package main's exported symbols are hidden
    -	when showing the package's top-level documentation.
    --u
    -	Show documentation for unexported as well as exported
    -	symbols and methods.
    -
    -

    Print Go environment information

    -

    -Usage: -

    -
    go env [var ...]
    -
    -

    -Env prints Go environment information. -

    -

    -By default env prints information as a shell script -(on Windows, a batch file). If one or more variable -names is given as arguments, env prints the value of -each named variable on its own line. -

    -

    Start a bug report

    -

    -Usage: -

    -
    go bug
    -
    -

    -Bug opens the default browser and starts a new bug report. -The report includes useful system information. -

    -

    Run go tool fix on packages

    -

    -Usage: -

    -
    go fix [packages]
    -
    -

    -Fix runs the Go fix command on the packages named by the import paths. -

    -

    -For more about fix, see 'go doc cmd/fix'. -For more about specifying packages, see 'go help packages'. -

    -

    -To run fix with specific options, run 'go tool fix'. -

    -

    -See also: go fmt, go vet. -

    -

    Run gofmt on package sources

    -

    -Usage: -

    -
    go fmt [-n] [-x] [packages]
    -
    -

    -Fmt runs the command 'gofmt -l -w' on the packages named -by the import paths. It prints the names of the files that are modified. -

    -

    -For more about gofmt, see 'go doc cmd/gofmt'. -For more about specifying packages, see 'go help packages'. -

    -

    -The -n flag prints commands that would be executed. -The -x flag prints commands as they are executed. -

    -

    -To run gofmt with specific options, run gofmt itself. -

    -

    -See also: go fix, go vet. -

    -

    Generate Go files by processing source

    -

    -Usage: -

    -
    go generate [-run regexp] [-n] [-v] [-x] [build flags] [file.go... | packages]
    -
    -

    -Generate runs commands described by directives within existing -files. Those commands can run any process but the intent is to -create or update Go source files. -

    -

    -Go generate is never run automatically by go build, go get, go test, -and so on. It must be run explicitly. -

    -

    -Go generate scans the file for directives, which are lines of -the form, -

    -
    //go:generate command argument...
    -
    -

    -(note: no leading spaces and no space in "//go") where command -is the generator to be run, corresponding to an executable file -that can be run locally. It must either be in the shell path -(gofmt), a fully qualified path (/usr/you/bin/mytool), or a -command alias, described below. -

    -

    -Note that go generate does not parse the file, so lines that look -like directives in comments or multiline strings will be treated -as directives. -

    -

    -The arguments to the directive are space-separated tokens or -double-quoted strings passed to the generator as individual -arguments when it is run. -

    -

    -Quoted strings use Go syntax and are evaluated before execution; a -quoted string appears as a single argument to the generator. -

    -

    -Go generate sets several variables when it runs the generator: -

    -
    $GOARCH
    -	The execution architecture (arm, amd64, etc.)
    -$GOOS
    -	The execution operating system (linux, windows, etc.)
    -$GOFILE
    -	The base name of the file.
    -$GOLINE
    -	The line number of the directive in the source file.
    -$GOPACKAGE
    -	The name of the package of the file containing the directive.
    -$DOLLAR
    -	A dollar sign.
    -
    -

    -Other than variable substitution and quoted-string evaluation, no -special processing such as "globbing" is performed on the command -line. -

    -

    -As a last step before running the command, any invocations of any -environment variables with alphanumeric names, such as $GOFILE or -$HOME, are expanded throughout the command line. The syntax for -variable expansion is $NAME on all operating systems. Due to the -order of evaluation, variables are expanded even inside quoted -strings. If the variable NAME is not set, $NAME expands to the -empty string. -

    -

    -A directive of the form, -

    -
    //go:generate -command xxx args...
    -
    -

    -specifies, for the remainder of this source file only, that the -string xxx represents the command identified by the arguments. This -can be used to create aliases or to handle multiword generators. -For example, -

    -
    //go:generate -command foo go tool foo
    -
    -

    -specifies that the command "foo" represents the generator -"go tool foo". -

    -

    -Generate processes packages in the order given on the command line, -one at a time. If the command line lists .go files, they are treated -as a single package. Within a package, generate processes the -source files in a package in file name order, one at a time. Within -a source file, generate runs generators in the order they appear -in the file, one at a time. -

    -

    -If any generator returns an error exit status, "go generate" skips -all further processing for that package. -

    -

    -The generator is run in the package's source directory. -

    -

    -Go generate accepts one specific flag: -

    -
    -run=""
    -	if non-empty, specifies a regular expression to select
    -	directives whose full original source text (excluding
    -	any trailing spaces and final newline) matches the
    -	expression.
    -
    -

    -It also accepts the standard build flags including -v, -n, and -x. -The -v flag prints the names of packages and files as they are -processed. -The -n flag prints commands that would be executed. -The -x flag prints commands as they are executed. -

    -

    -For more about build flags, see 'go help build'. -

    -

    -For more about specifying packages, see 'go help packages'. -

    -

    Download and install packages and dependencies

    -

    -Usage: -

    -
    go get [-d] [-f] [-fix] [-insecure] [-t] [-u] [build flags] [packages]
    -
    -

    -Get downloads the packages named by the import paths, along with their -dependencies. It then installs the named packages, like 'go install'. -

    -

    -The -d flag instructs get to stop after downloading the packages; that is, -it instructs get not to install the packages. -

    -

    -The -f flag, valid only when -u is set, forces get -u not to verify that -each package has been checked out from the source control repository -implied by its import path. This can be useful if the source is a local fork -of the original. -

    -

    -The -fix flag instructs get to run the fix tool on the downloaded packages -before resolving dependencies or building the code. -

    -

    -The -insecure flag permits fetching from repositories and resolving -custom domains using insecure schemes such as HTTP. Use with caution. -

    -

    -The -t flag instructs get to also download the packages required to build -the tests for the specified packages. -

    -

    -The -u flag instructs get to use the network to update the named packages -and their dependencies. By default, get uses the network to check out -missing packages but does not use it to look for updates to existing packages. -

    -

    -The -v flag enables verbose progress and debug output. -

    -

    -Get also accepts build flags to control the installation. See 'go help build'. -

    -

    -When checking out a new package, get creates the target directory -GOPATH/src/<import-path>. If the GOPATH contains multiple entries, -get uses the first one. For more details see: 'go help gopath'. -

    -

    -When checking out or updating a package, get looks for a branch or tag -that matches the locally installed version of Go. The most important -rule is that if the local installation is running version "go1", get -searches for a branch or tag named "go1". If no such version exists it -retrieves the most recent version of the package. -

    -

    -When go get checks out or updates a Git repository, -it also updates any git submodules referenced by the repository. -

    -

    -Get never checks out or updates code stored in vendor directories. -

    -

    -For more about specifying packages, see 'go help packages'. -

    -

    -For more about how 'go get' finds source code to -download, see 'go help importpath'. -

    -

    -See also: go build, go install, go clean. -

    -

    Compile and install packages and dependencies

    -

    -Usage: -

    -
    go install [build flags] [packages]
    -
    -

    -Install compiles and installs the packages named by the import paths, -along with their dependencies. -

    -

    -For more about the build flags, see 'go help build'. -For more about specifying packages, see 'go help packages'. -

    -

    -See also: go build, go get, go clean. -

    -

    List packages

    -

    -Usage: -

    -
    go list [-e] [-f format] [-json] [build flags] [packages]
    -
    -

    -List lists the packages named by the import paths, one per line. -

    -

    -The default output shows the package import path: -

    -
    bytes
    -encoding/json
    -github.com/gorilla/mux
    -golang.org/x/net/html
    -
    -

    -The -f flag specifies an alternate format for the list, using the -syntax of package template. The default output is equivalent to -f -''. The struct being passed to the template is: -

    -
    type Package struct {
    -    Dir           string // directory containing package sources
    -    ImportPath    string // import path of package in dir
    -    ImportComment string // path in import comment on package statement
    -    Name          string // package name
    -    Doc           string // package documentation string
    -    Target        string // install path
    -    Shlib         string // the shared library that contains this package (only set when -linkshared)
    -    Goroot        bool   // is this package in the Go root?
    -    Standard      bool   // is this package part of the standard Go library?
    -    Stale         bool   // would 'go install' do anything for this package?
    -    StaleReason   string // explanation for Stale==true
    -    Root          string // Go root or Go path dir containing this package
    -    ConflictDir   string // this directory shadows Dir in $GOPATH
    -    BinaryOnly    bool   // binary-only package: cannot be recompiled from sources
    -
    -    // Source files
    -    GoFiles        []string // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles)
    -    CgoFiles       []string // .go sources files that import "C"
    -    IgnoredGoFiles []string // .go sources ignored due to build constraints
    -    CFiles         []string // .c source files
    -    CXXFiles       []string // .cc, .cxx and .cpp source files
    -    MFiles         []string // .m source files
    -    HFiles         []string // .h, .hh, .hpp and .hxx source files
    -    FFiles         []string // .f, .F, .for and .f90 Fortran source files
    -    SFiles         []string // .s source files
    -    SwigFiles      []string // .swig files
    -    SwigCXXFiles   []string // .swigcxx files
    -    SysoFiles      []string // .syso object files to add to archive
    -    TestGoFiles    []string // _test.go files in package
    -    XTestGoFiles   []string // _test.go files outside package
    -
    -    // Cgo directives
    -    CgoCFLAGS    []string // cgo: flags for C compiler
    -    CgoCPPFLAGS  []string // cgo: flags for C preprocessor
    -    CgoCXXFLAGS  []string // cgo: flags for C++ compiler
    -    CgoFFLAGS    []string // cgo: flags for Fortran compiler
    -    CgoLDFLAGS   []string // cgo: flags for linker
    -    CgoPkgConfig []string // cgo: pkg-config names
    -
    -    // Dependency information
    -    Imports      []string // import paths used by this package
    -    Deps         []string // all (recursively) imported dependencies
    -    TestImports  []string // imports from TestGoFiles
    -    XTestImports []string // imports from XTestGoFiles
    -
    -    // Error information
    -    Incomplete bool            // this package or a dependency has an error
    -    Error      *PackageError   // error loading package
    -    DepsErrors []*PackageError // errors loading dependencies
    -}
    -
    -

    -Packages stored in vendor directories report an ImportPath that includes the -path to the vendor directory (for example, "d/vendor/p" instead of "p"), -so that the ImportPath uniquely identifies a given copy of a package. -The Imports, Deps, TestImports, and XTestImports lists also contain these -expanded imports paths. See golang.org/s/go15vendor for more about vendoring. -

    -

    -The error information, if any, is -

    -
    type PackageError struct {
    -    ImportStack   []string // shortest path from package named on command line to this one
    -    Pos           string   // position of error (if present, file:line:col)
    -    Err           string   // the error itself
    -}
    -
    -

    -The template function "join" calls strings.Join. -

    -

    -The template function "context" returns the build context, defined as: -

    -
    type Context struct {
    -	GOARCH        string   // target architecture
    -	GOOS          string   // target operating system
    -	GOROOT        string   // Go root
    -	GOPATH        string   // Go path
    -	CgoEnabled    bool     // whether cgo can be used
    -	UseAllFiles   bool     // use files regardless of +build lines, file names
    -	Compiler      string   // compiler to assume when computing target paths
    -	BuildTags     []string // build constraints to match in +build lines
    -	ReleaseTags   []string // releases the current release is compatible with
    -	InstallSuffix string   // suffix to use in the name of the install dir
    -}
    -
    -

    -For more information about the meaning of these fields see the documentation -for the go/build package's Context type. -

    -

    -The -json flag causes the package data to be printed in JSON format -instead of using the template format. -

    -

    -The -e flag changes the handling of erroneous packages, those that -cannot be found or are malformed. By default, the list command -prints an error to standard error for each erroneous package and -omits the packages from consideration during the usual printing. -With the -e flag, the list command never prints errors to standard -error and instead processes the erroneous packages with the usual -printing. Erroneous packages will have a non-empty ImportPath and -a non-nil Error field; other information may or may not be missing -(zeroed). -

    -

    -For more about build flags, see 'go help build'. -

    -

    -For more about specifying packages, see 'go help packages'. -

    -

    Compile and run Go program

    -

    -Usage: -

    -
    go run [build flags] [-exec xprog] gofiles... [arguments...]
    -
    -

    -Run compiles and runs the main package comprising the named Go source files. -A Go source file is defined to be a file ending in a literal ".go" suffix. -

    -

    -By default, 'go run' runs the compiled binary directly: 'a.out arguments...'. -If the -exec flag is given, 'go run' invokes the binary using xprog: -

    -
    'xprog a.out arguments...'.
    -
    -

    -If the -exec flag is not given, GOOS or GOARCH is different from the system -default, and a program named go_$GOOS_$GOARCH_exec can be found -on the current search path, 'go run' invokes the binary using that program, -for example 'go_nacl_386_exec a.out arguments...'. This allows execution of -cross-compiled programs when a simulator or other execution method is -available. -

    -

    -For more about build flags, see 'go help build'. -

    -

    -See also: go build. -

    -

    Test packages

    -

    -Usage: -

    -
    go test [build/test flags] [packages] [build/test flags & test binary flags]
    -
    -

    -'Go test' automates testing the packages named by the import paths. -It prints a summary of the test results in the format: -

    -
    ok   archive/tar   0.011s
    -FAIL archive/zip   0.022s
    -ok   compress/gzip 0.033s
    -...
    -
    -

    -followed by detailed output for each failed package. -

    -

    -'Go test' recompiles each package along with any files with names matching -the file pattern "*_test.go". -Files whose names begin with "_" (including "_test.go") or "." are ignored. -These additional files can contain test functions, benchmark functions, and -example functions. See 'go help testfunc' for more. -Each listed package causes the execution of a separate test binary. -

    -

    -Test files that declare a package with the suffix "_test" will be compiled as a -separate package, and then linked and run with the main test binary. -

    -

    -The go tool will ignore a directory named "testdata", making it available -to hold ancillary data needed by the tests. -

    -

    -By default, go test needs no arguments. It compiles and tests the package -with source in the current directory, including tests, and runs the tests. -

    -

    -The package is built in a temporary directory so it does not interfere with the -non-test installation. -

    -

    -In addition to the build flags, the flags handled by 'go test' itself are: -

    -
    -args
    -    Pass the remainder of the command line (everything after -args)
    -    to the test binary, uninterpreted and unchanged.
    -    Because this flag consumes the remainder of the command line,
    -    the package list (if present) must appear before this flag.
    -
    --c
    -    Compile the test binary to pkg.test but do not run it
    -    (where pkg is the last element of the package's import path).
    -    The file name can be changed with the -o flag.
    -
    --exec xprog
    -    Run the test binary using xprog. The behavior is the same as
    -    in 'go run'. See 'go help run' for details.
    -
    --i
    -    Install packages that are dependencies of the test.
    -    Do not run the test.
    -
    --o file
    -    Compile the test binary to the named file.
    -    The test still runs (unless -c or -i is specified).
    -
    -

    -The test binary also accepts flags that control execution of the test; these -flags are also accessible by 'go test'. See 'go help testflag' for details. -

    -

    -For more about build flags, see 'go help build'. -For more about specifying packages, see 'go help packages'. -

    -

    -See also: go build, go vet. -

    -

    Run specified go tool

    -

    -Usage: -

    -
    go tool [-n] command [args...]
    -
    -

    -Tool runs the go tool command identified by the arguments. -With no arguments it prints the list of known tools. -

    -

    -The -n flag causes tool to print the command that would be -executed but not execute it. -

    -

    -For more about each tool command, see 'go tool command -h'. -

    -

    Print Go version

    -

    -Usage: -

    -
    go version
    -
    -

    -Version prints the Go version, as reported by runtime.Version. -

    -

    Run go tool vet on packages

    -

    -Usage: -

    -
    go vet [-n] [-x] [build flags] [packages]
    -
    -

    -Vet runs the Go vet command on the packages named by the import paths. -

    -

    -For more about vet, see 'go doc cmd/vet'. -For more about specifying packages, see 'go help packages'. -

    -

    -To run the vet tool with specific options, run 'go tool vet'. -

    -

    -The -n flag prints commands that would be executed. -The -x flag prints commands as they are executed. -

    -

    -For more about build flags, see 'go help build'. -

    -

    -See also: go fmt, go fix. -

    -

    Calling between Go and C

    -

    -There are two different ways to call between Go and C/C++ code. -

    -

    -The first is the cgo tool, which is part of the Go distribution. For -information on how to use it see the cgo documentation (go doc cmd/cgo). -

    -

    -The second is the SWIG program, which is a general tool for -interfacing between languages. For information on SWIG see -http://swig.org/. When running go build, any file with a .swig -extension will be passed to SWIG. Any file with a .swigcxx extension -will be passed to SWIG with the -c++ option. -

    -

    -When either cgo or SWIG is used, go build will pass any .c, .m, .s, -or .S files to the C compiler, and any .cc, .cpp, .cxx files to the C++ -compiler. The CC or CXX environment variables may be set to determine -the C or C++ compiler, respectively, to use. -

    -

    Description of build modes

    -

    -The 'go build' and 'go install' commands take a -buildmode argument which -indicates which kind of object file is to be built. Currently supported values -are: -

    -
    -buildmode=archive
    -	Build the listed non-main packages into .a files. Packages named
    -	main are ignored.
    -
    --buildmode=c-archive
    -	Build the listed main package, plus all packages it imports,
    -	into a C archive file. The only callable symbols will be those
    -	functions exported using a cgo //export comment. Requires
    -	exactly one main package to be listed.
    -
    --buildmode=c-shared
    -	Build the listed main packages, plus all packages that they
    -	import, into C shared libraries. The only callable symbols will
    -	be those functions exported using a cgo //export comment.
    -	Non-main packages are ignored.
    -
    --buildmode=default
    -	Listed main packages are built into executables and listed
    -	non-main packages are built into .a files (the default
    -	behavior).
    -
    --buildmode=shared
    -	Combine all the listed non-main packages into a single shared
    -	library that will be used when building with the -linkshared
    -	option. Packages named main are ignored.
    -
    --buildmode=exe
    -	Build the listed main packages and everything they import into
    -	executables. Packages not named main are ignored.
    -
    --buildmode=pie
    -	Build the listed main packages and everything they import into
    -	position independent executables (PIE). Packages not named
    -	main are ignored.
    -
    --buildmode=plugin
    -	Build the listed main packages, plus all packages that they
    -	import, into a Go plugin. Packages not named main are ignored.
    -
    -

    File types

    -

    -The go command examines the contents of a restricted set of files -in each directory. It identifies which files to examine based on -the extension of the file name. These extensions are: -

    -
    .go
    -	Go source files.
    -.c, .h
    -	C source files.
    -	If the package uses cgo or SWIG, these will be compiled with the
    -	OS-native compiler (typically gcc); otherwise they will
    -	trigger an error.
    -.cc, .cpp, .cxx, .hh, .hpp, .hxx
    -	C++ source files. Only useful with cgo or SWIG, and always
    -	compiled with the OS-native compiler.
    -.m
    -	Objective-C source files. Only useful with cgo, and always
    -	compiled with the OS-native compiler.
    -.s, .S
    -	Assembler source files.
    -	If the package uses cgo or SWIG, these will be assembled with the
    -	OS-native assembler (typically gcc (sic)); otherwise they
    -	will be assembled with the Go assembler.
    -.swig, .swigcxx
    -	SWIG definition files.
    -.syso
    -	System object files.
    -
    -

    -Files of each of these types except .syso may contain build -constraints, but the go command stops scanning for build constraints -at the first item in the file that is not a blank line or //-style -line comment. See the go/build package documentation for -more details. -

    -

    -Non-test Go source files can also include a //go:binary-only-package -comment, indicating that the package sources are included -for documentation only and must not be used to build the -package binary. This enables distribution of Go packages in -their compiled form alone. See the go/build package documentation -for more details. -

    -

    GOPATH environment variable

    -

    -The Go path is used to resolve import statements. -It is implemented by and documented in the go/build package. -

    -

    -The GOPATH environment variable lists places to look for Go code. -On Unix, the value is a colon-separated string. -On Windows, the value is a semicolon-separated string. -On Plan 9, the value is a list. -

    -

    -If the environment variable is unset, GOPATH defaults -to a subdirectory named "go" in the user's home directory -($HOME/go on Unix, %USERPROFILE%\go on Windows), -unless that directory holds a Go distribution. -Run "go env GOPATH" to see the current GOPATH. -

    -

    -See https://golang.org/wiki/SettingGOPATH to set a custom GOPATH. -

    -

    -Each directory listed in GOPATH must have a prescribed structure: -

    -

    -The src directory holds source code. The path below src -determines the import path or executable name. -

    -

    -The pkg directory holds installed package objects. -As in the Go tree, each target operating system and -architecture pair has its own subdirectory of pkg -(pkg/GOOS_GOARCH). -

    -

    -If DIR is a directory listed in the GOPATH, a package with -source in DIR/src/foo/bar can be imported as "foo/bar" and -has its compiled form installed to "DIR/pkg/GOOS_GOARCH/foo/bar.a". -

    -

    -The bin directory holds compiled commands. -Each command is named for its source directory, but only -the final element, not the entire path. That is, the -command with source in DIR/src/foo/quux is installed into -DIR/bin/quux, not DIR/bin/foo/quux. The "foo/" prefix is stripped -so that you can add DIR/bin to your PATH to get at the -installed commands. If the GOBIN environment variable is -set, commands are installed to the directory it names instead -of DIR/bin. GOBIN must be an absolute path. -

    -

    -Here's an example directory layout: -

    -
    GOPATH=/home/user/go
    -
    -/home/user/go/
    -    src/
    -        foo/
    -            bar/               (go code in package bar)
    -                x.go
    -            quux/              (go code in package main)
    -                y.go
    -    bin/
    -        quux                   (installed command)
    -    pkg/
    -        linux_amd64/
    -            foo/
    -                bar.a          (installed package object)
    -
    -

    -Go searches each directory listed in GOPATH to find source code, -but new packages are always downloaded into the first directory -in the list. -

    -

    -See https://golang.org/doc/code.html for an example. -

    -

    Internal Directories

    -

    -Code in or below a directory named "internal" is importable only -by code in the directory tree rooted at the parent of "internal". -Here's an extended version of the directory layout above: -

    -
    /home/user/go/
    -    src/
    -        crash/
    -            bang/              (go code in package bang)
    -                b.go
    -        foo/                   (go code in package foo)
    -            f.go
    -            bar/               (go code in package bar)
    -                x.go
    -            internal/
    -                baz/           (go code in package baz)
    -                    z.go
    -            quux/              (go code in package main)
    -                y.go
    -
    -

    -The code in z.go is imported as "foo/internal/baz", but that -import statement can only appear in source files in the subtree -rooted at foo. The source files foo/f.go, foo/bar/x.go, and -foo/quux/y.go can all import "foo/internal/baz", but the source file -crash/bang/b.go cannot. -

    -

    -See https://golang.org/s/go14internal for details. -

    -

    Vendor Directories

    -

    -Go 1.6 includes support for using local copies of external dependencies -to satisfy imports of those dependencies, often referred to as vendoring. -

    -

    -Code below a directory named "vendor" is importable only -by code in the directory tree rooted at the parent of "vendor", -and only using an import path that omits the prefix up to and -including the vendor element. -

    -

    -Here's the example from the previous section, -but with the "internal" directory renamed to "vendor" -and a new foo/vendor/crash/bang directory added: -

    -
    /home/user/go/
    -    src/
    -        crash/
    -            bang/              (go code in package bang)
    -                b.go
    -        foo/                   (go code in package foo)
    -            f.go
    -            bar/               (go code in package bar)
    -                x.go
    -            vendor/
    -                crash/
    -                    bang/      (go code in package bang)
    -                        b.go
    -                baz/           (go code in package baz)
    -                    z.go
    -            quux/              (go code in package main)
    -                y.go
    -
    -

    -The same visibility rules apply as for internal, but the code -in z.go is imported as "baz", not as "foo/vendor/baz". -

    -

    -Code in vendor directories deeper in the source tree shadows -code in higher directories. Within the subtree rooted at foo, an import -of "crash/bang" resolves to "foo/vendor/crash/bang", not the -top-level "crash/bang". -

    -

    -Code in vendor directories is not subject to import path -checking (see 'go help importpath'). -

    -

    -When 'go get' checks out or updates a git repository, it now also -updates submodules. -

    -

    -Vendor directories do not affect the placement of new repositories -being checked out for the first time by 'go get': those are always -placed in the main GOPATH, never in a vendor subtree. -

    -

    -See https://golang.org/s/go15vendor for details. -

    -

    Environment variables

    -

    -The go command, and the tools it invokes, examine a few different -environment variables. For many of these, you can see the default -value of on your system by running 'go env NAME', where NAME is the -name of the variable. -

    -

    -General-purpose environment variables: -

    -
    GCCGO
    -	The gccgo command to run for 'go build -compiler=gccgo'.
    -GOARCH
    -	The architecture, or processor, for which to compile code.
    -	Examples are amd64, 386, arm, ppc64.
    -GOBIN
    -	The directory where 'go install' will install a command.
    -GOOS
    -	The operating system for which to compile code.
    -	Examples are linux, darwin, windows, netbsd.
    -GOPATH
    -	For more details see: 'go help gopath'.
    -GORACE
    -	Options for the race detector.
    -	See https://golang.org/doc/articles/race_detector.html.
    -GOROOT
    -	The root of the go tree.
    -
    -

    -Environment variables for use with cgo: -

    -
    CC
    -	The command to use to compile C code.
    -CGO_ENABLED
    -	Whether the cgo command is supported.  Either 0 or 1.
    -CGO_CFLAGS
    -	Flags that cgo will pass to the compiler when compiling
    -	C code.
    -CGO_CPPFLAGS
    -	Flags that cgo will pass to the compiler when compiling
    -	C or C++ code.
    -CGO_CXXFLAGS
    -	Flags that cgo will pass to the compiler when compiling
    -	C++ code.
    -CGO_FFLAGS
    -	Flags that cgo will pass to the compiler when compiling
    -	Fortran code.
    -CGO_LDFLAGS
    -	Flags that cgo will pass to the compiler when linking.
    -CXX
    -	The command to use to compile C++ code.
    -PKG_CONFIG
    -	Path to pkg-config tool.
    -
    -

    -Architecture-specific environment variables: -

    -
    GOARM
    -	For GOARCH=arm, the ARM architecture for which to compile.
    -	Valid values are 5, 6, 7.
    -GO386
    -	For GOARCH=386, the floating point instruction set.
    -	Valid values are 387, sse2.
    -
    -

    -Special-purpose environment variables: -

    -
    GOROOT_FINAL
    -	The root of the installed Go tree, when it is
    -	installed in a location other than where it is built.
    -	File names in stack traces are rewritten from GOROOT to
    -	GOROOT_FINAL.
    -GO_EXTLINK_ENABLED
    -	Whether the linker should use external linking mode
    -	when using -linkmode=auto with code that uses cgo.
    -	Set to 0 to disable external linking mode, 1 to enable it.
    -GIT_ALLOW_PROTOCOL
    -	Defined by Git. A colon-separated list of schemes that are allowed to be used
    -	with git fetch/clone. If set, any scheme not explicitly mentioned will be
    -	considered insecure by 'go get'.
    -
    -

    Import path syntax

    -

    -An import path (see 'go help packages') denotes a package stored in the local -file system. In general, an import path denotes either a standard package (such -as "unicode/utf8") or a package found in one of the work spaces (For more -details see: 'go help gopath'). -

    -

    Relative import paths

    -

    -An import path beginning with ./ or ../ is called a relative path. -The toolchain supports relative import paths as a shortcut in two ways. -

    -

    -First, a relative path can be used as a shorthand on the command line. -If you are working in the directory containing the code imported as -"unicode" and want to run the tests for "unicode/utf8", you can type -"go test ./utf8" instead of needing to specify the full path. -Similarly, in the reverse situation, "go test .." will test "unicode" from -the "unicode/utf8" directory. Relative patterns are also allowed, like -"go test ./..." to test all subdirectories. See 'go help packages' for details -on the pattern syntax. -

    -

    -Second, if you are compiling a Go program not in a work space, -you can use a relative path in an import statement in that program -to refer to nearby code also not in a work space. -This makes it easy to experiment with small multipackage programs -outside of the usual work spaces, but such programs cannot be -installed with "go install" (there is no work space in which to install them), -so they are rebuilt from scratch each time they are built. -To avoid ambiguity, Go programs cannot use relative import paths -within a work space. -

    -

    Remote import paths

    -

    -Certain import paths also -describe how to obtain the source code for the package using -a revision control system. -

    -

    -A few common code hosting sites have special syntax: -

    -
    Bitbucket (Git, Mercurial)
    -
    -	import "bitbucket.org/user/project"
    -	import "bitbucket.org/user/project/sub/directory"
    -
    -GitHub (Git)
    -
    -	import "github.com/user/project"
    -	import "github.com/user/project/sub/directory"
    -
    -Launchpad (Bazaar)
    -
    -	import "launchpad.net/project"
    -	import "launchpad.net/project/series"
    -	import "launchpad.net/project/series/sub/directory"
    -
    -	import "launchpad.net/~user/project/branch"
    -	import "launchpad.net/~user/project/branch/sub/directory"
    -
    -IBM DevOps Services (Git)
    -
    -	import "hub.jazz.net/git/user/project"
    -	import "hub.jazz.net/git/user/project/sub/directory"
    -
    -

    -For code hosted on other servers, import paths may either be qualified -with the version control type, or the go tool can dynamically fetch -the import path over https/http and discover where the code resides -from a <meta> tag in the HTML. -

    -

    -To declare the code location, an import path of the form -

    -
    repository.vcs/path
    -
    -

    -specifies the given repository, with or without the .vcs suffix, -using the named version control system, and then the path inside -that repository. The supported version control systems are: -

    -
    Bazaar      .bzr
    -Git         .git
    -Mercurial   .hg
    -Subversion  .svn
    -
    -

    -For example, -

    -
    import "example.org/user/foo.hg"
    -
    -

    -denotes the root directory of the Mercurial repository at -example.org/user/foo or foo.hg, and -

    -
    import "example.org/repo.git/foo/bar"
    -
    -

    -denotes the foo/bar directory of the Git repository at -example.org/repo or repo.git. -

    -

    -When a version control system supports multiple protocols, -each is tried in turn when downloading. For example, a Git -download tries https://, then git+ssh://. -

    -

    -By default, downloads are restricted to known secure protocols -(e.g. https, ssh). To override this setting for Git downloads, the -GIT_ALLOW_PROTOCOL environment variable can be set (For more details see: -'go help environment'). -

    -

    -If the import path is not a known code hosting site and also lacks a -version control qualifier, the go tool attempts to fetch the import -over https/http and looks for a <meta> tag in the document's HTML -<head>. -

    -

    -The meta tag has the form: -

    -
    <meta name="go-import" content="import-prefix vcs repo-root">
    -
    -

    -The import-prefix is the import path corresponding to the repository -root. It must be a prefix or an exact match of the package being -fetched with "go get". If it's not an exact match, another http -request is made at the prefix to verify the <meta> tags match. -

    -

    -The meta tag should appear as early in the file as possible. -In particular, it should appear before any raw JavaScript or CSS, -to avoid confusing the go command's restricted parser. -

    -

    -The vcs is one of "git", "hg", "svn", etc, -

    -

    -The repo-root is the root of the version control system -containing a scheme and not containing a .vcs qualifier. -

    -

    -For example, -

    -
    import "example.org/pkg/foo"
    -
    -

    -will result in the following requests: -

    -
    https://example.org/pkg/foo?go-get=1 (preferred)
    -http://example.org/pkg/foo?go-get=1  (fallback, only with -insecure)
    -
    -

    -If that page contains the meta tag -

    -
    <meta name="go-import" content="example.org git https://code.org/r/p/exproj">
    -
    -

    -the go tool will verify that https://example.org/?go-get=1 contains the -same meta tag and then git clone https://code.org/r/p/exproj into -GOPATH/src/example.org. -

    -

    -New downloaded packages are written to the first directory listed in the GOPATH -environment variable (For more details see: 'go help gopath'). -

    -

    -The go command attempts to download the version of the -package appropriate for the Go release being used. -Run 'go help get' for more. -

    -

    Import path checking

    -

    -When the custom import path feature described above redirects to a -known code hosting site, each of the resulting packages has two possible -import paths, using the custom domain or the known hosting site. -

    -

    -A package statement is said to have an "import comment" if it is immediately -followed (before the next newline) by a comment of one of these two forms: -

    -
    package math // import "path"
    -package math /* import "path" */
    -
    -

    -The go command will refuse to install a package with an import comment -unless it is being referred to by that import path. In this way, import comments -let package authors make sure the custom import path is used and not a -direct path to the underlying code hosting site. -

    -

    -Import path checking is disabled for code found within vendor trees. -This makes it possible to copy code into alternate locations in vendor trees -without needing to update import comments. -

    -

    -See https://golang.org/s/go14customimport for details. -

    -

    Description of package lists

    -

    -Many commands apply to a set of packages: -

    -
    go action [packages]
    -
    -

    -Usually, [packages] is a list of import paths. -

    -

    -An import path that is a rooted path or that begins with -a . or .. element is interpreted as a file system path and -denotes the package in that directory. -

    -

    -Otherwise, the import path P denotes the package found in -the directory DIR/src/P for some DIR listed in the GOPATH -environment variable (For more details see: 'go help gopath'). -

    -

    -If no import paths are given, the action applies to the -package in the current directory. -

    -

    -There are four reserved names for paths that should not be used -for packages to be built with the go tool: -

    -

    -- "main" denotes the top-level package in a stand-alone executable. -

    -

    -- "all" expands to all package directories found in all the GOPATH -trees. For example, 'go list all' lists all the packages on the local -system. -

    -

    -- "std" is like all but expands to just the packages in the standard -Go library. -

    -

    -- "cmd" expands to the Go repository's commands and their -internal libraries. -

    -

    -Import paths beginning with "cmd/" only match source code in -the Go repository. -

    -

    -An import path is a pattern if it includes one or more "..." wildcards, -each of which can match any string, including the empty string and -strings containing slashes. Such a pattern expands to all package -directories found in the GOPATH trees with names matching the -patterns. As a special case, x/... matches x as well as x's subdirectories. -For example, net/... expands to net and packages in its subdirectories. -

    -

    -An import path can also name a package to be downloaded from -a remote repository. Run 'go help importpath' for details. -

    -

    -Every package in a program must have a unique import path. -By convention, this is arranged by starting each path with a -unique prefix that belongs to you. For example, paths used -internally at Google all begin with 'google', and paths -denoting remote repositories begin with the path to the code, -such as 'github.com/user/repo'. -

    -

    -Packages in a program need not have unique package names, -but there are two reserved package names with special meaning. -The name main indicates a command, not a library. -Commands are built into binaries and cannot be imported. -The name documentation indicates documentation for -a non-Go program in the directory. Files in package documentation -are ignored by the go command. -

    -

    -As a special case, if the package list is a list of .go files from a -single directory, the command is applied to a single synthesized -package made up of exactly those files, ignoring any build constraints -in those files and ignoring any other files in the directory. -

    -

    -Directory and file names that begin with "." or "_" are ignored -by the go tool, as are directories named "testdata". -

    -

    Description of testing flags

    -

    -The 'go test' command takes both flags that apply to 'go test' itself -and flags that apply to the resulting test binary. -

    -

    -Several of the flags control profiling and write an execution profile -suitable for "go tool pprof"; run "go tool pprof -h" for more -information. The --alloc_space, --alloc_objects, and --show_bytes -options of pprof control how the information is presented. -

    -

    -The following flags are recognized by the 'go test' command and -control the execution of any test: -

    -
    -bench regexp
    -    Run (sub)benchmarks matching a regular expression.
    -    The given regular expression is split into smaller ones by
    -    top-level '/', where each must match the corresponding part of a
    -    benchmark's identifier.
    -    By default, no benchmarks run. To run all benchmarks,
    -    use '-bench .' or '-bench=.'.
    -
    --benchtime t
    -    Run enough iterations of each benchmark to take t, specified
    -    as a time.Duration (for example, -benchtime 1h30s).
    -    The default is 1 second (1s).
    -
    --count n
    -    Run each test and benchmark n times (default 1).
    -    If -cpu is set, run n times for each GOMAXPROCS value.
    -    Examples are always run once.
    -
    --cover
    -    Enable coverage analysis.
    -
    --covermode set,count,atomic
    -    Set the mode for coverage analysis for the package[s]
    -    being tested. The default is "set" unless -race is enabled,
    -    in which case it is "atomic".
    -    The values:
    -	set: bool: does this statement run?
    -	count: int: how many times does this statement run?
    -	atomic: int: count, but correct in multithreaded tests;
    -		significantly more expensive.
    -    Sets -cover.
    -
    --coverpkg pkg1,pkg2,pkg3
    -    Apply coverage analysis in each test to the given list of packages.
    -    The default is for each test to analyze only the package being tested.
    -    Packages are specified as import paths.
    -    Sets -cover.
    -
    --cpu 1,2,4
    -    Specify a list of GOMAXPROCS values for which the tests or
    -    benchmarks should be executed.  The default is the current value
    -    of GOMAXPROCS.
    -
    --parallel n
    -    Allow parallel execution of test functions that call t.Parallel.
    -    The value of this flag is the maximum number of tests to run
    -    simultaneously; by default, it is set to the value of GOMAXPROCS.
    -    Note that -parallel only applies within a single test binary.
    -    The 'go test' command may run tests for different packages
    -    in parallel as well, according to the setting of the -p flag
    -    (see 'go help build').
    -
    --run regexp
    -    Run only those tests and examples matching the regular expression.
    -    For tests the regular expression is split into smaller ones by
    -    top-level '/', where each must match the corresponding part of a
    -    test's identifier.
    -
    --short
    -    Tell long-running tests to shorten their run time.
    -    It is off by default but set during all.bash so that installing
    -    the Go tree can run a sanity check but not spend time running
    -    exhaustive tests.
    -
    --timeout t
    -    If a test runs longer than t, panic.
    -    The default is 10 minutes (10m).
    -
    --v
    -    Verbose output: log all tests as they are run. Also print all
    -    text from Log and Logf calls even if the test succeeds.
    -
    -

    -The following flags are also recognized by 'go test' and can be used to -profile the tests during execution: -

    -
    -benchmem
    -    Print memory allocation statistics for benchmarks.
    -
    --blockprofile block.out
    -    Write a goroutine blocking profile to the specified file
    -    when all tests are complete.
    -    Writes test binary as -c would.
    -
    --blockprofilerate n
    -    Control the detail provided in goroutine blocking profiles by
    -    calling runtime.SetBlockProfileRate with n.
    -    See 'go doc runtime.SetBlockProfileRate'.
    -    The profiler aims to sample, on average, one blocking event every
    -    n nanoseconds the program spends blocked.  By default,
    -    if -test.blockprofile is set without this flag, all blocking events
    -    are recorded, equivalent to -test.blockprofilerate=1.
    -
    --coverprofile cover.out
    -    Write a coverage profile to the file after all tests have passed.
    -    Sets -cover.
    -
    --cpuprofile cpu.out
    -    Write a CPU profile to the specified file before exiting.
    -    Writes test binary as -c would.
    -
    --memprofile mem.out
    -    Write a memory profile to the file after all tests have passed.
    -    Writes test binary as -c would.
    -
    --memprofilerate n
    -    Enable more precise (and expensive) memory profiles by setting
    -    runtime.MemProfileRate.  See 'go doc runtime.MemProfileRate'.
    -    To profile all memory allocations, use -test.memprofilerate=1
    -    and pass --alloc_space flag to the pprof tool.
    -
    --mutexprofile mutex.out
    -    Write a mutex contention profile to the specified file
    -    when all tests are complete.
    -    Writes test binary as -c would.
    -
    --mutexprofilefraction n
    -    Sample 1 in n stack traces of goroutines holding a
    -    contended mutex.
    -
    --outputdir directory
    -    Place output files from profiling in the specified directory,
    -    by default the directory in which "go test" is running.
    -
    --trace trace.out
    -    Write an execution trace to the specified file before exiting.
    -
    -

    -Each of these flags is also recognized with an optional 'test.' prefix, -as in -test.v. When invoking the generated test binary (the result of -'go test -c') directly, however, the prefix is mandatory. -

    -

    -The 'go test' command rewrites or removes recognized flags, -as appropriate, both before and after the optional package list, -before invoking the test binary. -

    -

    -For instance, the command -

    -
    go test -v -myflag testdata -cpuprofile=prof.out -x
    -
    -

    -will compile the test binary and then run it as -

    -
    pkg.test -test.v -myflag testdata -test.cpuprofile=prof.out
    -
    -

    -(The -x flag is removed because it applies only to the go command's -execution, not to the test itself.) -

    -

    -The test flags that generate profiles (other than for coverage) also -leave the test binary in pkg.test for use when analyzing the profiles. -

    -

    -When 'go test' runs a test binary, it does so from within the -corresponding package's source code directory. Depending on the test, -it may be necessary to do the same when invoking a generated test -binary directly. -

    -

    -The command-line package list, if present, must appear before any -flag not known to the go test command. Continuing the example above, -the package list would have to appear before -myflag, but could appear -on either side of -v. -

    -

    -To keep an argument for a test binary from being interpreted as a -known flag or a package name, use -args (see 'go help test') which -passes the remainder of the command line through to the test binary -uninterpreted and unaltered. -

    -

    -For instance, the command -

    -
    go test -v -args -x -v
    -
    -

    -will compile the test binary and then run it as -

    -
    pkg.test -test.v -x -v
    -
    -

    -Similarly, -

    -
    go test -args math
    -
    -

    -will compile the test binary and then run it as -

    -
    pkg.test math
    -
    -

    -In the first example, the -x and the second -v are passed through to the -test binary unchanged and with no effect on the go command itself. -In the second example, the argument math is passed through to the test -binary, instead of being interpreted as the package list. -

    -

    Description of testing functions

    -

    -The 'go test' command expects to find test, benchmark, and example functions -in the "*_test.go" files corresponding to the package under test. -

    -

    -A test function is one named TestXXX (where XXX is any alphanumeric string -not starting with a lower case letter) and should have the signature, -

    -
    func TestXXX(t *testing.T) { ... }
    -
    -

    -A benchmark function is one named BenchmarkXXX and should have the signature, -

    -
    func BenchmarkXXX(b *testing.B) { ... }
    -
    -

    -An example function is similar to a test function but, instead of using -*testing.T to report success or failure, prints output to os.Stdout. -If the last comment in the function starts with "Output:" then the output -is compared exactly against the comment (see examples below). If the last -comment begins with "Unordered output:" then the output is compared to the -comment, however the order of the lines is ignored. An example with no such -comment is compiled but not executed. An example with no text after -"Output:" is compiled, executed, and expected to produce no output. -

    -

    -Godoc displays the body of ExampleXXX to demonstrate the use -of the function, constant, or variable XXX. An example of a method M with -receiver type T or *T is named ExampleT_M. There may be multiple examples -for a given function, constant, or variable, distinguished by a trailing _xxx, -where xxx is a suffix not beginning with an upper case letter. -

    -

    -Here is an example of an example: -

    -
    func ExamplePrintln() {
    -	Println("The output of\nthis example.")
    -	// Output: The output of
    -	// this example.
    -}
    -
    -

    -Here is another example where the ordering of the output is ignored: -

    -
    func ExamplePerm() {
    -	for _, value := range Perm(4) {
    -		fmt.Println(value)
    -	}
    -
    -	// Unordered output: 4
    -	// 2
    -	// 1
    -	// 3
    -	// 0
    -}
    -
    -

    -The entire test file is presented as the example when it contains a single -example function, at least one other function, type, variable, or constant -declaration, and no test or benchmark functions. -

    -

    -See the documentation of the testing package for more information. -

    - - - -
    -
    - - - - - - - - -`)) diff --git a/deps/golang.org/x/net/http2/h2i/README.md b/deps/golang.org/x/net/http2/h2i/README.md deleted file mode 100644 index fb5c5efb0..000000000 --- a/deps/golang.org/x/net/http2/h2i/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# h2i - -**h2i** is an interactive HTTP/2 ("h2") console debugger. Miss the good ol' -days of telnetting to your HTTP/1.n servers? We're bringing you -back. - -Features: -- send raw HTTP/2 frames - - PING - - SETTINGS - - HEADERS - - etc -- type in HTTP/1.n and have it auto-HPACK/frame-ify it for HTTP/2 -- pretty print all received HTTP/2 frames from the peer (including HPACK decoding) -- tab completion of commands, options - -Not yet features, but soon: -- unnecessary CONTINUATION frames on short boundaries, to test peer implementations -- request bodies (DATA frames) -- send invalid frames for testing server implementations (supported by underlying Framer) - -Later: -- act like a server - -## Installation - -``` -$ go get golang.org/x/net/http2/h2i -$ h2i -``` - -## Demo - -``` -$ h2i -Usage: h2i - - -insecure - Whether to skip TLS cert validation - -nextproto string - Comma-separated list of NPN/ALPN protocol names to negotiate. (default "h2,h2-14") - -$ h2i google.com -Connecting to google.com:443 ... -Connected to 74.125.224.41:443 -Negotiated protocol "h2-14" -[FrameHeader SETTINGS len=18] - [MAX_CONCURRENT_STREAMS = 100] - [INITIAL_WINDOW_SIZE = 1048576] - [MAX_FRAME_SIZE = 16384] -[FrameHeader WINDOW_UPDATE len=4] - Window-Increment = 983041 - -h2i> PING h2iSayHI -[FrameHeader PING flags=ACK len=8] - Data = "h2iSayHI" -h2i> headers -(as HTTP/1.1)> GET / HTTP/1.1 -(as HTTP/1.1)> Host: ip.appspot.com -(as HTTP/1.1)> User-Agent: h2i/brad-n-blake -(as HTTP/1.1)> -Opening Stream-ID 1: - :authority = ip.appspot.com - :method = GET - :path = / - :scheme = https - user-agent = h2i/brad-n-blake -[FrameHeader HEADERS flags=END_HEADERS stream=1 len=77] - :status = "200" - alternate-protocol = "443:quic,p=1" - content-length = "15" - content-type = "text/html" - date = "Fri, 01 May 2015 23:06:56 GMT" - server = "Google Frontend" -[FrameHeader DATA flags=END_STREAM stream=1 len=15] - "173.164.155.78\n" -[FrameHeader PING len=8] - Data = "\x00\x00\x00\x00\x00\x00\x00\x00" -h2i> ping -[FrameHeader PING flags=ACK len=8] - Data = "h2i_ping" -h2i> ping -[FrameHeader PING flags=ACK len=8] - Data = "h2i_ping" -h2i> ping -[FrameHeader GOAWAY len=22] - Last-Stream-ID = 1; Error-Code = PROTOCOL_ERROR (1) - -ReadFrame: EOF -``` - -## Status - -Quick few hour hack. So much yet to do. Feel free to file issues for -bugs or wishlist items, but [@bmizerany](https://github.com/bmizerany/) -and I aren't yet accepting pull requests until things settle down. - diff --git a/deps/golang.org/x/net/http2/h2i/h2i.go b/deps/golang.org/x/net/http2/h2i/h2i.go deleted file mode 100644 index 62e57527c..000000000 --- a/deps/golang.org/x/net/http2/h2i/h2i.go +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !plan9,!solaris - -/* -The h2i command is an interactive HTTP/2 console. - -Usage: - $ h2i [flags] - -Interactive commands in the console: (all parts case-insensitive) - - ping [data] - settings ack - settings FOO=n BAR=z - headers (open a new stream by typing HTTP/1.1) -*/ -package main - -import ( - "bufio" - "bytes" - "crypto/tls" - "errors" - "flag" - "fmt" - "io" - "log" - "net" - "net/http" - "os" - "regexp" - "strconv" - "strings" - - "golang.org/x/crypto/ssh/terminal" - "golang.org/x/net/http2" - "golang.org/x/net/http2/hpack" -) - -// Flags -var ( - flagNextProto = flag.String("nextproto", "h2,h2-14", "Comma-separated list of NPN/ALPN protocol names to negotiate.") - flagInsecure = flag.Bool("insecure", false, "Whether to skip TLS cert validation") - flagSettings = flag.String("settings", "empty", "comma-separated list of KEY=value settings for the initial SETTINGS frame. The magic value 'empty' sends an empty initial settings frame, and the magic value 'omit' causes no initial settings frame to be sent.") - flagDial = flag.String("dial", "", "optional ip:port to dial, to connect to a host:port but use a different SNI name (including a SNI name without DNS)") -) - -type command struct { - run func(*h2i, []string) error // required - - // complete optionally specifies tokens (case-insensitive) which are - // valid for this subcommand. - complete func() []string -} - -var commands = map[string]command{ - "ping": {run: (*h2i).cmdPing}, - "settings": { - run: (*h2i).cmdSettings, - complete: func() []string { - return []string{ - "ACK", - http2.SettingHeaderTableSize.String(), - http2.SettingEnablePush.String(), - http2.SettingMaxConcurrentStreams.String(), - http2.SettingInitialWindowSize.String(), - http2.SettingMaxFrameSize.String(), - http2.SettingMaxHeaderListSize.String(), - } - }, - }, - "quit": {run: (*h2i).cmdQuit}, - "headers": {run: (*h2i).cmdHeaders}, -} - -func usage() { - fmt.Fprintf(os.Stderr, "Usage: h2i \n\n") - flag.PrintDefaults() -} - -// withPort adds ":443" if another port isn't already present. -func withPort(host string) string { - if _, _, err := net.SplitHostPort(host); err != nil { - return net.JoinHostPort(host, "443") - } - return host -} - -// withoutPort strips the port from addr if present. -func withoutPort(addr string) string { - if h, _, err := net.SplitHostPort(addr); err == nil { - return h - } - return addr -} - -// h2i is the app's state. -type h2i struct { - host string - tc *tls.Conn - framer *http2.Framer - term *terminal.Terminal - - // owned by the command loop: - streamID uint32 - hbuf bytes.Buffer - henc *hpack.Encoder - - // owned by the readFrames loop: - peerSetting map[http2.SettingID]uint32 - hdec *hpack.Decoder -} - -func main() { - flag.Usage = usage - flag.Parse() - if flag.NArg() != 1 { - usage() - os.Exit(2) - } - log.SetFlags(0) - - host := flag.Arg(0) - app := &h2i{ - host: host, - peerSetting: make(map[http2.SettingID]uint32), - } - app.henc = hpack.NewEncoder(&app.hbuf) - - if err := app.Main(); err != nil { - if app.term != nil { - app.logf("%v\n", err) - } else { - fmt.Fprintf(os.Stderr, "%v\n", err) - } - os.Exit(1) - } - fmt.Fprintf(os.Stdout, "\n") -} - -func (app *h2i) Main() error { - cfg := &tls.Config{ - ServerName: withoutPort(app.host), - NextProtos: strings.Split(*flagNextProto, ","), - InsecureSkipVerify: *flagInsecure, - } - - hostAndPort := *flagDial - if hostAndPort == "" { - hostAndPort = withPort(app.host) - } - log.Printf("Connecting to %s ...", hostAndPort) - tc, err := tls.Dial("tcp", hostAndPort, cfg) - if err != nil { - return fmt.Errorf("Error dialing %s: %v", hostAndPort, err) - } - log.Printf("Connected to %v", tc.RemoteAddr()) - defer tc.Close() - - if err := tc.Handshake(); err != nil { - return fmt.Errorf("TLS handshake: %v", err) - } - if !*flagInsecure { - if err := tc.VerifyHostname(app.host); err != nil { - return fmt.Errorf("VerifyHostname: %v", err) - } - } - state := tc.ConnectionState() - log.Printf("Negotiated protocol %q", state.NegotiatedProtocol) - if !state.NegotiatedProtocolIsMutual || state.NegotiatedProtocol == "" { - return fmt.Errorf("Could not negotiate protocol mutually") - } - - if _, err := io.WriteString(tc, http2.ClientPreface); err != nil { - return err - } - - app.framer = http2.NewFramer(tc, tc) - - oldState, err := terminal.MakeRaw(int(os.Stdin.Fd())) - if err != nil { - return err - } - defer terminal.Restore(0, oldState) - - var screen = struct { - io.Reader - io.Writer - }{os.Stdin, os.Stdout} - - app.term = terminal.NewTerminal(screen, "h2i> ") - lastWord := regexp.MustCompile(`.+\W(\w+)$`) - app.term.AutoCompleteCallback = func(line string, pos int, key rune) (newLine string, newPos int, ok bool) { - if key != '\t' { - return - } - if pos != len(line) { - // TODO: we're being lazy for now, only supporting tab completion at the end. - return - } - // Auto-complete for the command itself. - if !strings.Contains(line, " ") { - var name string - name, _, ok = lookupCommand(line) - if !ok { - return - } - return name, len(name), true - } - _, c, ok := lookupCommand(line[:strings.IndexByte(line, ' ')]) - if !ok || c.complete == nil { - return - } - if strings.HasSuffix(line, " ") { - app.logf("%s", strings.Join(c.complete(), " ")) - return line, pos, true - } - m := lastWord.FindStringSubmatch(line) - if m == nil { - return line, len(line), true - } - soFar := m[1] - var match []string - for _, cand := range c.complete() { - if len(soFar) > len(cand) || !strings.EqualFold(cand[:len(soFar)], soFar) { - continue - } - match = append(match, cand) - } - if len(match) == 0 { - return - } - if len(match) > 1 { - // TODO: auto-complete any common prefix - app.logf("%s", strings.Join(match, " ")) - return line, pos, true - } - newLine = line[:len(line)-len(soFar)] + match[0] - return newLine, len(newLine), true - - } - - errc := make(chan error, 2) - go func() { errc <- app.readFrames() }() - go func() { errc <- app.readConsole() }() - return <-errc -} - -func (app *h2i) logf(format string, args ...interface{}) { - fmt.Fprintf(app.term, format+"\r\n", args...) -} - -func (app *h2i) readConsole() error { - if s := *flagSettings; s != "omit" { - var args []string - if s != "empty" { - args = strings.Split(s, ",") - } - _, c, ok := lookupCommand("settings") - if !ok { - panic("settings command not found") - } - c.run(app, args) - } - - for { - line, err := app.term.ReadLine() - if err == io.EOF { - return nil - } - if err != nil { - return fmt.Errorf("terminal.ReadLine: %v", err) - } - f := strings.Fields(line) - if len(f) == 0 { - continue - } - cmd, args := f[0], f[1:] - if _, c, ok := lookupCommand(cmd); ok { - err = c.run(app, args) - } else { - app.logf("Unknown command %q", line) - } - if err == errExitApp { - return nil - } - if err != nil { - return err - } - } -} - -func lookupCommand(prefix string) (name string, c command, ok bool) { - prefix = strings.ToLower(prefix) - if c, ok = commands[prefix]; ok { - return prefix, c, ok - } - - for full, candidate := range commands { - if strings.HasPrefix(full, prefix) { - if c.run != nil { - return "", command{}, false // ambiguous - } - c = candidate - name = full - } - } - return name, c, c.run != nil -} - -var errExitApp = errors.New("internal sentinel error value to quit the console reading loop") - -func (a *h2i) cmdQuit(args []string) error { - if len(args) > 0 { - a.logf("the QUIT command takes no argument") - return nil - } - return errExitApp -} - -func (a *h2i) cmdSettings(args []string) error { - if len(args) == 1 && strings.EqualFold(args[0], "ACK") { - return a.framer.WriteSettingsAck() - } - var settings []http2.Setting - for _, arg := range args { - if strings.EqualFold(arg, "ACK") { - a.logf("Error: ACK must be only argument with the SETTINGS command") - return nil - } - eq := strings.Index(arg, "=") - if eq == -1 { - a.logf("Error: invalid argument %q (expected SETTING_NAME=nnnn)", arg) - return nil - } - sid, ok := settingByName(arg[:eq]) - if !ok { - a.logf("Error: unknown setting name %q", arg[:eq]) - return nil - } - val, err := strconv.ParseUint(arg[eq+1:], 10, 32) - if err != nil { - a.logf("Error: invalid argument %q (expected SETTING_NAME=nnnn)", arg) - return nil - } - settings = append(settings, http2.Setting{ - ID: sid, - Val: uint32(val), - }) - } - a.logf("Sending: %v", settings) - return a.framer.WriteSettings(settings...) -} - -func settingByName(name string) (http2.SettingID, bool) { - for _, sid := range [...]http2.SettingID{ - http2.SettingHeaderTableSize, - http2.SettingEnablePush, - http2.SettingMaxConcurrentStreams, - http2.SettingInitialWindowSize, - http2.SettingMaxFrameSize, - http2.SettingMaxHeaderListSize, - } { - if strings.EqualFold(sid.String(), name) { - return sid, true - } - } - return 0, false -} - -func (app *h2i) cmdPing(args []string) error { - if len(args) > 1 { - app.logf("invalid PING usage: only accepts 0 or 1 args") - return nil // nil means don't end the program - } - var data [8]byte - if len(args) == 1 { - copy(data[:], args[0]) - } else { - copy(data[:], "h2i_ping") - } - return app.framer.WritePing(false, data) -} - -func (app *h2i) cmdHeaders(args []string) error { - if len(args) > 0 { - app.logf("Error: HEADERS doesn't yet take arguments.") - // TODO: flags for restricting window size, to force CONTINUATION - // frames. - return nil - } - var h1req bytes.Buffer - app.term.SetPrompt("(as HTTP/1.1)> ") - defer app.term.SetPrompt("h2i> ") - for { - line, err := app.term.ReadLine() - if err != nil { - return err - } - h1req.WriteString(line) - h1req.WriteString("\r\n") - if line == "" { - break - } - } - req, err := http.ReadRequest(bufio.NewReader(&h1req)) - if err != nil { - app.logf("Invalid HTTP/1.1 request: %v", err) - return nil - } - if app.streamID == 0 { - app.streamID = 1 - } else { - app.streamID += 2 - } - app.logf("Opening Stream-ID %d:", app.streamID) - hbf := app.encodeHeaders(req) - if len(hbf) > 16<<10 { - app.logf("TODO: h2i doesn't yet write CONTINUATION frames. Copy it from transport.go") - return nil - } - return app.framer.WriteHeaders(http2.HeadersFrameParam{ - StreamID: app.streamID, - BlockFragment: hbf, - EndStream: req.Method == "GET" || req.Method == "HEAD", // good enough for now - EndHeaders: true, // for now - }) -} - -func (app *h2i) readFrames() error { - for { - f, err := app.framer.ReadFrame() - if err != nil { - return fmt.Errorf("ReadFrame: %v", err) - } - app.logf("%v", f) - switch f := f.(type) { - case *http2.PingFrame: - app.logf(" Data = %q", f.Data) - case *http2.SettingsFrame: - f.ForeachSetting(func(s http2.Setting) error { - app.logf(" %v", s) - app.peerSetting[s.ID] = s.Val - return nil - }) - case *http2.WindowUpdateFrame: - app.logf(" Window-Increment = %v", f.Increment) - case *http2.GoAwayFrame: - app.logf(" Last-Stream-ID = %d; Error-Code = %v (%d)", f.LastStreamID, f.ErrCode, f.ErrCode) - case *http2.DataFrame: - app.logf(" %q", f.Data()) - case *http2.HeadersFrame: - if f.HasPriority() { - app.logf(" PRIORITY = %v", f.Priority) - } - if app.hdec == nil { - // TODO: if the user uses h2i to send a SETTINGS frame advertising - // something larger, we'll need to respect SETTINGS_HEADER_TABLE_SIZE - // and stuff here instead of using the 4k default. But for now: - tableSize := uint32(4 << 10) - app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField) - } - app.hdec.Write(f.HeaderBlockFragment()) - case *http2.PushPromiseFrame: - if app.hdec == nil { - // TODO: if the user uses h2i to send a SETTINGS frame advertising - // something larger, we'll need to respect SETTINGS_HEADER_TABLE_SIZE - // and stuff here instead of using the 4k default. But for now: - tableSize := uint32(4 << 10) - app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField) - } - app.hdec.Write(f.HeaderBlockFragment()) - } - } -} - -// called from readLoop -func (app *h2i) onNewHeaderField(f hpack.HeaderField) { - if f.Sensitive { - app.logf(" %s = %q (SENSITIVE)", f.Name, f.Value) - } - app.logf(" %s = %q", f.Name, f.Value) -} - -func (app *h2i) encodeHeaders(req *http.Request) []byte { - app.hbuf.Reset() - - // TODO(bradfitz): figure out :authority-vs-Host stuff between http2 and Go - host := req.Host - if host == "" { - host = req.URL.Host - } - - path := req.RequestURI - if path == "" { - path = "/" - } - - app.writeHeader(":authority", host) // probably not right for all sites - app.writeHeader(":method", req.Method) - app.writeHeader(":path", path) - app.writeHeader(":scheme", "https") - - for k, vv := range req.Header { - lowKey := strings.ToLower(k) - if lowKey == "host" { - continue - } - for _, v := range vv { - app.writeHeader(lowKey, v) - } - } - return app.hbuf.Bytes() -} - -func (app *h2i) writeHeader(name, value string) { - app.henc.WriteField(hpack.HeaderField{Name: name, Value: value}) - app.logf(" %s = %s", name, value) -} diff --git a/deps/golang.org/x/net/http2/hpack/encode.go b/deps/golang.org/x/net/http2/hpack/encode.go index 1565cf270..54726c2a3 100644 --- a/deps/golang.org/x/net/http2/hpack/encode.go +++ b/deps/golang.org/x/net/http2/hpack/encode.go @@ -206,7 +206,7 @@ func appendVarInt(dst []byte, n byte, i uint64) []byte { } // appendHpackString appends s, as encoded in "String Literal" -// representation, to dst and returns the extended buffer. +// representation, to dst and returns the the extended buffer. // // s will be encoded in Huffman codes only when it produces strictly // shorter byte string. diff --git a/deps/golang.org/x/net/http2/hpack/encode_test.go b/deps/golang.org/x/net/http2/hpack/encode_test.go deleted file mode 100644 index 05f12db9c..000000000 --- a/deps/golang.org/x/net/http2/hpack/encode_test.go +++ /dev/null @@ -1,386 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package hpack - -import ( - "bytes" - "encoding/hex" - "fmt" - "math/rand" - "reflect" - "strings" - "testing" -) - -func TestEncoderTableSizeUpdate(t *testing.T) { - tests := []struct { - size1, size2 uint32 - wantHex string - }{ - // Should emit 2 table size updates (2048 and 4096) - {2048, 4096, "3fe10f 3fe11f 82"}, - - // Should emit 1 table size update (2048) - {16384, 2048, "3fe10f 82"}, - } - for _, tt := range tests { - var buf bytes.Buffer - e := NewEncoder(&buf) - e.SetMaxDynamicTableSize(tt.size1) - e.SetMaxDynamicTableSize(tt.size2) - if err := e.WriteField(pair(":method", "GET")); err != nil { - t.Fatal(err) - } - want := removeSpace(tt.wantHex) - if got := hex.EncodeToString(buf.Bytes()); got != want { - t.Errorf("e.SetDynamicTableSize %v, %v = %q; want %q", tt.size1, tt.size2, got, want) - } - } -} - -func TestEncoderWriteField(t *testing.T) { - var buf bytes.Buffer - e := NewEncoder(&buf) - var got []HeaderField - d := NewDecoder(4<<10, func(f HeaderField) { - got = append(got, f) - }) - - tests := []struct { - hdrs []HeaderField - }{ - {[]HeaderField{ - pair(":method", "GET"), - pair(":scheme", "http"), - pair(":path", "/"), - pair(":authority", "www.example.com"), - }}, - {[]HeaderField{ - pair(":method", "GET"), - pair(":scheme", "http"), - pair(":path", "/"), - pair(":authority", "www.example.com"), - pair("cache-control", "no-cache"), - }}, - {[]HeaderField{ - pair(":method", "GET"), - pair(":scheme", "https"), - pair(":path", "/index.html"), - pair(":authority", "www.example.com"), - pair("custom-key", "custom-value"), - }}, - } - for i, tt := range tests { - buf.Reset() - got = got[:0] - for _, hf := range tt.hdrs { - if err := e.WriteField(hf); err != nil { - t.Fatal(err) - } - } - _, err := d.Write(buf.Bytes()) - if err != nil { - t.Errorf("%d. Decoder Write = %v", i, err) - } - if !reflect.DeepEqual(got, tt.hdrs) { - t.Errorf("%d. Decoded %+v; want %+v", i, got, tt.hdrs) - } - } -} - -func TestEncoderSearchTable(t *testing.T) { - e := NewEncoder(nil) - - e.dynTab.add(pair("foo", "bar")) - e.dynTab.add(pair("blake", "miz")) - e.dynTab.add(pair(":method", "GET")) - - tests := []struct { - hf HeaderField - wantI uint64 - wantMatch bool - }{ - // Name and Value match - {pair("foo", "bar"), uint64(staticTable.len()) + 3, true}, - {pair("blake", "miz"), uint64(staticTable.len()) + 2, true}, - {pair(":method", "GET"), 2, true}, - - // Only name match because Sensitive == true. This is allowed to match - // any ":method" entry. The current implementation uses the last entry - // added in newStaticTable. - {HeaderField{":method", "GET", true}, 3, false}, - - // Only Name matches - {pair("foo", "..."), uint64(staticTable.len()) + 3, false}, - {pair("blake", "..."), uint64(staticTable.len()) + 2, false}, - // As before, this is allowed to match any ":method" entry. - {pair(":method", "..."), 3, false}, - - // None match - {pair("foo-", "bar"), 0, false}, - } - for _, tt := range tests { - if gotI, gotMatch := e.searchTable(tt.hf); gotI != tt.wantI || gotMatch != tt.wantMatch { - t.Errorf("d.search(%+v) = %v, %v; want %v, %v", tt.hf, gotI, gotMatch, tt.wantI, tt.wantMatch) - } - } -} - -func TestAppendVarInt(t *testing.T) { - tests := []struct { - n byte - i uint64 - want []byte - }{ - // Fits in a byte: - {1, 0, []byte{0}}, - {2, 2, []byte{2}}, - {3, 6, []byte{6}}, - {4, 14, []byte{14}}, - {5, 30, []byte{30}}, - {6, 62, []byte{62}}, - {7, 126, []byte{126}}, - {8, 254, []byte{254}}, - - // Multiple bytes: - {5, 1337, []byte{31, 154, 10}}, - } - for _, tt := range tests { - got := appendVarInt(nil, tt.n, tt.i) - if !bytes.Equal(got, tt.want) { - t.Errorf("appendVarInt(nil, %v, %v) = %v; want %v", tt.n, tt.i, got, tt.want) - } - } -} - -func TestAppendHpackString(t *testing.T) { - tests := []struct { - s, wantHex string - }{ - // Huffman encoded - {"www.example.com", "8c f1e3 c2e5 f23a 6ba0 ab90 f4ff"}, - - // Not Huffman encoded - {"a", "01 61"}, - - // zero length - {"", "00"}, - } - for _, tt := range tests { - want := removeSpace(tt.wantHex) - buf := appendHpackString(nil, tt.s) - if got := hex.EncodeToString(buf); want != got { - t.Errorf("appendHpackString(nil, %q) = %q; want %q", tt.s, got, want) - } - } -} - -func TestAppendIndexed(t *testing.T) { - tests := []struct { - i uint64 - wantHex string - }{ - // 1 byte - {1, "81"}, - {126, "fe"}, - - // 2 bytes - {127, "ff00"}, - {128, "ff01"}, - } - for _, tt := range tests { - want := removeSpace(tt.wantHex) - buf := appendIndexed(nil, tt.i) - if got := hex.EncodeToString(buf); want != got { - t.Errorf("appendIndex(nil, %v) = %q; want %q", tt.i, got, want) - } - } -} - -func TestAppendNewName(t *testing.T) { - tests := []struct { - f HeaderField - indexing bool - wantHex string - }{ - // Incremental indexing - {HeaderField{"custom-key", "custom-value", false}, true, "40 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, - - // Without indexing - {HeaderField{"custom-key", "custom-value", false}, false, "00 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, - - // Never indexed - {HeaderField{"custom-key", "custom-value", true}, true, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, - {HeaderField{"custom-key", "custom-value", true}, false, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, - } - for _, tt := range tests { - want := removeSpace(tt.wantHex) - buf := appendNewName(nil, tt.f, tt.indexing) - if got := hex.EncodeToString(buf); want != got { - t.Errorf("appendNewName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want) - } - } -} - -func TestAppendIndexedName(t *testing.T) { - tests := []struct { - f HeaderField - i uint64 - indexing bool - wantHex string - }{ - // Incremental indexing - {HeaderField{":status", "302", false}, 8, true, "48 82 6402"}, - - // Without indexing - {HeaderField{":status", "302", false}, 8, false, "08 82 6402"}, - - // Never indexed - {HeaderField{":status", "302", true}, 8, true, "18 82 6402"}, - {HeaderField{":status", "302", true}, 8, false, "18 82 6402"}, - } - for _, tt := range tests { - want := removeSpace(tt.wantHex) - buf := appendIndexedName(nil, tt.f, tt.i, tt.indexing) - if got := hex.EncodeToString(buf); want != got { - t.Errorf("appendIndexedName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want) - } - } -} - -func TestAppendTableSize(t *testing.T) { - tests := []struct { - i uint32 - wantHex string - }{ - // Fits into 1 byte - {30, "3e"}, - - // Extra byte - {31, "3f00"}, - {32, "3f01"}, - } - for _, tt := range tests { - want := removeSpace(tt.wantHex) - buf := appendTableSize(nil, tt.i) - if got := hex.EncodeToString(buf); want != got { - t.Errorf("appendTableSize(nil, %v) = %q; want %q", tt.i, got, want) - } - } -} - -func TestEncoderSetMaxDynamicTableSize(t *testing.T) { - var buf bytes.Buffer - e := NewEncoder(&buf) - tests := []struct { - v uint32 - wantUpdate bool - wantMinSize uint32 - wantMaxSize uint32 - }{ - // Set new table size to 2048 - {2048, true, 2048, 2048}, - - // Set new table size to 16384, but still limited to - // 4096 - {16384, true, 2048, 4096}, - } - for _, tt := range tests { - e.SetMaxDynamicTableSize(tt.v) - if got := e.tableSizeUpdate; tt.wantUpdate != got { - t.Errorf("e.tableSizeUpdate = %v; want %v", got, tt.wantUpdate) - } - if got := e.minSize; tt.wantMinSize != got { - t.Errorf("e.minSize = %v; want %v", got, tt.wantMinSize) - } - if got := e.dynTab.maxSize; tt.wantMaxSize != got { - t.Errorf("e.maxSize = %v; want %v", got, tt.wantMaxSize) - } - } -} - -func TestEncoderSetMaxDynamicTableSizeLimit(t *testing.T) { - e := NewEncoder(nil) - // 4095 < initialHeaderTableSize means maxSize is truncated to - // 4095. - e.SetMaxDynamicTableSizeLimit(4095) - if got, want := e.dynTab.maxSize, uint32(4095); got != want { - t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) - } - if got, want := e.maxSizeLimit, uint32(4095); got != want { - t.Errorf("e.maxSizeLimit = %v; want %v", got, want) - } - if got, want := e.tableSizeUpdate, true; got != want { - t.Errorf("e.tableSizeUpdate = %v; want %v", got, want) - } - // maxSize will be truncated to maxSizeLimit - e.SetMaxDynamicTableSize(16384) - if got, want := e.dynTab.maxSize, uint32(4095); got != want { - t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) - } - // 8192 > current maxSizeLimit, so maxSize does not change. - e.SetMaxDynamicTableSizeLimit(8192) - if got, want := e.dynTab.maxSize, uint32(4095); got != want { - t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) - } - if got, want := e.maxSizeLimit, uint32(8192); got != want { - t.Errorf("e.maxSizeLimit = %v; want %v", got, want) - } -} - -func removeSpace(s string) string { - return strings.Replace(s, " ", "", -1) -} - -func BenchmarkEncoderSearchTable(b *testing.B) { - e := NewEncoder(nil) - - // A sample of possible header fields. - // This is not based on any actual data from HTTP/2 traces. - var possible []HeaderField - for _, f := range staticTable.ents { - if f.Value == "" { - possible = append(possible, f) - continue - } - // Generate 5 random values, except for cookie and set-cookie, - // which we know can have many values in practice. - num := 5 - if f.Name == "cookie" || f.Name == "set-cookie" { - num = 25 - } - for i := 0; i < num; i++ { - f.Value = fmt.Sprintf("%s-%d", f.Name, i) - possible = append(possible, f) - } - } - for k := 0; k < 10; k++ { - f := HeaderField{ - Name: fmt.Sprintf("x-header-%d", k), - Sensitive: rand.Int()%2 == 0, - } - for i := 0; i < 5; i++ { - f.Value = fmt.Sprintf("%s-%d", f.Name, i) - possible = append(possible, f) - } - } - - // Add a random sample to the dynamic table. This very loosely simulates - // a history of 100 requests with 20 header fields per request. - for r := 0; r < 100*20; r++ { - f := possible[rand.Int31n(int32(len(possible)))] - // Skip if this is in the staticTable verbatim. - if _, has := staticTable.search(f); !has { - e.dynTab.add(f) - } - } - - b.ResetTimer() - for n := 0; n < b.N; n++ { - for _, f := range possible { - e.searchTable(f) - } - } -} diff --git a/deps/golang.org/x/net/http2/hpack/hpack.go b/deps/golang.org/x/net/http2/hpack/hpack.go index 166788cee..176644acd 100644 --- a/deps/golang.org/x/net/http2/hpack/hpack.go +++ b/deps/golang.org/x/net/http2/hpack/hpack.go @@ -389,12 +389,6 @@ func (d *Decoder) callEmit(hf HeaderField) error { // (same invariants and behavior as parseHeaderFieldRepr) func (d *Decoder) parseDynamicTableSizeUpdate() error { - // RFC 7541, sec 4.2: This dynamic table size update MUST occur at the - // beginning of the first header block following the change to the dynamic table size. - if d.dynTab.size > 0 { - return DecodingError{errors.New("dynamic table size update MUST occur at the beginning of a header block")} - } - buf := d.buf size, buf, err := readVarInt(5, buf) if err != nil { diff --git a/deps/golang.org/x/net/http2/hpack/hpack_test.go b/deps/golang.org/x/net/http2/hpack/hpack_test.go deleted file mode 100644 index 974c35f08..000000000 --- a/deps/golang.org/x/net/http2/hpack/hpack_test.go +++ /dev/null @@ -1,741 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package hpack - -import ( - "bytes" - "encoding/hex" - "fmt" - "math/rand" - "reflect" - "strings" - "testing" - "time" -) - -func (d *Decoder) mustAt(idx int) HeaderField { - if hf, ok := d.at(uint64(idx)); !ok { - panic(fmt.Sprintf("bogus index %d", idx)) - } else { - return hf - } -} - -func TestDynamicTableAt(t *testing.T) { - d := NewDecoder(4096, nil) - at := d.mustAt - if got, want := at(2), (pair(":method", "GET")); got != want { - t.Errorf("at(2) = %v; want %v", got, want) - } - d.dynTab.add(pair("foo", "bar")) - d.dynTab.add(pair("blake", "miz")) - if got, want := at(staticTable.len()+1), (pair("blake", "miz")); got != want { - t.Errorf("at(dyn 1) = %v; want %v", got, want) - } - if got, want := at(staticTable.len()+2), (pair("foo", "bar")); got != want { - t.Errorf("at(dyn 2) = %v; want %v", got, want) - } - if got, want := at(3), (pair(":method", "POST")); got != want { - t.Errorf("at(3) = %v; want %v", got, want) - } -} - -func TestDynamicTableSizeEvict(t *testing.T) { - d := NewDecoder(4096, nil) - if want := uint32(0); d.dynTab.size != want { - t.Fatalf("size = %d; want %d", d.dynTab.size, want) - } - add := d.dynTab.add - add(pair("blake", "eats pizza")) - if want := uint32(15 + 32); d.dynTab.size != want { - t.Fatalf("after pizza, size = %d; want %d", d.dynTab.size, want) - } - add(pair("foo", "bar")) - if want := uint32(15 + 32 + 6 + 32); d.dynTab.size != want { - t.Fatalf("after foo bar, size = %d; want %d", d.dynTab.size, want) - } - d.dynTab.setMaxSize(15 + 32 + 1 /* slop */) - if want := uint32(6 + 32); d.dynTab.size != want { - t.Fatalf("after setMaxSize, size = %d; want %d", d.dynTab.size, want) - } - if got, want := d.mustAt(staticTable.len()+1), (pair("foo", "bar")); got != want { - t.Errorf("at(dyn 1) = %v; want %v", got, want) - } - add(pair("long", strings.Repeat("x", 500))) - if want := uint32(0); d.dynTab.size != want { - t.Fatalf("after big one, size = %d; want %d", d.dynTab.size, want) - } -} - -func TestDecoderDecode(t *testing.T) { - tests := []struct { - name string - in []byte - want []HeaderField - wantDynTab []HeaderField // newest entry first - }{ - // C.2.1 Literal Header Field with Indexing - // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.1 - {"C.2.1", dehex("400a 6375 7374 6f6d 2d6b 6579 0d63 7573 746f 6d2d 6865 6164 6572"), - []HeaderField{pair("custom-key", "custom-header")}, - []HeaderField{pair("custom-key", "custom-header")}, - }, - - // C.2.2 Literal Header Field without Indexing - // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.2 - {"C.2.2", dehex("040c 2f73 616d 706c 652f 7061 7468"), - []HeaderField{pair(":path", "/sample/path")}, - []HeaderField{}}, - - // C.2.3 Literal Header Field never Indexed - // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.3 - {"C.2.3", dehex("1008 7061 7373 776f 7264 0673 6563 7265 74"), - []HeaderField{{"password", "secret", true}}, - []HeaderField{}}, - - // C.2.4 Indexed Header Field - // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.4 - {"C.2.4", []byte("\x82"), - []HeaderField{pair(":method", "GET")}, - []HeaderField{}}, - } - for _, tt := range tests { - d := NewDecoder(4096, nil) - hf, err := d.DecodeFull(tt.in) - if err != nil { - t.Errorf("%s: %v", tt.name, err) - continue - } - if !reflect.DeepEqual(hf, tt.want) { - t.Errorf("%s: Got %v; want %v", tt.name, hf, tt.want) - } - gotDynTab := d.dynTab.reverseCopy() - if !reflect.DeepEqual(gotDynTab, tt.wantDynTab) { - t.Errorf("%s: dynamic table after = %v; want %v", tt.name, gotDynTab, tt.wantDynTab) - } - } -} - -func (dt *dynamicTable) reverseCopy() (hf []HeaderField) { - hf = make([]HeaderField, len(dt.table.ents)) - for i := range hf { - hf[i] = dt.table.ents[len(dt.table.ents)-1-i] - } - return -} - -type encAndWant struct { - enc []byte - want []HeaderField - wantDynTab []HeaderField - wantDynSize uint32 -} - -// C.3 Request Examples without Huffman Coding -// http://http2.github.io/http2-spec/compression.html#rfc.section.C.3 -func TestDecodeC3_NoHuffman(t *testing.T) { - testDecodeSeries(t, 4096, []encAndWant{ - {dehex("8286 8441 0f77 7777 2e65 7861 6d70 6c65 2e63 6f6d"), - []HeaderField{ - pair(":method", "GET"), - pair(":scheme", "http"), - pair(":path", "/"), - pair(":authority", "www.example.com"), - }, - []HeaderField{ - pair(":authority", "www.example.com"), - }, - 57, - }, - {dehex("8286 84be 5808 6e6f 2d63 6163 6865"), - []HeaderField{ - pair(":method", "GET"), - pair(":scheme", "http"), - pair(":path", "/"), - pair(":authority", "www.example.com"), - pair("cache-control", "no-cache"), - }, - []HeaderField{ - pair("cache-control", "no-cache"), - pair(":authority", "www.example.com"), - }, - 110, - }, - {dehex("8287 85bf 400a 6375 7374 6f6d 2d6b 6579 0c63 7573 746f 6d2d 7661 6c75 65"), - []HeaderField{ - pair(":method", "GET"), - pair(":scheme", "https"), - pair(":path", "/index.html"), - pair(":authority", "www.example.com"), - pair("custom-key", "custom-value"), - }, - []HeaderField{ - pair("custom-key", "custom-value"), - pair("cache-control", "no-cache"), - pair(":authority", "www.example.com"), - }, - 164, - }, - }) -} - -// C.4 Request Examples with Huffman Coding -// http://http2.github.io/http2-spec/compression.html#rfc.section.C.4 -func TestDecodeC4_Huffman(t *testing.T) { - testDecodeSeries(t, 4096, []encAndWant{ - {dehex("8286 8441 8cf1 e3c2 e5f2 3a6b a0ab 90f4 ff"), - []HeaderField{ - pair(":method", "GET"), - pair(":scheme", "http"), - pair(":path", "/"), - pair(":authority", "www.example.com"), - }, - []HeaderField{ - pair(":authority", "www.example.com"), - }, - 57, - }, - {dehex("8286 84be 5886 a8eb 1064 9cbf"), - []HeaderField{ - pair(":method", "GET"), - pair(":scheme", "http"), - pair(":path", "/"), - pair(":authority", "www.example.com"), - pair("cache-control", "no-cache"), - }, - []HeaderField{ - pair("cache-control", "no-cache"), - pair(":authority", "www.example.com"), - }, - 110, - }, - {dehex("8287 85bf 4088 25a8 49e9 5ba9 7d7f 8925 a849 e95b b8e8 b4bf"), - []HeaderField{ - pair(":method", "GET"), - pair(":scheme", "https"), - pair(":path", "/index.html"), - pair(":authority", "www.example.com"), - pair("custom-key", "custom-value"), - }, - []HeaderField{ - pair("custom-key", "custom-value"), - pair("cache-control", "no-cache"), - pair(":authority", "www.example.com"), - }, - 164, - }, - }) -} - -// http://http2.github.io/http2-spec/compression.html#rfc.section.C.5 -// "This section shows several consecutive header lists, corresponding -// to HTTP responses, on the same connection. The HTTP/2 setting -// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 -// octets, causing some evictions to occur." -func TestDecodeC5_ResponsesNoHuff(t *testing.T) { - testDecodeSeries(t, 256, []encAndWant{ - {dehex(` -4803 3330 3258 0770 7269 7661 7465 611d -4d6f 6e2c 2032 3120 4f63 7420 3230 3133 -2032 303a 3133 3a32 3120 474d 546e 1768 -7474 7073 3a2f 2f77 7777 2e65 7861 6d70 -6c65 2e63 6f6d -`), - []HeaderField{ - pair(":status", "302"), - pair("cache-control", "private"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("location", "https://www.example.com"), - }, - []HeaderField{ - pair("location", "https://www.example.com"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("cache-control", "private"), - pair(":status", "302"), - }, - 222, - }, - {dehex("4803 3330 37c1 c0bf"), - []HeaderField{ - pair(":status", "307"), - pair("cache-control", "private"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("location", "https://www.example.com"), - }, - []HeaderField{ - pair(":status", "307"), - pair("location", "https://www.example.com"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("cache-control", "private"), - }, - 222, - }, - {dehex(` -88c1 611d 4d6f 6e2c 2032 3120 4f63 7420 -3230 3133 2032 303a 3133 3a32 3220 474d -54c0 5a04 677a 6970 7738 666f 6f3d 4153 -444a 4b48 514b 425a 584f 5157 454f 5049 -5541 5851 5745 4f49 553b 206d 6178 2d61 -6765 3d33 3630 303b 2076 6572 7369 6f6e -3d31 -`), - []HeaderField{ - pair(":status", "200"), - pair("cache-control", "private"), - pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), - pair("location", "https://www.example.com"), - pair("content-encoding", "gzip"), - pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), - }, - []HeaderField{ - pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), - pair("content-encoding", "gzip"), - pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), - }, - 215, - }, - }) -} - -// http://http2.github.io/http2-spec/compression.html#rfc.section.C.6 -// "This section shows the same examples as the previous section, but -// using Huffman encoding for the literal values. The HTTP/2 setting -// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 -// octets, causing some evictions to occur. The eviction mechanism -// uses the length of the decoded literal values, so the same -// evictions occurs as in the previous section." -func TestDecodeC6_ResponsesHuffman(t *testing.T) { - testDecodeSeries(t, 256, []encAndWant{ - {dehex(` -4882 6402 5885 aec3 771a 4b61 96d0 7abe -9410 54d4 44a8 2005 9504 0b81 66e0 82a6 -2d1b ff6e 919d 29ad 1718 63c7 8f0b 97c8 -e9ae 82ae 43d3 -`), - []HeaderField{ - pair(":status", "302"), - pair("cache-control", "private"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("location", "https://www.example.com"), - }, - []HeaderField{ - pair("location", "https://www.example.com"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("cache-control", "private"), - pair(":status", "302"), - }, - 222, - }, - {dehex("4883 640e ffc1 c0bf"), - []HeaderField{ - pair(":status", "307"), - pair("cache-control", "private"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("location", "https://www.example.com"), - }, - []HeaderField{ - pair(":status", "307"), - pair("location", "https://www.example.com"), - pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), - pair("cache-control", "private"), - }, - 222, - }, - {dehex(` -88c1 6196 d07a be94 1054 d444 a820 0595 -040b 8166 e084 a62d 1bff c05a 839b d9ab -77ad 94e7 821d d7f2 e6c7 b335 dfdf cd5b -3960 d5af 2708 7f36 72c1 ab27 0fb5 291f -9587 3160 65c0 03ed 4ee5 b106 3d50 07 -`), - []HeaderField{ - pair(":status", "200"), - pair("cache-control", "private"), - pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), - pair("location", "https://www.example.com"), - pair("content-encoding", "gzip"), - pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), - }, - []HeaderField{ - pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), - pair("content-encoding", "gzip"), - pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), - }, - 215, - }, - }) -} - -func testDecodeSeries(t *testing.T, size uint32, steps []encAndWant) { - d := NewDecoder(size, nil) - for i, step := range steps { - hf, err := d.DecodeFull(step.enc) - if err != nil { - t.Fatalf("Error at step index %d: %v", i, err) - } - if !reflect.DeepEqual(hf, step.want) { - t.Fatalf("At step index %d: Got headers %v; want %v", i, hf, step.want) - } - gotDynTab := d.dynTab.reverseCopy() - if !reflect.DeepEqual(gotDynTab, step.wantDynTab) { - t.Errorf("After step index %d, dynamic table = %v; want %v", i, gotDynTab, step.wantDynTab) - } - if d.dynTab.size != step.wantDynSize { - t.Errorf("After step index %d, dynamic table size = %v; want %v", i, d.dynTab.size, step.wantDynSize) - } - } -} - -func TestHuffmanDecodeExcessPadding(t *testing.T) { - tests := [][]byte{ - {0xff}, // Padding Exceeds 7 bits - {0x1f, 0xff}, // {"a", 1 byte excess padding} - {0x1f, 0xff, 0xff}, // {"a", 2 byte excess padding} - {0x1f, 0xff, 0xff, 0xff}, // {"a", 3 byte excess padding} - {0xff, 0x9f, 0xff, 0xff, 0xff}, // {"a", 29 bit excess padding} - {'R', 0xbc, '0', 0xff, 0xff, 0xff, 0xff}, // Padding ends on partial symbol. - } - for i, in := range tests { - var buf bytes.Buffer - if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman { - t.Errorf("test-%d: decode(%q) = %v; want ErrInvalidHuffman", i, in, err) - } - } -} - -func TestHuffmanDecodeEOS(t *testing.T) { - in := []byte{0xff, 0xff, 0xff, 0xff, 0xfc} // {EOS, "?"} - var buf bytes.Buffer - if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman { - t.Errorf("error = %v; want ErrInvalidHuffman", err) - } -} - -func TestHuffmanDecodeMaxLengthOnTrailingByte(t *testing.T) { - in := []byte{0x00, 0x01} // {"0", "0", "0"} - var buf bytes.Buffer - if err := huffmanDecode(&buf, 2, in); err != ErrStringLength { - t.Errorf("error = %v; want ErrStringLength", err) - } -} - -func TestHuffmanDecodeCorruptPadding(t *testing.T) { - in := []byte{0x00} - var buf bytes.Buffer - if _, err := HuffmanDecode(&buf, in); err != ErrInvalidHuffman { - t.Errorf("error = %v; want ErrInvalidHuffman", err) - } -} - -func TestHuffmanDecode(t *testing.T) { - tests := []struct { - inHex, want string - }{ - {"f1e3 c2e5 f23a 6ba0 ab90 f4ff", "www.example.com"}, - {"a8eb 1064 9cbf", "no-cache"}, - {"25a8 49e9 5ba9 7d7f", "custom-key"}, - {"25a8 49e9 5bb8 e8b4 bf", "custom-value"}, - {"6402", "302"}, - {"aec3 771a 4b", "private"}, - {"d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff", "Mon, 21 Oct 2013 20:13:21 GMT"}, - {"9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3", "https://www.example.com"}, - {"9bd9 ab", "gzip"}, - {"94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07", - "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"}, - } - for i, tt := range tests { - var buf bytes.Buffer - in, err := hex.DecodeString(strings.Replace(tt.inHex, " ", "", -1)) - if err != nil { - t.Errorf("%d. hex input error: %v", i, err) - continue - } - if _, err := HuffmanDecode(&buf, in); err != nil { - t.Errorf("%d. decode error: %v", i, err) - continue - } - if got := buf.String(); tt.want != got { - t.Errorf("%d. decode = %q; want %q", i, got, tt.want) - } - } -} - -func TestAppendHuffmanString(t *testing.T) { - tests := []struct { - in, want string - }{ - {"www.example.com", "f1e3 c2e5 f23a 6ba0 ab90 f4ff"}, - {"no-cache", "a8eb 1064 9cbf"}, - {"custom-key", "25a8 49e9 5ba9 7d7f"}, - {"custom-value", "25a8 49e9 5bb8 e8b4 bf"}, - {"302", "6402"}, - {"private", "aec3 771a 4b"}, - {"Mon, 21 Oct 2013 20:13:21 GMT", "d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff"}, - {"https://www.example.com", "9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3"}, - {"gzip", "9bd9 ab"}, - {"foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1", - "94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07"}, - } - for i, tt := range tests { - buf := []byte{} - want := strings.Replace(tt.want, " ", "", -1) - buf = AppendHuffmanString(buf, tt.in) - if got := hex.EncodeToString(buf); want != got { - t.Errorf("%d. encode = %q; want %q", i, got, want) - } - } -} - -func TestHuffmanMaxStrLen(t *testing.T) { - const msg = "Some string" - huff := AppendHuffmanString(nil, msg) - - testGood := func(max int) { - var out bytes.Buffer - if err := huffmanDecode(&out, max, huff); err != nil { - t.Errorf("For maxLen=%d, unexpected error: %v", max, err) - } - if out.String() != msg { - t.Errorf("For maxLen=%d, out = %q; want %q", max, out.String(), msg) - } - } - testGood(0) - testGood(len(msg)) - testGood(len(msg) + 1) - - var out bytes.Buffer - if err := huffmanDecode(&out, len(msg)-1, huff); err != ErrStringLength { - t.Errorf("err = %v; want ErrStringLength", err) - } -} - -func TestHuffmanRoundtripStress(t *testing.T) { - const Len = 50 // of uncompressed string - input := make([]byte, Len) - var output bytes.Buffer - var huff []byte - - n := 5000 - if testing.Short() { - n = 100 - } - seed := time.Now().UnixNano() - t.Logf("Seed = %v", seed) - src := rand.New(rand.NewSource(seed)) - var encSize int64 - for i := 0; i < n; i++ { - for l := range input { - input[l] = byte(src.Intn(256)) - } - huff = AppendHuffmanString(huff[:0], string(input)) - encSize += int64(len(huff)) - output.Reset() - if err := huffmanDecode(&output, 0, huff); err != nil { - t.Errorf("Failed to decode %q -> %q -> error %v", input, huff, err) - continue - } - if !bytes.Equal(output.Bytes(), input) { - t.Errorf("Roundtrip failure on %q -> %q -> %q", input, huff, output.Bytes()) - } - } - t.Logf("Compressed size of original: %0.02f%% (%v -> %v)", 100*(float64(encSize)/(Len*float64(n))), Len*n, encSize) -} - -func TestHuffmanDecodeFuzz(t *testing.T) { - const Len = 50 // of compressed - var buf, zbuf bytes.Buffer - - n := 5000 - if testing.Short() { - n = 100 - } - seed := time.Now().UnixNano() - t.Logf("Seed = %v", seed) - src := rand.New(rand.NewSource(seed)) - numFail := 0 - for i := 0; i < n; i++ { - zbuf.Reset() - if i == 0 { - // Start with at least one invalid one. - zbuf.WriteString("00\x91\xff\xff\xff\xff\xc8") - } else { - for l := 0; l < Len; l++ { - zbuf.WriteByte(byte(src.Intn(256))) - } - } - - buf.Reset() - if err := huffmanDecode(&buf, 0, zbuf.Bytes()); err != nil { - if err == ErrInvalidHuffman { - numFail++ - continue - } - t.Errorf("Failed to decode %q: %v", zbuf.Bytes(), err) - continue - } - } - t.Logf("%0.02f%% are invalid (%d / %d)", 100*float64(numFail)/float64(n), numFail, n) - if numFail < 1 { - t.Error("expected at least one invalid huffman encoding (test starts with one)") - } -} - -func TestReadVarInt(t *testing.T) { - type res struct { - i uint64 - consumed int - err error - } - tests := []struct { - n byte - p []byte - want res - }{ - // Fits in a byte: - {1, []byte{0}, res{0, 1, nil}}, - {2, []byte{2}, res{2, 1, nil}}, - {3, []byte{6}, res{6, 1, nil}}, - {4, []byte{14}, res{14, 1, nil}}, - {5, []byte{30}, res{30, 1, nil}}, - {6, []byte{62}, res{62, 1, nil}}, - {7, []byte{126}, res{126, 1, nil}}, - {8, []byte{254}, res{254, 1, nil}}, - - // Doesn't fit in a byte: - {1, []byte{1}, res{0, 0, errNeedMore}}, - {2, []byte{3}, res{0, 0, errNeedMore}}, - {3, []byte{7}, res{0, 0, errNeedMore}}, - {4, []byte{15}, res{0, 0, errNeedMore}}, - {5, []byte{31}, res{0, 0, errNeedMore}}, - {6, []byte{63}, res{0, 0, errNeedMore}}, - {7, []byte{127}, res{0, 0, errNeedMore}}, - {8, []byte{255}, res{0, 0, errNeedMore}}, - - // Ignoring top bits: - {5, []byte{255, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 111 - {5, []byte{159, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 100 - {5, []byte{191, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 101 - - // Extra byte: - {5, []byte{191, 154, 10, 2}, res{1337, 3, nil}}, // extra byte - - // Short a byte: - {5, []byte{191, 154}, res{0, 0, errNeedMore}}, - - // integer overflow: - {1, []byte{255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, res{0, 0, errVarintOverflow}}, - } - for _, tt := range tests { - i, remain, err := readVarInt(tt.n, tt.p) - consumed := len(tt.p) - len(remain) - got := res{i, consumed, err} - if got != tt.want { - t.Errorf("readVarInt(%d, %v ~ %x) = %+v; want %+v", tt.n, tt.p, tt.p, got, tt.want) - } - } -} - -// Fuzz crash, originally reported at https://github.com/bradfitz/http2/issues/56 -func TestHuffmanFuzzCrash(t *testing.T) { - got, err := HuffmanDecodeToString([]byte("00\x91\xff\xff\xff\xff\xc8")) - if got != "" { - t.Errorf("Got %q; want empty string", got) - } - if err != ErrInvalidHuffman { - t.Errorf("Err = %v; want ErrInvalidHuffman", err) - } -} - -func pair(name, value string) HeaderField { - return HeaderField{Name: name, Value: value} -} - -func dehex(s string) []byte { - s = strings.Replace(s, " ", "", -1) - s = strings.Replace(s, "\n", "", -1) - b, err := hex.DecodeString(s) - if err != nil { - panic(err) - } - return b -} - -func TestEmitEnabled(t *testing.T) { - var buf bytes.Buffer - enc := NewEncoder(&buf) - enc.WriteField(HeaderField{Name: "foo", Value: "bar"}) - enc.WriteField(HeaderField{Name: "foo", Value: "bar"}) - - numCallback := 0 - var dec *Decoder - dec = NewDecoder(8<<20, func(HeaderField) { - numCallback++ - dec.SetEmitEnabled(false) - }) - if !dec.EmitEnabled() { - t.Errorf("initial emit enabled = false; want true") - } - if _, err := dec.Write(buf.Bytes()); err != nil { - t.Error(err) - } - if numCallback != 1 { - t.Errorf("num callbacks = %d; want 1", numCallback) - } - if dec.EmitEnabled() { - t.Errorf("emit enabled = true; want false") - } -} - -func TestSaveBufLimit(t *testing.T) { - const maxStr = 1 << 10 - var got []HeaderField - dec := NewDecoder(initialHeaderTableSize, func(hf HeaderField) { - got = append(got, hf) - }) - dec.SetMaxStringLength(maxStr) - var frag []byte - frag = append(frag[:0], encodeTypeByte(false, false)) - frag = appendVarInt(frag, 7, 3) - frag = append(frag, "foo"...) - frag = appendVarInt(frag, 7, 3) - frag = append(frag, "bar"...) - - if _, err := dec.Write(frag); err != nil { - t.Fatal(err) - } - - want := []HeaderField{{Name: "foo", Value: "bar"}} - if !reflect.DeepEqual(got, want) { - t.Errorf("After small writes, got %v; want %v", got, want) - } - - frag = append(frag[:0], encodeTypeByte(false, false)) - frag = appendVarInt(frag, 7, maxStr*3) - frag = append(frag, make([]byte, maxStr*3)...) - - _, err := dec.Write(frag) - if err != ErrStringLength { - t.Fatalf("Write error = %v; want ErrStringLength", err) - } -} - -func TestDynamicSizeUpdate(t *testing.T) { - var buf bytes.Buffer - enc := NewEncoder(&buf) - enc.SetMaxDynamicTableSize(255) - enc.WriteField(HeaderField{Name: "foo", Value: "bar"}) - - d := NewDecoder(4096, nil) - _, err := d.DecodeFull(buf.Bytes()) - if err != nil { - t.Fatalf("unexpected error: got = %v", err) - } - - // must fail since the dynamic table update must be at the beginning - _, err = d.DecodeFull(buf.Bytes()) - if err == nil { - t.Fatalf("dynamic table size update not at the beginning of a header block") - } -} diff --git a/deps/golang.org/x/net/http2/hpack/tables_test.go b/deps/golang.org/x/net/http2/hpack/tables_test.go deleted file mode 100644 index d963f3635..000000000 --- a/deps/golang.org/x/net/http2/hpack/tables_test.go +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package hpack - -import ( - "bufio" - "regexp" - "strconv" - "strings" - "testing" -) - -func TestHeaderFieldTable(t *testing.T) { - table := &headerFieldTable{} - table.init() - table.addEntry(pair("key1", "value1-1")) - table.addEntry(pair("key2", "value2-1")) - table.addEntry(pair("key1", "value1-2")) - table.addEntry(pair("key3", "value3-1")) - table.addEntry(pair("key4", "value4-1")) - table.addEntry(pair("key2", "value2-2")) - - // Tests will be run twice: once before evicting anything, and - // again after evicting the three oldest entries. - tests := []struct { - f HeaderField - beforeWantStaticI uint64 - beforeWantMatch bool - afterWantStaticI uint64 - afterWantMatch bool - }{ - {HeaderField{"key1", "value1-1", false}, 1, true, 0, false}, - {HeaderField{"key1", "value1-2", false}, 3, true, 0, false}, - {HeaderField{"key1", "value1-3", false}, 3, false, 0, false}, - {HeaderField{"key2", "value2-1", false}, 2, true, 3, false}, - {HeaderField{"key2", "value2-2", false}, 6, true, 3, true}, - {HeaderField{"key2", "value2-3", false}, 6, false, 3, false}, - {HeaderField{"key4", "value4-1", false}, 5, true, 2, true}, - // Name match only, because sensitive. - {HeaderField{"key4", "value4-1", true}, 5, false, 2, false}, - // Key not found. - {HeaderField{"key5", "value5-x", false}, 0, false, 0, false}, - } - - staticToDynamic := func(i uint64) uint64 { - if i == 0 { - return 0 - } - return uint64(table.len()) - i + 1 // dynamic is the reversed table - } - - searchStatic := func(f HeaderField) (uint64, bool) { - old := staticTable - staticTable = table - defer func() { staticTable = old }() - return staticTable.search(f) - } - - searchDynamic := func(f HeaderField) (uint64, bool) { - return table.search(f) - } - - for _, test := range tests { - gotI, gotMatch := searchStatic(test.f) - if wantI, wantMatch := test.beforeWantStaticI, test.beforeWantMatch; gotI != wantI || gotMatch != wantMatch { - t.Errorf("before evictions: searchStatic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) - } - gotI, gotMatch = searchDynamic(test.f) - wantDynamicI := staticToDynamic(test.beforeWantStaticI) - if wantI, wantMatch := wantDynamicI, test.beforeWantMatch; gotI != wantI || gotMatch != wantMatch { - t.Errorf("before evictions: searchDynamic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) - } - } - - table.evictOldest(3) - - for _, test := range tests { - gotI, gotMatch := searchStatic(test.f) - if wantI, wantMatch := test.afterWantStaticI, test.afterWantMatch; gotI != wantI || gotMatch != wantMatch { - t.Errorf("after evictions: searchStatic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) - } - gotI, gotMatch = searchDynamic(test.f) - wantDynamicI := staticToDynamic(test.afterWantStaticI) - if wantI, wantMatch := wantDynamicI, test.afterWantMatch; gotI != wantI || gotMatch != wantMatch { - t.Errorf("after evictions: searchDynamic(%+v)=%v,%v want %v,%v", test.f, gotI, gotMatch, wantI, wantMatch) - } - } -} - -func TestHeaderFieldTable_LookupMapEviction(t *testing.T) { - table := &headerFieldTable{} - table.init() - table.addEntry(pair("key1", "value1-1")) - table.addEntry(pair("key2", "value2-1")) - table.addEntry(pair("key1", "value1-2")) - table.addEntry(pair("key3", "value3-1")) - table.addEntry(pair("key4", "value4-1")) - table.addEntry(pair("key2", "value2-2")) - - // evict all pairs - table.evictOldest(table.len()) - - if l := table.len(); l > 0 { - t.Errorf("table.len() = %d, want 0", l) - } - - if l := len(table.byName); l > 0 { - t.Errorf("len(table.byName) = %d, want 0", l) - } - - if l := len(table.byNameValue); l > 0 { - t.Errorf("len(table.byNameValue) = %d, want 0", l) - } -} - -func TestStaticTable(t *testing.T) { - fromSpec := ` - +-------+-----------------------------+---------------+ - | 1 | :authority | | - | 2 | :method | GET | - | 3 | :method | POST | - | 4 | :path | / | - | 5 | :path | /index.html | - | 6 | :scheme | http | - | 7 | :scheme | https | - | 8 | :status | 200 | - | 9 | :status | 204 | - | 10 | :status | 206 | - | 11 | :status | 304 | - | 12 | :status | 400 | - | 13 | :status | 404 | - | 14 | :status | 500 | - | 15 | accept-charset | | - | 16 | accept-encoding | gzip, deflate | - | 17 | accept-language | | - | 18 | accept-ranges | | - | 19 | accept | | - | 20 | access-control-allow-origin | | - | 21 | age | | - | 22 | allow | | - | 23 | authorization | | - | 24 | cache-control | | - | 25 | content-disposition | | - | 26 | content-encoding | | - | 27 | content-language | | - | 28 | content-length | | - | 29 | content-location | | - | 30 | content-range | | - | 31 | content-type | | - | 32 | cookie | | - | 33 | date | | - | 34 | etag | | - | 35 | expect | | - | 36 | expires | | - | 37 | from | | - | 38 | host | | - | 39 | if-match | | - | 40 | if-modified-since | | - | 41 | if-none-match | | - | 42 | if-range | | - | 43 | if-unmodified-since | | - | 44 | last-modified | | - | 45 | link | | - | 46 | location | | - | 47 | max-forwards | | - | 48 | proxy-authenticate | | - | 49 | proxy-authorization | | - | 50 | range | | - | 51 | referer | | - | 52 | refresh | | - | 53 | retry-after | | - | 54 | server | | - | 55 | set-cookie | | - | 56 | strict-transport-security | | - | 57 | transfer-encoding | | - | 58 | user-agent | | - | 59 | vary | | - | 60 | via | | - | 61 | www-authenticate | | - +-------+-----------------------------+---------------+ -` - bs := bufio.NewScanner(strings.NewReader(fromSpec)) - re := regexp.MustCompile(`\| (\d+)\s+\| (\S+)\s*\| (\S(.*\S)?)?\s+\|`) - for bs.Scan() { - l := bs.Text() - if !strings.Contains(l, "|") { - continue - } - m := re.FindStringSubmatch(l) - if m == nil { - continue - } - i, err := strconv.Atoi(m[1]) - if err != nil { - t.Errorf("Bogus integer on line %q", l) - continue - } - if i < 1 || i > staticTable.len() { - t.Errorf("Bogus index %d on line %q", i, l) - continue - } - if got, want := staticTable.ents[i-1].Name, m[2]; got != want { - t.Errorf("header index %d name = %q; want %q", i, got, want) - } - if got, want := staticTable.ents[i-1].Value, m[3]; got != want { - t.Errorf("header index %d value = %q; want %q", i, got, want) - } - } - if err := bs.Err(); err != nil { - t.Error(err) - } -} diff --git a/deps/golang.org/x/net/http2/http2.go b/deps/golang.org/x/net/http2/http2.go index c82428254..15d7aff38 100644 --- a/deps/golang.org/x/net/http2/http2.go +++ b/deps/golang.org/x/net/http2/http2.go @@ -14,7 +14,7 @@ // // See https://http2.golang.org/ for a test server running this code. // -package http2 // import "golang.org/x/net/http2" +package http2 import ( "bufio" @@ -29,7 +29,7 @@ import ( "strings" "sync" - "golang.org/x/net/http/httpguts" + "golang.org/x/net/lex/httplex" ) var ( @@ -179,7 +179,7 @@ var ( ) // validWireHeaderFieldName reports whether v is a valid header field -// name (key). See httpguts.ValidHeaderName for the base rules. +// name (key). See httplex.ValidHeaderName for the base rules. // // Further, http2 says: // "Just as in HTTP/1.x, header field names are strings of ASCII @@ -191,7 +191,7 @@ func validWireHeaderFieldName(v string) bool { return false } for _, r := range v { - if !httpguts.IsTokenRune(r) { + if !httplex.IsTokenRune(r) { return false } if 'A' <= r && r <= 'Z' { @@ -312,7 +312,7 @@ func mustUint31(v int32) uint32 { } // bodyAllowedForStatus reports whether a given response status code -// permits a body. See RFC 7230, section 3.3. +// permits a body. See RFC 2616, section 4.4. func bodyAllowedForStatus(status int) bool { switch { case status >= 100 && status <= 199: diff --git a/deps/golang.org/x/net/http2/http2_test.go b/deps/golang.org/x/net/http2/http2_test.go deleted file mode 100644 index 667db4887..000000000 --- a/deps/golang.org/x/net/http2/http2_test.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import ( - "bytes" - "errors" - "flag" - "fmt" - "net/http" - "os/exec" - "strconv" - "strings" - "testing" - "time" - - "golang.org/x/net/http2/hpack" -) - -var knownFailing = flag.Bool("known_failing", false, "Run known-failing tests.") - -func condSkipFailingTest(t *testing.T) { - if !*knownFailing { - t.Skip("Skipping known-failing test without --known_failing") - } -} - -func init() { - inTests = true - DebugGoroutines = true - flag.BoolVar(&VerboseLogs, "verboseh2", VerboseLogs, "Verbose HTTP/2 debug logging") -} - -func TestSettingString(t *testing.T) { - tests := []struct { - s Setting - want string - }{ - {Setting{SettingMaxFrameSize, 123}, "[MAX_FRAME_SIZE = 123]"}, - {Setting{1<<16 - 1, 123}, "[UNKNOWN_SETTING_65535 = 123]"}, - } - for i, tt := range tests { - got := fmt.Sprint(tt.s) - if got != tt.want { - t.Errorf("%d. for %#v, string = %q; want %q", i, tt.s, got, tt.want) - } - } -} - -type twriter struct { - t testing.TB - st *serverTester // optional -} - -func (w twriter) Write(p []byte) (n int, err error) { - if w.st != nil { - ps := string(p) - for _, phrase := range w.st.logFilter { - if strings.Contains(ps, phrase) { - return len(p), nil // no logging - } - } - } - w.t.Logf("%s", p) - return len(p), nil -} - -// like encodeHeader, but don't add implicit pseudo headers. -func encodeHeaderNoImplicit(t *testing.T, headers ...string) []byte { - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - for len(headers) > 0 { - k, v := headers[0], headers[1] - headers = headers[2:] - if err := enc.WriteField(hpack.HeaderField{Name: k, Value: v}); err != nil { - t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) - } - } - return buf.Bytes() -} - -// Verify that curl has http2. -func requireCurl(t *testing.T) { - out, err := dockerLogs(curl(t, "--version")) - if err != nil { - t.Skipf("failed to determine curl features; skipping test") - } - if !strings.Contains(string(out), "HTTP2") { - t.Skip("curl doesn't support HTTP2; skipping test") - } -} - -func curl(t *testing.T, args ...string) (container string) { - out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "gohttp2/curl"}, args...)...).Output() - if err != nil { - t.Skipf("Failed to run curl in docker: %v, %s", err, out) - } - return strings.TrimSpace(string(out)) -} - -// Verify that h2load exists. -func requireH2load(t *testing.T) { - out, err := dockerLogs(h2load(t, "--version")) - if err != nil { - t.Skipf("failed to probe h2load; skipping test: %s", out) - } - if !strings.Contains(string(out), "h2load nghttp2/") { - t.Skipf("h2load not present; skipping test. (Output=%q)", out) - } -} - -func h2load(t *testing.T, args ...string) (container string) { - out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl"}, args...)...).Output() - if err != nil { - t.Skipf("Failed to run h2load in docker: %v, %s", err, out) - } - return strings.TrimSpace(string(out)) -} - -type puppetCommand struct { - fn func(w http.ResponseWriter, r *http.Request) - done chan<- bool -} - -type handlerPuppet struct { - ch chan puppetCommand -} - -func newHandlerPuppet() *handlerPuppet { - return &handlerPuppet{ - ch: make(chan puppetCommand), - } -} - -func (p *handlerPuppet) act(w http.ResponseWriter, r *http.Request) { - for cmd := range p.ch { - cmd.fn(w, r) - cmd.done <- true - } -} - -func (p *handlerPuppet) done() { close(p.ch) } -func (p *handlerPuppet) do(fn func(http.ResponseWriter, *http.Request)) { - done := make(chan bool) - p.ch <- puppetCommand{fn, done} - <-done -} -func dockerLogs(container string) ([]byte, error) { - out, err := exec.Command("docker", "wait", container).CombinedOutput() - if err != nil { - return out, err - } - exitStatus, err := strconv.Atoi(strings.TrimSpace(string(out))) - if err != nil { - return out, errors.New("unexpected exit status from docker wait") - } - out, err = exec.Command("docker", "logs", container).CombinedOutput() - exec.Command("docker", "rm", container).Run() - if err == nil && exitStatus != 0 { - err = fmt.Errorf("exit status %d: %s", exitStatus, out) - } - return out, err -} - -func kill(container string) { - exec.Command("docker", "kill", container).Run() - exec.Command("docker", "rm", container).Run() -} - -func cleanDate(res *http.Response) { - if d := res.Header["Date"]; len(d) == 1 { - d[0] = "XXX" - } -} - -func TestSorterPoolAllocs(t *testing.T) { - ss := []string{"a", "b", "c"} - h := http.Header{ - "a": nil, - "b": nil, - "c": nil, - } - sorter := new(sorter) - - if allocs := testing.AllocsPerRun(100, func() { - sorter.SortStrings(ss) - }); allocs >= 1 { - t.Logf("SortStrings allocs = %v; want <1", allocs) - } - - if allocs := testing.AllocsPerRun(5, func() { - if len(sorter.Keys(h)) != 3 { - t.Fatal("wrong result") - } - }); allocs > 0 { - t.Logf("Keys allocs = %v; want <1", allocs) - } -} - -// waitCondition reports whether fn eventually returned true, -// checking immediately and then every checkEvery amount, -// until waitFor has elapsed, at which point it returns false. -func waitCondition(waitFor, checkEvery time.Duration, fn func() bool) bool { - deadline := time.Now().Add(waitFor) - for time.Now().Before(deadline) { - if fn() { - return true - } - time.Sleep(checkEvery) - } - return false -} - -// waitErrCondition is like waitCondition but with errors instead of bools. -func waitErrCondition(waitFor, checkEvery time.Duration, fn func() error) error { - deadline := time.Now().Add(waitFor) - var err error - for time.Now().Before(deadline) { - if err = fn(); err == nil { - return nil - } - time.Sleep(checkEvery) - } - return err -} diff --git a/deps/golang.org/x/net/http2/pipe_test.go b/deps/golang.org/x/net/http2/pipe_test.go deleted file mode 100644 index 1bf351ff6..000000000 --- a/deps/golang.org/x/net/http2/pipe_test.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import ( - "bytes" - "errors" - "io" - "io/ioutil" - "testing" -) - -func TestPipeClose(t *testing.T) { - var p pipe - p.b = new(bytes.Buffer) - a := errors.New("a") - b := errors.New("b") - p.CloseWithError(a) - p.CloseWithError(b) - _, err := p.Read(make([]byte, 1)) - if err != a { - t.Errorf("err = %v want %v", err, a) - } -} - -func TestPipeDoneChan(t *testing.T) { - var p pipe - done := p.Done() - select { - case <-done: - t.Fatal("done too soon") - default: - } - p.CloseWithError(io.EOF) - select { - case <-done: - default: - t.Fatal("should be done") - } -} - -func TestPipeDoneChan_ErrFirst(t *testing.T) { - var p pipe - p.CloseWithError(io.EOF) - done := p.Done() - select { - case <-done: - default: - t.Fatal("should be done") - } -} - -func TestPipeDoneChan_Break(t *testing.T) { - var p pipe - done := p.Done() - select { - case <-done: - t.Fatal("done too soon") - default: - } - p.BreakWithError(io.EOF) - select { - case <-done: - default: - t.Fatal("should be done") - } -} - -func TestPipeDoneChan_Break_ErrFirst(t *testing.T) { - var p pipe - p.BreakWithError(io.EOF) - done := p.Done() - select { - case <-done: - default: - t.Fatal("should be done") - } -} - -func TestPipeCloseWithError(t *testing.T) { - p := &pipe{b: new(bytes.Buffer)} - const body = "foo" - io.WriteString(p, body) - a := errors.New("test error") - p.CloseWithError(a) - all, err := ioutil.ReadAll(p) - if string(all) != body { - t.Errorf("read bytes = %q; want %q", all, body) - } - if err != a { - t.Logf("read error = %v, %v", err, a) - } - // Read and Write should fail. - if n, err := p.Write([]byte("abc")); err != errClosedPipeWrite || n != 0 { - t.Errorf("Write(abc) after close\ngot %v, %v\nwant 0, %v", n, err, errClosedPipeWrite) - } - if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 { - t.Errorf("Read() after close\ngot %v, nil\nwant 0, %v", n, errClosedPipeWrite) - } -} - -func TestPipeBreakWithError(t *testing.T) { - p := &pipe{b: new(bytes.Buffer)} - io.WriteString(p, "foo") - a := errors.New("test err") - p.BreakWithError(a) - all, err := ioutil.ReadAll(p) - if string(all) != "" { - t.Errorf("read bytes = %q; want empty string", all) - } - if err != a { - t.Logf("read error = %v, %v", err, a) - } - if p.b != nil { - t.Errorf("buffer should be nil after BreakWithError") - } - // Write should succeed silently. - if n, err := p.Write([]byte("abc")); err != nil || n != 3 { - t.Errorf("Write(abc) after break\ngot %v, %v\nwant 0, nil", n, err) - } - if p.b != nil { - t.Errorf("buffer should be nil after Write") - } - // Read should fail. - if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 { - t.Errorf("Read() after close\ngot %v, nil\nwant 0, not nil", n) - } -} diff --git a/deps/golang.org/x/net/http2/server.go b/deps/golang.org/x/net/http2/server.go index 793899169..eae143ddf 100644 --- a/deps/golang.org/x/net/http2/server.go +++ b/deps/golang.org/x/net/http2/server.go @@ -46,7 +46,6 @@ import ( "sync" "time" - "golang.org/x/net/http/httpguts" "golang.org/x/net/http2/hpack" ) @@ -221,15 +220,12 @@ func ConfigureServer(s *http.Server, conf *Server) error { } else if s.TLSConfig.CipherSuites != nil { // If they already provided a CipherSuite list, return // an error if it has a bad order or is missing - // ECDHE_RSA_WITH_AES_128_GCM_SHA256 or ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. + // ECDHE_RSA_WITH_AES_128_GCM_SHA256. + const requiredCipher = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 haveRequired := false sawBad := false for i, cs := range s.TLSConfig.CipherSuites { - switch cs { - case tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - // Alternative MTI cipher to not discourage ECDSA-only servers. - // See http://golang.org/cl/30721 for further information. - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: + if cs == requiredCipher { haveRequired = true } if isBadCipher(cs) { @@ -239,7 +235,7 @@ func ConfigureServer(s *http.Server, conf *Server) error { } } if !haveRequired { - return fmt.Errorf("http2: TLSConfig.CipherSuites is missing an HTTP/2-required AES_128_GCM_SHA256 cipher.") + return fmt.Errorf("http2: TLSConfig.CipherSuites is missing HTTP/2-required TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256") } } @@ -407,7 +403,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { // addresses during development. // // TODO: optionally enforce? Or enforce at the time we receive - // a new request, and verify the ServerName matches the :authority? + // a new request, and verify the the ServerName matches the :authority? // But that precludes proxy situations, perhaps. // // So for now, do nothing here again. @@ -653,7 +649,7 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) { if err == nil { return } - if err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) || err == errPrefaceTimeout { + if err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) { // Boring, expected errors. sc.vlogf(format, args...) } else { @@ -857,13 +853,8 @@ func (sc *serverConn) serve() { } } - // Start the shutdown timer after sending a GOAWAY. When sending GOAWAY - // with no error code (graceful shutdown), don't start the timer until - // all open streams have been completed. - sentGoAway := sc.inGoAway && !sc.needToSendGoAway && !sc.writingFrame - gracefulShutdownComplete := sc.goAwayCode == ErrCodeNo && sc.curOpenStreams() == 0 - if sentGoAway && sc.shutdownTimer == nil && (sc.goAwayCode != ErrCodeNo || gracefulShutdownComplete) { - sc.shutDownIn(goAwayTimeout) + if sc.inGoAway && sc.curOpenStreams() == 0 && !sc.needToSendGoAway && !sc.writingFrame { + return } } } @@ -898,11 +889,8 @@ func (sc *serverConn) sendServeMsg(msg interface{}) { } } -var errPrefaceTimeout = errors.New("timeout waiting for client preface") - -// readPreface reads the ClientPreface greeting from the peer or -// returns errPrefaceTimeout on timeout, or an error if the greeting -// is invalid. +// readPreface reads the ClientPreface greeting from the peer +// or returns an error on timeout or an invalid greeting. func (sc *serverConn) readPreface() error { errc := make(chan error, 1) go func() { @@ -920,7 +908,7 @@ func (sc *serverConn) readPreface() error { defer timer.Stop() select { case <-timer.C: - return errPrefaceTimeout + return errors.New("timeout waiting for client preface") case err := <-errc: if err == nil { if VerboseLogs { @@ -1230,31 +1218,30 @@ func (sc *serverConn) startGracefulShutdown() { sc.shutdownOnce.Do(func() { sc.sendServeMsg(gracefulShutdownMsg) }) } -// After sending GOAWAY, the connection will close after goAwayTimeout. -// If we close the connection immediately after sending GOAWAY, there may -// be unsent data in our kernel receive buffer, which will cause the kernel -// to send a TCP RST on close() instead of a FIN. This RST will abort the -// connection immediately, whether or not the client had received the GOAWAY. -// -// Ideally we should delay for at least 1 RTT + epsilon so the client has -// a chance to read the GOAWAY and stop sending messages. Measuring RTT -// is hard, so we approximate with 1 second. See golang.org/issue/18701. -// -// This is a var so it can be shorter in tests, where all requests uses the -// loopback interface making the expected RTT very small. -// -// TODO: configurable? -var goAwayTimeout = 1 * time.Second - func (sc *serverConn) startGracefulShutdownInternal() { - sc.goAway(ErrCodeNo) + sc.goAwayIn(ErrCodeNo, 0) } func (sc *serverConn) goAway(code ErrCode) { + sc.serveG.check() + var forceCloseIn time.Duration + if code != ErrCodeNo { + forceCloseIn = 250 * time.Millisecond + } else { + // TODO: configurable + forceCloseIn = 1 * time.Second + } + sc.goAwayIn(code, forceCloseIn) +} + +func (sc *serverConn) goAwayIn(code ErrCode, forceCloseIn time.Duration) { sc.serveG.check() if sc.inGoAway { return } + if forceCloseIn != 0 { + sc.shutDownIn(forceCloseIn) + } sc.inGoAway = true sc.needToSendGoAway = true sc.goAwayCode = code @@ -1608,10 +1595,7 @@ func (sc *serverConn) processData(f *DataFrame) error { // Sender sending more than they'd declared? if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes { st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes)) - // RFC 7540, sec 8.1.2.6: A request or response is also malformed if the - // value of a content-length header field does not equal the sum of the - // DATA frame payload lengths that form the body. - return streamError(id, ErrCodeProtocol) + return streamError(id, ErrCodeStreamClosed) } if f.Length > 0 { // Check whether the client has flow control quota. @@ -1821,7 +1805,7 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error { if st.trailer != nil { for _, hf := range f.RegularFields() { key := sc.canonicalHeader(hf.Name) - if !httpguts.ValidTrailerHeader(key) { + if !ValidTrailerHeader(key) { // TODO: send more details to the peer somehow. But http2 has // no way to send debug data at a stream level. Discuss with // HTTP folk. @@ -2288,8 +2272,8 @@ func (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) != // written in the trailers at the end of the response. func (rws *responseWriterState) declareTrailer(k string) { k = http.CanonicalHeaderKey(k) - if !httpguts.ValidTrailerHeader(k) { - // Forbidden by RFC 7230, section 4.1.2. + if !ValidTrailerHeader(k) { + // Forbidden by RFC 2616 14.40. rws.conn.logf("ignoring invalid trailer %q", k) return } @@ -2326,16 +2310,8 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { clen = strconv.Itoa(len(p)) } _, hasContentType := rws.snapHeader["Content-Type"] - if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 { - if cto := rws.snapHeader.Get("X-Content-Type-Options"); strings.EqualFold("nosniff", cto) { - // nosniff is an explicit directive not to guess a content-type. - // Content-sniffing is no less susceptible to polyglot attacks via - // hosted content when done on the server. - ctype = "application/octet-stream" - rws.conn.logf("http2: WriteHeader called with X-Content-Type-Options:nosniff but no Content-Type") - } else { - ctype = http.DetectContentType(p) - } + if !hasContentType && bodyAllowedForStatus(rws.status) { + ctype = http.DetectContentType(p) } var date string if _, ok := rws.snapHeader["Date"]; !ok { @@ -2347,19 +2323,6 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { foreachHeaderElement(v, rws.declareTrailer) } - // "Connection" headers aren't allowed in HTTP/2 (RFC 7540, 8.1.2.2), - // but respect "Connection" == "close" to mean sending a GOAWAY and tearing - // down the TCP connection when idle, like we do for HTTP/1. - // TODO: remove more Connection-specific header fields here, in addition - // to "Connection". - if _, ok := rws.snapHeader["Connection"]; ok { - v := rws.snapHeader.Get("Connection") - delete(rws.snapHeader, "Connection") - if v == "close" { - rws.conn.startGracefulShutdown() - } - } - endStream := (rws.handlerDone && !rws.hasTrailers() && len(p) == 0) || isHeadResp err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{ streamID: rws.stream.id, @@ -2431,7 +2394,7 @@ const TrailerPrefix = "Trailer:" // after the header has already been flushed. Because the Go // ResponseWriter interface has no way to set Trailers (only the // Header), and because we didn't want to expand the ResponseWriter -// interface, and because nobody used trailers, and because RFC 7230 +// interface, and because nobody used trailers, and because RFC 2616 // says you SHOULD (but not must) predeclare any trailers in the // header, the official ResponseWriter rules said trailers in Go must // be predeclared, and then we reuse the same ResponseWriter.Header() @@ -2515,24 +2478,6 @@ func (w *responseWriter) Header() http.Header { return rws.handlerHeader } -// checkWriteHeaderCode is a copy of net/http's checkWriteHeaderCode. -func checkWriteHeaderCode(code int) { - // Issue 22880: require valid WriteHeader status codes. - // For now we only enforce that it's three digits. - // In the future we might block things over 599 (600 and above aren't defined - // at http://httpwg.org/specs/rfc7231.html#status.codes) - // and we might block under 200 (once we have more mature 1xx support). - // But for now any three digits. - // - // We used to send "HTTP/1.1 000 0" on the wire in responses but there's - // no equivalent bogus thing we can realistically send in HTTP/2, - // so we'll consistently panic instead and help people find their bugs - // early. (We can't return an error from WriteHeader even if we wanted to.) - if code < 100 || code > 999 { - panic(fmt.Sprintf("invalid WriteHeader code %v", code)) - } -} - func (w *responseWriter) WriteHeader(code int) { rws := w.rws if rws == nil { @@ -2543,7 +2488,6 @@ func (w *responseWriter) WriteHeader(code int) { func (rws *responseWriterState) writeHeader(code int) { if !rws.wroteHeader { - checkWriteHeaderCode(code) rws.wroteHeader = true rws.status = code if len(rws.handlerHeader) > 0 { @@ -2815,7 +2759,7 @@ func (sc *serverConn) startPush(msg *startPushRequest) { } // foreachHeaderElement splits v according to the "#rule" construction -// in RFC 7230 section 7 and calls fn for each non-empty element. +// in RFC 2616 section 2.1 and calls fn for each non-empty element. func foreachHeaderElement(v string, fn func(string)) { v = textproto.TrimString(v) if v == "" { @@ -2863,6 +2807,41 @@ func new400Handler(err error) http.HandlerFunc { } } +// ValidTrailerHeader reports whether name is a valid header field name to appear +// in trailers. +// See: http://tools.ietf.org/html/rfc7230#section-4.1.2 +func ValidTrailerHeader(name string) bool { + name = http.CanonicalHeaderKey(name) + if strings.HasPrefix(name, "If-") || badTrailer[name] { + return false + } + return true +} + +var badTrailer = map[string]bool{ + "Authorization": true, + "Cache-Control": true, + "Connection": true, + "Content-Encoding": true, + "Content-Length": true, + "Content-Range": true, + "Content-Type": true, + "Expect": true, + "Host": true, + "Keep-Alive": true, + "Max-Forwards": true, + "Pragma": true, + "Proxy-Authenticate": true, + "Proxy-Authorization": true, + "Proxy-Connection": true, + "Range": true, + "Realm": true, + "Te": true, + "Trailer": true, + "Transfer-Encoding": true, + "Www-Authenticate": true, +} + // h1ServerKeepAlivesDisabled reports whether hs has its keep-alives // disabled. See comments on h1ServerShutdownChan above for why // the code is written this way. diff --git a/deps/golang.org/x/net/http2/server_push_test.go b/deps/golang.org/x/net/http2/server_push_test.go deleted file mode 100644 index 918fd30dc..000000000 --- a/deps/golang.org/x/net/http2/server_push_test.go +++ /dev/null @@ -1,521 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.8 - -package http2 - -import ( - "errors" - "fmt" - "io" - "io/ioutil" - "net/http" - "reflect" - "strconv" - "sync" - "testing" - "time" -) - -func TestServer_Push_Success(t *testing.T) { - const ( - mainBody = "index page" - pushedBody = "pushed page" - userAgent = "testagent" - cookie = "testcookie" - ) - - var stURL string - checkPromisedReq := func(r *http.Request, wantMethod string, wantH http.Header) error { - if got, want := r.Method, wantMethod; got != want { - return fmt.Errorf("promised Req.Method=%q, want %q", got, want) - } - if got, want := r.Header, wantH; !reflect.DeepEqual(got, want) { - return fmt.Errorf("promised Req.Header=%q, want %q", got, want) - } - if got, want := "https://"+r.Host, stURL; got != want { - return fmt.Errorf("promised Req.Host=%q, want %q", got, want) - } - if r.Body == nil { - return fmt.Errorf("nil Body") - } - if buf, err := ioutil.ReadAll(r.Body); err != nil || len(buf) != 0 { - return fmt.Errorf("ReadAll(Body)=%q,%v, want '',nil", buf, err) - } - return nil - } - - errc := make(chan error, 3) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - switch r.URL.RequestURI() { - case "/": - // Push "/pushed?get" as a GET request, using an absolute URL. - opt := &http.PushOptions{ - Header: http.Header{ - "User-Agent": {userAgent}, - }, - } - if err := w.(http.Pusher).Push(stURL+"/pushed?get", opt); err != nil { - errc <- fmt.Errorf("error pushing /pushed?get: %v", err) - return - } - // Push "/pushed?head" as a HEAD request, using a path. - opt = &http.PushOptions{ - Method: "HEAD", - Header: http.Header{ - "User-Agent": {userAgent}, - "Cookie": {cookie}, - }, - } - if err := w.(http.Pusher).Push("/pushed?head", opt); err != nil { - errc <- fmt.Errorf("error pushing /pushed?head: %v", err) - return - } - w.Header().Set("Content-Type", "text/html") - w.Header().Set("Content-Length", strconv.Itoa(len(mainBody))) - w.WriteHeader(200) - io.WriteString(w, mainBody) - errc <- nil - - case "/pushed?get": - wantH := http.Header{} - wantH.Set("User-Agent", userAgent) - if err := checkPromisedReq(r, "GET", wantH); err != nil { - errc <- fmt.Errorf("/pushed?get: %v", err) - return - } - w.Header().Set("Content-Type", "text/html") - w.Header().Set("Content-Length", strconv.Itoa(len(pushedBody))) - w.WriteHeader(200) - io.WriteString(w, pushedBody) - errc <- nil - - case "/pushed?head": - wantH := http.Header{} - wantH.Set("User-Agent", userAgent) - wantH.Set("Cookie", cookie) - if err := checkPromisedReq(r, "HEAD", wantH); err != nil { - errc <- fmt.Errorf("/pushed?head: %v", err) - return - } - w.WriteHeader(204) - errc <- nil - - default: - errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI()) - } - }) - stURL = st.ts.URL - - // Send one request, which should push two responses. - st.greet() - getSlash(st) - for k := 0; k < 3; k++ { - select { - case <-time.After(2 * time.Second): - t.Errorf("timeout waiting for handler %d to finish", k) - case err := <-errc: - if err != nil { - t.Fatal(err) - } - } - } - - checkPushPromise := func(f Frame, promiseID uint32, wantH [][2]string) error { - pp, ok := f.(*PushPromiseFrame) - if !ok { - return fmt.Errorf("got a %T; want *PushPromiseFrame", f) - } - if !pp.HeadersEnded() { - return fmt.Errorf("want END_HEADERS flag in PushPromiseFrame") - } - if got, want := pp.PromiseID, promiseID; got != want { - return fmt.Errorf("got PromiseID %v; want %v", got, want) - } - gotH := st.decodeHeader(pp.HeaderBlockFragment()) - if !reflect.DeepEqual(gotH, wantH) { - return fmt.Errorf("got promised headers %v; want %v", gotH, wantH) - } - return nil - } - checkHeaders := func(f Frame, wantH [][2]string) error { - hf, ok := f.(*HeadersFrame) - if !ok { - return fmt.Errorf("got a %T; want *HeadersFrame", f) - } - gotH := st.decodeHeader(hf.HeaderBlockFragment()) - if !reflect.DeepEqual(gotH, wantH) { - return fmt.Errorf("got response headers %v; want %v", gotH, wantH) - } - return nil - } - checkData := func(f Frame, wantData string) error { - df, ok := f.(*DataFrame) - if !ok { - return fmt.Errorf("got a %T; want *DataFrame", f) - } - if gotData := string(df.Data()); gotData != wantData { - return fmt.Errorf("got response data %q; want %q", gotData, wantData) - } - return nil - } - - // Stream 1 has 2 PUSH_PROMISE + HEADERS + DATA - // Stream 2 has HEADERS + DATA - // Stream 4 has HEADERS - expected := map[uint32][]func(Frame) error{ - 1: { - func(f Frame) error { - return checkPushPromise(f, 2, [][2]string{ - {":method", "GET"}, - {":scheme", "https"}, - {":authority", st.ts.Listener.Addr().String()}, - {":path", "/pushed?get"}, - {"user-agent", userAgent}, - }) - }, - func(f Frame) error { - return checkPushPromise(f, 4, [][2]string{ - {":method", "HEAD"}, - {":scheme", "https"}, - {":authority", st.ts.Listener.Addr().String()}, - {":path", "/pushed?head"}, - {"cookie", cookie}, - {"user-agent", userAgent}, - }) - }, - func(f Frame) error { - return checkHeaders(f, [][2]string{ - {":status", "200"}, - {"content-type", "text/html"}, - {"content-length", strconv.Itoa(len(mainBody))}, - }) - }, - func(f Frame) error { - return checkData(f, mainBody) - }, - }, - 2: { - func(f Frame) error { - return checkHeaders(f, [][2]string{ - {":status", "200"}, - {"content-type", "text/html"}, - {"content-length", strconv.Itoa(len(pushedBody))}, - }) - }, - func(f Frame) error { - return checkData(f, pushedBody) - }, - }, - 4: { - func(f Frame) error { - return checkHeaders(f, [][2]string{ - {":status", "204"}, - }) - }, - }, - } - - consumed := map[uint32]int{} - for k := 0; len(expected) > 0; k++ { - f, err := st.readFrame() - if err != nil { - for id, left := range expected { - t.Errorf("stream %d: missing %d frames", id, len(left)) - } - t.Fatalf("readFrame %d: %v", k, err) - } - id := f.Header().StreamID - label := fmt.Sprintf("stream %d, frame %d", id, consumed[id]) - if len(expected[id]) == 0 { - t.Fatalf("%s: unexpected frame %#+v", label, f) - } - check := expected[id][0] - expected[id] = expected[id][1:] - if len(expected[id]) == 0 { - delete(expected, id) - } - if err := check(f); err != nil { - t.Fatalf("%s: %v", label, err) - } - consumed[id]++ - } -} - -func TestServer_Push_SuccessNoRace(t *testing.T) { - // Regression test for issue #18326. Ensure the request handler can mutate - // pushed request headers without racing with the PUSH_PROMISE write. - errc := make(chan error, 2) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - switch r.URL.RequestURI() { - case "/": - opt := &http.PushOptions{ - Header: http.Header{"User-Agent": {"testagent"}}, - } - if err := w.(http.Pusher).Push("/pushed", opt); err != nil { - errc <- fmt.Errorf("error pushing: %v", err) - return - } - w.WriteHeader(200) - errc <- nil - - case "/pushed": - // Update request header, ensure there is no race. - r.Header.Set("User-Agent", "newagent") - r.Header.Set("Cookie", "cookie") - w.WriteHeader(200) - errc <- nil - - default: - errc <- fmt.Errorf("unknown RequestURL %q", r.URL.RequestURI()) - } - }) - - // Send one request, which should push one response. - st.greet() - getSlash(st) - for k := 0; k < 2; k++ { - select { - case <-time.After(2 * time.Second): - t.Errorf("timeout waiting for handler %d to finish", k) - case err := <-errc: - if err != nil { - t.Fatal(err) - } - } - } -} - -func TestServer_Push_RejectRecursivePush(t *testing.T) { - // Expect two requests, but might get three if there's a bug and the second push succeeds. - errc := make(chan error, 3) - handler := func(w http.ResponseWriter, r *http.Request) error { - baseURL := "https://" + r.Host - switch r.URL.Path { - case "/": - if err := w.(http.Pusher).Push(baseURL+"/push1", nil); err != nil { - return fmt.Errorf("first Push()=%v, want nil", err) - } - return nil - - case "/push1": - if got, want := w.(http.Pusher).Push(baseURL+"/push2", nil), ErrRecursivePush; got != want { - return fmt.Errorf("Push()=%v, want %v", got, want) - } - return nil - - default: - return fmt.Errorf("unexpected path: %q", r.URL.Path) - } - } - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - errc <- handler(w, r) - }) - defer st.Close() - st.greet() - getSlash(st) - if err := <-errc; err != nil { - t.Errorf("First request failed: %v", err) - } - if err := <-errc; err != nil { - t.Errorf("Second request failed: %v", err) - } -} - -func testServer_Push_RejectSingleRequest(t *testing.T, doPush func(http.Pusher, *http.Request) error, settings ...Setting) { - // Expect one request, but might get two if there's a bug and the push succeeds. - errc := make(chan error, 2) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - errc <- doPush(w.(http.Pusher), r) - }) - defer st.Close() - st.greet() - if err := st.fr.WriteSettings(settings...); err != nil { - st.t.Fatalf("WriteSettings: %v", err) - } - st.wantSettingsAck() - getSlash(st) - if err := <-errc; err != nil { - t.Error(err) - } - // Should not get a PUSH_PROMISE frame. - hf := st.wantHeaders() - if !hf.StreamEnded() { - t.Error("stream should end after headers") - } -} - -func TestServer_Push_RejectIfDisabled(t *testing.T) { - testServer_Push_RejectSingleRequest(t, - func(p http.Pusher, r *http.Request) error { - if got, want := p.Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want { - return fmt.Errorf("Push()=%v, want %v", got, want) - } - return nil - }, - Setting{SettingEnablePush, 0}) -} - -func TestServer_Push_RejectWhenNoConcurrentStreams(t *testing.T) { - testServer_Push_RejectSingleRequest(t, - func(p http.Pusher, r *http.Request) error { - if got, want := p.Push("https://"+r.Host+"/pushed", nil), ErrPushLimitReached; got != want { - return fmt.Errorf("Push()=%v, want %v", got, want) - } - return nil - }, - Setting{SettingMaxConcurrentStreams, 0}) -} - -func TestServer_Push_RejectWrongScheme(t *testing.T) { - testServer_Push_RejectSingleRequest(t, - func(p http.Pusher, r *http.Request) error { - if err := p.Push("http://"+r.Host+"/pushed", nil); err == nil { - return errors.New("Push() should have failed (push target URL is http)") - } - return nil - }) -} - -func TestServer_Push_RejectMissingHost(t *testing.T) { - testServer_Push_RejectSingleRequest(t, - func(p http.Pusher, r *http.Request) error { - if err := p.Push("https:pushed", nil); err == nil { - return errors.New("Push() should have failed (push target URL missing host)") - } - return nil - }) -} - -func TestServer_Push_RejectRelativePath(t *testing.T) { - testServer_Push_RejectSingleRequest(t, - func(p http.Pusher, r *http.Request) error { - if err := p.Push("../test", nil); err == nil { - return errors.New("Push() should have failed (push target is a relative path)") - } - return nil - }) -} - -func TestServer_Push_RejectForbiddenMethod(t *testing.T) { - testServer_Push_RejectSingleRequest(t, - func(p http.Pusher, r *http.Request) error { - if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Method: "POST"}); err == nil { - return errors.New("Push() should have failed (cannot promise a POST)") - } - return nil - }) -} - -func TestServer_Push_RejectForbiddenHeader(t *testing.T) { - testServer_Push_RejectSingleRequest(t, - func(p http.Pusher, r *http.Request) error { - header := http.Header{ - "Content-Length": {"10"}, - "Content-Encoding": {"gzip"}, - "Trailer": {"Foo"}, - "Te": {"trailers"}, - "Host": {"test.com"}, - ":authority": {"test.com"}, - } - if err := p.Push("https://"+r.Host+"/pushed", &http.PushOptions{Header: header}); err == nil { - return errors.New("Push() should have failed (forbidden headers)") - } - return nil - }) -} - -func TestServer_Push_StateTransitions(t *testing.T) { - const body = "foo" - - gotPromise := make(chan bool) - finishedPush := make(chan bool) - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - switch r.URL.RequestURI() { - case "/": - if err := w.(http.Pusher).Push("/pushed", nil); err != nil { - t.Errorf("Push error: %v", err) - } - // Don't finish this request until the push finishes so we don't - // nondeterministically interleave output frames with the push. - <-finishedPush - case "/pushed": - <-gotPromise - } - w.Header().Set("Content-Type", "text/html") - w.Header().Set("Content-Length", strconv.Itoa(len(body))) - w.WriteHeader(200) - io.WriteString(w, body) - }) - defer st.Close() - - st.greet() - if st.stream(2) != nil { - t.Fatal("stream 2 should be empty") - } - if got, want := st.streamState(2), stateIdle; got != want { - t.Fatalf("streamState(2)=%v, want %v", got, want) - } - getSlash(st) - // After the PUSH_PROMISE is sent, the stream should be stateHalfClosedRemote. - st.wantPushPromise() - if got, want := st.streamState(2), stateHalfClosedRemote; got != want { - t.Fatalf("streamState(2)=%v, want %v", got, want) - } - // We stall the HTTP handler for "/pushed" until the above check. If we don't - // stall the handler, then the handler might write HEADERS and DATA and finish - // the stream before we check st.streamState(2) -- should that happen, we'll - // see stateClosed and fail the above check. - close(gotPromise) - st.wantHeaders() - if df := st.wantData(); !df.StreamEnded() { - t.Fatal("expected END_STREAM flag on DATA") - } - if got, want := st.streamState(2), stateClosed; got != want { - t.Fatalf("streamState(2)=%v, want %v", got, want) - } - close(finishedPush) -} - -func TestServer_Push_RejectAfterGoAway(t *testing.T) { - var readyOnce sync.Once - ready := make(chan struct{}) - errc := make(chan error, 2) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - select { - case <-ready: - case <-time.After(5 * time.Second): - errc <- fmt.Errorf("timeout waiting for GOAWAY to be processed") - } - if got, want := w.(http.Pusher).Push("https://"+r.Host+"/pushed", nil), http.ErrNotSupported; got != want { - errc <- fmt.Errorf("Push()=%v, want %v", got, want) - } - errc <- nil - }) - defer st.Close() - st.greet() - getSlash(st) - - // Send GOAWAY and wait for it to be processed. - st.fr.WriteGoAway(1, ErrCodeNo, nil) - go func() { - for { - select { - case <-ready: - return - default: - } - st.sc.serveMsgCh <- func(loopNum int) { - if !st.sc.pushEnabled { - readyOnce.Do(func() { close(ready) }) - } - } - } - }() - if err := <-errc; err != nil { - t.Error(err) - } -} diff --git a/deps/golang.org/x/net/http2/server_test.go b/deps/golang.org/x/net/http2/server_test.go deleted file mode 100644 index 02eb0dcce..000000000 --- a/deps/golang.org/x/net/http2/server_test.go +++ /dev/null @@ -1,3843 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import ( - "bytes" - "crypto/tls" - "errors" - "flag" - "fmt" - "io" - "io/ioutil" - "log" - "net" - "net/http" - "net/http/httptest" - "os" - "os/exec" - "reflect" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" - "testing" - "time" - - "golang.org/x/net/http2/hpack" -) - -var stderrVerbose = flag.Bool("stderr_verbose", false, "Mirror verbosity to stderr, unbuffered") - -func stderrv() io.Writer { - if *stderrVerbose { - return os.Stderr - } - - return ioutil.Discard -} - -type serverTester struct { - cc net.Conn // client conn - t testing.TB - ts *httptest.Server - fr *Framer - serverLogBuf bytes.Buffer // logger for httptest.Server - logFilter []string // substrings to filter out - scMu sync.Mutex // guards sc - sc *serverConn - hpackDec *hpack.Decoder - decodedHeaders [][2]string - - // If http2debug!=2, then we capture Frame debug logs that will be written - // to t.Log after a test fails. The read and write logs use separate locks - // and buffers so we don't accidentally introduce synchronization between - // the read and write goroutines, which may hide data races. - frameReadLogMu sync.Mutex - frameReadLogBuf bytes.Buffer - frameWriteLogMu sync.Mutex - frameWriteLogBuf bytes.Buffer - - // writing headers: - headerBuf bytes.Buffer - hpackEnc *hpack.Encoder -} - -func init() { - testHookOnPanicMu = new(sync.Mutex) - goAwayTimeout = 25 * time.Millisecond -} - -func resetHooks() { - testHookOnPanicMu.Lock() - testHookOnPanic = nil - testHookOnPanicMu.Unlock() -} - -type serverTesterOpt string - -var optOnlyServer = serverTesterOpt("only_server") -var optQuiet = serverTesterOpt("quiet_logging") -var optFramerReuseFrames = serverTesterOpt("frame_reuse_frames") - -func newServerTester(t testing.TB, handler http.HandlerFunc, opts ...interface{}) *serverTester { - resetHooks() - - ts := httptest.NewUnstartedServer(handler) - - tlsConfig := &tls.Config{ - InsecureSkipVerify: true, - NextProtos: []string{NextProtoTLS}, - } - - var onlyServer, quiet, framerReuseFrames bool - h2server := new(Server) - for _, opt := range opts { - switch v := opt.(type) { - case func(*tls.Config): - v(tlsConfig) - case func(*httptest.Server): - v(ts) - case func(*Server): - v(h2server) - case serverTesterOpt: - switch v { - case optOnlyServer: - onlyServer = true - case optQuiet: - quiet = true - case optFramerReuseFrames: - framerReuseFrames = true - } - case func(net.Conn, http.ConnState): - ts.Config.ConnState = v - default: - t.Fatalf("unknown newServerTester option type %T", v) - } - } - - ConfigureServer(ts.Config, h2server) - - st := &serverTester{ - t: t, - ts: ts, - } - st.hpackEnc = hpack.NewEncoder(&st.headerBuf) - st.hpackDec = hpack.NewDecoder(initialHeaderTableSize, st.onHeaderField) - - ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config - if quiet { - ts.Config.ErrorLog = log.New(ioutil.Discard, "", 0) - } else { - ts.Config.ErrorLog = log.New(io.MultiWriter(stderrv(), twriter{t: t, st: st}, &st.serverLogBuf), "", log.LstdFlags) - } - ts.StartTLS() - - if VerboseLogs { - t.Logf("Running test server at: %s", ts.URL) - } - testHookGetServerConn = func(v *serverConn) { - st.scMu.Lock() - defer st.scMu.Unlock() - st.sc = v - } - log.SetOutput(io.MultiWriter(stderrv(), twriter{t: t, st: st})) - if !onlyServer { - cc, err := tls.Dial("tcp", ts.Listener.Addr().String(), tlsConfig) - if err != nil { - t.Fatal(err) - } - st.cc = cc - st.fr = NewFramer(cc, cc) - if framerReuseFrames { - st.fr.SetReuseFrames() - } - if !logFrameReads && !logFrameWrites { - st.fr.debugReadLoggerf = func(m string, v ...interface{}) { - m = time.Now().Format("2006-01-02 15:04:05.999999999 ") + strings.TrimPrefix(m, "http2: ") + "\n" - st.frameReadLogMu.Lock() - fmt.Fprintf(&st.frameReadLogBuf, m, v...) - st.frameReadLogMu.Unlock() - } - st.fr.debugWriteLoggerf = func(m string, v ...interface{}) { - m = time.Now().Format("2006-01-02 15:04:05.999999999 ") + strings.TrimPrefix(m, "http2: ") + "\n" - st.frameWriteLogMu.Lock() - fmt.Fprintf(&st.frameWriteLogBuf, m, v...) - st.frameWriteLogMu.Unlock() - } - st.fr.logReads = true - st.fr.logWrites = true - } - } - return st -} - -func (st *serverTester) closeConn() { - st.scMu.Lock() - defer st.scMu.Unlock() - st.sc.conn.Close() -} - -func (st *serverTester) addLogFilter(phrase string) { - st.logFilter = append(st.logFilter, phrase) -} - -func (st *serverTester) stream(id uint32) *stream { - ch := make(chan *stream, 1) - st.sc.serveMsgCh <- func(int) { - ch <- st.sc.streams[id] - } - return <-ch -} - -func (st *serverTester) streamState(id uint32) streamState { - ch := make(chan streamState, 1) - st.sc.serveMsgCh <- func(int) { - state, _ := st.sc.state(id) - ch <- state - } - return <-ch -} - -// loopNum reports how many times this conn's select loop has gone around. -func (st *serverTester) loopNum() int { - lastc := make(chan int, 1) - st.sc.serveMsgCh <- func(loopNum int) { - lastc <- loopNum - } - return <-lastc -} - -// awaitIdle heuristically awaits for the server conn's select loop to be idle. -// The heuristic is that the server connection's serve loop must schedule -// 50 times in a row without any channel sends or receives occurring. -func (st *serverTester) awaitIdle() { - remain := 50 - last := st.loopNum() - for remain > 0 { - n := st.loopNum() - if n == last+1 { - remain-- - } else { - remain = 50 - } - last = n - } -} - -func (st *serverTester) Close() { - if st.t.Failed() { - st.frameReadLogMu.Lock() - if st.frameReadLogBuf.Len() > 0 { - st.t.Logf("Framer read log:\n%s", st.frameReadLogBuf.String()) - } - st.frameReadLogMu.Unlock() - - st.frameWriteLogMu.Lock() - if st.frameWriteLogBuf.Len() > 0 { - st.t.Logf("Framer write log:\n%s", st.frameWriteLogBuf.String()) - } - st.frameWriteLogMu.Unlock() - - // If we failed already (and are likely in a Fatal, - // unwindowing), force close the connection, so the - // httptest.Server doesn't wait forever for the conn - // to close. - if st.cc != nil { - st.cc.Close() - } - } - st.ts.Close() - if st.cc != nil { - st.cc.Close() - } - log.SetOutput(os.Stderr) -} - -// greet initiates the client's HTTP/2 connection into a state where -// frames may be sent. -func (st *serverTester) greet() { - st.greetAndCheckSettings(func(Setting) error { return nil }) -} - -func (st *serverTester) greetAndCheckSettings(checkSetting func(s Setting) error) { - st.writePreface() - st.writeInitialSettings() - st.wantSettings().ForeachSetting(checkSetting) - st.writeSettingsAck() - - // The initial WINDOW_UPDATE and SETTINGS ACK can come in any order. - var gotSettingsAck bool - var gotWindowUpdate bool - - for i := 0; i < 2; i++ { - f, err := st.readFrame() - if err != nil { - st.t.Fatal(err) - } - switch f := f.(type) { - case *SettingsFrame: - if !f.Header().Flags.Has(FlagSettingsAck) { - st.t.Fatal("Settings Frame didn't have ACK set") - } - gotSettingsAck = true - - case *WindowUpdateFrame: - if f.FrameHeader.StreamID != 0 { - st.t.Fatalf("WindowUpdate StreamID = %d; want 0", f.FrameHeader.StreamID) - } - incr := uint32((&Server{}).initialConnRecvWindowSize() - initialWindowSize) - if f.Increment != incr { - st.t.Fatalf("WindowUpdate increment = %d; want %d", f.Increment, incr) - } - gotWindowUpdate = true - - default: - st.t.Fatalf("Wanting a settings ACK or window update, received a %T", f) - } - } - - if !gotSettingsAck { - st.t.Fatalf("Didn't get a settings ACK") - } - if !gotWindowUpdate { - st.t.Fatalf("Didn't get a window update") - } -} - -func (st *serverTester) writePreface() { - n, err := st.cc.Write(clientPreface) - if err != nil { - st.t.Fatalf("Error writing client preface: %v", err) - } - if n != len(clientPreface) { - st.t.Fatalf("Writing client preface, wrote %d bytes; want %d", n, len(clientPreface)) - } -} - -func (st *serverTester) writeInitialSettings() { - if err := st.fr.WriteSettings(); err != nil { - st.t.Fatalf("Error writing initial SETTINGS frame from client to server: %v", err) - } -} - -func (st *serverTester) writeSettingsAck() { - if err := st.fr.WriteSettingsAck(); err != nil { - st.t.Fatalf("Error writing ACK of server's SETTINGS: %v", err) - } -} - -func (st *serverTester) writeHeaders(p HeadersFrameParam) { - if err := st.fr.WriteHeaders(p); err != nil { - st.t.Fatalf("Error writing HEADERS: %v", err) - } -} - -func (st *serverTester) writePriority(id uint32, p PriorityParam) { - if err := st.fr.WritePriority(id, p); err != nil { - st.t.Fatalf("Error writing PRIORITY: %v", err) - } -} - -func (st *serverTester) encodeHeaderField(k, v string) { - err := st.hpackEnc.WriteField(hpack.HeaderField{Name: k, Value: v}) - if err != nil { - st.t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) - } -} - -// encodeHeaderRaw is the magic-free version of encodeHeader. -// It takes 0 or more (k, v) pairs and encodes them. -func (st *serverTester) encodeHeaderRaw(headers ...string) []byte { - if len(headers)%2 == 1 { - panic("odd number of kv args") - } - st.headerBuf.Reset() - for len(headers) > 0 { - k, v := headers[0], headers[1] - st.encodeHeaderField(k, v) - headers = headers[2:] - } - return st.headerBuf.Bytes() -} - -// encodeHeader encodes headers and returns their HPACK bytes. headers -// must contain an even number of key/value pairs. There may be -// multiple pairs for keys (e.g. "cookie"). The :method, :path, and -// :scheme headers default to GET, / and https. The :authority header -// defaults to st.ts.Listener.Addr(). -func (st *serverTester) encodeHeader(headers ...string) []byte { - if len(headers)%2 == 1 { - panic("odd number of kv args") - } - - st.headerBuf.Reset() - defaultAuthority := st.ts.Listener.Addr().String() - - if len(headers) == 0 { - // Fast path, mostly for benchmarks, so test code doesn't pollute - // profiles when we're looking to improve server allocations. - st.encodeHeaderField(":method", "GET") - st.encodeHeaderField(":scheme", "https") - st.encodeHeaderField(":authority", defaultAuthority) - st.encodeHeaderField(":path", "/") - return st.headerBuf.Bytes() - } - - if len(headers) == 2 && headers[0] == ":method" { - // Another fast path for benchmarks. - st.encodeHeaderField(":method", headers[1]) - st.encodeHeaderField(":scheme", "https") - st.encodeHeaderField(":authority", defaultAuthority) - st.encodeHeaderField(":path", "/") - return st.headerBuf.Bytes() - } - - pseudoCount := map[string]int{} - keys := []string{":method", ":scheme", ":authority", ":path"} - vals := map[string][]string{ - ":method": {"GET"}, - ":scheme": {"https"}, - ":authority": {defaultAuthority}, - ":path": {"/"}, - } - for len(headers) > 0 { - k, v := headers[0], headers[1] - headers = headers[2:] - if _, ok := vals[k]; !ok { - keys = append(keys, k) - } - if strings.HasPrefix(k, ":") { - pseudoCount[k]++ - if pseudoCount[k] == 1 { - vals[k] = []string{v} - } else { - // Allows testing of invalid headers w/ dup pseudo fields. - vals[k] = append(vals[k], v) - } - } else { - vals[k] = append(vals[k], v) - } - } - for _, k := range keys { - for _, v := range vals[k] { - st.encodeHeaderField(k, v) - } - } - return st.headerBuf.Bytes() -} - -// bodylessReq1 writes a HEADERS frames with StreamID 1 and EndStream and EndHeaders set. -func (st *serverTester) bodylessReq1(headers ...string) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(headers...), - EndStream: true, - EndHeaders: true, - }) -} - -func (st *serverTester) writeData(streamID uint32, endStream bool, data []byte) { - if err := st.fr.WriteData(streamID, endStream, data); err != nil { - st.t.Fatalf("Error writing DATA: %v", err) - } -} - -func (st *serverTester) writeDataPadded(streamID uint32, endStream bool, data, pad []byte) { - if err := st.fr.WriteDataPadded(streamID, endStream, data, pad); err != nil { - st.t.Fatalf("Error writing DATA: %v", err) - } -} - -func readFrameTimeout(fr *Framer, wait time.Duration) (Frame, error) { - ch := make(chan interface{}, 1) - go func() { - fr, err := fr.ReadFrame() - if err != nil { - ch <- err - } else { - ch <- fr - } - }() - t := time.NewTimer(wait) - select { - case v := <-ch: - t.Stop() - if fr, ok := v.(Frame); ok { - return fr, nil - } - return nil, v.(error) - case <-t.C: - return nil, errors.New("timeout waiting for frame") - } -} - -func (st *serverTester) readFrame() (Frame, error) { - return readFrameTimeout(st.fr, 2*time.Second) -} - -func (st *serverTester) wantHeaders() *HeadersFrame { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting a HEADERS frame: %v", err) - } - hf, ok := f.(*HeadersFrame) - if !ok { - st.t.Fatalf("got a %T; want *HeadersFrame", f) - } - return hf -} - -func (st *serverTester) wantContinuation() *ContinuationFrame { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting a CONTINUATION frame: %v", err) - } - cf, ok := f.(*ContinuationFrame) - if !ok { - st.t.Fatalf("got a %T; want *ContinuationFrame", f) - } - return cf -} - -func (st *serverTester) wantData() *DataFrame { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting a DATA frame: %v", err) - } - df, ok := f.(*DataFrame) - if !ok { - st.t.Fatalf("got a %T; want *DataFrame", f) - } - return df -} - -func (st *serverTester) wantSettings() *SettingsFrame { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting a SETTINGS frame: %v", err) - } - sf, ok := f.(*SettingsFrame) - if !ok { - st.t.Fatalf("got a %T; want *SettingsFrame", f) - } - return sf -} - -func (st *serverTester) wantPing() *PingFrame { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting a PING frame: %v", err) - } - pf, ok := f.(*PingFrame) - if !ok { - st.t.Fatalf("got a %T; want *PingFrame", f) - } - return pf -} - -func (st *serverTester) wantGoAway() *GoAwayFrame { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting a GOAWAY frame: %v", err) - } - gf, ok := f.(*GoAwayFrame) - if !ok { - st.t.Fatalf("got a %T; want *GoAwayFrame", f) - } - return gf -} - -func (st *serverTester) wantRSTStream(streamID uint32, errCode ErrCode) { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting an RSTStream frame: %v", err) - } - rs, ok := f.(*RSTStreamFrame) - if !ok { - st.t.Fatalf("got a %T; want *RSTStreamFrame", f) - } - if rs.FrameHeader.StreamID != streamID { - st.t.Fatalf("RSTStream StreamID = %d; want %d", rs.FrameHeader.StreamID, streamID) - } - if rs.ErrCode != errCode { - st.t.Fatalf("RSTStream ErrCode = %d (%s); want %d (%s)", rs.ErrCode, rs.ErrCode, errCode, errCode) - } -} - -func (st *serverTester) wantWindowUpdate(streamID, incr uint32) { - f, err := st.readFrame() - if err != nil { - st.t.Fatalf("Error while expecting a WINDOW_UPDATE frame: %v", err) - } - wu, ok := f.(*WindowUpdateFrame) - if !ok { - st.t.Fatalf("got a %T; want *WindowUpdateFrame", f) - } - if wu.FrameHeader.StreamID != streamID { - st.t.Fatalf("WindowUpdate StreamID = %d; want %d", wu.FrameHeader.StreamID, streamID) - } - if wu.Increment != incr { - st.t.Fatalf("WindowUpdate increment = %d; want %d", wu.Increment, incr) - } -} - -func (st *serverTester) wantSettingsAck() { - f, err := st.readFrame() - if err != nil { - st.t.Fatal(err) - } - sf, ok := f.(*SettingsFrame) - if !ok { - st.t.Fatalf("Wanting a settings ACK, received a %T", f) - } - if !sf.Header().Flags.Has(FlagSettingsAck) { - st.t.Fatal("Settings Frame didn't have ACK set") - } -} - -func (st *serverTester) wantPushPromise() *PushPromiseFrame { - f, err := st.readFrame() - if err != nil { - st.t.Fatal(err) - } - ppf, ok := f.(*PushPromiseFrame) - if !ok { - st.t.Fatalf("Wanted PushPromise, received %T", ppf) - } - return ppf -} - -func TestServer(t *testing.T) { - gotReq := make(chan bool, 1) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Foo", "Bar") - gotReq <- true - }) - defer st.Close() - - covers("3.5", ` - The server connection preface consists of a potentially empty - SETTINGS frame ([SETTINGS]) that MUST be the first frame the - server sends in the HTTP/2 connection. - `) - - st.greet() - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(), - EndStream: true, // no DATA frames - EndHeaders: true, - }) - - select { - case <-gotReq: - case <-time.After(2 * time.Second): - t.Error("timeout waiting for request") - } -} - -func TestServer_Request_Get(t *testing.T) { - testServerRequest(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader("foo-bar", "some-value"), - EndStream: true, // no DATA frames - EndHeaders: true, - }) - }, func(r *http.Request) { - if r.Method != "GET" { - t.Errorf("Method = %q; want GET", r.Method) - } - if r.URL.Path != "/" { - t.Errorf("URL.Path = %q; want /", r.URL.Path) - } - if r.ContentLength != 0 { - t.Errorf("ContentLength = %v; want 0", r.ContentLength) - } - if r.Close { - t.Error("Close = true; want false") - } - if !strings.Contains(r.RemoteAddr, ":") { - t.Errorf("RemoteAddr = %q; want something with a colon", r.RemoteAddr) - } - if r.Proto != "HTTP/2.0" || r.ProtoMajor != 2 || r.ProtoMinor != 0 { - t.Errorf("Proto = %q Major=%v,Minor=%v; want HTTP/2.0", r.Proto, r.ProtoMajor, r.ProtoMinor) - } - wantHeader := http.Header{ - "Foo-Bar": []string{"some-value"}, - } - if !reflect.DeepEqual(r.Header, wantHeader) { - t.Errorf("Header = %#v; want %#v", r.Header, wantHeader) - } - if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 { - t.Errorf("Read = %d, %v; want 0, EOF", n, err) - } - }) -} - -func TestServer_Request_Get_PathSlashes(t *testing.T) { - testServerRequest(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":path", "/%2f/"), - EndStream: true, // no DATA frames - EndHeaders: true, - }) - }, func(r *http.Request) { - if r.RequestURI != "/%2f/" { - t.Errorf("RequestURI = %q; want /%%2f/", r.RequestURI) - } - if r.URL.Path != "///" { - t.Errorf("URL.Path = %q; want ///", r.URL.Path) - } - }) -} - -// TODO: add a test with EndStream=true on the HEADERS but setting a -// Content-Length anyway. Should we just omit it and force it to -// zero? - -func TestServer_Request_Post_NoContentLength_EndStream(t *testing.T) { - testServerRequest(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: true, - EndHeaders: true, - }) - }, func(r *http.Request) { - if r.Method != "POST" { - t.Errorf("Method = %q; want POST", r.Method) - } - if r.ContentLength != 0 { - t.Errorf("ContentLength = %v; want 0", r.ContentLength) - } - if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 { - t.Errorf("Read = %d, %v; want 0, EOF", n, err) - } - }) -} - -func TestServer_Request_Post_Body_ImmediateEOF(t *testing.T) { - testBodyContents(t, -1, "", func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, // to say DATA frames are coming - EndHeaders: true, - }) - st.writeData(1, true, nil) // just kidding. empty body. - }) -} - -func TestServer_Request_Post_Body_OneData(t *testing.T) { - const content = "Some content" - testBodyContents(t, -1, content, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, // to say DATA frames are coming - EndHeaders: true, - }) - st.writeData(1, true, []byte(content)) - }) -} - -func TestServer_Request_Post_Body_TwoData(t *testing.T) { - const content = "Some content" - testBodyContents(t, -1, content, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, // to say DATA frames are coming - EndHeaders: true, - }) - st.writeData(1, false, []byte(content[:5])) - st.writeData(1, true, []byte(content[5:])) - }) -} - -func TestServer_Request_Post_Body_ContentLength_Correct(t *testing.T) { - const content = "Some content" - testBodyContents(t, int64(len(content)), content, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader( - ":method", "POST", - "content-length", strconv.Itoa(len(content)), - ), - EndStream: false, // to say DATA frames are coming - EndHeaders: true, - }) - st.writeData(1, true, []byte(content)) - }) -} - -func TestServer_Request_Post_Body_ContentLength_TooLarge(t *testing.T) { - testBodyContentsFail(t, 3, "request declared a Content-Length of 3 but only wrote 2 bytes", - func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader( - ":method", "POST", - "content-length", "3", - ), - EndStream: false, // to say DATA frames are coming - EndHeaders: true, - }) - st.writeData(1, true, []byte("12")) - }) -} - -func TestServer_Request_Post_Body_ContentLength_TooSmall(t *testing.T) { - testBodyContentsFail(t, 4, "sender tried to send more than declared Content-Length of 4 bytes", - func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader( - ":method", "POST", - "content-length", "4", - ), - EndStream: false, // to say DATA frames are coming - EndHeaders: true, - }) - st.writeData(1, true, []byte("12345")) - }) -} - -func testBodyContents(t *testing.T, wantContentLength int64, wantBody string, write func(st *serverTester)) { - testServerRequest(t, write, func(r *http.Request) { - if r.Method != "POST" { - t.Errorf("Method = %q; want POST", r.Method) - } - if r.ContentLength != wantContentLength { - t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength) - } - all, err := ioutil.ReadAll(r.Body) - if err != nil { - t.Fatal(err) - } - if string(all) != wantBody { - t.Errorf("Read = %q; want %q", all, wantBody) - } - if err := r.Body.Close(); err != nil { - t.Fatalf("Close: %v", err) - } - }) -} - -func testBodyContentsFail(t *testing.T, wantContentLength int64, wantReadError string, write func(st *serverTester)) { - testServerRequest(t, write, func(r *http.Request) { - if r.Method != "POST" { - t.Errorf("Method = %q; want POST", r.Method) - } - if r.ContentLength != wantContentLength { - t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength) - } - all, err := ioutil.ReadAll(r.Body) - if err == nil { - t.Fatalf("expected an error (%q) reading from the body. Successfully read %q instead.", - wantReadError, all) - } - if !strings.Contains(err.Error(), wantReadError) { - t.Fatalf("Body.Read = %v; want substring %q", err, wantReadError) - } - if err := r.Body.Close(); err != nil { - t.Fatalf("Close: %v", err) - } - }) -} - -// Using a Host header, instead of :authority -func TestServer_Request_Get_Host(t *testing.T) { - const host = "example.com" - testServerRequest(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":authority", "", "host", host), - EndStream: true, - EndHeaders: true, - }) - }, func(r *http.Request) { - if r.Host != host { - t.Errorf("Host = %q; want %q", r.Host, host) - } - }) -} - -// Using an :authority pseudo-header, instead of Host -func TestServer_Request_Get_Authority(t *testing.T) { - const host = "example.com" - testServerRequest(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":authority", host), - EndStream: true, - EndHeaders: true, - }) - }, func(r *http.Request) { - if r.Host != host { - t.Errorf("Host = %q; want %q", r.Host, host) - } - }) -} - -func TestServer_Request_WithContinuation(t *testing.T) { - wantHeader := http.Header{ - "Foo-One": []string{"value-one"}, - "Foo-Two": []string{"value-two"}, - "Foo-Three": []string{"value-three"}, - } - testServerRequest(t, func(st *serverTester) { - fullHeaders := st.encodeHeader( - "foo-one", "value-one", - "foo-two", "value-two", - "foo-three", "value-three", - ) - remain := fullHeaders - chunks := 0 - for len(remain) > 0 { - const maxChunkSize = 5 - chunk := remain - if len(chunk) > maxChunkSize { - chunk = chunk[:maxChunkSize] - } - remain = remain[len(chunk):] - - if chunks == 0 { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: chunk, - EndStream: true, // no DATA frames - EndHeaders: false, // we'll have continuation frames - }) - } else { - err := st.fr.WriteContinuation(1, len(remain) == 0, chunk) - if err != nil { - t.Fatal(err) - } - } - chunks++ - } - if chunks < 2 { - t.Fatal("too few chunks") - } - }, func(r *http.Request) { - if !reflect.DeepEqual(r.Header, wantHeader) { - t.Errorf("Header = %#v; want %#v", r.Header, wantHeader) - } - }) -} - -// Concatenated cookie headers. ("8.1.2.5 Compressing the Cookie Header Field") -func TestServer_Request_CookieConcat(t *testing.T) { - const host = "example.com" - testServerRequest(t, func(st *serverTester) { - st.bodylessReq1( - ":authority", host, - "cookie", "a=b", - "cookie", "c=d", - "cookie", "e=f", - ) - }, func(r *http.Request) { - const want = "a=b; c=d; e=f" - if got := r.Header.Get("Cookie"); got != want { - t.Errorf("Cookie = %q; want %q", got, want) - } - }) -} - -func TestServer_Request_Reject_CapitalHeader(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("UPPER", "v") }) -} - -func TestServer_Request_Reject_HeaderFieldNameColon(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("has:colon", "v") }) -} - -func TestServer_Request_Reject_HeaderFieldNameNULL(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("has\x00null", "v") }) -} - -func TestServer_Request_Reject_HeaderFieldNameEmpty(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("", "v") }) -} - -func TestServer_Request_Reject_HeaderFieldValueNewline(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\nnewline") }) -} - -func TestServer_Request_Reject_HeaderFieldValueCR(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\rcarriage") }) -} - -func TestServer_Request_Reject_HeaderFieldValueDEL(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("foo", "has\x7fdel") }) -} - -func TestServer_Request_Reject_Pseudo_Missing_method(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":method", "") }) -} - -func TestServer_Request_Reject_Pseudo_ExactlyOne(t *testing.T) { - // 8.1.2.3 Request Pseudo-Header Fields - // "All HTTP/2 requests MUST include exactly one valid value" ... - testRejectRequest(t, func(st *serverTester) { - st.addLogFilter("duplicate pseudo-header") - st.bodylessReq1(":method", "GET", ":method", "POST") - }) -} - -func TestServer_Request_Reject_Pseudo_AfterRegular(t *testing.T) { - // 8.1.2.3 Request Pseudo-Header Fields - // "All pseudo-header fields MUST appear in the header block - // before regular header fields. Any request or response that - // contains a pseudo-header field that appears in a header - // block after a regular header field MUST be treated as - // malformed (Section 8.1.2.6)." - testRejectRequest(t, func(st *serverTester) { - st.addLogFilter("pseudo-header after regular header") - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":method", Value: "GET"}) - enc.WriteField(hpack.HeaderField{Name: "regular", Value: "foobar"}) - enc.WriteField(hpack.HeaderField{Name: ":path", Value: "/"}) - enc.WriteField(hpack.HeaderField{Name: ":scheme", Value: "https"}) - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: buf.Bytes(), - EndStream: true, - EndHeaders: true, - }) - }) -} - -func TestServer_Request_Reject_Pseudo_Missing_path(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":path", "") }) -} - -func TestServer_Request_Reject_Pseudo_Missing_scheme(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "") }) -} - -func TestServer_Request_Reject_Pseudo_scheme_invalid(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "bogus") }) -} - -func TestServer_Request_Reject_Pseudo_Unknown(t *testing.T) { - testRejectRequest(t, func(st *serverTester) { - st.addLogFilter(`invalid pseudo-header ":unknown_thing"`) - st.bodylessReq1(":unknown_thing", "") - }) -} - -func testRejectRequest(t *testing.T, send func(*serverTester)) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - t.Error("server request made it to handler; should've been rejected") - }) - defer st.Close() - - st.greet() - send(st) - st.wantRSTStream(1, ErrCodeProtocol) -} - -func testRejectRequestWithProtocolError(t *testing.T, send func(*serverTester)) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - t.Error("server request made it to handler; should've been rejected") - }, optQuiet) - defer st.Close() - - st.greet() - send(st) - gf := st.wantGoAway() - if gf.ErrCode != ErrCodeProtocol { - t.Errorf("err code = %v; want %v", gf.ErrCode, ErrCodeProtocol) - } -} - -// Section 5.1, on idle connections: "Receiving any frame other than -// HEADERS or PRIORITY on a stream in this state MUST be treated as a -// connection error (Section 5.4.1) of type PROTOCOL_ERROR." -func TestRejectFrameOnIdle_WindowUpdate(t *testing.T) { - testRejectRequestWithProtocolError(t, func(st *serverTester) { - st.fr.WriteWindowUpdate(123, 456) - }) -} -func TestRejectFrameOnIdle_Data(t *testing.T) { - testRejectRequestWithProtocolError(t, func(st *serverTester) { - st.fr.WriteData(123, true, nil) - }) -} -func TestRejectFrameOnIdle_RSTStream(t *testing.T) { - testRejectRequestWithProtocolError(t, func(st *serverTester) { - st.fr.WriteRSTStream(123, ErrCodeCancel) - }) -} - -func TestServer_Request_Connect(t *testing.T) { - testServerRequest(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeaderRaw( - ":method", "CONNECT", - ":authority", "example.com:123", - ), - EndStream: true, - EndHeaders: true, - }) - }, func(r *http.Request) { - if g, w := r.Method, "CONNECT"; g != w { - t.Errorf("Method = %q; want %q", g, w) - } - if g, w := r.RequestURI, "example.com:123"; g != w { - t.Errorf("RequestURI = %q; want %q", g, w) - } - if g, w := r.URL.Host, "example.com:123"; g != w { - t.Errorf("URL.Host = %q; want %q", g, w) - } - }) -} - -func TestServer_Request_Connect_InvalidPath(t *testing.T) { - testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeaderRaw( - ":method", "CONNECT", - ":authority", "example.com:123", - ":path", "/bogus", - ), - EndStream: true, - EndHeaders: true, - }) - }) -} - -func TestServer_Request_Connect_InvalidScheme(t *testing.T) { - testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeaderRaw( - ":method", "CONNECT", - ":authority", "example.com:123", - ":scheme", "https", - ), - EndStream: true, - EndHeaders: true, - }) - }) -} - -func TestServer_Ping(t *testing.T) { - st := newServerTester(t, nil) - defer st.Close() - st.greet() - - // Server should ignore this one, since it has ACK set. - ackPingData := [8]byte{1, 2, 4, 8, 16, 32, 64, 128} - if err := st.fr.WritePing(true, ackPingData); err != nil { - t.Fatal(err) - } - - // But the server should reply to this one, since ACK is false. - pingData := [8]byte{1, 2, 3, 4, 5, 6, 7, 8} - if err := st.fr.WritePing(false, pingData); err != nil { - t.Fatal(err) - } - - pf := st.wantPing() - if !pf.Flags.Has(FlagPingAck) { - t.Error("response ping doesn't have ACK set") - } - if pf.Data != pingData { - t.Errorf("response ping has data %q; want %q", pf.Data, pingData) - } -} - -func TestServer_RejectsLargeFrames(t *testing.T) { - if runtime.GOOS == "windows" { - t.Skip("see golang.org/issue/13434") - } - - st := newServerTester(t, nil) - defer st.Close() - st.greet() - - // Write too large of a frame (too large by one byte) - // We ignore the return value because it's expected that the server - // will only read the first 9 bytes (the headre) and then disconnect. - st.fr.WriteRawFrame(0xff, 0, 0, make([]byte, defaultMaxReadFrameSize+1)) - - gf := st.wantGoAway() - if gf.ErrCode != ErrCodeFrameSize { - t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFrameSize) - } - if st.serverLogBuf.Len() != 0 { - // Previously we spun here for a bit until the GOAWAY disconnect - // timer fired, logging while we fired. - t.Errorf("unexpected server output: %.500s\n", st.serverLogBuf.Bytes()) - } -} - -func TestServer_Handler_Sends_WindowUpdate(t *testing.T) { - puppet := newHandlerPuppet() - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - puppet.act(w, r) - }) - defer st.Close() - defer puppet.done() - - st.greet() - - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, // data coming - EndHeaders: true, - }) - st.writeData(1, false, []byte("abcdef")) - puppet.do(readBodyHandler(t, "abc")) - st.wantWindowUpdate(0, 3) - st.wantWindowUpdate(1, 3) - - puppet.do(readBodyHandler(t, "def")) - st.wantWindowUpdate(0, 3) - st.wantWindowUpdate(1, 3) - - st.writeData(1, true, []byte("ghijkl")) // END_STREAM here - puppet.do(readBodyHandler(t, "ghi")) - puppet.do(readBodyHandler(t, "jkl")) - st.wantWindowUpdate(0, 3) - st.wantWindowUpdate(0, 3) // no more stream-level, since END_STREAM -} - -// the version of the TestServer_Handler_Sends_WindowUpdate with padding. -// See golang.org/issue/16556 -func TestServer_Handler_Sends_WindowUpdate_Padding(t *testing.T) { - puppet := newHandlerPuppet() - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - puppet.act(w, r) - }) - defer st.Close() - defer puppet.done() - - st.greet() - - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, - EndHeaders: true, - }) - st.writeDataPadded(1, false, []byte("abcdef"), []byte{0, 0, 0, 0}) - - // Expect to immediately get our 5 bytes of padding back for - // both the connection and stream (4 bytes of padding + 1 byte of length) - st.wantWindowUpdate(0, 5) - st.wantWindowUpdate(1, 5) - - puppet.do(readBodyHandler(t, "abc")) - st.wantWindowUpdate(0, 3) - st.wantWindowUpdate(1, 3) - - puppet.do(readBodyHandler(t, "def")) - st.wantWindowUpdate(0, 3) - st.wantWindowUpdate(1, 3) -} - -func TestServer_Send_GoAway_After_Bogus_WindowUpdate(t *testing.T) { - st := newServerTester(t, nil) - defer st.Close() - st.greet() - if err := st.fr.WriteWindowUpdate(0, 1<<31-1); err != nil { - t.Fatal(err) - } - gf := st.wantGoAway() - if gf.ErrCode != ErrCodeFlowControl { - t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFlowControl) - } - if gf.LastStreamID != 0 { - t.Errorf("GOAWAY last stream ID = %v; want %v", gf.LastStreamID, 0) - } -} - -func TestServer_Send_RstStream_After_Bogus_WindowUpdate(t *testing.T) { - inHandler := make(chan bool) - blockHandler := make(chan bool) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - inHandler <- true - <-blockHandler - }) - defer st.Close() - defer close(blockHandler) - st.greet() - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, // keep it open - EndHeaders: true, - }) - <-inHandler - // Send a bogus window update: - if err := st.fr.WriteWindowUpdate(1, 1<<31-1); err != nil { - t.Fatal(err) - } - st.wantRSTStream(1, ErrCodeFlowControl) -} - -// testServerPostUnblock sends a hanging POST with unsent data to handler, -// then runs fn once in the handler, and verifies that the error returned from -// handler is acceptable. It fails if takes over 5 seconds for handler to exit. -func testServerPostUnblock(t *testing.T, - handler func(http.ResponseWriter, *http.Request) error, - fn func(*serverTester), - checkErr func(error), - otherHeaders ...string) { - inHandler := make(chan bool) - errc := make(chan error, 1) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - inHandler <- true - errc <- handler(w, r) - }) - defer st.Close() - st.greet() - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(append([]string{":method", "POST"}, otherHeaders...)...), - EndStream: false, // keep it open - EndHeaders: true, - }) - <-inHandler - fn(st) - select { - case err := <-errc: - if checkErr != nil { - checkErr(err) - } - case <-time.After(5 * time.Second): - t.Fatal("timeout waiting for Handler to return") - } -} - -func TestServer_RSTStream_Unblocks_Read(t *testing.T) { - testServerPostUnblock(t, - func(w http.ResponseWriter, r *http.Request) (err error) { - _, err = r.Body.Read(make([]byte, 1)) - return - }, - func(st *serverTester) { - if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { - t.Fatal(err) - } - }, - func(err error) { - want := StreamError{StreamID: 0x1, Code: 0x8} - if !reflect.DeepEqual(err, want) { - t.Errorf("Read error = %v; want %v", err, want) - } - }, - ) -} - -func TestServer_RSTStream_Unblocks_Header_Write(t *testing.T) { - // Run this test a bunch, because it doesn't always - // deadlock. But with a bunch, it did. - n := 50 - if testing.Short() { - n = 5 - } - for i := 0; i < n; i++ { - testServer_RSTStream_Unblocks_Header_Write(t) - } -} - -func testServer_RSTStream_Unblocks_Header_Write(t *testing.T) { - inHandler := make(chan bool, 1) - unblockHandler := make(chan bool, 1) - headerWritten := make(chan bool, 1) - wroteRST := make(chan bool, 1) - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - inHandler <- true - <-wroteRST - w.Header().Set("foo", "bar") - w.WriteHeader(200) - w.(http.Flusher).Flush() - headerWritten <- true - <-unblockHandler - }) - defer st.Close() - - st.greet() - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, // keep it open - EndHeaders: true, - }) - <-inHandler - if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { - t.Fatal(err) - } - wroteRST <- true - st.awaitIdle() - select { - case <-headerWritten: - case <-time.After(2 * time.Second): - t.Error("timeout waiting for header write") - } - unblockHandler <- true -} - -func TestServer_DeadConn_Unblocks_Read(t *testing.T) { - testServerPostUnblock(t, - func(w http.ResponseWriter, r *http.Request) (err error) { - _, err = r.Body.Read(make([]byte, 1)) - return - }, - func(st *serverTester) { st.cc.Close() }, - func(err error) { - if err == nil { - t.Error("unexpected nil error from Request.Body.Read") - } - }, - ) -} - -var blockUntilClosed = func(w http.ResponseWriter, r *http.Request) error { - <-w.(http.CloseNotifier).CloseNotify() - return nil -} - -func TestServer_CloseNotify_After_RSTStream(t *testing.T) { - testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { - if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { - t.Fatal(err) - } - }, nil) -} - -func TestServer_CloseNotify_After_ConnClose(t *testing.T) { - testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { st.cc.Close() }, nil) -} - -// that CloseNotify unblocks after a stream error due to the client's -// problem that's unrelated to them explicitly canceling it (which is -// TestServer_CloseNotify_After_RSTStream above) -func TestServer_CloseNotify_After_StreamError(t *testing.T) { - testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { - // data longer than declared Content-Length => stream error - st.writeData(1, true, []byte("1234")) - }, nil, "content-length", "3") -} - -func TestServer_StateTransitions(t *testing.T) { - var st *serverTester - inHandler := make(chan bool) - writeData := make(chan bool) - leaveHandler := make(chan bool) - st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - inHandler <- true - if st.stream(1) == nil { - t.Errorf("nil stream 1 in handler") - } - if got, want := st.streamState(1), stateOpen; got != want { - t.Errorf("in handler, state is %v; want %v", got, want) - } - writeData <- true - if n, err := r.Body.Read(make([]byte, 1)); n != 0 || err != io.EOF { - t.Errorf("body read = %d, %v; want 0, EOF", n, err) - } - if got, want := st.streamState(1), stateHalfClosedRemote; got != want { - t.Errorf("in handler, state is %v; want %v", got, want) - } - - <-leaveHandler - }) - st.greet() - if st.stream(1) != nil { - t.Fatal("stream 1 should be empty") - } - if got := st.streamState(1); got != stateIdle { - t.Fatalf("stream 1 should be idle; got %v", got) - } - - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, // keep it open - EndHeaders: true, - }) - <-inHandler - <-writeData - st.writeData(1, true, nil) - - leaveHandler <- true - hf := st.wantHeaders() - if !hf.StreamEnded() { - t.Fatal("expected END_STREAM flag") - } - - if got, want := st.streamState(1), stateClosed; got != want { - t.Errorf("at end, state is %v; want %v", got, want) - } - if st.stream(1) != nil { - t.Fatal("at end, stream 1 should be gone") - } -} - -// test HEADERS w/o EndHeaders + another HEADERS (should get rejected) -func TestServer_Rejects_HeadersNoEnd_Then_Headers(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: false, - }) - st.writeHeaders(HeadersFrameParam{ // Not a continuation. - StreamID: 3, // different stream. - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: true, - }) - }) -} - -// test HEADERS w/o EndHeaders + PING (should get rejected) -func TestServer_Rejects_HeadersNoEnd_Then_Ping(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: false, - }) - if err := st.fr.WritePing(false, [8]byte{}); err != nil { - t.Fatal(err) - } - }) -} - -// test HEADERS w/ EndHeaders + a continuation HEADERS (should get rejected) -func TestServer_Rejects_HeadersEnd_Then_Continuation(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: true, - }) - st.wantHeaders() - if err := st.fr.WriteContinuation(1, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil { - t.Fatal(err) - } - }) -} - -// test HEADERS w/o EndHeaders + a continuation HEADERS on wrong stream ID -func TestServer_Rejects_HeadersNoEnd_Then_ContinuationWrongStream(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: false, - }) - if err := st.fr.WriteContinuation(3, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil { - t.Fatal(err) - } - }) -} - -// No HEADERS on stream 0. -func TestServer_Rejects_Headers0(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - st.fr.AllowIllegalWrites = true - st.writeHeaders(HeadersFrameParam{ - StreamID: 0, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: true, - }) - }) -} - -// No CONTINUATION on stream 0. -func TestServer_Rejects_Continuation0(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - st.fr.AllowIllegalWrites = true - if err := st.fr.WriteContinuation(0, true, st.encodeHeader()); err != nil { - t.Fatal(err) - } - }) -} - -// No PRIORITY on stream 0. -func TestServer_Rejects_Priority0(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - st.fr.AllowIllegalWrites = true - st.writePriority(0, PriorityParam{StreamDep: 1}) - }) -} - -// No HEADERS frame with a self-dependence. -func TestServer_Rejects_HeadersSelfDependence(t *testing.T) { - testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { - st.fr.AllowIllegalWrites = true - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: true, - Priority: PriorityParam{StreamDep: 1}, - }) - }) -} - -// No PRIORTY frame with a self-dependence. -func TestServer_Rejects_PrioritySelfDependence(t *testing.T) { - testServerRejectsStream(t, ErrCodeProtocol, func(st *serverTester) { - st.fr.AllowIllegalWrites = true - st.writePriority(1, PriorityParam{StreamDep: 1}) - }) -} - -func TestServer_Rejects_PushPromise(t *testing.T) { - testServerRejectsConn(t, func(st *serverTester) { - pp := PushPromiseParam{ - StreamID: 1, - PromiseID: 3, - } - if err := st.fr.WritePushPromise(pp); err != nil { - t.Fatal(err) - } - }) -} - -// testServerRejectsConn tests that the server hangs up with a GOAWAY -// frame and a server close after the client does something -// deserving a CONNECTION_ERROR. -func testServerRejectsConn(t *testing.T, writeReq func(*serverTester)) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) - st.addLogFilter("connection error: PROTOCOL_ERROR") - defer st.Close() - st.greet() - writeReq(st) - - st.wantGoAway() - errc := make(chan error, 1) - go func() { - fr, err := st.fr.ReadFrame() - if err == nil { - err = fmt.Errorf("got frame of type %T", fr) - } - errc <- err - }() - select { - case err := <-errc: - if err != io.EOF { - t.Errorf("ReadFrame = %v; want io.EOF", err) - } - case <-time.After(2 * time.Second): - t.Error("timeout waiting for disconnect") - } -} - -// testServerRejectsStream tests that the server sends a RST_STREAM with the provided -// error code after a client sends a bogus request. -func testServerRejectsStream(t *testing.T, code ErrCode, writeReq func(*serverTester)) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) - defer st.Close() - st.greet() - writeReq(st) - st.wantRSTStream(1, code) -} - -// testServerRequest sets up an idle HTTP/2 connection and lets you -// write a single request with writeReq, and then verify that the -// *http.Request is built correctly in checkReq. -func testServerRequest(t *testing.T, writeReq func(*serverTester), checkReq func(*http.Request)) { - gotReq := make(chan bool, 1) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - if r.Body == nil { - t.Fatal("nil Body") - } - checkReq(r) - gotReq <- true - }) - defer st.Close() - - st.greet() - writeReq(st) - - select { - case <-gotReq: - case <-time.After(2 * time.Second): - t.Error("timeout waiting for request") - } -} - -func getSlash(st *serverTester) { st.bodylessReq1() } - -func TestServer_Response_NoData(t *testing.T) { - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - // Nothing. - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if !hf.StreamEnded() { - t.Fatal("want END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - }) -} - -func TestServer_Response_NoData_Header_FooBar(t *testing.T) { - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Set("Foo-Bar", "some-value") - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if !hf.StreamEnded() { - t.Fatal("want END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"foo-bar", "some-value"}, - {"content-length", "0"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - }) -} - -func TestServer_Response_Data_Sniff_DoesntOverride(t *testing.T) { - const msg = "this is HTML." - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Set("Content-Type", "foo/bar") - io.WriteString(w, msg) - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("don't want END_STREAM, expecting data") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"content-type", "foo/bar"}, - {"content-length", strconv.Itoa(len(msg))}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - df := st.wantData() - if !df.StreamEnded() { - t.Error("expected DATA to have END_STREAM flag") - } - if got := string(df.Data()); got != msg { - t.Errorf("got DATA %q; want %q", got, msg) - } - }) -} - -func TestServer_Response_Nosniff_WithoutContentType(t *testing.T) { - const msg = "this is HTML." - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Set("X-Content-Type-Options", "nosniff") - w.WriteHeader(200) - io.WriteString(w, msg) - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("don't want END_STREAM, expecting data") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"x-content-type-options", "nosniff"}, - {"content-type", "application/octet-stream"}, - {"content-length", strconv.Itoa(len(msg))}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - df := st.wantData() - if !df.StreamEnded() { - t.Error("expected DATA to have END_STREAM flag") - } - if got := string(df.Data()); got != msg { - t.Errorf("got DATA %q; want %q", got, msg) - } - }) -} - -func TestServer_Response_TransferEncoding_chunked(t *testing.T) { - const msg = "hi" - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Set("Transfer-Encoding", "chunked") // should be stripped - io.WriteString(w, msg) - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"content-type", "text/plain; charset=utf-8"}, - {"content-length", strconv.Itoa(len(msg))}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - }) -} - -// Header accessed only after the initial write. -func TestServer_Response_Data_IgnoreHeaderAfterWrite_After(t *testing.T) { - const msg = "this is HTML." - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - io.WriteString(w, msg) - w.Header().Set("foo", "should be ignored") - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"content-type", "text/html; charset=utf-8"}, - {"content-length", strconv.Itoa(len(msg))}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - }) -} - -// Header accessed before the initial write and later mutated. -func TestServer_Response_Data_IgnoreHeaderAfterWrite_Overwrite(t *testing.T) { - const msg = "this is HTML." - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Set("foo", "proper value") - io.WriteString(w, msg) - w.Header().Set("foo", "should be ignored") - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"foo", "proper value"}, - {"content-type", "text/html; charset=utf-8"}, - {"content-length", strconv.Itoa(len(msg))}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - }) -} - -func TestServer_Response_Data_SniffLenType(t *testing.T) { - const msg = "this is HTML." - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - io.WriteString(w, msg) - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("don't want END_STREAM, expecting data") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"content-type", "text/html; charset=utf-8"}, - {"content-length", strconv.Itoa(len(msg))}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - df := st.wantData() - if !df.StreamEnded() { - t.Error("expected DATA to have END_STREAM flag") - } - if got := string(df.Data()); got != msg { - t.Errorf("got DATA %q; want %q", got, msg) - } - }) -} - -func TestServer_Response_Header_Flush_MidWrite(t *testing.T) { - const msg = "this is HTML" - const msg2 = ", and this is the next chunk" - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - io.WriteString(w, msg) - w.(http.Flusher).Flush() - io.WriteString(w, msg2) - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"content-type", "text/html; charset=utf-8"}, // sniffed - // and no content-length - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - { - df := st.wantData() - if df.StreamEnded() { - t.Error("unexpected END_STREAM flag") - } - if got := string(df.Data()); got != msg { - t.Errorf("got DATA %q; want %q", got, msg) - } - } - { - df := st.wantData() - if !df.StreamEnded() { - t.Error("wanted END_STREAM flag on last data chunk") - } - if got := string(df.Data()); got != msg2 { - t.Errorf("got DATA %q; want %q", got, msg2) - } - } - }) -} - -func TestServer_Response_LargeWrite(t *testing.T) { - const size = 1 << 20 - const maxFrameSize = 16 << 10 - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - n, err := w.Write(bytes.Repeat([]byte("a"), size)) - if err != nil { - return fmt.Errorf("Write error: %v", err) - } - if n != size { - return fmt.Errorf("wrong size %d from Write", n) - } - return nil - }, func(st *serverTester) { - if err := st.fr.WriteSettings( - Setting{SettingInitialWindowSize, 0}, - Setting{SettingMaxFrameSize, maxFrameSize}, - ); err != nil { - t.Fatal(err) - } - st.wantSettingsAck() - - getSlash(st) // make the single request - - // Give the handler quota to write: - if err := st.fr.WriteWindowUpdate(1, size); err != nil { - t.Fatal(err) - } - // Give the handler quota to write to connection-level - // window as well - if err := st.fr.WriteWindowUpdate(0, size); err != nil { - t.Fatal(err) - } - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"content-type", "text/plain; charset=utf-8"}, // sniffed - // and no content-length - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - var bytes, frames int - for { - df := st.wantData() - bytes += len(df.Data()) - frames++ - for _, b := range df.Data() { - if b != 'a' { - t.Fatal("non-'a' byte seen in DATA") - } - } - if df.StreamEnded() { - break - } - } - if bytes != size { - t.Errorf("Got %d bytes; want %d", bytes, size) - } - if want := int(size / maxFrameSize); frames < want || frames > want*2 { - t.Errorf("Got %d frames; want %d", frames, size) - } - }) -} - -// Test that the handler can't write more than the client allows -func TestServer_Response_LargeWrite_FlowControlled(t *testing.T) { - // Make these reads. Before each read, the client adds exactly enough - // flow-control to satisfy the read. Numbers chosen arbitrarily. - reads := []int{123, 1, 13, 127} - size := 0 - for _, n := range reads { - size += n - } - - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.(http.Flusher).Flush() - n, err := w.Write(bytes.Repeat([]byte("a"), size)) - if err != nil { - return fmt.Errorf("Write error: %v", err) - } - if n != size { - return fmt.Errorf("wrong size %d from Write", n) - } - return nil - }, func(st *serverTester) { - // Set the window size to something explicit for this test. - // It's also how much initial data we expect. - if err := st.fr.WriteSettings(Setting{SettingInitialWindowSize, uint32(reads[0])}); err != nil { - t.Fatal(err) - } - st.wantSettingsAck() - - getSlash(st) // make the single request - - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - - df := st.wantData() - if got := len(df.Data()); got != reads[0] { - t.Fatalf("Initial window size = %d but got DATA with %d bytes", reads[0], got) - } - - for _, quota := range reads[1:] { - if err := st.fr.WriteWindowUpdate(1, uint32(quota)); err != nil { - t.Fatal(err) - } - df := st.wantData() - if int(quota) != len(df.Data()) { - t.Fatalf("read %d bytes after giving %d quota", len(df.Data()), quota) - } - } - }) -} - -// Test that the handler blocked in a Write is unblocked if the server sends a RST_STREAM. -func TestServer_Response_RST_Unblocks_LargeWrite(t *testing.T) { - const size = 1 << 20 - const maxFrameSize = 16 << 10 - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.(http.Flusher).Flush() - errc := make(chan error, 1) - go func() { - _, err := w.Write(bytes.Repeat([]byte("a"), size)) - errc <- err - }() - select { - case err := <-errc: - if err == nil { - return errors.New("unexpected nil error from Write in handler") - } - return nil - case <-time.After(2 * time.Second): - return errors.New("timeout waiting for Write in handler") - } - }, func(st *serverTester) { - if err := st.fr.WriteSettings( - Setting{SettingInitialWindowSize, 0}, - Setting{SettingMaxFrameSize, maxFrameSize}, - ); err != nil { - t.Fatal(err) - } - st.wantSettingsAck() - - getSlash(st) // make the single request - - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - - if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { - t.Fatal(err) - } - }) -} - -func TestServer_Response_Empty_Data_Not_FlowControlled(t *testing.T) { - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.(http.Flusher).Flush() - // Nothing; send empty DATA - return nil - }, func(st *serverTester) { - // Handler gets no data quota: - if err := st.fr.WriteSettings(Setting{SettingInitialWindowSize, 0}); err != nil { - t.Fatal(err) - } - st.wantSettingsAck() - - getSlash(st) // make the single request - - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - - df := st.wantData() - if got := len(df.Data()); got != 0 { - t.Fatalf("unexpected %d DATA bytes; want 0", got) - } - if !df.StreamEnded() { - t.Fatal("DATA didn't have END_STREAM") - } - }) -} - -func TestServer_Response_Automatic100Continue(t *testing.T) { - const msg = "foo" - const reply = "bar" - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - if v := r.Header.Get("Expect"); v != "" { - t.Errorf("Expect header = %q; want empty", v) - } - buf := make([]byte, len(msg)) - // This read should trigger the 100-continue being sent. - if n, err := io.ReadFull(r.Body, buf); err != nil || n != len(msg) || string(buf) != msg { - return fmt.Errorf("ReadFull = %q, %v; want %q, nil", buf[:n], err, msg) - } - _, err := io.WriteString(w, reply) - return err - }, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "POST", "expect", "100-continue"), - EndStream: false, - EndHeaders: true, - }) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "100"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Fatalf("Got headers %v; want %v", goth, wanth) - } - - // Okay, they sent status 100, so we can send our - // gigantic and/or sensitive "foo" payload now. - st.writeData(1, true, []byte(msg)) - - st.wantWindowUpdate(0, uint32(len(msg))) - - hf = st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("expected data to follow") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - goth = st.decodeHeader(hf.HeaderBlockFragment()) - wanth = [][2]string{ - {":status", "200"}, - {"content-type", "text/plain; charset=utf-8"}, - {"content-length", strconv.Itoa(len(reply))}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } - - df := st.wantData() - if string(df.Data()) != reply { - t.Errorf("Client read %q; want %q", df.Data(), reply) - } - if !df.StreamEnded() { - t.Errorf("expect data stream end") - } - }) -} - -func TestServer_HandlerWriteErrorOnDisconnect(t *testing.T) { - errc := make(chan error, 1) - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - p := []byte("some data.\n") - for { - _, err := w.Write(p) - if err != nil { - errc <- err - return nil - } - } - }, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: false, - EndHeaders: true, - }) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("unexpected END_STREAM flag") - } - if !hf.HeadersEnded() { - t.Fatal("want END_HEADERS flag") - } - // Close the connection and wait for the handler to (hopefully) notice. - st.cc.Close() - select { - case <-errc: - case <-time.After(5 * time.Second): - t.Error("timeout") - } - }) -} - -func TestServer_Rejects_Too_Many_Streams(t *testing.T) { - const testPath = "/some/path" - - inHandler := make(chan uint32) - leaveHandler := make(chan bool) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - id := w.(*responseWriter).rws.stream.id - inHandler <- id - if id == 1+(defaultMaxStreams+1)*2 && r.URL.Path != testPath { - t.Errorf("decoded final path as %q; want %q", r.URL.Path, testPath) - } - <-leaveHandler - }) - defer st.Close() - st.greet() - nextStreamID := uint32(1) - streamID := func() uint32 { - defer func() { nextStreamID += 2 }() - return nextStreamID - } - sendReq := func(id uint32, headers ...string) { - st.writeHeaders(HeadersFrameParam{ - StreamID: id, - BlockFragment: st.encodeHeader(headers...), - EndStream: true, - EndHeaders: true, - }) - } - for i := 0; i < defaultMaxStreams; i++ { - sendReq(streamID()) - <-inHandler - } - defer func() { - for i := 0; i < defaultMaxStreams; i++ { - leaveHandler <- true - } - }() - - // And this one should cross the limit: - // (It's also sent as a CONTINUATION, to verify we still track the decoder context, - // even if we're rejecting it) - rejectID := streamID() - headerBlock := st.encodeHeader(":path", testPath) - frag1, frag2 := headerBlock[:3], headerBlock[3:] - st.writeHeaders(HeadersFrameParam{ - StreamID: rejectID, - BlockFragment: frag1, - EndStream: true, - EndHeaders: false, // CONTINUATION coming - }) - if err := st.fr.WriteContinuation(rejectID, true, frag2); err != nil { - t.Fatal(err) - } - st.wantRSTStream(rejectID, ErrCodeProtocol) - - // But let a handler finish: - leaveHandler <- true - st.wantHeaders() - - // And now another stream should be able to start: - goodID := streamID() - sendReq(goodID, ":path", testPath) - select { - case got := <-inHandler: - if got != goodID { - t.Errorf("Got stream %d; want %d", got, goodID) - } - case <-time.After(3 * time.Second): - t.Error("timeout waiting for handler") - } -} - -// So many response headers that the server needs to use CONTINUATION frames: -func TestServer_Response_ManyHeaders_With_Continuation(t *testing.T) { - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - h := w.Header() - for i := 0; i < 5000; i++ { - h.Set(fmt.Sprintf("x-header-%d", i), fmt.Sprintf("x-value-%d", i)) - } - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.HeadersEnded() { - t.Fatal("got unwanted END_HEADERS flag") - } - n := 0 - for { - n++ - cf := st.wantContinuation() - if cf.HeadersEnded() { - break - } - } - if n < 5 { - t.Errorf("Only got %d CONTINUATION frames; expected 5+ (currently 6)", n) - } - }) -} - -// This previously crashed (reported by Mathieu Lonjaret as observed -// while using Camlistore) because we got a DATA frame from the client -// after the handler exited and our logic at the time was wrong, -// keeping a stream in the map in stateClosed, which tickled an -// invariant check later when we tried to remove that stream (via -// defer sc.closeAllStreamsOnConnClose) when the serverConn serve loop -// ended. -func TestServer_NoCrash_HandlerClose_Then_ClientClose(t *testing.T) { - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - // nothing - return nil - }, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: false, // DATA is coming - EndHeaders: true, - }) - hf := st.wantHeaders() - if !hf.HeadersEnded() || !hf.StreamEnded() { - t.Fatalf("want END_HEADERS+END_STREAM, got %v", hf) - } - - // Sent when the a Handler closes while a client has - // indicated it's still sending DATA: - st.wantRSTStream(1, ErrCodeNo) - - // Now the handler has ended, so it's ended its - // stream, but the client hasn't closed its side - // (stateClosedLocal). So send more data and verify - // it doesn't crash with an internal invariant panic, like - // it did before. - st.writeData(1, true, []byte("foo")) - - // Get our flow control bytes back, since the handler didn't get them. - st.wantWindowUpdate(0, uint32(len("foo"))) - - // Sent after a peer sends data anyway (admittedly the - // previous RST_STREAM might've still been in-flight), - // but they'll get the more friendly 'cancel' code - // first. - st.wantRSTStream(1, ErrCodeStreamClosed) - - // Set up a bunch of machinery to record the panic we saw - // previously. - var ( - panMu sync.Mutex - panicVal interface{} - ) - - testHookOnPanicMu.Lock() - testHookOnPanic = func(sc *serverConn, pv interface{}) bool { - panMu.Lock() - panicVal = pv - panMu.Unlock() - return true - } - testHookOnPanicMu.Unlock() - - // Now force the serve loop to end, via closing the connection. - st.cc.Close() - select { - case <-st.sc.doneServing: - // Loop has exited. - panMu.Lock() - got := panicVal - panMu.Unlock() - if got != nil { - t.Errorf("Got panic: %v", got) - } - case <-time.After(5 * time.Second): - t.Error("timeout") - } - }) -} - -func TestServer_Rejects_TLS10(t *testing.T) { testRejectTLS(t, tls.VersionTLS10) } -func TestServer_Rejects_TLS11(t *testing.T) { testRejectTLS(t, tls.VersionTLS11) } - -func testRejectTLS(t *testing.T, max uint16) { - st := newServerTester(t, nil, func(c *tls.Config) { - c.MaxVersion = max - }) - defer st.Close() - gf := st.wantGoAway() - if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want { - t.Errorf("Got error code %v; want %v", got, want) - } -} - -func TestServer_Rejects_TLSBadCipher(t *testing.T) { - st := newServerTester(t, nil, func(c *tls.Config) { - // Only list bad ones: - c.CipherSuites = []uint16{ - tls.TLS_RSA_WITH_RC4_128_SHA, - tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, - tls.TLS_RSA_WITH_AES_128_CBC_SHA, - tls.TLS_RSA_WITH_AES_256_CBC_SHA, - tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, - tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, - tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, - tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - cipher_TLS_RSA_WITH_AES_128_CBC_SHA256, - } - }) - defer st.Close() - gf := st.wantGoAway() - if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want { - t.Errorf("Got error code %v; want %v", got, want) - } -} - -func TestServer_Advertises_Common_Cipher(t *testing.T) { - const requiredSuite = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - st := newServerTester(t, nil, func(c *tls.Config) { - // Have the client only support the one required by the spec. - c.CipherSuites = []uint16{requiredSuite} - }, func(ts *httptest.Server) { - var srv *http.Server = ts.Config - // Have the server configured with no specific cipher suites. - // This tests that Go's defaults include the required one. - srv.TLSConfig = nil - }) - defer st.Close() - st.greet() -} - -func (st *serverTester) onHeaderField(f hpack.HeaderField) { - if f.Name == "date" { - return - } - st.decodedHeaders = append(st.decodedHeaders, [2]string{f.Name, f.Value}) -} - -func (st *serverTester) decodeHeader(headerBlock []byte) (pairs [][2]string) { - st.decodedHeaders = nil - if _, err := st.hpackDec.Write(headerBlock); err != nil { - st.t.Fatalf("hpack decoding error: %v", err) - } - if err := st.hpackDec.Close(); err != nil { - st.t.Fatalf("hpack decoding error: %v", err) - } - return st.decodedHeaders -} - -// testServerResponse sets up an idle HTTP/2 connection. The client function should -// write a single request that must be handled by the handler. This waits up to 5s -// for client to return, then up to an additional 2s for the handler to return. -func testServerResponse(t testing.TB, - handler func(http.ResponseWriter, *http.Request) error, - client func(*serverTester), -) { - errc := make(chan error, 1) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - if r.Body == nil { - t.Fatal("nil Body") - } - errc <- handler(w, r) - }) - defer st.Close() - - donec := make(chan bool) - go func() { - defer close(donec) - st.greet() - client(st) - }() - - select { - case <-donec: - case <-time.After(5 * time.Second): - t.Fatal("timeout in client") - } - - select { - case err := <-errc: - if err != nil { - t.Fatalf("Error in handler: %v", err) - } - case <-time.After(2 * time.Second): - t.Fatal("timeout in handler") - } -} - -// readBodyHandler returns an http Handler func that reads len(want) -// bytes from r.Body and fails t if the contents read were not -// the value of want. -func readBodyHandler(t *testing.T, want string) func(w http.ResponseWriter, r *http.Request) { - return func(w http.ResponseWriter, r *http.Request) { - buf := make([]byte, len(want)) - _, err := io.ReadFull(r.Body, buf) - if err != nil { - t.Error(err) - return - } - if string(buf) != want { - t.Errorf("read %q; want %q", buf, want) - } - } -} - -// TestServerWithCurl currently fails, hence the LenientCipherSuites test. See: -// https://github.com/tatsuhiro-t/nghttp2/issues/140 & -// http://sourceforge.net/p/curl/bugs/1472/ -func TestServerWithCurl(t *testing.T) { testServerWithCurl(t, false) } -func TestServerWithCurl_LenientCipherSuites(t *testing.T) { testServerWithCurl(t, true) } - -func testServerWithCurl(t *testing.T, permitProhibitedCipherSuites bool) { - if runtime.GOOS != "linux" { - t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway") - } - if testing.Short() { - t.Skip("skipping curl test in short mode") - } - requireCurl(t) - var gotConn int32 - testHookOnConn = func() { atomic.StoreInt32(&gotConn, 1) } - - const msg = "Hello from curl!\n" - ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Foo", "Bar") - w.Header().Set("Client-Proto", r.Proto) - io.WriteString(w, msg) - })) - ConfigureServer(ts.Config, &Server{ - PermitProhibitedCipherSuites: permitProhibitedCipherSuites, - }) - ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config - ts.StartTLS() - defer ts.Close() - - t.Logf("Running test server for curl to hit at: %s", ts.URL) - container := curl(t, "--silent", "--http2", "--insecure", "-v", ts.URL) - defer kill(container) - resc := make(chan interface{}, 1) - go func() { - res, err := dockerLogs(container) - if err != nil { - resc <- err - } else { - resc <- res - } - }() - select { - case res := <-resc: - if err, ok := res.(error); ok { - t.Fatal(err) - } - body := string(res.([]byte)) - // Search for both "key: value" and "key:value", since curl changed their format - // Our Dockerfile contains the latest version (no space), but just in case people - // didn't rebuild, check both. - if !strings.Contains(body, "foo: Bar") && !strings.Contains(body, "foo:Bar") { - t.Errorf("didn't see foo: Bar header") - t.Logf("Got: %s", body) - } - if !strings.Contains(body, "client-proto: HTTP/2") && !strings.Contains(body, "client-proto:HTTP/2") { - t.Errorf("didn't see client-proto: HTTP/2 header") - t.Logf("Got: %s", res) - } - if !strings.Contains(string(res.([]byte)), msg) { - t.Errorf("didn't see %q content", msg) - t.Logf("Got: %s", res) - } - case <-time.After(3 * time.Second): - t.Errorf("timeout waiting for curl") - } - - if atomic.LoadInt32(&gotConn) == 0 { - t.Error("never saw an http2 connection") - } -} - -var doh2load = flag.Bool("h2load", false, "Run h2load test") - -func TestServerWithH2Load(t *testing.T) { - if !*doh2load { - t.Skip("Skipping without --h2load flag.") - } - if runtime.GOOS != "linux" { - t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway") - } - requireH2load(t) - - msg := strings.Repeat("Hello, h2load!\n", 5000) - ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, msg) - w.(http.Flusher).Flush() - io.WriteString(w, msg) - })) - ts.StartTLS() - defer ts.Close() - - cmd := exec.Command("docker", "run", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl", - "-n100000", "-c100", "-m100", ts.URL) - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - t.Fatal(err) - } -} - -// Issue 12843 -func TestServerDoS_MaxHeaderListSize(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) - defer st.Close() - - // shake hands - frameSize := defaultMaxReadFrameSize - var advHeaderListSize *uint32 - st.greetAndCheckSettings(func(s Setting) error { - switch s.ID { - case SettingMaxFrameSize: - if s.Val < minMaxFrameSize { - frameSize = minMaxFrameSize - } else if s.Val > maxFrameSize { - frameSize = maxFrameSize - } else { - frameSize = int(s.Val) - } - case SettingMaxHeaderListSize: - advHeaderListSize = &s.Val - } - return nil - }) - - if advHeaderListSize == nil { - t.Errorf("server didn't advertise a max header list size") - } else if *advHeaderListSize == 0 { - t.Errorf("server advertised a max header list size of 0") - } - - st.encodeHeaderField(":method", "GET") - st.encodeHeaderField(":path", "/") - st.encodeHeaderField(":scheme", "https") - cookie := strings.Repeat("*", 4058) - st.encodeHeaderField("cookie", cookie) - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.headerBuf.Bytes(), - EndStream: true, - EndHeaders: false, - }) - - // Capture the short encoding of a duplicate ~4K cookie, now - // that we've already sent it once. - st.headerBuf.Reset() - st.encodeHeaderField("cookie", cookie) - - // Now send 1MB of it. - const size = 1 << 20 - b := bytes.Repeat(st.headerBuf.Bytes(), size/st.headerBuf.Len()) - for len(b) > 0 { - chunk := b - if len(chunk) > frameSize { - chunk = chunk[:frameSize] - } - b = b[len(chunk):] - st.fr.WriteContinuation(1, len(b) == 0, chunk) - } - - h := st.wantHeaders() - if !h.HeadersEnded() { - t.Fatalf("Got HEADERS without END_HEADERS set: %v", h) - } - headers := st.decodeHeader(h.HeaderBlockFragment()) - want := [][2]string{ - {":status", "431"}, - {"content-type", "text/html; charset=utf-8"}, - {"content-length", "63"}, - } - if !reflect.DeepEqual(headers, want) { - t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) - } -} - -func TestCompressionErrorOnWrite(t *testing.T) { - const maxStrLen = 8 << 10 - var serverConfig *http.Server - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - // No response body. - }, func(ts *httptest.Server) { - serverConfig = ts.Config - serverConfig.MaxHeaderBytes = maxStrLen - }) - st.addLogFilter("connection error: COMPRESSION_ERROR") - defer st.Close() - st.greet() - - maxAllowed := st.sc.framer.maxHeaderStringLen() - - // Crank this up, now that we have a conn connected with the - // hpack.Decoder's max string length set has been initialized - // from the earlier low ~8K value. We want this higher so don't - // hit the max header list size. We only want to test hitting - // the max string size. - serverConfig.MaxHeaderBytes = 1 << 20 - - // First a request with a header that's exactly the max allowed size - // for the hpack compression. It's still too long for the header list - // size, so we'll get the 431 error, but that keeps the compression - // context still valid. - hbf := st.encodeHeader("foo", strings.Repeat("a", maxAllowed)) - - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: hbf, - EndStream: true, - EndHeaders: true, - }) - h := st.wantHeaders() - if !h.HeadersEnded() { - t.Fatalf("Got HEADERS without END_HEADERS set: %v", h) - } - headers := st.decodeHeader(h.HeaderBlockFragment()) - want := [][2]string{ - {":status", "431"}, - {"content-type", "text/html; charset=utf-8"}, - {"content-length", "63"}, - } - if !reflect.DeepEqual(headers, want) { - t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) - } - df := st.wantData() - if !strings.Contains(string(df.Data()), "HTTP Error 431") { - t.Errorf("Unexpected data body: %q", df.Data()) - } - if !df.StreamEnded() { - t.Fatalf("expect data stream end") - } - - // And now send one that's just one byte too big. - hbf = st.encodeHeader("bar", strings.Repeat("b", maxAllowed+1)) - st.writeHeaders(HeadersFrameParam{ - StreamID: 3, - BlockFragment: hbf, - EndStream: true, - EndHeaders: true, - }) - ga := st.wantGoAway() - if ga.ErrCode != ErrCodeCompression { - t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode) - } -} - -func TestCompressionErrorOnClose(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - // No response body. - }) - st.addLogFilter("connection error: COMPRESSION_ERROR") - defer st.Close() - st.greet() - - hbf := st.encodeHeader("foo", "bar") - hbf = hbf[:len(hbf)-1] // truncate one byte from the end, so hpack.Decoder.Close fails. - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: hbf, - EndStream: true, - EndHeaders: true, - }) - ga := st.wantGoAway() - if ga.ErrCode != ErrCodeCompression { - t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode) - } -} - -// test that a server handler can read trailers from a client -func TestServerReadsTrailers(t *testing.T) { - const testBody = "some test body" - writeReq := func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader("trailer", "Foo, Bar", "trailer", "Baz"), - EndStream: false, - EndHeaders: true, - }) - st.writeData(1, false, []byte(testBody)) - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeaderRaw( - "foo", "foov", - "bar", "barv", - "baz", "bazv", - "surprise", "wasn't declared; shouldn't show up", - ), - EndStream: true, - EndHeaders: true, - }) - } - checkReq := func(r *http.Request) { - wantTrailer := http.Header{ - "Foo": nil, - "Bar": nil, - "Baz": nil, - } - if !reflect.DeepEqual(r.Trailer, wantTrailer) { - t.Errorf("initial Trailer = %v; want %v", r.Trailer, wantTrailer) - } - slurp, err := ioutil.ReadAll(r.Body) - if string(slurp) != testBody { - t.Errorf("read body %q; want %q", slurp, testBody) - } - if err != nil { - t.Fatalf("Body slurp: %v", err) - } - wantTrailerAfter := http.Header{ - "Foo": {"foov"}, - "Bar": {"barv"}, - "Baz": {"bazv"}, - } - if !reflect.DeepEqual(r.Trailer, wantTrailerAfter) { - t.Errorf("final Trailer = %v; want %v", r.Trailer, wantTrailerAfter) - } - } - testServerRequest(t, writeReq, checkReq) -} - -// test that a server handler can send trailers -func TestServerWritesTrailers_WithFlush(t *testing.T) { testServerWritesTrailers(t, true) } -func TestServerWritesTrailers_WithoutFlush(t *testing.T) { testServerWritesTrailers(t, false) } - -func testServerWritesTrailers(t *testing.T, withFlush bool) { - // See https://httpwg.github.io/specs/rfc7540.html#rfc.section.8.1.3 - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Set("Trailer", "Server-Trailer-A, Server-Trailer-B") - w.Header().Add("Trailer", "Server-Trailer-C") - w.Header().Add("Trailer", "Transfer-Encoding, Content-Length, Trailer") // filtered - - // Regular headers: - w.Header().Set("Foo", "Bar") - w.Header().Set("Content-Length", "5") // len("Hello") - - io.WriteString(w, "Hello") - if withFlush { - w.(http.Flusher).Flush() - } - w.Header().Set("Server-Trailer-A", "valuea") - w.Header().Set("Server-Trailer-C", "valuec") // skipping B - // After a flush, random keys like Server-Surprise shouldn't show up: - w.Header().Set("Server-Surpise", "surprise! this isn't predeclared!") - // But we do permit promoting keys to trailers after a - // flush if they start with the magic - // otherwise-invalid "Trailer:" prefix: - w.Header().Set("Trailer:Post-Header-Trailer", "hi1") - w.Header().Set("Trailer:post-header-trailer2", "hi2") - w.Header().Set("Trailer:Range", "invalid") - w.Header().Set("Trailer:Foo\x01Bogus", "invalid") - w.Header().Set("Transfer-Encoding", "should not be included; Forbidden by RFC 7230 4.1.2") - w.Header().Set("Content-Length", "should not be included; Forbidden by RFC 7230 4.1.2") - w.Header().Set("Trailer", "should not be included; Forbidden by RFC 7230 4.1.2") - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if hf.StreamEnded() { - t.Fatal("response HEADERS had END_STREAM") - } - if !hf.HeadersEnded() { - t.Fatal("response HEADERS didn't have END_HEADERS") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"foo", "Bar"}, - {"trailer", "Server-Trailer-A, Server-Trailer-B"}, - {"trailer", "Server-Trailer-C"}, - {"trailer", "Transfer-Encoding, Content-Length, Trailer"}, - {"content-type", "text/plain; charset=utf-8"}, - {"content-length", "5"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth) - } - df := st.wantData() - if string(df.Data()) != "Hello" { - t.Fatalf("Client read %q; want Hello", df.Data()) - } - if df.StreamEnded() { - t.Fatalf("data frame had STREAM_ENDED") - } - tf := st.wantHeaders() // for the trailers - if !tf.StreamEnded() { - t.Fatalf("trailers HEADERS lacked END_STREAM") - } - if !tf.HeadersEnded() { - t.Fatalf("trailers HEADERS lacked END_HEADERS") - } - wanth = [][2]string{ - {"post-header-trailer", "hi1"}, - {"post-header-trailer2", "hi2"}, - {"server-trailer-a", "valuea"}, - {"server-trailer-c", "valuec"}, - } - goth = st.decodeHeader(tf.HeaderBlockFragment()) - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth) - } - }) -} - -// validate transmitted header field names & values -// golang.org/issue/14048 -func TestServerDoesntWriteInvalidHeaders(t *testing.T) { - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Add("OK1", "x") - w.Header().Add("Bad:Colon", "x") // colon (non-token byte) in key - w.Header().Add("Bad1\x00", "x") // null in key - w.Header().Add("Bad2", "x\x00y") // null in value - return nil - }, func(st *serverTester) { - getSlash(st) - hf := st.wantHeaders() - if !hf.StreamEnded() { - t.Error("response HEADERS lacked END_STREAM") - } - if !hf.HeadersEnded() { - t.Fatal("response HEADERS didn't have END_HEADERS") - } - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "200"}, - {"ok1", "x"}, - {"content-length", "0"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Header mismatch.\n got: %v\nwant: %v", goth, wanth) - } - }) -} - -func BenchmarkServerGets(b *testing.B) { - defer disableGoroutineTracking()() - b.ReportAllocs() - - const msg = "Hello, world" - st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, msg) - }) - defer st.Close() - st.greet() - - // Give the server quota to reply. (plus it has the 64KB) - if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { - b.Fatal(err) - } - - for i := 0; i < b.N; i++ { - id := 1 + uint32(i)*2 - st.writeHeaders(HeadersFrameParam{ - StreamID: id, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: true, - }) - st.wantHeaders() - df := st.wantData() - if !df.StreamEnded() { - b.Fatalf("DATA didn't have END_STREAM; got %v", df) - } - } -} - -func BenchmarkServerPosts(b *testing.B) { - defer disableGoroutineTracking()() - b.ReportAllocs() - - const msg = "Hello, world" - st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { - // Consume the (empty) body from th peer before replying, otherwise - // the server will sometimes (depending on scheduling) send the peer a - // a RST_STREAM with the CANCEL error code. - if n, err := io.Copy(ioutil.Discard, r.Body); n != 0 || err != nil { - b.Errorf("Copy error; got %v, %v; want 0, nil", n, err) - } - io.WriteString(w, msg) - }) - defer st.Close() - st.greet() - - // Give the server quota to reply. (plus it has the 64KB) - if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { - b.Fatal(err) - } - - for i := 0; i < b.N; i++ { - id := 1 + uint32(i)*2 - st.writeHeaders(HeadersFrameParam{ - StreamID: id, - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, - EndHeaders: true, - }) - st.writeData(id, true, nil) - st.wantHeaders() - df := st.wantData() - if !df.StreamEnded() { - b.Fatalf("DATA didn't have END_STREAM; got %v", df) - } - } -} - -// Send a stream of messages from server to client in separate data frames. -// Brings up performance issues seen in long streams. -// Created to show problem in go issue #18502 -func BenchmarkServerToClientStreamDefaultOptions(b *testing.B) { - benchmarkServerToClientStream(b) -} - -// Justification for Change-Id: Iad93420ef6c3918f54249d867098f1dadfa324d8 -// Expect to see memory/alloc reduction by opting in to Frame reuse with the Framer. -func BenchmarkServerToClientStreamReuseFrames(b *testing.B) { - benchmarkServerToClientStream(b, optFramerReuseFrames) -} - -func benchmarkServerToClientStream(b *testing.B, newServerOpts ...interface{}) { - defer disableGoroutineTracking()() - b.ReportAllocs() - const msgLen = 1 - // default window size - const windowSize = 1<<16 - 1 - - // next message to send from the server and for the client to expect - nextMsg := func(i int) []byte { - msg := make([]byte, msgLen) - msg[0] = byte(i) - if len(msg) != msgLen { - panic("invalid test setup msg length") - } - return msg - } - - st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { - // Consume the (empty) body from th peer before replying, otherwise - // the server will sometimes (depending on scheduling) send the peer a - // a RST_STREAM with the CANCEL error code. - if n, err := io.Copy(ioutil.Discard, r.Body); n != 0 || err != nil { - b.Errorf("Copy error; got %v, %v; want 0, nil", n, err) - } - for i := 0; i < b.N; i += 1 { - w.Write(nextMsg(i)) - w.(http.Flusher).Flush() - } - }, newServerOpts...) - defer st.Close() - st.greet() - - const id = uint32(1) - - st.writeHeaders(HeadersFrameParam{ - StreamID: id, - BlockFragment: st.encodeHeader(":method", "POST"), - EndStream: false, - EndHeaders: true, - }) - - st.writeData(id, true, nil) - st.wantHeaders() - - var pendingWindowUpdate = uint32(0) - - for i := 0; i < b.N; i += 1 { - expected := nextMsg(i) - df := st.wantData() - if bytes.Compare(expected, df.data) != 0 { - b.Fatalf("Bad message received; want %v; got %v", expected, df.data) - } - // try to send infrequent but large window updates so they don't overwhelm the test - pendingWindowUpdate += uint32(len(df.data)) - if pendingWindowUpdate >= windowSize/2 { - if err := st.fr.WriteWindowUpdate(0, pendingWindowUpdate); err != nil { - b.Fatal(err) - } - if err := st.fr.WriteWindowUpdate(id, pendingWindowUpdate); err != nil { - b.Fatal(err) - } - pendingWindowUpdate = 0 - } - } - df := st.wantData() - if !df.StreamEnded() { - b.Fatalf("DATA didn't have END_STREAM; got %v", df) - } -} - -// go-fuzz bug, originally reported at https://github.com/bradfitz/http2/issues/53 -// Verify we don't hang. -func TestIssue53(t *testing.T) { - const data = "PRI * HTTP/2.0\r\n\r\nSM" + - "\r\n\r\n\x00\x00\x00\x01\ainfinfin\ad" - s := &http.Server{ - ErrorLog: log.New(io.MultiWriter(stderrv(), twriter{t: t}), "", log.LstdFlags), - Handler: http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - w.Write([]byte("hello")) - }), - } - s2 := &Server{ - MaxReadFrameSize: 1 << 16, - PermitProhibitedCipherSuites: true, - } - c := &issue53Conn{[]byte(data), false, false} - s2.ServeConn(c, &ServeConnOpts{BaseConfig: s}) - if !c.closed { - t.Fatal("connection is not closed") - } -} - -type issue53Conn struct { - data []byte - closed bool - written bool -} - -func (c *issue53Conn) Read(b []byte) (n int, err error) { - if len(c.data) == 0 { - return 0, io.EOF - } - n = copy(b, c.data) - c.data = c.data[n:] - return -} - -func (c *issue53Conn) Write(b []byte) (n int, err error) { - c.written = true - return len(b), nil -} - -func (c *issue53Conn) Close() error { - c.closed = true - return nil -} - -func (c *issue53Conn) LocalAddr() net.Addr { - return &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 49706} -} -func (c *issue53Conn) RemoteAddr() net.Addr { - return &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 49706} -} -func (c *issue53Conn) SetDeadline(t time.Time) error { return nil } -func (c *issue53Conn) SetReadDeadline(t time.Time) error { return nil } -func (c *issue53Conn) SetWriteDeadline(t time.Time) error { return nil } - -// golang.org/issue/12895 -func TestConfigureServer(t *testing.T) { - tests := []struct { - name string - tlsConfig *tls.Config - wantErr string - }{ - { - name: "empty server", - }, - { - name: "just the required cipher suite", - tlsConfig: &tls.Config{ - CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, - }, - }, - { - name: "just the alternative required cipher suite", - tlsConfig: &tls.Config{ - CipherSuites: []uint16{tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256}, - }, - }, - { - name: "missing required cipher suite", - tlsConfig: &tls.Config{ - CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384}, - }, - wantErr: "is missing an HTTP/2-required AES_128_GCM_SHA256 cipher.", - }, - { - name: "required after bad", - tlsConfig: &tls.Config{ - CipherSuites: []uint16{tls.TLS_RSA_WITH_RC4_128_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, - }, - wantErr: "contains an HTTP/2-approved cipher suite (0xc02f), but it comes after", - }, - { - name: "bad after required", - tlsConfig: &tls.Config{ - CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_RSA_WITH_RC4_128_SHA}, - }, - }, - } - for _, tt := range tests { - srv := &http.Server{TLSConfig: tt.tlsConfig} - err := ConfigureServer(srv, nil) - if (err != nil) != (tt.wantErr != "") { - if tt.wantErr != "" { - t.Errorf("%s: success, but want error", tt.name) - } else { - t.Errorf("%s: unexpected error: %v", tt.name, err) - } - } - if err != nil && tt.wantErr != "" && !strings.Contains(err.Error(), tt.wantErr) { - t.Errorf("%s: err = %v; want substring %q", tt.name, err, tt.wantErr) - } - if err == nil && !srv.TLSConfig.PreferServerCipherSuites { - t.Errorf("%s: PreferServerCipherSuite is false; want true", tt.name) - } - } -} - -func TestServerRejectHeadWithBody(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - // No response body. - }) - defer st.Close() - st.greet() - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "HEAD"), - EndStream: false, // what we're testing, a bogus HEAD request with body - EndHeaders: true, - }) - st.wantRSTStream(1, ErrCodeProtocol) -} - -func TestServerNoAutoContentLengthOnHead(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - // No response body. (or smaller than one frame) - }) - defer st.Close() - st.greet() - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader(":method", "HEAD"), - EndStream: true, - EndHeaders: true, - }) - h := st.wantHeaders() - headers := st.decodeHeader(h.HeaderBlockFragment()) - want := [][2]string{ - {":status", "200"}, - } - if !reflect.DeepEqual(headers, want) { - t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) - } -} - -// golang.org/issue/13495 -func TestServerNoDuplicateContentType(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - w.Header()["Content-Type"] = []string{""} - fmt.Fprintf(w, "hi") - }) - defer st.Close() - st.greet() - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: true, - }) - h := st.wantHeaders() - headers := st.decodeHeader(h.HeaderBlockFragment()) - want := [][2]string{ - {":status", "200"}, - {"content-type", ""}, - {"content-length", "41"}, - } - if !reflect.DeepEqual(headers, want) { - t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) - } -} - -func disableGoroutineTracking() (restore func()) { - old := DebugGoroutines - DebugGoroutines = false - return func() { DebugGoroutines = old } -} - -func BenchmarkServer_GetRequest(b *testing.B) { - defer disableGoroutineTracking()() - b.ReportAllocs() - const msg = "Hello, world." - st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { - n, err := io.Copy(ioutil.Discard, r.Body) - if err != nil || n > 0 { - b.Errorf("Read %d bytes, error %v; want 0 bytes.", n, err) - } - io.WriteString(w, msg) - }) - defer st.Close() - - st.greet() - // Give the server quota to reply. (plus it has the 64KB) - if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { - b.Fatal(err) - } - hbf := st.encodeHeader(":method", "GET") - for i := 0; i < b.N; i++ { - streamID := uint32(1 + 2*i) - st.writeHeaders(HeadersFrameParam{ - StreamID: streamID, - BlockFragment: hbf, - EndStream: true, - EndHeaders: true, - }) - st.wantHeaders() - st.wantData() - } -} - -func BenchmarkServer_PostRequest(b *testing.B) { - defer disableGoroutineTracking()() - b.ReportAllocs() - const msg = "Hello, world." - st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { - n, err := io.Copy(ioutil.Discard, r.Body) - if err != nil || n > 0 { - b.Errorf("Read %d bytes, error %v; want 0 bytes.", n, err) - } - io.WriteString(w, msg) - }) - defer st.Close() - st.greet() - // Give the server quota to reply. (plus it has the 64KB) - if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { - b.Fatal(err) - } - hbf := st.encodeHeader(":method", "POST") - for i := 0; i < b.N; i++ { - streamID := uint32(1 + 2*i) - st.writeHeaders(HeadersFrameParam{ - StreamID: streamID, - BlockFragment: hbf, - EndStream: false, - EndHeaders: true, - }) - st.writeData(streamID, true, nil) - st.wantHeaders() - st.wantData() - } -} - -type connStateConn struct { - net.Conn - cs tls.ConnectionState -} - -func (c connStateConn) ConnectionState() tls.ConnectionState { return c.cs } - -// golang.org/issue/12737 -- handle any net.Conn, not just -// *tls.Conn. -func TestServerHandleCustomConn(t *testing.T) { - var s Server - c1, c2 := net.Pipe() - clientDone := make(chan struct{}) - handlerDone := make(chan struct{}) - var req *http.Request - go func() { - defer close(clientDone) - defer c2.Close() - fr := NewFramer(c2, c2) - io.WriteString(c2, ClientPreface) - fr.WriteSettings() - fr.WriteSettingsAck() - f, err := fr.ReadFrame() - if err != nil { - t.Error(err) - return - } - if sf, ok := f.(*SettingsFrame); !ok || sf.IsAck() { - t.Errorf("Got %v; want non-ACK SettingsFrame", summarizeFrame(f)) - return - } - f, err = fr.ReadFrame() - if err != nil { - t.Error(err) - return - } - if sf, ok := f.(*SettingsFrame); !ok || !sf.IsAck() { - t.Errorf("Got %v; want ACK SettingsFrame", summarizeFrame(f)) - return - } - var henc hpackEncoder - fr.WriteHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: henc.encodeHeaderRaw(t, ":method", "GET", ":path", "/", ":scheme", "https", ":authority", "foo.com"), - EndStream: true, - EndHeaders: true, - }) - go io.Copy(ioutil.Discard, c2) - <-handlerDone - }() - const testString = "my custom ConnectionState" - fakeConnState := tls.ConnectionState{ - ServerName: testString, - Version: tls.VersionTLS12, - CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - } - go s.ServeConn(connStateConn{c1, fakeConnState}, &ServeConnOpts{ - BaseConfig: &http.Server{ - Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - defer close(handlerDone) - req = r - }), - }}) - select { - case <-clientDone: - case <-time.After(5 * time.Second): - t.Fatal("timeout waiting for handler") - } - if req.TLS == nil { - t.Fatalf("Request.TLS is nil. Got: %#v", req) - } - if req.TLS.ServerName != testString { - t.Fatalf("Request.TLS = %+v; want ServerName of %q", req.TLS, testString) - } -} - -// golang.org/issue/14214 -func TestServer_Rejects_ConnHeaders(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - t.Error("should not get to Handler") - }) - defer st.Close() - st.greet() - st.bodylessReq1("connection", "foo") - hf := st.wantHeaders() - goth := st.decodeHeader(hf.HeaderBlockFragment()) - wanth := [][2]string{ - {":status", "400"}, - {"content-type", "text/plain; charset=utf-8"}, - {"x-content-type-options", "nosniff"}, - {"content-length", "51"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("Got headers %v; want %v", goth, wanth) - } -} - -type hpackEncoder struct { - enc *hpack.Encoder - buf bytes.Buffer -} - -func (he *hpackEncoder) encodeHeaderRaw(t *testing.T, headers ...string) []byte { - if len(headers)%2 == 1 { - panic("odd number of kv args") - } - he.buf.Reset() - if he.enc == nil { - he.enc = hpack.NewEncoder(&he.buf) - } - for len(headers) > 0 { - k, v := headers[0], headers[1] - err := he.enc.WriteField(hpack.HeaderField{Name: k, Value: v}) - if err != nil { - t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) - } - headers = headers[2:] - } - return he.buf.Bytes() -} - -func TestCheckValidHTTP2Request(t *testing.T) { - tests := []struct { - h http.Header - want error - }{ - { - h: http.Header{"Te": {"trailers"}}, - want: nil, - }, - { - h: http.Header{"Te": {"trailers", "bogus"}}, - want: errors.New(`request header "TE" may only be "trailers" in HTTP/2`), - }, - { - h: http.Header{"Foo": {""}}, - want: nil, - }, - { - h: http.Header{"Connection": {""}}, - want: errors.New(`request header "Connection" is not valid in HTTP/2`), - }, - { - h: http.Header{"Proxy-Connection": {""}}, - want: errors.New(`request header "Proxy-Connection" is not valid in HTTP/2`), - }, - { - h: http.Header{"Keep-Alive": {""}}, - want: errors.New(`request header "Keep-Alive" is not valid in HTTP/2`), - }, - { - h: http.Header{"Upgrade": {""}}, - want: errors.New(`request header "Upgrade" is not valid in HTTP/2`), - }, - } - for i, tt := range tests { - got := checkValidHTTP2RequestHeaders(tt.h) - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("%d. checkValidHTTP2Request = %v; want %v", i, got, tt.want) - } - } -} - -// golang.org/issue/14030 -func TestExpect100ContinueAfterHandlerWrites(t *testing.T) { - const msg = "Hello" - const msg2 = "World" - - doRead := make(chan bool, 1) - defer close(doRead) // fallback cleanup - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, msg) - w.(http.Flusher).Flush() - - // Do a read, which might force a 100-continue status to be sent. - <-doRead - r.Body.Read(make([]byte, 10)) - - io.WriteString(w, msg2) - - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - req, _ := http.NewRequest("POST", st.ts.URL, io.LimitReader(neverEnding('A'), 2<<20)) - req.Header.Set("Expect", "100-continue") - - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - - buf := make([]byte, len(msg)) - if _, err := io.ReadFull(res.Body, buf); err != nil { - t.Fatal(err) - } - if string(buf) != msg { - t.Fatalf("msg = %q; want %q", buf, msg) - } - - doRead <- true - - if _, err := io.ReadFull(res.Body, buf); err != nil { - t.Fatal(err) - } - if string(buf) != msg2 { - t.Fatalf("second msg = %q; want %q", buf, msg2) - } -} - -type funcReader func([]byte) (n int, err error) - -func (f funcReader) Read(p []byte) (n int, err error) { return f(p) } - -// golang.org/issue/16481 -- return flow control when streams close with unread data. -// (The Server version of the bug. See also TestUnreadFlowControlReturned_Transport) -func TestUnreadFlowControlReturned_Server(t *testing.T) { - unblock := make(chan bool, 1) - defer close(unblock) - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - // Don't read the 16KB request body. Wait until the client's - // done sending it and then return. This should cause the Server - // to then return those 16KB of flow control to the client. - <-unblock - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - // This previously hung on the 4th iteration. - for i := 0; i < 6; i++ { - body := io.MultiReader( - io.LimitReader(neverEnding('A'), 16<<10), - funcReader(func([]byte) (n int, err error) { - unblock <- true - return 0, io.EOF - }), - ) - req, _ := http.NewRequest("POST", st.ts.URL, body) - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - res.Body.Close() - } - -} - -func TestServerIdleTimeout(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - }, func(h2s *Server) { - h2s.IdleTimeout = 500 * time.Millisecond - }) - defer st.Close() - - st.greet() - ga := st.wantGoAway() - if ga.ErrCode != ErrCodeNo { - t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) - } -} - -func TestServerIdleTimeout_AfterRequest(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - const timeout = 250 * time.Millisecond - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - time.Sleep(timeout * 2) - }, func(h2s *Server) { - h2s.IdleTimeout = timeout - }) - defer st.Close() - - st.greet() - - // Send a request which takes twice the timeout. Verifies the - // idle timeout doesn't fire while we're in a request: - st.bodylessReq1() - st.wantHeaders() - - // But the idle timeout should be rearmed after the request - // is done: - ga := st.wantGoAway() - if ga.ErrCode != ErrCodeNo { - t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode) - } -} - -// grpc-go closes the Request.Body currently with a Read. -// Verify that it doesn't race. -// See https://github.com/grpc/grpc-go/pull/938 -func TestRequestBodyReadCloseRace(t *testing.T) { - for i := 0; i < 100; i++ { - body := &requestBody{ - pipe: &pipe{ - b: new(bytes.Buffer), - }, - } - body.pipe.CloseWithError(io.EOF) - - done := make(chan bool, 1) - buf := make([]byte, 10) - go func() { - time.Sleep(1 * time.Millisecond) - body.Close() - done <- true - }() - body.Read(buf) - <-done - } -} - -func TestIssue20704Race(t *testing.T) { - if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" { - t.Skip("skipping in short mode") - } - const ( - itemSize = 1 << 10 - itemCount = 100 - ) - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - for i := 0; i < itemCount; i++ { - _, err := w.Write(make([]byte, itemSize)) - if err != nil { - return - } - } - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - cl := &http.Client{Transport: tr} - - for i := 0; i < 1000; i++ { - resp, err := cl.Get(st.ts.URL) - if err != nil { - t.Fatal(err) - } - // Force a RST stream to the server by closing without - // reading the body: - resp.Body.Close() - } -} - -func TestServer_Rejects_TooSmall(t *testing.T) { - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - ioutil.ReadAll(r.Body) - return nil - }, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, // clients send odd numbers - BlockFragment: st.encodeHeader( - ":method", "POST", - "content-length", "4", - ), - EndStream: false, // to say DATA frames are coming - EndHeaders: true, - }) - st.writeData(1, true, []byte("12345")) - - st.wantRSTStream(1, ErrCodeProtocol) - }) -} - -// Tests that a handler setting "Connection: close" results in a GOAWAY being sent, -// and the connection still completing. -func TestServerHandlerConnectionClose(t *testing.T) { - unblockHandler := make(chan bool, 1) - defer close(unblockHandler) // backup; in case of errors - testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { - w.Header().Set("Connection", "close") - w.Header().Set("Foo", "bar") - w.(http.Flusher).Flush() - <-unblockHandler - return nil - }, func(st *serverTester) { - st.writeHeaders(HeadersFrameParam{ - StreamID: 1, - BlockFragment: st.encodeHeader(), - EndStream: true, - EndHeaders: true, - }) - var sawGoAway bool - var sawRes bool - for { - f, err := st.readFrame() - if err == io.EOF { - break - } - if err != nil { - t.Fatal(err) - } - switch f := f.(type) { - case *GoAwayFrame: - sawGoAway = true - unblockHandler <- true - if f.LastStreamID != 1 || f.ErrCode != ErrCodeNo { - t.Errorf("unexpected GOAWAY frame: %v", summarizeFrame(f)) - } - case *HeadersFrame: - goth := st.decodeHeader(f.HeaderBlockFragment()) - if !sawGoAway { - t.Fatalf("unexpected Headers frame before GOAWAY: %s, %v", summarizeFrame(f), goth) - } - wanth := [][2]string{ - {":status", "200"}, - {"foo", "bar"}, - } - if !reflect.DeepEqual(goth, wanth) { - t.Errorf("got headers %v; want %v", goth, wanth) - } - sawRes = true - case *DataFrame: - if f.StreamID != 1 || !f.StreamEnded() || len(f.Data()) != 0 { - t.Errorf("unexpected DATA frame: %v", summarizeFrame(f)) - } - default: - t.Logf("unexpected frame: %v", summarizeFrame(f)) - } - } - if !sawRes { - t.Errorf("didn't see response") - } - }) -} diff --git a/deps/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml b/deps/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml deleted file mode 100644 index 31a84bed4..000000000 --- a/deps/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml +++ /dev/null @@ -1,5021 +0,0 @@ - - - - - - - - - - - - - - - - - - - Hypertext Transfer Protocol version 2 - - - Twist -
    - mbelshe@chromium.org -
    -
    - - - Google, Inc -
    - fenix@google.com -
    -
    - - - Mozilla -
    - - 331 E Evelyn Street - Mountain View - CA - 94041 - US - - martin.thomson@gmail.com -
    -
    - - - Applications - HTTPbis - HTTP - SPDY - Web - - - - This specification describes an optimized expression of the semantics of the Hypertext - Transfer Protocol (HTTP). HTTP/2 enables a more efficient use of network resources and a - reduced perception of latency by introducing header field compression and allowing multiple - concurrent messages on the same connection. It also introduces unsolicited push of - representations from servers to clients. - - - This specification is an alternative to, but does not obsolete, the HTTP/1.1 message syntax. - HTTP's existing semantics remain unchanged. - - - - - - Discussion of this draft takes place on the HTTPBIS working group mailing list - (ietf-http-wg@w3.org), which is archived at . - - - Working Group information can be found at ; that specific to HTTP/2 are at . - - - The changes in this draft are summarized in . - - - -
    - - -
    - - - The Hypertext Transfer Protocol (HTTP) is a wildly successful protocol. However, the - HTTP/1.1 message format () has - several characteristics that have a negative overall effect on application performance - today. - - - In particular, HTTP/1.0 allowed only one request to be outstanding at a time on a given - TCP connection. HTTP/1.1 added request pipelining, but this only partially addressed - request concurrency and still suffers from head-of-line blocking. Therefore, HTTP/1.1 - clients that need to make many requests typically use multiple connections to a server in - order to achieve concurrency and thereby reduce latency. - - - Furthermore, HTTP header fields are often repetitive and verbose, causing unnecessary - network traffic, as well as causing the initial TCP congestion - window to quickly fill. This can result in excessive latency when multiple requests are - made on a new TCP connection. - - - HTTP/2 addresses these issues by defining an optimized mapping of HTTP's semantics to an - underlying connection. Specifically, it allows interleaving of request and response - messages on the same connection and uses an efficient coding for HTTP header fields. It - also allows prioritization of requests, letting more important requests complete more - quickly, further improving performance. - - - The resulting protocol is more friendly to the network, because fewer TCP connections can - be used in comparison to HTTP/1.x. This means less competition with other flows, and - longer-lived connections, which in turn leads to better utilization of available network - capacity. - - - Finally, HTTP/2 also enables more efficient processing of messages through use of binary - message framing. - -
    - -
    - - HTTP/2 provides an optimized transport for HTTP semantics. HTTP/2 supports all of the core - features of HTTP/1.1, but aims to be more efficient in several ways. - - - The basic protocol unit in HTTP/2 is a frame. Each frame - type serves a different purpose. For example, HEADERS and - DATA frames form the basis of HTTP requests and - responses; other frame types like SETTINGS, - WINDOW_UPDATE, and PUSH_PROMISE are used in support of other - HTTP/2 features. - - - Multiplexing of requests is achieved by having each HTTP request-response exchange - associated with its own stream. Streams are largely - independent of each other, so a blocked or stalled request or response does not prevent - progress on other streams. - - - Flow control and prioritization ensure that it is possible to efficiently use multiplexed - streams. Flow control helps to ensure that only data that - can be used by a receiver is transmitted. Prioritization ensures that limited resources can be directed - to the most important streams first. - - - HTTP/2 adds a new interaction mode, whereby a server can push - responses to a client. Server push allows a server to speculatively send a client - data that the server anticipates the client will need, trading off some network usage - against a potential latency gain. The server does this by synthesizing a request, which it - sends as a PUSH_PROMISE frame. The server is then able to send a response to - the synthetic request on a separate stream. - - - Frames that contain HTTP header fields are compressed. - HTTP requests can be highly redundant, so compression can reduce the size of requests and - responses significantly. - - -
    - - The HTTP/2 specification is split into four parts: - - - Starting HTTP/2 covers how an HTTP/2 connection is - initiated. - - - The framing and streams layers describe the way HTTP/2 frames are - structured and formed into multiplexed streams. - - - Frame and error - definitions include details of the frame and error types used in HTTP/2. - - - HTTP mappings and additional - requirements describe how HTTP semantics are expressed using frames and - streams. - - - - - While some of the frame and stream layer concepts are isolated from HTTP, this - specification does not define a completely generic framing layer. The framing and streams - layers are tailored to the needs of the HTTP protocol and server push. - -
    - -
    - - The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD - NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as - described in RFC 2119. - - - All numeric values are in network byte order. Values are unsigned unless otherwise - indicated. Literal values are provided in decimal or hexadecimal as appropriate. - Hexadecimal literals are prefixed with 0x to distinguish them - from decimal literals. - - - The following terms are used: - - - The endpoint initiating the HTTP/2 connection. - - - A transport-layer connection between two endpoints. - - - An error that affects the entire HTTP/2 connection. - - - Either the client or server of the connection. - - - The smallest unit of communication within an HTTP/2 connection, consisting of a header - and a variable-length sequence of octets structured according to the frame type. - - - An endpoint. When discussing a particular endpoint, "peer" refers to the endpoint - that is remote to the primary subject of discussion. - - - An endpoint that is receiving frames. - - - An endpoint that is transmitting frames. - - - The endpoint which did not initiate the HTTP/2 connection. - - - A bi-directional flow of frames across a virtual channel within the HTTP/2 connection. - - - An error on the individual HTTP/2 stream. - - - - - Finally, the terms "gateway", "intermediary", "proxy", and "tunnel" are defined - in . - -
    -
    - -
    - - An HTTP/2 connection is an application layer protocol running on top of a TCP connection - (). The client is the TCP connection initiator. - - - HTTP/2 uses the same "http" and "https" URI schemes used by HTTP/1.1. HTTP/2 shares the same - default port numbers: 80 for "http" URIs and 443 for "https" URIs. As a result, - implementations processing requests for target resource URIs like http://example.org/foo or https://example.com/bar are required to first discover whether the - upstream server (the immediate peer to which the client wishes to establish a connection) - supports HTTP/2. - - - - The means by which support for HTTP/2 is determined is different for "http" and "https" - URIs. Discovery for "http" URIs is described in . Discovery - for "https" URIs is described in . - - -
    - - The protocol defined in this document has two identifiers. - - - - The string "h2" identifies the protocol where HTTP/2 uses TLS. This identifier is used in the TLS application layer protocol negotiation extension (ALPN) - field and any place that HTTP/2 over TLS is identified. - - - The "h2" string is serialized into an ALPN protocol identifier as the two octet - sequence: 0x68, 0x32. - - - - - The string "h2c" identifies the protocol where HTTP/2 is run over cleartext TCP. - This identifier is used in the HTTP/1.1 Upgrade header field and any place that - HTTP/2 over TCP is identified. - - - - - - Negotiating "h2" or "h2c" implies the use of the transport, security, framing and message - semantics described in this document. - - - RFC Editor's Note: please remove the remainder of this section prior to the - publication of a final version of this document. - - - Only implementations of the final, published RFC can identify themselves as "h2" or "h2c". - Until such an RFC exists, implementations MUST NOT identify themselves using these - strings. - - - Examples and text throughout the rest of this document use "h2" as a matter of - editorial convenience only. Implementations of draft versions MUST NOT identify using - this string. - - - Implementations of draft versions of the protocol MUST add the string "-" and the - corresponding draft number to the identifier. For example, draft-ietf-httpbis-http2-11 - over TLS is identified using the string "h2-11". - - - Non-compatible experiments that are based on these draft versions MUST append the string - "-" and an experiment name to the identifier. For example, an experimental implementation - of packet mood-based encoding based on draft-ietf-httpbis-http2-09 might identify itself - as "h2-09-emo". Note that any label MUST conform to the "token" syntax defined in - . Experimenters are - encouraged to coordinate their experiments on the ietf-http-wg@w3.org mailing list. - -
    - -
    - - A client that makes a request for an "http" URI without prior knowledge about support for - HTTP/2 uses the HTTP Upgrade mechanism (). The client makes an HTTP/1.1 request that includes an Upgrade - header field identifying HTTP/2 with the "h2c" token. The HTTP/1.1 request MUST include - exactly one HTTP2-Settings header field. - -
    - For example: - - -]]> -
    - - Requests that contain an entity body MUST be sent in their entirety before the client can - send HTTP/2 frames. This means that a large request entity can block the use of the - connection until it is completely sent. - - - If concurrency of an initial request with subsequent requests is important, an OPTIONS - request can be used to perform the upgrade to HTTP/2, at the cost of an additional - round-trip. - - - A server that does not support HTTP/2 can respond to the request as though the Upgrade - header field were absent: - -
    - -HTTP/1.1 200 OK -Content-Length: 243 -Content-Type: text/html - -... - -
    - - A server MUST ignore a "h2" token in an Upgrade header field. Presence of a token with - "h2" implies HTTP/2 over TLS, which is instead negotiated as described in . - - - A server that supports HTTP/2 can accept the upgrade with a 101 (Switching Protocols) - response. After the empty line that terminates the 101 response, the server can begin - sending HTTP/2 frames. These frames MUST include a response to the request that initiated - the Upgrade. - - -
    - - For example: - - -HTTP/1.1 101 Switching Protocols -Connection: Upgrade -Upgrade: h2c - -[ HTTP/2 connection ... - -
    - - The first HTTP/2 frame sent by the server is a SETTINGS frame () as the server connection preface (). Upon receiving the 101 response, the client sends a connection preface, which includes a - SETTINGS frame. - - - The HTTP/1.1 request that is sent prior to upgrade is assigned stream identifier 1 and is - assigned default priority values. Stream 1 is - implicitly half closed from the client toward the server, since the request is completed - as an HTTP/1.1 request. After commencing the HTTP/2 connection, stream 1 is used for the - response. - - -
    - - A request that upgrades from HTTP/1.1 to HTTP/2 MUST include exactly one HTTP2-Settings header field. The HTTP2-Settings header field is a connection-specific header field - that includes parameters that govern the HTTP/2 connection, provided in anticipation of - the server accepting the request to upgrade. - -
    - -
    - - A server MUST NOT upgrade the connection to HTTP/2 if this header field is not present, - or if more than one is present. A server MUST NOT send this header field. - - - - The content of the HTTP2-Settings header field is the - payload of a SETTINGS frame (), encoded as a - base64url string (that is, the URL- and filename-safe Base64 encoding described in , with any trailing '=' characters omitted). The - ABNF production for token68 is - defined in . - - - Since the upgrade is only intended to apply to the immediate connection, a client - sending HTTP2-Settings MUST also send HTTP2-Settings as a connection option in the Connection header field to prevent it from being forwarded - downstream. - - - A server decodes and interprets these values as it would any other - SETTINGS frame. Acknowledgement of the - SETTINGS parameters is not necessary, since a 101 response serves as implicit - acknowledgment. Providing these values in the Upgrade request gives a client an - opportunity to provide parameters prior to receiving any frames from the server. - -
    -
    - -
    - - A client that makes a request to an "https" URI uses TLS - with the application layer protocol negotiation extension. - - - HTTP/2 over TLS uses the "h2" application token. The "h2c" token MUST NOT be sent by a - client or selected by a server. - - - Once TLS negotiation is complete, both the client and the server send a connection preface. - -
    - -
    - - A client can learn that a particular server supports HTTP/2 by other means. For example, - describes a mechanism for advertising this capability. - - - A client MAY immediately send HTTP/2 frames to a server that is known to support HTTP/2, - after the connection preface; a server can - identify such a connection by the presence of the connection preface. This only affects - the establishment of HTTP/2 connections over cleartext TCP; implementations that support - HTTP/2 over TLS MUST use protocol negotiation in TLS. - - - Without additional information, prior support for HTTP/2 is not a strong signal that a - given server will support HTTP/2 for future connections. For example, it is possible for - server configurations to change, for configurations to differ between instances in - clustered servers, or for network conditions to change. - -
    - -
    - - Upon establishment of a TCP connection and determination that HTTP/2 will be used by both - peers, each endpoint MUST send a connection preface as a final confirmation and to - establish the initial SETTINGS parameters for the HTTP/2 connection. The client and - server each send a different connection preface. - - - The client connection preface starts with a sequence of 24 octets, which in hex notation - are: - -
    - -
    - - (the string PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n). This sequence - is followed by a SETTINGS frame (). The - SETTINGS frame MAY be empty. The client sends the client connection - preface immediately upon receipt of a 101 Switching Protocols response (indicating a - successful upgrade), or as the first application data octets of a TLS connection. If - starting an HTTP/2 connection with prior knowledge of server support for the protocol, the - client connection preface is sent upon connection establishment. - - - - - The client connection preface is selected so that a large proportion of HTTP/1.1 or - HTTP/1.0 servers and intermediaries do not attempt to process further frames. Note - that this does not address the concerns raised in . - - - - - The server connection preface consists of a potentially empty SETTINGS - frame () that MUST be the first frame the server sends in the - HTTP/2 connection. - - - The SETTINGS frames received from a peer as part of the connection preface - MUST be acknowledged (see ) after sending the connection - preface. - - - To avoid unnecessary latency, clients are permitted to send additional frames to the - server immediately after sending the client connection preface, without waiting to receive - the server connection preface. It is important to note, however, that the server - connection preface SETTINGS frame might include parameters that necessarily - alter how a client is expected to communicate with the server. Upon receiving the - SETTINGS frame, the client is expected to honor any parameters established. - In some configurations, it is possible for the server to transmit SETTINGS - before the client sends additional frames, providing an opportunity to avoid this issue. - - - Clients and servers MUST treat an invalid connection preface as a connection error of type - PROTOCOL_ERROR. A GOAWAY frame () - MAY be omitted in this case, since an invalid preface indicates that the peer is not using - HTTP/2. - -
    -
    - -
    - - Once the HTTP/2 connection is established, endpoints can begin exchanging frames. - - -
    - - All frames begin with a fixed 9-octet header followed by a variable-length payload. - -
    - -
    - - The fields of the frame header are defined as: - - - - The length of the frame payload expressed as an unsigned 24-bit integer. Values - greater than 214 (16,384) MUST NOT be sent unless the receiver has - set a larger value for SETTINGS_MAX_FRAME_SIZE. - - - The 9 octets of the frame header are not included in this value. - - - - - The 8-bit type of the frame. The frame type determines the format and semantics of - the frame. Implementations MUST ignore and discard any frame that has a type that - is unknown. - - - - - An 8-bit field reserved for frame-type specific boolean flags. - - - Flags are assigned semantics specific to the indicated frame type. Flags that have - no defined semantics for a particular frame type MUST be ignored, and MUST be left - unset (0) when sending. - - - - - A reserved 1-bit field. The semantics of this bit are undefined and the bit MUST - remain unset (0) when sending and MUST be ignored when receiving. - - - - - A 31-bit stream identifier (see ). The value 0 is - reserved for frames that are associated with the connection as a whole as opposed to - an individual stream. - - - - - - The structure and content of the frame payload is dependent entirely on the frame type. - -
    - -
    - - The size of a frame payload is limited by the maximum size that a receiver advertises in - the SETTINGS_MAX_FRAME_SIZE setting. This setting can have any value - between 214 (16,384) and 224-1 (16,777,215) octets, - inclusive. - - - All implementations MUST be capable of receiving and minimally processing frames up to - 214 octets in length, plus the 9 octet frame - header. The size of the frame header is not included when describing frame sizes. - - - Certain frame types, such as PING, impose additional limits - on the amount of payload data allowed. - - - - - If a frame size exceeds any defined limit, or is too small to contain mandatory frame - data, the endpoint MUST send a FRAME_SIZE_ERROR error. A frame size error - in a frame that could alter the state of the entire connection MUST be treated as a connection error; this includes any frame carrying - a header block (that is, HEADERS, - PUSH_PROMISE, and CONTINUATION), SETTINGS, - and any WINDOW_UPDATE frame with a stream identifier of 0. - - - Endpoints are not obligated to use all available space in a frame. Responsiveness can be - improved by using frames that are smaller than the permitted maximum size. Sending large - frames can result in delays in sending time-sensitive frames (such - RST_STREAM, WINDOW_UPDATE, or PRIORITY) - which if blocked by the transmission of a large frame, could affect performance. - -
    - -
    - - Just as in HTTP/1, a header field in HTTP/2 is a name with one or more associated values. - They are used within HTTP request and response messages as well as server push operations - (see ). - - - Header lists are collections of zero or more header fields. When transmitted over a - connection, a header list is serialized into a header block using HTTP Header Compression. The serialized header block is then - divided into one or more octet sequences, called header block fragments, and transmitted - within the payload of HEADERS, PUSH_PROMISE or CONTINUATION frames. - - - The Cookie header field is treated specially by the HTTP - mapping (see ). - - - A receiving endpoint reassembles the header block by concatenating its fragments, then - decompresses the block to reconstruct the header list. - - - A complete header block consists of either: - - - a single HEADERS or PUSH_PROMISE frame, - with the END_HEADERS flag set, or - - - a HEADERS or PUSH_PROMISE frame with the END_HEADERS - flag cleared and one or more CONTINUATION frames, - where the last CONTINUATION frame has the END_HEADERS flag set. - - - - - Header compression is stateful. One compression context and one decompression context is - used for the entire connection. Each header block is processed as a discrete unit. - Header blocks MUST be transmitted as a contiguous sequence of frames, with no interleaved - frames of any other type or from any other stream. The last frame in a sequence of - HEADERS or CONTINUATION frames MUST have the END_HEADERS - flag set. The last frame in a sequence of PUSH_PROMISE or - CONTINUATION frames MUST have the END_HEADERS flag set. This allows a - header block to be logically equivalent to a single frame. - - - Header block fragments can only be sent as the payload of HEADERS, - PUSH_PROMISE or CONTINUATION frames, because these frames - carry data that can modify the compression context maintained by a receiver. An endpoint - receiving HEADERS, PUSH_PROMISE or - CONTINUATION frames MUST reassemble header blocks and perform decompression - even if the frames are to be discarded. A receiver MUST terminate the connection with a - connection error of type - COMPRESSION_ERROR if it does not decompress a header block. - -
    -
    - -
    - - A "stream" is an independent, bi-directional sequence of frames exchanged between the client - and server within an HTTP/2 connection. Streams have several important characteristics: - - - A single HTTP/2 connection can contain multiple concurrently open streams, with either - endpoint interleaving frames from multiple streams. - - - Streams can be established and used unilaterally or shared by either the client or - server. - - - Streams can be closed by either endpoint. - - - The order in which frames are sent on a stream is significant. Recipients process frames - in the order they are received. In particular, the order of HEADERS, - and DATA frames is semantically significant. - - - Streams are identified by an integer. Stream identifiers are assigned to streams by the - endpoint initiating the stream. - - - - -
    - - The lifecycle of a stream is shown in . - - -
    - - | |<-----------' | - | R | closed | R | - `-------------------->| |<--------------------' - +--------+ - - H: HEADERS frame (with implied CONTINUATIONs) - PP: PUSH_PROMISE frame (with implied CONTINUATIONs) - ES: END_STREAM flag - R: RST_STREAM frame -]]> - -
    - - - Note that this diagram shows stream state transitions and the frames and flags that affect - those transitions only. In this regard, CONTINUATION frames do not result - in state transitions; they are effectively part of the HEADERS or - PUSH_PROMISE that they follow. For this purpose, the END_STREAM flag is - processed as a separate event to the frame that bears it; a HEADERS frame - with the END_STREAM flag set can cause two state transitions. - - - Both endpoints have a subjective view of the state of a stream that could be different - when frames are in transit. Endpoints do not coordinate the creation of streams; they are - created unilaterally by either endpoint. The negative consequences of a mismatch in - states are limited to the "closed" state after sending RST_STREAM, where - frames might be received for some time after closing. - - - Streams have the following states: - - - - - - All streams start in the "idle" state. In this state, no frames have been - exchanged. - - - The following transitions are valid from this state: - - - Sending or receiving a HEADERS frame causes the stream to become - "open". The stream identifier is selected as described in . The same HEADERS frame can also - cause a stream to immediately become "half closed". - - - Sending a PUSH_PROMISE frame marks the associated stream for - later use. The stream state for the reserved stream transitions to "reserved - (local)". - - - Receiving a PUSH_PROMISE frame marks the associated stream as - reserved by the remote peer. The state of the stream becomes "reserved - (remote)". - - - - - Receiving any frames other than HEADERS or - PUSH_PROMISE on a stream in this state MUST be treated as a connection error of type - PROTOCOL_ERROR. - - - - - - - A stream in the "reserved (local)" state is one that has been promised by sending a - PUSH_PROMISE frame. A PUSH_PROMISE frame reserves an - idle stream by associating the stream with an open stream that was initiated by the - remote peer (see ). - - - In this state, only the following transitions are possible: - - - The endpoint can send a HEADERS frame. This causes the stream to - open in a "half closed (remote)" state. - - - Either endpoint can send a RST_STREAM frame to cause the stream - to become "closed". This releases the stream reservation. - - - - - An endpoint MUST NOT send any type of frame other than HEADERS or - RST_STREAM in this state. - - - A PRIORITY frame MAY be received in this state. Receiving any type - of frame other than RST_STREAM or PRIORITY on a stream - in this state MUST be treated as a connection - error of type PROTOCOL_ERROR. - - - - - - - A stream in the "reserved (remote)" state has been reserved by a remote peer. - - - In this state, only the following transitions are possible: - - - Receiving a HEADERS frame causes the stream to transition to - "half closed (local)". - - - Either endpoint can send a RST_STREAM frame to cause the stream - to become "closed". This releases the stream reservation. - - - - - An endpoint MAY send a PRIORITY frame in this state to reprioritize - the reserved stream. An endpoint MUST NOT send any type of frame other than - RST_STREAM, WINDOW_UPDATE, or PRIORITY - in this state. - - - Receiving any type of frame other than HEADERS or - RST_STREAM on a stream in this state MUST be treated as a connection error of type - PROTOCOL_ERROR. - - - - - - - A stream in the "open" state may be used by both peers to send frames of any type. - In this state, sending peers observe advertised stream - level flow control limits. - - - From this state either endpoint can send a frame with an END_STREAM flag set, which - causes the stream to transition into one of the "half closed" states: an endpoint - sending an END_STREAM flag causes the stream state to become "half closed (local)"; - an endpoint receiving an END_STREAM flag causes the stream state to become "half - closed (remote)". - - - Either endpoint can send a RST_STREAM frame from this state, causing - it to transition immediately to "closed". - - - - - - - A stream that is in the "half closed (local)" state cannot be used for sending - frames. Only WINDOW_UPDATE, PRIORITY and - RST_STREAM frames can be sent in this state. - - - A stream transitions from this state to "closed" when a frame that contains an - END_STREAM flag is received, or when either peer sends a RST_STREAM - frame. - - - A receiver can ignore WINDOW_UPDATE frames in this state, which might - arrive for a short period after a frame bearing the END_STREAM flag is sent. - - - PRIORITY frames received in this state are used to reprioritize - streams that depend on the current stream. - - - - - - - A stream that is "half closed (remote)" is no longer being used by the peer to send - frames. In this state, an endpoint is no longer obligated to maintain a receiver - flow control window if it performs flow control. - - - If an endpoint receives additional frames for a stream that is in this state, other - than WINDOW_UPDATE, PRIORITY or - RST_STREAM, it MUST respond with a stream error of type - STREAM_CLOSED. - - - A stream that is "half closed (remote)" can be used by the endpoint to send frames - of any type. In this state, the endpoint continues to observe advertised stream level flow control limits. - - - A stream can transition from this state to "closed" by sending a frame that contains - an END_STREAM flag, or when either peer sends a RST_STREAM frame. - - - - - - - The "closed" state is the terminal state. - - - An endpoint MUST NOT send frames other than PRIORITY on a closed - stream. An endpoint that receives any frame other than PRIORITY - after receiving a RST_STREAM MUST treat that as a stream error of type - STREAM_CLOSED. Similarly, an endpoint that receives any frames after - receiving a frame with the END_STREAM flag set MUST treat that as a connection error of type - STREAM_CLOSED, unless the frame is permitted as described below. - - - WINDOW_UPDATE or RST_STREAM frames can be received in - this state for a short period after a DATA or HEADERS - frame containing an END_STREAM flag is sent. Until the remote peer receives and - processes RST_STREAM or the frame bearing the END_STREAM flag, it - might send frames of these types. Endpoints MUST ignore - WINDOW_UPDATE or RST_STREAM frames received in this - state, though endpoints MAY choose to treat frames that arrive a significant time - after sending END_STREAM as a connection - error of type PROTOCOL_ERROR. - - - PRIORITY frames can be sent on closed streams to prioritize streams - that are dependent on the closed stream. Endpoints SHOULD process - PRIORITY frame, though they can be ignored if the stream has been - removed from the dependency tree (see ). - - - If this state is reached as a result of sending a RST_STREAM frame, - the peer that receives the RST_STREAM might have already sent - or - enqueued for sending - frames on the stream that cannot be withdrawn. An endpoint - MUST ignore frames that it receives on closed streams after it has sent a - RST_STREAM frame. An endpoint MAY choose to limit the period over - which it ignores frames and treat frames that arrive after this time as being in - error. - - - Flow controlled frames (i.e., DATA) received after sending - RST_STREAM are counted toward the connection flow control window. - Even though these frames might be ignored, because they are sent before the sender - receives the RST_STREAM, the sender will consider the frames to count - against the flow control window. - - - An endpoint might receive a PUSH_PROMISE frame after it sends - RST_STREAM. PUSH_PROMISE causes a stream to become - "reserved" even if the associated stream has been reset. Therefore, a - RST_STREAM is needed to close an unwanted promised stream. - - - - - - In the absence of more specific guidance elsewhere in this document, implementations - SHOULD treat the receipt of a frame that is not expressly permitted in the description of - a state as a connection error of type - PROTOCOL_ERROR. Frame of unknown types are ignored. - - - An example of the state transitions for an HTTP request/response exchange can be found in - . An example of the state transitions for server push can be - found in and . - - -
    - - Streams are identified with an unsigned 31-bit integer. Streams initiated by a client - MUST use odd-numbered stream identifiers; those initiated by the server MUST use - even-numbered stream identifiers. A stream identifier of zero (0x0) is used for - connection control messages; the stream identifier zero cannot be used to establish a - new stream. - - - HTTP/1.1 requests that are upgraded to HTTP/2 (see ) are - responded to with a stream identifier of one (0x1). After the upgrade - completes, stream 0x1 is "half closed (local)" to the client. Therefore, stream 0x1 - cannot be selected as a new stream identifier by a client that upgrades from HTTP/1.1. - - - The identifier of a newly established stream MUST be numerically greater than all - streams that the initiating endpoint has opened or reserved. This governs streams that - are opened using a HEADERS frame and streams that are reserved using - PUSH_PROMISE. An endpoint that receives an unexpected stream identifier - MUST respond with a connection error of - type PROTOCOL_ERROR. - - - The first use of a new stream identifier implicitly closes all streams in the "idle" - state that might have been initiated by that peer with a lower-valued stream identifier. - For example, if a client sends a HEADERS frame on stream 7 without ever - sending a frame on stream 5, then stream 5 transitions to the "closed" state when the - first frame for stream 7 is sent or received. - - - Stream identifiers cannot be reused. Long-lived connections can result in an endpoint - exhausting the available range of stream identifiers. A client that is unable to - establish a new stream identifier can establish a new connection for new streams. A - server that is unable to establish a new stream identifier can send a - GOAWAY frame so that the client is forced to open a new connection for - new streams. - -
    - -
    - - A peer can limit the number of concurrently active streams using the - SETTINGS_MAX_CONCURRENT_STREAMS parameter (see ) within a SETTINGS frame. The maximum concurrent - streams setting is specific to each endpoint and applies only to the peer that receives - the setting. That is, clients specify the maximum number of concurrent streams the - server can initiate, and servers specify the maximum number of concurrent streams the - client can initiate. - - - Streams that are in the "open" state, or either of the "half closed" states count toward - the maximum number of streams that an endpoint is permitted to open. Streams in any of - these three states count toward the limit advertised in the - SETTINGS_MAX_CONCURRENT_STREAMS setting. Streams in either of the - "reserved" states do not count toward the stream limit. - - - Endpoints MUST NOT exceed the limit set by their peer. An endpoint that receives a - HEADERS frame that causes their advertised concurrent stream limit to be - exceeded MUST treat this as a stream error. An - endpoint that wishes to reduce the value of - SETTINGS_MAX_CONCURRENT_STREAMS to a value that is below the current - number of open streams can either close streams that exceed the new value or allow - streams to complete. - -
    -
    - -
    - - Using streams for multiplexing introduces contention over use of the TCP connection, - resulting in blocked streams. A flow control scheme ensures that streams on the same - connection do not destructively interfere with each other. Flow control is used for both - individual streams and for the connection as a whole. - - - HTTP/2 provides for flow control through use of the WINDOW_UPDATE frame. - - -
    - - HTTP/2 stream flow control aims to allow a variety of flow control algorithms to be - used without requiring protocol changes. Flow control in HTTP/2 has the following - characteristics: - - - Flow control is specific to a connection; i.e., it is "hop-by-hop", not - "end-to-end". - - - Flow control is based on window update frames. Receivers advertise how many octets - they are prepared to receive on a stream and for the entire connection. This is a - credit-based scheme. - - - Flow control is directional with overall control provided by the receiver. A - receiver MAY choose to set any window size that it desires for each stream and for - the entire connection. A sender MUST respect flow control limits imposed by a - receiver. Clients, servers and intermediaries all independently advertise their - flow control window as a receiver and abide by the flow control limits set by - their peer when sending. - - - The initial value for the flow control window is 65,535 octets for both new streams - and the overall connection. - - - The frame type determines whether flow control applies to a frame. Of the frames - specified in this document, only DATA frames are subject to flow - control; all other frame types do not consume space in the advertised flow control - window. This ensures that important control frames are not blocked by flow control. - - - Flow control cannot be disabled. - - - HTTP/2 defines only the format and semantics of the WINDOW_UPDATE - frame (). This document does not stipulate how a - receiver decides when to send this frame or the value that it sends, nor does it - specify how a sender chooses to send packets. Implementations are able to select - any algorithm that suits their needs. - - - - - Implementations are also responsible for managing how requests and responses are sent - based on priority; choosing how to avoid head of line blocking for requests; and - managing the creation of new streams. Algorithm choices for these could interact with - any flow control algorithm. - -
    - -
    - - Flow control is defined to protect endpoints that are operating under resource - constraints. For example, a proxy needs to share memory between many connections, and - also might have a slow upstream connection and a fast downstream one. Flow control - addresses cases where the receiver is unable process data on one stream, yet wants to - continue to process other streams in the same connection. - - - Deployments that do not require this capability can advertise a flow control window of - the maximum size, incrementing the available space when new data is received. This - effectively disables flow control for that receiver. Conversely, a sender is always - subject to the flow control window advertised by the receiver. - - - Deployments with constrained resources (for example, memory) can employ flow control to - limit the amount of memory a peer can consume. Note, however, that this can lead to - suboptimal use of available network resources if flow control is enabled without - knowledge of the bandwidth-delay product (see ). - - - Even with full awareness of the current bandwidth-delay product, implementation of flow - control can be difficult. When using flow control, the receiver MUST read from the TCP - receive buffer in a timely fashion. Failure to do so could lead to a deadlock when - critical frames, such as WINDOW_UPDATE, are not read and acted upon. - -
    -
    - -
    - - A client can assign a priority for a new stream by including prioritization information in - the HEADERS frame that opens the stream. For an existing - stream, the PRIORITY frame can be used to change the - priority. - - - The purpose of prioritization is to allow an endpoint to express how it would prefer its - peer allocate resources when managing concurrent streams. Most importantly, priority can - be used to select streams for transmitting frames when there is limited capacity for - sending. - - - Streams can be prioritized by marking them as dependent on the completion of other streams - (). Each dependency is assigned a relative weight, a number - that is used to determine the relative proportion of available resources that are assigned - to streams dependent on the same stream. - - - - Explicitly setting the priority for a stream is input to a prioritization process. It - does not guarantee any particular processing or transmission order for the stream relative - to any other stream. An endpoint cannot force a peer to process concurrent streams in a - particular order using priority. Expressing priority is therefore only ever a suggestion. - - - Providing prioritization information is optional, so default values are used if no - explicit indicator is provided (). - - -
    - - Each stream can be given an explicit dependency on another stream. Including a - dependency expresses a preference to allocate resources to the identified stream rather - than to the dependent stream. - - - A stream that is not dependent on any other stream is given a stream dependency of 0x0. - In other words, the non-existent stream 0 forms the root of the tree. - - - A stream that depends on another stream is a dependent stream. The stream upon which a - stream is dependent is a parent stream. A dependency on a stream that is not currently - in the tree - such as a stream in the "idle" state - results in that stream being given - a default priority. - - - When assigning a dependency on another stream, the stream is added as a new dependency - of the parent stream. Dependent streams that share the same parent are not ordered with - respect to each other. For example, if streams B and C are dependent on stream A, and - if stream D is created with a dependency on stream A, this results in a dependency order - of A followed by B, C, and D in any order. - -
    - /|\ - B C B D C -]]> -
    - - An exclusive flag allows for the insertion of a new level of dependencies. The - exclusive flag causes the stream to become the sole dependency of its parent stream, - causing other dependencies to become dependent on the exclusive stream. In the - previous example, if stream D is created with an exclusive dependency on stream A, this - results in D becoming the dependency parent of B and C. - -
    - D - B C / \ - B C -]]> -
    - - Inside the dependency tree, a dependent stream SHOULD only be allocated resources if all - of the streams that it depends on (the chain of parent streams up to 0x0) are either - closed, or it is not possible to make progress on them. - - - A stream cannot depend on itself. An endpoint MUST treat this as a stream error of type PROTOCOL_ERROR. - -
    - -
    - - All dependent streams are allocated an integer weight between 1 and 256 (inclusive). - - - Streams with the same parent SHOULD be allocated resources proportionally based on their - weight. Thus, if stream B depends on stream A with weight 4, and C depends on stream A - with weight 12, and if no progress can be made on A, stream B ideally receives one third - of the resources allocated to stream C. - -
    - -
    - - Stream priorities are changed using the PRIORITY frame. Setting a - dependency causes a stream to become dependent on the identified parent stream. - - - Dependent streams move with their parent stream if the parent is reprioritized. Setting - a dependency with the exclusive flag for a reprioritized stream moves all the - dependencies of the new parent stream to become dependent on the reprioritized stream. - - - If a stream is made dependent on one of its own dependencies, the formerly dependent - stream is first moved to be dependent on the reprioritized stream's previous parent. - The moved dependency retains its weight. - -
    - - For example, consider an original dependency tree where B and C depend on A, D and E - depend on C, and F depends on D. If A is made dependent on D, then D takes the place - of A. All other dependency relationships stay the same, except for F, which becomes - dependent on A if the reprioritization is exclusive. - - F B C ==> F A OR A - / \ | / \ /|\ - D E E B C B C F - | | | - F E E - (intermediate) (non-exclusive) (exclusive) -]]> -
    -
    - -
    - - When a stream is removed from the dependency tree, its dependencies can be moved to - become dependent on the parent of the closed stream. The weights of new dependencies - are recalculated by distributing the weight of the dependency of the closed stream - proportionally based on the weights of its dependencies. - - - Streams that are removed from the dependency tree cause some prioritization information - to be lost. Resources are shared between streams with the same parent stream, which - means that if a stream in that set closes or becomes blocked, any spare capacity - allocated to a stream is distributed to the immediate neighbors of the stream. However, - if the common dependency is removed from the tree, those streams share resources with - streams at the next highest level. - - - For example, assume streams A and B share a parent, and streams C and D both depend on - stream A. Prior to the removal of stream A, if streams A and D are unable to proceed, - then stream C receives all the resources dedicated to stream A. If stream A is removed - from the tree, the weight of stream A is divided between streams C and D. If stream D - is still unable to proceed, this results in stream C receiving a reduced proportion of - resources. For equal starting weights, C receives one third, rather than one half, of - available resources. - - - It is possible for a stream to become closed while prioritization information that - creates a dependency on that stream is in transit. If a stream identified in a - dependency has no associated priority information, then the dependent stream is instead - assigned a default priority. This potentially creates - suboptimal prioritization, since the stream could be given a priority that is different - to what is intended. - - - To avoid these problems, an endpoint SHOULD retain stream prioritization state for a - period after streams become closed. The longer state is retained, the lower the chance - that streams are assigned incorrect or default priority values. - - - This could create a large state burden for an endpoint, so this state MAY be limited. - An endpoint MAY apply a fixed upper limit on the number of closed streams for which - prioritization state is tracked to limit state exposure. The amount of additional state - an endpoint maintains could be dependent on load; under high load, prioritization state - can be discarded to limit resource commitments. In extreme cases, an endpoint could - even discard prioritization state for active or reserved streams. If a fixed limit is - applied, endpoints SHOULD maintain state for at least as many streams as allowed by - their setting for SETTINGS_MAX_CONCURRENT_STREAMS. - - - An endpoint receiving a PRIORITY frame that changes the priority of a - closed stream SHOULD alter the dependencies of the streams that depend on it, if it has - retained enough state to do so. - -
    - -
    - - Providing priority information is optional. Streams are assigned a non-exclusive - dependency on stream 0x0 by default. Pushed streams - initially depend on their associated stream. In both cases, streams are assigned a - default weight of 16. - -
    -
    - -
    - - HTTP/2 framing permits two classes of error: - - - An error condition that renders the entire connection unusable is a connection error. - - - An error in an individual stream is a stream error. - - - - - A list of error codes is included in . - - -
    - - A connection error is any error which prevents further processing of the framing layer, - or which corrupts any connection state. - - - An endpoint that encounters a connection error SHOULD first send a GOAWAY - frame () with the stream identifier of the last stream that it - successfully received from its peer. The GOAWAY frame includes an error - code that indicates why the connection is terminating. After sending the - GOAWAY frame, the endpoint MUST close the TCP connection. - - - It is possible that the GOAWAY will not be reliably received by the - receiving endpoint (see ). In the event of a connection error, - GOAWAY only provides a best effort attempt to communicate with the peer - about why the connection is being terminated. - - - An endpoint can end a connection at any time. In particular, an endpoint MAY choose to - treat a stream error as a connection error. Endpoints SHOULD send a - GOAWAY frame when ending a connection, providing that circumstances - permit it. - -
    - -
    - - A stream error is an error related to a specific stream that does not affect processing - of other streams. - - - An endpoint that detects a stream error sends a RST_STREAM frame () that contains the stream identifier of the stream where the error - occurred. The RST_STREAM frame includes an error code that indicates the - type of error. - - - A RST_STREAM is the last frame that an endpoint can send on a stream. - The peer that sends the RST_STREAM frame MUST be prepared to receive any - frames that were sent or enqueued for sending by the remote peer. These frames can be - ignored, except where they modify connection state (such as the state maintained for - header compression, or flow control). - - - Normally, an endpoint SHOULD NOT send more than one RST_STREAM frame for - any stream. However, an endpoint MAY send additional RST_STREAM frames if - it receives frames on a closed stream after more than a round-trip time. This behavior - is permitted to deal with misbehaving implementations. - - - An endpoint MUST NOT send a RST_STREAM in response to an - RST_STREAM frame, to avoid looping. - -
    - -
    - - If the TCP connection is closed or reset while streams remain in open or half closed - states, then the endpoint MUST assume that those streams were abnormally interrupted and - could be incomplete. - -
    -
    - -
    - - HTTP/2 permits extension of the protocol. Protocol extensions can be used to provide - additional services or alter any aspect of the protocol, within the limitations described - in this section. Extensions are effective only within the scope of a single HTTP/2 - connection. - - - Extensions are permitted to use new frame types, new - settings, or new error - codes. Registries are established for managing these extension points: frame types, settings and - error codes. - - - Implementations MUST ignore unknown or unsupported values in all extensible protocol - elements. Implementations MUST discard frames that have unknown or unsupported types. - This means that any of these extension points can be safely used by extensions without - prior arrangement or negotiation. However, extension frames that appear in the middle of - a header block are not permitted; these MUST be treated - as a connection error of type - PROTOCOL_ERROR. - - - However, extensions that could change the semantics of existing protocol components MUST - be negotiated before being used. For example, an extension that changes the layout of the - HEADERS frame cannot be used until the peer has given a positive signal - that this is acceptable. In this case, it could also be necessary to coordinate when the - revised layout comes into effect. Note that treating any frame other than - DATA frames as flow controlled is such a change in semantics, and can only - be done through negotiation. - - - This document doesn't mandate a specific method for negotiating the use of an extension, - but notes that a setting could be used for that - purpose. If both peers set a value that indicates willingness to use the extension, then - the extension can be used. If a setting is used for extension negotiation, the initial - value MUST be defined so that the extension is initially disabled. - -
    -
    - -
    - - This specification defines a number of frame types, each identified by a unique 8-bit type - code. Each frame type serves a distinct purpose either in the establishment and management - of the connection as a whole, or of individual streams. - - - The transmission of specific frame types can alter the state of a connection. If endpoints - fail to maintain a synchronized view of the connection state, successful communication - within the connection will no longer be possible. Therefore, it is important that endpoints - have a shared comprehension of how the state is affected by the use any given frame. - - -
    - - DATA frames (type=0x0) convey arbitrary, variable-length sequences of octets associated - with a stream. One or more DATA frames are used, for instance, to carry HTTP request or - response payloads. - - - DATA frames MAY also contain arbitrary padding. Padding can be added to DATA frames to - obscure the size of messages. - -
    - -
    - - The DATA frame contains the following fields: - - - An 8-bit field containing the length of the frame padding in units of octets. This - field is optional and is only present if the PADDED flag is set. - - - Application data. The amount of data is the remainder of the frame payload after - subtracting the length of the other fields that are present. - - - Padding octets that contain no application semantic value. Padding octets MUST be set - to zero when sending and ignored when receiving. - - - - - - The DATA frame defines the following flags: - - - Bit 1 being set indicates that this frame is the last that the endpoint will send for - the identified stream. Setting this flag causes the stream to enter one of the "half closed" states or the "closed" state. - - - Bit 4 being set indicates that the Pad Length field and any padding that it describes - is present. - - - - - DATA frames MUST be associated with a stream. If a DATA frame is received whose stream - identifier field is 0x0, the recipient MUST respond with a connection error of type - PROTOCOL_ERROR. - - - DATA frames are subject to flow control and can only be sent when a stream is in the - "open" or "half closed (remote)" states. The entire DATA frame payload is included in flow - control, including Pad Length and Padding fields if present. If a DATA frame is received - whose stream is not in "open" or "half closed (local)" state, the recipient MUST respond - with a stream error of type - STREAM_CLOSED. - - - The total number of padding octets is determined by the value of the Pad Length field. If - the length of the padding is greater than the length of the frame payload, the recipient - MUST treat this as a connection error of - type PROTOCOL_ERROR. - - - A frame can be increased in size by one octet by including a Pad Length field with a - value of zero. - - - - - Padding is a security feature; see . - -
    - -
    - - The HEADERS frame (type=0x1) is used to open a stream, - and additionally carries a header block fragment. HEADERS frames can be sent on a stream - in the "open" or "half closed (remote)" states. - -
    - -
    - - The HEADERS frame payload has the following fields: - - - An 8-bit field containing the length of the frame padding in units of octets. This - field is only present if the PADDED flag is set. - - - A single bit flag indicates that the stream dependency is exclusive, see . This field is only present if the PRIORITY flag is set. - - - A 31-bit stream identifier for the stream that this stream depends on, see . This field is only present if the PRIORITY flag is set. - - - An 8-bit weight for the stream, see . Add one to the - value to obtain a weight between 1 and 256. This field is only present if the - PRIORITY flag is set. - - - A header block fragment. - - - Padding octets that contain no application semantic value. Padding octets MUST be set - to zero when sending and ignored when receiving. - - - - - - The HEADERS frame defines the following flags: - - - - Bit 1 being set indicates that the header block is - the last that the endpoint will send for the identified stream. Setting this flag - causes the stream to enter one of "half closed" - states. - - - A HEADERS frame carries the END_STREAM flag that signals the end of a stream. - However, a HEADERS frame with the END_STREAM flag set can be followed by - CONTINUATION frames on the same stream. Logically, the - CONTINUATION frames are part of the HEADERS frame. - - - - - Bit 3 being set indicates that this frame contains an entire header block and is not followed by any - CONTINUATION frames. - - - A HEADERS frame without the END_HEADERS flag set MUST be followed by a - CONTINUATION frame for the same stream. A receiver MUST treat the - receipt of any other type of frame or a frame on a different stream as a connection error of type - PROTOCOL_ERROR. - - - - - Bit 4 being set indicates that the Pad Length field and any padding that it - describes is present. - - - - - Bit 6 being set indicates that the Exclusive Flag (E), Stream Dependency, and Weight - fields are present; see . - - - - - - - The payload of a HEADERS frame contains a header block - fragment. A header block that does not fit within a HEADERS frame is continued in - a CONTINUATION frame. - - - - HEADERS frames MUST be associated with a stream. If a HEADERS frame is received whose - stream identifier field is 0x0, the recipient MUST respond with a connection error of type - PROTOCOL_ERROR. - - - - The HEADERS frame changes the connection state as described in . - - - - The HEADERS frame includes optional padding. Padding fields and flags are identical to - those defined for DATA frames. - - - Prioritization information in a HEADERS frame is logically equivalent to a separate - PRIORITY frame, but inclusion in HEADERS avoids the potential for churn in - stream prioritization when new streams are created. Priorization fields in HEADERS frames - subsequent to the first on a stream reprioritize the - stream. - -
    - -
    - - The PRIORITY frame (type=0x2) specifies the sender-advised - priority of a stream. It can be sent at any time for an existing stream, including - closed streams. This enables reprioritization of existing streams. - -
    - -
    - - The payload of a PRIORITY frame contains the following fields: - - - A single bit flag indicates that the stream dependency is exclusive, see . - - - A 31-bit stream identifier for the stream that this stream depends on, see . - - - An 8-bit weight for the identified stream dependency, see . Add one to the value to obtain a weight between 1 and 256. - - - - - - The PRIORITY frame does not define any flags. - - - - The PRIORITY frame is associated with an existing stream. If a PRIORITY frame is received - with a stream identifier of 0x0, the recipient MUST respond with a connection error of type - PROTOCOL_ERROR. - - - The PRIORITY frame can be sent on a stream in any of the "reserved (remote)", "open", - "half closed (local)", "half closed (remote)", or "closed" states, though it cannot be - sent between consecutive frames that comprise a single header - block. Note that this frame could arrive after processing or frame sending has - completed, which would cause it to have no effect on the current stream. For a stream - that is in the "half closed (remote)" or "closed" - state, this frame can only affect - processing of the current stream and not frame transmission. - - - The PRIORITY frame is the only frame that can be sent for a stream in the "closed" state. - This allows for the reprioritization of a group of dependent streams by altering the - priority of a parent stream, which might be closed. However, a PRIORITY frame sent on a - closed stream risks being ignored due to the peer having discarded priority state - information for that stream. - -
    - -
    - - The RST_STREAM frame (type=0x3) allows for abnormal termination of a stream. When sent by - the initiator of a stream, it indicates that they wish to cancel the stream or that an - error condition has occurred. When sent by the receiver of a stream, it indicates that - either the receiver is rejecting the stream, requesting that the stream be cancelled, or - that an error condition has occurred. - -
    - -
    - - - The RST_STREAM frame contains a single unsigned, 32-bit integer identifying the error code. The error code indicates why the stream is being - terminated. - - - - The RST_STREAM frame does not define any flags. - - - - The RST_STREAM frame fully terminates the referenced stream and causes it to enter the - closed state. After receiving a RST_STREAM on a stream, the receiver MUST NOT send - additional frames for that stream, with the exception of PRIORITY. However, - after sending the RST_STREAM, the sending endpoint MUST be prepared to receive and process - additional frames sent on the stream that might have been sent by the peer prior to the - arrival of the RST_STREAM. - - - - RST_STREAM frames MUST be associated with a stream. If a RST_STREAM frame is received - with a stream identifier of 0x0, the recipient MUST treat this as a connection error of type - PROTOCOL_ERROR. - - - - RST_STREAM frames MUST NOT be sent for a stream in the "idle" state. If a RST_STREAM - frame identifying an idle stream is received, the recipient MUST treat this as a connection error of type - PROTOCOL_ERROR. - - -
    - -
    - - The SETTINGS frame (type=0x4) conveys configuration parameters that affect how endpoints - communicate, such as preferences and constraints on peer behavior. The SETTINGS frame is - also used to acknowledge the receipt of those parameters. Individually, a SETTINGS - parameter can also be referred to as a "setting". - - - SETTINGS parameters are not negotiated; they describe characteristics of the sending peer, - which are used by the receiving peer. Different values for the same parameter can be - advertised by each peer. For example, a client might set a high initial flow control - window, whereas a server might set a lower value to conserve resources. - - - - A SETTINGS frame MUST be sent by both endpoints at the start of a connection, and MAY be - sent at any other time by either endpoint over the lifetime of the connection. - Implementations MUST support all of the parameters defined by this specification. - - - - Each parameter in a SETTINGS frame replaces any existing value for that parameter. - Parameters are processed in the order in which they appear, and a receiver of a SETTINGS - frame does not need to maintain any state other than the current value of its - parameters. Therefore, the value of a SETTINGS parameter is the last value that is seen by - a receiver. - - - SETTINGS parameters are acknowledged by the receiving peer. To enable this, the SETTINGS - frame defines the following flag: - - - Bit 1 being set indicates that this frame acknowledges receipt and application of the - peer's SETTINGS frame. When this bit is set, the payload of the SETTINGS frame MUST - be empty. Receipt of a SETTINGS frame with the ACK flag set and a length field value - other than 0 MUST be treated as a connection - error of type FRAME_SIZE_ERROR. For more info, see Settings Synchronization. - - - - - SETTINGS frames always apply to a connection, never a single stream. The stream - identifier for a SETTINGS frame MUST be zero (0x0). If an endpoint receives a SETTINGS - frame whose stream identifier field is anything other than 0x0, the endpoint MUST respond - with a connection error of type - PROTOCOL_ERROR. - - - The SETTINGS frame affects connection state. A badly formed or incomplete SETTINGS frame - MUST be treated as a connection error of type - PROTOCOL_ERROR. - - -
    - - The payload of a SETTINGS frame consists of zero or more parameters, each consisting of - an unsigned 16-bit setting identifier and an unsigned 32-bit value. - - -
    - -
    -
    - -
    - - The following parameters are defined: - - - - Allows the sender to inform the remote endpoint of the maximum size of the header - compression table used to decode header blocks, in octets. The encoder can select - any size equal to or less than this value by using signaling specific to the - header compression format inside a header block. The initial value is 4,096 - octets. - - - - - This setting can be use to disable server - push. An endpoint MUST NOT send a PUSH_PROMISE frame if it - receives this parameter set to a value of 0. An endpoint that has both set this - parameter to 0 and had it acknowledged MUST treat the receipt of a - PUSH_PROMISE frame as a connection error of type - PROTOCOL_ERROR. - - - The initial value is 1, which indicates that server push is permitted. Any value - other than 0 or 1 MUST be treated as a connection error of type - PROTOCOL_ERROR. - - - - - Indicates the maximum number of concurrent streams that the sender will allow. - This limit is directional: it applies to the number of streams that the sender - permits the receiver to create. Initially there is no limit to this value. It is - recommended that this value be no smaller than 100, so as to not unnecessarily - limit parallelism. - - - A value of 0 for SETTINGS_MAX_CONCURRENT_STREAMS SHOULD NOT be treated as special - by endpoints. A zero value does prevent the creation of new streams, however this - can also happen for any limit that is exhausted with active streams. Servers - SHOULD only set a zero value for short durations; if a server does not wish to - accept requests, closing the connection could be preferable. - - - - - Indicates the sender's initial window size (in octets) for stream level flow - control. The initial value is 216-1 (65,535) octets. - - - This setting affects the window size of all streams, including existing streams, - see . - - - Values above the maximum flow control window size of 231-1 MUST - be treated as a connection error of - type FLOW_CONTROL_ERROR. - - - - - Indicates the size of the largest frame payload that the sender is willing to - receive, in octets. - - - The initial value is 214 (16,384) octets. The value advertised by - an endpoint MUST be between this initial value and the maximum allowed frame size - (224-1 or 16,777,215 octets), inclusive. Values outside this range - MUST be treated as a connection error - of type PROTOCOL_ERROR. - - - - - This advisory setting informs a peer of the maximum size of header list that the - sender is prepared to accept, in octets. The value is based on the uncompressed - size of header fields, including the length of the name and value in octets plus - an overhead of 32 octets for each header field. - - - For any given request, a lower limit than what is advertised MAY be enforced. The - initial value of this setting is unlimited. - - - - - - An endpoint that receives a SETTINGS frame with any unknown or unsupported identifier - MUST ignore that setting. - -
    - -
    - - Most values in SETTINGS benefit from or require an understanding of when the peer has - received and applied the changed parameter values. In order to provide - such synchronization timepoints, the recipient of a SETTINGS frame in which the ACK flag - is not set MUST apply the updated parameters as soon as possible upon receipt. - - - The values in the SETTINGS frame MUST be processed in the order they appear, with no - other frame processing between values. Unsupported parameters MUST be ignored. Once - all values have been processed, the recipient MUST immediately emit a SETTINGS frame - with the ACK flag set. Upon receiving a SETTINGS frame with the ACK flag set, the sender - of the altered parameters can rely on the setting having been applied. - - - If the sender of a SETTINGS frame does not receive an acknowledgement within a - reasonable amount of time, it MAY issue a connection error of type - SETTINGS_TIMEOUT. - -
    -
    - -
    - - The PUSH_PROMISE frame (type=0x5) is used to notify the peer endpoint in advance of - streams the sender intends to initiate. The PUSH_PROMISE frame includes the unsigned - 31-bit identifier of the stream the endpoint plans to create along with a set of headers - that provide additional context for the stream. contains a - thorough description of the use of PUSH_PROMISE frames. - - -
    - -
    - - The PUSH_PROMISE frame payload has the following fields: - - - An 8-bit field containing the length of the frame padding in units of octets. This - field is only present if the PADDED flag is set. - - - A single reserved bit. - - - An unsigned 31-bit integer that identifies the stream that is reserved by the - PUSH_PROMISE. The promised stream identifier MUST be a valid choice for the next - stream sent by the sender (see new stream - identifier). - - - A header block fragment containing request header - fields. - - - Padding octets. - - - - - - The PUSH_PROMISE frame defines the following flags: - - - - Bit 3 being set indicates that this frame contains an entire header block and is not followed by any - CONTINUATION frames. - - - A PUSH_PROMISE frame without the END_HEADERS flag set MUST be followed by a - CONTINUATION frame for the same stream. A receiver MUST treat the receipt of any - other type of frame or a frame on a different stream as a connection error of type - PROTOCOL_ERROR. - - - - - Bit 4 being set indicates that the Pad Length field and any padding that it - describes is present. - - - - - - - PUSH_PROMISE frames MUST be associated with an existing, peer-initiated stream. The stream - identifier of a PUSH_PROMISE frame indicates the stream it is associated with. If the - stream identifier field specifies the value 0x0, a recipient MUST respond with a connection error of type - PROTOCOL_ERROR. - - - - Promised streams are not required to be used in the order they are promised. The - PUSH_PROMISE only reserves stream identifiers for later use. - - - - PUSH_PROMISE MUST NOT be sent if the SETTINGS_ENABLE_PUSH setting of the - peer endpoint is set to 0. An endpoint that has set this setting and has received - acknowledgement MUST treat the receipt of a PUSH_PROMISE frame as a connection error of type - PROTOCOL_ERROR. - - - Recipients of PUSH_PROMISE frames can choose to reject promised streams by returning a - RST_STREAM referencing the promised stream identifier back to the sender of - the PUSH_PROMISE. - - - - A PUSH_PROMISE frame modifies the connection state in two ways. The inclusion of a header block potentially modifies the state maintained for - header compression. PUSH_PROMISE also reserves a stream for later use, causing the - promised stream to enter the "reserved" state. A sender MUST NOT send a PUSH_PROMISE on a - stream unless that stream is either "open" or "half closed (remote)"; the sender MUST - ensure that the promised stream is a valid choice for a new stream identifier (that is, the promised stream MUST - be in the "idle" state). - - - Since PUSH_PROMISE reserves a stream, ignoring a PUSH_PROMISE frame causes the stream - state to become indeterminate. A receiver MUST treat the receipt of a PUSH_PROMISE on a - stream that is neither "open" nor "half closed (local)" as a connection error of type - PROTOCOL_ERROR. However, an endpoint that has sent - RST_STREAM on the associated stream MUST handle PUSH_PROMISE frames that - might have been created before the RST_STREAM frame is received and - processed. - - - A receiver MUST treat the receipt of a PUSH_PROMISE that promises an illegal stream identifier (that is, an identifier for a - stream that is not currently in the "idle" state) as a connection error of type - PROTOCOL_ERROR. - - - - The PUSH_PROMISE frame includes optional padding. Padding fields and flags are identical - to those defined for DATA frames. - -
    - -
    - - The PING frame (type=0x6) is a mechanism for measuring a minimal round trip time from the - sender, as well as determining whether an idle connection is still functional. PING - frames can be sent from any endpoint. - -
    - -
    - - - In addition to the frame header, PING frames MUST contain 8 octets of data in the payload. - A sender can include any value it chooses and use those bytes in any fashion. - - - Receivers of a PING frame that does not include an ACK flag MUST send a PING frame with - the ACK flag set in response, with an identical payload. PING responses SHOULD be given - higher priority than any other frame. - - - - The PING frame defines the following flags: - - - Bit 1 being set indicates that this PING frame is a PING response. An endpoint MUST - set this flag in PING responses. An endpoint MUST NOT respond to PING frames - containing this flag. - - - - - PING frames are not associated with any individual stream. If a PING frame is received - with a stream identifier field value other than 0x0, the recipient MUST respond with a - connection error of type - PROTOCOL_ERROR. - - - Receipt of a PING frame with a length field value other than 8 MUST be treated as a connection error of type - FRAME_SIZE_ERROR. - - -
    - -
    - - The GOAWAY frame (type=0x7) informs the remote peer to stop creating streams on this - connection. GOAWAY can be sent by either the client or the server. Once sent, the sender - will ignore frames sent on any new streams with identifiers higher than the included last - stream identifier. Receivers of a GOAWAY frame MUST NOT open additional streams on the - connection, although a new connection can be established for new streams. - - - The purpose of this frame is to allow an endpoint to gracefully stop accepting new - streams, while still finishing processing of previously established streams. This enables - administrative actions, like server maintainance. - - - There is an inherent race condition between an endpoint starting new streams and the - remote sending a GOAWAY frame. To deal with this case, the GOAWAY contains the stream - identifier of the last peer-initiated stream which was or might be processed on the - sending endpoint in this connection. For instance, if the server sends a GOAWAY frame, - the identified stream is the highest numbered stream initiated by the client. - - - If the receiver of the GOAWAY has sent data on streams with a higher stream identifier - than what is indicated in the GOAWAY frame, those streams are not or will not be - processed. The receiver of the GOAWAY frame can treat the streams as though they had - never been created at all, thereby allowing those streams to be retried later on a new - connection. - - - Endpoints SHOULD always send a GOAWAY frame before closing a connection so that the remote - can know whether a stream has been partially processed or not. For example, if an HTTP - client sends a POST at the same time that a server closes a connection, the client cannot - know if the server started to process that POST request if the server does not send a - GOAWAY frame to indicate what streams it might have acted on. - - - An endpoint might choose to close a connection without sending GOAWAY for misbehaving - peers. - - -
    - -
    - - The GOAWAY frame does not define any flags. - - - The GOAWAY frame applies to the connection, not a specific stream. An endpoint MUST treat - a GOAWAY frame with a stream identifier other than 0x0 as a connection error of type - PROTOCOL_ERROR. - - - The last stream identifier in the GOAWAY frame contains the highest numbered stream - identifier for which the sender of the GOAWAY frame might have taken some action on, or - might yet take action on. All streams up to and including the identified stream might - have been processed in some way. The last stream identifier can be set to 0 if no streams - were processed. - - - In this context, "processed" means that some data from the stream was passed to some - higher layer of software that might have taken some action as a result. - - - If a connection terminates without a GOAWAY frame, the last stream identifier is - effectively the highest possible stream identifier. - - - On streams with lower or equal numbered identifiers that were not closed completely prior - to the connection being closed, re-attempting requests, transactions, or any protocol - activity is not possible, with the exception of idempotent actions like HTTP GET, PUT, or - DELETE. Any protocol activity that uses higher numbered streams can be safely retried - using a new connection. - - - Activity on streams numbered lower or equal to the last stream identifier might still - complete successfully. The sender of a GOAWAY frame might gracefully shut down a - connection by sending a GOAWAY frame, maintaining the connection in an open state until - all in-progress streams complete. - - - An endpoint MAY send multiple GOAWAY frames if circumstances change. For instance, an - endpoint that sends GOAWAY with NO_ERROR during graceful shutdown could - subsequently encounter an condition that requires immediate termination of the connection. - The last stream identifier from the last GOAWAY frame received indicates which streams - could have been acted upon. Endpoints MUST NOT increase the value they send in the last - stream identifier, since the peers might already have retried unprocessed requests on - another connection. - - - A client that is unable to retry requests loses all requests that are in flight when the - server closes the connection. This is especially true for intermediaries that might - not be serving clients using HTTP/2. A server that is attempting to gracefully shut down - a connection SHOULD send an initial GOAWAY frame with the last stream identifier set to - 231-1 and a NO_ERROR code. This signals to the client that - a shutdown is imminent and that no further requests can be initiated. After waiting at - least one round trip time, the server can send another GOAWAY frame with an updated last - stream identifier. This ensures that a connection can be cleanly shut down without losing - requests. - - - - After sending a GOAWAY frame, the sender can discard frames for streams with identifiers - higher than the identified last stream. However, any frames that alter connection state - cannot be completely ignored. For instance, HEADERS, - PUSH_PROMISE and CONTINUATION frames MUST be minimally - processed to ensure the state maintained for header compression is consistent (see ); similarly DATA frames MUST be counted toward the connection flow - control window. Failure to process these frames can cause flow control or header - compression state to become unsynchronized. - - - - The GOAWAY frame also contains a 32-bit error code that - contains the reason for closing the connection. - - - Endpoints MAY append opaque data to the payload of any GOAWAY frame. Additional debug - data is intended for diagnostic purposes only and carries no semantic value. Debug - information could contain security- or privacy-sensitive data. Logged or otherwise - persistently stored debug data MUST have adequate safeguards to prevent unauthorized - access. - -
    - -
    - - The WINDOW_UPDATE frame (type=0x8) is used to implement flow control; see for an overview. - - - Flow control operates at two levels: on each individual stream and on the entire - connection. - - - Both types of flow control are hop-by-hop; that is, only between the two endpoints. - Intermediaries do not forward WINDOW_UPDATE frames between dependent connections. - However, throttling of data transfer by any receiver can indirectly cause the propagation - of flow control information toward the original sender. - - - Flow control only applies to frames that are identified as being subject to flow control. - Of the frame types defined in this document, this includes only DATA frames. - Frames that are exempt from flow control MUST be accepted and processed, unless the - receiver is unable to assign resources to handling the frame. A receiver MAY respond with - a stream error or connection error of type - FLOW_CONTROL_ERROR if it is unable to accept a frame. - -
    - -
    - - The payload of a WINDOW_UPDATE frame is one reserved bit, plus an unsigned 31-bit integer - indicating the number of octets that the sender can transmit in addition to the existing - flow control window. The legal range for the increment to the flow control window is 1 to - 231-1 (0x7fffffff) octets. - - - The WINDOW_UPDATE frame does not define any flags. - - - The WINDOW_UPDATE frame can be specific to a stream or to the entire connection. In the - former case, the frame's stream identifier indicates the affected stream; in the latter, - the value "0" indicates that the entire connection is the subject of the frame. - - - A receiver MUST treat the receipt of a WINDOW_UPDATE frame with an flow control window - increment of 0 as a stream error of type - PROTOCOL_ERROR; errors on the connection flow control window MUST be - treated as a connection error. - - - WINDOW_UPDATE can be sent by a peer that has sent a frame bearing the END_STREAM flag. - This means that a receiver could receive a WINDOW_UPDATE frame on a "half closed (remote)" - or "closed" stream. A receiver MUST NOT treat this as an error, see . - - - A receiver that receives a flow controlled frame MUST always account for its contribution - against the connection flow control window, unless the receiver treats this as a connection error. This is necessary even if the - frame is in error. Since the sender counts the frame toward the flow control window, if - the receiver does not, the flow control window at sender and receiver can become - different. - - -
    - - Flow control in HTTP/2 is implemented using a window kept by each sender on every - stream. The flow control window is a simple integer value that indicates how many octets - of data the sender is permitted to transmit; as such, its size is a measure of the - buffering capacity of the receiver. - - - Two flow control windows are applicable: the stream flow control window and the - connection flow control window. The sender MUST NOT send a flow controlled frame with a - length that exceeds the space available in either of the flow control windows advertised - by the receiver. Frames with zero length with the END_STREAM flag set (that is, an - empty DATA frame) MAY be sent if there is no available space in either - flow control window. - - - For flow control calculations, the 9 octet frame header is not counted. - - - After sending a flow controlled frame, the sender reduces the space available in both - windows by the length of the transmitted frame. - - - The receiver of a frame sends a WINDOW_UPDATE frame as it consumes data and frees up - space in flow control windows. Separate WINDOW_UPDATE frames are sent for the stream - and connection level flow control windows. - - - A sender that receives a WINDOW_UPDATE frame updates the corresponding window by the - amount specified in the frame. - - - A sender MUST NOT allow a flow control window to exceed 231-1 octets. - If a sender receives a WINDOW_UPDATE that causes a flow control window to exceed this - maximum it MUST terminate either the stream or the connection, as appropriate. For - streams, the sender sends a RST_STREAM with the error code of - FLOW_CONTROL_ERROR code; for the connection, a GOAWAY - frame with a FLOW_CONTROL_ERROR code. - - - Flow controlled frames from the sender and WINDOW_UPDATE frames from the receiver are - completely asynchronous with respect to each other. This property allows a receiver to - aggressively update the window size kept by the sender to prevent streams from stalling. - -
    - -
    - - When an HTTP/2 connection is first established, new streams are created with an initial - flow control window size of 65,535 octets. The connection flow control window is 65,535 - octets. Both endpoints can adjust the initial window size for new streams by including - a value for SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS - frame that forms part of the connection preface. The connection flow control window can - only be changed using WINDOW_UPDATE frames. - - - Prior to receiving a SETTINGS frame that sets a value for - SETTINGS_INITIAL_WINDOW_SIZE, an endpoint can only use the default - initial window size when sending flow controlled frames. Similarly, the connection flow - control window is set to the default initial window size until a WINDOW_UPDATE frame is - received. - - - A SETTINGS frame can alter the initial flow control window size for all - current streams. When the value of SETTINGS_INITIAL_WINDOW_SIZE changes, - a receiver MUST adjust the size of all stream flow control windows that it maintains by - the difference between the new value and the old value. - - - A change to SETTINGS_INITIAL_WINDOW_SIZE can cause the available space in - a flow control window to become negative. A sender MUST track the negative flow control - window, and MUST NOT send new flow controlled frames until it receives WINDOW_UPDATE - frames that cause the flow control window to become positive. - - - For example, if the client sends 60KB immediately on connection establishment, and the - server sets the initial window size to be 16KB, the client will recalculate the - available flow control window to be -44KB on receipt of the SETTINGS - frame. The client retains a negative flow control window until WINDOW_UPDATE frames - restore the window to being positive, after which the client can resume sending. - - - A SETTINGS frame cannot alter the connection flow control window. - - - An endpoint MUST treat a change to SETTINGS_INITIAL_WINDOW_SIZE that - causes any flow control window to exceed the maximum size as a connection error of type - FLOW_CONTROL_ERROR. - -
    - -
    - - A receiver that wishes to use a smaller flow control window than the current size can - send a new SETTINGS frame. However, the receiver MUST be prepared to - receive data that exceeds this window size, since the sender might send data that - exceeds the lower limit prior to processing the SETTINGS frame. - - - After sending a SETTINGS frame that reduces the initial flow control window size, a - receiver has two options for handling streams that exceed flow control limits: - - - The receiver can immediately send RST_STREAM with - FLOW_CONTROL_ERROR error code for the affected streams. - - - The receiver can accept the streams and tolerate the resulting head of line - blocking, sending WINDOW_UPDATE frames as it consumes data. - - - -
    -
    - -
    - - The CONTINUATION frame (type=0x9) is used to continue a sequence of header block fragments. Any number of CONTINUATION frames can - be sent on an existing stream, as long as the preceding frame is on the same stream and is - a HEADERS, PUSH_PROMISE or CONTINUATION frame without the - END_HEADERS flag set. - - -
    - -
    - - The CONTINUATION frame payload contains a header block - fragment. - - - - The CONTINUATION frame defines the following flag: - - - - Bit 3 being set indicates that this frame ends a header - block. - - - If the END_HEADERS bit is not set, this frame MUST be followed by another - CONTINUATION frame. A receiver MUST treat the receipt of any other type of frame or - a frame on a different stream as a connection - error of type PROTOCOL_ERROR. - - - - - - - The CONTINUATION frame changes the connection state as defined in . - - - - CONTINUATION frames MUST be associated with a stream. If a CONTINUATION frame is received - whose stream identifier field is 0x0, the recipient MUST respond with a connection error of type PROTOCOL_ERROR. - - - - A CONTINUATION frame MUST be preceded by a HEADERS, - PUSH_PROMISE or CONTINUATION frame without the END_HEADERS flag set. A - recipient that observes violation of this rule MUST respond with a connection error of type - PROTOCOL_ERROR. - -
    -
    - -
    - - Error codes are 32-bit fields that are used in RST_STREAM and - GOAWAY frames to convey the reasons for the stream or connection error. - - - - Error codes share a common code space. Some error codes apply only to either streams or the - entire connection and have no defined semantics in the other context. - - - - The following error codes are defined: - - - The associated condition is not as a result of an error. For example, a - GOAWAY might include this code to indicate graceful shutdown of a - connection. - - - The endpoint detected an unspecific protocol error. This error is for use when a more - specific error code is not available. - - - The endpoint encountered an unexpected internal error. - - - The endpoint detected that its peer violated the flow control protocol. - - - The endpoint sent a SETTINGS frame, but did not receive a response in a - timely manner. See Settings Synchronization. - - - The endpoint received a frame after a stream was half closed. - - - The endpoint received a frame with an invalid size. - - - The endpoint refuses the stream prior to performing any application processing, see - for details. - - - Used by the endpoint to indicate that the stream is no longer needed. - - - The endpoint is unable to maintain the header compression context for the connection. - - - The connection established in response to a CONNECT - request was reset or abnormally closed. - - - The endpoint detected that its peer is exhibiting a behavior that might be generating - excessive load. - - - The underlying transport has properties that do not meet minimum security - requirements (see ). - - - - - Unknown or unsupported error codes MUST NOT trigger any special behavior. These MAY be - treated by an implementation as being equivalent to INTERNAL_ERROR. - -
    - -
    - - HTTP/2 is intended to be as compatible as possible with current uses of HTTP. This means - that, from the application perspective, the features of the protocol are largely - unchanged. To achieve this, all request and response semantics are preserved, although the - syntax of conveying those semantics has changed. - - - Thus, the specification and requirements of HTTP/1.1 Semantics and Content , Conditional Requests , Range Requests , Caching and Authentication are applicable to HTTP/2. Selected portions of HTTP/1.1 Message Syntax - and Routing , such as the HTTP and HTTPS URI schemes, are also - applicable in HTTP/2, but the expression of those semantics for this protocol are defined - in the sections below. - - -
    - - A client sends an HTTP request on a new stream, using a previously unused stream identifier. A server sends an HTTP response on - the same stream as the request. - - - An HTTP message (request or response) consists of: - - - for a response only, zero or more HEADERS frames (each followed by zero - or more CONTINUATION frames) containing the message headers of - informational (1xx) HTTP responses (see and ), - and - - - one HEADERS frame (followed by zero or more CONTINUATION - frames) containing the message headers (see ), and - - - zero or more DATA frames containing the message payload (see ), and - - - optionally, one HEADERS frame, followed by zero or more - CONTINUATION frames containing the trailer-part, if present (see ). - - - The last frame in the sequence bears an END_STREAM flag, noting that a - HEADERS frame bearing the END_STREAM flag can be followed by - CONTINUATION frames that carry any remaining portions of the header block. - - - Other frames (from any stream) MUST NOT occur between either HEADERS frame - and any CONTINUATION frames that might follow. - - - - Trailing header fields are carried in a header block that also terminates the stream. - That is, a sequence starting with a HEADERS frame, followed by zero or more - CONTINUATION frames, where the HEADERS frame bears an - END_STREAM flag. Header blocks after the first that do not terminate the stream are not - part of an HTTP request or response. - - - A HEADERS frame (and associated CONTINUATION frames) can - only appear at the start or end of a stream. An endpoint that receives a - HEADERS frame without the END_STREAM flag set after receiving a final - (non-informational) status code MUST treat the corresponding request or response as malformed. - - - - An HTTP request/response exchange fully consumes a single stream. A request starts with - the HEADERS frame that puts the stream into an "open" state. The request - ends with a frame bearing END_STREAM, which causes the stream to become "half closed - (local)" for the client and "half closed (remote)" for the server. A response starts with - a HEADERS frame and ends with a frame bearing END_STREAM, which places the - stream in the "closed" state. - - - -
    - - HTTP/2 removes support for the 101 (Switching Protocols) informational status code - (). - - - The semantics of 101 (Switching Protocols) aren't applicable to a multiplexed protocol. - Alternative protocols are able to use the same mechanisms that HTTP/2 uses to negotiate - their use (see ). - -
    - -
    - - HTTP header fields carry information as a series of key-value pairs. For a listing of - registered HTTP headers, see the Message Header Field Registry maintained at . - - -
    - - While HTTP/1.x used the message start-line (see ) to convey the target URI and method of the request, and the - status code for the response, HTTP/2 uses special pseudo-header fields beginning with - ':' character (ASCII 0x3a) for this purpose. - - - Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT generate - pseudo-header fields other than those defined in this document. - - - Pseudo-header fields are only valid in the context in which they are defined. - Pseudo-header fields defined for requests MUST NOT appear in responses; pseudo-header - fields defined for responses MUST NOT appear in requests. Pseudo-header fields MUST - NOT appear in trailers. Endpoints MUST treat a request or response that contains - undefined or invalid pseudo-header fields as malformed. - - - Just as in HTTP/1.x, header field names are strings of ASCII characters that are - compared in a case-insensitive fashion. However, header field names MUST be converted - to lowercase prior to their encoding in HTTP/2. A request or response containing - uppercase header field names MUST be treated as malformed. - - - All pseudo-header fields MUST appear in the header block before regular header fields. - Any request or response that contains a pseudo-header field that appears in a header - block after a regular header field MUST be treated as malformed. - -
    - -
    - - HTTP/2 does not use the Connection header field to - indicate connection-specific header fields; in this protocol, connection-specific - metadata is conveyed by other means. An endpoint MUST NOT generate a HTTP/2 message - containing connection-specific header fields; any message containing - connection-specific header fields MUST be treated as malformed. - - - This means that an intermediary transforming an HTTP/1.x message to HTTP/2 will need - to remove any header fields nominated by the Connection header field, along with the - Connection header field itself. Such intermediaries SHOULD also remove other - connection-specific header fields, such as Keep-Alive, Proxy-Connection, - Transfer-Encoding and Upgrade, even if they are not nominated by Connection. - - - One exception to this is the TE header field, which MAY be present in an HTTP/2 - request, but when it is MUST NOT contain any value other than "trailers". - - - - - HTTP/2 purposefully does not support upgrade to another protocol. The handshake - methods described in are believed sufficient to - negotiate the use of alternative protocols. - - - -
    - -
    - - The following pseudo-header fields are defined for HTTP/2 requests: - - - - The :method pseudo-header field includes the HTTP - method (). - - - - - The :scheme pseudo-header field includes the scheme - portion of the target URI (). - - - :scheme is not restricted to http and https schemed URIs. A - proxy or gateway can translate requests for non-HTTP schemes, enabling the use - of HTTP to interact with non-HTTP services. - - - - - The :authority pseudo-header field includes the - authority portion of the target URI (). The authority MUST NOT include the deprecated userinfo subcomponent for http - or https schemed URIs. - - - To ensure that the HTTP/1.1 request line can be reproduced accurately, this - pseudo-header field MUST be omitted when translating from an HTTP/1.1 request - that has a request target in origin or asterisk form (see ). Clients that generate - HTTP/2 requests directly SHOULD use the :authority pseudo-header - field instead of the Host header field. An - intermediary that converts an HTTP/2 request to HTTP/1.1 MUST create a Host header field if one is not present in a request by - copying the value of the :authority pseudo-header - field. - - - - - The :path pseudo-header field includes the path and - query parts of the target URI (the path-absolute - production from and optionally a '?' character - followed by the query production, see and ). A request in asterisk form includes the value '*' for the - :path pseudo-header field. - - - This pseudo-header field MUST NOT be empty for http - or https URIs; http or - https URIs that do not contain a path component - MUST include a value of '/'. The exception to this rule is an OPTIONS request - for an http or https - URI that does not include a path component; these MUST include a :path pseudo-header field with a value of '*' (see ). - - - - - - All HTTP/2 requests MUST include exactly one valid value for the :method, :scheme, and :path pseudo-header fields, unless it is a CONNECT request. An HTTP request that omits mandatory - pseudo-header fields is malformed. - - - HTTP/2 does not define a way to carry the version identifier that is included in the - HTTP/1.1 request line. - -
    - -
    - - For HTTP/2 responses, a single :status pseudo-header - field is defined that carries the HTTP status code field (see ). This pseudo-header field MUST be included in all - responses, otherwise the response is malformed. - - - HTTP/2 does not define a way to carry the version or reason phrase that is included in - an HTTP/1.1 status line. - -
    - -
    - - The Cookie header field can carry a significant amount of - redundant data. - - - The Cookie header field uses a semi-colon (";") to delimit cookie-pairs (or "crumbs"). - This header field doesn't follow the list construction rules in HTTP (see ), which prevents cookie-pairs from - being separated into different name-value pairs. This can significantly reduce - compression efficiency as individual cookie-pairs are updated. - - - To allow for better compression efficiency, the Cookie header field MAY be split into - separate header fields, each with one or more cookie-pairs. If there are multiple - Cookie header fields after decompression, these MUST be concatenated into a single - octet string using the two octet delimiter of 0x3B, 0x20 (the ASCII string "; ") - before being passed into a non-HTTP/2 context, such as an HTTP/1.1 connection, or a - generic HTTP server application. - -
    - - Therefore, the following two lists of Cookie header fields are semantically - equivalent. - - -
    -
    - -
    - - A malformed request or response is one that is an otherwise valid sequence of HTTP/2 - frames, but is otherwise invalid due to the presence of extraneous frames, prohibited - header fields, the absence of mandatory header fields, or the inclusion of uppercase - header field names. - - - A request or response that includes an entity body can include a content-length header field. A request or response is also - malformed if the value of a content-length header field - does not equal the sum of the DATA frame payload lengths that form the - body. A response that is defined to have no payload, as described in , can have a non-zero - content-length header field, even though no content is - included in DATA frames. - - - Intermediaries that process HTTP requests or responses (i.e., any intermediary not - acting as a tunnel) MUST NOT forward a malformed request or response. Malformed - requests or responses that are detected MUST be treated as a stream error of type PROTOCOL_ERROR. - - - For malformed requests, a server MAY send an HTTP response prior to closing or - resetting the stream. Clients MUST NOT accept a malformed response. Note that these - requirements are intended to protect against several types of common attacks against - HTTP; they are deliberately strict, because being permissive can expose - implementations to these vulnerabilities. - -
    -
    - -
    - - This section shows HTTP/1.1 requests and responses, with illustrations of equivalent - HTTP/2 requests and responses. - - - An HTTP GET request includes request header fields and no body and is therefore - transmitted as a single HEADERS frame, followed by zero or more - CONTINUATION frames containing the serialized block of request header - fields. The HEADERS frame in the following has both the END_HEADERS and - END_STREAM flags set; no CONTINUATION frames are sent: - - -
    - + END_STREAM - Accept: image/jpeg + END_HEADERS - :method = GET - :scheme = https - :path = /resource - host = example.org - accept = image/jpeg -]]> -
    - - - Similarly, a response that includes only response header fields is transmitted as a - HEADERS frame (again, followed by zero or more - CONTINUATION frames) containing the serialized block of response header - fields. - - -
    - + END_STREAM - Expires: Thu, 23 Jan ... + END_HEADERS - :status = 304 - etag = "xyzzy" - expires = Thu, 23 Jan ... -]]> -
    - - - An HTTP POST request that includes request header fields and payload data is transmitted - as one HEADERS frame, followed by zero or more - CONTINUATION frames containing the request header fields, followed by one - or more DATA frames, with the last CONTINUATION (or - HEADERS) frame having the END_HEADERS flag set and the final - DATA frame having the END_STREAM flag set: - - -
    - - END_STREAM - Content-Type: image/jpeg - END_HEADERS - Content-Length: 123 :method = POST - :path = /resource - {binary data} :scheme = https - - CONTINUATION - + END_HEADERS - content-type = image/jpeg - host = example.org - content-length = 123 - - DATA - + END_STREAM - {binary data} -]]> - - Note that data contributing to any given header field could be spread between header - block fragments. The allocation of header fields to frames in this example is - illustrative only. - -
    - - - A response that includes header fields and payload data is transmitted as a - HEADERS frame, followed by zero or more CONTINUATION - frames, followed by one or more DATA frames, with the last - DATA frame in the sequence having the END_STREAM flag set: - - -
    - - END_STREAM - Content-Length: 123 + END_HEADERS - :status = 200 - {binary data} content-type = image/jpeg - content-length = 123 - - DATA - + END_STREAM - {binary data} -]]> -
    - - - Trailing header fields are sent as a header block after both the request or response - header block and all the DATA frames have been sent. The - HEADERS frame starting the trailers header block has the END_STREAM flag - set. - - -
    - - END_STREAM - Transfer-Encoding: chunked + END_HEADERS - Trailer: Foo :status = 200 - content-length = 123 - 123 content-type = image/jpeg - {binary data} trailer = Foo - 0 - Foo: bar DATA - - END_STREAM - {binary data} - - HEADERS - + END_STREAM - + END_HEADERS - foo = bar -]]> -
    - - -
    - - An informational response using a 1xx status code other than 101 is transmitted as a - HEADERS frame, followed by zero or more CONTINUATION - frames: - - - END_STREAM - + END_HEADERS - :status = 103 - extension-field = bar -]]> -
    -
    - -
    - - In HTTP/1.1, an HTTP client is unable to retry a non-idempotent request when an error - occurs, because there is no means to determine the nature of the error. It is possible - that some server processing occurred prior to the error, which could result in - undesirable effects if the request were reattempted. - - - HTTP/2 provides two mechanisms for providing a guarantee to a client that a request has - not been processed: - - - The GOAWAY frame indicates the highest stream number that might have - been processed. Requests on streams with higher numbers are therefore guaranteed to - be safe to retry. - - - The REFUSED_STREAM error code can be included in a - RST_STREAM frame to indicate that the stream is being closed prior to - any processing having occurred. Any request that was sent on the reset stream can - be safely retried. - - - - - Requests that have not been processed have not failed; clients MAY automatically retry - them, even those with non-idempotent methods. - - - A server MUST NOT indicate that a stream has not been processed unless it can guarantee - that fact. If frames that are on a stream are passed to the application layer for any - stream, then REFUSED_STREAM MUST NOT be used for that stream, and a - GOAWAY frame MUST include a stream identifier that is greater than or - equal to the given stream identifier. - - - In addition to these mechanisms, the PING frame provides a way for a - client to easily test a connection. Connections that remain idle can become broken as - some middleboxes (for instance, network address translators, or load balancers) silently - discard connection bindings. The PING frame allows a client to safely - test whether a connection is still active without sending a request. - -
    -
    - -
    - - HTTP/2 allows a server to pre-emptively send (or "push") responses (along with - corresponding "promised" requests) to a client in association with a previous - client-initiated request. This can be useful when the server knows the client will need - to have those responses available in order to fully process the response to the original - request. - - - - Pushing additional message exchanges in this fashion is optional, and is negotiated - between individual endpoints. The SETTINGS_ENABLE_PUSH setting can be set - to 0 to indicate that server push is disabled. - - - Promised requests MUST be cacheable (see ), MUST be safe (see ) and MUST NOT include a request body. Clients that receive a - promised request that is not cacheable, unsafe or that includes a request body MUST - reset the stream with a stream error of type - PROTOCOL_ERROR. - - - Pushed responses that are cacheable (see ) can be stored by the client, if it implements a HTTP - cache. Pushed responses are considered successfully validated on the origin server (e.g., - if the "no-cache" cache response directive is present) while the stream identified by the - promised stream ID is still open. - - - Pushed responses that are not cacheable MUST NOT be stored by any HTTP cache. They MAY - be made available to the application separately. - - - An intermediary can receive pushes from the server and choose not to forward them on to - the client. In other words, how to make use of the pushed information is up to that - intermediary. Equally, the intermediary might choose to make additional pushes to the - client, without any action taken by the server. - - - A client cannot push. Thus, servers MUST treat the receipt of a - PUSH_PROMISE frame as a connection - error of type PROTOCOL_ERROR. Clients MUST reject any attempt to - change the SETTINGS_ENABLE_PUSH setting to a value other than 0 by treating - the message as a connection error of type - PROTOCOL_ERROR. - - -
    - - Server push is semantically equivalent to a server responding to a request; however, in - this case that request is also sent by the server, as a PUSH_PROMISE - frame. - - - The PUSH_PROMISE frame includes a header block that contains a complete - set of request header fields that the server attributes to the request. It is not - possible to push a response to a request that includes a request body. - - - - Pushed responses are always associated with an explicit request from the client. The - PUSH_PROMISE frames sent by the server are sent on that explicit - request's stream. The PUSH_PROMISE frame also includes a promised stream - identifier, chosen from the stream identifiers available to the server (see ). - - - - The header fields in PUSH_PROMISE and any subsequent - CONTINUATION frames MUST be a valid and complete set of request header fields. The server MUST include a method in - the :method header field that is safe and cacheable. If a - client receives a PUSH_PROMISE that does not include a complete and valid - set of header fields, or the :method header field identifies - a method that is not safe, it MUST respond with a stream error of type PROTOCOL_ERROR. - - - - The server SHOULD send PUSH_PROMISE () - frames prior to sending any frames that reference the promised responses. This avoids a - race where clients issue requests prior to receiving any PUSH_PROMISE - frames. - - - For example, if the server receives a request for a document containing embedded links - to multiple image files, and the server chooses to push those additional images to the - client, sending push promises before the DATA frames that contain the - image links ensures that the client is able to see the promises before discovering - embedded links. Similarly, if the server pushes responses referenced by the header block - (for instance, in Link header fields), sending the push promises before sending the - header block ensures that clients do not request them. - - - - PUSH_PROMISE frames MUST NOT be sent by the client. - - - PUSH_PROMISE frames can be sent by the server in response to any - client-initiated stream, but the stream MUST be in either the "open" or "half closed - (remote)" state with respect to the server. PUSH_PROMISE frames are - interspersed with the frames that comprise a response, though they cannot be - interspersed with HEADERS and CONTINUATION frames that - comprise a single header block. - - - Sending a PUSH_PROMISE frame creates a new stream and puts the stream - into the “reserved (local)” state for the server and the “reserved (remote)” state for - the client. - -
    - -
    - - After sending the PUSH_PROMISE frame, the server can begin delivering the - pushed response as a response on a server-initiated - stream that uses the promised stream identifier. The server uses this stream to - transmit an HTTP response, using the same sequence of frames as defined in . This stream becomes "half closed" - to the client after the initial HEADERS frame is sent. - - - - Once a client receives a PUSH_PROMISE frame and chooses to accept the - pushed response, the client SHOULD NOT issue any requests for the promised response - until after the promised stream has closed. - - - - If the client determines, for any reason, that it does not wish to receive the pushed - response from the server, or if the server takes too long to begin sending the promised - response, the client can send an RST_STREAM frame, using either the - CANCEL or REFUSED_STREAM codes, and referencing the pushed - stream's identifier. - - - A client can use the SETTINGS_MAX_CONCURRENT_STREAMS setting to limit the - number of responses that can be concurrently pushed by a server. Advertising a - SETTINGS_MAX_CONCURRENT_STREAMS value of zero disables server push by - preventing the server from creating the necessary streams. This does not prohibit a - server from sending PUSH_PROMISE frames; clients need to reset any - promised streams that are not wanted. - - - - Clients receiving a pushed response MUST validate that either the server is - authoritative (see ), or the proxy that provided the pushed - response is configured for the corresponding request. For example, a server that offers - a certificate for only the example.com DNS-ID or Common Name - is not permitted to push a response for https://www.example.org/doc. - - - The response for a PUSH_PROMISE stream begins with a - HEADERS frame, which immediately puts the stream into the “half closed - (remote)” state for the server and “half closed (local)” state for the client, and ends - with a frame bearing END_STREAM, which places the stream in the "closed" state. - - - The client never sends a frame with the END_STREAM flag for a server push. - - - -
    - -
    - -
    - - In HTTP/1.x, the pseudo-method CONNECT () is used to convert an HTTP connection into a tunnel to a remote host. - CONNECT is primarily used with HTTP proxies to establish a TLS session with an origin - server for the purposes of interacting with https resources. - - - In HTTP/2, the CONNECT method is used to establish a tunnel over a single HTTP/2 stream to - a remote host, for similar purposes. The HTTP header field mapping works as defined in - Request Header Fields, with a few - differences. Specifically: - - - The :method header field is set to CONNECT. - - - The :scheme and :path header - fields MUST be omitted. - - - The :authority header field contains the host and port to - connect to (equivalent to the authority-form of the request-target of CONNECT - requests, see ). - - - - - A proxy that supports CONNECT establishes a TCP connection to - the server identified in the :authority header field. Once - this connection is successfully established, the proxy sends a HEADERS - frame containing a 2xx series status code to the client, as defined in . - - - After the initial HEADERS frame sent by each peer, all subsequent - DATA frames correspond to data sent on the TCP connection. The payload of - any DATA frames sent by the client is transmitted by the proxy to the TCP - server; data received from the TCP server is assembled into DATA frames by - the proxy. Frame types other than DATA or stream management frames - (RST_STREAM, WINDOW_UPDATE, and PRIORITY) - MUST NOT be sent on a connected stream, and MUST be treated as a stream error if received. - - - The TCP connection can be closed by either peer. The END_STREAM flag on a - DATA frame is treated as being equivalent to the TCP FIN bit. A client is - expected to send a DATA frame with the END_STREAM flag set after receiving - a frame bearing the END_STREAM flag. A proxy that receives a DATA frame - with the END_STREAM flag set sends the attached data with the FIN bit set on the last TCP - segment. A proxy that receives a TCP segment with the FIN bit set sends a - DATA frame with the END_STREAM flag set. Note that the final TCP segment - or DATA frame could be empty. - - - A TCP connection error is signaled with RST_STREAM. A proxy treats any - error in the TCP connection, which includes receiving a TCP segment with the RST bit set, - as a stream error of type - CONNECT_ERROR. Correspondingly, a proxy MUST send a TCP segment with the - RST bit set if it detects an error with the stream or the HTTP/2 connection. - -
    -
    - -
    - - This section outlines attributes of the HTTP protocol that improve interoperability, reduce - exposure to known security vulnerabilities, or reduce the potential for implementation - variation. - - -
    - - HTTP/2 connections are persistent. For best performance, it is expected clients will not - close connections until it is determined that no further communication with a server is - necessary (for example, when a user navigates away from a particular web page), or until - the server closes the connection. - - - Clients SHOULD NOT open more than one HTTP/2 connection to a given host and port pair, - where host is derived from a URI, a selected alternative - service, or a configured proxy. - - - A client can create additional connections as replacements, either to replace connections - that are near to exhausting the available stream - identifier space, to refresh the keying material for a TLS connection, or to - replace connections that have encountered errors. - - - A client MAY open multiple connections to the same IP address and TCP port using different - Server Name Indication values or to provide different TLS - client certificates, but SHOULD avoid creating multiple connections with the same - configuration. - - - Servers are encouraged to maintain open connections for as long as possible, but are - permitted to terminate idle connections if necessary. When either endpoint chooses to - close the transport-layer TCP connection, the terminating endpoint SHOULD first send a - GOAWAY () frame so that both endpoints can reliably - determine whether previously sent frames have been processed and gracefully complete or - terminate any necessary remaining tasks. - - -
    - - Connections that are made to an origin servers, either directly or through a tunnel - created using the CONNECT method MAY be reused for - requests with multiple different URI authority components. A connection can be reused - as long as the origin server is authoritative. For - http resources, this depends on the host having resolved to - the same IP address. - - - For https resources, connection reuse additionally depends - on having a certificate that is valid for the host in the URI. An origin server might - offer a certificate with multiple subjectAltName attributes, - or names with wildcards, one of which is valid for the authority in the URI. For - example, a certificate with a subjectAltName of *.example.com might permit the use of the same connection for - requests to URIs starting with https://a.example.com/ and - https://b.example.com/. - - - In some deployments, reusing a connection for multiple origins can result in requests - being directed to the wrong origin server. For example, TLS termination might be - performed by a middlebox that uses the TLS Server Name Indication - (SNI) extension to select an origin server. This means that it is possible - for clients to send confidential information to servers that might not be the intended - target for the request, even though the server is otherwise authoritative. - - - A server that does not wish clients to reuse connections can indicate that it is not - authoritative for a request by sending a 421 (Misdirected Request) status code in response - to the request (see ). - - - A client that is configured to use a proxy over HTTP/2 directs requests to that proxy - through a single connection. That is, all requests sent via a proxy reuse the - connection to the proxy. - -
    - -
    - - The 421 (Misdirected Request) status code indicates that the request was directed at a - server that is not able to produce a response. This can be sent by a server that is not - configured to produce responses for the combination of scheme and authority that are - included in the request URI. - - - Clients receiving a 421 (Misdirected Request) response from a server MAY retry the - request - whether the request method is idempotent or not - over a different connection. - This is possible if a connection is reused () or if an alternative - service is selected (). - - - This status code MUST NOT be generated by proxies. - - - A 421 response is cacheable by default; i.e., unless otherwise indicated by the method - definition or explicit cache controls (see ). - -
    -
    - -
    - - Implementations of HTTP/2 MUST support TLS 1.2 for HTTP/2 over - TLS. The general TLS usage guidance in SHOULD be followed, with - some additional restrictions that are specific to HTTP/2. - - - - An implementation of HTTP/2 over TLS MUST use TLS 1.2 or higher with the restrictions on - feature set and cipher suite described in this section. Due to implementation - limitations, it might not be possible to fail TLS negotiation. An endpoint MUST - immediately terminate an HTTP/2 connection that does not meet these minimum requirements - with a connection error of type - INADEQUATE_SECURITY. - - -
    - - The TLS implementation MUST support the Server Name Indication - (SNI) extension to TLS. HTTP/2 clients MUST indicate the target domain name when - negotiating TLS. - - - The TLS implementation MUST disable compression. TLS compression can lead to the - exposure of information that would not otherwise be revealed . - Generic compression is unnecessary since HTTP/2 provides compression features that are - more aware of context and therefore likely to be more appropriate for use for - performance, security or other reasons. - - - The TLS implementation MUST disable renegotiation. An endpoint MUST treat a TLS - renegotiation as a connection error of type - PROTOCOL_ERROR. Note that disabling renegotiation can result in - long-lived connections becoming unusable due to limits on the number of messages the - underlying cipher suite can encipher. - - - A client MAY use renegotiation to provide confidentiality protection for client - credentials offered in the handshake, but any renegotiation MUST occur prior to sending - the connection preface. A server SHOULD request a client certificate if it sees a - renegotiation request immediately after establishing a connection. - - - This effectively prevents the use of renegotiation in response to a request for a - specific protected resource. A future specification might provide a way to support this - use case. - -
    - -
    - - The set of TLS cipher suites that are permitted in HTTP/2 is restricted. HTTP/2 MUST - only be used with cipher suites that have ephemeral key exchange, such as the ephemeral Diffie-Hellman (DHE) or the elliptic curve variant (ECDHE). Ephemeral key exchange MUST - have a minimum size of 2048 bits for DHE or security level of 128 bits for ECDHE. - Clients MUST accept DHE sizes of up to 4096 bits. HTTP MUST NOT be used with cipher - suites that use stream or block ciphers. Authenticated Encryption with Additional Data - (AEAD) modes, such as the Galois Counter Model (GCM) mode for - AES are acceptable. - - - The effect of these restrictions is that TLS 1.2 implementations could have - non-intersecting sets of available cipher suites, since these prevent the use of the - cipher suite that TLS 1.2 makes mandatory. To avoid this problem, implementations of - HTTP/2 that use TLS 1.2 MUST support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 with P256 . - - - Clients MAY advertise support of cipher suites that are prohibited by the above - restrictions in order to allow for connection to servers that do not support HTTP/2. - This enables a fallback to protocols without these constraints without the additional - latency imposed by using a separate connection for fallback. - -
    -
    -
    - -
    -
    - - HTTP/2 relies on the HTTP/1.1 definition of authority for determining whether a server is - authoritative in providing a given response, see . This relies on local name resolution for the "http" - URI scheme, and the authenticated server identity for the "https" scheme (see ). - -
    - -
    - - In a cross-protocol attack, an attacker causes a client to initiate a transaction in one - protocol toward a server that understands a different protocol. An attacker might be able - to cause the transaction to appear as valid transaction in the second protocol. In - combination with the capabilities of the web context, this can be used to interact with - poorly protected servers in private networks. - - - Completing a TLS handshake with an ALPN identifier for HTTP/2 can be considered sufficient - protection against cross protocol attacks. ALPN provides a positive indication that a - server is willing to proceed with HTTP/2, which prevents attacks on other TLS-based - protocols. - - - The encryption in TLS makes it difficult for attackers to control the data which could be - used in a cross-protocol attack on a cleartext protocol. - - - The cleartext version of HTTP/2 has minimal protection against cross-protocol attacks. - The connection preface contains a string that is - designed to confuse HTTP/1.1 servers, but no special protection is offered for other - protocols. A server that is willing to ignore parts of an HTTP/1.1 request containing an - Upgrade header field in addition to the client connection preface could be exposed to a - cross-protocol attack. - -
    - -
    - - HTTP/2 header field names and values are encoded as sequences of octets with a length - prefix. This enables HTTP/2 to carry any string of octets as the name or value of a - header field. An intermediary that translates HTTP/2 requests or responses into HTTP/1.1 - directly could permit the creation of corrupted HTTP/1.1 messages. An attacker might - exploit this behavior to cause the intermediary to create HTTP/1.1 messages with illegal - header fields, extra header fields, or even new messages that are entirely falsified. - - - Header field names or values that contain characters not permitted by HTTP/1.1, including - carriage return (ASCII 0xd) or line feed (ASCII 0xa) MUST NOT be translated verbatim by an - intermediary, as stipulated in . - - - Translation from HTTP/1.x to HTTP/2 does not produce the same opportunity to an attacker. - Intermediaries that perform translation to HTTP/2 MUST remove any instances of the obs-fold production from header field values. - -
    - -
    - - Pushed responses do not have an explicit request from the client; the request - is provided by the server in the PUSH_PROMISE frame. - - - Caching responses that are pushed is possible based on the guidance provided by the origin - server in the Cache-Control header field. However, this can cause issues if a single - server hosts more than one tenant. For example, a server might offer multiple users each - a small portion of its URI space. - - - Where multiple tenants share space on the same server, that server MUST ensure that - tenants are not able to push representations of resources that they do not have authority - over. Failure to enforce this would allow a tenant to provide a representation that would - be served out of cache, overriding the actual representation that the authoritative tenant - provides. - - - Pushed responses for which an origin server is not authoritative (see - ) are never cached or used. - -
    - -
    - - An HTTP/2 connection can demand a greater commitment of resources to operate than a - HTTP/1.1 connection. The use of header compression and flow control depend on a - commitment of resources for storing a greater amount of state. Settings for these - features ensure that memory commitments for these features are strictly bounded. - - - The number of PUSH_PROMISE frames is not constrained in the same fashion. - A client that accepts server push SHOULD limit the number of streams it allows to be in - the "reserved (remote)" state. Excessive number of server push streams can be treated as - a stream error of type - ENHANCE_YOUR_CALM. - - - Processing capacity cannot be guarded as effectively as state capacity. - - - The SETTINGS frame can be abused to cause a peer to expend additional - processing time. This might be done by pointlessly changing SETTINGS parameters, setting - multiple undefined parameters, or changing the same setting multiple times in the same - frame. WINDOW_UPDATE or PRIORITY frames can be abused to - cause an unnecessary waste of resources. - - - Large numbers of small or empty frames can be abused to cause a peer to expend time - processing frame headers. Note however that some uses are entirely legitimate, such as - the sending of an empty DATA frame to end a stream. - - - Header compression also offers some opportunities to waste processing resources; see for more details on potential abuses. - - - Limits in SETTINGS parameters cannot be reduced instantaneously, which - leaves an endpoint exposed to behavior from a peer that could exceed the new limits. In - particular, immediately after establishing a connection, limits set by a server are not - known to clients and could be exceeded without being an obvious protocol violation. - - - All these features - i.e., SETTINGS changes, small frames, header - compression - have legitimate uses. These features become a burden only when they are - used unnecessarily or to excess. - - - An endpoint that doesn't monitor this behavior exposes itself to a risk of denial of - service attack. Implementations SHOULD track the use of these features and set limits on - their use. An endpoint MAY treat activity that is suspicious as a connection error of type - ENHANCE_YOUR_CALM. - - -
    - - A large header block can cause an implementation to - commit a large amount of state. Header fields that are critical for routing can appear - toward the end of a header block, which prevents streaming of header fields to their - ultimate destination. For this an other reasons, such as ensuring cache correctness, - means that an endpoint might need to buffer the entire header block. Since there is no - hard limit to the size of a header block, some endpoints could be forced commit a large - amount of available memory for header fields. - - - An endpoint can use the SETTINGS_MAX_HEADER_LIST_SIZE to advise peers of - limits that might apply on the size of header blocks. This setting is only advisory, so - endpoints MAY choose to send header blocks that exceed this limit and risk having the - request or response being treated as malformed. This setting specific to a connection, - so any request or response could encounter a hop with a lower, unknown limit. An - intermediary can attempt to avoid this problem by passing on values presented by - different peers, but they are not obligated to do so. - - - A server that receives a larger header block than it is willing to handle can send an - HTTP 431 (Request Header Fields Too Large) status code . A - client can discard responses that it cannot process. The header block MUST be processed - to ensure a consistent connection state, unless the connection is closed. - -
    -
    - -
    - - HTTP/2 enables greater use of compression for both header fields () and entity bodies. Compression can allow an attacker to recover - secret data when it is compressed in the same context as data under attacker control. - - - There are demonstrable attacks on compression that exploit the characteristics of the web - (e.g., ). The attacker induces multiple requests containing - varying plaintext, observing the length of the resulting ciphertext in each, which - reveals a shorter length when a guess about the secret is correct. - - - Implementations communicating on a secure channel MUST NOT compress content that includes - both confidential and attacker-controlled data unless separate compression dictionaries - are used for each source of data. Compression MUST NOT be used if the source of data - cannot be reliably determined. Generic stream compression, such as that provided by TLS - MUST NOT be used with HTTP/2 (). - - - Further considerations regarding the compression of header fields are described in . - -
    - -
    - - Padding within HTTP/2 is not intended as a replacement for general purpose padding, such - as might be provided by TLS. Redundant padding could even be - counterproductive. Correct application can depend on having specific knowledge of the - data that is being padded. - - - To mitigate attacks that rely on compression, disabling or limiting compression might be - preferable to padding as a countermeasure. - - - Padding can be used to obscure the exact size of frame content, and is provided to - mitigate specific attacks within HTTP. For example, attacks where compressed content - includes both attacker-controlled plaintext and secret data (see for example, ). - - - Use of padding can result in less protection than might seem immediately obvious. At - best, padding only makes it more difficult for an attacker to infer length information by - increasing the number of frames an attacker has to observe. Incorrectly implemented - padding schemes can be easily defeated. In particular, randomized padding with a - predictable distribution provides very little protection; similarly, padding payloads to a - fixed size exposes information as payload sizes cross the fixed size boundary, which could - be possible if an attacker can control plaintext. - - - Intermediaries SHOULD retain padding for DATA frames, but MAY drop padding - for HEADERS and PUSH_PROMISE frames. A valid reason for an - intermediary to change the amount of padding of frames is to improve the protections that - padding provides. - -
    - -
    - - Several characteristics of HTTP/2 provide an observer an opportunity to correlate actions - of a single client or server over time. This includes the value of settings, the manner - in which flow control windows are managed, the way priorities are allocated to streams, - timing of reactions to stimulus, and handling of any optional features. - - - As far as this creates observable differences in behavior, they could be used as a basis - for fingerprinting a specific client, as defined in . - -
    -
    - -
    - - A string for identifying HTTP/2 is entered into the "Application Layer Protocol Negotiation - (ALPN) Protocol IDs" registry established in . - - - This document establishes a registry for frame types, settings, and error codes. These new - registries are entered into a new "Hypertext Transfer Protocol (HTTP) 2 Parameters" section. - - - This document registers the HTTP2-Settings header field for - use in HTTP; and the 421 (Misdirected Request) status code. - - - This document registers the PRI method for use in HTTP, to avoid - collisions with the connection preface. - - -
    - - This document creates two registrations for the identification of HTTP/2 in the - "Application Layer Protocol Negotiation (ALPN) Protocol IDs" registry established in . - - - The "h2" string identifies HTTP/2 when used over TLS: - - HTTP/2 over TLS - 0x68 0x32 ("h2") - This document - - - - The "h2c" string identifies HTTP/2 when used over cleartext TCP: - - HTTP/2 over TCP - 0x68 0x32 0x63 ("h2c") - This document - - -
    - -
    - - This document establishes a registry for HTTP/2 frame type codes. The "HTTP/2 Frame - Type" registry manages an 8-bit space. The "HTTP/2 Frame Type" registry operates under - either of the "IETF Review" or "IESG Approval" policies for - values between 0x00 and 0xef, with values between 0xf0 and 0xff being reserved for - experimental use. - - - New entries in this registry require the following information: - - - A name or label for the frame type. - - - The 8-bit code assigned to the frame type. - - - A reference to a specification that includes a description of the frame layout, - it's semantics and flags that the frame type uses, including any parts of the frame - that are conditionally present based on the value of flags. - - - - - The entries in the following table are registered by this document. - - - Frame Type - Code - Section - DATA0x0 - HEADERS0x1 - PRIORITY0x2 - RST_STREAM0x3 - SETTINGS0x4 - PUSH_PROMISE0x5 - PING0x6 - GOAWAY0x7 - WINDOW_UPDATE0x8 - CONTINUATION0x9 - -
    - -
    - - This document establishes a registry for HTTP/2 settings. The "HTTP/2 Settings" registry - manages a 16-bit space. The "HTTP/2 Settings" registry operates under the "Expert Review" policy for values in the range from 0x0000 to - 0xefff, with values between and 0xf000 and 0xffff being reserved for experimental use. - - - New registrations are advised to provide the following information: - - - A symbolic name for the setting. Specifying a setting name is optional. - - - The 16-bit code assigned to the setting. - - - An initial value for the setting. - - - An optional reference to a specification that describes the use of the setting. - - - - - An initial set of setting registrations can be found in . - - - Name - Code - Initial Value - Specification - HEADER_TABLE_SIZE - 0x14096 - ENABLE_PUSH - 0x21 - MAX_CONCURRENT_STREAMS - 0x3(infinite) - INITIAL_WINDOW_SIZE - 0x465535 - MAX_FRAME_SIZE - 0x516384 - MAX_HEADER_LIST_SIZE - 0x6(infinite) - - -
    - -
    - - This document establishes a registry for HTTP/2 error codes. The "HTTP/2 Error Code" - registry manages a 32-bit space. The "HTTP/2 Error Code" registry operates under the - "Expert Review" policy. - - - Registrations for error codes are required to include a description of the error code. An - expert reviewer is advised to examine new registrations for possible duplication with - existing error codes. Use of existing registrations is to be encouraged, but not - mandated. - - - New registrations are advised to provide the following information: - - - A name for the error code. Specifying an error code name is optional. - - - The 32-bit error code value. - - - A brief description of the error code semantics, longer if no detailed specification - is provided. - - - An optional reference for a specification that defines the error code. - - - - - The entries in the following table are registered by this document. - - - Name - Code - Description - Specification - NO_ERROR0x0 - Graceful shutdown - - PROTOCOL_ERROR0x1 - Protocol error detected - - INTERNAL_ERROR0x2 - Implementation fault - - FLOW_CONTROL_ERROR0x3 - Flow control limits exceeded - - SETTINGS_TIMEOUT0x4 - Settings not acknowledged - - STREAM_CLOSED0x5 - Frame received for closed stream - - FRAME_SIZE_ERROR0x6 - Frame size incorrect - - REFUSED_STREAM0x7 - Stream not processed - - CANCEL0x8 - Stream cancelled - - COMPRESSION_ERROR0x9 - Compression state not updated - - CONNECT_ERROR0xa - TCP connection error for CONNECT method - - ENHANCE_YOUR_CALM0xb - Processing capacity exceeded - - INADEQUATE_SECURITY0xc - Negotiated TLS parameters not acceptable - - - -
    - -
    - - This section registers the HTTP2-Settings header field in the - Permanent Message Header Field Registry. - - - HTTP2-Settings - - - http - - - standard - - - IETF - - - of this document - - - This header field is only used by an HTTP/2 client for Upgrade-based negotiation. - - - -
    - -
    - - This section registers the PRI method in the HTTP Method - Registry (). - - - PRI - - - No - - - No - - - of this document - - - This method is never used by an actual client. This method will appear to be used - when an HTTP/1.1 server or intermediary attempts to parse an HTTP/2 connection - preface. - - - -
    - -
    - - This document registers the 421 (Misdirected Request) HTTP Status code in the Hypertext - Transfer Protocol (HTTP) Status Code Registry (). - - - - - 421 - - - Misdirected Request - - - of this document - - - -
    - -
    - -
    - - This document includes substantial input from the following individuals: - - - Adam Langley, Wan-Teh Chang, Jim Morrison, Mark Nottingham, Alyssa Wilk, Costin - Manolache, William Chan, Vitaliy Lvin, Joe Chan, Adam Barth, Ryan Hamilton, Gavin - Peters, Kent Alstad, Kevin Lindsay, Paul Amer, Fan Yang, Jonathan Leighton (SPDY - contributors). - - - Gabriel Montenegro and Willy Tarreau (Upgrade mechanism). - - - William Chan, Salvatore Loreto, Osama Mazahir, Gabriel Montenegro, Jitu Padhye, Roberto - Peon, Rob Trace (Flow control). - - - Mike Bishop (Extensibility). - - - Mark Nottingham, Julian Reschke, James Snell, Jeff Pinner, Mike Bishop, Herve Ruellan - (Substantial editorial contributions). - - - Kari Hurtta, Tatsuhiro Tsujikawa, Greg Wilkins, Poul-Henning Kamp. - - - Alexey Melnikov was an editor of this document during 2013. - - - A substantial proportion of Martin's contribution was supported by Microsoft during his - employment there. - - - -
    -
    - - - - - - HPACK - Header Compression for HTTP/2 - - - - - - - - - - - - Transmission Control Protocol - - - University of Southern California (USC)/Information Sciences - Institute - - - - - - - - - - - Key words for use in RFCs to Indicate Requirement Levels - - - Harvard University -
    sob@harvard.edu
    -
    - -
    - - -
    - - - - - HTTP Over TLS - - - - - - - - - - Uniform Resource Identifier (URI): Generic - Syntax - - - - - - - - - - - - The Base16, Base32, and Base64 Data Encodings - - - - - - - - - Guidelines for Writing an IANA Considerations Section in RFCs - - - - - - - - - - - Augmented BNF for Syntax Specifications: ABNF - - - - - - - - - - - The Transport Layer Security (TLS) Protocol Version 1.2 - - - - - - - - - - - Transport Layer Security (TLS) Extensions: Extension Definitions - - - - - - - - - - Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension - - - - - - - - - - - - - TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois - Counter Mode (GCM) - - - - - - - - - - - Digital Signature Standard (DSS) - - NIST - - - - - - - - - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing - - Adobe Systems Incorporated -
    fielding@gbiv.com
    -
    - - greenbytes GmbH -
    julian.reschke@greenbytes.de
    -
    - -
    - - -
    - - - - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content - - Adobe Systems Incorporated -
    fielding@gbiv.com
    -
    - - greenbytes GmbH -
    julian.reschke@greenbytes.de
    -
    - -
    - - -
    - - - Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests - - Adobe Systems Incorporated -
    fielding@gbiv.com
    -
    - - greenbytes GmbH -
    julian.reschke@greenbytes.de
    -
    - -
    - -
    - - - Hypertext Transfer Protocol (HTTP/1.1): Range Requests - - Adobe Systems Incorporated -
    fielding@gbiv.com
    -
    - - World Wide Web Consortium -
    ylafon@w3.org
    -
    - - greenbytes GmbH -
    julian.reschke@greenbytes.de
    -
    - -
    - -
    - - - Hypertext Transfer Protocol (HTTP/1.1): Caching - - Adobe Systems Incorporated -
    fielding@gbiv.com
    -
    - - Akamai -
    mnot@mnot.net
    -
    - - greenbytes GmbH -
    julian.reschke@greenbytes.de
    -
    - -
    - - -
    - - - Hypertext Transfer Protocol (HTTP/1.1): Authentication - - Adobe Systems Incorporated -
    fielding@gbiv.com
    -
    - - greenbytes GmbH -
    julian.reschke@greenbytes.de
    -
    - -
    - - -
    - - - - HTTP State Management Mechanism - - - - - -
    - - - - - - TCP Extensions for High Performance - - - - - - - - - - - - Transport Layer Security Protocol Compression Methods - - - - - - - - - Additional HTTP Status Codes - - - - - - - - - - - Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS) - - - - - - - - - - - - - - - AES Galois Counter Mode (GCM) Cipher Suites for TLS - - - - - - - - - - - - HTML5 - - - - - - - - - - - Latest version available at - . - - - - - - - Talking to Yourself for Fun and Profit - - - - - - - - - - - - - - BREACH: Reviving the CRIME Attack - - - - - - - - - - - Registration Procedures for Message Header Fields - - Nine by Nine -
    GK-IETF@ninebynine.org
    -
    - - BEA Systems -
    mnot@pobox.com
    -
    - - HP Labs -
    JeffMogul@acm.org
    -
    - -
    - - -
    - - - - Recommendations for Secure Use of TLS and DTLS - - - - - - - - - - - - - - - - - - HTTP Alternative Services - - - Akamai - - - Mozilla - - - greenbytes - - - - - - -
    - -
    - - This section is to be removed by RFC Editor before publication. - - -
    - - Renamed Not Authoritative status code to Misdirected Request. - -
    - -
    - - Pseudo-header fields are now required to appear strictly before regular ones. - - - Restored 1xx series status codes, except 101. - - - Changed frame length field 24-bits. Expanded frame header to 9 octets. Added a setting - to limit the damage. - - - Added a setting to advise peers of header set size limits. - - - Removed segments. - - - Made non-semantic-bearing HEADERS frames illegal in the HTTP mapping. - -
    - -
    - - Restored extensibility options. - - - Restricting TLS cipher suites to AEAD only. - - - Removing Content-Encoding requirements. - - - Permitting the use of PRIORITY after stream close. - - - Removed ALTSVC frame. - - - Removed BLOCKED frame. - - - Reducing the maximum padding size to 256 octets; removing padding from - CONTINUATION frames. - - - Removed per-frame GZIP compression. - -
    - -
    - - Added BLOCKED frame (at risk). - - - Simplified priority scheme. - - - Added DATA per-frame GZIP compression. - -
    - -
    - - Changed "connection header" to "connection preface" to avoid confusion. - - - Added dependency-based stream prioritization. - - - Added "h2c" identifier to distinguish between cleartext and secured HTTP/2. - - - Adding missing padding to PUSH_PROMISE. - - - Integrate ALTSVC frame and supporting text. - - - Dropping requirement on "deflate" Content-Encoding. - - - Improving security considerations around use of compression. - -
    - -
    - - Adding padding for data frames. - - - Renumbering frame types, error codes, and settings. - - - Adding INADEQUATE_SECURITY error code. - - - Updating TLS usage requirements to 1.2; forbidding TLS compression. - - - Removing extensibility for frames and settings. - - - Changing setting identifier size. - - - Removing the ability to disable flow control. - - - Changing the protocol identification token to "h2". - - - Changing the use of :authority to make it optional and to allow userinfo in non-HTTP - cases. - - - Allowing split on 0x0 for Cookie. - - - Reserved PRI method in HTTP/1.1 to avoid possible future collisions. - -
    - -
    - - Added cookie crumbling for more efficient header compression. - - - Added header field ordering with the value-concatenation mechanism. - -
    - -
    - - Marked draft for implementation. - -
    - -
    - - Adding definition for CONNECT method. - - - Constraining the use of push to safe, cacheable methods with no request body. - - - Changing from :host to :authority to remove any potential confusion. - - - Adding setting for header compression table size. - - - Adding settings acknowledgement. - - - Removing unnecessary and potentially problematic flags from CONTINUATION. - - - Added denial of service considerations. - -
    -
    - - Marking the draft ready for implementation. - - - Renumbering END_PUSH_PROMISE flag. - - - Editorial clarifications and changes. - -
    - -
    - - Added CONTINUATION frame for HEADERS and PUSH_PROMISE. - - - PUSH_PROMISE is no longer implicitly prohibited if SETTINGS_MAX_CONCURRENT_STREAMS is - zero. - - - Push expanded to allow all safe methods without a request body. - - - Clarified the use of HTTP header fields in requests and responses. Prohibited HTTP/1.1 - hop-by-hop header fields. - - - Requiring that intermediaries not forward requests with missing or illegal routing - :-headers. - - - Clarified requirements around handling different frames after stream close, stream reset - and GOAWAY. - - - Added more specific prohibitions for sending of different frame types in various stream - states. - - - Making the last received setting value the effective value. - - - Clarified requirements on TLS version, extension and ciphers. - -
    - -
    - - Committed major restructuring atrocities. - - - Added reference to first header compression draft. - - - Added more formal description of frame lifecycle. - - - Moved END_STREAM (renamed from FINAL) back to HEADERS/DATA. - - - Removed HEADERS+PRIORITY, added optional priority to HEADERS frame. - - - Added PRIORITY frame. - -
    - -
    - - Added continuations to frames carrying header blocks. - - - Replaced use of "session" with "connection" to avoid confusion with other HTTP stateful - concepts, like cookies. - - - Removed "message". - - - Switched to TLS ALPN from NPN. - - - Editorial changes. - -
    - -
    - - Added IANA considerations section for frame types, error codes and settings. - - - Removed data frame compression. - - - Added PUSH_PROMISE. - - - Added globally applicable flags to framing. - - - Removed zlib-based header compression mechanism. - - - Updated references. - - - Clarified stream identifier reuse. - - - Removed CREDENTIALS frame and associated mechanisms. - - - Added advice against naive implementation of flow control. - - - Added session header section. - - - Restructured frame header. Removed distinction between data and control frames. - - - Altered flow control properties to include session-level limits. - - - Added note on cacheability of pushed resources and multiple tenant servers. - - - Changed protocol label form based on discussions. - -
    - -
    - - Changed title throughout. - - - Removed section on Incompatibilities with SPDY draft#2. - - - Changed INTERNAL_ERROR on GOAWAY to have a value of 2 . - - - Replaced abstract and introduction. - - - Added section on starting HTTP/2.0, including upgrade mechanism. - - - Removed unused references. - - - Added flow control principles based on . - -
    - -
    - - Adopted as base for draft-ietf-httpbis-http2. - - - Updated authors/editors list. - - - Added status note. - -
    -
    - -
    -
    - diff --git a/deps/golang.org/x/net/http2/transport.go b/deps/golang.org/x/net/http2/transport.go index d23a22625..e0dfe9f6a 100644 --- a/deps/golang.org/x/net/http2/transport.go +++ b/deps/golang.org/x/net/http2/transport.go @@ -27,9 +27,9 @@ import ( "sync" "time" - "golang.org/x/net/http/httpguts" "golang.org/x/net/http2/hpack" "golang.org/x/net/idna" + "golang.org/x/net/lex/httplex" ) const ( @@ -87,7 +87,7 @@ type Transport struct { // MaxHeaderListSize is the http2 SETTINGS_MAX_HEADER_LIST_SIZE to // send in the initial settings frame. It is how many bytes - // of response headers are allowed. Unlike the http2 spec, zero here + // of response headers are allow. Unlike the http2 spec, zero here // means to use a default limit (currently 10MB). If you actually // want to advertise an ulimited value to the peer, Transport // interprets the highest possible value here (0xffffffff or 1<<32-1) @@ -172,10 +172,9 @@ type ClientConn struct { fr *Framer lastActive time.Time // Settings from peer: (also guarded by mu) - maxFrameSize uint32 - maxConcurrentStreams uint32 - peerMaxHeaderListSize uint64 - initialWindowSize uint32 + maxFrameSize uint32 + maxConcurrentStreams uint32 + initialWindowSize uint32 hbuf bytes.Buffer // HPACK encoder writes into this henc *hpack.Encoder @@ -274,13 +273,6 @@ func (cs *clientStream) checkResetOrDone() error { } } -func (cs *clientStream) getStartedWrite() bool { - cc := cs.cc - cc.mu.Lock() - defer cc.mu.Unlock() - return cs.startedWrite -} - func (cs *clientStream) abortRequestBodyWrite(err error) { if err == nil { panic("nil error") @@ -306,26 +298,7 @@ func (sew stickyErrWriter) Write(p []byte) (n int, err error) { return } -// noCachedConnError is the concrete type of ErrNoCachedConn, which -// needs to be detected by net/http regardless of whether it's its -// bundled version (in h2_bundle.go with a rewritten type name) or -// from a user's x/net/http2. As such, as it has a unique method name -// (IsHTTP2NoCachedConnError) that net/http sniffs for via func -// isNoCachedConnError. -type noCachedConnError struct{} - -func (noCachedConnError) IsHTTP2NoCachedConnError() {} -func (noCachedConnError) Error() string { return "http2: no cached connection was available" } - -// isNoCachedConnError reports whether err is of type noCachedConnError -// or its equivalent renamed type in net/http2's h2_bundle.go. Both types -// may coexist in the same running program. -func isNoCachedConnError(err error) bool { - _, ok := err.(interface{ IsHTTP2NoCachedConnError() }) - return ok -} - -var ErrNoCachedConn error = noCachedConnError{} +var ErrNoCachedConn = errors.New("http2: no cached connection was available") // RoundTripOpt are options for the Transport.RoundTripOpt method. type RoundTripOpt struct { @@ -375,9 +348,14 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res return nil, err } traceGotConn(req, cc) - res, gotErrAfterReqBodyWrite, err := cc.roundTrip(req) + res, err := cc.RoundTrip(req) if err != nil && retry <= 6 { - if req, err = shouldRetryRequest(req, err, gotErrAfterReqBodyWrite); err == nil { + afterBodyWrite := false + if e, ok := err.(afterReqBodyWriteError); ok { + err = e + afterBodyWrite = true + } + if req, err = shouldRetryRequest(req, err, afterBodyWrite); err == nil { // After the first retry, do exponential backoff with 10% jitter. if retry == 0 { continue @@ -415,6 +393,16 @@ var ( errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY") ) +// afterReqBodyWriteError is a wrapper around errors returned by ClientConn.RoundTrip. +// It is used to signal that err happened after part of Request.Body was sent to the server. +type afterReqBodyWriteError struct { + err error +} + +func (e afterReqBodyWriteError) Error() string { + return e.err.Error() + "; some request body already written" +} + // shouldRetryRequest is called by RoundTrip when a request fails to get // response headers. It is always called with a non-nil error. // It returns either a request to retry (either the same request, or a @@ -531,18 +519,17 @@ func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { cc := &ClientConn{ - t: t, - tconn: c, - readerDone: make(chan struct{}), - nextStreamID: 1, - maxFrameSize: 16 << 10, // spec default - initialWindowSize: 65535, // spec default - maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. - peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead. - streams: make(map[uint32]*clientStream), - singleUse: singleUse, - wantSettingsAck: true, - pings: make(map[[8]byte]chan struct{}), + t: t, + tconn: c, + readerDone: make(chan struct{}), + nextStreamID: 1, + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. + streams: make(map[uint32]*clientStream), + singleUse: singleUse, + wantSettingsAck: true, + pings: make(map[[8]byte]chan struct{}), } if d := t.idleConnTimeout(); d != 0 { cc.idleTimeout = d @@ -567,10 +554,6 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro // henc in response to SETTINGS frames? cc.henc = hpack.NewEncoder(&cc.hbuf) - if t.AllowHTTP { - cc.nextStreamID = 3 - } - if cs, ok := c.(connectionStater); ok { state := cs.ConnectionState() cc.tlsState = &state @@ -767,13 +750,8 @@ func actualContentLength(req *http.Request) int64 { } func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { - resp, _, err := cc.roundTrip(req) - return resp, err -} - -func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAfterReqBodyWrite bool, err error) { if err := checkConnHeaders(req); err != nil { - return nil, false, err + return nil, err } if cc.idleTimer != nil { cc.idleTimer.Stop() @@ -781,14 +759,14 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf trailers, err := commaSeparatedTrailers(req) if err != nil { - return nil, false, err + return nil, err } hasTrailers := trailers != "" cc.mu.Lock() if err := cc.awaitOpenSlotForRequest(req); err != nil { cc.mu.Unlock() - return nil, false, err + return nil, err } body := req.Body @@ -822,7 +800,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf hdrs, err := cc.encodeHeaders(req, requestedGzip, trailers, contentLen) if err != nil { cc.mu.Unlock() - return nil, false, err + return nil, err } cs := cc.newStream() @@ -834,7 +812,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf cc.wmu.Lock() endStream := !hasBody && !hasTrailers - werr := cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs) + werr := cc.writeHeaders(cs.ID, endStream, hdrs) cc.wmu.Unlock() traceWroteHeaders(cs.trace) cc.mu.Unlock() @@ -848,7 +826,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf // Don't bother sending a RST_STREAM (our write already failed; // no need to keep writing) traceWroteRequest(cs.trace, werr) - return nil, false, werr + return nil, werr } var respHeaderTimer <-chan time.Time @@ -867,7 +845,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf bodyWritten := false ctx := reqContext(req) - handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) { + handleReadLoopResponse := func(re resAndError) (*http.Response, error) { res := re.res if re.err != nil || res.StatusCode > 299 { // On error or status code 3xx, 4xx, 5xx, etc abort any @@ -883,12 +861,18 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf cs.abortRequestBodyWrite(errStopReqBodyWrite) } if re.err != nil { + cc.mu.Lock() + afterBodyWrite := cs.startedWrite + cc.mu.Unlock() cc.forgetStreamID(cs.ID) - return nil, cs.getStartedWrite(), re.err + if afterBodyWrite { + return nil, afterReqBodyWriteError{re.err} + } + return nil, re.err } res.Request = req res.TLS = cc.tlsState - return res, false, nil + return res, nil } for { @@ -903,7 +887,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) } cc.forgetStreamID(cs.ID) - return nil, cs.getStartedWrite(), errTimeout + return nil, errTimeout case <-ctx.Done(): if !hasBody || bodyWritten { cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) @@ -912,7 +896,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) } cc.forgetStreamID(cs.ID) - return nil, cs.getStartedWrite(), ctx.Err() + return nil, ctx.Err() case <-req.Cancel: if !hasBody || bodyWritten { cc.writeStreamReset(cs.ID, ErrCodeCancel, nil) @@ -921,12 +905,12 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel) } cc.forgetStreamID(cs.ID) - return nil, cs.getStartedWrite(), errRequestCanceled + return nil, errRequestCanceled case <-cs.peerReset: // processResetStream already removed the // stream from the streams map; no need for // forgetStreamID. - return nil, cs.getStartedWrite(), cs.resetErr + return nil, cs.resetErr case err := <-bodyWriter.resc: // Prefer the read loop's response, if available. Issue 16102. select { @@ -935,7 +919,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf default: } if err != nil { - return nil, cs.getStartedWrite(), err + return nil, err } bodyWritten = true if d := cc.responseHeaderTimeout(); d != 0 { @@ -955,9 +939,6 @@ func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error { for { cc.lastActive = time.Now() if cc.closed || !cc.canTakeNewRequestLocked() { - if waitingForConn != nil { - close(waitingForConn) - } return errClientConnUnusable } if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) { @@ -990,12 +971,13 @@ func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error { } // requires cc.wmu be held -func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, maxFrameSize int, hdrs []byte) error { +func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, hdrs []byte) error { first := true // first frame written (HEADERS is first, then CONTINUATION) + frameSize := int(cc.maxFrameSize) for len(hdrs) > 0 && cc.werr == nil { chunk := hdrs - if len(chunk) > maxFrameSize { - chunk = chunk[:maxFrameSize] + if len(chunk) > frameSize { + chunk = chunk[:frameSize] } hdrs = hdrs[len(chunk):] endHeaders := len(hdrs) == 0 @@ -1103,26 +1085,17 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) ( var trls []byte if hasTrailers { cc.mu.Lock() - trls, err = cc.encodeTrailers(req) - cc.mu.Unlock() - if err != nil { - cc.writeStreamReset(cs.ID, ErrCodeInternal, err) - cc.forgetStreamID(cs.ID) - return err - } + defer cc.mu.Unlock() + trls = cc.encodeTrailers(req) } - cc.mu.Lock() - maxFrameSize := int(cc.maxFrameSize) - cc.mu.Unlock() - cc.wmu.Lock() defer cc.wmu.Unlock() // Two ways to send END_STREAM: either with trailers, or // with an empty DATA frame. if len(trls) > 0 { - err = cc.writeHeaders(cs.ID, true, maxFrameSize, trls) + err = cc.writeHeaders(cs.ID, true, trls) } else { err = cc.fr.WriteData(cs.ID, true, nil) } @@ -1181,7 +1154,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail if host == "" { host = req.URL.Host } - host, err := httpguts.PunycodeHostPort(host) + host, err := httplex.PunycodeHostPort(host) if err != nil { return nil, err } @@ -1206,96 +1179,72 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail // potentially pollute our hpack state. (We want to be able to // continue to reuse the hpack encoder for future requests) for k, vv := range req.Header { - if !httpguts.ValidHeaderFieldName(k) { + if !httplex.ValidHeaderFieldName(k) { return nil, fmt.Errorf("invalid HTTP header name %q", k) } for _, v := range vv { - if !httpguts.ValidHeaderFieldValue(v) { + if !httplex.ValidHeaderFieldValue(v) { return nil, fmt.Errorf("invalid HTTP header value %q for header %q", v, k) } } } - enumerateHeaders := func(f func(name, value string)) { - // 8.1.2.3 Request Pseudo-Header Fields - // The :path pseudo-header field includes the path and query parts of the - // target URI (the path-absolute production and optionally a '?' character - // followed by the query production (see Sections 3.3 and 3.4 of - // [RFC3986]). - f(":authority", host) - f(":method", req.Method) - if req.Method != "CONNECT" { - f(":path", path) - f(":scheme", req.URL.Scheme) - } - if trailers != "" { - f("trailer", trailers) - } + // 8.1.2.3 Request Pseudo-Header Fields + // The :path pseudo-header field includes the path and query parts of the + // target URI (the path-absolute production and optionally a '?' character + // followed by the query production (see Sections 3.3 and 3.4 of + // [RFC3986]). + cc.writeHeader(":authority", host) + cc.writeHeader(":method", req.Method) + if req.Method != "CONNECT" { + cc.writeHeader(":path", path) + cc.writeHeader(":scheme", req.URL.Scheme) + } + if trailers != "" { + cc.writeHeader("trailer", trailers) + } - var didUA bool - for k, vv := range req.Header { - if strings.EqualFold(k, "host") || strings.EqualFold(k, "content-length") { - // Host is :authority, already sent. - // Content-Length is automatic, set below. - continue - } else if strings.EqualFold(k, "connection") || strings.EqualFold(k, "proxy-connection") || - strings.EqualFold(k, "transfer-encoding") || strings.EqualFold(k, "upgrade") || - strings.EqualFold(k, "keep-alive") { - // Per 8.1.2.2 Connection-Specific Header - // Fields, don't send connection-specific - // fields. We have already checked if any - // are error-worthy so just ignore the rest. + var didUA bool + for k, vv := range req.Header { + lowKey := strings.ToLower(k) + switch lowKey { + case "host", "content-length": + // Host is :authority, already sent. + // Content-Length is automatic, set below. + continue + case "connection", "proxy-connection", "transfer-encoding", "upgrade", "keep-alive": + // Per 8.1.2.2 Connection-Specific Header + // Fields, don't send connection-specific + // fields. We have already checked if any + // are error-worthy so just ignore the rest. + continue + case "user-agent": + // Match Go's http1 behavior: at most one + // User-Agent. If set to nil or empty string, + // then omit it. Otherwise if not mentioned, + // include the default (below). + didUA = true + if len(vv) < 1 { continue - } else if strings.EqualFold(k, "user-agent") { - // Match Go's http1 behavior: at most one - // User-Agent. If set to nil or empty string, - // then omit it. Otherwise if not mentioned, - // include the default (below). - didUA = true - if len(vv) < 1 { - continue - } - vv = vv[:1] - if vv[0] == "" { - continue - } - } - - for _, v := range vv { - f(k, v) + vv = vv[:1] + if vv[0] == "" { + continue } } - if shouldSendReqContentLength(req.Method, contentLength) { - f("content-length", strconv.FormatInt(contentLength, 10)) - } - if addGzipHeader { - f("accept-encoding", "gzip") - } - if !didUA { - f("user-agent", defaultUserAgent) + for _, v := range vv { + cc.writeHeader(lowKey, v) } } - - // Do a first pass over the headers counting bytes to ensure - // we don't exceed cc.peerMaxHeaderListSize. This is done as a - // separate pass before encoding the headers to prevent - // modifying the hpack state. - hlSize := uint64(0) - enumerateHeaders(func(name, value string) { - hf := hpack.HeaderField{Name: name, Value: value} - hlSize += uint64(hf.Size()) - }) - - if hlSize > cc.peerMaxHeaderListSize { - return nil, errRequestHeaderListSize + if shouldSendReqContentLength(req.Method, contentLength) { + cc.writeHeader("content-length", strconv.FormatInt(contentLength, 10)) + } + if addGzipHeader { + cc.writeHeader("accept-encoding", "gzip") + } + if !didUA { + cc.writeHeader("user-agent", defaultUserAgent) } - - // Header list size is ok. Write the headers. - enumerateHeaders(func(name, value string) { - cc.writeHeader(strings.ToLower(name), value) - }) - return cc.hbuf.Bytes(), nil } @@ -1322,29 +1271,17 @@ func shouldSendReqContentLength(method string, contentLength int64) bool { } // requires cc.mu be held. -func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) { +func (cc *ClientConn) encodeTrailers(req *http.Request) []byte { cc.hbuf.Reset() - - hlSize := uint64(0) for k, vv := range req.Trailer { - for _, v := range vv { - hf := hpack.HeaderField{Name: k, Value: v} - hlSize += uint64(hf.Size()) - } - } - if hlSize > cc.peerMaxHeaderListSize { - return nil, errRequestHeaderListSize - } - - for k, vv := range req.Trailer { - // Transfer-Encoding, etc.. have already been filtered at the + // Transfer-Encoding, etc.. have already been filter at the // start of RoundTrip lowKey := strings.ToLower(k) for _, v := range vv { cc.writeHeader(lowKey, v) } } - return cc.hbuf.Bytes(), nil + return cc.hbuf.Bytes() } func (cc *ClientConn) writeHeader(name, value string) { @@ -1402,12 +1339,17 @@ func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream { // clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop. type clientConnReadLoop struct { cc *ClientConn + activeRes map[uint32]*clientStream // keyed by streamID closeWhenIdle bool } // readLoop runs in its own goroutine and reads and dispatches frames. func (cc *ClientConn) readLoop() { - rl := &clientConnReadLoop{cc: cc} + rl := &clientConnReadLoop{ + cc: cc, + activeRes: make(map[uint32]*clientStream), + } + defer rl.cleanup() cc.readerErr = rl.run() if ce, ok := cc.readerErr.(ConnectionError); ok { @@ -1462,8 +1404,10 @@ func (rl *clientConnReadLoop) cleanup() { } else if err == io.EOF { err = io.ErrUnexpectedEOF } + for _, cs := range rl.activeRes { + cs.bufPipe.CloseWithError(err) + } for _, cs := range cc.streams { - cs.bufPipe.CloseWithError(err) // no-op if already closed select { case cs.resc <- resAndError{err: err}: default: @@ -1541,7 +1485,7 @@ func (rl *clientConnReadLoop) run() error { } return err } - if rl.closeWhenIdle && gotReply && maybeIdle { + if rl.closeWhenIdle && gotReply && maybeIdle && len(rl.activeRes) == 0 { cc.closeIfIdle() } } @@ -1549,31 +1493,13 @@ func (rl *clientConnReadLoop) run() error { func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { cc := rl.cc - cs := cc.streamByID(f.StreamID, false) + cs := cc.streamByID(f.StreamID, f.StreamEnded()) if cs == nil { // We'd get here if we canceled a request while the // server had its response still in flight. So if this // was just something we canceled, ignore it. return nil } - if f.StreamEnded() { - // Issue 20521: If the stream has ended, streamByID() causes - // clientStream.done to be closed, which causes the request's bodyWriter - // to be closed with an errStreamClosed, which may be received by - // clientConn.RoundTrip before the result of processing these headers. - // Deferring stream closure allows the header processing to occur first. - // clientConn.RoundTrip may still receive the bodyWriter error first, but - // the fix for issue 16102 prioritises any response. - // - // Issue 22413: If there is no request body, we should close the - // stream before writing to cs.resc so that the stream is closed - // immediately once RoundTrip returns. - if cs.req.Body != nil { - defer cc.forgetStreamID(f.StreamID) - } else { - cc.forgetStreamID(f.StreamID) - } - } if !cs.firstByte { if cs.trace != nil { // TODO(bradfitz): move first response byte earlier, @@ -1597,7 +1523,6 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { } // Any other error type is a stream error. cs.cc.writeStreamReset(f.StreamID, ErrCodeProtocol, err) - cc.forgetStreamID(cs.ID) cs.resc <- resAndError{err: err} return nil // return nil from process* funcs to keep conn alive } @@ -1605,6 +1530,9 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { // (nil, nil) special case. See handleResponse docs. return nil } + if res.Body != noBody { + rl.activeRes[cs.ID] = cs + } cs.resTrailer = &res.Trailer cs.resc <- resAndError{res: res} return nil @@ -1624,11 +1552,11 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra status := f.PseudoValue("status") if status == "" { - return nil, errors.New("malformed response from server: missing status pseudo header") + return nil, errors.New("missing status pseudo header") } statusCode, err := strconv.Atoi(status) if err != nil { - return nil, errors.New("malformed response from server: malformed non-numeric status pseudo header") + return nil, errors.New("malformed non-numeric status pseudo header") } if statusCode == 100 { @@ -1861,23 +1789,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { } return nil } - if !cs.firstByte { - cc.logf("protocol error: received DATA before a HEADERS frame") - rl.endStreamError(cs, StreamError{ - StreamID: f.StreamID, - Code: ErrCodeProtocol, - }) - return nil - } if f.Length > 0 { - if cs.req.Method == "HEAD" && len(data) > 0 { - cc.logf("protocol error: received DATA on a HEAD request") - rl.endStreamError(cs, StreamError{ - StreamID: f.StreamID, - Code: ErrCodeProtocol, - }) - return nil - } // Check connection-level flow control. cc.mu.Lock() if cs.inflow.available() >= int32(f.Length) { @@ -1939,10 +1851,11 @@ func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) { err = io.EOF code = cs.copyTrailers } + cs.bufPipe.closeWithErrorAndCode(err, code) + delete(rl.activeRes, cs.ID) if isConnectionCloseRequest(cs.req) { rl.closeWhenIdle = true } - cs.bufPipe.closeWithErrorAndCode(err, code) select { case cs.resc <- resAndError{err: err}: @@ -1990,8 +1903,6 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error { cc.maxFrameSize = s.Val case SettingMaxConcurrentStreams: cc.maxConcurrentStreams = s.Val - case SettingMaxHeaderListSize: - cc.peerMaxHeaderListSize = uint64(s.Val) case SettingInitialWindowSize: // Values above the maximum flow-control // window size of 2^31-1 MUST be treated as a @@ -2069,6 +1980,7 @@ func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { cs.bufPipe.CloseWithError(err) cs.cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl } + delete(rl.activeRes, cs.ID) return nil } @@ -2157,7 +2069,6 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) var ( errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit") - errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit") errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers") ) @@ -2251,7 +2162,7 @@ func (t *Transport) getBodyWriterState(cs *clientStream, body io.Reader) (s body } s.delay = t.expectContinueTimeout() if s.delay == 0 || - !httpguts.HeaderValuesContainsToken( + !httplex.HeaderValuesContainsToken( cs.req.Header["Expect"], "100-continue") { return @@ -2306,5 +2217,5 @@ func (s bodyWriterState) scheduleBodyWrite() { // isConnectionCloseRequest reports whether req should use its own // connection for a single request and then close the connection. func isConnectionCloseRequest(req *http.Request) bool { - return req.Close || httpguts.HeaderValuesContainsToken(req.Header["Connection"], "close") + return req.Close || httplex.HeaderValuesContainsToken(req.Header["Connection"], "close") } diff --git a/deps/golang.org/x/net/http2/transport_test.go b/deps/golang.org/x/net/http2/transport_test.go deleted file mode 100644 index 17c09cab7..000000000 --- a/deps/golang.org/x/net/http2/transport_test.go +++ /dev/null @@ -1,3848 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import ( - "bufio" - "bytes" - "crypto/tls" - "errors" - "flag" - "fmt" - "io" - "io/ioutil" - "log" - "math/rand" - "net" - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "runtime" - "sort" - "strconv" - "strings" - "sync" - "sync/atomic" - "testing" - "time" - - "golang.org/x/net/http2/hpack" -) - -var ( - extNet = flag.Bool("extnet", false, "do external network tests") - transportHost = flag.String("transporthost", "http2.golang.org", "hostname to use for TestTransport") - insecure = flag.Bool("insecure", false, "insecure TLS dials") // TODO: dead code. remove? -) - -var tlsConfigInsecure = &tls.Config{InsecureSkipVerify: true} - -type testContext struct{} - -func (testContext) Done() <-chan struct{} { return make(chan struct{}) } -func (testContext) Err() error { panic("should not be called") } -func (testContext) Deadline() (deadline time.Time, ok bool) { return time.Time{}, false } -func (testContext) Value(key interface{}) interface{} { return nil } - -func TestTransportExternal(t *testing.T) { - if !*extNet { - t.Skip("skipping external network test") - } - req, _ := http.NewRequest("GET", "https://"+*transportHost+"/", nil) - rt := &Transport{TLSClientConfig: tlsConfigInsecure} - res, err := rt.RoundTrip(req) - if err != nil { - t.Fatalf("%v", err) - } - res.Write(os.Stdout) -} - -type fakeTLSConn struct { - net.Conn -} - -func (c *fakeTLSConn) ConnectionState() tls.ConnectionState { - return tls.ConnectionState{ - Version: tls.VersionTLS12, - CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - } -} - -func startH2cServer(t *testing.T) net.Listener { - h2Server := &Server{} - l := newLocalListener(t) - go func() { - conn, err := l.Accept() - if err != nil { - t.Error(err) - return - } - h2Server.ServeConn(&fakeTLSConn{conn}, &ServeConnOpts{Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "Hello, %v, http: %v", r.URL.Path, r.TLS == nil) - })}) - }() - return l -} - -func TestTransportH2c(t *testing.T) { - l := startH2cServer(t) - defer l.Close() - req, err := http.NewRequest("GET", "http://"+l.Addr().String()+"/foobar", nil) - if err != nil { - t.Fatal(err) - } - tr := &Transport{ - AllowHTTP: true, - DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { - return net.Dial(network, addr) - }, - } - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - if res.ProtoMajor != 2 { - t.Fatal("proto not h2c") - } - body, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Fatal(err) - } - if got, want := string(body), "Hello, /foobar, http: true"; got != want { - t.Fatalf("response got %v, want %v", got, want) - } -} - -func TestTransport(t *testing.T) { - const body = "sup" - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, body) - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - t.Fatal(err) - } - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - - t.Logf("Got res: %+v", res) - if g, w := res.StatusCode, 200; g != w { - t.Errorf("StatusCode = %v; want %v", g, w) - } - if g, w := res.Status, "200 OK"; g != w { - t.Errorf("Status = %q; want %q", g, w) - } - wantHeader := http.Header{ - "Content-Length": []string{"3"}, - "Content-Type": []string{"text/plain; charset=utf-8"}, - "Date": []string{"XXX"}, // see cleanDate - } - cleanDate(res) - if !reflect.DeepEqual(res.Header, wantHeader) { - t.Errorf("res Header = %v; want %v", res.Header, wantHeader) - } - if res.Request != req { - t.Errorf("Response.Request = %p; want %p", res.Request, req) - } - if res.TLS == nil { - t.Error("Response.TLS = nil; want non-nil") - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Errorf("Body read: %v", err) - } else if string(slurp) != body { - t.Errorf("Body = %q; want %q", slurp, body) - } -} - -func onSameConn(t *testing.T, modReq func(*http.Request)) bool { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, r.RemoteAddr) - }, optOnlyServer, func(c net.Conn, st http.ConnState) { - t.Logf("conn %v is now state %v", c.RemoteAddr(), st) - }) - defer st.Close() - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - get := func() string { - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - t.Fatal(err) - } - modReq(req) - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Fatalf("Body read: %v", err) - } - addr := strings.TrimSpace(string(slurp)) - if addr == "" { - t.Fatalf("didn't get an addr in response") - } - return addr - } - first := get() - second := get() - return first == second -} - -func TestTransportReusesConns(t *testing.T) { - if !onSameConn(t, func(*http.Request) {}) { - t.Errorf("first and second responses were on different connections") - } -} - -func TestTransportReusesConn_RequestClose(t *testing.T) { - if onSameConn(t, func(r *http.Request) { r.Close = true }) { - t.Errorf("first and second responses were not on different connections") - } -} - -func TestTransportReusesConn_ConnClose(t *testing.T) { - if onSameConn(t, func(r *http.Request) { r.Header.Set("Connection", "close") }) { - t.Errorf("first and second responses were not on different connections") - } -} - -// Tests that the Transport only keeps one pending dial open per destination address. -// https://golang.org/issue/13397 -func TestTransportGroupsPendingDials(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, r.RemoteAddr) - }, optOnlyServer) - defer st.Close() - tr := &Transport{ - TLSClientConfig: tlsConfigInsecure, - } - defer tr.CloseIdleConnections() - var ( - mu sync.Mutex - dials = map[string]int{} - ) - var wg sync.WaitGroup - for i := 0; i < 10; i++ { - wg.Add(1) - go func() { - defer wg.Done() - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - t.Error(err) - return - } - res, err := tr.RoundTrip(req) - if err != nil { - t.Error(err) - return - } - defer res.Body.Close() - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Errorf("Body read: %v", err) - } - addr := strings.TrimSpace(string(slurp)) - if addr == "" { - t.Errorf("didn't get an addr in response") - } - mu.Lock() - dials[addr]++ - mu.Unlock() - }() - } - wg.Wait() - if len(dials) != 1 { - t.Errorf("saw %d dials; want 1: %v", len(dials), dials) - } - tr.CloseIdleConnections() - if err := retry(50, 10*time.Millisecond, func() error { - cp, ok := tr.connPool().(*clientConnPool) - if !ok { - return fmt.Errorf("Conn pool is %T; want *clientConnPool", tr.connPool()) - } - cp.mu.Lock() - defer cp.mu.Unlock() - if len(cp.dialing) != 0 { - return fmt.Errorf("dialing map = %v; want empty", cp.dialing) - } - if len(cp.conns) != 0 { - return fmt.Errorf("conns = %v; want empty", cp.conns) - } - if len(cp.keys) != 0 { - return fmt.Errorf("keys = %v; want empty", cp.keys) - } - return nil - }); err != nil { - t.Errorf("State of pool after CloseIdleConnections: %v", err) - } -} - -func retry(tries int, delay time.Duration, fn func() error) error { - var err error - for i := 0; i < tries; i++ { - err = fn() - if err == nil { - return nil - } - time.Sleep(delay) - } - return err -} - -func TestTransportAbortClosesPipes(t *testing.T) { - shutdown := make(chan struct{}) - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - w.(http.Flusher).Flush() - <-shutdown - }, - optOnlyServer, - ) - defer st.Close() - defer close(shutdown) // we must shutdown before st.Close() to avoid hanging - - done := make(chan struct{}) - requestMade := make(chan struct{}) - go func() { - defer close(done) - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - t.Fatal(err) - } - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - close(requestMade) - _, err = ioutil.ReadAll(res.Body) - if err == nil { - t.Error("expected error from res.Body.Read") - } - }() - - <-requestMade - // Now force the serve loop to end, via closing the connection. - st.closeConn() - // deadlock? that's a bug. - select { - case <-done: - case <-time.After(3 * time.Second): - t.Fatal("timeout") - } -} - -// TODO: merge this with TestTransportBody to make TestTransportRequest? This -// could be a table-driven test with extra goodies. -func TestTransportPath(t *testing.T) { - gotc := make(chan *url.URL, 1) - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - gotc <- r.URL - }, - optOnlyServer, - ) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - const ( - path = "/testpath" - query = "q=1" - ) - surl := st.ts.URL + path + "?" + query - req, err := http.NewRequest("POST", surl, nil) - if err != nil { - t.Fatal(err) - } - c := &http.Client{Transport: tr} - res, err := c.Do(req) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - got := <-gotc - if got.Path != path { - t.Errorf("Read Path = %q; want %q", got.Path, path) - } - if got.RawQuery != query { - t.Errorf("Read RawQuery = %q; want %q", got.RawQuery, query) - } -} - -func randString(n int) string { - rnd := rand.New(rand.NewSource(int64(n))) - b := make([]byte, n) - for i := range b { - b[i] = byte(rnd.Intn(256)) - } - return string(b) -} - -type panicReader struct{} - -func (panicReader) Read([]byte) (int, error) { panic("unexpected Read") } -func (panicReader) Close() error { panic("unexpected Close") } - -func TestActualContentLength(t *testing.T) { - tests := []struct { - req *http.Request - want int64 - }{ - // Verify we don't read from Body: - 0: { - req: &http.Request{Body: panicReader{}}, - want: -1, - }, - // nil Body means 0, regardless of ContentLength: - 1: { - req: &http.Request{Body: nil, ContentLength: 5}, - want: 0, - }, - // ContentLength is used if set. - 2: { - req: &http.Request{Body: panicReader{}, ContentLength: 5}, - want: 5, - }, - // http.NoBody means 0, not -1. - 3: { - req: &http.Request{Body: go18httpNoBody()}, - want: 0, - }, - } - for i, tt := range tests { - got := actualContentLength(tt.req) - if got != tt.want { - t.Errorf("test[%d]: got %d; want %d", i, got, tt.want) - } - } -} - -func TestTransportBody(t *testing.T) { - bodyTests := []struct { - body string - noContentLen bool - }{ - {body: "some message"}, - {body: "some message", noContentLen: true}, - {body: strings.Repeat("a", 1<<20), noContentLen: true}, - {body: strings.Repeat("a", 1<<20)}, - {body: randString(16<<10 - 1)}, - {body: randString(16 << 10)}, - {body: randString(16<<10 + 1)}, - {body: randString(512<<10 - 1)}, - {body: randString(512 << 10)}, - {body: randString(512<<10 + 1)}, - {body: randString(1<<20 - 1)}, - {body: randString(1 << 20)}, - {body: randString(1<<20 + 2)}, - } - - type reqInfo struct { - req *http.Request - slurp []byte - err error - } - gotc := make(chan reqInfo, 1) - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - slurp, err := ioutil.ReadAll(r.Body) - if err != nil { - gotc <- reqInfo{err: err} - } else { - gotc <- reqInfo{req: r, slurp: slurp} - } - }, - optOnlyServer, - ) - defer st.Close() - - for i, tt := range bodyTests { - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - var body io.Reader = strings.NewReader(tt.body) - if tt.noContentLen { - body = struct{ io.Reader }{body} // just a Reader, hiding concrete type and other methods - } - req, err := http.NewRequest("POST", st.ts.URL, body) - if err != nil { - t.Fatalf("#%d: %v", i, err) - } - c := &http.Client{Transport: tr} - res, err := c.Do(req) - if err != nil { - t.Fatalf("#%d: %v", i, err) - } - defer res.Body.Close() - ri := <-gotc - if ri.err != nil { - t.Errorf("#%d: read error: %v", i, ri.err) - continue - } - if got := string(ri.slurp); got != tt.body { - t.Errorf("#%d: Read body mismatch.\n got: %q (len %d)\nwant: %q (len %d)", i, shortString(got), len(got), shortString(tt.body), len(tt.body)) - } - wantLen := int64(len(tt.body)) - if tt.noContentLen && tt.body != "" { - wantLen = -1 - } - if ri.req.ContentLength != wantLen { - t.Errorf("#%d. handler got ContentLength = %v; want %v", i, ri.req.ContentLength, wantLen) - } - } -} - -func shortString(v string) string { - const maxLen = 100 - if len(v) <= maxLen { - return v - } - return fmt.Sprintf("%v[...%d bytes omitted...]%v", v[:maxLen/2], len(v)-maxLen, v[len(v)-maxLen/2:]) -} - -func TestTransportDialTLS(t *testing.T) { - var mu sync.Mutex // guards following - var gotReq, didDial bool - - ts := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - mu.Lock() - gotReq = true - mu.Unlock() - }, - optOnlyServer, - ) - defer ts.Close() - tr := &Transport{ - DialTLS: func(netw, addr string, cfg *tls.Config) (net.Conn, error) { - mu.Lock() - didDial = true - mu.Unlock() - cfg.InsecureSkipVerify = true - c, err := tls.Dial(netw, addr, cfg) - if err != nil { - return nil, err - } - return c, c.Handshake() - }, - } - defer tr.CloseIdleConnections() - client := &http.Client{Transport: tr} - res, err := client.Get(ts.ts.URL) - if err != nil { - t.Fatal(err) - } - res.Body.Close() - mu.Lock() - if !gotReq { - t.Error("didn't get request") - } - if !didDial { - t.Error("didn't use dial hook") - } -} - -func TestConfigureTransport(t *testing.T) { - t1 := &http.Transport{} - err := ConfigureTransport(t1) - if err == errTransportVersion { - t.Skip(err) - } - if err != nil { - t.Fatal(err) - } - if got := fmt.Sprintf("%#v", t1); !strings.Contains(got, `"h2"`) { - // Laziness, to avoid buildtags. - t.Errorf("stringification of HTTP/1 transport didn't contain \"h2\": %v", got) - } - wantNextProtos := []string{"h2", "http/1.1"} - if t1.TLSClientConfig == nil { - t.Errorf("nil t1.TLSClientConfig") - } else if !reflect.DeepEqual(t1.TLSClientConfig.NextProtos, wantNextProtos) { - t.Errorf("TLSClientConfig.NextProtos = %q; want %q", t1.TLSClientConfig.NextProtos, wantNextProtos) - } - if err := ConfigureTransport(t1); err == nil { - t.Error("unexpected success on second call to ConfigureTransport") - } - - // And does it work? - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, r.Proto) - }, optOnlyServer) - defer st.Close() - - t1.TLSClientConfig.InsecureSkipVerify = true - c := &http.Client{Transport: t1} - res, err := c.Get(st.ts.URL) - if err != nil { - t.Fatal(err) - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Fatal(err) - } - if got, want := string(slurp), "HTTP/2.0"; got != want { - t.Errorf("body = %q; want %q", got, want) - } -} - -type capitalizeReader struct { - r io.Reader -} - -func (cr capitalizeReader) Read(p []byte) (n int, err error) { - n, err = cr.r.Read(p) - for i, b := range p[:n] { - if b >= 'a' && b <= 'z' { - p[i] = b - ('a' - 'A') - } - } - return -} - -type flushWriter struct { - w io.Writer -} - -func (fw flushWriter) Write(p []byte) (n int, err error) { - n, err = fw.w.Write(p) - if f, ok := fw.w.(http.Flusher); ok { - f.Flush() - } - return -} - -type clientTester struct { - t *testing.T - tr *Transport - sc, cc net.Conn // server and client conn - fr *Framer // server's framer - client func() error - server func() error -} - -func newClientTester(t *testing.T) *clientTester { - var dialOnce struct { - sync.Mutex - dialed bool - } - ct := &clientTester{ - t: t, - } - ct.tr = &Transport{ - TLSClientConfig: tlsConfigInsecure, - DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { - dialOnce.Lock() - defer dialOnce.Unlock() - if dialOnce.dialed { - return nil, errors.New("only one dial allowed in test mode") - } - dialOnce.dialed = true - return ct.cc, nil - }, - } - - ln := newLocalListener(t) - cc, err := net.Dial("tcp", ln.Addr().String()) - if err != nil { - t.Fatal(err) - - } - sc, err := ln.Accept() - if err != nil { - t.Fatal(err) - } - ln.Close() - ct.cc = cc - ct.sc = sc - ct.fr = NewFramer(sc, sc) - return ct -} - -func newLocalListener(t *testing.T) net.Listener { - ln, err := net.Listen("tcp4", "127.0.0.1:0") - if err == nil { - return ln - } - ln, err = net.Listen("tcp6", "[::1]:0") - if err != nil { - t.Fatal(err) - } - return ln -} - -func (ct *clientTester) greet(settings ...Setting) { - buf := make([]byte, len(ClientPreface)) - _, err := io.ReadFull(ct.sc, buf) - if err != nil { - ct.t.Fatalf("reading client preface: %v", err) - } - f, err := ct.fr.ReadFrame() - if err != nil { - ct.t.Fatalf("Reading client settings frame: %v", err) - } - if sf, ok := f.(*SettingsFrame); !ok { - ct.t.Fatalf("Wanted client settings frame; got %v", f) - _ = sf // stash it away? - } - if err := ct.fr.WriteSettings(settings...); err != nil { - ct.t.Fatal(err) - } - if err := ct.fr.WriteSettingsAck(); err != nil { - ct.t.Fatal(err) - } -} - -func (ct *clientTester) readNonSettingsFrame() (Frame, error) { - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return nil, err - } - if _, ok := f.(*SettingsFrame); ok { - continue - } - return f, nil - } -} - -func (ct *clientTester) cleanup() { - ct.tr.CloseIdleConnections() -} - -func (ct *clientTester) run() { - errc := make(chan error, 2) - ct.start("client", errc, ct.client) - ct.start("server", errc, ct.server) - defer ct.cleanup() - for i := 0; i < 2; i++ { - if err := <-errc; err != nil { - ct.t.Error(err) - return - } - } -} - -func (ct *clientTester) start(which string, errc chan<- error, fn func() error) { - go func() { - finished := false - var err error - defer func() { - if !finished { - err = fmt.Errorf("%s goroutine didn't finish.", which) - } else if err != nil { - err = fmt.Errorf("%s: %v", which, err) - } - errc <- err - }() - err = fn() - finished = true - }() -} - -func (ct *clientTester) readFrame() (Frame, error) { - return readFrameTimeout(ct.fr, 2*time.Second) -} - -func (ct *clientTester) firstHeaders() (*HeadersFrame, error) { - for { - f, err := ct.readFrame() - if err != nil { - return nil, fmt.Errorf("ReadFrame while waiting for Headers: %v", err) - } - switch f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - continue - } - hf, ok := f.(*HeadersFrame) - if !ok { - return nil, fmt.Errorf("Got %T; want HeadersFrame", f) - } - return hf, nil - } -} - -type countingReader struct { - n *int64 -} - -func (r countingReader) Read(p []byte) (n int, err error) { - for i := range p { - p[i] = byte(i) - } - atomic.AddInt64(r.n, int64(len(p))) - return len(p), err -} - -func TestTransportReqBodyAfterResponse_200(t *testing.T) { testTransportReqBodyAfterResponse(t, 200) } -func TestTransportReqBodyAfterResponse_403(t *testing.T) { testTransportReqBodyAfterResponse(t, 403) } - -func testTransportReqBodyAfterResponse(t *testing.T, status int) { - const bodySize = 10 << 20 - clientDone := make(chan struct{}) - ct := newClientTester(t) - ct.client = func() error { - defer ct.cc.(*net.TCPConn).CloseWrite() - defer close(clientDone) - - var n int64 // atomic - req, err := http.NewRequest("PUT", "https://dummy.tld/", io.LimitReader(countingReader{&n}, bodySize)) - if err != nil { - return err - } - res, err := ct.tr.RoundTrip(req) - if err != nil { - return fmt.Errorf("RoundTrip: %v", err) - } - defer res.Body.Close() - if res.StatusCode != status { - return fmt.Errorf("status code = %v; want %v", res.StatusCode, status) - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - return fmt.Errorf("Slurp: %v", err) - } - if len(slurp) > 0 { - return fmt.Errorf("unexpected body: %q", slurp) - } - if status == 200 { - if got := atomic.LoadInt64(&n); got != bodySize { - return fmt.Errorf("For 200 response, Transport wrote %d bytes; want %d", got, bodySize) - } - } else { - if got := atomic.LoadInt64(&n); got == 0 || got >= bodySize { - return fmt.Errorf("For %d response, Transport wrote %d bytes; want (0,%d) exclusive", status, got, bodySize) - } - } - return nil - } - ct.server = func() error { - ct.greet() - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - var dataRecv int64 - var closed bool - for { - f, err := ct.fr.ReadFrame() - if err != nil { - select { - case <-clientDone: - // If the client's done, it - // will have reported any - // errors on its side. - return nil - default: - return err - } - } - //println(fmt.Sprintf("server got frame: %v", f)) - switch f := f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - case *HeadersFrame: - if !f.HeadersEnded() { - return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) - } - if f.StreamEnded() { - return fmt.Errorf("headers contains END_STREAM unexpectedly: %v", f) - } - case *DataFrame: - dataLen := len(f.Data()) - if dataLen > 0 { - if dataRecv == 0 { - enc.WriteField(hpack.HeaderField{Name: ":status", Value: strconv.Itoa(status)}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - } - if err := ct.fr.WriteWindowUpdate(0, uint32(dataLen)); err != nil { - return err - } - if err := ct.fr.WriteWindowUpdate(f.StreamID, uint32(dataLen)); err != nil { - return err - } - } - dataRecv += int64(dataLen) - - if !closed && ((status != 200 && dataRecv > 0) || - (status == 200 && dataRecv == bodySize)) { - closed = true - if err := ct.fr.WriteData(f.StreamID, true, nil); err != nil { - return err - } - } - default: - return fmt.Errorf("Unexpected client frame %v", f) - } - } - } - ct.run() -} - -// See golang.org/issue/13444 -func TestTransportFullDuplex(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(200) // redundant but for clarity - w.(http.Flusher).Flush() - io.Copy(flushWriter{w}, capitalizeReader{r.Body}) - fmt.Fprintf(w, "bye.\n") - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - c := &http.Client{Transport: tr} - - pr, pw := io.Pipe() - req, err := http.NewRequest("PUT", st.ts.URL, ioutil.NopCloser(pr)) - if err != nil { - t.Fatal(err) - } - req.ContentLength = -1 - res, err := c.Do(req) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - if res.StatusCode != 200 { - t.Fatalf("StatusCode = %v; want %v", res.StatusCode, 200) - } - bs := bufio.NewScanner(res.Body) - want := func(v string) { - if !bs.Scan() { - t.Fatalf("wanted to read %q but Scan() = false, err = %v", v, bs.Err()) - } - } - write := func(v string) { - _, err := io.WriteString(pw, v) - if err != nil { - t.Fatalf("pipe write: %v", err) - } - } - write("foo\n") - want("FOO") - write("bar\n") - want("BAR") - pw.Close() - want("bye.") - if err := bs.Err(); err != nil { - t.Fatal(err) - } -} - -func TestTransportConnectRequest(t *testing.T) { - gotc := make(chan *http.Request, 1) - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - gotc <- r - }, optOnlyServer) - defer st.Close() - - u, err := url.Parse(st.ts.URL) - if err != nil { - t.Fatal(err) - } - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - c := &http.Client{Transport: tr} - - tests := []struct { - req *http.Request - want string - }{ - { - req: &http.Request{ - Method: "CONNECT", - Header: http.Header{}, - URL: u, - }, - want: u.Host, - }, - { - req: &http.Request{ - Method: "CONNECT", - Header: http.Header{}, - URL: u, - Host: "example.com:123", - }, - want: "example.com:123", - }, - } - - for i, tt := range tests { - res, err := c.Do(tt.req) - if err != nil { - t.Errorf("%d. RoundTrip = %v", i, err) - continue - } - res.Body.Close() - req := <-gotc - if req.Method != "CONNECT" { - t.Errorf("method = %q; want CONNECT", req.Method) - } - if req.Host != tt.want { - t.Errorf("Host = %q; want %q", req.Host, tt.want) - } - if req.URL.Host != tt.want { - t.Errorf("URL.Host = %q; want %q", req.URL.Host, tt.want) - } - } -} - -type headerType int - -const ( - noHeader headerType = iota // omitted - oneHeader - splitHeader // broken into continuation on purpose -) - -const ( - f0 = noHeader - f1 = oneHeader - f2 = splitHeader - d0 = false - d1 = true -) - -// Test all 36 combinations of response frame orders: -// (3 ways of 100-continue) * (2 ways of headers) * (2 ways of data) * (3 ways of trailers):func TestTransportResponsePattern_00f0(t *testing.T) { testTransportResponsePattern(h0, h1, false, h0) } -// Generated by http://play.golang.org/p/SScqYKJYXd -func TestTransportResPattern_c0h1d0t0(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f0) } -func TestTransportResPattern_c0h1d0t1(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f1) } -func TestTransportResPattern_c0h1d0t2(t *testing.T) { testTransportResPattern(t, f0, f1, d0, f2) } -func TestTransportResPattern_c0h1d1t0(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f0) } -func TestTransportResPattern_c0h1d1t1(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f1) } -func TestTransportResPattern_c0h1d1t2(t *testing.T) { testTransportResPattern(t, f0, f1, d1, f2) } -func TestTransportResPattern_c0h2d0t0(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f0) } -func TestTransportResPattern_c0h2d0t1(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f1) } -func TestTransportResPattern_c0h2d0t2(t *testing.T) { testTransportResPattern(t, f0, f2, d0, f2) } -func TestTransportResPattern_c0h2d1t0(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f0) } -func TestTransportResPattern_c0h2d1t1(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f1) } -func TestTransportResPattern_c0h2d1t2(t *testing.T) { testTransportResPattern(t, f0, f2, d1, f2) } -func TestTransportResPattern_c1h1d0t0(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f0) } -func TestTransportResPattern_c1h1d0t1(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f1) } -func TestTransportResPattern_c1h1d0t2(t *testing.T) { testTransportResPattern(t, f1, f1, d0, f2) } -func TestTransportResPattern_c1h1d1t0(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f0) } -func TestTransportResPattern_c1h1d1t1(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f1) } -func TestTransportResPattern_c1h1d1t2(t *testing.T) { testTransportResPattern(t, f1, f1, d1, f2) } -func TestTransportResPattern_c1h2d0t0(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f0) } -func TestTransportResPattern_c1h2d0t1(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f1) } -func TestTransportResPattern_c1h2d0t2(t *testing.T) { testTransportResPattern(t, f1, f2, d0, f2) } -func TestTransportResPattern_c1h2d1t0(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f0) } -func TestTransportResPattern_c1h2d1t1(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f1) } -func TestTransportResPattern_c1h2d1t2(t *testing.T) { testTransportResPattern(t, f1, f2, d1, f2) } -func TestTransportResPattern_c2h1d0t0(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f0) } -func TestTransportResPattern_c2h1d0t1(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f1) } -func TestTransportResPattern_c2h1d0t2(t *testing.T) { testTransportResPattern(t, f2, f1, d0, f2) } -func TestTransportResPattern_c2h1d1t0(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f0) } -func TestTransportResPattern_c2h1d1t1(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f1) } -func TestTransportResPattern_c2h1d1t2(t *testing.T) { testTransportResPattern(t, f2, f1, d1, f2) } -func TestTransportResPattern_c2h2d0t0(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f0) } -func TestTransportResPattern_c2h2d0t1(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f1) } -func TestTransportResPattern_c2h2d0t2(t *testing.T) { testTransportResPattern(t, f2, f2, d0, f2) } -func TestTransportResPattern_c2h2d1t0(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f0) } -func TestTransportResPattern_c2h2d1t1(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f1) } -func TestTransportResPattern_c2h2d1t2(t *testing.T) { testTransportResPattern(t, f2, f2, d1, f2) } - -func testTransportResPattern(t *testing.T, expect100Continue, resHeader headerType, withData bool, trailers headerType) { - const reqBody = "some request body" - const resBody = "some response body" - - if resHeader == noHeader { - // TODO: test 100-continue followed by immediate - // server stream reset, without headers in the middle? - panic("invalid combination") - } - - ct := newClientTester(t) - ct.client = func() error { - req, _ := http.NewRequest("POST", "https://dummy.tld/", strings.NewReader(reqBody)) - if expect100Continue != noHeader { - req.Header.Set("Expect", "100-continue") - } - res, err := ct.tr.RoundTrip(req) - if err != nil { - return fmt.Errorf("RoundTrip: %v", err) - } - defer res.Body.Close() - if res.StatusCode != 200 { - return fmt.Errorf("status code = %v; want 200", res.StatusCode) - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - return fmt.Errorf("Slurp: %v", err) - } - wantBody := resBody - if !withData { - wantBody = "" - } - if string(slurp) != wantBody { - return fmt.Errorf("body = %q; want %q", slurp, wantBody) - } - if trailers == noHeader { - if len(res.Trailer) > 0 { - t.Errorf("Trailer = %v; want none", res.Trailer) - } - } else { - want := http.Header{"Some-Trailer": {"some-value"}} - if !reflect.DeepEqual(res.Trailer, want) { - t.Errorf("Trailer = %v; want %v", res.Trailer, want) - } - } - return nil - } - ct.server = func() error { - ct.greet() - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return err - } - endStream := false - send := func(mode headerType) { - hbf := buf.Bytes() - switch mode { - case oneHeader: - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.Header().StreamID, - EndHeaders: true, - EndStream: endStream, - BlockFragment: hbf, - }) - case splitHeader: - if len(hbf) < 2 { - panic("too small") - } - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.Header().StreamID, - EndHeaders: false, - EndStream: endStream, - BlockFragment: hbf[:1], - }) - ct.fr.WriteContinuation(f.Header().StreamID, true, hbf[1:]) - default: - panic("bogus mode") - } - } - switch f := f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - case *DataFrame: - if !f.StreamEnded() { - // No need to send flow control tokens. The test request body is tiny. - continue - } - // Response headers (1+ frames; 1 or 2 in this test, but never 0) - { - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "x-foo", Value: "blah"}) - enc.WriteField(hpack.HeaderField{Name: "x-bar", Value: "more"}) - if trailers != noHeader { - enc.WriteField(hpack.HeaderField{Name: "trailer", Value: "some-trailer"}) - } - endStream = withData == false && trailers == noHeader - send(resHeader) - } - if withData { - endStream = trailers == noHeader - ct.fr.WriteData(f.StreamID, endStream, []byte(resBody)) - } - if trailers != noHeader { - endStream = true - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: "some-trailer", Value: "some-value"}) - send(trailers) - } - if endStream { - return nil - } - case *HeadersFrame: - if expect100Continue != noHeader { - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "100"}) - send(expect100Continue) - } - } - } - } - ct.run() -} - -func TestTransportReceiveUndeclaredTrailer(t *testing.T) { - ct := newClientTester(t) - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err != nil { - return fmt.Errorf("RoundTrip: %v", err) - } - defer res.Body.Close() - if res.StatusCode != 200 { - return fmt.Errorf("status code = %v; want 200", res.StatusCode) - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - return fmt.Errorf("res.Body ReadAll error = %q, %v; want %v", slurp, err, nil) - } - if len(slurp) > 0 { - return fmt.Errorf("body = %q; want nothing", slurp) - } - if _, ok := res.Trailer["Some-Trailer"]; !ok { - return fmt.Errorf("expected Some-Trailer") - } - return nil - } - ct.server = func() error { - ct.greet() - - var n int - var hf *HeadersFrame - for hf == nil && n < 10 { - f, err := ct.fr.ReadFrame() - if err != nil { - return err - } - hf, _ = f.(*HeadersFrame) - n++ - } - - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - - // send headers without Trailer header - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - - // send trailers - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: "some-trailer", Value: "I'm an undeclared Trailer!"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: true, - BlockFragment: buf.Bytes(), - }) - return nil - } - ct.run() -} - -func TestTransportInvalidTrailer_Pseudo1(t *testing.T) { - testTransportInvalidTrailer_Pseudo(t, oneHeader) -} -func TestTransportInvalidTrailer_Pseudo2(t *testing.T) { - testTransportInvalidTrailer_Pseudo(t, splitHeader) -} -func testTransportInvalidTrailer_Pseudo(t *testing.T, trailers headerType) { - testInvalidTrailer(t, trailers, pseudoHeaderError(":colon"), func(enc *hpack.Encoder) { - enc.WriteField(hpack.HeaderField{Name: ":colon", Value: "foo"}) - enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"}) - }) -} - -func TestTransportInvalidTrailer_Capital1(t *testing.T) { - testTransportInvalidTrailer_Capital(t, oneHeader) -} -func TestTransportInvalidTrailer_Capital2(t *testing.T) { - testTransportInvalidTrailer_Capital(t, splitHeader) -} -func testTransportInvalidTrailer_Capital(t *testing.T, trailers headerType) { - testInvalidTrailer(t, trailers, headerFieldNameError("Capital"), func(enc *hpack.Encoder) { - enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"}) - enc.WriteField(hpack.HeaderField{Name: "Capital", Value: "bad"}) - }) -} -func TestTransportInvalidTrailer_EmptyFieldName(t *testing.T) { - testInvalidTrailer(t, oneHeader, headerFieldNameError(""), func(enc *hpack.Encoder) { - enc.WriteField(hpack.HeaderField{Name: "", Value: "bad"}) - }) -} -func TestTransportInvalidTrailer_BinaryFieldValue(t *testing.T) { - testInvalidTrailer(t, oneHeader, headerFieldValueError("has\nnewline"), func(enc *hpack.Encoder) { - enc.WriteField(hpack.HeaderField{Name: "x", Value: "has\nnewline"}) - }) -} - -func testInvalidTrailer(t *testing.T, trailers headerType, wantErr error, writeTrailer func(*hpack.Encoder)) { - ct := newClientTester(t) - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err != nil { - return fmt.Errorf("RoundTrip: %v", err) - } - defer res.Body.Close() - if res.StatusCode != 200 { - return fmt.Errorf("status code = %v; want 200", res.StatusCode) - } - slurp, err := ioutil.ReadAll(res.Body) - se, ok := err.(StreamError) - if !ok || se.Cause != wantErr { - return fmt.Errorf("res.Body ReadAll error = %q, %#v; want StreamError with cause %T, %#v", slurp, err, wantErr, wantErr) - } - if len(slurp) > 0 { - return fmt.Errorf("body = %q; want nothing", slurp) - } - return nil - } - ct.server = func() error { - ct.greet() - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return err - } - switch f := f.(type) { - case *HeadersFrame: - var endStream bool - send := func(mode headerType) { - hbf := buf.Bytes() - switch mode { - case oneHeader: - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: endStream, - BlockFragment: hbf, - }) - case splitHeader: - if len(hbf) < 2 { - panic("too small") - } - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: false, - EndStream: endStream, - BlockFragment: hbf[:1], - }) - ct.fr.WriteContinuation(f.StreamID, true, hbf[1:]) - default: - panic("bogus mode") - } - } - // Response headers (1+ frames; 1 or 2 in this test, but never 0) - { - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "trailer", Value: "declared"}) - endStream = false - send(oneHeader) - } - // Trailers: - { - endStream = true - buf.Reset() - writeTrailer(enc) - send(trailers) - } - return nil - } - } - } - ct.run() -} - -// headerListSize returns the HTTP2 header list size of h. -// http://httpwg.org/specs/rfc7540.html#SETTINGS_MAX_HEADER_LIST_SIZE -// http://httpwg.org/specs/rfc7540.html#MaxHeaderBlock -func headerListSize(h http.Header) (size uint32) { - for k, vv := range h { - for _, v := range vv { - hf := hpack.HeaderField{Name: k, Value: v} - size += hf.Size() - } - } - return size -} - -// padHeaders adds data to an http.Header until headerListSize(h) == -// limit. Due to the way header list sizes are calculated, padHeaders -// cannot add fewer than len("Pad-Headers") + 32 bytes to h, and will -// call t.Fatal if asked to do so. PadHeaders first reserves enough -// space for an empty "Pad-Headers" key, then adds as many copies of -// filler as possible. Any remaining bytes necessary to push the -// header list size up to limit are added to h["Pad-Headers"]. -func padHeaders(t *testing.T, h http.Header, limit uint64, filler string) { - if limit > 0xffffffff { - t.Fatalf("padHeaders: refusing to pad to more than 2^32-1 bytes. limit = %v", limit) - } - hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""} - minPadding := uint64(hf.Size()) - size := uint64(headerListSize(h)) - - minlimit := size + minPadding - if limit < minlimit { - t.Fatalf("padHeaders: limit %v < %v", limit, minlimit) - } - - // Use a fixed-width format for name so that fieldSize - // remains constant. - nameFmt := "Pad-Headers-%06d" - hf = hpack.HeaderField{Name: fmt.Sprintf(nameFmt, 1), Value: filler} - fieldSize := uint64(hf.Size()) - - // Add as many complete filler values as possible, leaving - // room for at least one empty "Pad-Headers" key. - limit = limit - minPadding - for i := 0; size+fieldSize < limit; i++ { - name := fmt.Sprintf(nameFmt, i) - h.Add(name, filler) - size += fieldSize - } - - // Add enough bytes to reach limit. - remain := limit - size - lastValue := strings.Repeat("*", int(remain)) - h.Add("Pad-Headers", lastValue) -} - -func TestPadHeaders(t *testing.T) { - check := func(h http.Header, limit uint32, fillerLen int) { - if h == nil { - h = make(http.Header) - } - filler := strings.Repeat("f", fillerLen) - padHeaders(t, h, uint64(limit), filler) - gotSize := headerListSize(h) - if gotSize != limit { - t.Errorf("Got size = %v; want %v", gotSize, limit) - } - } - // Try all possible combinations for small fillerLen and limit. - hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""} - minLimit := hf.Size() - for limit := minLimit; limit <= 128; limit++ { - for fillerLen := 0; uint32(fillerLen) <= limit; fillerLen++ { - check(nil, limit, fillerLen) - } - } - - // Try a few tests with larger limits, plus cumulative - // tests. Since these tests are cumulative, tests[i+1].limit - // must be >= tests[i].limit + minLimit. See the comment on - // padHeaders for more info on why the limit arg has this - // restriction. - tests := []struct { - fillerLen int - limit uint32 - }{ - { - fillerLen: 64, - limit: 1024, - }, - { - fillerLen: 1024, - limit: 1286, - }, - { - fillerLen: 256, - limit: 2048, - }, - { - fillerLen: 1024, - limit: 10 * 1024, - }, - { - fillerLen: 1023, - limit: 11 * 1024, - }, - } - h := make(http.Header) - for _, tc := range tests { - check(nil, tc.limit, tc.fillerLen) - check(h, tc.limit, tc.fillerLen) - } -} - -func TestTransportChecksRequestHeaderListSize(t *testing.T) { - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - // Consume body & force client to send - // trailers before writing response. - // ioutil.ReadAll returns non-nil err for - // requests that attempt to send greater than - // maxHeaderListSize bytes of trailers, since - // those requests generate a stream reset. - ioutil.ReadAll(r.Body) - r.Body.Close() - }, - func(ts *httptest.Server) { - ts.Config.MaxHeaderBytes = 16 << 10 - }, - optOnlyServer, - optQuiet, - ) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - checkRoundTrip := func(req *http.Request, wantErr error, desc string) { - res, err := tr.RoundTrip(req) - if err != wantErr { - if res != nil { - res.Body.Close() - } - t.Errorf("%v: RoundTrip err = %v; want %v", desc, err, wantErr) - return - } - if err == nil { - if res == nil { - t.Errorf("%v: response nil; want non-nil.", desc) - return - } - defer res.Body.Close() - if res.StatusCode != http.StatusOK { - t.Errorf("%v: response status = %v; want %v", desc, res.StatusCode, http.StatusOK) - } - return - } - if res != nil { - t.Errorf("%v: RoundTrip err = %v but response non-nil", desc, err) - } - } - headerListSizeForRequest := func(req *http.Request) (size uint64) { - contentLen := actualContentLength(req) - trailers, err := commaSeparatedTrailers(req) - if err != nil { - t.Fatalf("headerListSizeForRequest: %v", err) - } - cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff} - cc.henc = hpack.NewEncoder(&cc.hbuf) - cc.mu.Lock() - hdrs, err := cc.encodeHeaders(req, true, trailers, contentLen) - cc.mu.Unlock() - if err != nil { - t.Fatalf("headerListSizeForRequest: %v", err) - } - hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(hf hpack.HeaderField) { - size += uint64(hf.Size()) - }) - if len(hdrs) > 0 { - if _, err := hpackDec.Write(hdrs); err != nil { - t.Fatalf("headerListSizeForRequest: %v", err) - } - } - return size - } - // Create a new Request for each test, rather than reusing the - // same Request, to avoid a race when modifying req.Headers. - // See https://github.com/golang/go/issues/21316 - newRequest := func() *http.Request { - // Body must be non-nil to enable writing trailers. - body := strings.NewReader("hello") - req, err := http.NewRequest("POST", st.ts.URL, body) - if err != nil { - t.Fatalf("newRequest: NewRequest: %v", err) - } - return req - } - - // Make an arbitrary request to ensure we get the server's - // settings frame and initialize peerMaxHeaderListSize. - req := newRequest() - checkRoundTrip(req, nil, "Initial request") - - // Get the ClientConn associated with the request and validate - // peerMaxHeaderListSize. - addr := authorityAddr(req.URL.Scheme, req.URL.Host) - cc, err := tr.connPool().GetClientConn(req, addr) - if err != nil { - t.Fatalf("GetClientConn: %v", err) - } - cc.mu.Lock() - peerSize := cc.peerMaxHeaderListSize - cc.mu.Unlock() - st.scMu.Lock() - wantSize := uint64(st.sc.maxHeaderListSize()) - st.scMu.Unlock() - if peerSize != wantSize { - t.Errorf("peerMaxHeaderListSize = %v; want %v", peerSize, wantSize) - } - - // Sanity check peerSize. (*serverConn) maxHeaderListSize adds - // 320 bytes of padding. - wantHeaderBytes := uint64(st.ts.Config.MaxHeaderBytes) + 320 - if peerSize != wantHeaderBytes { - t.Errorf("peerMaxHeaderListSize = %v; want %v.", peerSize, wantHeaderBytes) - } - - // Pad headers & trailers, but stay under peerSize. - req = newRequest() - req.Header = make(http.Header) - req.Trailer = make(http.Header) - filler := strings.Repeat("*", 1024) - padHeaders(t, req.Trailer, peerSize, filler) - // cc.encodeHeaders adds some default headers to the request, - // so we need to leave room for those. - defaultBytes := headerListSizeForRequest(req) - padHeaders(t, req.Header, peerSize-defaultBytes, filler) - checkRoundTrip(req, nil, "Headers & Trailers under limit") - - // Add enough header bytes to push us over peerSize. - req = newRequest() - req.Header = make(http.Header) - padHeaders(t, req.Header, peerSize, filler) - checkRoundTrip(req, errRequestHeaderListSize, "Headers over limit") - - // Push trailers over the limit. - req = newRequest() - req.Trailer = make(http.Header) - padHeaders(t, req.Trailer, peerSize+1, filler) - checkRoundTrip(req, errRequestHeaderListSize, "Trailers over limit") - - // Send headers with a single large value. - req = newRequest() - filler = strings.Repeat("*", int(peerSize)) - req.Header = make(http.Header) - req.Header.Set("Big", filler) - checkRoundTrip(req, errRequestHeaderListSize, "Single large header") - - // Send trailers with a single large value. - req = newRequest() - req.Trailer = make(http.Header) - req.Trailer.Set("Big", filler) - checkRoundTrip(req, errRequestHeaderListSize, "Single large trailer") -} - -func TestTransportChecksResponseHeaderListSize(t *testing.T) { - ct := newClientTester(t) - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err != errResponseHeaderListSize { - if res != nil { - res.Body.Close() - } - size := int64(0) - for k, vv := range res.Header { - for _, v := range vv { - size += int64(len(k)) + int64(len(v)) + 32 - } - } - return fmt.Errorf("RoundTrip Error = %v (and %d bytes of response headers); want errResponseHeaderListSize", err, size) - } - return nil - } - ct.server = func() error { - ct.greet() - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return err - } - switch f := f.(type) { - case *HeadersFrame: - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - large := strings.Repeat("a", 1<<10) - for i := 0; i < 5042; i++ { - enc.WriteField(hpack.HeaderField{Name: large, Value: large}) - } - if size, want := buf.Len(), 6329; size != want { - // Note: this number might change if - // our hpack implementation - // changes. That's fine. This is - // just a sanity check that our - // response can fit in a single - // header block fragment frame. - return fmt.Errorf("encoding over 10MB of duplicate keypairs took %d bytes; expected %d", size, want) - } - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: true, - BlockFragment: buf.Bytes(), - }) - return nil - } - } - } - ct.run() -} - -// Test that the Transport returns a typed error from Response.Body.Read calls -// when the server sends an error. (here we use a panic, since that should generate -// a stream error, but others like cancel should be similar) -func TestTransportBodyReadErrorType(t *testing.T) { - doPanic := make(chan bool, 1) - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - w.(http.Flusher).Flush() // force headers out - <-doPanic - panic("boom") - }, - optOnlyServer, - optQuiet, - ) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - c := &http.Client{Transport: tr} - - res, err := c.Get(st.ts.URL) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() - doPanic <- true - buf := make([]byte, 100) - n, err := res.Body.Read(buf) - want := StreamError{StreamID: 0x1, Code: 0x2} - if !reflect.DeepEqual(want, err) { - t.Errorf("Read = %v, %#v; want error %#v", n, err, want) - } -} - -// golang.org/issue/13924 -// This used to fail after many iterations, especially with -race: -// go test -v -run=TestTransportDoubleCloseOnWriteError -count=500 -race -func TestTransportDoubleCloseOnWriteError(t *testing.T) { - var ( - mu sync.Mutex - conn net.Conn // to close if set - ) - - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - mu.Lock() - defer mu.Unlock() - if conn != nil { - conn.Close() - } - }, - optOnlyServer, - ) - defer st.Close() - - tr := &Transport{ - TLSClientConfig: tlsConfigInsecure, - DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { - tc, err := tls.Dial(network, addr, cfg) - if err != nil { - return nil, err - } - mu.Lock() - defer mu.Unlock() - conn = tc - return tc, nil - }, - } - defer tr.CloseIdleConnections() - c := &http.Client{Transport: tr} - c.Get(st.ts.URL) -} - -// Test that the http1 Transport.DisableKeepAlives option is respected -// and connections are closed as soon as idle. -// See golang.org/issue/14008 -func TestTransportDisableKeepAlives(t *testing.T) { - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "hi") - }, - optOnlyServer, - ) - defer st.Close() - - connClosed := make(chan struct{}) // closed on tls.Conn.Close - tr := &Transport{ - t1: &http.Transport{ - DisableKeepAlives: true, - }, - TLSClientConfig: tlsConfigInsecure, - DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { - tc, err := tls.Dial(network, addr, cfg) - if err != nil { - return nil, err - } - return ¬eCloseConn{Conn: tc, closefn: func() { close(connClosed) }}, nil - }, - } - c := &http.Client{Transport: tr} - res, err := c.Get(st.ts.URL) - if err != nil { - t.Fatal(err) - } - if _, err := ioutil.ReadAll(res.Body); err != nil { - t.Fatal(err) - } - defer res.Body.Close() - - select { - case <-connClosed: - case <-time.After(1 * time.Second): - t.Errorf("timeout") - } - -} - -// Test concurrent requests with Transport.DisableKeepAlives. We can share connections, -// but when things are totally idle, it still needs to close. -func TestTransportDisableKeepAlives_Concurrency(t *testing.T) { - const D = 25 * time.Millisecond - st := newServerTester(t, - func(w http.ResponseWriter, r *http.Request) { - time.Sleep(D) - io.WriteString(w, "hi") - }, - optOnlyServer, - ) - defer st.Close() - - var dials int32 - var conns sync.WaitGroup - tr := &Transport{ - t1: &http.Transport{ - DisableKeepAlives: true, - }, - TLSClientConfig: tlsConfigInsecure, - DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) { - tc, err := tls.Dial(network, addr, cfg) - if err != nil { - return nil, err - } - atomic.AddInt32(&dials, 1) - conns.Add(1) - return ¬eCloseConn{Conn: tc, closefn: func() { conns.Done() }}, nil - }, - } - c := &http.Client{Transport: tr} - var reqs sync.WaitGroup - const N = 20 - for i := 0; i < N; i++ { - reqs.Add(1) - if i == N-1 { - // For the final request, try to make all the - // others close. This isn't verified in the - // count, other than the Log statement, since - // it's so timing dependent. This test is - // really to make sure we don't interrupt a - // valid request. - time.Sleep(D * 2) - } - go func() { - defer reqs.Done() - res, err := c.Get(st.ts.URL) - if err != nil { - t.Error(err) - return - } - if _, err := ioutil.ReadAll(res.Body); err != nil { - t.Error(err) - return - } - res.Body.Close() - }() - } - reqs.Wait() - conns.Wait() - t.Logf("did %d dials, %d requests", atomic.LoadInt32(&dials), N) -} - -type noteCloseConn struct { - net.Conn - onceClose sync.Once - closefn func() -} - -func (c *noteCloseConn) Close() error { - c.onceClose.Do(c.closefn) - return c.Conn.Close() -} - -func isTimeout(err error) bool { - switch err := err.(type) { - case nil: - return false - case *url.Error: - return isTimeout(err.Err) - case net.Error: - return err.Timeout() - } - return false -} - -// Test that the http1 Transport.ResponseHeaderTimeout option and cancel is sent. -func TestTransportResponseHeaderTimeout_NoBody(t *testing.T) { - testTransportResponseHeaderTimeout(t, false) -} -func TestTransportResponseHeaderTimeout_Body(t *testing.T) { - testTransportResponseHeaderTimeout(t, true) -} - -func testTransportResponseHeaderTimeout(t *testing.T, body bool) { - ct := newClientTester(t) - ct.tr.t1 = &http.Transport{ - ResponseHeaderTimeout: 5 * time.Millisecond, - } - ct.client = func() error { - c := &http.Client{Transport: ct.tr} - var err error - var n int64 - const bodySize = 4 << 20 - if body { - _, err = c.Post("https://dummy.tld/", "text/foo", io.LimitReader(countingReader{&n}, bodySize)) - } else { - _, err = c.Get("https://dummy.tld/") - } - if !isTimeout(err) { - t.Errorf("client expected timeout error; got %#v", err) - } - if body && n != bodySize { - t.Errorf("only read %d bytes of body; want %d", n, bodySize) - } - return nil - } - ct.server = func() error { - ct.greet() - for { - f, err := ct.fr.ReadFrame() - if err != nil { - t.Logf("ReadFrame: %v", err) - return nil - } - switch f := f.(type) { - case *DataFrame: - dataLen := len(f.Data()) - if dataLen > 0 { - if err := ct.fr.WriteWindowUpdate(0, uint32(dataLen)); err != nil { - return err - } - if err := ct.fr.WriteWindowUpdate(f.StreamID, uint32(dataLen)); err != nil { - return err - } - } - case *RSTStreamFrame: - if f.StreamID == 1 && f.ErrCode == ErrCodeCancel { - return nil - } - } - } - } - ct.run() -} - -func TestTransportDisableCompression(t *testing.T) { - const body = "sup" - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - want := http.Header{ - "User-Agent": []string{"Go-http-client/2.0"}, - } - if !reflect.DeepEqual(r.Header, want) { - t.Errorf("request headers = %v; want %v", r.Header, want) - } - }, optOnlyServer) - defer st.Close() - - tr := &Transport{ - TLSClientConfig: tlsConfigInsecure, - t1: &http.Transport{ - DisableCompression: true, - }, - } - defer tr.CloseIdleConnections() - - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - t.Fatal(err) - } - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - defer res.Body.Close() -} - -// RFC 7540 section 8.1.2.2 -func TestTransportRejectsConnHeaders(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - var got []string - for k := range r.Header { - got = append(got, k) - } - sort.Strings(got) - w.Header().Set("Got-Header", strings.Join(got, ",")) - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - tests := []struct { - key string - value []string - want string - }{ - { - key: "Upgrade", - value: []string{"anything"}, - want: "ERROR: http2: invalid Upgrade request header: [\"anything\"]", - }, - { - key: "Connection", - value: []string{"foo"}, - want: "ERROR: http2: invalid Connection request header: [\"foo\"]", - }, - { - key: "Connection", - value: []string{"close"}, - want: "Accept-Encoding,User-Agent", - }, - { - key: "Connection", - value: []string{"close", "something-else"}, - want: "ERROR: http2: invalid Connection request header: [\"close\" \"something-else\"]", - }, - { - key: "Connection", - value: []string{"keep-alive"}, - want: "Accept-Encoding,User-Agent", - }, - { - key: "Proxy-Connection", // just deleted and ignored - value: []string{"keep-alive"}, - want: "Accept-Encoding,User-Agent", - }, - { - key: "Transfer-Encoding", - value: []string{""}, - want: "Accept-Encoding,User-Agent", - }, - { - key: "Transfer-Encoding", - value: []string{"foo"}, - want: "ERROR: http2: invalid Transfer-Encoding request header: [\"foo\"]", - }, - { - key: "Transfer-Encoding", - value: []string{"chunked"}, - want: "Accept-Encoding,User-Agent", - }, - { - key: "Transfer-Encoding", - value: []string{"chunked", "other"}, - want: "ERROR: http2: invalid Transfer-Encoding request header: [\"chunked\" \"other\"]", - }, - { - key: "Content-Length", - value: []string{"123"}, - want: "Accept-Encoding,User-Agent", - }, - { - key: "Keep-Alive", - value: []string{"doop"}, - want: "Accept-Encoding,User-Agent", - }, - } - - for _, tt := range tests { - req, _ := http.NewRequest("GET", st.ts.URL, nil) - req.Header[tt.key] = tt.value - res, err := tr.RoundTrip(req) - var got string - if err != nil { - got = fmt.Sprintf("ERROR: %v", err) - } else { - got = res.Header.Get("Got-Header") - res.Body.Close() - } - if got != tt.want { - t.Errorf("For key %q, value %q, got = %q; want %q", tt.key, tt.value, got, tt.want) - } - } -} - -// golang.org/issue/14048 -func TestTransportFailsOnInvalidHeaders(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - var got []string - for k := range r.Header { - got = append(got, k) - } - sort.Strings(got) - w.Header().Set("Got-Header", strings.Join(got, ",")) - }, optOnlyServer) - defer st.Close() - - tests := [...]struct { - h http.Header - wantErr string - }{ - 0: { - h: http.Header{"with space": {"foo"}}, - wantErr: `invalid HTTP header name "with space"`, - }, - 1: { - h: http.Header{"name": {"Брэд"}}, - wantErr: "", // okay - }, - 2: { - h: http.Header{"имя": {"Brad"}}, - wantErr: `invalid HTTP header name "имя"`, - }, - 3: { - h: http.Header{"foo": {"foo\x01bar"}}, - wantErr: `invalid HTTP header value "foo\x01bar" for header "foo"`, - }, - } - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - for i, tt := range tests { - req, _ := http.NewRequest("GET", st.ts.URL, nil) - req.Header = tt.h - res, err := tr.RoundTrip(req) - var bad bool - if tt.wantErr == "" { - if err != nil { - bad = true - t.Errorf("case %d: error = %v; want no error", i, err) - } - } else { - if !strings.Contains(fmt.Sprint(err), tt.wantErr) { - bad = true - t.Errorf("case %d: error = %v; want error %q", i, err, tt.wantErr) - } - } - if err == nil { - if bad { - t.Logf("case %d: server got headers %q", i, res.Header.Get("Got-Header")) - } - res.Body.Close() - } - } -} - -// Tests that gzipReader doesn't crash on a second Read call following -// the first Read call's gzip.NewReader returning an error. -func TestGzipReader_DoubleReadCrash(t *testing.T) { - gz := &gzipReader{ - body: ioutil.NopCloser(strings.NewReader("0123456789")), - } - var buf [1]byte - n, err1 := gz.Read(buf[:]) - if n != 0 || !strings.Contains(fmt.Sprint(err1), "invalid header") { - t.Fatalf("Read = %v, %v; want 0, invalid header", n, err1) - } - n, err2 := gz.Read(buf[:]) - if n != 0 || err2 != err1 { - t.Fatalf("second Read = %v, %v; want 0, %v", n, err2, err1) - } -} - -func TestTransportNewTLSConfig(t *testing.T) { - tests := [...]struct { - conf *tls.Config - host string - want *tls.Config - }{ - // Normal case. - 0: { - conf: nil, - host: "foo.com", - want: &tls.Config{ - ServerName: "foo.com", - NextProtos: []string{NextProtoTLS}, - }, - }, - - // User-provided name (bar.com) takes precedence: - 1: { - conf: &tls.Config{ - ServerName: "bar.com", - }, - host: "foo.com", - want: &tls.Config{ - ServerName: "bar.com", - NextProtos: []string{NextProtoTLS}, - }, - }, - - // NextProto is prepended: - 2: { - conf: &tls.Config{ - NextProtos: []string{"foo", "bar"}, - }, - host: "example.com", - want: &tls.Config{ - ServerName: "example.com", - NextProtos: []string{NextProtoTLS, "foo", "bar"}, - }, - }, - - // NextProto is not duplicated: - 3: { - conf: &tls.Config{ - NextProtos: []string{"foo", "bar", NextProtoTLS}, - }, - host: "example.com", - want: &tls.Config{ - ServerName: "example.com", - NextProtos: []string{"foo", "bar", NextProtoTLS}, - }, - }, - } - for i, tt := range tests { - // Ignore the session ticket keys part, which ends up populating - // unexported fields in the Config: - if tt.conf != nil { - tt.conf.SessionTicketsDisabled = true - } - - tr := &Transport{TLSClientConfig: tt.conf} - got := tr.newTLSConfig(tt.host) - - got.SessionTicketsDisabled = false - - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("%d. got %#v; want %#v", i, got, tt.want) - } - } -} - -// The Google GFE responds to HEAD requests with a HEADERS frame -// without END_STREAM, followed by a 0-length DATA frame with -// END_STREAM. Make sure we don't get confused by that. (We did.) -func TestTransportReadHeadResponse(t *testing.T) { - ct := newClientTester(t) - clientDone := make(chan struct{}) - ct.client = func() error { - defer close(clientDone) - req, _ := http.NewRequest("HEAD", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err != nil { - return err - } - if res.ContentLength != 123 { - return fmt.Errorf("Content-Length = %d; want 123", res.ContentLength) - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - return fmt.Errorf("ReadAll: %v", err) - } - if len(slurp) > 0 { - return fmt.Errorf("Unexpected non-empty ReadAll body: %q", slurp) - } - return nil - } - ct.server = func() error { - ct.greet() - for { - f, err := ct.fr.ReadFrame() - if err != nil { - t.Logf("ReadFrame: %v", err) - return nil - } - hf, ok := f.(*HeadersFrame) - if !ok { - continue - } - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "123"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, // as the GFE does - BlockFragment: buf.Bytes(), - }) - ct.fr.WriteData(hf.StreamID, true, nil) - - <-clientDone - return nil - } - } - ct.run() -} - -func TestTransportReadHeadResponseWithBody(t *testing.T) { - // This test use not valid response format. - // Discarding logger output to not spam tests output. - log.SetOutput(ioutil.Discard) - defer log.SetOutput(os.Stderr) - - response := "redirecting to /elsewhere" - ct := newClientTester(t) - clientDone := make(chan struct{}) - ct.client = func() error { - defer close(clientDone) - req, _ := http.NewRequest("HEAD", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err != nil { - return err - } - if res.ContentLength != int64(len(response)) { - return fmt.Errorf("Content-Length = %d; want %d", res.ContentLength, len(response)) - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - return fmt.Errorf("ReadAll: %v", err) - } - if len(slurp) > 0 { - return fmt.Errorf("Unexpected non-empty ReadAll body: %q", slurp) - } - return nil - } - ct.server = func() error { - ct.greet() - for { - f, err := ct.fr.ReadFrame() - if err != nil { - t.Logf("ReadFrame: %v", err) - return nil - } - hf, ok := f.(*HeadersFrame) - if !ok { - continue - } - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "content-length", Value: strconv.Itoa(len(response))}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - ct.fr.WriteData(hf.StreamID, true, []byte(response)) - - <-clientDone - return nil - } - } - ct.run() -} - -type neverEnding byte - -func (b neverEnding) Read(p []byte) (int, error) { - for i := range p { - p[i] = byte(b) - } - return len(p), nil -} - -// golang.org/issue/15425: test that a handler closing the request -// body doesn't terminate the stream to the peer. (It just stops -// readability from the handler's side, and eventually the client -// runs out of flow control tokens) -func TestTransportHandlerBodyClose(t *testing.T) { - const bodySize = 10 << 20 - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - r.Body.Close() - io.Copy(w, io.LimitReader(neverEnding('A'), bodySize)) - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - g0 := runtime.NumGoroutine() - - const numReq = 10 - for i := 0; i < numReq; i++ { - req, err := http.NewRequest("POST", st.ts.URL, struct{ io.Reader }{io.LimitReader(neverEnding('A'), bodySize)}) - if err != nil { - t.Fatal(err) - } - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - n, err := io.Copy(ioutil.Discard, res.Body) - res.Body.Close() - if n != bodySize || err != nil { - t.Fatalf("req#%d: Copy = %d, %v; want %d, nil", i, n, err, bodySize) - } - } - tr.CloseIdleConnections() - - if !waitCondition(5*time.Second, 100*time.Millisecond, func() bool { - gd := runtime.NumGoroutine() - g0 - return gd < numReq/2 - }) { - t.Errorf("appeared to leak goroutines") - } -} - -// https://golang.org/issue/15930 -func TestTransportFlowControl(t *testing.T) { - const bufLen = 64 << 10 - var total int64 = 100 << 20 // 100MB - if testing.Short() { - total = 10 << 20 - } - - var wrote int64 // updated atomically - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - b := make([]byte, bufLen) - for wrote < total { - n, err := w.Write(b) - atomic.AddInt64(&wrote, int64(n)) - if err != nil { - t.Errorf("ResponseWriter.Write error: %v", err) - break - } - w.(http.Flusher).Flush() - } - }, optOnlyServer) - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - t.Fatal("NewRequest error:", err) - } - resp, err := tr.RoundTrip(req) - if err != nil { - t.Fatal("RoundTrip error:", err) - } - defer resp.Body.Close() - - var read int64 - b := make([]byte, bufLen) - for { - n, err := resp.Body.Read(b) - if err == io.EOF { - break - } - if err != nil { - t.Fatal("Read error:", err) - } - read += int64(n) - - const max = transportDefaultStreamFlow - if w := atomic.LoadInt64(&wrote); -max > read-w || read-w > max { - t.Fatalf("Too much data inflight: server wrote %v bytes but client only received %v", w, read) - } - - // Let the server get ahead of the client. - time.Sleep(1 * time.Millisecond) - } -} - -// golang.org/issue/14627 -- if the server sends a GOAWAY frame, make -// the Transport remember it and return it back to users (via -// RoundTrip or request body reads) if needed (e.g. if the server -// proceeds to close the TCP connection before the client gets its -// response) -func TestTransportUsesGoAwayDebugError_RoundTrip(t *testing.T) { - testTransportUsesGoAwayDebugError(t, false) -} - -func TestTransportUsesGoAwayDebugError_Body(t *testing.T) { - testTransportUsesGoAwayDebugError(t, true) -} - -func testTransportUsesGoAwayDebugError(t *testing.T, failMidBody bool) { - ct := newClientTester(t) - clientDone := make(chan struct{}) - - const goAwayErrCode = ErrCodeHTTP11Required // arbitrary - const goAwayDebugData = "some debug data" - - ct.client = func() error { - defer close(clientDone) - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if failMidBody { - if err != nil { - return fmt.Errorf("unexpected client RoundTrip error: %v", err) - } - _, err = io.Copy(ioutil.Discard, res.Body) - res.Body.Close() - } - want := GoAwayError{ - LastStreamID: 5, - ErrCode: goAwayErrCode, - DebugData: goAwayDebugData, - } - if !reflect.DeepEqual(err, want) { - t.Errorf("RoundTrip error = %T: %#v, want %T (%#v)", err, err, want, want) - } - return nil - } - ct.server = func() error { - ct.greet() - for { - f, err := ct.fr.ReadFrame() - if err != nil { - t.Logf("ReadFrame: %v", err) - return nil - } - hf, ok := f.(*HeadersFrame) - if !ok { - continue - } - if failMidBody { - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "123"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - } - // Write two GOAWAY frames, to test that the Transport takes - // the interesting parts of both. - ct.fr.WriteGoAway(5, ErrCodeNo, []byte(goAwayDebugData)) - ct.fr.WriteGoAway(5, goAwayErrCode, nil) - ct.sc.(*net.TCPConn).CloseWrite() - <-clientDone - return nil - } - } - ct.run() -} - -func testTransportReturnsUnusedFlowControl(t *testing.T, oneDataFrame bool) { - ct := newClientTester(t) - - clientClosed := make(chan struct{}) - serverWroteFirstByte := make(chan struct{}) - - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err != nil { - return err - } - <-serverWroteFirstByte - - if n, err := res.Body.Read(make([]byte, 1)); err != nil || n != 1 { - return fmt.Errorf("body read = %v, %v; want 1, nil", n, err) - } - res.Body.Close() // leaving 4999 bytes unread - close(clientClosed) - - return nil - } - ct.server = func() error { - ct.greet() - - var hf *HeadersFrame - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) - } - switch f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - continue - } - var ok bool - hf, ok = f.(*HeadersFrame) - if !ok { - return fmt.Errorf("Got %T; want HeadersFrame", f) - } - break - } - - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "5000"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - - // Two cases: - // - Send one DATA frame with 5000 bytes. - // - Send two DATA frames with 1 and 4999 bytes each. - // - // In both cases, the client should consume one byte of data, - // refund that byte, then refund the following 4999 bytes. - // - // In the second case, the server waits for the client connection to - // close before seconding the second DATA frame. This tests the case - // where the client receives a DATA frame after it has reset the stream. - if oneDataFrame { - ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 5000)) - close(serverWroteFirstByte) - <-clientClosed - } else { - ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 1)) - close(serverWroteFirstByte) - <-clientClosed - ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 4999)) - } - - waitingFor := "RSTStreamFrame" - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return fmt.Errorf("ReadFrame while waiting for %s: %v", waitingFor, err) - } - if _, ok := f.(*SettingsFrame); ok { - continue - } - switch waitingFor { - case "RSTStreamFrame": - if rf, ok := f.(*RSTStreamFrame); !ok || rf.ErrCode != ErrCodeCancel { - return fmt.Errorf("Expected a RSTStreamFrame with code cancel; got %v", summarizeFrame(f)) - } - waitingFor = "WindowUpdateFrame" - case "WindowUpdateFrame": - if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != 4999 { - return fmt.Errorf("Expected WindowUpdateFrame for 4999 bytes; got %v", summarizeFrame(f)) - } - return nil - } - } - } - ct.run() -} - -// See golang.org/issue/16481 -func TestTransportReturnsUnusedFlowControlSingleWrite(t *testing.T) { - testTransportReturnsUnusedFlowControl(t, true) -} - -// See golang.org/issue/20469 -func TestTransportReturnsUnusedFlowControlMultipleWrites(t *testing.T) { - testTransportReturnsUnusedFlowControl(t, false) -} - -// Issue 16612: adjust flow control on open streams when transport -// receives SETTINGS with INITIAL_WINDOW_SIZE from server. -func TestTransportAdjustsFlowControl(t *testing.T) { - ct := newClientTester(t) - clientDone := make(chan struct{}) - - const bodySize = 1 << 20 - - ct.client = func() error { - defer ct.cc.(*net.TCPConn).CloseWrite() - defer close(clientDone) - - req, _ := http.NewRequest("POST", "https://dummy.tld/", struct{ io.Reader }{io.LimitReader(neverEnding('A'), bodySize)}) - res, err := ct.tr.RoundTrip(req) - if err != nil { - return err - } - res.Body.Close() - return nil - } - ct.server = func() error { - _, err := io.ReadFull(ct.sc, make([]byte, len(ClientPreface))) - if err != nil { - return fmt.Errorf("reading client preface: %v", err) - } - - var gotBytes int64 - var sentSettings bool - for { - f, err := ct.fr.ReadFrame() - if err != nil { - select { - case <-clientDone: - return nil - default: - return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) - } - } - switch f := f.(type) { - case *DataFrame: - gotBytes += int64(len(f.Data())) - // After we've got half the client's - // initial flow control window's worth - // of request body data, give it just - // enough flow control to finish. - if gotBytes >= initialWindowSize/2 && !sentSettings { - sentSettings = true - - ct.fr.WriteSettings(Setting{ID: SettingInitialWindowSize, Val: bodySize}) - ct.fr.WriteWindowUpdate(0, bodySize) - ct.fr.WriteSettingsAck() - } - - if f.StreamEnded() { - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: true, - BlockFragment: buf.Bytes(), - }) - } - } - } - } - ct.run() -} - -// See golang.org/issue/16556 -func TestTransportReturnsDataPaddingFlowControl(t *testing.T) { - ct := newClientTester(t) - - unblockClient := make(chan bool, 1) - - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err != nil { - return err - } - defer res.Body.Close() - <-unblockClient - return nil - } - ct.server = func() error { - ct.greet() - - var hf *HeadersFrame - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) - } - switch f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - continue - } - var ok bool - hf, ok = f.(*HeadersFrame) - if !ok { - return fmt.Errorf("Got %T; want HeadersFrame", f) - } - break - } - - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "content-length", Value: "5000"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - pad := make([]byte, 5) - ct.fr.WriteDataPadded(hf.StreamID, false, make([]byte, 5000), pad) // without ending stream - - f, err := ct.readNonSettingsFrame() - if err != nil { - return fmt.Errorf("ReadFrame while waiting for first WindowUpdateFrame: %v", err) - } - wantBack := uint32(len(pad)) + 1 // one byte for the length of the padding - if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != wantBack || wuf.StreamID != 0 { - return fmt.Errorf("Expected conn WindowUpdateFrame for %d bytes; got %v", wantBack, summarizeFrame(f)) - } - - f, err = ct.readNonSettingsFrame() - if err != nil { - return fmt.Errorf("ReadFrame while waiting for second WindowUpdateFrame: %v", err) - } - if wuf, ok := f.(*WindowUpdateFrame); !ok || wuf.Increment != wantBack || wuf.StreamID == 0 { - return fmt.Errorf("Expected stream WindowUpdateFrame for %d bytes; got %v", wantBack, summarizeFrame(f)) - } - unblockClient <- true - return nil - } - ct.run() -} - -// golang.org/issue/16572 -- RoundTrip shouldn't hang when it gets a -// StreamError as a result of the response HEADERS -func TestTransportReturnsErrorOnBadResponseHeaders(t *testing.T) { - ct := newClientTester(t) - - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := ct.tr.RoundTrip(req) - if err == nil { - res.Body.Close() - return errors.New("unexpected successful GET") - } - want := StreamError{1, ErrCodeProtocol, headerFieldNameError(" content-type")} - if !reflect.DeepEqual(want, err) { - t.Errorf("RoundTrip error = %#v; want %#v", err, want) - } - return nil - } - ct.server = func() error { - ct.greet() - - hf, err := ct.firstHeaders() - if err != nil { - return err - } - - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: " content-type", Value: "bogus"}) // bogus spaces - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - - for { - fr, err := ct.readFrame() - if err != nil { - return fmt.Errorf("error waiting for RST_STREAM from client: %v", err) - } - if _, ok := fr.(*SettingsFrame); ok { - continue - } - if rst, ok := fr.(*RSTStreamFrame); !ok || rst.StreamID != 1 || rst.ErrCode != ErrCodeProtocol { - t.Errorf("Frame = %v; want RST_STREAM for stream 1 with ErrCodeProtocol", summarizeFrame(fr)) - } - break - } - - return nil - } - ct.run() -} - -// byteAndEOFReader returns is in an io.Reader which reads one byte -// (the underlying byte) and io.EOF at once in its Read call. -type byteAndEOFReader byte - -func (b byteAndEOFReader) Read(p []byte) (n int, err error) { - if len(p) == 0 { - panic("unexpected useless call") - } - p[0] = byte(b) - return 1, io.EOF -} - -// Issue 16788: the Transport had a regression where it started -// sending a spurious DATA frame with a duplicate END_STREAM bit after -// the request body writer goroutine had already read an EOF from the -// Request.Body and included the END_STREAM on a data-carrying DATA -// frame. -// -// Notably, to trigger this, the requests need to use a Request.Body -// which returns (non-0, io.EOF) and also needs to set the ContentLength -// explicitly. -func TestTransportBodyDoubleEndStream(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - // Nothing. - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - for i := 0; i < 2; i++ { - req, _ := http.NewRequest("POST", st.ts.URL, byteAndEOFReader('a')) - req.ContentLength = 1 - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatalf("failure on req %d: %v", i+1, err) - } - defer res.Body.Close() - } -} - -// golang.org/issue/16847, golang.org/issue/19103 -func TestTransportRequestPathPseudo(t *testing.T) { - type result struct { - path string - err string - } - tests := []struct { - req *http.Request - want result - }{ - 0: { - req: &http.Request{ - Method: "GET", - URL: &url.URL{ - Host: "foo.com", - Path: "/foo", - }, - }, - want: result{path: "/foo"}, - }, - // In Go 1.7, we accepted paths of "//foo". - // In Go 1.8, we rejected it (issue 16847). - // In Go 1.9, we accepted it again (issue 19103). - 1: { - req: &http.Request{ - Method: "GET", - URL: &url.URL{ - Host: "foo.com", - Path: "//foo", - }, - }, - want: result{path: "//foo"}, - }, - - // Opaque with //$Matching_Hostname/path - 2: { - req: &http.Request{ - Method: "GET", - URL: &url.URL{ - Scheme: "https", - Opaque: "//foo.com/path", - Host: "foo.com", - Path: "/ignored", - }, - }, - want: result{path: "/path"}, - }, - - // Opaque with some other Request.Host instead: - 3: { - req: &http.Request{ - Method: "GET", - Host: "bar.com", - URL: &url.URL{ - Scheme: "https", - Opaque: "//bar.com/path", - Host: "foo.com", - Path: "/ignored", - }, - }, - want: result{path: "/path"}, - }, - - // Opaque without the leading "//": - 4: { - req: &http.Request{ - Method: "GET", - URL: &url.URL{ - Opaque: "/path", - Host: "foo.com", - Path: "/ignored", - }, - }, - want: result{path: "/path"}, - }, - - // Opaque we can't handle: - 5: { - req: &http.Request{ - Method: "GET", - URL: &url.URL{ - Scheme: "https", - Opaque: "//unknown_host/path", - Host: "foo.com", - Path: "/ignored", - }, - }, - want: result{err: `invalid request :path "https://unknown_host/path" from URL.Opaque = "//unknown_host/path"`}, - }, - - // A CONNECT request: - 6: { - req: &http.Request{ - Method: "CONNECT", - URL: &url.URL{ - Host: "foo.com", - }, - }, - want: result{}, - }, - } - for i, tt := range tests { - cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff} - cc.henc = hpack.NewEncoder(&cc.hbuf) - cc.mu.Lock() - hdrs, err := cc.encodeHeaders(tt.req, false, "", -1) - cc.mu.Unlock() - var got result - hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(f hpack.HeaderField) { - if f.Name == ":path" { - got.path = f.Value - } - }) - if err != nil { - got.err = err.Error() - } else if len(hdrs) > 0 { - if _, err := hpackDec.Write(hdrs); err != nil { - t.Errorf("%d. bogus hpack: %v", i, err) - continue - } - } - if got != tt.want { - t.Errorf("%d. got %+v; want %+v", i, got, tt.want) - } - - } - -} - -// golang.org/issue/17071 -- don't sniff the first byte of the request body -// before we've determined that the ClientConn is usable. -func TestRoundTripDoesntConsumeRequestBodyEarly(t *testing.T) { - const body = "foo" - req, _ := http.NewRequest("POST", "http://foo.com/", ioutil.NopCloser(strings.NewReader(body))) - cc := &ClientConn{ - closed: true, - } - _, err := cc.RoundTrip(req) - if err != errClientConnUnusable { - t.Fatalf("RoundTrip = %v; want errClientConnUnusable", err) - } - slurp, err := ioutil.ReadAll(req.Body) - if err != nil { - t.Errorf("ReadAll = %v", err) - } - if string(slurp) != body { - t.Errorf("Body = %q; want %q", slurp, body) - } -} - -func TestClientConnPing(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}, optOnlyServer) - defer st.Close() - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - cc, err := tr.dialClientConn(st.ts.Listener.Addr().String(), false) - if err != nil { - t.Fatal(err) - } - if err = cc.Ping(testContext{}); err != nil { - t.Fatal(err) - } -} - -// Issue 16974: if the server sent a DATA frame after the user -// canceled the Transport's Request, the Transport previously wrote to a -// closed pipe, got an error, and ended up closing the whole TCP -// connection. -func TestTransportCancelDataResponseRace(t *testing.T) { - cancel := make(chan struct{}) - clientGotError := make(chan bool, 1) - - const msg = "Hello." - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - if strings.Contains(r.URL.Path, "/hello") { - time.Sleep(50 * time.Millisecond) - io.WriteString(w, msg) - return - } - for i := 0; i < 50; i++ { - io.WriteString(w, "Some data.") - w.(http.Flusher).Flush() - if i == 2 { - close(cancel) - <-clientGotError - } - time.Sleep(10 * time.Millisecond) - } - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - c := &http.Client{Transport: tr} - req, _ := http.NewRequest("GET", st.ts.URL, nil) - req.Cancel = cancel - res, err := c.Do(req) - if err != nil { - t.Fatal(err) - } - if _, err = io.Copy(ioutil.Discard, res.Body); err == nil { - t.Fatal("unexpected success") - } - clientGotError <- true - - res, err = c.Get(st.ts.URL + "/hello") - if err != nil { - t.Fatal(err) - } - slurp, err := ioutil.ReadAll(res.Body) - if err != nil { - t.Fatal(err) - } - if string(slurp) != msg { - t.Errorf("Got = %q; want %q", slurp, msg) - } -} - -// Issue 21316: It should be safe to reuse an http.Request after the -// request has completed. -func TestTransportNoRaceOnRequestObjectAfterRequestComplete(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(200) - io.WriteString(w, "body") - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - req, _ := http.NewRequest("GET", st.ts.URL, nil) - resp, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - if _, err = io.Copy(ioutil.Discard, resp.Body); err != nil { - t.Fatalf("error reading response body: %v", err) - } - if err := resp.Body.Close(); err != nil { - t.Fatalf("error closing response body: %v", err) - } - - // This access of req.Header should not race with code in the transport. - req.Header = http.Header{} -} - -func TestTransportRetryAfterGOAWAY(t *testing.T) { - var dialer struct { - sync.Mutex - count int - } - ct1 := make(chan *clientTester) - ct2 := make(chan *clientTester) - - ln := newLocalListener(t) - defer ln.Close() - - tr := &Transport{ - TLSClientConfig: tlsConfigInsecure, - } - tr.DialTLS = func(network, addr string, cfg *tls.Config) (net.Conn, error) { - dialer.Lock() - defer dialer.Unlock() - dialer.count++ - if dialer.count == 3 { - return nil, errors.New("unexpected number of dials") - } - cc, err := net.Dial("tcp", ln.Addr().String()) - if err != nil { - return nil, fmt.Errorf("dial error: %v", err) - } - sc, err := ln.Accept() - if err != nil { - return nil, fmt.Errorf("accept error: %v", err) - } - ct := &clientTester{ - t: t, - tr: tr, - cc: cc, - sc: sc, - fr: NewFramer(sc, sc), - } - switch dialer.count { - case 1: - ct1 <- ct - case 2: - ct2 <- ct - } - return cc, nil - } - - errs := make(chan error, 3) - done := make(chan struct{}) - defer close(done) - - // Client. - go func() { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - res, err := tr.RoundTrip(req) - if res != nil { - res.Body.Close() - if got := res.Header.Get("Foo"); got != "bar" { - err = fmt.Errorf("foo header = %q; want bar", got) - } - } - if err != nil { - err = fmt.Errorf("RoundTrip: %v", err) - } - errs <- err - }() - - connToClose := make(chan io.Closer, 2) - - // Server for the first request. - go func() { - var ct *clientTester - select { - case ct = <-ct1: - case <-done: - return - } - - connToClose <- ct.cc - ct.greet() - hf, err := ct.firstHeaders() - if err != nil { - errs <- fmt.Errorf("server1 failed reading HEADERS: %v", err) - return - } - t.Logf("server1 got %v", hf) - if err := ct.fr.WriteGoAway(0 /*max id*/, ErrCodeNo, nil); err != nil { - errs <- fmt.Errorf("server1 failed writing GOAWAY: %v", err) - return - } - errs <- nil - }() - - // Server for the second request. - go func() { - var ct *clientTester - select { - case ct = <-ct2: - case <-done: - return - } - - connToClose <- ct.cc - ct.greet() - hf, err := ct.firstHeaders() - if err != nil { - errs <- fmt.Errorf("server2 failed reading HEADERS: %v", err) - return - } - t.Logf("server2 got %v", hf) - - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - enc.WriteField(hpack.HeaderField{Name: "foo", Value: "bar"}) - err = ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: hf.StreamID, - EndHeaders: true, - EndStream: false, - BlockFragment: buf.Bytes(), - }) - if err != nil { - errs <- fmt.Errorf("server2 failed writing response HEADERS: %v", err) - } else { - errs <- nil - } - }() - - for k := 0; k < 3; k++ { - select { - case err := <-errs: - if err != nil { - t.Error(err) - } - case <-time.After(1 * time.Second): - t.Errorf("timed out") - } - } - - for { - select { - case c := <-connToClose: - c.Close() - default: - return - } - } -} - -func TestTransportRetryAfterRefusedStream(t *testing.T) { - clientDone := make(chan struct{}) - ct := newClientTester(t) - ct.client = func() error { - defer ct.cc.(*net.TCPConn).CloseWrite() - defer close(clientDone) - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - resp, err := ct.tr.RoundTrip(req) - if err != nil { - return fmt.Errorf("RoundTrip: %v", err) - } - resp.Body.Close() - if resp.StatusCode != 204 { - return fmt.Errorf("Status = %v; want 204", resp.StatusCode) - } - return nil - } - ct.server = func() error { - ct.greet() - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - nreq := 0 - - for { - f, err := ct.fr.ReadFrame() - if err != nil { - select { - case <-clientDone: - // If the client's done, it - // will have reported any - // errors on its side. - return nil - default: - return err - } - } - switch f := f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - case *HeadersFrame: - if !f.HeadersEnded() { - return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) - } - nreq++ - if nreq == 1 { - ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream) - } else { - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: true, - BlockFragment: buf.Bytes(), - }) - } - default: - return fmt.Errorf("Unexpected client frame %v", f) - } - } - } - ct.run() -} - -func TestTransportRetryHasLimit(t *testing.T) { - // Skip in short mode because the total expected delay is 1s+2s+4s+8s+16s=29s. - if testing.Short() { - t.Skip("skipping long test in short mode") - } - clientDone := make(chan struct{}) - ct := newClientTester(t) - ct.client = func() error { - defer ct.cc.(*net.TCPConn).CloseWrite() - defer close(clientDone) - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - resp, err := ct.tr.RoundTrip(req) - if err == nil { - return fmt.Errorf("RoundTrip expected error, got response: %+v", resp) - } - t.Logf("expected error, got: %v", err) - return nil - } - ct.server = func() error { - ct.greet() - for { - f, err := ct.fr.ReadFrame() - if err != nil { - select { - case <-clientDone: - // If the client's done, it - // will have reported any - // errors on its side. - return nil - default: - return err - } - } - switch f := f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - case *HeadersFrame: - if !f.HeadersEnded() { - return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) - } - ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream) - default: - return fmt.Errorf("Unexpected client frame %v", f) - } - } - } - ct.run() -} - -func TestTransportResponseDataBeforeHeaders(t *testing.T) { - // This test use not valid response format. - // Discarding logger output to not spam tests output. - log.SetOutput(ioutil.Discard) - defer log.SetOutput(os.Stderr) - - ct := newClientTester(t) - ct.client = func() error { - defer ct.cc.(*net.TCPConn).CloseWrite() - req := httptest.NewRequest("GET", "https://dummy.tld/", nil) - // First request is normal to ensure the check is per stream and not per connection. - _, err := ct.tr.RoundTrip(req) - if err != nil { - return fmt.Errorf("RoundTrip expected no error, got: %v", err) - } - // Second request returns a DATA frame with no HEADERS. - resp, err := ct.tr.RoundTrip(req) - if err == nil { - return fmt.Errorf("RoundTrip expected error, got response: %+v", resp) - } - if err, ok := err.(StreamError); !ok || err.Code != ErrCodeProtocol { - return fmt.Errorf("expected stream PROTOCOL_ERROR, got: %v", err) - } - return nil - } - ct.server = func() error { - ct.greet() - for { - f, err := ct.fr.ReadFrame() - if err == io.EOF { - return nil - } else if err != nil { - return err - } - switch f := f.(type) { - case *WindowUpdateFrame, *SettingsFrame: - case *HeadersFrame: - switch f.StreamID { - case 1: - // Send a valid response to first request. - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: true, - BlockFragment: buf.Bytes(), - }) - case 3: - ct.fr.WriteData(f.StreamID, true, []byte("payload")) - } - default: - return fmt.Errorf("Unexpected client frame %v", f) - } - } - } - ct.run() -} -func TestTransportRequestsStallAtServerLimit(t *testing.T) { - const maxConcurrent = 2 - - greet := make(chan struct{}) // server sends initial SETTINGS frame - gotRequest := make(chan struct{}) // server received a request - clientDone := make(chan struct{}) - - // Collect errors from goroutines. - var wg sync.WaitGroup - errs := make(chan error, 100) - defer func() { - wg.Wait() - close(errs) - for err := range errs { - t.Error(err) - } - }() - - // We will send maxConcurrent+2 requests. This checker goroutine waits for the - // following stages: - // 1. The first maxConcurrent requests are received by the server. - // 2. The client will cancel the next request - // 3. The server is unblocked so it can service the first maxConcurrent requests - // 4. The client will send the final request - wg.Add(1) - unblockClient := make(chan struct{}) - clientRequestCancelled := make(chan struct{}) - unblockServer := make(chan struct{}) - go func() { - defer wg.Done() - // Stage 1. - for k := 0; k < maxConcurrent; k++ { - <-gotRequest - } - // Stage 2. - close(unblockClient) - <-clientRequestCancelled - // Stage 3: give some time for the final RoundTrip call to be scheduled and - // verify that the final request is not sent. - time.Sleep(50 * time.Millisecond) - select { - case <-gotRequest: - errs <- errors.New("last request did not stall") - close(unblockServer) - return - default: - } - close(unblockServer) - // Stage 4. - <-gotRequest - }() - - ct := newClientTester(t) - ct.client = func() error { - var wg sync.WaitGroup - defer func() { - wg.Wait() - close(clientDone) - ct.cc.(*net.TCPConn).CloseWrite() - }() - for k := 0; k < maxConcurrent+2; k++ { - wg.Add(1) - go func(k int) { - defer wg.Done() - // Don't send the second request until after receiving SETTINGS from the server - // to avoid a race where we use the default SettingMaxConcurrentStreams, which - // is much larger than maxConcurrent. We have to send the first request before - // waiting because the first request triggers the dial and greet. - if k > 0 { - <-greet - } - // Block until maxConcurrent requests are sent before sending any more. - if k >= maxConcurrent { - <-unblockClient - } - req, _ := http.NewRequest("GET", fmt.Sprintf("https://dummy.tld/%d", k), nil) - if k == maxConcurrent { - // This request will be canceled. - cancel := make(chan struct{}) - req.Cancel = cancel - close(cancel) - _, err := ct.tr.RoundTrip(req) - close(clientRequestCancelled) - if err == nil { - errs <- fmt.Errorf("RoundTrip(%d) should have failed due to cancel", k) - return - } - } else { - resp, err := ct.tr.RoundTrip(req) - if err != nil { - errs <- fmt.Errorf("RoundTrip(%d): %v", k, err) - return - } - ioutil.ReadAll(resp.Body) - resp.Body.Close() - if resp.StatusCode != 204 { - errs <- fmt.Errorf("Status = %v; want 204", resp.StatusCode) - return - } - } - }(k) - } - return nil - } - - ct.server = func() error { - var wg sync.WaitGroup - defer wg.Wait() - - ct.greet(Setting{SettingMaxConcurrentStreams, maxConcurrent}) - - // Server write loop. - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - writeResp := make(chan uint32, maxConcurrent+1) - - wg.Add(1) - go func() { - defer wg.Done() - <-unblockServer - for id := range writeResp { - buf.Reset() - enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"}) - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: id, - EndHeaders: true, - EndStream: true, - BlockFragment: buf.Bytes(), - }) - } - }() - - // Server read loop. - var nreq int - for { - f, err := ct.fr.ReadFrame() - if err != nil { - select { - case <-clientDone: - // If the client's done, it will have reported any errors on its side. - return nil - default: - return err - } - } - switch f := f.(type) { - case *WindowUpdateFrame: - case *SettingsFrame: - // Wait for the client SETTINGS ack until ending the greet. - close(greet) - case *HeadersFrame: - if !f.HeadersEnded() { - return fmt.Errorf("headers should have END_HEADERS be ended: %v", f) - } - gotRequest <- struct{}{} - nreq++ - writeResp <- f.StreamID - if nreq == maxConcurrent+1 { - close(writeResp) - } - default: - return fmt.Errorf("Unexpected client frame %v", f) - } - } - } - - ct.run() -} - -func TestAuthorityAddr(t *testing.T) { - tests := []struct { - scheme, authority string - want string - }{ - {"http", "foo.com", "foo.com:80"}, - {"https", "foo.com", "foo.com:443"}, - {"https", "foo.com:1234", "foo.com:1234"}, - {"https", "1.2.3.4:1234", "1.2.3.4:1234"}, - {"https", "1.2.3.4", "1.2.3.4:443"}, - {"https", "[::1]:1234", "[::1]:1234"}, - {"https", "[::1]", "[::1]:443"}, - } - for _, tt := range tests { - got := authorityAddr(tt.scheme, tt.authority) - if got != tt.want { - t.Errorf("authorityAddr(%q, %q) = %q; want %q", tt.scheme, tt.authority, got, tt.want) - } - } -} - -// Issue 20448: stop allocating for DATA frames' payload after -// Response.Body.Close is called. -func TestTransportAllocationsAfterResponseBodyClose(t *testing.T) { - megabyteZero := make([]byte, 1<<20) - - writeErr := make(chan error, 1) - - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - w.(http.Flusher).Flush() - var sum int64 - for i := 0; i < 100; i++ { - n, err := w.Write(megabyteZero) - sum += int64(n) - if err != nil { - writeErr <- err - return - } - } - t.Logf("wrote all %d bytes", sum) - writeErr <- nil - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - c := &http.Client{Transport: tr} - res, err := c.Get(st.ts.URL) - if err != nil { - t.Fatal(err) - } - var buf [1]byte - if _, err := res.Body.Read(buf[:]); err != nil { - t.Error(err) - } - if err := res.Body.Close(); err != nil { - t.Error(err) - } - - trb, ok := res.Body.(transportResponseBody) - if !ok { - t.Fatalf("res.Body = %T; want transportResponseBody", res.Body) - } - if trb.cs.bufPipe.b != nil { - t.Errorf("response body pipe is still open") - } - - gotErr := <-writeErr - if gotErr == nil { - t.Errorf("Handler unexpectedly managed to write its entire response without getting an error") - } else if gotErr != errStreamClosed { - t.Errorf("Handler Write err = %v; want errStreamClosed", gotErr) - } -} - -// Issue 18891: make sure Request.Body == NoBody means no DATA frame -// is ever sent, even if empty. -func TestTransportNoBodyMeansNoDATA(t *testing.T) { - ct := newClientTester(t) - - unblockClient := make(chan bool) - - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", go18httpNoBody()) - ct.tr.RoundTrip(req) - <-unblockClient - return nil - } - ct.server = func() error { - defer close(unblockClient) - defer ct.cc.(*net.TCPConn).Close() - ct.greet() - - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return fmt.Errorf("ReadFrame while waiting for Headers: %v", err) - } - switch f := f.(type) { - default: - return fmt.Errorf("Got %T; want HeadersFrame", f) - case *WindowUpdateFrame, *SettingsFrame: - continue - case *HeadersFrame: - if !f.StreamEnded() { - return fmt.Errorf("got headers frame without END_STREAM") - } - return nil - } - } - } - ct.run() -} - -func benchSimpleRoundTrip(b *testing.B, nHeaders int) { - defer disableGoroutineTracking()() - b.ReportAllocs() - st := newServerTester(b, - func(w http.ResponseWriter, r *http.Request) { - }, - optOnlyServer, - optQuiet, - ) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - req, err := http.NewRequest("GET", st.ts.URL, nil) - if err != nil { - b.Fatal(err) - } - - for i := 0; i < nHeaders; i++ { - name := fmt.Sprint("A-", i) - req.Header.Set(name, "*") - } - - b.ResetTimer() - - for i := 0; i < b.N; i++ { - res, err := tr.RoundTrip(req) - if err != nil { - if res != nil { - res.Body.Close() - } - b.Fatalf("RoundTrip err = %v; want nil", err) - } - res.Body.Close() - if res.StatusCode != http.StatusOK { - b.Fatalf("Response code = %v; want %v", res.StatusCode, http.StatusOK) - } - } -} - -type infiniteReader struct{} - -func (r infiniteReader) Read(b []byte) (int, error) { - return len(b), nil -} - -// Issue 20521: it is not an error to receive a response and end stream -// from the server without the body being consumed. -func TestTransportResponseAndResetWithoutConsumingBodyRace(t *testing.T) { - st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusOK) - }, optOnlyServer) - defer st.Close() - - tr := &Transport{TLSClientConfig: tlsConfigInsecure} - defer tr.CloseIdleConnections() - - // The request body needs to be big enough to trigger flow control. - req, _ := http.NewRequest("PUT", st.ts.URL, infiniteReader{}) - res, err := tr.RoundTrip(req) - if err != nil { - t.Fatal(err) - } - if res.StatusCode != http.StatusOK { - t.Fatalf("Response code = %v; want %v", res.StatusCode, http.StatusOK) - } -} - -// Verify transport doesn't crash when receiving bogus response lacking a :status header. -// Issue 22880. -func TestTransportHandlesInvalidStatuslessResponse(t *testing.T) { - ct := newClientTester(t) - ct.client = func() error { - req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) - _, err := ct.tr.RoundTrip(req) - const substr = "malformed response from server: missing status pseudo header" - if !strings.Contains(fmt.Sprint(err), substr) { - return fmt.Errorf("RoundTrip error = %v; want substring %q", err, substr) - } - return nil - } - ct.server = func() error { - ct.greet() - var buf bytes.Buffer - enc := hpack.NewEncoder(&buf) - - for { - f, err := ct.fr.ReadFrame() - if err != nil { - return err - } - switch f := f.(type) { - case *HeadersFrame: - enc.WriteField(hpack.HeaderField{Name: "content-type", Value: "text/html"}) // no :status header - ct.fr.WriteHeaders(HeadersFrameParam{ - StreamID: f.StreamID, - EndHeaders: true, - EndStream: false, // we'll send some DATA to try to crash the transport - BlockFragment: buf.Bytes(), - }) - ct.fr.WriteData(f.StreamID, true, []byte("payload")) - return nil - } - } - } - ct.run() -} - -func BenchmarkClientRequestHeaders(b *testing.B) { - b.Run(" 0 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 0) }) - b.Run(" 10 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 10) }) - b.Run(" 100 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 100) }) - b.Run("1000 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 1000) }) -} diff --git a/deps/golang.org/x/net/http2/write.go b/deps/golang.org/x/net/http2/write.go index 8a9711f6e..6b0dfae31 100644 --- a/deps/golang.org/x/net/http2/write.go +++ b/deps/golang.org/x/net/http2/write.go @@ -10,9 +10,10 @@ import ( "log" "net/http" "net/url" + "time" - "golang.org/x/net/http/httpguts" "golang.org/x/net/http2/hpack" + "golang.org/x/net/lex/httplex" ) // writeFramer is implemented by any type that is used to write frames. @@ -89,7 +90,11 @@ type writeGoAway struct { func (p *writeGoAway) writeFrame(ctx writeContext) error { err := ctx.Framer().WriteGoAway(p.maxStreamID, p.code, nil) - ctx.Flush() // ignore error: we're hanging up on them anyway + if p.code != 0 { + ctx.Flush() // ignore error: we're hanging up on them anyway + time.Sleep(50 * time.Millisecond) + ctx.CloseConn() + } return err } @@ -350,7 +355,7 @@ func encodeHeaders(enc *hpack.Encoder, h http.Header, keys []string) { } isTE := k == "transfer-encoding" for _, v := range vv { - if !httpguts.ValidHeaderFieldValue(v) { + if !httplex.ValidHeaderFieldValue(v) { // TODO: return an error? golang.org/issue/14048 // For now just omit it. continue diff --git a/deps/golang.org/x/net/http2/writesched_priority_test.go b/deps/golang.org/x/net/http2/writesched_priority_test.go deleted file mode 100644 index f2b535a2c..000000000 --- a/deps/golang.org/x/net/http2/writesched_priority_test.go +++ /dev/null @@ -1,541 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import ( - "bytes" - "fmt" - "sort" - "testing" -) - -func defaultPriorityWriteScheduler() *priorityWriteScheduler { - return NewPriorityWriteScheduler(nil).(*priorityWriteScheduler) -} - -func checkPriorityWellFormed(ws *priorityWriteScheduler) error { - for id, n := range ws.nodes { - if id != n.id { - return fmt.Errorf("bad ws.nodes: ws.nodes[%d] = %d", id, n.id) - } - if n.parent == nil { - if n.next != nil || n.prev != nil { - return fmt.Errorf("bad node %d: nil parent but prev/next not nil", id) - } - continue - } - found := false - for k := n.parent.kids; k != nil; k = k.next { - if k.id == id { - found = true - break - } - } - if !found { - return fmt.Errorf("bad node %d: not found in parent %d kids list", id, n.parent.id) - } - } - return nil -} - -func fmtTree(ws *priorityWriteScheduler, fmtNode func(*priorityNode) string) string { - var ids []int - for _, n := range ws.nodes { - ids = append(ids, int(n.id)) - } - sort.Ints(ids) - - var buf bytes.Buffer - for _, id := range ids { - if buf.Len() != 0 { - buf.WriteString(" ") - } - if id == 0 { - buf.WriteString(fmtNode(&ws.root)) - } else { - buf.WriteString(fmtNode(ws.nodes[uint32(id)])) - } - } - return buf.String() -} - -func fmtNodeParentSkipRoot(n *priorityNode) string { - switch { - case n.id == 0: - return "" - case n.parent == nil: - return fmt.Sprintf("%d{parent:nil}", n.id) - default: - return fmt.Sprintf("%d{parent:%d}", n.id, n.parent.id) - } -} - -func fmtNodeWeightParentSkipRoot(n *priorityNode) string { - switch { - case n.id == 0: - return "" - case n.parent == nil: - return fmt.Sprintf("%d{weight:%d,parent:nil}", n.id, n.weight) - default: - return fmt.Sprintf("%d{weight:%d,parent:%d}", n.id, n.weight, n.parent.id) - } -} - -func TestPriorityTwoStreams(t *testing.T) { - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{}) - - want := "1{weight:15,parent:0} 2{weight:15,parent:0}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After open\ngot %q\nwant %q", got, want) - } - - // Move 1's parent to 2. - ws.AdjustStream(1, PriorityParam{ - StreamDep: 2, - Weight: 32, - Exclusive: false, - }) - want = "1{weight:32,parent:2} 2{weight:15,parent:0}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After adjust\ngot %q\nwant %q", got, want) - } - - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPriorityAdjustExclusiveZero(t *testing.T) { - // 1, 2, and 3 are all children of the 0 stream. - // Exclusive reprioritization to any of the streams should bring - // the rest of the streams under the reprioritized stream. - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{}) - ws.OpenStream(3, OpenStreamOptions{}) - - want := "1{weight:15,parent:0} 2{weight:15,parent:0} 3{weight:15,parent:0}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After open\ngot %q\nwant %q", got, want) - } - - ws.AdjustStream(2, PriorityParam{ - StreamDep: 0, - Weight: 20, - Exclusive: true, - }) - want = "1{weight:15,parent:2} 2{weight:20,parent:0} 3{weight:15,parent:2}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After adjust\ngot %q\nwant %q", got, want) - } - - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPriorityAdjustOwnParent(t *testing.T) { - // Assigning a node as its own parent should have no effect. - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{}) - ws.AdjustStream(2, PriorityParam{ - StreamDep: 2, - Weight: 20, - Exclusive: true, - }) - want := "1{weight:15,parent:0} 2{weight:15,parent:0}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After adjust\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPriorityClosedStreams(t *testing.T) { - ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{MaxClosedNodesInTree: 2}).(*priorityWriteScheduler) - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 2}) - ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) - - // Close the first three streams. We lose 1, but keep 2 and 3. - ws.CloseStream(1) - ws.CloseStream(2) - ws.CloseStream(3) - - want := "2{weight:15,parent:0} 3{weight:15,parent:2} 4{weight:15,parent:3}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After close\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } - - // Adding a stream as an exclusive child of 1 gives it default - // priorities, since 1 is gone. - ws.OpenStream(5, OpenStreamOptions{}) - ws.AdjustStream(5, PriorityParam{StreamDep: 1, Weight: 15, Exclusive: true}) - - // Adding a stream as an exclusive child of 2 should work, since 2 is not gone. - ws.OpenStream(6, OpenStreamOptions{}) - ws.AdjustStream(6, PriorityParam{StreamDep: 2, Weight: 15, Exclusive: true}) - - want = "2{weight:15,parent:0} 3{weight:15,parent:6} 4{weight:15,parent:3} 5{weight:15,parent:0} 6{weight:15,parent:2}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After add streams\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPriorityClosedStreamsDisabled(t *testing.T) { - ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{}).(*priorityWriteScheduler) - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 2}) - - // Close the first two streams. We keep only 3. - ws.CloseStream(1) - ws.CloseStream(2) - - want := "3{weight:15,parent:0}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After close\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPriorityIdleStreams(t *testing.T) { - ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{MaxIdleNodesInTree: 2}).(*priorityWriteScheduler) - ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 15}) // idle - ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 15}) // idle - ws.AdjustStream(3, PriorityParam{StreamDep: 2, Weight: 20}) // idle - ws.OpenStream(4, OpenStreamOptions{}) - ws.OpenStream(5, OpenStreamOptions{}) - ws.OpenStream(6, OpenStreamOptions{}) - ws.AdjustStream(4, PriorityParam{StreamDep: 1, Weight: 15}) - ws.AdjustStream(5, PriorityParam{StreamDep: 2, Weight: 15}) - ws.AdjustStream(6, PriorityParam{StreamDep: 3, Weight: 15}) - - want := "2{weight:15,parent:0} 3{weight:20,parent:2} 4{weight:15,parent:0} 5{weight:15,parent:2} 6{weight:15,parent:3}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After open\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPriorityIdleStreamsDisabled(t *testing.T) { - ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{}).(*priorityWriteScheduler) - ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 15}) // idle - ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 15}) // idle - ws.AdjustStream(3, PriorityParam{StreamDep: 2, Weight: 20}) // idle - ws.OpenStream(4, OpenStreamOptions{}) - - want := "4{weight:15,parent:0}" - if got := fmtTree(ws, fmtNodeWeightParentSkipRoot); got != want { - t.Errorf("After open\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPrioritySection531NonExclusive(t *testing.T) { - // Example from RFC 7540 Section 5.3.1. - // A,B,C,D = 1,2,3,4 - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(4, OpenStreamOptions{}) - ws.AdjustStream(4, PriorityParam{ - StreamDep: 1, - Weight: 15, - Exclusive: false, - }) - want := "1{parent:0} 2{parent:1} 3{parent:1} 4{parent:1}" - if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { - t.Errorf("After adjust\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPrioritySection531Exclusive(t *testing.T) { - // Example from RFC 7540 Section 5.3.1. - // A,B,C,D = 1,2,3,4 - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(4, OpenStreamOptions{}) - ws.AdjustStream(4, PriorityParam{ - StreamDep: 1, - Weight: 15, - Exclusive: true, - }) - want := "1{parent:0} 2{parent:4} 3{parent:4} 4{parent:1}" - if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { - t.Errorf("After adjust\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func makeSection533Tree() *priorityWriteScheduler { - // Initial tree from RFC 7540 Section 5.3.3. - // A,B,C,D,E,F = 1,2,3,4,5,6 - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) - ws.OpenStream(5, OpenStreamOptions{PusherID: 3}) - ws.OpenStream(6, OpenStreamOptions{PusherID: 4}) - return ws -} - -func TestPrioritySection533NonExclusive(t *testing.T) { - // Example from RFC 7540 Section 5.3.3. - // A,B,C,D,E,F = 1,2,3,4,5,6 - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) - ws.OpenStream(5, OpenStreamOptions{PusherID: 3}) - ws.OpenStream(6, OpenStreamOptions{PusherID: 4}) - ws.AdjustStream(1, PriorityParam{ - StreamDep: 4, - Weight: 15, - Exclusive: false, - }) - want := "1{parent:4} 2{parent:1} 3{parent:1} 4{parent:0} 5{parent:3} 6{parent:4}" - if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { - t.Errorf("After adjust\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func TestPrioritySection533Exclusive(t *testing.T) { - // Example from RFC 7540 Section 5.3.3. - // A,B,C,D,E,F = 1,2,3,4,5,6 - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) - ws.OpenStream(5, OpenStreamOptions{PusherID: 3}) - ws.OpenStream(6, OpenStreamOptions{PusherID: 4}) - ws.AdjustStream(1, PriorityParam{ - StreamDep: 4, - Weight: 15, - Exclusive: true, - }) - want := "1{parent:4} 2{parent:1} 3{parent:1} 4{parent:0} 5{parent:3} 6{parent:1}" - if got := fmtTree(ws, fmtNodeParentSkipRoot); got != want { - t.Errorf("After adjust\ngot %q\nwant %q", got, want) - } - if err := checkPriorityWellFormed(ws); err != nil { - t.Error(err) - } -} - -func checkPopAll(ws WriteScheduler, order []uint32) error { - for k, id := range order { - wr, ok := ws.Pop() - if !ok { - return fmt.Errorf("Pop[%d]: got ok=false, want %d (order=%v)", k, id, order) - } - if got := wr.StreamID(); got != id { - return fmt.Errorf("Pop[%d]: got %v, want %d (order=%v)", k, got, id, order) - } - } - wr, ok := ws.Pop() - if ok { - return fmt.Errorf("Pop[%d]: got %v, want ok=false (order=%v)", len(order), wr.StreamID(), order) - } - return nil -} - -func TestPriorityPopFrom533Tree(t *testing.T) { - ws := makeSection533Tree() - - ws.Push(makeWriteHeadersRequest(3 /*C*/)) - ws.Push(makeWriteNonStreamRequest()) - ws.Push(makeWriteHeadersRequest(5 /*E*/)) - ws.Push(makeWriteHeadersRequest(1 /*A*/)) - t.Log("tree:", fmtTree(ws, fmtNodeParentSkipRoot)) - - if err := checkPopAll(ws, []uint32{0 /*NonStream*/, 1, 3, 5}); err != nil { - t.Error(err) - } -} - -func TestPriorityPopFromLinearTree(t *testing.T) { - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - ws.OpenStream(3, OpenStreamOptions{PusherID: 2}) - ws.OpenStream(4, OpenStreamOptions{PusherID: 3}) - - ws.Push(makeWriteHeadersRequest(3)) - ws.Push(makeWriteHeadersRequest(4)) - ws.Push(makeWriteHeadersRequest(1)) - ws.Push(makeWriteHeadersRequest(2)) - ws.Push(makeWriteNonStreamRequest()) - ws.Push(makeWriteNonStreamRequest()) - t.Log("tree:", fmtTree(ws, fmtNodeParentSkipRoot)) - - if err := checkPopAll(ws, []uint32{0, 0 /*NonStreams*/, 1, 2, 3, 4}); err != nil { - t.Error(err) - } -} - -func TestPriorityFlowControl(t *testing.T) { - ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ThrottleOutOfOrderWrites: false}) - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - - sc := &serverConn{maxFrameSize: 16} - st1 := &stream{id: 1, sc: sc} - st2 := &stream{id: 2, sc: sc} - - ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 16), false}, st1, nil}) - ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 16), false}, st2, nil}) - ws.AdjustStream(2, PriorityParam{StreamDep: 1}) - - // No flow-control bytes available. - if wr, ok := ws.Pop(); ok { - t.Fatalf("Pop(limited by flow control)=%v,true, want false", wr) - } - - // Add enough flow-control bytes to write st2 in two Pop calls. - // Should write data from st2 even though it's lower priority than st1. - for i := 1; i <= 2; i++ { - st2.flow.add(8) - wr, ok := ws.Pop() - if !ok { - t.Fatalf("Pop(%d)=false, want true", i) - } - if got, want := wr.DataSize(), 8; got != want { - t.Fatalf("Pop(%d)=%d bytes, want %d bytes", i, got, want) - } - } -} - -func TestPriorityThrottleOutOfOrderWrites(t *testing.T) { - ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ThrottleOutOfOrderWrites: true}) - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{PusherID: 1}) - - sc := &serverConn{maxFrameSize: 4096} - st1 := &stream{id: 1, sc: sc} - st2 := &stream{id: 2, sc: sc} - st1.flow.add(4096) - st2.flow.add(4096) - ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 4096), false}, st2, nil}) - ws.AdjustStream(2, PriorityParam{StreamDep: 1}) - - // We have enough flow-control bytes to write st2 in a single Pop call. - // However, due to out-of-order write throttling, the first call should - // only write 1KB. - wr, ok := ws.Pop() - if !ok { - t.Fatalf("Pop(st2.first)=false, want true") - } - if got, want := wr.StreamID(), uint32(2); got != want { - t.Fatalf("Pop(st2.first)=stream %d, want stream %d", got, want) - } - if got, want := wr.DataSize(), 1024; got != want { - t.Fatalf("Pop(st2.first)=%d bytes, want %d bytes", got, want) - } - - // Now add data on st1. This should take precedence. - ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 4096), false}, st1, nil}) - wr, ok = ws.Pop() - if !ok { - t.Fatalf("Pop(st1)=false, want true") - } - if got, want := wr.StreamID(), uint32(1); got != want { - t.Fatalf("Pop(st1)=stream %d, want stream %d", got, want) - } - if got, want := wr.DataSize(), 4096; got != want { - t.Fatalf("Pop(st1)=%d bytes, want %d bytes", got, want) - } - - // Should go back to writing 1KB from st2. - wr, ok = ws.Pop() - if !ok { - t.Fatalf("Pop(st2.last)=false, want true") - } - if got, want := wr.StreamID(), uint32(2); got != want { - t.Fatalf("Pop(st2.last)=stream %d, want stream %d", got, want) - } - if got, want := wr.DataSize(), 1024; got != want { - t.Fatalf("Pop(st2.last)=%d bytes, want %d bytes", got, want) - } -} - -func TestPriorityWeights(t *testing.T) { - ws := defaultPriorityWriteScheduler() - ws.OpenStream(1, OpenStreamOptions{}) - ws.OpenStream(2, OpenStreamOptions{}) - - sc := &serverConn{maxFrameSize: 8} - st1 := &stream{id: 1, sc: sc} - st2 := &stream{id: 2, sc: sc} - st1.flow.add(40) - st2.flow.add(40) - - ws.Push(FrameWriteRequest{&writeData{1, make([]byte, 40), false}, st1, nil}) - ws.Push(FrameWriteRequest{&writeData{2, make([]byte, 40), false}, st2, nil}) - ws.AdjustStream(1, PriorityParam{StreamDep: 0, Weight: 34}) - ws.AdjustStream(2, PriorityParam{StreamDep: 0, Weight: 9}) - - // st1 gets 3.5x the bandwidth of st2 (3.5 = (34+1)/(9+1)). - // The maximum frame size is 8 bytes. The write sequence should be: - // st1, total bytes so far is (st1=8, st=0) - // st2, total bytes so far is (st1=8, st=8) - // st1, total bytes so far is (st1=16, st=8) - // st1, total bytes so far is (st1=24, st=8) // 3x bandwidth - // st1, total bytes so far is (st1=32, st=8) // 4x bandwidth - // st2, total bytes so far is (st1=32, st=16) // 2x bandwidth - // st1, total bytes so far is (st1=40, st=16) - // st2, total bytes so far is (st1=40, st=24) - // st2, total bytes so far is (st1=40, st=32) - // st2, total bytes so far is (st1=40, st=40) - if err := checkPopAll(ws, []uint32{1, 2, 1, 1, 1, 2, 1, 2, 2, 2}); err != nil { - t.Error(err) - } -} - -func TestPriorityRstStreamOnNonOpenStreams(t *testing.T) { - ws := NewPriorityWriteScheduler(&PriorityWriteSchedulerConfig{ - MaxClosedNodesInTree: 0, - MaxIdleNodesInTree: 0, - }) - ws.OpenStream(1, OpenStreamOptions{}) - ws.CloseStream(1) - ws.Push(FrameWriteRequest{write: streamError(1, ErrCodeProtocol)}) - ws.Push(FrameWriteRequest{write: streamError(2, ErrCodeProtocol)}) - - if err := checkPopAll(ws, []uint32{1, 2}); err != nil { - t.Error(err) - } -} diff --git a/deps/golang.org/x/net/http2/writesched_random_test.go b/deps/golang.org/x/net/http2/writesched_random_test.go deleted file mode 100644 index 3bf4aa36a..000000000 --- a/deps/golang.org/x/net/http2/writesched_random_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import "testing" - -func TestRandomScheduler(t *testing.T) { - ws := NewRandomWriteScheduler() - ws.Push(makeWriteHeadersRequest(3)) - ws.Push(makeWriteHeadersRequest(4)) - ws.Push(makeWriteHeadersRequest(1)) - ws.Push(makeWriteHeadersRequest(2)) - ws.Push(makeWriteNonStreamRequest()) - ws.Push(makeWriteNonStreamRequest()) - - // Pop all frames. Should get the non-stream requests first, - // followed by the stream requests in any order. - var order []FrameWriteRequest - for { - wr, ok := ws.Pop() - if !ok { - break - } - order = append(order, wr) - } - t.Logf("got frames: %v", order) - if len(order) != 6 { - t.Fatalf("got %d frames, expected 6", len(order)) - } - if order[0].StreamID() != 0 || order[1].StreamID() != 0 { - t.Fatal("expected non-stream frames first", order[0], order[1]) - } - got := make(map[uint32]bool) - for _, wr := range order[2:] { - got[wr.StreamID()] = true - } - for id := uint32(1); id <= 4; id++ { - if !got[id] { - t.Errorf("frame not found for stream %d", id) - } - } -} diff --git a/deps/golang.org/x/net/http2/writesched_test.go b/deps/golang.org/x/net/http2/writesched_test.go deleted file mode 100644 index 0807056bc..000000000 --- a/deps/golang.org/x/net/http2/writesched_test.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import ( - "fmt" - "math" - "reflect" - "testing" -) - -func makeWriteNonStreamRequest() FrameWriteRequest { - return FrameWriteRequest{writeSettingsAck{}, nil, nil} -} - -func makeWriteHeadersRequest(streamID uint32) FrameWriteRequest { - st := &stream{id: streamID} - return FrameWriteRequest{&writeResHeaders{streamID: streamID, httpResCode: 200}, st, nil} -} - -func checkConsume(wr FrameWriteRequest, nbytes int32, want []FrameWriteRequest) error { - consumed, rest, n := wr.Consume(nbytes) - var wantConsumed, wantRest FrameWriteRequest - switch len(want) { - case 0: - case 1: - wantConsumed = want[0] - case 2: - wantConsumed = want[0] - wantRest = want[1] - } - if !reflect.DeepEqual(consumed, wantConsumed) || !reflect.DeepEqual(rest, wantRest) || n != len(want) { - return fmt.Errorf("got %v, %v, %v\nwant %v, %v, %v", consumed, rest, n, wantConsumed, wantRest, len(want)) - } - return nil -} - -func TestFrameWriteRequestNonData(t *testing.T) { - wr := makeWriteNonStreamRequest() - if got, want := wr.DataSize(), 0; got != want { - t.Errorf("DataSize: got %v, want %v", got, want) - } - - // Non-DATA frames are always consumed whole. - if err := checkConsume(wr, 0, []FrameWriteRequest{wr}); err != nil { - t.Errorf("Consume:\n%v", err) - } -} - -func TestFrameWriteRequestData(t *testing.T) { - st := &stream{ - id: 1, - sc: &serverConn{maxFrameSize: 16}, - } - const size = 32 - wr := FrameWriteRequest{&writeData{st.id, make([]byte, size), true}, st, make(chan error)} - if got, want := wr.DataSize(), size; got != want { - t.Errorf("DataSize: got %v, want %v", got, want) - } - - // No flow-control bytes available: cannot consume anything. - if err := checkConsume(wr, math.MaxInt32, []FrameWriteRequest{}); err != nil { - t.Errorf("Consume(limited by flow control):\n%v", err) - } - - // Add enough flow-control bytes to consume the entire frame, - // but we're now restricted by st.sc.maxFrameSize. - st.flow.add(size) - want := []FrameWriteRequest{ - { - write: &writeData{st.id, make([]byte, st.sc.maxFrameSize), false}, - stream: st, - done: nil, - }, - { - write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize), true}, - stream: st, - done: wr.done, - }, - } - if err := checkConsume(wr, math.MaxInt32, want); err != nil { - t.Errorf("Consume(limited by maxFrameSize):\n%v", err) - } - rest := want[1] - - // Consume 8 bytes from the remaining frame. - want = []FrameWriteRequest{ - { - write: &writeData{st.id, make([]byte, 8), false}, - stream: st, - done: nil, - }, - { - write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize-8), true}, - stream: st, - done: wr.done, - }, - } - if err := checkConsume(rest, 8, want); err != nil { - t.Errorf("Consume(8):\n%v", err) - } - rest = want[1] - - // Consume all remaining bytes. - want = []FrameWriteRequest{ - { - write: &writeData{st.id, make([]byte, size-st.sc.maxFrameSize-8), true}, - stream: st, - done: wr.done, - }, - } - if err := checkConsume(rest, math.MaxInt32, want); err != nil { - t.Errorf("Consume(remainder):\n%v", err) - } -} - -func TestFrameWriteRequest_StreamID(t *testing.T) { - const streamID = 123 - wr := FrameWriteRequest{write: streamError(streamID, ErrCodeNo)} - if got := wr.StreamID(); got != streamID { - t.Errorf("FrameWriteRequest(StreamError) = %v; want %v", got, streamID) - } -} diff --git a/deps/golang.org/x/net/http2/z_spec_test.go b/deps/golang.org/x/net/http2/z_spec_test.go deleted file mode 100644 index 610b2cdbc..000000000 --- a/deps/golang.org/x/net/http2/z_spec_test.go +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package http2 - -import ( - "bytes" - "encoding/xml" - "flag" - "fmt" - "io" - "os" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "sync" - "testing" -) - -var coverSpec = flag.Bool("coverspec", false, "Run spec coverage tests") - -// The global map of sentence coverage for the http2 spec. -var defaultSpecCoverage specCoverage - -var loadSpecOnce sync.Once - -func loadSpec() { - if f, err := os.Open("testdata/draft-ietf-httpbis-http2.xml"); err != nil { - panic(err) - } else { - defaultSpecCoverage = readSpecCov(f) - f.Close() - } -} - -// covers marks all sentences for section sec in defaultSpecCoverage. Sentences not -// "covered" will be included in report outputted by TestSpecCoverage. -func covers(sec, sentences string) { - loadSpecOnce.Do(loadSpec) - defaultSpecCoverage.cover(sec, sentences) -} - -type specPart struct { - section string - sentence string -} - -func (ss specPart) Less(oo specPart) bool { - atoi := func(s string) int { - n, err := strconv.Atoi(s) - if err != nil { - panic(err) - } - return n - } - a := strings.Split(ss.section, ".") - b := strings.Split(oo.section, ".") - for len(a) > 0 { - if len(b) == 0 { - return false - } - x, y := atoi(a[0]), atoi(b[0]) - if x == y { - a, b = a[1:], b[1:] - continue - } - return x < y - } - if len(b) > 0 { - return true - } - return false -} - -type bySpecSection []specPart - -func (a bySpecSection) Len() int { return len(a) } -func (a bySpecSection) Less(i, j int) bool { return a[i].Less(a[j]) } -func (a bySpecSection) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -type specCoverage struct { - coverage map[specPart]bool - d *xml.Decoder -} - -func joinSection(sec []int) string { - s := fmt.Sprintf("%d", sec[0]) - for _, n := range sec[1:] { - s = fmt.Sprintf("%s.%d", s, n) - } - return s -} - -func (sc specCoverage) readSection(sec []int) { - var ( - buf = new(bytes.Buffer) - sub = 0 - ) - for { - tk, err := sc.d.Token() - if err != nil { - if err == io.EOF { - return - } - panic(err) - } - switch v := tk.(type) { - case xml.StartElement: - if skipElement(v) { - if err := sc.d.Skip(); err != nil { - panic(err) - } - if v.Name.Local == "section" { - sub++ - } - break - } - switch v.Name.Local { - case "section": - sub++ - sc.readSection(append(sec, sub)) - case "xref": - buf.Write(sc.readXRef(v)) - } - case xml.CharData: - if len(sec) == 0 { - break - } - buf.Write(v) - case xml.EndElement: - if v.Name.Local == "section" { - sc.addSentences(joinSection(sec), buf.String()) - return - } - } - } -} - -func (sc specCoverage) readXRef(se xml.StartElement) []byte { - var b []byte - for { - tk, err := sc.d.Token() - if err != nil { - panic(err) - } - switch v := tk.(type) { - case xml.CharData: - if b != nil { - panic("unexpected CharData") - } - b = []byte(string(v)) - case xml.EndElement: - if v.Name.Local != "xref" { - panic("expected ") - } - if b != nil { - return b - } - sig := attrSig(se) - switch sig { - case "target": - return []byte(fmt.Sprintf("[%s]", attrValue(se, "target"))) - case "fmt-of,rel,target", "fmt-,,rel,target": - return []byte(fmt.Sprintf("[%s, %s]", attrValue(se, "target"), attrValue(se, "rel"))) - case "fmt-of,sec,target", "fmt-,,sec,target": - return []byte(fmt.Sprintf("[section %s of %s]", attrValue(se, "sec"), attrValue(se, "target"))) - case "fmt-of,rel,sec,target": - return []byte(fmt.Sprintf("[section %s of %s, %s]", attrValue(se, "sec"), attrValue(se, "target"), attrValue(se, "rel"))) - default: - panic(fmt.Sprintf("unknown attribute signature %q in %#v", sig, fmt.Sprintf("%#v", se))) - } - default: - panic(fmt.Sprintf("unexpected tag %q", v)) - } - } -} - -var skipAnchor = map[string]bool{ - "intro": true, - "Overview": true, -} - -var skipTitle = map[string]bool{ - "Acknowledgements": true, - "Change Log": true, - "Document Organization": true, - "Conventions and Terminology": true, -} - -func skipElement(s xml.StartElement) bool { - switch s.Name.Local { - case "artwork": - return true - case "section": - for _, attr := range s.Attr { - switch attr.Name.Local { - case "anchor": - if skipAnchor[attr.Value] || strings.HasPrefix(attr.Value, "changes.since.") { - return true - } - case "title": - if skipTitle[attr.Value] { - return true - } - } - } - } - return false -} - -func readSpecCov(r io.Reader) specCoverage { - sc := specCoverage{ - coverage: map[specPart]bool{}, - d: xml.NewDecoder(r)} - sc.readSection(nil) - return sc -} - -func (sc specCoverage) addSentences(sec string, sentence string) { - for _, s := range parseSentences(sentence) { - sc.coverage[specPart{sec, s}] = false - } -} - -func (sc specCoverage) cover(sec string, sentence string) { - for _, s := range parseSentences(sentence) { - p := specPart{sec, s} - if _, ok := sc.coverage[p]; !ok { - panic(fmt.Sprintf("Not found in spec: %q, %q", sec, s)) - } - sc.coverage[specPart{sec, s}] = true - } - -} - -var whitespaceRx = regexp.MustCompile(`\s+`) - -func parseSentences(sens string) []string { - sens = strings.TrimSpace(sens) - if sens == "" { - return nil - } - ss := strings.Split(whitespaceRx.ReplaceAllString(sens, " "), ". ") - for i, s := range ss { - s = strings.TrimSpace(s) - if !strings.HasSuffix(s, ".") { - s += "." - } - ss[i] = s - } - return ss -} - -func TestSpecParseSentences(t *testing.T) { - tests := []struct { - ss string - want []string - }{ - {"Sentence 1. Sentence 2.", - []string{ - "Sentence 1.", - "Sentence 2.", - }}, - {"Sentence 1. \nSentence 2.\tSentence 3.", - []string{ - "Sentence 1.", - "Sentence 2.", - "Sentence 3.", - }}, - } - - for i, tt := range tests { - got := parseSentences(tt.ss) - if !reflect.DeepEqual(got, tt.want) { - t.Errorf("%d: got = %q, want %q", i, got, tt.want) - } - } -} - -func TestSpecCoverage(t *testing.T) { - if !*coverSpec { - t.Skip() - } - - loadSpecOnce.Do(loadSpec) - - var ( - list []specPart - cv = defaultSpecCoverage.coverage - total = len(cv) - complete = 0 - ) - - for sp, touched := range defaultSpecCoverage.coverage { - if touched { - complete++ - } else { - list = append(list, sp) - } - } - sort.Stable(bySpecSection(list)) - - if testing.Short() && len(list) > 5 { - list = list[:5] - } - - for _, p := range list { - t.Errorf("\tSECTION %s: %s", p.section, p.sentence) - } - - t.Logf("%d/%d (%d%%) sentences covered", complete, total, (complete/total)*100) -} - -func attrSig(se xml.StartElement) string { - var names []string - for _, attr := range se.Attr { - if attr.Name.Local == "fmt" { - names = append(names, "fmt-"+attr.Value) - } else { - names = append(names, attr.Name.Local) - } - } - sort.Strings(names) - return strings.Join(names, ",") -} - -func attrValue(se xml.StartElement, attr string) string { - for _, a := range se.Attr { - if a.Name.Local == attr { - return a.Value - } - } - panic("unknown attribute " + attr) -} - -func TestSpecPartLess(t *testing.T) { - tests := []struct { - sec1, sec2 string - want bool - }{ - {"6.2.1", "6.2", false}, - {"6.2", "6.2.1", true}, - {"6.10", "6.10.1", true}, - {"6.10", "6.1.1", false}, // 10, not 1 - {"6.1", "6.1", false}, // equal, so not less - } - for _, tt := range tests { - got := (specPart{tt.sec1, "foo"}).Less(specPart{tt.sec2, "foo"}) - if got != tt.want { - t.Errorf("Less(%q, %q) = %v; want %v", tt.sec1, tt.sec2, got, tt.want) - } - } -} diff --git a/deps/golang.org/x/net/icmp/diag_test.go b/deps/golang.org/x/net/icmp/diag_test.go deleted file mode 100644 index 2ecd465a1..000000000 --- a/deps/golang.org/x/net/icmp/diag_test.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp_test - -import ( - "errors" - "fmt" - "net" - "os" - "runtime" - "sync" - "testing" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -type diagTest struct { - network, address string - protocol int - m icmp.Message -} - -func TestDiag(t *testing.T) { - if testing.Short() { - t.Skip("avoid external network") - } - - t.Run("Ping/NonPrivileged", func(t *testing.T) { - switch runtime.GOOS { - case "darwin": - case "linux": - t.Log("you may need to adjust the net.ipv4.ping_group_range kernel state") - default: - t.Logf("not supported on %s", runtime.GOOS) - return - } - for i, dt := range []diagTest{ - { - "udp4", "0.0.0.0", iana.ProtocolICMP, - icmp.Message{ - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, - Data: []byte("HELLO-R-U-THERE"), - }, - }, - }, - - { - "udp6", "::", iana.ProtocolIPv6ICMP, - icmp.Message{ - Type: ipv6.ICMPTypeEchoRequest, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, - Data: []byte("HELLO-R-U-THERE"), - }, - }, - }, - } { - if err := doDiag(dt, i); err != nil { - t.Error(err) - } - } - }) - t.Run("Ping/Privileged", func(t *testing.T) { - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - for i, dt := range []diagTest{ - { - "ip4:icmp", "0.0.0.0", iana.ProtocolICMP, - icmp.Message{ - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, - Data: []byte("HELLO-R-U-THERE"), - }, - }, - }, - - { - "ip6:ipv6-icmp", "::", iana.ProtocolIPv6ICMP, - icmp.Message{ - Type: ipv6.ICMPTypeEchoRequest, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, - Data: []byte("HELLO-R-U-THERE"), - }, - }, - }, - } { - if err := doDiag(dt, i); err != nil { - t.Error(err) - } - } - }) - t.Run("Probe/Privileged", func(t *testing.T) { - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - for i, dt := range []diagTest{ - { - "ip4:icmp", "0.0.0.0", iana.ProtocolICMP, - icmp.Message{ - Type: ipv4.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: os.Getpid() & 0xffff, - Local: true, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, Type: 1, - Name: "doesnotexist", - }, - }, - }, - }, - }, - - { - "ip6:ipv6-icmp", "::", iana.ProtocolIPv6ICMP, - icmp.Message{ - Type: ipv6.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: os.Getpid() & 0xffff, - Local: true, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, Type: 1, - Name: "doesnotexist", - }, - }, - }, - }, - }, - } { - if err := doDiag(dt, i); err != nil { - t.Error(err) - } - } - }) -} - -func doDiag(dt diagTest, seq int) error { - c, err := icmp.ListenPacket(dt.network, dt.address) - if err != nil { - return err - } - defer c.Close() - - dst, err := googleAddr(c, dt.protocol) - if err != nil { - return err - } - - if dt.network != "udp6" && dt.protocol == iana.ProtocolIPv6ICMP { - var f ipv6.ICMPFilter - f.SetAll(true) - f.Accept(ipv6.ICMPTypeDestinationUnreachable) - f.Accept(ipv6.ICMPTypePacketTooBig) - f.Accept(ipv6.ICMPTypeTimeExceeded) - f.Accept(ipv6.ICMPTypeParameterProblem) - f.Accept(ipv6.ICMPTypeEchoReply) - f.Accept(ipv6.ICMPTypeExtendedEchoReply) - if err := c.IPv6PacketConn().SetICMPFilter(&f); err != nil { - return err - } - } - - switch m := dt.m.Body.(type) { - case *icmp.Echo: - m.Seq = 1 << uint(seq) - case *icmp.ExtendedEchoRequest: - m.Seq = 1 << uint(seq) - } - wb, err := dt.m.Marshal(nil) - if err != nil { - return err - } - if n, err := c.WriteTo(wb, dst); err != nil { - return err - } else if n != len(wb) { - return fmt.Errorf("got %v; want %v", n, len(wb)) - } - - rb := make([]byte, 1500) - if err := c.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil { - return err - } - n, peer, err := c.ReadFrom(rb) - if err != nil { - return err - } - rm, err := icmp.ParseMessage(dt.protocol, rb[:n]) - if err != nil { - return err - } - switch { - case dt.m.Type == ipv4.ICMPTypeEcho && rm.Type == ipv4.ICMPTypeEchoReply: - fallthrough - case dt.m.Type == ipv6.ICMPTypeEchoRequest && rm.Type == ipv6.ICMPTypeEchoReply: - fallthrough - case dt.m.Type == ipv4.ICMPTypeExtendedEchoRequest && rm.Type == ipv4.ICMPTypeExtendedEchoReply: - fallthrough - case dt.m.Type == ipv6.ICMPTypeExtendedEchoRequest && rm.Type == ipv6.ICMPTypeExtendedEchoReply: - return nil - default: - return fmt.Errorf("got %+v from %v; want echo reply or extended echo reply", rm, peer) - } -} - -func googleAddr(c *icmp.PacketConn, protocol int) (net.Addr, error) { - host := "ipv4.google.com" - if protocol == iana.ProtocolIPv6ICMP { - host = "ipv6.google.com" - } - ips, err := net.LookupIP(host) - if err != nil { - return nil, err - } - netaddr := func(ip net.IP) (net.Addr, error) { - switch c.LocalAddr().(type) { - case *net.UDPAddr: - return &net.UDPAddr{IP: ip}, nil - case *net.IPAddr: - return &net.IPAddr{IP: ip}, nil - default: - return nil, errors.New("neither UDPAddr nor IPAddr") - } - } - if len(ips) > 0 { - return netaddr(ips[0]) - } - return nil, errors.New("no A or AAAA record") -} - -func TestConcurrentNonPrivilegedListenPacket(t *testing.T) { - if testing.Short() { - t.Skip("avoid external network") - } - switch runtime.GOOS { - case "darwin": - case "linux": - t.Log("you may need to adjust the net.ipv4.ping_group_range kernel state") - default: - t.Skipf("not supported on %s", runtime.GOOS) - } - - network, address := "udp4", "127.0.0.1" - if !nettest.SupportsIPv4() { - network, address = "udp6", "::1" - } - const N = 1000 - var wg sync.WaitGroup - wg.Add(N) - for i := 0; i < N; i++ { - go func() { - defer wg.Done() - c, err := icmp.ListenPacket(network, address) - if err != nil { - t.Error(err) - return - } - c.Close() - }() - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/icmp/dstunreach.go b/deps/golang.org/x/net/icmp/dstunreach.go deleted file mode 100644 index 7464bf7ea..000000000 --- a/deps/golang.org/x/net/icmp/dstunreach.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -// A DstUnreach represents an ICMP destination unreachable message -// body. -type DstUnreach struct { - Data []byte // data, known as original datagram field - Extensions []Extension // extensions -} - -// Len implements the Len method of MessageBody interface. -func (p *DstUnreach) Len(proto int) int { - if p == nil { - return 0 - } - l, _ := multipartMessageBodyDataLen(proto, true, p.Data, p.Extensions) - return 4 + l -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *DstUnreach) Marshal(proto int) ([]byte, error) { - return marshalMultipartMessageBody(proto, true, p.Data, p.Extensions) -} - -// parseDstUnreach parses b as an ICMP destination unreachable message -// body. -func parseDstUnreach(proto int, typ Type, b []byte) (MessageBody, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - p := &DstUnreach{} - var err error - p.Data, p.Extensions, err = parseMultipartMessageBody(proto, typ, b) - if err != nil { - return nil, err - } - return p, nil -} diff --git a/deps/golang.org/x/net/icmp/echo.go b/deps/golang.org/x/net/icmp/echo.go deleted file mode 100644 index c611f6516..000000000 --- a/deps/golang.org/x/net/icmp/echo.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import "encoding/binary" - -// An Echo represents an ICMP echo request or reply message body. -type Echo struct { - ID int // identifier - Seq int // sequence number - Data []byte // data -} - -// Len implements the Len method of MessageBody interface. -func (p *Echo) Len(proto int) int { - if p == nil { - return 0 - } - return 4 + len(p.Data) -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *Echo) Marshal(proto int) ([]byte, error) { - b := make([]byte, 4+len(p.Data)) - binary.BigEndian.PutUint16(b[:2], uint16(p.ID)) - binary.BigEndian.PutUint16(b[2:4], uint16(p.Seq)) - copy(b[4:], p.Data) - return b, nil -} - -// parseEcho parses b as an ICMP echo request or reply message body. -func parseEcho(proto int, _ Type, b []byte) (MessageBody, error) { - bodyLen := len(b) - if bodyLen < 4 { - return nil, errMessageTooShort - } - p := &Echo{ID: int(binary.BigEndian.Uint16(b[:2])), Seq: int(binary.BigEndian.Uint16(b[2:4]))} - if bodyLen > 4 { - p.Data = make([]byte, bodyLen-4) - copy(p.Data, b[4:]) - } - return p, nil -} - -// An ExtendedEchoRequest represents an ICMP extended echo request -// message body. -type ExtendedEchoRequest struct { - ID int // identifier - Seq int // sequence number - Local bool // must be true when identifying by name or index - Extensions []Extension // extensions -} - -// Len implements the Len method of MessageBody interface. -func (p *ExtendedEchoRequest) Len(proto int) int { - if p == nil { - return 0 - } - l, _ := multipartMessageBodyDataLen(proto, false, nil, p.Extensions) - return 4 + l -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *ExtendedEchoRequest) Marshal(proto int) ([]byte, error) { - b, err := marshalMultipartMessageBody(proto, false, nil, p.Extensions) - if err != nil { - return nil, err - } - bb := make([]byte, 4) - binary.BigEndian.PutUint16(bb[:2], uint16(p.ID)) - bb[2] = byte(p.Seq) - if p.Local { - bb[3] |= 0x01 - } - bb = append(bb, b...) - return bb, nil -} - -// parseExtendedEchoRequest parses b as an ICMP extended echo request -// message body. -func parseExtendedEchoRequest(proto int, typ Type, b []byte) (MessageBody, error) { - if len(b) < 4+4 { - return nil, errMessageTooShort - } - p := &ExtendedEchoRequest{ID: int(binary.BigEndian.Uint16(b[:2])), Seq: int(b[2])} - if b[3]&0x01 != 0 { - p.Local = true - } - var err error - _, p.Extensions, err = parseMultipartMessageBody(proto, typ, b[4:]) - if err != nil { - return nil, err - } - return p, nil -} - -// An ExtendedEchoReply represents an ICMP extended echo reply message -// body. -type ExtendedEchoReply struct { - ID int // identifier - Seq int // sequence number - State int // 3-bit state working together with Message.Code - Active bool // probed interface is active - IPv4 bool // probed interface runs IPv4 - IPv6 bool // probed interface runs IPv6 -} - -// Len implements the Len method of MessageBody interface. -func (p *ExtendedEchoReply) Len(proto int) int { - if p == nil { - return 0 - } - return 4 -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *ExtendedEchoReply) Marshal(proto int) ([]byte, error) { - b := make([]byte, 4) - binary.BigEndian.PutUint16(b[:2], uint16(p.ID)) - b[2] = byte(p.Seq) - b[3] = byte(p.State<<5) & 0xe0 - if p.Active { - b[3] |= 0x04 - } - if p.IPv4 { - b[3] |= 0x02 - } - if p.IPv6 { - b[3] |= 0x01 - } - return b, nil -} - -// parseExtendedEchoReply parses b as an ICMP extended echo reply -// message body. -func parseExtendedEchoReply(proto int, _ Type, b []byte) (MessageBody, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - p := &ExtendedEchoReply{ - ID: int(binary.BigEndian.Uint16(b[:2])), - Seq: int(b[2]), - State: int(b[3]) >> 5, - } - if b[3]&0x04 != 0 { - p.Active = true - } - if b[3]&0x02 != 0 { - p.IPv4 = true - } - if b[3]&0x01 != 0 { - p.IPv6 = true - } - return p, nil -} diff --git a/deps/golang.org/x/net/icmp/endpoint.go b/deps/golang.org/x/net/icmp/endpoint.go deleted file mode 100644 index a68bfb010..000000000 --- a/deps/golang.org/x/net/icmp/endpoint.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "net" - "runtime" - "syscall" - "time" - - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -var _ net.PacketConn = &PacketConn{} - -// A PacketConn represents a packet network endpoint that uses either -// ICMPv4 or ICMPv6. -type PacketConn struct { - c net.PacketConn - p4 *ipv4.PacketConn - p6 *ipv6.PacketConn -} - -func (c *PacketConn) ok() bool { return c != nil && c.c != nil } - -// IPv4PacketConn returns the ipv4.PacketConn of c. -// It returns nil when c is not created as the endpoint for ICMPv4. -func (c *PacketConn) IPv4PacketConn() *ipv4.PacketConn { - if !c.ok() { - return nil - } - return c.p4 -} - -// IPv6PacketConn returns the ipv6.PacketConn of c. -// It returns nil when c is not created as the endpoint for ICMPv6. -func (c *PacketConn) IPv6PacketConn() *ipv6.PacketConn { - if !c.ok() { - return nil - } - return c.p6 -} - -// ReadFrom reads an ICMP message from the connection. -func (c *PacketConn) ReadFrom(b []byte) (int, net.Addr, error) { - if !c.ok() { - return 0, nil, syscall.EINVAL - } - // Please be informed that ipv4.NewPacketConn enables - // IP_STRIPHDR option by default on Darwin. - // See golang.org/issue/9395 for further information. - if runtime.GOOS == "darwin" && c.p4 != nil { - n, _, peer, err := c.p4.ReadFrom(b) - return n, peer, err - } - return c.c.ReadFrom(b) -} - -// WriteTo writes the ICMP message b to dst. -// Dst must be net.UDPAddr when c is a non-privileged -// datagram-oriented ICMP endpoint. Otherwise it must be net.IPAddr. -func (c *PacketConn) WriteTo(b []byte, dst net.Addr) (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - return c.c.WriteTo(b, dst) -} - -// Close closes the endpoint. -func (c *PacketConn) Close() error { - if !c.ok() { - return syscall.EINVAL - } - return c.c.Close() -} - -// LocalAddr returns the local network address. -func (c *PacketConn) LocalAddr() net.Addr { - if !c.ok() { - return nil - } - return c.c.LocalAddr() -} - -// SetDeadline sets the read and write deadlines associated with the -// endpoint. -func (c *PacketConn) SetDeadline(t time.Time) error { - if !c.ok() { - return syscall.EINVAL - } - return c.c.SetDeadline(t) -} - -// SetReadDeadline sets the read deadline associated with the -// endpoint. -func (c *PacketConn) SetReadDeadline(t time.Time) error { - if !c.ok() { - return syscall.EINVAL - } - return c.c.SetReadDeadline(t) -} - -// SetWriteDeadline sets the write deadline associated with the -// endpoint. -func (c *PacketConn) SetWriteDeadline(t time.Time) error { - if !c.ok() { - return syscall.EINVAL - } - return c.c.SetWriteDeadline(t) -} diff --git a/deps/golang.org/x/net/icmp/example_test.go b/deps/golang.org/x/net/icmp/example_test.go deleted file mode 100644 index 1df4ceccd..000000000 --- a/deps/golang.org/x/net/icmp/example_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp_test - -import ( - "log" - "net" - "os" - "runtime" - - "golang.org/x/net/icmp" - "golang.org/x/net/ipv6" -) - -func ExamplePacketConn_nonPrivilegedPing() { - switch runtime.GOOS { - case "darwin": - case "linux": - log.Println("you may need to adjust the net.ipv4.ping_group_range kernel state") - default: - log.Println("not supported on", runtime.GOOS) - return - } - - c, err := icmp.ListenPacket("udp6", "fe80::1%en0") - if err != nil { - log.Fatal(err) - } - defer c.Close() - - wm := icmp.Message{ - Type: ipv6.ICMPTypeEchoRequest, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: 1, - Data: []byte("HELLO-R-U-THERE"), - }, - } - wb, err := wm.Marshal(nil) - if err != nil { - log.Fatal(err) - } - if _, err := c.WriteTo(wb, &net.UDPAddr{IP: net.ParseIP("ff02::1"), Zone: "en0"}); err != nil { - log.Fatal(err) - } - - rb := make([]byte, 1500) - n, peer, err := c.ReadFrom(rb) - if err != nil { - log.Fatal(err) - } - rm, err := icmp.ParseMessage(58, rb[:n]) - if err != nil { - log.Fatal(err) - } - switch rm.Type { - case ipv6.ICMPTypeEchoReply: - log.Printf("got reflection from %v", peer) - default: - log.Printf("got %+v; want echo reply", rm) - } -} diff --git a/deps/golang.org/x/net/icmp/extension.go b/deps/golang.org/x/net/icmp/extension.go deleted file mode 100644 index 200506855..000000000 --- a/deps/golang.org/x/net/icmp/extension.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "encoding/binary" - - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -// An Extension represents an ICMP extension. -type Extension interface { - // Len returns the length of ICMP extension. - // Proto must be either the ICMPv4 or ICMPv6 protocol number. - Len(proto int) int - - // Marshal returns the binary encoding of ICMP extension. - // Proto must be either the ICMPv4 or ICMPv6 protocol number. - Marshal(proto int) ([]byte, error) -} - -const extensionVersion = 2 - -func validExtensionHeader(b []byte) bool { - v := int(b[0]&0xf0) >> 4 - s := binary.BigEndian.Uint16(b[2:4]) - if s != 0 { - s = checksum(b) - } - if v != extensionVersion || s != 0 { - return false - } - return true -} - -// parseExtensions parses b as a list of ICMP extensions. -// The length attribute l must be the length attribute field in -// received icmp messages. -// -// It will return a list of ICMP extensions and an adjusted length -// attribute that represents the length of the padded original -// datagram field. Otherwise, it returns an error. -func parseExtensions(typ Type, b []byte, l int) ([]Extension, int, error) { - // Still a lot of non-RFC 4884 compliant implementations are - // out there. Set the length attribute l to 128 when it looks - // inappropriate for backwards compatibility. - // - // A minimal extension at least requires 8 octets; 4 octets - // for an extension header, and 4 octets for a single object - // header. - // - // See RFC 4884 for further information. - switch typ { - case ipv4.ICMPTypeExtendedEchoRequest, ipv6.ICMPTypeExtendedEchoRequest: - if len(b) < 8 || !validExtensionHeader(b) { - return nil, -1, errNoExtension - } - l = 0 - default: - if 128 > l || l+8 > len(b) { - l = 128 - } - if l+8 > len(b) { - return nil, -1, errNoExtension - } - if !validExtensionHeader(b[l:]) { - if l == 128 { - return nil, -1, errNoExtension - } - l = 128 - if !validExtensionHeader(b[l:]) { - return nil, -1, errNoExtension - } - } - } - var exts []Extension - for b = b[l+4:]; len(b) >= 4; { - ol := int(binary.BigEndian.Uint16(b[:2])) - if 4 > ol || ol > len(b) { - break - } - switch b[2] { - case classMPLSLabelStack: - ext, err := parseMPLSLabelStack(b[:ol]) - if err != nil { - return nil, -1, err - } - exts = append(exts, ext) - case classInterfaceInfo: - ext, err := parseInterfaceInfo(b[:ol]) - if err != nil { - return nil, -1, err - } - exts = append(exts, ext) - case classInterfaceIdent: - ext, err := parseInterfaceIdent(b[:ol]) - if err != nil { - return nil, -1, err - } - exts = append(exts, ext) - } - b = b[ol:] - } - return exts, l, nil -} diff --git a/deps/golang.org/x/net/icmp/extension_test.go b/deps/golang.org/x/net/icmp/extension_test.go deleted file mode 100644 index a7669dae0..000000000 --- a/deps/golang.org/x/net/icmp/extension_test.go +++ /dev/null @@ -1,333 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "fmt" - "net" - "reflect" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -func TestMarshalAndParseExtension(t *testing.T) { - fn := func(t *testing.T, proto int, typ Type, hdr, obj []byte, te Extension) error { - b, err := te.Marshal(proto) - if err != nil { - return err - } - if !reflect.DeepEqual(b, obj) { - return fmt.Errorf("got %#v; want %#v", b, obj) - } - switch typ { - case ipv4.ICMPTypeExtendedEchoRequest, ipv6.ICMPTypeExtendedEchoRequest: - exts, l, err := parseExtensions(typ, append(hdr, obj...), 0) - if err != nil { - return err - } - if l != 0 { - return fmt.Errorf("got %d; want 0", l) - } - if !reflect.DeepEqual(exts, []Extension{te}) { - return fmt.Errorf("got %#v; want %#v", exts[0], te) - } - default: - for i, wire := range []struct { - data []byte // original datagram - inlattr int // length of padded original datagram, a hint - outlattr int // length of padded original datagram, a want - err error - }{ - {nil, 0, -1, errNoExtension}, - {make([]byte, 127), 128, -1, errNoExtension}, - - {make([]byte, 128), 127, -1, errNoExtension}, - {make([]byte, 128), 128, -1, errNoExtension}, - {make([]byte, 128), 129, -1, errNoExtension}, - - {append(make([]byte, 128), append(hdr, obj...)...), 127, 128, nil}, - {append(make([]byte, 128), append(hdr, obj...)...), 128, 128, nil}, - {append(make([]byte, 128), append(hdr, obj...)...), 129, 128, nil}, - - {append(make([]byte, 512), append(hdr, obj...)...), 511, -1, errNoExtension}, - {append(make([]byte, 512), append(hdr, obj...)...), 512, 512, nil}, - {append(make([]byte, 512), append(hdr, obj...)...), 513, -1, errNoExtension}, - } { - exts, l, err := parseExtensions(typ, wire.data, wire.inlattr) - if err != wire.err { - return fmt.Errorf("#%d: got %v; want %v", i, err, wire.err) - } - if wire.err != nil { - continue - } - if l != wire.outlattr { - return fmt.Errorf("#%d: got %d; want %d", i, l, wire.outlattr) - } - if !reflect.DeepEqual(exts, []Extension{te}) { - return fmt.Errorf("#%d: got %#v; want %#v", i, exts[0], te) - } - } - } - return nil - } - - t.Run("MPLSLabelStack", func(t *testing.T) { - for _, et := range []struct { - proto int - typ Type - hdr []byte - obj []byte - ext Extension - }{ - // MPLS label stack with no label - { - proto: iana.ProtocolICMP, - typ: ipv4.ICMPTypeDestinationUnreachable, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x04, 0x01, 0x01, - }, - ext: &MPLSLabelStack{ - Class: classMPLSLabelStack, - Type: typeIncomingMPLSLabelStack, - }, - }, - // MPLS label stack with a single label - { - proto: iana.ProtocolIPv6ICMP, - typ: ipv6.ICMPTypeDestinationUnreachable, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x08, 0x01, 0x01, - 0x03, 0xe8, 0xe9, 0xff, - }, - ext: &MPLSLabelStack{ - Class: classMPLSLabelStack, - Type: typeIncomingMPLSLabelStack, - Labels: []MPLSLabel{ - { - Label: 16014, - TC: 0x4, - S: true, - TTL: 255, - }, - }, - }, - }, - // MPLS label stack with multiple labels - { - proto: iana.ProtocolICMP, - typ: ipv4.ICMPTypeDestinationUnreachable, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x0c, 0x01, 0x01, - 0x03, 0xe8, 0xde, 0xfe, - 0x03, 0xe8, 0xe1, 0xff, - }, - ext: &MPLSLabelStack{ - Class: classMPLSLabelStack, - Type: typeIncomingMPLSLabelStack, - Labels: []MPLSLabel{ - { - Label: 16013, - TC: 0x7, - S: false, - TTL: 254, - }, - { - Label: 16014, - TC: 0, - S: true, - TTL: 255, - }, - }, - }, - }, - } { - if err := fn(t, et.proto, et.typ, et.hdr, et.obj, et.ext); err != nil { - t.Error(err) - } - } - }) - t.Run("InterfaceInfo", func(t *testing.T) { - for _, et := range []struct { - proto int - typ Type - hdr []byte - obj []byte - ext Extension - }{ - // Interface information with no attribute - { - proto: iana.ProtocolICMP, - typ: ipv4.ICMPTypeDestinationUnreachable, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x04, 0x02, 0x00, - }, - ext: &InterfaceInfo{ - Class: classInterfaceInfo, - }, - }, - // Interface information with ifIndex and name - { - proto: iana.ProtocolICMP, - typ: ipv4.ICMPTypeDestinationUnreachable, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x10, 0x02, 0x0a, - 0x00, 0x00, 0x00, 0x10, - 0x08, byte('e'), byte('n'), byte('1'), - byte('0'), byte('1'), 0x00, 0x00, - }, - ext: &InterfaceInfo{ - Class: classInterfaceInfo, - Type: 0x0a, - Interface: &net.Interface{ - Index: 16, - Name: "en101", - }, - }, - }, - // Interface information with ifIndex, IPAddr, name and MTU - { - proto: iana.ProtocolIPv6ICMP, - typ: ipv6.ICMPTypeDestinationUnreachable, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x28, 0x02, 0x0f, - 0x00, 0x00, 0x00, 0x0f, - 0x00, 0x02, 0x00, 0x00, - 0xfe, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - 0x08, byte('e'), byte('n'), byte('1'), - byte('0'), byte('1'), 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, - }, - ext: &InterfaceInfo{ - Class: classInterfaceInfo, - Type: 0x0f, - Interface: &net.Interface{ - Index: 15, - Name: "en101", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.ParseIP("fe80::1"), - Zone: "en101", - }, - }, - }, - } { - if err := fn(t, et.proto, et.typ, et.hdr, et.obj, et.ext); err != nil { - t.Error(err) - } - } - }) - t.Run("InterfaceIdent", func(t *testing.T) { - for _, et := range []struct { - proto int - typ Type - hdr []byte - obj []byte - ext Extension - }{ - // Interface identification by name - { - proto: iana.ProtocolICMP, - typ: ipv4.ICMPTypeExtendedEchoRequest, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x0c, 0x03, 0x01, - byte('e'), byte('n'), byte('1'), byte('0'), - byte('1'), 0x00, 0x00, 0x00, - }, - ext: &InterfaceIdent{ - Class: classInterfaceIdent, - Type: typeInterfaceByName, - Name: "en101", - }, - }, - // Interface identification by index - { - proto: iana.ProtocolIPv6ICMP, - typ: ipv6.ICMPTypeExtendedEchoRequest, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x0c, 0x03, 0x02, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x03, 0x8f, - }, - ext: &InterfaceIdent{ - Class: classInterfaceIdent, - Type: typeInterfaceByIndex, - Index: 911, - }, - }, - // Interface identification by address - { - proto: iana.ProtocolICMP, - typ: ipv4.ICMPTypeExtendedEchoRequest, - hdr: []byte{ - 0x20, 0x00, 0x00, 0x00, - }, - obj: []byte{ - 0x00, 0x10, 0x03, 0x03, - byte(iana.AddrFamily48bitMAC >> 8), byte(iana.AddrFamily48bitMAC & 0x0f), 0x06, 0x00, - 0x01, 0x23, 0x45, 0x67, - 0x89, 0xab, 0x00, 0x00, - }, - ext: &InterfaceIdent{ - Class: classInterfaceIdent, - Type: typeInterfaceByAddress, - AFI: iana.AddrFamily48bitMAC, - Addr: []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xab}, - }, - }, - } { - if err := fn(t, et.proto, et.typ, et.hdr, et.obj, et.ext); err != nil { - t.Error(err) - } - } - }) -} - -func TestParseInterfaceName(t *testing.T) { - ifi := InterfaceInfo{Interface: &net.Interface{}} - for i, tt := range []struct { - b []byte - error - }{ - {[]byte{0, 'e', 'n', '0'}, errInvalidExtension}, - {[]byte{4, 'e', 'n', '0'}, nil}, - {[]byte{7, 'e', 'n', '0', 0xff, 0xff, 0xff, 0xff}, errInvalidExtension}, - {[]byte{8, 'e', 'n', '0', 0xff, 0xff, 0xff}, errMessageTooShort}, - } { - if _, err := ifi.parseName(tt.b); err != tt.error { - t.Errorf("#%d: got %v; want %v", i, err, tt.error) - } - } -} diff --git a/deps/golang.org/x/net/icmp/helper_posix.go b/deps/golang.org/x/net/icmp/helper_posix.go deleted file mode 100644 index 398fd388f..000000000 --- a/deps/golang.org/x/net/icmp/helper_posix.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package icmp - -import ( - "net" - "strconv" - "syscall" -) - -func sockaddr(family int, address string) (syscall.Sockaddr, error) { - switch family { - case syscall.AF_INET: - a, err := net.ResolveIPAddr("ip4", address) - if err != nil { - return nil, err - } - if len(a.IP) == 0 { - a.IP = net.IPv4zero - } - if a.IP = a.IP.To4(); a.IP == nil { - return nil, net.InvalidAddrError("non-ipv4 address") - } - sa := &syscall.SockaddrInet4{} - copy(sa.Addr[:], a.IP) - return sa, nil - case syscall.AF_INET6: - a, err := net.ResolveIPAddr("ip6", address) - if err != nil { - return nil, err - } - if len(a.IP) == 0 { - a.IP = net.IPv6unspecified - } - if a.IP.Equal(net.IPv4zero) { - a.IP = net.IPv6unspecified - } - if a.IP = a.IP.To16(); a.IP == nil || a.IP.To4() != nil { - return nil, net.InvalidAddrError("non-ipv6 address") - } - sa := &syscall.SockaddrInet6{ZoneId: zoneToUint32(a.Zone)} - copy(sa.Addr[:], a.IP) - return sa, nil - default: - return nil, net.InvalidAddrError("unexpected family") - } -} - -func zoneToUint32(zone string) uint32 { - if zone == "" { - return 0 - } - if ifi, err := net.InterfaceByName(zone); err == nil { - return uint32(ifi.Index) - } - n, err := strconv.Atoi(zone) - if err != nil { - return 0 - } - return uint32(n) -} - -func last(s string, b byte) int { - i := len(s) - for i--; i >= 0; i-- { - if s[i] == b { - break - } - } - return i -} diff --git a/deps/golang.org/x/net/icmp/interface.go b/deps/golang.org/x/net/icmp/interface.go deleted file mode 100644 index 617f757b9..000000000 --- a/deps/golang.org/x/net/icmp/interface.go +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "encoding/binary" - "net" - "strings" - - "golang.org/x/net/internal/iana" -) - -const ( - classInterfaceInfo = 2 -) - -const ( - attrMTU = 1 << iota - attrName - attrIPAddr - attrIfIndex -) - -// An InterfaceInfo represents interface and next-hop identification. -type InterfaceInfo struct { - Class int // extension object class number - Type int // extension object sub-type - Interface *net.Interface - Addr *net.IPAddr -} - -func (ifi *InterfaceInfo) nameLen() int { - if len(ifi.Interface.Name) > 63 { - return 64 - } - l := 1 + len(ifi.Interface.Name) - return (l + 3) &^ 3 -} - -func (ifi *InterfaceInfo) attrsAndLen(proto int) (attrs, l int) { - l = 4 - if ifi.Interface != nil && ifi.Interface.Index > 0 { - attrs |= attrIfIndex - l += 4 - if len(ifi.Interface.Name) > 0 { - attrs |= attrName - l += ifi.nameLen() - } - if ifi.Interface.MTU > 0 { - attrs |= attrMTU - l += 4 - } - } - if ifi.Addr != nil { - switch proto { - case iana.ProtocolICMP: - if ifi.Addr.IP.To4() != nil { - attrs |= attrIPAddr - l += 4 + net.IPv4len - } - case iana.ProtocolIPv6ICMP: - if ifi.Addr.IP.To16() != nil && ifi.Addr.IP.To4() == nil { - attrs |= attrIPAddr - l += 4 + net.IPv6len - } - } - } - return -} - -// Len implements the Len method of Extension interface. -func (ifi *InterfaceInfo) Len(proto int) int { - _, l := ifi.attrsAndLen(proto) - return l -} - -// Marshal implements the Marshal method of Extension interface. -func (ifi *InterfaceInfo) Marshal(proto int) ([]byte, error) { - attrs, l := ifi.attrsAndLen(proto) - b := make([]byte, l) - if err := ifi.marshal(proto, b, attrs, l); err != nil { - return nil, err - } - return b, nil -} - -func (ifi *InterfaceInfo) marshal(proto int, b []byte, attrs, l int) error { - binary.BigEndian.PutUint16(b[:2], uint16(l)) - b[2], b[3] = classInterfaceInfo, byte(ifi.Type) - for b = b[4:]; len(b) > 0 && attrs != 0; { - switch { - case attrs&attrIfIndex != 0: - b = ifi.marshalIfIndex(proto, b) - attrs &^= attrIfIndex - case attrs&attrIPAddr != 0: - b = ifi.marshalIPAddr(proto, b) - attrs &^= attrIPAddr - case attrs&attrName != 0: - b = ifi.marshalName(proto, b) - attrs &^= attrName - case attrs&attrMTU != 0: - b = ifi.marshalMTU(proto, b) - attrs &^= attrMTU - } - } - return nil -} - -func (ifi *InterfaceInfo) marshalIfIndex(proto int, b []byte) []byte { - binary.BigEndian.PutUint32(b[:4], uint32(ifi.Interface.Index)) - return b[4:] -} - -func (ifi *InterfaceInfo) parseIfIndex(b []byte) ([]byte, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - ifi.Interface.Index = int(binary.BigEndian.Uint32(b[:4])) - return b[4:], nil -} - -func (ifi *InterfaceInfo) marshalIPAddr(proto int, b []byte) []byte { - switch proto { - case iana.ProtocolICMP: - binary.BigEndian.PutUint16(b[:2], uint16(iana.AddrFamilyIPv4)) - copy(b[4:4+net.IPv4len], ifi.Addr.IP.To4()) - b = b[4+net.IPv4len:] - case iana.ProtocolIPv6ICMP: - binary.BigEndian.PutUint16(b[:2], uint16(iana.AddrFamilyIPv6)) - copy(b[4:4+net.IPv6len], ifi.Addr.IP.To16()) - b = b[4+net.IPv6len:] - } - return b -} - -func (ifi *InterfaceInfo) parseIPAddr(b []byte) ([]byte, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - afi := int(binary.BigEndian.Uint16(b[:2])) - b = b[4:] - switch afi { - case iana.AddrFamilyIPv4: - if len(b) < net.IPv4len { - return nil, errMessageTooShort - } - ifi.Addr.IP = make(net.IP, net.IPv4len) - copy(ifi.Addr.IP, b[:net.IPv4len]) - b = b[net.IPv4len:] - case iana.AddrFamilyIPv6: - if len(b) < net.IPv6len { - return nil, errMessageTooShort - } - ifi.Addr.IP = make(net.IP, net.IPv6len) - copy(ifi.Addr.IP, b[:net.IPv6len]) - b = b[net.IPv6len:] - } - return b, nil -} - -func (ifi *InterfaceInfo) marshalName(proto int, b []byte) []byte { - l := byte(ifi.nameLen()) - b[0] = l - copy(b[1:], []byte(ifi.Interface.Name)) - return b[l:] -} - -func (ifi *InterfaceInfo) parseName(b []byte) ([]byte, error) { - if 4 > len(b) || len(b) < int(b[0]) { - return nil, errMessageTooShort - } - l := int(b[0]) - if l%4 != 0 || 4 > l || l > 64 { - return nil, errInvalidExtension - } - var name [63]byte - copy(name[:], b[1:l]) - ifi.Interface.Name = strings.Trim(string(name[:]), "\000") - return b[l:], nil -} - -func (ifi *InterfaceInfo) marshalMTU(proto int, b []byte) []byte { - binary.BigEndian.PutUint32(b[:4], uint32(ifi.Interface.MTU)) - return b[4:] -} - -func (ifi *InterfaceInfo) parseMTU(b []byte) ([]byte, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - ifi.Interface.MTU = int(binary.BigEndian.Uint32(b[:4])) - return b[4:], nil -} - -func parseInterfaceInfo(b []byte) (Extension, error) { - ifi := &InterfaceInfo{ - Class: int(b[2]), - Type: int(b[3]), - } - if ifi.Type&(attrIfIndex|attrName|attrMTU) != 0 { - ifi.Interface = &net.Interface{} - } - if ifi.Type&attrIPAddr != 0 { - ifi.Addr = &net.IPAddr{} - } - attrs := ifi.Type & (attrIfIndex | attrIPAddr | attrName | attrMTU) - for b = b[4:]; len(b) > 0 && attrs != 0; { - var err error - switch { - case attrs&attrIfIndex != 0: - b, err = ifi.parseIfIndex(b) - attrs &^= attrIfIndex - case attrs&attrIPAddr != 0: - b, err = ifi.parseIPAddr(b) - attrs &^= attrIPAddr - case attrs&attrName != 0: - b, err = ifi.parseName(b) - attrs &^= attrName - case attrs&attrMTU != 0: - b, err = ifi.parseMTU(b) - attrs &^= attrMTU - } - if err != nil { - return nil, err - } - } - if ifi.Interface != nil && ifi.Interface.Name != "" && ifi.Addr != nil && ifi.Addr.IP.To16() != nil && ifi.Addr.IP.To4() == nil { - ifi.Addr.Zone = ifi.Interface.Name - } - return ifi, nil -} - -const ( - classInterfaceIdent = 3 - typeInterfaceByName = 1 - typeInterfaceByIndex = 2 - typeInterfaceByAddress = 3 -) - -// An InterfaceIdent represents interface identification. -type InterfaceIdent struct { - Class int // extension object class number - Type int // extension object sub-type - Name string // interface name - Index int // interface index - AFI int // address family identifier; see address family numbers in IANA registry - Addr []byte // address -} - -// Len implements the Len method of Extension interface. -func (ifi *InterfaceIdent) Len(_ int) int { - switch ifi.Type { - case typeInterfaceByName: - l := len(ifi.Name) - if l > 255 { - l = 255 - } - return 4 + (l+3)&^3 - case typeInterfaceByIndex: - return 4 + 8 - case typeInterfaceByAddress: - return 4 + 4 + (len(ifi.Addr)+3)&^3 - default: - return 4 - } -} - -// Marshal implements the Marshal method of Extension interface. -func (ifi *InterfaceIdent) Marshal(proto int) ([]byte, error) { - b := make([]byte, ifi.Len(proto)) - if err := ifi.marshal(proto, b); err != nil { - return nil, err - } - return b, nil -} - -func (ifi *InterfaceIdent) marshal(proto int, b []byte) error { - l := ifi.Len(proto) - binary.BigEndian.PutUint16(b[:2], uint16(l)) - b[2], b[3] = classInterfaceIdent, byte(ifi.Type) - switch ifi.Type { - case typeInterfaceByName: - copy(b[4:], ifi.Name) - case typeInterfaceByIndex: - binary.BigEndian.PutUint64(b[4:4+8], uint64(ifi.Index)) - case typeInterfaceByAddress: - binary.BigEndian.PutUint16(b[4:4+2], uint16(ifi.AFI)) - b[4+2] = byte(len(ifi.Addr)) - copy(b[4+4:], ifi.Addr) - } - return nil -} - -func parseInterfaceIdent(b []byte) (Extension, error) { - ifi := &InterfaceIdent{ - Class: int(b[2]), - Type: int(b[3]), - } - switch ifi.Type { - case typeInterfaceByName: - ifi.Name = strings.Trim(string(b[4:]), string(0)) - case typeInterfaceByIndex: - if len(b[4:]) < 8 { - return nil, errInvalidExtension - } - ifi.Index = int(binary.BigEndian.Uint64(b[4 : 4+8])) - case typeInterfaceByAddress: - if len(b[4:]) < 4 { - return nil, errInvalidExtension - } - ifi.AFI = int(binary.BigEndian.Uint16(b[4 : 4+2])) - l := int(b[4+2]) - if len(b[4+4:]) < l { - return nil, errInvalidExtension - } - ifi.Addr = make([]byte, l) - copy(ifi.Addr, b[4+4:]) - } - return ifi, nil -} diff --git a/deps/golang.org/x/net/icmp/ipv4.go b/deps/golang.org/x/net/icmp/ipv4.go deleted file mode 100644 index ffc66ed4d..000000000 --- a/deps/golang.org/x/net/icmp/ipv4.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "encoding/binary" - "net" - "runtime" - - "golang.org/x/net/internal/socket" - "golang.org/x/net/ipv4" -) - -// freebsdVersion is set in sys_freebsd.go. -// See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html. -var freebsdVersion uint32 - -// ParseIPv4Header parses b as an IPv4 header of ICMP error message -// invoking packet, which is contained in ICMP error message. -func ParseIPv4Header(b []byte) (*ipv4.Header, error) { - if len(b) < ipv4.HeaderLen { - return nil, errHeaderTooShort - } - hdrlen := int(b[0]&0x0f) << 2 - if hdrlen > len(b) { - return nil, errBufferTooShort - } - h := &ipv4.Header{ - Version: int(b[0] >> 4), - Len: hdrlen, - TOS: int(b[1]), - ID: int(binary.BigEndian.Uint16(b[4:6])), - FragOff: int(binary.BigEndian.Uint16(b[6:8])), - TTL: int(b[8]), - Protocol: int(b[9]), - Checksum: int(binary.BigEndian.Uint16(b[10:12])), - Src: net.IPv4(b[12], b[13], b[14], b[15]), - Dst: net.IPv4(b[16], b[17], b[18], b[19]), - } - switch runtime.GOOS { - case "darwin": - h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) - case "freebsd": - if freebsdVersion >= 1000000 { - h.TotalLen = int(binary.BigEndian.Uint16(b[2:4])) - } else { - h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) - } - default: - h.TotalLen = int(binary.BigEndian.Uint16(b[2:4])) - } - h.Flags = ipv4.HeaderFlags(h.FragOff&0xe000) >> 13 - h.FragOff = h.FragOff & 0x1fff - if hdrlen-ipv4.HeaderLen > 0 { - h.Options = make([]byte, hdrlen-ipv4.HeaderLen) - copy(h.Options, b[ipv4.HeaderLen:]) - } - return h, nil -} diff --git a/deps/golang.org/x/net/icmp/ipv4_test.go b/deps/golang.org/x/net/icmp/ipv4_test.go deleted file mode 100644 index 3fdee83fb..000000000 --- a/deps/golang.org/x/net/icmp/ipv4_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "encoding/binary" - "net" - "reflect" - "runtime" - "testing" - - "golang.org/x/net/internal/socket" - "golang.org/x/net/ipv4" -) - -func TestParseIPv4Header(t *testing.T) { - switch socket.NativeEndian { - case binary.LittleEndian: - t.Run("LittleEndian", func(t *testing.T) { - // TODO(mikio): Add platform dependent wire - // header formats when we support new - // platforms. - wireHeaderFromKernel := [ipv4.HeaderLen]byte{ - 0x45, 0x01, 0xbe, 0xef, - 0xca, 0xfe, 0x45, 0xdc, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - } - wireHeaderFromTradBSDKernel := [ipv4.HeaderLen]byte{ - 0x45, 0x01, 0xef, 0xbe, - 0xca, 0xfe, 0x45, 0xdc, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - } - th := &ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TOS: 1, - TotalLen: 0xbeef, - ID: 0xcafe, - Flags: ipv4.DontFragment, - FragOff: 1500, - TTL: 255, - Protocol: 1, - Checksum: 0xdead, - Src: net.IPv4(172, 16, 254, 254), - Dst: net.IPv4(192, 168, 0, 1), - } - var wh []byte - switch runtime.GOOS { - case "darwin": - wh = wireHeaderFromTradBSDKernel[:] - case "freebsd": - if freebsdVersion >= 1000000 { - wh = wireHeaderFromKernel[:] - } else { - wh = wireHeaderFromTradBSDKernel[:] - } - default: - wh = wireHeaderFromKernel[:] - } - h, err := ParseIPv4Header(wh) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(h, th) { - t.Fatalf("got %#v; want %#v", h, th) - } - }) - } -} diff --git a/deps/golang.org/x/net/icmp/ipv6.go b/deps/golang.org/x/net/icmp/ipv6.go deleted file mode 100644 index 2e8cfeb13..000000000 --- a/deps/golang.org/x/net/icmp/ipv6.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "net" - - "golang.org/x/net/internal/iana" -) - -const ipv6PseudoHeaderLen = 2*net.IPv6len + 8 - -// IPv6PseudoHeader returns an IPv6 pseudo header for checksum -// calculation. -func IPv6PseudoHeader(src, dst net.IP) []byte { - b := make([]byte, ipv6PseudoHeaderLen) - copy(b, src.To16()) - copy(b[net.IPv6len:], dst.To16()) - b[len(b)-1] = byte(iana.ProtocolIPv6ICMP) - return b -} diff --git a/deps/golang.org/x/net/icmp/listen_posix.go b/deps/golang.org/x/net/icmp/listen_posix.go deleted file mode 100644 index 7fac4f965..000000000 --- a/deps/golang.org/x/net/icmp/listen_posix.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package icmp - -import ( - "net" - "os" - "runtime" - "syscall" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -const sysIP_STRIPHDR = 0x17 // for now only darwin supports this option - -// ListenPacket listens for incoming ICMP packets addressed to -// address. See net.Dial for the syntax of address. -// -// For non-privileged datagram-oriented ICMP endpoints, network must -// be "udp4" or "udp6". The endpoint allows to read, write a few -// limited ICMP messages such as echo request and echo reply. -// Currently only Darwin and Linux support this. -// -// Examples: -// ListenPacket("udp4", "192.168.0.1") -// ListenPacket("udp4", "0.0.0.0") -// ListenPacket("udp6", "fe80::1%en0") -// ListenPacket("udp6", "::") -// -// For privileged raw ICMP endpoints, network must be "ip4" or "ip6" -// followed by a colon and an ICMP protocol number or name. -// -// Examples: -// ListenPacket("ip4:icmp", "192.168.0.1") -// ListenPacket("ip4:1", "0.0.0.0") -// ListenPacket("ip6:ipv6-icmp", "fe80::1%en0") -// ListenPacket("ip6:58", "::") -func ListenPacket(network, address string) (*PacketConn, error) { - var family, proto int - switch network { - case "udp4": - family, proto = syscall.AF_INET, iana.ProtocolICMP - case "udp6": - family, proto = syscall.AF_INET6, iana.ProtocolIPv6ICMP - default: - i := last(network, ':') - switch network[:i] { - case "ip4": - proto = iana.ProtocolICMP - case "ip6": - proto = iana.ProtocolIPv6ICMP - } - } - var cerr error - var c net.PacketConn - switch family { - case syscall.AF_INET, syscall.AF_INET6: - s, err := syscall.Socket(family, syscall.SOCK_DGRAM, proto) - if err != nil { - return nil, os.NewSyscallError("socket", err) - } - if runtime.GOOS == "darwin" && family == syscall.AF_INET { - if err := syscall.SetsockoptInt(s, iana.ProtocolIP, sysIP_STRIPHDR, 1); err != nil { - syscall.Close(s) - return nil, os.NewSyscallError("setsockopt", err) - } - } - sa, err := sockaddr(family, address) - if err != nil { - syscall.Close(s) - return nil, err - } - if err := syscall.Bind(s, sa); err != nil { - syscall.Close(s) - return nil, os.NewSyscallError("bind", err) - } - f := os.NewFile(uintptr(s), "datagram-oriented icmp") - c, cerr = net.FilePacketConn(f) - f.Close() - default: - c, cerr = net.ListenPacket(network, address) - } - if cerr != nil { - return nil, cerr - } - switch proto { - case iana.ProtocolICMP: - return &PacketConn{c: c, p4: ipv4.NewPacketConn(c)}, nil - case iana.ProtocolIPv6ICMP: - return &PacketConn{c: c, p6: ipv6.NewPacketConn(c)}, nil - default: - return &PacketConn{c: c}, nil - } -} diff --git a/deps/golang.org/x/net/icmp/listen_stub.go b/deps/golang.org/x/net/icmp/listen_stub.go deleted file mode 100644 index 6b77ab487..000000000 --- a/deps/golang.org/x/net/icmp/listen_stub.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build js nacl plan9 - -package icmp - -// ListenPacket listens for incoming ICMP packets addressed to -// address. See net.Dial for the syntax of address. -// -// For non-privileged datagram-oriented ICMP endpoints, network must -// be "udp4" or "udp6". The endpoint allows to read, write a few -// limited ICMP messages such as echo request and echo reply. -// Currently only Darwin and Linux support this. -// -// Examples: -// ListenPacket("udp4", "192.168.0.1") -// ListenPacket("udp4", "0.0.0.0") -// ListenPacket("udp6", "fe80::1%en0") -// ListenPacket("udp6", "::") -// -// For privileged raw ICMP endpoints, network must be "ip4" or "ip6" -// followed by a colon and an ICMP protocol number or name. -// -// Examples: -// ListenPacket("ip4:icmp", "192.168.0.1") -// ListenPacket("ip4:1", "0.0.0.0") -// ListenPacket("ip6:ipv6-icmp", "fe80::1%en0") -// ListenPacket("ip6:58", "::") -func ListenPacket(network, address string) (*PacketConn, error) { - return nil, errOpNoSupport -} diff --git a/deps/golang.org/x/net/icmp/message.go b/deps/golang.org/x/net/icmp/message.go deleted file mode 100644 index c9329a2f6..000000000 --- a/deps/golang.org/x/net/icmp/message.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package icmp provides basic functions for the manipulation of -// messages used in the Internet Control Message Protocols, -// ICMPv4 and ICMPv6. -// -// ICMPv4 and ICMPv6 are defined in RFC 792 and RFC 4443. -// Multi-part message support for ICMP is defined in RFC 4884. -// ICMP extensions for MPLS are defined in RFC 4950. -// ICMP extensions for interface and next-hop identification are -// defined in RFC 5837. -// PROBE: A utility for probing interfaces is defined in RFC 8335. -package icmp // import "golang.org/x/net/icmp" - -import ( - "encoding/binary" - "errors" - "net" - "syscall" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9. - -var ( - errMessageTooShort = errors.New("message too short") - errHeaderTooShort = errors.New("header too short") - errBufferTooShort = errors.New("buffer too short") - errOpNoSupport = errors.New("operation not supported") - errNoExtension = errors.New("no extension") - errInvalidExtension = errors.New("invalid extension") -) - -func checksum(b []byte) uint16 { - csumcv := len(b) - 1 // checksum coverage - s := uint32(0) - for i := 0; i < csumcv; i += 2 { - s += uint32(b[i+1])<<8 | uint32(b[i]) - } - if csumcv&1 == 0 { - s += uint32(b[csumcv]) - } - s = s>>16 + s&0xffff - s = s + s>>16 - return ^uint16(s) -} - -// A Type represents an ICMP message type. -type Type interface { - Protocol() int -} - -// A Message represents an ICMP message. -type Message struct { - Type Type // type, either ipv4.ICMPType or ipv6.ICMPType - Code int // code - Checksum int // checksum - Body MessageBody // body -} - -// Marshal returns the binary encoding of the ICMP message m. -// -// For an ICMPv4 message, the returned message always contains the -// calculated checksum field. -// -// For an ICMPv6 message, the returned message contains the calculated -// checksum field when psh is not nil, otherwise the kernel will -// compute the checksum field during the message transmission. -// When psh is not nil, it must be the pseudo header for IPv6. -func (m *Message) Marshal(psh []byte) ([]byte, error) { - var mtype int - switch typ := m.Type.(type) { - case ipv4.ICMPType: - mtype = int(typ) - case ipv6.ICMPType: - mtype = int(typ) - default: - return nil, syscall.EINVAL - } - b := []byte{byte(mtype), byte(m.Code), 0, 0} - if m.Type.Protocol() == iana.ProtocolIPv6ICMP && psh != nil { - b = append(psh, b...) - } - if m.Body != nil && m.Body.Len(m.Type.Protocol()) != 0 { - mb, err := m.Body.Marshal(m.Type.Protocol()) - if err != nil { - return nil, err - } - b = append(b, mb...) - } - if m.Type.Protocol() == iana.ProtocolIPv6ICMP { - if psh == nil { // cannot calculate checksum here - return b, nil - } - off, l := 2*net.IPv6len, len(b)-len(psh) - binary.BigEndian.PutUint32(b[off:off+4], uint32(l)) - } - s := checksum(b) - // Place checksum back in header; using ^= avoids the - // assumption the checksum bytes are zero. - b[len(psh)+2] ^= byte(s) - b[len(psh)+3] ^= byte(s >> 8) - return b[len(psh):], nil -} - -var parseFns = map[Type]func(int, Type, []byte) (MessageBody, error){ - ipv4.ICMPTypeDestinationUnreachable: parseDstUnreach, - ipv4.ICMPTypeTimeExceeded: parseTimeExceeded, - ipv4.ICMPTypeParameterProblem: parseParamProb, - - ipv4.ICMPTypeEcho: parseEcho, - ipv4.ICMPTypeEchoReply: parseEcho, - ipv4.ICMPTypeExtendedEchoRequest: parseExtendedEchoRequest, - ipv4.ICMPTypeExtendedEchoReply: parseExtendedEchoReply, - - ipv6.ICMPTypeDestinationUnreachable: parseDstUnreach, - ipv6.ICMPTypePacketTooBig: parsePacketTooBig, - ipv6.ICMPTypeTimeExceeded: parseTimeExceeded, - ipv6.ICMPTypeParameterProblem: parseParamProb, - - ipv6.ICMPTypeEchoRequest: parseEcho, - ipv6.ICMPTypeEchoReply: parseEcho, - ipv6.ICMPTypeExtendedEchoRequest: parseExtendedEchoRequest, - ipv6.ICMPTypeExtendedEchoReply: parseExtendedEchoReply, -} - -// ParseMessage parses b as an ICMP message. -// Proto must be either the ICMPv4 or ICMPv6 protocol number. -func ParseMessage(proto int, b []byte) (*Message, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - var err error - m := &Message{Code: int(b[1]), Checksum: int(binary.BigEndian.Uint16(b[2:4]))} - switch proto { - case iana.ProtocolICMP: - m.Type = ipv4.ICMPType(b[0]) - case iana.ProtocolIPv6ICMP: - m.Type = ipv6.ICMPType(b[0]) - default: - return nil, syscall.EINVAL - } - if fn, ok := parseFns[m.Type]; !ok { - m.Body, err = parseDefaultMessageBody(proto, b[4:]) - } else { - m.Body, err = fn(proto, m.Type, b[4:]) - } - if err != nil { - return nil, err - } - return m, nil -} diff --git a/deps/golang.org/x/net/icmp/message_test.go b/deps/golang.org/x/net/icmp/message_test.go deleted file mode 100644 index c278b8b83..000000000 --- a/deps/golang.org/x/net/icmp/message_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp_test - -import ( - "net" - "reflect" - "testing" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -func TestMarshalAndParseMessage(t *testing.T) { - fn := func(t *testing.T, proto int, tms []icmp.Message) { - var pshs [][]byte - switch proto { - case iana.ProtocolICMP: - pshs = [][]byte{nil} - case iana.ProtocolIPv6ICMP: - pshs = [][]byte{ - icmp.IPv6PseudoHeader(net.ParseIP("fe80::1"), net.ParseIP("ff02::1")), - nil, - } - } - for i, tm := range tms { - for _, psh := range pshs { - b, err := tm.Marshal(psh) - if err != nil { - t.Fatal(err) - } - m, err := icmp.ParseMessage(proto, b) - if err != nil { - t.Fatal(err) - } - if m.Type != tm.Type || m.Code != tm.Code { - t.Errorf("#%d: got %#v; want %#v", i, m, &tm) - } - if !reflect.DeepEqual(m.Body, tm.Body) { - t.Errorf("#%d: got %#v; want %#v", i, m.Body, tm.Body) - } - } - } - } - - t.Run("IPv4", func(t *testing.T) { - fn(t, iana.ProtocolICMP, - []icmp.Message{ - { - Type: ipv4.ICMPTypeDestinationUnreachable, Code: 15, - Body: &icmp.DstUnreach{ - Data: []byte("ERROR-INVOKING-PACKET"), - }, - }, - { - Type: ipv4.ICMPTypeTimeExceeded, Code: 1, - Body: &icmp.TimeExceeded{ - Data: []byte("ERROR-INVOKING-PACKET"), - }, - }, - { - Type: ipv4.ICMPTypeParameterProblem, Code: 2, - Body: &icmp.ParamProb{ - Pointer: 8, - Data: []byte("ERROR-INVOKING-PACKET"), - }, - }, - { - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: 1, Seq: 2, - Data: []byte("HELLO-R-U-THERE"), - }, - }, - { - Type: ipv4.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, - }, - }, - { - Type: ipv4.ICMPTypeExtendedEchoReply, Code: 0, - Body: &icmp.ExtendedEchoReply{ - State: 4 /* Delay */, Active: true, IPv4: true, - }, - }, - { - Type: ipv4.ICMPTypePhoturis, - Body: &icmp.DefaultMessageBody{ - Data: []byte{0x80, 0x40, 0x20, 0x10}, - }, - }, - }) - }) - t.Run("IPv6", func(t *testing.T) { - fn(t, iana.ProtocolIPv6ICMP, - []icmp.Message{ - { - Type: ipv6.ICMPTypeDestinationUnreachable, Code: 6, - Body: &icmp.DstUnreach{ - Data: []byte("ERROR-INVOKING-PACKET"), - }, - }, - { - Type: ipv6.ICMPTypePacketTooBig, Code: 0, - Body: &icmp.PacketTooBig{ - MTU: 1<<16 - 1, - Data: []byte("ERROR-INVOKING-PACKET"), - }, - }, - { - Type: ipv6.ICMPTypeTimeExceeded, Code: 1, - Body: &icmp.TimeExceeded{ - Data: []byte("ERROR-INVOKING-PACKET"), - }, - }, - { - Type: ipv6.ICMPTypeParameterProblem, Code: 2, - Body: &icmp.ParamProb{ - Pointer: 8, - Data: []byte("ERROR-INVOKING-PACKET"), - }, - }, - { - Type: ipv6.ICMPTypeEchoRequest, Code: 0, - Body: &icmp.Echo{ - ID: 1, Seq: 2, - Data: []byte("HELLO-R-U-THERE"), - }, - }, - { - Type: ipv6.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, - }, - }, - { - Type: ipv6.ICMPTypeExtendedEchoReply, Code: 0, - Body: &icmp.ExtendedEchoReply{ - State: 5 /* Probe */, Active: true, IPv6: true, - }, - }, - { - Type: ipv6.ICMPTypeDuplicateAddressConfirmation, - Body: &icmp.DefaultMessageBody{ - Data: []byte{0x80, 0x40, 0x20, 0x10}, - }, - }, - }) - }) -} diff --git a/deps/golang.org/x/net/icmp/messagebody.go b/deps/golang.org/x/net/icmp/messagebody.go deleted file mode 100644 index 2463730ae..000000000 --- a/deps/golang.org/x/net/icmp/messagebody.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -// A MessageBody represents an ICMP message body. -type MessageBody interface { - // Len returns the length of ICMP message body. - // Proto must be either the ICMPv4 or ICMPv6 protocol number. - Len(proto int) int - - // Marshal returns the binary encoding of ICMP message body. - // Proto must be either the ICMPv4 or ICMPv6 protocol number. - Marshal(proto int) ([]byte, error) -} - -// A DefaultMessageBody represents the default message body. -type DefaultMessageBody struct { - Data []byte // data -} - -// Len implements the Len method of MessageBody interface. -func (p *DefaultMessageBody) Len(proto int) int { - if p == nil { - return 0 - } - return len(p.Data) -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *DefaultMessageBody) Marshal(proto int) ([]byte, error) { - return p.Data, nil -} - -// parseDefaultMessageBody parses b as an ICMP message body. -func parseDefaultMessageBody(proto int, b []byte) (MessageBody, error) { - p := &DefaultMessageBody{Data: make([]byte, len(b))} - copy(p.Data, b) - return p, nil -} diff --git a/deps/golang.org/x/net/icmp/mpls.go b/deps/golang.org/x/net/icmp/mpls.go deleted file mode 100644 index f9f4841bc..000000000 --- a/deps/golang.org/x/net/icmp/mpls.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import "encoding/binary" - -// MPLSLabel represents an MPLS label stack entry. -type MPLSLabel struct { - Label int // label value - TC int // traffic class; formerly experimental use - S bool // bottom of stack - TTL int // time to live -} - -const ( - classMPLSLabelStack = 1 - typeIncomingMPLSLabelStack = 1 -) - -// MPLSLabelStack represents an MPLS label stack. -type MPLSLabelStack struct { - Class int // extension object class number - Type int // extension object sub-type - Labels []MPLSLabel -} - -// Len implements the Len method of Extension interface. -func (ls *MPLSLabelStack) Len(proto int) int { - return 4 + (4 * len(ls.Labels)) -} - -// Marshal implements the Marshal method of Extension interface. -func (ls *MPLSLabelStack) Marshal(proto int) ([]byte, error) { - b := make([]byte, ls.Len(proto)) - if err := ls.marshal(proto, b); err != nil { - return nil, err - } - return b, nil -} - -func (ls *MPLSLabelStack) marshal(proto int, b []byte) error { - l := ls.Len(proto) - binary.BigEndian.PutUint16(b[:2], uint16(l)) - b[2], b[3] = classMPLSLabelStack, typeIncomingMPLSLabelStack - off := 4 - for _, ll := range ls.Labels { - b[off], b[off+1], b[off+2] = byte(ll.Label>>12), byte(ll.Label>>4&0xff), byte(ll.Label<<4&0xf0) - b[off+2] |= byte(ll.TC << 1 & 0x0e) - if ll.S { - b[off+2] |= 0x1 - } - b[off+3] = byte(ll.TTL) - off += 4 - } - return nil -} - -func parseMPLSLabelStack(b []byte) (Extension, error) { - ls := &MPLSLabelStack{ - Class: int(b[2]), - Type: int(b[3]), - } - for b = b[4:]; len(b) >= 4; b = b[4:] { - ll := MPLSLabel{ - Label: int(b[0])<<12 | int(b[1])<<4 | int(b[2])>>4, - TC: int(b[2]&0x0e) >> 1, - TTL: int(b[3]), - } - if b[2]&0x1 != 0 { - ll.S = true - } - ls.Labels = append(ls.Labels, ll) - } - return ls, nil -} diff --git a/deps/golang.org/x/net/icmp/multipart.go b/deps/golang.org/x/net/icmp/multipart.go deleted file mode 100644 index 9ebbbafe9..000000000 --- a/deps/golang.org/x/net/icmp/multipart.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import "golang.org/x/net/internal/iana" - -// multipartMessageBodyDataLen takes b as an original datagram and -// exts as extensions, and returns a required length for message body -// and a required length for a padded original datagram in wire -// format. -func multipartMessageBodyDataLen(proto int, withOrigDgram bool, b []byte, exts []Extension) (bodyLen, dataLen int) { - for _, ext := range exts { - bodyLen += ext.Len(proto) - } - if bodyLen > 0 { - if withOrigDgram { - dataLen = multipartMessageOrigDatagramLen(proto, b) - } - bodyLen += 4 // length of extension header - } else { - dataLen = len(b) - } - bodyLen += dataLen - return bodyLen, dataLen -} - -// multipartMessageOrigDatagramLen takes b as an original datagram, -// and returns a required length for a padded orignal datagram in wire -// format. -func multipartMessageOrigDatagramLen(proto int, b []byte) int { - roundup := func(b []byte, align int) int { - // According to RFC 4884, the padded original datagram - // field must contain at least 128 octets. - if len(b) < 128 { - return 128 - } - r := len(b) - return (r + align - 1) & ^(align - 1) - } - switch proto { - case iana.ProtocolICMP: - return roundup(b, 4) - case iana.ProtocolIPv6ICMP: - return roundup(b, 8) - default: - return len(b) - } -} - -// marshalMultipartMessageBody takes data as an original datagram and -// exts as extesnsions, and returns a binary encoding of message body. -// It can be used for non-multipart message bodies when exts is nil. -func marshalMultipartMessageBody(proto int, withOrigDgram bool, data []byte, exts []Extension) ([]byte, error) { - bodyLen, dataLen := multipartMessageBodyDataLen(proto, withOrigDgram, data, exts) - b := make([]byte, 4+bodyLen) - copy(b[4:], data) - off := dataLen + 4 - if len(exts) > 0 { - b[dataLen+4] = byte(extensionVersion << 4) - off += 4 // length of object header - for _, ext := range exts { - switch ext := ext.(type) { - case *MPLSLabelStack: - if err := ext.marshal(proto, b[off:]); err != nil { - return nil, err - } - off += ext.Len(proto) - case *InterfaceInfo: - attrs, l := ext.attrsAndLen(proto) - if err := ext.marshal(proto, b[off:], attrs, l); err != nil { - return nil, err - } - off += ext.Len(proto) - case *InterfaceIdent: - if err := ext.marshal(proto, b[off:]); err != nil { - return nil, err - } - off += ext.Len(proto) - } - } - s := checksum(b[dataLen+4:]) - b[dataLen+4+2] ^= byte(s) - b[dataLen+4+3] ^= byte(s >> 8) - if withOrigDgram { - switch proto { - case iana.ProtocolICMP: - b[1] = byte(dataLen / 4) - case iana.ProtocolIPv6ICMP: - b[0] = byte(dataLen / 8) - } - } - } - return b, nil -} - -// parseMultipartMessageBody parses b as either a non-multipart -// message body or a multipart message body. -func parseMultipartMessageBody(proto int, typ Type, b []byte) ([]byte, []Extension, error) { - var l int - switch proto { - case iana.ProtocolICMP: - l = 4 * int(b[1]) - case iana.ProtocolIPv6ICMP: - l = 8 * int(b[0]) - } - if len(b) == 4 { - return nil, nil, nil - } - exts, l, err := parseExtensions(typ, b[4:], l) - if err != nil { - l = len(b) - 4 - } - var data []byte - if l > 0 { - data = make([]byte, l) - copy(data, b[4:]) - } - return data, exts, nil -} diff --git a/deps/golang.org/x/net/icmp/multipart_test.go b/deps/golang.org/x/net/icmp/multipart_test.go deleted file mode 100644 index 74408827b..000000000 --- a/deps/golang.org/x/net/icmp/multipart_test.go +++ /dev/null @@ -1,575 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp_test - -import ( - "errors" - "fmt" - "net" - "reflect" - "testing" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -func TestMarshalAndParseMultipartMessage(t *testing.T) { - fn := func(t *testing.T, proto int, tm icmp.Message) error { - b, err := tm.Marshal(nil) - if err != nil { - return err - } - switch tm.Type { - case ipv4.ICMPTypeExtendedEchoRequest, ipv6.ICMPTypeExtendedEchoRequest: - default: - switch proto { - case iana.ProtocolICMP: - if b[5] != 32 { - return fmt.Errorf("got %d; want 32", b[5]) - } - case iana.ProtocolIPv6ICMP: - if b[4] != 16 { - return fmt.Errorf("got %d; want 16", b[4]) - } - default: - return fmt.Errorf("unknown protocol: %d", proto) - } - } - m, err := icmp.ParseMessage(proto, b) - if err != nil { - return err - } - if m.Type != tm.Type || m.Code != tm.Code { - return fmt.Errorf("got %v; want %v", m, &tm) - } - switch m.Type { - case ipv4.ICMPTypeExtendedEchoRequest, ipv6.ICMPTypeExtendedEchoRequest: - got, want := m.Body.(*icmp.ExtendedEchoRequest), tm.Body.(*icmp.ExtendedEchoRequest) - if !reflect.DeepEqual(got.Extensions, want.Extensions) { - return errors.New(dumpExtensions(got.Extensions, want.Extensions)) - } - case ipv4.ICMPTypeDestinationUnreachable: - got, want := m.Body.(*icmp.DstUnreach), tm.Body.(*icmp.DstUnreach) - if !reflect.DeepEqual(got.Extensions, want.Extensions) { - return errors.New(dumpExtensions(got.Extensions, want.Extensions)) - } - if len(got.Data) != 128 { - return fmt.Errorf("got %d; want 128", len(got.Data)) - } - case ipv4.ICMPTypeTimeExceeded: - got, want := m.Body.(*icmp.TimeExceeded), tm.Body.(*icmp.TimeExceeded) - if !reflect.DeepEqual(got.Extensions, want.Extensions) { - return errors.New(dumpExtensions(got.Extensions, want.Extensions)) - } - if len(got.Data) != 128 { - return fmt.Errorf("got %d; want 128", len(got.Data)) - } - case ipv4.ICMPTypeParameterProblem: - got, want := m.Body.(*icmp.ParamProb), tm.Body.(*icmp.ParamProb) - if !reflect.DeepEqual(got.Extensions, want.Extensions) { - return errors.New(dumpExtensions(got.Extensions, want.Extensions)) - } - if len(got.Data) != 128 { - return fmt.Errorf("got %d; want 128", len(got.Data)) - } - case ipv6.ICMPTypeDestinationUnreachable: - got, want := m.Body.(*icmp.DstUnreach), tm.Body.(*icmp.DstUnreach) - if !reflect.DeepEqual(got.Extensions, want.Extensions) { - return errors.New(dumpExtensions(got.Extensions, want.Extensions)) - } - if len(got.Data) != 128 { - return fmt.Errorf("got %d; want 128", len(got.Data)) - } - case ipv6.ICMPTypeTimeExceeded: - got, want := m.Body.(*icmp.TimeExceeded), tm.Body.(*icmp.TimeExceeded) - if !reflect.DeepEqual(got.Extensions, want.Extensions) { - return errors.New(dumpExtensions(got.Extensions, want.Extensions)) - } - if len(got.Data) != 128 { - return fmt.Errorf("got %d; want 128", len(got.Data)) - } - default: - return fmt.Errorf("unknown message type: %v", m.Type) - } - return nil - } - - t.Run("IPv4", func(t *testing.T) { - for i, tm := range []icmp.Message{ - { - Type: ipv4.ICMPTypeDestinationUnreachable, Code: 15, - Body: &icmp.DstUnreach{ - Data: []byte("ERROR-INVOKING-PACKET"), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{ - Class: 1, - Type: 1, - Labels: []icmp.MPLSLabel{ - { - Label: 16014, - TC: 0x4, - S: true, - TTL: 255, - }, - }, - }, - &icmp.InterfaceInfo{ - Class: 2, - Type: 0x0f, - Interface: &net.Interface{ - Index: 15, - Name: "en101", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.IPv4(192, 168, 0, 1).To4(), - }, - }, - }, - }, - }, - { - Type: ipv4.ICMPTypeTimeExceeded, Code: 1, - Body: &icmp.TimeExceeded{ - Data: []byte("ERROR-INVOKING-PACKET"), - Extensions: []icmp.Extension{ - &icmp.InterfaceInfo{ - Class: 2, - Type: 0x0f, - Interface: &net.Interface{ - Index: 15, - Name: "en101", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.IPv4(192, 168, 0, 1).To4(), - }, - }, - &icmp.MPLSLabelStack{ - Class: 1, - Type: 1, - Labels: []icmp.MPLSLabel{ - { - Label: 16014, - TC: 0x4, - S: true, - TTL: 255, - }, - }, - }, - }, - }, - }, - { - Type: ipv4.ICMPTypeParameterProblem, Code: 2, - Body: &icmp.ParamProb{ - Pointer: 8, - Data: []byte("ERROR-INVOKING-PACKET"), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{ - Class: 1, - Type: 1, - Labels: []icmp.MPLSLabel{ - { - Label: 16014, - TC: 0x4, - S: true, - TTL: 255, - }, - }, - }, - &icmp.InterfaceInfo{ - Class: 2, - Type: 0x0f, - Interface: &net.Interface{ - Index: 15, - Name: "en101", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.IPv4(192, 168, 0, 1).To4(), - }, - }, - &icmp.InterfaceInfo{ - Class: 2, - Type: 0x2f, - Interface: &net.Interface{ - Index: 16, - Name: "en102", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.IPv4(192, 168, 0, 2).To4(), - }, - }, - }, - }, - }, - { - Type: ipv4.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, Local: true, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, - Type: 1, - Name: "en101", - }, - }, - }, - }, - { - Type: ipv4.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, Local: true, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, - Type: 2, - Index: 911, - }, - &icmp.InterfaceIdent{ - Class: 3, - Type: 1, - Name: "en101", - }, - }, - }, - }, - { - Type: ipv4.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, - Type: 3, - AFI: iana.AddrFamily48bitMAC, - Addr: []byte{0x01, 0x23, 0x45, 0x67, 0x89, 0xab}, - }, - }, - }, - }, - } { - if err := fn(t, iana.ProtocolICMP, tm); err != nil { - t.Errorf("#%d: %v", i, err) - } - } - }) - t.Run("IPv6", func(t *testing.T) { - for i, tm := range []icmp.Message{ - { - Type: ipv6.ICMPTypeDestinationUnreachable, Code: 6, - Body: &icmp.DstUnreach{ - Data: []byte("ERROR-INVOKING-PACKET"), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{ - Class: 1, - Type: 1, - Labels: []icmp.MPLSLabel{ - { - Label: 16014, - TC: 0x4, - S: true, - TTL: 255, - }, - }, - }, - &icmp.InterfaceInfo{ - Class: 2, - Type: 0x0f, - Interface: &net.Interface{ - Index: 15, - Name: "en101", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.ParseIP("fe80::1"), - Zone: "en101", - }, - }, - }, - }, - }, - { - Type: ipv6.ICMPTypeTimeExceeded, Code: 1, - Body: &icmp.TimeExceeded{ - Data: []byte("ERROR-INVOKING-PACKET"), - Extensions: []icmp.Extension{ - &icmp.InterfaceInfo{ - Class: 2, - Type: 0x0f, - Interface: &net.Interface{ - Index: 15, - Name: "en101", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.ParseIP("fe80::1"), - Zone: "en101", - }, - }, - &icmp.MPLSLabelStack{ - Class: 1, - Type: 1, - Labels: []icmp.MPLSLabel{ - { - Label: 16014, - TC: 0x4, - S: true, - TTL: 255, - }, - }, - }, - &icmp.InterfaceInfo{ - Class: 2, - Type: 0x2f, - Interface: &net.Interface{ - Index: 16, - Name: "en102", - MTU: 8192, - }, - Addr: &net.IPAddr{ - IP: net.ParseIP("fe80::1"), - Zone: "en102", - }, - }, - }, - }, - }, - { - Type: ipv6.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, Local: true, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, - Type: 1, - Name: "en101", - }, - }, - }, - }, - { - Type: ipv6.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, Local: true, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, - Type: 1, - Name: "en101", - }, - &icmp.InterfaceIdent{ - Class: 3, - Type: 2, - Index: 911, - }, - }, - }, - }, - { - Type: ipv6.ICMPTypeExtendedEchoRequest, Code: 0, - Body: &icmp.ExtendedEchoRequest{ - ID: 1, Seq: 2, - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Class: 3, - Type: 3, - AFI: iana.AddrFamilyIPv4, - Addr: []byte{192, 0, 2, 1}, - }, - }, - }, - }, - } { - if err := fn(t, iana.ProtocolIPv6ICMP, tm); err != nil { - t.Errorf("#%d: %v", i, err) - } - } - }) -} - -func dumpExtensions(gotExts, wantExts []icmp.Extension) string { - var s string - for i, got := range gotExts { - switch got := got.(type) { - case *icmp.MPLSLabelStack: - want := wantExts[i].(*icmp.MPLSLabelStack) - if !reflect.DeepEqual(got, want) { - s += fmt.Sprintf("#%d: got %#v; want %#v\n", i, got, want) - } - case *icmp.InterfaceInfo: - want := wantExts[i].(*icmp.InterfaceInfo) - if !reflect.DeepEqual(got, want) { - s += fmt.Sprintf("#%d: got %#v, %#v, %#v; want %#v, %#v, %#v\n", i, got, got.Interface, got.Addr, want, want.Interface, want.Addr) - } - case *icmp.InterfaceIdent: - want := wantExts[i].(*icmp.InterfaceIdent) - if !reflect.DeepEqual(got, want) { - s += fmt.Sprintf("#%d: got %#v; want %#v\n", i, got, want) - } - } - } - if len(s) == 0 { - return "" - } - return s[:len(s)-1] -} - -func TestMultipartMessageBodyLen(t *testing.T) { - for i, tt := range []struct { - proto int - in icmp.MessageBody - out int - }{ - { - iana.ProtocolICMP, - &icmp.DstUnreach{ - Data: make([]byte, ipv4.HeaderLen), - }, - 4 + ipv4.HeaderLen, // unused and original datagram - }, - { - iana.ProtocolICMP, - &icmp.TimeExceeded{ - Data: make([]byte, ipv4.HeaderLen), - }, - 4 + ipv4.HeaderLen, // unused and original datagram - }, - { - iana.ProtocolICMP, - &icmp.ParamProb{ - Data: make([]byte, ipv4.HeaderLen), - }, - 4 + ipv4.HeaderLen, // [pointer, unused] and original datagram - }, - - { - iana.ProtocolICMP, - &icmp.ParamProb{ - Data: make([]byte, ipv4.HeaderLen), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{}, - }, - }, - 4 + 4 + 4 + 0 + 128, // [pointer, length, unused], extension header, object header, object payload, original datagram - }, - { - iana.ProtocolICMP, - &icmp.ParamProb{ - Data: make([]byte, 128), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{}, - }, - }, - 4 + 4 + 4 + 0 + 128, // [pointer, length, unused], extension header, object header, object payload and original datagram - }, - { - iana.ProtocolICMP, - &icmp.ParamProb{ - Data: make([]byte, 129), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{}, - }, - }, - 4 + 4 + 4 + 0 + 132, // [pointer, length, unused], extension header, object header, object payload and original datagram - }, - - { - iana.ProtocolIPv6ICMP, - &icmp.DstUnreach{ - Data: make([]byte, ipv6.HeaderLen), - }, - 4 + ipv6.HeaderLen, // unused and original datagram - }, - { - iana.ProtocolIPv6ICMP, - &icmp.PacketTooBig{ - Data: make([]byte, ipv6.HeaderLen), - }, - 4 + ipv6.HeaderLen, // mtu and original datagram - }, - { - iana.ProtocolIPv6ICMP, - &icmp.TimeExceeded{ - Data: make([]byte, ipv6.HeaderLen), - }, - 4 + ipv6.HeaderLen, // unused and original datagram - }, - { - iana.ProtocolIPv6ICMP, - &icmp.ParamProb{ - Data: make([]byte, ipv6.HeaderLen), - }, - 4 + ipv6.HeaderLen, // pointer and original datagram - }, - - { - iana.ProtocolIPv6ICMP, - &icmp.DstUnreach{ - Data: make([]byte, 127), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{}, - }, - }, - 4 + 4 + 4 + 0 + 128, // [length, unused], extension header, object header, object payload and original datagram - }, - { - iana.ProtocolIPv6ICMP, - &icmp.DstUnreach{ - Data: make([]byte, 128), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{}, - }, - }, - 4 + 4 + 4 + 0 + 128, // [length, unused], extension header, object header, object payload and original datagram - }, - { - iana.ProtocolIPv6ICMP, - &icmp.DstUnreach{ - Data: make([]byte, 129), - Extensions: []icmp.Extension{ - &icmp.MPLSLabelStack{}, - }, - }, - 4 + 4 + 4 + 0 + 136, // [length, unused], extension header, object header, object payload and original datagram - }, - - { - iana.ProtocolICMP, - &icmp.ExtendedEchoRequest{}, - 4, // [id, seq, l-bit] - }, - { - iana.ProtocolICMP, - &icmp.ExtendedEchoRequest{ - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{}, - }, - }, - 4 + 4 + 4, // [id, seq, l-bit], extension header, object header - }, - { - iana.ProtocolIPv6ICMP, - &icmp.ExtendedEchoRequest{ - Extensions: []icmp.Extension{ - &icmp.InterfaceIdent{ - Type: 3, - AFI: iana.AddrFamilyNSAP, - Addr: []byte{0x49, 0x00, 0x01, 0xaa, 0xaa, 0xbb, 0xbb, 0xcc, 0xcc, 0x00}, - }, - }, - }, - 4 + 4 + 4 + 16, // [id, seq, l-bit], extension header, object header, object payload - }, - } { - if out := tt.in.Len(tt.proto); out != tt.out { - t.Errorf("#%d: got %d; want %d", i, out, tt.out) - } - } -} diff --git a/deps/golang.org/x/net/icmp/packettoobig.go b/deps/golang.org/x/net/icmp/packettoobig.go deleted file mode 100644 index afbf24f1b..000000000 --- a/deps/golang.org/x/net/icmp/packettoobig.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import "encoding/binary" - -// A PacketTooBig represents an ICMP packet too big message body. -type PacketTooBig struct { - MTU int // maximum transmission unit of the nexthop link - Data []byte // data, known as original datagram field -} - -// Len implements the Len method of MessageBody interface. -func (p *PacketTooBig) Len(proto int) int { - if p == nil { - return 0 - } - return 4 + len(p.Data) -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *PacketTooBig) Marshal(proto int) ([]byte, error) { - b := make([]byte, 4+len(p.Data)) - binary.BigEndian.PutUint32(b[:4], uint32(p.MTU)) - copy(b[4:], p.Data) - return b, nil -} - -// parsePacketTooBig parses b as an ICMP packet too big message body. -func parsePacketTooBig(proto int, _ Type, b []byte) (MessageBody, error) { - bodyLen := len(b) - if bodyLen < 4 { - return nil, errMessageTooShort - } - p := &PacketTooBig{MTU: int(binary.BigEndian.Uint32(b[:4]))} - if bodyLen > 4 { - p.Data = make([]byte, bodyLen-4) - copy(p.Data, b[4:]) - } - return p, nil -} diff --git a/deps/golang.org/x/net/icmp/paramprob.go b/deps/golang.org/x/net/icmp/paramprob.go deleted file mode 100644 index 85872554f..000000000 --- a/deps/golang.org/x/net/icmp/paramprob.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import ( - "encoding/binary" - "golang.org/x/net/internal/iana" -) - -// A ParamProb represents an ICMP parameter problem message body. -type ParamProb struct { - Pointer uintptr // offset within the data where the error was detected - Data []byte // data, known as original datagram field - Extensions []Extension // extensions -} - -// Len implements the Len method of MessageBody interface. -func (p *ParamProb) Len(proto int) int { - if p == nil { - return 0 - } - l, _ := multipartMessageBodyDataLen(proto, true, p.Data, p.Extensions) - return 4 + l -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *ParamProb) Marshal(proto int) ([]byte, error) { - if proto == iana.ProtocolIPv6ICMP { - b := make([]byte, p.Len(proto)) - binary.BigEndian.PutUint32(b[:4], uint32(p.Pointer)) - copy(b[4:], p.Data) - return b, nil - } - b, err := marshalMultipartMessageBody(proto, true, p.Data, p.Extensions) - if err != nil { - return nil, err - } - b[0] = byte(p.Pointer) - return b, nil -} - -// parseParamProb parses b as an ICMP parameter problem message body. -func parseParamProb(proto int, typ Type, b []byte) (MessageBody, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - p := &ParamProb{} - if proto == iana.ProtocolIPv6ICMP { - p.Pointer = uintptr(binary.BigEndian.Uint32(b[:4])) - p.Data = make([]byte, len(b)-4) - copy(p.Data, b[4:]) - return p, nil - } - p.Pointer = uintptr(b[0]) - var err error - p.Data, p.Extensions, err = parseMultipartMessageBody(proto, typ, b) - if err != nil { - return nil, err - } - return p, nil -} diff --git a/deps/golang.org/x/net/icmp/ping_test.go b/deps/golang.org/x/net/icmp/ping_test.go deleted file mode 100644 index 3171dad11..000000000 --- a/deps/golang.org/x/net/icmp/ping_test.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp_test - -import ( - "errors" - "fmt" - "net" - "os" - "runtime" - "sync" - "testing" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" -) - -func googleAddr(c *icmp.PacketConn, protocol int) (net.Addr, error) { - const host = "www.google.com" - ips, err := net.LookupIP(host) - if err != nil { - return nil, err - } - netaddr := func(ip net.IP) (net.Addr, error) { - switch c.LocalAddr().(type) { - case *net.UDPAddr: - return &net.UDPAddr{IP: ip}, nil - case *net.IPAddr: - return &net.IPAddr{IP: ip}, nil - default: - return nil, errors.New("neither UDPAddr nor IPAddr") - } - } - for _, ip := range ips { - switch protocol { - case iana.ProtocolICMP: - if ip.To4() != nil { - return netaddr(ip) - } - case iana.ProtocolIPv6ICMP: - if ip.To16() != nil && ip.To4() == nil { - return netaddr(ip) - } - } - } - return nil, errors.New("no A or AAAA record") -} - -type pingTest struct { - network, address string - protocol int - mtype icmp.Type -} - -var nonPrivilegedPingTests = []pingTest{ - {"udp4", "0.0.0.0", iana.ProtocolICMP, ipv4.ICMPTypeEcho}, - - {"udp6", "::", iana.ProtocolIPv6ICMP, ipv6.ICMPTypeEchoRequest}, -} - -func TestNonPrivilegedPing(t *testing.T) { - if testing.Short() { - t.Skip("avoid external network") - } - switch runtime.GOOS { - case "darwin": - case "linux": - t.Log("you may need to adjust the net.ipv4.ping_group_range kernel state") - default: - t.Skipf("not supported on %s", runtime.GOOS) - } - - for i, tt := range nonPrivilegedPingTests { - if err := doPing(tt, i); err != nil { - t.Error(err) - } - } -} - -var privilegedPingTests = []pingTest{ - {"ip4:icmp", "0.0.0.0", iana.ProtocolICMP, ipv4.ICMPTypeEcho}, - - {"ip6:ipv6-icmp", "::", iana.ProtocolIPv6ICMP, ipv6.ICMPTypeEchoRequest}, -} - -func TestPrivilegedPing(t *testing.T) { - if testing.Short() { - t.Skip("avoid external network") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - for i, tt := range privilegedPingTests { - if err := doPing(tt, i); err != nil { - t.Error(err) - } - } -} - -func doPing(tt pingTest, seq int) error { - c, err := icmp.ListenPacket(tt.network, tt.address) - if err != nil { - return err - } - defer c.Close() - - dst, err := googleAddr(c, tt.protocol) - if err != nil { - return err - } - - if tt.network != "udp6" && tt.protocol == iana.ProtocolIPv6ICMP { - var f ipv6.ICMPFilter - f.SetAll(true) - f.Accept(ipv6.ICMPTypeDestinationUnreachable) - f.Accept(ipv6.ICMPTypePacketTooBig) - f.Accept(ipv6.ICMPTypeTimeExceeded) - f.Accept(ipv6.ICMPTypeParameterProblem) - f.Accept(ipv6.ICMPTypeEchoReply) - if err := c.IPv6PacketConn().SetICMPFilter(&f); err != nil { - return err - } - } - - wm := icmp.Message{ - Type: tt.mtype, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: 1 << uint(seq), - Data: []byte("HELLO-R-U-THERE"), - }, - } - wb, err := wm.Marshal(nil) - if err != nil { - return err - } - if n, err := c.WriteTo(wb, dst); err != nil { - return err - } else if n != len(wb) { - return fmt.Errorf("got %v; want %v", n, len(wb)) - } - - rb := make([]byte, 1500) - if err := c.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil { - return err - } - n, peer, err := c.ReadFrom(rb) - if err != nil { - return err - } - rm, err := icmp.ParseMessage(tt.protocol, rb[:n]) - if err != nil { - return err - } - switch rm.Type { - case ipv4.ICMPTypeEchoReply, ipv6.ICMPTypeEchoReply: - return nil - default: - return fmt.Errorf("got %+v from %v; want echo reply", rm, peer) - } -} - -func TestConcurrentNonPrivilegedListenPacket(t *testing.T) { - if testing.Short() { - t.Skip("avoid external network") - } - switch runtime.GOOS { - case "darwin": - case "linux": - t.Log("you may need to adjust the net.ipv4.ping_group_range kernel state") - default: - t.Skipf("not supported on %s", runtime.GOOS) - } - - network, address := "udp4", "127.0.0.1" - if !nettest.SupportsIPv4() { - network, address = "udp6", "::1" - } - const N = 1000 - var wg sync.WaitGroup - wg.Add(N) - for i := 0; i < N; i++ { - go func() { - defer wg.Done() - c, err := icmp.ListenPacket(network, address) - if err != nil { - t.Error(err) - return - } - c.Close() - }() - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/icmp/sys_freebsd.go b/deps/golang.org/x/net/icmp/sys_freebsd.go deleted file mode 100644 index c75f3ddaa..000000000 --- a/deps/golang.org/x/net/icmp/sys_freebsd.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -import "syscall" - -func init() { - freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate") -} diff --git a/deps/golang.org/x/net/icmp/timeexceeded.go b/deps/golang.org/x/net/icmp/timeexceeded.go deleted file mode 100644 index 14e9e23cc..000000000 --- a/deps/golang.org/x/net/icmp/timeexceeded.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package icmp - -// A TimeExceeded represents an ICMP time exceeded message body. -type TimeExceeded struct { - Data []byte // data, known as original datagram field - Extensions []Extension // extensions -} - -// Len implements the Len method of MessageBody interface. -func (p *TimeExceeded) Len(proto int) int { - if p == nil { - return 0 - } - l, _ := multipartMessageBodyDataLen(proto, true, p.Data, p.Extensions) - return 4 + l -} - -// Marshal implements the Marshal method of MessageBody interface. -func (p *TimeExceeded) Marshal(proto int) ([]byte, error) { - return marshalMultipartMessageBody(proto, true, p.Data, p.Extensions) -} - -// parseTimeExceeded parses b as an ICMP time exceeded message body. -func parseTimeExceeded(proto int, typ Type, b []byte) (MessageBody, error) { - if len(b) < 4 { - return nil, errMessageTooShort - } - p := &TimeExceeded{} - var err error - p.Data, p.Extensions, err = parseMultipartMessageBody(proto, typ, b) - if err != nil { - return nil, err - } - return p, nil -} diff --git a/deps/golang.org/x/net/idna/example_test.go b/deps/golang.org/x/net/idna/example_test.go deleted file mode 100644 index 948f6eb20..000000000 --- a/deps/golang.org/x/net/idna/example_test.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package idna_test - -import ( - "fmt" - - "golang.org/x/net/idna" -) - -func ExampleProfile() { - // Raw Punycode has no restrictions and does no mappings. - fmt.Println(idna.ToASCII("")) - fmt.Println(idna.ToASCII("*.faß.com")) - fmt.Println(idna.Punycode.ToASCII("*.faß.com")) - - // Rewrite IDN for lookup. This (currently) uses transitional mappings to - // find a balance between IDNA2003 and IDNA2008 compatibility. - fmt.Println(idna.Lookup.ToASCII("")) - fmt.Println(idna.Lookup.ToASCII("www.faß.com")) - - // Convert an IDN to ASCII for registration purposes. This changes the - // encoding, but reports an error if the input was illformed. - fmt.Println(idna.Registration.ToASCII("")) - fmt.Println(idna.Registration.ToASCII("www.faß.com")) - - // Output: - // - // *.xn--fa-hia.com - // *.xn--fa-hia.com - // - // www.fass.com - // idna: invalid label "" - // www.xn--fa-hia.com -} - -func ExampleNew() { - var p *idna.Profile - - // Raw Punycode has no restrictions and does no mappings. - p = idna.New() - fmt.Println(p.ToASCII("*.faß.com")) - - // Do mappings. Note that star is not allowed in a DNS lookup. - p = idna.New( - idna.MapForLookup(), - idna.Transitional(true)) // Map ß -> ss - fmt.Println(p.ToASCII("*.faß.com")) - - // Lookup for registration. Also does not allow '*'. - p = idna.New(idna.ValidateForRegistration()) - fmt.Println(p.ToUnicode("*.faß.com")) - - // Set up a profile maps for lookup, but allows wild cards. - p = idna.New( - idna.MapForLookup(), - idna.Transitional(true), // Map ß -> ss - idna.StrictDomainName(false)) // Set more permissive ASCII rules. - fmt.Println(p.ToASCII("*.faß.com")) - - // Output: - // *.xn--fa-hia.com - // *.fass.com idna: disallowed rune U+002A - // *.faß.com idna: disallowed rune U+002A - // *.fass.com -} diff --git a/deps/golang.org/x/net/idna/idna.go b/deps/golang.org/x/net/idna/idna.go index 346fe4423..1810100bf 100644 --- a/deps/golang.org/x/net/idna/idna.go +++ b/deps/golang.org/x/net/idna/idna.go @@ -13,7 +13,7 @@ // UTS #46 is defined in http://www.unicode.org/reports/tr46. // See http://unicode.org/cldr/utility/idna.jsp for a visualization of the // differences between these two standards. -package idna // import "golang.org/x/net/idna" +package idna import ( "fmt" @@ -21,7 +21,6 @@ import ( "unicode/utf8" "golang.org/x/text/secure/bidirule" - "golang.org/x/text/unicode/bidi" "golang.org/x/text/unicode/norm" ) @@ -69,7 +68,7 @@ func VerifyDNSLength(verify bool) Option { } // RemoveLeadingDots removes leading label separators. Leading runes that map to -// dots, such as U+3002 IDEOGRAPHIC FULL STOP, are removed as well. +// dots, such as U+3002, are removed as well. // // This is the behavior suggested by the UTS #46 and is adopted by some // browsers. @@ -93,7 +92,7 @@ func ValidateLabels(enable bool) Option { } } -// StrictDomainName limits the set of permissible ASCII characters to those +// StrictDomainName limits the set of permissable ASCII characters to those // allowed in domain names as defined in RFC 1034 (A-Z, a-z, 0-9 and the // hyphen). This is set by default for MapForLookup and ValidateForRegistration. // @@ -143,6 +142,7 @@ func MapForLookup() Option { o.mapping = validateAndMap StrictDomainName(true)(o) ValidateLabels(true)(o) + RemoveLeadingDots(true)(o) } } @@ -160,14 +160,14 @@ type options struct { // mapping implements a validation and mapping step as defined in RFC 5895 // or UTS 46, tailored to, for example, domain registration or lookup. - mapping func(p *Profile, s string) (mapped string, isBidi bool, err error) + mapping func(p *Profile, s string) (string, error) // bidirule, if specified, checks whether s conforms to the Bidi Rule // defined in RFC 5893. bidirule func(s string) bool } -// A Profile defines the configuration of an IDNA mapper. +// A Profile defines the configuration of a IDNA mapper. type Profile struct { options } @@ -251,21 +251,23 @@ var ( punycode = &Profile{} lookup = &Profile{options{ - transitional: true, - useSTD3Rules: true, - validateLabels: true, - trie: trie, - fromPuny: validateFromPunycode, - mapping: validateAndMap, - bidirule: bidirule.ValidString, + transitional: true, + useSTD3Rules: true, + validateLabels: true, + removeLeadingDots: true, + trie: trie, + fromPuny: validateFromPunycode, + mapping: validateAndMap, + bidirule: bidirule.ValidString, }} display = &Profile{options{ - useSTD3Rules: true, - validateLabels: true, - trie: trie, - fromPuny: validateFromPunycode, - mapping: validateAndMap, - bidirule: bidirule.ValidString, + useSTD3Rules: true, + validateLabels: true, + removeLeadingDots: true, + trie: trie, + fromPuny: validateFromPunycode, + mapping: validateAndMap, + bidirule: bidirule.ValidString, }} registration = &Profile{options{ useSTD3Rules: true, @@ -300,16 +302,14 @@ func (e runeError) Error() string { // see http://www.unicode.org/reports/tr46. func (p *Profile) process(s string, toASCII bool) (string, error) { var err error - var isBidi bool if p.mapping != nil { - s, isBidi, err = p.mapping(p, s) + s, err = p.mapping(p, s) } // Remove leading empty labels. if p.removeLeadingDots { for ; len(s) > 0 && s[0] == '.'; s = s[1:] { } } - // TODO: allow for a quick check of the tables data. // It seems like we should only create this error on ToASCII, but the // UTS 46 conformance tests suggests we should always check this. if err == nil && p.verifyDNSLength && s == "" { @@ -335,7 +335,6 @@ func (p *Profile) process(s string, toASCII bool) (string, error) { // Spec says keep the old label. continue } - isBidi = isBidi || bidirule.DirectionString(u) != bidi.LeftToRight labels.set(u) if err == nil && p.validateLabels { err = p.fromPuny(p, u) @@ -350,14 +349,6 @@ func (p *Profile) process(s string, toASCII bool) (string, error) { err = p.validateLabel(label) } } - if isBidi && p.bidirule != nil && err == nil { - for labels.reset(); !labels.done(); labels.next() { - if !p.bidirule(labels.label()) { - err = &labelError{s, "B"} - break - } - } - } if toASCII { for labels.reset(); !labels.done(); labels.next() { label := labels.label() @@ -389,26 +380,16 @@ func (p *Profile) process(s string, toASCII bool) (string, error) { return s, err } -func normalize(p *Profile, s string) (mapped string, isBidi bool, err error) { - // TODO: consider first doing a quick check to see if any of these checks - // need to be done. This will make it slower in the general case, but - // faster in the common case. - mapped = norm.NFC.String(s) - isBidi = bidirule.DirectionString(mapped) == bidi.RightToLeft - return mapped, isBidi, nil +func normalize(p *Profile, s string) (string, error) { + return norm.NFC.String(s), nil } -func validateRegistration(p *Profile, s string) (idem string, bidi bool, err error) { - // TODO: filter need for normalization in loop below. +func validateRegistration(p *Profile, s string) (string, error) { if !norm.NFC.IsNormalString(s) { - return s, false, &labelError{s, "V1"} + return s, &labelError{s, "V1"} } for i := 0; i < len(s); { v, sz := trie.lookupString(s[i:]) - if sz == 0 { - return s, bidi, runeError(utf8.RuneError) - } - bidi = bidi || info(v).isBidi(s[i:]) // Copy bytes not copied so far. switch p.simplify(info(v).category()) { // TODO: handle the NV8 defined in the Unicode idna data set to allow @@ -416,50 +397,21 @@ func validateRegistration(p *Profile, s string) (idem string, bidi bool, err err case valid, deviation: case disallowed, mapped, unknown, ignored: r, _ := utf8.DecodeRuneInString(s[i:]) - return s, bidi, runeError(r) + return s, runeError(r) } i += sz } - return s, bidi, nil -} - -func (c info) isBidi(s string) bool { - if !c.isMapped() { - return c&attributesMask == rtl - } - // TODO: also store bidi info for mapped data. This is possible, but a bit - // cumbersome and not for the common case. - p, _ := bidi.LookupString(s) - switch p.Class() { - case bidi.R, bidi.AL, bidi.AN: - return true - } - return false + return s, nil } -func validateAndMap(p *Profile, s string) (vm string, bidi bool, err error) { +func validateAndMap(p *Profile, s string) (string, error) { var ( - b []byte - k int + err error + b []byte + k int ) - // combinedInfoBits contains the or-ed bits of all runes. We use this - // to derive the mayNeedNorm bit later. This may trigger normalization - // overeagerly, but it will not do so in the common case. The end result - // is another 10% saving on BenchmarkProfile for the common case. - var combinedInfoBits info for i := 0; i < len(s); { v, sz := trie.lookupString(s[i:]) - if sz == 0 { - b = append(b, s[k:i]...) - b = append(b, "\ufffd"...) - k = len(s) - if err == nil { - err = runeError(utf8.RuneError) - } - break - } - combinedInfoBits |= info(v) - bidi = bidi || info(v).isBidi(s[i:]) start := i i += sz // Copy bytes not copied so far. @@ -486,9 +438,7 @@ func validateAndMap(p *Profile, s string) (vm string, bidi bool, err error) { } if k == 0 { // No changes so far. - if combinedInfoBits&mayNeedNorm != 0 { - s = norm.NFC.String(s) - } + s = norm.NFC.String(s) } else { b = append(b, s[k:]...) if norm.NFC.QuickSpan(b) != len(b) { @@ -497,7 +447,7 @@ func validateAndMap(p *Profile, s string) (vm string, bidi bool, err error) { // TODO: the punycode converters require strings as input. s = string(b) } - return s, bidi, err + return s, err } // A labelIter allows iterating over domain name labels. @@ -592,13 +542,8 @@ func validateFromPunycode(p *Profile, s string) error { if !norm.NFC.IsNormalString(s) { return &labelError{s, "V1"} } - // TODO: detect whether string may have to be normalized in the following - // loop. for i := 0; i < len(s); { v, sz := trie.lookupString(s[i:]) - if sz == 0 { - return runeError(utf8.RuneError) - } if c := p.simplify(info(v).category()); c != valid && c != deviation { return &labelError{s, "V6"} } @@ -671,13 +616,16 @@ var joinStates = [][numJoinTypes]joinState{ // validateLabel validates the criteria from Section 4.1. Item 1, 4, and 6 are // already implicitly satisfied by the overall implementation. -func (p *Profile) validateLabel(s string) (err error) { +func (p *Profile) validateLabel(s string) error { if s == "" { if p.verifyDNSLength { return &labelError{s, "A4"} } return nil } + if p.bidirule != nil && !p.bidirule(s) { + return &labelError{s, "B"} + } if !p.validateLabels { return nil } diff --git a/deps/golang.org/x/net/idna/idna_test.go b/deps/golang.org/x/net/idna/idna_test.go deleted file mode 100644 index 0b067cac9..000000000 --- a/deps/golang.org/x/net/idna/idna_test.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package idna - -import ( - "testing" -) - -var idnaTestCases = [...]struct { - ascii, unicode string -}{ - // Labels. - {"books", "books"}, - {"xn--bcher-kva", "bücher"}, - - // Domains. - {"foo--xn--bar.org", "foo--xn--bar.org"}, - {"golang.org", "golang.org"}, - {"example.xn--p1ai", "example.рф"}, - {"xn--czrw28b.tw", "商業.tw"}, - {"www.xn--mller-kva.de", "www.müller.de"}, -} - -func TestIDNA(t *testing.T) { - for _, tc := range idnaTestCases { - if a, err := ToASCII(tc.unicode); err != nil { - t.Errorf("ToASCII(%q): %v", tc.unicode, err) - } else if a != tc.ascii { - t.Errorf("ToASCII(%q): got %q, want %q", tc.unicode, a, tc.ascii) - } - - if u, err := ToUnicode(tc.ascii); err != nil { - t.Errorf("ToUnicode(%q): %v", tc.ascii, err) - } else if u != tc.unicode { - t.Errorf("ToUnicode(%q): got %q, want %q", tc.ascii, u, tc.unicode) - } - } -} - -func TestIDNASeparators(t *testing.T) { - type subCase struct { - unicode string - wantASCII string - wantErr bool - } - - testCases := []struct { - name string - profile *Profile - subCases []subCase - }{ - { - name: "Punycode", profile: Punycode, - subCases: []subCase{ - {"example\u3002jp", "xn--examplejp-ck3h", false}, - {"東京\uFF0Ejp", "xn--jp-l92cn98g071o", false}, - {"大阪\uFF61jp", "xn--jp-ku9cz72u463f", false}, - }, - }, - { - name: "Lookup", profile: Lookup, - subCases: []subCase{ - {"example\u3002jp", "example.jp", false}, - {"東京\uFF0Ejp", "xn--1lqs71d.jp", false}, - {"大阪\uFF61jp", "xn--pssu33l.jp", false}, - }, - }, - { - name: "Display", profile: Display, - subCases: []subCase{ - {"example\u3002jp", "example.jp", false}, - {"東京\uFF0Ejp", "xn--1lqs71d.jp", false}, - {"大阪\uFF61jp", "xn--pssu33l.jp", false}, - }, - }, - { - name: "Registration", profile: Registration, - subCases: []subCase{ - {"example\u3002jp", "", true}, - {"東京\uFF0Ejp", "", true}, - {"大阪\uFF61jp", "", true}, - }, - }, - } - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - for _, c := range tc.subCases { - gotA, err := tc.profile.ToASCII(c.unicode) - if c.wantErr { - if err == nil { - t.Errorf("ToASCII(%q): got no error, but an error expected", c.unicode) - } - } else { - if err != nil { - t.Errorf("ToASCII(%q): got err=%v, but no error expected", c.unicode, err) - } else if gotA != c.wantASCII { - t.Errorf("ToASCII(%q): got %q, want %q", c.unicode, gotA, c.wantASCII) - } - } - } - }) - } -} - -// TODO(nigeltao): test errors, once we've specified when ToASCII and ToUnicode -// return errors. diff --git a/deps/golang.org/x/net/idna/punycode_test.go b/deps/golang.org/x/net/idna/punycode_test.go deleted file mode 100644 index bfec81dec..000000000 --- a/deps/golang.org/x/net/idna/punycode_test.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package idna - -import ( - "strings" - "testing" -) - -var punycodeTestCases = [...]struct { - s, encoded string -}{ - {"", ""}, - {"-", "--"}, - {"-a", "-a-"}, - {"-a-", "-a--"}, - {"a", "a-"}, - {"a-", "a--"}, - {"a-b", "a-b-"}, - {"books", "books-"}, - {"bücher", "bcher-kva"}, - {"Hello世界", "Hello-ck1hg65u"}, - {"ü", "tda"}, - {"üý", "tdac"}, - - // The test cases below come from RFC 3492 section 7.1 with Errata 3026. - { - // (A) Arabic (Egyptian). - "\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644" + - "\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F", - "egbpdaj6bu4bxfgehfvwxn", - }, - { - // (B) Chinese (simplified). - "\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587", - "ihqwcrb4cv8a8dqg056pqjye", - }, - { - // (C) Chinese (traditional). - "\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587", - "ihqwctvzc91f659drss3x8bo0yb", - }, - { - // (D) Czech. - "\u0050\u0072\u006F\u010D\u0070\u0072\u006F\u0073\u0074" + - "\u011B\u006E\u0065\u006D\u006C\u0075\u0076\u00ED\u010D" + - "\u0065\u0073\u006B\u0079", - "Proprostnemluvesky-uyb24dma41a", - }, - { - // (E) Hebrew. - "\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8" + - "\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2" + - "\u05D1\u05E8\u05D9\u05EA", - "4dbcagdahymbxekheh6e0a7fei0b", - }, - { - // (F) Hindi (Devanagari). - "\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D" + - "\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939" + - "\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947" + - "\u0939\u0948\u0902", - "i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd", - }, - { - // (G) Japanese (kanji and hiragana). - "\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092" + - "\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B", - "n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa", - }, - { - // (H) Korean (Hangul syllables). - "\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774" + - "\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74" + - "\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C", - "989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j" + - "psd879ccm6fea98c", - }, - { - // (I) Russian (Cyrillic). - "\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E" + - "\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440" + - "\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A" + - "\u0438", - "b1abfaaepdrnnbgefbadotcwatmq2g4l", - }, - { - // (J) Spanish. - "\u0050\u006F\u0072\u0071\u0075\u00E9\u006E\u006F\u0070" + - "\u0075\u0065\u0064\u0065\u006E\u0073\u0069\u006D\u0070" + - "\u006C\u0065\u006D\u0065\u006E\u0074\u0065\u0068\u0061" + - "\u0062\u006C\u0061\u0072\u0065\u006E\u0045\u0073\u0070" + - "\u0061\u00F1\u006F\u006C", - "PorqunopuedensimplementehablarenEspaol-fmd56a", - }, - { - // (K) Vietnamese. - "\u0054\u1EA1\u0069\u0073\u0061\u006F\u0068\u1ECD\u006B" + - "\u0068\u00F4\u006E\u0067\u0074\u0068\u1EC3\u0063\u0068" + - "\u1EC9\u006E\u00F3\u0069\u0074\u0069\u1EBF\u006E\u0067" + - "\u0056\u0069\u1EC7\u0074", - "TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g", - }, - { - // (L) 3B. - "\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F", - "3B-ww4c5e180e575a65lsy2b", - }, - { - // (M) -with-SUPER-MONKEYS. - "\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074" + - "\u0068\u002D\u0053\u0055\u0050\u0045\u0052\u002D\u004D" + - "\u004F\u004E\u004B\u0045\u0059\u0053", - "-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n", - }, - { - // (N) Hello-Another-Way-. - "\u0048\u0065\u006C\u006C\u006F\u002D\u0041\u006E\u006F" + - "\u0074\u0068\u0065\u0072\u002D\u0057\u0061\u0079\u002D" + - "\u305D\u308C\u305E\u308C\u306E\u5834\u6240", - "Hello-Another-Way--fc4qua05auwb3674vfr0b", - }, - { - // (O) 2. - "\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B\u0032", - "2-u9tlzr9756bt3uc0v", - }, - { - // (P) MajiKoi5 - "\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059" + - "\u308B\u0035\u79D2\u524D", - "MajiKoi5-783gue6qz075azm5e", - }, - { - // (Q) de - "\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0", - "de-jg4avhby1noc0d", - }, - { - // (R) - "\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067", - "d9juau41awczczp", - }, - { - // (S) -> $1.00 <- - "\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020" + - "\u003C\u002D", - "-> $1.00 <--", - }, -} - -func TestPunycode(t *testing.T) { - for _, tc := range punycodeTestCases { - if got, err := decode(tc.encoded); err != nil { - t.Errorf("decode(%q): %v", tc.encoded, err) - } else if got != tc.s { - t.Errorf("decode(%q): got %q, want %q", tc.encoded, got, tc.s) - } - - if got, err := encode("", tc.s); err != nil { - t.Errorf(`encode("", %q): %v`, tc.s, err) - } else if got != tc.encoded { - t.Errorf(`encode("", %q): got %q, want %q`, tc.s, got, tc.encoded) - } - } -} - -var punycodeErrorTestCases = [...]string{ - "decode -", // A sole '-' is invalid. - "decode foo\x00bar", // '\x00' is not in [0-9A-Za-z]. - "decode foo#bar", // '#' is not in [0-9A-Za-z]. - "decode foo\u00A3bar", // '\u00A3' is not in [0-9A-Za-z]. - "decode 9", // "9a" decodes to codepoint \u00A3; "9" is truncated. - "decode 99999a", // "99999a" decodes to codepoint \U0048A3C1, which is > \U0010FFFF. - "decode 9999999999a", // "9999999999a" overflows the int32 calculation. - - "encode " + strings.Repeat("x", 65536) + "\uff00", // int32 overflow. -} - -func TestPunycodeErrors(t *testing.T) { - for _, tc := range punycodeErrorTestCases { - var err error - switch { - case strings.HasPrefix(tc, "decode "): - _, err = decode(tc[7:]) - case strings.HasPrefix(tc, "encode "): - _, err = encode("", tc[7:]) - } - if err == nil { - if len(tc) > 256 { - tc = tc[:100] + "..." + tc[len(tc)-100:] - } - t.Errorf("no error for %s", tc) - } - } -} diff --git a/deps/golang.org/x/net/idna/tables.go b/deps/golang.org/x/net/idna/tables.go index f910b2691..d2819345f 100644 --- a/deps/golang.org/x/net/idna/tables.go +++ b/deps/golang.org/x/net/idna/tables.go @@ -3,7 +3,7 @@ package idna // UnicodeVersion is the Unicode version from which the tables in this package are derived. -const UnicodeVersion = "10.0.0" +const UnicodeVersion = "9.0.0" var mappings string = "" + // Size: 8176 bytes "\x00\x01 \x03 ̈\x01a\x03 ̄\x012\x013\x03 ́\x03 ̧\x011\x01o\x051⁄4\x051⁄2" + @@ -544,7 +544,7 @@ func (t *idnaTrie) lookupStringUnsafe(s string) uint16 { return 0 } -// idnaTrie. Total size: 29052 bytes (28.37 KiB). Checksum: ef06e7ecc26f36dd. +// idnaTrie. Total size: 28496 bytes (27.83 KiB). Checksum: 43288b883596640e. type idnaTrie struct{} func newIdnaTrie(i int) *idnaTrie { @@ -554,17 +554,17 @@ func newIdnaTrie(i int) *idnaTrie { // lookupValue determines the type of block n and looks up the value for b. func (t *idnaTrie) lookupValue(n uint32, b byte) uint16 { switch { - case n < 125: + case n < 123: return uint16(idnaValues[n<<6+uint32(b)]) default: - n -= 125 + n -= 123 return uint16(idnaSparse.lookup(n, b)) } } -// idnaValues: 127 blocks, 8128 entries, 16256 bytes +// idnaValues: 125 blocks, 8000 entries, 16000 bytes // The third block is the zero block. -var idnaValues = [8128]uint16{ +var idnaValues = [8000]uint16{ // Block 0x0, offset 0x0 0x00: 0x0080, 0x01: 0x0080, 0x02: 0x0080, 0x03: 0x0080, 0x04: 0x0080, 0x05: 0x0080, 0x06: 0x0080, 0x07: 0x0080, 0x08: 0x0080, 0x09: 0x0080, 0x0a: 0x0080, 0x0b: 0x0080, @@ -675,14 +675,14 @@ var idnaValues = [8128]uint16{ 0x276: 0x0018, 0x277: 0x0018, 0x278: 0x0018, 0x279: 0x0018, 0x27a: 0x0018, 0x27b: 0x0018, 0x27c: 0x0018, 0x27d: 0x0018, 0x27e: 0x0018, 0x27f: 0x0018, // Block 0xa, offset 0x280 - 0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x3308, 0x283: 0x03f5, 0x284: 0x0379, 0x285: 0x040d, - 0x286: 0x3308, 0x287: 0x3308, 0x288: 0x3308, 0x289: 0x3308, 0x28a: 0x3308, 0x28b: 0x3308, - 0x28c: 0x3308, 0x28d: 0x3308, 0x28e: 0x3308, 0x28f: 0x33c0, 0x290: 0x3308, 0x291: 0x3308, - 0x292: 0x3308, 0x293: 0x3308, 0x294: 0x3308, 0x295: 0x3308, 0x296: 0x3308, 0x297: 0x3308, - 0x298: 0x3308, 0x299: 0x3308, 0x29a: 0x3308, 0x29b: 0x3308, 0x29c: 0x3308, 0x29d: 0x3308, - 0x29e: 0x3308, 0x29f: 0x3308, 0x2a0: 0x3308, 0x2a1: 0x3308, 0x2a2: 0x3308, 0x2a3: 0x3308, - 0x2a4: 0x3308, 0x2a5: 0x3308, 0x2a6: 0x3308, 0x2a7: 0x3308, 0x2a8: 0x3308, 0x2a9: 0x3308, - 0x2aa: 0x3308, 0x2ab: 0x3308, 0x2ac: 0x3308, 0x2ad: 0x3308, 0x2ae: 0x3308, 0x2af: 0x3308, + 0x280: 0x03dd, 0x281: 0x03dd, 0x282: 0x1308, 0x283: 0x03f5, 0x284: 0x0379, 0x285: 0x040d, + 0x286: 0x1308, 0x287: 0x1308, 0x288: 0x1308, 0x289: 0x1308, 0x28a: 0x1308, 0x28b: 0x1308, + 0x28c: 0x1308, 0x28d: 0x1308, 0x28e: 0x1308, 0x28f: 0x13c0, 0x290: 0x1308, 0x291: 0x1308, + 0x292: 0x1308, 0x293: 0x1308, 0x294: 0x1308, 0x295: 0x1308, 0x296: 0x1308, 0x297: 0x1308, + 0x298: 0x1308, 0x299: 0x1308, 0x29a: 0x1308, 0x29b: 0x1308, 0x29c: 0x1308, 0x29d: 0x1308, + 0x29e: 0x1308, 0x29f: 0x1308, 0x2a0: 0x1308, 0x2a1: 0x1308, 0x2a2: 0x1308, 0x2a3: 0x1308, + 0x2a4: 0x1308, 0x2a5: 0x1308, 0x2a6: 0x1308, 0x2a7: 0x1308, 0x2a8: 0x1308, 0x2a9: 0x1308, + 0x2aa: 0x1308, 0x2ab: 0x1308, 0x2ac: 0x1308, 0x2ad: 0x1308, 0x2ae: 0x1308, 0x2af: 0x1308, 0x2b0: 0xe00d, 0x2b1: 0x0008, 0x2b2: 0xe00d, 0x2b3: 0x0008, 0x2b4: 0x0425, 0x2b5: 0x0008, 0x2b6: 0xe00d, 0x2b7: 0x0008, 0x2b8: 0x0040, 0x2b9: 0x0040, 0x2ba: 0x03a2, 0x2bb: 0x0008, 0x2bc: 0x0008, 0x2bd: 0x0008, 0x2be: 0x03c2, 0x2bf: 0x043d, @@ -723,8 +723,8 @@ var idnaValues = [8128]uint16{ 0x376: 0xe00d, 0x377: 0x0008, 0x378: 0xe00d, 0x379: 0x0008, 0x37a: 0xe00d, 0x37b: 0x0008, 0x37c: 0xe00d, 0x37d: 0x0008, 0x37e: 0xe00d, 0x37f: 0x0008, // Block 0xe, offset 0x380 - 0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x3308, 0x384: 0x3308, 0x385: 0x3308, - 0x386: 0x3308, 0x387: 0x3308, 0x388: 0x3318, 0x389: 0x3318, 0x38a: 0xe00d, 0x38b: 0x0008, + 0x380: 0xe00d, 0x381: 0x0008, 0x382: 0x0018, 0x383: 0x1308, 0x384: 0x1308, 0x385: 0x1308, + 0x386: 0x1308, 0x387: 0x1308, 0x388: 0x1318, 0x389: 0x1318, 0x38a: 0xe00d, 0x38b: 0x0008, 0x38c: 0xe00d, 0x38d: 0x0008, 0x38e: 0xe00d, 0x38f: 0x0008, 0x390: 0xe00d, 0x391: 0x0008, 0x392: 0xe00d, 0x393: 0x0008, 0x394: 0xe00d, 0x395: 0x0008, 0x396: 0xe00d, 0x397: 0x0008, 0x398: 0xe00d, 0x399: 0x0008, 0x39a: 0xe00d, 0x39b: 0x0008, 0x39c: 0xe00d, 0x39d: 0x0008, @@ -759,129 +759,129 @@ var idnaValues = [8128]uint16{ 0x436: 0x03f5, 0x437: 0x03f5, 0x438: 0x03f5, 0x439: 0x03f5, 0x43a: 0x03f5, 0x43b: 0x03f5, 0x43c: 0x03f5, 0x43d: 0x03f5, 0x43e: 0x03f5, 0x43f: 0x03f5, // Block 0x11, offset 0x440 - 0x440: 0x0840, 0x441: 0x0840, 0x442: 0x0840, 0x443: 0x0840, 0x444: 0x0840, 0x445: 0x0840, - 0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0818, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0818, - 0x44c: 0x0018, 0x44d: 0x0818, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x3308, 0x451: 0x3308, - 0x452: 0x3308, 0x453: 0x3308, 0x454: 0x3308, 0x455: 0x3308, 0x456: 0x3308, 0x457: 0x3308, - 0x458: 0x3308, 0x459: 0x3308, 0x45a: 0x3308, 0x45b: 0x0818, 0x45c: 0x0b40, 0x45d: 0x0040, - 0x45e: 0x0818, 0x45f: 0x0818, 0x460: 0x0a08, 0x461: 0x0808, 0x462: 0x0c08, 0x463: 0x0c08, - 0x464: 0x0c08, 0x465: 0x0c08, 0x466: 0x0a08, 0x467: 0x0c08, 0x468: 0x0a08, 0x469: 0x0c08, - 0x46a: 0x0a08, 0x46b: 0x0a08, 0x46c: 0x0a08, 0x46d: 0x0a08, 0x46e: 0x0a08, 0x46f: 0x0c08, - 0x470: 0x0c08, 0x471: 0x0c08, 0x472: 0x0c08, 0x473: 0x0a08, 0x474: 0x0a08, 0x475: 0x0a08, - 0x476: 0x0a08, 0x477: 0x0a08, 0x478: 0x0a08, 0x479: 0x0a08, 0x47a: 0x0a08, 0x47b: 0x0a08, - 0x47c: 0x0a08, 0x47d: 0x0a08, 0x47e: 0x0a08, 0x47f: 0x0a08, + 0x440: 0x0040, 0x441: 0x0040, 0x442: 0x0040, 0x443: 0x0040, 0x444: 0x0040, 0x445: 0x0040, + 0x446: 0x0018, 0x447: 0x0018, 0x448: 0x0018, 0x449: 0x0018, 0x44a: 0x0018, 0x44b: 0x0018, + 0x44c: 0x0018, 0x44d: 0x0018, 0x44e: 0x0018, 0x44f: 0x0018, 0x450: 0x1308, 0x451: 0x1308, + 0x452: 0x1308, 0x453: 0x1308, 0x454: 0x1308, 0x455: 0x1308, 0x456: 0x1308, 0x457: 0x1308, + 0x458: 0x1308, 0x459: 0x1308, 0x45a: 0x1308, 0x45b: 0x0018, 0x45c: 0x0340, 0x45d: 0x0040, + 0x45e: 0x0018, 0x45f: 0x0018, 0x460: 0x0208, 0x461: 0x0008, 0x462: 0x0408, 0x463: 0x0408, + 0x464: 0x0408, 0x465: 0x0408, 0x466: 0x0208, 0x467: 0x0408, 0x468: 0x0208, 0x469: 0x0408, + 0x46a: 0x0208, 0x46b: 0x0208, 0x46c: 0x0208, 0x46d: 0x0208, 0x46e: 0x0208, 0x46f: 0x0408, + 0x470: 0x0408, 0x471: 0x0408, 0x472: 0x0408, 0x473: 0x0208, 0x474: 0x0208, 0x475: 0x0208, + 0x476: 0x0208, 0x477: 0x0208, 0x478: 0x0208, 0x479: 0x0208, 0x47a: 0x0208, 0x47b: 0x0208, + 0x47c: 0x0208, 0x47d: 0x0208, 0x47e: 0x0208, 0x47f: 0x0208, // Block 0x12, offset 0x480 - 0x480: 0x0818, 0x481: 0x0a08, 0x482: 0x0a08, 0x483: 0x0a08, 0x484: 0x0a08, 0x485: 0x0a08, - 0x486: 0x0a08, 0x487: 0x0a08, 0x488: 0x0c08, 0x489: 0x0a08, 0x48a: 0x0a08, 0x48b: 0x3308, - 0x48c: 0x3308, 0x48d: 0x3308, 0x48e: 0x3308, 0x48f: 0x3308, 0x490: 0x3308, 0x491: 0x3308, - 0x492: 0x3308, 0x493: 0x3308, 0x494: 0x3308, 0x495: 0x3308, 0x496: 0x3308, 0x497: 0x3308, - 0x498: 0x3308, 0x499: 0x3308, 0x49a: 0x3308, 0x49b: 0x3308, 0x49c: 0x3308, 0x49d: 0x3308, - 0x49e: 0x3308, 0x49f: 0x3308, 0x4a0: 0x0808, 0x4a1: 0x0808, 0x4a2: 0x0808, 0x4a3: 0x0808, - 0x4a4: 0x0808, 0x4a5: 0x0808, 0x4a6: 0x0808, 0x4a7: 0x0808, 0x4a8: 0x0808, 0x4a9: 0x0808, - 0x4aa: 0x0018, 0x4ab: 0x0818, 0x4ac: 0x0818, 0x4ad: 0x0818, 0x4ae: 0x0a08, 0x4af: 0x0a08, - 0x4b0: 0x3308, 0x4b1: 0x0c08, 0x4b2: 0x0c08, 0x4b3: 0x0c08, 0x4b4: 0x0808, 0x4b5: 0x0429, - 0x4b6: 0x0451, 0x4b7: 0x0479, 0x4b8: 0x04a1, 0x4b9: 0x0a08, 0x4ba: 0x0a08, 0x4bb: 0x0a08, - 0x4bc: 0x0a08, 0x4bd: 0x0a08, 0x4be: 0x0a08, 0x4bf: 0x0a08, + 0x480: 0x0408, 0x481: 0x0208, 0x482: 0x0208, 0x483: 0x0408, 0x484: 0x0408, 0x485: 0x0408, + 0x486: 0x0408, 0x487: 0x0408, 0x488: 0x0408, 0x489: 0x0408, 0x48a: 0x0408, 0x48b: 0x0408, + 0x48c: 0x0208, 0x48d: 0x0408, 0x48e: 0x0208, 0x48f: 0x0408, 0x490: 0x0208, 0x491: 0x0208, + 0x492: 0x0408, 0x493: 0x0408, 0x494: 0x0018, 0x495: 0x0408, 0x496: 0x1308, 0x497: 0x1308, + 0x498: 0x1308, 0x499: 0x1308, 0x49a: 0x1308, 0x49b: 0x1308, 0x49c: 0x1308, 0x49d: 0x0040, + 0x49e: 0x0018, 0x49f: 0x1308, 0x4a0: 0x1308, 0x4a1: 0x1308, 0x4a2: 0x1308, 0x4a3: 0x1308, + 0x4a4: 0x1308, 0x4a5: 0x0008, 0x4a6: 0x0008, 0x4a7: 0x1308, 0x4a8: 0x1308, 0x4a9: 0x0018, + 0x4aa: 0x1308, 0x4ab: 0x1308, 0x4ac: 0x1308, 0x4ad: 0x1308, 0x4ae: 0x0408, 0x4af: 0x0408, + 0x4b0: 0x0008, 0x4b1: 0x0008, 0x4b2: 0x0008, 0x4b3: 0x0008, 0x4b4: 0x0008, 0x4b5: 0x0008, + 0x4b6: 0x0008, 0x4b7: 0x0008, 0x4b8: 0x0008, 0x4b9: 0x0008, 0x4ba: 0x0208, 0x4bb: 0x0208, + 0x4bc: 0x0208, 0x4bd: 0x0008, 0x4be: 0x0008, 0x4bf: 0x0208, // Block 0x13, offset 0x4c0 - 0x4c0: 0x0c08, 0x4c1: 0x0a08, 0x4c2: 0x0a08, 0x4c3: 0x0c08, 0x4c4: 0x0c08, 0x4c5: 0x0c08, - 0x4c6: 0x0c08, 0x4c7: 0x0c08, 0x4c8: 0x0c08, 0x4c9: 0x0c08, 0x4ca: 0x0c08, 0x4cb: 0x0c08, - 0x4cc: 0x0a08, 0x4cd: 0x0c08, 0x4ce: 0x0a08, 0x4cf: 0x0c08, 0x4d0: 0x0a08, 0x4d1: 0x0a08, - 0x4d2: 0x0c08, 0x4d3: 0x0c08, 0x4d4: 0x0818, 0x4d5: 0x0c08, 0x4d6: 0x3308, 0x4d7: 0x3308, - 0x4d8: 0x3308, 0x4d9: 0x3308, 0x4da: 0x3308, 0x4db: 0x3308, 0x4dc: 0x3308, 0x4dd: 0x0840, - 0x4de: 0x0018, 0x4df: 0x3308, 0x4e0: 0x3308, 0x4e1: 0x3308, 0x4e2: 0x3308, 0x4e3: 0x3308, - 0x4e4: 0x3308, 0x4e5: 0x0808, 0x4e6: 0x0808, 0x4e7: 0x3308, 0x4e8: 0x3308, 0x4e9: 0x0018, - 0x4ea: 0x3308, 0x4eb: 0x3308, 0x4ec: 0x3308, 0x4ed: 0x3308, 0x4ee: 0x0c08, 0x4ef: 0x0c08, - 0x4f0: 0x0008, 0x4f1: 0x0008, 0x4f2: 0x0008, 0x4f3: 0x0008, 0x4f4: 0x0008, 0x4f5: 0x0008, - 0x4f6: 0x0008, 0x4f7: 0x0008, 0x4f8: 0x0008, 0x4f9: 0x0008, 0x4fa: 0x0a08, 0x4fb: 0x0a08, - 0x4fc: 0x0a08, 0x4fd: 0x0808, 0x4fe: 0x0808, 0x4ff: 0x0a08, + 0x4c0: 0x0018, 0x4c1: 0x0018, 0x4c2: 0x0018, 0x4c3: 0x0018, 0x4c4: 0x0018, 0x4c5: 0x0018, + 0x4c6: 0x0018, 0x4c7: 0x0018, 0x4c8: 0x0018, 0x4c9: 0x0018, 0x4ca: 0x0018, 0x4cb: 0x0018, + 0x4cc: 0x0018, 0x4cd: 0x0018, 0x4ce: 0x0040, 0x4cf: 0x0340, 0x4d0: 0x0408, 0x4d1: 0x1308, + 0x4d2: 0x0208, 0x4d3: 0x0208, 0x4d4: 0x0208, 0x4d5: 0x0408, 0x4d6: 0x0408, 0x4d7: 0x0408, + 0x4d8: 0x0408, 0x4d9: 0x0408, 0x4da: 0x0208, 0x4db: 0x0208, 0x4dc: 0x0208, 0x4dd: 0x0208, + 0x4de: 0x0408, 0x4df: 0x0208, 0x4e0: 0x0208, 0x4e1: 0x0208, 0x4e2: 0x0208, 0x4e3: 0x0208, + 0x4e4: 0x0208, 0x4e5: 0x0208, 0x4e6: 0x0208, 0x4e7: 0x0208, 0x4e8: 0x0408, 0x4e9: 0x0208, + 0x4ea: 0x0408, 0x4eb: 0x0208, 0x4ec: 0x0408, 0x4ed: 0x0208, 0x4ee: 0x0208, 0x4ef: 0x0408, + 0x4f0: 0x1308, 0x4f1: 0x1308, 0x4f2: 0x1308, 0x4f3: 0x1308, 0x4f4: 0x1308, 0x4f5: 0x1308, + 0x4f6: 0x1308, 0x4f7: 0x1308, 0x4f8: 0x1308, 0x4f9: 0x1308, 0x4fa: 0x1308, 0x4fb: 0x1308, + 0x4fc: 0x1308, 0x4fd: 0x1308, 0x4fe: 0x1308, 0x4ff: 0x1308, // Block 0x14, offset 0x500 - 0x500: 0x0818, 0x501: 0x0818, 0x502: 0x0818, 0x503: 0x0818, 0x504: 0x0818, 0x505: 0x0818, - 0x506: 0x0818, 0x507: 0x0818, 0x508: 0x0818, 0x509: 0x0818, 0x50a: 0x0818, 0x50b: 0x0818, - 0x50c: 0x0818, 0x50d: 0x0818, 0x50e: 0x0040, 0x50f: 0x0b40, 0x510: 0x0c08, 0x511: 0x3308, - 0x512: 0x0a08, 0x513: 0x0a08, 0x514: 0x0a08, 0x515: 0x0c08, 0x516: 0x0c08, 0x517: 0x0c08, - 0x518: 0x0c08, 0x519: 0x0c08, 0x51a: 0x0a08, 0x51b: 0x0a08, 0x51c: 0x0a08, 0x51d: 0x0a08, - 0x51e: 0x0c08, 0x51f: 0x0a08, 0x520: 0x0a08, 0x521: 0x0a08, 0x522: 0x0a08, 0x523: 0x0a08, - 0x524: 0x0a08, 0x525: 0x0a08, 0x526: 0x0a08, 0x527: 0x0a08, 0x528: 0x0c08, 0x529: 0x0a08, - 0x52a: 0x0c08, 0x52b: 0x0a08, 0x52c: 0x0c08, 0x52d: 0x0a08, 0x52e: 0x0a08, 0x52f: 0x0c08, - 0x530: 0x3308, 0x531: 0x3308, 0x532: 0x3308, 0x533: 0x3308, 0x534: 0x3308, 0x535: 0x3308, - 0x536: 0x3308, 0x537: 0x3308, 0x538: 0x3308, 0x539: 0x3308, 0x53a: 0x3308, 0x53b: 0x3308, - 0x53c: 0x3308, 0x53d: 0x3308, 0x53e: 0x3308, 0x53f: 0x3308, + 0x500: 0x1008, 0x501: 0x1308, 0x502: 0x1308, 0x503: 0x1308, 0x504: 0x1308, 0x505: 0x1308, + 0x506: 0x1308, 0x507: 0x1308, 0x508: 0x1308, 0x509: 0x1008, 0x50a: 0x1008, 0x50b: 0x1008, + 0x50c: 0x1008, 0x50d: 0x1b08, 0x50e: 0x1008, 0x50f: 0x1008, 0x510: 0x0008, 0x511: 0x1308, + 0x512: 0x1308, 0x513: 0x1308, 0x514: 0x1308, 0x515: 0x1308, 0x516: 0x1308, 0x517: 0x1308, + 0x518: 0x04c9, 0x519: 0x0501, 0x51a: 0x0539, 0x51b: 0x0571, 0x51c: 0x05a9, 0x51d: 0x05e1, + 0x51e: 0x0619, 0x51f: 0x0651, 0x520: 0x0008, 0x521: 0x0008, 0x522: 0x1308, 0x523: 0x1308, + 0x524: 0x0018, 0x525: 0x0018, 0x526: 0x0008, 0x527: 0x0008, 0x528: 0x0008, 0x529: 0x0008, + 0x52a: 0x0008, 0x52b: 0x0008, 0x52c: 0x0008, 0x52d: 0x0008, 0x52e: 0x0008, 0x52f: 0x0008, + 0x530: 0x0018, 0x531: 0x0008, 0x532: 0x0008, 0x533: 0x0008, 0x534: 0x0008, 0x535: 0x0008, + 0x536: 0x0008, 0x537: 0x0008, 0x538: 0x0008, 0x539: 0x0008, 0x53a: 0x0008, 0x53b: 0x0008, + 0x53c: 0x0008, 0x53d: 0x0008, 0x53e: 0x0008, 0x53f: 0x0008, // Block 0x15, offset 0x540 - 0x540: 0x0c08, 0x541: 0x0a08, 0x542: 0x0a08, 0x543: 0x0a08, 0x544: 0x0a08, 0x545: 0x0a08, - 0x546: 0x0c08, 0x547: 0x0c08, 0x548: 0x0a08, 0x549: 0x0c08, 0x54a: 0x0a08, 0x54b: 0x0a08, - 0x54c: 0x0a08, 0x54d: 0x0a08, 0x54e: 0x0a08, 0x54f: 0x0a08, 0x550: 0x0a08, 0x551: 0x0a08, - 0x552: 0x0a08, 0x553: 0x0a08, 0x554: 0x0c08, 0x555: 0x0a08, 0x556: 0x0808, 0x557: 0x0808, - 0x558: 0x0808, 0x559: 0x3308, 0x55a: 0x3308, 0x55b: 0x3308, 0x55c: 0x0040, 0x55d: 0x0040, - 0x55e: 0x0818, 0x55f: 0x0040, 0x560: 0x0a08, 0x561: 0x0808, 0x562: 0x0a08, 0x563: 0x0a08, - 0x564: 0x0a08, 0x565: 0x0a08, 0x566: 0x0808, 0x567: 0x0c08, 0x568: 0x0a08, 0x569: 0x0c08, - 0x56a: 0x0c08, 0x56b: 0x0040, 0x56c: 0x0040, 0x56d: 0x0040, 0x56e: 0x0040, 0x56f: 0x0040, - 0x570: 0x0040, 0x571: 0x0040, 0x572: 0x0040, 0x573: 0x0040, 0x574: 0x0040, 0x575: 0x0040, - 0x576: 0x0040, 0x577: 0x0040, 0x578: 0x0040, 0x579: 0x0040, 0x57a: 0x0040, 0x57b: 0x0040, - 0x57c: 0x0040, 0x57d: 0x0040, 0x57e: 0x0040, 0x57f: 0x0040, + 0x540: 0x0008, 0x541: 0x1308, 0x542: 0x1008, 0x543: 0x1008, 0x544: 0x0040, 0x545: 0x0008, + 0x546: 0x0008, 0x547: 0x0008, 0x548: 0x0008, 0x549: 0x0008, 0x54a: 0x0008, 0x54b: 0x0008, + 0x54c: 0x0008, 0x54d: 0x0040, 0x54e: 0x0040, 0x54f: 0x0008, 0x550: 0x0008, 0x551: 0x0040, + 0x552: 0x0040, 0x553: 0x0008, 0x554: 0x0008, 0x555: 0x0008, 0x556: 0x0008, 0x557: 0x0008, + 0x558: 0x0008, 0x559: 0x0008, 0x55a: 0x0008, 0x55b: 0x0008, 0x55c: 0x0008, 0x55d: 0x0008, + 0x55e: 0x0008, 0x55f: 0x0008, 0x560: 0x0008, 0x561: 0x0008, 0x562: 0x0008, 0x563: 0x0008, + 0x564: 0x0008, 0x565: 0x0008, 0x566: 0x0008, 0x567: 0x0008, 0x568: 0x0008, 0x569: 0x0040, + 0x56a: 0x0008, 0x56b: 0x0008, 0x56c: 0x0008, 0x56d: 0x0008, 0x56e: 0x0008, 0x56f: 0x0008, + 0x570: 0x0008, 0x571: 0x0040, 0x572: 0x0008, 0x573: 0x0040, 0x574: 0x0040, 0x575: 0x0040, + 0x576: 0x0008, 0x577: 0x0008, 0x578: 0x0008, 0x579: 0x0008, 0x57a: 0x0040, 0x57b: 0x0040, + 0x57c: 0x1308, 0x57d: 0x0008, 0x57e: 0x1008, 0x57f: 0x1008, // Block 0x16, offset 0x580 - 0x580: 0x3008, 0x581: 0x3308, 0x582: 0x3308, 0x583: 0x3308, 0x584: 0x3308, 0x585: 0x3308, - 0x586: 0x3308, 0x587: 0x3308, 0x588: 0x3308, 0x589: 0x3008, 0x58a: 0x3008, 0x58b: 0x3008, - 0x58c: 0x3008, 0x58d: 0x3b08, 0x58e: 0x3008, 0x58f: 0x3008, 0x590: 0x0008, 0x591: 0x3308, - 0x592: 0x3308, 0x593: 0x3308, 0x594: 0x3308, 0x595: 0x3308, 0x596: 0x3308, 0x597: 0x3308, - 0x598: 0x04c9, 0x599: 0x0501, 0x59a: 0x0539, 0x59b: 0x0571, 0x59c: 0x05a9, 0x59d: 0x05e1, - 0x59e: 0x0619, 0x59f: 0x0651, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x3308, 0x5a3: 0x3308, - 0x5a4: 0x0018, 0x5a5: 0x0018, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0008, + 0x580: 0x1008, 0x581: 0x1308, 0x582: 0x1308, 0x583: 0x1308, 0x584: 0x1308, 0x585: 0x0040, + 0x586: 0x0040, 0x587: 0x1008, 0x588: 0x1008, 0x589: 0x0040, 0x58a: 0x0040, 0x58b: 0x1008, + 0x58c: 0x1008, 0x58d: 0x1b08, 0x58e: 0x0008, 0x58f: 0x0040, 0x590: 0x0040, 0x591: 0x0040, + 0x592: 0x0040, 0x593: 0x0040, 0x594: 0x0040, 0x595: 0x0040, 0x596: 0x0040, 0x597: 0x1008, + 0x598: 0x0040, 0x599: 0x0040, 0x59a: 0x0040, 0x59b: 0x0040, 0x59c: 0x0689, 0x59d: 0x06c1, + 0x59e: 0x0040, 0x59f: 0x06f9, 0x5a0: 0x0008, 0x5a1: 0x0008, 0x5a2: 0x1308, 0x5a3: 0x1308, + 0x5a4: 0x0040, 0x5a5: 0x0040, 0x5a6: 0x0008, 0x5a7: 0x0008, 0x5a8: 0x0008, 0x5a9: 0x0008, 0x5aa: 0x0008, 0x5ab: 0x0008, 0x5ac: 0x0008, 0x5ad: 0x0008, 0x5ae: 0x0008, 0x5af: 0x0008, - 0x5b0: 0x0018, 0x5b1: 0x0008, 0x5b2: 0x0008, 0x5b3: 0x0008, 0x5b4: 0x0008, 0x5b5: 0x0008, - 0x5b6: 0x0008, 0x5b7: 0x0008, 0x5b8: 0x0008, 0x5b9: 0x0008, 0x5ba: 0x0008, 0x5bb: 0x0008, - 0x5bc: 0x0008, 0x5bd: 0x0008, 0x5be: 0x0008, 0x5bf: 0x0008, + 0x5b0: 0x0008, 0x5b1: 0x0008, 0x5b2: 0x0018, 0x5b3: 0x0018, 0x5b4: 0x0018, 0x5b5: 0x0018, + 0x5b6: 0x0018, 0x5b7: 0x0018, 0x5b8: 0x0018, 0x5b9: 0x0018, 0x5ba: 0x0018, 0x5bb: 0x0018, + 0x5bc: 0x0040, 0x5bd: 0x0040, 0x5be: 0x0040, 0x5bf: 0x0040, // Block 0x17, offset 0x5c0 - 0x5c0: 0x0008, 0x5c1: 0x3308, 0x5c2: 0x3008, 0x5c3: 0x3008, 0x5c4: 0x0040, 0x5c5: 0x0008, - 0x5c6: 0x0008, 0x5c7: 0x0008, 0x5c8: 0x0008, 0x5c9: 0x0008, 0x5ca: 0x0008, 0x5cb: 0x0008, - 0x5cc: 0x0008, 0x5cd: 0x0040, 0x5ce: 0x0040, 0x5cf: 0x0008, 0x5d0: 0x0008, 0x5d1: 0x0040, + 0x5c0: 0x0040, 0x5c1: 0x1308, 0x5c2: 0x1308, 0x5c3: 0x1008, 0x5c4: 0x0040, 0x5c5: 0x0008, + 0x5c6: 0x0008, 0x5c7: 0x0008, 0x5c8: 0x0008, 0x5c9: 0x0008, 0x5ca: 0x0008, 0x5cb: 0x0040, + 0x5cc: 0x0040, 0x5cd: 0x0040, 0x5ce: 0x0040, 0x5cf: 0x0008, 0x5d0: 0x0008, 0x5d1: 0x0040, 0x5d2: 0x0040, 0x5d3: 0x0008, 0x5d4: 0x0008, 0x5d5: 0x0008, 0x5d6: 0x0008, 0x5d7: 0x0008, 0x5d8: 0x0008, 0x5d9: 0x0008, 0x5da: 0x0008, 0x5db: 0x0008, 0x5dc: 0x0008, 0x5dd: 0x0008, 0x5de: 0x0008, 0x5df: 0x0008, 0x5e0: 0x0008, 0x5e1: 0x0008, 0x5e2: 0x0008, 0x5e3: 0x0008, 0x5e4: 0x0008, 0x5e5: 0x0008, 0x5e6: 0x0008, 0x5e7: 0x0008, 0x5e8: 0x0008, 0x5e9: 0x0040, 0x5ea: 0x0008, 0x5eb: 0x0008, 0x5ec: 0x0008, 0x5ed: 0x0008, 0x5ee: 0x0008, 0x5ef: 0x0008, - 0x5f0: 0x0008, 0x5f1: 0x0040, 0x5f2: 0x0008, 0x5f3: 0x0040, 0x5f4: 0x0040, 0x5f5: 0x0040, - 0x5f6: 0x0008, 0x5f7: 0x0008, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0040, 0x5fb: 0x0040, - 0x5fc: 0x3308, 0x5fd: 0x0008, 0x5fe: 0x3008, 0x5ff: 0x3008, + 0x5f0: 0x0008, 0x5f1: 0x0040, 0x5f2: 0x0008, 0x5f3: 0x0731, 0x5f4: 0x0040, 0x5f5: 0x0008, + 0x5f6: 0x0769, 0x5f7: 0x0040, 0x5f8: 0x0008, 0x5f9: 0x0008, 0x5fa: 0x0040, 0x5fb: 0x0040, + 0x5fc: 0x1308, 0x5fd: 0x0040, 0x5fe: 0x1008, 0x5ff: 0x1008, // Block 0x18, offset 0x600 - 0x600: 0x3008, 0x601: 0x3308, 0x602: 0x3308, 0x603: 0x3308, 0x604: 0x3308, 0x605: 0x0040, - 0x606: 0x0040, 0x607: 0x3008, 0x608: 0x3008, 0x609: 0x0040, 0x60a: 0x0040, 0x60b: 0x3008, - 0x60c: 0x3008, 0x60d: 0x3b08, 0x60e: 0x0008, 0x60f: 0x0040, 0x610: 0x0040, 0x611: 0x0040, - 0x612: 0x0040, 0x613: 0x0040, 0x614: 0x0040, 0x615: 0x0040, 0x616: 0x0040, 0x617: 0x3008, - 0x618: 0x0040, 0x619: 0x0040, 0x61a: 0x0040, 0x61b: 0x0040, 0x61c: 0x0689, 0x61d: 0x06c1, - 0x61e: 0x0040, 0x61f: 0x06f9, 0x620: 0x0008, 0x621: 0x0008, 0x622: 0x3308, 0x623: 0x3308, + 0x600: 0x1008, 0x601: 0x1308, 0x602: 0x1308, 0x603: 0x0040, 0x604: 0x0040, 0x605: 0x0040, + 0x606: 0x0040, 0x607: 0x1308, 0x608: 0x1308, 0x609: 0x0040, 0x60a: 0x0040, 0x60b: 0x1308, + 0x60c: 0x1308, 0x60d: 0x1b08, 0x60e: 0x0040, 0x60f: 0x0040, 0x610: 0x0040, 0x611: 0x1308, + 0x612: 0x0040, 0x613: 0x0040, 0x614: 0x0040, 0x615: 0x0040, 0x616: 0x0040, 0x617: 0x0040, + 0x618: 0x0040, 0x619: 0x07a1, 0x61a: 0x07d9, 0x61b: 0x0811, 0x61c: 0x0008, 0x61d: 0x0040, + 0x61e: 0x0849, 0x61f: 0x0040, 0x620: 0x0040, 0x621: 0x0040, 0x622: 0x0040, 0x623: 0x0040, 0x624: 0x0040, 0x625: 0x0040, 0x626: 0x0008, 0x627: 0x0008, 0x628: 0x0008, 0x629: 0x0008, 0x62a: 0x0008, 0x62b: 0x0008, 0x62c: 0x0008, 0x62d: 0x0008, 0x62e: 0x0008, 0x62f: 0x0008, - 0x630: 0x0008, 0x631: 0x0008, 0x632: 0x0018, 0x633: 0x0018, 0x634: 0x0018, 0x635: 0x0018, - 0x636: 0x0018, 0x637: 0x0018, 0x638: 0x0018, 0x639: 0x0018, 0x63a: 0x0018, 0x63b: 0x0018, - 0x63c: 0x0008, 0x63d: 0x0018, 0x63e: 0x0040, 0x63f: 0x0040, + 0x630: 0x1308, 0x631: 0x1308, 0x632: 0x0008, 0x633: 0x0008, 0x634: 0x0008, 0x635: 0x1308, + 0x636: 0x0040, 0x637: 0x0040, 0x638: 0x0040, 0x639: 0x0040, 0x63a: 0x0040, 0x63b: 0x0040, + 0x63c: 0x0040, 0x63d: 0x0040, 0x63e: 0x0040, 0x63f: 0x0040, // Block 0x19, offset 0x640 - 0x640: 0x0040, 0x641: 0x3308, 0x642: 0x3308, 0x643: 0x3008, 0x644: 0x0040, 0x645: 0x0008, - 0x646: 0x0008, 0x647: 0x0008, 0x648: 0x0008, 0x649: 0x0008, 0x64a: 0x0008, 0x64b: 0x0040, - 0x64c: 0x0040, 0x64d: 0x0040, 0x64e: 0x0040, 0x64f: 0x0008, 0x650: 0x0008, 0x651: 0x0040, + 0x640: 0x0040, 0x641: 0x1308, 0x642: 0x1308, 0x643: 0x1008, 0x644: 0x0040, 0x645: 0x0008, + 0x646: 0x0008, 0x647: 0x0008, 0x648: 0x0008, 0x649: 0x0008, 0x64a: 0x0008, 0x64b: 0x0008, + 0x64c: 0x0008, 0x64d: 0x0008, 0x64e: 0x0040, 0x64f: 0x0008, 0x650: 0x0008, 0x651: 0x0008, 0x652: 0x0040, 0x653: 0x0008, 0x654: 0x0008, 0x655: 0x0008, 0x656: 0x0008, 0x657: 0x0008, 0x658: 0x0008, 0x659: 0x0008, 0x65a: 0x0008, 0x65b: 0x0008, 0x65c: 0x0008, 0x65d: 0x0008, 0x65e: 0x0008, 0x65f: 0x0008, 0x660: 0x0008, 0x661: 0x0008, 0x662: 0x0008, 0x663: 0x0008, 0x664: 0x0008, 0x665: 0x0008, 0x666: 0x0008, 0x667: 0x0008, 0x668: 0x0008, 0x669: 0x0040, 0x66a: 0x0008, 0x66b: 0x0008, 0x66c: 0x0008, 0x66d: 0x0008, 0x66e: 0x0008, 0x66f: 0x0008, - 0x670: 0x0008, 0x671: 0x0040, 0x672: 0x0008, 0x673: 0x0731, 0x674: 0x0040, 0x675: 0x0008, - 0x676: 0x0769, 0x677: 0x0040, 0x678: 0x0008, 0x679: 0x0008, 0x67a: 0x0040, 0x67b: 0x0040, - 0x67c: 0x3308, 0x67d: 0x0040, 0x67e: 0x3008, 0x67f: 0x3008, + 0x670: 0x0008, 0x671: 0x0040, 0x672: 0x0008, 0x673: 0x0008, 0x674: 0x0040, 0x675: 0x0008, + 0x676: 0x0008, 0x677: 0x0008, 0x678: 0x0008, 0x679: 0x0008, 0x67a: 0x0040, 0x67b: 0x0040, + 0x67c: 0x1308, 0x67d: 0x0008, 0x67e: 0x1008, 0x67f: 0x1008, // Block 0x1a, offset 0x680 - 0x680: 0x3008, 0x681: 0x3308, 0x682: 0x3308, 0x683: 0x0040, 0x684: 0x0040, 0x685: 0x0040, - 0x686: 0x0040, 0x687: 0x3308, 0x688: 0x3308, 0x689: 0x0040, 0x68a: 0x0040, 0x68b: 0x3308, - 0x68c: 0x3308, 0x68d: 0x3b08, 0x68e: 0x0040, 0x68f: 0x0040, 0x690: 0x0040, 0x691: 0x3308, + 0x680: 0x1008, 0x681: 0x1308, 0x682: 0x1308, 0x683: 0x1308, 0x684: 0x1308, 0x685: 0x1308, + 0x686: 0x0040, 0x687: 0x1308, 0x688: 0x1308, 0x689: 0x1008, 0x68a: 0x0040, 0x68b: 0x1008, + 0x68c: 0x1008, 0x68d: 0x1b08, 0x68e: 0x0040, 0x68f: 0x0040, 0x690: 0x0008, 0x691: 0x0040, 0x692: 0x0040, 0x693: 0x0040, 0x694: 0x0040, 0x695: 0x0040, 0x696: 0x0040, 0x697: 0x0040, - 0x698: 0x0040, 0x699: 0x07a1, 0x69a: 0x07d9, 0x69b: 0x0811, 0x69c: 0x0008, 0x69d: 0x0040, - 0x69e: 0x0849, 0x69f: 0x0040, 0x6a0: 0x0040, 0x6a1: 0x0040, 0x6a2: 0x0040, 0x6a3: 0x0040, + 0x698: 0x0040, 0x699: 0x0040, 0x69a: 0x0040, 0x69b: 0x0040, 0x69c: 0x0040, 0x69d: 0x0040, + 0x69e: 0x0040, 0x69f: 0x0040, 0x6a0: 0x0008, 0x6a1: 0x0008, 0x6a2: 0x1308, 0x6a3: 0x1308, 0x6a4: 0x0040, 0x6a5: 0x0040, 0x6a6: 0x0008, 0x6a7: 0x0008, 0x6a8: 0x0008, 0x6a9: 0x0008, 0x6aa: 0x0008, 0x6ab: 0x0008, 0x6ac: 0x0008, 0x6ad: 0x0008, 0x6ae: 0x0008, 0x6af: 0x0008, - 0x6b0: 0x3308, 0x6b1: 0x3308, 0x6b2: 0x0008, 0x6b3: 0x0008, 0x6b4: 0x0008, 0x6b5: 0x3308, - 0x6b6: 0x0040, 0x6b7: 0x0040, 0x6b8: 0x0040, 0x6b9: 0x0040, 0x6ba: 0x0040, 0x6bb: 0x0040, + 0x6b0: 0x0018, 0x6b1: 0x0018, 0x6b2: 0x0040, 0x6b3: 0x0040, 0x6b4: 0x0040, 0x6b5: 0x0040, + 0x6b6: 0x0040, 0x6b7: 0x0040, 0x6b8: 0x0040, 0x6b9: 0x0008, 0x6ba: 0x0040, 0x6bb: 0x0040, 0x6bc: 0x0040, 0x6bd: 0x0040, 0x6be: 0x0040, 0x6bf: 0x0040, // Block 0x1b, offset 0x6c0 - 0x6c0: 0x0040, 0x6c1: 0x3308, 0x6c2: 0x3308, 0x6c3: 0x3008, 0x6c4: 0x0040, 0x6c5: 0x0008, + 0x6c0: 0x0040, 0x6c1: 0x1308, 0x6c2: 0x1008, 0x6c3: 0x1008, 0x6c4: 0x0040, 0x6c5: 0x0008, 0x6c6: 0x0008, 0x6c7: 0x0008, 0x6c8: 0x0008, 0x6c9: 0x0008, 0x6ca: 0x0008, 0x6cb: 0x0008, - 0x6cc: 0x0008, 0x6cd: 0x0008, 0x6ce: 0x0040, 0x6cf: 0x0008, 0x6d0: 0x0008, 0x6d1: 0x0008, + 0x6cc: 0x0008, 0x6cd: 0x0040, 0x6ce: 0x0040, 0x6cf: 0x0008, 0x6d0: 0x0008, 0x6d1: 0x0040, 0x6d2: 0x0040, 0x6d3: 0x0008, 0x6d4: 0x0008, 0x6d5: 0x0008, 0x6d6: 0x0008, 0x6d7: 0x0008, 0x6d8: 0x0008, 0x6d9: 0x0008, 0x6da: 0x0008, 0x6db: 0x0008, 0x6dc: 0x0008, 0x6dd: 0x0008, 0x6de: 0x0008, 0x6df: 0x0008, 0x6e0: 0x0008, 0x6e1: 0x0008, 0x6e2: 0x0008, 0x6e3: 0x0008, @@ -889,1490 +889,1457 @@ var idnaValues = [8128]uint16{ 0x6ea: 0x0008, 0x6eb: 0x0008, 0x6ec: 0x0008, 0x6ed: 0x0008, 0x6ee: 0x0008, 0x6ef: 0x0008, 0x6f0: 0x0008, 0x6f1: 0x0040, 0x6f2: 0x0008, 0x6f3: 0x0008, 0x6f4: 0x0040, 0x6f5: 0x0008, 0x6f6: 0x0008, 0x6f7: 0x0008, 0x6f8: 0x0008, 0x6f9: 0x0008, 0x6fa: 0x0040, 0x6fb: 0x0040, - 0x6fc: 0x3308, 0x6fd: 0x0008, 0x6fe: 0x3008, 0x6ff: 0x3008, + 0x6fc: 0x1308, 0x6fd: 0x0008, 0x6fe: 0x1008, 0x6ff: 0x1308, // Block 0x1c, offset 0x700 - 0x700: 0x3008, 0x701: 0x3308, 0x702: 0x3308, 0x703: 0x3308, 0x704: 0x3308, 0x705: 0x3308, - 0x706: 0x0040, 0x707: 0x3308, 0x708: 0x3308, 0x709: 0x3008, 0x70a: 0x0040, 0x70b: 0x3008, - 0x70c: 0x3008, 0x70d: 0x3b08, 0x70e: 0x0040, 0x70f: 0x0040, 0x710: 0x0008, 0x711: 0x0040, - 0x712: 0x0040, 0x713: 0x0040, 0x714: 0x0040, 0x715: 0x0040, 0x716: 0x0040, 0x717: 0x0040, - 0x718: 0x0040, 0x719: 0x0040, 0x71a: 0x0040, 0x71b: 0x0040, 0x71c: 0x0040, 0x71d: 0x0040, - 0x71e: 0x0040, 0x71f: 0x0040, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x3308, 0x723: 0x3308, + 0x700: 0x1008, 0x701: 0x1308, 0x702: 0x1308, 0x703: 0x1308, 0x704: 0x1308, 0x705: 0x0040, + 0x706: 0x0040, 0x707: 0x1008, 0x708: 0x1008, 0x709: 0x0040, 0x70a: 0x0040, 0x70b: 0x1008, + 0x70c: 0x1008, 0x70d: 0x1b08, 0x70e: 0x0040, 0x70f: 0x0040, 0x710: 0x0040, 0x711: 0x0040, + 0x712: 0x0040, 0x713: 0x0040, 0x714: 0x0040, 0x715: 0x0040, 0x716: 0x1308, 0x717: 0x1008, + 0x718: 0x0040, 0x719: 0x0040, 0x71a: 0x0040, 0x71b: 0x0040, 0x71c: 0x0881, 0x71d: 0x08b9, + 0x71e: 0x0040, 0x71f: 0x0008, 0x720: 0x0008, 0x721: 0x0008, 0x722: 0x1308, 0x723: 0x1308, 0x724: 0x0040, 0x725: 0x0040, 0x726: 0x0008, 0x727: 0x0008, 0x728: 0x0008, 0x729: 0x0008, 0x72a: 0x0008, 0x72b: 0x0008, 0x72c: 0x0008, 0x72d: 0x0008, 0x72e: 0x0008, 0x72f: 0x0008, - 0x730: 0x0018, 0x731: 0x0018, 0x732: 0x0040, 0x733: 0x0040, 0x734: 0x0040, 0x735: 0x0040, - 0x736: 0x0040, 0x737: 0x0040, 0x738: 0x0040, 0x739: 0x0008, 0x73a: 0x3308, 0x73b: 0x3308, - 0x73c: 0x3308, 0x73d: 0x3308, 0x73e: 0x3308, 0x73f: 0x3308, + 0x730: 0x0018, 0x731: 0x0008, 0x732: 0x0018, 0x733: 0x0018, 0x734: 0x0018, 0x735: 0x0018, + 0x736: 0x0018, 0x737: 0x0018, 0x738: 0x0040, 0x739: 0x0040, 0x73a: 0x0040, 0x73b: 0x0040, + 0x73c: 0x0040, 0x73d: 0x0040, 0x73e: 0x0040, 0x73f: 0x0040, // Block 0x1d, offset 0x740 - 0x740: 0x0040, 0x741: 0x3308, 0x742: 0x3008, 0x743: 0x3008, 0x744: 0x0040, 0x745: 0x0008, - 0x746: 0x0008, 0x747: 0x0008, 0x748: 0x0008, 0x749: 0x0008, 0x74a: 0x0008, 0x74b: 0x0008, - 0x74c: 0x0008, 0x74d: 0x0040, 0x74e: 0x0040, 0x74f: 0x0008, 0x750: 0x0008, 0x751: 0x0040, - 0x752: 0x0040, 0x753: 0x0008, 0x754: 0x0008, 0x755: 0x0008, 0x756: 0x0008, 0x757: 0x0008, - 0x758: 0x0008, 0x759: 0x0008, 0x75a: 0x0008, 0x75b: 0x0008, 0x75c: 0x0008, 0x75d: 0x0008, - 0x75e: 0x0008, 0x75f: 0x0008, 0x760: 0x0008, 0x761: 0x0008, 0x762: 0x0008, 0x763: 0x0008, - 0x764: 0x0008, 0x765: 0x0008, 0x766: 0x0008, 0x767: 0x0008, 0x768: 0x0008, 0x769: 0x0040, - 0x76a: 0x0008, 0x76b: 0x0008, 0x76c: 0x0008, 0x76d: 0x0008, 0x76e: 0x0008, 0x76f: 0x0008, - 0x770: 0x0008, 0x771: 0x0040, 0x772: 0x0008, 0x773: 0x0008, 0x774: 0x0040, 0x775: 0x0008, + 0x740: 0x0040, 0x741: 0x0040, 0x742: 0x1308, 0x743: 0x0008, 0x744: 0x0040, 0x745: 0x0008, + 0x746: 0x0008, 0x747: 0x0008, 0x748: 0x0008, 0x749: 0x0008, 0x74a: 0x0008, 0x74b: 0x0040, + 0x74c: 0x0040, 0x74d: 0x0040, 0x74e: 0x0008, 0x74f: 0x0008, 0x750: 0x0008, 0x751: 0x0040, + 0x752: 0x0008, 0x753: 0x0008, 0x754: 0x0008, 0x755: 0x0008, 0x756: 0x0040, 0x757: 0x0040, + 0x758: 0x0040, 0x759: 0x0008, 0x75a: 0x0008, 0x75b: 0x0040, 0x75c: 0x0008, 0x75d: 0x0040, + 0x75e: 0x0008, 0x75f: 0x0008, 0x760: 0x0040, 0x761: 0x0040, 0x762: 0x0040, 0x763: 0x0008, + 0x764: 0x0008, 0x765: 0x0040, 0x766: 0x0040, 0x767: 0x0040, 0x768: 0x0008, 0x769: 0x0008, + 0x76a: 0x0008, 0x76b: 0x0040, 0x76c: 0x0040, 0x76d: 0x0040, 0x76e: 0x0008, 0x76f: 0x0008, + 0x770: 0x0008, 0x771: 0x0008, 0x772: 0x0008, 0x773: 0x0008, 0x774: 0x0008, 0x775: 0x0008, 0x776: 0x0008, 0x777: 0x0008, 0x778: 0x0008, 0x779: 0x0008, 0x77a: 0x0040, 0x77b: 0x0040, - 0x77c: 0x3308, 0x77d: 0x0008, 0x77e: 0x3008, 0x77f: 0x3308, + 0x77c: 0x0040, 0x77d: 0x0040, 0x77e: 0x1008, 0x77f: 0x1008, // Block 0x1e, offset 0x780 - 0x780: 0x3008, 0x781: 0x3308, 0x782: 0x3308, 0x783: 0x3308, 0x784: 0x3308, 0x785: 0x0040, - 0x786: 0x0040, 0x787: 0x3008, 0x788: 0x3008, 0x789: 0x0040, 0x78a: 0x0040, 0x78b: 0x3008, - 0x78c: 0x3008, 0x78d: 0x3b08, 0x78e: 0x0040, 0x78f: 0x0040, 0x790: 0x0040, 0x791: 0x0040, - 0x792: 0x0040, 0x793: 0x0040, 0x794: 0x0040, 0x795: 0x0040, 0x796: 0x3308, 0x797: 0x3008, - 0x798: 0x0040, 0x799: 0x0040, 0x79a: 0x0040, 0x79b: 0x0040, 0x79c: 0x0881, 0x79d: 0x08b9, - 0x79e: 0x0040, 0x79f: 0x0008, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x3308, 0x7a3: 0x3308, + 0x780: 0x1308, 0x781: 0x1008, 0x782: 0x1008, 0x783: 0x1008, 0x784: 0x1008, 0x785: 0x0040, + 0x786: 0x1308, 0x787: 0x1308, 0x788: 0x1308, 0x789: 0x0040, 0x78a: 0x1308, 0x78b: 0x1308, + 0x78c: 0x1308, 0x78d: 0x1b08, 0x78e: 0x0040, 0x78f: 0x0040, 0x790: 0x0040, 0x791: 0x0040, + 0x792: 0x0040, 0x793: 0x0040, 0x794: 0x0040, 0x795: 0x1308, 0x796: 0x1308, 0x797: 0x0040, + 0x798: 0x0008, 0x799: 0x0008, 0x79a: 0x0008, 0x79b: 0x0040, 0x79c: 0x0040, 0x79d: 0x0040, + 0x79e: 0x0040, 0x79f: 0x0040, 0x7a0: 0x0008, 0x7a1: 0x0008, 0x7a2: 0x1308, 0x7a3: 0x1308, 0x7a4: 0x0040, 0x7a5: 0x0040, 0x7a6: 0x0008, 0x7a7: 0x0008, 0x7a8: 0x0008, 0x7a9: 0x0008, 0x7aa: 0x0008, 0x7ab: 0x0008, 0x7ac: 0x0008, 0x7ad: 0x0008, 0x7ae: 0x0008, 0x7af: 0x0008, - 0x7b0: 0x0018, 0x7b1: 0x0008, 0x7b2: 0x0018, 0x7b3: 0x0018, 0x7b4: 0x0018, 0x7b5: 0x0018, - 0x7b6: 0x0018, 0x7b7: 0x0018, 0x7b8: 0x0040, 0x7b9: 0x0040, 0x7ba: 0x0040, 0x7bb: 0x0040, - 0x7bc: 0x0040, 0x7bd: 0x0040, 0x7be: 0x0040, 0x7bf: 0x0040, + 0x7b0: 0x0040, 0x7b1: 0x0040, 0x7b2: 0x0040, 0x7b3: 0x0040, 0x7b4: 0x0040, 0x7b5: 0x0040, + 0x7b6: 0x0040, 0x7b7: 0x0040, 0x7b8: 0x0018, 0x7b9: 0x0018, 0x7ba: 0x0018, 0x7bb: 0x0018, + 0x7bc: 0x0018, 0x7bd: 0x0018, 0x7be: 0x0018, 0x7bf: 0x0018, // Block 0x1f, offset 0x7c0 - 0x7c0: 0x0040, 0x7c1: 0x0040, 0x7c2: 0x3308, 0x7c3: 0x0008, 0x7c4: 0x0040, 0x7c5: 0x0008, - 0x7c6: 0x0008, 0x7c7: 0x0008, 0x7c8: 0x0008, 0x7c9: 0x0008, 0x7ca: 0x0008, 0x7cb: 0x0040, - 0x7cc: 0x0040, 0x7cd: 0x0040, 0x7ce: 0x0008, 0x7cf: 0x0008, 0x7d0: 0x0008, 0x7d1: 0x0040, - 0x7d2: 0x0008, 0x7d3: 0x0008, 0x7d4: 0x0008, 0x7d5: 0x0008, 0x7d6: 0x0040, 0x7d7: 0x0040, - 0x7d8: 0x0040, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0040, 0x7dc: 0x0008, 0x7dd: 0x0040, - 0x7de: 0x0008, 0x7df: 0x0008, 0x7e0: 0x0040, 0x7e1: 0x0040, 0x7e2: 0x0040, 0x7e3: 0x0008, - 0x7e4: 0x0008, 0x7e5: 0x0040, 0x7e6: 0x0040, 0x7e7: 0x0040, 0x7e8: 0x0008, 0x7e9: 0x0008, - 0x7ea: 0x0008, 0x7eb: 0x0040, 0x7ec: 0x0040, 0x7ed: 0x0040, 0x7ee: 0x0008, 0x7ef: 0x0008, - 0x7f0: 0x0008, 0x7f1: 0x0008, 0x7f2: 0x0008, 0x7f3: 0x0008, 0x7f4: 0x0008, 0x7f5: 0x0008, + 0x7c0: 0x0008, 0x7c1: 0x1308, 0x7c2: 0x1008, 0x7c3: 0x1008, 0x7c4: 0x0040, 0x7c5: 0x0008, + 0x7c6: 0x0008, 0x7c7: 0x0008, 0x7c8: 0x0008, 0x7c9: 0x0008, 0x7ca: 0x0008, 0x7cb: 0x0008, + 0x7cc: 0x0008, 0x7cd: 0x0040, 0x7ce: 0x0008, 0x7cf: 0x0008, 0x7d0: 0x0008, 0x7d1: 0x0040, + 0x7d2: 0x0008, 0x7d3: 0x0008, 0x7d4: 0x0008, 0x7d5: 0x0008, 0x7d6: 0x0008, 0x7d7: 0x0008, + 0x7d8: 0x0008, 0x7d9: 0x0008, 0x7da: 0x0008, 0x7db: 0x0008, 0x7dc: 0x0008, 0x7dd: 0x0008, + 0x7de: 0x0008, 0x7df: 0x0008, 0x7e0: 0x0008, 0x7e1: 0x0008, 0x7e2: 0x0008, 0x7e3: 0x0008, + 0x7e4: 0x0008, 0x7e5: 0x0008, 0x7e6: 0x0008, 0x7e7: 0x0008, 0x7e8: 0x0008, 0x7e9: 0x0040, + 0x7ea: 0x0008, 0x7eb: 0x0008, 0x7ec: 0x0008, 0x7ed: 0x0008, 0x7ee: 0x0008, 0x7ef: 0x0008, + 0x7f0: 0x0008, 0x7f1: 0x0008, 0x7f2: 0x0008, 0x7f3: 0x0008, 0x7f4: 0x0040, 0x7f5: 0x0008, 0x7f6: 0x0008, 0x7f7: 0x0008, 0x7f8: 0x0008, 0x7f9: 0x0008, 0x7fa: 0x0040, 0x7fb: 0x0040, - 0x7fc: 0x0040, 0x7fd: 0x0040, 0x7fe: 0x3008, 0x7ff: 0x3008, + 0x7fc: 0x1308, 0x7fd: 0x0008, 0x7fe: 0x1008, 0x7ff: 0x1308, // Block 0x20, offset 0x800 - 0x800: 0x3308, 0x801: 0x3008, 0x802: 0x3008, 0x803: 0x3008, 0x804: 0x3008, 0x805: 0x0040, - 0x806: 0x3308, 0x807: 0x3308, 0x808: 0x3308, 0x809: 0x0040, 0x80a: 0x3308, 0x80b: 0x3308, - 0x80c: 0x3308, 0x80d: 0x3b08, 0x80e: 0x0040, 0x80f: 0x0040, 0x810: 0x0040, 0x811: 0x0040, - 0x812: 0x0040, 0x813: 0x0040, 0x814: 0x0040, 0x815: 0x3308, 0x816: 0x3308, 0x817: 0x0040, - 0x818: 0x0008, 0x819: 0x0008, 0x81a: 0x0008, 0x81b: 0x0040, 0x81c: 0x0040, 0x81d: 0x0040, - 0x81e: 0x0040, 0x81f: 0x0040, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x3308, 0x823: 0x3308, + 0x800: 0x1008, 0x801: 0x1008, 0x802: 0x1008, 0x803: 0x1008, 0x804: 0x1008, 0x805: 0x0040, + 0x806: 0x1308, 0x807: 0x1008, 0x808: 0x1008, 0x809: 0x0040, 0x80a: 0x1008, 0x80b: 0x1008, + 0x80c: 0x1308, 0x80d: 0x1b08, 0x80e: 0x0040, 0x80f: 0x0040, 0x810: 0x0040, 0x811: 0x0040, + 0x812: 0x0040, 0x813: 0x0040, 0x814: 0x0040, 0x815: 0x1008, 0x816: 0x1008, 0x817: 0x0040, + 0x818: 0x0040, 0x819: 0x0040, 0x81a: 0x0040, 0x81b: 0x0040, 0x81c: 0x0040, 0x81d: 0x0040, + 0x81e: 0x0008, 0x81f: 0x0040, 0x820: 0x0008, 0x821: 0x0008, 0x822: 0x1308, 0x823: 0x1308, 0x824: 0x0040, 0x825: 0x0040, 0x826: 0x0008, 0x827: 0x0008, 0x828: 0x0008, 0x829: 0x0008, 0x82a: 0x0008, 0x82b: 0x0008, 0x82c: 0x0008, 0x82d: 0x0008, 0x82e: 0x0008, 0x82f: 0x0008, - 0x830: 0x0040, 0x831: 0x0040, 0x832: 0x0040, 0x833: 0x0040, 0x834: 0x0040, 0x835: 0x0040, - 0x836: 0x0040, 0x837: 0x0040, 0x838: 0x0018, 0x839: 0x0018, 0x83a: 0x0018, 0x83b: 0x0018, - 0x83c: 0x0018, 0x83d: 0x0018, 0x83e: 0x0018, 0x83f: 0x0018, + 0x830: 0x0040, 0x831: 0x0008, 0x832: 0x0008, 0x833: 0x0040, 0x834: 0x0040, 0x835: 0x0040, + 0x836: 0x0040, 0x837: 0x0040, 0x838: 0x0040, 0x839: 0x0040, 0x83a: 0x0040, 0x83b: 0x0040, + 0x83c: 0x0040, 0x83d: 0x0040, 0x83e: 0x0040, 0x83f: 0x0040, // Block 0x21, offset 0x840 - 0x840: 0x0008, 0x841: 0x3308, 0x842: 0x3008, 0x843: 0x3008, 0x844: 0x0040, 0x845: 0x0008, - 0x846: 0x0008, 0x847: 0x0008, 0x848: 0x0008, 0x849: 0x0008, 0x84a: 0x0008, 0x84b: 0x0008, - 0x84c: 0x0008, 0x84d: 0x0040, 0x84e: 0x0008, 0x84f: 0x0008, 0x850: 0x0008, 0x851: 0x0040, - 0x852: 0x0008, 0x853: 0x0008, 0x854: 0x0008, 0x855: 0x0008, 0x856: 0x0008, 0x857: 0x0008, - 0x858: 0x0008, 0x859: 0x0008, 0x85a: 0x0008, 0x85b: 0x0008, 0x85c: 0x0008, 0x85d: 0x0008, - 0x85e: 0x0008, 0x85f: 0x0008, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x0008, 0x863: 0x0008, - 0x864: 0x0008, 0x865: 0x0008, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0040, + 0x840: 0x1008, 0x841: 0x1308, 0x842: 0x1308, 0x843: 0x1308, 0x844: 0x1308, 0x845: 0x0040, + 0x846: 0x1008, 0x847: 0x1008, 0x848: 0x1008, 0x849: 0x0040, 0x84a: 0x1008, 0x84b: 0x1008, + 0x84c: 0x1008, 0x84d: 0x1b08, 0x84e: 0x0008, 0x84f: 0x0018, 0x850: 0x0040, 0x851: 0x0040, + 0x852: 0x0040, 0x853: 0x0040, 0x854: 0x0008, 0x855: 0x0008, 0x856: 0x0008, 0x857: 0x1008, + 0x858: 0x0018, 0x859: 0x0018, 0x85a: 0x0018, 0x85b: 0x0018, 0x85c: 0x0018, 0x85d: 0x0018, + 0x85e: 0x0018, 0x85f: 0x0008, 0x860: 0x0008, 0x861: 0x0008, 0x862: 0x1308, 0x863: 0x1308, + 0x864: 0x0040, 0x865: 0x0040, 0x866: 0x0008, 0x867: 0x0008, 0x868: 0x0008, 0x869: 0x0008, 0x86a: 0x0008, 0x86b: 0x0008, 0x86c: 0x0008, 0x86d: 0x0008, 0x86e: 0x0008, 0x86f: 0x0008, - 0x870: 0x0008, 0x871: 0x0008, 0x872: 0x0008, 0x873: 0x0008, 0x874: 0x0040, 0x875: 0x0008, - 0x876: 0x0008, 0x877: 0x0008, 0x878: 0x0008, 0x879: 0x0008, 0x87a: 0x0040, 0x87b: 0x0040, - 0x87c: 0x3308, 0x87d: 0x0008, 0x87e: 0x3008, 0x87f: 0x3308, + 0x870: 0x0018, 0x871: 0x0018, 0x872: 0x0018, 0x873: 0x0018, 0x874: 0x0018, 0x875: 0x0018, + 0x876: 0x0018, 0x877: 0x0018, 0x878: 0x0018, 0x879: 0x0018, 0x87a: 0x0008, 0x87b: 0x0008, + 0x87c: 0x0008, 0x87d: 0x0008, 0x87e: 0x0008, 0x87f: 0x0008, // Block 0x22, offset 0x880 - 0x880: 0x3008, 0x881: 0x3008, 0x882: 0x3008, 0x883: 0x3008, 0x884: 0x3008, 0x885: 0x0040, - 0x886: 0x3308, 0x887: 0x3008, 0x888: 0x3008, 0x889: 0x0040, 0x88a: 0x3008, 0x88b: 0x3008, - 0x88c: 0x3308, 0x88d: 0x3b08, 0x88e: 0x0040, 0x88f: 0x0040, 0x890: 0x0040, 0x891: 0x0040, - 0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0040, 0x895: 0x3008, 0x896: 0x3008, 0x897: 0x0040, - 0x898: 0x0040, 0x899: 0x0040, 0x89a: 0x0040, 0x89b: 0x0040, 0x89c: 0x0040, 0x89d: 0x0040, - 0x89e: 0x0008, 0x89f: 0x0040, 0x8a0: 0x0008, 0x8a1: 0x0008, 0x8a2: 0x3308, 0x8a3: 0x3308, - 0x8a4: 0x0040, 0x8a5: 0x0040, 0x8a6: 0x0008, 0x8a7: 0x0008, 0x8a8: 0x0008, 0x8a9: 0x0008, - 0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0008, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008, - 0x8b0: 0x0040, 0x8b1: 0x0008, 0x8b2: 0x0008, 0x8b3: 0x0040, 0x8b4: 0x0040, 0x8b5: 0x0040, - 0x8b6: 0x0040, 0x8b7: 0x0040, 0x8b8: 0x0040, 0x8b9: 0x0040, 0x8ba: 0x0040, 0x8bb: 0x0040, - 0x8bc: 0x0040, 0x8bd: 0x0040, 0x8be: 0x0040, 0x8bf: 0x0040, + 0x880: 0x0040, 0x881: 0x0008, 0x882: 0x0008, 0x883: 0x0040, 0x884: 0x0008, 0x885: 0x0040, + 0x886: 0x0040, 0x887: 0x0008, 0x888: 0x0008, 0x889: 0x0040, 0x88a: 0x0008, 0x88b: 0x0040, + 0x88c: 0x0040, 0x88d: 0x0008, 0x88e: 0x0040, 0x88f: 0x0040, 0x890: 0x0040, 0x891: 0x0040, + 0x892: 0x0040, 0x893: 0x0040, 0x894: 0x0008, 0x895: 0x0008, 0x896: 0x0008, 0x897: 0x0008, + 0x898: 0x0040, 0x899: 0x0008, 0x89a: 0x0008, 0x89b: 0x0008, 0x89c: 0x0008, 0x89d: 0x0008, + 0x89e: 0x0008, 0x89f: 0x0008, 0x8a0: 0x0040, 0x8a1: 0x0008, 0x8a2: 0x0008, 0x8a3: 0x0008, + 0x8a4: 0x0040, 0x8a5: 0x0008, 0x8a6: 0x0040, 0x8a7: 0x0008, 0x8a8: 0x0040, 0x8a9: 0x0040, + 0x8aa: 0x0008, 0x8ab: 0x0008, 0x8ac: 0x0040, 0x8ad: 0x0008, 0x8ae: 0x0008, 0x8af: 0x0008, + 0x8b0: 0x0008, 0x8b1: 0x1308, 0x8b2: 0x0008, 0x8b3: 0x0929, 0x8b4: 0x1308, 0x8b5: 0x1308, + 0x8b6: 0x1308, 0x8b7: 0x1308, 0x8b8: 0x1308, 0x8b9: 0x1308, 0x8ba: 0x0040, 0x8bb: 0x1308, + 0x8bc: 0x1308, 0x8bd: 0x0008, 0x8be: 0x0040, 0x8bf: 0x0040, // Block 0x23, offset 0x8c0 - 0x8c0: 0x3008, 0x8c1: 0x3308, 0x8c2: 0x3308, 0x8c3: 0x3308, 0x8c4: 0x3308, 0x8c5: 0x0040, - 0x8c6: 0x3008, 0x8c7: 0x3008, 0x8c8: 0x3008, 0x8c9: 0x0040, 0x8ca: 0x3008, 0x8cb: 0x3008, - 0x8cc: 0x3008, 0x8cd: 0x3b08, 0x8ce: 0x0008, 0x8cf: 0x0018, 0x8d0: 0x0040, 0x8d1: 0x0040, - 0x8d2: 0x0040, 0x8d3: 0x0040, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x3008, - 0x8d8: 0x0018, 0x8d9: 0x0018, 0x8da: 0x0018, 0x8db: 0x0018, 0x8dc: 0x0018, 0x8dd: 0x0018, - 0x8de: 0x0018, 0x8df: 0x0008, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x3308, 0x8e3: 0x3308, - 0x8e4: 0x0040, 0x8e5: 0x0040, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0008, - 0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0008, 0x8ee: 0x0008, 0x8ef: 0x0008, - 0x8f0: 0x0018, 0x8f1: 0x0018, 0x8f2: 0x0018, 0x8f3: 0x0018, 0x8f4: 0x0018, 0x8f5: 0x0018, - 0x8f6: 0x0018, 0x8f7: 0x0018, 0x8f8: 0x0018, 0x8f9: 0x0018, 0x8fa: 0x0008, 0x8fb: 0x0008, - 0x8fc: 0x0008, 0x8fd: 0x0008, 0x8fe: 0x0008, 0x8ff: 0x0008, + 0x8c0: 0x0008, 0x8c1: 0x0008, 0x8c2: 0x0008, 0x8c3: 0x09d1, 0x8c4: 0x0008, 0x8c5: 0x0008, + 0x8c6: 0x0008, 0x8c7: 0x0008, 0x8c8: 0x0040, 0x8c9: 0x0008, 0x8ca: 0x0008, 0x8cb: 0x0008, + 0x8cc: 0x0008, 0x8cd: 0x0a09, 0x8ce: 0x0008, 0x8cf: 0x0008, 0x8d0: 0x0008, 0x8d1: 0x0008, + 0x8d2: 0x0a41, 0x8d3: 0x0008, 0x8d4: 0x0008, 0x8d5: 0x0008, 0x8d6: 0x0008, 0x8d7: 0x0a79, + 0x8d8: 0x0008, 0x8d9: 0x0008, 0x8da: 0x0008, 0x8db: 0x0008, 0x8dc: 0x0ab1, 0x8dd: 0x0008, + 0x8de: 0x0008, 0x8df: 0x0008, 0x8e0: 0x0008, 0x8e1: 0x0008, 0x8e2: 0x0008, 0x8e3: 0x0008, + 0x8e4: 0x0008, 0x8e5: 0x0008, 0x8e6: 0x0008, 0x8e7: 0x0008, 0x8e8: 0x0008, 0x8e9: 0x0ae9, + 0x8ea: 0x0008, 0x8eb: 0x0008, 0x8ec: 0x0008, 0x8ed: 0x0040, 0x8ee: 0x0040, 0x8ef: 0x0040, + 0x8f0: 0x0040, 0x8f1: 0x1308, 0x8f2: 0x1308, 0x8f3: 0x0b21, 0x8f4: 0x1308, 0x8f5: 0x0b59, + 0x8f6: 0x0b91, 0x8f7: 0x0bc9, 0x8f8: 0x0c19, 0x8f9: 0x0c51, 0x8fa: 0x1308, 0x8fb: 0x1308, + 0x8fc: 0x1308, 0x8fd: 0x1308, 0x8fe: 0x1308, 0x8ff: 0x1008, // Block 0x24, offset 0x900 - 0x900: 0x0040, 0x901: 0x0008, 0x902: 0x0008, 0x903: 0x0040, 0x904: 0x0008, 0x905: 0x0040, - 0x906: 0x0040, 0x907: 0x0008, 0x908: 0x0008, 0x909: 0x0040, 0x90a: 0x0008, 0x90b: 0x0040, - 0x90c: 0x0040, 0x90d: 0x0008, 0x90e: 0x0040, 0x90f: 0x0040, 0x910: 0x0040, 0x911: 0x0040, - 0x912: 0x0040, 0x913: 0x0040, 0x914: 0x0008, 0x915: 0x0008, 0x916: 0x0008, 0x917: 0x0008, - 0x918: 0x0040, 0x919: 0x0008, 0x91a: 0x0008, 0x91b: 0x0008, 0x91c: 0x0008, 0x91d: 0x0008, - 0x91e: 0x0008, 0x91f: 0x0008, 0x920: 0x0040, 0x921: 0x0008, 0x922: 0x0008, 0x923: 0x0008, - 0x924: 0x0040, 0x925: 0x0008, 0x926: 0x0040, 0x927: 0x0008, 0x928: 0x0040, 0x929: 0x0040, - 0x92a: 0x0008, 0x92b: 0x0008, 0x92c: 0x0040, 0x92d: 0x0008, 0x92e: 0x0008, 0x92f: 0x0008, - 0x930: 0x0008, 0x931: 0x3308, 0x932: 0x0008, 0x933: 0x0929, 0x934: 0x3308, 0x935: 0x3308, - 0x936: 0x3308, 0x937: 0x3308, 0x938: 0x3308, 0x939: 0x3308, 0x93a: 0x0040, 0x93b: 0x3308, - 0x93c: 0x3308, 0x93d: 0x0008, 0x93e: 0x0040, 0x93f: 0x0040, + 0x900: 0x1308, 0x901: 0x0ca1, 0x902: 0x1308, 0x903: 0x1308, 0x904: 0x1b08, 0x905: 0x0018, + 0x906: 0x1308, 0x907: 0x1308, 0x908: 0x0008, 0x909: 0x0008, 0x90a: 0x0008, 0x90b: 0x0008, + 0x90c: 0x0008, 0x90d: 0x1308, 0x90e: 0x1308, 0x90f: 0x1308, 0x910: 0x1308, 0x911: 0x1308, + 0x912: 0x1308, 0x913: 0x0cd9, 0x914: 0x1308, 0x915: 0x1308, 0x916: 0x1308, 0x917: 0x1308, + 0x918: 0x0040, 0x919: 0x1308, 0x91a: 0x1308, 0x91b: 0x1308, 0x91c: 0x1308, 0x91d: 0x0d11, + 0x91e: 0x1308, 0x91f: 0x1308, 0x920: 0x1308, 0x921: 0x1308, 0x922: 0x0d49, 0x923: 0x1308, + 0x924: 0x1308, 0x925: 0x1308, 0x926: 0x1308, 0x927: 0x0d81, 0x928: 0x1308, 0x929: 0x1308, + 0x92a: 0x1308, 0x92b: 0x1308, 0x92c: 0x0db9, 0x92d: 0x1308, 0x92e: 0x1308, 0x92f: 0x1308, + 0x930: 0x1308, 0x931: 0x1308, 0x932: 0x1308, 0x933: 0x1308, 0x934: 0x1308, 0x935: 0x1308, + 0x936: 0x1308, 0x937: 0x1308, 0x938: 0x1308, 0x939: 0x0df1, 0x93a: 0x1308, 0x93b: 0x1308, + 0x93c: 0x1308, 0x93d: 0x0040, 0x93e: 0x0018, 0x93f: 0x0018, // Block 0x25, offset 0x940 - 0x940: 0x0008, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x09d1, 0x944: 0x0008, 0x945: 0x0008, - 0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0040, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008, - 0x94c: 0x0008, 0x94d: 0x0a09, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008, - 0x952: 0x0a41, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0a79, - 0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0ab1, 0x95d: 0x0008, + 0x940: 0x0008, 0x941: 0x0008, 0x942: 0x0008, 0x943: 0x0008, 0x944: 0x0008, 0x945: 0x0008, + 0x946: 0x0008, 0x947: 0x0008, 0x948: 0x0008, 0x949: 0x0008, 0x94a: 0x0008, 0x94b: 0x0008, + 0x94c: 0x0008, 0x94d: 0x0008, 0x94e: 0x0008, 0x94f: 0x0008, 0x950: 0x0008, 0x951: 0x0008, + 0x952: 0x0008, 0x953: 0x0008, 0x954: 0x0008, 0x955: 0x0008, 0x956: 0x0008, 0x957: 0x0008, + 0x958: 0x0008, 0x959: 0x0008, 0x95a: 0x0008, 0x95b: 0x0008, 0x95c: 0x0008, 0x95d: 0x0008, 0x95e: 0x0008, 0x95f: 0x0008, 0x960: 0x0008, 0x961: 0x0008, 0x962: 0x0008, 0x963: 0x0008, - 0x964: 0x0008, 0x965: 0x0008, 0x966: 0x0008, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0ae9, - 0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0008, 0x96d: 0x0040, 0x96e: 0x0040, 0x96f: 0x0040, - 0x970: 0x0040, 0x971: 0x3308, 0x972: 0x3308, 0x973: 0x0b21, 0x974: 0x3308, 0x975: 0x0b59, - 0x976: 0x0b91, 0x977: 0x0bc9, 0x978: 0x0c19, 0x979: 0x0c51, 0x97a: 0x3308, 0x97b: 0x3308, - 0x97c: 0x3308, 0x97d: 0x3308, 0x97e: 0x3308, 0x97f: 0x3008, + 0x964: 0x0008, 0x965: 0x0008, 0x966: 0x0008, 0x967: 0x0008, 0x968: 0x0008, 0x969: 0x0008, + 0x96a: 0x0008, 0x96b: 0x0008, 0x96c: 0x0039, 0x96d: 0x0ed1, 0x96e: 0x0ee9, 0x96f: 0x0008, + 0x970: 0x0ef9, 0x971: 0x0f09, 0x972: 0x0f19, 0x973: 0x0f31, 0x974: 0x0249, 0x975: 0x0f41, + 0x976: 0x0259, 0x977: 0x0f51, 0x978: 0x0359, 0x979: 0x0f61, 0x97a: 0x0f71, 0x97b: 0x0008, + 0x97c: 0x00d9, 0x97d: 0x0f81, 0x97e: 0x0f99, 0x97f: 0x0269, // Block 0x26, offset 0x980 - 0x980: 0x3308, 0x981: 0x0ca1, 0x982: 0x3308, 0x983: 0x3308, 0x984: 0x3b08, 0x985: 0x0018, - 0x986: 0x3308, 0x987: 0x3308, 0x988: 0x0008, 0x989: 0x0008, 0x98a: 0x0008, 0x98b: 0x0008, - 0x98c: 0x0008, 0x98d: 0x3308, 0x98e: 0x3308, 0x98f: 0x3308, 0x990: 0x3308, 0x991: 0x3308, - 0x992: 0x3308, 0x993: 0x0cd9, 0x994: 0x3308, 0x995: 0x3308, 0x996: 0x3308, 0x997: 0x3308, - 0x998: 0x0040, 0x999: 0x3308, 0x99a: 0x3308, 0x99b: 0x3308, 0x99c: 0x3308, 0x99d: 0x0d11, - 0x99e: 0x3308, 0x99f: 0x3308, 0x9a0: 0x3308, 0x9a1: 0x3308, 0x9a2: 0x0d49, 0x9a3: 0x3308, - 0x9a4: 0x3308, 0x9a5: 0x3308, 0x9a6: 0x3308, 0x9a7: 0x0d81, 0x9a8: 0x3308, 0x9a9: 0x3308, - 0x9aa: 0x3308, 0x9ab: 0x3308, 0x9ac: 0x0db9, 0x9ad: 0x3308, 0x9ae: 0x3308, 0x9af: 0x3308, - 0x9b0: 0x3308, 0x9b1: 0x3308, 0x9b2: 0x3308, 0x9b3: 0x3308, 0x9b4: 0x3308, 0x9b5: 0x3308, - 0x9b6: 0x3308, 0x9b7: 0x3308, 0x9b8: 0x3308, 0x9b9: 0x0df1, 0x9ba: 0x3308, 0x9bb: 0x3308, - 0x9bc: 0x3308, 0x9bd: 0x0040, 0x9be: 0x0018, 0x9bf: 0x0018, + 0x980: 0x0fa9, 0x981: 0x0fb9, 0x982: 0x0279, 0x983: 0x0039, 0x984: 0x0fc9, 0x985: 0x0fe1, + 0x986: 0x059d, 0x987: 0x0ee9, 0x988: 0x0ef9, 0x989: 0x0f09, 0x98a: 0x0ff9, 0x98b: 0x1011, + 0x98c: 0x1029, 0x98d: 0x0f31, 0x98e: 0x0008, 0x98f: 0x0f51, 0x990: 0x0f61, 0x991: 0x1041, + 0x992: 0x00d9, 0x993: 0x1059, 0x994: 0x05b5, 0x995: 0x05b5, 0x996: 0x0f99, 0x997: 0x0fa9, + 0x998: 0x0fb9, 0x999: 0x059d, 0x99a: 0x1071, 0x99b: 0x1089, 0x99c: 0x05cd, 0x99d: 0x1099, + 0x99e: 0x10b1, 0x99f: 0x10c9, 0x9a0: 0x10e1, 0x9a1: 0x10f9, 0x9a2: 0x0f41, 0x9a3: 0x0269, + 0x9a4: 0x0fb9, 0x9a5: 0x1089, 0x9a6: 0x1099, 0x9a7: 0x10b1, 0x9a8: 0x1111, 0x9a9: 0x10e1, + 0x9aa: 0x10f9, 0x9ab: 0x0008, 0x9ac: 0x0008, 0x9ad: 0x0008, 0x9ae: 0x0008, 0x9af: 0x0008, + 0x9b0: 0x0008, 0x9b1: 0x0008, 0x9b2: 0x0008, 0x9b3: 0x0008, 0x9b4: 0x0008, 0x9b5: 0x0008, + 0x9b6: 0x0008, 0x9b7: 0x0008, 0x9b8: 0x1129, 0x9b9: 0x0008, 0x9ba: 0x0008, 0x9bb: 0x0008, + 0x9bc: 0x0008, 0x9bd: 0x0008, 0x9be: 0x0008, 0x9bf: 0x0008, // Block 0x27, offset 0x9c0 0x9c0: 0x0008, 0x9c1: 0x0008, 0x9c2: 0x0008, 0x9c3: 0x0008, 0x9c4: 0x0008, 0x9c5: 0x0008, 0x9c6: 0x0008, 0x9c7: 0x0008, 0x9c8: 0x0008, 0x9c9: 0x0008, 0x9ca: 0x0008, 0x9cb: 0x0008, 0x9cc: 0x0008, 0x9cd: 0x0008, 0x9ce: 0x0008, 0x9cf: 0x0008, 0x9d0: 0x0008, 0x9d1: 0x0008, 0x9d2: 0x0008, 0x9d3: 0x0008, 0x9d4: 0x0008, 0x9d5: 0x0008, 0x9d6: 0x0008, 0x9d7: 0x0008, - 0x9d8: 0x0008, 0x9d9: 0x0008, 0x9da: 0x0008, 0x9db: 0x0008, 0x9dc: 0x0008, 0x9dd: 0x0008, - 0x9de: 0x0008, 0x9df: 0x0008, 0x9e0: 0x0008, 0x9e1: 0x0008, 0x9e2: 0x0008, 0x9e3: 0x0008, - 0x9e4: 0x0008, 0x9e5: 0x0008, 0x9e6: 0x0008, 0x9e7: 0x0008, 0x9e8: 0x0008, 0x9e9: 0x0008, - 0x9ea: 0x0008, 0x9eb: 0x0008, 0x9ec: 0x0039, 0x9ed: 0x0ed1, 0x9ee: 0x0ee9, 0x9ef: 0x0008, - 0x9f0: 0x0ef9, 0x9f1: 0x0f09, 0x9f2: 0x0f19, 0x9f3: 0x0f31, 0x9f4: 0x0249, 0x9f5: 0x0f41, - 0x9f6: 0x0259, 0x9f7: 0x0f51, 0x9f8: 0x0359, 0x9f9: 0x0f61, 0x9fa: 0x0f71, 0x9fb: 0x0008, - 0x9fc: 0x00d9, 0x9fd: 0x0f81, 0x9fe: 0x0f99, 0x9ff: 0x0269, + 0x9d8: 0x0008, 0x9d9: 0x0008, 0x9da: 0x0008, 0x9db: 0x1141, 0x9dc: 0x1159, 0x9dd: 0x1169, + 0x9de: 0x1181, 0x9df: 0x1029, 0x9e0: 0x1199, 0x9e1: 0x11a9, 0x9e2: 0x11c1, 0x9e3: 0x11d9, + 0x9e4: 0x11f1, 0x9e5: 0x1209, 0x9e6: 0x1221, 0x9e7: 0x05e5, 0x9e8: 0x1239, 0x9e9: 0x1251, + 0x9ea: 0xe17d, 0x9eb: 0x1269, 0x9ec: 0x1281, 0x9ed: 0x1299, 0x9ee: 0x12b1, 0x9ef: 0x12c9, + 0x9f0: 0x12e1, 0x9f1: 0x12f9, 0x9f2: 0x1311, 0x9f3: 0x1329, 0x9f4: 0x1341, 0x9f5: 0x1359, + 0x9f6: 0x1371, 0x9f7: 0x1389, 0x9f8: 0x05fd, 0x9f9: 0x13a1, 0x9fa: 0x13b9, 0x9fb: 0x13d1, + 0x9fc: 0x13e1, 0x9fd: 0x13f9, 0x9fe: 0x1411, 0x9ff: 0x1429, // Block 0x28, offset 0xa00 - 0xa00: 0x0fa9, 0xa01: 0x0fb9, 0xa02: 0x0279, 0xa03: 0x0039, 0xa04: 0x0fc9, 0xa05: 0x0fe1, - 0xa06: 0x059d, 0xa07: 0x0ee9, 0xa08: 0x0ef9, 0xa09: 0x0f09, 0xa0a: 0x0ff9, 0xa0b: 0x1011, - 0xa0c: 0x1029, 0xa0d: 0x0f31, 0xa0e: 0x0008, 0xa0f: 0x0f51, 0xa10: 0x0f61, 0xa11: 0x1041, - 0xa12: 0x00d9, 0xa13: 0x1059, 0xa14: 0x05b5, 0xa15: 0x05b5, 0xa16: 0x0f99, 0xa17: 0x0fa9, - 0xa18: 0x0fb9, 0xa19: 0x059d, 0xa1a: 0x1071, 0xa1b: 0x1089, 0xa1c: 0x05cd, 0xa1d: 0x1099, - 0xa1e: 0x10b1, 0xa1f: 0x10c9, 0xa20: 0x10e1, 0xa21: 0x10f9, 0xa22: 0x0f41, 0xa23: 0x0269, - 0xa24: 0x0fb9, 0xa25: 0x1089, 0xa26: 0x1099, 0xa27: 0x10b1, 0xa28: 0x1111, 0xa29: 0x10e1, - 0xa2a: 0x10f9, 0xa2b: 0x0008, 0xa2c: 0x0008, 0xa2d: 0x0008, 0xa2e: 0x0008, 0xa2f: 0x0008, - 0xa30: 0x0008, 0xa31: 0x0008, 0xa32: 0x0008, 0xa33: 0x0008, 0xa34: 0x0008, 0xa35: 0x0008, - 0xa36: 0x0008, 0xa37: 0x0008, 0xa38: 0x1129, 0xa39: 0x0008, 0xa3a: 0x0008, 0xa3b: 0x0008, - 0xa3c: 0x0008, 0xa3d: 0x0008, 0xa3e: 0x0008, 0xa3f: 0x0008, + 0xa00: 0xe00d, 0xa01: 0x0008, 0xa02: 0xe00d, 0xa03: 0x0008, 0xa04: 0xe00d, 0xa05: 0x0008, + 0xa06: 0xe00d, 0xa07: 0x0008, 0xa08: 0xe00d, 0xa09: 0x0008, 0xa0a: 0xe00d, 0xa0b: 0x0008, + 0xa0c: 0xe00d, 0xa0d: 0x0008, 0xa0e: 0xe00d, 0xa0f: 0x0008, 0xa10: 0xe00d, 0xa11: 0x0008, + 0xa12: 0xe00d, 0xa13: 0x0008, 0xa14: 0xe00d, 0xa15: 0x0008, 0xa16: 0xe00d, 0xa17: 0x0008, + 0xa18: 0xe00d, 0xa19: 0x0008, 0xa1a: 0xe00d, 0xa1b: 0x0008, 0xa1c: 0xe00d, 0xa1d: 0x0008, + 0xa1e: 0xe00d, 0xa1f: 0x0008, 0xa20: 0xe00d, 0xa21: 0x0008, 0xa22: 0xe00d, 0xa23: 0x0008, + 0xa24: 0xe00d, 0xa25: 0x0008, 0xa26: 0xe00d, 0xa27: 0x0008, 0xa28: 0xe00d, 0xa29: 0x0008, + 0xa2a: 0xe00d, 0xa2b: 0x0008, 0xa2c: 0xe00d, 0xa2d: 0x0008, 0xa2e: 0xe00d, 0xa2f: 0x0008, + 0xa30: 0xe00d, 0xa31: 0x0008, 0xa32: 0xe00d, 0xa33: 0x0008, 0xa34: 0xe00d, 0xa35: 0x0008, + 0xa36: 0xe00d, 0xa37: 0x0008, 0xa38: 0xe00d, 0xa39: 0x0008, 0xa3a: 0xe00d, 0xa3b: 0x0008, + 0xa3c: 0xe00d, 0xa3d: 0x0008, 0xa3e: 0xe00d, 0xa3f: 0x0008, // Block 0x29, offset 0xa40 - 0xa40: 0x0008, 0xa41: 0x0008, 0xa42: 0x0008, 0xa43: 0x0008, 0xa44: 0x0008, 0xa45: 0x0008, - 0xa46: 0x0008, 0xa47: 0x0008, 0xa48: 0x0008, 0xa49: 0x0008, 0xa4a: 0x0008, 0xa4b: 0x0008, - 0xa4c: 0x0008, 0xa4d: 0x0008, 0xa4e: 0x0008, 0xa4f: 0x0008, 0xa50: 0x0008, 0xa51: 0x0008, - 0xa52: 0x0008, 0xa53: 0x0008, 0xa54: 0x0008, 0xa55: 0x0008, 0xa56: 0x0008, 0xa57: 0x0008, - 0xa58: 0x0008, 0xa59: 0x0008, 0xa5a: 0x0008, 0xa5b: 0x1141, 0xa5c: 0x1159, 0xa5d: 0x1169, - 0xa5e: 0x1181, 0xa5f: 0x1029, 0xa60: 0x1199, 0xa61: 0x11a9, 0xa62: 0x11c1, 0xa63: 0x11d9, - 0xa64: 0x11f1, 0xa65: 0x1209, 0xa66: 0x1221, 0xa67: 0x05e5, 0xa68: 0x1239, 0xa69: 0x1251, - 0xa6a: 0xe17d, 0xa6b: 0x1269, 0xa6c: 0x1281, 0xa6d: 0x1299, 0xa6e: 0x12b1, 0xa6f: 0x12c9, - 0xa70: 0x12e1, 0xa71: 0x12f9, 0xa72: 0x1311, 0xa73: 0x1329, 0xa74: 0x1341, 0xa75: 0x1359, - 0xa76: 0x1371, 0xa77: 0x1389, 0xa78: 0x05fd, 0xa79: 0x13a1, 0xa7a: 0x13b9, 0xa7b: 0x13d1, - 0xa7c: 0x13e1, 0xa7d: 0x13f9, 0xa7e: 0x1411, 0xa7f: 0x1429, + 0xa40: 0xe00d, 0xa41: 0x0008, 0xa42: 0xe00d, 0xa43: 0x0008, 0xa44: 0xe00d, 0xa45: 0x0008, + 0xa46: 0xe00d, 0xa47: 0x0008, 0xa48: 0xe00d, 0xa49: 0x0008, 0xa4a: 0xe00d, 0xa4b: 0x0008, + 0xa4c: 0xe00d, 0xa4d: 0x0008, 0xa4e: 0xe00d, 0xa4f: 0x0008, 0xa50: 0xe00d, 0xa51: 0x0008, + 0xa52: 0xe00d, 0xa53: 0x0008, 0xa54: 0xe00d, 0xa55: 0x0008, 0xa56: 0x0008, 0xa57: 0x0008, + 0xa58: 0x0008, 0xa59: 0x0008, 0xa5a: 0x0615, 0xa5b: 0x0635, 0xa5c: 0x0008, 0xa5d: 0x0008, + 0xa5e: 0x1441, 0xa5f: 0x0008, 0xa60: 0xe00d, 0xa61: 0x0008, 0xa62: 0xe00d, 0xa63: 0x0008, + 0xa64: 0xe00d, 0xa65: 0x0008, 0xa66: 0xe00d, 0xa67: 0x0008, 0xa68: 0xe00d, 0xa69: 0x0008, + 0xa6a: 0xe00d, 0xa6b: 0x0008, 0xa6c: 0xe00d, 0xa6d: 0x0008, 0xa6e: 0xe00d, 0xa6f: 0x0008, + 0xa70: 0xe00d, 0xa71: 0x0008, 0xa72: 0xe00d, 0xa73: 0x0008, 0xa74: 0xe00d, 0xa75: 0x0008, + 0xa76: 0xe00d, 0xa77: 0x0008, 0xa78: 0xe00d, 0xa79: 0x0008, 0xa7a: 0xe00d, 0xa7b: 0x0008, + 0xa7c: 0xe00d, 0xa7d: 0x0008, 0xa7e: 0xe00d, 0xa7f: 0x0008, // Block 0x2a, offset 0xa80 - 0xa80: 0xe00d, 0xa81: 0x0008, 0xa82: 0xe00d, 0xa83: 0x0008, 0xa84: 0xe00d, 0xa85: 0x0008, - 0xa86: 0xe00d, 0xa87: 0x0008, 0xa88: 0xe00d, 0xa89: 0x0008, 0xa8a: 0xe00d, 0xa8b: 0x0008, - 0xa8c: 0xe00d, 0xa8d: 0x0008, 0xa8e: 0xe00d, 0xa8f: 0x0008, 0xa90: 0xe00d, 0xa91: 0x0008, - 0xa92: 0xe00d, 0xa93: 0x0008, 0xa94: 0xe00d, 0xa95: 0x0008, 0xa96: 0xe00d, 0xa97: 0x0008, - 0xa98: 0xe00d, 0xa99: 0x0008, 0xa9a: 0xe00d, 0xa9b: 0x0008, 0xa9c: 0xe00d, 0xa9d: 0x0008, - 0xa9e: 0xe00d, 0xa9f: 0x0008, 0xaa0: 0xe00d, 0xaa1: 0x0008, 0xaa2: 0xe00d, 0xaa3: 0x0008, - 0xaa4: 0xe00d, 0xaa5: 0x0008, 0xaa6: 0xe00d, 0xaa7: 0x0008, 0xaa8: 0xe00d, 0xaa9: 0x0008, - 0xaaa: 0xe00d, 0xaab: 0x0008, 0xaac: 0xe00d, 0xaad: 0x0008, 0xaae: 0xe00d, 0xaaf: 0x0008, - 0xab0: 0xe00d, 0xab1: 0x0008, 0xab2: 0xe00d, 0xab3: 0x0008, 0xab4: 0xe00d, 0xab5: 0x0008, - 0xab6: 0xe00d, 0xab7: 0x0008, 0xab8: 0xe00d, 0xab9: 0x0008, 0xaba: 0xe00d, 0xabb: 0x0008, - 0xabc: 0xe00d, 0xabd: 0x0008, 0xabe: 0xe00d, 0xabf: 0x0008, + 0xa80: 0x0008, 0xa81: 0x0008, 0xa82: 0x0008, 0xa83: 0x0008, 0xa84: 0x0008, 0xa85: 0x0008, + 0xa86: 0x0040, 0xa87: 0x0040, 0xa88: 0xe045, 0xa89: 0xe045, 0xa8a: 0xe045, 0xa8b: 0xe045, + 0xa8c: 0xe045, 0xa8d: 0xe045, 0xa8e: 0x0040, 0xa8f: 0x0040, 0xa90: 0x0008, 0xa91: 0x0008, + 0xa92: 0x0008, 0xa93: 0x0008, 0xa94: 0x0008, 0xa95: 0x0008, 0xa96: 0x0008, 0xa97: 0x0008, + 0xa98: 0x0040, 0xa99: 0xe045, 0xa9a: 0x0040, 0xa9b: 0xe045, 0xa9c: 0x0040, 0xa9d: 0xe045, + 0xa9e: 0x0040, 0xa9f: 0xe045, 0xaa0: 0x0008, 0xaa1: 0x0008, 0xaa2: 0x0008, 0xaa3: 0x0008, + 0xaa4: 0x0008, 0xaa5: 0x0008, 0xaa6: 0x0008, 0xaa7: 0x0008, 0xaa8: 0xe045, 0xaa9: 0xe045, + 0xaaa: 0xe045, 0xaab: 0xe045, 0xaac: 0xe045, 0xaad: 0xe045, 0xaae: 0xe045, 0xaaf: 0xe045, + 0xab0: 0x0008, 0xab1: 0x1459, 0xab2: 0x0008, 0xab3: 0x1471, 0xab4: 0x0008, 0xab5: 0x1489, + 0xab6: 0x0008, 0xab7: 0x14a1, 0xab8: 0x0008, 0xab9: 0x14b9, 0xaba: 0x0008, 0xabb: 0x14d1, + 0xabc: 0x0008, 0xabd: 0x14e9, 0xabe: 0x0040, 0xabf: 0x0040, // Block 0x2b, offset 0xac0 - 0xac0: 0xe00d, 0xac1: 0x0008, 0xac2: 0xe00d, 0xac3: 0x0008, 0xac4: 0xe00d, 0xac5: 0x0008, - 0xac6: 0xe00d, 0xac7: 0x0008, 0xac8: 0xe00d, 0xac9: 0x0008, 0xaca: 0xe00d, 0xacb: 0x0008, - 0xacc: 0xe00d, 0xacd: 0x0008, 0xace: 0xe00d, 0xacf: 0x0008, 0xad0: 0xe00d, 0xad1: 0x0008, - 0xad2: 0xe00d, 0xad3: 0x0008, 0xad4: 0xe00d, 0xad5: 0x0008, 0xad6: 0x0008, 0xad7: 0x0008, - 0xad8: 0x0008, 0xad9: 0x0008, 0xada: 0x0615, 0xadb: 0x0635, 0xadc: 0x0008, 0xadd: 0x0008, - 0xade: 0x1441, 0xadf: 0x0008, 0xae0: 0xe00d, 0xae1: 0x0008, 0xae2: 0xe00d, 0xae3: 0x0008, - 0xae4: 0xe00d, 0xae5: 0x0008, 0xae6: 0xe00d, 0xae7: 0x0008, 0xae8: 0xe00d, 0xae9: 0x0008, - 0xaea: 0xe00d, 0xaeb: 0x0008, 0xaec: 0xe00d, 0xaed: 0x0008, 0xaee: 0xe00d, 0xaef: 0x0008, - 0xaf0: 0xe00d, 0xaf1: 0x0008, 0xaf2: 0xe00d, 0xaf3: 0x0008, 0xaf4: 0xe00d, 0xaf5: 0x0008, - 0xaf6: 0xe00d, 0xaf7: 0x0008, 0xaf8: 0xe00d, 0xaf9: 0x0008, 0xafa: 0xe00d, 0xafb: 0x0008, - 0xafc: 0xe00d, 0xafd: 0x0008, 0xafe: 0xe00d, 0xaff: 0x0008, + 0xac0: 0x1501, 0xac1: 0x1531, 0xac2: 0x1561, 0xac3: 0x1591, 0xac4: 0x15c1, 0xac5: 0x15f1, + 0xac6: 0x1621, 0xac7: 0x1651, 0xac8: 0x1501, 0xac9: 0x1531, 0xaca: 0x1561, 0xacb: 0x1591, + 0xacc: 0x15c1, 0xacd: 0x15f1, 0xace: 0x1621, 0xacf: 0x1651, 0xad0: 0x1681, 0xad1: 0x16b1, + 0xad2: 0x16e1, 0xad3: 0x1711, 0xad4: 0x1741, 0xad5: 0x1771, 0xad6: 0x17a1, 0xad7: 0x17d1, + 0xad8: 0x1681, 0xad9: 0x16b1, 0xada: 0x16e1, 0xadb: 0x1711, 0xadc: 0x1741, 0xadd: 0x1771, + 0xade: 0x17a1, 0xadf: 0x17d1, 0xae0: 0x1801, 0xae1: 0x1831, 0xae2: 0x1861, 0xae3: 0x1891, + 0xae4: 0x18c1, 0xae5: 0x18f1, 0xae6: 0x1921, 0xae7: 0x1951, 0xae8: 0x1801, 0xae9: 0x1831, + 0xaea: 0x1861, 0xaeb: 0x1891, 0xaec: 0x18c1, 0xaed: 0x18f1, 0xaee: 0x1921, 0xaef: 0x1951, + 0xaf0: 0x0008, 0xaf1: 0x0008, 0xaf2: 0x1981, 0xaf3: 0x19b1, 0xaf4: 0x19d9, 0xaf5: 0x0040, + 0xaf6: 0x0008, 0xaf7: 0x1a01, 0xaf8: 0xe045, 0xaf9: 0xe045, 0xafa: 0x064d, 0xafb: 0x1459, + 0xafc: 0x19b1, 0xafd: 0x0666, 0xafe: 0x1a31, 0xaff: 0x0686, // Block 0x2c, offset 0xb00 - 0xb00: 0x0008, 0xb01: 0x0008, 0xb02: 0x0008, 0xb03: 0x0008, 0xb04: 0x0008, 0xb05: 0x0008, - 0xb06: 0x0040, 0xb07: 0x0040, 0xb08: 0xe045, 0xb09: 0xe045, 0xb0a: 0xe045, 0xb0b: 0xe045, - 0xb0c: 0xe045, 0xb0d: 0xe045, 0xb0e: 0x0040, 0xb0f: 0x0040, 0xb10: 0x0008, 0xb11: 0x0008, - 0xb12: 0x0008, 0xb13: 0x0008, 0xb14: 0x0008, 0xb15: 0x0008, 0xb16: 0x0008, 0xb17: 0x0008, - 0xb18: 0x0040, 0xb19: 0xe045, 0xb1a: 0x0040, 0xb1b: 0xe045, 0xb1c: 0x0040, 0xb1d: 0xe045, - 0xb1e: 0x0040, 0xb1f: 0xe045, 0xb20: 0x0008, 0xb21: 0x0008, 0xb22: 0x0008, 0xb23: 0x0008, + 0xb00: 0x06a6, 0xb01: 0x1a4a, 0xb02: 0x1a79, 0xb03: 0x1aa9, 0xb04: 0x1ad1, 0xb05: 0x0040, + 0xb06: 0x0008, 0xb07: 0x1af9, 0xb08: 0x06c5, 0xb09: 0x1471, 0xb0a: 0x06dd, 0xb0b: 0x1489, + 0xb0c: 0x1aa9, 0xb0d: 0x1b2a, 0xb0e: 0x1b5a, 0xb0f: 0x1b8a, 0xb10: 0x0008, 0xb11: 0x0008, + 0xb12: 0x0008, 0xb13: 0x1bb9, 0xb14: 0x0040, 0xb15: 0x0040, 0xb16: 0x0008, 0xb17: 0x0008, + 0xb18: 0xe045, 0xb19: 0xe045, 0xb1a: 0x06f5, 0xb1b: 0x14a1, 0xb1c: 0x0040, 0xb1d: 0x1bd2, + 0xb1e: 0x1c02, 0xb1f: 0x1c32, 0xb20: 0x0008, 0xb21: 0x0008, 0xb22: 0x0008, 0xb23: 0x1c61, 0xb24: 0x0008, 0xb25: 0x0008, 0xb26: 0x0008, 0xb27: 0x0008, 0xb28: 0xe045, 0xb29: 0xe045, - 0xb2a: 0xe045, 0xb2b: 0xe045, 0xb2c: 0xe045, 0xb2d: 0xe045, 0xb2e: 0xe045, 0xb2f: 0xe045, - 0xb30: 0x0008, 0xb31: 0x1459, 0xb32: 0x0008, 0xb33: 0x1471, 0xb34: 0x0008, 0xb35: 0x1489, - 0xb36: 0x0008, 0xb37: 0x14a1, 0xb38: 0x0008, 0xb39: 0x14b9, 0xb3a: 0x0008, 0xb3b: 0x14d1, - 0xb3c: 0x0008, 0xb3d: 0x14e9, 0xb3e: 0x0040, 0xb3f: 0x0040, + 0xb2a: 0x070d, 0xb2b: 0x14d1, 0xb2c: 0xe04d, 0xb2d: 0x1c7a, 0xb2e: 0x03d2, 0xb2f: 0x1caa, + 0xb30: 0x0040, 0xb31: 0x0040, 0xb32: 0x1cb9, 0xb33: 0x1ce9, 0xb34: 0x1d11, 0xb35: 0x0040, + 0xb36: 0x0008, 0xb37: 0x1d39, 0xb38: 0x0725, 0xb39: 0x14b9, 0xb3a: 0x0515, 0xb3b: 0x14e9, + 0xb3c: 0x1ce9, 0xb3d: 0x073e, 0xb3e: 0x075e, 0xb3f: 0x0040, // Block 0x2d, offset 0xb40 - 0xb40: 0x1501, 0xb41: 0x1531, 0xb42: 0x1561, 0xb43: 0x1591, 0xb44: 0x15c1, 0xb45: 0x15f1, - 0xb46: 0x1621, 0xb47: 0x1651, 0xb48: 0x1501, 0xb49: 0x1531, 0xb4a: 0x1561, 0xb4b: 0x1591, - 0xb4c: 0x15c1, 0xb4d: 0x15f1, 0xb4e: 0x1621, 0xb4f: 0x1651, 0xb50: 0x1681, 0xb51: 0x16b1, - 0xb52: 0x16e1, 0xb53: 0x1711, 0xb54: 0x1741, 0xb55: 0x1771, 0xb56: 0x17a1, 0xb57: 0x17d1, - 0xb58: 0x1681, 0xb59: 0x16b1, 0xb5a: 0x16e1, 0xb5b: 0x1711, 0xb5c: 0x1741, 0xb5d: 0x1771, - 0xb5e: 0x17a1, 0xb5f: 0x17d1, 0xb60: 0x1801, 0xb61: 0x1831, 0xb62: 0x1861, 0xb63: 0x1891, - 0xb64: 0x18c1, 0xb65: 0x18f1, 0xb66: 0x1921, 0xb67: 0x1951, 0xb68: 0x1801, 0xb69: 0x1831, - 0xb6a: 0x1861, 0xb6b: 0x1891, 0xb6c: 0x18c1, 0xb6d: 0x18f1, 0xb6e: 0x1921, 0xb6f: 0x1951, - 0xb70: 0x0008, 0xb71: 0x0008, 0xb72: 0x1981, 0xb73: 0x19b1, 0xb74: 0x19d9, 0xb75: 0x0040, - 0xb76: 0x0008, 0xb77: 0x1a01, 0xb78: 0xe045, 0xb79: 0xe045, 0xb7a: 0x064d, 0xb7b: 0x1459, - 0xb7c: 0x19b1, 0xb7d: 0x0666, 0xb7e: 0x1a31, 0xb7f: 0x0686, + 0xb40: 0x000a, 0xb41: 0x000a, 0xb42: 0x000a, 0xb43: 0x000a, 0xb44: 0x000a, 0xb45: 0x000a, + 0xb46: 0x000a, 0xb47: 0x000a, 0xb48: 0x000a, 0xb49: 0x000a, 0xb4a: 0x000a, 0xb4b: 0x03c0, + 0xb4c: 0x0003, 0xb4d: 0x0003, 0xb4e: 0x0340, 0xb4f: 0x0340, 0xb50: 0x0018, 0xb51: 0xe00d, + 0xb52: 0x0018, 0xb53: 0x0018, 0xb54: 0x0018, 0xb55: 0x0018, 0xb56: 0x0018, 0xb57: 0x077e, + 0xb58: 0x0018, 0xb59: 0x0018, 0xb5a: 0x0018, 0xb5b: 0x0018, 0xb5c: 0x0018, 0xb5d: 0x0018, + 0xb5e: 0x0018, 0xb5f: 0x0018, 0xb60: 0x0018, 0xb61: 0x0018, 0xb62: 0x0018, 0xb63: 0x0018, + 0xb64: 0x0040, 0xb65: 0x0040, 0xb66: 0x0040, 0xb67: 0x0018, 0xb68: 0x0040, 0xb69: 0x0040, + 0xb6a: 0x0340, 0xb6b: 0x0340, 0xb6c: 0x0340, 0xb6d: 0x0340, 0xb6e: 0x0340, 0xb6f: 0x000a, + 0xb70: 0x0018, 0xb71: 0x0018, 0xb72: 0x0018, 0xb73: 0x1d69, 0xb74: 0x1da1, 0xb75: 0x0018, + 0xb76: 0x1df1, 0xb77: 0x1e29, 0xb78: 0x0018, 0xb79: 0x0018, 0xb7a: 0x0018, 0xb7b: 0x0018, + 0xb7c: 0x1e7a, 0xb7d: 0x0018, 0xb7e: 0x079e, 0xb7f: 0x0018, // Block 0x2e, offset 0xb80 - 0xb80: 0x06a6, 0xb81: 0x1a4a, 0xb82: 0x1a79, 0xb83: 0x1aa9, 0xb84: 0x1ad1, 0xb85: 0x0040, - 0xb86: 0x0008, 0xb87: 0x1af9, 0xb88: 0x06c5, 0xb89: 0x1471, 0xb8a: 0x06dd, 0xb8b: 0x1489, - 0xb8c: 0x1aa9, 0xb8d: 0x1b2a, 0xb8e: 0x1b5a, 0xb8f: 0x1b8a, 0xb90: 0x0008, 0xb91: 0x0008, - 0xb92: 0x0008, 0xb93: 0x1bb9, 0xb94: 0x0040, 0xb95: 0x0040, 0xb96: 0x0008, 0xb97: 0x0008, - 0xb98: 0xe045, 0xb99: 0xe045, 0xb9a: 0x06f5, 0xb9b: 0x14a1, 0xb9c: 0x0040, 0xb9d: 0x1bd2, - 0xb9e: 0x1c02, 0xb9f: 0x1c32, 0xba0: 0x0008, 0xba1: 0x0008, 0xba2: 0x0008, 0xba3: 0x1c61, - 0xba4: 0x0008, 0xba5: 0x0008, 0xba6: 0x0008, 0xba7: 0x0008, 0xba8: 0xe045, 0xba9: 0xe045, - 0xbaa: 0x070d, 0xbab: 0x14d1, 0xbac: 0xe04d, 0xbad: 0x1c7a, 0xbae: 0x03d2, 0xbaf: 0x1caa, - 0xbb0: 0x0040, 0xbb1: 0x0040, 0xbb2: 0x1cb9, 0xbb3: 0x1ce9, 0xbb4: 0x1d11, 0xbb5: 0x0040, - 0xbb6: 0x0008, 0xbb7: 0x1d39, 0xbb8: 0x0725, 0xbb9: 0x14b9, 0xbba: 0x0515, 0xbbb: 0x14e9, - 0xbbc: 0x1ce9, 0xbbd: 0x073e, 0xbbe: 0x075e, 0xbbf: 0x0040, + 0xb80: 0x0018, 0xb81: 0x0018, 0xb82: 0x0018, 0xb83: 0x0018, 0xb84: 0x0018, 0xb85: 0x0018, + 0xb86: 0x0018, 0xb87: 0x1e92, 0xb88: 0x1eaa, 0xb89: 0x1ec2, 0xb8a: 0x0018, 0xb8b: 0x0018, + 0xb8c: 0x0018, 0xb8d: 0x0018, 0xb8e: 0x0018, 0xb8f: 0x0018, 0xb90: 0x0018, 0xb91: 0x0018, + 0xb92: 0x0018, 0xb93: 0x0018, 0xb94: 0x0018, 0xb95: 0x0018, 0xb96: 0x0018, 0xb97: 0x1ed9, + 0xb98: 0x0018, 0xb99: 0x0018, 0xb9a: 0x0018, 0xb9b: 0x0018, 0xb9c: 0x0018, 0xb9d: 0x0018, + 0xb9e: 0x0018, 0xb9f: 0x000a, 0xba0: 0x03c0, 0xba1: 0x0340, 0xba2: 0x0340, 0xba3: 0x0340, + 0xba4: 0x03c0, 0xba5: 0x0040, 0xba6: 0x0040, 0xba7: 0x0040, 0xba8: 0x0040, 0xba9: 0x0040, + 0xbaa: 0x0340, 0xbab: 0x0340, 0xbac: 0x0340, 0xbad: 0x0340, 0xbae: 0x0340, 0xbaf: 0x0340, + 0xbb0: 0x1f41, 0xbb1: 0x0f41, 0xbb2: 0x0040, 0xbb3: 0x0040, 0xbb4: 0x1f51, 0xbb5: 0x1f61, + 0xbb6: 0x1f71, 0xbb7: 0x1f81, 0xbb8: 0x1f91, 0xbb9: 0x1fa1, 0xbba: 0x1fb2, 0xbbb: 0x07bd, + 0xbbc: 0x1fc2, 0xbbd: 0x1fd2, 0xbbe: 0x1fe2, 0xbbf: 0x0f71, // Block 0x2f, offset 0xbc0 - 0xbc0: 0x000a, 0xbc1: 0x000a, 0xbc2: 0x000a, 0xbc3: 0x000a, 0xbc4: 0x000a, 0xbc5: 0x000a, - 0xbc6: 0x000a, 0xbc7: 0x000a, 0xbc8: 0x000a, 0xbc9: 0x000a, 0xbca: 0x000a, 0xbcb: 0x03c0, - 0xbcc: 0x0003, 0xbcd: 0x0003, 0xbce: 0x0340, 0xbcf: 0x0b40, 0xbd0: 0x0018, 0xbd1: 0xe00d, - 0xbd2: 0x0018, 0xbd3: 0x0018, 0xbd4: 0x0018, 0xbd5: 0x0018, 0xbd6: 0x0018, 0xbd7: 0x077e, - 0xbd8: 0x0018, 0xbd9: 0x0018, 0xbda: 0x0018, 0xbdb: 0x0018, 0xbdc: 0x0018, 0xbdd: 0x0018, - 0xbde: 0x0018, 0xbdf: 0x0018, 0xbe0: 0x0018, 0xbe1: 0x0018, 0xbe2: 0x0018, 0xbe3: 0x0018, - 0xbe4: 0x0040, 0xbe5: 0x0040, 0xbe6: 0x0040, 0xbe7: 0x0018, 0xbe8: 0x0040, 0xbe9: 0x0040, - 0xbea: 0x0340, 0xbeb: 0x0340, 0xbec: 0x0340, 0xbed: 0x0340, 0xbee: 0x0340, 0xbef: 0x000a, - 0xbf0: 0x0018, 0xbf1: 0x0018, 0xbf2: 0x0018, 0xbf3: 0x1d69, 0xbf4: 0x1da1, 0xbf5: 0x0018, - 0xbf6: 0x1df1, 0xbf7: 0x1e29, 0xbf8: 0x0018, 0xbf9: 0x0018, 0xbfa: 0x0018, 0xbfb: 0x0018, - 0xbfc: 0x1e7a, 0xbfd: 0x0018, 0xbfe: 0x079e, 0xbff: 0x0018, + 0xbc0: 0x1f41, 0xbc1: 0x00c9, 0xbc2: 0x0069, 0xbc3: 0x0079, 0xbc4: 0x1f51, 0xbc5: 0x1f61, + 0xbc6: 0x1f71, 0xbc7: 0x1f81, 0xbc8: 0x1f91, 0xbc9: 0x1fa1, 0xbca: 0x1fb2, 0xbcb: 0x07d5, + 0xbcc: 0x1fc2, 0xbcd: 0x1fd2, 0xbce: 0x1fe2, 0xbcf: 0x0040, 0xbd0: 0x0039, 0xbd1: 0x0f09, + 0xbd2: 0x00d9, 0xbd3: 0x0369, 0xbd4: 0x0ff9, 0xbd5: 0x0249, 0xbd6: 0x0f51, 0xbd7: 0x0359, + 0xbd8: 0x0f61, 0xbd9: 0x0f71, 0xbda: 0x0f99, 0xbdb: 0x01d9, 0xbdc: 0x0fa9, 0xbdd: 0x0040, + 0xbde: 0x0040, 0xbdf: 0x0040, 0xbe0: 0x0018, 0xbe1: 0x0018, 0xbe2: 0x0018, 0xbe3: 0x0018, + 0xbe4: 0x0018, 0xbe5: 0x0018, 0xbe6: 0x0018, 0xbe7: 0x0018, 0xbe8: 0x1ff1, 0xbe9: 0x0018, + 0xbea: 0x0018, 0xbeb: 0x0018, 0xbec: 0x0018, 0xbed: 0x0018, 0xbee: 0x0018, 0xbef: 0x0018, + 0xbf0: 0x0018, 0xbf1: 0x0018, 0xbf2: 0x0018, 0xbf3: 0x0018, 0xbf4: 0x0018, 0xbf5: 0x0018, + 0xbf6: 0x0018, 0xbf7: 0x0018, 0xbf8: 0x0018, 0xbf9: 0x0018, 0xbfa: 0x0018, 0xbfb: 0x0018, + 0xbfc: 0x0018, 0xbfd: 0x0018, 0xbfe: 0x0018, 0xbff: 0x0040, // Block 0x30, offset 0xc00 - 0xc00: 0x0018, 0xc01: 0x0018, 0xc02: 0x0018, 0xc03: 0x0018, 0xc04: 0x0018, 0xc05: 0x0018, - 0xc06: 0x0018, 0xc07: 0x1e92, 0xc08: 0x1eaa, 0xc09: 0x1ec2, 0xc0a: 0x0018, 0xc0b: 0x0018, - 0xc0c: 0x0018, 0xc0d: 0x0018, 0xc0e: 0x0018, 0xc0f: 0x0018, 0xc10: 0x0018, 0xc11: 0x0018, - 0xc12: 0x0018, 0xc13: 0x0018, 0xc14: 0x0018, 0xc15: 0x0018, 0xc16: 0x0018, 0xc17: 0x1ed9, - 0xc18: 0x0018, 0xc19: 0x0018, 0xc1a: 0x0018, 0xc1b: 0x0018, 0xc1c: 0x0018, 0xc1d: 0x0018, - 0xc1e: 0x0018, 0xc1f: 0x000a, 0xc20: 0x03c0, 0xc21: 0x0340, 0xc22: 0x0340, 0xc23: 0x0340, - 0xc24: 0x03c0, 0xc25: 0x0040, 0xc26: 0x0040, 0xc27: 0x0040, 0xc28: 0x0040, 0xc29: 0x0040, - 0xc2a: 0x0340, 0xc2b: 0x0340, 0xc2c: 0x0340, 0xc2d: 0x0340, 0xc2e: 0x0340, 0xc2f: 0x0340, - 0xc30: 0x1f41, 0xc31: 0x0f41, 0xc32: 0x0040, 0xc33: 0x0040, 0xc34: 0x1f51, 0xc35: 0x1f61, - 0xc36: 0x1f71, 0xc37: 0x1f81, 0xc38: 0x1f91, 0xc39: 0x1fa1, 0xc3a: 0x1fb2, 0xc3b: 0x07bd, - 0xc3c: 0x1fc2, 0xc3d: 0x1fd2, 0xc3e: 0x1fe2, 0xc3f: 0x0f71, + 0xc00: 0x07ee, 0xc01: 0x080e, 0xc02: 0x1159, 0xc03: 0x082d, 0xc04: 0x0018, 0xc05: 0x084e, + 0xc06: 0x086e, 0xc07: 0x1011, 0xc08: 0x0018, 0xc09: 0x088d, 0xc0a: 0x0f31, 0xc0b: 0x0249, + 0xc0c: 0x0249, 0xc0d: 0x0249, 0xc0e: 0x0249, 0xc0f: 0x2009, 0xc10: 0x0f41, 0xc11: 0x0f41, + 0xc12: 0x0359, 0xc13: 0x0359, 0xc14: 0x0018, 0xc15: 0x0f71, 0xc16: 0x2021, 0xc17: 0x0018, + 0xc18: 0x0018, 0xc19: 0x0f99, 0xc1a: 0x2039, 0xc1b: 0x0269, 0xc1c: 0x0269, 0xc1d: 0x0269, + 0xc1e: 0x0018, 0xc1f: 0x0018, 0xc20: 0x2049, 0xc21: 0x08ad, 0xc22: 0x2061, 0xc23: 0x0018, + 0xc24: 0x13d1, 0xc25: 0x0018, 0xc26: 0x2079, 0xc27: 0x0018, 0xc28: 0x13d1, 0xc29: 0x0018, + 0xc2a: 0x0f51, 0xc2b: 0x2091, 0xc2c: 0x0ee9, 0xc2d: 0x1159, 0xc2e: 0x0018, 0xc2f: 0x0f09, + 0xc30: 0x0f09, 0xc31: 0x1199, 0xc32: 0x0040, 0xc33: 0x0f61, 0xc34: 0x00d9, 0xc35: 0x20a9, + 0xc36: 0x20c1, 0xc37: 0x20d9, 0xc38: 0x20f1, 0xc39: 0x0f41, 0xc3a: 0x0018, 0xc3b: 0x08cd, + 0xc3c: 0x2109, 0xc3d: 0x10b1, 0xc3e: 0x10b1, 0xc3f: 0x2109, // Block 0x31, offset 0xc40 - 0xc40: 0x1f41, 0xc41: 0x00c9, 0xc42: 0x0069, 0xc43: 0x0079, 0xc44: 0x1f51, 0xc45: 0x1f61, - 0xc46: 0x1f71, 0xc47: 0x1f81, 0xc48: 0x1f91, 0xc49: 0x1fa1, 0xc4a: 0x1fb2, 0xc4b: 0x07d5, - 0xc4c: 0x1fc2, 0xc4d: 0x1fd2, 0xc4e: 0x1fe2, 0xc4f: 0x0040, 0xc50: 0x0039, 0xc51: 0x0f09, - 0xc52: 0x00d9, 0xc53: 0x0369, 0xc54: 0x0ff9, 0xc55: 0x0249, 0xc56: 0x0f51, 0xc57: 0x0359, - 0xc58: 0x0f61, 0xc59: 0x0f71, 0xc5a: 0x0f99, 0xc5b: 0x01d9, 0xc5c: 0x0fa9, 0xc5d: 0x0040, - 0xc5e: 0x0040, 0xc5f: 0x0040, 0xc60: 0x0018, 0xc61: 0x0018, 0xc62: 0x0018, 0xc63: 0x0018, - 0xc64: 0x0018, 0xc65: 0x0018, 0xc66: 0x0018, 0xc67: 0x0018, 0xc68: 0x1ff1, 0xc69: 0x0018, - 0xc6a: 0x0018, 0xc6b: 0x0018, 0xc6c: 0x0018, 0xc6d: 0x0018, 0xc6e: 0x0018, 0xc6f: 0x0018, - 0xc70: 0x0018, 0xc71: 0x0018, 0xc72: 0x0018, 0xc73: 0x0018, 0xc74: 0x0018, 0xc75: 0x0018, - 0xc76: 0x0018, 0xc77: 0x0018, 0xc78: 0x0018, 0xc79: 0x0018, 0xc7a: 0x0018, 0xc7b: 0x0018, - 0xc7c: 0x0018, 0xc7d: 0x0018, 0xc7e: 0x0018, 0xc7f: 0x0018, + 0xc40: 0x08ed, 0xc41: 0x0018, 0xc42: 0x0018, 0xc43: 0x0018, 0xc44: 0x0018, 0xc45: 0x0ef9, + 0xc46: 0x0ef9, 0xc47: 0x0f09, 0xc48: 0x0f41, 0xc49: 0x0259, 0xc4a: 0x0018, 0xc4b: 0x0018, + 0xc4c: 0x0018, 0xc4d: 0x0018, 0xc4e: 0x0008, 0xc4f: 0x0018, 0xc50: 0x2121, 0xc51: 0x2151, + 0xc52: 0x2181, 0xc53: 0x21b9, 0xc54: 0x21e9, 0xc55: 0x2219, 0xc56: 0x2249, 0xc57: 0x2279, + 0xc58: 0x22a9, 0xc59: 0x22d9, 0xc5a: 0x2309, 0xc5b: 0x2339, 0xc5c: 0x2369, 0xc5d: 0x2399, + 0xc5e: 0x23c9, 0xc5f: 0x23f9, 0xc60: 0x0f41, 0xc61: 0x2421, 0xc62: 0x0905, 0xc63: 0x2439, + 0xc64: 0x1089, 0xc65: 0x2451, 0xc66: 0x0925, 0xc67: 0x2469, 0xc68: 0x2491, 0xc69: 0x0369, + 0xc6a: 0x24a9, 0xc6b: 0x0945, 0xc6c: 0x0359, 0xc6d: 0x1159, 0xc6e: 0x0ef9, 0xc6f: 0x0f61, + 0xc70: 0x0f41, 0xc71: 0x2421, 0xc72: 0x0965, 0xc73: 0x2439, 0xc74: 0x1089, 0xc75: 0x2451, + 0xc76: 0x0985, 0xc77: 0x2469, 0xc78: 0x2491, 0xc79: 0x0369, 0xc7a: 0x24a9, 0xc7b: 0x09a5, + 0xc7c: 0x0359, 0xc7d: 0x1159, 0xc7e: 0x0ef9, 0xc7f: 0x0f61, // Block 0x32, offset 0xc80 - 0xc80: 0x07ee, 0xc81: 0x080e, 0xc82: 0x1159, 0xc83: 0x082d, 0xc84: 0x0018, 0xc85: 0x084e, - 0xc86: 0x086e, 0xc87: 0x1011, 0xc88: 0x0018, 0xc89: 0x088d, 0xc8a: 0x0f31, 0xc8b: 0x0249, - 0xc8c: 0x0249, 0xc8d: 0x0249, 0xc8e: 0x0249, 0xc8f: 0x2009, 0xc90: 0x0f41, 0xc91: 0x0f41, - 0xc92: 0x0359, 0xc93: 0x0359, 0xc94: 0x0018, 0xc95: 0x0f71, 0xc96: 0x2021, 0xc97: 0x0018, - 0xc98: 0x0018, 0xc99: 0x0f99, 0xc9a: 0x2039, 0xc9b: 0x0269, 0xc9c: 0x0269, 0xc9d: 0x0269, - 0xc9e: 0x0018, 0xc9f: 0x0018, 0xca0: 0x2049, 0xca1: 0x08ad, 0xca2: 0x2061, 0xca3: 0x0018, - 0xca4: 0x13d1, 0xca5: 0x0018, 0xca6: 0x2079, 0xca7: 0x0018, 0xca8: 0x13d1, 0xca9: 0x0018, - 0xcaa: 0x0f51, 0xcab: 0x2091, 0xcac: 0x0ee9, 0xcad: 0x1159, 0xcae: 0x0018, 0xcaf: 0x0f09, - 0xcb0: 0x0f09, 0xcb1: 0x1199, 0xcb2: 0x0040, 0xcb3: 0x0f61, 0xcb4: 0x00d9, 0xcb5: 0x20a9, - 0xcb6: 0x20c1, 0xcb7: 0x20d9, 0xcb8: 0x20f1, 0xcb9: 0x0f41, 0xcba: 0x0018, 0xcbb: 0x08cd, - 0xcbc: 0x2109, 0xcbd: 0x10b1, 0xcbe: 0x10b1, 0xcbf: 0x2109, + 0xc80: 0x0018, 0xc81: 0x0018, 0xc82: 0x0018, 0xc83: 0x0018, 0xc84: 0x0018, 0xc85: 0x0018, + 0xc86: 0x0018, 0xc87: 0x0018, 0xc88: 0x0018, 0xc89: 0x0018, 0xc8a: 0x0018, 0xc8b: 0x0040, + 0xc8c: 0x0040, 0xc8d: 0x0040, 0xc8e: 0x0040, 0xc8f: 0x0040, 0xc90: 0x0040, 0xc91: 0x0040, + 0xc92: 0x0040, 0xc93: 0x0040, 0xc94: 0x0040, 0xc95: 0x0040, 0xc96: 0x0040, 0xc97: 0x0040, + 0xc98: 0x0040, 0xc99: 0x0040, 0xc9a: 0x0040, 0xc9b: 0x0040, 0xc9c: 0x0040, 0xc9d: 0x0040, + 0xc9e: 0x0040, 0xc9f: 0x0040, 0xca0: 0x00c9, 0xca1: 0x0069, 0xca2: 0x0079, 0xca3: 0x1f51, + 0xca4: 0x1f61, 0xca5: 0x1f71, 0xca6: 0x1f81, 0xca7: 0x1f91, 0xca8: 0x1fa1, 0xca9: 0x2601, + 0xcaa: 0x2619, 0xcab: 0x2631, 0xcac: 0x2649, 0xcad: 0x2661, 0xcae: 0x2679, 0xcaf: 0x2691, + 0xcb0: 0x26a9, 0xcb1: 0x26c1, 0xcb2: 0x26d9, 0xcb3: 0x26f1, 0xcb4: 0x0a06, 0xcb5: 0x0a26, + 0xcb6: 0x0a46, 0xcb7: 0x0a66, 0xcb8: 0x0a86, 0xcb9: 0x0aa6, 0xcba: 0x0ac6, 0xcbb: 0x0ae6, + 0xcbc: 0x0b06, 0xcbd: 0x270a, 0xcbe: 0x2732, 0xcbf: 0x275a, // Block 0x33, offset 0xcc0 - 0xcc0: 0x08ed, 0xcc1: 0x0018, 0xcc2: 0x0018, 0xcc3: 0x0018, 0xcc4: 0x0018, 0xcc5: 0x0ef9, - 0xcc6: 0x0ef9, 0xcc7: 0x0f09, 0xcc8: 0x0f41, 0xcc9: 0x0259, 0xcca: 0x0018, 0xccb: 0x0018, - 0xccc: 0x0018, 0xccd: 0x0018, 0xcce: 0x0008, 0xccf: 0x0018, 0xcd0: 0x2121, 0xcd1: 0x2151, - 0xcd2: 0x2181, 0xcd3: 0x21b9, 0xcd4: 0x21e9, 0xcd5: 0x2219, 0xcd6: 0x2249, 0xcd7: 0x2279, - 0xcd8: 0x22a9, 0xcd9: 0x22d9, 0xcda: 0x2309, 0xcdb: 0x2339, 0xcdc: 0x2369, 0xcdd: 0x2399, - 0xcde: 0x23c9, 0xcdf: 0x23f9, 0xce0: 0x0f41, 0xce1: 0x2421, 0xce2: 0x0905, 0xce3: 0x2439, - 0xce4: 0x1089, 0xce5: 0x2451, 0xce6: 0x0925, 0xce7: 0x2469, 0xce8: 0x2491, 0xce9: 0x0369, - 0xcea: 0x24a9, 0xceb: 0x0945, 0xcec: 0x0359, 0xced: 0x1159, 0xcee: 0x0ef9, 0xcef: 0x0f61, - 0xcf0: 0x0f41, 0xcf1: 0x2421, 0xcf2: 0x0965, 0xcf3: 0x2439, 0xcf4: 0x1089, 0xcf5: 0x2451, - 0xcf6: 0x0985, 0xcf7: 0x2469, 0xcf8: 0x2491, 0xcf9: 0x0369, 0xcfa: 0x24a9, 0xcfb: 0x09a5, - 0xcfc: 0x0359, 0xcfd: 0x1159, 0xcfe: 0x0ef9, 0xcff: 0x0f61, + 0xcc0: 0x2782, 0xcc1: 0x27aa, 0xcc2: 0x27d2, 0xcc3: 0x27fa, 0xcc4: 0x2822, 0xcc5: 0x284a, + 0xcc6: 0x2872, 0xcc7: 0x289a, 0xcc8: 0x0040, 0xcc9: 0x0040, 0xcca: 0x0040, 0xccb: 0x0040, + 0xccc: 0x0040, 0xccd: 0x0040, 0xcce: 0x0040, 0xccf: 0x0040, 0xcd0: 0x0040, 0xcd1: 0x0040, + 0xcd2: 0x0040, 0xcd3: 0x0040, 0xcd4: 0x0040, 0xcd5: 0x0040, 0xcd6: 0x0040, 0xcd7: 0x0040, + 0xcd8: 0x0040, 0xcd9: 0x0040, 0xcda: 0x0040, 0xcdb: 0x0040, 0xcdc: 0x0b26, 0xcdd: 0x0b46, + 0xcde: 0x0b66, 0xcdf: 0x0b86, 0xce0: 0x0ba6, 0xce1: 0x0bc6, 0xce2: 0x0be6, 0xce3: 0x0c06, + 0xce4: 0x0c26, 0xce5: 0x0c46, 0xce6: 0x0c66, 0xce7: 0x0c86, 0xce8: 0x0ca6, 0xce9: 0x0cc6, + 0xcea: 0x0ce6, 0xceb: 0x0d06, 0xcec: 0x0d26, 0xced: 0x0d46, 0xcee: 0x0d66, 0xcef: 0x0d86, + 0xcf0: 0x0da6, 0xcf1: 0x0dc6, 0xcf2: 0x0de6, 0xcf3: 0x0e06, 0xcf4: 0x0e26, 0xcf5: 0x0e46, + 0xcf6: 0x0039, 0xcf7: 0x0ee9, 0xcf8: 0x1159, 0xcf9: 0x0ef9, 0xcfa: 0x0f09, 0xcfb: 0x1199, + 0xcfc: 0x0f31, 0xcfd: 0x0249, 0xcfe: 0x0f41, 0xcff: 0x0259, // Block 0x34, offset 0xd00 - 0xd00: 0x0018, 0xd01: 0x0018, 0xd02: 0x0018, 0xd03: 0x0018, 0xd04: 0x0018, 0xd05: 0x0018, - 0xd06: 0x0018, 0xd07: 0x0018, 0xd08: 0x0018, 0xd09: 0x0018, 0xd0a: 0x0018, 0xd0b: 0x0040, - 0xd0c: 0x0040, 0xd0d: 0x0040, 0xd0e: 0x0040, 0xd0f: 0x0040, 0xd10: 0x0040, 0xd11: 0x0040, - 0xd12: 0x0040, 0xd13: 0x0040, 0xd14: 0x0040, 0xd15: 0x0040, 0xd16: 0x0040, 0xd17: 0x0040, - 0xd18: 0x0040, 0xd19: 0x0040, 0xd1a: 0x0040, 0xd1b: 0x0040, 0xd1c: 0x0040, 0xd1d: 0x0040, - 0xd1e: 0x0040, 0xd1f: 0x0040, 0xd20: 0x00c9, 0xd21: 0x0069, 0xd22: 0x0079, 0xd23: 0x1f51, - 0xd24: 0x1f61, 0xd25: 0x1f71, 0xd26: 0x1f81, 0xd27: 0x1f91, 0xd28: 0x1fa1, 0xd29: 0x2601, - 0xd2a: 0x2619, 0xd2b: 0x2631, 0xd2c: 0x2649, 0xd2d: 0x2661, 0xd2e: 0x2679, 0xd2f: 0x2691, - 0xd30: 0x26a9, 0xd31: 0x26c1, 0xd32: 0x26d9, 0xd33: 0x26f1, 0xd34: 0x0a06, 0xd35: 0x0a26, - 0xd36: 0x0a46, 0xd37: 0x0a66, 0xd38: 0x0a86, 0xd39: 0x0aa6, 0xd3a: 0x0ac6, 0xd3b: 0x0ae6, - 0xd3c: 0x0b06, 0xd3d: 0x270a, 0xd3e: 0x2732, 0xd3f: 0x275a, + 0xd00: 0x0f51, 0xd01: 0x0359, 0xd02: 0x0f61, 0xd03: 0x0f71, 0xd04: 0x00d9, 0xd05: 0x0f99, + 0xd06: 0x2039, 0xd07: 0x0269, 0xd08: 0x01d9, 0xd09: 0x0fa9, 0xd0a: 0x0fb9, 0xd0b: 0x1089, + 0xd0c: 0x0279, 0xd0d: 0x0369, 0xd0e: 0x0289, 0xd0f: 0x13d1, 0xd10: 0x0039, 0xd11: 0x0ee9, + 0xd12: 0x1159, 0xd13: 0x0ef9, 0xd14: 0x0f09, 0xd15: 0x1199, 0xd16: 0x0f31, 0xd17: 0x0249, + 0xd18: 0x0f41, 0xd19: 0x0259, 0xd1a: 0x0f51, 0xd1b: 0x0359, 0xd1c: 0x0f61, 0xd1d: 0x0f71, + 0xd1e: 0x00d9, 0xd1f: 0x0f99, 0xd20: 0x2039, 0xd21: 0x0269, 0xd22: 0x01d9, 0xd23: 0x0fa9, + 0xd24: 0x0fb9, 0xd25: 0x1089, 0xd26: 0x0279, 0xd27: 0x0369, 0xd28: 0x0289, 0xd29: 0x13d1, + 0xd2a: 0x1f41, 0xd2b: 0x0018, 0xd2c: 0x0018, 0xd2d: 0x0018, 0xd2e: 0x0018, 0xd2f: 0x0018, + 0xd30: 0x0018, 0xd31: 0x0018, 0xd32: 0x0018, 0xd33: 0x0018, 0xd34: 0x0018, 0xd35: 0x0018, + 0xd36: 0x0018, 0xd37: 0x0018, 0xd38: 0x0018, 0xd39: 0x0018, 0xd3a: 0x0018, 0xd3b: 0x0018, + 0xd3c: 0x0018, 0xd3d: 0x0018, 0xd3e: 0x0018, 0xd3f: 0x0018, // Block 0x35, offset 0xd40 - 0xd40: 0x2782, 0xd41: 0x27aa, 0xd42: 0x27d2, 0xd43: 0x27fa, 0xd44: 0x2822, 0xd45: 0x284a, - 0xd46: 0x2872, 0xd47: 0x289a, 0xd48: 0x0040, 0xd49: 0x0040, 0xd4a: 0x0040, 0xd4b: 0x0040, - 0xd4c: 0x0040, 0xd4d: 0x0040, 0xd4e: 0x0040, 0xd4f: 0x0040, 0xd50: 0x0040, 0xd51: 0x0040, - 0xd52: 0x0040, 0xd53: 0x0040, 0xd54: 0x0040, 0xd55: 0x0040, 0xd56: 0x0040, 0xd57: 0x0040, - 0xd58: 0x0040, 0xd59: 0x0040, 0xd5a: 0x0040, 0xd5b: 0x0040, 0xd5c: 0x0b26, 0xd5d: 0x0b46, - 0xd5e: 0x0b66, 0xd5f: 0x0b86, 0xd60: 0x0ba6, 0xd61: 0x0bc6, 0xd62: 0x0be6, 0xd63: 0x0c06, - 0xd64: 0x0c26, 0xd65: 0x0c46, 0xd66: 0x0c66, 0xd67: 0x0c86, 0xd68: 0x0ca6, 0xd69: 0x0cc6, - 0xd6a: 0x0ce6, 0xd6b: 0x0d06, 0xd6c: 0x0d26, 0xd6d: 0x0d46, 0xd6e: 0x0d66, 0xd6f: 0x0d86, - 0xd70: 0x0da6, 0xd71: 0x0dc6, 0xd72: 0x0de6, 0xd73: 0x0e06, 0xd74: 0x0e26, 0xd75: 0x0e46, - 0xd76: 0x0039, 0xd77: 0x0ee9, 0xd78: 0x1159, 0xd79: 0x0ef9, 0xd7a: 0x0f09, 0xd7b: 0x1199, - 0xd7c: 0x0f31, 0xd7d: 0x0249, 0xd7e: 0x0f41, 0xd7f: 0x0259, + 0xd40: 0x0008, 0xd41: 0x0008, 0xd42: 0x0008, 0xd43: 0x0008, 0xd44: 0x0008, 0xd45: 0x0008, + 0xd46: 0x0008, 0xd47: 0x0008, 0xd48: 0x0008, 0xd49: 0x0008, 0xd4a: 0x0008, 0xd4b: 0x0008, + 0xd4c: 0x0008, 0xd4d: 0x0008, 0xd4e: 0x0008, 0xd4f: 0x0008, 0xd50: 0x0008, 0xd51: 0x0008, + 0xd52: 0x0008, 0xd53: 0x0008, 0xd54: 0x0008, 0xd55: 0x0008, 0xd56: 0x0008, 0xd57: 0x0008, + 0xd58: 0x0008, 0xd59: 0x0008, 0xd5a: 0x0008, 0xd5b: 0x0008, 0xd5c: 0x0008, 0xd5d: 0x0008, + 0xd5e: 0x0008, 0xd5f: 0x0040, 0xd60: 0xe00d, 0xd61: 0x0008, 0xd62: 0x2971, 0xd63: 0x0ebd, + 0xd64: 0x2989, 0xd65: 0x0008, 0xd66: 0x0008, 0xd67: 0xe07d, 0xd68: 0x0008, 0xd69: 0xe01d, + 0xd6a: 0x0008, 0xd6b: 0xe03d, 0xd6c: 0x0008, 0xd6d: 0x0fe1, 0xd6e: 0x1281, 0xd6f: 0x0fc9, + 0xd70: 0x1141, 0xd71: 0x0008, 0xd72: 0xe00d, 0xd73: 0x0008, 0xd74: 0x0008, 0xd75: 0xe01d, + 0xd76: 0x0008, 0xd77: 0x0008, 0xd78: 0x0008, 0xd79: 0x0008, 0xd7a: 0x0008, 0xd7b: 0x0008, + 0xd7c: 0x0259, 0xd7d: 0x1089, 0xd7e: 0x29a1, 0xd7f: 0x29b9, // Block 0x36, offset 0xd80 - 0xd80: 0x0f51, 0xd81: 0x0359, 0xd82: 0x0f61, 0xd83: 0x0f71, 0xd84: 0x00d9, 0xd85: 0x0f99, - 0xd86: 0x2039, 0xd87: 0x0269, 0xd88: 0x01d9, 0xd89: 0x0fa9, 0xd8a: 0x0fb9, 0xd8b: 0x1089, - 0xd8c: 0x0279, 0xd8d: 0x0369, 0xd8e: 0x0289, 0xd8f: 0x13d1, 0xd90: 0x0039, 0xd91: 0x0ee9, - 0xd92: 0x1159, 0xd93: 0x0ef9, 0xd94: 0x0f09, 0xd95: 0x1199, 0xd96: 0x0f31, 0xd97: 0x0249, - 0xd98: 0x0f41, 0xd99: 0x0259, 0xd9a: 0x0f51, 0xd9b: 0x0359, 0xd9c: 0x0f61, 0xd9d: 0x0f71, - 0xd9e: 0x00d9, 0xd9f: 0x0f99, 0xda0: 0x2039, 0xda1: 0x0269, 0xda2: 0x01d9, 0xda3: 0x0fa9, - 0xda4: 0x0fb9, 0xda5: 0x1089, 0xda6: 0x0279, 0xda7: 0x0369, 0xda8: 0x0289, 0xda9: 0x13d1, - 0xdaa: 0x1f41, 0xdab: 0x0018, 0xdac: 0x0018, 0xdad: 0x0018, 0xdae: 0x0018, 0xdaf: 0x0018, - 0xdb0: 0x0018, 0xdb1: 0x0018, 0xdb2: 0x0018, 0xdb3: 0x0018, 0xdb4: 0x0018, 0xdb5: 0x0018, - 0xdb6: 0x0018, 0xdb7: 0x0018, 0xdb8: 0x0018, 0xdb9: 0x0018, 0xdba: 0x0018, 0xdbb: 0x0018, + 0xd80: 0xe00d, 0xd81: 0x0008, 0xd82: 0xe00d, 0xd83: 0x0008, 0xd84: 0xe00d, 0xd85: 0x0008, + 0xd86: 0xe00d, 0xd87: 0x0008, 0xd88: 0xe00d, 0xd89: 0x0008, 0xd8a: 0xe00d, 0xd8b: 0x0008, + 0xd8c: 0xe00d, 0xd8d: 0x0008, 0xd8e: 0xe00d, 0xd8f: 0x0008, 0xd90: 0xe00d, 0xd91: 0x0008, + 0xd92: 0xe00d, 0xd93: 0x0008, 0xd94: 0xe00d, 0xd95: 0x0008, 0xd96: 0xe00d, 0xd97: 0x0008, + 0xd98: 0xe00d, 0xd99: 0x0008, 0xd9a: 0xe00d, 0xd9b: 0x0008, 0xd9c: 0xe00d, 0xd9d: 0x0008, + 0xd9e: 0xe00d, 0xd9f: 0x0008, 0xda0: 0xe00d, 0xda1: 0x0008, 0xda2: 0xe00d, 0xda3: 0x0008, + 0xda4: 0x0008, 0xda5: 0x0018, 0xda6: 0x0018, 0xda7: 0x0018, 0xda8: 0x0018, 0xda9: 0x0018, + 0xdaa: 0x0018, 0xdab: 0xe03d, 0xdac: 0x0008, 0xdad: 0xe01d, 0xdae: 0x0008, 0xdaf: 0x1308, + 0xdb0: 0x1308, 0xdb1: 0x1308, 0xdb2: 0xe00d, 0xdb3: 0x0008, 0xdb4: 0x0040, 0xdb5: 0x0040, + 0xdb6: 0x0040, 0xdb7: 0x0040, 0xdb8: 0x0040, 0xdb9: 0x0018, 0xdba: 0x0018, 0xdbb: 0x0018, 0xdbc: 0x0018, 0xdbd: 0x0018, 0xdbe: 0x0018, 0xdbf: 0x0018, // Block 0x37, offset 0xdc0 - 0xdc0: 0x0008, 0xdc1: 0x0008, 0xdc2: 0x0008, 0xdc3: 0x0008, 0xdc4: 0x0008, 0xdc5: 0x0008, - 0xdc6: 0x0008, 0xdc7: 0x0008, 0xdc8: 0x0008, 0xdc9: 0x0008, 0xdca: 0x0008, 0xdcb: 0x0008, - 0xdcc: 0x0008, 0xdcd: 0x0008, 0xdce: 0x0008, 0xdcf: 0x0008, 0xdd0: 0x0008, 0xdd1: 0x0008, - 0xdd2: 0x0008, 0xdd3: 0x0008, 0xdd4: 0x0008, 0xdd5: 0x0008, 0xdd6: 0x0008, 0xdd7: 0x0008, - 0xdd8: 0x0008, 0xdd9: 0x0008, 0xdda: 0x0008, 0xddb: 0x0008, 0xddc: 0x0008, 0xddd: 0x0008, - 0xdde: 0x0008, 0xddf: 0x0040, 0xde0: 0xe00d, 0xde1: 0x0008, 0xde2: 0x2971, 0xde3: 0x0ebd, - 0xde4: 0x2989, 0xde5: 0x0008, 0xde6: 0x0008, 0xde7: 0xe07d, 0xde8: 0x0008, 0xde9: 0xe01d, - 0xdea: 0x0008, 0xdeb: 0xe03d, 0xdec: 0x0008, 0xded: 0x0fe1, 0xdee: 0x1281, 0xdef: 0x0fc9, - 0xdf0: 0x1141, 0xdf1: 0x0008, 0xdf2: 0xe00d, 0xdf3: 0x0008, 0xdf4: 0x0008, 0xdf5: 0xe01d, - 0xdf6: 0x0008, 0xdf7: 0x0008, 0xdf8: 0x0008, 0xdf9: 0x0008, 0xdfa: 0x0008, 0xdfb: 0x0008, - 0xdfc: 0x0259, 0xdfd: 0x1089, 0xdfe: 0x29a1, 0xdff: 0x29b9, + 0xdc0: 0x26fd, 0xdc1: 0x271d, 0xdc2: 0x273d, 0xdc3: 0x275d, 0xdc4: 0x277d, 0xdc5: 0x279d, + 0xdc6: 0x27bd, 0xdc7: 0x27dd, 0xdc8: 0x27fd, 0xdc9: 0x281d, 0xdca: 0x283d, 0xdcb: 0x285d, + 0xdcc: 0x287d, 0xdcd: 0x289d, 0xdce: 0x28bd, 0xdcf: 0x28dd, 0xdd0: 0x28fd, 0xdd1: 0x291d, + 0xdd2: 0x293d, 0xdd3: 0x295d, 0xdd4: 0x297d, 0xdd5: 0x299d, 0xdd6: 0x0040, 0xdd7: 0x0040, + 0xdd8: 0x0040, 0xdd9: 0x0040, 0xdda: 0x0040, 0xddb: 0x0040, 0xddc: 0x0040, 0xddd: 0x0040, + 0xdde: 0x0040, 0xddf: 0x0040, 0xde0: 0x0040, 0xde1: 0x0040, 0xde2: 0x0040, 0xde3: 0x0040, + 0xde4: 0x0040, 0xde5: 0x0040, 0xde6: 0x0040, 0xde7: 0x0040, 0xde8: 0x0040, 0xde9: 0x0040, + 0xdea: 0x0040, 0xdeb: 0x0040, 0xdec: 0x0040, 0xded: 0x0040, 0xdee: 0x0040, 0xdef: 0x0040, + 0xdf0: 0x0040, 0xdf1: 0x0040, 0xdf2: 0x0040, 0xdf3: 0x0040, 0xdf4: 0x0040, 0xdf5: 0x0040, + 0xdf6: 0x0040, 0xdf7: 0x0040, 0xdf8: 0x0040, 0xdf9: 0x0040, 0xdfa: 0x0040, 0xdfb: 0x0040, + 0xdfc: 0x0040, 0xdfd: 0x0040, 0xdfe: 0x0040, 0xdff: 0x0040, // Block 0x38, offset 0xe00 - 0xe00: 0xe00d, 0xe01: 0x0008, 0xe02: 0xe00d, 0xe03: 0x0008, 0xe04: 0xe00d, 0xe05: 0x0008, - 0xe06: 0xe00d, 0xe07: 0x0008, 0xe08: 0xe00d, 0xe09: 0x0008, 0xe0a: 0xe00d, 0xe0b: 0x0008, - 0xe0c: 0xe00d, 0xe0d: 0x0008, 0xe0e: 0xe00d, 0xe0f: 0x0008, 0xe10: 0xe00d, 0xe11: 0x0008, - 0xe12: 0xe00d, 0xe13: 0x0008, 0xe14: 0xe00d, 0xe15: 0x0008, 0xe16: 0xe00d, 0xe17: 0x0008, - 0xe18: 0xe00d, 0xe19: 0x0008, 0xe1a: 0xe00d, 0xe1b: 0x0008, 0xe1c: 0xe00d, 0xe1d: 0x0008, - 0xe1e: 0xe00d, 0xe1f: 0x0008, 0xe20: 0xe00d, 0xe21: 0x0008, 0xe22: 0xe00d, 0xe23: 0x0008, - 0xe24: 0x0008, 0xe25: 0x0018, 0xe26: 0x0018, 0xe27: 0x0018, 0xe28: 0x0018, 0xe29: 0x0018, - 0xe2a: 0x0018, 0xe2b: 0xe03d, 0xe2c: 0x0008, 0xe2d: 0xe01d, 0xe2e: 0x0008, 0xe2f: 0x3308, - 0xe30: 0x3308, 0xe31: 0x3308, 0xe32: 0xe00d, 0xe33: 0x0008, 0xe34: 0x0040, 0xe35: 0x0040, - 0xe36: 0x0040, 0xe37: 0x0040, 0xe38: 0x0040, 0xe39: 0x0018, 0xe3a: 0x0018, 0xe3b: 0x0018, - 0xe3c: 0x0018, 0xe3d: 0x0018, 0xe3e: 0x0018, 0xe3f: 0x0018, + 0xe00: 0x000a, 0xe01: 0x0018, 0xe02: 0x29d1, 0xe03: 0x0018, 0xe04: 0x0018, 0xe05: 0x0008, + 0xe06: 0x0008, 0xe07: 0x0008, 0xe08: 0x0018, 0xe09: 0x0018, 0xe0a: 0x0018, 0xe0b: 0x0018, + 0xe0c: 0x0018, 0xe0d: 0x0018, 0xe0e: 0x0018, 0xe0f: 0x0018, 0xe10: 0x0018, 0xe11: 0x0018, + 0xe12: 0x0018, 0xe13: 0x0018, 0xe14: 0x0018, 0xe15: 0x0018, 0xe16: 0x0018, 0xe17: 0x0018, + 0xe18: 0x0018, 0xe19: 0x0018, 0xe1a: 0x0018, 0xe1b: 0x0018, 0xe1c: 0x0018, 0xe1d: 0x0018, + 0xe1e: 0x0018, 0xe1f: 0x0018, 0xe20: 0x0018, 0xe21: 0x0018, 0xe22: 0x0018, 0xe23: 0x0018, + 0xe24: 0x0018, 0xe25: 0x0018, 0xe26: 0x0018, 0xe27: 0x0018, 0xe28: 0x0018, 0xe29: 0x0018, + 0xe2a: 0x1308, 0xe2b: 0x1308, 0xe2c: 0x1308, 0xe2d: 0x1308, 0xe2e: 0x1018, 0xe2f: 0x1018, + 0xe30: 0x0018, 0xe31: 0x0018, 0xe32: 0x0018, 0xe33: 0x0018, 0xe34: 0x0018, 0xe35: 0x0018, + 0xe36: 0xe125, 0xe37: 0x0018, 0xe38: 0x29bd, 0xe39: 0x29dd, 0xe3a: 0x29fd, 0xe3b: 0x0018, + 0xe3c: 0x0008, 0xe3d: 0x0018, 0xe3e: 0x0018, 0xe3f: 0x0018, // Block 0x39, offset 0xe40 - 0xe40: 0x26fd, 0xe41: 0x271d, 0xe42: 0x273d, 0xe43: 0x275d, 0xe44: 0x277d, 0xe45: 0x279d, - 0xe46: 0x27bd, 0xe47: 0x27dd, 0xe48: 0x27fd, 0xe49: 0x281d, 0xe4a: 0x283d, 0xe4b: 0x285d, - 0xe4c: 0x287d, 0xe4d: 0x289d, 0xe4e: 0x28bd, 0xe4f: 0x28dd, 0xe50: 0x28fd, 0xe51: 0x291d, - 0xe52: 0x293d, 0xe53: 0x295d, 0xe54: 0x297d, 0xe55: 0x299d, 0xe56: 0x0040, 0xe57: 0x0040, - 0xe58: 0x0040, 0xe59: 0x0040, 0xe5a: 0x0040, 0xe5b: 0x0040, 0xe5c: 0x0040, 0xe5d: 0x0040, - 0xe5e: 0x0040, 0xe5f: 0x0040, 0xe60: 0x0040, 0xe61: 0x0040, 0xe62: 0x0040, 0xe63: 0x0040, - 0xe64: 0x0040, 0xe65: 0x0040, 0xe66: 0x0040, 0xe67: 0x0040, 0xe68: 0x0040, 0xe69: 0x0040, - 0xe6a: 0x0040, 0xe6b: 0x0040, 0xe6c: 0x0040, 0xe6d: 0x0040, 0xe6e: 0x0040, 0xe6f: 0x0040, - 0xe70: 0x0040, 0xe71: 0x0040, 0xe72: 0x0040, 0xe73: 0x0040, 0xe74: 0x0040, 0xe75: 0x0040, - 0xe76: 0x0040, 0xe77: 0x0040, 0xe78: 0x0040, 0xe79: 0x0040, 0xe7a: 0x0040, 0xe7b: 0x0040, - 0xe7c: 0x0040, 0xe7d: 0x0040, 0xe7e: 0x0040, 0xe7f: 0x0040, + 0xe40: 0x2b3d, 0xe41: 0x2b5d, 0xe42: 0x2b7d, 0xe43: 0x2b9d, 0xe44: 0x2bbd, 0xe45: 0x2bdd, + 0xe46: 0x2bdd, 0xe47: 0x2bdd, 0xe48: 0x2bfd, 0xe49: 0x2bfd, 0xe4a: 0x2bfd, 0xe4b: 0x2bfd, + 0xe4c: 0x2c1d, 0xe4d: 0x2c1d, 0xe4e: 0x2c1d, 0xe4f: 0x2c3d, 0xe50: 0x2c5d, 0xe51: 0x2c5d, + 0xe52: 0x2a7d, 0xe53: 0x2a7d, 0xe54: 0x2c5d, 0xe55: 0x2c5d, 0xe56: 0x2c7d, 0xe57: 0x2c7d, + 0xe58: 0x2c5d, 0xe59: 0x2c5d, 0xe5a: 0x2a7d, 0xe5b: 0x2a7d, 0xe5c: 0x2c5d, 0xe5d: 0x2c5d, + 0xe5e: 0x2c3d, 0xe5f: 0x2c3d, 0xe60: 0x2c9d, 0xe61: 0x2c9d, 0xe62: 0x2cbd, 0xe63: 0x2cbd, + 0xe64: 0x0040, 0xe65: 0x2cdd, 0xe66: 0x2cfd, 0xe67: 0x2d1d, 0xe68: 0x2d1d, 0xe69: 0x2d3d, + 0xe6a: 0x2d5d, 0xe6b: 0x2d7d, 0xe6c: 0x2d9d, 0xe6d: 0x2dbd, 0xe6e: 0x2ddd, 0xe6f: 0x2dfd, + 0xe70: 0x2e1d, 0xe71: 0x2e3d, 0xe72: 0x2e3d, 0xe73: 0x2e5d, 0xe74: 0x2e7d, 0xe75: 0x2e7d, + 0xe76: 0x2e9d, 0xe77: 0x2ebd, 0xe78: 0x2e5d, 0xe79: 0x2edd, 0xe7a: 0x2efd, 0xe7b: 0x2edd, + 0xe7c: 0x2e5d, 0xe7d: 0x2f1d, 0xe7e: 0x2f3d, 0xe7f: 0x2f5d, // Block 0x3a, offset 0xe80 - 0xe80: 0x000a, 0xe81: 0x0018, 0xe82: 0x29d1, 0xe83: 0x0018, 0xe84: 0x0018, 0xe85: 0x0008, - 0xe86: 0x0008, 0xe87: 0x0008, 0xe88: 0x0018, 0xe89: 0x0018, 0xe8a: 0x0018, 0xe8b: 0x0018, - 0xe8c: 0x0018, 0xe8d: 0x0018, 0xe8e: 0x0018, 0xe8f: 0x0018, 0xe90: 0x0018, 0xe91: 0x0018, - 0xe92: 0x0018, 0xe93: 0x0018, 0xe94: 0x0018, 0xe95: 0x0018, 0xe96: 0x0018, 0xe97: 0x0018, - 0xe98: 0x0018, 0xe99: 0x0018, 0xe9a: 0x0018, 0xe9b: 0x0018, 0xe9c: 0x0018, 0xe9d: 0x0018, - 0xe9e: 0x0018, 0xe9f: 0x0018, 0xea0: 0x0018, 0xea1: 0x0018, 0xea2: 0x0018, 0xea3: 0x0018, - 0xea4: 0x0018, 0xea5: 0x0018, 0xea6: 0x0018, 0xea7: 0x0018, 0xea8: 0x0018, 0xea9: 0x0018, - 0xeaa: 0x3308, 0xeab: 0x3308, 0xeac: 0x3308, 0xead: 0x3308, 0xeae: 0x3018, 0xeaf: 0x3018, - 0xeb0: 0x0018, 0xeb1: 0x0018, 0xeb2: 0x0018, 0xeb3: 0x0018, 0xeb4: 0x0018, 0xeb5: 0x0018, - 0xeb6: 0xe125, 0xeb7: 0x0018, 0xeb8: 0x29bd, 0xeb9: 0x29dd, 0xeba: 0x29fd, 0xebb: 0x0018, - 0xebc: 0x0008, 0xebd: 0x0018, 0xebe: 0x0018, 0xebf: 0x0018, + 0xe80: 0x2f7d, 0xe81: 0x2f9d, 0xe82: 0x2cfd, 0xe83: 0x2cdd, 0xe84: 0x2fbd, 0xe85: 0x2fdd, + 0xe86: 0x2ffd, 0xe87: 0x301d, 0xe88: 0x303d, 0xe89: 0x305d, 0xe8a: 0x307d, 0xe8b: 0x309d, + 0xe8c: 0x30bd, 0xe8d: 0x30dd, 0xe8e: 0x30fd, 0xe8f: 0x0040, 0xe90: 0x0018, 0xe91: 0x0018, + 0xe92: 0x311d, 0xe93: 0x313d, 0xe94: 0x315d, 0xe95: 0x317d, 0xe96: 0x319d, 0xe97: 0x31bd, + 0xe98: 0x31dd, 0xe99: 0x31fd, 0xe9a: 0x321d, 0xe9b: 0x323d, 0xe9c: 0x315d, 0xe9d: 0x325d, + 0xe9e: 0x327d, 0xe9f: 0x329d, 0xea0: 0x0008, 0xea1: 0x0008, 0xea2: 0x0008, 0xea3: 0x0008, + 0xea4: 0x0008, 0xea5: 0x0008, 0xea6: 0x0008, 0xea7: 0x0008, 0xea8: 0x0008, 0xea9: 0x0008, + 0xeaa: 0x0008, 0xeab: 0x0008, 0xeac: 0x0008, 0xead: 0x0008, 0xeae: 0x0008, 0xeaf: 0x0008, + 0xeb0: 0x0008, 0xeb1: 0x0008, 0xeb2: 0x0008, 0xeb3: 0x0008, 0xeb4: 0x0008, 0xeb5: 0x0008, + 0xeb6: 0x0008, 0xeb7: 0x0008, 0xeb8: 0x0008, 0xeb9: 0x0008, 0xeba: 0x0008, 0xebb: 0x0040, + 0xebc: 0x0040, 0xebd: 0x0040, 0xebe: 0x0040, 0xebf: 0x0040, // Block 0x3b, offset 0xec0 - 0xec0: 0x2b3d, 0xec1: 0x2b5d, 0xec2: 0x2b7d, 0xec3: 0x2b9d, 0xec4: 0x2bbd, 0xec5: 0x2bdd, - 0xec6: 0x2bdd, 0xec7: 0x2bdd, 0xec8: 0x2bfd, 0xec9: 0x2bfd, 0xeca: 0x2bfd, 0xecb: 0x2bfd, - 0xecc: 0x2c1d, 0xecd: 0x2c1d, 0xece: 0x2c1d, 0xecf: 0x2c3d, 0xed0: 0x2c5d, 0xed1: 0x2c5d, - 0xed2: 0x2a7d, 0xed3: 0x2a7d, 0xed4: 0x2c5d, 0xed5: 0x2c5d, 0xed6: 0x2c7d, 0xed7: 0x2c7d, - 0xed8: 0x2c5d, 0xed9: 0x2c5d, 0xeda: 0x2a7d, 0xedb: 0x2a7d, 0xedc: 0x2c5d, 0xedd: 0x2c5d, - 0xede: 0x2c3d, 0xedf: 0x2c3d, 0xee0: 0x2c9d, 0xee1: 0x2c9d, 0xee2: 0x2cbd, 0xee3: 0x2cbd, - 0xee4: 0x0040, 0xee5: 0x2cdd, 0xee6: 0x2cfd, 0xee7: 0x2d1d, 0xee8: 0x2d1d, 0xee9: 0x2d3d, - 0xeea: 0x2d5d, 0xeeb: 0x2d7d, 0xeec: 0x2d9d, 0xeed: 0x2dbd, 0xeee: 0x2ddd, 0xeef: 0x2dfd, - 0xef0: 0x2e1d, 0xef1: 0x2e3d, 0xef2: 0x2e3d, 0xef3: 0x2e5d, 0xef4: 0x2e7d, 0xef5: 0x2e7d, - 0xef6: 0x2e9d, 0xef7: 0x2ebd, 0xef8: 0x2e5d, 0xef9: 0x2edd, 0xefa: 0x2efd, 0xefb: 0x2edd, - 0xefc: 0x2e5d, 0xefd: 0x2f1d, 0xefe: 0x2f3d, 0xeff: 0x2f5d, + 0xec0: 0x36a2, 0xec1: 0x36d2, 0xec2: 0x3702, 0xec3: 0x3732, 0xec4: 0x32bd, 0xec5: 0x32dd, + 0xec6: 0x32fd, 0xec7: 0x331d, 0xec8: 0x0018, 0xec9: 0x0018, 0xeca: 0x0018, 0xecb: 0x0018, + 0xecc: 0x0018, 0xecd: 0x0018, 0xece: 0x0018, 0xecf: 0x0018, 0xed0: 0x333d, 0xed1: 0x3761, + 0xed2: 0x3779, 0xed3: 0x3791, 0xed4: 0x37a9, 0xed5: 0x37c1, 0xed6: 0x37d9, 0xed7: 0x37f1, + 0xed8: 0x3809, 0xed9: 0x3821, 0xeda: 0x3839, 0xedb: 0x3851, 0xedc: 0x3869, 0xedd: 0x3881, + 0xede: 0x3899, 0xedf: 0x38b1, 0xee0: 0x335d, 0xee1: 0x337d, 0xee2: 0x339d, 0xee3: 0x33bd, + 0xee4: 0x33dd, 0xee5: 0x33dd, 0xee6: 0x33fd, 0xee7: 0x341d, 0xee8: 0x343d, 0xee9: 0x345d, + 0xeea: 0x347d, 0xeeb: 0x349d, 0xeec: 0x34bd, 0xeed: 0x34dd, 0xeee: 0x34fd, 0xeef: 0x351d, + 0xef0: 0x353d, 0xef1: 0x355d, 0xef2: 0x357d, 0xef3: 0x359d, 0xef4: 0x35bd, 0xef5: 0x35dd, + 0xef6: 0x35fd, 0xef7: 0x361d, 0xef8: 0x363d, 0xef9: 0x365d, 0xefa: 0x367d, 0xefb: 0x369d, + 0xefc: 0x38c9, 0xefd: 0x3901, 0xefe: 0x36bd, 0xeff: 0x0018, // Block 0x3c, offset 0xf00 - 0xf00: 0x2f7d, 0xf01: 0x2f9d, 0xf02: 0x2cfd, 0xf03: 0x2cdd, 0xf04: 0x2fbd, 0xf05: 0x2fdd, - 0xf06: 0x2ffd, 0xf07: 0x301d, 0xf08: 0x303d, 0xf09: 0x305d, 0xf0a: 0x307d, 0xf0b: 0x309d, - 0xf0c: 0x30bd, 0xf0d: 0x30dd, 0xf0e: 0x30fd, 0xf0f: 0x0040, 0xf10: 0x0018, 0xf11: 0x0018, - 0xf12: 0x311d, 0xf13: 0x313d, 0xf14: 0x315d, 0xf15: 0x317d, 0xf16: 0x319d, 0xf17: 0x31bd, - 0xf18: 0x31dd, 0xf19: 0x31fd, 0xf1a: 0x321d, 0xf1b: 0x323d, 0xf1c: 0x315d, 0xf1d: 0x325d, - 0xf1e: 0x327d, 0xf1f: 0x329d, 0xf20: 0x0008, 0xf21: 0x0008, 0xf22: 0x0008, 0xf23: 0x0008, - 0xf24: 0x0008, 0xf25: 0x0008, 0xf26: 0x0008, 0xf27: 0x0008, 0xf28: 0x0008, 0xf29: 0x0008, - 0xf2a: 0x0008, 0xf2b: 0x0008, 0xf2c: 0x0008, 0xf2d: 0x0008, 0xf2e: 0x0008, 0xf2f: 0x0008, - 0xf30: 0x0008, 0xf31: 0x0008, 0xf32: 0x0008, 0xf33: 0x0008, 0xf34: 0x0008, 0xf35: 0x0008, - 0xf36: 0x0008, 0xf37: 0x0008, 0xf38: 0x0008, 0xf39: 0x0008, 0xf3a: 0x0008, 0xf3b: 0x0040, - 0xf3c: 0x0040, 0xf3d: 0x0040, 0xf3e: 0x0040, 0xf3f: 0x0040, + 0xf00: 0x36dd, 0xf01: 0x36fd, 0xf02: 0x371d, 0xf03: 0x373d, 0xf04: 0x375d, 0xf05: 0x377d, + 0xf06: 0x379d, 0xf07: 0x37bd, 0xf08: 0x37dd, 0xf09: 0x37fd, 0xf0a: 0x381d, 0xf0b: 0x383d, + 0xf0c: 0x385d, 0xf0d: 0x387d, 0xf0e: 0x389d, 0xf0f: 0x38bd, 0xf10: 0x38dd, 0xf11: 0x38fd, + 0xf12: 0x391d, 0xf13: 0x393d, 0xf14: 0x395d, 0xf15: 0x397d, 0xf16: 0x399d, 0xf17: 0x39bd, + 0xf18: 0x39dd, 0xf19: 0x39fd, 0xf1a: 0x3a1d, 0xf1b: 0x3a3d, 0xf1c: 0x3a5d, 0xf1d: 0x3a7d, + 0xf1e: 0x3a9d, 0xf1f: 0x3abd, 0xf20: 0x3add, 0xf21: 0x3afd, 0xf22: 0x3b1d, 0xf23: 0x3b3d, + 0xf24: 0x3b5d, 0xf25: 0x3b7d, 0xf26: 0x127d, 0xf27: 0x3b9d, 0xf28: 0x3bbd, 0xf29: 0x3bdd, + 0xf2a: 0x3bfd, 0xf2b: 0x3c1d, 0xf2c: 0x3c3d, 0xf2d: 0x3c5d, 0xf2e: 0x239d, 0xf2f: 0x3c7d, + 0xf30: 0x3c9d, 0xf31: 0x3939, 0xf32: 0x3951, 0xf33: 0x3969, 0xf34: 0x3981, 0xf35: 0x3999, + 0xf36: 0x39b1, 0xf37: 0x39c9, 0xf38: 0x39e1, 0xf39: 0x39f9, 0xf3a: 0x3a11, 0xf3b: 0x3a29, + 0xf3c: 0x3a41, 0xf3d: 0x3a59, 0xf3e: 0x3a71, 0xf3f: 0x3a89, // Block 0x3d, offset 0xf40 - 0xf40: 0x36a2, 0xf41: 0x36d2, 0xf42: 0x3702, 0xf43: 0x3732, 0xf44: 0x32bd, 0xf45: 0x32dd, - 0xf46: 0x32fd, 0xf47: 0x331d, 0xf48: 0x0018, 0xf49: 0x0018, 0xf4a: 0x0018, 0xf4b: 0x0018, - 0xf4c: 0x0018, 0xf4d: 0x0018, 0xf4e: 0x0018, 0xf4f: 0x0018, 0xf50: 0x333d, 0xf51: 0x3761, - 0xf52: 0x3779, 0xf53: 0x3791, 0xf54: 0x37a9, 0xf55: 0x37c1, 0xf56: 0x37d9, 0xf57: 0x37f1, - 0xf58: 0x3809, 0xf59: 0x3821, 0xf5a: 0x3839, 0xf5b: 0x3851, 0xf5c: 0x3869, 0xf5d: 0x3881, - 0xf5e: 0x3899, 0xf5f: 0x38b1, 0xf60: 0x335d, 0xf61: 0x337d, 0xf62: 0x339d, 0xf63: 0x33bd, - 0xf64: 0x33dd, 0xf65: 0x33dd, 0xf66: 0x33fd, 0xf67: 0x341d, 0xf68: 0x343d, 0xf69: 0x345d, - 0xf6a: 0x347d, 0xf6b: 0x349d, 0xf6c: 0x34bd, 0xf6d: 0x34dd, 0xf6e: 0x34fd, 0xf6f: 0x351d, - 0xf70: 0x353d, 0xf71: 0x355d, 0xf72: 0x357d, 0xf73: 0x359d, 0xf74: 0x35bd, 0xf75: 0x35dd, - 0xf76: 0x35fd, 0xf77: 0x361d, 0xf78: 0x363d, 0xf79: 0x365d, 0xf7a: 0x367d, 0xf7b: 0x369d, - 0xf7c: 0x38c9, 0xf7d: 0x3901, 0xf7e: 0x36bd, 0xf7f: 0x0018, + 0xf40: 0x3aa1, 0xf41: 0x3ac9, 0xf42: 0x3af1, 0xf43: 0x3b19, 0xf44: 0x3b41, 0xf45: 0x3b69, + 0xf46: 0x3b91, 0xf47: 0x3bb9, 0xf48: 0x3be1, 0xf49: 0x3c09, 0xf4a: 0x3c39, 0xf4b: 0x3c69, + 0xf4c: 0x3c99, 0xf4d: 0x3cbd, 0xf4e: 0x3cb1, 0xf4f: 0x3cdd, 0xf50: 0x3cfd, 0xf51: 0x3d15, + 0xf52: 0x3d2d, 0xf53: 0x3d45, 0xf54: 0x3d5d, 0xf55: 0x3d5d, 0xf56: 0x3d45, 0xf57: 0x3d75, + 0xf58: 0x07bd, 0xf59: 0x3d8d, 0xf5a: 0x3da5, 0xf5b: 0x3dbd, 0xf5c: 0x3dd5, 0xf5d: 0x3ded, + 0xf5e: 0x3e05, 0xf5f: 0x3e1d, 0xf60: 0x3e35, 0xf61: 0x3e4d, 0xf62: 0x3e65, 0xf63: 0x3e7d, + 0xf64: 0x3e95, 0xf65: 0x3e95, 0xf66: 0x3ead, 0xf67: 0x3ead, 0xf68: 0x3ec5, 0xf69: 0x3ec5, + 0xf6a: 0x3edd, 0xf6b: 0x3ef5, 0xf6c: 0x3f0d, 0xf6d: 0x3f25, 0xf6e: 0x3f3d, 0xf6f: 0x3f3d, + 0xf70: 0x3f55, 0xf71: 0x3f55, 0xf72: 0x3f55, 0xf73: 0x3f6d, 0xf74: 0x3f85, 0xf75: 0x3f9d, + 0xf76: 0x3fb5, 0xf77: 0x3f9d, 0xf78: 0x3fcd, 0xf79: 0x3fe5, 0xf7a: 0x3f6d, 0xf7b: 0x3ffd, + 0xf7c: 0x4015, 0xf7d: 0x4015, 0xf7e: 0x4015, 0xf7f: 0x0040, // Block 0x3e, offset 0xf80 - 0xf80: 0x36dd, 0xf81: 0x36fd, 0xf82: 0x371d, 0xf83: 0x373d, 0xf84: 0x375d, 0xf85: 0x377d, - 0xf86: 0x379d, 0xf87: 0x37bd, 0xf88: 0x37dd, 0xf89: 0x37fd, 0xf8a: 0x381d, 0xf8b: 0x383d, - 0xf8c: 0x385d, 0xf8d: 0x387d, 0xf8e: 0x389d, 0xf8f: 0x38bd, 0xf90: 0x38dd, 0xf91: 0x38fd, - 0xf92: 0x391d, 0xf93: 0x393d, 0xf94: 0x395d, 0xf95: 0x397d, 0xf96: 0x399d, 0xf97: 0x39bd, - 0xf98: 0x39dd, 0xf99: 0x39fd, 0xf9a: 0x3a1d, 0xf9b: 0x3a3d, 0xf9c: 0x3a5d, 0xf9d: 0x3a7d, - 0xf9e: 0x3a9d, 0xf9f: 0x3abd, 0xfa0: 0x3add, 0xfa1: 0x3afd, 0xfa2: 0x3b1d, 0xfa3: 0x3b3d, - 0xfa4: 0x3b5d, 0xfa5: 0x3b7d, 0xfa6: 0x127d, 0xfa7: 0x3b9d, 0xfa8: 0x3bbd, 0xfa9: 0x3bdd, - 0xfaa: 0x3bfd, 0xfab: 0x3c1d, 0xfac: 0x3c3d, 0xfad: 0x3c5d, 0xfae: 0x239d, 0xfaf: 0x3c7d, - 0xfb0: 0x3c9d, 0xfb1: 0x3939, 0xfb2: 0x3951, 0xfb3: 0x3969, 0xfb4: 0x3981, 0xfb5: 0x3999, - 0xfb6: 0x39b1, 0xfb7: 0x39c9, 0xfb8: 0x39e1, 0xfb9: 0x39f9, 0xfba: 0x3a11, 0xfbb: 0x3a29, - 0xfbc: 0x3a41, 0xfbd: 0x3a59, 0xfbe: 0x3a71, 0xfbf: 0x3a89, + 0xf80: 0x3cc9, 0xf81: 0x3d31, 0xf82: 0x3d99, 0xf83: 0x3e01, 0xf84: 0x3e51, 0xf85: 0x3eb9, + 0xf86: 0x3f09, 0xf87: 0x3f59, 0xf88: 0x3fd9, 0xf89: 0x4041, 0xf8a: 0x4091, 0xf8b: 0x40e1, + 0xf8c: 0x4131, 0xf8d: 0x4199, 0xf8e: 0x4201, 0xf8f: 0x4251, 0xf90: 0x42a1, 0xf91: 0x42d9, + 0xf92: 0x4329, 0xf93: 0x4391, 0xf94: 0x43f9, 0xf95: 0x4431, 0xf96: 0x44b1, 0xf97: 0x4549, + 0xf98: 0x45c9, 0xf99: 0x4619, 0xf9a: 0x4699, 0xf9b: 0x4719, 0xf9c: 0x4781, 0xf9d: 0x47d1, + 0xf9e: 0x4821, 0xf9f: 0x4871, 0xfa0: 0x48d9, 0xfa1: 0x4959, 0xfa2: 0x49c1, 0xfa3: 0x4a11, + 0xfa4: 0x4a61, 0xfa5: 0x4ab1, 0xfa6: 0x4ae9, 0xfa7: 0x4b21, 0xfa8: 0x4b59, 0xfa9: 0x4b91, + 0xfaa: 0x4be1, 0xfab: 0x4c31, 0xfac: 0x4cb1, 0xfad: 0x4d01, 0xfae: 0x4d69, 0xfaf: 0x4de9, + 0xfb0: 0x4e39, 0xfb1: 0x4e71, 0xfb2: 0x4ea9, 0xfb3: 0x4f29, 0xfb4: 0x4f91, 0xfb5: 0x5011, + 0xfb6: 0x5061, 0xfb7: 0x50e1, 0xfb8: 0x5119, 0xfb9: 0x5169, 0xfba: 0x51b9, 0xfbb: 0x5209, + 0xfbc: 0x5259, 0xfbd: 0x52a9, 0xfbe: 0x5311, 0xfbf: 0x5361, // Block 0x3f, offset 0xfc0 - 0xfc0: 0x3aa1, 0xfc1: 0x3ac9, 0xfc2: 0x3af1, 0xfc3: 0x3b19, 0xfc4: 0x3b41, 0xfc5: 0x3b69, - 0x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: 0x58d9, 0xfd0: 0x5929, 0xfd1: 0x5979, + 0xfd2: 0x59e1, 0xfd3: 0x5a19, 0xfd4: 0x5a69, 0xfd5: 0x5ad1, 0xfd6: 0x5b09, 0xfd7: 0x5b89, + 0xfd8: 0x5bd9, 0xfd9: 0x5c01, 0xfda: 0x5c29, 0xfdb: 0x5c51, 0xfdc: 0x5c79, 0xfdd: 0x5ca1, + 0xfde: 0x5cc9, 0xfdf: 0x5cf1, 0xfe0: 0x5d19, 0xfe1: 0x5d41, 0xfe2: 0x5d69, 0xfe3: 0x5d99, + 0xfe4: 0x5dc9, 0xfe5: 0x5df9, 0xfe6: 0x5e29, 0xfe7: 0x5e59, 0xfe8: 0x5e89, 0xfe9: 0x5eb9, + 0xfea: 0x5ee9, 0xfeb: 0x5f19, 0xfec: 0x5f49, 0xfed: 0x5f79, 0xfee: 0x5fa9, 0xfef: 0x5fd9, + 0xff0: 0x6009, 0xff1: 0x402d, 0xff2: 0x6039, 0xff3: 0x6051, 0xff4: 0x404d, 0xff5: 0x6069, + 0xff6: 0x6081, 0xff7: 0x6099, 0xff8: 0x406d, 0xff9: 0x406d, 0xffa: 0x60b1, 0xffb: 0x60c9, + 0xffc: 0x6101, 0xffd: 0x6139, 0xffe: 0x6171, 0xfff: 0x61a9, // Block 0x40, offset 0x1000 - 0x1000: 0x3cc9, 0x1001: 0x3d31, 0x1002: 0x3d99, 0x1003: 0x3e01, 0x1004: 0x3e51, 0x1005: 0x3eb9, - 0x1006: 0x3f09, 0x1007: 0x3f59, 0x1008: 0x3fd9, 0x1009: 0x4041, 0x100a: 0x4091, 0x100b: 0x40e1, - 0x100c: 0x4131, 0x100d: 0x4199, 0x100e: 0x4201, 0x100f: 0x4251, 0x1010: 0x42a1, 0x1011: 0x42d9, - 0x1012: 0x4329, 0x1013: 0x4391, 0x1014: 0x43f9, 0x1015: 0x4431, 0x1016: 0x44b1, 0x1017: 0x4549, - 0x1018: 0x45c9, 0x1019: 0x4619, 0x101a: 0x4699, 0x101b: 0x4719, 0x101c: 0x4781, 0x101d: 0x47d1, - 0x101e: 0x4821, 0x101f: 0x4871, 0x1020: 0x48d9, 0x1021: 0x4959, 0x1022: 0x49c1, 0x1023: 0x4a11, - 0x1024: 0x4a61, 0x1025: 0x4ab1, 0x1026: 0x4ae9, 0x1027: 0x4b21, 0x1028: 0x4b59, 0x1029: 0x4b91, - 0x102a: 0x4be1, 0x102b: 0x4c31, 0x102c: 0x4cb1, 0x102d: 0x4d01, 0x102e: 0x4d69, 0x102f: 0x4de9, - 0x1030: 0x4e39, 0x1031: 0x4e71, 0x1032: 0x4ea9, 0x1033: 0x4f29, 0x1034: 0x4f91, 0x1035: 0x5011, - 0x1036: 0x5061, 0x1037: 0x50e1, 0x1038: 0x5119, 0x1039: 0x5169, 0x103a: 0x51b9, 0x103b: 0x5209, - 0x103c: 0x5259, 0x103d: 0x52a9, 0x103e: 0x5311, 0x103f: 0x5361, + 0x1000: 0x6211, 0x1001: 0x6229, 0x1002: 0x408d, 0x1003: 0x6241, 0x1004: 0x6259, 0x1005: 0x6271, + 0x1006: 0x6289, 0x1007: 0x62a1, 0x1008: 0x40ad, 0x1009: 0x62b9, 0x100a: 0x62e1, 0x100b: 0x62f9, + 0x100c: 0x40cd, 0x100d: 0x40cd, 0x100e: 0x6311, 0x100f: 0x6329, 0x1010: 0x6341, 0x1011: 0x40ed, + 0x1012: 0x410d, 0x1013: 0x412d, 0x1014: 0x414d, 0x1015: 0x416d, 0x1016: 0x6359, 0x1017: 0x6371, + 0x1018: 0x6389, 0x1019: 0x63a1, 0x101a: 0x63b9, 0x101b: 0x418d, 0x101c: 0x63d1, 0x101d: 0x63e9, + 0x101e: 0x6401, 0x101f: 0x41ad, 0x1020: 0x41cd, 0x1021: 0x6419, 0x1022: 0x41ed, 0x1023: 0x420d, + 0x1024: 0x422d, 0x1025: 0x6431, 0x1026: 0x424d, 0x1027: 0x6449, 0x1028: 0x6479, 0x1029: 0x6211, + 0x102a: 0x426d, 0x102b: 0x428d, 0x102c: 0x42ad, 0x102d: 0x42cd, 0x102e: 0x64b1, 0x102f: 0x64f1, + 0x1030: 0x6539, 0x1031: 0x6551, 0x1032: 0x42ed, 0x1033: 0x6569, 0x1034: 0x6581, 0x1035: 0x6599, + 0x1036: 0x430d, 0x1037: 0x65b1, 0x1038: 0x65c9, 0x1039: 0x65b1, 0x103a: 0x65e1, 0x103b: 0x65f9, + 0x103c: 0x432d, 0x103d: 0x6611, 0x103e: 0x6629, 0x103f: 0x6611, // Block 0x41, offset 0x1040 - 0x1040: 0x5399, 0x1041: 0x53e9, 0x1042: 0x5439, 0x1043: 0x5489, 0x1044: 0x54f1, 0x1045: 0x5541, - 0x1046: 0x5591, 0x1047: 0x55e1, 0x1048: 0x5661, 0x1049: 0x56c9, 0x104a: 0x5701, 0x104b: 0x5781, - 0x104c: 0x57b9, 0x104d: 0x5821, 0x104e: 0x5889, 0x104f: 0x58d9, 0x1050: 0x5929, 0x1051: 0x5979, - 0x1052: 0x59e1, 0x1053: 0x5a19, 0x1054: 0x5a69, 0x1055: 0x5ad1, 0x1056: 0x5b09, 0x1057: 0x5b89, - 0x1058: 0x5bd9, 0x1059: 0x5c01, 0x105a: 0x5c29, 0x105b: 0x5c51, 0x105c: 0x5c79, 0x105d: 0x5ca1, - 0x105e: 0x5cc9, 0x105f: 0x5cf1, 0x1060: 0x5d19, 0x1061: 0x5d41, 0x1062: 0x5d69, 0x1063: 0x5d99, - 0x1064: 0x5dc9, 0x1065: 0x5df9, 0x1066: 0x5e29, 0x1067: 0x5e59, 0x1068: 0x5e89, 0x1069: 0x5eb9, - 0x106a: 0x5ee9, 0x106b: 0x5f19, 0x106c: 0x5f49, 0x106d: 0x5f79, 0x106e: 0x5fa9, 0x106f: 0x5fd9, - 0x1070: 0x6009, 0x1071: 0x402d, 0x1072: 0x6039, 0x1073: 0x6051, 0x1074: 0x404d, 0x1075: 0x6069, - 0x1076: 0x6081, 0x1077: 0x6099, 0x1078: 0x406d, 0x1079: 0x406d, 0x107a: 0x60b1, 0x107b: 0x60c9, - 0x107c: 0x6101, 0x107d: 0x6139, 0x107e: 0x6171, 0x107f: 0x61a9, + 0x1040: 0x434d, 0x1041: 0x436d, 0x1042: 0x0040, 0x1043: 0x6641, 0x1044: 0x6659, 0x1045: 0x6671, + 0x1046: 0x6689, 0x1047: 0x0040, 0x1048: 0x66c1, 0x1049: 0x66d9, 0x104a: 0x66f1, 0x104b: 0x6709, + 0x104c: 0x6721, 0x104d: 0x6739, 0x104e: 0x6401, 0x104f: 0x6751, 0x1050: 0x6769, 0x1051: 0x6781, + 0x1052: 0x438d, 0x1053: 0x6799, 0x1054: 0x6289, 0x1055: 0x43ad, 0x1056: 0x43cd, 0x1057: 0x67b1, + 0x1058: 0x0040, 0x1059: 0x43ed, 0x105a: 0x67c9, 0x105b: 0x67e1, 0x105c: 0x67f9, 0x105d: 0x6811, + 0x105e: 0x6829, 0x105f: 0x6859, 0x1060: 0x6889, 0x1061: 0x68b1, 0x1062: 0x68d9, 0x1063: 0x6901, + 0x1064: 0x6929, 0x1065: 0x6951, 0x1066: 0x6979, 0x1067: 0x69a1, 0x1068: 0x69c9, 0x1069: 0x69f1, + 0x106a: 0x6a21, 0x106b: 0x6a51, 0x106c: 0x6a81, 0x106d: 0x6ab1, 0x106e: 0x6ae1, 0x106f: 0x6b11, + 0x1070: 0x6b41, 0x1071: 0x6b71, 0x1072: 0x6ba1, 0x1073: 0x6bd1, 0x1074: 0x6c01, 0x1075: 0x6c31, + 0x1076: 0x6c61, 0x1077: 0x6c91, 0x1078: 0x6cc1, 0x1079: 0x6cf1, 0x107a: 0x6d21, 0x107b: 0x6d51, + 0x107c: 0x6d81, 0x107d: 0x6db1, 0x107e: 0x6de1, 0x107f: 0x440d, // Block 0x42, offset 0x1080 - 0x1080: 0x6211, 0x1081: 0x6229, 0x1082: 0x408d, 0x1083: 0x6241, 0x1084: 0x6259, 0x1085: 0x6271, - 0x1086: 0x6289, 0x1087: 0x62a1, 0x1088: 0x40ad, 0x1089: 0x62b9, 0x108a: 0x62e1, 0x108b: 0x62f9, - 0x108c: 0x40cd, 0x108d: 0x40cd, 0x108e: 0x6311, 0x108f: 0x6329, 0x1090: 0x6341, 0x1091: 0x40ed, - 0x1092: 0x410d, 0x1093: 0x412d, 0x1094: 0x414d, 0x1095: 0x416d, 0x1096: 0x6359, 0x1097: 0x6371, - 0x1098: 0x6389, 0x1099: 0x63a1, 0x109a: 0x63b9, 0x109b: 0x418d, 0x109c: 0x63d1, 0x109d: 0x63e9, - 0x109e: 0x6401, 0x109f: 0x41ad, 0x10a0: 0x41cd, 0x10a1: 0x6419, 0x10a2: 0x41ed, 0x10a3: 0x420d, - 0x10a4: 0x422d, 0x10a5: 0x6431, 0x10a6: 0x424d, 0x10a7: 0x6449, 0x10a8: 0x6479, 0x10a9: 0x6211, - 0x10aa: 0x426d, 0x10ab: 0x428d, 0x10ac: 0x42ad, 0x10ad: 0x42cd, 0x10ae: 0x64b1, 0x10af: 0x64f1, - 0x10b0: 0x6539, 0x10b1: 0x6551, 0x10b2: 0x42ed, 0x10b3: 0x6569, 0x10b4: 0x6581, 0x10b5: 0x6599, - 0x10b6: 0x430d, 0x10b7: 0x65b1, 0x10b8: 0x65c9, 0x10b9: 0x65b1, 0x10ba: 0x65e1, 0x10bb: 0x65f9, - 0x10bc: 0x432d, 0x10bd: 0x6611, 0x10be: 0x6629, 0x10bf: 0x6611, + 0x1080: 0xe00d, 0x1081: 0x0008, 0x1082: 0xe00d, 0x1083: 0x0008, 0x1084: 0xe00d, 0x1085: 0x0008, + 0x1086: 0xe00d, 0x1087: 0x0008, 0x1088: 0xe00d, 0x1089: 0x0008, 0x108a: 0xe00d, 0x108b: 0x0008, + 0x108c: 0xe00d, 0x108d: 0x0008, 0x108e: 0xe00d, 0x108f: 0x0008, 0x1090: 0xe00d, 0x1091: 0x0008, + 0x1092: 0xe00d, 0x1093: 0x0008, 0x1094: 0xe00d, 0x1095: 0x0008, 0x1096: 0xe00d, 0x1097: 0x0008, + 0x1098: 0xe00d, 0x1099: 0x0008, 0x109a: 0xe00d, 0x109b: 0x0008, 0x109c: 0xe00d, 0x109d: 0x0008, + 0x109e: 0xe00d, 0x109f: 0x0008, 0x10a0: 0xe00d, 0x10a1: 0x0008, 0x10a2: 0xe00d, 0x10a3: 0x0008, + 0x10a4: 0xe00d, 0x10a5: 0x0008, 0x10a6: 0xe00d, 0x10a7: 0x0008, 0x10a8: 0xe00d, 0x10a9: 0x0008, + 0x10aa: 0xe00d, 0x10ab: 0x0008, 0x10ac: 0xe00d, 0x10ad: 0x0008, 0x10ae: 0x0008, 0x10af: 0x1308, + 0x10b0: 0x1318, 0x10b1: 0x1318, 0x10b2: 0x1318, 0x10b3: 0x0018, 0x10b4: 0x1308, 0x10b5: 0x1308, + 0x10b6: 0x1308, 0x10b7: 0x1308, 0x10b8: 0x1308, 0x10b9: 0x1308, 0x10ba: 0x1308, 0x10bb: 0x1308, + 0x10bc: 0x1308, 0x10bd: 0x1308, 0x10be: 0x0018, 0x10bf: 0x0008, // Block 0x43, offset 0x10c0 - 0x10c0: 0x434d, 0x10c1: 0x436d, 0x10c2: 0x0040, 0x10c3: 0x6641, 0x10c4: 0x6659, 0x10c5: 0x6671, - 0x10c6: 0x6689, 0x10c7: 0x0040, 0x10c8: 0x66c1, 0x10c9: 0x66d9, 0x10ca: 0x66f1, 0x10cb: 0x6709, - 0x10cc: 0x6721, 0x10cd: 0x6739, 0x10ce: 0x6401, 0x10cf: 0x6751, 0x10d0: 0x6769, 0x10d1: 0x6781, - 0x10d2: 0x438d, 0x10d3: 0x6799, 0x10d4: 0x6289, 0x10d5: 0x43ad, 0x10d6: 0x43cd, 0x10d7: 0x67b1, - 0x10d8: 0x0040, 0x10d9: 0x43ed, 0x10da: 0x67c9, 0x10db: 0x67e1, 0x10dc: 0x67f9, 0x10dd: 0x6811, - 0x10de: 0x6829, 0x10df: 0x6859, 0x10e0: 0x6889, 0x10e1: 0x68b1, 0x10e2: 0x68d9, 0x10e3: 0x6901, - 0x10e4: 0x6929, 0x10e5: 0x6951, 0x10e6: 0x6979, 0x10e7: 0x69a1, 0x10e8: 0x69c9, 0x10e9: 0x69f1, - 0x10ea: 0x6a21, 0x10eb: 0x6a51, 0x10ec: 0x6a81, 0x10ed: 0x6ab1, 0x10ee: 0x6ae1, 0x10ef: 0x6b11, - 0x10f0: 0x6b41, 0x10f1: 0x6b71, 0x10f2: 0x6ba1, 0x10f3: 0x6bd1, 0x10f4: 0x6c01, 0x10f5: 0x6c31, - 0x10f6: 0x6c61, 0x10f7: 0x6c91, 0x10f8: 0x6cc1, 0x10f9: 0x6cf1, 0x10fa: 0x6d21, 0x10fb: 0x6d51, - 0x10fc: 0x6d81, 0x10fd: 0x6db1, 0x10fe: 0x6de1, 0x10ff: 0x440d, + 0x10c0: 0xe00d, 0x10c1: 0x0008, 0x10c2: 0xe00d, 0x10c3: 0x0008, 0x10c4: 0xe00d, 0x10c5: 0x0008, + 0x10c6: 0xe00d, 0x10c7: 0x0008, 0x10c8: 0xe00d, 0x10c9: 0x0008, 0x10ca: 0xe00d, 0x10cb: 0x0008, + 0x10cc: 0xe00d, 0x10cd: 0x0008, 0x10ce: 0xe00d, 0x10cf: 0x0008, 0x10d0: 0xe00d, 0x10d1: 0x0008, + 0x10d2: 0xe00d, 0x10d3: 0x0008, 0x10d4: 0xe00d, 0x10d5: 0x0008, 0x10d6: 0xe00d, 0x10d7: 0x0008, + 0x10d8: 0xe00d, 0x10d9: 0x0008, 0x10da: 0xe00d, 0x10db: 0x0008, 0x10dc: 0x0ea1, 0x10dd: 0x6e11, + 0x10de: 0x1308, 0x10df: 0x1308, 0x10e0: 0x0008, 0x10e1: 0x0008, 0x10e2: 0x0008, 0x10e3: 0x0008, + 0x10e4: 0x0008, 0x10e5: 0x0008, 0x10e6: 0x0008, 0x10e7: 0x0008, 0x10e8: 0x0008, 0x10e9: 0x0008, + 0x10ea: 0x0008, 0x10eb: 0x0008, 0x10ec: 0x0008, 0x10ed: 0x0008, 0x10ee: 0x0008, 0x10ef: 0x0008, + 0x10f0: 0x0008, 0x10f1: 0x0008, 0x10f2: 0x0008, 0x10f3: 0x0008, 0x10f4: 0x0008, 0x10f5: 0x0008, + 0x10f6: 0x0008, 0x10f7: 0x0008, 0x10f8: 0x0008, 0x10f9: 0x0008, 0x10fa: 0x0008, 0x10fb: 0x0008, + 0x10fc: 0x0008, 0x10fd: 0x0008, 0x10fe: 0x0008, 0x10ff: 0x0008, // Block 0x44, offset 0x1100 - 0x1100: 0xe00d, 0x1101: 0x0008, 0x1102: 0xe00d, 0x1103: 0x0008, 0x1104: 0xe00d, 0x1105: 0x0008, - 0x1106: 0xe00d, 0x1107: 0x0008, 0x1108: 0xe00d, 0x1109: 0x0008, 0x110a: 0xe00d, 0x110b: 0x0008, - 0x110c: 0xe00d, 0x110d: 0x0008, 0x110e: 0xe00d, 0x110f: 0x0008, 0x1110: 0xe00d, 0x1111: 0x0008, - 0x1112: 0xe00d, 0x1113: 0x0008, 0x1114: 0xe00d, 0x1115: 0x0008, 0x1116: 0xe00d, 0x1117: 0x0008, - 0x1118: 0xe00d, 0x1119: 0x0008, 0x111a: 0xe00d, 0x111b: 0x0008, 0x111c: 0xe00d, 0x111d: 0x0008, - 0x111e: 0xe00d, 0x111f: 0x0008, 0x1120: 0xe00d, 0x1121: 0x0008, 0x1122: 0xe00d, 0x1123: 0x0008, + 0x1100: 0x0018, 0x1101: 0x0018, 0x1102: 0x0018, 0x1103: 0x0018, 0x1104: 0x0018, 0x1105: 0x0018, + 0x1106: 0x0018, 0x1107: 0x0018, 0x1108: 0x0018, 0x1109: 0x0018, 0x110a: 0x0018, 0x110b: 0x0018, + 0x110c: 0x0018, 0x110d: 0x0018, 0x110e: 0x0018, 0x110f: 0x0018, 0x1110: 0x0018, 0x1111: 0x0018, + 0x1112: 0x0018, 0x1113: 0x0018, 0x1114: 0x0018, 0x1115: 0x0018, 0x1116: 0x0018, 0x1117: 0x0008, + 0x1118: 0x0008, 0x1119: 0x0008, 0x111a: 0x0008, 0x111b: 0x0008, 0x111c: 0x0008, 0x111d: 0x0008, + 0x111e: 0x0008, 0x111f: 0x0008, 0x1120: 0x0018, 0x1121: 0x0018, 0x1122: 0xe00d, 0x1123: 0x0008, 0x1124: 0xe00d, 0x1125: 0x0008, 0x1126: 0xe00d, 0x1127: 0x0008, 0x1128: 0xe00d, 0x1129: 0x0008, - 0x112a: 0xe00d, 0x112b: 0x0008, 0x112c: 0xe00d, 0x112d: 0x0008, 0x112e: 0x0008, 0x112f: 0x3308, - 0x1130: 0x3318, 0x1131: 0x3318, 0x1132: 0x3318, 0x1133: 0x0018, 0x1134: 0x3308, 0x1135: 0x3308, - 0x1136: 0x3308, 0x1137: 0x3308, 0x1138: 0x3308, 0x1139: 0x3308, 0x113a: 0x3308, 0x113b: 0x3308, - 0x113c: 0x3308, 0x113d: 0x3308, 0x113e: 0x0018, 0x113f: 0x0008, + 0x112a: 0xe00d, 0x112b: 0x0008, 0x112c: 0xe00d, 0x112d: 0x0008, 0x112e: 0xe00d, 0x112f: 0x0008, + 0x1130: 0x0008, 0x1131: 0x0008, 0x1132: 0xe00d, 0x1133: 0x0008, 0x1134: 0xe00d, 0x1135: 0x0008, + 0x1136: 0xe00d, 0x1137: 0x0008, 0x1138: 0xe00d, 0x1139: 0x0008, 0x113a: 0xe00d, 0x113b: 0x0008, + 0x113c: 0xe00d, 0x113d: 0x0008, 0x113e: 0xe00d, 0x113f: 0x0008, // Block 0x45, offset 0x1140 0x1140: 0xe00d, 0x1141: 0x0008, 0x1142: 0xe00d, 0x1143: 0x0008, 0x1144: 0xe00d, 0x1145: 0x0008, 0x1146: 0xe00d, 0x1147: 0x0008, 0x1148: 0xe00d, 0x1149: 0x0008, 0x114a: 0xe00d, 0x114b: 0x0008, 0x114c: 0xe00d, 0x114d: 0x0008, 0x114e: 0xe00d, 0x114f: 0x0008, 0x1150: 0xe00d, 0x1151: 0x0008, 0x1152: 0xe00d, 0x1153: 0x0008, 0x1154: 0xe00d, 0x1155: 0x0008, 0x1156: 0xe00d, 0x1157: 0x0008, - 0x1158: 0xe00d, 0x1159: 0x0008, 0x115a: 0xe00d, 0x115b: 0x0008, 0x115c: 0x0ea1, 0x115d: 0x6e11, - 0x115e: 0x3308, 0x115f: 0x3308, 0x1160: 0x0008, 0x1161: 0x0008, 0x1162: 0x0008, 0x1163: 0x0008, - 0x1164: 0x0008, 0x1165: 0x0008, 0x1166: 0x0008, 0x1167: 0x0008, 0x1168: 0x0008, 0x1169: 0x0008, - 0x116a: 0x0008, 0x116b: 0x0008, 0x116c: 0x0008, 0x116d: 0x0008, 0x116e: 0x0008, 0x116f: 0x0008, - 0x1170: 0x0008, 0x1171: 0x0008, 0x1172: 0x0008, 0x1173: 0x0008, 0x1174: 0x0008, 0x1175: 0x0008, - 0x1176: 0x0008, 0x1177: 0x0008, 0x1178: 0x0008, 0x1179: 0x0008, 0x117a: 0x0008, 0x117b: 0x0008, - 0x117c: 0x0008, 0x117d: 0x0008, 0x117e: 0x0008, 0x117f: 0x0008, + 0x1158: 0xe00d, 0x1159: 0x0008, 0x115a: 0xe00d, 0x115b: 0x0008, 0x115c: 0xe00d, 0x115d: 0x0008, + 0x115e: 0xe00d, 0x115f: 0x0008, 0x1160: 0xe00d, 0x1161: 0x0008, 0x1162: 0xe00d, 0x1163: 0x0008, + 0x1164: 0xe00d, 0x1165: 0x0008, 0x1166: 0xe00d, 0x1167: 0x0008, 0x1168: 0xe00d, 0x1169: 0x0008, + 0x116a: 0xe00d, 0x116b: 0x0008, 0x116c: 0xe00d, 0x116d: 0x0008, 0x116e: 0xe00d, 0x116f: 0x0008, + 0x1170: 0xe0fd, 0x1171: 0x0008, 0x1172: 0x0008, 0x1173: 0x0008, 0x1174: 0x0008, 0x1175: 0x0008, + 0x1176: 0x0008, 0x1177: 0x0008, 0x1178: 0x0008, 0x1179: 0xe01d, 0x117a: 0x0008, 0x117b: 0xe03d, + 0x117c: 0x0008, 0x117d: 0x442d, 0x117e: 0xe00d, 0x117f: 0x0008, // Block 0x46, offset 0x1180 - 0x1180: 0x0018, 0x1181: 0x0018, 0x1182: 0x0018, 0x1183: 0x0018, 0x1184: 0x0018, 0x1185: 0x0018, - 0x1186: 0x0018, 0x1187: 0x0018, 0x1188: 0x0018, 0x1189: 0x0018, 0x118a: 0x0018, 0x118b: 0x0018, - 0x118c: 0x0018, 0x118d: 0x0018, 0x118e: 0x0018, 0x118f: 0x0018, 0x1190: 0x0018, 0x1191: 0x0018, - 0x1192: 0x0018, 0x1193: 0x0018, 0x1194: 0x0018, 0x1195: 0x0018, 0x1196: 0x0018, 0x1197: 0x0008, - 0x1198: 0x0008, 0x1199: 0x0008, 0x119a: 0x0008, 0x119b: 0x0008, 0x119c: 0x0008, 0x119d: 0x0008, - 0x119e: 0x0008, 0x119f: 0x0008, 0x11a0: 0x0018, 0x11a1: 0x0018, 0x11a2: 0xe00d, 0x11a3: 0x0008, + 0x1180: 0xe00d, 0x1181: 0x0008, 0x1182: 0xe00d, 0x1183: 0x0008, 0x1184: 0xe00d, 0x1185: 0x0008, + 0x1186: 0xe00d, 0x1187: 0x0008, 0x1188: 0x0008, 0x1189: 0x0018, 0x118a: 0x0018, 0x118b: 0xe03d, + 0x118c: 0x0008, 0x118d: 0x11d9, 0x118e: 0x0008, 0x118f: 0x0008, 0x1190: 0xe00d, 0x1191: 0x0008, + 0x1192: 0xe00d, 0x1193: 0x0008, 0x1194: 0x0008, 0x1195: 0x0008, 0x1196: 0xe00d, 0x1197: 0x0008, + 0x1198: 0xe00d, 0x1199: 0x0008, 0x119a: 0xe00d, 0x119b: 0x0008, 0x119c: 0xe00d, 0x119d: 0x0008, + 0x119e: 0xe00d, 0x119f: 0x0008, 0x11a0: 0xe00d, 0x11a1: 0x0008, 0x11a2: 0xe00d, 0x11a3: 0x0008, 0x11a4: 0xe00d, 0x11a5: 0x0008, 0x11a6: 0xe00d, 0x11a7: 0x0008, 0x11a8: 0xe00d, 0x11a9: 0x0008, - 0x11aa: 0xe00d, 0x11ab: 0x0008, 0x11ac: 0xe00d, 0x11ad: 0x0008, 0x11ae: 0xe00d, 0x11af: 0x0008, - 0x11b0: 0x0008, 0x11b1: 0x0008, 0x11b2: 0xe00d, 0x11b3: 0x0008, 0x11b4: 0xe00d, 0x11b5: 0x0008, - 0x11b6: 0xe00d, 0x11b7: 0x0008, 0x11b8: 0xe00d, 0x11b9: 0x0008, 0x11ba: 0xe00d, 0x11bb: 0x0008, - 0x11bc: 0xe00d, 0x11bd: 0x0008, 0x11be: 0xe00d, 0x11bf: 0x0008, + 0x11aa: 0x6e29, 0x11ab: 0x1029, 0x11ac: 0x11c1, 0x11ad: 0x6e41, 0x11ae: 0x1221, 0x11af: 0x0040, + 0x11b0: 0x6e59, 0x11b1: 0x6e71, 0x11b2: 0x1239, 0x11b3: 0x444d, 0x11b4: 0xe00d, 0x11b5: 0x0008, + 0x11b6: 0xe00d, 0x11b7: 0x0008, 0x11b8: 0x0040, 0x11b9: 0x0040, 0x11ba: 0x0040, 0x11bb: 0x0040, + 0x11bc: 0x0040, 0x11bd: 0x0040, 0x11be: 0x0040, 0x11bf: 0x0040, // Block 0x47, offset 0x11c0 - 0x11c0: 0xe00d, 0x11c1: 0x0008, 0x11c2: 0xe00d, 0x11c3: 0x0008, 0x11c4: 0xe00d, 0x11c5: 0x0008, - 0x11c6: 0xe00d, 0x11c7: 0x0008, 0x11c8: 0xe00d, 0x11c9: 0x0008, 0x11ca: 0xe00d, 0x11cb: 0x0008, - 0x11cc: 0xe00d, 0x11cd: 0x0008, 0x11ce: 0xe00d, 0x11cf: 0x0008, 0x11d0: 0xe00d, 0x11d1: 0x0008, - 0x11d2: 0xe00d, 0x11d3: 0x0008, 0x11d4: 0xe00d, 0x11d5: 0x0008, 0x11d6: 0xe00d, 0x11d7: 0x0008, - 0x11d8: 0xe00d, 0x11d9: 0x0008, 0x11da: 0xe00d, 0x11db: 0x0008, 0x11dc: 0xe00d, 0x11dd: 0x0008, - 0x11de: 0xe00d, 0x11df: 0x0008, 0x11e0: 0xe00d, 0x11e1: 0x0008, 0x11e2: 0xe00d, 0x11e3: 0x0008, - 0x11e4: 0xe00d, 0x11e5: 0x0008, 0x11e6: 0xe00d, 0x11e7: 0x0008, 0x11e8: 0xe00d, 0x11e9: 0x0008, - 0x11ea: 0xe00d, 0x11eb: 0x0008, 0x11ec: 0xe00d, 0x11ed: 0x0008, 0x11ee: 0xe00d, 0x11ef: 0x0008, - 0x11f0: 0xe0fd, 0x11f1: 0x0008, 0x11f2: 0x0008, 0x11f3: 0x0008, 0x11f4: 0x0008, 0x11f5: 0x0008, - 0x11f6: 0x0008, 0x11f7: 0x0008, 0x11f8: 0x0008, 0x11f9: 0xe01d, 0x11fa: 0x0008, 0x11fb: 0xe03d, - 0x11fc: 0x0008, 0x11fd: 0x442d, 0x11fe: 0xe00d, 0x11ff: 0x0008, + 0x11c0: 0x64d5, 0x11c1: 0x64f5, 0x11c2: 0x6515, 0x11c3: 0x6535, 0x11c4: 0x6555, 0x11c5: 0x6575, + 0x11c6: 0x6595, 0x11c7: 0x65b5, 0x11c8: 0x65d5, 0x11c9: 0x65f5, 0x11ca: 0x6615, 0x11cb: 0x6635, + 0x11cc: 0x6655, 0x11cd: 0x6675, 0x11ce: 0x0008, 0x11cf: 0x0008, 0x11d0: 0x6695, 0x11d1: 0x0008, + 0x11d2: 0x66b5, 0x11d3: 0x0008, 0x11d4: 0x0008, 0x11d5: 0x66d5, 0x11d6: 0x66f5, 0x11d7: 0x6715, + 0x11d8: 0x6735, 0x11d9: 0x6755, 0x11da: 0x6775, 0x11db: 0x6795, 0x11dc: 0x67b5, 0x11dd: 0x67d5, + 0x11de: 0x67f5, 0x11df: 0x0008, 0x11e0: 0x6815, 0x11e1: 0x0008, 0x11e2: 0x6835, 0x11e3: 0x0008, + 0x11e4: 0x0008, 0x11e5: 0x6855, 0x11e6: 0x6875, 0x11e7: 0x0008, 0x11e8: 0x0008, 0x11e9: 0x0008, + 0x11ea: 0x6895, 0x11eb: 0x68b5, 0x11ec: 0x68d5, 0x11ed: 0x68f5, 0x11ee: 0x6915, 0x11ef: 0x6935, + 0x11f0: 0x6955, 0x11f1: 0x6975, 0x11f2: 0x6995, 0x11f3: 0x69b5, 0x11f4: 0x69d5, 0x11f5: 0x69f5, + 0x11f6: 0x6a15, 0x11f7: 0x6a35, 0x11f8: 0x6a55, 0x11f9: 0x6a75, 0x11fa: 0x6a95, 0x11fb: 0x6ab5, + 0x11fc: 0x6ad5, 0x11fd: 0x6af5, 0x11fe: 0x6b15, 0x11ff: 0x6b35, // Block 0x48, offset 0x1200 - 0x1200: 0xe00d, 0x1201: 0x0008, 0x1202: 0xe00d, 0x1203: 0x0008, 0x1204: 0xe00d, 0x1205: 0x0008, - 0x1206: 0xe00d, 0x1207: 0x0008, 0x1208: 0x0008, 0x1209: 0x0018, 0x120a: 0x0018, 0x120b: 0xe03d, - 0x120c: 0x0008, 0x120d: 0x11d9, 0x120e: 0x0008, 0x120f: 0x0008, 0x1210: 0xe00d, 0x1211: 0x0008, - 0x1212: 0xe00d, 0x1213: 0x0008, 0x1214: 0x0008, 0x1215: 0x0008, 0x1216: 0xe00d, 0x1217: 0x0008, - 0x1218: 0xe00d, 0x1219: 0x0008, 0x121a: 0xe00d, 0x121b: 0x0008, 0x121c: 0xe00d, 0x121d: 0x0008, - 0x121e: 0xe00d, 0x121f: 0x0008, 0x1220: 0xe00d, 0x1221: 0x0008, 0x1222: 0xe00d, 0x1223: 0x0008, - 0x1224: 0xe00d, 0x1225: 0x0008, 0x1226: 0xe00d, 0x1227: 0x0008, 0x1228: 0xe00d, 0x1229: 0x0008, - 0x122a: 0x6e29, 0x122b: 0x1029, 0x122c: 0x11c1, 0x122d: 0x6e41, 0x122e: 0x1221, 0x122f: 0x0040, - 0x1230: 0x6e59, 0x1231: 0x6e71, 0x1232: 0x1239, 0x1233: 0x444d, 0x1234: 0xe00d, 0x1235: 0x0008, - 0x1236: 0xe00d, 0x1237: 0x0008, 0x1238: 0x0040, 0x1239: 0x0040, 0x123a: 0x0040, 0x123b: 0x0040, + 0x1200: 0x7a95, 0x1201: 0x7ab5, 0x1202: 0x7ad5, 0x1203: 0x7af5, 0x1204: 0x7b15, 0x1205: 0x7b35, + 0x1206: 0x7b55, 0x1207: 0x7b75, 0x1208: 0x7b95, 0x1209: 0x7bb5, 0x120a: 0x7bd5, 0x120b: 0x7bf5, + 0x120c: 0x7c15, 0x120d: 0x7c35, 0x120e: 0x7c55, 0x120f: 0x6ec9, 0x1210: 0x6ef1, 0x1211: 0x6f19, + 0x1212: 0x7c75, 0x1213: 0x7c95, 0x1214: 0x7cb5, 0x1215: 0x6f41, 0x1216: 0x6f69, 0x1217: 0x6f91, + 0x1218: 0x7cd5, 0x1219: 0x7cf5, 0x121a: 0x0040, 0x121b: 0x0040, 0x121c: 0x0040, 0x121d: 0x0040, + 0x121e: 0x0040, 0x121f: 0x0040, 0x1220: 0x0040, 0x1221: 0x0040, 0x1222: 0x0040, 0x1223: 0x0040, + 0x1224: 0x0040, 0x1225: 0x0040, 0x1226: 0x0040, 0x1227: 0x0040, 0x1228: 0x0040, 0x1229: 0x0040, + 0x122a: 0x0040, 0x122b: 0x0040, 0x122c: 0x0040, 0x122d: 0x0040, 0x122e: 0x0040, 0x122f: 0x0040, + 0x1230: 0x0040, 0x1231: 0x0040, 0x1232: 0x0040, 0x1233: 0x0040, 0x1234: 0x0040, 0x1235: 0x0040, + 0x1236: 0x0040, 0x1237: 0x0040, 0x1238: 0x0040, 0x1239: 0x0040, 0x123a: 0x0040, 0x123b: 0x0040, 0x123c: 0x0040, 0x123d: 0x0040, 0x123e: 0x0040, 0x123f: 0x0040, // Block 0x49, offset 0x1240 - 0x1240: 0x64d5, 0x1241: 0x64f5, 0x1242: 0x6515, 0x1243: 0x6535, 0x1244: 0x6555, 0x1245: 0x6575, - 0x1246: 0x6595, 0x1247: 0x65b5, 0x1248: 0x65d5, 0x1249: 0x65f5, 0x124a: 0x6615, 0x124b: 0x6635, - 0x124c: 0x6655, 0x124d: 0x6675, 0x124e: 0x0008, 0x124f: 0x0008, 0x1250: 0x6695, 0x1251: 0x0008, - 0x1252: 0x66b5, 0x1253: 0x0008, 0x1254: 0x0008, 0x1255: 0x66d5, 0x1256: 0x66f5, 0x1257: 0x6715, - 0x1258: 0x6735, 0x1259: 0x6755, 0x125a: 0x6775, 0x125b: 0x6795, 0x125c: 0x67b5, 0x125d: 0x67d5, - 0x125e: 0x67f5, 0x125f: 0x0008, 0x1260: 0x6815, 0x1261: 0x0008, 0x1262: 0x6835, 0x1263: 0x0008, - 0x1264: 0x0008, 0x1265: 0x6855, 0x1266: 0x6875, 0x1267: 0x0008, 0x1268: 0x0008, 0x1269: 0x0008, - 0x126a: 0x6895, 0x126b: 0x68b5, 0x126c: 0x68d5, 0x126d: 0x68f5, 0x126e: 0x6915, 0x126f: 0x6935, - 0x1270: 0x6955, 0x1271: 0x6975, 0x1272: 0x6995, 0x1273: 0x69b5, 0x1274: 0x69d5, 0x1275: 0x69f5, - 0x1276: 0x6a15, 0x1277: 0x6a35, 0x1278: 0x6a55, 0x1279: 0x6a75, 0x127a: 0x6a95, 0x127b: 0x6ab5, - 0x127c: 0x6ad5, 0x127d: 0x6af5, 0x127e: 0x6b15, 0x127f: 0x6b35, + 0x1240: 0x6fb9, 0x1241: 0x6fd1, 0x1242: 0x6fe9, 0x1243: 0x7d15, 0x1244: 0x7d35, 0x1245: 0x7001, + 0x1246: 0x7001, 0x1247: 0x0040, 0x1248: 0x0040, 0x1249: 0x0040, 0x124a: 0x0040, 0x124b: 0x0040, + 0x124c: 0x0040, 0x124d: 0x0040, 0x124e: 0x0040, 0x124f: 0x0040, 0x1250: 0x0040, 0x1251: 0x0040, + 0x1252: 0x0040, 0x1253: 0x7019, 0x1254: 0x7041, 0x1255: 0x7069, 0x1256: 0x7091, 0x1257: 0x70b9, + 0x1258: 0x0040, 0x1259: 0x0040, 0x125a: 0x0040, 0x125b: 0x0040, 0x125c: 0x0040, 0x125d: 0x70e1, + 0x125e: 0x1308, 0x125f: 0x7109, 0x1260: 0x7131, 0x1261: 0x20a9, 0x1262: 0x20f1, 0x1263: 0x7149, + 0x1264: 0x7161, 0x1265: 0x7179, 0x1266: 0x7191, 0x1267: 0x71a9, 0x1268: 0x71c1, 0x1269: 0x1fb2, + 0x126a: 0x71d9, 0x126b: 0x7201, 0x126c: 0x7229, 0x126d: 0x7261, 0x126e: 0x7299, 0x126f: 0x72c1, + 0x1270: 0x72e9, 0x1271: 0x7311, 0x1272: 0x7339, 0x1273: 0x7361, 0x1274: 0x7389, 0x1275: 0x73b1, + 0x1276: 0x73d9, 0x1277: 0x0040, 0x1278: 0x7401, 0x1279: 0x7429, 0x127a: 0x7451, 0x127b: 0x7479, + 0x127c: 0x74a1, 0x127d: 0x0040, 0x127e: 0x74c9, 0x127f: 0x0040, // Block 0x4a, offset 0x1280 - 0x1280: 0x7a95, 0x1281: 0x7ab5, 0x1282: 0x7ad5, 0x1283: 0x7af5, 0x1284: 0x7b15, 0x1285: 0x7b35, - 0x1286: 0x7b55, 0x1287: 0x7b75, 0x1288: 0x7b95, 0x1289: 0x7bb5, 0x128a: 0x7bd5, 0x128b: 0x7bf5, - 0x128c: 0x7c15, 0x128d: 0x7c35, 0x128e: 0x7c55, 0x128f: 0x6ec9, 0x1290: 0x6ef1, 0x1291: 0x6f19, - 0x1292: 0x7c75, 0x1293: 0x7c95, 0x1294: 0x7cb5, 0x1295: 0x6f41, 0x1296: 0x6f69, 0x1297: 0x6f91, - 0x1298: 0x7cd5, 0x1299: 0x7cf5, 0x129a: 0x0040, 0x129b: 0x0040, 0x129c: 0x0040, 0x129d: 0x0040, - 0x129e: 0x0040, 0x129f: 0x0040, 0x12a0: 0x0040, 0x12a1: 0x0040, 0x12a2: 0x0040, 0x12a3: 0x0040, - 0x12a4: 0x0040, 0x12a5: 0x0040, 0x12a6: 0x0040, 0x12a7: 0x0040, 0x12a8: 0x0040, 0x12a9: 0x0040, - 0x12aa: 0x0040, 0x12ab: 0x0040, 0x12ac: 0x0040, 0x12ad: 0x0040, 0x12ae: 0x0040, 0x12af: 0x0040, - 0x12b0: 0x0040, 0x12b1: 0x0040, 0x12b2: 0x0040, 0x12b3: 0x0040, 0x12b4: 0x0040, 0x12b5: 0x0040, - 0x12b6: 0x0040, 0x12b7: 0x0040, 0x12b8: 0x0040, 0x12b9: 0x0040, 0x12ba: 0x0040, 0x12bb: 0x0040, - 0x12bc: 0x0040, 0x12bd: 0x0040, 0x12be: 0x0040, 0x12bf: 0x0040, + 0x1280: 0x74f1, 0x1281: 0x7519, 0x1282: 0x0040, 0x1283: 0x7541, 0x1284: 0x7569, 0x1285: 0x0040, + 0x1286: 0x7591, 0x1287: 0x75b9, 0x1288: 0x75e1, 0x1289: 0x7609, 0x128a: 0x7631, 0x128b: 0x7659, + 0x128c: 0x7681, 0x128d: 0x76a9, 0x128e: 0x76d1, 0x128f: 0x76f9, 0x1290: 0x7721, 0x1291: 0x7721, + 0x1292: 0x7739, 0x1293: 0x7739, 0x1294: 0x7739, 0x1295: 0x7739, 0x1296: 0x7751, 0x1297: 0x7751, + 0x1298: 0x7751, 0x1299: 0x7751, 0x129a: 0x7769, 0x129b: 0x7769, 0x129c: 0x7769, 0x129d: 0x7769, + 0x129e: 0x7781, 0x129f: 0x7781, 0x12a0: 0x7781, 0x12a1: 0x7781, 0x12a2: 0x7799, 0x12a3: 0x7799, + 0x12a4: 0x7799, 0x12a5: 0x7799, 0x12a6: 0x77b1, 0x12a7: 0x77b1, 0x12a8: 0x77b1, 0x12a9: 0x77b1, + 0x12aa: 0x77c9, 0x12ab: 0x77c9, 0x12ac: 0x77c9, 0x12ad: 0x77c9, 0x12ae: 0x77e1, 0x12af: 0x77e1, + 0x12b0: 0x77e1, 0x12b1: 0x77e1, 0x12b2: 0x77f9, 0x12b3: 0x77f9, 0x12b4: 0x77f9, 0x12b5: 0x77f9, + 0x12b6: 0x7811, 0x12b7: 0x7811, 0x12b8: 0x7811, 0x12b9: 0x7811, 0x12ba: 0x7829, 0x12bb: 0x7829, + 0x12bc: 0x7829, 0x12bd: 0x7829, 0x12be: 0x7841, 0x12bf: 0x7841, // Block 0x4b, offset 0x12c0 - 0x12c0: 0x6fb9, 0x12c1: 0x6fd1, 0x12c2: 0x6fe9, 0x12c3: 0x7d15, 0x12c4: 0x7d35, 0x12c5: 0x7001, - 0x12c6: 0x7001, 0x12c7: 0x0040, 0x12c8: 0x0040, 0x12c9: 0x0040, 0x12ca: 0x0040, 0x12cb: 0x0040, - 0x12cc: 0x0040, 0x12cd: 0x0040, 0x12ce: 0x0040, 0x12cf: 0x0040, 0x12d0: 0x0040, 0x12d1: 0x0040, - 0x12d2: 0x0040, 0x12d3: 0x7019, 0x12d4: 0x7041, 0x12d5: 0x7069, 0x12d6: 0x7091, 0x12d7: 0x70b9, - 0x12d8: 0x0040, 0x12d9: 0x0040, 0x12da: 0x0040, 0x12db: 0x0040, 0x12dc: 0x0040, 0x12dd: 0x70e1, - 0x12de: 0x3308, 0x12df: 0x7109, 0x12e0: 0x7131, 0x12e1: 0x20a9, 0x12e2: 0x20f1, 0x12e3: 0x7149, - 0x12e4: 0x7161, 0x12e5: 0x7179, 0x12e6: 0x7191, 0x12e7: 0x71a9, 0x12e8: 0x71c1, 0x12e9: 0x1fb2, - 0x12ea: 0x71d9, 0x12eb: 0x7201, 0x12ec: 0x7229, 0x12ed: 0x7261, 0x12ee: 0x7299, 0x12ef: 0x72c1, - 0x12f0: 0x72e9, 0x12f1: 0x7311, 0x12f2: 0x7339, 0x12f3: 0x7361, 0x12f4: 0x7389, 0x12f5: 0x73b1, - 0x12f6: 0x73d9, 0x12f7: 0x0040, 0x12f8: 0x7401, 0x12f9: 0x7429, 0x12fa: 0x7451, 0x12fb: 0x7479, - 0x12fc: 0x74a1, 0x12fd: 0x0040, 0x12fe: 0x74c9, 0x12ff: 0x0040, + 0x12c0: 0x7841, 0x12c1: 0x7841, 0x12c2: 0x7859, 0x12c3: 0x7859, 0x12c4: 0x7871, 0x12c5: 0x7871, + 0x12c6: 0x7889, 0x12c7: 0x7889, 0x12c8: 0x78a1, 0x12c9: 0x78a1, 0x12ca: 0x78b9, 0x12cb: 0x78b9, + 0x12cc: 0x78d1, 0x12cd: 0x78d1, 0x12ce: 0x78e9, 0x12cf: 0x78e9, 0x12d0: 0x78e9, 0x12d1: 0x78e9, + 0x12d2: 0x7901, 0x12d3: 0x7901, 0x12d4: 0x7901, 0x12d5: 0x7901, 0x12d6: 0x7919, 0x12d7: 0x7919, + 0x12d8: 0x7919, 0x12d9: 0x7919, 0x12da: 0x7931, 0x12db: 0x7931, 0x12dc: 0x7931, 0x12dd: 0x7931, + 0x12de: 0x7949, 0x12df: 0x7949, 0x12e0: 0x7961, 0x12e1: 0x7961, 0x12e2: 0x7961, 0x12e3: 0x7961, + 0x12e4: 0x7979, 0x12e5: 0x7979, 0x12e6: 0x7991, 0x12e7: 0x7991, 0x12e8: 0x7991, 0x12e9: 0x7991, + 0x12ea: 0x79a9, 0x12eb: 0x79a9, 0x12ec: 0x79a9, 0x12ed: 0x79a9, 0x12ee: 0x79c1, 0x12ef: 0x79c1, + 0x12f0: 0x79d9, 0x12f1: 0x79d9, 0x12f2: 0x0018, 0x12f3: 0x0018, 0x12f4: 0x0018, 0x12f5: 0x0018, + 0x12f6: 0x0018, 0x12f7: 0x0018, 0x12f8: 0x0018, 0x12f9: 0x0018, 0x12fa: 0x0018, 0x12fb: 0x0018, + 0x12fc: 0x0018, 0x12fd: 0x0018, 0x12fe: 0x0018, 0x12ff: 0x0018, // Block 0x4c, offset 0x1300 - 0x1300: 0x74f1, 0x1301: 0x7519, 0x1302: 0x0040, 0x1303: 0x7541, 0x1304: 0x7569, 0x1305: 0x0040, - 0x1306: 0x7591, 0x1307: 0x75b9, 0x1308: 0x75e1, 0x1309: 0x7609, 0x130a: 0x7631, 0x130b: 0x7659, - 0x130c: 0x7681, 0x130d: 0x76a9, 0x130e: 0x76d1, 0x130f: 0x76f9, 0x1310: 0x7721, 0x1311: 0x7721, - 0x1312: 0x7739, 0x1313: 0x7739, 0x1314: 0x7739, 0x1315: 0x7739, 0x1316: 0x7751, 0x1317: 0x7751, - 0x1318: 0x7751, 0x1319: 0x7751, 0x131a: 0x7769, 0x131b: 0x7769, 0x131c: 0x7769, 0x131d: 0x7769, - 0x131e: 0x7781, 0x131f: 0x7781, 0x1320: 0x7781, 0x1321: 0x7781, 0x1322: 0x7799, 0x1323: 0x7799, - 0x1324: 0x7799, 0x1325: 0x7799, 0x1326: 0x77b1, 0x1327: 0x77b1, 0x1328: 0x77b1, 0x1329: 0x77b1, - 0x132a: 0x77c9, 0x132b: 0x77c9, 0x132c: 0x77c9, 0x132d: 0x77c9, 0x132e: 0x77e1, 0x132f: 0x77e1, - 0x1330: 0x77e1, 0x1331: 0x77e1, 0x1332: 0x77f9, 0x1333: 0x77f9, 0x1334: 0x77f9, 0x1335: 0x77f9, - 0x1336: 0x7811, 0x1337: 0x7811, 0x1338: 0x7811, 0x1339: 0x7811, 0x133a: 0x7829, 0x133b: 0x7829, - 0x133c: 0x7829, 0x133d: 0x7829, 0x133e: 0x7841, 0x133f: 0x7841, + 0x1300: 0x0018, 0x1301: 0x0018, 0x1302: 0x0040, 0x1303: 0x0040, 0x1304: 0x0040, 0x1305: 0x0040, + 0x1306: 0x0040, 0x1307: 0x0040, 0x1308: 0x0040, 0x1309: 0x0040, 0x130a: 0x0040, 0x130b: 0x0040, + 0x130c: 0x0040, 0x130d: 0x0040, 0x130e: 0x0040, 0x130f: 0x0040, 0x1310: 0x0040, 0x1311: 0x0040, + 0x1312: 0x0040, 0x1313: 0x79f1, 0x1314: 0x79f1, 0x1315: 0x79f1, 0x1316: 0x79f1, 0x1317: 0x7a09, + 0x1318: 0x7a09, 0x1319: 0x7a21, 0x131a: 0x7a21, 0x131b: 0x7a39, 0x131c: 0x7a39, 0x131d: 0x0479, + 0x131e: 0x7a51, 0x131f: 0x7a51, 0x1320: 0x7a69, 0x1321: 0x7a69, 0x1322: 0x7a81, 0x1323: 0x7a81, + 0x1324: 0x7a99, 0x1325: 0x7a99, 0x1326: 0x7a99, 0x1327: 0x7a99, 0x1328: 0x7ab1, 0x1329: 0x7ab1, + 0x132a: 0x7ac9, 0x132b: 0x7ac9, 0x132c: 0x7af1, 0x132d: 0x7af1, 0x132e: 0x7b19, 0x132f: 0x7b19, + 0x1330: 0x7b41, 0x1331: 0x7b41, 0x1332: 0x7b69, 0x1333: 0x7b69, 0x1334: 0x7b91, 0x1335: 0x7b91, + 0x1336: 0x7bb9, 0x1337: 0x7bb9, 0x1338: 0x7bb9, 0x1339: 0x7be1, 0x133a: 0x7be1, 0x133b: 0x7be1, + 0x133c: 0x7c09, 0x133d: 0x7c09, 0x133e: 0x7c09, 0x133f: 0x7c09, // Block 0x4d, offset 0x1340 - 0x1340: 0x7841, 0x1341: 0x7841, 0x1342: 0x7859, 0x1343: 0x7859, 0x1344: 0x7871, 0x1345: 0x7871, - 0x1346: 0x7889, 0x1347: 0x7889, 0x1348: 0x78a1, 0x1349: 0x78a1, 0x134a: 0x78b9, 0x134b: 0x78b9, - 0x134c: 0x78d1, 0x134d: 0x78d1, 0x134e: 0x78e9, 0x134f: 0x78e9, 0x1350: 0x78e9, 0x1351: 0x78e9, - 0x1352: 0x7901, 0x1353: 0x7901, 0x1354: 0x7901, 0x1355: 0x7901, 0x1356: 0x7919, 0x1357: 0x7919, - 0x1358: 0x7919, 0x1359: 0x7919, 0x135a: 0x7931, 0x135b: 0x7931, 0x135c: 0x7931, 0x135d: 0x7931, - 0x135e: 0x7949, 0x135f: 0x7949, 0x1360: 0x7961, 0x1361: 0x7961, 0x1362: 0x7961, 0x1363: 0x7961, - 0x1364: 0x7979, 0x1365: 0x7979, 0x1366: 0x7991, 0x1367: 0x7991, 0x1368: 0x7991, 0x1369: 0x7991, - 0x136a: 0x79a9, 0x136b: 0x79a9, 0x136c: 0x79a9, 0x136d: 0x79a9, 0x136e: 0x79c1, 0x136f: 0x79c1, - 0x1370: 0x79d9, 0x1371: 0x79d9, 0x1372: 0x0818, 0x1373: 0x0818, 0x1374: 0x0818, 0x1375: 0x0818, - 0x1376: 0x0818, 0x1377: 0x0818, 0x1378: 0x0818, 0x1379: 0x0818, 0x137a: 0x0818, 0x137b: 0x0818, - 0x137c: 0x0818, 0x137d: 0x0818, 0x137e: 0x0818, 0x137f: 0x0818, + 0x1340: 0x85f9, 0x1341: 0x8621, 0x1342: 0x8649, 0x1343: 0x8671, 0x1344: 0x8699, 0x1345: 0x86c1, + 0x1346: 0x86e9, 0x1347: 0x8711, 0x1348: 0x8739, 0x1349: 0x8761, 0x134a: 0x8789, 0x134b: 0x87b1, + 0x134c: 0x87d9, 0x134d: 0x8801, 0x134e: 0x8829, 0x134f: 0x8851, 0x1350: 0x8879, 0x1351: 0x88a1, + 0x1352: 0x88c9, 0x1353: 0x88f1, 0x1354: 0x8919, 0x1355: 0x8941, 0x1356: 0x8969, 0x1357: 0x8991, + 0x1358: 0x89b9, 0x1359: 0x89e1, 0x135a: 0x8a09, 0x135b: 0x8a31, 0x135c: 0x8a59, 0x135d: 0x8a81, + 0x135e: 0x8aaa, 0x135f: 0x8ada, 0x1360: 0x8b0a, 0x1361: 0x8b3a, 0x1362: 0x8b6a, 0x1363: 0x8b9a, + 0x1364: 0x8bc9, 0x1365: 0x8bf1, 0x1366: 0x7c71, 0x1367: 0x8c19, 0x1368: 0x7be1, 0x1369: 0x7c99, + 0x136a: 0x8c41, 0x136b: 0x8c69, 0x136c: 0x7d39, 0x136d: 0x8c91, 0x136e: 0x7d61, 0x136f: 0x7d89, + 0x1370: 0x8cb9, 0x1371: 0x8ce1, 0x1372: 0x7e29, 0x1373: 0x8d09, 0x1374: 0x7e51, 0x1375: 0x7e79, + 0x1376: 0x8d31, 0x1377: 0x8d59, 0x1378: 0x7ec9, 0x1379: 0x8d81, 0x137a: 0x7ef1, 0x137b: 0x7f19, + 0x137c: 0x83a1, 0x137d: 0x83c9, 0x137e: 0x8441, 0x137f: 0x8469, // Block 0x4e, offset 0x1380 - 0x1380: 0x0818, 0x1381: 0x0818, 0x1382: 0x0040, 0x1383: 0x0040, 0x1384: 0x0040, 0x1385: 0x0040, - 0x1386: 0x0040, 0x1387: 0x0040, 0x1388: 0x0040, 0x1389: 0x0040, 0x138a: 0x0040, 0x138b: 0x0040, - 0x138c: 0x0040, 0x138d: 0x0040, 0x138e: 0x0040, 0x138f: 0x0040, 0x1390: 0x0040, 0x1391: 0x0040, - 0x1392: 0x0040, 0x1393: 0x79f1, 0x1394: 0x79f1, 0x1395: 0x79f1, 0x1396: 0x79f1, 0x1397: 0x7a09, - 0x1398: 0x7a09, 0x1399: 0x7a21, 0x139a: 0x7a21, 0x139b: 0x7a39, 0x139c: 0x7a39, 0x139d: 0x0479, - 0x139e: 0x7a51, 0x139f: 0x7a51, 0x13a0: 0x7a69, 0x13a1: 0x7a69, 0x13a2: 0x7a81, 0x13a3: 0x7a81, - 0x13a4: 0x7a99, 0x13a5: 0x7a99, 0x13a6: 0x7a99, 0x13a7: 0x7a99, 0x13a8: 0x7ab1, 0x13a9: 0x7ab1, - 0x13aa: 0x7ac9, 0x13ab: 0x7ac9, 0x13ac: 0x7af1, 0x13ad: 0x7af1, 0x13ae: 0x7b19, 0x13af: 0x7b19, - 0x13b0: 0x7b41, 0x13b1: 0x7b41, 0x13b2: 0x7b69, 0x13b3: 0x7b69, 0x13b4: 0x7b91, 0x13b5: 0x7b91, - 0x13b6: 0x7bb9, 0x13b7: 0x7bb9, 0x13b8: 0x7bb9, 0x13b9: 0x7be1, 0x13ba: 0x7be1, 0x13bb: 0x7be1, - 0x13bc: 0x7c09, 0x13bd: 0x7c09, 0x13be: 0x7c09, 0x13bf: 0x7c09, + 0x1380: 0x8491, 0x1381: 0x8531, 0x1382: 0x8559, 0x1383: 0x8581, 0x1384: 0x85a9, 0x1385: 0x8649, + 0x1386: 0x8671, 0x1387: 0x8699, 0x1388: 0x8da9, 0x1389: 0x8739, 0x138a: 0x8dd1, 0x138b: 0x8df9, + 0x138c: 0x8829, 0x138d: 0x8e21, 0x138e: 0x8851, 0x138f: 0x8879, 0x1390: 0x8a81, 0x1391: 0x8e49, + 0x1392: 0x8e71, 0x1393: 0x89b9, 0x1394: 0x8e99, 0x1395: 0x89e1, 0x1396: 0x8a09, 0x1397: 0x7c21, + 0x1398: 0x7c49, 0x1399: 0x8ec1, 0x139a: 0x7c71, 0x139b: 0x8ee9, 0x139c: 0x7cc1, 0x139d: 0x7ce9, + 0x139e: 0x7d11, 0x139f: 0x7d39, 0x13a0: 0x8f11, 0x13a1: 0x7db1, 0x13a2: 0x7dd9, 0x13a3: 0x7e01, + 0x13a4: 0x7e29, 0x13a5: 0x8f39, 0x13a6: 0x7ec9, 0x13a7: 0x7f41, 0x13a8: 0x7f69, 0x13a9: 0x7f91, + 0x13aa: 0x7fb9, 0x13ab: 0x7fe1, 0x13ac: 0x8031, 0x13ad: 0x8059, 0x13ae: 0x8081, 0x13af: 0x80a9, + 0x13b0: 0x80d1, 0x13b1: 0x80f9, 0x13b2: 0x8f61, 0x13b3: 0x8121, 0x13b4: 0x8149, 0x13b5: 0x8171, + 0x13b6: 0x8199, 0x13b7: 0x81c1, 0x13b8: 0x81e9, 0x13b9: 0x8239, 0x13ba: 0x8261, 0x13bb: 0x8289, + 0x13bc: 0x82b1, 0x13bd: 0x82d9, 0x13be: 0x8301, 0x13bf: 0x8329, // Block 0x4f, offset 0x13c0 - 0x13c0: 0x85f9, 0x13c1: 0x8621, 0x13c2: 0x8649, 0x13c3: 0x8671, 0x13c4: 0x8699, 0x13c5: 0x86c1, - 0x13c6: 0x86e9, 0x13c7: 0x8711, 0x13c8: 0x8739, 0x13c9: 0x8761, 0x13ca: 0x8789, 0x13cb: 0x87b1, - 0x13cc: 0x87d9, 0x13cd: 0x8801, 0x13ce: 0x8829, 0x13cf: 0x8851, 0x13d0: 0x8879, 0x13d1: 0x88a1, - 0x13d2: 0x88c9, 0x13d3: 0x88f1, 0x13d4: 0x8919, 0x13d5: 0x8941, 0x13d6: 0x8969, 0x13d7: 0x8991, - 0x13d8: 0x89b9, 0x13d9: 0x89e1, 0x13da: 0x8a09, 0x13db: 0x8a31, 0x13dc: 0x8a59, 0x13dd: 0x8a81, - 0x13de: 0x8aaa, 0x13df: 0x8ada, 0x13e0: 0x8b0a, 0x13e1: 0x8b3a, 0x13e2: 0x8b6a, 0x13e3: 0x8b9a, - 0x13e4: 0x8bc9, 0x13e5: 0x8bf1, 0x13e6: 0x7c71, 0x13e7: 0x8c19, 0x13e8: 0x7be1, 0x13e9: 0x7c99, - 0x13ea: 0x8c41, 0x13eb: 0x8c69, 0x13ec: 0x7d39, 0x13ed: 0x8c91, 0x13ee: 0x7d61, 0x13ef: 0x7d89, - 0x13f0: 0x8cb9, 0x13f1: 0x8ce1, 0x13f2: 0x7e29, 0x13f3: 0x8d09, 0x13f4: 0x7e51, 0x13f5: 0x7e79, - 0x13f6: 0x8d31, 0x13f7: 0x8d59, 0x13f8: 0x7ec9, 0x13f9: 0x8d81, 0x13fa: 0x7ef1, 0x13fb: 0x7f19, - 0x13fc: 0x83a1, 0x13fd: 0x83c9, 0x13fe: 0x8441, 0x13ff: 0x8469, + 0x13c0: 0x8351, 0x13c1: 0x8379, 0x13c2: 0x83f1, 0x13c3: 0x8419, 0x13c4: 0x84b9, 0x13c5: 0x84e1, + 0x13c6: 0x8509, 0x13c7: 0x8531, 0x13c8: 0x8559, 0x13c9: 0x85d1, 0x13ca: 0x85f9, 0x13cb: 0x8621, + 0x13cc: 0x8649, 0x13cd: 0x8f89, 0x13ce: 0x86c1, 0x13cf: 0x86e9, 0x13d0: 0x8711, 0x13d1: 0x8739, + 0x13d2: 0x87b1, 0x13d3: 0x87d9, 0x13d4: 0x8801, 0x13d5: 0x8829, 0x13d6: 0x8fb1, 0x13d7: 0x88a1, + 0x13d8: 0x88c9, 0x13d9: 0x8fd9, 0x13da: 0x8941, 0x13db: 0x8969, 0x13dc: 0x8991, 0x13dd: 0x89b9, + 0x13de: 0x9001, 0x13df: 0x7c71, 0x13e0: 0x8ee9, 0x13e1: 0x7d39, 0x13e2: 0x8f11, 0x13e3: 0x7e29, + 0x13e4: 0x8f39, 0x13e5: 0x7ec9, 0x13e6: 0x9029, 0x13e7: 0x80d1, 0x13e8: 0x9051, 0x13e9: 0x9079, + 0x13ea: 0x90a1, 0x13eb: 0x8531, 0x13ec: 0x8559, 0x13ed: 0x8649, 0x13ee: 0x8829, 0x13ef: 0x8fb1, + 0x13f0: 0x89b9, 0x13f1: 0x9001, 0x13f2: 0x90c9, 0x13f3: 0x9101, 0x13f4: 0x9139, 0x13f5: 0x9171, + 0x13f6: 0x9199, 0x13f7: 0x91c1, 0x13f8: 0x91e9, 0x13f9: 0x9211, 0x13fa: 0x9239, 0x13fb: 0x9261, + 0x13fc: 0x9289, 0x13fd: 0x92b1, 0x13fe: 0x92d9, 0x13ff: 0x9301, // Block 0x50, offset 0x1400 - 0x1400: 0x8491, 0x1401: 0x8531, 0x1402: 0x8559, 0x1403: 0x8581, 0x1404: 0x85a9, 0x1405: 0x8649, - 0x1406: 0x8671, 0x1407: 0x8699, 0x1408: 0x8da9, 0x1409: 0x8739, 0x140a: 0x8dd1, 0x140b: 0x8df9, - 0x140c: 0x8829, 0x140d: 0x8e21, 0x140e: 0x8851, 0x140f: 0x8879, 0x1410: 0x8a81, 0x1411: 0x8e49, - 0x1412: 0x8e71, 0x1413: 0x89b9, 0x1414: 0x8e99, 0x1415: 0x89e1, 0x1416: 0x8a09, 0x1417: 0x7c21, - 0x1418: 0x7c49, 0x1419: 0x8ec1, 0x141a: 0x7c71, 0x141b: 0x8ee9, 0x141c: 0x7cc1, 0x141d: 0x7ce9, - 0x141e: 0x7d11, 0x141f: 0x7d39, 0x1420: 0x8f11, 0x1421: 0x7db1, 0x1422: 0x7dd9, 0x1423: 0x7e01, - 0x1424: 0x7e29, 0x1425: 0x8f39, 0x1426: 0x7ec9, 0x1427: 0x7f41, 0x1428: 0x7f69, 0x1429: 0x7f91, - 0x142a: 0x7fb9, 0x142b: 0x7fe1, 0x142c: 0x8031, 0x142d: 0x8059, 0x142e: 0x8081, 0x142f: 0x80a9, - 0x1430: 0x80d1, 0x1431: 0x80f9, 0x1432: 0x8f61, 0x1433: 0x8121, 0x1434: 0x8149, 0x1435: 0x8171, - 0x1436: 0x8199, 0x1437: 0x81c1, 0x1438: 0x81e9, 0x1439: 0x8239, 0x143a: 0x8261, 0x143b: 0x8289, - 0x143c: 0x82b1, 0x143d: 0x82d9, 0x143e: 0x8301, 0x143f: 0x8329, + 0x1400: 0x9329, 0x1401: 0x9351, 0x1402: 0x9379, 0x1403: 0x93a1, 0x1404: 0x93c9, 0x1405: 0x93f1, + 0x1406: 0x9419, 0x1407: 0x9441, 0x1408: 0x9469, 0x1409: 0x9491, 0x140a: 0x94b9, 0x140b: 0x94e1, + 0x140c: 0x9079, 0x140d: 0x9509, 0x140e: 0x9531, 0x140f: 0x9559, 0x1410: 0x9581, 0x1411: 0x9171, + 0x1412: 0x9199, 0x1413: 0x91c1, 0x1414: 0x91e9, 0x1415: 0x9211, 0x1416: 0x9239, 0x1417: 0x9261, + 0x1418: 0x9289, 0x1419: 0x92b1, 0x141a: 0x92d9, 0x141b: 0x9301, 0x141c: 0x9329, 0x141d: 0x9351, + 0x141e: 0x9379, 0x141f: 0x93a1, 0x1420: 0x93c9, 0x1421: 0x93f1, 0x1422: 0x9419, 0x1423: 0x9441, + 0x1424: 0x9469, 0x1425: 0x9491, 0x1426: 0x94b9, 0x1427: 0x94e1, 0x1428: 0x9079, 0x1429: 0x9509, + 0x142a: 0x9531, 0x142b: 0x9559, 0x142c: 0x9581, 0x142d: 0x9491, 0x142e: 0x94b9, 0x142f: 0x94e1, + 0x1430: 0x9079, 0x1431: 0x9051, 0x1432: 0x90a1, 0x1433: 0x8211, 0x1434: 0x8059, 0x1435: 0x8081, + 0x1436: 0x80a9, 0x1437: 0x9491, 0x1438: 0x94b9, 0x1439: 0x94e1, 0x143a: 0x8211, 0x143b: 0x8239, + 0x143c: 0x95a9, 0x143d: 0x95a9, 0x143e: 0x0018, 0x143f: 0x0018, // Block 0x51, offset 0x1440 - 0x1440: 0x8351, 0x1441: 0x8379, 0x1442: 0x83f1, 0x1443: 0x8419, 0x1444: 0x84b9, 0x1445: 0x84e1, - 0x1446: 0x8509, 0x1447: 0x8531, 0x1448: 0x8559, 0x1449: 0x85d1, 0x144a: 0x85f9, 0x144b: 0x8621, - 0x144c: 0x8649, 0x144d: 0x8f89, 0x144e: 0x86c1, 0x144f: 0x86e9, 0x1450: 0x8711, 0x1451: 0x8739, - 0x1452: 0x87b1, 0x1453: 0x87d9, 0x1454: 0x8801, 0x1455: 0x8829, 0x1456: 0x8fb1, 0x1457: 0x88a1, - 0x1458: 0x88c9, 0x1459: 0x8fd9, 0x145a: 0x8941, 0x145b: 0x8969, 0x145c: 0x8991, 0x145d: 0x89b9, - 0x145e: 0x9001, 0x145f: 0x7c71, 0x1460: 0x8ee9, 0x1461: 0x7d39, 0x1462: 0x8f11, 0x1463: 0x7e29, - 0x1464: 0x8f39, 0x1465: 0x7ec9, 0x1466: 0x9029, 0x1467: 0x80d1, 0x1468: 0x9051, 0x1469: 0x9079, - 0x146a: 0x90a1, 0x146b: 0x8531, 0x146c: 0x8559, 0x146d: 0x8649, 0x146e: 0x8829, 0x146f: 0x8fb1, - 0x1470: 0x89b9, 0x1471: 0x9001, 0x1472: 0x90c9, 0x1473: 0x9101, 0x1474: 0x9139, 0x1475: 0x9171, - 0x1476: 0x9199, 0x1477: 0x91c1, 0x1478: 0x91e9, 0x1479: 0x9211, 0x147a: 0x9239, 0x147b: 0x9261, - 0x147c: 0x9289, 0x147d: 0x92b1, 0x147e: 0x92d9, 0x147f: 0x9301, + 0x1440: 0x0040, 0x1441: 0x0040, 0x1442: 0x0040, 0x1443: 0x0040, 0x1444: 0x0040, 0x1445: 0x0040, + 0x1446: 0x0040, 0x1447: 0x0040, 0x1448: 0x0040, 0x1449: 0x0040, 0x144a: 0x0040, 0x144b: 0x0040, + 0x144c: 0x0040, 0x144d: 0x0040, 0x144e: 0x0040, 0x144f: 0x0040, 0x1450: 0x95d1, 0x1451: 0x9609, + 0x1452: 0x9609, 0x1453: 0x9641, 0x1454: 0x9679, 0x1455: 0x96b1, 0x1456: 0x96e9, 0x1457: 0x9721, + 0x1458: 0x9759, 0x1459: 0x9759, 0x145a: 0x9791, 0x145b: 0x97c9, 0x145c: 0x9801, 0x145d: 0x9839, + 0x145e: 0x9871, 0x145f: 0x98a9, 0x1460: 0x98a9, 0x1461: 0x98e1, 0x1462: 0x9919, 0x1463: 0x9919, + 0x1464: 0x9951, 0x1465: 0x9951, 0x1466: 0x9989, 0x1467: 0x99c1, 0x1468: 0x99c1, 0x1469: 0x99f9, + 0x146a: 0x9a31, 0x146b: 0x9a31, 0x146c: 0x9a69, 0x146d: 0x9a69, 0x146e: 0x9aa1, 0x146f: 0x9ad9, + 0x1470: 0x9ad9, 0x1471: 0x9b11, 0x1472: 0x9b11, 0x1473: 0x9b49, 0x1474: 0x9b81, 0x1475: 0x9bb9, + 0x1476: 0x9bf1, 0x1477: 0x9bf1, 0x1478: 0x9c29, 0x1479: 0x9c61, 0x147a: 0x9c99, 0x147b: 0x9cd1, + 0x147c: 0x9d09, 0x147d: 0x9d09, 0x147e: 0x9d41, 0x147f: 0x9d79, // Block 0x52, offset 0x1480 - 0x1480: 0x9329, 0x1481: 0x9351, 0x1482: 0x9379, 0x1483: 0x93a1, 0x1484: 0x93c9, 0x1485: 0x93f1, - 0x1486: 0x9419, 0x1487: 0x9441, 0x1488: 0x9469, 0x1489: 0x9491, 0x148a: 0x94b9, 0x148b: 0x94e1, - 0x148c: 0x9079, 0x148d: 0x9509, 0x148e: 0x9531, 0x148f: 0x9559, 0x1490: 0x9581, 0x1491: 0x9171, - 0x1492: 0x9199, 0x1493: 0x91c1, 0x1494: 0x91e9, 0x1495: 0x9211, 0x1496: 0x9239, 0x1497: 0x9261, - 0x1498: 0x9289, 0x1499: 0x92b1, 0x149a: 0x92d9, 0x149b: 0x9301, 0x149c: 0x9329, 0x149d: 0x9351, - 0x149e: 0x9379, 0x149f: 0x93a1, 0x14a0: 0x93c9, 0x14a1: 0x93f1, 0x14a2: 0x9419, 0x14a3: 0x9441, - 0x14a4: 0x9469, 0x14a5: 0x9491, 0x14a6: 0x94b9, 0x14a7: 0x94e1, 0x14a8: 0x9079, 0x14a9: 0x9509, - 0x14aa: 0x9531, 0x14ab: 0x9559, 0x14ac: 0x9581, 0x14ad: 0x9491, 0x14ae: 0x94b9, 0x14af: 0x94e1, - 0x14b0: 0x9079, 0x14b1: 0x9051, 0x14b2: 0x90a1, 0x14b3: 0x8211, 0x14b4: 0x8059, 0x14b5: 0x8081, - 0x14b6: 0x80a9, 0x14b7: 0x9491, 0x14b8: 0x94b9, 0x14b9: 0x94e1, 0x14ba: 0x8211, 0x14bb: 0x8239, - 0x14bc: 0x95a9, 0x14bd: 0x95a9, 0x14be: 0x0018, 0x14bf: 0x0018, + 0x1480: 0xa949, 0x1481: 0xa981, 0x1482: 0xa9b9, 0x1483: 0xa8a1, 0x1484: 0x9bb9, 0x1485: 0x9989, + 0x1486: 0xa9f1, 0x1487: 0xaa29, 0x1488: 0x0040, 0x1489: 0x0040, 0x148a: 0x0040, 0x148b: 0x0040, + 0x148c: 0x0040, 0x148d: 0x0040, 0x148e: 0x0040, 0x148f: 0x0040, 0x1490: 0x0040, 0x1491: 0x0040, + 0x1492: 0x0040, 0x1493: 0x0040, 0x1494: 0x0040, 0x1495: 0x0040, 0x1496: 0x0040, 0x1497: 0x0040, + 0x1498: 0x0040, 0x1499: 0x0040, 0x149a: 0x0040, 0x149b: 0x0040, 0x149c: 0x0040, 0x149d: 0x0040, + 0x149e: 0x0040, 0x149f: 0x0040, 0x14a0: 0x0040, 0x14a1: 0x0040, 0x14a2: 0x0040, 0x14a3: 0x0040, + 0x14a4: 0x0040, 0x14a5: 0x0040, 0x14a6: 0x0040, 0x14a7: 0x0040, 0x14a8: 0x0040, 0x14a9: 0x0040, + 0x14aa: 0x0040, 0x14ab: 0x0040, 0x14ac: 0x0040, 0x14ad: 0x0040, 0x14ae: 0x0040, 0x14af: 0x0040, + 0x14b0: 0xaa61, 0x14b1: 0xaa99, 0x14b2: 0xaad1, 0x14b3: 0xab19, 0x14b4: 0xab61, 0x14b5: 0xaba9, + 0x14b6: 0xabf1, 0x14b7: 0xac39, 0x14b8: 0xac81, 0x14b9: 0xacc9, 0x14ba: 0xad02, 0x14bb: 0xae12, + 0x14bc: 0xae91, 0x14bd: 0x0018, 0x14be: 0x0040, 0x14bf: 0x0040, // Block 0x53, offset 0x14c0 - 0x14c0: 0x0040, 0x14c1: 0x0040, 0x14c2: 0x0040, 0x14c3: 0x0040, 0x14c4: 0x0040, 0x14c5: 0x0040, - 0x14c6: 0x0040, 0x14c7: 0x0040, 0x14c8: 0x0040, 0x14c9: 0x0040, 0x14ca: 0x0040, 0x14cb: 0x0040, - 0x14cc: 0x0040, 0x14cd: 0x0040, 0x14ce: 0x0040, 0x14cf: 0x0040, 0x14d0: 0x95d1, 0x14d1: 0x9609, - 0x14d2: 0x9609, 0x14d3: 0x9641, 0x14d4: 0x9679, 0x14d5: 0x96b1, 0x14d6: 0x96e9, 0x14d7: 0x9721, - 0x14d8: 0x9759, 0x14d9: 0x9759, 0x14da: 0x9791, 0x14db: 0x97c9, 0x14dc: 0x9801, 0x14dd: 0x9839, - 0x14de: 0x9871, 0x14df: 0x98a9, 0x14e0: 0x98a9, 0x14e1: 0x98e1, 0x14e2: 0x9919, 0x14e3: 0x9919, - 0x14e4: 0x9951, 0x14e5: 0x9951, 0x14e6: 0x9989, 0x14e7: 0x99c1, 0x14e8: 0x99c1, 0x14e9: 0x99f9, - 0x14ea: 0x9a31, 0x14eb: 0x9a31, 0x14ec: 0x9a69, 0x14ed: 0x9a69, 0x14ee: 0x9aa1, 0x14ef: 0x9ad9, - 0x14f0: 0x9ad9, 0x14f1: 0x9b11, 0x14f2: 0x9b11, 0x14f3: 0x9b49, 0x14f4: 0x9b81, 0x14f5: 0x9bb9, - 0x14f6: 0x9bf1, 0x14f7: 0x9bf1, 0x14f8: 0x9c29, 0x14f9: 0x9c61, 0x14fa: 0x9c99, 0x14fb: 0x9cd1, - 0x14fc: 0x9d09, 0x14fd: 0x9d09, 0x14fe: 0x9d41, 0x14ff: 0x9d79, + 0x14c0: 0x13c0, 0x14c1: 0x13c0, 0x14c2: 0x13c0, 0x14c3: 0x13c0, 0x14c4: 0x13c0, 0x14c5: 0x13c0, + 0x14c6: 0x13c0, 0x14c7: 0x13c0, 0x14c8: 0x13c0, 0x14c9: 0x13c0, 0x14ca: 0x13c0, 0x14cb: 0x13c0, + 0x14cc: 0x13c0, 0x14cd: 0x13c0, 0x14ce: 0x13c0, 0x14cf: 0x13c0, 0x14d0: 0xaeda, 0x14d1: 0x7d55, + 0x14d2: 0x0040, 0x14d3: 0xaeea, 0x14d4: 0x03c2, 0x14d5: 0xaefa, 0x14d6: 0xaf0a, 0x14d7: 0x7d75, + 0x14d8: 0x7d95, 0x14d9: 0x0040, 0x14da: 0x0040, 0x14db: 0x0040, 0x14dc: 0x0040, 0x14dd: 0x0040, + 0x14de: 0x0040, 0x14df: 0x0040, 0x14e0: 0x1308, 0x14e1: 0x1308, 0x14e2: 0x1308, 0x14e3: 0x1308, + 0x14e4: 0x1308, 0x14e5: 0x1308, 0x14e6: 0x1308, 0x14e7: 0x1308, 0x14e8: 0x1308, 0x14e9: 0x1308, + 0x14ea: 0x1308, 0x14eb: 0x1308, 0x14ec: 0x1308, 0x14ed: 0x1308, 0x14ee: 0x1308, 0x14ef: 0x1308, + 0x14f0: 0x0040, 0x14f1: 0x7db5, 0x14f2: 0x7dd5, 0x14f3: 0xaf1a, 0x14f4: 0xaf1a, 0x14f5: 0x1fd2, + 0x14f6: 0x1fe2, 0x14f7: 0xaf2a, 0x14f8: 0xaf3a, 0x14f9: 0x7df5, 0x14fa: 0x7e15, 0x14fb: 0x7e35, + 0x14fc: 0x7df5, 0x14fd: 0x7e55, 0x14fe: 0x7e75, 0x14ff: 0x7e55, // Block 0x54, offset 0x1500 - 0x1500: 0xa949, 0x1501: 0xa981, 0x1502: 0xa9b9, 0x1503: 0xa8a1, 0x1504: 0x9bb9, 0x1505: 0x9989, - 0x1506: 0xa9f1, 0x1507: 0xaa29, 0x1508: 0x0040, 0x1509: 0x0040, 0x150a: 0x0040, 0x150b: 0x0040, - 0x150c: 0x0040, 0x150d: 0x0040, 0x150e: 0x0040, 0x150f: 0x0040, 0x1510: 0x0040, 0x1511: 0x0040, - 0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x0040, 0x1515: 0x0040, 0x1516: 0x0040, 0x1517: 0x0040, - 0x1518: 0x0040, 0x1519: 0x0040, 0x151a: 0x0040, 0x151b: 0x0040, 0x151c: 0x0040, 0x151d: 0x0040, - 0x151e: 0x0040, 0x151f: 0x0040, 0x1520: 0x0040, 0x1521: 0x0040, 0x1522: 0x0040, 0x1523: 0x0040, - 0x1524: 0x0040, 0x1525: 0x0040, 0x1526: 0x0040, 0x1527: 0x0040, 0x1528: 0x0040, 0x1529: 0x0040, - 0x152a: 0x0040, 0x152b: 0x0040, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040, - 0x1530: 0xaa61, 0x1531: 0xaa99, 0x1532: 0xaad1, 0x1533: 0xab19, 0x1534: 0xab61, 0x1535: 0xaba9, - 0x1536: 0xabf1, 0x1537: 0xac39, 0x1538: 0xac81, 0x1539: 0xacc9, 0x153a: 0xad02, 0x153b: 0xae12, - 0x153c: 0xae91, 0x153d: 0x0018, 0x153e: 0x0040, 0x153f: 0x0040, + 0x1500: 0x7e95, 0x1501: 0x7eb5, 0x1502: 0x7ed5, 0x1503: 0x7eb5, 0x1504: 0x7ef5, 0x1505: 0x0018, + 0x1506: 0x0018, 0x1507: 0xaf4a, 0x1508: 0xaf5a, 0x1509: 0x7f16, 0x150a: 0x7f36, 0x150b: 0x7f56, + 0x150c: 0x7f76, 0x150d: 0xaf1a, 0x150e: 0xaf1a, 0x150f: 0xaf1a, 0x1510: 0xaeda, 0x1511: 0x7f95, + 0x1512: 0x0040, 0x1513: 0x0040, 0x1514: 0x03c2, 0x1515: 0xaeea, 0x1516: 0xaf0a, 0x1517: 0xaefa, + 0x1518: 0x7fb5, 0x1519: 0x1fd2, 0x151a: 0x1fe2, 0x151b: 0xaf2a, 0x151c: 0xaf3a, 0x151d: 0x7e95, + 0x151e: 0x7ef5, 0x151f: 0xaf6a, 0x1520: 0xaf7a, 0x1521: 0xaf8a, 0x1522: 0x1fb2, 0x1523: 0xaf99, + 0x1524: 0xafaa, 0x1525: 0xafba, 0x1526: 0x1fc2, 0x1527: 0x0040, 0x1528: 0xafca, 0x1529: 0xafda, + 0x152a: 0xafea, 0x152b: 0xaffa, 0x152c: 0x0040, 0x152d: 0x0040, 0x152e: 0x0040, 0x152f: 0x0040, + 0x1530: 0x7fd6, 0x1531: 0xb009, 0x1532: 0x7ff6, 0x1533: 0x0008, 0x1534: 0x8016, 0x1535: 0x0040, + 0x1536: 0x8036, 0x1537: 0xb031, 0x1538: 0x8056, 0x1539: 0xb059, 0x153a: 0x8076, 0x153b: 0xb081, + 0x153c: 0x8096, 0x153d: 0xb0a9, 0x153e: 0x80b6, 0x153f: 0xb0d1, // Block 0x55, offset 0x1540 - 0x1540: 0x33c0, 0x1541: 0x33c0, 0x1542: 0x33c0, 0x1543: 0x33c0, 0x1544: 0x33c0, 0x1545: 0x33c0, - 0x1546: 0x33c0, 0x1547: 0x33c0, 0x1548: 0x33c0, 0x1549: 0x33c0, 0x154a: 0x33c0, 0x154b: 0x33c0, - 0x154c: 0x33c0, 0x154d: 0x33c0, 0x154e: 0x33c0, 0x154f: 0x33c0, 0x1550: 0xaeda, 0x1551: 0x7d55, - 0x1552: 0x0040, 0x1553: 0xaeea, 0x1554: 0x03c2, 0x1555: 0xaefa, 0x1556: 0xaf0a, 0x1557: 0x7d75, - 0x1558: 0x7d95, 0x1559: 0x0040, 0x155a: 0x0040, 0x155b: 0x0040, 0x155c: 0x0040, 0x155d: 0x0040, - 0x155e: 0x0040, 0x155f: 0x0040, 0x1560: 0x3308, 0x1561: 0x3308, 0x1562: 0x3308, 0x1563: 0x3308, - 0x1564: 0x3308, 0x1565: 0x3308, 0x1566: 0x3308, 0x1567: 0x3308, 0x1568: 0x3308, 0x1569: 0x3308, - 0x156a: 0x3308, 0x156b: 0x3308, 0x156c: 0x3308, 0x156d: 0x3308, 0x156e: 0x3308, 0x156f: 0x3308, - 0x1570: 0x0040, 0x1571: 0x7db5, 0x1572: 0x7dd5, 0x1573: 0xaf1a, 0x1574: 0xaf1a, 0x1575: 0x1fd2, - 0x1576: 0x1fe2, 0x1577: 0xaf2a, 0x1578: 0xaf3a, 0x1579: 0x7df5, 0x157a: 0x7e15, 0x157b: 0x7e35, - 0x157c: 0x7df5, 0x157d: 0x7e55, 0x157e: 0x7e75, 0x157f: 0x7e55, + 0x1540: 0xb0f9, 0x1541: 0xb111, 0x1542: 0xb111, 0x1543: 0xb129, 0x1544: 0xb129, 0x1545: 0xb141, + 0x1546: 0xb141, 0x1547: 0xb159, 0x1548: 0xb159, 0x1549: 0xb171, 0x154a: 0xb171, 0x154b: 0xb171, + 0x154c: 0xb171, 0x154d: 0xb189, 0x154e: 0xb189, 0x154f: 0xb1a1, 0x1550: 0xb1a1, 0x1551: 0xb1a1, + 0x1552: 0xb1a1, 0x1553: 0xb1b9, 0x1554: 0xb1b9, 0x1555: 0xb1d1, 0x1556: 0xb1d1, 0x1557: 0xb1d1, + 0x1558: 0xb1d1, 0x1559: 0xb1e9, 0x155a: 0xb1e9, 0x155b: 0xb1e9, 0x155c: 0xb1e9, 0x155d: 0xb201, + 0x155e: 0xb201, 0x155f: 0xb201, 0x1560: 0xb201, 0x1561: 0xb219, 0x1562: 0xb219, 0x1563: 0xb219, + 0x1564: 0xb219, 0x1565: 0xb231, 0x1566: 0xb231, 0x1567: 0xb231, 0x1568: 0xb231, 0x1569: 0xb249, + 0x156a: 0xb249, 0x156b: 0xb261, 0x156c: 0xb261, 0x156d: 0xb279, 0x156e: 0xb279, 0x156f: 0xb291, + 0x1570: 0xb291, 0x1571: 0xb2a9, 0x1572: 0xb2a9, 0x1573: 0xb2a9, 0x1574: 0xb2a9, 0x1575: 0xb2c1, + 0x1576: 0xb2c1, 0x1577: 0xb2c1, 0x1578: 0xb2c1, 0x1579: 0xb2d9, 0x157a: 0xb2d9, 0x157b: 0xb2d9, + 0x157c: 0xb2d9, 0x157d: 0xb2f1, 0x157e: 0xb2f1, 0x157f: 0xb2f1, // Block 0x56, offset 0x1580 - 0x1580: 0x7e95, 0x1581: 0x7eb5, 0x1582: 0x7ed5, 0x1583: 0x7eb5, 0x1584: 0x7ef5, 0x1585: 0x0018, - 0x1586: 0x0018, 0x1587: 0xaf4a, 0x1588: 0xaf5a, 0x1589: 0x7f16, 0x158a: 0x7f36, 0x158b: 0x7f56, - 0x158c: 0x7f76, 0x158d: 0xaf1a, 0x158e: 0xaf1a, 0x158f: 0xaf1a, 0x1590: 0xaeda, 0x1591: 0x7f95, - 0x1592: 0x0040, 0x1593: 0x0040, 0x1594: 0x03c2, 0x1595: 0xaeea, 0x1596: 0xaf0a, 0x1597: 0xaefa, - 0x1598: 0x7fb5, 0x1599: 0x1fd2, 0x159a: 0x1fe2, 0x159b: 0xaf2a, 0x159c: 0xaf3a, 0x159d: 0x7e95, - 0x159e: 0x7ef5, 0x159f: 0xaf6a, 0x15a0: 0xaf7a, 0x15a1: 0xaf8a, 0x15a2: 0x1fb2, 0x15a3: 0xaf99, - 0x15a4: 0xafaa, 0x15a5: 0xafba, 0x15a6: 0x1fc2, 0x15a7: 0x0040, 0x15a8: 0xafca, 0x15a9: 0xafda, - 0x15aa: 0xafea, 0x15ab: 0xaffa, 0x15ac: 0x0040, 0x15ad: 0x0040, 0x15ae: 0x0040, 0x15af: 0x0040, - 0x15b0: 0x7fd6, 0x15b1: 0xb009, 0x15b2: 0x7ff6, 0x15b3: 0x0808, 0x15b4: 0x8016, 0x15b5: 0x0040, - 0x15b6: 0x8036, 0x15b7: 0xb031, 0x15b8: 0x8056, 0x15b9: 0xb059, 0x15ba: 0x8076, 0x15bb: 0xb081, - 0x15bc: 0x8096, 0x15bd: 0xb0a9, 0x15be: 0x80b6, 0x15bf: 0xb0d1, + 0x1580: 0xb2f1, 0x1581: 0xb309, 0x1582: 0xb309, 0x1583: 0xb309, 0x1584: 0xb309, 0x1585: 0xb321, + 0x1586: 0xb321, 0x1587: 0xb321, 0x1588: 0xb321, 0x1589: 0xb339, 0x158a: 0xb339, 0x158b: 0xb339, + 0x158c: 0xb339, 0x158d: 0xb351, 0x158e: 0xb351, 0x158f: 0xb351, 0x1590: 0xb351, 0x1591: 0xb369, + 0x1592: 0xb369, 0x1593: 0xb369, 0x1594: 0xb369, 0x1595: 0xb381, 0x1596: 0xb381, 0x1597: 0xb381, + 0x1598: 0xb381, 0x1599: 0xb399, 0x159a: 0xb399, 0x159b: 0xb399, 0x159c: 0xb399, 0x159d: 0xb3b1, + 0x159e: 0xb3b1, 0x159f: 0xb3b1, 0x15a0: 0xb3b1, 0x15a1: 0xb3c9, 0x15a2: 0xb3c9, 0x15a3: 0xb3c9, + 0x15a4: 0xb3c9, 0x15a5: 0xb3e1, 0x15a6: 0xb3e1, 0x15a7: 0xb3e1, 0x15a8: 0xb3e1, 0x15a9: 0xb3f9, + 0x15aa: 0xb3f9, 0x15ab: 0xb3f9, 0x15ac: 0xb3f9, 0x15ad: 0xb411, 0x15ae: 0xb411, 0x15af: 0x7ab1, + 0x15b0: 0x7ab1, 0x15b1: 0xb429, 0x15b2: 0xb429, 0x15b3: 0xb429, 0x15b4: 0xb429, 0x15b5: 0xb441, + 0x15b6: 0xb441, 0x15b7: 0xb469, 0x15b8: 0xb469, 0x15b9: 0xb491, 0x15ba: 0xb491, 0x15bb: 0xb4b9, + 0x15bc: 0xb4b9, 0x15bd: 0x0040, 0x15be: 0x0040, 0x15bf: 0x03c0, // Block 0x57, offset 0x15c0 - 0x15c0: 0xb0f9, 0x15c1: 0xb111, 0x15c2: 0xb111, 0x15c3: 0xb129, 0x15c4: 0xb129, 0x15c5: 0xb141, - 0x15c6: 0xb141, 0x15c7: 0xb159, 0x15c8: 0xb159, 0x15c9: 0xb171, 0x15ca: 0xb171, 0x15cb: 0xb171, - 0x15cc: 0xb171, 0x15cd: 0xb189, 0x15ce: 0xb189, 0x15cf: 0xb1a1, 0x15d0: 0xb1a1, 0x15d1: 0xb1a1, - 0x15d2: 0xb1a1, 0x15d3: 0xb1b9, 0x15d4: 0xb1b9, 0x15d5: 0xb1d1, 0x15d6: 0xb1d1, 0x15d7: 0xb1d1, - 0x15d8: 0xb1d1, 0x15d9: 0xb1e9, 0x15da: 0xb1e9, 0x15db: 0xb1e9, 0x15dc: 0xb1e9, 0x15dd: 0xb201, - 0x15de: 0xb201, 0x15df: 0xb201, 0x15e0: 0xb201, 0x15e1: 0xb219, 0x15e2: 0xb219, 0x15e3: 0xb219, - 0x15e4: 0xb219, 0x15e5: 0xb231, 0x15e6: 0xb231, 0x15e7: 0xb231, 0x15e8: 0xb231, 0x15e9: 0xb249, - 0x15ea: 0xb249, 0x15eb: 0xb261, 0x15ec: 0xb261, 0x15ed: 0xb279, 0x15ee: 0xb279, 0x15ef: 0xb291, - 0x15f0: 0xb291, 0x15f1: 0xb2a9, 0x15f2: 0xb2a9, 0x15f3: 0xb2a9, 0x15f4: 0xb2a9, 0x15f5: 0xb2c1, - 0x15f6: 0xb2c1, 0x15f7: 0xb2c1, 0x15f8: 0xb2c1, 0x15f9: 0xb2d9, 0x15fa: 0xb2d9, 0x15fb: 0xb2d9, - 0x15fc: 0xb2d9, 0x15fd: 0xb2f1, 0x15fe: 0xb2f1, 0x15ff: 0xb2f1, + 0x15c0: 0x0040, 0x15c1: 0xaefa, 0x15c2: 0xb4e2, 0x15c3: 0xaf6a, 0x15c4: 0xafda, 0x15c5: 0xafea, + 0x15c6: 0xaf7a, 0x15c7: 0xb4f2, 0x15c8: 0x1fd2, 0x15c9: 0x1fe2, 0x15ca: 0xaf8a, 0x15cb: 0x1fb2, + 0x15cc: 0xaeda, 0x15cd: 0xaf99, 0x15ce: 0x29d1, 0x15cf: 0xb502, 0x15d0: 0x1f41, 0x15d1: 0x00c9, + 0x15d2: 0x0069, 0x15d3: 0x0079, 0x15d4: 0x1f51, 0x15d5: 0x1f61, 0x15d6: 0x1f71, 0x15d7: 0x1f81, + 0x15d8: 0x1f91, 0x15d9: 0x1fa1, 0x15da: 0xaeea, 0x15db: 0x03c2, 0x15dc: 0xafaa, 0x15dd: 0x1fc2, + 0x15de: 0xafba, 0x15df: 0xaf0a, 0x15e0: 0xaffa, 0x15e1: 0x0039, 0x15e2: 0x0ee9, 0x15e3: 0x1159, + 0x15e4: 0x0ef9, 0x15e5: 0x0f09, 0x15e6: 0x1199, 0x15e7: 0x0f31, 0x15e8: 0x0249, 0x15e9: 0x0f41, + 0x15ea: 0x0259, 0x15eb: 0x0f51, 0x15ec: 0x0359, 0x15ed: 0x0f61, 0x15ee: 0x0f71, 0x15ef: 0x00d9, + 0x15f0: 0x0f99, 0x15f1: 0x2039, 0x15f2: 0x0269, 0x15f3: 0x01d9, 0x15f4: 0x0fa9, 0x15f5: 0x0fb9, + 0x15f6: 0x1089, 0x15f7: 0x0279, 0x15f8: 0x0369, 0x15f9: 0x0289, 0x15fa: 0x13d1, 0x15fb: 0xaf4a, + 0x15fc: 0xafca, 0x15fd: 0xaf5a, 0x15fe: 0xb512, 0x15ff: 0xaf1a, // Block 0x58, offset 0x1600 - 0x1600: 0xb2f1, 0x1601: 0xb309, 0x1602: 0xb309, 0x1603: 0xb309, 0x1604: 0xb309, 0x1605: 0xb321, - 0x1606: 0xb321, 0x1607: 0xb321, 0x1608: 0xb321, 0x1609: 0xb339, 0x160a: 0xb339, 0x160b: 0xb339, - 0x160c: 0xb339, 0x160d: 0xb351, 0x160e: 0xb351, 0x160f: 0xb351, 0x1610: 0xb351, 0x1611: 0xb369, - 0x1612: 0xb369, 0x1613: 0xb369, 0x1614: 0xb369, 0x1615: 0xb381, 0x1616: 0xb381, 0x1617: 0xb381, - 0x1618: 0xb381, 0x1619: 0xb399, 0x161a: 0xb399, 0x161b: 0xb399, 0x161c: 0xb399, 0x161d: 0xb3b1, - 0x161e: 0xb3b1, 0x161f: 0xb3b1, 0x1620: 0xb3b1, 0x1621: 0xb3c9, 0x1622: 0xb3c9, 0x1623: 0xb3c9, - 0x1624: 0xb3c9, 0x1625: 0xb3e1, 0x1626: 0xb3e1, 0x1627: 0xb3e1, 0x1628: 0xb3e1, 0x1629: 0xb3f9, - 0x162a: 0xb3f9, 0x162b: 0xb3f9, 0x162c: 0xb3f9, 0x162d: 0xb411, 0x162e: 0xb411, 0x162f: 0x7ab1, - 0x1630: 0x7ab1, 0x1631: 0xb429, 0x1632: 0xb429, 0x1633: 0xb429, 0x1634: 0xb429, 0x1635: 0xb441, - 0x1636: 0xb441, 0x1637: 0xb469, 0x1638: 0xb469, 0x1639: 0xb491, 0x163a: 0xb491, 0x163b: 0xb4b9, - 0x163c: 0xb4b9, 0x163d: 0x0040, 0x163e: 0x0040, 0x163f: 0x03c0, + 0x1600: 0x1caa, 0x1601: 0x0039, 0x1602: 0x0ee9, 0x1603: 0x1159, 0x1604: 0x0ef9, 0x1605: 0x0f09, + 0x1606: 0x1199, 0x1607: 0x0f31, 0x1608: 0x0249, 0x1609: 0x0f41, 0x160a: 0x0259, 0x160b: 0x0f51, + 0x160c: 0x0359, 0x160d: 0x0f61, 0x160e: 0x0f71, 0x160f: 0x00d9, 0x1610: 0x0f99, 0x1611: 0x2039, + 0x1612: 0x0269, 0x1613: 0x01d9, 0x1614: 0x0fa9, 0x1615: 0x0fb9, 0x1616: 0x1089, 0x1617: 0x0279, + 0x1618: 0x0369, 0x1619: 0x0289, 0x161a: 0x13d1, 0x161b: 0xaf2a, 0x161c: 0xb522, 0x161d: 0xaf3a, + 0x161e: 0xb532, 0x161f: 0x80d5, 0x1620: 0x80f5, 0x1621: 0x29d1, 0x1622: 0x8115, 0x1623: 0x8115, + 0x1624: 0x8135, 0x1625: 0x8155, 0x1626: 0x8175, 0x1627: 0x8195, 0x1628: 0x81b5, 0x1629: 0x81d5, + 0x162a: 0x81f5, 0x162b: 0x8215, 0x162c: 0x8235, 0x162d: 0x8255, 0x162e: 0x8275, 0x162f: 0x8295, + 0x1630: 0x82b5, 0x1631: 0x82d5, 0x1632: 0x82f5, 0x1633: 0x8315, 0x1634: 0x8335, 0x1635: 0x8355, + 0x1636: 0x8375, 0x1637: 0x8395, 0x1638: 0x83b5, 0x1639: 0x83d5, 0x163a: 0x83f5, 0x163b: 0x8415, + 0x163c: 0x81b5, 0x163d: 0x8435, 0x163e: 0x8455, 0x163f: 0x8215, // Block 0x59, offset 0x1640 - 0x1640: 0x0040, 0x1641: 0xaefa, 0x1642: 0xb4e2, 0x1643: 0xaf6a, 0x1644: 0xafda, 0x1645: 0xafea, - 0x1646: 0xaf7a, 0x1647: 0xb4f2, 0x1648: 0x1fd2, 0x1649: 0x1fe2, 0x164a: 0xaf8a, 0x164b: 0x1fb2, - 0x164c: 0xaeda, 0x164d: 0xaf99, 0x164e: 0x29d1, 0x164f: 0xb502, 0x1650: 0x1f41, 0x1651: 0x00c9, - 0x1652: 0x0069, 0x1653: 0x0079, 0x1654: 0x1f51, 0x1655: 0x1f61, 0x1656: 0x1f71, 0x1657: 0x1f81, - 0x1658: 0x1f91, 0x1659: 0x1fa1, 0x165a: 0xaeea, 0x165b: 0x03c2, 0x165c: 0xafaa, 0x165d: 0x1fc2, - 0x165e: 0xafba, 0x165f: 0xaf0a, 0x1660: 0xaffa, 0x1661: 0x0039, 0x1662: 0x0ee9, 0x1663: 0x1159, - 0x1664: 0x0ef9, 0x1665: 0x0f09, 0x1666: 0x1199, 0x1667: 0x0f31, 0x1668: 0x0249, 0x1669: 0x0f41, - 0x166a: 0x0259, 0x166b: 0x0f51, 0x166c: 0x0359, 0x166d: 0x0f61, 0x166e: 0x0f71, 0x166f: 0x00d9, - 0x1670: 0x0f99, 0x1671: 0x2039, 0x1672: 0x0269, 0x1673: 0x01d9, 0x1674: 0x0fa9, 0x1675: 0x0fb9, - 0x1676: 0x1089, 0x1677: 0x0279, 0x1678: 0x0369, 0x1679: 0x0289, 0x167a: 0x13d1, 0x167b: 0xaf4a, - 0x167c: 0xafca, 0x167d: 0xaf5a, 0x167e: 0xb512, 0x167f: 0xaf1a, + 0x1640: 0x8475, 0x1641: 0x8495, 0x1642: 0x84b5, 0x1643: 0x84d5, 0x1644: 0x84f5, 0x1645: 0x8515, + 0x1646: 0x8535, 0x1647: 0x8555, 0x1648: 0x84d5, 0x1649: 0x8575, 0x164a: 0x84d5, 0x164b: 0x8595, + 0x164c: 0x8595, 0x164d: 0x85b5, 0x164e: 0x85b5, 0x164f: 0x85d5, 0x1650: 0x8515, 0x1651: 0x85f5, + 0x1652: 0x8615, 0x1653: 0x85f5, 0x1654: 0x8635, 0x1655: 0x8615, 0x1656: 0x8655, 0x1657: 0x8655, + 0x1658: 0x8675, 0x1659: 0x8675, 0x165a: 0x8695, 0x165b: 0x8695, 0x165c: 0x8615, 0x165d: 0x8115, + 0x165e: 0x86b5, 0x165f: 0x86d5, 0x1660: 0x0040, 0x1661: 0x86f5, 0x1662: 0x8715, 0x1663: 0x8735, + 0x1664: 0x8755, 0x1665: 0x8735, 0x1666: 0x8775, 0x1667: 0x8795, 0x1668: 0x87b5, 0x1669: 0x87b5, + 0x166a: 0x87d5, 0x166b: 0x87d5, 0x166c: 0x87f5, 0x166d: 0x87f5, 0x166e: 0x87d5, 0x166f: 0x87d5, + 0x1670: 0x8815, 0x1671: 0x8835, 0x1672: 0x8855, 0x1673: 0x8875, 0x1674: 0x8895, 0x1675: 0x88b5, + 0x1676: 0x88b5, 0x1677: 0x88b5, 0x1678: 0x88d5, 0x1679: 0x88d5, 0x167a: 0x88d5, 0x167b: 0x88d5, + 0x167c: 0x87b5, 0x167d: 0x87b5, 0x167e: 0x87b5, 0x167f: 0x0040, // Block 0x5a, offset 0x1680 - 0x1680: 0x1caa, 0x1681: 0x0039, 0x1682: 0x0ee9, 0x1683: 0x1159, 0x1684: 0x0ef9, 0x1685: 0x0f09, - 0x1686: 0x1199, 0x1687: 0x0f31, 0x1688: 0x0249, 0x1689: 0x0f41, 0x168a: 0x0259, 0x168b: 0x0f51, - 0x168c: 0x0359, 0x168d: 0x0f61, 0x168e: 0x0f71, 0x168f: 0x00d9, 0x1690: 0x0f99, 0x1691: 0x2039, - 0x1692: 0x0269, 0x1693: 0x01d9, 0x1694: 0x0fa9, 0x1695: 0x0fb9, 0x1696: 0x1089, 0x1697: 0x0279, - 0x1698: 0x0369, 0x1699: 0x0289, 0x169a: 0x13d1, 0x169b: 0xaf2a, 0x169c: 0xb522, 0x169d: 0xaf3a, - 0x169e: 0xb532, 0x169f: 0x80d5, 0x16a0: 0x80f5, 0x16a1: 0x29d1, 0x16a2: 0x8115, 0x16a3: 0x8115, - 0x16a4: 0x8135, 0x16a5: 0x8155, 0x16a6: 0x8175, 0x16a7: 0x8195, 0x16a8: 0x81b5, 0x16a9: 0x81d5, - 0x16aa: 0x81f5, 0x16ab: 0x8215, 0x16ac: 0x8235, 0x16ad: 0x8255, 0x16ae: 0x8275, 0x16af: 0x8295, - 0x16b0: 0x82b5, 0x16b1: 0x82d5, 0x16b2: 0x82f5, 0x16b3: 0x8315, 0x16b4: 0x8335, 0x16b5: 0x8355, - 0x16b6: 0x8375, 0x16b7: 0x8395, 0x16b8: 0x83b5, 0x16b9: 0x83d5, 0x16ba: 0x83f5, 0x16bb: 0x8415, - 0x16bc: 0x81b5, 0x16bd: 0x8435, 0x16be: 0x8455, 0x16bf: 0x8215, + 0x1680: 0x0040, 0x1681: 0x0040, 0x1682: 0x8715, 0x1683: 0x86f5, 0x1684: 0x88f5, 0x1685: 0x86f5, + 0x1686: 0x8715, 0x1687: 0x86f5, 0x1688: 0x0040, 0x1689: 0x0040, 0x168a: 0x8915, 0x168b: 0x8715, + 0x168c: 0x8935, 0x168d: 0x88f5, 0x168e: 0x8935, 0x168f: 0x8715, 0x1690: 0x0040, 0x1691: 0x0040, + 0x1692: 0x8955, 0x1693: 0x8975, 0x1694: 0x8875, 0x1695: 0x8935, 0x1696: 0x88f5, 0x1697: 0x8935, + 0x1698: 0x0040, 0x1699: 0x0040, 0x169a: 0x8995, 0x169b: 0x89b5, 0x169c: 0x8995, 0x169d: 0x0040, + 0x169e: 0x0040, 0x169f: 0x0040, 0x16a0: 0xb541, 0x16a1: 0xb559, 0x16a2: 0xb571, 0x16a3: 0x89d6, + 0x16a4: 0xb589, 0x16a5: 0xb5a1, 0x16a6: 0x89f5, 0x16a7: 0x0040, 0x16a8: 0x8a15, 0x16a9: 0x8a35, + 0x16aa: 0x8a55, 0x16ab: 0x8a35, 0x16ac: 0x8a75, 0x16ad: 0x8a95, 0x16ae: 0x8ab5, 0x16af: 0x0040, + 0x16b0: 0x0040, 0x16b1: 0x0040, 0x16b2: 0x0040, 0x16b3: 0x0040, 0x16b4: 0x0040, 0x16b5: 0x0040, + 0x16b6: 0x0040, 0x16b7: 0x0040, 0x16b8: 0x0040, 0x16b9: 0x0340, 0x16ba: 0x0340, 0x16bb: 0x0340, + 0x16bc: 0x0040, 0x16bd: 0x0040, 0x16be: 0x0040, 0x16bf: 0x0040, // Block 0x5b, offset 0x16c0 - 0x16c0: 0x8475, 0x16c1: 0x8495, 0x16c2: 0x84b5, 0x16c3: 0x84d5, 0x16c4: 0x84f5, 0x16c5: 0x8515, - 0x16c6: 0x8535, 0x16c7: 0x8555, 0x16c8: 0x84d5, 0x16c9: 0x8575, 0x16ca: 0x84d5, 0x16cb: 0x8595, - 0x16cc: 0x8595, 0x16cd: 0x85b5, 0x16ce: 0x85b5, 0x16cf: 0x85d5, 0x16d0: 0x8515, 0x16d1: 0x85f5, - 0x16d2: 0x8615, 0x16d3: 0x85f5, 0x16d4: 0x8635, 0x16d5: 0x8615, 0x16d6: 0x8655, 0x16d7: 0x8655, - 0x16d8: 0x8675, 0x16d9: 0x8675, 0x16da: 0x8695, 0x16db: 0x8695, 0x16dc: 0x8615, 0x16dd: 0x8115, - 0x16de: 0x86b5, 0x16df: 0x86d5, 0x16e0: 0x0040, 0x16e1: 0x86f5, 0x16e2: 0x8715, 0x16e3: 0x8735, - 0x16e4: 0x8755, 0x16e5: 0x8735, 0x16e6: 0x8775, 0x16e7: 0x8795, 0x16e8: 0x87b5, 0x16e9: 0x87b5, - 0x16ea: 0x87d5, 0x16eb: 0x87d5, 0x16ec: 0x87f5, 0x16ed: 0x87f5, 0x16ee: 0x87d5, 0x16ef: 0x87d5, - 0x16f0: 0x8815, 0x16f1: 0x8835, 0x16f2: 0x8855, 0x16f3: 0x8875, 0x16f4: 0x8895, 0x16f5: 0x88b5, - 0x16f6: 0x88b5, 0x16f7: 0x88b5, 0x16f8: 0x88d5, 0x16f9: 0x88d5, 0x16fa: 0x88d5, 0x16fb: 0x88d5, - 0x16fc: 0x87b5, 0x16fd: 0x87b5, 0x16fe: 0x87b5, 0x16ff: 0x0040, + 0x16c0: 0x0208, 0x16c1: 0x0208, 0x16c2: 0x0208, 0x16c3: 0x0208, 0x16c4: 0x0208, 0x16c5: 0x0408, + 0x16c6: 0x0008, 0x16c7: 0x0408, 0x16c8: 0x0018, 0x16c9: 0x0408, 0x16ca: 0x0408, 0x16cb: 0x0008, + 0x16cc: 0x0008, 0x16cd: 0x0108, 0x16ce: 0x0408, 0x16cf: 0x0408, 0x16d0: 0x0408, 0x16d1: 0x0408, + 0x16d2: 0x0408, 0x16d3: 0x0208, 0x16d4: 0x0208, 0x16d5: 0x0208, 0x16d6: 0x0208, 0x16d7: 0x0108, + 0x16d8: 0x0208, 0x16d9: 0x0208, 0x16da: 0x0208, 0x16db: 0x0208, 0x16dc: 0x0208, 0x16dd: 0x0408, + 0x16de: 0x0208, 0x16df: 0x0208, 0x16e0: 0x0208, 0x16e1: 0x0408, 0x16e2: 0x0008, 0x16e3: 0x0008, + 0x16e4: 0x0408, 0x16e5: 0x1308, 0x16e6: 0x1308, 0x16e7: 0x0040, 0x16e8: 0x0040, 0x16e9: 0x0040, + 0x16ea: 0x0040, 0x16eb: 0x0218, 0x16ec: 0x0218, 0x16ed: 0x0218, 0x16ee: 0x0218, 0x16ef: 0x0418, + 0x16f0: 0x0018, 0x16f1: 0x0018, 0x16f2: 0x0018, 0x16f3: 0x0018, 0x16f4: 0x0018, 0x16f5: 0x0018, + 0x16f6: 0x0018, 0x16f7: 0x0040, 0x16f8: 0x0040, 0x16f9: 0x0040, 0x16fa: 0x0040, 0x16fb: 0x0040, + 0x16fc: 0x0040, 0x16fd: 0x0040, 0x16fe: 0x0040, 0x16ff: 0x0040, // Block 0x5c, offset 0x1700 - 0x1700: 0x0040, 0x1701: 0x0040, 0x1702: 0x8715, 0x1703: 0x86f5, 0x1704: 0x88f5, 0x1705: 0x86f5, - 0x1706: 0x8715, 0x1707: 0x86f5, 0x1708: 0x0040, 0x1709: 0x0040, 0x170a: 0x8915, 0x170b: 0x8715, - 0x170c: 0x8935, 0x170d: 0x88f5, 0x170e: 0x8935, 0x170f: 0x8715, 0x1710: 0x0040, 0x1711: 0x0040, - 0x1712: 0x8955, 0x1713: 0x8975, 0x1714: 0x8875, 0x1715: 0x8935, 0x1716: 0x88f5, 0x1717: 0x8935, - 0x1718: 0x0040, 0x1719: 0x0040, 0x171a: 0x8995, 0x171b: 0x89b5, 0x171c: 0x8995, 0x171d: 0x0040, - 0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0xb541, 0x1721: 0xb559, 0x1722: 0xb571, 0x1723: 0x89d6, - 0x1724: 0xb589, 0x1725: 0xb5a1, 0x1726: 0x89f5, 0x1727: 0x0040, 0x1728: 0x8a15, 0x1729: 0x8a35, - 0x172a: 0x8a55, 0x172b: 0x8a35, 0x172c: 0x8a75, 0x172d: 0x8a95, 0x172e: 0x8ab5, 0x172f: 0x0040, + 0x1700: 0x0208, 0x1701: 0x0408, 0x1702: 0x0208, 0x1703: 0x0408, 0x1704: 0x0408, 0x1705: 0x0408, + 0x1706: 0x0208, 0x1707: 0x0208, 0x1708: 0x0208, 0x1709: 0x0408, 0x170a: 0x0208, 0x170b: 0x0208, + 0x170c: 0x0408, 0x170d: 0x0208, 0x170e: 0x0408, 0x170f: 0x0408, 0x1710: 0x0208, 0x1711: 0x0408, + 0x1712: 0x0040, 0x1713: 0x0040, 0x1714: 0x0040, 0x1715: 0x0040, 0x1716: 0x0040, 0x1717: 0x0040, + 0x1718: 0x0040, 0x1719: 0x0018, 0x171a: 0x0018, 0x171b: 0x0018, 0x171c: 0x0018, 0x171d: 0x0040, + 0x171e: 0x0040, 0x171f: 0x0040, 0x1720: 0x0040, 0x1721: 0x0040, 0x1722: 0x0040, 0x1723: 0x0040, + 0x1724: 0x0040, 0x1725: 0x0040, 0x1726: 0x0040, 0x1727: 0x0040, 0x1728: 0x0040, 0x1729: 0x0418, + 0x172a: 0x0418, 0x172b: 0x0418, 0x172c: 0x0418, 0x172d: 0x0218, 0x172e: 0x0218, 0x172f: 0x0018, 0x1730: 0x0040, 0x1731: 0x0040, 0x1732: 0x0040, 0x1733: 0x0040, 0x1734: 0x0040, 0x1735: 0x0040, - 0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0340, 0x173a: 0x0340, 0x173b: 0x0340, + 0x1736: 0x0040, 0x1737: 0x0040, 0x1738: 0x0040, 0x1739: 0x0040, 0x173a: 0x0040, 0x173b: 0x0040, 0x173c: 0x0040, 0x173d: 0x0040, 0x173e: 0x0040, 0x173f: 0x0040, // Block 0x5d, offset 0x1740 - 0x1740: 0x0a08, 0x1741: 0x0a08, 0x1742: 0x0a08, 0x1743: 0x0a08, 0x1744: 0x0a08, 0x1745: 0x0c08, - 0x1746: 0x0808, 0x1747: 0x0c08, 0x1748: 0x0818, 0x1749: 0x0c08, 0x174a: 0x0c08, 0x174b: 0x0808, - 0x174c: 0x0808, 0x174d: 0x0908, 0x174e: 0x0c08, 0x174f: 0x0c08, 0x1750: 0x0c08, 0x1751: 0x0c08, - 0x1752: 0x0c08, 0x1753: 0x0a08, 0x1754: 0x0a08, 0x1755: 0x0a08, 0x1756: 0x0a08, 0x1757: 0x0908, - 0x1758: 0x0a08, 0x1759: 0x0a08, 0x175a: 0x0a08, 0x175b: 0x0a08, 0x175c: 0x0a08, 0x175d: 0x0c08, - 0x175e: 0x0a08, 0x175f: 0x0a08, 0x1760: 0x0a08, 0x1761: 0x0c08, 0x1762: 0x0808, 0x1763: 0x0808, - 0x1764: 0x0c08, 0x1765: 0x3308, 0x1766: 0x3308, 0x1767: 0x0040, 0x1768: 0x0040, 0x1769: 0x0040, - 0x176a: 0x0040, 0x176b: 0x0a18, 0x176c: 0x0a18, 0x176d: 0x0a18, 0x176e: 0x0a18, 0x176f: 0x0c18, - 0x1770: 0x0818, 0x1771: 0x0818, 0x1772: 0x0818, 0x1773: 0x0818, 0x1774: 0x0818, 0x1775: 0x0818, - 0x1776: 0x0818, 0x1777: 0x0040, 0x1778: 0x0040, 0x1779: 0x0040, 0x177a: 0x0040, 0x177b: 0x0040, - 0x177c: 0x0040, 0x177d: 0x0040, 0x177e: 0x0040, 0x177f: 0x0040, + 0x1740: 0x1308, 0x1741: 0x1308, 0x1742: 0x1008, 0x1743: 0x1008, 0x1744: 0x0040, 0x1745: 0x0008, + 0x1746: 0x0008, 0x1747: 0x0008, 0x1748: 0x0008, 0x1749: 0x0008, 0x174a: 0x0008, 0x174b: 0x0008, + 0x174c: 0x0008, 0x174d: 0x0040, 0x174e: 0x0040, 0x174f: 0x0008, 0x1750: 0x0008, 0x1751: 0x0040, + 0x1752: 0x0040, 0x1753: 0x0008, 0x1754: 0x0008, 0x1755: 0x0008, 0x1756: 0x0008, 0x1757: 0x0008, + 0x1758: 0x0008, 0x1759: 0x0008, 0x175a: 0x0008, 0x175b: 0x0008, 0x175c: 0x0008, 0x175d: 0x0008, + 0x175e: 0x0008, 0x175f: 0x0008, 0x1760: 0x0008, 0x1761: 0x0008, 0x1762: 0x0008, 0x1763: 0x0008, + 0x1764: 0x0008, 0x1765: 0x0008, 0x1766: 0x0008, 0x1767: 0x0008, 0x1768: 0x0008, 0x1769: 0x0040, + 0x176a: 0x0008, 0x176b: 0x0008, 0x176c: 0x0008, 0x176d: 0x0008, 0x176e: 0x0008, 0x176f: 0x0008, + 0x1770: 0x0008, 0x1771: 0x0040, 0x1772: 0x0008, 0x1773: 0x0008, 0x1774: 0x0040, 0x1775: 0x0008, + 0x1776: 0x0008, 0x1777: 0x0008, 0x1778: 0x0008, 0x1779: 0x0008, 0x177a: 0x0040, 0x177b: 0x0040, + 0x177c: 0x1308, 0x177d: 0x0008, 0x177e: 0x1008, 0x177f: 0x1008, // Block 0x5e, offset 0x1780 - 0x1780: 0x0a08, 0x1781: 0x0c08, 0x1782: 0x0a08, 0x1783: 0x0c08, 0x1784: 0x0c08, 0x1785: 0x0c08, - 0x1786: 0x0a08, 0x1787: 0x0a08, 0x1788: 0x0a08, 0x1789: 0x0c08, 0x178a: 0x0a08, 0x178b: 0x0a08, - 0x178c: 0x0c08, 0x178d: 0x0a08, 0x178e: 0x0c08, 0x178f: 0x0c08, 0x1790: 0x0a08, 0x1791: 0x0c08, - 0x1792: 0x0040, 0x1793: 0x0040, 0x1794: 0x0040, 0x1795: 0x0040, 0x1796: 0x0040, 0x1797: 0x0040, - 0x1798: 0x0040, 0x1799: 0x0818, 0x179a: 0x0818, 0x179b: 0x0818, 0x179c: 0x0818, 0x179d: 0x0040, - 0x179e: 0x0040, 0x179f: 0x0040, 0x17a0: 0x0040, 0x17a1: 0x0040, 0x17a2: 0x0040, 0x17a3: 0x0040, - 0x17a4: 0x0040, 0x17a5: 0x0040, 0x17a6: 0x0040, 0x17a7: 0x0040, 0x17a8: 0x0040, 0x17a9: 0x0c18, - 0x17aa: 0x0c18, 0x17ab: 0x0c18, 0x17ac: 0x0c18, 0x17ad: 0x0a18, 0x17ae: 0x0a18, 0x17af: 0x0818, - 0x17b0: 0x0040, 0x17b1: 0x0040, 0x17b2: 0x0040, 0x17b3: 0x0040, 0x17b4: 0x0040, 0x17b5: 0x0040, + 0x1780: 0x1308, 0x1781: 0x1008, 0x1782: 0x1008, 0x1783: 0x1008, 0x1784: 0x1008, 0x1785: 0x0040, + 0x1786: 0x0040, 0x1787: 0x1008, 0x1788: 0x1008, 0x1789: 0x0040, 0x178a: 0x0040, 0x178b: 0x1008, + 0x178c: 0x1008, 0x178d: 0x1808, 0x178e: 0x0040, 0x178f: 0x0040, 0x1790: 0x0008, 0x1791: 0x0040, + 0x1792: 0x0040, 0x1793: 0x0040, 0x1794: 0x0040, 0x1795: 0x0040, 0x1796: 0x0040, 0x1797: 0x1008, + 0x1798: 0x0040, 0x1799: 0x0040, 0x179a: 0x0040, 0x179b: 0x0040, 0x179c: 0x0040, 0x179d: 0x0008, + 0x179e: 0x0008, 0x179f: 0x0008, 0x17a0: 0x0008, 0x17a1: 0x0008, 0x17a2: 0x1008, 0x17a3: 0x1008, + 0x17a4: 0x0040, 0x17a5: 0x0040, 0x17a6: 0x1308, 0x17a7: 0x1308, 0x17a8: 0x1308, 0x17a9: 0x1308, + 0x17aa: 0x1308, 0x17ab: 0x1308, 0x17ac: 0x1308, 0x17ad: 0x0040, 0x17ae: 0x0040, 0x17af: 0x0040, + 0x17b0: 0x1308, 0x17b1: 0x1308, 0x17b2: 0x1308, 0x17b3: 0x1308, 0x17b4: 0x1308, 0x17b5: 0x0040, 0x17b6: 0x0040, 0x17b7: 0x0040, 0x17b8: 0x0040, 0x17b9: 0x0040, 0x17ba: 0x0040, 0x17bb: 0x0040, 0x17bc: 0x0040, 0x17bd: 0x0040, 0x17be: 0x0040, 0x17bf: 0x0040, // Block 0x5f, offset 0x17c0 - 0x17c0: 0x3308, 0x17c1: 0x3308, 0x17c2: 0x3008, 0x17c3: 0x3008, 0x17c4: 0x0040, 0x17c5: 0x0008, - 0x17c6: 0x0008, 0x17c7: 0x0008, 0x17c8: 0x0008, 0x17c9: 0x0008, 0x17ca: 0x0008, 0x17cb: 0x0008, - 0x17cc: 0x0008, 0x17cd: 0x0040, 0x17ce: 0x0040, 0x17cf: 0x0008, 0x17d0: 0x0008, 0x17d1: 0x0040, - 0x17d2: 0x0040, 0x17d3: 0x0008, 0x17d4: 0x0008, 0x17d5: 0x0008, 0x17d6: 0x0008, 0x17d7: 0x0008, - 0x17d8: 0x0008, 0x17d9: 0x0008, 0x17da: 0x0008, 0x17db: 0x0008, 0x17dc: 0x0008, 0x17dd: 0x0008, - 0x17de: 0x0008, 0x17df: 0x0008, 0x17e0: 0x0008, 0x17e1: 0x0008, 0x17e2: 0x0008, 0x17e3: 0x0008, - 0x17e4: 0x0008, 0x17e5: 0x0008, 0x17e6: 0x0008, 0x17e7: 0x0008, 0x17e8: 0x0008, 0x17e9: 0x0040, - 0x17ea: 0x0008, 0x17eb: 0x0008, 0x17ec: 0x0008, 0x17ed: 0x0008, 0x17ee: 0x0008, 0x17ef: 0x0008, - 0x17f0: 0x0008, 0x17f1: 0x0040, 0x17f2: 0x0008, 0x17f3: 0x0008, 0x17f4: 0x0040, 0x17f5: 0x0008, - 0x17f6: 0x0008, 0x17f7: 0x0008, 0x17f8: 0x0008, 0x17f9: 0x0008, 0x17fa: 0x0040, 0x17fb: 0x0040, - 0x17fc: 0x3308, 0x17fd: 0x0008, 0x17fe: 0x3008, 0x17ff: 0x3008, + 0x17c0: 0x0039, 0x17c1: 0x0ee9, 0x17c2: 0x1159, 0x17c3: 0x0ef9, 0x17c4: 0x0f09, 0x17c5: 0x1199, + 0x17c6: 0x0f31, 0x17c7: 0x0249, 0x17c8: 0x0f41, 0x17c9: 0x0259, 0x17ca: 0x0f51, 0x17cb: 0x0359, + 0x17cc: 0x0f61, 0x17cd: 0x0f71, 0x17ce: 0x00d9, 0x17cf: 0x0f99, 0x17d0: 0x2039, 0x17d1: 0x0269, + 0x17d2: 0x01d9, 0x17d3: 0x0fa9, 0x17d4: 0x0fb9, 0x17d5: 0x1089, 0x17d6: 0x0279, 0x17d7: 0x0369, + 0x17d8: 0x0289, 0x17d9: 0x13d1, 0x17da: 0x0039, 0x17db: 0x0ee9, 0x17dc: 0x1159, 0x17dd: 0x0ef9, + 0x17de: 0x0f09, 0x17df: 0x1199, 0x17e0: 0x0f31, 0x17e1: 0x0249, 0x17e2: 0x0f41, 0x17e3: 0x0259, + 0x17e4: 0x0f51, 0x17e5: 0x0359, 0x17e6: 0x0f61, 0x17e7: 0x0f71, 0x17e8: 0x00d9, 0x17e9: 0x0f99, + 0x17ea: 0x2039, 0x17eb: 0x0269, 0x17ec: 0x01d9, 0x17ed: 0x0fa9, 0x17ee: 0x0fb9, 0x17ef: 0x1089, + 0x17f0: 0x0279, 0x17f1: 0x0369, 0x17f2: 0x0289, 0x17f3: 0x13d1, 0x17f4: 0x0039, 0x17f5: 0x0ee9, + 0x17f6: 0x1159, 0x17f7: 0x0ef9, 0x17f8: 0x0f09, 0x17f9: 0x1199, 0x17fa: 0x0f31, 0x17fb: 0x0249, + 0x17fc: 0x0f41, 0x17fd: 0x0259, 0x17fe: 0x0f51, 0x17ff: 0x0359, // Block 0x60, offset 0x1800 - 0x1800: 0x3308, 0x1801: 0x3008, 0x1802: 0x3008, 0x1803: 0x3008, 0x1804: 0x3008, 0x1805: 0x0040, - 0x1806: 0x0040, 0x1807: 0x3008, 0x1808: 0x3008, 0x1809: 0x0040, 0x180a: 0x0040, 0x180b: 0x3008, - 0x180c: 0x3008, 0x180d: 0x3808, 0x180e: 0x0040, 0x180f: 0x0040, 0x1810: 0x0008, 0x1811: 0x0040, - 0x1812: 0x0040, 0x1813: 0x0040, 0x1814: 0x0040, 0x1815: 0x0040, 0x1816: 0x0040, 0x1817: 0x3008, - 0x1818: 0x0040, 0x1819: 0x0040, 0x181a: 0x0040, 0x181b: 0x0040, 0x181c: 0x0040, 0x181d: 0x0008, - 0x181e: 0x0008, 0x181f: 0x0008, 0x1820: 0x0008, 0x1821: 0x0008, 0x1822: 0x3008, 0x1823: 0x3008, - 0x1824: 0x0040, 0x1825: 0x0040, 0x1826: 0x3308, 0x1827: 0x3308, 0x1828: 0x3308, 0x1829: 0x3308, - 0x182a: 0x3308, 0x182b: 0x3308, 0x182c: 0x3308, 0x182d: 0x0040, 0x182e: 0x0040, 0x182f: 0x0040, - 0x1830: 0x3308, 0x1831: 0x3308, 0x1832: 0x3308, 0x1833: 0x3308, 0x1834: 0x3308, 0x1835: 0x0040, - 0x1836: 0x0040, 0x1837: 0x0040, 0x1838: 0x0040, 0x1839: 0x0040, 0x183a: 0x0040, 0x183b: 0x0040, - 0x183c: 0x0040, 0x183d: 0x0040, 0x183e: 0x0040, 0x183f: 0x0040, + 0x1800: 0x0f61, 0x1801: 0x0f71, 0x1802: 0x00d9, 0x1803: 0x0f99, 0x1804: 0x2039, 0x1805: 0x0269, + 0x1806: 0x01d9, 0x1807: 0x0fa9, 0x1808: 0x0fb9, 0x1809: 0x1089, 0x180a: 0x0279, 0x180b: 0x0369, + 0x180c: 0x0289, 0x180d: 0x13d1, 0x180e: 0x0039, 0x180f: 0x0ee9, 0x1810: 0x1159, 0x1811: 0x0ef9, + 0x1812: 0x0f09, 0x1813: 0x1199, 0x1814: 0x0f31, 0x1815: 0x0040, 0x1816: 0x0f41, 0x1817: 0x0259, + 0x1818: 0x0f51, 0x1819: 0x0359, 0x181a: 0x0f61, 0x181b: 0x0f71, 0x181c: 0x00d9, 0x181d: 0x0f99, + 0x181e: 0x2039, 0x181f: 0x0269, 0x1820: 0x01d9, 0x1821: 0x0fa9, 0x1822: 0x0fb9, 0x1823: 0x1089, + 0x1824: 0x0279, 0x1825: 0x0369, 0x1826: 0x0289, 0x1827: 0x13d1, 0x1828: 0x0039, 0x1829: 0x0ee9, + 0x182a: 0x1159, 0x182b: 0x0ef9, 0x182c: 0x0f09, 0x182d: 0x1199, 0x182e: 0x0f31, 0x182f: 0x0249, + 0x1830: 0x0f41, 0x1831: 0x0259, 0x1832: 0x0f51, 0x1833: 0x0359, 0x1834: 0x0f61, 0x1835: 0x0f71, + 0x1836: 0x00d9, 0x1837: 0x0f99, 0x1838: 0x2039, 0x1839: 0x0269, 0x183a: 0x01d9, 0x183b: 0x0fa9, + 0x183c: 0x0fb9, 0x183d: 0x1089, 0x183e: 0x0279, 0x183f: 0x0369, // Block 0x61, offset 0x1840 - 0x1840: 0x0039, 0x1841: 0x0ee9, 0x1842: 0x1159, 0x1843: 0x0ef9, 0x1844: 0x0f09, 0x1845: 0x1199, - 0x1846: 0x0f31, 0x1847: 0x0249, 0x1848: 0x0f41, 0x1849: 0x0259, 0x184a: 0x0f51, 0x184b: 0x0359, - 0x184c: 0x0f61, 0x184d: 0x0f71, 0x184e: 0x00d9, 0x184f: 0x0f99, 0x1850: 0x2039, 0x1851: 0x0269, - 0x1852: 0x01d9, 0x1853: 0x0fa9, 0x1854: 0x0fb9, 0x1855: 0x1089, 0x1856: 0x0279, 0x1857: 0x0369, - 0x1858: 0x0289, 0x1859: 0x13d1, 0x185a: 0x0039, 0x185b: 0x0ee9, 0x185c: 0x1159, 0x185d: 0x0ef9, - 0x185e: 0x0f09, 0x185f: 0x1199, 0x1860: 0x0f31, 0x1861: 0x0249, 0x1862: 0x0f41, 0x1863: 0x0259, - 0x1864: 0x0f51, 0x1865: 0x0359, 0x1866: 0x0f61, 0x1867: 0x0f71, 0x1868: 0x00d9, 0x1869: 0x0f99, - 0x186a: 0x2039, 0x186b: 0x0269, 0x186c: 0x01d9, 0x186d: 0x0fa9, 0x186e: 0x0fb9, 0x186f: 0x1089, - 0x1870: 0x0279, 0x1871: 0x0369, 0x1872: 0x0289, 0x1873: 0x13d1, 0x1874: 0x0039, 0x1875: 0x0ee9, - 0x1876: 0x1159, 0x1877: 0x0ef9, 0x1878: 0x0f09, 0x1879: 0x1199, 0x187a: 0x0f31, 0x187b: 0x0249, - 0x187c: 0x0f41, 0x187d: 0x0259, 0x187e: 0x0f51, 0x187f: 0x0359, + 0x1840: 0x0289, 0x1841: 0x13d1, 0x1842: 0x0039, 0x1843: 0x0ee9, 0x1844: 0x1159, 0x1845: 0x0ef9, + 0x1846: 0x0f09, 0x1847: 0x1199, 0x1848: 0x0f31, 0x1849: 0x0249, 0x184a: 0x0f41, 0x184b: 0x0259, + 0x184c: 0x0f51, 0x184d: 0x0359, 0x184e: 0x0f61, 0x184f: 0x0f71, 0x1850: 0x00d9, 0x1851: 0x0f99, + 0x1852: 0x2039, 0x1853: 0x0269, 0x1854: 0x01d9, 0x1855: 0x0fa9, 0x1856: 0x0fb9, 0x1857: 0x1089, + 0x1858: 0x0279, 0x1859: 0x0369, 0x185a: 0x0289, 0x185b: 0x13d1, 0x185c: 0x0039, 0x185d: 0x0040, + 0x185e: 0x1159, 0x185f: 0x0ef9, 0x1860: 0x0040, 0x1861: 0x0040, 0x1862: 0x0f31, 0x1863: 0x0040, + 0x1864: 0x0040, 0x1865: 0x0259, 0x1866: 0x0f51, 0x1867: 0x0040, 0x1868: 0x0040, 0x1869: 0x0f71, + 0x186a: 0x00d9, 0x186b: 0x0f99, 0x186c: 0x2039, 0x186d: 0x0040, 0x186e: 0x01d9, 0x186f: 0x0fa9, + 0x1870: 0x0fb9, 0x1871: 0x1089, 0x1872: 0x0279, 0x1873: 0x0369, 0x1874: 0x0289, 0x1875: 0x13d1, + 0x1876: 0x0039, 0x1877: 0x0ee9, 0x1878: 0x1159, 0x1879: 0x0ef9, 0x187a: 0x0040, 0x187b: 0x1199, + 0x187c: 0x0040, 0x187d: 0x0249, 0x187e: 0x0f41, 0x187f: 0x0259, // Block 0x62, offset 0x1880 - 0x1880: 0x0f61, 0x1881: 0x0f71, 0x1882: 0x00d9, 0x1883: 0x0f99, 0x1884: 0x2039, 0x1885: 0x0269, - 0x1886: 0x01d9, 0x1887: 0x0fa9, 0x1888: 0x0fb9, 0x1889: 0x1089, 0x188a: 0x0279, 0x188b: 0x0369, - 0x188c: 0x0289, 0x188d: 0x13d1, 0x188e: 0x0039, 0x188f: 0x0ee9, 0x1890: 0x1159, 0x1891: 0x0ef9, - 0x1892: 0x0f09, 0x1893: 0x1199, 0x1894: 0x0f31, 0x1895: 0x0040, 0x1896: 0x0f41, 0x1897: 0x0259, - 0x1898: 0x0f51, 0x1899: 0x0359, 0x189a: 0x0f61, 0x189b: 0x0f71, 0x189c: 0x00d9, 0x189d: 0x0f99, - 0x189e: 0x2039, 0x189f: 0x0269, 0x18a0: 0x01d9, 0x18a1: 0x0fa9, 0x18a2: 0x0fb9, 0x18a3: 0x1089, - 0x18a4: 0x0279, 0x18a5: 0x0369, 0x18a6: 0x0289, 0x18a7: 0x13d1, 0x18a8: 0x0039, 0x18a9: 0x0ee9, - 0x18aa: 0x1159, 0x18ab: 0x0ef9, 0x18ac: 0x0f09, 0x18ad: 0x1199, 0x18ae: 0x0f31, 0x18af: 0x0249, - 0x18b0: 0x0f41, 0x18b1: 0x0259, 0x18b2: 0x0f51, 0x18b3: 0x0359, 0x18b4: 0x0f61, 0x18b5: 0x0f71, - 0x18b6: 0x00d9, 0x18b7: 0x0f99, 0x18b8: 0x2039, 0x18b9: 0x0269, 0x18ba: 0x01d9, 0x18bb: 0x0fa9, - 0x18bc: 0x0fb9, 0x18bd: 0x1089, 0x18be: 0x0279, 0x18bf: 0x0369, + 0x1880: 0x0f51, 0x1881: 0x0359, 0x1882: 0x0f61, 0x1883: 0x0f71, 0x1884: 0x0040, 0x1885: 0x0f99, + 0x1886: 0x2039, 0x1887: 0x0269, 0x1888: 0x01d9, 0x1889: 0x0fa9, 0x188a: 0x0fb9, 0x188b: 0x1089, + 0x188c: 0x0279, 0x188d: 0x0369, 0x188e: 0x0289, 0x188f: 0x13d1, 0x1890: 0x0039, 0x1891: 0x0ee9, + 0x1892: 0x1159, 0x1893: 0x0ef9, 0x1894: 0x0f09, 0x1895: 0x1199, 0x1896: 0x0f31, 0x1897: 0x0249, + 0x1898: 0x0f41, 0x1899: 0x0259, 0x189a: 0x0f51, 0x189b: 0x0359, 0x189c: 0x0f61, 0x189d: 0x0f71, + 0x189e: 0x00d9, 0x189f: 0x0f99, 0x18a0: 0x2039, 0x18a1: 0x0269, 0x18a2: 0x01d9, 0x18a3: 0x0fa9, + 0x18a4: 0x0fb9, 0x18a5: 0x1089, 0x18a6: 0x0279, 0x18a7: 0x0369, 0x18a8: 0x0289, 0x18a9: 0x13d1, + 0x18aa: 0x0039, 0x18ab: 0x0ee9, 0x18ac: 0x1159, 0x18ad: 0x0ef9, 0x18ae: 0x0f09, 0x18af: 0x1199, + 0x18b0: 0x0f31, 0x18b1: 0x0249, 0x18b2: 0x0f41, 0x18b3: 0x0259, 0x18b4: 0x0f51, 0x18b5: 0x0359, + 0x18b6: 0x0f61, 0x18b7: 0x0f71, 0x18b8: 0x00d9, 0x18b9: 0x0f99, 0x18ba: 0x2039, 0x18bb: 0x0269, + 0x18bc: 0x01d9, 0x18bd: 0x0fa9, 0x18be: 0x0fb9, 0x18bf: 0x1089, // Block 0x63, offset 0x18c0 - 0x18c0: 0x0289, 0x18c1: 0x13d1, 0x18c2: 0x0039, 0x18c3: 0x0ee9, 0x18c4: 0x1159, 0x18c5: 0x0ef9, - 0x18c6: 0x0f09, 0x18c7: 0x1199, 0x18c8: 0x0f31, 0x18c9: 0x0249, 0x18ca: 0x0f41, 0x18cb: 0x0259, - 0x18cc: 0x0f51, 0x18cd: 0x0359, 0x18ce: 0x0f61, 0x18cf: 0x0f71, 0x18d0: 0x00d9, 0x18d1: 0x0f99, - 0x18d2: 0x2039, 0x18d3: 0x0269, 0x18d4: 0x01d9, 0x18d5: 0x0fa9, 0x18d6: 0x0fb9, 0x18d7: 0x1089, - 0x18d8: 0x0279, 0x18d9: 0x0369, 0x18da: 0x0289, 0x18db: 0x13d1, 0x18dc: 0x0039, 0x18dd: 0x0040, - 0x18de: 0x1159, 0x18df: 0x0ef9, 0x18e0: 0x0040, 0x18e1: 0x0040, 0x18e2: 0x0f31, 0x18e3: 0x0040, - 0x18e4: 0x0040, 0x18e5: 0x0259, 0x18e6: 0x0f51, 0x18e7: 0x0040, 0x18e8: 0x0040, 0x18e9: 0x0f71, - 0x18ea: 0x00d9, 0x18eb: 0x0f99, 0x18ec: 0x2039, 0x18ed: 0x0040, 0x18ee: 0x01d9, 0x18ef: 0x0fa9, - 0x18f0: 0x0fb9, 0x18f1: 0x1089, 0x18f2: 0x0279, 0x18f3: 0x0369, 0x18f4: 0x0289, 0x18f5: 0x13d1, - 0x18f6: 0x0039, 0x18f7: 0x0ee9, 0x18f8: 0x1159, 0x18f9: 0x0ef9, 0x18fa: 0x0040, 0x18fb: 0x1199, - 0x18fc: 0x0040, 0x18fd: 0x0249, 0x18fe: 0x0f41, 0x18ff: 0x0259, + 0x18c0: 0x0279, 0x18c1: 0x0369, 0x18c2: 0x0289, 0x18c3: 0x13d1, 0x18c4: 0x0039, 0x18c5: 0x0ee9, + 0x18c6: 0x0040, 0x18c7: 0x0ef9, 0x18c8: 0x0f09, 0x18c9: 0x1199, 0x18ca: 0x0f31, 0x18cb: 0x0040, + 0x18cc: 0x0040, 0x18cd: 0x0259, 0x18ce: 0x0f51, 0x18cf: 0x0359, 0x18d0: 0x0f61, 0x18d1: 0x0f71, + 0x18d2: 0x00d9, 0x18d3: 0x0f99, 0x18d4: 0x2039, 0x18d5: 0x0040, 0x18d6: 0x01d9, 0x18d7: 0x0fa9, + 0x18d8: 0x0fb9, 0x18d9: 0x1089, 0x18da: 0x0279, 0x18db: 0x0369, 0x18dc: 0x0289, 0x18dd: 0x0040, + 0x18de: 0x0039, 0x18df: 0x0ee9, 0x18e0: 0x1159, 0x18e1: 0x0ef9, 0x18e2: 0x0f09, 0x18e3: 0x1199, + 0x18e4: 0x0f31, 0x18e5: 0x0249, 0x18e6: 0x0f41, 0x18e7: 0x0259, 0x18e8: 0x0f51, 0x18e9: 0x0359, + 0x18ea: 0x0f61, 0x18eb: 0x0f71, 0x18ec: 0x00d9, 0x18ed: 0x0f99, 0x18ee: 0x2039, 0x18ef: 0x0269, + 0x18f0: 0x01d9, 0x18f1: 0x0fa9, 0x18f2: 0x0fb9, 0x18f3: 0x1089, 0x18f4: 0x0279, 0x18f5: 0x0369, + 0x18f6: 0x0289, 0x18f7: 0x13d1, 0x18f8: 0x0039, 0x18f9: 0x0ee9, 0x18fa: 0x0040, 0x18fb: 0x0ef9, + 0x18fc: 0x0f09, 0x18fd: 0x1199, 0x18fe: 0x0f31, 0x18ff: 0x0040, // Block 0x64, offset 0x1900 - 0x1900: 0x0f51, 0x1901: 0x0359, 0x1902: 0x0f61, 0x1903: 0x0f71, 0x1904: 0x0040, 0x1905: 0x0f99, - 0x1906: 0x2039, 0x1907: 0x0269, 0x1908: 0x01d9, 0x1909: 0x0fa9, 0x190a: 0x0fb9, 0x190b: 0x1089, - 0x190c: 0x0279, 0x190d: 0x0369, 0x190e: 0x0289, 0x190f: 0x13d1, 0x1910: 0x0039, 0x1911: 0x0ee9, - 0x1912: 0x1159, 0x1913: 0x0ef9, 0x1914: 0x0f09, 0x1915: 0x1199, 0x1916: 0x0f31, 0x1917: 0x0249, - 0x1918: 0x0f41, 0x1919: 0x0259, 0x191a: 0x0f51, 0x191b: 0x0359, 0x191c: 0x0f61, 0x191d: 0x0f71, - 0x191e: 0x00d9, 0x191f: 0x0f99, 0x1920: 0x2039, 0x1921: 0x0269, 0x1922: 0x01d9, 0x1923: 0x0fa9, - 0x1924: 0x0fb9, 0x1925: 0x1089, 0x1926: 0x0279, 0x1927: 0x0369, 0x1928: 0x0289, 0x1929: 0x13d1, - 0x192a: 0x0039, 0x192b: 0x0ee9, 0x192c: 0x1159, 0x192d: 0x0ef9, 0x192e: 0x0f09, 0x192f: 0x1199, - 0x1930: 0x0f31, 0x1931: 0x0249, 0x1932: 0x0f41, 0x1933: 0x0259, 0x1934: 0x0f51, 0x1935: 0x0359, - 0x1936: 0x0f61, 0x1937: 0x0f71, 0x1938: 0x00d9, 0x1939: 0x0f99, 0x193a: 0x2039, 0x193b: 0x0269, - 0x193c: 0x01d9, 0x193d: 0x0fa9, 0x193e: 0x0fb9, 0x193f: 0x1089, + 0x1900: 0x0f41, 0x1901: 0x0259, 0x1902: 0x0f51, 0x1903: 0x0359, 0x1904: 0x0f61, 0x1905: 0x0040, + 0x1906: 0x00d9, 0x1907: 0x0040, 0x1908: 0x0040, 0x1909: 0x0040, 0x190a: 0x01d9, 0x190b: 0x0fa9, + 0x190c: 0x0fb9, 0x190d: 0x1089, 0x190e: 0x0279, 0x190f: 0x0369, 0x1910: 0x0289, 0x1911: 0x0040, + 0x1912: 0x0039, 0x1913: 0x0ee9, 0x1914: 0x1159, 0x1915: 0x0ef9, 0x1916: 0x0f09, 0x1917: 0x1199, + 0x1918: 0x0f31, 0x1919: 0x0249, 0x191a: 0x0f41, 0x191b: 0x0259, 0x191c: 0x0f51, 0x191d: 0x0359, + 0x191e: 0x0f61, 0x191f: 0x0f71, 0x1920: 0x00d9, 0x1921: 0x0f99, 0x1922: 0x2039, 0x1923: 0x0269, + 0x1924: 0x01d9, 0x1925: 0x0fa9, 0x1926: 0x0fb9, 0x1927: 0x1089, 0x1928: 0x0279, 0x1929: 0x0369, + 0x192a: 0x0289, 0x192b: 0x13d1, 0x192c: 0x0039, 0x192d: 0x0ee9, 0x192e: 0x1159, 0x192f: 0x0ef9, + 0x1930: 0x0f09, 0x1931: 0x1199, 0x1932: 0x0f31, 0x1933: 0x0249, 0x1934: 0x0f41, 0x1935: 0x0259, + 0x1936: 0x0f51, 0x1937: 0x0359, 0x1938: 0x0f61, 0x1939: 0x0f71, 0x193a: 0x00d9, 0x193b: 0x0f99, + 0x193c: 0x2039, 0x193d: 0x0269, 0x193e: 0x01d9, 0x193f: 0x0fa9, // Block 0x65, offset 0x1940 - 0x1940: 0x0279, 0x1941: 0x0369, 0x1942: 0x0289, 0x1943: 0x13d1, 0x1944: 0x0039, 0x1945: 0x0ee9, - 0x1946: 0x0040, 0x1947: 0x0ef9, 0x1948: 0x0f09, 0x1949: 0x1199, 0x194a: 0x0f31, 0x194b: 0x0040, - 0x194c: 0x0040, 0x194d: 0x0259, 0x194e: 0x0f51, 0x194f: 0x0359, 0x1950: 0x0f61, 0x1951: 0x0f71, - 0x1952: 0x00d9, 0x1953: 0x0f99, 0x1954: 0x2039, 0x1955: 0x0040, 0x1956: 0x01d9, 0x1957: 0x0fa9, - 0x1958: 0x0fb9, 0x1959: 0x1089, 0x195a: 0x0279, 0x195b: 0x0369, 0x195c: 0x0289, 0x195d: 0x0040, - 0x195e: 0x0039, 0x195f: 0x0ee9, 0x1960: 0x1159, 0x1961: 0x0ef9, 0x1962: 0x0f09, 0x1963: 0x1199, - 0x1964: 0x0f31, 0x1965: 0x0249, 0x1966: 0x0f41, 0x1967: 0x0259, 0x1968: 0x0f51, 0x1969: 0x0359, - 0x196a: 0x0f61, 0x196b: 0x0f71, 0x196c: 0x00d9, 0x196d: 0x0f99, 0x196e: 0x2039, 0x196f: 0x0269, - 0x1970: 0x01d9, 0x1971: 0x0fa9, 0x1972: 0x0fb9, 0x1973: 0x1089, 0x1974: 0x0279, 0x1975: 0x0369, - 0x1976: 0x0289, 0x1977: 0x13d1, 0x1978: 0x0039, 0x1979: 0x0ee9, 0x197a: 0x0040, 0x197b: 0x0ef9, - 0x197c: 0x0f09, 0x197d: 0x1199, 0x197e: 0x0f31, 0x197f: 0x0040, + 0x1940: 0x0fb9, 0x1941: 0x1089, 0x1942: 0x0279, 0x1943: 0x0369, 0x1944: 0x0289, 0x1945: 0x13d1, + 0x1946: 0x0039, 0x1947: 0x0ee9, 0x1948: 0x1159, 0x1949: 0x0ef9, 0x194a: 0x0f09, 0x194b: 0x1199, + 0x194c: 0x0f31, 0x194d: 0x0249, 0x194e: 0x0f41, 0x194f: 0x0259, 0x1950: 0x0f51, 0x1951: 0x0359, + 0x1952: 0x0f61, 0x1953: 0x0f71, 0x1954: 0x00d9, 0x1955: 0x0f99, 0x1956: 0x2039, 0x1957: 0x0269, + 0x1958: 0x01d9, 0x1959: 0x0fa9, 0x195a: 0x0fb9, 0x195b: 0x1089, 0x195c: 0x0279, 0x195d: 0x0369, + 0x195e: 0x0289, 0x195f: 0x13d1, 0x1960: 0x0039, 0x1961: 0x0ee9, 0x1962: 0x1159, 0x1963: 0x0ef9, + 0x1964: 0x0f09, 0x1965: 0x1199, 0x1966: 0x0f31, 0x1967: 0x0249, 0x1968: 0x0f41, 0x1969: 0x0259, + 0x196a: 0x0f51, 0x196b: 0x0359, 0x196c: 0x0f61, 0x196d: 0x0f71, 0x196e: 0x00d9, 0x196f: 0x0f99, + 0x1970: 0x2039, 0x1971: 0x0269, 0x1972: 0x01d9, 0x1973: 0x0fa9, 0x1974: 0x0fb9, 0x1975: 0x1089, + 0x1976: 0x0279, 0x1977: 0x0369, 0x1978: 0x0289, 0x1979: 0x13d1, 0x197a: 0x0039, 0x197b: 0x0ee9, + 0x197c: 0x1159, 0x197d: 0x0ef9, 0x197e: 0x0f09, 0x197f: 0x1199, // Block 0x66, offset 0x1980 - 0x1980: 0x0f41, 0x1981: 0x0259, 0x1982: 0x0f51, 0x1983: 0x0359, 0x1984: 0x0f61, 0x1985: 0x0040, - 0x1986: 0x00d9, 0x1987: 0x0040, 0x1988: 0x0040, 0x1989: 0x0040, 0x198a: 0x01d9, 0x198b: 0x0fa9, - 0x198c: 0x0fb9, 0x198d: 0x1089, 0x198e: 0x0279, 0x198f: 0x0369, 0x1990: 0x0289, 0x1991: 0x0040, - 0x1992: 0x0039, 0x1993: 0x0ee9, 0x1994: 0x1159, 0x1995: 0x0ef9, 0x1996: 0x0f09, 0x1997: 0x1199, - 0x1998: 0x0f31, 0x1999: 0x0249, 0x199a: 0x0f41, 0x199b: 0x0259, 0x199c: 0x0f51, 0x199d: 0x0359, - 0x199e: 0x0f61, 0x199f: 0x0f71, 0x19a0: 0x00d9, 0x19a1: 0x0f99, 0x19a2: 0x2039, 0x19a3: 0x0269, - 0x19a4: 0x01d9, 0x19a5: 0x0fa9, 0x19a6: 0x0fb9, 0x19a7: 0x1089, 0x19a8: 0x0279, 0x19a9: 0x0369, - 0x19aa: 0x0289, 0x19ab: 0x13d1, 0x19ac: 0x0039, 0x19ad: 0x0ee9, 0x19ae: 0x1159, 0x19af: 0x0ef9, - 0x19b0: 0x0f09, 0x19b1: 0x1199, 0x19b2: 0x0f31, 0x19b3: 0x0249, 0x19b4: 0x0f41, 0x19b5: 0x0259, - 0x19b6: 0x0f51, 0x19b7: 0x0359, 0x19b8: 0x0f61, 0x19b9: 0x0f71, 0x19ba: 0x00d9, 0x19bb: 0x0f99, - 0x19bc: 0x2039, 0x19bd: 0x0269, 0x19be: 0x01d9, 0x19bf: 0x0fa9, + 0x1980: 0x0f31, 0x1981: 0x0249, 0x1982: 0x0f41, 0x1983: 0x0259, 0x1984: 0x0f51, 0x1985: 0x0359, + 0x1986: 0x0f61, 0x1987: 0x0f71, 0x1988: 0x00d9, 0x1989: 0x0f99, 0x198a: 0x2039, 0x198b: 0x0269, + 0x198c: 0x01d9, 0x198d: 0x0fa9, 0x198e: 0x0fb9, 0x198f: 0x1089, 0x1990: 0x0279, 0x1991: 0x0369, + 0x1992: 0x0289, 0x1993: 0x13d1, 0x1994: 0x0039, 0x1995: 0x0ee9, 0x1996: 0x1159, 0x1997: 0x0ef9, + 0x1998: 0x0f09, 0x1999: 0x1199, 0x199a: 0x0f31, 0x199b: 0x0249, 0x199c: 0x0f41, 0x199d: 0x0259, + 0x199e: 0x0f51, 0x199f: 0x0359, 0x19a0: 0x0f61, 0x19a1: 0x0f71, 0x19a2: 0x00d9, 0x19a3: 0x0f99, + 0x19a4: 0x2039, 0x19a5: 0x0269, 0x19a6: 0x01d9, 0x19a7: 0x0fa9, 0x19a8: 0x0fb9, 0x19a9: 0x1089, + 0x19aa: 0x0279, 0x19ab: 0x0369, 0x19ac: 0x0289, 0x19ad: 0x13d1, 0x19ae: 0x0039, 0x19af: 0x0ee9, + 0x19b0: 0x1159, 0x19b1: 0x0ef9, 0x19b2: 0x0f09, 0x19b3: 0x1199, 0x19b4: 0x0f31, 0x19b5: 0x0249, + 0x19b6: 0x0f41, 0x19b7: 0x0259, 0x19b8: 0x0f51, 0x19b9: 0x0359, 0x19ba: 0x0f61, 0x19bb: 0x0f71, + 0x19bc: 0x00d9, 0x19bd: 0x0f99, 0x19be: 0x2039, 0x19bf: 0x0269, // Block 0x67, offset 0x19c0 - 0x19c0: 0x0fb9, 0x19c1: 0x1089, 0x19c2: 0x0279, 0x19c3: 0x0369, 0x19c4: 0x0289, 0x19c5: 0x13d1, - 0x19c6: 0x0039, 0x19c7: 0x0ee9, 0x19c8: 0x1159, 0x19c9: 0x0ef9, 0x19ca: 0x0f09, 0x19cb: 0x1199, - 0x19cc: 0x0f31, 0x19cd: 0x0249, 0x19ce: 0x0f41, 0x19cf: 0x0259, 0x19d0: 0x0f51, 0x19d1: 0x0359, - 0x19d2: 0x0f61, 0x19d3: 0x0f71, 0x19d4: 0x00d9, 0x19d5: 0x0f99, 0x19d6: 0x2039, 0x19d7: 0x0269, - 0x19d8: 0x01d9, 0x19d9: 0x0fa9, 0x19da: 0x0fb9, 0x19db: 0x1089, 0x19dc: 0x0279, 0x19dd: 0x0369, - 0x19de: 0x0289, 0x19df: 0x13d1, 0x19e0: 0x0039, 0x19e1: 0x0ee9, 0x19e2: 0x1159, 0x19e3: 0x0ef9, - 0x19e4: 0x0f09, 0x19e5: 0x1199, 0x19e6: 0x0f31, 0x19e7: 0x0249, 0x19e8: 0x0f41, 0x19e9: 0x0259, - 0x19ea: 0x0f51, 0x19eb: 0x0359, 0x19ec: 0x0f61, 0x19ed: 0x0f71, 0x19ee: 0x00d9, 0x19ef: 0x0f99, - 0x19f0: 0x2039, 0x19f1: 0x0269, 0x19f2: 0x01d9, 0x19f3: 0x0fa9, 0x19f4: 0x0fb9, 0x19f5: 0x1089, - 0x19f6: 0x0279, 0x19f7: 0x0369, 0x19f8: 0x0289, 0x19f9: 0x13d1, 0x19fa: 0x0039, 0x19fb: 0x0ee9, - 0x19fc: 0x1159, 0x19fd: 0x0ef9, 0x19fe: 0x0f09, 0x19ff: 0x1199, + 0x19c0: 0x01d9, 0x19c1: 0x0fa9, 0x19c2: 0x0fb9, 0x19c3: 0x1089, 0x19c4: 0x0279, 0x19c5: 0x0369, + 0x19c6: 0x0289, 0x19c7: 0x13d1, 0x19c8: 0x0039, 0x19c9: 0x0ee9, 0x19ca: 0x1159, 0x19cb: 0x0ef9, + 0x19cc: 0x0f09, 0x19cd: 0x1199, 0x19ce: 0x0f31, 0x19cf: 0x0249, 0x19d0: 0x0f41, 0x19d1: 0x0259, + 0x19d2: 0x0f51, 0x19d3: 0x0359, 0x19d4: 0x0f61, 0x19d5: 0x0f71, 0x19d6: 0x00d9, 0x19d7: 0x0f99, + 0x19d8: 0x2039, 0x19d9: 0x0269, 0x19da: 0x01d9, 0x19db: 0x0fa9, 0x19dc: 0x0fb9, 0x19dd: 0x1089, + 0x19de: 0x0279, 0x19df: 0x0369, 0x19e0: 0x0289, 0x19e1: 0x13d1, 0x19e2: 0x0039, 0x19e3: 0x0ee9, + 0x19e4: 0x1159, 0x19e5: 0x0ef9, 0x19e6: 0x0f09, 0x19e7: 0x1199, 0x19e8: 0x0f31, 0x19e9: 0x0249, + 0x19ea: 0x0f41, 0x19eb: 0x0259, 0x19ec: 0x0f51, 0x19ed: 0x0359, 0x19ee: 0x0f61, 0x19ef: 0x0f71, + 0x19f0: 0x00d9, 0x19f1: 0x0f99, 0x19f2: 0x2039, 0x19f3: 0x0269, 0x19f4: 0x01d9, 0x19f5: 0x0fa9, + 0x19f6: 0x0fb9, 0x19f7: 0x1089, 0x19f8: 0x0279, 0x19f9: 0x0369, 0x19fa: 0x0289, 0x19fb: 0x13d1, + 0x19fc: 0x0039, 0x19fd: 0x0ee9, 0x19fe: 0x1159, 0x19ff: 0x0ef9, // Block 0x68, offset 0x1a00 - 0x1a00: 0x0f31, 0x1a01: 0x0249, 0x1a02: 0x0f41, 0x1a03: 0x0259, 0x1a04: 0x0f51, 0x1a05: 0x0359, - 0x1a06: 0x0f61, 0x1a07: 0x0f71, 0x1a08: 0x00d9, 0x1a09: 0x0f99, 0x1a0a: 0x2039, 0x1a0b: 0x0269, - 0x1a0c: 0x01d9, 0x1a0d: 0x0fa9, 0x1a0e: 0x0fb9, 0x1a0f: 0x1089, 0x1a10: 0x0279, 0x1a11: 0x0369, - 0x1a12: 0x0289, 0x1a13: 0x13d1, 0x1a14: 0x0039, 0x1a15: 0x0ee9, 0x1a16: 0x1159, 0x1a17: 0x0ef9, - 0x1a18: 0x0f09, 0x1a19: 0x1199, 0x1a1a: 0x0f31, 0x1a1b: 0x0249, 0x1a1c: 0x0f41, 0x1a1d: 0x0259, - 0x1a1e: 0x0f51, 0x1a1f: 0x0359, 0x1a20: 0x0f61, 0x1a21: 0x0f71, 0x1a22: 0x00d9, 0x1a23: 0x0f99, - 0x1a24: 0x2039, 0x1a25: 0x0269, 0x1a26: 0x01d9, 0x1a27: 0x0fa9, 0x1a28: 0x0fb9, 0x1a29: 0x1089, - 0x1a2a: 0x0279, 0x1a2b: 0x0369, 0x1a2c: 0x0289, 0x1a2d: 0x13d1, 0x1a2e: 0x0039, 0x1a2f: 0x0ee9, - 0x1a30: 0x1159, 0x1a31: 0x0ef9, 0x1a32: 0x0f09, 0x1a33: 0x1199, 0x1a34: 0x0f31, 0x1a35: 0x0249, - 0x1a36: 0x0f41, 0x1a37: 0x0259, 0x1a38: 0x0f51, 0x1a39: 0x0359, 0x1a3a: 0x0f61, 0x1a3b: 0x0f71, - 0x1a3c: 0x00d9, 0x1a3d: 0x0f99, 0x1a3e: 0x2039, 0x1a3f: 0x0269, + 0x1a00: 0x0f09, 0x1a01: 0x1199, 0x1a02: 0x0f31, 0x1a03: 0x0249, 0x1a04: 0x0f41, 0x1a05: 0x0259, + 0x1a06: 0x0f51, 0x1a07: 0x0359, 0x1a08: 0x0f61, 0x1a09: 0x0f71, 0x1a0a: 0x00d9, 0x1a0b: 0x0f99, + 0x1a0c: 0x2039, 0x1a0d: 0x0269, 0x1a0e: 0x01d9, 0x1a0f: 0x0fa9, 0x1a10: 0x0fb9, 0x1a11: 0x1089, + 0x1a12: 0x0279, 0x1a13: 0x0369, 0x1a14: 0x0289, 0x1a15: 0x13d1, 0x1a16: 0x0039, 0x1a17: 0x0ee9, + 0x1a18: 0x1159, 0x1a19: 0x0ef9, 0x1a1a: 0x0f09, 0x1a1b: 0x1199, 0x1a1c: 0x0f31, 0x1a1d: 0x0249, + 0x1a1e: 0x0f41, 0x1a1f: 0x0259, 0x1a20: 0x0f51, 0x1a21: 0x0359, 0x1a22: 0x0f61, 0x1a23: 0x0f71, + 0x1a24: 0x00d9, 0x1a25: 0x0f99, 0x1a26: 0x2039, 0x1a27: 0x0269, 0x1a28: 0x01d9, 0x1a29: 0x0fa9, + 0x1a2a: 0x0fb9, 0x1a2b: 0x1089, 0x1a2c: 0x0279, 0x1a2d: 0x0369, 0x1a2e: 0x0289, 0x1a2f: 0x13d1, + 0x1a30: 0x0039, 0x1a31: 0x0ee9, 0x1a32: 0x1159, 0x1a33: 0x0ef9, 0x1a34: 0x0f09, 0x1a35: 0x1199, + 0x1a36: 0x0f31, 0x1a37: 0x0249, 0x1a38: 0x0f41, 0x1a39: 0x0259, 0x1a3a: 0x0f51, 0x1a3b: 0x0359, + 0x1a3c: 0x0f61, 0x1a3d: 0x0f71, 0x1a3e: 0x00d9, 0x1a3f: 0x0f99, // Block 0x69, offset 0x1a40 - 0x1a40: 0x01d9, 0x1a41: 0x0fa9, 0x1a42: 0x0fb9, 0x1a43: 0x1089, 0x1a44: 0x0279, 0x1a45: 0x0369, - 0x1a46: 0x0289, 0x1a47: 0x13d1, 0x1a48: 0x0039, 0x1a49: 0x0ee9, 0x1a4a: 0x1159, 0x1a4b: 0x0ef9, - 0x1a4c: 0x0f09, 0x1a4d: 0x1199, 0x1a4e: 0x0f31, 0x1a4f: 0x0249, 0x1a50: 0x0f41, 0x1a51: 0x0259, - 0x1a52: 0x0f51, 0x1a53: 0x0359, 0x1a54: 0x0f61, 0x1a55: 0x0f71, 0x1a56: 0x00d9, 0x1a57: 0x0f99, - 0x1a58: 0x2039, 0x1a59: 0x0269, 0x1a5a: 0x01d9, 0x1a5b: 0x0fa9, 0x1a5c: 0x0fb9, 0x1a5d: 0x1089, - 0x1a5e: 0x0279, 0x1a5f: 0x0369, 0x1a60: 0x0289, 0x1a61: 0x13d1, 0x1a62: 0x0039, 0x1a63: 0x0ee9, - 0x1a64: 0x1159, 0x1a65: 0x0ef9, 0x1a66: 0x0f09, 0x1a67: 0x1199, 0x1a68: 0x0f31, 0x1a69: 0x0249, - 0x1a6a: 0x0f41, 0x1a6b: 0x0259, 0x1a6c: 0x0f51, 0x1a6d: 0x0359, 0x1a6e: 0x0f61, 0x1a6f: 0x0f71, - 0x1a70: 0x00d9, 0x1a71: 0x0f99, 0x1a72: 0x2039, 0x1a73: 0x0269, 0x1a74: 0x01d9, 0x1a75: 0x0fa9, - 0x1a76: 0x0fb9, 0x1a77: 0x1089, 0x1a78: 0x0279, 0x1a79: 0x0369, 0x1a7a: 0x0289, 0x1a7b: 0x13d1, - 0x1a7c: 0x0039, 0x1a7d: 0x0ee9, 0x1a7e: 0x1159, 0x1a7f: 0x0ef9, + 0x1a40: 0x2039, 0x1a41: 0x0269, 0x1a42: 0x01d9, 0x1a43: 0x0fa9, 0x1a44: 0x0fb9, 0x1a45: 0x1089, + 0x1a46: 0x0279, 0x1a47: 0x0369, 0x1a48: 0x0289, 0x1a49: 0x13d1, 0x1a4a: 0x0039, 0x1a4b: 0x0ee9, + 0x1a4c: 0x1159, 0x1a4d: 0x0ef9, 0x1a4e: 0x0f09, 0x1a4f: 0x1199, 0x1a50: 0x0f31, 0x1a51: 0x0249, + 0x1a52: 0x0f41, 0x1a53: 0x0259, 0x1a54: 0x0f51, 0x1a55: 0x0359, 0x1a56: 0x0f61, 0x1a57: 0x0f71, + 0x1a58: 0x00d9, 0x1a59: 0x0f99, 0x1a5a: 0x2039, 0x1a5b: 0x0269, 0x1a5c: 0x01d9, 0x1a5d: 0x0fa9, + 0x1a5e: 0x0fb9, 0x1a5f: 0x1089, 0x1a60: 0x0279, 0x1a61: 0x0369, 0x1a62: 0x0289, 0x1a63: 0x13d1, + 0x1a64: 0xba81, 0x1a65: 0xba99, 0x1a66: 0x0040, 0x1a67: 0x0040, 0x1a68: 0xbab1, 0x1a69: 0x1099, + 0x1a6a: 0x10b1, 0x1a6b: 0x10c9, 0x1a6c: 0xbac9, 0x1a6d: 0xbae1, 0x1a6e: 0xbaf9, 0x1a6f: 0x1429, + 0x1a70: 0x1a31, 0x1a71: 0xbb11, 0x1a72: 0xbb29, 0x1a73: 0xbb41, 0x1a74: 0xbb59, 0x1a75: 0xbb71, + 0x1a76: 0xbb89, 0x1a77: 0x2109, 0x1a78: 0x1111, 0x1a79: 0x1429, 0x1a7a: 0xbba1, 0x1a7b: 0xbbb9, + 0x1a7c: 0xbbd1, 0x1a7d: 0x10e1, 0x1a7e: 0x10f9, 0x1a7f: 0xbbe9, // Block 0x6a, offset 0x1a80 - 0x1a80: 0x0f09, 0x1a81: 0x1199, 0x1a82: 0x0f31, 0x1a83: 0x0249, 0x1a84: 0x0f41, 0x1a85: 0x0259, - 0x1a86: 0x0f51, 0x1a87: 0x0359, 0x1a88: 0x0f61, 0x1a89: 0x0f71, 0x1a8a: 0x00d9, 0x1a8b: 0x0f99, - 0x1a8c: 0x2039, 0x1a8d: 0x0269, 0x1a8e: 0x01d9, 0x1a8f: 0x0fa9, 0x1a90: 0x0fb9, 0x1a91: 0x1089, - 0x1a92: 0x0279, 0x1a93: 0x0369, 0x1a94: 0x0289, 0x1a95: 0x13d1, 0x1a96: 0x0039, 0x1a97: 0x0ee9, - 0x1a98: 0x1159, 0x1a99: 0x0ef9, 0x1a9a: 0x0f09, 0x1a9b: 0x1199, 0x1a9c: 0x0f31, 0x1a9d: 0x0249, - 0x1a9e: 0x0f41, 0x1a9f: 0x0259, 0x1aa0: 0x0f51, 0x1aa1: 0x0359, 0x1aa2: 0x0f61, 0x1aa3: 0x0f71, - 0x1aa4: 0x00d9, 0x1aa5: 0x0f99, 0x1aa6: 0x2039, 0x1aa7: 0x0269, 0x1aa8: 0x01d9, 0x1aa9: 0x0fa9, - 0x1aaa: 0x0fb9, 0x1aab: 0x1089, 0x1aac: 0x0279, 0x1aad: 0x0369, 0x1aae: 0x0289, 0x1aaf: 0x13d1, - 0x1ab0: 0x0039, 0x1ab1: 0x0ee9, 0x1ab2: 0x1159, 0x1ab3: 0x0ef9, 0x1ab4: 0x0f09, 0x1ab5: 0x1199, - 0x1ab6: 0x0f31, 0x1ab7: 0x0249, 0x1ab8: 0x0f41, 0x1ab9: 0x0259, 0x1aba: 0x0f51, 0x1abb: 0x0359, - 0x1abc: 0x0f61, 0x1abd: 0x0f71, 0x1abe: 0x00d9, 0x1abf: 0x0f99, + 0x1a80: 0x2079, 0x1a81: 0xbc01, 0x1a82: 0xbab1, 0x1a83: 0x1099, 0x1a84: 0x10b1, 0x1a85: 0x10c9, + 0x1a86: 0xbac9, 0x1a87: 0xbae1, 0x1a88: 0xbaf9, 0x1a89: 0x1429, 0x1a8a: 0x1a31, 0x1a8b: 0xbb11, + 0x1a8c: 0xbb29, 0x1a8d: 0xbb41, 0x1a8e: 0xbb59, 0x1a8f: 0xbb71, 0x1a90: 0xbb89, 0x1a91: 0x2109, + 0x1a92: 0x1111, 0x1a93: 0xbba1, 0x1a94: 0xbba1, 0x1a95: 0xbbb9, 0x1a96: 0xbbd1, 0x1a97: 0x10e1, + 0x1a98: 0x10f9, 0x1a99: 0xbbe9, 0x1a9a: 0x2079, 0x1a9b: 0xbc21, 0x1a9c: 0xbac9, 0x1a9d: 0x1429, + 0x1a9e: 0xbb11, 0x1a9f: 0x10e1, 0x1aa0: 0x1111, 0x1aa1: 0x2109, 0x1aa2: 0xbab1, 0x1aa3: 0x1099, + 0x1aa4: 0x10b1, 0x1aa5: 0x10c9, 0x1aa6: 0xbac9, 0x1aa7: 0xbae1, 0x1aa8: 0xbaf9, 0x1aa9: 0x1429, + 0x1aaa: 0x1a31, 0x1aab: 0xbb11, 0x1aac: 0xbb29, 0x1aad: 0xbb41, 0x1aae: 0xbb59, 0x1aaf: 0xbb71, + 0x1ab0: 0xbb89, 0x1ab1: 0x2109, 0x1ab2: 0x1111, 0x1ab3: 0x1429, 0x1ab4: 0xbba1, 0x1ab5: 0xbbb9, + 0x1ab6: 0xbbd1, 0x1ab7: 0x10e1, 0x1ab8: 0x10f9, 0x1ab9: 0xbbe9, 0x1aba: 0x2079, 0x1abb: 0xbc01, + 0x1abc: 0xbab1, 0x1abd: 0x1099, 0x1abe: 0x10b1, 0x1abf: 0x10c9, // Block 0x6b, offset 0x1ac0 - 0x1ac0: 0x2039, 0x1ac1: 0x0269, 0x1ac2: 0x01d9, 0x1ac3: 0x0fa9, 0x1ac4: 0x0fb9, 0x1ac5: 0x1089, - 0x1ac6: 0x0279, 0x1ac7: 0x0369, 0x1ac8: 0x0289, 0x1ac9: 0x13d1, 0x1aca: 0x0039, 0x1acb: 0x0ee9, - 0x1acc: 0x1159, 0x1acd: 0x0ef9, 0x1ace: 0x0f09, 0x1acf: 0x1199, 0x1ad0: 0x0f31, 0x1ad1: 0x0249, - 0x1ad2: 0x0f41, 0x1ad3: 0x0259, 0x1ad4: 0x0f51, 0x1ad5: 0x0359, 0x1ad6: 0x0f61, 0x1ad7: 0x0f71, - 0x1ad8: 0x00d9, 0x1ad9: 0x0f99, 0x1ada: 0x2039, 0x1adb: 0x0269, 0x1adc: 0x01d9, 0x1add: 0x0fa9, - 0x1ade: 0x0fb9, 0x1adf: 0x1089, 0x1ae0: 0x0279, 0x1ae1: 0x0369, 0x1ae2: 0x0289, 0x1ae3: 0x13d1, - 0x1ae4: 0xba81, 0x1ae5: 0xba99, 0x1ae6: 0x0040, 0x1ae7: 0x0040, 0x1ae8: 0xbab1, 0x1ae9: 0x1099, - 0x1aea: 0x10b1, 0x1aeb: 0x10c9, 0x1aec: 0xbac9, 0x1aed: 0xbae1, 0x1aee: 0xbaf9, 0x1aef: 0x1429, - 0x1af0: 0x1a31, 0x1af1: 0xbb11, 0x1af2: 0xbb29, 0x1af3: 0xbb41, 0x1af4: 0xbb59, 0x1af5: 0xbb71, - 0x1af6: 0xbb89, 0x1af7: 0x2109, 0x1af8: 0x1111, 0x1af9: 0x1429, 0x1afa: 0xbba1, 0x1afb: 0xbbb9, - 0x1afc: 0xbbd1, 0x1afd: 0x10e1, 0x1afe: 0x10f9, 0x1aff: 0xbbe9, + 0x1ac0: 0xbac9, 0x1ac1: 0xbae1, 0x1ac2: 0xbaf9, 0x1ac3: 0x1429, 0x1ac4: 0x1a31, 0x1ac5: 0xbb11, + 0x1ac6: 0xbb29, 0x1ac7: 0xbb41, 0x1ac8: 0xbb59, 0x1ac9: 0xbb71, 0x1aca: 0xbb89, 0x1acb: 0x2109, + 0x1acc: 0x1111, 0x1acd: 0xbba1, 0x1ace: 0xbba1, 0x1acf: 0xbbb9, 0x1ad0: 0xbbd1, 0x1ad1: 0x10e1, + 0x1ad2: 0x10f9, 0x1ad3: 0xbbe9, 0x1ad4: 0x2079, 0x1ad5: 0xbc21, 0x1ad6: 0xbac9, 0x1ad7: 0x1429, + 0x1ad8: 0xbb11, 0x1ad9: 0x10e1, 0x1ada: 0x1111, 0x1adb: 0x2109, 0x1adc: 0xbab1, 0x1add: 0x1099, + 0x1ade: 0x10b1, 0x1adf: 0x10c9, 0x1ae0: 0xbac9, 0x1ae1: 0xbae1, 0x1ae2: 0xbaf9, 0x1ae3: 0x1429, + 0x1ae4: 0x1a31, 0x1ae5: 0xbb11, 0x1ae6: 0xbb29, 0x1ae7: 0xbb41, 0x1ae8: 0xbb59, 0x1ae9: 0xbb71, + 0x1aea: 0xbb89, 0x1aeb: 0x2109, 0x1aec: 0x1111, 0x1aed: 0x1429, 0x1aee: 0xbba1, 0x1aef: 0xbbb9, + 0x1af0: 0xbbd1, 0x1af1: 0x10e1, 0x1af2: 0x10f9, 0x1af3: 0xbbe9, 0x1af4: 0x2079, 0x1af5: 0xbc01, + 0x1af6: 0xbab1, 0x1af7: 0x1099, 0x1af8: 0x10b1, 0x1af9: 0x10c9, 0x1afa: 0xbac9, 0x1afb: 0xbae1, + 0x1afc: 0xbaf9, 0x1afd: 0x1429, 0x1afe: 0x1a31, 0x1aff: 0xbb11, // Block 0x6c, offset 0x1b00 - 0x1b00: 0x2079, 0x1b01: 0xbc01, 0x1b02: 0xbab1, 0x1b03: 0x1099, 0x1b04: 0x10b1, 0x1b05: 0x10c9, - 0x1b06: 0xbac9, 0x1b07: 0xbae1, 0x1b08: 0xbaf9, 0x1b09: 0x1429, 0x1b0a: 0x1a31, 0x1b0b: 0xbb11, - 0x1b0c: 0xbb29, 0x1b0d: 0xbb41, 0x1b0e: 0xbb59, 0x1b0f: 0xbb71, 0x1b10: 0xbb89, 0x1b11: 0x2109, - 0x1b12: 0x1111, 0x1b13: 0xbba1, 0x1b14: 0xbba1, 0x1b15: 0xbbb9, 0x1b16: 0xbbd1, 0x1b17: 0x10e1, - 0x1b18: 0x10f9, 0x1b19: 0xbbe9, 0x1b1a: 0x2079, 0x1b1b: 0xbc21, 0x1b1c: 0xbac9, 0x1b1d: 0x1429, - 0x1b1e: 0xbb11, 0x1b1f: 0x10e1, 0x1b20: 0x1111, 0x1b21: 0x2109, 0x1b22: 0xbab1, 0x1b23: 0x1099, - 0x1b24: 0x10b1, 0x1b25: 0x10c9, 0x1b26: 0xbac9, 0x1b27: 0xbae1, 0x1b28: 0xbaf9, 0x1b29: 0x1429, - 0x1b2a: 0x1a31, 0x1b2b: 0xbb11, 0x1b2c: 0xbb29, 0x1b2d: 0xbb41, 0x1b2e: 0xbb59, 0x1b2f: 0xbb71, - 0x1b30: 0xbb89, 0x1b31: 0x2109, 0x1b32: 0x1111, 0x1b33: 0x1429, 0x1b34: 0xbba1, 0x1b35: 0xbbb9, - 0x1b36: 0xbbd1, 0x1b37: 0x10e1, 0x1b38: 0x10f9, 0x1b39: 0xbbe9, 0x1b3a: 0x2079, 0x1b3b: 0xbc01, - 0x1b3c: 0xbab1, 0x1b3d: 0x1099, 0x1b3e: 0x10b1, 0x1b3f: 0x10c9, + 0x1b00: 0xbb29, 0x1b01: 0xbb41, 0x1b02: 0xbb59, 0x1b03: 0xbb71, 0x1b04: 0xbb89, 0x1b05: 0x2109, + 0x1b06: 0x1111, 0x1b07: 0xbba1, 0x1b08: 0xbba1, 0x1b09: 0xbbb9, 0x1b0a: 0xbbd1, 0x1b0b: 0x10e1, + 0x1b0c: 0x10f9, 0x1b0d: 0xbbe9, 0x1b0e: 0x2079, 0x1b0f: 0xbc21, 0x1b10: 0xbac9, 0x1b11: 0x1429, + 0x1b12: 0xbb11, 0x1b13: 0x10e1, 0x1b14: 0x1111, 0x1b15: 0x2109, 0x1b16: 0xbab1, 0x1b17: 0x1099, + 0x1b18: 0x10b1, 0x1b19: 0x10c9, 0x1b1a: 0xbac9, 0x1b1b: 0xbae1, 0x1b1c: 0xbaf9, 0x1b1d: 0x1429, + 0x1b1e: 0x1a31, 0x1b1f: 0xbb11, 0x1b20: 0xbb29, 0x1b21: 0xbb41, 0x1b22: 0xbb59, 0x1b23: 0xbb71, + 0x1b24: 0xbb89, 0x1b25: 0x2109, 0x1b26: 0x1111, 0x1b27: 0x1429, 0x1b28: 0xbba1, 0x1b29: 0xbbb9, + 0x1b2a: 0xbbd1, 0x1b2b: 0x10e1, 0x1b2c: 0x10f9, 0x1b2d: 0xbbe9, 0x1b2e: 0x2079, 0x1b2f: 0xbc01, + 0x1b30: 0xbab1, 0x1b31: 0x1099, 0x1b32: 0x10b1, 0x1b33: 0x10c9, 0x1b34: 0xbac9, 0x1b35: 0xbae1, + 0x1b36: 0xbaf9, 0x1b37: 0x1429, 0x1b38: 0x1a31, 0x1b39: 0xbb11, 0x1b3a: 0xbb29, 0x1b3b: 0xbb41, + 0x1b3c: 0xbb59, 0x1b3d: 0xbb71, 0x1b3e: 0xbb89, 0x1b3f: 0x2109, // Block 0x6d, offset 0x1b40 - 0x1b40: 0xbac9, 0x1b41: 0xbae1, 0x1b42: 0xbaf9, 0x1b43: 0x1429, 0x1b44: 0x1a31, 0x1b45: 0xbb11, - 0x1b46: 0xbb29, 0x1b47: 0xbb41, 0x1b48: 0xbb59, 0x1b49: 0xbb71, 0x1b4a: 0xbb89, 0x1b4b: 0x2109, - 0x1b4c: 0x1111, 0x1b4d: 0xbba1, 0x1b4e: 0xbba1, 0x1b4f: 0xbbb9, 0x1b50: 0xbbd1, 0x1b51: 0x10e1, - 0x1b52: 0x10f9, 0x1b53: 0xbbe9, 0x1b54: 0x2079, 0x1b55: 0xbc21, 0x1b56: 0xbac9, 0x1b57: 0x1429, - 0x1b58: 0xbb11, 0x1b59: 0x10e1, 0x1b5a: 0x1111, 0x1b5b: 0x2109, 0x1b5c: 0xbab1, 0x1b5d: 0x1099, - 0x1b5e: 0x10b1, 0x1b5f: 0x10c9, 0x1b60: 0xbac9, 0x1b61: 0xbae1, 0x1b62: 0xbaf9, 0x1b63: 0x1429, - 0x1b64: 0x1a31, 0x1b65: 0xbb11, 0x1b66: 0xbb29, 0x1b67: 0xbb41, 0x1b68: 0xbb59, 0x1b69: 0xbb71, - 0x1b6a: 0xbb89, 0x1b6b: 0x2109, 0x1b6c: 0x1111, 0x1b6d: 0x1429, 0x1b6e: 0xbba1, 0x1b6f: 0xbbb9, - 0x1b70: 0xbbd1, 0x1b71: 0x10e1, 0x1b72: 0x10f9, 0x1b73: 0xbbe9, 0x1b74: 0x2079, 0x1b75: 0xbc01, - 0x1b76: 0xbab1, 0x1b77: 0x1099, 0x1b78: 0x10b1, 0x1b79: 0x10c9, 0x1b7a: 0xbac9, 0x1b7b: 0xbae1, - 0x1b7c: 0xbaf9, 0x1b7d: 0x1429, 0x1b7e: 0x1a31, 0x1b7f: 0xbb11, + 0x1b40: 0x1111, 0x1b41: 0xbba1, 0x1b42: 0xbba1, 0x1b43: 0xbbb9, 0x1b44: 0xbbd1, 0x1b45: 0x10e1, + 0x1b46: 0x10f9, 0x1b47: 0xbbe9, 0x1b48: 0x2079, 0x1b49: 0xbc21, 0x1b4a: 0xbac9, 0x1b4b: 0x1429, + 0x1b4c: 0xbb11, 0x1b4d: 0x10e1, 0x1b4e: 0x1111, 0x1b4f: 0x2109, 0x1b50: 0xbab1, 0x1b51: 0x1099, + 0x1b52: 0x10b1, 0x1b53: 0x10c9, 0x1b54: 0xbac9, 0x1b55: 0xbae1, 0x1b56: 0xbaf9, 0x1b57: 0x1429, + 0x1b58: 0x1a31, 0x1b59: 0xbb11, 0x1b5a: 0xbb29, 0x1b5b: 0xbb41, 0x1b5c: 0xbb59, 0x1b5d: 0xbb71, + 0x1b5e: 0xbb89, 0x1b5f: 0x2109, 0x1b60: 0x1111, 0x1b61: 0x1429, 0x1b62: 0xbba1, 0x1b63: 0xbbb9, + 0x1b64: 0xbbd1, 0x1b65: 0x10e1, 0x1b66: 0x10f9, 0x1b67: 0xbbe9, 0x1b68: 0x2079, 0x1b69: 0xbc01, + 0x1b6a: 0xbab1, 0x1b6b: 0x1099, 0x1b6c: 0x10b1, 0x1b6d: 0x10c9, 0x1b6e: 0xbac9, 0x1b6f: 0xbae1, + 0x1b70: 0xbaf9, 0x1b71: 0x1429, 0x1b72: 0x1a31, 0x1b73: 0xbb11, 0x1b74: 0xbb29, 0x1b75: 0xbb41, + 0x1b76: 0xbb59, 0x1b77: 0xbb71, 0x1b78: 0xbb89, 0x1b79: 0x2109, 0x1b7a: 0x1111, 0x1b7b: 0xbba1, + 0x1b7c: 0xbba1, 0x1b7d: 0xbbb9, 0x1b7e: 0xbbd1, 0x1b7f: 0x10e1, // Block 0x6e, offset 0x1b80 - 0x1b80: 0xbb29, 0x1b81: 0xbb41, 0x1b82: 0xbb59, 0x1b83: 0xbb71, 0x1b84: 0xbb89, 0x1b85: 0x2109, - 0x1b86: 0x1111, 0x1b87: 0xbba1, 0x1b88: 0xbba1, 0x1b89: 0xbbb9, 0x1b8a: 0xbbd1, 0x1b8b: 0x10e1, - 0x1b8c: 0x10f9, 0x1b8d: 0xbbe9, 0x1b8e: 0x2079, 0x1b8f: 0xbc21, 0x1b90: 0xbac9, 0x1b91: 0x1429, - 0x1b92: 0xbb11, 0x1b93: 0x10e1, 0x1b94: 0x1111, 0x1b95: 0x2109, 0x1b96: 0xbab1, 0x1b97: 0x1099, - 0x1b98: 0x10b1, 0x1b99: 0x10c9, 0x1b9a: 0xbac9, 0x1b9b: 0xbae1, 0x1b9c: 0xbaf9, 0x1b9d: 0x1429, - 0x1b9e: 0x1a31, 0x1b9f: 0xbb11, 0x1ba0: 0xbb29, 0x1ba1: 0xbb41, 0x1ba2: 0xbb59, 0x1ba3: 0xbb71, - 0x1ba4: 0xbb89, 0x1ba5: 0x2109, 0x1ba6: 0x1111, 0x1ba7: 0x1429, 0x1ba8: 0xbba1, 0x1ba9: 0xbbb9, - 0x1baa: 0xbbd1, 0x1bab: 0x10e1, 0x1bac: 0x10f9, 0x1bad: 0xbbe9, 0x1bae: 0x2079, 0x1baf: 0xbc01, - 0x1bb0: 0xbab1, 0x1bb1: 0x1099, 0x1bb2: 0x10b1, 0x1bb3: 0x10c9, 0x1bb4: 0xbac9, 0x1bb5: 0xbae1, - 0x1bb6: 0xbaf9, 0x1bb7: 0x1429, 0x1bb8: 0x1a31, 0x1bb9: 0xbb11, 0x1bba: 0xbb29, 0x1bbb: 0xbb41, - 0x1bbc: 0xbb59, 0x1bbd: 0xbb71, 0x1bbe: 0xbb89, 0x1bbf: 0x2109, + 0x1b80: 0x10f9, 0x1b81: 0xbbe9, 0x1b82: 0x2079, 0x1b83: 0xbc21, 0x1b84: 0xbac9, 0x1b85: 0x1429, + 0x1b86: 0xbb11, 0x1b87: 0x10e1, 0x1b88: 0x1111, 0x1b89: 0x2109, 0x1b8a: 0xbc41, 0x1b8b: 0xbc41, + 0x1b8c: 0x0040, 0x1b8d: 0x0040, 0x1b8e: 0x1f41, 0x1b8f: 0x00c9, 0x1b90: 0x0069, 0x1b91: 0x0079, + 0x1b92: 0x1f51, 0x1b93: 0x1f61, 0x1b94: 0x1f71, 0x1b95: 0x1f81, 0x1b96: 0x1f91, 0x1b97: 0x1fa1, + 0x1b98: 0x1f41, 0x1b99: 0x00c9, 0x1b9a: 0x0069, 0x1b9b: 0x0079, 0x1b9c: 0x1f51, 0x1b9d: 0x1f61, + 0x1b9e: 0x1f71, 0x1b9f: 0x1f81, 0x1ba0: 0x1f91, 0x1ba1: 0x1fa1, 0x1ba2: 0x1f41, 0x1ba3: 0x00c9, + 0x1ba4: 0x0069, 0x1ba5: 0x0079, 0x1ba6: 0x1f51, 0x1ba7: 0x1f61, 0x1ba8: 0x1f71, 0x1ba9: 0x1f81, + 0x1baa: 0x1f91, 0x1bab: 0x1fa1, 0x1bac: 0x1f41, 0x1bad: 0x00c9, 0x1bae: 0x0069, 0x1baf: 0x0079, + 0x1bb0: 0x1f51, 0x1bb1: 0x1f61, 0x1bb2: 0x1f71, 0x1bb3: 0x1f81, 0x1bb4: 0x1f91, 0x1bb5: 0x1fa1, + 0x1bb6: 0x1f41, 0x1bb7: 0x00c9, 0x1bb8: 0x0069, 0x1bb9: 0x0079, 0x1bba: 0x1f51, 0x1bbb: 0x1f61, + 0x1bbc: 0x1f71, 0x1bbd: 0x1f81, 0x1bbe: 0x1f91, 0x1bbf: 0x1fa1, // Block 0x6f, offset 0x1bc0 - 0x1bc0: 0x1111, 0x1bc1: 0xbba1, 0x1bc2: 0xbba1, 0x1bc3: 0xbbb9, 0x1bc4: 0xbbd1, 0x1bc5: 0x10e1, - 0x1bc6: 0x10f9, 0x1bc7: 0xbbe9, 0x1bc8: 0x2079, 0x1bc9: 0xbc21, 0x1bca: 0xbac9, 0x1bcb: 0x1429, - 0x1bcc: 0xbb11, 0x1bcd: 0x10e1, 0x1bce: 0x1111, 0x1bcf: 0x2109, 0x1bd0: 0xbab1, 0x1bd1: 0x1099, - 0x1bd2: 0x10b1, 0x1bd3: 0x10c9, 0x1bd4: 0xbac9, 0x1bd5: 0xbae1, 0x1bd6: 0xbaf9, 0x1bd7: 0x1429, - 0x1bd8: 0x1a31, 0x1bd9: 0xbb11, 0x1bda: 0xbb29, 0x1bdb: 0xbb41, 0x1bdc: 0xbb59, 0x1bdd: 0xbb71, - 0x1bde: 0xbb89, 0x1bdf: 0x2109, 0x1be0: 0x1111, 0x1be1: 0x1429, 0x1be2: 0xbba1, 0x1be3: 0xbbb9, - 0x1be4: 0xbbd1, 0x1be5: 0x10e1, 0x1be6: 0x10f9, 0x1be7: 0xbbe9, 0x1be8: 0x2079, 0x1be9: 0xbc01, - 0x1bea: 0xbab1, 0x1beb: 0x1099, 0x1bec: 0x10b1, 0x1bed: 0x10c9, 0x1bee: 0xbac9, 0x1bef: 0xbae1, - 0x1bf0: 0xbaf9, 0x1bf1: 0x1429, 0x1bf2: 0x1a31, 0x1bf3: 0xbb11, 0x1bf4: 0xbb29, 0x1bf5: 0xbb41, - 0x1bf6: 0xbb59, 0x1bf7: 0xbb71, 0x1bf8: 0xbb89, 0x1bf9: 0x2109, 0x1bfa: 0x1111, 0x1bfb: 0xbba1, - 0x1bfc: 0xbba1, 0x1bfd: 0xbbb9, 0x1bfe: 0xbbd1, 0x1bff: 0x10e1, + 0x1bc0: 0xe115, 0x1bc1: 0xe115, 0x1bc2: 0xe135, 0x1bc3: 0xe135, 0x1bc4: 0xe115, 0x1bc5: 0xe115, + 0x1bc6: 0xe175, 0x1bc7: 0xe175, 0x1bc8: 0xe115, 0x1bc9: 0xe115, 0x1bca: 0xe135, 0x1bcb: 0xe135, + 0x1bcc: 0xe115, 0x1bcd: 0xe115, 0x1bce: 0xe1f5, 0x1bcf: 0xe1f5, 0x1bd0: 0xe115, 0x1bd1: 0xe115, + 0x1bd2: 0xe135, 0x1bd3: 0xe135, 0x1bd4: 0xe115, 0x1bd5: 0xe115, 0x1bd6: 0xe175, 0x1bd7: 0xe175, + 0x1bd8: 0xe115, 0x1bd9: 0xe115, 0x1bda: 0xe135, 0x1bdb: 0xe135, 0x1bdc: 0xe115, 0x1bdd: 0xe115, + 0x1bde: 0x8b05, 0x1bdf: 0x8b05, 0x1be0: 0x04b5, 0x1be1: 0x04b5, 0x1be2: 0x0208, 0x1be3: 0x0208, + 0x1be4: 0x0208, 0x1be5: 0x0208, 0x1be6: 0x0208, 0x1be7: 0x0208, 0x1be8: 0x0208, 0x1be9: 0x0208, + 0x1bea: 0x0208, 0x1beb: 0x0208, 0x1bec: 0x0208, 0x1bed: 0x0208, 0x1bee: 0x0208, 0x1bef: 0x0208, + 0x1bf0: 0x0208, 0x1bf1: 0x0208, 0x1bf2: 0x0208, 0x1bf3: 0x0208, 0x1bf4: 0x0208, 0x1bf5: 0x0208, + 0x1bf6: 0x0208, 0x1bf7: 0x0208, 0x1bf8: 0x0208, 0x1bf9: 0x0208, 0x1bfa: 0x0208, 0x1bfb: 0x0208, + 0x1bfc: 0x0208, 0x1bfd: 0x0208, 0x1bfe: 0x0208, 0x1bff: 0x0208, // Block 0x70, offset 0x1c00 - 0x1c00: 0x10f9, 0x1c01: 0xbbe9, 0x1c02: 0x2079, 0x1c03: 0xbc21, 0x1c04: 0xbac9, 0x1c05: 0x1429, - 0x1c06: 0xbb11, 0x1c07: 0x10e1, 0x1c08: 0x1111, 0x1c09: 0x2109, 0x1c0a: 0xbc41, 0x1c0b: 0xbc41, - 0x1c0c: 0x0040, 0x1c0d: 0x0040, 0x1c0e: 0x1f41, 0x1c0f: 0x00c9, 0x1c10: 0x0069, 0x1c11: 0x0079, - 0x1c12: 0x1f51, 0x1c13: 0x1f61, 0x1c14: 0x1f71, 0x1c15: 0x1f81, 0x1c16: 0x1f91, 0x1c17: 0x1fa1, - 0x1c18: 0x1f41, 0x1c19: 0x00c9, 0x1c1a: 0x0069, 0x1c1b: 0x0079, 0x1c1c: 0x1f51, 0x1c1d: 0x1f61, - 0x1c1e: 0x1f71, 0x1c1f: 0x1f81, 0x1c20: 0x1f91, 0x1c21: 0x1fa1, 0x1c22: 0x1f41, 0x1c23: 0x00c9, - 0x1c24: 0x0069, 0x1c25: 0x0079, 0x1c26: 0x1f51, 0x1c27: 0x1f61, 0x1c28: 0x1f71, 0x1c29: 0x1f81, - 0x1c2a: 0x1f91, 0x1c2b: 0x1fa1, 0x1c2c: 0x1f41, 0x1c2d: 0x00c9, 0x1c2e: 0x0069, 0x1c2f: 0x0079, - 0x1c30: 0x1f51, 0x1c31: 0x1f61, 0x1c32: 0x1f71, 0x1c33: 0x1f81, 0x1c34: 0x1f91, 0x1c35: 0x1fa1, - 0x1c36: 0x1f41, 0x1c37: 0x00c9, 0x1c38: 0x0069, 0x1c39: 0x0079, 0x1c3a: 0x1f51, 0x1c3b: 0x1f61, - 0x1c3c: 0x1f71, 0x1c3d: 0x1f81, 0x1c3e: 0x1f91, 0x1c3f: 0x1fa1, + 0x1c00: 0xb189, 0x1c01: 0xb1a1, 0x1c02: 0xb201, 0x1c03: 0xb249, 0x1c04: 0x0040, 0x1c05: 0xb411, + 0x1c06: 0xb291, 0x1c07: 0xb219, 0x1c08: 0xb309, 0x1c09: 0xb429, 0x1c0a: 0xb399, 0x1c0b: 0xb3b1, + 0x1c0c: 0xb3c9, 0x1c0d: 0xb3e1, 0x1c0e: 0xb2a9, 0x1c0f: 0xb339, 0x1c10: 0xb369, 0x1c11: 0xb2d9, + 0x1c12: 0xb381, 0x1c13: 0xb279, 0x1c14: 0xb2c1, 0x1c15: 0xb1d1, 0x1c16: 0xb1e9, 0x1c17: 0xb231, + 0x1c18: 0xb261, 0x1c19: 0xb2f1, 0x1c1a: 0xb321, 0x1c1b: 0xb351, 0x1c1c: 0xbc59, 0x1c1d: 0x7949, + 0x1c1e: 0xbc71, 0x1c1f: 0xbc89, 0x1c20: 0x0040, 0x1c21: 0xb1a1, 0x1c22: 0xb201, 0x1c23: 0x0040, + 0x1c24: 0xb3f9, 0x1c25: 0x0040, 0x1c26: 0x0040, 0x1c27: 0xb219, 0x1c28: 0x0040, 0x1c29: 0xb429, + 0x1c2a: 0xb399, 0x1c2b: 0xb3b1, 0x1c2c: 0xb3c9, 0x1c2d: 0xb3e1, 0x1c2e: 0xb2a9, 0x1c2f: 0xb339, + 0x1c30: 0xb369, 0x1c31: 0xb2d9, 0x1c32: 0xb381, 0x1c33: 0x0040, 0x1c34: 0xb2c1, 0x1c35: 0xb1d1, + 0x1c36: 0xb1e9, 0x1c37: 0xb231, 0x1c38: 0x0040, 0x1c39: 0xb2f1, 0x1c3a: 0x0040, 0x1c3b: 0xb351, + 0x1c3c: 0x0040, 0x1c3d: 0x0040, 0x1c3e: 0x0040, 0x1c3f: 0x0040, // Block 0x71, offset 0x1c40 - 0x1c40: 0xe115, 0x1c41: 0xe115, 0x1c42: 0xe135, 0x1c43: 0xe135, 0x1c44: 0xe115, 0x1c45: 0xe115, - 0x1c46: 0xe175, 0x1c47: 0xe175, 0x1c48: 0xe115, 0x1c49: 0xe115, 0x1c4a: 0xe135, 0x1c4b: 0xe135, - 0x1c4c: 0xe115, 0x1c4d: 0xe115, 0x1c4e: 0xe1f5, 0x1c4f: 0xe1f5, 0x1c50: 0xe115, 0x1c51: 0xe115, - 0x1c52: 0xe135, 0x1c53: 0xe135, 0x1c54: 0xe115, 0x1c55: 0xe115, 0x1c56: 0xe175, 0x1c57: 0xe175, - 0x1c58: 0xe115, 0x1c59: 0xe115, 0x1c5a: 0xe135, 0x1c5b: 0xe135, 0x1c5c: 0xe115, 0x1c5d: 0xe115, - 0x1c5e: 0x8b05, 0x1c5f: 0x8b05, 0x1c60: 0x04b5, 0x1c61: 0x04b5, 0x1c62: 0x0a08, 0x1c63: 0x0a08, - 0x1c64: 0x0a08, 0x1c65: 0x0a08, 0x1c66: 0x0a08, 0x1c67: 0x0a08, 0x1c68: 0x0a08, 0x1c69: 0x0a08, - 0x1c6a: 0x0a08, 0x1c6b: 0x0a08, 0x1c6c: 0x0a08, 0x1c6d: 0x0a08, 0x1c6e: 0x0a08, 0x1c6f: 0x0a08, - 0x1c70: 0x0a08, 0x1c71: 0x0a08, 0x1c72: 0x0a08, 0x1c73: 0x0a08, 0x1c74: 0x0a08, 0x1c75: 0x0a08, - 0x1c76: 0x0a08, 0x1c77: 0x0a08, 0x1c78: 0x0a08, 0x1c79: 0x0a08, 0x1c7a: 0x0a08, 0x1c7b: 0x0a08, - 0x1c7c: 0x0a08, 0x1c7d: 0x0a08, 0x1c7e: 0x0a08, 0x1c7f: 0x0a08, + 0x1c40: 0x0040, 0x1c41: 0x0040, 0x1c42: 0xb201, 0x1c43: 0x0040, 0x1c44: 0x0040, 0x1c45: 0x0040, + 0x1c46: 0x0040, 0x1c47: 0xb219, 0x1c48: 0x0040, 0x1c49: 0xb429, 0x1c4a: 0x0040, 0x1c4b: 0xb3b1, + 0x1c4c: 0x0040, 0x1c4d: 0xb3e1, 0x1c4e: 0xb2a9, 0x1c4f: 0xb339, 0x1c50: 0x0040, 0x1c51: 0xb2d9, + 0x1c52: 0xb381, 0x1c53: 0x0040, 0x1c54: 0xb2c1, 0x1c55: 0x0040, 0x1c56: 0x0040, 0x1c57: 0xb231, + 0x1c58: 0x0040, 0x1c59: 0xb2f1, 0x1c5a: 0x0040, 0x1c5b: 0xb351, 0x1c5c: 0x0040, 0x1c5d: 0x7949, + 0x1c5e: 0x0040, 0x1c5f: 0xbc89, 0x1c60: 0x0040, 0x1c61: 0xb1a1, 0x1c62: 0xb201, 0x1c63: 0x0040, + 0x1c64: 0xb3f9, 0x1c65: 0x0040, 0x1c66: 0x0040, 0x1c67: 0xb219, 0x1c68: 0xb309, 0x1c69: 0xb429, + 0x1c6a: 0xb399, 0x1c6b: 0x0040, 0x1c6c: 0xb3c9, 0x1c6d: 0xb3e1, 0x1c6e: 0xb2a9, 0x1c6f: 0xb339, + 0x1c70: 0xb369, 0x1c71: 0xb2d9, 0x1c72: 0xb381, 0x1c73: 0x0040, 0x1c74: 0xb2c1, 0x1c75: 0xb1d1, + 0x1c76: 0xb1e9, 0x1c77: 0xb231, 0x1c78: 0x0040, 0x1c79: 0xb2f1, 0x1c7a: 0xb321, 0x1c7b: 0xb351, + 0x1c7c: 0xbc59, 0x1c7d: 0x0040, 0x1c7e: 0xbc71, 0x1c7f: 0x0040, // Block 0x72, offset 0x1c80 - 0x1c80: 0xb189, 0x1c81: 0xb1a1, 0x1c82: 0xb201, 0x1c83: 0xb249, 0x1c84: 0x0040, 0x1c85: 0xb411, - 0x1c86: 0xb291, 0x1c87: 0xb219, 0x1c88: 0xb309, 0x1c89: 0xb429, 0x1c8a: 0xb399, 0x1c8b: 0xb3b1, + 0x1c80: 0xb189, 0x1c81: 0xb1a1, 0x1c82: 0xb201, 0x1c83: 0xb249, 0x1c84: 0xb3f9, 0x1c85: 0xb411, + 0x1c86: 0xb291, 0x1c87: 0xb219, 0x1c88: 0xb309, 0x1c89: 0xb429, 0x1c8a: 0x0040, 0x1c8b: 0xb3b1, 0x1c8c: 0xb3c9, 0x1c8d: 0xb3e1, 0x1c8e: 0xb2a9, 0x1c8f: 0xb339, 0x1c90: 0xb369, 0x1c91: 0xb2d9, 0x1c92: 0xb381, 0x1c93: 0xb279, 0x1c94: 0xb2c1, 0x1c95: 0xb1d1, 0x1c96: 0xb1e9, 0x1c97: 0xb231, - 0x1c98: 0xb261, 0x1c99: 0xb2f1, 0x1c9a: 0xb321, 0x1c9b: 0xb351, 0x1c9c: 0xbc59, 0x1c9d: 0x7949, - 0x1c9e: 0xbc71, 0x1c9f: 0xbc89, 0x1ca0: 0x0040, 0x1ca1: 0xb1a1, 0x1ca2: 0xb201, 0x1ca3: 0x0040, - 0x1ca4: 0xb3f9, 0x1ca5: 0x0040, 0x1ca6: 0x0040, 0x1ca7: 0xb219, 0x1ca8: 0x0040, 0x1ca9: 0xb429, - 0x1caa: 0xb399, 0x1cab: 0xb3b1, 0x1cac: 0xb3c9, 0x1cad: 0xb3e1, 0x1cae: 0xb2a9, 0x1caf: 0xb339, - 0x1cb0: 0xb369, 0x1cb1: 0xb2d9, 0x1cb2: 0xb381, 0x1cb3: 0x0040, 0x1cb4: 0xb2c1, 0x1cb5: 0xb1d1, - 0x1cb6: 0xb1e9, 0x1cb7: 0xb231, 0x1cb8: 0x0040, 0x1cb9: 0xb2f1, 0x1cba: 0x0040, 0x1cbb: 0xb351, + 0x1c98: 0xb261, 0x1c99: 0xb2f1, 0x1c9a: 0xb321, 0x1c9b: 0xb351, 0x1c9c: 0x0040, 0x1c9d: 0x0040, + 0x1c9e: 0x0040, 0x1c9f: 0x0040, 0x1ca0: 0x0040, 0x1ca1: 0xb1a1, 0x1ca2: 0xb201, 0x1ca3: 0xb249, + 0x1ca4: 0x0040, 0x1ca5: 0xb411, 0x1ca6: 0xb291, 0x1ca7: 0xb219, 0x1ca8: 0xb309, 0x1ca9: 0xb429, + 0x1caa: 0x0040, 0x1cab: 0xb3b1, 0x1cac: 0xb3c9, 0x1cad: 0xb3e1, 0x1cae: 0xb2a9, 0x1caf: 0xb339, + 0x1cb0: 0xb369, 0x1cb1: 0xb2d9, 0x1cb2: 0xb381, 0x1cb3: 0xb279, 0x1cb4: 0xb2c1, 0x1cb5: 0xb1d1, + 0x1cb6: 0xb1e9, 0x1cb7: 0xb231, 0x1cb8: 0xb261, 0x1cb9: 0xb2f1, 0x1cba: 0xb321, 0x1cbb: 0xb351, 0x1cbc: 0x0040, 0x1cbd: 0x0040, 0x1cbe: 0x0040, 0x1cbf: 0x0040, // Block 0x73, offset 0x1cc0 - 0x1cc0: 0x0040, 0x1cc1: 0x0040, 0x1cc2: 0xb201, 0x1cc3: 0x0040, 0x1cc4: 0x0040, 0x1cc5: 0x0040, - 0x1cc6: 0x0040, 0x1cc7: 0xb219, 0x1cc8: 0x0040, 0x1cc9: 0xb429, 0x1cca: 0x0040, 0x1ccb: 0xb3b1, - 0x1ccc: 0x0040, 0x1ccd: 0xb3e1, 0x1cce: 0xb2a9, 0x1ccf: 0xb339, 0x1cd0: 0x0040, 0x1cd1: 0xb2d9, - 0x1cd2: 0xb381, 0x1cd3: 0x0040, 0x1cd4: 0xb2c1, 0x1cd5: 0x0040, 0x1cd6: 0x0040, 0x1cd7: 0xb231, - 0x1cd8: 0x0040, 0x1cd9: 0xb2f1, 0x1cda: 0x0040, 0x1cdb: 0xb351, 0x1cdc: 0x0040, 0x1cdd: 0x7949, - 0x1cde: 0x0040, 0x1cdf: 0xbc89, 0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xc012, 0x1ce5: 0xc032, 0x1ce6: 0xc052, 0x1ce7: 0xc072, 0x1ce8: 0xc092, 0x1ce9: 0xc0b2, + 0x1cea: 0xc0d1, 0x1ceb: 0x1159, 0x1cec: 0x0269, 0x1ced: 0x6671, 0x1cee: 0xc111, 0x1cef: 0x0040, + 0x1cf0: 0x0039, 0x1cf1: 0x0ee9, 0x1cf2: 0x1159, 0x1cf3: 0x0ef9, 0x1cf4: 0x0f09, 0x1cf5: 0x1199, + 0x1cf6: 0x0f31, 0x1cf7: 0x0249, 0x1cf8: 0x0f41, 0x1cf9: 0x0259, 0x1cfa: 0x0f51, 0x1cfb: 0x0359, + 0x1cfc: 0x0f61, 0x1cfd: 0x0f71, 0x1cfe: 0x00d9, 0x1cff: 0x0f99, // Block 0x74, offset 0x1d00 - 0x1d00: 0xb189, 0x1d01: 0xb1a1, 0x1d02: 0xb201, 0x1d03: 0xb249, 0x1d04: 0xb3f9, 0x1d05: 0xb411, - 0x1d06: 0xb291, 0x1d07: 0xb219, 0x1d08: 0xb309, 0x1d09: 0xb429, 0x1d0a: 0x0040, 0x1d0b: 0xb3b1, - 0x1d0c: 0xb3c9, 0x1d0d: 0xb3e1, 0x1d0e: 0xb2a9, 0x1d0f: 0xb339, 0x1d10: 0xb369, 0x1d11: 0xb2d9, - 0x1d12: 0xb381, 0x1d13: 0xb279, 0x1d14: 0xb2c1, 0x1d15: 0xb1d1, 0x1d16: 0xb1e9, 0x1d17: 0xb231, - 0x1d18: 0xb261, 0x1d19: 0xb2f1, 0x1d1a: 0xb321, 0x1d1b: 0xb351, 0x1d1c: 0x0040, 0x1d1d: 0x0040, - 0x1d1e: 0x0040, 0x1d1f: 0x0040, 0x1d20: 0x0040, 0x1d21: 0xb1a1, 0x1d22: 0xb201, 0x1d23: 0xb249, - 0x1d24: 0x0040, 0x1d25: 0xb411, 0x1d26: 0xb291, 0x1d27: 0xb219, 0x1d28: 0xb309, 0x1d29: 0xb429, - 0x1d2a: 0x0040, 0x1d2b: 0xb3b1, 0x1d2c: 0xb3c9, 0x1d2d: 0xb3e1, 0x1d2e: 0xb2a9, 0x1d2f: 0xb339, - 0x1d30: 0xb369, 0x1d31: 0xb2d9, 0x1d32: 0xb381, 0x1d33: 0xb279, 0x1d34: 0xb2c1, 0x1d35: 0xb1d1, - 0x1d36: 0xb1e9, 0x1d37: 0xb231, 0x1d38: 0xb261, 0x1d39: 0xb2f1, 0x1d3a: 0xb321, 0x1d3b: 0xb351, - 0x1d3c: 0x0040, 0x1d3d: 0x0040, 0x1d3e: 0x0040, 0x1d3f: 0x0040, + 0x1d00: 0x2039, 0x1d01: 0x0269, 0x1d02: 0x01d9, 0x1d03: 0x0fa9, 0x1d04: 0x0fb9, 0x1d05: 0x1089, + 0x1d06: 0x0279, 0x1d07: 0x0369, 0x1d08: 0x0289, 0x1d09: 0x13d1, 0x1d0a: 0xc129, 0x1d0b: 0x65b1, + 0x1d0c: 0xc141, 0x1d0d: 0x1441, 0x1d0e: 0xc159, 0x1d0f: 0xc179, 0x1d10: 0x0018, 0x1d11: 0x0018, + 0x1d12: 0x0018, 0x1d13: 0x0018, 0x1d14: 0x0018, 0x1d15: 0x0018, 0x1d16: 0x0018, 0x1d17: 0x0018, + 0x1d18: 0x0018, 0x1d19: 0x0018, 0x1d1a: 0x0018, 0x1d1b: 0x0018, 0x1d1c: 0x0018, 0x1d1d: 0x0018, + 0x1d1e: 0x0018, 0x1d1f: 0x0018, 0x1d20: 0x0018, 0x1d21: 0x0018, 0x1d22: 0x0018, 0x1d23: 0x0018, + 0x1d24: 0x0018, 0x1d25: 0x0018, 0x1d26: 0x0018, 0x1d27: 0x0018, 0x1d28: 0x0018, 0x1d29: 0x0018, + 0x1d2a: 0xc191, 0x1d2b: 0xc1a9, 0x1d2c: 0x0040, 0x1d2d: 0x0040, 0x1d2e: 0x0040, 0x1d2f: 0x0040, + 0x1d30: 0x0018, 0x1d31: 0x0018, 0x1d32: 0x0018, 0x1d33: 0x0018, 0x1d34: 0x0018, 0x1d35: 0x0018, + 0x1d36: 0x0018, 0x1d37: 0x0018, 0x1d38: 0x0018, 0x1d39: 0x0018, 0x1d3a: 0x0018, 0x1d3b: 0x0018, + 0x1d3c: 0x0018, 0x1d3d: 0x0018, 0x1d3e: 0x0018, 0x1d3f: 0x0018, // Block 0x75, offset 0x1d40 - 0x1d40: 0x0040, 0x1d41: 0xbca2, 0x1d42: 0xbcba, 0x1d43: 0xbcd2, 0x1d44: 0xbcea, 0x1d45: 0xbd02, - 0x1d46: 0xbd1a, 0x1d47: 0xbd32, 0x1d48: 0xbd4a, 0x1d49: 0xbd62, 0x1d4a: 0xbd7a, 0x1d4b: 0x0018, - 0x1d4c: 0x0018, 0x1d4d: 0x0040, 0x1d4e: 0x0040, 0x1d4f: 0x0040, 0x1d50: 0xbd92, 0x1d51: 0xbdb2, - 0x1d52: 0xbdd2, 0x1d53: 0xbdf2, 0x1d54: 0xbe12, 0x1d55: 0xbe32, 0x1d56: 0xbe52, 0x1d57: 0xbe72, - 0x1d58: 0xbe92, 0x1d59: 0xbeb2, 0x1d5a: 0xbed2, 0x1d5b: 0xbef2, 0x1d5c: 0xbf12, 0x1d5d: 0xbf32, - 0x1d5e: 0xbf52, 0x1d5f: 0xbf72, 0x1d60: 0xbf92, 0x1d61: 0xbfb2, 0x1d62: 0xbfd2, 0x1d63: 0xbff2, - 0x1d64: 0xc012, 0x1d65: 0xc032, 0x1d66: 0xc052, 0x1d67: 0xc072, 0x1d68: 0xc092, 0x1d69: 0xc0b2, - 0x1d6a: 0xc0d1, 0x1d6b: 0x1159, 0x1d6c: 0x0269, 0x1d6d: 0x6671, 0x1d6e: 0xc111, 0x1d6f: 0x0040, - 0x1d70: 0x0039, 0x1d71: 0x0ee9, 0x1d72: 0x1159, 0x1d73: 0x0ef9, 0x1d74: 0x0f09, 0x1d75: 0x1199, - 0x1d76: 0x0f31, 0x1d77: 0x0249, 0x1d78: 0x0f41, 0x1d79: 0x0259, 0x1d7a: 0x0f51, 0x1d7b: 0x0359, - 0x1d7c: 0x0f61, 0x1d7d: 0x0f71, 0x1d7e: 0x00d9, 0x1d7f: 0x0f99, + 0x1d40: 0xc1d9, 0x1d41: 0xc211, 0x1d42: 0xc249, 0x1d43: 0x0040, 0x1d44: 0x0040, 0x1d45: 0x0040, + 0x1d46: 0x0040, 0x1d47: 0x0040, 0x1d48: 0x0040, 0x1d49: 0x0040, 0x1d4a: 0x0040, 0x1d4b: 0x0040, + 0x1d4c: 0x0040, 0x1d4d: 0x0040, 0x1d4e: 0x0040, 0x1d4f: 0x0040, 0x1d50: 0xc269, 0x1d51: 0xc289, + 0x1d52: 0xc2a9, 0x1d53: 0xc2c9, 0x1d54: 0xc2e9, 0x1d55: 0xc309, 0x1d56: 0xc329, 0x1d57: 0xc349, + 0x1d58: 0xc369, 0x1d59: 0xc389, 0x1d5a: 0xc3a9, 0x1d5b: 0xc3c9, 0x1d5c: 0xc3e9, 0x1d5d: 0xc409, + 0x1d5e: 0xc429, 0x1d5f: 0xc449, 0x1d60: 0xc469, 0x1d61: 0xc489, 0x1d62: 0xc4a9, 0x1d63: 0xc4c9, + 0x1d64: 0xc4e9, 0x1d65: 0xc509, 0x1d66: 0xc529, 0x1d67: 0xc549, 0x1d68: 0xc569, 0x1d69: 0xc589, + 0x1d6a: 0xc5a9, 0x1d6b: 0xc5c9, 0x1d6c: 0xc5e9, 0x1d6d: 0xc609, 0x1d6e: 0xc629, 0x1d6f: 0xc649, + 0x1d70: 0xc669, 0x1d71: 0xc689, 0x1d72: 0xc6a9, 0x1d73: 0xc6c9, 0x1d74: 0xc6e9, 0x1d75: 0xc709, + 0x1d76: 0xc729, 0x1d77: 0xc749, 0x1d78: 0xc769, 0x1d79: 0xc789, 0x1d7a: 0xc7a9, 0x1d7b: 0xc7c9, + 0x1d7c: 0x0040, 0x1d7d: 0x0040, 0x1d7e: 0x0040, 0x1d7f: 0x0040, // Block 0x76, offset 0x1d80 - 0x1d80: 0x2039, 0x1d81: 0x0269, 0x1d82: 0x01d9, 0x1d83: 0x0fa9, 0x1d84: 0x0fb9, 0x1d85: 0x1089, - 0x1d86: 0x0279, 0x1d87: 0x0369, 0x1d88: 0x0289, 0x1d89: 0x13d1, 0x1d8a: 0xc129, 0x1d8b: 0x65b1, - 0x1d8c: 0xc141, 0x1d8d: 0x1441, 0x1d8e: 0xc159, 0x1d8f: 0xc179, 0x1d90: 0x0018, 0x1d91: 0x0018, - 0x1d92: 0x0018, 0x1d93: 0x0018, 0x1d94: 0x0018, 0x1d95: 0x0018, 0x1d96: 0x0018, 0x1d97: 0x0018, - 0x1d98: 0x0018, 0x1d99: 0x0018, 0x1d9a: 0x0018, 0x1d9b: 0x0018, 0x1d9c: 0x0018, 0x1d9d: 0x0018, - 0x1d9e: 0x0018, 0x1d9f: 0x0018, 0x1da0: 0x0018, 0x1da1: 0x0018, 0x1da2: 0x0018, 0x1da3: 0x0018, - 0x1da4: 0x0018, 0x1da5: 0x0018, 0x1da6: 0x0018, 0x1da7: 0x0018, 0x1da8: 0x0018, 0x1da9: 0x0018, - 0x1daa: 0xc191, 0x1dab: 0xc1a9, 0x1dac: 0x0040, 0x1dad: 0x0040, 0x1dae: 0x0040, 0x1daf: 0x0040, - 0x1db0: 0x0018, 0x1db1: 0x0018, 0x1db2: 0x0018, 0x1db3: 0x0018, 0x1db4: 0x0018, 0x1db5: 0x0018, - 0x1db6: 0x0018, 0x1db7: 0x0018, 0x1db8: 0x0018, 0x1db9: 0x0018, 0x1dba: 0x0018, 0x1dbb: 0x0018, - 0x1dbc: 0x0018, 0x1dbd: 0x0018, 0x1dbe: 0x0018, 0x1dbf: 0x0018, + 0x1d80: 0xcaf9, 0x1d81: 0xcb19, 0x1d82: 0xcb39, 0x1d83: 0x8b1d, 0x1d84: 0xcb59, 0x1d85: 0xcb79, + 0x1d86: 0xcb99, 0x1d87: 0xcbb9, 0x1d88: 0xcbd9, 0x1d89: 0xcbf9, 0x1d8a: 0xcc19, 0x1d8b: 0xcc39, + 0x1d8c: 0xcc59, 0x1d8d: 0x8b3d, 0x1d8e: 0xcc79, 0x1d8f: 0xcc99, 0x1d90: 0xccb9, 0x1d91: 0xccd9, + 0x1d92: 0x8b5d, 0x1d93: 0xccf9, 0x1d94: 0xcd19, 0x1d95: 0xc429, 0x1d96: 0x8b7d, 0x1d97: 0xcd39, + 0x1d98: 0xcd59, 0x1d99: 0xcd79, 0x1d9a: 0xcd99, 0x1d9b: 0xcdb9, 0x1d9c: 0x8b9d, 0x1d9d: 0xcdd9, + 0x1d9e: 0xcdf9, 0x1d9f: 0xce19, 0x1da0: 0xce39, 0x1da1: 0xce59, 0x1da2: 0xc789, 0x1da3: 0xce79, + 0x1da4: 0xce99, 0x1da5: 0xceb9, 0x1da6: 0xced9, 0x1da7: 0xcef9, 0x1da8: 0xcf19, 0x1da9: 0xcf39, + 0x1daa: 0xcf59, 0x1dab: 0xcf79, 0x1dac: 0xcf99, 0x1dad: 0xcfb9, 0x1dae: 0xcfd9, 0x1daf: 0xcff9, + 0x1db0: 0xd019, 0x1db1: 0xd039, 0x1db2: 0xd039, 0x1db3: 0xd039, 0x1db4: 0x8bbd, 0x1db5: 0xd059, + 0x1db6: 0xd079, 0x1db7: 0xd099, 0x1db8: 0x8bdd, 0x1db9: 0xd0b9, 0x1dba: 0xd0d9, 0x1dbb: 0xd0f9, + 0x1dbc: 0xd119, 0x1dbd: 0xd139, 0x1dbe: 0xd159, 0x1dbf: 0xd179, // Block 0x77, offset 0x1dc0 - 0x1dc0: 0xc1d9, 0x1dc1: 0xc211, 0x1dc2: 0xc249, 0x1dc3: 0x0040, 0x1dc4: 0x0040, 0x1dc5: 0x0040, - 0x1dc6: 0x0040, 0x1dc7: 0x0040, 0x1dc8: 0x0040, 0x1dc9: 0x0040, 0x1dca: 0x0040, 0x1dcb: 0x0040, - 0x1dcc: 0x0040, 0x1dcd: 0x0040, 0x1dce: 0x0040, 0x1dcf: 0x0040, 0x1dd0: 0xc269, 0x1dd1: 0xc289, - 0x1dd2: 0xc2a9, 0x1dd3: 0xc2c9, 0x1dd4: 0xc2e9, 0x1dd5: 0xc309, 0x1dd6: 0xc329, 0x1dd7: 0xc349, - 0x1dd8: 0xc369, 0x1dd9: 0xc389, 0x1dda: 0xc3a9, 0x1ddb: 0xc3c9, 0x1ddc: 0xc3e9, 0x1ddd: 0xc409, - 0x1dde: 0xc429, 0x1ddf: 0xc449, 0x1de0: 0xc469, 0x1de1: 0xc489, 0x1de2: 0xc4a9, 0x1de3: 0xc4c9, - 0x1de4: 0xc4e9, 0x1de5: 0xc509, 0x1de6: 0xc529, 0x1de7: 0xc549, 0x1de8: 0xc569, 0x1de9: 0xc589, - 0x1dea: 0xc5a9, 0x1deb: 0xc5c9, 0x1dec: 0xc5e9, 0x1ded: 0xc609, 0x1dee: 0xc629, 0x1def: 0xc649, - 0x1df0: 0xc669, 0x1df1: 0xc689, 0x1df2: 0xc6a9, 0x1df3: 0xc6c9, 0x1df4: 0xc6e9, 0x1df5: 0xc709, - 0x1df6: 0xc729, 0x1df7: 0xc749, 0x1df8: 0xc769, 0x1df9: 0xc789, 0x1dfa: 0xc7a9, 0x1dfb: 0xc7c9, - 0x1dfc: 0x0040, 0x1dfd: 0x0040, 0x1dfe: 0x0040, 0x1dff: 0x0040, + 0x1dc0: 0xd199, 0x1dc1: 0xd1b9, 0x1dc2: 0xd1d9, 0x1dc3: 0xd1f9, 0x1dc4: 0xd219, 0x1dc5: 0xd239, + 0x1dc6: 0xd239, 0x1dc7: 0xd259, 0x1dc8: 0xd279, 0x1dc9: 0xd299, 0x1dca: 0xd2b9, 0x1dcb: 0xd2d9, + 0x1dcc: 0xd2f9, 0x1dcd: 0xd319, 0x1dce: 0xd339, 0x1dcf: 0xd359, 0x1dd0: 0xd379, 0x1dd1: 0xd399, + 0x1dd2: 0xd3b9, 0x1dd3: 0xd3d9, 0x1dd4: 0xd3f9, 0x1dd5: 0xd419, 0x1dd6: 0xd439, 0x1dd7: 0xd459, + 0x1dd8: 0xd479, 0x1dd9: 0x8bfd, 0x1dda: 0xd499, 0x1ddb: 0xd4b9, 0x1ddc: 0xd4d9, 0x1ddd: 0xc309, + 0x1dde: 0xd4f9, 0x1ddf: 0xd519, 0x1de0: 0x8c1d, 0x1de1: 0x8c3d, 0x1de2: 0xd539, 0x1de3: 0xd559, + 0x1de4: 0xd579, 0x1de5: 0xd599, 0x1de6: 0xd5b9, 0x1de7: 0xd5d9, 0x1de8: 0x0040, 0x1de9: 0xd5f9, + 0x1dea: 0xd619, 0x1deb: 0xd619, 0x1dec: 0x8c5d, 0x1ded: 0xd639, 0x1dee: 0xd659, 0x1def: 0xd679, + 0x1df0: 0xd699, 0x1df1: 0x8c7d, 0x1df2: 0xd6b9, 0x1df3: 0xd6d9, 0x1df4: 0x0040, 0x1df5: 0xd6f9, + 0x1df6: 0xd719, 0x1df7: 0xd739, 0x1df8: 0xd759, 0x1df9: 0xd779, 0x1dfa: 0xd799, 0x1dfb: 0x8c9d, + 0x1dfc: 0xd7b9, 0x1dfd: 0x8cbd, 0x1dfe: 0xd7d9, 0x1dff: 0xd7f9, // Block 0x78, offset 0x1e00 - 0x1e00: 0xcaf9, 0x1e01: 0xcb19, 0x1e02: 0xcb39, 0x1e03: 0x8b1d, 0x1e04: 0xcb59, 0x1e05: 0xcb79, - 0x1e06: 0xcb99, 0x1e07: 0xcbb9, 0x1e08: 0xcbd9, 0x1e09: 0xcbf9, 0x1e0a: 0xcc19, 0x1e0b: 0xcc39, - 0x1e0c: 0xcc59, 0x1e0d: 0x8b3d, 0x1e0e: 0xcc79, 0x1e0f: 0xcc99, 0x1e10: 0xccb9, 0x1e11: 0xccd9, - 0x1e12: 0x8b5d, 0x1e13: 0xccf9, 0x1e14: 0xcd19, 0x1e15: 0xc429, 0x1e16: 0x8b7d, 0x1e17: 0xcd39, - 0x1e18: 0xcd59, 0x1e19: 0xcd79, 0x1e1a: 0xcd99, 0x1e1b: 0xcdb9, 0x1e1c: 0x8b9d, 0x1e1d: 0xcdd9, - 0x1e1e: 0xcdf9, 0x1e1f: 0xce19, 0x1e20: 0xce39, 0x1e21: 0xce59, 0x1e22: 0xc789, 0x1e23: 0xce79, - 0x1e24: 0xce99, 0x1e25: 0xceb9, 0x1e26: 0xced9, 0x1e27: 0xcef9, 0x1e28: 0xcf19, 0x1e29: 0xcf39, - 0x1e2a: 0xcf59, 0x1e2b: 0xcf79, 0x1e2c: 0xcf99, 0x1e2d: 0xcfb9, 0x1e2e: 0xcfd9, 0x1e2f: 0xcff9, - 0x1e30: 0xd019, 0x1e31: 0xd039, 0x1e32: 0xd039, 0x1e33: 0xd039, 0x1e34: 0x8bbd, 0x1e35: 0xd059, - 0x1e36: 0xd079, 0x1e37: 0xd099, 0x1e38: 0x8bdd, 0x1e39: 0xd0b9, 0x1e3a: 0xd0d9, 0x1e3b: 0xd0f9, - 0x1e3c: 0xd119, 0x1e3d: 0xd139, 0x1e3e: 0xd159, 0x1e3f: 0xd179, + 0x1e00: 0xd819, 0x1e01: 0xd839, 0x1e02: 0xd859, 0x1e03: 0xd879, 0x1e04: 0xd899, 0x1e05: 0xd8b9, + 0x1e06: 0xd8d9, 0x1e07: 0xd8f9, 0x1e08: 0xd919, 0x1e09: 0x8cdd, 0x1e0a: 0xd939, 0x1e0b: 0xd959, + 0x1e0c: 0xd979, 0x1e0d: 0xd999, 0x1e0e: 0xd9b9, 0x1e0f: 0x8cfd, 0x1e10: 0xd9d9, 0x1e11: 0x8d1d, + 0x1e12: 0x8d3d, 0x1e13: 0xd9f9, 0x1e14: 0xda19, 0x1e15: 0xda19, 0x1e16: 0xda39, 0x1e17: 0x8d5d, + 0x1e18: 0x8d7d, 0x1e19: 0xda59, 0x1e1a: 0xda79, 0x1e1b: 0xda99, 0x1e1c: 0xdab9, 0x1e1d: 0xdad9, + 0x1e1e: 0xdaf9, 0x1e1f: 0xdb19, 0x1e20: 0xdb39, 0x1e21: 0xdb59, 0x1e22: 0xdb79, 0x1e23: 0xdb99, + 0x1e24: 0x8d9d, 0x1e25: 0xdbb9, 0x1e26: 0xdbd9, 0x1e27: 0xdbf9, 0x1e28: 0xdc19, 0x1e29: 0xdbf9, + 0x1e2a: 0xdc39, 0x1e2b: 0xdc59, 0x1e2c: 0xdc79, 0x1e2d: 0xdc99, 0x1e2e: 0xdcb9, 0x1e2f: 0xdcd9, + 0x1e30: 0xdcf9, 0x1e31: 0xdd19, 0x1e32: 0xdd39, 0x1e33: 0xdd59, 0x1e34: 0xdd79, 0x1e35: 0xdd99, + 0x1e36: 0xddb9, 0x1e37: 0xddd9, 0x1e38: 0x8dbd, 0x1e39: 0xddf9, 0x1e3a: 0xde19, 0x1e3b: 0xde39, + 0x1e3c: 0xde59, 0x1e3d: 0xde79, 0x1e3e: 0x8ddd, 0x1e3f: 0xde99, // Block 0x79, offset 0x1e40 - 0x1e40: 0xd199, 0x1e41: 0xd1b9, 0x1e42: 0xd1d9, 0x1e43: 0xd1f9, 0x1e44: 0xd219, 0x1e45: 0xd239, - 0x1e46: 0xd239, 0x1e47: 0xd259, 0x1e48: 0xd279, 0x1e49: 0xd299, 0x1e4a: 0xd2b9, 0x1e4b: 0xd2d9, - 0x1e4c: 0xd2f9, 0x1e4d: 0xd319, 0x1e4e: 0xd339, 0x1e4f: 0xd359, 0x1e50: 0xd379, 0x1e51: 0xd399, - 0x1e52: 0xd3b9, 0x1e53: 0xd3d9, 0x1e54: 0xd3f9, 0x1e55: 0xd419, 0x1e56: 0xd439, 0x1e57: 0xd459, - 0x1e58: 0xd479, 0x1e59: 0x8bfd, 0x1e5a: 0xd499, 0x1e5b: 0xd4b9, 0x1e5c: 0xd4d9, 0x1e5d: 0xc309, - 0x1e5e: 0xd4f9, 0x1e5f: 0xd519, 0x1e60: 0x8c1d, 0x1e61: 0x8c3d, 0x1e62: 0xd539, 0x1e63: 0xd559, - 0x1e64: 0xd579, 0x1e65: 0xd599, 0x1e66: 0xd5b9, 0x1e67: 0xd5d9, 0x1e68: 0x2040, 0x1e69: 0xd5f9, - 0x1e6a: 0xd619, 0x1e6b: 0xd619, 0x1e6c: 0x8c5d, 0x1e6d: 0xd639, 0x1e6e: 0xd659, 0x1e6f: 0xd679, - 0x1e70: 0xd699, 0x1e71: 0x8c7d, 0x1e72: 0xd6b9, 0x1e73: 0xd6d9, 0x1e74: 0x2040, 0x1e75: 0xd6f9, - 0x1e76: 0xd719, 0x1e77: 0xd739, 0x1e78: 0xd759, 0x1e79: 0xd779, 0x1e7a: 0xd799, 0x1e7b: 0x8c9d, - 0x1e7c: 0xd7b9, 0x1e7d: 0x8cbd, 0x1e7e: 0xd7d9, 0x1e7f: 0xd7f9, + 0x1e40: 0xe599, 0x1e41: 0xe5b9, 0x1e42: 0xe5d9, 0x1e43: 0xe5f9, 0x1e44: 0xe619, 0x1e45: 0xe639, + 0x1e46: 0x8efd, 0x1e47: 0xe659, 0x1e48: 0xe679, 0x1e49: 0xe699, 0x1e4a: 0xe6b9, 0x1e4b: 0xe6d9, + 0x1e4c: 0xe6f9, 0x1e4d: 0x8f1d, 0x1e4e: 0xe719, 0x1e4f: 0xe739, 0x1e50: 0x8f3d, 0x1e51: 0x8f5d, + 0x1e52: 0xe759, 0x1e53: 0xe779, 0x1e54: 0xe799, 0x1e55: 0xe7b9, 0x1e56: 0xe7d9, 0x1e57: 0xe7f9, + 0x1e58: 0xe819, 0x1e59: 0xe839, 0x1e5a: 0xe859, 0x1e5b: 0x8f7d, 0x1e5c: 0xe879, 0x1e5d: 0x8f9d, + 0x1e5e: 0xe899, 0x1e5f: 0x0040, 0x1e60: 0xe8b9, 0x1e61: 0xe8d9, 0x1e62: 0xe8f9, 0x1e63: 0x8fbd, + 0x1e64: 0xe919, 0x1e65: 0xe939, 0x1e66: 0x8fdd, 0x1e67: 0x8ffd, 0x1e68: 0xe959, 0x1e69: 0xe979, + 0x1e6a: 0xe999, 0x1e6b: 0xe9b9, 0x1e6c: 0xe9d9, 0x1e6d: 0xe9d9, 0x1e6e: 0xe9f9, 0x1e6f: 0xea19, + 0x1e70: 0xea39, 0x1e71: 0xea59, 0x1e72: 0xea79, 0x1e73: 0xea99, 0x1e74: 0xeab9, 0x1e75: 0x901d, + 0x1e76: 0xead9, 0x1e77: 0x903d, 0x1e78: 0xeaf9, 0x1e79: 0x905d, 0x1e7a: 0xeb19, 0x1e7b: 0x907d, + 0x1e7c: 0x909d, 0x1e7d: 0x90bd, 0x1e7e: 0xeb39, 0x1e7f: 0xeb59, // Block 0x7a, offset 0x1e80 - 0x1e80: 0xd819, 0x1e81: 0xd839, 0x1e82: 0xd859, 0x1e83: 0xd879, 0x1e84: 0xd899, 0x1e85: 0xd8b9, - 0x1e86: 0xd8d9, 0x1e87: 0xd8f9, 0x1e88: 0xd919, 0x1e89: 0x8cdd, 0x1e8a: 0xd939, 0x1e8b: 0xd959, - 0x1e8c: 0xd979, 0x1e8d: 0xd999, 0x1e8e: 0xd9b9, 0x1e8f: 0x8cfd, 0x1e90: 0xd9d9, 0x1e91: 0x8d1d, - 0x1e92: 0x8d3d, 0x1e93: 0xd9f9, 0x1e94: 0xda19, 0x1e95: 0xda19, 0x1e96: 0xda39, 0x1e97: 0x8d5d, - 0x1e98: 0x8d7d, 0x1e99: 0xda59, 0x1e9a: 0xda79, 0x1e9b: 0xda99, 0x1e9c: 0xdab9, 0x1e9d: 0xdad9, - 0x1e9e: 0xdaf9, 0x1e9f: 0xdb19, 0x1ea0: 0xdb39, 0x1ea1: 0xdb59, 0x1ea2: 0xdb79, 0x1ea3: 0xdb99, - 0x1ea4: 0x8d9d, 0x1ea5: 0xdbb9, 0x1ea6: 0xdbd9, 0x1ea7: 0xdbf9, 0x1ea8: 0xdc19, 0x1ea9: 0xdbf9, - 0x1eaa: 0xdc39, 0x1eab: 0xdc59, 0x1eac: 0xdc79, 0x1ead: 0xdc99, 0x1eae: 0xdcb9, 0x1eaf: 0xdcd9, - 0x1eb0: 0xdcf9, 0x1eb1: 0xdd19, 0x1eb2: 0xdd39, 0x1eb3: 0xdd59, 0x1eb4: 0xdd79, 0x1eb5: 0xdd99, - 0x1eb6: 0xddb9, 0x1eb7: 0xddd9, 0x1eb8: 0x8dbd, 0x1eb9: 0xddf9, 0x1eba: 0xde19, 0x1ebb: 0xde39, - 0x1ebc: 0xde59, 0x1ebd: 0xde79, 0x1ebe: 0x8ddd, 0x1ebf: 0xde99, + 0x1e80: 0xeb79, 0x1e81: 0x90dd, 0x1e82: 0x90fd, 0x1e83: 0x911d, 0x1e84: 0x913d, 0x1e85: 0xeb99, + 0x1e86: 0xebb9, 0x1e87: 0xebb9, 0x1e88: 0xebd9, 0x1e89: 0xebf9, 0x1e8a: 0xec19, 0x1e8b: 0xec39, + 0x1e8c: 0xec59, 0x1e8d: 0x915d, 0x1e8e: 0xec79, 0x1e8f: 0xec99, 0x1e90: 0xecb9, 0x1e91: 0xecd9, + 0x1e92: 0x917d, 0x1e93: 0xecf9, 0x1e94: 0x919d, 0x1e95: 0x91bd, 0x1e96: 0xed19, 0x1e97: 0xed39, + 0x1e98: 0xed59, 0x1e99: 0xed79, 0x1e9a: 0xed99, 0x1e9b: 0xedb9, 0x1e9c: 0x91dd, 0x1e9d: 0x91fd, + 0x1e9e: 0x921d, 0x1e9f: 0x0040, 0x1ea0: 0xedd9, 0x1ea1: 0x923d, 0x1ea2: 0xedf9, 0x1ea3: 0xee19, + 0x1ea4: 0xee39, 0x1ea5: 0x925d, 0x1ea6: 0xee59, 0x1ea7: 0xee79, 0x1ea8: 0xee99, 0x1ea9: 0xeeb9, + 0x1eaa: 0xeed9, 0x1eab: 0x927d, 0x1eac: 0xeef9, 0x1ead: 0xef19, 0x1eae: 0xef39, 0x1eaf: 0xef59, + 0x1eb0: 0xef79, 0x1eb1: 0xef99, 0x1eb2: 0x929d, 0x1eb3: 0x92bd, 0x1eb4: 0xefb9, 0x1eb5: 0x92dd, + 0x1eb6: 0xefd9, 0x1eb7: 0x92fd, 0x1eb8: 0xeff9, 0x1eb9: 0xf019, 0x1eba: 0xf039, 0x1ebb: 0x931d, + 0x1ebc: 0x933d, 0x1ebd: 0xf059, 0x1ebe: 0x935d, 0x1ebf: 0xf079, // Block 0x7b, offset 0x1ec0 - 0x1ec0: 0xe599, 0x1ec1: 0xe5b9, 0x1ec2: 0xe5d9, 0x1ec3: 0xe5f9, 0x1ec4: 0xe619, 0x1ec5: 0xe639, - 0x1ec6: 0x8efd, 0x1ec7: 0xe659, 0x1ec8: 0xe679, 0x1ec9: 0xe699, 0x1eca: 0xe6b9, 0x1ecb: 0xe6d9, - 0x1ecc: 0xe6f9, 0x1ecd: 0x8f1d, 0x1ece: 0xe719, 0x1ecf: 0xe739, 0x1ed0: 0x8f3d, 0x1ed1: 0x8f5d, - 0x1ed2: 0xe759, 0x1ed3: 0xe779, 0x1ed4: 0xe799, 0x1ed5: 0xe7b9, 0x1ed6: 0xe7d9, 0x1ed7: 0xe7f9, - 0x1ed8: 0xe819, 0x1ed9: 0xe839, 0x1eda: 0xe859, 0x1edb: 0x8f7d, 0x1edc: 0xe879, 0x1edd: 0x8f9d, - 0x1ede: 0xe899, 0x1edf: 0x2040, 0x1ee0: 0xe8b9, 0x1ee1: 0xe8d9, 0x1ee2: 0xe8f9, 0x1ee3: 0x8fbd, - 0x1ee4: 0xe919, 0x1ee5: 0xe939, 0x1ee6: 0x8fdd, 0x1ee7: 0x8ffd, 0x1ee8: 0xe959, 0x1ee9: 0xe979, - 0x1eea: 0xe999, 0x1eeb: 0xe9b9, 0x1eec: 0xe9d9, 0x1eed: 0xe9d9, 0x1eee: 0xe9f9, 0x1eef: 0xea19, - 0x1ef0: 0xea39, 0x1ef1: 0xea59, 0x1ef2: 0xea79, 0x1ef3: 0xea99, 0x1ef4: 0xeab9, 0x1ef5: 0x901d, - 0x1ef6: 0xead9, 0x1ef7: 0x903d, 0x1ef8: 0xeaf9, 0x1ef9: 0x905d, 0x1efa: 0xeb19, 0x1efb: 0x907d, - 0x1efc: 0x909d, 0x1efd: 0x90bd, 0x1efe: 0xeb39, 0x1eff: 0xeb59, + 0x1ec0: 0xf6b9, 0x1ec1: 0xf6d9, 0x1ec2: 0xf6f9, 0x1ec3: 0xf719, 0x1ec4: 0xf739, 0x1ec5: 0x951d, + 0x1ec6: 0xf759, 0x1ec7: 0xf779, 0x1ec8: 0xf799, 0x1ec9: 0xf7b9, 0x1eca: 0xf7d9, 0x1ecb: 0x953d, + 0x1ecc: 0x955d, 0x1ecd: 0xf7f9, 0x1ece: 0xf819, 0x1ecf: 0xf839, 0x1ed0: 0xf859, 0x1ed1: 0xf879, + 0x1ed2: 0xf899, 0x1ed3: 0x957d, 0x1ed4: 0xf8b9, 0x1ed5: 0xf8d9, 0x1ed6: 0xf8f9, 0x1ed7: 0xf919, + 0x1ed8: 0x959d, 0x1ed9: 0x95bd, 0x1eda: 0xf939, 0x1edb: 0xf959, 0x1edc: 0xf979, 0x1edd: 0x95dd, + 0x1ede: 0xf999, 0x1edf: 0xf9b9, 0x1ee0: 0x6815, 0x1ee1: 0x95fd, 0x1ee2: 0xf9d9, 0x1ee3: 0xf9f9, + 0x1ee4: 0xfa19, 0x1ee5: 0x961d, 0x1ee6: 0xfa39, 0x1ee7: 0xfa59, 0x1ee8: 0xfa79, 0x1ee9: 0xfa99, + 0x1eea: 0xfab9, 0x1eeb: 0xfad9, 0x1eec: 0xfaf9, 0x1eed: 0x963d, 0x1eee: 0xfb19, 0x1eef: 0xfb39, + 0x1ef0: 0xfb59, 0x1ef1: 0x965d, 0x1ef2: 0xfb79, 0x1ef3: 0xfb99, 0x1ef4: 0xfbb9, 0x1ef5: 0xfbd9, + 0x1ef6: 0x7b35, 0x1ef7: 0x967d, 0x1ef8: 0xfbf9, 0x1ef9: 0xfc19, 0x1efa: 0xfc39, 0x1efb: 0x969d, + 0x1efc: 0xfc59, 0x1efd: 0x96bd, 0x1efe: 0xfc79, 0x1eff: 0xfc79, // Block 0x7c, offset 0x1f00 - 0x1f00: 0xeb79, 0x1f01: 0x90dd, 0x1f02: 0x90fd, 0x1f03: 0x911d, 0x1f04: 0x913d, 0x1f05: 0xeb99, - 0x1f06: 0xebb9, 0x1f07: 0xebb9, 0x1f08: 0xebd9, 0x1f09: 0xebf9, 0x1f0a: 0xec19, 0x1f0b: 0xec39, - 0x1f0c: 0xec59, 0x1f0d: 0x915d, 0x1f0e: 0xec79, 0x1f0f: 0xec99, 0x1f10: 0xecb9, 0x1f11: 0xecd9, - 0x1f12: 0x917d, 0x1f13: 0xecf9, 0x1f14: 0x919d, 0x1f15: 0x91bd, 0x1f16: 0xed19, 0x1f17: 0xed39, - 0x1f18: 0xed59, 0x1f19: 0xed79, 0x1f1a: 0xed99, 0x1f1b: 0xedb9, 0x1f1c: 0x91dd, 0x1f1d: 0x91fd, - 0x1f1e: 0x921d, 0x1f1f: 0x2040, 0x1f20: 0xedd9, 0x1f21: 0x923d, 0x1f22: 0xedf9, 0x1f23: 0xee19, - 0x1f24: 0xee39, 0x1f25: 0x925d, 0x1f26: 0xee59, 0x1f27: 0xee79, 0x1f28: 0xee99, 0x1f29: 0xeeb9, - 0x1f2a: 0xeed9, 0x1f2b: 0x927d, 0x1f2c: 0xeef9, 0x1f2d: 0xef19, 0x1f2e: 0xef39, 0x1f2f: 0xef59, - 0x1f30: 0xef79, 0x1f31: 0xef99, 0x1f32: 0x929d, 0x1f33: 0x92bd, 0x1f34: 0xefb9, 0x1f35: 0x92dd, - 0x1f36: 0xefd9, 0x1f37: 0x92fd, 0x1f38: 0xeff9, 0x1f39: 0xf019, 0x1f3a: 0xf039, 0x1f3b: 0x931d, - 0x1f3c: 0x933d, 0x1f3d: 0xf059, 0x1f3e: 0x935d, 0x1f3f: 0xf079, - // Block 0x7d, offset 0x1f40 - 0x1f40: 0xf6b9, 0x1f41: 0xf6d9, 0x1f42: 0xf6f9, 0x1f43: 0xf719, 0x1f44: 0xf739, 0x1f45: 0x951d, - 0x1f46: 0xf759, 0x1f47: 0xf779, 0x1f48: 0xf799, 0x1f49: 0xf7b9, 0x1f4a: 0xf7d9, 0x1f4b: 0x953d, - 0x1f4c: 0x955d, 0x1f4d: 0xf7f9, 0x1f4e: 0xf819, 0x1f4f: 0xf839, 0x1f50: 0xf859, 0x1f51: 0xf879, - 0x1f52: 0xf899, 0x1f53: 0x957d, 0x1f54: 0xf8b9, 0x1f55: 0xf8d9, 0x1f56: 0xf8f9, 0x1f57: 0xf919, - 0x1f58: 0x959d, 0x1f59: 0x95bd, 0x1f5a: 0xf939, 0x1f5b: 0xf959, 0x1f5c: 0xf979, 0x1f5d: 0x95dd, - 0x1f5e: 0xf999, 0x1f5f: 0xf9b9, 0x1f60: 0x6815, 0x1f61: 0x95fd, 0x1f62: 0xf9d9, 0x1f63: 0xf9f9, - 0x1f64: 0xfa19, 0x1f65: 0x961d, 0x1f66: 0xfa39, 0x1f67: 0xfa59, 0x1f68: 0xfa79, 0x1f69: 0xfa99, - 0x1f6a: 0xfab9, 0x1f6b: 0xfad9, 0x1f6c: 0xfaf9, 0x1f6d: 0x963d, 0x1f6e: 0xfb19, 0x1f6f: 0xfb39, - 0x1f70: 0xfb59, 0x1f71: 0x965d, 0x1f72: 0xfb79, 0x1f73: 0xfb99, 0x1f74: 0xfbb9, 0x1f75: 0xfbd9, - 0x1f76: 0x7b35, 0x1f77: 0x967d, 0x1f78: 0xfbf9, 0x1f79: 0xfc19, 0x1f7a: 0xfc39, 0x1f7b: 0x969d, - 0x1f7c: 0xfc59, 0x1f7d: 0x96bd, 0x1f7e: 0xfc79, 0x1f7f: 0xfc79, - // Block 0x7e, offset 0x1f80 - 0x1f80: 0xfc99, 0x1f81: 0x96dd, 0x1f82: 0xfcb9, 0x1f83: 0xfcd9, 0x1f84: 0xfcf9, 0x1f85: 0xfd19, - 0x1f86: 0xfd39, 0x1f87: 0xfd59, 0x1f88: 0xfd79, 0x1f89: 0x96fd, 0x1f8a: 0xfd99, 0x1f8b: 0xfdb9, - 0x1f8c: 0xfdd9, 0x1f8d: 0xfdf9, 0x1f8e: 0xfe19, 0x1f8f: 0xfe39, 0x1f90: 0x971d, 0x1f91: 0xfe59, - 0x1f92: 0x973d, 0x1f93: 0x975d, 0x1f94: 0x977d, 0x1f95: 0xfe79, 0x1f96: 0xfe99, 0x1f97: 0xfeb9, - 0x1f98: 0xfed9, 0x1f99: 0xfef9, 0x1f9a: 0xff19, 0x1f9b: 0xff39, 0x1f9c: 0xff59, 0x1f9d: 0x979d, - 0x1f9e: 0x0040, 0x1f9f: 0x0040, 0x1fa0: 0x0040, 0x1fa1: 0x0040, 0x1fa2: 0x0040, 0x1fa3: 0x0040, - 0x1fa4: 0x0040, 0x1fa5: 0x0040, 0x1fa6: 0x0040, 0x1fa7: 0x0040, 0x1fa8: 0x0040, 0x1fa9: 0x0040, - 0x1faa: 0x0040, 0x1fab: 0x0040, 0x1fac: 0x0040, 0x1fad: 0x0040, 0x1fae: 0x0040, 0x1faf: 0x0040, - 0x1fb0: 0x0040, 0x1fb1: 0x0040, 0x1fb2: 0x0040, 0x1fb3: 0x0040, 0x1fb4: 0x0040, 0x1fb5: 0x0040, - 0x1fb6: 0x0040, 0x1fb7: 0x0040, 0x1fb8: 0x0040, 0x1fb9: 0x0040, 0x1fba: 0x0040, 0x1fbb: 0x0040, - 0x1fbc: 0x0040, 0x1fbd: 0x0040, 0x1fbe: 0x0040, 0x1fbf: 0x0040, + 0x1f00: 0xfc99, 0x1f01: 0x96dd, 0x1f02: 0xfcb9, 0x1f03: 0xfcd9, 0x1f04: 0xfcf9, 0x1f05: 0xfd19, + 0x1f06: 0xfd39, 0x1f07: 0xfd59, 0x1f08: 0xfd79, 0x1f09: 0x96fd, 0x1f0a: 0xfd99, 0x1f0b: 0xfdb9, + 0x1f0c: 0xfdd9, 0x1f0d: 0xfdf9, 0x1f0e: 0xfe19, 0x1f0f: 0xfe39, 0x1f10: 0x971d, 0x1f11: 0xfe59, + 0x1f12: 0x973d, 0x1f13: 0x975d, 0x1f14: 0x977d, 0x1f15: 0xfe79, 0x1f16: 0xfe99, 0x1f17: 0xfeb9, + 0x1f18: 0xfed9, 0x1f19: 0xfef9, 0x1f1a: 0xff19, 0x1f1b: 0xff39, 0x1f1c: 0xff59, 0x1f1d: 0x979d, + 0x1f1e: 0x0040, 0x1f1f: 0x0040, 0x1f20: 0x0040, 0x1f21: 0x0040, 0x1f22: 0x0040, 0x1f23: 0x0040, + 0x1f24: 0x0040, 0x1f25: 0x0040, 0x1f26: 0x0040, 0x1f27: 0x0040, 0x1f28: 0x0040, 0x1f29: 0x0040, + 0x1f2a: 0x0040, 0x1f2b: 0x0040, 0x1f2c: 0x0040, 0x1f2d: 0x0040, 0x1f2e: 0x0040, 0x1f2f: 0x0040, + 0x1f30: 0x0040, 0x1f31: 0x0040, 0x1f32: 0x0040, 0x1f33: 0x0040, 0x1f34: 0x0040, 0x1f35: 0x0040, + 0x1f36: 0x0040, 0x1f37: 0x0040, 0x1f38: 0x0040, 0x1f39: 0x0040, 0x1f3a: 0x0040, 0x1f3b: 0x0040, + 0x1f3c: 0x0040, 0x1f3d: 0x0040, 0x1f3e: 0x0040, 0x1f3f: 0x0040, } -// idnaIndex: 36 blocks, 2304 entries, 4608 bytes +// idnaIndex: 35 blocks, 2240 entries, 4480 bytes // Block 0 is the zero block. -var idnaIndex = [2304]uint16{ +var idnaIndex = [2240]uint16{ // Block 0x0, offset 0x0 // Block 0x1, offset 0x40 // Block 0x2, offset 0x80 // Block 0x3, offset 0xc0 - 0xc2: 0x01, 0xc3: 0x7d, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05, - 0xc8: 0x06, 0xc9: 0x7e, 0xca: 0x7f, 0xcb: 0x07, 0xcc: 0x80, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a, - 0xd0: 0x81, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x82, 0xd6: 0x83, 0xd7: 0x84, - 0xd8: 0x0f, 0xd9: 0x10, 0xda: 0x85, 0xdb: 0x11, 0xdc: 0x12, 0xdd: 0x86, 0xde: 0x87, 0xdf: 0x88, + 0xc2: 0x01, 0xc3: 0x7b, 0xc4: 0x02, 0xc5: 0x03, 0xc6: 0x04, 0xc7: 0x05, + 0xc8: 0x06, 0xc9: 0x7c, 0xca: 0x7d, 0xcb: 0x07, 0xcc: 0x7e, 0xcd: 0x08, 0xce: 0x09, 0xcf: 0x0a, + 0xd0: 0x7f, 0xd1: 0x0b, 0xd2: 0x0c, 0xd3: 0x0d, 0xd4: 0x0e, 0xd5: 0x80, 0xd6: 0x81, 0xd7: 0x82, + 0xd8: 0x0f, 0xd9: 0x83, 0xda: 0x84, 0xdb: 0x10, 0xdc: 0x11, 0xdd: 0x85, 0xde: 0x86, 0xdf: 0x87, 0xe0: 0x02, 0xe1: 0x03, 0xe2: 0x04, 0xe3: 0x05, 0xe4: 0x06, 0xe5: 0x07, 0xe6: 0x07, 0xe7: 0x07, 0xe8: 0x07, 0xe9: 0x08, 0xea: 0x09, 0xeb: 0x07, 0xec: 0x07, 0xed: 0x0a, 0xee: 0x0b, 0xef: 0x0c, - 0xf0: 0x1d, 0xf1: 0x1e, 0xf2: 0x1e, 0xf3: 0x20, 0xf4: 0x21, + 0xf0: 0x1c, 0xf1: 0x1d, 0xf2: 0x1d, 0xf3: 0x1f, 0xf4: 0x20, // Block 0x4, offset 0x100 - 0x120: 0x89, 0x121: 0x13, 0x122: 0x8a, 0x123: 0x8b, 0x124: 0x8c, 0x125: 0x14, 0x126: 0x15, 0x127: 0x16, - 0x128: 0x17, 0x129: 0x18, 0x12a: 0x19, 0x12b: 0x1a, 0x12c: 0x1b, 0x12d: 0x1c, 0x12e: 0x1d, 0x12f: 0x8d, - 0x130: 0x8e, 0x131: 0x1e, 0x132: 0x1f, 0x133: 0x20, 0x134: 0x8f, 0x135: 0x21, 0x136: 0x90, 0x137: 0x91, - 0x138: 0x92, 0x139: 0x93, 0x13a: 0x22, 0x13b: 0x94, 0x13c: 0x95, 0x13d: 0x23, 0x13e: 0x24, 0x13f: 0x96, + 0x120: 0x88, 0x121: 0x89, 0x122: 0x8a, 0x123: 0x8b, 0x124: 0x8c, 0x125: 0x12, 0x126: 0x13, 0x127: 0x14, + 0x128: 0x15, 0x129: 0x16, 0x12a: 0x17, 0x12b: 0x18, 0x12c: 0x19, 0x12d: 0x1a, 0x12e: 0x1b, 0x12f: 0x8d, + 0x130: 0x8e, 0x131: 0x1c, 0x132: 0x1d, 0x133: 0x1e, 0x134: 0x8f, 0x135: 0x1f, 0x136: 0x90, 0x137: 0x91, + 0x138: 0x92, 0x139: 0x93, 0x13a: 0x20, 0x13b: 0x94, 0x13c: 0x95, 0x13d: 0x21, 0x13e: 0x22, 0x13f: 0x96, // Block 0x5, offset 0x140 - 0x140: 0x97, 0x141: 0x98, 0x142: 0x99, 0x143: 0x9a, 0x144: 0x9b, 0x145: 0x9c, 0x146: 0x9d, 0x147: 0x9e, - 0x148: 0x9f, 0x149: 0xa0, 0x14a: 0xa1, 0x14b: 0xa2, 0x14c: 0xa3, 0x14d: 0xa4, 0x14e: 0xa5, 0x14f: 0xa6, - 0x150: 0xa7, 0x151: 0x9f, 0x152: 0x9f, 0x153: 0x9f, 0x154: 0x9f, 0x155: 0x9f, 0x156: 0x9f, 0x157: 0x9f, - 0x158: 0x9f, 0x159: 0xa8, 0x15a: 0xa9, 0x15b: 0xaa, 0x15c: 0xab, 0x15d: 0xac, 0x15e: 0xad, 0x15f: 0xae, - 0x160: 0xaf, 0x161: 0xb0, 0x162: 0xb1, 0x163: 0xb2, 0x164: 0xb3, 0x165: 0xb4, 0x166: 0xb5, 0x167: 0xb6, - 0x168: 0xb7, 0x169: 0xb8, 0x16a: 0xb9, 0x16b: 0xba, 0x16c: 0xbb, 0x16d: 0xbc, 0x16e: 0xbd, 0x16f: 0xbe, - 0x170: 0xbf, 0x171: 0xc0, 0x172: 0xc1, 0x173: 0xc2, 0x174: 0x25, 0x175: 0x26, 0x176: 0x27, 0x177: 0xc3, - 0x178: 0x28, 0x179: 0x28, 0x17a: 0x29, 0x17b: 0x28, 0x17c: 0xc4, 0x17d: 0x2a, 0x17e: 0x2b, 0x17f: 0x2c, + 0x140: 0x97, 0x141: 0x98, 0x142: 0x99, 0x143: 0x9a, 0x144: 0x9b, 0x145: 0x9c, 0x146: 0x9b, 0x147: 0x9b, + 0x148: 0x9d, 0x149: 0x9e, 0x14a: 0x9f, 0x14b: 0xa0, 0x14c: 0xa1, 0x14d: 0xa2, 0x14e: 0xa3, 0x14f: 0xa4, + 0x150: 0xa5, 0x151: 0x9d, 0x152: 0x9d, 0x153: 0x9d, 0x154: 0x9d, 0x155: 0x9d, 0x156: 0x9d, 0x157: 0x9d, + 0x158: 0x9d, 0x159: 0xa6, 0x15a: 0xa7, 0x15b: 0xa8, 0x15c: 0xa9, 0x15d: 0xaa, 0x15e: 0xab, 0x15f: 0xac, + 0x160: 0xad, 0x161: 0xae, 0x162: 0xaf, 0x163: 0xb0, 0x164: 0xb1, 0x165: 0xb2, 0x166: 0xb3, 0x167: 0xb4, + 0x168: 0xb5, 0x169: 0xb6, 0x16a: 0xb7, 0x16b: 0xb8, 0x16c: 0xb9, 0x16d: 0xba, 0x16e: 0xbb, 0x16f: 0xbc, + 0x170: 0xbd, 0x171: 0xbe, 0x172: 0xbf, 0x173: 0xc0, 0x174: 0x23, 0x175: 0x24, 0x176: 0x25, 0x177: 0xc1, + 0x178: 0x26, 0x179: 0x26, 0x17a: 0x27, 0x17b: 0x26, 0x17c: 0xc2, 0x17d: 0x28, 0x17e: 0x29, 0x17f: 0x2a, // Block 0x6, offset 0x180 - 0x180: 0x2d, 0x181: 0x2e, 0x182: 0x2f, 0x183: 0xc5, 0x184: 0x30, 0x185: 0x31, 0x186: 0xc6, 0x187: 0x9b, - 0x188: 0xc7, 0x189: 0xc8, 0x18a: 0x9b, 0x18b: 0x9b, 0x18c: 0xc9, 0x18d: 0x9b, 0x18e: 0x9b, 0x18f: 0x9b, - 0x190: 0xca, 0x191: 0x32, 0x192: 0x33, 0x193: 0x34, 0x194: 0x9b, 0x195: 0x9b, 0x196: 0x9b, 0x197: 0x9b, + 0x180: 0x2b, 0x181: 0x2c, 0x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21c: 0x9f, 0x21d: 0x9f, 0x21e: 0x9f, 0x21f: 0x9f, - 0x220: 0x9f, 0x221: 0x9f, 0x222: 0x9f, 0x223: 0x9f, 0x224: 0x9f, 0x225: 0x9f, 0x226: 0x9f, 0x227: 0x9f, - 0x228: 0x9f, 0x229: 0x9f, 0x22a: 0x9f, 0x22b: 0x9f, 0x22c: 0x9f, 0x22d: 0x9f, 0x22e: 0x9f, 0x22f: 0x9f, - 0x230: 0x9f, 0x231: 0x9f, 0x232: 0x9f, 0x233: 0x9f, 0x234: 0x9f, 0x235: 0x9f, 0x236: 0xb2, 0x237: 0x9b, - 0x238: 0x9f, 0x239: 0x9f, 0x23a: 0x9f, 0x23b: 0x9f, 0x23c: 0x9f, 0x23d: 0x9f, 0x23e: 0x9f, 0x23f: 0x9f, + 0x200: 0x9d, 0x201: 0x9d, 0x202: 0x9d, 0x203: 0x9d, 0x204: 0x9d, 0x205: 0x9d, 0x206: 0x9d, 0x207: 0x9d, + 0x208: 0x9d, 0x209: 0x9d, 0x20a: 0x9d, 0x20b: 0x9d, 0x20c: 0x9d, 0x20d: 0x9d, 0x20e: 0x9d, 0x20f: 0x9d, + 0x210: 0x9d, 0x211: 0x9d, 0x212: 0x9d, 0x213: 0x9d, 0x214: 0x9d, 0x215: 0x9d, 0x216: 0x9d, 0x217: 0x9d, + 0x218: 0x9d, 0x219: 0x9d, 0x21a: 0x9d, 0x21b: 0x9d, 0x21c: 0x9d, 0x21d: 0x9d, 0x21e: 0x9d, 0x21f: 0x9d, + 0x220: 0x9d, 0x221: 0x9d, 0x222: 0x9d, 0x223: 0x9d, 0x224: 0x9d, 0x225: 0x9d, 0x226: 0x9d, 0x227: 0x9d, + 0x228: 0x9d, 0x229: 0x9d, 0x22a: 0x9d, 0x22b: 0x9d, 0x22c: 0x9d, 0x22d: 0x9d, 0x22e: 0x9d, 0x22f: 0x9d, + 0x230: 0x9d, 0x231: 0x9d, 0x232: 0x9d, 0x233: 0x9d, 0x234: 0x9d, 0x235: 0x9d, 0x236: 0xb0, 0x237: 0x9b, + 0x238: 0x9d, 0x239: 0x9d, 0x23a: 0x9d, 0x23b: 0x9d, 0x23c: 0x9d, 0x23d: 0x9d, 0x23e: 0x9d, 0x23f: 0x9d, // Block 0x9, offset 0x240 - 0x240: 0x9f, 0x241: 0x9f, 0x242: 0x9f, 0x243: 0x9f, 0x244: 0x9f, 0x245: 0x9f, 0x246: 0x9f, 0x247: 0x9f, - 0x248: 0x9f, 0x249: 0x9f, 0x24a: 0x9f, 0x24b: 0x9f, 0x24c: 0x9f, 0x24d: 0x9f, 0x24e: 0x9f, 0x24f: 0x9f, - 0x250: 0x9f, 0x251: 0x9f, 0x252: 0x9f, 0x253: 0x9f, 0x254: 0x9f, 0x255: 0x9f, 0x256: 0x9f, 0x257: 0x9f, - 0x258: 0x9f, 0x259: 0x9f, 0x25a: 0x9f, 0x25b: 0x9f, 0x25c: 0x9f, 0x25d: 0x9f, 0x25e: 0x9f, 0x25f: 0x9f, - 0x260: 0x9f, 0x261: 0x9f, 0x262: 0x9f, 0x263: 0x9f, 0x264: 0x9f, 0x265: 0x9f, 0x266: 0x9f, 0x267: 0x9f, - 0x268: 0x9f, 0x269: 0x9f, 0x26a: 0x9f, 0x26b: 0x9f, 0x26c: 0x9f, 0x26d: 0x9f, 0x26e: 0x9f, 0x26f: 0x9f, - 0x270: 0x9f, 0x271: 0x9f, 0x272: 0x9f, 0x273: 0x9f, 0x274: 0x9f, 0x275: 0x9f, 0x276: 0x9f, 0x277: 0x9f, - 0x278: 0x9f, 0x279: 0x9f, 0x27a: 0x9f, 0x27b: 0x9f, 0x27c: 0x9f, 0x27d: 0x9f, 0x27e: 0x9f, 0x27f: 0x9f, + 0x240: 0x9d, 0x241: 0x9d, 0x242: 0x9d, 0x243: 0x9d, 0x244: 0x9d, 0x245: 0x9d, 0x246: 0x9d, 0x247: 0x9d, + 0x248: 0x9d, 0x249: 0x9d, 0x24a: 0x9d, 0x24b: 0x9d, 0x24c: 0x9d, 0x24d: 0x9d, 0x24e: 0x9d, 0x24f: 0x9d, + 0x250: 0x9d, 0x251: 0x9d, 0x252: 0x9d, 0x253: 0x9d, 0x254: 0x9d, 0x255: 0x9d, 0x256: 0x9d, 0x257: 0x9d, + 0x258: 0x9d, 0x259: 0x9d, 0x25a: 0x9d, 0x25b: 0x9d, 0x25c: 0x9d, 0x25d: 0x9d, 0x25e: 0x9d, 0x25f: 0x9d, + 0x260: 0x9d, 0x261: 0x9d, 0x262: 0x9d, 0x263: 0x9d, 0x264: 0x9d, 0x265: 0x9d, 0x266: 0x9d, 0x267: 0x9d, + 0x268: 0x9d, 0x269: 0x9d, 0x26a: 0x9d, 0x26b: 0x9d, 0x26c: 0x9d, 0x26d: 0x9d, 0x26e: 0x9d, 0x26f: 0x9d, + 0x270: 0x9d, 0x271: 0x9d, 0x272: 0x9d, 0x273: 0x9d, 0x274: 0x9d, 0x275: 0x9d, 0x276: 0x9d, 0x277: 0x9d, + 0x278: 0x9d, 0x279: 0x9d, 0x27a: 0x9d, 0x27b: 0x9d, 0x27c: 0x9d, 0x27d: 0x9d, 0x27e: 0x9d, 0x27f: 0x9d, // Block 0xa, offset 0x280 - 0x280: 0x9f, 0x281: 0x9f, 0x282: 0x9f, 0x283: 0x9f, 0x284: 0x9f, 0x285: 0x9f, 0x286: 0x9f, 0x287: 0x9f, - 0x288: 0x9f, 0x289: 0x9f, 0x28a: 0x9f, 0x28b: 0x9f, 0x28c: 0x9f, 0x28d: 0x9f, 0x28e: 0x9f, 0x28f: 0x9f, - 0x290: 0x9f, 0x291: 0x9f, 0x292: 0x9f, 0x293: 0x9f, 0x294: 0x9f, 0x295: 0x9f, 0x296: 0x9f, 0x297: 0x9f, - 0x298: 0x9f, 0x299: 0x9f, 0x29a: 0x9f, 0x29b: 0x9f, 0x29c: 0x9f, 0x29d: 0x9f, 0x29e: 0x9f, 0x29f: 0x9f, - 0x2a0: 0x9f, 0x2a1: 0x9f, 0x2a2: 0x9f, 0x2a3: 0x9f,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9f, 0x315: 0x9f, 0x316: 0x9f, 0x317: 0x9f, - 0x318: 0x9f, 0x319: 0x9f, 0x31a: 0x9f, 0x31b: 0x9f, 0x31c: 0x9f, 0x31d: 0x9f, 0x31e: 0xf9, 0x31f: 0xfa, + 0x300: 0x9d, 0x301: 0x9d, 0x302: 0x9d, 0x303: 0x9d, 0x304: 0x9d, 0x305: 0x9d, 0x306: 0x9d, 0x307: 0x9d, + 0x308: 0x9d, 0x309: 0x9d, 0x30a: 0x9d, 0x30b: 0x9d, 0x30c: 0x9d, 0x30d: 0x9d, 0x30e: 0x9d, 0x30f: 0x9d, + 0x310: 0x9d, 0x311: 0x9d, 0x312: 0x9d, 0x313: 0x9d, 0x314: 0x9d, 0x315: 0x9d, 0x316: 0x9d, 0x317: 0x9d, + 0x318: 0x9d, 0x319: 0x9d, 0x31a: 0x9d, 0x31b: 0x9d, 0x31c: 0x9d, 0x31d: 0x9d, 0x31e: 0xf8, 0x31f: 0xf9, // Block 0xd, offset 0x340 - 0x340: 0xba, 0x341: 0xba, 0x342: 0xba, 0x343: 0xba, 0x344: 0xba, 0x345: 0xba, 0x346: 0xba, 0x347: 0xba, - 0x348: 0xba, 0x349: 0xba, 0x34a: 0xba, 0x34b: 0xba, 0x34c: 0xba, 0x34d: 0xba, 0x34e: 0xba, 0x34f: 0xba, - 0x350: 0xba, 0x351: 0xba, 0x352: 0xba, 0x353: 0xba, 0x354: 0xba, 0x355: 0xba, 0x356: 0xba, 0x357: 0xba, - 0x358: 0xba, 0x359: 0xba, 0x35a: 0xba, 0x35b: 0xba, 0x35c: 0xba, 0x35d: 0xba, 0x35e: 0xba, 0x35f: 0xba, - 0x360: 0xba, 0x361: 0xba, 0x362: 0xba, 0x363: 0xba, 0x364: 0xba, 0x365: 0xba, 0x366: 0xba, 0x367: 0xba, - 0x368: 0xba, 0x369: 0xba, 0x36a: 0xba, 0x36b: 0xba, 0x36c: 0xba, 0x36d: 0xba, 0x36e: 0xba, 0x36f: 0xba, - 0x370: 0xba, 0x371: 0xba, 0x372: 0xba, 0x373: 0xba, 0x374: 0xba, 0x375: 0xba, 0x376: 0xba, 0x377: 0xba, - 0x378: 0xba, 0x379: 0xba, 0x37a: 0xba, 0x37b: 0xba, 0x37c: 0xba, 0x37d: 0xba, 0x37e: 0xba, 0x37f: 0xba, + 0x340: 0xb8, 0x341: 0xb8, 0x342: 0xb8, 0x343: 0xb8, 0x344: 0xb8, 0x345: 0xb8, 0x346: 0xb8, 0x347: 0xb8, + 0x348: 0xb8, 0x349: 0xb8, 0x34a: 0xb8, 0x34b: 0xb8, 0x34c: 0xb8, 0x34d: 0xb8, 0x34e: 0xb8, 0x34f: 0xb8, + 0x350: 0xb8, 0x351: 0xb8, 0x352: 0xb8, 0x353: 0xb8, 0x354: 0xb8, 0x355: 0xb8, 0x356: 0xb8, 0x357: 0xb8, + 0x358: 0xb8, 0x359: 0xb8, 0x35a: 0xb8, 0x35b: 0xb8, 0x35c: 0xb8, 0x35d: 0xb8, 0x35e: 0xb8, 0x35f: 0xb8, + 0x360: 0xb8, 0x361: 0xb8, 0x362: 0xb8, 0x363: 0xb8, 0x364: 0xb8, 0x365: 0xb8, 0x366: 0xb8, 0x367: 0xb8, + 0x368: 0xb8, 0x369: 0xb8, 0x36a: 0xb8, 0x36b: 0xb8, 0x36c: 0xb8, 0x36d: 0xb8, 0x36e: 0xb8, 0x36f: 0xb8, + 0x370: 0xb8, 0x371: 0xb8, 0x372: 0xb8, 0x373: 0xb8, 0x374: 0xb8, 0x375: 0xb8, 0x376: 0xb8, 0x377: 0xb8, + 0x378: 0xb8, 0x379: 0xb8, 0x37a: 0xb8, 0x37b: 0xb8, 0x37c: 0xb8, 0x37d: 0xb8, 0x37e: 0xb8, 0x37f: 0xb8, // Block 0xe, offset 0x380 - 0x380: 0xba, 0x381: 0xba, 0x382: 0xba, 0x383: 0xba, 0x384: 0xba, 0x385: 0xba, 0x386: 0xba, 0x387: 0xba, - 0x388: 0xba, 0x389: 0xba, 0x38a: 0xba, 0x38b: 0xba, 0x38c: 0xba, 0x38d: 0xba, 0x38e: 0xba, 0x38f: 0xba, - 0x390: 0xba, 0x391: 0xba, 0x392: 0xba, 0x393: 0xba, 0x394: 0xba, 0x395: 0xba, 0x396: 0xba, 0x397: 0xba, - 0x398: 0xba, 0x399: 0xba, 0x39a: 0xba, 0x39b: 0xba, 0x39c: 0xba, 0x39d: 0xba, 0x39e: 0xba, 0x39f: 0xba, - 0x3a0: 0xba, 0x3a1: 0xba, 0x3a2: 0xba, 0x3a3: 0xba, 0x3a4: 0xfb, 0x3a5: 0xfc, 0x3a6: 0xfd, 0x3a7: 0xfe, - 0x3a8: 0x47, 0x3a9: 0xff, 0x3aa: 0x100, 0x3ab: 0x48, 0x3ac: 0x49, 0x3ad: 0x4a, 0x3ae: 0x4b, 0x3af: 0x4c, - 0x3b0: 0x101, 0x3b1: 0x4d, 0x3b2: 0x4e, 0x3b3: 0x4f, 0x3b4: 0x50, 0x3b5: 0x51, 0x3b6: 0x102, 0x3b7: 0x52, - 0x3b8: 0x53, 0x3b9: 0x54, 0x3ba: 0x55, 0x3bb: 0x56, 0x3bc: 0x57, 0x3bd: 0x58, 0x3be: 0x59, 0x3bf: 0x5a, + 0x380: 0xb8, 0x381: 0xb8, 0x382: 0xb8, 0x383: 0xb8, 0x384: 0xb8, 0x385: 0xb8, 0x386: 0xb8, 0x387: 0xb8, + 0x388: 0xb8, 0x389: 0xb8, 0x38a: 0xb8, 0x38b: 0xb8, 0x38c: 0xb8, 0x38d: 0xb8, 0x38e: 0xb8, 0x38f: 0xb8, + 0x390: 0xb8, 0x391: 0xb8, 0x392: 0xb8, 0x393: 0xb8, 0x394: 0xb8, 0x395: 0xb8, 0x396: 0xb8, 0x397: 0xb8, + 0x398: 0xb8, 0x399: 0xb8, 0x39a: 0xb8, 0x39b: 0xb8, 0x39c: 0xb8, 0x39d: 0xb8, 0x39e: 0xb8, 0x39f: 0xb8, + 0x3a0: 0xb8, 0x3a1: 0xb8, 0x3a2: 0xb8, 0x3a3: 0xb8, 0x3a4: 0xfa, 0x3a5: 0xfb, 0x3a6: 0xfc, 0x3a7: 0xfd, + 0x3a8: 0x45, 0x3a9: 0xfe, 0x3aa: 0xff, 0x3ab: 0x46, 0x3ac: 0x47, 0x3ad: 0x48, 0x3ae: 0x49, 0x3af: 0x4a, + 0x3b0: 0x100, 0x3b1: 0x4b, 0x3b2: 0x4c, 0x3b3: 0x4d, 0x3b4: 0x4e, 0x3b5: 0x4f, 0x3b6: 0x101, 0x3b7: 0x50, + 0x3b8: 0x51, 0x3b9: 0x52, 0x3ba: 0x53, 0x3bb: 0x54, 0x3bc: 0x55, 0x3bd: 0x56, 0x3be: 0x57, 0x3bf: 0x58, // Block 0xf, offset 0x3c0 - 0x3c0: 0x103, 0x3c1: 0x104, 0x3c2: 0x9f, 0x3c3: 0x105, 0x3c4: 0x106, 0x3c5: 0x9b, 0x3c6: 0x107, 0x3c7: 0x108, - 0x3c8: 0xba, 0x3c9: 0xba, 0x3ca: 0x109, 0x3cb: 0x10a, 0x3cc: 0x10b, 0x3cd: 0x10c, 0x3ce: 0x10d, 0x3cf: 0x10e, - 0x3d0: 0x10f, 0x3d1: 0x9f, 0x3d2: 0x110, 0x3d3: 0x111, 0x3d4: 0x112, 0x3d5: 0x113, 0x3d6: 0xba, 0x3d7: 0xba, - 0x3d8: 0x9f, 0x3d9: 0x9f, 0x3da: 0x9f, 0x3db: 0x9f, 0x3dc: 0x114, 0x3dd: 0x115, 0x3de: 0xba, 0x3df: 0xba, - 0x3e0: 0x116, 0x3e1: 0x117, 0x3e2: 0x118, 0x3e3: 0x119, 0x3e4: 0x11a, 0x3e5: 0xba, 0x3e6: 0x11b, 0x3e7: 0x11c, - 0x3e8: 0x11d, 0x3e9: 0x11e, 0x3ea: 0x11f, 0x3eb: 0x5b, 0x3ec: 0x120, 0x3ed: 0x121, 0x3ee: 0x5c, 0x3ef: 0xba, - 0x3f0: 0x122, 0x3f1: 0x123, 0x3f2: 0x124, 0x3f3: 0x125, 0x3f4: 0xba, 0x3f5: 0xba, 0x3f6: 0xba, 0x3f7: 0xba, - 0x3f8: 0xba, 0x3f9: 0x126, 0x3fa: 0xba, 0x3fb: 0xba, 0x3fc: 0xba, 0x3fd: 0xba, 0x3fe: 0xba, 0x3ff: 0xba, + 0x3c0: 0x102, 0x3c1: 0x103, 0x3c2: 0x9d, 0x3c3: 0x104, 0x3c4: 0x105, 0x3c5: 0x9b, 0x3c6: 0x106, 0x3c7: 0x107, + 0x3c8: 0xb8, 0x3c9: 0xb8, 0x3ca: 0x108, 0x3cb: 0x109, 0x3cc: 0x10a, 0x3cd: 0x10b, 0x3ce: 0x10c, 0x3cf: 0x10d, + 0x3d0: 0x10e, 0x3d1: 0x9d, 0x3d2: 0x10f, 0x3d3: 0x110, 0x3d4: 0x111, 0x3d5: 0x112, 0x3d6: 0xb8, 0x3d7: 0xb8, + 0x3d8: 0x9d, 0x3d9: 0x9d, 0x3da: 0x9d, 0x3db: 0x9d, 0x3dc: 0x113, 0x3dd: 0x114, 0x3de: 0xb8, 0x3df: 0xb8, + 0x3e0: 0x115, 0x3e1: 0x116, 0x3e2: 0x117, 0x3e3: 0x118, 0x3e4: 0x119, 0x3e5: 0xb8, 0x3e6: 0x11a, 0x3e7: 0x11b, + 0x3e8: 0x11c, 0x3e9: 0x11d, 0x3ea: 0x11e, 0x3eb: 0x59, 0x3ec: 0x11f, 0x3ed: 0x120, 0x3ee: 0x5a, 0x3ef: 0xb8, + 0x3f0: 0x9d, 0x3f1: 0x121, 0x3f2: 0x122, 0x3f3: 0x123, 0x3f4: 0xb8, 0x3f5: 0xb8, 0x3f6: 0xb8, 0x3f7: 0xb8, + 0x3f8: 0xb8, 0x3f9: 0x124, 0x3fa: 0xb8, 0x3fb: 0xb8, 0x3fc: 0xb8, 0x3fd: 0xb8, 0x3fe: 0xb8, 0x3ff: 0xb8, // Block 0x10, offset 0x400 - 0x400: 0x127, 0x401: 0x128, 0x402: 0x129, 0x403: 0x12a, 0x404: 0x12b, 0x405: 0x12c, 0x406: 0x12d, 0x407: 0x12e, - 0x408: 0x12f, 0x409: 0xba, 0x40a: 0x130, 0x40b: 0x131, 0x40c: 0x5d, 0x40d: 0x5e, 0x40e: 0xba, 0x40f: 0xba, - 0x410: 0x132, 0x411: 0x133, 0x412: 0x134, 0x413: 0x135, 0x414: 0xba, 0x415: 0xba, 0x416: 0x136, 0x417: 0x137, - 0x418: 0x138, 0x419: 0x139, 0x41a: 0x13a, 0x41b: 0x13b, 0x41c: 0x13c, 0x41d: 0xba, 0x41e: 0xba, 0x41f: 0xba, - 0x420: 0xba, 0x421: 0xba, 0x422: 0x13d, 0x423: 0x13e, 0x424: 0xba, 0x425: 0xba, 0x426: 0xba, 0x427: 0xba, - 0x428: 0x13f, 0x429: 0x140, 0x42a: 0x141, 0x42b: 0x142, 0x42c: 0xba, 0x42d: 0xba, 0x42e: 0xba, 0x42f: 0xba, - 0x430: 0x143, 0x431: 0x144, 0x432: 0x145, 0x433: 0xba, 0x434: 0x146, 0x435: 0x147, 0x436: 0xba, 0x437: 0xba, - 0x438: 0xba, 0x439: 0xba, 0x43a: 0xba, 0x43b: 0xba, 0x43c: 0xba, 0x43d: 0xba, 0x43e: 0xba, 0x43f: 0xba, + 0x400: 0x125, 0x401: 0x126, 0x402: 0x127, 0x403: 0x128, 0x404: 0x129, 0x405: 0x12a, 0x406: 0x12b, 0x407: 0x12c, + 0x408: 0x12d, 0x409: 0xb8, 0x40a: 0x12e, 0x40b: 0x12f, 0x40c: 0x5b, 0x40d: 0x5c, 0x40e: 0xb8, 0x40f: 0xb8, + 0x410: 0x130, 0x411: 0x131, 0x412: 0x132, 0x413: 0x133, 0x414: 0xb8, 0x415: 0xb8, 0x416: 0x134, 0x417: 0x135, + 0x418: 0x136, 0x419: 0x137, 0x41a: 0x138, 0x41b: 0x139, 0x41c: 0x13a, 0x41d: 0xb8, 0x41e: 0xb8, 0x41f: 0xb8, + 0x420: 0xb8, 0x421: 0xb8, 0x422: 0x13b, 0x423: 0x13c, 0x424: 0xb8, 0x425: 0xb8, 0x426: 0xb8, 0x427: 0xb8, + 0x428: 0xb8, 0x429: 0xb8, 0x42a: 0xb8, 0x42b: 0x13d, 0x42c: 0xb8, 0x42d: 0xb8, 0x42e: 0xb8, 0x42f: 0xb8, + 0x430: 0x13e, 0x431: 0x13f, 0x432: 0x140, 0x433: 0xb8, 0x434: 0xb8, 0x435: 0xb8, 0x436: 0xb8, 0x437: 0xb8, + 0x438: 0xb8, 0x439: 0xb8, 0x43a: 0xb8, 0x43b: 0xb8, 0x43c: 0xb8, 0x43d: 0xb8, 0x43e: 0xb8, 0x43f: 0xb8, // Block 0x11, offset 0x440 - 0x440: 0x9f, 0x441: 0x9f, 0x442: 0x9f, 0x443: 0x9f, 0x444: 0x9f, 0x445: 0x9f, 0x446: 0x9f, 0x447: 0x9f, - 0x448: 0x9f, 0x449: 0x9f, 0x44a: 0x9f, 0x44b: 0x9f, 0x44c: 0x9f, 0x44d: 0x9f, 0x44e: 0x148, 0x44f: 0xba, - 0x450: 0x9b, 0x451: 0x149, 0x452: 0x9f, 0x453: 0x9f, 0x454: 0x9f, 0x455: 0x14a, 0x456: 0xba, 0x457: 0xba, - 0x458: 0xba, 0x459: 0xba, 0x45a: 0xba, 0x45b: 0xba, 0x45c: 0xba, 0x45d: 0xba, 0x45e: 0xba, 0x45f: 0xba, - 0x460: 0xba, 0x461: 0xba, 0x462: 0xba, 0x463: 0xba, 0x464: 0xba, 0x465: 0xba, 0x466: 0xba, 0x467: 0xba, - 0x468: 0xba, 0x469: 0xba, 0x46a: 0xba, 0x46b: 0xba, 0x46c: 0xba, 0x46d: 0xba, 0x46e: 0xba, 0x46f: 0xba, - 0x470: 0xba, 0x471: 0xba, 0x472: 0xba, 0x473: 0xba, 0x474: 0xba, 0x475: 0xba, 0x476: 0xba, 0x477: 0xba, - 0x478: 0xba, 0x479: 0xba, 0x47a: 0xba, 0x47b: 0xba, 0x47c: 0xba, 0x47d: 0xba, 0x47e: 0xba, 0x47f: 0xba, + 0x440: 0x9d, 0x441: 0x9d, 0x442: 0x9d, 0x443: 0x9d, 0x444: 0x9d, 0x445: 0x9d, 0x446: 0x9d, 0x447: 0x9d, + 0x448: 0x9d, 0x449: 0x9d, 0x44a: 0x9d, 0x44b: 0x9d, 0x44c: 0x9d, 0x44d: 0x9d, 0x44e: 0x141, 0x44f: 0xb8, + 0x450: 0x9b, 0x451: 0x142, 0x452: 0x9d, 0x453: 0x9d, 0x454: 0x9d, 0x455: 0x143, 0x456: 0xb8, 0x457: 0xb8, + 0x458: 0xb8, 0x459: 0xb8, 0x45a: 0xb8, 0x45b: 0xb8, 0x45c: 0xb8, 0x45d: 0xb8, 0x45e: 0xb8, 0x45f: 0xb8, + 0x460: 0xb8, 0x461: 0xb8, 0x462: 0xb8, 0x463: 0xb8, 0x464: 0xb8, 0x465: 0xb8, 0x466: 0xb8, 0x467: 0xb8, + 0x468: 0xb8, 0x469: 0xb8, 0x46a: 0xb8, 0x46b: 0xb8, 0x46c: 0xb8, 0x46d: 0xb8, 0x46e: 0xb8, 0x46f: 0xb8, + 0x470: 0xb8, 0x471: 0xb8, 0x472: 0xb8, 0x473: 0xb8, 0x474: 0xb8, 0x475: 0xb8, 0x476: 0xb8, 0x477: 0xb8, + 0x478: 0xb8, 0x479: 0xb8, 0x47a: 0xb8, 0x47b: 0xb8, 0x47c: 0xb8, 0x47d: 0xb8, 0x47e: 0xb8, 0x47f: 0xb8, // Block 0x12, offset 0x480 - 0x480: 0x9f, 0x481: 0x9f, 0x482: 0x9f, 0x483: 0x9f, 0x484: 0x9f, 0x485: 0x9f, 0x486: 0x9f, 0x487: 0x9f, - 0x488: 0x9f, 0x489: 0x9f, 0x48a: 0x9f, 0x48b: 0x9f, 0x48c: 0x9f, 0x48d: 0x9f, 0x48e: 0x9f, 0x48f: 0x9f, - 0x490: 0x14b, 0x491: 0xba, 0x492: 0xba, 0x493: 0xba, 0x494: 0xba, 0x495: 0xba, 0x496: 0xba, 0x497: 0xba, - 0x498: 0xba, 0x499: 0xba, 0x49a: 0xba, 0x49b: 0xba, 0x49c: 0xba, 0x49d: 0xba, 0x49e: 0xba, 0x49f: 0xba, - 0x4a0: 0xba, 0x4a1: 0xba, 0x4a2: 0xba, 0x4a3: 0xba, 0x4a4: 0xba, 0x4a5: 0xba, 0x4a6: 0xba, 0x4a7: 0xba, - 0x4a8: 0xba, 0x4a9: 0xba, 0x4aa: 0xba, 0x4ab: 0xba, 0x4ac: 0xba, 0x4ad: 0xba, 0x4ae: 0xba, 0x4af: 0xba, - 0x4b0: 0xba, 0x4b1: 0xba, 0x4b2: 0xba, 0x4b3: 0xba, 0x4b4: 0xba, 0x4b5: 0xba, 0x4b6: 0xba, 0x4b7: 0xba, - 0x4b8: 0xba, 0x4b9: 0xba, 0x4ba: 0xba, 0x4bb: 0xba, 0x4bc: 0xba, 0x4bd: 0xba, 0x4be: 0xba, 0x4bf: 0xba, + 0x480: 0x9d, 0x481: 0x9d, 0x482: 0x9d, 0x483: 0x9d, 0x484: 0x9d, 0x485: 0x9d, 0x486: 0x9d, 0x487: 0x9d, + 0x488: 0x9d, 0x489: 0x9d, 0x48a: 0x9d, 0x48b: 0x9d, 0x48c: 0x9d, 0x48d: 0x9d, 0x48e: 0x9d, 0x48f: 0x9d, + 0x490: 0x144, 0x491: 0xb8, 0x492: 0xb8, 0x493: 0xb8, 0x494: 0xb8, 0x495: 0xb8, 0x496: 0xb8, 0x497: 0xb8, + 0x498: 0xb8, 0x499: 0xb8, 0x49a: 0xb8, 0x49b: 0xb8, 0x49c: 0xb8, 0x49d: 0xb8, 0x49e: 0xb8, 0x49f: 0xb8, + 0x4a0: 0xb8, 0x4a1: 0xb8, 0x4a2: 0xb8, 0x4a3: 0xb8, 0x4a4: 0xb8, 0x4a5: 0xb8, 0x4a6: 0xb8, 0x4a7: 0xb8, + 0x4a8: 0xb8, 0x4a9: 0xb8, 0x4aa: 0xb8, 0x4ab: 0xb8, 0x4ac: 0xb8, 0x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ba, 0x50f: 0xba, - 0x510: 0xba, 0x511: 0xba, 0x512: 0xba, 0x513: 0xba, 0x514: 0xba, 0x515: 0xba, 0x516: 0xba, 0x517: 0xba, - 0x518: 0xba, 0x519: 0xba, 0x51a: 0xba, 0x51b: 0xba, 0x51c: 0xba, 0x51d: 0xba, 0x51e: 0xba, 0x51f: 0xba, - 0x520: 0x9f, 0x521: 0x9f, 0x522: 0x9f, 0x523: 0x9f, 0x524: 0x9f, 0x525: 0x9f, 0x526: 0x9f, 0x527: 0x9f, - 0x528: 0x142, 0x529: 0x14d, 0x52a: 0xba, 0x52b: 0x14e, 0x52c: 0x14f, 0x52d: 0x150, 0x52e: 0x151, 0x52f: 0xba, - 0x530: 0xba, 0x531: 0xba, 0x532: 0xba, 0x533: 0xba, 0x534: 0xba, 0x535: 0xba, 0x536: 0xba, 0x537: 0xba, - 0x538: 0xba, 0x539: 0xba, 0x53a: 0xba, 0x53b: 0xba, 0x53c: 0x9f, 0x53d: 0x152, 0x53e: 0x153, 0x53f: 0x154, + 0x500: 0xb8, 0x501: 0xb8, 0x502: 0xb8, 0x503: 0xb8, 0x504: 0xb8, 0x505: 0xb8, 0x506: 0xb8, 0x507: 0xb8, + 0x508: 0xb8, 0x509: 0xb8, 0x50a: 0xb8, 0x50b: 0xb8, 0x50c: 0xb8, 0x50d: 0xb8, 0x50e: 0xb8, 0x50f: 0xb8, + 0x510: 0xb8, 0x511: 0xb8, 0x512: 0xb8, 0x513: 0xb8, 0x514: 0xb8, 0x515: 0xb8, 0x516: 0xb8, 0x517: 0xb8, + 0x518: 0xb8, 0x519: 0xb8, 0x51a: 0xb8, 0x51b: 0xb8, 0x51c: 0xb8, 0x51d: 0xb8, 0x51e: 0xb8, 0x51f: 0xb8, + 0x520: 0x9d, 0x521: 0x9d, 0x522: 0x9d, 0x523: 0x9d, 0x524: 0x9d, 0x525: 0x9d, 0x526: 0x9d, 0x527: 0x9d, + 0x528: 0x13d, 0x529: 0x146, 0x52a: 0xb8, 0x52b: 0x147, 0x52c: 0x148, 0x52d: 0x149, 0x52e: 0x14a, 0x52f: 0xb8, + 0x530: 0xb8, 0x531: 0xb8, 0x532: 0xb8, 0x533: 0xb8, 0x534: 0xb8, 0x535: 0xb8, 0x536: 0xb8, 0x537: 0xb8, + 0x538: 0xb8, 0x539: 0xb8, 0x53a: 0xb8, 0x53b: 0xb8, 0x53c: 0x9d, 0x53d: 0x14b, 0x53e: 0x14c, 0x53f: 0x14d, // Block 0x15, offset 0x540 - 0x540: 0x9f, 0x541: 0x9f, 0x542: 0x9f, 0x543: 0x9f, 0x544: 0x9f, 0x545: 0x9f, 0x546: 0x9f, 0x547: 0x9f, - 0x548: 0x9f, 0x549: 0x9f, 0x54a: 0x9f, 0x54b: 0x9f, 0x54c: 0x9f, 0x54d: 0x9f, 0x54e: 0x9f, 0x54f: 0x9f, - 0x550: 0x9f, 0x551: 0x9f, 0x552: 0x9f, 0x553: 0x9f, 0x554: 0x9f, 0x555: 0x9f, 0x556: 0x9f, 0x557: 0x9f, - 0x558: 0x9f, 0x559: 0x9f, 0x55a: 0x9f, 0x55b: 0x9f, 0x55c: 0x9f, 0x55d: 0x9f, 0x55e: 0x9f, 0x55f: 0x155, - 0x560: 0x9f, 0x561: 0x9f, 0x562: 0x9f, 0x563: 0x9f, 0x564: 0x9f, 0x565: 0x9f, 0x566: 0x9f, 0x567: 0x9f, - 0x568: 0x9f, 0x569: 0x9f, 0x56a: 0x9f, 0x56b: 0x156, 0x56c: 0xba, 0x56d: 0xba, 0x56e: 0xba, 0x56f: 0xba, - 0x570: 0xba, 0x571: 0xba, 0x572: 0xba, 0x573: 0xba, 0x574: 0xba, 0x575: 0xba, 0x576: 0xba, 0x577: 0xba, - 0x578: 0xba, 0x579: 0xba, 0x57a: 0xba, 0x57b: 0xba, 0x57c: 0xba, 0x57d: 0xba, 0x57e: 0xba, 0x57f: 0xba, + 0x540: 0x9d, 0x541: 0x9d, 0x542: 0x9d, 0x543: 0x9d, 0x544: 0x9d, 0x545: 0x9d, 0x546: 0x9d, 0x547: 0x9d, + 0x548: 0x9d, 0x549: 0x9d, 0x54a: 0x9d, 0x54b: 0x9d, 0x54c: 0x9d, 0x54d: 0x9d, 0x54e: 0x9d, 0x54f: 0x9d, + 0x550: 0x9d, 0x551: 0x9d, 0x552: 0x9d, 0x553: 0x9d, 0x554: 0x9d, 0x555: 0x9d, 0x556: 0x9d, 0x557: 0x9d, + 0x558: 0x9d, 0x559: 0x9d, 0x55a: 0x9d, 0x55b: 0x9d, 0x55c: 0x9d, 0x55d: 0x9d, 0x55e: 0x9d, 0x55f: 0x14e, + 0x560: 0x9d, 0x561: 0x9d, 0x562: 0x9d, 0x563: 0x9d, 0x564: 0x9d, 0x565: 0x9d, 0x566: 0x9d, 0x567: 0x9d, + 0x568: 0x9d, 0x569: 0x9d, 0x56a: 0x9d, 0x56b: 0x14f, 0x56c: 0xb8, 0x56d: 0xb8, 0x56e: 0xb8, 0x56f: 0xb8, + 0x570: 0xb8, 0x571: 0xb8, 0x572: 0xb8, 0x573: 0xb8, 0x574: 0xb8, 0x575: 0xb8, 0x576: 0xb8, 0x577: 0xb8, + 0x578: 0xb8, 0x579: 0xb8, 0x57a: 0xb8, 0x57b: 0xb8, 0x57c: 0xb8, 0x57d: 0xb8, 0x57e: 0xb8, 0x57f: 0xb8, // Block 0x16, offset 0x580 - 0x580: 0x9f, 0x581: 0x9f, 0x582: 0x9f, 0x583: 0x9f, 0x584: 0x157, 0x585: 0x158, 0x586: 0x9f, 0x587: 0x9f, - 0x588: 0x9f, 0x589: 0x9f, 0x58a: 0x9f, 0x58b: 0x159, 0x58c: 0xba, 0x58d: 0xba, 0x58e: 0xba, 0x58f: 0xba, - 0x590: 0xba, 0x591: 0xba, 0x592: 0xba, 0x593: 0xba, 0x594: 0xba, 0x595: 0xba, 0x596: 0xba, 0x597: 0xba, - 0x598: 0xba, 0x599: 0xba, 0x59a: 0xba, 0x59b: 0xba, 0x59c: 0xba, 0x59d: 0xba, 0x59e: 0xba, 0x59f: 0xba, - 0x5a0: 0xba, 0x5a1: 0xba, 0x5a2: 0xba, 0x5a3: 0xba, 0x5a4: 0xba, 0x5a5: 0xba, 0x5a6: 0xba, 0x5a7: 0xba, - 0x5a8: 0xba, 0x5a9: 0xba, 0x5aa: 0xba, 0x5ab: 0xba, 0x5ac: 0xba, 0x5ad: 0xba, 0x5ae: 0xba, 0x5af: 0xba, - 0x5b0: 0x9f, 0x5b1: 0x15a, 0x5b2: 0x15b, 0x5b3: 0xba, 0x5b4: 0xba, 0x5b5: 0xba, 0x5b6: 0xba, 0x5b7: 0xba, - 0x5b8: 0xba, 0x5b9: 0xba, 0x5ba: 0xba, 0x5bb: 0xba, 0x5bc: 0xba, 0x5bd: 0xba, 0x5be: 0xba, 0x5bf: 0xba, + 0x580: 0x150, 0x581: 0xb8, 0x582: 0xb8, 0x583: 0xb8, 0x584: 0xb8, 0x585: 0xb8, 0x586: 0xb8, 0x587: 0xb8, + 0x588: 0xb8, 0x589: 0xb8, 0x58a: 0xb8, 0x58b: 0xb8, 0x58c: 0xb8, 0x58d: 0xb8, 0x58e: 0xb8, 0x58f: 0xb8, + 0x590: 0xb8, 0x591: 0xb8, 0x592: 0xb8, 0x593: 0xb8, 0x594: 0xb8, 0x595: 0xb8, 0x596: 0xb8, 0x597: 0xb8, + 0x598: 0xb8, 0x599: 0xb8, 0x59a: 0xb8, 0x59b: 0xb8, 0x59c: 0xb8, 0x59d: 0xb8, 0x59e: 0xb8, 0x59f: 0xb8, + 0x5a0: 0xb8, 0x5a1: 0xb8, 0x5a2: 0xb8, 0x5a3: 0xb8, 0x5a4: 0xb8, 0x5a5: 0xb8, 0x5a6: 0xb8, 0x5a7: 0xb8, + 0x5a8: 0xb8, 0x5a9: 0xb8, 0x5aa: 0xb8, 0x5ab: 0xb8, 0x5ac: 0xb8, 0x5ad: 0xb8, 0x5ae: 0xb8, 0x5af: 0xb8, + 0x5b0: 0x9d, 0x5b1: 0x151, 0x5b2: 0x152, 0x5b3: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0x9b, 0x5e4: 0x9b, 0x5e5: 0x9b, 0x5e6: 0x9b, 0x5e7: 0x9b, - 0x5e8: 0x163, 0x5e9: 0x164, 0x5ea: 0x165, 0x5eb: 0xba, 0x5ec: 0xba, 0x5ed: 0xba, 0x5ee: 0xba, 0x5ef: 0xba, - 0x5f0: 0xba, 0x5f1: 0xba, 0x5f2: 0xba, 0x5f3: 0xba, 0x5f4: 0xba, 0x5f5: 0xba, 0x5f6: 0xba, 0x5f7: 0xba, - 0x5f8: 0xba, 0x5f9: 0xba, 0x5fa: 0xba, 0x5fb: 0xba, 0x5fc: 0xba, 0x5fd: 0xba, 0x5fe: 0xba, 0x5ff: 0xba, + 0x5e8: 0x15a, 0x5e9: 0x15b, 0x5ea: 0x15c, 0x5eb: 0xb8, 0x5ec: 0xb8, 0x5ed: 0xb8, 0x5ee: 0xb8, 0x5ef: 0xb8, + 0x5f0: 0xb8, 0x5f1: 0xb8, 0x5f2: 0xb8, 0x5f3: 0xb8, 0x5f4: 0xb8, 0x5f5: 0xb8, 0x5f6: 0xb8, 0x5f7: 0xb8, + 0x5f8: 0xb8, 0x5f9: 0xb8, 0x5fa: 0xb8, 0x5fb: 0xb8, 0x5fc: 0xb8, 0x5fd: 0xb8, 0x5fe: 0xb8, 0x5ff: 0xb8, // Block 0x18, offset 0x600 - 0x600: 0x166, 0x601: 0xba, 0x602: 0xba, 0x603: 0xba, 0x604: 0xba, 0x605: 0xba, 0x606: 0xba, 0x607: 0xba, - 0x608: 0xba, 0x609: 0xba, 0x60a: 0xba, 0x60b: 0xba, 0x60c: 0xba, 0x60d: 0xba, 0x60e: 0xba, 0x60f: 0xba, - 0x610: 0xba, 0x611: 0xba, 0x612: 0xba, 0x613: 0xba, 0x614: 0xba, 0x615: 0xba, 0x616: 0xba, 0x617: 0xba, - 0x618: 0xba, 0x619: 0xba, 0x61a: 0xba, 0x61b: 0xba, 0x61c: 0xba, 0x61d: 0xba, 0x61e: 0xba, 0x61f: 0xba, - 0x620: 0x122, 0x621: 0x122, 0x622: 0x122, 0x623: 0x167, 0x624: 0x6f, 0x625: 0x168, 0x626: 0xba, 0x627: 0xba, - 0x628: 0xba, 0x629: 0xba, 0x62a: 0xba, 0x62b: 0xba, 0x62c: 0xba, 0x62d: 0xba, 0x62e: 0xba, 0x62f: 0xba, - 0x630: 0xba, 0x631: 0xba, 0x632: 0xba, 0x633: 0xba, 0x634: 0xba, 0x635: 0xba, 0x636: 0xba, 0x637: 0xba, - 0x638: 0x70, 0x639: 0x71, 0x63a: 0x72, 0x63b: 0x169, 0x63c: 0xba, 0x63d: 0xba, 0x63e: 0xba, 0x63f: 0xba, + 0x600: 0x15d, 0x601: 0xb8, 0x602: 0xb8, 0x603: 0xb8, 0x604: 0xb8, 0x605: 0xb8, 0x606: 0xb8, 0x607: 0xb8, + 0x608: 0xb8, 0x609: 0xb8, 0x60a: 0xb8, 0x60b: 0xb8, 0x60c: 0xb8, 0x60d: 0xb8, 0x60e: 0xb8, 0x60f: 0xb8, + 0x610: 0xb8, 0x611: 0xb8, 0x612: 0xb8, 0x613: 0xb8, 0x614: 0xb8, 0x615: 0xb8, 0x616: 0xb8, 0x617: 0xb8, + 0x618: 0xb8, 0x619: 0xb8, 0x61a: 0xb8, 0x61b: 0xb8, 0x61c: 0xb8, 0x61d: 0xb8, 0x61e: 0xb8, 0x61f: 0xb8, + 0x620: 0x9d, 0x621: 0x9d, 0x622: 0x9d, 0x623: 0x15e, 0x624: 0x6d, 0x625: 0x15f, 0x626: 0xb8, 0x627: 0xb8, + 0x628: 0xb8, 0x629: 0xb8, 0x62a: 0xb8, 0x62b: 0xb8, 0x62c: 0xb8, 0x62d: 0xb8, 0x62e: 0xb8, 0x62f: 0xb8, + 0x630: 0xb8, 0x631: 0xb8, 0x632: 0xb8, 0x633: 0xb8, 0x634: 0xb8, 0x635: 0xb8, 0x636: 0xb8, 0x637: 0xb8, + 0x638: 0x6e, 0x639: 0x6f, 0x63a: 0x70, 0x63b: 0x160, 0x63c: 0xb8, 0x63d: 0xb8, 0x63e: 0xb8, 0x63f: 0xb8, // Block 0x19, offset 0x640 - 0x640: 0x16a, 0x641: 0x9b, 0x642: 0x16b, 0x643: 0x16c, 0x644: 0x73, 0x645: 0x74, 0x646: 0x16d, 0x647: 0x16e, - 0x648: 0x75, 0x649: 0x16f, 0x64a: 0xba, 0x64b: 0xba, 0x64c: 0x9b, 0x64d: 0x9b, 0x64e: 0x9b, 0x64f: 0x9b, + 0x640: 0x161, 0x641: 0x9b, 0x642: 0x162, 0x643: 0x163, 0x644: 0x71, 0x645: 0x72, 0x646: 0x164, 0x647: 0x165, + 0x648: 0x73, 0x649: 0x166, 0x64a: 0xb8, 0x64b: 0xb8, 0x64c: 0x9b, 0x64d: 0x9b, 0x64e: 0x9b, 0x64f: 0x9b, 0x650: 0x9b, 0x651: 0x9b, 0x652: 0x9b, 0x653: 0x9b, 0x654: 0x9b, 0x655: 0x9b, 0x656: 0x9b, 0x657: 0x9b, - 0x658: 0x9b, 0x659: 0x9b, 0x65a: 0x9b, 0x65b: 0x170, 0x65c: 0x9b, 0x65d: 0x171, 0x65e: 0x9b, 0x65f: 0x172, - 0x660: 0x173, 0x661: 0x174, 0x662: 0x175, 0x663: 0xba, 0x664: 0x176, 0x665: 0x177, 0x666: 0x178, 0x667: 0x179, - 0x668: 0xba, 0x669: 0xba, 0x66a: 0xba, 0x66b: 0xba, 0x66c: 0xba, 0x66d: 0xba, 0x66e: 0xba, 0x66f: 0xba, - 0x670: 0xba, 0x671: 0xba, 0x672: 0xba, 0x673: 0xba, 0x674: 0xba, 0x675: 0xba, 0x676: 0xba, 0x677: 0xba, - 0x678: 0xba, 0x679: 0xba, 0x67a: 0xba, 0x67b: 0xba, 0x67c: 0xba, 0x67d: 0xba, 0x67e: 0xba, 0x67f: 0xba, + 0x658: 0x9b, 0x659: 0x9b, 0x65a: 0x9b, 0x65b: 0x167, 0x65c: 0x9b, 0x65d: 0x168, 0x65e: 0x9b, 0x65f: 0x169, + 0x660: 0x16a, 0x661: 0x16b, 0x662: 0x16c, 0x663: 0xb8, 0x664: 0x16d, 0x665: 0x16e, 0x666: 0x16f, 0x667: 0x170, + 0x668: 0xb8, 0x669: 0xb8, 0x66a: 0xb8, 0x66b: 0xb8, 0x66c: 0xb8, 0x66d: 0xb8, 0x66e: 0xb8, 0x66f: 0xb8, + 0x670: 0xb8, 0x671: 0xb8, 0x672: 0xb8, 0x673: 0xb8, 0x674: 0xb8, 0x675: 0xb8, 0x676: 0xb8, 0x677: 0xb8, + 0x678: 0xb8, 0x679: 0xb8, 0x67a: 0xb8, 0x67b: 0xb8, 0x67c: 0xb8, 0x67d: 0xb8, 0x67e: 0xb8, 0x67f: 0xb8, // Block 0x1a, offset 0x680 - 0x680: 0x9f, 0x681: 0x9f, 0x682: 0x9f, 0x683: 0x9f, 0x684: 0x9f, 0x685: 0x9f, 0x686: 0x9f, 0x687: 0x9f, - 0x688: 0x9f, 0x689: 0x9f, 0x68a: 0x9f, 0x68b: 0x9f, 0x68c: 0x9f, 0x68d: 0x9f, 0x68e: 0x9f, 0x68f: 0x9f, - 0x690: 0x9f, 0x691: 0x9f, 0x692: 0x9f, 0x693: 0x9f, 0x694: 0x9f, 0x695: 0x9f, 0x696: 0x9f, 0x697: 0x9f, - 0x698: 0x9f, 0x699: 0x9f, 0x69a: 0x9f, 0x69b: 0x17a, 0x69c: 0x9f, 0x69d: 0x9f, 0x69e: 0x9f, 0x69f: 0x9f, - 0x6a0: 0x9f, 0x6a1: 0x9f, 0x6a2: 0x9f, 0x6a3: 0x9f, 0x6a4: 0x9f, 0x6a5: 0x9f, 0x6a6: 0x9f, 0x6a7: 0x9f, - 0x6a8: 0x9f, 0x6a9: 0x9f, 0x6aa: 0x9f, 0x6ab: 0x9f, 0x6ac: 0x9f, 0x6ad: 0x9f, 0x6ae: 0x9f, 0x6af: 0x9f, - 0x6b0: 0x9f, 0x6b1: 0x9f, 0x6b2: 0x9f, 0x6b3: 0x9f, 0x6b4: 0x9f, 0x6b5: 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x727: 0x9f, - 0x728: 0x9f, 0x729: 0x9f, 0x72a: 0x9f, 0x72b: 0x9f, 0x72c: 0x9f, 0x72d: 0x9f, 0x72e: 0x9f, 0x72f: 0x9f, - 0x730: 0x9f, 0x731: 0x9f, 0x732: 0x9f, 0x733: 0x9f, 0x734: 0x9f, 0x735: 0x9f, 0x736: 0x9f, 0x737: 0x9f, - 0x738: 0x9f, 0x739: 0x9f, 0x73a: 0x17d, 0x73b: 0x9f, 0x73c: 0x9f, 0x73d: 0x9f, 0x73e: 0x9f, 0x73f: 0x9f, + 0x700: 0x9d, 0x701: 0x9d, 0x702: 0x9d, 0x703: 0x9d, 0x704: 0x9d, 0x705: 0x9d, 0x706: 0x9d, 0x707: 0x9d, + 0x708: 0x9d, 0x709: 0x9d, 0x70a: 0x9d, 0x70b: 0x9d, 0x70c: 0x9d, 0x70d: 0x9d, 0x70e: 0x9d, 0x70f: 0x9d, + 0x710: 0x9d, 0x711: 0x9d, 0x712: 0x9d, 0x713: 0x9d, 0x714: 0x9d, 0x715: 0x9d, 0x716: 0x9d, 0x717: 0x9d, + 0x718: 0x9d, 0x719: 0x9d, 0x71a: 0x9d, 0x71b: 0x9d, 0x71c: 0x9d, 0x71d: 0x9d, 0x71e: 0x9d, 0x71f: 0x9d, + 0x720: 0x9d, 0x721: 0x9d, 0x722: 0x9d, 0x723: 0x9d, 0x724: 0x9d, 0x725: 0x9d, 0x726: 0x9d, 0x727: 0x9d, + 0x728: 0x9d, 0x729: 0x9d, 0x72a: 0x9d, 0x72b: 0x9d, 0x72c: 0x9d, 0x72d: 0x9d, 0x72e: 0x9d, 0x72f: 0x9d, + 0x730: 0x9d, 0x731: 0x9d, 0x732: 0x9d, 0x733: 0x9d, 0x734: 0x9d, 0x735: 0x9d, 0x736: 0x9d, 0x737: 0x9d, + 0x738: 0x9d, 0x739: 0x9d, 0x73a: 0x174, 0x73b: 0xb8, 0x73c: 0xb8, 0x73d: 0xb8, 0x73e: 0xb8, 0x73f: 0xb8, // Block 0x1d, offset 0x740 - 0x740: 0x9f, 0x741: 0x9f, 0x742: 0x9f, 0x743: 0x9f, 0x744: 0x9f, 0x745: 0x9f, 0x746: 0x9f, 0x747: 0x9f, - 0x748: 0x9f, 0x749: 0x9f, 0x74a: 0x9f, 0x74b: 0x9f, 0x74c: 0x9f, 0x74d: 0x9f, 0x74e: 0x9f, 0x74f: 0x9f, - 0x750: 0x9f, 0x751: 0x9f, 0x752: 0x9f, 0x753: 0x9f, 0x754: 0x9f, 0x755: 0x9f, 0x756: 0x9f, 0x757: 0x9f, - 0x758: 0x9f, 0x759: 0x9f, 0x75a: 0x9f, 0x75b: 0x9f, 0x75c: 0x9f, 0x75d: 0x9f, 0x75e: 0x9f, 0x75f: 0x9f, - 0x760: 0x9f, 0x761: 0x9f, 0x762: 0x9f, 0x763: 0x9f, 0x764: 0x9f, 0x765: 0x9f, 0x766: 0x9f, 0x767: 0x9f, - 0x768: 0x9f, 0x769: 0x9f, 0x76a: 0x9f, 0x76b: 0x9f, 0x76c: 0x9f, 0x76d: 0x9f, 0x76e: 0x9f, 0x76f: 0x17e, - 0x770: 0xba, 0x771: 0xba, 0x772: 0xba, 0x773: 0xba, 0x774: 0xba, 0x775: 0xba, 0x776: 0xba, 0x777: 0xba, - 0x778: 0xba, 0x779: 0xba, 0x77a: 0xba, 0x77b: 0xba, 0x77c: 0xba, 0x77d: 0xba, 0x77e: 0xba, 0x77f: 0xba, + 0x740: 0xb8, 0x741: 0xb8, 0x742: 0xb8, 0x743: 0xb8, 0x744: 0xb8, 0x745: 0xb8, 0x746: 0xb8, 0x747: 0xb8, + 0x748: 0xb8, 0x749: 0xb8, 0x74a: 0xb8, 0x74b: 0xb8, 0x74c: 0xb8, 0x74d: 0xb8, 0x74e: 0xb8, 0x74f: 0xb8, + 0x750: 0xb8, 0x751: 0xb8, 0x752: 0xb8, 0x753: 0xb8, 0x754: 0xb8, 0x755: 0xb8, 0x756: 0xb8, 0x757: 0xb8, + 0x758: 0xb8, 0x759: 0xb8, 0x75a: 0xb8, 0x75b: 0xb8, 0x75c: 0xb8, 0x75d: 0xb8, 0x75e: 0xb8, 0x75f: 0xb8, + 0x760: 0x74, 0x761: 0x75, 0x762: 0x76, 0x763: 0x175, 0x764: 0x77, 0x765: 0x78, 0x766: 0x176, 0x767: 0x79, + 0x768: 0x7a, 0x769: 0xb8, 0x76a: 0xb8, 0x76b: 0xb8, 0x76c: 0xb8, 0x76d: 0xb8, 0x76e: 0xb8, 0x76f: 0xb8, + 0x770: 0xb8, 0x771: 0xb8, 0x772: 0xb8, 0x773: 0xb8, 0x774: 0xb8, 0x775: 0xb8, 0x776: 0xb8, 0x777: 0xb8, + 0x778: 0xb8, 0x779: 0xb8, 0x77a: 0xb8, 0x77b: 0xb8, 0x77c: 0xb8, 0x77d: 0xb8, 0x77e: 0xb8, 0x77f: 0xb8, // Block 0x1e, offset 0x780 - 0x780: 0xba, 0x781: 0xba, 0x782: 0xba, 0x783: 0xba, 0x784: 0xba, 0x785: 0xba, 0x786: 0xba, 0x787: 0xba, - 0x788: 0xba, 0x789: 0xba, 0x78a: 0xba, 0x78b: 0xba, 0x78c: 0xba, 0x78d: 0xba, 0x78e: 0xba, 0x78f: 0xba, - 0x790: 0xba, 0x791: 0xba, 0x792: 0xba, 0x793: 0xba, 0x794: 0xba, 0x795: 0xba, 0x796: 0xba, 0x797: 0xba, - 0x798: 0xba, 0x799: 0xba, 0x79a: 0xba, 0x79b: 0xba, 0x79c: 0xba, 0x79d: 0xba, 0x79e: 0xba, 0x79f: 0xba, - 0x7a0: 0x76, 0x7a1: 0x77, 0x7a2: 0x78, 0x7a3: 0x17f, 0x7a4: 0x79, 0x7a5: 0x7a, 0x7a6: 0x180, 0x7a7: 0x7b, - 0x7a8: 0x7c, 0x7a9: 0xba, 0x7aa: 0xba, 0x7ab: 0xba, 0x7ac: 0xba, 0x7ad: 0xba, 0x7ae: 0xba, 0x7af: 0xba, - 0x7b0: 0xba, 0x7b1: 0xba, 0x7b2: 0xba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: 0x0b, 0x805: 0x0b, 0x806: 0x0b, 0x807: 0x0b, - 0x808: 0x0b, 0x809: 0x0b, 0x80a: 0x0b, 0x80b: 0x0b, 0x80c: 0x0b, 0x80d: 0x0b, 0x80e: 0x0b, 0x80f: 0x0b, - 0x810: 0x0b, 0x811: 0x0b, 0x812: 0x0b, 0x813: 0x0b, 0x814: 0x0b, 0x815: 0x0b, 0x816: 0x0b, 0x817: 0x0b, - 0x818: 0x0b, 0x819: 0x0b, 0x81a: 0x0b, 0x81b: 0x0b, 0x81c: 0x0b, 0x81d: 0x0b, 0x81e: 0x0b, 0x81f: 0x0b, - 0x820: 0x0b, 0x821: 0x0b, 0x822: 0x0b, 0x823: 0x0b, 0x824: 0x0b, 0x825: 0x0b, 0x826: 0x0b, 0x827: 0x0b, - 0x828: 0x0b, 0x829: 0x0b, 0x82a: 0x0b, 0x82b: 0x0b, 0x82c: 0x0b, 0x82d: 0x0b, 0x82e: 0x0b, 0x82f: 0x0b, - 0x830: 0x0b, 0x831: 0x0b, 0x832: 0x0b, 0x833: 0x0b, 0x834: 0x0b, 0x835: 0x0b, 0x836: 0x0b, 0x837: 0x0b, - 0x838: 0x0b, 0x839: 0x0b, 0x83a: 0x0b, 0x83b: 0x0b, 0x83c: 0x0b, 0x83d: 0x0b, 0x83e: 0x0b, 0x83f: 0x0b, + 0x800: 0x177, 0x801: 0x178, 0x802: 0xb8, 0x803: 0xb8, 0x804: 0x179, 0x805: 0x179, 0x806: 0x179, 0x807: 0x17a, + 0x808: 0xb8, 0x809: 0xb8, 0x80a: 0xb8, 0x80b: 0xb8, 0x80c: 0xb8, 0x80d: 0xb8, 0x80e: 0xb8, 0x80f: 0xb8, + 0x810: 0xb8, 0x811: 0xb8, 0x812: 0xb8, 0x813: 0xb8, 0x814: 0xb8, 0x815: 0xb8, 0x816: 0xb8, 0x817: 0xb8, + 0x818: 0xb8, 0x819: 0xb8, 0x81a: 0xb8, 0x81b: 0xb8, 0x81c: 0xb8, 0x81d: 0xb8, 0x81e: 0xb8, 0x81f: 0xb8, + 0x820: 0xb8, 0x821: 0xb8, 0x822: 0xb8, 0x823: 0xb8, 0x824: 0xb8, 0x825: 0xb8, 0x826: 0xb8, 0x827: 0xb8, + 0x828: 0xb8, 0x829: 0xb8, 0x82a: 0xb8, 0x82b: 0xb8, 0x82c: 0xb8, 0x82d: 0xb8, 0x82e: 0xb8, 0x82f: 0xb8, + 0x830: 0xb8, 0x831: 0xb8, 0x832: 0xb8, 0x833: 0xb8, 0x834: 0xb8, 0x835: 0xb8, 0x836: 0xb8, 0x837: 0xb8, + 0x838: 0xb8, 0x839: 0xb8, 0x83a: 0xb8, 0x83b: 0xb8, 0x83c: 0xb8, 0x83d: 0xb8, 0x83e: 0xb8, 0x83f: 0xb8, // Block 0x21, offset 0x840 - 0x840: 0x181, 0x841: 0x182, 0x842: 0xba, 0x843: 0xba, 0x844: 0x183, 0x845: 0x183, 0x846: 0x183, 0x847: 0x184, - 0x848: 0xba, 0x849: 0xba, 0x84a: 0xba, 0x84b: 0xba, 0x84c: 0xba, 0x84d: 0xba, 0x84e: 0xba, 0x84f: 0xba, - 0x850: 0xba, 0x851: 0xba, 0x852: 0xba, 0x853: 0xba, 0x854: 0xba, 0x855: 0xba, 0x856: 0xba, 0x857: 0xba, - 0x858: 0xba, 0x859: 0xba, 0x85a: 0xba, 0x85b: 0xba, 0x85c: 0xba, 0x85d: 0xba, 0x85e: 0xba, 0x85f: 0xba, - 0x860: 0xba, 0x861: 0xba, 0x862: 0xba, 0x863: 0xba, 0x864: 0xba, 0x865: 0xba, 0x866: 0xba, 0x867: 0xba, - 0x868: 0xba, 0x869: 0xba, 0x86a: 0xba, 0x86b: 0xba, 0x86c: 0xba, 0x86d: 0xba, 0x86e: 0xba, 0x86f: 0xba, - 0x870: 0xba, 0x871: 0xba, 0x872: 0xba, 0x873: 0xba, 0x874: 0xba, 0x875: 0xba, 0x876: 0xba, 0x877: 0xba, - 0x878: 0xba, 0x879: 0xba, 0x87a: 0xba, 0x87b: 0xba, 0x87c: 0xba, 0x87d: 0xba, 0x87e: 0xba, 0x87f: 0xba, + 0x840: 0x0b, 0x841: 0x0b, 0x842: 0x0b, 0x843: 0x0b, 0x844: 0x0b, 0x845: 0x0b, 0x846: 0x0b, 0x847: 0x0b, + 0x848: 0x0b, 0x849: 0x0b, 0x84a: 0x0b, 0x84b: 0x0b, 0x84c: 0x0b, 0x84d: 0x0b, 0x84e: 0x0b, 0x84f: 0x0b, + 0x850: 0x0b, 0x851: 0x0b, 0x852: 0x0b, 0x853: 0x0b, 0x854: 0x0b, 0x855: 0x0b, 0x856: 0x0b, 0x857: 0x0b, + 0x858: 0x0b, 0x859: 0x0b, 0x85a: 0x0b, 0x85b: 0x0b, 0x85c: 0x0b, 0x85d: 0x0b, 0x85e: 0x0b, 0x85f: 0x0b, + 0x860: 0x1e, 0x861: 0x0b, 0x862: 0x0b, 0x863: 0x0b, 0x864: 0x0b, 0x865: 0x0b, 0x866: 0x0b, 0x867: 0x0b, + 0x868: 0x0b, 0x869: 0x0b, 0x86a: 0x0b, 0x86b: 0x0b, 0x86c: 0x0b, 0x86d: 0x0b, 0x86e: 0x0b, 0x86f: 0x0b, + 0x870: 0x0b, 0x871: 0x0b, 0x872: 0x0b, 0x873: 0x0b, 0x874: 0x0b, 0x875: 0x0b, 0x876: 0x0b, 0x877: 0x0b, + 0x878: 0x0b, 0x879: 0x0b, 0x87a: 0x0b, 0x87b: 0x0b, 0x87c: 0x0b, 0x87d: 0x0b, 0x87e: 0x0b, 0x87f: 0x0b, // Block 0x22, offset 0x880 0x880: 0x0b, 0x881: 0x0b, 0x882: 0x0b, 0x883: 0x0b, 0x884: 0x0b, 0x885: 0x0b, 0x886: 0x0b, 0x887: 0x0b, 0x888: 0x0b, 0x889: 0x0b, 0x88a: 0x0b, 0x88b: 0x0b, 0x88c: 0x0b, 0x88d: 0x0b, 0x88e: 0x0b, 0x88f: 0x0b, - 0x890: 0x0b, 0x891: 0x0b, 0x892: 0x0b, 0x893: 0x0b, 0x894: 0x0b, 0x895: 0x0b, 0x896: 0x0b, 0x897: 0x0b, - 0x898: 0x0b, 0x899: 0x0b, 0x89a: 0x0b, 0x89b: 0x0b, 0x89c: 0x0b, 0x89d: 0x0b, 0x89e: 0x0b, 0x89f: 0x0b, - 0x8a0: 0x1f, 0x8a1: 0x0b, 0x8a2: 0x0b, 0x8a3: 0x0b, 0x8a4: 0x0b, 0x8a5: 0x0b, 0x8a6: 0x0b, 0x8a7: 0x0b, - 0x8a8: 0x0b, 0x8a9: 0x0b, 0x8aa: 0x0b, 0x8ab: 0x0b, 0x8ac: 0x0b, 0x8ad: 0x0b, 0x8ae: 0x0b, 0x8af: 0x0b, - 0x8b0: 0x0b, 0x8b1: 0x0b, 0x8b2: 0x0b, 0x8b3: 0x0b, 0x8b4: 0x0b, 0x8b5: 0x0b, 0x8b6: 0x0b, 0x8b7: 0x0b, - 0x8b8: 0x0b, 0x8b9: 0x0b, 0x8ba: 0x0b, 0x8bb: 0x0b, 0x8bc: 0x0b, 0x8bd: 0x0b, 0x8be: 0x0b, 0x8bf: 0x0b, - // Block 0x23, offset 0x8c0 - 0x8c0: 0x0b, 0x8c1: 0x0b, 0x8c2: 0x0b, 0x8c3: 0x0b, 0x8c4: 0x0b, 0x8c5: 0x0b, 0x8c6: 0x0b, 0x8c7: 0x0b, - 0x8c8: 0x0b, 0x8c9: 0x0b, 0x8ca: 0x0b, 0x8cb: 0x0b, 0x8cc: 0x0b, 0x8cd: 0x0b, 0x8ce: 0x0b, 0x8cf: 0x0b, } -// idnaSparseOffset: 264 entries, 528 bytes -var idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x34, 0x3f, 0x4b, 0x4f, 0x5e, 0x63, 0x6b, 0x77, 0x85, 0x8a, 0x93, 0xa3, 0xb1, 0xbd, 0xc9, 0xda, 0xe4, 0xeb, 0xf8, 0x109, 0x110, 0x11b, 0x12a, 0x138, 0x142, 0x144, 0x149, 0x14c, 0x14f, 0x151, 0x15d, 0x168, 0x170, 0x176, 0x17c, 0x181, 0x186, 0x189, 0x18d, 0x193, 0x198, 0x1a4, 0x1ae, 0x1b4, 0x1c5, 0x1cf, 0x1d2, 0x1da, 0x1dd, 0x1ea, 0x1f2, 0x1f6, 0x1fd, 0x205, 0x215, 0x221, 0x223, 0x22d, 0x239, 0x245, 0x251, 0x259, 0x25e, 0x268, 0x279, 0x27d, 0x288, 0x28c, 0x295, 0x29d, 0x2a3, 0x2a8, 0x2ab, 0x2af, 0x2b5, 0x2b9, 0x2bd, 0x2c3, 0x2ca, 0x2d0, 0x2d8, 0x2df, 0x2ea, 0x2f4, 0x2f8, 0x2fb, 0x301, 0x305, 0x307, 0x30a, 0x30c, 0x30f, 0x319, 0x31c, 0x32b, 0x32f, 0x334, 0x337, 0x33b, 0x340, 0x345, 0x34b, 0x351, 0x360, 0x366, 0x36a, 0x379, 0x37e, 0x386, 0x390, 0x39b, 0x3a3, 0x3b4, 0x3bd, 0x3cd, 0x3da, 0x3e4, 0x3e9, 0x3f6, 0x3fa, 0x3ff, 0x401, 0x405, 0x407, 0x40b, 0x414, 0x41a, 0x41e, 0x42e, 0x438, 0x43d, 0x440, 0x446, 0x44d, 0x452, 0x456, 0x45c, 0x461, 0x46a, 0x46f, 0x475, 0x47c, 0x483, 0x48a, 0x48e, 0x493, 0x496, 0x49b, 0x4a7, 0x4ad, 0x4b2, 0x4b9, 0x4c1, 0x4c6, 0x4ca, 0x4da, 0x4e1, 0x4e5, 0x4e9, 0x4f0, 0x4f2, 0x4f5, 0x4f8, 0x4fc, 0x500, 0x506, 0x50f, 0x51b, 0x522, 0x52b, 0x533, 0x53a, 0x548, 0x555, 0x562, 0x56b, 0x56f, 0x57d, 0x585, 0x590, 0x599, 0x59f, 0x5a7, 0x5b0, 0x5ba, 0x5bd, 0x5c9, 0x5cc, 0x5d1, 0x5de, 0x5e7, 0x5f3, 0x5f6, 0x600, 0x609, 0x615, 0x622, 0x62a, 0x62d, 0x632, 0x635, 0x638, 0x63b, 0x642, 0x649, 0x64d, 0x658, 0x65b, 0x661, 0x666, 0x66a, 0x66d, 0x670, 0x673, 0x676, 0x679, 0x67e, 0x688, 0x68b, 0x68f, 0x69e, 0x6aa, 0x6ae, 0x6b3, 0x6b8, 0x6bc, 0x6c1, 0x6ca, 0x6d5, 0x6db, 0x6e3, 0x6e7, 0x6eb, 0x6f1, 0x6f7, 0x6fc, 0x6ff, 0x70f, 0x716, 0x719, 0x71c, 0x720, 0x726, 0x72b, 0x730, 0x735, 0x738, 0x73d, 0x740, 0x743, 0x747, 0x74b, 0x74e, 0x75e, 0x76f, 0x774, 0x776, 0x778} +// idnaSparseOffset: 256 entries, 512 bytes +var idnaSparseOffset = []uint16{0x0, 0x8, 0x19, 0x25, 0x27, 0x2c, 0x34, 0x3f, 0x4b, 0x5c, 0x60, 0x6f, 0x74, 0x7b, 0x87, 0x95, 0xa3, 0xa8, 0xb1, 0xc1, 0xcf, 0xdc, 0xe8, 0xf9, 0x103, 0x10a, 0x117, 0x128, 0x12f, 0x13a, 0x149, 0x157, 0x161, 0x163, 0x167, 0x169, 0x175, 0x180, 0x188, 0x18e, 0x194, 0x199, 0x19e, 0x1a1, 0x1a5, 0x1ab, 0x1b0, 0x1bc, 0x1c6, 0x1cc, 0x1dd, 0x1e7, 0x1ea, 0x1f2, 0x1f5, 0x202, 0x20a, 0x20e, 0x215, 0x21d, 0x22d, 0x239, 0x23b, 0x245, 0x251, 0x25d, 0x269, 0x271, 0x276, 0x280, 0x291, 0x295, 0x2a0, 0x2a4, 0x2ad, 0x2b5, 0x2bb, 0x2c0, 0x2c3, 0x2c6, 0x2ca, 0x2d0, 0x2d4, 0x2d8, 0x2de, 0x2e5, 0x2eb, 0x2f3, 0x2fa, 0x305, 0x30f, 0x313, 0x316, 0x31c, 0x320, 0x322, 0x325, 0x327, 0x32a, 0x334, 0x337, 0x346, 0x34a, 0x34f, 0x352, 0x356, 0x35b, 0x360, 0x366, 0x36c, 0x37b, 0x381, 0x385, 0x394, 0x399, 0x3a1, 0x3ab, 0x3b6, 0x3be, 0x3cf, 0x3d8, 0x3e8, 0x3f5, 0x3ff, 0x404, 0x411, 0x415, 0x41a, 0x41c, 0x420, 0x422, 0x426, 0x42f, 0x435, 0x439, 0x449, 0x453, 0x458, 0x45b, 0x461, 0x468, 0x46d, 0x471, 0x477, 0x47c, 0x485, 0x48a, 0x490, 0x497, 0x49e, 0x4a5, 0x4a9, 0x4ae, 0x4b1, 0x4b6, 0x4c2, 0x4c8, 0x4cd, 0x4d4, 0x4dc, 0x4e1, 0x4e5, 0x4f5, 0x4fc, 0x500, 0x504, 0x50b, 0x50e, 0x511, 0x515, 0x519, 0x51f, 0x528, 0x534, 0x53b, 0x544, 0x54c, 0x553, 0x561, 0x56e, 0x57b, 0x584, 0x588, 0x596, 0x59e, 0x5a9, 0x5b2, 0x5b8, 0x5c0, 0x5c9, 0x5d3, 0x5d6, 0x5e2, 0x5e5, 0x5ea, 0x5ed, 0x5f7, 0x600, 0x60c, 0x60f, 0x614, 0x617, 0x61a, 0x61d, 0x624, 0x62b, 0x62f, 0x63a, 0x63d, 0x643, 0x648, 0x64c, 0x64f, 0x652, 0x655, 0x65a, 0x664, 0x667, 0x66b, 0x67a, 0x686, 0x68a, 0x68f, 0x694, 0x698, 0x69d, 0x6a6, 0x6b1, 0x6b7, 0x6bf, 0x6c3, 0x6c7, 0x6cd, 0x6d3, 0x6d8, 0x6db, 0x6e9, 0x6f0, 0x6f3, 0x6f6, 0x6fa, 0x700, 0x705, 0x70f, 0x714, 0x717, 0x71a, 0x71d, 0x720, 0x724, 0x727, 0x737, 0x748, 0x74d, 0x74f, 0x751} -// idnaSparseValues: 1915 entries, 7660 bytes -var idnaSparseValues = [1915]valueRange{ +// idnaSparseValues: 1876 entries, 7504 bytes +var idnaSparseValues = [1876]valueRange{ // Block 0x0, offset 0x0 {value: 0x0000, lo: 0x07}, {value: 0xe105, lo: 0x80, hi: 0x96}, @@ -2415,7 +2382,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xb9, hi: 0xbf}, // Block 0x3, offset 0x25 {value: 0x0000, lo: 0x01}, - {value: 0x3308, lo: 0x80, hi: 0xbf}, + {value: 0x1308, lo: 0x80, hi: 0xbf}, // Block 0x4, offset 0x27 {value: 0x0000, lo: 0x04}, {value: 0x03f5, lo: 0x80, hi: 0x8f}, @@ -2440,123 +2407,155 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0x8b, hi: 0x8c}, {value: 0x0018, lo: 0x8d, hi: 0x8f}, {value: 0x0040, lo: 0x90, hi: 0x90}, - {value: 0x3308, lo: 0x91, hi: 0xbd}, - {value: 0x0818, lo: 0xbe, hi: 0xbe}, - {value: 0x3308, lo: 0xbf, hi: 0xbf}, + {value: 0x1308, lo: 0x91, hi: 0xbd}, + {value: 0x0018, lo: 0xbe, hi: 0xbe}, + {value: 0x1308, lo: 0xbf, hi: 0xbf}, // Block 0x7, offset 0x3f {value: 0x0000, lo: 0x0b}, - {value: 0x0818, lo: 0x80, hi: 0x80}, - {value: 0x3308, lo: 0x81, hi: 0x82}, - {value: 0x0818, lo: 0x83, hi: 0x83}, - {value: 0x3308, lo: 0x84, hi: 0x85}, - {value: 0x0818, lo: 0x86, hi: 0x86}, - {value: 0x3308, lo: 0x87, hi: 0x87}, + {value: 0x0018, lo: 0x80, hi: 0x80}, + {value: 0x1308, lo: 0x81, hi: 0x82}, + {value: 0x0018, lo: 0x83, hi: 0x83}, + {value: 0x1308, lo: 0x84, hi: 0x85}, + {value: 0x0018, lo: 0x86, hi: 0x86}, + {value: 0x1308, lo: 0x87, hi: 0x87}, {value: 0x0040, lo: 0x88, hi: 0x8f}, - {value: 0x0808, lo: 0x90, hi: 0xaa}, + {value: 0x0008, lo: 0x90, hi: 0xaa}, {value: 0x0040, lo: 0xab, hi: 0xaf}, - {value: 0x0808, lo: 0xb0, hi: 0xb4}, + {value: 0x0008, lo: 0xb0, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xbf}, // Block 0x8, offset 0x4b + {value: 0x0000, lo: 0x10}, + {value: 0x0018, lo: 0x80, hi: 0x80}, + {value: 0x0208, lo: 0x81, hi: 0x87}, + {value: 0x0408, lo: 0x88, hi: 0x88}, + {value: 0x0208, lo: 0x89, hi: 0x8a}, + {value: 0x1308, lo: 0x8b, hi: 0x9f}, + {value: 0x0008, lo: 0xa0, hi: 0xa9}, + {value: 0x0018, lo: 0xaa, hi: 0xad}, + {value: 0x0208, lo: 0xae, hi: 0xaf}, + {value: 0x1308, lo: 0xb0, hi: 0xb0}, + {value: 0x0408, lo: 0xb1, hi: 0xb3}, + {value: 0x0008, lo: 0xb4, hi: 0xb4}, + {value: 0x0429, lo: 0xb5, hi: 0xb5}, + {value: 0x0451, lo: 0xb6, hi: 0xb6}, + {value: 0x0479, lo: 0xb7, hi: 0xb7}, + {value: 0x04a1, lo: 0xb8, hi: 0xb8}, + {value: 0x0208, lo: 0xb9, hi: 0xbf}, + // Block 0x9, offset 0x5c {value: 0x0000, lo: 0x03}, - {value: 0x0a08, lo: 0x80, hi: 0x87}, - {value: 0x0c08, lo: 0x88, hi: 0x99}, - {value: 0x0a08, lo: 0x9a, hi: 0xbf}, - // Block 0x9, offset 0x4f + {value: 0x0208, lo: 0x80, hi: 0x87}, + {value: 0x0408, lo: 0x88, hi: 0x99}, + {value: 0x0208, lo: 0x9a, hi: 0xbf}, + // Block 0xa, offset 0x60 {value: 0x0000, lo: 0x0e}, - {value: 0x3308, lo: 0x80, hi: 0x8a}, + {value: 0x1308, lo: 0x80, hi: 0x8a}, {value: 0x0040, lo: 0x8b, hi: 0x8c}, - {value: 0x0c08, lo: 0x8d, hi: 0x8d}, - {value: 0x0a08, lo: 0x8e, hi: 0x98}, - {value: 0x0c08, lo: 0x99, hi: 0x9b}, - {value: 0x0a08, lo: 0x9c, hi: 0xaa}, - {value: 0x0c08, lo: 0xab, hi: 0xac}, - {value: 0x0a08, lo: 0xad, hi: 0xb0}, - {value: 0x0c08, lo: 0xb1, hi: 0xb1}, - {value: 0x0a08, lo: 0xb2, hi: 0xb2}, - {value: 0x0c08, lo: 0xb3, hi: 0xb4}, - {value: 0x0a08, lo: 0xb5, hi: 0xb7}, - {value: 0x0c08, lo: 0xb8, hi: 0xb9}, - {value: 0x0a08, lo: 0xba, hi: 0xbf}, - // Block 0xa, offset 0x5e + {value: 0x0408, lo: 0x8d, hi: 0x8d}, + {value: 0x0208, lo: 0x8e, hi: 0x98}, + {value: 0x0408, lo: 0x99, hi: 0x9b}, + {value: 0x0208, lo: 0x9c, hi: 0xaa}, + {value: 0x0408, lo: 0xab, hi: 0xac}, + {value: 0x0208, lo: 0xad, hi: 0xb0}, + {value: 0x0408, lo: 0xb1, hi: 0xb1}, + {value: 0x0208, lo: 0xb2, hi: 0xb2}, + {value: 0x0408, lo: 0xb3, hi: 0xb4}, + {value: 0x0208, lo: 0xb5, hi: 0xb7}, + {value: 0x0408, lo: 0xb8, hi: 0xb9}, + {value: 0x0208, lo: 0xba, hi: 0xbf}, + // Block 0xb, offset 0x6f {value: 0x0000, lo: 0x04}, - {value: 0x0808, lo: 0x80, hi: 0xa5}, - {value: 0x3308, lo: 0xa6, hi: 0xb0}, - {value: 0x0808, lo: 0xb1, hi: 0xb1}, + {value: 0x0008, lo: 0x80, hi: 0xa5}, + {value: 0x1308, lo: 0xa6, hi: 0xb0}, + {value: 0x0008, lo: 0xb1, hi: 0xb1}, {value: 0x0040, lo: 0xb2, hi: 0xbf}, - // Block 0xb, offset 0x63 - {value: 0x0000, lo: 0x07}, - {value: 0x0808, lo: 0x80, hi: 0x89}, - {value: 0x0a08, lo: 0x8a, hi: 0xaa}, - {value: 0x3308, lo: 0xab, hi: 0xb3}, - {value: 0x0808, lo: 0xb4, hi: 0xb5}, - {value: 0x0018, lo: 0xb6, hi: 0xb9}, - {value: 0x0818, lo: 0xba, hi: 0xba}, + // Block 0xc, offset 0x74 + {value: 0x0000, lo: 0x06}, + {value: 0x0008, lo: 0x80, hi: 0x89}, + {value: 0x0208, lo: 0x8a, hi: 0xaa}, + {value: 0x1308, lo: 0xab, hi: 0xb3}, + {value: 0x0008, lo: 0xb4, hi: 0xb5}, + {value: 0x0018, lo: 0xb6, hi: 0xba}, {value: 0x0040, lo: 0xbb, hi: 0xbf}, - // Block 0xc, offset 0x6b + // Block 0xd, offset 0x7b {value: 0x0000, lo: 0x0b}, - {value: 0x0808, lo: 0x80, hi: 0x95}, - {value: 0x3308, lo: 0x96, hi: 0x99}, - {value: 0x0808, lo: 0x9a, hi: 0x9a}, - {value: 0x3308, lo: 0x9b, hi: 0xa3}, - {value: 0x0808, lo: 0xa4, hi: 0xa4}, - {value: 0x3308, lo: 0xa5, hi: 0xa7}, - {value: 0x0808, lo: 0xa8, hi: 0xa8}, - {value: 0x3308, lo: 0xa9, hi: 0xad}, + {value: 0x0008, lo: 0x80, hi: 0x95}, + {value: 0x1308, lo: 0x96, hi: 0x99}, + {value: 0x0008, lo: 0x9a, hi: 0x9a}, + {value: 0x1308, lo: 0x9b, hi: 0xa3}, + {value: 0x0008, lo: 0xa4, hi: 0xa4}, + {value: 0x1308, lo: 0xa5, hi: 0xa7}, + {value: 0x0008, lo: 0xa8, hi: 0xa8}, + {value: 0x1308, lo: 0xa9, hi: 0xad}, {value: 0x0040, lo: 0xae, hi: 0xaf}, - {value: 0x0818, lo: 0xb0, hi: 0xbe}, + {value: 0x0018, lo: 0xb0, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0xd, offset 0x77 + // Block 0xe, offset 0x87 + {value: 0x0000, lo: 0x0d}, + {value: 0x0408, lo: 0x80, hi: 0x80}, + {value: 0x0208, lo: 0x81, hi: 0x85}, + {value: 0x0408, lo: 0x86, hi: 0x87}, + {value: 0x0208, lo: 0x88, hi: 0x88}, + {value: 0x0408, lo: 0x89, hi: 0x89}, + {value: 0x0208, lo: 0x8a, hi: 0x93}, + {value: 0x0408, lo: 0x94, hi: 0x94}, + {value: 0x0208, lo: 0x95, hi: 0x95}, + {value: 0x0008, lo: 0x96, hi: 0x98}, + {value: 0x1308, lo: 0x99, hi: 0x9b}, + {value: 0x0040, lo: 0x9c, hi: 0x9d}, + {value: 0x0018, lo: 0x9e, hi: 0x9e}, + {value: 0x0040, lo: 0x9f, hi: 0xbf}, + // Block 0xf, offset 0x95 {value: 0x0000, lo: 0x0d}, {value: 0x0040, lo: 0x80, hi: 0x9f}, - {value: 0x0a08, lo: 0xa0, hi: 0xa9}, - {value: 0x0c08, lo: 0xaa, hi: 0xac}, - {value: 0x0808, lo: 0xad, hi: 0xad}, - {value: 0x0c08, lo: 0xae, hi: 0xae}, - {value: 0x0a08, lo: 0xaf, hi: 0xb0}, - {value: 0x0c08, lo: 0xb1, hi: 0xb2}, - {value: 0x0a08, lo: 0xb3, hi: 0xb4}, + {value: 0x0208, lo: 0xa0, hi: 0xa9}, + {value: 0x0408, lo: 0xaa, hi: 0xac}, + {value: 0x0008, lo: 0xad, hi: 0xad}, + {value: 0x0408, lo: 0xae, hi: 0xae}, + {value: 0x0208, lo: 0xaf, hi: 0xb0}, + {value: 0x0408, lo: 0xb1, hi: 0xb2}, + {value: 0x0208, lo: 0xb3, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xb5}, - {value: 0x0a08, lo: 0xb6, hi: 0xb8}, - {value: 0x0c08, lo: 0xb9, hi: 0xb9}, - {value: 0x0a08, lo: 0xba, hi: 0xbd}, + {value: 0x0208, lo: 0xb6, hi: 0xb8}, + {value: 0x0408, lo: 0xb9, hi: 0xb9}, + {value: 0x0208, lo: 0xba, hi: 0xbd}, {value: 0x0040, lo: 0xbe, hi: 0xbf}, - // Block 0xe, offset 0x85 + // Block 0x10, offset 0xa3 {value: 0x0000, lo: 0x04}, {value: 0x0040, lo: 0x80, hi: 0x93}, - {value: 0x3308, lo: 0x94, hi: 0xa1}, - {value: 0x0840, lo: 0xa2, hi: 0xa2}, - {value: 0x3308, lo: 0xa3, hi: 0xbf}, - // Block 0xf, offset 0x8a + {value: 0x1308, lo: 0x94, hi: 0xa1}, + {value: 0x0040, lo: 0xa2, hi: 0xa2}, + {value: 0x1308, lo: 0xa3, hi: 0xbf}, + // Block 0x11, offset 0xa8 {value: 0x0000, lo: 0x08}, - {value: 0x3308, lo: 0x80, hi: 0x82}, - {value: 0x3008, lo: 0x83, hi: 0x83}, + {value: 0x1308, lo: 0x80, hi: 0x82}, + {value: 0x1008, lo: 0x83, hi: 0x83}, {value: 0x0008, lo: 0x84, hi: 0xb9}, - {value: 0x3308, lo: 0xba, hi: 0xba}, - {value: 0x3008, lo: 0xbb, hi: 0xbb}, - {value: 0x3308, lo: 0xbc, hi: 0xbc}, + {value: 0x1308, lo: 0xba, hi: 0xba}, + {value: 0x1008, lo: 0xbb, hi: 0xbb}, + {value: 0x1308, lo: 0xbc, hi: 0xbc}, {value: 0x0008, lo: 0xbd, hi: 0xbd}, - {value: 0x3008, lo: 0xbe, hi: 0xbf}, - // Block 0x10, offset 0x93 + {value: 0x1008, lo: 0xbe, hi: 0xbf}, + // Block 0x12, offset 0xb1 {value: 0x0000, lo: 0x0f}, - {value: 0x3308, lo: 0x80, hi: 0x80}, - {value: 0x3008, lo: 0x81, hi: 0x82}, + {value: 0x1308, lo: 0x80, hi: 0x80}, + {value: 0x1008, lo: 0x81, hi: 0x82}, {value: 0x0040, lo: 0x83, hi: 0x85}, - {value: 0x3008, lo: 0x86, hi: 0x88}, + {value: 0x1008, lo: 0x86, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0x89}, - {value: 0x3008, lo: 0x8a, hi: 0x8c}, - {value: 0x3b08, lo: 0x8d, hi: 0x8d}, + {value: 0x1008, lo: 0x8a, hi: 0x8c}, + {value: 0x1b08, lo: 0x8d, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x90}, {value: 0x0040, lo: 0x91, hi: 0x96}, - {value: 0x3008, lo: 0x97, hi: 0x97}, + {value: 0x1008, lo: 0x97, hi: 0x97}, {value: 0x0040, lo: 0x98, hi: 0xa5}, {value: 0x0008, lo: 0xa6, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xba}, {value: 0x0040, lo: 0xbb, hi: 0xbf}, - // Block 0x11, offset 0xa3 + // Block 0x13, offset 0xc1 {value: 0x0000, lo: 0x0d}, - {value: 0x3308, lo: 0x80, hi: 0x80}, - {value: 0x3008, lo: 0x81, hi: 0x83}, + {value: 0x1308, lo: 0x80, hi: 0x80}, + {value: 0x1008, lo: 0x81, hi: 0x83}, {value: 0x0040, lo: 0x84, hi: 0x84}, {value: 0x0008, lo: 0x85, hi: 0x8c}, {value: 0x0040, lo: 0x8d, hi: 0x8d}, @@ -2567,24 +2566,25 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xaa, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbc}, {value: 0x0008, lo: 0xbd, hi: 0xbd}, - {value: 0x3308, lo: 0xbe, hi: 0xbf}, - // Block 0x12, offset 0xb1 - {value: 0x0000, lo: 0x0b}, - {value: 0x3308, lo: 0x80, hi: 0x81}, - {value: 0x3008, lo: 0x82, hi: 0x83}, + {value: 0x1308, lo: 0xbe, hi: 0xbf}, + // Block 0x14, offset 0xcf + {value: 0x0000, lo: 0x0c}, + {value: 0x0040, lo: 0x80, hi: 0x80}, + {value: 0x1308, lo: 0x81, hi: 0x81}, + {value: 0x1008, lo: 0x82, hi: 0x83}, {value: 0x0040, lo: 0x84, hi: 0x84}, {value: 0x0008, lo: 0x85, hi: 0x8c}, {value: 0x0040, lo: 0x8d, hi: 0x8d}, {value: 0x0008, lo: 0x8e, hi: 0x90}, {value: 0x0040, lo: 0x91, hi: 0x91}, {value: 0x0008, lo: 0x92, hi: 0xba}, - {value: 0x3b08, lo: 0xbb, hi: 0xbc}, + {value: 0x0040, lo: 0xbb, hi: 0xbc}, {value: 0x0008, lo: 0xbd, hi: 0xbd}, - {value: 0x3008, lo: 0xbe, hi: 0xbf}, - // Block 0x13, offset 0xbd + {value: 0x1008, lo: 0xbe, hi: 0xbf}, + // Block 0x15, offset 0xdc {value: 0x0000, lo: 0x0b}, {value: 0x0040, lo: 0x80, hi: 0x81}, - {value: 0x3008, lo: 0x82, hi: 0x83}, + {value: 0x1008, lo: 0x82, hi: 0x83}, {value: 0x0040, lo: 0x84, hi: 0x84}, {value: 0x0008, lo: 0x85, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0x99}, @@ -2594,50 +2594,50 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xbc, hi: 0xbc}, {value: 0x0008, lo: 0xbd, hi: 0xbd}, {value: 0x0040, lo: 0xbe, hi: 0xbf}, - // Block 0x14, offset 0xc9 + // Block 0x16, offset 0xe8 {value: 0x0000, lo: 0x10}, {value: 0x0008, lo: 0x80, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x89}, - {value: 0x3b08, lo: 0x8a, hi: 0x8a}, + {value: 0x1b08, lo: 0x8a, hi: 0x8a}, {value: 0x0040, lo: 0x8b, hi: 0x8e}, - {value: 0x3008, lo: 0x8f, hi: 0x91}, - {value: 0x3308, lo: 0x92, hi: 0x94}, + {value: 0x1008, lo: 0x8f, hi: 0x91}, + {value: 0x1308, lo: 0x92, hi: 0x94}, {value: 0x0040, lo: 0x95, hi: 0x95}, - {value: 0x3308, lo: 0x96, hi: 0x96}, + {value: 0x1308, lo: 0x96, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0x97}, - {value: 0x3008, lo: 0x98, hi: 0x9f}, + {value: 0x1008, lo: 0x98, hi: 0x9f}, {value: 0x0040, lo: 0xa0, hi: 0xa5}, {value: 0x0008, lo: 0xa6, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xb1}, - {value: 0x3008, lo: 0xb2, hi: 0xb3}, + {value: 0x1008, lo: 0xb2, hi: 0xb3}, {value: 0x0018, lo: 0xb4, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xbf}, - // Block 0x15, offset 0xda + // Block 0x17, offset 0xf9 {value: 0x0000, lo: 0x09}, {value: 0x0040, lo: 0x80, hi: 0x80}, {value: 0x0008, lo: 0x81, hi: 0xb0}, - {value: 0x3308, lo: 0xb1, hi: 0xb1}, + {value: 0x1308, lo: 0xb1, hi: 0xb1}, {value: 0x0008, lo: 0xb2, hi: 0xb2}, {value: 0x08f1, lo: 0xb3, hi: 0xb3}, - {value: 0x3308, lo: 0xb4, hi: 0xb9}, - {value: 0x3b08, lo: 0xba, hi: 0xba}, + {value: 0x1308, lo: 0xb4, hi: 0xb9}, + {value: 0x1b08, lo: 0xba, hi: 0xba}, {value: 0x0040, lo: 0xbb, hi: 0xbe}, {value: 0x0018, lo: 0xbf, hi: 0xbf}, - // Block 0x16, offset 0xe4 + // Block 0x18, offset 0x103 {value: 0x0000, lo: 0x06}, {value: 0x0008, lo: 0x80, hi: 0x86}, - {value: 0x3308, lo: 0x87, hi: 0x8e}, + {value: 0x1308, lo: 0x87, hi: 0x8e}, {value: 0x0018, lo: 0x8f, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0018, lo: 0x9a, hi: 0x9b}, {value: 0x0040, lo: 0x9c, hi: 0xbf}, - // Block 0x17, offset 0xeb + // Block 0x19, offset 0x10a {value: 0x0000, lo: 0x0c}, {value: 0x0008, lo: 0x80, hi: 0x84}, {value: 0x0040, lo: 0x85, hi: 0x85}, {value: 0x0008, lo: 0x86, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x87}, - {value: 0x3308, lo: 0x88, hi: 0x8d}, + {value: 0x1308, lo: 0x88, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9b}, @@ -2645,76 +2645,76 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0999, lo: 0x9d, hi: 0x9d}, {value: 0x0008, lo: 0x9e, hi: 0x9f}, {value: 0x0040, lo: 0xa0, hi: 0xbf}, - // Block 0x18, offset 0xf8 + // Block 0x1a, offset 0x117 {value: 0x0000, lo: 0x10}, {value: 0x0008, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0x8a}, {value: 0x0008, lo: 0x8b, hi: 0x8b}, {value: 0xe03d, lo: 0x8c, hi: 0x8c}, {value: 0x0018, lo: 0x8d, hi: 0x97}, - {value: 0x3308, lo: 0x98, hi: 0x99}, + {value: 0x1308, lo: 0x98, hi: 0x99}, {value: 0x0018, lo: 0x9a, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xa9}, {value: 0x0018, lo: 0xaa, hi: 0xb4}, - {value: 0x3308, lo: 0xb5, hi: 0xb5}, + {value: 0x1308, lo: 0xb5, hi: 0xb5}, {value: 0x0018, lo: 0xb6, hi: 0xb6}, - {value: 0x3308, lo: 0xb7, hi: 0xb7}, + {value: 0x1308, lo: 0xb7, hi: 0xb7}, {value: 0x0018, lo: 0xb8, hi: 0xb8}, - {value: 0x3308, lo: 0xb9, hi: 0xb9}, + {value: 0x1308, lo: 0xb9, hi: 0xb9}, {value: 0x0018, lo: 0xba, hi: 0xbd}, - {value: 0x3008, lo: 0xbe, hi: 0xbf}, - // Block 0x19, offset 0x109 + {value: 0x1008, lo: 0xbe, hi: 0xbf}, + // Block 0x1b, offset 0x128 {value: 0x0000, lo: 0x06}, {value: 0x0018, lo: 0x80, hi: 0x85}, - {value: 0x3308, lo: 0x86, hi: 0x86}, + {value: 0x1308, lo: 0x86, hi: 0x86}, {value: 0x0018, lo: 0x87, hi: 0x8c}, {value: 0x0040, lo: 0x8d, hi: 0x8d}, {value: 0x0018, lo: 0x8e, hi: 0x9a}, {value: 0x0040, lo: 0x9b, hi: 0xbf}, - // Block 0x1a, offset 0x110 + // Block 0x1c, offset 0x12f {value: 0x0000, lo: 0x0a}, {value: 0x0008, lo: 0x80, hi: 0xaa}, - {value: 0x3008, lo: 0xab, hi: 0xac}, - {value: 0x3308, lo: 0xad, hi: 0xb0}, - {value: 0x3008, lo: 0xb1, hi: 0xb1}, - {value: 0x3308, lo: 0xb2, hi: 0xb7}, - {value: 0x3008, lo: 0xb8, hi: 0xb8}, - {value: 0x3b08, lo: 0xb9, hi: 0xba}, - {value: 0x3008, lo: 0xbb, hi: 0xbc}, - {value: 0x3308, lo: 0xbd, hi: 0xbe}, + {value: 0x1008, lo: 0xab, hi: 0xac}, + {value: 0x1308, lo: 0xad, hi: 0xb0}, + {value: 0x1008, lo: 0xb1, hi: 0xb1}, + {value: 0x1308, lo: 0xb2, hi: 0xb7}, + {value: 0x1008, lo: 0xb8, hi: 0xb8}, + {value: 0x1b08, lo: 0xb9, hi: 0xba}, + {value: 0x1008, lo: 0xbb, hi: 0xbc}, + {value: 0x1308, lo: 0xbd, hi: 0xbe}, {value: 0x0008, lo: 0xbf, hi: 0xbf}, - // Block 0x1b, offset 0x11b + // Block 0x1d, offset 0x13a {value: 0x0000, lo: 0x0e}, {value: 0x0008, lo: 0x80, hi: 0x89}, {value: 0x0018, lo: 0x8a, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x95}, - {value: 0x3008, lo: 0x96, hi: 0x97}, - {value: 0x3308, lo: 0x98, hi: 0x99}, + {value: 0x1008, lo: 0x96, hi: 0x97}, + {value: 0x1308, lo: 0x98, hi: 0x99}, {value: 0x0008, lo: 0x9a, hi: 0x9d}, - {value: 0x3308, lo: 0x9e, hi: 0xa0}, + {value: 0x1308, lo: 0x9e, hi: 0xa0}, {value: 0x0008, lo: 0xa1, hi: 0xa1}, - {value: 0x3008, lo: 0xa2, hi: 0xa4}, + {value: 0x1008, lo: 0xa2, hi: 0xa4}, {value: 0x0008, lo: 0xa5, hi: 0xa6}, - {value: 0x3008, lo: 0xa7, hi: 0xad}, + {value: 0x1008, lo: 0xa7, hi: 0xad}, {value: 0x0008, lo: 0xae, hi: 0xb0}, - {value: 0x3308, lo: 0xb1, hi: 0xb4}, + {value: 0x1308, lo: 0xb1, hi: 0xb4}, {value: 0x0008, lo: 0xb5, hi: 0xbf}, - // Block 0x1c, offset 0x12a + // Block 0x1e, offset 0x149 {value: 0x0000, lo: 0x0d}, {value: 0x0008, lo: 0x80, hi: 0x81}, - {value: 0x3308, lo: 0x82, hi: 0x82}, - {value: 0x3008, lo: 0x83, hi: 0x84}, - {value: 0x3308, lo: 0x85, hi: 0x86}, - {value: 0x3008, lo: 0x87, hi: 0x8c}, - {value: 0x3308, lo: 0x8d, hi: 0x8d}, + {value: 0x1308, lo: 0x82, hi: 0x82}, + {value: 0x1008, lo: 0x83, hi: 0x84}, + {value: 0x1308, lo: 0x85, hi: 0x86}, + {value: 0x1008, lo: 0x87, hi: 0x8c}, + {value: 0x1308, lo: 0x8d, hi: 0x8d}, {value: 0x0008, lo: 0x8e, hi: 0x8e}, - {value: 0x3008, lo: 0x8f, hi: 0x8f}, + {value: 0x1008, lo: 0x8f, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, - {value: 0x3008, lo: 0x9a, hi: 0x9c}, - {value: 0x3308, lo: 0x9d, hi: 0x9d}, + {value: 0x1008, lo: 0x9a, hi: 0x9c}, + {value: 0x1308, lo: 0x9d, hi: 0x9d}, {value: 0x0018, lo: 0x9e, hi: 0x9f}, {value: 0x0040, lo: 0xa0, hi: 0xbf}, - // Block 0x1d, offset 0x138 + // Block 0x1f, offset 0x157 {value: 0x0000, lo: 0x09}, {value: 0x0040, lo: 0x80, hi: 0x86}, {value: 0x055d, lo: 0x87, hi: 0x87}, @@ -2725,27 +2725,18 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0018, lo: 0xbb, hi: 0xbb}, {value: 0xe105, lo: 0xbc, hi: 0xbc}, {value: 0x0008, lo: 0xbd, hi: 0xbf}, - // Block 0x1e, offset 0x142 + // Block 0x20, offset 0x161 {value: 0x0000, lo: 0x01}, {value: 0x0018, lo: 0x80, hi: 0xbf}, - // Block 0x1f, offset 0x144 - {value: 0x0000, lo: 0x04}, + // Block 0x21, offset 0x163 + {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0x9e}, {value: 0x0040, lo: 0x9f, hi: 0xa0}, - {value: 0x2018, lo: 0xa1, hi: 0xb5}, - {value: 0x0018, lo: 0xb6, hi: 0xbf}, - // Block 0x20, offset 0x149 - {value: 0x0000, lo: 0x02}, - {value: 0x0018, lo: 0x80, hi: 0xa7}, - {value: 0x2018, lo: 0xa8, hi: 0xbf}, - // Block 0x21, offset 0x14c - {value: 0x0000, lo: 0x02}, - {value: 0x2018, lo: 0x80, hi: 0x82}, - {value: 0x0018, lo: 0x83, hi: 0xbf}, - // Block 0x22, offset 0x14f + {value: 0x0018, lo: 0xa1, hi: 0xbf}, + // Block 0x22, offset 0x167 {value: 0x0000, lo: 0x01}, {value: 0x0008, lo: 0x80, hi: 0xbf}, - // Block 0x23, offset 0x151 + // Block 0x23, offset 0x169 {value: 0x0000, lo: 0x0b}, {value: 0x0008, lo: 0x80, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0x89}, @@ -2758,7 +2749,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0x9a, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xbf}, - // Block 0x24, offset 0x15d + // Block 0x24, offset 0x175 {value: 0x0000, lo: 0x0a}, {value: 0x0008, lo: 0x80, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0x89}, @@ -2770,7 +2761,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xb6, hi: 0xb7}, {value: 0x0008, lo: 0xb8, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0x25, offset 0x168 + // Block 0x25, offset 0x180 {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0x80}, {value: 0x0040, lo: 0x81, hi: 0x81}, @@ -2779,146 +2770,146 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0x88, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0x97}, {value: 0x0008, lo: 0x98, hi: 0xbf}, - // Block 0x26, offset 0x170 + // Block 0x26, offset 0x188 {value: 0x0000, lo: 0x05}, {value: 0x0008, lo: 0x80, hi: 0x90}, {value: 0x0040, lo: 0x91, hi: 0x91}, {value: 0x0008, lo: 0x92, hi: 0x95}, {value: 0x0040, lo: 0x96, hi: 0x97}, {value: 0x0008, lo: 0x98, hi: 0xbf}, - // Block 0x27, offset 0x176 + // Block 0x27, offset 0x18e {value: 0x0000, lo: 0x05}, {value: 0x0008, lo: 0x80, hi: 0x9a}, {value: 0x0040, lo: 0x9b, hi: 0x9c}, - {value: 0x3308, lo: 0x9d, hi: 0x9f}, + {value: 0x1308, lo: 0x9d, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xbc}, {value: 0x0040, lo: 0xbd, hi: 0xbf}, - // Block 0x28, offset 0x17c + // Block 0x28, offset 0x194 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xbf}, - // Block 0x29, offset 0x181 + // Block 0x29, offset 0x199 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xb7}, {value: 0xe045, lo: 0xb8, hi: 0xbd}, {value: 0x0040, lo: 0xbe, hi: 0xbf}, - // Block 0x2a, offset 0x186 + // Block 0x2a, offset 0x19e {value: 0x0000, lo: 0x02}, {value: 0x0018, lo: 0x80, hi: 0x80}, {value: 0x0008, lo: 0x81, hi: 0xbf}, - // Block 0x2b, offset 0x189 + // Block 0x2b, offset 0x1a1 {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0xac}, {value: 0x0018, lo: 0xad, hi: 0xae}, {value: 0x0008, lo: 0xaf, hi: 0xbf}, - // Block 0x2c, offset 0x18d + // Block 0x2c, offset 0x1a5 {value: 0x0000, lo: 0x05}, {value: 0x0040, lo: 0x80, hi: 0x80}, {value: 0x0008, lo: 0x81, hi: 0x9a}, {value: 0x0018, lo: 0x9b, hi: 0x9c}, {value: 0x0040, lo: 0x9d, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xbf}, - // Block 0x2d, offset 0x193 + // Block 0x2d, offset 0x1ab {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0xaa}, {value: 0x0018, lo: 0xab, hi: 0xb0}, {value: 0x0008, lo: 0xb1, hi: 0xb8}, {value: 0x0040, lo: 0xb9, hi: 0xbf}, - // Block 0x2e, offset 0x198 + // Block 0x2e, offset 0x1b0 {value: 0x0000, lo: 0x0b}, {value: 0x0008, lo: 0x80, hi: 0x8c}, {value: 0x0040, lo: 0x8d, hi: 0x8d}, {value: 0x0008, lo: 0x8e, hi: 0x91}, - {value: 0x3308, lo: 0x92, hi: 0x93}, - {value: 0x3b08, lo: 0x94, hi: 0x94}, + {value: 0x1308, lo: 0x92, hi: 0x93}, + {value: 0x1b08, lo: 0x94, hi: 0x94}, {value: 0x0040, lo: 0x95, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xb1}, - {value: 0x3308, lo: 0xb2, hi: 0xb3}, - {value: 0x3b08, lo: 0xb4, hi: 0xb4}, + {value: 0x1308, lo: 0xb2, hi: 0xb3}, + {value: 0x1b08, lo: 0xb4, hi: 0xb4}, {value: 0x0018, lo: 0xb5, hi: 0xb6}, {value: 0x0040, lo: 0xb7, hi: 0xbf}, - // Block 0x2f, offset 0x1a4 + // Block 0x2f, offset 0x1bc {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0x91}, - {value: 0x3308, lo: 0x92, hi: 0x93}, + {value: 0x1308, lo: 0x92, hi: 0x93}, {value: 0x0040, lo: 0x94, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xac}, {value: 0x0040, lo: 0xad, hi: 0xad}, {value: 0x0008, lo: 0xae, hi: 0xb0}, {value: 0x0040, lo: 0xb1, hi: 0xb1}, - {value: 0x3308, lo: 0xb2, hi: 0xb3}, + {value: 0x1308, lo: 0xb2, hi: 0xb3}, {value: 0x0040, lo: 0xb4, hi: 0xbf}, - // Block 0x30, offset 0x1ae + // Block 0x30, offset 0x1c6 {value: 0x0000, lo: 0x05}, {value: 0x0008, lo: 0x80, hi: 0xb3}, - {value: 0x3340, lo: 0xb4, hi: 0xb5}, - {value: 0x3008, lo: 0xb6, hi: 0xb6}, - {value: 0x3308, lo: 0xb7, hi: 0xbd}, - {value: 0x3008, lo: 0xbe, hi: 0xbf}, - // Block 0x31, offset 0x1b4 + {value: 0x1340, lo: 0xb4, hi: 0xb5}, + {value: 0x1008, lo: 0xb6, hi: 0xb6}, + {value: 0x1308, lo: 0xb7, hi: 0xbd}, + {value: 0x1008, lo: 0xbe, hi: 0xbf}, + // Block 0x31, offset 0x1cc {value: 0x0000, lo: 0x10}, - {value: 0x3008, lo: 0x80, hi: 0x85}, - {value: 0x3308, lo: 0x86, hi: 0x86}, - {value: 0x3008, lo: 0x87, hi: 0x88}, - {value: 0x3308, lo: 0x89, hi: 0x91}, - {value: 0x3b08, lo: 0x92, hi: 0x92}, - {value: 0x3308, lo: 0x93, hi: 0x93}, + {value: 0x1008, lo: 0x80, hi: 0x85}, + {value: 0x1308, lo: 0x86, hi: 0x86}, + {value: 0x1008, lo: 0x87, hi: 0x88}, + {value: 0x1308, lo: 0x89, hi: 0x91}, + {value: 0x1b08, lo: 0x92, hi: 0x92}, + {value: 0x1308, lo: 0x93, hi: 0x93}, {value: 0x0018, lo: 0x94, hi: 0x96}, {value: 0x0008, lo: 0x97, hi: 0x97}, {value: 0x0018, lo: 0x98, hi: 0x9b}, {value: 0x0008, lo: 0x9c, hi: 0x9c}, - {value: 0x3308, lo: 0x9d, hi: 0x9d}, + {value: 0x1308, lo: 0x9d, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xa9}, {value: 0x0040, lo: 0xaa, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbf}, - // Block 0x32, offset 0x1c5 + // Block 0x32, offset 0x1dd {value: 0x0000, lo: 0x09}, {value: 0x0018, lo: 0x80, hi: 0x85}, {value: 0x0040, lo: 0x86, hi: 0x86}, {value: 0x0218, lo: 0x87, hi: 0x87}, {value: 0x0018, lo: 0x88, hi: 0x8a}, - {value: 0x33c0, lo: 0x8b, hi: 0x8d}, + {value: 0x13c0, lo: 0x8b, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9f}, {value: 0x0208, lo: 0xa0, hi: 0xbf}, - // Block 0x33, offset 0x1cf + // Block 0x33, offset 0x1e7 {value: 0x0000, lo: 0x02}, {value: 0x0208, lo: 0x80, hi: 0xb7}, {value: 0x0040, lo: 0xb8, hi: 0xbf}, - // Block 0x34, offset 0x1d2 + // Block 0x34, offset 0x1ea {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0x84}, - {value: 0x3308, lo: 0x85, hi: 0x86}, + {value: 0x1308, lo: 0x85, hi: 0x86}, {value: 0x0208, lo: 0x87, hi: 0xa8}, - {value: 0x3308, lo: 0xa9, hi: 0xa9}, + {value: 0x1308, lo: 0xa9, hi: 0xa9}, {value: 0x0208, lo: 0xaa, hi: 0xaa}, {value: 0x0040, lo: 0xab, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x35, offset 0x1da + // Block 0x35, offset 0x1f2 {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xbf}, - // Block 0x36, offset 0x1dd + // Block 0x36, offset 0x1f5 {value: 0x0000, lo: 0x0c}, {value: 0x0008, lo: 0x80, hi: 0x9e}, {value: 0x0040, lo: 0x9f, hi: 0x9f}, - {value: 0x3308, lo: 0xa0, hi: 0xa2}, - {value: 0x3008, lo: 0xa3, hi: 0xa6}, - {value: 0x3308, lo: 0xa7, hi: 0xa8}, - {value: 0x3008, lo: 0xa9, hi: 0xab}, + {value: 0x1308, lo: 0xa0, hi: 0xa2}, + {value: 0x1008, lo: 0xa3, hi: 0xa6}, + {value: 0x1308, lo: 0xa7, hi: 0xa8}, + {value: 0x1008, lo: 0xa9, hi: 0xab}, {value: 0x0040, lo: 0xac, hi: 0xaf}, - {value: 0x3008, lo: 0xb0, hi: 0xb1}, - {value: 0x3308, lo: 0xb2, hi: 0xb2}, - {value: 0x3008, lo: 0xb3, hi: 0xb8}, - {value: 0x3308, lo: 0xb9, hi: 0xbb}, + {value: 0x1008, lo: 0xb0, hi: 0xb1}, + {value: 0x1308, lo: 0xb2, hi: 0xb2}, + {value: 0x1008, lo: 0xb3, hi: 0xb8}, + {value: 0x1308, lo: 0xb9, hi: 0xbb}, {value: 0x0040, lo: 0xbc, hi: 0xbf}, - // Block 0x37, offset 0x1ea + // Block 0x37, offset 0x202 {value: 0x0000, lo: 0x07}, {value: 0x0018, lo: 0x80, hi: 0x80}, {value: 0x0040, lo: 0x81, hi: 0x83}, @@ -2927,12 +2918,12 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xae, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xbf}, - // Block 0x38, offset 0x1f2 + // Block 0x38, offset 0x20a {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0xab}, {value: 0x0040, lo: 0xac, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x39, offset 0x1f6 + // Block 0x39, offset 0x20e {value: 0x0000, lo: 0x06}, {value: 0x0008, lo: 0x80, hi: 0x89}, {value: 0x0040, lo: 0x8a, hi: 0x8f}, @@ -2940,33 +2931,33 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0028, lo: 0x9a, hi: 0x9a}, {value: 0x0040, lo: 0x9b, hi: 0x9d}, {value: 0x0018, lo: 0x9e, hi: 0xbf}, - // Block 0x3a, offset 0x1fd + // Block 0x3a, offset 0x215 {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0x96}, - {value: 0x3308, lo: 0x97, hi: 0x98}, - {value: 0x3008, lo: 0x99, hi: 0x9a}, - {value: 0x3308, lo: 0x9b, hi: 0x9b}, + {value: 0x1308, lo: 0x97, hi: 0x98}, + {value: 0x1008, lo: 0x99, hi: 0x9a}, + {value: 0x1308, lo: 0x9b, hi: 0x9b}, {value: 0x0040, lo: 0x9c, hi: 0x9d}, {value: 0x0018, lo: 0x9e, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xbf}, - // Block 0x3b, offset 0x205 + // Block 0x3b, offset 0x21d {value: 0x0000, lo: 0x0f}, {value: 0x0008, lo: 0x80, hi: 0x94}, - {value: 0x3008, lo: 0x95, hi: 0x95}, - {value: 0x3308, lo: 0x96, hi: 0x96}, - {value: 0x3008, lo: 0x97, hi: 0x97}, - {value: 0x3308, lo: 0x98, hi: 0x9e}, + {value: 0x1008, lo: 0x95, hi: 0x95}, + {value: 0x1308, lo: 0x96, hi: 0x96}, + {value: 0x1008, lo: 0x97, hi: 0x97}, + {value: 0x1308, lo: 0x98, hi: 0x9e}, {value: 0x0040, lo: 0x9f, hi: 0x9f}, - {value: 0x3b08, lo: 0xa0, hi: 0xa0}, - {value: 0x3008, lo: 0xa1, hi: 0xa1}, - {value: 0x3308, lo: 0xa2, hi: 0xa2}, - {value: 0x3008, lo: 0xa3, hi: 0xa4}, - {value: 0x3308, lo: 0xa5, hi: 0xac}, - {value: 0x3008, lo: 0xad, hi: 0xb2}, - {value: 0x3308, lo: 0xb3, hi: 0xbc}, + {value: 0x1b08, lo: 0xa0, hi: 0xa0}, + {value: 0x1008, lo: 0xa1, hi: 0xa1}, + {value: 0x1308, lo: 0xa2, hi: 0xa2}, + {value: 0x1008, lo: 0xa3, hi: 0xa4}, + {value: 0x1308, lo: 0xa5, hi: 0xac}, + {value: 0x1008, lo: 0xad, hi: 0xb2}, + {value: 0x1308, lo: 0xb3, hi: 0xbc}, {value: 0x0040, lo: 0xbd, hi: 0xbe}, - {value: 0x3308, lo: 0xbf, hi: 0xbf}, - // Block 0x3c, offset 0x215 + {value: 0x1308, lo: 0xbf, hi: 0xbf}, + // Block 0x3c, offset 0x22d {value: 0x0000, lo: 0x0b}, {value: 0x0008, lo: 0x80, hi: 0x89}, {value: 0x0040, lo: 0x8a, hi: 0x8f}, @@ -2976,78 +2967,78 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xa7, hi: 0xa7}, {value: 0x0018, lo: 0xa8, hi: 0xad}, {value: 0x0040, lo: 0xae, hi: 0xaf}, - {value: 0x3308, lo: 0xb0, hi: 0xbd}, - {value: 0x3318, lo: 0xbe, hi: 0xbe}, + {value: 0x1308, lo: 0xb0, hi: 0xbd}, + {value: 0x1318, lo: 0xbe, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0x3d, offset 0x221 + // Block 0x3d, offset 0x239 {value: 0x0000, lo: 0x01}, {value: 0x0040, lo: 0x80, hi: 0xbf}, - // Block 0x3e, offset 0x223 + // Block 0x3e, offset 0x23b {value: 0x0000, lo: 0x09}, - {value: 0x3308, lo: 0x80, hi: 0x83}, - {value: 0x3008, lo: 0x84, hi: 0x84}, + {value: 0x1308, lo: 0x80, hi: 0x83}, + {value: 0x1008, lo: 0x84, hi: 0x84}, {value: 0x0008, lo: 0x85, hi: 0xb3}, - {value: 0x3308, lo: 0xb4, hi: 0xb4}, - {value: 0x3008, lo: 0xb5, hi: 0xb5}, - {value: 0x3308, lo: 0xb6, hi: 0xba}, - {value: 0x3008, lo: 0xbb, hi: 0xbb}, - {value: 0x3308, lo: 0xbc, hi: 0xbc}, - {value: 0x3008, lo: 0xbd, hi: 0xbf}, - // Block 0x3f, offset 0x22d + {value: 0x1308, lo: 0xb4, hi: 0xb4}, + {value: 0x1008, lo: 0xb5, hi: 0xb5}, + {value: 0x1308, lo: 0xb6, hi: 0xba}, + {value: 0x1008, lo: 0xbb, hi: 0xbb}, + {value: 0x1308, lo: 0xbc, hi: 0xbc}, + {value: 0x1008, lo: 0xbd, hi: 0xbf}, + // Block 0x3f, offset 0x245 {value: 0x0000, lo: 0x0b}, - {value: 0x3008, lo: 0x80, hi: 0x81}, - {value: 0x3308, lo: 0x82, hi: 0x82}, - {value: 0x3008, lo: 0x83, hi: 0x83}, - {value: 0x3808, lo: 0x84, hi: 0x84}, + {value: 0x1008, lo: 0x80, hi: 0x81}, + {value: 0x1308, lo: 0x82, hi: 0x82}, + {value: 0x1008, lo: 0x83, hi: 0x83}, + {value: 0x1808, lo: 0x84, hi: 0x84}, {value: 0x0008, lo: 0x85, hi: 0x8b}, {value: 0x0040, lo: 0x8c, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0018, lo: 0x9a, hi: 0xaa}, - {value: 0x3308, lo: 0xab, hi: 0xb3}, + {value: 0x1308, lo: 0xab, hi: 0xb3}, {value: 0x0018, lo: 0xb4, hi: 0xbc}, {value: 0x0040, lo: 0xbd, hi: 0xbf}, - // Block 0x40, offset 0x239 + // Block 0x40, offset 0x251 {value: 0x0000, lo: 0x0b}, - {value: 0x3308, lo: 0x80, hi: 0x81}, - {value: 0x3008, lo: 0x82, hi: 0x82}, + {value: 0x1308, lo: 0x80, hi: 0x81}, + {value: 0x1008, lo: 0x82, hi: 0x82}, {value: 0x0008, lo: 0x83, hi: 0xa0}, - {value: 0x3008, lo: 0xa1, hi: 0xa1}, - {value: 0x3308, lo: 0xa2, hi: 0xa5}, - {value: 0x3008, lo: 0xa6, hi: 0xa7}, - {value: 0x3308, lo: 0xa8, hi: 0xa9}, - {value: 0x3808, lo: 0xaa, hi: 0xaa}, - {value: 0x3b08, lo: 0xab, hi: 0xab}, - {value: 0x3308, lo: 0xac, hi: 0xad}, + {value: 0x1008, lo: 0xa1, hi: 0xa1}, + {value: 0x1308, lo: 0xa2, hi: 0xa5}, + {value: 0x1008, lo: 0xa6, hi: 0xa7}, + {value: 0x1308, lo: 0xa8, hi: 0xa9}, + {value: 0x1808, lo: 0xaa, hi: 0xaa}, + {value: 0x1b08, lo: 0xab, hi: 0xab}, + {value: 0x1308, lo: 0xac, hi: 0xad}, {value: 0x0008, lo: 0xae, hi: 0xbf}, - // Block 0x41, offset 0x245 + // Block 0x41, offset 0x25d {value: 0x0000, lo: 0x0b}, {value: 0x0008, lo: 0x80, hi: 0xa5}, - {value: 0x3308, lo: 0xa6, hi: 0xa6}, - {value: 0x3008, lo: 0xa7, hi: 0xa7}, - {value: 0x3308, lo: 0xa8, hi: 0xa9}, - {value: 0x3008, lo: 0xaa, hi: 0xac}, - {value: 0x3308, lo: 0xad, hi: 0xad}, - {value: 0x3008, lo: 0xae, hi: 0xae}, - {value: 0x3308, lo: 0xaf, hi: 0xb1}, - {value: 0x3808, lo: 0xb2, hi: 0xb3}, + {value: 0x1308, lo: 0xa6, hi: 0xa6}, + {value: 0x1008, lo: 0xa7, hi: 0xa7}, + {value: 0x1308, lo: 0xa8, hi: 0xa9}, + {value: 0x1008, lo: 0xaa, hi: 0xac}, + {value: 0x1308, lo: 0xad, hi: 0xad}, + {value: 0x1008, lo: 0xae, hi: 0xae}, + {value: 0x1308, lo: 0xaf, hi: 0xb1}, + {value: 0x1808, lo: 0xb2, hi: 0xb3}, {value: 0x0040, lo: 0xb4, hi: 0xbb}, {value: 0x0018, lo: 0xbc, hi: 0xbf}, - // Block 0x42, offset 0x251 + // Block 0x42, offset 0x269 {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0xa3}, - {value: 0x3008, lo: 0xa4, hi: 0xab}, - {value: 0x3308, lo: 0xac, hi: 0xb3}, - {value: 0x3008, lo: 0xb4, hi: 0xb5}, - {value: 0x3308, lo: 0xb6, hi: 0xb7}, + {value: 0x1008, lo: 0xa4, hi: 0xab}, + {value: 0x1308, lo: 0xac, hi: 0xb3}, + {value: 0x1008, lo: 0xb4, hi: 0xb5}, + {value: 0x1308, lo: 0xb6, hi: 0xb7}, {value: 0x0040, lo: 0xb8, hi: 0xba}, {value: 0x0018, lo: 0xbb, hi: 0xbf}, - // Block 0x43, offset 0x259 + // Block 0x43, offset 0x271 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0x89}, {value: 0x0040, lo: 0x8a, hi: 0x8c}, {value: 0x0008, lo: 0x8d, hi: 0xbd}, {value: 0x0018, lo: 0xbe, hi: 0xbf}, - // Block 0x44, offset 0x25e + // Block 0x44, offset 0x276 {value: 0x0000, lo: 0x09}, {value: 0x0e29, lo: 0x80, hi: 0x80}, {value: 0x0e41, lo: 0x81, hi: 0x81}, @@ -3058,30 +3049,30 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0eb9, lo: 0x87, hi: 0x87}, {value: 0x057d, lo: 0x88, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0xbf}, - // Block 0x45, offset 0x268 + // Block 0x45, offset 0x280 {value: 0x0000, lo: 0x10}, {value: 0x0018, lo: 0x80, hi: 0x87}, {value: 0x0040, lo: 0x88, hi: 0x8f}, - {value: 0x3308, lo: 0x90, hi: 0x92}, + {value: 0x1308, lo: 0x90, hi: 0x92}, {value: 0x0018, lo: 0x93, hi: 0x93}, - {value: 0x3308, lo: 0x94, hi: 0xa0}, - {value: 0x3008, lo: 0xa1, hi: 0xa1}, - {value: 0x3308, lo: 0xa2, hi: 0xa8}, + {value: 0x1308, lo: 0x94, hi: 0xa0}, + {value: 0x1008, lo: 0xa1, hi: 0xa1}, + {value: 0x1308, lo: 0xa2, hi: 0xa8}, {value: 0x0008, lo: 0xa9, hi: 0xac}, - {value: 0x3308, lo: 0xad, hi: 0xad}, + {value: 0x1308, lo: 0xad, hi: 0xad}, {value: 0x0008, lo: 0xae, hi: 0xb1}, - {value: 0x3008, lo: 0xb2, hi: 0xb3}, - {value: 0x3308, lo: 0xb4, hi: 0xb4}, + {value: 0x1008, lo: 0xb2, hi: 0xb3}, + {value: 0x1308, lo: 0xb4, hi: 0xb4}, {value: 0x0008, lo: 0xb5, hi: 0xb6}, - {value: 0x3008, lo: 0xb7, hi: 0xb7}, - {value: 0x3308, lo: 0xb8, hi: 0xb9}, + {value: 0x0040, lo: 0xb7, hi: 0xb7}, + {value: 0x1308, lo: 0xb8, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbf}, - // Block 0x46, offset 0x279 + // Block 0x46, offset 0x291 {value: 0x0000, lo: 0x03}, - {value: 0x3308, lo: 0x80, hi: 0xb9}, - {value: 0x0040, lo: 0xba, hi: 0xba}, - {value: 0x3308, lo: 0xbb, hi: 0xbf}, - // Block 0x47, offset 0x27d + {value: 0x1308, lo: 0x80, hi: 0xb5}, + {value: 0x0040, lo: 0xb6, hi: 0xba}, + {value: 0x1308, lo: 0xbb, hi: 0xbf}, + // Block 0x47, offset 0x295 {value: 0x0000, lo: 0x0a}, {value: 0x0008, lo: 0x80, hi: 0x87}, {value: 0xe045, lo: 0x88, hi: 0x8f}, @@ -3093,12 +3084,12 @@ var idnaSparseValues = [1915]valueRange{ {value: 0xe045, lo: 0xa8, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xb7}, {value: 0xe045, lo: 0xb8, hi: 0xbf}, - // Block 0x48, offset 0x288 + // Block 0x48, offset 0x2a0 {value: 0x0000, lo: 0x03}, {value: 0x0040, lo: 0x80, hi: 0x8f}, - {value: 0x3318, lo: 0x90, hi: 0xb0}, + {value: 0x1318, lo: 0x90, hi: 0xb0}, {value: 0x0040, lo: 0xb1, hi: 0xbf}, - // Block 0x49, offset 0x28c + // Block 0x49, offset 0x2a4 {value: 0x0000, lo: 0x08}, {value: 0x0018, lo: 0x80, hi: 0x82}, {value: 0x0040, lo: 0x83, hi: 0x83}, @@ -3108,7 +3099,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0018, lo: 0x8a, hi: 0x8b}, {value: 0x0040, lo: 0x8c, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0xbf}, - // Block 0x4a, offset 0x295 + // Block 0x4a, offset 0x2ad {value: 0x0000, lo: 0x07}, {value: 0x0018, lo: 0x80, hi: 0xab}, {value: 0x24f1, lo: 0xac, hi: 0xac}, @@ -3117,68 +3108,72 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x2579, lo: 0xaf, hi: 0xaf}, {value: 0x25b1, lo: 0xb0, hi: 0xb0}, {value: 0x0018, lo: 0xb1, hi: 0xbf}, - // Block 0x4b, offset 0x29d + // Block 0x4b, offset 0x2b5 {value: 0x0000, lo: 0x05}, {value: 0x0018, lo: 0x80, hi: 0x9f}, {value: 0x0080, lo: 0xa0, hi: 0xa0}, {value: 0x0018, lo: 0xa1, hi: 0xad}, {value: 0x0080, lo: 0xae, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xbf}, - // Block 0x4c, offset 0x2a3 + // Block 0x4c, offset 0x2bb {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0xa8}, {value: 0x09c5, lo: 0xa9, hi: 0xa9}, {value: 0x09e5, lo: 0xaa, hi: 0xaa}, {value: 0x0018, lo: 0xab, hi: 0xbf}, - // Block 0x4d, offset 0x2a8 + // Block 0x4d, offset 0x2c0 + {value: 0x0000, lo: 0x02}, + {value: 0x0018, lo: 0x80, hi: 0xbe}, + {value: 0x0040, lo: 0xbf, hi: 0xbf}, + // Block 0x4e, offset 0x2c3 {value: 0x0000, lo: 0x02}, {value: 0x0018, lo: 0x80, hi: 0xa6}, {value: 0x0040, lo: 0xa7, hi: 0xbf}, - // Block 0x4e, offset 0x2ab + // Block 0x4f, offset 0x2c6 {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0x8b}, {value: 0x28c1, lo: 0x8c, hi: 0x8c}, {value: 0x0018, lo: 0x8d, hi: 0xbf}, - // Block 0x4f, offset 0x2af + // Block 0x50, offset 0x2ca {value: 0x0000, lo: 0x05}, {value: 0x0018, lo: 0x80, hi: 0xb3}, {value: 0x0e66, lo: 0xb4, hi: 0xb4}, {value: 0x292a, lo: 0xb5, hi: 0xb5}, {value: 0x0e86, lo: 0xb6, hi: 0xb6}, {value: 0x0018, lo: 0xb7, hi: 0xbf}, - // Block 0x50, offset 0x2b5 + // Block 0x51, offset 0x2d0 {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0x9b}, {value: 0x2941, lo: 0x9c, hi: 0x9c}, {value: 0x0018, lo: 0x9d, hi: 0xbf}, - // Block 0x51, offset 0x2b9 + // Block 0x52, offset 0x2d4 {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0xb3}, {value: 0x0040, lo: 0xb4, hi: 0xb5}, {value: 0x0018, lo: 0xb6, hi: 0xbf}, - // Block 0x52, offset 0x2bd + // Block 0x53, offset 0x2d8 {value: 0x0000, lo: 0x05}, {value: 0x0018, lo: 0x80, hi: 0x95}, {value: 0x0040, lo: 0x96, hi: 0x97}, {value: 0x0018, lo: 0x98, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbc}, {value: 0x0018, lo: 0xbd, hi: 0xbf}, - // Block 0x53, offset 0x2c3 + // Block 0x54, offset 0x2de {value: 0x0000, lo: 0x06}, {value: 0x0018, lo: 0x80, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0x89}, - {value: 0x0018, lo: 0x8a, hi: 0x92}, - {value: 0x0040, lo: 0x93, hi: 0xab}, + {value: 0x0018, lo: 0x8a, hi: 0x91}, + {value: 0x0040, lo: 0x92, hi: 0xab}, {value: 0x0018, lo: 0xac, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xbf}, - // Block 0x54, offset 0x2ca + // Block 0x55, offset 0x2e5 {value: 0x0000, lo: 0x05}, {value: 0xe185, lo: 0x80, hi: 0x8f}, {value: 0x03f5, lo: 0x90, hi: 0x9f}, {value: 0x0ea5, lo: 0xa0, hi: 0xae}, {value: 0x0040, lo: 0xaf, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x55, offset 0x2d0 + // Block 0x56, offset 0x2eb {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0xa5}, {value: 0x0040, lo: 0xa6, hi: 0xa6}, @@ -3187,15 +3182,15 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xad, hi: 0xad}, {value: 0x0040, lo: 0xae, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x56, offset 0x2d8 + // Block 0x57, offset 0x2f3 {value: 0x0000, lo: 0x06}, {value: 0x0008, lo: 0x80, hi: 0xa7}, {value: 0x0040, lo: 0xa8, hi: 0xae}, {value: 0xe075, lo: 0xaf, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xb0}, {value: 0x0040, lo: 0xb1, hi: 0xbe}, - {value: 0x3b08, lo: 0xbf, hi: 0xbf}, - // Block 0x57, offset 0x2df + {value: 0x1b08, lo: 0xbf, hi: 0xbf}, + // Block 0x58, offset 0x2fa {value: 0x0000, lo: 0x0a}, {value: 0x0008, lo: 0x80, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0x9f}, @@ -3207,7 +3202,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xb7, hi: 0xb7}, {value: 0x0008, lo: 0xb8, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0x58, offset 0x2ea + // Block 0x59, offset 0x305 {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x87}, @@ -3217,62 +3212,62 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0x97, hi: 0x97}, {value: 0x0008, lo: 0x98, hi: 0x9e}, {value: 0x0040, lo: 0x9f, hi: 0x9f}, - {value: 0x3308, lo: 0xa0, hi: 0xbf}, - // Block 0x59, offset 0x2f4 + {value: 0x1308, lo: 0xa0, hi: 0xbf}, + // Block 0x5a, offset 0x30f {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0xae}, {value: 0x0008, lo: 0xaf, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xbf}, - // Block 0x5a, offset 0x2f8 + // Block 0x5b, offset 0x313 {value: 0x0000, lo: 0x02}, - {value: 0x0018, lo: 0x80, hi: 0x89}, - {value: 0x0040, lo: 0x8a, hi: 0xbf}, - // Block 0x5b, offset 0x2fb + {value: 0x0018, lo: 0x80, hi: 0x84}, + {value: 0x0040, lo: 0x85, hi: 0xbf}, + // Block 0x5c, offset 0x316 {value: 0x0000, lo: 0x05}, {value: 0x0018, lo: 0x80, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9a}, {value: 0x0018, lo: 0x9b, hi: 0x9e}, {value: 0x0edd, lo: 0x9f, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xbf}, - // Block 0x5c, offset 0x301 + // Block 0x5d, offset 0x31c {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0xb2}, {value: 0x0efd, lo: 0xb3, hi: 0xb3}, {value: 0x0040, lo: 0xb4, hi: 0xbf}, - // Block 0x5d, offset 0x305 + // Block 0x5e, offset 0x320 {value: 0x0020, lo: 0x01}, {value: 0x0f1d, lo: 0x80, hi: 0xbf}, - // Block 0x5e, offset 0x307 + // Block 0x5f, offset 0x322 {value: 0x0020, lo: 0x02}, {value: 0x171d, lo: 0x80, hi: 0x8f}, {value: 0x18fd, lo: 0x90, hi: 0xbf}, - // Block 0x5f, offset 0x30a + // Block 0x60, offset 0x325 {value: 0x0020, lo: 0x01}, {value: 0x1efd, lo: 0x80, hi: 0xbf}, - // Block 0x60, offset 0x30c + // Block 0x61, offset 0x327 {value: 0x0000, lo: 0x02}, {value: 0x0040, lo: 0x80, hi: 0x80}, {value: 0x0008, lo: 0x81, hi: 0xbf}, - // Block 0x61, offset 0x30f + // Block 0x62, offset 0x32a {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0x98}, - {value: 0x3308, lo: 0x99, hi: 0x9a}, + {value: 0x1308, lo: 0x99, hi: 0x9a}, {value: 0x29e2, lo: 0x9b, hi: 0x9b}, {value: 0x2a0a, lo: 0x9c, hi: 0x9c}, {value: 0x0008, lo: 0x9d, hi: 0x9e}, {value: 0x2a31, lo: 0x9f, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xa0}, {value: 0x0008, lo: 0xa1, hi: 0xbf}, - // Block 0x62, offset 0x319 + // Block 0x63, offset 0x334 {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xbe}, {value: 0x2a69, lo: 0xbf, hi: 0xbf}, - // Block 0x63, offset 0x31c + // Block 0x64, offset 0x337 {value: 0x0000, lo: 0x0e}, {value: 0x0040, lo: 0x80, hi: 0x84}, - {value: 0x0008, lo: 0x85, hi: 0xae}, - {value: 0x0040, lo: 0xaf, hi: 0xb0}, + {value: 0x0008, lo: 0x85, hi: 0xad}, + {value: 0x0040, lo: 0xae, hi: 0xb0}, {value: 0x2a1d, lo: 0xb1, hi: 0xb1}, {value: 0x2a3d, lo: 0xb2, hi: 0xb2}, {value: 0x2a5d, lo: 0xb3, hi: 0xb3}, @@ -3284,150 +3279,150 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x2afd, lo: 0xba, hi: 0xbb}, {value: 0x2b1d, lo: 0xbc, hi: 0xbd}, {value: 0x2afd, lo: 0xbe, hi: 0xbf}, - // Block 0x64, offset 0x32b + // Block 0x65, offset 0x346 {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0xa3}, {value: 0x0040, lo: 0xa4, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x65, offset 0x32f + // Block 0x66, offset 0x34a {value: 0x0030, lo: 0x04}, {value: 0x2aa2, lo: 0x80, hi: 0x9d}, {value: 0x305a, lo: 0x9e, hi: 0x9e}, {value: 0x0040, lo: 0x9f, hi: 0x9f}, {value: 0x30a2, lo: 0xa0, hi: 0xbf}, - // Block 0x66, offset 0x334 + // Block 0x67, offset 0x34f {value: 0x0000, lo: 0x02}, - {value: 0x0008, lo: 0x80, hi: 0xaa}, - {value: 0x0040, lo: 0xab, hi: 0xbf}, - // Block 0x67, offset 0x337 + {value: 0x0008, lo: 0x80, hi: 0x95}, + {value: 0x0040, lo: 0x96, hi: 0xbf}, + // Block 0x68, offset 0x352 {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0x8c}, {value: 0x0040, lo: 0x8d, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0xbf}, - // Block 0x68, offset 0x33b + // Block 0x69, offset 0x356 {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0xbd}, {value: 0x0018, lo: 0xbe, hi: 0xbf}, - // Block 0x69, offset 0x340 + // Block 0x6a, offset 0x35b {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0x8c}, {value: 0x0018, lo: 0x8d, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0xab}, {value: 0x0040, lo: 0xac, hi: 0xbf}, - // Block 0x6a, offset 0x345 + // Block 0x6b, offset 0x360 {value: 0x0000, lo: 0x05}, {value: 0x0008, lo: 0x80, hi: 0xa5}, {value: 0x0018, lo: 0xa6, hi: 0xaf}, - {value: 0x3308, lo: 0xb0, hi: 0xb1}, + {value: 0x1308, lo: 0xb0, hi: 0xb1}, {value: 0x0018, lo: 0xb2, hi: 0xb7}, {value: 0x0040, lo: 0xb8, hi: 0xbf}, - // Block 0x6b, offset 0x34b + // Block 0x6c, offset 0x366 {value: 0x0000, lo: 0x05}, {value: 0x0040, lo: 0x80, hi: 0xb6}, {value: 0x0008, lo: 0xb7, hi: 0xb7}, {value: 0x2009, lo: 0xb8, hi: 0xb8}, {value: 0x6e89, lo: 0xb9, hi: 0xb9}, {value: 0x0008, lo: 0xba, hi: 0xbf}, - // Block 0x6c, offset 0x351 + // Block 0x6d, offset 0x36c {value: 0x0000, lo: 0x0e}, {value: 0x0008, lo: 0x80, hi: 0x81}, - {value: 0x3308, lo: 0x82, hi: 0x82}, + {value: 0x1308, lo: 0x82, hi: 0x82}, {value: 0x0008, lo: 0x83, hi: 0x85}, - {value: 0x3b08, lo: 0x86, hi: 0x86}, + {value: 0x1b08, lo: 0x86, hi: 0x86}, {value: 0x0008, lo: 0x87, hi: 0x8a}, - {value: 0x3308, lo: 0x8b, hi: 0x8b}, + {value: 0x1308, lo: 0x8b, hi: 0x8b}, {value: 0x0008, lo: 0x8c, hi: 0xa2}, - {value: 0x3008, lo: 0xa3, hi: 0xa4}, - {value: 0x3308, lo: 0xa5, hi: 0xa6}, - {value: 0x3008, lo: 0xa7, hi: 0xa7}, + {value: 0x1008, lo: 0xa3, hi: 0xa4}, + {value: 0x1308, lo: 0xa5, hi: 0xa6}, + {value: 0x1008, lo: 0xa7, hi: 0xa7}, {value: 0x0018, lo: 0xa8, hi: 0xab}, {value: 0x0040, lo: 0xac, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbf}, - // Block 0x6d, offset 0x360 + // Block 0x6e, offset 0x37b {value: 0x0000, lo: 0x05}, {value: 0x0208, lo: 0x80, hi: 0xb1}, {value: 0x0108, lo: 0xb2, hi: 0xb2}, {value: 0x0008, lo: 0xb3, hi: 0xb3}, {value: 0x0018, lo: 0xb4, hi: 0xb7}, {value: 0x0040, lo: 0xb8, hi: 0xbf}, - // Block 0x6e, offset 0x366 + // Block 0x6f, offset 0x381 {value: 0x0000, lo: 0x03}, - {value: 0x3008, lo: 0x80, hi: 0x81}, + {value: 0x1008, lo: 0x80, hi: 0x81}, {value: 0x0008, lo: 0x82, hi: 0xb3}, - {value: 0x3008, lo: 0xb4, hi: 0xbf}, - // Block 0x6f, offset 0x36a + {value: 0x1008, lo: 0xb4, hi: 0xbf}, + // Block 0x70, offset 0x385 {value: 0x0000, lo: 0x0e}, - {value: 0x3008, lo: 0x80, hi: 0x83}, - {value: 0x3b08, lo: 0x84, hi: 0x84}, - {value: 0x3308, lo: 0x85, hi: 0x85}, + {value: 0x1008, lo: 0x80, hi: 0x83}, + {value: 0x1b08, lo: 0x84, hi: 0x84}, + {value: 0x1308, lo: 0x85, hi: 0x85}, {value: 0x0040, lo: 0x86, hi: 0x8d}, {value: 0x0018, lo: 0x8e, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9f}, - {value: 0x3308, lo: 0xa0, hi: 0xb1}, + {value: 0x1308, lo: 0xa0, hi: 0xb1}, {value: 0x0008, lo: 0xb2, hi: 0xb7}, {value: 0x0018, lo: 0xb8, hi: 0xba}, {value: 0x0008, lo: 0xbb, hi: 0xbb}, {value: 0x0018, lo: 0xbc, hi: 0xbc}, {value: 0x0008, lo: 0xbd, hi: 0xbd}, {value: 0x0040, lo: 0xbe, hi: 0xbf}, - // Block 0x70, offset 0x379 + // Block 0x71, offset 0x394 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0xa5}, - {value: 0x3308, lo: 0xa6, hi: 0xad}, + {value: 0x1308, lo: 0xa6, hi: 0xad}, {value: 0x0018, lo: 0xae, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x71, offset 0x37e + // Block 0x72, offset 0x399 {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0x86}, - {value: 0x3308, lo: 0x87, hi: 0x91}, - {value: 0x3008, lo: 0x92, hi: 0x92}, - {value: 0x3808, lo: 0x93, hi: 0x93}, + {value: 0x1308, lo: 0x87, hi: 0x91}, + {value: 0x1008, lo: 0x92, hi: 0x92}, + {value: 0x1808, lo: 0x93, hi: 0x93}, {value: 0x0040, lo: 0x94, hi: 0x9e}, {value: 0x0018, lo: 0x9f, hi: 0xbc}, {value: 0x0040, lo: 0xbd, hi: 0xbf}, - // Block 0x72, offset 0x386 + // Block 0x73, offset 0x3a1 {value: 0x0000, lo: 0x09}, - {value: 0x3308, lo: 0x80, hi: 0x82}, - {value: 0x3008, lo: 0x83, hi: 0x83}, + {value: 0x1308, lo: 0x80, hi: 0x82}, + {value: 0x1008, lo: 0x83, hi: 0x83}, {value: 0x0008, lo: 0x84, hi: 0xb2}, - {value: 0x3308, lo: 0xb3, hi: 0xb3}, - {value: 0x3008, lo: 0xb4, hi: 0xb5}, - {value: 0x3308, lo: 0xb6, hi: 0xb9}, - {value: 0x3008, lo: 0xba, hi: 0xbb}, - {value: 0x3308, lo: 0xbc, hi: 0xbc}, - {value: 0x3008, lo: 0xbd, hi: 0xbf}, - // Block 0x73, offset 0x390 + {value: 0x1308, lo: 0xb3, hi: 0xb3}, + {value: 0x1008, lo: 0xb4, hi: 0xb5}, + {value: 0x1308, lo: 0xb6, hi: 0xb9}, + {value: 0x1008, lo: 0xba, hi: 0xbb}, + {value: 0x1308, lo: 0xbc, hi: 0xbc}, + {value: 0x1008, lo: 0xbd, hi: 0xbf}, + // Block 0x74, offset 0x3ab {value: 0x0000, lo: 0x0a}, - {value: 0x3808, lo: 0x80, hi: 0x80}, + {value: 0x1808, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x8e}, {value: 0x0008, lo: 0x8f, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9d}, {value: 0x0018, lo: 0x9e, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xa4}, - {value: 0x3308, lo: 0xa5, hi: 0xa5}, + {value: 0x1308, lo: 0xa5, hi: 0xa5}, {value: 0x0008, lo: 0xa6, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0x74, offset 0x39b + // Block 0x75, offset 0x3b6 {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0xa8}, - {value: 0x3308, lo: 0xa9, hi: 0xae}, - {value: 0x3008, lo: 0xaf, hi: 0xb0}, - {value: 0x3308, lo: 0xb1, hi: 0xb2}, - {value: 0x3008, lo: 0xb3, hi: 0xb4}, - {value: 0x3308, lo: 0xb5, hi: 0xb6}, + {value: 0x1308, lo: 0xa9, hi: 0xae}, + {value: 0x1008, lo: 0xaf, hi: 0xb0}, + {value: 0x1308, lo: 0xb1, hi: 0xb2}, + {value: 0x1008, lo: 0xb3, hi: 0xb4}, + {value: 0x1308, lo: 0xb5, hi: 0xb6}, {value: 0x0040, lo: 0xb7, hi: 0xbf}, - // Block 0x75, offset 0x3a3 + // Block 0x76, offset 0x3be {value: 0x0000, lo: 0x10}, {value: 0x0008, lo: 0x80, hi: 0x82}, - {value: 0x3308, lo: 0x83, hi: 0x83}, + {value: 0x1308, lo: 0x83, hi: 0x83}, {value: 0x0008, lo: 0x84, hi: 0x8b}, - {value: 0x3308, lo: 0x8c, hi: 0x8c}, - {value: 0x3008, lo: 0x8d, hi: 0x8d}, + {value: 0x1308, lo: 0x8c, hi: 0x8c}, + {value: 0x1008, lo: 0x8d, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9b}, @@ -3435,38 +3430,38 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xa0, hi: 0xb6}, {value: 0x0018, lo: 0xb7, hi: 0xb9}, {value: 0x0008, lo: 0xba, hi: 0xba}, - {value: 0x3008, lo: 0xbb, hi: 0xbb}, - {value: 0x3308, lo: 0xbc, hi: 0xbc}, - {value: 0x3008, lo: 0xbd, hi: 0xbd}, + {value: 0x1008, lo: 0xbb, hi: 0xbb}, + {value: 0x1308, lo: 0xbc, hi: 0xbc}, + {value: 0x1008, lo: 0xbd, hi: 0xbd}, {value: 0x0008, lo: 0xbe, hi: 0xbf}, - // Block 0x76, offset 0x3b4 + // Block 0x77, offset 0x3cf {value: 0x0000, lo: 0x08}, {value: 0x0008, lo: 0x80, hi: 0xaf}, - {value: 0x3308, lo: 0xb0, hi: 0xb0}, + {value: 0x1308, lo: 0xb0, hi: 0xb0}, {value: 0x0008, lo: 0xb1, hi: 0xb1}, - {value: 0x3308, lo: 0xb2, hi: 0xb4}, + {value: 0x1308, lo: 0xb2, hi: 0xb4}, {value: 0x0008, lo: 0xb5, hi: 0xb6}, - {value: 0x3308, lo: 0xb7, hi: 0xb8}, + {value: 0x1308, lo: 0xb7, hi: 0xb8}, {value: 0x0008, lo: 0xb9, hi: 0xbd}, - {value: 0x3308, lo: 0xbe, hi: 0xbf}, - // Block 0x77, offset 0x3bd + {value: 0x1308, lo: 0xbe, hi: 0xbf}, + // Block 0x78, offset 0x3d8 {value: 0x0000, lo: 0x0f}, {value: 0x0008, lo: 0x80, hi: 0x80}, - {value: 0x3308, lo: 0x81, hi: 0x81}, + {value: 0x1308, lo: 0x81, hi: 0x81}, {value: 0x0008, lo: 0x82, hi: 0x82}, {value: 0x0040, lo: 0x83, hi: 0x9a}, {value: 0x0008, lo: 0x9b, hi: 0x9d}, {value: 0x0018, lo: 0x9e, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xaa}, - {value: 0x3008, lo: 0xab, hi: 0xab}, - {value: 0x3308, lo: 0xac, hi: 0xad}, - {value: 0x3008, lo: 0xae, hi: 0xaf}, + {value: 0x1008, lo: 0xab, hi: 0xab}, + {value: 0x1308, lo: 0xac, hi: 0xad}, + {value: 0x1008, lo: 0xae, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xb1}, {value: 0x0008, lo: 0xb2, hi: 0xb4}, - {value: 0x3008, lo: 0xb5, hi: 0xb5}, - {value: 0x3b08, lo: 0xb6, hi: 0xb6}, + {value: 0x1008, lo: 0xb5, hi: 0xb5}, + {value: 0x1b08, lo: 0xb6, hi: 0xb6}, {value: 0x0040, lo: 0xb7, hi: 0xbf}, - // Block 0x78, offset 0x3cd + // Block 0x79, offset 0x3e8 {value: 0x0000, lo: 0x0c}, {value: 0x0040, lo: 0x80, hi: 0x80}, {value: 0x0008, lo: 0x81, hi: 0x86}, @@ -3480,7 +3475,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xa8, hi: 0xae}, {value: 0x0040, lo: 0xaf, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x79, offset 0x3da + // Block 0x7a, offset 0x3f5 {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0x9a}, {value: 0x0018, lo: 0x9b, hi: 0x9b}, @@ -3491,54 +3486,54 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xa0, hi: 0xa5}, {value: 0x0040, lo: 0xa6, hi: 0xaf}, {value: 0x4495, lo: 0xb0, hi: 0xbf}, - // Block 0x7a, offset 0x3e4 + // Block 0x7b, offset 0x3ff {value: 0x0000, lo: 0x04}, {value: 0x44b5, lo: 0x80, hi: 0x8f}, {value: 0x44d5, lo: 0x90, hi: 0x9f}, {value: 0x44f5, lo: 0xa0, hi: 0xaf}, {value: 0x44d5, lo: 0xb0, hi: 0xbf}, - // Block 0x7b, offset 0x3e9 + // Block 0x7c, offset 0x404 {value: 0x0000, lo: 0x0c}, {value: 0x0008, lo: 0x80, hi: 0xa2}, - {value: 0x3008, lo: 0xa3, hi: 0xa4}, - {value: 0x3308, lo: 0xa5, hi: 0xa5}, - {value: 0x3008, lo: 0xa6, hi: 0xa7}, - {value: 0x3308, lo: 0xa8, hi: 0xa8}, - {value: 0x3008, lo: 0xa9, hi: 0xaa}, + {value: 0x1008, lo: 0xa3, hi: 0xa4}, + {value: 0x1308, lo: 0xa5, hi: 0xa5}, + {value: 0x1008, lo: 0xa6, hi: 0xa7}, + {value: 0x1308, lo: 0xa8, hi: 0xa8}, + {value: 0x1008, lo: 0xa9, hi: 0xaa}, {value: 0x0018, lo: 0xab, hi: 0xab}, - {value: 0x3008, lo: 0xac, hi: 0xac}, - {value: 0x3b08, lo: 0xad, hi: 0xad}, + {value: 0x1008, lo: 0xac, hi: 0xac}, + {value: 0x1b08, lo: 0xad, hi: 0xad}, {value: 0x0040, lo: 0xae, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbf}, - // Block 0x7c, offset 0x3f6 + // Block 0x7d, offset 0x411 {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0xa3}, {value: 0x0040, lo: 0xa4, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xbf}, - // Block 0x7d, offset 0x3fa + // Block 0x7e, offset 0x415 {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x8a}, {value: 0x0018, lo: 0x8b, hi: 0xbb}, {value: 0x0040, lo: 0xbc, hi: 0xbf}, - // Block 0x7e, offset 0x3ff + // Block 0x7f, offset 0x41a {value: 0x0020, lo: 0x01}, {value: 0x4515, lo: 0x80, hi: 0xbf}, - // Block 0x7f, offset 0x401 + // Block 0x80, offset 0x41c {value: 0x0020, lo: 0x03}, {value: 0x4d15, lo: 0x80, hi: 0x94}, {value: 0x4ad5, lo: 0x95, hi: 0x95}, {value: 0x4fb5, lo: 0x96, hi: 0xbf}, - // Block 0x80, offset 0x405 + // Block 0x81, offset 0x420 {value: 0x0020, lo: 0x01}, {value: 0x54f5, lo: 0x80, hi: 0xbf}, - // Block 0x81, offset 0x407 + // Block 0x82, offset 0x422 {value: 0x0020, lo: 0x03}, {value: 0x5cf5, lo: 0x80, hi: 0x84}, {value: 0x5655, lo: 0x85, hi: 0x85}, {value: 0x5d95, lo: 0x86, hi: 0xbf}, - // Block 0x82, offset 0x40b + // Block 0x83, offset 0x426 {value: 0x0020, lo: 0x08}, {value: 0x6b55, lo: 0x80, hi: 0x8f}, {value: 0x6d15, lo: 0x90, hi: 0x90}, @@ -3548,19 +3543,19 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xae, hi: 0xae}, {value: 0x0040, lo: 0xaf, hi: 0xaf}, {value: 0x70d5, lo: 0xb0, hi: 0xbf}, - // Block 0x83, offset 0x414 + // Block 0x84, offset 0x42f {value: 0x0020, lo: 0x05}, {value: 0x72d5, lo: 0x80, hi: 0xad}, {value: 0x6535, lo: 0xae, hi: 0xae}, {value: 0x7895, lo: 0xaf, hi: 0xb5}, {value: 0x6f55, lo: 0xb6, hi: 0xb6}, {value: 0x7975, lo: 0xb7, hi: 0xbf}, - // Block 0x84, offset 0x41a + // Block 0x85, offset 0x435 {value: 0x0028, lo: 0x03}, {value: 0x7c21, lo: 0x80, hi: 0x82}, {value: 0x7be1, lo: 0x83, hi: 0x83}, {value: 0x7c99, lo: 0x84, hi: 0xbf}, - // Block 0x85, offset 0x41e + // Block 0x86, offset 0x439 {value: 0x0038, lo: 0x0f}, {value: 0x9db1, lo: 0x80, hi: 0x83}, {value: 0x9e59, lo: 0x84, hi: 0x85}, @@ -3577,7 +3572,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0xa869, lo: 0xbc, hi: 0xbc}, {value: 0xa7f9, lo: 0xbd, hi: 0xbd}, {value: 0xa8d9, lo: 0xbe, hi: 0xbf}, - // Block 0x86, offset 0x42e + // Block 0x87, offset 0x449 {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0x8b}, {value: 0x0040, lo: 0x8c, hi: 0x8c}, @@ -3588,24 +3583,24 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xbc, hi: 0xbd}, {value: 0x0040, lo: 0xbe, hi: 0xbe}, {value: 0x0008, lo: 0xbf, hi: 0xbf}, - // Block 0x87, offset 0x438 + // Block 0x88, offset 0x453 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0xbf}, - // Block 0x88, offset 0x43d + // Block 0x89, offset 0x458 {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xba}, {value: 0x0040, lo: 0xbb, hi: 0xbf}, - // Block 0x89, offset 0x440 + // Block 0x8a, offset 0x45b {value: 0x0000, lo: 0x05}, {value: 0x0018, lo: 0x80, hi: 0x82}, {value: 0x0040, lo: 0x83, hi: 0x86}, {value: 0x0018, lo: 0x87, hi: 0xb3}, {value: 0x0040, lo: 0xb4, hi: 0xb6}, {value: 0x0018, lo: 0xb7, hi: 0xbf}, - // Block 0x8a, offset 0x446 + // Block 0x8b, offset 0x461 {value: 0x0000, lo: 0x06}, {value: 0x0018, lo: 0x80, hi: 0x8e}, {value: 0x0040, lo: 0x8f, hi: 0x8f}, @@ -3613,31 +3608,31 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0x9c, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xa0}, {value: 0x0040, lo: 0xa1, hi: 0xbf}, - // Block 0x8b, offset 0x44d + // Block 0x8c, offset 0x468 {value: 0x0000, lo: 0x04}, {value: 0x0040, lo: 0x80, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0xbc}, - {value: 0x3308, lo: 0xbd, hi: 0xbd}, + {value: 0x1308, lo: 0xbd, hi: 0xbd}, {value: 0x0040, lo: 0xbe, hi: 0xbf}, - // Block 0x8c, offset 0x452 + // Block 0x8d, offset 0x46d {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0x9c}, {value: 0x0040, lo: 0x9d, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xbf}, - // Block 0x8d, offset 0x456 + // Block 0x8e, offset 0x471 {value: 0x0000, lo: 0x05}, {value: 0x0008, lo: 0x80, hi: 0x90}, {value: 0x0040, lo: 0x91, hi: 0x9f}, - {value: 0x3308, lo: 0xa0, hi: 0xa0}, + {value: 0x1308, lo: 0xa0, hi: 0xa0}, {value: 0x0018, lo: 0xa1, hi: 0xbb}, {value: 0x0040, lo: 0xbc, hi: 0xbf}, - // Block 0x8e, offset 0x45c + // Block 0x8f, offset 0x477 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xa3}, - {value: 0x0040, lo: 0xa4, hi: 0xac}, - {value: 0x0008, lo: 0xad, hi: 0xbf}, - // Block 0x8f, offset 0x461 + {value: 0x0040, lo: 0xa4, hi: 0xaf}, + {value: 0x0008, lo: 0xb0, hi: 0xbf}, + // Block 0x90, offset 0x47c {value: 0x0000, lo: 0x08}, {value: 0x0008, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0x81}, @@ -3645,22 +3640,22 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0018, lo: 0x8a, hi: 0x8a}, {value: 0x0040, lo: 0x8b, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0xb5}, - {value: 0x3308, lo: 0xb6, hi: 0xba}, + {value: 0x1308, lo: 0xb6, hi: 0xba}, {value: 0x0040, lo: 0xbb, hi: 0xbf}, - // Block 0x90, offset 0x46a + // Block 0x91, offset 0x485 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0x9e}, {value: 0x0018, lo: 0x9f, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xbf}, - // Block 0x91, offset 0x46f + // Block 0x92, offset 0x48a {value: 0x0000, lo: 0x05}, {value: 0x0008, lo: 0x80, hi: 0x83}, {value: 0x0040, lo: 0x84, hi: 0x87}, {value: 0x0008, lo: 0x88, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0x95}, {value: 0x0040, lo: 0x96, hi: 0xbf}, - // Block 0x92, offset 0x475 + // Block 0x93, offset 0x490 {value: 0x0000, lo: 0x06}, {value: 0xe145, lo: 0x80, hi: 0x87}, {value: 0xe1c5, lo: 0x88, hi: 0x8f}, @@ -3668,7 +3663,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x8ad5, lo: 0x98, hi: 0x9f}, {value: 0x8aed, lo: 0xa0, hi: 0xa7}, {value: 0x0008, lo: 0xa8, hi: 0xbf}, - // Block 0x93, offset 0x47c + // Block 0x94, offset 0x497 {value: 0x0000, lo: 0x06}, {value: 0x0008, lo: 0x80, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0x9f}, @@ -3676,7 +3671,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xaa, hi: 0xaf}, {value: 0x8aed, lo: 0xb0, hi: 0xb7}, {value: 0x8ad5, lo: 0xb8, hi: 0xbf}, - // Block 0x94, offset 0x483 + // Block 0x95, offset 0x49e {value: 0x0000, lo: 0x06}, {value: 0xe145, lo: 0x80, hi: 0x87}, {value: 0xe1c5, lo: 0x88, hi: 0x8f}, @@ -3684,176 +3679,173 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0x94, hi: 0x97}, {value: 0x0008, lo: 0x98, hi: 0xbb}, {value: 0x0040, lo: 0xbc, hi: 0xbf}, - // Block 0x95, offset 0x48a + // Block 0x96, offset 0x4a5 {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0xa7}, {value: 0x0040, lo: 0xa8, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x96, offset 0x48e + // Block 0x97, offset 0x4a9 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0xa3}, {value: 0x0040, lo: 0xa4, hi: 0xae}, {value: 0x0018, lo: 0xaf, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xbf}, - // Block 0x97, offset 0x493 + // Block 0x98, offset 0x4ae {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xb6}, {value: 0x0040, lo: 0xb7, hi: 0xbf}, - // Block 0x98, offset 0x496 + // Block 0x99, offset 0x4b1 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0x95}, {value: 0x0040, lo: 0x96, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xa7}, {value: 0x0040, lo: 0xa8, hi: 0xbf}, - // Block 0x99, offset 0x49b + // Block 0x9a, offset 0x4b6 {value: 0x0000, lo: 0x0b}, - {value: 0x0808, lo: 0x80, hi: 0x85}, + {value: 0x0008, lo: 0x80, hi: 0x85}, {value: 0x0040, lo: 0x86, hi: 0x87}, - {value: 0x0808, lo: 0x88, hi: 0x88}, + {value: 0x0008, lo: 0x88, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0x89}, - {value: 0x0808, lo: 0x8a, hi: 0xb5}, + {value: 0x0008, lo: 0x8a, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xb6}, - {value: 0x0808, lo: 0xb7, hi: 0xb8}, + {value: 0x0008, lo: 0xb7, hi: 0xb8}, {value: 0x0040, lo: 0xb9, hi: 0xbb}, - {value: 0x0808, lo: 0xbc, hi: 0xbc}, + {value: 0x0008, lo: 0xbc, hi: 0xbc}, {value: 0x0040, lo: 0xbd, hi: 0xbe}, - {value: 0x0808, lo: 0xbf, hi: 0xbf}, - // Block 0x9a, offset 0x4a7 + {value: 0x0008, lo: 0xbf, hi: 0xbf}, + // Block 0x9b, offset 0x4c2 {value: 0x0000, lo: 0x05}, - {value: 0x0808, lo: 0x80, hi: 0x95}, + {value: 0x0008, lo: 0x80, hi: 0x95}, {value: 0x0040, lo: 0x96, hi: 0x96}, - {value: 0x0818, lo: 0x97, hi: 0x9f}, - {value: 0x0808, lo: 0xa0, hi: 0xb6}, - {value: 0x0818, lo: 0xb7, hi: 0xbf}, - // Block 0x9b, offset 0x4ad + {value: 0x0018, lo: 0x97, hi: 0x9f}, + {value: 0x0008, lo: 0xa0, hi: 0xb6}, + {value: 0x0018, lo: 0xb7, hi: 0xbf}, + // Block 0x9c, offset 0x4c8 {value: 0x0000, lo: 0x04}, - {value: 0x0808, lo: 0x80, hi: 0x9e}, + {value: 0x0008, lo: 0x80, hi: 0x9e}, {value: 0x0040, lo: 0x9f, hi: 0xa6}, - {value: 0x0818, lo: 0xa7, hi: 0xaf}, + {value: 0x0018, lo: 0xa7, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xbf}, - // Block 0x9c, offset 0x4b2 + // Block 0x9d, offset 0x4cd {value: 0x0000, lo: 0x06}, {value: 0x0040, lo: 0x80, hi: 0x9f}, - {value: 0x0808, lo: 0xa0, hi: 0xb2}, + {value: 0x0008, lo: 0xa0, hi: 0xb2}, {value: 0x0040, lo: 0xb3, hi: 0xb3}, - {value: 0x0808, lo: 0xb4, hi: 0xb5}, + {value: 0x0008, lo: 0xb4, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xba}, - {value: 0x0818, lo: 0xbb, hi: 0xbf}, - // Block 0x9d, offset 0x4b9 + {value: 0x0018, lo: 0xbb, hi: 0xbf}, + // Block 0x9e, offset 0x4d4 {value: 0x0000, lo: 0x07}, - {value: 0x0808, lo: 0x80, hi: 0x95}, - {value: 0x0818, lo: 0x96, hi: 0x9b}, + {value: 0x0008, lo: 0x80, hi: 0x95}, + {value: 0x0018, lo: 0x96, hi: 0x9b}, {value: 0x0040, lo: 0x9c, hi: 0x9e}, {value: 0x0018, lo: 0x9f, hi: 0x9f}, - {value: 0x0808, lo: 0xa0, hi: 0xb9}, + {value: 0x0008, lo: 0xa0, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbe}, - {value: 0x0818, lo: 0xbf, hi: 0xbf}, - // Block 0x9e, offset 0x4c1 + {value: 0x0018, lo: 0xbf, hi: 0xbf}, + // Block 0x9f, offset 0x4dc {value: 0x0000, lo: 0x04}, - {value: 0x0808, lo: 0x80, hi: 0xb7}, + {value: 0x0008, lo: 0x80, hi: 0xb7}, {value: 0x0040, lo: 0xb8, hi: 0xbb}, - {value: 0x0818, lo: 0xbc, hi: 0xbd}, - {value: 0x0808, lo: 0xbe, hi: 0xbf}, - // Block 0x9f, offset 0x4c6 + {value: 0x0018, lo: 0xbc, hi: 0xbd}, + {value: 0x0008, lo: 0xbe, hi: 0xbf}, + // Block 0xa0, offset 0x4e1 {value: 0x0000, lo: 0x03}, - {value: 0x0818, lo: 0x80, hi: 0x8f}, + {value: 0x0018, lo: 0x80, hi: 0x8f}, {value: 0x0040, lo: 0x90, hi: 0x91}, - {value: 0x0818, lo: 0x92, hi: 0xbf}, - // Block 0xa0, offset 0x4ca + {value: 0x0018, lo: 0x92, hi: 0xbf}, + // Block 0xa1, offset 0x4e5 {value: 0x0000, lo: 0x0f}, - {value: 0x0808, lo: 0x80, hi: 0x80}, - {value: 0x3308, lo: 0x81, hi: 0x83}, + {value: 0x0008, lo: 0x80, hi: 0x80}, + {value: 0x1308, lo: 0x81, hi: 0x83}, {value: 0x0040, lo: 0x84, hi: 0x84}, - {value: 0x3308, lo: 0x85, hi: 0x86}, + {value: 0x1308, lo: 0x85, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x8b}, - {value: 0x3308, lo: 0x8c, hi: 0x8f}, - {value: 0x0808, lo: 0x90, hi: 0x93}, + {value: 0x1308, lo: 0x8c, hi: 0x8f}, + {value: 0x0008, lo: 0x90, hi: 0x93}, {value: 0x0040, lo: 0x94, hi: 0x94}, - {value: 0x0808, lo: 0x95, hi: 0x97}, + {value: 0x0008, lo: 0x95, hi: 0x97}, {value: 0x0040, lo: 0x98, hi: 0x98}, - {value: 0x0808, lo: 0x99, hi: 0xb3}, + {value: 0x0008, lo: 0x99, hi: 0xb3}, {value: 0x0040, lo: 0xb4, hi: 0xb7}, - {value: 0x3308, lo: 0xb8, hi: 0xba}, + {value: 0x1308, lo: 0xb8, hi: 0xba}, {value: 0x0040, lo: 0xbb, hi: 0xbe}, - {value: 0x3b08, lo: 0xbf, hi: 0xbf}, - // Block 0xa1, offset 0x4da + {value: 0x1b08, lo: 0xbf, hi: 0xbf}, + // Block 0xa2, offset 0x4f5 {value: 0x0000, lo: 0x06}, - {value: 0x0818, lo: 0x80, hi: 0x87}, + {value: 0x0018, lo: 0x80, hi: 0x87}, {value: 0x0040, lo: 0x88, hi: 0x8f}, - {value: 0x0818, lo: 0x90, hi: 0x98}, + {value: 0x0018, lo: 0x90, hi: 0x98}, {value: 0x0040, lo: 0x99, hi: 0x9f}, - {value: 0x0808, lo: 0xa0, hi: 0xbc}, - {value: 0x0818, lo: 0xbd, hi: 0xbf}, - // Block 0xa2, offset 0x4e1 + {value: 0x0008, lo: 0xa0, hi: 0xbc}, + {value: 0x0018, lo: 0xbd, hi: 0xbf}, + // Block 0xa3, offset 0x4fc {value: 0x0000, lo: 0x03}, - {value: 0x0808, lo: 0x80, hi: 0x9c}, - {value: 0x0818, lo: 0x9d, hi: 0x9f}, + {value: 0x0008, lo: 0x80, hi: 0x9c}, + {value: 0x0018, lo: 0x9d, hi: 0x9f}, {value: 0x0040, lo: 0xa0, hi: 0xbf}, - // Block 0xa3, offset 0x4e5 + // Block 0xa4, offset 0x500 {value: 0x0000, lo: 0x03}, - {value: 0x0808, lo: 0x80, hi: 0xb5}, + {value: 0x0008, lo: 0x80, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xb8}, {value: 0x0018, lo: 0xb9, hi: 0xbf}, - // Block 0xa4, offset 0x4e9 + // Block 0xa5, offset 0x504 {value: 0x0000, lo: 0x06}, - {value: 0x0808, lo: 0x80, hi: 0x95}, + {value: 0x0008, lo: 0x80, hi: 0x95}, {value: 0x0040, lo: 0x96, hi: 0x97}, - {value: 0x0818, lo: 0x98, hi: 0x9f}, - {value: 0x0808, lo: 0xa0, hi: 0xb2}, + {value: 0x0018, lo: 0x98, hi: 0x9f}, + {value: 0x0008, lo: 0xa0, hi: 0xb2}, {value: 0x0040, lo: 0xb3, hi: 0xb7}, - {value: 0x0818, lo: 0xb8, hi: 0xbf}, - // Block 0xa5, offset 0x4f0 - {value: 0x0000, lo: 0x01}, - {value: 0x0808, lo: 0x80, hi: 0xbf}, - // Block 0xa6, offset 0x4f2 + {value: 0x0018, lo: 0xb8, hi: 0xbf}, + // Block 0xa6, offset 0x50b {value: 0x0000, lo: 0x02}, - {value: 0x0808, lo: 0x80, hi: 0x88}, + {value: 0x0008, lo: 0x80, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0xbf}, - // Block 0xa7, offset 0x4f5 + // Block 0xa7, offset 0x50e {value: 0x0000, lo: 0x02}, {value: 0x03dd, lo: 0x80, hi: 0xb2}, {value: 0x0040, lo: 0xb3, hi: 0xbf}, - // Block 0xa8, offset 0x4f8 + // Block 0xa8, offset 0x511 {value: 0x0000, lo: 0x03}, - {value: 0x0808, lo: 0x80, hi: 0xb2}, + {value: 0x0008, lo: 0x80, hi: 0xb2}, {value: 0x0040, lo: 0xb3, hi: 0xb9}, - {value: 0x0818, lo: 0xba, hi: 0xbf}, - // Block 0xa9, offset 0x4fc + {value: 0x0018, lo: 0xba, hi: 0xbf}, + // Block 0xa9, offset 0x515 {value: 0x0000, lo: 0x03}, {value: 0x0040, lo: 0x80, hi: 0x9f}, - {value: 0x0818, lo: 0xa0, hi: 0xbe}, + {value: 0x0018, lo: 0xa0, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0xaa, offset 0x500 + // Block 0xaa, offset 0x519 {value: 0x0000, lo: 0x05}, - {value: 0x3008, lo: 0x80, hi: 0x80}, - {value: 0x3308, lo: 0x81, hi: 0x81}, - {value: 0x3008, lo: 0x82, hi: 0x82}, + {value: 0x1008, lo: 0x80, hi: 0x80}, + {value: 0x1308, lo: 0x81, hi: 0x81}, + {value: 0x1008, lo: 0x82, hi: 0x82}, {value: 0x0008, lo: 0x83, hi: 0xb7}, - {value: 0x3308, lo: 0xb8, hi: 0xbf}, - // Block 0xab, offset 0x506 + {value: 0x1308, lo: 0xb8, hi: 0xbf}, + // Block 0xab, offset 0x51f {value: 0x0000, lo: 0x08}, - {value: 0x3308, lo: 0x80, hi: 0x85}, - {value: 0x3b08, lo: 0x86, hi: 0x86}, + {value: 0x1308, lo: 0x80, hi: 0x85}, + {value: 0x1b08, lo: 0x86, hi: 0x86}, {value: 0x0018, lo: 0x87, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x91}, {value: 0x0018, lo: 0x92, hi: 0xa5}, {value: 0x0008, lo: 0xa6, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xbe}, - {value: 0x3b08, lo: 0xbf, hi: 0xbf}, - // Block 0xac, offset 0x50f + {value: 0x1b08, lo: 0xbf, hi: 0xbf}, + // Block 0xac, offset 0x528 {value: 0x0000, lo: 0x0b}, - {value: 0x3308, lo: 0x80, hi: 0x81}, - {value: 0x3008, lo: 0x82, hi: 0x82}, + {value: 0x1308, lo: 0x80, hi: 0x81}, + {value: 0x1008, lo: 0x82, hi: 0x82}, {value: 0x0008, lo: 0x83, hi: 0xaf}, - {value: 0x3008, lo: 0xb0, hi: 0xb2}, - {value: 0x3308, lo: 0xb3, hi: 0xb6}, - {value: 0x3008, lo: 0xb7, hi: 0xb8}, - {value: 0x3b08, lo: 0xb9, hi: 0xb9}, - {value: 0x3308, lo: 0xba, hi: 0xba}, + {value: 0x1008, lo: 0xb0, hi: 0xb2}, + {value: 0x1308, lo: 0xb3, hi: 0xb6}, + {value: 0x1008, lo: 0xb7, hi: 0xb8}, + {value: 0x1b08, lo: 0xb9, hi: 0xb9}, + {value: 0x1308, lo: 0xba, hi: 0xba}, {value: 0x0018, lo: 0xbb, hi: 0xbc}, {value: 0x0340, lo: 0xbd, hi: 0xbd}, {value: 0x0018, lo: 0xbe, hi: 0xbf}, - // Block 0xad, offset 0x51b + // Block 0xad, offset 0x534 {value: 0x0000, lo: 0x06}, {value: 0x0018, lo: 0x80, hi: 0x81}, {value: 0x0040, lo: 0x82, hi: 0x8f}, @@ -3861,39 +3853,39 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xa9, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbf}, - // Block 0xae, offset 0x522 + // Block 0xae, offset 0x53b {value: 0x0000, lo: 0x08}, - {value: 0x3308, lo: 0x80, hi: 0x82}, + {value: 0x1308, lo: 0x80, hi: 0x82}, {value: 0x0008, lo: 0x83, hi: 0xa6}, - {value: 0x3308, lo: 0xa7, hi: 0xab}, - {value: 0x3008, lo: 0xac, hi: 0xac}, - {value: 0x3308, lo: 0xad, hi: 0xb2}, - {value: 0x3b08, lo: 0xb3, hi: 0xb4}, + {value: 0x1308, lo: 0xa7, hi: 0xab}, + {value: 0x1008, lo: 0xac, hi: 0xac}, + {value: 0x1308, lo: 0xad, hi: 0xb2}, + {value: 0x1b08, lo: 0xb3, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xb5}, {value: 0x0008, lo: 0xb6, hi: 0xbf}, - // Block 0xaf, offset 0x52b + // Block 0xaf, offset 0x544 {value: 0x0000, lo: 0x07}, {value: 0x0018, lo: 0x80, hi: 0x83}, {value: 0x0040, lo: 0x84, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0xb2}, - {value: 0x3308, lo: 0xb3, hi: 0xb3}, + {value: 0x1308, lo: 0xb3, hi: 0xb3}, {value: 0x0018, lo: 0xb4, hi: 0xb5}, {value: 0x0008, lo: 0xb6, hi: 0xb6}, {value: 0x0040, lo: 0xb7, hi: 0xbf}, - // Block 0xb0, offset 0x533 + // Block 0xb0, offset 0x54c {value: 0x0000, lo: 0x06}, - {value: 0x3308, lo: 0x80, hi: 0x81}, - {value: 0x3008, lo: 0x82, hi: 0x82}, + {value: 0x1308, lo: 0x80, hi: 0x81}, + {value: 0x1008, lo: 0x82, hi: 0x82}, {value: 0x0008, lo: 0x83, hi: 0xb2}, - {value: 0x3008, lo: 0xb3, hi: 0xb5}, - {value: 0x3308, lo: 0xb6, hi: 0xbe}, - {value: 0x3008, lo: 0xbf, hi: 0xbf}, - // Block 0xb1, offset 0x53a + {value: 0x1008, lo: 0xb3, hi: 0xb5}, + {value: 0x1308, lo: 0xb6, hi: 0xbe}, + {value: 0x1008, lo: 0xbf, hi: 0xbf}, + // Block 0xb1, offset 0x553 {value: 0x0000, lo: 0x0d}, - {value: 0x3808, lo: 0x80, hi: 0x80}, + {value: 0x1808, lo: 0x80, hi: 0x80}, {value: 0x0008, lo: 0x81, hi: 0x84}, {value: 0x0018, lo: 0x85, hi: 0x89}, - {value: 0x3308, lo: 0x8a, hi: 0x8c}, + {value: 0x1308, lo: 0x8a, hi: 0x8c}, {value: 0x0018, lo: 0x8d, hi: 0x8d}, {value: 0x0040, lo: 0x8e, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x9a}, @@ -3903,21 +3895,21 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xa0, hi: 0xa0}, {value: 0x0018, lo: 0xa1, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xbf}, - // Block 0xb2, offset 0x548 + // Block 0xb2, offset 0x561 {value: 0x0000, lo: 0x0c}, {value: 0x0008, lo: 0x80, hi: 0x91}, {value: 0x0040, lo: 0x92, hi: 0x92}, {value: 0x0008, lo: 0x93, hi: 0xab}, - {value: 0x3008, lo: 0xac, hi: 0xae}, - {value: 0x3308, lo: 0xaf, hi: 0xb1}, - {value: 0x3008, lo: 0xb2, hi: 0xb3}, - {value: 0x3308, lo: 0xb4, hi: 0xb4}, - {value: 0x3808, lo: 0xb5, hi: 0xb5}, - {value: 0x3308, lo: 0xb6, hi: 0xb7}, + {value: 0x1008, lo: 0xac, hi: 0xae}, + {value: 0x1308, lo: 0xaf, hi: 0xb1}, + {value: 0x1008, lo: 0xb2, hi: 0xb3}, + {value: 0x1308, lo: 0xb4, hi: 0xb4}, + {value: 0x1808, lo: 0xb5, hi: 0xb5}, + {value: 0x1308, lo: 0xb6, hi: 0xb7}, {value: 0x0018, lo: 0xb8, hi: 0xbd}, - {value: 0x3308, lo: 0xbe, hi: 0xbe}, + {value: 0x1308, lo: 0xbe, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0xb3, offset 0x555 + // Block 0xb3, offset 0x56e {value: 0x0000, lo: 0x0c}, {value: 0x0008, lo: 0x80, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x87}, @@ -3931,28 +3923,28 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0018, lo: 0xa9, hi: 0xa9}, {value: 0x0040, lo: 0xaa, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0xb4, offset 0x562 + // Block 0xb4, offset 0x57b {value: 0x0000, lo: 0x08}, {value: 0x0008, lo: 0x80, hi: 0x9e}, - {value: 0x3308, lo: 0x9f, hi: 0x9f}, - {value: 0x3008, lo: 0xa0, hi: 0xa2}, - {value: 0x3308, lo: 0xa3, hi: 0xa9}, - {value: 0x3b08, lo: 0xaa, hi: 0xaa}, + {value: 0x1308, lo: 0x9f, hi: 0x9f}, + {value: 0x1008, lo: 0xa0, hi: 0xa2}, + {value: 0x1308, lo: 0xa3, hi: 0xa9}, + {value: 0x1b08, lo: 0xaa, hi: 0xaa}, {value: 0x0040, lo: 0xab, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xb9}, {value: 0x0040, lo: 0xba, hi: 0xbf}, - // Block 0xb5, offset 0x56b + // Block 0xb5, offset 0x584 {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0xb4}, - {value: 0x3008, lo: 0xb5, hi: 0xb7}, - {value: 0x3308, lo: 0xb8, hi: 0xbf}, - // Block 0xb6, offset 0x56f + {value: 0x1008, lo: 0xb5, hi: 0xb7}, + {value: 0x1308, lo: 0xb8, hi: 0xbf}, + // Block 0xb6, offset 0x588 {value: 0x0000, lo: 0x0d}, - {value: 0x3008, lo: 0x80, hi: 0x81}, - {value: 0x3b08, lo: 0x82, hi: 0x82}, - {value: 0x3308, lo: 0x83, hi: 0x84}, - {value: 0x3008, lo: 0x85, hi: 0x85}, - {value: 0x3308, lo: 0x86, hi: 0x86}, + {value: 0x1008, lo: 0x80, hi: 0x81}, + {value: 0x1b08, lo: 0x82, hi: 0x82}, + {value: 0x1308, lo: 0x83, hi: 0x84}, + {value: 0x1008, lo: 0x85, hi: 0x85}, + {value: 0x1308, lo: 0x86, hi: 0x86}, {value: 0x0008, lo: 0x87, hi: 0x8a}, {value: 0x0018, lo: 0x8b, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, @@ -3961,56 +3953,56 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0x9c, hi: 0x9c}, {value: 0x0018, lo: 0x9d, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0xbf}, - // Block 0xb7, offset 0x57d + // Block 0xb7, offset 0x596 {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0xaf}, - {value: 0x3008, lo: 0xb0, hi: 0xb2}, - {value: 0x3308, lo: 0xb3, hi: 0xb8}, - {value: 0x3008, lo: 0xb9, hi: 0xb9}, - {value: 0x3308, lo: 0xba, hi: 0xba}, - {value: 0x3008, lo: 0xbb, hi: 0xbe}, - {value: 0x3308, lo: 0xbf, hi: 0xbf}, - // Block 0xb8, offset 0x585 + {value: 0x1008, lo: 0xb0, hi: 0xb2}, + {value: 0x1308, lo: 0xb3, hi: 0xb8}, + {value: 0x1008, lo: 0xb9, hi: 0xb9}, + {value: 0x1308, lo: 0xba, hi: 0xba}, + {value: 0x1008, lo: 0xbb, hi: 0xbe}, + {value: 0x1308, lo: 0xbf, hi: 0xbf}, + // Block 0xb8, offset 0x59e {value: 0x0000, lo: 0x0a}, - {value: 0x3308, lo: 0x80, hi: 0x80}, - {value: 0x3008, lo: 0x81, hi: 0x81}, - {value: 0x3b08, lo: 0x82, hi: 0x82}, - {value: 0x3308, lo: 0x83, hi: 0x83}, + {value: 0x1308, lo: 0x80, hi: 0x80}, + {value: 0x1008, lo: 0x81, hi: 0x81}, + {value: 0x1b08, lo: 0x82, hi: 0x82}, + {value: 0x1308, lo: 0x83, hi: 0x83}, {value: 0x0008, lo: 0x84, hi: 0x85}, {value: 0x0018, lo: 0x86, hi: 0x86}, {value: 0x0008, lo: 0x87, hi: 0x87}, {value: 0x0040, lo: 0x88, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0xbf}, - // Block 0xb9, offset 0x590 + // Block 0xb9, offset 0x5a9 {value: 0x0000, lo: 0x08}, {value: 0x0008, lo: 0x80, hi: 0xae}, - {value: 0x3008, lo: 0xaf, hi: 0xb1}, - {value: 0x3308, lo: 0xb2, hi: 0xb5}, + {value: 0x1008, lo: 0xaf, hi: 0xb1}, + {value: 0x1308, lo: 0xb2, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xb7}, - {value: 0x3008, lo: 0xb8, hi: 0xbb}, - {value: 0x3308, lo: 0xbc, hi: 0xbd}, - {value: 0x3008, lo: 0xbe, hi: 0xbe}, - {value: 0x3b08, lo: 0xbf, hi: 0xbf}, - // Block 0xba, offset 0x599 + {value: 0x1008, lo: 0xb8, hi: 0xbb}, + {value: 0x1308, lo: 0xbc, hi: 0xbd}, + {value: 0x1008, lo: 0xbe, hi: 0xbe}, + {value: 0x1b08, lo: 0xbf, hi: 0xbf}, + // Block 0xba, offset 0x5b2 {value: 0x0000, lo: 0x05}, - {value: 0x3308, lo: 0x80, hi: 0x80}, + {value: 0x1308, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0x97}, {value: 0x0008, lo: 0x98, hi: 0x9b}, - {value: 0x3308, lo: 0x9c, hi: 0x9d}, + {value: 0x1308, lo: 0x9c, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0xbf}, - // Block 0xbb, offset 0x59f + // Block 0xbb, offset 0x5b8 {value: 0x0000, lo: 0x07}, {value: 0x0008, lo: 0x80, hi: 0xaf}, - {value: 0x3008, lo: 0xb0, hi: 0xb2}, - {value: 0x3308, lo: 0xb3, hi: 0xba}, - {value: 0x3008, lo: 0xbb, hi: 0xbc}, - {value: 0x3308, lo: 0xbd, hi: 0xbd}, - {value: 0x3008, lo: 0xbe, hi: 0xbe}, - {value: 0x3b08, lo: 0xbf, hi: 0xbf}, - // Block 0xbc, offset 0x5a7 + {value: 0x1008, lo: 0xb0, hi: 0xb2}, + {value: 0x1308, lo: 0xb3, hi: 0xba}, + {value: 0x1008, lo: 0xbb, hi: 0xbc}, + {value: 0x1308, lo: 0xbd, hi: 0xbd}, + {value: 0x1008, lo: 0xbe, hi: 0xbe}, + {value: 0x1b08, lo: 0xbf, hi: 0xbf}, + // Block 0xbc, offset 0x5c0 {value: 0x0000, lo: 0x08}, - {value: 0x3308, lo: 0x80, hi: 0x80}, + {value: 0x1308, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0x83}, {value: 0x0008, lo: 0x84, hi: 0x84}, {value: 0x0040, lo: 0x85, hi: 0x8f}, @@ -4018,97 +4010,60 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0x9a, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xac}, {value: 0x0040, lo: 0xad, hi: 0xbf}, - // Block 0xbd, offset 0x5b0 + // Block 0xbd, offset 0x5c9 {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0xaa}, - {value: 0x3308, lo: 0xab, hi: 0xab}, - {value: 0x3008, lo: 0xac, hi: 0xac}, - {value: 0x3308, lo: 0xad, hi: 0xad}, - {value: 0x3008, lo: 0xae, hi: 0xaf}, - {value: 0x3308, lo: 0xb0, hi: 0xb5}, - {value: 0x3808, lo: 0xb6, hi: 0xb6}, - {value: 0x3308, lo: 0xb7, hi: 0xb7}, + {value: 0x1308, lo: 0xab, hi: 0xab}, + {value: 0x1008, lo: 0xac, hi: 0xac}, + {value: 0x1308, lo: 0xad, hi: 0xad}, + {value: 0x1008, lo: 0xae, hi: 0xaf}, + {value: 0x1308, lo: 0xb0, hi: 0xb5}, + {value: 0x1808, lo: 0xb6, hi: 0xb6}, + {value: 0x1308, lo: 0xb7, hi: 0xb7}, {value: 0x0040, lo: 0xb8, hi: 0xbf}, - // Block 0xbe, offset 0x5ba + // Block 0xbe, offset 0x5d3 {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0x89}, {value: 0x0040, lo: 0x8a, hi: 0xbf}, - // Block 0xbf, offset 0x5bd + // Block 0xbf, offset 0x5d6 {value: 0x0000, lo: 0x0b}, {value: 0x0008, lo: 0x80, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9c}, - {value: 0x3308, lo: 0x9d, hi: 0x9f}, - {value: 0x3008, lo: 0xa0, hi: 0xa1}, - {value: 0x3308, lo: 0xa2, hi: 0xa5}, - {value: 0x3008, lo: 0xa6, hi: 0xa6}, - {value: 0x3308, lo: 0xa7, hi: 0xaa}, - {value: 0x3b08, lo: 0xab, hi: 0xab}, + {value: 0x1308, lo: 0x9d, hi: 0x9f}, + {value: 0x1008, lo: 0xa0, hi: 0xa1}, + {value: 0x1308, lo: 0xa2, hi: 0xa5}, + {value: 0x1008, lo: 0xa6, hi: 0xa6}, + {value: 0x1308, lo: 0xa7, hi: 0xaa}, + {value: 0x1b08, lo: 0xab, hi: 0xab}, {value: 0x0040, lo: 0xac, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xb9}, {value: 0x0018, lo: 0xba, hi: 0xbf}, - // Block 0xc0, offset 0x5c9 + // Block 0xc0, offset 0x5e2 {value: 0x0000, lo: 0x02}, {value: 0x0040, lo: 0x80, hi: 0x9f}, {value: 0x049d, lo: 0xa0, hi: 0xbf}, - // Block 0xc1, offset 0x5cc + // Block 0xc1, offset 0x5e5 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0xa9}, {value: 0x0018, lo: 0xaa, hi: 0xb2}, {value: 0x0040, lo: 0xb3, hi: 0xbe}, {value: 0x0008, lo: 0xbf, hi: 0xbf}, - // Block 0xc2, offset 0x5d1 - {value: 0x0000, lo: 0x0c}, - {value: 0x0008, lo: 0x80, hi: 0x80}, - {value: 0x3308, lo: 0x81, hi: 0x86}, - {value: 0x3008, lo: 0x87, hi: 0x88}, - {value: 0x3308, lo: 0x89, hi: 0x8a}, - {value: 0x0008, lo: 0x8b, hi: 0xb2}, - {value: 0x3308, lo: 0xb3, hi: 0xb3}, - {value: 0x3b08, lo: 0xb4, hi: 0xb4}, - {value: 0x3308, lo: 0xb5, hi: 0xb8}, - {value: 0x3008, lo: 0xb9, hi: 0xb9}, - {value: 0x0008, lo: 0xba, hi: 0xba}, - {value: 0x3308, lo: 0xbb, hi: 0xbe}, - {value: 0x0018, lo: 0xbf, hi: 0xbf}, - // Block 0xc3, offset 0x5de - {value: 0x0000, lo: 0x08}, - {value: 0x0018, lo: 0x80, hi: 0x86}, - {value: 0x3b08, lo: 0x87, hi: 0x87}, - {value: 0x0040, lo: 0x88, hi: 0x8f}, - {value: 0x0008, lo: 0x90, hi: 0x90}, - {value: 0x3308, lo: 0x91, hi: 0x96}, - {value: 0x3008, lo: 0x97, hi: 0x98}, - {value: 0x3308, lo: 0x99, hi: 0x9b}, - {value: 0x0008, lo: 0x9c, hi: 0xbf}, - // Block 0xc4, offset 0x5e7 - {value: 0x0000, lo: 0x0b}, - {value: 0x0008, lo: 0x80, hi: 0x83}, - {value: 0x0040, lo: 0x84, hi: 0x85}, - {value: 0x0008, lo: 0x86, hi: 0x89}, - {value: 0x3308, lo: 0x8a, hi: 0x96}, - {value: 0x3008, lo: 0x97, hi: 0x97}, - {value: 0x3308, lo: 0x98, hi: 0x98}, - {value: 0x3b08, lo: 0x99, hi: 0x99}, - {value: 0x0018, lo: 0x9a, hi: 0x9c}, - {value: 0x0040, lo: 0x9d, hi: 0x9d}, - {value: 0x0018, lo: 0x9e, hi: 0xa2}, - {value: 0x0040, lo: 0xa3, hi: 0xbf}, - // Block 0xc5, offset 0x5f3 + // Block 0xc2, offset 0x5ea {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xb8}, {value: 0x0040, lo: 0xb9, hi: 0xbf}, - // Block 0xc6, offset 0x5f6 + // Block 0xc3, offset 0x5ed {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0x89}, {value: 0x0008, lo: 0x8a, hi: 0xae}, - {value: 0x3008, lo: 0xaf, hi: 0xaf}, - {value: 0x3308, lo: 0xb0, hi: 0xb6}, + {value: 0x1008, lo: 0xaf, hi: 0xaf}, + {value: 0x1308, lo: 0xb0, hi: 0xb6}, {value: 0x0040, lo: 0xb7, hi: 0xb7}, - {value: 0x3308, lo: 0xb8, hi: 0xbd}, - {value: 0x3008, lo: 0xbe, hi: 0xbe}, - {value: 0x3b08, lo: 0xbf, hi: 0xbf}, - // Block 0xc7, offset 0x600 + {value: 0x1308, lo: 0xb8, hi: 0xbd}, + {value: 0x1008, lo: 0xbe, hi: 0xbe}, + {value: 0x1b08, lo: 0xbf, hi: 0xbf}, + // Block 0xc4, offset 0x5f7 {value: 0x0000, lo: 0x08}, {value: 0x0008, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0x85}, @@ -4118,65 +4073,42 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xad, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xb1}, {value: 0x0008, lo: 0xb2, hi: 0xbf}, - // Block 0xc8, offset 0x609 + // Block 0xc5, offset 0x600 {value: 0x0000, lo: 0x0b}, {value: 0x0008, lo: 0x80, hi: 0x8f}, {value: 0x0040, lo: 0x90, hi: 0x91}, - {value: 0x3308, lo: 0x92, hi: 0xa7}, + {value: 0x1308, lo: 0x92, hi: 0xa7}, {value: 0x0040, lo: 0xa8, hi: 0xa8}, - {value: 0x3008, lo: 0xa9, hi: 0xa9}, - {value: 0x3308, lo: 0xaa, hi: 0xb0}, - {value: 0x3008, lo: 0xb1, hi: 0xb1}, - {value: 0x3308, lo: 0xb2, hi: 0xb3}, - {value: 0x3008, lo: 0xb4, hi: 0xb4}, - {value: 0x3308, lo: 0xb5, hi: 0xb6}, + {value: 0x1008, lo: 0xa9, hi: 0xa9}, + {value: 0x1308, lo: 0xaa, hi: 0xb0}, + {value: 0x1008, lo: 0xb1, hi: 0xb1}, + {value: 0x1308, lo: 0xb2, hi: 0xb3}, + {value: 0x1008, lo: 0xb4, hi: 0xb4}, + {value: 0x1308, lo: 0xb5, hi: 0xb6}, {value: 0x0040, lo: 0xb7, hi: 0xbf}, - // Block 0xc9, offset 0x615 - {value: 0x0000, lo: 0x0c}, - {value: 0x0008, lo: 0x80, hi: 0x86}, - {value: 0x0040, lo: 0x87, hi: 0x87}, - {value: 0x0008, lo: 0x88, hi: 0x89}, - {value: 0x0040, lo: 0x8a, hi: 0x8a}, - {value: 0x0008, lo: 0x8b, hi: 0xb0}, - {value: 0x3308, lo: 0xb1, hi: 0xb6}, - {value: 0x0040, lo: 0xb7, hi: 0xb9}, - {value: 0x3308, lo: 0xba, hi: 0xba}, - {value: 0x0040, lo: 0xbb, hi: 0xbb}, - {value: 0x3308, lo: 0xbc, hi: 0xbd}, - {value: 0x0040, lo: 0xbe, hi: 0xbe}, - {value: 0x3308, lo: 0xbf, hi: 0xbf}, - // Block 0xca, offset 0x622 - {value: 0x0000, lo: 0x07}, - {value: 0x3308, lo: 0x80, hi: 0x83}, - {value: 0x3b08, lo: 0x84, hi: 0x85}, - {value: 0x0008, lo: 0x86, hi: 0x86}, - {value: 0x3308, lo: 0x87, hi: 0x87}, - {value: 0x0040, lo: 0x88, hi: 0x8f}, - {value: 0x0008, lo: 0x90, hi: 0x99}, - {value: 0x0040, lo: 0x9a, hi: 0xbf}, - // Block 0xcb, offset 0x62a + // Block 0xc6, offset 0x60c {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0xbf}, - // Block 0xcc, offset 0x62d + // Block 0xc7, offset 0x60f {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0xae}, {value: 0x0040, lo: 0xaf, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xbf}, - // Block 0xcd, offset 0x632 + // Block 0xc8, offset 0x614 {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0x83}, {value: 0x0040, lo: 0x84, hi: 0xbf}, - // Block 0xce, offset 0x635 + // Block 0xc9, offset 0x617 {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xae}, {value: 0x0040, lo: 0xaf, hi: 0xbf}, - // Block 0xcf, offset 0x638 + // Block 0xca, offset 0x61a {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0xbf}, - // Block 0xd0, offset 0x63b + // Block 0xcb, offset 0x61d {value: 0x0000, lo: 0x06}, {value: 0x0008, lo: 0x80, hi: 0x9e}, {value: 0x0040, lo: 0x9f, hi: 0x9f}, @@ -4184,20 +4116,20 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0xaa, hi: 0xad}, {value: 0x0018, lo: 0xae, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xbf}, - // Block 0xd1, offset 0x642 + // Block 0xcc, offset 0x624 {value: 0x0000, lo: 0x06}, {value: 0x0040, lo: 0x80, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0xad}, {value: 0x0040, lo: 0xae, hi: 0xaf}, - {value: 0x3308, lo: 0xb0, hi: 0xb4}, + {value: 0x1308, lo: 0xb0, hi: 0xb4}, {value: 0x0018, lo: 0xb5, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xbf}, - // Block 0xd2, offset 0x649 + // Block 0xcd, offset 0x62b {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0xaf}, - {value: 0x3308, lo: 0xb0, hi: 0xb6}, + {value: 0x1308, lo: 0xb0, hi: 0xb6}, {value: 0x0018, lo: 0xb7, hi: 0xbf}, - // Block 0xd3, offset 0x64d + // Block 0xce, offset 0x62f {value: 0x0000, lo: 0x0a}, {value: 0x0008, lo: 0x80, hi: 0x83}, {value: 0x0018, lo: 0x84, hi: 0x85}, @@ -4209,75 +4141,67 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0008, lo: 0xa3, hi: 0xb7}, {value: 0x0040, lo: 0xb8, hi: 0xbc}, {value: 0x0008, lo: 0xbd, hi: 0xbf}, - // Block 0xd4, offset 0x658 + // Block 0xcf, offset 0x63a {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0x8f}, {value: 0x0040, lo: 0x90, hi: 0xbf}, - // Block 0xd5, offset 0x65b + // Block 0xd0, offset 0x63d {value: 0x0000, lo: 0x05}, {value: 0x0008, lo: 0x80, hi: 0x84}, {value: 0x0040, lo: 0x85, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x90}, - {value: 0x3008, lo: 0x91, hi: 0xbe}, + {value: 0x1008, lo: 0x91, hi: 0xbe}, {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0xd6, offset 0x661 + // Block 0xd1, offset 0x643 {value: 0x0000, lo: 0x04}, {value: 0x0040, lo: 0x80, hi: 0x8e}, - {value: 0x3308, lo: 0x8f, hi: 0x92}, + {value: 0x1308, lo: 0x8f, hi: 0x92}, {value: 0x0008, lo: 0x93, hi: 0x9f}, {value: 0x0040, lo: 0xa0, hi: 0xbf}, - // Block 0xd7, offset 0x666 + // Block 0xd2, offset 0x648 {value: 0x0000, lo: 0x03}, {value: 0x0040, lo: 0x80, hi: 0x9f}, - {value: 0x0008, lo: 0xa0, hi: 0xa1}, - {value: 0x0040, lo: 0xa2, hi: 0xbf}, - // Block 0xd8, offset 0x66a + {value: 0x0008, lo: 0xa0, hi: 0xa0}, + {value: 0x0040, lo: 0xa1, hi: 0xbf}, + // Block 0xd3, offset 0x64c {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xac}, {value: 0x0040, lo: 0xad, hi: 0xbf}, - // Block 0xd9, offset 0x66d + // Block 0xd4, offset 0x64f {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xb2}, {value: 0x0040, lo: 0xb3, hi: 0xbf}, - // Block 0xda, offset 0x670 - {value: 0x0000, lo: 0x02}, - {value: 0x0008, lo: 0x80, hi: 0x9e}, - {value: 0x0040, lo: 0x9f, hi: 0xbf}, - // Block 0xdb, offset 0x673 + // Block 0xd5, offset 0x652 {value: 0x0000, lo: 0x02}, - {value: 0x0040, lo: 0x80, hi: 0xaf}, - {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0xdc, offset 0x676 - {value: 0x0000, lo: 0x02}, - {value: 0x0008, lo: 0x80, hi: 0xbb}, - {value: 0x0040, lo: 0xbc, hi: 0xbf}, - // Block 0xdd, offset 0x679 + {value: 0x0008, lo: 0x80, hi: 0x81}, + {value: 0x0040, lo: 0x82, hi: 0xbf}, + // Block 0xd6, offset 0x655 {value: 0x0000, lo: 0x04}, {value: 0x0008, lo: 0x80, hi: 0xaa}, {value: 0x0040, lo: 0xab, hi: 0xaf}, {value: 0x0008, lo: 0xb0, hi: 0xbc}, {value: 0x0040, lo: 0xbd, hi: 0xbf}, - // Block 0xde, offset 0x67e + // Block 0xd7, offset 0x65a {value: 0x0000, lo: 0x09}, {value: 0x0008, lo: 0x80, hi: 0x88}, {value: 0x0040, lo: 0x89, hi: 0x8f}, {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9b}, {value: 0x0018, lo: 0x9c, hi: 0x9c}, - {value: 0x3308, lo: 0x9d, hi: 0x9e}, + {value: 0x1308, lo: 0x9d, hi: 0x9e}, {value: 0x0018, lo: 0x9f, hi: 0x9f}, {value: 0x03c0, lo: 0xa0, hi: 0xa3}, {value: 0x0040, lo: 0xa4, hi: 0xbf}, - // Block 0xdf, offset 0x688 + // Block 0xd8, offset 0x664 {value: 0x0000, lo: 0x02}, {value: 0x0018, lo: 0x80, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xbf}, - // Block 0xe0, offset 0x68b + // Block 0xd9, offset 0x667 {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0xa6}, {value: 0x0040, lo: 0xa7, hi: 0xa8}, {value: 0x0018, lo: 0xa9, hi: 0xbf}, - // Block 0xe1, offset 0x68f + // Block 0xda, offset 0x66b {value: 0x0000, lo: 0x0e}, {value: 0x0018, lo: 0x80, hi: 0x9d}, {value: 0xb5b9, lo: 0x9e, hi: 0x9e}, @@ -4287,127 +4211,127 @@ var idnaSparseValues = [1915]valueRange{ {value: 0xb719, lo: 0xa2, hi: 0xa2}, {value: 0xb781, lo: 0xa3, hi: 0xa3}, {value: 0xb7e9, lo: 0xa4, hi: 0xa4}, - {value: 0x3018, lo: 0xa5, hi: 0xa6}, - {value: 0x3318, lo: 0xa7, hi: 0xa9}, + {value: 0x1018, lo: 0xa5, hi: 0xa6}, + {value: 0x1318, lo: 0xa7, hi: 0xa9}, {value: 0x0018, lo: 0xaa, hi: 0xac}, - {value: 0x3018, lo: 0xad, hi: 0xb2}, + {value: 0x1018, lo: 0xad, hi: 0xb2}, {value: 0x0340, lo: 0xb3, hi: 0xba}, - {value: 0x3318, lo: 0xbb, hi: 0xbf}, - // Block 0xe2, offset 0x69e + {value: 0x1318, lo: 0xbb, hi: 0xbf}, + // Block 0xdb, offset 0x67a {value: 0x0000, lo: 0x0b}, - {value: 0x3318, lo: 0x80, hi: 0x82}, + {value: 0x1318, lo: 0x80, hi: 0x82}, {value: 0x0018, lo: 0x83, hi: 0x84}, - {value: 0x3318, lo: 0x85, hi: 0x8b}, + {value: 0x1318, lo: 0x85, hi: 0x8b}, {value: 0x0018, lo: 0x8c, hi: 0xa9}, - {value: 0x3318, lo: 0xaa, hi: 0xad}, + {value: 0x1318, lo: 0xaa, hi: 0xad}, {value: 0x0018, lo: 0xae, hi: 0xba}, {value: 0xb851, lo: 0xbb, hi: 0xbb}, {value: 0xb899, lo: 0xbc, hi: 0xbc}, {value: 0xb8e1, lo: 0xbd, hi: 0xbd}, {value: 0xb949, lo: 0xbe, hi: 0xbe}, {value: 0xb9b1, lo: 0xbf, hi: 0xbf}, - // Block 0xe3, offset 0x6aa + // Block 0xdc, offset 0x686 {value: 0x0000, lo: 0x03}, {value: 0xba19, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0xa8}, {value: 0x0040, lo: 0xa9, hi: 0xbf}, - // Block 0xe4, offset 0x6ae + // Block 0xdd, offset 0x68a {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x81}, - {value: 0x3318, lo: 0x82, hi: 0x84}, + {value: 0x1318, lo: 0x82, hi: 0x84}, {value: 0x0018, lo: 0x85, hi: 0x85}, {value: 0x0040, lo: 0x86, hi: 0xbf}, - // Block 0xe5, offset 0x6b3 + // Block 0xde, offset 0x68f {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xb1}, {value: 0x0040, lo: 0xb2, hi: 0xbf}, - // Block 0xe6, offset 0x6b8 + // Block 0xdf, offset 0x694 {value: 0x0000, lo: 0x03}, - {value: 0x3308, lo: 0x80, hi: 0xb6}, + {value: 0x1308, lo: 0x80, hi: 0xb6}, {value: 0x0018, lo: 0xb7, hi: 0xba}, - {value: 0x3308, lo: 0xbb, hi: 0xbf}, - // Block 0xe7, offset 0x6bc + {value: 0x1308, lo: 0xbb, hi: 0xbf}, + // Block 0xe0, offset 0x698 {value: 0x0000, lo: 0x04}, - {value: 0x3308, lo: 0x80, hi: 0xac}, + {value: 0x1308, lo: 0x80, hi: 0xac}, {value: 0x0018, lo: 0xad, hi: 0xb4}, - {value: 0x3308, lo: 0xb5, hi: 0xb5}, + {value: 0x1308, lo: 0xb5, hi: 0xb5}, {value: 0x0018, lo: 0xb6, hi: 0xbf}, - // Block 0xe8, offset 0x6c1 + // Block 0xe1, offset 0x69d {value: 0x0000, lo: 0x08}, {value: 0x0018, lo: 0x80, hi: 0x83}, - {value: 0x3308, lo: 0x84, hi: 0x84}, + {value: 0x1308, lo: 0x84, hi: 0x84}, {value: 0x0018, lo: 0x85, hi: 0x8b}, {value: 0x0040, lo: 0x8c, hi: 0x9a}, - {value: 0x3308, lo: 0x9b, hi: 0x9f}, + {value: 0x1308, lo: 0x9b, hi: 0x9f}, {value: 0x0040, lo: 0xa0, hi: 0xa0}, - {value: 0x3308, lo: 0xa1, hi: 0xaf}, + {value: 0x1308, lo: 0xa1, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xbf}, - // Block 0xe9, offset 0x6ca + // Block 0xe2, offset 0x6a6 {value: 0x0000, lo: 0x0a}, - {value: 0x3308, lo: 0x80, hi: 0x86}, + {value: 0x1308, lo: 0x80, hi: 0x86}, {value: 0x0040, lo: 0x87, hi: 0x87}, - {value: 0x3308, lo: 0x88, hi: 0x98}, + {value: 0x1308, lo: 0x88, hi: 0x98}, {value: 0x0040, lo: 0x99, hi: 0x9a}, - {value: 0x3308, lo: 0x9b, hi: 0xa1}, + {value: 0x1308, lo: 0x9b, hi: 0xa1}, {value: 0x0040, lo: 0xa2, hi: 0xa2}, - {value: 0x3308, lo: 0xa3, hi: 0xa4}, + {value: 0x1308, lo: 0xa3, hi: 0xa4}, {value: 0x0040, lo: 0xa5, hi: 0xa5}, - {value: 0x3308, lo: 0xa6, hi: 0xaa}, + {value: 0x1308, lo: 0xa6, hi: 0xaa}, {value: 0x0040, lo: 0xab, hi: 0xbf}, - // Block 0xea, offset 0x6d5 + // Block 0xe3, offset 0x6b1 {value: 0x0000, lo: 0x05}, - {value: 0x0808, lo: 0x80, hi: 0x84}, + {value: 0x0008, lo: 0x80, hi: 0x84}, {value: 0x0040, lo: 0x85, hi: 0x86}, - {value: 0x0818, lo: 0x87, hi: 0x8f}, - {value: 0x3308, lo: 0x90, hi: 0x96}, + {value: 0x0018, lo: 0x87, hi: 0x8f}, + {value: 0x1308, lo: 0x90, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0xbf}, - // Block 0xeb, offset 0x6db + // Block 0xe4, offset 0x6b7 {value: 0x0000, lo: 0x07}, - {value: 0x0a08, lo: 0x80, hi: 0x83}, - {value: 0x3308, lo: 0x84, hi: 0x8a}, + {value: 0x0208, lo: 0x80, hi: 0x83}, + {value: 0x1308, lo: 0x84, hi: 0x8a}, {value: 0x0040, lo: 0x8b, hi: 0x8f}, - {value: 0x0808, lo: 0x90, hi: 0x99}, + {value: 0x0008, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9d}, - {value: 0x0818, lo: 0x9e, hi: 0x9f}, + {value: 0x0018, lo: 0x9e, hi: 0x9f}, {value: 0x0040, lo: 0xa0, hi: 0xbf}, - // Block 0xec, offset 0x6e3 + // Block 0xe5, offset 0x6bf {value: 0x0000, lo: 0x03}, {value: 0x0040, lo: 0x80, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xb1}, {value: 0x0040, lo: 0xb2, hi: 0xbf}, - // Block 0xed, offset 0x6e7 + // Block 0xe6, offset 0x6c3 {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0xab}, {value: 0x0040, lo: 0xac, hi: 0xaf}, {value: 0x0018, lo: 0xb0, hi: 0xbf}, - // Block 0xee, offset 0x6eb + // Block 0xe7, offset 0x6c7 {value: 0x0000, lo: 0x05}, {value: 0x0018, lo: 0x80, hi: 0x93}, {value: 0x0040, lo: 0x94, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xae}, {value: 0x0040, lo: 0xaf, hi: 0xb0}, {value: 0x0018, lo: 0xb1, hi: 0xbf}, - // Block 0xef, offset 0x6f1 + // Block 0xe8, offset 0x6cd {value: 0x0000, lo: 0x05}, {value: 0x0040, lo: 0x80, hi: 0x80}, {value: 0x0018, lo: 0x81, hi: 0x8f}, {value: 0x0040, lo: 0x90, hi: 0x90}, {value: 0x0018, lo: 0x91, hi: 0xb5}, {value: 0x0040, lo: 0xb6, hi: 0xbf}, - // Block 0xf0, offset 0x6f7 + // Block 0xe9, offset 0x6d3 {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x8f}, {value: 0xc1c1, lo: 0x90, hi: 0x90}, {value: 0x0018, lo: 0x91, hi: 0xac}, {value: 0x0040, lo: 0xad, hi: 0xbf}, - // Block 0xf1, offset 0x6fc + // Block 0xea, offset 0x6d8 {value: 0x0000, lo: 0x02}, {value: 0x0040, lo: 0x80, hi: 0xa5}, {value: 0x0018, lo: 0xa6, hi: 0xbf}, - // Block 0xf2, offset 0x6ff - {value: 0x0000, lo: 0x0f}, + // Block 0xeb, offset 0x6db + {value: 0x0000, lo: 0x0d}, {value: 0xc7e9, lo: 0x80, hi: 0x80}, {value: 0xc839, lo: 0x81, hi: 0x81}, {value: 0xc889, lo: 0x82, hi: 0x82}, @@ -4420,88 +4344,84 @@ var idnaSparseValues = [1915]valueRange{ {value: 0x0040, lo: 0x89, hi: 0x8f}, {value: 0xcab9, lo: 0x90, hi: 0x90}, {value: 0xcad9, lo: 0x91, hi: 0x91}, - {value: 0x0040, lo: 0x92, hi: 0x9f}, - {value: 0x0018, lo: 0xa0, hi: 0xa5}, - {value: 0x0040, lo: 0xa6, hi: 0xbf}, - // Block 0xf3, offset 0x70f + {value: 0x0040, lo: 0x92, hi: 0xbf}, + // Block 0xec, offset 0x6e9 {value: 0x0000, lo: 0x06}, - {value: 0x0018, lo: 0x80, hi: 0x94}, - {value: 0x0040, lo: 0x95, hi: 0x9f}, + {value: 0x0018, lo: 0x80, hi: 0x92}, + {value: 0x0040, lo: 0x93, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xac}, {value: 0x0040, lo: 0xad, hi: 0xaf}, - {value: 0x0018, lo: 0xb0, hi: 0xb8}, - {value: 0x0040, lo: 0xb9, hi: 0xbf}, - // Block 0xf4, offset 0x716 + {value: 0x0018, lo: 0xb0, hi: 0xb6}, + {value: 0x0040, lo: 0xb7, hi: 0xbf}, + // Block 0xed, offset 0x6f0 {value: 0x0000, lo: 0x02}, {value: 0x0018, lo: 0x80, hi: 0xb3}, {value: 0x0040, lo: 0xb4, hi: 0xbf}, - // Block 0xf5, offset 0x719 + // Block 0xee, offset 0x6f3 {value: 0x0000, lo: 0x02}, {value: 0x0018, lo: 0x80, hi: 0x94}, {value: 0x0040, lo: 0x95, hi: 0xbf}, - // Block 0xf6, offset 0x71c + // Block 0xef, offset 0x6f6 {value: 0x0000, lo: 0x03}, {value: 0x0018, lo: 0x80, hi: 0x8b}, {value: 0x0040, lo: 0x8c, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0xbf}, - // Block 0xf7, offset 0x720 + // Block 0xf0, offset 0x6fa {value: 0x0000, lo: 0x05}, {value: 0x0018, lo: 0x80, hi: 0x87}, {value: 0x0040, lo: 0x88, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0x99}, {value: 0x0040, lo: 0x9a, hi: 0x9f}, {value: 0x0018, lo: 0xa0, hi: 0xbf}, - // Block 0xf8, offset 0x726 + // Block 0xf1, offset 0x700 {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x87}, {value: 0x0040, lo: 0x88, hi: 0x8f}, {value: 0x0018, lo: 0x90, hi: 0xad}, {value: 0x0040, lo: 0xae, hi: 0xbf}, - // Block 0xf9, offset 0x72b + // Block 0xf2, offset 0x705 + {value: 0x0000, lo: 0x09}, + {value: 0x0040, lo: 0x80, hi: 0x8f}, + {value: 0x0018, lo: 0x90, hi: 0x9e}, + {value: 0x0040, lo: 0x9f, hi: 0x9f}, + {value: 0x0018, lo: 0xa0, hi: 0xa7}, + {value: 0x0040, lo: 0xa8, hi: 0xaf}, + {value: 0x0018, lo: 0xb0, hi: 0xb0}, + {value: 0x0040, lo: 0xb1, hi: 0xb2}, + {value: 0x0018, lo: 0xb3, hi: 0xbe}, + {value: 0x0040, lo: 0xbf, hi: 0xbf}, + // Block 0xf3, offset 0x70f {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x8b}, {value: 0x0040, lo: 0x8c, hi: 0x8f}, - {value: 0x0018, lo: 0x90, hi: 0xbe}, - {value: 0x0040, lo: 0xbf, hi: 0xbf}, - // Block 0xfa, offset 0x730 - {value: 0x0000, lo: 0x04}, - {value: 0x0018, lo: 0x80, hi: 0x8c}, - {value: 0x0040, lo: 0x8d, hi: 0x8f}, - {value: 0x0018, lo: 0x90, hi: 0xab}, - {value: 0x0040, lo: 0xac, hi: 0xbf}, - // Block 0xfb, offset 0x735 + {value: 0x0018, lo: 0x90, hi: 0x9e}, + {value: 0x0040, lo: 0x9f, hi: 0xbf}, + // Block 0xf4, offset 0x714 + {value: 0x0000, lo: 0x02}, + {value: 0x0018, lo: 0x80, hi: 0x91}, + {value: 0x0040, lo: 0x92, hi: 0xbf}, + // Block 0xf5, offset 0x717 {value: 0x0000, lo: 0x02}, - {value: 0x0018, lo: 0x80, hi: 0x97}, - {value: 0x0040, lo: 0x98, hi: 0xbf}, - // Block 0xfc, offset 0x738 - {value: 0x0000, lo: 0x04}, {value: 0x0018, lo: 0x80, hi: 0x80}, - {value: 0x0040, lo: 0x81, hi: 0x8f}, - {value: 0x0018, lo: 0x90, hi: 0xa6}, - {value: 0x0040, lo: 0xa7, hi: 0xbf}, - // Block 0xfd, offset 0x73d + {value: 0x0040, lo: 0x81, hi: 0xbf}, + // Block 0xf6, offset 0x71a {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0x96}, {value: 0x0040, lo: 0x97, hi: 0xbf}, - // Block 0xfe, offset 0x740 + // Block 0xf7, offset 0x71d {value: 0x0000, lo: 0x02}, {value: 0x0008, lo: 0x80, hi: 0xb4}, {value: 0x0040, lo: 0xb5, hi: 0xbf}, - // Block 0xff, offset 0x743 + // Block 0xf8, offset 0x720 {value: 0x0000, lo: 0x03}, {value: 0x0008, lo: 0x80, hi: 0x9d}, {value: 0x0040, lo: 0x9e, hi: 0x9f}, {value: 0x0008, lo: 0xa0, hi: 0xbf}, - // Block 0x100, offset 0x747 - {value: 0x0000, lo: 0x03}, - {value: 0x0008, lo: 0x80, hi: 0xa1}, - {value: 0x0040, lo: 0xa2, hi: 0xaf}, - {value: 0x0008, lo: 0xb0, hi: 0xbf}, - // Block 0x101, offset 0x74b + // Block 0xf9, offset 0x724 {value: 0x0000, lo: 0x02}, - {value: 0x0008, lo: 0x80, hi: 0xa0}, - {value: 0x0040, lo: 0xa1, hi: 0xbf}, - // Block 0x102, offset 0x74e + {value: 0x0008, lo: 0x80, hi: 0xa1}, + {value: 0x0040, lo: 0xa2, hi: 0xbf}, + // Block 0xfa, offset 0x727 {value: 0x0020, lo: 0x0f}, {value: 0xdeb9, lo: 0x80, hi: 0x89}, {value: 0x8dfd, lo: 0x8a, hi: 0x8a}, @@ -4518,7 +4438,7 @@ var idnaSparseValues = [1915]valueRange{ {value: 0xe4f9, lo: 0xba, hi: 0xba}, {value: 0x8edd, lo: 0xbb, hi: 0xbb}, {value: 0xe519, lo: 0xbc, hi: 0xbf}, - // Block 0x103, offset 0x75e + // Block 0xfb, offset 0x737 {value: 0x0020, lo: 0x10}, {value: 0x937d, lo: 0x80, hi: 0x80}, {value: 0xf099, lo: 0x81, hi: 0x86}, @@ -4535,23 +4455,23 @@ var idnaSparseValues = [1915]valueRange{ {value: 0xf4d9, lo: 0xae, hi: 0xaf}, {value: 0x94dd, lo: 0xb0, hi: 0xb1}, {value: 0xf519, lo: 0xb2, hi: 0xbe}, - {value: 0x2040, lo: 0xbf, hi: 0xbf}, - // Block 0x104, offset 0x76f + {value: 0x0040, lo: 0xbf, hi: 0xbf}, + // Block 0xfc, offset 0x748 {value: 0x0000, lo: 0x04}, {value: 0x0040, lo: 0x80, hi: 0x80}, {value: 0x0340, lo: 0x81, hi: 0x81}, {value: 0x0040, lo: 0x82, hi: 0x9f}, {value: 0x0340, lo: 0xa0, hi: 0xbf}, - // Block 0x105, offset 0x774 + // Block 0xfd, offset 0x74d {value: 0x0000, lo: 0x01}, {value: 0x0340, lo: 0x80, hi: 0xbf}, - // Block 0x106, offset 0x776 + // Block 0xfe, offset 0x74f {value: 0x0000, lo: 0x01}, - {value: 0x33c0, lo: 0x80, hi: 0xbf}, - // Block 0x107, offset 0x778 + {value: 0x13c0, lo: 0x80, hi: 0xbf}, + // Block 0xff, offset 0x751 {value: 0x0000, lo: 0x02}, - {value: 0x33c0, lo: 0x80, hi: 0xaf}, + {value: 0x13c0, lo: 0x80, hi: 0xaf}, {value: 0x0040, lo: 0xb0, hi: 0xbf}, } -// Total table size 42115 bytes (41KiB); checksum: F4A1FA4E +// Total table size 41559 bytes (40KiB); checksum: F4A1FA4E diff --git a/deps/golang.org/x/net/idna/trieval.go b/deps/golang.org/x/net/idna/trieval.go index 7a8cf889b..63cb03b59 100644 --- a/deps/golang.org/x/net/idna/trieval.go +++ b/deps/golang.org/x/net/idna/trieval.go @@ -26,9 +26,9 @@ package idna // 15..3 index into xor or mapping table // } // } else { -// 15..14 unused -// 13 mayNeedNorm -// 12..11 attributes +// 15..13 unused +// 12 modifier (including virama) +// 11 virama modifier // 10..8 joining type // 7..3 category type // } @@ -49,20 +49,15 @@ const ( joinShift = 8 joinMask = 0x07 - // Attributes - attributesMask = 0x1800 - viramaModifier = 0x1800 + viramaModifier = 0x0800 modifier = 0x1000 - rtl = 0x0800 - - mayNeedNorm = 0x2000 ) // A category corresponds to a category defined in the IDNA mapping table. type category uint16 const ( - unknown category = 0 // not currently defined in unicode. + unknown category = 0 // not defined currently in unicode. mapped category = 1 disallowedSTD3Mapped category = 2 deviation category = 3 @@ -115,5 +110,5 @@ func (c info) isModifier() bool { } func (c info) isViramaModifier() bool { - return c&(attributesMask|catSmallMask) == viramaModifier + return c&(viramaModifier|catSmallMask) == viramaModifier } diff --git a/deps/golang.org/x/net/internal/iana/const.go b/deps/golang.org/x/net/internal/iana/const.go deleted file mode 100644 index cea712fac..000000000 --- a/deps/golang.org/x/net/internal/iana/const.go +++ /dev/null @@ -1,223 +0,0 @@ -// go generate gen.go -// Code generated by the command above; DO NOT EDIT. - -// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA). -package iana // import "golang.org/x/net/internal/iana" - -// Differentiated Services Field Codepoints (DSCP), Updated: 2018-05-04 -const ( - DiffServCS0 = 0x00 // CS0 - DiffServCS1 = 0x20 // CS1 - DiffServCS2 = 0x40 // CS2 - DiffServCS3 = 0x60 // CS3 - DiffServCS4 = 0x80 // CS4 - DiffServCS5 = 0xa0 // CS5 - DiffServCS6 = 0xc0 // CS6 - DiffServCS7 = 0xe0 // CS7 - DiffServAF11 = 0x28 // AF11 - DiffServAF12 = 0x30 // AF12 - DiffServAF13 = 0x38 // AF13 - DiffServAF21 = 0x48 // AF21 - DiffServAF22 = 0x50 // AF22 - DiffServAF23 = 0x58 // AF23 - DiffServAF31 = 0x68 // AF31 - DiffServAF32 = 0x70 // AF32 - DiffServAF33 = 0x78 // AF33 - DiffServAF41 = 0x88 // AF41 - DiffServAF42 = 0x90 // AF42 - DiffServAF43 = 0x98 // AF43 - DiffServEF = 0xb8 // EF - DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT - NotECNTransport = 0x00 // Not-ECT (Not ECN-Capable Transport) - ECNTransport1 = 0x01 // ECT(1) (ECN-Capable Transport(1)) - ECNTransport0 = 0x02 // ECT(0) (ECN-Capable Transport(0)) - CongestionExperienced = 0x03 // CE (Congestion Experienced) -) - -// Protocol Numbers, Updated: 2017-10-13 -const ( - ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number - ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option - ProtocolICMP = 1 // Internet Control Message - ProtocolIGMP = 2 // Internet Group Management - ProtocolGGP = 3 // Gateway-to-Gateway - ProtocolIPv4 = 4 // IPv4 encapsulation - ProtocolST = 5 // Stream - ProtocolTCP = 6 // Transmission Control - ProtocolCBT = 7 // CBT - ProtocolEGP = 8 // Exterior Gateway Protocol - ProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP) - ProtocolBBNRCCMON = 10 // BBN RCC Monitoring - ProtocolNVPII = 11 // Network Voice Protocol - ProtocolPUP = 12 // PUP - ProtocolEMCON = 14 // EMCON - ProtocolXNET = 15 // Cross Net Debugger - ProtocolCHAOS = 16 // Chaos - ProtocolUDP = 17 // User Datagram - ProtocolMUX = 18 // Multiplexing - ProtocolDCNMEAS = 19 // DCN Measurement Subsystems - ProtocolHMP = 20 // Host Monitoring - ProtocolPRM = 21 // Packet Radio Measurement - ProtocolXNSIDP = 22 // XEROX NS IDP - ProtocolTRUNK1 = 23 // Trunk-1 - ProtocolTRUNK2 = 24 // Trunk-2 - ProtocolLEAF1 = 25 // Leaf-1 - ProtocolLEAF2 = 26 // Leaf-2 - ProtocolRDP = 27 // Reliable Data Protocol - ProtocolIRTP = 28 // Internet Reliable Transaction - ProtocolISOTP4 = 29 // ISO Transport Protocol Class 4 - ProtocolNETBLT = 30 // Bulk Data Transfer Protocol - ProtocolMFENSP = 31 // MFE Network Services Protocol - ProtocolMERITINP = 32 // MERIT Internodal Protocol - ProtocolDCCP = 33 // Datagram Congestion Control Protocol - Protocol3PC = 34 // Third Party Connect Protocol - ProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol - ProtocolXTP = 36 // XTP - ProtocolDDP = 37 // Datagram Delivery Protocol - ProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto - ProtocolTPPP = 39 // TP++ Transport Protocol - ProtocolIL = 40 // IL Transport Protocol - ProtocolIPv6 = 41 // IPv6 encapsulation - ProtocolSDRP = 42 // Source Demand Routing Protocol - ProtocolIPv6Route = 43 // Routing Header for IPv6 - ProtocolIPv6Frag = 44 // Fragment Header for IPv6 - ProtocolIDRP = 45 // Inter-Domain Routing Protocol - ProtocolRSVP = 46 // Reservation Protocol - ProtocolGRE = 47 // Generic Routing Encapsulation - ProtocolDSR = 48 // Dynamic Source Routing Protocol - ProtocolBNA = 49 // BNA - ProtocolESP = 50 // Encap Security Payload - ProtocolAH = 51 // Authentication Header - ProtocolINLSP = 52 // Integrated Net Layer Security TUBA - ProtocolNARP = 54 // NBMA Address Resolution Protocol - ProtocolMOBILE = 55 // IP Mobility - ProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management - ProtocolSKIP = 57 // SKIP - ProtocolIPv6ICMP = 58 // ICMP for IPv6 - ProtocolIPv6NoNxt = 59 // No Next Header for IPv6 - ProtocolIPv6Opts = 60 // Destination Options for IPv6 - ProtocolCFTP = 62 // CFTP - ProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK - ProtocolKRYPTOLAN = 65 // Kryptolan - ProtocolRVD = 66 // MIT Remote Virtual Disk Protocol - ProtocolIPPC = 67 // Internet Pluribus Packet Core - ProtocolSATMON = 69 // SATNET Monitoring - ProtocolVISA = 70 // VISA Protocol - ProtocolIPCV = 71 // Internet Packet Core Utility - ProtocolCPNX = 72 // Computer Protocol Network Executive - ProtocolCPHB = 73 // Computer Protocol Heart Beat - ProtocolWSN = 74 // Wang Span Network - ProtocolPVP = 75 // Packet Video Protocol - ProtocolBRSATMON = 76 // Backroom SATNET Monitoring - ProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary - ProtocolWBMON = 78 // WIDEBAND Monitoring - ProtocolWBEXPAK = 79 // WIDEBAND EXPAK - ProtocolISOIP = 80 // ISO Internet Protocol - ProtocolVMTP = 81 // VMTP - ProtocolSECUREVMTP = 82 // SECURE-VMTP - ProtocolVINES = 83 // VINES - ProtocolTTP = 84 // Transaction Transport Protocol - ProtocolIPTM = 84 // Internet Protocol Traffic Manager - ProtocolNSFNETIGP = 85 // NSFNET-IGP - ProtocolDGP = 86 // Dissimilar Gateway Protocol - ProtocolTCF = 87 // TCF - ProtocolEIGRP = 88 // EIGRP - ProtocolOSPFIGP = 89 // OSPFIGP - ProtocolSpriteRPC = 90 // Sprite RPC Protocol - ProtocolLARP = 91 // Locus Address Resolution Protocol - ProtocolMTP = 92 // Multicast Transport Protocol - ProtocolAX25 = 93 // AX.25 Frames - ProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol - ProtocolSCCSP = 96 // Semaphore Communications Sec. Pro. - ProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation - ProtocolENCAP = 98 // Encapsulation Header - ProtocolGMTP = 100 // GMTP - ProtocolIFMP = 101 // Ipsilon Flow Management Protocol - ProtocolPNNI = 102 // PNNI over IP - ProtocolPIM = 103 // Protocol Independent Multicast - ProtocolARIS = 104 // ARIS - ProtocolSCPS = 105 // SCPS - ProtocolQNX = 106 // QNX - ProtocolAN = 107 // Active Networks - ProtocolIPComp = 108 // IP Payload Compression Protocol - ProtocolSNP = 109 // Sitara Networks Protocol - ProtocolCompaqPeer = 110 // Compaq Peer Protocol - ProtocolIPXinIP = 111 // IPX in IP - ProtocolVRRP = 112 // Virtual Router Redundancy Protocol - ProtocolPGM = 113 // PGM Reliable Transport Protocol - ProtocolL2TP = 115 // Layer Two Tunneling Protocol - ProtocolDDX = 116 // D-II Data Exchange (DDX) - ProtocolIATP = 117 // Interactive Agent Transfer Protocol - ProtocolSTP = 118 // Schedule Transfer Protocol - ProtocolSRP = 119 // SpectraLink Radio Protocol - ProtocolUTI = 120 // UTI - ProtocolSMP = 121 // Simple Message Protocol - ProtocolPTP = 123 // Performance Transparency Protocol - ProtocolISIS = 124 // ISIS over IPv4 - ProtocolFIRE = 125 // FIRE - ProtocolCRTP = 126 // Combat Radio Transport Protocol - ProtocolCRUDP = 127 // Combat Radio User Datagram - ProtocolSSCOPMCE = 128 // SSCOPMCE - ProtocolIPLT = 129 // IPLT - ProtocolSPS = 130 // Secure Packet Shield - ProtocolPIPE = 131 // Private IP Encapsulation within IP - ProtocolSCTP = 132 // Stream Control Transmission Protocol - ProtocolFC = 133 // Fibre Channel - ProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE - ProtocolMobilityHeader = 135 // Mobility Header - ProtocolUDPLite = 136 // UDPLite - ProtocolMPLSinIP = 137 // MPLS-in-IP - ProtocolMANET = 138 // MANET Protocols - ProtocolHIP = 139 // Host Identity Protocol - ProtocolShim6 = 140 // Shim6 Protocol - ProtocolWESP = 141 // Wrapped Encapsulating Security Payload - ProtocolROHC = 142 // Robust Header Compression - ProtocolReserved = 255 // Reserved -) - -// Address Family Numbers, Updated: 2018-04-02 -const ( - AddrFamilyIPv4 = 1 // IP (IP version 4) - AddrFamilyIPv6 = 2 // IP6 (IP version 6) - AddrFamilyNSAP = 3 // NSAP - AddrFamilyHDLC = 4 // HDLC (8-bit multidrop) - AddrFamilyBBN1822 = 5 // BBN 1822 - AddrFamily802 = 6 // 802 (includes all 802 media plus Ethernet "canonical format") - AddrFamilyE163 = 7 // E.163 - AddrFamilyE164 = 8 // E.164 (SMDS, Frame Relay, ATM) - AddrFamilyF69 = 9 // F.69 (Telex) - AddrFamilyX121 = 10 // X.121 (X.25, Frame Relay) - AddrFamilyIPX = 11 // IPX - AddrFamilyAppletalk = 12 // Appletalk - AddrFamilyDecnetIV = 13 // Decnet IV - AddrFamilyBanyanVines = 14 // Banyan Vines - AddrFamilyE164withSubaddress = 15 // E.164 with NSAP format subaddress - AddrFamilyDNS = 16 // DNS (Domain Name System) - AddrFamilyDistinguishedName = 17 // Distinguished Name - AddrFamilyASNumber = 18 // AS Number - AddrFamilyXTPoverIPv4 = 19 // XTP over IP version 4 - AddrFamilyXTPoverIPv6 = 20 // XTP over IP version 6 - AddrFamilyXTPnativemodeXTP = 21 // XTP native mode XTP - AddrFamilyFibreChannelWorldWidePortName = 22 // Fibre Channel World-Wide Port Name - AddrFamilyFibreChannelWorldWideNodeName = 23 // Fibre Channel World-Wide Node Name - AddrFamilyGWID = 24 // GWID - AddrFamilyL2VPN = 25 // AFI for L2VPN information - AddrFamilyMPLSTPSectionEndpointID = 26 // MPLS-TP Section Endpoint Identifier - AddrFamilyMPLSTPLSPEndpointID = 27 // MPLS-TP LSP Endpoint Identifier - AddrFamilyMPLSTPPseudowireEndpointID = 28 // MPLS-TP Pseudowire Endpoint Identifier - AddrFamilyMTIPv4 = 29 // MT IP: Multi-Topology IP version 4 - AddrFamilyMTIPv6 = 30 // MT IPv6: Multi-Topology IP version 6 - AddrFamilyEIGRPCommonServiceFamily = 16384 // EIGRP Common Service Family - AddrFamilyEIGRPIPv4ServiceFamily = 16385 // EIGRP IPv4 Service Family - AddrFamilyEIGRPIPv6ServiceFamily = 16386 // EIGRP IPv6 Service Family - AddrFamilyLISPCanonicalAddressFormat = 16387 // LISP Canonical Address Format (LCAF) - AddrFamilyBGPLS = 16388 // BGP-LS - AddrFamily48bitMAC = 16389 // 48-bit MAC - AddrFamily64bitMAC = 16390 // 64-bit MAC - AddrFamilyOUI = 16391 // OUI - AddrFamilyMACFinal24bits = 16392 // MAC/24 - AddrFamilyMACFinal40bits = 16393 // MAC/40 - AddrFamilyIPv6Initial64bits = 16394 // IPv6/64 - AddrFamilyRBridgePortID = 16395 // RBridge Port ID - AddrFamilyTRILLNickname = 16396 // TRILL Nickname -) diff --git a/deps/golang.org/x/net/internal/iana/gen.go b/deps/golang.org/x/net/internal/iana/gen.go deleted file mode 100644 index 2a7661c27..000000000 --- a/deps/golang.org/x/net/internal/iana/gen.go +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -//go:generate go run gen.go - -// This program generates internet protocol constants and tables by -// reading IANA protocol registries. -package main - -import ( - "bytes" - "encoding/xml" - "fmt" - "go/format" - "io" - "io/ioutil" - "net/http" - "os" - "strconv" - "strings" -) - -var registries = []struct { - url string - parse func(io.Writer, io.Reader) error -}{ - { - "https://www.iana.org/assignments/dscp-registry/dscp-registry.xml", - parseDSCPRegistry, - }, - { - "https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml", - parseProtocolNumbers, - }, - { - "https://www.iana.org/assignments/address-family-numbers/address-family-numbers.xml", - parseAddrFamilyNumbers, - }, -} - -func main() { - var bb bytes.Buffer - fmt.Fprintf(&bb, "// go generate gen.go\n") - fmt.Fprintf(&bb, "// Code generated by the command above; DO NOT EDIT.\n\n") - fmt.Fprintf(&bb, "// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).\n") - fmt.Fprintf(&bb, `package iana // import "golang.org/x/net/internal/iana"`+"\n\n") - for _, r := range registries { - resp, err := http.Get(r.url) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - fmt.Fprintf(os.Stderr, "got HTTP status code %v for %v\n", resp.StatusCode, r.url) - os.Exit(1) - } - if err := r.parse(&bb, resp.Body); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - fmt.Fprintf(&bb, "\n") - } - b, err := format.Source(bb.Bytes()) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - if err := ioutil.WriteFile("const.go", b, 0644); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - -func parseDSCPRegistry(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var dr dscpRegistry - if err := dec.Decode(&dr); err != nil { - return err - } - fmt.Fprintf(w, "// %s, Updated: %s\n", dr.Title, dr.Updated) - fmt.Fprintf(w, "const (\n") - for _, dr := range dr.escapeDSCP() { - fmt.Fprintf(w, "DiffServ%s = %#02x", dr.Name, dr.Value) - fmt.Fprintf(w, "// %s\n", dr.OrigName) - } - for _, er := range dr.escapeECN() { - fmt.Fprintf(w, "%s = %#02x", er.Descr, er.Value) - fmt.Fprintf(w, "// %s\n", er.OrigDescr) - } - fmt.Fprintf(w, ")\n") - return nil -} - -type dscpRegistry struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - Note string `xml:"note"` - Registries []struct { - Title string `xml:"title"` - Registries []struct { - Title string `xml:"title"` - Records []struct { - Name string `xml:"name"` - Space string `xml:"space"` - } `xml:"record"` - } `xml:"registry"` - Records []struct { - Value string `xml:"value"` - Descr string `xml:"description"` - } `xml:"record"` - } `xml:"registry"` -} - -type canonDSCPRecord struct { - OrigName string - Name string - Value int -} - -func (drr *dscpRegistry) escapeDSCP() []canonDSCPRecord { - var drs []canonDSCPRecord - for _, preg := range drr.Registries { - if !strings.Contains(preg.Title, "Differentiated Services Field Codepoints") { - continue - } - for _, reg := range preg.Registries { - if !strings.Contains(reg.Title, "Pool 1 Codepoints") { - continue - } - drs = make([]canonDSCPRecord, len(reg.Records)) - sr := strings.NewReplacer( - "+", "", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, dr := range reg.Records { - s := strings.TrimSpace(dr.Name) - drs[i].OrigName = s - drs[i].Name = sr.Replace(s) - n, err := strconv.ParseUint(dr.Space, 2, 8) - if err != nil { - continue - } - drs[i].Value = int(n) << 2 - } - } - } - return drs -} - -type canonECNRecord struct { - OrigDescr string - Descr string - Value int -} - -func (drr *dscpRegistry) escapeECN() []canonECNRecord { - var ers []canonECNRecord - for _, reg := range drr.Registries { - if !strings.Contains(reg.Title, "ECN Field") { - continue - } - ers = make([]canonECNRecord, len(reg.Records)) - sr := strings.NewReplacer( - "Capable", "", - "Not-ECT", "", - "ECT(1)", "", - "ECT(0)", "", - "CE", "", - "(", "", - ")", "", - "+", "", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, er := range reg.Records { - s := strings.TrimSpace(er.Descr) - ers[i].OrigDescr = s - ss := strings.Split(s, " ") - if len(ss) > 1 { - ers[i].Descr = strings.Join(ss[1:], " ") - } else { - ers[i].Descr = ss[0] - } - ers[i].Descr = sr.Replace(er.Descr) - n, err := strconv.ParseUint(er.Value, 2, 8) - if err != nil { - continue - } - ers[i].Value = int(n) - } - } - return ers -} - -func parseProtocolNumbers(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var pn protocolNumbers - if err := dec.Decode(&pn); err != nil { - return err - } - prs := pn.escape() - prs = append([]canonProtocolRecord{{ - Name: "IP", - Descr: "IPv4 encapsulation, pseudo protocol number", - Value: 0, - }}, prs...) - fmt.Fprintf(w, "// %s, Updated: %s\n", pn.Title, pn.Updated) - fmt.Fprintf(w, "const (\n") - for _, pr := range prs { - if pr.Name == "" { - continue - } - fmt.Fprintf(w, "Protocol%s = %d", pr.Name, pr.Value) - s := pr.Descr - if s == "" { - s = pr.OrigName - } - fmt.Fprintf(w, "// %s\n", s) - } - fmt.Fprintf(w, ")\n") - return nil -} - -type protocolNumbers struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - RegTitle string `xml:"registry>title"` - Note string `xml:"registry>note"` - Records []struct { - Value string `xml:"value"` - Name string `xml:"name"` - Descr string `xml:"description"` - } `xml:"registry>record"` -} - -type canonProtocolRecord struct { - OrigName string - Name string - Descr string - Value int -} - -func (pn *protocolNumbers) escape() []canonProtocolRecord { - prs := make([]canonProtocolRecord, len(pn.Records)) - sr := strings.NewReplacer( - "-in-", "in", - "-within-", "within", - "-over-", "over", - "+", "P", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, pr := range pn.Records { - if strings.Contains(pr.Name, "Deprecated") || - strings.Contains(pr.Name, "deprecated") { - continue - } - prs[i].OrigName = pr.Name - s := strings.TrimSpace(pr.Name) - switch pr.Name { - case "ISIS over IPv4": - prs[i].Name = "ISIS" - case "manet": - prs[i].Name = "MANET" - default: - prs[i].Name = sr.Replace(s) - } - ss := strings.Split(pr.Descr, "\n") - for i := range ss { - ss[i] = strings.TrimSpace(ss[i]) - } - if len(ss) > 1 { - prs[i].Descr = strings.Join(ss, " ") - } else { - prs[i].Descr = ss[0] - } - prs[i].Value, _ = strconv.Atoi(pr.Value) - } - return prs -} - -func parseAddrFamilyNumbers(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var afn addrFamilylNumbers - if err := dec.Decode(&afn); err != nil { - return err - } - afrs := afn.escape() - fmt.Fprintf(w, "// %s, Updated: %s\n", afn.Title, afn.Updated) - fmt.Fprintf(w, "const (\n") - for _, afr := range afrs { - if afr.Name == "" { - continue - } - fmt.Fprintf(w, "AddrFamily%s = %d", afr.Name, afr.Value) - fmt.Fprintf(w, "// %s\n", afr.Descr) - } - fmt.Fprintf(w, ")\n") - return nil -} - -type addrFamilylNumbers struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - RegTitle string `xml:"registry>title"` - Note string `xml:"registry>note"` - Records []struct { - Value string `xml:"value"` - Descr string `xml:"description"` - } `xml:"registry>record"` -} - -type canonAddrFamilyRecord struct { - Name string - Descr string - Value int -} - -func (afn *addrFamilylNumbers) escape() []canonAddrFamilyRecord { - afrs := make([]canonAddrFamilyRecord, len(afn.Records)) - sr := strings.NewReplacer( - "IP version 4", "IPv4", - "IP version 6", "IPv6", - "Identifier", "ID", - "-", "", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, afr := range afn.Records { - if strings.Contains(afr.Descr, "Unassigned") || - strings.Contains(afr.Descr, "Reserved") { - continue - } - afrs[i].Descr = afr.Descr - s := strings.TrimSpace(afr.Descr) - switch s { - case "IP (IP version 4)": - afrs[i].Name = "IPv4" - case "IP6 (IP version 6)": - afrs[i].Name = "IPv6" - case "AFI for L2VPN information": - afrs[i].Name = "L2VPN" - case "E.164 with NSAP format subaddress": - afrs[i].Name = "E164withSubaddress" - case "MT IP: Multi-Topology IP version 4": - afrs[i].Name = "MTIPv4" - case "MAC/24": - afrs[i].Name = "MACFinal24bits" - case "MAC/40": - afrs[i].Name = "MACFinal40bits" - case "IPv6/64": - afrs[i].Name = "IPv6Initial64bits" - default: - n := strings.Index(s, "(") - if n > 0 { - s = s[:n] - } - n = strings.Index(s, ":") - if n > 0 { - s = s[:n] - } - afrs[i].Name = sr.Replace(s) - } - afrs[i].Value, _ = strconv.Atoi(afr.Value) - } - return afrs -} diff --git a/deps/golang.org/x/net/internal/nettest/helper_bsd.go b/deps/golang.org/x/net/internal/nettest/helper_bsd.go deleted file mode 100644 index a6e433b58..000000000 --- a/deps/golang.org/x/net/internal/nettest/helper_bsd.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package nettest - -import ( - "runtime" - "strconv" - "strings" - "syscall" -) - -var darwinVersion int - -func init() { - if runtime.GOOS == "darwin" { - // See http://support.apple.com/kb/HT1633. - s, err := syscall.Sysctl("kern.osrelease") - if err != nil { - return - } - ss := strings.Split(s, ".") - if len(ss) == 0 { - return - } - darwinVersion, _ = strconv.Atoi(ss[0]) - } -} - -func supportsIPv6MulticastDeliveryOnLoopback() bool { - switch runtime.GOOS { - case "freebsd": - // See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065. - // Even after the fix, it looks like the latest - // kernels don't deliver link-local scoped multicast - // packets correctly. - return false - case "darwin": - return !causesIPv6Crash() - default: - return true - } -} - -func causesIPv6Crash() bool { - // We see some kernel crash when running IPv6 with IP-level - // options on Darwin kernel version 12 or below. - // See golang.org/issues/17015. - return darwinVersion < 13 -} diff --git a/deps/golang.org/x/net/internal/nettest/helper_nobsd.go b/deps/golang.org/x/net/internal/nettest/helper_nobsd.go deleted file mode 100644 index bc7da5e0d..000000000 --- a/deps/golang.org/x/net/internal/nettest/helper_nobsd.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux solaris - -package nettest - -func supportsIPv6MulticastDeliveryOnLoopback() bool { - return true -} - -func causesIPv6Crash() bool { - return false -} diff --git a/deps/golang.org/x/net/internal/nettest/helper_posix.go b/deps/golang.org/x/net/internal/nettest/helper_posix.go deleted file mode 100644 index 963ed9965..000000000 --- a/deps/golang.org/x/net/internal/nettest/helper_posix.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package nettest - -import ( - "os" - "syscall" -) - -func protocolNotSupported(err error) bool { - switch err := err.(type) { - case syscall.Errno: - switch err { - case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT: - return true - } - case *os.SyscallError: - switch err := err.Err.(type) { - case syscall.Errno: - switch err { - case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT: - return true - } - } - } - return false -} diff --git a/deps/golang.org/x/net/internal/nettest/helper_stub.go b/deps/golang.org/x/net/internal/nettest/helper_stub.go deleted file mode 100644 index d729156de..000000000 --- a/deps/golang.org/x/net/internal/nettest/helper_stub.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build js,wasm nacl plan9 - -package nettest - -import ( - "fmt" - "runtime" -) - -func maxOpenFiles() int { - return defaultMaxOpenFiles -} - -func supportsRawIPSocket() (string, bool) { - return fmt.Sprintf("not supported on %s", runtime.GOOS), false -} - -func supportsIPv6MulticastDeliveryOnLoopback() bool { - return false -} - -func causesIPv6Crash() bool { - return false -} - -func protocolNotSupported(err error) bool { - return false -} diff --git a/deps/golang.org/x/net/internal/nettest/helper_unix.go b/deps/golang.org/x/net/internal/nettest/helper_unix.go deleted file mode 100644 index ed13e448b..000000000 --- a/deps/golang.org/x/net/internal/nettest/helper_unix.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package nettest - -import ( - "fmt" - "os" - "runtime" - "syscall" -) - -func maxOpenFiles() int { - var rlim syscall.Rlimit - if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil { - return defaultMaxOpenFiles - } - return int(rlim.Cur) -} - -func supportsRawIPSocket() (string, bool) { - if os.Getuid() != 0 { - return fmt.Sprintf("must be root on %s", runtime.GOOS), false - } - return "", true -} diff --git a/deps/golang.org/x/net/internal/nettest/helper_windows.go b/deps/golang.org/x/net/internal/nettest/helper_windows.go deleted file mode 100644 index 3dcb727c9..000000000 --- a/deps/golang.org/x/net/internal/nettest/helper_windows.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package nettest - -import ( - "fmt" - "runtime" - "syscall" -) - -func maxOpenFiles() int { - return 4 * defaultMaxOpenFiles /* actually it's 16581375 */ -} - -func supportsRawIPSocket() (string, bool) { - // From http://msdn.microsoft.com/en-us/library/windows/desktop/ms740548.aspx: - // Note: To use a socket of type SOCK_RAW requires administrative privileges. - // Users running Winsock applications that use raw sockets must be a member of - // the Administrators group on the local computer, otherwise raw socket calls - // will fail with an error code of WSAEACCES. On Windows Vista and later, access - // for raw sockets is enforced at socket creation. In earlier versions of Windows, - // access for raw sockets is enforced during other socket operations. - s, err := syscall.Socket(syscall.AF_INET, syscall.SOCK_RAW, 0) - if err == syscall.WSAEACCES { - return fmt.Sprintf("no access to raw socket allowed on %s", runtime.GOOS), false - } - if err != nil { - return err.Error(), false - } - syscall.Closesocket(s) - return "", true -} - -func supportsIPv6MulticastDeliveryOnLoopback() bool { - return true -} - -func causesIPv6Crash() bool { - return false -} diff --git a/deps/golang.org/x/net/internal/nettest/interface.go b/deps/golang.org/x/net/internal/nettest/interface.go deleted file mode 100644 index 8e6333afe..000000000 --- a/deps/golang.org/x/net/internal/nettest/interface.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package nettest - -import "net" - -// IsMulticastCapable reports whether ifi is an IP multicast-capable -// network interface. Network must be "ip", "ip4" or "ip6". -func IsMulticastCapable(network string, ifi *net.Interface) (net.IP, bool) { - switch network { - case "ip", "ip4", "ip6": - default: - return nil, false - } - if ifi == nil || ifi.Flags&net.FlagUp == 0 || ifi.Flags&net.FlagMulticast == 0 { - return nil, false - } - return hasRoutableIP(network, ifi) -} - -// RoutedInterface returns a network interface that can route IP -// traffic and satisfies flags. It returns nil when an appropriate -// network interface is not found. Network must be "ip", "ip4" or -// "ip6". -func RoutedInterface(network string, flags net.Flags) *net.Interface { - switch network { - case "ip", "ip4", "ip6": - default: - return nil - } - ift, err := net.Interfaces() - if err != nil { - return nil - } - for _, ifi := range ift { - if ifi.Flags&flags != flags { - continue - } - if _, ok := hasRoutableIP(network, &ifi); !ok { - continue - } - return &ifi - } - return nil -} - -func hasRoutableIP(network string, ifi *net.Interface) (net.IP, bool) { - ifat, err := ifi.Addrs() - if err != nil { - return nil, false - } - for _, ifa := range ifat { - switch ifa := ifa.(type) { - case *net.IPAddr: - if ip := routableIP(network, ifa.IP); ip != nil { - return ip, true - } - case *net.IPNet: - if ip := routableIP(network, ifa.IP); ip != nil { - return ip, true - } - } - } - return nil, false -} - -func routableIP(network string, ip net.IP) net.IP { - if !ip.IsLoopback() && !ip.IsLinkLocalUnicast() && !ip.IsGlobalUnicast() { - return nil - } - switch network { - case "ip4": - if ip := ip.To4(); ip != nil { - return ip - } - case "ip6": - if ip.IsLoopback() { // addressing scope of the loopback address depends on each implementation - return nil - } - if ip := ip.To16(); ip != nil && ip.To4() == nil { - return ip - } - default: - if ip := ip.To4(); ip != nil { - return ip - } - if ip := ip.To16(); ip != nil { - return ip - } - } - return nil -} diff --git a/deps/golang.org/x/net/internal/nettest/rlimit.go b/deps/golang.org/x/net/internal/nettest/rlimit.go deleted file mode 100644 index bb34aec0b..000000000 --- a/deps/golang.org/x/net/internal/nettest/rlimit.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package nettest - -const defaultMaxOpenFiles = 256 - -// MaxOpenFiles returns the maximum number of open files for the -// caller's process. -func MaxOpenFiles() int { return maxOpenFiles() } diff --git a/deps/golang.org/x/net/internal/nettest/stack.go b/deps/golang.org/x/net/internal/nettest/stack.go deleted file mode 100644 index 46d2fccab..000000000 --- a/deps/golang.org/x/net/internal/nettest/stack.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package nettest provides utilities for network testing. -package nettest // import "golang.org/x/net/internal/nettest" - -import ( - "fmt" - "io/ioutil" - "net" - "os" - "runtime" -) - -var ( - supportsIPv4 bool - supportsIPv6 bool -) - -func init() { - if ln, err := net.Listen("tcp4", "127.0.0.1:0"); err == nil { - ln.Close() - supportsIPv4 = true - } - if ln, err := net.Listen("tcp6", "[::1]:0"); err == nil { - ln.Close() - supportsIPv6 = true - } -} - -// SupportsIPv4 reports whether the platform supports IPv4 networking -// functionality. -func SupportsIPv4() bool { return supportsIPv4 } - -// SupportsIPv6 reports whether the platform supports IPv6 networking -// functionality. -func SupportsIPv6() bool { return supportsIPv6 } - -// SupportsRawIPSocket reports whether the platform supports raw IP -// sockets. -func SupportsRawIPSocket() (string, bool) { - return supportsRawIPSocket() -} - -// SupportsIPv6MulticastDeliveryOnLoopback reports whether the -// platform supports IPv6 multicast packet delivery on software -// loopback interface. -func SupportsIPv6MulticastDeliveryOnLoopback() bool { - return supportsIPv6MulticastDeliveryOnLoopback() -} - -// ProtocolNotSupported reports whether err is a protocol not -// supported error. -func ProtocolNotSupported(err error) bool { - return protocolNotSupported(err) -} - -// TestableNetwork reports whether network is testable on the current -// platform configuration. -func TestableNetwork(network string) bool { - // This is based on logic from standard library's - // net/platform_test.go. - switch network { - case "unix", "unixgram": - switch runtime.GOOS { - case "android", "js", "nacl", "plan9", "windows": - return false - } - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - return false - } - case "unixpacket": - switch runtime.GOOS { - case "android", "darwin", "freebsd", "js", "nacl", "plan9", "windows": - return false - case "netbsd": - // It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown. - if runtime.GOARCH == "386" { - return false - } - } - } - return true -} - -// NewLocalListener returns a listener which listens to a loopback IP -// address or local file system path. -// Network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket". -func NewLocalListener(network string) (net.Listener, error) { - switch network { - case "tcp": - if supportsIPv4 { - if ln, err := net.Listen("tcp4", "127.0.0.1:0"); err == nil { - return ln, nil - } - } - if supportsIPv6 { - return net.Listen("tcp6", "[::1]:0") - } - case "tcp4": - if supportsIPv4 { - return net.Listen("tcp4", "127.0.0.1:0") - } - case "tcp6": - if supportsIPv6 { - return net.Listen("tcp6", "[::1]:0") - } - case "unix", "unixpacket": - return net.Listen(network, localPath()) - } - return nil, fmt.Errorf("%s is not supported", network) -} - -// NewLocalPacketListener returns a packet listener which listens to a -// loopback IP address or local file system path. -// Network must be "udp", "udp4", "udp6" or "unixgram". -func NewLocalPacketListener(network string) (net.PacketConn, error) { - switch network { - case "udp": - if supportsIPv4 { - if c, err := net.ListenPacket("udp4", "127.0.0.1:0"); err == nil { - return c, nil - } - } - if supportsIPv6 { - return net.ListenPacket("udp6", "[::1]:0") - } - case "udp4": - if supportsIPv4 { - return net.ListenPacket("udp4", "127.0.0.1:0") - } - case "udp6": - if supportsIPv6 { - return net.ListenPacket("udp6", "[::1]:0") - } - case "unixgram": - return net.ListenPacket(network, localPath()) - } - return nil, fmt.Errorf("%s is not supported", network) -} - -func localPath() string { - f, err := ioutil.TempFile("", "nettest") - if err != nil { - panic(err) - } - path := f.Name() - f.Close() - os.Remove(path) - return path -} diff --git a/deps/golang.org/x/net/internal/socket/cmsghdr.go b/deps/golang.org/x/net/internal/socket/cmsghdr.go deleted file mode 100644 index 1eb07d26d..000000000 --- a/deps/golang.org/x/net/internal/socket/cmsghdr.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package socket - -func (h *cmsghdr) len() int { return int(h.Len) } -func (h *cmsghdr) lvl() int { return int(h.Level) } -func (h *cmsghdr) typ() int { return int(h.Type) } diff --git a/deps/golang.org/x/net/internal/socket/cmsghdr_bsd.go b/deps/golang.org/x/net/internal/socket/cmsghdr_bsd.go deleted file mode 100644 index d1d0c2de5..000000000 --- a/deps/golang.org/x/net/internal/socket/cmsghdr_bsd.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package socket - -func (h *cmsghdr) set(l, lvl, typ int) { - h.Len = uint32(l) - h.Level = int32(lvl) - h.Type = int32(typ) -} diff --git a/deps/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go b/deps/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go deleted file mode 100644 index bac66811d..000000000 --- a/deps/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm mips mipsle 386 -// +build linux - -package socket - -func (h *cmsghdr) set(l, lvl, typ int) { - h.Len = uint32(l) - h.Level = int32(lvl) - h.Type = int32(typ) -} diff --git a/deps/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go b/deps/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go deleted file mode 100644 index 63f0534fa..000000000 --- a/deps/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x -// +build linux - -package socket - -func (h *cmsghdr) set(l, lvl, typ int) { - h.Len = uint64(l) - h.Level = int32(lvl) - h.Type = int32(typ) -} diff --git a/deps/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go b/deps/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go deleted file mode 100644 index 7dedd430e..000000000 --- a/deps/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64 -// +build solaris - -package socket - -func (h *cmsghdr) set(l, lvl, typ int) { - h.Len = uint32(l) - h.Level = int32(lvl) - h.Type = int32(typ) -} diff --git a/deps/golang.org/x/net/internal/socket/cmsghdr_stub.go b/deps/golang.org/x/net/internal/socket/cmsghdr_stub.go deleted file mode 100644 index a4e71226f..000000000 --- a/deps/golang.org/x/net/internal/socket/cmsghdr_stub.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris - -package socket - -type cmsghdr struct{} - -const sizeofCmsghdr = 0 - -func (h *cmsghdr) len() int { return 0 } -func (h *cmsghdr) lvl() int { return 0 } -func (h *cmsghdr) typ() int { return 0 } - -func (h *cmsghdr) set(l, lvl, typ int) {} diff --git a/deps/golang.org/x/net/internal/socket/defs_darwin.go b/deps/golang.org/x/net/internal/socket/defs_darwin.go deleted file mode 100644 index 14e28c0b4..000000000 --- a/deps/golang.org/x/net/internal/socket/defs_darwin.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package socket - -/* -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW -) - -type iovec C.struct_iovec - -type msghdr C.struct_msghdr - -type cmsghdr C.struct_cmsghdr - -type sockaddrInet C.struct_sockaddr_in - -type sockaddrInet6 C.struct_sockaddr_in6 - -const ( - sizeofIovec = C.sizeof_struct_iovec - sizeofMsghdr = C.sizeof_struct_msghdr - sizeofCmsghdr = C.sizeof_struct_cmsghdr - - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/internal/socket/defs_dragonfly.go b/deps/golang.org/x/net/internal/socket/defs_dragonfly.go deleted file mode 100644 index 14e28c0b4..000000000 --- a/deps/golang.org/x/net/internal/socket/defs_dragonfly.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package socket - -/* -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW -) - -type iovec C.struct_iovec - -type msghdr C.struct_msghdr - -type cmsghdr C.struct_cmsghdr - -type sockaddrInet C.struct_sockaddr_in - -type sockaddrInet6 C.struct_sockaddr_in6 - -const ( - sizeofIovec = C.sizeof_struct_iovec - sizeofMsghdr = C.sizeof_struct_msghdr - sizeofCmsghdr = C.sizeof_struct_cmsghdr - - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/internal/socket/defs_freebsd.go b/deps/golang.org/x/net/internal/socket/defs_freebsd.go deleted file mode 100644 index 14e28c0b4..000000000 --- a/deps/golang.org/x/net/internal/socket/defs_freebsd.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package socket - -/* -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW -) - -type iovec C.struct_iovec - -type msghdr C.struct_msghdr - -type cmsghdr C.struct_cmsghdr - -type sockaddrInet C.struct_sockaddr_in - -type sockaddrInet6 C.struct_sockaddr_in6 - -const ( - sizeofIovec = C.sizeof_struct_iovec - sizeofMsghdr = C.sizeof_struct_msghdr - sizeofCmsghdr = C.sizeof_struct_cmsghdr - - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/internal/socket/defs_linux.go b/deps/golang.org/x/net/internal/socket/defs_linux.go deleted file mode 100644 index ce9ec2f6d..000000000 --- a/deps/golang.org/x/net/internal/socket/defs_linux.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package socket - -/* -#include -#include - -#define _GNU_SOURCE -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW -) - -type iovec C.struct_iovec - -type msghdr C.struct_msghdr - -type mmsghdr C.struct_mmsghdr - -type cmsghdr C.struct_cmsghdr - -type sockaddrInet C.struct_sockaddr_in - -type sockaddrInet6 C.struct_sockaddr_in6 - -const ( - sizeofIovec = C.sizeof_struct_iovec - sizeofMsghdr = C.sizeof_struct_msghdr - sizeofMmsghdr = C.sizeof_struct_mmsghdr - sizeofCmsghdr = C.sizeof_struct_cmsghdr - - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/internal/socket/defs_netbsd.go b/deps/golang.org/x/net/internal/socket/defs_netbsd.go deleted file mode 100644 index 3f8433569..000000000 --- a/deps/golang.org/x/net/internal/socket/defs_netbsd.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package socket - -/* -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW -) - -type iovec C.struct_iovec - -type msghdr C.struct_msghdr - -type mmsghdr C.struct_mmsghdr - -type cmsghdr C.struct_cmsghdr - -type sockaddrInet C.struct_sockaddr_in - -type sockaddrInet6 C.struct_sockaddr_in6 - -const ( - sizeofIovec = C.sizeof_struct_iovec - sizeofMsghdr = C.sizeof_struct_msghdr - sizeofMmsghdr = C.sizeof_struct_mmsghdr - sizeofCmsghdr = C.sizeof_struct_cmsghdr - - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/internal/socket/defs_openbsd.go b/deps/golang.org/x/net/internal/socket/defs_openbsd.go deleted file mode 100644 index 14e28c0b4..000000000 --- a/deps/golang.org/x/net/internal/socket/defs_openbsd.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package socket - -/* -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW -) - -type iovec C.struct_iovec - -type msghdr C.struct_msghdr - -type cmsghdr C.struct_cmsghdr - -type sockaddrInet C.struct_sockaddr_in - -type sockaddrInet6 C.struct_sockaddr_in6 - -const ( - sizeofIovec = C.sizeof_struct_iovec - sizeofMsghdr = C.sizeof_struct_msghdr - sizeofCmsghdr = C.sizeof_struct_cmsghdr - - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/internal/socket/defs_solaris.go b/deps/golang.org/x/net/internal/socket/defs_solaris.go deleted file mode 100644 index 14e28c0b4..000000000 --- a/deps/golang.org/x/net/internal/socket/defs_solaris.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package socket - -/* -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW -) - -type iovec C.struct_iovec - -type msghdr C.struct_msghdr - -type cmsghdr C.struct_cmsghdr - -type sockaddrInet C.struct_sockaddr_in - -type sockaddrInet6 C.struct_sockaddr_in6 - -const ( - sizeofIovec = C.sizeof_struct_iovec - sizeofMsghdr = C.sizeof_struct_msghdr - sizeofCmsghdr = C.sizeof_struct_cmsghdr - - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/internal/socket/error_unix.go b/deps/golang.org/x/net/internal/socket/error_unix.go deleted file mode 100644 index 93dff9180..000000000 --- a/deps/golang.org/x/net/internal/socket/error_unix.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package socket - -import "syscall" - -var ( - errEAGAIN error = syscall.EAGAIN - errEINVAL error = syscall.EINVAL - errENOENT error = syscall.ENOENT -) - -// errnoErr returns common boxed Errno values, to prevent allocations -// at runtime. -func errnoErr(errno syscall.Errno) error { - switch errno { - case 0: - return nil - case syscall.EAGAIN: - return errEAGAIN - case syscall.EINVAL: - return errEINVAL - case syscall.ENOENT: - return errENOENT - } - return errno -} diff --git a/deps/golang.org/x/net/internal/socket/error_windows.go b/deps/golang.org/x/net/internal/socket/error_windows.go deleted file mode 100644 index 6a6379a8b..000000000 --- a/deps/golang.org/x/net/internal/socket/error_windows.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import "syscall" - -var ( - errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING - errEINVAL error = syscall.EINVAL -) - -// errnoErr returns common boxed Errno values, to prevent allocations -// at runtime. -func errnoErr(errno syscall.Errno) error { - switch errno { - case 0: - return nil - case syscall.ERROR_IO_PENDING: - return errERROR_IO_PENDING - case syscall.EINVAL: - return errEINVAL - } - return errno -} diff --git a/deps/golang.org/x/net/internal/socket/iovec_32bit.go b/deps/golang.org/x/net/internal/socket/iovec_32bit.go deleted file mode 100644 index 05d6082d1..000000000 --- a/deps/golang.org/x/net/internal/socket/iovec_32bit.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm mips mipsle 386 -// +build darwin dragonfly freebsd linux netbsd openbsd - -package socket - -import "unsafe" - -func (v *iovec) set(b []byte) { - l := len(b) - if l == 0 { - return - } - v.Base = (*byte)(unsafe.Pointer(&b[0])) - v.Len = uint32(l) -} diff --git a/deps/golang.org/x/net/internal/socket/iovec_64bit.go b/deps/golang.org/x/net/internal/socket/iovec_64bit.go deleted file mode 100644 index afb34ad58..000000000 --- a/deps/golang.org/x/net/internal/socket/iovec_64bit.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x -// +build darwin dragonfly freebsd linux netbsd openbsd - -package socket - -import "unsafe" - -func (v *iovec) set(b []byte) { - l := len(b) - if l == 0 { - return - } - v.Base = (*byte)(unsafe.Pointer(&b[0])) - v.Len = uint64(l) -} diff --git a/deps/golang.org/x/net/internal/socket/iovec_solaris_64bit.go b/deps/golang.org/x/net/internal/socket/iovec_solaris_64bit.go deleted file mode 100644 index 8d17a40c4..000000000 --- a/deps/golang.org/x/net/internal/socket/iovec_solaris_64bit.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64 -// +build solaris - -package socket - -import "unsafe" - -func (v *iovec) set(b []byte) { - l := len(b) - if l == 0 { - return - } - v.Base = (*int8)(unsafe.Pointer(&b[0])) - v.Len = uint64(l) -} diff --git a/deps/golang.org/x/net/internal/socket/iovec_stub.go b/deps/golang.org/x/net/internal/socket/iovec_stub.go deleted file mode 100644 index c87d2a933..000000000 --- a/deps/golang.org/x/net/internal/socket/iovec_stub.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris - -package socket - -type iovec struct{} - -func (v *iovec) set(b []byte) {} diff --git a/deps/golang.org/x/net/internal/socket/mmsghdr_stub.go b/deps/golang.org/x/net/internal/socket/mmsghdr_stub.go deleted file mode 100644 index 2e80a9cb7..000000000 --- a/deps/golang.org/x/net/internal/socket/mmsghdr_stub.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !linux,!netbsd - -package socket - -import "net" - -type mmsghdr struct{} - -type mmsghdrs []mmsghdr - -func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error { - return nil -} - -func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error { - return nil -} diff --git a/deps/golang.org/x/net/internal/socket/mmsghdr_unix.go b/deps/golang.org/x/net/internal/socket/mmsghdr_unix.go deleted file mode 100644 index 3c42ea7ad..000000000 --- a/deps/golang.org/x/net/internal/socket/mmsghdr_unix.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux netbsd - -package socket - -import "net" - -type mmsghdrs []mmsghdr - -func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error { - for i := range hs { - vs := make([]iovec, len(ms[i].Buffers)) - var sa []byte - if parseFn != nil { - sa = make([]byte, sizeofSockaddrInet6) - } - if marshalFn != nil { - sa = marshalFn(ms[i].Addr) - } - hs[i].Hdr.pack(vs, ms[i].Buffers, ms[i].OOB, sa) - } - return nil -} - -func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error { - for i := range hs { - ms[i].N = int(hs[i].Len) - ms[i].NN = hs[i].Hdr.controllen() - ms[i].Flags = hs[i].Hdr.flags() - if parseFn != nil { - var err error - ms[i].Addr, err = parseFn(hs[i].Hdr.name(), hint) - if err != nil { - return err - } - } - } - return nil -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_bsd.go b/deps/golang.org/x/net/internal/socket/msghdr_bsd.go deleted file mode 100644 index 5567afc88..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_bsd.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package socket - -import "unsafe" - -func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { - for i := range vs { - vs[i].set(bs[i]) - } - h.setIov(vs) - if len(oob) > 0 { - h.Control = (*byte)(unsafe.Pointer(&oob[0])) - h.Controllen = uint32(len(oob)) - } - if sa != nil { - h.Name = (*byte)(unsafe.Pointer(&sa[0])) - h.Namelen = uint32(len(sa)) - } -} - -func (h *msghdr) name() []byte { - if h.Name != nil && h.Namelen > 0 { - return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen] - } - return nil -} - -func (h *msghdr) controllen() int { - return int(h.Controllen) -} - -func (h *msghdr) flags() int { - return int(h.Flags) -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_bsdvar.go b/deps/golang.org/x/net/internal/socket/msghdr_bsdvar.go deleted file mode 100644 index b8c87b72b..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_bsdvar.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd - -package socket - -func (h *msghdr) setIov(vs []iovec) { - l := len(vs) - if l == 0 { - return - } - h.Iov = &vs[0] - h.Iovlen = int32(l) -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_linux.go b/deps/golang.org/x/net/internal/socket/msghdr_linux.go deleted file mode 100644 index 5a38798cc..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_linux.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import "unsafe" - -func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { - for i := range vs { - vs[i].set(bs[i]) - } - h.setIov(vs) - if len(oob) > 0 { - h.setControl(oob) - } - if sa != nil { - h.Name = (*byte)(unsafe.Pointer(&sa[0])) - h.Namelen = uint32(len(sa)) - } -} - -func (h *msghdr) name() []byte { - if h.Name != nil && h.Namelen > 0 { - return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen] - } - return nil -} - -func (h *msghdr) controllen() int { - return int(h.Controllen) -} - -func (h *msghdr) flags() int { - return int(h.Flags) -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_linux_32bit.go b/deps/golang.org/x/net/internal/socket/msghdr_linux_32bit.go deleted file mode 100644 index a7a5987c8..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_linux_32bit.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm mips mipsle 386 -// +build linux - -package socket - -import "unsafe" - -func (h *msghdr) setIov(vs []iovec) { - l := len(vs) - if l == 0 { - return - } - h.Iov = &vs[0] - h.Iovlen = uint32(l) -} - -func (h *msghdr) setControl(b []byte) { - h.Control = (*byte)(unsafe.Pointer(&b[0])) - h.Controllen = uint32(len(b)) -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_linux_64bit.go b/deps/golang.org/x/net/internal/socket/msghdr_linux_64bit.go deleted file mode 100644 index 610fc4f3b..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_linux_64bit.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x -// +build linux - -package socket - -import "unsafe" - -func (h *msghdr) setIov(vs []iovec) { - l := len(vs) - if l == 0 { - return - } - h.Iov = &vs[0] - h.Iovlen = uint64(l) -} - -func (h *msghdr) setControl(b []byte) { - h.Control = (*byte)(unsafe.Pointer(&b[0])) - h.Controllen = uint64(len(b)) -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_openbsd.go b/deps/golang.org/x/net/internal/socket/msghdr_openbsd.go deleted file mode 100644 index 71a69e251..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_openbsd.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -func (h *msghdr) setIov(vs []iovec) { - l := len(vs) - if l == 0 { - return - } - h.Iov = &vs[0] - h.Iovlen = uint32(l) -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go b/deps/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go deleted file mode 100644 index 6465b2073..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64 -// +build solaris - -package socket - -import "unsafe" - -func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { - for i := range vs { - vs[i].set(bs[i]) - } - if len(vs) > 0 { - h.Iov = &vs[0] - h.Iovlen = int32(len(vs)) - } - if len(oob) > 0 { - h.Accrights = (*int8)(unsafe.Pointer(&oob[0])) - h.Accrightslen = int32(len(oob)) - } - if sa != nil { - h.Name = (*byte)(unsafe.Pointer(&sa[0])) - h.Namelen = uint32(len(sa)) - } -} - -func (h *msghdr) controllen() int { - return int(h.Accrightslen) -} - -func (h *msghdr) flags() int { - return int(NativeEndian.Uint32(h.Pad_cgo_2[:])) -} diff --git a/deps/golang.org/x/net/internal/socket/msghdr_stub.go b/deps/golang.org/x/net/internal/socket/msghdr_stub.go deleted file mode 100644 index 64e817335..000000000 --- a/deps/golang.org/x/net/internal/socket/msghdr_stub.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris - -package socket - -type msghdr struct{} - -func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {} -func (h *msghdr) name() []byte { return nil } -func (h *msghdr) controllen() int { return 0 } -func (h *msghdr) flags() int { return 0 } diff --git a/deps/golang.org/x/net/internal/socket/rawconn.go b/deps/golang.org/x/net/internal/socket/rawconn.go deleted file mode 100644 index d6871d55f..000000000 --- a/deps/golang.org/x/net/internal/socket/rawconn.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package socket - -import ( - "errors" - "net" - "os" - "syscall" -) - -// A Conn represents a raw connection. -type Conn struct { - network string - c syscall.RawConn -} - -// NewConn returns a new raw connection. -func NewConn(c net.Conn) (*Conn, error) { - var err error - var cc Conn - switch c := c.(type) { - case *net.TCPConn: - cc.network = "tcp" - cc.c, err = c.SyscallConn() - case *net.UDPConn: - cc.network = "udp" - cc.c, err = c.SyscallConn() - case *net.IPConn: - cc.network = "ip" - cc.c, err = c.SyscallConn() - default: - return nil, errors.New("unknown connection type") - } - if err != nil { - return nil, err - } - return &cc, nil -} - -func (o *Option) get(c *Conn, b []byte) (int, error) { - var operr error - var n int - fn := func(s uintptr) { - n, operr = getsockopt(s, o.Level, o.Name, b) - } - if err := c.c.Control(fn); err != nil { - return 0, err - } - return n, os.NewSyscallError("getsockopt", operr) -} - -func (o *Option) set(c *Conn, b []byte) error { - var operr error - fn := func(s uintptr) { - operr = setsockopt(s, o.Level, o.Name, b) - } - if err := c.c.Control(fn); err != nil { - return err - } - return os.NewSyscallError("setsockopt", operr) -} diff --git a/deps/golang.org/x/net/internal/socket/rawconn_mmsg.go b/deps/golang.org/x/net/internal/socket/rawconn_mmsg.go deleted file mode 100644 index 499164a3f..000000000 --- a/deps/golang.org/x/net/internal/socket/rawconn_mmsg.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build linux - -package socket - -import ( - "net" - "os" - "syscall" -) - -func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { - hs := make(mmsghdrs, len(ms)) - var parseFn func([]byte, string) (net.Addr, error) - if c.network != "tcp" { - parseFn = parseInetAddr - } - if err := hs.pack(ms, parseFn, nil); err != nil { - return 0, err - } - var operr error - var n int - fn := func(s uintptr) bool { - n, operr = recvmmsg(s, hs, flags) - if operr == syscall.EAGAIN { - return false - } - return true - } - if err := c.c.Read(fn); err != nil { - return n, err - } - if operr != nil { - return n, os.NewSyscallError("recvmmsg", operr) - } - if err := hs[:n].unpack(ms[:n], parseFn, c.network); err != nil { - return n, err - } - return n, nil -} - -func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { - hs := make(mmsghdrs, len(ms)) - var marshalFn func(net.Addr) []byte - if c.network != "tcp" { - marshalFn = marshalInetAddr - } - if err := hs.pack(ms, nil, marshalFn); err != nil { - return 0, err - } - var operr error - var n int - fn := func(s uintptr) bool { - n, operr = sendmmsg(s, hs, flags) - if operr == syscall.EAGAIN { - return false - } - return true - } - if err := c.c.Write(fn); err != nil { - return n, err - } - if operr != nil { - return n, os.NewSyscallError("sendmmsg", operr) - } - if err := hs[:n].unpack(ms[:n], nil, ""); err != nil { - return n, err - } - return n, nil -} diff --git a/deps/golang.org/x/net/internal/socket/rawconn_msg.go b/deps/golang.org/x/net/internal/socket/rawconn_msg.go deleted file mode 100644 index b21d2e641..000000000 --- a/deps/golang.org/x/net/internal/socket/rawconn_msg.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package socket - -import ( - "os" - "syscall" -) - -func (c *Conn) recvMsg(m *Message, flags int) error { - var h msghdr - vs := make([]iovec, len(m.Buffers)) - var sa []byte - if c.network != "tcp" { - sa = make([]byte, sizeofSockaddrInet6) - } - h.pack(vs, m.Buffers, m.OOB, sa) - var operr error - var n int - fn := func(s uintptr) bool { - n, operr = recvmsg(s, &h, flags) - if operr == syscall.EAGAIN { - return false - } - return true - } - if err := c.c.Read(fn); err != nil { - return err - } - if operr != nil { - return os.NewSyscallError("recvmsg", operr) - } - if c.network != "tcp" { - var err error - m.Addr, err = parseInetAddr(sa[:], c.network) - if err != nil { - return err - } - } - m.N = n - m.NN = h.controllen() - m.Flags = h.flags() - return nil -} - -func (c *Conn) sendMsg(m *Message, flags int) error { - var h msghdr - vs := make([]iovec, len(m.Buffers)) - var sa []byte - if m.Addr != nil { - sa = marshalInetAddr(m.Addr) - } - h.pack(vs, m.Buffers, m.OOB, sa) - var operr error - var n int - fn := func(s uintptr) bool { - n, operr = sendmsg(s, &h, flags) - if operr == syscall.EAGAIN { - return false - } - return true - } - if err := c.c.Write(fn); err != nil { - return err - } - if operr != nil { - return os.NewSyscallError("sendmsg", operr) - } - m.N = n - m.NN = len(m.OOB) - return nil -} diff --git a/deps/golang.org/x/net/internal/socket/rawconn_nommsg.go b/deps/golang.org/x/net/internal/socket/rawconn_nommsg.go deleted file mode 100644 index f78832aa4..000000000 --- a/deps/golang.org/x/net/internal/socket/rawconn_nommsg.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build !linux - -package socket - -import "errors" - -func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { - return 0, errors.New("not implemented") -} diff --git a/deps/golang.org/x/net/internal/socket/rawconn_nomsg.go b/deps/golang.org/x/net/internal/socket/rawconn_nomsg.go deleted file mode 100644 index 96733cbe1..000000000 --- a/deps/golang.org/x/net/internal/socket/rawconn_nomsg.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package socket - -import "errors" - -func (c *Conn) recvMsg(m *Message, flags int) error { - return errors.New("not implemented") -} - -func (c *Conn) sendMsg(m *Message, flags int) error { - return errors.New("not implemented") -} diff --git a/deps/golang.org/x/net/internal/socket/rawconn_stub.go b/deps/golang.org/x/net/internal/socket/rawconn_stub.go deleted file mode 100644 index d2add1a0a..000000000 --- a/deps/golang.org/x/net/internal/socket/rawconn_stub.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package socket - -import "errors" - -func (c *Conn) recvMsg(m *Message, flags int) error { - return errors.New("not implemented") -} - -func (c *Conn) sendMsg(m *Message, flags int) error { - return errors.New("not implemented") -} - -func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { - return 0, errors.New("not implemented") -} diff --git a/deps/golang.org/x/net/internal/socket/reflect.go b/deps/golang.org/x/net/internal/socket/reflect.go deleted file mode 100644 index bb179f11d..000000000 --- a/deps/golang.org/x/net/internal/socket/reflect.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package socket - -import ( - "errors" - "net" - "os" - "reflect" - "runtime" -) - -// A Conn represents a raw connection. -type Conn struct { - c net.Conn -} - -// NewConn returns a new raw connection. -func NewConn(c net.Conn) (*Conn, error) { - return &Conn{c: c}, nil -} - -func (o *Option) get(c *Conn, b []byte) (int, error) { - s, err := socketOf(c.c) - if err != nil { - return 0, err - } - n, err := getsockopt(s, o.Level, o.Name, b) - return n, os.NewSyscallError("getsockopt", err) -} - -func (o *Option) set(c *Conn, b []byte) error { - s, err := socketOf(c.c) - if err != nil { - return err - } - return os.NewSyscallError("setsockopt", setsockopt(s, o.Level, o.Name, b)) -} - -func socketOf(c net.Conn) (uintptr, error) { - switch c.(type) { - case *net.TCPConn, *net.UDPConn, *net.IPConn: - v := reflect.ValueOf(c) - switch e := v.Elem(); e.Kind() { - case reflect.Struct: - fd := e.FieldByName("conn").FieldByName("fd") - switch e := fd.Elem(); e.Kind() { - case reflect.Struct: - sysfd := e.FieldByName("sysfd") - if runtime.GOOS == "windows" { - return uintptr(sysfd.Uint()), nil - } - return uintptr(sysfd.Int()), nil - } - } - } - return 0, errors.New("invalid type") -} diff --git a/deps/golang.org/x/net/internal/socket/socket.go b/deps/golang.org/x/net/internal/socket/socket.go deleted file mode 100644 index 5f9730e6d..000000000 --- a/deps/golang.org/x/net/internal/socket/socket.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package socket provides a portable interface for socket system -// calls. -package socket // import "golang.org/x/net/internal/socket" - -import ( - "errors" - "net" - "unsafe" -) - -// An Option represents a sticky socket option. -type Option struct { - Level int // level - Name int // name; must be equal or greater than 1 - Len int // length of value in bytes; must be equal or greater than 1 -} - -// Get reads a value for the option from the kernel. -// It returns the number of bytes written into b. -func (o *Option) Get(c *Conn, b []byte) (int, error) { - if o.Name < 1 || o.Len < 1 { - return 0, errors.New("invalid option") - } - if len(b) < o.Len { - return 0, errors.New("short buffer") - } - return o.get(c, b) -} - -// GetInt returns an integer value for the option. -// -// The Len field of Option must be either 1 or 4. -func (o *Option) GetInt(c *Conn) (int, error) { - if o.Len != 1 && o.Len != 4 { - return 0, errors.New("invalid option") - } - var b []byte - var bb [4]byte - if o.Len == 1 { - b = bb[:1] - } else { - b = bb[:4] - } - n, err := o.get(c, b) - if err != nil { - return 0, err - } - if n != o.Len { - return 0, errors.New("invalid option length") - } - if o.Len == 1 { - return int(b[0]), nil - } - return int(NativeEndian.Uint32(b[:4])), nil -} - -// Set writes the option and value to the kernel. -func (o *Option) Set(c *Conn, b []byte) error { - if o.Name < 1 || o.Len < 1 { - return errors.New("invalid option") - } - if len(b) < o.Len { - return errors.New("short buffer") - } - return o.set(c, b) -} - -// SetInt writes the option and value to the kernel. -// -// The Len field of Option must be either 1 or 4. -func (o *Option) SetInt(c *Conn, v int) error { - if o.Len != 1 && o.Len != 4 { - return errors.New("invalid option") - } - var b []byte - if o.Len == 1 { - b = []byte{byte(v)} - } else { - var bb [4]byte - NativeEndian.PutUint32(bb[:o.Len], uint32(v)) - b = bb[:4] - } - return o.set(c, b) -} - -func controlHeaderLen() int { - return roundup(sizeofCmsghdr) -} - -func controlMessageLen(dataLen int) int { - return roundup(sizeofCmsghdr) + dataLen -} - -// ControlMessageSpace returns the whole length of control message. -func ControlMessageSpace(dataLen int) int { - return roundup(sizeofCmsghdr) + roundup(dataLen) -} - -// A ControlMessage represents the head message in a stream of control -// messages. -// -// A control message comprises of a header, data and a few padding -// fields to conform to the interface to the kernel. -// -// See RFC 3542 for further information. -type ControlMessage []byte - -// Data returns the data field of the control message at the head on -// m. -func (m ControlMessage) Data(dataLen int) []byte { - l := controlHeaderLen() - if len(m) < l || len(m) < l+dataLen { - return nil - } - return m[l : l+dataLen] -} - -// Next returns the control message at the next on m. -// -// Next works only for standard control messages. -func (m ControlMessage) Next(dataLen int) ControlMessage { - l := ControlMessageSpace(dataLen) - if len(m) < l { - return nil - } - return m[l:] -} - -// MarshalHeader marshals the header fields of the control message at -// the head on m. -func (m ControlMessage) MarshalHeader(lvl, typ, dataLen int) error { - if len(m) < controlHeaderLen() { - return errors.New("short message") - } - h := (*cmsghdr)(unsafe.Pointer(&m[0])) - h.set(controlMessageLen(dataLen), lvl, typ) - return nil -} - -// ParseHeader parses and returns the header fields of the control -// message at the head on m. -func (m ControlMessage) ParseHeader() (lvl, typ, dataLen int, err error) { - l := controlHeaderLen() - if len(m) < l { - return 0, 0, 0, errors.New("short message") - } - h := (*cmsghdr)(unsafe.Pointer(&m[0])) - return h.lvl(), h.typ(), int(uint64(h.len()) - uint64(l)), nil -} - -// Marshal marshals the control message at the head on m, and returns -// the next control message. -func (m ControlMessage) Marshal(lvl, typ int, data []byte) (ControlMessage, error) { - l := len(data) - if len(m) < ControlMessageSpace(l) { - return nil, errors.New("short message") - } - h := (*cmsghdr)(unsafe.Pointer(&m[0])) - h.set(controlMessageLen(l), lvl, typ) - if l > 0 { - copy(m.Data(l), data) - } - return m.Next(l), nil -} - -// Parse parses m as a single or multiple control messages. -// -// Parse works for both standard and compatible messages. -func (m ControlMessage) Parse() ([]ControlMessage, error) { - var ms []ControlMessage - for len(m) >= controlHeaderLen() { - h := (*cmsghdr)(unsafe.Pointer(&m[0])) - l := h.len() - if l <= 0 { - return nil, errors.New("invalid header length") - } - if uint64(l) < uint64(controlHeaderLen()) { - return nil, errors.New("invalid message length") - } - if uint64(l) > uint64(len(m)) { - return nil, errors.New("short buffer") - } - // On message reception: - // - // |<- ControlMessageSpace --------------->| - // |<- controlMessageLen ---------->| | - // |<- controlHeaderLen ->| | | - // +---------------+------+---------+------+ - // | Header | PadH | Data | PadD | - // +---------------+------+---------+------+ - // - // On compatible message reception: - // - // | ... |<- controlMessageLen ----------->| - // | ... |<- controlHeaderLen ->| | - // +-----+---------------+------+----------+ - // | ... | Header | PadH | Data | - // +-----+---------------+------+----------+ - ms = append(ms, ControlMessage(m[:l])) - ll := l - controlHeaderLen() - if len(m) >= ControlMessageSpace(ll) { - m = m[ControlMessageSpace(ll):] - } else { - m = m[controlMessageLen(ll):] - } - } - return ms, nil -} - -// NewControlMessage returns a new stream of control messages. -func NewControlMessage(dataLen []int) ControlMessage { - var l int - for i := range dataLen { - l += ControlMessageSpace(dataLen[i]) - } - return make([]byte, l) -} - -// A Message represents an IO message. -type Message struct { - // When writing, the Buffers field must contain at least one - // byte to write. - // When reading, the Buffers field will always contain a byte - // to read. - Buffers [][]byte - - // OOB contains protocol-specific control or miscellaneous - // ancillary data known as out-of-band data. - OOB []byte - - // Addr specifies a destination address when writing. - // It can be nil when the underlying protocol of the raw - // connection uses connection-oriented communication. - // After a successful read, it may contain the source address - // on the received packet. - Addr net.Addr - - N int // # of bytes read or written from/to Buffers - NN int // # of bytes read or written from/to OOB - Flags int // protocol-specific information on the received message -} - -// RecvMsg wraps recvmsg system call. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_PEEK. -func (c *Conn) RecvMsg(m *Message, flags int) error { - return c.recvMsg(m, flags) -} - -// SendMsg wraps sendmsg system call. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_DONTROUTE. -func (c *Conn) SendMsg(m *Message, flags int) error { - return c.sendMsg(m, flags) -} - -// RecvMsgs wraps recvmmsg system call. -// -// It returns the number of processed messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_PEEK. -// -// Only Linux supports this. -func (c *Conn) RecvMsgs(ms []Message, flags int) (int, error) { - return c.recvMsgs(ms, flags) -} - -// SendMsgs wraps sendmmsg system call. -// -// It returns the number of processed messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_DONTROUTE. -// -// Only Linux supports this. -func (c *Conn) SendMsgs(ms []Message, flags int) (int, error) { - return c.sendMsgs(ms, flags) -} diff --git a/deps/golang.org/x/net/internal/socket/socket_go1_9_test.go b/deps/golang.org/x/net/internal/socket/socket_go1_9_test.go deleted file mode 100644 index c4edd4a8d..000000000 --- a/deps/golang.org/x/net/internal/socket/socket_go1_9_test.go +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package socket_test - -import ( - "bytes" - "fmt" - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/internal/socket" -) - -type mockControl struct { - Level int - Type int - Data []byte -} - -func TestControlMessage(t *testing.T) { - for _, tt := range []struct { - cs []mockControl - }{ - { - []mockControl{ - {Level: 1, Type: 1}, - }, - }, - { - []mockControl{ - {Level: 2, Type: 2, Data: []byte{0xfe}}, - }, - }, - { - []mockControl{ - {Level: 3, Type: 3, Data: []byte{0xfe, 0xff, 0xff, 0xfe}}, - }, - }, - { - []mockControl{ - {Level: 4, Type: 4, Data: []byte{0xfe, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfe}}, - }, - }, - { - []mockControl{ - {Level: 4, Type: 4, Data: []byte{0xfe, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfe}}, - {Level: 2, Type: 2, Data: []byte{0xfe}}, - }, - }, - } { - var w []byte - var tailPadLen int - mm := socket.NewControlMessage([]int{0}) - for i, c := range tt.cs { - m := socket.NewControlMessage([]int{len(c.Data)}) - l := len(m) - len(mm) - if i == len(tt.cs)-1 && l > len(c.Data) { - tailPadLen = l - len(c.Data) - } - w = append(w, m...) - } - - var err error - ww := make([]byte, len(w)) - copy(ww, w) - m := socket.ControlMessage(ww) - for _, c := range tt.cs { - if err = m.MarshalHeader(c.Level, c.Type, len(c.Data)); err != nil { - t.Fatalf("(%v).MarshalHeader() = %v", tt.cs, err) - } - copy(m.Data(len(c.Data)), c.Data) - m = m.Next(len(c.Data)) - } - m = socket.ControlMessage(w) - for _, c := range tt.cs { - m, err = m.Marshal(c.Level, c.Type, c.Data) - if err != nil { - t.Fatalf("(%v).Marshal() = %v", tt.cs, err) - } - } - if !bytes.Equal(ww, w) { - t.Fatalf("got %#v; want %#v", ww, w) - } - - ws := [][]byte{w} - if tailPadLen > 0 { - // Test a message with no tail padding. - nopad := w[:len(w)-tailPadLen] - ws = append(ws, [][]byte{nopad}...) - } - for _, w := range ws { - ms, err := socket.ControlMessage(w).Parse() - if err != nil { - t.Fatalf("(%v).Parse() = %v", tt.cs, err) - } - for i, m := range ms { - lvl, typ, dataLen, err := m.ParseHeader() - if err != nil { - t.Fatalf("(%v).ParseHeader() = %v", tt.cs, err) - } - if lvl != tt.cs[i].Level || typ != tt.cs[i].Type || dataLen != len(tt.cs[i].Data) { - t.Fatalf("%v: got %d, %d, %d; want %d, %d, %d", tt.cs[i], lvl, typ, dataLen, tt.cs[i].Level, tt.cs[i].Type, len(tt.cs[i].Data)) - } - } - } - } -} - -func TestUDP(t *testing.T) { - c, err := nettest.NewLocalPacketListener("udp") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - cc, err := socket.NewConn(c.(net.Conn)) - if err != nil { - t.Fatal(err) - } - - t.Run("Message", func(t *testing.T) { - data := []byte("HELLO-R-U-THERE") - wm := socket.Message{ - Buffers: bytes.SplitAfter(data, []byte("-")), - Addr: c.LocalAddr(), - } - if err := cc.SendMsg(&wm, 0); err != nil { - t.Fatal(err) - } - b := make([]byte, 32) - rm := socket.Message{ - Buffers: [][]byte{b[:1], b[1:3], b[3:7], b[7:11], b[11:]}, - } - if err := cc.RecvMsg(&rm, 0); err != nil { - t.Fatal(err) - } - if !bytes.Equal(b[:rm.N], data) { - t.Fatalf("got %#v; want %#v", b[:rm.N], data) - } - }) - switch runtime.GOOS { - case "android", "linux": - t.Run("Messages", func(t *testing.T) { - data := []byte("HELLO-R-U-THERE") - wmbs := bytes.SplitAfter(data, []byte("-")) - wms := []socket.Message{ - {Buffers: wmbs[:1], Addr: c.LocalAddr()}, - {Buffers: wmbs[1:], Addr: c.LocalAddr()}, - } - n, err := cc.SendMsgs(wms, 0) - if err != nil { - t.Fatal(err) - } - if n != len(wms) { - t.Fatalf("got %d; want %d", n, len(wms)) - } - b := make([]byte, 32) - rmbs := [][][]byte{{b[:len(wmbs[0])]}, {b[len(wmbs[0]):]}} - rms := []socket.Message{ - {Buffers: rmbs[0]}, - {Buffers: rmbs[1]}, - } - n, err = cc.RecvMsgs(rms, 0) - if err != nil { - t.Fatal(err) - } - if n != len(rms) { - t.Fatalf("got %d; want %d", n, len(rms)) - } - nn := 0 - for i := 0; i < n; i++ { - nn += rms[i].N - } - if !bytes.Equal(b[:nn], data) { - t.Fatalf("got %#v; want %#v", b[:nn], data) - } - }) - } - - // The behavior of transmission for zero byte paylaod depends - // on each platform implementation. Some may transmit only - // protocol header and options, other may transmit nothing. - // We test only that SendMsg and SendMsgs will not crash with - // empty buffers. - wm := socket.Message{ - Buffers: [][]byte{{}}, - Addr: c.LocalAddr(), - } - cc.SendMsg(&wm, 0) - wms := []socket.Message{ - {Buffers: [][]byte{{}}, Addr: c.LocalAddr()}, - } - cc.SendMsgs(wms, 0) -} - -func BenchmarkUDP(b *testing.B) { - c, err := nettest.NewLocalPacketListener("udp") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - cc, err := socket.NewConn(c.(net.Conn)) - if err != nil { - b.Fatal(err) - } - data := []byte("HELLO-R-U-THERE") - wm := socket.Message{ - Buffers: [][]byte{data}, - Addr: c.LocalAddr(), - } - rm := socket.Message{ - Buffers: [][]byte{make([]byte, 128)}, - OOB: make([]byte, 128), - } - - for M := 1; M <= 1<<9; M = M << 1 { - b.Run(fmt.Sprintf("Iter-%d", M), func(b *testing.B) { - for i := 0; i < b.N; i++ { - for j := 0; j < M; j++ { - if err := cc.SendMsg(&wm, 0); err != nil { - b.Fatal(err) - } - if err := cc.RecvMsg(&rm, 0); err != nil { - b.Fatal(err) - } - } - } - }) - switch runtime.GOOS { - case "android", "linux": - wms := make([]socket.Message, M) - for i := range wms { - wms[i].Buffers = [][]byte{data} - wms[i].Addr = c.LocalAddr() - } - rms := make([]socket.Message, M) - for i := range rms { - rms[i].Buffers = [][]byte{make([]byte, 128)} - rms[i].OOB = make([]byte, 128) - } - b.Run(fmt.Sprintf("Batch-%d", M), func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := cc.SendMsgs(wms, 0); err != nil { - b.Fatal(err) - } - if _, err := cc.RecvMsgs(rms, 0); err != nil { - b.Fatal(err) - } - } - }) - } - } -} diff --git a/deps/golang.org/x/net/internal/socket/socket_test.go b/deps/golang.org/x/net/internal/socket/socket_test.go deleted file mode 100644 index bf3751b5e..000000000 --- a/deps/golang.org/x/net/internal/socket/socket_test.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package socket_test - -import ( - "net" - "runtime" - "syscall" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/internal/socket" -) - -func TestSocket(t *testing.T) { - t.Run("Option", func(t *testing.T) { - testSocketOption(t, &socket.Option{Level: syscall.SOL_SOCKET, Name: syscall.SO_RCVBUF, Len: 4}) - }) -} - -func testSocketOption(t *testing.T, so *socket.Option) { - c, err := nettest.NewLocalPacketListener("udp") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - cc, err := socket.NewConn(c.(net.Conn)) - if err != nil { - t.Fatal(err) - } - const N = 2048 - if err := so.SetInt(cc, N); err != nil { - t.Fatal(err) - } - n, err := so.GetInt(cc) - if err != nil { - t.Fatal(err) - } - if n < N { - t.Fatalf("got %d; want greater than or equal to %d", n, N) - } -} diff --git a/deps/golang.org/x/net/internal/socket/sys.go b/deps/golang.org/x/net/internal/socket/sys.go deleted file mode 100644 index 4f0eead13..000000000 --- a/deps/golang.org/x/net/internal/socket/sys.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import ( - "encoding/binary" - "unsafe" -) - -var ( - // NativeEndian is the machine native endian implementation of - // ByteOrder. - NativeEndian binary.ByteOrder - - kernelAlign int -) - -func init() { - i := uint32(1) - b := (*[4]byte)(unsafe.Pointer(&i)) - if b[0] == 1 { - NativeEndian = binary.LittleEndian - } else { - NativeEndian = binary.BigEndian - } - kernelAlign = probeProtocolStack() -} - -func roundup(l int) int { - return (l + kernelAlign - 1) & ^(kernelAlign - 1) -} diff --git a/deps/golang.org/x/net/internal/socket/sys_bsd.go b/deps/golang.org/x/net/internal/socket/sys_bsd.go deleted file mode 100644 index f13e14ff3..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_bsd.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd openbsd - -package socket - -import "errors" - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} diff --git a/deps/golang.org/x/net/internal/socket/sys_bsdvar.go b/deps/golang.org/x/net/internal/socket/sys_bsdvar.go deleted file mode 100644 index f723fa36a..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_bsdvar.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build freebsd netbsd openbsd - -package socket - -import "unsafe" - -func probeProtocolStack() int { - var p uintptr - return int(unsafe.Sizeof(p)) -} diff --git a/deps/golang.org/x/net/internal/socket/sys_darwin.go b/deps/golang.org/x/net/internal/socket/sys_darwin.go deleted file mode 100644 index b17d223bf..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_darwin.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -func probeProtocolStack() int { return 4 } diff --git a/deps/golang.org/x/net/internal/socket/sys_dragonfly.go b/deps/golang.org/x/net/internal/socket/sys_dragonfly.go deleted file mode 100644 index b17d223bf..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_dragonfly.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -func probeProtocolStack() int { return 4 } diff --git a/deps/golang.org/x/net/internal/socket/sys_linux.go b/deps/golang.org/x/net/internal/socket/sys_linux.go deleted file mode 100644 index 1559521e0..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux,!s390x,!386 - -package socket - -import ( - "syscall" - "unsafe" -) - -func probeProtocolStack() int { - var p uintptr - return int(unsafe.Sizeof(p)) -} - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_386.go b/deps/golang.org/x/net/internal/socket/sys_linux_386.go deleted file mode 100644 index 235b2cc08..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_386.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import ( - "syscall" - "unsafe" -) - -func probeProtocolStack() int { return 4 } - -const ( - sysSETSOCKOPT = 0xe - sysGETSOCKOPT = 0xf - sysSENDMSG = 0x10 - sysRECVMSG = 0x11 - sysRECVMMSG = 0x13 - sysSENDMMSG = 0x14 -) - -func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) -func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) - -func getsockopt(s uintptr, level, name int, b []byte) (int, error) { - l := uint32(len(b)) - _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) - return int(l), errnoErr(errno) -} - -func setsockopt(s uintptr, level, name int, b []byte) error { - _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) - return errnoErr(errno) -} - -func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) - return int(n), errnoErr(errno) -} - -func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) - return int(n), errnoErr(errno) -} - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_386.s b/deps/golang.org/x/net/internal/socket/sys_linux_386.s deleted file mode 100644 index 93e7d75ec..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_386.s +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -#include "textflag.h" - -TEXT ·socketcall(SB),NOSPLIT,$0-36 - JMP syscall·socketcall(SB) - -TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 - JMP syscall·rawsocketcall(SB) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_amd64.go b/deps/golang.org/x/net/internal/socket/sys_linux_amd64.go deleted file mode 100644 index 9decee2e5..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_amd64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x12b - sysSENDMMSG = 0x133 -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_arm.go b/deps/golang.org/x/net/internal/socket/sys_linux_arm.go deleted file mode 100644 index d753b436d..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_arm.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x16d - sysSENDMMSG = 0x176 -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_arm64.go b/deps/golang.org/x/net/internal/socket/sys_linux_arm64.go deleted file mode 100644 index b67089436..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0xf3 - sysSENDMMSG = 0x10d -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_mips.go b/deps/golang.org/x/net/internal/socket/sys_linux_mips.go deleted file mode 100644 index 9c0d74014..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_mips.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x10ef - sysSENDMMSG = 0x10f7 -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_mips64.go b/deps/golang.org/x/net/internal/socket/sys_linux_mips64.go deleted file mode 100644 index 071a4aba8..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_mips64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x14ae - sysSENDMMSG = 0x14b6 -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_mips64le.go b/deps/golang.org/x/net/internal/socket/sys_linux_mips64le.go deleted file mode 100644 index 071a4aba8..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_mips64le.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x14ae - sysSENDMMSG = 0x14b6 -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_mipsle.go b/deps/golang.org/x/net/internal/socket/sys_linux_mipsle.go deleted file mode 100644 index 9c0d74014..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_mipsle.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x10ef - sysSENDMMSG = 0x10f7 -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_ppc64.go b/deps/golang.org/x/net/internal/socket/sys_linux_ppc64.go deleted file mode 100644 index 21c1e3f00..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_ppc64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x157 - sysSENDMMSG = 0x15d -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_ppc64le.go b/deps/golang.org/x/net/internal/socket/sys_linux_ppc64le.go deleted file mode 100644 index 21c1e3f00..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_ppc64le.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -const ( - sysRECVMMSG = 0x157 - sysSENDMMSG = 0x15d -) diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_s390x.go b/deps/golang.org/x/net/internal/socket/sys_linux_s390x.go deleted file mode 100644 index 327979efb..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_s390x.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import ( - "syscall" - "unsafe" -) - -func probeProtocolStack() int { return 8 } - -const ( - sysSETSOCKOPT = 0xe - sysGETSOCKOPT = 0xf - sysSENDMSG = 0x10 - sysRECVMSG = 0x11 - sysRECVMMSG = 0x13 - sysSENDMMSG = 0x14 -) - -func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) -func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) - -func getsockopt(s uintptr, level, name int, b []byte) (int, error) { - l := uint32(len(b)) - _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) - return int(l), errnoErr(errno) -} - -func setsockopt(s uintptr, level, name int, b []byte) error { - _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) - return errnoErr(errno) -} - -func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) - return int(n), errnoErr(errno) -} - -func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) - return int(n), errnoErr(errno) -} - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} diff --git a/deps/golang.org/x/net/internal/socket/sys_linux_s390x.s b/deps/golang.org/x/net/internal/socket/sys_linux_s390x.s deleted file mode 100644 index 06d75628c..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_linux_s390x.s +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -#include "textflag.h" - -TEXT ·socketcall(SB),NOSPLIT,$0-72 - JMP syscall·socketcall(SB) - -TEXT ·rawsocketcall(SB),NOSPLIT,$0-72 - JMP syscall·rawsocketcall(SB) diff --git a/deps/golang.org/x/net/internal/socket/sys_netbsd.go b/deps/golang.org/x/net/internal/socket/sys_netbsd.go deleted file mode 100644 index 431851c12..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_netbsd.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import ( - "syscall" - "unsafe" -) - -const ( - sysRECVMMSG = 0x1db - sysSENDMMSG = 0x1dc -) - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) - return int(n), errnoErr(errno) -} diff --git a/deps/golang.org/x/net/internal/socket/sys_posix.go b/deps/golang.org/x/net/internal/socket/sys_posix.go deleted file mode 100644 index dc130c27e..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_posix.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package socket - -import ( - "encoding/binary" - "errors" - "net" - "runtime" - "strconv" - "sync" - "time" -) - -func marshalInetAddr(a net.Addr) []byte { - switch a := a.(type) { - case *net.TCPAddr: - return marshalSockaddr(a.IP, a.Port, a.Zone) - case *net.UDPAddr: - return marshalSockaddr(a.IP, a.Port, a.Zone) - case *net.IPAddr: - return marshalSockaddr(a.IP, 0, a.Zone) - default: - return nil - } -} - -func marshalSockaddr(ip net.IP, port int, zone string) []byte { - if ip4 := ip.To4(); ip4 != nil { - b := make([]byte, sizeofSockaddrInet) - switch runtime.GOOS { - case "android", "linux", "solaris", "windows": - NativeEndian.PutUint16(b[:2], uint16(sysAF_INET)) - default: - b[0] = sizeofSockaddrInet - b[1] = sysAF_INET - } - binary.BigEndian.PutUint16(b[2:4], uint16(port)) - copy(b[4:8], ip4) - return b - } - if ip6 := ip.To16(); ip6 != nil && ip.To4() == nil { - b := make([]byte, sizeofSockaddrInet6) - switch runtime.GOOS { - case "android", "linux", "solaris", "windows": - NativeEndian.PutUint16(b[:2], uint16(sysAF_INET6)) - default: - b[0] = sizeofSockaddrInet6 - b[1] = sysAF_INET6 - } - binary.BigEndian.PutUint16(b[2:4], uint16(port)) - copy(b[8:24], ip6) - if zone != "" { - NativeEndian.PutUint32(b[24:28], uint32(zoneCache.index(zone))) - } - return b - } - return nil -} - -func parseInetAddr(b []byte, network string) (net.Addr, error) { - if len(b) < 2 { - return nil, errors.New("invalid address") - } - var af int - switch runtime.GOOS { - case "android", "linux", "solaris", "windows": - af = int(NativeEndian.Uint16(b[:2])) - default: - af = int(b[1]) - } - var ip net.IP - var zone string - if af == sysAF_INET { - if len(b) < sizeofSockaddrInet { - return nil, errors.New("short address") - } - ip = make(net.IP, net.IPv4len) - copy(ip, b[4:8]) - } - if af == sysAF_INET6 { - if len(b) < sizeofSockaddrInet6 { - return nil, errors.New("short address") - } - ip = make(net.IP, net.IPv6len) - copy(ip, b[8:24]) - if id := int(NativeEndian.Uint32(b[24:28])); id > 0 { - zone = zoneCache.name(id) - } - } - switch network { - case "tcp", "tcp4", "tcp6": - return &net.TCPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil - case "udp", "udp4", "udp6": - return &net.UDPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil - default: - return &net.IPAddr{IP: ip, Zone: zone}, nil - } -} - -// An ipv6ZoneCache represents a cache holding partial network -// interface information. It is used for reducing the cost of IPv6 -// addressing scope zone resolution. -// -// Multiple names sharing the index are managed by first-come -// first-served basis for consistency. -type ipv6ZoneCache struct { - sync.RWMutex // guard the following - lastFetched time.Time // last time routing information was fetched - toIndex map[string]int // interface name to its index - toName map[int]string // interface index to its name -} - -var zoneCache = ipv6ZoneCache{ - toIndex: make(map[string]int), - toName: make(map[int]string), -} - -func (zc *ipv6ZoneCache) update(ift []net.Interface) { - zc.Lock() - defer zc.Unlock() - now := time.Now() - if zc.lastFetched.After(now.Add(-60 * time.Second)) { - return - } - zc.lastFetched = now - if len(ift) == 0 { - var err error - if ift, err = net.Interfaces(); err != nil { - return - } - } - zc.toIndex = make(map[string]int, len(ift)) - zc.toName = make(map[int]string, len(ift)) - for _, ifi := range ift { - zc.toIndex[ifi.Name] = ifi.Index - if _, ok := zc.toName[ifi.Index]; !ok { - zc.toName[ifi.Index] = ifi.Name - } - } -} - -func (zc *ipv6ZoneCache) name(zone int) string { - zoneCache.update(nil) - zoneCache.RLock() - defer zoneCache.RUnlock() - name, ok := zoneCache.toName[zone] - if !ok { - name = strconv.Itoa(zone) - } - return name -} - -func (zc *ipv6ZoneCache) index(zone string) int { - zoneCache.update(nil) - zoneCache.RLock() - defer zoneCache.RUnlock() - index, ok := zoneCache.toIndex[zone] - if !ok { - index, _ = strconv.Atoi(zone) - } - return index -} diff --git a/deps/golang.org/x/net/internal/socket/sys_solaris.go b/deps/golang.org/x/net/internal/socket/sys_solaris.go deleted file mode 100644 index cced74e60..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_solaris.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import ( - "errors" - "runtime" - "syscall" - "unsafe" -) - -func probeProtocolStack() int { - switch runtime.GOARCH { - case "amd64": - return 4 - default: - var p uintptr - return int(unsafe.Sizeof(p)) - } -} - -//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so" -//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" -//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so" -//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so" - -//go:linkname procGetsockopt libc___xnet_getsockopt -//go:linkname procSetsockopt libc_setsockopt -//go:linkname procRecvmsg libc___xnet_recvmsg -//go:linkname procSendmsg libc___xnet_sendmsg - -var ( - procGetsockopt uintptr - procSetsockopt uintptr - procRecvmsg uintptr - procSendmsg uintptr -) - -func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno) -func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno) - -func getsockopt(s uintptr, level, name int, b []byte) (int, error) { - l := uint32(len(b)) - _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) - return int(l), errnoErr(errno) -} - -func setsockopt(s uintptr, level, name int, b []byte) error { - _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) - return errnoErr(errno) -} - -func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procRecvmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) - return int(n), errnoErr(errno) -} - -func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSendmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0) - return int(n), errnoErr(errno) -} - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} diff --git a/deps/golang.org/x/net/internal/socket/sys_solaris_amd64.s b/deps/golang.org/x/net/internal/socket/sys_solaris_amd64.s deleted file mode 100644 index a18ac5ed7..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_solaris_amd64.s +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -#include "textflag.h" - -TEXT ·sysvicall6(SB),NOSPLIT,$0-88 - JMP syscall·sysvicall6(SB) - -TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 - JMP syscall·rawSysvicall6(SB) diff --git a/deps/golang.org/x/net/internal/socket/sys_stub.go b/deps/golang.org/x/net/internal/socket/sys_stub.go deleted file mode 100644 index d9f06d00e..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_stub.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package socket - -import ( - "errors" - "net" - "runtime" - "unsafe" -) - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -func probeProtocolStack() int { - switch runtime.GOARCH { - case "amd64p32", "mips64p32": - return 4 - default: - var p uintptr - return int(unsafe.Sizeof(p)) - } -} - -func marshalInetAddr(ip net.IP, port int, zone string) []byte { - return nil -} - -func parseInetAddr(b []byte, network string) (net.Addr, error) { - return nil, errors.New("not implemented") -} - -func getsockopt(s uintptr, level, name int, b []byte) (int, error) { - return 0, errors.New("not implemented") -} - -func setsockopt(s uintptr, level, name int, b []byte) error { - return errors.New("not implemented") -} - -func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} diff --git a/deps/golang.org/x/net/internal/socket/sys_unix.go b/deps/golang.org/x/net/internal/socket/sys_unix.go deleted file mode 100644 index 18eba3085..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_unix.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux,!s390x,!386 netbsd openbsd - -package socket - -import ( - "syscall" - "unsafe" -) - -func getsockopt(s uintptr, level, name int, b []byte) (int, error) { - l := uint32(len(b)) - _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) - return int(l), errnoErr(errno) -} - -func setsockopt(s uintptr, level, name int, b []byte) error { - _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) - return errnoErr(errno) -} - -func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) - return int(n), errnoErr(errno) -} - -func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { - n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) - return int(n), errnoErr(errno) -} diff --git a/deps/golang.org/x/net/internal/socket/sys_windows.go b/deps/golang.org/x/net/internal/socket/sys_windows.go deleted file mode 100644 index 54a470ebe..000000000 --- a/deps/golang.org/x/net/internal/socket/sys_windows.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socket - -import ( - "errors" - "syscall" - "unsafe" -) - -func probeProtocolStack() int { - var p uintptr - return int(unsafe.Sizeof(p)) -} - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x17 - - sysSOCK_RAW = 0x3 -) - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) - -func getsockopt(s uintptr, level, name int, b []byte) (int, error) { - l := uint32(len(b)) - err := syscall.Getsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), (*int32)(unsafe.Pointer(&l))) - return int(l), err -} - -func setsockopt(s uintptr, level, name int, b []byte) error { - return syscall.Setsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), int32(len(b))) -} - -func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} - -func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { - return 0, errors.New("not implemented") -} diff --git a/deps/golang.org/x/net/internal/socket/zsys_darwin_386.go b/deps/golang.org/x/net/internal/socket/zsys_darwin_386.go deleted file mode 100644 index 26f8feff3..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_darwin_386.go +++ /dev/null @@ -1,59 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_darwin.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1e - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_darwin_amd64.go b/deps/golang.org/x/net/internal/socket/zsys_darwin_amd64.go deleted file mode 100644 index e2987f7db..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_darwin_amd64.go +++ /dev/null @@ -1,61 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_darwin.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1e - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x30 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_darwin_arm.go b/deps/golang.org/x/net/internal/socket/zsys_darwin_arm.go deleted file mode 100644 index 26f8feff3..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_darwin_arm.go +++ /dev/null @@ -1,59 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_darwin.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1e - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_darwin_arm64.go b/deps/golang.org/x/net/internal/socket/zsys_darwin_arm64.go deleted file mode 100644 index e2987f7db..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_darwin_arm64.go +++ /dev/null @@ -1,61 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_darwin.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1e - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x30 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go b/deps/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go deleted file mode 100644 index c582abd57..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go +++ /dev/null @@ -1,61 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_dragonfly.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x30 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_freebsd_386.go b/deps/golang.org/x/net/internal/socket/zsys_freebsd_386.go deleted file mode 100644 index 04a24886c..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_freebsd_386.go +++ /dev/null @@ -1,59 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go b/deps/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go deleted file mode 100644 index 35c7cb9c9..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go +++ /dev/null @@ -1,61 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x30 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_freebsd_arm.go b/deps/golang.org/x/net/internal/socket/zsys_freebsd_arm.go deleted file mode 100644 index 04a24886c..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_freebsd_arm.go +++ /dev/null @@ -1,59 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_386.go b/deps/golang.org/x/net/internal/socket/zsys_linux_386.go deleted file mode 100644 index 430206930..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_386.go +++ /dev/null @@ -1,63 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofMmsghdr = 0x20 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_amd64.go b/deps/golang.org/x/net/internal/socket/zsys_linux_amd64.go deleted file mode 100644 index 1502f6c55..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_amd64.go +++ /dev/null @@ -1,66 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x38 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0x10 - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_arm.go b/deps/golang.org/x/net/internal/socket/zsys_linux_arm.go deleted file mode 100644 index 430206930..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_arm.go +++ /dev/null @@ -1,63 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofMmsghdr = 0x20 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_arm64.go b/deps/golang.org/x/net/internal/socket/zsys_linux_arm64.go deleted file mode 100644 index 1502f6c55..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_arm64.go +++ /dev/null @@ -1,66 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x38 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0x10 - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_mips.go b/deps/golang.org/x/net/internal/socket/zsys_linux_mips.go deleted file mode 100644 index 430206930..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_mips.go +++ /dev/null @@ -1,63 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofMmsghdr = 0x20 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_mips64.go b/deps/golang.org/x/net/internal/socket/zsys_linux_mips64.go deleted file mode 100644 index 1502f6c55..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_mips64.go +++ /dev/null @@ -1,66 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x38 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0x10 - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_mips64le.go b/deps/golang.org/x/net/internal/socket/zsys_linux_mips64le.go deleted file mode 100644 index 1502f6c55..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_mips64le.go +++ /dev/null @@ -1,66 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x38 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0x10 - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_mipsle.go b/deps/golang.org/x/net/internal/socket/zsys_linux_mipsle.go deleted file mode 100644 index 430206930..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_mipsle.go +++ /dev/null @@ -1,63 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofMmsghdr = 0x20 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_ppc64.go b/deps/golang.org/x/net/internal/socket/zsys_linux_ppc64.go deleted file mode 100644 index 1502f6c55..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_ppc64.go +++ /dev/null @@ -1,66 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x38 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0x10 - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go b/deps/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go deleted file mode 100644 index 1502f6c55..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go +++ /dev/null @@ -1,66 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x38 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0x10 - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_linux_s390x.go b/deps/golang.org/x/net/internal/socket/zsys_linux_s390x.go deleted file mode 100644 index 1502f6c55..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_linux_s390x.go +++ /dev/null @@ -1,66 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0xa - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint64 - Control *byte - Controllen uint64 - Flags int32 - Pad_cgo_1 [4]byte -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint64 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x38 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0x10 - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_netbsd_386.go b/deps/golang.org/x/net/internal/socket/zsys_netbsd_386.go deleted file mode 100644 index db60491fe..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_netbsd_386.go +++ /dev/null @@ -1,65 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_netbsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofMmsghdr = 0x20 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go b/deps/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go deleted file mode 100644 index 2a1a79985..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go +++ /dev/null @@ -1,68 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_netbsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 - Pad_cgo_0 [4]byte -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x30 - sizeofMmsghdr = 0x40 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_netbsd_arm.go b/deps/golang.org/x/net/internal/socket/zsys_netbsd_arm.go deleted file mode 100644 index db60491fe..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_netbsd_arm.go +++ /dev/null @@ -1,65 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_netbsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen int32 - Control *byte - Controllen uint32 - Flags int32 -} - -type mmsghdr struct { - Hdr msghdr - Len uint32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofMmsghdr = 0x20 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_openbsd_386.go b/deps/golang.org/x/net/internal/socket/zsys_openbsd_386.go deleted file mode 100644 index 1c836361e..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_openbsd_386.go +++ /dev/null @@ -1,59 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_openbsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go b/deps/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go deleted file mode 100644 index a6c0bf464..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go +++ /dev/null @@ -1,61 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_openbsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen uint32 - Pad_cgo_1 [4]byte - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x30 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_openbsd_arm.go b/deps/golang.org/x/net/internal/socket/zsys_openbsd_arm.go deleted file mode 100644 index 1c836361e..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_openbsd_arm.go +++ /dev/null @@ -1,59 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_openbsd.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 -) - -type iovec struct { - Base *byte - Len uint32 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Iov *iovec - Iovlen uint32 - Control *byte - Controllen uint32 - Flags int32 -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -const ( - sizeofIovec = 0x8 - sizeofMsghdr = 0x1c - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/internal/socket/zsys_solaris_amd64.go b/deps/golang.org/x/net/internal/socket/zsys_solaris_amd64.go deleted file mode 100644 index 327c63290..000000000 --- a/deps/golang.org/x/net/internal/socket/zsys_solaris_amd64.go +++ /dev/null @@ -1,60 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_solaris.go - -package socket - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1a - - sysSOCK_RAW = 0x4 -) - -type iovec struct { - Base *int8 - Len uint64 -} - -type msghdr struct { - Name *byte - Namelen uint32 - Pad_cgo_0 [4]byte - Iov *iovec - Iovlen int32 - Pad_cgo_1 [4]byte - Accrights *int8 - Accrightslen int32 - Pad_cgo_2 [4]byte -} - -type cmsghdr struct { - Len uint32 - Level int32 - Type int32 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 - X__sin6_src_id uint32 -} - -const ( - sizeofIovec = 0x10 - sizeofMsghdr = 0x30 - sizeofCmsghdr = 0xc - - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x20 -) diff --git a/deps/golang.org/x/net/internal/socks/client.go b/deps/golang.org/x/net/internal/socks/client.go deleted file mode 100644 index 3d6f516a5..000000000 --- a/deps/golang.org/x/net/internal/socks/client.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socks - -import ( - "context" - "errors" - "io" - "net" - "strconv" - "time" -) - -var ( - noDeadline = time.Time{} - aLongTimeAgo = time.Unix(1, 0) -) - -func (d *Dialer) connect(ctx context.Context, c net.Conn, address string) (_ net.Addr, ctxErr error) { - host, port, err := splitHostPort(address) - if err != nil { - return nil, err - } - if deadline, ok := ctx.Deadline(); ok && !deadline.IsZero() { - c.SetDeadline(deadline) - defer c.SetDeadline(noDeadline) - } - if ctx != context.Background() { - errCh := make(chan error, 1) - done := make(chan struct{}) - defer func() { - close(done) - if ctxErr == nil { - ctxErr = <-errCh - } - }() - go func() { - select { - case <-ctx.Done(): - c.SetDeadline(aLongTimeAgo) - errCh <- ctx.Err() - case <-done: - errCh <- nil - } - }() - } - - b := make([]byte, 0, 6+len(host)) // the size here is just an estimate - b = append(b, Version5) - if len(d.AuthMethods) == 0 || d.Authenticate == nil { - b = append(b, 1, byte(AuthMethodNotRequired)) - } else { - ams := d.AuthMethods - if len(ams) > 255 { - return nil, errors.New("too many authentication methods") - } - b = append(b, byte(len(ams))) - for _, am := range ams { - b = append(b, byte(am)) - } - } - if _, ctxErr = c.Write(b); ctxErr != nil { - return - } - - if _, ctxErr = io.ReadFull(c, b[:2]); ctxErr != nil { - return - } - if b[0] != Version5 { - return nil, errors.New("unexpected protocol version " + strconv.Itoa(int(b[0]))) - } - am := AuthMethod(b[1]) - if am == AuthMethodNoAcceptableMethods { - return nil, errors.New("no acceptable authentication methods") - } - if d.Authenticate != nil { - if ctxErr = d.Authenticate(ctx, c, am); ctxErr != nil { - return - } - } - - b = b[:0] - b = append(b, Version5, byte(d.cmd), 0) - if ip := net.ParseIP(host); ip != nil { - if ip4 := ip.To4(); ip4 != nil { - b = append(b, AddrTypeIPv4) - b = append(b, ip4...) - } else if ip6 := ip.To16(); ip6 != nil { - b = append(b, AddrTypeIPv6) - b = append(b, ip6...) - } else { - return nil, errors.New("unknown address type") - } - } else { - if len(host) > 255 { - return nil, errors.New("FQDN too long") - } - b = append(b, AddrTypeFQDN) - b = append(b, byte(len(host))) - b = append(b, host...) - } - b = append(b, byte(port>>8), byte(port)) - if _, ctxErr = c.Write(b); ctxErr != nil { - return - } - - if _, ctxErr = io.ReadFull(c, b[:4]); ctxErr != nil { - return - } - if b[0] != Version5 { - return nil, errors.New("unexpected protocol version " + strconv.Itoa(int(b[0]))) - } - if cmdErr := Reply(b[1]); cmdErr != StatusSucceeded { - return nil, errors.New("unknown error " + cmdErr.String()) - } - if b[2] != 0 { - return nil, errors.New("non-zero reserved field") - } - l := 2 - var a Addr - switch b[3] { - case AddrTypeIPv4: - l += net.IPv4len - a.IP = make(net.IP, net.IPv4len) - case AddrTypeIPv6: - l += net.IPv6len - a.IP = make(net.IP, net.IPv6len) - case AddrTypeFQDN: - if _, err := io.ReadFull(c, b[:1]); err != nil { - return nil, err - } - l += int(b[0]) - default: - return nil, errors.New("unknown address type " + strconv.Itoa(int(b[3]))) - } - if cap(b) < l { - b = make([]byte, l) - } else { - b = b[:l] - } - if _, ctxErr = io.ReadFull(c, b); ctxErr != nil { - return - } - if a.IP != nil { - copy(a.IP, b) - } else { - a.Name = string(b[:len(b)-2]) - } - a.Port = int(b[len(b)-2])<<8 | int(b[len(b)-1]) - return &a, nil -} - -func splitHostPort(address string) (string, int, error) { - host, port, err := net.SplitHostPort(address) - if err != nil { - return "", 0, err - } - portnum, err := strconv.Atoi(port) - if err != nil { - return "", 0, err - } - if 1 > portnum || portnum > 0xffff { - return "", 0, errors.New("port number out of range " + port) - } - return host, portnum, nil -} diff --git a/deps/golang.org/x/net/internal/socks/dial_test.go b/deps/golang.org/x/net/internal/socks/dial_test.go deleted file mode 100644 index 3a7a31bde..000000000 --- a/deps/golang.org/x/net/internal/socks/dial_test.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package socks_test - -import ( - "context" - "io" - "math/rand" - "net" - "os" - "testing" - "time" - - "golang.org/x/net/internal/socks" - "golang.org/x/net/internal/sockstest" -) - -func TestDial(t *testing.T) { - t.Run("Connect", func(t *testing.T) { - ss, err := sockstest.NewServer(sockstest.NoAuthRequired, sockstest.NoProxyRequired) - if err != nil { - t.Fatal(err) - } - defer ss.Close() - d := socks.NewDialer(ss.Addr().Network(), ss.Addr().String()) - d.AuthMethods = []socks.AuthMethod{ - socks.AuthMethodNotRequired, - socks.AuthMethodUsernamePassword, - } - d.Authenticate = (&socks.UsernamePassword{ - Username: "username", - Password: "password", - }).Authenticate - c, err := d.DialContext(context.Background(), ss.TargetAddr().Network(), ss.TargetAddr().String()) - if err != nil { - t.Fatal(err) - } - c.(*socks.Conn).BoundAddr() - c.Close() - }) - t.Run("ConnectWithConn", func(t *testing.T) { - ss, err := sockstest.NewServer(sockstest.NoAuthRequired, sockstest.NoProxyRequired) - if err != nil { - t.Fatal(err) - } - defer ss.Close() - c, err := net.Dial(ss.Addr().Network(), ss.Addr().String()) - if err != nil { - t.Fatal(err) - } - defer c.Close() - d := socks.NewDialer(ss.Addr().Network(), ss.Addr().String()) - d.AuthMethods = []socks.AuthMethod{ - socks.AuthMethodNotRequired, - socks.AuthMethodUsernamePassword, - } - d.Authenticate = (&socks.UsernamePassword{ - Username: "username", - Password: "password", - }).Authenticate - a, err := d.DialWithConn(context.Background(), c, ss.TargetAddr().Network(), ss.TargetAddr().String()) - if err != nil { - t.Fatal(err) - } - if _, ok := a.(*socks.Addr); !ok { - t.Fatalf("got %+v; want socks.Addr", a) - } - }) - t.Run("Cancel", func(t *testing.T) { - ss, err := sockstest.NewServer(sockstest.NoAuthRequired, blackholeCmdFunc) - if err != nil { - t.Fatal(err) - } - defer ss.Close() - d := socks.NewDialer(ss.Addr().Network(), ss.Addr().String()) - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - dialErr := make(chan error) - go func() { - c, err := d.DialContext(ctx, ss.TargetAddr().Network(), ss.TargetAddr().String()) - if err == nil { - c.Close() - } - dialErr <- err - }() - time.Sleep(100 * time.Millisecond) - cancel() - err = <-dialErr - if perr, nerr := parseDialError(err); perr != context.Canceled && nerr == nil { - t.Fatalf("got %v; want context.Canceled or equivalent", err) - } - }) - t.Run("Deadline", func(t *testing.T) { - ss, err := sockstest.NewServer(sockstest.NoAuthRequired, blackholeCmdFunc) - if err != nil { - t.Fatal(err) - } - defer ss.Close() - d := socks.NewDialer(ss.Addr().Network(), ss.Addr().String()) - ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(100*time.Millisecond)) - defer cancel() - c, err := d.DialContext(ctx, ss.TargetAddr().Network(), ss.TargetAddr().String()) - if err == nil { - c.Close() - } - if perr, nerr := parseDialError(err); perr != context.DeadlineExceeded && nerr == nil { - t.Fatalf("got %v; want context.DeadlineExceeded or equivalent", err) - } - }) - t.Run("WithRogueServer", func(t *testing.T) { - ss, err := sockstest.NewServer(sockstest.NoAuthRequired, rogueCmdFunc) - if err != nil { - t.Fatal(err) - } - defer ss.Close() - d := socks.NewDialer(ss.Addr().Network(), ss.Addr().String()) - for i := 0; i < 2*len(rogueCmdList); i++ { - ctx, cancel := context.WithDeadline(context.Background(), time.Now().Add(100*time.Millisecond)) - defer cancel() - c, err := d.DialContext(ctx, ss.TargetAddr().Network(), ss.TargetAddr().String()) - if err == nil { - t.Log(c.(*socks.Conn).BoundAddr()) - c.Close() - t.Error("should fail") - } - } - }) -} - -func blackholeCmdFunc(rw io.ReadWriter, b []byte) error { - if _, err := sockstest.ParseCmdRequest(b); err != nil { - return err - } - var bb [1]byte - for { - if _, err := rw.Read(bb[:]); err != nil { - return err - } - } -} - -func rogueCmdFunc(rw io.ReadWriter, b []byte) error { - if _, err := sockstest.ParseCmdRequest(b); err != nil { - return err - } - rw.Write(rogueCmdList[rand.Intn(len(rogueCmdList))]) - return nil -} - -var rogueCmdList = [][]byte{ - {0x05}, - {0x06, 0x00, 0x00, 0x01, 192, 0, 2, 1, 0x17, 0x4b}, - {0x05, 0x00, 0xff, 0x01, 192, 0, 2, 2, 0x17, 0x4b}, - {0x05, 0x00, 0x00, 0x01, 192, 0, 2, 3}, - {0x05, 0x00, 0x00, 0x03, 0x04, 'F', 'Q', 'D', 'N'}, -} - -func parseDialError(err error) (perr, nerr error) { - if e, ok := err.(*net.OpError); ok { - err = e.Err - nerr = e - } - if e, ok := err.(*os.SyscallError); ok { - err = e.Err - } - perr = err - return -} diff --git a/deps/golang.org/x/net/internal/socks/socks.go b/deps/golang.org/x/net/internal/socks/socks.go deleted file mode 100644 index d93e699b4..000000000 --- a/deps/golang.org/x/net/internal/socks/socks.go +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package socks provides a SOCKS version 5 client implementation. -// -// SOCKS protocol version 5 is defined in RFC 1928. -// Username/Password authentication for SOCKS version 5 is defined in -// RFC 1929. -package socks - -import ( - "context" - "errors" - "io" - "net" - "strconv" -) - -// A Command represents a SOCKS command. -type Command int - -func (cmd Command) String() string { - switch cmd { - case CmdConnect: - return "socks connect" - case cmdBind: - return "socks bind" - default: - return "socks " + strconv.Itoa(int(cmd)) - } -} - -// An AuthMethod represents a SOCKS authentication method. -type AuthMethod int - -// A Reply represents a SOCKS command reply code. -type Reply int - -func (code Reply) String() string { - switch code { - case StatusSucceeded: - return "succeeded" - case 0x01: - return "general SOCKS server failure" - case 0x02: - return "connection not allowed by ruleset" - case 0x03: - return "network unreachable" - case 0x04: - return "host unreachable" - case 0x05: - return "connection refused" - case 0x06: - return "TTL expired" - case 0x07: - return "command not supported" - case 0x08: - return "address type not supported" - default: - return "unknown code: " + strconv.Itoa(int(code)) - } -} - -// Wire protocol constants. -const ( - Version5 = 0x05 - - AddrTypeIPv4 = 0x01 - AddrTypeFQDN = 0x03 - AddrTypeIPv6 = 0x04 - - CmdConnect Command = 0x01 // establishes an active-open forward proxy connection - cmdBind Command = 0x02 // establishes a passive-open forward proxy connection - - AuthMethodNotRequired AuthMethod = 0x00 // no authentication required - AuthMethodUsernamePassword AuthMethod = 0x02 // use username/password - AuthMethodNoAcceptableMethods AuthMethod = 0xff // no acceptable authentication methods - - StatusSucceeded Reply = 0x00 -) - -// An Addr represents a SOCKS-specific address. -// Either Name or IP is used exclusively. -type Addr struct { - Name string // fully-qualified domain name - IP net.IP - Port int -} - -func (a *Addr) Network() string { return "socks" } - -func (a *Addr) String() string { - if a == nil { - return "" - } - port := strconv.Itoa(a.Port) - if a.IP == nil { - return net.JoinHostPort(a.Name, port) - } - return net.JoinHostPort(a.IP.String(), port) -} - -// A Conn represents a forward proxy connection. -type Conn struct { - net.Conn - - boundAddr net.Addr -} - -// BoundAddr returns the address assigned by the proxy server for -// connecting to the command target address from the proxy server. -func (c *Conn) BoundAddr() net.Addr { - if c == nil { - return nil - } - return c.boundAddr -} - -// A Dialer holds SOCKS-specific options. -type Dialer struct { - cmd Command // either CmdConnect or cmdBind - proxyNetwork string // network between a proxy server and a client - proxyAddress string // proxy server address - - // ProxyDial specifies the optional dial function for - // establishing the transport connection. - ProxyDial func(context.Context, string, string) (net.Conn, error) - - // AuthMethods specifies the list of request authention - // methods. - // If empty, SOCKS client requests only AuthMethodNotRequired. - AuthMethods []AuthMethod - - // Authenticate specifies the optional authentication - // function. It must be non-nil when AuthMethods is not empty. - // It must return an error when the authentication is failed. - Authenticate func(context.Context, io.ReadWriter, AuthMethod) error -} - -// DialContext connects to the provided address on the provided -// network. -// -// The returned error value may be a net.OpError. When the Op field of -// net.OpError contains "socks", the Source field contains a proxy -// server address and the Addr field contains a command target -// address. -// -// See func Dial of the net package of standard library for a -// description of the network and address parameters. -func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) { - if err := d.validateTarget(network, address); err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - if ctx == nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: errors.New("nil context")} - } - var err error - var c net.Conn - if d.ProxyDial != nil { - c, err = d.ProxyDial(ctx, d.proxyNetwork, d.proxyAddress) - } else { - var dd net.Dialer - c, err = dd.DialContext(ctx, d.proxyNetwork, d.proxyAddress) - } - if err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - a, err := d.connect(ctx, c, address) - if err != nil { - c.Close() - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - return &Conn{Conn: c, boundAddr: a}, nil -} - -// DialWithConn initiates a connection from SOCKS server to the target -// network and address using the connection c that is already -// connected to the SOCKS server. -// -// It returns the connection's local address assigned by the SOCKS -// server. -func (d *Dialer) DialWithConn(ctx context.Context, c net.Conn, network, address string) (net.Addr, error) { - if err := d.validateTarget(network, address); err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - if ctx == nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: errors.New("nil context")} - } - a, err := d.connect(ctx, c, address) - if err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - return a, nil -} - -// Dial connects to the provided address on the provided network. -// -// Unlike DialContext, it returns a raw transport connection instead -// of a forward proxy connection. -// -// Deprecated: Use DialContext or DialWithConn instead. -func (d *Dialer) Dial(network, address string) (net.Conn, error) { - if err := d.validateTarget(network, address); err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - var err error - var c net.Conn - if d.ProxyDial != nil { - c, err = d.ProxyDial(context.Background(), d.proxyNetwork, d.proxyAddress) - } else { - c, err = net.Dial(d.proxyNetwork, d.proxyAddress) - } - if err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - if _, err := d.DialWithConn(context.Background(), c, network, address); err != nil { - return nil, err - } - return c, nil -} - -func (d *Dialer) validateTarget(network, address string) error { - switch network { - case "tcp", "tcp6", "tcp4": - default: - return errors.New("network not implemented") - } - switch d.cmd { - case CmdConnect, cmdBind: - default: - return errors.New("command not implemented") - } - return nil -} - -func (d *Dialer) pathAddrs(address string) (proxy, dst net.Addr, err error) { - for i, s := range []string{d.proxyAddress, address} { - host, port, err := splitHostPort(s) - if err != nil { - return nil, nil, err - } - a := &Addr{Port: port} - a.IP = net.ParseIP(host) - if a.IP == nil { - a.Name = host - } - if i == 0 { - proxy = a - } else { - dst = a - } - } - return -} - -// NewDialer returns a new Dialer that dials through the provided -// proxy server's network and address. -func NewDialer(network, address string) *Dialer { - return &Dialer{proxyNetwork: network, proxyAddress: address, cmd: CmdConnect} -} - -const ( - authUsernamePasswordVersion = 0x01 - authStatusSucceeded = 0x00 -) - -// UsernamePassword are the credentials for the username/password -// authentication method. -type UsernamePassword struct { - Username string - Password string -} - -// Authenticate authenticates a pair of username and password with the -// proxy server. -func (up *UsernamePassword) Authenticate(ctx context.Context, rw io.ReadWriter, auth AuthMethod) error { - switch auth { - case AuthMethodNotRequired: - return nil - case AuthMethodUsernamePassword: - if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) == 0 || len(up.Password) > 255 { - return errors.New("invalid username/password") - } - b := []byte{authUsernamePasswordVersion} - b = append(b, byte(len(up.Username))) - b = append(b, up.Username...) - b = append(b, byte(len(up.Password))) - b = append(b, up.Password...) - // TODO(mikio): handle IO deadlines and cancelation if - // necessary - if _, err := rw.Write(b); err != nil { - return err - } - if _, err := io.ReadFull(rw, b[:2]); err != nil { - return err - } - if b[0] != authUsernamePasswordVersion { - return errors.New("invalid username/password version") - } - if b[1] != authStatusSucceeded { - return errors.New("username/password authentication failed") - } - return nil - } - return errors.New("unsupported authentication method " + strconv.Itoa(int(auth))) -} diff --git a/deps/golang.org/x/net/internal/sockstest/server.go b/deps/golang.org/x/net/internal/sockstest/server.go deleted file mode 100644 index 3c6e9e95b..000000000 --- a/deps/golang.org/x/net/internal/sockstest/server.go +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package sockstest provides utilities for SOCKS testing. -package sockstest - -import ( - "errors" - "io" - "net" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/internal/socks" -) - -// An AuthRequest represents an authentication request. -type AuthRequest struct { - Version int - Methods []socks.AuthMethod -} - -// ParseAuthRequest parses an authentication request. -func ParseAuthRequest(b []byte) (*AuthRequest, error) { - if len(b) < 2 { - return nil, errors.New("short auth request") - } - if b[0] != socks.Version5 { - return nil, errors.New("unexpected protocol version") - } - if len(b)-2 < int(b[1]) { - return nil, errors.New("short auth request") - } - req := &AuthRequest{Version: int(b[0])} - if b[1] > 0 { - req.Methods = make([]socks.AuthMethod, b[1]) - for i, m := range b[2 : 2+b[1]] { - req.Methods[i] = socks.AuthMethod(m) - } - } - return req, nil -} - -// MarshalAuthReply returns an authentication reply in wire format. -func MarshalAuthReply(ver int, m socks.AuthMethod) ([]byte, error) { - return []byte{byte(ver), byte(m)}, nil -} - -// A CmdRequest repesents a command request. -type CmdRequest struct { - Version int - Cmd socks.Command - Addr socks.Addr -} - -// ParseCmdRequest parses a command request. -func ParseCmdRequest(b []byte) (*CmdRequest, error) { - if len(b) < 7 { - return nil, errors.New("short cmd request") - } - if b[0] != socks.Version5 { - return nil, errors.New("unexpected protocol version") - } - if socks.Command(b[1]) != socks.CmdConnect { - return nil, errors.New("unexpected command") - } - if b[2] != 0 { - return nil, errors.New("non-zero reserved field") - } - req := &CmdRequest{Version: int(b[0]), Cmd: socks.Command(b[1])} - l := 2 - off := 4 - switch b[3] { - case socks.AddrTypeIPv4: - l += net.IPv4len - req.Addr.IP = make(net.IP, net.IPv4len) - case socks.AddrTypeIPv6: - l += net.IPv6len - req.Addr.IP = make(net.IP, net.IPv6len) - case socks.AddrTypeFQDN: - l += int(b[4]) - off = 5 - default: - return nil, errors.New("unknown address type") - } - if len(b[off:]) < l { - return nil, errors.New("short cmd request") - } - if req.Addr.IP != nil { - copy(req.Addr.IP, b[off:]) - } else { - req.Addr.Name = string(b[off : off+l-2]) - } - req.Addr.Port = int(b[off+l-2])<<8 | int(b[off+l-1]) - return req, nil -} - -// MarshalCmdReply returns a command reply in wire format. -func MarshalCmdReply(ver int, reply socks.Reply, a *socks.Addr) ([]byte, error) { - b := make([]byte, 4) - b[0] = byte(ver) - b[1] = byte(reply) - if a.Name != "" { - if len(a.Name) > 255 { - return nil, errors.New("fqdn too long") - } - b[3] = socks.AddrTypeFQDN - b = append(b, byte(len(a.Name))) - b = append(b, a.Name...) - } else if ip4 := a.IP.To4(); ip4 != nil { - b[3] = socks.AddrTypeIPv4 - b = append(b, ip4...) - } else if ip6 := a.IP.To16(); ip6 != nil { - b[3] = socks.AddrTypeIPv6 - b = append(b, ip6...) - } else { - return nil, errors.New("unknown address type") - } - b = append(b, byte(a.Port>>8), byte(a.Port)) - return b, nil -} - -// A Server repesents a server for handshake testing. -type Server struct { - ln net.Listener -} - -// Addr rerurns a server address. -func (s *Server) Addr() net.Addr { - return s.ln.Addr() -} - -// TargetAddr returns a fake final destination address. -// -// The returned address is only valid for testing with Server. -func (s *Server) TargetAddr() net.Addr { - a := s.ln.Addr() - switch a := a.(type) { - case *net.TCPAddr: - if a.IP.To4() != nil { - return &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 5963} - } - if a.IP.To16() != nil && a.IP.To4() == nil { - return &net.TCPAddr{IP: net.IPv6loopback, Port: 5963} - } - } - return nil -} - -// Close closes the server. -func (s *Server) Close() error { - return s.ln.Close() -} - -func (s *Server) serve(authFunc, cmdFunc func(io.ReadWriter, []byte) error) { - c, err := s.ln.Accept() - if err != nil { - return - } - defer c.Close() - go s.serve(authFunc, cmdFunc) - b := make([]byte, 512) - n, err := c.Read(b) - if err != nil { - return - } - if err := authFunc(c, b[:n]); err != nil { - return - } - n, err = c.Read(b) - if err != nil { - return - } - if err := cmdFunc(c, b[:n]); err != nil { - return - } -} - -// NewServer returns a new server. -// -// The provided authFunc and cmdFunc must parse requests and return -// appropriate replies to clients. -func NewServer(authFunc, cmdFunc func(io.ReadWriter, []byte) error) (*Server, error) { - var err error - s := new(Server) - s.ln, err = nettest.NewLocalListener("tcp") - if err != nil { - return nil, err - } - go s.serve(authFunc, cmdFunc) - return s, nil -} - -// NoAuthRequired handles a no-authentication-required signaling. -func NoAuthRequired(rw io.ReadWriter, b []byte) error { - req, err := ParseAuthRequest(b) - if err != nil { - return err - } - b, err = MarshalAuthReply(req.Version, socks.AuthMethodNotRequired) - if err != nil { - return err - } - n, err := rw.Write(b) - if err != nil { - return err - } - if n != len(b) { - return errors.New("short write") - } - return nil -} - -// NoProxyRequired handles a command signaling without constructing a -// proxy connection to the final destination. -func NoProxyRequired(rw io.ReadWriter, b []byte) error { - req, err := ParseCmdRequest(b) - if err != nil { - return err - } - req.Addr.Port += 1 - if req.Addr.Name != "" { - req.Addr.Name = "boundaddr.doesnotexist" - } else if req.Addr.IP.To4() != nil { - req.Addr.IP = net.IPv4(127, 0, 0, 1) - } else { - req.Addr.IP = net.IPv6loopback - } - b, err = MarshalCmdReply(socks.Version5, socks.StatusSucceeded, &req.Addr) - if err != nil { - return err - } - n, err := rw.Write(b) - if err != nil { - return err - } - if n != len(b) { - return errors.New("short write") - } - return nil -} diff --git a/deps/golang.org/x/net/internal/sockstest/server_test.go b/deps/golang.org/x/net/internal/sockstest/server_test.go deleted file mode 100644 index 2b02d8161..000000000 --- a/deps/golang.org/x/net/internal/sockstest/server_test.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sockstest - -import ( - "net" - "reflect" - "testing" - - "golang.org/x/net/internal/socks" -) - -func TestParseAuthRequest(t *testing.T) { - for i, tt := range []struct { - wire []byte - req *AuthRequest - }{ - { - []byte{0x05, 0x00}, - &AuthRequest{ - socks.Version5, - nil, - }, - }, - { - []byte{0x05, 0x01, 0xff}, - &AuthRequest{ - socks.Version5, - []socks.AuthMethod{ - socks.AuthMethodNoAcceptableMethods, - }, - }, - }, - { - []byte{0x05, 0x02, 0x00, 0xff}, - &AuthRequest{ - socks.Version5, - []socks.AuthMethod{ - socks.AuthMethodNotRequired, - socks.AuthMethodNoAcceptableMethods, - }, - }, - }, - - // corrupted requests - {nil, nil}, - {[]byte{0x00, 0x01}, nil}, - {[]byte{0x06, 0x00}, nil}, - {[]byte{0x05, 0x02, 0x00}, nil}, - } { - req, err := ParseAuthRequest(tt.wire) - if !reflect.DeepEqual(req, tt.req) { - t.Errorf("#%d: got %v, %v; want %v", i, req, err, tt.req) - continue - } - } -} - -func TestParseCmdRequest(t *testing.T) { - for i, tt := range []struct { - wire []byte - req *CmdRequest - }{ - { - []byte{0x05, 0x01, 0x00, 0x01, 192, 0, 2, 1, 0x17, 0x4b}, - &CmdRequest{ - socks.Version5, - socks.CmdConnect, - socks.Addr{ - IP: net.IP{192, 0, 2, 1}, - Port: 5963, - }, - }, - }, - { - []byte{0x05, 0x01, 0x00, 0x03, 0x04, 'F', 'Q', 'D', 'N', 0x17, 0x4b}, - &CmdRequest{ - socks.Version5, - socks.CmdConnect, - socks.Addr{ - Name: "FQDN", - Port: 5963, - }, - }, - }, - - // corrupted requests - {nil, nil}, - {[]byte{0x05}, nil}, - {[]byte{0x06, 0x01, 0x00, 0x01, 192, 0, 2, 2, 0x17, 0x4b}, nil}, - {[]byte{0x05, 0x01, 0xff, 0x01, 192, 0, 2, 3}, nil}, - {[]byte{0x05, 0x01, 0x00, 0x01, 192, 0, 2, 4}, nil}, - {[]byte{0x05, 0x01, 0x00, 0x03, 0x04, 'F', 'Q', 'D', 'N'}, nil}, - } { - req, err := ParseCmdRequest(tt.wire) - if !reflect.DeepEqual(req, tt.req) { - t.Errorf("#%d: got %v, %v; want %v", i, req, err, tt.req) - continue - } - } -} diff --git a/deps/golang.org/x/net/internal/timeseries/timeseries.go b/deps/golang.org/x/net/internal/timeseries/timeseries.go index 685f0e7ea..4b24137ff 100644 --- a/deps/golang.org/x/net/internal/timeseries/timeseries.go +++ b/deps/golang.org/x/net/internal/timeseries/timeseries.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package timeseries implements a time series structure for stats collection. -package timeseries // import "golang.org/x/net/internal/timeseries" +package timeseries import ( "fmt" diff --git a/deps/golang.org/x/net/internal/timeseries/timeseries_test.go b/deps/golang.org/x/net/internal/timeseries/timeseries_test.go deleted file mode 100644 index 66325a912..000000000 --- a/deps/golang.org/x/net/internal/timeseries/timeseries_test.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package timeseries - -import ( - "math" - "testing" - "time" -) - -func isNear(x *Float, y float64, tolerance float64) bool { - return math.Abs(x.Value()-y) < tolerance -} - -func isApproximate(x *Float, y float64) bool { - return isNear(x, y, 1e-2) -} - -func checkApproximate(t *testing.T, o Observable, y float64) { - x := o.(*Float) - if !isApproximate(x, y) { - t.Errorf("Wanted %g, got %g", y, x.Value()) - } -} - -func checkNear(t *testing.T, o Observable, y, tolerance float64) { - x := o.(*Float) - if !isNear(x, y, tolerance) { - t.Errorf("Wanted %g +- %g, got %g", y, tolerance, x.Value()) - } -} - -var baseTime = time.Date(2013, 1, 1, 0, 0, 0, 0, time.UTC) - -func tu(s int64) time.Time { - return baseTime.Add(time.Duration(s) * time.Second) -} - -func tu2(s int64, ns int64) time.Time { - return baseTime.Add(time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond) -} - -func TestBasicTimeSeries(t *testing.T) { - ts := NewTimeSeries(NewFloat) - fo := new(Float) - *fo = Float(10) - ts.AddWithTime(fo, tu(1)) - ts.AddWithTime(fo, tu(1)) - ts.AddWithTime(fo, tu(1)) - ts.AddWithTime(fo, tu(1)) - checkApproximate(t, ts.Range(tu(0), tu(1)), 40) - checkApproximate(t, ts.Total(), 40) - ts.AddWithTime(fo, tu(3)) - ts.AddWithTime(fo, tu(3)) - ts.AddWithTime(fo, tu(3)) - checkApproximate(t, ts.Range(tu(0), tu(2)), 40) - checkApproximate(t, ts.Range(tu(2), tu(4)), 30) - checkApproximate(t, ts.Total(), 70) - ts.AddWithTime(fo, tu(1)) - ts.AddWithTime(fo, tu(1)) - checkApproximate(t, ts.Range(tu(0), tu(2)), 60) - checkApproximate(t, ts.Range(tu(2), tu(4)), 30) - checkApproximate(t, ts.Total(), 90) - *fo = Float(100) - ts.AddWithTime(fo, tu(100)) - checkApproximate(t, ts.Range(tu(99), tu(100)), 100) - checkApproximate(t, ts.Range(tu(0), tu(4)), 36) - checkApproximate(t, ts.Total(), 190) - *fo = Float(10) - ts.AddWithTime(fo, tu(1)) - ts.AddWithTime(fo, tu(1)) - checkApproximate(t, ts.Range(tu(0), tu(4)), 44) - checkApproximate(t, ts.Range(tu(37), tu2(100, 100e6)), 100) - checkApproximate(t, ts.Range(tu(50), tu2(100, 100e6)), 100) - checkApproximate(t, ts.Range(tu(99), tu2(100, 100e6)), 100) - checkApproximate(t, ts.Total(), 210) - - for i, l := range ts.ComputeRange(tu(36), tu(100), 64) { - if i == 63 { - checkApproximate(t, l, 100) - } else { - checkApproximate(t, l, 0) - } - } - - checkApproximate(t, ts.Range(tu(0), tu(100)), 210) - checkApproximate(t, ts.Range(tu(10), tu(100)), 100) - - for i, l := range ts.ComputeRange(tu(0), tu(100), 100) { - if i < 10 { - checkApproximate(t, l, 11) - } else if i >= 90 { - checkApproximate(t, l, 10) - } else { - checkApproximate(t, l, 0) - } - } -} - -func TestFloat(t *testing.T) { - f := Float(1) - if g, w := f.String(), "1"; g != w { - t.Errorf("Float(1).String = %q; want %q", g, w) - } - f2 := Float(2) - var o Observable = &f2 - f.Add(o) - if g, w := f.Value(), 3.0; g != w { - t.Errorf("Float post-add = %v; want %v", g, w) - } - f.Multiply(2) - if g, w := f.Value(), 6.0; g != w { - t.Errorf("Float post-multiply = %v; want %v", g, w) - } - f.Clear() - if g, w := f.Value(), 0.0; g != w { - t.Errorf("Float post-clear = %v; want %v", g, w) - } - f.CopyFrom(&f2) - if g, w := f.Value(), 2.0; g != w { - t.Errorf("Float post-CopyFrom = %v; want %v", g, w) - } -} - -type mockClock struct { - time time.Time -} - -func (m *mockClock) Time() time.Time { return m.time } -func (m *mockClock) Set(t time.Time) { m.time = t } - -const buckets = 6 - -var testResolutions = []time.Duration{ - 10 * time.Second, // level holds one minute of observations - 100 * time.Second, // level holds ten minutes of observations - 10 * time.Minute, // level holds one hour of observations -} - -// TestTimeSeries uses a small number of buckets to force a higher -// error rate on approximations from the timeseries. -type TestTimeSeries struct { - timeSeries -} - -func TestExpectedErrorRate(t *testing.T) { - ts := new(TestTimeSeries) - fake := new(mockClock) - fake.Set(time.Now()) - ts.timeSeries.init(testResolutions, NewFloat, buckets, fake) - for i := 1; i <= 61*61; i++ { - fake.Set(fake.Time().Add(1 * time.Second)) - ob := Float(1) - ts.AddWithTime(&ob, fake.Time()) - - // The results should be accurate within one missing bucket (1/6) of the observations recorded. - checkNear(t, ts.Latest(0, buckets), min(float64(i), 60), 10) - checkNear(t, ts.Latest(1, buckets), min(float64(i), 600), 100) - checkNear(t, ts.Latest(2, buckets), min(float64(i), 3600), 600) - } -} - -func min(a, b float64) float64 { - if a < b { - return a - } - return b -} diff --git a/deps/golang.org/x/net/ipv4/batch.go b/deps/golang.org/x/net/ipv4/batch.go deleted file mode 100644 index b44549928..000000000 --- a/deps/golang.org/x/net/ipv4/batch.go +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package ipv4 - -import ( - "net" - "runtime" - "syscall" - - "golang.org/x/net/internal/socket" -) - -// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of -// PacketConn are not implemented. - -// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of -// RawConn are not implemented. - -// A Message represents an IO message. -// -// type Message struct { -// Buffers [][]byte -// OOB []byte -// Addr net.Addr -// N int -// NN int -// Flags int -// } -// -// The Buffers fields represents a list of contiguous buffers, which -// can be used for vectored IO, for example, putting a header and a -// payload in each slice. -// When writing, the Buffers field must contain at least one byte to -// write. -// When reading, the Buffers field will always contain a byte to read. -// -// The OOB field contains protocol-specific control or miscellaneous -// ancillary data known as out-of-band data. -// It can be nil when not required. -// -// The Addr field specifies a destination address when writing. -// It can be nil when the underlying protocol of the endpoint uses -// connection-oriented communication. -// After a successful read, it may contain the source address on the -// received packet. -// -// The N field indicates the number of bytes read or written from/to -// Buffers. -// -// The NN field indicates the number of bytes read or written from/to -// OOB. -// -// The Flags field contains protocol-specific information on the -// received message. -type Message = socket.Message - -// ReadBatch reads a batch of messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_PEEK. -// -// On a successful read it returns the number of messages received, up -// to len(ms). -// -// On Linux, a batch read will be optimized. -// On other platforms, this method will read only a single message. -// -// Unlike the ReadFrom method, it doesn't strip the IPv4 header -// followed by option headers from the received IPv4 datagram when the -// underlying transport is net.IPConn. Each Buffers field of Message -// must be large enough to accommodate an IPv4 header and option -// headers. -func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - switch runtime.GOOS { - case "linux": - n, err := c.RecvMsgs([]socket.Message(ms), flags) - if err != nil { - err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - default: - n := 1 - err := c.RecvMsg(&ms[0], flags) - if err != nil { - n = 0 - err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - } -} - -// WriteBatch writes a batch of messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_DONTROUTE. -// -// It returns the number of messages written on a successful write. -// -// On Linux, a batch write will be optimized. -// On other platforms, this method will write only a single message. -func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - switch runtime.GOOS { - case "linux": - n, err := c.SendMsgs([]socket.Message(ms), flags) - if err != nil { - err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - default: - n := 1 - err := c.SendMsg(&ms[0], flags) - if err != nil { - n = 0 - err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - } -} - -// ReadBatch reads a batch of messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_PEEK. -// -// On a successful read it returns the number of messages received, up -// to len(ms). -// -// On Linux, a batch read will be optimized. -// On other platforms, this method will read only a single message. -func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - switch runtime.GOOS { - case "linux": - n, err := c.RecvMsgs([]socket.Message(ms), flags) - if err != nil { - err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - return n, err - default: - n := 1 - err := c.RecvMsg(&ms[0], flags) - if err != nil { - n = 0 - err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - return n, err - } -} - -// WriteBatch writes a batch of messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_DONTROUTE. -// -// It returns the number of messages written on a successful write. -// -// On Linux, a batch write will be optimized. -// On other platforms, this method will write only a single message. -func (c *packetHandler) WriteBatch(ms []Message, flags int) (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - switch runtime.GOOS { - case "linux": - n, err := c.SendMsgs([]socket.Message(ms), flags) - if err != nil { - err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - return n, err - default: - n := 1 - err := c.SendMsg(&ms[0], flags) - if err != nil { - n = 0 - err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - return n, err - } -} diff --git a/deps/golang.org/x/net/ipv4/bpf_test.go b/deps/golang.org/x/net/ipv4/bpf_test.go deleted file mode 100644 index b44da9054..000000000 --- a/deps/golang.org/x/net/ipv4/bpf_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "net" - "runtime" - "testing" - "time" - - "golang.org/x/net/bpf" - "golang.org/x/net/ipv4" -) - -func TestBPF(t *testing.T) { - if runtime.GOOS != "linux" { - t.Skipf("not supported on %s", runtime.GOOS) - } - - l, err := net.ListenPacket("udp4", "127.0.0.1:0") - if err != nil { - t.Fatal(err) - } - defer l.Close() - - p := ipv4.NewPacketConn(l) - - // This filter accepts UDP packets whose first payload byte is - // even. - prog, err := bpf.Assemble([]bpf.Instruction{ - // Load the first byte of the payload (skipping UDP header). - bpf.LoadAbsolute{Off: 8, Size: 1}, - // Select LSB of the byte. - bpf.ALUOpConstant{Op: bpf.ALUOpAnd, Val: 1}, - // Byte is even? - bpf.JumpIf{Cond: bpf.JumpEqual, Val: 0, SkipFalse: 1}, - // Accept. - bpf.RetConstant{Val: 4096}, - // Ignore. - bpf.RetConstant{Val: 0}, - }) - if err != nil { - t.Fatalf("compiling BPF: %s", err) - } - - if err = p.SetBPF(prog); err != nil { - t.Fatalf("attaching filter to Conn: %s", err) - } - - s, err := net.Dial("udp4", l.LocalAddr().String()) - if err != nil { - t.Fatal(err) - } - defer s.Close() - go func() { - for i := byte(0); i < 10; i++ { - s.Write([]byte{i}) - } - }() - - l.SetDeadline(time.Now().Add(2 * time.Second)) - seen := make([]bool, 5) - for { - var b [512]byte - n, _, err := l.ReadFrom(b[:]) - if err != nil { - t.Fatalf("reading from listener: %s", err) - } - if n != 1 { - t.Fatalf("unexpected packet length, want 1, got %d", n) - } - if b[0] >= 10 { - t.Fatalf("unexpected byte, want 0-9, got %d", b[0]) - } - if b[0]%2 != 0 { - t.Fatalf("got odd byte %d, wanted only even bytes", b[0]) - } - seen[b[0]/2] = true - - seenAll := true - for _, v := range seen { - if !v { - seenAll = false - break - } - } - if seenAll { - break - } - } -} diff --git a/deps/golang.org/x/net/ipv4/control.go b/deps/golang.org/x/net/ipv4/control.go deleted file mode 100644 index a2b02ca95..000000000 --- a/deps/golang.org/x/net/ipv4/control.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "fmt" - "net" - "sync" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -type rawOpt struct { - sync.RWMutex - cflags ControlFlags -} - -func (c *rawOpt) set(f ControlFlags) { c.cflags |= f } -func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f } -func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 } - -type ControlFlags uint - -const ( - FlagTTL ControlFlags = 1 << iota // pass the TTL on the received packet - FlagSrc // pass the source address on the received packet - FlagDst // pass the destination address on the received packet - FlagInterface // pass the interface index on the received packet -) - -// A ControlMessage represents per packet basis IP-level socket options. -type ControlMessage struct { - // Receiving socket options: SetControlMessage allows to - // receive the options from the protocol stack using ReadFrom - // method of PacketConn or RawConn. - // - // Specifying socket options: ControlMessage for WriteTo - // method of PacketConn or RawConn allows to send the options - // to the protocol stack. - // - TTL int // time-to-live, receiving only - Src net.IP // source address, specifying only - Dst net.IP // destination address, receiving only - IfIndex int // interface index, must be 1 <= value when specifying -} - -func (cm *ControlMessage) String() string { - if cm == nil { - return "" - } - return fmt.Sprintf("ttl=%d src=%v dst=%v ifindex=%d", cm.TTL, cm.Src, cm.Dst, cm.IfIndex) -} - -// Marshal returns the binary encoding of cm. -func (cm *ControlMessage) Marshal() []byte { - if cm == nil { - return nil - } - var m socket.ControlMessage - if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To4() != nil || cm.IfIndex > 0) { - m = socket.NewControlMessage([]int{ctlOpts[ctlPacketInfo].length}) - } - if len(m) > 0 { - ctlOpts[ctlPacketInfo].marshal(m, cm) - } - return m -} - -// Parse parses b as a control message and stores the result in cm. -func (cm *ControlMessage) Parse(b []byte) error { - ms, err := socket.ControlMessage(b).Parse() - if err != nil { - return err - } - for _, m := range ms { - lvl, typ, l, err := m.ParseHeader() - if err != nil { - return err - } - if lvl != iana.ProtocolIP { - continue - } - switch { - case typ == ctlOpts[ctlTTL].name && l >= ctlOpts[ctlTTL].length: - ctlOpts[ctlTTL].parse(cm, m.Data(l)) - case typ == ctlOpts[ctlDst].name && l >= ctlOpts[ctlDst].length: - ctlOpts[ctlDst].parse(cm, m.Data(l)) - case typ == ctlOpts[ctlInterface].name && l >= ctlOpts[ctlInterface].length: - ctlOpts[ctlInterface].parse(cm, m.Data(l)) - case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length: - ctlOpts[ctlPacketInfo].parse(cm, m.Data(l)) - } - } - return nil -} - -// NewControlMessage returns a new control message. -// -// The returned message is large enough for options specified by cf. -func NewControlMessage(cf ControlFlags) []byte { - opt := rawOpt{cflags: cf} - var l int - if opt.isset(FlagTTL) && ctlOpts[ctlTTL].name > 0 { - l += socket.ControlMessageSpace(ctlOpts[ctlTTL].length) - } - if ctlOpts[ctlPacketInfo].name > 0 { - if opt.isset(FlagSrc | FlagDst | FlagInterface) { - l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length) - } - } else { - if opt.isset(FlagDst) && ctlOpts[ctlDst].name > 0 { - l += socket.ControlMessageSpace(ctlOpts[ctlDst].length) - } - if opt.isset(FlagInterface) && ctlOpts[ctlInterface].name > 0 { - l += socket.ControlMessageSpace(ctlOpts[ctlInterface].length) - } - } - var b []byte - if l > 0 { - b = make([]byte, l) - } - return b -} - -// Ancillary data socket options -const ( - ctlTTL = iota // header field - ctlSrc // header field - ctlDst // header field - ctlInterface // inbound or outbound interface - ctlPacketInfo // inbound or outbound packet path - ctlMax -) - -// A ctlOpt represents a binding for ancillary data socket option. -type ctlOpt struct { - name int // option name, must be equal or greater than 1 - length int // option length - marshal func([]byte, *ControlMessage) []byte - parse func(*ControlMessage, []byte) -} diff --git a/deps/golang.org/x/net/ipv4/control_bsd.go b/deps/golang.org/x/net/ipv4/control_bsd.go deleted file mode 100644 index 77e7ad5be..000000000 --- a/deps/golang.org/x/net/ipv4/control_bsd.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package ipv4 - -import ( - "net" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -func marshalDst(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIP, sysIP_RECVDSTADDR, net.IPv4len) - return m.Next(net.IPv4len) -} - -func parseDst(cm *ControlMessage, b []byte) { - if len(cm.Dst) < net.IPv4len { - cm.Dst = make(net.IP, net.IPv4len) - } - copy(cm.Dst, b[:net.IPv4len]) -} - -func marshalInterface(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIP, sysIP_RECVIF, syscall.SizeofSockaddrDatalink) - return m.Next(syscall.SizeofSockaddrDatalink) -} - -func parseInterface(cm *ControlMessage, b []byte) { - sadl := (*syscall.SockaddrDatalink)(unsafe.Pointer(&b[0])) - cm.IfIndex = int(sadl.Index) -} diff --git a/deps/golang.org/x/net/ipv4/control_pktinfo.go b/deps/golang.org/x/net/ipv4/control_pktinfo.go deleted file mode 100644 index 425338f35..000000000 --- a/deps/golang.org/x/net/ipv4/control_pktinfo.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin linux solaris - -package ipv4 - -import ( - "net" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -func marshalPacketInfo(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIP, sysIP_PKTINFO, sizeofInetPktinfo) - if cm != nil { - pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0])) - if ip := cm.Src.To4(); ip != nil { - copy(pi.Spec_dst[:], ip) - } - if cm.IfIndex > 0 { - pi.setIfindex(cm.IfIndex) - } - } - return m.Next(sizeofInetPktinfo) -} - -func parsePacketInfo(cm *ControlMessage, b []byte) { - pi := (*inetPktinfo)(unsafe.Pointer(&b[0])) - cm.IfIndex = int(pi.Ifindex) - if len(cm.Dst) < net.IPv4len { - cm.Dst = make(net.IP, net.IPv4len) - } - copy(cm.Dst, pi.Addr[:]) -} diff --git a/deps/golang.org/x/net/ipv4/control_stub.go b/deps/golang.org/x/net/ipv4/control_stub.go deleted file mode 100644 index 5a2f7d8d3..000000000 --- a/deps/golang.org/x/net/ipv4/control_stub.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv4 - -import "golang.org/x/net/internal/socket" - -func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv4/control_test.go b/deps/golang.org/x/net/ipv4/control_test.go deleted file mode 100644 index f87fe124b..000000000 --- a/deps/golang.org/x/net/ipv4/control_test.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "testing" - - "golang.org/x/net/ipv4" -) - -func TestControlMessageParseWithFuzz(t *testing.T) { - var cm ipv4.ControlMessage - for _, fuzz := range []string{ - "\f\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00", - "\f\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00", - } { - cm.Parse([]byte(fuzz)) - } -} diff --git a/deps/golang.org/x/net/ipv4/control_unix.go b/deps/golang.org/x/net/ipv4/control_unix.go deleted file mode 100644 index e1ae8167b..000000000 --- a/deps/golang.org/x/net/ipv4/control_unix.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package ipv4 - -import ( - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { - opt.Lock() - defer opt.Unlock() - if so, ok := sockOpts[ssoReceiveTTL]; ok && cf&FlagTTL != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(FlagTTL) - } else { - opt.clear(FlagTTL) - } - } - if so, ok := sockOpts[ssoPacketInfo]; ok { - if cf&(FlagSrc|FlagDst|FlagInterface) != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(cf & (FlagSrc | FlagDst | FlagInterface)) - } else { - opt.clear(cf & (FlagSrc | FlagDst | FlagInterface)) - } - } - } else { - if so, ok := sockOpts[ssoReceiveDst]; ok && cf&FlagDst != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(FlagDst) - } else { - opt.clear(FlagDst) - } - } - if so, ok := sockOpts[ssoReceiveInterface]; ok && cf&FlagInterface != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(FlagInterface) - } else { - opt.clear(FlagInterface) - } - } - } - return nil -} - -func marshalTTL(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIP, sysIP_RECVTTL, 1) - return m.Next(1) -} - -func parseTTL(cm *ControlMessage, b []byte) { - cm.TTL = int(*(*byte)(unsafe.Pointer(&b[:1][0]))) -} diff --git a/deps/golang.org/x/net/ipv4/control_windows.go b/deps/golang.org/x/net/ipv4/control_windows.go deleted file mode 100644 index ce55c6644..000000000 --- a/deps/golang.org/x/net/ipv4/control_windows.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "syscall" - - "golang.org/x/net/internal/socket" -) - -func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { - // TODO(mikio): implement this - return syscall.EWINDOWS -} diff --git a/deps/golang.org/x/net/ipv4/defs_darwin.go b/deps/golang.org/x/net/ipv4/defs_darwin.go deleted file mode 100644 index c8f2e05b8..000000000 --- a/deps/golang.org/x/net/ipv4/defs_darwin.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ - -package ipv4 - -/* -#include - -#include -*/ -import "C" - -const ( - sysIP_OPTIONS = C.IP_OPTIONS - sysIP_HDRINCL = C.IP_HDRINCL - sysIP_TOS = C.IP_TOS - sysIP_TTL = C.IP_TTL - sysIP_RECVOPTS = C.IP_RECVOPTS - sysIP_RECVRETOPTS = C.IP_RECVRETOPTS - sysIP_RECVDSTADDR = C.IP_RECVDSTADDR - sysIP_RETOPTS = C.IP_RETOPTS - sysIP_RECVIF = C.IP_RECVIF - sysIP_STRIPHDR = C.IP_STRIPHDR - sysIP_RECVTTL = C.IP_RECVTTL - sysIP_BOUND_IF = C.IP_BOUND_IF - sysIP_PKTINFO = C.IP_PKTINFO - sysIP_RECVPKTINFO = C.IP_RECVPKTINFO - - sysIP_MULTICAST_IF = C.IP_MULTICAST_IF - sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL - sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP - sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP - sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP - sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF - sysIP_MULTICAST_IFINDEX = C.IP_MULTICAST_IFINDEX - sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP - sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP - sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE - sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofInetPktinfo = C.sizeof_struct_in_pktinfo - - sizeofIPMreq = C.sizeof_struct_ip_mreq - sizeofIPMreqn = C.sizeof_struct_ip_mreqn - sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req -) - -type sockaddrStorage C.struct_sockaddr_storage - -type sockaddrInet C.struct_sockaddr_in - -type inetPktinfo C.struct_in_pktinfo - -type ipMreq C.struct_ip_mreq - -type ipMreqn C.struct_ip_mreqn - -type ipMreqSource C.struct_ip_mreq_source - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req diff --git a/deps/golang.org/x/net/ipv4/defs_dragonfly.go b/deps/golang.org/x/net/ipv4/defs_dragonfly.go deleted file mode 100644 index f30544ea2..000000000 --- a/deps/golang.org/x/net/ipv4/defs_dragonfly.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ - -package ipv4 - -/* -#include -*/ -import "C" - -const ( - sysIP_OPTIONS = C.IP_OPTIONS - sysIP_HDRINCL = C.IP_HDRINCL - sysIP_TOS = C.IP_TOS - sysIP_TTL = C.IP_TTL - sysIP_RECVOPTS = C.IP_RECVOPTS - sysIP_RECVRETOPTS = C.IP_RECVRETOPTS - sysIP_RECVDSTADDR = C.IP_RECVDSTADDR - sysIP_RETOPTS = C.IP_RETOPTS - sysIP_RECVIF = C.IP_RECVIF - sysIP_RECVTTL = C.IP_RECVTTL - - sysIP_MULTICAST_IF = C.IP_MULTICAST_IF - sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL - sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP - sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF - sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP - sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP - - sizeofIPMreq = C.sizeof_struct_ip_mreq -) - -type ipMreq C.struct_ip_mreq diff --git a/deps/golang.org/x/net/ipv4/defs_freebsd.go b/deps/golang.org/x/net/ipv4/defs_freebsd.go deleted file mode 100644 index 4dd57d865..000000000 --- a/deps/golang.org/x/net/ipv4/defs_freebsd.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ - -package ipv4 - -/* -#include - -#include -*/ -import "C" - -const ( - sysIP_OPTIONS = C.IP_OPTIONS - sysIP_HDRINCL = C.IP_HDRINCL - sysIP_TOS = C.IP_TOS - sysIP_TTL = C.IP_TTL - sysIP_RECVOPTS = C.IP_RECVOPTS - sysIP_RECVRETOPTS = C.IP_RECVRETOPTS - sysIP_RECVDSTADDR = C.IP_RECVDSTADDR - sysIP_SENDSRCADDR = C.IP_SENDSRCADDR - sysIP_RETOPTS = C.IP_RETOPTS - sysIP_RECVIF = C.IP_RECVIF - sysIP_ONESBCAST = C.IP_ONESBCAST - sysIP_BINDANY = C.IP_BINDANY - sysIP_RECVTTL = C.IP_RECVTTL - sysIP_MINTTL = C.IP_MINTTL - sysIP_DONTFRAG = C.IP_DONTFRAG - sysIP_RECVTOS = C.IP_RECVTOS - - sysIP_MULTICAST_IF = C.IP_MULTICAST_IF - sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL - sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP - sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP - sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP - sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF - sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP - sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP - sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE - sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - - sizeofIPMreq = C.sizeof_struct_ip_mreq - sizeofIPMreqn = C.sizeof_struct_ip_mreqn - sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req -) - -type sockaddrStorage C.struct_sockaddr_storage - -type sockaddrInet C.struct_sockaddr_in - -type ipMreq C.struct_ip_mreq - -type ipMreqn C.struct_ip_mreqn - -type ipMreqSource C.struct_ip_mreq_source - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req diff --git a/deps/golang.org/x/net/ipv4/defs_linux.go b/deps/golang.org/x/net/ipv4/defs_linux.go deleted file mode 100644 index beb11071a..000000000 --- a/deps/golang.org/x/net/ipv4/defs_linux.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ - -package ipv4 - -/* -#include - -#include -#include -#include -#include -#include -*/ -import "C" - -const ( - sysIP_TOS = C.IP_TOS - sysIP_TTL = C.IP_TTL - sysIP_HDRINCL = C.IP_HDRINCL - sysIP_OPTIONS = C.IP_OPTIONS - sysIP_ROUTER_ALERT = C.IP_ROUTER_ALERT - sysIP_RECVOPTS = C.IP_RECVOPTS - sysIP_RETOPTS = C.IP_RETOPTS - sysIP_PKTINFO = C.IP_PKTINFO - sysIP_PKTOPTIONS = C.IP_PKTOPTIONS - sysIP_MTU_DISCOVER = C.IP_MTU_DISCOVER - sysIP_RECVERR = C.IP_RECVERR - sysIP_RECVTTL = C.IP_RECVTTL - sysIP_RECVTOS = C.IP_RECVTOS - sysIP_MTU = C.IP_MTU - sysIP_FREEBIND = C.IP_FREEBIND - sysIP_TRANSPARENT = C.IP_TRANSPARENT - sysIP_RECVRETOPTS = C.IP_RECVRETOPTS - sysIP_ORIGDSTADDR = C.IP_ORIGDSTADDR - sysIP_RECVORIGDSTADDR = C.IP_RECVORIGDSTADDR - sysIP_MINTTL = C.IP_MINTTL - sysIP_NODEFRAG = C.IP_NODEFRAG - sysIP_UNICAST_IF = C.IP_UNICAST_IF - - sysIP_MULTICAST_IF = C.IP_MULTICAST_IF - sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL - sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP - sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP - sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP - sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE - sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE - sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP - sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP - sysIP_MSFILTER = C.IP_MSFILTER - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - sysMCAST_MSFILTER = C.MCAST_MSFILTER - sysIP_MULTICAST_ALL = C.IP_MULTICAST_ALL - - //sysIP_PMTUDISC_DONT = C.IP_PMTUDISC_DONT - //sysIP_PMTUDISC_WANT = C.IP_PMTUDISC_WANT - //sysIP_PMTUDISC_DO = C.IP_PMTUDISC_DO - //sysIP_PMTUDISC_PROBE = C.IP_PMTUDISC_PROBE - //sysIP_PMTUDISC_INTERFACE = C.IP_PMTUDISC_INTERFACE - //sysIP_PMTUDISC_OMIT = C.IP_PMTUDISC_OMIT - - sysICMP_FILTER = C.ICMP_FILTER - - sysSO_EE_ORIGIN_NONE = C.SO_EE_ORIGIN_NONE - sysSO_EE_ORIGIN_LOCAL = C.SO_EE_ORIGIN_LOCAL - sysSO_EE_ORIGIN_ICMP = C.SO_EE_ORIGIN_ICMP - sysSO_EE_ORIGIN_ICMP6 = C.SO_EE_ORIGIN_ICMP6 - sysSO_EE_ORIGIN_TXSTATUS = C.SO_EE_ORIGIN_TXSTATUS - sysSO_EE_ORIGIN_TIMESTAMPING = C.SO_EE_ORIGIN_TIMESTAMPING - - sysSOL_SOCKET = C.SOL_SOCKET - sysSO_ATTACH_FILTER = C.SO_ATTACH_FILTER - - sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofInetPktinfo = C.sizeof_struct_in_pktinfo - sizeofSockExtendedErr = C.sizeof_struct_sock_extended_err - - sizeofIPMreq = C.sizeof_struct_ip_mreq - sizeofIPMreqn = C.sizeof_struct_ip_mreqn - sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req - - sizeofICMPFilter = C.sizeof_struct_icmp_filter - - sizeofSockFprog = C.sizeof_struct_sock_fprog -) - -type kernelSockaddrStorage C.struct___kernel_sockaddr_storage - -type sockaddrInet C.struct_sockaddr_in - -type inetPktinfo C.struct_in_pktinfo - -type sockExtendedErr C.struct_sock_extended_err - -type ipMreq C.struct_ip_mreq - -type ipMreqn C.struct_ip_mreqn - -type ipMreqSource C.struct_ip_mreq_source - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req - -type icmpFilter C.struct_icmp_filter - -type sockFProg C.struct_sock_fprog - -type sockFilter C.struct_sock_filter diff --git a/deps/golang.org/x/net/ipv4/defs_netbsd.go b/deps/golang.org/x/net/ipv4/defs_netbsd.go deleted file mode 100644 index 8f8af1b89..000000000 --- a/deps/golang.org/x/net/ipv4/defs_netbsd.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ - -package ipv4 - -/* -#include -*/ -import "C" - -const ( - sysIP_OPTIONS = C.IP_OPTIONS - sysIP_HDRINCL = C.IP_HDRINCL - sysIP_TOS = C.IP_TOS - sysIP_TTL = C.IP_TTL - sysIP_RECVOPTS = C.IP_RECVOPTS - sysIP_RECVRETOPTS = C.IP_RECVRETOPTS - sysIP_RECVDSTADDR = C.IP_RECVDSTADDR - sysIP_RETOPTS = C.IP_RETOPTS - sysIP_RECVIF = C.IP_RECVIF - sysIP_RECVTTL = C.IP_RECVTTL - - sysIP_MULTICAST_IF = C.IP_MULTICAST_IF - sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL - sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP - sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP - sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP - - sizeofIPMreq = C.sizeof_struct_ip_mreq -) - -type ipMreq C.struct_ip_mreq diff --git a/deps/golang.org/x/net/ipv4/defs_openbsd.go b/deps/golang.org/x/net/ipv4/defs_openbsd.go deleted file mode 100644 index 8f8af1b89..000000000 --- a/deps/golang.org/x/net/ipv4/defs_openbsd.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ - -package ipv4 - -/* -#include -*/ -import "C" - -const ( - sysIP_OPTIONS = C.IP_OPTIONS - sysIP_HDRINCL = C.IP_HDRINCL - sysIP_TOS = C.IP_TOS - sysIP_TTL = C.IP_TTL - sysIP_RECVOPTS = C.IP_RECVOPTS - sysIP_RECVRETOPTS = C.IP_RECVRETOPTS - sysIP_RECVDSTADDR = C.IP_RECVDSTADDR - sysIP_RETOPTS = C.IP_RETOPTS - sysIP_RECVIF = C.IP_RECVIF - sysIP_RECVTTL = C.IP_RECVTTL - - sysIP_MULTICAST_IF = C.IP_MULTICAST_IF - sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL - sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP - sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP - sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP - - sizeofIPMreq = C.sizeof_struct_ip_mreq -) - -type ipMreq C.struct_ip_mreq diff --git a/deps/golang.org/x/net/ipv4/defs_solaris.go b/deps/golang.org/x/net/ipv4/defs_solaris.go deleted file mode 100644 index aeb33e9c8..000000000 --- a/deps/golang.org/x/net/ipv4/defs_solaris.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ - -package ipv4 - -/* -#include - -#include -*/ -import "C" - -const ( - sysIP_OPTIONS = C.IP_OPTIONS - sysIP_HDRINCL = C.IP_HDRINCL - sysIP_TOS = C.IP_TOS - sysIP_TTL = C.IP_TTL - sysIP_RECVOPTS = C.IP_RECVOPTS - sysIP_RECVRETOPTS = C.IP_RECVRETOPTS - sysIP_RECVDSTADDR = C.IP_RECVDSTADDR - sysIP_RETOPTS = C.IP_RETOPTS - sysIP_RECVIF = C.IP_RECVIF - sysIP_RECVSLLA = C.IP_RECVSLLA - sysIP_RECVTTL = C.IP_RECVTTL - - sysIP_MULTICAST_IF = C.IP_MULTICAST_IF - sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL - sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP - sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP - sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP - sysIP_BLOCK_SOURCE = C.IP_BLOCK_SOURCE - sysIP_UNBLOCK_SOURCE = C.IP_UNBLOCK_SOURCE - sysIP_ADD_SOURCE_MEMBERSHIP = C.IP_ADD_SOURCE_MEMBERSHIP - sysIP_DROP_SOURCE_MEMBERSHIP = C.IP_DROP_SOURCE_MEMBERSHIP - sysIP_NEXTHOP = C.IP_NEXTHOP - - sysIP_PKTINFO = C.IP_PKTINFO - sysIP_RECVPKTINFO = C.IP_RECVPKTINFO - sysIP_DONTFRAG = C.IP_DONTFRAG - - sysIP_BOUND_IF = C.IP_BOUND_IF - sysIP_UNSPEC_SRC = C.IP_UNSPEC_SRC - sysIP_BROADCAST_TTL = C.IP_BROADCAST_TTL - sysIP_DHCPINIT_IF = C.IP_DHCPINIT_IF - - sysIP_REUSEADDR = C.IP_REUSEADDR - sysIP_DONTROUTE = C.IP_DONTROUTE - sysIP_BROADCAST = C.IP_BROADCAST - - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofInetPktinfo = C.sizeof_struct_in_pktinfo - - sizeofIPMreq = C.sizeof_struct_ip_mreq - sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req -) - -type sockaddrStorage C.struct_sockaddr_storage - -type sockaddrInet C.struct_sockaddr_in - -type inetPktinfo C.struct_in_pktinfo - -type ipMreq C.struct_ip_mreq - -type ipMreqSource C.struct_ip_mreq_source - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req diff --git a/deps/golang.org/x/net/ipv4/dgramopt.go b/deps/golang.org/x/net/ipv4/dgramopt.go deleted file mode 100644 index 54d77d5fe..000000000 --- a/deps/golang.org/x/net/ipv4/dgramopt.go +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "syscall" - - "golang.org/x/net/bpf" -) - -// MulticastTTL returns the time-to-live field value for outgoing -// multicast packets. -func (c *dgramOpt) MulticastTTL() (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastTTL] - if !ok { - return 0, errOpNoSupport - } - return so.GetInt(c.Conn) -} - -// SetMulticastTTL sets the time-to-live field value for future -// outgoing multicast packets. -func (c *dgramOpt) SetMulticastTTL(ttl int) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastTTL] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, ttl) -} - -// MulticastInterface returns the default interface for multicast -// packet transmissions. -func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { - if !c.ok() { - return nil, syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastInterface] - if !ok { - return nil, errOpNoSupport - } - return so.getMulticastInterface(c.Conn) -} - -// SetMulticastInterface sets the default interface for future -// multicast packet transmissions. -func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastInterface] - if !ok { - return errOpNoSupport - } - return so.setMulticastInterface(c.Conn, ifi) -} - -// MulticastLoopback reports whether transmitted multicast packets -// should be copied and send back to the originator. -func (c *dgramOpt) MulticastLoopback() (bool, error) { - if !c.ok() { - return false, syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastLoopback] - if !ok { - return false, errOpNoSupport - } - on, err := so.GetInt(c.Conn) - if err != nil { - return false, err - } - return on == 1, nil -} - -// SetMulticastLoopback sets whether transmitted multicast packets -// should be copied and send back to the originator. -func (c *dgramOpt) SetMulticastLoopback(on bool) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastLoopback] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, boolint(on)) -} - -// JoinGroup joins the group address group on the interface ifi. -// By default all sources that can cast data to group are accepted. -// It's possible to mute and unmute data transmission from a specific -// source by using ExcludeSourceSpecificGroup and -// IncludeSourceSpecificGroup. -// JoinGroup uses the system assigned multicast interface when ifi is -// nil, although this is not recommended because the assignment -// depends on platforms and sometimes it might require routing -// configuration. -func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoJoinGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP4(group) - if grp == nil { - return errMissingAddress - } - return so.setGroup(c.Conn, ifi, grp) -} - -// LeaveGroup leaves the group address group on the interface ifi -// regardless of whether the group is any-source group or -// source-specific group. -func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoLeaveGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP4(group) - if grp == nil { - return errMissingAddress - } - return so.setGroup(c.Conn, ifi, grp) -} - -// JoinSourceSpecificGroup joins the source-specific group comprising -// group and source on the interface ifi. -// JoinSourceSpecificGroup uses the system assigned multicast -// interface when ifi is nil, although this is not recommended because -// the assignment depends on platforms and sometimes it might require -// routing configuration. -func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoJoinSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP4(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP4(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// LeaveSourceSpecificGroup leaves the source-specific group on the -// interface ifi. -func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoLeaveSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP4(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP4(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// ExcludeSourceSpecificGroup excludes the source-specific group from -// the already joined any-source groups by JoinGroup on the interface -// ifi. -func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoBlockSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP4(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP4(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// IncludeSourceSpecificGroup includes the excluded source-specific -// group by ExcludeSourceSpecificGroup again on the interface ifi. -func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoUnblockSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP4(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP4(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// ICMPFilter returns an ICMP filter. -// Currently only Linux supports this. -func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { - if !c.ok() { - return nil, syscall.EINVAL - } - so, ok := sockOpts[ssoICMPFilter] - if !ok { - return nil, errOpNoSupport - } - return so.getICMPFilter(c.Conn) -} - -// SetICMPFilter deploys the ICMP filter. -// Currently only Linux supports this. -func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoICMPFilter] - if !ok { - return errOpNoSupport - } - return so.setICMPFilter(c.Conn, f) -} - -// SetBPF attaches a BPF program to the connection. -// -// Only supported on Linux. -func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoAttachFilter] - if !ok { - return errOpNoSupport - } - return so.setBPF(c.Conn, filter) -} diff --git a/deps/golang.org/x/net/ipv4/doc.go b/deps/golang.org/x/net/ipv4/doc.go deleted file mode 100644 index d12455548..000000000 --- a/deps/golang.org/x/net/ipv4/doc.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ipv4 implements IP-level socket options for the Internet -// Protocol version 4. -// -// The package provides IP-level socket options that allow -// manipulation of IPv4 facilities. -// -// The IPv4 protocol and basic host requirements for IPv4 are defined -// in RFC 791 and RFC 1122. -// Host extensions for multicasting and socket interface extensions -// for multicast source filters are defined in RFC 1112 and RFC 3678. -// IGMPv1, IGMPv2 and IGMPv3 are defined in RFC 1112, RFC 2236 and RFC -// 3376. -// Source-specific multicast is defined in RFC 4607. -// -// -// Unicasting -// -// The options for unicasting are available for net.TCPConn, -// net.UDPConn and net.IPConn which are created as network connections -// that use the IPv4 transport. When a single TCP connection carrying -// a data flow of multiple packets needs to indicate the flow is -// important, Conn is used to set the type-of-service field on the -// IPv4 header for each packet. -// -// ln, err := net.Listen("tcp4", "0.0.0.0:1024") -// if err != nil { -// // error handling -// } -// defer ln.Close() -// for { -// c, err := ln.Accept() -// if err != nil { -// // error handling -// } -// go func(c net.Conn) { -// defer c.Close() -// -// The outgoing packets will be labeled DiffServ assured forwarding -// class 1 low drop precedence, known as AF11 packets. -// -// if err := ipv4.NewConn(c).SetTOS(0x28); err != nil { -// // error handling -// } -// if _, err := c.Write(data); err != nil { -// // error handling -// } -// }(c) -// } -// -// -// Multicasting -// -// The options for multicasting are available for net.UDPConn and -// net.IPconn which are created as network connections that use the -// IPv4 transport. A few network facilities must be prepared before -// you begin multicasting, at a minimum joining network interfaces and -// multicast groups. -// -// en0, err := net.InterfaceByName("en0") -// if err != nil { -// // error handling -// } -// en1, err := net.InterfaceByIndex(911) -// if err != nil { -// // error handling -// } -// group := net.IPv4(224, 0, 0, 250) -// -// First, an application listens to an appropriate address with an -// appropriate service port. -// -// c, err := net.ListenPacket("udp4", "0.0.0.0:1024") -// if err != nil { -// // error handling -// } -// defer c.Close() -// -// Second, the application joins multicast groups, starts listening to -// the groups on the specified network interfaces. Note that the -// service port for transport layer protocol does not matter with this -// operation as joining groups affects only network and link layer -// protocols, such as IPv4 and Ethernet. -// -// p := ipv4.NewPacketConn(c) -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil { -// // error handling -// } -// -// The application might set per packet control message transmissions -// between the protocol stack within the kernel. When the application -// needs a destination address on an incoming packet, -// SetControlMessage of PacketConn is used to enable control message -// transmissions. -// -// if err := p.SetControlMessage(ipv4.FlagDst, true); err != nil { -// // error handling -// } -// -// The application could identify whether the received packets are -// of interest by using the control message that contains the -// destination address of the received packet. -// -// b := make([]byte, 1500) -// for { -// n, cm, src, err := p.ReadFrom(b) -// if err != nil { -// // error handling -// } -// if cm.Dst.IsMulticast() { -// if cm.Dst.Equal(group) { -// // joined group, do something -// } else { -// // unknown group, discard -// continue -// } -// } -// -// The application can also send both unicast and multicast packets. -// -// p.SetTOS(0x0) -// p.SetTTL(16) -// if _, err := p.WriteTo(data, nil, src); err != nil { -// // error handling -// } -// dst := &net.UDPAddr{IP: group, Port: 1024} -// for _, ifi := range []*net.Interface{en0, en1} { -// if err := p.SetMulticastInterface(ifi); err != nil { -// // error handling -// } -// p.SetMulticastTTL(2) -// if _, err := p.WriteTo(data, nil, dst); err != nil { -// // error handling -// } -// } -// } -// -// -// More multicasting -// -// An application that uses PacketConn or RawConn may join multiple -// multicast groups. For example, a UDP listener with port 1024 might -// join two different groups across over two different network -// interfaces by using: -// -// c, err := net.ListenPacket("udp4", "0.0.0.0:1024") -// if err != nil { -// // error handling -// } -// defer c.Close() -// p := ipv4.NewPacketConn(c) -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}); err != nil { -// // error handling -// } -// -// It is possible for multiple UDP listeners that listen on the same -// UDP port to join the same multicast group. The net package will -// provide a socket that listens to a wildcard address with reusable -// UDP port when an appropriate multicast address prefix is passed to -// the net.ListenPacket or net.ListenUDP. -// -// c1, err := net.ListenPacket("udp4", "224.0.0.0:1024") -// if err != nil { -// // error handling -// } -// defer c1.Close() -// c2, err := net.ListenPacket("udp4", "224.0.0.0:1024") -// if err != nil { -// // error handling -// } -// defer c2.Close() -// p1 := ipv4.NewPacketConn(c1) -// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { -// // error handling -// } -// p2 := ipv4.NewPacketConn(c2) -// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { -// // error handling -// } -// -// Also it is possible for the application to leave or rejoin a -// multicast group on the network interface. -// -// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 248)}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.IPv4(224, 0, 0, 250)}); err != nil { -// // error handling -// } -// -// -// Source-specific multicasting -// -// An application that uses PacketConn or RawConn on IGMPv3 supported -// platform is able to join source-specific multicast groups. -// The application may use JoinSourceSpecificGroup and -// LeaveSourceSpecificGroup for the operation known as "include" mode, -// -// ssmgroup := net.UDPAddr{IP: net.IPv4(232, 7, 8, 9)} -// ssmsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 1)}) -// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { -// // error handling -// } -// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { -// // error handling -// } -// -// or JoinGroup, ExcludeSourceSpecificGroup, -// IncludeSourceSpecificGroup and LeaveGroup for the operation known -// as "exclude" mode. -// -// exclsource := net.UDPAddr{IP: net.IPv4(192, 168, 0, 254)} -// if err := p.JoinGroup(en0, &ssmgroup); err != nil { -// // error handling -// } -// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil { -// // error handling -// } -// if err := p.LeaveGroup(en0, &ssmgroup); err != nil { -// // error handling -// } -// -// Note that it depends on each platform implementation what happens -// when an application which runs on IGMPv3 unsupported platform uses -// JoinSourceSpecificGroup and LeaveSourceSpecificGroup. -// In general the platform tries to fall back to conversations using -// IGMPv1 or IGMPv2 and starts to listen to multicast traffic. -// In the fallback case, ExcludeSourceSpecificGroup and -// IncludeSourceSpecificGroup may return an error. -package ipv4 // import "golang.org/x/net/ipv4" - -// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9. diff --git a/deps/golang.org/x/net/ipv4/endpoint.go b/deps/golang.org/x/net/ipv4/endpoint.go deleted file mode 100644 index 2ab877363..000000000 --- a/deps/golang.org/x/net/ipv4/endpoint.go +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "syscall" - "time" - - "golang.org/x/net/internal/socket" -) - -// BUG(mikio): On Windows, the JoinSourceSpecificGroup, -// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and -// IncludeSourceSpecificGroup methods of PacketConn and RawConn are -// not implemented. - -// A Conn represents a network endpoint that uses the IPv4 transport. -// It is used to control basic IP-level socket options such as TOS and -// TTL. -type Conn struct { - genericOpt -} - -type genericOpt struct { - *socket.Conn -} - -func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil } - -// NewConn returns a new Conn. -func NewConn(c net.Conn) *Conn { - cc, _ := socket.NewConn(c) - return &Conn{ - genericOpt: genericOpt{Conn: cc}, - } -} - -// A PacketConn represents a packet network endpoint that uses the -// IPv4 transport. It is used to control several IP-level socket -// options including multicasting. It also provides datagram based -// network I/O methods specific to the IPv4 and higher layer protocols -// such as UDP. -type PacketConn struct { - genericOpt - dgramOpt - payloadHandler -} - -type dgramOpt struct { - *socket.Conn -} - -func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil } - -// SetControlMessage sets the per packet IP-level socket options. -func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on) -} - -// SetDeadline sets the read and write deadlines associated with the -// endpoint. -func (c *PacketConn) SetDeadline(t time.Time) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.PacketConn.SetDeadline(t) -} - -// SetReadDeadline sets the read deadline associated with the -// endpoint. -func (c *PacketConn) SetReadDeadline(t time.Time) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.PacketConn.SetReadDeadline(t) -} - -// SetWriteDeadline sets the write deadline associated with the -// endpoint. -func (c *PacketConn) SetWriteDeadline(t time.Time) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.PacketConn.SetWriteDeadline(t) -} - -// Close closes the endpoint. -func (c *PacketConn) Close() error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.PacketConn.Close() -} - -// NewPacketConn returns a new PacketConn using c as its underlying -// transport. -func NewPacketConn(c net.PacketConn) *PacketConn { - cc, _ := socket.NewConn(c.(net.Conn)) - p := &PacketConn{ - genericOpt: genericOpt{Conn: cc}, - dgramOpt: dgramOpt{Conn: cc}, - payloadHandler: payloadHandler{PacketConn: c, Conn: cc}, - } - return p -} - -// A RawConn represents a packet network endpoint that uses the IPv4 -// transport. It is used to control several IP-level socket options -// including IPv4 header manipulation. It also provides datagram -// based network I/O methods specific to the IPv4 and higher layer -// protocols that handle IPv4 datagram directly such as OSPF, GRE. -type RawConn struct { - genericOpt - dgramOpt - packetHandler -} - -// SetControlMessage sets the per packet IP-level socket options. -func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error { - if !c.packetHandler.ok() { - return syscall.EINVAL - } - return setControlMessage(c.dgramOpt.Conn, &c.packetHandler.rawOpt, cf, on) -} - -// SetDeadline sets the read and write deadlines associated with the -// endpoint. -func (c *RawConn) SetDeadline(t time.Time) error { - if !c.packetHandler.ok() { - return syscall.EINVAL - } - return c.packetHandler.IPConn.SetDeadline(t) -} - -// SetReadDeadline sets the read deadline associated with the -// endpoint. -func (c *RawConn) SetReadDeadline(t time.Time) error { - if !c.packetHandler.ok() { - return syscall.EINVAL - } - return c.packetHandler.IPConn.SetReadDeadline(t) -} - -// SetWriteDeadline sets the write deadline associated with the -// endpoint. -func (c *RawConn) SetWriteDeadline(t time.Time) error { - if !c.packetHandler.ok() { - return syscall.EINVAL - } - return c.packetHandler.IPConn.SetWriteDeadline(t) -} - -// Close closes the endpoint. -func (c *RawConn) Close() error { - if !c.packetHandler.ok() { - return syscall.EINVAL - } - return c.packetHandler.IPConn.Close() -} - -// NewRawConn returns a new RawConn using c as its underlying -// transport. -func NewRawConn(c net.PacketConn) (*RawConn, error) { - cc, err := socket.NewConn(c.(net.Conn)) - if err != nil { - return nil, err - } - r := &RawConn{ - genericOpt: genericOpt{Conn: cc}, - dgramOpt: dgramOpt{Conn: cc}, - packetHandler: packetHandler{IPConn: c.(*net.IPConn), Conn: cc}, - } - so, ok := sockOpts[ssoHeaderPrepend] - if !ok { - return nil, errOpNoSupport - } - if err := so.SetInt(r.dgramOpt.Conn, boolint(true)); err != nil { - return nil, err - } - return r, nil -} diff --git a/deps/golang.org/x/net/ipv4/example_test.go b/deps/golang.org/x/net/ipv4/example_test.go deleted file mode 100644 index ddc7577e8..000000000 --- a/deps/golang.org/x/net/ipv4/example_test.go +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "fmt" - "log" - "net" - "os" - "runtime" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/ipv4" -) - -func ExampleConn_markingTCP() { - ln, err := net.Listen("tcp", "0.0.0.0:1024") - if err != nil { - log.Fatal(err) - } - defer ln.Close() - - for { - c, err := ln.Accept() - if err != nil { - log.Fatal(err) - } - go func(c net.Conn) { - defer c.Close() - if c.RemoteAddr().(*net.TCPAddr).IP.To4() != nil { - p := ipv4.NewConn(c) - if err := p.SetTOS(0x28); err != nil { // DSCP AF11 - log.Fatal(err) - } - if err := p.SetTTL(128); err != nil { - log.Fatal(err) - } - } - if _, err := c.Write([]byte("HELLO-R-U-THERE-ACK")); err != nil { - log.Fatal(err) - } - }(c) - } -} - -func ExamplePacketConn_servingOneShotMulticastDNS() { - c, err := net.ListenPacket("udp4", "0.0.0.0:5353") // mDNS over UDP - if err != nil { - log.Fatal(err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - - en0, err := net.InterfaceByName("en0") - if err != nil { - log.Fatal(err) - } - mDNSLinkLocal := net.UDPAddr{IP: net.IPv4(224, 0, 0, 251)} - if err := p.JoinGroup(en0, &mDNSLinkLocal); err != nil { - log.Fatal(err) - } - defer p.LeaveGroup(en0, &mDNSLinkLocal) - if err := p.SetControlMessage(ipv4.FlagDst, true); err != nil { - log.Fatal(err) - } - - b := make([]byte, 1500) - for { - _, cm, peer, err := p.ReadFrom(b) - if err != nil { - log.Fatal(err) - } - if !cm.Dst.IsMulticast() || !cm.Dst.Equal(mDNSLinkLocal.IP) { - continue - } - answers := []byte("FAKE-MDNS-ANSWERS") // fake mDNS answers, you need to implement this - if _, err := p.WriteTo(answers, nil, peer); err != nil { - log.Fatal(err) - } - } -} - -func ExamplePacketConn_tracingIPPacketRoute() { - // Tracing an IP packet route to www.google.com. - - const host = "www.google.com" - ips, err := net.LookupIP(host) - if err != nil { - log.Fatal(err) - } - var dst net.IPAddr - for _, ip := range ips { - if ip.To4() != nil { - dst.IP = ip - fmt.Printf("using %v for tracing an IP packet route to %s\n", dst.IP, host) - break - } - } - if dst.IP == nil { - log.Fatal("no A record found") - } - - c, err := net.ListenPacket("ip4:1", "0.0.0.0") // ICMP for IPv4 - if err != nil { - log.Fatal(err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - - if err := p.SetControlMessage(ipv4.FlagTTL|ipv4.FlagSrc|ipv4.FlagDst|ipv4.FlagInterface, true); err != nil { - log.Fatal(err) - } - wm := icmp.Message{ - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, - Data: []byte("HELLO-R-U-THERE"), - }, - } - - rb := make([]byte, 1500) - for i := 1; i <= 64; i++ { // up to 64 hops - wm.Body.(*icmp.Echo).Seq = i - wb, err := wm.Marshal(nil) - if err != nil { - log.Fatal(err) - } - if err := p.SetTTL(i); err != nil { - log.Fatal(err) - } - - // In the real world usually there are several - // multiple traffic-engineered paths for each hop. - // You may need to probe a few times to each hop. - begin := time.Now() - if _, err := p.WriteTo(wb, nil, &dst); err != nil { - log.Fatal(err) - } - if err := p.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil { - log.Fatal(err) - } - n, cm, peer, err := p.ReadFrom(rb) - if err != nil { - if err, ok := err.(net.Error); ok && err.Timeout() { - fmt.Printf("%v\t*\n", i) - continue - } - log.Fatal(err) - } - rm, err := icmp.ParseMessage(1, rb[:n]) - if err != nil { - log.Fatal(err) - } - rtt := time.Since(begin) - - // In the real world you need to determine whether the - // received message is yours using ControlMessage.Src, - // ControlMessage.Dst, icmp.Echo.ID and icmp.Echo.Seq. - switch rm.Type { - case ipv4.ICMPTypeTimeExceeded: - names, _ := net.LookupAddr(peer.String()) - fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, cm) - case ipv4.ICMPTypeEchoReply: - names, _ := net.LookupAddr(peer.String()) - fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, cm) - return - default: - log.Printf("unknown ICMP message: %+v\n", rm) - } - } -} - -func ExampleRawConn_advertisingOSPFHello() { - c, err := net.ListenPacket("ip4:89", "0.0.0.0") // OSPF for IPv4 - if err != nil { - log.Fatal(err) - } - defer c.Close() - r, err := ipv4.NewRawConn(c) - if err != nil { - log.Fatal(err) - } - - en0, err := net.InterfaceByName("en0") - if err != nil { - log.Fatal(err) - } - allSPFRouters := net.IPAddr{IP: net.IPv4(224, 0, 0, 5)} - if err := r.JoinGroup(en0, &allSPFRouters); err != nil { - log.Fatal(err) - } - defer r.LeaveGroup(en0, &allSPFRouters) - - hello := make([]byte, 24) // fake hello data, you need to implement this - ospf := make([]byte, 24) // fake ospf header, you need to implement this - ospf[0] = 2 // version 2 - ospf[1] = 1 // hello packet - ospf = append(ospf, hello...) - iph := &ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TOS: 0xc0, // DSCP CS6 - TotalLen: ipv4.HeaderLen + len(ospf), - TTL: 1, - Protocol: 89, - Dst: allSPFRouters.IP.To4(), - } - - var cm *ipv4.ControlMessage - switch runtime.GOOS { - case "darwin", "linux": - cm = &ipv4.ControlMessage{IfIndex: en0.Index} - default: - if err := r.SetMulticastInterface(en0); err != nil { - log.Fatal(err) - } - } - if err := r.WriteTo(iph, ospf, cm); err != nil { - log.Fatal(err) - } -} diff --git a/deps/golang.org/x/net/ipv4/gen.go b/deps/golang.org/x/net/ipv4/gen.go deleted file mode 100644 index 1bb1737f6..000000000 --- a/deps/golang.org/x/net/ipv4/gen.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -//go:generate go run gen.go - -// This program generates system adaptation constants and types, -// internet protocol constants and tables by reading template files -// and IANA protocol registries. -package main - -import ( - "bytes" - "encoding/xml" - "fmt" - "go/format" - "io" - "io/ioutil" - "net/http" - "os" - "os/exec" - "runtime" - "strconv" - "strings" -) - -func main() { - if err := genzsys(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - if err := geniana(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - -func genzsys() error { - defs := "defs_" + runtime.GOOS + ".go" - f, err := os.Open(defs) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - f.Close() - cmd := exec.Command("go", "tool", "cgo", "-godefs", defs) - b, err := cmd.Output() - if err != nil { - return err - } - b, err = format.Source(b) - if err != nil { - return err - } - zsys := "zsys_" + runtime.GOOS + ".go" - switch runtime.GOOS { - case "freebsd", "linux": - zsys = "zsys_" + runtime.GOOS + "_" + runtime.GOARCH + ".go" - } - if err := ioutil.WriteFile(zsys, b, 0644); err != nil { - return err - } - return nil -} - -var registries = []struct { - url string - parse func(io.Writer, io.Reader) error -}{ - { - "https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml", - parseICMPv4Parameters, - }, -} - -func geniana() error { - var bb bytes.Buffer - fmt.Fprintf(&bb, "// go generate gen.go\n") - fmt.Fprintf(&bb, "// Code generated by the command above; DO NOT EDIT.\n\n") - fmt.Fprintf(&bb, "package ipv4\n\n") - for _, r := range registries { - resp, err := http.Get(r.url) - if err != nil { - return err - } - defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - return fmt.Errorf("got HTTP status code %v for %v\n", resp.StatusCode, r.url) - } - if err := r.parse(&bb, resp.Body); err != nil { - return err - } - fmt.Fprintf(&bb, "\n") - } - b, err := format.Source(bb.Bytes()) - if err != nil { - return err - } - if err := ioutil.WriteFile("iana.go", b, 0644); err != nil { - return err - } - return nil -} - -func parseICMPv4Parameters(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var icp icmpv4Parameters - if err := dec.Decode(&icp); err != nil { - return err - } - prs := icp.escape() - fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated) - fmt.Fprintf(w, "const (\n") - for _, pr := range prs { - if pr.Descr == "" { - continue - } - fmt.Fprintf(w, "ICMPType%s ICMPType = %d", pr.Descr, pr.Value) - fmt.Fprintf(w, "// %s\n", pr.OrigDescr) - } - fmt.Fprintf(w, ")\n\n") - fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated) - fmt.Fprintf(w, "var icmpTypes = map[ICMPType]string{\n") - for _, pr := range prs { - if pr.Descr == "" { - continue - } - fmt.Fprintf(w, "%d: %q,\n", pr.Value, strings.ToLower(pr.OrigDescr)) - } - fmt.Fprintf(w, "}\n") - return nil -} - -type icmpv4Parameters struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - Registries []struct { - Title string `xml:"title"` - Records []struct { - Value string `xml:"value"` - Descr string `xml:"description"` - } `xml:"record"` - } `xml:"registry"` -} - -type canonICMPv4ParamRecord struct { - OrigDescr string - Descr string - Value int -} - -func (icp *icmpv4Parameters) escape() []canonICMPv4ParamRecord { - id := -1 - for i, r := range icp.Registries { - if strings.Contains(r.Title, "Type") || strings.Contains(r.Title, "type") { - id = i - break - } - } - if id < 0 { - return nil - } - prs := make([]canonICMPv4ParamRecord, len(icp.Registries[id].Records)) - sr := strings.NewReplacer( - "Messages", "", - "Message", "", - "ICMP", "", - "+", "P", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, pr := range icp.Registries[id].Records { - if strings.Contains(pr.Descr, "Reserved") || - strings.Contains(pr.Descr, "Unassigned") || - strings.Contains(pr.Descr, "Deprecated") || - strings.Contains(pr.Descr, "Experiment") || - strings.Contains(pr.Descr, "experiment") { - continue - } - ss := strings.Split(pr.Descr, "\n") - if len(ss) > 1 { - prs[i].Descr = strings.Join(ss, " ") - } else { - prs[i].Descr = ss[0] - } - s := strings.TrimSpace(prs[i].Descr) - prs[i].OrigDescr = s - prs[i].Descr = sr.Replace(s) - prs[i].Value, _ = strconv.Atoi(pr.Value) - } - return prs -} diff --git a/deps/golang.org/x/net/ipv4/genericopt.go b/deps/golang.org/x/net/ipv4/genericopt.go deleted file mode 100644 index 119bf841b..000000000 --- a/deps/golang.org/x/net/ipv4/genericopt.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import "syscall" - -// TOS returns the type-of-service field value for outgoing packets. -func (c *genericOpt) TOS() (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - so, ok := sockOpts[ssoTOS] - if !ok { - return 0, errOpNoSupport - } - return so.GetInt(c.Conn) -} - -// SetTOS sets the type-of-service field value for future outgoing -// packets. -func (c *genericOpt) SetTOS(tos int) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoTOS] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, tos) -} - -// TTL returns the time-to-live field value for outgoing packets. -func (c *genericOpt) TTL() (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - so, ok := sockOpts[ssoTTL] - if !ok { - return 0, errOpNoSupport - } - return so.GetInt(c.Conn) -} - -// SetTTL sets the time-to-live field value for future outgoing -// packets. -func (c *genericOpt) SetTTL(ttl int) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoTTL] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, ttl) -} diff --git a/deps/golang.org/x/net/ipv4/header.go b/deps/golang.org/x/net/ipv4/header.go deleted file mode 100644 index c8822a6ab..000000000 --- a/deps/golang.org/x/net/ipv4/header.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "encoding/binary" - "fmt" - "net" - "runtime" - "syscall" - - "golang.org/x/net/internal/socket" -) - -const ( - Version = 4 // protocol version - HeaderLen = 20 // header length without extension headers - maxHeaderLen = 60 // sensible default, revisit if later RFCs define new usage of version and header length fields -) - -type HeaderFlags int - -const ( - MoreFragments HeaderFlags = 1 << iota // more fragments flag - DontFragment // don't fragment flag -) - -// A Header represents an IPv4 header. -type Header struct { - Version int // protocol version - Len int // header length - TOS int // type-of-service - TotalLen int // packet total length - ID int // identification - Flags HeaderFlags // flags - FragOff int // fragment offset - TTL int // time-to-live - Protocol int // next protocol - Checksum int // checksum - Src net.IP // source address - Dst net.IP // destination address - Options []byte // options, extension headers -} - -func (h *Header) String() string { - if h == nil { - return "" - } - return fmt.Sprintf("ver=%d hdrlen=%d tos=%#x totallen=%d id=%#x flags=%#x fragoff=%#x ttl=%d proto=%d cksum=%#x src=%v dst=%v", h.Version, h.Len, h.TOS, h.TotalLen, h.ID, h.Flags, h.FragOff, h.TTL, h.Protocol, h.Checksum, h.Src, h.Dst) -} - -// Marshal returns the binary encoding of h. -func (h *Header) Marshal() ([]byte, error) { - if h == nil { - return nil, syscall.EINVAL - } - if h.Len < HeaderLen { - return nil, errHeaderTooShort - } - hdrlen := HeaderLen + len(h.Options) - b := make([]byte, hdrlen) - b[0] = byte(Version<<4 | (hdrlen >> 2 & 0x0f)) - b[1] = byte(h.TOS) - flagsAndFragOff := (h.FragOff & 0x1fff) | int(h.Flags<<13) - switch runtime.GOOS { - case "darwin", "dragonfly", "netbsd": - socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen)) - socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) - case "freebsd": - if freebsdVersion < 1100000 { - socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen)) - socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) - } else { - binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen)) - binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) - } - default: - binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen)) - binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff)) - } - binary.BigEndian.PutUint16(b[4:6], uint16(h.ID)) - b[8] = byte(h.TTL) - b[9] = byte(h.Protocol) - binary.BigEndian.PutUint16(b[10:12], uint16(h.Checksum)) - if ip := h.Src.To4(); ip != nil { - copy(b[12:16], ip[:net.IPv4len]) - } - if ip := h.Dst.To4(); ip != nil { - copy(b[16:20], ip[:net.IPv4len]) - } else { - return nil, errMissingAddress - } - if len(h.Options) > 0 { - copy(b[HeaderLen:], h.Options) - } - return b, nil -} - -// Parse parses b as an IPv4 header and stores the result in h. -func (h *Header) Parse(b []byte) error { - if h == nil || len(b) < HeaderLen { - return errHeaderTooShort - } - hdrlen := int(b[0]&0x0f) << 2 - if hdrlen > len(b) { - return errBufferTooShort - } - h.Version = int(b[0] >> 4) - h.Len = hdrlen - h.TOS = int(b[1]) - h.ID = int(binary.BigEndian.Uint16(b[4:6])) - h.TTL = int(b[8]) - h.Protocol = int(b[9]) - h.Checksum = int(binary.BigEndian.Uint16(b[10:12])) - h.Src = net.IPv4(b[12], b[13], b[14], b[15]) - h.Dst = net.IPv4(b[16], b[17], b[18], b[19]) - switch runtime.GOOS { - case "darwin", "dragonfly", "netbsd": - h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) + hdrlen - h.FragOff = int(socket.NativeEndian.Uint16(b[6:8])) - case "freebsd": - if freebsdVersion < 1100000 { - h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) - if freebsdVersion < 1000000 { - h.TotalLen += hdrlen - } - h.FragOff = int(socket.NativeEndian.Uint16(b[6:8])) - } else { - h.TotalLen = int(binary.BigEndian.Uint16(b[2:4])) - h.FragOff = int(binary.BigEndian.Uint16(b[6:8])) - } - default: - h.TotalLen = int(binary.BigEndian.Uint16(b[2:4])) - h.FragOff = int(binary.BigEndian.Uint16(b[6:8])) - } - h.Flags = HeaderFlags(h.FragOff&0xe000) >> 13 - h.FragOff = h.FragOff & 0x1fff - optlen := hdrlen - HeaderLen - if optlen > 0 && len(b) >= hdrlen { - if cap(h.Options) < optlen { - h.Options = make([]byte, optlen) - } else { - h.Options = h.Options[:optlen] - } - copy(h.Options, b[HeaderLen:hdrlen]) - } - return nil -} - -// ParseHeader parses b as an IPv4 header. -func ParseHeader(b []byte) (*Header, error) { - h := new(Header) - if err := h.Parse(b); err != nil { - return nil, err - } - return h, nil -} diff --git a/deps/golang.org/x/net/ipv4/header_test.go b/deps/golang.org/x/net/ipv4/header_test.go deleted file mode 100644 index a246aeea1..000000000 --- a/deps/golang.org/x/net/ipv4/header_test.go +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "bytes" - "encoding/binary" - "net" - "reflect" - "runtime" - "strings" - "testing" - - "golang.org/x/net/internal/socket" -) - -type headerTest struct { - wireHeaderFromKernel []byte - wireHeaderToKernel []byte - wireHeaderFromTradBSDKernel []byte - wireHeaderToTradBSDKernel []byte - wireHeaderFromFreeBSD10Kernel []byte - wireHeaderToFreeBSD10Kernel []byte - *Header -} - -var headerLittleEndianTests = []headerTest{ - // TODO(mikio): Add platform dependent wire header formats when - // we support new platforms. - { - wireHeaderFromKernel: []byte{ - 0x45, 0x01, 0xbe, 0xef, - 0xca, 0xfe, 0x45, 0xdc, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - }, - wireHeaderToKernel: []byte{ - 0x45, 0x01, 0xbe, 0xef, - 0xca, 0xfe, 0x45, 0xdc, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - }, - wireHeaderFromTradBSDKernel: []byte{ - 0x45, 0x01, 0xdb, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - }, - wireHeaderToTradBSDKernel: []byte{ - 0x45, 0x01, 0xef, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - }, - wireHeaderFromFreeBSD10Kernel: []byte{ - 0x45, 0x01, 0xef, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - }, - wireHeaderToFreeBSD10Kernel: []byte{ - 0x45, 0x01, 0xef, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - }, - Header: &Header{ - Version: Version, - Len: HeaderLen, - TOS: 1, - TotalLen: 0xbeef, - ID: 0xcafe, - Flags: DontFragment, - FragOff: 1500, - TTL: 255, - Protocol: 1, - Checksum: 0xdead, - Src: net.IPv4(172, 16, 254, 254), - Dst: net.IPv4(192, 168, 0, 1), - }, - }, - - // with option headers - { - wireHeaderFromKernel: []byte{ - 0x46, 0x01, 0xbe, 0xf3, - 0xca, 0xfe, 0x45, 0xdc, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - 0xff, 0xfe, 0xfe, 0xff, - }, - wireHeaderToKernel: []byte{ - 0x46, 0x01, 0xbe, 0xf3, - 0xca, 0xfe, 0x45, 0xdc, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - 0xff, 0xfe, 0xfe, 0xff, - }, - wireHeaderFromTradBSDKernel: []byte{ - 0x46, 0x01, 0xdb, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - 0xff, 0xfe, 0xfe, 0xff, - }, - wireHeaderToTradBSDKernel: []byte{ - 0x46, 0x01, 0xf3, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - 0xff, 0xfe, 0xfe, 0xff, - }, - wireHeaderFromFreeBSD10Kernel: []byte{ - 0x46, 0x01, 0xf3, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - 0xff, 0xfe, 0xfe, 0xff, - }, - wireHeaderToFreeBSD10Kernel: []byte{ - 0x46, 0x01, 0xf3, 0xbe, - 0xca, 0xfe, 0xdc, 0x45, - 0xff, 0x01, 0xde, 0xad, - 172, 16, 254, 254, - 192, 168, 0, 1, - 0xff, 0xfe, 0xfe, 0xff, - }, - Header: &Header{ - Version: Version, - Len: HeaderLen + 4, - TOS: 1, - TotalLen: 0xbef3, - ID: 0xcafe, - Flags: DontFragment, - FragOff: 1500, - TTL: 255, - Protocol: 1, - Checksum: 0xdead, - Src: net.IPv4(172, 16, 254, 254), - Dst: net.IPv4(192, 168, 0, 1), - Options: []byte{0xff, 0xfe, 0xfe, 0xff}, - }, - }, -} - -func TestMarshalHeader(t *testing.T) { - if socket.NativeEndian != binary.LittleEndian { - t.Skip("no test for non-little endian machine yet") - } - - for _, tt := range headerLittleEndianTests { - b, err := tt.Header.Marshal() - if err != nil { - t.Fatal(err) - } - var wh []byte - switch runtime.GOOS { - case "darwin", "dragonfly", "netbsd": - wh = tt.wireHeaderToTradBSDKernel - case "freebsd": - switch { - case freebsdVersion < 1000000: - wh = tt.wireHeaderToTradBSDKernel - case 1000000 <= freebsdVersion && freebsdVersion < 1100000: - wh = tt.wireHeaderToFreeBSD10Kernel - default: - wh = tt.wireHeaderToKernel - } - default: - wh = tt.wireHeaderToKernel - } - if !bytes.Equal(b, wh) { - t.Fatalf("got %#v; want %#v", b, wh) - } - } -} - -func TestParseHeader(t *testing.T) { - if socket.NativeEndian != binary.LittleEndian { - t.Skip("no test for big endian machine yet") - } - - for _, tt := range headerLittleEndianTests { - var wh []byte - switch runtime.GOOS { - case "darwin", "dragonfly", "netbsd": - wh = tt.wireHeaderFromTradBSDKernel - case "freebsd": - switch { - case freebsdVersion < 1000000: - wh = tt.wireHeaderFromTradBSDKernel - case 1000000 <= freebsdVersion && freebsdVersion < 1100000: - wh = tt.wireHeaderFromFreeBSD10Kernel - default: - wh = tt.wireHeaderFromKernel - } - default: - wh = tt.wireHeaderFromKernel - } - h, err := ParseHeader(wh) - if err != nil { - t.Fatal(err) - } - if err := h.Parse(wh); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(h, tt.Header) { - t.Fatalf("got %#v; want %#v", h, tt.Header) - } - s := h.String() - if strings.Contains(s, ",") { - t.Fatalf("should be space-separated values: %s", s) - } - } -} diff --git a/deps/golang.org/x/net/ipv4/helper.go b/deps/golang.org/x/net/ipv4/helper.go deleted file mode 100644 index a5052e324..000000000 --- a/deps/golang.org/x/net/ipv4/helper.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "errors" - "net" -) - -var ( - errMissingAddress = errors.New("missing address") - errMissingHeader = errors.New("missing header") - errHeaderTooShort = errors.New("header too short") - errBufferTooShort = errors.New("buffer too short") - errInvalidConnType = errors.New("invalid conn type") - errOpNoSupport = errors.New("operation not supported") - errNoSuchInterface = errors.New("no such interface") - errNoSuchMulticastInterface = errors.New("no such multicast interface") - - // See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html. - freebsdVersion uint32 -) - -func boolint(b bool) int { - if b { - return 1 - } - return 0 -} - -func netAddrToIP4(a net.Addr) net.IP { - switch v := a.(type) { - case *net.UDPAddr: - if ip := v.IP.To4(); ip != nil { - return ip - } - case *net.IPAddr: - if ip := v.IP.To4(); ip != nil { - return ip - } - } - return nil -} - -func opAddr(a net.Addr) net.Addr { - switch a.(type) { - case *net.TCPAddr: - if a == nil { - return nil - } - case *net.UDPAddr: - if a == nil { - return nil - } - case *net.IPAddr: - if a == nil { - return nil - } - } - return a -} diff --git a/deps/golang.org/x/net/ipv4/iana.go b/deps/golang.org/x/net/ipv4/iana.go deleted file mode 100644 index 4375b4099..000000000 --- a/deps/golang.org/x/net/ipv4/iana.go +++ /dev/null @@ -1,38 +0,0 @@ -// go generate gen.go -// Code generated by the command above; DO NOT EDIT. - -package ipv4 - -// Internet Control Message Protocol (ICMP) Parameters, Updated: 2018-02-26 -const ( - ICMPTypeEchoReply ICMPType = 0 // Echo Reply - ICMPTypeDestinationUnreachable ICMPType = 3 // Destination Unreachable - ICMPTypeRedirect ICMPType = 5 // Redirect - ICMPTypeEcho ICMPType = 8 // Echo - ICMPTypeRouterAdvertisement ICMPType = 9 // Router Advertisement - ICMPTypeRouterSolicitation ICMPType = 10 // Router Solicitation - ICMPTypeTimeExceeded ICMPType = 11 // Time Exceeded - ICMPTypeParameterProblem ICMPType = 12 // Parameter Problem - ICMPTypeTimestamp ICMPType = 13 // Timestamp - ICMPTypeTimestampReply ICMPType = 14 // Timestamp Reply - ICMPTypePhoturis ICMPType = 40 // Photuris - ICMPTypeExtendedEchoRequest ICMPType = 42 // Extended Echo Request - ICMPTypeExtendedEchoReply ICMPType = 43 // Extended Echo Reply -) - -// Internet Control Message Protocol (ICMP) Parameters, Updated: 2018-02-26 -var icmpTypes = map[ICMPType]string{ - 0: "echo reply", - 3: "destination unreachable", - 5: "redirect", - 8: "echo", - 9: "router advertisement", - 10: "router solicitation", - 11: "time exceeded", - 12: "parameter problem", - 13: "timestamp", - 14: "timestamp reply", - 40: "photuris", - 42: "extended echo request", - 43: "extended echo reply", -} diff --git a/deps/golang.org/x/net/ipv4/icmp.go b/deps/golang.org/x/net/ipv4/icmp.go deleted file mode 100644 index 9902bb3d2..000000000 --- a/deps/golang.org/x/net/ipv4/icmp.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import "golang.org/x/net/internal/iana" - -// An ICMPType represents a type of ICMP message. -type ICMPType int - -func (typ ICMPType) String() string { - s, ok := icmpTypes[typ] - if !ok { - return "" - } - return s -} - -// Protocol returns the ICMPv4 protocol number. -func (typ ICMPType) Protocol() int { - return iana.ProtocolICMP -} - -// An ICMPFilter represents an ICMP message filter for incoming -// packets. The filter belongs to a packet delivery path on a host and -// it cannot interact with forwarding packets or tunnel-outer packets. -// -// Note: RFC 8200 defines a reasonable role model and it works not -// only for IPv6 but IPv4. A node means a device that implements IP. -// A router means a node that forwards IP packets not explicitly -// addressed to itself, and a host means a node that is not a router. -type ICMPFilter struct { - icmpFilter -} - -// Accept accepts incoming ICMP packets including the type field value -// typ. -func (f *ICMPFilter) Accept(typ ICMPType) { - f.accept(typ) -} - -// Block blocks incoming ICMP packets including the type field value -// typ. -func (f *ICMPFilter) Block(typ ICMPType) { - f.block(typ) -} - -// SetAll sets the filter action to the filter. -func (f *ICMPFilter) SetAll(block bool) { - f.setAll(block) -} - -// WillBlock reports whether the ICMP type will be blocked. -func (f *ICMPFilter) WillBlock(typ ICMPType) bool { - return f.willBlock(typ) -} diff --git a/deps/golang.org/x/net/ipv4/icmp_linux.go b/deps/golang.org/x/net/ipv4/icmp_linux.go deleted file mode 100644 index 6e1c5c80a..000000000 --- a/deps/golang.org/x/net/ipv4/icmp_linux.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -func (f *icmpFilter) accept(typ ICMPType) { - f.Data &^= 1 << (uint32(typ) & 31) -} - -func (f *icmpFilter) block(typ ICMPType) { - f.Data |= 1 << (uint32(typ) & 31) -} - -func (f *icmpFilter) setAll(block bool) { - if block { - f.Data = 1<<32 - 1 - } else { - f.Data = 0 - } -} - -func (f *icmpFilter) willBlock(typ ICMPType) bool { - return f.Data&(1<<(uint32(typ)&31)) != 0 -} diff --git a/deps/golang.org/x/net/ipv4/icmp_stub.go b/deps/golang.org/x/net/ipv4/icmp_stub.go deleted file mode 100644 index 21bb29ab3..000000000 --- a/deps/golang.org/x/net/ipv4/icmp_stub.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !linux - -package ipv4 - -const sizeofICMPFilter = 0x0 - -type icmpFilter struct { -} - -func (f *icmpFilter) accept(typ ICMPType) { -} - -func (f *icmpFilter) block(typ ICMPType) { -} - -func (f *icmpFilter) setAll(block bool) { -} - -func (f *icmpFilter) willBlock(typ ICMPType) bool { - return false -} diff --git a/deps/golang.org/x/net/ipv4/icmp_test.go b/deps/golang.org/x/net/ipv4/icmp_test.go deleted file mode 100644 index 3324b54df..000000000 --- a/deps/golang.org/x/net/ipv4/icmp_test.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "net" - "reflect" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -var icmpStringTests = []struct { - in ipv4.ICMPType - out string -}{ - {ipv4.ICMPTypeDestinationUnreachable, "destination unreachable"}, - - {256, ""}, -} - -func TestICMPString(t *testing.T) { - for _, tt := range icmpStringTests { - s := tt.in.String() - if s != tt.out { - t.Errorf("got %s; want %s", s, tt.out) - } - } -} - -func TestICMPFilter(t *testing.T) { - switch runtime.GOOS { - case "linux": - default: - t.Skipf("not supported on %s", runtime.GOOS) - } - - var f ipv4.ICMPFilter - for _, toggle := range []bool{false, true} { - f.SetAll(toggle) - for _, typ := range []ipv4.ICMPType{ - ipv4.ICMPTypeDestinationUnreachable, - ipv4.ICMPTypeEchoReply, - ipv4.ICMPTypeTimeExceeded, - ipv4.ICMPTypeParameterProblem, - } { - f.Accept(typ) - if f.WillBlock(typ) { - t.Errorf("ipv4.ICMPFilter.Set(%v, false) failed", typ) - } - f.Block(typ) - if !f.WillBlock(typ) { - t.Errorf("ipv4.ICMPFilter.Set(%v, true) failed", typ) - } - } - } -} - -func TestSetICMPFilter(t *testing.T) { - switch runtime.GOOS { - case "linux": - default: - t.Skipf("not supported on %s", runtime.GOOS) - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - c, err := net.ListenPacket("ip4:icmp", "127.0.0.1") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - p := ipv4.NewPacketConn(c) - - var f ipv4.ICMPFilter - f.SetAll(true) - f.Accept(ipv4.ICMPTypeEcho) - f.Accept(ipv4.ICMPTypeEchoReply) - if err := p.SetICMPFilter(&f); err != nil { - t.Fatal(err) - } - kf, err := p.ICMPFilter() - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(kf, &f) { - t.Fatalf("got %#v; want %#v", kf, f) - } -} diff --git a/deps/golang.org/x/net/ipv4/multicast_test.go b/deps/golang.org/x/net/ipv4/multicast_test.go deleted file mode 100644 index 2136a3c6e..000000000 --- a/deps/golang.org/x/net/ipv4/multicast_test.go +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "bytes" - "net" - "os" - "runtime" - "testing" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -var packetConnReadWriteMulticastUDPTests = []struct { - addr string - grp, src *net.UDPAddr -}{ - {"224.0.0.0:0", &net.UDPAddr{IP: net.IPv4(224, 0, 0, 254)}, nil}, // see RFC 4727 - - {"232.0.1.0:0", &net.UDPAddr{IP: net.IPv4(232, 0, 1, 254)}, &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771 -} - -func TestPacketConnReadWriteMulticastUDP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - for _, tt := range packetConnReadWriteMulticastUDPTests { - c, err := net.ListenPacket("udp4", tt.addr) - if err != nil { - t.Fatal(err) - } - defer c.Close() - - grp := *tt.grp - grp.Port = c.LocalAddr().(*net.UDPAddr).Port - p := ipv4.NewPacketConn(c) - defer p.Close() - if tt.src == nil { - if err := p.JoinGroup(ifi, &grp); err != nil { - t.Fatal(err) - } - defer p.LeaveGroup(ifi, &grp) - } else { - if err := p.JoinSourceSpecificGroup(ifi, &grp, tt.src); err != nil { - switch runtime.GOOS { - case "freebsd", "linux": - default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - defer p.LeaveSourceSpecificGroup(ifi, &grp, tt.src) - } - if err := p.SetMulticastInterface(ifi); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastInterface(); err != nil { - t.Fatal(err) - } - if err := p.SetMulticastLoopback(true); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastLoopback(); err != nil { - t.Fatal(err) - } - cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface - wb := []byte("HELLO-R-U-THERE") - - for i, toggle := range []bool{true, false, true} { - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil { - t.Fatal(err) - } - p.SetMulticastTTL(i + 1) - if n, err := p.WriteTo(wb, nil, &grp); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatalf("got %v; want %v", n, len(wb)) - } - rb := make([]byte, 128) - if n, _, _, err := p.ReadFrom(rb); err != nil { - t.Fatal(err) - } else if !bytes.Equal(rb[:n], wb) { - t.Fatalf("got %v; want %v", rb[:n], wb) - } - } - } -} - -var packetConnReadWriteMulticastICMPTests = []struct { - grp, src *net.IPAddr -}{ - {&net.IPAddr{IP: net.IPv4(224, 0, 0, 254)}, nil}, // see RFC 4727 - - {&net.IPAddr{IP: net.IPv4(232, 0, 1, 254)}, &net.IPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771 -} - -func TestPacketConnReadWriteMulticastICMP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - for _, tt := range packetConnReadWriteMulticastICMPTests { - c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - p := ipv4.NewPacketConn(c) - defer p.Close() - if tt.src == nil { - if err := p.JoinGroup(ifi, tt.grp); err != nil { - t.Fatal(err) - } - defer p.LeaveGroup(ifi, tt.grp) - } else { - if err := p.JoinSourceSpecificGroup(ifi, tt.grp, tt.src); err != nil { - switch runtime.GOOS { - case "freebsd", "linux": - default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - defer p.LeaveSourceSpecificGroup(ifi, tt.grp, tt.src) - } - if err := p.SetMulticastInterface(ifi); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastInterface(); err != nil { - t.Fatal(err) - } - if err := p.SetMulticastLoopback(true); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastLoopback(); err != nil { - t.Fatal(err) - } - cf := ipv4.FlagDst | ipv4.FlagInterface - if runtime.GOOS != "solaris" { - // Solaris never allows to modify ICMP properties. - cf |= ipv4.FlagTTL - } - - for i, toggle := range []bool{true, false, true} { - wb, err := (&icmp.Message{ - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: i + 1, - Data: []byte("HELLO-R-U-THERE"), - }, - }).Marshal(nil) - if err != nil { - t.Fatal(err) - } - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil { - t.Fatal(err) - } - p.SetMulticastTTL(i + 1) - if n, err := p.WriteTo(wb, nil, tt.grp); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatalf("got %v; want %v", n, len(wb)) - } - rb := make([]byte, 128) - if n, _, _, err := p.ReadFrom(rb); err != nil { - t.Fatal(err) - } else { - m, err := icmp.ParseMessage(iana.ProtocolICMP, rb[:n]) - if err != nil { - t.Fatal(err) - } - switch { - case m.Type == ipv4.ICMPTypeEchoReply && m.Code == 0: // net.inet.icmp.bmcastecho=1 - case m.Type == ipv4.ICMPTypeEcho && m.Code == 0: // net.inet.icmp.bmcastecho=0 - default: - t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0) - } - } - } - } -} - -var rawConnReadWriteMulticastICMPTests = []struct { - grp, src *net.IPAddr -}{ - {&net.IPAddr{IP: net.IPv4(224, 0, 0, 254)}, nil}, // see RFC 4727 - - {&net.IPAddr{IP: net.IPv4(232, 0, 1, 254)}, &net.IPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771 -} - -func TestRawConnReadWriteMulticastICMP(t *testing.T) { - if testing.Short() { - t.Skip("to avoid external network") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - for _, tt := range rawConnReadWriteMulticastICMPTests { - c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - r, err := ipv4.NewRawConn(c) - if err != nil { - t.Fatal(err) - } - defer r.Close() - if tt.src == nil { - if err := r.JoinGroup(ifi, tt.grp); err != nil { - t.Fatal(err) - } - defer r.LeaveGroup(ifi, tt.grp) - } else { - if err := r.JoinSourceSpecificGroup(ifi, tt.grp, tt.src); err != nil { - switch runtime.GOOS { - case "freebsd", "linux": - default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - defer r.LeaveSourceSpecificGroup(ifi, tt.grp, tt.src) - } - if err := r.SetMulticastInterface(ifi); err != nil { - t.Fatal(err) - } - if _, err := r.MulticastInterface(); err != nil { - t.Fatal(err) - } - if err := r.SetMulticastLoopback(true); err != nil { - t.Fatal(err) - } - if _, err := r.MulticastLoopback(); err != nil { - t.Fatal(err) - } - cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface - - for i, toggle := range []bool{true, false, true} { - wb, err := (&icmp.Message{ - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: i + 1, - Data: []byte("HELLO-R-U-THERE"), - }, - }).Marshal(nil) - if err != nil { - t.Fatal(err) - } - wh := &ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TOS: i + 1, - TotalLen: ipv4.HeaderLen + len(wb), - Protocol: 1, - Dst: tt.grp.IP, - } - if err := r.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - if err := r.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil { - t.Fatal(err) - } - r.SetMulticastTTL(i + 1) - if err := r.WriteTo(wh, wb, nil); err != nil { - t.Fatal(err) - } - rb := make([]byte, ipv4.HeaderLen+128) - if rh, b, _, err := r.ReadFrom(rb); err != nil { - t.Fatal(err) - } else { - m, err := icmp.ParseMessage(iana.ProtocolICMP, b) - if err != nil { - t.Fatal(err) - } - switch { - case (rh.Dst.IsLoopback() || rh.Dst.IsLinkLocalUnicast() || rh.Dst.IsGlobalUnicast()) && m.Type == ipv4.ICMPTypeEchoReply && m.Code == 0: // net.inet.icmp.bmcastecho=1 - case rh.Dst.IsMulticast() && m.Type == ipv4.ICMPTypeEcho && m.Code == 0: // net.inet.icmp.bmcastecho=0 - default: - t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0) - } - } - } - } -} diff --git a/deps/golang.org/x/net/ipv4/multicastlistener_test.go b/deps/golang.org/x/net/ipv4/multicastlistener_test.go deleted file mode 100644 index ba2480e48..000000000 --- a/deps/golang.org/x/net/ipv4/multicastlistener_test.go +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -var udpMultipleGroupListenerTests = []net.Addr{ - &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}, // see RFC 4727 - &net.UDPAddr{IP: net.IPv4(224, 0, 0, 250)}, - &net.UDPAddr{IP: net.IPv4(224, 0, 0, 254)}, -} - -func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if testing.Short() { - t.Skip("to avoid external network") - } - - for _, gaddr := range udpMultipleGroupListenerTests { - c, err := net.ListenPacket("udp4", "0.0.0.0:0") // wildcard address with no reusable port - if err != nil { - t.Fatal(err) - } - defer c.Close() - - p := ipv4.NewPacketConn(c) - var mift []*net.Interface - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - if _, ok := nettest.IsMulticastCapable("ip4", &ifi); !ok { - continue - } - if err := p.JoinGroup(&ifi, gaddr); err != nil { - t.Fatal(err) - } - mift = append(mift, &ift[i]) - } - for _, ifi := range mift { - if err := p.LeaveGroup(ifi, gaddr); err != nil { - t.Fatal(err) - } - } - } -} - -func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if testing.Short() { - t.Skip("to avoid external network") - } - - for _, gaddr := range udpMultipleGroupListenerTests { - c1, err := net.ListenPacket("udp4", "224.0.0.0:0") // wildcard address with reusable port - if err != nil { - t.Fatal(err) - } - defer c1.Close() - _, port, err := net.SplitHostPort(c1.LocalAddr().String()) - if err != nil { - t.Fatal(err) - } - c2, err := net.ListenPacket("udp4", net.JoinHostPort("224.0.0.0", port)) // wildcard address with reusable port - if err != nil { - t.Fatal(err) - } - defer c2.Close() - - var ps [2]*ipv4.PacketConn - ps[0] = ipv4.NewPacketConn(c1) - ps[1] = ipv4.NewPacketConn(c2) - var mift []*net.Interface - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - if _, ok := nettest.IsMulticastCapable("ip4", &ifi); !ok { - continue - } - for _, p := range ps { - if err := p.JoinGroup(&ifi, gaddr); err != nil { - t.Fatal(err) - } - } - mift = append(mift, &ift[i]) - } - for _, ifi := range mift { - for _, p := range ps { - if err := p.LeaveGroup(ifi, gaddr); err != nil { - t.Fatal(err) - } - } - } - } -} - -func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if testing.Short() { - t.Skip("to avoid external network") - } - - gaddr := net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727 - type ml struct { - c *ipv4.PacketConn - ifi *net.Interface - } - var mlt []*ml - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - port := "0" - for i, ifi := range ift { - ip, ok := nettest.IsMulticastCapable("ip4", &ifi) - if !ok { - continue - } - c, err := net.ListenPacket("udp4", net.JoinHostPort(ip.String(), port)) // unicast address with non-reusable port - if err != nil { - // The listen may fail when the serivce is - // already in use, but it's fine because the - // purpose of this is not to test the - // bookkeeping of IP control block inside the - // kernel. - t.Log(err) - continue - } - defer c.Close() - if port == "0" { - _, port, err = net.SplitHostPort(c.LocalAddr().String()) - if err != nil { - t.Fatal(err) - } - } - p := ipv4.NewPacketConn(c) - if err := p.JoinGroup(&ifi, &gaddr); err != nil { - t.Fatal(err) - } - mlt = append(mlt, &ml{p, &ift[i]}) - } - for _, m := range mlt { - if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil { - t.Fatal(err) - } - } -} - -func TestIPSingleRawConnWithSingleGroupListener(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if testing.Short() { - t.Skip("to avoid external network") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") // wildcard address - if err != nil { - t.Fatal(err) - } - defer c.Close() - - r, err := ipv4.NewRawConn(c) - if err != nil { - t.Fatal(err) - } - gaddr := net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727 - var mift []*net.Interface - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - if _, ok := nettest.IsMulticastCapable("ip4", &ifi); !ok { - continue - } - if err := r.JoinGroup(&ifi, &gaddr); err != nil { - t.Fatal(err) - } - mift = append(mift, &ift[i]) - } - for _, ifi := range mift { - if err := r.LeaveGroup(ifi, &gaddr); err != nil { - t.Fatal(err) - } - } -} - -func TestIPPerInterfaceSingleRawConnWithSingleGroupListener(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if testing.Short() { - t.Skip("to avoid external network") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - gaddr := net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727 - type ml struct { - c *ipv4.RawConn - ifi *net.Interface - } - var mlt []*ml - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - ip, ok := nettest.IsMulticastCapable("ip4", &ifi) - if !ok { - continue - } - c, err := net.ListenPacket("ip4:253", ip.String()) // unicast address - if err != nil { - t.Fatal(err) - } - defer c.Close() - r, err := ipv4.NewRawConn(c) - if err != nil { - t.Fatal(err) - } - if err := r.JoinGroup(&ifi, &gaddr); err != nil { - t.Fatal(err) - } - mlt = append(mlt, &ml{r, &ift[i]}) - } - for _, m := range mlt { - if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil { - t.Fatal(err) - } - } -} diff --git a/deps/golang.org/x/net/ipv4/multicastsockopt_test.go b/deps/golang.org/x/net/ipv4/multicastsockopt_test.go deleted file mode 100644 index c0a26800a..000000000 --- a/deps/golang.org/x/net/ipv4/multicastsockopt_test.go +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -var packetConnMulticastSocketOptionTests = []struct { - net, proto, addr string - grp, src net.Addr -}{ - {"udp4", "", "224.0.0.0:0", &net.UDPAddr{IP: net.IPv4(224, 0, 0, 249)}, nil}, // see RFC 4727 - {"ip4", ":icmp", "0.0.0.0", &net.IPAddr{IP: net.IPv4(224, 0, 0, 250)}, nil}, // see RFC 4727 - - {"udp4", "", "232.0.0.0:0", &net.UDPAddr{IP: net.IPv4(232, 0, 1, 249)}, &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771 - {"ip4", ":icmp", "0.0.0.0", &net.IPAddr{IP: net.IPv4(232, 0, 1, 250)}, &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771 -} - -func TestPacketConnMulticastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9": - t.Skipf("not supported on %s", runtime.GOOS) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - m, ok := nettest.SupportsRawIPSocket() - for _, tt := range packetConnMulticastSocketOptionTests { - if tt.net == "ip4" && !ok { - t.Log(m) - continue - } - c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - defer p.Close() - - if tt.src == nil { - testMulticastSocketOptions(t, p, ifi, tt.grp) - } else { - testSourceSpecificMulticastSocketOptions(t, p, ifi, tt.grp, tt.src) - } - } -} - -var rawConnMulticastSocketOptionTests = []struct { - grp, src net.Addr -}{ - {&net.IPAddr{IP: net.IPv4(224, 0, 0, 250)}, nil}, // see RFC 4727 - - {&net.IPAddr{IP: net.IPv4(232, 0, 1, 250)}, &net.IPAddr{IP: net.IPv4(127, 0, 0, 1)}}, // see RFC 5771 -} - -func TestRawConnMulticastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9": - t.Skipf("not supported on %s", runtime.GOOS) - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - for _, tt := range rawConnMulticastSocketOptionTests { - c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") - if err != nil { - t.Fatal(err) - } - defer c.Close() - r, err := ipv4.NewRawConn(c) - if err != nil { - t.Fatal(err) - } - defer r.Close() - - if tt.src == nil { - testMulticastSocketOptions(t, r, ifi, tt.grp) - } else { - testSourceSpecificMulticastSocketOptions(t, r, ifi, tt.grp, tt.src) - } - } -} - -type testIPv4MulticastConn interface { - MulticastTTL() (int, error) - SetMulticastTTL(ttl int) error - MulticastLoopback() (bool, error) - SetMulticastLoopback(bool) error - JoinGroup(*net.Interface, net.Addr) error - LeaveGroup(*net.Interface, net.Addr) error - JoinSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error - LeaveSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error - ExcludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error - IncludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error -} - -func testMulticastSocketOptions(t *testing.T, c testIPv4MulticastConn, ifi *net.Interface, grp net.Addr) { - const ttl = 255 - if err := c.SetMulticastTTL(ttl); err != nil { - t.Error(err) - return - } - if v, err := c.MulticastTTL(); err != nil { - t.Error(err) - return - } else if v != ttl { - t.Errorf("got %v; want %v", v, ttl) - return - } - - for _, toggle := range []bool{true, false} { - if err := c.SetMulticastLoopback(toggle); err != nil { - t.Error(err) - return - } - if v, err := c.MulticastLoopback(); err != nil { - t.Error(err) - return - } else if v != toggle { - t.Errorf("got %v; want %v", v, toggle) - return - } - } - - if err := c.JoinGroup(ifi, grp); err != nil { - t.Error(err) - return - } - if err := c.LeaveGroup(ifi, grp); err != nil { - t.Error(err) - return - } -} - -func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv4MulticastConn, ifi *net.Interface, grp, src net.Addr) { - // MCAST_JOIN_GROUP -> MCAST_BLOCK_SOURCE -> MCAST_UNBLOCK_SOURCE -> MCAST_LEAVE_GROUP - if err := c.JoinGroup(ifi, grp); err != nil { - t.Error(err) - return - } - if err := c.ExcludeSourceSpecificGroup(ifi, grp, src); err != nil { - switch runtime.GOOS { - case "freebsd", "linux": - default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %s", runtime.GOOS) - return - } - t.Error(err) - return - } - if err := c.IncludeSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - if err := c.LeaveGroup(ifi, grp); err != nil { - t.Error(err) - return - } - - // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_SOURCE_GROUP - if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - if err := c.LeaveSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - - // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_GROUP - if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - if err := c.LeaveGroup(ifi, grp); err != nil { - t.Error(err) - return - } -} diff --git a/deps/golang.org/x/net/ipv4/packet.go b/deps/golang.org/x/net/ipv4/packet.go deleted file mode 100644 index f00f5b052..000000000 --- a/deps/golang.org/x/net/ipv4/packet.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "syscall" - - "golang.org/x/net/internal/socket" -) - -// BUG(mikio): On Windows, the ReadFrom and WriteTo methods of RawConn -// are not implemented. - -// A packetHandler represents the IPv4 datagram handler. -type packetHandler struct { - *net.IPConn - *socket.Conn - rawOpt -} - -func (c *packetHandler) ok() bool { return c != nil && c.IPConn != nil && c.Conn != nil } - -// ReadFrom reads an IPv4 datagram from the endpoint c, copying the -// datagram into b. It returns the received datagram as the IPv4 -// header h, the payload p and the control message cm. -func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) { - if !c.ok() { - return nil, nil, nil, syscall.EINVAL - } - return c.readFrom(b) -} - -func slicePacket(b []byte) (h, p []byte, err error) { - if len(b) < HeaderLen { - return nil, nil, errHeaderTooShort - } - hdrlen := int(b[0]&0x0f) << 2 - return b[:hdrlen], b[hdrlen:], nil -} - -// WriteTo writes an IPv4 datagram through the endpoint c, copying the -// datagram from the IPv4 header h and the payload p. The control -// message cm allows the datagram path and the outgoing interface to be -// specified. Currently only Darwin and Linux support this. The cm -// may be nil if control of the outgoing datagram is not required. -// -// The IPv4 header h must contain appropriate fields that include: -// -// Version = -// Len = -// TOS = -// TotalLen = -// ID = platform sets an appropriate value if ID is zero -// FragOff = -// TTL = -// Protocol = -// Checksum = platform sets an appropriate value if Checksum is zero -// Src = platform sets an appropriate value if Src is nil -// Dst = -// Options = optional -func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error { - if !c.ok() { - return syscall.EINVAL - } - return c.writeTo(h, p, cm) -} diff --git a/deps/golang.org/x/net/ipv4/packet_go1_8.go b/deps/golang.org/x/net/ipv4/packet_go1_8.go deleted file mode 100644 index b47d18683..000000000 --- a/deps/golang.org/x/net/ipv4/packet_go1_8.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package ipv4 - -import "net" - -func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) { - c.rawOpt.RLock() - oob := NewControlMessage(c.rawOpt.cflags) - c.rawOpt.RUnlock() - n, nn, _, src, err := c.ReadMsgIP(b, oob) - if err != nil { - return nil, nil, nil, err - } - var hs []byte - if hs, p, err = slicePacket(b[:n]); err != nil { - return nil, nil, nil, err - } - if h, err = ParseHeader(hs); err != nil { - return nil, nil, nil, err - } - if nn > 0 { - cm = new(ControlMessage) - if err := cm.Parse(oob[:nn]); err != nil { - return nil, nil, nil, err - } - } - if src != nil && cm != nil { - cm.Src = src.IP - } - return -} - -func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error { - oob := cm.Marshal() - wh, err := h.Marshal() - if err != nil { - return err - } - dst := new(net.IPAddr) - if cm != nil { - if ip := cm.Dst.To4(); ip != nil { - dst.IP = ip - } - } - if dst.IP == nil { - dst.IP = h.Dst - } - wh = append(wh, p...) - _, _, err = c.WriteMsgIP(wh, oob, dst) - return err -} diff --git a/deps/golang.org/x/net/ipv4/packet_go1_9.go b/deps/golang.org/x/net/ipv4/packet_go1_9.go deleted file mode 100644 index 082c36d73..000000000 --- a/deps/golang.org/x/net/ipv4/packet_go1_9.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package ipv4 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) { - c.rawOpt.RLock() - m := socket.Message{ - Buffers: [][]byte{b}, - OOB: NewControlMessage(c.rawOpt.cflags), - } - c.rawOpt.RUnlock() - if err := c.RecvMsg(&m, 0); err != nil { - return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - var hs []byte - if hs, p, err = slicePacket(b[:m.N]); err != nil { - return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - if h, err = ParseHeader(hs); err != nil { - return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - if m.NN > 0 { - cm = new(ControlMessage) - if err := cm.Parse(m.OOB[:m.NN]); err != nil { - return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err} - } - } - if src, ok := m.Addr.(*net.IPAddr); ok && cm != nil { - cm.Src = src.IP - } - return -} - -func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error { - m := socket.Message{ - OOB: cm.Marshal(), - } - wh, err := h.Marshal() - if err != nil { - return err - } - m.Buffers = [][]byte{wh, p} - dst := new(net.IPAddr) - if cm != nil { - if ip := cm.Dst.To4(); ip != nil { - dst.IP = ip - } - } - if dst.IP == nil { - dst.IP = h.Dst - } - m.Addr = dst - if err := c.SendMsg(&m, 0); err != nil { - return &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Addr: opAddr(dst), Err: err} - } - return nil -} diff --git a/deps/golang.org/x/net/ipv4/payload.go b/deps/golang.org/x/net/ipv4/payload.go deleted file mode 100644 index f95f811ac..000000000 --- a/deps/golang.org/x/net/ipv4/payload.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo -// methods of PacketConn is not implemented. - -// A payloadHandler represents the IPv4 datagram payload handler. -type payloadHandler struct { - net.PacketConn - *socket.Conn - rawOpt -} - -func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil } diff --git a/deps/golang.org/x/net/ipv4/payload_cmsg.go b/deps/golang.org/x/net/ipv4/payload_cmsg.go deleted file mode 100644 index 3f06d7606..000000000 --- a/deps/golang.org/x/net/ipv4/payload_cmsg.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !nacl,!plan9,!windows - -package ipv4 - -import ( - "net" - "syscall" -) - -// ReadFrom reads a payload of the received IPv4 datagram, from the -// endpoint c, copying the payload into b. It returns the number of -// bytes copied into b, the control message cm and the source address -// src of the received datagram. -func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { - if !c.ok() { - return 0, nil, nil, syscall.EINVAL - } - return c.readFrom(b) -} - -// WriteTo writes a payload of the IPv4 datagram, to the destination -// address dst through the endpoint c, copying the payload from b. It -// returns the number of bytes written. The control message cm allows -// the datagram path and the outgoing interface to be specified. -// Currently only Darwin and Linux support this. The cm may be nil if -// control of the outgoing datagram is not required. -func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { - if !c.ok() { - return 0, syscall.EINVAL - } - return c.writeTo(b, cm, dst) -} diff --git a/deps/golang.org/x/net/ipv4/payload_cmsg_go1_8.go b/deps/golang.org/x/net/ipv4/payload_cmsg_go1_8.go deleted file mode 100644 index d26ccd90c..000000000 --- a/deps/golang.org/x/net/ipv4/payload_cmsg_go1_8.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 -// +build !nacl,!plan9,!windows - -package ipv4 - -import "net" - -func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { - c.rawOpt.RLock() - oob := NewControlMessage(c.rawOpt.cflags) - c.rawOpt.RUnlock() - var nn int - switch c := c.PacketConn.(type) { - case *net.UDPConn: - if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil { - return 0, nil, nil, err - } - case *net.IPConn: - nb := make([]byte, maxHeaderLen+len(b)) - if n, nn, _, src, err = c.ReadMsgIP(nb, oob); err != nil { - return 0, nil, nil, err - } - hdrlen := int(nb[0]&0x0f) << 2 - copy(b, nb[hdrlen:]) - n -= hdrlen - default: - return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType} - } - if nn > 0 { - cm = new(ControlMessage) - if err = cm.Parse(oob[:nn]); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - } - if cm != nil { - cm.Src = netAddrToIP4(src) - } - return -} - -func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { - oob := cm.Marshal() - if dst == nil { - return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress} - } - switch c := c.PacketConn.(type) { - case *net.UDPConn: - n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr)) - case *net.IPConn: - n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr)) - default: - return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType} - } - return -} diff --git a/deps/golang.org/x/net/ipv4/payload_cmsg_go1_9.go b/deps/golang.org/x/net/ipv4/payload_cmsg_go1_9.go deleted file mode 100644 index 2f1931183..000000000 --- a/deps/golang.org/x/net/ipv4/payload_cmsg_go1_9.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build !nacl,!plan9,!windows - -package ipv4 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) { - c.rawOpt.RLock() - m := socket.Message{ - OOB: NewControlMessage(c.rawOpt.cflags), - } - c.rawOpt.RUnlock() - switch c.PacketConn.(type) { - case *net.UDPConn: - m.Buffers = [][]byte{b} - if err := c.RecvMsg(&m, 0); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - case *net.IPConn: - h := make([]byte, HeaderLen) - m.Buffers = [][]byte{h, b} - if err := c.RecvMsg(&m, 0); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - hdrlen := int(h[0]&0x0f) << 2 - if hdrlen > len(h) { - d := hdrlen - len(h) - copy(b, b[d:]) - m.N -= d - } else { - m.N -= hdrlen - } - default: - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType} - } - var cm *ControlMessage - if m.NN > 0 { - cm = new(ControlMessage) - if err := cm.Parse(m.OOB[:m.NN]); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - cm.Src = netAddrToIP4(m.Addr) - } - return m.N, cm, m.Addr, nil -} - -func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) { - m := socket.Message{ - Buffers: [][]byte{b}, - OOB: cm.Marshal(), - Addr: dst, - } - err := c.SendMsg(&m, 0) - if err != nil { - err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err} - } - return m.N, err -} diff --git a/deps/golang.org/x/net/ipv4/payload_nocmsg.go b/deps/golang.org/x/net/ipv4/payload_nocmsg.go deleted file mode 100644 index 3926de70b..000000000 --- a/deps/golang.org/x/net/ipv4/payload_nocmsg.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build nacl plan9 windows - -package ipv4 - -import ( - "net" - "syscall" -) - -// ReadFrom reads a payload of the received IPv4 datagram, from the -// endpoint c, copying the payload into b. It returns the number of -// bytes copied into b, the control message cm and the source address -// src of the received datagram. -func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { - if !c.ok() { - return 0, nil, nil, syscall.EINVAL - } - if n, src, err = c.PacketConn.ReadFrom(b); err != nil { - return 0, nil, nil, err - } - return -} - -// WriteTo writes a payload of the IPv4 datagram, to the destination -// address dst through the endpoint c, copying the payload from b. It -// returns the number of bytes written. The control message cm allows -// the datagram path and the outgoing interface to be specified. -// Currently only Darwin and Linux support this. The cm may be nil if -// control of the outgoing datagram is not required. -func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { - if !c.ok() { - return 0, syscall.EINVAL - } - if dst == nil { - return 0, errMissingAddress - } - return c.PacketConn.WriteTo(b, dst) -} diff --git a/deps/golang.org/x/net/ipv4/readwrite_go1_8_test.go b/deps/golang.org/x/net/ipv4/readwrite_go1_8_test.go deleted file mode 100644 index 83bf927ed..000000000 --- a/deps/golang.org/x/net/ipv4/readwrite_go1_8_test.go +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package ipv4_test - -import ( - "bytes" - "fmt" - "net" - "runtime" - "strings" - "sync" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -func BenchmarkPacketConnReadWriteUnicast(b *testing.B) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - b.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph, err := (&ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TotalLen: ipv4.HeaderLen + len(payload), - TTL: 1, - Protocol: iana.ProtocolReserved, - Src: net.IPv4(192, 0, 2, 1), - Dst: net.IPv4(192, 0, 2, 254), - }).Marshal() - if err != nil { - b.Fatal(err) - } - greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - bb := make([]byte, 128) - cm := ipv4.ControlMessage{ - Src: net.IPv4(127, 0, 0, 1), - } - if ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); ifi != nil { - cm.IfIndex = ifi.Index - } - - b.Run("UDP", func(b *testing.B) { - c, err := nettest.NewLocalPacketListener("udp4") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv4.FlagTTL | ipv4.FlagInterface - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(payload, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(payload, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - }) - b.Run("IP", func(b *testing.B) { - switch runtime.GOOS { - case "netbsd": - b.Skip("need to configure gre on netbsd") - case "openbsd": - b.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv4.FlagTTL | ipv4.FlagInterface - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(datagram, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(datagram, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - }) -} - -func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph, err := (&ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TotalLen: ipv4.HeaderLen + len(payload), - TTL: 1, - Protocol: iana.ProtocolReserved, - Src: net.IPv4(192, 0, 2, 1), - Dst: net.IPv4(192, 0, 2, 254), - }).Marshal() - if err != nil { - t.Fatal(err) - } - greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - - t.Run("UDP", func(t *testing.T) { - c, err := nettest.NewLocalPacketListener("udp4") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr()) - }) - }) - t.Run("IP", func(t *testing.T) { - switch runtime.GOOS { - case "netbsd": - t.Skip("need to configure gre on netbsd") - case "openbsd": - t.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr()) - }) - }) -} - -func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv4.PacketConn, data []byte, dst net.Addr) { - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface - - if err := p.SetControlMessage(cf, true); err != nil { // probe before test - if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %s", runtime.GOOS) - } - t.Fatal(err) - } - - var wg sync.WaitGroup - reader := func() { - defer wg.Done() - b := make([]byte, 128) - n, cm, _, err := p.ReadFrom(b) - if err != nil { - t.Error(err) - return - } - if !bytes.Equal(b[:n], data) { - t.Errorf("got %#v; want %#v", b[:n], data) - return - } - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - return - } - } - writer := func(toggle bool) { - defer wg.Done() - cm := ipv4.ControlMessage{ - Src: net.IPv4(127, 0, 0, 1), - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - n, err := p.WriteTo(data, &cm, dst) - if err != nil { - t.Error(err) - return - } - if n != len(data) { - t.Errorf("got %d; want %d", n, len(data)) - return - } - } - - const N = 10 - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Add(2 * N) - for i := 0; i < 2*N; i++ { - go writer(i%2 != 0) - - } - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/ipv4/readwrite_go1_9_test.go b/deps/golang.org/x/net/ipv4/readwrite_go1_9_test.go deleted file mode 100644 index ef76c8a72..000000000 --- a/deps/golang.org/x/net/ipv4/readwrite_go1_9_test.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package ipv4_test - -import ( - "bytes" - "fmt" - "net" - "runtime" - "strings" - "sync" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -func BenchmarkPacketConnReadWriteUnicast(b *testing.B) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - b.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph, err := (&ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TotalLen: ipv4.HeaderLen + len(payload), - TTL: 1, - Protocol: iana.ProtocolReserved, - Src: net.IPv4(192, 0, 2, 1), - Dst: net.IPv4(192, 0, 2, 254), - }).Marshal() - if err != nil { - b.Fatal(err) - } - greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - bb := make([]byte, 128) - cm := ipv4.ControlMessage{ - Src: net.IPv4(127, 0, 0, 1), - } - if ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); ifi != nil { - cm.IfIndex = ifi.Index - } - - b.Run("UDP", func(b *testing.B) { - c, err := nettest.NewLocalPacketListener("udp4") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv4.FlagTTL | ipv4.FlagInterface - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - wms := []ipv4.Message{ - { - Buffers: [][]byte{payload}, - Addr: dst, - OOB: cm.Marshal(), - }, - } - rms := []ipv4.Message{ - { - Buffers: [][]byte{bb}, - OOB: ipv4.NewControlMessage(cf), - }, - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(payload, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(payload, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("Batch", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteBatch(wms, 0); err != nil { - b.Fatal(err) - } - if _, err := p.ReadBatch(rms, 0); err != nil { - b.Fatal(err) - } - } - }) - }) - b.Run("IP", func(b *testing.B) { - switch runtime.GOOS { - case "netbsd": - b.Skip("need to configure gre on netbsd") - case "openbsd": - b.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv4.FlagTTL | ipv4.FlagInterface - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - wms := []ipv4.Message{ - { - Buffers: [][]byte{datagram}, - Addr: dst, - OOB: cm.Marshal(), - }, - } - rms := []ipv4.Message{ - { - Buffers: [][]byte{bb}, - OOB: ipv4.NewControlMessage(cf), - }, - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(datagram, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(datagram, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("Batch", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteBatch(wms, 0); err != nil { - b.Fatal(err) - } - if _, err := p.ReadBatch(rms, 0); err != nil { - b.Fatal(err) - } - } - }) - }) -} - -func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph, err := (&ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TotalLen: ipv4.HeaderLen + len(payload), - TTL: 1, - Protocol: iana.ProtocolReserved, - Src: net.IPv4(192, 0, 2, 1), - Dst: net.IPv4(192, 0, 2, 254), - }).Marshal() - if err != nil { - t.Fatal(err) - } - greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - - t.Run("UDP", func(t *testing.T) { - c, err := nettest.NewLocalPacketListener("udp4") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), false) - }) - t.Run("Batch", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), true) - }) - }) - t.Run("IP", func(t *testing.T) { - switch runtime.GOOS { - case "netbsd": - t.Skip("need to configure gre on netbsd") - case "openbsd": - t.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), false) - }) - t.Run("Batch", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), true) - }) - }) -} - -func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv4.PacketConn, data []byte, dst net.Addr, batch bool) { - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface - - if err := p.SetControlMessage(cf, true); err != nil { // probe before test - if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %s", runtime.GOOS) - } - t.Fatal(err) - } - - var wg sync.WaitGroup - reader := func() { - defer wg.Done() - b := make([]byte, 128) - n, cm, _, err := p.ReadFrom(b) - if err != nil { - t.Error(err) - return - } - if !bytes.Equal(b[:n], data) { - t.Errorf("got %#v; want %#v", b[:n], data) - return - } - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - return - } - } - batchReader := func() { - defer wg.Done() - ms := []ipv4.Message{ - { - Buffers: [][]byte{make([]byte, 128)}, - OOB: ipv4.NewControlMessage(cf), - }, - } - n, err := p.ReadBatch(ms, 0) - if err != nil { - t.Error(err) - return - } - if n != len(ms) { - t.Errorf("got %d; want %d", n, len(ms)) - return - } - var cm ipv4.ControlMessage - if err := cm.Parse(ms[0].OOB[:ms[0].NN]); err != nil { - t.Error(err) - return - } - var b []byte - if _, ok := dst.(*net.IPAddr); ok { - var h ipv4.Header - if err := h.Parse(ms[0].Buffers[0][:ms[0].N]); err != nil { - t.Error(err) - return - } - b = ms[0].Buffers[0][h.Len:ms[0].N] - } else { - b = ms[0].Buffers[0][:ms[0].N] - } - if !bytes.Equal(b, data) { - t.Errorf("got %#v; want %#v", b, data) - return - } - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - return - } - } - writer := func(toggle bool) { - defer wg.Done() - cm := ipv4.ControlMessage{ - Src: net.IPv4(127, 0, 0, 1), - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - n, err := p.WriteTo(data, &cm, dst) - if err != nil { - t.Error(err) - return - } - if n != len(data) { - t.Errorf("got %d; want %d", n, len(data)) - return - } - } - batchWriter := func(toggle bool) { - defer wg.Done() - cm := ipv4.ControlMessage{ - Src: net.IPv4(127, 0, 0, 1), - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - ms := []ipv4.Message{ - { - Buffers: [][]byte{data}, - OOB: cm.Marshal(), - Addr: dst, - }, - } - n, err := p.WriteBatch(ms, 0) - if err != nil { - t.Error(err) - return - } - if n != len(ms) { - t.Errorf("got %d; want %d", n, len(ms)) - return - } - if ms[0].N != len(data) { - t.Errorf("got %d; want %d", ms[0].N, len(data)) - return - } - } - - const N = 10 - wg.Add(N) - for i := 0; i < N; i++ { - if batch { - go batchReader() - } else { - go reader() - } - } - wg.Add(2 * N) - for i := 0; i < 2*N; i++ { - if batch { - go batchWriter(i%2 != 0) - } else { - go writer(i%2 != 0) - } - - } - wg.Add(N) - for i := 0; i < N; i++ { - if batch { - go batchReader() - } else { - go reader() - } - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/ipv4/readwrite_test.go b/deps/golang.org/x/net/ipv4/readwrite_test.go deleted file mode 100644 index 1b7f74884..000000000 --- a/deps/golang.org/x/net/ipv4/readwrite_test.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "bytes" - "net" - "runtime" - "strings" - "sync" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -func BenchmarkReadWriteUnicast(b *testing.B) { - c, err := nettest.NewLocalPacketListener("udp4") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - - dst := c.LocalAddr() - wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128) - - b.Run("NetUDP", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(wb, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(rb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("IPv4UDP", func(b *testing.B) { - p := ipv4.NewPacketConn(c) - cf := ipv4.FlagTTL | ipv4.FlagInterface - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - cm := ipv4.ControlMessage{TTL: 1} - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - if ifi != nil { - cm.IfIndex = ifi.Index - } - - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(wb, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(rb); err != nil { - b.Fatal(err) - } - } - }) -} - -func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - - c, err := nettest.NewLocalPacketListener("udp4") - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - defer p.Close() - - dst := c.LocalAddr() - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface - wb := []byte("HELLO-R-U-THERE") - - if err := p.SetControlMessage(cf, true); err != nil { // probe before test - if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %s", runtime.GOOS) - } - t.Fatal(err) - } - - var wg sync.WaitGroup - reader := func() { - defer wg.Done() - rb := make([]byte, 128) - if n, cm, _, err := p.ReadFrom(rb); err != nil { - t.Error(err) - return - } else if !bytes.Equal(rb[:n], wb) { - t.Errorf("got %v; want %v", rb[:n], wb) - return - } else { - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - } - } - } - writer := func(toggle bool) { - defer wg.Done() - cm := ipv4.ControlMessage{ - Src: net.IPv4(127, 0, 0, 1), - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - if n, err := p.WriteTo(wb, &cm, dst); err != nil { - t.Error(err) - return - } else if n != len(wb) { - t.Errorf("got %d; want %d", n, len(wb)) - return - } - } - - const N = 10 - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Add(2 * N) - for i := 0; i < 2*N; i++ { - go writer(i%2 != 0) - } - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/ipv4/sockopt.go b/deps/golang.org/x/net/ipv4/sockopt.go deleted file mode 100644 index 22e90c039..000000000 --- a/deps/golang.org/x/net/ipv4/sockopt.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import "golang.org/x/net/internal/socket" - -// Sticky socket options -const ( - ssoTOS = iota // header field for unicast packet - ssoTTL // header field for unicast packet - ssoMulticastTTL // header field for multicast packet - ssoMulticastInterface // outbound interface for multicast packet - ssoMulticastLoopback // loopback for multicast packet - ssoReceiveTTL // header field on received packet - ssoReceiveDst // header field on received packet - ssoReceiveInterface // inbound interface on received packet - ssoPacketInfo // incbound or outbound packet path - ssoHeaderPrepend // ipv4 header prepend - ssoStripHeader // strip ipv4 header - ssoICMPFilter // icmp filter - ssoJoinGroup // any-source multicast - ssoLeaveGroup // any-source multicast - ssoJoinSourceGroup // source-specific multicast - ssoLeaveSourceGroup // source-specific multicast - ssoBlockSourceGroup // any-source or source-specific multicast - ssoUnblockSourceGroup // any-source or source-specific multicast - ssoAttachFilter // attach BPF for filtering inbound traffic -) - -// Sticky socket option value types -const ( - ssoTypeIPMreq = iota + 1 - ssoTypeIPMreqn - ssoTypeGroupReq - ssoTypeGroupSourceReq -) - -// A sockOpt represents a binding for sticky socket option. -type sockOpt struct { - socket.Option - typ int // hint for option value type; optional -} diff --git a/deps/golang.org/x/net/ipv4/sockopt_posix.go b/deps/golang.org/x/net/ipv4/sockopt_posix.go deleted file mode 100644 index e96955bc1..000000000 --- a/deps/golang.org/x/net/ipv4/sockopt_posix.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package ipv4 - -import ( - "net" - "unsafe" - - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { - switch so.typ { - case ssoTypeIPMreqn: - return so.getIPMreqn(c) - default: - return so.getMulticastIf(c) - } -} - -func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { - switch so.typ { - case ssoTypeIPMreqn: - return so.setIPMreqn(c, ifi, nil) - default: - return so.setMulticastIf(c, ifi) - } -} - -func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { - b := make([]byte, so.Len) - n, err := so.Get(c, b) - if err != nil { - return nil, err - } - if n != sizeofICMPFilter { - return nil, errOpNoSupport - } - return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil -} - -func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { - b := (*[sizeofICMPFilter]byte)(unsafe.Pointer(f))[:sizeofICMPFilter] - return so.Set(c, b) -} - -func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - switch so.typ { - case ssoTypeIPMreq: - return so.setIPMreq(c, ifi, grp) - case ssoTypeIPMreqn: - return so.setIPMreqn(c, ifi, grp) - case ssoTypeGroupReq: - return so.setGroupReq(c, ifi, grp) - default: - return errOpNoSupport - } -} - -func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - return so.setGroupSourceReq(c, ifi, grp, src) -} - -func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { - return so.setAttachFilter(c, f) -} diff --git a/deps/golang.org/x/net/ipv4/sockopt_stub.go b/deps/golang.org/x/net/ipv4/sockopt_stub.go deleted file mode 100644 index 23249b782..000000000 --- a/deps/golang.org/x/net/ipv4/sockopt_stub.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv4 - -import ( - "net" - - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { - return nil, errOpNoSupport -} - -func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { - return errOpNoSupport -} - -func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { - return nil, errOpNoSupport -} - -func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { - return errOpNoSupport -} - -func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - return errOpNoSupport -} - -func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - return errOpNoSupport -} - -func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv4/sys_asmreq.go b/deps/golang.org/x/net/ipv4/sys_asmreq.go deleted file mode 100644 index 0388cba00..000000000 --- a/deps/golang.org/x/net/ipv4/sys_asmreq.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd solaris windows - -package ipv4 - -import ( - "net" - "unsafe" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}} - if err := setIPMreqInterface(&mreq, ifi); err != nil { - return err - } - b := (*[sizeofIPMreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPMreq] - return so.Set(c, b) -} - -func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) { - var b [4]byte - if _, err := so.Get(c, b[:]); err != nil { - return nil, err - } - ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3])) - if err != nil { - return nil, err - } - return ifi, nil -} - -func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error { - ip, err := netInterfaceToIP4(ifi) - if err != nil { - return err - } - var b [4]byte - copy(b[:], ip) - return so.Set(c, b[:]) -} - -func setIPMreqInterface(mreq *ipMreq, ifi *net.Interface) error { - if ifi == nil { - return nil - } - ifat, err := ifi.Addrs() - if err != nil { - return err - } - for _, ifa := range ifat { - switch ifa := ifa.(type) { - case *net.IPAddr: - if ip := ifa.IP.To4(); ip != nil { - copy(mreq.Interface[:], ip) - return nil - } - case *net.IPNet: - if ip := ifa.IP.To4(); ip != nil { - copy(mreq.Interface[:], ip) - return nil - } - } - } - return errNoSuchInterface -} - -func netIP4ToInterface(ip net.IP) (*net.Interface, error) { - ift, err := net.Interfaces() - if err != nil { - return nil, err - } - for _, ifi := range ift { - ifat, err := ifi.Addrs() - if err != nil { - return nil, err - } - for _, ifa := range ifat { - switch ifa := ifa.(type) { - case *net.IPAddr: - if ip.Equal(ifa.IP) { - return &ifi, nil - } - case *net.IPNet: - if ip.Equal(ifa.IP) { - return &ifi, nil - } - } - } - } - return nil, errNoSuchInterface -} - -func netInterfaceToIP4(ifi *net.Interface) (net.IP, error) { - if ifi == nil { - return net.IPv4zero.To4(), nil - } - ifat, err := ifi.Addrs() - if err != nil { - return nil, err - } - for _, ifa := range ifat { - switch ifa := ifa.(type) { - case *net.IPAddr: - if ip := ifa.IP.To4(); ip != nil { - return ip, nil - } - case *net.IPNet: - if ip := ifa.IP.To4(); ip != nil { - return ip, nil - } - } - } - return nil, errNoSuchInterface -} diff --git a/deps/golang.org/x/net/ipv4/sys_asmreq_stub.go b/deps/golang.org/x/net/ipv4/sys_asmreq_stub.go deleted file mode 100644 index f3919208b..000000000 --- a/deps/golang.org/x/net/ipv4/sys_asmreq_stub.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows - -package ipv4 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - return errOpNoSupport -} - -func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) { - return nil, errOpNoSupport -} - -func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv4/sys_asmreqn.go b/deps/golang.org/x/net/ipv4/sys_asmreqn.go deleted file mode 100644 index 1f24f69f3..000000000 --- a/deps/golang.org/x/net/ipv4/sys_asmreqn.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin freebsd linux - -package ipv4 - -import ( - "net" - "unsafe" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) { - b := make([]byte, so.Len) - if _, err := so.Get(c, b); err != nil { - return nil, err - } - mreqn := (*ipMreqn)(unsafe.Pointer(&b[0])) - if mreqn.Ifindex == 0 { - return nil, nil - } - ifi, err := net.InterfaceByIndex(int(mreqn.Ifindex)) - if err != nil { - return nil, err - } - return ifi, nil -} - -func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - var mreqn ipMreqn - if ifi != nil { - mreqn.Ifindex = int32(ifi.Index) - } - if grp != nil { - mreqn.Multiaddr = [4]byte{grp[0], grp[1], grp[2], grp[3]} - } - b := (*[sizeofIPMreqn]byte)(unsafe.Pointer(&mreqn))[:sizeofIPMreqn] - return so.Set(c, b) -} diff --git a/deps/golang.org/x/net/ipv4/sys_asmreqn_stub.go b/deps/golang.org/x/net/ipv4/sys_asmreqn_stub.go deleted file mode 100644 index 0711d3d78..000000000 --- a/deps/golang.org/x/net/ipv4/sys_asmreqn_stub.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!freebsd,!linux - -package ipv4 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) { - return nil, errOpNoSupport -} - -func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv4/sys_bpf.go b/deps/golang.org/x/net/ipv4/sys_bpf.go deleted file mode 100644 index 9f30b7308..000000000 --- a/deps/golang.org/x/net/ipv4/sys_bpf.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux - -package ipv4 - -import ( - "unsafe" - - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { - prog := sockFProg{ - Len: uint16(len(f)), - Filter: (*sockFilter)(unsafe.Pointer(&f[0])), - } - b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog] - return so.Set(c, b) -} diff --git a/deps/golang.org/x/net/ipv4/sys_bpf_stub.go b/deps/golang.org/x/net/ipv4/sys_bpf_stub.go deleted file mode 100644 index 9a2132093..000000000 --- a/deps/golang.org/x/net/ipv4/sys_bpf_stub.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !linux - -package ipv4 - -import ( - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv4/sys_bsd.go b/deps/golang.org/x/net/ipv4/sys_bsd.go deleted file mode 100644 index 58256dd9d..000000000 --- a/deps/golang.org/x/net/ipv4/sys_bsd.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build netbsd openbsd - -package ipv4 - -import ( - "net" - "syscall" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, - ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, - ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, - } - - sockOpts = map[int]*sockOpt{ - ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, - ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, - ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}}, - ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, - ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, - ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, - ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - } -) diff --git a/deps/golang.org/x/net/ipv4/sys_darwin.go b/deps/golang.org/x/net/ipv4/sys_darwin.go deleted file mode 100644 index e8fb19169..000000000 --- a/deps/golang.org/x/net/ipv4/sys_darwin.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "strconv" - "strings" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, - ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, - ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, - } - - sockOpts = map[int]*sockOpt{ - ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, - ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, - ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, - ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, - ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, - ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, - ssoStripHeader: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_STRIPHDR, Len: 4}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - } -) - -func init() { - // Seems like kern.osreldate is veiled on latest OS X. We use - // kern.osrelease instead. - s, err := syscall.Sysctl("kern.osrelease") - if err != nil { - return - } - ss := strings.Split(s, ".") - if len(ss) == 0 { - return - } - // The IP_PKTINFO and protocol-independent multicast API were - // introduced in OS X 10.7 (Darwin 11). But it looks like - // those features require OS X 10.8 (Darwin 12) or above. - // See http://support.apple.com/kb/HT1633. - if mjver, err := strconv.Atoi(ss[0]); err != nil || mjver < 12 { - return - } - ctlOpts[ctlPacketInfo].name = sysIP_PKTINFO - ctlOpts[ctlPacketInfo].length = sizeofInetPktinfo - ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo - ctlOpts[ctlPacketInfo].parse = parsePacketInfo - sockOpts[ssoPacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}} - sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn} - sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} - sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} - sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} - sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} - sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} - sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} -} - -func (pi *inetPktinfo) setIfindex(i int) { - pi.Ifindex = uint32(i) -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) - sa.Len = sizeofSockaddrInet - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) - sa.Len = sizeofSockaddrInet - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) - sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132)) - sa.Len = sizeofSockaddrInet - sa.Family = syscall.AF_INET - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv4/sys_dragonfly.go b/deps/golang.org/x/net/ipv4/sys_dragonfly.go deleted file mode 100644 index 859764f33..000000000 --- a/deps/golang.org/x/net/ipv4/sys_dragonfly.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "syscall" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, - ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, - ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, - } - - sockOpts = map[int]*sockOpt{ - ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, - ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, - ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, - ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, - ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, - ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - } -) diff --git a/deps/golang.org/x/net/ipv4/sys_freebsd.go b/deps/golang.org/x/net/ipv4/sys_freebsd.go deleted file mode 100644 index b80032454..000000000 --- a/deps/golang.org/x/net/ipv4/sys_freebsd.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "runtime" - "strings" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL}, - ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst}, - ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface}, - } - - sockOpts = map[int]*sockOpt{ - ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, - ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, - ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, - ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}}, - ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}}, - ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - } -) - -func init() { - freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate") - if freebsdVersion >= 1000000 { - sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn} - } - if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" { - archs, _ := syscall.Sysctl("kern.supported_archs") - for _, s := range strings.Fields(archs) { - if s == "amd64" { - freebsd32o64 = true - break - } - } - } -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group)) - sa.Len = sizeofSockaddrInet - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group)) - sa.Len = sizeofSockaddrInet - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) - sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source)) - sa.Len = sizeofSockaddrInet - sa.Family = syscall.AF_INET - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv4/sys_linux.go b/deps/golang.org/x/net/ipv4/sys_linux.go deleted file mode 100644 index 60defe132..000000000 --- a/deps/golang.org/x/net/ipv4/sys_linux.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTTL: {sysIP_TTL, 1, marshalTTL, parseTTL}, - ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo}, - } - - sockOpts = map[int]*sockOpt{ - ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, - ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, - ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, - ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_PKTINFO, Len: 4}}, - ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, - ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysICMP_FILTER, Len: sizeofICMPFilter}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}}, - } -) - -func (pi *inetPktinfo) setIfindex(i int) { - pi.Ifindex = int32(i) -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(&gr.Group)) - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(&gsr.Group)) - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) - sa = (*sockaddrInet)(unsafe.Pointer(&gsr.Source)) - sa.Family = syscall.AF_INET - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv4/sys_solaris.go b/deps/golang.org/x/net/ipv4/sys_solaris.go deleted file mode 100644 index 832fef1e2..000000000 --- a/deps/golang.org/x/net/ipv4/sys_solaris.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "net" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTTL: {sysIP_RECVTTL, 4, marshalTTL, parseTTL}, - ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo}, - } - - sockOpts = map[int]sockOpt{ - ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, - ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, - ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}}, - ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}}, - ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}}, - ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - } -) - -func (pi *inetPktinfo) setIfindex(i int) { - pi.Ifindex = uint32(i) -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) - sa.Family = syscall.AF_INET - copy(sa.Addr[:], grp) - sa = (*sockaddrInet)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260)) - sa.Family = syscall.AF_INET - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv4/sys_ssmreq.go b/deps/golang.org/x/net/ipv4/sys_ssmreq.go deleted file mode 100644 index ae5704e77..000000000 --- a/deps/golang.org/x/net/ipv4/sys_ssmreq.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin freebsd linux solaris - -package ipv4 - -import ( - "net" - "unsafe" - - "golang.org/x/net/internal/socket" -) - -var freebsd32o64 bool - -func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - var gr groupReq - if ifi != nil { - gr.Interface = uint32(ifi.Index) - } - gr.setGroup(grp) - var b []byte - if freebsd32o64 { - var d [sizeofGroupReq + 4]byte - s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr)) - copy(d[:4], s[:4]) - copy(d[8:], s[4:]) - b = d[:] - } else { - b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq] - } - return so.Set(c, b) -} - -func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - var gsr groupSourceReq - if ifi != nil { - gsr.Interface = uint32(ifi.Index) - } - gsr.setSourceGroup(grp, src) - var b []byte - if freebsd32o64 { - var d [sizeofGroupSourceReq + 4]byte - s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr)) - copy(d[:4], s[:4]) - copy(d[8:], s[4:]) - b = d[:] - } else { - b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq] - } - return so.Set(c, b) -} diff --git a/deps/golang.org/x/net/ipv4/sys_ssmreq_stub.go b/deps/golang.org/x/net/ipv4/sys_ssmreq_stub.go deleted file mode 100644 index e6b7623d0..000000000 --- a/deps/golang.org/x/net/ipv4/sys_ssmreq_stub.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!freebsd,!linux,!solaris - -package ipv4 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - return errOpNoSupport -} - -func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv4/sys_stub.go b/deps/golang.org/x/net/ipv4/sys_stub.go deleted file mode 100644 index 4f076473b..000000000 --- a/deps/golang.org/x/net/ipv4/sys_stub.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv4 - -var ( - ctlOpts = [ctlMax]ctlOpt{} - - sockOpts = map[int]*sockOpt{} -) diff --git a/deps/golang.org/x/net/ipv4/sys_windows.go b/deps/golang.org/x/net/ipv4/sys_windows.go deleted file mode 100644 index b0913d539..000000000 --- a/deps/golang.org/x/net/ipv4/sys_windows.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4 - -import ( - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -const ( - // See ws2tcpip.h. - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - sysIP_DONTFRAGMENT = 0xe - sysIP_ADD_SOURCE_MEMBERSHIP = 0xf - sysIP_DROP_SOURCE_MEMBERSHIP = 0x10 - sysIP_PKTINFO = 0x13 - - sizeofInetPktinfo = 0x8 - sizeofIPMreq = 0x8 - sizeofIPMreqSource = 0xc -) - -type inetPktinfo struct { - Addr [4]byte - Ifindex int32 -} - -type ipMreq struct { - Multiaddr [4]byte - Interface [4]byte -} - -type ipMreqSource struct { - Multiaddr [4]byte - Sourceaddr [4]byte - Interface [4]byte -} - -// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx -var ( - ctlOpts = [ctlMax]ctlOpt{} - - sockOpts = map[int]*sockOpt{ - ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}}, - ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}}, - ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}}, - ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq}, - } -) - -func (pi *inetPktinfo) setIfindex(i int) { - pi.Ifindex = int32(i) -} diff --git a/deps/golang.org/x/net/ipv4/unicast_test.go b/deps/golang.org/x/net/ipv4/unicast_test.go deleted file mode 100644 index 274a558c7..000000000 --- a/deps/golang.org/x/net/ipv4/unicast_test.go +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "bytes" - "net" - "os" - "runtime" - "testing" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -func TestPacketConnReadWriteUnicastUDP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - c, err := nettest.NewLocalPacketListener("udp4") - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv4.NewPacketConn(c) - defer p.Close() - - dst := c.LocalAddr() - cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface - wb := []byte("HELLO-R-U-THERE") - - for i, toggle := range []bool{true, false, true} { - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - p.SetTTL(i + 1) - if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, err := p.WriteTo(wb, nil, dst); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatalf("got %v; want %v", n, len(wb)) - } - rb := make([]byte, 128) - if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, _, _, err := p.ReadFrom(rb); err != nil { - t.Fatal(err) - } else if !bytes.Equal(rb[:n], wb) { - t.Fatalf("got %v; want %v", rb[:n], wb) - } - } -} - -func TestPacketConnReadWriteUnicastICMP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - dst, err := net.ResolveIPAddr("ip4", "127.0.0.1") - if err != nil { - t.Fatal(err) - } - p := ipv4.NewPacketConn(c) - defer p.Close() - cf := ipv4.FlagDst | ipv4.FlagInterface - if runtime.GOOS != "solaris" { - // Solaris never allows to modify ICMP properties. - cf |= ipv4.FlagTTL - } - - for i, toggle := range []bool{true, false, true} { - wb, err := (&icmp.Message{ - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: i + 1, - Data: []byte("HELLO-R-U-THERE"), - }, - }).Marshal(nil) - if err != nil { - t.Fatal(err) - } - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - p.SetTTL(i + 1) - if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, err := p.WriteTo(wb, nil, dst); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatalf("got %v; want %v", n, len(wb)) - } - rb := make([]byte, 128) - loop: - if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, _, _, err := p.ReadFrom(rb); err != nil { - switch runtime.GOOS { - case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } else { - m, err := icmp.ParseMessage(iana.ProtocolICMP, rb[:n]) - if err != nil { - t.Fatal(err) - } - if runtime.GOOS == "linux" && m.Type == ipv4.ICMPTypeEcho { - // On Linux we must handle own sent packets. - goto loop - } - if m.Type != ipv4.ICMPTypeEchoReply || m.Code != 0 { - t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0) - } - } - } -} - -func TestRawConnReadWriteUnicastICMP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - dst, err := net.ResolveIPAddr("ip4", "127.0.0.1") - if err != nil { - t.Fatal(err) - } - r, err := ipv4.NewRawConn(c) - if err != nil { - t.Fatal(err) - } - defer r.Close() - cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface - - for i, toggle := range []bool{true, false, true} { - wb, err := (&icmp.Message{ - Type: ipv4.ICMPTypeEcho, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: i + 1, - Data: []byte("HELLO-R-U-THERE"), - }, - }).Marshal(nil) - if err != nil { - t.Fatal(err) - } - wh := &ipv4.Header{ - Version: ipv4.Version, - Len: ipv4.HeaderLen, - TOS: i + 1, - TotalLen: ipv4.HeaderLen + len(wb), - TTL: i + 1, - Protocol: 1, - Dst: dst.IP, - } - if err := r.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - if err := r.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if err := r.WriteTo(wh, wb, nil); err != nil { - t.Fatal(err) - } - rb := make([]byte, ipv4.HeaderLen+128) - loop: - if err := r.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if _, b, _, err := r.ReadFrom(rb); err != nil { - switch runtime.GOOS { - case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } else { - m, err := icmp.ParseMessage(iana.ProtocolICMP, b) - if err != nil { - t.Fatal(err) - } - if runtime.GOOS == "linux" && m.Type == ipv4.ICMPTypeEcho { - // On Linux we must handle own sent packets. - goto loop - } - if m.Type != ipv4.ICMPTypeEchoReply || m.Code != 0 { - t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv4.ICMPTypeEchoReply, 0) - } - } - } -} diff --git a/deps/golang.org/x/net/ipv4/unicastsockopt_test.go b/deps/golang.org/x/net/ipv4/unicastsockopt_test.go deleted file mode 100644 index 2bfda7ff6..000000000 --- a/deps/golang.org/x/net/ipv4/unicastsockopt_test.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv4_test - -import ( - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv4" -) - -func TestConnUnicastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - ln, err := net.Listen("tcp4", "127.0.0.1:0") - if err != nil { - t.Fatal(err) - } - defer ln.Close() - - errc := make(chan error, 1) - go func() { - c, err := ln.Accept() - if err != nil { - errc <- err - return - } - errc <- c.Close() - }() - - c, err := net.Dial("tcp4", ln.Addr().String()) - if err != nil { - t.Fatal(err) - } - defer c.Close() - - testUnicastSocketOptions(t, ipv4.NewConn(c)) - - if err := <-errc; err != nil { - t.Errorf("server: %v", err) - } -} - -var packetConnUnicastSocketOptionTests = []struct { - net, proto, addr string -}{ - {"udp4", "", "127.0.0.1:0"}, - {"ip4", ":icmp", "127.0.0.1"}, -} - -func TestPacketConnUnicastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - m, ok := nettest.SupportsRawIPSocket() - for _, tt := range packetConnUnicastSocketOptionTests { - if tt.net == "ip4" && !ok { - t.Log(m) - continue - } - c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) - if err != nil { - t.Fatal(err) - } - defer c.Close() - - testUnicastSocketOptions(t, ipv4.NewPacketConn(c)) - } -} - -func TestRawConnUnicastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - c, err := net.ListenPacket("ip4:icmp", "127.0.0.1") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - r, err := ipv4.NewRawConn(c) - if err != nil { - t.Fatal(err) - } - - testUnicastSocketOptions(t, r) -} - -type testIPv4UnicastConn interface { - TOS() (int, error) - SetTOS(int) error - TTL() (int, error) - SetTTL(int) error -} - -func testUnicastSocketOptions(t *testing.T, c testIPv4UnicastConn) { - tos := iana.DiffServCS0 | iana.NotECNTransport - switch runtime.GOOS { - case "windows": - // IP_TOS option is supported on Windows 8 and beyond. - t.Skipf("not supported on %s", runtime.GOOS) - } - - if err := c.SetTOS(tos); err != nil { - t.Fatal(err) - } - if v, err := c.TOS(); err != nil { - t.Fatal(err) - } else if v != tos { - t.Fatalf("got %v; want %v", v, tos) - } - const ttl = 255 - if err := c.SetTTL(ttl); err != nil { - t.Fatal(err) - } - if v, err := c.TTL(); err != nil { - t.Fatal(err) - } else if v != ttl { - t.Fatalf("got %v; want %v", v, ttl) - } -} diff --git a/deps/golang.org/x/net/ipv4/zsys_darwin.go b/deps/golang.org/x/net/ipv4/zsys_darwin.go deleted file mode 100644 index c07cc883f..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_darwin.go +++ /dev/null @@ -1,99 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_darwin.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x14 - sysIP_STRIPHDR = 0x17 - sysIP_RECVTTL = 0x18 - sysIP_BOUND_IF = 0x19 - sysIP_PKTINFO = 0x1a - sysIP_RECVPKTINFO = 0x1a - - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - sysIP_MULTICAST_VIF = 0xe - sysIP_MULTICAST_IFINDEX = 0x42 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 - sysIP_BLOCK_SOURCE = 0x48 - sysIP_UNBLOCK_SOURCE = 0x49 - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type inetPktinfo struct { - Ifindex uint32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr [4]byte /* in_addr */ - Sourceaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [128]byte -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [128]byte - Pad_cgo_1 [128]byte -} diff --git a/deps/golang.org/x/net/ipv4/zsys_dragonfly.go b/deps/golang.org/x/net/ipv4/zsys_dragonfly.go deleted file mode 100644 index c4365e9e7..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_dragonfly.go +++ /dev/null @@ -1,31 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_dragonfly.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x14 - sysIP_RECVTTL = 0x41 - - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_MULTICAST_VIF = 0xe - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - - sizeofIPMreq = 0x8 -) - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} diff --git a/deps/golang.org/x/net/ipv4/zsys_freebsd_386.go b/deps/golang.org/x/net/ipv4/zsys_freebsd_386.go deleted file mode 100644 index 8c4aec94c..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_freebsd_386.go +++ /dev/null @@ -1,93 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_SENDSRCADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x14 - sysIP_ONESBCAST = 0x17 - sysIP_BINDANY = 0x18 - sysIP_RECVTTL = 0x41 - sysIP_MINTTL = 0x42 - sysIP_DONTFRAG = 0x43 - sysIP_RECVTOS = 0x44 - - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - sysIP_MULTICAST_VIF = 0xe - sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 - sysIP_BLOCK_SOURCE = 0x48 - sysIP_UNBLOCK_SOURCE = 0x49 - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr [4]byte /* in_addr */ - Sourceaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type groupReq struct { - Interface uint32 - Group sockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group sockaddrStorage - Source sockaddrStorage -} diff --git a/deps/golang.org/x/net/ipv4/zsys_freebsd_amd64.go b/deps/golang.org/x/net/ipv4/zsys_freebsd_amd64.go deleted file mode 100644 index 4b10b7c57..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_freebsd_amd64.go +++ /dev/null @@ -1,95 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_SENDSRCADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x14 - sysIP_ONESBCAST = 0x17 - sysIP_BINDANY = 0x18 - sysIP_RECVTTL = 0x41 - sysIP_MINTTL = 0x42 - sysIP_DONTFRAG = 0x43 - sysIP_RECVTOS = 0x44 - - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - sysIP_MULTICAST_VIF = 0xe - sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 - sysIP_BLOCK_SOURCE = 0x48 - sysIP_UNBLOCK_SOURCE = 0x49 - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr [4]byte /* in_addr */ - Sourceaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage - Source sockaddrStorage -} diff --git a/deps/golang.org/x/net/ipv4/zsys_freebsd_arm.go b/deps/golang.org/x/net/ipv4/zsys_freebsd_arm.go deleted file mode 100644 index 4b10b7c57..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_freebsd_arm.go +++ /dev/null @@ -1,95 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_SENDSRCADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x14 - sysIP_ONESBCAST = 0x17 - sysIP_BINDANY = 0x18 - sysIP_RECVTTL = 0x41 - sysIP_MINTTL = 0x42 - sysIP_DONTFRAG = 0x43 - sysIP_RECVTOS = 0x44 - - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - sysIP_MULTICAST_VIF = 0xe - sysIP_ADD_SOURCE_MEMBERSHIP = 0x46 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x47 - sysIP_BLOCK_SOURCE = 0x48 - sysIP_UNBLOCK_SOURCE = 0x49 - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet struct { - Len uint8 - Family uint8 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr [4]byte /* in_addr */ - Sourceaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage - Source sockaddrStorage -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_386.go b/deps/golang.org/x/net/ipv4/zsys_linux_386.go deleted file mode 100644 index c0260f0ce..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_386.go +++ /dev/null @@ -1,148 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_amd64.go b/deps/golang.org/x/net/ipv4/zsys_linux_amd64.go deleted file mode 100644 index 9c967eaa6..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_amd64.go +++ /dev/null @@ -1,150 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_arm.go b/deps/golang.org/x/net/ipv4/zsys_linux_arm.go deleted file mode 100644 index c0260f0ce..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_arm.go +++ /dev/null @@ -1,148 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_arm64.go b/deps/golang.org/x/net/ipv4/zsys_linux_arm64.go deleted file mode 100644 index 9c967eaa6..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_arm64.go +++ /dev/null @@ -1,150 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_mips.go b/deps/golang.org/x/net/ipv4/zsys_linux_mips.go deleted file mode 100644 index c0260f0ce..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_mips.go +++ /dev/null @@ -1,148 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_mips64.go b/deps/golang.org/x/net/ipv4/zsys_linux_mips64.go deleted file mode 100644 index 9c967eaa6..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_mips64.go +++ /dev/null @@ -1,150 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_mips64le.go b/deps/golang.org/x/net/ipv4/zsys_linux_mips64le.go deleted file mode 100644 index 9c967eaa6..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_mips64le.go +++ /dev/null @@ -1,150 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_mipsle.go b/deps/golang.org/x/net/ipv4/zsys_linux_mipsle.go deleted file mode 100644 index c0260f0ce..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_mipsle.go +++ /dev/null @@ -1,148 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_ppc.go b/deps/golang.org/x/net/ipv4/zsys_linux_ppc.go deleted file mode 100644 index f65bd9a7a..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_ppc.go +++ /dev/null @@ -1,148 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]uint8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_ppc64.go b/deps/golang.org/x/net/ipv4/zsys_linux_ppc64.go deleted file mode 100644 index 9c967eaa6..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_ppc64.go +++ /dev/null @@ -1,150 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_ppc64le.go b/deps/golang.org/x/net/ipv4/zsys_linux_ppc64le.go deleted file mode 100644 index 9c967eaa6..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_ppc64le.go +++ /dev/null @@ -1,150 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_linux_s390x.go b/deps/golang.org/x/net/ipv4/zsys_linux_s390x.go deleted file mode 100644 index 9c967eaa6..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_linux_s390x.go +++ /dev/null @@ -1,150 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv4 - -const ( - sysIP_TOS = 0x1 - sysIP_TTL = 0x2 - sysIP_HDRINCL = 0x3 - sysIP_OPTIONS = 0x4 - sysIP_ROUTER_ALERT = 0x5 - sysIP_RECVOPTS = 0x6 - sysIP_RETOPTS = 0x7 - sysIP_PKTINFO = 0x8 - sysIP_PKTOPTIONS = 0x9 - sysIP_MTU_DISCOVER = 0xa - sysIP_RECVERR = 0xb - sysIP_RECVTTL = 0xc - sysIP_RECVTOS = 0xd - sysIP_MTU = 0xe - sysIP_FREEBIND = 0xf - sysIP_TRANSPARENT = 0x13 - sysIP_RECVRETOPTS = 0x7 - sysIP_ORIGDSTADDR = 0x14 - sysIP_RECVORIGDSTADDR = 0x14 - sysIP_MINTTL = 0x15 - sysIP_NODEFRAG = 0x16 - sysIP_UNICAST_IF = 0x32 - - sysIP_MULTICAST_IF = 0x20 - sysIP_MULTICAST_TTL = 0x21 - sysIP_MULTICAST_LOOP = 0x22 - sysIP_ADD_MEMBERSHIP = 0x23 - sysIP_DROP_MEMBERSHIP = 0x24 - sysIP_UNBLOCK_SOURCE = 0x25 - sysIP_BLOCK_SOURCE = 0x26 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 - sysIP_MSFILTER = 0x29 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIP_MULTICAST_ALL = 0x31 - - sysICMP_FILTER = 0x1 - - sysSO_EE_ORIGIN_NONE = 0x0 - sysSO_EE_ORIGIN_LOCAL = 0x1 - sysSO_EE_ORIGIN_ICMP = 0x2 - sysSO_EE_ORIGIN_ICMP6 = 0x3 - sysSO_EE_ORIGIN_TXSTATUS = 0x4 - sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - sizeofSockExtendedErr = 0x10 - - sizeofIPMreq = 0x8 - sizeofIPMreqn = 0xc - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPFilter = 0x4 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - X__pad [8]uint8 -} - -type inetPktinfo struct { - Ifindex int32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type sockExtendedErr struct { - Errno uint32 - Origin uint8 - Type uint8 - Code uint8 - Pad uint8 - Info uint32 - Data uint32 -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqn struct { - Multiaddr [4]byte /* in_addr */ - Address [4]byte /* in_addr */ - Ifindex int32 -} - -type ipMreqSource struct { - Multiaddr uint32 - Interface uint32 - Sourceaddr uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpFilter struct { - Data uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv4/zsys_netbsd.go b/deps/golang.org/x/net/ipv4/zsys_netbsd.go deleted file mode 100644 index fd3624d93..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_netbsd.go +++ /dev/null @@ -1,30 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_netbsd.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x14 - sysIP_RECVTTL = 0x17 - - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - - sizeofIPMreq = 0x8 -) - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} diff --git a/deps/golang.org/x/net/ipv4/zsys_openbsd.go b/deps/golang.org/x/net/ipv4/zsys_openbsd.go deleted file mode 100644 index 12f36be75..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_openbsd.go +++ /dev/null @@ -1,30 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_openbsd.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x1e - sysIP_RECVTTL = 0x1f - - sysIP_MULTICAST_IF = 0x9 - sysIP_MULTICAST_TTL = 0xa - sysIP_MULTICAST_LOOP = 0xb - sysIP_ADD_MEMBERSHIP = 0xc - sysIP_DROP_MEMBERSHIP = 0xd - - sizeofIPMreq = 0x8 -) - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} diff --git a/deps/golang.org/x/net/ipv4/zsys_solaris.go b/deps/golang.org/x/net/ipv4/zsys_solaris.go deleted file mode 100644 index 0a3875cc4..000000000 --- a/deps/golang.org/x/net/ipv4/zsys_solaris.go +++ /dev/null @@ -1,100 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_solaris.go - -package ipv4 - -const ( - sysIP_OPTIONS = 0x1 - sysIP_HDRINCL = 0x2 - sysIP_TOS = 0x3 - sysIP_TTL = 0x4 - sysIP_RECVOPTS = 0x5 - sysIP_RECVRETOPTS = 0x6 - sysIP_RECVDSTADDR = 0x7 - sysIP_RETOPTS = 0x8 - sysIP_RECVIF = 0x9 - sysIP_RECVSLLA = 0xa - sysIP_RECVTTL = 0xb - - sysIP_MULTICAST_IF = 0x10 - sysIP_MULTICAST_TTL = 0x11 - sysIP_MULTICAST_LOOP = 0x12 - sysIP_ADD_MEMBERSHIP = 0x13 - sysIP_DROP_MEMBERSHIP = 0x14 - sysIP_BLOCK_SOURCE = 0x15 - sysIP_UNBLOCK_SOURCE = 0x16 - sysIP_ADD_SOURCE_MEMBERSHIP = 0x17 - sysIP_DROP_SOURCE_MEMBERSHIP = 0x18 - sysIP_NEXTHOP = 0x19 - - sysIP_PKTINFO = 0x1a - sysIP_RECVPKTINFO = 0x1a - sysIP_DONTFRAG = 0x1b - - sysIP_BOUND_IF = 0x41 - sysIP_UNSPEC_SRC = 0x42 - sysIP_BROADCAST_TTL = 0x43 - sysIP_DHCPINIT_IF = 0x45 - - sysIP_REUSEADDR = 0x104 - sysIP_DONTROUTE = 0x105 - sysIP_BROADCAST = 0x106 - - sysMCAST_JOIN_GROUP = 0x29 - sysMCAST_LEAVE_GROUP = 0x2a - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_JOIN_SOURCE_GROUP = 0x2d - sysMCAST_LEAVE_SOURCE_GROUP = 0x2e - - sizeofSockaddrStorage = 0x100 - sizeofSockaddrInet = 0x10 - sizeofInetPktinfo = 0xc - - sizeofIPMreq = 0x8 - sizeofIPMreqSource = 0xc - sizeofGroupReq = 0x104 - sizeofGroupSourceReq = 0x204 -) - -type sockaddrStorage struct { - Family uint16 - X_ss_pad1 [6]int8 - X_ss_align float64 - X_ss_pad2 [240]int8 -} - -type sockaddrInet struct { - Family uint16 - Port uint16 - Addr [4]byte /* in_addr */ - Zero [8]int8 -} - -type inetPktinfo struct { - Ifindex uint32 - Spec_dst [4]byte /* in_addr */ - Addr [4]byte /* in_addr */ -} - -type ipMreq struct { - Multiaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type ipMreqSource struct { - Multiaddr [4]byte /* in_addr */ - Sourceaddr [4]byte /* in_addr */ - Interface [4]byte /* in_addr */ -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [256]byte -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [256]byte - Pad_cgo_1 [256]byte -} diff --git a/deps/golang.org/x/net/ipv6/batch.go b/deps/golang.org/x/net/ipv6/batch.go deleted file mode 100644 index 4f5fe683d..000000000 --- a/deps/golang.org/x/net/ipv6/batch.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package ipv6 - -import ( - "net" - "runtime" - "syscall" - - "golang.org/x/net/internal/socket" -) - -// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of -// PacketConn are not implemented. - -// A Message represents an IO message. -// -// type Message struct { -// Buffers [][]byte -// OOB []byte -// Addr net.Addr -// N int -// NN int -// Flags int -// } -// -// The Buffers fields represents a list of contiguous buffers, which -// can be used for vectored IO, for example, putting a header and a -// payload in each slice. -// When writing, the Buffers field must contain at least one byte to -// write. -// When reading, the Buffers field will always contain a byte to read. -// -// The OOB field contains protocol-specific control or miscellaneous -// ancillary data known as out-of-band data. -// It can be nil when not required. -// -// The Addr field specifies a destination address when writing. -// It can be nil when the underlying protocol of the endpoint uses -// connection-oriented communication. -// After a successful read, it may contain the source address on the -// received packet. -// -// The N field indicates the number of bytes read or written from/to -// Buffers. -// -// The NN field indicates the number of bytes read or written from/to -// OOB. -// -// The Flags field contains protocol-specific information on the -// received message. -type Message = socket.Message - -// ReadBatch reads a batch of messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_PEEK. -// -// On a successful read it returns the number of messages received, up -// to len(ms). -// -// On Linux, a batch read will be optimized. -// On other platforms, this method will read only a single message. -func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - switch runtime.GOOS { - case "linux": - n, err := c.RecvMsgs([]socket.Message(ms), flags) - if err != nil { - err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - default: - n := 1 - err := c.RecvMsg(&ms[0], flags) - if err != nil { - n = 0 - err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - } -} - -// WriteBatch writes a batch of messages. -// -// The provided flags is a set of platform-dependent flags, such as -// syscall.MSG_DONTROUTE. -// -// It returns the number of messages written on a successful write. -// -// On Linux, a batch write will be optimized. -// On other platforms, this method will write only a single message. -func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - switch runtime.GOOS { - case "linux": - n, err := c.SendMsgs([]socket.Message(ms), flags) - if err != nil { - err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - default: - n := 1 - err := c.SendMsg(&ms[0], flags) - if err != nil { - n = 0 - err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - return n, err - } -} diff --git a/deps/golang.org/x/net/ipv6/bpf_test.go b/deps/golang.org/x/net/ipv6/bpf_test.go deleted file mode 100644 index 8253e1f42..000000000 --- a/deps/golang.org/x/net/ipv6/bpf_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "net" - "runtime" - "testing" - "time" - - "golang.org/x/net/bpf" - "golang.org/x/net/ipv6" -) - -func TestBPF(t *testing.T) { - if runtime.GOOS != "linux" { - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - l, err := net.ListenPacket("udp6", "[::1]:0") - if err != nil { - t.Fatal(err) - } - defer l.Close() - - p := ipv6.NewPacketConn(l) - - // This filter accepts UDP packets whose first payload byte is - // even. - prog, err := bpf.Assemble([]bpf.Instruction{ - // Load the first byte of the payload (skipping UDP header). - bpf.LoadAbsolute{Off: 8, Size: 1}, - // Select LSB of the byte. - bpf.ALUOpConstant{Op: bpf.ALUOpAnd, Val: 1}, - // Byte is even? - bpf.JumpIf{Cond: bpf.JumpEqual, Val: 0, SkipFalse: 1}, - // Accept. - bpf.RetConstant{Val: 4096}, - // Ignore. - bpf.RetConstant{Val: 0}, - }) - if err != nil { - t.Fatalf("compiling BPF: %s", err) - } - - if err = p.SetBPF(prog); err != nil { - t.Fatalf("attaching filter to Conn: %s", err) - } - - s, err := net.Dial("udp6", l.LocalAddr().String()) - if err != nil { - t.Fatal(err) - } - defer s.Close() - go func() { - for i := byte(0); i < 10; i++ { - s.Write([]byte{i}) - } - }() - - l.SetDeadline(time.Now().Add(2 * time.Second)) - seen := make([]bool, 5) - for { - var b [512]byte - n, _, err := l.ReadFrom(b[:]) - if err != nil { - t.Fatalf("reading from listener: %s", err) - } - if n != 1 { - t.Fatalf("unexpected packet length, want 1, got %d", n) - } - if b[0] >= 10 { - t.Fatalf("unexpected byte, want 0-9, got %d", b[0]) - } - if b[0]%2 != 0 { - t.Fatalf("got odd byte %d, wanted only even bytes", b[0]) - } - seen[b[0]/2] = true - - seenAll := true - for _, v := range seen { - if !v { - seenAll = false - break - } - } - if seenAll { - break - } - } -} diff --git a/deps/golang.org/x/net/ipv6/control.go b/deps/golang.org/x/net/ipv6/control.go deleted file mode 100644 index 2da644413..000000000 --- a/deps/golang.org/x/net/ipv6/control.go +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "fmt" - "net" - "sync" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -// Note that RFC 3542 obsoletes RFC 2292 but OS X Snow Leopard and the -// former still support RFC 2292 only. Please be aware that almost -// all protocol implementations prohibit using a combination of RFC -// 2292 and RFC 3542 for some practical reasons. - -type rawOpt struct { - sync.RWMutex - cflags ControlFlags -} - -func (c *rawOpt) set(f ControlFlags) { c.cflags |= f } -func (c *rawOpt) clear(f ControlFlags) { c.cflags &^= f } -func (c *rawOpt) isset(f ControlFlags) bool { return c.cflags&f != 0 } - -// A ControlFlags represents per packet basis IP-level socket option -// control flags. -type ControlFlags uint - -const ( - FlagTrafficClass ControlFlags = 1 << iota // pass the traffic class on the received packet - FlagHopLimit // pass the hop limit on the received packet - FlagSrc // pass the source address on the received packet - FlagDst // pass the destination address on the received packet - FlagInterface // pass the interface index on the received packet - FlagPathMTU // pass the path MTU on the received packet path -) - -const flagPacketInfo = FlagDst | FlagInterface - -// A ControlMessage represents per packet basis IP-level socket -// options. -type ControlMessage struct { - // Receiving socket options: SetControlMessage allows to - // receive the options from the protocol stack using ReadFrom - // method of PacketConn. - // - // Specifying socket options: ControlMessage for WriteTo - // method of PacketConn allows to send the options to the - // protocol stack. - // - TrafficClass int // traffic class, must be 1 <= value <= 255 when specifying - HopLimit int // hop limit, must be 1 <= value <= 255 when specifying - Src net.IP // source address, specifying only - Dst net.IP // destination address, receiving only - IfIndex int // interface index, must be 1 <= value when specifying - NextHop net.IP // next hop address, specifying only - MTU int // path MTU, receiving only -} - -func (cm *ControlMessage) String() string { - if cm == nil { - return "" - } - return fmt.Sprintf("tclass=%#x hoplim=%d src=%v dst=%v ifindex=%d nexthop=%v mtu=%d", cm.TrafficClass, cm.HopLimit, cm.Src, cm.Dst, cm.IfIndex, cm.NextHop, cm.MTU) -} - -// Marshal returns the binary encoding of cm. -func (cm *ControlMessage) Marshal() []byte { - if cm == nil { - return nil - } - var l int - tclass := false - if ctlOpts[ctlTrafficClass].name > 0 && cm.TrafficClass > 0 { - tclass = true - l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length) - } - hoplimit := false - if ctlOpts[ctlHopLimit].name > 0 && cm.HopLimit > 0 { - hoplimit = true - l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length) - } - pktinfo := false - if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To16() != nil && cm.Src.To4() == nil || cm.IfIndex > 0) { - pktinfo = true - l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length) - } - nexthop := false - if ctlOpts[ctlNextHop].name > 0 && cm.NextHop.To16() != nil && cm.NextHop.To4() == nil { - nexthop = true - l += socket.ControlMessageSpace(ctlOpts[ctlNextHop].length) - } - var b []byte - if l > 0 { - b = make([]byte, l) - bb := b - if tclass { - bb = ctlOpts[ctlTrafficClass].marshal(bb, cm) - } - if hoplimit { - bb = ctlOpts[ctlHopLimit].marshal(bb, cm) - } - if pktinfo { - bb = ctlOpts[ctlPacketInfo].marshal(bb, cm) - } - if nexthop { - bb = ctlOpts[ctlNextHop].marshal(bb, cm) - } - } - return b -} - -// Parse parses b as a control message and stores the result in cm. -func (cm *ControlMessage) Parse(b []byte) error { - ms, err := socket.ControlMessage(b).Parse() - if err != nil { - return err - } - for _, m := range ms { - lvl, typ, l, err := m.ParseHeader() - if err != nil { - return err - } - if lvl != iana.ProtocolIPv6 { - continue - } - switch { - case typ == ctlOpts[ctlTrafficClass].name && l >= ctlOpts[ctlTrafficClass].length: - ctlOpts[ctlTrafficClass].parse(cm, m.Data(l)) - case typ == ctlOpts[ctlHopLimit].name && l >= ctlOpts[ctlHopLimit].length: - ctlOpts[ctlHopLimit].parse(cm, m.Data(l)) - case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length: - ctlOpts[ctlPacketInfo].parse(cm, m.Data(l)) - case typ == ctlOpts[ctlPathMTU].name && l >= ctlOpts[ctlPathMTU].length: - ctlOpts[ctlPathMTU].parse(cm, m.Data(l)) - } - } - return nil -} - -// NewControlMessage returns a new control message. -// -// The returned message is large enough for options specified by cf. -func NewControlMessage(cf ControlFlags) []byte { - opt := rawOpt{cflags: cf} - var l int - if opt.isset(FlagTrafficClass) && ctlOpts[ctlTrafficClass].name > 0 { - l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length) - } - if opt.isset(FlagHopLimit) && ctlOpts[ctlHopLimit].name > 0 { - l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length) - } - if opt.isset(flagPacketInfo) && ctlOpts[ctlPacketInfo].name > 0 { - l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length) - } - if opt.isset(FlagPathMTU) && ctlOpts[ctlPathMTU].name > 0 { - l += socket.ControlMessageSpace(ctlOpts[ctlPathMTU].length) - } - var b []byte - if l > 0 { - b = make([]byte, l) - } - return b -} - -// Ancillary data socket options -const ( - ctlTrafficClass = iota // header field - ctlHopLimit // header field - ctlPacketInfo // inbound or outbound packet path - ctlNextHop // nexthop - ctlPathMTU // path mtu - ctlMax -) - -// A ctlOpt represents a binding for ancillary data socket option. -type ctlOpt struct { - name int // option name, must be equal or greater than 1 - length int // option length - marshal func([]byte, *ControlMessage) []byte - parse func(*ControlMessage, []byte) -} diff --git a/deps/golang.org/x/net/ipv6/control_rfc2292_unix.go b/deps/golang.org/x/net/ipv6/control_rfc2292_unix.go deleted file mode 100644 index 9fd9eb15e..000000000 --- a/deps/golang.org/x/net/ipv6/control_rfc2292_unix.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin - -package ipv6 - -import ( - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -func marshal2292HopLimit(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292HOPLIMIT, 4) - if cm != nil { - socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit)) - } - return m.Next(4) -} - -func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292PKTINFO, sizeofInet6Pktinfo) - if cm != nil { - pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0])) - if ip := cm.Src.To16(); ip != nil && ip.To4() == nil { - copy(pi.Addr[:], ip) - } - if cm.IfIndex > 0 { - pi.setIfindex(cm.IfIndex) - } - } - return m.Next(sizeofInet6Pktinfo) -} - -func marshal2292NextHop(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292NEXTHOP, sizeofSockaddrInet6) - if cm != nil { - sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0])) - sa.setSockaddr(cm.NextHop, cm.IfIndex) - } - return m.Next(sizeofSockaddrInet6) -} diff --git a/deps/golang.org/x/net/ipv6/control_rfc3542_unix.go b/deps/golang.org/x/net/ipv6/control_rfc3542_unix.go deleted file mode 100644 index eec529c20..000000000 --- a/deps/golang.org/x/net/ipv6/control_rfc3542_unix.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package ipv6 - -import ( - "net" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -func marshalTrafficClass(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_TCLASS, 4) - if cm != nil { - socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.TrafficClass)) - } - return m.Next(4) -} - -func parseTrafficClass(cm *ControlMessage, b []byte) { - cm.TrafficClass = int(socket.NativeEndian.Uint32(b[:4])) -} - -func marshalHopLimit(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_HOPLIMIT, 4) - if cm != nil { - socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit)) - } - return m.Next(4) -} - -func parseHopLimit(cm *ControlMessage, b []byte) { - cm.HopLimit = int(socket.NativeEndian.Uint32(b[:4])) -} - -func marshalPacketInfo(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PKTINFO, sizeofInet6Pktinfo) - if cm != nil { - pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0])) - if ip := cm.Src.To16(); ip != nil && ip.To4() == nil { - copy(pi.Addr[:], ip) - } - if cm.IfIndex > 0 { - pi.setIfindex(cm.IfIndex) - } - } - return m.Next(sizeofInet6Pktinfo) -} - -func parsePacketInfo(cm *ControlMessage, b []byte) { - pi := (*inet6Pktinfo)(unsafe.Pointer(&b[0])) - if len(cm.Dst) < net.IPv6len { - cm.Dst = make(net.IP, net.IPv6len) - } - copy(cm.Dst, pi.Addr[:]) - cm.IfIndex = int(pi.Ifindex) -} - -func marshalNextHop(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_NEXTHOP, sizeofSockaddrInet6) - if cm != nil { - sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0])) - sa.setSockaddr(cm.NextHop, cm.IfIndex) - } - return m.Next(sizeofSockaddrInet6) -} - -func parseNextHop(cm *ControlMessage, b []byte) { -} - -func marshalPathMTU(b []byte, cm *ControlMessage) []byte { - m := socket.ControlMessage(b) - m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PATHMTU, sizeofIPv6Mtuinfo) - return m.Next(sizeofIPv6Mtuinfo) -} - -func parsePathMTU(cm *ControlMessage, b []byte) { - mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0])) - if len(cm.Dst) < net.IPv6len { - cm.Dst = make(net.IP, net.IPv6len) - } - copy(cm.Dst, mi.Addr.Addr[:]) - cm.IfIndex = int(mi.Addr.Scope_id) - cm.MTU = int(mi.Mtu) -} diff --git a/deps/golang.org/x/net/ipv6/control_stub.go b/deps/golang.org/x/net/ipv6/control_stub.go deleted file mode 100644 index a045f28f7..000000000 --- a/deps/golang.org/x/net/ipv6/control_stub.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv6 - -import "golang.org/x/net/internal/socket" - -func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv6/control_test.go b/deps/golang.org/x/net/ipv6/control_test.go deleted file mode 100644 index c186ca99f..000000000 --- a/deps/golang.org/x/net/ipv6/control_test.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "testing" - - "golang.org/x/net/ipv6" -) - -func TestControlMessageParseWithFuzz(t *testing.T) { - var cm ipv6.ControlMessage - for _, fuzz := range []string{ - "\f\x00\x00\x00)\x00\x00\x00.\x00\x00\x00", - "\f\x00\x00\x00)\x00\x00\x00,\x00\x00\x00", - } { - cm.Parse([]byte(fuzz)) - } -} diff --git a/deps/golang.org/x/net/ipv6/control_unix.go b/deps/golang.org/x/net/ipv6/control_unix.go deleted file mode 100644 index 66515060a..000000000 --- a/deps/golang.org/x/net/ipv6/control_unix.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package ipv6 - -import "golang.org/x/net/internal/socket" - -func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { - opt.Lock() - defer opt.Unlock() - if so, ok := sockOpts[ssoReceiveTrafficClass]; ok && cf&FlagTrafficClass != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(FlagTrafficClass) - } else { - opt.clear(FlagTrafficClass) - } - } - if so, ok := sockOpts[ssoReceiveHopLimit]; ok && cf&FlagHopLimit != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(FlagHopLimit) - } else { - opt.clear(FlagHopLimit) - } - } - if so, ok := sockOpts[ssoReceivePacketInfo]; ok && cf&flagPacketInfo != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(cf & flagPacketInfo) - } else { - opt.clear(cf & flagPacketInfo) - } - } - if so, ok := sockOpts[ssoReceivePathMTU]; ok && cf&FlagPathMTU != 0 { - if err := so.SetInt(c, boolint(on)); err != nil { - return err - } - if on { - opt.set(FlagPathMTU) - } else { - opt.clear(FlagPathMTU) - } - } - return nil -} diff --git a/deps/golang.org/x/net/ipv6/control_windows.go b/deps/golang.org/x/net/ipv6/control_windows.go deleted file mode 100644 index ef2563b3f..000000000 --- a/deps/golang.org/x/net/ipv6/control_windows.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "syscall" - - "golang.org/x/net/internal/socket" -) - -func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { - // TODO(mikio): implement this - return syscall.EWINDOWS -} diff --git a/deps/golang.org/x/net/ipv6/defs_darwin.go b/deps/golang.org/x/net/ipv6/defs_darwin.go deleted file mode 100644 index 55ddc116f..000000000 --- a/deps/golang.org/x/net/ipv6/defs_darwin.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package ipv6 - -/* -#define __APPLE_USE_RFC_3542 -#include -#include -*/ -import "C" - -const ( - sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS - sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF - sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS - sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP - sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP - sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP - - sysIPV6_PORTRANGE = C.IPV6_PORTRANGE - sysICMP6_FILTER = C.ICMP6_FILTER - sysIPV6_2292PKTINFO = C.IPV6_2292PKTINFO - sysIPV6_2292HOPLIMIT = C.IPV6_2292HOPLIMIT - sysIPV6_2292NEXTHOP = C.IPV6_2292NEXTHOP - sysIPV6_2292HOPOPTS = C.IPV6_2292HOPOPTS - sysIPV6_2292DSTOPTS = C.IPV6_2292DSTOPTS - sysIPV6_2292RTHDR = C.IPV6_2292RTHDR - - sysIPV6_2292PKTOPTIONS = C.IPV6_2292PKTOPTIONS - - sysIPV6_CHECKSUM = C.IPV6_CHECKSUM - sysIPV6_V6ONLY = C.IPV6_V6ONLY - - sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY - - sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS - sysIPV6_TCLASS = C.IPV6_TCLASS - - sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS - - sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO - - sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT - sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR - sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS - sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS - - sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU - sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU - - sysIPV6_PATHMTU = C.IPV6_PATHMTU - - sysIPV6_PKTINFO = C.IPV6_PKTINFO - sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT - sysIPV6_NEXTHOP = C.IPV6_NEXTHOP - sysIPV6_HOPOPTS = C.IPV6_HOPOPTS - sysIPV6_DSTOPTS = C.IPV6_DSTOPTS - sysIPV6_RTHDR = C.IPV6_RTHDR - - sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL - - sysIPV6_DONTFRAG = C.IPV6_DONTFRAG - - sysIPV6_PREFER_TEMPADDR = C.IPV6_PREFER_TEMPADDR - - sysIPV6_MSFILTER = C.IPV6_MSFILTER - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - - sysIPV6_BOUND_IF = C.IPV6_BOUND_IF - - sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT - sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH - sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo - - sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req - - sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter -) - -type sockaddrStorage C.struct_sockaddr_storage - -type sockaddrInet6 C.struct_sockaddr_in6 - -type inet6Pktinfo C.struct_in6_pktinfo - -type ipv6Mtuinfo C.struct_ip6_mtuinfo - -type ipv6Mreq C.struct_ipv6_mreq - -type icmpv6Filter C.struct_icmp6_filter - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req diff --git a/deps/golang.org/x/net/ipv6/defs_dragonfly.go b/deps/golang.org/x/net/ipv6/defs_dragonfly.go deleted file mode 100644 index a4c383a51..000000000 --- a/deps/golang.org/x/net/ipv6/defs_dragonfly.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package ipv6 - -/* -#include -#include - -#include -#include -*/ -import "C" - -const ( - sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS - sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF - sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS - sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP - sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP - sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP - sysIPV6_PORTRANGE = C.IPV6_PORTRANGE - sysICMP6_FILTER = C.ICMP6_FILTER - - sysIPV6_CHECKSUM = C.IPV6_CHECKSUM - sysIPV6_V6ONLY = C.IPV6_V6ONLY - - sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY - - sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS - sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO - sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT - sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR - sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS - sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS - - sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU - sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU - - sysIPV6_PATHMTU = C.IPV6_PATHMTU - - sysIPV6_PKTINFO = C.IPV6_PKTINFO - sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT - sysIPV6_NEXTHOP = C.IPV6_NEXTHOP - sysIPV6_HOPOPTS = C.IPV6_HOPOPTS - sysIPV6_DSTOPTS = C.IPV6_DSTOPTS - sysIPV6_RTHDR = C.IPV6_RTHDR - - sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS - - sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL - - sysIPV6_TCLASS = C.IPV6_TCLASS - sysIPV6_DONTFRAG = C.IPV6_DONTFRAG - - sysIPV6_PREFER_TEMPADDR = C.IPV6_PREFER_TEMPADDR - - sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT - sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH - sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW - - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo - - sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - - sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter -) - -type sockaddrInet6 C.struct_sockaddr_in6 - -type inet6Pktinfo C.struct_in6_pktinfo - -type ipv6Mtuinfo C.struct_ip6_mtuinfo - -type ipv6Mreq C.struct_ipv6_mreq - -type icmpv6Filter C.struct_icmp6_filter diff --git a/deps/golang.org/x/net/ipv6/defs_freebsd.go b/deps/golang.org/x/net/ipv6/defs_freebsd.go deleted file mode 100644 index 53e625389..000000000 --- a/deps/golang.org/x/net/ipv6/defs_freebsd.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package ipv6 - -/* -#include -#include - -#include -#include -*/ -import "C" - -const ( - sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS - sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF - sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS - sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP - sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP - sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP - sysIPV6_PORTRANGE = C.IPV6_PORTRANGE - sysICMP6_FILTER = C.ICMP6_FILTER - - sysIPV6_CHECKSUM = C.IPV6_CHECKSUM - sysIPV6_V6ONLY = C.IPV6_V6ONLY - - sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY - - sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS - - sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO - sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT - sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR - sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS - sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS - - sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU - sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU - - sysIPV6_PATHMTU = C.IPV6_PATHMTU - - sysIPV6_PKTINFO = C.IPV6_PKTINFO - sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT - sysIPV6_NEXTHOP = C.IPV6_NEXTHOP - sysIPV6_HOPOPTS = C.IPV6_HOPOPTS - sysIPV6_DSTOPTS = C.IPV6_DSTOPTS - sysIPV6_RTHDR = C.IPV6_RTHDR - - sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS - - sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL - - sysIPV6_TCLASS = C.IPV6_TCLASS - sysIPV6_DONTFRAG = C.IPV6_DONTFRAG - - sysIPV6_PREFER_TEMPADDR = C.IPV6_PREFER_TEMPADDR - - sysIPV6_BINDANY = C.IPV6_BINDANY - - sysIPV6_MSFILTER = C.IPV6_MSFILTER - - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - - sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT - sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH - sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo - - sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req - - sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter -) - -type sockaddrStorage C.struct_sockaddr_storage - -type sockaddrInet6 C.struct_sockaddr_in6 - -type inet6Pktinfo C.struct_in6_pktinfo - -type ipv6Mtuinfo C.struct_ip6_mtuinfo - -type ipv6Mreq C.struct_ipv6_mreq - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req - -type icmpv6Filter C.struct_icmp6_filter diff --git a/deps/golang.org/x/net/ipv6/defs_linux.go b/deps/golang.org/x/net/ipv6/defs_linux.go deleted file mode 100644 index 3308cb2c3..000000000 --- a/deps/golang.org/x/net/ipv6/defs_linux.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package ipv6 - -/* -#include -#include -#include -#include -#include -#include -*/ -import "C" - -const ( - sysIPV6_ADDRFORM = C.IPV6_ADDRFORM - sysIPV6_2292PKTINFO = C.IPV6_2292PKTINFO - sysIPV6_2292HOPOPTS = C.IPV6_2292HOPOPTS - sysIPV6_2292DSTOPTS = C.IPV6_2292DSTOPTS - sysIPV6_2292RTHDR = C.IPV6_2292RTHDR - sysIPV6_2292PKTOPTIONS = C.IPV6_2292PKTOPTIONS - sysIPV6_CHECKSUM = C.IPV6_CHECKSUM - sysIPV6_2292HOPLIMIT = C.IPV6_2292HOPLIMIT - sysIPV6_NEXTHOP = C.IPV6_NEXTHOP - sysIPV6_FLOWINFO = C.IPV6_FLOWINFO - - sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS - sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF - sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS - sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP - sysIPV6_ADD_MEMBERSHIP = C.IPV6_ADD_MEMBERSHIP - sysIPV6_DROP_MEMBERSHIP = C.IPV6_DROP_MEMBERSHIP - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - sysMCAST_MSFILTER = C.MCAST_MSFILTER - sysIPV6_ROUTER_ALERT = C.IPV6_ROUTER_ALERT - sysIPV6_MTU_DISCOVER = C.IPV6_MTU_DISCOVER - sysIPV6_MTU = C.IPV6_MTU - sysIPV6_RECVERR = C.IPV6_RECVERR - sysIPV6_V6ONLY = C.IPV6_V6ONLY - sysIPV6_JOIN_ANYCAST = C.IPV6_JOIN_ANYCAST - sysIPV6_LEAVE_ANYCAST = C.IPV6_LEAVE_ANYCAST - - //sysIPV6_PMTUDISC_DONT = C.IPV6_PMTUDISC_DONT - //sysIPV6_PMTUDISC_WANT = C.IPV6_PMTUDISC_WANT - //sysIPV6_PMTUDISC_DO = C.IPV6_PMTUDISC_DO - //sysIPV6_PMTUDISC_PROBE = C.IPV6_PMTUDISC_PROBE - //sysIPV6_PMTUDISC_INTERFACE = C.IPV6_PMTUDISC_INTERFACE - //sysIPV6_PMTUDISC_OMIT = C.IPV6_PMTUDISC_OMIT - - sysIPV6_FLOWLABEL_MGR = C.IPV6_FLOWLABEL_MGR - sysIPV6_FLOWINFO_SEND = C.IPV6_FLOWINFO_SEND - - sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY - sysIPV6_XFRM_POLICY = C.IPV6_XFRM_POLICY - - sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO - sysIPV6_PKTINFO = C.IPV6_PKTINFO - sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT - sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT - sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS - sysIPV6_HOPOPTS = C.IPV6_HOPOPTS - sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS - sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR - sysIPV6_RTHDR = C.IPV6_RTHDR - sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS - sysIPV6_DSTOPTS = C.IPV6_DSTOPTS - sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU - sysIPV6_PATHMTU = C.IPV6_PATHMTU - sysIPV6_DONTFRAG = C.IPV6_DONTFRAG - - sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS - sysIPV6_TCLASS = C.IPV6_TCLASS - - sysIPV6_ADDR_PREFERENCES = C.IPV6_ADDR_PREFERENCES - - sysIPV6_PREFER_SRC_TMP = C.IPV6_PREFER_SRC_TMP - sysIPV6_PREFER_SRC_PUBLIC = C.IPV6_PREFER_SRC_PUBLIC - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = C.IPV6_PREFER_SRC_PUBTMP_DEFAULT - sysIPV6_PREFER_SRC_COA = C.IPV6_PREFER_SRC_COA - sysIPV6_PREFER_SRC_HOME = C.IPV6_PREFER_SRC_HOME - sysIPV6_PREFER_SRC_CGA = C.IPV6_PREFER_SRC_CGA - sysIPV6_PREFER_SRC_NONCGA = C.IPV6_PREFER_SRC_NONCGA - - sysIPV6_MINHOPCOUNT = C.IPV6_MINHOPCOUNT - - sysIPV6_ORIGDSTADDR = C.IPV6_ORIGDSTADDR - sysIPV6_RECVORIGDSTADDR = C.IPV6_RECVORIGDSTADDR - sysIPV6_TRANSPARENT = C.IPV6_TRANSPARENT - sysIPV6_UNICAST_IF = C.IPV6_UNICAST_IF - - sysICMPV6_FILTER = C.ICMPV6_FILTER - - sysICMPV6_FILTER_BLOCK = C.ICMPV6_FILTER_BLOCK - sysICMPV6_FILTER_PASS = C.ICMPV6_FILTER_PASS - sysICMPV6_FILTER_BLOCKOTHERS = C.ICMPV6_FILTER_BLOCKOTHERS - sysICMPV6_FILTER_PASSONLY = C.ICMPV6_FILTER_PASSONLY - - sysSOL_SOCKET = C.SOL_SOCKET - sysSO_ATTACH_FILTER = C.SO_ATTACH_FILTER - - sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo - sizeofIPv6FlowlabelReq = C.sizeof_struct_in6_flowlabel_req - - sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req - - sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter - - sizeofSockFprog = C.sizeof_struct_sock_fprog -) - -type kernelSockaddrStorage C.struct___kernel_sockaddr_storage - -type sockaddrInet6 C.struct_sockaddr_in6 - -type inet6Pktinfo C.struct_in6_pktinfo - -type ipv6Mtuinfo C.struct_ip6_mtuinfo - -type ipv6FlowlabelReq C.struct_in6_flowlabel_req - -type ipv6Mreq C.struct_ipv6_mreq - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req - -type icmpv6Filter C.struct_icmp6_filter - -type sockFProg C.struct_sock_fprog - -type sockFilter C.struct_sock_filter diff --git a/deps/golang.org/x/net/ipv6/defs_netbsd.go b/deps/golang.org/x/net/ipv6/defs_netbsd.go deleted file mode 100644 index be9ceb9cc..000000000 --- a/deps/golang.org/x/net/ipv6/defs_netbsd.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package ipv6 - -/* -#include -#include - -#include -#include -*/ -import "C" - -const ( - sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS - sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF - sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS - sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP - sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP - sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP - sysIPV6_PORTRANGE = C.IPV6_PORTRANGE - sysICMP6_FILTER = C.ICMP6_FILTER - - sysIPV6_CHECKSUM = C.IPV6_CHECKSUM - sysIPV6_V6ONLY = C.IPV6_V6ONLY - - sysIPV6_IPSEC_POLICY = C.IPV6_IPSEC_POLICY - - sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS - - sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO - sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT - sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR - sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS - sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS - - sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU - sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU - sysIPV6_PATHMTU = C.IPV6_PATHMTU - - sysIPV6_PKTINFO = C.IPV6_PKTINFO - sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT - sysIPV6_NEXTHOP = C.IPV6_NEXTHOP - sysIPV6_HOPOPTS = C.IPV6_HOPOPTS - sysIPV6_DSTOPTS = C.IPV6_DSTOPTS - sysIPV6_RTHDR = C.IPV6_RTHDR - - sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS - - sysIPV6_TCLASS = C.IPV6_TCLASS - sysIPV6_DONTFRAG = C.IPV6_DONTFRAG - - sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT - sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH - sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW - - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo - - sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - - sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter -) - -type sockaddrInet6 C.struct_sockaddr_in6 - -type inet6Pktinfo C.struct_in6_pktinfo - -type ipv6Mtuinfo C.struct_ip6_mtuinfo - -type ipv6Mreq C.struct_ipv6_mreq - -type icmpv6Filter C.struct_icmp6_filter diff --git a/deps/golang.org/x/net/ipv6/defs_openbsd.go b/deps/golang.org/x/net/ipv6/defs_openbsd.go deleted file mode 100644 index 177ddf87d..000000000 --- a/deps/golang.org/x/net/ipv6/defs_openbsd.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package ipv6 - -/* -#include -#include - -#include -#include -*/ -import "C" - -const ( - sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS - sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF - sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS - sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP - sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP - sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP - sysIPV6_PORTRANGE = C.IPV6_PORTRANGE - sysICMP6_FILTER = C.ICMP6_FILTER - - sysIPV6_CHECKSUM = C.IPV6_CHECKSUM - sysIPV6_V6ONLY = C.IPV6_V6ONLY - - sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS - - sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO - sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT - sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR - sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS - sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS - - sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU - sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU - - sysIPV6_PATHMTU = C.IPV6_PATHMTU - - sysIPV6_PKTINFO = C.IPV6_PKTINFO - sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT - sysIPV6_NEXTHOP = C.IPV6_NEXTHOP - sysIPV6_HOPOPTS = C.IPV6_HOPOPTS - sysIPV6_DSTOPTS = C.IPV6_DSTOPTS - sysIPV6_RTHDR = C.IPV6_RTHDR - - sysIPV6_AUTH_LEVEL = C.IPV6_AUTH_LEVEL - sysIPV6_ESP_TRANS_LEVEL = C.IPV6_ESP_TRANS_LEVEL - sysIPV6_ESP_NETWORK_LEVEL = C.IPV6_ESP_NETWORK_LEVEL - sysIPSEC6_OUTSA = C.IPSEC6_OUTSA - sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS - - sysIPV6_AUTOFLOWLABEL = C.IPV6_AUTOFLOWLABEL - sysIPV6_IPCOMP_LEVEL = C.IPV6_IPCOMP_LEVEL - - sysIPV6_TCLASS = C.IPV6_TCLASS - sysIPV6_DONTFRAG = C.IPV6_DONTFRAG - sysIPV6_PIPEX = C.IPV6_PIPEX - - sysIPV6_RTABLE = C.IPV6_RTABLE - - sysIPV6_PORTRANGE_DEFAULT = C.IPV6_PORTRANGE_DEFAULT - sysIPV6_PORTRANGE_HIGH = C.IPV6_PORTRANGE_HIGH - sysIPV6_PORTRANGE_LOW = C.IPV6_PORTRANGE_LOW - - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo - - sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - - sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter -) - -type sockaddrInet6 C.struct_sockaddr_in6 - -type inet6Pktinfo C.struct_in6_pktinfo - -type ipv6Mtuinfo C.struct_ip6_mtuinfo - -type ipv6Mreq C.struct_ipv6_mreq - -type icmpv6Filter C.struct_icmp6_filter diff --git a/deps/golang.org/x/net/ipv6/defs_solaris.go b/deps/golang.org/x/net/ipv6/defs_solaris.go deleted file mode 100644 index 0f8ce2b46..000000000 --- a/deps/golang.org/x/net/ipv6/defs_solaris.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package ipv6 - -/* -#include - -#include -#include -*/ -import "C" - -const ( - sysIPV6_UNICAST_HOPS = C.IPV6_UNICAST_HOPS - sysIPV6_MULTICAST_IF = C.IPV6_MULTICAST_IF - sysIPV6_MULTICAST_HOPS = C.IPV6_MULTICAST_HOPS - sysIPV6_MULTICAST_LOOP = C.IPV6_MULTICAST_LOOP - sysIPV6_JOIN_GROUP = C.IPV6_JOIN_GROUP - sysIPV6_LEAVE_GROUP = C.IPV6_LEAVE_GROUP - - sysIPV6_PKTINFO = C.IPV6_PKTINFO - - sysIPV6_HOPLIMIT = C.IPV6_HOPLIMIT - sysIPV6_NEXTHOP = C.IPV6_NEXTHOP - sysIPV6_HOPOPTS = C.IPV6_HOPOPTS - sysIPV6_DSTOPTS = C.IPV6_DSTOPTS - - sysIPV6_RTHDR = C.IPV6_RTHDR - sysIPV6_RTHDRDSTOPTS = C.IPV6_RTHDRDSTOPTS - - sysIPV6_RECVPKTINFO = C.IPV6_RECVPKTINFO - sysIPV6_RECVHOPLIMIT = C.IPV6_RECVHOPLIMIT - sysIPV6_RECVHOPOPTS = C.IPV6_RECVHOPOPTS - - sysIPV6_RECVRTHDR = C.IPV6_RECVRTHDR - - sysIPV6_RECVRTHDRDSTOPTS = C.IPV6_RECVRTHDRDSTOPTS - - sysIPV6_CHECKSUM = C.IPV6_CHECKSUM - sysIPV6_RECVTCLASS = C.IPV6_RECVTCLASS - sysIPV6_USE_MIN_MTU = C.IPV6_USE_MIN_MTU - sysIPV6_DONTFRAG = C.IPV6_DONTFRAG - sysIPV6_SEC_OPT = C.IPV6_SEC_OPT - sysIPV6_SRC_PREFERENCES = C.IPV6_SRC_PREFERENCES - sysIPV6_RECVPATHMTU = C.IPV6_RECVPATHMTU - sysIPV6_PATHMTU = C.IPV6_PATHMTU - sysIPV6_TCLASS = C.IPV6_TCLASS - sysIPV6_V6ONLY = C.IPV6_V6ONLY - - sysIPV6_RECVDSTOPTS = C.IPV6_RECVDSTOPTS - - sysMCAST_JOIN_GROUP = C.MCAST_JOIN_GROUP - sysMCAST_LEAVE_GROUP = C.MCAST_LEAVE_GROUP - sysMCAST_BLOCK_SOURCE = C.MCAST_BLOCK_SOURCE - sysMCAST_UNBLOCK_SOURCE = C.MCAST_UNBLOCK_SOURCE - sysMCAST_JOIN_SOURCE_GROUP = C.MCAST_JOIN_SOURCE_GROUP - sysMCAST_LEAVE_SOURCE_GROUP = C.MCAST_LEAVE_SOURCE_GROUP - - sysIPV6_PREFER_SRC_HOME = C.IPV6_PREFER_SRC_HOME - sysIPV6_PREFER_SRC_COA = C.IPV6_PREFER_SRC_COA - sysIPV6_PREFER_SRC_PUBLIC = C.IPV6_PREFER_SRC_PUBLIC - sysIPV6_PREFER_SRC_TMP = C.IPV6_PREFER_SRC_TMP - sysIPV6_PREFER_SRC_NONCGA = C.IPV6_PREFER_SRC_NONCGA - sysIPV6_PREFER_SRC_CGA = C.IPV6_PREFER_SRC_CGA - - sysIPV6_PREFER_SRC_MIPMASK = C.IPV6_PREFER_SRC_MIPMASK - sysIPV6_PREFER_SRC_MIPDEFAULT = C.IPV6_PREFER_SRC_MIPDEFAULT - sysIPV6_PREFER_SRC_TMPMASK = C.IPV6_PREFER_SRC_TMPMASK - sysIPV6_PREFER_SRC_TMPDEFAULT = C.IPV6_PREFER_SRC_TMPDEFAULT - sysIPV6_PREFER_SRC_CGAMASK = C.IPV6_PREFER_SRC_CGAMASK - sysIPV6_PREFER_SRC_CGADEFAULT = C.IPV6_PREFER_SRC_CGADEFAULT - - sysIPV6_PREFER_SRC_MASK = C.IPV6_PREFER_SRC_MASK - - sysIPV6_PREFER_SRC_DEFAULT = C.IPV6_PREFER_SRC_DEFAULT - - sysIPV6_BOUND_IF = C.IPV6_BOUND_IF - sysIPV6_UNSPEC_SRC = C.IPV6_UNSPEC_SRC - - sysICMP6_FILTER = C.ICMP6_FILTER - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 - sizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo - sizeofIPv6Mtuinfo = C.sizeof_struct_ip6_mtuinfo - - sizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq - sizeofGroupReq = C.sizeof_struct_group_req - sizeofGroupSourceReq = C.sizeof_struct_group_source_req - - sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter -) - -type sockaddrStorage C.struct_sockaddr_storage - -type sockaddrInet6 C.struct_sockaddr_in6 - -type inet6Pktinfo C.struct_in6_pktinfo - -type ipv6Mtuinfo C.struct_ip6_mtuinfo - -type ipv6Mreq C.struct_ipv6_mreq - -type groupReq C.struct_group_req - -type groupSourceReq C.struct_group_source_req - -type icmpv6Filter C.struct_icmp6_filter diff --git a/deps/golang.org/x/net/ipv6/dgramopt.go b/deps/golang.org/x/net/ipv6/dgramopt.go deleted file mode 100644 index 703dafe84..000000000 --- a/deps/golang.org/x/net/ipv6/dgramopt.go +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - "syscall" - - "golang.org/x/net/bpf" -) - -// MulticastHopLimit returns the hop limit field value for outgoing -// multicast packets. -func (c *dgramOpt) MulticastHopLimit() (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastHopLimit] - if !ok { - return 0, errOpNoSupport - } - return so.GetInt(c.Conn) -} - -// SetMulticastHopLimit sets the hop limit field value for future -// outgoing multicast packets. -func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastHopLimit] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, hoplim) -} - -// MulticastInterface returns the default interface for multicast -// packet transmissions. -func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { - if !c.ok() { - return nil, syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastInterface] - if !ok { - return nil, errOpNoSupport - } - return so.getMulticastInterface(c.Conn) -} - -// SetMulticastInterface sets the default interface for future -// multicast packet transmissions. -func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastInterface] - if !ok { - return errOpNoSupport - } - return so.setMulticastInterface(c.Conn, ifi) -} - -// MulticastLoopback reports whether transmitted multicast packets -// should be copied and send back to the originator. -func (c *dgramOpt) MulticastLoopback() (bool, error) { - if !c.ok() { - return false, syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastLoopback] - if !ok { - return false, errOpNoSupport - } - on, err := so.GetInt(c.Conn) - if err != nil { - return false, err - } - return on == 1, nil -} - -// SetMulticastLoopback sets whether transmitted multicast packets -// should be copied and send back to the originator. -func (c *dgramOpt) SetMulticastLoopback(on bool) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoMulticastLoopback] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, boolint(on)) -} - -// JoinGroup joins the group address group on the interface ifi. -// By default all sources that can cast data to group are accepted. -// It's possible to mute and unmute data transmission from a specific -// source by using ExcludeSourceSpecificGroup and -// IncludeSourceSpecificGroup. -// JoinGroup uses the system assigned multicast interface when ifi is -// nil, although this is not recommended because the assignment -// depends on platforms and sometimes it might require routing -// configuration. -func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoJoinGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP16(group) - if grp == nil { - return errMissingAddress - } - return so.setGroup(c.Conn, ifi, grp) -} - -// LeaveGroup leaves the group address group on the interface ifi -// regardless of whether the group is any-source group or -// source-specific group. -func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoLeaveGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP16(group) - if grp == nil { - return errMissingAddress - } - return so.setGroup(c.Conn, ifi, grp) -} - -// JoinSourceSpecificGroup joins the source-specific group comprising -// group and source on the interface ifi. -// JoinSourceSpecificGroup uses the system assigned multicast -// interface when ifi is nil, although this is not recommended because -// the assignment depends on platforms and sometimes it might require -// routing configuration. -func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoJoinSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP16(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP16(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// LeaveSourceSpecificGroup leaves the source-specific group on the -// interface ifi. -func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoLeaveSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP16(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP16(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// ExcludeSourceSpecificGroup excludes the source-specific group from -// the already joined any-source groups by JoinGroup on the interface -// ifi. -func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoBlockSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP16(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP16(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// IncludeSourceSpecificGroup includes the excluded source-specific -// group by ExcludeSourceSpecificGroup again on the interface ifi. -func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoUnblockSourceGroup] - if !ok { - return errOpNoSupport - } - grp := netAddrToIP16(group) - if grp == nil { - return errMissingAddress - } - src := netAddrToIP16(source) - if src == nil { - return errMissingAddress - } - return so.setSourceGroup(c.Conn, ifi, grp, src) -} - -// Checksum reports whether the kernel will compute, store or verify a -// checksum for both incoming and outgoing packets. If on is true, it -// returns an offset in bytes into the data of where the checksum -// field is located. -func (c *dgramOpt) Checksum() (on bool, offset int, err error) { - if !c.ok() { - return false, 0, syscall.EINVAL - } - so, ok := sockOpts[ssoChecksum] - if !ok { - return false, 0, errOpNoSupport - } - offset, err = so.GetInt(c.Conn) - if err != nil { - return false, 0, err - } - if offset < 0 { - return false, 0, nil - } - return true, offset, nil -} - -// SetChecksum enables the kernel checksum processing. If on is ture, -// the offset should be an offset in bytes into the data of where the -// checksum field is located. -func (c *dgramOpt) SetChecksum(on bool, offset int) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoChecksum] - if !ok { - return errOpNoSupport - } - if !on { - offset = -1 - } - return so.SetInt(c.Conn, offset) -} - -// ICMPFilter returns an ICMP filter. -func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { - if !c.ok() { - return nil, syscall.EINVAL - } - so, ok := sockOpts[ssoICMPFilter] - if !ok { - return nil, errOpNoSupport - } - return so.getICMPFilter(c.Conn) -} - -// SetICMPFilter deploys the ICMP filter. -func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoICMPFilter] - if !ok { - return errOpNoSupport - } - return so.setICMPFilter(c.Conn, f) -} - -// SetBPF attaches a BPF program to the connection. -// -// Only supported on Linux. -func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoAttachFilter] - if !ok { - return errOpNoSupport - } - return so.setBPF(c.Conn, filter) -} diff --git a/deps/golang.org/x/net/ipv6/doc.go b/deps/golang.org/x/net/ipv6/doc.go deleted file mode 100644 index cb4000623..000000000 --- a/deps/golang.org/x/net/ipv6/doc.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ipv6 implements IP-level socket options for the Internet -// Protocol version 6. -// -// The package provides IP-level socket options that allow -// manipulation of IPv6 facilities. -// -// The IPv6 protocol is defined in RFC 8200. -// Socket interface extensions are defined in RFC 3493, RFC 3542 and -// RFC 3678. -// MLDv1 and MLDv2 are defined in RFC 2710 and RFC 3810. -// Source-specific multicast is defined in RFC 4607. -// -// On Darwin, this package requires OS X Mavericks version 10.9 or -// above, or equivalent. -// -// -// Unicasting -// -// The options for unicasting are available for net.TCPConn, -// net.UDPConn and net.IPConn which are created as network connections -// that use the IPv6 transport. When a single TCP connection carrying -// a data flow of multiple packets needs to indicate the flow is -// important, Conn is used to set the traffic class field on the IPv6 -// header for each packet. -// -// ln, err := net.Listen("tcp6", "[::]:1024") -// if err != nil { -// // error handling -// } -// defer ln.Close() -// for { -// c, err := ln.Accept() -// if err != nil { -// // error handling -// } -// go func(c net.Conn) { -// defer c.Close() -// -// The outgoing packets will be labeled DiffServ assured forwarding -// class 1 low drop precedence, known as AF11 packets. -// -// if err := ipv6.NewConn(c).SetTrafficClass(0x28); err != nil { -// // error handling -// } -// if _, err := c.Write(data); err != nil { -// // error handling -// } -// }(c) -// } -// -// -// Multicasting -// -// The options for multicasting are available for net.UDPConn and -// net.IPconn which are created as network connections that use the -// IPv6 transport. A few network facilities must be prepared before -// you begin multicasting, at a minimum joining network interfaces and -// multicast groups. -// -// en0, err := net.InterfaceByName("en0") -// if err != nil { -// // error handling -// } -// en1, err := net.InterfaceByIndex(911) -// if err != nil { -// // error handling -// } -// group := net.ParseIP("ff02::114") -// -// First, an application listens to an appropriate address with an -// appropriate service port. -// -// c, err := net.ListenPacket("udp6", "[::]:1024") -// if err != nil { -// // error handling -// } -// defer c.Close() -// -// Second, the application joins multicast groups, starts listening to -// the groups on the specified network interfaces. Note that the -// service port for transport layer protocol does not matter with this -// operation as joining groups affects only network and link layer -// protocols, such as IPv6 and Ethernet. -// -// p := ipv6.NewPacketConn(c) -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: group}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en1, &net.UDPAddr{IP: group}); err != nil { -// // error handling -// } -// -// The application might set per packet control message transmissions -// between the protocol stack within the kernel. When the application -// needs a destination address on an incoming packet, -// SetControlMessage of PacketConn is used to enable control message -// transmissions. -// -// if err := p.SetControlMessage(ipv6.FlagDst, true); err != nil { -// // error handling -// } -// -// The application could identify whether the received packets are -// of interest by using the control message that contains the -// destination address of the received packet. -// -// b := make([]byte, 1500) -// for { -// n, rcm, src, err := p.ReadFrom(b) -// if err != nil { -// // error handling -// } -// if rcm.Dst.IsMulticast() { -// if rcm.Dst.Equal(group) { -// // joined group, do something -// } else { -// // unknown group, discard -// continue -// } -// } -// -// The application can also send both unicast and multicast packets. -// -// p.SetTrafficClass(0x0) -// p.SetHopLimit(16) -// if _, err := p.WriteTo(data[:n], nil, src); err != nil { -// // error handling -// } -// dst := &net.UDPAddr{IP: group, Port: 1024} -// wcm := ipv6.ControlMessage{TrafficClass: 0xe0, HopLimit: 1} -// for _, ifi := range []*net.Interface{en0, en1} { -// wcm.IfIndex = ifi.Index -// if _, err := p.WriteTo(data[:n], &wcm, dst); err != nil { -// // error handling -// } -// } -// } -// -// -// More multicasting -// -// An application that uses PacketConn may join multiple multicast -// groups. For example, a UDP listener with port 1024 might join two -// different groups across over two different network interfaces by -// using: -// -// c, err := net.ListenPacket("udp6", "[::]:1024") -// if err != nil { -// // error handling -// } -// defer c.Close() -// p := ipv6.NewPacketConn(c) -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::1:114")}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en1, &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}); err != nil { -// // error handling -// } -// -// It is possible for multiple UDP listeners that listen on the same -// UDP port to join the same multicast group. The net package will -// provide a socket that listens to a wildcard address with reusable -// UDP port when an appropriate multicast address prefix is passed to -// the net.ListenPacket or net.ListenUDP. -// -// c1, err := net.ListenPacket("udp6", "[ff02::]:1024") -// if err != nil { -// // error handling -// } -// defer c1.Close() -// c2, err := net.ListenPacket("udp6", "[ff02::]:1024") -// if err != nil { -// // error handling -// } -// defer c2.Close() -// p1 := ipv6.NewPacketConn(c1) -// if err := p1.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { -// // error handling -// } -// p2 := ipv6.NewPacketConn(c2) -// if err := p2.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { -// // error handling -// } -// -// Also it is possible for the application to leave or rejoin a -// multicast group on the network interface. -// -// if err := p.LeaveGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff02::114")}); err != nil { -// // error handling -// } -// if err := p.JoinGroup(en0, &net.UDPAddr{IP: net.ParseIP("ff01::114")}); err != nil { -// // error handling -// } -// -// -// Source-specific multicasting -// -// An application that uses PacketConn on MLDv2 supported platform is -// able to join source-specific multicast groups. -// The application may use JoinSourceSpecificGroup and -// LeaveSourceSpecificGroup for the operation known as "include" mode, -// -// ssmgroup := net.UDPAddr{IP: net.ParseIP("ff32::8000:9")} -// ssmsource := net.UDPAddr{IP: net.ParseIP("fe80::cafe")} -// if err := p.JoinSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { -// // error handling -// } -// if err := p.LeaveSourceSpecificGroup(en0, &ssmgroup, &ssmsource); err != nil { -// // error handling -// } -// -// or JoinGroup, ExcludeSourceSpecificGroup, -// IncludeSourceSpecificGroup and LeaveGroup for the operation known -// as "exclude" mode. -// -// exclsource := net.UDPAddr{IP: net.ParseIP("fe80::dead")} -// if err := p.JoinGroup(en0, &ssmgroup); err != nil { -// // error handling -// } -// if err := p.ExcludeSourceSpecificGroup(en0, &ssmgroup, &exclsource); err != nil { -// // error handling -// } -// if err := p.LeaveGroup(en0, &ssmgroup); err != nil { -// // error handling -// } -// -// Note that it depends on each platform implementation what happens -// when an application which runs on MLDv2 unsupported platform uses -// JoinSourceSpecificGroup and LeaveSourceSpecificGroup. -// In general the platform tries to fall back to conversations using -// MLDv1 and starts to listen to multicast traffic. -// In the fallback case, ExcludeSourceSpecificGroup and -// IncludeSourceSpecificGroup may return an error. -package ipv6 // import "golang.org/x/net/ipv6" - -// BUG(mikio): This package is not implemented on JS, NaCl and Plan 9. diff --git a/deps/golang.org/x/net/ipv6/endpoint.go b/deps/golang.org/x/net/ipv6/endpoint.go deleted file mode 100644 index 0624c1740..000000000 --- a/deps/golang.org/x/net/ipv6/endpoint.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - "syscall" - "time" - - "golang.org/x/net/internal/socket" -) - -// BUG(mikio): On Windows, the JoinSourceSpecificGroup, -// LeaveSourceSpecificGroup, ExcludeSourceSpecificGroup and -// IncludeSourceSpecificGroup methods of PacketConn are not -// implemented. - -// A Conn represents a network endpoint that uses IPv6 transport. -// It allows to set basic IP-level socket options such as traffic -// class and hop limit. -type Conn struct { - genericOpt -} - -type genericOpt struct { - *socket.Conn -} - -func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil } - -// PathMTU returns a path MTU value for the destination associated -// with the endpoint. -func (c *Conn) PathMTU() (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - so, ok := sockOpts[ssoPathMTU] - if !ok { - return 0, errOpNoSupport - } - _, mtu, err := so.getMTUInfo(c.Conn) - if err != nil { - return 0, err - } - return mtu, nil -} - -// NewConn returns a new Conn. -func NewConn(c net.Conn) *Conn { - cc, _ := socket.NewConn(c) - return &Conn{ - genericOpt: genericOpt{Conn: cc}, - } -} - -// A PacketConn represents a packet network endpoint that uses IPv6 -// transport. It is used to control several IP-level socket options -// including IPv6 header manipulation. It also provides datagram -// based network I/O methods specific to the IPv6 and higher layer -// protocols such as OSPF, GRE, and UDP. -type PacketConn struct { - genericOpt - dgramOpt - payloadHandler -} - -type dgramOpt struct { - *socket.Conn -} - -func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil } - -// SetControlMessage allows to receive the per packet basis IP-level -// socket options. -func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on) -} - -// SetDeadline sets the read and write deadlines associated with the -// endpoint. -func (c *PacketConn) SetDeadline(t time.Time) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.SetDeadline(t) -} - -// SetReadDeadline sets the read deadline associated with the -// endpoint. -func (c *PacketConn) SetReadDeadline(t time.Time) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.SetReadDeadline(t) -} - -// SetWriteDeadline sets the write deadline associated with the -// endpoint. -func (c *PacketConn) SetWriteDeadline(t time.Time) error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.SetWriteDeadline(t) -} - -// Close closes the endpoint. -func (c *PacketConn) Close() error { - if !c.payloadHandler.ok() { - return syscall.EINVAL - } - return c.payloadHandler.Close() -} - -// NewPacketConn returns a new PacketConn using c as its underlying -// transport. -func NewPacketConn(c net.PacketConn) *PacketConn { - cc, _ := socket.NewConn(c.(net.Conn)) - return &PacketConn{ - genericOpt: genericOpt{Conn: cc}, - dgramOpt: dgramOpt{Conn: cc}, - payloadHandler: payloadHandler{PacketConn: c, Conn: cc}, - } -} diff --git a/deps/golang.org/x/net/ipv6/example_test.go b/deps/golang.org/x/net/ipv6/example_test.go deleted file mode 100644 index e761aa2a1..000000000 --- a/deps/golang.org/x/net/ipv6/example_test.go +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "fmt" - "log" - "net" - "os" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/ipv6" -) - -func ExampleConn_markingTCP() { - ln, err := net.Listen("tcp", "[::]:1024") - if err != nil { - log.Fatal(err) - } - defer ln.Close() - - for { - c, err := ln.Accept() - if err != nil { - log.Fatal(err) - } - go func(c net.Conn) { - defer c.Close() - if c.RemoteAddr().(*net.TCPAddr).IP.To16() != nil && c.RemoteAddr().(*net.TCPAddr).IP.To4() == nil { - p := ipv6.NewConn(c) - if err := p.SetTrafficClass(0x28); err != nil { // DSCP AF11 - log.Fatal(err) - } - if err := p.SetHopLimit(128); err != nil { - log.Fatal(err) - } - } - if _, err := c.Write([]byte("HELLO-R-U-THERE-ACK")); err != nil { - log.Fatal(err) - } - }(c) - } -} - -func ExamplePacketConn_servingOneShotMulticastDNS() { - c, err := net.ListenPacket("udp6", "[::]:5353") // mDNS over UDP - if err != nil { - log.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - - en0, err := net.InterfaceByName("en0") - if err != nil { - log.Fatal(err) - } - mDNSLinkLocal := net.UDPAddr{IP: net.ParseIP("ff02::fb")} - if err := p.JoinGroup(en0, &mDNSLinkLocal); err != nil { - log.Fatal(err) - } - defer p.LeaveGroup(en0, &mDNSLinkLocal) - if err := p.SetControlMessage(ipv6.FlagDst|ipv6.FlagInterface, true); err != nil { - log.Fatal(err) - } - - var wcm ipv6.ControlMessage - b := make([]byte, 1500) - for { - _, rcm, peer, err := p.ReadFrom(b) - if err != nil { - log.Fatal(err) - } - if !rcm.Dst.IsMulticast() || !rcm.Dst.Equal(mDNSLinkLocal.IP) { - continue - } - wcm.IfIndex = rcm.IfIndex - answers := []byte("FAKE-MDNS-ANSWERS") // fake mDNS answers, you need to implement this - if _, err := p.WriteTo(answers, &wcm, peer); err != nil { - log.Fatal(err) - } - } -} - -func ExamplePacketConn_tracingIPPacketRoute() { - // Tracing an IP packet route to www.google.com. - - const host = "www.google.com" - ips, err := net.LookupIP(host) - if err != nil { - log.Fatal(err) - } - var dst net.IPAddr - for _, ip := range ips { - if ip.To16() != nil && ip.To4() == nil { - dst.IP = ip - fmt.Printf("using %v for tracing an IP packet route to %s\n", dst.IP, host) - break - } - } - if dst.IP == nil { - log.Fatal("no AAAA record found") - } - - c, err := net.ListenPacket("ip6:58", "::") // ICMP for IPv6 - if err != nil { - log.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - - if err := p.SetControlMessage(ipv6.FlagHopLimit|ipv6.FlagSrc|ipv6.FlagDst|ipv6.FlagInterface, true); err != nil { - log.Fatal(err) - } - wm := icmp.Message{ - Type: ipv6.ICMPTypeEchoRequest, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, - Data: []byte("HELLO-R-U-THERE"), - }, - } - var f ipv6.ICMPFilter - f.SetAll(true) - f.Accept(ipv6.ICMPTypeTimeExceeded) - f.Accept(ipv6.ICMPTypeEchoReply) - if err := p.SetICMPFilter(&f); err != nil { - log.Fatal(err) - } - - var wcm ipv6.ControlMessage - rb := make([]byte, 1500) - for i := 1; i <= 64; i++ { // up to 64 hops - wm.Body.(*icmp.Echo).Seq = i - wb, err := wm.Marshal(nil) - if err != nil { - log.Fatal(err) - } - - // In the real world usually there are several - // multiple traffic-engineered paths for each hop. - // You may need to probe a few times to each hop. - begin := time.Now() - wcm.HopLimit = i - if _, err := p.WriteTo(wb, &wcm, &dst); err != nil { - log.Fatal(err) - } - if err := p.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil { - log.Fatal(err) - } - n, rcm, peer, err := p.ReadFrom(rb) - if err != nil { - if err, ok := err.(net.Error); ok && err.Timeout() { - fmt.Printf("%v\t*\n", i) - continue - } - log.Fatal(err) - } - rm, err := icmp.ParseMessage(58, rb[:n]) - if err != nil { - log.Fatal(err) - } - rtt := time.Since(begin) - - // In the real world you need to determine whether the - // received message is yours using ControlMessage.Src, - // ControlMesage.Dst, icmp.Echo.ID and icmp.Echo.Seq. - switch rm.Type { - case ipv6.ICMPTypeTimeExceeded: - names, _ := net.LookupAddr(peer.String()) - fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, rcm) - case ipv6.ICMPTypeEchoReply: - names, _ := net.LookupAddr(peer.String()) - fmt.Printf("%d\t%v %+v %v\n\t%+v\n", i, peer, names, rtt, rcm) - return - } - } -} - -func ExamplePacketConn_advertisingOSPFHello() { - c, err := net.ListenPacket("ip6:89", "::") // OSPF for IPv6 - if err != nil { - log.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - - en0, err := net.InterfaceByName("en0") - if err != nil { - log.Fatal(err) - } - allSPFRouters := net.IPAddr{IP: net.ParseIP("ff02::5")} - if err := p.JoinGroup(en0, &allSPFRouters); err != nil { - log.Fatal(err) - } - defer p.LeaveGroup(en0, &allSPFRouters) - - hello := make([]byte, 24) // fake hello data, you need to implement this - ospf := make([]byte, 16) // fake ospf header, you need to implement this - ospf[0] = 3 // version 3 - ospf[1] = 1 // hello packet - ospf = append(ospf, hello...) - if err := p.SetChecksum(true, 12); err != nil { - log.Fatal(err) - } - - cm := ipv6.ControlMessage{ - TrafficClass: 0xc0, // DSCP CS6 - HopLimit: 1, - IfIndex: en0.Index, - } - if _, err := p.WriteTo(ospf, &cm, &allSPFRouters); err != nil { - log.Fatal(err) - } -} diff --git a/deps/golang.org/x/net/ipv6/gen.go b/deps/golang.org/x/net/ipv6/gen.go deleted file mode 100644 index 5885664fb..000000000 --- a/deps/golang.org/x/net/ipv6/gen.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -//go:generate go run gen.go - -// This program generates system adaptation constants and types, -// internet protocol constants and tables by reading template files -// and IANA protocol registries. -package main - -import ( - "bytes" - "encoding/xml" - "fmt" - "go/format" - "io" - "io/ioutil" - "net/http" - "os" - "os/exec" - "runtime" - "strconv" - "strings" -) - -func main() { - if err := genzsys(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - if err := geniana(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - -func genzsys() error { - defs := "defs_" + runtime.GOOS + ".go" - f, err := os.Open(defs) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - f.Close() - cmd := exec.Command("go", "tool", "cgo", "-godefs", defs) - b, err := cmd.Output() - if err != nil { - return err - } - b, err = format.Source(b) - if err != nil { - return err - } - zsys := "zsys_" + runtime.GOOS + ".go" - switch runtime.GOOS { - case "freebsd", "linux": - zsys = "zsys_" + runtime.GOOS + "_" + runtime.GOARCH + ".go" - } - if err := ioutil.WriteFile(zsys, b, 0644); err != nil { - return err - } - return nil -} - -var registries = []struct { - url string - parse func(io.Writer, io.Reader) error -}{ - { - "https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xml", - parseICMPv6Parameters, - }, -} - -func geniana() error { - var bb bytes.Buffer - fmt.Fprintf(&bb, "// go generate gen.go\n") - fmt.Fprintf(&bb, "// Code generated by the command above; DO NOT EDIT.\n\n") - fmt.Fprintf(&bb, "package ipv6\n\n") - for _, r := range registries { - resp, err := http.Get(r.url) - if err != nil { - return err - } - defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - return fmt.Errorf("got HTTP status code %v for %v\n", resp.StatusCode, r.url) - } - if err := r.parse(&bb, resp.Body); err != nil { - return err - } - fmt.Fprintf(&bb, "\n") - } - b, err := format.Source(bb.Bytes()) - if err != nil { - return err - } - if err := ioutil.WriteFile("iana.go", b, 0644); err != nil { - return err - } - return nil -} - -func parseICMPv6Parameters(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var icp icmpv6Parameters - if err := dec.Decode(&icp); err != nil { - return err - } - prs := icp.escape() - fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated) - fmt.Fprintf(w, "const (\n") - for _, pr := range prs { - if pr.Name == "" { - continue - } - fmt.Fprintf(w, "ICMPType%s ICMPType = %d", pr.Name, pr.Value) - fmt.Fprintf(w, "// %s\n", pr.OrigName) - } - fmt.Fprintf(w, ")\n\n") - fmt.Fprintf(w, "// %s, Updated: %s\n", icp.Title, icp.Updated) - fmt.Fprintf(w, "var icmpTypes = map[ICMPType]string{\n") - for _, pr := range prs { - if pr.Name == "" { - continue - } - fmt.Fprintf(w, "%d: %q,\n", pr.Value, strings.ToLower(pr.OrigName)) - } - fmt.Fprintf(w, "}\n") - return nil -} - -type icmpv6Parameters struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - Registries []struct { - Title string `xml:"title"` - Records []struct { - Value string `xml:"value"` - Name string `xml:"name"` - } `xml:"record"` - } `xml:"registry"` -} - -type canonICMPv6ParamRecord struct { - OrigName string - Name string - Value int -} - -func (icp *icmpv6Parameters) escape() []canonICMPv6ParamRecord { - id := -1 - for i, r := range icp.Registries { - if strings.Contains(r.Title, "Type") || strings.Contains(r.Title, "type") { - id = i - break - } - } - if id < 0 { - return nil - } - prs := make([]canonICMPv6ParamRecord, len(icp.Registries[id].Records)) - sr := strings.NewReplacer( - "Messages", "", - "Message", "", - "ICMP", "", - "+", "P", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, pr := range icp.Registries[id].Records { - if strings.Contains(pr.Name, "Reserved") || - strings.Contains(pr.Name, "Unassigned") || - strings.Contains(pr.Name, "Deprecated") || - strings.Contains(pr.Name, "Experiment") || - strings.Contains(pr.Name, "experiment") { - continue - } - ss := strings.Split(pr.Name, "\n") - if len(ss) > 1 { - prs[i].Name = strings.Join(ss, " ") - } else { - prs[i].Name = ss[0] - } - s := strings.TrimSpace(prs[i].Name) - prs[i].OrigName = s - prs[i].Name = sr.Replace(s) - prs[i].Value, _ = strconv.Atoi(pr.Value) - } - return prs -} diff --git a/deps/golang.org/x/net/ipv6/genericopt.go b/deps/golang.org/x/net/ipv6/genericopt.go deleted file mode 100644 index e9dbc2e18..000000000 --- a/deps/golang.org/x/net/ipv6/genericopt.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import "syscall" - -// TrafficClass returns the traffic class field value for outgoing -// packets. -func (c *genericOpt) TrafficClass() (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - so, ok := sockOpts[ssoTrafficClass] - if !ok { - return 0, errOpNoSupport - } - return so.GetInt(c.Conn) -} - -// SetTrafficClass sets the traffic class field value for future -// outgoing packets. -func (c *genericOpt) SetTrafficClass(tclass int) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoTrafficClass] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, tclass) -} - -// HopLimit returns the hop limit field value for outgoing packets. -func (c *genericOpt) HopLimit() (int, error) { - if !c.ok() { - return 0, syscall.EINVAL - } - so, ok := sockOpts[ssoHopLimit] - if !ok { - return 0, errOpNoSupport - } - return so.GetInt(c.Conn) -} - -// SetHopLimit sets the hop limit field value for future outgoing -// packets. -func (c *genericOpt) SetHopLimit(hoplim int) error { - if !c.ok() { - return syscall.EINVAL - } - so, ok := sockOpts[ssoHopLimit] - if !ok { - return errOpNoSupport - } - return so.SetInt(c.Conn, hoplim) -} diff --git a/deps/golang.org/x/net/ipv6/header.go b/deps/golang.org/x/net/ipv6/header.go deleted file mode 100644 index e05cb08b2..000000000 --- a/deps/golang.org/x/net/ipv6/header.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "encoding/binary" - "fmt" - "net" -) - -const ( - Version = 6 // protocol version - HeaderLen = 40 // header length -) - -// A Header represents an IPv6 base header. -type Header struct { - Version int // protocol version - TrafficClass int // traffic class - FlowLabel int // flow label - PayloadLen int // payload length - NextHeader int // next header - HopLimit int // hop limit - Src net.IP // source address - Dst net.IP // destination address -} - -func (h *Header) String() string { - if h == nil { - return "" - } - return fmt.Sprintf("ver=%d tclass=%#x flowlbl=%#x payloadlen=%d nxthdr=%d hoplim=%d src=%v dst=%v", h.Version, h.TrafficClass, h.FlowLabel, h.PayloadLen, h.NextHeader, h.HopLimit, h.Src, h.Dst) -} - -// ParseHeader parses b as an IPv6 base header. -func ParseHeader(b []byte) (*Header, error) { - if len(b) < HeaderLen { - return nil, errHeaderTooShort - } - h := &Header{ - Version: int(b[0]) >> 4, - TrafficClass: int(b[0]&0x0f)<<4 | int(b[1])>>4, - FlowLabel: int(b[1]&0x0f)<<16 | int(b[2])<<8 | int(b[3]), - PayloadLen: int(binary.BigEndian.Uint16(b[4:6])), - NextHeader: int(b[6]), - HopLimit: int(b[7]), - } - h.Src = make(net.IP, net.IPv6len) - copy(h.Src, b[8:24]) - h.Dst = make(net.IP, net.IPv6len) - copy(h.Dst, b[24:40]) - return h, nil -} diff --git a/deps/golang.org/x/net/ipv6/header_test.go b/deps/golang.org/x/net/ipv6/header_test.go deleted file mode 100644 index ca11dc23d..000000000 --- a/deps/golang.org/x/net/ipv6/header_test.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "net" - "reflect" - "strings" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/ipv6" -) - -var ( - wireHeaderFromKernel = [ipv6.HeaderLen]byte{ - 0x69, 0x8b, 0xee, 0xf1, - 0xca, 0xfe, 0x2c, 0x01, - 0x20, 0x01, 0x0d, 0xb8, - 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - 0x20, 0x01, 0x0d, 0xb8, - 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - } - - testHeader = &ipv6.Header{ - Version: ipv6.Version, - TrafficClass: iana.DiffServAF43, - FlowLabel: 0xbeef1, - PayloadLen: 0xcafe, - NextHeader: iana.ProtocolIPv6Frag, - HopLimit: 1, - Src: net.ParseIP("2001:db8:1::1"), - Dst: net.ParseIP("2001:db8:2::1"), - } -) - -func TestParseHeader(t *testing.T) { - h, err := ipv6.ParseHeader(wireHeaderFromKernel[:]) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(h, testHeader) { - t.Fatalf("got %#v; want %#v", h, testHeader) - } - s := h.String() - if strings.Contains(s, ",") { - t.Fatalf("should be space-separated values: %s", s) - } -} diff --git a/deps/golang.org/x/net/ipv6/helper.go b/deps/golang.org/x/net/ipv6/helper.go deleted file mode 100644 index 259740132..000000000 --- a/deps/golang.org/x/net/ipv6/helper.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "errors" - "net" -) - -var ( - errMissingAddress = errors.New("missing address") - errHeaderTooShort = errors.New("header too short") - errInvalidConnType = errors.New("invalid conn type") - errOpNoSupport = errors.New("operation not supported") - errNoSuchInterface = errors.New("no such interface") -) - -func boolint(b bool) int { - if b { - return 1 - } - return 0 -} - -func netAddrToIP16(a net.Addr) net.IP { - switch v := a.(type) { - case *net.UDPAddr: - if ip := v.IP.To16(); ip != nil && ip.To4() == nil { - return ip - } - case *net.IPAddr: - if ip := v.IP.To16(); ip != nil && ip.To4() == nil { - return ip - } - } - return nil -} - -func opAddr(a net.Addr) net.Addr { - switch a.(type) { - case *net.TCPAddr: - if a == nil { - return nil - } - case *net.UDPAddr: - if a == nil { - return nil - } - case *net.IPAddr: - if a == nil { - return nil - } - } - return a -} diff --git a/deps/golang.org/x/net/ipv6/iana.go b/deps/golang.org/x/net/ipv6/iana.go deleted file mode 100644 index 32db1aa94..000000000 --- a/deps/golang.org/x/net/ipv6/iana.go +++ /dev/null @@ -1,86 +0,0 @@ -// go generate gen.go -// Code generated by the command above; DO NOT EDIT. - -package ipv6 - -// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2018-03-09 -const ( - ICMPTypeDestinationUnreachable ICMPType = 1 // Destination Unreachable - ICMPTypePacketTooBig ICMPType = 2 // Packet Too Big - ICMPTypeTimeExceeded ICMPType = 3 // Time Exceeded - ICMPTypeParameterProblem ICMPType = 4 // Parameter Problem - ICMPTypeEchoRequest ICMPType = 128 // Echo Request - ICMPTypeEchoReply ICMPType = 129 // Echo Reply - ICMPTypeMulticastListenerQuery ICMPType = 130 // Multicast Listener Query - ICMPTypeMulticastListenerReport ICMPType = 131 // Multicast Listener Report - ICMPTypeMulticastListenerDone ICMPType = 132 // Multicast Listener Done - ICMPTypeRouterSolicitation ICMPType = 133 // Router Solicitation - ICMPTypeRouterAdvertisement ICMPType = 134 // Router Advertisement - ICMPTypeNeighborSolicitation ICMPType = 135 // Neighbor Solicitation - ICMPTypeNeighborAdvertisement ICMPType = 136 // Neighbor Advertisement - ICMPTypeRedirect ICMPType = 137 // Redirect Message - ICMPTypeRouterRenumbering ICMPType = 138 // Router Renumbering - ICMPTypeNodeInformationQuery ICMPType = 139 // ICMP Node Information Query - ICMPTypeNodeInformationResponse ICMPType = 140 // ICMP Node Information Response - ICMPTypeInverseNeighborDiscoverySolicitation ICMPType = 141 // Inverse Neighbor Discovery Solicitation Message - ICMPTypeInverseNeighborDiscoveryAdvertisement ICMPType = 142 // Inverse Neighbor Discovery Advertisement Message - ICMPTypeVersion2MulticastListenerReport ICMPType = 143 // Version 2 Multicast Listener Report - ICMPTypeHomeAgentAddressDiscoveryRequest ICMPType = 144 // Home Agent Address Discovery Request Message - ICMPTypeHomeAgentAddressDiscoveryReply ICMPType = 145 // Home Agent Address Discovery Reply Message - ICMPTypeMobilePrefixSolicitation ICMPType = 146 // Mobile Prefix Solicitation - ICMPTypeMobilePrefixAdvertisement ICMPType = 147 // Mobile Prefix Advertisement - ICMPTypeCertificationPathSolicitation ICMPType = 148 // Certification Path Solicitation Message - ICMPTypeCertificationPathAdvertisement ICMPType = 149 // Certification Path Advertisement Message - ICMPTypeMulticastRouterAdvertisement ICMPType = 151 // Multicast Router Advertisement - ICMPTypeMulticastRouterSolicitation ICMPType = 152 // Multicast Router Solicitation - ICMPTypeMulticastRouterTermination ICMPType = 153 // Multicast Router Termination - ICMPTypeFMIPv6 ICMPType = 154 // FMIPv6 Messages - ICMPTypeRPLControl ICMPType = 155 // RPL Control Message - ICMPTypeILNPv6LocatorUpdate ICMPType = 156 // ILNPv6 Locator Update Message - ICMPTypeDuplicateAddressRequest ICMPType = 157 // Duplicate Address Request - ICMPTypeDuplicateAddressConfirmation ICMPType = 158 // Duplicate Address Confirmation - ICMPTypeMPLControl ICMPType = 159 // MPL Control Message - ICMPTypeExtendedEchoRequest ICMPType = 160 // Extended Echo Request - ICMPTypeExtendedEchoReply ICMPType = 161 // Extended Echo Reply -) - -// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2018-03-09 -var icmpTypes = map[ICMPType]string{ - 1: "destination unreachable", - 2: "packet too big", - 3: "time exceeded", - 4: "parameter problem", - 128: "echo request", - 129: "echo reply", - 130: "multicast listener query", - 131: "multicast listener report", - 132: "multicast listener done", - 133: "router solicitation", - 134: "router advertisement", - 135: "neighbor solicitation", - 136: "neighbor advertisement", - 137: "redirect message", - 138: "router renumbering", - 139: "icmp node information query", - 140: "icmp node information response", - 141: "inverse neighbor discovery solicitation message", - 142: "inverse neighbor discovery advertisement message", - 143: "version 2 multicast listener report", - 144: "home agent address discovery request message", - 145: "home agent address discovery reply message", - 146: "mobile prefix solicitation", - 147: "mobile prefix advertisement", - 148: "certification path solicitation message", - 149: "certification path advertisement message", - 151: "multicast router advertisement", - 152: "multicast router solicitation", - 153: "multicast router termination", - 154: "fmipv6 messages", - 155: "rpl control message", - 156: "ilnpv6 locator update message", - 157: "duplicate address request", - 158: "duplicate address confirmation", - 159: "mpl control message", - 160: "extended echo request", - 161: "extended echo reply", -} diff --git a/deps/golang.org/x/net/ipv6/icmp.go b/deps/golang.org/x/net/ipv6/icmp.go deleted file mode 100644 index b7f48e27b..000000000 --- a/deps/golang.org/x/net/ipv6/icmp.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import "golang.org/x/net/internal/iana" - -// BUG(mikio): On Windows, methods related to ICMPFilter are not -// implemented. - -// An ICMPType represents a type of ICMP message. -type ICMPType int - -func (typ ICMPType) String() string { - s, ok := icmpTypes[typ] - if !ok { - return "" - } - return s -} - -// Protocol returns the ICMPv6 protocol number. -func (typ ICMPType) Protocol() int { - return iana.ProtocolIPv6ICMP -} - -// An ICMPFilter represents an ICMP message filter for incoming -// packets. The filter belongs to a packet delivery path on a host and -// it cannot interact with forwarding packets or tunnel-outer packets. -// -// Note: RFC 8200 defines a reasonable role model. A node means a -// device that implements IP. A router means a node that forwards IP -// packets not explicitly addressed to itself, and a host means a node -// that is not a router. -type ICMPFilter struct { - icmpv6Filter -} - -// Accept accepts incoming ICMP packets including the type field value -// typ. -func (f *ICMPFilter) Accept(typ ICMPType) { - f.accept(typ) -} - -// Block blocks incoming ICMP packets including the type field value -// typ. -func (f *ICMPFilter) Block(typ ICMPType) { - f.block(typ) -} - -// SetAll sets the filter action to the filter. -func (f *ICMPFilter) SetAll(block bool) { - f.setAll(block) -} - -// WillBlock reports whether the ICMP type will be blocked. -func (f *ICMPFilter) WillBlock(typ ICMPType) bool { - return f.willBlock(typ) -} diff --git a/deps/golang.org/x/net/ipv6/icmp_bsd.go b/deps/golang.org/x/net/ipv6/icmp_bsd.go deleted file mode 100644 index e1a791de4..000000000 --- a/deps/golang.org/x/net/ipv6/icmp_bsd.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package ipv6 - -func (f *icmpv6Filter) accept(typ ICMPType) { - f.Filt[typ>>5] |= 1 << (uint32(typ) & 31) -} - -func (f *icmpv6Filter) block(typ ICMPType) { - f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31) -} - -func (f *icmpv6Filter) setAll(block bool) { - for i := range f.Filt { - if block { - f.Filt[i] = 0 - } else { - f.Filt[i] = 1<<32 - 1 - } - } -} - -func (f *icmpv6Filter) willBlock(typ ICMPType) bool { - return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 -} diff --git a/deps/golang.org/x/net/ipv6/icmp_linux.go b/deps/golang.org/x/net/ipv6/icmp_linux.go deleted file mode 100644 index 647f6b44f..000000000 --- a/deps/golang.org/x/net/ipv6/icmp_linux.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -func (f *icmpv6Filter) accept(typ ICMPType) { - f.Data[typ>>5] &^= 1 << (uint32(typ) & 31) -} - -func (f *icmpv6Filter) block(typ ICMPType) { - f.Data[typ>>5] |= 1 << (uint32(typ) & 31) -} - -func (f *icmpv6Filter) setAll(block bool) { - for i := range f.Data { - if block { - f.Data[i] = 1<<32 - 1 - } else { - f.Data[i] = 0 - } - } -} - -func (f *icmpv6Filter) willBlock(typ ICMPType) bool { - return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0 -} diff --git a/deps/golang.org/x/net/ipv6/icmp_solaris.go b/deps/golang.org/x/net/ipv6/icmp_solaris.go deleted file mode 100644 index 7c23bb1cf..000000000 --- a/deps/golang.org/x/net/ipv6/icmp_solaris.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -func (f *icmpv6Filter) accept(typ ICMPType) { - f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31) -} - -func (f *icmpv6Filter) block(typ ICMPType) { - f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31) -} - -func (f *icmpv6Filter) setAll(block bool) { - for i := range f.X__icmp6_filt { - if block { - f.X__icmp6_filt[i] = 0 - } else { - f.X__icmp6_filt[i] = 1<<32 - 1 - } - } -} - -func (f *icmpv6Filter) willBlock(typ ICMPType) bool { - return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 -} diff --git a/deps/golang.org/x/net/ipv6/icmp_stub.go b/deps/golang.org/x/net/ipv6/icmp_stub.go deleted file mode 100644 index c4b9be6db..000000000 --- a/deps/golang.org/x/net/ipv6/icmp_stub.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv6 - -type icmpv6Filter struct { -} - -func (f *icmpv6Filter) accept(typ ICMPType) { -} - -func (f *icmpv6Filter) block(typ ICMPType) { -} - -func (f *icmpv6Filter) setAll(block bool) { -} - -func (f *icmpv6Filter) willBlock(typ ICMPType) bool { - return false -} diff --git a/deps/golang.org/x/net/ipv6/icmp_test.go b/deps/golang.org/x/net/ipv6/icmp_test.go deleted file mode 100644 index bdde2fdbe..000000000 --- a/deps/golang.org/x/net/ipv6/icmp_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "net" - "reflect" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -var icmpStringTests = []struct { - in ipv6.ICMPType - out string -}{ - {ipv6.ICMPTypeDestinationUnreachable, "destination unreachable"}, - - {256, ""}, -} - -func TestICMPString(t *testing.T) { - for _, tt := range icmpStringTests { - s := tt.in.String() - if s != tt.out { - t.Errorf("got %s; want %s", s, tt.out) - } - } -} - -func TestICMPFilter(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - - var f ipv6.ICMPFilter - for _, toggle := range []bool{false, true} { - f.SetAll(toggle) - for _, typ := range []ipv6.ICMPType{ - ipv6.ICMPTypeDestinationUnreachable, - ipv6.ICMPTypeEchoReply, - ipv6.ICMPTypeNeighborSolicitation, - ipv6.ICMPTypeDuplicateAddressConfirmation, - } { - f.Accept(typ) - if f.WillBlock(typ) { - t.Errorf("ipv6.ICMPFilter.Set(%v, false) failed", typ) - } - f.Block(typ) - if !f.WillBlock(typ) { - t.Errorf("ipv6.ICMPFilter.Set(%v, true) failed", typ) - } - } - } -} - -func TestSetICMPFilter(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - c, err := net.ListenPacket("ip6:ipv6-icmp", "::1") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - p := ipv6.NewPacketConn(c) - - var f ipv6.ICMPFilter - f.SetAll(true) - f.Accept(ipv6.ICMPTypeEchoRequest) - f.Accept(ipv6.ICMPTypeEchoReply) - if err := p.SetICMPFilter(&f); err != nil { - t.Fatal(err) - } - kf, err := p.ICMPFilter() - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(kf, &f) { - t.Fatalf("got %#v; want %#v", kf, f) - } -} diff --git a/deps/golang.org/x/net/ipv6/icmp_windows.go b/deps/golang.org/x/net/ipv6/icmp_windows.go deleted file mode 100644 index 443cd0736..000000000 --- a/deps/golang.org/x/net/ipv6/icmp_windows.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -func (f *icmpv6Filter) accept(typ ICMPType) { - // TODO(mikio): implement this -} - -func (f *icmpv6Filter) block(typ ICMPType) { - // TODO(mikio): implement this -} - -func (f *icmpv6Filter) setAll(block bool) { - // TODO(mikio): implement this -} - -func (f *icmpv6Filter) willBlock(typ ICMPType) bool { - // TODO(mikio): implement this - return false -} diff --git a/deps/golang.org/x/net/ipv6/mocktransponder_test.go b/deps/golang.org/x/net/ipv6/mocktransponder_test.go deleted file mode 100644 index 6efe56c68..000000000 --- a/deps/golang.org/x/net/ipv6/mocktransponder_test.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "net" - "testing" -) - -func connector(t *testing.T, network, addr string, done chan<- bool) { - defer func() { done <- true }() - - c, err := net.Dial(network, addr) - if err != nil { - t.Error(err) - return - } - c.Close() -} - -func acceptor(t *testing.T, ln net.Listener, done chan<- bool) { - defer func() { done <- true }() - - c, err := ln.Accept() - if err != nil { - t.Error(err) - return - } - c.Close() -} diff --git a/deps/golang.org/x/net/ipv6/multicast_test.go b/deps/golang.org/x/net/ipv6/multicast_test.go deleted file mode 100644 index 50442c368..000000000 --- a/deps/golang.org/x/net/ipv6/multicast_test.go +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "bytes" - "net" - "os" - "runtime" - "testing" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -var packetConnReadWriteMulticastUDPTests = []struct { - addr string - grp, src *net.UDPAddr -}{ - {"[ff02::]:0", &net.UDPAddr{IP: net.ParseIP("ff02::114")}, nil}, // see RFC 4727 - - {"[ff30::8000:0]:0", &net.UDPAddr{IP: net.ParseIP("ff30::8000:1")}, &net.UDPAddr{IP: net.IPv6loopback}}, // see RFC 5771 -} - -func TestPacketConnReadWriteMulticastUDP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - if !nettest.SupportsIPv6MulticastDeliveryOnLoopback() { - t.Skipf("multicast delivery doesn't work correctly on %s", runtime.GOOS) - } - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - for _, tt := range packetConnReadWriteMulticastUDPTests { - c, err := net.ListenPacket("udp6", tt.addr) - if err != nil { - t.Fatal(err) - } - defer c.Close() - - grp := *tt.grp - grp.Port = c.LocalAddr().(*net.UDPAddr).Port - p := ipv6.NewPacketConn(c) - defer p.Close() - if tt.src == nil { - if err := p.JoinGroup(ifi, &grp); err != nil { - t.Fatal(err) - } - defer p.LeaveGroup(ifi, &grp) - } else { - if err := p.JoinSourceSpecificGroup(ifi, &grp, tt.src); err != nil { - switch runtime.GOOS { - case "freebsd", "linux": - default: // platforms that don't support MLDv2 fail here - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - defer p.LeaveSourceSpecificGroup(ifi, &grp, tt.src) - } - if err := p.SetMulticastInterface(ifi); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastInterface(); err != nil { - t.Fatal(err) - } - if err := p.SetMulticastLoopback(true); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastLoopback(); err != nil { - t.Fatal(err) - } - - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - Src: net.IPv6loopback, - IfIndex: ifi.Index, - } - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - wb := []byte("HELLO-R-U-THERE") - - for i, toggle := range []bool{true, false, true} { - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil { - t.Fatal(err) - } - cm.HopLimit = i + 1 - if n, err := p.WriteTo(wb, &cm, &grp); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatal(err) - } - rb := make([]byte, 128) - if n, _, _, err := p.ReadFrom(rb); err != nil { - t.Fatal(err) - } else if !bytes.Equal(rb[:n], wb) { - t.Fatalf("got %v; want %v", rb[:n], wb) - } - } - } -} - -var packetConnReadWriteMulticastICMPTests = []struct { - grp, src *net.IPAddr -}{ - {&net.IPAddr{IP: net.ParseIP("ff02::114")}, nil}, // see RFC 4727 - - {&net.IPAddr{IP: net.ParseIP("ff30::8000:1")}, &net.IPAddr{IP: net.IPv6loopback}}, // see RFC 5771 -} - -func TestPacketConnReadWriteMulticastICMP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - if !nettest.SupportsIPv6MulticastDeliveryOnLoopback() { - t.Skipf("multicast delivery doesn't work correctly on %s", runtime.GOOS) - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - for _, tt := range packetConnReadWriteMulticastICMPTests { - c, err := net.ListenPacket("ip6:ipv6-icmp", "::") - if err != nil { - t.Fatal(err) - } - defer c.Close() - - pshicmp := icmp.IPv6PseudoHeader(c.LocalAddr().(*net.IPAddr).IP, tt.grp.IP) - p := ipv6.NewPacketConn(c) - defer p.Close() - if tt.src == nil { - if err := p.JoinGroup(ifi, tt.grp); err != nil { - t.Fatal(err) - } - defer p.LeaveGroup(ifi, tt.grp) - } else { - if err := p.JoinSourceSpecificGroup(ifi, tt.grp, tt.src); err != nil { - switch runtime.GOOS { - case "freebsd", "linux": - default: // platforms that don't support MLDv2 fail here - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - defer p.LeaveSourceSpecificGroup(ifi, tt.grp, tt.src) - } - if err := p.SetMulticastInterface(ifi); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastInterface(); err != nil { - t.Fatal(err) - } - if err := p.SetMulticastLoopback(true); err != nil { - t.Fatal(err) - } - if _, err := p.MulticastLoopback(); err != nil { - t.Fatal(err) - } - - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - Src: net.IPv6loopback, - IfIndex: ifi.Index, - } - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - - var f ipv6.ICMPFilter - f.SetAll(true) - f.Accept(ipv6.ICMPTypeEchoReply) - if err := p.SetICMPFilter(&f); err != nil { - t.Fatal(err) - } - - var psh []byte - for i, toggle := range []bool{true, false, true} { - if toggle { - psh = nil - if err := p.SetChecksum(true, 2); err != nil { - // Solaris never allows to - // modify ICMP properties. - if runtime.GOOS != "solaris" { - t.Fatal(err) - } - } - } else { - psh = pshicmp - // Some platforms never allow to - // disable the kernel checksum - // processing. - p.SetChecksum(false, -1) - } - wb, err := (&icmp.Message{ - Type: ipv6.ICMPTypeEchoRequest, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: i + 1, - Data: []byte("HELLO-R-U-THERE"), - }, - }).Marshal(psh) - if err != nil { - t.Fatal(err) - } - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - if err := p.SetDeadline(time.Now().Add(200 * time.Millisecond)); err != nil { - t.Fatal(err) - } - cm.HopLimit = i + 1 - if n, err := p.WriteTo(wb, &cm, tt.grp); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatalf("got %v; want %v", n, len(wb)) - } - rb := make([]byte, 128) - if n, _, _, err := p.ReadFrom(rb); err != nil { - switch runtime.GOOS { - case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } else { - if m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, rb[:n]); err != nil { - t.Fatal(err) - } else if m.Type != ipv6.ICMPTypeEchoReply || m.Code != 0 { - t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv6.ICMPTypeEchoReply, 0) - } - } - } - } -} diff --git a/deps/golang.org/x/net/ipv6/multicastlistener_test.go b/deps/golang.org/x/net/ipv6/multicastlistener_test.go deleted file mode 100644 index 1ee0549d7..000000000 --- a/deps/golang.org/x/net/ipv6/multicastlistener_test.go +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -var udpMultipleGroupListenerTests = []net.Addr{ - &net.UDPAddr{IP: net.ParseIP("ff02::114")}, // see RFC 4727 - &net.UDPAddr{IP: net.ParseIP("ff02::1:114")}, - &net.UDPAddr{IP: net.ParseIP("ff02::2:114")}, -} - -func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - for _, gaddr := range udpMultipleGroupListenerTests { - c, err := net.ListenPacket("udp6", "[::]:0") // wildcard address with non-reusable port - if err != nil { - t.Fatal(err) - } - defer c.Close() - - p := ipv6.NewPacketConn(c) - var mift []*net.Interface - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - if _, ok := nettest.IsMulticastCapable("ip6", &ifi); !ok { - continue - } - if err := p.JoinGroup(&ifi, gaddr); err != nil { - t.Fatal(err) - } - mift = append(mift, &ift[i]) - } - for _, ifi := range mift { - if err := p.LeaveGroup(ifi, gaddr); err != nil { - t.Fatal(err) - } - } - } -} - -func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - for _, gaddr := range udpMultipleGroupListenerTests { - c1, err := net.ListenPacket("udp6", "[ff02::]:0") // wildcard address with reusable port - if err != nil { - t.Fatal(err) - } - defer c1.Close() - _, port, err := net.SplitHostPort(c1.LocalAddr().String()) - if err != nil { - t.Fatal(err) - } - c2, err := net.ListenPacket("udp6", net.JoinHostPort("ff02::", port)) // wildcard address with reusable port - if err != nil { - t.Fatal(err) - } - defer c2.Close() - - var ps [2]*ipv6.PacketConn - ps[0] = ipv6.NewPacketConn(c1) - ps[1] = ipv6.NewPacketConn(c2) - var mift []*net.Interface - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - if _, ok := nettest.IsMulticastCapable("ip6", &ifi); !ok { - continue - } - for _, p := range ps { - if err := p.JoinGroup(&ifi, gaddr); err != nil { - t.Fatal(err) - } - } - mift = append(mift, &ift[i]) - } - for _, ifi := range mift { - for _, p := range ps { - if err := p.LeaveGroup(ifi, gaddr); err != nil { - t.Fatal(err) - } - } - } - } -} - -func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - gaddr := net.IPAddr{IP: net.ParseIP("ff02::114")} // see RFC 4727 - type ml struct { - c *ipv6.PacketConn - ifi *net.Interface - } - var mlt []*ml - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - port := "0" - for i, ifi := range ift { - ip, ok := nettest.IsMulticastCapable("ip6", &ifi) - if !ok { - continue - } - c, err := net.ListenPacket("udp6", net.JoinHostPort(ip.String()+"%"+ifi.Name, port)) // unicast address with non-reusable port - if err != nil { - // The listen may fail when the serivce is - // already in use, but it's fine because the - // purpose of this is not to test the - // bookkeeping of IP control block inside the - // kernel. - t.Log(err) - continue - } - defer c.Close() - if port == "0" { - _, port, err = net.SplitHostPort(c.LocalAddr().String()) - if err != nil { - t.Fatal(err) - } - } - p := ipv6.NewPacketConn(c) - if err := p.JoinGroup(&ifi, &gaddr); err != nil { - t.Fatal(err) - } - mlt = append(mlt, &ml{p, &ift[i]}) - } - for _, m := range mlt { - if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil { - t.Fatal(err) - } - } -} - -func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - c, err := net.ListenPacket("ip6:ipv6-icmp", "::") // wildcard address - if err != nil { - t.Fatal(err) - } - defer c.Close() - - p := ipv6.NewPacketConn(c) - gaddr := net.IPAddr{IP: net.ParseIP("ff02::114")} // see RFC 4727 - var mift []*net.Interface - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - if _, ok := nettest.IsMulticastCapable("ip6", &ifi); !ok { - continue - } - if err := p.JoinGroup(&ifi, &gaddr); err != nil { - t.Fatal(err) - } - mift = append(mift, &ift[i]) - } - for _, ifi := range mift { - if err := p.LeaveGroup(ifi, &gaddr); err != nil { - t.Fatal(err) - } - } -} - -func TestIPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { - switch runtime.GOOS { - case "darwin", "dragonfly", "openbsd": // platforms that return fe80::1%lo0: bind: can't assign requested address - t.Skipf("not supported on %s", runtime.GOOS) - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - gaddr := net.IPAddr{IP: net.ParseIP("ff02::114")} // see RFC 4727 - type ml struct { - c *ipv6.PacketConn - ifi *net.Interface - } - var mlt []*ml - - ift, err := net.Interfaces() - if err != nil { - t.Fatal(err) - } - for i, ifi := range ift { - ip, ok := nettest.IsMulticastCapable("ip6", &ifi) - if !ok { - continue - } - c, err := net.ListenPacket("ip6:ipv6-icmp", ip.String()+"%"+ifi.Name) // unicast address - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - if err := p.JoinGroup(&ifi, &gaddr); err != nil { - t.Fatal(err) - } - mlt = append(mlt, &ml{p, &ift[i]}) - } - for _, m := range mlt { - if err := m.c.LeaveGroup(m.ifi, &gaddr); err != nil { - t.Fatal(err) - } - } -} diff --git a/deps/golang.org/x/net/ipv6/multicastsockopt_test.go b/deps/golang.org/x/net/ipv6/multicastsockopt_test.go deleted file mode 100644 index 9906e8767..000000000 --- a/deps/golang.org/x/net/ipv6/multicastsockopt_test.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -var packetConnMulticastSocketOptionTests = []struct { - net, proto, addr string - grp, src net.Addr -}{ - {"udp6", "", "[ff02::]:0", &net.UDPAddr{IP: net.ParseIP("ff02::114")}, nil}, // see RFC 4727 - {"ip6", ":ipv6-icmp", "::", &net.IPAddr{IP: net.ParseIP("ff02::115")}, nil}, // see RFC 4727 - - {"udp6", "", "[ff30::8000:0]:0", &net.UDPAddr{IP: net.ParseIP("ff30::8000:1")}, &net.UDPAddr{IP: net.IPv6loopback}}, // see RFC 5771 - {"ip6", ":ipv6-icmp", "::", &net.IPAddr{IP: net.ParseIP("ff30::8000:2")}, &net.IPAddr{IP: net.IPv6loopback}}, // see RFC 5771 -} - -func TestPacketConnMulticastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback) - if ifi == nil { - t.Skipf("not available on %s", runtime.GOOS) - } - - m, ok := nettest.SupportsRawIPSocket() - for _, tt := range packetConnMulticastSocketOptionTests { - if tt.net == "ip6" && !ok { - t.Log(m) - continue - } - c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - defer p.Close() - - if tt.src == nil { - testMulticastSocketOptions(t, p, ifi, tt.grp) - } else { - testSourceSpecificMulticastSocketOptions(t, p, ifi, tt.grp, tt.src) - } - } -} - -type testIPv6MulticastConn interface { - MulticastHopLimit() (int, error) - SetMulticastHopLimit(ttl int) error - MulticastLoopback() (bool, error) - SetMulticastLoopback(bool) error - JoinGroup(*net.Interface, net.Addr) error - LeaveGroup(*net.Interface, net.Addr) error - JoinSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error - LeaveSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error - ExcludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error - IncludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error -} - -func testMulticastSocketOptions(t *testing.T, c testIPv6MulticastConn, ifi *net.Interface, grp net.Addr) { - const hoplim = 255 - if err := c.SetMulticastHopLimit(hoplim); err != nil { - t.Error(err) - return - } - if v, err := c.MulticastHopLimit(); err != nil { - t.Error(err) - return - } else if v != hoplim { - t.Errorf("got %v; want %v", v, hoplim) - return - } - - for _, toggle := range []bool{true, false} { - if err := c.SetMulticastLoopback(toggle); err != nil { - t.Error(err) - return - } - if v, err := c.MulticastLoopback(); err != nil { - t.Error(err) - return - } else if v != toggle { - t.Errorf("got %v; want %v", v, toggle) - return - } - } - - if err := c.JoinGroup(ifi, grp); err != nil { - t.Error(err) - return - } - if err := c.LeaveGroup(ifi, grp); err != nil { - t.Error(err) - return - } -} - -func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv6MulticastConn, ifi *net.Interface, grp, src net.Addr) { - // MCAST_JOIN_GROUP -> MCAST_BLOCK_SOURCE -> MCAST_UNBLOCK_SOURCE -> MCAST_LEAVE_GROUP - if err := c.JoinGroup(ifi, grp); err != nil { - t.Error(err) - return - } - if err := c.ExcludeSourceSpecificGroup(ifi, grp, src); err != nil { - switch runtime.GOOS { - case "freebsd", "linux": - default: // platforms that don't support MLDv2 fail here - t.Logf("not supported on %s", runtime.GOOS) - return - } - t.Error(err) - return - } - if err := c.IncludeSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - if err := c.LeaveGroup(ifi, grp); err != nil { - t.Error(err) - return - } - - // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_SOURCE_GROUP - if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - if err := c.LeaveSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - - // MCAST_JOIN_SOURCE_GROUP -> MCAST_LEAVE_GROUP - if err := c.JoinSourceSpecificGroup(ifi, grp, src); err != nil { - t.Error(err) - return - } - if err := c.LeaveGroup(ifi, grp); err != nil { - t.Error(err) - return - } -} diff --git a/deps/golang.org/x/net/ipv6/payload.go b/deps/golang.org/x/net/ipv6/payload.go deleted file mode 100644 index a8197f169..000000000 --- a/deps/golang.org/x/net/ipv6/payload.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo -// methods of PacketConn is not implemented. - -// A payloadHandler represents the IPv6 datagram payload handler. -type payloadHandler struct { - net.PacketConn - *socket.Conn - rawOpt -} - -func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil } diff --git a/deps/golang.org/x/net/ipv6/payload_cmsg.go b/deps/golang.org/x/net/ipv6/payload_cmsg.go deleted file mode 100644 index 4ee4b062c..000000000 --- a/deps/golang.org/x/net/ipv6/payload_cmsg.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !nacl,!plan9,!windows - -package ipv6 - -import ( - "net" - "syscall" -) - -// ReadFrom reads a payload of the received IPv6 datagram, from the -// endpoint c, copying the payload into b. It returns the number of -// bytes copied into b, the control message cm and the source address -// src of the received datagram. -func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { - if !c.ok() { - return 0, nil, nil, syscall.EINVAL - } - return c.readFrom(b) -} - -// WriteTo writes a payload of the IPv6 datagram, to the destination -// address dst through the endpoint c, copying the payload from b. It -// returns the number of bytes written. The control message cm allows -// the IPv6 header fields and the datagram path to be specified. The -// cm may be nil if control of the outgoing datagram is not required. -func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { - if !c.ok() { - return 0, syscall.EINVAL - } - return c.writeTo(b, cm, dst) -} diff --git a/deps/golang.org/x/net/ipv6/payload_cmsg_go1_8.go b/deps/golang.org/x/net/ipv6/payload_cmsg_go1_8.go deleted file mode 100644 index fdc6c3994..000000000 --- a/deps/golang.org/x/net/ipv6/payload_cmsg_go1_8.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 -// +build !nacl,!plan9,!windows - -package ipv6 - -import "net" - -func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { - c.rawOpt.RLock() - oob := NewControlMessage(c.rawOpt.cflags) - c.rawOpt.RUnlock() - var nn int - switch c := c.PacketConn.(type) { - case *net.UDPConn: - if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil { - return 0, nil, nil, err - } - case *net.IPConn: - if n, nn, _, src, err = c.ReadMsgIP(b, oob); err != nil { - return 0, nil, nil, err - } - default: - return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType} - } - if nn > 0 { - cm = new(ControlMessage) - if err = cm.Parse(oob[:nn]); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - } - if cm != nil { - cm.Src = netAddrToIP16(src) - } - return -} - -func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { - oob := cm.Marshal() - if dst == nil { - return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress} - } - switch c := c.PacketConn.(type) { - case *net.UDPConn: - n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr)) - case *net.IPConn: - n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr)) - default: - return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType} - } - return -} diff --git a/deps/golang.org/x/net/ipv6/payload_cmsg_go1_9.go b/deps/golang.org/x/net/ipv6/payload_cmsg_go1_9.go deleted file mode 100644 index 8f6d02e2f..000000000 --- a/deps/golang.org/x/net/ipv6/payload_cmsg_go1_9.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 -// +build !nacl,!plan9,!windows - -package ipv6 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) { - c.rawOpt.RLock() - m := socket.Message{ - Buffers: [][]byte{b}, - OOB: NewControlMessage(c.rawOpt.cflags), - } - c.rawOpt.RUnlock() - switch c.PacketConn.(type) { - case *net.UDPConn: - if err := c.RecvMsg(&m, 0); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - case *net.IPConn: - if err := c.RecvMsg(&m, 0); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - default: - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType} - } - var cm *ControlMessage - if m.NN > 0 { - cm = new(ControlMessage) - if err := cm.Parse(m.OOB[:m.NN]); err != nil { - return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err} - } - cm.Src = netAddrToIP16(m.Addr) - } - return m.N, cm, m.Addr, nil -} - -func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) { - m := socket.Message{ - Buffers: [][]byte{b}, - OOB: cm.Marshal(), - Addr: dst, - } - err := c.SendMsg(&m, 0) - if err != nil { - err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err} - } - return m.N, err -} diff --git a/deps/golang.org/x/net/ipv6/payload_nocmsg.go b/deps/golang.org/x/net/ipv6/payload_nocmsg.go deleted file mode 100644 index 99a43542b..000000000 --- a/deps/golang.org/x/net/ipv6/payload_nocmsg.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build nacl plan9 windows - -package ipv6 - -import ( - "net" - "syscall" -) - -// ReadFrom reads a payload of the received IPv6 datagram, from the -// endpoint c, copying the payload into b. It returns the number of -// bytes copied into b, the control message cm and the source address -// src of the received datagram. -func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { - if !c.ok() { - return 0, nil, nil, syscall.EINVAL - } - if n, src, err = c.PacketConn.ReadFrom(b); err != nil { - return 0, nil, nil, err - } - return -} - -// WriteTo writes a payload of the IPv6 datagram, to the destination -// address dst through the endpoint c, copying the payload from b. It -// returns the number of bytes written. The control message cm allows -// the IPv6 header fields and the datagram path to be specified. The -// cm may be nil if control of the outgoing datagram is not required. -func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { - if !c.ok() { - return 0, syscall.EINVAL - } - if dst == nil { - return 0, errMissingAddress - } - return c.PacketConn.WriteTo(b, dst) -} diff --git a/deps/golang.org/x/net/ipv6/readwrite_go1_8_test.go b/deps/golang.org/x/net/ipv6/readwrite_go1_8_test.go deleted file mode 100644 index b3fbda13a..000000000 --- a/deps/golang.org/x/net/ipv6/readwrite_go1_8_test.go +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.9 - -package ipv6_test - -import ( - "bytes" - "fmt" - "net" - "runtime" - "strings" - "sync" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -func BenchmarkPacketConnReadWriteUnicast(b *testing.B) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - b.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph := []byte{ - 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - } - greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - bb := make([]byte, 128) - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - HopLimit: 1, - Src: net.IPv6loopback, - } - if ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); ifi != nil { - cm.IfIndex = ifi.Index - } - - b.Run("UDP", func(b *testing.B) { - c, err := nettest.NewLocalPacketListener("udp6") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv6.FlagHopLimit | ipv6.FlagInterface - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(payload, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(payload, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - }) - b.Run("IP", func(b *testing.B) { - switch runtime.GOOS { - case "netbsd": - b.Skip("need to configure gre on netbsd") - case "openbsd": - b.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(datagram, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(datagram, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - }) -} - -func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph := []byte{ - 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - } - greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - - t.Run("UDP", func(t *testing.T) { - c, err := nettest.NewLocalPacketListener("udp6") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr()) - }) - }) - t.Run("IP", func(t *testing.T) { - switch runtime.GOOS { - case "netbsd": - t.Skip("need to configure gre on netbsd") - case "openbsd": - t.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr()) - }) - }) -} - -func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv6.PacketConn, data []byte, dst net.Addr) { - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback) - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - - if err := p.SetControlMessage(cf, true); err != nil { // probe before test - if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %s", runtime.GOOS) - } - t.Fatal(err) - } - - var wg sync.WaitGroup - reader := func() { - defer wg.Done() - b := make([]byte, 128) - n, cm, _, err := p.ReadFrom(b) - if err != nil { - t.Error(err) - return - } - if !bytes.Equal(b[:n], data) { - t.Errorf("got %#v; want %#v", b[:n], data) - return - } - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - return - } - } - writer := func(toggle bool) { - defer wg.Done() - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - HopLimit: 1, - Src: net.IPv6loopback, - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - n, err := p.WriteTo(data, &cm, dst) - if err != nil { - t.Error(err) - return - } - if n != len(data) { - t.Errorf("got %d; want %d", n, len(data)) - return - } - } - - const N = 10 - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Add(2 * N) - for i := 0; i < 2*N; i++ { - go writer(i%2 != 0) - - } - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/ipv6/readwrite_go1_9_test.go b/deps/golang.org/x/net/ipv6/readwrite_go1_9_test.go deleted file mode 100644 index 7110619b8..000000000 --- a/deps/golang.org/x/net/ipv6/readwrite_go1_9_test.go +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.9 - -package ipv6_test - -import ( - "bytes" - "fmt" - "net" - "runtime" - "strings" - "sync" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -func BenchmarkPacketConnReadWriteUnicast(b *testing.B) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - b.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph := []byte{ - 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - } - greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - bb := make([]byte, 128) - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - HopLimit: 1, - Src: net.IPv6loopback, - } - if ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); ifi != nil { - cm.IfIndex = ifi.Index - } - - b.Run("UDP", func(b *testing.B) { - c, err := nettest.NewLocalPacketListener("udp6") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv6.FlagHopLimit | ipv6.FlagInterface - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - wms := []ipv6.Message{ - { - Buffers: [][]byte{payload}, - Addr: dst, - OOB: cm.Marshal(), - }, - } - rms := []ipv6.Message{ - { - Buffers: [][]byte{bb}, - OOB: ipv6.NewControlMessage(cf), - }, - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(payload, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(payload, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("Batch", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteBatch(wms, 0); err != nil { - b.Fatal(err) - } - if _, err := p.ReadBatch(rms, 0); err != nil { - b.Fatal(err) - } - } - }) - }) - b.Run("IP", func(b *testing.B) { - switch runtime.GOOS { - case "netbsd": - b.Skip("need to configure gre on netbsd") - case "openbsd": - b.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - dst := c.LocalAddr() - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - wms := []ipv6.Message{ - { - Buffers: [][]byte{datagram}, - Addr: dst, - OOB: cm.Marshal(), - }, - } - rms := []ipv6.Message{ - { - Buffers: [][]byte{bb}, - OOB: ipv6.NewControlMessage(cf), - }, - } - b.Run("Net", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(datagram, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("ToFrom", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(datagram, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(bb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("Batch", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := p.WriteBatch(wms, 0); err != nil { - b.Fatal(err) - } - if _, err := p.ReadBatch(rms, 0); err != nil { - b.Fatal(err) - } - } - }) - }) -} - -func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - - payload := []byte("HELLO-R-U-THERE") - iph := []byte{ - 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - } - greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00} - datagram := append(greh, append(iph, payload...)...) - - t.Run("UDP", func(t *testing.T) { - c, err := nettest.NewLocalPacketListener("udp6") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), false) - }) - t.Run("Batch", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), true) - }) - }) - t.Run("IP", func(t *testing.T) { - switch runtime.GOOS { - case "netbsd": - t.Skip("need to configure gre on netbsd") - case "openbsd": - t.Skip("net.inet.gre.allow=0 by default on openbsd") - } - - c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1") - if err != nil { - t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - t.Run("ToFrom", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), false) - }) - t.Run("Batch", func(t *testing.T) { - testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), true) - }) - }) -} - -func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv6.PacketConn, data []byte, dst net.Addr, batch bool) { - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback) - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - - if err := p.SetControlMessage(cf, true); err != nil { // probe before test - if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %s", runtime.GOOS) - } - t.Fatal(err) - } - - var wg sync.WaitGroup - reader := func() { - defer wg.Done() - b := make([]byte, 128) - n, cm, _, err := p.ReadFrom(b) - if err != nil { - t.Error(err) - return - } - if !bytes.Equal(b[:n], data) { - t.Errorf("got %#v; want %#v", b[:n], data) - return - } - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - return - } - } - batchReader := func() { - defer wg.Done() - ms := []ipv6.Message{ - { - Buffers: [][]byte{make([]byte, 128)}, - OOB: ipv6.NewControlMessage(cf), - }, - } - n, err := p.ReadBatch(ms, 0) - if err != nil { - t.Error(err) - return - } - if n != len(ms) { - t.Errorf("got %d; want %d", n, len(ms)) - return - } - var cm ipv6.ControlMessage - if err := cm.Parse(ms[0].OOB[:ms[0].NN]); err != nil { - t.Error(err) - return - } - b := ms[0].Buffers[0][:ms[0].N] - if !bytes.Equal(b, data) { - t.Errorf("got %#v; want %#v", b, data) - return - } - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - return - } - } - writer := func(toggle bool) { - defer wg.Done() - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - HopLimit: 1, - Src: net.IPv6loopback, - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - n, err := p.WriteTo(data, &cm, dst) - if err != nil { - t.Error(err) - return - } - if n != len(data) { - t.Errorf("got %d; want %d", n, len(data)) - return - } - } - batchWriter := func(toggle bool) { - defer wg.Done() - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - HopLimit: 1, - Src: net.IPv6loopback, - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - ms := []ipv6.Message{ - { - Buffers: [][]byte{data}, - OOB: cm.Marshal(), - Addr: dst, - }, - } - n, err := p.WriteBatch(ms, 0) - if err != nil { - t.Error(err) - return - } - if n != len(ms) { - t.Errorf("got %d; want %d", n, len(ms)) - return - } - if ms[0].N != len(data) { - t.Errorf("got %d; want %d", ms[0].N, len(data)) - return - } - } - - const N = 10 - wg.Add(N) - for i := 0; i < N; i++ { - if batch { - go batchReader() - } else { - go reader() - } - } - wg.Add(2 * N) - for i := 0; i < 2*N; i++ { - if batch { - go batchWriter(i%2 != 0) - } else { - go writer(i%2 != 0) - } - } - wg.Add(N) - for i := 0; i < N; i++ { - if batch { - go batchReader() - } else { - go reader() - } - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/ipv6/readwrite_test.go b/deps/golang.org/x/net/ipv6/readwrite_test.go deleted file mode 100644 index 668208f22..000000000 --- a/deps/golang.org/x/net/ipv6/readwrite_test.go +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "bytes" - "net" - "runtime" - "strings" - "sync" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -func BenchmarkReadWriteUnicast(b *testing.B) { - c, err := nettest.NewLocalPacketListener("udp6") - if err != nil { - b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err) - } - defer c.Close() - - dst := c.LocalAddr() - wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128) - - b.Run("NetUDP", func(b *testing.B) { - for i := 0; i < b.N; i++ { - if _, err := c.WriteTo(wb, dst); err != nil { - b.Fatal(err) - } - if _, _, err := c.ReadFrom(rb); err != nil { - b.Fatal(err) - } - } - }) - b.Run("IPv6UDP", func(b *testing.B) { - p := ipv6.NewPacketConn(c) - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - if err := p.SetControlMessage(cf, true); err != nil { - b.Fatal(err) - } - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - HopLimit: 1, - } - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback) - if ifi != nil { - cm.IfIndex = ifi.Index - } - - for i := 0; i < b.N; i++ { - if _, err := p.WriteTo(wb, &cm, dst); err != nil { - b.Fatal(err) - } - if _, _, _, err := p.ReadFrom(rb); err != nil { - b.Fatal(err) - } - } - }) -} - -func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - c, err := nettest.NewLocalPacketListener("udp6") - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - defer p.Close() - - dst := c.LocalAddr() - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback) - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - wb := []byte("HELLO-R-U-THERE") - - if err := p.SetControlMessage(cf, true); err != nil { // probe before test - if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %s", runtime.GOOS) - } - t.Fatal(err) - } - - var wg sync.WaitGroup - reader := func() { - defer wg.Done() - rb := make([]byte, 128) - if n, cm, _, err := p.ReadFrom(rb); err != nil { - t.Error(err) - return - } else if !bytes.Equal(rb[:n], wb) { - t.Errorf("got %v; want %v", rb[:n], wb) - return - } else { - s := cm.String() - if strings.Contains(s, ",") { - t.Errorf("should be space-separated values: %s", s) - } - } - } - writer := func(toggle bool) { - defer wg.Done() - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - Src: net.IPv6loopback, - } - if ifi != nil { - cm.IfIndex = ifi.Index - } - if err := p.SetControlMessage(cf, toggle); err != nil { - t.Error(err) - return - } - if n, err := p.WriteTo(wb, &cm, dst); err != nil { - t.Error(err) - return - } else if n != len(wb) { - t.Errorf("got %d; want %d", n, len(wb)) - return - } - } - - const N = 10 - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Add(2 * N) - for i := 0; i < 2*N; i++ { - go writer(i%2 != 0) - } - wg.Add(N) - for i := 0; i < N; i++ { - go reader() - } - wg.Wait() -} diff --git a/deps/golang.org/x/net/ipv6/sockopt.go b/deps/golang.org/x/net/ipv6/sockopt.go deleted file mode 100644 index cc3907df3..000000000 --- a/deps/golang.org/x/net/ipv6/sockopt.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import "golang.org/x/net/internal/socket" - -// Sticky socket options -const ( - ssoTrafficClass = iota // header field for unicast packet, RFC 3542 - ssoHopLimit // header field for unicast packet, RFC 3493 - ssoMulticastInterface // outbound interface for multicast packet, RFC 3493 - ssoMulticastHopLimit // header field for multicast packet, RFC 3493 - ssoMulticastLoopback // loopback for multicast packet, RFC 3493 - ssoReceiveTrafficClass // header field on received packet, RFC 3542 - ssoReceiveHopLimit // header field on received packet, RFC 2292 or 3542 - ssoReceivePacketInfo // incbound or outbound packet path, RFC 2292 or 3542 - ssoReceivePathMTU // path mtu, RFC 3542 - ssoPathMTU // path mtu, RFC 3542 - ssoChecksum // packet checksum, RFC 2292 or 3542 - ssoICMPFilter // icmp filter, RFC 2292 or 3542 - ssoJoinGroup // any-source multicast, RFC 3493 - ssoLeaveGroup // any-source multicast, RFC 3493 - ssoJoinSourceGroup // source-specific multicast - ssoLeaveSourceGroup // source-specific multicast - ssoBlockSourceGroup // any-source or source-specific multicast - ssoUnblockSourceGroup // any-source or source-specific multicast - ssoAttachFilter // attach BPF for filtering inbound traffic -) - -// Sticky socket option value types -const ( - ssoTypeIPMreq = iota + 1 - ssoTypeGroupReq - ssoTypeGroupSourceReq -) - -// A sockOpt represents a binding for sticky socket option. -type sockOpt struct { - socket.Option - typ int // hint for option value type; optional -} diff --git a/deps/golang.org/x/net/ipv6/sockopt_posix.go b/deps/golang.org/x/net/ipv6/sockopt_posix.go deleted file mode 100644 index 0eac86eb8..000000000 --- a/deps/golang.org/x/net/ipv6/sockopt_posix.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package ipv6 - -import ( - "net" - "unsafe" - - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { - n, err := so.GetInt(c) - if err != nil { - return nil, err - } - return net.InterfaceByIndex(n) -} - -func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { - var n int - if ifi != nil { - n = ifi.Index - } - return so.SetInt(c, n) -} - -func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { - b := make([]byte, so.Len) - n, err := so.Get(c, b) - if err != nil { - return nil, err - } - if n != sizeofICMPv6Filter { - return nil, errOpNoSupport - } - return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil -} - -func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { - b := (*[sizeofICMPv6Filter]byte)(unsafe.Pointer(f))[:sizeofICMPv6Filter] - return so.Set(c, b) -} - -func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) { - b := make([]byte, so.Len) - n, err := so.Get(c, b) - if err != nil { - return nil, 0, err - } - if n != sizeofIPv6Mtuinfo { - return nil, 0, errOpNoSupport - } - mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0])) - if mi.Addr.Scope_id == 0 { - return nil, int(mi.Mtu), nil - } - ifi, err := net.InterfaceByIndex(int(mi.Addr.Scope_id)) - if err != nil { - return nil, 0, err - } - return ifi, int(mi.Mtu), nil -} - -func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - switch so.typ { - case ssoTypeIPMreq: - return so.setIPMreq(c, ifi, grp) - case ssoTypeGroupReq: - return so.setGroupReq(c, ifi, grp) - default: - return errOpNoSupport - } -} - -func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - return so.setGroupSourceReq(c, ifi, grp, src) -} - -func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { - return so.setAttachFilter(c, f) -} diff --git a/deps/golang.org/x/net/ipv6/sockopt_stub.go b/deps/golang.org/x/net/ipv6/sockopt_stub.go deleted file mode 100644 index 1f4a273e4..000000000 --- a/deps/golang.org/x/net/ipv6/sockopt_stub.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv6 - -import ( - "net" - - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { - return nil, errOpNoSupport -} - -func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { - return errOpNoSupport -} - -func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { - return nil, errOpNoSupport -} - -func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { - return errOpNoSupport -} - -func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) { - return nil, 0, errOpNoSupport -} - -func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - return errOpNoSupport -} - -func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - return errOpNoSupport -} - -func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv6/sockopt_test.go b/deps/golang.org/x/net/ipv6/sockopt_test.go deleted file mode 100644 index add045e3e..000000000 --- a/deps/golang.org/x/net/ipv6/sockopt_test.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "fmt" - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -var supportsIPv6 bool = nettest.SupportsIPv6() - -func TestConnInitiatorPathMTU(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - ln, err := net.Listen("tcp6", "[::1]:0") - if err != nil { - t.Fatal(err) - } - defer ln.Close() - - done := make(chan bool) - go acceptor(t, ln, done) - - c, err := net.Dial("tcp6", ln.Addr().String()) - if err != nil { - t.Fatal(err) - } - defer c.Close() - - if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil { - switch runtime.GOOS { - case "darwin": // older darwin kernels don't support IPV6_PATHMTU option - t.Logf("not supported on %s", runtime.GOOS) - default: - t.Fatal(err) - } - } else { - t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu) - } - - <-done -} - -func TestConnResponderPathMTU(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - ln, err := net.Listen("tcp6", "[::1]:0") - if err != nil { - t.Fatal(err) - } - defer ln.Close() - - done := make(chan bool) - go connector(t, "tcp6", ln.Addr().String(), done) - - c, err := ln.Accept() - if err != nil { - t.Fatal(err) - } - defer c.Close() - - if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil { - switch runtime.GOOS { - case "darwin": // older darwin kernels don't support IPV6_PATHMTU option - t.Logf("not supported on %s", runtime.GOOS) - default: - t.Fatal(err) - } - } else { - t.Logf("path mtu for %v: %v", c.RemoteAddr(), pmtu) - } - - <-done -} - -func TestPacketConnChecksum(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolOSPFIGP), "::") // OSPF for IPv6 - if err != nil { - t.Fatal(err) - } - defer c.Close() - - p := ipv6.NewPacketConn(c) - offset := 12 // see RFC 5340 - - for _, toggle := range []bool{false, true} { - if err := p.SetChecksum(toggle, offset); err != nil { - if toggle { - t.Fatalf("ipv6.PacketConn.SetChecksum(%v, %v) failed: %v", toggle, offset, err) - } else { - // Some platforms never allow to disable the kernel - // checksum processing. - t.Logf("ipv6.PacketConn.SetChecksum(%v, %v) failed: %v", toggle, offset, err) - } - } - if on, offset, err := p.Checksum(); err != nil { - t.Fatal(err) - } else { - t.Logf("kernel checksum processing enabled=%v, offset=%v", on, offset) - } - } -} diff --git a/deps/golang.org/x/net/ipv6/sys_asmreq.go b/deps/golang.org/x/net/ipv6/sys_asmreq.go deleted file mode 100644 index b0510c0b5..000000000 --- a/deps/golang.org/x/net/ipv6/sys_asmreq.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package ipv6 - -import ( - "net" - "unsafe" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - var mreq ipv6Mreq - copy(mreq.Multiaddr[:], grp) - if ifi != nil { - mreq.setIfindex(ifi.Index) - } - b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq] - return so.Set(c, b) -} diff --git a/deps/golang.org/x/net/ipv6/sys_asmreq_stub.go b/deps/golang.org/x/net/ipv6/sys_asmreq_stub.go deleted file mode 100644 index eece96187..000000000 --- a/deps/golang.org/x/net/ipv6/sys_asmreq_stub.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv6 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv6/sys_bpf.go b/deps/golang.org/x/net/ipv6/sys_bpf.go deleted file mode 100644 index b2dbcb2f2..000000000 --- a/deps/golang.org/x/net/ipv6/sys_bpf.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux - -package ipv6 - -import ( - "unsafe" - - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { - prog := sockFProg{ - Len: uint16(len(f)), - Filter: (*sockFilter)(unsafe.Pointer(&f[0])), - } - b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog] - return so.Set(c, b) -} diff --git a/deps/golang.org/x/net/ipv6/sys_bpf_stub.go b/deps/golang.org/x/net/ipv6/sys_bpf_stub.go deleted file mode 100644 index 676bea555..000000000 --- a/deps/golang.org/x/net/ipv6/sys_bpf_stub.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !linux - -package ipv6 - -import ( - "golang.org/x/net/bpf" - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv6/sys_bsd.go b/deps/golang.org/x/net/ipv6/sys_bsd.go deleted file mode 100644 index e416eaa1f..000000000 --- a/deps/golang.org/x/net/ipv6/sys_bsd.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build dragonfly netbsd openbsd - -package ipv6 - -import ( - "net" - "syscall" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, - ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, - ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, - ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}, - ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, - } - - sockOpts = map[int]*sockOpt{ - ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, - ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, - ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, - ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, - ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, - ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, - ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, - ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, - ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, - } -) - -func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], ip) - sa.Scope_id = uint32(i) -} - -func (pi *inet6Pktinfo) setIfindex(i int) { - pi.Ifindex = uint32(i) -} - -func (mreq *ipv6Mreq) setIfindex(i int) { - mreq.Interface = uint32(i) -} diff --git a/deps/golang.org/x/net/ipv6/sys_darwin.go b/deps/golang.org/x/net/ipv6/sys_darwin.go deleted file mode 100644 index e3d044392..000000000 --- a/deps/golang.org/x/net/ipv6/sys_darwin.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - "strconv" - "strings" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlHopLimit: {sysIPV6_2292HOPLIMIT, 4, marshal2292HopLimit, parseHopLimit}, - ctlPacketInfo: {sysIPV6_2292PKTINFO, sizeofInet6Pktinfo, marshal2292PacketInfo, parsePacketInfo}, - } - - sockOpts = map[int]*sockOpt{ - ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, - ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, - ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292HOPLIMIT, Len: 4}}, - ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292PKTINFO, Len: 4}}, - ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, - ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, - } -) - -func init() { - // Seems like kern.osreldate is veiled on latest OS X. We use - // kern.osrelease instead. - s, err := syscall.Sysctl("kern.osrelease") - if err != nil { - return - } - ss := strings.Split(s, ".") - if len(ss) == 0 { - return - } - // The IP_PKTINFO and protocol-independent multicast API were - // introduced in OS X 10.7 (Darwin 11). But it looks like - // those features require OS X 10.8 (Darwin 12) or above. - // See http://support.apple.com/kb/HT1633. - if mjver, err := strconv.Atoi(ss[0]); err != nil || mjver < 12 { - return - } - ctlOpts[ctlTrafficClass] = ctlOpt{sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass} - ctlOpts[ctlHopLimit] = ctlOpt{sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit} - ctlOpts[ctlPacketInfo] = ctlOpt{sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo} - ctlOpts[ctlNextHop] = ctlOpt{sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop} - ctlOpts[ctlPathMTU] = ctlOpt{sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU} - sockOpts[ssoTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}} - sockOpts[ssoReceiveTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}} - sockOpts[ssoReceiveHopLimit] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}} - sockOpts[ssoReceivePacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}} - sockOpts[ssoReceivePathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}} - sockOpts[ssoPathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}} - sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} - sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq} - sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} - sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} - sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} - sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq} -} - -func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], ip) - sa.Scope_id = uint32(i) -} - -func (pi *inet6Pktinfo) setIfindex(i int) { - pi.Ifindex = uint32(i) -} - -func (mreq *ipv6Mreq) setIfindex(i int) { - mreq.Interface = uint32(i) -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) - sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 132)) - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv6/sys_freebsd.go b/deps/golang.org/x/net/ipv6/sys_freebsd.go deleted file mode 100644 index e9349dc2c..000000000 --- a/deps/golang.org/x/net/ipv6/sys_freebsd.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - "runtime" - "strings" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, - ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, - ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, - ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}, - ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, - } - - sockOpts = map[int]sockOpt{ - ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, - ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, - ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, - ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, - ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, - ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, - ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, - ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, - ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - } -) - -func init() { - if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" { - archs, _ := syscall.Sysctl("kern.supported_archs") - for _, s := range strings.Fields(archs) { - if s == "amd64" { - freebsd32o64 = true - break - } - } - } -} - -func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], ip) - sa.Scope_id = uint32(i) -} - -func (pi *inet6Pktinfo) setIfindex(i int) { - pi.Ifindex = uint32(i) -} - -func (mreq *ipv6Mreq) setIfindex(i int) { - mreq.Interface = uint32(i) -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group)) - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group)) - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) - sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source)) - sa.Len = sizeofSockaddrInet6 - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv6/sys_linux.go b/deps/golang.org/x/net/ipv6/sys_linux.go deleted file mode 100644 index bc218103c..000000000 --- a/deps/golang.org/x/net/ipv6/sys_linux.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, - ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, - ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, - ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, - } - - sockOpts = map[int]*sockOpt{ - ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, - ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, - ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, - ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, - ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, - ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, - ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, - ssoChecksum: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysIPV6_CHECKSUM, Len: 4}}, - ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMPV6_FILTER, Len: sizeofICMPv6Filter}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}}, - } -) - -func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], ip) - sa.Scope_id = uint32(i) -} - -func (pi *inet6Pktinfo) setIfindex(i int) { - pi.Ifindex = int32(i) -} - -func (mreq *ipv6Mreq) setIfindex(i int) { - mreq.Ifindex = int32(i) -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(&gr.Group)) - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(&gsr.Group)) - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) - sa = (*sockaddrInet6)(unsafe.Pointer(&gsr.Source)) - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv6/sys_solaris.go b/deps/golang.org/x/net/ipv6/sys_solaris.go deleted file mode 100644 index d348b5f6e..000000000 --- a/deps/golang.org/x/net/ipv6/sys_solaris.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - "syscall" - "unsafe" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -var ( - ctlOpts = [ctlMax]ctlOpt{ - ctlTrafficClass: {sysIPV6_TCLASS, 4, marshalTrafficClass, parseTrafficClass}, - ctlHopLimit: {sysIPV6_HOPLIMIT, 4, marshalHopLimit, parseHopLimit}, - ctlPacketInfo: {sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}, - ctlNextHop: {sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}, - ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}, - } - - sockOpts = map[int]*sockOpt{ - ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}, - ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, - ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, - ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}, - ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}, - ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}, - ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}, - ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}, - ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}}, - ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}, - ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}, - } -) - -func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], ip) - sa.Scope_id = uint32(i) -} - -func (pi *inet6Pktinfo) setIfindex(i int) { - pi.Ifindex = uint32(i) -} - -func (mreq *ipv6Mreq) setIfindex(i int) { - mreq.Interface = uint32(i) -} - -func (gr *groupReq) setGroup(grp net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gr)) + 4)) - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) -} - -func (gsr *groupSourceReq) setSourceGroup(grp, src net.IP) { - sa := (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 4)) - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], grp) - sa = (*sockaddrInet6)(unsafe.Pointer(uintptr(unsafe.Pointer(gsr)) + 260)) - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], src) -} diff --git a/deps/golang.org/x/net/ipv6/sys_ssmreq.go b/deps/golang.org/x/net/ipv6/sys_ssmreq.go deleted file mode 100644 index add8ccc0b..000000000 --- a/deps/golang.org/x/net/ipv6/sys_ssmreq.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin freebsd linux solaris - -package ipv6 - -import ( - "net" - "unsafe" - - "golang.org/x/net/internal/socket" -) - -var freebsd32o64 bool - -func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - var gr groupReq - if ifi != nil { - gr.Interface = uint32(ifi.Index) - } - gr.setGroup(grp) - var b []byte - if freebsd32o64 { - var d [sizeofGroupReq + 4]byte - s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr)) - copy(d[:4], s[:4]) - copy(d[8:], s[4:]) - b = d[:] - } else { - b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq] - } - return so.Set(c, b) -} - -func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - var gsr groupSourceReq - if ifi != nil { - gsr.Interface = uint32(ifi.Index) - } - gsr.setSourceGroup(grp, src) - var b []byte - if freebsd32o64 { - var d [sizeofGroupSourceReq + 4]byte - s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr)) - copy(d[:4], s[:4]) - copy(d[8:], s[4:]) - b = d[:] - } else { - b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq] - } - return so.Set(c, b) -} diff --git a/deps/golang.org/x/net/ipv6/sys_ssmreq_stub.go b/deps/golang.org/x/net/ipv6/sys_ssmreq_stub.go deleted file mode 100644 index 581ee490f..000000000 --- a/deps/golang.org/x/net/ipv6/sys_ssmreq_stub.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!freebsd,!linux,!solaris - -package ipv6 - -import ( - "net" - - "golang.org/x/net/internal/socket" -) - -func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { - return errOpNoSupport -} - -func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { - return errOpNoSupport -} diff --git a/deps/golang.org/x/net/ipv6/sys_stub.go b/deps/golang.org/x/net/ipv6/sys_stub.go deleted file mode 100644 index b845388ea..000000000 --- a/deps/golang.org/x/net/ipv6/sys_stub.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows - -package ipv6 - -var ( - ctlOpts = [ctlMax]ctlOpt{} - - sockOpts = map[int]*sockOpt{} -) diff --git a/deps/golang.org/x/net/ipv6/sys_windows.go b/deps/golang.org/x/net/ipv6/sys_windows.go deleted file mode 100644 index fc36b018b..000000000 --- a/deps/golang.org/x/net/ipv6/sys_windows.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6 - -import ( - "net" - "syscall" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/socket" -) - -const ( - // See ws2tcpip.h. - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - sysIPV6_PKTINFO = 0x13 - - sizeofSockaddrInet6 = 0x1c - - sizeofIPv6Mreq = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofICMPv6Filter = 0 -) - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type icmpv6Filter struct { - // TODO(mikio): implement this -} - -var ( - ctlOpts = [ctlMax]ctlOpt{} - - sockOpts = map[int]*sockOpt{ - ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}}, - ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}}, - ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}}, - ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}}, - ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, - ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq}, - } -) - -func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) { - sa.Family = syscall.AF_INET6 - copy(sa.Addr[:], ip) - sa.Scope_id = uint32(i) -} - -func (mreq *ipv6Mreq) setIfindex(i int) { - mreq.Interface = uint32(i) -} diff --git a/deps/golang.org/x/net/ipv6/unicast_test.go b/deps/golang.org/x/net/ipv6/unicast_test.go deleted file mode 100644 index 159bb39b9..000000000 --- a/deps/golang.org/x/net/ipv6/unicast_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "bytes" - "net" - "os" - "runtime" - "testing" - "time" - - "golang.org/x/net/icmp" - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -func TestPacketConnReadWriteUnicastUDP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - c, err := nettest.NewLocalPacketListener("udp6") - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - defer p.Close() - - dst := c.LocalAddr() - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - Src: net.IPv6loopback, - } - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback) - if ifi != nil { - cm.IfIndex = ifi.Index - } - wb := []byte("HELLO-R-U-THERE") - - for i, toggle := range []bool{true, false, true} { - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - cm.HopLimit = i + 1 - if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, err := p.WriteTo(wb, &cm, dst); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatalf("got %v; want %v", n, len(wb)) - } - rb := make([]byte, 128) - if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, _, _, err := p.ReadFrom(rb); err != nil { - t.Fatal(err) - } else if !bytes.Equal(rb[:n], wb) { - t.Fatalf("got %v; want %v", rb[:n], wb) - } - } -} - -func TestPacketConnReadWriteUnicastICMP(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - if m, ok := nettest.SupportsRawIPSocket(); !ok { - t.Skip(m) - } - - c, err := net.ListenPacket("ip6:ipv6-icmp", "::1") - if err != nil { - t.Fatal(err) - } - defer c.Close() - p := ipv6.NewPacketConn(c) - defer p.Close() - - dst, err := net.ResolveIPAddr("ip6", "::1") - if err != nil { - t.Fatal(err) - } - - pshicmp := icmp.IPv6PseudoHeader(c.LocalAddr().(*net.IPAddr).IP, dst.IP) - cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced, - Src: net.IPv6loopback, - } - cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU - ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback) - if ifi != nil { - cm.IfIndex = ifi.Index - } - - var f ipv6.ICMPFilter - f.SetAll(true) - f.Accept(ipv6.ICMPTypeEchoReply) - if err := p.SetICMPFilter(&f); err != nil { - t.Fatal(err) - } - - var psh []byte - for i, toggle := range []bool{true, false, true} { - if toggle { - psh = nil - if err := p.SetChecksum(true, 2); err != nil { - // Solaris never allows to modify - // ICMP properties. - if runtime.GOOS != "solaris" { - t.Fatal(err) - } - } - } else { - psh = pshicmp - // Some platforms never allow to disable the - // kernel checksum processing. - p.SetChecksum(false, -1) - } - wb, err := (&icmp.Message{ - Type: ipv6.ICMPTypeEchoRequest, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: i + 1, - Data: []byte("HELLO-R-U-THERE"), - }, - }).Marshal(psh) - if err != nil { - t.Fatal(err) - } - if err := p.SetControlMessage(cf, toggle); err != nil { - if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } - cm.HopLimit = i + 1 - if err := p.SetWriteDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, err := p.WriteTo(wb, &cm, dst); err != nil { - t.Fatal(err) - } else if n != len(wb) { - t.Fatalf("got %v; want %v", n, len(wb)) - } - rb := make([]byte, 128) - if err := p.SetReadDeadline(time.Now().Add(100 * time.Millisecond)); err != nil { - t.Fatal(err) - } - if n, _, _, err := p.ReadFrom(rb); err != nil { - switch runtime.GOOS { - case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %s", runtime.GOOS) - continue - } - t.Fatal(err) - } else { - if m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, rb[:n]); err != nil { - t.Fatal(err) - } else if m.Type != ipv6.ICMPTypeEchoReply || m.Code != 0 { - t.Fatalf("got type=%v, code=%v; want type=%v, code=%v", m.Type, m.Code, ipv6.ICMPTypeEchoReply, 0) - } - } - } -} diff --git a/deps/golang.org/x/net/ipv6/unicastsockopt_test.go b/deps/golang.org/x/net/ipv6/unicastsockopt_test.go deleted file mode 100644 index 69adefe8f..000000000 --- a/deps/golang.org/x/net/ipv6/unicastsockopt_test.go +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ipv6_test - -import ( - "net" - "runtime" - "testing" - - "golang.org/x/net/internal/iana" - "golang.org/x/net/internal/nettest" - "golang.org/x/net/ipv6" -) - -func TestConnUnicastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - ln, err := net.Listen("tcp6", "[::1]:0") - if err != nil { - t.Fatal(err) - } - defer ln.Close() - - errc := make(chan error, 1) - go func() { - c, err := ln.Accept() - if err != nil { - errc <- err - return - } - errc <- c.Close() - }() - - c, err := net.Dial("tcp6", ln.Addr().String()) - if err != nil { - t.Fatal(err) - } - defer c.Close() - - testUnicastSocketOptions(t, ipv6.NewConn(c)) - - if err := <-errc; err != nil { - t.Errorf("server: %v", err) - } -} - -var packetConnUnicastSocketOptionTests = []struct { - net, proto, addr string -}{ - {"udp6", "", "[::1]:0"}, - {"ip6", ":ipv6-icmp", "::1"}, -} - -func TestPacketConnUnicastSocketOptions(t *testing.T) { - switch runtime.GOOS { - case "js", "nacl", "plan9", "windows": - t.Skipf("not supported on %s", runtime.GOOS) - } - if !supportsIPv6 { - t.Skip("ipv6 is not supported") - } - - m, ok := nettest.SupportsRawIPSocket() - for _, tt := range packetConnUnicastSocketOptionTests { - if tt.net == "ip6" && !ok { - t.Log(m) - continue - } - c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) - if err != nil { - t.Fatal(err) - } - defer c.Close() - - testUnicastSocketOptions(t, ipv6.NewPacketConn(c)) - } -} - -type testIPv6UnicastConn interface { - TrafficClass() (int, error) - SetTrafficClass(int) error - HopLimit() (int, error) - SetHopLimit(int) error -} - -func testUnicastSocketOptions(t *testing.T, c testIPv6UnicastConn) { - tclass := iana.DiffServCS0 | iana.NotECNTransport - if err := c.SetTrafficClass(tclass); err != nil { - switch runtime.GOOS { - case "darwin": // older darwin kernels don't support IPV6_TCLASS option - t.Logf("not supported on %s", runtime.GOOS) - goto next - } - t.Fatal(err) - } - if v, err := c.TrafficClass(); err != nil { - t.Fatal(err) - } else if v != tclass { - t.Fatalf("got %v; want %v", v, tclass) - } - -next: - hoplim := 255 - if err := c.SetHopLimit(hoplim); err != nil { - t.Fatal(err) - } - if v, err := c.HopLimit(); err != nil { - t.Fatal(err) - } else if v != hoplim { - t.Fatalf("got %v; want %v", v, hoplim) - } -} diff --git a/deps/golang.org/x/net/ipv6/zsys_darwin.go b/deps/golang.org/x/net/ipv6/zsys_darwin.go deleted file mode 100644 index 6aab1dfab..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_darwin.go +++ /dev/null @@ -1,131 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_darwin.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - - sysIPV6_PORTRANGE = 0xe - sysICMP6_FILTER = 0x12 - sysIPV6_2292PKTINFO = 0x13 - sysIPV6_2292HOPLIMIT = 0x14 - sysIPV6_2292NEXTHOP = 0x15 - sysIPV6_2292HOPOPTS = 0x16 - sysIPV6_2292DSTOPTS = 0x17 - sysIPV6_2292RTHDR = 0x18 - - sysIPV6_2292PKTOPTIONS = 0x19 - - sysIPV6_CHECKSUM = 0x1a - sysIPV6_V6ONLY = 0x1b - - sysIPV6_IPSEC_POLICY = 0x1c - - sysIPV6_RECVTCLASS = 0x23 - sysIPV6_TCLASS = 0x24 - - sysIPV6_RTHDRDSTOPTS = 0x39 - - sysIPV6_RECVPKTINFO = 0x3d - - sysIPV6_RECVHOPLIMIT = 0x25 - sysIPV6_RECVRTHDR = 0x26 - sysIPV6_RECVHOPOPTS = 0x27 - sysIPV6_RECVDSTOPTS = 0x28 - - sysIPV6_USE_MIN_MTU = 0x2a - sysIPV6_RECVPATHMTU = 0x2b - - sysIPV6_PATHMTU = 0x2c - - sysIPV6_PKTINFO = 0x2e - sysIPV6_HOPLIMIT = 0x2f - sysIPV6_NEXTHOP = 0x30 - sysIPV6_HOPOPTS = 0x31 - sysIPV6_DSTOPTS = 0x32 - sysIPV6_RTHDR = 0x33 - - sysIPV6_AUTOFLOWLABEL = 0x3b - - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_PREFER_TEMPADDR = 0x3f - - sysIPV6_MSFILTER = 0x4a - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sysIPV6_BOUND_IF = 0x7d - - sysIPV6_PORTRANGE_DEFAULT = 0x0 - sysIPV6_PORTRANGE_HIGH = 0x1 - sysIPV6_PORTRANGE_LOW = 0x2 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type icmpv6Filter struct { - Filt [8]uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [128]byte -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [128]byte - Pad_cgo_1 [128]byte -} diff --git a/deps/golang.org/x/net/ipv6/zsys_dragonfly.go b/deps/golang.org/x/net/ipv6/zsys_dragonfly.go deleted file mode 100644 index d2de804d8..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_dragonfly.go +++ /dev/null @@ -1,88 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_dragonfly.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - sysIPV6_PORTRANGE = 0xe - sysICMP6_FILTER = 0x12 - - sysIPV6_CHECKSUM = 0x1a - sysIPV6_V6ONLY = 0x1b - - sysIPV6_IPSEC_POLICY = 0x1c - - sysIPV6_RTHDRDSTOPTS = 0x23 - sysIPV6_RECVPKTINFO = 0x24 - sysIPV6_RECVHOPLIMIT = 0x25 - sysIPV6_RECVRTHDR = 0x26 - sysIPV6_RECVHOPOPTS = 0x27 - sysIPV6_RECVDSTOPTS = 0x28 - - sysIPV6_USE_MIN_MTU = 0x2a - sysIPV6_RECVPATHMTU = 0x2b - - sysIPV6_PATHMTU = 0x2c - - sysIPV6_PKTINFO = 0x2e - sysIPV6_HOPLIMIT = 0x2f - sysIPV6_NEXTHOP = 0x30 - sysIPV6_HOPOPTS = 0x31 - sysIPV6_DSTOPTS = 0x32 - sysIPV6_RTHDR = 0x33 - - sysIPV6_RECVTCLASS = 0x39 - - sysIPV6_AUTOFLOWLABEL = 0x3b - - sysIPV6_TCLASS = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_PREFER_TEMPADDR = 0x3f - - sysIPV6_PORTRANGE_DEFAULT = 0x0 - sysIPV6_PORTRANGE_HIGH = 0x1 - sysIPV6_PORTRANGE_LOW = 0x2 - - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - - sizeofIPv6Mreq = 0x14 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type icmpv6Filter struct { - Filt [8]uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_freebsd_386.go b/deps/golang.org/x/net/ipv6/zsys_freebsd_386.go deleted file mode 100644 index 919e572d4..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_freebsd_386.go +++ /dev/null @@ -1,122 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - sysIPV6_PORTRANGE = 0xe - sysICMP6_FILTER = 0x12 - - sysIPV6_CHECKSUM = 0x1a - sysIPV6_V6ONLY = 0x1b - - sysIPV6_IPSEC_POLICY = 0x1c - - sysIPV6_RTHDRDSTOPTS = 0x23 - - sysIPV6_RECVPKTINFO = 0x24 - sysIPV6_RECVHOPLIMIT = 0x25 - sysIPV6_RECVRTHDR = 0x26 - sysIPV6_RECVHOPOPTS = 0x27 - sysIPV6_RECVDSTOPTS = 0x28 - - sysIPV6_USE_MIN_MTU = 0x2a - sysIPV6_RECVPATHMTU = 0x2b - - sysIPV6_PATHMTU = 0x2c - - sysIPV6_PKTINFO = 0x2e - sysIPV6_HOPLIMIT = 0x2f - sysIPV6_NEXTHOP = 0x30 - sysIPV6_HOPOPTS = 0x31 - sysIPV6_DSTOPTS = 0x32 - sysIPV6_RTHDR = 0x33 - - sysIPV6_RECVTCLASS = 0x39 - - sysIPV6_AUTOFLOWLABEL = 0x3b - - sysIPV6_TCLASS = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_PREFER_TEMPADDR = 0x3f - - sysIPV6_BINDANY = 0x40 - - sysIPV6_MSFILTER = 0x4a - - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sysIPV6_PORTRANGE_DEFAULT = 0x0 - sysIPV6_PORTRANGE_HIGH = 0x1 - sysIPV6_PORTRANGE_LOW = 0x2 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type groupReq struct { - Interface uint32 - Group sockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group sockaddrStorage - Source sockaddrStorage -} - -type icmpv6Filter struct { - Filt [8]uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_freebsd_amd64.go b/deps/golang.org/x/net/ipv6/zsys_freebsd_amd64.go deleted file mode 100644 index cb8141f9c..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_freebsd_amd64.go +++ /dev/null @@ -1,124 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - sysIPV6_PORTRANGE = 0xe - sysICMP6_FILTER = 0x12 - - sysIPV6_CHECKSUM = 0x1a - sysIPV6_V6ONLY = 0x1b - - sysIPV6_IPSEC_POLICY = 0x1c - - sysIPV6_RTHDRDSTOPTS = 0x23 - - sysIPV6_RECVPKTINFO = 0x24 - sysIPV6_RECVHOPLIMIT = 0x25 - sysIPV6_RECVRTHDR = 0x26 - sysIPV6_RECVHOPOPTS = 0x27 - sysIPV6_RECVDSTOPTS = 0x28 - - sysIPV6_USE_MIN_MTU = 0x2a - sysIPV6_RECVPATHMTU = 0x2b - - sysIPV6_PATHMTU = 0x2c - - sysIPV6_PKTINFO = 0x2e - sysIPV6_HOPLIMIT = 0x2f - sysIPV6_NEXTHOP = 0x30 - sysIPV6_HOPOPTS = 0x31 - sysIPV6_DSTOPTS = 0x32 - sysIPV6_RTHDR = 0x33 - - sysIPV6_RECVTCLASS = 0x39 - - sysIPV6_AUTOFLOWLABEL = 0x3b - - sysIPV6_TCLASS = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_PREFER_TEMPADDR = 0x3f - - sysIPV6_BINDANY = 0x40 - - sysIPV6_MSFILTER = 0x4a - - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sysIPV6_PORTRANGE_DEFAULT = 0x0 - sysIPV6_PORTRANGE_HIGH = 0x1 - sysIPV6_PORTRANGE_LOW = 0x2 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage - Source sockaddrStorage -} - -type icmpv6Filter struct { - Filt [8]uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_freebsd_arm.go b/deps/golang.org/x/net/ipv6/zsys_freebsd_arm.go deleted file mode 100644 index cb8141f9c..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_freebsd_arm.go +++ /dev/null @@ -1,124 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - sysIPV6_PORTRANGE = 0xe - sysICMP6_FILTER = 0x12 - - sysIPV6_CHECKSUM = 0x1a - sysIPV6_V6ONLY = 0x1b - - sysIPV6_IPSEC_POLICY = 0x1c - - sysIPV6_RTHDRDSTOPTS = 0x23 - - sysIPV6_RECVPKTINFO = 0x24 - sysIPV6_RECVHOPLIMIT = 0x25 - sysIPV6_RECVRTHDR = 0x26 - sysIPV6_RECVHOPOPTS = 0x27 - sysIPV6_RECVDSTOPTS = 0x28 - - sysIPV6_USE_MIN_MTU = 0x2a - sysIPV6_RECVPATHMTU = 0x2b - - sysIPV6_PATHMTU = 0x2c - - sysIPV6_PKTINFO = 0x2e - sysIPV6_HOPLIMIT = 0x2f - sysIPV6_NEXTHOP = 0x30 - sysIPV6_HOPOPTS = 0x31 - sysIPV6_DSTOPTS = 0x32 - sysIPV6_RTHDR = 0x33 - - sysIPV6_RECVTCLASS = 0x39 - - sysIPV6_AUTOFLOWLABEL = 0x3b - - sysIPV6_TCLASS = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_PREFER_TEMPADDR = 0x3f - - sysIPV6_BINDANY = 0x40 - - sysIPV6_MSFILTER = 0x4a - - sysMCAST_JOIN_GROUP = 0x50 - sysMCAST_LEAVE_GROUP = 0x51 - sysMCAST_JOIN_SOURCE_GROUP = 0x52 - sysMCAST_LEAVE_SOURCE_GROUP = 0x53 - sysMCAST_BLOCK_SOURCE = 0x54 - sysMCAST_UNBLOCK_SOURCE = 0x55 - - sysIPV6_PORTRANGE_DEFAULT = 0x0 - sysIPV6_PORTRANGE_HIGH = 0x1 - sysIPV6_PORTRANGE_LOW = 0x2 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrStorage struct { - Len uint8 - Family uint8 - X__ss_pad1 [6]int8 - X__ss_align int64 - X__ss_pad2 [112]int8 -} - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group sockaddrStorage - Source sockaddrStorage -} - -type icmpv6Filter struct { - Filt [8]uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_386.go b/deps/golang.org/x/net/ipv6/zsys_linux_386.go deleted file mode 100644 index 73aa8c6df..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_386.go +++ /dev/null @@ -1,170 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_amd64.go b/deps/golang.org/x/net/ipv6/zsys_linux_amd64.go deleted file mode 100644 index b64f0157d..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_amd64.go +++ /dev/null @@ -1,172 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_arm.go b/deps/golang.org/x/net/ipv6/zsys_linux_arm.go deleted file mode 100644 index 73aa8c6df..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_arm.go +++ /dev/null @@ -1,170 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_arm64.go b/deps/golang.org/x/net/ipv6/zsys_linux_arm64.go deleted file mode 100644 index b64f0157d..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_arm64.go +++ /dev/null @@ -1,172 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_mips.go b/deps/golang.org/x/net/ipv6/zsys_linux_mips.go deleted file mode 100644 index 73aa8c6df..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_mips.go +++ /dev/null @@ -1,170 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_mips64.go b/deps/golang.org/x/net/ipv6/zsys_linux_mips64.go deleted file mode 100644 index b64f0157d..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_mips64.go +++ /dev/null @@ -1,172 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_mips64le.go b/deps/golang.org/x/net/ipv6/zsys_linux_mips64le.go deleted file mode 100644 index b64f0157d..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_mips64le.go +++ /dev/null @@ -1,172 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_mipsle.go b/deps/golang.org/x/net/ipv6/zsys_linux_mipsle.go deleted file mode 100644 index 73aa8c6df..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_mipsle.go +++ /dev/null @@ -1,170 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_ppc.go b/deps/golang.org/x/net/ipv6/zsys_linux_ppc.go deleted file mode 100644 index c9bf6a87e..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_ppc.go +++ /dev/null @@ -1,170 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x84 - sizeofGroupSourceReq = 0x104 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x8 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]uint8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [2]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_ppc64.go b/deps/golang.org/x/net/ipv6/zsys_linux_ppc64.go deleted file mode 100644 index b64f0157d..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_ppc64.go +++ /dev/null @@ -1,172 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_ppc64le.go b/deps/golang.org/x/net/ipv6/zsys_linux_ppc64le.go deleted file mode 100644 index b64f0157d..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_ppc64le.go +++ /dev/null @@ -1,172 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_linux_s390x.go b/deps/golang.org/x/net/ipv6/zsys_linux_s390x.go deleted file mode 100644 index b64f0157d..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_linux_s390x.go +++ /dev/null @@ -1,172 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_linux.go - -package ipv6 - -const ( - sysIPV6_ADDRFORM = 0x1 - sysIPV6_2292PKTINFO = 0x2 - sysIPV6_2292HOPOPTS = 0x3 - sysIPV6_2292DSTOPTS = 0x4 - sysIPV6_2292RTHDR = 0x5 - sysIPV6_2292PKTOPTIONS = 0x6 - sysIPV6_CHECKSUM = 0x7 - sysIPV6_2292HOPLIMIT = 0x8 - sysIPV6_NEXTHOP = 0x9 - sysIPV6_FLOWINFO = 0xb - - sysIPV6_UNICAST_HOPS = 0x10 - sysIPV6_MULTICAST_IF = 0x11 - sysIPV6_MULTICAST_HOPS = 0x12 - sysIPV6_MULTICAST_LOOP = 0x13 - sysIPV6_ADD_MEMBERSHIP = 0x14 - sysIPV6_DROP_MEMBERSHIP = 0x15 - sysMCAST_JOIN_GROUP = 0x2a - sysMCAST_LEAVE_GROUP = 0x2d - sysMCAST_JOIN_SOURCE_GROUP = 0x2e - sysMCAST_LEAVE_SOURCE_GROUP = 0x2f - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_MSFILTER = 0x30 - sysIPV6_ROUTER_ALERT = 0x16 - sysIPV6_MTU_DISCOVER = 0x17 - sysIPV6_MTU = 0x18 - sysIPV6_RECVERR = 0x19 - sysIPV6_V6ONLY = 0x1a - sysIPV6_JOIN_ANYCAST = 0x1b - sysIPV6_LEAVE_ANYCAST = 0x1c - - sysIPV6_FLOWLABEL_MGR = 0x20 - sysIPV6_FLOWINFO_SEND = 0x21 - - sysIPV6_IPSEC_POLICY = 0x22 - sysIPV6_XFRM_POLICY = 0x23 - - sysIPV6_RECVPKTINFO = 0x31 - sysIPV6_PKTINFO = 0x32 - sysIPV6_RECVHOPLIMIT = 0x33 - sysIPV6_HOPLIMIT = 0x34 - sysIPV6_RECVHOPOPTS = 0x35 - sysIPV6_HOPOPTS = 0x36 - sysIPV6_RTHDRDSTOPTS = 0x37 - sysIPV6_RECVRTHDR = 0x38 - sysIPV6_RTHDR = 0x39 - sysIPV6_RECVDSTOPTS = 0x3a - sysIPV6_DSTOPTS = 0x3b - sysIPV6_RECVPATHMTU = 0x3c - sysIPV6_PATHMTU = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_RECVTCLASS = 0x42 - sysIPV6_TCLASS = 0x43 - - sysIPV6_ADDR_PREFERENCES = 0x48 - - sysIPV6_PREFER_SRC_TMP = 0x1 - sysIPV6_PREFER_SRC_PUBLIC = 0x2 - sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 - sysIPV6_PREFER_SRC_COA = 0x4 - sysIPV6_PREFER_SRC_HOME = 0x400 - sysIPV6_PREFER_SRC_CGA = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x800 - - sysIPV6_MINHOPCOUNT = 0x49 - - sysIPV6_ORIGDSTADDR = 0x4a - sysIPV6_RECVORIGDSTADDR = 0x4a - sysIPV6_TRANSPARENT = 0x4b - sysIPV6_UNICAST_IF = 0x4c - - sysICMPV6_FILTER = 0x1 - - sysICMPV6_FILTER_BLOCK = 0x1 - sysICMPV6_FILTER_PASS = 0x2 - sysICMPV6_FILTER_BLOCKOTHERS = 0x3 - sysICMPV6_FILTER_PASSONLY = 0x4 - - sysSOL_SOCKET = 0x1 - sysSO_ATTACH_FILTER = 0x1a - - sizeofKernelSockaddrStorage = 0x80 - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - sizeofIPv6FlowlabelReq = 0x20 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x88 - sizeofGroupSourceReq = 0x108 - - sizeofICMPv6Filter = 0x20 - - sizeofSockFprog = 0x10 -) - -type kernelSockaddrStorage struct { - Family uint16 - X__data [126]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex int32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6FlowlabelReq struct { - Dst [16]byte /* in6_addr */ - Label uint32 - Action uint8 - Share uint8 - Flags uint16 - Expires uint16 - Linger uint16 - X__flr_pad uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Ifindex int32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [4]byte - Group kernelSockaddrStorage - Source kernelSockaddrStorage -} - -type icmpv6Filter struct { - Data [8]uint32 -} - -type sockFProg struct { - Len uint16 - Pad_cgo_0 [6]byte - Filter *sockFilter -} - -type sockFilter struct { - Code uint16 - Jt uint8 - Jf uint8 - K uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_netbsd.go b/deps/golang.org/x/net/ipv6/zsys_netbsd.go deleted file mode 100644 index bcada13b7..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_netbsd.go +++ /dev/null @@ -1,84 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_netbsd.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - sysIPV6_PORTRANGE = 0xe - sysICMP6_FILTER = 0x12 - - sysIPV6_CHECKSUM = 0x1a - sysIPV6_V6ONLY = 0x1b - - sysIPV6_IPSEC_POLICY = 0x1c - - sysIPV6_RTHDRDSTOPTS = 0x23 - - sysIPV6_RECVPKTINFO = 0x24 - sysIPV6_RECVHOPLIMIT = 0x25 - sysIPV6_RECVRTHDR = 0x26 - sysIPV6_RECVHOPOPTS = 0x27 - sysIPV6_RECVDSTOPTS = 0x28 - - sysIPV6_USE_MIN_MTU = 0x2a - sysIPV6_RECVPATHMTU = 0x2b - sysIPV6_PATHMTU = 0x2c - - sysIPV6_PKTINFO = 0x2e - sysIPV6_HOPLIMIT = 0x2f - sysIPV6_NEXTHOP = 0x30 - sysIPV6_HOPOPTS = 0x31 - sysIPV6_DSTOPTS = 0x32 - sysIPV6_RTHDR = 0x33 - - sysIPV6_RECVTCLASS = 0x39 - - sysIPV6_TCLASS = 0x3d - sysIPV6_DONTFRAG = 0x3e - - sysIPV6_PORTRANGE_DEFAULT = 0x0 - sysIPV6_PORTRANGE_HIGH = 0x1 - sysIPV6_PORTRANGE_LOW = 0x2 - - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - - sizeofIPv6Mreq = 0x14 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type icmpv6Filter struct { - Filt [8]uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_openbsd.go b/deps/golang.org/x/net/ipv6/zsys_openbsd.go deleted file mode 100644 index 86cf3c637..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_openbsd.go +++ /dev/null @@ -1,93 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_openbsd.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x4 - sysIPV6_MULTICAST_IF = 0x9 - sysIPV6_MULTICAST_HOPS = 0xa - sysIPV6_MULTICAST_LOOP = 0xb - sysIPV6_JOIN_GROUP = 0xc - sysIPV6_LEAVE_GROUP = 0xd - sysIPV6_PORTRANGE = 0xe - sysICMP6_FILTER = 0x12 - - sysIPV6_CHECKSUM = 0x1a - sysIPV6_V6ONLY = 0x1b - - sysIPV6_RTHDRDSTOPTS = 0x23 - - sysIPV6_RECVPKTINFO = 0x24 - sysIPV6_RECVHOPLIMIT = 0x25 - sysIPV6_RECVRTHDR = 0x26 - sysIPV6_RECVHOPOPTS = 0x27 - sysIPV6_RECVDSTOPTS = 0x28 - - sysIPV6_USE_MIN_MTU = 0x2a - sysIPV6_RECVPATHMTU = 0x2b - - sysIPV6_PATHMTU = 0x2c - - sysIPV6_PKTINFO = 0x2e - sysIPV6_HOPLIMIT = 0x2f - sysIPV6_NEXTHOP = 0x30 - sysIPV6_HOPOPTS = 0x31 - sysIPV6_DSTOPTS = 0x32 - sysIPV6_RTHDR = 0x33 - - sysIPV6_AUTH_LEVEL = 0x35 - sysIPV6_ESP_TRANS_LEVEL = 0x36 - sysIPV6_ESP_NETWORK_LEVEL = 0x37 - sysIPSEC6_OUTSA = 0x38 - sysIPV6_RECVTCLASS = 0x39 - - sysIPV6_AUTOFLOWLABEL = 0x3b - sysIPV6_IPCOMP_LEVEL = 0x3c - - sysIPV6_TCLASS = 0x3d - sysIPV6_DONTFRAG = 0x3e - sysIPV6_PIPEX = 0x3f - - sysIPV6_RTABLE = 0x1021 - - sysIPV6_PORTRANGE_DEFAULT = 0x0 - sysIPV6_PORTRANGE_HIGH = 0x1 - sysIPV6_PORTRANGE_LOW = 0x2 - - sizeofSockaddrInet6 = 0x1c - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x20 - - sizeofIPv6Mreq = 0x14 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrInet6 struct { - Len uint8 - Family uint8 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type icmpv6Filter struct { - Filt [8]uint32 -} diff --git a/deps/golang.org/x/net/ipv6/zsys_solaris.go b/deps/golang.org/x/net/ipv6/zsys_solaris.go deleted file mode 100644 index cf1837dd2..000000000 --- a/deps/golang.org/x/net/ipv6/zsys_solaris.go +++ /dev/null @@ -1,131 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_solaris.go - -package ipv6 - -const ( - sysIPV6_UNICAST_HOPS = 0x5 - sysIPV6_MULTICAST_IF = 0x6 - sysIPV6_MULTICAST_HOPS = 0x7 - sysIPV6_MULTICAST_LOOP = 0x8 - sysIPV6_JOIN_GROUP = 0x9 - sysIPV6_LEAVE_GROUP = 0xa - - sysIPV6_PKTINFO = 0xb - - sysIPV6_HOPLIMIT = 0xc - sysIPV6_NEXTHOP = 0xd - sysIPV6_HOPOPTS = 0xe - sysIPV6_DSTOPTS = 0xf - - sysIPV6_RTHDR = 0x10 - sysIPV6_RTHDRDSTOPTS = 0x11 - - sysIPV6_RECVPKTINFO = 0x12 - sysIPV6_RECVHOPLIMIT = 0x13 - sysIPV6_RECVHOPOPTS = 0x14 - - sysIPV6_RECVRTHDR = 0x16 - - sysIPV6_RECVRTHDRDSTOPTS = 0x17 - - sysIPV6_CHECKSUM = 0x18 - sysIPV6_RECVTCLASS = 0x19 - sysIPV6_USE_MIN_MTU = 0x20 - sysIPV6_DONTFRAG = 0x21 - sysIPV6_SEC_OPT = 0x22 - sysIPV6_SRC_PREFERENCES = 0x23 - sysIPV6_RECVPATHMTU = 0x24 - sysIPV6_PATHMTU = 0x25 - sysIPV6_TCLASS = 0x26 - sysIPV6_V6ONLY = 0x27 - - sysIPV6_RECVDSTOPTS = 0x28 - - sysMCAST_JOIN_GROUP = 0x29 - sysMCAST_LEAVE_GROUP = 0x2a - sysMCAST_BLOCK_SOURCE = 0x2b - sysMCAST_UNBLOCK_SOURCE = 0x2c - sysMCAST_JOIN_SOURCE_GROUP = 0x2d - sysMCAST_LEAVE_SOURCE_GROUP = 0x2e - - sysIPV6_PREFER_SRC_HOME = 0x1 - sysIPV6_PREFER_SRC_COA = 0x2 - sysIPV6_PREFER_SRC_PUBLIC = 0x4 - sysIPV6_PREFER_SRC_TMP = 0x8 - sysIPV6_PREFER_SRC_NONCGA = 0x10 - sysIPV6_PREFER_SRC_CGA = 0x20 - - sysIPV6_PREFER_SRC_MIPMASK = 0x3 - sysIPV6_PREFER_SRC_MIPDEFAULT = 0x1 - sysIPV6_PREFER_SRC_TMPMASK = 0xc - sysIPV6_PREFER_SRC_TMPDEFAULT = 0x4 - sysIPV6_PREFER_SRC_CGAMASK = 0x30 - sysIPV6_PREFER_SRC_CGADEFAULT = 0x10 - - sysIPV6_PREFER_SRC_MASK = 0x3f - - sysIPV6_PREFER_SRC_DEFAULT = 0x15 - - sysIPV6_BOUND_IF = 0x41 - sysIPV6_UNSPEC_SRC = 0x42 - - sysICMP6_FILTER = 0x1 - - sizeofSockaddrStorage = 0x100 - sizeofSockaddrInet6 = 0x20 - sizeofInet6Pktinfo = 0x14 - sizeofIPv6Mtuinfo = 0x24 - - sizeofIPv6Mreq = 0x14 - sizeofGroupReq = 0x104 - sizeofGroupSourceReq = 0x204 - - sizeofICMPv6Filter = 0x20 -) - -type sockaddrStorage struct { - Family uint16 - X_ss_pad1 [6]int8 - X_ss_align float64 - X_ss_pad2 [240]int8 -} - -type sockaddrInet6 struct { - Family uint16 - Port uint16 - Flowinfo uint32 - Addr [16]byte /* in6_addr */ - Scope_id uint32 - X__sin6_src_id uint32 -} - -type inet6Pktinfo struct { - Addr [16]byte /* in6_addr */ - Ifindex uint32 -} - -type ipv6Mtuinfo struct { - Addr sockaddrInet6 - Mtu uint32 -} - -type ipv6Mreq struct { - Multiaddr [16]byte /* in6_addr */ - Interface uint32 -} - -type groupReq struct { - Interface uint32 - Pad_cgo_0 [256]byte -} - -type groupSourceReq struct { - Interface uint32 - Pad_cgo_0 [256]byte - Pad_cgo_1 [256]byte -} - -type icmpv6Filter struct { - X__icmp6_filt [8]uint32 -} diff --git a/deps/golang.org/x/net/lex/httplex/httplex_test.go b/deps/golang.org/x/net/lex/httplex/httplex_test.go deleted file mode 100644 index f47adc939..000000000 --- a/deps/golang.org/x/net/lex/httplex/httplex_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package httplex - -import ( - "testing" -) - -func isChar(c rune) bool { return c <= 127 } - -func isCtl(c rune) bool { return c <= 31 || c == 127 } - -func isSeparator(c rune) bool { - switch c { - case '(', ')', '<', '>', '@', ',', ';', ':', '\\', '"', '/', '[', ']', '?', '=', '{', '}', ' ', '\t': - return true - } - return false -} - -func TestIsToken(t *testing.T) { - for i := 0; i <= 130; i++ { - r := rune(i) - expected := isChar(r) && !isCtl(r) && !isSeparator(r) - if IsTokenRune(r) != expected { - t.Errorf("isToken(0x%x) = %v", r, !expected) - } - } -} - -func TestHeaderValuesContainsToken(t *testing.T) { - tests := []struct { - vals []string - token string - want bool - }{ - { - vals: []string{"foo"}, - token: "foo", - want: true, - }, - { - vals: []string{"bar", "foo"}, - token: "foo", - want: true, - }, - { - vals: []string{"foo"}, - token: "FOO", - want: true, - }, - { - vals: []string{"foo"}, - token: "bar", - want: false, - }, - { - vals: []string{" foo "}, - token: "FOO", - want: true, - }, - { - vals: []string{"foo,bar"}, - token: "FOO", - want: true, - }, - { - vals: []string{"bar,foo,bar"}, - token: "FOO", - want: true, - }, - { - vals: []string{"bar , foo"}, - token: "FOO", - want: true, - }, - { - vals: []string{"foo ,bar "}, - token: "FOO", - want: true, - }, - { - vals: []string{"bar, foo ,bar"}, - token: "FOO", - want: true, - }, - { - vals: []string{"bar , foo"}, - token: "FOO", - want: true, - }, - } - for _, tt := range tests { - got := HeaderValuesContainsToken(tt.vals, tt.token) - if got != tt.want { - t.Errorf("headerValuesContainsToken(%q, %q) = %v; want %v", tt.vals, tt.token, got, tt.want) - } - } -} - -func TestPunycodeHostPort(t *testing.T) { - tests := []struct { - in, want string - }{ - {"www.google.com", "www.google.com"}, - {"гофер.рф", "xn--c1ae0ajs.xn--p1ai"}, - {"bücher.de", "xn--bcher-kva.de"}, - {"bücher.de:8080", "xn--bcher-kva.de:8080"}, - {"[1::6]:8080", "[1::6]:8080"}, - } - for _, tt := range tests { - got, err := PunycodeHostPort(tt.in) - if tt.want != got || err != nil { - t.Errorf("PunycodeHostPort(%q) = %q, %v, want %q, nil", tt.in, got, err, tt.want) - } - } -} diff --git a/deps/golang.org/x/net/lif/address.go b/deps/golang.org/x/net/lif/address.go deleted file mode 100644 index afb957fd8..000000000 --- a/deps/golang.org/x/net/lif/address.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package lif - -import ( - "errors" - "unsafe" -) - -// An Addr represents an address associated with packet routing. -type Addr interface { - // Family returns an address family. - Family() int -} - -// An Inet4Addr represents an internet address for IPv4. -type Inet4Addr struct { - IP [4]byte // IP address - PrefixLen int // address prefix length -} - -// Family implements the Family method of Addr interface. -func (a *Inet4Addr) Family() int { return sysAF_INET } - -// An Inet6Addr represents an internet address for IPv6. -type Inet6Addr struct { - IP [16]byte // IP address - PrefixLen int // address prefix length - ZoneID int // zone identifier -} - -// Family implements the Family method of Addr interface. -func (a *Inet6Addr) Family() int { return sysAF_INET6 } - -// Addrs returns a list of interface addresses. -// -// The provided af must be an address family and name must be a data -// link name. The zero value of af or name means a wildcard. -func Addrs(af int, name string) ([]Addr, error) { - eps, err := newEndpoints(af) - if len(eps) == 0 { - return nil, err - } - defer func() { - for _, ep := range eps { - ep.close() - } - }() - lls, err := links(eps, name) - if len(lls) == 0 { - return nil, err - } - var as []Addr - for _, ll := range lls { - var lifr lifreq - for i := 0; i < len(ll.Name); i++ { - lifr.Name[i] = int8(ll.Name[i]) - } - for _, ep := range eps { - ioc := int64(sysSIOCGLIFADDR) - err := ioctl(ep.s, uintptr(ioc), unsafe.Pointer(&lifr)) - if err != nil { - continue - } - sa := (*sockaddrStorage)(unsafe.Pointer(&lifr.Lifru[0])) - l := int(nativeEndian.Uint32(lifr.Lifru1[:4])) - if l == 0 { - continue - } - switch sa.Family { - case sysAF_INET: - a := &Inet4Addr{PrefixLen: l} - copy(a.IP[:], lifr.Lifru[4:8]) - as = append(as, a) - case sysAF_INET6: - a := &Inet6Addr{PrefixLen: l, ZoneID: int(nativeEndian.Uint32(lifr.Lifru[24:28]))} - copy(a.IP[:], lifr.Lifru[8:24]) - as = append(as, a) - } - } - } - return as, nil -} - -func parseLinkAddr(b []byte) ([]byte, error) { - nlen, alen, slen := int(b[1]), int(b[2]), int(b[3]) - l := 4 + nlen + alen + slen - if len(b) < l { - return nil, errors.New("invalid address") - } - b = b[4:] - var addr []byte - if nlen > 0 { - b = b[nlen:] - } - if alen > 0 { - addr = make([]byte, alen) - copy(addr, b[:alen]) - } - return addr, nil -} diff --git a/deps/golang.org/x/net/lif/address_test.go b/deps/golang.org/x/net/lif/address_test.go deleted file mode 100644 index a25f10b67..000000000 --- a/deps/golang.org/x/net/lif/address_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package lif - -import ( - "fmt" - "testing" -) - -type addrFamily int - -func (af addrFamily) String() string { - switch af { - case sysAF_UNSPEC: - return "unspec" - case sysAF_INET: - return "inet4" - case sysAF_INET6: - return "inet6" - default: - return fmt.Sprintf("%d", af) - } -} - -const hexDigit = "0123456789abcdef" - -type llAddr []byte - -func (a llAddr) String() string { - if len(a) == 0 { - return "" - } - buf := make([]byte, 0, len(a)*3-1) - for i, b := range a { - if i > 0 { - buf = append(buf, ':') - } - buf = append(buf, hexDigit[b>>4]) - buf = append(buf, hexDigit[b&0xF]) - } - return string(buf) -} - -type ipAddr []byte - -func (a ipAddr) String() string { - if len(a) == 0 { - return "" - } - if len(a) == 4 { - return fmt.Sprintf("%d.%d.%d.%d", a[0], a[1], a[2], a[3]) - } - if len(a) == 16 { - return fmt.Sprintf("%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]) - } - s := make([]byte, len(a)*2) - for i, tn := range a { - s[i*2], s[i*2+1] = hexDigit[tn>>4], hexDigit[tn&0xf] - } - return string(s) -} - -func (a *Inet4Addr) String() string { - return fmt.Sprintf("(%s %s %d)", addrFamily(a.Family()), ipAddr(a.IP[:]), a.PrefixLen) -} - -func (a *Inet6Addr) String() string { - return fmt.Sprintf("(%s %s %d %d)", addrFamily(a.Family()), ipAddr(a.IP[:]), a.PrefixLen, a.ZoneID) -} - -type addrPack struct { - af int - as []Addr -} - -func addrPacks() ([]addrPack, error) { - var lastErr error - var aps []addrPack - for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} { - as, err := Addrs(af, "") - if err != nil { - lastErr = err - continue - } - aps = append(aps, addrPack{af: af, as: as}) - } - return aps, lastErr -} - -func TestAddrs(t *testing.T) { - aps, err := addrPacks() - if len(aps) == 0 && err != nil { - t.Fatal(err) - } - lps, err := linkPacks() - if len(lps) == 0 && err != nil { - t.Fatal(err) - } - for _, lp := range lps { - n := 0 - for _, ll := range lp.lls { - as, err := Addrs(lp.af, ll.Name) - if err != nil { - t.Fatal(lp.af, ll.Name, err) - } - t.Logf("af=%s name=%s %v", addrFamily(lp.af), ll.Name, as) - n += len(as) - } - for _, ap := range aps { - if ap.af != lp.af { - continue - } - if n != len(ap.as) { - t.Errorf("af=%s got %d; want %d", addrFamily(lp.af), n, len(ap.as)) - continue - } - } - } -} diff --git a/deps/golang.org/x/net/lif/binary.go b/deps/golang.org/x/net/lif/binary.go deleted file mode 100644 index 738a94f42..000000000 --- a/deps/golang.org/x/net/lif/binary.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package lif - -// This file contains duplicates of encoding/binary package. -// -// This package is supposed to be used by the net package of standard -// library. Therefore the package set used in the package must be the -// same as net package. - -var ( - littleEndian binaryLittleEndian - bigEndian binaryBigEndian -) - -type binaryByteOrder interface { - Uint16([]byte) uint16 - Uint32([]byte) uint32 - Uint64([]byte) uint64 - PutUint16([]byte, uint16) - PutUint32([]byte, uint32) - PutUint64([]byte, uint64) -} - -type binaryLittleEndian struct{} - -func (binaryLittleEndian) Uint16(b []byte) uint16 { - _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 - return uint16(b[0]) | uint16(b[1])<<8 -} - -func (binaryLittleEndian) PutUint16(b []byte, v uint16) { - _ = b[1] // early bounds check to guarantee safety of writes below - b[0] = byte(v) - b[1] = byte(v >> 8) -} - -func (binaryLittleEndian) Uint32(b []byte) uint32 { - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 -} - -func (binaryLittleEndian) PutUint32(b []byte, v uint32) { - _ = b[3] // early bounds check to guarantee safety of writes below - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) -} - -func (binaryLittleEndian) Uint64(b []byte) uint64 { - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 -} - -func (binaryLittleEndian) PutUint64(b []byte, v uint64) { - _ = b[7] // early bounds check to guarantee safety of writes below - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) - b[4] = byte(v >> 32) - b[5] = byte(v >> 40) - b[6] = byte(v >> 48) - b[7] = byte(v >> 56) -} - -type binaryBigEndian struct{} - -func (binaryBigEndian) Uint16(b []byte) uint16 { - _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 - return uint16(b[1]) | uint16(b[0])<<8 -} - -func (binaryBigEndian) PutUint16(b []byte, v uint16) { - _ = b[1] // early bounds check to guarantee safety of writes below - b[0] = byte(v >> 8) - b[1] = byte(v) -} - -func (binaryBigEndian) Uint32(b []byte) uint32 { - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24 -} - -func (binaryBigEndian) PutUint32(b []byte, v uint32) { - _ = b[3] // early bounds check to guarantee safety of writes below - b[0] = byte(v >> 24) - b[1] = byte(v >> 16) - b[2] = byte(v >> 8) - b[3] = byte(v) -} - -func (binaryBigEndian) Uint64(b []byte) uint64 { - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | - uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 -} - -func (binaryBigEndian) PutUint64(b []byte, v uint64) { - _ = b[7] // early bounds check to guarantee safety of writes below - b[0] = byte(v >> 56) - b[1] = byte(v >> 48) - b[2] = byte(v >> 40) - b[3] = byte(v >> 32) - b[4] = byte(v >> 24) - b[5] = byte(v >> 16) - b[6] = byte(v >> 8) - b[7] = byte(v) -} diff --git a/deps/golang.org/x/net/lif/defs_solaris.go b/deps/golang.org/x/net/lif/defs_solaris.go deleted file mode 100644 index 02c19981d..000000000 --- a/deps/golang.org/x/net/lif/defs_solaris.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -// +godefs map struct_in_addr [4]byte /* in_addr */ -// +godefs map struct_in6_addr [16]byte /* in6_addr */ - -package lif - -/* -#include -#include - -#include -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_INET6 = C.AF_INET6 - - sysSOCK_DGRAM = C.SOCK_DGRAM -) - -type sockaddrStorage C.struct_sockaddr_storage - -const ( - sysLIFC_NOXMIT = C.LIFC_NOXMIT - sysLIFC_EXTERNAL_SOURCE = C.LIFC_EXTERNAL_SOURCE - sysLIFC_TEMPORARY = C.LIFC_TEMPORARY - sysLIFC_ALLZONES = C.LIFC_ALLZONES - sysLIFC_UNDER_IPMP = C.LIFC_UNDER_IPMP - sysLIFC_ENABLED = C.LIFC_ENABLED - - sysSIOCGLIFADDR = C.SIOCGLIFADDR - sysSIOCGLIFDSTADDR = C.SIOCGLIFDSTADDR - sysSIOCGLIFFLAGS = C.SIOCGLIFFLAGS - sysSIOCGLIFMTU = C.SIOCGLIFMTU - sysSIOCGLIFNETMASK = C.SIOCGLIFNETMASK - sysSIOCGLIFMETRIC = C.SIOCGLIFMETRIC - sysSIOCGLIFNUM = C.SIOCGLIFNUM - sysSIOCGLIFINDEX = C.SIOCGLIFINDEX - sysSIOCGLIFSUBNET = C.SIOCGLIFSUBNET - sysSIOCGLIFLNKINFO = C.SIOCGLIFLNKINFO - sysSIOCGLIFCONF = C.SIOCGLIFCONF - sysSIOCGLIFHWADDR = C.SIOCGLIFHWADDR -) - -const ( - sysIFF_UP = C.IFF_UP - sysIFF_BROADCAST = C.IFF_BROADCAST - sysIFF_DEBUG = C.IFF_DEBUG - sysIFF_LOOPBACK = C.IFF_LOOPBACK - sysIFF_POINTOPOINT = C.IFF_POINTOPOINT - sysIFF_NOTRAILERS = C.IFF_NOTRAILERS - sysIFF_RUNNING = C.IFF_RUNNING - sysIFF_NOARP = C.IFF_NOARP - sysIFF_PROMISC = C.IFF_PROMISC - sysIFF_ALLMULTI = C.IFF_ALLMULTI - sysIFF_INTELLIGENT = C.IFF_INTELLIGENT - sysIFF_MULTICAST = C.IFF_MULTICAST - sysIFF_MULTI_BCAST = C.IFF_MULTI_BCAST - sysIFF_UNNUMBERED = C.IFF_UNNUMBERED - sysIFF_PRIVATE = C.IFF_PRIVATE -) - -const ( - sizeofLifnum = C.sizeof_struct_lifnum - sizeofLifreq = C.sizeof_struct_lifreq - sizeofLifconf = C.sizeof_struct_lifconf - sizeofLifIfinfoReq = C.sizeof_struct_lif_ifinfo_req -) - -type lifnum C.struct_lifnum - -type lifreq C.struct_lifreq - -type lifconf C.struct_lifconf - -type lifIfinfoReq C.struct_lif_ifinfo_req - -const ( - sysIFT_IPV4 = C.IFT_IPV4 - sysIFT_IPV6 = C.IFT_IPV6 - sysIFT_6TO4 = C.IFT_6TO4 -) diff --git a/deps/golang.org/x/net/lif/lif.go b/deps/golang.org/x/net/lif/lif.go deleted file mode 100644 index 6e81f81f1..000000000 --- a/deps/golang.org/x/net/lif/lif.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -// Package lif provides basic functions for the manipulation of -// logical network interfaces and interface addresses on Solaris. -// -// The package supports Solaris 11 or above. -package lif - -import "syscall" - -type endpoint struct { - af int - s uintptr -} - -func (ep *endpoint) close() error { - return syscall.Close(int(ep.s)) -} - -func newEndpoints(af int) ([]endpoint, error) { - var lastErr error - var eps []endpoint - afs := []int{sysAF_INET, sysAF_INET6} - if af != sysAF_UNSPEC { - afs = []int{af} - } - for _, af := range afs { - s, err := syscall.Socket(af, sysSOCK_DGRAM, 0) - if err != nil { - lastErr = err - continue - } - eps = append(eps, endpoint{af: af, s: uintptr(s)}) - } - if len(eps) == 0 { - return nil, lastErr - } - return eps, nil -} diff --git a/deps/golang.org/x/net/lif/link.go b/deps/golang.org/x/net/lif/link.go deleted file mode 100644 index 913a53e11..000000000 --- a/deps/golang.org/x/net/lif/link.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package lif - -import "unsafe" - -// A Link represents logical data link information. -// -// It also represents base information for logical network interface. -// On Solaris, each logical network interface represents network layer -// adjacency information and the interface has a only single network -// address or address pair for tunneling. It's usual that multiple -// logical network interfaces share the same logical data link. -type Link struct { - Name string // name, equivalent to IP interface name - Index int // index, equivalent to IP interface index - Type int // type - Flags int // flags - MTU int // maximum transmission unit, basically link MTU but may differ between IP address families - Addr []byte // address -} - -func (ll *Link) fetch(s uintptr) { - var lifr lifreq - for i := 0; i < len(ll.Name); i++ { - lifr.Name[i] = int8(ll.Name[i]) - } - ioc := int64(sysSIOCGLIFINDEX) - if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil { - ll.Index = int(nativeEndian.Uint32(lifr.Lifru[:4])) - } - ioc = int64(sysSIOCGLIFFLAGS) - if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil { - ll.Flags = int(nativeEndian.Uint64(lifr.Lifru[:8])) - } - ioc = int64(sysSIOCGLIFMTU) - if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil { - ll.MTU = int(nativeEndian.Uint32(lifr.Lifru[:4])) - } - switch ll.Type { - case sysIFT_IPV4, sysIFT_IPV6, sysIFT_6TO4: - default: - ioc = int64(sysSIOCGLIFHWADDR) - if err := ioctl(s, uintptr(ioc), unsafe.Pointer(&lifr)); err == nil { - ll.Addr, _ = parseLinkAddr(lifr.Lifru[4:]) - } - } -} - -// Links returns a list of logical data links. -// -// The provided af must be an address family and name must be a data -// link name. The zero value of af or name means a wildcard. -func Links(af int, name string) ([]Link, error) { - eps, err := newEndpoints(af) - if len(eps) == 0 { - return nil, err - } - defer func() { - for _, ep := range eps { - ep.close() - } - }() - return links(eps, name) -} - -func links(eps []endpoint, name string) ([]Link, error) { - var lls []Link - lifn := lifnum{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP} - lifc := lifconf{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP} - for _, ep := range eps { - lifn.Family = uint16(ep.af) - ioc := int64(sysSIOCGLIFNUM) - if err := ioctl(ep.s, uintptr(ioc), unsafe.Pointer(&lifn)); err != nil { - continue - } - if lifn.Count == 0 { - continue - } - b := make([]byte, lifn.Count*sizeofLifreq) - lifc.Family = uint16(ep.af) - lifc.Len = lifn.Count * sizeofLifreq - if len(lifc.Lifcu) == 8 { - nativeEndian.PutUint64(lifc.Lifcu[:], uint64(uintptr(unsafe.Pointer(&b[0])))) - } else { - nativeEndian.PutUint32(lifc.Lifcu[:], uint32(uintptr(unsafe.Pointer(&b[0])))) - } - ioc = int64(sysSIOCGLIFCONF) - if err := ioctl(ep.s, uintptr(ioc), unsafe.Pointer(&lifc)); err != nil { - continue - } - nb := make([]byte, 32) // see LIFNAMSIZ in net/if.h - for i := 0; i < int(lifn.Count); i++ { - lifr := (*lifreq)(unsafe.Pointer(&b[i*sizeofLifreq])) - for i := 0; i < 32; i++ { - if lifr.Name[i] == 0 { - nb = nb[:i] - break - } - nb[i] = byte(lifr.Name[i]) - } - llname := string(nb) - nb = nb[:32] - if isDupLink(lls, llname) || name != "" && name != llname { - continue - } - ll := Link{Name: llname, Type: int(lifr.Type)} - ll.fetch(ep.s) - lls = append(lls, ll) - } - } - return lls, nil -} - -func isDupLink(lls []Link, name string) bool { - for _, ll := range lls { - if ll.Name == name { - return true - } - } - return false -} diff --git a/deps/golang.org/x/net/lif/link_test.go b/deps/golang.org/x/net/lif/link_test.go deleted file mode 100644 index 0cb9b95c6..000000000 --- a/deps/golang.org/x/net/lif/link_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package lif - -import ( - "fmt" - "testing" -) - -func (ll *Link) String() string { - return fmt.Sprintf("name=%s index=%d type=%d flags=%#x mtu=%d addr=%v", ll.Name, ll.Index, ll.Type, ll.Flags, ll.MTU, llAddr(ll.Addr)) -} - -type linkPack struct { - af int - lls []Link -} - -func linkPacks() ([]linkPack, error) { - var lastErr error - var lps []linkPack - for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} { - lls, err := Links(af, "") - if err != nil { - lastErr = err - continue - } - lps = append(lps, linkPack{af: af, lls: lls}) - } - return lps, lastErr -} - -func TestLinks(t *testing.T) { - lps, err := linkPacks() - if len(lps) == 0 && err != nil { - t.Fatal(err) - } - for _, lp := range lps { - n := 0 - for _, sll := range lp.lls { - lls, err := Links(lp.af, sll.Name) - if err != nil { - t.Fatal(lp.af, sll.Name, err) - } - for _, ll := range lls { - if ll.Name != sll.Name || ll.Index != sll.Index { - t.Errorf("af=%s got %v; want %v", addrFamily(lp.af), &ll, &sll) - continue - } - t.Logf("af=%s name=%s %v", addrFamily(lp.af), sll.Name, &ll) - n++ - } - } - if n != len(lp.lls) { - t.Errorf("af=%s got %d; want %d", addrFamily(lp.af), n, len(lp.lls)) - continue - } - } -} diff --git a/deps/golang.org/x/net/lif/sys.go b/deps/golang.org/x/net/lif/sys.go deleted file mode 100644 index c896041b7..000000000 --- a/deps/golang.org/x/net/lif/sys.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package lif - -import "unsafe" - -var nativeEndian binaryByteOrder - -func init() { - i := uint32(1) - b := (*[4]byte)(unsafe.Pointer(&i)) - if b[0] == 1 { - nativeEndian = littleEndian - } else { - nativeEndian = bigEndian - } -} diff --git a/deps/golang.org/x/net/lif/sys_solaris_amd64.s b/deps/golang.org/x/net/lif/sys_solaris_amd64.s deleted file mode 100644 index 39d76af79..000000000 --- a/deps/golang.org/x/net/lif/sys_solaris_amd64.s +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -#include "textflag.h" - -TEXT ·sysvicall6(SB),NOSPLIT,$0-88 - JMP syscall·sysvicall6(SB) diff --git a/deps/golang.org/x/net/lif/syscall.go b/deps/golang.org/x/net/lif/syscall.go deleted file mode 100644 index aadab2e14..000000000 --- a/deps/golang.org/x/net/lif/syscall.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build solaris - -package lif - -import ( - "syscall" - "unsafe" -) - -//go:cgo_import_dynamic libc_ioctl ioctl "libc.so" - -//go:linkname procIoctl libc_ioctl - -var procIoctl uintptr - -func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno) - -func ioctl(s, ioc uintptr, arg unsafe.Pointer) error { - _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procIoctl)), 3, s, ioc, uintptr(arg), 0, 0, 0) - if errno != 0 { - return error(errno) - } - return nil -} diff --git a/deps/golang.org/x/net/lif/zsys_solaris_amd64.go b/deps/golang.org/x/net/lif/zsys_solaris_amd64.go deleted file mode 100644 index b5e999bec..000000000 --- a/deps/golang.org/x/net/lif/zsys_solaris_amd64.go +++ /dev/null @@ -1,103 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_solaris.go - -package lif - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_INET6 = 0x1a - - sysSOCK_DGRAM = 0x1 -) - -type sockaddrStorage struct { - Family uint16 - X_ss_pad1 [6]int8 - X_ss_align float64 - X_ss_pad2 [240]int8 -} - -const ( - sysLIFC_NOXMIT = 0x1 - sysLIFC_EXTERNAL_SOURCE = 0x2 - sysLIFC_TEMPORARY = 0x4 - sysLIFC_ALLZONES = 0x8 - sysLIFC_UNDER_IPMP = 0x10 - sysLIFC_ENABLED = 0x20 - - sysSIOCGLIFADDR = -0x3f87968f - sysSIOCGLIFDSTADDR = -0x3f87968d - sysSIOCGLIFFLAGS = -0x3f87968b - sysSIOCGLIFMTU = -0x3f879686 - sysSIOCGLIFNETMASK = -0x3f879683 - sysSIOCGLIFMETRIC = -0x3f879681 - sysSIOCGLIFNUM = -0x3ff3967e - sysSIOCGLIFINDEX = -0x3f87967b - sysSIOCGLIFSUBNET = -0x3f879676 - sysSIOCGLIFLNKINFO = -0x3f879674 - sysSIOCGLIFCONF = -0x3fef965b - sysSIOCGLIFHWADDR = -0x3f879640 -) - -const ( - sysIFF_UP = 0x1 - sysIFF_BROADCAST = 0x2 - sysIFF_DEBUG = 0x4 - sysIFF_LOOPBACK = 0x8 - sysIFF_POINTOPOINT = 0x10 - sysIFF_NOTRAILERS = 0x20 - sysIFF_RUNNING = 0x40 - sysIFF_NOARP = 0x80 - sysIFF_PROMISC = 0x100 - sysIFF_ALLMULTI = 0x200 - sysIFF_INTELLIGENT = 0x400 - sysIFF_MULTICAST = 0x800 - sysIFF_MULTI_BCAST = 0x1000 - sysIFF_UNNUMBERED = 0x2000 - sysIFF_PRIVATE = 0x8000 -) - -const ( - sizeofLifnum = 0xc - sizeofLifreq = 0x178 - sizeofLifconf = 0x18 - sizeofLifIfinfoReq = 0x10 -) - -type lifnum struct { - Family uint16 - Pad_cgo_0 [2]byte - Flags int32 - Count int32 -} - -type lifreq struct { - Name [32]int8 - Lifru1 [4]byte - Type uint32 - Lifru [336]byte -} - -type lifconf struct { - Family uint16 - Pad_cgo_0 [2]byte - Flags int32 - Len int32 - Pad_cgo_1 [4]byte - Lifcu [8]byte -} - -type lifIfinfoReq struct { - Maxhops uint8 - Pad_cgo_0 [3]byte - Reachtime uint32 - Reachretrans uint32 - Maxmtu uint32 -} - -const ( - sysIFT_IPV4 = 0xc8 - sysIFT_IPV6 = 0xc9 - sysIFT_6TO4 = 0xca -) diff --git a/deps/golang.org/x/net/nettest/conntest.go b/deps/golang.org/x/net/nettest/conntest.go deleted file mode 100644 index 5bd3a8c68..000000000 --- a/deps/golang.org/x/net/nettest/conntest.go +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package nettest provides utilities for network testing. -package nettest - -import ( - "bytes" - "encoding/binary" - "io" - "io/ioutil" - "math/rand" - "net" - "runtime" - "sync" - "testing" - "time" -) - -var ( - aLongTimeAgo = time.Unix(233431200, 0) - neverTimeout = time.Time{} -) - -// MakePipe creates a connection between two endpoints and returns the pair -// as c1 and c2, such that anything written to c1 is read by c2 and vice-versa. -// The stop function closes all resources, including c1, c2, and the underlying -// net.Listener (if there is one), and should not be nil. -type MakePipe func() (c1, c2 net.Conn, stop func(), err error) - -// TestConn tests that a net.Conn implementation properly satisfies the interface. -// The tests should not produce any false positives, but may experience -// false negatives. Thus, some issues may only be detected when the test is -// run multiple times. For maximal effectiveness, run the tests under the -// race detector. -func TestConn(t *testing.T, mp MakePipe) { - testConn(t, mp) -} - -type connTester func(t *testing.T, c1, c2 net.Conn) - -func timeoutWrapper(t *testing.T, mp MakePipe, f connTester) { - c1, c2, stop, err := mp() - if err != nil { - t.Fatalf("unable to make pipe: %v", err) - } - var once sync.Once - defer once.Do(func() { stop() }) - timer := time.AfterFunc(time.Minute, func() { - once.Do(func() { - t.Error("test timed out; terminating pipe") - stop() - }) - }) - defer timer.Stop() - f(t, c1, c2) -} - -// testBasicIO tests that the data sent on c1 is properly received on c2. -func testBasicIO(t *testing.T, c1, c2 net.Conn) { - want := make([]byte, 1<<20) - rand.New(rand.NewSource(0)).Read(want) - - dataCh := make(chan []byte) - go func() { - rd := bytes.NewReader(want) - if err := chunkedCopy(c1, rd); err != nil { - t.Errorf("unexpected c1.Write error: %v", err) - } - if err := c1.Close(); err != nil { - t.Errorf("unexpected c1.Close error: %v", err) - } - }() - - go func() { - wr := new(bytes.Buffer) - if err := chunkedCopy(wr, c2); err != nil { - t.Errorf("unexpected c2.Read error: %v", err) - } - if err := c2.Close(); err != nil { - t.Errorf("unexpected c2.Close error: %v", err) - } - dataCh <- wr.Bytes() - }() - - if got := <-dataCh; !bytes.Equal(got, want) { - t.Errorf("transmitted data differs") - } -} - -// testPingPong tests that the two endpoints can synchronously send data to -// each other in a typical request-response pattern. -func testPingPong(t *testing.T, c1, c2 net.Conn) { - var wg sync.WaitGroup - defer wg.Wait() - - pingPonger := func(c net.Conn) { - defer wg.Done() - buf := make([]byte, 8) - var prev uint64 - for { - if _, err := io.ReadFull(c, buf); err != nil { - if err == io.EOF { - break - } - t.Errorf("unexpected Read error: %v", err) - } - - v := binary.LittleEndian.Uint64(buf) - binary.LittleEndian.PutUint64(buf, v+1) - if prev != 0 && prev+2 != v { - t.Errorf("mismatching value: got %d, want %d", v, prev+2) - } - prev = v - if v == 1000 { - break - } - - if _, err := c.Write(buf); err != nil { - t.Errorf("unexpected Write error: %v", err) - break - } - } - if err := c.Close(); err != nil { - t.Errorf("unexpected Close error: %v", err) - } - } - - wg.Add(2) - go pingPonger(c1) - go pingPonger(c2) - - // Start off the chain reaction. - if _, err := c1.Write(make([]byte, 8)); err != nil { - t.Errorf("unexpected c1.Write error: %v", err) - } -} - -// testRacyRead tests that it is safe to mutate the input Read buffer -// immediately after cancelation has occurred. -func testRacyRead(t *testing.T, c1, c2 net.Conn) { - go chunkedCopy(c2, rand.New(rand.NewSource(0))) - - var wg sync.WaitGroup - defer wg.Wait() - - c1.SetReadDeadline(time.Now().Add(time.Millisecond)) - for i := 0; i < 10; i++ { - wg.Add(1) - go func() { - defer wg.Done() - - b1 := make([]byte, 1024) - b2 := make([]byte, 1024) - for j := 0; j < 100; j++ { - _, err := c1.Read(b1) - copy(b1, b2) // Mutate b1 to trigger potential race - if err != nil { - checkForTimeoutError(t, err) - c1.SetReadDeadline(time.Now().Add(time.Millisecond)) - } - } - }() - } -} - -// testRacyWrite tests that it is safe to mutate the input Write buffer -// immediately after cancelation has occurred. -func testRacyWrite(t *testing.T, c1, c2 net.Conn) { - go chunkedCopy(ioutil.Discard, c2) - - var wg sync.WaitGroup - defer wg.Wait() - - c1.SetWriteDeadline(time.Now().Add(time.Millisecond)) - for i := 0; i < 10; i++ { - wg.Add(1) - go func() { - defer wg.Done() - - b1 := make([]byte, 1024) - b2 := make([]byte, 1024) - for j := 0; j < 100; j++ { - _, err := c1.Write(b1) - copy(b1, b2) // Mutate b1 to trigger potential race - if err != nil { - checkForTimeoutError(t, err) - c1.SetWriteDeadline(time.Now().Add(time.Millisecond)) - } - } - }() - } -} - -// testReadTimeout tests that Read timeouts do not affect Write. -func testReadTimeout(t *testing.T, c1, c2 net.Conn) { - go chunkedCopy(ioutil.Discard, c2) - - c1.SetReadDeadline(aLongTimeAgo) - _, err := c1.Read(make([]byte, 1024)) - checkForTimeoutError(t, err) - if _, err := c1.Write(make([]byte, 1024)); err != nil { - t.Errorf("unexpected Write error: %v", err) - } -} - -// testWriteTimeout tests that Write timeouts do not affect Read. -func testWriteTimeout(t *testing.T, c1, c2 net.Conn) { - go chunkedCopy(c2, rand.New(rand.NewSource(0))) - - c1.SetWriteDeadline(aLongTimeAgo) - _, err := c1.Write(make([]byte, 1024)) - checkForTimeoutError(t, err) - if _, err := c1.Read(make([]byte, 1024)); err != nil { - t.Errorf("unexpected Read error: %v", err) - } -} - -// testPastTimeout tests that a deadline set in the past immediately times out -// Read and Write requests. -func testPastTimeout(t *testing.T, c1, c2 net.Conn) { - go chunkedCopy(c2, c2) - - testRoundtrip(t, c1) - - c1.SetDeadline(aLongTimeAgo) - n, err := c1.Write(make([]byte, 1024)) - if n != 0 { - t.Errorf("unexpected Write count: got %d, want 0", n) - } - checkForTimeoutError(t, err) - n, err = c1.Read(make([]byte, 1024)) - if n != 0 { - t.Errorf("unexpected Read count: got %d, want 0", n) - } - checkForTimeoutError(t, err) - - testRoundtrip(t, c1) -} - -// testPresentTimeout tests that a deadline set while there are pending -// Read and Write operations immediately times out those operations. -func testPresentTimeout(t *testing.T, c1, c2 net.Conn) { - var wg sync.WaitGroup - defer wg.Wait() - wg.Add(3) - - deadlineSet := make(chan bool, 1) - go func() { - defer wg.Done() - time.Sleep(100 * time.Millisecond) - deadlineSet <- true - c1.SetReadDeadline(aLongTimeAgo) - c1.SetWriteDeadline(aLongTimeAgo) - }() - go func() { - defer wg.Done() - n, err := c1.Read(make([]byte, 1024)) - if n != 0 { - t.Errorf("unexpected Read count: got %d, want 0", n) - } - checkForTimeoutError(t, err) - if len(deadlineSet) == 0 { - t.Error("Read timed out before deadline is set") - } - }() - go func() { - defer wg.Done() - var err error - for err == nil { - _, err = c1.Write(make([]byte, 1024)) - } - checkForTimeoutError(t, err) - if len(deadlineSet) == 0 { - t.Error("Write timed out before deadline is set") - } - }() -} - -// testFutureTimeout tests that a future deadline will eventually time out -// Read and Write operations. -func testFutureTimeout(t *testing.T, c1, c2 net.Conn) { - var wg sync.WaitGroup - wg.Add(2) - - c1.SetDeadline(time.Now().Add(100 * time.Millisecond)) - go func() { - defer wg.Done() - _, err := c1.Read(make([]byte, 1024)) - checkForTimeoutError(t, err) - }() - go func() { - defer wg.Done() - var err error - for err == nil { - _, err = c1.Write(make([]byte, 1024)) - } - checkForTimeoutError(t, err) - }() - wg.Wait() - - go chunkedCopy(c2, c2) - resyncConn(t, c1) - testRoundtrip(t, c1) -} - -// testCloseTimeout tests that calling Close immediately times out pending -// Read and Write operations. -func testCloseTimeout(t *testing.T, c1, c2 net.Conn) { - go chunkedCopy(c2, c2) - - var wg sync.WaitGroup - defer wg.Wait() - wg.Add(3) - - // Test for cancelation upon connection closure. - c1.SetDeadline(neverTimeout) - go func() { - defer wg.Done() - time.Sleep(100 * time.Millisecond) - c1.Close() - }() - go func() { - defer wg.Done() - var err error - buf := make([]byte, 1024) - for err == nil { - _, err = c1.Read(buf) - } - }() - go func() { - defer wg.Done() - var err error - buf := make([]byte, 1024) - for err == nil { - _, err = c1.Write(buf) - } - }() -} - -// testConcurrentMethods tests that the methods of net.Conn can safely -// be called concurrently. -func testConcurrentMethods(t *testing.T, c1, c2 net.Conn) { - if runtime.GOOS == "plan9" { - t.Skip("skipping on plan9; see https://golang.org/issue/20489") - } - go chunkedCopy(c2, c2) - - // The results of the calls may be nonsensical, but this should - // not trigger a race detector warning. - var wg sync.WaitGroup - for i := 0; i < 100; i++ { - wg.Add(7) - go func() { - defer wg.Done() - c1.Read(make([]byte, 1024)) - }() - go func() { - defer wg.Done() - c1.Write(make([]byte, 1024)) - }() - go func() { - defer wg.Done() - c1.SetDeadline(time.Now().Add(10 * time.Millisecond)) - }() - go func() { - defer wg.Done() - c1.SetReadDeadline(aLongTimeAgo) - }() - go func() { - defer wg.Done() - c1.SetWriteDeadline(aLongTimeAgo) - }() - go func() { - defer wg.Done() - c1.LocalAddr() - }() - go func() { - defer wg.Done() - c1.RemoteAddr() - }() - } - wg.Wait() // At worst, the deadline is set 10ms into the future - - resyncConn(t, c1) - testRoundtrip(t, c1) -} - -// checkForTimeoutError checks that the error satisfies the Error interface -// and that Timeout returns true. -func checkForTimeoutError(t *testing.T, err error) { - if nerr, ok := err.(net.Error); ok { - if !nerr.Timeout() { - t.Errorf("err.Timeout() = false, want true") - } - } else { - t.Errorf("got %T, want net.Error", err) - } -} - -// testRoundtrip writes something into c and reads it back. -// It assumes that everything written into c is echoed back to itself. -func testRoundtrip(t *testing.T, c net.Conn) { - if err := c.SetDeadline(neverTimeout); err != nil { - t.Errorf("roundtrip SetDeadline error: %v", err) - } - - const s = "Hello, world!" - buf := []byte(s) - if _, err := c.Write(buf); err != nil { - t.Errorf("roundtrip Write error: %v", err) - } - if _, err := io.ReadFull(c, buf); err != nil { - t.Errorf("roundtrip Read error: %v", err) - } - if string(buf) != s { - t.Errorf("roundtrip data mismatch: got %q, want %q", buf, s) - } -} - -// resyncConn resynchronizes the connection into a sane state. -// It assumes that everything written into c is echoed back to itself. -// It assumes that 0xff is not currently on the wire or in the read buffer. -func resyncConn(t *testing.T, c net.Conn) { - c.SetDeadline(neverTimeout) - errCh := make(chan error) - go func() { - _, err := c.Write([]byte{0xff}) - errCh <- err - }() - buf := make([]byte, 1024) - for { - n, err := c.Read(buf) - if n > 0 && bytes.IndexByte(buf[:n], 0xff) == n-1 { - break - } - if err != nil { - t.Errorf("unexpected Read error: %v", err) - break - } - } - if err := <-errCh; err != nil { - t.Errorf("unexpected Write error: %v", err) - } -} - -// chunkedCopy copies from r to w in fixed-width chunks to avoid -// causing a Write that exceeds the maximum packet size for packet-based -// connections like "unixpacket". -// We assume that the maximum packet size is at least 1024. -func chunkedCopy(w io.Writer, r io.Reader) error { - b := make([]byte, 1024) - _, err := io.CopyBuffer(struct{ io.Writer }{w}, struct{ io.Reader }{r}, b) - return err -} diff --git a/deps/golang.org/x/net/nettest/conntest_go16.go b/deps/golang.org/x/net/nettest/conntest_go16.go deleted file mode 100644 index 4cbf48e35..000000000 --- a/deps/golang.org/x/net/nettest/conntest_go16.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package nettest - -import "testing" - -func testConn(t *testing.T, mp MakePipe) { - // Avoid using subtests on Go 1.6 and below. - timeoutWrapper(t, mp, testBasicIO) - timeoutWrapper(t, mp, testPingPong) - timeoutWrapper(t, mp, testRacyRead) - timeoutWrapper(t, mp, testRacyWrite) - timeoutWrapper(t, mp, testReadTimeout) - timeoutWrapper(t, mp, testWriteTimeout) - timeoutWrapper(t, mp, testPastTimeout) - timeoutWrapper(t, mp, testPresentTimeout) - timeoutWrapper(t, mp, testFutureTimeout) - timeoutWrapper(t, mp, testCloseTimeout) - timeoutWrapper(t, mp, testConcurrentMethods) -} diff --git a/deps/golang.org/x/net/nettest/conntest_go17.go b/deps/golang.org/x/net/nettest/conntest_go17.go deleted file mode 100644 index fa039f03f..000000000 --- a/deps/golang.org/x/net/nettest/conntest_go17.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -package nettest - -import "testing" - -func testConn(t *testing.T, mp MakePipe) { - // Use subtests on Go 1.7 and above since it is better organized. - t.Run("BasicIO", func(t *testing.T) { timeoutWrapper(t, mp, testBasicIO) }) - t.Run("PingPong", func(t *testing.T) { timeoutWrapper(t, mp, testPingPong) }) - t.Run("RacyRead", func(t *testing.T) { timeoutWrapper(t, mp, testRacyRead) }) - t.Run("RacyWrite", func(t *testing.T) { timeoutWrapper(t, mp, testRacyWrite) }) - t.Run("ReadTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testReadTimeout) }) - t.Run("WriteTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testWriteTimeout) }) - t.Run("PastTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPastTimeout) }) - t.Run("PresentTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testPresentTimeout) }) - t.Run("FutureTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testFutureTimeout) }) - t.Run("CloseTimeout", func(t *testing.T) { timeoutWrapper(t, mp, testCloseTimeout) }) - t.Run("ConcurrentMethods", func(t *testing.T) { timeoutWrapper(t, mp, testConcurrentMethods) }) -} diff --git a/deps/golang.org/x/net/nettest/conntest_test.go b/deps/golang.org/x/net/nettest/conntest_test.go deleted file mode 100644 index 9f9453fb5..000000000 --- a/deps/golang.org/x/net/nettest/conntest_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.8 - -package nettest - -import ( - "net" - "os" - "runtime" - "testing" - - "golang.org/x/net/internal/nettest" -) - -func TestTestConn(t *testing.T) { - tests := []struct{ name, network string }{ - {"TCP", "tcp"}, - {"UnixPipe", "unix"}, - {"UnixPacketPipe", "unixpacket"}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if !nettest.TestableNetwork(tt.network) { - t.Skipf("not supported on %s", runtime.GOOS) - } - - mp := func() (c1, c2 net.Conn, stop func(), err error) { - ln, err := nettest.NewLocalListener(tt.network) - if err != nil { - return nil, nil, nil, err - } - - // Start a connection between two endpoints. - var err1, err2 error - done := make(chan bool) - go func() { - c2, err2 = ln.Accept() - close(done) - }() - c1, err1 = net.Dial(ln.Addr().Network(), ln.Addr().String()) - <-done - - stop = func() { - if err1 == nil { - c1.Close() - } - if err2 == nil { - c2.Close() - } - ln.Close() - switch tt.network { - case "unix", "unixpacket": - os.Remove(ln.Addr().String()) - } - } - - switch { - case err1 != nil: - stop() - return nil, nil, nil, err1 - case err2 != nil: - stop() - return nil, nil, nil, err2 - default: - return c1, c2, stop, nil - } - } - - TestConn(t, mp) - }) - } -} diff --git a/deps/golang.org/x/net/netutil/listen.go b/deps/golang.org/x/net/netutil/listen.go deleted file mode 100644 index cee46e331..000000000 --- a/deps/golang.org/x/net/netutil/listen.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package netutil provides network utility functions, complementing the more -// common ones in the net package. -package netutil // import "golang.org/x/net/netutil" - -import ( - "net" - "sync" -) - -// LimitListener returns a Listener that accepts at most n simultaneous -// connections from the provided Listener. -func LimitListener(l net.Listener, n int) net.Listener { - return &limitListener{ - Listener: l, - sem: make(chan struct{}, n), - done: make(chan struct{}), - } -} - -type limitListener struct { - net.Listener - sem chan struct{} - closeOnce sync.Once // ensures the done chan is only closed once - done chan struct{} // no values sent; closed when Close is called -} - -// acquire acquires the limiting semaphore. Returns true if successfully -// accquired, false if the listener is closed and the semaphore is not -// acquired. -func (l *limitListener) acquire() bool { - select { - case <-l.done: - return false - case l.sem <- struct{}{}: - return true - } -} -func (l *limitListener) release() { <-l.sem } - -func (l *limitListener) Accept() (net.Conn, error) { - acquired := l.acquire() - // If the semaphore isn't acquired because the listener was closed, expect - // that this call to accept won't block, but immediately return an error. - c, err := l.Listener.Accept() - if err != nil { - if acquired { - l.release() - } - return nil, err - } - return &limitListenerConn{Conn: c, release: l.release}, nil -} - -func (l *limitListener) Close() error { - err := l.Listener.Close() - l.closeOnce.Do(func() { close(l.done) }) - return err -} - -type limitListenerConn struct { - net.Conn - releaseOnce sync.Once - release func() -} - -func (l *limitListenerConn) Close() error { - err := l.Conn.Close() - l.releaseOnce.Do(l.release) - return err -} diff --git a/deps/golang.org/x/net/netutil/listen_test.go b/deps/golang.org/x/net/netutil/listen_test.go deleted file mode 100644 index f40c9aa92..000000000 --- a/deps/golang.org/x/net/netutil/listen_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package netutil - -import ( - "errors" - "fmt" - "io" - "io/ioutil" - "net" - "net/http" - "sync" - "sync/atomic" - "testing" - "time" - - "golang.org/x/net/internal/nettest" -) - -func TestLimitListener(t *testing.T) { - const max = 5 - attempts := (nettest.MaxOpenFiles() - max) / 2 - if attempts > 256 { // maximum length of accept queue is 128 by default - attempts = 256 - } - - l, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - t.Fatal(err) - } - defer l.Close() - l = LimitListener(l, max) - - var open int32 - go http.Serve(l, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if n := atomic.AddInt32(&open, 1); n > max { - t.Errorf("%d open connections, want <= %d", n, max) - } - defer atomic.AddInt32(&open, -1) - time.Sleep(10 * time.Millisecond) - fmt.Fprint(w, "some body") - })) - - var wg sync.WaitGroup - var failed int32 - for i := 0; i < attempts; i++ { - wg.Add(1) - go func() { - defer wg.Done() - c := http.Client{Timeout: 3 * time.Second} - r, err := c.Get("http://" + l.Addr().String()) - if err != nil { - t.Log(err) - atomic.AddInt32(&failed, 1) - return - } - defer r.Body.Close() - io.Copy(ioutil.Discard, r.Body) - }() - } - wg.Wait() - - // We expect some Gets to fail as the kernel's accept queue is filled, - // but most should succeed. - if int(failed) >= attempts/2 { - t.Errorf("%d requests failed within %d attempts", failed, attempts) - } -} - -type errorListener struct { - net.Listener -} - -func (errorListener) Accept() (net.Conn, error) { - return nil, errFake -} - -var errFake = errors.New("fake error from errorListener") - -// This used to hang. -func TestLimitListenerError(t *testing.T) { - donec := make(chan bool, 1) - go func() { - const n = 2 - ll := LimitListener(errorListener{}, n) - for i := 0; i < n+1; i++ { - _, err := ll.Accept() - if err != errFake { - t.Fatalf("Accept error = %v; want errFake", err) - } - } - donec <- true - }() - select { - case <-donec: - case <-time.After(5 * time.Second): - t.Fatal("timeout. deadlock?") - } -} - -func TestLimitListenerClose(t *testing.T) { - ln, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - t.Fatal(err) - } - defer ln.Close() - ln = LimitListener(ln, 1) - - doneCh := make(chan struct{}) - defer close(doneCh) - go func() { - c, err := net.Dial("tcp", ln.Addr().String()) - if err != nil { - t.Fatal(err) - } - defer c.Close() - <-doneCh - }() - - c, err := ln.Accept() - if err != nil { - t.Fatal(err) - } - defer c.Close() - - acceptDone := make(chan struct{}) - go func() { - c, err := ln.Accept() - if err == nil { - c.Close() - t.Errorf("Unexpected successful Accept()") - } - close(acceptDone) - }() - - // Wait a tiny bit to ensure the Accept() is blocking. - time.Sleep(10 * time.Millisecond) - ln.Close() - - select { - case <-acceptDone: - case <-time.After(5 * time.Second): - t.Fatalf("Accept() still blocking") - } -} diff --git a/deps/golang.org/x/net/proxy/direct.go b/deps/golang.org/x/net/proxy/direct.go deleted file mode 100644 index 4c5ad88b1..000000000 --- a/deps/golang.org/x/net/proxy/direct.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package proxy - -import ( - "net" -) - -type direct struct{} - -// Direct is a direct proxy: one that makes network connections directly. -var Direct = direct{} - -func (direct) Dial(network, addr string) (net.Conn, error) { - return net.Dial(network, addr) -} diff --git a/deps/golang.org/x/net/proxy/per_host.go b/deps/golang.org/x/net/proxy/per_host.go deleted file mode 100644 index 0689bb6a7..000000000 --- a/deps/golang.org/x/net/proxy/per_host.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package proxy - -import ( - "net" - "strings" -) - -// A PerHost directs connections to a default Dialer unless the host name -// requested matches one of a number of exceptions. -type PerHost struct { - def, bypass Dialer - - bypassNetworks []*net.IPNet - bypassIPs []net.IP - bypassZones []string - bypassHosts []string -} - -// NewPerHost returns a PerHost Dialer that directs connections to either -// defaultDialer or bypass, depending on whether the connection matches one of -// the configured rules. -func NewPerHost(defaultDialer, bypass Dialer) *PerHost { - return &PerHost{ - def: defaultDialer, - bypass: bypass, - } -} - -// Dial connects to the address addr on the given network through either -// defaultDialer or bypass. -func (p *PerHost) Dial(network, addr string) (c net.Conn, err error) { - host, _, err := net.SplitHostPort(addr) - if err != nil { - return nil, err - } - - return p.dialerForRequest(host).Dial(network, addr) -} - -func (p *PerHost) dialerForRequest(host string) Dialer { - if ip := net.ParseIP(host); ip != nil { - for _, net := range p.bypassNetworks { - if net.Contains(ip) { - return p.bypass - } - } - for _, bypassIP := range p.bypassIPs { - if bypassIP.Equal(ip) { - return p.bypass - } - } - return p.def - } - - for _, zone := range p.bypassZones { - if strings.HasSuffix(host, zone) { - return p.bypass - } - if host == zone[1:] { - // For a zone ".example.com", we match "example.com" - // too. - return p.bypass - } - } - for _, bypassHost := range p.bypassHosts { - if bypassHost == host { - return p.bypass - } - } - return p.def -} - -// AddFromString parses a string that contains comma-separated values -// specifying hosts that should use the bypass proxy. Each value is either an -// IP address, a CIDR range, a zone (*.example.com) or a host name -// (localhost). A best effort is made to parse the string and errors are -// ignored. -func (p *PerHost) AddFromString(s string) { - hosts := strings.Split(s, ",") - for _, host := range hosts { - host = strings.TrimSpace(host) - if len(host) == 0 { - continue - } - if strings.Contains(host, "/") { - // We assume that it's a CIDR address like 127.0.0.0/8 - if _, net, err := net.ParseCIDR(host); err == nil { - p.AddNetwork(net) - } - continue - } - if ip := net.ParseIP(host); ip != nil { - p.AddIP(ip) - continue - } - if strings.HasPrefix(host, "*.") { - p.AddZone(host[1:]) - continue - } - p.AddHost(host) - } -} - -// AddIP specifies an IP address that will use the bypass proxy. Note that -// this will only take effect if a literal IP address is dialed. A connection -// to a named host will never match an IP. -func (p *PerHost) AddIP(ip net.IP) { - p.bypassIPs = append(p.bypassIPs, ip) -} - -// AddNetwork specifies an IP range that will use the bypass proxy. Note that -// this will only take effect if a literal IP address is dialed. A connection -// to a named host will never match. -func (p *PerHost) AddNetwork(net *net.IPNet) { - p.bypassNetworks = append(p.bypassNetworks, net) -} - -// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of -// "example.com" matches "example.com" and all of its subdomains. -func (p *PerHost) AddZone(zone string) { - if strings.HasSuffix(zone, ".") { - zone = zone[:len(zone)-1] - } - if !strings.HasPrefix(zone, ".") { - zone = "." + zone - } - p.bypassZones = append(p.bypassZones, zone) -} - -// AddHost specifies a host name that will use the bypass proxy. -func (p *PerHost) AddHost(host string) { - if strings.HasSuffix(host, ".") { - host = host[:len(host)-1] - } - p.bypassHosts = append(p.bypassHosts, host) -} diff --git a/deps/golang.org/x/net/proxy/per_host_test.go b/deps/golang.org/x/net/proxy/per_host_test.go deleted file mode 100644 index a7d809571..000000000 --- a/deps/golang.org/x/net/proxy/per_host_test.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package proxy - -import ( - "errors" - "net" - "reflect" - "testing" -) - -type recordingProxy struct { - addrs []string -} - -func (r *recordingProxy) Dial(network, addr string) (net.Conn, error) { - r.addrs = append(r.addrs, addr) - return nil, errors.New("recordingProxy") -} - -func TestPerHost(t *testing.T) { - var def, bypass recordingProxy - perHost := NewPerHost(&def, &bypass) - perHost.AddFromString("localhost,*.zone,127.0.0.1,10.0.0.1/8,1000::/16") - - expectedDef := []string{ - "example.com:123", - "1.2.3.4:123", - "[1001::]:123", - } - expectedBypass := []string{ - "localhost:123", - "zone:123", - "foo.zone:123", - "127.0.0.1:123", - "10.1.2.3:123", - "[1000::]:123", - } - - for _, addr := range expectedDef { - perHost.Dial("tcp", addr) - } - for _, addr := range expectedBypass { - perHost.Dial("tcp", addr) - } - - if !reflect.DeepEqual(expectedDef, def.addrs) { - t.Errorf("Hosts which went to the default proxy didn't match. Got %v, want %v", def.addrs, expectedDef) - } - if !reflect.DeepEqual(expectedBypass, bypass.addrs) { - t.Errorf("Hosts which went to the bypass proxy didn't match. Got %v, want %v", bypass.addrs, expectedBypass) - } -} diff --git a/deps/golang.org/x/net/proxy/proxy.go b/deps/golang.org/x/net/proxy/proxy.go deleted file mode 100644 index 553ead7cf..000000000 --- a/deps/golang.org/x/net/proxy/proxy.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package proxy provides support for a variety of protocols to proxy network -// data. -package proxy // import "golang.org/x/net/proxy" - -import ( - "errors" - "net" - "net/url" - "os" - "sync" -) - -// A Dialer is a means to establish a connection. -type Dialer interface { - // Dial connects to the given address via the proxy. - Dial(network, addr string) (c net.Conn, err error) -} - -// Auth contains authentication parameters that specific Dialers may require. -type Auth struct { - User, Password string -} - -// FromEnvironment returns the dialer specified by the proxy related variables in -// the environment. -func FromEnvironment() Dialer { - allProxy := allProxyEnv.Get() - if len(allProxy) == 0 { - return Direct - } - - proxyURL, err := url.Parse(allProxy) - if err != nil { - return Direct - } - proxy, err := FromURL(proxyURL, Direct) - if err != nil { - return Direct - } - - noProxy := noProxyEnv.Get() - if len(noProxy) == 0 { - return proxy - } - - perHost := NewPerHost(proxy, Direct) - perHost.AddFromString(noProxy) - return perHost -} - -// proxySchemes is a map from URL schemes to a function that creates a Dialer -// from a URL with such a scheme. -var proxySchemes map[string]func(*url.URL, Dialer) (Dialer, error) - -// RegisterDialerType takes a URL scheme and a function to generate Dialers from -// a URL with that scheme and a forwarding Dialer. Registered schemes are used -// by FromURL. -func RegisterDialerType(scheme string, f func(*url.URL, Dialer) (Dialer, error)) { - if proxySchemes == nil { - proxySchemes = make(map[string]func(*url.URL, Dialer) (Dialer, error)) - } - proxySchemes[scheme] = f -} - -// FromURL returns a Dialer given a URL specification and an underlying -// Dialer for it to make network requests. -func FromURL(u *url.URL, forward Dialer) (Dialer, error) { - var auth *Auth - if u.User != nil { - auth = new(Auth) - auth.User = u.User.Username() - if p, ok := u.User.Password(); ok { - auth.Password = p - } - } - - switch u.Scheme { - case "socks5": - return SOCKS5("tcp", u.Host, auth, forward) - } - - // If the scheme doesn't match any of the built-in schemes, see if it - // was registered by another package. - if proxySchemes != nil { - if f, ok := proxySchemes[u.Scheme]; ok { - return f(u, forward) - } - } - - return nil, errors.New("proxy: unknown scheme: " + u.Scheme) -} - -var ( - allProxyEnv = &envOnce{ - names: []string{"ALL_PROXY", "all_proxy"}, - } - noProxyEnv = &envOnce{ - names: []string{"NO_PROXY", "no_proxy"}, - } -) - -// envOnce looks up an environment variable (optionally by multiple -// names) once. It mitigates expensive lookups on some platforms -// (e.g. Windows). -// (Borrowed from net/http/transport.go) -type envOnce struct { - names []string - once sync.Once - val string -} - -func (e *envOnce) Get() string { - e.once.Do(e.init) - return e.val -} - -func (e *envOnce) init() { - for _, n := range e.names { - e.val = os.Getenv(n) - if e.val != "" { - return - } - } -} - -// reset is used by tests -func (e *envOnce) reset() { - e.once = sync.Once{} - e.val = "" -} diff --git a/deps/golang.org/x/net/proxy/proxy_test.go b/deps/golang.org/x/net/proxy/proxy_test.go deleted file mode 100644 index 0be1b422a..000000000 --- a/deps/golang.org/x/net/proxy/proxy_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package proxy - -import ( - "bytes" - "fmt" - "net/url" - "os" - "strings" - "testing" - - "golang.org/x/net/internal/sockstest" -) - -type proxyFromEnvTest struct { - allProxyEnv string - noProxyEnv string - wantTypeOf Dialer -} - -func (t proxyFromEnvTest) String() string { - var buf bytes.Buffer - space := func() { - if buf.Len() > 0 { - buf.WriteByte(' ') - } - } - if t.allProxyEnv != "" { - fmt.Fprintf(&buf, "all_proxy=%q", t.allProxyEnv) - } - if t.noProxyEnv != "" { - space() - fmt.Fprintf(&buf, "no_proxy=%q", t.noProxyEnv) - } - return strings.TrimSpace(buf.String()) -} - -func TestFromEnvironment(t *testing.T) { - ResetProxyEnv() - - type dummyDialer struct { - direct - } - - RegisterDialerType("irc", func(_ *url.URL, _ Dialer) (Dialer, error) { - return dummyDialer{}, nil - }) - - proxyFromEnvTests := []proxyFromEnvTest{ - {allProxyEnv: "127.0.0.1:8080", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}}, - {allProxyEnv: "ftp://example.com:8000", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}}, - {allProxyEnv: "socks5://example.com:8080", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: &PerHost{}}, - {allProxyEnv: "irc://example.com:8000", wantTypeOf: dummyDialer{}}, - {noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}}, - {wantTypeOf: direct{}}, - } - - for _, tt := range proxyFromEnvTests { - os.Setenv("ALL_PROXY", tt.allProxyEnv) - os.Setenv("NO_PROXY", tt.noProxyEnv) - ResetCachedEnvironment() - - d := FromEnvironment() - if got, want := fmt.Sprintf("%T", d), fmt.Sprintf("%T", tt.wantTypeOf); got != want { - t.Errorf("%v: got type = %T, want %T", tt, d, tt.wantTypeOf) - } - } -} - -func TestFromURL(t *testing.T) { - ss, err := sockstest.NewServer(sockstest.NoAuthRequired, sockstest.NoProxyRequired) - if err != nil { - t.Fatal(err) - } - defer ss.Close() - url, err := url.Parse("socks5://user:password@" + ss.Addr().String()) - if err != nil { - t.Fatal(err) - } - proxy, err := FromURL(url, nil) - if err != nil { - t.Fatal(err) - } - c, err := proxy.Dial("tcp", "fqdn.doesnotexist:5963") - if err != nil { - t.Fatal(err) - } - c.Close() -} - -func TestSOCKS5(t *testing.T) { - ss, err := sockstest.NewServer(sockstest.NoAuthRequired, sockstest.NoProxyRequired) - if err != nil { - t.Fatal(err) - } - defer ss.Close() - proxy, err := SOCKS5("tcp", ss.Addr().String(), nil, nil) - if err != nil { - t.Fatal(err) - } - c, err := proxy.Dial("tcp", ss.TargetAddr().String()) - if err != nil { - t.Fatal(err) - } - c.Close() -} - -func ResetProxyEnv() { - for _, env := range []*envOnce{allProxyEnv, noProxyEnv} { - for _, v := range env.names { - os.Setenv(v, "") - } - } - ResetCachedEnvironment() -} - -func ResetCachedEnvironment() { - allProxyEnv.reset() - noProxyEnv.reset() -} diff --git a/deps/golang.org/x/net/proxy/socks5.go b/deps/golang.org/x/net/proxy/socks5.go deleted file mode 100644 index 56345ec8b..000000000 --- a/deps/golang.org/x/net/proxy/socks5.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package proxy - -import ( - "context" - "net" - - "golang.org/x/net/internal/socks" -) - -// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given -// address with an optional username and password. -// See RFC 1928 and RFC 1929. -func SOCKS5(network, address string, auth *Auth, forward Dialer) (Dialer, error) { - d := socks.NewDialer(network, address) - if forward != nil { - d.ProxyDial = func(_ context.Context, network string, address string) (net.Conn, error) { - return forward.Dial(network, address) - } - } - if auth != nil { - up := socks.UsernamePassword{ - Username: auth.User, - Password: auth.Password, - } - d.AuthMethods = []socks.AuthMethod{ - socks.AuthMethodNotRequired, - socks.AuthMethodUsernamePassword, - } - d.Authenticate = up.Authenticate - } - return d, nil -} diff --git a/deps/golang.org/x/net/publicsuffix/gen.go b/deps/golang.org/x/net/publicsuffix/gen.go deleted file mode 100644 index f85a3c32b..000000000 --- a/deps/golang.org/x/net/publicsuffix/gen.go +++ /dev/null @@ -1,713 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -// This program generates table.go and table_test.go based on the authoritative -// public suffix list at https://publicsuffix.org/list/effective_tld_names.dat -// -// The version is derived from -// https://api.github.com/repos/publicsuffix/list/commits?path=public_suffix_list.dat -// and a human-readable form is at -// https://github.com/publicsuffix/list/commits/master/public_suffix_list.dat -// -// To fetch a particular git revision, such as 5c70ccd250, pass -// -url "https://raw.githubusercontent.com/publicsuffix/list/5c70ccd250/public_suffix_list.dat" -// and -version "an explicit version string". - -import ( - "bufio" - "bytes" - "flag" - "fmt" - "go/format" - "io" - "io/ioutil" - "net/http" - "os" - "regexp" - "sort" - "strings" - - "golang.org/x/net/idna" -) - -const ( - // These sum of these four values must be no greater than 32. - nodesBitsChildren = 10 - nodesBitsICANN = 1 - nodesBitsTextOffset = 15 - nodesBitsTextLength = 6 - - // These sum of these four values must be no greater than 32. - childrenBitsWildcard = 1 - childrenBitsNodeType = 2 - childrenBitsHi = 14 - childrenBitsLo = 14 -) - -var ( - maxChildren int - maxTextOffset int - maxTextLength int - maxHi uint32 - maxLo uint32 -) - -func max(a, b int) int { - if a < b { - return b - } - return a -} - -func u32max(a, b uint32) uint32 { - if a < b { - return b - } - return a -} - -const ( - nodeTypeNormal = 0 - nodeTypeException = 1 - nodeTypeParentOnly = 2 - numNodeType = 3 -) - -func nodeTypeStr(n int) string { - switch n { - case nodeTypeNormal: - return "+" - case nodeTypeException: - return "!" - case nodeTypeParentOnly: - return "o" - } - panic("unreachable") -} - -const ( - defaultURL = "https://publicsuffix.org/list/effective_tld_names.dat" - gitCommitURL = "https://api.github.com/repos/publicsuffix/list/commits?path=public_suffix_list.dat" -) - -var ( - labelEncoding = map[string]uint32{} - labelsList = []string{} - labelsMap = map[string]bool{} - rules = []string{} - - // validSuffixRE is used to check that the entries in the public suffix - // list are in canonical form (after Punycode encoding). Specifically, - // capital letters are not allowed. - validSuffixRE = regexp.MustCompile(`^[a-z0-9_\!\*\-\.]+$`) - - shaRE = regexp.MustCompile(`"sha":"([^"]+)"`) - dateRE = regexp.MustCompile(`"committer":{[^{]+"date":"([^"]+)"`) - - comments = flag.Bool("comments", false, "generate table.go comments, for debugging") - subset = flag.Bool("subset", false, "generate only a subset of the full table, for debugging") - url = flag.String("url", defaultURL, "URL of the publicsuffix.org list. If empty, stdin is read instead") - v = flag.Bool("v", false, "verbose output (to stderr)") - version = flag.String("version", "", "the effective_tld_names.dat version") -) - -func main() { - if err := main1(); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - -func main1() error { - flag.Parse() - if nodesBitsTextLength+nodesBitsTextOffset+nodesBitsICANN+nodesBitsChildren > 32 { - return fmt.Errorf("not enough bits to encode the nodes table") - } - if childrenBitsLo+childrenBitsHi+childrenBitsNodeType+childrenBitsWildcard > 32 { - return fmt.Errorf("not enough bits to encode the children table") - } - if *version == "" { - if *url != defaultURL { - return fmt.Errorf("-version was not specified, and the -url is not the default one") - } - sha, date, err := gitCommit() - if err != nil { - return err - } - *version = fmt.Sprintf("publicsuffix.org's public_suffix_list.dat, git revision %s (%s)", sha, date) - } - var r io.Reader = os.Stdin - if *url != "" { - res, err := http.Get(*url) - if err != nil { - return err - } - if res.StatusCode != http.StatusOK { - return fmt.Errorf("bad GET status for %s: %d", *url, res.Status) - } - r = res.Body - defer res.Body.Close() - } - - var root node - icann := false - br := bufio.NewReader(r) - for { - s, err := br.ReadString('\n') - if err != nil { - if err == io.EOF { - break - } - return err - } - s = strings.TrimSpace(s) - if strings.Contains(s, "BEGIN ICANN DOMAINS") { - icann = true - continue - } - if strings.Contains(s, "END ICANN DOMAINS") { - icann = false - continue - } - if s == "" || strings.HasPrefix(s, "//") { - continue - } - s, err = idna.ToASCII(s) - if err != nil { - return err - } - if !validSuffixRE.MatchString(s) { - return fmt.Errorf("bad publicsuffix.org list data: %q", s) - } - - if *subset { - switch { - case s == "ac.jp" || strings.HasSuffix(s, ".ac.jp"): - case s == "ak.us" || strings.HasSuffix(s, ".ak.us"): - case s == "ao" || strings.HasSuffix(s, ".ao"): - case s == "ar" || strings.HasSuffix(s, ".ar"): - case s == "arpa" || strings.HasSuffix(s, ".arpa"): - case s == "cy" || strings.HasSuffix(s, ".cy"): - case s == "dyndns.org" || strings.HasSuffix(s, ".dyndns.org"): - case s == "jp": - case s == "kobe.jp" || strings.HasSuffix(s, ".kobe.jp"): - case s == "kyoto.jp" || strings.HasSuffix(s, ".kyoto.jp"): - case s == "om" || strings.HasSuffix(s, ".om"): - case s == "uk" || strings.HasSuffix(s, ".uk"): - case s == "uk.com" || strings.HasSuffix(s, ".uk.com"): - case s == "tw" || strings.HasSuffix(s, ".tw"): - case s == "zw" || strings.HasSuffix(s, ".zw"): - case s == "xn--p1ai" || strings.HasSuffix(s, ".xn--p1ai"): - // xn--p1ai is Russian-Cyrillic "рф". - default: - continue - } - } - - rules = append(rules, s) - - nt, wildcard := nodeTypeNormal, false - switch { - case strings.HasPrefix(s, "*."): - s, nt = s[2:], nodeTypeParentOnly - wildcard = true - case strings.HasPrefix(s, "!"): - s, nt = s[1:], nodeTypeException - } - labels := strings.Split(s, ".") - for n, i := &root, len(labels)-1; i >= 0; i-- { - label := labels[i] - n = n.child(label) - if i == 0 { - if nt != nodeTypeParentOnly && n.nodeType == nodeTypeParentOnly { - n.nodeType = nt - } - n.icann = n.icann && icann - n.wildcard = n.wildcard || wildcard - } - labelsMap[label] = true - } - } - labelsList = make([]string, 0, len(labelsMap)) - for label := range labelsMap { - labelsList = append(labelsList, label) - } - sort.Strings(labelsList) - - if err := generate(printReal, &root, "table.go"); err != nil { - return err - } - if err := generate(printTest, &root, "table_test.go"); err != nil { - return err - } - return nil -} - -func generate(p func(io.Writer, *node) error, root *node, filename string) error { - buf := new(bytes.Buffer) - if err := p(buf, root); err != nil { - return err - } - b, err := format.Source(buf.Bytes()) - if err != nil { - return err - } - return ioutil.WriteFile(filename, b, 0644) -} - -func gitCommit() (sha, date string, retErr error) { - res, err := http.Get(gitCommitURL) - if err != nil { - return "", "", err - } - if res.StatusCode != http.StatusOK { - return "", "", fmt.Errorf("bad GET status for %s: %d", gitCommitURL, res.Status) - } - defer res.Body.Close() - b, err := ioutil.ReadAll(res.Body) - if err != nil { - return "", "", err - } - if m := shaRE.FindSubmatch(b); m != nil { - sha = string(m[1]) - } - if m := dateRE.FindSubmatch(b); m != nil { - date = string(m[1]) - } - if sha == "" || date == "" { - retErr = fmt.Errorf("could not find commit SHA and date in %s", gitCommitURL) - } - return sha, date, retErr -} - -func printTest(w io.Writer, n *node) error { - fmt.Fprintf(w, "// generated by go run gen.go; DO NOT EDIT\n\n") - fmt.Fprintf(w, "package publicsuffix\n\nvar rules = [...]string{\n") - for _, rule := range rules { - fmt.Fprintf(w, "%q,\n", rule) - } - fmt.Fprintf(w, "}\n\nvar nodeLabels = [...]string{\n") - if err := n.walk(w, printNodeLabel); err != nil { - return err - } - fmt.Fprintf(w, "}\n") - return nil -} - -func printReal(w io.Writer, n *node) error { - const header = `// generated by go run gen.go; DO NOT EDIT - -package publicsuffix - -const version = %q - -const ( - nodesBitsChildren = %d - nodesBitsICANN = %d - nodesBitsTextOffset = %d - nodesBitsTextLength = %d - - childrenBitsWildcard = %d - childrenBitsNodeType = %d - childrenBitsHi = %d - childrenBitsLo = %d -) - -const ( - nodeTypeNormal = %d - nodeTypeException = %d - nodeTypeParentOnly = %d -) - -// numTLD is the number of top level domains. -const numTLD = %d - -` - fmt.Fprintf(w, header, *version, - nodesBitsChildren, nodesBitsICANN, nodesBitsTextOffset, nodesBitsTextLength, - childrenBitsWildcard, childrenBitsNodeType, childrenBitsHi, childrenBitsLo, - nodeTypeNormal, nodeTypeException, nodeTypeParentOnly, len(n.children)) - - text := combineText(labelsList) - if text == "" { - return fmt.Errorf("internal error: makeText returned no text") - } - for _, label := range labelsList { - offset, length := strings.Index(text, label), len(label) - if offset < 0 { - return fmt.Errorf("internal error: could not find %q in text %q", label, text) - } - maxTextOffset, maxTextLength = max(maxTextOffset, offset), max(maxTextLength, length) - if offset >= 1<= 1< 64 { - n, plus = 64, " +" - } - fmt.Fprintf(w, "%q%s\n", text[:n], plus) - text = text[n:] - } - - if err := n.walk(w, assignIndexes); err != nil { - return err - } - - fmt.Fprintf(w, ` - -// nodes is the list of nodes. Each node is represented as a uint32, which -// encodes the node's children, wildcard bit and node type (as an index into -// the children array), ICANN bit and text. -// -// If the table was generated with the -comments flag, there is a //-comment -// after each node's data. In it is the nodes-array indexes of the children, -// formatted as (n0x1234-n0x1256), with * denoting the wildcard bit. The -// nodeType is printed as + for normal, ! for exception, and o for parent-only -// nodes that have children but don't match a domain label in their own right. -// An I denotes an ICANN domain. -// -// The layout within the uint32, from MSB to LSB, is: -// [%2d bits] unused -// [%2d bits] children index -// [%2d bits] ICANN bit -// [%2d bits] text index -// [%2d bits] text length -var nodes = [...]uint32{ -`, - 32-nodesBitsChildren-nodesBitsICANN-nodesBitsTextOffset-nodesBitsTextLength, - nodesBitsChildren, nodesBitsICANN, nodesBitsTextOffset, nodesBitsTextLength) - if err := n.walk(w, printNode); err != nil { - return err - } - fmt.Fprintf(w, `} - -// children is the list of nodes' children, the parent's wildcard bit and the -// parent's node type. If a node has no children then their children index -// will be in the range [0, 6), depending on the wildcard bit and node type. -// -// The layout within the uint32, from MSB to LSB, is: -// [%2d bits] unused -// [%2d bits] wildcard bit -// [%2d bits] node type -// [%2d bits] high nodes index (exclusive) of children -// [%2d bits] low nodes index (inclusive) of children -var children=[...]uint32{ -`, - 32-childrenBitsWildcard-childrenBitsNodeType-childrenBitsHi-childrenBitsLo, - childrenBitsWildcard, childrenBitsNodeType, childrenBitsHi, childrenBitsLo) - for i, c := range childrenEncoding { - s := "---------------" - lo := c & (1<> childrenBitsLo) & (1<>(childrenBitsLo+childrenBitsHi)) & (1<>(childrenBitsLo+childrenBitsHi+childrenBitsNodeType) != 0 - if *comments { - fmt.Fprintf(w, "0x%08x, // c0x%04x (%s)%s %s\n", - c, i, s, wildcardStr(wildcard), nodeTypeStr(nodeType)) - } else { - fmt.Fprintf(w, "0x%x,\n", c) - } - } - fmt.Fprintf(w, "}\n\n") - fmt.Fprintf(w, "// max children %d (capacity %d)\n", maxChildren, 1<= 1<= 1<= 1< 0 && ss[0] == "" { - ss = ss[1:] - } - return ss -} - -// crush combines a list of strings, taking advantage of overlaps. It returns a -// single string that contains each input string as a substring. -func crush(ss []string) string { - maxLabelLen := 0 - for _, s := range ss { - if maxLabelLen < len(s) { - maxLabelLen = len(s) - } - } - - for prefixLen := maxLabelLen; prefixLen > 0; prefixLen-- { - prefixes := makePrefixMap(ss, prefixLen) - for i, s := range ss { - if len(s) <= prefixLen { - continue - } - mergeLabel(ss, i, prefixLen, prefixes) - } - } - - return strings.Join(ss, "") -} - -// mergeLabel merges the label at ss[i] with the first available matching label -// in prefixMap, where the last "prefixLen" characters in ss[i] match the first -// "prefixLen" characters in the matching label. -// It will merge ss[i] repeatedly until no more matches are available. -// All matching labels merged into ss[i] are replaced by "". -func mergeLabel(ss []string, i, prefixLen int, prefixes prefixMap) { - s := ss[i] - suffix := s[len(s)-prefixLen:] - for _, j := range prefixes[suffix] { - // Empty strings mean "already used." Also avoid merging with self. - if ss[j] == "" || i == j { - continue - } - if *v { - fmt.Fprintf(os.Stderr, "%d-length overlap at (%4d,%4d): %q and %q share %q\n", - prefixLen, i, j, ss[i], ss[j], suffix) - } - ss[i] += ss[j][prefixLen:] - ss[j] = "" - // ss[i] has a new suffix, so merge again if possible. - // Note: we only have to merge again at the same prefix length. Shorter - // prefix lengths will be handled in the next iteration of crush's for loop. - // Can there be matches for longer prefix lengths, introduced by the merge? - // I believe that any such matches would by necessity have been eliminated - // during substring removal or merged at a higher prefix length. For - // instance, in crush("abc", "cde", "bcdef"), combining "abc" and "cde" - // would yield "abcde", which could be merged with "bcdef." However, in - // practice "cde" would already have been elimintated by removeSubstrings. - mergeLabel(ss, i, prefixLen, prefixes) - return - } -} - -// prefixMap maps from a prefix to a list of strings containing that prefix. The -// list of strings is represented as indexes into a slice of strings stored -// elsewhere. -type prefixMap map[string][]int - -// makePrefixMap constructs a prefixMap from a slice of strings. -func makePrefixMap(ss []string, prefixLen int) prefixMap { - prefixes := make(prefixMap) - for i, s := range ss { - // We use < rather than <= because if a label matches on a prefix equal to - // its full length, that's actually a substring match handled by - // removeSubstrings. - if prefixLen < len(s) { - prefix := s[:prefixLen] - prefixes[prefix] = append(prefixes[prefix], i) - } - } - - return prefixes -} diff --git a/deps/golang.org/x/net/publicsuffix/list.go b/deps/golang.org/x/net/publicsuffix/list.go deleted file mode 100644 index 8bbf3bcd7..000000000 --- a/deps/golang.org/x/net/publicsuffix/list.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:generate go run gen.go - -// Package publicsuffix provides a public suffix list based on data from -// http://publicsuffix.org/. A public suffix is one under which Internet users -// can directly register names. -package publicsuffix // import "golang.org/x/net/publicsuffix" - -// TODO: specify case sensitivity and leading/trailing dot behavior for -// func PublicSuffix and func EffectiveTLDPlusOne. - -import ( - "fmt" - "net/http/cookiejar" - "strings" -) - -// List implements the cookiejar.PublicSuffixList interface by calling the -// PublicSuffix function. -var List cookiejar.PublicSuffixList = list{} - -type list struct{} - -func (list) PublicSuffix(domain string) string { - ps, _ := PublicSuffix(domain) - return ps -} - -func (list) String() string { - return version -} - -// PublicSuffix returns the public suffix of the domain using a copy of the -// publicsuffix.org database compiled into the library. -// -// icann is whether the public suffix is managed by the Internet Corporation -// for Assigned Names and Numbers. If not, the public suffix is privately -// managed. For example, foo.org and foo.co.uk are ICANN domains, -// foo.dyndns.org and foo.blogspot.co.uk are private domains. -// -// Use cases for distinguishing ICANN domains like foo.com from private -// domains like foo.appspot.com can be found at -// https://wiki.mozilla.org/Public_Suffix_List/Use_Cases -func PublicSuffix(domain string) (publicSuffix string, icann bool) { - lo, hi := uint32(0), uint32(numTLD) - s, suffix, wildcard := domain, len(domain), false -loop: - for { - dot := strings.LastIndex(s, ".") - if wildcard { - suffix = 1 + dot - } - if lo == hi { - break - } - f := find(s[1+dot:], lo, hi) - if f == notFound { - break - } - - u := nodes[f] >> (nodesBitsTextOffset + nodesBitsTextLength) - icann = u&(1<>= nodesBitsICANN - u = children[u&(1<>= childrenBitsLo - hi = u & (1<>= childrenBitsHi - switch u & (1<>= childrenBitsNodeType - wildcard = u&(1<>= nodesBitsTextLength - offset := x & (1< len(b[j]) -} - -// eTLDPlusOneTestCases come from -// https://github.com/publicsuffix/list/blob/master/tests/test_psl.txt -var eTLDPlusOneTestCases = []struct { - domain, want string -}{ - // Empty input. - {"", ""}, - // Unlisted TLD. - {"example", ""}, - {"example.example", "example.example"}, - {"b.example.example", "example.example"}, - {"a.b.example.example", "example.example"}, - // TLD with only 1 rule. - {"biz", ""}, - {"domain.biz", "domain.biz"}, - {"b.domain.biz", "domain.biz"}, - {"a.b.domain.biz", "domain.biz"}, - // TLD with some 2-level rules. - {"com", ""}, - {"example.com", "example.com"}, - {"b.example.com", "example.com"}, - {"a.b.example.com", "example.com"}, - {"uk.com", ""}, - {"example.uk.com", "example.uk.com"}, - {"b.example.uk.com", "example.uk.com"}, - {"a.b.example.uk.com", "example.uk.com"}, - {"test.ac", "test.ac"}, - // TLD with only 1 (wildcard) rule. - {"mm", ""}, - {"c.mm", ""}, - {"b.c.mm", "b.c.mm"}, - {"a.b.c.mm", "b.c.mm"}, - // More complex TLD. - {"jp", ""}, - {"test.jp", "test.jp"}, - {"www.test.jp", "test.jp"}, - {"ac.jp", ""}, - {"test.ac.jp", "test.ac.jp"}, - {"www.test.ac.jp", "test.ac.jp"}, - {"kyoto.jp", ""}, - {"test.kyoto.jp", "test.kyoto.jp"}, - {"ide.kyoto.jp", ""}, - {"b.ide.kyoto.jp", "b.ide.kyoto.jp"}, - {"a.b.ide.kyoto.jp", "b.ide.kyoto.jp"}, - {"c.kobe.jp", ""}, - {"b.c.kobe.jp", "b.c.kobe.jp"}, - {"a.b.c.kobe.jp", "b.c.kobe.jp"}, - {"city.kobe.jp", "city.kobe.jp"}, - {"www.city.kobe.jp", "city.kobe.jp"}, - // TLD with a wildcard rule and exceptions. - {"ck", ""}, - {"test.ck", ""}, - {"b.test.ck", "b.test.ck"}, - {"a.b.test.ck", "b.test.ck"}, - {"www.ck", "www.ck"}, - {"www.www.ck", "www.ck"}, - // US K12. - {"us", ""}, - {"test.us", "test.us"}, - {"www.test.us", "test.us"}, - {"ak.us", ""}, - {"test.ak.us", "test.ak.us"}, - {"www.test.ak.us", "test.ak.us"}, - {"k12.ak.us", ""}, - {"test.k12.ak.us", "test.k12.ak.us"}, - {"www.test.k12.ak.us", "test.k12.ak.us"}, - // Punycoded IDN labels - {"xn--85x722f.com.cn", "xn--85x722f.com.cn"}, - {"xn--85x722f.xn--55qx5d.cn", "xn--85x722f.xn--55qx5d.cn"}, - {"www.xn--85x722f.xn--55qx5d.cn", "xn--85x722f.xn--55qx5d.cn"}, - {"shishi.xn--55qx5d.cn", "shishi.xn--55qx5d.cn"}, - {"xn--55qx5d.cn", ""}, - {"xn--85x722f.xn--fiqs8s", "xn--85x722f.xn--fiqs8s"}, - {"www.xn--85x722f.xn--fiqs8s", "xn--85x722f.xn--fiqs8s"}, - {"shishi.xn--fiqs8s", "shishi.xn--fiqs8s"}, - {"xn--fiqs8s", ""}, -} - -func TestEffectiveTLDPlusOne(t *testing.T) { - for _, tc := range eTLDPlusOneTestCases { - got, _ := EffectiveTLDPlusOne(tc.domain) - if got != tc.want { - t.Errorf("%q: got %q, want %q", tc.domain, got, tc.want) - } - } -} diff --git a/deps/golang.org/x/net/publicsuffix/table.go b/deps/golang.org/x/net/publicsuffix/table.go deleted file mode 100644 index ca7f32c1f..000000000 --- a/deps/golang.org/x/net/publicsuffix/table.go +++ /dev/null @@ -1,9745 +0,0 @@ -// generated by go run gen.go; DO NOT EDIT - -package publicsuffix - -const version = "publicsuffix.org's public_suffix_list.dat, git revision 2225db8d9f4a2a27ec697c883360632fa0c16261 (2018-05-23T23:26:06Z)" - -const ( - nodesBitsChildren = 10 - nodesBitsICANN = 1 - nodesBitsTextOffset = 15 - nodesBitsTextLength = 6 - - childrenBitsWildcard = 1 - childrenBitsNodeType = 2 - childrenBitsHi = 14 - childrenBitsLo = 14 -) - -const ( - nodeTypeNormal = 0 - nodeTypeException = 1 - nodeTypeParentOnly = 2 -) - -// numTLD is the number of top level domains. -const numTLD = 1555 - -// Text is the combined text of all labels. -const text = "9guacuiababia-goracleaningroks-theatreebinagisobetsumidatlantica" + - "sertairanzanquannefrankfurtashkentatamotors3-ap-northeast-20001w" + - "wwebredirectmemsettsupport3l3p0rtargets-itargivestbytomaritimeke" + - "eping12038biomutashinaindustriabirdartcenterprisesakimobetsuitai" + - "nairforceoppdalimoliserniabirkenesoddtangenovaraholtalenikkoeben" + - "havnikolaevents3-website-eu-west-1birthplacebitballooningjovikar" + - "iyaltakasakiyosatokigawabjarkoyukuhashimoichinosekigaharabjerkre" + - "imbarclaycards3-eu-west-2bjugnieznord-aurdalpha-myqnapcloud66bla" + - "ckfridayurihonjournalisteinkjerusalembroideryusuharablancomedica" + - "ltanissettaipeiheijindustriesteamfamberkeleyusuisserveirchattano" + - "oganordkappanamatta-varjjatjmaxxxboxenapponazure-mobilebloomberg" + - "bauernuorochesterbloxcms3-website-sa-east-1bluedancebmoattachmen" + - "ts3-website-us-east-1bms3-website-us-west-1bmweddingladefensells" + - "-for-less3-website-us-west-2bnpparibaselburglassassinationalheri" + - "tagebnrwedeployuu2-localhostrowwlkpmgleezebomloabathsbcheltenham" + - "-radio-openairbusantiquest-a-la-maisondre-landroidivttasvuotnaka" + - "nojohanamakinoharabondiyuzawabonnikonanporovnobookingliwicebooml" + - "adbrokes5yboschaefflerdalvdalaskanittedallasallebesbyglandroverh" + - "alla-speziabostikarlsoybostonakijinsekikogentinglobalashovhachin" + - "ohedmarkarmoybotanicalgardeninohekinannestadnpanasonichernigover" + - "nmentjomemorialindaskvollindesnesakyotanabellunombresciabotanicg" + - "ardeninomiyakonojorpelandrangedalinkyard-cloudeitybotanybounceme" + - "rckmsdnipropetrovskjervoyagebounty-fullensakerrypropertiesalange" + - "nirasakinfinitintuitjxfinityboutiquebechernihivgubarclays3-eu-we" + - "st-3utilitiesquare7bozen-suedtirolkuszczytnord-frontierbplacedek" + - "agaminord-odalwaysdatabaseballangenoamishirasatochigiessensiosit" + - "elekommunikationishiazainuyamashinatsukigatakasagotembaixadabran" + - "dywinevalleybrasiliabrindisibenikebristoloseyouripirangap-northe" + - "ast-3britishcolumbialowiezachpomorskienishigovtkmaxxjavald-aosta" + - "plesalondonetskarpaczeladzlgloboavistaprintelligencebroadcastlef" + - "rakkestadray-dnstracebroadwaybroke-itksatxn--0trq7p7nnishiharabr" + - "okerbronnoysundrayddnsfreebox-osascoli-picenordlandraydnsupdater" + - "brothermesaverdealstahaugesunderseaportsinfolldalivornobrowsersa" + - "fetymarketsaltdalomzaporizhzhegurinvestmentsaludrivefsnillfjordr" + - "obaknoluoktagajobojinzais-a-candidatebrumunddalondrinaplesalvado" + - "rdalibabalsan-suedtirollagdenesnaaseralingenkainanaejrietisalati" + - "nabenonichernivtsiciliabrunelasticbeanstalkaruizawabrusselsalzbu" + - "rglogowegroweibolognagatorockartuzybruxellesamegawabryanskleppga" + - "fanpachigasakievennodesaarlandrudunsamnangerbrynewjerseybuskerud" + - "inewportlligatmparaglidingloppenzaolbia-tempio-olbiatempioolbial" + - "ystokkembuchikumagayagawakuyabukihokumakogenglandupontariodejane" + - "irodoybuzentsujiiebuzzparisor-fronishiizunazukis-a-catererbweirb" + - "zhitomirumalatvuopmicrolightinglugmbhartiffanycolumbusheycommuni" + - "tysvardoharuovatoystre-slidrettozawacomobaracomparemarkerryhotel" + - "sanokashiharacompute-1computerhistoryofscience-fictioncomsecurit" + - "ytacticsantabarbaracondoshichinohealth-carereformitakeharaconfer" + - "enceconstructionconsuladollsantacruzsantafedjejuifminamidaitoman" + - "dalucerneconsultanthropologyconsultingrossetouchihayaakasakawaha" + - "racontactozsdeloittemp-dnsantamariakecontagematsubaracontemporar" + - "yarteducationalchikugojomedio-campidano-mediocampidanomediocontr" + - "actorskenconventureshinodearthdfcbankashiwaracookingchannelsdvrd" + - "nsdojoetsuwanouchikujogaszkolahppiacenzagancoolukowfashioncooper" + - "ativano-frankivskoleikangercopenhagencyclopedichitachinakagawatc" + - "handclockarumaifarmsteadurhamburgmodellingmxn--11b4c3dyndns-at-w" + - "orkinggrouparliamentoyosatoyonakagyokutoyokawacorsicagliaribeira" + - "okinawashirosatochiokinoshimaizuruhrcorvettemasekashiwazakiyosem" + - "itecosenzakopanerairguardiannakadomarinebraskaunjargalsacertmgre" + - "tachikawakeisenbahncosidnsfor-better-thanawatchesantoandreamhost" + - "ersanukis-a-cubicle-slavellinotairestaurantrani-andria-barletta-" + - "trani-andriacostumedizinhistorischesaobernardownloadyndns-remote" + - "wdyndns-serverdaluroycouchpotatofriesaogoncartoonartdecologiacou" + - "ncilutskasukabedzin-the-bandaioiraseeklogesurancechirealmpmncoup" + - "onsaotomeloyalistjordalshalsencoursesapodlasiellaktyubinskiptvet" + - "erinairealtorlandyndns-webhopencraftraniandriabarlettatraniandri" + - "acq-acranbrookuwanalyticsapporocreditcardyndns-wikiracreditunion" + - "cremonashgabadaddjaguarqhachiojiyahoooshikamaishimodatecrewhalin" + - "groundhandlingroznycricketrzyncrimeast-kazakhstanangercrotonexus" + - "-3crowniparsardegnaroycrsvpartis-a-democratranoycruisesardiniacr" + - "yptonomichigangwoncuisinellair-traffic-controlleyculturalcentern" + - "opilawawhoswhokksundyndns-workisboringrpartsarluxembourgruecuneo" + - "cupcakecuritibaghdadyndns1cxn--12c1fe0bradescorporationcyberleva" + - "gangaviikanonjis-a-designercymrussiacyonabaruminamiechizencyouth" + - "eworkpccwiiheyakageferrarittoguraferreroticanonoichinomiyakefets" + - "undynservebbsarufutsunomiyawakasaikaitakoelnfguitarsassaris-a-do" + - "ctorayfhvalerfidonnakanotoddenfieldynuconnectransportefigueresin" + - "stagingujoinvillevangerfilateliafilegearfilminamiiselectrapaniiz" + - "afinalvivanovodkamisatokashikiwakunigamiharulminamiizukamishihor" + - "onobeauxartsandcraftsaudafinancefineartsauheradynv6finlandynvpnp" + - "lus-4finnoyfirebaseappartyfirenzefirestonefirmdaleirvikasumigaur" + - "awa-mazowszextraspacekitagatajirissagamiharafishingolffansavanna" + - "hgafitjarfitnessettlementravelchannelfjalerflesbergulenflickrage" + - "rotikakamigaharaflightsaves-the-whalessandria-trani-barletta-and" + - "riatranibarlettaandriaflirflogintohmalvikasuyamelbournefloraflor" + - "encefloridavvenjargaulardalfloripaderbornfloristanohatakahamamur" + - "ogawaflorogersavonarusawaflowersaxofltravelersinsuranceflynnhost" + - "ing-clusterflynnhubargainstitutelemarkarasjohkamikoaniikappueblo" + - "ckbustermezgorzeleccoffeedbackplaneapplegodoesntexisteingeekaras" + - "jokarasuyamarugame-hostrolekamiminers3-external-1fndyroyfor-ourf" + - "or-someeresistancefor-theaterforexrothachirogatakamoriokalmykiaf" + - "orgotdnsbschokokekschokoladenforsaleitungsenforsandasuololfortal" + - "fortmissoulancashireggio-calabriafortworthadanorthwesternmutualf" + - "orumzwildlifedorainfracloudcontrolappasadenaritakurashikis-a-fin" + - "ancialadvisor-aurdalfosnescholarshipschoolfotarivnefoxfordeatnur" + - "embergunmapartmentschulefozorafredrikstadtvschwarzgwangjuniperfr" + - "eeddnsgeekgalaxyfreedesktoperauniteroizumizakirovogradoyfreemaso" + - "nryfreesitevadsoccertificationfreetlschweizfreiburguovdageaidnul" + - "vikaszubyfreightrdfreseniuscountryestateofdelawarezzoologyfribou" + - "rgushikamifuranorth-kazakhstanfriuli-v-giuliafriuli-ve-giuliafri" + - "uli-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgiu" + - "liafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giul" + - "iafriuliveneziagiuliafriulivgiuliafrlfrogansciencecenterscienceh" + - "istoryfrognfrolandfrom-akrehamnfrom-alfrom-arfrom-azfrom-capebre" + - "tonamicrosoftbankatowicefrom-codynaliasdaburfrom-ctrentin-sued-t" + - "irolfrom-dchitosetogitsuldalorenskogrimstadyndns-blogdnsampagesp" + - "eedmobilizerofrom-debianfrom-flanderscientistockholmestrandfrom-" + - "gausdalfrom-hichisochildrensgardenfrom-iafrom-idfrom-ilfrom-inch" + - "eonfrom-kscjohnsonfrom-kyowariasahikawafrom-lancasterfrom-mangon" + - "ohejis-a-geekatsushikabeeldengeluidfrom-mdfrom-meethnologyfrom-m" + - "ifunefrom-mnfrom-modalenfrom-mscotlandfrom-mtnfrom-nchocolatelev" + - "isionishikatsuragit-repostre-totendofinternet-dnsamsclubindalote" + - "nkawafrom-ndfrom-nefrom-nh-serveblogsitexashorokanaiefrom-njawor" + - "znotogawafrom-nminamimakis-a-greenfrom-nv-infoodnetworkshoppingw" + - "iddlewismillerfrom-nyfrom-ohkurafrom-oketohnoshooguyfrom-orfrom-" + - "padovaksdalfrom-pratohobby-sitextileksvikatsuyamarylandfrom-ris-" + - "a-gurunzenfrom-schoenbrunnfrom-sdfrom-tnfrom-txn--12co0c3b4evall" + - "eaostaticscrapper-sitefrom-utazuerichardlikescandynamic-dnscrapp" + - "ingxn--1ck2e1barreauctionavigationavoiiyamanouchikuhokuryugasaki" + - "tchenavuotnarashinoceanographics3-fips-us-gov-west-1from-val-dao" + - "stavalleyfrom-vtrentin-suedtirolfrom-wafrom-wielunnerfrom-wvalle" + - "d-aostatoilfrom-wyfrosinonefrostalowa-wolawafroyahikobeardubaidu" + - "ckdnscrysechofunatoriginsurecreationishikawazukamitsuefstavernfu" + - "jiiderafujikawaguchikonefujiminokamoenairtelecitychyattorneyagaw" + - "akkanaibetsubamericanfamilydscloudapplinzis-a-hard-workerfujinom" + - "iyadavvesiidattowebcampinashikiminohosteroyrvikingfujiokayamangy" + - "shlakasamatsudontexistmein-iservebeerfujisatoshonairtrafficplexu" + - "s-1fujisawafujishiroishidakabiratoridedyn-ip24fujitsurugashimani" + - "wakuratefujixeroxn--1ctwolominamatakkokaminoyamaxunusualpersonfu" + - "jiyoshidazaifudaigokaseljordfukayabeatserveminecraftrentino-a-ad" + - "igefukuchiyamadafukudominichonanbuildingripescaravantaafukuis-a-" + - "hunterfukumitsubishigakiryuohtawaramotoineppuboliviajessheimperi" + - "afukuokazakisarazurecontainerdpolicefukuroishikarikaturindalfuku" + - "sakishiwadafukuyamagatakahashimamakisofukushimannore-og-uvdalfun" + - "abashiriuchinadafunagatakahatakaishimogosenfunahashikamiamakusat" + - "sumasendaisennangoodyearfundaciofuoiskujukuriyamansionservemp3fu" + - "osskoczowilliamhillfurnitureggio-emilia-romagnakatsugawafurubira" + - "furudonostiaarpassagenservep2passenger-associationfurukawais-a-k" + - "nightpointtokamachintaifun-dnsaliasiafusodegaurafussaikisosakita" + - "gawafutabayamaguchinomigawafutboldlygoingnowhere-for-morenakayam" + - "anxn--1lqs03nfuttsurugiminamiminowafuturecmservepicservequakefut" + - "urehostingfuturemailingfvgfylkesbiblackbaudcdn77-securecifederat" + - "ionfyresdalhannanmokuizumodenaklodzkobierzycehannosegawahanyuzen" + - "hapmirhareidsbergenharstadharvestcelebrationhasamarcheapaviancar" + - "rierhasaminami-alpssells-itrentino-aadigehashbanghasudahasura-ap" + - "pfizerhasvikautokeinow-dnservesarcasmatartanddesignhatogayaitaka" + - "nabeautysneservicesevastopolehatoyamazakitakamiizumisanofidelity" + - "hatsukaichikaiseis-a-liberalhattfjelldalhayashimamotobungotakada" + - "pliernewmexicoalhazuminobusellsyourhomegoodsevenassisicilyhbodoe" + - "s-itvedestrandhelsinkitakatakanezawahembygdsforbundhemnesewinbar" + - "rel-of-knowledgeologyokozeu-1hemsedalhepforgeherokussldheroyhgtv" + - "alledaostavangerhigashiagatsumagoianiahigashichichibunkyonanaosh" + - "imageandsoundandvisionhigashihiroshimanehigashiizumozakitakyushu" + - "aiahigashikagawahigashikagurasoedahigashikawakitaaikitamihamadah" + - "igashikurumeguromskoghigashimatsushimaritimodernhigashimatsuyama" + - "kitaakitadaitoigawahigashimurayamamotorcyclesharis-a-libertarian" + - "higashinarusembokukitamotosumy-gatewayhigashinehigashiomihachima" + - "naustdalhigashiosakasayamanakakogawahigashishirakawamatakaokalug" + - "anskypehigashisumiyoshikawaminamiaikitanakagusukumoduminamioguni" + - "comcastresindevicesharpgfoggiahigashitsunoshiroomurahigashiuraus" + - "ukitashiobarahigashiyamatokoriyamanashifteditchyouripharmaciensh" + - "awaiijimarnardalhigashiyodogawahigashiyoshinogaris-a-linux-usera" + - "nishiaritabashijonawatehiraizumisatokaizukamakurazakitaurayasuda" + - "hirakatashinagawahiranais-a-llamarriottrentino-alto-adigehirarah" + - "iratsukagawahirayaizuwakamatsubushikusakadogawahistorichouseshel" + - "laspeziahitachiomiyagildeskaliszhitachiotagooglecodespotaruis-a-" + - "musicianhitraeumtgeradellogliastradinghjartdalhjelmelandholeckoc" + - "hikushinonsenergyholidayhomeipharmacyshimojis-a-nascarfanhomelin" + - "kitoolsztynsettlershimokawahomelinuxn--1lqs71dhomeofficehomesecu" + - "ritymacaparecidahomesecuritypchoseiroumuenchenishimerahomesensem" + - "inehomeunixn--1qqw23ahondahoneywellbeingzonehongopocznorfolkebib" + - "lelhonjyoitakarazukameokameyamatotakadahornindalhorseoullensvang" + - "uardhorteneis-a-nurservegame-serverhospitalhoteleshimokitayamaho" + - "tmailhoyangerhoylandetroitskazohumanitieshimonitayanagithubuserc" + - "ontentrentino-altoadigehurdalhurumajis-a-painteractivegaskimitsu" + - "batamibudejjuedischesapeakebayernrtrentino-s-tirolhyllestadhyogo" + - "ris-a-patsfanhyugawarahyundaiwafunejfkharkivanylvenicejlchoyodob" + - "ashichikashukujitawaravennakamagayachtsamsungriwataraidyndns-fre" + - "eboxosloftranakasatsunairportland-4-salernoboribetsucksandnessjo" + - "enishinomiyashironojlljmphilipsynology-diskstationjnjcphilatelyj" + - "oyentrentinoa-adigejoyokaichibalatinogiftshinichinanjpmorganjpnc" + - "hristiansburgroks-thisayamanobeokakudamatsuejprshinjournalismail" + - "illehammerfeste-iphoenixn--2m4a15ejurkoshimizumakizunokunimimata" + - "kasugais-a-studentalkoshunantankhersonkosugekotohiradomainshinsh" + - "irokotourakouhokutamakis-a-teacherkassymantechnologykounosupplie" + - "shintokushimakouyamashikekouzushimashikis-a-techietis-a-personal" + - "trainerkozagawakozakis-a-therapistoiakozowindmillkpnkppspdnshint" + - "omikasaharakrasnodarkredstonekristiansandcatshinyoshitomiokamoga" + - "wakristiansundkrodsheradkrokstadelvaldaostarnbergkryminamisanrik" + - "ubetsurfastpanelblagrarchaeologyeongbuklugsmileasinglest-mon-blo" + - "gueurovisionionjukudoyamaceratabusebastopologyeonggiehtavuoatnag" + - "aivuotnagaokakyotambabydgoszczecinemadridvagsoygardendoftheinter" + - "netflixilovecollegefantasyleaguernseykumatorinokumejimasoykumena" + - "ntokonamegatakatoris-an-accountantshimonosekikawakunisakis-an-ac" + - "torkunitachiarailwaykunitomigusukumamotoyamashikokuchuokunneppug" + - "liakunstsammlungkunstunddesignkuokgroupictetrentinoaadigekurehab" + - "merkurgankurobelaudiblebtimnetzkurogiminamiashigarakuroisoftware" + - "ndalenugkuromatsunais-an-actresshimosuwalkis-a-photographerokuap" + - "phdkurotakikawasakis-an-anarchistoricalsocietykushirogawakustana" + - "is-an-artisteigenkusupplykutchanelkutnokuzumakis-an-engineeringk" + - "vafjordkvalsundkvamlidlugolekafjordkvanangenkvinesdalkvinnheradk" + - "viteseidskogkvitsoykwpspectruminamitanekzmissilezajsklabudhabiki" + - "nokawabarthadselfipatriamisugitokuyamatsumaebashikshacknetrentin" + - "oalto-adigemitourismolangevagrigentomologyeongnamegawakayamagazi" + - "neat-urlmitoyoakemiuramiyazurewebsiteshikagamiishibukawamiyotama" + - "nomjondalenmlbfanmonstermontrealestatefarmequipmentrentinoaltoad" + - "igemonza-brianzaporizhzhiamonza-e-della-brianzapposhirahamatonbe" + - "tsurnadalmonzabrianzaptokyotangotpantheonsitemonzaebrianzaramonz" + - "aedellabrianzamoonscalemoparachutingmordoviamoriyamatsumotofukem" + - "oriyoshiminamiawajikis-foundationmormonmouthaebaruericssonyoursi" + - "degreemoroyamatsunomortgagemoscowindowshirakofuefukihaborokunohe" + - "althcareershiranukanagawamoseushistorymosjoenmoskeneshiraois-gon" + - "emosshiraokananiimihoboleslawiechromedicinakamurataishinomakindl" + - "egnicafedexhibitionishinoomotegomosvikmpspbarrell-of-knowledgeom" + - "etre-experts-comptables3-sa-east-1moteginowaniihamatamakawajimao" + - "ris-into-animeiwamarshallstatebankddielddanuorrikuzentakatajimid" + - "oriopretogoldpoint2thisamitsukemoviemovimientolgamovistargardmoz" + - "illa-iotrentinos-tirolmtranbymuenstermuginozawaonsenmuikamisunag" + - "awamukodairamulhouservehalflifestylemunakatanemuncienciamuosatte" + - "mupictureshiratakahagitlabormurmansknx-serverrankoshigayanagawam" + - "urotorcraftrentinostirolmusashimurayamatsusakahoginankokubunjis-" + - "into-carshimotsukemusashinoharamuseetrentinosued-tirolmuseumvere" + - "nigingmusicargodaddyn-vpndnshishikuis-into-cartoonshimotsumamuts" + - "uzawamy-vigorgemy-wanggouvicenzamyactivedirectorymyasustor-elvda" + - "lmycdn77-sslattuminamiuonumassa-carrara-massacarraramassabusines" + - "sebyklegalloanshiojirishirifujiedamydattolocalhistorymyddnskingm" + - "ydissentrentinosuedtirolmydroboehringerikemydshisognemyeffectren" + - "tinsued-tirolmyfirewallonieruchomoscienceandindustrynmyfritzmyft" + - "paccesshisuifuelveruminamiyamashirokawanabelembetsukubankhmelnit" + - "skiyamarylhurstgorymyhome-servermyjinomykolaivarggatrentinsuedti" + - "rolmymailermymediapchryslermyokohamamatsudamypepiemontemypetshit" + - "aramamyphotoshibalestrandabergamoarekeymachinewhampshirebungoono" + - "ipifonyminanomypiagetmyiphostfoldnavymypsxn--30rr7ymysecuritycam" + - "erakermyshopblockshizukuishimofusaitamatsukuris-into-gamessinaza" + - "wamytis-a-bookkeeperugiamytuleapilotshizuokanazawamyvnchungnamda" + - "lseidfjordyndns-homednsandoymywireitrentoyonezawapiszpittsburgho" + - "fficialpiwatepixolinopizzapkomaganeplanetariumincommbankhmelnyts" + - "kyivaporcloudnshinjukumanoplantationplantshoujis-lostrodawarapla" + - "tformshangrilanshowaplaystationplazaplchurcharternidyndns-iparma" + - "ttelefonicarbonia-iglesias-carboniaiglesiascarboniaplumbingoplur" + - "inacionalpodzonepohlpoivronpokerpokrovskomakiyosunndalpoliticart" + - "ierpolitiendapolkowicepoltavalle-aostarostwodzislawinnershowtime" + - "mergencyahabahcavuotnagareyamakeupowiathletajimabaridagawalbrzyc" + - "haritysfjordpomorzeszowioshriramsterdamnserverbaniapordenoneporn" + - "porsangerporsangugeporsgrunnanyokoshibahikariwanumataketomisatos" + - "himayfirstjohnpoznanpraxis-a-bruinsfanprdpreservationpresidioprg" + - "mrprimelhusdecorativeartsienarutomobellevuelosangelesjabbottrevi" + - "sohughesigdalprincipeprivatizehealthinsuranceprochowiceproductio" + - "nsilkomatsushimasfjordenprofesionalprogressivenneslaskerrylogist" + - "icsimple-urlpromombetsurgeonshalloffameldalpropertyprotectionpro" + - "tonetritonprudentialpruszkowitdkomforbarsycentertainmentattoocea" + - "nographiqueu-2przeworskogptplusgardenpupimientakazakis-leetnedal" + - "pvhagakhanamigawapvtroandinosaurepaircraftingvollombardynamische" + - "s-dnsirdalpwcircleverappspotagerpzqldqponqslgbtrogstadquicksytes" + - "tingquipelementslingqvcircustomerstoregontrailroadstorfjordstorj" + - "devcloudcontrolledstpetersburgstreamuneuesokaneyamazoestudiostud" + - "yndns-at-homedepotenzamamidsundstuff-4-salestufftoread-booksneso" + - "kndalstuttgartrusteesusakis-not-certifieducatorahimeshimamateram" + - "obilysusonosuzakaniepcesuzukanmakiwiensuzukis-savedunetbankfhapp" + - "ouslivinghistorysvalbardunloppacificistrondheimmobilienishinoshi" + - "matsuurasveiosvelvikomvuxn--2scrj9christmasakinderoysvizzerasvn-" + - "reposolarssonswedenswidnicasacamdvrcampinagrandebugattipschlesis" + - "chesologneswiebodzindianapolis-a-bloggerswiftcoverswinoujscience" + - "andhistoryswisshikis-slickhakassiasynology-dsolundbeckommunetush" + - "uissier-justicetuvalle-daostatic-accessootuxfamilytwmailvestre-s" + - "lidrepbodynathomebuiltrvbashkiriautoscanadaejeonbuk12vestre-tote" + - "nnishiawakuravestvagoyvevelstadvibo-valentiavibovalentiavideovil" + - "lasnesoddenmarkhangelskjakdnepropetrovskiervaapsteiermarkongsvin" + - "gervinnicasadelamonedatingvinnytsiavipsinaappinkolobrzegersundvi" + - "rginiavirtual-userveexchangevirtualuserveftpioneervirtueeldomein" + - "-vigorlicevirtuelvisakegawaviterboknowsitallvivoldavixn--32vp30h" + - "agebostadvlaanderenvladikavkazimierz-dolnyvladimirvlogoipippulaw" + - "yvolkswagentsor-odalvologdanskoninjambylvolvolkenkundenvolyngdal" + - "vossevangenvotevotingvotoyonowiwatsukiyonoticiaskoyabearalvahkij" + - "observeronagarahkkeravjuegoshikikonaikawachinaganoharamcoachampi" + - "onshiphoptobishimaintenancebetsuikidsmynasushiobarackmazerbaijan" + - "-mayenebakkeshibechambagriculturennebudapest-a-la-masionthewifia" + - "t-band-campaniawloclawekonskowolayangrouphotographysiowmflabsor-" + - "varangerworldworse-thandawowithgoogleapisa-hockeynutsiracusakata" + - "kinouewpdevcloudyclusterwritesthisblogsytewroclawithyoutuberspac" + - "ewtcminnesotaketakatsukis-an-entertainerwtfastvps-serverisignwuo" + - "zuwzmiuwajimaxn--3pxu8konsulatrobeepilepsydneyxn--42c2d9axn--45b" + - "r5cylxn--45brj9citichernovtsykkylvenetogakushimotoganewyorkshire" + - "cipesaro-urbino-pesarourbinopesaromasvuotnakaiwamizawassamukawat" + - "aricohdatsunanjoburgminakamichiharaxn--45q11civilaviationishioko" + - "ppegardyndns-mailottexn--4gbriminingxn--4it168dxn--4it797konyvel" + - "ombardiamondshinshinotsurgeryxn--4pvxs4allxn--54b7fta0ccivilisat" + - "ionishitosashimizunaminamibosogndalottokorozawaxn--55qw42gxn--55" + - "qx5dxn--5js045dxn--5rtp49civilizationishiwakis-a-chefarsundyndns" + - "-office-on-the-weberlincolnissandiegoxn--5rtq34kooris-a-socialis" + - "tcgrouphiladelphiaareadmyblogspotrentino-stirolxn--5su34j936bgsg" + - "xn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a2" + - "64civilwarmanagementoyotaparocherkasyno-dsandvikcoromantovalle-d" + - "-aostathellexn--80adxhksorfoldxn--80ao21axn--80aqecdr1axn--80ase" + - "hdbasilicataniaveroykeniwaizumiotsukumiyamazonawsadodgemological" + - "lavangenaval-d-aosta-valleyokotemrevistanbulsan-suedtirolaziobni" + - "nskaragandaustraliaisondriobranconagawalesundemoneyboltateshinan" + - "omachimkentateyamaurskog-holandingjerdrumetacentrumeteorappalerm" + - "omahachijolstereviewskrakowebspacempresashibetsukuibmdds3-ap-sou" + - "theast-1kappchizippodhaleangaviikadenaamesjevuemielno-ip6xn--80a" + - "swgxn--80audnedalnxn--8ltr62kopervikharkovaoxn--8pvr4uxn--8y0a06" + - "3axn--90a3academiamicaaarborteaches-yogasawaracingxn--90aeroport" + - "alabamagasakishimabaraogakibichuoxn--90aishobarakawagoexn--90azh" + - "ytomyravendbasketballyngenvironmentalconservationflfanfshostrowi" + - "ecasinorddalillesandefjordgcahcesuolocus-2xn--9dbhblg6dietcimdba" + - "todayolasiteu-3xn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--ar" + - "oport-byandexn--3bst00minternationalfirearmshioyanaizutwentexn--" + - "asky-iraxn--aurskog-hland-jnbatsfjordiscountyombolzano-altoadige" + - "u-4xn--avery-yuasakuhokkaidoomdnsiskinkyotobetsulikes-piedmontic" + - "ellodingenxn--b-5gaxn--b4w605ferdxn--balsan-sudtirol-rqis-uberle" + - "etrentino-sued-tirolxn--bck1b9a5dre4claimsanfranciscofreakunemur" + - "orangeiseiyoichippubetsubetsugarugbyengerdalaheadjudygarlandyndn" + - "s-picsangoxn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bh" + - "cavuotna-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-" + - "0qa2xn--bjarky-fyaotsurreyxn--bjddar-ptamayufuettertdasnetzxn--b" + - "lt-elabourxn--bmlo-graingerxn--bod-2natalxn--bozen-sudtirol-76ha" + - "ibarakitahiroshimarburgxn--brnny-wuacademy-firewall-gatewayxn--b" + - "rnnysund-m8accident-investigation-aptibleaseating-organicbcieszy" + - "nxn--brum-voagatrysiljanxn--btsfjord-9zaxn--bulsan-sudtirol-rqis" + - "-very-badajozxn--c1avgxn--c2br7gxn--c3s14misakis-byxn--cck2b3bau" + - "hausposts-and-telecommunicationsncfdiscoveryomitanoddavocatanzar" + - "ownproviderhcloudfunctions3-eu-central-1xn--cesena-forli-c2gxn--" + - "cesenaforli-0jgoraxn--cg4bkis-very-evillagexn--ciqpnxn--clchc0ea" + - "0b2g2a9gcdxn--comunicaes-v6a2oxn--correios-e-telecomunicaes-ghc2" + - "9axn--czr694bbcn-north-1xn--czrs0tulanxessolutionslupskommunalfo" + - "rbundxn--czru2dxn--czrw28bbtcp4xn--d1acj3bbvacationswatch-and-cl" + - "ockerxn--d1alfaromeoxn--d1atunesomaxn--d5qv7z876clanbibaidarmeni" + - "axn--davvenjrga-y4axn--djrs72d6uyxn--djty4koryokamikawanehonbets" + - "urutaharaxn--dnna-grajewolterskluwerxn--drbak-wuaxn--dyry-iraxn-" + - "-e1a4cldmailouvreisenissayokkaichiropractichirurgiens-dentistes-" + - "en-francexn--eckvdtc9dxn--efvn9sorocabalsfjordxn--efvy88hair-sur" + - "veillancexn--ehqz56nxn--elqq16hakatanortonxn--estv75gxn--eveni-0" + - "qa01gaxn--f6qx53axn--fct429kosaigawaxn--fhbeiarnxn--finny-yuaxn-" + - "-fiq228c5hsorreisahayakawakamiichikawamisatourslzxn--fiq64beneve" + - "ntoeidsvollillyonagoyavoues3-eu-west-1xn--fiqs8sortlandxn--fiqz9" + - "soruminiserversicherungxn--fjord-lraxn--fjq720axn--fl-ziaxn--flo" + - "r-jraxn--flw351exn--forli-cesena-41gxn--forlicesena-ujgxn--fpcrj" + - "9c3dxn--frde-grandrapidsoundcastronomy-routerxn--frna-woaraisaij" + - "osoyrorosouthcarolinarvikomonowtvareservehttphonefosshinkamigoto" + - "yohashimotottoris-a-republicancerresearchaeologicaliforniaxn--fr" + - "ya-hraxn--fzc2c9e2clickashibatakashimarumorimachidaxn--fzys8d69u" + - "vgmailxn--g2xx48clinichiryukyuragifuchungbukharaumalopolskanland" + - "urbanamexnetlifyis-a-celticsfanishikatakayamatsushigexn--gckr3f0" + - "fauskedsmokorsetagayasells-for-ufcfanxn--gecrj9cliniquenoharaxn-" + - "-ggaviika-8ya47hakodatexn--gildeskl-g0axn--givuotna-8yasakaimina" + - "toyookannamilanotteroyxn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn" + - "--gmq050is-very-goodhandsonxn--gmqw5axn--h-2failxn--h1aeghakonex" + - "n--h2breg3evenesouthwestfalenxn--h2brj9c8clintonoshoesanjotoyoto" + - "miyazakis-a-conservativegarsheis-a-cpadualstackspace-to-rentalst" + - "omakomaibaraxn--h3cuzk1digitalxn--hbmer-xqaxn--hcesuolo-7ya35ben" + - "tleyonaguniversityoriikarateverbankaratsuginamikatagamilitaryosh" + - "iokaracoldwarmiastagevje-og-hornnes3-us-east-2xn--hery-iraxn--hg" + - "ebostad-g3axn--hmmrfeasta-s4accident-prevention-webhostingxn--hn" + - "efoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn--hxt814exn--" + - "hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513nxn--indery-" + - "fyasugivingxn--io0a7is-very-nicexn--j1aefbsbxn--12cfi8ixb8luxury" + - "xn--j1amhakubahccavuotnagasakikuchikuseikarugamvikaufenxn--j6w19" + - "3gxn--jlq61u9w7beppublishproxyzjampagefrontappalmspringsakerxn--" + - "jlster-byasuokanraxn--jrpeland-54axn--jvr189misasaguris-certifie" + - "dogawarabikomaezakirunordreisa-geekazunowruzhgorodeoxn--k7yn95ex" + - "n--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woax" + - "n--klt787dxn--kltp7dxn--kltx9axn--klty5xn--3ds443gxn--koluokta-7" + - "ya57hakuis-a-landscaperxn--kprw13dxn--kpry57dxn--kpu716fbx-osasa" + - "yamaxn--kput3is-very-sweetpepperxn--krager-gyatomitamamuraxn--kr" + - "anghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfa" + - "stlylbarefootballfinanzgorauthordalandeportenrightathomeftpalmas" + - "eratiitatebayashiibajddarchitecturealtydalces3-ca-central-1xn--k" + - "snes-uuaxn--kvfjord-nxaxn--kvitsy-fyatsukanumazuryxn--kvnangen-k" + - "0axn--l-1fairwindsowaxn--l1accentureklamborghinikis-with-theband" + - "ovre-eikerxn--laheadju-7yatsushiroxn--langevg-jxaxn--lcvr32dxn--" + - "ldingen-q1axn--leagaviika-52beskidyn-o-saurlandes3-us-gov-west-1" + - "xn--lesund-huaxn--lgbbat1ad8jelenia-goraxn--lgrd-poacctunkongsbe" + - "rgxn--lhppi-xqaxn--linds-pramericanarturystykanoyakumoldelmenhor" + - "stalbansomnarviikamitondabayashiogamagoriziaxn--lns-qlapyxn--loa" + - "bt-0qaxn--lrdal-sraxn--lrenskog-54axn--lt-liaclothingdustkagoshi" + - "malselvendrellowiczest-le-patronissedalucaniaxn--lten-granexn--l" + - "ury-iraxn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2ddespeedpar" + - "tnersnoasaitotalxn--mgb9awbfbxosasebofagexn--mgba3a3ejtuscanyxn-" + - "-mgba3a4f16axn--mgba3a4franamizuholdingspiegelxn--mgba7c0bbn0axn" + - "--mgbaakc7dvfedorapeopleirfjordynnsarpsborguidefinimakanegasakin" + - "kobayashikaoirminamifuranoxn--mgbaam7a8hakusanagochijiwadell-ogl" + - "iastraderxn--mgbab2bdxn--mgbai9a5eva00bestbuyshouses3-us-west-1x" + - "n--mgbai9azgqp6jeonnamerikawauexn--mgbayh7gpalacexn--mgbb9fbpoba" + - "nazawaxn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgberp4a5d4" + - "a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mgbpl2fhs" + - "kydivingxn--mgbqly7c0a67fbcngrondarxn--mgbqly7cvafranziskanerima" + - "ringatlantakaharuxn--mgbt3dhdxn--mgbtf8flatangerxn--mgbtx2betain" + - "aboxfusejnynysagaeroclubmedecincinnationwidealerimo-i-ranadexete" + - "rxn--mgbx4cd0abbvieeexn--mix082fedoraprojectransurluzernxn--mix8" + - "91feiraquarelleborkangerxn--mjndalen-64axn--mk0axindianmarketing" + - "xn--mk1bu44cnpyatigorskodjeffersonisshingucciprianiigataitogliat" + - "tiresannaniyodogawaxn--mkru45isleofmanchesterxn--mlatvuopmi-s4ax" + - "n--mli-tlaquilanciaxn--mlselv-iuaxn--moreke-juaxn--mori-qsakurag" + - "awaxn--mosjen-eyawaraxn--mot-tlarvikosakaerodromegallupinbarsyon" + - "linewhollandevelopmentaxihuanayorovigotsukitahatakamatsukawautom" + - "otiveconomiasakuchinotsuchiurakawalmartatsunobiraustinnatuurwete" + - "nschappenaumburgjerstadotsuruokakegawaukraanghkepnogataijibigawa" + - "etnagahamaroyereportatarantoyakokonoebinordre-landd-dnshome-webs" + - "ervercelliguriagrocerybnikahokutobamagentositecnologiajudaicable" + - "-modemocraciaugustowadaeguambulancebizenakatombetsumitakagiizehi" + - "mejibestaddnslivelanddnss3-ap-south-16-bambleclerc66xn--mre-og-r" + - "omsdal-qqbhzcateringebuilderschmidtre-gauldalimanowarudaxaustrhe" + - "imatunduhrennesoyokosukanzakiyokawaraustevoll-o-g-i-naturhistori" + - "sches3-ap-southeast-2ix4432-bananarepublicaseihicampobassociates" + - "t-iservecounterstrike12hpaleobihirosakikamijimatsuzaki234lima-ci" + - "tyeatselinogradultarnobrzegyptian4tarumizusawabogadocscbgdyniabr" + - "uzzoologicalvinklein-addrammenuernberggfarmerseine164-barcelonag" + - "asukeastcoastaldefenceatonsbergjemnes3-ap-northeast-1337xn--msy-" + - "ula0haldenxn--mtta-vrjjat-k7afamilycompanycnsannohelplfinancialu" + - "ccapitalonewspaperxn--muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ng" + - "be9e0axn--ngbrxn--3e0b707exn--nit225koseis-a-soxfanxn--nmesjevue" + - "mie-tcbaltimore-og-romsdalipayxn--nnx388axn--nodessakuraissmarte" + - "rthanyousrlxn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17g" + - "xn--nttery-byaeservehumourxn--nvuotna-hwaxn--nyqy26axn--o1achase" + - "ljeepsongdalenviknaharimalborkdalxn--o3cw4halsaintlouis-a-anarch" + - "istoireggiocalabriaxn--o3cyx2axn--od0algxn--od0aq3bieigersundish" + - "akotanhktjeldsundisrechtrainingjesdalimitedivtasvuodnakaniikawat" + - "anaguraxn--ogbpf8flekkefjordxn--oppegrd-ixaxn--ostery-fyawataham" + - "axn--osyro-wuaxn--otu796dxn--p1acfermochizukirkenesaskatchewanxn" + - "--p1aiwchoshibuyachiyodattorelayxn--pbt977cntoyotsukaidoxn--pgbs" + - "0dhlxn--porsgu-sta26ferraraxn--pssu33lxn--pssy2uxn--q9jyb4coguch" + - "ikuzenxn--qcka1pmckinseyxn--qqqt11misconfusedxn--qxamusementdllc" + - "ube-serversaillespjelkavikomorotsukamiokamikitayamatsuris-a-rock" + - "starachowicexn--rady-iraxn--rdal-poaxn--rde-ulavagiskexn--rdy-0n" + - "abarixn--rennesy-v1axn--rhkkervju-01aflakstadaokagakicks-assedic" + - "ollectionxn--rholt-mragowoodsideltaiwanairlinedre-eikerxn--rhqv9" + - "6gxn--rht27zxn--rht3dxn--rht61exn--risa-5nativeamericanantiquesp" + - "readbettingxn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rmskog-by" + - "axn--rny31hammarfeastafricapetownnews-stagingxn--rovu88bielawalt" + - "erxn--rros-granvindafjordxn--rskog-uuaxn--rst-0naturalhistorymus" + - "eumcenterxn--rsta-francaiseharaxn--rvc1e0am3exn--ryken-vuaxn--ry" + - "rvik-byaxn--s-1faithruheredumbrellajollamericanexpressexyxn--s9b" + - "rj9colognextdirectoyouraxn--sandnessjen-ogbizxn--sandy-yuaxn--se" + - "ral-lraxn--ses554gxn--sgne-gratangenxn--skierv-utazassnasabaerob" + - "aticketspydebergxn--skjervy-v1axn--skjk-soaxn--sknit-yqaxn--sknl" + - "and-fxaxn--slat-5naturalsciencesnaturellesrtromsojamisonxn--slt-" + - "elabcgxn--smla-hraxn--smna-gratis-a-bulls-fanxn--snase-nraxn--sn" + - "dre-land-0cbremangerxn--snes-poaxn--snsa-roaxn--sr-aurdal-l8axn-" + - "-sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbiellaakesvuemielec" + - "cexn--srfold-byaxn--srreisa-q1axn--srum-grazxn--stfold-9xaxn--st" + - "jrdal-s1axn--stjrdalshalsen-sqbieszczadygeyachimataikikugawarsza" + - "washingtondclkareliancexn--stre-toten-zcbsrvaroyxn--sudtirol-y0e" + - "mmafann-arboretumbriamallamaceioxn--t60b56axn--tckweatherchannel" + - "xn--tiq49xqyjetztrentino-suedtirolxn--tjme-hraxn--tn0agrinet-fre" + - "akstoragexn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sud-" + - "tirol-tsjcbnlxn--trentin-sudtirol-b9ixn--trentino-sud-tirol-dcko" + - "sherbrookegawaxn--trentino-sudtirol-usjevnakershuscultureggioemi" + - "liaromagnamsskoganeis-a-playerxn--trentinosud-tirol-tsjewelryxn-" + - "-trentinosudtirol-b9ixn--trentinsud-tirol-98ixn--trentinsudtirol" + - "-rqixn--trgstad-r1axn--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0" + - "atvestfoldxn--uc0ay4axn--uist22hamurakamigoris-a-lawyerxn--uisz3" + - "gxn--unjrga-rtaobaomoriguchiharagusartstordalxn--unup4yxn--uuwu5" + - "8axn--vads-jraxn--vallee-aoste-i2gxn--vallee-d-aoste-43hangglidi" + - "ngxn--valleeaoste-6jgxn--valleedaoste-i2gxn--vard-jraxn--vegrshe" + - "i-c0axn--vermgensberater-ctbievatmallorcadaques3-us-west-2xn--ve" + - "rmgensberatung-pwbifukagawashtenawdev-myqnapcloudaccesscambridge" + - "stoneustarhubs3-website-ap-northeast-1xn--vestvgy-ixa6oxn--vg-yi" + - "abkhaziaxn--vgan-qoaxn--vgsy-qoa0jewishartgalleryxn--vgu402colon" + - "ialwilliamsburgrongaxn--vhquvestnesopotromsakakinokiaxn--vler-qo" + - "axn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861bihorolog" + - "yukindigenamsosnowiecatholicaxiascolipicenodumetlifeinsurancexn-" + - "-w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1coloradoplateaud" + - "ioxn--wgbl6axn--xhq521bikedagestangeorgeorgiaxn--xkc2al3hye2axn-" + - "-xkc2dl3a5ee0hangoutsystemscloudfrontdoorxn--y9a3aquariumishimas" + - "udaxn--yer-znaturbruksgymnxn--yfro4i67oxn--ygarden-p1axn--ygbi2a" + - "mmxn--3hcrj9citadeliveryggeelvinckasaokaminokawanishiaizubangexn" + - "--ystre-slidre-ujbilbaogashimadachicagoboats3-website-ap-southea" + - "st-1xn--zbx025dxn--zf0ao64axn--zf0avxn--3oq18vl8pn36axn--zfr164b" + - "illustrationhlfanhs3-website-ap-southeast-2xnbayxperiaxz" - -// nodes is the list of nodes. Each node is represented as a uint32, which -// encodes the node's children, wildcard bit and node type (as an index into -// the children array), ICANN bit and text. -// -// If the table was generated with the -comments flag, there is a //-comment -// after each node's data. In it is the nodes-array indexes of the children, -// formatted as (n0x1234-n0x1256), with * denoting the wildcard bit. The -// nodeType is printed as + for normal, ! for exception, and o for parent-only -// nodes that have children but don't match a domain label in their own right. -// An I denotes an ICANN domain. -// -// The layout within the uint32, from MSB to LSB, is: -// [ 0 bits] unused -// [10 bits] children index -// [ 1 bits] ICANN bit -// [15 bits] text index -// [ 6 bits] text length -var nodes = [...]uint32{ - 0x32b543, - 0x2872c4, - 0x2c8146, - 0x2f4d83, - 0x2f4d86, - 0x382346, - 0x3b2083, - 0x2d4484, - 0x393b47, - 0x2c7d88, - 0x1a000c2, - 0x1f3a8c7, - 0x36e6c9, - 0x2bf60a, - 0x2bf60b, - 0x22b8c3, - 0x2acc06, - 0x232005, - 0x220cd42, - 0x3d0744, - 0x25f303, - 0x393345, - 0x2605202, - 0x358d83, - 0x2b2be04, - 0x38afc5, - 0x2e20fc2, - 0x39670e, - 0x2513c3, - 0x3aa546, - 0x3200a82, - 0x2fa0c7, - 0x234846, - 0x3601102, - 0x27f3c3, - 0x27f3c4, - 0x20f2c6, - 0x204048, - 0x279986, - 0x309604, - 0x3a04342, - 0x3442c9, - 0x223087, - 0x399606, - 0x36b389, - 0x2d5588, - 0x32d484, - 0x238d06, - 0x35af06, - 0x3e01902, - 0x3ad9cf, - 0x27a34e, - 0x354144, - 0x2097c5, - 0x32b445, - 0x2f1789, - 0x240409, - 0x20fac7, - 0x201286, - 0x2011c3, - 0x421cec2, - 0x227843, - 0x25d24a, - 0x460a203, - 0x2568c5, - 0x323bc2, - 0x383189, - 0x4a02842, - 0x206d84, - 0x310cc6, - 0x2c4685, - 0x366104, - 0x521d3c4, - 0x2038c3, - 0x231044, - 0x5600fc2, - 0x266944, - 0x5a88844, - 0x391d8a, - 0x5e00882, - 0x2f0947, - 0x279d08, - 0x6e07982, - 0x274487, - 0x2c2404, - 0x2c2407, - 0x3cbf45, - 0x33e047, - 0x36b686, - 0x28f304, - 0x307805, - 0x28de07, - 0x7e06542, - 0x324b83, - 0x20a742, - 0x38fdc3, - 0x820aac2, - 0x20aac5, - 0x8600202, - 0x2bd4c4, - 0x277ec5, - 0x354087, - 0x39170e, - 0x23d604, - 0x232844, - 0x207083, - 0x394d89, - 0x20708b, - 0x217c48, - 0x36b148, - 0x255488, - 0x219588, - 0x32d2ca, - 0x33df47, - 0x2ad6c6, - 0x8a49282, - 0x342303, - 0x343643, - 0x343a44, - 0x3b20c3, - 0x342343, - 0x1736382, - 0x8e00bc2, - 0x27f885, - 0x290086, - 0x27c844, - 0x35bf47, - 0x31f446, - 0x37b984, - 0x37b987, - 0x200bc3, - 0x92cb342, - 0x9720f02, - 0x9a2a8c2, - 0x22a8c6, - 0x9e00282, - 0x2a8f45, - 0x3378c3, - 0x3cc584, - 0x2eddc4, - 0x2eddc5, - 0x203283, - 0xa38d8c3, - 0xa606602, - 0x207f45, - 0x207f4b, - 0x208d06, - 0x255f4b, - 0x267c44, - 0x20adc9, - 0x20bac4, - 0xaa0bd02, - 0x20c543, - 0x20cac3, - 0x160d702, - 0x3bb283, - 0x20d70a, - 0xae0a842, - 0x3d09c5, - 0x2e074a, - 0x3778c4, - 0x20ea83, - 0x210484, - 0x210b83, - 0x210b84, - 0x210b87, - 0x211285, - 0x2122c6, - 0x2125c6, - 0x213343, - 0x217708, - 0x20a843, - 0xb2020c2, - 0x246988, - 0x3c5e8b, - 0x21e548, - 0x21ef86, - 0x220007, - 0x224cc8, - 0xc2054c2, - 0xc6c25c2, - 0x312908, - 0x303c07, - 0x280805, - 0x38f548, - 0x2dee48, - 0x37ba83, - 0x229484, - 0x343a82, - 0xca29e82, - 0xce02c82, - 0xd629fc2, - 0x229fc3, - 0xda00f82, - 0x3488c3, - 0x2d3104, - 0x208f83, - 0x324f44, - 0x39424b, - 0x231783, - 0x2e6f46, - 0x231784, - 0x3516ce, - 0x248a85, - 0x3aa648, - 0x397047, - 0x39704a, - 0x207243, - 0x280b47, - 0x207245, - 0x22d9c4, - 0x2d1106, - 0x2d1107, - 0x2db144, - 0x2eef07, - 0x303644, - 0x200f84, - 0x391a46, - 0x25a344, - 0x32e046, - 0x229cc3, - 0x38f308, - 0x3ca508, - 0x232803, - 0x3bb243, - 0x3b3284, - 0x3b79c3, - 0xde48182, - 0xe28bac2, - 0x205a83, - 0x203986, - 0x2041c3, - 0x22f104, - 0xe73e842, - 0x355843, - 0x33e843, - 0x214f82, - 0xea06a82, - 0x2c5706, - 0x232d07, - 0x2f0fc7, - 0x39bec5, - 0x209e04, - 0x28dcc5, - 0x288407, - 0x302889, - 0x2d27c6, - 0x2e44c8, - 0x2ec986, - 0xee14d42, - 0x384ac8, - 0x2fb306, - 0x334c05, - 0x3cf307, - 0x3183c4, - 0x3183c5, - 0x279b44, - 0x392f88, - 0xf208002, - 0xf600482, - 0x334906, - 0x200488, - 0x352485, - 0x353406, - 0x355bc8, - 0x374b48, - 0xfa07d85, - 0xfe6dd04, - 0x381507, - 0x1020b542, - 0x10742382, - 0x11a08e02, - 0x310dc5, - 0x2a3c05, - 0x2564c6, - 0x2be307, - 0x3ae0c7, - 0x12208e03, - 0x29d007, - 0x2eac08, - 0x1b62ae49, - 0x3968c7, - 0x22bb07, - 0x22c588, - 0x22cd86, - 0x22d4c6, - 0x22e10c, - 0x22f70a, - 0x230087, - 0x231ecb, - 0x232b47, - 0x232b4e, - 0x1ba33ac4, - 0x233e84, - 0x236b87, - 0x2606c7, - 0x23df06, - 0x23df07, - 0x23e787, - 0x1be2a502, - 0x2407c6, - 0x2407ca, - 0x240d4b, - 0x2424c7, - 0x243085, - 0x243583, - 0x243c06, - 0x243c07, - 0x273203, - 0x1c200102, - 0x24448a, - 0x1c76fd82, - 0x1ca481c2, - 0x1ce46682, - 0x1d234942, - 0x2476c5, - 0x247e84, - 0x1da18982, - 0x2669c5, - 0x241343, - 0x20bbc5, - 0x219484, - 0x21fec4, - 0x30a506, - 0x31a186, - 0x208143, - 0x3b7284, - 0x328d43, - 0x1ea08a42, - 0x220384, - 0x381a86, - 0x220385, - 0x2d0006, - 0x3cf408, - 0x2358c4, - 0x230308, - 0x3a7785, - 0x2438c8, - 0x2b5386, - 0x347d87, - 0x2474c4, - 0x2474c6, - 0x29d303, - 0x3a2043, - 0x31c148, - 0x32ed84, - 0x35b5c7, - 0x1fe02186, - 0x2dda09, - 0x331908, - 0x33e8c8, - 0x39df04, - 0x210543, - 0x22eac2, - 0x2020a182, - 0x206130c2, - 0x213ac3, - 0x20a1d202, - 0x393c84, - 0x249f86, - 0x324c85, - 0x29f643, - 0x22b184, - 0x2b5d07, - 0x38a583, - 0x23bb08, - 0x221bc5, - 0x25da03, - 0x277e45, - 0x277f84, - 0x3015c6, - 0x226804, - 0x228c06, - 0x353fc6, - 0x2bda04, - 0x232f03, - 0x20e1d602, - 0x232645, - 0x200843, - 0x21202242, - 0x22e0c3, - 0x218f05, - 0x231103, - 0x231109, - 0x21600942, - 0x21e21742, - 0x28b3c5, - 0x215f46, - 0x2a52c6, - 0x2c5d08, - 0x2c5d0b, - 0x2039cb, - 0x26d545, - 0x39c0c5, - 0x2cba89, - 0x1601042, - 0x2cfc88, - 0x204544, - 0x22602bc2, - 0x2182c3, - 0x22e60886, - 0x23da48, - 0x23200c02, - 0x223dc8, - 0x23605642, - 0x2bc08a, - 0x23ad1703, - 0x205246, - 0x35c6c8, - 0x30b508, - 0x2d4146, - 0x37eb07, - 0x3adbc7, - 0x24f2ca, - 0x377944, - 0x358b04, - 0x36e249, - 0x243ad3c5, - 0x27a546, - 0x226003, - 0x24fd84, - 0x246353c4, - 0x3949c7, - 0x233cc7, - 0x2bb1c4, - 0x2d3185, - 0x256588, - 0x2484c7, - 0x248847, - 0x24a17242, - 0x312f44, - 0x290e08, - 0x24a344, - 0x24ba04, - 0x24c045, - 0x24d647, - 0x25bf49, - 0x24e2c4, - 0x24e849, - 0x24ea88, - 0x24fb04, - 0x24fb07, - 0x24e500c3, - 0x250247, - 0x1621e82, - 0x16ae902, - 0x250dc6, - 0x251407, - 0x252584, - 0x253a47, - 0x254647, - 0x254dc3, - 0x22ec42, - 0x204102, - 0x26fb03, - 0x26fb04, - 0x26fb0b, - 0x36b248, - 0x25cd84, - 0x258745, - 0x259747, - 0x25afc5, - 0x2cf5ca, - 0x25ccc3, - 0x25201482, - 0x21f584, - 0x260489, - 0x264883, - 0x264947, - 0x3cd809, - 0x218bc8, - 0x23f883, - 0x27db87, - 0x27e209, - 0x26c043, - 0x285604, - 0x2864c9, - 0x2896c6, - 0x354383, - 0x206502, - 0x238cc3, - 0x3c7a87, - 0x2df1c5, - 0x387c46, - 0x257384, - 0x2e7d45, - 0x21bd83, - 0x213586, - 0x20afc2, - 0x3aea44, - 0x25623642, - 0x25a67d03, - 0x25e028c2, - 0x24b903, - 0x212a44, - 0x212a47, - 0x3cc886, - 0x27bc42, - 0x26236142, - 0x3cf604, - 0x2662a642, - 0x26a00ac2, - 0x2b2944, - 0x2b2945, - 0x202b05, - 0x361146, - 0x26e0ccc2, - 0x20ccc5, - 0x20dac5, - 0x20e903, - 0x212bc6, - 0x21d6c5, - 0x22a842, - 0x353045, - 0x22a844, - 0x235803, - 0x235a43, - 0x27207702, - 0x2dc347, - 0x2d6244, - 0x2d6249, - 0x24fc84, - 0x285403, - 0x358409, - 0x285408, - 0x276a3a84, - 0x2a3a86, - 0x2a8bc3, - 0x21ac03, - 0x213ec3, - 0x27af9602, - 0x2fc0c2, - 0x27e00642, - 0x3394c8, - 0x275608, - 0x3b26c6, - 0x26f745, - 0x2809c5, - 0x38c3c7, - 0x236185, - 0x259a02, - 0x28294f42, - 0x28600042, - 0x238508, - 0x384a05, - 0x2f23c4, - 0x379a85, - 0x249b47, - 0x272084, - 0x244382, - 0x28a2f682, - 0x348e04, - 0x235687, - 0x3cd347, - 0x33e004, - 0x292e83, - 0x232744, - 0x232748, - 0x22d806, - 0x2d0f8a, - 0x396c44, - 0x293388, - 0x289b04, - 0x220106, - 0x294f04, - 0x3110c6, - 0x2d6509, - 0x234bc7, - 0x217b03, - 0x28e01742, - 0x39e183, - 0x20bf02, - 0x29239442, - 0x314ac6, - 0x378808, - 0x2a5447, - 0x2fe249, - 0x2928c9, - 0x2a6e05, - 0x2a7d89, - 0x2a8545, - 0x2a8689, - 0x2a9c05, - 0x2aa8c8, - 0x2960e604, - 0x29a54f07, - 0x22bec3, - 0x2aaac7, - 0x22bec6, - 0x2aaf87, - 0x2a2dc5, - 0x2ec403, - 0x29e2f4c2, - 0x20ecc4, - 0x2a22a682, - 0x2a655402, - 0x2f5086, - 0x279c85, - 0x2ae587, - 0x328c83, - 0x33bdc4, - 0x210e03, - 0x312643, - 0x2aa00d42, - 0x2b207782, - 0x382444, - 0x22ec03, - 0x2471c5, - 0x2b60ad02, - 0x2be02ec2, - 0x2ffd86, - 0x32eec4, - 0x301b44, - 0x301b4a, - 0x2c6005c2, - 0x269f03, - 0x2094ca, - 0x2171c8, - 0x2ca20a04, - 0x2005c3, - 0x208643, - 0x2555c9, - 0x254b89, - 0x278586, - 0x2ce17383, - 0x21da05, - 0x3305cd, - 0x217386, - 0x22184b, - 0x2d2032c2, - 0x21bc08, - 0x2fa0f502, - 0x2fe01142, - 0x2df4c5, - 0x30200b02, - 0x24bc47, - 0x2b3e87, - 0x208543, - 0x325908, - 0x30602a02, - 0x2a0d04, - 0x293083, - 0x389085, - 0x3a1143, - 0x241446, - 0x21cd04, - 0x3bb203, - 0x2b1d03, - 0x30a06e82, - 0x39c044, - 0x3b9305, - 0x3bdd87, - 0x27bd03, - 0x2aed83, - 0x2b14c3, - 0x160a6c2, - 0x2b1583, - 0x2b1c83, - 0x30e05e42, - 0x30ffc4, - 0x31a386, - 0x359e03, - 0x2b1fc3, - 0x312b2d02, - 0x2b2d08, - 0x2b3b04, - 0x310586, - 0x25ddc7, - 0x362c46, - 0x2d5844, - 0x3ee01782, - 0x22bd8b, - 0x2f6d4e, - 0x216acf, - 0x300e83, - 0x3f65e242, - 0x1642ac2, - 0x3fa03cc2, - 0x258f03, - 0x203cc3, - 0x302b06, - 0x2d2ec6, - 0x274f87, - 0x300804, - 0x3fe16082, - 0x402220c2, - 0x2499c5, - 0x2f6107, - 0x3bbf86, - 0x4060e842, - 0x20e844, - 0x2b8c43, - 0x40a06f42, - 0x40f6a383, - 0x2b9504, - 0x2c1789, - 0x16c74c2, - 0x41214882, - 0x332985, - 0x416c79c2, - 0x41a00e42, - 0x357dc7, - 0x210fc9, - 0x36e94b, - 0x3ad985, - 0x26ab09, - 0x386346, - 0x208d47, - 0x41e0fa84, - 0x211d89, - 0x3428c7, - 0x211a47, - 0x223f03, - 0x2b27c6, - 0x3176c7, - 0x2450c3, - 0x3c0c46, - 0x4260d9c2, - 0x42a31382, - 0x39e2c3, - 0x33b9c5, - 0x38eac7, - 0x21df46, - 0x2df145, - 0x256984, - 0x27cf05, - 0x2fbac4, - 0x42e04382, - 0x326407, - 0x2c64c4, - 0x25b244, - 0x3cac0d, - 0x2d86c9, - 0x22a5c8, - 0x273a04, - 0x34c285, - 0x39e907, - 0x204384, - 0x31f507, - 0x214605, - 0x43215804, - 0x2b16c5, - 0x263544, - 0x3010c6, - 0x2be105, - 0x4360e802, - 0x3a3f43, - 0x2df284, - 0x2df285, - 0x343fc6, - 0x32e8c5, - 0x2b0184, - 0x259dc3, - 0x21d146, - 0x31b405, - 0x31d885, - 0x2be204, - 0x396cc3, - 0x396ccc, - 0x43afcb42, - 0x43e0cf82, - 0x44204c82, - 0x221303, - 0x221304, - 0x4460bb02, - 0x305b88, - 0x387d05, - 0x245b84, - 0x361e86, - 0x44a11602, - 0x44e27fc2, - 0x45202d82, - 0x2a5845, - 0x2bd8c6, - 0x235304, - 0x20f806, - 0x2f0706, - 0x22ef43, - 0x4572228a, - 0x26ae85, - 0x25d203, - 0x221106, - 0x383dc9, - 0x221107, - 0x2a17c8, - 0x2d5449, - 0x36bf48, - 0x2ecf86, - 0x207043, - 0x45a9d082, - 0x3a3408, - 0x45e4eb42, - 0x46202302, - 0x208e83, - 0x2e4345, - 0x26bbc4, - 0x252b89, - 0x2eff84, - 0x2141c8, - 0x20bf43, - 0x46b946c4, - 0x2a6c03, - 0x215f88, - 0x3cab47, - 0x46e0e8c2, - 0x239ec2, - 0x32b3c5, - 0x266109, - 0x270203, - 0x280584, - 0x330584, - 0x22dc03, - 0x28128a, - 0x47327182, - 0x4760eb02, - 0x2cb2c3, - 0x3865c3, - 0x161a142, - 0x3aa303, - 0x47a26942, - 0x47e01942, - 0x4820ac44, - 0x20ac46, - 0x2fffc6, - 0x241c44, - 0x279883, - 0x2069c3, - 0x2f73c3, - 0x2410c6, - 0x326b85, - 0x2cb447, - 0x2ce5c5, - 0x2cf846, - 0x2d04c8, - 0x2d06c6, - 0x201944, - 0x29988b, - 0x2d67c3, - 0x2d67c5, - 0x2d6c48, - 0x227382, - 0x3580c2, - 0x48647742, - 0x48a02382, - 0x2160c3, - 0x48e6cac2, - 0x26cac3, - 0x2d7583, - 0x49603342, - 0x49adbd86, - 0x25ae46, - 0x49edbec2, - 0x4a20cb02, - 0x4a635a82, - 0x4aa07c02, - 0x4ae21482, - 0x4b200a42, - 0x2149c3, - 0x381e05, - 0x34c406, - 0x4b6bf144, - 0x38188a, - 0x3abbc6, - 0x2e6844, - 0x239383, - 0x4c208dc2, - 0x201402, - 0x22f1c3, - 0x4c61d283, - 0x300d07, - 0x2be007, - 0x4de6fc07, - 0x3c60c7, - 0x226bc3, - 0x38808a, - 0x397244, - 0x3ae204, - 0x3ae20a, - 0x242ec5, - 0x4e217202, - 0x250d83, - 0x4e600602, - 0x24fc43, - 0x39e143, - 0x4ee00582, - 0x29cf84, - 0x21b784, - 0x210805, - 0x30e7c5, - 0x31f686, - 0x347506, - 0x4f23bbc2, - 0x4f601c02, - 0x3c8c05, - 0x25ab52, - 0x349906, - 0x289a43, - 0x365986, - 0x350705, - 0x160d742, - 0x57a0e142, - 0x3643c3, - 0x20e143, - 0x288203, - 0x57e0b142, - 0x22ab03, - 0x58201202, - 0x20ac83, - 0x310008, - 0x256503, - 0x2a6c86, - 0x237007, - 0x313786, - 0x31378b, - 0x2e6787, - 0x2fab84, - 0x58a02d42, - 0x387b85, - 0x58e1d243, - 0x2a8b43, - 0x2bc285, - 0x387f83, - 0x59387f86, - 0x2cfe0a, - 0x2418c3, - 0x20f1c4, - 0x2003c6, - 0x335006, - 0x59659003, - 0x33bc87, - 0x278487, - 0x29b3c5, - 0x3a1bc6, - 0x2a1903, - 0x5c212e03, - 0x5c60a282, - 0x267e84, - 0x213b49, - 0x238307, - 0x229585, - 0x243204, - 0x376f48, - 0x2459c5, - 0x5ca4e545, - 0x287389, - 0x3996c3, - 0x248144, - 0x5ce09302, - 0x2162c3, - 0x5d28f002, - 0x28f006, - 0x1625f42, - 0x5d607b02, - 0x2a5748, - 0x2c4003, - 0x2b1607, - 0x350b05, - 0x2c3bc5, - 0x313a0b, - 0x2e51c6, - 0x313c06, - 0x2e63c6, - 0x28ac04, - 0x2c1986, - 0x5dad9088, - 0x231843, - 0x203043, - 0x203044, - 0x30ab04, - 0x30bac7, - 0x2ea545, - 0x5deea682, - 0x5e2059c2, - 0x2059c5, - 0x2ec504, - 0x2ec50b, - 0x2edcc8, - 0x24dfc4, - 0x5ea0e882, - 0x5ee4df42, - 0x2b2f43, - 0x2ee404, - 0x2ee6c5, - 0x2ef0c7, - 0x2f1f04, - 0x26d584, - 0x5f203b02, - 0x372649, - 0x2f3505, - 0x3adc45, - 0x2f4085, - 0x5f616203, - 0x2f5dc4, - 0x2f5dcb, - 0x2f6604, - 0x2f68cb, - 0x2f7305, - 0x216c0a, - 0x2f7ac8, - 0x2f7cca, - 0x2f8283, - 0x2f828a, - 0x5fe5c8c2, - 0x6023eec2, - 0x60681ac3, - 0x60afb282, - 0x2fb283, - 0x60f73dc2, - 0x61338042, - 0x2fb944, - 0x217846, - 0x20f545, - 0x2fc503, - 0x32bb06, - 0x20f045, - 0x2afcc4, - 0x61600902, - 0x2fec84, - 0x2cb70a, - 0x23f187, - 0x36c846, - 0x318f87, - 0x202103, - 0x2b9548, - 0x3ad60b, - 0x2c1ec5, - 0x3473c5, - 0x3473c6, - 0x2e9804, - 0x3b73c8, - 0x22dfc3, - 0x266cc4, - 0x35ae07, - 0x2fa7c6, - 0x38b386, - 0x35150a, - 0x23a844, - 0x23a84a, - 0x61b28386, - 0x328387, - 0x2587c7, - 0x273844, - 0x273849, - 0x31a045, - 0x36bb4b, - 0x2ec283, - 0x228dc3, - 0x61e1bbc3, - 0x22dbc4, - 0x62200682, - 0x3226c6, - 0x627a4f05, - 0x365bc5, - 0x254206, - 0x29db44, - 0x62a01a42, - 0x2435c4, - 0x62e08782, - 0x3357c5, - 0x237804, - 0x63a24603, - 0x63e0e182, - 0x20e183, - 0x353606, - 0x64203c42, - 0x226588, - 0x220f84, - 0x220f86, - 0x386e46, - 0x208804, - 0x21d0c5, - 0x26dc08, - 0x2af987, - 0x322a47, - 0x322a4f, - 0x290d06, - 0x23e903, - 0x23e904, - 0x245ac4, - 0x20dbc3, - 0x220244, - 0x2547c4, - 0x6460ed02, - 0x28b7c3, - 0x2591c3, - 0x64a11302, - 0x273b03, - 0x393d43, - 0x21130a, - 0x38f707, - 0x25c64c, - 0x25c906, - 0x25d486, - 0x25dac7, - 0x64e2c9c7, - 0x26a249, - 0x246ac4, - 0x26c784, - 0x65216102, - 0x65601002, - 0x3518c6, - 0x33ba84, - 0x28bc46, - 0x22ce48, - 0x23d884, - 0x24bc86, - 0x2a5285, - 0x2902c8, - 0x203bc3, - 0x292ac5, - 0x293e03, - 0x3add43, - 0x3add44, - 0x21f543, - 0x65a5e142, - 0x65e01702, - 0x2ec149, - 0x29d485, - 0x29ef84, - 0x2a2f05, - 0x21a444, - 0x2c8b87, - 0x359c45, - 0x6626fdc4, - 0x26fdc8, - 0x2eba46, - 0x2ec3c4, - 0x2efe08, - 0x2f1647, - 0x66605502, - 0x2f6044, - 0x20dc84, - 0x2bbc07, - 0x66a05504, - 0x255a42, - 0x66e11782, - 0x21c883, - 0x2dfe84, - 0x29c083, - 0x29c085, - 0x6722b5c2, - 0x2fc3c5, - 0x2701c2, - 0x399e85, - 0x2bba85, - 0x67614742, - 0x33e7c4, - 0x67a00b42, - 0x25f386, - 0x31fe06, - 0x266248, - 0x2c2e08, - 0x2f5004, - 0x303105, - 0x342a49, - 0x39c144, - 0x2cfdc4, - 0x212503, - 0x67e4f405, - 0x3789c7, - 0x24ac05, - 0x2a3d04, - 0x3a8f8d, - 0x374402, - 0x39a203, - 0x3b1a43, - 0x68201dc2, - 0x3a6a45, - 0x21cf47, - 0x2baa04, - 0x3c6187, - 0x2d5649, - 0x2cb849, - 0x277107, - 0x28d7c3, - 0x31ffc8, - 0x268ac9, - 0x3ba087, - 0x2fc845, - 0x2fd786, - 0x2fdd86, - 0x2fdf05, - 0x2d87c5, - 0x68600c82, - 0x2b0c85, - 0x2b6e48, - 0x2c54c6, - 0x68a024c7, - 0x2bb104, - 0x31c587, - 0x300986, - 0x68e0fdc2, - 0x343cc6, - 0x304a0a, - 0x305285, - 0x692e6a02, - 0x69692782, - 0x317a06, - 0x2b6948, - 0x69bcd507, - 0x69e18902, - 0x219503, - 0x209246, - 0x2249c4, - 0x3c1346, - 0x202806, - 0x20184a, - 0x38b4c5, - 0x2f8dc6, - 0x388543, - 0x388544, - 0x203942, - 0x32ee43, - 0x6a221342, - 0x2f8743, - 0x209744, - 0x2b6a84, - 0x2b6a8a, - 0x219fc3, - 0x279a48, - 0x2ed04a, - 0x237a87, - 0x307f86, - 0x25f244, - 0x2917c2, - 0x2a4402, - 0x6a6007c2, - 0x232703, - 0x258587, - 0x2007c7, - 0x287244, - 0x3b0047, - 0x2ef1c6, - 0x22a9c7, - 0x303d44, - 0x385005, - 0x218745, - 0x6aa0a682, - 0x20a686, - 0x2174c3, - 0x21cb82, - 0x21cb86, - 0x6ae00e02, - 0x6b2022c2, - 0x3c4805, - 0x6b60fec2, - 0x6ba019c2, - 0x32f005, - 0x2cd585, - 0x2a6085, - 0x6be5e603, - 0x24a045, - 0x2e5287, - 0x3772c5, - 0x34ba85, - 0x3aa744, - 0x3224c6, - 0x22b3c4, - 0x6c2008c2, - 0x6cf7b0c5, - 0x2a47c7, - 0x39e5c8, - 0x250606, - 0x25060d, - 0x254949, - 0x254952, - 0x2ff345, - 0x307543, - 0x6d202442, - 0x315dc4, - 0x217403, - 0x3446c5, - 0x305f05, - 0x6d62a342, - 0x25da43, - 0x6da5a902, - 0x6e2c2742, - 0x6e600082, - 0x2e2d05, - 0x3c62c3, - 0x24a948, - 0x6ea076c2, - 0x6ee067c2, - 0x29cf46, - 0x35c20a, - 0x214b43, - 0x259d43, - 0x342cc3, - 0x6fe03642, - 0x7e21a642, - 0x7ea10602, - 0x204b02, - 0x343ac9, - 0x2c6904, - 0x2a9f08, - 0x7eefc542, - 0x7f202b82, - 0x2acd05, - 0x232308, - 0x316d48, - 0x34d2cc, - 0x2379c3, - 0x7f617b82, - 0x7fa05ec2, - 0x281c46, - 0x308e05, - 0x274683, - 0x27bb06, - 0x308f46, - 0x2c6b43, - 0x30a8c3, - 0x30af86, - 0x30c444, - 0x26cfc6, - 0x21d845, - 0x21d84a, - 0x24c184, - 0x30cb04, - 0x30d24a, - 0x7fe05082, - 0x24c305, - 0x30e04a, - 0x30ea05, - 0x30f2c4, - 0x30f3c6, - 0x30f544, - 0x216586, - 0x8020fe02, - 0x2f4a06, - 0x326945, - 0x389807, - 0x3aaf06, - 0x25dcc4, - 0x2dd487, - 0x3221c6, - 0x234f05, - 0x239a87, - 0x3b8c87, - 0x3b8c8e, - 0x27b406, - 0x31f3c5, - 0x205447, - 0x20cb43, - 0x20cb47, - 0x2252c5, - 0x229ec4, - 0x233c82, - 0x2451c7, - 0x300884, - 0x240bc4, - 0x28620b, - 0x21b083, - 0x2d0807, - 0x21b084, - 0x2efc87, - 0x2921c3, - 0x3465cd, - 0x3a7608, - 0x235fc4, - 0x26fcc5, - 0x314205, - 0x314643, - 0x80620e82, - 0x316043, - 0x316a03, - 0x20a804, - 0x27e305, - 0x217547, - 0x3885c6, - 0x383c03, - 0x235acb, - 0x2740cb, - 0x2a828b, - 0x30260b, - 0x2e6a4a, - 0x33030b, - 0x3679cb, - 0x39838c, - 0x3cf08b, - 0x3d1911, - 0x31734a, - 0x317b8b, - 0x317e4c, - 0x31814b, - 0x31a8ca, - 0x31b54a, - 0x31ca8e, - 0x31dbcb, - 0x31de8a, - 0x320bd1, - 0x32100a, - 0x32150b, - 0x321a4e, - 0x32330c, - 0x32378b, - 0x323a4e, - 0x323dcc, - 0x329e4a, - 0x32ad8c, - 0x80b2b08a, - 0x32bc88, - 0x32c849, - 0x32f3ca, - 0x32f64a, - 0x32f8cb, - 0x3334ce, - 0x334511, - 0x33d349, - 0x33d58a, - 0x33dccb, - 0x34048a, - 0x340d16, - 0x34208b, - 0x34260a, - 0x34314a, - 0x3437cb, - 0x344149, - 0x346f49, - 0x34824d, - 0x348b8b, - 0x349a8b, - 0x34a44b, - 0x34a909, - 0x34af4e, - 0x34bc4a, - 0x34c98a, - 0x34cdca, - 0x34d90b, - 0x34e14b, - 0x34edcd, - 0x35218d, - 0x352cd0, - 0x35318b, - 0x354d4c, - 0x35594b, - 0x3578cb, - 0x358fce, - 0x35974b, - 0x35974d, - 0x35fc4b, - 0x3606cf, - 0x360a8b, - 0x3612ca, - 0x361809, - 0x362009, - 0x80f62dcb, - 0x36308e, - 0x36488b, - 0x36658f, - 0x3685cb, - 0x36888b, - 0x368b4b, - 0x36910a, - 0x36e549, - 0x37138f, - 0x376b4c, - 0x37740c, - 0x377a4e, - 0x377f4f, - 0x37830e, - 0x378b90, - 0x378f8f, - 0x37a68e, - 0x37b24c, - 0x37b552, - 0x37bfd1, - 0x37c7ce, - 0x37cc4e, - 0x37d18b, - 0x37d18e, - 0x37d50f, - 0x37d8ce, - 0x37dc53, - 0x37e111, - 0x37e54c, - 0x37e84e, - 0x37eccc, - 0x37f213, - 0x37f8d0, - 0x38044c, - 0x38074c, - 0x380c0b, - 0x38204e, - 0x38254b, - 0x382e0b, - 0x38400c, - 0x3977ca, - 0x397b8c, - 0x397e8c, - 0x398189, - 0x39978b, - 0x399a48, - 0x39a2c9, - 0x39a2cf, - 0x39ba4b, - 0x8139c84a, - 0x39f1cc, - 0x3a038b, - 0x3a0649, - 0x3a0f88, - 0x3a180b, - 0x3a1e0b, - 0x3a298a, - 0x3a2c0b, - 0x3a318c, - 0x3a3b48, - 0x3a7dcb, - 0x3aab4b, - 0x3ac7ce, - 0x3ade4b, - 0x3af1cb, - 0x3b880b, - 0x3b8ac9, - 0x3b900d, - 0x3c1b4a, - 0x3c4157, - 0x3c4e98, - 0x3c8509, - 0x3c9b4b, - 0x3caf54, - 0x3cb44b, - 0x3cb9ca, - 0x3cc08a, - 0x3cc30b, - 0x3ccb50, - 0x3ccf51, - 0x3cda4a, - 0x3ce68d, - 0x3ced8d, - 0x3d1d4b, - 0x3d2c06, - 0x20a783, - 0x81763703, - 0x2af846, - 0x241805, - 0x27eb07, - 0x3301c6, - 0x1660842, - 0x2aeec9, - 0x32b904, - 0x2e4708, - 0x21bb03, - 0x315d07, - 0x202cc2, - 0x2ae5c3, - 0x81a01242, - 0x2ccb46, - 0x2cde04, - 0x268244, - 0x3293c3, - 0x3293c5, - 0x822c7a02, - 0x826a8a04, - 0x273787, - 0x82a5b102, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0xe9fc8, - 0x214b83, - 0x2000c2, - 0x120648, - 0x208e02, - 0x213ec3, - 0x270203, - 0x21d283, - 0x14b83, - 0x259003, - 0x211303, - 0x33b2d6, - 0x35e713, - 0x3afec9, - 0x381408, - 0x387a09, - 0x30e1c6, - 0x348e50, - 0x2446d3, - 0x2fa888, - 0x3a79c7, - 0x2b0587, - 0x27cc4a, - 0x38d689, - 0x3a3cc9, - 0x2879cb, - 0x36b686, - 0x205bca, - 0x21ef86, - 0x32b503, - 0x2dc285, - 0x38f308, - 0x25f44d, - 0x310e8c, - 0x2eca87, - 0x31ab0d, - 0x26dd04, - 0x22de8a, - 0x22f24a, - 0x22f70a, - 0x2449c7, - 0x23cf47, - 0x241dc4, - 0x2474c6, - 0x32e644, - 0x2ff9c8, - 0x2effc9, - 0x2c5d06, - 0x2c5d08, - 0x2f8acd, - 0x2cba89, - 0x30b508, - 0x3adbc7, - 0x28be4a, - 0x251406, - 0x260247, - 0x2e2304, - 0x2274c7, - 0x213eca, - 0x24200e, - 0x236185, - 0x3c2dcb, - 0x307349, - 0x254b89, - 0x208387, - 0x20838a, - 0x2bbb47, - 0x2f6e89, - 0x2c9e88, - 0x31140b, - 0x2e4345, - 0x22a48a, - 0x235849, - 0x27460a, - 0x2ce64b, - 0x2273cb, - 0x287755, - 0x2e87c5, - 0x3adc45, - 0x2f5dca, - 0x27868a, - 0x3070c7, - 0x214c83, - 0x351848, - 0x2da04a, - 0x220f86, - 0x268909, - 0x2902c8, - 0x2ec3c4, - 0x37efc9, - 0x2c2e08, - 0x2b52c7, - 0x37b0c6, - 0x2a47c7, - 0x2b8007, - 0x240ec5, - 0x235fcc, - 0x26fcc5, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x14b83, - 0x259003, - 0x208e02, - 0x208e03, - 0x21d283, - 0x214b83, - 0x259003, - 0x208e03, - 0x21d283, - 0x14b83, - 0x256503, - 0x259003, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x14b83, - 0x259003, - 0x120648, - 0x208e02, - 0x202142, - 0x2fab02, - 0x202a02, - 0x20a002, - 0x2d3a42, - 0x8edc6, - 0x4e08e03, - 0x231103, - 0x3d0943, - 0x213ec3, - 0x217383, - 0x270203, - 0x2dc186, - 0x21d283, - 0x259003, - 0x2323c3, - 0x120648, - 0x394c44, - 0x394487, - 0x329d83, - 0x24f784, - 0x208203, - 0x208403, - 0x213ec3, - 0xeb207, - 0x192544, - 0x191503, - 0x192e05, - 0x2000c2, - 0x18d8c3, - 0x6208e02, - 0x648a8c9, - 0x8af4d, - 0x8b28d, - 0x2fab02, - 0x20a04, - 0x192e49, - 0x2003c2, - 0x6a20908, - 0xf5544, - 0x120648, - 0x1442f02, - 0x14005c2, - 0x1442f02, - 0x150ec46, - 0x22d083, - 0x2b9343, - 0x7208e03, - 0x22de84, - 0x7631103, - 0x7a13ec3, - 0x200d42, - 0x220a04, - 0x21d283, - 0x303303, - 0x200ec2, - 0x259003, - 0x218502, - 0x2fb883, - 0x203c42, - 0x201683, - 0x290383, - 0x206582, - 0x120648, - 0x22d083, - 0x303303, - 0x200ec2, - 0x2fb883, - 0x203c42, - 0x201683, - 0x290383, - 0x206582, - 0x2fb883, - 0x203c42, - 0x201683, - 0x290383, - 0x206582, - 0x208e03, - 0x38d8c3, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x217383, - 0x270203, - 0x2bf144, - 0x21d283, - 0x259003, - 0x202542, - 0x216203, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x38d8c3, - 0x208e02, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x21d283, - 0x259003, - 0x2fc845, - 0x22a342, - 0x2000c2, - 0x120648, - 0x1582ac8, - 0x15ec0a, - 0x213ec3, - 0x201ec1, - 0x201f81, - 0x201e81, - 0x201ac1, - 0x235c81, - 0x211201, - 0x207ec1, - 0x218481, - 0x203241, - 0x200001, - 0x2000c1, - 0x200201, - 0xf8945, - 0x120648, - 0x200101, - 0x200d81, - 0x200501, - 0x201481, - 0x200041, - 0x200801, - 0x200181, - 0x205e41, - 0x200701, - 0x2004c1, - 0x200d01, - 0x200581, - 0x2003c1, - 0x201b81, - 0x201301, - 0x200401, - 0x200741, - 0x2007c1, - 0x200081, - 0x202b81, - 0x201fc1, - 0x20a781, - 0x202cc1, - 0x201241, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x208e02, - 0x208e03, - 0x231103, - 0x2003c2, - 0x259003, - 0xeb207, - 0x7a6c7, - 0x35d46, - 0x3968a, - 0x89c48, - 0x57fc8, - 0x58487, - 0x1b8006, - 0xe1f05, - 0x129cc5, - 0xc8346, - 0x3f5c6, - 0x2879c4, - 0x274347, - 0x120648, - 0x2dd584, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x32b288, - 0x38c384, - 0x231044, - 0x267c44, - 0x281b47, - 0x2d8c47, - 0x208e03, - 0x233e8b, - 0x38d0ca, - 0x36b947, - 0x23cd48, - 0x389108, - 0x231103, - 0x328847, - 0x3d0943, - 0x3ca0c8, - 0x203589, - 0x220a04, - 0x217383, - 0x2d28c8, - 0x270203, - 0x2d690a, - 0x2dc186, - 0x3abbc7, - 0x21d283, - 0x214b86, - 0x30fa08, - 0x259003, - 0x2c8486, - 0x2edf0d, - 0x2eed88, - 0x2f660b, - 0x255e86, - 0x325847, - 0x221ac5, - 0x38cb0a, - 0x21e905, - 0x24ab0a, - 0x22a342, - 0x202043, - 0x240bc4, - 0x200006, - 0x3b2083, - 0x320543, - 0x25c183, - 0x2bb483, - 0x38cd43, - 0x201902, - 0x2d22c5, - 0x2a71c9, - 0x241543, - 0x2038c3, - 0x2063c3, - 0x200201, - 0x2cfb87, - 0x2e2a45, - 0x38f243, - 0x203283, - 0x267c44, - 0x328cc3, - 0x21d788, - 0x361a43, - 0x3038cd, - 0x27b4c8, - 0x3ca6c6, - 0x32ee83, - 0x37f683, - 0x3a1a83, - 0xb608e03, - 0x230948, - 0x233e84, - 0x2424c3, - 0x200106, - 0x2461c8, - 0x20cd83, - 0x38cb43, - 0x22e0c3, - 0x231103, - 0x227a43, - 0x228a83, - 0x267f43, - 0x32ee03, - 0x223dc3, - 0x2353c3, - 0x383085, - 0x252684, - 0x2536c7, - 0x22ec42, - 0x257c43, - 0x259e86, - 0x25ca83, - 0x25d603, - 0x278d83, - 0x203103, - 0x394943, - 0x2957c7, - 0xba13ec3, - 0x245dc3, - 0x207003, - 0x203583, - 0x2171c3, - 0x2f4d43, - 0x3637c5, - 0x36af03, - 0x24b209, - 0x215403, - 0x306203, - 0xbe4b883, - 0x2a9003, - 0x222b88, - 0x2a7106, - 0x3b8686, - 0x29af86, - 0x37ff87, - 0x20a383, - 0x208e83, - 0x270203, - 0x289d46, - 0x227382, - 0x2a4003, - 0x339905, - 0x21d283, - 0x25e7c7, - 0x1614b83, - 0x23a703, - 0x231f43, - 0x229083, - 0x259003, - 0x21f786, - 0x36be86, - 0x371c43, - 0x225f03, - 0x216203, - 0x25c8c3, - 0x30a943, - 0x2fa003, - 0x2fba43, - 0x20f045, - 0x202203, - 0x28bd46, - 0x236e48, - 0x228dc3, - 0x326609, - 0x2d6048, - 0x222e48, - 0x267dc5, - 0x23064a, - 0x239c0a, - 0x23b8cb, - 0x23c908, - 0x3bb1c3, - 0x2fba83, - 0x34bb83, - 0x3487c8, - 0x3b7a43, - 0x388544, - 0x260983, - 0x2007c3, - 0x227343, - 0x2603c3, - 0x2323c3, - 0x22a342, - 0x226f83, - 0x2379c3, - 0x30ccc3, - 0x30dc84, - 0x240bc4, - 0x21d643, - 0x120648, - 0x2000c2, - 0x204342, - 0x201902, - 0x201b42, - 0x200202, - 0x203982, - 0x232782, - 0x202bc2, - 0x200382, - 0x202d82, - 0x20e8c2, - 0x202382, - 0x26cac2, - 0x20a282, - 0x2d3a42, - 0x209302, - 0x203042, - 0x203b02, - 0x20a582, - 0x204582, - 0x200682, - 0x216b42, - 0x201a42, - 0x211302, - 0x201002, - 0x212142, - 0x2019c2, - 0xc2, - 0x4342, - 0x1902, - 0x1b42, - 0x202, - 0x3982, - 0x32782, - 0x2bc2, - 0x382, - 0x2d82, - 0xe8c2, - 0x2382, - 0x6cac2, - 0xa282, - 0xd3a42, - 0x9302, - 0x3042, - 0x3b02, - 0xa582, - 0x4582, - 0x682, - 0x16b42, - 0x1a42, - 0x11302, - 0x1002, - 0x12142, - 0x19c2, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x2042, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x208e02, - 0x259003, - 0xd208e03, - 0x213ec3, - 0x270203, - 0xe6143, - 0x22c942, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0xe6143, - 0x259003, - 0x1242, - 0x2001c2, - 0x15c5805, - 0x20ed42, - 0x120648, - 0x8e02, - 0x232cc2, - 0x207042, - 0x239382, - 0x217202, - 0x23bbc2, - 0x129cc5, - 0x20ce82, - 0x200ec2, - 0x20b142, - 0x205d02, - 0x209302, - 0x3a3282, - 0x211782, - 0x258ec2, - 0xeb207, - 0xbe4cd, - 0xe1f89, - 0xaa60b, - 0xe5148, - 0x73e89, - 0x106c86, - 0x213ec3, - 0x120648, - 0x192544, - 0x191503, - 0x192e05, - 0x120648, - 0xdfe07, - 0x59086, - 0x192e49, - 0x1580e, - 0x18307, - 0x2000c2, - 0x2879c4, - 0x208e02, - 0x208e03, - 0x202142, - 0x231103, - 0x200382, - 0x2dd584, - 0x217383, - 0x24eb42, - 0x21d283, - 0x2003c2, - 0x259003, - 0x3adc46, - 0x32fe8f, - 0x601fc3, - 0x120648, - 0x208e02, - 0x3d0943, - 0x213ec3, - 0x270203, - 0x14b83, - 0x15808, - 0x158c8cb, - 0x1419dca, - 0x14730c7, - 0x7cd0b, - 0xeb0c5, - 0xf8945, - 0xeb207, - 0x208e02, - 0x208e03, - 0x213ec3, - 0x21d283, - 0x2000c2, - 0x204bc2, - 0x206602, - 0x10a08e03, - 0x240042, - 0x231103, - 0x221e82, - 0x223642, - 0x213ec3, - 0x259a02, - 0x274082, - 0x2a89c2, - 0x205002, - 0x28eb02, - 0x200802, - 0x203482, - 0x201742, - 0x27c042, - 0x239442, - 0x2aed82, - 0x2c7c82, - 0x217502, - 0x249a82, - 0x270203, - 0x201942, - 0x21d283, - 0x214002, - 0x28a042, - 0x259003, - 0x2415c2, - 0x211302, - 0x216102, - 0x201702, - 0x214742, - 0x2e6a02, - 0x20a682, - 0x25a902, - 0x21ccc2, - 0x31de8a, - 0x3612ca, - 0x39d78a, - 0x3d2d82, - 0x226b82, - 0x363782, - 0x10f24a09, - 0x1134238a, - 0x142c347, - 0x11600982, - 0x140d983, - 0x1a82, - 0x14238a, - 0x245a04, - 0x11e08e03, - 0x231103, - 0x24ea84, - 0x213ec3, - 0x220a04, - 0x217383, - 0x270203, - 0xe6344, - 0x193803, - 0x21d283, - 0x1caa45, - 0x214b83, - 0x259003, - 0x1522584, - 0x202203, - 0x202043, - 0x120648, - 0x1f06, - 0x15b7f84, - 0x1291c5, - 0x180ca, - 0x12ad02, - 0x1aa546, - 0x7a91, - 0x12724a09, - 0x129248, - 0x7a888, - 0xfb547, - 0x2842, - 0xf894b, - 0x187e4b, - 0x180e8a, - 0x5b0a, - 0x67c47, - 0x120648, - 0x115888, - 0xb447, - 0x1901670b, - 0x18dc7, - 0x20c2, - 0x3dbc7, - 0x134c0a, - 0x5b58f, - 0xfd0cf, - 0x142382, - 0x8e02, - 0xa3c08, - 0xf190a, - 0xdf90a, - 0x1a158a, - 0x7b2c8, - 0x1f488, - 0x5e088, - 0xdfdc8, - 0x18e248, - 0x8a42, - 0x1c588f, - 0x9ea8b, - 0x886c8, - 0x32fc7, - 0x13278a, - 0x56a8b, - 0x7c349, - 0x132687, - 0x1f388, - 0x39dcc, - 0x1118c7, - 0x17084a, - 0x667c8, - 0xfdfce, - 0x35d4e, - 0x67a8b, - 0xafd8b, - 0xe924b, - 0xeccc9, - 0x11b18b, - 0x11ee8d, - 0x135ecb, - 0x3bccd, - 0x3c04d, - 0x3f40a, - 0x40a0b, - 0x454cb, - 0x179785, - 0x194246d0, - 0xf5cf, - 0x112a4f, - 0x1754cd, - 0xbbd50, - 0x5642, - 0x19a26388, - 0x7a548, - 0x116a8e, - 0x19f61a05, - 0x4e2cb, - 0x13aad0, - 0x552c8, - 0x1f58a, - 0xaff49, - 0x65487, - 0x657c7, - 0x65987, - 0x65d07, - 0x66b07, - 0x67107, - 0x68347, - 0x68607, - 0x68ec7, - 0x691c7, - 0x69887, - 0x69a47, - 0x69c07, - 0x69dc7, - 0x6a0c7, - 0x6a487, - 0x6ad47, - 0x6b8c7, - 0x6be87, - 0x6c147, - 0x6c307, - 0x6c607, - 0x6c987, - 0x6cb87, - 0x6e147, - 0x6e307, - 0x6e4c7, - 0x6ed47, - 0x6f247, - 0x6f887, - 0x70547, - 0x70807, - 0x70d07, - 0x70ec7, - 0x712c7, - 0x71dc7, - 0x72287, - 0x72687, - 0x72847, - 0x72a07, - 0x73587, - 0x75d07, - 0x76247, - 0x76807, - 0x769c7, - 0x76d47, - 0x772c7, - 0xafc2, - 0x5e18a, - 0xe6487, - 0x18de45, - 0xabd51, - 0xe906, - 0x1147ca, - 0xa3a8a, - 0x59086, - 0xcd78b, - 0x642, - 0x2d811, - 0xc3e09, - 0x94b49, - 0x1742, - 0x7154a, - 0xa66c9, - 0xa6e0f, - 0xa740e, - 0xa80c8, - 0x55402, - 0x1b84c9, - 0x19cd4e, - 0x10470c, - 0xe814f, - 0x1b27ce, - 0x29b8c, - 0x11eb09, - 0x15a1d1, - 0x15a788, - 0x3a1d2, - 0x4378d, - 0x4738d, - 0x49e4b, - 0x5be15, - 0x6b109, - 0x6f60a, - 0x71f49, - 0x7aa50, - 0x80ecb, - 0x16820f, - 0x1c0b0b, - 0x9140c, - 0x99c10, - 0xa15ca, - 0xa3ecd, - 0xa5ace, - 0xaa2ca, - 0xac90c, - 0xb7cd4, - 0xc3a91, - 0x1bd4cb, - 0x1513cf, - 0x1a4dcd, - 0x11fcce, - 0xb518c, - 0xb658c, - 0xb79cb, - 0xb850e, - 0xbf490, - 0xbfe0b, - 0xc34cd, - 0xc448f, - 0xc500c, - 0xc5b8e, - 0x1165d1, - 0x164d4c, - 0xd1e87, - 0xd504d, - 0xdaf4c, - 0xdc8d0, - 0xe7b4d, - 0xf9d07, - 0xff650, - 0x105488, - 0x133dcb, - 0x16ec4f, - 0x1656c8, - 0x1149cd, - 0x199e10, - 0xfcfc9, - 0x1a2b1fc6, - 0xb2f03, - 0xb8945, - 0x6f42, - 0x132c09, - 0x73a0a, - 0x1a63ddc4, - 0x10dcc6, - 0x1ba0a, - 0x1a927c89, - 0x92203, - 0x14d10a, - 0xdd811, - 0xddc49, - 0xdf887, - 0xe0607, - 0xe6548, - 0x7c0b, - 0x12d0c9, - 0xe6cd0, - 0xe718c, - 0xe8608, - 0xe8c85, - 0xca008, - 0x1b9e4a, - 0x154247, - 0x12dd47, - 0x1c02, - 0x13b7ca, - 0x112d89, - 0x70bc5, - 0x5e64a, - 0x1cd44f, - 0x13f00b, - 0x16388c, - 0x67e92, - 0x9d585, - 0xea348, - 0xd634a, - 0x1aef3f45, - 0x16348c, - 0x138043, - 0x1a3282, - 0xfbd8a, - 0x14fc10c, - 0x111c48, - 0x3be88, - 0x13f287, - 0x8782, - 0x3c42, - 0x51590, - 0x78107, - 0x2ce4f, - 0xc8346, - 0xcece, - 0x15554b, - 0x49148, - 0x7c709, - 0x1920d2, - 0x10b3cd, - 0x10b908, - 0xaa4c9, - 0xd848d, - 0x150909, - 0x19b3cb, - 0x9c48, - 0x85d88, - 0x87588, - 0x8aac9, - 0x8acca, - 0x8f64c, - 0xf708a, - 0x10a987, - 0x15abcd, - 0xfeacb, - 0x12b70c, - 0x30488, - 0x47f89, - 0x1aa750, - 0x67c2, - 0x7ec4d, - 0x3642, - 0x1a642, - 0x10a8ca, - 0x1146ca, - 0x115c0b, - 0x4568c, - 0x11518a, - 0x11560e, - 0xa8cd, - 0x1b1d2ac5, - 0x12f108, - 0x1242, - 0x12b959ce, - 0x13201b4e, - 0x13b8e6ca, - 0x14328e8e, - 0x14b911ce, - 0x1536cbcc, - 0x142c347, - 0x142c349, - 0x140d983, - 0x15b3f70c, - 0x16205649, - 0x16a07409, - 0x17217ec9, - 0x1a82, - 0x195911, - 0x1a91, - 0x18e60d, - 0x128dd1, - 0x191111, - 0x16cb0f, - 0x13f64f, - 0x14c68c, - 0x734c, - 0x17e0c, - 0x5790d, - 0x757d5, - 0xd458c, - 0x15d88c, - 0x170c10, - 0x17bccc, - 0x1c4b8c, - 0x1c6359, - 0x1d0ad9, - 0x1d2499, - 0x5394, - 0xb5d4, - 0xc054, - 0xc5d4, - 0xd214, - 0x17a0b889, - 0x1800c309, - 0x18b5d949, - 0x12f5a989, - 0x1a82, - 0x1375a989, - 0x1a82, - 0x538a, - 0x1a82, - 0x13f5a989, - 0x1a82, - 0x538a, - 0x1a82, - 0x1475a989, - 0x1a82, - 0x14f5a989, - 0x1a82, - 0x1575a989, - 0x1a82, - 0x538a, - 0x1a82, - 0x15f5a989, - 0x1a82, - 0x538a, - 0x1a82, - 0x1675a989, - 0x1a82, - 0x16f5a989, - 0x1a82, - 0x538a, - 0x1a82, - 0x1775a989, - 0x1a82, - 0x538a, - 0x1a82, - 0x17f5a989, - 0x1a82, - 0x1875a989, - 0x1a82, - 0x18f5a989, - 0x1a82, - 0x538a, - 0x1a82, - 0x7a85, - 0x180e84, - 0x1959ce, - 0x1b4e, - 0x1bdce, - 0x18e6ca, - 0x128e8e, - 0x1911ce, - 0x16cbcc, - 0x13f70c, - 0x5649, - 0x7409, - 0x17ec9, - 0xb889, - 0xc309, - 0x15d949, - 0x759cd, - 0xc889, - 0xd4c9, - 0x94644, - 0xf9284, - 0x12f2c4, - 0x131fc4, - 0x7cfc4, - 0x12e984, - 0x42f84, - 0x4e044, - 0xfb544, - 0x1596a83, - 0xa203, - 0x5642, - 0xa8c3, - 0xe402, - 0xe408, - 0x12d147, - 0x8a42, - 0x2000c2, - 0x208e02, - 0x202142, - 0x217242, - 0x200382, - 0x2003c2, - 0x203c42, - 0x208e03, - 0x231103, - 0x213ec3, - 0x2171c3, - 0x21d283, - 0x259003, - 0x120648, - 0x208e03, - 0x231103, - 0x21d283, - 0x259003, - 0xec43, - 0x213ec3, - 0x20a04, - 0x2000c2, - 0x38d8c3, - 0x1d608e03, - 0x23d907, - 0x213ec3, - 0x221303, - 0x2bf144, - 0x21d283, - 0x259003, - 0x23628a, - 0x3adc45, - 0x216203, - 0x2022c2, - 0x120648, - 0x120648, - 0x8e02, - 0x134882, - 0x1df27a0b, - 0x1e21a184, - 0x3dd05, - 0x7d85, - 0xfc646, - 0x1e607d85, - 0x548c3, - 0x19a1c3, - 0x192544, - 0x191503, - 0x192e05, - 0xf8945, - 0x120648, - 0x18dc7, - 0x8e03, - 0x1ee394c7, - 0x18bc46, - 0x1f18e505, - 0x18bd07, - 0x1fd8a, - 0x1e208, - 0x1fc87, - 0x7d988, - 0xdc487, - 0xfad8f, - 0x464c7, - 0x4de46, - 0x13aad0, - 0x138b0f, - 0x6d409, - 0x10dd44, - 0x1f58bdce, - 0x6d94c, - 0x56c8a, - 0x7c4c7, - 0xe590a, - 0x190b09, - 0x1a3f8c, - 0xc254a, - 0x5988a, - 0x192e49, - 0x10dcc6, - 0x7c58a, - 0x10bf0a, - 0x9a70a, - 0x14f909, - 0xdd148, - 0xdd3c6, - 0xe34cd, - 0xb8dc5, - 0x1fb76e0c, - 0x18307, - 0x102f09, - 0x1228c7, - 0xb1794, - 0x10588b, - 0x8850a, - 0x191f4a, - 0xa428d, - 0x1515e09, - 0x10b18c, - 0x10b70b, - 0x35d43, - 0x35d43, - 0x35d46, - 0x35d43, - 0xfc648, - 0xbb1c9, - 0x18d8c3, - 0x120648, - 0x8e02, - 0x4ea84, - 0x5a483, - 0xfc845, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x2038c3, - 0x208e03, - 0x231103, - 0x3d0943, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x294d03, - 0x202043, - 0x2038c3, - 0x2879c4, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x22f583, - 0x208e03, - 0x231103, - 0x217243, - 0x3d0943, - 0x213ec3, - 0x220a04, - 0x307c83, - 0x208e83, - 0x270203, - 0x21d283, - 0x259003, - 0x216203, - 0x209283, - 0x21a08e03, - 0x231103, - 0x24a783, - 0x213ec3, - 0x2230c3, - 0x208e83, - 0x259003, - 0x203b03, - 0x35c4c4, - 0x120648, - 0x22208e03, - 0x231103, - 0x2a8183, - 0x213ec3, - 0x270203, - 0x2bf144, - 0x21d283, - 0x259003, - 0x214d03, - 0x120648, - 0x22a08e03, - 0x231103, - 0x3d0943, - 0x214b83, - 0x259003, - 0x120648, - 0x142c347, - 0x38d8c3, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x2bf144, - 0x21d283, - 0x259003, - 0xf8945, - 0xeb207, - 0xb19cb, - 0xde044, - 0xb8dc5, - 0x1582ac8, - 0xa87cd, - 0x23e4e545, - 0x9fec4, - 0x11243, - 0xfcec5, - 0x36b845, - 0x120648, - 0x1b002, - 0x40c03, - 0xf9646, - 0x32be08, - 0x3a6e47, - 0x2879c4, - 0x33ed46, - 0x34c546, - 0x120648, - 0x31cd83, - 0x312449, - 0x347a95, - 0x147a9f, - 0x208e03, - 0x2d4152, - 0x168dc6, - 0x1776c5, - 0x1f58a, - 0xaff49, - 0x2d3f0f, - 0x2dd584, - 0x238f45, - 0x305fd0, - 0x381607, - 0x214b83, - 0x23a708, - 0x15eb46, - 0x29ed0a, - 0x202584, - 0x2f3983, - 0x3adc46, - 0x2022c2, - 0x23ef4b, - 0x14b83, - 0x1842c4, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x14b83, - 0x259003, - 0x2fa443, - 0x208e02, - 0xf0183, - 0x21d283, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x221303, - 0x235843, - 0x259003, - 0x208e02, - 0x208e03, - 0x231103, - 0x21d283, - 0x14b83, - 0x259003, - 0x2000c2, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x7d85, - 0x2879c4, - 0x208e03, - 0x231103, - 0x20ac44, - 0x21d283, - 0x259003, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0xe6143, - 0x259003, - 0x208e03, - 0x231103, - 0x3d0943, - 0x203583, - 0x270203, - 0x21d283, - 0x14b83, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x38d604, - 0x220a04, - 0x21d283, - 0x259003, - 0x202043, - 0x208e02, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0xe6143, - 0x259003, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x2bd9c3, - 0x69f03, - 0x21303, - 0x21d283, - 0x259003, - 0x31de8a, - 0x340ac9, - 0x357f8b, - 0x3586ca, - 0x3612ca, - 0x36fc4b, - 0x383a0a, - 0x3977ca, - 0x39d78a, - 0x39da0b, - 0x3b9b89, - 0x3bfe4a, - 0x3c028b, - 0x3cb70b, - 0x3d16ca, - 0x208e03, - 0x231103, - 0x3d0943, - 0x270203, - 0x21d283, - 0x14b83, - 0x259003, - 0x1c5b0b, - 0x5f0c8, - 0xd85c4, - 0x7d46, - 0x3f6c9, - 0x120648, - 0x208e03, - 0x265484, - 0x221602, - 0x2bf144, - 0x393345, - 0x2038c3, - 0x2879c4, - 0x208e03, - 0x233e84, - 0x231103, - 0x24ea84, - 0x2dd584, - 0x220a04, - 0x208e83, - 0x21d283, - 0x259003, - 0x27ee05, - 0x22f583, - 0x216203, - 0x294003, - 0x26fdc4, - 0x201e84, - 0x2bb485, - 0x120648, - 0x326cc4, - 0x32e046, - 0x279b44, - 0x208e02, - 0x248947, - 0x250fc7, - 0x24ba04, - 0x25afc5, - 0x2e7d45, - 0x22bec5, - 0x220a04, - 0x380048, - 0x233506, - 0x31be48, - 0x27c085, - 0x2e4345, - 0x397244, - 0x259003, - 0x2f5544, - 0x36e886, - 0x3add43, - 0x26fdc4, - 0x24ac05, - 0x332b84, - 0x24f244, - 0x2022c2, - 0x230206, - 0x3afbc6, - 0x308e05, - 0x2000c2, - 0x38d8c3, - 0x2ae08e02, - 0x226504, - 0x200382, - 0x270203, - 0x207c02, - 0x21d283, - 0x2003c2, - 0x211303, - 0x202043, - 0xa8a04, - 0x120648, - 0x120648, - 0x213ec3, - 0xe6143, - 0x2000c2, - 0x2ba08e02, - 0x213ec3, - 0x269b83, - 0x307c83, - 0x21a184, - 0x21d283, - 0x259003, - 0x120648, - 0x2000c2, - 0x2c208e02, - 0x208e03, - 0x21d283, - 0x14b83, - 0x259003, - 0x682, - 0x202442, - 0x22a342, - 0x221303, - 0x2ec903, - 0x2000c2, - 0xf8945, - 0x120648, - 0xeb207, - 0x208e02, - 0x231103, - 0x24ea84, - 0x204a03, - 0x213ec3, - 0x203583, - 0x270203, - 0x21d283, - 0x213443, - 0x259003, - 0x214c83, - 0x93f53, - 0xd3a94, - 0xf8945, - 0xeb207, - 0x103806, - 0x73c0b, - 0x35d46, - 0x57e07, - 0x5afc6, - 0x649, - 0xb330a, - 0x89b0d, - 0xbe1cc, - 0x10c88a, - 0xf3088, - 0x129cc5, - 0x1fdc8, - 0xc8346, - 0x6fa06, - 0x3f5c6, - 0x205642, - 0x3184, - 0x823ce, - 0x5668c, - 0xf8945, - 0x181047, - 0x20dd1, - 0xfb3ca, - 0x208e03, - 0x7d905, - 0x179b48, - 0x26744, - 0x2d4240c6, - 0xabd46, - 0xd9506, - 0x8edca, - 0x18f283, - 0x2da44684, - 0x605, - 0xecc43, - 0x2de32587, - 0x1caa45, - 0xcd84c, - 0xf7f48, - 0x9d1cb, - 0x2e24aecc, - 0x14111c3, - 0xb9948, - 0x9e909, - 0x4f408, - 0x141b946, - 0x2e774c09, - 0x130d47, - 0xeb0ca, - 0xe1c8, - 0xfc648, - 0xfb544, - 0x15d405, - 0x9d307, - 0x2ea9d303, - 0x2ef9e406, - 0x2f2f5dc4, - 0x2f6fbf47, - 0xfc644, - 0xfc644, - 0xfc644, - 0xfc644, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x2000c2, - 0x208e02, - 0x213ec3, - 0x200d42, - 0x21d283, - 0x259003, - 0x211303, - 0x377f4f, - 0x37830e, - 0x120648, - 0x208e03, - 0x46007, - 0x231103, - 0x213ec3, - 0x217383, - 0x21d283, - 0x259003, - 0x18e904, - 0x191644, - 0x194cc4, - 0x21aec3, - 0x393f47, - 0x200a82, - 0x2c96c9, - 0x204342, - 0x25188b, - 0x2a1bca, - 0x2ac389, - 0x200542, - 0x326746, - 0x23ac15, - 0x2519d5, - 0x23fa13, - 0x251f53, - 0x21cec2, - 0x21cec5, - 0x3253cc, - 0x275f8b, - 0x3c2645, - 0x201b42, - 0x323bc2, - 0x386246, - 0x202842, - 0x260bc6, - 0x21f80d, - 0x3ca7cc, - 0x224744, - 0x200882, - 0x205042, - 0x23a588, - 0x200202, - 0x2231c6, - 0x33394f, - 0x2231d0, - 0x2f0c04, - 0x23add5, - 0x23fb93, - 0x20d8c3, - 0x32408a, - 0x214a47, - 0x34be89, - 0x2e5687, - 0x320f02, - 0x200282, - 0x3b4b46, - 0x207f42, - 0x120648, - 0x20d702, - 0x20a842, - 0x225387, - 0x331bc7, - 0x331bd1, - 0x2184c5, - 0x339b4e, - 0x2184cf, - 0x2020c2, - 0x214c47, - 0x21b508, - 0x2054c2, - 0x2c25c2, - 0x325a46, - 0x33cb0f, - 0x325a50, - 0x229fc2, - 0x200f82, - 0x236cc8, - 0x208f83, - 0x25a648, - 0x208f8d, - 0x231783, - 0x3131c8, - 0x23178f, - 0x231b4e, - 0x391c0a, - 0x2ed251, - 0x2ed6d0, - 0x2de80d, - 0x2deb4c, - 0x200f87, - 0x324207, - 0x33ee09, - 0x224842, - 0x203982, - 0x33fb0c, - 0x34000b, - 0x206a82, - 0x2b7b86, - 0x214d42, - 0x200482, - 0x342382, - 0x208e02, - 0x22b904, - 0x2380c7, - 0x22a502, - 0x241007, - 0x242d87, - 0x22d182, - 0x202282, - 0x245ec5, - 0x218982, - 0x37ae0e, - 0x2a454d, - 0x231103, - 0x28684e, - 0x3bcf4d, - 0x3257c3, - 0x2017c2, - 0x2852c4, - 0x2327c2, - 0x20ce02, - 0x3a0845, - 0x3a2507, - 0x249b02, - 0x217242, - 0x24e687, - 0x252f08, - 0x22ec42, - 0x29d606, - 0x34e50c, - 0x34ea0b, - 0x201482, - 0x26178f, - 0x261b50, - 0x261f4f, - 0x262315, - 0x262854, - 0x262d4e, - 0x2630ce, - 0x26344f, - 0x26380e, - 0x263b94, - 0x264093, - 0x26454d, - 0x277489, - 0x28b5c3, - 0x2028c2, - 0x219805, - 0x204a06, - 0x200382, - 0x373947, - 0x213ec3, - 0x200642, - 0x22f948, - 0x2ed491, - 0x2ed8d0, - 0x202ec2, - 0x281e87, - 0x200b02, - 0x2044c7, - 0x206f42, - 0x212089, - 0x386207, - 0x2a3008, - 0x223f06, - 0x2ec803, - 0x325e05, - 0x231382, - 0x2004c2, - 0x3b4f45, - 0x256405, - 0x204382, - 0x21db43, - 0x38c207, - 0x220c07, - 0x205c82, - 0x333084, - 0x221403, - 0x31bfc9, - 0x2fac08, - 0x204c82, - 0x20bb02, - 0x375987, - 0x396f85, - 0x2bc5c8, - 0x322d07, - 0x202d83, - 0x28dc06, - 0x2de68d, - 0x2dea0c, - 0x2ffe46, - 0x207042, - 0x29d082, - 0x202302, - 0x23160f, - 0x231a0e, - 0x2e7dc7, - 0x200d02, - 0x357285, - 0x357286, - 0x226942, - 0x201942, - 0x28c606, - 0x204403, - 0x204406, - 0x2cc0c5, - 0x2cc0cd, - 0x2cc695, - 0x2cd24c, - 0x2cdb4d, - 0x2cdf12, - 0x202382, - 0x26cac2, - 0x200a42, - 0x222d06, - 0x3045c6, - 0x201c02, - 0x204a86, - 0x20b142, - 0x20b145, - 0x20a002, - 0x2a4649, - 0x22788c, - 0x227bcb, - 0x2003c2, - 0x253ac8, - 0x201982, - 0x20a282, - 0x271006, - 0x35a905, - 0x327e87, - 0x2ecec5, - 0x28ddc5, - 0x207d42, - 0x2042c2, - 0x209302, - 0x2e8447, - 0x31908d, - 0x31940c, - 0x280a87, - 0x225f42, - 0x203042, - 0x233808, - 0x332d88, - 0x2e4bc8, - 0x314984, - 0x2b8787, - 0x23de43, - 0x24df42, - 0x202582, - 0x2f1cc9, - 0x2fe3c7, - 0x203b02, - 0x271405, - 0x23eec2, - 0x22c402, - 0x2c0f43, - 0x2c0f46, - 0x2fa002, - 0x2fb802, - 0x200402, - 0x3c1786, - 0x2af507, - 0x204182, - 0x200902, - 0x25a48f, - 0x28668d, - 0x39d14e, - 0x3bcdcc, - 0x202882, - 0x202e02, - 0x223d45, - 0x31b706, - 0x213242, - 0x204582, - 0x200682, - 0x286a04, - 0x2d2844, - 0x388806, - 0x203c42, - 0x2b0907, - 0x2432c3, - 0x2432c8, - 0x243d88, - 0x249cc7, - 0x254346, - 0x205502, - 0x224403, - 0x224407, - 0x292d06, - 0x2f4605, - 0x314d08, - 0x200b42, - 0x326507, - 0x212142, - 0x374402, - 0x209142, - 0x218649, - 0x20fdc2, - 0x2010c2, - 0x252383, - 0x38b547, - 0x203a42, - 0x227a0c, - 0x227d0b, - 0x2ffec6, - 0x2ecb85, - 0x20fec2, - 0x2019c2, - 0x2bea46, - 0x267343, - 0x307887, - 0x288102, - 0x2008c2, - 0x23aa95, - 0x251b95, - 0x23f8d3, - 0x2520d3, - 0x24bdc7, - 0x3bad11, - 0x3bb450, - 0x266c92, - 0x2763d1, - 0x27fcc8, - 0x27fcd0, - 0x28e68f, - 0x2a1993, - 0x2ac152, - 0x2ad890, - 0x32080f, - 0x3bba52, - 0x3bc491, - 0x334053, - 0x3b9412, - 0x2b210f, - 0x2c1ace, - 0x2c8e52, - 0x2cbc91, - 0x2d71cf, - 0x2da28e, - 0x3bd891, - 0x3be050, - 0x2db912, - 0x2e01d1, - 0x3be650, - 0x3bec4f, - 0x2e0f11, - 0x2e3cd0, - 0x2e98c6, - 0x2f4ec7, - 0x209607, - 0x200c42, - 0x282d05, - 0x377d87, - 0x22a342, - 0x207e42, - 0x226f85, - 0x21c3c3, - 0x3b83c6, - 0x31924d, - 0x31958c, - 0x204b02, - 0x32524b, - 0x275e4a, - 0x21cd8a, - 0x2ba889, - 0x2ef6cb, - 0x322e4d, - 0x30644c, - 0x272f0a, - 0x276ecc, - 0x294fcb, - 0x3c248c, - 0x3c298e, - 0x3c318b, - 0x3c364c, - 0x32aa43, - 0x350806, - 0x3075c2, - 0x2fc542, - 0x211643, - 0x202b82, - 0x205283, - 0x318846, - 0x2624c7, - 0x2aec06, - 0x2f1ac8, - 0x38c088, - 0x310146, - 0x205ec2, - 0x3087cd, - 0x308b0c, - 0x2dd647, - 0x30c6c7, - 0x232f42, - 0x216402, - 0x20fcc2, - 0x2532c2, - 0x333857, - 0x339a56, - 0x33ca17, - 0x33fa14, - 0x33ff13, - 0x34e414, - 0x34e913, - 0x3b7c10, - 0x3bac19, - 0x3bb358, - 0x3bb95a, - 0x3bc399, - 0x3bd799, - 0x3bdf58, - 0x3be558, - 0x3beb57, - 0x3c2394, - 0x3c2896, - 0x3c3093, - 0x3c3554, - 0x208e02, - 0x21d283, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x2bf144, - 0x21d283, - 0x259003, - 0x211303, - 0x2000c2, - 0x20cd42, - 0x31691185, - 0x31a88ec5, - 0x31fc1446, - 0x120648, - 0x322b2685, - 0x208e02, - 0x202142, - 0x3278df45, - 0x32a80dc5, - 0x32e82047, - 0x33283989, - 0x33753804, - 0x200382, - 0x200642, - 0x33a5d145, - 0x33e96749, - 0x34332508, - 0x346adec5, - 0x34b3a007, - 0x34e78908, - 0x352ea205, - 0x35634e06, - 0x35b74e49, - 0x35ed1448, - 0x362c42c8, - 0x36696d8a, - 0x36a77cc4, - 0x36ea4f45, - 0x372c0808, - 0x37732985, - 0x213542, - 0x37a47c43, - 0x37ea3406, - 0x3835a008, - 0x38710b06, - 0x38b62588, - 0x38f4c406, - 0x39275284, - 0x201402, - 0x39784c47, - 0x39aa9204, - 0x39e7bd87, - 0x3a237007, - 0x2003c2, - 0x3a69b3c5, - 0x3aa4f884, - 0x3aee7807, - 0x3b240607, - 0x3b685106, - 0x3ba81445, - 0x3be96847, - 0x3c2e8908, - 0x3c619b87, - 0x3cab7109, - 0x3cecd585, - 0x3d351247, - 0x3d6907c6, - 0x3dac9d08, - 0x21ea4d, - 0x27e409, - 0x28a08b, - 0x2a68cb, - 0x2b45cb, - 0x30cd4b, - 0x31b90b, - 0x31bbcb, - 0x31c749, - 0x31e10b, - 0x31e3cb, - 0x31f94b, - 0x32128a, - 0x3217ca, - 0x321dcc, - 0x32a48b, - 0x32ab0a, - 0x33d80a, - 0x3448ce, - 0x3454ce, - 0x34584a, - 0x34858a, - 0x34924b, - 0x34950b, - 0x34a18b, - 0x365d0b, - 0x36630a, - 0x366fcb, - 0x36728a, - 0x36750a, - 0x36778a, - 0x3854cb, - 0x39868b, - 0x39a9ce, - 0x39ad4b, - 0x3a26cb, - 0x3a360b, - 0x3a808a, - 0x3a8309, - 0x3a854a, - 0x3aa04a, - 0x3ba60b, - 0x3c054b, - 0x3c0dca, - 0x3c1dcb, - 0x3c7c4b, - 0x3d110b, - 0x3de833c8, - 0x3e289289, - 0x3e69e789, - 0x3eae4708, - 0x34fe85, - 0x20a343, - 0x31a304, - 0x395005, - 0x353546, - 0x234b85, - 0x288944, - 0x373848, - 0x314505, - 0x292404, - 0x2137c7, - 0x29dd0a, - 0x248c0a, - 0x2e7ec7, - 0x21a5c7, - 0x305307, - 0x27dfc7, - 0x3003c5, - 0x205f46, - 0x2b5007, - 0x240c44, - 0x2eeac6, - 0x2ee9c6, - 0x210885, - 0x39e044, - 0x297dc6, - 0x29c407, - 0x31ae06, - 0x384847, - 0x291d03, - 0x3a2ec6, - 0x22b1c5, - 0x282147, - 0x26a64a, - 0x22fa44, - 0x26d188, - 0x2b5e89, - 0x2e4f07, - 0x3460c6, - 0x253d48, - 0x311249, - 0x34c044, - 0x2d61c4, - 0x2a0885, - 0x2bf048, - 0x2ca287, - 0x350f89, - 0x236988, - 0x2e99c6, - 0x3224c6, - 0x298788, - 0x369b06, - 0x288ec5, - 0x2851c6, - 0x27c948, - 0x231506, - 0x25894b, - 0x300f06, - 0x29a00d, - 0x2082c5, - 0x2a90c6, - 0x239105, - 0x255b49, - 0x3a4887, - 0x35cbc8, - 0x365886, - 0x299009, - 0x3878c6, - 0x26a5c5, - 0x24c446, - 0x2c7846, - 0x2cefc9, - 0x38c5c6, - 0x29da07, - 0x241c85, - 0x20a003, - 0x258ac5, - 0x29a2c7, - 0x325686, - 0x2081c9, - 0x3c1446, - 0x26af46, - 0x212e89, - 0x284bc9, - 0x2a1447, - 0x3927c8, - 0x2abb89, - 0x282988, - 0x397a06, - 0x2dcf05, - 0x23870a, - 0x26afc6, - 0x23d786, - 0x2d4a45, - 0x2d0e08, - 0x396b07, - 0x22d60a, - 0x24fb86, - 0x27e845, - 0x38d446, - 0x335687, - 0x345f87, - 0x3651c5, - 0x26a785, - 0x280686, - 0x2a7746, - 0x3a11c6, - 0x2c0cc4, - 0x283f49, - 0x28a346, - 0x2fa1ca, - 0x31a6c8, - 0x34b788, - 0x248c0a, - 0x2224c5, - 0x29c345, - 0x2af6c8, - 0x2b9e88, - 0x232907, - 0x2bf346, - 0x337b88, - 0x2ace47, - 0x282288, - 0x2b83c6, - 0x285948, - 0x295d86, - 0x27c207, - 0x2d5f46, - 0x297dc6, - 0x31d50a, - 0x22b986, - 0x2dcf09, - 0x310246, - 0x2f050a, - 0x275289, - 0x25ba86, - 0x2b93c4, - 0x2198cd, - 0x289507, - 0x2bc346, - 0x2c4185, - 0x387945, - 0x386e46, - 0x2e7649, - 0x2d0987, - 0x27d3c6, - 0x2e2186, - 0x2889c9, - 0x288e04, - 0x249944, - 0x327288, - 0x318c06, - 0x270a08, - 0x2f2dc8, - 0x2a0dc7, - 0x3b6a89, - 0x3a13c7, - 0x2b254a, - 0x2f278f, - 0x3a1b8a, - 0x223b45, - 0x27cb85, - 0x354885, - 0x2f0b47, - 0x2062c3, - 0x3929c8, - 0x2287c6, - 0x2288c9, - 0x302a06, - 0x2d0307, - 0x298dc9, - 0x35cac8, - 0x2d4b07, - 0x316fc3, - 0x34ff05, - 0x3351c5, - 0x2c0b0b, - 0x332a44, - 0x23cb44, - 0x279406, - 0x317187, - 0x39fdca, - 0x247cc7, - 0x209347, - 0x280dc5, - 0x3cc5c5, - 0x271a09, - 0x297dc6, - 0x247b4d, - 0x38c805, - 0x2b5bc3, - 0x215343, - 0x3afe05, - 0x356dc5, - 0x253d48, - 0x27dc87, - 0x2496c6, - 0x29e406, - 0x229185, - 0x2313c7, - 0x274b87, - 0x2333c7, - 0x2a4fca, - 0x3a2f88, - 0x2c0cc4, - 0x27f1c7, - 0x2800c7, - 0x349786, - 0x295407, - 0x2e27c8, - 0x2b34c8, - 0x24cc86, - 0x21a808, - 0x2dab04, - 0x2b5006, - 0x252a06, - 0x3907c6, - 0x239246, - 0x29b784, - 0x27e086, - 0x2c27c6, - 0x298186, - 0x22ec86, - 0x215206, - 0x2e2606, - 0x2495c8, - 0x2b4a88, - 0x2d8908, - 0x234d88, - 0x2af646, - 0x21a3c5, - 0x38ac46, - 0x2adf45, - 0x3a6b87, - 0x236a45, - 0x206443, - 0x203305, - 0x3c8404, - 0x215345, - 0x201983, - 0x34a747, - 0x364b88, - 0x384906, - 0x2b9b0d, - 0x27cb46, - 0x297745, - 0x218643, - 0x2c01c9, - 0x288f86, - 0x293586, - 0x2714c4, - 0x3a1b07, - 0x311746, - 0x2d0c45, - 0x200cc3, - 0x209b04, - 0x280286, - 0x252b04, - 0x2d9dc8, - 0x206789, - 0x3cfd49, - 0x2a068a, - 0x2a244d, - 0x22fdc7, - 0x23d606, - 0x21fec4, - 0x283989, - 0x287008, - 0x289106, - 0x239986, - 0x295407, - 0x2d9286, - 0x2b1346, - 0x36c106, - 0x23708a, - 0x278908, - 0x31ea05, - 0x25e949, - 0x2caa0a, - 0x2fdac8, - 0x29bc08, - 0x293508, - 0x29e04c, - 0x31fbc5, - 0x29e688, - 0x2b4d86, - 0x24c986, - 0x3cde07, - 0x247bc5, - 0x285345, - 0x3cfc09, - 0x21c987, - 0x228885, - 0x2d3647, - 0x215343, - 0x2caec5, - 0x225ac8, - 0x284847, - 0x29bac9, - 0x2ec3c5, - 0x3447c4, - 0x2a2108, - 0x2d2c47, - 0x2d4cc8, - 0x39efc8, - 0x2aa1c5, - 0x2286c6, - 0x29e506, - 0x3a4bc9, - 0x330bc7, - 0x2ae386, - 0x226047, - 0x20a903, - 0x353804, - 0x2dac05, - 0x256a04, - 0x24b184, - 0x283647, - 0x269307, - 0x27d584, - 0x29b910, - 0x38ae47, - 0x3cc5c5, - 0x25110c, - 0x2117c4, - 0x2b90c8, - 0x27c109, - 0x37c646, - 0x24f548, - 0x2190c4, - 0x279708, - 0x22dc06, - 0x31d388, - 0x29a586, - 0x286b4b, - 0x32c585, - 0x2daa88, - 0x206bc4, - 0x206bca, - 0x29bac9, - 0x2d5e46, - 0x354948, - 0x2a3dc5, - 0x206404, - 0x2b8fc6, - 0x233288, - 0x2833c8, - 0x338406, - 0x388784, - 0x238686, - 0x3a1447, - 0x27bc87, - 0x29540f, - 0x203b87, - 0x25bb47, - 0x357145, - 0x364345, - 0x2a1109, - 0x2c8086, - 0x281585, - 0x284ec7, - 0x2c8a48, - 0x2d5305, - 0x2d5f46, - 0x31a508, - 0x310b0a, - 0x20ff08, - 0x28c387, - 0x2f2bc6, - 0x25e906, - 0x2003c3, - 0x213383, - 0x2cabc9, - 0x2aba09, - 0x2b7006, - 0x2ec3c5, - 0x206108, - 0x354948, - 0x369c88, - 0x36c18b, - 0x2b9d47, - 0x30f849, - 0x295688, - 0x355d44, - 0x35cf08, - 0x28e149, - 0x2ae685, - 0x2f0a47, - 0x353885, - 0x2832c8, - 0x29100b, - 0x296590, - 0x2a8b05, - 0x21280c, - 0x249885, - 0x280e43, - 0x2eb506, - 0x2c1e44, - 0x24f986, - 0x29c407, - 0x20ff04, - 0x2440c8, - 0x39288d, - 0x316285, - 0x22fe04, - 0x223884, - 0x29ff09, - 0x2b2a48, - 0x32ca47, - 0x22dc88, - 0x284008, - 0x27d6c5, - 0x27a147, - 0x27d647, - 0x312207, - 0x26a789, - 0x3289c9, - 0x26ea46, - 0x2ded46, - 0x284f86, - 0x344d05, - 0x39dc84, - 0x3c5446, - 0x3c9dc6, - 0x27d708, - 0x33534b, - 0x267287, - 0x21fec4, - 0x311686, - 0x2e2b07, - 0x324545, - 0x381b85, - 0x239bc4, - 0x328946, - 0x3c54c8, - 0x283989, - 0x261286, - 0x286e08, - 0x2d0d06, - 0x3563c8, - 0x2ccdcc, - 0x27d586, - 0x29740d, - 0x29788b, - 0x29dac5, - 0x274cc7, - 0x38c6c6, - 0x345e48, - 0x26eac9, - 0x24cf48, - 0x3cc5c5, - 0x379c87, - 0x282a88, - 0x319b49, - 0x3a78c6, - 0x26118a, - 0x345bc8, - 0x24cd8b, - 0x2d7dcc, - 0x279808, - 0x27f786, - 0x228148, - 0x310787, - 0x203cc9, - 0x33a14d, - 0x297cc6, - 0x206288, - 0x2b4949, - 0x2c0dc8, - 0x285a48, - 0x2c320c, - 0x2c4b87, - 0x2c5647, - 0x26a5c5, - 0x2b7487, - 0x2c8908, - 0x2b9046, - 0x37a38c, - 0x2f73c8, - 0x2d1648, - 0x319e46, - 0x334f47, - 0x26ec44, - 0x234d88, - 0x2b030c, - 0x38d9cc, - 0x223bc5, - 0x210907, - 0x388706, - 0x334ec6, - 0x255d08, - 0x36eb84, - 0x31ae0b, - 0x2b0a4b, - 0x2f2bc6, - 0x392707, - 0x389b05, - 0x270945, - 0x31af46, - 0x2a3d85, - 0x332a05, - 0x2cee07, - 0x281909, - 0x2a7904, - 0x25d645, - 0x30de05, - 0x2d9b48, - 0x2e5d85, - 0x2baf49, - 0x2df507, - 0x2df50b, - 0x319786, - 0x249309, - 0x39df88, - 0x299b05, - 0x312308, - 0x328a08, - 0x26b447, - 0x37a187, - 0x2836c9, - 0x2b49c7, - 0x2a6489, - 0x31c30c, - 0x2b7008, - 0x2d1289, - 0x2d1d07, - 0x2840c9, - 0x200b47, - 0x2d7ec8, - 0x3b6c45, - 0x2b4f86, - 0x2c41c8, - 0x314f88, - 0x2ca8c9, - 0x332a47, - 0x252805, - 0x35afc9, - 0x202d06, - 0x2907c4, - 0x38b686, - 0x359e88, - 0x3ae447, - 0x335548, - 0x21a8c9, - 0x3896c7, - 0x29dec6, - 0x274d84, - 0x203389, - 0x279fc8, - 0x319d07, - 0x372c06, - 0x335286, - 0x23d704, - 0x352786, - 0x2152c3, - 0x32c109, - 0x32c546, - 0x21ab45, - 0x29e406, - 0x2cf385, - 0x282f08, - 0x310647, - 0x39c4c6, - 0x38df86, - 0x34b788, - 0x2a1287, - 0x297d05, - 0x29b708, - 0x3c0948, - 0x345bc8, - 0x249745, - 0x2b5006, - 0x3cfb09, - 0x3a4a44, - 0x2cf20b, - 0x2b104b, - 0x31e909, - 0x215343, - 0x259bc5, - 0x385106, - 0x368f08, - 0x3475c4, - 0x384906, - 0x2a5109, - 0x2e0b45, - 0x2ced46, - 0x2d2c46, - 0x206104, - 0x2a928a, - 0x21aa88, - 0x314f86, - 0x2bd405, - 0x389987, - 0x357007, - 0x2286c4, - 0x2b1287, - 0x236a04, - 0x236a06, - 0x219083, - 0x26a785, - 0x36ef05, - 0x362808, - 0x27f385, - 0x27d2c9, - 0x234bc7, - 0x234bcb, - 0x2a320c, - 0x2a380a, - 0x33a007, - 0x200a03, - 0x27b5c8, - 0x249905, - 0x2d5385, - 0x34ffc4, - 0x2d7dc6, - 0x27c106, - 0x3527c7, - 0x24ed8b, - 0x29b784, - 0x2d2444, - 0x2c92c4, - 0x2ceb06, - 0x20ff04, - 0x2bf148, - 0x34fdc5, - 0x254005, - 0x369bc7, - 0x274dc9, - 0x356dc5, - 0x386e4a, - 0x241b89, - 0x2dcc8a, - 0x2371c9, - 0x36e444, - 0x2e2245, - 0x2d9388, - 0x2e78cb, - 0x2a0885, - 0x2f47c6, - 0x242e44, - 0x27d806, - 0x389549, - 0x2e2c07, - 0x3c1608, - 0x2a27c6, - 0x3a13c7, - 0x2833c8, - 0x3873c6, - 0x3ca004, - 0x378647, - 0x368105, - 0x37a9c7, - 0x218fc4, - 0x38c646, - 0x2e8a88, - 0x297a48, - 0x2f6107, - 0x24a488, - 0x295e45, - 0x215184, - 0x248b08, - 0x24a584, - 0x241985, - 0x3005c4, - 0x2acf47, - 0x28a407, - 0x284208, - 0x2d4e46, - 0x27f305, - 0x27d0c8, - 0x210108, - 0x2a05c9, - 0x2b1346, - 0x22d688, - 0x206a4a, - 0x3245c8, - 0x2ea205, - 0x222386, - 0x241a48, - 0x379d4a, - 0x235207, - 0x287d85, - 0x2909c8, - 0x2af304, - 0x2d0e86, - 0x2c59c8, - 0x215206, - 0x393988, - 0x258c87, - 0x2136c6, - 0x2b93c4, - 0x278307, - 0x2b5544, - 0x389507, - 0x2d5b8d, - 0x232985, - 0x2e744b, - 0x38dc46, - 0x253bc8, - 0x244084, - 0x2f01c6, - 0x280286, - 0x228487, - 0x2970cd, - 0x247207, - 0x2b5b08, - 0x283b45, - 0x257288, - 0x2ca206, - 0x295ec8, - 0x23a086, - 0x38a507, - 0x388bc9, - 0x359b47, - 0x2893c8, - 0x2736c5, - 0x229208, - 0x334e05, - 0x2fe545, - 0x237445, - 0x223e43, - 0x2392c4, - 0x25e945, - 0x374e49, - 0x372b06, - 0x2e28c8, - 0x379f45, - 0x2b7347, - 0x2a0aca, - 0x2cec89, - 0x2c774a, - 0x2d8988, - 0x2d348c, - 0x284f4d, - 0x306983, - 0x393888, - 0x209ac5, - 0x3108c6, - 0x35c946, - 0x355485, - 0x226149, - 0x200985, - 0x27d0c8, - 0x25aa46, - 0x358e46, - 0x2a1fc9, - 0x3ac607, - 0x2912c6, - 0x2a0a48, - 0x3906c8, - 0x2e4907, - 0x2c294e, - 0x2ca445, - 0x319a45, - 0x215108, - 0x2ebd87, - 0x206a02, - 0x2c2d84, - 0x24f88a, - 0x319dc8, - 0x328b46, - 0x298f08, - 0x29e506, - 0x390408, - 0x2ae388, - 0x2fe504, - 0x2b7705, - 0x679b44, - 0x679b44, - 0x679b44, - 0x203c83, - 0x335106, - 0x27d586, - 0x29d78c, - 0x206b03, - 0x218fc6, - 0x24c3c4, - 0x288f08, - 0x2a4f45, - 0x24f986, - 0x2c0908, - 0x2d9fc6, - 0x39c446, - 0x2d2a48, - 0x2dac87, - 0x31d089, - 0x38524a, - 0x219bc4, - 0x236a45, - 0x30f585, - 0x388946, - 0x22fe06, - 0x29cb46, - 0x2ff506, - 0x31d1c4, - 0x31d1cb, - 0x2364c4, - 0x249485, - 0x2ac805, - 0x2a0e86, - 0x208b08, - 0x284e07, - 0x32c4c4, - 0x213c03, - 0x2aee05, - 0x236847, - 0x284d0b, - 0x362707, - 0x2c0808, - 0x2b7847, - 0x26bfc6, - 0x27e6c8, - 0x29cd4b, - 0x394f46, - 0x21ed49, - 0x29cec5, - 0x316fc3, - 0x2ced46, - 0x258b88, - 0x21a943, - 0x236943, - 0x2833c6, - 0x29e506, - 0x36f60a, - 0x27f7c5, - 0x2800cb, - 0x29e34b, - 0x208a03, - 0x21b0c3, - 0x2b24c4, - 0x2a9487, - 0x258c04, - 0x24f544, - 0x2b4c04, - 0x3248c8, - 0x2bd348, - 0x214889, - 0x2cd608, - 0x2376c7, - 0x22ec86, - 0x2e250f, - 0x2ca586, - 0x2d80c4, - 0x2bd18a, - 0x236747, - 0x2b5646, - 0x290809, - 0x214805, - 0x362945, - 0x214946, - 0x229343, - 0x2af349, - 0x278a86, - 0x21a689, - 0x39fdc6, - 0x26a785, - 0x223fc5, - 0x203b83, - 0x2a95c8, - 0x32cc07, - 0x2287c4, - 0x288d88, - 0x24c704, - 0x350606, - 0x2eb506, - 0x240346, - 0x2da949, - 0x2d5305, - 0x297dc6, - 0x24bac9, - 0x2c8606, - 0x2e2606, - 0x3a5fc6, - 0x237605, - 0x3005c6, - 0x38a504, - 0x3b6c45, - 0x2c41c4, - 0x2b6446, - 0x38c7c4, - 0x200c43, - 0x2870c5, - 0x232408, - 0x2afbc7, - 0x347649, - 0x287c88, - 0x298551, - 0x2d2cca, - 0x2f2b07, - 0x2b3806, - 0x24c3c4, - 0x2c42c8, - 0x352908, - 0x29870a, - 0x2bad0d, - 0x24c446, - 0x2d2b46, - 0x2783c6, - 0x365047, - 0x2b5bc5, - 0x326807, - 0x288e45, - 0x2df644, - 0x2a7f46, - 0x352607, - 0x2af04d, - 0x241987, - 0x373748, - 0x27d3c9, - 0x222286, - 0x3a7845, - 0x23e144, - 0x359f86, - 0x2285c6, - 0x319f46, - 0x299788, - 0x227803, - 0x228483, - 0x38b905, - 0x27f446, - 0x2ae345, - 0x2a29c8, - 0x29c5ca, - 0x30ff44, - 0x288f08, - 0x293508, - 0x2a0cc7, - 0x37a009, - 0x2c0508, - 0x283a07, - 0x2b4e86, - 0x21520a, - 0x35a008, - 0x3a46c9, - 0x2b2b08, - 0x2a7b49, - 0x2b36c7, - 0x377205, - 0x36c386, - 0x2b8ec8, - 0x380248, - 0x28ff08, - 0x2f9b48, - 0x249485, - 0x212ec4, - 0x230a48, - 0x242bc4, - 0x236fc4, - 0x26a785, - 0x292447, - 0x274b89, - 0x228287, - 0x206a85, - 0x279606, - 0x362206, - 0x206d44, - 0x2a2306, - 0x27b244, - 0x29f0c6, - 0x274946, - 0x229946, - 0x3cc5c5, - 0x2a2887, - 0x200a03, - 0x224a89, - 0x34b588, - 0x283884, - 0x28388d, - 0x297b48, - 0x2ea6c8, - 0x3a4646, - 0x388cc9, - 0x2cec89, - 0x389245, - 0x29c6ca, - 0x26f3ca, - 0x28a5cc, - 0x28a746, - 0x27afc6, - 0x2cae06, - 0x3a0909, - 0x310b06, - 0x2a12c6, - 0x200a46, - 0x234d88, - 0x20ff06, - 0x2d7a4b, - 0x2925c5, - 0x254005, - 0x27bd85, - 0x327006, - 0x2151c3, - 0x2402c6, - 0x241907, - 0x2c4185, - 0x25cac5, - 0x387945, - 0x3c8a86, - 0x332404, - 0x332406, - 0x2c37c9, - 0x326e8c, - 0x2df388, - 0x233204, - 0x3002c6, - 0x38dd46, - 0x258b88, - 0x354948, - 0x326d89, - 0x389987, - 0x318949, - 0x2486c6, - 0x22a0c4, - 0x20bb44, - 0x2831c4, - 0x2833c8, - 0x2749ca, - 0x356d46, - 0x364207, - 0x37ac47, - 0x249405, - 0x350f04, - 0x28e106, - 0x2b5c06, - 0x240c03, - 0x34b3c7, - 0x39eec8, - 0x38938a, - 0x302008, - 0x362588, - 0x38c805, - 0x29dbc5, - 0x267385, - 0x2497c6, - 0x3777c6, - 0x391ac5, - 0x32c349, - 0x350d0c, - 0x267447, - 0x298788, - 0x272145, - 0x679b44, - 0x2e95c4, - 0x284984, - 0x221706, - 0x29f7ce, - 0x3629c7, - 0x365245, - 0x3a49cc, - 0x3006c7, - 0x352587, - 0x22c109, - 0x26d249, - 0x287d85, - 0x34b588, - 0x3cfb09, - 0x345a85, - 0x2c40c8, - 0x278c06, - 0x248d86, - 0x275284, - 0x28cc08, - 0x222443, - 0x27a7c4, - 0x2aee85, - 0x399c87, - 0x336145, - 0x206909, - 0x2aac4d, - 0x2b3bc6, - 0x213c44, - 0x2bf2c8, - 0x28174a, - 0x26df87, - 0x36ba85, - 0x24d583, - 0x29e50e, - 0x2a96cc, - 0x2fdbc7, - 0x29f987, - 0x219003, - 0x310b45, - 0x284985, - 0x2992c8, - 0x296bc9, - 0x233106, - 0x258c04, - 0x2f2a46, - 0x237c0b, - 0x2de40c, - 0x2d6607, - 0x2d7d05, - 0x3c0848, - 0x2e46c5, - 0x2bd187, - 0x384c47, - 0x241745, - 0x2151c3, - 0x324c04, - 0x359d45, - 0x2a7805, - 0x2a7806, - 0x2bfa48, - 0x352607, - 0x35cc46, - 0x203f46, - 0x237386, - 0x288289, - 0x27a247, - 0x31a206, - 0x2de586, - 0x277bc6, - 0x2a91c5, - 0x2105c6, - 0x3633c5, - 0x2e5e08, - 0x291d4b, - 0x28db06, - 0x37ac84, - 0x2ffc09, - 0x234bc4, - 0x278b88, - 0x38b787, - 0x285944, - 0x2bfc48, - 0x2c5444, - 0x2a9204, - 0x288cc5, - 0x3162c6, - 0x324807, - 0x2087c3, - 0x29df85, - 0x338a84, - 0x319a86, - 0x3892c8, - 0x38d8c5, - 0x291a09, - 0x33a005, - 0x218fc8, - 0x3cf847, - 0x32c648, - 0x2bee87, - 0x25bc09, - 0x27df06, - 0x33da46, - 0x200a44, - 0x2d2385, - 0x30804c, - 0x27bd87, - 0x27ca47, - 0x22fa48, - 0x2b3bc6, - 0x270b44, - 0x3b1bc4, - 0x283549, - 0x2caf06, - 0x271a87, - 0x2391c4, - 0x248346, - 0x35c185, - 0x2d4987, - 0x2d79c6, - 0x261049, - 0x2cfac7, - 0x295407, - 0x2a1e46, - 0x248285, - 0x281408, - 0x278908, - 0x22ee86, - 0x38d905, - 0x329806, - 0x210283, - 0x299149, - 0x29c8ce, - 0x2bebc8, - 0x24c808, - 0x22ec8b, - 0x291c46, - 0x34c404, - 0x284b44, - 0x29c9ca, - 0x212707, - 0x31a2c5, - 0x21ed49, - 0x2c2885, - 0x237007, - 0x24a404, - 0x2a5947, - 0x2f2cc8, - 0x2e4fc6, - 0x24c549, - 0x2c060a, - 0x212686, - 0x297686, - 0x2ac785, - 0x39b305, - 0x33eac7, - 0x247948, - 0x35c0c8, - 0x2fe506, - 0x224045, - 0x22fb8e, - 0x2c0cc4, - 0x22ee05, - 0x278f89, - 0x2c7e88, - 0x28c2c6, - 0x29b20c, - 0x29c1d0, - 0x29f40f, - 0x2a1008, - 0x33a007, - 0x3cc5c5, - 0x25e945, - 0x324689, - 0x290bc9, - 0x238786, - 0x2a0907, - 0x2d2285, - 0x232909, - 0x349806, - 0x31094d, - 0x283089, - 0x24f544, - 0x2be948, - 0x230b09, - 0x356f06, - 0x27b7c5, - 0x33da46, - 0x3c14c9, - 0x279e48, - 0x21a3c5, - 0x206b44, - 0x29b3cb, - 0x356dc5, - 0x29b506, - 0x285286, - 0x2023c6, - 0x2a030b, - 0x291b09, - 0x203e85, - 0x3a6a87, - 0x2d2c46, - 0x24f6c6, - 0x284708, - 0x3163c9, - 0x37350c, - 0x236648, - 0x30f5c6, - 0x338403, - 0x2307c6, - 0x25bac5, - 0x280408, - 0x223a46, - 0x2d4bc8, - 0x247d45, - 0x2988c5, - 0x2576c8, - 0x390587, - 0x35c887, - 0x3527c7, - 0x24f548, - 0x388a48, - 0x2e3046, - 0x2b6287, - 0x3536c7, - 0x2a000a, - 0x23ce43, - 0x327006, - 0x22fb05, - 0x24f884, - 0x27d3c9, - 0x25bb84, - 0x2afc44, - 0x29a604, - 0x29f98b, - 0x32cb47, - 0x22fdc5, - 0x295b48, - 0x279606, - 0x279608, - 0x27f706, - 0x28cb45, - 0x28ce05, - 0x28ec46, - 0x28fcc8, - 0x290748, - 0x27d586, - 0x29598f, - 0x298c10, - 0x2082c5, - 0x200a03, - 0x22a185, - 0x30f788, - 0x290ac9, - 0x345bc8, - 0x24c3c8, - 0x23d1c8, - 0x32cc07, - 0x2792c9, - 0x2d4dc8, - 0x2ab6c4, - 0x29a488, - 0x2d9c09, - 0x2b6d07, - 0x29a404, - 0x228348, - 0x2a264a, - 0x2e61c6, - 0x24c446, - 0x2b1209, - 0x29c407, - 0x2d0188, - 0x2254c8, - 0x2c9b88, - 0x24bf05, - 0x20a005, - 0x254005, - 0x284945, - 0x3bc1c7, - 0x2151c5, - 0x2c4185, - 0x201186, - 0x345b07, - 0x2e7807, - 0x2a2946, - 0x2d8ec5, - 0x29b506, - 0x24c645, - 0x2d2108, - 0x2fda44, - 0x2c8686, - 0x32f004, - 0x206408, - 0x31d94a, - 0x27dc8c, - 0x24ef85, - 0x365106, - 0x3736c6, - 0x294506, - 0x30f644, - 0x35c445, - 0x27f087, - 0x29c489, - 0x2cf0c7, - 0x679b44, - 0x679b44, - 0x32c9c5, - 0x2d6bc4, - 0x29abca, - 0x279486, - 0x27e904, - 0x210885, - 0x398905, - 0x2b5b04, - 0x284ec7, - 0x35b147, - 0x2ceb08, - 0x38b088, - 0x21a3c9, - 0x26f048, - 0x29ad8b, - 0x2db304, - 0x248605, - 0x281605, - 0x352749, - 0x3163c9, - 0x2ffb08, - 0x2364c8, - 0x2a0e84, - 0x38dd85, - 0x20a343, - 0x388905, - 0x297e46, - 0x296a0c, - 0x2390c6, - 0x27b6c6, - 0x28c545, - 0x3c8b08, - 0x3cdf46, - 0x2b3986, - 0x24c446, - 0x301d8c, - 0x31a104, - 0x2374ca, - 0x28c488, - 0x296847, - 0x338986, - 0x2331c7, - 0x2f2645, - 0x372c06, - 0x361046, - 0x36d8c7, - 0x2afc84, - 0x2ad045, - 0x278f84, - 0x2df6c7, - 0x2791c8, - 0x27ae4a, - 0x282907, - 0x21ac07, - 0x339f87, - 0x2e4809, - 0x296a0a, - 0x22a083, - 0x2afb85, - 0x229983, - 0x2b4c49, - 0x38a788, - 0x357147, - 0x345cc9, - 0x278a06, - 0x3b6d08, - 0x34a6c5, - 0x21020a, - 0x392b49, - 0x24cb49, - 0x3cde07, - 0x352a09, - 0x229848, - 0x36da86, - 0x3652c8, - 0x3d0647, - 0x2b49c7, - 0x241b87, - 0x2e8908, - 0x300146, - 0x2a2405, - 0x27f087, - 0x297188, - 0x32ef84, - 0x2fa084, - 0x2911c7, - 0x2ae707, - 0x3cf98a, - 0x36da06, - 0x25708a, - 0x2c2cc7, - 0x2c0a87, - 0x2ad104, - 0x2a6544, - 0x2d4886, - 0x3119c4, - 0x3119cc, - 0x204dc5, - 0x354789, - 0x2b28c4, - 0x2b5bc5, - 0x2816c8, - 0x27eac5, - 0x386e46, - 0x22c004, - 0x2db20a, - 0x330ac6, - 0x29368a, - 0x219b87, - 0x286c45, - 0x229345, - 0x24944a, - 0x28fe45, - 0x2a0686, - 0x242bc4, - 0x2b2646, - 0x33eb85, - 0x223b06, - 0x2f610c, - 0x354aca, - 0x26f4c4, - 0x22ec86, - 0x29c407, - 0x2d7944, - 0x234d88, - 0x2f46c6, - 0x37aac9, - 0x2dc6c9, - 0x2b7109, - 0x2cf3c6, - 0x3d0746, - 0x365407, - 0x32c288, - 0x3d0549, - 0x32cb47, - 0x295cc6, - 0x3a1447, - 0x278285, - 0x2c0cc4, - 0x364fc7, - 0x353885, - 0x288c05, - 0x3280c7, - 0x241608, - 0x3c07c6, - 0x297fcd, - 0x2994cf, - 0x29e34d, - 0x206ac4, - 0x232506, - 0x2db5c8, - 0x200a05, - 0x2a01c8, - 0x26b30a, - 0x24f544, - 0x237e46, - 0x2d8147, - 0x3bd347, - 0x2dad49, - 0x365285, - 0x2b5b04, - 0x2b764a, - 0x2c00c9, - 0x352b07, - 0x298286, - 0x356f06, - 0x38dcc6, - 0x378706, - 0x2da60f, - 0x2db489, - 0x20ff06, - 0x37fe86, - 0x32b949, - 0x2b6387, - 0x208e43, - 0x2375c6, - 0x213383, - 0x355348, - 0x3a1287, - 0x2a1209, - 0x2eb388, - 0x35c9c8, - 0x200c86, - 0x239009, - 0x384d85, - 0x230704, - 0x2f2f47, - 0x3a0985, - 0x206ac4, - 0x22fe88, - 0x2129c4, - 0x2b60c7, - 0x364b06, - 0x280745, - 0x2b2b08, - 0x356dcb, - 0x351247, - 0x2496c6, - 0x2ca604, - 0x34c386, - 0x26a785, - 0x353885, - 0x281189, - 0x284ac9, - 0x2b4a04, - 0x2b4a45, - 0x22ecc5, - 0x210086, - 0x34b688, - 0x2c2246, - 0x39ed0b, - 0x37c4ca, - 0x2bef85, - 0x28ce86, - 0x30fc45, - 0x2010c5, - 0x29bd87, - 0x327288, - 0x26f0c4, - 0x266006, - 0x2907c6, - 0x229a07, - 0x316f84, - 0x280286, - 0x2f0c45, - 0x2f0c49, - 0x3d0944, - 0x351089, - 0x27d586, - 0x2c4c48, - 0x22ecc5, - 0x37ad45, - 0x223b06, - 0x373409, - 0x26d249, - 0x27b746, - 0x2c7f88, - 0x2aad88, - 0x30fc04, - 0x2b81c4, - 0x2b81c8, - 0x2bc448, - 0x318a49, - 0x297dc6, - 0x24c446, - 0x337a4d, - 0x384906, - 0x2ccc89, - 0x38ad45, - 0x214946, - 0x2c9d08, - 0x332345, - 0x353704, - 0x26a785, - 0x284408, - 0x29a989, - 0x279044, - 0x38c646, - 0x27e98a, - 0x2fdac8, - 0x3cfb09, - 0x253eca, - 0x345c46, - 0x299688, - 0x2bcf45, - 0x289e48, - 0x2f26c5, - 0x2788c9, - 0x37cf49, - 0x204ec2, - 0x29cec5, - 0x270686, - 0x27d4c7, - 0x381345, - 0x314e86, - 0x30c4c8, - 0x2b3bc6, - 0x2d9249, - 0x27cb46, - 0x284588, - 0x26d7c5, - 0x22b786, - 0x38a608, - 0x2833c8, - 0x2b35c8, - 0x2e9a48, - 0x2105c4, - 0x228703, - 0x2d9484, - 0x282b06, - 0x2782c4, - 0x24c747, - 0x2b3889, - 0x2c92c5, - 0x2254c6, - 0x2375c6, - 0x2bf88b, - 0x2b5586, - 0x2bc746, - 0x2c8788, - 0x3224c6, - 0x2bb003, - 0x20e383, - 0x2c0cc4, - 0x22d585, - 0x2d0b47, - 0x2791c8, - 0x2791cf, - 0x27ef8b, - 0x34b488, - 0x38c6c6, - 0x34b78e, - 0x223b03, - 0x2d0ac4, - 0x2b5505, - 0x2b5986, - 0x28e20b, - 0x292506, - 0x31a589, - 0x280745, - 0x254448, - 0x217008, - 0x26d10c, - 0x29f9c6, - 0x388946, - 0x2ec3c5, - 0x289188, - 0x27dc85, - 0x355d48, - 0x29b58a, - 0x29e789, - 0x679b44, - 0x2000c2, - 0x3f208e02, - 0x200382, - 0x220a04, - 0x202302, - 0x20ac44, - 0x201402, - 0x14b83, - 0x2003c2, - 0x211302, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x38d8c3, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x21d283, - 0x259003, - 0x20db43, - 0x2879c4, - 0x208e03, - 0x233e84, - 0x231103, - 0x2dd584, - 0x213ec3, - 0x381607, - 0x270203, - 0x214b83, - 0x23a708, - 0x259003, - 0x29ed0b, - 0x2f3983, - 0x3adc46, - 0x2022c2, - 0x23ef4b, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x259003, - 0x26d503, - 0x21e403, - 0x2000c2, - 0x120648, - 0x20f385, - 0x353908, - 0x2e8d88, - 0x208e02, - 0x38d545, - 0x307a47, - 0x202bc2, - 0x2442c7, - 0x200382, - 0x25dc87, - 0x2bb789, - 0x2bcb08, - 0x2c9a09, - 0x20ecc2, - 0x269f07, - 0x22eb04, - 0x307b07, - 0x37c3c7, - 0x25e242, - 0x270203, - 0x202382, - 0x201402, - 0x2003c2, - 0x209302, - 0x200902, - 0x211302, - 0x2a9cc5, - 0x325a85, - 0x8e02, - 0x31103, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0xe6143, - 0x259003, - 0xe103, - 0x101, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x217383, - 0x21d283, - 0xe6143, - 0x259003, - 0x216cc3, - 0x420730c6, - 0x9d303, - 0xca845, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x208e02, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0xe6143, - 0x259003, - 0x6742, - 0x120648, - 0x14b83, - 0xe6143, - 0x47904, - 0xe4ac5, - 0x2000c2, - 0x3afcc4, - 0x208e03, - 0x231103, - 0x213ec3, - 0x245943, - 0x22bec5, - 0x217383, - 0x221303, - 0x21d283, - 0x24fc43, - 0x259003, - 0x211303, - 0x25f383, - 0x202043, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x208e02, - 0x259003, - 0x120648, - 0x213ec3, - 0xe6143, - 0x120648, - 0xe6143, - 0x2b9343, - 0x208e03, - 0x22de84, - 0x231103, - 0x213ec3, - 0x200d42, - 0x270203, - 0x21d283, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x200d42, - 0x208e83, - 0x21d283, - 0x259003, - 0x2ec903, - 0x211303, - 0x2000c2, - 0x208e02, - 0x213ec3, - 0x21d283, - 0x259003, - 0x3adc45, - 0x14f9c6, - 0x2879c4, - 0x2022c2, - 0x120648, - 0x2000c2, - 0xf8945, - 0x1b308, - 0x18ec43, - 0x208e02, - 0x46491f86, - 0x1f484, - 0xb19cb, - 0x395c6, - 0x7a6c7, - 0x231103, - 0x4b808, - 0x213ec3, - 0x111185, - 0x192d44, - 0x267503, - 0x526c7, - 0xe0a84, - 0x21d283, - 0x7b846, - 0xe5f84, - 0xe6143, - 0x259003, - 0x2f5544, - 0x12d147, - 0x14f5c9, - 0xb1788, - 0x1436c4, - 0x3f5c6, - 0xe1c8, - 0x131b05, - 0xe4c9, - 0xf8945, - 0x208e02, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x214b83, - 0x259003, - 0x2f3983, - 0x2022c2, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x2171c3, - 0x2bf144, - 0x21d283, - 0x14b83, - 0x259003, - 0x208e03, - 0x231103, - 0x2dd584, - 0x213ec3, - 0x21d283, - 0x259003, - 0x3adc46, - 0x231103, - 0x213ec3, - 0x2ab03, - 0xe6143, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0xf8945, - 0x7a6c7, - 0x120648, - 0x213ec3, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x49208e03, - 0x231103, - 0x21d283, - 0x259003, - 0x120648, - 0x2000c2, - 0x208e02, - 0x208e03, - 0x213ec3, - 0x21d283, - 0x2003c2, - 0x259003, - 0x33a8c7, - 0x31258b, - 0x201103, - 0x238448, - 0x32c007, - 0x2116c6, - 0x209885, - 0x38d689, - 0x27a348, - 0x3726c9, - 0x3a8bd0, - 0x3726cb, - 0x2f1789, - 0x20fac3, - 0x201389, - 0x22f406, - 0x22f40c, - 0x20f448, - 0x3cdc48, - 0x3b8209, - 0x35194e, - 0x2bb54b, - 0x36c5cc, - 0x2038c3, - 0x28f9cc, - 0x2038c9, - 0x23cc47, - 0x23104c, - 0x3c79ca, - 0x245a04, - 0x24d20d, - 0x28f888, - 0x20db4d, - 0x292c06, - 0x2879cb, - 0x34f749, - 0x380107, - 0x389c06, - 0x326289, - 0x388eca, - 0x31ac48, - 0x2f3584, - 0x33d187, - 0x246347, - 0x2393c4, - 0x2e53c4, - 0x399189, - 0x394d89, - 0x219588, - 0x20d8c5, - 0x20ec05, - 0x20b006, - 0x24d0c9, - 0x26b58d, - 0x2f48c8, - 0x20af07, - 0x209908, - 0x31f446, - 0x23b984, - 0x2a8f45, - 0x3d0446, - 0x3d1fc4, - 0x2037c7, - 0x20588a, - 0x210744, - 0x2125c6, - 0x213349, - 0x21334f, - 0x214e0d, - 0x215c86, - 0x21af10, - 0x21b306, - 0x21b887, - 0x21c147, - 0x21c14f, - 0x21dd09, - 0x2245c6, - 0x224cc7, - 0x224cc8, - 0x2258c9, - 0x280808, - 0x2e9e87, - 0x20f383, - 0x22acc6, - 0x3c49c8, - 0x351c0a, - 0x3c5dc9, - 0x222703, - 0x307946, - 0x265e4a, - 0x28df47, - 0x23ca8a, - 0x30a20e, - 0x21de46, - 0x29d0c7, - 0x354546, - 0x203986, - 0x209e0b, - 0x20ed8a, - 0x2ad44d, - 0x3d0807, - 0x2694c8, - 0x2694c9, - 0x2694cf, - 0x3477cc, - 0x26cd09, - 0x2b2fce, - 0x38170a, - 0x2bd7c6, - 0x2fc586, - 0x31cdcc, - 0x31e64c, - 0x322088, - 0x359a47, - 0x235105, - 0x292304, - 0x39520e, - 0x266744, - 0x35d187, - 0x3a6fca, - 0x3c7ed4, - 0x3cbc0f, - 0x21c308, - 0x22ab88, - 0x33e48d, - 0x33e48e, - 0x22ae49, - 0x22c588, - 0x22c58f, - 0x230d4c, - 0x230d4f, - 0x232247, - 0x2346ca, - 0x246b0b, - 0x237908, - 0x23b307, - 0x2606cd, - 0x3319c6, - 0x24d3c6, - 0x240149, - 0x278708, - 0x244c48, - 0x244c4e, - 0x312687, - 0x246dc5, - 0x2476c5, - 0x204304, - 0x211986, - 0x219488, - 0x394583, - 0x2f42ce, - 0x260a88, - 0x372dcb, - 0x309207, - 0x2fe345, - 0x2474c6, - 0x2ab4c7, - 0x2fa608, - 0x33e8c9, - 0x22e5c5, - 0x287108, - 0x2355c6, - 0x3aa44a, - 0x395109, - 0x231109, - 0x23110b, - 0x393648, - 0x239289, - 0x20d986, - 0x37510a, - 0x2088ca, - 0x2348cc, - 0x228a87, - 0x2c980a, - 0x32d60b, - 0x32d619, - 0x317888, - 0x3adcc5, - 0x260886, - 0x26bc49, - 0x381ec6, - 0x2d324a, - 0x27a546, - 0x2353c4, - 0x2cb98d, - 0x3949c7, - 0x2353c9, - 0x24a785, - 0x24ad88, - 0x24b5c9, - 0x24ba04, - 0x24d807, - 0x24d808, - 0x24dcc7, - 0x268748, - 0x253107, - 0x204105, - 0x25a00c, - 0x25a849, - 0x2cf5ca, - 0x3ac489, - 0x201489, - 0x37fc4c, - 0x25ee0b, - 0x25fac8, - 0x260e88, - 0x264944, - 0x285608, - 0x2864c9, - 0x3c7a87, - 0x213586, - 0x29a7c7, - 0x3cf649, - 0x324d4b, - 0x294387, - 0x3cc987, - 0x219cc7, - 0x20dac4, - 0x20dac5, - 0x2dd285, - 0x34f34b, - 0x3b5a04, - 0x2be748, - 0x2f774a, - 0x235687, - 0x358507, - 0x28d692, - 0x29efc6, - 0x22d806, - 0x38ff8e, - 0x2a2f46, - 0x293388, - 0x29390f, - 0x20df08, - 0x39cfc8, - 0x2c474a, - 0x2c4751, - 0x2a2bce, - 0x23b60a, - 0x23b60c, - 0x22c787, - 0x22c790, - 0x3c9e48, - 0x2a2dc5, - 0x2ab7ca, - 0x3d200c, - 0x29600d, - 0x304486, - 0x304487, - 0x30448c, - 0x383c4c, - 0x21da0c, - 0x2acacb, - 0x383104, - 0x2b1384, - 0x385749, - 0x3b1c47, - 0x384649, - 0x208709, - 0x3bdd87, - 0x3c7846, - 0x3c7849, - 0x2ae8c3, - 0x2b3cca, - 0x38cd87, - 0x335c4b, - 0x2ad2ca, - 0x22eb84, - 0x35c586, - 0x282b89, - 0x311844, - 0x204e8a, - 0x2499c5, - 0x2c10c5, - 0x2c10cd, - 0x2c140e, - 0x2d95c5, - 0x339106, - 0x3ad847, - 0x25a28a, - 0x370ac6, - 0x2ec304, - 0x303187, - 0x2700cb, - 0x31f507, - 0x27a944, - 0x3010c6, - 0x3010cd, - 0x2dfa4c, - 0x21d146, - 0x2f4aca, - 0x3472c6, - 0x23e248, - 0x22f087, - 0x245b8a, - 0x382c86, - 0x280303, - 0x2bd8c6, - 0x3c4848, - 0x3858ca, - 0x285bc7, - 0x285bc8, - 0x289fc4, - 0x33a407, - 0x202d88, - 0x298908, - 0x271bc8, - 0x2e314a, - 0x2e4345, - 0x208e87, - 0x23b453, - 0x258146, - 0x2141c8, - 0x2201c9, - 0x244188, - 0x200d0b, - 0x35cd48, - 0x270204, - 0x2577c6, - 0x31b786, - 0x316109, - 0x2c7a47, - 0x25a108, - 0x298a86, - 0x327fc4, - 0x326b85, - 0x2cf908, - 0x332e8a, - 0x2cb608, - 0x2d06c6, - 0x29988a, - 0x2a7988, - 0x2d7748, - 0x2d8308, - 0x2d8b86, - 0x2db7c6, - 0x3abf4c, - 0x2dbd90, - 0x2a4005, - 0x20dd08, - 0x330710, - 0x20dd10, - 0x3a8a4e, - 0x3abbce, - 0x3abbd4, - 0x3b144f, - 0x3b1806, - 0x390d11, - 0x389d93, - 0x38a208, - 0x3251c5, - 0x238988, - 0x2fd945, - 0x2e5b0c, - 0x226bc9, - 0x292149, - 0x227047, - 0x397249, - 0x318d07, - 0x300446, - 0x2a8d47, - 0x201c05, - 0x20e143, - 0x394749, - 0x25cf49, - 0x22ab03, - 0x381244, - 0x27548d, - 0x2f8f0f, - 0x328005, - 0x387f86, - 0x228cc7, - 0x20f1c7, - 0x2fc8c6, - 0x2fc8cb, - 0x2a39c5, - 0x25cd06, - 0x301747, - 0x253809, - 0x37cac6, - 0x392605, - 0x363b4b, - 0x20a286, - 0x229585, - 0x25b908, - 0x2a5748, - 0x32018c, - 0x320190, - 0x2b1d89, - 0x2b4447, - 0x313a0b, - 0x2e87c6, - 0x2e9d4a, - 0x2ea8cb, - 0x2eb68a, - 0x2eb906, - 0x2ec7c5, - 0x32bf06, - 0x2b0648, - 0x22710a, - 0x33e11c, - 0x2f3a4c, - 0x2f3d48, - 0x3adc45, - 0x382947, - 0x351586, - 0x281ac5, - 0x217846, - 0x2fca88, - 0x2c0347, - 0x351848, - 0x25820a, - 0x228dcc, - 0x20b209, - 0x225647, - 0x286a04, - 0x247786, - 0x39cb4a, - 0x208805, - 0x222e4c, - 0x224e88, - 0x31f748, - 0x334a4c, - 0x22d1cc, - 0x22e6c9, - 0x22e907, - 0x3a0c8c, - 0x21e984, - 0x24fe4a, - 0x303e0c, - 0x2723cb, - 0x25948b, - 0x25c906, - 0x25f907, - 0x22c9c7, - 0x22c9cf, - 0x304e51, - 0x2e1892, - 0x264acd, - 0x264ace, - 0x264e0e, - 0x3b1608, - 0x3b1612, - 0x26c788, - 0x220807, - 0x2503ca, - 0x2a62c8, - 0x2a2f05, - 0x3bc00a, - 0x21b687, - 0x2f6044, - 0x21c883, - 0x2343c5, - 0x2c49c7, - 0x3040c7, - 0x29620e, - 0x35020d, - 0x3593c9, - 0x24f405, - 0x3b01c3, - 0x218306, - 0x25d945, - 0x373008, - 0x2baa09, - 0x2608c5, - 0x2608cf, - 0x2b1ac7, - 0x209705, - 0x309bca, - 0x2f3206, - 0x268ac9, - 0x2fd48c, - 0x2ff149, - 0x209b46, - 0x2f754c, - 0x338506, - 0x302d08, - 0x303346, - 0x317a06, - 0x2b5704, - 0x316083, - 0x2b6a8a, - 0x219fd1, - 0x26ceca, - 0x26e985, - 0x271747, - 0x258587, - 0x202e84, - 0x202e8b, - 0x2bc988, - 0x2bea46, - 0x22fac5, - 0x3aa744, - 0x24ab09, - 0x2008c4, - 0x244a87, - 0x2ff345, - 0x2ff347, - 0x3901c5, - 0x24cac3, - 0x2206c8, - 0x35c20a, - 0x2087c3, - 0x20f3ca, - 0x3c1846, - 0x26064f, - 0x3bcc09, - 0x2f4250, - 0x2f9748, - 0x2d1749, - 0x296f07, - 0x30104f, - 0x346084, - 0x2dd604, - 0x21b186, - 0x280c46, - 0x3a41ca, - 0x27bb06, - 0x340907, - 0x30af88, - 0x30b187, - 0x30c287, - 0x30d24a, - 0x30eacb, - 0x326945, - 0x2e14c8, - 0x232a43, - 0x3b700c, - 0x343d0f, - 0x234f0d, - 0x25ac87, - 0x359509, - 0x241e87, - 0x25b148, - 0x3c80cc, - 0x2b8a48, - 0x26fcc8, - 0x32ea8e, - 0x341294, - 0x3417a4, - 0x358c0a, - 0x373b0b, - 0x318dc4, - 0x318dc9, - 0x237ec8, - 0x247ec5, - 0x39408a, - 0x260cc7, - 0x32be04, - 0x38d8c3, - 0x208e03, - 0x233e84, - 0x231103, - 0x213ec3, - 0x220a04, - 0x217383, - 0x270203, - 0x2dbd86, - 0x2bf144, - 0x21d283, - 0x259003, - 0x216203, - 0x2000c2, - 0x38d8c3, - 0x208e02, - 0x208e03, - 0x233e84, - 0x231103, - 0x213ec3, - 0x217383, - 0x2dbd86, - 0x21d283, - 0x259003, - 0x120648, - 0x208e03, - 0x231103, - 0x3d0943, - 0x21d283, - 0xe6143, - 0x259003, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x2bf144, - 0x21d283, - 0x259003, - 0x2000c2, - 0x25c183, - 0x208e02, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x200f82, - 0x248182, - 0x208e02, - 0x208e03, - 0x20f982, - 0x2005c2, - 0x220a04, - 0x20ac44, - 0x235a82, - 0x2bf144, - 0x2003c2, - 0x259003, - 0x216203, - 0x25c906, - 0x22a342, - 0x203642, - 0x220e82, - 0x4ba0df03, - 0x4be2c783, - 0x58fc6, - 0x58fc6, - 0x2879c4, - 0x214b83, - 0x1930a, - 0x112fcc, - 0xaacc, - 0xca64d, - 0xf8945, - 0x8b88c, - 0x67c47, - 0x10ec6, - 0x15e08, - 0x18dc7, - 0x1e748, - 0x17ba8a, - 0x103647, - 0x4ca8bac5, - 0xde0c9, - 0x32d0b, - 0x1c5b0b, - 0x7a748, - 0x15a49, - 0x1cd6ca, - 0x13f30e, - 0x1152cd, - 0x1443f8b, - 0xdf90a, - 0x1f484, - 0x68486, - 0x179b48, - 0x886c8, - 0x32fc7, - 0x1fd85, - 0x92f47, - 0x7c349, - 0x1118c7, - 0x667c8, - 0x107209, - 0x4a884, - 0x4db85, - 0x13bace, - 0x6d80d, - 0x7a548, - 0x4cf6af86, - 0x4d96af88, - 0xb4288, - 0x13aad0, - 0x54dcc, - 0x65b47, - 0x66607, - 0x6a9c7, - 0x70387, - 0xafc2, - 0x28c7, - 0xef4c, - 0x191b85, - 0x16bd07, - 0xa5606, - 0xa66c9, - 0xa80c8, - 0x55402, - 0x5c2, - 0x3d44b, - 0xe6007, - 0x11eb09, - 0x6b109, - 0x1656c8, - 0xb2d02, - 0x1a6cc9, - 0xd98ca, - 0x2306, - 0xce389, - 0xdf887, - 0xdffc9, - 0xe0d48, - 0xe1d47, - 0xe42c9, - 0xe6945, - 0xe6cd0, - 0x1d22c6, - 0x129cc5, - 0x8f4c7, - 0x11f04d, - 0x43105, - 0x25f46, - 0xee247, - 0xf5558, - 0x111c48, - 0x210a, - 0x8782, - 0x5924a, - 0x7324d, - 0x1002, - 0xc8346, - 0x8e4c8, - 0x49148, - 0x6e6c9, - 0x10b908, - 0x7f98e, - 0x18307, - 0x10668d, - 0xfbec5, - 0x2648, - 0x1ad488, - 0x106c86, - 0x67c2, - 0xdc586, - 0x3f5c6, - 0x1242, - 0x401, - 0x5f787, - 0x5d203, - 0x4d2f5dc4, - 0x4d694cc3, - 0xc1, - 0x12bc6, - 0xc1, - 0x201, - 0x12bc6, - 0x5d203, - 0x156ca05, - 0x245a04, - 0x208e03, - 0x24ea84, - 0x220a04, - 0x21d283, - 0x220085, - 0x216cc3, - 0x202203, - 0x2fc845, - 0x202043, - 0x4ea08e03, - 0x231103, - 0x213ec3, - 0x200181, - 0x270203, - 0x20ac44, - 0x2bf144, - 0x21d283, - 0x259003, - 0x211303, - 0x120648, - 0x2000c2, - 0x38d8c3, - 0x208e02, - 0x208e03, - 0x231103, - 0x3d0943, - 0x2005c2, - 0x220a04, - 0x217383, - 0x270203, - 0x21d283, - 0x214b83, - 0x259003, - 0x202043, - 0x120648, - 0x343a82, - 0x1018c7, - 0x8e02, - 0x126b05, - 0x54f0f, - 0x1582ac8, - 0x10bc8e, - 0x4fa23802, - 0x32b588, - 0x223c86, - 0x2c6046, - 0x223607, - 0x4fe04bc2, - 0x503bca88, - 0x22208a, - 0x2655c8, - 0x204342, - 0x335a89, - 0x326987, - 0x213506, - 0x220409, - 0x206084, - 0x2115c6, - 0x2c6444, - 0x201904, - 0x259c09, - 0x303b06, - 0x2e95c5, - 0x253585, - 0x22bc07, - 0x2c2f47, - 0x29f204, - 0x223846, - 0x2f6cc5, - 0x2acdc5, - 0x30fb85, - 0x214487, - 0x309045, - 0x32a249, - 0x38a945, - 0x2fa744, - 0x370a07, - 0x32744e, - 0x390909, - 0x38fe49, - 0x324386, - 0x2412c8, - 0x2f02cb, - 0x36230c, - 0x344d86, - 0x36c487, - 0x2b2745, - 0x2e53ca, - 0x219689, - 0x348949, - 0x38e9c6, - 0x301505, - 0x247a45, - 0x331709, - 0x30fd0b, - 0x277d46, - 0x34aa86, - 0x20af04, - 0x28d346, - 0x246e48, - 0x3c46c6, - 0x26ddc6, - 0x204688, - 0x206607, - 0x206e49, - 0x207645, - 0x120648, - 0x292ec4, - 0x30c804, - 0x20ea85, - 0x3b32c9, - 0x21f107, - 0x21f10b, - 0x22294a, - 0x226b05, - 0x5060da02, - 0x2ad187, - 0x50a26e08, - 0x211cc7, - 0x2df085, - 0x32e6ca, - 0x8e02, - 0x25324b, - 0x27b0ca, - 0x25ce46, - 0x20e243, - 0x2d58cd, - 0x39ea8c, - 0x20fc4d, - 0x24a3c5, - 0x36efc5, - 0x3945c7, - 0x215609, - 0x221f86, - 0x257cc5, - 0x30ad88, - 0x28d243, - 0x2e9088, - 0x28d248, - 0x2c7147, - 0x34c0c8, - 0x39dd09, - 0x2e2387, - 0x312107, - 0x335908, - 0x2f9e44, - 0x2f9e47, - 0x292b08, - 0x359286, - 0x35d50f, - 0x31ed07, - 0x355006, - 0x22ea45, - 0x221003, - 0x248f07, - 0x37ef43, - 0x24e146, - 0x2500c6, - 0x250946, - 0x291805, - 0x268743, - 0x3a6948, - 0x3809c9, - 0x39f44b, - 0x250ac8, - 0x252dc5, - 0x254145, - 0x50e2ec42, - 0x2a8e09, - 0x220a87, - 0x25cd85, - 0x259b07, - 0x25c506, - 0x3785c5, - 0x25d78b, - 0x25fac4, - 0x265185, - 0x2652c7, - 0x2776c6, - 0x277b05, - 0x285807, - 0x285f87, - 0x2e7784, - 0x28b68a, - 0x28c0c8, - 0x2bcfc9, - 0x238cc5, - 0x362b06, - 0x24700a, - 0x253486, - 0x269007, - 0x2bcc8d, - 0x2a3509, - 0x3a5c45, - 0x395787, - 0x327848, - 0x38a3c8, - 0x39e787, - 0x205e06, - 0x227647, - 0x24fc83, - 0x303a84, - 0x375d85, - 0x3ab2c7, - 0x3af6c9, - 0x2678c8, - 0x3c8385, - 0x245dc4, - 0x250c85, - 0x25fc8d, - 0x205002, - 0x2c1f46, - 0x2c8286, - 0x30cfca, - 0x396106, - 0x39ca85, - 0x38b185, - 0x38b187, - 0x3aa28c, - 0x2b410a, - 0x28d006, - 0x2db6c5, - 0x28d186, - 0x28d4c7, - 0x28f186, - 0x29170c, - 0x220549, - 0x51213047, - 0x293cc5, - 0x293cc6, - 0x294748, - 0x24da85, - 0x2a4205, - 0x2a4988, - 0x2a4b8a, - 0x5167c042, - 0x51a0bf02, - 0x2d24c5, - 0x2782c3, - 0x245308, - 0x204c03, - 0x2a4e04, - 0x268c0b, - 0x204c08, - 0x350b48, - 0x51f6b749, - 0x2a99c9, - 0x2aa106, - 0x2ab148, - 0x2ab349, - 0x2ac5c6, - 0x2ac745, - 0x24a1c6, - 0x2adc89, - 0x38e0c7, - 0x22b646, - 0x302b47, - 0x38e387, - 0x217b44, - 0x52311f49, - 0x281d08, - 0x3bc988, - 0x328207, - 0x2cb0c6, - 0x215409, - 0x2c6707, - 0x25594a, - 0x256ec8, - 0x212407, - 0x2131c6, - 0x28f2ca, - 0x3a0ac8, - 0x2c7d05, - 0x225e45, - 0x305d47, - 0x371e49, - 0x309e0b, - 0x32a708, - 0x38a9c9, - 0x250ec7, - 0x2b974c, - 0x2ba08c, - 0x2ba38a, - 0x2ba60c, - 0x2c5fc8, - 0x2c61c8, - 0x2c63c4, - 0x2c68c9, - 0x2c6b09, - 0x2c6d4a, - 0x2c6fc9, - 0x2c7307, - 0x3b4c4c, - 0x233706, - 0x2c9548, - 0x253546, - 0x387786, - 0x3a5b47, - 0x325008, - 0x3295cb, - 0x211b87, - 0x234489, - 0x379589, - 0x24ec07, - 0x257644, - 0x271887, - 0x39c2c6, - 0x2114c6, - 0x2f4c85, - 0x24b3c8, - 0x292044, - 0x292046, - 0x2b3fcb, - 0x32e2c9, - 0x214386, - 0x214609, - 0x20eb46, - 0x333088, - 0x221403, - 0x301685, - 0x2676c9, - 0x26df05, - 0x305b84, - 0x276bc6, - 0x23c405, - 0x255146, - 0x30ee47, - 0x32d506, - 0x22a24b, - 0x375007, - 0x2528c6, - 0x22ef46, - 0x22bcc6, - 0x29f1c9, - 0x2f638a, - 0x2bed45, - 0x20a38d, - 0x2a4c86, - 0x2f7946, - 0x2f4146, - 0x23e1c5, - 0x2e6fc7, - 0x2fe607, - 0x38f7ce, - 0x270203, - 0x2cb089, - 0x381c49, - 0x2e57c7, - 0x26c447, - 0x29cc45, - 0x372d05, - 0x527992cf, - 0x2d1987, - 0x2d1b48, - 0x2d2044, - 0x2d3806, - 0x52a47742, - 0x2d8e06, - 0x2dbd86, - 0x32990e, - 0x2e8eca, - 0x3ca246, - 0x3bd20a, - 0x2138c9, - 0x243445, - 0x373288, - 0x3504c6, - 0x29b008, - 0x275108, - 0x3a7b0b, - 0x223705, - 0x3090c8, - 0x2047cc, - 0x2def47, - 0x250306, - 0x3757c8, - 0x211848, - 0x52e3bbc2, - 0x20784b, - 0x218a89, - 0x219149, - 0x32e147, - 0x20a0c8, - 0x5321fac8, - 0x38b9cb, - 0x365549, - 0x283c0d, - 0x24a588, - 0x357388, - 0x53600ec2, - 0x33ec84, - 0x53a2c942, - 0x2fee46, - 0x53e04442, - 0x31984a, - 0x204246, - 0x31afc8, - 0x383408, - 0x39c6c6, - 0x23f2c6, - 0x2f94c6, - 0x372f85, - 0x238104, - 0x542b0104, - 0x350006, - 0x27b907, - 0x546e6687, - 0x26d5cb, - 0x211ec9, - 0x36f00a, - 0x38b2c4, - 0x2bdb48, - 0x22b40d, - 0x2f2009, - 0x2f2248, - 0x2f24c9, - 0x2f5544, - 0x2469c4, - 0x25ecc5, - 0x31034b, - 0x204b86, - 0x34fe45, - 0x21e009, - 0x223908, - 0x2a14c4, - 0x2e5549, - 0x353b85, - 0x2c2f88, - 0x3127c7, - 0x390248, - 0x282d86, - 0x38f407, - 0x2e0849, - 0x363cc9, - 0x229605, - 0x24f7c5, - 0x54a12482, - 0x2fa504, - 0x229045, - 0x223506, - 0x3c89c5, - 0x298387, - 0x350105, - 0x277704, - 0x324446, - 0x27ba07, - 0x22b286, - 0x3cf585, - 0x216e48, - 0x223e85, - 0x221287, - 0x2268c9, - 0x32e40a, - 0x2b0d87, - 0x2b0d8c, - 0x2e9586, - 0x379889, - 0x24d505, - 0x24d9c8, - 0x20cec3, - 0x20d945, - 0x39bf85, - 0x27f547, - 0x54e1f542, - 0x23eac7, - 0x2f51c6, - 0x33c486, - 0x2fb106, - 0x211786, - 0x353e08, - 0x238ac5, - 0x3550c7, - 0x3550cd, - 0x21c883, - 0x21c885, - 0x309987, - 0x23ee08, - 0x309545, - 0x216448, - 0x384546, - 0x2de287, - 0x2c9485, - 0x223786, - 0x3afd45, - 0x221d4a, - 0x377106, - 0x31d707, - 0x2e0c05, - 0x2fef87, - 0x303104, - 0x305b06, - 0x3731c5, - 0x20f8cb, - 0x39c149, - 0x25c28a, - 0x229688, - 0x30e308, - 0x313f0c, - 0x3235c7, - 0x34b288, - 0x34cbc8, - 0x34d005, - 0x3a440a, - 0x3b01c9, - 0x55201dc2, - 0x3cc786, - 0x2608c4, - 0x3230c9, - 0x2951c9, - 0x278dc7, - 0x2c5287, - 0x208589, - 0x23e3c8, - 0x23e3cf, - 0x228046, - 0x2ddd8b, - 0x3c1985, - 0x3c1987, - 0x2fcc89, - 0x268d46, - 0x2e54c7, - 0x2e1c05, - 0x22e4c4, - 0x267586, - 0x21f2c4, - 0x2eebc7, - 0x2cd048, - 0x55701408, - 0x302205, - 0x302347, - 0x3186c9, - 0x214944, - 0x242b88, - 0x55a55788, - 0x202e84, - 0x2faa48, - 0x389cc4, - 0x39e209, - 0x214105, - 0x55e022c2, - 0x228085, - 0x2d6b05, - 0x3955c8, - 0x232087, - 0x562008c2, - 0x2b0245, - 0x2d75c6, - 0x243a86, - 0x2fa4c8, - 0x2fbb88, - 0x3c8986, - 0x3b1ac6, - 0x301989, - 0x33c3c6, - 0x2930cb, - 0x36c945, - 0x2a6206, - 0x2f1108, - 0x290186, - 0x22b006, - 0x21690a, - 0x2a9d8a, - 0x25ff85, - 0x238b87, - 0x314c86, - 0x56604b02, - 0x309ac7, - 0x25f2c5, - 0x246f84, - 0x246f85, - 0x2bda46, - 0x271107, - 0x21b185, - 0x24b444, - 0x2aeac8, - 0x22b0c5, - 0x2e3b47, - 0x3b7ac5, - 0x221c85, - 0x2aa584, - 0x35a589, - 0x2f6b08, - 0x23c2c6, - 0x2d9a86, - 0x202b86, - 0x56bc0088, - 0x3c8707, - 0x306e0d, - 0x307d4c, - 0x308349, - 0x308589, - 0x56f6d342, - 0x3c7603, - 0x205ec3, - 0x39c385, - 0x3ab3ca, - 0x33c286, - 0x30cb85, - 0x30f004, - 0x30f00b, - 0x32fb8c, - 0x330f0c, - 0x331215, - 0x3320cd, - 0x33628f, - 0x336652, - 0x336acf, - 0x336e92, - 0x337313, - 0x3377cd, - 0x337d8d, - 0x33810e, - 0x33868e, - 0x338ecc, - 0x33928c, - 0x3396cb, - 0x33a5ce, - 0x33aed2, - 0x33c04c, - 0x33c610, - 0x345052, - 0x34624c, - 0x34690d, - 0x346c4c, - 0x349d51, - 0x34ac0d, - 0x34d5cd, - 0x34dbca, - 0x34de4c, - 0x34f10c, - 0x34fb4c, - 0x351e8c, - 0x355f53, - 0x3565d0, - 0x3569d0, - 0x35758d, - 0x357b8c, - 0x358949, - 0x35b78d, - 0x35bad3, - 0x35de91, - 0x35e2d3, - 0x35ee8f, - 0x35f24c, - 0x35f54f, - 0x35f90d, - 0x35ff0f, - 0x3602d0, - 0x360d4e, - 0x363f0e, - 0x364490, - 0x365fcd, - 0x36694e, - 0x366ccc, - 0x367c93, - 0x36980e, - 0x369e90, - 0x36a291, - 0x36a6cf, - 0x36aa93, - 0x36cecd, - 0x36d20f, - 0x36d5ce, - 0x36dc90, - 0x36e089, - 0x36f290, - 0x36f88f, - 0x36ff0f, - 0x3702d2, - 0x37100e, - 0x371a0d, - 0x37208d, - 0x3723cd, - 0x373e4d, - 0x37418d, - 0x3744d0, - 0x3748cb, - 0x375b4c, - 0x375ecc, - 0x3764cc, - 0x3767ce, - 0x383610, - 0x385b52, - 0x385fcb, - 0x3864ce, - 0x38684e, - 0x3870ce, - 0x38754b, - 0x5738ed16, - 0x395e0d, - 0x396294, - 0x39748d, - 0x398cd5, - 0x39a68d, - 0x39b00f, - 0x39b68f, - 0x39f70f, - 0x39face, - 0x3a004d, - 0x3a2111, - 0x3a530c, - 0x3a560c, - 0x3a590b, - 0x3a5d8c, - 0x3a614f, - 0x3a6512, - 0x3a724d, - 0x3a87cc, - 0x3a92cc, - 0x3a95cd, - 0x3a990f, - 0x3a9cce, - 0x3ab08c, - 0x3ab64d, - 0x3ab98b, - 0x3ac24c, - 0x3acb4d, - 0x3ace8e, - 0x3ad209, - 0x3ae613, - 0x3aeb4d, - 0x3aee8d, - 0x3af48c, - 0x3af90e, - 0x3b040f, - 0x3b07cc, - 0x3b0acd, - 0x3b0e0f, - 0x3b11cc, - 0x3b1e0c, - 0x3b218c, - 0x3b248c, - 0x3b2b4d, - 0x3b2e92, - 0x3b350c, - 0x3b380c, - 0x3b3b11, - 0x3b3f4f, - 0x3b430f, - 0x3b46d3, - 0x3b508e, - 0x3b540f, - 0x3b57cc, - 0x577b5b0e, - 0x3b5e8f, - 0x3b6256, - 0x3b75d2, - 0x3b988c, - 0x3ba24f, - 0x3ba8cd, - 0x3bf10f, - 0x3bf4cc, - 0x3bf7cd, - 0x3bfb0d, - 0x3c104e, - 0x3c208c, - 0x3c3a4c, - 0x3c3d50, - 0x3c6991, - 0x3c6dcb, - 0x3c720c, - 0x3c750e, - 0x3c9051, - 0x3c948e, - 0x3c980d, - 0x3ce0cb, - 0x3ce9cf, - 0x3cff94, - 0x259a02, - 0x259a02, - 0x2047c3, - 0x259a02, - 0x2047c3, - 0x259a02, - 0x206342, - 0x24a205, - 0x3c8d4c, - 0x259a02, - 0x259a02, - 0x206342, - 0x259a02, - 0x294dc5, - 0x32e405, - 0x259a02, - 0x259a02, - 0x20a842, - 0x294dc5, - 0x333289, - 0x35db8c, - 0x259a02, - 0x259a02, - 0x259a02, - 0x259a02, - 0x24a205, - 0x259a02, - 0x259a02, - 0x259a02, - 0x259a02, - 0x20a842, - 0x333289, - 0x259a02, - 0x259a02, - 0x259a02, - 0x32e405, - 0x259a02, - 0x32e405, - 0x35db8c, - 0x3c8d4c, - 0x38d8c3, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x21d283, - 0x259003, - 0x194a88, - 0x577c4, - 0x14b83, - 0xc8c88, - 0x2000c2, - 0x58608e02, - 0x2424c3, - 0x256e04, - 0x204a03, - 0x21cac4, - 0x22d806, - 0x210d83, - 0x300804, - 0x2d4f45, - 0x270203, - 0x21d283, - 0xe6143, - 0x259003, - 0x23628a, - 0x25c906, - 0x386bcc, - 0x120648, - 0x208e02, - 0x208e03, - 0x231103, - 0x213ec3, - 0x208e83, - 0x2dbd86, - 0x21d283, - 0x259003, - 0x216203, - 0xa5e48, - 0xf8945, - 0x1c5c49, - 0x5202, - 0x59afd885, - 0xf8945, - 0x67c47, - 0x6e808, - 0xbd0e, - 0x89792, - 0x18cecb, - 0x103746, - 0x59e8bac5, - 0x5a28bacc, - 0x38e07, - 0xeb207, - 0xbe30a, - 0x3c550, - 0x18e505, - 0xb19cb, - 0x886c8, - 0x32fc7, - 0x56a8b, - 0x7c349, - 0x132687, - 0x1118c7, - 0x77f87, - 0x32f06, - 0x667c8, - 0x5a835d46, - 0x49087, - 0x6d80d, - 0xbdcd0, - 0x5ac05642, - 0x7a548, - 0x5b2d0, - 0x17930c, - 0x5b3827cd, - 0x5df88, - 0x5e40b, - 0x6ba87, - 0x57389, - 0x59086, - 0x94948, - 0x1742, - 0x7154a, - 0xe9407, - 0x16bd07, - 0xa66c9, - 0xa80c8, - 0x111185, - 0xf360e, - 0x225ce, - 0x15440f, - 0x11eb09, - 0x6b109, - 0x87e8b, - 0x9fc0f, - 0xae04c, - 0x198a0b, - 0xcf508, - 0xebb87, - 0x100ac8, - 0x13cf8b, - 0x1406cc, - 0x15820c, - 0x16150c, - 0x16934d, - 0x1656c8, - 0xc7c82, - 0x1a6cc9, - 0xf3088, - 0x1a388b, - 0xcb2c6, - 0xd6f4b, - 0x13aa0b, - 0xe134a, - 0xe1f05, - 0xe6cd0, - 0xe9706, - 0x12dc06, - 0x129cc5, - 0x8f4c7, - 0xf99c8, - 0xee247, - 0xee507, - 0xfb647, - 0xfec8a, - 0x1204ca, - 0xc8346, - 0x9268d, - 0x49148, - 0x10b908, - 0xaa4c9, - 0xb8dc5, - 0xfe7cc, - 0x16954b, - 0x171d84, - 0x106a49, - 0x106c86, - 0x1557c6, - 0xbb946, - 0x3642, - 0x3f5c6, - 0x204b, - 0x113d87, - 0x1242, - 0xcd4c5, - 0x19fc4, - 0x101, - 0x64dc3, - 0x5a678486, - 0x94cc3, - 0x382, - 0x928c4, - 0x4342, - 0x879c4, - 0x882, - 0x7982, - 0xbc2, - 0x120f02, - 0xf82, - 0x8bac2, - 0x6a82, - 0x142382, - 0x34942, - 0x18982, - 0x8a42, - 0xa182, - 0x31103, - 0x942, - 0x2bc2, - 0x17242, - 0x1482, - 0x642, - 0x2f4c2, - 0x55402, - 0x7782, - 0xad02, - 0x5c2, - 0x17383, - 0xb02, - 0x2a02, - 0xb2d02, - 0x6f42, - 0x4c82, - 0xbb02, - 0x11602, - 0x9d082, - 0x2302, - 0x127182, - 0x6cac2, - 0x7c02, - 0x1d283, - 0x602, - 0x3bbc2, - 0x1c02, - 0x1202, - 0x29585, - 0x59c2, - 0x3eec2, - 0x40083, - 0x682, - 0x8782, - 0x1002, - 0x5502, - 0x11782, - 0x8c2, - 0x67c2, - 0x3642, - 0x7d85, - 0x5b606342, - 0x5bae3343, - 0xa203, - 0x5be06342, - 0xa203, - 0x82687, - 0x210443, - 0x2000c2, - 0x208e03, - 0x231103, - 0x3d0943, - 0x2005c3, - 0x208e83, - 0x21d283, - 0x214b83, - 0x259003, - 0x294d03, - 0x11243, - 0x120648, - 0x208e03, - 0x231103, - 0x3d0943, - 0x270203, - 0x21d283, - 0x214b83, - 0xe6143, - 0x259003, - 0x208e03, - 0x231103, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x200181, - 0x270203, - 0x21d283, - 0x24fc43, - 0x259003, - 0x195d04, - 0x38d8c3, - 0x208e03, - 0x231103, - 0x209843, - 0x3d0943, - 0x27f443, - 0x23c9c3, - 0x2a8bc3, - 0x284983, - 0x213ec3, - 0x220a04, - 0x21d283, - 0x259003, - 0x202043, - 0x38c384, - 0x25fe83, - 0x38c3, - 0x227303, - 0x38d308, - 0x28f304, - 0x20020a, - 0x23d346, - 0x117804, - 0x370707, - 0x21c44a, - 0x227f09, - 0x3aadc7, - 0x3b678a, - 0x38d8c3, - 0x2d254b, - 0x2bd549, - 0x202c85, - 0x33be87, - 0x8e02, - 0x208e03, - 0x21d4c7, - 0x375445, - 0x2c6549, - 0x231103, - 0x2bb386, - 0x2c5803, - 0xf5243, - 0x10e606, - 0x193e06, - 0x10d07, - 0x225046, - 0x31a4c5, - 0x207707, - 0x30c0c7, - 0x5e613ec3, - 0x346487, - 0x2bba43, - 0x245085, - 0x220a04, - 0x26eec8, - 0x37170c, - 0x340345, - 0x2a3686, - 0x21d387, - 0x225707, - 0x260087, - 0x266408, - 0x30d6cf, - 0x38ab85, - 0x2425c7, - 0x28c787, - 0x28c8ca, - 0x30abc9, - 0x30e745, - 0x3135ca, - 0x128546, - 0x2c5885, - 0x373d44, - 0x383346, - 0x2d2fc7, - 0x2c7b87, - 0x38fb08, - 0x221405, - 0x375346, - 0x26dd45, - 0x233b85, - 0x28b404, - 0x39c5c7, - 0x353c4a, - 0x24f108, - 0x36db06, - 0x8e83, - 0x2e4345, - 0x35d346, - 0x3b4e86, - 0x329bc6, - 0x270203, - 0x3a74c7, - 0x28c705, - 0x21d283, - 0x2e160d, - 0x214b83, - 0x38fc08, - 0x3812c4, - 0x2779c5, - 0x2a4e46, - 0x218806, - 0x2a6107, - 0x2a8c07, - 0x290605, - 0x259003, - 0x2ebc87, - 0x257509, - 0x32de49, - 0x20e64a, - 0x207d42, - 0x245044, - 0x2e9c44, - 0x329487, - 0x23e988, - 0x2ef349, - 0x21c749, - 0x2f1307, - 0x2f0846, - 0xf3386, - 0x2f5544, - 0x2f5b4a, - 0x2f8508, - 0x2f9389, - 0x30dec6, - 0x2b5c85, - 0x24efc8, - 0x2cb70a, - 0x294003, - 0x38c506, - 0x2f1407, - 0x22c005, - 0x381185, - 0x3add43, - 0x26fdc4, - 0x225e05, - 0x286087, - 0x2f6c45, - 0x342c46, - 0x1c8885, - 0x288e03, - 0x3ca309, - 0x27778c, - 0x3a500c, - 0x2d6d48, - 0x2c3907, - 0x3034c8, - 0x30428a, - 0x304c8b, - 0x2bd688, - 0x218908, - 0x233606, - 0x202a45, - 0x39344a, - 0x2e3385, - 0x2022c2, - 0x2c9347, - 0x250606, - 0x36e805, - 0x372949, - 0x279bc5, - 0x374d85, - 0x2f0e09, - 0x35d286, - 0x3b6e88, - 0x245143, - 0x225186, - 0x276b06, - 0x3133c5, - 0x3133c9, - 0x2efa89, - 0x27e5c7, - 0x115a84, - 0x315a87, - 0x21c649, - 0x233985, - 0x38208, - 0x33ef45, - 0x36b585, - 0x256289, - 0x201b42, - 0x2afb04, - 0x200f42, - 0x200b02, - 0x2d3945, - 0x317588, - 0x2b8d05, - 0x2c74c3, - 0x2c74c5, - 0x2d9003, - 0x20cb02, - 0x37a2c4, - 0x2a7903, - 0x20a282, - 0x387d84, - 0x2ea1c3, - 0x202582, - 0x2b8d83, - 0x28e444, - 0x2f9943, - 0x25dc04, - 0x203c42, - 0x216103, - 0x2343c3, - 0x200b42, - 0x374402, - 0x2ef8c9, - 0x2076c2, - 0x28a504, - 0x200cc2, - 0x24ee44, - 0x2f0804, - 0x202504, - 0x203642, - 0x233242, - 0x22e883, - 0x304a43, - 0x248204, - 0x293e84, - 0x2f1584, - 0x2f86c4, - 0x30f743, - 0x324bc3, - 0x3284c4, - 0x316f44, - 0x317086, - 0x229542, - 0x3bb43, - 0x208e02, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x2000c2, - 0x38d8c3, - 0x208e03, - 0x231103, - 0x202bc3, - 0x213ec3, - 0x220a04, - 0x2efb84, - 0x2bf144, - 0x21d283, - 0x259003, - 0x216203, - 0x2f6604, - 0x32b543, - 0x2a7143, - 0x371cc4, - 0x33ed46, - 0x207083, - 0xf8945, - 0xeb207, - 0x35a8c3, - 0x5fa1e348, - 0x228a83, - 0x2b4883, - 0x2450c3, - 0x208e83, - 0x39e4c5, - 0x13be43, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x20e2c3, - 0x22ce43, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x217383, - 0x21d283, - 0x231d04, - 0xe6143, - 0x259003, - 0x351584, - 0xf8945, - 0x2c2345, - 0xeb207, - 0x208e02, - 0x202142, - 0x200382, - 0x201402, - 0x14b83, - 0x2003c2, - 0x191584, - 0x208e03, - 0x233e84, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x2bf144, - 0x21d283, - 0x14b83, - 0x259003, - 0x211303, - 0x2879c4, - 0x120648, - 0x208e03, - 0x214b83, - 0x11243, - 0x144c04, - 0x245a04, - 0x120648, - 0x208e03, - 0x24ea84, - 0x220a04, - 0x214b83, - 0x200ec2, - 0xe6143, - 0x259003, - 0x202203, - 0x6fdc4, - 0x2fc845, - 0x2022c2, - 0x201fc3, - 0x192e49, - 0xdfd46, - 0x128688, - 0x2000c2, - 0x120648, - 0x208e02, - 0x231103, - 0x213ec3, - 0x2005c2, - 0x14b83, - 0x259003, - 0xa882, - 0x2000c2, - 0x1b6947, - 0x107609, - 0x37c3, - 0x120648, - 0x193d83, - 0x63347147, - 0x8e03, - 0x1cc688, - 0x231103, - 0x213ec3, - 0x42346, - 0x217383, - 0x58dc8, - 0xc4e48, - 0x38886, - 0x270203, - 0xce908, - 0x98403, - 0x634e3806, - 0xe8085, - 0x31307, - 0x1d283, - 0x4a83, - 0x59003, - 0x2542, - 0x18434a, - 0x17083, - 0xd3a03, - 0x2fbf44, - 0x10d4cb, - 0x10da88, - 0x8eb02, - 0x1454f07, - 0x15276c7, - 0x14c7588, - 0x1516b83, - 0x1882cb, - 0x12d147, - 0x2000c2, - 0x208e02, - 0x208e03, - 0x231103, - 0x2dd584, - 0x213ec3, - 0x217383, - 0x270203, - 0x21d283, - 0x208e03, - 0x231103, - 0x213ec3, - 0x208e83, - 0x21d283, - 0x259003, - 0x281ac3, - 0x211303, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x11243, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x208e83, - 0x21d283, - 0x259003, - 0x22a342, - 0x2000c1, - 0x2000c2, - 0x200201, - 0x336382, - 0x120648, - 0x21af05, - 0x200101, - 0x8e03, - 0x200d81, - 0x200501, - 0x201481, - 0x24a182, - 0x37ef44, - 0x24a183, - 0x200041, - 0x200801, - 0x200181, - 0x200701, - 0x2f87c7, - 0x342d8f, - 0x3024c6, - 0x2004c1, - 0x344c46, - 0x200d01, - 0x200581, - 0x3ce30e, - 0x2003c1, - 0x259003, - 0x201b81, - 0x243685, - 0x202542, - 0x3adc45, - 0x200401, - 0x200741, - 0x2007c1, - 0x2022c2, - 0x200081, - 0x201fc1, - 0x20a781, - 0x202cc1, - 0x201241, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x216cc3, - 0x208e03, - 0x213ec3, - 0x8ea48, - 0x270203, - 0x21d283, - 0x89a43, - 0x259003, - 0x14ebf48, - 0xe1c8, - 0xf8945, - 0x120648, - 0x14b83, - 0xf8945, - 0x135884, - 0x47904, - 0x14ebf4a, - 0x120648, - 0xe6143, - 0x208e03, - 0x231103, - 0x213ec3, - 0x21d283, - 0x259003, - 0x2038c3, - 0x120648, - 0x208e03, - 0x231103, - 0x2dd584, - 0x259003, - 0x27ee05, - 0x35c204, - 0x208e03, - 0x21d283, - 0x259003, - 0xa5f4a, - 0x15aa8a, - 0x115e04, - 0x11c906, - 0x208e02, - 0x208e03, - 0x22e409, - 0x231103, - 0x21acc9, - 0x213ec3, - 0x270203, - 0x21d283, - 0x7b844, - 0x14b83, - 0x259003, - 0x2f5348, - 0x23e087, - 0x2fc845, - 0x1c7008, - 0x1b6947, - 0x3ec0a, - 0x10930b, - 0x144e87, - 0x41188, - 0x111d8a, - 0x12c88, - 0x107609, - 0x25cc7, - 0x153a47, - 0x1270c8, - 0x1cc688, - 0x4288f, - 0x1541c5, - 0x1cc987, - 0x42346, - 0x4c1c7, - 0x10e886, - 0x58dc8, - 0x9bec6, - 0x15d087, - 0x126089, - 0x1b7347, - 0x105649, - 0xb92c9, - 0xc20c6, - 0xc4e48, - 0xc30c5, - 0x7beca, - 0xce908, - 0x98403, - 0xd9708, - 0x31307, - 0x74845, - 0x61390, - 0x4a83, - 0xe6143, - 0x125f07, - 0x27745, - 0xee808, - 0x69445, - 0xd3a03, - 0x1688, - 0x56146, - 0x184e49, - 0xab547, - 0x19310b, - 0x142844, - 0x1063c4, - 0x10d4cb, - 0x10da88, - 0x10e507, - 0xf8945, - 0x208e03, - 0x231103, - 0x3d0943, - 0x259003, - 0x202103, - 0x213ec3, - 0xe6143, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x87fcb, - 0x2000c2, - 0x208e02, - 0x259003, - 0x120648, - 0x2000c2, - 0x208e02, - 0x200382, - 0x2005c2, - 0x200d02, - 0x21d283, - 0x2003c2, - 0x2000c2, - 0x38d8c3, - 0x208e02, - 0x208e03, - 0x231103, - 0x200382, - 0x213ec3, - 0x217383, - 0x270203, - 0x2bf144, - 0x21d283, - 0x213443, - 0x14b83, - 0x259003, - 0x2fbf44, - 0x202043, - 0x213ec3, - 0x208e02, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x214b83, - 0x259003, - 0x3b9d47, - 0x208e03, - 0x20cd87, - 0x300c46, - 0x20ce43, - 0x217243, - 0x213ec3, - 0x203583, - 0x220a04, - 0x39cbc4, - 0x2eab46, - 0x20dd03, - 0x21d283, - 0x259003, - 0x27ee05, - 0x2ad7c4, - 0x2be803, - 0x20b103, - 0x2c9347, - 0x312745, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x259003, - 0x4df07, - 0x8f4c7, - 0x1a3e85, - 0x205042, - 0x249283, - 0x214a43, - 0x38d8c3, - 0x6c608e03, - 0x20f982, - 0x231103, - 0x204a03, - 0x213ec3, - 0x220a04, - 0x307c83, - 0x38ab83, - 0x270203, - 0x2bf144, - 0x6ca08dc2, - 0x21d283, - 0x259003, - 0x22f583, - 0x219fc3, - 0x22a342, - 0x202043, - 0x120648, - 0x213ec3, - 0x11243, - 0x32be04, - 0x38d8c3, - 0x208e02, - 0x208e03, - 0x233e84, - 0x231103, - 0x213ec3, - 0x220a04, - 0x217383, - 0x30ffc4, - 0x20ac44, - 0x2dbd86, - 0x2bf144, - 0x21d283, - 0x259003, - 0x216203, - 0x250606, - 0x3978b, - 0x35d46, - 0x11f20a, - 0x11434a, - 0x120648, - 0x26dd04, - 0x6de08e03, - 0x38d884, - 0x231103, - 0x257384, - 0x213ec3, - 0x2bd9c3, - 0x270203, - 0x21d283, - 0xe6143, - 0x259003, - 0xca143, - 0x3433cb, - 0x3bfe4a, - 0x3d13cc, - 0xe40c8, - 0x2000c2, - 0x208e02, - 0x200382, - 0x22bec5, - 0x220a04, - 0x202302, - 0x270203, - 0x20ac44, - 0x201402, - 0x2003c2, - 0x211302, - 0x22a342, - 0x18d8c3, - 0x48182, - 0x2b6789, - 0x322748, - 0x213d49, - 0x217989, - 0x22420a, - 0x3184ca, - 0x208002, - 0x342382, - 0x8e02, - 0x208e03, - 0x22a502, - 0x242786, - 0x36fd82, - 0x213ac2, - 0x30968e, - 0x21614e, - 0x280507, - 0x21d207, - 0x282742, - 0x231103, - 0x213ec3, - 0x22aa02, - 0x2005c2, - 0x171c3, - 0x23408f, - 0x242ac2, - 0x2ae947, - 0x32a8c7, - 0x2b57c7, - 0x2e2e0c, - 0x2eadcc, - 0x226304, - 0x25eb0a, - 0x216082, - 0x206f42, - 0x2bac44, - 0x200702, - 0x214502, - 0x2eb004, - 0x213542, - 0x204c82, - 0x21303, - 0x29bf47, - 0x23d0c5, - 0x211602, - 0x24c144, - 0x327182, - 0x2e3988, - 0x21d283, - 0x2050c8, - 0x204882, - 0x2264c5, - 0x399b86, - 0x259003, - 0x2059c2, - 0x2ef587, - 0x2542, - 0x25cb85, - 0x210a45, - 0x209cc2, - 0x20ed02, - 0x2bc84a, - 0x29048a, - 0x2701c2, - 0x29a684, - 0x203a42, - 0x244f08, - 0x210602, - 0x365a88, - 0x30a0c7, - 0x30a689, - 0x205082, - 0x30edc5, - 0x206045, - 0x2214cb, - 0x2cc38c, - 0x22a008, - 0x32cf88, - 0x229542, - 0x2a61c2, - 0x2000c2, - 0x120648, - 0x208e02, - 0x208e03, - 0x200382, - 0x201402, - 0x14b83, - 0x2003c2, - 0x259003, - 0x211302, - 0x2000c2, - 0xf8945, - 0x6f208e02, - 0x6f613ec3, - 0x221303, - 0x202302, - 0x21d283, - 0x3d2403, - 0x6fa59003, - 0x2ec903, - 0x282786, - 0x1611303, - 0xf8945, - 0x187e4b, - 0x120648, - 0x6ff87, - 0x6e607, - 0x129cc5, - 0xa87cd, - 0xa6b8a, - 0x902c7, - 0x2a784, - 0x2a7c3, - 0xbb9c4, - 0x70203c82, - 0x70604342, - 0x70a02842, - 0x70e00fc2, - 0x7120aac2, - 0x71600f82, - 0xeb207, - 0x71a08e02, - 0x71e02282, - 0x7221de02, - 0x72608a42, - 0x216143, - 0x26744, - 0x22ea43, - 0x72a11482, - 0x5df88, - 0x72e06502, - 0x4fc87, - 0x73200042, - 0x73603482, - 0x73a00182, - 0x73e00d42, - 0x7420ad02, - 0x746005c2, - 0x13db85, - 0x223e43, - 0x311844, - 0x74a00702, - 0x74e14882, - 0x75200e42, - 0xb074b, - 0x75602d82, - 0x75e4eb42, - 0x76202302, - 0x76600d02, - 0x76a26942, - 0x76e01942, - 0x77202382, - 0x7766cac2, - 0x77a08dc2, - 0x77e035c2, - 0x78201402, - 0x78604fc2, - 0x78a08342, - 0x78e14002, - 0xe5f84, - 0x33e783, - 0x79221882, - 0x79615d82, - 0x79a100c2, - 0x79e006c2, - 0x7a2003c2, - 0x7a60a282, - 0x88147, - 0x7aa03b02, - 0x7ae02e02, - 0x7b211302, - 0x7b616102, - 0xfe7cc, - 0x7ba0fec2, - 0x7be1ea02, - 0x7c203382, - 0x7c604b02, - 0x7ca05ec2, - 0x7ce0fcc2, - 0x7d206582, - 0x7d610dc2, - 0x7da76e82, - 0x7de77402, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x75b07c83, - 0x2230c3, - 0x39e544, - 0x322646, - 0x2fa443, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x3b8109, - 0x248182, - 0x3a2e83, - 0x2b95c3, - 0x395545, - 0x204a03, - 0x307c83, - 0x2230c3, - 0x2a4003, - 0x238043, - 0x3c5649, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x307c83, - 0x2230c3, - 0x248182, - 0x248182, - 0x307c83, - 0x2230c3, - 0x7e608e03, - 0x231103, - 0x217bc3, - 0x270203, - 0x21d283, - 0x14b83, - 0x259003, - 0x120648, - 0x208e02, - 0x208e03, - 0x21d283, - 0x259003, - 0x208e03, - 0x231103, - 0x213ec3, - 0x270203, - 0x21d283, - 0x14b83, - 0x259003, - 0x245a04, - 0x208e02, - 0x208e03, - 0x392503, - 0x231103, - 0x24ea84, - 0x3d0943, - 0x213ec3, - 0x220a04, - 0x217383, - 0x270203, - 0x21d283, - 0x259003, - 0x202203, - 0x2fc845, - 0x238043, - 0x202043, - 0x14b83, - 0x208e02, - 0x208e03, - 0x307c83, - 0x21d283, - 0x259003, - 0x2000c2, - 0x38d8c3, - 0x120648, - 0x208e03, - 0x231103, - 0x213ec3, - 0x22d806, - 0x220a04, - 0x217383, - 0x2bf144, - 0x21d283, - 0x259003, - 0x216203, - 0x208e03, - 0x231103, - 0x21d283, - 0x259003, - 0x145c187, - 0x7d87, - 0x208e03, - 0x35d46, - 0x231103, - 0x213ec3, - 0xe4dc6, - 0x21d283, - 0x259003, - 0x32a0c8, - 0x32cdc9, - 0x33d349, - 0x344508, - 0x39bd08, - 0x39bd09, - 0x31de8a, - 0x3586ca, - 0x3977ca, - 0x39d78a, - 0x3bfe4a, - 0x3cb70b, - 0x2466cd, - 0x361b0f, - 0x272b90, - 0x35b30d, - 0x3761cc, - 0x39d4cb, - 0x6e808, - 0xfa948, - 0x100ec5, - 0xcd4c5, - 0x2000c2, - 0x312585, - 0x206083, - 0x81e08e02, - 0x231103, - 0x213ec3, - 0x37f707, - 0x2450c3, - 0x270203, - 0x21d283, - 0x24fc43, - 0x2090c3, - 0x214b83, - 0x259003, - 0x25c906, - 0x2022c2, - 0x202043, - 0x120648, - 0x2000c2, - 0x38d8c3, - 0x208e02, - 0x208e03, - 0x231103, - 0x213ec3, - 0x220a04, - 0x270203, - 0x21d283, - 0x259003, - 0x211303, - 0x18fb04, - 0x14f8106, - 0x2000c2, - 0x208e02, - 0x213ec3, - 0x270203, - 0x259003, -} - -// children is the list of nodes' children, the parent's wildcard bit and the -// parent's node type. If a node has no children then their children index -// will be in the range [0, 6), depending on the wildcard bit and node type. -// -// The layout within the uint32, from MSB to LSB, is: -// [ 1 bits] unused -// [ 1 bits] wildcard bit -// [ 2 bits] node type -// [14 bits] high nodes index (exclusive) of children -// [14 bits] low nodes index (inclusive) of children -var children = [...]uint32{ - 0x0, - 0x10000000, - 0x20000000, - 0x40000000, - 0x50000000, - 0x60000000, - 0x1864613, - 0x1868619, - 0x186c61a, - 0x189061b, - 0x19ec624, - 0x1a0467b, - 0x1a18681, - 0x1a2c686, - 0x1a4c68b, - 0x1a50693, - 0x1a68694, - 0x1a6c69a, - 0x1a9469b, - 0x1a986a5, - 0x1ab06a6, - 0x1ab46ac, - 0x1ab86ad, - 0x1af46ae, - 0x1af86bd, - 0x61b006be, - 0x21b086c0, - 0x1b506c2, - 0x1b546d4, - 0x1b746d5, - 0x1b886dd, - 0x1b8c6e2, - 0x1bbc6e3, - 0x1bd86ef, - 0x1c006f6, - 0x1c10700, - 0x1c14704, - 0x1cac705, - 0x1cc072b, - 0x1cd4730, - 0x1d04735, - 0x1d14741, - 0x1d28745, - 0x1dcc74a, - 0x1fc8773, - 0x1fcc7f2, - 0x20387f3, - 0x20a480e, - 0x20bc829, - 0x20d082f, - 0x20d8834, - 0x20ec836, - 0x20f083b, - 0x210c83c, - 0x2158843, - 0x2174856, - 0x217885d, - 0x217c85e, - 0x21a085f, - 0x21dc868, - 0x621e0877, - 0x21f8878, - 0x221087e, - 0x2218884, - 0x2228886, - 0x22d888a, - 0x22dc8b6, - 0x222ec8b7, - 0x222f08bb, - 0x222f48bc, - 0x23388bd, - 0x233c8ce, - 0x27f88cf, - 0x228a09fe, - 0x228a4a28, - 0x228a8a29, - 0x228b4a2a, - 0x228b8a2d, - 0x228c4a2e, - 0x228c8a31, - 0x228cca32, - 0x228d0a33, - 0x228d4a34, - 0x228d8a35, - 0x228e4a36, - 0x228e8a39, - 0x228f4a3a, - 0x228f8a3d, - 0x228fca3e, - 0x22900a3f, - 0x2290ca40, - 0x22910a43, - 0x2291ca44, - 0x22920a47, - 0x22924a48, - 0x22928a49, - 0x292ca4a, - 0x22930a4b, - 0x2293ca4c, - 0x22940a4f, - 0x2948a50, - 0x298ca52, - 0x229aca63, - 0x229b0a6b, - 0x229b4a6c, - 0x229b8a6d, - 0x29bca6e, - 0x229c0a6f, - 0x29c8a70, - 0x29cca72, - 0x29d0a73, - 0x29eca74, - 0x2a04a7b, - 0x2a08a81, - 0x2a18a82, - 0x2a24a86, - 0x2a58a89, - 0x2a5ca96, - 0x2a74a97, - 0x22a7ca9d, - 0x22a80a9f, - 0x22a88aa0, - 0x2b60aa2, - 0x22b64ad8, - 0x2b6cad9, - 0x2b70adb, - 0x22b74adc, - 0x2b78add, - 0x2b90ade, - 0x2ba4ae4, - 0x2bccae9, - 0x2becaf3, - 0x2c1cafb, - 0x2c44b07, - 0x2c48b11, - 0x2c6cb12, - 0x2c70b1b, - 0x2c84b1c, - 0x2c88b21, - 0x2c8cb22, - 0x2cacb23, - 0x2cc8b2b, - 0x2cccb32, - 0x22cd0b33, - 0x2cd4b34, - 0x2cd8b35, - 0x2ce8b36, - 0x2cecb3a, - 0x2d64b3b, - 0x2d68b59, - 0x2d6cb5a, - 0x2d8cb5b, - 0x2d9cb63, - 0x2db0b67, - 0x2dc8b6c, - 0x2de0b72, - 0x2df8b78, - 0x2dfcb7e, - 0x2e14b7f, - 0x2e30b85, - 0x2e50b8c, - 0x2e70b94, - 0x2e8cb9c, - 0x2eecba3, - 0x2f08bbb, - 0x2f18bc2, - 0x2f1cbc6, - 0x2f30bc7, - 0x2f74bcc, - 0x2ff4bdd, - 0x3024bfd, - 0x3028c09, - 0x3034c0a, - 0x3054c0d, - 0x3058c15, - 0x307cc16, - 0x3084c1f, - 0x30c0c21, - 0x3110c30, - 0x3114c44, - 0x319cc45, - 0x31a0c67, - 0x231a4c68, - 0x231a8c69, - 0x231acc6a, - 0x231bcc6b, - 0x231c0c6f, - 0x231c4c70, - 0x231c8c71, - 0x231ccc72, - 0x31e4c73, - 0x3208c79, - 0x3228c82, - 0x3890c8a, - 0x389ce24, - 0x38bce27, - 0x3a78e2f, - 0x3b48e9e, - 0x3bb8ed2, - 0x3c10eee, - 0x3cf8f04, - 0x3d50f3e, - 0x3d8cf54, - 0x3e88f63, - 0x3f54fa2, - 0x3fecfd5, - 0x407cffb, - 0x40e101f, - 0x4319038, - 0x43d10c6, - 0x449d0f4, - 0x44e9127, - 0x457113a, - 0x45ad15c, - 0x45fd16b, - 0x467517f, - 0x6467919d, - 0x6467d19e, - 0x6468119f, - 0x46fd1a0, - 0x47591bf, - 0x47d51d6, - 0x484d1f5, - 0x48cd213, - 0x4939233, - 0x4a6524e, - 0x4abd299, - 0x64ac12af, - 0x4b592b0, - 0x4be12d6, - 0x4c2d2f8, - 0x4c9530b, - 0x4d3d325, - 0x4e0534f, - 0x4e6d381, - 0x4f8139b, - 0x64f853e0, - 0x64f893e1, - 0x4fe53e2, - 0x50413f9, - 0x50d1410, - 0x514d434, - 0x5191453, - 0x5275464, - 0x52a949d, - 0x53094aa, - 0x537d4c2, - 0x54054df, - 0x5445501, - 0x54b5511, - 0x654b952d, - 0x54e152e, - 0x54e5538, - 0x54fd539, - 0x551953f, - 0x555d546, - 0x556d557, - 0x558555b, - 0x55fd561, - 0x560557f, - 0x5619581, - 0x5635586, - 0x566158d, - 0x5665598, - 0x566d599, - 0x568159b, - 0x56a15a0, - 0x56ad5a8, - 0x56b55ab, - 0x56f15ad, - 0x57055bc, - 0x570d5c1, - 0x57195c3, - 0x57215c6, - 0x57455c8, - 0x57695d1, - 0x57815da, - 0x57855e0, - 0x578d5e1, - 0x57915e3, - 0x580d5e4, - 0x5811603, - 0x5815604, - 0x5839605, - 0x585d60e, - 0x5879617, - 0x588d61e, - 0x58a1623, - 0x58a9628, - 0x58b162a, - 0x58c562c, - 0x58d5631, - 0x58d9635, - 0x58f5636, - 0x618563d, - 0x61bd861, - 0x61e986f, - 0x620587a, - 0x6225881, - 0x6245889, - 0x6289891, - 0x62918a2, - 0x262958a4, - 0x262998a5, - 0x62a18a6, - 0x64498a8, - 0x2644d912, - 0x2645d913, - 0x26465917, - 0x26471919, - 0x647591c, - 0x647991d, - 0x64a191e, - 0x64c9928, - 0x64cd932, - 0x6505933, - 0x6525941, - 0x707d949, - 0x7081c1f, - 0x7085c20, - 0x27089c21, - 0x708dc22, - 0x27091c23, - 0x7095c24, - 0x270a1c25, - 0x70a5c28, - 0x70a9c29, - 0x270adc2a, - 0x70b1c2b, - 0x270b9c2c, - 0x70bdc2e, - 0x70c1c2f, - 0x270d1c30, - 0x70d5c34, - 0x70d9c35, - 0x70ddc36, - 0x70e1c37, - 0x270e5c38, - 0x70e9c39, - 0x70edc3a, - 0x70f1c3b, - 0x70f5c3c, - 0x270fdc3d, - 0x7101c3f, - 0x7105c40, - 0x7109c41, - 0x2710dc42, - 0x7111c43, - 0x27119c44, - 0x2711dc46, - 0x7139c47, - 0x7149c4e, - 0x718dc52, - 0x7191c63, - 0x71b5c64, - 0x71b9c6d, - 0x71bdc6e, - 0x7365c6f, - 0x27369cd9, - 0x27371cda, - 0x27375cdc, - 0x27379cdd, - 0x7381cde, - 0x745dce0, - 0x27469d17, - 0x2746dd1a, - 0x27471d1b, - 0x27475d1c, - 0x7479d1d, - 0x74a5d1e, - 0x74a9d29, - 0x74cdd2a, - 0x74d9d33, - 0x74f9d36, - 0x74fdd3e, - 0x7535d3f, - 0x77cdd4d, - 0x7889df3, - 0x788de22, - 0x78a1e23, - 0x78d5e28, - 0x790de35, - 0x27911e43, - 0x792de44, - 0x7955e4b, - 0x7959e55, - 0x797de56, - 0x7999e5f, - 0x79c1e66, - 0x79d1e70, - 0x79d5e74, - 0x79d9e75, - 0x7a11e76, - 0x7a1de84, - 0x7a41e87, - 0x7ac1e90, - 0x27ac5eb0, - 0x7ad5eb1, - 0x7addeb5, - 0x7b01eb7, - 0x7b21ec0, - 0x7b35ec8, - 0x7b49ecd, - 0x7b4ded2, - 0x7b6ded3, - 0x7c11edb, - 0x7c2df04, - 0x7c51f0b, - 0x7c55f14, - 0x7c5df15, - 0x7c6df17, - 0x7c75f1b, - 0x7c89f1d, - 0x7ca9f22, - 0x7cb5f2a, - 0x7cc5f2d, - 0x7cfdf31, - 0x7dd1f3f, - 0x7dd5f74, - 0x7de9f75, - 0x7df1f7a, - 0x7e09f7c, - 0x7e0df82, - 0x7e19f83, - 0x7e1df86, - 0x7e39f87, - 0x7e79f8e, - 0x7e7df9e, - 0x7e9df9f, - 0x7eedfa7, - 0x7f09fbb, - 0x7f11fc2, - 0x7f65fc4, - 0x7f69fd9, - 0x7f6dfda, - 0x7f71fdb, - 0x7fb5fdc, - 0x7fc5fed, - 0x8005ff1, - 0x800a001, - 0x803a002, - 0x818200e, - 0x81aa060, - 0x81da06a, - 0x81f6076, - 0x81fe07d, - 0x820a07f, - 0x831e082, - 0x832a0c7, - 0x83360ca, - 0x83420cd, - 0x834e0d0, - 0x835a0d3, - 0x83660d6, - 0x83720d9, - 0x837e0dc, - 0x838a0df, - 0x83960e2, - 0x83a20e5, - 0x83ae0e8, - 0x83ba0eb, - 0x83c20ee, - 0x83ce0f0, - 0x83da0f3, - 0x83e60f6, - 0x83f20f9, - 0x83fe0fc, - 0x840a0ff, - 0x8416102, - 0x8422105, - 0x842e108, - 0x843a10b, - 0x844610e, - 0x8472111, - 0x847e11c, - 0x848a11f, - 0x8496122, - 0x84a2125, - 0x84ae128, - 0x84b612b, - 0x84c212d, - 0x84ce130, - 0x84da133, - 0x84e6136, - 0x84f2139, - 0x84fe13c, - 0x850a13f, - 0x8516142, - 0x8522145, - 0x852e148, - 0x853a14b, - 0x854614e, - 0x8552151, - 0x855a154, - 0x8566156, - 0x8572159, - 0x857e15c, - 0x858a15f, - 0x8596162, - 0x85a2165, - 0x85ae168, - 0x85ba16b, - 0x85be16e, - 0x85ca16f, - 0x85e6172, - 0x85ea179, - 0x85fa17a, - 0x861617e, - 0x865a185, - 0x865e196, - 0x8672197, - 0x86a619c, - 0x86b61a9, - 0x86da1ad, - 0x86f21b6, - 0x870a1bc, - 0x87221c2, - 0x87321c8, - 0x287761cc, - 0x877a1dd, - 0x87a61de, - 0x87ae1e9, - 0x87c21eb, -} - -// max children 522 (capacity 1023) -// max text offset 29878 (capacity 32767) -// max text length 36 (capacity 63) -// max hi 8688 (capacity 16383) -// max lo 8683 (capacity 16383) diff --git a/deps/golang.org/x/net/publicsuffix/table_test.go b/deps/golang.org/x/net/publicsuffix/table_test.go deleted file mode 100644 index c05b8f25d..000000000 --- a/deps/golang.org/x/net/publicsuffix/table_test.go +++ /dev/null @@ -1,17308 +0,0 @@ -// generated by go run gen.go; DO NOT EDIT - -package publicsuffix - -var rules = [...]string{ - "ac", - "com.ac", - "edu.ac", - "gov.ac", - "net.ac", - "mil.ac", - "org.ac", - "ad", - "nom.ad", - "ae", - "co.ae", - "net.ae", - "org.ae", - "sch.ae", - "ac.ae", - "gov.ae", - "mil.ae", - "aero", - "accident-investigation.aero", - "accident-prevention.aero", - "aerobatic.aero", - "aeroclub.aero", - "aerodrome.aero", - "agents.aero", - "aircraft.aero", - "airline.aero", - "airport.aero", - "air-surveillance.aero", - "airtraffic.aero", - "air-traffic-control.aero", - "ambulance.aero", - "amusement.aero", - "association.aero", - "author.aero", - "ballooning.aero", - "broker.aero", - "caa.aero", - "cargo.aero", - "catering.aero", - "certification.aero", - "championship.aero", - "charter.aero", - "civilaviation.aero", - "club.aero", - "conference.aero", - "consultant.aero", - "consulting.aero", - "control.aero", - "council.aero", - "crew.aero", - "design.aero", - "dgca.aero", - "educator.aero", - "emergency.aero", - "engine.aero", - "engineer.aero", - "entertainment.aero", - "equipment.aero", - "exchange.aero", - "express.aero", - "federation.aero", - "flight.aero", - "freight.aero", - "fuel.aero", - "gliding.aero", - "government.aero", - "groundhandling.aero", - "group.aero", - "hanggliding.aero", - "homebuilt.aero", - "insurance.aero", - "journal.aero", - "journalist.aero", - "leasing.aero", - "logistics.aero", - "magazine.aero", - "maintenance.aero", - "media.aero", - "microlight.aero", - "modelling.aero", - "navigation.aero", - "parachuting.aero", - "paragliding.aero", - "passenger-association.aero", - "pilot.aero", - "press.aero", - "production.aero", - "recreation.aero", - "repbody.aero", - "res.aero", - "research.aero", - "rotorcraft.aero", - "safety.aero", - "scientist.aero", - "services.aero", - "show.aero", - "skydiving.aero", - "software.aero", - "student.aero", - "trader.aero", - "trading.aero", - "trainer.aero", - "union.aero", - "workinggroup.aero", - "works.aero", - "af", - "gov.af", - "com.af", - "org.af", - "net.af", - "edu.af", - "ag", - "com.ag", - "org.ag", - "net.ag", - "co.ag", - "nom.ag", - "ai", - "off.ai", - "com.ai", - "net.ai", - "org.ai", - "al", - "com.al", - "edu.al", - "gov.al", - "mil.al", - "net.al", - "org.al", - "am", - "ao", - "ed.ao", - "gv.ao", - "og.ao", - "co.ao", - "pb.ao", - "it.ao", - "aq", - "ar", - "com.ar", - "edu.ar", - "gob.ar", - "gov.ar", - "int.ar", - "mil.ar", - "musica.ar", - "net.ar", - "org.ar", - "tur.ar", - "arpa", - "e164.arpa", - "in-addr.arpa", - "ip6.arpa", - "iris.arpa", - "uri.arpa", - "urn.arpa", - "as", - "gov.as", - "asia", - "at", - "ac.at", - "co.at", - "gv.at", - "or.at", - "au", - "com.au", - "net.au", - "org.au", - "edu.au", - "gov.au", - "asn.au", - "id.au", - "info.au", - "conf.au", - "oz.au", - "act.au", - "nsw.au", - "nt.au", - "qld.au", - "sa.au", - "tas.au", - "vic.au", - "wa.au", - "act.edu.au", - "nsw.edu.au", - "nt.edu.au", - "qld.edu.au", - "sa.edu.au", - "tas.edu.au", - "vic.edu.au", - "wa.edu.au", - "qld.gov.au", - "sa.gov.au", - "tas.gov.au", - "vic.gov.au", - "wa.gov.au", - "aw", - "com.aw", - "ax", - "az", - "com.az", - "net.az", - "int.az", - "gov.az", - "org.az", - "edu.az", - "info.az", - "pp.az", - "mil.az", - "name.az", - "pro.az", - "biz.az", - "ba", - "com.ba", - "edu.ba", - "gov.ba", - "mil.ba", - "net.ba", - "org.ba", - "bb", - "biz.bb", - "co.bb", - "com.bb", - "edu.bb", - "gov.bb", - "info.bb", - "net.bb", - "org.bb", - "store.bb", - "tv.bb", - "*.bd", - "be", - "ac.be", - "bf", - "gov.bf", - "bg", - "a.bg", - "b.bg", - "c.bg", - "d.bg", - "e.bg", - "f.bg", - "g.bg", - "h.bg", - "i.bg", - "j.bg", - "k.bg", - "l.bg", - "m.bg", - "n.bg", - "o.bg", - "p.bg", - "q.bg", - "r.bg", - "s.bg", - "t.bg", - "u.bg", - "v.bg", - "w.bg", - "x.bg", - "y.bg", - "z.bg", - "0.bg", - "1.bg", - "2.bg", - "3.bg", - "4.bg", - "5.bg", - "6.bg", - "7.bg", - "8.bg", - "9.bg", - "bh", - "com.bh", - "edu.bh", - "net.bh", - "org.bh", - "gov.bh", - "bi", - "co.bi", - "com.bi", - "edu.bi", - "or.bi", - "org.bi", - "biz", - "bj", - "asso.bj", - "barreau.bj", - "gouv.bj", - "bm", - "com.bm", - "edu.bm", - "gov.bm", - "net.bm", - "org.bm", - "*.bn", - "bo", - "com.bo", - "edu.bo", - "gob.bo", - "int.bo", - "org.bo", - "net.bo", - "mil.bo", - "tv.bo", - "web.bo", - "academia.bo", - "agro.bo", - "arte.bo", - "blog.bo", - "bolivia.bo", - "ciencia.bo", - "cooperativa.bo", - "democracia.bo", - "deporte.bo", - "ecologia.bo", - "economia.bo", - "empresa.bo", - "indigena.bo", - "industria.bo", - "info.bo", - "medicina.bo", - "movimiento.bo", - "musica.bo", - "natural.bo", - "nombre.bo", - "noticias.bo", - "patria.bo", - "politica.bo", - "profesional.bo", - "plurinacional.bo", - "pueblo.bo", - "revista.bo", - "salud.bo", - "tecnologia.bo", - "tksat.bo", - "transporte.bo", - "wiki.bo", - "br", - "9guacu.br", - "abc.br", - "adm.br", - "adv.br", - "agr.br", - "aju.br", - "am.br", - "anani.br", - "aparecida.br", - "arq.br", - "art.br", - "ato.br", - "b.br", - "barueri.br", - "belem.br", - "bhz.br", - "bio.br", - "blog.br", - "bmd.br", - "boavista.br", - "bsb.br", - "campinagrande.br", - "campinas.br", - "caxias.br", - "cim.br", - "cng.br", - "cnt.br", - "com.br", - "contagem.br", - "coop.br", - "cri.br", - "cuiaba.br", - "curitiba.br", - "def.br", - "ecn.br", - "eco.br", - "edu.br", - "emp.br", - "eng.br", - "esp.br", - "etc.br", - "eti.br", - "far.br", - "feira.br", - "flog.br", - "floripa.br", - "fm.br", - "fnd.br", - "fortal.br", - "fot.br", - "foz.br", - "fst.br", - "g12.br", - "ggf.br", - "goiania.br", - "gov.br", - "ac.gov.br", - "al.gov.br", - "am.gov.br", - "ap.gov.br", - "ba.gov.br", - "ce.gov.br", - "df.gov.br", - "es.gov.br", - "go.gov.br", - "ma.gov.br", - "mg.gov.br", - "ms.gov.br", - "mt.gov.br", - "pa.gov.br", - "pb.gov.br", - "pe.gov.br", - "pi.gov.br", - "pr.gov.br", - "rj.gov.br", - "rn.gov.br", - "ro.gov.br", - "rr.gov.br", - "rs.gov.br", - "sc.gov.br", - "se.gov.br", - "sp.gov.br", - "to.gov.br", - "gru.br", - "imb.br", - "ind.br", - "inf.br", - "jab.br", - "jampa.br", - "jdf.br", - "joinville.br", - "jor.br", - "jus.br", - "leg.br", - "lel.br", - "londrina.br", - "macapa.br", - "maceio.br", - "manaus.br", - "maringa.br", - "mat.br", - "med.br", - "mil.br", - "morena.br", - "mp.br", - "mus.br", - "natal.br", - "net.br", - "niteroi.br", - "*.nom.br", - "not.br", - "ntr.br", - "odo.br", - "org.br", - "osasco.br", - "palmas.br", - "poa.br", - "ppg.br", - "pro.br", - "psc.br", - "psi.br", - "pvh.br", - "qsl.br", - "radio.br", - "rec.br", - "recife.br", - "ribeirao.br", - "rio.br", - "riobranco.br", - "riopreto.br", - "salvador.br", - "sampa.br", - "santamaria.br", - "santoandre.br", - "saobernardo.br", - "saogonca.br", - "sjc.br", - "slg.br", - "slz.br", - "sorocaba.br", - "srv.br", - "taxi.br", - "teo.br", - "the.br", - "tmp.br", - "trd.br", - "tur.br", - "tv.br", - "udi.br", - "vet.br", - "vix.br", - "vlog.br", - "wiki.br", - "zlg.br", - "bs", - "com.bs", - "net.bs", - "org.bs", - "edu.bs", - "gov.bs", - "bt", - "com.bt", - "edu.bt", - "gov.bt", - "net.bt", - "org.bt", - "bv", - "bw", - "co.bw", - "org.bw", - "by", - "gov.by", - "mil.by", - "com.by", - "of.by", - "bz", - "com.bz", - "net.bz", - "org.bz", - "edu.bz", - "gov.bz", - "ca", - "ab.ca", - "bc.ca", - "mb.ca", - "nb.ca", - "nf.ca", - "nl.ca", - "ns.ca", - "nt.ca", - "nu.ca", - "on.ca", - "pe.ca", - "qc.ca", - "sk.ca", - "yk.ca", - "gc.ca", - "cat", - "cc", - "cd", - "gov.cd", - "cf", - "cg", - "ch", - "ci", - "org.ci", - "or.ci", - "com.ci", - "co.ci", - "edu.ci", - "ed.ci", - "ac.ci", - "net.ci", - "go.ci", - "asso.ci", - "xn--aroport-bya.ci", - "int.ci", - "presse.ci", - "md.ci", - "gouv.ci", - "*.ck", - "!www.ck", - "cl", - "gov.cl", - "gob.cl", - "co.cl", - "mil.cl", - "cm", - "co.cm", - "com.cm", - "gov.cm", - "net.cm", - "cn", - "ac.cn", - "com.cn", - "edu.cn", - "gov.cn", - "net.cn", - "org.cn", - "mil.cn", - "xn--55qx5d.cn", - "xn--io0a7i.cn", - "xn--od0alg.cn", - "ah.cn", - "bj.cn", - "cq.cn", - "fj.cn", - "gd.cn", - "gs.cn", - "gz.cn", - "gx.cn", - "ha.cn", - "hb.cn", - "he.cn", - "hi.cn", - "hl.cn", - "hn.cn", - "jl.cn", - "js.cn", - "jx.cn", - "ln.cn", - "nm.cn", - "nx.cn", - "qh.cn", - "sc.cn", - "sd.cn", - "sh.cn", - "sn.cn", - "sx.cn", - "tj.cn", - "xj.cn", - "xz.cn", - "yn.cn", - "zj.cn", - "hk.cn", - "mo.cn", - "tw.cn", - "co", - "arts.co", - "com.co", - "edu.co", - "firm.co", - "gov.co", - "info.co", - "int.co", - "mil.co", - "net.co", - "nom.co", - "org.co", - "rec.co", - "web.co", - "com", - "coop", - "cr", - "ac.cr", - "co.cr", - "ed.cr", - "fi.cr", - "go.cr", - "or.cr", - "sa.cr", - "cu", - "com.cu", - "edu.cu", - "org.cu", - "net.cu", - "gov.cu", - "inf.cu", - "cv", - "cw", - "com.cw", - "edu.cw", - "net.cw", - "org.cw", - "cx", - "gov.cx", - "cy", - "ac.cy", - "biz.cy", - "com.cy", - "ekloges.cy", - "gov.cy", - "ltd.cy", - "name.cy", - "net.cy", - "org.cy", - "parliament.cy", - "press.cy", - "pro.cy", - "tm.cy", - "cz", - "de", - "dj", - "dk", - "dm", - "com.dm", - "net.dm", - "org.dm", - "edu.dm", - "gov.dm", - "do", - "art.do", - "com.do", - "edu.do", - "gob.do", - "gov.do", - "mil.do", - "net.do", - "org.do", - "sld.do", - "web.do", - "dz", - "com.dz", - "org.dz", - "net.dz", - "gov.dz", - "edu.dz", - "asso.dz", - "pol.dz", - "art.dz", - "ec", - "com.ec", - "info.ec", - "net.ec", - "fin.ec", - "k12.ec", - "med.ec", - "pro.ec", - "org.ec", - "edu.ec", - "gov.ec", - "gob.ec", - "mil.ec", - "edu", - "ee", - "edu.ee", - "gov.ee", - "riik.ee", - "lib.ee", - "med.ee", - "com.ee", - "pri.ee", - "aip.ee", - "org.ee", - "fie.ee", - "eg", - "com.eg", - "edu.eg", - "eun.eg", - "gov.eg", - "mil.eg", - "name.eg", - "net.eg", - "org.eg", - "sci.eg", - "*.er", - "es", - "com.es", - "nom.es", - "org.es", - "gob.es", - "edu.es", - "et", - "com.et", - "gov.et", - "org.et", - "edu.et", - "biz.et", - "name.et", - "info.et", - "net.et", - "eu", - "fi", - "aland.fi", - "*.fj", - "*.fk", - "fm", - "fo", - "fr", - "com.fr", - "asso.fr", - "nom.fr", - "prd.fr", - "presse.fr", - "tm.fr", - "aeroport.fr", - "assedic.fr", - "avocat.fr", - "avoues.fr", - "cci.fr", - "chambagri.fr", - "chirurgiens-dentistes.fr", - "experts-comptables.fr", - "geometre-expert.fr", - "gouv.fr", - "greta.fr", - "huissier-justice.fr", - "medecin.fr", - "notaires.fr", - "pharmacien.fr", - "port.fr", - "veterinaire.fr", - "ga", - "gb", - "gd", - "ge", - "com.ge", - "edu.ge", - "gov.ge", - "org.ge", - "mil.ge", - "net.ge", - "pvt.ge", - "gf", - "gg", - "co.gg", - "net.gg", - "org.gg", - "gh", - "com.gh", - "edu.gh", - "gov.gh", - "org.gh", - "mil.gh", - "gi", - "com.gi", - "ltd.gi", - "gov.gi", - "mod.gi", - "edu.gi", - "org.gi", - "gl", - "co.gl", - "com.gl", - "edu.gl", - "net.gl", - "org.gl", - "gm", - "gn", - "ac.gn", - "com.gn", - "edu.gn", - "gov.gn", - "org.gn", - "net.gn", - "gov", - "gp", - "com.gp", - "net.gp", - "mobi.gp", - "edu.gp", - "org.gp", - "asso.gp", - "gq", - "gr", - "com.gr", - "edu.gr", - "net.gr", - "org.gr", - "gov.gr", - "gs", - "gt", - "com.gt", - "edu.gt", - "gob.gt", - "ind.gt", - "mil.gt", - "net.gt", - "org.gt", - "gu", - "com.gu", - "edu.gu", - "gov.gu", - "guam.gu", - "info.gu", - "net.gu", - "org.gu", - "web.gu", - "gw", - "gy", - "co.gy", - "com.gy", - "edu.gy", - "gov.gy", - "net.gy", - "org.gy", - "hk", - "com.hk", - "edu.hk", - "gov.hk", - "idv.hk", - "net.hk", - "org.hk", - "xn--55qx5d.hk", - "xn--wcvs22d.hk", - "xn--lcvr32d.hk", - "xn--mxtq1m.hk", - "xn--gmqw5a.hk", - "xn--ciqpn.hk", - "xn--gmq050i.hk", - "xn--zf0avx.hk", - "xn--io0a7i.hk", - "xn--mk0axi.hk", - "xn--od0alg.hk", - "xn--od0aq3b.hk", - "xn--tn0ag.hk", - "xn--uc0atv.hk", - "xn--uc0ay4a.hk", - "hm", - "hn", - "com.hn", - "edu.hn", - "org.hn", - "net.hn", - "mil.hn", - "gob.hn", - "hr", - "iz.hr", - "from.hr", - "name.hr", - "com.hr", - "ht", - "com.ht", - "shop.ht", - "firm.ht", - "info.ht", - "adult.ht", - "net.ht", - "pro.ht", - "org.ht", - "med.ht", - "art.ht", - "coop.ht", - "pol.ht", - "asso.ht", - "edu.ht", - "rel.ht", - "gouv.ht", - "perso.ht", - "hu", - "co.hu", - "info.hu", - "org.hu", - "priv.hu", - "sport.hu", - "tm.hu", - "2000.hu", - "agrar.hu", - "bolt.hu", - "casino.hu", - "city.hu", - "erotica.hu", - "erotika.hu", - "film.hu", - "forum.hu", - "games.hu", - "hotel.hu", - "ingatlan.hu", - "jogasz.hu", - "konyvelo.hu", - "lakas.hu", - "media.hu", - "news.hu", - "reklam.hu", - "sex.hu", - "shop.hu", - "suli.hu", - "szex.hu", - "tozsde.hu", - "utazas.hu", - "video.hu", - "id", - "ac.id", - "biz.id", - "co.id", - "desa.id", - "go.id", - "mil.id", - "my.id", - "net.id", - "or.id", - "sch.id", - "web.id", - "ie", - "gov.ie", - "il", - "ac.il", - "co.il", - "gov.il", - "idf.il", - "k12.il", - "muni.il", - "net.il", - "org.il", - "im", - "ac.im", - "co.im", - "com.im", - "ltd.co.im", - "net.im", - "org.im", - "plc.co.im", - "tt.im", - "tv.im", - "in", - "co.in", - "firm.in", - "net.in", - "org.in", - "gen.in", - "ind.in", - "nic.in", - "ac.in", - "edu.in", - "res.in", - "gov.in", - "mil.in", - "info", - "int", - "eu.int", - "io", - "com.io", - "iq", - "gov.iq", - "edu.iq", - "mil.iq", - "com.iq", - "org.iq", - "net.iq", - "ir", - "ac.ir", - "co.ir", - "gov.ir", - "id.ir", - "net.ir", - "org.ir", - "sch.ir", - "xn--mgba3a4f16a.ir", - "xn--mgba3a4fra.ir", - "is", - "net.is", - "com.is", - "edu.is", - "gov.is", - "org.is", - "int.is", - "it", - "gov.it", - "edu.it", - "abr.it", - "abruzzo.it", - "aosta-valley.it", - "aostavalley.it", - "bas.it", - "basilicata.it", - "cal.it", - "calabria.it", - "cam.it", - "campania.it", - "emilia-romagna.it", - "emiliaromagna.it", - "emr.it", - "friuli-v-giulia.it", - "friuli-ve-giulia.it", - "friuli-vegiulia.it", - "friuli-venezia-giulia.it", - "friuli-veneziagiulia.it", - "friuli-vgiulia.it", - "friuliv-giulia.it", - "friulive-giulia.it", - "friulivegiulia.it", - "friulivenezia-giulia.it", - "friuliveneziagiulia.it", - "friulivgiulia.it", - "fvg.it", - "laz.it", - "lazio.it", - "lig.it", - "liguria.it", - "lom.it", - "lombardia.it", - "lombardy.it", - "lucania.it", - "mar.it", - "marche.it", - "mol.it", - "molise.it", - "piedmont.it", - "piemonte.it", - "pmn.it", - "pug.it", - "puglia.it", - "sar.it", - "sardegna.it", - "sardinia.it", - "sic.it", - "sicilia.it", - "sicily.it", - "taa.it", - "tos.it", - "toscana.it", - "trentin-sud-tirol.it", - "xn--trentin-sud-tirol-tsj.it", - "trentin-sudtirol.it", - "xn--trentin-sudtirol-b9i.it", - "trentin-sued-tirol.it", - "trentin-suedtirol.it", - "trentino-a-adige.it", - "trentino-aadige.it", - "trentino-alto-adige.it", - "trentino-altoadige.it", - "trentino-s-tirol.it", - "trentino-stirol.it", - "trentino-sud-tirol.it", - "xn--trentino-sud-tirol-dck.it", - "trentino-sudtirol.it", - "xn--trentino-sudtirol-usj.it", - "trentino-sued-tirol.it", - "trentino-suedtirol.it", - "trentino.it", - "trentinoa-adige.it", - "trentinoaadige.it", - "trentinoalto-adige.it", - "trentinoaltoadige.it", - "trentinos-tirol.it", - "trentinostirol.it", - "trentinosud-tirol.it", - "xn--trentinosud-tirol-tsj.it", - "trentinosudtirol.it", - "xn--trentinosudtirol-b9i.it", - "trentinosued-tirol.it", - "trentinosuedtirol.it", - "trentinsud-tirol.it", - "xn--trentinsud-tirol-98i.it", - "trentinsudtirol.it", - "xn--trentinsudtirol-rqi.it", - "trentinsued-tirol.it", - "trentinsuedtirol.it", - "tuscany.it", - "umb.it", - "umbria.it", - "val-d-aosta.it", - "val-daosta.it", - "vald-aosta.it", - "valdaosta.it", - "valle-aosta.it", - "valle-d-aosta.it", - "valle-daosta.it", - "valleaosta.it", - "valled-aosta.it", - "valledaosta.it", - "vallee-aoste.it", - "xn--vallee-aoste-i2g.it", - "vallee-d-aoste.it", - "xn--vallee-d-aoste-43h.it", - "valleeaoste.it", - "xn--valleeaoste-6jg.it", - "valleedaoste.it", - "xn--valleedaoste-i2g.it", - "vao.it", - "vda.it", - "ven.it", - "veneto.it", - "ag.it", - "agrigento.it", - "al.it", - "alessandria.it", - "alto-adige.it", - "altoadige.it", - "an.it", - "ancona.it", - "andria-barletta-trani.it", - "andria-trani-barletta.it", - "andriabarlettatrani.it", - "andriatranibarletta.it", - "ao.it", - "aosta.it", - "aoste.it", - "ap.it", - "aq.it", - "aquila.it", - "ar.it", - "arezzo.it", - "ascoli-piceno.it", - "ascolipiceno.it", - "asti.it", - "at.it", - "av.it", - "avellino.it", - "ba.it", - "balsan-sudtirol.it", - "xn--balsan-sudtirol-rqi.it", - "balsan-suedtirol.it", - "balsan.it", - "bari.it", - "barletta-trani-andria.it", - "barlettatraniandria.it", - "belluno.it", - "benevento.it", - "bergamo.it", - "bg.it", - "bi.it", - "biella.it", - "bl.it", - "bn.it", - "bo.it", - "bologna.it", - "bolzano-altoadige.it", - "bolzano.it", - "bozen-sudtirol.it", - "xn--bozen-sudtirol-76h.it", - "bozen-suedtirol.it", - "bozen.it", - "br.it", - "brescia.it", - "brindisi.it", - "bs.it", - "bt.it", - "bulsan-sudtirol.it", - "xn--bulsan-sudtirol-rqi.it", - "bulsan-suedtirol.it", - "bulsan.it", - "bz.it", - "ca.it", - "cagliari.it", - "caltanissetta.it", - "campidano-medio.it", - "campidanomedio.it", - "campobasso.it", - "carbonia-iglesias.it", - "carboniaiglesias.it", - "carrara-massa.it", - "carraramassa.it", - "caserta.it", - "catania.it", - "catanzaro.it", - "cb.it", - "ce.it", - "cesena-forli.it", - "xn--cesena-forli-c2g.it", - "cesenaforli.it", - "xn--cesenaforli-0jg.it", - "ch.it", - "chieti.it", - "ci.it", - "cl.it", - "cn.it", - "co.it", - "como.it", - "cosenza.it", - "cr.it", - "cremona.it", - "crotone.it", - "cs.it", - "ct.it", - "cuneo.it", - "cz.it", - "dell-ogliastra.it", - "dellogliastra.it", - "en.it", - "enna.it", - "fc.it", - "fe.it", - "fermo.it", - "ferrara.it", - "fg.it", - "fi.it", - "firenze.it", - "florence.it", - "fm.it", - "foggia.it", - "forli-cesena.it", - "xn--forli-cesena-41g.it", - "forlicesena.it", - "xn--forlicesena-ujg.it", - "fr.it", - "frosinone.it", - "ge.it", - "genoa.it", - "genova.it", - "go.it", - "gorizia.it", - "gr.it", - "grosseto.it", - "iglesias-carbonia.it", - "iglesiascarbonia.it", - "im.it", - "imperia.it", - "is.it", - "isernia.it", - "kr.it", - "la-spezia.it", - "laquila.it", - "laspezia.it", - "latina.it", - "lc.it", - "le.it", - "lecce.it", - "lecco.it", - "li.it", - "livorno.it", - "lo.it", - "lodi.it", - "lt.it", - "lu.it", - "lucca.it", - "macerata.it", - "mantova.it", - "massa-carrara.it", - "massacarrara.it", - "matera.it", - "mb.it", - "mc.it", - "me.it", - "medio-campidano.it", - "mediocampidano.it", - "messina.it", - "mi.it", - "milan.it", - "milano.it", - "mn.it", - "mo.it", - "modena.it", - "monza-brianza.it", - "monza-e-della-brianza.it", - "monza.it", - "monzabrianza.it", - "monzaebrianza.it", - "monzaedellabrianza.it", - "ms.it", - "mt.it", - "na.it", - "naples.it", - "napoli.it", - "no.it", - "novara.it", - "nu.it", - "nuoro.it", - "og.it", - "ogliastra.it", - "olbia-tempio.it", - "olbiatempio.it", - "or.it", - "oristano.it", - "ot.it", - "pa.it", - "padova.it", - "padua.it", - "palermo.it", - "parma.it", - "pavia.it", - "pc.it", - "pd.it", - "pe.it", - "perugia.it", - "pesaro-urbino.it", - "pesarourbino.it", - "pescara.it", - "pg.it", - "pi.it", - "piacenza.it", - "pisa.it", - "pistoia.it", - "pn.it", - "po.it", - "pordenone.it", - "potenza.it", - "pr.it", - "prato.it", - "pt.it", - "pu.it", - "pv.it", - "pz.it", - "ra.it", - "ragusa.it", - "ravenna.it", - "rc.it", - "re.it", - "reggio-calabria.it", - "reggio-emilia.it", - "reggiocalabria.it", - "reggioemilia.it", - "rg.it", - "ri.it", - "rieti.it", - "rimini.it", - "rm.it", - "rn.it", - "ro.it", - "roma.it", - "rome.it", - "rovigo.it", - "sa.it", - "salerno.it", - "sassari.it", - "savona.it", - "si.it", - "siena.it", - "siracusa.it", - "so.it", - "sondrio.it", - "sp.it", - "sr.it", - "ss.it", - "suedtirol.it", - "xn--sudtirol-y0e.it", - "sv.it", - "ta.it", - "taranto.it", - "te.it", - "tempio-olbia.it", - "tempioolbia.it", - "teramo.it", - "terni.it", - "tn.it", - "to.it", - "torino.it", - "tp.it", - "tr.it", - "trani-andria-barletta.it", - "trani-barletta-andria.it", - "traniandriabarletta.it", - "tranibarlettaandria.it", - "trapani.it", - "trento.it", - "treviso.it", - "trieste.it", - "ts.it", - "turin.it", - "tv.it", - "ud.it", - "udine.it", - "urbino-pesaro.it", - "urbinopesaro.it", - "va.it", - "varese.it", - "vb.it", - "vc.it", - "ve.it", - "venezia.it", - "venice.it", - "verbania.it", - "vercelli.it", - "verona.it", - "vi.it", - "vibo-valentia.it", - "vibovalentia.it", - "vicenza.it", - "viterbo.it", - "vr.it", - "vs.it", - "vt.it", - "vv.it", - "je", - "co.je", - "net.je", - "org.je", - "*.jm", - "jo", - "com.jo", - "org.jo", - "net.jo", - "edu.jo", - "sch.jo", - "gov.jo", - "mil.jo", - "name.jo", - "jobs", - "jp", - "ac.jp", - "ad.jp", - "co.jp", - "ed.jp", - "go.jp", - "gr.jp", - "lg.jp", - "ne.jp", - "or.jp", - "aichi.jp", - "akita.jp", - "aomori.jp", - "chiba.jp", - "ehime.jp", - "fukui.jp", - "fukuoka.jp", - "fukushima.jp", - "gifu.jp", - "gunma.jp", - "hiroshima.jp", - "hokkaido.jp", - "hyogo.jp", - "ibaraki.jp", - "ishikawa.jp", - "iwate.jp", - "kagawa.jp", - "kagoshima.jp", - "kanagawa.jp", - "kochi.jp", - "kumamoto.jp", - "kyoto.jp", - "mie.jp", - "miyagi.jp", - "miyazaki.jp", - "nagano.jp", - "nagasaki.jp", - "nara.jp", - "niigata.jp", - "oita.jp", - "okayama.jp", - "okinawa.jp", - "osaka.jp", - "saga.jp", - "saitama.jp", - "shiga.jp", - "shimane.jp", - "shizuoka.jp", - "tochigi.jp", - "tokushima.jp", - "tokyo.jp", - "tottori.jp", - "toyama.jp", - "wakayama.jp", - "yamagata.jp", - "yamaguchi.jp", - "yamanashi.jp", - "xn--4pvxs.jp", - "xn--vgu402c.jp", - "xn--c3s14m.jp", - "xn--f6qx53a.jp", - "xn--8pvr4u.jp", - "xn--uist22h.jp", - "xn--djrs72d6uy.jp", - "xn--mkru45i.jp", - "xn--0trq7p7nn.jp", - "xn--8ltr62k.jp", - "xn--2m4a15e.jp", - "xn--efvn9s.jp", - "xn--32vp30h.jp", - "xn--4it797k.jp", - "xn--1lqs71d.jp", - "xn--5rtp49c.jp", - "xn--5js045d.jp", - "xn--ehqz56n.jp", - "xn--1lqs03n.jp", - "xn--qqqt11m.jp", - "xn--kbrq7o.jp", - "xn--pssu33l.jp", - "xn--ntsq17g.jp", - "xn--uisz3g.jp", - "xn--6btw5a.jp", - "xn--1ctwo.jp", - "xn--6orx2r.jp", - "xn--rht61e.jp", - "xn--rht27z.jp", - "xn--djty4k.jp", - "xn--nit225k.jp", - "xn--rht3d.jp", - "xn--klty5x.jp", - "xn--kltx9a.jp", - "xn--kltp7d.jp", - "xn--uuwu58a.jp", - "xn--zbx025d.jp", - "xn--ntso0iqx3a.jp", - "xn--elqq16h.jp", - "xn--4it168d.jp", - "xn--klt787d.jp", - "xn--rny31h.jp", - "xn--7t0a264c.jp", - "xn--5rtq34k.jp", - "xn--k7yn95e.jp", - "xn--tor131o.jp", - "xn--d5qv7z876c.jp", - "*.kawasaki.jp", - "*.kitakyushu.jp", - "*.kobe.jp", - "*.nagoya.jp", - "*.sapporo.jp", - "*.sendai.jp", - "*.yokohama.jp", - "!city.kawasaki.jp", - "!city.kitakyushu.jp", - "!city.kobe.jp", - "!city.nagoya.jp", - "!city.sapporo.jp", - "!city.sendai.jp", - "!city.yokohama.jp", - "aisai.aichi.jp", - "ama.aichi.jp", - "anjo.aichi.jp", - "asuke.aichi.jp", - "chiryu.aichi.jp", - "chita.aichi.jp", - "fuso.aichi.jp", - "gamagori.aichi.jp", - "handa.aichi.jp", - "hazu.aichi.jp", - "hekinan.aichi.jp", - "higashiura.aichi.jp", - "ichinomiya.aichi.jp", - "inazawa.aichi.jp", - "inuyama.aichi.jp", - "isshiki.aichi.jp", - "iwakura.aichi.jp", - "kanie.aichi.jp", - "kariya.aichi.jp", - "kasugai.aichi.jp", - "kira.aichi.jp", - "kiyosu.aichi.jp", - "komaki.aichi.jp", - "konan.aichi.jp", - "kota.aichi.jp", - "mihama.aichi.jp", - "miyoshi.aichi.jp", - "nishio.aichi.jp", - "nisshin.aichi.jp", - "obu.aichi.jp", - "oguchi.aichi.jp", - "oharu.aichi.jp", - "okazaki.aichi.jp", - "owariasahi.aichi.jp", - "seto.aichi.jp", - "shikatsu.aichi.jp", - "shinshiro.aichi.jp", - "shitara.aichi.jp", - "tahara.aichi.jp", - "takahama.aichi.jp", - "tobishima.aichi.jp", - "toei.aichi.jp", - "togo.aichi.jp", - "tokai.aichi.jp", - "tokoname.aichi.jp", - "toyoake.aichi.jp", - "toyohashi.aichi.jp", - "toyokawa.aichi.jp", - "toyone.aichi.jp", - "toyota.aichi.jp", - "tsushima.aichi.jp", - "yatomi.aichi.jp", - "akita.akita.jp", - "daisen.akita.jp", - "fujisato.akita.jp", - "gojome.akita.jp", - "hachirogata.akita.jp", - "happou.akita.jp", - "higashinaruse.akita.jp", - "honjo.akita.jp", - "honjyo.akita.jp", - "ikawa.akita.jp", - "kamikoani.akita.jp", - "kamioka.akita.jp", - "katagami.akita.jp", - "kazuno.akita.jp", - "kitaakita.akita.jp", - "kosaka.akita.jp", - "kyowa.akita.jp", - "misato.akita.jp", - "mitane.akita.jp", - "moriyoshi.akita.jp", - "nikaho.akita.jp", - "noshiro.akita.jp", - "odate.akita.jp", - "oga.akita.jp", - "ogata.akita.jp", - "semboku.akita.jp", - "yokote.akita.jp", - "yurihonjo.akita.jp", - "aomori.aomori.jp", - "gonohe.aomori.jp", - "hachinohe.aomori.jp", - "hashikami.aomori.jp", - "hiranai.aomori.jp", - "hirosaki.aomori.jp", - "itayanagi.aomori.jp", - "kuroishi.aomori.jp", - "misawa.aomori.jp", - "mutsu.aomori.jp", - "nakadomari.aomori.jp", - "noheji.aomori.jp", - "oirase.aomori.jp", - "owani.aomori.jp", - "rokunohe.aomori.jp", - "sannohe.aomori.jp", - "shichinohe.aomori.jp", - "shingo.aomori.jp", - "takko.aomori.jp", - "towada.aomori.jp", - "tsugaru.aomori.jp", - "tsuruta.aomori.jp", - "abiko.chiba.jp", - "asahi.chiba.jp", - "chonan.chiba.jp", - "chosei.chiba.jp", - "choshi.chiba.jp", - "chuo.chiba.jp", - "funabashi.chiba.jp", - "futtsu.chiba.jp", - "hanamigawa.chiba.jp", - "ichihara.chiba.jp", - "ichikawa.chiba.jp", - "ichinomiya.chiba.jp", - "inzai.chiba.jp", - "isumi.chiba.jp", - "kamagaya.chiba.jp", - "kamogawa.chiba.jp", - "kashiwa.chiba.jp", - "katori.chiba.jp", - "katsuura.chiba.jp", - "kimitsu.chiba.jp", - "kisarazu.chiba.jp", - "kozaki.chiba.jp", - "kujukuri.chiba.jp", - "kyonan.chiba.jp", - "matsudo.chiba.jp", - "midori.chiba.jp", - "mihama.chiba.jp", - "minamiboso.chiba.jp", - "mobara.chiba.jp", - "mutsuzawa.chiba.jp", - "nagara.chiba.jp", - "nagareyama.chiba.jp", - "narashino.chiba.jp", - "narita.chiba.jp", - "noda.chiba.jp", - "oamishirasato.chiba.jp", - "omigawa.chiba.jp", - "onjuku.chiba.jp", - "otaki.chiba.jp", - "sakae.chiba.jp", - "sakura.chiba.jp", - "shimofusa.chiba.jp", - "shirako.chiba.jp", - "shiroi.chiba.jp", - "shisui.chiba.jp", - "sodegaura.chiba.jp", - "sosa.chiba.jp", - "tako.chiba.jp", - "tateyama.chiba.jp", - "togane.chiba.jp", - "tohnosho.chiba.jp", - "tomisato.chiba.jp", - "urayasu.chiba.jp", - "yachimata.chiba.jp", - "yachiyo.chiba.jp", - "yokaichiba.chiba.jp", - "yokoshibahikari.chiba.jp", - "yotsukaido.chiba.jp", - "ainan.ehime.jp", - "honai.ehime.jp", - "ikata.ehime.jp", - "imabari.ehime.jp", - "iyo.ehime.jp", - "kamijima.ehime.jp", - "kihoku.ehime.jp", - "kumakogen.ehime.jp", - "masaki.ehime.jp", - "matsuno.ehime.jp", - "matsuyama.ehime.jp", - "namikata.ehime.jp", - "niihama.ehime.jp", - "ozu.ehime.jp", - "saijo.ehime.jp", - "seiyo.ehime.jp", - "shikokuchuo.ehime.jp", - "tobe.ehime.jp", - "toon.ehime.jp", - "uchiko.ehime.jp", - "uwajima.ehime.jp", - "yawatahama.ehime.jp", - "echizen.fukui.jp", - "eiheiji.fukui.jp", - "fukui.fukui.jp", - "ikeda.fukui.jp", - "katsuyama.fukui.jp", - "mihama.fukui.jp", - "minamiechizen.fukui.jp", - "obama.fukui.jp", - "ohi.fukui.jp", - "ono.fukui.jp", - "sabae.fukui.jp", - "sakai.fukui.jp", - "takahama.fukui.jp", - "tsuruga.fukui.jp", - "wakasa.fukui.jp", - "ashiya.fukuoka.jp", - "buzen.fukuoka.jp", - "chikugo.fukuoka.jp", - "chikuho.fukuoka.jp", - "chikujo.fukuoka.jp", - "chikushino.fukuoka.jp", - "chikuzen.fukuoka.jp", - "chuo.fukuoka.jp", - "dazaifu.fukuoka.jp", - "fukuchi.fukuoka.jp", - "hakata.fukuoka.jp", - "higashi.fukuoka.jp", - "hirokawa.fukuoka.jp", - "hisayama.fukuoka.jp", - "iizuka.fukuoka.jp", - "inatsuki.fukuoka.jp", - "kaho.fukuoka.jp", - "kasuga.fukuoka.jp", - "kasuya.fukuoka.jp", - "kawara.fukuoka.jp", - "keisen.fukuoka.jp", - "koga.fukuoka.jp", - "kurate.fukuoka.jp", - "kurogi.fukuoka.jp", - "kurume.fukuoka.jp", - "minami.fukuoka.jp", - "miyako.fukuoka.jp", - "miyama.fukuoka.jp", - "miyawaka.fukuoka.jp", - "mizumaki.fukuoka.jp", - "munakata.fukuoka.jp", - "nakagawa.fukuoka.jp", - "nakama.fukuoka.jp", - "nishi.fukuoka.jp", - "nogata.fukuoka.jp", - "ogori.fukuoka.jp", - "okagaki.fukuoka.jp", - "okawa.fukuoka.jp", - "oki.fukuoka.jp", - "omuta.fukuoka.jp", - "onga.fukuoka.jp", - "onojo.fukuoka.jp", - "oto.fukuoka.jp", - "saigawa.fukuoka.jp", - "sasaguri.fukuoka.jp", - "shingu.fukuoka.jp", - "shinyoshitomi.fukuoka.jp", - "shonai.fukuoka.jp", - "soeda.fukuoka.jp", - "sue.fukuoka.jp", - "tachiarai.fukuoka.jp", - "tagawa.fukuoka.jp", - "takata.fukuoka.jp", - "toho.fukuoka.jp", - "toyotsu.fukuoka.jp", - "tsuiki.fukuoka.jp", - "ukiha.fukuoka.jp", - "umi.fukuoka.jp", - "usui.fukuoka.jp", - "yamada.fukuoka.jp", - "yame.fukuoka.jp", - "yanagawa.fukuoka.jp", - "yukuhashi.fukuoka.jp", - "aizubange.fukushima.jp", - "aizumisato.fukushima.jp", - "aizuwakamatsu.fukushima.jp", - "asakawa.fukushima.jp", - "bandai.fukushima.jp", - "date.fukushima.jp", - "fukushima.fukushima.jp", - "furudono.fukushima.jp", - "futaba.fukushima.jp", - "hanawa.fukushima.jp", - "higashi.fukushima.jp", - "hirata.fukushima.jp", - "hirono.fukushima.jp", - "iitate.fukushima.jp", - "inawashiro.fukushima.jp", - "ishikawa.fukushima.jp", - "iwaki.fukushima.jp", - "izumizaki.fukushima.jp", - "kagamiishi.fukushima.jp", - "kaneyama.fukushima.jp", - "kawamata.fukushima.jp", - "kitakata.fukushima.jp", - "kitashiobara.fukushima.jp", - "koori.fukushima.jp", - "koriyama.fukushima.jp", - "kunimi.fukushima.jp", - "miharu.fukushima.jp", - "mishima.fukushima.jp", - "namie.fukushima.jp", - "nango.fukushima.jp", - "nishiaizu.fukushima.jp", - "nishigo.fukushima.jp", - "okuma.fukushima.jp", - "omotego.fukushima.jp", - "ono.fukushima.jp", - "otama.fukushima.jp", - "samegawa.fukushima.jp", - "shimogo.fukushima.jp", - "shirakawa.fukushima.jp", - "showa.fukushima.jp", - "soma.fukushima.jp", - "sukagawa.fukushima.jp", - "taishin.fukushima.jp", - "tamakawa.fukushima.jp", - "tanagura.fukushima.jp", - "tenei.fukushima.jp", - "yabuki.fukushima.jp", - "yamato.fukushima.jp", - "yamatsuri.fukushima.jp", - "yanaizu.fukushima.jp", - "yugawa.fukushima.jp", - "anpachi.gifu.jp", - "ena.gifu.jp", - "gifu.gifu.jp", - "ginan.gifu.jp", - "godo.gifu.jp", - "gujo.gifu.jp", - "hashima.gifu.jp", - "hichiso.gifu.jp", - "hida.gifu.jp", - "higashishirakawa.gifu.jp", - "ibigawa.gifu.jp", - "ikeda.gifu.jp", - "kakamigahara.gifu.jp", - "kani.gifu.jp", - "kasahara.gifu.jp", - "kasamatsu.gifu.jp", - "kawaue.gifu.jp", - "kitagata.gifu.jp", - "mino.gifu.jp", - "minokamo.gifu.jp", - "mitake.gifu.jp", - "mizunami.gifu.jp", - "motosu.gifu.jp", - "nakatsugawa.gifu.jp", - "ogaki.gifu.jp", - "sakahogi.gifu.jp", - "seki.gifu.jp", - "sekigahara.gifu.jp", - "shirakawa.gifu.jp", - "tajimi.gifu.jp", - "takayama.gifu.jp", - "tarui.gifu.jp", - "toki.gifu.jp", - "tomika.gifu.jp", - "wanouchi.gifu.jp", - "yamagata.gifu.jp", - "yaotsu.gifu.jp", - "yoro.gifu.jp", - "annaka.gunma.jp", - "chiyoda.gunma.jp", - "fujioka.gunma.jp", - "higashiagatsuma.gunma.jp", - "isesaki.gunma.jp", - "itakura.gunma.jp", - "kanna.gunma.jp", - "kanra.gunma.jp", - "katashina.gunma.jp", - "kawaba.gunma.jp", - "kiryu.gunma.jp", - "kusatsu.gunma.jp", - "maebashi.gunma.jp", - "meiwa.gunma.jp", - "midori.gunma.jp", - "minakami.gunma.jp", - "naganohara.gunma.jp", - "nakanojo.gunma.jp", - "nanmoku.gunma.jp", - "numata.gunma.jp", - "oizumi.gunma.jp", - "ora.gunma.jp", - "ota.gunma.jp", - "shibukawa.gunma.jp", - "shimonita.gunma.jp", - "shinto.gunma.jp", - "showa.gunma.jp", - "takasaki.gunma.jp", - "takayama.gunma.jp", - "tamamura.gunma.jp", - "tatebayashi.gunma.jp", - "tomioka.gunma.jp", - "tsukiyono.gunma.jp", - "tsumagoi.gunma.jp", - "ueno.gunma.jp", - "yoshioka.gunma.jp", - "asaminami.hiroshima.jp", - "daiwa.hiroshima.jp", - "etajima.hiroshima.jp", - "fuchu.hiroshima.jp", - "fukuyama.hiroshima.jp", - "hatsukaichi.hiroshima.jp", - "higashihiroshima.hiroshima.jp", - "hongo.hiroshima.jp", - "jinsekikogen.hiroshima.jp", - "kaita.hiroshima.jp", - "kui.hiroshima.jp", - "kumano.hiroshima.jp", - "kure.hiroshima.jp", - "mihara.hiroshima.jp", - "miyoshi.hiroshima.jp", - "naka.hiroshima.jp", - "onomichi.hiroshima.jp", - "osakikamijima.hiroshima.jp", - "otake.hiroshima.jp", - "saka.hiroshima.jp", - "sera.hiroshima.jp", - "seranishi.hiroshima.jp", - "shinichi.hiroshima.jp", - "shobara.hiroshima.jp", - "takehara.hiroshima.jp", - "abashiri.hokkaido.jp", - "abira.hokkaido.jp", - "aibetsu.hokkaido.jp", - "akabira.hokkaido.jp", - "akkeshi.hokkaido.jp", - "asahikawa.hokkaido.jp", - "ashibetsu.hokkaido.jp", - "ashoro.hokkaido.jp", - "assabu.hokkaido.jp", - "atsuma.hokkaido.jp", - "bibai.hokkaido.jp", - "biei.hokkaido.jp", - "bifuka.hokkaido.jp", - "bihoro.hokkaido.jp", - "biratori.hokkaido.jp", - "chippubetsu.hokkaido.jp", - "chitose.hokkaido.jp", - "date.hokkaido.jp", - "ebetsu.hokkaido.jp", - "embetsu.hokkaido.jp", - "eniwa.hokkaido.jp", - "erimo.hokkaido.jp", - "esan.hokkaido.jp", - "esashi.hokkaido.jp", - "fukagawa.hokkaido.jp", - "fukushima.hokkaido.jp", - "furano.hokkaido.jp", - "furubira.hokkaido.jp", - "haboro.hokkaido.jp", - "hakodate.hokkaido.jp", - "hamatonbetsu.hokkaido.jp", - "hidaka.hokkaido.jp", - "higashikagura.hokkaido.jp", - "higashikawa.hokkaido.jp", - "hiroo.hokkaido.jp", - "hokuryu.hokkaido.jp", - "hokuto.hokkaido.jp", - "honbetsu.hokkaido.jp", - "horokanai.hokkaido.jp", - "horonobe.hokkaido.jp", - "ikeda.hokkaido.jp", - "imakane.hokkaido.jp", - "ishikari.hokkaido.jp", - "iwamizawa.hokkaido.jp", - "iwanai.hokkaido.jp", - "kamifurano.hokkaido.jp", - "kamikawa.hokkaido.jp", - "kamishihoro.hokkaido.jp", - "kamisunagawa.hokkaido.jp", - "kamoenai.hokkaido.jp", - "kayabe.hokkaido.jp", - "kembuchi.hokkaido.jp", - "kikonai.hokkaido.jp", - "kimobetsu.hokkaido.jp", - "kitahiroshima.hokkaido.jp", - "kitami.hokkaido.jp", - "kiyosato.hokkaido.jp", - "koshimizu.hokkaido.jp", - "kunneppu.hokkaido.jp", - "kuriyama.hokkaido.jp", - "kuromatsunai.hokkaido.jp", - "kushiro.hokkaido.jp", - "kutchan.hokkaido.jp", - "kyowa.hokkaido.jp", - "mashike.hokkaido.jp", - "matsumae.hokkaido.jp", - "mikasa.hokkaido.jp", - "minamifurano.hokkaido.jp", - "mombetsu.hokkaido.jp", - "moseushi.hokkaido.jp", - "mukawa.hokkaido.jp", - "muroran.hokkaido.jp", - "naie.hokkaido.jp", - "nakagawa.hokkaido.jp", - "nakasatsunai.hokkaido.jp", - "nakatombetsu.hokkaido.jp", - "nanae.hokkaido.jp", - "nanporo.hokkaido.jp", - "nayoro.hokkaido.jp", - "nemuro.hokkaido.jp", - "niikappu.hokkaido.jp", - "niki.hokkaido.jp", - "nishiokoppe.hokkaido.jp", - "noboribetsu.hokkaido.jp", - "numata.hokkaido.jp", - "obihiro.hokkaido.jp", - "obira.hokkaido.jp", - "oketo.hokkaido.jp", - "okoppe.hokkaido.jp", - "otaru.hokkaido.jp", - "otobe.hokkaido.jp", - "otofuke.hokkaido.jp", - "otoineppu.hokkaido.jp", - "oumu.hokkaido.jp", - "ozora.hokkaido.jp", - "pippu.hokkaido.jp", - "rankoshi.hokkaido.jp", - "rebun.hokkaido.jp", - "rikubetsu.hokkaido.jp", - "rishiri.hokkaido.jp", - "rishirifuji.hokkaido.jp", - "saroma.hokkaido.jp", - "sarufutsu.hokkaido.jp", - "shakotan.hokkaido.jp", - "shari.hokkaido.jp", - "shibecha.hokkaido.jp", - "shibetsu.hokkaido.jp", - "shikabe.hokkaido.jp", - "shikaoi.hokkaido.jp", - "shimamaki.hokkaido.jp", - "shimizu.hokkaido.jp", - "shimokawa.hokkaido.jp", - "shinshinotsu.hokkaido.jp", - "shintoku.hokkaido.jp", - "shiranuka.hokkaido.jp", - "shiraoi.hokkaido.jp", - "shiriuchi.hokkaido.jp", - "sobetsu.hokkaido.jp", - "sunagawa.hokkaido.jp", - "taiki.hokkaido.jp", - "takasu.hokkaido.jp", - "takikawa.hokkaido.jp", - "takinoue.hokkaido.jp", - "teshikaga.hokkaido.jp", - "tobetsu.hokkaido.jp", - "tohma.hokkaido.jp", - "tomakomai.hokkaido.jp", - "tomari.hokkaido.jp", - "toya.hokkaido.jp", - "toyako.hokkaido.jp", - "toyotomi.hokkaido.jp", - "toyoura.hokkaido.jp", - "tsubetsu.hokkaido.jp", - "tsukigata.hokkaido.jp", - "urakawa.hokkaido.jp", - "urausu.hokkaido.jp", - "uryu.hokkaido.jp", - "utashinai.hokkaido.jp", - "wakkanai.hokkaido.jp", - "wassamu.hokkaido.jp", - "yakumo.hokkaido.jp", - "yoichi.hokkaido.jp", - "aioi.hyogo.jp", - "akashi.hyogo.jp", - "ako.hyogo.jp", - "amagasaki.hyogo.jp", - "aogaki.hyogo.jp", - "asago.hyogo.jp", - "ashiya.hyogo.jp", - "awaji.hyogo.jp", - "fukusaki.hyogo.jp", - "goshiki.hyogo.jp", - "harima.hyogo.jp", - "himeji.hyogo.jp", - "ichikawa.hyogo.jp", - "inagawa.hyogo.jp", - "itami.hyogo.jp", - "kakogawa.hyogo.jp", - "kamigori.hyogo.jp", - "kamikawa.hyogo.jp", - "kasai.hyogo.jp", - "kasuga.hyogo.jp", - "kawanishi.hyogo.jp", - "miki.hyogo.jp", - "minamiawaji.hyogo.jp", - "nishinomiya.hyogo.jp", - "nishiwaki.hyogo.jp", - "ono.hyogo.jp", - "sanda.hyogo.jp", - "sannan.hyogo.jp", - "sasayama.hyogo.jp", - "sayo.hyogo.jp", - "shingu.hyogo.jp", - "shinonsen.hyogo.jp", - "shiso.hyogo.jp", - "sumoto.hyogo.jp", - "taishi.hyogo.jp", - "taka.hyogo.jp", - "takarazuka.hyogo.jp", - "takasago.hyogo.jp", - "takino.hyogo.jp", - "tamba.hyogo.jp", - "tatsuno.hyogo.jp", - "toyooka.hyogo.jp", - "yabu.hyogo.jp", - "yashiro.hyogo.jp", - "yoka.hyogo.jp", - "yokawa.hyogo.jp", - "ami.ibaraki.jp", - "asahi.ibaraki.jp", - "bando.ibaraki.jp", - "chikusei.ibaraki.jp", - "daigo.ibaraki.jp", - "fujishiro.ibaraki.jp", - "hitachi.ibaraki.jp", - "hitachinaka.ibaraki.jp", - "hitachiomiya.ibaraki.jp", - "hitachiota.ibaraki.jp", - "ibaraki.ibaraki.jp", - "ina.ibaraki.jp", - "inashiki.ibaraki.jp", - "itako.ibaraki.jp", - "iwama.ibaraki.jp", - "joso.ibaraki.jp", - "kamisu.ibaraki.jp", - "kasama.ibaraki.jp", - "kashima.ibaraki.jp", - "kasumigaura.ibaraki.jp", - "koga.ibaraki.jp", - "miho.ibaraki.jp", - "mito.ibaraki.jp", - "moriya.ibaraki.jp", - "naka.ibaraki.jp", - "namegata.ibaraki.jp", - "oarai.ibaraki.jp", - "ogawa.ibaraki.jp", - "omitama.ibaraki.jp", - "ryugasaki.ibaraki.jp", - "sakai.ibaraki.jp", - "sakuragawa.ibaraki.jp", - "shimodate.ibaraki.jp", - "shimotsuma.ibaraki.jp", - "shirosato.ibaraki.jp", - "sowa.ibaraki.jp", - "suifu.ibaraki.jp", - "takahagi.ibaraki.jp", - "tamatsukuri.ibaraki.jp", - "tokai.ibaraki.jp", - "tomobe.ibaraki.jp", - "tone.ibaraki.jp", - "toride.ibaraki.jp", - "tsuchiura.ibaraki.jp", - "tsukuba.ibaraki.jp", - "uchihara.ibaraki.jp", - "ushiku.ibaraki.jp", - "yachiyo.ibaraki.jp", - "yamagata.ibaraki.jp", - "yawara.ibaraki.jp", - "yuki.ibaraki.jp", - "anamizu.ishikawa.jp", - "hakui.ishikawa.jp", - "hakusan.ishikawa.jp", - "kaga.ishikawa.jp", - "kahoku.ishikawa.jp", - "kanazawa.ishikawa.jp", - "kawakita.ishikawa.jp", - "komatsu.ishikawa.jp", - "nakanoto.ishikawa.jp", - "nanao.ishikawa.jp", - "nomi.ishikawa.jp", - "nonoichi.ishikawa.jp", - "noto.ishikawa.jp", - "shika.ishikawa.jp", - "suzu.ishikawa.jp", - "tsubata.ishikawa.jp", - "tsurugi.ishikawa.jp", - "uchinada.ishikawa.jp", - "wajima.ishikawa.jp", - "fudai.iwate.jp", - "fujisawa.iwate.jp", - "hanamaki.iwate.jp", - "hiraizumi.iwate.jp", - "hirono.iwate.jp", - "ichinohe.iwate.jp", - "ichinoseki.iwate.jp", - "iwaizumi.iwate.jp", - "iwate.iwate.jp", - "joboji.iwate.jp", - "kamaishi.iwate.jp", - "kanegasaki.iwate.jp", - "karumai.iwate.jp", - "kawai.iwate.jp", - "kitakami.iwate.jp", - "kuji.iwate.jp", - "kunohe.iwate.jp", - "kuzumaki.iwate.jp", - "miyako.iwate.jp", - "mizusawa.iwate.jp", - "morioka.iwate.jp", - "ninohe.iwate.jp", - "noda.iwate.jp", - "ofunato.iwate.jp", - "oshu.iwate.jp", - "otsuchi.iwate.jp", - "rikuzentakata.iwate.jp", - "shiwa.iwate.jp", - "shizukuishi.iwate.jp", - "sumita.iwate.jp", - "tanohata.iwate.jp", - "tono.iwate.jp", - "yahaba.iwate.jp", - "yamada.iwate.jp", - "ayagawa.kagawa.jp", - "higashikagawa.kagawa.jp", - "kanonji.kagawa.jp", - "kotohira.kagawa.jp", - "manno.kagawa.jp", - "marugame.kagawa.jp", - "mitoyo.kagawa.jp", - "naoshima.kagawa.jp", - "sanuki.kagawa.jp", - "tadotsu.kagawa.jp", - "takamatsu.kagawa.jp", - "tonosho.kagawa.jp", - "uchinomi.kagawa.jp", - "utazu.kagawa.jp", - "zentsuji.kagawa.jp", - "akune.kagoshima.jp", - "amami.kagoshima.jp", - "hioki.kagoshima.jp", - "isa.kagoshima.jp", - "isen.kagoshima.jp", - "izumi.kagoshima.jp", - "kagoshima.kagoshima.jp", - "kanoya.kagoshima.jp", - "kawanabe.kagoshima.jp", - "kinko.kagoshima.jp", - "kouyama.kagoshima.jp", - "makurazaki.kagoshima.jp", - "matsumoto.kagoshima.jp", - "minamitane.kagoshima.jp", - "nakatane.kagoshima.jp", - "nishinoomote.kagoshima.jp", - "satsumasendai.kagoshima.jp", - "soo.kagoshima.jp", - "tarumizu.kagoshima.jp", - "yusui.kagoshima.jp", - "aikawa.kanagawa.jp", - "atsugi.kanagawa.jp", - "ayase.kanagawa.jp", - "chigasaki.kanagawa.jp", - "ebina.kanagawa.jp", - "fujisawa.kanagawa.jp", - "hadano.kanagawa.jp", - "hakone.kanagawa.jp", - "hiratsuka.kanagawa.jp", - "isehara.kanagawa.jp", - "kaisei.kanagawa.jp", - "kamakura.kanagawa.jp", - "kiyokawa.kanagawa.jp", - "matsuda.kanagawa.jp", - "minamiashigara.kanagawa.jp", - "miura.kanagawa.jp", - "nakai.kanagawa.jp", - "ninomiya.kanagawa.jp", - "odawara.kanagawa.jp", - "oi.kanagawa.jp", - "oiso.kanagawa.jp", - "sagamihara.kanagawa.jp", - "samukawa.kanagawa.jp", - "tsukui.kanagawa.jp", - "yamakita.kanagawa.jp", - "yamato.kanagawa.jp", - "yokosuka.kanagawa.jp", - "yugawara.kanagawa.jp", - "zama.kanagawa.jp", - "zushi.kanagawa.jp", - "aki.kochi.jp", - "geisei.kochi.jp", - "hidaka.kochi.jp", - "higashitsuno.kochi.jp", - "ino.kochi.jp", - "kagami.kochi.jp", - "kami.kochi.jp", - "kitagawa.kochi.jp", - "kochi.kochi.jp", - "mihara.kochi.jp", - "motoyama.kochi.jp", - "muroto.kochi.jp", - "nahari.kochi.jp", - "nakamura.kochi.jp", - "nankoku.kochi.jp", - "nishitosa.kochi.jp", - "niyodogawa.kochi.jp", - "ochi.kochi.jp", - "okawa.kochi.jp", - "otoyo.kochi.jp", - "otsuki.kochi.jp", - "sakawa.kochi.jp", - "sukumo.kochi.jp", - "susaki.kochi.jp", - "tosa.kochi.jp", - "tosashimizu.kochi.jp", - "toyo.kochi.jp", - "tsuno.kochi.jp", - "umaji.kochi.jp", - "yasuda.kochi.jp", - "yusuhara.kochi.jp", - "amakusa.kumamoto.jp", - "arao.kumamoto.jp", - "aso.kumamoto.jp", - "choyo.kumamoto.jp", - "gyokuto.kumamoto.jp", - "kamiamakusa.kumamoto.jp", - "kikuchi.kumamoto.jp", - "kumamoto.kumamoto.jp", - "mashiki.kumamoto.jp", - "mifune.kumamoto.jp", - "minamata.kumamoto.jp", - "minamioguni.kumamoto.jp", - "nagasu.kumamoto.jp", - "nishihara.kumamoto.jp", - "oguni.kumamoto.jp", - "ozu.kumamoto.jp", - "sumoto.kumamoto.jp", - "takamori.kumamoto.jp", - "uki.kumamoto.jp", - "uto.kumamoto.jp", - "yamaga.kumamoto.jp", - "yamato.kumamoto.jp", - "yatsushiro.kumamoto.jp", - "ayabe.kyoto.jp", - "fukuchiyama.kyoto.jp", - "higashiyama.kyoto.jp", - "ide.kyoto.jp", - "ine.kyoto.jp", - "joyo.kyoto.jp", - "kameoka.kyoto.jp", - "kamo.kyoto.jp", - "kita.kyoto.jp", - "kizu.kyoto.jp", - "kumiyama.kyoto.jp", - "kyotamba.kyoto.jp", - "kyotanabe.kyoto.jp", - "kyotango.kyoto.jp", - "maizuru.kyoto.jp", - "minami.kyoto.jp", - "minamiyamashiro.kyoto.jp", - "miyazu.kyoto.jp", - "muko.kyoto.jp", - "nagaokakyo.kyoto.jp", - "nakagyo.kyoto.jp", - "nantan.kyoto.jp", - "oyamazaki.kyoto.jp", - "sakyo.kyoto.jp", - "seika.kyoto.jp", - "tanabe.kyoto.jp", - "uji.kyoto.jp", - "ujitawara.kyoto.jp", - "wazuka.kyoto.jp", - "yamashina.kyoto.jp", - "yawata.kyoto.jp", - "asahi.mie.jp", - "inabe.mie.jp", - "ise.mie.jp", - "kameyama.mie.jp", - "kawagoe.mie.jp", - "kiho.mie.jp", - "kisosaki.mie.jp", - "kiwa.mie.jp", - "komono.mie.jp", - "kumano.mie.jp", - "kuwana.mie.jp", - "matsusaka.mie.jp", - "meiwa.mie.jp", - "mihama.mie.jp", - "minamiise.mie.jp", - "misugi.mie.jp", - "miyama.mie.jp", - "nabari.mie.jp", - "shima.mie.jp", - "suzuka.mie.jp", - "tado.mie.jp", - "taiki.mie.jp", - "taki.mie.jp", - "tamaki.mie.jp", - "toba.mie.jp", - "tsu.mie.jp", - "udono.mie.jp", - "ureshino.mie.jp", - "watarai.mie.jp", - "yokkaichi.mie.jp", - "furukawa.miyagi.jp", - "higashimatsushima.miyagi.jp", - "ishinomaki.miyagi.jp", - "iwanuma.miyagi.jp", - "kakuda.miyagi.jp", - "kami.miyagi.jp", - "kawasaki.miyagi.jp", - "marumori.miyagi.jp", - "matsushima.miyagi.jp", - "minamisanriku.miyagi.jp", - "misato.miyagi.jp", - "murata.miyagi.jp", - "natori.miyagi.jp", - "ogawara.miyagi.jp", - "ohira.miyagi.jp", - "onagawa.miyagi.jp", - "osaki.miyagi.jp", - "rifu.miyagi.jp", - "semine.miyagi.jp", - "shibata.miyagi.jp", - "shichikashuku.miyagi.jp", - "shikama.miyagi.jp", - "shiogama.miyagi.jp", - "shiroishi.miyagi.jp", - "tagajo.miyagi.jp", - "taiwa.miyagi.jp", - "tome.miyagi.jp", - "tomiya.miyagi.jp", - "wakuya.miyagi.jp", - "watari.miyagi.jp", - "yamamoto.miyagi.jp", - "zao.miyagi.jp", - "aya.miyazaki.jp", - "ebino.miyazaki.jp", - "gokase.miyazaki.jp", - "hyuga.miyazaki.jp", - "kadogawa.miyazaki.jp", - "kawaminami.miyazaki.jp", - "kijo.miyazaki.jp", - "kitagawa.miyazaki.jp", - "kitakata.miyazaki.jp", - "kitaura.miyazaki.jp", - "kobayashi.miyazaki.jp", - "kunitomi.miyazaki.jp", - "kushima.miyazaki.jp", - "mimata.miyazaki.jp", - "miyakonojo.miyazaki.jp", - "miyazaki.miyazaki.jp", - "morotsuka.miyazaki.jp", - "nichinan.miyazaki.jp", - "nishimera.miyazaki.jp", - "nobeoka.miyazaki.jp", - "saito.miyazaki.jp", - "shiiba.miyazaki.jp", - "shintomi.miyazaki.jp", - "takaharu.miyazaki.jp", - "takanabe.miyazaki.jp", - "takazaki.miyazaki.jp", - "tsuno.miyazaki.jp", - "achi.nagano.jp", - "agematsu.nagano.jp", - "anan.nagano.jp", - "aoki.nagano.jp", - "asahi.nagano.jp", - "azumino.nagano.jp", - "chikuhoku.nagano.jp", - "chikuma.nagano.jp", - "chino.nagano.jp", - "fujimi.nagano.jp", - "hakuba.nagano.jp", - "hara.nagano.jp", - "hiraya.nagano.jp", - "iida.nagano.jp", - "iijima.nagano.jp", - "iiyama.nagano.jp", - "iizuna.nagano.jp", - "ikeda.nagano.jp", - "ikusaka.nagano.jp", - "ina.nagano.jp", - "karuizawa.nagano.jp", - "kawakami.nagano.jp", - "kiso.nagano.jp", - "kisofukushima.nagano.jp", - "kitaaiki.nagano.jp", - "komagane.nagano.jp", - "komoro.nagano.jp", - "matsukawa.nagano.jp", - "matsumoto.nagano.jp", - "miasa.nagano.jp", - "minamiaiki.nagano.jp", - "minamimaki.nagano.jp", - "minamiminowa.nagano.jp", - "minowa.nagano.jp", - "miyada.nagano.jp", - "miyota.nagano.jp", - "mochizuki.nagano.jp", - "nagano.nagano.jp", - "nagawa.nagano.jp", - "nagiso.nagano.jp", - "nakagawa.nagano.jp", - "nakano.nagano.jp", - "nozawaonsen.nagano.jp", - "obuse.nagano.jp", - "ogawa.nagano.jp", - "okaya.nagano.jp", - "omachi.nagano.jp", - "omi.nagano.jp", - "ookuwa.nagano.jp", - "ooshika.nagano.jp", - "otaki.nagano.jp", - "otari.nagano.jp", - "sakae.nagano.jp", - "sakaki.nagano.jp", - "saku.nagano.jp", - "sakuho.nagano.jp", - "shimosuwa.nagano.jp", - "shinanomachi.nagano.jp", - "shiojiri.nagano.jp", - "suwa.nagano.jp", - "suzaka.nagano.jp", - "takagi.nagano.jp", - "takamori.nagano.jp", - "takayama.nagano.jp", - "tateshina.nagano.jp", - "tatsuno.nagano.jp", - "togakushi.nagano.jp", - "togura.nagano.jp", - "tomi.nagano.jp", - "ueda.nagano.jp", - "wada.nagano.jp", - "yamagata.nagano.jp", - "yamanouchi.nagano.jp", - "yasaka.nagano.jp", - "yasuoka.nagano.jp", - "chijiwa.nagasaki.jp", - "futsu.nagasaki.jp", - "goto.nagasaki.jp", - "hasami.nagasaki.jp", - "hirado.nagasaki.jp", - "iki.nagasaki.jp", - "isahaya.nagasaki.jp", - "kawatana.nagasaki.jp", - "kuchinotsu.nagasaki.jp", - "matsuura.nagasaki.jp", - "nagasaki.nagasaki.jp", - "obama.nagasaki.jp", - "omura.nagasaki.jp", - "oseto.nagasaki.jp", - "saikai.nagasaki.jp", - "sasebo.nagasaki.jp", - "seihi.nagasaki.jp", - "shimabara.nagasaki.jp", - "shinkamigoto.nagasaki.jp", - "togitsu.nagasaki.jp", - "tsushima.nagasaki.jp", - "unzen.nagasaki.jp", - "ando.nara.jp", - "gose.nara.jp", - "heguri.nara.jp", - "higashiyoshino.nara.jp", - "ikaruga.nara.jp", - "ikoma.nara.jp", - "kamikitayama.nara.jp", - "kanmaki.nara.jp", - "kashiba.nara.jp", - "kashihara.nara.jp", - "katsuragi.nara.jp", - "kawai.nara.jp", - "kawakami.nara.jp", - "kawanishi.nara.jp", - "koryo.nara.jp", - "kurotaki.nara.jp", - "mitsue.nara.jp", - "miyake.nara.jp", - "nara.nara.jp", - "nosegawa.nara.jp", - "oji.nara.jp", - "ouda.nara.jp", - "oyodo.nara.jp", - "sakurai.nara.jp", - "sango.nara.jp", - "shimoichi.nara.jp", - "shimokitayama.nara.jp", - "shinjo.nara.jp", - "soni.nara.jp", - "takatori.nara.jp", - "tawaramoto.nara.jp", - "tenkawa.nara.jp", - "tenri.nara.jp", - "uda.nara.jp", - "yamatokoriyama.nara.jp", - "yamatotakada.nara.jp", - "yamazoe.nara.jp", - "yoshino.nara.jp", - "aga.niigata.jp", - "agano.niigata.jp", - "gosen.niigata.jp", - "itoigawa.niigata.jp", - "izumozaki.niigata.jp", - "joetsu.niigata.jp", - "kamo.niigata.jp", - "kariwa.niigata.jp", - "kashiwazaki.niigata.jp", - "minamiuonuma.niigata.jp", - "mitsuke.niigata.jp", - "muika.niigata.jp", - "murakami.niigata.jp", - "myoko.niigata.jp", - "nagaoka.niigata.jp", - "niigata.niigata.jp", - "ojiya.niigata.jp", - "omi.niigata.jp", - "sado.niigata.jp", - "sanjo.niigata.jp", - "seiro.niigata.jp", - "seirou.niigata.jp", - "sekikawa.niigata.jp", - "shibata.niigata.jp", - "tagami.niigata.jp", - "tainai.niigata.jp", - "tochio.niigata.jp", - "tokamachi.niigata.jp", - "tsubame.niigata.jp", - "tsunan.niigata.jp", - "uonuma.niigata.jp", - "yahiko.niigata.jp", - "yoita.niigata.jp", - "yuzawa.niigata.jp", - "beppu.oita.jp", - "bungoono.oita.jp", - "bungotakada.oita.jp", - "hasama.oita.jp", - "hiji.oita.jp", - "himeshima.oita.jp", - "hita.oita.jp", - "kamitsue.oita.jp", - "kokonoe.oita.jp", - "kuju.oita.jp", - "kunisaki.oita.jp", - "kusu.oita.jp", - "oita.oita.jp", - "saiki.oita.jp", - "taketa.oita.jp", - "tsukumi.oita.jp", - "usa.oita.jp", - "usuki.oita.jp", - "yufu.oita.jp", - "akaiwa.okayama.jp", - "asakuchi.okayama.jp", - "bizen.okayama.jp", - "hayashima.okayama.jp", - "ibara.okayama.jp", - "kagamino.okayama.jp", - "kasaoka.okayama.jp", - "kibichuo.okayama.jp", - "kumenan.okayama.jp", - "kurashiki.okayama.jp", - "maniwa.okayama.jp", - "misaki.okayama.jp", - "nagi.okayama.jp", - "niimi.okayama.jp", - "nishiawakura.okayama.jp", - "okayama.okayama.jp", - "satosho.okayama.jp", - "setouchi.okayama.jp", - "shinjo.okayama.jp", - "shoo.okayama.jp", - "soja.okayama.jp", - "takahashi.okayama.jp", - "tamano.okayama.jp", - "tsuyama.okayama.jp", - "wake.okayama.jp", - "yakage.okayama.jp", - "aguni.okinawa.jp", - "ginowan.okinawa.jp", - "ginoza.okinawa.jp", - "gushikami.okinawa.jp", - "haebaru.okinawa.jp", - "higashi.okinawa.jp", - "hirara.okinawa.jp", - "iheya.okinawa.jp", - "ishigaki.okinawa.jp", - "ishikawa.okinawa.jp", - "itoman.okinawa.jp", - "izena.okinawa.jp", - "kadena.okinawa.jp", - "kin.okinawa.jp", - "kitadaito.okinawa.jp", - "kitanakagusuku.okinawa.jp", - "kumejima.okinawa.jp", - "kunigami.okinawa.jp", - "minamidaito.okinawa.jp", - "motobu.okinawa.jp", - "nago.okinawa.jp", - "naha.okinawa.jp", - "nakagusuku.okinawa.jp", - "nakijin.okinawa.jp", - "nanjo.okinawa.jp", - "nishihara.okinawa.jp", - "ogimi.okinawa.jp", - "okinawa.okinawa.jp", - "onna.okinawa.jp", - "shimoji.okinawa.jp", - "taketomi.okinawa.jp", - "tarama.okinawa.jp", - "tokashiki.okinawa.jp", - "tomigusuku.okinawa.jp", - "tonaki.okinawa.jp", - "urasoe.okinawa.jp", - "uruma.okinawa.jp", - "yaese.okinawa.jp", - "yomitan.okinawa.jp", - "yonabaru.okinawa.jp", - "yonaguni.okinawa.jp", - "zamami.okinawa.jp", - "abeno.osaka.jp", - "chihayaakasaka.osaka.jp", - "chuo.osaka.jp", - "daito.osaka.jp", - "fujiidera.osaka.jp", - "habikino.osaka.jp", - "hannan.osaka.jp", - "higashiosaka.osaka.jp", - "higashisumiyoshi.osaka.jp", - "higashiyodogawa.osaka.jp", - "hirakata.osaka.jp", - "ibaraki.osaka.jp", - "ikeda.osaka.jp", - "izumi.osaka.jp", - "izumiotsu.osaka.jp", - "izumisano.osaka.jp", - "kadoma.osaka.jp", - "kaizuka.osaka.jp", - "kanan.osaka.jp", - "kashiwara.osaka.jp", - "katano.osaka.jp", - "kawachinagano.osaka.jp", - "kishiwada.osaka.jp", - "kita.osaka.jp", - "kumatori.osaka.jp", - "matsubara.osaka.jp", - "minato.osaka.jp", - "minoh.osaka.jp", - "misaki.osaka.jp", - "moriguchi.osaka.jp", - "neyagawa.osaka.jp", - "nishi.osaka.jp", - "nose.osaka.jp", - "osakasayama.osaka.jp", - "sakai.osaka.jp", - "sayama.osaka.jp", - "sennan.osaka.jp", - "settsu.osaka.jp", - "shijonawate.osaka.jp", - "shimamoto.osaka.jp", - "suita.osaka.jp", - "tadaoka.osaka.jp", - "taishi.osaka.jp", - "tajiri.osaka.jp", - "takaishi.osaka.jp", - "takatsuki.osaka.jp", - "tondabayashi.osaka.jp", - "toyonaka.osaka.jp", - "toyono.osaka.jp", - "yao.osaka.jp", - "ariake.saga.jp", - "arita.saga.jp", - "fukudomi.saga.jp", - "genkai.saga.jp", - "hamatama.saga.jp", - "hizen.saga.jp", - "imari.saga.jp", - "kamimine.saga.jp", - "kanzaki.saga.jp", - "karatsu.saga.jp", - "kashima.saga.jp", - "kitagata.saga.jp", - "kitahata.saga.jp", - "kiyama.saga.jp", - "kouhoku.saga.jp", - "kyuragi.saga.jp", - "nishiarita.saga.jp", - "ogi.saga.jp", - "omachi.saga.jp", - "ouchi.saga.jp", - "saga.saga.jp", - "shiroishi.saga.jp", - "taku.saga.jp", - "tara.saga.jp", - "tosu.saga.jp", - "yoshinogari.saga.jp", - "arakawa.saitama.jp", - "asaka.saitama.jp", - "chichibu.saitama.jp", - "fujimi.saitama.jp", - "fujimino.saitama.jp", - "fukaya.saitama.jp", - "hanno.saitama.jp", - "hanyu.saitama.jp", - "hasuda.saitama.jp", - "hatogaya.saitama.jp", - "hatoyama.saitama.jp", - "hidaka.saitama.jp", - "higashichichibu.saitama.jp", - "higashimatsuyama.saitama.jp", - "honjo.saitama.jp", - "ina.saitama.jp", - "iruma.saitama.jp", - "iwatsuki.saitama.jp", - "kamiizumi.saitama.jp", - "kamikawa.saitama.jp", - "kamisato.saitama.jp", - "kasukabe.saitama.jp", - "kawagoe.saitama.jp", - "kawaguchi.saitama.jp", - "kawajima.saitama.jp", - "kazo.saitama.jp", - "kitamoto.saitama.jp", - "koshigaya.saitama.jp", - "kounosu.saitama.jp", - "kuki.saitama.jp", - "kumagaya.saitama.jp", - "matsubushi.saitama.jp", - "minano.saitama.jp", - "misato.saitama.jp", - "miyashiro.saitama.jp", - "miyoshi.saitama.jp", - "moroyama.saitama.jp", - "nagatoro.saitama.jp", - "namegawa.saitama.jp", - "niiza.saitama.jp", - "ogano.saitama.jp", - "ogawa.saitama.jp", - "ogose.saitama.jp", - "okegawa.saitama.jp", - "omiya.saitama.jp", - "otaki.saitama.jp", - "ranzan.saitama.jp", - "ryokami.saitama.jp", - "saitama.saitama.jp", - "sakado.saitama.jp", - "satte.saitama.jp", - "sayama.saitama.jp", - "shiki.saitama.jp", - "shiraoka.saitama.jp", - "soka.saitama.jp", - "sugito.saitama.jp", - "toda.saitama.jp", - "tokigawa.saitama.jp", - "tokorozawa.saitama.jp", - "tsurugashima.saitama.jp", - "urawa.saitama.jp", - "warabi.saitama.jp", - "yashio.saitama.jp", - "yokoze.saitama.jp", - "yono.saitama.jp", - "yorii.saitama.jp", - "yoshida.saitama.jp", - "yoshikawa.saitama.jp", - "yoshimi.saitama.jp", - "aisho.shiga.jp", - "gamo.shiga.jp", - "higashiomi.shiga.jp", - "hikone.shiga.jp", - "koka.shiga.jp", - "konan.shiga.jp", - "kosei.shiga.jp", - "koto.shiga.jp", - "kusatsu.shiga.jp", - "maibara.shiga.jp", - "moriyama.shiga.jp", - "nagahama.shiga.jp", - "nishiazai.shiga.jp", - "notogawa.shiga.jp", - "omihachiman.shiga.jp", - "otsu.shiga.jp", - "ritto.shiga.jp", - "ryuoh.shiga.jp", - "takashima.shiga.jp", - "takatsuki.shiga.jp", - "torahime.shiga.jp", - "toyosato.shiga.jp", - "yasu.shiga.jp", - "akagi.shimane.jp", - "ama.shimane.jp", - "gotsu.shimane.jp", - "hamada.shimane.jp", - "higashiizumo.shimane.jp", - "hikawa.shimane.jp", - "hikimi.shimane.jp", - "izumo.shimane.jp", - "kakinoki.shimane.jp", - "masuda.shimane.jp", - "matsue.shimane.jp", - "misato.shimane.jp", - "nishinoshima.shimane.jp", - "ohda.shimane.jp", - "okinoshima.shimane.jp", - "okuizumo.shimane.jp", - "shimane.shimane.jp", - "tamayu.shimane.jp", - "tsuwano.shimane.jp", - "unnan.shimane.jp", - "yakumo.shimane.jp", - "yasugi.shimane.jp", - "yatsuka.shimane.jp", - "arai.shizuoka.jp", - "atami.shizuoka.jp", - "fuji.shizuoka.jp", - "fujieda.shizuoka.jp", - "fujikawa.shizuoka.jp", - "fujinomiya.shizuoka.jp", - "fukuroi.shizuoka.jp", - "gotemba.shizuoka.jp", - "haibara.shizuoka.jp", - "hamamatsu.shizuoka.jp", - "higashiizu.shizuoka.jp", - "ito.shizuoka.jp", - "iwata.shizuoka.jp", - "izu.shizuoka.jp", - "izunokuni.shizuoka.jp", - "kakegawa.shizuoka.jp", - "kannami.shizuoka.jp", - "kawanehon.shizuoka.jp", - "kawazu.shizuoka.jp", - "kikugawa.shizuoka.jp", - "kosai.shizuoka.jp", - "makinohara.shizuoka.jp", - "matsuzaki.shizuoka.jp", - "minamiizu.shizuoka.jp", - "mishima.shizuoka.jp", - "morimachi.shizuoka.jp", - "nishiizu.shizuoka.jp", - "numazu.shizuoka.jp", - "omaezaki.shizuoka.jp", - "shimada.shizuoka.jp", - "shimizu.shizuoka.jp", - "shimoda.shizuoka.jp", - "shizuoka.shizuoka.jp", - "susono.shizuoka.jp", - "yaizu.shizuoka.jp", - "yoshida.shizuoka.jp", - "ashikaga.tochigi.jp", - "bato.tochigi.jp", - "haga.tochigi.jp", - "ichikai.tochigi.jp", - "iwafune.tochigi.jp", - "kaminokawa.tochigi.jp", - "kanuma.tochigi.jp", - "karasuyama.tochigi.jp", - "kuroiso.tochigi.jp", - "mashiko.tochigi.jp", - "mibu.tochigi.jp", - "moka.tochigi.jp", - "motegi.tochigi.jp", - "nasu.tochigi.jp", - "nasushiobara.tochigi.jp", - "nikko.tochigi.jp", - "nishikata.tochigi.jp", - "nogi.tochigi.jp", - "ohira.tochigi.jp", - "ohtawara.tochigi.jp", - "oyama.tochigi.jp", - "sakura.tochigi.jp", - "sano.tochigi.jp", - "shimotsuke.tochigi.jp", - "shioya.tochigi.jp", - "takanezawa.tochigi.jp", - "tochigi.tochigi.jp", - "tsuga.tochigi.jp", - "ujiie.tochigi.jp", - "utsunomiya.tochigi.jp", - "yaita.tochigi.jp", - "aizumi.tokushima.jp", - "anan.tokushima.jp", - "ichiba.tokushima.jp", - "itano.tokushima.jp", - "kainan.tokushima.jp", - "komatsushima.tokushima.jp", - "matsushige.tokushima.jp", - "mima.tokushima.jp", - "minami.tokushima.jp", - "miyoshi.tokushima.jp", - "mugi.tokushima.jp", - "nakagawa.tokushima.jp", - "naruto.tokushima.jp", - "sanagochi.tokushima.jp", - "shishikui.tokushima.jp", - "tokushima.tokushima.jp", - "wajiki.tokushima.jp", - "adachi.tokyo.jp", - "akiruno.tokyo.jp", - "akishima.tokyo.jp", - "aogashima.tokyo.jp", - "arakawa.tokyo.jp", - "bunkyo.tokyo.jp", - "chiyoda.tokyo.jp", - "chofu.tokyo.jp", - "chuo.tokyo.jp", - "edogawa.tokyo.jp", - "fuchu.tokyo.jp", - "fussa.tokyo.jp", - "hachijo.tokyo.jp", - "hachioji.tokyo.jp", - "hamura.tokyo.jp", - "higashikurume.tokyo.jp", - "higashimurayama.tokyo.jp", - "higashiyamato.tokyo.jp", - "hino.tokyo.jp", - "hinode.tokyo.jp", - "hinohara.tokyo.jp", - "inagi.tokyo.jp", - "itabashi.tokyo.jp", - "katsushika.tokyo.jp", - "kita.tokyo.jp", - "kiyose.tokyo.jp", - "kodaira.tokyo.jp", - "koganei.tokyo.jp", - "kokubunji.tokyo.jp", - "komae.tokyo.jp", - "koto.tokyo.jp", - "kouzushima.tokyo.jp", - "kunitachi.tokyo.jp", - "machida.tokyo.jp", - "meguro.tokyo.jp", - "minato.tokyo.jp", - "mitaka.tokyo.jp", - "mizuho.tokyo.jp", - "musashimurayama.tokyo.jp", - "musashino.tokyo.jp", - "nakano.tokyo.jp", - "nerima.tokyo.jp", - "ogasawara.tokyo.jp", - "okutama.tokyo.jp", - "ome.tokyo.jp", - "oshima.tokyo.jp", - "ota.tokyo.jp", - "setagaya.tokyo.jp", - "shibuya.tokyo.jp", - "shinagawa.tokyo.jp", - "shinjuku.tokyo.jp", - "suginami.tokyo.jp", - "sumida.tokyo.jp", - "tachikawa.tokyo.jp", - "taito.tokyo.jp", - "tama.tokyo.jp", - "toshima.tokyo.jp", - "chizu.tottori.jp", - "hino.tottori.jp", - "kawahara.tottori.jp", - "koge.tottori.jp", - "kotoura.tottori.jp", - "misasa.tottori.jp", - "nanbu.tottori.jp", - "nichinan.tottori.jp", - "sakaiminato.tottori.jp", - "tottori.tottori.jp", - "wakasa.tottori.jp", - "yazu.tottori.jp", - "yonago.tottori.jp", - "asahi.toyama.jp", - "fuchu.toyama.jp", - "fukumitsu.toyama.jp", - "funahashi.toyama.jp", - "himi.toyama.jp", - "imizu.toyama.jp", - "inami.toyama.jp", - "johana.toyama.jp", - "kamiichi.toyama.jp", - "kurobe.toyama.jp", - "nakaniikawa.toyama.jp", - "namerikawa.toyama.jp", - "nanto.toyama.jp", - "nyuzen.toyama.jp", - "oyabe.toyama.jp", - "taira.toyama.jp", - "takaoka.toyama.jp", - "tateyama.toyama.jp", - "toga.toyama.jp", - "tonami.toyama.jp", - "toyama.toyama.jp", - "unazuki.toyama.jp", - "uozu.toyama.jp", - "yamada.toyama.jp", - "arida.wakayama.jp", - "aridagawa.wakayama.jp", - "gobo.wakayama.jp", - "hashimoto.wakayama.jp", - "hidaka.wakayama.jp", - "hirogawa.wakayama.jp", - "inami.wakayama.jp", - "iwade.wakayama.jp", - "kainan.wakayama.jp", - "kamitonda.wakayama.jp", - "katsuragi.wakayama.jp", - "kimino.wakayama.jp", - "kinokawa.wakayama.jp", - "kitayama.wakayama.jp", - "koya.wakayama.jp", - "koza.wakayama.jp", - "kozagawa.wakayama.jp", - "kudoyama.wakayama.jp", - "kushimoto.wakayama.jp", - "mihama.wakayama.jp", - "misato.wakayama.jp", - "nachikatsuura.wakayama.jp", - "shingu.wakayama.jp", - "shirahama.wakayama.jp", - "taiji.wakayama.jp", - "tanabe.wakayama.jp", - "wakayama.wakayama.jp", - "yuasa.wakayama.jp", - "yura.wakayama.jp", - "asahi.yamagata.jp", - "funagata.yamagata.jp", - "higashine.yamagata.jp", - "iide.yamagata.jp", - "kahoku.yamagata.jp", - "kaminoyama.yamagata.jp", - "kaneyama.yamagata.jp", - "kawanishi.yamagata.jp", - "mamurogawa.yamagata.jp", - "mikawa.yamagata.jp", - "murayama.yamagata.jp", - "nagai.yamagata.jp", - "nakayama.yamagata.jp", - "nanyo.yamagata.jp", - "nishikawa.yamagata.jp", - "obanazawa.yamagata.jp", - "oe.yamagata.jp", - "oguni.yamagata.jp", - "ohkura.yamagata.jp", - "oishida.yamagata.jp", - "sagae.yamagata.jp", - "sakata.yamagata.jp", - "sakegawa.yamagata.jp", - "shinjo.yamagata.jp", - "shirataka.yamagata.jp", - "shonai.yamagata.jp", - "takahata.yamagata.jp", - "tendo.yamagata.jp", - "tozawa.yamagata.jp", - "tsuruoka.yamagata.jp", - "yamagata.yamagata.jp", - "yamanobe.yamagata.jp", - "yonezawa.yamagata.jp", - "yuza.yamagata.jp", - "abu.yamaguchi.jp", - "hagi.yamaguchi.jp", - "hikari.yamaguchi.jp", - "hofu.yamaguchi.jp", - "iwakuni.yamaguchi.jp", - "kudamatsu.yamaguchi.jp", - "mitou.yamaguchi.jp", - "nagato.yamaguchi.jp", - "oshima.yamaguchi.jp", - "shimonoseki.yamaguchi.jp", - "shunan.yamaguchi.jp", - "tabuse.yamaguchi.jp", - "tokuyama.yamaguchi.jp", - "toyota.yamaguchi.jp", - "ube.yamaguchi.jp", - "yuu.yamaguchi.jp", - "chuo.yamanashi.jp", - "doshi.yamanashi.jp", - "fuefuki.yamanashi.jp", - "fujikawa.yamanashi.jp", - "fujikawaguchiko.yamanashi.jp", - "fujiyoshida.yamanashi.jp", - "hayakawa.yamanashi.jp", - "hokuto.yamanashi.jp", - "ichikawamisato.yamanashi.jp", - "kai.yamanashi.jp", - "kofu.yamanashi.jp", - "koshu.yamanashi.jp", - "kosuge.yamanashi.jp", - "minami-alps.yamanashi.jp", - "minobu.yamanashi.jp", - "nakamichi.yamanashi.jp", - "nanbu.yamanashi.jp", - "narusawa.yamanashi.jp", - "nirasaki.yamanashi.jp", - "nishikatsura.yamanashi.jp", - "oshino.yamanashi.jp", - "otsuki.yamanashi.jp", - "showa.yamanashi.jp", - "tabayama.yamanashi.jp", - "tsuru.yamanashi.jp", - "uenohara.yamanashi.jp", - "yamanakako.yamanashi.jp", - "yamanashi.yamanashi.jp", - "ke", - "ac.ke", - "co.ke", - "go.ke", - "info.ke", - "me.ke", - "mobi.ke", - "ne.ke", - "or.ke", - "sc.ke", - "kg", - "org.kg", - "net.kg", - "com.kg", - "edu.kg", - "gov.kg", - "mil.kg", - "*.kh", - "ki", - "edu.ki", - "biz.ki", - "net.ki", - "org.ki", - "gov.ki", - "info.ki", - "com.ki", - "km", - "org.km", - "nom.km", - "gov.km", - "prd.km", - "tm.km", - "edu.km", - "mil.km", - "ass.km", - "com.km", - "coop.km", - "asso.km", - "presse.km", - "medecin.km", - "notaires.km", - "pharmaciens.km", - "veterinaire.km", - "gouv.km", - "kn", - "net.kn", - "org.kn", - "edu.kn", - "gov.kn", - "kp", - "com.kp", - "edu.kp", - "gov.kp", - "org.kp", - "rep.kp", - "tra.kp", - "kr", - "ac.kr", - "co.kr", - "es.kr", - "go.kr", - "hs.kr", - "kg.kr", - "mil.kr", - "ms.kr", - "ne.kr", - "or.kr", - "pe.kr", - "re.kr", - "sc.kr", - "busan.kr", - "chungbuk.kr", - "chungnam.kr", - "daegu.kr", - "daejeon.kr", - "gangwon.kr", - "gwangju.kr", - "gyeongbuk.kr", - "gyeonggi.kr", - "gyeongnam.kr", - "incheon.kr", - "jeju.kr", - "jeonbuk.kr", - "jeonnam.kr", - "seoul.kr", - "ulsan.kr", - "*.kw", - "ky", - "edu.ky", - "gov.ky", - "com.ky", - "org.ky", - "net.ky", - "kz", - "org.kz", - "edu.kz", - "net.kz", - "gov.kz", - "mil.kz", - "com.kz", - "la", - "int.la", - "net.la", - "info.la", - "edu.la", - "gov.la", - "per.la", - "com.la", - "org.la", - "lb", - "com.lb", - "edu.lb", - "gov.lb", - "net.lb", - "org.lb", - "lc", - "com.lc", - "net.lc", - "co.lc", - "org.lc", - "edu.lc", - "gov.lc", - "li", - "lk", - "gov.lk", - "sch.lk", - "net.lk", - "int.lk", - "com.lk", - "org.lk", - "edu.lk", - "ngo.lk", - "soc.lk", - "web.lk", - "ltd.lk", - "assn.lk", - "grp.lk", - "hotel.lk", - "ac.lk", - "lr", - "com.lr", - "edu.lr", - "gov.lr", - "org.lr", - "net.lr", - "ls", - "co.ls", - "org.ls", - "lt", - "gov.lt", - "lu", - "lv", - "com.lv", - "edu.lv", - "gov.lv", - "org.lv", - "mil.lv", - "id.lv", - "net.lv", - "asn.lv", - "conf.lv", - "ly", - "com.ly", - "net.ly", - "gov.ly", - "plc.ly", - "edu.ly", - "sch.ly", - "med.ly", - "org.ly", - "id.ly", - "ma", - "co.ma", - "net.ma", - "gov.ma", - "org.ma", - "ac.ma", - "press.ma", - "mc", - "tm.mc", - "asso.mc", - "md", - "me", - "co.me", - "net.me", - "org.me", - "edu.me", - "ac.me", - "gov.me", - "its.me", - "priv.me", - "mg", - "org.mg", - "nom.mg", - "gov.mg", - "prd.mg", - "tm.mg", - "edu.mg", - "mil.mg", - "com.mg", - "co.mg", - "mh", - "mil", - "mk", - "com.mk", - "org.mk", - "net.mk", - "edu.mk", - "gov.mk", - "inf.mk", - "name.mk", - "ml", - "com.ml", - "edu.ml", - "gouv.ml", - "gov.ml", - "net.ml", - "org.ml", - "presse.ml", - "*.mm", - "mn", - "gov.mn", - "edu.mn", - "org.mn", - "mo", - "com.mo", - "net.mo", - "org.mo", - "edu.mo", - "gov.mo", - "mobi", - "mp", - "mq", - "mr", - "gov.mr", - "ms", - "com.ms", - "edu.ms", - "gov.ms", - "net.ms", - "org.ms", - "mt", - "com.mt", - "edu.mt", - "net.mt", - "org.mt", - "mu", - "com.mu", - "net.mu", - "org.mu", - "gov.mu", - "ac.mu", - "co.mu", - "or.mu", - "museum", - "academy.museum", - "agriculture.museum", - "air.museum", - "airguard.museum", - "alabama.museum", - "alaska.museum", - "amber.museum", - "ambulance.museum", - "american.museum", - "americana.museum", - "americanantiques.museum", - "americanart.museum", - "amsterdam.museum", - "and.museum", - "annefrank.museum", - "anthro.museum", - "anthropology.museum", - "antiques.museum", - "aquarium.museum", - "arboretum.museum", - "archaeological.museum", - "archaeology.museum", - "architecture.museum", - "art.museum", - "artanddesign.museum", - "artcenter.museum", - "artdeco.museum", - "arteducation.museum", - "artgallery.museum", - "arts.museum", - "artsandcrafts.museum", - "asmatart.museum", - "assassination.museum", - "assisi.museum", - "association.museum", - "astronomy.museum", - "atlanta.museum", - "austin.museum", - "australia.museum", - "automotive.museum", - "aviation.museum", - "axis.museum", - "badajoz.museum", - "baghdad.museum", - "bahn.museum", - "bale.museum", - "baltimore.museum", - "barcelona.museum", - "baseball.museum", - "basel.museum", - "baths.museum", - "bauern.museum", - "beauxarts.museum", - "beeldengeluid.museum", - "bellevue.museum", - "bergbau.museum", - "berkeley.museum", - "berlin.museum", - "bern.museum", - "bible.museum", - "bilbao.museum", - "bill.museum", - "birdart.museum", - "birthplace.museum", - "bonn.museum", - "boston.museum", - "botanical.museum", - "botanicalgarden.museum", - "botanicgarden.museum", - "botany.museum", - "brandywinevalley.museum", - "brasil.museum", - "bristol.museum", - "british.museum", - "britishcolumbia.museum", - "broadcast.museum", - "brunel.museum", - "brussel.museum", - "brussels.museum", - "bruxelles.museum", - "building.museum", - "burghof.museum", - "bus.museum", - "bushey.museum", - "cadaques.museum", - "california.museum", - "cambridge.museum", - "can.museum", - "canada.museum", - "capebreton.museum", - "carrier.museum", - "cartoonart.museum", - "casadelamoneda.museum", - "castle.museum", - "castres.museum", - "celtic.museum", - "center.museum", - "chattanooga.museum", - "cheltenham.museum", - "chesapeakebay.museum", - "chicago.museum", - "children.museum", - "childrens.museum", - "childrensgarden.museum", - "chiropractic.museum", - "chocolate.museum", - "christiansburg.museum", - "cincinnati.museum", - "cinema.museum", - "circus.museum", - "civilisation.museum", - "civilization.museum", - "civilwar.museum", - "clinton.museum", - "clock.museum", - "coal.museum", - "coastaldefence.museum", - "cody.museum", - "coldwar.museum", - "collection.museum", - "colonialwilliamsburg.museum", - "coloradoplateau.museum", - "columbia.museum", - "columbus.museum", - "communication.museum", - "communications.museum", - "community.museum", - "computer.museum", - "computerhistory.museum", - "xn--comunicaes-v6a2o.museum", - "contemporary.museum", - "contemporaryart.museum", - "convent.museum", - "copenhagen.museum", - "corporation.museum", - "xn--correios-e-telecomunicaes-ghc29a.museum", - "corvette.museum", - "costume.museum", - "countryestate.museum", - "county.museum", - "crafts.museum", - "cranbrook.museum", - "creation.museum", - "cultural.museum", - "culturalcenter.museum", - "culture.museum", - "cyber.museum", - "cymru.museum", - "dali.museum", - "dallas.museum", - "database.museum", - "ddr.museum", - "decorativearts.museum", - "delaware.museum", - "delmenhorst.museum", - "denmark.museum", - "depot.museum", - "design.museum", - "detroit.museum", - "dinosaur.museum", - "discovery.museum", - "dolls.museum", - "donostia.museum", - "durham.museum", - "eastafrica.museum", - "eastcoast.museum", - "education.museum", - "educational.museum", - "egyptian.museum", - "eisenbahn.museum", - "elburg.museum", - "elvendrell.museum", - "embroidery.museum", - "encyclopedic.museum", - "england.museum", - "entomology.museum", - "environment.museum", - "environmentalconservation.museum", - "epilepsy.museum", - "essex.museum", - "estate.museum", - "ethnology.museum", - "exeter.museum", - "exhibition.museum", - "family.museum", - "farm.museum", - "farmequipment.museum", - "farmers.museum", - "farmstead.museum", - "field.museum", - "figueres.museum", - "filatelia.museum", - "film.museum", - "fineart.museum", - "finearts.museum", - "finland.museum", - "flanders.museum", - "florida.museum", - "force.museum", - "fortmissoula.museum", - "fortworth.museum", - "foundation.museum", - "francaise.museum", - "frankfurt.museum", - "franziskaner.museum", - "freemasonry.museum", - "freiburg.museum", - "fribourg.museum", - "frog.museum", - "fundacio.museum", - "furniture.museum", - "gallery.museum", - "garden.museum", - "gateway.museum", - "geelvinck.museum", - "gemological.museum", - "geology.museum", - "georgia.museum", - "giessen.museum", - "glas.museum", - "glass.museum", - "gorge.museum", - "grandrapids.museum", - "graz.museum", - "guernsey.museum", - "halloffame.museum", - "hamburg.museum", - "handson.museum", - "harvestcelebration.museum", - "hawaii.museum", - "health.museum", - "heimatunduhren.museum", - "hellas.museum", - "helsinki.museum", - "hembygdsforbund.museum", - "heritage.museum", - "histoire.museum", - "historical.museum", - "historicalsociety.museum", - "historichouses.museum", - "historisch.museum", - "historisches.museum", - "history.museum", - "historyofscience.museum", - "horology.museum", - "house.museum", - "humanities.museum", - "illustration.museum", - "imageandsound.museum", - "indian.museum", - "indiana.museum", - "indianapolis.museum", - "indianmarket.museum", - "intelligence.museum", - "interactive.museum", - "iraq.museum", - "iron.museum", - "isleofman.museum", - "jamison.museum", - "jefferson.museum", - "jerusalem.museum", - "jewelry.museum", - "jewish.museum", - "jewishart.museum", - "jfk.museum", - "journalism.museum", - "judaica.museum", - "judygarland.museum", - "juedisches.museum", - "juif.museum", - "karate.museum", - "karikatur.museum", - "kids.museum", - "koebenhavn.museum", - "koeln.museum", - "kunst.museum", - "kunstsammlung.museum", - "kunstunddesign.museum", - "labor.museum", - "labour.museum", - "lajolla.museum", - "lancashire.museum", - "landes.museum", - "lans.museum", - "xn--lns-qla.museum", - "larsson.museum", - "lewismiller.museum", - "lincoln.museum", - "linz.museum", - "living.museum", - "livinghistory.museum", - "localhistory.museum", - "london.museum", - "losangeles.museum", - "louvre.museum", - "loyalist.museum", - "lucerne.museum", - "luxembourg.museum", - "luzern.museum", - "mad.museum", - "madrid.museum", - "mallorca.museum", - "manchester.museum", - "mansion.museum", - "mansions.museum", - "manx.museum", - "marburg.museum", - "maritime.museum", - "maritimo.museum", - "maryland.museum", - "marylhurst.museum", - "media.museum", - "medical.museum", - "medizinhistorisches.museum", - "meeres.museum", - "memorial.museum", - "mesaverde.museum", - "michigan.museum", - "midatlantic.museum", - "military.museum", - "mill.museum", - "miners.museum", - "mining.museum", - "minnesota.museum", - "missile.museum", - "missoula.museum", - "modern.museum", - "moma.museum", - "money.museum", - "monmouth.museum", - "monticello.museum", - "montreal.museum", - "moscow.museum", - "motorcycle.museum", - "muenchen.museum", - "muenster.museum", - "mulhouse.museum", - "muncie.museum", - "museet.museum", - "museumcenter.museum", - "museumvereniging.museum", - "music.museum", - "national.museum", - "nationalfirearms.museum", - "nationalheritage.museum", - "nativeamerican.museum", - "naturalhistory.museum", - "naturalhistorymuseum.museum", - "naturalsciences.museum", - "nature.museum", - "naturhistorisches.museum", - "natuurwetenschappen.museum", - "naumburg.museum", - "naval.museum", - "nebraska.museum", - "neues.museum", - "newhampshire.museum", - "newjersey.museum", - "newmexico.museum", - "newport.museum", - "newspaper.museum", - "newyork.museum", - "niepce.museum", - "norfolk.museum", - "north.museum", - "nrw.museum", - "nuernberg.museum", - "nuremberg.museum", - "nyc.museum", - "nyny.museum", - "oceanographic.museum", - "oceanographique.museum", - "omaha.museum", - "online.museum", - "ontario.museum", - "openair.museum", - "oregon.museum", - "oregontrail.museum", - "otago.museum", - "oxford.museum", - "pacific.museum", - "paderborn.museum", - "palace.museum", - "paleo.museum", - "palmsprings.museum", - "panama.museum", - "paris.museum", - "pasadena.museum", - "pharmacy.museum", - "philadelphia.museum", - "philadelphiaarea.museum", - "philately.museum", - "phoenix.museum", - "photography.museum", - "pilots.museum", - "pittsburgh.museum", - "planetarium.museum", - "plantation.museum", - "plants.museum", - "plaza.museum", - "portal.museum", - "portland.museum", - "portlligat.museum", - "posts-and-telecommunications.museum", - "preservation.museum", - "presidio.museum", - "press.museum", - "project.museum", - "public.museum", - "pubol.museum", - "quebec.museum", - "railroad.museum", - "railway.museum", - "research.museum", - "resistance.museum", - "riodejaneiro.museum", - "rochester.museum", - "rockart.museum", - "roma.museum", - "russia.museum", - "saintlouis.museum", - "salem.museum", - "salvadordali.museum", - "salzburg.museum", - "sandiego.museum", - "sanfrancisco.museum", - "santabarbara.museum", - "santacruz.museum", - "santafe.museum", - "saskatchewan.museum", - "satx.museum", - "savannahga.museum", - "schlesisches.museum", - "schoenbrunn.museum", - "schokoladen.museum", - "school.museum", - "schweiz.museum", - "science.museum", - "scienceandhistory.museum", - "scienceandindustry.museum", - "sciencecenter.museum", - "sciencecenters.museum", - "science-fiction.museum", - "sciencehistory.museum", - "sciences.museum", - "sciencesnaturelles.museum", - "scotland.museum", - "seaport.museum", - "settlement.museum", - "settlers.museum", - "shell.museum", - "sherbrooke.museum", - "sibenik.museum", - "silk.museum", - "ski.museum", - "skole.museum", - "society.museum", - "sologne.museum", - "soundandvision.museum", - "southcarolina.museum", - "southwest.museum", - "space.museum", - "spy.museum", - "square.museum", - "stadt.museum", - "stalbans.museum", - "starnberg.museum", - "state.museum", - "stateofdelaware.museum", - "station.museum", - "steam.museum", - "steiermark.museum", - "stjohn.museum", - "stockholm.museum", - "stpetersburg.museum", - "stuttgart.museum", - "suisse.museum", - "surgeonshall.museum", - "surrey.museum", - "svizzera.museum", - "sweden.museum", - "sydney.museum", - "tank.museum", - "tcm.museum", - "technology.museum", - "telekommunikation.museum", - "television.museum", - "texas.museum", - "textile.museum", - "theater.museum", - "time.museum", - "timekeeping.museum", - "topology.museum", - "torino.museum", - "touch.museum", - "town.museum", - "transport.museum", - "tree.museum", - "trolley.museum", - "trust.museum", - "trustee.museum", - "uhren.museum", - "ulm.museum", - "undersea.museum", - "university.museum", - "usa.museum", - "usantiques.museum", - "usarts.museum", - "uscountryestate.museum", - "usculture.museum", - "usdecorativearts.museum", - "usgarden.museum", - "ushistory.museum", - "ushuaia.museum", - "uslivinghistory.museum", - "utah.museum", - "uvic.museum", - "valley.museum", - "vantaa.museum", - "versailles.museum", - "viking.museum", - "village.museum", - "virginia.museum", - "virtual.museum", - "virtuel.museum", - "vlaanderen.museum", - "volkenkunde.museum", - "wales.museum", - "wallonie.museum", - "war.museum", - "washingtondc.museum", - "watchandclock.museum", - "watch-and-clock.museum", - "western.museum", - "westfalen.museum", - "whaling.museum", - "wildlife.museum", - "williamsburg.museum", - "windmill.museum", - "workshop.museum", - "york.museum", - "yorkshire.museum", - "yosemite.museum", - "youth.museum", - "zoological.museum", - "zoology.museum", - "xn--9dbhblg6di.museum", - "xn--h1aegh.museum", - "mv", - "aero.mv", - "biz.mv", - "com.mv", - "coop.mv", - "edu.mv", - "gov.mv", - "info.mv", - "int.mv", - "mil.mv", - "museum.mv", - "name.mv", - "net.mv", - "org.mv", - "pro.mv", - "mw", - "ac.mw", - "biz.mw", - "co.mw", - "com.mw", - "coop.mw", - "edu.mw", - "gov.mw", - "int.mw", - "museum.mw", - "net.mw", - "org.mw", - "mx", - "com.mx", - "org.mx", - "gob.mx", - "edu.mx", - "net.mx", - "my", - "com.my", - "net.my", - "org.my", - "gov.my", - "edu.my", - "mil.my", - "name.my", - "mz", - "ac.mz", - "adv.mz", - "co.mz", - "edu.mz", - "gov.mz", - "mil.mz", - "net.mz", - "org.mz", - "na", - "info.na", - "pro.na", - "name.na", - "school.na", - "or.na", - "dr.na", - "us.na", - "mx.na", - "ca.na", - "in.na", - "cc.na", - "tv.na", - "ws.na", - "mobi.na", - "co.na", - "com.na", - "org.na", - "name", - "nc", - "asso.nc", - "nom.nc", - "ne", - "net", - "nf", - "com.nf", - "net.nf", - "per.nf", - "rec.nf", - "web.nf", - "arts.nf", - "firm.nf", - "info.nf", - "other.nf", - "store.nf", - "ng", - "com.ng", - "edu.ng", - "gov.ng", - "i.ng", - "mil.ng", - "mobi.ng", - "name.ng", - "net.ng", - "org.ng", - "sch.ng", - "ni", - "ac.ni", - "biz.ni", - "co.ni", - "com.ni", - "edu.ni", - "gob.ni", - "in.ni", - "info.ni", - "int.ni", - "mil.ni", - "net.ni", - "nom.ni", - "org.ni", - "web.ni", - "nl", - "bv.nl", - "no", - "fhs.no", - "vgs.no", - "fylkesbibl.no", - "folkebibl.no", - "museum.no", - "idrett.no", - "priv.no", - "mil.no", - "stat.no", - "dep.no", - "kommune.no", - "herad.no", - "aa.no", - "ah.no", - "bu.no", - "fm.no", - "hl.no", - "hm.no", - "jan-mayen.no", - "mr.no", - "nl.no", - "nt.no", - "of.no", - "ol.no", - "oslo.no", - "rl.no", - "sf.no", - "st.no", - "svalbard.no", - "tm.no", - "tr.no", - "va.no", - "vf.no", - "gs.aa.no", - "gs.ah.no", - "gs.bu.no", - "gs.fm.no", - "gs.hl.no", - "gs.hm.no", - "gs.jan-mayen.no", - "gs.mr.no", - "gs.nl.no", - "gs.nt.no", - "gs.of.no", - "gs.ol.no", - "gs.oslo.no", - "gs.rl.no", - "gs.sf.no", - "gs.st.no", - "gs.svalbard.no", - "gs.tm.no", - "gs.tr.no", - "gs.va.no", - "gs.vf.no", - "akrehamn.no", - "xn--krehamn-dxa.no", - "algard.no", - "xn--lgrd-poac.no", - "arna.no", - "brumunddal.no", - "bryne.no", - "bronnoysund.no", - "xn--brnnysund-m8ac.no", - "drobak.no", - "xn--drbak-wua.no", - "egersund.no", - "fetsund.no", - "floro.no", - "xn--flor-jra.no", - "fredrikstad.no", - "hokksund.no", - "honefoss.no", - "xn--hnefoss-q1a.no", - "jessheim.no", - "jorpeland.no", - "xn--jrpeland-54a.no", - "kirkenes.no", - "kopervik.no", - "krokstadelva.no", - "langevag.no", - "xn--langevg-jxa.no", - "leirvik.no", - "mjondalen.no", - "xn--mjndalen-64a.no", - "mo-i-rana.no", - "mosjoen.no", - "xn--mosjen-eya.no", - "nesoddtangen.no", - "orkanger.no", - "osoyro.no", - "xn--osyro-wua.no", - "raholt.no", - "xn--rholt-mra.no", - "sandnessjoen.no", - "xn--sandnessjen-ogb.no", - "skedsmokorset.no", - "slattum.no", - "spjelkavik.no", - "stathelle.no", - "stavern.no", - "stjordalshalsen.no", - "xn--stjrdalshalsen-sqb.no", - "tananger.no", - "tranby.no", - "vossevangen.no", - "afjord.no", - "xn--fjord-lra.no", - "agdenes.no", - "al.no", - "xn--l-1fa.no", - "alesund.no", - "xn--lesund-hua.no", - "alstahaug.no", - "alta.no", - "xn--lt-liac.no", - "alaheadju.no", - "xn--laheadju-7ya.no", - "alvdal.no", - "amli.no", - "xn--mli-tla.no", - "amot.no", - "xn--mot-tla.no", - "andebu.no", - "andoy.no", - "xn--andy-ira.no", - "andasuolo.no", - "ardal.no", - "xn--rdal-poa.no", - "aremark.no", - "arendal.no", - "xn--s-1fa.no", - "aseral.no", - "xn--seral-lra.no", - "asker.no", - "askim.no", - "askvoll.no", - "askoy.no", - "xn--asky-ira.no", - "asnes.no", - "xn--snes-poa.no", - "audnedaln.no", - "aukra.no", - "aure.no", - "aurland.no", - "aurskog-holand.no", - "xn--aurskog-hland-jnb.no", - "austevoll.no", - "austrheim.no", - "averoy.no", - "xn--avery-yua.no", - "balestrand.no", - "ballangen.no", - "balat.no", - "xn--blt-elab.no", - "balsfjord.no", - "bahccavuotna.no", - "xn--bhccavuotna-k7a.no", - "bamble.no", - "bardu.no", - "beardu.no", - "beiarn.no", - "bajddar.no", - "xn--bjddar-pta.no", - "baidar.no", - "xn--bidr-5nac.no", - "berg.no", - "bergen.no", - "berlevag.no", - "xn--berlevg-jxa.no", - "bearalvahki.no", - "xn--bearalvhki-y4a.no", - "bindal.no", - "birkenes.no", - "bjarkoy.no", - "xn--bjarky-fya.no", - "bjerkreim.no", - "bjugn.no", - "bodo.no", - "xn--bod-2na.no", - "badaddja.no", - "xn--bdddj-mrabd.no", - "budejju.no", - "bokn.no", - "bremanger.no", - "bronnoy.no", - "xn--brnny-wuac.no", - "bygland.no", - "bykle.no", - "barum.no", - "xn--brum-voa.no", - "bo.telemark.no", - "xn--b-5ga.telemark.no", - "bo.nordland.no", - "xn--b-5ga.nordland.no", - "bievat.no", - "xn--bievt-0qa.no", - "bomlo.no", - "xn--bmlo-gra.no", - "batsfjord.no", - "xn--btsfjord-9za.no", - "bahcavuotna.no", - "xn--bhcavuotna-s4a.no", - "dovre.no", - "drammen.no", - "drangedal.no", - "dyroy.no", - "xn--dyry-ira.no", - "donna.no", - "xn--dnna-gra.no", - "eid.no", - "eidfjord.no", - "eidsberg.no", - "eidskog.no", - "eidsvoll.no", - "eigersund.no", - "elverum.no", - "enebakk.no", - "engerdal.no", - "etne.no", - "etnedal.no", - "evenes.no", - "evenassi.no", - "xn--eveni-0qa01ga.no", - "evje-og-hornnes.no", - "farsund.no", - "fauske.no", - "fuossko.no", - "fuoisku.no", - "fedje.no", - "fet.no", - "finnoy.no", - "xn--finny-yua.no", - "fitjar.no", - "fjaler.no", - "fjell.no", - "flakstad.no", - "flatanger.no", - "flekkefjord.no", - "flesberg.no", - "flora.no", - "fla.no", - "xn--fl-zia.no", - "folldal.no", - "forsand.no", - "fosnes.no", - "frei.no", - "frogn.no", - "froland.no", - "frosta.no", - "frana.no", - "xn--frna-woa.no", - "froya.no", - "xn--frya-hra.no", - "fusa.no", - "fyresdal.no", - "forde.no", - "xn--frde-gra.no", - "gamvik.no", - "gangaviika.no", - "xn--ggaviika-8ya47h.no", - "gaular.no", - "gausdal.no", - "gildeskal.no", - "xn--gildeskl-g0a.no", - "giske.no", - "gjemnes.no", - "gjerdrum.no", - "gjerstad.no", - "gjesdal.no", - "gjovik.no", - "xn--gjvik-wua.no", - "gloppen.no", - "gol.no", - "gran.no", - "grane.no", - "granvin.no", - "gratangen.no", - "grimstad.no", - "grong.no", - "kraanghke.no", - "xn--kranghke-b0a.no", - "grue.no", - "gulen.no", - "hadsel.no", - "halden.no", - "halsa.no", - "hamar.no", - "hamaroy.no", - "habmer.no", - "xn--hbmer-xqa.no", - "hapmir.no", - "xn--hpmir-xqa.no", - "hammerfest.no", - "hammarfeasta.no", - "xn--hmmrfeasta-s4ac.no", - "haram.no", - "hareid.no", - "harstad.no", - "hasvik.no", - "aknoluokta.no", - "xn--koluokta-7ya57h.no", - "hattfjelldal.no", - "aarborte.no", - "haugesund.no", - "hemne.no", - "hemnes.no", - "hemsedal.no", - "heroy.more-og-romsdal.no", - "xn--hery-ira.xn--mre-og-romsdal-qqb.no", - "heroy.nordland.no", - "xn--hery-ira.nordland.no", - "hitra.no", - "hjartdal.no", - "hjelmeland.no", - "hobol.no", - "xn--hobl-ira.no", - "hof.no", - "hol.no", - "hole.no", - "holmestrand.no", - "holtalen.no", - "xn--holtlen-hxa.no", - "hornindal.no", - "horten.no", - "hurdal.no", - "hurum.no", - "hvaler.no", - "hyllestad.no", - "hagebostad.no", - "xn--hgebostad-g3a.no", - "hoyanger.no", - "xn--hyanger-q1a.no", - "hoylandet.no", - "xn--hylandet-54a.no", - "ha.no", - "xn--h-2fa.no", - "ibestad.no", - "inderoy.no", - "xn--indery-fya.no", - "iveland.no", - "jevnaker.no", - "jondal.no", - "jolster.no", - "xn--jlster-bya.no", - "karasjok.no", - "karasjohka.no", - "xn--krjohka-hwab49j.no", - "karlsoy.no", - "galsa.no", - "xn--gls-elac.no", - "karmoy.no", - "xn--karmy-yua.no", - "kautokeino.no", - "guovdageaidnu.no", - "klepp.no", - "klabu.no", - "xn--klbu-woa.no", - "kongsberg.no", - "kongsvinger.no", - "kragero.no", - "xn--krager-gya.no", - "kristiansand.no", - "kristiansund.no", - "krodsherad.no", - "xn--krdsherad-m8a.no", - "kvalsund.no", - "rahkkeravju.no", - "xn--rhkkervju-01af.no", - "kvam.no", - "kvinesdal.no", - "kvinnherad.no", - "kviteseid.no", - "kvitsoy.no", - "xn--kvitsy-fya.no", - "kvafjord.no", - "xn--kvfjord-nxa.no", - "giehtavuoatna.no", - "kvanangen.no", - "xn--kvnangen-k0a.no", - "navuotna.no", - "xn--nvuotna-hwa.no", - "kafjord.no", - "xn--kfjord-iua.no", - "gaivuotna.no", - "xn--givuotna-8ya.no", - "larvik.no", - "lavangen.no", - "lavagis.no", - "loabat.no", - "xn--loabt-0qa.no", - "lebesby.no", - "davvesiida.no", - "leikanger.no", - "leirfjord.no", - "leka.no", - "leksvik.no", - "lenvik.no", - "leangaviika.no", - "xn--leagaviika-52b.no", - "lesja.no", - "levanger.no", - "lier.no", - "lierne.no", - "lillehammer.no", - "lillesand.no", - "lindesnes.no", - "lindas.no", - "xn--linds-pra.no", - "lom.no", - "loppa.no", - "lahppi.no", - "xn--lhppi-xqa.no", - "lund.no", - "lunner.no", - "luroy.no", - "xn--lury-ira.no", - "luster.no", - "lyngdal.no", - "lyngen.no", - "ivgu.no", - "lardal.no", - "lerdal.no", - "xn--lrdal-sra.no", - "lodingen.no", - "xn--ldingen-q1a.no", - "lorenskog.no", - "xn--lrenskog-54a.no", - "loten.no", - "xn--lten-gra.no", - "malvik.no", - "masoy.no", - "xn--msy-ula0h.no", - "muosat.no", - "xn--muost-0qa.no", - "mandal.no", - "marker.no", - "marnardal.no", - "masfjorden.no", - "meland.no", - "meldal.no", - "melhus.no", - "meloy.no", - "xn--mely-ira.no", - "meraker.no", - "xn--merker-kua.no", - "moareke.no", - "xn--moreke-jua.no", - "midsund.no", - "midtre-gauldal.no", - "modalen.no", - "modum.no", - "molde.no", - "moskenes.no", - "moss.no", - "mosvik.no", - "malselv.no", - "xn--mlselv-iua.no", - "malatvuopmi.no", - "xn--mlatvuopmi-s4a.no", - "namdalseid.no", - "aejrie.no", - "namsos.no", - "namsskogan.no", - "naamesjevuemie.no", - "xn--nmesjevuemie-tcba.no", - "laakesvuemie.no", - "nannestad.no", - "narvik.no", - "narviika.no", - "naustdal.no", - "nedre-eiker.no", - "nes.akershus.no", - "nes.buskerud.no", - "nesna.no", - "nesodden.no", - "nesseby.no", - "unjarga.no", - "xn--unjrga-rta.no", - "nesset.no", - "nissedal.no", - "nittedal.no", - "nord-aurdal.no", - "nord-fron.no", - "nord-odal.no", - "norddal.no", - "nordkapp.no", - "davvenjarga.no", - "xn--davvenjrga-y4a.no", - "nordre-land.no", - "nordreisa.no", - "raisa.no", - "xn--risa-5na.no", - "nore-og-uvdal.no", - "notodden.no", - "naroy.no", - "xn--nry-yla5g.no", - "notteroy.no", - "xn--nttery-byae.no", - "odda.no", - "oksnes.no", - "xn--ksnes-uua.no", - "oppdal.no", - "oppegard.no", - "xn--oppegrd-ixa.no", - "orkdal.no", - "orland.no", - "xn--rland-uua.no", - "orskog.no", - "xn--rskog-uua.no", - "orsta.no", - "xn--rsta-fra.no", - "os.hedmark.no", - "os.hordaland.no", - "osen.no", - "osteroy.no", - "xn--ostery-fya.no", - "ostre-toten.no", - "xn--stre-toten-zcb.no", - "overhalla.no", - "ovre-eiker.no", - "xn--vre-eiker-k8a.no", - "oyer.no", - "xn--yer-zna.no", - "oygarden.no", - "xn--ygarden-p1a.no", - "oystre-slidre.no", - "xn--ystre-slidre-ujb.no", - "porsanger.no", - "porsangu.no", - "xn--porsgu-sta26f.no", - "porsgrunn.no", - "radoy.no", - "xn--rady-ira.no", - "rakkestad.no", - "rana.no", - "ruovat.no", - "randaberg.no", - "rauma.no", - "rendalen.no", - "rennebu.no", - "rennesoy.no", - "xn--rennesy-v1a.no", - "rindal.no", - "ringebu.no", - "ringerike.no", - "ringsaker.no", - "rissa.no", - "risor.no", - "xn--risr-ira.no", - "roan.no", - "rollag.no", - "rygge.no", - "ralingen.no", - "xn--rlingen-mxa.no", - "rodoy.no", - "xn--rdy-0nab.no", - "romskog.no", - "xn--rmskog-bya.no", - "roros.no", - "xn--rros-gra.no", - "rost.no", - "xn--rst-0na.no", - "royken.no", - "xn--ryken-vua.no", - "royrvik.no", - "xn--ryrvik-bya.no", - "rade.no", - "xn--rde-ula.no", - "salangen.no", - "siellak.no", - "saltdal.no", - "salat.no", - "xn--slt-elab.no", - "xn--slat-5na.no", - "samnanger.no", - "sande.more-og-romsdal.no", - "sande.xn--mre-og-romsdal-qqb.no", - "sande.vestfold.no", - "sandefjord.no", - "sandnes.no", - "sandoy.no", - "xn--sandy-yua.no", - "sarpsborg.no", - "sauda.no", - "sauherad.no", - "sel.no", - "selbu.no", - "selje.no", - "seljord.no", - "sigdal.no", - "siljan.no", - "sirdal.no", - "skaun.no", - "skedsmo.no", - "ski.no", - "skien.no", - "skiptvet.no", - "skjervoy.no", - "xn--skjervy-v1a.no", - "skierva.no", - "xn--skierv-uta.no", - "skjak.no", - "xn--skjk-soa.no", - "skodje.no", - "skanland.no", - "xn--sknland-fxa.no", - "skanit.no", - "xn--sknit-yqa.no", - "smola.no", - "xn--smla-hra.no", - "snillfjord.no", - "snasa.no", - "xn--snsa-roa.no", - "snoasa.no", - "snaase.no", - "xn--snase-nra.no", - "sogndal.no", - "sokndal.no", - "sola.no", - "solund.no", - "songdalen.no", - "sortland.no", - "spydeberg.no", - "stange.no", - "stavanger.no", - "steigen.no", - "steinkjer.no", - "stjordal.no", - "xn--stjrdal-s1a.no", - "stokke.no", - "stor-elvdal.no", - "stord.no", - "stordal.no", - "storfjord.no", - "omasvuotna.no", - "strand.no", - "stranda.no", - "stryn.no", - "sula.no", - "suldal.no", - "sund.no", - "sunndal.no", - "surnadal.no", - "sveio.no", - "svelvik.no", - "sykkylven.no", - "sogne.no", - "xn--sgne-gra.no", - "somna.no", - "xn--smna-gra.no", - "sondre-land.no", - "xn--sndre-land-0cb.no", - "sor-aurdal.no", - "xn--sr-aurdal-l8a.no", - "sor-fron.no", - "xn--sr-fron-q1a.no", - "sor-odal.no", - "xn--sr-odal-q1a.no", - "sor-varanger.no", - "xn--sr-varanger-ggb.no", - "matta-varjjat.no", - "xn--mtta-vrjjat-k7af.no", - "sorfold.no", - "xn--srfold-bya.no", - "sorreisa.no", - "xn--srreisa-q1a.no", - "sorum.no", - "xn--srum-gra.no", - "tana.no", - "deatnu.no", - "time.no", - "tingvoll.no", - "tinn.no", - "tjeldsund.no", - "dielddanuorri.no", - "tjome.no", - "xn--tjme-hra.no", - "tokke.no", - "tolga.no", - "torsken.no", - "tranoy.no", - "xn--trany-yua.no", - "tromso.no", - "xn--troms-zua.no", - "tromsa.no", - "romsa.no", - "trondheim.no", - "troandin.no", - "trysil.no", - "trana.no", - "xn--trna-woa.no", - "trogstad.no", - "xn--trgstad-r1a.no", - "tvedestrand.no", - "tydal.no", - "tynset.no", - "tysfjord.no", - "divtasvuodna.no", - "divttasvuotna.no", - "tysnes.no", - "tysvar.no", - "xn--tysvr-vra.no", - "tonsberg.no", - "xn--tnsberg-q1a.no", - "ullensaker.no", - "ullensvang.no", - "ulvik.no", - "utsira.no", - "vadso.no", - "xn--vads-jra.no", - "cahcesuolo.no", - "xn--hcesuolo-7ya35b.no", - "vaksdal.no", - "valle.no", - "vang.no", - "vanylven.no", - "vardo.no", - "xn--vard-jra.no", - "varggat.no", - "xn--vrggt-xqad.no", - "vefsn.no", - "vaapste.no", - "vega.no", - "vegarshei.no", - "xn--vegrshei-c0a.no", - "vennesla.no", - "verdal.no", - "verran.no", - "vestby.no", - "vestnes.no", - "vestre-slidre.no", - "vestre-toten.no", - "vestvagoy.no", - "xn--vestvgy-ixa6o.no", - "vevelstad.no", - "vik.no", - "vikna.no", - "vindafjord.no", - "volda.no", - "voss.no", - "varoy.no", - "xn--vry-yla5g.no", - "vagan.no", - "xn--vgan-qoa.no", - "voagat.no", - "vagsoy.no", - "xn--vgsy-qoa0j.no", - "vaga.no", - "xn--vg-yiab.no", - "valer.ostfold.no", - "xn--vler-qoa.xn--stfold-9xa.no", - "valer.hedmark.no", - "xn--vler-qoa.hedmark.no", - "*.np", - "nr", - "biz.nr", - "info.nr", - "gov.nr", - "edu.nr", - "org.nr", - "net.nr", - "com.nr", - "nu", - "nz", - "ac.nz", - "co.nz", - "cri.nz", - "geek.nz", - "gen.nz", - "govt.nz", - "health.nz", - "iwi.nz", - "kiwi.nz", - "maori.nz", - "mil.nz", - "xn--mori-qsa.nz", - "net.nz", - "org.nz", - "parliament.nz", - "school.nz", - "om", - "co.om", - "com.om", - "edu.om", - "gov.om", - "med.om", - "museum.om", - "net.om", - "org.om", - "pro.om", - "onion", - "org", - "pa", - "ac.pa", - "gob.pa", - "com.pa", - "org.pa", - "sld.pa", - "edu.pa", - "net.pa", - "ing.pa", - "abo.pa", - "med.pa", - "nom.pa", - "pe", - "edu.pe", - "gob.pe", - "nom.pe", - "mil.pe", - "org.pe", - "com.pe", - "net.pe", - "pf", - "com.pf", - "org.pf", - "edu.pf", - "*.pg", - "ph", - "com.ph", - "net.ph", - "org.ph", - "gov.ph", - "edu.ph", - "ngo.ph", - "mil.ph", - "i.ph", - "pk", - "com.pk", - "net.pk", - "edu.pk", - "org.pk", - "fam.pk", - "biz.pk", - "web.pk", - "gov.pk", - "gob.pk", - "gok.pk", - "gon.pk", - "gop.pk", - "gos.pk", - "info.pk", - "pl", - "com.pl", - "net.pl", - "org.pl", - "aid.pl", - "agro.pl", - "atm.pl", - "auto.pl", - "biz.pl", - "edu.pl", - "gmina.pl", - "gsm.pl", - "info.pl", - "mail.pl", - "miasta.pl", - "media.pl", - "mil.pl", - "nieruchomosci.pl", - "nom.pl", - "pc.pl", - "powiat.pl", - "priv.pl", - "realestate.pl", - "rel.pl", - "sex.pl", - "shop.pl", - "sklep.pl", - "sos.pl", - "szkola.pl", - "targi.pl", - "tm.pl", - "tourism.pl", - "travel.pl", - "turystyka.pl", - "gov.pl", - "ap.gov.pl", - "ic.gov.pl", - "is.gov.pl", - "us.gov.pl", - "kmpsp.gov.pl", - "kppsp.gov.pl", - "kwpsp.gov.pl", - "psp.gov.pl", - "wskr.gov.pl", - "kwp.gov.pl", - "mw.gov.pl", - "ug.gov.pl", - "um.gov.pl", - "umig.gov.pl", - "ugim.gov.pl", - "upow.gov.pl", - "uw.gov.pl", - "starostwo.gov.pl", - "pa.gov.pl", - "po.gov.pl", - "psse.gov.pl", - "pup.gov.pl", - "rzgw.gov.pl", - "sa.gov.pl", - "so.gov.pl", - "sr.gov.pl", - "wsa.gov.pl", - "sko.gov.pl", - "uzs.gov.pl", - "wiih.gov.pl", - "winb.gov.pl", - "pinb.gov.pl", - "wios.gov.pl", - "witd.gov.pl", - "wzmiuw.gov.pl", - "piw.gov.pl", - "wiw.gov.pl", - "griw.gov.pl", - "wif.gov.pl", - "oum.gov.pl", - "sdn.gov.pl", - "zp.gov.pl", - "uppo.gov.pl", - "mup.gov.pl", - "wuoz.gov.pl", - "konsulat.gov.pl", - "oirm.gov.pl", - "augustow.pl", - "babia-gora.pl", - "bedzin.pl", - "beskidy.pl", - "bialowieza.pl", - "bialystok.pl", - "bielawa.pl", - "bieszczady.pl", - "boleslawiec.pl", - "bydgoszcz.pl", - "bytom.pl", - "cieszyn.pl", - "czeladz.pl", - "czest.pl", - "dlugoleka.pl", - "elblag.pl", - "elk.pl", - "glogow.pl", - "gniezno.pl", - "gorlice.pl", - "grajewo.pl", - "ilawa.pl", - "jaworzno.pl", - "jelenia-gora.pl", - "jgora.pl", - "kalisz.pl", - "kazimierz-dolny.pl", - "karpacz.pl", - "kartuzy.pl", - "kaszuby.pl", - "katowice.pl", - "kepno.pl", - "ketrzyn.pl", - "klodzko.pl", - "kobierzyce.pl", - "kolobrzeg.pl", - "konin.pl", - "konskowola.pl", - "kutno.pl", - "lapy.pl", - "lebork.pl", - "legnica.pl", - "lezajsk.pl", - "limanowa.pl", - "lomza.pl", - "lowicz.pl", - "lubin.pl", - "lukow.pl", - "malbork.pl", - "malopolska.pl", - "mazowsze.pl", - "mazury.pl", - "mielec.pl", - "mielno.pl", - "mragowo.pl", - "naklo.pl", - "nowaruda.pl", - "nysa.pl", - "olawa.pl", - "olecko.pl", - "olkusz.pl", - "olsztyn.pl", - "opoczno.pl", - "opole.pl", - "ostroda.pl", - "ostroleka.pl", - "ostrowiec.pl", - "ostrowwlkp.pl", - "pila.pl", - "pisz.pl", - "podhale.pl", - "podlasie.pl", - "polkowice.pl", - "pomorze.pl", - "pomorskie.pl", - "prochowice.pl", - "pruszkow.pl", - "przeworsk.pl", - "pulawy.pl", - "radom.pl", - "rawa-maz.pl", - "rybnik.pl", - "rzeszow.pl", - "sanok.pl", - "sejny.pl", - "slask.pl", - "slupsk.pl", - "sosnowiec.pl", - "stalowa-wola.pl", - "skoczow.pl", - "starachowice.pl", - "stargard.pl", - "suwalki.pl", - "swidnica.pl", - "swiebodzin.pl", - "swinoujscie.pl", - "szczecin.pl", - "szczytno.pl", - "tarnobrzeg.pl", - "tgory.pl", - "turek.pl", - "tychy.pl", - "ustka.pl", - "walbrzych.pl", - "warmia.pl", - "warszawa.pl", - "waw.pl", - "wegrow.pl", - "wielun.pl", - "wlocl.pl", - "wloclawek.pl", - "wodzislaw.pl", - "wolomin.pl", - "wroclaw.pl", - "zachpomor.pl", - "zagan.pl", - "zarow.pl", - "zgora.pl", - "zgorzelec.pl", - "pm", - "pn", - "gov.pn", - "co.pn", - "org.pn", - "edu.pn", - "net.pn", - "post", - "pr", - "com.pr", - "net.pr", - "org.pr", - "gov.pr", - "edu.pr", - "isla.pr", - "pro.pr", - "biz.pr", - "info.pr", - "name.pr", - "est.pr", - "prof.pr", - "ac.pr", - "pro", - "aaa.pro", - "aca.pro", - "acct.pro", - "avocat.pro", - "bar.pro", - "cpa.pro", - "eng.pro", - "jur.pro", - "law.pro", - "med.pro", - "recht.pro", - "ps", - "edu.ps", - "gov.ps", - "sec.ps", - "plo.ps", - "com.ps", - "org.ps", - "net.ps", - "pt", - "net.pt", - "gov.pt", - "org.pt", - "edu.pt", - "int.pt", - "publ.pt", - "com.pt", - "nome.pt", - "pw", - "co.pw", - "ne.pw", - "or.pw", - "ed.pw", - "go.pw", - "belau.pw", - "py", - "com.py", - "coop.py", - "edu.py", - "gov.py", - "mil.py", - "net.py", - "org.py", - "qa", - "com.qa", - "edu.qa", - "gov.qa", - "mil.qa", - "name.qa", - "net.qa", - "org.qa", - "sch.qa", - "re", - "asso.re", - "com.re", - "nom.re", - "ro", - "arts.ro", - "com.ro", - "firm.ro", - "info.ro", - "nom.ro", - "nt.ro", - "org.ro", - "rec.ro", - "store.ro", - "tm.ro", - "www.ro", - "rs", - "ac.rs", - "co.rs", - "edu.rs", - "gov.rs", - "in.rs", - "org.rs", - "ru", - "ac.ru", - "edu.ru", - "gov.ru", - "int.ru", - "mil.ru", - "test.ru", - "rw", - "gov.rw", - "net.rw", - "edu.rw", - "ac.rw", - "com.rw", - "co.rw", - "int.rw", - "mil.rw", - "gouv.rw", - "sa", - "com.sa", - "net.sa", - "org.sa", - "gov.sa", - "med.sa", - "pub.sa", - "edu.sa", - "sch.sa", - "sb", - "com.sb", - "edu.sb", - "gov.sb", - "net.sb", - "org.sb", - "sc", - "com.sc", - "gov.sc", - "net.sc", - "org.sc", - "edu.sc", - "sd", - "com.sd", - "net.sd", - "org.sd", - "edu.sd", - "med.sd", - "tv.sd", - "gov.sd", - "info.sd", - "se", - "a.se", - "ac.se", - "b.se", - "bd.se", - "brand.se", - "c.se", - "d.se", - "e.se", - "f.se", - "fh.se", - "fhsk.se", - "fhv.se", - "g.se", - "h.se", - "i.se", - "k.se", - "komforb.se", - "kommunalforbund.se", - "komvux.se", - "l.se", - "lanbib.se", - "m.se", - "n.se", - "naturbruksgymn.se", - "o.se", - "org.se", - "p.se", - "parti.se", - "pp.se", - "press.se", - "r.se", - "s.se", - "t.se", - "tm.se", - "u.se", - "w.se", - "x.se", - "y.se", - "z.se", - "sg", - "com.sg", - "net.sg", - "org.sg", - "gov.sg", - "edu.sg", - "per.sg", - "sh", - "com.sh", - "net.sh", - "gov.sh", - "org.sh", - "mil.sh", - "si", - "sj", - "sk", - "sl", - "com.sl", - "net.sl", - "edu.sl", - "gov.sl", - "org.sl", - "sm", - "sn", - "art.sn", - "com.sn", - "edu.sn", - "gouv.sn", - "org.sn", - "perso.sn", - "univ.sn", - "so", - "com.so", - "net.so", - "org.so", - "sr", - "st", - "co.st", - "com.st", - "consulado.st", - "edu.st", - "embaixada.st", - "gov.st", - "mil.st", - "net.st", - "org.st", - "principe.st", - "saotome.st", - "store.st", - "su", - "sv", - "com.sv", - "edu.sv", - "gob.sv", - "org.sv", - "red.sv", - "sx", - "gov.sx", - "sy", - "edu.sy", - "gov.sy", - "net.sy", - "mil.sy", - "com.sy", - "org.sy", - "sz", - "co.sz", - "ac.sz", - "org.sz", - "tc", - "td", - "tel", - "tf", - "tg", - "th", - "ac.th", - "co.th", - "go.th", - "in.th", - "mi.th", - "net.th", - "or.th", - "tj", - "ac.tj", - "biz.tj", - "co.tj", - "com.tj", - "edu.tj", - "go.tj", - "gov.tj", - "int.tj", - "mil.tj", - "name.tj", - "net.tj", - "nic.tj", - "org.tj", - "test.tj", - "web.tj", - "tk", - "tl", - "gov.tl", - "tm", - "com.tm", - "co.tm", - "org.tm", - "net.tm", - "nom.tm", - "gov.tm", - "mil.tm", - "edu.tm", - "tn", - "com.tn", - "ens.tn", - "fin.tn", - "gov.tn", - "ind.tn", - "intl.tn", - "nat.tn", - "net.tn", - "org.tn", - "info.tn", - "perso.tn", - "tourism.tn", - "edunet.tn", - "rnrt.tn", - "rns.tn", - "rnu.tn", - "mincom.tn", - "agrinet.tn", - "defense.tn", - "turen.tn", - "to", - "com.to", - "gov.to", - "net.to", - "org.to", - "edu.to", - "mil.to", - "tr", - "com.tr", - "info.tr", - "biz.tr", - "net.tr", - "org.tr", - "web.tr", - "gen.tr", - "tv.tr", - "av.tr", - "dr.tr", - "bbs.tr", - "name.tr", - "tel.tr", - "gov.tr", - "bel.tr", - "pol.tr", - "mil.tr", - "k12.tr", - "edu.tr", - "kep.tr", - "nc.tr", - "gov.nc.tr", - "tt", - "co.tt", - "com.tt", - "org.tt", - "net.tt", - "biz.tt", - "info.tt", - "pro.tt", - "int.tt", - "coop.tt", - "jobs.tt", - "mobi.tt", - "travel.tt", - "museum.tt", - "aero.tt", - "name.tt", - "gov.tt", - "edu.tt", - "tv", - "tw", - "edu.tw", - "gov.tw", - "mil.tw", - "com.tw", - "net.tw", - "org.tw", - "idv.tw", - "game.tw", - "ebiz.tw", - "club.tw", - "xn--zf0ao64a.tw", - "xn--uc0atv.tw", - "xn--czrw28b.tw", - "tz", - "ac.tz", - "co.tz", - "go.tz", - "hotel.tz", - "info.tz", - "me.tz", - "mil.tz", - "mobi.tz", - "ne.tz", - "or.tz", - "sc.tz", - "tv.tz", - "ua", - "com.ua", - "edu.ua", - "gov.ua", - "in.ua", - "net.ua", - "org.ua", - "cherkassy.ua", - "cherkasy.ua", - "chernigov.ua", - "chernihiv.ua", - "chernivtsi.ua", - "chernovtsy.ua", - "ck.ua", - "cn.ua", - "cr.ua", - "crimea.ua", - "cv.ua", - "dn.ua", - "dnepropetrovsk.ua", - "dnipropetrovsk.ua", - "dominic.ua", - "donetsk.ua", - "dp.ua", - "if.ua", - "ivano-frankivsk.ua", - "kh.ua", - "kharkiv.ua", - "kharkov.ua", - "kherson.ua", - "khmelnitskiy.ua", - "khmelnytskyi.ua", - "kiev.ua", - "kirovograd.ua", - "km.ua", - "kr.ua", - "krym.ua", - "ks.ua", - "kv.ua", - "kyiv.ua", - "lg.ua", - "lt.ua", - "lugansk.ua", - "lutsk.ua", - "lv.ua", - "lviv.ua", - "mk.ua", - "mykolaiv.ua", - "nikolaev.ua", - "od.ua", - "odesa.ua", - "odessa.ua", - "pl.ua", - "poltava.ua", - "rivne.ua", - "rovno.ua", - "rv.ua", - "sb.ua", - "sebastopol.ua", - "sevastopol.ua", - "sm.ua", - "sumy.ua", - "te.ua", - "ternopil.ua", - "uz.ua", - "uzhgorod.ua", - "vinnica.ua", - "vinnytsia.ua", - "vn.ua", - "volyn.ua", - "yalta.ua", - "zaporizhzhe.ua", - "zaporizhzhia.ua", - "zhitomir.ua", - "zhytomyr.ua", - "zp.ua", - "zt.ua", - "ug", - "co.ug", - "or.ug", - "ac.ug", - "sc.ug", - "go.ug", - "ne.ug", - "com.ug", - "org.ug", - "uk", - "ac.uk", - "co.uk", - "gov.uk", - "ltd.uk", - "me.uk", - "net.uk", - "nhs.uk", - "org.uk", - "plc.uk", - "police.uk", - "*.sch.uk", - "us", - "dni.us", - "fed.us", - "isa.us", - "kids.us", - "nsn.us", - "ak.us", - "al.us", - "ar.us", - "as.us", - "az.us", - "ca.us", - "co.us", - "ct.us", - "dc.us", - "de.us", - "fl.us", - "ga.us", - "gu.us", - "hi.us", - "ia.us", - "id.us", - "il.us", - "in.us", - "ks.us", - "ky.us", - "la.us", - "ma.us", - "md.us", - "me.us", - "mi.us", - "mn.us", - "mo.us", - "ms.us", - "mt.us", - "nc.us", - "nd.us", - "ne.us", - "nh.us", - "nj.us", - "nm.us", - "nv.us", - "ny.us", - "oh.us", - "ok.us", - "or.us", - "pa.us", - "pr.us", - "ri.us", - "sc.us", - "sd.us", - "tn.us", - "tx.us", - "ut.us", - "vi.us", - "vt.us", - "va.us", - "wa.us", - "wi.us", - "wv.us", - "wy.us", - "k12.ak.us", - "k12.al.us", - "k12.ar.us", - "k12.as.us", - "k12.az.us", - "k12.ca.us", - "k12.co.us", - "k12.ct.us", - "k12.dc.us", - "k12.de.us", - "k12.fl.us", - "k12.ga.us", - "k12.gu.us", - "k12.ia.us", - "k12.id.us", - "k12.il.us", - "k12.in.us", - "k12.ks.us", - "k12.ky.us", - "k12.la.us", - "k12.ma.us", - "k12.md.us", - "k12.me.us", - "k12.mi.us", - "k12.mn.us", - "k12.mo.us", - "k12.ms.us", - "k12.mt.us", - "k12.nc.us", - "k12.ne.us", - "k12.nh.us", - "k12.nj.us", - "k12.nm.us", - "k12.nv.us", - "k12.ny.us", - "k12.oh.us", - "k12.ok.us", - "k12.or.us", - "k12.pa.us", - "k12.pr.us", - "k12.ri.us", - "k12.sc.us", - "k12.tn.us", - "k12.tx.us", - "k12.ut.us", - "k12.vi.us", - "k12.vt.us", - "k12.va.us", - "k12.wa.us", - "k12.wi.us", - "k12.wy.us", - "cc.ak.us", - "cc.al.us", - "cc.ar.us", - "cc.as.us", - "cc.az.us", - "cc.ca.us", - "cc.co.us", - "cc.ct.us", - "cc.dc.us", - "cc.de.us", - "cc.fl.us", - "cc.ga.us", - "cc.gu.us", - "cc.hi.us", - "cc.ia.us", - "cc.id.us", - "cc.il.us", - "cc.in.us", - "cc.ks.us", - "cc.ky.us", - "cc.la.us", - "cc.ma.us", - "cc.md.us", - "cc.me.us", - "cc.mi.us", - "cc.mn.us", - "cc.mo.us", - "cc.ms.us", - "cc.mt.us", - "cc.nc.us", - "cc.nd.us", - "cc.ne.us", - "cc.nh.us", - "cc.nj.us", - "cc.nm.us", - "cc.nv.us", - "cc.ny.us", - "cc.oh.us", - "cc.ok.us", - "cc.or.us", - "cc.pa.us", - "cc.pr.us", - "cc.ri.us", - "cc.sc.us", - "cc.sd.us", - "cc.tn.us", - "cc.tx.us", - "cc.ut.us", - "cc.vi.us", - "cc.vt.us", - "cc.va.us", - "cc.wa.us", - "cc.wi.us", - "cc.wv.us", - "cc.wy.us", - "lib.ak.us", - "lib.al.us", - "lib.ar.us", - "lib.as.us", - "lib.az.us", - "lib.ca.us", - "lib.co.us", - "lib.ct.us", - "lib.dc.us", - "lib.fl.us", - "lib.ga.us", - "lib.gu.us", - "lib.hi.us", - "lib.ia.us", - "lib.id.us", - "lib.il.us", - "lib.in.us", - "lib.ks.us", - "lib.ky.us", - "lib.la.us", - "lib.ma.us", - "lib.md.us", - "lib.me.us", - "lib.mi.us", - "lib.mn.us", - "lib.mo.us", - "lib.ms.us", - "lib.mt.us", - "lib.nc.us", - "lib.nd.us", - "lib.ne.us", - "lib.nh.us", - "lib.nj.us", - "lib.nm.us", - "lib.nv.us", - "lib.ny.us", - "lib.oh.us", - "lib.ok.us", - "lib.or.us", - "lib.pa.us", - "lib.pr.us", - "lib.ri.us", - "lib.sc.us", - "lib.sd.us", - "lib.tn.us", - "lib.tx.us", - "lib.ut.us", - "lib.vi.us", - "lib.vt.us", - "lib.va.us", - "lib.wa.us", - "lib.wi.us", - "lib.wy.us", - "pvt.k12.ma.us", - "chtr.k12.ma.us", - "paroch.k12.ma.us", - "ann-arbor.mi.us", - "cog.mi.us", - "dst.mi.us", - "eaton.mi.us", - "gen.mi.us", - "mus.mi.us", - "tec.mi.us", - "washtenaw.mi.us", - "uy", - "com.uy", - "edu.uy", - "gub.uy", - "mil.uy", - "net.uy", - "org.uy", - "uz", - "co.uz", - "com.uz", - "net.uz", - "org.uz", - "va", - "vc", - "com.vc", - "net.vc", - "org.vc", - "gov.vc", - "mil.vc", - "edu.vc", - "ve", - "arts.ve", - "co.ve", - "com.ve", - "e12.ve", - "edu.ve", - "firm.ve", - "gob.ve", - "gov.ve", - "info.ve", - "int.ve", - "mil.ve", - "net.ve", - "org.ve", - "rec.ve", - "store.ve", - "tec.ve", - "web.ve", - "vg", - "vi", - "co.vi", - "com.vi", - "k12.vi", - "net.vi", - "org.vi", - "vn", - "com.vn", - "net.vn", - "org.vn", - "edu.vn", - "gov.vn", - "int.vn", - "ac.vn", - "biz.vn", - "info.vn", - "name.vn", - "pro.vn", - "health.vn", - "vu", - "com.vu", - "edu.vu", - "net.vu", - "org.vu", - "wf", - "ws", - "com.ws", - "net.ws", - "org.ws", - "gov.ws", - "edu.ws", - "yt", - "xn--mgbaam7a8h", - "xn--y9a3aq", - "xn--54b7fta0cc", - "xn--90ae", - "xn--90ais", - "xn--fiqs8s", - "xn--fiqz9s", - "xn--lgbbat1ad8j", - "xn--wgbh1c", - "xn--e1a4c", - "xn--node", - "xn--qxam", - "xn--j6w193g", - "xn--55qx5d.xn--j6w193g", - "xn--wcvs22d.xn--j6w193g", - "xn--mxtq1m.xn--j6w193g", - "xn--gmqw5a.xn--j6w193g", - "xn--od0alg.xn--j6w193g", - "xn--uc0atv.xn--j6w193g", - "xn--2scrj9c", - "xn--3hcrj9c", - "xn--45br5cyl", - "xn--h2breg3eve", - "xn--h2brj9c8c", - "xn--mgbgu82a", - "xn--rvc1e0am3e", - "xn--h2brj9c", - "xn--mgbbh1a", - "xn--mgbbh1a71e", - "xn--fpcrj9c3d", - "xn--gecrj9c", - "xn--s9brj9c", - "xn--45brj9c", - "xn--xkc2dl3a5ee0h", - "xn--mgba3a4f16a", - "xn--mgba3a4fra", - "xn--mgbtx2b", - "xn--mgbayh7gpa", - "xn--3e0b707e", - "xn--80ao21a", - "xn--fzc2c9e2c", - "xn--xkc2al3hye2a", - "xn--mgbc0a9azcg", - "xn--d1alf", - "xn--l1acc", - "xn--mix891f", - "xn--mix082f", - "xn--mgbx4cd0ab", - "xn--mgb9awbf", - "xn--mgbai9azgqp6j", - "xn--mgbai9a5eva00b", - "xn--ygbi2ammx", - "xn--90a3ac", - "xn--o1ac.xn--90a3ac", - "xn--c1avg.xn--90a3ac", - "xn--90azh.xn--90a3ac", - "xn--d1at.xn--90a3ac", - "xn--o1ach.xn--90a3ac", - "xn--80au.xn--90a3ac", - "xn--p1ai", - "xn--wgbl6a", - "xn--mgberp4a5d4ar", - "xn--mgberp4a5d4a87g", - "xn--mgbqly7c0a67fbc", - "xn--mgbqly7cvafr", - "xn--mgbpl2fh", - "xn--yfro4i67o", - "xn--clchc0ea0b2g2a9gcd", - "xn--ogbpf8fl", - "xn--mgbtf8fl", - "xn--o3cw4h", - "xn--12c1fe0br.xn--o3cw4h", - "xn--12co0c3b4eva.xn--o3cw4h", - "xn--h3cuzk1di.xn--o3cw4h", - "xn--o3cyx2a.xn--o3cw4h", - "xn--m3ch0j3a.xn--o3cw4h", - "xn--12cfi8ixb8l.xn--o3cw4h", - "xn--pgbs0dh", - "xn--kpry57d", - "xn--kprw13d", - "xn--nnx388a", - "xn--j1amh", - "xn--mgb2ddes", - "xxx", - "*.ye", - "ac.za", - "agric.za", - "alt.za", - "co.za", - "edu.za", - "gov.za", - "grondar.za", - "law.za", - "mil.za", - "net.za", - "ngo.za", - "nis.za", - "nom.za", - "org.za", - "school.za", - "tm.za", - "web.za", - "zm", - "ac.zm", - "biz.zm", - "co.zm", - "com.zm", - "edu.zm", - "gov.zm", - "info.zm", - "mil.zm", - "net.zm", - "org.zm", - "sch.zm", - "zw", - "ac.zw", - "co.zw", - "gov.zw", - "mil.zw", - "org.zw", - "aaa", - "aarp", - "abarth", - "abb", - "abbott", - "abbvie", - "abc", - "able", - "abogado", - "abudhabi", - "academy", - "accenture", - "accountant", - "accountants", - "aco", - "active", - "actor", - "adac", - "ads", - "adult", - "aeg", - "aetna", - "afamilycompany", - "afl", - "africa", - "agakhan", - "agency", - "aig", - "aigo", - "airbus", - "airforce", - "airtel", - "akdn", - "alfaromeo", - "alibaba", - "alipay", - "allfinanz", - "allstate", - "ally", - "alsace", - "alstom", - "americanexpress", - "americanfamily", - "amex", - "amfam", - "amica", - "amsterdam", - "analytics", - "android", - "anquan", - "anz", - "aol", - "apartments", - "app", - "apple", - "aquarelle", - "arab", - "aramco", - "archi", - "army", - "art", - "arte", - "asda", - "associates", - "athleta", - "attorney", - "auction", - "audi", - "audible", - "audio", - "auspost", - "author", - "auto", - "autos", - "avianca", - "aws", - "axa", - "azure", - "baby", - "baidu", - "banamex", - "bananarepublic", - "band", - "bank", - "bar", - "barcelona", - "barclaycard", - "barclays", - "barefoot", - "bargains", - "baseball", - "basketball", - "bauhaus", - "bayern", - "bbc", - "bbt", - "bbva", - "bcg", - "bcn", - "beats", - "beauty", - "beer", - "bentley", - "berlin", - "best", - "bestbuy", - "bet", - "bharti", - "bible", - "bid", - "bike", - "bing", - "bingo", - "bio", - "black", - "blackfriday", - "blanco", - "blockbuster", - "blog", - "bloomberg", - "blue", - "bms", - "bmw", - "bnl", - "bnpparibas", - "boats", - "boehringer", - "bofa", - "bom", - "bond", - "boo", - "book", - "booking", - "bosch", - "bostik", - "boston", - "bot", - "boutique", - "box", - "bradesco", - "bridgestone", - "broadway", - "broker", - "brother", - "brussels", - "budapest", - "bugatti", - "build", - "builders", - "business", - "buy", - "buzz", - "bzh", - "cab", - "cafe", - "cal", - "call", - "calvinklein", - "cam", - "camera", - "camp", - "cancerresearch", - "canon", - "capetown", - "capital", - "capitalone", - "car", - "caravan", - "cards", - "care", - "career", - "careers", - "cars", - "cartier", - "casa", - "case", - "caseih", - "cash", - "casino", - "catering", - "catholic", - "cba", - "cbn", - "cbre", - "cbs", - "ceb", - "center", - "ceo", - "cern", - "cfa", - "cfd", - "chanel", - "channel", - "charity", - "chase", - "chat", - "cheap", - "chintai", - "christmas", - "chrome", - "chrysler", - "church", - "cipriani", - "circle", - "cisco", - "citadel", - "citi", - "citic", - "city", - "cityeats", - "claims", - "cleaning", - "click", - "clinic", - "clinique", - "clothing", - "cloud", - "club", - "clubmed", - "coach", - "codes", - "coffee", - "college", - "cologne", - "comcast", - "commbank", - "community", - "company", - "compare", - "computer", - "comsec", - "condos", - "construction", - "consulting", - "contact", - "contractors", - "cooking", - "cookingchannel", - "cool", - "corsica", - "country", - "coupon", - "coupons", - "courses", - "credit", - "creditcard", - "creditunion", - "cricket", - "crown", - "crs", - "cruise", - "cruises", - "csc", - "cuisinella", - "cymru", - "cyou", - "dabur", - "dad", - "dance", - "data", - "date", - "dating", - "datsun", - "day", - "dclk", - "dds", - "deal", - "dealer", - "deals", - "degree", - "delivery", - "dell", - "deloitte", - "delta", - "democrat", - "dental", - "dentist", - "desi", - "design", - "dev", - "dhl", - "diamonds", - "diet", - "digital", - "direct", - "directory", - "discount", - "discover", - "dish", - "diy", - "dnp", - "docs", - "doctor", - "dodge", - "dog", - "doha", - "domains", - "dot", - "download", - "drive", - "dtv", - "dubai", - "duck", - "dunlop", - "duns", - "dupont", - "durban", - "dvag", - "dvr", - "earth", - "eat", - "eco", - "edeka", - "education", - "email", - "emerck", - "energy", - "engineer", - "engineering", - "enterprises", - "epost", - "epson", - "equipment", - "ericsson", - "erni", - "esq", - "estate", - "esurance", - "etisalat", - "eurovision", - "eus", - "events", - "everbank", - "exchange", - "expert", - "exposed", - "express", - "extraspace", - "fage", - "fail", - "fairwinds", - "faith", - "family", - "fan", - "fans", - "farm", - "farmers", - "fashion", - "fast", - "fedex", - "feedback", - "ferrari", - "ferrero", - "fiat", - "fidelity", - "fido", - "film", - "final", - "finance", - "financial", - "fire", - "firestone", - "firmdale", - "fish", - "fishing", - "fit", - "fitness", - "flickr", - "flights", - "flir", - "florist", - "flowers", - "fly", - "foo", - "food", - "foodnetwork", - "football", - "ford", - "forex", - "forsale", - "forum", - "foundation", - "fox", - "free", - "fresenius", - "frl", - "frogans", - "frontdoor", - "frontier", - "ftr", - "fujitsu", - "fujixerox", - "fun", - "fund", - "furniture", - "futbol", - "fyi", - "gal", - "gallery", - "gallo", - "gallup", - "game", - "games", - "gap", - "garden", - "gbiz", - "gdn", - "gea", - "gent", - "genting", - "george", - "ggee", - "gift", - "gifts", - "gives", - "giving", - "glade", - "glass", - "gle", - "global", - "globo", - "gmail", - "gmbh", - "gmo", - "gmx", - "godaddy", - "gold", - "goldpoint", - "golf", - "goo", - "goodhands", - "goodyear", - "goog", - "google", - "gop", - "got", - "grainger", - "graphics", - "gratis", - "green", - "gripe", - "grocery", - "group", - "guardian", - "gucci", - "guge", - "guide", - "guitars", - "guru", - "hair", - "hamburg", - "hangout", - "haus", - "hbo", - "hdfc", - "hdfcbank", - "health", - "healthcare", - "help", - "helsinki", - "here", - "hermes", - "hgtv", - "hiphop", - "hisamitsu", - "hitachi", - "hiv", - "hkt", - "hockey", - "holdings", - "holiday", - "homedepot", - "homegoods", - "homes", - "homesense", - "honda", - "honeywell", - "horse", - "hospital", - "host", - "hosting", - "hot", - "hoteles", - "hotels", - "hotmail", - "house", - "how", - "hsbc", - "hughes", - "hyatt", - "hyundai", - "ibm", - "icbc", - "ice", - "icu", - "ieee", - "ifm", - "ikano", - "imamat", - "imdb", - "immo", - "immobilien", - "inc", - "industries", - "infiniti", - "ing", - "ink", - "institute", - "insurance", - "insure", - "intel", - "international", - "intuit", - "investments", - "ipiranga", - "irish", - "iselect", - "ismaili", - "ist", - "istanbul", - "itau", - "itv", - "iveco", - "iwc", - "jaguar", - "java", - "jcb", - "jcp", - "jeep", - "jetzt", - "jewelry", - "jio", - "jlc", - "jll", - "jmp", - "jnj", - "joburg", - "jot", - "joy", - "jpmorgan", - "jprs", - "juegos", - "juniper", - "kaufen", - "kddi", - "kerryhotels", - "kerrylogistics", - "kerryproperties", - "kfh", - "kia", - "kim", - "kinder", - "kindle", - "kitchen", - "kiwi", - "koeln", - "komatsu", - "kosher", - "kpmg", - "kpn", - "krd", - "kred", - "kuokgroup", - "kyoto", - "lacaixa", - "ladbrokes", - "lamborghini", - "lamer", - "lancaster", - "lancia", - "lancome", - "land", - "landrover", - "lanxess", - "lasalle", - "lat", - "latino", - "latrobe", - "law", - "lawyer", - "lds", - "lease", - "leclerc", - "lefrak", - "legal", - "lego", - "lexus", - "lgbt", - "liaison", - "lidl", - "life", - "lifeinsurance", - "lifestyle", - "lighting", - "like", - "lilly", - "limited", - "limo", - "lincoln", - "linde", - "link", - "lipsy", - "live", - "living", - "lixil", - "llc", - "loan", - "loans", - "locker", - "locus", - "loft", - "lol", - "london", - "lotte", - "lotto", - "love", - "lpl", - "lplfinancial", - "ltd", - "ltda", - "lundbeck", - "lupin", - "luxe", - "luxury", - "macys", - "madrid", - "maif", - "maison", - "makeup", - "man", - "management", - "mango", - "map", - "market", - "marketing", - "markets", - "marriott", - "marshalls", - "maserati", - "mattel", - "mba", - "mckinsey", - "med", - "media", - "meet", - "melbourne", - "meme", - "memorial", - "men", - "menu", - "meo", - "merckmsd", - "metlife", - "miami", - "microsoft", - "mini", - "mint", - "mit", - "mitsubishi", - "mlb", - "mls", - "mma", - "mobile", - "mobily", - "moda", - "moe", - "moi", - "mom", - "monash", - "money", - "monster", - "mopar", - "mormon", - "mortgage", - "moscow", - "moto", - "motorcycles", - "mov", - "movie", - "movistar", - "msd", - "mtn", - "mtr", - "mutual", - "nab", - "nadex", - "nagoya", - "nationwide", - "natura", - "navy", - "nba", - "nec", - "netbank", - "netflix", - "network", - "neustar", - "new", - "newholland", - "news", - "next", - "nextdirect", - "nexus", - "nfl", - "ngo", - "nhk", - "nico", - "nike", - "nikon", - "ninja", - "nissan", - "nissay", - "nokia", - "northwesternmutual", - "norton", - "now", - "nowruz", - "nowtv", - "nra", - "nrw", - "ntt", - "nyc", - "obi", - "observer", - "off", - "office", - "okinawa", - "olayan", - "olayangroup", - "oldnavy", - "ollo", - "omega", - "one", - "ong", - "onl", - "online", - "onyourside", - "ooo", - "open", - "oracle", - "orange", - "organic", - "origins", - "osaka", - "otsuka", - "ott", - "ovh", - "page", - "panasonic", - "panerai", - "paris", - "pars", - "partners", - "parts", - "party", - "passagens", - "pay", - "pccw", - "pet", - "pfizer", - "pharmacy", - "phd", - "philips", - "phone", - "photo", - "photography", - "photos", - "physio", - "piaget", - "pics", - "pictet", - "pictures", - "pid", - "pin", - "ping", - "pink", - "pioneer", - "pizza", - "place", - "play", - "playstation", - "plumbing", - "plus", - "pnc", - "pohl", - "poker", - "politie", - "porn", - "pramerica", - "praxi", - "press", - "prime", - "prod", - "productions", - "prof", - "progressive", - "promo", - "properties", - "property", - "protection", - "pru", - "prudential", - "pub", - "pwc", - "qpon", - "quebec", - "quest", - "qvc", - "racing", - "radio", - "raid", - "read", - "realestate", - "realtor", - "realty", - "recipes", - "red", - "redstone", - "redumbrella", - "rehab", - "reise", - "reisen", - "reit", - "reliance", - "ren", - "rent", - "rentals", - "repair", - "report", - "republican", - "rest", - "restaurant", - "review", - "reviews", - "rexroth", - "rich", - "richardli", - "ricoh", - "rightathome", - "ril", - "rio", - "rip", - "rmit", - "rocher", - "rocks", - "rodeo", - "rogers", - "room", - "rsvp", - "rugby", - "ruhr", - "run", - "rwe", - "ryukyu", - "saarland", - "safe", - "safety", - "sakura", - "sale", - "salon", - "samsclub", - "samsung", - "sandvik", - "sandvikcoromant", - "sanofi", - "sap", - "sapo", - "sarl", - "sas", - "save", - "saxo", - "sbi", - "sbs", - "sca", - "scb", - "schaeffler", - "schmidt", - "scholarships", - "school", - "schule", - "schwarz", - "science", - "scjohnson", - "scor", - "scot", - "search", - "seat", - "secure", - "security", - "seek", - "select", - "sener", - "services", - "ses", - "seven", - "sew", - "sex", - "sexy", - "sfr", - "shangrila", - "sharp", - "shaw", - "shell", - "shia", - "shiksha", - "shoes", - "shop", - "shopping", - "shouji", - "show", - "showtime", - "shriram", - "silk", - "sina", - "singles", - "site", - "ski", - "skin", - "sky", - "skype", - "sling", - "smart", - "smile", - "sncf", - "soccer", - "social", - "softbank", - "software", - "sohu", - "solar", - "solutions", - "song", - "sony", - "soy", - "space", - "spiegel", - "sport", - "spot", - "spreadbetting", - "srl", - "srt", - "stada", - "staples", - "star", - "starhub", - "statebank", - "statefarm", - "statoil", - "stc", - "stcgroup", - "stockholm", - "storage", - "store", - "stream", - "studio", - "study", - "style", - "sucks", - "supplies", - "supply", - "support", - "surf", - "surgery", - "suzuki", - "swatch", - "swiftcover", - "swiss", - "sydney", - "symantec", - "systems", - "tab", - "taipei", - "talk", - "taobao", - "target", - "tatamotors", - "tatar", - "tattoo", - "tax", - "taxi", - "tci", - "tdk", - "team", - "tech", - "technology", - "telecity", - "telefonica", - "temasek", - "tennis", - "teva", - "thd", - "theater", - "theatre", - "tiaa", - "tickets", - "tienda", - "tiffany", - "tips", - "tires", - "tirol", - "tjmaxx", - "tjx", - "tkmaxx", - "tmall", - "today", - "tokyo", - "tools", - "top", - "toray", - "toshiba", - "total", - "tours", - "town", - "toyota", - "toys", - "trade", - "trading", - "training", - "travel", - "travelchannel", - "travelers", - "travelersinsurance", - "trust", - "trv", - "tube", - "tui", - "tunes", - "tushu", - "tvs", - "ubank", - "ubs", - "uconnect", - "unicom", - "university", - "uno", - "uol", - "ups", - "vacations", - "vana", - "vanguard", - "vegas", - "ventures", - "verisign", - "versicherung", - "vet", - "viajes", - "video", - "vig", - "viking", - "villas", - "vin", - "vip", - "virgin", - "visa", - "vision", - "vista", - "vistaprint", - "viva", - "vivo", - "vlaanderen", - "vodka", - "volkswagen", - "volvo", - "vote", - "voting", - "voto", - "voyage", - "vuelos", - "wales", - "walmart", - "walter", - "wang", - "wanggou", - "warman", - "watch", - "watches", - "weather", - "weatherchannel", - "webcam", - "weber", - "website", - "wed", - "wedding", - "weibo", - "weir", - "whoswho", - "wien", - "wiki", - "williamhill", - "win", - "windows", - "wine", - "winners", - "wme", - "wolterskluwer", - "woodside", - "work", - "works", - "world", - "wow", - "wtc", - "wtf", - "xbox", - "xerox", - "xfinity", - "xihuan", - "xin", - "xn--11b4c3d", - "xn--1ck2e1b", - "xn--1qqw23a", - "xn--30rr7y", - "xn--3bst00m", - "xn--3ds443g", - "xn--3oq18vl8pn36a", - "xn--3pxu8k", - "xn--42c2d9a", - "xn--45q11c", - "xn--4gbrim", - "xn--55qw42g", - "xn--55qx5d", - "xn--5su34j936bgsg", - "xn--5tzm5g", - "xn--6frz82g", - "xn--6qq986b3xl", - "xn--80adxhks", - "xn--80aqecdr1a", - "xn--80asehdb", - "xn--80aswg", - "xn--8y0a063a", - "xn--9dbq2a", - "xn--9et52u", - "xn--9krt00a", - "xn--b4w605ferd", - "xn--bck1b9a5dre4c", - "xn--c1avg", - "xn--c2br7g", - "xn--cck2b3b", - "xn--cg4bki", - "xn--czr694b", - "xn--czrs0t", - "xn--czru2d", - "xn--d1acj3b", - "xn--eckvdtc9d", - "xn--efvy88h", - "xn--estv75g", - "xn--fct429k", - "xn--fhbei", - "xn--fiq228c5hs", - "xn--fiq64b", - "xn--fjq720a", - "xn--flw351e", - "xn--fzys8d69uvgm", - "xn--g2xx48c", - "xn--gckr3f0f", - "xn--gk3at1e", - "xn--hxt814e", - "xn--i1b6b1a6a2e", - "xn--imr513n", - "xn--io0a7i", - "xn--j1aef", - "xn--jlq61u9w7b", - "xn--jvr189m", - "xn--kcrx77d1x4a", - "xn--kpu716f", - "xn--kput3i", - "xn--mgba3a3ejt", - "xn--mgba7c0bbn0a", - "xn--mgbaakc7dvf", - "xn--mgbab2bd", - "xn--mgbb9fbpob", - "xn--mgbca7dzdo", - "xn--mgbi4ecexp", - "xn--mgbt3dhd", - "xn--mk1bu44c", - "xn--mxtq1m", - "xn--ngbc5azd", - "xn--ngbe9e0a", - "xn--ngbrx", - "xn--nqv7f", - "xn--nqv7fs00ema", - "xn--nyqy26a", - "xn--otu796d", - "xn--p1acf", - "xn--pbt977c", - "xn--pssy2u", - "xn--q9jyb4c", - "xn--qcka1pmc", - "xn--rhqv96g", - "xn--rovu88b", - "xn--ses554g", - "xn--t60b56a", - "xn--tckwe", - "xn--tiq49xqyj", - "xn--unup4y", - "xn--vermgensberater-ctb", - "xn--vermgensberatung-pwb", - "xn--vhquv", - "xn--vuq861b", - "xn--w4r85el8fhu5dnra", - "xn--w4rs40l", - "xn--xhq521b", - "xn--zfr164b", - "xperia", - "xyz", - "yachts", - "yahoo", - "yamaxun", - "yandex", - "yodobashi", - "yoga", - "yokohama", - "you", - "youtube", - "yun", - "zappos", - "zara", - "zero", - "zip", - "zippo", - "zone", - "zuerich", - "cc.ua", - "inf.ua", - "ltd.ua", - "beep.pl", - "*.compute.estate", - "*.alces.network", - "alwaysdata.net", - "cloudfront.net", - "*.compute.amazonaws.com", - "*.compute-1.amazonaws.com", - "*.compute.amazonaws.com.cn", - "us-east-1.amazonaws.com", - "cn-north-1.eb.amazonaws.com.cn", - "elasticbeanstalk.com", - "ap-northeast-1.elasticbeanstalk.com", - "ap-northeast-2.elasticbeanstalk.com", - "ap-northeast-3.elasticbeanstalk.com", - "ap-south-1.elasticbeanstalk.com", - "ap-southeast-1.elasticbeanstalk.com", - "ap-southeast-2.elasticbeanstalk.com", - "ca-central-1.elasticbeanstalk.com", - "eu-central-1.elasticbeanstalk.com", - "eu-west-1.elasticbeanstalk.com", - "eu-west-2.elasticbeanstalk.com", - "eu-west-3.elasticbeanstalk.com", - "sa-east-1.elasticbeanstalk.com", - "us-east-1.elasticbeanstalk.com", - "us-east-2.elasticbeanstalk.com", - "us-gov-west-1.elasticbeanstalk.com", - "us-west-1.elasticbeanstalk.com", - "us-west-2.elasticbeanstalk.com", - "*.elb.amazonaws.com", - "*.elb.amazonaws.com.cn", - "s3.amazonaws.com", - "s3-ap-northeast-1.amazonaws.com", - "s3-ap-northeast-2.amazonaws.com", - "s3-ap-south-1.amazonaws.com", - "s3-ap-southeast-1.amazonaws.com", - "s3-ap-southeast-2.amazonaws.com", - "s3-ca-central-1.amazonaws.com", - "s3-eu-central-1.amazonaws.com", - "s3-eu-west-1.amazonaws.com", - "s3-eu-west-2.amazonaws.com", - "s3-eu-west-3.amazonaws.com", - "s3-external-1.amazonaws.com", - "s3-fips-us-gov-west-1.amazonaws.com", - "s3-sa-east-1.amazonaws.com", - "s3-us-gov-west-1.amazonaws.com", - "s3-us-east-2.amazonaws.com", - "s3-us-west-1.amazonaws.com", - "s3-us-west-2.amazonaws.com", - "s3.ap-northeast-2.amazonaws.com", - "s3.ap-south-1.amazonaws.com", - "s3.cn-north-1.amazonaws.com.cn", - "s3.ca-central-1.amazonaws.com", - "s3.eu-central-1.amazonaws.com", - "s3.eu-west-2.amazonaws.com", - "s3.eu-west-3.amazonaws.com", - "s3.us-east-2.amazonaws.com", - "s3.dualstack.ap-northeast-1.amazonaws.com", - "s3.dualstack.ap-northeast-2.amazonaws.com", - "s3.dualstack.ap-south-1.amazonaws.com", - "s3.dualstack.ap-southeast-1.amazonaws.com", - "s3.dualstack.ap-southeast-2.amazonaws.com", - "s3.dualstack.ca-central-1.amazonaws.com", - "s3.dualstack.eu-central-1.amazonaws.com", - "s3.dualstack.eu-west-1.amazonaws.com", - "s3.dualstack.eu-west-2.amazonaws.com", - "s3.dualstack.eu-west-3.amazonaws.com", - "s3.dualstack.sa-east-1.amazonaws.com", - "s3.dualstack.us-east-1.amazonaws.com", - "s3.dualstack.us-east-2.amazonaws.com", - "s3-website-us-east-1.amazonaws.com", - "s3-website-us-west-1.amazonaws.com", - "s3-website-us-west-2.amazonaws.com", - "s3-website-ap-northeast-1.amazonaws.com", - "s3-website-ap-southeast-1.amazonaws.com", - "s3-website-ap-southeast-2.amazonaws.com", - "s3-website-eu-west-1.amazonaws.com", - "s3-website-sa-east-1.amazonaws.com", - "s3-website.ap-northeast-2.amazonaws.com", - "s3-website.ap-south-1.amazonaws.com", - "s3-website.ca-central-1.amazonaws.com", - "s3-website.eu-central-1.amazonaws.com", - "s3-website.eu-west-2.amazonaws.com", - "s3-website.eu-west-3.amazonaws.com", - "s3-website.us-east-2.amazonaws.com", - "t3l3p0rt.net", - "tele.amune.org", - "on-aptible.com", - "user.party.eus", - "pimienta.org", - "poivron.org", - "potager.org", - "sweetpepper.org", - "myasustor.com", - "myfritz.net", - "*.awdev.ca", - "*.advisor.ws", - "backplaneapp.io", - "betainabox.com", - "bnr.la", - "blackbaudcdn.net", - "boomla.net", - "boxfuse.io", - "square7.ch", - "bplaced.com", - "bplaced.de", - "square7.de", - "bplaced.net", - "square7.net", - "browsersafetymark.io", - "mycd.eu", - "ae.org", - "ar.com", - "br.com", - "cn.com", - "com.de", - "com.se", - "de.com", - "eu.com", - "gb.com", - "gb.net", - "hu.com", - "hu.net", - "jp.net", - "jpn.com", - "kr.com", - "mex.com", - "no.com", - "qc.com", - "ru.com", - "sa.com", - "se.net", - "uk.com", - "uk.net", - "us.com", - "uy.com", - "za.bz", - "za.com", - "africa.com", - "gr.com", - "in.net", - "us.org", - "co.com", - "c.la", - "certmgr.org", - "xenapponazure.com", - "virtueeldomein.nl", - "cleverapps.io", - "c66.me", - "cloud66.ws", - "jdevcloud.com", - "wpdevcloud.com", - "cloudaccess.host", - "freesite.host", - "cloudaccess.net", - "cloudcontrolled.com", - "cloudcontrolapp.com", - "co.ca", - "*.otap.co", - "co.cz", - "c.cdn77.org", - "cdn77-ssl.net", - "r.cdn77.net", - "rsc.cdn77.org", - "ssl.origin.cdn77-secure.org", - "cloudns.asia", - "cloudns.biz", - "cloudns.club", - "cloudns.cc", - "cloudns.eu", - "cloudns.in", - "cloudns.info", - "cloudns.org", - "cloudns.pro", - "cloudns.pw", - "cloudns.us", - "cloudeity.net", - "cnpy.gdn", - "co.nl", - "co.no", - "webhosting.be", - "hosting-cluster.nl", - "dyn.cosidns.de", - "dynamisches-dns.de", - "dnsupdater.de", - "internet-dns.de", - "l-o-g-i-n.de", - "dynamic-dns.info", - "feste-ip.net", - "knx-server.net", - "static-access.net", - "realm.cz", - "*.cryptonomic.net", - "cupcake.is", - "cyon.link", - "cyon.site", - "daplie.me", - "localhost.daplie.me", - "dattolocal.com", - "dattorelay.com", - "dattoweb.com", - "mydatto.com", - "dattolocal.net", - "mydatto.net", - "biz.dk", - "co.dk", - "firm.dk", - "reg.dk", - "store.dk", - "debian.net", - "dedyn.io", - "dnshome.de", - "drayddns.com", - "dreamhosters.com", - "mydrobo.com", - "drud.io", - "drud.us", - "duckdns.org", - "dy.fi", - "tunk.org", - "dyndns-at-home.com", - "dyndns-at-work.com", - "dyndns-blog.com", - "dyndns-free.com", - "dyndns-home.com", - "dyndns-ip.com", - "dyndns-mail.com", - "dyndns-office.com", - "dyndns-pics.com", - "dyndns-remote.com", - "dyndns-server.com", - "dyndns-web.com", - "dyndns-wiki.com", - "dyndns-work.com", - "dyndns.biz", - "dyndns.info", - "dyndns.org", - "dyndns.tv", - "at-band-camp.net", - "ath.cx", - "barrel-of-knowledge.info", - "barrell-of-knowledge.info", - "better-than.tv", - "blogdns.com", - "blogdns.net", - "blogdns.org", - "blogsite.org", - "boldlygoingnowhere.org", - "broke-it.net", - "buyshouses.net", - "cechire.com", - "dnsalias.com", - "dnsalias.net", - "dnsalias.org", - "dnsdojo.com", - "dnsdojo.net", - "dnsdojo.org", - "does-it.net", - "doesntexist.com", - "doesntexist.org", - "dontexist.com", - "dontexist.net", - "dontexist.org", - "doomdns.com", - "doomdns.org", - "dvrdns.org", - "dyn-o-saur.com", - "dynalias.com", - "dynalias.net", - "dynalias.org", - "dynathome.net", - "dyndns.ws", - "endofinternet.net", - "endofinternet.org", - "endoftheinternet.org", - "est-a-la-maison.com", - "est-a-la-masion.com", - "est-le-patron.com", - "est-mon-blogueur.com", - "for-better.biz", - "for-more.biz", - "for-our.info", - "for-some.biz", - "for-the.biz", - "forgot.her.name", - "forgot.his.name", - "from-ak.com", - "from-al.com", - "from-ar.com", - "from-az.net", - "from-ca.com", - "from-co.net", - "from-ct.com", - "from-dc.com", - "from-de.com", - "from-fl.com", - "from-ga.com", - "from-hi.com", - "from-ia.com", - "from-id.com", - "from-il.com", - "from-in.com", - "from-ks.com", - "from-ky.com", - "from-la.net", - "from-ma.com", - "from-md.com", - "from-me.org", - "from-mi.com", - "from-mn.com", - "from-mo.com", - "from-ms.com", - "from-mt.com", - "from-nc.com", - "from-nd.com", - "from-ne.com", - "from-nh.com", - "from-nj.com", - "from-nm.com", - "from-nv.com", - "from-ny.net", - "from-oh.com", - "from-ok.com", - "from-or.com", - "from-pa.com", - "from-pr.com", - "from-ri.com", - "from-sc.com", - "from-sd.com", - "from-tn.com", - "from-tx.com", - "from-ut.com", - "from-va.com", - "from-vt.com", - "from-wa.com", - "from-wi.com", - "from-wv.com", - "from-wy.com", - "ftpaccess.cc", - "fuettertdasnetz.de", - "game-host.org", - "game-server.cc", - "getmyip.com", - "gets-it.net", - "go.dyndns.org", - "gotdns.com", - "gotdns.org", - "groks-the.info", - "groks-this.info", - "ham-radio-op.net", - "here-for-more.info", - "hobby-site.com", - "hobby-site.org", - "home.dyndns.org", - "homedns.org", - "homeftp.net", - "homeftp.org", - "homeip.net", - "homelinux.com", - "homelinux.net", - "homelinux.org", - "homeunix.com", - "homeunix.net", - "homeunix.org", - "iamallama.com", - "in-the-band.net", - "is-a-anarchist.com", - "is-a-blogger.com", - "is-a-bookkeeper.com", - "is-a-bruinsfan.org", - "is-a-bulls-fan.com", - "is-a-candidate.org", - "is-a-caterer.com", - "is-a-celticsfan.org", - "is-a-chef.com", - "is-a-chef.net", - "is-a-chef.org", - "is-a-conservative.com", - "is-a-cpa.com", - "is-a-cubicle-slave.com", - "is-a-democrat.com", - "is-a-designer.com", - "is-a-doctor.com", - "is-a-financialadvisor.com", - "is-a-geek.com", - "is-a-geek.net", - "is-a-geek.org", - "is-a-green.com", - "is-a-guru.com", - "is-a-hard-worker.com", - "is-a-hunter.com", - "is-a-knight.org", - "is-a-landscaper.com", - "is-a-lawyer.com", - "is-a-liberal.com", - "is-a-libertarian.com", - "is-a-linux-user.org", - "is-a-llama.com", - "is-a-musician.com", - "is-a-nascarfan.com", - "is-a-nurse.com", - "is-a-painter.com", - "is-a-patsfan.org", - "is-a-personaltrainer.com", - "is-a-photographer.com", - "is-a-player.com", - "is-a-republican.com", - "is-a-rockstar.com", - "is-a-socialist.com", - "is-a-soxfan.org", - "is-a-student.com", - "is-a-teacher.com", - "is-a-techie.com", - "is-a-therapist.com", - "is-an-accountant.com", - "is-an-actor.com", - "is-an-actress.com", - "is-an-anarchist.com", - "is-an-artist.com", - "is-an-engineer.com", - "is-an-entertainer.com", - "is-by.us", - "is-certified.com", - "is-found.org", - "is-gone.com", - "is-into-anime.com", - "is-into-cars.com", - "is-into-cartoons.com", - "is-into-games.com", - "is-leet.com", - "is-lost.org", - "is-not-certified.com", - "is-saved.org", - "is-slick.com", - "is-uberleet.com", - "is-very-bad.org", - "is-very-evil.org", - "is-very-good.org", - "is-very-nice.org", - "is-very-sweet.org", - "is-with-theband.com", - "isa-geek.com", - "isa-geek.net", - "isa-geek.org", - "isa-hockeynut.com", - "issmarterthanyou.com", - "isteingeek.de", - "istmein.de", - "kicks-ass.net", - "kicks-ass.org", - "knowsitall.info", - "land-4-sale.us", - "lebtimnetz.de", - "leitungsen.de", - "likes-pie.com", - "likescandy.com", - "merseine.nu", - "mine.nu", - "misconfused.org", - "mypets.ws", - "myphotos.cc", - "neat-url.com", - "office-on-the.net", - "on-the-web.tv", - "podzone.net", - "podzone.org", - "readmyblog.org", - "saves-the-whales.com", - "scrapper-site.net", - "scrapping.cc", - "selfip.biz", - "selfip.com", - "selfip.info", - "selfip.net", - "selfip.org", - "sells-for-less.com", - "sells-for-u.com", - "sells-it.net", - "sellsyourhome.org", - "servebbs.com", - "servebbs.net", - "servebbs.org", - "serveftp.net", - "serveftp.org", - "servegame.org", - "shacknet.nu", - "simple-url.com", - "space-to-rent.com", - "stuff-4-sale.org", - "stuff-4-sale.us", - "teaches-yoga.com", - "thruhere.net", - "traeumtgerade.de", - "webhop.biz", - "webhop.info", - "webhop.net", - "webhop.org", - "worse-than.tv", - "writesthisblog.com", - "ddnss.de", - "dyn.ddnss.de", - "dyndns.ddnss.de", - "dyndns1.de", - "dyn-ip24.de", - "home-webserver.de", - "dyn.home-webserver.de", - "myhome-server.de", - "ddnss.org", - "definima.net", - "definima.io", - "bci.dnstrace.pro", - "ddnsfree.com", - "ddnsgeek.com", - "giize.com", - "gleeze.com", - "kozow.com", - "loseyourip.com", - "ooguy.com", - "theworkpc.com", - "casacam.net", - "dynu.net", - "accesscam.org", - "camdvr.org", - "freeddns.org", - "mywire.org", - "webredirect.org", - "myddns.rocks", - "blogsite.xyz", - "dynv6.net", - "e4.cz", - "mytuleap.com", - "enonic.io", - "customer.enonic.io", - "eu.org", - "al.eu.org", - "asso.eu.org", - "at.eu.org", - "au.eu.org", - "be.eu.org", - "bg.eu.org", - "ca.eu.org", - "cd.eu.org", - "ch.eu.org", - "cn.eu.org", - "cy.eu.org", - "cz.eu.org", - "de.eu.org", - "dk.eu.org", - "edu.eu.org", - "ee.eu.org", - "es.eu.org", - "fi.eu.org", - "fr.eu.org", - "gr.eu.org", - "hr.eu.org", - "hu.eu.org", - "ie.eu.org", - "il.eu.org", - "in.eu.org", - "int.eu.org", - "is.eu.org", - "it.eu.org", - "jp.eu.org", - "kr.eu.org", - "lt.eu.org", - "lu.eu.org", - "lv.eu.org", - "mc.eu.org", - "me.eu.org", - "mk.eu.org", - "mt.eu.org", - "my.eu.org", - "net.eu.org", - "ng.eu.org", - "nl.eu.org", - "no.eu.org", - "nz.eu.org", - "paris.eu.org", - "pl.eu.org", - "pt.eu.org", - "q-a.eu.org", - "ro.eu.org", - "ru.eu.org", - "se.eu.org", - "si.eu.org", - "sk.eu.org", - "tr.eu.org", - "uk.eu.org", - "us.eu.org", - "eu-1.evennode.com", - "eu-2.evennode.com", - "eu-3.evennode.com", - "eu-4.evennode.com", - "us-1.evennode.com", - "us-2.evennode.com", - "us-3.evennode.com", - "us-4.evennode.com", - "twmail.cc", - "twmail.net", - "twmail.org", - "mymailer.com.tw", - "url.tw", - "apps.fbsbx.com", - "ru.net", - "adygeya.ru", - "bashkiria.ru", - "bir.ru", - "cbg.ru", - "com.ru", - "dagestan.ru", - "grozny.ru", - "kalmykia.ru", - "kustanai.ru", - "marine.ru", - "mordovia.ru", - "msk.ru", - "mytis.ru", - "nalchik.ru", - "nov.ru", - "pyatigorsk.ru", - "spb.ru", - "vladikavkaz.ru", - "vladimir.ru", - "abkhazia.su", - "adygeya.su", - "aktyubinsk.su", - "arkhangelsk.su", - "armenia.su", - "ashgabad.su", - "azerbaijan.su", - "balashov.su", - "bashkiria.su", - "bryansk.su", - "bukhara.su", - "chimkent.su", - "dagestan.su", - "east-kazakhstan.su", - "exnet.su", - "georgia.su", - "grozny.su", - "ivanovo.su", - "jambyl.su", - "kalmykia.su", - "kaluga.su", - "karacol.su", - "karaganda.su", - "karelia.su", - "khakassia.su", - "krasnodar.su", - "kurgan.su", - "kustanai.su", - "lenug.su", - "mangyshlak.su", - "mordovia.su", - "msk.su", - "murmansk.su", - "nalchik.su", - "navoi.su", - "north-kazakhstan.su", - "nov.su", - "obninsk.su", - "penza.su", - "pokrovsk.su", - "sochi.su", - "spb.su", - "tashkent.su", - "termez.su", - "togliatti.su", - "troitsk.su", - "tselinograd.su", - "tula.su", - "tuva.su", - "vladikavkaz.su", - "vladimir.su", - "vologda.su", - "channelsdvr.net", - "fastlylb.net", - "map.fastlylb.net", - "freetls.fastly.net", - "map.fastly.net", - "a.prod.fastly.net", - "global.prod.fastly.net", - "a.ssl.fastly.net", - "b.ssl.fastly.net", - "global.ssl.fastly.net", - "fastpanel.direct", - "fastvps-server.com", - "fhapp.xyz", - "fedorainfracloud.org", - "fedorapeople.org", - "cloud.fedoraproject.org", - "app.os.fedoraproject.org", - "app.os.stg.fedoraproject.org", - "filegear.me", - "firebaseapp.com", - "flynnhub.com", - "flynnhosting.net", - "freebox-os.com", - "freeboxos.com", - "fbx-os.fr", - "fbxos.fr", - "freebox-os.fr", - "freeboxos.fr", - "freedesktop.org", - "*.futurecms.at", - "*.ex.futurecms.at", - "*.in.futurecms.at", - "futurehosting.at", - "futuremailing.at", - "*.ex.ortsinfo.at", - "*.kunden.ortsinfo.at", - "*.statics.cloud", - "service.gov.uk", - "github.io", - "githubusercontent.com", - "gitlab.io", - "homeoffice.gov.uk", - "ro.im", - "shop.ro", - "goip.de", - "*.0emm.com", - "appspot.com", - "blogspot.ae", - "blogspot.al", - "blogspot.am", - "blogspot.ba", - "blogspot.be", - "blogspot.bg", - "blogspot.bj", - "blogspot.ca", - "blogspot.cf", - "blogspot.ch", - "blogspot.cl", - "blogspot.co.at", - "blogspot.co.id", - "blogspot.co.il", - "blogspot.co.ke", - "blogspot.co.nz", - "blogspot.co.uk", - "blogspot.co.za", - "blogspot.com", - "blogspot.com.ar", - "blogspot.com.au", - "blogspot.com.br", - "blogspot.com.by", - "blogspot.com.co", - "blogspot.com.cy", - "blogspot.com.ee", - "blogspot.com.eg", - "blogspot.com.es", - "blogspot.com.mt", - "blogspot.com.ng", - "blogspot.com.tr", - "blogspot.com.uy", - "blogspot.cv", - "blogspot.cz", - "blogspot.de", - "blogspot.dk", - "blogspot.fi", - "blogspot.fr", - "blogspot.gr", - "blogspot.hk", - "blogspot.hr", - "blogspot.hu", - "blogspot.ie", - "blogspot.in", - "blogspot.is", - "blogspot.it", - "blogspot.jp", - "blogspot.kr", - "blogspot.li", - "blogspot.lt", - "blogspot.lu", - "blogspot.md", - "blogspot.mk", - "blogspot.mr", - "blogspot.mx", - "blogspot.my", - "blogspot.nl", - "blogspot.no", - "blogspot.pe", - "blogspot.pt", - "blogspot.qa", - "blogspot.re", - "blogspot.ro", - "blogspot.rs", - "blogspot.ru", - "blogspot.se", - "blogspot.sg", - "blogspot.si", - "blogspot.sk", - "blogspot.sn", - "blogspot.td", - "blogspot.tw", - "blogspot.ug", - "blogspot.vn", - "cloudfunctions.net", - "cloud.goog", - "codespot.com", - "googleapis.com", - "googlecode.com", - "pagespeedmobilizer.com", - "publishproxy.com", - "withgoogle.com", - "withyoutube.com", - "hashbang.sh", - "hasura.app", - "hasura-app.io", - "hepforge.org", - "herokuapp.com", - "herokussl.com", - "myravendb.com", - "ravendb.community", - "ravendb.me", - "development.run", - "ravendb.run", - "moonscale.net", - "iki.fi", - "biz.at", - "info.at", - "info.cx", - "ac.leg.br", - "al.leg.br", - "am.leg.br", - "ap.leg.br", - "ba.leg.br", - "ce.leg.br", - "df.leg.br", - "es.leg.br", - "go.leg.br", - "ma.leg.br", - "mg.leg.br", - "ms.leg.br", - "mt.leg.br", - "pa.leg.br", - "pb.leg.br", - "pe.leg.br", - "pi.leg.br", - "pr.leg.br", - "rj.leg.br", - "rn.leg.br", - "ro.leg.br", - "rr.leg.br", - "rs.leg.br", - "sc.leg.br", - "se.leg.br", - "sp.leg.br", - "to.leg.br", - "pixolino.com", - "ipifony.net", - "mein-iserv.de", - "test-iserv.de", - "myjino.ru", - "*.hosting.myjino.ru", - "*.landing.myjino.ru", - "*.spectrum.myjino.ru", - "*.vps.myjino.ru", - "*.triton.zone", - "*.cns.joyent.com", - "js.org", - "keymachine.de", - "knightpoint.systems", - "co.krd", - "edu.krd", - "git-repos.de", - "lcube-server.de", - "svn-repos.de", - "app.lmpm.com", - "linkitools.space", - "linkyard.cloud", - "linkyard-cloud.ch", - "we.bs", - "uklugs.org", - "glug.org.uk", - "lug.org.uk", - "lugs.org.uk", - "barsy.bg", - "barsy.co.uk", - "barsyonline.co.uk", - "barsycenter.com", - "barsyonline.com", - "barsy.club", - "barsy.de", - "barsy.eu", - "barsy.in", - "barsy.info", - "barsy.io", - "barsy.me", - "barsy.menu", - "barsy.mobi", - "barsy.net", - "barsy.online", - "barsy.org", - "barsy.pro", - "barsy.pub", - "barsy.shop", - "barsy.site", - "barsy.support", - "barsy.uk", - "*.magentosite.cloud", - "mayfirst.info", - "mayfirst.org", - "hb.cldmail.ru", - "miniserver.com", - "memset.net", - "cloud.metacentrum.cz", - "custom.metacentrum.cz", - "flt.cloud.muni.cz", - "usr.cloud.muni.cz", - "meteorapp.com", - "eu.meteorapp.com", - "co.pl", - "azurecontainer.io", - "azurewebsites.net", - "azure-mobile.net", - "cloudapp.net", - "mozilla-iot.org", - "bmoattachments.org", - "net.ru", - "org.ru", - "pp.ru", - "bitballoon.com", - "netlify.com", - "4u.com", - "ngrok.io", - "nh-serv.co.uk", - "nfshost.com", - "dnsking.ch", - "mypi.co", - "n4t.co", - "001www.com", - "ddnslive.com", - "myiphost.com", - "forumz.info", - "16-b.it", - "32-b.it", - "64-b.it", - "soundcast.me", - "tcp4.me", - "dnsup.net", - "hicam.net", - "now-dns.net", - "ownip.net", - "vpndns.net", - "dynserv.org", - "now-dns.org", - "x443.pw", - "now-dns.top", - "ntdll.top", - "freeddns.us", - "crafting.xyz", - "zapto.xyz", - "nsupdate.info", - "nerdpol.ovh", - "blogsyte.com", - "brasilia.me", - "cable-modem.org", - "ciscofreak.com", - "collegefan.org", - "couchpotatofries.org", - "damnserver.com", - "ddns.me", - "ditchyourip.com", - "dnsfor.me", - "dnsiskinky.com", - "dvrcam.info", - "dynns.com", - "eating-organic.net", - "fantasyleague.cc", - "geekgalaxy.com", - "golffan.us", - "health-carereform.com", - "homesecuritymac.com", - "homesecuritypc.com", - "hopto.me", - "ilovecollege.info", - "loginto.me", - "mlbfan.org", - "mmafan.biz", - "myactivedirectory.com", - "mydissent.net", - "myeffect.net", - "mymediapc.net", - "mypsx.net", - "mysecuritycamera.com", - "mysecuritycamera.net", - "mysecuritycamera.org", - "net-freaks.com", - "nflfan.org", - "nhlfan.net", - "no-ip.ca", - "no-ip.co.uk", - "no-ip.net", - "noip.us", - "onthewifi.com", - "pgafan.net", - "point2this.com", - "pointto.us", - "privatizehealthinsurance.net", - "quicksytes.com", - "read-books.org", - "securitytactics.com", - "serveexchange.com", - "servehumour.com", - "servep2p.com", - "servesarcasm.com", - "stufftoread.com", - "ufcfan.org", - "unusualperson.com", - "workisboring.com", - "3utilities.com", - "bounceme.net", - "ddns.net", - "ddnsking.com", - "gotdns.ch", - "hopto.org", - "myftp.biz", - "myftp.org", - "myvnc.com", - "no-ip.biz", - "no-ip.info", - "no-ip.org", - "noip.me", - "redirectme.net", - "servebeer.com", - "serveblog.net", - "servecounterstrike.com", - "serveftp.com", - "servegame.com", - "servehalflife.com", - "servehttp.com", - "serveirc.com", - "serveminecraft.net", - "servemp3.com", - "servepics.com", - "servequake.com", - "sytes.net", - "webhop.me", - "zapto.org", - "stage.nodeart.io", - "nodum.co", - "nodum.io", - "pcloud.host", - "nyc.mn", - "nom.ae", - "nom.af", - "nom.ai", - "nom.al", - "nym.by", - "nym.bz", - "nom.cl", - "nom.gd", - "nom.ge", - "nom.gl", - "nym.gr", - "nom.gt", - "nym.gy", - "nom.hn", - "nym.ie", - "nom.im", - "nom.ke", - "nym.kz", - "nym.la", - "nym.lc", - "nom.li", - "nym.li", - "nym.lt", - "nym.lu", - "nym.me", - "nom.mk", - "nym.mn", - "nym.mx", - "nom.nu", - "nym.nz", - "nym.pe", - "nym.pt", - "nom.pw", - "nom.qa", - "nym.ro", - "nom.rs", - "nom.si", - "nym.sk", - "nom.st", - "nym.su", - "nym.sx", - "nom.tj", - "nym.tw", - "nom.ug", - "nom.uy", - "nom.vc", - "nom.vg", - "cya.gg", - "cloudycluster.net", - "nid.io", - "opencraft.hosting", - "operaunite.com", - "outsystemscloud.com", - "ownprovider.com", - "own.pm", - "ox.rs", - "oy.lc", - "pgfog.com", - "pagefrontapp.com", - "art.pl", - "gliwice.pl", - "krakow.pl", - "poznan.pl", - "wroc.pl", - "zakopane.pl", - "pantheonsite.io", - "gotpantheon.com", - "mypep.link", - "on-web.fr", - "*.platform.sh", - "*.platformsh.site", - "xen.prgmr.com", - "priv.at", - "protonet.io", - "chirurgiens-dentistes-en-france.fr", - "byen.site", - "ras.ru", - "qa2.com", - "dev-myqnapcloud.com", - "alpha-myqnapcloud.com", - "myqnapcloud.com", - "*.quipelements.com", - "vapor.cloud", - "vaporcloud.io", - "rackmaze.com", - "rackmaze.net", - "rhcloud.com", - "resindevice.io", - "devices.resinstaging.io", - "hzc.io", - "wellbeingzone.eu", - "ptplus.fit", - "wellbeingzone.co.uk", - "sandcats.io", - "logoip.de", - "logoip.com", - "schokokeks.net", - "scrysec.com", - "firewall-gateway.com", - "firewall-gateway.de", - "my-gateway.de", - "my-router.de", - "spdns.de", - "spdns.eu", - "firewall-gateway.net", - "my-firewall.org", - "myfirewall.org", - "spdns.org", - "*.s5y.io", - "*.sensiosite.cloud", - "biz.ua", - "co.ua", - "pp.ua", - "shiftedit.io", - "myshopblocks.com", - "1kapp.com", - "appchizi.com", - "applinzi.com", - "sinaapp.com", - "vipsinaapp.com", - "bounty-full.com", - "alpha.bounty-full.com", - "beta.bounty-full.com", - "static.land", - "dev.static.land", - "sites.static.land", - "apps.lair.io", - "*.stolos.io", - "spacekit.io", - "customer.speedpartner.de", - "stackspace.space", - "storj.farm", - "utwente.io", - "temp-dns.com", - "diskstation.me", - "dscloud.biz", - "dscloud.me", - "dscloud.mobi", - "dsmynas.com", - "dsmynas.net", - "dsmynas.org", - "familyds.com", - "familyds.net", - "familyds.org", - "i234.me", - "myds.me", - "synology.me", - "vpnplus.to", - "taifun-dns.de", - "gda.pl", - "gdansk.pl", - "gdynia.pl", - "med.pl", - "sopot.pl", - "gwiddle.co.uk", - "cust.dev.thingdust.io", - "cust.disrec.thingdust.io", - "cust.prod.thingdust.io", - "cust.testing.thingdust.io", - "bloxcms.com", - "townnews-staging.com", - "12hp.at", - "2ix.at", - "4lima.at", - "lima-city.at", - "12hp.ch", - "2ix.ch", - "4lima.ch", - "lima-city.ch", - "trafficplex.cloud", - "de.cool", - "12hp.de", - "2ix.de", - "4lima.de", - "lima-city.de", - "1337.pictures", - "clan.rip", - "lima-city.rocks", - "webspace.rocks", - "lima.zone", - "*.transurl.be", - "*.transurl.eu", - "*.transurl.nl", - "tuxfamily.org", - "dd-dns.de", - "diskstation.eu", - "diskstation.org", - "dray-dns.de", - "draydns.de", - "dyn-vpn.de", - "dynvpn.de", - "mein-vigor.de", - "my-vigor.de", - "my-wan.de", - "syno-ds.de", - "synology-diskstation.de", - "synology-ds.de", - "uber.space", - "*.uberspace.de", - "hk.com", - "hk.org", - "ltd.hk", - "inc.hk", - "virtualuser.de", - "virtual-user.de", - "lib.de.us", - "2038.io", - "router.management", - "v-info.info", - "wedeploy.io", - "wedeploy.me", - "wedeploy.sh", - "remotewd.com", - "wmflabs.org", - "half.host", - "xnbay.com", - "u2.xnbay.com", - "u2-local.xnbay.com", - "cistron.nl", - "demon.nl", - "xs4all.space", - "official.academy", - "yolasite.com", - "ybo.faith", - "yombo.me", - "homelink.one", - "ybo.party", - "ybo.review", - "ybo.science", - "ybo.trade", - "nohost.me", - "noho.st", - "za.net", - "za.org", - "now.sh", - "zone.id", -} - -var nodeLabels = [...]string{ - "aaa", - "aarp", - "abarth", - "abb", - "abbott", - "abbvie", - "abc", - "able", - "abogado", - "abudhabi", - "ac", - "academy", - "accenture", - "accountant", - "accountants", - "aco", - "active", - "actor", - "ad", - "adac", - "ads", - "adult", - "ae", - "aeg", - "aero", - "aetna", - "af", - "afamilycompany", - "afl", - "africa", - "ag", - "agakhan", - "agency", - "ai", - "aig", - "aigo", - "airbus", - "airforce", - "airtel", - "akdn", - "al", - "alfaromeo", - "alibaba", - "alipay", - "allfinanz", - "allstate", - "ally", - "alsace", - "alstom", - "am", - "americanexpress", - "americanfamily", - "amex", - "amfam", - "amica", - "amsterdam", - "analytics", - "android", - "anquan", - "anz", - "ao", - "aol", - "apartments", - "app", - "apple", - "aq", - "aquarelle", - "ar", - "arab", - "aramco", - "archi", - "army", - "arpa", - "art", - "arte", - "as", - "asda", - "asia", - "associates", - "at", - "athleta", - "attorney", - "au", - "auction", - "audi", - "audible", - "audio", - "auspost", - "author", - "auto", - "autos", - "avianca", - "aw", - "aws", - "ax", - "axa", - "az", - "azure", - "ba", - "baby", - "baidu", - "banamex", - "bananarepublic", - "band", - "bank", - "bar", - "barcelona", - "barclaycard", - "barclays", - "barefoot", - "bargains", - "baseball", - "basketball", - "bauhaus", - "bayern", - "bb", - "bbc", - "bbt", - "bbva", - "bcg", - "bcn", - "bd", - "be", - "beats", - "beauty", - "beer", - "bentley", - "berlin", - "best", - "bestbuy", - "bet", - "bf", - "bg", - "bh", - "bharti", - "bi", - "bible", - "bid", - "bike", - "bing", - "bingo", - "bio", - "biz", - "bj", - "black", - "blackfriday", - "blanco", - "blockbuster", - "blog", - "bloomberg", - "blue", - "bm", - "bms", - "bmw", - "bn", - "bnl", - "bnpparibas", - "bo", - "boats", - "boehringer", - "bofa", - "bom", - "bond", - "boo", - "book", - "booking", - "bosch", - "bostik", - "boston", - "bot", - "boutique", - "box", - "br", - "bradesco", - "bridgestone", - "broadway", - "broker", - "brother", - "brussels", - "bs", - "bt", - "budapest", - "bugatti", - "build", - "builders", - "business", - "buy", - "buzz", - "bv", - "bw", - "by", - "bz", - "bzh", - "ca", - "cab", - "cafe", - "cal", - "call", - "calvinklein", - "cam", - "camera", - "camp", - "cancerresearch", - "canon", - "capetown", - "capital", - "capitalone", - "car", - "caravan", - "cards", - "care", - "career", - "careers", - "cars", - "cartier", - "casa", - "case", - "caseih", - "cash", - "casino", - "cat", - "catering", - "catholic", - "cba", - "cbn", - "cbre", - "cbs", - "cc", - "cd", - "ceb", - "center", - "ceo", - "cern", - "cf", - "cfa", - "cfd", - "cg", - "ch", - "chanel", - "channel", - "charity", - "chase", - "chat", - "cheap", - "chintai", - "christmas", - "chrome", - "chrysler", - "church", - "ci", - "cipriani", - "circle", - "cisco", - "citadel", - "citi", - "citic", - "city", - "cityeats", - "ck", - "cl", - "claims", - "cleaning", - "click", - "clinic", - "clinique", - "clothing", - "cloud", - "club", - "clubmed", - "cm", - "cn", - "co", - "coach", - "codes", - "coffee", - "college", - "cologne", - "com", - "comcast", - "commbank", - "community", - "company", - "compare", - "computer", - "comsec", - "condos", - "construction", - "consulting", - "contact", - "contractors", - "cooking", - "cookingchannel", - "cool", - "coop", - "corsica", - "country", - "coupon", - "coupons", - "courses", - "cr", - "credit", - "creditcard", - "creditunion", - "cricket", - "crown", - "crs", - "cruise", - "cruises", - "csc", - "cu", - "cuisinella", - "cv", - "cw", - "cx", - "cy", - "cymru", - "cyou", - "cz", - "dabur", - "dad", - "dance", - "data", - "date", - "dating", - "datsun", - "day", - "dclk", - "dds", - "de", - "deal", - "dealer", - "deals", - "degree", - "delivery", - "dell", - "deloitte", - "delta", - "democrat", - "dental", - "dentist", - "desi", - "design", - "dev", - "dhl", - "diamonds", - "diet", - "digital", - "direct", - "directory", - "discount", - "discover", - "dish", - "diy", - "dj", - "dk", - "dm", - "dnp", - "do", - "docs", - "doctor", - "dodge", - "dog", - "doha", - "domains", - "dot", - "download", - "drive", - "dtv", - "dubai", - "duck", - "dunlop", - "duns", - "dupont", - "durban", - "dvag", - "dvr", - "dz", - "earth", - "eat", - "ec", - "eco", - "edeka", - "edu", - "education", - "ee", - "eg", - "email", - "emerck", - "energy", - "engineer", - "engineering", - "enterprises", - "epost", - "epson", - "equipment", - "er", - "ericsson", - "erni", - "es", - "esq", - "estate", - "esurance", - "et", - "etisalat", - "eu", - "eurovision", - "eus", - "events", - "everbank", - "exchange", - "expert", - "exposed", - "express", - "extraspace", - "fage", - "fail", - "fairwinds", - "faith", - "family", - "fan", - "fans", - "farm", - "farmers", - "fashion", - "fast", - "fedex", - "feedback", - "ferrari", - "ferrero", - "fi", - "fiat", - "fidelity", - "fido", - "film", - "final", - "finance", - "financial", - "fire", - "firestone", - "firmdale", - "fish", - "fishing", - "fit", - "fitness", - "fj", - "fk", - "flickr", - "flights", - "flir", - "florist", - "flowers", - "fly", - "fm", - "fo", - "foo", - "food", - "foodnetwork", - "football", - "ford", - "forex", - "forsale", - "forum", - "foundation", - "fox", - "fr", - "free", - "fresenius", - "frl", - "frogans", - "frontdoor", - "frontier", - "ftr", - "fujitsu", - "fujixerox", - "fun", - "fund", - "furniture", - "futbol", - "fyi", - "ga", - "gal", - "gallery", - "gallo", - "gallup", - "game", - "games", - "gap", - "garden", - "gb", - "gbiz", - "gd", - "gdn", - "ge", - "gea", - "gent", - "genting", - "george", - "gf", - "gg", - "ggee", - "gh", - "gi", - "gift", - "gifts", - "gives", - "giving", - "gl", - "glade", - "glass", - "gle", - "global", - "globo", - "gm", - "gmail", - "gmbh", - "gmo", - "gmx", - "gn", - "godaddy", - "gold", - "goldpoint", - "golf", - "goo", - "goodhands", - "goodyear", - "goog", - "google", - "gop", - "got", - "gov", - "gp", - "gq", - "gr", - "grainger", - "graphics", - "gratis", - "green", - "gripe", - "grocery", - "group", - "gs", - "gt", - "gu", - "guardian", - "gucci", - "guge", - "guide", - "guitars", - "guru", - "gw", - "gy", - "hair", - "hamburg", - "hangout", - "haus", - "hbo", - "hdfc", - "hdfcbank", - "health", - "healthcare", - "help", - "helsinki", - "here", - "hermes", - "hgtv", - "hiphop", - "hisamitsu", - "hitachi", - "hiv", - "hk", - "hkt", - "hm", - "hn", - "hockey", - "holdings", - "holiday", - "homedepot", - "homegoods", - "homes", - "homesense", - "honda", - "honeywell", - "horse", - "hospital", - "host", - "hosting", - "hot", - "hoteles", - "hotels", - "hotmail", - "house", - "how", - "hr", - "hsbc", - "ht", - "hu", - "hughes", - "hyatt", - "hyundai", - "ibm", - "icbc", - "ice", - "icu", - "id", - "ie", - "ieee", - "ifm", - "ikano", - "il", - "im", - "imamat", - "imdb", - "immo", - "immobilien", - "in", - "inc", - "industries", - "infiniti", - "info", - "ing", - "ink", - "institute", - "insurance", - "insure", - "int", - "intel", - "international", - "intuit", - "investments", - "io", - "ipiranga", - "iq", - "ir", - "irish", - "is", - "iselect", - "ismaili", - "ist", - "istanbul", - "it", - "itau", - "itv", - "iveco", - "iwc", - "jaguar", - "java", - "jcb", - "jcp", - "je", - "jeep", - "jetzt", - "jewelry", - "jio", - "jlc", - "jll", - "jm", - "jmp", - "jnj", - "jo", - "jobs", - "joburg", - "jot", - "joy", - "jp", - "jpmorgan", - "jprs", - "juegos", - "juniper", - "kaufen", - "kddi", - "ke", - "kerryhotels", - "kerrylogistics", - "kerryproperties", - "kfh", - "kg", - "kh", - "ki", - "kia", - "kim", - "kinder", - "kindle", - "kitchen", - "kiwi", - "km", - "kn", - "koeln", - "komatsu", - "kosher", - "kp", - "kpmg", - "kpn", - "kr", - "krd", - "kred", - "kuokgroup", - "kw", - "ky", - "kyoto", - "kz", - "la", - "lacaixa", - "ladbrokes", - "lamborghini", - "lamer", - "lancaster", - "lancia", - "lancome", - "land", - "landrover", - "lanxess", - "lasalle", - "lat", - "latino", - "latrobe", - "law", - "lawyer", - "lb", - "lc", - "lds", - "lease", - "leclerc", - "lefrak", - "legal", - "lego", - "lexus", - "lgbt", - "li", - "liaison", - "lidl", - "life", - "lifeinsurance", - "lifestyle", - "lighting", - "like", - "lilly", - "limited", - "limo", - "lincoln", - "linde", - "link", - "lipsy", - "live", - "living", - "lixil", - "lk", - "llc", - "loan", - "loans", - "locker", - "locus", - "loft", - "lol", - "london", - "lotte", - "lotto", - "love", - "lpl", - "lplfinancial", - "lr", - "ls", - "lt", - "ltd", - "ltda", - "lu", - "lundbeck", - "lupin", - "luxe", - "luxury", - "lv", - "ly", - "ma", - "macys", - "madrid", - "maif", - "maison", - "makeup", - "man", - "management", - "mango", - "map", - "market", - "marketing", - "markets", - "marriott", - "marshalls", - "maserati", - "mattel", - "mba", - "mc", - "mckinsey", - "md", - "me", - "med", - "media", - "meet", - "melbourne", - "meme", - "memorial", - "men", - "menu", - "meo", - "merckmsd", - "metlife", - "mg", - "mh", - "miami", - "microsoft", - "mil", - "mini", - "mint", - "mit", - "mitsubishi", - "mk", - "ml", - "mlb", - "mls", - "mm", - "mma", - "mn", - "mo", - "mobi", - "mobile", - "mobily", - "moda", - "moe", - "moi", - "mom", - "monash", - "money", - "monster", - "mopar", - "mormon", - "mortgage", - "moscow", - "moto", - "motorcycles", - "mov", - "movie", - "movistar", - "mp", - "mq", - "mr", - "ms", - "msd", - "mt", - "mtn", - "mtr", - "mu", - "museum", - "mutual", - "mv", - "mw", - "mx", - "my", - "mz", - "na", - "nab", - "nadex", - "nagoya", - "name", - "nationwide", - "natura", - "navy", - "nba", - "nc", - "ne", - "nec", - "net", - "netbank", - "netflix", - "network", - "neustar", - "new", - "newholland", - "news", - "next", - "nextdirect", - "nexus", - "nf", - "nfl", - "ng", - "ngo", - "nhk", - "ni", - "nico", - "nike", - "nikon", - "ninja", - "nissan", - "nissay", - "nl", - "no", - "nokia", - "northwesternmutual", - "norton", - "now", - "nowruz", - "nowtv", - "np", - "nr", - "nra", - "nrw", - "ntt", - "nu", - "nyc", - "nz", - "obi", - "observer", - "off", - "office", - "okinawa", - "olayan", - "olayangroup", - "oldnavy", - "ollo", - "om", - "omega", - "one", - "ong", - "onion", - "onl", - "online", - "onyourside", - "ooo", - "open", - "oracle", - "orange", - "org", - "organic", - "origins", - "osaka", - "otsuka", - "ott", - "ovh", - "pa", - "page", - "panasonic", - "panerai", - "paris", - "pars", - "partners", - "parts", - "party", - "passagens", - "pay", - "pccw", - "pe", - "pet", - "pf", - "pfizer", - "pg", - "ph", - "pharmacy", - "phd", - "philips", - "phone", - "photo", - "photography", - "photos", - "physio", - "piaget", - "pics", - "pictet", - "pictures", - "pid", - "pin", - "ping", - "pink", - "pioneer", - "pizza", - "pk", - "pl", - "place", - "play", - "playstation", - "plumbing", - "plus", - "pm", - "pn", - "pnc", - "pohl", - "poker", - "politie", - "porn", - "post", - "pr", - "pramerica", - "praxi", - "press", - "prime", - "pro", - "prod", - "productions", - "prof", - "progressive", - "promo", - "properties", - "property", - "protection", - "pru", - "prudential", - "ps", - "pt", - "pub", - "pw", - "pwc", - "py", - "qa", - "qpon", - "quebec", - "quest", - "qvc", - "racing", - "radio", - "raid", - "re", - "read", - "realestate", - "realtor", - "realty", - "recipes", - "red", - "redstone", - "redumbrella", - "rehab", - "reise", - "reisen", - "reit", - "reliance", - "ren", - "rent", - "rentals", - "repair", - "report", - "republican", - "rest", - "restaurant", - "review", - "reviews", - "rexroth", - "rich", - "richardli", - "ricoh", - "rightathome", - "ril", - "rio", - "rip", - "rmit", - "ro", - "rocher", - "rocks", - "rodeo", - "rogers", - "room", - "rs", - "rsvp", - "ru", - "rugby", - "ruhr", - "run", - "rw", - "rwe", - "ryukyu", - "sa", - "saarland", - "safe", - "safety", - "sakura", - "sale", - "salon", - "samsclub", - "samsung", - "sandvik", - "sandvikcoromant", - "sanofi", - "sap", - "sapo", - "sarl", - "sas", - "save", - "saxo", - "sb", - "sbi", - "sbs", - "sc", - "sca", - "scb", - "schaeffler", - "schmidt", - "scholarships", - "school", - "schule", - "schwarz", - "science", - "scjohnson", - "scor", - "scot", - "sd", - "se", - "search", - "seat", - "secure", - "security", - "seek", - "select", - "sener", - "services", - "ses", - "seven", - "sew", - "sex", - "sexy", - "sfr", - "sg", - "sh", - "shangrila", - "sharp", - "shaw", - "shell", - "shia", - "shiksha", - "shoes", - "shop", - "shopping", - "shouji", - "show", - "showtime", - "shriram", - "si", - "silk", - "sina", - "singles", - "site", - "sj", - "sk", - "ski", - "skin", - "sky", - "skype", - "sl", - "sling", - "sm", - "smart", - "smile", - "sn", - "sncf", - "so", - "soccer", - "social", - "softbank", - "software", - "sohu", - "solar", - "solutions", - "song", - "sony", - "soy", - "space", - "spiegel", - "sport", - "spot", - "spreadbetting", - "sr", - "srl", - "srt", - "st", - "stada", - "staples", - "star", - "starhub", - "statebank", - "statefarm", - "statoil", - "stc", - "stcgroup", - "stockholm", - "storage", - "store", - "stream", - "studio", - "study", - "style", - "su", - "sucks", - "supplies", - "supply", - "support", - "surf", - "surgery", - "suzuki", - "sv", - "swatch", - "swiftcover", - "swiss", - "sx", - "sy", - "sydney", - "symantec", - "systems", - "sz", - "tab", - "taipei", - "talk", - "taobao", - "target", - "tatamotors", - "tatar", - "tattoo", - "tax", - "taxi", - "tc", - "tci", - "td", - "tdk", - "team", - "tech", - "technology", - "tel", - "telecity", - "telefonica", - "temasek", - "tennis", - "teva", - "tf", - "tg", - "th", - "thd", - "theater", - "theatre", - "tiaa", - "tickets", - "tienda", - "tiffany", - "tips", - "tires", - "tirol", - "tj", - "tjmaxx", - "tjx", - "tk", - "tkmaxx", - "tl", - "tm", - "tmall", - "tn", - "to", - "today", - "tokyo", - "tools", - "top", - "toray", - "toshiba", - "total", - "tours", - "town", - "toyota", - "toys", - "tr", - "trade", - "trading", - "training", - "travel", - "travelchannel", - "travelers", - "travelersinsurance", - "trust", - "trv", - "tt", - "tube", - "tui", - "tunes", - "tushu", - "tv", - "tvs", - "tw", - "tz", - "ua", - "ubank", - "ubs", - "uconnect", - "ug", - "uk", - "unicom", - "university", - "uno", - "uol", - "ups", - "us", - "uy", - "uz", - "va", - "vacations", - "vana", - "vanguard", - "vc", - "ve", - "vegas", - "ventures", - "verisign", - "versicherung", - "vet", - "vg", - "vi", - "viajes", - "video", - "vig", - "viking", - "villas", - "vin", - "vip", - "virgin", - "visa", - "vision", - "vista", - "vistaprint", - "viva", - "vivo", - "vlaanderen", - "vn", - "vodka", - "volkswagen", - "volvo", - "vote", - "voting", - "voto", - "voyage", - "vu", - "vuelos", - "wales", - "walmart", - "walter", - "wang", - "wanggou", - "warman", - "watch", - "watches", - "weather", - "weatherchannel", - "webcam", - "weber", - "website", - "wed", - "wedding", - "weibo", - "weir", - "wf", - "whoswho", - "wien", - "wiki", - "williamhill", - "win", - "windows", - "wine", - "winners", - "wme", - "wolterskluwer", - "woodside", - "work", - "works", - "world", - "wow", - "ws", - "wtc", - "wtf", - "xbox", - "xerox", - "xfinity", - "xihuan", - "xin", - "xn--11b4c3d", - "xn--1ck2e1b", - "xn--1qqw23a", - "xn--2scrj9c", - "xn--30rr7y", - "xn--3bst00m", - "xn--3ds443g", - "xn--3e0b707e", - "xn--3hcrj9c", - "xn--3oq18vl8pn36a", - "xn--3pxu8k", - "xn--42c2d9a", - "xn--45br5cyl", - "xn--45brj9c", - "xn--45q11c", - "xn--4gbrim", - "xn--54b7fta0cc", - "xn--55qw42g", - "xn--55qx5d", - "xn--5su34j936bgsg", - "xn--5tzm5g", - "xn--6frz82g", - "xn--6qq986b3xl", - "xn--80adxhks", - "xn--80ao21a", - "xn--80aqecdr1a", - "xn--80asehdb", - "xn--80aswg", - "xn--8y0a063a", - "xn--90a3ac", - "xn--90ae", - "xn--90ais", - "xn--9dbq2a", - "xn--9et52u", - "xn--9krt00a", - "xn--b4w605ferd", - "xn--bck1b9a5dre4c", - "xn--c1avg", - "xn--c2br7g", - "xn--cck2b3b", - "xn--cg4bki", - "xn--clchc0ea0b2g2a9gcd", - "xn--czr694b", - "xn--czrs0t", - "xn--czru2d", - "xn--d1acj3b", - "xn--d1alf", - "xn--e1a4c", - "xn--eckvdtc9d", - "xn--efvy88h", - "xn--estv75g", - "xn--fct429k", - "xn--fhbei", - "xn--fiq228c5hs", - "xn--fiq64b", - "xn--fiqs8s", - "xn--fiqz9s", - "xn--fjq720a", - "xn--flw351e", - "xn--fpcrj9c3d", - "xn--fzc2c9e2c", - "xn--fzys8d69uvgm", - "xn--g2xx48c", - "xn--gckr3f0f", - "xn--gecrj9c", - "xn--gk3at1e", - "xn--h2breg3eve", - "xn--h2brj9c", - "xn--h2brj9c8c", - "xn--hxt814e", - "xn--i1b6b1a6a2e", - "xn--imr513n", - "xn--io0a7i", - "xn--j1aef", - "xn--j1amh", - "xn--j6w193g", - "xn--jlq61u9w7b", - "xn--jvr189m", - "xn--kcrx77d1x4a", - "xn--kprw13d", - "xn--kpry57d", - "xn--kpu716f", - "xn--kput3i", - "xn--l1acc", - "xn--lgbbat1ad8j", - "xn--mgb2ddes", - "xn--mgb9awbf", - "xn--mgba3a3ejt", - "xn--mgba3a4f16a", - "xn--mgba3a4fra", - "xn--mgba7c0bbn0a", - "xn--mgbaakc7dvf", - "xn--mgbaam7a8h", - "xn--mgbab2bd", - "xn--mgbai9a5eva00b", - "xn--mgbai9azgqp6j", - "xn--mgbayh7gpa", - "xn--mgbb9fbpob", - "xn--mgbbh1a", - "xn--mgbbh1a71e", - "xn--mgbc0a9azcg", - "xn--mgbca7dzdo", - "xn--mgberp4a5d4a87g", - "xn--mgberp4a5d4ar", - "xn--mgbgu82a", - "xn--mgbi4ecexp", - "xn--mgbpl2fh", - "xn--mgbqly7c0a67fbc", - "xn--mgbqly7cvafr", - "xn--mgbt3dhd", - "xn--mgbtf8fl", - "xn--mgbtx2b", - "xn--mgbx4cd0ab", - "xn--mix082f", - "xn--mix891f", - "xn--mk1bu44c", - "xn--mxtq1m", - "xn--ngbc5azd", - "xn--ngbe9e0a", - "xn--ngbrx", - "xn--nnx388a", - "xn--node", - "xn--nqv7f", - "xn--nqv7fs00ema", - "xn--nyqy26a", - "xn--o3cw4h", - "xn--ogbpf8fl", - "xn--otu796d", - "xn--p1acf", - "xn--p1ai", - "xn--pbt977c", - "xn--pgbs0dh", - "xn--pssy2u", - "xn--q9jyb4c", - "xn--qcka1pmc", - "xn--qxam", - "xn--rhqv96g", - "xn--rovu88b", - "xn--rvc1e0am3e", - "xn--s9brj9c", - "xn--ses554g", - "xn--t60b56a", - "xn--tckwe", - "xn--tiq49xqyj", - "xn--unup4y", - "xn--vermgensberater-ctb", - "xn--vermgensberatung-pwb", - "xn--vhquv", - "xn--vuq861b", - "xn--w4r85el8fhu5dnra", - "xn--w4rs40l", - "xn--wgbh1c", - "xn--wgbl6a", - "xn--xhq521b", - "xn--xkc2al3hye2a", - "xn--xkc2dl3a5ee0h", - "xn--y9a3aq", - "xn--yfro4i67o", - "xn--ygbi2ammx", - "xn--zfr164b", - "xperia", - "xxx", - "xyz", - "yachts", - "yahoo", - "yamaxun", - "yandex", - "ye", - "yodobashi", - "yoga", - "yokohama", - "you", - "youtube", - "yt", - "yun", - "za", - "zappos", - "zara", - "zero", - "zip", - "zippo", - "zm", - "zone", - "zuerich", - "zw", - "com", - "edu", - "gov", - "mil", - "net", - "org", - "official", - "nom", - "ac", - "blogspot", - "co", - "gov", - "mil", - "net", - "nom", - "org", - "sch", - "accident-investigation", - "accident-prevention", - "aerobatic", - "aeroclub", - "aerodrome", - "agents", - "air-surveillance", - "air-traffic-control", - "aircraft", - "airline", - "airport", - "airtraffic", - "ambulance", - "amusement", - "association", - "author", - "ballooning", - "broker", - "caa", - "cargo", - "catering", - "certification", - "championship", - "charter", - "civilaviation", - "club", - "conference", - "consultant", - "consulting", - "control", - "council", - "crew", - "design", - "dgca", - "educator", - "emergency", - "engine", - "engineer", - "entertainment", - "equipment", - "exchange", - "express", - "federation", - "flight", - "freight", - "fuel", - "gliding", - "government", - "groundhandling", - "group", - "hanggliding", - "homebuilt", - "insurance", - "journal", - "journalist", - "leasing", - "logistics", - "magazine", - "maintenance", - "media", - "microlight", - "modelling", - "navigation", - "parachuting", - "paragliding", - "passenger-association", - "pilot", - "press", - "production", - "recreation", - "repbody", - "res", - "research", - "rotorcraft", - "safety", - "scientist", - "services", - "show", - "skydiving", - "software", - "student", - "trader", - "trading", - "trainer", - "union", - "workinggroup", - "works", - "com", - "edu", - "gov", - "net", - "nom", - "org", - "co", - "com", - "net", - "nom", - "org", - "com", - "net", - "nom", - "off", - "org", - "blogspot", - "com", - "edu", - "gov", - "mil", - "net", - "nom", - "org", - "blogspot", - "co", - "ed", - "gv", - "it", - "og", - "pb", - "hasura", - "com", - "edu", - "gob", - "gov", - "int", - "mil", - "musica", - "net", - "org", - "tur", - "blogspot", - "e164", - "in-addr", - "ip6", - "iris", - "uri", - "urn", - "gov", - "cloudns", - "12hp", - "2ix", - "4lima", - "ac", - "biz", - "co", - "futurecms", - "futurehosting", - "futuremailing", - "gv", - "info", - "lima-city", - "or", - "ortsinfo", - "priv", - "blogspot", - "ex", - "in", - "ex", - "kunden", - "act", - "asn", - "com", - "conf", - "edu", - "gov", - "id", - "info", - "net", - "nsw", - "nt", - "org", - "oz", - "qld", - "sa", - "tas", - "vic", - "wa", - "blogspot", - "act", - "nsw", - "nt", - "qld", - "sa", - "tas", - "vic", - "wa", - "qld", - "sa", - "tas", - "vic", - "wa", - "com", - "biz", - "com", - "edu", - "gov", - "info", - "int", - "mil", - "name", - "net", - "org", - "pp", - "pro", - "blogspot", - "com", - "edu", - "gov", - "mil", - "net", - "org", - "biz", - "co", - "com", - "edu", - "gov", - "info", - "net", - "org", - "store", - "tv", - "ac", - "blogspot", - "transurl", - "webhosting", - "gov", - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "a", - "b", - "barsy", - "blogspot", - "c", - "d", - "e", - "f", - "g", - "h", - "i", - "j", - "k", - "l", - "m", - "n", - "o", - "p", - "q", - "r", - "s", - "t", - "u", - "v", - "w", - "x", - "y", - "z", - "com", - "edu", - "gov", - "net", - "org", - "co", - "com", - "edu", - "or", - "org", - "cloudns", - "dscloud", - "dyndns", - "for-better", - "for-more", - "for-some", - "for-the", - "mmafan", - "myftp", - "no-ip", - "selfip", - "webhop", - "asso", - "barreau", - "blogspot", - "gouv", - "com", - "edu", - "gov", - "net", - "org", - "academia", - "agro", - "arte", - "blog", - "bolivia", - "ciencia", - "com", - "cooperativa", - "democracia", - "deporte", - "ecologia", - "economia", - "edu", - "empresa", - "gob", - "indigena", - "industria", - "info", - "int", - "medicina", - "mil", - "movimiento", - "musica", - "natural", - "net", - "nombre", - "noticias", - "org", - "patria", - "plurinacional", - "politica", - "profesional", - "pueblo", - "revista", - "salud", - "tecnologia", - "tksat", - "transporte", - "tv", - "web", - "wiki", - "9guacu", - "abc", - "adm", - "adv", - "agr", - "aju", - "am", - "anani", - "aparecida", - "arq", - "art", - "ato", - "b", - "barueri", - "belem", - "bhz", - "bio", - "blog", - "bmd", - "boavista", - "bsb", - "campinagrande", - "campinas", - "caxias", - "cim", - "cng", - "cnt", - "com", - "contagem", - "coop", - "cri", - "cuiaba", - "curitiba", - "def", - "ecn", - "eco", - "edu", - "emp", - "eng", - "esp", - "etc", - "eti", - "far", - "feira", - "flog", - "floripa", - "fm", - "fnd", - "fortal", - "fot", - "foz", - "fst", - "g12", - "ggf", - "goiania", - "gov", - "gru", - "imb", - "ind", - "inf", - "jab", - "jampa", - "jdf", - "joinville", - "jor", - "jus", - "leg", - "lel", - "londrina", - "macapa", - "maceio", - "manaus", - "maringa", - "mat", - "med", - "mil", - "morena", - "mp", - "mus", - "natal", - "net", - "niteroi", - "nom", - "not", - "ntr", - "odo", - "org", - "osasco", - "palmas", - "poa", - "ppg", - "pro", - "psc", - "psi", - "pvh", - "qsl", - "radio", - "rec", - "recife", - "ribeirao", - "rio", - "riobranco", - "riopreto", - "salvador", - "sampa", - "santamaria", - "santoandre", - "saobernardo", - "saogonca", - "sjc", - "slg", - "slz", - "sorocaba", - "srv", - "taxi", - "teo", - "the", - "tmp", - "trd", - "tur", - "tv", - "udi", - "vet", - "vix", - "vlog", - "wiki", - "zlg", - "blogspot", - "ac", - "al", - "am", - "ap", - "ba", - "ce", - "df", - "es", - "go", - "ma", - "mg", - "ms", - "mt", - "pa", - "pb", - "pe", - "pi", - "pr", - "rj", - "rn", - "ro", - "rr", - "rs", - "sc", - "se", - "sp", - "to", - "ac", - "al", - "am", - "ap", - "ba", - "ce", - "df", - "es", - "go", - "ma", - "mg", - "ms", - "mt", - "pa", - "pb", - "pe", - "pi", - "pr", - "rj", - "rn", - "ro", - "rr", - "rs", - "sc", - "se", - "sp", - "to", - "com", - "edu", - "gov", - "net", - "org", - "we", - "com", - "edu", - "gov", - "net", - "org", - "co", - "org", - "com", - "gov", - "mil", - "nym", - "of", - "blogspot", - "com", - "edu", - "gov", - "net", - "nym", - "org", - "za", - "ab", - "awdev", - "bc", - "blogspot", - "co", - "gc", - "mb", - "nb", - "nf", - "nl", - "no-ip", - "ns", - "nt", - "nu", - "on", - "pe", - "qc", - "sk", - "yk", - "cloudns", - "fantasyleague", - "ftpaccess", - "game-server", - "myphotos", - "scrapping", - "twmail", - "gov", - "blogspot", - "12hp", - "2ix", - "4lima", - "blogspot", - "dnsking", - "gotdns", - "lima-city", - "linkyard-cloud", - "square7", - "ac", - "asso", - "co", - "com", - "ed", - "edu", - "go", - "gouv", - "int", - "md", - "net", - "or", - "org", - "presse", - "xn--aroport-bya", - "www", - "blogspot", - "co", - "gob", - "gov", - "mil", - "nom", - "linkyard", - "magentosite", - "sensiosite", - "statics", - "trafficplex", - "vapor", - "barsy", - "cloudns", - "co", - "com", - "gov", - "net", - "ac", - "ah", - "bj", - "com", - "cq", - "edu", - "fj", - "gd", - "gov", - "gs", - "gx", - "gz", - "ha", - "hb", - "he", - "hi", - "hk", - "hl", - "hn", - "jl", - "js", - "jx", - "ln", - "mil", - "mo", - "net", - "nm", - "nx", - "org", - "qh", - "sc", - "sd", - "sh", - "sn", - "sx", - "tj", - "tw", - "xj", - "xn--55qx5d", - "xn--io0a7i", - "xn--od0alg", - "xz", - "yn", - "zj", - "amazonaws", - "cn-north-1", - "compute", - "eb", - "elb", - "s3", - "cn-north-1", - "arts", - "com", - "edu", - "firm", - "gov", - "info", - "int", - "mil", - "mypi", - "n4t", - "net", - "nodum", - "nom", - "org", - "otap", - "rec", - "web", - "blogspot", - "001www", - "0emm", - "1kapp", - "3utilities", - "4u", - "africa", - "alpha-myqnapcloud", - "amazonaws", - "appchizi", - "applinzi", - "appspot", - "ar", - "barsycenter", - "barsyonline", - "betainabox", - "bitballoon", - "blogdns", - "blogspot", - "blogsyte", - "bloxcms", - "bounty-full", - "bplaced", - "br", - "cechire", - "ciscofreak", - "cloudcontrolapp", - "cloudcontrolled", - "cn", - "co", - "codespot", - "damnserver", - "dattolocal", - "dattorelay", - "dattoweb", - "ddnsfree", - "ddnsgeek", - "ddnsking", - "ddnslive", - "de", - "dev-myqnapcloud", - "ditchyourip", - "dnsalias", - "dnsdojo", - "dnsiskinky", - "doesntexist", - "dontexist", - "doomdns", - "drayddns", - "dreamhosters", - "dsmynas", - "dyn-o-saur", - "dynalias", - "dyndns-at-home", - "dyndns-at-work", - "dyndns-blog", - "dyndns-free", - "dyndns-home", - "dyndns-ip", - "dyndns-mail", - "dyndns-office", - "dyndns-pics", - "dyndns-remote", - "dyndns-server", - "dyndns-web", - "dyndns-wiki", - "dyndns-work", - "dynns", - "elasticbeanstalk", - "est-a-la-maison", - "est-a-la-masion", - "est-le-patron", - "est-mon-blogueur", - "eu", - "evennode", - "familyds", - "fastvps-server", - "fbsbx", - "firebaseapp", - "firewall-gateway", - "flynnhub", - "freebox-os", - "freeboxos", - "from-ak", - "from-al", - "from-ar", - "from-ca", - "from-ct", - "from-dc", - "from-de", - "from-fl", - "from-ga", - "from-hi", - "from-ia", - "from-id", - "from-il", - "from-in", - "from-ks", - "from-ky", - "from-ma", - "from-md", - "from-mi", - "from-mn", - "from-mo", - "from-ms", - "from-mt", - "from-nc", - "from-nd", - "from-ne", - "from-nh", - "from-nj", - "from-nm", - "from-nv", - "from-oh", - "from-ok", - "from-or", - "from-pa", - "from-pr", - "from-ri", - "from-sc", - "from-sd", - "from-tn", - "from-tx", - "from-ut", - "from-va", - "from-vt", - "from-wa", - "from-wi", - "from-wv", - "from-wy", - "gb", - "geekgalaxy", - "getmyip", - "giize", - "githubusercontent", - "gleeze", - "googleapis", - "googlecode", - "gotdns", - "gotpantheon", - "gr", - "health-carereform", - "herokuapp", - "herokussl", - "hk", - "hobby-site", - "homelinux", - "homesecuritymac", - "homesecuritypc", - "homeunix", - "hu", - "iamallama", - "is-a-anarchist", - "is-a-blogger", - "is-a-bookkeeper", - "is-a-bulls-fan", - "is-a-caterer", - "is-a-chef", - "is-a-conservative", - "is-a-cpa", - "is-a-cubicle-slave", - "is-a-democrat", - "is-a-designer", - "is-a-doctor", - "is-a-financialadvisor", - "is-a-geek", - "is-a-green", - "is-a-guru", - "is-a-hard-worker", - "is-a-hunter", - "is-a-landscaper", - "is-a-lawyer", - "is-a-liberal", - "is-a-libertarian", - "is-a-llama", - "is-a-musician", - "is-a-nascarfan", - "is-a-nurse", - "is-a-painter", - "is-a-personaltrainer", - "is-a-photographer", - "is-a-player", - "is-a-republican", - "is-a-rockstar", - "is-a-socialist", - "is-a-student", - "is-a-teacher", - "is-a-techie", - "is-a-therapist", - "is-an-accountant", - "is-an-actor", - "is-an-actress", - "is-an-anarchist", - "is-an-artist", - "is-an-engineer", - "is-an-entertainer", - "is-certified", - "is-gone", - "is-into-anime", - "is-into-cars", - "is-into-cartoons", - "is-into-games", - "is-leet", - "is-not-certified", - "is-slick", - "is-uberleet", - "is-with-theband", - "isa-geek", - "isa-hockeynut", - "issmarterthanyou", - "jdevcloud", - "joyent", - "jpn", - "kozow", - "kr", - "likes-pie", - "likescandy", - "lmpm", - "logoip", - "loseyourip", - "meteorapp", - "mex", - "miniserver", - "myactivedirectory", - "myasustor", - "mydatto", - "mydrobo", - "myiphost", - "myqnapcloud", - "myravendb", - "mysecuritycamera", - "myshopblocks", - "mytuleap", - "myvnc", - "neat-url", - "net-freaks", - "netlify", - "nfshost", - "no", - "on-aptible", - "onthewifi", - "ooguy", - "operaunite", - "outsystemscloud", - "ownprovider", - "pagefrontapp", - "pagespeedmobilizer", - "pgfog", - "pixolino", - "point2this", - "prgmr", - "publishproxy", - "qa2", - "qc", - "quicksytes", - "quipelements", - "rackmaze", - "remotewd", - "rhcloud", - "ru", - "sa", - "saves-the-whales", - "scrysec", - "securitytactics", - "selfip", - "sells-for-less", - "sells-for-u", - "servebbs", - "servebeer", - "servecounterstrike", - "serveexchange", - "serveftp", - "servegame", - "servehalflife", - "servehttp", - "servehumour", - "serveirc", - "servemp3", - "servep2p", - "servepics", - "servequake", - "servesarcasm", - "simple-url", - "sinaapp", - "space-to-rent", - "stufftoread", - "teaches-yoga", - "temp-dns", - "theworkpc", - "townnews-staging", - "uk", - "unusualperson", - "us", - "uy", - "vipsinaapp", - "withgoogle", - "withyoutube", - "workisboring", - "wpdevcloud", - "writesthisblog", - "xenapponazure", - "xnbay", - "yolasite", - "za", - "ap-northeast-1", - "ap-northeast-2", - "ap-south-1", - "ap-southeast-1", - "ap-southeast-2", - "ca-central-1", - "compute", - "compute-1", - "elb", - "eu-central-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "s3", - "s3-ap-northeast-1", - "s3-ap-northeast-2", - "s3-ap-south-1", - "s3-ap-southeast-1", - "s3-ap-southeast-2", - "s3-ca-central-1", - "s3-eu-central-1", - "s3-eu-west-1", - "s3-eu-west-2", - "s3-eu-west-3", - "s3-external-1", - "s3-fips-us-gov-west-1", - "s3-sa-east-1", - "s3-us-east-2", - "s3-us-gov-west-1", - "s3-us-west-1", - "s3-us-west-2", - "s3-website-ap-northeast-1", - "s3-website-ap-southeast-1", - "s3-website-ap-southeast-2", - "s3-website-eu-west-1", - "s3-website-sa-east-1", - "s3-website-us-east-1", - "s3-website-us-west-1", - "s3-website-us-west-2", - "sa-east-1", - "us-east-1", - "us-east-2", - "dualstack", - "s3", - "dualstack", - "s3", - "s3-website", - "s3", - "dualstack", - "s3", - "s3-website", - "s3", - "dualstack", - "s3", - "dualstack", - "s3", - "dualstack", - "s3", - "s3-website", - "s3", - "dualstack", - "s3", - "s3-website", - "s3", - "dualstack", - "s3", - "dualstack", - "s3", - "s3-website", - "s3", - "dualstack", - "s3", - "s3-website", - "s3", - "dualstack", - "s3", - "dualstack", - "s3", - "dualstack", - "s3", - "s3-website", - "s3", - "alpha", - "beta", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "ap-south-1", - "ap-southeast-1", - "ap-southeast-2", - "ca-central-1", - "eu-central-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "sa-east-1", - "us-east-1", - "us-east-2", - "us-gov-west-1", - "us-west-1", - "us-west-2", - "eu-1", - "eu-2", - "eu-3", - "eu-4", - "us-1", - "us-2", - "us-3", - "us-4", - "apps", - "cns", - "app", - "eu", - "xen", - "u2", - "u2-local", - "ravendb", - "de", - "ac", - "co", - "ed", - "fi", - "go", - "or", - "sa", - "com", - "edu", - "gov", - "inf", - "net", - "org", - "blogspot", - "com", - "edu", - "net", - "org", - "ath", - "gov", - "info", - "ac", - "biz", - "com", - "ekloges", - "gov", - "ltd", - "name", - "net", - "org", - "parliament", - "press", - "pro", - "tm", - "blogspot", - "blogspot", - "co", - "e4", - "metacentrum", - "muni", - "realm", - "cloud", - "custom", - "cloud", - "flt", - "usr", - "12hp", - "2ix", - "4lima", - "barsy", - "blogspot", - "bplaced", - "com", - "cosidns", - "dd-dns", - "ddnss", - "dnshome", - "dnsupdater", - "dray-dns", - "draydns", - "dyn-ip24", - "dyn-vpn", - "dynamisches-dns", - "dyndns1", - "dynvpn", - "firewall-gateway", - "fuettertdasnetz", - "git-repos", - "goip", - "home-webserver", - "internet-dns", - "isteingeek", - "istmein", - "keymachine", - "l-o-g-i-n", - "lcube-server", - "lebtimnetz", - "leitungsen", - "lima-city", - "logoip", - "mein-iserv", - "mein-vigor", - "my-gateway", - "my-router", - "my-vigor", - "my-wan", - "myhome-server", - "spdns", - "speedpartner", - "square7", - "svn-repos", - "syno-ds", - "synology-diskstation", - "synology-ds", - "taifun-dns", - "test-iserv", - "traeumtgerade", - "uberspace", - "virtual-user", - "virtualuser", - "dyn", - "dyn", - "dyndns", - "dyn", - "customer", - "fastpanel", - "biz", - "blogspot", - "co", - "firm", - "reg", - "store", - "com", - "edu", - "gov", - "net", - "org", - "art", - "com", - "edu", - "gob", - "gov", - "mil", - "net", - "org", - "sld", - "web", - "art", - "asso", - "com", - "edu", - "gov", - "net", - "org", - "pol", - "com", - "edu", - "fin", - "gob", - "gov", - "info", - "k12", - "med", - "mil", - "net", - "org", - "pro", - "aip", - "com", - "edu", - "fie", - "gov", - "lib", - "med", - "org", - "pri", - "riik", - "blogspot", - "com", - "edu", - "eun", - "gov", - "mil", - "name", - "net", - "org", - "sci", - "blogspot", - "com", - "edu", - "gob", - "nom", - "org", - "blogspot", - "compute", - "biz", - "com", - "edu", - "gov", - "info", - "name", - "net", - "org", - "barsy", - "cloudns", - "diskstation", - "mycd", - "spdns", - "transurl", - "wellbeingzone", - "party", - "user", - "ybo", - "storj", - "aland", - "blogspot", - "dy", - "iki", - "ptplus", - "aeroport", - "assedic", - "asso", - "avocat", - "avoues", - "blogspot", - "cci", - "chambagri", - "chirurgiens-dentistes", - "chirurgiens-dentistes-en-france", - "com", - "experts-comptables", - "fbx-os", - "fbxos", - "freebox-os", - "freeboxos", - "geometre-expert", - "gouv", - "greta", - "huissier-justice", - "medecin", - "nom", - "notaires", - "on-web", - "pharmacien", - "port", - "prd", - "presse", - "tm", - "veterinaire", - "nom", - "cnpy", - "com", - "edu", - "gov", - "mil", - "net", - "nom", - "org", - "pvt", - "co", - "cya", - "net", - "org", - "com", - "edu", - "gov", - "mil", - "org", - "com", - "edu", - "gov", - "ltd", - "mod", - "org", - "co", - "com", - "edu", - "net", - "nom", - "org", - "ac", - "com", - "edu", - "gov", - "net", - "org", - "cloud", - "asso", - "com", - "edu", - "mobi", - "net", - "org", - "blogspot", - "com", - "edu", - "gov", - "net", - "nym", - "org", - "com", - "edu", - "gob", - "ind", - "mil", - "net", - "nom", - "org", - "com", - "edu", - "gov", - "guam", - "info", - "net", - "org", - "web", - "co", - "com", - "edu", - "gov", - "net", - "nym", - "org", - "blogspot", - "com", - "edu", - "gov", - "idv", - "inc", - "ltd", - "net", - "org", - "xn--55qx5d", - "xn--ciqpn", - "xn--gmq050i", - "xn--gmqw5a", - "xn--io0a7i", - "xn--lcvr32d", - "xn--mk0axi", - "xn--mxtq1m", - "xn--od0alg", - "xn--od0aq3b", - "xn--tn0ag", - "xn--uc0atv", - "xn--uc0ay4a", - "xn--wcvs22d", - "xn--zf0avx", - "com", - "edu", - "gob", - "mil", - "net", - "nom", - "org", - "cloudaccess", - "freesite", - "half", - "pcloud", - "opencraft", - "blogspot", - "com", - "from", - "iz", - "name", - "adult", - "art", - "asso", - "com", - "coop", - "edu", - "firm", - "gouv", - "info", - "med", - "net", - "org", - "perso", - "pol", - "pro", - "rel", - "shop", - "2000", - "agrar", - "blogspot", - "bolt", - "casino", - "city", - "co", - "erotica", - "erotika", - "film", - "forum", - "games", - "hotel", - "info", - "ingatlan", - "jogasz", - "konyvelo", - "lakas", - "media", - "news", - "org", - "priv", - "reklam", - "sex", - "shop", - "sport", - "suli", - "szex", - "tm", - "tozsde", - "utazas", - "video", - "ac", - "biz", - "co", - "desa", - "go", - "mil", - "my", - "net", - "or", - "sch", - "web", - "zone", - "blogspot", - "blogspot", - "gov", - "nym", - "ac", - "co", - "gov", - "idf", - "k12", - "muni", - "net", - "org", - "blogspot", - "ac", - "co", - "com", - "net", - "nom", - "org", - "ro", - "tt", - "tv", - "ltd", - "plc", - "ac", - "barsy", - "blogspot", - "cloudns", - "co", - "edu", - "firm", - "gen", - "gov", - "ind", - "mil", - "net", - "nic", - "org", - "res", - "barrel-of-knowledge", - "barrell-of-knowledge", - "barsy", - "cloudns", - "dvrcam", - "dynamic-dns", - "dyndns", - "for-our", - "forumz", - "groks-the", - "groks-this", - "here-for-more", - "ilovecollege", - "knowsitall", - "mayfirst", - "no-ip", - "nsupdate", - "selfip", - "v-info", - "webhop", - "eu", - "2038", - "azurecontainer", - "backplaneapp", - "barsy", - "boxfuse", - "browsersafetymark", - "cleverapps", - "com", - "dedyn", - "definima", - "drud", - "enonic", - "github", - "gitlab", - "hasura-app", - "hzc", - "lair", - "ngrok", - "nid", - "nodeart", - "nodum", - "pantheonsite", - "protonet", - "resindevice", - "resinstaging", - "s5y", - "sandcats", - "shiftedit", - "spacekit", - "stolos", - "thingdust", - "utwente", - "vaporcloud", - "wedeploy", - "customer", - "apps", - "stage", - "devices", - "dev", - "disrec", - "prod", - "testing", - "cust", - "cust", - "cust", - "cust", - "com", - "edu", - "gov", - "mil", - "net", - "org", - "ac", - "co", - "gov", - "id", - "net", - "org", - "sch", - "xn--mgba3a4f16a", - "xn--mgba3a4fra", - "blogspot", - "com", - "cupcake", - "edu", - "gov", - "int", - "net", - "org", - "16-b", - "32-b", - "64-b", - "abr", - "abruzzo", - "ag", - "agrigento", - "al", - "alessandria", - "alto-adige", - "altoadige", - "an", - "ancona", - "andria-barletta-trani", - "andria-trani-barletta", - "andriabarlettatrani", - "andriatranibarletta", - "ao", - "aosta", - "aosta-valley", - "aostavalley", - "aoste", - "ap", - "aq", - "aquila", - "ar", - "arezzo", - "ascoli-piceno", - "ascolipiceno", - "asti", - "at", - "av", - "avellino", - "ba", - "balsan", - "balsan-sudtirol", - "balsan-suedtirol", - "bari", - "barletta-trani-andria", - "barlettatraniandria", - "bas", - "basilicata", - "belluno", - "benevento", - "bergamo", - "bg", - "bi", - "biella", - "bl", - "blogspot", - "bn", - "bo", - "bologna", - "bolzano", - "bolzano-altoadige", - "bozen", - "bozen-sudtirol", - "bozen-suedtirol", - "br", - "brescia", - "brindisi", - "bs", - "bt", - "bulsan", - "bulsan-sudtirol", - "bulsan-suedtirol", - "bz", - "ca", - "cagliari", - "cal", - "calabria", - "caltanissetta", - "cam", - "campania", - "campidano-medio", - "campidanomedio", - "campobasso", - "carbonia-iglesias", - "carboniaiglesias", - "carrara-massa", - "carraramassa", - "caserta", - "catania", - "catanzaro", - "cb", - "ce", - "cesena-forli", - "cesenaforli", - "ch", - "chieti", - "ci", - "cl", - "cn", - "co", - "como", - "cosenza", - "cr", - "cremona", - "crotone", - "cs", - "ct", - "cuneo", - "cz", - "dell-ogliastra", - "dellogliastra", - "edu", - "emilia-romagna", - "emiliaromagna", - "emr", - "en", - "enna", - "fc", - "fe", - "fermo", - "ferrara", - "fg", - "fi", - "firenze", - "florence", - "fm", - "foggia", - "forli-cesena", - "forlicesena", - "fr", - "friuli-v-giulia", - "friuli-ve-giulia", - "friuli-vegiulia", - "friuli-venezia-giulia", - "friuli-veneziagiulia", - "friuli-vgiulia", - "friuliv-giulia", - "friulive-giulia", - "friulivegiulia", - "friulivenezia-giulia", - "friuliveneziagiulia", - "friulivgiulia", - "frosinone", - "fvg", - "ge", - "genoa", - "genova", - "go", - "gorizia", - "gov", - "gr", - "grosseto", - "iglesias-carbonia", - "iglesiascarbonia", - "im", - "imperia", - "is", - "isernia", - "kr", - "la-spezia", - "laquila", - "laspezia", - "latina", - "laz", - "lazio", - "lc", - "le", - "lecce", - "lecco", - "li", - "lig", - "liguria", - "livorno", - "lo", - "lodi", - "lom", - "lombardia", - "lombardy", - "lt", - "lu", - "lucania", - "lucca", - "macerata", - "mantova", - "mar", - "marche", - "massa-carrara", - "massacarrara", - "matera", - "mb", - "mc", - "me", - "medio-campidano", - "mediocampidano", - "messina", - "mi", - "milan", - "milano", - "mn", - "mo", - "modena", - "mol", - "molise", - "monza", - "monza-brianza", - "monza-e-della-brianza", - "monzabrianza", - "monzaebrianza", - "monzaedellabrianza", - "ms", - "mt", - "na", - "naples", - "napoli", - "no", - "novara", - "nu", - "nuoro", - "og", - "ogliastra", - "olbia-tempio", - "olbiatempio", - "or", - "oristano", - "ot", - "pa", - "padova", - "padua", - "palermo", - "parma", - "pavia", - "pc", - "pd", - "pe", - "perugia", - "pesaro-urbino", - "pesarourbino", - "pescara", - "pg", - "pi", - "piacenza", - "piedmont", - "piemonte", - "pisa", - "pistoia", - "pmn", - "pn", - "po", - "pordenone", - "potenza", - "pr", - "prato", - "pt", - "pu", - "pug", - "puglia", - "pv", - "pz", - "ra", - "ragusa", - "ravenna", - "rc", - "re", - "reggio-calabria", - "reggio-emilia", - "reggiocalabria", - "reggioemilia", - "rg", - "ri", - "rieti", - "rimini", - "rm", - "rn", - "ro", - "roma", - "rome", - "rovigo", - "sa", - "salerno", - "sar", - "sardegna", - "sardinia", - "sassari", - "savona", - "si", - "sic", - "sicilia", - "sicily", - "siena", - "siracusa", - "so", - "sondrio", - "sp", - "sr", - "ss", - "suedtirol", - "sv", - "ta", - "taa", - "taranto", - "te", - "tempio-olbia", - "tempioolbia", - "teramo", - "terni", - "tn", - "to", - "torino", - "tos", - "toscana", - "tp", - "tr", - "trani-andria-barletta", - "trani-barletta-andria", - "traniandriabarletta", - "tranibarlettaandria", - "trapani", - "trentin-sud-tirol", - "trentin-sudtirol", - "trentin-sued-tirol", - "trentin-suedtirol", - "trentino", - "trentino-a-adige", - "trentino-aadige", - "trentino-alto-adige", - "trentino-altoadige", - "trentino-s-tirol", - "trentino-stirol", - "trentino-sud-tirol", - "trentino-sudtirol", - "trentino-sued-tirol", - "trentino-suedtirol", - "trentinoa-adige", - "trentinoaadige", - "trentinoalto-adige", - "trentinoaltoadige", - "trentinos-tirol", - "trentinostirol", - "trentinosud-tirol", - "trentinosudtirol", - "trentinosued-tirol", - "trentinosuedtirol", - "trentinsud-tirol", - "trentinsudtirol", - "trentinsued-tirol", - "trentinsuedtirol", - "trento", - "treviso", - "trieste", - "ts", - "turin", - "tuscany", - "tv", - "ud", - "udine", - "umb", - "umbria", - "urbino-pesaro", - "urbinopesaro", - "va", - "val-d-aosta", - "val-daosta", - "vald-aosta", - "valdaosta", - "valle-aosta", - "valle-d-aosta", - "valle-daosta", - "valleaosta", - "valled-aosta", - "valledaosta", - "vallee-aoste", - "vallee-d-aoste", - "valleeaoste", - "valleedaoste", - "vao", - "varese", - "vb", - "vc", - "vda", - "ve", - "ven", - "veneto", - "venezia", - "venice", - "verbania", - "vercelli", - "verona", - "vi", - "vibo-valentia", - "vibovalentia", - "vicenza", - "viterbo", - "vr", - "vs", - "vt", - "vv", - "xn--balsan-sudtirol-rqi", - "xn--bozen-sudtirol-76h", - "xn--bulsan-sudtirol-rqi", - "xn--cesena-forli-c2g", - "xn--cesenaforli-0jg", - "xn--forli-cesena-41g", - "xn--forlicesena-ujg", - "xn--sudtirol-y0e", - "xn--trentin-sud-tirol-tsj", - "xn--trentin-sudtirol-b9i", - "xn--trentino-sud-tirol-dck", - "xn--trentino-sudtirol-usj", - "xn--trentinosud-tirol-tsj", - "xn--trentinosudtirol-b9i", - "xn--trentinsud-tirol-98i", - "xn--trentinsudtirol-rqi", - "xn--vallee-aoste-i2g", - "xn--vallee-d-aoste-43h", - "xn--valleeaoste-6jg", - "xn--valleedaoste-i2g", - "co", - "net", - "org", - "com", - "edu", - "gov", - "mil", - "name", - "net", - "org", - "sch", - "ac", - "ad", - "aichi", - "akita", - "aomori", - "blogspot", - "chiba", - "co", - "ed", - "ehime", - "fukui", - "fukuoka", - "fukushima", - "gifu", - "go", - "gr", - "gunma", - "hiroshima", - "hokkaido", - "hyogo", - "ibaraki", - "ishikawa", - "iwate", - "kagawa", - "kagoshima", - "kanagawa", - "kawasaki", - "kitakyushu", - "kobe", - "kochi", - "kumamoto", - "kyoto", - "lg", - "mie", - "miyagi", - "miyazaki", - "nagano", - "nagasaki", - "nagoya", - "nara", - "ne", - "niigata", - "oita", - "okayama", - "okinawa", - "or", - "osaka", - "saga", - "saitama", - "sapporo", - "sendai", - "shiga", - "shimane", - "shizuoka", - "tochigi", - "tokushima", - "tokyo", - "tottori", - "toyama", - "wakayama", - "xn--0trq7p7nn", - "xn--1ctwo", - "xn--1lqs03n", - "xn--1lqs71d", - "xn--2m4a15e", - "xn--32vp30h", - "xn--4it168d", - "xn--4it797k", - "xn--4pvxs", - "xn--5js045d", - "xn--5rtp49c", - "xn--5rtq34k", - "xn--6btw5a", - "xn--6orx2r", - "xn--7t0a264c", - "xn--8ltr62k", - "xn--8pvr4u", - "xn--c3s14m", - "xn--d5qv7z876c", - "xn--djrs72d6uy", - "xn--djty4k", - "xn--efvn9s", - "xn--ehqz56n", - "xn--elqq16h", - "xn--f6qx53a", - "xn--k7yn95e", - "xn--kbrq7o", - "xn--klt787d", - "xn--kltp7d", - "xn--kltx9a", - "xn--klty5x", - "xn--mkru45i", - "xn--nit225k", - "xn--ntso0iqx3a", - "xn--ntsq17g", - "xn--pssu33l", - "xn--qqqt11m", - "xn--rht27z", - "xn--rht3d", - "xn--rht61e", - "xn--rny31h", - "xn--tor131o", - "xn--uist22h", - "xn--uisz3g", - "xn--uuwu58a", - "xn--vgu402c", - "xn--zbx025d", - "yamagata", - "yamaguchi", - "yamanashi", - "yokohama", - "aisai", - "ama", - "anjo", - "asuke", - "chiryu", - "chita", - "fuso", - "gamagori", - "handa", - "hazu", - "hekinan", - "higashiura", - "ichinomiya", - "inazawa", - "inuyama", - "isshiki", - "iwakura", - "kanie", - "kariya", - "kasugai", - "kira", - "kiyosu", - "komaki", - "konan", - "kota", - "mihama", - "miyoshi", - "nishio", - "nisshin", - "obu", - "oguchi", - "oharu", - "okazaki", - "owariasahi", - "seto", - "shikatsu", - "shinshiro", - "shitara", - "tahara", - "takahama", - "tobishima", - "toei", - "togo", - "tokai", - "tokoname", - "toyoake", - "toyohashi", - "toyokawa", - "toyone", - "toyota", - "tsushima", - "yatomi", - "akita", - "daisen", - "fujisato", - "gojome", - "hachirogata", - "happou", - "higashinaruse", - "honjo", - "honjyo", - "ikawa", - "kamikoani", - "kamioka", - "katagami", - "kazuno", - "kitaakita", - "kosaka", - "kyowa", - "misato", - "mitane", - "moriyoshi", - "nikaho", - "noshiro", - "odate", - "oga", - "ogata", - "semboku", - "yokote", - "yurihonjo", - "aomori", - "gonohe", - "hachinohe", - "hashikami", - "hiranai", - "hirosaki", - "itayanagi", - "kuroishi", - "misawa", - "mutsu", - "nakadomari", - "noheji", - "oirase", - "owani", - "rokunohe", - "sannohe", - "shichinohe", - "shingo", - "takko", - "towada", - "tsugaru", - "tsuruta", - "abiko", - "asahi", - "chonan", - "chosei", - "choshi", - "chuo", - "funabashi", - "futtsu", - "hanamigawa", - "ichihara", - "ichikawa", - "ichinomiya", - "inzai", - "isumi", - "kamagaya", - "kamogawa", - "kashiwa", - "katori", - "katsuura", - "kimitsu", - "kisarazu", - "kozaki", - "kujukuri", - "kyonan", - "matsudo", - "midori", - "mihama", - "minamiboso", - "mobara", - "mutsuzawa", - "nagara", - "nagareyama", - "narashino", - "narita", - "noda", - "oamishirasato", - "omigawa", - "onjuku", - "otaki", - "sakae", - "sakura", - "shimofusa", - "shirako", - "shiroi", - "shisui", - "sodegaura", - "sosa", - "tako", - "tateyama", - "togane", - "tohnosho", - "tomisato", - "urayasu", - "yachimata", - "yachiyo", - "yokaichiba", - "yokoshibahikari", - "yotsukaido", - "ainan", - "honai", - "ikata", - "imabari", - "iyo", - "kamijima", - "kihoku", - "kumakogen", - "masaki", - "matsuno", - "matsuyama", - "namikata", - "niihama", - "ozu", - "saijo", - "seiyo", - "shikokuchuo", - "tobe", - "toon", - "uchiko", - "uwajima", - "yawatahama", - "echizen", - "eiheiji", - "fukui", - "ikeda", - "katsuyama", - "mihama", - "minamiechizen", - "obama", - "ohi", - "ono", - "sabae", - "sakai", - "takahama", - "tsuruga", - "wakasa", - "ashiya", - "buzen", - "chikugo", - "chikuho", - "chikujo", - "chikushino", - "chikuzen", - "chuo", - "dazaifu", - "fukuchi", - "hakata", - "higashi", - "hirokawa", - "hisayama", - "iizuka", - "inatsuki", - "kaho", - "kasuga", - "kasuya", - "kawara", - "keisen", - "koga", - "kurate", - "kurogi", - "kurume", - "minami", - "miyako", - "miyama", - "miyawaka", - "mizumaki", - "munakata", - "nakagawa", - "nakama", - "nishi", - "nogata", - "ogori", - "okagaki", - "okawa", - "oki", - "omuta", - "onga", - "onojo", - "oto", - "saigawa", - "sasaguri", - "shingu", - "shinyoshitomi", - "shonai", - "soeda", - "sue", - "tachiarai", - "tagawa", - "takata", - "toho", - "toyotsu", - "tsuiki", - "ukiha", - "umi", - "usui", - "yamada", - "yame", - "yanagawa", - "yukuhashi", - "aizubange", - "aizumisato", - "aizuwakamatsu", - "asakawa", - "bandai", - "date", - "fukushima", - "furudono", - "futaba", - "hanawa", - "higashi", - "hirata", - "hirono", - "iitate", - "inawashiro", - "ishikawa", - "iwaki", - "izumizaki", - "kagamiishi", - "kaneyama", - "kawamata", - "kitakata", - "kitashiobara", - "koori", - "koriyama", - "kunimi", - "miharu", - "mishima", - "namie", - "nango", - "nishiaizu", - "nishigo", - "okuma", - "omotego", - "ono", - "otama", - "samegawa", - "shimogo", - "shirakawa", - "showa", - "soma", - "sukagawa", - "taishin", - "tamakawa", - "tanagura", - "tenei", - "yabuki", - "yamato", - "yamatsuri", - "yanaizu", - "yugawa", - "anpachi", - "ena", - "gifu", - "ginan", - "godo", - "gujo", - "hashima", - "hichiso", - "hida", - "higashishirakawa", - "ibigawa", - "ikeda", - "kakamigahara", - "kani", - "kasahara", - "kasamatsu", - "kawaue", - "kitagata", - "mino", - "minokamo", - "mitake", - "mizunami", - "motosu", - "nakatsugawa", - "ogaki", - "sakahogi", - "seki", - "sekigahara", - "shirakawa", - "tajimi", - "takayama", - "tarui", - "toki", - "tomika", - "wanouchi", - "yamagata", - "yaotsu", - "yoro", - "annaka", - "chiyoda", - "fujioka", - "higashiagatsuma", - "isesaki", - "itakura", - "kanna", - "kanra", - "katashina", - "kawaba", - "kiryu", - "kusatsu", - "maebashi", - "meiwa", - "midori", - "minakami", - "naganohara", - "nakanojo", - "nanmoku", - "numata", - "oizumi", - "ora", - "ota", - "shibukawa", - "shimonita", - "shinto", - "showa", - "takasaki", - "takayama", - "tamamura", - "tatebayashi", - "tomioka", - "tsukiyono", - "tsumagoi", - "ueno", - "yoshioka", - "asaminami", - "daiwa", - "etajima", - "fuchu", - "fukuyama", - "hatsukaichi", - "higashihiroshima", - "hongo", - "jinsekikogen", - "kaita", - "kui", - "kumano", - "kure", - "mihara", - "miyoshi", - "naka", - "onomichi", - "osakikamijima", - "otake", - "saka", - "sera", - "seranishi", - "shinichi", - "shobara", - "takehara", - "abashiri", - "abira", - "aibetsu", - "akabira", - "akkeshi", - "asahikawa", - "ashibetsu", - "ashoro", - "assabu", - "atsuma", - "bibai", - "biei", - "bifuka", - "bihoro", - "biratori", - "chippubetsu", - "chitose", - "date", - "ebetsu", - "embetsu", - "eniwa", - "erimo", - "esan", - "esashi", - "fukagawa", - "fukushima", - "furano", - "furubira", - "haboro", - "hakodate", - "hamatonbetsu", - "hidaka", - "higashikagura", - "higashikawa", - "hiroo", - "hokuryu", - "hokuto", - "honbetsu", - "horokanai", - "horonobe", - "ikeda", - "imakane", - "ishikari", - "iwamizawa", - "iwanai", - "kamifurano", - "kamikawa", - "kamishihoro", - "kamisunagawa", - "kamoenai", - "kayabe", - "kembuchi", - "kikonai", - "kimobetsu", - "kitahiroshima", - "kitami", - "kiyosato", - "koshimizu", - "kunneppu", - "kuriyama", - "kuromatsunai", - "kushiro", - "kutchan", - "kyowa", - "mashike", - "matsumae", - "mikasa", - "minamifurano", - "mombetsu", - "moseushi", - "mukawa", - "muroran", - "naie", - "nakagawa", - "nakasatsunai", - "nakatombetsu", - "nanae", - "nanporo", - "nayoro", - "nemuro", - "niikappu", - "niki", - "nishiokoppe", - "noboribetsu", - "numata", - "obihiro", - "obira", - "oketo", - "okoppe", - "otaru", - "otobe", - "otofuke", - "otoineppu", - "oumu", - "ozora", - "pippu", - "rankoshi", - "rebun", - "rikubetsu", - "rishiri", - "rishirifuji", - "saroma", - "sarufutsu", - "shakotan", - "shari", - "shibecha", - "shibetsu", - "shikabe", - "shikaoi", - "shimamaki", - "shimizu", - "shimokawa", - "shinshinotsu", - "shintoku", - "shiranuka", - "shiraoi", - "shiriuchi", - "sobetsu", - "sunagawa", - "taiki", - "takasu", - "takikawa", - "takinoue", - "teshikaga", - "tobetsu", - "tohma", - "tomakomai", - "tomari", - "toya", - "toyako", - "toyotomi", - "toyoura", - "tsubetsu", - "tsukigata", - "urakawa", - "urausu", - "uryu", - "utashinai", - "wakkanai", - "wassamu", - "yakumo", - "yoichi", - "aioi", - "akashi", - "ako", - "amagasaki", - "aogaki", - "asago", - "ashiya", - "awaji", - "fukusaki", - "goshiki", - "harima", - "himeji", - "ichikawa", - "inagawa", - "itami", - "kakogawa", - "kamigori", - "kamikawa", - "kasai", - "kasuga", - "kawanishi", - "miki", - "minamiawaji", - "nishinomiya", - "nishiwaki", - "ono", - "sanda", - "sannan", - "sasayama", - "sayo", - "shingu", - "shinonsen", - "shiso", - "sumoto", - "taishi", - "taka", - "takarazuka", - "takasago", - "takino", - "tamba", - "tatsuno", - "toyooka", - "yabu", - "yashiro", - "yoka", - "yokawa", - "ami", - "asahi", - "bando", - "chikusei", - "daigo", - "fujishiro", - "hitachi", - "hitachinaka", - "hitachiomiya", - "hitachiota", - "ibaraki", - "ina", - "inashiki", - "itako", - "iwama", - "joso", - "kamisu", - "kasama", - "kashima", - "kasumigaura", - "koga", - "miho", - "mito", - "moriya", - "naka", - "namegata", - "oarai", - "ogawa", - "omitama", - "ryugasaki", - "sakai", - "sakuragawa", - "shimodate", - "shimotsuma", - "shirosato", - "sowa", - "suifu", - "takahagi", - "tamatsukuri", - "tokai", - "tomobe", - "tone", - "toride", - "tsuchiura", - "tsukuba", - "uchihara", - "ushiku", - "yachiyo", - "yamagata", - "yawara", - "yuki", - "anamizu", - "hakui", - "hakusan", - "kaga", - "kahoku", - "kanazawa", - "kawakita", - "komatsu", - "nakanoto", - "nanao", - "nomi", - "nonoichi", - "noto", - "shika", - "suzu", - "tsubata", - "tsurugi", - "uchinada", - "wajima", - "fudai", - "fujisawa", - "hanamaki", - "hiraizumi", - "hirono", - "ichinohe", - "ichinoseki", - "iwaizumi", - "iwate", - "joboji", - "kamaishi", - "kanegasaki", - "karumai", - "kawai", - "kitakami", - "kuji", - "kunohe", - "kuzumaki", - "miyako", - "mizusawa", - "morioka", - "ninohe", - "noda", - "ofunato", - "oshu", - "otsuchi", - "rikuzentakata", - "shiwa", - "shizukuishi", - "sumita", - "tanohata", - "tono", - "yahaba", - "yamada", - "ayagawa", - "higashikagawa", - "kanonji", - "kotohira", - "manno", - "marugame", - "mitoyo", - "naoshima", - "sanuki", - "tadotsu", - "takamatsu", - "tonosho", - "uchinomi", - "utazu", - "zentsuji", - "akune", - "amami", - "hioki", - "isa", - "isen", - "izumi", - "kagoshima", - "kanoya", - "kawanabe", - "kinko", - "kouyama", - "makurazaki", - "matsumoto", - "minamitane", - "nakatane", - "nishinoomote", - "satsumasendai", - "soo", - "tarumizu", - "yusui", - "aikawa", - "atsugi", - "ayase", - "chigasaki", - "ebina", - "fujisawa", - "hadano", - "hakone", - "hiratsuka", - "isehara", - "kaisei", - "kamakura", - "kiyokawa", - "matsuda", - "minamiashigara", - "miura", - "nakai", - "ninomiya", - "odawara", - "oi", - "oiso", - "sagamihara", - "samukawa", - "tsukui", - "yamakita", - "yamato", - "yokosuka", - "yugawara", - "zama", - "zushi", - "city", - "city", - "city", - "aki", - "geisei", - "hidaka", - "higashitsuno", - "ino", - "kagami", - "kami", - "kitagawa", - "kochi", - "mihara", - "motoyama", - "muroto", - "nahari", - "nakamura", - "nankoku", - "nishitosa", - "niyodogawa", - "ochi", - "okawa", - "otoyo", - "otsuki", - "sakawa", - "sukumo", - "susaki", - "tosa", - "tosashimizu", - "toyo", - "tsuno", - "umaji", - "yasuda", - "yusuhara", - "amakusa", - "arao", - "aso", - "choyo", - "gyokuto", - "kamiamakusa", - "kikuchi", - "kumamoto", - "mashiki", - "mifune", - "minamata", - "minamioguni", - "nagasu", - "nishihara", - "oguni", - "ozu", - "sumoto", - "takamori", - "uki", - "uto", - "yamaga", - "yamato", - "yatsushiro", - "ayabe", - "fukuchiyama", - "higashiyama", - "ide", - "ine", - "joyo", - "kameoka", - "kamo", - "kita", - "kizu", - "kumiyama", - "kyotamba", - "kyotanabe", - "kyotango", - "maizuru", - "minami", - "minamiyamashiro", - "miyazu", - "muko", - "nagaokakyo", - "nakagyo", - "nantan", - "oyamazaki", - "sakyo", - "seika", - "tanabe", - "uji", - "ujitawara", - "wazuka", - "yamashina", - "yawata", - "asahi", - "inabe", - "ise", - "kameyama", - "kawagoe", - "kiho", - "kisosaki", - "kiwa", - "komono", - "kumano", - "kuwana", - "matsusaka", - "meiwa", - "mihama", - "minamiise", - "misugi", - "miyama", - "nabari", - "shima", - "suzuka", - "tado", - "taiki", - "taki", - "tamaki", - "toba", - "tsu", - "udono", - "ureshino", - "watarai", - "yokkaichi", - "furukawa", - "higashimatsushima", - "ishinomaki", - "iwanuma", - "kakuda", - "kami", - "kawasaki", - "marumori", - "matsushima", - "minamisanriku", - "misato", - "murata", - "natori", - "ogawara", - "ohira", - "onagawa", - "osaki", - "rifu", - "semine", - "shibata", - "shichikashuku", - "shikama", - "shiogama", - "shiroishi", - "tagajo", - "taiwa", - "tome", - "tomiya", - "wakuya", - "watari", - "yamamoto", - "zao", - "aya", - "ebino", - "gokase", - "hyuga", - "kadogawa", - "kawaminami", - "kijo", - "kitagawa", - "kitakata", - "kitaura", - "kobayashi", - "kunitomi", - "kushima", - "mimata", - "miyakonojo", - "miyazaki", - "morotsuka", - "nichinan", - "nishimera", - "nobeoka", - "saito", - "shiiba", - "shintomi", - "takaharu", - "takanabe", - "takazaki", - "tsuno", - "achi", - "agematsu", - "anan", - "aoki", - "asahi", - "azumino", - "chikuhoku", - "chikuma", - "chino", - "fujimi", - "hakuba", - "hara", - "hiraya", - "iida", - "iijima", - "iiyama", - "iizuna", - "ikeda", - "ikusaka", - "ina", - "karuizawa", - "kawakami", - "kiso", - "kisofukushima", - "kitaaiki", - "komagane", - "komoro", - "matsukawa", - "matsumoto", - "miasa", - "minamiaiki", - "minamimaki", - "minamiminowa", - "minowa", - "miyada", - "miyota", - "mochizuki", - "nagano", - "nagawa", - "nagiso", - "nakagawa", - "nakano", - "nozawaonsen", - "obuse", - "ogawa", - "okaya", - "omachi", - "omi", - "ookuwa", - "ooshika", - "otaki", - "otari", - "sakae", - "sakaki", - "saku", - "sakuho", - "shimosuwa", - "shinanomachi", - "shiojiri", - "suwa", - "suzaka", - "takagi", - "takamori", - "takayama", - "tateshina", - "tatsuno", - "togakushi", - "togura", - "tomi", - "ueda", - "wada", - "yamagata", - "yamanouchi", - "yasaka", - "yasuoka", - "chijiwa", - "futsu", - "goto", - "hasami", - "hirado", - "iki", - "isahaya", - "kawatana", - "kuchinotsu", - "matsuura", - "nagasaki", - "obama", - "omura", - "oseto", - "saikai", - "sasebo", - "seihi", - "shimabara", - "shinkamigoto", - "togitsu", - "tsushima", - "unzen", - "city", - "ando", - "gose", - "heguri", - "higashiyoshino", - "ikaruga", - "ikoma", - "kamikitayama", - "kanmaki", - "kashiba", - "kashihara", - "katsuragi", - "kawai", - "kawakami", - "kawanishi", - "koryo", - "kurotaki", - "mitsue", - "miyake", - "nara", - "nosegawa", - "oji", - "ouda", - "oyodo", - "sakurai", - "sango", - "shimoichi", - "shimokitayama", - "shinjo", - "soni", - "takatori", - "tawaramoto", - "tenkawa", - "tenri", - "uda", - "yamatokoriyama", - "yamatotakada", - "yamazoe", - "yoshino", - "aga", - "agano", - "gosen", - "itoigawa", - "izumozaki", - "joetsu", - "kamo", - "kariwa", - "kashiwazaki", - "minamiuonuma", - "mitsuke", - "muika", - "murakami", - "myoko", - "nagaoka", - "niigata", - "ojiya", - "omi", - "sado", - "sanjo", - "seiro", - "seirou", - "sekikawa", - "shibata", - "tagami", - "tainai", - "tochio", - "tokamachi", - "tsubame", - "tsunan", - "uonuma", - "yahiko", - "yoita", - "yuzawa", - "beppu", - "bungoono", - "bungotakada", - "hasama", - "hiji", - "himeshima", - "hita", - "kamitsue", - "kokonoe", - "kuju", - "kunisaki", - "kusu", - "oita", - "saiki", - "taketa", - "tsukumi", - "usa", - "usuki", - "yufu", - "akaiwa", - "asakuchi", - "bizen", - "hayashima", - "ibara", - "kagamino", - "kasaoka", - "kibichuo", - "kumenan", - "kurashiki", - "maniwa", - "misaki", - "nagi", - "niimi", - "nishiawakura", - "okayama", - "satosho", - "setouchi", - "shinjo", - "shoo", - "soja", - "takahashi", - "tamano", - "tsuyama", - "wake", - "yakage", - "aguni", - "ginowan", - "ginoza", - "gushikami", - "haebaru", - "higashi", - "hirara", - "iheya", - "ishigaki", - "ishikawa", - "itoman", - "izena", - "kadena", - "kin", - "kitadaito", - "kitanakagusuku", - "kumejima", - "kunigami", - "minamidaito", - "motobu", - "nago", - "naha", - "nakagusuku", - "nakijin", - "nanjo", - "nishihara", - "ogimi", - "okinawa", - "onna", - "shimoji", - "taketomi", - "tarama", - "tokashiki", - "tomigusuku", - "tonaki", - "urasoe", - "uruma", - "yaese", - "yomitan", - "yonabaru", - "yonaguni", - "zamami", - "abeno", - "chihayaakasaka", - "chuo", - "daito", - "fujiidera", - "habikino", - "hannan", - "higashiosaka", - "higashisumiyoshi", - "higashiyodogawa", - "hirakata", - "ibaraki", - "ikeda", - "izumi", - "izumiotsu", - "izumisano", - "kadoma", - "kaizuka", - "kanan", - "kashiwara", - "katano", - "kawachinagano", - "kishiwada", - "kita", - "kumatori", - "matsubara", - "minato", - "minoh", - "misaki", - "moriguchi", - "neyagawa", - "nishi", - "nose", - "osakasayama", - "sakai", - "sayama", - "sennan", - "settsu", - "shijonawate", - "shimamoto", - "suita", - "tadaoka", - "taishi", - "tajiri", - "takaishi", - "takatsuki", - "tondabayashi", - "toyonaka", - "toyono", - "yao", - "ariake", - "arita", - "fukudomi", - "genkai", - "hamatama", - "hizen", - "imari", - "kamimine", - "kanzaki", - "karatsu", - "kashima", - "kitagata", - "kitahata", - "kiyama", - "kouhoku", - "kyuragi", - "nishiarita", - "ogi", - "omachi", - "ouchi", - "saga", - "shiroishi", - "taku", - "tara", - "tosu", - "yoshinogari", - "arakawa", - "asaka", - "chichibu", - "fujimi", - "fujimino", - "fukaya", - "hanno", - "hanyu", - "hasuda", - "hatogaya", - "hatoyama", - "hidaka", - "higashichichibu", - "higashimatsuyama", - "honjo", - "ina", - "iruma", - "iwatsuki", - "kamiizumi", - "kamikawa", - "kamisato", - "kasukabe", - "kawagoe", - "kawaguchi", - "kawajima", - "kazo", - "kitamoto", - "koshigaya", - "kounosu", - "kuki", - "kumagaya", - "matsubushi", - "minano", - "misato", - "miyashiro", - "miyoshi", - "moroyama", - "nagatoro", - "namegawa", - "niiza", - "ogano", - "ogawa", - "ogose", - "okegawa", - "omiya", - "otaki", - "ranzan", - "ryokami", - "saitama", - "sakado", - "satte", - "sayama", - "shiki", - "shiraoka", - "soka", - "sugito", - "toda", - "tokigawa", - "tokorozawa", - "tsurugashima", - "urawa", - "warabi", - "yashio", - "yokoze", - "yono", - "yorii", - "yoshida", - "yoshikawa", - "yoshimi", - "city", - "city", - "aisho", - "gamo", - "higashiomi", - "hikone", - "koka", - "konan", - "kosei", - "koto", - "kusatsu", - "maibara", - "moriyama", - "nagahama", - "nishiazai", - "notogawa", - "omihachiman", - "otsu", - "ritto", - "ryuoh", - "takashima", - "takatsuki", - "torahime", - "toyosato", - "yasu", - "akagi", - "ama", - "gotsu", - "hamada", - "higashiizumo", - "hikawa", - "hikimi", - "izumo", - "kakinoki", - "masuda", - "matsue", - "misato", - "nishinoshima", - "ohda", - "okinoshima", - "okuizumo", - "shimane", - "tamayu", - "tsuwano", - "unnan", - "yakumo", - "yasugi", - "yatsuka", - "arai", - "atami", - "fuji", - "fujieda", - "fujikawa", - "fujinomiya", - "fukuroi", - "gotemba", - "haibara", - "hamamatsu", - "higashiizu", - "ito", - "iwata", - "izu", - "izunokuni", - "kakegawa", - "kannami", - "kawanehon", - "kawazu", - "kikugawa", - "kosai", - "makinohara", - "matsuzaki", - "minamiizu", - "mishima", - "morimachi", - "nishiizu", - "numazu", - "omaezaki", - "shimada", - "shimizu", - "shimoda", - "shizuoka", - "susono", - "yaizu", - "yoshida", - "ashikaga", - "bato", - "haga", - "ichikai", - "iwafune", - "kaminokawa", - "kanuma", - "karasuyama", - "kuroiso", - "mashiko", - "mibu", - "moka", - "motegi", - "nasu", - "nasushiobara", - "nikko", - "nishikata", - "nogi", - "ohira", - "ohtawara", - "oyama", - "sakura", - "sano", - "shimotsuke", - "shioya", - "takanezawa", - "tochigi", - "tsuga", - "ujiie", - "utsunomiya", - "yaita", - "aizumi", - "anan", - "ichiba", - "itano", - "kainan", - "komatsushima", - "matsushige", - "mima", - "minami", - "miyoshi", - "mugi", - "nakagawa", - "naruto", - "sanagochi", - "shishikui", - "tokushima", - "wajiki", - "adachi", - "akiruno", - "akishima", - "aogashima", - "arakawa", - "bunkyo", - "chiyoda", - "chofu", - "chuo", - "edogawa", - "fuchu", - "fussa", - "hachijo", - "hachioji", - "hamura", - "higashikurume", - "higashimurayama", - "higashiyamato", - "hino", - "hinode", - "hinohara", - "inagi", - "itabashi", - "katsushika", - "kita", - "kiyose", - "kodaira", - "koganei", - "kokubunji", - "komae", - "koto", - "kouzushima", - "kunitachi", - "machida", - "meguro", - "minato", - "mitaka", - "mizuho", - "musashimurayama", - "musashino", - "nakano", - "nerima", - "ogasawara", - "okutama", - "ome", - "oshima", - "ota", - "setagaya", - "shibuya", - "shinagawa", - "shinjuku", - "suginami", - "sumida", - "tachikawa", - "taito", - "tama", - "toshima", - "chizu", - "hino", - "kawahara", - "koge", - "kotoura", - "misasa", - "nanbu", - "nichinan", - "sakaiminato", - "tottori", - "wakasa", - "yazu", - "yonago", - "asahi", - "fuchu", - "fukumitsu", - "funahashi", - "himi", - "imizu", - "inami", - "johana", - "kamiichi", - "kurobe", - "nakaniikawa", - "namerikawa", - "nanto", - "nyuzen", - "oyabe", - "taira", - "takaoka", - "tateyama", - "toga", - "tonami", - "toyama", - "unazuki", - "uozu", - "yamada", - "arida", - "aridagawa", - "gobo", - "hashimoto", - "hidaka", - "hirogawa", - "inami", - "iwade", - "kainan", - "kamitonda", - "katsuragi", - "kimino", - "kinokawa", - "kitayama", - "koya", - "koza", - "kozagawa", - "kudoyama", - "kushimoto", - "mihama", - "misato", - "nachikatsuura", - "shingu", - "shirahama", - "taiji", - "tanabe", - "wakayama", - "yuasa", - "yura", - "asahi", - "funagata", - "higashine", - "iide", - "kahoku", - "kaminoyama", - "kaneyama", - "kawanishi", - "mamurogawa", - "mikawa", - "murayama", - "nagai", - "nakayama", - "nanyo", - "nishikawa", - "obanazawa", - "oe", - "oguni", - "ohkura", - "oishida", - "sagae", - "sakata", - "sakegawa", - "shinjo", - "shirataka", - "shonai", - "takahata", - "tendo", - "tozawa", - "tsuruoka", - "yamagata", - "yamanobe", - "yonezawa", - "yuza", - "abu", - "hagi", - "hikari", - "hofu", - "iwakuni", - "kudamatsu", - "mitou", - "nagato", - "oshima", - "shimonoseki", - "shunan", - "tabuse", - "tokuyama", - "toyota", - "ube", - "yuu", - "chuo", - "doshi", - "fuefuki", - "fujikawa", - "fujikawaguchiko", - "fujiyoshida", - "hayakawa", - "hokuto", - "ichikawamisato", - "kai", - "kofu", - "koshu", - "kosuge", - "minami-alps", - "minobu", - "nakamichi", - "nanbu", - "narusawa", - "nirasaki", - "nishikatsura", - "oshino", - "otsuki", - "showa", - "tabayama", - "tsuru", - "uenohara", - "yamanakako", - "yamanashi", - "city", - "ac", - "co", - "go", - "info", - "me", - "mobi", - "ne", - "nom", - "or", - "sc", - "blogspot", - "com", - "edu", - "gov", - "mil", - "net", - "org", - "biz", - "com", - "edu", - "gov", - "info", - "net", - "org", - "ass", - "asso", - "com", - "coop", - "edu", - "gouv", - "gov", - "medecin", - "mil", - "nom", - "notaires", - "org", - "pharmaciens", - "prd", - "presse", - "tm", - "veterinaire", - "edu", - "gov", - "net", - "org", - "com", - "edu", - "gov", - "org", - "rep", - "tra", - "ac", - "blogspot", - "busan", - "chungbuk", - "chungnam", - "co", - "daegu", - "daejeon", - "es", - "gangwon", - "go", - "gwangju", - "gyeongbuk", - "gyeonggi", - "gyeongnam", - "hs", - "incheon", - "jeju", - "jeonbuk", - "jeonnam", - "kg", - "mil", - "ms", - "ne", - "or", - "pe", - "re", - "sc", - "seoul", - "ulsan", - "co", - "edu", - "com", - "edu", - "gov", - "net", - "org", - "com", - "edu", - "gov", - "mil", - "net", - "nym", - "org", - "bnr", - "c", - "com", - "edu", - "gov", - "info", - "int", - "net", - "nym", - "org", - "per", - "static", - "dev", - "sites", - "com", - "edu", - "gov", - "net", - "org", - "co", - "com", - "edu", - "gov", - "net", - "nym", - "org", - "oy", - "blogspot", - "nom", - "nym", - "cyon", - "mypep", - "ac", - "assn", - "com", - "edu", - "gov", - "grp", - "hotel", - "int", - "ltd", - "net", - "ngo", - "org", - "sch", - "soc", - "web", - "com", - "edu", - "gov", - "net", - "org", - "co", - "org", - "blogspot", - "gov", - "nym", - "blogspot", - "nym", - "asn", - "com", - "conf", - "edu", - "gov", - "id", - "mil", - "net", - "org", - "com", - "edu", - "gov", - "id", - "med", - "net", - "org", - "plc", - "sch", - "ac", - "co", - "gov", - "net", - "org", - "press", - "router", - "asso", - "tm", - "blogspot", - "ac", - "barsy", - "brasilia", - "c66", - "co", - "daplie", - "ddns", - "diskstation", - "dnsfor", - "dscloud", - "edu", - "filegear", - "gov", - "hopto", - "i234", - "its", - "loginto", - "myds", - "net", - "nohost", - "noip", - "nym", - "org", - "priv", - "ravendb", - "soundcast", - "synology", - "tcp4", - "webhop", - "wedeploy", - "yombo", - "localhost", - "barsy", - "co", - "com", - "edu", - "gov", - "mil", - "nom", - "org", - "prd", - "tm", - "blogspot", - "com", - "edu", - "gov", - "inf", - "name", - "net", - "nom", - "org", - "com", - "edu", - "gouv", - "gov", - "net", - "org", - "presse", - "edu", - "gov", - "nyc", - "nym", - "org", - "com", - "edu", - "gov", - "net", - "org", - "barsy", - "dscloud", - "blogspot", - "gov", - "com", - "edu", - "gov", - "net", - "org", - "com", - "edu", - "net", - "org", - "blogspot", - "ac", - "co", - "com", - "gov", - "net", - "or", - "org", - "academy", - "agriculture", - "air", - "airguard", - "alabama", - "alaska", - "amber", - "ambulance", - "american", - "americana", - "americanantiques", - "americanart", - "amsterdam", - "and", - "annefrank", - "anthro", - "anthropology", - "antiques", - "aquarium", - "arboretum", - "archaeological", - "archaeology", - "architecture", - "art", - "artanddesign", - "artcenter", - "artdeco", - "arteducation", - "artgallery", - "arts", - "artsandcrafts", - "asmatart", - "assassination", - "assisi", - "association", - "astronomy", - "atlanta", - "austin", - "australia", - "automotive", - "aviation", - "axis", - "badajoz", - "baghdad", - "bahn", - "bale", - "baltimore", - "barcelona", - "baseball", - "basel", - "baths", - "bauern", - "beauxarts", - "beeldengeluid", - "bellevue", - "bergbau", - "berkeley", - "berlin", - "bern", - "bible", - "bilbao", - "bill", - "birdart", - "birthplace", - "bonn", - "boston", - "botanical", - "botanicalgarden", - "botanicgarden", - "botany", - "brandywinevalley", - "brasil", - "bristol", - "british", - "britishcolumbia", - "broadcast", - "brunel", - "brussel", - "brussels", - "bruxelles", - "building", - "burghof", - "bus", - "bushey", - "cadaques", - "california", - "cambridge", - "can", - "canada", - "capebreton", - "carrier", - "cartoonart", - "casadelamoneda", - "castle", - "castres", - "celtic", - "center", - "chattanooga", - "cheltenham", - "chesapeakebay", - "chicago", - "children", - "childrens", - "childrensgarden", - "chiropractic", - "chocolate", - "christiansburg", - "cincinnati", - "cinema", - "circus", - "civilisation", - "civilization", - "civilwar", - "clinton", - "clock", - "coal", - "coastaldefence", - "cody", - "coldwar", - "collection", - "colonialwilliamsburg", - "coloradoplateau", - "columbia", - "columbus", - "communication", - "communications", - "community", - "computer", - "computerhistory", - "contemporary", - "contemporaryart", - "convent", - "copenhagen", - "corporation", - "corvette", - "costume", - "countryestate", - "county", - "crafts", - "cranbrook", - "creation", - "cultural", - "culturalcenter", - "culture", - "cyber", - "cymru", - "dali", - "dallas", - "database", - "ddr", - "decorativearts", - "delaware", - "delmenhorst", - "denmark", - "depot", - "design", - "detroit", - "dinosaur", - "discovery", - "dolls", - "donostia", - "durham", - "eastafrica", - "eastcoast", - "education", - "educational", - "egyptian", - "eisenbahn", - "elburg", - "elvendrell", - "embroidery", - "encyclopedic", - "england", - "entomology", - "environment", - "environmentalconservation", - "epilepsy", - "essex", - "estate", - "ethnology", - "exeter", - "exhibition", - "family", - "farm", - "farmequipment", - "farmers", - "farmstead", - "field", - "figueres", - "filatelia", - "film", - "fineart", - "finearts", - "finland", - "flanders", - "florida", - "force", - "fortmissoula", - "fortworth", - "foundation", - "francaise", - "frankfurt", - "franziskaner", - "freemasonry", - "freiburg", - "fribourg", - "frog", - "fundacio", - "furniture", - "gallery", - "garden", - "gateway", - "geelvinck", - "gemological", - "geology", - "georgia", - "giessen", - "glas", - "glass", - "gorge", - "grandrapids", - "graz", - "guernsey", - "halloffame", - "hamburg", - "handson", - "harvestcelebration", - "hawaii", - "health", - "heimatunduhren", - "hellas", - "helsinki", - "hembygdsforbund", - "heritage", - "histoire", - "historical", - "historicalsociety", - "historichouses", - "historisch", - "historisches", - "history", - "historyofscience", - "horology", - "house", - "humanities", - "illustration", - "imageandsound", - "indian", - "indiana", - "indianapolis", - "indianmarket", - "intelligence", - "interactive", - "iraq", - "iron", - "isleofman", - "jamison", - "jefferson", - "jerusalem", - "jewelry", - "jewish", - "jewishart", - "jfk", - "journalism", - "judaica", - "judygarland", - "juedisches", - "juif", - "karate", - "karikatur", - "kids", - "koebenhavn", - "koeln", - "kunst", - "kunstsammlung", - "kunstunddesign", - "labor", - "labour", - "lajolla", - "lancashire", - "landes", - "lans", - "larsson", - "lewismiller", - "lincoln", - "linz", - "living", - "livinghistory", - "localhistory", - "london", - "losangeles", - "louvre", - "loyalist", - "lucerne", - "luxembourg", - "luzern", - "mad", - "madrid", - "mallorca", - "manchester", - "mansion", - "mansions", - "manx", - "marburg", - "maritime", - "maritimo", - "maryland", - "marylhurst", - "media", - "medical", - "medizinhistorisches", - "meeres", - "memorial", - "mesaverde", - "michigan", - "midatlantic", - "military", - "mill", - "miners", - "mining", - "minnesota", - "missile", - "missoula", - "modern", - "moma", - "money", - "monmouth", - "monticello", - "montreal", - "moscow", - "motorcycle", - "muenchen", - "muenster", - "mulhouse", - "muncie", - "museet", - "museumcenter", - "museumvereniging", - "music", - "national", - "nationalfirearms", - "nationalheritage", - "nativeamerican", - "naturalhistory", - "naturalhistorymuseum", - "naturalsciences", - "nature", - "naturhistorisches", - "natuurwetenschappen", - "naumburg", - "naval", - "nebraska", - "neues", - "newhampshire", - "newjersey", - "newmexico", - "newport", - "newspaper", - "newyork", - "niepce", - "norfolk", - "north", - "nrw", - "nuernberg", - "nuremberg", - "nyc", - "nyny", - "oceanographic", - "oceanographique", - "omaha", - "online", - "ontario", - "openair", - "oregon", - "oregontrail", - "otago", - "oxford", - "pacific", - "paderborn", - "palace", - "paleo", - "palmsprings", - "panama", - "paris", - "pasadena", - "pharmacy", - "philadelphia", - "philadelphiaarea", - "philately", - "phoenix", - "photography", - "pilots", - "pittsburgh", - "planetarium", - "plantation", - "plants", - "plaza", - "portal", - "portland", - "portlligat", - "posts-and-telecommunications", - "preservation", - "presidio", - "press", - "project", - "public", - "pubol", - "quebec", - "railroad", - "railway", - "research", - "resistance", - "riodejaneiro", - "rochester", - "rockart", - "roma", - "russia", - "saintlouis", - "salem", - "salvadordali", - "salzburg", - "sandiego", - "sanfrancisco", - "santabarbara", - "santacruz", - "santafe", - "saskatchewan", - "satx", - "savannahga", - "schlesisches", - "schoenbrunn", - "schokoladen", - "school", - "schweiz", - "science", - "science-fiction", - "scienceandhistory", - "scienceandindustry", - "sciencecenter", - "sciencecenters", - "sciencehistory", - "sciences", - "sciencesnaturelles", - "scotland", - "seaport", - "settlement", - "settlers", - "shell", - "sherbrooke", - "sibenik", - "silk", - "ski", - "skole", - "society", - "sologne", - "soundandvision", - "southcarolina", - "southwest", - "space", - "spy", - "square", - "stadt", - "stalbans", - "starnberg", - "state", - "stateofdelaware", - "station", - "steam", - "steiermark", - "stjohn", - "stockholm", - "stpetersburg", - "stuttgart", - "suisse", - "surgeonshall", - "surrey", - "svizzera", - "sweden", - "sydney", - "tank", - "tcm", - "technology", - "telekommunikation", - "television", - "texas", - "textile", - "theater", - "time", - "timekeeping", - "topology", - "torino", - "touch", - "town", - "transport", - "tree", - "trolley", - "trust", - "trustee", - "uhren", - "ulm", - "undersea", - "university", - "usa", - "usantiques", - "usarts", - "uscountryestate", - "usculture", - "usdecorativearts", - "usgarden", - "ushistory", - "ushuaia", - "uslivinghistory", - "utah", - "uvic", - "valley", - "vantaa", - "versailles", - "viking", - "village", - "virginia", - "virtual", - "virtuel", - "vlaanderen", - "volkenkunde", - "wales", - "wallonie", - "war", - "washingtondc", - "watch-and-clock", - "watchandclock", - "western", - "westfalen", - "whaling", - "wildlife", - "williamsburg", - "windmill", - "workshop", - "xn--9dbhblg6di", - "xn--comunicaes-v6a2o", - "xn--correios-e-telecomunicaes-ghc29a", - "xn--h1aegh", - "xn--lns-qla", - "york", - "yorkshire", - "yosemite", - "youth", - "zoological", - "zoology", - "aero", - "biz", - "com", - "coop", - "edu", - "gov", - "info", - "int", - "mil", - "museum", - "name", - "net", - "org", - "pro", - "ac", - "biz", - "co", - "com", - "coop", - "edu", - "gov", - "int", - "museum", - "net", - "org", - "blogspot", - "com", - "edu", - "gob", - "net", - "nym", - "org", - "blogspot", - "com", - "edu", - "gov", - "mil", - "name", - "net", - "org", - "ac", - "adv", - "co", - "edu", - "gov", - "mil", - "net", - "org", - "ca", - "cc", - "co", - "com", - "dr", - "in", - "info", - "mobi", - "mx", - "name", - "or", - "org", - "pro", - "school", - "tv", - "us", - "ws", - "her", - "his", - "forgot", - "forgot", - "asso", - "nom", - "alwaysdata", - "at-band-camp", - "azure-mobile", - "azurewebsites", - "barsy", - "blackbaudcdn", - "blogdns", - "boomla", - "bounceme", - "bplaced", - "broke-it", - "buyshouses", - "casacam", - "cdn77", - "cdn77-ssl", - "channelsdvr", - "cloudaccess", - "cloudapp", - "cloudeity", - "cloudfront", - "cloudfunctions", - "cloudycluster", - "cryptonomic", - "dattolocal", - "ddns", - "debian", - "definima", - "dnsalias", - "dnsdojo", - "dnsup", - "does-it", - "dontexist", - "dsmynas", - "dynalias", - "dynathome", - "dynu", - "dynv6", - "eating-organic", - "endofinternet", - "familyds", - "fastly", - "fastlylb", - "feste-ip", - "firewall-gateway", - "flynnhosting", - "from-az", - "from-co", - "from-la", - "from-ny", - "gb", - "gets-it", - "ham-radio-op", - "hicam", - "homeftp", - "homeip", - "homelinux", - "homeunix", - "hu", - "in", - "in-the-band", - "ipifony", - "is-a-chef", - "is-a-geek", - "isa-geek", - "jp", - "kicks-ass", - "knx-server", - "memset", - "moonscale", - "mydatto", - "mydissent", - "myeffect", - "myfritz", - "mymediapc", - "mypsx", - "mysecuritycamera", - "nhlfan", - "no-ip", - "now-dns", - "office-on-the", - "ownip", - "pgafan", - "podzone", - "privatizehealthinsurance", - "rackmaze", - "redirectme", - "ru", - "schokokeks", - "scrapper-site", - "se", - "selfip", - "sells-it", - "servebbs", - "serveblog", - "serveftp", - "serveminecraft", - "square7", - "static-access", - "sytes", - "t3l3p0rt", - "thruhere", - "twmail", - "uk", - "vpndns", - "webhop", - "za", - "r", - "freetls", - "map", - "prod", - "ssl", - "a", - "global", - "a", - "b", - "global", - "map", - "alces", - "arts", - "com", - "firm", - "info", - "net", - "other", - "per", - "rec", - "store", - "web", - "com", - "edu", - "gov", - "i", - "mil", - "mobi", - "name", - "net", - "org", - "sch", - "blogspot", - "ac", - "biz", - "co", - "com", - "edu", - "gob", - "in", - "info", - "int", - "mil", - "net", - "nom", - "org", - "web", - "blogspot", - "bv", - "cistron", - "co", - "demon", - "hosting-cluster", - "transurl", - "virtueeldomein", - "aa", - "aarborte", - "aejrie", - "afjord", - "agdenes", - "ah", - "akershus", - "aknoluokta", - "akrehamn", - "al", - "alaheadju", - "alesund", - "algard", - "alstahaug", - "alta", - "alvdal", - "amli", - "amot", - "andasuolo", - "andebu", - "andoy", - "ardal", - "aremark", - "arendal", - "arna", - "aseral", - "asker", - "askim", - "askoy", - "askvoll", - "asnes", - "audnedaln", - "aukra", - "aure", - "aurland", - "aurskog-holand", - "austevoll", - "austrheim", - "averoy", - "badaddja", - "bahcavuotna", - "bahccavuotna", - "baidar", - "bajddar", - "balat", - "balestrand", - "ballangen", - "balsfjord", - "bamble", - "bardu", - "barum", - "batsfjord", - "bearalvahki", - "beardu", - "beiarn", - "berg", - "bergen", - "berlevag", - "bievat", - "bindal", - "birkenes", - "bjarkoy", - "bjerkreim", - "bjugn", - "blogspot", - "bodo", - "bokn", - "bomlo", - "bremanger", - "bronnoy", - "bronnoysund", - "brumunddal", - "bryne", - "bu", - "budejju", - "buskerud", - "bygland", - "bykle", - "cahcesuolo", - "co", - "davvenjarga", - "davvesiida", - "deatnu", - "dep", - "dielddanuorri", - "divtasvuodna", - "divttasvuotna", - "donna", - "dovre", - "drammen", - "drangedal", - "drobak", - "dyroy", - "egersund", - "eid", - "eidfjord", - "eidsberg", - "eidskog", - "eidsvoll", - "eigersund", - "elverum", - "enebakk", - "engerdal", - "etne", - "etnedal", - "evenassi", - "evenes", - "evje-og-hornnes", - "farsund", - "fauske", - "fedje", - "fet", - "fetsund", - "fhs", - "finnoy", - "fitjar", - "fjaler", - "fjell", - "fla", - "flakstad", - "flatanger", - "flekkefjord", - "flesberg", - "flora", - "floro", - "fm", - "folkebibl", - "folldal", - "forde", - "forsand", - "fosnes", - "frana", - "fredrikstad", - "frei", - "frogn", - "froland", - "frosta", - "froya", - "fuoisku", - "fuossko", - "fusa", - "fylkesbibl", - "fyresdal", - "gaivuotna", - "galsa", - "gamvik", - "gangaviika", - "gaular", - "gausdal", - "giehtavuoatna", - "gildeskal", - "giske", - "gjemnes", - "gjerdrum", - "gjerstad", - "gjesdal", - "gjovik", - "gloppen", - "gol", - "gran", - "grane", - "granvin", - "gratangen", - "grimstad", - "grong", - "grue", - "gulen", - "guovdageaidnu", - "ha", - "habmer", - "hadsel", - "hagebostad", - "halden", - "halsa", - "hamar", - "hamaroy", - "hammarfeasta", - "hammerfest", - "hapmir", - "haram", - "hareid", - "harstad", - "hasvik", - "hattfjelldal", - "haugesund", - "hedmark", - "hemne", - "hemnes", - "hemsedal", - "herad", - "hitra", - "hjartdal", - "hjelmeland", - "hl", - "hm", - "hobol", - "hof", - "hokksund", - "hol", - "hole", - "holmestrand", - "holtalen", - "honefoss", - "hordaland", - "hornindal", - "horten", - "hoyanger", - "hoylandet", - "hurdal", - "hurum", - "hvaler", - "hyllestad", - "ibestad", - "idrett", - "inderoy", - "iveland", - "ivgu", - "jan-mayen", - "jessheim", - "jevnaker", - "jolster", - "jondal", - "jorpeland", - "kafjord", - "karasjohka", - "karasjok", - "karlsoy", - "karmoy", - "kautokeino", - "kirkenes", - "klabu", - "klepp", - "kommune", - "kongsberg", - "kongsvinger", - "kopervik", - "kraanghke", - "kragero", - "kristiansand", - "kristiansund", - "krodsherad", - "krokstadelva", - "kvafjord", - "kvalsund", - "kvam", - "kvanangen", - "kvinesdal", - "kvinnherad", - "kviteseid", - "kvitsoy", - "laakesvuemie", - "lahppi", - "langevag", - "lardal", - "larvik", - "lavagis", - "lavangen", - "leangaviika", - "lebesby", - "leikanger", - "leirfjord", - "leirvik", - "leka", - "leksvik", - "lenvik", - "lerdal", - "lesja", - "levanger", - "lier", - "lierne", - "lillehammer", - "lillesand", - "lindas", - "lindesnes", - "loabat", - "lodingen", - "lom", - "loppa", - "lorenskog", - "loten", - "lund", - "lunner", - "luroy", - "luster", - "lyngdal", - "lyngen", - "malatvuopmi", - "malselv", - "malvik", - "mandal", - "marker", - "marnardal", - "masfjorden", - "masoy", - "matta-varjjat", - "meland", - "meldal", - "melhus", - "meloy", - "meraker", - "midsund", - "midtre-gauldal", - "mil", - "mjondalen", - "mo-i-rana", - "moareke", - "modalen", - "modum", - "molde", - "more-og-romsdal", - "mosjoen", - "moskenes", - "moss", - "mosvik", - "mr", - "muosat", - "museum", - "naamesjevuemie", - "namdalseid", - "namsos", - "namsskogan", - "nannestad", - "naroy", - "narviika", - "narvik", - "naustdal", - "navuotna", - "nedre-eiker", - "nesna", - "nesodden", - "nesoddtangen", - "nesseby", - "nesset", - "nissedal", - "nittedal", - "nl", - "nord-aurdal", - "nord-fron", - "nord-odal", - "norddal", - "nordkapp", - "nordland", - "nordre-land", - "nordreisa", - "nore-og-uvdal", - "notodden", - "notteroy", - "nt", - "odda", - "of", - "oksnes", - "ol", - "omasvuotna", - "oppdal", - "oppegard", - "orkanger", - "orkdal", - "orland", - "orskog", - "orsta", - "osen", - "oslo", - "osoyro", - "osteroy", - "ostfold", - "ostre-toten", - "overhalla", - "ovre-eiker", - "oyer", - "oygarden", - "oystre-slidre", - "porsanger", - "porsangu", - "porsgrunn", - "priv", - "rade", - "radoy", - "rahkkeravju", - "raholt", - "raisa", - "rakkestad", - "ralingen", - "rana", - "randaberg", - "rauma", - "rendalen", - "rennebu", - "rennesoy", - "rindal", - "ringebu", - "ringerike", - "ringsaker", - "risor", - "rissa", - "rl", - "roan", - "rodoy", - "rollag", - "romsa", - "romskog", - "roros", - "rost", - "royken", - "royrvik", - "ruovat", - "rygge", - "salangen", - "salat", - "saltdal", - "samnanger", - "sandefjord", - "sandnes", - "sandnessjoen", - "sandoy", - "sarpsborg", - "sauda", - "sauherad", - "sel", - "selbu", - "selje", - "seljord", - "sf", - "siellak", - "sigdal", - "siljan", - "sirdal", - "skanit", - "skanland", - "skaun", - "skedsmo", - "skedsmokorset", - "ski", - "skien", - "skierva", - "skiptvet", - "skjak", - "skjervoy", - "skodje", - "slattum", - "smola", - "snaase", - "snasa", - "snillfjord", - "snoasa", - "sogndal", - "sogne", - "sokndal", - "sola", - "solund", - "somna", - "sondre-land", - "songdalen", - "sor-aurdal", - "sor-fron", - "sor-odal", - "sor-varanger", - "sorfold", - "sorreisa", - "sortland", - "sorum", - "spjelkavik", - "spydeberg", - "st", - "stange", - "stat", - "stathelle", - "stavanger", - "stavern", - "steigen", - "steinkjer", - "stjordal", - "stjordalshalsen", - "stokke", - "stor-elvdal", - "stord", - "stordal", - "storfjord", - "strand", - "stranda", - "stryn", - "sula", - "suldal", - "sund", - "sunndal", - "surnadal", - "svalbard", - "sveio", - "svelvik", - "sykkylven", - "tana", - "tananger", - "telemark", - "time", - "tingvoll", - "tinn", - "tjeldsund", - "tjome", - "tm", - "tokke", - "tolga", - "tonsberg", - "torsken", - "tr", - "trana", - "tranby", - "tranoy", - "troandin", - "trogstad", - "tromsa", - "tromso", - "trondheim", - "trysil", - "tvedestrand", - "tydal", - "tynset", - "tysfjord", - "tysnes", - "tysvar", - "ullensaker", - "ullensvang", - "ulvik", - "unjarga", - "utsira", - "va", - "vaapste", - "vadso", - "vaga", - "vagan", - "vagsoy", - "vaksdal", - "valle", - "vang", - "vanylven", - "vardo", - "varggat", - "varoy", - "vefsn", - "vega", - "vegarshei", - "vennesla", - "verdal", - "verran", - "vestby", - "vestfold", - "vestnes", - "vestre-slidre", - "vestre-toten", - "vestvagoy", - "vevelstad", - "vf", - "vgs", - "vik", - "vikna", - "vindafjord", - "voagat", - "volda", - "voss", - "vossevangen", - "xn--andy-ira", - "xn--asky-ira", - "xn--aurskog-hland-jnb", - "xn--avery-yua", - "xn--bdddj-mrabd", - "xn--bearalvhki-y4a", - "xn--berlevg-jxa", - "xn--bhcavuotna-s4a", - "xn--bhccavuotna-k7a", - "xn--bidr-5nac", - "xn--bievt-0qa", - "xn--bjarky-fya", - "xn--bjddar-pta", - "xn--blt-elab", - "xn--bmlo-gra", - "xn--bod-2na", - "xn--brnny-wuac", - "xn--brnnysund-m8ac", - "xn--brum-voa", - "xn--btsfjord-9za", - "xn--davvenjrga-y4a", - "xn--dnna-gra", - "xn--drbak-wua", - "xn--dyry-ira", - "xn--eveni-0qa01ga", - "xn--finny-yua", - "xn--fjord-lra", - "xn--fl-zia", - "xn--flor-jra", - "xn--frde-gra", - "xn--frna-woa", - "xn--frya-hra", - "xn--ggaviika-8ya47h", - "xn--gildeskl-g0a", - "xn--givuotna-8ya", - "xn--gjvik-wua", - "xn--gls-elac", - "xn--h-2fa", - "xn--hbmer-xqa", - "xn--hcesuolo-7ya35b", - "xn--hgebostad-g3a", - "xn--hmmrfeasta-s4ac", - "xn--hnefoss-q1a", - "xn--hobl-ira", - "xn--holtlen-hxa", - "xn--hpmir-xqa", - "xn--hyanger-q1a", - "xn--hylandet-54a", - "xn--indery-fya", - "xn--jlster-bya", - "xn--jrpeland-54a", - "xn--karmy-yua", - "xn--kfjord-iua", - "xn--klbu-woa", - "xn--koluokta-7ya57h", - "xn--krager-gya", - "xn--kranghke-b0a", - "xn--krdsherad-m8a", - "xn--krehamn-dxa", - "xn--krjohka-hwab49j", - "xn--ksnes-uua", - "xn--kvfjord-nxa", - "xn--kvitsy-fya", - "xn--kvnangen-k0a", - "xn--l-1fa", - "xn--laheadju-7ya", - "xn--langevg-jxa", - "xn--ldingen-q1a", - "xn--leagaviika-52b", - "xn--lesund-hua", - "xn--lgrd-poac", - "xn--lhppi-xqa", - "xn--linds-pra", - "xn--loabt-0qa", - "xn--lrdal-sra", - "xn--lrenskog-54a", - "xn--lt-liac", - "xn--lten-gra", - "xn--lury-ira", - "xn--mely-ira", - "xn--merker-kua", - "xn--mjndalen-64a", - "xn--mlatvuopmi-s4a", - "xn--mli-tla", - "xn--mlselv-iua", - "xn--moreke-jua", - "xn--mosjen-eya", - "xn--mot-tla", - "xn--mre-og-romsdal-qqb", - "xn--msy-ula0h", - "xn--mtta-vrjjat-k7af", - "xn--muost-0qa", - "xn--nmesjevuemie-tcba", - "xn--nry-yla5g", - "xn--nttery-byae", - "xn--nvuotna-hwa", - "xn--oppegrd-ixa", - "xn--ostery-fya", - "xn--osyro-wua", - "xn--porsgu-sta26f", - "xn--rady-ira", - "xn--rdal-poa", - "xn--rde-ula", - "xn--rdy-0nab", - "xn--rennesy-v1a", - "xn--rhkkervju-01af", - "xn--rholt-mra", - "xn--risa-5na", - "xn--risr-ira", - "xn--rland-uua", - "xn--rlingen-mxa", - "xn--rmskog-bya", - "xn--rros-gra", - "xn--rskog-uua", - "xn--rst-0na", - "xn--rsta-fra", - "xn--ryken-vua", - "xn--ryrvik-bya", - "xn--s-1fa", - "xn--sandnessjen-ogb", - "xn--sandy-yua", - "xn--seral-lra", - "xn--sgne-gra", - "xn--skierv-uta", - "xn--skjervy-v1a", - "xn--skjk-soa", - "xn--sknit-yqa", - "xn--sknland-fxa", - "xn--slat-5na", - "xn--slt-elab", - "xn--smla-hra", - "xn--smna-gra", - "xn--snase-nra", - "xn--sndre-land-0cb", - "xn--snes-poa", - "xn--snsa-roa", - "xn--sr-aurdal-l8a", - "xn--sr-fron-q1a", - "xn--sr-odal-q1a", - "xn--sr-varanger-ggb", - "xn--srfold-bya", - "xn--srreisa-q1a", - "xn--srum-gra", - "xn--stfold-9xa", - "xn--stjrdal-s1a", - "xn--stjrdalshalsen-sqb", - "xn--stre-toten-zcb", - "xn--tjme-hra", - "xn--tnsberg-q1a", - "xn--trany-yua", - "xn--trgstad-r1a", - "xn--trna-woa", - "xn--troms-zua", - "xn--tysvr-vra", - "xn--unjrga-rta", - "xn--vads-jra", - "xn--vard-jra", - "xn--vegrshei-c0a", - "xn--vestvgy-ixa6o", - "xn--vg-yiab", - "xn--vgan-qoa", - "xn--vgsy-qoa0j", - "xn--vre-eiker-k8a", - "xn--vrggt-xqad", - "xn--vry-yla5g", - "xn--yer-zna", - "xn--ygarden-p1a", - "xn--ystre-slidre-ujb", - "gs", - "gs", - "nes", - "gs", - "nes", - "gs", - "os", - "valer", - "xn--vler-qoa", - "gs", - "gs", - "os", - "gs", - "heroy", - "sande", - "gs", - "gs", - "bo", - "heroy", - "xn--b-5ga", - "xn--hery-ira", - "gs", - "gs", - "gs", - "gs", - "valer", - "gs", - "gs", - "gs", - "gs", - "bo", - "xn--b-5ga", - "gs", - "gs", - "gs", - "sande", - "gs", - "sande", - "xn--hery-ira", - "xn--vler-qoa", - "biz", - "com", - "edu", - "gov", - "info", - "net", - "org", - "merseine", - "mine", - "nom", - "shacknet", - "ac", - "co", - "cri", - "geek", - "gen", - "govt", - "health", - "iwi", - "kiwi", - "maori", - "mil", - "net", - "nym", - "org", - "parliament", - "school", - "xn--mori-qsa", - "blogspot", - "co", - "com", - "edu", - "gov", - "med", - "museum", - "net", - "org", - "pro", - "homelink", - "barsy", - "accesscam", - "ae", - "amune", - "barsy", - "blogdns", - "blogsite", - "bmoattachments", - "boldlygoingnowhere", - "cable-modem", - "camdvr", - "cdn77", - "cdn77-secure", - "certmgr", - "cloudns", - "collegefan", - "couchpotatofries", - "ddnss", - "diskstation", - "dnsalias", - "dnsdojo", - "doesntexist", - "dontexist", - "doomdns", - "dsmynas", - "duckdns", - "dvrdns", - "dynalias", - "dyndns", - "dynserv", - "endofinternet", - "endoftheinternet", - "eu", - "familyds", - "fedorainfracloud", - "fedorapeople", - "fedoraproject", - "freeddns", - "freedesktop", - "from-me", - "game-host", - "gotdns", - "hepforge", - "hk", - "hobby-site", - "homedns", - "homeftp", - "homelinux", - "homeunix", - "hopto", - "is-a-bruinsfan", - "is-a-candidate", - "is-a-celticsfan", - "is-a-chef", - "is-a-geek", - "is-a-knight", - "is-a-linux-user", - "is-a-patsfan", - "is-a-soxfan", - "is-found", - "is-lost", - "is-saved", - "is-very-bad", - "is-very-evil", - "is-very-good", - "is-very-nice", - "is-very-sweet", - "isa-geek", - "js", - "kicks-ass", - "mayfirst", - "misconfused", - "mlbfan", - "mozilla-iot", - "my-firewall", - "myfirewall", - "myftp", - "mysecuritycamera", - "mywire", - "nflfan", - "no-ip", - "now-dns", - "pimienta", - "podzone", - "poivron", - "potager", - "read-books", - "readmyblog", - "selfip", - "sellsyourhome", - "servebbs", - "serveftp", - "servegame", - "spdns", - "stuff-4-sale", - "sweetpepper", - "tunk", - "tuxfamily", - "twmail", - "ufcfan", - "uklugs", - "us", - "webhop", - "webredirect", - "wmflabs", - "za", - "zapto", - "tele", - "c", - "rsc", - "origin", - "ssl", - "go", - "home", - "al", - "asso", - "at", - "au", - "be", - "bg", - "ca", - "cd", - "ch", - "cn", - "cy", - "cz", - "de", - "dk", - "edu", - "ee", - "es", - "fi", - "fr", - "gr", - "hr", - "hu", - "ie", - "il", - "in", - "int", - "is", - "it", - "jp", - "kr", - "lt", - "lu", - "lv", - "mc", - "me", - "mk", - "mt", - "my", - "net", - "ng", - "nl", - "no", - "nz", - "paris", - "pl", - "pt", - "q-a", - "ro", - "ru", - "se", - "si", - "sk", - "tr", - "uk", - "us", - "cloud", - "os", - "stg", - "app", - "os", - "app", - "nerdpol", - "abo", - "ac", - "com", - "edu", - "gob", - "ing", - "med", - "net", - "nom", - "org", - "sld", - "ybo", - "blogspot", - "com", - "edu", - "gob", - "mil", - "net", - "nom", - "nym", - "org", - "com", - "edu", - "org", - "com", - "edu", - "gov", - "i", - "mil", - "net", - "ngo", - "org", - "1337", - "biz", - "com", - "edu", - "fam", - "gob", - "gok", - "gon", - "gop", - "gos", - "gov", - "info", - "net", - "org", - "web", - "agro", - "aid", - "art", - "atm", - "augustow", - "auto", - "babia-gora", - "bedzin", - "beep", - "beskidy", - "bialowieza", - "bialystok", - "bielawa", - "bieszczady", - "biz", - "boleslawiec", - "bydgoszcz", - "bytom", - "cieszyn", - "co", - "com", - "czeladz", - "czest", - "dlugoleka", - "edu", - "elblag", - "elk", - "gda", - "gdansk", - "gdynia", - "gliwice", - "glogow", - "gmina", - "gniezno", - "gorlice", - "gov", - "grajewo", - "gsm", - "ilawa", - "info", - "jaworzno", - "jelenia-gora", - "jgora", - "kalisz", - "karpacz", - "kartuzy", - "kaszuby", - "katowice", - "kazimierz-dolny", - "kepno", - "ketrzyn", - "klodzko", - "kobierzyce", - "kolobrzeg", - "konin", - "konskowola", - "krakow", - "kutno", - "lapy", - "lebork", - "legnica", - "lezajsk", - "limanowa", - "lomza", - "lowicz", - "lubin", - "lukow", - "mail", - "malbork", - "malopolska", - "mazowsze", - "mazury", - "med", - "media", - "miasta", - "mielec", - "mielno", - "mil", - "mragowo", - "naklo", - "net", - "nieruchomosci", - "nom", - "nowaruda", - "nysa", - "olawa", - "olecko", - "olkusz", - "olsztyn", - "opoczno", - "opole", - "org", - "ostroda", - "ostroleka", - "ostrowiec", - "ostrowwlkp", - "pc", - "pila", - "pisz", - "podhale", - "podlasie", - "polkowice", - "pomorskie", - "pomorze", - "powiat", - "poznan", - "priv", - "prochowice", - "pruszkow", - "przeworsk", - "pulawy", - "radom", - "rawa-maz", - "realestate", - "rel", - "rybnik", - "rzeszow", - "sanok", - "sejny", - "sex", - "shop", - "sklep", - "skoczow", - "slask", - "slupsk", - "sopot", - "sos", - "sosnowiec", - "stalowa-wola", - "starachowice", - "stargard", - "suwalki", - "swidnica", - "swiebodzin", - "swinoujscie", - "szczecin", - "szczytno", - "szkola", - "targi", - "tarnobrzeg", - "tgory", - "tm", - "tourism", - "travel", - "turek", - "turystyka", - "tychy", - "ustka", - "walbrzych", - "warmia", - "warszawa", - "waw", - "wegrow", - "wielun", - "wlocl", - "wloclawek", - "wodzislaw", - "wolomin", - "wroc", - "wroclaw", - "zachpomor", - "zagan", - "zakopane", - "zarow", - "zgora", - "zgorzelec", - "ap", - "griw", - "ic", - "is", - "kmpsp", - "konsulat", - "kppsp", - "kwp", - "kwpsp", - "mup", - "mw", - "oirm", - "oum", - "pa", - "pinb", - "piw", - "po", - "psp", - "psse", - "pup", - "rzgw", - "sa", - "sdn", - "sko", - "so", - "sr", - "starostwo", - "ug", - "ugim", - "um", - "umig", - "upow", - "uppo", - "us", - "uw", - "uzs", - "wif", - "wiih", - "winb", - "wios", - "witd", - "wiw", - "wsa", - "wskr", - "wuoz", - "wzmiuw", - "zp", - "own", - "co", - "edu", - "gov", - "net", - "org", - "ac", - "biz", - "com", - "edu", - "est", - "gov", - "info", - "isla", - "name", - "net", - "org", - "pro", - "prof", - "aaa", - "aca", - "acct", - "avocat", - "bar", - "barsy", - "cloudns", - "cpa", - "dnstrace", - "eng", - "jur", - "law", - "med", - "recht", - "bci", - "com", - "edu", - "gov", - "net", - "org", - "plo", - "sec", - "blogspot", - "com", - "edu", - "gov", - "int", - "net", - "nome", - "nym", - "org", - "publ", - "barsy", - "belau", - "cloudns", - "co", - "ed", - "go", - "ne", - "nom", - "or", - "x443", - "com", - "coop", - "edu", - "gov", - "mil", - "net", - "org", - "blogspot", - "com", - "edu", - "gov", - "mil", - "name", - "net", - "nom", - "org", - "sch", - "asso", - "blogspot", - "com", - "nom", - "ybo", - "clan", - "arts", - "blogspot", - "com", - "firm", - "info", - "nom", - "nt", - "nym", - "org", - "rec", - "shop", - "store", - "tm", - "www", - "lima-city", - "myddns", - "webspace", - "ac", - "blogspot", - "co", - "edu", - "gov", - "in", - "nom", - "org", - "ox", - "ac", - "adygeya", - "bashkiria", - "bir", - "blogspot", - "cbg", - "cldmail", - "com", - "dagestan", - "edu", - "gov", - "grozny", - "int", - "kalmykia", - "kustanai", - "marine", - "mil", - "mordovia", - "msk", - "myjino", - "mytis", - "nalchik", - "net", - "nov", - "org", - "pp", - "pyatigorsk", - "ras", - "spb", - "test", - "vladikavkaz", - "vladimir", - "hb", - "hosting", - "landing", - "spectrum", - "vps", - "development", - "ravendb", - "ac", - "co", - "com", - "edu", - "gouv", - "gov", - "int", - "mil", - "net", - "com", - "edu", - "gov", - "med", - "net", - "org", - "pub", - "sch", - "com", - "edu", - "gov", - "net", - "org", - "com", - "edu", - "gov", - "net", - "org", - "ybo", - "com", - "edu", - "gov", - "info", - "med", - "net", - "org", - "tv", - "a", - "ac", - "b", - "bd", - "blogspot", - "brand", - "c", - "com", - "d", - "e", - "f", - "fh", - "fhsk", - "fhv", - "g", - "h", - "i", - "k", - "komforb", - "kommunalforbund", - "komvux", - "l", - "lanbib", - "m", - "n", - "naturbruksgymn", - "o", - "org", - "p", - "parti", - "pp", - "press", - "r", - "s", - "t", - "tm", - "u", - "w", - "x", - "y", - "z", - "blogspot", - "com", - "edu", - "gov", - "net", - "org", - "per", - "com", - "gov", - "hashbang", - "mil", - "net", - "now", - "org", - "platform", - "wedeploy", - "barsy", - "blogspot", - "nom", - "barsy", - "byen", - "cyon", - "platformsh", - "blogspot", - "nym", - "com", - "edu", - "gov", - "net", - "org", - "art", - "blogspot", - "com", - "edu", - "gouv", - "org", - "perso", - "univ", - "com", - "net", - "org", - "linkitools", - "stackspace", - "uber", - "xs4all", - "co", - "com", - "consulado", - "edu", - "embaixada", - "gov", - "mil", - "net", - "noho", - "nom", - "org", - "principe", - "saotome", - "store", - "abkhazia", - "adygeya", - "aktyubinsk", - "arkhangelsk", - "armenia", - "ashgabad", - "azerbaijan", - "balashov", - "bashkiria", - "bryansk", - "bukhara", - "chimkent", - "dagestan", - "east-kazakhstan", - "exnet", - "georgia", - "grozny", - "ivanovo", - "jambyl", - "kalmykia", - "kaluga", - "karacol", - "karaganda", - "karelia", - "khakassia", - "krasnodar", - "kurgan", - "kustanai", - "lenug", - "mangyshlak", - "mordovia", - "msk", - "murmansk", - "nalchik", - "navoi", - "north-kazakhstan", - "nov", - "nym", - "obninsk", - "penza", - "pokrovsk", - "sochi", - "spb", - "tashkent", - "termez", - "togliatti", - "troitsk", - "tselinograd", - "tula", - "tuva", - "vladikavkaz", - "vladimir", - "vologda", - "barsy", - "com", - "edu", - "gob", - "org", - "red", - "gov", - "nym", - "com", - "edu", - "gov", - "mil", - "net", - "org", - "knightpoint", - "ac", - "co", - "org", - "blogspot", - "ac", - "co", - "go", - "in", - "mi", - "net", - "or", - "ac", - "biz", - "co", - "com", - "edu", - "go", - "gov", - "int", - "mil", - "name", - "net", - "nic", - "nom", - "org", - "test", - "web", - "gov", - "co", - "com", - "edu", - "gov", - "mil", - "net", - "nom", - "org", - "agrinet", - "com", - "defense", - "edunet", - "ens", - "fin", - "gov", - "ind", - "info", - "intl", - "mincom", - "nat", - "net", - "org", - "perso", - "rnrt", - "rns", - "rnu", - "tourism", - "turen", - "com", - "edu", - "gov", - "mil", - "net", - "org", - "vpnplus", - "now-dns", - "ntdll", - "av", - "bbs", - "bel", - "biz", - "com", - "dr", - "edu", - "gen", - "gov", - "info", - "k12", - "kep", - "mil", - "name", - "nc", - "net", - "org", - "pol", - "tel", - "tv", - "web", - "blogspot", - "gov", - "ybo", - "aero", - "biz", - "co", - "com", - "coop", - "edu", - "gov", - "info", - "int", - "jobs", - "mobi", - "museum", - "name", - "net", - "org", - "pro", - "travel", - "better-than", - "dyndns", - "on-the-web", - "worse-than", - "blogspot", - "club", - "com", - "ebiz", - "edu", - "game", - "gov", - "idv", - "mil", - "net", - "nym", - "org", - "url", - "xn--czrw28b", - "xn--uc0atv", - "xn--zf0ao64a", - "mymailer", - "ac", - "co", - "go", - "hotel", - "info", - "me", - "mil", - "mobi", - "ne", - "or", - "sc", - "tv", - "biz", - "cc", - "cherkassy", - "cherkasy", - "chernigov", - "chernihiv", - "chernivtsi", - "chernovtsy", - "ck", - "cn", - "co", - "com", - "cr", - "crimea", - "cv", - "dn", - "dnepropetrovsk", - "dnipropetrovsk", - "dominic", - "donetsk", - "dp", - "edu", - "gov", - "if", - "in", - "inf", - "ivano-frankivsk", - "kh", - "kharkiv", - "kharkov", - "kherson", - "khmelnitskiy", - "khmelnytskyi", - "kiev", - "kirovograd", - "km", - "kr", - "krym", - "ks", - "kv", - "kyiv", - "lg", - "lt", - "ltd", - "lugansk", - "lutsk", - "lv", - "lviv", - "mk", - "mykolaiv", - "net", - "nikolaev", - "od", - "odesa", - "odessa", - "org", - "pl", - "poltava", - "pp", - "rivne", - "rovno", - "rv", - "sb", - "sebastopol", - "sevastopol", - "sm", - "sumy", - "te", - "ternopil", - "uz", - "uzhgorod", - "vinnica", - "vinnytsia", - "vn", - "volyn", - "yalta", - "zaporizhzhe", - "zaporizhzhia", - "zhitomir", - "zhytomyr", - "zp", - "zt", - "ac", - "blogspot", - "co", - "com", - "go", - "ne", - "nom", - "or", - "org", - "sc", - "ac", - "barsy", - "co", - "gov", - "ltd", - "me", - "net", - "nhs", - "org", - "plc", - "police", - "sch", - "barsy", - "barsyonline", - "blogspot", - "gwiddle", - "nh-serv", - "no-ip", - "wellbeingzone", - "homeoffice", - "service", - "glug", - "lug", - "lugs", - "ak", - "al", - "ar", - "as", - "az", - "ca", - "cloudns", - "co", - "ct", - "dc", - "de", - "dni", - "drud", - "fed", - "fl", - "freeddns", - "ga", - "golffan", - "gu", - "hi", - "ia", - "id", - "il", - "in", - "is-by", - "isa", - "kids", - "ks", - "ky", - "la", - "land-4-sale", - "ma", - "md", - "me", - "mi", - "mn", - "mo", - "ms", - "mt", - "nc", - "nd", - "ne", - "nh", - "nj", - "nm", - "noip", - "nsn", - "nv", - "ny", - "oh", - "ok", - "or", - "pa", - "pointto", - "pr", - "ri", - "sc", - "sd", - "stuff-4-sale", - "tn", - "tx", - "ut", - "va", - "vi", - "vt", - "wa", - "wi", - "wv", - "wy", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "chtr", - "paroch", - "pvt", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "ann-arbor", - "cc", - "cog", - "dst", - "eaton", - "gen", - "k12", - "lib", - "mus", - "tec", - "washtenaw", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "k12", - "lib", - "cc", - "cc", - "k12", - "lib", - "com", - "edu", - "gub", - "mil", - "net", - "nom", - "org", - "blogspot", - "co", - "com", - "net", - "org", - "com", - "edu", - "gov", - "mil", - "net", - "nom", - "org", - "arts", - "co", - "com", - "e12", - "edu", - "firm", - "gob", - "gov", - "info", - "int", - "mil", - "net", - "org", - "rec", - "store", - "tec", - "web", - "nom", - "co", - "com", - "k12", - "net", - "org", - "ac", - "biz", - "blogspot", - "com", - "edu", - "gov", - "health", - "info", - "int", - "name", - "net", - "org", - "pro", - "com", - "edu", - "net", - "org", - "advisor", - "cloud66", - "com", - "dyndns", - "edu", - "gov", - "mypets", - "net", - "org", - "xn--80au", - "xn--90azh", - "xn--c1avg", - "xn--d1at", - "xn--o1ac", - "xn--o1ach", - "xn--55qx5d", - "xn--gmqw5a", - "xn--mxtq1m", - "xn--od0alg", - "xn--uc0atv", - "xn--wcvs22d", - "xn--12c1fe0br", - "xn--12cfi8ixb8l", - "xn--12co0c3b4eva", - "xn--h3cuzk1di", - "xn--m3ch0j3a", - "xn--o3cyx2a", - "blogsite", - "crafting", - "fhapp", - "zapto", - "ac", - "agric", - "alt", - "co", - "edu", - "gov", - "grondar", - "law", - "mil", - "net", - "ngo", - "nis", - "nom", - "org", - "school", - "tm", - "web", - "blogspot", - "ac", - "biz", - "co", - "com", - "edu", - "gov", - "info", - "mil", - "net", - "org", - "sch", - "lima", - "triton", - "ac", - "co", - "gov", - "mil", - "org", -} diff --git a/deps/golang.org/x/net/route/address.go b/deps/golang.org/x/net/route/address.go deleted file mode 100644 index e6bfa39e9..000000000 --- a/deps/golang.org/x/net/route/address.go +++ /dev/null @@ -1,425 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package route - -import "runtime" - -// An Addr represents an address associated with packet routing. -type Addr interface { - // Family returns an address family. - Family() int -} - -// A LinkAddr represents a link-layer address. -type LinkAddr struct { - Index int // interface index when attached - Name string // interface name when attached - Addr []byte // link-layer address when attached -} - -// Family implements the Family method of Addr interface. -func (a *LinkAddr) Family() int { return sysAF_LINK } - -func (a *LinkAddr) lenAndSpace() (int, int) { - l := 8 + len(a.Name) + len(a.Addr) - return l, roundup(l) -} - -func (a *LinkAddr) marshal(b []byte) (int, error) { - l, ll := a.lenAndSpace() - if len(b) < ll { - return 0, errShortBuffer - } - nlen, alen := len(a.Name), len(a.Addr) - if nlen > 255 || alen > 255 { - return 0, errInvalidAddr - } - b[0] = byte(l) - b[1] = sysAF_LINK - if a.Index > 0 { - nativeEndian.PutUint16(b[2:4], uint16(a.Index)) - } - data := b[8:] - if nlen > 0 { - b[5] = byte(nlen) - copy(data[:nlen], a.Addr) - data = data[nlen:] - } - if alen > 0 { - b[6] = byte(alen) - copy(data[:alen], a.Name) - data = data[alen:] - } - return ll, nil -} - -func parseLinkAddr(b []byte) (Addr, error) { - if len(b) < 8 { - return nil, errInvalidAddr - } - _, a, err := parseKernelLinkAddr(sysAF_LINK, b[4:]) - if err != nil { - return nil, err - } - a.(*LinkAddr).Index = int(nativeEndian.Uint16(b[2:4])) - return a, nil -} - -// parseKernelLinkAddr parses b as a link-layer address in -// conventional BSD kernel form. -func parseKernelLinkAddr(_ int, b []byte) (int, Addr, error) { - // The encoding looks like the following: - // +----------------------------+ - // | Type (1 octet) | - // +----------------------------+ - // | Name length (1 octet) | - // +----------------------------+ - // | Address length (1 octet) | - // +----------------------------+ - // | Selector length (1 octet) | - // +----------------------------+ - // | Data (variable) | - // +----------------------------+ - // - // On some platforms, all-bit-one of length field means "don't - // care". - nlen, alen, slen := int(b[1]), int(b[2]), int(b[3]) - if nlen == 0xff { - nlen = 0 - } - if alen == 0xff { - alen = 0 - } - if slen == 0xff { - slen = 0 - } - l := 4 + nlen + alen + slen - if len(b) < l { - return 0, nil, errInvalidAddr - } - data := b[4:] - var name string - var addr []byte - if nlen > 0 { - name = string(data[:nlen]) - data = data[nlen:] - } - if alen > 0 { - addr = data[:alen] - data = data[alen:] - } - return l, &LinkAddr{Name: name, Addr: addr}, nil -} - -// An Inet4Addr represents an internet address for IPv4. -type Inet4Addr struct { - IP [4]byte // IP address -} - -// Family implements the Family method of Addr interface. -func (a *Inet4Addr) Family() int { return sysAF_INET } - -func (a *Inet4Addr) lenAndSpace() (int, int) { - return sizeofSockaddrInet, roundup(sizeofSockaddrInet) -} - -func (a *Inet4Addr) marshal(b []byte) (int, error) { - l, ll := a.lenAndSpace() - if len(b) < ll { - return 0, errShortBuffer - } - b[0] = byte(l) - b[1] = sysAF_INET - copy(b[4:8], a.IP[:]) - return ll, nil -} - -// An Inet6Addr represents an internet address for IPv6. -type Inet6Addr struct { - IP [16]byte // IP address - ZoneID int // zone identifier -} - -// Family implements the Family method of Addr interface. -func (a *Inet6Addr) Family() int { return sysAF_INET6 } - -func (a *Inet6Addr) lenAndSpace() (int, int) { - return sizeofSockaddrInet6, roundup(sizeofSockaddrInet6) -} - -func (a *Inet6Addr) marshal(b []byte) (int, error) { - l, ll := a.lenAndSpace() - if len(b) < ll { - return 0, errShortBuffer - } - b[0] = byte(l) - b[1] = sysAF_INET6 - copy(b[8:24], a.IP[:]) - if a.ZoneID > 0 { - nativeEndian.PutUint32(b[24:28], uint32(a.ZoneID)) - } - return ll, nil -} - -// parseInetAddr parses b as an internet address for IPv4 or IPv6. -func parseInetAddr(af int, b []byte) (Addr, error) { - switch af { - case sysAF_INET: - if len(b) < sizeofSockaddrInet { - return nil, errInvalidAddr - } - a := &Inet4Addr{} - copy(a.IP[:], b[4:8]) - return a, nil - case sysAF_INET6: - if len(b) < sizeofSockaddrInet6 { - return nil, errInvalidAddr - } - a := &Inet6Addr{ZoneID: int(nativeEndian.Uint32(b[24:28]))} - copy(a.IP[:], b[8:24]) - if a.IP[0] == 0xfe && a.IP[1]&0xc0 == 0x80 || a.IP[0] == 0xff && (a.IP[1]&0x0f == 0x01 || a.IP[1]&0x0f == 0x02) { - // KAME based IPv6 protocol stack usually - // embeds the interface index in the - // interface-local or link-local address as - // the kernel-internal form. - id := int(bigEndian.Uint16(a.IP[2:4])) - if id != 0 { - a.ZoneID = id - a.IP[2], a.IP[3] = 0, 0 - } - } - return a, nil - default: - return nil, errInvalidAddr - } -} - -// parseKernelInetAddr parses b as an internet address in conventional -// BSD kernel form. -func parseKernelInetAddr(af int, b []byte) (int, Addr, error) { - // The encoding looks similar to the NLRI encoding. - // +----------------------------+ - // | Length (1 octet) | - // +----------------------------+ - // | Address prefix (variable) | - // +----------------------------+ - // - // The differences between the kernel form and the NLRI - // encoding are: - // - // - The length field of the kernel form indicates the prefix - // length in bytes, not in bits - // - // - In the kernel form, zero value of the length field - // doesn't mean 0.0.0.0/0 or ::/0 - // - // - The kernel form appends leading bytes to the prefix field - // to make the tuple to be conformed with - // the routing message boundary - l := int(b[0]) - if runtime.GOOS == "darwin" { - // On Darwn, an address in the kernel form is also - // used as a message filler. - if l == 0 || len(b) > roundup(l) { - l = roundup(l) - } - } else { - l = roundup(l) - } - if len(b) < l { - return 0, nil, errInvalidAddr - } - // Don't reorder case expressions. - // The case expressions for IPv6 must come first. - const ( - off4 = 4 // offset of in_addr - off6 = 8 // offset of in6_addr - ) - switch { - case b[0] == sizeofSockaddrInet6: - a := &Inet6Addr{} - copy(a.IP[:], b[off6:off6+16]) - return int(b[0]), a, nil - case af == sysAF_INET6: - a := &Inet6Addr{} - if l-1 < off6 { - copy(a.IP[:], b[1:l]) - } else { - copy(a.IP[:], b[l-off6:l]) - } - return int(b[0]), a, nil - case b[0] == sizeofSockaddrInet: - a := &Inet4Addr{} - copy(a.IP[:], b[off4:off4+4]) - return int(b[0]), a, nil - default: // an old fashion, AF_UNSPEC or unknown means AF_INET - a := &Inet4Addr{} - if l-1 < off4 { - copy(a.IP[:], b[1:l]) - } else { - copy(a.IP[:], b[l-off4:l]) - } - return int(b[0]), a, nil - } -} - -// A DefaultAddr represents an address of various operating -// system-specific features. -type DefaultAddr struct { - af int - Raw []byte // raw format of address -} - -// Family implements the Family method of Addr interface. -func (a *DefaultAddr) Family() int { return a.af } - -func (a *DefaultAddr) lenAndSpace() (int, int) { - l := len(a.Raw) - return l, roundup(l) -} - -func (a *DefaultAddr) marshal(b []byte) (int, error) { - l, ll := a.lenAndSpace() - if len(b) < ll { - return 0, errShortBuffer - } - if l > 255 { - return 0, errInvalidAddr - } - b[1] = byte(l) - copy(b[:l], a.Raw) - return ll, nil -} - -func parseDefaultAddr(b []byte) (Addr, error) { - if len(b) < 2 || len(b) < int(b[0]) { - return nil, errInvalidAddr - } - a := &DefaultAddr{af: int(b[1]), Raw: b[:b[0]]} - return a, nil -} - -func addrsSpace(as []Addr) int { - var l int - for _, a := range as { - switch a := a.(type) { - case *LinkAddr: - _, ll := a.lenAndSpace() - l += ll - case *Inet4Addr: - _, ll := a.lenAndSpace() - l += ll - case *Inet6Addr: - _, ll := a.lenAndSpace() - l += ll - case *DefaultAddr: - _, ll := a.lenAndSpace() - l += ll - } - } - return l -} - -// marshalAddrs marshals as and returns a bitmap indicating which -// address is stored in b. -func marshalAddrs(b []byte, as []Addr) (uint, error) { - var attrs uint - for i, a := range as { - switch a := a.(type) { - case *LinkAddr: - l, err := a.marshal(b) - if err != nil { - return 0, err - } - b = b[l:] - attrs |= 1 << uint(i) - case *Inet4Addr: - l, err := a.marshal(b) - if err != nil { - return 0, err - } - b = b[l:] - attrs |= 1 << uint(i) - case *Inet6Addr: - l, err := a.marshal(b) - if err != nil { - return 0, err - } - b = b[l:] - attrs |= 1 << uint(i) - case *DefaultAddr: - l, err := a.marshal(b) - if err != nil { - return 0, err - } - b = b[l:] - attrs |= 1 << uint(i) - } - } - return attrs, nil -} - -func parseAddrs(attrs uint, fn func(int, []byte) (int, Addr, error), b []byte) ([]Addr, error) { - var as [sysRTAX_MAX]Addr - af := int(sysAF_UNSPEC) - for i := uint(0); i < sysRTAX_MAX && len(b) >= roundup(0); i++ { - if attrs&(1<> 8) -} - -func (binaryLittleEndian) Uint32(b []byte) uint32 { - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 -} - -func (binaryLittleEndian) PutUint32(b []byte, v uint32) { - _ = b[3] // early bounds check to guarantee safety of writes below - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) -} - -func (binaryLittleEndian) Uint64(b []byte) uint64 { - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 -} - -type binaryBigEndian struct{} - -func (binaryBigEndian) Uint16(b []byte) uint16 { - _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 - return uint16(b[1]) | uint16(b[0])<<8 -} - -func (binaryBigEndian) PutUint16(b []byte, v uint16) { - _ = b[1] // early bounds check to guarantee safety of writes below - b[0] = byte(v >> 8) - b[1] = byte(v) -} - -func (binaryBigEndian) Uint32(b []byte) uint32 { - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24 -} - -func (binaryBigEndian) PutUint32(b []byte, v uint32) { - _ = b[3] // early bounds check to guarantee safety of writes below - b[0] = byte(v >> 24) - b[1] = byte(v >> 16) - b[2] = byte(v >> 8) - b[3] = byte(v) -} - -func (binaryBigEndian) Uint64(b []byte) uint64 { - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | - uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 -} diff --git a/deps/golang.org/x/net/route/defs_darwin.go b/deps/golang.org/x/net/route/defs_darwin.go deleted file mode 100644 index e7716442d..000000000 --- a/deps/golang.org/x/net/route/defs_darwin.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package route - -/* -#include -#include - -#include -#include -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_ROUTE = C.AF_ROUTE - sysAF_LINK = C.AF_LINK - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW - - sysNET_RT_DUMP = C.NET_RT_DUMP - sysNET_RT_FLAGS = C.NET_RT_FLAGS - sysNET_RT_IFLIST = C.NET_RT_IFLIST - sysNET_RT_STAT = C.NET_RT_STAT - sysNET_RT_TRASH = C.NET_RT_TRASH - sysNET_RT_IFLIST2 = C.NET_RT_IFLIST2 - sysNET_RT_DUMP2 = C.NET_RT_DUMP2 - sysNET_RT_MAXID = C.NET_RT_MAXID -) - -const ( - sysCTL_MAXNAME = C.CTL_MAXNAME - - sysCTL_UNSPEC = C.CTL_UNSPEC - sysCTL_KERN = C.CTL_KERN - sysCTL_VM = C.CTL_VM - sysCTL_VFS = C.CTL_VFS - sysCTL_NET = C.CTL_NET - sysCTL_DEBUG = C.CTL_DEBUG - sysCTL_HW = C.CTL_HW - sysCTL_MACHDEP = C.CTL_MACHDEP - sysCTL_USER = C.CTL_USER - sysCTL_MAXID = C.CTL_MAXID -) - -const ( - sysRTM_VERSION = C.RTM_VERSION - - sysRTM_ADD = C.RTM_ADD - sysRTM_DELETE = C.RTM_DELETE - sysRTM_CHANGE = C.RTM_CHANGE - sysRTM_GET = C.RTM_GET - sysRTM_LOSING = C.RTM_LOSING - sysRTM_REDIRECT = C.RTM_REDIRECT - sysRTM_MISS = C.RTM_MISS - sysRTM_LOCK = C.RTM_LOCK - sysRTM_OLDADD = C.RTM_OLDADD - sysRTM_OLDDEL = C.RTM_OLDDEL - sysRTM_RESOLVE = C.RTM_RESOLVE - sysRTM_NEWADDR = C.RTM_NEWADDR - sysRTM_DELADDR = C.RTM_DELADDR - sysRTM_IFINFO = C.RTM_IFINFO - sysRTM_NEWMADDR = C.RTM_NEWMADDR - sysRTM_DELMADDR = C.RTM_DELMADDR - sysRTM_IFINFO2 = C.RTM_IFINFO2 - sysRTM_NEWMADDR2 = C.RTM_NEWMADDR2 - sysRTM_GET2 = C.RTM_GET2 - - sysRTA_DST = C.RTA_DST - sysRTA_GATEWAY = C.RTA_GATEWAY - sysRTA_NETMASK = C.RTA_NETMASK - sysRTA_GENMASK = C.RTA_GENMASK - sysRTA_IFP = C.RTA_IFP - sysRTA_IFA = C.RTA_IFA - sysRTA_AUTHOR = C.RTA_AUTHOR - sysRTA_BRD = C.RTA_BRD - - sysRTAX_DST = C.RTAX_DST - sysRTAX_GATEWAY = C.RTAX_GATEWAY - sysRTAX_NETMASK = C.RTAX_NETMASK - sysRTAX_GENMASK = C.RTAX_GENMASK - sysRTAX_IFP = C.RTAX_IFP - sysRTAX_IFA = C.RTAX_IFA - sysRTAX_AUTHOR = C.RTAX_AUTHOR - sysRTAX_BRD = C.RTAX_BRD - sysRTAX_MAX = C.RTAX_MAX -) - -const ( - sizeofIfMsghdrDarwin15 = C.sizeof_struct_if_msghdr - sizeofIfaMsghdrDarwin15 = C.sizeof_struct_ifa_msghdr - sizeofIfmaMsghdrDarwin15 = C.sizeof_struct_ifma_msghdr - sizeofIfMsghdr2Darwin15 = C.sizeof_struct_if_msghdr2 - sizeofIfmaMsghdr2Darwin15 = C.sizeof_struct_ifma_msghdr2 - sizeofIfDataDarwin15 = C.sizeof_struct_if_data - sizeofIfData64Darwin15 = C.sizeof_struct_if_data64 - - sizeofRtMsghdrDarwin15 = C.sizeof_struct_rt_msghdr - sizeofRtMsghdr2Darwin15 = C.sizeof_struct_rt_msghdr2 - sizeofRtMetricsDarwin15 = C.sizeof_struct_rt_metrics - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/route/defs_dragonfly.go b/deps/golang.org/x/net/route/defs_dragonfly.go deleted file mode 100644 index dd31de269..000000000 --- a/deps/golang.org/x/net/route/defs_dragonfly.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package route - -/* -#include -#include - -#include -#include -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_ROUTE = C.AF_ROUTE - sysAF_LINK = C.AF_LINK - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW - - sysNET_RT_DUMP = C.NET_RT_DUMP - sysNET_RT_FLAGS = C.NET_RT_FLAGS - sysNET_RT_IFLIST = C.NET_RT_IFLIST - sysNET_RT_MAXID = C.NET_RT_MAXID -) - -const ( - sysCTL_MAXNAME = C.CTL_MAXNAME - - sysCTL_UNSPEC = C.CTL_UNSPEC - sysCTL_KERN = C.CTL_KERN - sysCTL_VM = C.CTL_VM - sysCTL_VFS = C.CTL_VFS - sysCTL_NET = C.CTL_NET - sysCTL_DEBUG = C.CTL_DEBUG - sysCTL_HW = C.CTL_HW - sysCTL_MACHDEP = C.CTL_MACHDEP - sysCTL_USER = C.CTL_USER - sysCTL_P1003_1B = C.CTL_P1003_1B - sysCTL_LWKT = C.CTL_LWKT - sysCTL_MAXID = C.CTL_MAXID -) - -const ( - sysRTM_VERSION = C.RTM_VERSION - - sysRTM_ADD = C.RTM_ADD - sysRTM_DELETE = C.RTM_DELETE - sysRTM_CHANGE = C.RTM_CHANGE - sysRTM_GET = C.RTM_GET - sysRTM_LOSING = C.RTM_LOSING - sysRTM_REDIRECT = C.RTM_REDIRECT - sysRTM_MISS = C.RTM_MISS - sysRTM_LOCK = C.RTM_LOCK - sysRTM_OLDADD = C.RTM_OLDADD - sysRTM_OLDDEL = C.RTM_OLDDEL - sysRTM_RESOLVE = C.RTM_RESOLVE - sysRTM_NEWADDR = C.RTM_NEWADDR - sysRTM_DELADDR = C.RTM_DELADDR - sysRTM_IFINFO = C.RTM_IFINFO - sysRTM_NEWMADDR = C.RTM_NEWMADDR - sysRTM_DELMADDR = C.RTM_DELMADDR - sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE - sysRTM_IEEE80211 = C.RTM_IEEE80211 - - sysRTA_DST = C.RTA_DST - sysRTA_GATEWAY = C.RTA_GATEWAY - sysRTA_NETMASK = C.RTA_NETMASK - sysRTA_GENMASK = C.RTA_GENMASK - sysRTA_IFP = C.RTA_IFP - sysRTA_IFA = C.RTA_IFA - sysRTA_AUTHOR = C.RTA_AUTHOR - sysRTA_BRD = C.RTA_BRD - sysRTA_MPLS1 = C.RTA_MPLS1 - sysRTA_MPLS2 = C.RTA_MPLS2 - sysRTA_MPLS3 = C.RTA_MPLS3 - - sysRTAX_DST = C.RTAX_DST - sysRTAX_GATEWAY = C.RTAX_GATEWAY - sysRTAX_NETMASK = C.RTAX_NETMASK - sysRTAX_GENMASK = C.RTAX_GENMASK - sysRTAX_IFP = C.RTAX_IFP - sysRTAX_IFA = C.RTAX_IFA - sysRTAX_AUTHOR = C.RTAX_AUTHOR - sysRTAX_BRD = C.RTAX_BRD - sysRTAX_MPLS1 = C.RTAX_MPLS1 - sysRTAX_MPLS2 = C.RTAX_MPLS2 - sysRTAX_MPLS3 = C.RTAX_MPLS3 - sysRTAX_MAX = C.RTAX_MAX -) - -const ( - sizeofIfMsghdrDragonFlyBSD4 = C.sizeof_struct_if_msghdr - sizeofIfaMsghdrDragonFlyBSD4 = C.sizeof_struct_ifa_msghdr - sizeofIfmaMsghdrDragonFlyBSD4 = C.sizeof_struct_ifma_msghdr - sizeofIfAnnouncemsghdrDragonFlyBSD4 = C.sizeof_struct_if_announcemsghdr - - sizeofRtMsghdrDragonFlyBSD4 = C.sizeof_struct_rt_msghdr - sizeofRtMetricsDragonFlyBSD4 = C.sizeof_struct_rt_metrics - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/route/defs_freebsd.go b/deps/golang.org/x/net/route/defs_freebsd.go deleted file mode 100644 index d95594d8e..000000000 --- a/deps/golang.org/x/net/route/defs_freebsd.go +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package route - -/* -#include -#include - -#include -#include -#include - -#include - -struct if_data_freebsd7 { - u_char ifi_type; - u_char ifi_physical; - u_char ifi_addrlen; - u_char ifi_hdrlen; - u_char ifi_link_state; - u_char ifi_spare_char1; - u_char ifi_spare_char2; - u_char ifi_datalen; - u_long ifi_mtu; - u_long ifi_metric; - u_long ifi_baudrate; - u_long ifi_ipackets; - u_long ifi_ierrors; - u_long ifi_opackets; - u_long ifi_oerrors; - u_long ifi_collisions; - u_long ifi_ibytes; - u_long ifi_obytes; - u_long ifi_imcasts; - u_long ifi_omcasts; - u_long ifi_iqdrops; - u_long ifi_noproto; - u_long ifi_hwassist; - time_t __ifi_epoch; - struct timeval __ifi_lastchange; -}; - -struct if_data_freebsd8 { - u_char ifi_type; - u_char ifi_physical; - u_char ifi_addrlen; - u_char ifi_hdrlen; - u_char ifi_link_state; - u_char ifi_spare_char1; - u_char ifi_spare_char2; - u_char ifi_datalen; - u_long ifi_mtu; - u_long ifi_metric; - u_long ifi_baudrate; - u_long ifi_ipackets; - u_long ifi_ierrors; - u_long ifi_opackets; - u_long ifi_oerrors; - u_long ifi_collisions; - u_long ifi_ibytes; - u_long ifi_obytes; - u_long ifi_imcasts; - u_long ifi_omcasts; - u_long ifi_iqdrops; - u_long ifi_noproto; - u_long ifi_hwassist; - time_t __ifi_epoch; - struct timeval __ifi_lastchange; -}; - -struct if_data_freebsd9 { - u_char ifi_type; - u_char ifi_physical; - u_char ifi_addrlen; - u_char ifi_hdrlen; - u_char ifi_link_state; - u_char ifi_spare_char1; - u_char ifi_spare_char2; - u_char ifi_datalen; - u_long ifi_mtu; - u_long ifi_metric; - u_long ifi_baudrate; - u_long ifi_ipackets; - u_long ifi_ierrors; - u_long ifi_opackets; - u_long ifi_oerrors; - u_long ifi_collisions; - u_long ifi_ibytes; - u_long ifi_obytes; - u_long ifi_imcasts; - u_long ifi_omcasts; - u_long ifi_iqdrops; - u_long ifi_noproto; - u_long ifi_hwassist; - time_t __ifi_epoch; - struct timeval __ifi_lastchange; -}; - -struct if_data_freebsd10 { - u_char ifi_type; - u_char ifi_physical; - u_char ifi_addrlen; - u_char ifi_hdrlen; - u_char ifi_link_state; - u_char ifi_vhid; - u_char ifi_baudrate_pf; - u_char ifi_datalen; - u_long ifi_mtu; - u_long ifi_metric; - u_long ifi_baudrate; - u_long ifi_ipackets; - u_long ifi_ierrors; - u_long ifi_opackets; - u_long ifi_oerrors; - u_long ifi_collisions; - u_long ifi_ibytes; - u_long ifi_obytes; - u_long ifi_imcasts; - u_long ifi_omcasts; - u_long ifi_iqdrops; - u_long ifi_noproto; - uint64_t ifi_hwassist; - time_t __ifi_epoch; - struct timeval __ifi_lastchange; -}; - -struct if_data_freebsd11 { - uint8_t ifi_type; - uint8_t ifi_physical; - uint8_t ifi_addrlen; - uint8_t ifi_hdrlen; - uint8_t ifi_link_state; - uint8_t ifi_vhid; - uint16_t ifi_datalen; - uint32_t ifi_mtu; - uint32_t ifi_metric; - uint64_t ifi_baudrate; - uint64_t ifi_ipackets; - uint64_t ifi_ierrors; - uint64_t ifi_opackets; - uint64_t ifi_oerrors; - uint64_t ifi_collisions; - uint64_t ifi_ibytes; - uint64_t ifi_obytes; - uint64_t ifi_imcasts; - uint64_t ifi_omcasts; - uint64_t ifi_iqdrops; - uint64_t ifi_oqdrops; - uint64_t ifi_noproto; - uint64_t ifi_hwassist; - union { - time_t tt; - uint64_t ph; - } __ifi_epoch; - union { - struct timeval tv; - struct { - uint64_t ph1; - uint64_t ph2; - } ph; - } __ifi_lastchange; -}; - -struct if_msghdr_freebsd7 { - u_short ifm_msglen; - u_char ifm_version; - u_char ifm_type; - int ifm_addrs; - int ifm_flags; - u_short ifm_index; - struct if_data_freebsd7 ifm_data; -}; - -struct if_msghdr_freebsd8 { - u_short ifm_msglen; - u_char ifm_version; - u_char ifm_type; - int ifm_addrs; - int ifm_flags; - u_short ifm_index; - struct if_data_freebsd8 ifm_data; -}; - -struct if_msghdr_freebsd9 { - u_short ifm_msglen; - u_char ifm_version; - u_char ifm_type; - int ifm_addrs; - int ifm_flags; - u_short ifm_index; - struct if_data_freebsd9 ifm_data; -}; - -struct if_msghdr_freebsd10 { - u_short ifm_msglen; - u_char ifm_version; - u_char ifm_type; - int ifm_addrs; - int ifm_flags; - u_short ifm_index; - struct if_data_freebsd10 ifm_data; -}; - -struct if_msghdr_freebsd11 { - u_short ifm_msglen; - u_char ifm_version; - u_char ifm_type; - int ifm_addrs; - int ifm_flags; - u_short ifm_index; - struct if_data_freebsd11 ifm_data; -}; -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_ROUTE = C.AF_ROUTE - sysAF_LINK = C.AF_LINK - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW - - sysNET_RT_DUMP = C.NET_RT_DUMP - sysNET_RT_FLAGS = C.NET_RT_FLAGS - sysNET_RT_IFLIST = C.NET_RT_IFLIST - sysNET_RT_IFMALIST = C.NET_RT_IFMALIST - sysNET_RT_IFLISTL = C.NET_RT_IFLISTL -) - -const ( - sysCTL_MAXNAME = C.CTL_MAXNAME - - sysCTL_UNSPEC = C.CTL_UNSPEC - sysCTL_KERN = C.CTL_KERN - sysCTL_VM = C.CTL_VM - sysCTL_VFS = C.CTL_VFS - sysCTL_NET = C.CTL_NET - sysCTL_DEBUG = C.CTL_DEBUG - sysCTL_HW = C.CTL_HW - sysCTL_MACHDEP = C.CTL_MACHDEP - sysCTL_USER = C.CTL_USER - sysCTL_P1003_1B = C.CTL_P1003_1B -) - -const ( - sysRTM_VERSION = C.RTM_VERSION - - sysRTM_ADD = C.RTM_ADD - sysRTM_DELETE = C.RTM_DELETE - sysRTM_CHANGE = C.RTM_CHANGE - sysRTM_GET = C.RTM_GET - sysRTM_LOSING = C.RTM_LOSING - sysRTM_REDIRECT = C.RTM_REDIRECT - sysRTM_MISS = C.RTM_MISS - sysRTM_LOCK = C.RTM_LOCK - sysRTM_RESOLVE = C.RTM_RESOLVE - sysRTM_NEWADDR = C.RTM_NEWADDR - sysRTM_DELADDR = C.RTM_DELADDR - sysRTM_IFINFO = C.RTM_IFINFO - sysRTM_NEWMADDR = C.RTM_NEWMADDR - sysRTM_DELMADDR = C.RTM_DELMADDR - sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE - sysRTM_IEEE80211 = C.RTM_IEEE80211 - - sysRTA_DST = C.RTA_DST - sysRTA_GATEWAY = C.RTA_GATEWAY - sysRTA_NETMASK = C.RTA_NETMASK - sysRTA_GENMASK = C.RTA_GENMASK - sysRTA_IFP = C.RTA_IFP - sysRTA_IFA = C.RTA_IFA - sysRTA_AUTHOR = C.RTA_AUTHOR - sysRTA_BRD = C.RTA_BRD - - sysRTAX_DST = C.RTAX_DST - sysRTAX_GATEWAY = C.RTAX_GATEWAY - sysRTAX_NETMASK = C.RTAX_NETMASK - sysRTAX_GENMASK = C.RTAX_GENMASK - sysRTAX_IFP = C.RTAX_IFP - sysRTAX_IFA = C.RTAX_IFA - sysRTAX_AUTHOR = C.RTAX_AUTHOR - sysRTAX_BRD = C.RTAX_BRD - sysRTAX_MAX = C.RTAX_MAX -) - -const ( - sizeofIfMsghdrlFreeBSD10 = C.sizeof_struct_if_msghdrl - sizeofIfaMsghdrFreeBSD10 = C.sizeof_struct_ifa_msghdr - sizeofIfaMsghdrlFreeBSD10 = C.sizeof_struct_ifa_msghdrl - sizeofIfmaMsghdrFreeBSD10 = C.sizeof_struct_ifma_msghdr - sizeofIfAnnouncemsghdrFreeBSD10 = C.sizeof_struct_if_announcemsghdr - - sizeofRtMsghdrFreeBSD10 = C.sizeof_struct_rt_msghdr - sizeofRtMetricsFreeBSD10 = C.sizeof_struct_rt_metrics - - sizeofIfMsghdrFreeBSD7 = C.sizeof_struct_if_msghdr_freebsd7 - sizeofIfMsghdrFreeBSD8 = C.sizeof_struct_if_msghdr_freebsd8 - sizeofIfMsghdrFreeBSD9 = C.sizeof_struct_if_msghdr_freebsd9 - sizeofIfMsghdrFreeBSD10 = C.sizeof_struct_if_msghdr_freebsd10 - sizeofIfMsghdrFreeBSD11 = C.sizeof_struct_if_msghdr_freebsd11 - - sizeofIfDataFreeBSD7 = C.sizeof_struct_if_data_freebsd7 - sizeofIfDataFreeBSD8 = C.sizeof_struct_if_data_freebsd8 - sizeofIfDataFreeBSD9 = C.sizeof_struct_if_data_freebsd9 - sizeofIfDataFreeBSD10 = C.sizeof_struct_if_data_freebsd10 - sizeofIfDataFreeBSD11 = C.sizeof_struct_if_data_freebsd11 - - sizeofIfMsghdrlFreeBSD10Emu = C.sizeof_struct_if_msghdrl - sizeofIfaMsghdrFreeBSD10Emu = C.sizeof_struct_ifa_msghdr - sizeofIfaMsghdrlFreeBSD10Emu = C.sizeof_struct_ifa_msghdrl - sizeofIfmaMsghdrFreeBSD10Emu = C.sizeof_struct_ifma_msghdr - sizeofIfAnnouncemsghdrFreeBSD10Emu = C.sizeof_struct_if_announcemsghdr - - sizeofRtMsghdrFreeBSD10Emu = C.sizeof_struct_rt_msghdr - sizeofRtMetricsFreeBSD10Emu = C.sizeof_struct_rt_metrics - - sizeofIfMsghdrFreeBSD7Emu = C.sizeof_struct_if_msghdr_freebsd7 - sizeofIfMsghdrFreeBSD8Emu = C.sizeof_struct_if_msghdr_freebsd8 - sizeofIfMsghdrFreeBSD9Emu = C.sizeof_struct_if_msghdr_freebsd9 - sizeofIfMsghdrFreeBSD10Emu = C.sizeof_struct_if_msghdr_freebsd10 - sizeofIfMsghdrFreeBSD11Emu = C.sizeof_struct_if_msghdr_freebsd11 - - sizeofIfDataFreeBSD7Emu = C.sizeof_struct_if_data_freebsd7 - sizeofIfDataFreeBSD8Emu = C.sizeof_struct_if_data_freebsd8 - sizeofIfDataFreeBSD9Emu = C.sizeof_struct_if_data_freebsd9 - sizeofIfDataFreeBSD10Emu = C.sizeof_struct_if_data_freebsd10 - sizeofIfDataFreeBSD11Emu = C.sizeof_struct_if_data_freebsd11 - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/route/defs_netbsd.go b/deps/golang.org/x/net/route/defs_netbsd.go deleted file mode 100644 index b0abd549a..000000000 --- a/deps/golang.org/x/net/route/defs_netbsd.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package route - -/* -#include -#include - -#include -#include -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_ROUTE = C.AF_ROUTE - sysAF_LINK = C.AF_LINK - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW - - sysNET_RT_DUMP = C.NET_RT_DUMP - sysNET_RT_FLAGS = C.NET_RT_FLAGS - sysNET_RT_IFLIST = C.NET_RT_IFLIST - sysNET_RT_MAXID = C.NET_RT_MAXID -) - -const ( - sysCTL_MAXNAME = C.CTL_MAXNAME - - sysCTL_UNSPEC = C.CTL_UNSPEC - sysCTL_KERN = C.CTL_KERN - sysCTL_VM = C.CTL_VM - sysCTL_VFS = C.CTL_VFS - sysCTL_NET = C.CTL_NET - sysCTL_DEBUG = C.CTL_DEBUG - sysCTL_HW = C.CTL_HW - sysCTL_MACHDEP = C.CTL_MACHDEP - sysCTL_USER = C.CTL_USER - sysCTL_DDB = C.CTL_DDB - sysCTL_PROC = C.CTL_PROC - sysCTL_VENDOR = C.CTL_VENDOR - sysCTL_EMUL = C.CTL_EMUL - sysCTL_SECURITY = C.CTL_SECURITY - sysCTL_MAXID = C.CTL_MAXID -) - -const ( - sysRTM_VERSION = C.RTM_VERSION - - sysRTM_ADD = C.RTM_ADD - sysRTM_DELETE = C.RTM_DELETE - sysRTM_CHANGE = C.RTM_CHANGE - sysRTM_GET = C.RTM_GET - sysRTM_LOSING = C.RTM_LOSING - sysRTM_REDIRECT = C.RTM_REDIRECT - sysRTM_MISS = C.RTM_MISS - sysRTM_LOCK = C.RTM_LOCK - sysRTM_OLDADD = C.RTM_OLDADD - sysRTM_OLDDEL = C.RTM_OLDDEL - sysRTM_RESOLVE = C.RTM_RESOLVE - sysRTM_NEWADDR = C.RTM_NEWADDR - sysRTM_DELADDR = C.RTM_DELADDR - sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE - sysRTM_IEEE80211 = C.RTM_IEEE80211 - sysRTM_SETGATE = C.RTM_SETGATE - sysRTM_LLINFO_UPD = C.RTM_LLINFO_UPD - sysRTM_IFINFO = C.RTM_IFINFO - sysRTM_CHGADDR = C.RTM_CHGADDR - - sysRTA_DST = C.RTA_DST - sysRTA_GATEWAY = C.RTA_GATEWAY - sysRTA_NETMASK = C.RTA_NETMASK - sysRTA_GENMASK = C.RTA_GENMASK - sysRTA_IFP = C.RTA_IFP - sysRTA_IFA = C.RTA_IFA - sysRTA_AUTHOR = C.RTA_AUTHOR - sysRTA_BRD = C.RTA_BRD - sysRTA_TAG = C.RTA_TAG - - sysRTAX_DST = C.RTAX_DST - sysRTAX_GATEWAY = C.RTAX_GATEWAY - sysRTAX_NETMASK = C.RTAX_NETMASK - sysRTAX_GENMASK = C.RTAX_GENMASK - sysRTAX_IFP = C.RTAX_IFP - sysRTAX_IFA = C.RTAX_IFA - sysRTAX_AUTHOR = C.RTAX_AUTHOR - sysRTAX_BRD = C.RTAX_BRD - sysRTAX_TAG = C.RTAX_TAG - sysRTAX_MAX = C.RTAX_MAX -) - -const ( - sizeofIfMsghdrNetBSD7 = C.sizeof_struct_if_msghdr - sizeofIfaMsghdrNetBSD7 = C.sizeof_struct_ifa_msghdr - sizeofIfAnnouncemsghdrNetBSD7 = C.sizeof_struct_if_announcemsghdr - - sizeofRtMsghdrNetBSD7 = C.sizeof_struct_rt_msghdr - sizeofRtMetricsNetBSD7 = C.sizeof_struct_rt_metrics - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/route/defs_openbsd.go b/deps/golang.org/x/net/route/defs_openbsd.go deleted file mode 100644 index 173bb5d51..000000000 --- a/deps/golang.org/x/net/route/defs_openbsd.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package route - -/* -#include -#include - -#include -#include -#include - -#include -*/ -import "C" - -const ( - sysAF_UNSPEC = C.AF_UNSPEC - sysAF_INET = C.AF_INET - sysAF_ROUTE = C.AF_ROUTE - sysAF_LINK = C.AF_LINK - sysAF_INET6 = C.AF_INET6 - - sysSOCK_RAW = C.SOCK_RAW - - sysNET_RT_DUMP = C.NET_RT_DUMP - sysNET_RT_FLAGS = C.NET_RT_FLAGS - sysNET_RT_IFLIST = C.NET_RT_IFLIST - sysNET_RT_STATS = C.NET_RT_STATS - sysNET_RT_TABLE = C.NET_RT_TABLE - sysNET_RT_IFNAMES = C.NET_RT_IFNAMES - sysNET_RT_MAXID = C.NET_RT_MAXID -) - -const ( - sysCTL_MAXNAME = C.CTL_MAXNAME - - sysCTL_UNSPEC = C.CTL_UNSPEC - sysCTL_KERN = C.CTL_KERN - sysCTL_VM = C.CTL_VM - sysCTL_FS = C.CTL_FS - sysCTL_NET = C.CTL_NET - sysCTL_DEBUG = C.CTL_DEBUG - sysCTL_HW = C.CTL_HW - sysCTL_MACHDEP = C.CTL_MACHDEP - sysCTL_DDB = C.CTL_DDB - sysCTL_VFS = C.CTL_VFS - sysCTL_MAXID = C.CTL_MAXID -) - -const ( - sysRTM_VERSION = C.RTM_VERSION - - sysRTM_ADD = C.RTM_ADD - sysRTM_DELETE = C.RTM_DELETE - sysRTM_CHANGE = C.RTM_CHANGE - sysRTM_GET = C.RTM_GET - sysRTM_LOSING = C.RTM_LOSING - sysRTM_REDIRECT = C.RTM_REDIRECT - sysRTM_MISS = C.RTM_MISS - sysRTM_LOCK = C.RTM_LOCK - sysRTM_RESOLVE = C.RTM_RESOLVE - sysRTM_NEWADDR = C.RTM_NEWADDR - sysRTM_DELADDR = C.RTM_DELADDR - sysRTM_IFINFO = C.RTM_IFINFO - sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE - sysRTM_DESYNC = C.RTM_DESYNC - sysRTM_INVALIDATE = C.RTM_INVALIDATE - sysRTM_BFD = C.RTM_BFD - sysRTM_PROPOSAL = C.RTM_PROPOSAL - - sysRTA_DST = C.RTA_DST - sysRTA_GATEWAY = C.RTA_GATEWAY - sysRTA_NETMASK = C.RTA_NETMASK - sysRTA_GENMASK = C.RTA_GENMASK - sysRTA_IFP = C.RTA_IFP - sysRTA_IFA = C.RTA_IFA - sysRTA_AUTHOR = C.RTA_AUTHOR - sysRTA_BRD = C.RTA_BRD - sysRTA_SRC = C.RTA_SRC - sysRTA_SRCMASK = C.RTA_SRCMASK - sysRTA_LABEL = C.RTA_LABEL - sysRTA_BFD = C.RTA_BFD - sysRTA_DNS = C.RTA_DNS - sysRTA_STATIC = C.RTA_STATIC - sysRTA_SEARCH = C.RTA_SEARCH - - sysRTAX_DST = C.RTAX_DST - sysRTAX_GATEWAY = C.RTAX_GATEWAY - sysRTAX_NETMASK = C.RTAX_NETMASK - sysRTAX_GENMASK = C.RTAX_GENMASK - sysRTAX_IFP = C.RTAX_IFP - sysRTAX_IFA = C.RTAX_IFA - sysRTAX_AUTHOR = C.RTAX_AUTHOR - sysRTAX_BRD = C.RTAX_BRD - sysRTAX_SRC = C.RTAX_SRC - sysRTAX_SRCMASK = C.RTAX_SRCMASK - sysRTAX_LABEL = C.RTAX_LABEL - sysRTAX_BFD = C.RTAX_BFD - sysRTAX_DNS = C.RTAX_DNS - sysRTAX_STATIC = C.RTAX_STATIC - sysRTAX_SEARCH = C.RTAX_SEARCH - sysRTAX_MAX = C.RTAX_MAX -) - -const ( - sizeofRtMsghdr = C.sizeof_struct_rt_msghdr - - sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage - sizeofSockaddrInet = C.sizeof_struct_sockaddr_in - sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 -) diff --git a/deps/golang.org/x/net/route/interface.go b/deps/golang.org/x/net/route/interface.go deleted file mode 100644 index 854906d9c..000000000 --- a/deps/golang.org/x/net/route/interface.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package route - -// An InterfaceMessage represents an interface message. -type InterfaceMessage struct { - Version int // message version - Type int // message type - Flags int // interface flags - Index int // interface index - Name string // interface name - Addrs []Addr // addresses - - extOff int // offset of header extension - raw []byte // raw message -} - -// An InterfaceAddrMessage represents an interface address message. -type InterfaceAddrMessage struct { - Version int // message version - Type int // message type - Flags int // interface flags - Index int // interface index - Addrs []Addr // addresses - - raw []byte // raw message -} - -// Sys implements the Sys method of Message interface. -func (m *InterfaceAddrMessage) Sys() []Sys { return nil } - -// An InterfaceMulticastAddrMessage represents an interface multicast -// address message. -type InterfaceMulticastAddrMessage struct { - Version int // message version - Type int // messsage type - Flags int // interface flags - Index int // interface index - Addrs []Addr // addresses - - raw []byte // raw message -} - -// Sys implements the Sys method of Message interface. -func (m *InterfaceMulticastAddrMessage) Sys() []Sys { return nil } - -// An InterfaceAnnounceMessage represents an interface announcement -// message. -type InterfaceAnnounceMessage struct { - Version int // message version - Type int // message type - Index int // interface index - Name string // interface name - What int // what type of announcement - - raw []byte // raw message -} - -// Sys implements the Sys method of Message interface. -func (m *InterfaceAnnounceMessage) Sys() []Sys { return nil } diff --git a/deps/golang.org/x/net/route/interface_announce.go b/deps/golang.org/x/net/route/interface_announce.go deleted file mode 100644 index 520d657b5..000000000 --- a/deps/golang.org/x/net/route/interface_announce.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build dragonfly freebsd netbsd - -package route - -func (w *wireFormat) parseInterfaceAnnounceMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < w.bodyOff { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - m := &InterfaceAnnounceMessage{ - Version: int(b[2]), - Type: int(b[3]), - Index: int(nativeEndian.Uint16(b[4:6])), - What: int(nativeEndian.Uint16(b[22:24])), - raw: b[:l], - } - for i := 0; i < 16; i++ { - if b[6+i] != 0 { - continue - } - m.Name = string(b[6 : 6+i]) - break - } - return m, nil -} diff --git a/deps/golang.org/x/net/route/interface_classic.go b/deps/golang.org/x/net/route/interface_classic.go deleted file mode 100644 index ac4e7a680..000000000 --- a/deps/golang.org/x/net/route/interface_classic.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly netbsd - -package route - -import "runtime" - -func (w *wireFormat) parseInterfaceMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < w.bodyOff { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - attrs := uint(nativeEndian.Uint32(b[4:8])) - if attrs&sysRTA_IFP == 0 { - return nil, nil - } - m := &InterfaceMessage{ - Version: int(b[2]), - Type: int(b[3]), - Addrs: make([]Addr, sysRTAX_MAX), - Flags: int(nativeEndian.Uint32(b[8:12])), - Index: int(nativeEndian.Uint16(b[12:14])), - extOff: w.extOff, - raw: b[:l], - } - a, err := parseLinkAddr(b[w.bodyOff:]) - if err != nil { - return nil, err - } - m.Addrs[sysRTAX_IFP] = a - m.Name = a.(*LinkAddr).Name - return m, nil -} - -func (w *wireFormat) parseInterfaceAddrMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < w.bodyOff { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - m := &InterfaceAddrMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[8:12])), - raw: b[:l], - } - if runtime.GOOS == "netbsd" { - m.Index = int(nativeEndian.Uint16(b[16:18])) - } else { - m.Index = int(nativeEndian.Uint16(b[12:14])) - } - var err error - m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[4:8])), parseKernelInetAddr, b[w.bodyOff:]) - if err != nil { - return nil, err - } - return m, nil -} diff --git a/deps/golang.org/x/net/route/interface_freebsd.go b/deps/golang.org/x/net/route/interface_freebsd.go deleted file mode 100644 index 9f6f50c00..000000000 --- a/deps/golang.org/x/net/route/interface_freebsd.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -func (w *wireFormat) parseInterfaceMessage(typ RIBType, b []byte) (Message, error) { - var extOff, bodyOff int - if typ == sysNET_RT_IFLISTL { - if len(b) < 20 { - return nil, errMessageTooShort - } - extOff = int(nativeEndian.Uint16(b[18:20])) - bodyOff = int(nativeEndian.Uint16(b[16:18])) - } else { - extOff = w.extOff - bodyOff = w.bodyOff - } - if len(b) < extOff || len(b) < bodyOff { - return nil, errInvalidMessage - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - attrs := uint(nativeEndian.Uint32(b[4:8])) - if attrs&sysRTA_IFP == 0 { - return nil, nil - } - m := &InterfaceMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[8:12])), - Index: int(nativeEndian.Uint16(b[12:14])), - Addrs: make([]Addr, sysRTAX_MAX), - extOff: extOff, - raw: b[:l], - } - a, err := parseLinkAddr(b[bodyOff:]) - if err != nil { - return nil, err - } - m.Addrs[sysRTAX_IFP] = a - m.Name = a.(*LinkAddr).Name - return m, nil -} - -func (w *wireFormat) parseInterfaceAddrMessage(typ RIBType, b []byte) (Message, error) { - var bodyOff int - if typ == sysNET_RT_IFLISTL { - if len(b) < 24 { - return nil, errMessageTooShort - } - bodyOff = int(nativeEndian.Uint16(b[16:18])) - } else { - bodyOff = w.bodyOff - } - if len(b) < bodyOff { - return nil, errInvalidMessage - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - m := &InterfaceAddrMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[8:12])), - Index: int(nativeEndian.Uint16(b[12:14])), - raw: b[:l], - } - var err error - m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[4:8])), parseKernelInetAddr, b[bodyOff:]) - if err != nil { - return nil, err - } - return m, nil -} diff --git a/deps/golang.org/x/net/route/interface_multicast.go b/deps/golang.org/x/net/route/interface_multicast.go deleted file mode 100644 index 1e99a9cc6..000000000 --- a/deps/golang.org/x/net/route/interface_multicast.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd - -package route - -func (w *wireFormat) parseInterfaceMulticastAddrMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < w.bodyOff { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - m := &InterfaceMulticastAddrMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[8:12])), - Index: int(nativeEndian.Uint16(b[12:14])), - raw: b[:l], - } - var err error - m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[4:8])), parseKernelInetAddr, b[w.bodyOff:]) - if err != nil { - return nil, err - } - return m, nil -} diff --git a/deps/golang.org/x/net/route/interface_openbsd.go b/deps/golang.org/x/net/route/interface_openbsd.go deleted file mode 100644 index e4a143c1c..000000000 --- a/deps/golang.org/x/net/route/interface_openbsd.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -func (*wireFormat) parseInterfaceMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < 32 { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - attrs := uint(nativeEndian.Uint32(b[12:16])) - if attrs&sysRTA_IFP == 0 { - return nil, nil - } - m := &InterfaceMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[16:20])), - Index: int(nativeEndian.Uint16(b[6:8])), - Addrs: make([]Addr, sysRTAX_MAX), - raw: b[:l], - } - ll := int(nativeEndian.Uint16(b[4:6])) - if len(b) < ll { - return nil, errInvalidMessage - } - a, err := parseLinkAddr(b[ll:]) - if err != nil { - return nil, err - } - m.Addrs[sysRTAX_IFP] = a - m.Name = a.(*LinkAddr).Name - return m, nil -} - -func (*wireFormat) parseInterfaceAddrMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < 24 { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - bodyOff := int(nativeEndian.Uint16(b[4:6])) - if len(b) < bodyOff { - return nil, errInvalidMessage - } - m := &InterfaceAddrMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[12:16])), - Index: int(nativeEndian.Uint16(b[6:8])), - raw: b[:l], - } - var err error - m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[bodyOff:]) - if err != nil { - return nil, err - } - return m, nil -} - -func (*wireFormat) parseInterfaceAnnounceMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < 26 { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - m := &InterfaceAnnounceMessage{ - Version: int(b[2]), - Type: int(b[3]), - Index: int(nativeEndian.Uint16(b[6:8])), - What: int(nativeEndian.Uint16(b[8:10])), - raw: b[:l], - } - for i := 0; i < 16; i++ { - if b[10+i] != 0 { - continue - } - m.Name = string(b[10 : 10+i]) - break - } - return m, nil -} diff --git a/deps/golang.org/x/net/route/message.go b/deps/golang.org/x/net/route/message.go deleted file mode 100644 index 0fa7e09f4..000000000 --- a/deps/golang.org/x/net/route/message.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package route - -// A Message represents a routing message. -type Message interface { - // Sys returns operating system-specific information. - Sys() []Sys -} - -// A Sys reprensents operating system-specific information. -type Sys interface { - // SysType returns a type of operating system-specific - // information. - SysType() SysType -} - -// A SysType represents a type of operating system-specific -// information. -type SysType int - -const ( - SysMetrics SysType = iota - SysStats -) - -// ParseRIB parses b as a routing information base and returns a list -// of routing messages. -func ParseRIB(typ RIBType, b []byte) ([]Message, error) { - if !typ.parseable() { - return nil, errUnsupportedMessage - } - var msgs []Message - nmsgs, nskips := 0, 0 - for len(b) > 4 { - nmsgs++ - l := int(nativeEndian.Uint16(b[:2])) - if l == 0 { - return nil, errInvalidMessage - } - if len(b) < l { - return nil, errMessageTooShort - } - if b[2] != sysRTM_VERSION { - b = b[l:] - continue - } - if w, ok := wireFormats[int(b[3])]; !ok { - nskips++ - } else { - m, err := w.parse(typ, b) - if err != nil { - return nil, err - } - if m == nil { - nskips++ - } else { - msgs = append(msgs, m) - } - } - b = b[l:] - } - // We failed to parse any of the messages - version mismatch? - if nmsgs != len(msgs)+nskips { - return nil, errMessageMismatch - } - return msgs, nil -} diff --git a/deps/golang.org/x/net/route/message_darwin_test.go b/deps/golang.org/x/net/route/message_darwin_test.go deleted file mode 100644 index 316aa7507..000000000 --- a/deps/golang.org/x/net/route/message_darwin_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -import "testing" - -func TestFetchAndParseRIBOnDarwin(t *testing.T) { - for _, typ := range []RIBType{sysNET_RT_FLAGS, sysNET_RT_DUMP2, sysNET_RT_IFLIST2} { - var lastErr error - var ms []Message - for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} { - rs, err := fetchAndParseRIB(af, typ) - if err != nil { - lastErr = err - continue - } - ms = append(ms, rs...) - } - if len(ms) == 0 && lastErr != nil { - t.Error(typ, lastErr) - continue - } - ss, err := msgs(ms).validate() - if err != nil { - t.Error(typ, err) - continue - } - for _, s := range ss { - t.Log(s) - } - } -} diff --git a/deps/golang.org/x/net/route/message_freebsd_test.go b/deps/golang.org/x/net/route/message_freebsd_test.go deleted file mode 100644 index db4b56752..000000000 --- a/deps/golang.org/x/net/route/message_freebsd_test.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -import ( - "testing" - "unsafe" -) - -func TestFetchAndParseRIBOnFreeBSD(t *testing.T) { - for _, typ := range []RIBType{sysNET_RT_IFMALIST} { - var lastErr error - var ms []Message - for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} { - rs, err := fetchAndParseRIB(af, typ) - if err != nil { - lastErr = err - continue - } - ms = append(ms, rs...) - } - if len(ms) == 0 && lastErr != nil { - t.Error(typ, lastErr) - continue - } - ss, err := msgs(ms).validate() - if err != nil { - t.Error(typ, err) - continue - } - for _, s := range ss { - t.Log(s) - } - } -} - -func TestFetchAndParseRIBOnFreeBSD10AndAbove(t *testing.T) { - if _, err := FetchRIB(sysAF_UNSPEC, sysNET_RT_IFLISTL, 0); err != nil { - t.Skip("NET_RT_IFLISTL not supported") - } - var p uintptr - if kernelAlign != int(unsafe.Sizeof(p)) { - t.Skip("NET_RT_IFLIST vs. NET_RT_IFLISTL doesn't work for 386 emulation on amd64") - } - - var tests = [2]struct { - typ RIBType - b []byte - msgs []Message - ss []string - }{ - {typ: sysNET_RT_IFLIST}, - {typ: sysNET_RT_IFLISTL}, - } - for i := range tests { - var lastErr error - for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} { - rs, err := fetchAndParseRIB(af, tests[i].typ) - if err != nil { - lastErr = err - continue - } - tests[i].msgs = append(tests[i].msgs, rs...) - } - if len(tests[i].msgs) == 0 && lastErr != nil { - t.Error(tests[i].typ, lastErr) - continue - } - tests[i].ss, lastErr = msgs(tests[i].msgs).validate() - if lastErr != nil { - t.Error(tests[i].typ, lastErr) - continue - } - for _, s := range tests[i].ss { - t.Log(s) - } - } - for i := len(tests) - 1; i > 0; i-- { - if len(tests[i].ss) != len(tests[i-1].ss) { - t.Errorf("got %v; want %v", tests[i].ss, tests[i-1].ss) - continue - } - for j, s1 := range tests[i].ss { - s0 := tests[i-1].ss[j] - if s1 != s0 { - t.Errorf("got %s; want %s", s1, s0) - } - } - } -} diff --git a/deps/golang.org/x/net/route/message_test.go b/deps/golang.org/x/net/route/message_test.go deleted file mode 100644 index e848dabf4..000000000 --- a/deps/golang.org/x/net/route/message_test.go +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package route - -import ( - "os" - "syscall" - "testing" - "time" -) - -func TestFetchAndParseRIB(t *testing.T) { - for _, typ := range []RIBType{sysNET_RT_DUMP, sysNET_RT_IFLIST} { - var lastErr error - var ms []Message - for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} { - rs, err := fetchAndParseRIB(af, typ) - if err != nil { - lastErr = err - continue - } - ms = append(ms, rs...) - } - if len(ms) == 0 && lastErr != nil { - t.Error(typ, lastErr) - continue - } - ss, err := msgs(ms).validate() - if err != nil { - t.Error(typ, err) - continue - } - for _, s := range ss { - t.Log(typ, s) - } - } -} - -var ( - rtmonSock int - rtmonErr error -) - -func init() { - // We need to keep rtmonSock alive to avoid treading on - // recycled socket descriptors. - rtmonSock, rtmonErr = syscall.Socket(sysAF_ROUTE, sysSOCK_RAW, sysAF_UNSPEC) -} - -// TestMonitorAndParseRIB leaks a worker goroutine and a socket -// descriptor but that's intentional. -func TestMonitorAndParseRIB(t *testing.T) { - if testing.Short() || os.Getuid() != 0 { - t.Skip("must be root") - } - - if rtmonErr != nil { - t.Fatal(rtmonErr) - } - - // We suppose that using an IPv4 link-local address and the - // dot1Q ID for Token Ring and FDDI doesn't harm anyone. - pv := &propVirtual{addr: "169.254.0.1", mask: "255.255.255.0"} - if err := pv.configure(1002); err != nil { - t.Skip(err) - } - if err := pv.setup(); err != nil { - t.Skip(err) - } - pv.teardown() - - go func() { - b := make([]byte, os.Getpagesize()) - for { - // There's no easy way to unblock this read - // call because the routing message exchange - // over routing socket is a connectionless - // message-oriented protocol, no control plane - // for signaling connectivity, and we cannot - // use the net package of standard library due - // to the lack of support for routing socket - // and circular dependency. - n, err := syscall.Read(rtmonSock, b) - if err != nil { - return - } - ms, err := ParseRIB(0, b[:n]) - if err != nil { - t.Error(err) - return - } - ss, err := msgs(ms).validate() - if err != nil { - t.Error(err) - return - } - for _, s := range ss { - t.Log(s) - } - } - }() - - for _, vid := range []int{1002, 1003, 1004, 1005} { - pv := &propVirtual{addr: "169.254.0.1", mask: "255.255.255.0"} - if err := pv.configure(vid); err != nil { - t.Fatal(err) - } - if err := pv.setup(); err != nil { - t.Fatal(err) - } - time.Sleep(200 * time.Millisecond) - if err := pv.teardown(); err != nil { - t.Fatal(err) - } - time.Sleep(200 * time.Millisecond) - } -} - -func TestParseRIBWithFuzz(t *testing.T) { - for _, fuzz := range []string{ - "0\x00\x05\x050000000000000000" + - "00000000000000000000" + - "00000000000000000000" + - "00000000000000000000" + - "0000000000000\x02000000" + - "00000000", - "\x02\x00\x05\f0000000000000000" + - "0\x0200000000000000", - "\x02\x00\x05\x100000000000000\x1200" + - "0\x00\xff\x00", - "\x02\x00\x05\f0000000000000000" + - "0\x12000\x00\x02\x0000", - "\x00\x00\x00\x01\x00", - "00000", - } { - for typ := RIBType(0); typ < 256; typ++ { - ParseRIB(typ, []byte(fuzz)) - } - } -} - -func TestRouteMessage(t *testing.T) { - s, err := syscall.Socket(sysAF_ROUTE, sysSOCK_RAW, sysAF_UNSPEC) - if err != nil { - t.Fatal(err) - } - defer syscall.Close(s) - - var ms []RouteMessage - for _, af := range []int{sysAF_INET, sysAF_INET6} { - if _, err := fetchAndParseRIB(af, sysNET_RT_DUMP); err != nil { - t.Log(err) - continue - } - switch af { - case sysAF_INET: - ms = append(ms, []RouteMessage{ - { - Type: sysRTM_GET, - Addrs: []Addr{ - &Inet4Addr{IP: [4]byte{127, 0, 0, 1}}, - nil, - nil, - nil, - &LinkAddr{}, - &Inet4Addr{}, - nil, - &Inet4Addr{}, - }, - }, - { - Type: sysRTM_GET, - Addrs: []Addr{ - &Inet4Addr{IP: [4]byte{127, 0, 0, 1}}, - }, - }, - }...) - case sysAF_INET6: - ms = append(ms, []RouteMessage{ - { - Type: sysRTM_GET, - Addrs: []Addr{ - &Inet6Addr{IP: [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}, - nil, - nil, - nil, - &LinkAddr{}, - &Inet6Addr{}, - nil, - &Inet6Addr{}, - }, - }, - { - Type: sysRTM_GET, - Addrs: []Addr{ - &Inet6Addr{IP: [16]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}, - }, - }, - }...) - } - } - for i, m := range ms { - m.ID = uintptr(os.Getpid()) - m.Seq = i + 1 - wb, err := m.Marshal() - if err != nil { - t.Fatalf("%v: %v", m, err) - } - if _, err := syscall.Write(s, wb); err != nil { - t.Fatalf("%v: %v", m, err) - } - rb := make([]byte, os.Getpagesize()) - n, err := syscall.Read(s, rb) - if err != nil { - t.Fatalf("%v: %v", m, err) - } - rms, err := ParseRIB(0, rb[:n]) - if err != nil { - t.Fatalf("%v: %v", m, err) - } - for _, rm := range rms { - err := rm.(*RouteMessage).Err - if err != nil { - t.Errorf("%v: %v", m, err) - } - } - ss, err := msgs(rms).validate() - if err != nil { - t.Fatalf("%v: %v", m, err) - } - for _, s := range ss { - t.Log(s) - } - } -} diff --git a/deps/golang.org/x/net/route/route.go b/deps/golang.org/x/net/route/route.go deleted file mode 100644 index 081da0d5c..000000000 --- a/deps/golang.org/x/net/route/route.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -// Package route provides basic functions for the manipulation of -// packet routing facilities on BSD variants. -// -// The package supports any version of Darwin, any version of -// DragonFly BSD, FreeBSD 7 through 11, NetBSD 6 and above, and -// OpenBSD 5.6 and above. -package route - -import ( - "errors" - "os" - "syscall" -) - -var ( - errUnsupportedMessage = errors.New("unsupported message") - errMessageMismatch = errors.New("message mismatch") - errMessageTooShort = errors.New("message too short") - errInvalidMessage = errors.New("invalid message") - errInvalidAddr = errors.New("invalid address") - errShortBuffer = errors.New("short buffer") -) - -// A RouteMessage represents a message conveying an address prefix, a -// nexthop address and an output interface. -// -// Unlike other messages, this message can be used to query adjacency -// information for the given address prefix, to add a new route, and -// to delete or modify the existing route from the routing information -// base inside the kernel by writing and reading route messages on a -// routing socket. -// -// For the manipulation of routing information, the route message must -// contain appropriate fields that include: -// -// Version = -// Type = -// Flags = -// Index = -// ID = -// Seq = -// Addrs = -// -// The Type field specifies a type of manipulation, the Flags field -// specifies a class of target information and the Addrs field -// specifies target information like the following: -// -// route.RouteMessage{ -// Version: RTM_VERSION, -// Type: RTM_GET, -// Flags: RTF_UP | RTF_HOST, -// ID: uintptr(os.Getpid()), -// Seq: 1, -// Addrs: []route.Addrs{ -// RTAX_DST: &route.Inet4Addr{ ... }, -// RTAX_IFP: &route.LinkAddr{ ... }, -// RTAX_BRD: &route.Inet4Addr{ ... }, -// }, -// } -// -// The values for the above fields depend on the implementation of -// each operating system. -// -// The Err field on a response message contains an error value on the -// requested operation. If non-nil, the requested operation is failed. -type RouteMessage struct { - Version int // message version - Type int // message type - Flags int // route flags - Index int // interface index when atatched - ID uintptr // sender's identifier; usually process ID - Seq int // sequence number - Err error // error on requested operation - Addrs []Addr // addresses - - extOff int // offset of header extension - raw []byte // raw message -} - -// Marshal returns the binary encoding of m. -func (m *RouteMessage) Marshal() ([]byte, error) { - return m.marshal() -} - -// A RIBType reprensents a type of routing information base. -type RIBType int - -const ( - RIBTypeRoute RIBType = syscall.NET_RT_DUMP - RIBTypeInterface RIBType = syscall.NET_RT_IFLIST -) - -// FetchRIB fetches a routing information base from the operating -// system. -// -// The provided af must be an address family. -// -// The provided arg must be a RIBType-specific argument. -// When RIBType is related to routes, arg might be a set of route -// flags. When RIBType is related to network interfaces, arg might be -// an interface index or a set of interface flags. In most cases, zero -// means a wildcard. -func FetchRIB(af int, typ RIBType, arg int) ([]byte, error) { - mib := [6]int32{sysCTL_NET, sysAF_ROUTE, 0, int32(af), int32(typ), int32(arg)} - n := uintptr(0) - if err := sysctl(mib[:], nil, &n, nil, 0); err != nil { - return nil, os.NewSyscallError("sysctl", err) - } - if n == 0 { - return nil, nil - } - b := make([]byte, n) - if err := sysctl(mib[:], &b[0], &n, nil, 0); err != nil { - return nil, os.NewSyscallError("sysctl", err) - } - return b[:n], nil -} diff --git a/deps/golang.org/x/net/route/route_classic.go b/deps/golang.org/x/net/route/route_classic.go deleted file mode 100644 index 02fa68830..000000000 --- a/deps/golang.org/x/net/route/route_classic.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd - -package route - -import ( - "runtime" - "syscall" -) - -func (m *RouteMessage) marshal() ([]byte, error) { - w, ok := wireFormats[m.Type] - if !ok { - return nil, errUnsupportedMessage - } - l := w.bodyOff + addrsSpace(m.Addrs) - if runtime.GOOS == "darwin" { - // Fix stray pointer writes on macOS. - // See golang.org/issue/22456. - l += 1024 - } - b := make([]byte, l) - nativeEndian.PutUint16(b[:2], uint16(l)) - if m.Version == 0 { - b[2] = sysRTM_VERSION - } else { - b[2] = byte(m.Version) - } - b[3] = byte(m.Type) - nativeEndian.PutUint32(b[8:12], uint32(m.Flags)) - nativeEndian.PutUint16(b[4:6], uint16(m.Index)) - nativeEndian.PutUint32(b[16:20], uint32(m.ID)) - nativeEndian.PutUint32(b[20:24], uint32(m.Seq)) - attrs, err := marshalAddrs(b[w.bodyOff:], m.Addrs) - if err != nil { - return nil, err - } - if attrs > 0 { - nativeEndian.PutUint32(b[12:16], uint32(attrs)) - } - return b, nil -} - -func (w *wireFormat) parseRouteMessage(typ RIBType, b []byte) (Message, error) { - if len(b) < w.bodyOff { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - m := &RouteMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[8:12])), - Index: int(nativeEndian.Uint16(b[4:6])), - ID: uintptr(nativeEndian.Uint32(b[16:20])), - Seq: int(nativeEndian.Uint32(b[20:24])), - extOff: w.extOff, - raw: b[:l], - } - errno := syscall.Errno(nativeEndian.Uint32(b[28:32])) - if errno != 0 { - m.Err = errno - } - var err error - m.Addrs, err = parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[w.bodyOff:]) - if err != nil { - return nil, err - } - return m, nil -} diff --git a/deps/golang.org/x/net/route/route_openbsd.go b/deps/golang.org/x/net/route/route_openbsd.go deleted file mode 100644 index daf2e90c4..000000000 --- a/deps/golang.org/x/net/route/route_openbsd.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -import "syscall" - -func (m *RouteMessage) marshal() ([]byte, error) { - l := sizeofRtMsghdr + addrsSpace(m.Addrs) - b := make([]byte, l) - nativeEndian.PutUint16(b[:2], uint16(l)) - if m.Version == 0 { - b[2] = sysRTM_VERSION - } else { - b[2] = byte(m.Version) - } - b[3] = byte(m.Type) - nativeEndian.PutUint16(b[4:6], uint16(sizeofRtMsghdr)) - nativeEndian.PutUint32(b[16:20], uint32(m.Flags)) - nativeEndian.PutUint16(b[6:8], uint16(m.Index)) - nativeEndian.PutUint32(b[24:28], uint32(m.ID)) - nativeEndian.PutUint32(b[28:32], uint32(m.Seq)) - attrs, err := marshalAddrs(b[sizeofRtMsghdr:], m.Addrs) - if err != nil { - return nil, err - } - if attrs > 0 { - nativeEndian.PutUint32(b[12:16], uint32(attrs)) - } - return b, nil -} - -func (*wireFormat) parseRouteMessage(_ RIBType, b []byte) (Message, error) { - if len(b) < sizeofRtMsghdr { - return nil, errMessageTooShort - } - l := int(nativeEndian.Uint16(b[:2])) - if len(b) < l { - return nil, errInvalidMessage - } - m := &RouteMessage{ - Version: int(b[2]), - Type: int(b[3]), - Flags: int(nativeEndian.Uint32(b[16:20])), - Index: int(nativeEndian.Uint16(b[6:8])), - ID: uintptr(nativeEndian.Uint32(b[24:28])), - Seq: int(nativeEndian.Uint32(b[28:32])), - raw: b[:l], - } - ll := int(nativeEndian.Uint16(b[4:6])) - if len(b) < ll { - return nil, errInvalidMessage - } - errno := syscall.Errno(nativeEndian.Uint32(b[32:36])) - if errno != 0 { - m.Err = errno - } - as, err := parseAddrs(uint(nativeEndian.Uint32(b[12:16])), parseKernelInetAddr, b[ll:]) - if err != nil { - return nil, err - } - m.Addrs = as - return m, nil -} diff --git a/deps/golang.org/x/net/route/route_test.go b/deps/golang.org/x/net/route/route_test.go deleted file mode 100644 index 61bd17454..000000000 --- a/deps/golang.org/x/net/route/route_test.go +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package route - -import ( - "fmt" - "os/exec" - "runtime" - "time" -) - -func (m *RouteMessage) String() string { - return fmt.Sprintf("%s", addrAttrs(nativeEndian.Uint32(m.raw[12:16]))) -} - -func (m *InterfaceMessage) String() string { - var attrs addrAttrs - if runtime.GOOS == "openbsd" { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16])) - } else { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8])) - } - return fmt.Sprintf("%s", attrs) -} - -func (m *InterfaceAddrMessage) String() string { - var attrs addrAttrs - if runtime.GOOS == "openbsd" { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16])) - } else { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8])) - } - return fmt.Sprintf("%s", attrs) -} - -func (m *InterfaceMulticastAddrMessage) String() string { - return fmt.Sprintf("%s", addrAttrs(nativeEndian.Uint32(m.raw[4:8]))) -} - -func (m *InterfaceAnnounceMessage) String() string { - what := "" - switch m.What { - case 0: - what = "arrival" - case 1: - what = "departure" - } - return fmt.Sprintf("(%d %s %s)", m.Index, m.Name, what) -} - -func (m *InterfaceMetrics) String() string { - return fmt.Sprintf("(type=%d mtu=%d)", m.Type, m.MTU) -} - -func (m *RouteMetrics) String() string { - return fmt.Sprintf("(pmtu=%d)", m.PathMTU) -} - -type addrAttrs uint - -var addrAttrNames = [...]string{ - "dst", - "gateway", - "netmask", - "genmask", - "ifp", - "ifa", - "author", - "brd", - "df:mpls1-n:tag-o:src", // mpls1 for dragonfly, tag for netbsd, src for openbsd - "df:mpls2-o:srcmask", // mpls2 for dragonfly, srcmask for openbsd - "df:mpls3-o:label", // mpls3 for dragonfly, label for openbsd - "o:bfd", // bfd for openbsd - "o:dns", // dns for openbsd - "o:static", // static for openbsd - "o:search", // search for openbsd -} - -func (attrs addrAttrs) String() string { - var s string - for i, name := range addrAttrNames { - if attrs&(1<" - } - return s -} - -type msgs []Message - -func (ms msgs) validate() ([]string, error) { - var ss []string - for _, m := range ms { - switch m := m.(type) { - case *RouteMessage: - if err := addrs(m.Addrs).match(addrAttrs(nativeEndian.Uint32(m.raw[12:16]))); err != nil { - return nil, err - } - sys := m.Sys() - if sys == nil { - return nil, fmt.Errorf("no sys for %s", m.String()) - } - ss = append(ss, m.String()+" "+syss(sys).String()+" "+addrs(m.Addrs).String()) - case *InterfaceMessage: - var attrs addrAttrs - if runtime.GOOS == "openbsd" { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16])) - } else { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8])) - } - if err := addrs(m.Addrs).match(attrs); err != nil { - return nil, err - } - sys := m.Sys() - if sys == nil { - return nil, fmt.Errorf("no sys for %s", m.String()) - } - ss = append(ss, m.String()+" "+syss(sys).String()+" "+addrs(m.Addrs).String()) - case *InterfaceAddrMessage: - var attrs addrAttrs - if runtime.GOOS == "openbsd" { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[12:16])) - } else { - attrs = addrAttrs(nativeEndian.Uint32(m.raw[4:8])) - } - if err := addrs(m.Addrs).match(attrs); err != nil { - return nil, err - } - ss = append(ss, m.String()+" "+addrs(m.Addrs).String()) - case *InterfaceMulticastAddrMessage: - if err := addrs(m.Addrs).match(addrAttrs(nativeEndian.Uint32(m.raw[4:8]))); err != nil { - return nil, err - } - ss = append(ss, m.String()+" "+addrs(m.Addrs).String()) - case *InterfaceAnnounceMessage: - ss = append(ss, m.String()) - default: - ss = append(ss, fmt.Sprintf("%+v", m)) - } - } - return ss, nil -} - -type syss []Sys - -func (sys syss) String() string { - var s string - for _, sy := range sys { - switch sy := sy.(type) { - case *InterfaceMetrics: - if len(s) > 0 { - s += " " - } - s += sy.String() - case *RouteMetrics: - if len(s) > 0 { - s += " " - } - s += sy.String() - } - } - return s -} - -type addrFamily int - -func (af addrFamily) String() string { - switch af { - case sysAF_UNSPEC: - return "unspec" - case sysAF_LINK: - return "link" - case sysAF_INET: - return "inet4" - case sysAF_INET6: - return "inet6" - default: - return fmt.Sprintf("%d", af) - } -} - -const hexDigit = "0123456789abcdef" - -type llAddr []byte - -func (a llAddr) String() string { - if len(a) == 0 { - return "" - } - buf := make([]byte, 0, len(a)*3-1) - for i, b := range a { - if i > 0 { - buf = append(buf, ':') - } - buf = append(buf, hexDigit[b>>4]) - buf = append(buf, hexDigit[b&0xF]) - } - return string(buf) -} - -type ipAddr []byte - -func (a ipAddr) String() string { - if len(a) == 0 { - return "" - } - if len(a) == 4 { - return fmt.Sprintf("%d.%d.%d.%d", a[0], a[1], a[2], a[3]) - } - if len(a) == 16 { - return fmt.Sprintf("%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]) - } - s := make([]byte, len(a)*2) - for i, tn := range a { - s[i*2], s[i*2+1] = hexDigit[tn>>4], hexDigit[tn&0xf] - } - return string(s) -} - -func (a *LinkAddr) String() string { - name := a.Name - if name == "" { - name = "" - } - lla := llAddr(a.Addr).String() - if lla == "" { - lla = "" - } - return fmt.Sprintf("(%v %d %s %s)", addrFamily(a.Family()), a.Index, name, lla) -} - -func (a *Inet4Addr) String() string { - return fmt.Sprintf("(%v %v)", addrFamily(a.Family()), ipAddr(a.IP[:])) -} - -func (a *Inet6Addr) String() string { - return fmt.Sprintf("(%v %v %d)", addrFamily(a.Family()), ipAddr(a.IP[:]), a.ZoneID) -} - -func (a *DefaultAddr) String() string { - return fmt.Sprintf("(%v %s)", addrFamily(a.Family()), ipAddr(a.Raw[2:]).String()) -} - -type addrs []Addr - -func (as addrs) String() string { - var s string - for _, a := range as { - if a == nil { - continue - } - if len(s) > 0 { - s += " " - } - switch a := a.(type) { - case *LinkAddr: - s += a.String() - case *Inet4Addr: - s += a.String() - case *Inet6Addr: - s += a.String() - case *DefaultAddr: - s += a.String() - } - } - if s == "" { - return "" - } - return s -} - -func (as addrs) match(attrs addrAttrs) error { - var ts addrAttrs - af := sysAF_UNSPEC - for i := range as { - if as[i] != nil { - ts |= 1 << uint(i) - } - switch as[i].(type) { - case *Inet4Addr: - if af == sysAF_UNSPEC { - af = sysAF_INET - } - if af != sysAF_INET { - return fmt.Errorf("got %v; want %v", addrs(as), addrFamily(af)) - } - case *Inet6Addr: - if af == sysAF_UNSPEC { - af = sysAF_INET6 - } - if af != sysAF_INET6 { - return fmt.Errorf("got %v; want %v", addrs(as), addrFamily(af)) - } - } - } - if ts != attrs && ts > attrs { - return fmt.Errorf("%v not included in %v", ts, attrs) - } - return nil -} - -func fetchAndParseRIB(af int, typ RIBType) ([]Message, error) { - var err error - var b []byte - for i := 0; i < 3; i++ { - if b, err = FetchRIB(af, typ, 0); err != nil { - time.Sleep(10 * time.Millisecond) - continue - } - break - } - if err != nil { - return nil, fmt.Errorf("%v %d %v", addrFamily(af), typ, err) - } - ms, err := ParseRIB(typ, b) - if err != nil { - return nil, fmt.Errorf("%v %d %v", addrFamily(af), typ, err) - } - return ms, nil -} - -// propVirtual is a proprietary virtual network interface. -type propVirtual struct { - name string - addr, mask string - setupCmds []*exec.Cmd - teardownCmds []*exec.Cmd -} - -func (pv *propVirtual) setup() error { - for _, cmd := range pv.setupCmds { - if err := cmd.Run(); err != nil { - pv.teardown() - return err - } - } - return nil -} - -func (pv *propVirtual) teardown() error { - for _, cmd := range pv.teardownCmds { - if err := cmd.Run(); err != nil { - return err - } - } - return nil -} - -func (pv *propVirtual) configure(suffix int) error { - if runtime.GOOS == "openbsd" { - pv.name = fmt.Sprintf("vether%d", suffix) - } else { - pv.name = fmt.Sprintf("vlan%d", suffix) - } - xname, err := exec.LookPath("ifconfig") - if err != nil { - return err - } - pv.setupCmds = append(pv.setupCmds, &exec.Cmd{ - Path: xname, - Args: []string{"ifconfig", pv.name, "create"}, - }) - if runtime.GOOS == "netbsd" { - // NetBSD requires an underlying dot1Q-capable network - // interface. - pv.setupCmds = append(pv.setupCmds, &exec.Cmd{ - Path: xname, - Args: []string{"ifconfig", pv.name, "vlan", fmt.Sprintf("%d", suffix&0xfff), "vlanif", "wm0"}, - }) - } - pv.setupCmds = append(pv.setupCmds, &exec.Cmd{ - Path: xname, - Args: []string{"ifconfig", pv.name, "inet", pv.addr, "netmask", pv.mask}, - }) - pv.teardownCmds = append(pv.teardownCmds, &exec.Cmd{ - Path: xname, - Args: []string{"ifconfig", pv.name, "destroy"}, - }) - return nil -} diff --git a/deps/golang.org/x/net/route/sys.go b/deps/golang.org/x/net/route/sys.go deleted file mode 100644 index 3d0ee9b14..000000000 --- a/deps/golang.org/x/net/route/sys.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package route - -import "unsafe" - -var ( - nativeEndian binaryByteOrder - kernelAlign int - wireFormats map[int]*wireFormat -) - -func init() { - i := uint32(1) - b := (*[4]byte)(unsafe.Pointer(&i)) - if b[0] == 1 { - nativeEndian = littleEndian - } else { - nativeEndian = bigEndian - } - kernelAlign, wireFormats = probeRoutingStack() -} - -func roundup(l int) int { - if l == 0 { - return kernelAlign - } - return (l + kernelAlign - 1) & ^(kernelAlign - 1) -} - -type wireFormat struct { - extOff int // offset of header extension - bodyOff int // offset of message body - parse func(RIBType, []byte) (Message, error) -} diff --git a/deps/golang.org/x/net/route/sys_darwin.go b/deps/golang.org/x/net/route/sys_darwin.go deleted file mode 100644 index d2daf5c05..000000000 --- a/deps/golang.org/x/net/route/sys_darwin.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -func (typ RIBType) parseable() bool { - switch typ { - case sysNET_RT_STAT, sysNET_RT_TRASH: - return false - default: - return true - } -} - -// RouteMetrics represents route metrics. -type RouteMetrics struct { - PathMTU int // path maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (rmx *RouteMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *RouteMessage) Sys() []Sys { - return []Sys{ - &RouteMetrics{ - PathMTU: int(nativeEndian.Uint32(m.raw[m.extOff+4 : m.extOff+8])), - }, - } -} - -// InterfaceMetrics represents interface metrics. -type InterfaceMetrics struct { - Type int // interface type - MTU int // maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *InterfaceMessage) Sys() []Sys { - return []Sys{ - &InterfaceMetrics{ - Type: int(m.raw[m.extOff]), - MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])), - }, - } -} - -func probeRoutingStack() (int, map[int]*wireFormat) { - rtm := &wireFormat{extOff: 36, bodyOff: sizeofRtMsghdrDarwin15} - rtm.parse = rtm.parseRouteMessage - rtm2 := &wireFormat{extOff: 36, bodyOff: sizeofRtMsghdr2Darwin15} - rtm2.parse = rtm2.parseRouteMessage - ifm := &wireFormat{extOff: 16, bodyOff: sizeofIfMsghdrDarwin15} - ifm.parse = ifm.parseInterfaceMessage - ifm2 := &wireFormat{extOff: 32, bodyOff: sizeofIfMsghdr2Darwin15} - ifm2.parse = ifm2.parseInterfaceMessage - ifam := &wireFormat{extOff: sizeofIfaMsghdrDarwin15, bodyOff: sizeofIfaMsghdrDarwin15} - ifam.parse = ifam.parseInterfaceAddrMessage - ifmam := &wireFormat{extOff: sizeofIfmaMsghdrDarwin15, bodyOff: sizeofIfmaMsghdrDarwin15} - ifmam.parse = ifmam.parseInterfaceMulticastAddrMessage - ifmam2 := &wireFormat{extOff: sizeofIfmaMsghdr2Darwin15, bodyOff: sizeofIfmaMsghdr2Darwin15} - ifmam2.parse = ifmam2.parseInterfaceMulticastAddrMessage - // Darwin kernels require 32-bit aligned access to routing facilities. - return 4, map[int]*wireFormat{ - sysRTM_ADD: rtm, - sysRTM_DELETE: rtm, - sysRTM_CHANGE: rtm, - sysRTM_GET: rtm, - sysRTM_LOSING: rtm, - sysRTM_REDIRECT: rtm, - sysRTM_MISS: rtm, - sysRTM_LOCK: rtm, - sysRTM_RESOLVE: rtm, - sysRTM_NEWADDR: ifam, - sysRTM_DELADDR: ifam, - sysRTM_IFINFO: ifm, - sysRTM_NEWMADDR: ifmam, - sysRTM_DELMADDR: ifmam, - sysRTM_IFINFO2: ifm2, - sysRTM_NEWMADDR2: ifmam2, - sysRTM_GET2: rtm2, - } -} diff --git a/deps/golang.org/x/net/route/sys_dragonfly.go b/deps/golang.org/x/net/route/sys_dragonfly.go deleted file mode 100644 index 0c14bc2b4..000000000 --- a/deps/golang.org/x/net/route/sys_dragonfly.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -import "unsafe" - -func (typ RIBType) parseable() bool { return true } - -// RouteMetrics represents route metrics. -type RouteMetrics struct { - PathMTU int // path maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (rmx *RouteMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *RouteMessage) Sys() []Sys { - return []Sys{ - &RouteMetrics{ - PathMTU: int(nativeEndian.Uint64(m.raw[m.extOff+8 : m.extOff+16])), - }, - } -} - -// InterfaceMetrics represents interface metrics. -type InterfaceMetrics struct { - Type int // interface type - MTU int // maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *InterfaceMessage) Sys() []Sys { - return []Sys{ - &InterfaceMetrics{ - Type: int(m.raw[m.extOff]), - MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])), - }, - } -} - -func probeRoutingStack() (int, map[int]*wireFormat) { - var p uintptr - rtm := &wireFormat{extOff: 40, bodyOff: sizeofRtMsghdrDragonFlyBSD4} - rtm.parse = rtm.parseRouteMessage - ifm := &wireFormat{extOff: 16, bodyOff: sizeofIfMsghdrDragonFlyBSD4} - ifm.parse = ifm.parseInterfaceMessage - ifam := &wireFormat{extOff: sizeofIfaMsghdrDragonFlyBSD4, bodyOff: sizeofIfaMsghdrDragonFlyBSD4} - ifam.parse = ifam.parseInterfaceAddrMessage - ifmam := &wireFormat{extOff: sizeofIfmaMsghdrDragonFlyBSD4, bodyOff: sizeofIfmaMsghdrDragonFlyBSD4} - ifmam.parse = ifmam.parseInterfaceMulticastAddrMessage - ifanm := &wireFormat{extOff: sizeofIfAnnouncemsghdrDragonFlyBSD4, bodyOff: sizeofIfAnnouncemsghdrDragonFlyBSD4} - ifanm.parse = ifanm.parseInterfaceAnnounceMessage - return int(unsafe.Sizeof(p)), map[int]*wireFormat{ - sysRTM_ADD: rtm, - sysRTM_DELETE: rtm, - sysRTM_CHANGE: rtm, - sysRTM_GET: rtm, - sysRTM_LOSING: rtm, - sysRTM_REDIRECT: rtm, - sysRTM_MISS: rtm, - sysRTM_LOCK: rtm, - sysRTM_RESOLVE: rtm, - sysRTM_NEWADDR: ifam, - sysRTM_DELADDR: ifam, - sysRTM_IFINFO: ifm, - sysRTM_NEWMADDR: ifmam, - sysRTM_DELMADDR: ifmam, - sysRTM_IFANNOUNCE: ifanm, - } -} diff --git a/deps/golang.org/x/net/route/sys_freebsd.go b/deps/golang.org/x/net/route/sys_freebsd.go deleted file mode 100644 index 89ba1c4e2..000000000 --- a/deps/golang.org/x/net/route/sys_freebsd.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -import ( - "syscall" - "unsafe" -) - -func (typ RIBType) parseable() bool { return true } - -// RouteMetrics represents route metrics. -type RouteMetrics struct { - PathMTU int // path maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (rmx *RouteMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *RouteMessage) Sys() []Sys { - if kernelAlign == 8 { - return []Sys{ - &RouteMetrics{ - PathMTU: int(nativeEndian.Uint64(m.raw[m.extOff+8 : m.extOff+16])), - }, - } - } - return []Sys{ - &RouteMetrics{ - PathMTU: int(nativeEndian.Uint32(m.raw[m.extOff+4 : m.extOff+8])), - }, - } -} - -// InterfaceMetrics represents interface metrics. -type InterfaceMetrics struct { - Type int // interface type - MTU int // maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *InterfaceMessage) Sys() []Sys { - return []Sys{ - &InterfaceMetrics{ - Type: int(m.raw[m.extOff]), - MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])), - }, - } -} - -func probeRoutingStack() (int, map[int]*wireFormat) { - var p uintptr - wordSize := int(unsafe.Sizeof(p)) - align := int(unsafe.Sizeof(p)) - // In the case of kern.supported_archs="amd64 i386", we need - // to know the underlying kernel's architecture because the - // alignment for routing facilities are set at the build time - // of the kernel. - conf, _ := syscall.Sysctl("kern.conftxt") - for i, j := 0, 0; j < len(conf); j++ { - if conf[j] != '\n' { - continue - } - s := conf[i:j] - i = j + 1 - if len(s) > len("machine") && s[:len("machine")] == "machine" { - s = s[len("machine"):] - for k := 0; k < len(s); k++ { - if s[k] == ' ' || s[k] == '\t' { - s = s[1:] - } - break - } - if s == "amd64" { - align = 8 - } - break - } - } - var rtm, ifm, ifam, ifmam, ifanm *wireFormat - if align != wordSize { // 386 emulation on amd64 - rtm = &wireFormat{extOff: sizeofRtMsghdrFreeBSD10Emu - sizeofRtMetricsFreeBSD10Emu, bodyOff: sizeofRtMsghdrFreeBSD10Emu} - ifm = &wireFormat{extOff: 16} - ifam = &wireFormat{extOff: sizeofIfaMsghdrFreeBSD10Emu, bodyOff: sizeofIfaMsghdrFreeBSD10Emu} - ifmam = &wireFormat{extOff: sizeofIfmaMsghdrFreeBSD10Emu, bodyOff: sizeofIfmaMsghdrFreeBSD10Emu} - ifanm = &wireFormat{extOff: sizeofIfAnnouncemsghdrFreeBSD10Emu, bodyOff: sizeofIfAnnouncemsghdrFreeBSD10Emu} - } else { - rtm = &wireFormat{extOff: sizeofRtMsghdrFreeBSD10 - sizeofRtMetricsFreeBSD10, bodyOff: sizeofRtMsghdrFreeBSD10} - ifm = &wireFormat{extOff: 16} - ifam = &wireFormat{extOff: sizeofIfaMsghdrFreeBSD10, bodyOff: sizeofIfaMsghdrFreeBSD10} - ifmam = &wireFormat{extOff: sizeofIfmaMsghdrFreeBSD10, bodyOff: sizeofIfmaMsghdrFreeBSD10} - ifanm = &wireFormat{extOff: sizeofIfAnnouncemsghdrFreeBSD10, bodyOff: sizeofIfAnnouncemsghdrFreeBSD10} - } - rel, _ := syscall.SysctlUint32("kern.osreldate") - switch { - case rel < 800000: - if align != wordSize { // 386 emulation on amd64 - ifm.bodyOff = sizeofIfMsghdrFreeBSD7Emu - } else { - ifm.bodyOff = sizeofIfMsghdrFreeBSD7 - } - case 800000 <= rel && rel < 900000: - if align != wordSize { // 386 emulation on amd64 - ifm.bodyOff = sizeofIfMsghdrFreeBSD8Emu - } else { - ifm.bodyOff = sizeofIfMsghdrFreeBSD8 - } - case 900000 <= rel && rel < 1000000: - if align != wordSize { // 386 emulation on amd64 - ifm.bodyOff = sizeofIfMsghdrFreeBSD9Emu - } else { - ifm.bodyOff = sizeofIfMsghdrFreeBSD9 - } - case 1000000 <= rel && rel < 1100000: - if align != wordSize { // 386 emulation on amd64 - ifm.bodyOff = sizeofIfMsghdrFreeBSD10Emu - } else { - ifm.bodyOff = sizeofIfMsghdrFreeBSD10 - } - default: - if align != wordSize { // 386 emulation on amd64 - ifm.bodyOff = sizeofIfMsghdrFreeBSD11Emu - } else { - ifm.bodyOff = sizeofIfMsghdrFreeBSD11 - } - } - rtm.parse = rtm.parseRouteMessage - ifm.parse = ifm.parseInterfaceMessage - ifam.parse = ifam.parseInterfaceAddrMessage - ifmam.parse = ifmam.parseInterfaceMulticastAddrMessage - ifanm.parse = ifanm.parseInterfaceAnnounceMessage - return align, map[int]*wireFormat{ - sysRTM_ADD: rtm, - sysRTM_DELETE: rtm, - sysRTM_CHANGE: rtm, - sysRTM_GET: rtm, - sysRTM_LOSING: rtm, - sysRTM_REDIRECT: rtm, - sysRTM_MISS: rtm, - sysRTM_LOCK: rtm, - sysRTM_RESOLVE: rtm, - sysRTM_NEWADDR: ifam, - sysRTM_DELADDR: ifam, - sysRTM_IFINFO: ifm, - sysRTM_NEWMADDR: ifmam, - sysRTM_DELMADDR: ifmam, - sysRTM_IFANNOUNCE: ifanm, - } -} diff --git a/deps/golang.org/x/net/route/sys_netbsd.go b/deps/golang.org/x/net/route/sys_netbsd.go deleted file mode 100644 index 02f71d54b..000000000 --- a/deps/golang.org/x/net/route/sys_netbsd.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -func (typ RIBType) parseable() bool { return true } - -// RouteMetrics represents route metrics. -type RouteMetrics struct { - PathMTU int // path maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (rmx *RouteMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *RouteMessage) Sys() []Sys { - return []Sys{ - &RouteMetrics{ - PathMTU: int(nativeEndian.Uint64(m.raw[m.extOff+8 : m.extOff+16])), - }, - } -} - -// RouteMetrics represents route metrics. -type InterfaceMetrics struct { - Type int // interface type - MTU int // maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *InterfaceMessage) Sys() []Sys { - return []Sys{ - &InterfaceMetrics{ - Type: int(m.raw[m.extOff]), - MTU: int(nativeEndian.Uint32(m.raw[m.extOff+8 : m.extOff+12])), - }, - } -} - -func probeRoutingStack() (int, map[int]*wireFormat) { - rtm := &wireFormat{extOff: 40, bodyOff: sizeofRtMsghdrNetBSD7} - rtm.parse = rtm.parseRouteMessage - ifm := &wireFormat{extOff: 16, bodyOff: sizeofIfMsghdrNetBSD7} - ifm.parse = ifm.parseInterfaceMessage - ifam := &wireFormat{extOff: sizeofIfaMsghdrNetBSD7, bodyOff: sizeofIfaMsghdrNetBSD7} - ifam.parse = ifam.parseInterfaceAddrMessage - ifanm := &wireFormat{extOff: sizeofIfAnnouncemsghdrNetBSD7, bodyOff: sizeofIfAnnouncemsghdrNetBSD7} - ifanm.parse = ifanm.parseInterfaceAnnounceMessage - // NetBSD 6 and above kernels require 64-bit aligned access to - // routing facilities. - return 8, map[int]*wireFormat{ - sysRTM_ADD: rtm, - sysRTM_DELETE: rtm, - sysRTM_CHANGE: rtm, - sysRTM_GET: rtm, - sysRTM_LOSING: rtm, - sysRTM_REDIRECT: rtm, - sysRTM_MISS: rtm, - sysRTM_LOCK: rtm, - sysRTM_RESOLVE: rtm, - sysRTM_NEWADDR: ifam, - sysRTM_DELADDR: ifam, - sysRTM_IFANNOUNCE: ifanm, - sysRTM_IFINFO: ifm, - } -} diff --git a/deps/golang.org/x/net/route/sys_openbsd.go b/deps/golang.org/x/net/route/sys_openbsd.go deleted file mode 100644 index c5674e83d..000000000 --- a/deps/golang.org/x/net/route/sys_openbsd.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package route - -import "unsafe" - -func (typ RIBType) parseable() bool { - switch typ { - case sysNET_RT_STATS, sysNET_RT_TABLE: - return false - default: - return true - } -} - -// RouteMetrics represents route metrics. -type RouteMetrics struct { - PathMTU int // path maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (rmx *RouteMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *RouteMessage) Sys() []Sys { - return []Sys{ - &RouteMetrics{ - PathMTU: int(nativeEndian.Uint32(m.raw[60:64])), - }, - } -} - -// InterfaceMetrics represents interface metrics. -type InterfaceMetrics struct { - Type int // interface type - MTU int // maximum transmission unit -} - -// SysType implements the SysType method of Sys interface. -func (imx *InterfaceMetrics) SysType() SysType { return SysMetrics } - -// Sys implements the Sys method of Message interface. -func (m *InterfaceMessage) Sys() []Sys { - return []Sys{ - &InterfaceMetrics{ - Type: int(m.raw[24]), - MTU: int(nativeEndian.Uint32(m.raw[28:32])), - }, - } -} - -func probeRoutingStack() (int, map[int]*wireFormat) { - var p uintptr - rtm := &wireFormat{extOff: -1, bodyOff: -1} - rtm.parse = rtm.parseRouteMessage - ifm := &wireFormat{extOff: -1, bodyOff: -1} - ifm.parse = ifm.parseInterfaceMessage - ifam := &wireFormat{extOff: -1, bodyOff: -1} - ifam.parse = ifam.parseInterfaceAddrMessage - ifanm := &wireFormat{extOff: -1, bodyOff: -1} - ifanm.parse = ifanm.parseInterfaceAnnounceMessage - return int(unsafe.Sizeof(p)), map[int]*wireFormat{ - sysRTM_ADD: rtm, - sysRTM_DELETE: rtm, - sysRTM_CHANGE: rtm, - sysRTM_GET: rtm, - sysRTM_LOSING: rtm, - sysRTM_REDIRECT: rtm, - sysRTM_MISS: rtm, - sysRTM_LOCK: rtm, - sysRTM_RESOLVE: rtm, - sysRTM_NEWADDR: ifam, - sysRTM_DELADDR: ifam, - sysRTM_IFINFO: ifm, - sysRTM_IFANNOUNCE: ifanm, - sysRTM_DESYNC: rtm, - } -} diff --git a/deps/golang.org/x/net/route/syscall.go b/deps/golang.org/x/net/route/syscall.go deleted file mode 100644 index 5f69ea63d..000000000 --- a/deps/golang.org/x/net/route/syscall.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd netbsd openbsd - -package route - -import ( - "syscall" - "unsafe" -) - -var zero uintptr - -func sysctl(mib []int32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) error { - var p unsafe.Pointer - if len(mib) > 0 { - p = unsafe.Pointer(&mib[0]) - } else { - p = unsafe.Pointer(&zero) - } - _, _, errno := syscall.Syscall6(syscall.SYS___SYSCTL, uintptr(p), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), newlen) - if errno != 0 { - return error(errno) - } - return nil -} diff --git a/deps/golang.org/x/net/route/zsys_darwin.go b/deps/golang.org/x/net/route/zsys_darwin.go deleted file mode 100644 index 4e2e1ab09..000000000 --- a/deps/golang.org/x/net/route/zsys_darwin.go +++ /dev/null @@ -1,99 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_darwin.go - -package route - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_ROUTE = 0x11 - sysAF_LINK = 0x12 - sysAF_INET6 = 0x1e - - sysSOCK_RAW = 0x3 - - sysNET_RT_DUMP = 0x1 - sysNET_RT_FLAGS = 0x2 - sysNET_RT_IFLIST = 0x3 - sysNET_RT_STAT = 0x4 - sysNET_RT_TRASH = 0x5 - sysNET_RT_IFLIST2 = 0x6 - sysNET_RT_DUMP2 = 0x7 - sysNET_RT_MAXID = 0xa -) - -const ( - sysCTL_MAXNAME = 0xc - - sysCTL_UNSPEC = 0x0 - sysCTL_KERN = 0x1 - sysCTL_VM = 0x2 - sysCTL_VFS = 0x3 - sysCTL_NET = 0x4 - sysCTL_DEBUG = 0x5 - sysCTL_HW = 0x6 - sysCTL_MACHDEP = 0x7 - sysCTL_USER = 0x8 - sysCTL_MAXID = 0x9 -) - -const ( - sysRTM_VERSION = 0x5 - - sysRTM_ADD = 0x1 - sysRTM_DELETE = 0x2 - sysRTM_CHANGE = 0x3 - sysRTM_GET = 0x4 - sysRTM_LOSING = 0x5 - sysRTM_REDIRECT = 0x6 - sysRTM_MISS = 0x7 - sysRTM_LOCK = 0x8 - sysRTM_OLDADD = 0x9 - sysRTM_OLDDEL = 0xa - sysRTM_RESOLVE = 0xb - sysRTM_NEWADDR = 0xc - sysRTM_DELADDR = 0xd - sysRTM_IFINFO = 0xe - sysRTM_NEWMADDR = 0xf - sysRTM_DELMADDR = 0x10 - sysRTM_IFINFO2 = 0x12 - sysRTM_NEWMADDR2 = 0x13 - sysRTM_GET2 = 0x14 - - sysRTA_DST = 0x1 - sysRTA_GATEWAY = 0x2 - sysRTA_NETMASK = 0x4 - sysRTA_GENMASK = 0x8 - sysRTA_IFP = 0x10 - sysRTA_IFA = 0x20 - sysRTA_AUTHOR = 0x40 - sysRTA_BRD = 0x80 - - sysRTAX_DST = 0x0 - sysRTAX_GATEWAY = 0x1 - sysRTAX_NETMASK = 0x2 - sysRTAX_GENMASK = 0x3 - sysRTAX_IFP = 0x4 - sysRTAX_IFA = 0x5 - sysRTAX_AUTHOR = 0x6 - sysRTAX_BRD = 0x7 - sysRTAX_MAX = 0x8 -) - -const ( - sizeofIfMsghdrDarwin15 = 0x70 - sizeofIfaMsghdrDarwin15 = 0x14 - sizeofIfmaMsghdrDarwin15 = 0x10 - sizeofIfMsghdr2Darwin15 = 0xa0 - sizeofIfmaMsghdr2Darwin15 = 0x14 - sizeofIfDataDarwin15 = 0x60 - sizeofIfData64Darwin15 = 0x80 - - sizeofRtMsghdrDarwin15 = 0x5c - sizeofRtMsghdr2Darwin15 = 0x5c - sizeofRtMetricsDarwin15 = 0x38 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/route/zsys_dragonfly.go b/deps/golang.org/x/net/route/zsys_dragonfly.go deleted file mode 100644 index 719c88d11..000000000 --- a/deps/golang.org/x/net/route/zsys_dragonfly.go +++ /dev/null @@ -1,98 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_dragonfly.go - -package route - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_ROUTE = 0x11 - sysAF_LINK = 0x12 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 - - sysNET_RT_DUMP = 0x1 - sysNET_RT_FLAGS = 0x2 - sysNET_RT_IFLIST = 0x3 - sysNET_RT_MAXID = 0x4 -) - -const ( - sysCTL_MAXNAME = 0xc - - sysCTL_UNSPEC = 0x0 - sysCTL_KERN = 0x1 - sysCTL_VM = 0x2 - sysCTL_VFS = 0x3 - sysCTL_NET = 0x4 - sysCTL_DEBUG = 0x5 - sysCTL_HW = 0x6 - sysCTL_MACHDEP = 0x7 - sysCTL_USER = 0x8 - sysCTL_P1003_1B = 0x9 - sysCTL_LWKT = 0xa - sysCTL_MAXID = 0xb -) - -const ( - sysRTM_VERSION = 0x6 - - sysRTM_ADD = 0x1 - sysRTM_DELETE = 0x2 - sysRTM_CHANGE = 0x3 - sysRTM_GET = 0x4 - sysRTM_LOSING = 0x5 - sysRTM_REDIRECT = 0x6 - sysRTM_MISS = 0x7 - sysRTM_LOCK = 0x8 - sysRTM_OLDADD = 0x9 - sysRTM_OLDDEL = 0xa - sysRTM_RESOLVE = 0xb - sysRTM_NEWADDR = 0xc - sysRTM_DELADDR = 0xd - sysRTM_IFINFO = 0xe - sysRTM_NEWMADDR = 0xf - sysRTM_DELMADDR = 0x10 - sysRTM_IFANNOUNCE = 0x11 - sysRTM_IEEE80211 = 0x12 - - sysRTA_DST = 0x1 - sysRTA_GATEWAY = 0x2 - sysRTA_NETMASK = 0x4 - sysRTA_GENMASK = 0x8 - sysRTA_IFP = 0x10 - sysRTA_IFA = 0x20 - sysRTA_AUTHOR = 0x40 - sysRTA_BRD = 0x80 - sysRTA_MPLS1 = 0x100 - sysRTA_MPLS2 = 0x200 - sysRTA_MPLS3 = 0x400 - - sysRTAX_DST = 0x0 - sysRTAX_GATEWAY = 0x1 - sysRTAX_NETMASK = 0x2 - sysRTAX_GENMASK = 0x3 - sysRTAX_IFP = 0x4 - sysRTAX_IFA = 0x5 - sysRTAX_AUTHOR = 0x6 - sysRTAX_BRD = 0x7 - sysRTAX_MPLS1 = 0x8 - sysRTAX_MPLS2 = 0x9 - sysRTAX_MPLS3 = 0xa - sysRTAX_MAX = 0xb -) - -const ( - sizeofIfMsghdrDragonFlyBSD4 = 0xb0 - sizeofIfaMsghdrDragonFlyBSD4 = 0x14 - sizeofIfmaMsghdrDragonFlyBSD4 = 0x10 - sizeofIfAnnouncemsghdrDragonFlyBSD4 = 0x18 - - sizeofRtMsghdrDragonFlyBSD4 = 0x98 - sizeofRtMetricsDragonFlyBSD4 = 0x70 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/route/zsys_freebsd_386.go b/deps/golang.org/x/net/route/zsys_freebsd_386.go deleted file mode 100644 index b03bc01f6..000000000 --- a/deps/golang.org/x/net/route/zsys_freebsd_386.go +++ /dev/null @@ -1,126 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package route - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_ROUTE = 0x11 - sysAF_LINK = 0x12 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 - - sysNET_RT_DUMP = 0x1 - sysNET_RT_FLAGS = 0x2 - sysNET_RT_IFLIST = 0x3 - sysNET_RT_IFMALIST = 0x4 - sysNET_RT_IFLISTL = 0x5 -) - -const ( - sysCTL_MAXNAME = 0x18 - - sysCTL_UNSPEC = 0x0 - sysCTL_KERN = 0x1 - sysCTL_VM = 0x2 - sysCTL_VFS = 0x3 - sysCTL_NET = 0x4 - sysCTL_DEBUG = 0x5 - sysCTL_HW = 0x6 - sysCTL_MACHDEP = 0x7 - sysCTL_USER = 0x8 - sysCTL_P1003_1B = 0x9 -) - -const ( - sysRTM_VERSION = 0x5 - - sysRTM_ADD = 0x1 - sysRTM_DELETE = 0x2 - sysRTM_CHANGE = 0x3 - sysRTM_GET = 0x4 - sysRTM_LOSING = 0x5 - sysRTM_REDIRECT = 0x6 - sysRTM_MISS = 0x7 - sysRTM_LOCK = 0x8 - sysRTM_RESOLVE = 0xb - sysRTM_NEWADDR = 0xc - sysRTM_DELADDR = 0xd - sysRTM_IFINFO = 0xe - sysRTM_NEWMADDR = 0xf - sysRTM_DELMADDR = 0x10 - sysRTM_IFANNOUNCE = 0x11 - sysRTM_IEEE80211 = 0x12 - - sysRTA_DST = 0x1 - sysRTA_GATEWAY = 0x2 - sysRTA_NETMASK = 0x4 - sysRTA_GENMASK = 0x8 - sysRTA_IFP = 0x10 - sysRTA_IFA = 0x20 - sysRTA_AUTHOR = 0x40 - sysRTA_BRD = 0x80 - - sysRTAX_DST = 0x0 - sysRTAX_GATEWAY = 0x1 - sysRTAX_NETMASK = 0x2 - sysRTAX_GENMASK = 0x3 - sysRTAX_IFP = 0x4 - sysRTAX_IFA = 0x5 - sysRTAX_AUTHOR = 0x6 - sysRTAX_BRD = 0x7 - sysRTAX_MAX = 0x8 -) - -const ( - sizeofIfMsghdrlFreeBSD10 = 0x68 - sizeofIfaMsghdrFreeBSD10 = 0x14 - sizeofIfaMsghdrlFreeBSD10 = 0x6c - sizeofIfmaMsghdrFreeBSD10 = 0x10 - sizeofIfAnnouncemsghdrFreeBSD10 = 0x18 - - sizeofRtMsghdrFreeBSD10 = 0x5c - sizeofRtMetricsFreeBSD10 = 0x38 - - sizeofIfMsghdrFreeBSD7 = 0x60 - sizeofIfMsghdrFreeBSD8 = 0x60 - sizeofIfMsghdrFreeBSD9 = 0x60 - sizeofIfMsghdrFreeBSD10 = 0x64 - sizeofIfMsghdrFreeBSD11 = 0xa8 - - sizeofIfDataFreeBSD7 = 0x50 - sizeofIfDataFreeBSD8 = 0x50 - sizeofIfDataFreeBSD9 = 0x50 - sizeofIfDataFreeBSD10 = 0x54 - sizeofIfDataFreeBSD11 = 0x98 - - // MODIFIED BY HAND FOR 386 EMULATION ON AMD64 - // 386 EMULATION USES THE UNDERLYING RAW DATA LAYOUT - - sizeofIfMsghdrlFreeBSD10Emu = 0xb0 - sizeofIfaMsghdrFreeBSD10Emu = 0x14 - sizeofIfaMsghdrlFreeBSD10Emu = 0xb0 - sizeofIfmaMsghdrFreeBSD10Emu = 0x10 - sizeofIfAnnouncemsghdrFreeBSD10Emu = 0x18 - - sizeofRtMsghdrFreeBSD10Emu = 0x98 - sizeofRtMetricsFreeBSD10Emu = 0x70 - - sizeofIfMsghdrFreeBSD7Emu = 0xa8 - sizeofIfMsghdrFreeBSD8Emu = 0xa8 - sizeofIfMsghdrFreeBSD9Emu = 0xa8 - sizeofIfMsghdrFreeBSD10Emu = 0xa8 - sizeofIfMsghdrFreeBSD11Emu = 0xa8 - - sizeofIfDataFreeBSD7Emu = 0x98 - sizeofIfDataFreeBSD8Emu = 0x98 - sizeofIfDataFreeBSD9Emu = 0x98 - sizeofIfDataFreeBSD10Emu = 0x98 - sizeofIfDataFreeBSD11Emu = 0x98 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/route/zsys_freebsd_amd64.go b/deps/golang.org/x/net/route/zsys_freebsd_amd64.go deleted file mode 100644 index 0b675b3d3..000000000 --- a/deps/golang.org/x/net/route/zsys_freebsd_amd64.go +++ /dev/null @@ -1,123 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package route - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_ROUTE = 0x11 - sysAF_LINK = 0x12 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 - - sysNET_RT_DUMP = 0x1 - sysNET_RT_FLAGS = 0x2 - sysNET_RT_IFLIST = 0x3 - sysNET_RT_IFMALIST = 0x4 - sysNET_RT_IFLISTL = 0x5 -) - -const ( - sysCTL_MAXNAME = 0x18 - - sysCTL_UNSPEC = 0x0 - sysCTL_KERN = 0x1 - sysCTL_VM = 0x2 - sysCTL_VFS = 0x3 - sysCTL_NET = 0x4 - sysCTL_DEBUG = 0x5 - sysCTL_HW = 0x6 - sysCTL_MACHDEP = 0x7 - sysCTL_USER = 0x8 - sysCTL_P1003_1B = 0x9 -) - -const ( - sysRTM_VERSION = 0x5 - - sysRTM_ADD = 0x1 - sysRTM_DELETE = 0x2 - sysRTM_CHANGE = 0x3 - sysRTM_GET = 0x4 - sysRTM_LOSING = 0x5 - sysRTM_REDIRECT = 0x6 - sysRTM_MISS = 0x7 - sysRTM_LOCK = 0x8 - sysRTM_RESOLVE = 0xb - sysRTM_NEWADDR = 0xc - sysRTM_DELADDR = 0xd - sysRTM_IFINFO = 0xe - sysRTM_NEWMADDR = 0xf - sysRTM_DELMADDR = 0x10 - sysRTM_IFANNOUNCE = 0x11 - sysRTM_IEEE80211 = 0x12 - - sysRTA_DST = 0x1 - sysRTA_GATEWAY = 0x2 - sysRTA_NETMASK = 0x4 - sysRTA_GENMASK = 0x8 - sysRTA_IFP = 0x10 - sysRTA_IFA = 0x20 - sysRTA_AUTHOR = 0x40 - sysRTA_BRD = 0x80 - - sysRTAX_DST = 0x0 - sysRTAX_GATEWAY = 0x1 - sysRTAX_NETMASK = 0x2 - sysRTAX_GENMASK = 0x3 - sysRTAX_IFP = 0x4 - sysRTAX_IFA = 0x5 - sysRTAX_AUTHOR = 0x6 - sysRTAX_BRD = 0x7 - sysRTAX_MAX = 0x8 -) - -const ( - sizeofIfMsghdrlFreeBSD10 = 0xb0 - sizeofIfaMsghdrFreeBSD10 = 0x14 - sizeofIfaMsghdrlFreeBSD10 = 0xb0 - sizeofIfmaMsghdrFreeBSD10 = 0x10 - sizeofIfAnnouncemsghdrFreeBSD10 = 0x18 - - sizeofRtMsghdrFreeBSD10 = 0x98 - sizeofRtMetricsFreeBSD10 = 0x70 - - sizeofIfMsghdrFreeBSD7 = 0xa8 - sizeofIfMsghdrFreeBSD8 = 0xa8 - sizeofIfMsghdrFreeBSD9 = 0xa8 - sizeofIfMsghdrFreeBSD10 = 0xa8 - sizeofIfMsghdrFreeBSD11 = 0xa8 - - sizeofIfDataFreeBSD7 = 0x98 - sizeofIfDataFreeBSD8 = 0x98 - sizeofIfDataFreeBSD9 = 0x98 - sizeofIfDataFreeBSD10 = 0x98 - sizeofIfDataFreeBSD11 = 0x98 - - sizeofIfMsghdrlFreeBSD10Emu = 0xb0 - sizeofIfaMsghdrFreeBSD10Emu = 0x14 - sizeofIfaMsghdrlFreeBSD10Emu = 0xb0 - sizeofIfmaMsghdrFreeBSD10Emu = 0x10 - sizeofIfAnnouncemsghdrFreeBSD10Emu = 0x18 - - sizeofRtMsghdrFreeBSD10Emu = 0x98 - sizeofRtMetricsFreeBSD10Emu = 0x70 - - sizeofIfMsghdrFreeBSD7Emu = 0xa8 - sizeofIfMsghdrFreeBSD8Emu = 0xa8 - sizeofIfMsghdrFreeBSD9Emu = 0xa8 - sizeofIfMsghdrFreeBSD10Emu = 0xa8 - sizeofIfMsghdrFreeBSD11Emu = 0xa8 - - sizeofIfDataFreeBSD7Emu = 0x98 - sizeofIfDataFreeBSD8Emu = 0x98 - sizeofIfDataFreeBSD9Emu = 0x98 - sizeofIfDataFreeBSD10Emu = 0x98 - sizeofIfDataFreeBSD11Emu = 0x98 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/route/zsys_freebsd_arm.go b/deps/golang.org/x/net/route/zsys_freebsd_arm.go deleted file mode 100644 index 58f8ea16f..000000000 --- a/deps/golang.org/x/net/route/zsys_freebsd_arm.go +++ /dev/null @@ -1,123 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_freebsd.go - -package route - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_ROUTE = 0x11 - sysAF_LINK = 0x12 - sysAF_INET6 = 0x1c - - sysSOCK_RAW = 0x3 - - sysNET_RT_DUMP = 0x1 - sysNET_RT_FLAGS = 0x2 - sysNET_RT_IFLIST = 0x3 - sysNET_RT_IFMALIST = 0x4 - sysNET_RT_IFLISTL = 0x5 -) - -const ( - sysCTL_MAXNAME = 0x18 - - sysCTL_UNSPEC = 0x0 - sysCTL_KERN = 0x1 - sysCTL_VM = 0x2 - sysCTL_VFS = 0x3 - sysCTL_NET = 0x4 - sysCTL_DEBUG = 0x5 - sysCTL_HW = 0x6 - sysCTL_MACHDEP = 0x7 - sysCTL_USER = 0x8 - sysCTL_P1003_1B = 0x9 -) - -const ( - sysRTM_VERSION = 0x5 - - sysRTM_ADD = 0x1 - sysRTM_DELETE = 0x2 - sysRTM_CHANGE = 0x3 - sysRTM_GET = 0x4 - sysRTM_LOSING = 0x5 - sysRTM_REDIRECT = 0x6 - sysRTM_MISS = 0x7 - sysRTM_LOCK = 0x8 - sysRTM_RESOLVE = 0xb - sysRTM_NEWADDR = 0xc - sysRTM_DELADDR = 0xd - sysRTM_IFINFO = 0xe - sysRTM_NEWMADDR = 0xf - sysRTM_DELMADDR = 0x10 - sysRTM_IFANNOUNCE = 0x11 - sysRTM_IEEE80211 = 0x12 - - sysRTA_DST = 0x1 - sysRTA_GATEWAY = 0x2 - sysRTA_NETMASK = 0x4 - sysRTA_GENMASK = 0x8 - sysRTA_IFP = 0x10 - sysRTA_IFA = 0x20 - sysRTA_AUTHOR = 0x40 - sysRTA_BRD = 0x80 - - sysRTAX_DST = 0x0 - sysRTAX_GATEWAY = 0x1 - sysRTAX_NETMASK = 0x2 - sysRTAX_GENMASK = 0x3 - sysRTAX_IFP = 0x4 - sysRTAX_IFA = 0x5 - sysRTAX_AUTHOR = 0x6 - sysRTAX_BRD = 0x7 - sysRTAX_MAX = 0x8 -) - -const ( - sizeofIfMsghdrlFreeBSD10 = 0x68 - sizeofIfaMsghdrFreeBSD10 = 0x14 - sizeofIfaMsghdrlFreeBSD10 = 0x6c - sizeofIfmaMsghdrFreeBSD10 = 0x10 - sizeofIfAnnouncemsghdrFreeBSD10 = 0x18 - - sizeofRtMsghdrFreeBSD10 = 0x5c - sizeofRtMetricsFreeBSD10 = 0x38 - - sizeofIfMsghdrFreeBSD7 = 0x70 - sizeofIfMsghdrFreeBSD8 = 0x70 - sizeofIfMsghdrFreeBSD9 = 0x70 - sizeofIfMsghdrFreeBSD10 = 0x70 - sizeofIfMsghdrFreeBSD11 = 0xa8 - - sizeofIfDataFreeBSD7 = 0x60 - sizeofIfDataFreeBSD8 = 0x60 - sizeofIfDataFreeBSD9 = 0x60 - sizeofIfDataFreeBSD10 = 0x60 - sizeofIfDataFreeBSD11 = 0x98 - - sizeofIfMsghdrlFreeBSD10Emu = 0x68 - sizeofIfaMsghdrFreeBSD10Emu = 0x14 - sizeofIfaMsghdrlFreeBSD10Emu = 0x6c - sizeofIfmaMsghdrFreeBSD10Emu = 0x10 - sizeofIfAnnouncemsghdrFreeBSD10Emu = 0x18 - - sizeofRtMsghdrFreeBSD10Emu = 0x5c - sizeofRtMetricsFreeBSD10Emu = 0x38 - - sizeofIfMsghdrFreeBSD7Emu = 0x70 - sizeofIfMsghdrFreeBSD8Emu = 0x70 - sizeofIfMsghdrFreeBSD9Emu = 0x70 - sizeofIfMsghdrFreeBSD10Emu = 0x70 - sizeofIfMsghdrFreeBSD11Emu = 0xa8 - - sizeofIfDataFreeBSD7Emu = 0x60 - sizeofIfDataFreeBSD8Emu = 0x60 - sizeofIfDataFreeBSD9Emu = 0x60 - sizeofIfDataFreeBSD10Emu = 0x60 - sizeofIfDataFreeBSD11Emu = 0x98 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/route/zsys_netbsd.go b/deps/golang.org/x/net/route/zsys_netbsd.go deleted file mode 100644 index e0df45e8b..000000000 --- a/deps/golang.org/x/net/route/zsys_netbsd.go +++ /dev/null @@ -1,97 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_netbsd.go - -package route - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_ROUTE = 0x22 - sysAF_LINK = 0x12 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 - - sysNET_RT_DUMP = 0x1 - sysNET_RT_FLAGS = 0x2 - sysNET_RT_IFLIST = 0x5 - sysNET_RT_MAXID = 0x6 -) - -const ( - sysCTL_MAXNAME = 0xc - - sysCTL_UNSPEC = 0x0 - sysCTL_KERN = 0x1 - sysCTL_VM = 0x2 - sysCTL_VFS = 0x3 - sysCTL_NET = 0x4 - sysCTL_DEBUG = 0x5 - sysCTL_HW = 0x6 - sysCTL_MACHDEP = 0x7 - sysCTL_USER = 0x8 - sysCTL_DDB = 0x9 - sysCTL_PROC = 0xa - sysCTL_VENDOR = 0xb - sysCTL_EMUL = 0xc - sysCTL_SECURITY = 0xd - sysCTL_MAXID = 0xe -) - -const ( - sysRTM_VERSION = 0x4 - - sysRTM_ADD = 0x1 - sysRTM_DELETE = 0x2 - sysRTM_CHANGE = 0x3 - sysRTM_GET = 0x4 - sysRTM_LOSING = 0x5 - sysRTM_REDIRECT = 0x6 - sysRTM_MISS = 0x7 - sysRTM_LOCK = 0x8 - sysRTM_OLDADD = 0x9 - sysRTM_OLDDEL = 0xa - sysRTM_RESOLVE = 0xb - sysRTM_NEWADDR = 0xc - sysRTM_DELADDR = 0xd - sysRTM_IFANNOUNCE = 0x10 - sysRTM_IEEE80211 = 0x11 - sysRTM_SETGATE = 0x12 - sysRTM_LLINFO_UPD = 0x13 - sysRTM_IFINFO = 0x14 - sysRTM_CHGADDR = 0x15 - - sysRTA_DST = 0x1 - sysRTA_GATEWAY = 0x2 - sysRTA_NETMASK = 0x4 - sysRTA_GENMASK = 0x8 - sysRTA_IFP = 0x10 - sysRTA_IFA = 0x20 - sysRTA_AUTHOR = 0x40 - sysRTA_BRD = 0x80 - sysRTA_TAG = 0x100 - - sysRTAX_DST = 0x0 - sysRTAX_GATEWAY = 0x1 - sysRTAX_NETMASK = 0x2 - sysRTAX_GENMASK = 0x3 - sysRTAX_IFP = 0x4 - sysRTAX_IFA = 0x5 - sysRTAX_AUTHOR = 0x6 - sysRTAX_BRD = 0x7 - sysRTAX_TAG = 0x8 - sysRTAX_MAX = 0x9 -) - -const ( - sizeofIfMsghdrNetBSD7 = 0x98 - sizeofIfaMsghdrNetBSD7 = 0x18 - sizeofIfAnnouncemsghdrNetBSD7 = 0x18 - - sizeofRtMsghdrNetBSD7 = 0x78 - sizeofRtMetricsNetBSD7 = 0x50 - - sizeofSockaddrStorage = 0x80 - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/route/zsys_openbsd.go b/deps/golang.org/x/net/route/zsys_openbsd.go deleted file mode 100644 index db8c8efb4..000000000 --- a/deps/golang.org/x/net/route/zsys_openbsd.go +++ /dev/null @@ -1,101 +0,0 @@ -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs defs_openbsd.go - -package route - -const ( - sysAF_UNSPEC = 0x0 - sysAF_INET = 0x2 - sysAF_ROUTE = 0x11 - sysAF_LINK = 0x12 - sysAF_INET6 = 0x18 - - sysSOCK_RAW = 0x3 - - sysNET_RT_DUMP = 0x1 - sysNET_RT_FLAGS = 0x2 - sysNET_RT_IFLIST = 0x3 - sysNET_RT_STATS = 0x4 - sysNET_RT_TABLE = 0x5 - sysNET_RT_IFNAMES = 0x6 - sysNET_RT_MAXID = 0x7 -) - -const ( - sysCTL_MAXNAME = 0xc - - sysCTL_UNSPEC = 0x0 - sysCTL_KERN = 0x1 - sysCTL_VM = 0x2 - sysCTL_FS = 0x3 - sysCTL_NET = 0x4 - sysCTL_DEBUG = 0x5 - sysCTL_HW = 0x6 - sysCTL_MACHDEP = 0x7 - sysCTL_DDB = 0x9 - sysCTL_VFS = 0xa - sysCTL_MAXID = 0xb -) - -const ( - sysRTM_VERSION = 0x5 - - sysRTM_ADD = 0x1 - sysRTM_DELETE = 0x2 - sysRTM_CHANGE = 0x3 - sysRTM_GET = 0x4 - sysRTM_LOSING = 0x5 - sysRTM_REDIRECT = 0x6 - sysRTM_MISS = 0x7 - sysRTM_LOCK = 0x8 - sysRTM_RESOLVE = 0xb - sysRTM_NEWADDR = 0xc - sysRTM_DELADDR = 0xd - sysRTM_IFINFO = 0xe - sysRTM_IFANNOUNCE = 0xf - sysRTM_DESYNC = 0x10 - sysRTM_INVALIDATE = 0x11 - sysRTM_BFD = 0x12 - sysRTM_PROPOSAL = 0x13 - - sysRTA_DST = 0x1 - sysRTA_GATEWAY = 0x2 - sysRTA_NETMASK = 0x4 - sysRTA_GENMASK = 0x8 - sysRTA_IFP = 0x10 - sysRTA_IFA = 0x20 - sysRTA_AUTHOR = 0x40 - sysRTA_BRD = 0x80 - sysRTA_SRC = 0x100 - sysRTA_SRCMASK = 0x200 - sysRTA_LABEL = 0x400 - sysRTA_BFD = 0x800 - sysRTA_DNS = 0x1000 - sysRTA_STATIC = 0x2000 - sysRTA_SEARCH = 0x4000 - - sysRTAX_DST = 0x0 - sysRTAX_GATEWAY = 0x1 - sysRTAX_NETMASK = 0x2 - sysRTAX_GENMASK = 0x3 - sysRTAX_IFP = 0x4 - sysRTAX_IFA = 0x5 - sysRTAX_AUTHOR = 0x6 - sysRTAX_BRD = 0x7 - sysRTAX_SRC = 0x8 - sysRTAX_SRCMASK = 0x9 - sysRTAX_LABEL = 0xa - sysRTAX_BFD = 0xb - sysRTAX_DNS = 0xc - sysRTAX_STATIC = 0xd - sysRTAX_SEARCH = 0xe - sysRTAX_MAX = 0xf -) - -const ( - sizeofRtMsghdr = 0x60 - - sizeofSockaddrStorage = 0x100 - sizeofSockaddrInet = 0x10 - sizeofSockaddrInet6 = 0x1c -) diff --git a/deps/golang.org/x/net/trace/histogram_test.go b/deps/golang.org/x/net/trace/histogram_test.go deleted file mode 100644 index d384b9332..000000000 --- a/deps/golang.org/x/net/trace/histogram_test.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package trace - -import ( - "math" - "testing" -) - -type sumTest struct { - value int64 - sum int64 - sumOfSquares float64 - total int64 -} - -var sumTests = []sumTest{ - {100, 100, 10000, 1}, - {50, 150, 12500, 2}, - {50, 200, 15000, 3}, - {50, 250, 17500, 4}, -} - -type bucketingTest struct { - in int64 - log int - bucket int -} - -var bucketingTests = []bucketingTest{ - {0, 0, 0}, - {1, 1, 0}, - {2, 2, 1}, - {3, 2, 1}, - {4, 3, 2}, - {1000, 10, 9}, - {1023, 10, 9}, - {1024, 11, 10}, - {1000000, 20, 19}, -} - -type multiplyTest struct { - in int64 - ratio float64 - expectedSum int64 - expectedTotal int64 - expectedSumOfSquares float64 -} - -var multiplyTests = []multiplyTest{ - {15, 2.5, 37, 2, 562.5}, - {128, 4.6, 758, 13, 77953.9}, -} - -type percentileTest struct { - fraction float64 - expected int64 -} - -var percentileTests = []percentileTest{ - {0.25, 48}, - {0.5, 96}, - {0.6, 109}, - {0.75, 128}, - {0.90, 205}, - {0.95, 230}, - {0.99, 256}, -} - -func TestSum(t *testing.T) { - var h histogram - - for _, test := range sumTests { - h.addMeasurement(test.value) - sum := h.sum - if sum != test.sum { - t.Errorf("h.Sum = %v WANT: %v", sum, test.sum) - } - - sumOfSquares := h.sumOfSquares - if sumOfSquares != test.sumOfSquares { - t.Errorf("h.SumOfSquares = %v WANT: %v", sumOfSquares, test.sumOfSquares) - } - - total := h.total() - if total != test.total { - t.Errorf("h.Total = %v WANT: %v", total, test.total) - } - } -} - -func TestMultiply(t *testing.T) { - var h histogram - for i, test := range multiplyTests { - h.addMeasurement(test.in) - h.Multiply(test.ratio) - if h.sum != test.expectedSum { - t.Errorf("#%v: h.sum = %v WANT: %v", i, h.sum, test.expectedSum) - } - if h.total() != test.expectedTotal { - t.Errorf("#%v: h.total = %v WANT: %v", i, h.total(), test.expectedTotal) - } - if h.sumOfSquares != test.expectedSumOfSquares { - t.Errorf("#%v: h.SumOfSquares = %v WANT: %v", i, test.expectedSumOfSquares, h.sumOfSquares) - } - } -} - -func TestBucketingFunctions(t *testing.T) { - for _, test := range bucketingTests { - log := log2(test.in) - if log != test.log { - t.Errorf("log2 = %v WANT: %v", log, test.log) - } - - bucket := getBucket(test.in) - if bucket != test.bucket { - t.Errorf("getBucket = %v WANT: %v", bucket, test.bucket) - } - } -} - -func TestAverage(t *testing.T) { - a := new(histogram) - average := a.average() - if average != 0 { - t.Errorf("Average of empty histogram was %v WANT: 0", average) - } - - a.addMeasurement(1) - a.addMeasurement(1) - a.addMeasurement(3) - const expected = float64(5) / float64(3) - average = a.average() - - if !isApproximate(average, expected) { - t.Errorf("Average = %g WANT: %v", average, expected) - } -} - -func TestStandardDeviation(t *testing.T) { - a := new(histogram) - add(a, 10, 1<<4) - add(a, 10, 1<<5) - add(a, 10, 1<<6) - stdDev := a.standardDeviation() - const expected = 19.95 - - if !isApproximate(stdDev, expected) { - t.Errorf("StandardDeviation = %v WANT: %v", stdDev, expected) - } - - // No values - a = new(histogram) - stdDev = a.standardDeviation() - - if !isApproximate(stdDev, 0) { - t.Errorf("StandardDeviation = %v WANT: 0", stdDev) - } - - add(a, 1, 1<<4) - if !isApproximate(stdDev, 0) { - t.Errorf("StandardDeviation = %v WANT: 0", stdDev) - } - - add(a, 10, 1<<4) - if !isApproximate(stdDev, 0) { - t.Errorf("StandardDeviation = %v WANT: 0", stdDev) - } -} - -func TestPercentileBoundary(t *testing.T) { - a := new(histogram) - add(a, 5, 1<<4) - add(a, 10, 1<<6) - add(a, 5, 1<<7) - - for _, test := range percentileTests { - percentile := a.percentileBoundary(test.fraction) - if percentile != test.expected { - t.Errorf("h.PercentileBoundary (fraction=%v) = %v WANT: %v", test.fraction, percentile, test.expected) - } - } -} - -func TestCopyFrom(t *testing.T) { - a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} - b := histogram{6, 36, []int64{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39}, 5, -1} - - a.CopyFrom(&b) - - if a.String() != b.String() { - t.Errorf("a.String = %s WANT: %s", a.String(), b.String()) - } -} - -func TestClear(t *testing.T) { - a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} - - a.Clear() - - expected := "0, 0.000000, 0, 0, []" - if a.String() != expected { - t.Errorf("a.String = %s WANT %s", a.String(), expected) - } -} - -func TestNew(t *testing.T) { - a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} - b := a.New() - - expected := "0, 0.000000, 0, 0, []" - if b.(*histogram).String() != expected { - t.Errorf("b.(*histogram).String = %s WANT: %s", b.(*histogram).String(), expected) - } -} - -func TestAdd(t *testing.T) { - // The tests here depend on the associativity of addMeasurement and Add. - // Add empty observation - a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} - b := a.New() - - expected := a.String() - a.Add(b) - if a.String() != expected { - t.Errorf("a.String = %s WANT: %s", a.String(), expected) - } - - // Add same bucketed value, no new buckets - c := new(histogram) - d := new(histogram) - e := new(histogram) - c.addMeasurement(12) - d.addMeasurement(11) - e.addMeasurement(12) - e.addMeasurement(11) - c.Add(d) - if c.String() != e.String() { - t.Errorf("c.String = %s WANT: %s", c.String(), e.String()) - } - - // Add bucketed values - f := new(histogram) - g := new(histogram) - h := new(histogram) - f.addMeasurement(4) - f.addMeasurement(12) - f.addMeasurement(100) - g.addMeasurement(18) - g.addMeasurement(36) - g.addMeasurement(255) - h.addMeasurement(4) - h.addMeasurement(12) - h.addMeasurement(100) - h.addMeasurement(18) - h.addMeasurement(36) - h.addMeasurement(255) - f.Add(g) - if f.String() != h.String() { - t.Errorf("f.String = %q WANT: %q", f.String(), h.String()) - } - - // add buckets to no buckets - i := new(histogram) - j := new(histogram) - k := new(histogram) - j.addMeasurement(18) - j.addMeasurement(36) - j.addMeasurement(255) - k.addMeasurement(18) - k.addMeasurement(36) - k.addMeasurement(255) - i.Add(j) - if i.String() != k.String() { - t.Errorf("i.String = %q WANT: %q", i.String(), k.String()) - } - - // add buckets to single value (no overlap) - l := new(histogram) - m := new(histogram) - n := new(histogram) - l.addMeasurement(0) - m.addMeasurement(18) - m.addMeasurement(36) - m.addMeasurement(255) - n.addMeasurement(0) - n.addMeasurement(18) - n.addMeasurement(36) - n.addMeasurement(255) - l.Add(m) - if l.String() != n.String() { - t.Errorf("l.String = %q WANT: %q", l.String(), n.String()) - } - - // mixed order - o := new(histogram) - p := new(histogram) - o.addMeasurement(0) - o.addMeasurement(2) - o.addMeasurement(0) - p.addMeasurement(0) - p.addMeasurement(0) - p.addMeasurement(2) - if o.String() != p.String() { - t.Errorf("o.String = %q WANT: %q", o.String(), p.String()) - } -} - -func add(h *histogram, times int, val int64) { - for i := 0; i < times; i++ { - h.addMeasurement(val) - } -} - -func isApproximate(x, y float64) bool { - return math.Abs(x-y) < 1e-2 -} diff --git a/deps/golang.org/x/net/trace/trace.go b/deps/golang.org/x/net/trace/trace.go index a46ee0eaa..7d112ba61 100644 --- a/deps/golang.org/x/net/trace/trace.go +++ b/deps/golang.org/x/net/trace/trace.go @@ -60,7 +60,7 @@ The /debug/events HTTP endpoint organizes the event logs by family and by time since the last error. The expanded view displays recent log entries and the log's call stack. */ -package trace // import "golang.org/x/net/trace" +package trace import ( "bytes" @@ -368,11 +368,7 @@ func New(family, title string) Trace { } func (tr *trace) Finish() { - elapsed := time.Now().Sub(tr.Start) - tr.mu.Lock() - tr.Elapsed = elapsed - tr.mu.Unlock() - + tr.Elapsed = time.Now().Sub(tr.Start) if DebugUseAfterFinish { buf := make([]byte, 4<<10) // 4 KB should be enough n := runtime.Stack(buf, false) @@ -385,17 +381,14 @@ func (tr *trace) Finish() { m.Remove(tr) f := getFamily(tr.Family, true) - tr.mu.RLock() // protects tr fields in Cond.match calls for _, b := range f.Buckets { if b.Cond.match(tr) { b.Add(tr) } } - tr.mu.RUnlock() - // Add a sample of elapsed time as microseconds to the family's timeseries h := new(histogram) - h.addMeasurement(elapsed.Nanoseconds() / 1e3) + h.addMeasurement(tr.Elapsed.Nanoseconds() / 1e3) f.LatencyMu.Lock() f.Latency.Add(h) f.LatencyMu.Unlock() @@ -691,20 +684,25 @@ type trace struct { // Title is the title of this trace. Title string - // Start time of the this trace. - Start time.Time + // Timing information. + Start time.Time + Elapsed time.Duration // zero while active + + // Trace information if non-zero. + traceID uint64 + spanID uint64 + + // Whether this trace resulted in an error. + IsError bool + // Append-only sequence of events (modulo discards). mu sync.RWMutex - events []event // Append-only sequence of events (modulo discards). + events []event maxEvents int - recycler func(interface{}) - IsError bool // Whether this trace resulted in an error. - Elapsed time.Duration // Elapsed time for this trace, zero while active. - traceID uint64 // Trace information if non-zero. - spanID uint64 - refs int32 // how many buckets this is in - disc discarded // scratch space to avoid allocation + refs int32 // how many buckets this is in + recycler func(interface{}) + disc discarded // scratch space to avoid allocation finishStack []byte // where finish was called, if DebugUseAfterFinish is set @@ -716,18 +714,14 @@ func (tr *trace) reset() { tr.Family = "" tr.Title = "" tr.Start = time.Time{} - - tr.mu.Lock() tr.Elapsed = 0 tr.traceID = 0 tr.spanID = 0 tr.IsError = false tr.maxEvents = 0 tr.events = nil - tr.recycler = nil - tr.mu.Unlock() - tr.refs = 0 + tr.recycler = nil tr.disc = 0 tr.finishStack = nil for i := range tr.eventsBuf { @@ -807,31 +801,21 @@ func (tr *trace) LazyPrintf(format string, a ...interface{}) { tr.addEvent(&lazySprintf{format, a}, false, false) } -func (tr *trace) SetError() { - tr.mu.Lock() - tr.IsError = true - tr.mu.Unlock() -} +func (tr *trace) SetError() { tr.IsError = true } func (tr *trace) SetRecycler(f func(interface{})) { - tr.mu.Lock() tr.recycler = f - tr.mu.Unlock() } func (tr *trace) SetTraceInfo(traceID, spanID uint64) { - tr.mu.Lock() tr.traceID, tr.spanID = traceID, spanID - tr.mu.Unlock() } func (tr *trace) SetMaxEvents(m int) { - tr.mu.Lock() // Always keep at least three events: first, discarded count, last. if len(tr.events) == 0 && m > 3 { tr.maxEvents = m } - tr.mu.Unlock() } func (tr *trace) ref() { @@ -840,7 +824,6 @@ func (tr *trace) ref() { func (tr *trace) unref() { if atomic.AddInt32(&tr.refs, -1) == 0 { - tr.mu.RLock() if tr.recycler != nil { // freeTrace clears tr, so we hold tr.recycler and tr.events here. go func(f func(interface{}), es []event) { @@ -851,7 +834,6 @@ func (tr *trace) unref() { } }(tr.recycler, tr.events) } - tr.mu.RUnlock() freeTrace(tr) } @@ -862,10 +844,7 @@ func (tr *trace) When() string { } func (tr *trace) ElapsedTime() string { - tr.mu.RLock() t := tr.Elapsed - tr.mu.RUnlock() - if t == 0 { // Active trace. t = time.Since(tr.Start) diff --git a/deps/golang.org/x/net/trace/trace_test.go b/deps/golang.org/x/net/trace/trace_test.go deleted file mode 100644 index bfd9dfe94..000000000 --- a/deps/golang.org/x/net/trace/trace_test.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package trace - -import ( - "net/http" - "reflect" - "testing" -) - -type s struct{} - -func (s) String() string { return "lazy string" } - -// TestReset checks whether all the fields are zeroed after reset. -func TestReset(t *testing.T) { - tr := New("foo", "bar") - tr.LazyLog(s{}, false) - tr.LazyPrintf("%d", 1) - tr.SetRecycler(func(_ interface{}) {}) - tr.SetTraceInfo(3, 4) - tr.SetMaxEvents(100) - tr.SetError() - tr.Finish() - - tr.(*trace).reset() - - if !reflect.DeepEqual(tr, new(trace)) { - t.Errorf("reset didn't clear all fields: %+v", tr) - } -} - -// TestResetLog checks whether all the fields are zeroed after reset. -func TestResetLog(t *testing.T) { - el := NewEventLog("foo", "bar") - el.Printf("message") - el.Errorf("error") - el.Finish() - - el.(*eventLog).reset() - - if !reflect.DeepEqual(el, new(eventLog)) { - t.Errorf("reset didn't clear all fields: %+v", el) - } -} - -func TestAuthRequest(t *testing.T) { - testCases := []struct { - host string - want bool - }{ - {host: "192.168.23.1", want: false}, - {host: "192.168.23.1:8080", want: false}, - {host: "malformed remote addr", want: false}, - {host: "localhost", want: true}, - {host: "localhost:8080", want: true}, - {host: "127.0.0.1", want: true}, - {host: "127.0.0.1:8080", want: true}, - {host: "::1", want: true}, - {host: "[::1]:8080", want: true}, - } - for _, tt := range testCases { - req := &http.Request{RemoteAddr: tt.host} - any, sensitive := AuthRequest(req) - if any != tt.want || sensitive != tt.want { - t.Errorf("AuthRequest(%q) = %t, %t; want %t, %t", tt.host, any, sensitive, tt.want, tt.want) - } - } -} - -// TestParseTemplate checks that all templates used by this package are valid -// as they are parsed on first usage -func TestParseTemplate(t *testing.T) { - if tmpl := distTmpl(); tmpl == nil { - t.Error("invalid template returned from distTmpl()") - } - if tmpl := pageTmpl(); tmpl == nil { - t.Error("invalid template returned from pageTmpl()") - } - if tmpl := eventsTmpl(); tmpl == nil { - t.Error("invalid template returned from eventsTmpl()") - } -} - -func benchmarkTrace(b *testing.B, maxEvents, numEvents int) { - numSpans := (b.N + numEvents + 1) / numEvents - - for i := 0; i < numSpans; i++ { - tr := New("test", "test") - tr.SetMaxEvents(maxEvents) - for j := 0; j < numEvents; j++ { - tr.LazyPrintf("%d", j) - } - tr.Finish() - } -} - -func BenchmarkTrace_Default_2(b *testing.B) { - benchmarkTrace(b, 0, 2) -} - -func BenchmarkTrace_Default_10(b *testing.B) { - benchmarkTrace(b, 0, 10) -} - -func BenchmarkTrace_Default_100(b *testing.B) { - benchmarkTrace(b, 0, 100) -} - -func BenchmarkTrace_Default_1000(b *testing.B) { - benchmarkTrace(b, 0, 1000) -} - -func BenchmarkTrace_Default_10000(b *testing.B) { - benchmarkTrace(b, 0, 10000) -} - -func BenchmarkTrace_10_2(b *testing.B) { - benchmarkTrace(b, 10, 2) -} - -func BenchmarkTrace_10_10(b *testing.B) { - benchmarkTrace(b, 10, 10) -} - -func BenchmarkTrace_10_100(b *testing.B) { - benchmarkTrace(b, 10, 100) -} - -func BenchmarkTrace_10_1000(b *testing.B) { - benchmarkTrace(b, 10, 1000) -} - -func BenchmarkTrace_10_10000(b *testing.B) { - benchmarkTrace(b, 10, 10000) -} - -func BenchmarkTrace_100_2(b *testing.B) { - benchmarkTrace(b, 100, 2) -} - -func BenchmarkTrace_100_10(b *testing.B) { - benchmarkTrace(b, 100, 10) -} - -func BenchmarkTrace_100_100(b *testing.B) { - benchmarkTrace(b, 100, 100) -} - -func BenchmarkTrace_100_1000(b *testing.B) { - benchmarkTrace(b, 100, 1000) -} - -func BenchmarkTrace_100_10000(b *testing.B) { - benchmarkTrace(b, 100, 10000) -} - -func BenchmarkTrace_1000_2(b *testing.B) { - benchmarkTrace(b, 1000, 2) -} - -func BenchmarkTrace_1000_10(b *testing.B) { - benchmarkTrace(b, 1000, 10) -} - -func BenchmarkTrace_1000_100(b *testing.B) { - benchmarkTrace(b, 1000, 100) -} - -func BenchmarkTrace_1000_1000(b *testing.B) { - benchmarkTrace(b, 1000, 1000) -} - -func BenchmarkTrace_1000_10000(b *testing.B) { - benchmarkTrace(b, 1000, 10000) -} diff --git a/deps/golang.org/x/net/webdav/file.go b/deps/golang.org/x/net/webdav/file.go deleted file mode 100644 index 748118dd3..000000000 --- a/deps/golang.org/x/net/webdav/file.go +++ /dev/null @@ -1,796 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "encoding/xml" - "io" - "net/http" - "os" - "path" - "path/filepath" - "strings" - "sync" - "time" - - "golang.org/x/net/context" -) - -// slashClean is equivalent to but slightly more efficient than -// path.Clean("/" + name). -func slashClean(name string) string { - if name == "" || name[0] != '/' { - name = "/" + name - } - return path.Clean(name) -} - -// A FileSystem implements access to a collection of named files. The elements -// in a file path are separated by slash ('/', U+002F) characters, regardless -// of host operating system convention. -// -// Each method has the same semantics as the os package's function of the same -// name. -// -// Note that the os.Rename documentation says that "OS-specific restrictions -// might apply". In particular, whether or not renaming a file or directory -// overwriting another existing file or directory is an error is OS-dependent. -type FileSystem interface { - Mkdir(ctx context.Context, name string, perm os.FileMode) error - OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) - RemoveAll(ctx context.Context, name string) error - Rename(ctx context.Context, oldName, newName string) error - Stat(ctx context.Context, name string) (os.FileInfo, error) -} - -// A File is returned by a FileSystem's OpenFile method and can be served by a -// Handler. -// -// A File may optionally implement the DeadPropsHolder interface, if it can -// load and save dead properties. -type File interface { - http.File - io.Writer -} - -// A Dir implements FileSystem using the native file system restricted to a -// specific directory tree. -// -// While the FileSystem.OpenFile method takes '/'-separated paths, a Dir's -// string value is a filename on the native file system, not a URL, so it is -// separated by filepath.Separator, which isn't necessarily '/'. -// -// An empty Dir is treated as ".". -type Dir string - -func (d Dir) resolve(name string) string { - // This implementation is based on Dir.Open's code in the standard net/http package. - if filepath.Separator != '/' && strings.IndexRune(name, filepath.Separator) >= 0 || - strings.Contains(name, "\x00") { - return "" - } - dir := string(d) - if dir == "" { - dir = "." - } - return filepath.Join(dir, filepath.FromSlash(slashClean(name))) -} - -func (d Dir) Mkdir(ctx context.Context, name string, perm os.FileMode) error { - if name = d.resolve(name); name == "" { - return os.ErrNotExist - } - return os.Mkdir(name, perm) -} - -func (d Dir) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) { - if name = d.resolve(name); name == "" { - return nil, os.ErrNotExist - } - f, err := os.OpenFile(name, flag, perm) - if err != nil { - return nil, err - } - return f, nil -} - -func (d Dir) RemoveAll(ctx context.Context, name string) error { - if name = d.resolve(name); name == "" { - return os.ErrNotExist - } - if name == filepath.Clean(string(d)) { - // Prohibit removing the virtual root directory. - return os.ErrInvalid - } - return os.RemoveAll(name) -} - -func (d Dir) Rename(ctx context.Context, oldName, newName string) error { - if oldName = d.resolve(oldName); oldName == "" { - return os.ErrNotExist - } - if newName = d.resolve(newName); newName == "" { - return os.ErrNotExist - } - if root := filepath.Clean(string(d)); root == oldName || root == newName { - // Prohibit renaming from or to the virtual root directory. - return os.ErrInvalid - } - return os.Rename(oldName, newName) -} - -func (d Dir) Stat(ctx context.Context, name string) (os.FileInfo, error) { - if name = d.resolve(name); name == "" { - return nil, os.ErrNotExist - } - return os.Stat(name) -} - -// NewMemFS returns a new in-memory FileSystem implementation. -func NewMemFS() FileSystem { - return &memFS{ - root: memFSNode{ - children: make(map[string]*memFSNode), - mode: 0660 | os.ModeDir, - modTime: time.Now(), - }, - } -} - -// A memFS implements FileSystem, storing all metadata and actual file data -// in-memory. No limits on filesystem size are used, so it is not recommended -// this be used where the clients are untrusted. -// -// Concurrent access is permitted. The tree structure is protected by a mutex, -// and each node's contents and metadata are protected by a per-node mutex. -// -// TODO: Enforce file permissions. -type memFS struct { - mu sync.Mutex - root memFSNode -} - -// TODO: clean up and rationalize the walk/find code. - -// walk walks the directory tree for the fullname, calling f at each step. If f -// returns an error, the walk will be aborted and return that same error. -// -// dir is the directory at that step, frag is the name fragment, and final is -// whether it is the final step. For example, walking "/foo/bar/x" will result -// in 3 calls to f: -// - "/", "foo", false -// - "/foo/", "bar", false -// - "/foo/bar/", "x", true -// The frag argument will be empty only if dir is the root node and the walk -// ends at that root node. -func (fs *memFS) walk(op, fullname string, f func(dir *memFSNode, frag string, final bool) error) error { - original := fullname - fullname = slashClean(fullname) - - // Strip any leading "/"s to make fullname a relative path, as the walk - // starts at fs.root. - if fullname[0] == '/' { - fullname = fullname[1:] - } - dir := &fs.root - - for { - frag, remaining := fullname, "" - i := strings.IndexRune(fullname, '/') - final := i < 0 - if !final { - frag, remaining = fullname[:i], fullname[i+1:] - } - if frag == "" && dir != &fs.root { - panic("webdav: empty path fragment for a clean path") - } - if err := f(dir, frag, final); err != nil { - return &os.PathError{ - Op: op, - Path: original, - Err: err, - } - } - if final { - break - } - child := dir.children[frag] - if child == nil { - return &os.PathError{ - Op: op, - Path: original, - Err: os.ErrNotExist, - } - } - if !child.mode.IsDir() { - return &os.PathError{ - Op: op, - Path: original, - Err: os.ErrInvalid, - } - } - dir, fullname = child, remaining - } - return nil -} - -// find returns the parent of the named node and the relative name fragment -// from the parent to the child. For example, if finding "/foo/bar/baz" then -// parent will be the node for "/foo/bar" and frag will be "baz". -// -// If the fullname names the root node, then parent, frag and err will be zero. -// -// find returns an error if the parent does not already exist or the parent -// isn't a directory, but it will not return an error per se if the child does -// not already exist. The error returned is either nil or an *os.PathError -// whose Op is op. -func (fs *memFS) find(op, fullname string) (parent *memFSNode, frag string, err error) { - err = fs.walk(op, fullname, func(parent0 *memFSNode, frag0 string, final bool) error { - if !final { - return nil - } - if frag0 != "" { - parent, frag = parent0, frag0 - } - return nil - }) - return parent, frag, err -} - -func (fs *memFS) Mkdir(ctx context.Context, name string, perm os.FileMode) error { - fs.mu.Lock() - defer fs.mu.Unlock() - - dir, frag, err := fs.find("mkdir", name) - if err != nil { - return err - } - if dir == nil { - // We can't create the root. - return os.ErrInvalid - } - if _, ok := dir.children[frag]; ok { - return os.ErrExist - } - dir.children[frag] = &memFSNode{ - children: make(map[string]*memFSNode), - mode: perm.Perm() | os.ModeDir, - modTime: time.Now(), - } - return nil -} - -func (fs *memFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) { - fs.mu.Lock() - defer fs.mu.Unlock() - - dir, frag, err := fs.find("open", name) - if err != nil { - return nil, err - } - var n *memFSNode - if dir == nil { - // We're opening the root. - if flag&(os.O_WRONLY|os.O_RDWR) != 0 { - return nil, os.ErrPermission - } - n, frag = &fs.root, "/" - - } else { - n = dir.children[frag] - if flag&(os.O_SYNC|os.O_APPEND) != 0 { - // memFile doesn't support these flags yet. - return nil, os.ErrInvalid - } - if flag&os.O_CREATE != 0 { - if flag&os.O_EXCL != 0 && n != nil { - return nil, os.ErrExist - } - if n == nil { - n = &memFSNode{ - mode: perm.Perm(), - } - dir.children[frag] = n - } - } - if n == nil { - return nil, os.ErrNotExist - } - if flag&(os.O_WRONLY|os.O_RDWR) != 0 && flag&os.O_TRUNC != 0 { - n.mu.Lock() - n.data = nil - n.mu.Unlock() - } - } - - children := make([]os.FileInfo, 0, len(n.children)) - for cName, c := range n.children { - children = append(children, c.stat(cName)) - } - return &memFile{ - n: n, - nameSnapshot: frag, - childrenSnapshot: children, - }, nil -} - -func (fs *memFS) RemoveAll(ctx context.Context, name string) error { - fs.mu.Lock() - defer fs.mu.Unlock() - - dir, frag, err := fs.find("remove", name) - if err != nil { - return err - } - if dir == nil { - // We can't remove the root. - return os.ErrInvalid - } - delete(dir.children, frag) - return nil -} - -func (fs *memFS) Rename(ctx context.Context, oldName, newName string) error { - fs.mu.Lock() - defer fs.mu.Unlock() - - oldName = slashClean(oldName) - newName = slashClean(newName) - if oldName == newName { - return nil - } - if strings.HasPrefix(newName, oldName+"/") { - // We can't rename oldName to be a sub-directory of itself. - return os.ErrInvalid - } - - oDir, oFrag, err := fs.find("rename", oldName) - if err != nil { - return err - } - if oDir == nil { - // We can't rename from the root. - return os.ErrInvalid - } - - nDir, nFrag, err := fs.find("rename", newName) - if err != nil { - return err - } - if nDir == nil { - // We can't rename to the root. - return os.ErrInvalid - } - - oNode, ok := oDir.children[oFrag] - if !ok { - return os.ErrNotExist - } - if oNode.children != nil { - if nNode, ok := nDir.children[nFrag]; ok { - if nNode.children == nil { - return errNotADirectory - } - if len(nNode.children) != 0 { - return errDirectoryNotEmpty - } - } - } - delete(oDir.children, oFrag) - nDir.children[nFrag] = oNode - return nil -} - -func (fs *memFS) Stat(ctx context.Context, name string) (os.FileInfo, error) { - fs.mu.Lock() - defer fs.mu.Unlock() - - dir, frag, err := fs.find("stat", name) - if err != nil { - return nil, err - } - if dir == nil { - // We're stat'ting the root. - return fs.root.stat("/"), nil - } - if n, ok := dir.children[frag]; ok { - return n.stat(path.Base(name)), nil - } - return nil, os.ErrNotExist -} - -// A memFSNode represents a single entry in the in-memory filesystem and also -// implements os.FileInfo. -type memFSNode struct { - // children is protected by memFS.mu. - children map[string]*memFSNode - - mu sync.Mutex - data []byte - mode os.FileMode - modTime time.Time - deadProps map[xml.Name]Property -} - -func (n *memFSNode) stat(name string) *memFileInfo { - n.mu.Lock() - defer n.mu.Unlock() - return &memFileInfo{ - name: name, - size: int64(len(n.data)), - mode: n.mode, - modTime: n.modTime, - } -} - -func (n *memFSNode) DeadProps() (map[xml.Name]Property, error) { - n.mu.Lock() - defer n.mu.Unlock() - if len(n.deadProps) == 0 { - return nil, nil - } - ret := make(map[xml.Name]Property, len(n.deadProps)) - for k, v := range n.deadProps { - ret[k] = v - } - return ret, nil -} - -func (n *memFSNode) Patch(patches []Proppatch) ([]Propstat, error) { - n.mu.Lock() - defer n.mu.Unlock() - pstat := Propstat{Status: http.StatusOK} - for _, patch := range patches { - for _, p := range patch.Props { - pstat.Props = append(pstat.Props, Property{XMLName: p.XMLName}) - if patch.Remove { - delete(n.deadProps, p.XMLName) - continue - } - if n.deadProps == nil { - n.deadProps = map[xml.Name]Property{} - } - n.deadProps[p.XMLName] = p - } - } - return []Propstat{pstat}, nil -} - -type memFileInfo struct { - name string - size int64 - mode os.FileMode - modTime time.Time -} - -func (f *memFileInfo) Name() string { return f.name } -func (f *memFileInfo) Size() int64 { return f.size } -func (f *memFileInfo) Mode() os.FileMode { return f.mode } -func (f *memFileInfo) ModTime() time.Time { return f.modTime } -func (f *memFileInfo) IsDir() bool { return f.mode.IsDir() } -func (f *memFileInfo) Sys() interface{} { return nil } - -// A memFile is a File implementation for a memFSNode. It is a per-file (not -// per-node) read/write position, and a snapshot of the memFS' tree structure -// (a node's name and children) for that node. -type memFile struct { - n *memFSNode - nameSnapshot string - childrenSnapshot []os.FileInfo - // pos is protected by n.mu. - pos int -} - -// A *memFile implements the optional DeadPropsHolder interface. -var _ DeadPropsHolder = (*memFile)(nil) - -func (f *memFile) DeadProps() (map[xml.Name]Property, error) { return f.n.DeadProps() } -func (f *memFile) Patch(patches []Proppatch) ([]Propstat, error) { return f.n.Patch(patches) } - -func (f *memFile) Close() error { - return nil -} - -func (f *memFile) Read(p []byte) (int, error) { - f.n.mu.Lock() - defer f.n.mu.Unlock() - if f.n.mode.IsDir() { - return 0, os.ErrInvalid - } - if f.pos >= len(f.n.data) { - return 0, io.EOF - } - n := copy(p, f.n.data[f.pos:]) - f.pos += n - return n, nil -} - -func (f *memFile) Readdir(count int) ([]os.FileInfo, error) { - f.n.mu.Lock() - defer f.n.mu.Unlock() - if !f.n.mode.IsDir() { - return nil, os.ErrInvalid - } - old := f.pos - if old >= len(f.childrenSnapshot) { - // The os.File Readdir docs say that at the end of a directory, - // the error is io.EOF if count > 0 and nil if count <= 0. - if count > 0 { - return nil, io.EOF - } - return nil, nil - } - if count > 0 { - f.pos += count - if f.pos > len(f.childrenSnapshot) { - f.pos = len(f.childrenSnapshot) - } - } else { - f.pos = len(f.childrenSnapshot) - old = 0 - } - return f.childrenSnapshot[old:f.pos], nil -} - -func (f *memFile) Seek(offset int64, whence int) (int64, error) { - f.n.mu.Lock() - defer f.n.mu.Unlock() - npos := f.pos - // TODO: How to handle offsets greater than the size of system int? - switch whence { - case os.SEEK_SET: - npos = int(offset) - case os.SEEK_CUR: - npos += int(offset) - case os.SEEK_END: - npos = len(f.n.data) + int(offset) - default: - npos = -1 - } - if npos < 0 { - return 0, os.ErrInvalid - } - f.pos = npos - return int64(f.pos), nil -} - -func (f *memFile) Stat() (os.FileInfo, error) { - return f.n.stat(f.nameSnapshot), nil -} - -func (f *memFile) Write(p []byte) (int, error) { - lenp := len(p) - f.n.mu.Lock() - defer f.n.mu.Unlock() - - if f.n.mode.IsDir() { - return 0, os.ErrInvalid - } - if f.pos < len(f.n.data) { - n := copy(f.n.data[f.pos:], p) - f.pos += n - p = p[n:] - } else if f.pos > len(f.n.data) { - // Write permits the creation of holes, if we've seek'ed past the - // existing end of file. - if f.pos <= cap(f.n.data) { - oldLen := len(f.n.data) - f.n.data = f.n.data[:f.pos] - hole := f.n.data[oldLen:] - for i := range hole { - hole[i] = 0 - } - } else { - d := make([]byte, f.pos, f.pos+len(p)) - copy(d, f.n.data) - f.n.data = d - } - } - - if len(p) > 0 { - // We should only get here if f.pos == len(f.n.data). - f.n.data = append(f.n.data, p...) - f.pos = len(f.n.data) - } - f.n.modTime = time.Now() - return lenp, nil -} - -// moveFiles moves files and/or directories from src to dst. -// -// See section 9.9.4 for when various HTTP status codes apply. -func moveFiles(ctx context.Context, fs FileSystem, src, dst string, overwrite bool) (status int, err error) { - created := false - if _, err := fs.Stat(ctx, dst); err != nil { - if !os.IsNotExist(err) { - return http.StatusForbidden, err - } - created = true - } else if overwrite { - // Section 9.9.3 says that "If a resource exists at the destination - // and the Overwrite header is "T", then prior to performing the move, - // the server must perform a DELETE with "Depth: infinity" on the - // destination resource. - if err := fs.RemoveAll(ctx, dst); err != nil { - return http.StatusForbidden, err - } - } else { - return http.StatusPreconditionFailed, os.ErrExist - } - if err := fs.Rename(ctx, src, dst); err != nil { - return http.StatusForbidden, err - } - if created { - return http.StatusCreated, nil - } - return http.StatusNoContent, nil -} - -func copyProps(dst, src File) error { - d, ok := dst.(DeadPropsHolder) - if !ok { - return nil - } - s, ok := src.(DeadPropsHolder) - if !ok { - return nil - } - m, err := s.DeadProps() - if err != nil { - return err - } - props := make([]Property, 0, len(m)) - for _, prop := range m { - props = append(props, prop) - } - _, err = d.Patch([]Proppatch{{Props: props}}) - return err -} - -// copyFiles copies files and/or directories from src to dst. -// -// See section 9.8.5 for when various HTTP status codes apply. -func copyFiles(ctx context.Context, fs FileSystem, src, dst string, overwrite bool, depth int, recursion int) (status int, err error) { - if recursion == 1000 { - return http.StatusInternalServerError, errRecursionTooDeep - } - recursion++ - - // TODO: section 9.8.3 says that "Note that an infinite-depth COPY of /A/ - // into /A/B/ could lead to infinite recursion if not handled correctly." - - srcFile, err := fs.OpenFile(ctx, src, os.O_RDONLY, 0) - if err != nil { - if os.IsNotExist(err) { - return http.StatusNotFound, err - } - return http.StatusInternalServerError, err - } - defer srcFile.Close() - srcStat, err := srcFile.Stat() - if err != nil { - if os.IsNotExist(err) { - return http.StatusNotFound, err - } - return http.StatusInternalServerError, err - } - srcPerm := srcStat.Mode() & os.ModePerm - - created := false - if _, err := fs.Stat(ctx, dst); err != nil { - if os.IsNotExist(err) { - created = true - } else { - return http.StatusForbidden, err - } - } else { - if !overwrite { - return http.StatusPreconditionFailed, os.ErrExist - } - if err := fs.RemoveAll(ctx, dst); err != nil && !os.IsNotExist(err) { - return http.StatusForbidden, err - } - } - - if srcStat.IsDir() { - if err := fs.Mkdir(ctx, dst, srcPerm); err != nil { - return http.StatusForbidden, err - } - if depth == infiniteDepth { - children, err := srcFile.Readdir(-1) - if err != nil { - return http.StatusForbidden, err - } - for _, c := range children { - name := c.Name() - s := path.Join(src, name) - d := path.Join(dst, name) - cStatus, cErr := copyFiles(ctx, fs, s, d, overwrite, depth, recursion) - if cErr != nil { - // TODO: MultiStatus. - return cStatus, cErr - } - } - } - - } else { - dstFile, err := fs.OpenFile(ctx, dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, srcPerm) - if err != nil { - if os.IsNotExist(err) { - return http.StatusConflict, err - } - return http.StatusForbidden, err - - } - _, copyErr := io.Copy(dstFile, srcFile) - propsErr := copyProps(dstFile, srcFile) - closeErr := dstFile.Close() - if copyErr != nil { - return http.StatusInternalServerError, copyErr - } - if propsErr != nil { - return http.StatusInternalServerError, propsErr - } - if closeErr != nil { - return http.StatusInternalServerError, closeErr - } - } - - if created { - return http.StatusCreated, nil - } - return http.StatusNoContent, nil -} - -// walkFS traverses filesystem fs starting at name up to depth levels. -// -// Allowed values for depth are 0, 1 or infiniteDepth. For each visited node, -// walkFS calls walkFn. If a visited file system node is a directory and -// walkFn returns filepath.SkipDir, walkFS will skip traversal of this node. -func walkFS(ctx context.Context, fs FileSystem, depth int, name string, info os.FileInfo, walkFn filepath.WalkFunc) error { - // This implementation is based on Walk's code in the standard path/filepath package. - err := walkFn(name, info, nil) - if err != nil { - if info.IsDir() && err == filepath.SkipDir { - return nil - } - return err - } - if !info.IsDir() || depth == 0 { - return nil - } - if depth == 1 { - depth = 0 - } - - // Read directory names. - f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0) - if err != nil { - return walkFn(name, info, err) - } - fileInfos, err := f.Readdir(0) - f.Close() - if err != nil { - return walkFn(name, info, err) - } - - for _, fileInfo := range fileInfos { - filename := path.Join(name, fileInfo.Name()) - fileInfo, err := fs.Stat(ctx, filename) - if err != nil { - if err := walkFn(filename, fileInfo, err); err != nil && err != filepath.SkipDir { - return err - } - } else { - err = walkFS(ctx, fs, depth, filename, fileInfo, walkFn) - if err != nil { - if !fileInfo.IsDir() || err != filepath.SkipDir { - return err - } - } - } - } - return nil -} diff --git a/deps/golang.org/x/net/webdav/file_go1.6.go b/deps/golang.org/x/net/webdav/file_go1.6.go deleted file mode 100644 index fa387700d..000000000 --- a/deps/golang.org/x/net/webdav/file_go1.6.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.7 - -package webdav - -import ( - "net/http" - - "golang.org/x/net/context" -) - -func getContext(r *http.Request) context.Context { - return context.Background() -} diff --git a/deps/golang.org/x/net/webdav/file_go1.7.go b/deps/golang.org/x/net/webdav/file_go1.7.go deleted file mode 100644 index d1c3de832..000000000 --- a/deps/golang.org/x/net/webdav/file_go1.7.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.7 - -package webdav - -import ( - "context" - "net/http" -) - -func getContext(r *http.Request) context.Context { - return r.Context() -} diff --git a/deps/golang.org/x/net/webdav/file_test.go b/deps/golang.org/x/net/webdav/file_test.go deleted file mode 100644 index bfd96e193..000000000 --- a/deps/golang.org/x/net/webdav/file_test.go +++ /dev/null @@ -1,1184 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - "reflect" - "runtime" - "sort" - "strconv" - "strings" - "testing" - - "golang.org/x/net/context" -) - -func TestSlashClean(t *testing.T) { - testCases := []string{ - "", - ".", - "/", - "/./", - "//", - "//.", - "//a", - "/a", - "/a/b/c", - "/a//b/./../c/d/", - "a", - "a/b/c", - } - for _, tc := range testCases { - got := slashClean(tc) - want := path.Clean("/" + tc) - if got != want { - t.Errorf("tc=%q: got %q, want %q", tc, got, want) - } - } -} - -func TestDirResolve(t *testing.T) { - testCases := []struct { - dir, name, want string - }{ - {"/", "", "/"}, - {"/", "/", "/"}, - {"/", ".", "/"}, - {"/", "./a", "/a"}, - {"/", "..", "/"}, - {"/", "..", "/"}, - {"/", "../", "/"}, - {"/", "../.", "/"}, - {"/", "../a", "/a"}, - {"/", "../..", "/"}, - {"/", "../bar/a", "/bar/a"}, - {"/", "../baz/a", "/baz/a"}, - {"/", "...", "/..."}, - {"/", ".../a", "/.../a"}, - {"/", ".../..", "/"}, - {"/", "a", "/a"}, - {"/", "a/./b", "/a/b"}, - {"/", "a/../../b", "/b"}, - {"/", "a/../b", "/b"}, - {"/", "a/b", "/a/b"}, - {"/", "a/b/c/../../d", "/a/d"}, - {"/", "a/b/c/../../../d", "/d"}, - {"/", "a/b/c/../../../../d", "/d"}, - {"/", "a/b/c/d", "/a/b/c/d"}, - - {"/foo/bar", "", "/foo/bar"}, - {"/foo/bar", "/", "/foo/bar"}, - {"/foo/bar", ".", "/foo/bar"}, - {"/foo/bar", "./a", "/foo/bar/a"}, - {"/foo/bar", "..", "/foo/bar"}, - {"/foo/bar", "../", "/foo/bar"}, - {"/foo/bar", "../.", "/foo/bar"}, - {"/foo/bar", "../a", "/foo/bar/a"}, - {"/foo/bar", "../..", "/foo/bar"}, - {"/foo/bar", "../bar/a", "/foo/bar/bar/a"}, - {"/foo/bar", "../baz/a", "/foo/bar/baz/a"}, - {"/foo/bar", "...", "/foo/bar/..."}, - {"/foo/bar", ".../a", "/foo/bar/.../a"}, - {"/foo/bar", ".../..", "/foo/bar"}, - {"/foo/bar", "a", "/foo/bar/a"}, - {"/foo/bar", "a/./b", "/foo/bar/a/b"}, - {"/foo/bar", "a/../../b", "/foo/bar/b"}, - {"/foo/bar", "a/../b", "/foo/bar/b"}, - {"/foo/bar", "a/b", "/foo/bar/a/b"}, - {"/foo/bar", "a/b/c/../../d", "/foo/bar/a/d"}, - {"/foo/bar", "a/b/c/../../../d", "/foo/bar/d"}, - {"/foo/bar", "a/b/c/../../../../d", "/foo/bar/d"}, - {"/foo/bar", "a/b/c/d", "/foo/bar/a/b/c/d"}, - - {"/foo/bar/", "", "/foo/bar"}, - {"/foo/bar/", "/", "/foo/bar"}, - {"/foo/bar/", ".", "/foo/bar"}, - {"/foo/bar/", "./a", "/foo/bar/a"}, - {"/foo/bar/", "..", "/foo/bar"}, - - {"/foo//bar///", "", "/foo/bar"}, - {"/foo//bar///", "/", "/foo/bar"}, - {"/foo//bar///", ".", "/foo/bar"}, - {"/foo//bar///", "./a", "/foo/bar/a"}, - {"/foo//bar///", "..", "/foo/bar"}, - - {"/x/y/z", "ab/c\x00d/ef", ""}, - - {".", "", "."}, - {".", "/", "."}, - {".", ".", "."}, - {".", "./a", "a"}, - {".", "..", "."}, - {".", "..", "."}, - {".", "../", "."}, - {".", "../.", "."}, - {".", "../a", "a"}, - {".", "../..", "."}, - {".", "../bar/a", "bar/a"}, - {".", "../baz/a", "baz/a"}, - {".", "...", "..."}, - {".", ".../a", ".../a"}, - {".", ".../..", "."}, - {".", "a", "a"}, - {".", "a/./b", "a/b"}, - {".", "a/../../b", "b"}, - {".", "a/../b", "b"}, - {".", "a/b", "a/b"}, - {".", "a/b/c/../../d", "a/d"}, - {".", "a/b/c/../../../d", "d"}, - {".", "a/b/c/../../../../d", "d"}, - {".", "a/b/c/d", "a/b/c/d"}, - - {"", "", "."}, - {"", "/", "."}, - {"", ".", "."}, - {"", "./a", "a"}, - {"", "..", "."}, - } - - for _, tc := range testCases { - d := Dir(filepath.FromSlash(tc.dir)) - if got := filepath.ToSlash(d.resolve(tc.name)); got != tc.want { - t.Errorf("dir=%q, name=%q: got %q, want %q", tc.dir, tc.name, got, tc.want) - } - } -} - -func TestWalk(t *testing.T) { - type walkStep struct { - name, frag string - final bool - } - - testCases := []struct { - dir string - want []walkStep - }{ - {"", []walkStep{ - {"", "", true}, - }}, - {"/", []walkStep{ - {"", "", true}, - }}, - {"/a", []walkStep{ - {"", "a", true}, - }}, - {"/a/", []walkStep{ - {"", "a", true}, - }}, - {"/a/b", []walkStep{ - {"", "a", false}, - {"a", "b", true}, - }}, - {"/a/b/", []walkStep{ - {"", "a", false}, - {"a", "b", true}, - }}, - {"/a/b/c", []walkStep{ - {"", "a", false}, - {"a", "b", false}, - {"b", "c", true}, - }}, - // The following test case is the one mentioned explicitly - // in the method description. - {"/foo/bar/x", []walkStep{ - {"", "foo", false}, - {"foo", "bar", false}, - {"bar", "x", true}, - }}, - } - - ctx := context.Background() - - for _, tc := range testCases { - fs := NewMemFS().(*memFS) - - parts := strings.Split(tc.dir, "/") - for p := 2; p < len(parts); p++ { - d := strings.Join(parts[:p], "/") - if err := fs.Mkdir(ctx, d, 0666); err != nil { - t.Errorf("tc.dir=%q: mkdir: %q: %v", tc.dir, d, err) - } - } - - i, prevFrag := 0, "" - err := fs.walk("test", tc.dir, func(dir *memFSNode, frag string, final bool) error { - got := walkStep{ - name: prevFrag, - frag: frag, - final: final, - } - want := tc.want[i] - - if got != want { - return fmt.Errorf("got %+v, want %+v", got, want) - } - i, prevFrag = i+1, frag - return nil - }) - if err != nil { - t.Errorf("tc.dir=%q: %v", tc.dir, err) - } - } -} - -// find appends to ss the names of the named file and its children. It is -// analogous to the Unix find command. -// -// The returned strings are not guaranteed to be in any particular order. -func find(ctx context.Context, ss []string, fs FileSystem, name string) ([]string, error) { - stat, err := fs.Stat(ctx, name) - if err != nil { - return nil, err - } - ss = append(ss, name) - if stat.IsDir() { - f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0) - if err != nil { - return nil, err - } - defer f.Close() - children, err := f.Readdir(-1) - if err != nil { - return nil, err - } - for _, c := range children { - ss, err = find(ctx, ss, fs, path.Join(name, c.Name())) - if err != nil { - return nil, err - } - } - } - return ss, nil -} - -func testFS(t *testing.T, fs FileSystem) { - errStr := func(err error) string { - switch { - case os.IsExist(err): - return "errExist" - case os.IsNotExist(err): - return "errNotExist" - case err != nil: - return "err" - } - return "ok" - } - - // The non-"find" non-"stat" test cases should change the file system state. The - // indentation of the "find"s and "stat"s helps distinguish such test cases. - testCases := []string{ - " stat / want dir", - " stat /a want errNotExist", - " stat /d want errNotExist", - " stat /d/e want errNotExist", - "create /a A want ok", - " stat /a want 1", - "create /d/e EEE want errNotExist", - "mk-dir /a want errExist", - "mk-dir /d/m want errNotExist", - "mk-dir /d want ok", - " stat /d want dir", - "create /d/e EEE want ok", - " stat /d/e want 3", - " find / /a /d /d/e", - "create /d/f FFFF want ok", - "create /d/g GGGGGGG want ok", - "mk-dir /d/m want ok", - "mk-dir /d/m want errExist", - "create /d/m/p PPPPP want ok", - " stat /d/e want 3", - " stat /d/f want 4", - " stat /d/g want 7", - " stat /d/h want errNotExist", - " stat /d/m want dir", - " stat /d/m/p want 5", - " find / /a /d /d/e /d/f /d/g /d/m /d/m/p", - "rm-all /d want ok", - " stat /a want 1", - " stat /d want errNotExist", - " stat /d/e want errNotExist", - " stat /d/f want errNotExist", - " stat /d/g want errNotExist", - " stat /d/m want errNotExist", - " stat /d/m/p want errNotExist", - " find / /a", - "mk-dir /d/m want errNotExist", - "mk-dir /d want ok", - "create /d/f FFFF want ok", - "rm-all /d/f want ok", - "mk-dir /d/m want ok", - "rm-all /z want ok", - "rm-all / want err", - "create /b BB want ok", - " stat / want dir", - " stat /a want 1", - " stat /b want 2", - " stat /c want errNotExist", - " stat /d want dir", - " stat /d/m want dir", - " find / /a /b /d /d/m", - "move__ o=F /b /c want ok", - " stat /b want errNotExist", - " stat /c want 2", - " stat /d/m want dir", - " stat /d/n want errNotExist", - " find / /a /c /d /d/m", - "move__ o=F /d/m /d/n want ok", - "create /d/n/q QQQQ want ok", - " stat /d/m want errNotExist", - " stat /d/n want dir", - " stat /d/n/q want 4", - "move__ o=F /d /d/n/z want err", - "move__ o=T /c /d/n/q want ok", - " stat /c want errNotExist", - " stat /d/n/q want 2", - " find / /a /d /d/n /d/n/q", - "create /d/n/r RRRRR want ok", - "mk-dir /u want ok", - "mk-dir /u/v want ok", - "move__ o=F /d/n /u want errExist", - "create /t TTTTTT want ok", - "move__ o=F /d/n /t want errExist", - "rm-all /t want ok", - "move__ o=F /d/n /t want ok", - " stat /d want dir", - " stat /d/n want errNotExist", - " stat /d/n/r want errNotExist", - " stat /t want dir", - " stat /t/q want 2", - " stat /t/r want 5", - " find / /a /d /t /t/q /t/r /u /u/v", - "move__ o=F /t / want errExist", - "move__ o=T /t /u/v want ok", - " stat /u/v/r want 5", - "move__ o=F / /z want err", - " find / /a /d /u /u/v /u/v/q /u/v/r", - " stat /a want 1", - " stat /b want errNotExist", - " stat /c want errNotExist", - " stat /u/v/r want 5", - "copy__ o=F d=0 /a /b want ok", - "copy__ o=T d=0 /a /c want ok", - " stat /a want 1", - " stat /b want 1", - " stat /c want 1", - " stat /u/v/r want 5", - "copy__ o=F d=0 /u/v/r /b want errExist", - " stat /b want 1", - "copy__ o=T d=0 /u/v/r /b want ok", - " stat /a want 1", - " stat /b want 5", - " stat /u/v/r want 5", - "rm-all /a want ok", - "rm-all /b want ok", - "mk-dir /u/v/w want ok", - "create /u/v/w/s SSSSSSSS want ok", - " stat /d want dir", - " stat /d/x want errNotExist", - " stat /d/y want errNotExist", - " stat /u/v/r want 5", - " stat /u/v/w/s want 8", - " find / /c /d /u /u/v /u/v/q /u/v/r /u/v/w /u/v/w/s", - "copy__ o=T d=0 /u/v /d/x want ok", - "copy__ o=T d=∞ /u/v /d/y want ok", - "rm-all /u want ok", - " stat /d/x want dir", - " stat /d/x/q want errNotExist", - " stat /d/x/r want errNotExist", - " stat /d/x/w want errNotExist", - " stat /d/x/w/s want errNotExist", - " stat /d/y want dir", - " stat /d/y/q want 2", - " stat /d/y/r want 5", - " stat /d/y/w want dir", - " stat /d/y/w/s want 8", - " stat /u want errNotExist", - " find / /c /d /d/x /d/y /d/y/q /d/y/r /d/y/w /d/y/w/s", - "copy__ o=F d=∞ /d/y /d/x want errExist", - } - - ctx := context.Background() - - for i, tc := range testCases { - tc = strings.TrimSpace(tc) - j := strings.IndexByte(tc, ' ') - if j < 0 { - t.Fatalf("test case #%d %q: invalid command", i, tc) - } - op, arg := tc[:j], tc[j+1:] - - switch op { - default: - t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op) - - case "create": - parts := strings.Split(arg, " ") - if len(parts) != 4 || parts[2] != "want" { - t.Fatalf("test case #%d %q: invalid write", i, tc) - } - f, opErr := fs.OpenFile(ctx, parts[0], os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if got := errStr(opErr); got != parts[3] { - t.Fatalf("test case #%d %q: OpenFile: got %q (%v), want %q", i, tc, got, opErr, parts[3]) - } - if f != nil { - if _, err := f.Write([]byte(parts[1])); err != nil { - t.Fatalf("test case #%d %q: Write: %v", i, tc, err) - } - if err := f.Close(); err != nil { - t.Fatalf("test case #%d %q: Close: %v", i, tc, err) - } - } - - case "find": - got, err := find(ctx, nil, fs, "/") - if err != nil { - t.Fatalf("test case #%d %q: find: %v", i, tc, err) - } - sort.Strings(got) - want := strings.Split(arg, " ") - if !reflect.DeepEqual(got, want) { - t.Fatalf("test case #%d %q:\ngot %s\nwant %s", i, tc, got, want) - } - - case "copy__", "mk-dir", "move__", "rm-all", "stat": - nParts := 3 - switch op { - case "copy__": - nParts = 6 - case "move__": - nParts = 5 - } - parts := strings.Split(arg, " ") - if len(parts) != nParts { - t.Fatalf("test case #%d %q: invalid %s", i, tc, op) - } - - got, opErr := "", error(nil) - switch op { - case "copy__": - depth := 0 - if parts[1] == "d=∞" { - depth = infiniteDepth - } - _, opErr = copyFiles(ctx, fs, parts[2], parts[3], parts[0] == "o=T", depth, 0) - case "mk-dir": - opErr = fs.Mkdir(ctx, parts[0], 0777) - case "move__": - _, opErr = moveFiles(ctx, fs, parts[1], parts[2], parts[0] == "o=T") - case "rm-all": - opErr = fs.RemoveAll(ctx, parts[0]) - case "stat": - var stat os.FileInfo - fileName := parts[0] - if stat, opErr = fs.Stat(ctx, fileName); opErr == nil { - if stat.IsDir() { - got = "dir" - } else { - got = strconv.Itoa(int(stat.Size())) - } - - if fileName == "/" { - // For a Dir FileSystem, the virtual file system root maps to a - // real file system name like "/tmp/webdav-test012345", which does - // not end with "/". We skip such cases. - } else if statName := stat.Name(); path.Base(fileName) != statName { - t.Fatalf("test case #%d %q: file name %q inconsistent with stat name %q", - i, tc, fileName, statName) - } - } - } - if got == "" { - got = errStr(opErr) - } - - if parts[len(parts)-2] != "want" { - t.Fatalf("test case #%d %q: invalid %s", i, tc, op) - } - if want := parts[len(parts)-1]; got != want { - t.Fatalf("test case #%d %q: got %q (%v), want %q", i, tc, got, opErr, want) - } - } - } -} - -func TestDir(t *testing.T) { - switch runtime.GOOS { - case "nacl": - t.Skip("see golang.org/issue/12004") - case "plan9": - t.Skip("see golang.org/issue/11453") - } - - td, err := ioutil.TempDir("", "webdav-test") - if err != nil { - t.Fatal(err) - } - defer os.RemoveAll(td) - testFS(t, Dir(td)) -} - -func TestMemFS(t *testing.T) { - testFS(t, NewMemFS()) -} - -func TestMemFSRoot(t *testing.T) { - ctx := context.Background() - fs := NewMemFS() - for i := 0; i < 5; i++ { - stat, err := fs.Stat(ctx, "/") - if err != nil { - t.Fatalf("i=%d: Stat: %v", i, err) - } - if !stat.IsDir() { - t.Fatalf("i=%d: Stat.IsDir is false, want true", i) - } - - f, err := fs.OpenFile(ctx, "/", os.O_RDONLY, 0) - if err != nil { - t.Fatalf("i=%d: OpenFile: %v", i, err) - } - defer f.Close() - children, err := f.Readdir(-1) - if err != nil { - t.Fatalf("i=%d: Readdir: %v", i, err) - } - if len(children) != i { - t.Fatalf("i=%d: got %d children, want %d", i, len(children), i) - } - - if _, err := f.Write(make([]byte, 1)); err == nil { - t.Fatalf("i=%d: Write: got nil error, want non-nil", i) - } - - if err := fs.Mkdir(ctx, fmt.Sprintf("/dir%d", i), 0777); err != nil { - t.Fatalf("i=%d: Mkdir: %v", i, err) - } - } -} - -func TestMemFileReaddir(t *testing.T) { - ctx := context.Background() - fs := NewMemFS() - if err := fs.Mkdir(ctx, "/foo", 0777); err != nil { - t.Fatalf("Mkdir: %v", err) - } - readdir := func(count int) ([]os.FileInfo, error) { - f, err := fs.OpenFile(ctx, "/foo", os.O_RDONLY, 0) - if err != nil { - t.Fatalf("OpenFile: %v", err) - } - defer f.Close() - return f.Readdir(count) - } - if got, err := readdir(-1); len(got) != 0 || err != nil { - t.Fatalf("readdir(-1): got %d fileInfos with err=%v, want 0, ", len(got), err) - } - if got, err := readdir(+1); len(got) != 0 || err != io.EOF { - t.Fatalf("readdir(+1): got %d fileInfos with err=%v, want 0, EOF", len(got), err) - } -} - -func TestMemFile(t *testing.T) { - testCases := []string{ - "wantData ", - "wantSize 0", - "write abc", - "wantData abc", - "write de", - "wantData abcde", - "wantSize 5", - "write 5*x", - "write 4*y+2*z", - "write 3*st", - "wantData abcdexxxxxyyyyzzststst", - "wantSize 22", - "seek set 4 want 4", - "write EFG", - "wantData abcdEFGxxxyyyyzzststst", - "wantSize 22", - "seek set 2 want 2", - "read cdEF", - "read Gx", - "seek cur 0 want 8", - "seek cur 2 want 10", - "seek cur -1 want 9", - "write J", - "wantData abcdEFGxxJyyyyzzststst", - "wantSize 22", - "seek cur -4 want 6", - "write ghijk", - "wantData abcdEFghijkyyyzzststst", - "wantSize 22", - "read yyyz", - "seek cur 0 want 15", - "write ", - "seek cur 0 want 15", - "read ", - "seek cur 0 want 15", - "seek end -3 want 19", - "write ZZ", - "wantData abcdEFghijkyyyzzstsZZt", - "wantSize 22", - "write 4*A", - "wantData abcdEFghijkyyyzzstsZZAAAA", - "wantSize 25", - "seek end 0 want 25", - "seek end -5 want 20", - "read Z+4*A", - "write 5*B", - "wantData abcdEFghijkyyyzzstsZZAAAABBBBB", - "wantSize 30", - "seek end 10 want 40", - "write C", - "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........C", - "wantSize 41", - "write D", - "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........CD", - "wantSize 42", - "seek set 43 want 43", - "write E", - "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........CD.E", - "wantSize 44", - "seek set 0 want 0", - "write 5*123456789_", - "wantData 123456789_123456789_123456789_123456789_123456789_", - "wantSize 50", - "seek cur 0 want 50", - "seek cur -99 want err", - } - - ctx := context.Background() - - const filename = "/foo" - fs := NewMemFS() - f, err := fs.OpenFile(ctx, filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if err != nil { - t.Fatalf("OpenFile: %v", err) - } - defer f.Close() - - for i, tc := range testCases { - j := strings.IndexByte(tc, ' ') - if j < 0 { - t.Fatalf("test case #%d %q: invalid command", i, tc) - } - op, arg := tc[:j], tc[j+1:] - - // Expand an arg like "3*a+2*b" to "aaabb". - parts := strings.Split(arg, "+") - for j, part := range parts { - if k := strings.IndexByte(part, '*'); k >= 0 { - repeatCount, repeatStr := part[:k], part[k+1:] - n, err := strconv.Atoi(repeatCount) - if err != nil { - t.Fatalf("test case #%d %q: invalid repeat count %q", i, tc, repeatCount) - } - parts[j] = strings.Repeat(repeatStr, n) - } - } - arg = strings.Join(parts, "") - - switch op { - default: - t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op) - - case "read": - buf := make([]byte, len(arg)) - if _, err := io.ReadFull(f, buf); err != nil { - t.Fatalf("test case #%d %q: ReadFull: %v", i, tc, err) - } - if got := string(buf); got != arg { - t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, arg) - } - - case "seek": - parts := strings.Split(arg, " ") - if len(parts) != 4 { - t.Fatalf("test case #%d %q: invalid seek", i, tc) - } - - whence := 0 - switch parts[0] { - default: - t.Fatalf("test case #%d %q: invalid seek whence", i, tc) - case "set": - whence = os.SEEK_SET - case "cur": - whence = os.SEEK_CUR - case "end": - whence = os.SEEK_END - } - offset, err := strconv.Atoi(parts[1]) - if err != nil { - t.Fatalf("test case #%d %q: invalid offset %q", i, tc, parts[1]) - } - - if parts[2] != "want" { - t.Fatalf("test case #%d %q: invalid seek", i, tc) - } - if parts[3] == "err" { - _, err := f.Seek(int64(offset), whence) - if err == nil { - t.Fatalf("test case #%d %q: Seek returned nil error, want non-nil", i, tc) - } - } else { - got, err := f.Seek(int64(offset), whence) - if err != nil { - t.Fatalf("test case #%d %q: Seek: %v", i, tc, err) - } - want, err := strconv.Atoi(parts[3]) - if err != nil { - t.Fatalf("test case #%d %q: invalid want %q", i, tc, parts[3]) - } - if got != int64(want) { - t.Fatalf("test case #%d %q: got %d, want %d", i, tc, got, want) - } - } - - case "write": - n, err := f.Write([]byte(arg)) - if err != nil { - t.Fatalf("test case #%d %q: write: %v", i, tc, err) - } - if n != len(arg) { - t.Fatalf("test case #%d %q: write returned %d bytes, want %d", i, tc, n, len(arg)) - } - - case "wantData": - g, err := fs.OpenFile(ctx, filename, os.O_RDONLY, 0666) - if err != nil { - t.Fatalf("test case #%d %q: OpenFile: %v", i, tc, err) - } - gotBytes, err := ioutil.ReadAll(g) - if err != nil { - t.Fatalf("test case #%d %q: ReadAll: %v", i, tc, err) - } - for i, c := range gotBytes { - if c == '\x00' { - gotBytes[i] = '.' - } - } - got := string(gotBytes) - if got != arg { - t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, arg) - } - if err := g.Close(); err != nil { - t.Fatalf("test case #%d %q: Close: %v", i, tc, err) - } - - case "wantSize": - n, err := strconv.Atoi(arg) - if err != nil { - t.Fatalf("test case #%d %q: invalid size %q", i, tc, arg) - } - fi, err := fs.Stat(ctx, filename) - if err != nil { - t.Fatalf("test case #%d %q: Stat: %v", i, tc, err) - } - if got, want := fi.Size(), int64(n); got != want { - t.Fatalf("test case #%d %q: got %d, want %d", i, tc, got, want) - } - } - } -} - -// TestMemFileWriteAllocs tests that writing N consecutive 1KiB chunks to a -// memFile doesn't allocate a new buffer for each of those N times. Otherwise, -// calling io.Copy(aMemFile, src) is likely to have quadratic complexity. -func TestMemFileWriteAllocs(t *testing.T) { - if runtime.Compiler == "gccgo" { - t.Skip("gccgo allocates here") - } - ctx := context.Background() - fs := NewMemFS() - f, err := fs.OpenFile(ctx, "/xxx", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if err != nil { - t.Fatalf("OpenFile: %v", err) - } - defer f.Close() - - xxx := make([]byte, 1024) - for i := range xxx { - xxx[i] = 'x' - } - - a := testing.AllocsPerRun(100, func() { - f.Write(xxx) - }) - // AllocsPerRun returns an integral value, so we compare the rounded-down - // number to zero. - if a > 0 { - t.Fatalf("%v allocs per run, want 0", a) - } -} - -func BenchmarkMemFileWrite(b *testing.B) { - ctx := context.Background() - fs := NewMemFS() - xxx := make([]byte, 1024) - for i := range xxx { - xxx[i] = 'x' - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - f, err := fs.OpenFile(ctx, "/xxx", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if err != nil { - b.Fatalf("OpenFile: %v", err) - } - for j := 0; j < 100; j++ { - f.Write(xxx) - } - if err := f.Close(); err != nil { - b.Fatalf("Close: %v", err) - } - if err := fs.RemoveAll(ctx, "/xxx"); err != nil { - b.Fatalf("RemoveAll: %v", err) - } - } -} - -func TestCopyMoveProps(t *testing.T) { - ctx := context.Background() - fs := NewMemFS() - create := func(name string) error { - f, err := fs.OpenFile(ctx, name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if err != nil { - return err - } - _, wErr := f.Write([]byte("contents")) - cErr := f.Close() - if wErr != nil { - return wErr - } - return cErr - } - patch := func(name string, patches ...Proppatch) error { - f, err := fs.OpenFile(ctx, name, os.O_RDWR, 0666) - if err != nil { - return err - } - _, pErr := f.(DeadPropsHolder).Patch(patches) - cErr := f.Close() - if pErr != nil { - return pErr - } - return cErr - } - props := func(name string) (map[xml.Name]Property, error) { - f, err := fs.OpenFile(ctx, name, os.O_RDWR, 0666) - if err != nil { - return nil, err - } - m, pErr := f.(DeadPropsHolder).DeadProps() - cErr := f.Close() - if pErr != nil { - return nil, pErr - } - if cErr != nil { - return nil, cErr - } - return m, nil - } - - p0 := Property{ - XMLName: xml.Name{Space: "x:", Local: "boat"}, - InnerXML: []byte("pea-green"), - } - p1 := Property{ - XMLName: xml.Name{Space: "x:", Local: "ring"}, - InnerXML: []byte("1 shilling"), - } - p2 := Property{ - XMLName: xml.Name{Space: "x:", Local: "spoon"}, - InnerXML: []byte("runcible"), - } - p3 := Property{ - XMLName: xml.Name{Space: "x:", Local: "moon"}, - InnerXML: []byte("light"), - } - - if err := create("/src"); err != nil { - t.Fatalf("create /src: %v", err) - } - if err := patch("/src", Proppatch{Props: []Property{p0, p1}}); err != nil { - t.Fatalf("patch /src +p0 +p1: %v", err) - } - if _, err := copyFiles(ctx, fs, "/src", "/tmp", true, infiniteDepth, 0); err != nil { - t.Fatalf("copyFiles /src /tmp: %v", err) - } - if _, err := moveFiles(ctx, fs, "/tmp", "/dst", true); err != nil { - t.Fatalf("moveFiles /tmp /dst: %v", err) - } - if err := patch("/src", Proppatch{Props: []Property{p0}, Remove: true}); err != nil { - t.Fatalf("patch /src -p0: %v", err) - } - if err := patch("/src", Proppatch{Props: []Property{p2}}); err != nil { - t.Fatalf("patch /src +p2: %v", err) - } - if err := patch("/dst", Proppatch{Props: []Property{p1}, Remove: true}); err != nil { - t.Fatalf("patch /dst -p1: %v", err) - } - if err := patch("/dst", Proppatch{Props: []Property{p3}}); err != nil { - t.Fatalf("patch /dst +p3: %v", err) - } - - gotSrc, err := props("/src") - if err != nil { - t.Fatalf("props /src: %v", err) - } - wantSrc := map[xml.Name]Property{ - p1.XMLName: p1, - p2.XMLName: p2, - } - if !reflect.DeepEqual(gotSrc, wantSrc) { - t.Fatalf("props /src:\ngot %v\nwant %v", gotSrc, wantSrc) - } - - gotDst, err := props("/dst") - if err != nil { - t.Fatalf("props /dst: %v", err) - } - wantDst := map[xml.Name]Property{ - p0.XMLName: p0, - p3.XMLName: p3, - } - if !reflect.DeepEqual(gotDst, wantDst) { - t.Fatalf("props /dst:\ngot %v\nwant %v", gotDst, wantDst) - } -} - -func TestWalkFS(t *testing.T) { - testCases := []struct { - desc string - buildfs []string - startAt string - depth int - walkFn filepath.WalkFunc - want []string - }{{ - "just root", - []string{}, - "/", - infiniteDepth, - nil, - []string{ - "/", - }, - }, { - "infinite walk from root", - []string{ - "mkdir /a", - "mkdir /a/b", - "touch /a/b/c", - "mkdir /a/d", - "mkdir /e", - "touch /f", - }, - "/", - infiniteDepth, - nil, - []string{ - "/", - "/a", - "/a/b", - "/a/b/c", - "/a/d", - "/e", - "/f", - }, - }, { - "infinite walk from subdir", - []string{ - "mkdir /a", - "mkdir /a/b", - "touch /a/b/c", - "mkdir /a/d", - "mkdir /e", - "touch /f", - }, - "/a", - infiniteDepth, - nil, - []string{ - "/a", - "/a/b", - "/a/b/c", - "/a/d", - }, - }, { - "depth 1 walk from root", - []string{ - "mkdir /a", - "mkdir /a/b", - "touch /a/b/c", - "mkdir /a/d", - "mkdir /e", - "touch /f", - }, - "/", - 1, - nil, - []string{ - "/", - "/a", - "/e", - "/f", - }, - }, { - "depth 1 walk from subdir", - []string{ - "mkdir /a", - "mkdir /a/b", - "touch /a/b/c", - "mkdir /a/b/g", - "mkdir /a/b/g/h", - "touch /a/b/g/i", - "touch /a/b/g/h/j", - }, - "/a/b", - 1, - nil, - []string{ - "/a/b", - "/a/b/c", - "/a/b/g", - }, - }, { - "depth 0 walk from subdir", - []string{ - "mkdir /a", - "mkdir /a/b", - "touch /a/b/c", - "mkdir /a/b/g", - "mkdir /a/b/g/h", - "touch /a/b/g/i", - "touch /a/b/g/h/j", - }, - "/a/b", - 0, - nil, - []string{ - "/a/b", - }, - }, { - "infinite walk from file", - []string{ - "mkdir /a", - "touch /a/b", - "touch /a/c", - }, - "/a/b", - 0, - nil, - []string{ - "/a/b", - }, - }, { - "infinite walk with skipped subdir", - []string{ - "mkdir /a", - "mkdir /a/b", - "touch /a/b/c", - "mkdir /a/b/g", - "mkdir /a/b/g/h", - "touch /a/b/g/i", - "touch /a/b/g/h/j", - "touch /a/b/z", - }, - "/", - infiniteDepth, - func(path string, info os.FileInfo, err error) error { - if path == "/a/b/g" { - return filepath.SkipDir - } - return nil - }, - []string{ - "/", - "/a", - "/a/b", - "/a/b/c", - "/a/b/z", - }, - }} - ctx := context.Background() - for _, tc := range testCases { - fs, err := buildTestFS(tc.buildfs) - if err != nil { - t.Fatalf("%s: cannot create test filesystem: %v", tc.desc, err) - } - var got []string - traceFn := func(path string, info os.FileInfo, err error) error { - if tc.walkFn != nil { - err = tc.walkFn(path, info, err) - if err != nil { - return err - } - } - got = append(got, path) - return nil - } - fi, err := fs.Stat(ctx, tc.startAt) - if err != nil { - t.Fatalf("%s: cannot stat: %v", tc.desc, err) - } - err = walkFS(ctx, fs, tc.depth, tc.startAt, fi, traceFn) - if err != nil { - t.Errorf("%s:\ngot error %v, want nil", tc.desc, err) - continue - } - sort.Strings(got) - sort.Strings(tc.want) - if !reflect.DeepEqual(got, tc.want) { - t.Errorf("%s:\ngot %q\nwant %q", tc.desc, got, tc.want) - continue - } - } -} - -func buildTestFS(buildfs []string) (FileSystem, error) { - // TODO: Could this be merged with the build logic in TestFS? - - ctx := context.Background() - fs := NewMemFS() - for _, b := range buildfs { - op := strings.Split(b, " ") - switch op[0] { - case "mkdir": - err := fs.Mkdir(ctx, op[1], os.ModeDir|0777) - if err != nil { - return nil, err - } - case "touch": - f, err := fs.OpenFile(ctx, op[1], os.O_RDWR|os.O_CREATE, 0666) - if err != nil { - return nil, err - } - f.Close() - case "write": - f, err := fs.OpenFile(ctx, op[1], os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if err != nil { - return nil, err - } - _, err = f.Write([]byte(op[2])) - f.Close() - if err != nil { - return nil, err - } - default: - return nil, fmt.Errorf("unknown file operation %q", op[0]) - } - } - return fs, nil -} diff --git a/deps/golang.org/x/net/webdav/if.go b/deps/golang.org/x/net/webdav/if.go deleted file mode 100644 index 416e81cdf..000000000 --- a/deps/golang.org/x/net/webdav/if.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -// The If header is covered by Section 10.4. -// http://www.webdav.org/specs/rfc4918.html#HEADER_If - -import ( - "strings" -) - -// ifHeader is a disjunction (OR) of ifLists. -type ifHeader struct { - lists []ifList -} - -// ifList is a conjunction (AND) of Conditions, and an optional resource tag. -type ifList struct { - resourceTag string - conditions []Condition -} - -// parseIfHeader parses the "If: foo bar" HTTP header. The httpHeader string -// should omit the "If:" prefix and have any "\r\n"s collapsed to a " ", as is -// returned by req.Header.Get("If") for a http.Request req. -func parseIfHeader(httpHeader string) (h ifHeader, ok bool) { - s := strings.TrimSpace(httpHeader) - switch tokenType, _, _ := lex(s); tokenType { - case '(': - return parseNoTagLists(s) - case angleTokenType: - return parseTaggedLists(s) - default: - return ifHeader{}, false - } -} - -func parseNoTagLists(s string) (h ifHeader, ok bool) { - for { - l, remaining, ok := parseList(s) - if !ok { - return ifHeader{}, false - } - h.lists = append(h.lists, l) - if remaining == "" { - return h, true - } - s = remaining - } -} - -func parseTaggedLists(s string) (h ifHeader, ok bool) { - resourceTag, n := "", 0 - for first := true; ; first = false { - tokenType, tokenStr, remaining := lex(s) - switch tokenType { - case angleTokenType: - if !first && n == 0 { - return ifHeader{}, false - } - resourceTag, n = tokenStr, 0 - s = remaining - case '(': - n++ - l, remaining, ok := parseList(s) - if !ok { - return ifHeader{}, false - } - l.resourceTag = resourceTag - h.lists = append(h.lists, l) - if remaining == "" { - return h, true - } - s = remaining - default: - return ifHeader{}, false - } - } -} - -func parseList(s string) (l ifList, remaining string, ok bool) { - tokenType, _, s := lex(s) - if tokenType != '(' { - return ifList{}, "", false - } - for { - tokenType, _, remaining = lex(s) - if tokenType == ')' { - if len(l.conditions) == 0 { - return ifList{}, "", false - } - return l, remaining, true - } - c, remaining, ok := parseCondition(s) - if !ok { - return ifList{}, "", false - } - l.conditions = append(l.conditions, c) - s = remaining - } -} - -func parseCondition(s string) (c Condition, remaining string, ok bool) { - tokenType, tokenStr, s := lex(s) - if tokenType == notTokenType { - c.Not = true - tokenType, tokenStr, s = lex(s) - } - switch tokenType { - case strTokenType, angleTokenType: - c.Token = tokenStr - case squareTokenType: - c.ETag = tokenStr - default: - return Condition{}, "", false - } - return c, s, true -} - -// Single-rune tokens like '(' or ')' have a token type equal to their rune. -// All other tokens have a negative token type. -const ( - errTokenType = rune(-1) - eofTokenType = rune(-2) - strTokenType = rune(-3) - notTokenType = rune(-4) - angleTokenType = rune(-5) - squareTokenType = rune(-6) -) - -func lex(s string) (tokenType rune, tokenStr string, remaining string) { - // The net/textproto Reader that parses the HTTP header will collapse - // Linear White Space that spans multiple "\r\n" lines to a single " ", - // so we don't need to look for '\r' or '\n'. - for len(s) > 0 && (s[0] == '\t' || s[0] == ' ') { - s = s[1:] - } - if len(s) == 0 { - return eofTokenType, "", "" - } - i := 0 -loop: - for ; i < len(s); i++ { - switch s[i] { - case '\t', ' ', '(', ')', '<', '>', '[', ']': - break loop - } - } - - if i != 0 { - tokenStr, remaining = s[:i], s[i:] - if tokenStr == "Not" { - return notTokenType, "", remaining - } - return strTokenType, tokenStr, remaining - } - - j := 0 - switch s[0] { - case '<': - j, tokenType = strings.IndexByte(s, '>'), angleTokenType - case '[': - j, tokenType = strings.IndexByte(s, ']'), squareTokenType - default: - return rune(s[0]), "", s[1:] - } - if j < 0 { - return errTokenType, "", "" - } - return tokenType, s[1:j], s[j+1:] -} diff --git a/deps/golang.org/x/net/webdav/if_test.go b/deps/golang.org/x/net/webdav/if_test.go deleted file mode 100644 index aad61a401..000000000 --- a/deps/golang.org/x/net/webdav/if_test.go +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "reflect" - "strings" - "testing" -) - -func TestParseIfHeader(t *testing.T) { - // The "section x.y.z" test cases come from section x.y.z of the spec at - // http://www.webdav.org/specs/rfc4918.html - testCases := []struct { - desc string - input string - want ifHeader - }{{ - "bad: empty", - ``, - ifHeader{}, - }, { - "bad: no parens", - `foobar`, - ifHeader{}, - }, { - "bad: empty list #1", - `()`, - ifHeader{}, - }, { - "bad: empty list #2", - `(a) (b c) () (d)`, - ifHeader{}, - }, { - "bad: no list after resource #1", - ``, - ifHeader{}, - }, { - "bad: no list after resource #2", - ` (a)`, - ifHeader{}, - }, { - "bad: no list after resource #3", - ` (a) (b) `, - ifHeader{}, - }, { - "bad: no-tag-list followed by tagged-list", - `(a) (b) (c)`, - ifHeader{}, - }, { - "bad: unfinished list", - `(a`, - ifHeader{}, - }, { - "bad: unfinished ETag", - `([b`, - ifHeader{}, - }, { - "bad: unfinished Notted list", - `(Not a`, - ifHeader{}, - }, { - "bad: double Not", - `(Not Not a)`, - ifHeader{}, - }, { - "good: one list with a Token", - `(a)`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Token: `a`, - }}, - }}, - }, - }, { - "good: one list with an ETag", - `([a])`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - ETag: `a`, - }}, - }}, - }, - }, { - "good: one list with three Nots", - `(Not a Not b Not [d])`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Not: true, - Token: `a`, - }, { - Not: true, - Token: `b`, - }, { - Not: true, - ETag: `d`, - }}, - }}, - }, - }, { - "good: two lists", - `(a) (b)`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Token: `a`, - }}, - }, { - conditions: []Condition{{ - Token: `b`, - }}, - }}, - }, - }, { - "good: two Notted lists", - `(Not a) (Not b)`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Not: true, - Token: `a`, - }}, - }, { - conditions: []Condition{{ - Not: true, - Token: `b`, - }}, - }}, - }, - }, { - "section 7.5.1", - ` - ()`, - ifHeader{ - lists: []ifList{{ - resourceTag: `http://www.example.com/users/f/fielding/index.html`, - conditions: []Condition{{ - Token: `urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6`, - }}, - }}, - }, - }, { - "section 7.5.2 #1", - `()`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`, - }}, - }}, - }, - }, { - "section 7.5.2 #2", - ` - ()`, - ifHeader{ - lists: []ifList{{ - resourceTag: `http://example.com/locked/`, - conditions: []Condition{{ - Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`, - }}, - }}, - }, - }, { - "section 7.5.2 #3", - ` - ()`, - ifHeader{ - lists: []ifList{{ - resourceTag: `http://example.com/locked/member`, - conditions: []Condition{{ - Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`, - }}, - }}, - }, - }, { - "section 9.9.6", - `() - ()`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Token: `urn:uuid:fe184f2e-6eec-41d0-c765-01adc56e6bb4`, - }}, - }, { - conditions: []Condition{{ - Token: `urn:uuid:e454f3f3-acdc-452a-56c7-00a5c91e4b77`, - }}, - }}, - }, - }, { - "section 9.10.8", - `()`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Token: `urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4`, - }}, - }}, - }, - }, { - "section 10.4.6", - `( - ["I am an ETag"]) - (["I am another ETag"])`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, - }, { - ETag: `"I am an ETag"`, - }}, - }, { - conditions: []Condition{{ - ETag: `"I am another ETag"`, - }}, - }}, - }, - }, { - "section 10.4.7", - `(Not - )`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Not: true, - Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, - }, { - Token: `urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092`, - }}, - }}, - }, - }, { - "section 10.4.8", - `() - (Not )`, - ifHeader{ - lists: []ifList{{ - conditions: []Condition{{ - Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, - }}, - }, { - conditions: []Condition{{ - Not: true, - Token: `DAV:no-lock`, - }}, - }}, - }, - }, { - "section 10.4.9", - ` - ( - [W/"A weak ETag"]) (["strong ETag"])`, - ifHeader{ - lists: []ifList{{ - resourceTag: `/resource1`, - conditions: []Condition{{ - Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, - }, { - ETag: `W/"A weak ETag"`, - }}, - }, { - resourceTag: `/resource1`, - conditions: []Condition{{ - ETag: `"strong ETag"`, - }}, - }}, - }, - }, { - "section 10.4.10", - ` - ()`, - ifHeader{ - lists: []ifList{{ - resourceTag: `http://www.example.com/specs/`, - conditions: []Condition{{ - Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, - }}, - }}, - }, - }, { - "section 10.4.11 #1", - ` (["4217"])`, - ifHeader{ - lists: []ifList{{ - resourceTag: `/specs/rfc2518.doc`, - conditions: []Condition{{ - ETag: `"4217"`, - }}, - }}, - }, - }, { - "section 10.4.11 #2", - ` (Not ["4217"])`, - ifHeader{ - lists: []ifList{{ - resourceTag: `/specs/rfc2518.doc`, - conditions: []Condition{{ - Not: true, - ETag: `"4217"`, - }}, - }}, - }, - }} - - for _, tc := range testCases { - got, ok := parseIfHeader(strings.Replace(tc.input, "\n", "", -1)) - if gotEmpty := reflect.DeepEqual(got, ifHeader{}); gotEmpty == ok { - t.Errorf("%s: should be different: empty header == %t, ok == %t", tc.desc, gotEmpty, ok) - continue - } - if !reflect.DeepEqual(got, tc.want) { - t.Errorf("%s:\ngot %v\nwant %v", tc.desc, got, tc.want) - continue - } - } -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/README b/deps/golang.org/x/net/webdav/internal/xml/README deleted file mode 100644 index 89656f489..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/README +++ /dev/null @@ -1,11 +0,0 @@ -This is a fork of the encoding/xml package at ca1d6c4, the last commit before -https://go.googlesource.com/go/+/c0d6d33 "encoding/xml: restore Go 1.4 name -space behavior" made late in the lead-up to the Go 1.5 release. - -The list of encoding/xml changes is at -https://go.googlesource.com/go/+log/master/src/encoding/xml - -This fork is temporary, and I (nigeltao) expect to revert it after Go 1.6 is -released. - -See http://golang.org/issue/11841 diff --git a/deps/golang.org/x/net/webdav/internal/xml/atom_test.go b/deps/golang.org/x/net/webdav/internal/xml/atom_test.go deleted file mode 100644 index a71284312..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/atom_test.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import "time" - -var atomValue = &Feed{ - XMLName: Name{"http://www.w3.org/2005/Atom", "feed"}, - Title: "Example Feed", - Link: []Link{{Href: "http://example.org/"}}, - Updated: ParseTime("2003-12-13T18:30:02Z"), - Author: Person{Name: "John Doe"}, - Id: "urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6", - - Entry: []Entry{ - { - Title: "Atom-Powered Robots Run Amok", - Link: []Link{{Href: "http://example.org/2003/12/13/atom03"}}, - Id: "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a", - Updated: ParseTime("2003-12-13T18:30:02Z"), - Summary: NewText("Some text."), - }, - }, -} - -var atomXml = `` + - `` + - `Example Feed` + - `urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6` + - `` + - `John Doe` + - `` + - `Atom-Powered Robots Run Amok` + - `urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a` + - `` + - `2003-12-13T18:30:02Z` + - `` + - `Some text.` + - `` + - `` - -func ParseTime(str string) time.Time { - t, err := time.Parse(time.RFC3339, str) - if err != nil { - panic(err) - } - return t -} - -func NewText(text string) Text { - return Text{ - Body: text, - } -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/example_test.go b/deps/golang.org/x/net/webdav/internal/xml/example_test.go deleted file mode 100644 index 21b48dea5..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/example_test.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml_test - -import ( - "encoding/xml" - "fmt" - "os" -) - -func ExampleMarshalIndent() { - type Address struct { - City, State string - } - type Person struct { - XMLName xml.Name `xml:"person"` - Id int `xml:"id,attr"` - FirstName string `xml:"name>first"` - LastName string `xml:"name>last"` - Age int `xml:"age"` - Height float32 `xml:"height,omitempty"` - Married bool - Address - Comment string `xml:",comment"` - } - - v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42} - v.Comment = " Need more details. " - v.Address = Address{"Hanga Roa", "Easter Island"} - - output, err := xml.MarshalIndent(v, " ", " ") - if err != nil { - fmt.Printf("error: %v\n", err) - } - - os.Stdout.Write(output) - // Output: - // - // - // John - // Doe - // - // 42 - // false - // Hanga Roa - // Easter Island - // - // -} - -func ExampleEncoder() { - type Address struct { - City, State string - } - type Person struct { - XMLName xml.Name `xml:"person"` - Id int `xml:"id,attr"` - FirstName string `xml:"name>first"` - LastName string `xml:"name>last"` - Age int `xml:"age"` - Height float32 `xml:"height,omitempty"` - Married bool - Address - Comment string `xml:",comment"` - } - - v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42} - v.Comment = " Need more details. " - v.Address = Address{"Hanga Roa", "Easter Island"} - - enc := xml.NewEncoder(os.Stdout) - enc.Indent(" ", " ") - if err := enc.Encode(v); err != nil { - fmt.Printf("error: %v\n", err) - } - - // Output: - // - // - // John - // Doe - // - // 42 - // false - // Hanga Roa - // Easter Island - // - // -} - -// This example demonstrates unmarshaling an XML excerpt into a value with -// some preset fields. Note that the Phone field isn't modified and that -// the XML element is ignored. Also, the Groups field is assigned -// considering the element path provided in its tag. -func ExampleUnmarshal() { - type Email struct { - Where string `xml:"where,attr"` - Addr string - } - type Address struct { - City, State string - } - type Result struct { - XMLName xml.Name `xml:"Person"` - Name string `xml:"FullName"` - Phone string - Email []Email - Groups []string `xml:"Group>Value"` - Address - } - v := Result{Name: "none", Phone: "none"} - - data := ` - - Grace R. Emlin - Example Inc. - - gre@example.com - - - gre@work.com - - - Friends - Squash - - Hanga Roa - Easter Island - - ` - err := xml.Unmarshal([]byte(data), &v) - if err != nil { - fmt.Printf("error: %v", err) - return - } - fmt.Printf("XMLName: %#v\n", v.XMLName) - fmt.Printf("Name: %q\n", v.Name) - fmt.Printf("Phone: %q\n", v.Phone) - fmt.Printf("Email: %v\n", v.Email) - fmt.Printf("Groups: %v\n", v.Groups) - fmt.Printf("Address: %v\n", v.Address) - // Output: - // XMLName: xml.Name{Space:"", Local:"Person"} - // Name: "Grace R. Emlin" - // Phone: "none" - // Email: [{home gre@example.com} {work gre@work.com}] - // Groups: [Friends Squash] - // Address: {Hanga Roa Easter Island} -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/marshal.go b/deps/golang.org/x/net/webdav/internal/xml/marshal.go deleted file mode 100644 index cb82ec214..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/marshal.go +++ /dev/null @@ -1,1223 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "bufio" - "bytes" - "encoding" - "fmt" - "io" - "reflect" - "strconv" - "strings" -) - -const ( - // A generic XML header suitable for use with the output of Marshal. - // This is not automatically added to any output of this package, - // it is provided as a convenience. - Header = `` + "\n" -) - -// Marshal returns the XML encoding of v. -// -// Marshal handles an array or slice by marshalling each of the elements. -// Marshal handles a pointer by marshalling the value it points at or, if the -// pointer is nil, by writing nothing. Marshal handles an interface value by -// marshalling the value it contains or, if the interface value is nil, by -// writing nothing. Marshal handles all other data by writing one or more XML -// elements containing the data. -// -// The name for the XML elements is taken from, in order of preference: -// - the tag on the XMLName field, if the data is a struct -// - the value of the XMLName field of type xml.Name -// - the tag of the struct field used to obtain the data -// - the name of the struct field used to obtain the data -// - the name of the marshalled type -// -// The XML element for a struct contains marshalled elements for each of the -// exported fields of the struct, with these exceptions: -// - the XMLName field, described above, is omitted. -// - a field with tag "-" is omitted. -// - a field with tag "name,attr" becomes an attribute with -// the given name in the XML element. -// - a field with tag ",attr" becomes an attribute with the -// field name in the XML element. -// - a field with tag ",chardata" is written as character data, -// not as an XML element. -// - a field with tag ",innerxml" is written verbatim, not subject -// to the usual marshalling procedure. -// - a field with tag ",comment" is written as an XML comment, not -// subject to the usual marshalling procedure. It must not contain -// the "--" string within it. -// - a field with a tag including the "omitempty" option is omitted -// if the field value is empty. The empty values are false, 0, any -// nil pointer or interface value, and any array, slice, map, or -// string of length zero. -// - an anonymous struct field is handled as if the fields of its -// value were part of the outer struct. -// -// If a field uses a tag "a>b>c", then the element c will be nested inside -// parent elements a and b. Fields that appear next to each other that name -// the same parent will be enclosed in one XML element. -// -// See MarshalIndent for an example. -// -// Marshal will return an error if asked to marshal a channel, function, or map. -func Marshal(v interface{}) ([]byte, error) { - var b bytes.Buffer - if err := NewEncoder(&b).Encode(v); err != nil { - return nil, err - } - return b.Bytes(), nil -} - -// Marshaler is the interface implemented by objects that can marshal -// themselves into valid XML elements. -// -// MarshalXML encodes the receiver as zero or more XML elements. -// By convention, arrays or slices are typically encoded as a sequence -// of elements, one per entry. -// Using start as the element tag is not required, but doing so -// will enable Unmarshal to match the XML elements to the correct -// struct field. -// One common implementation strategy is to construct a separate -// value with a layout corresponding to the desired XML and then -// to encode it using e.EncodeElement. -// Another common strategy is to use repeated calls to e.EncodeToken -// to generate the XML output one token at a time. -// The sequence of encoded tokens must make up zero or more valid -// XML elements. -type Marshaler interface { - MarshalXML(e *Encoder, start StartElement) error -} - -// MarshalerAttr is the interface implemented by objects that can marshal -// themselves into valid XML attributes. -// -// MarshalXMLAttr returns an XML attribute with the encoded value of the receiver. -// Using name as the attribute name is not required, but doing so -// will enable Unmarshal to match the attribute to the correct -// struct field. -// If MarshalXMLAttr returns the zero attribute Attr{}, no attribute -// will be generated in the output. -// MarshalXMLAttr is used only for struct fields with the -// "attr" option in the field tag. -type MarshalerAttr interface { - MarshalXMLAttr(name Name) (Attr, error) -} - -// MarshalIndent works like Marshal, but each XML element begins on a new -// indented line that starts with prefix and is followed by one or more -// copies of indent according to the nesting depth. -func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { - var b bytes.Buffer - enc := NewEncoder(&b) - enc.Indent(prefix, indent) - if err := enc.Encode(v); err != nil { - return nil, err - } - return b.Bytes(), nil -} - -// An Encoder writes XML data to an output stream. -type Encoder struct { - p printer -} - -// NewEncoder returns a new encoder that writes to w. -func NewEncoder(w io.Writer) *Encoder { - e := &Encoder{printer{Writer: bufio.NewWriter(w)}} - e.p.encoder = e - return e -} - -// Indent sets the encoder to generate XML in which each element -// begins on a new indented line that starts with prefix and is followed by -// one or more copies of indent according to the nesting depth. -func (enc *Encoder) Indent(prefix, indent string) { - enc.p.prefix = prefix - enc.p.indent = indent -} - -// Encode writes the XML encoding of v to the stream. -// -// See the documentation for Marshal for details about the conversion -// of Go values to XML. -// -// Encode calls Flush before returning. -func (enc *Encoder) Encode(v interface{}) error { - err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil) - if err != nil { - return err - } - return enc.p.Flush() -} - -// EncodeElement writes the XML encoding of v to the stream, -// using start as the outermost tag in the encoding. -// -// See the documentation for Marshal for details about the conversion -// of Go values to XML. -// -// EncodeElement calls Flush before returning. -func (enc *Encoder) EncodeElement(v interface{}, start StartElement) error { - err := enc.p.marshalValue(reflect.ValueOf(v), nil, &start) - if err != nil { - return err - } - return enc.p.Flush() -} - -var ( - begComment = []byte("") - endProcInst = []byte("?>") - endDirective = []byte(">") -) - -// EncodeToken writes the given XML token to the stream. -// It returns an error if StartElement and EndElement tokens are not -// properly matched. -// -// EncodeToken does not call Flush, because usually it is part of a -// larger operation such as Encode or EncodeElement (or a custom -// Marshaler's MarshalXML invoked during those), and those will call -// Flush when finished. Callers that create an Encoder and then invoke -// EncodeToken directly, without using Encode or EncodeElement, need to -// call Flush when finished to ensure that the XML is written to the -// underlying writer. -// -// EncodeToken allows writing a ProcInst with Target set to "xml" only -// as the first token in the stream. -// -// When encoding a StartElement holding an XML namespace prefix -// declaration for a prefix that is not already declared, contained -// elements (including the StartElement itself) will use the declared -// prefix when encoding names with matching namespace URIs. -func (enc *Encoder) EncodeToken(t Token) error { - - p := &enc.p - switch t := t.(type) { - case StartElement: - if err := p.writeStart(&t); err != nil { - return err - } - case EndElement: - if err := p.writeEnd(t.Name); err != nil { - return err - } - case CharData: - escapeText(p, t, false) - case Comment: - if bytes.Contains(t, endComment) { - return fmt.Errorf("xml: EncodeToken of Comment containing --> marker") - } - p.WriteString("") - return p.cachedWriteError() - case ProcInst: - // First token to be encoded which is also a ProcInst with target of xml - // is the xml declaration. The only ProcInst where target of xml is allowed. - if t.Target == "xml" && p.Buffered() != 0 { - return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded") - } - if !isNameString(t.Target) { - return fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target") - } - if bytes.Contains(t.Inst, endProcInst) { - return fmt.Errorf("xml: EncodeToken of ProcInst containing ?> marker") - } - p.WriteString(" 0 { - p.WriteByte(' ') - p.Write(t.Inst) - } - p.WriteString("?>") - case Directive: - if !isValidDirective(t) { - return fmt.Errorf("xml: EncodeToken of Directive containing wrong < or > markers") - } - p.WriteString("") - default: - return fmt.Errorf("xml: EncodeToken of invalid token type") - - } - return p.cachedWriteError() -} - -// isValidDirective reports whether dir is a valid directive text, -// meaning angle brackets are matched, ignoring comments and strings. -func isValidDirective(dir Directive) bool { - var ( - depth int - inquote uint8 - incomment bool - ) - for i, c := range dir { - switch { - case incomment: - if c == '>' { - if n := 1 + i - len(endComment); n >= 0 && bytes.Equal(dir[n:i+1], endComment) { - incomment = false - } - } - // Just ignore anything in comment - case inquote != 0: - if c == inquote { - inquote = 0 - } - // Just ignore anything within quotes - case c == '\'' || c == '"': - inquote = c - case c == '<': - if i+len(begComment) < len(dir) && bytes.Equal(dir[i:i+len(begComment)], begComment) { - incomment = true - } else { - depth++ - } - case c == '>': - if depth == 0 { - return false - } - depth-- - } - } - return depth == 0 && inquote == 0 && !incomment -} - -// Flush flushes any buffered XML to the underlying writer. -// See the EncodeToken documentation for details about when it is necessary. -func (enc *Encoder) Flush() error { - return enc.p.Flush() -} - -type printer struct { - *bufio.Writer - encoder *Encoder - seq int - indent string - prefix string - depth int - indentedIn bool - putNewline bool - defaultNS string - attrNS map[string]string // map prefix -> name space - attrPrefix map[string]string // map name space -> prefix - prefixes []printerPrefix - tags []Name -} - -// printerPrefix holds a namespace undo record. -// When an element is popped, the prefix record -// is set back to the recorded URL. The empty -// prefix records the URL for the default name space. -// -// The start of an element is recorded with an element -// that has mark=true. -type printerPrefix struct { - prefix string - url string - mark bool -} - -func (p *printer) prefixForNS(url string, isAttr bool) string { - // The "http://www.w3.org/XML/1998/namespace" name space is predefined as "xml" - // and must be referred to that way. - // (The "http://www.w3.org/2000/xmlns/" name space is also predefined as "xmlns", - // but users should not be trying to use that one directly - that's our job.) - if url == xmlURL { - return "xml" - } - if !isAttr && url == p.defaultNS { - // We can use the default name space. - return "" - } - return p.attrPrefix[url] -} - -// defineNS pushes any namespace definition found in the given attribute. -// If ignoreNonEmptyDefault is true, an xmlns="nonempty" -// attribute will be ignored. -func (p *printer) defineNS(attr Attr, ignoreNonEmptyDefault bool) error { - var prefix string - if attr.Name.Local == "xmlns" { - if attr.Name.Space != "" && attr.Name.Space != "xml" && attr.Name.Space != xmlURL { - return fmt.Errorf("xml: cannot redefine xmlns attribute prefix") - } - } else if attr.Name.Space == "xmlns" && attr.Name.Local != "" { - prefix = attr.Name.Local - if attr.Value == "" { - // Technically, an empty XML namespace is allowed for an attribute. - // From http://www.w3.org/TR/xml-names11/#scoping-defaulting: - // - // The attribute value in a namespace declaration for a prefix may be - // empty. This has the effect, within the scope of the declaration, of removing - // any association of the prefix with a namespace name. - // - // However our namespace prefixes here are used only as hints. There's - // no need to respect the removal of a namespace prefix, so we ignore it. - return nil - } - } else { - // Ignore: it's not a namespace definition - return nil - } - if prefix == "" { - if attr.Value == p.defaultNS { - // No need for redefinition. - return nil - } - if attr.Value != "" && ignoreNonEmptyDefault { - // We have an xmlns="..." value but - // it can't define a name space in this context, - // probably because the element has an empty - // name space. In this case, we just ignore - // the name space declaration. - return nil - } - } else if _, ok := p.attrPrefix[attr.Value]; ok { - // There's already a prefix for the given name space, - // so use that. This prevents us from - // having two prefixes for the same name space - // so attrNS and attrPrefix can remain bijective. - return nil - } - p.pushPrefix(prefix, attr.Value) - return nil -} - -// createNSPrefix creates a name space prefix attribute -// to use for the given name space, defining a new prefix -// if necessary. -// If isAttr is true, the prefix is to be created for an attribute -// prefix, which means that the default name space cannot -// be used. -func (p *printer) createNSPrefix(url string, isAttr bool) { - if _, ok := p.attrPrefix[url]; ok { - // We already have a prefix for the given URL. - return - } - switch { - case !isAttr && url == p.defaultNS: - // We can use the default name space. - return - case url == "": - // The only way we can encode names in the empty - // name space is by using the default name space, - // so we must use that. - if p.defaultNS != "" { - // The default namespace is non-empty, so we - // need to set it to empty. - p.pushPrefix("", "") - } - return - case url == xmlURL: - return - } - // TODO If the URL is an existing prefix, we could - // use it as is. That would enable the - // marshaling of elements that had been unmarshaled - // and with a name space prefix that was not found. - // although technically it would be incorrect. - - // Pick a name. We try to use the final element of the path - // but fall back to _. - prefix := strings.TrimRight(url, "/") - if i := strings.LastIndex(prefix, "/"); i >= 0 { - prefix = prefix[i+1:] - } - if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") { - prefix = "_" - } - if strings.HasPrefix(prefix, "xml") { - // xmlanything is reserved. - prefix = "_" + prefix - } - if p.attrNS[prefix] != "" { - // Name is taken. Find a better one. - for p.seq++; ; p.seq++ { - if id := prefix + "_" + strconv.Itoa(p.seq); p.attrNS[id] == "" { - prefix = id - break - } - } - } - - p.pushPrefix(prefix, url) -} - -// writeNamespaces writes xmlns attributes for all the -// namespace prefixes that have been defined in -// the current element. -func (p *printer) writeNamespaces() { - for i := len(p.prefixes) - 1; i >= 0; i-- { - prefix := p.prefixes[i] - if prefix.mark { - return - } - p.WriteString(" ") - if prefix.prefix == "" { - // Default name space. - p.WriteString(`xmlns="`) - } else { - p.WriteString("xmlns:") - p.WriteString(prefix.prefix) - p.WriteString(`="`) - } - EscapeText(p, []byte(p.nsForPrefix(prefix.prefix))) - p.WriteString(`"`) - } -} - -// pushPrefix pushes a new prefix on the prefix stack -// without checking to see if it is already defined. -func (p *printer) pushPrefix(prefix, url string) { - p.prefixes = append(p.prefixes, printerPrefix{ - prefix: prefix, - url: p.nsForPrefix(prefix), - }) - p.setAttrPrefix(prefix, url) -} - -// nsForPrefix returns the name space for the given -// prefix. Note that this is not valid for the -// empty attribute prefix, which always has an empty -// name space. -func (p *printer) nsForPrefix(prefix string) string { - if prefix == "" { - return p.defaultNS - } - return p.attrNS[prefix] -} - -// markPrefix marks the start of an element on the prefix -// stack. -func (p *printer) markPrefix() { - p.prefixes = append(p.prefixes, printerPrefix{ - mark: true, - }) -} - -// popPrefix pops all defined prefixes for the current -// element. -func (p *printer) popPrefix() { - for len(p.prefixes) > 0 { - prefix := p.prefixes[len(p.prefixes)-1] - p.prefixes = p.prefixes[:len(p.prefixes)-1] - if prefix.mark { - break - } - p.setAttrPrefix(prefix.prefix, prefix.url) - } -} - -// setAttrPrefix sets an attribute name space prefix. -// If url is empty, the attribute is removed. -// If prefix is empty, the default name space is set. -func (p *printer) setAttrPrefix(prefix, url string) { - if prefix == "" { - p.defaultNS = url - return - } - if url == "" { - delete(p.attrPrefix, p.attrNS[prefix]) - delete(p.attrNS, prefix) - return - } - if p.attrPrefix == nil { - // Need to define a new name space. - p.attrPrefix = make(map[string]string) - p.attrNS = make(map[string]string) - } - // Remove any old prefix value. This is OK because we maintain a - // strict one-to-one mapping between prefix and URL (see - // defineNS) - delete(p.attrPrefix, p.attrNS[prefix]) - p.attrPrefix[url] = prefix - p.attrNS[prefix] = url -} - -var ( - marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() - marshalerAttrType = reflect.TypeOf((*MarshalerAttr)(nil)).Elem() - textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() -) - -// marshalValue writes one or more XML elements representing val. -// If val was obtained from a struct field, finfo must have its details. -func (p *printer) marshalValue(val reflect.Value, finfo *fieldInfo, startTemplate *StartElement) error { - if startTemplate != nil && startTemplate.Name.Local == "" { - return fmt.Errorf("xml: EncodeElement of StartElement with missing name") - } - - if !val.IsValid() { - return nil - } - if finfo != nil && finfo.flags&fOmitEmpty != 0 && isEmptyValue(val) { - return nil - } - - // Drill into interfaces and pointers. - // This can turn into an infinite loop given a cyclic chain, - // but it matches the Go 1 behavior. - for val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { - if val.IsNil() { - return nil - } - val = val.Elem() - } - - kind := val.Kind() - typ := val.Type() - - // Check for marshaler. - if val.CanInterface() && typ.Implements(marshalerType) { - return p.marshalInterface(val.Interface().(Marshaler), p.defaultStart(typ, finfo, startTemplate)) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(marshalerType) { - return p.marshalInterface(pv.Interface().(Marshaler), p.defaultStart(pv.Type(), finfo, startTemplate)) - } - } - - // Check for text marshaler. - if val.CanInterface() && typ.Implements(textMarshalerType) { - return p.marshalTextInterface(val.Interface().(encoding.TextMarshaler), p.defaultStart(typ, finfo, startTemplate)) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { - return p.marshalTextInterface(pv.Interface().(encoding.TextMarshaler), p.defaultStart(pv.Type(), finfo, startTemplate)) - } - } - - // Slices and arrays iterate over the elements. They do not have an enclosing tag. - if (kind == reflect.Slice || kind == reflect.Array) && typ.Elem().Kind() != reflect.Uint8 { - for i, n := 0, val.Len(); i < n; i++ { - if err := p.marshalValue(val.Index(i), finfo, startTemplate); err != nil { - return err - } - } - return nil - } - - tinfo, err := getTypeInfo(typ) - if err != nil { - return err - } - - // Create start element. - // Precedence for the XML element name is: - // 0. startTemplate - // 1. XMLName field in underlying struct; - // 2. field name/tag in the struct field; and - // 3. type name - var start StartElement - - // explicitNS records whether the element's name space has been - // explicitly set (for example an XMLName field). - explicitNS := false - - if startTemplate != nil { - start.Name = startTemplate.Name - explicitNS = true - start.Attr = append(start.Attr, startTemplate.Attr...) - } else if tinfo.xmlname != nil { - xmlname := tinfo.xmlname - if xmlname.name != "" { - start.Name.Space, start.Name.Local = xmlname.xmlns, xmlname.name - } else if v, ok := xmlname.value(val).Interface().(Name); ok && v.Local != "" { - start.Name = v - } - explicitNS = true - } - if start.Name.Local == "" && finfo != nil { - start.Name.Local = finfo.name - if finfo.xmlns != "" { - start.Name.Space = finfo.xmlns - explicitNS = true - } - } - if start.Name.Local == "" { - name := typ.Name() - if name == "" { - return &UnsupportedTypeError{typ} - } - start.Name.Local = name - } - - // defaultNS records the default name space as set by a xmlns="..." - // attribute. We don't set p.defaultNS because we want to let - // the attribute writing code (in p.defineNS) be solely responsible - // for maintaining that. - defaultNS := p.defaultNS - - // Attributes - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - if finfo.flags&fAttr == 0 { - continue - } - attr, err := p.fieldAttr(finfo, val) - if err != nil { - return err - } - if attr.Name.Local == "" { - continue - } - start.Attr = append(start.Attr, attr) - if attr.Name.Space == "" && attr.Name.Local == "xmlns" { - defaultNS = attr.Value - } - } - if !explicitNS { - // Historic behavior: elements use the default name space - // they are contained in by default. - start.Name.Space = defaultNS - } - // Historic behaviour: an element that's in a namespace sets - // the default namespace for all elements contained within it. - start.setDefaultNamespace() - - if err := p.writeStart(&start); err != nil { - return err - } - - if val.Kind() == reflect.Struct { - err = p.marshalStruct(tinfo, val) - } else { - s, b, err1 := p.marshalSimple(typ, val) - if err1 != nil { - err = err1 - } else if b != nil { - EscapeText(p, b) - } else { - p.EscapeString(s) - } - } - if err != nil { - return err - } - - if err := p.writeEnd(start.Name); err != nil { - return err - } - - return p.cachedWriteError() -} - -// fieldAttr returns the attribute of the given field. -// If the returned attribute has an empty Name.Local, -// it should not be used. -// The given value holds the value containing the field. -func (p *printer) fieldAttr(finfo *fieldInfo, val reflect.Value) (Attr, error) { - fv := finfo.value(val) - name := Name{Space: finfo.xmlns, Local: finfo.name} - if finfo.flags&fOmitEmpty != 0 && isEmptyValue(fv) { - return Attr{}, nil - } - if fv.Kind() == reflect.Interface && fv.IsNil() { - return Attr{}, nil - } - if fv.CanInterface() && fv.Type().Implements(marshalerAttrType) { - attr, err := fv.Interface().(MarshalerAttr).MarshalXMLAttr(name) - return attr, err - } - if fv.CanAddr() { - pv := fv.Addr() - if pv.CanInterface() && pv.Type().Implements(marshalerAttrType) { - attr, err := pv.Interface().(MarshalerAttr).MarshalXMLAttr(name) - return attr, err - } - } - if fv.CanInterface() && fv.Type().Implements(textMarshalerType) { - text, err := fv.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return Attr{}, err - } - return Attr{name, string(text)}, nil - } - if fv.CanAddr() { - pv := fv.Addr() - if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { - text, err := pv.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return Attr{}, err - } - return Attr{name, string(text)}, nil - } - } - // Dereference or skip nil pointer, interface values. - switch fv.Kind() { - case reflect.Ptr, reflect.Interface: - if fv.IsNil() { - return Attr{}, nil - } - fv = fv.Elem() - } - s, b, err := p.marshalSimple(fv.Type(), fv) - if err != nil { - return Attr{}, err - } - if b != nil { - s = string(b) - } - return Attr{name, s}, nil -} - -// defaultStart returns the default start element to use, -// given the reflect type, field info, and start template. -func (p *printer) defaultStart(typ reflect.Type, finfo *fieldInfo, startTemplate *StartElement) StartElement { - var start StartElement - // Precedence for the XML element name is as above, - // except that we do not look inside structs for the first field. - if startTemplate != nil { - start.Name = startTemplate.Name - start.Attr = append(start.Attr, startTemplate.Attr...) - } else if finfo != nil && finfo.name != "" { - start.Name.Local = finfo.name - start.Name.Space = finfo.xmlns - } else if typ.Name() != "" { - start.Name.Local = typ.Name() - } else { - // Must be a pointer to a named type, - // since it has the Marshaler methods. - start.Name.Local = typ.Elem().Name() - } - // Historic behaviour: elements use the name space of - // the element they are contained in by default. - if start.Name.Space == "" { - start.Name.Space = p.defaultNS - } - start.setDefaultNamespace() - return start -} - -// marshalInterface marshals a Marshaler interface value. -func (p *printer) marshalInterface(val Marshaler, start StartElement) error { - // Push a marker onto the tag stack so that MarshalXML - // cannot close the XML tags that it did not open. - p.tags = append(p.tags, Name{}) - n := len(p.tags) - - err := val.MarshalXML(p.encoder, start) - if err != nil { - return err - } - - // Make sure MarshalXML closed all its tags. p.tags[n-1] is the mark. - if len(p.tags) > n { - return fmt.Errorf("xml: %s.MarshalXML wrote invalid XML: <%s> not closed", receiverType(val), p.tags[len(p.tags)-1].Local) - } - p.tags = p.tags[:n-1] - return nil -} - -// marshalTextInterface marshals a TextMarshaler interface value. -func (p *printer) marshalTextInterface(val encoding.TextMarshaler, start StartElement) error { - if err := p.writeStart(&start); err != nil { - return err - } - text, err := val.MarshalText() - if err != nil { - return err - } - EscapeText(p, text) - return p.writeEnd(start.Name) -} - -// writeStart writes the given start element. -func (p *printer) writeStart(start *StartElement) error { - if start.Name.Local == "" { - return fmt.Errorf("xml: start tag with no name") - } - - p.tags = append(p.tags, start.Name) - p.markPrefix() - // Define any name spaces explicitly declared in the attributes. - // We do this as a separate pass so that explicitly declared prefixes - // will take precedence over implicitly declared prefixes - // regardless of the order of the attributes. - ignoreNonEmptyDefault := start.Name.Space == "" - for _, attr := range start.Attr { - if err := p.defineNS(attr, ignoreNonEmptyDefault); err != nil { - return err - } - } - // Define any new name spaces implied by the attributes. - for _, attr := range start.Attr { - name := attr.Name - // From http://www.w3.org/TR/xml-names11/#defaulting - // "Default namespace declarations do not apply directly - // to attribute names; the interpretation of unprefixed - // attributes is determined by the element on which they - // appear." - // This means we don't need to create a new namespace - // when an attribute name space is empty. - if name.Space != "" && !name.isNamespace() { - p.createNSPrefix(name.Space, true) - } - } - p.createNSPrefix(start.Name.Space, false) - - p.writeIndent(1) - p.WriteByte('<') - p.writeName(start.Name, false) - p.writeNamespaces() - for _, attr := range start.Attr { - name := attr.Name - if name.Local == "" || name.isNamespace() { - // Namespaces have already been written by writeNamespaces above. - continue - } - p.WriteByte(' ') - p.writeName(name, true) - p.WriteString(`="`) - p.EscapeString(attr.Value) - p.WriteByte('"') - } - p.WriteByte('>') - return nil -} - -// writeName writes the given name. It assumes -// that p.createNSPrefix(name) has already been called. -func (p *printer) writeName(name Name, isAttr bool) { - if prefix := p.prefixForNS(name.Space, isAttr); prefix != "" { - p.WriteString(prefix) - p.WriteByte(':') - } - p.WriteString(name.Local) -} - -func (p *printer) writeEnd(name Name) error { - if name.Local == "" { - return fmt.Errorf("xml: end tag with no name") - } - if len(p.tags) == 0 || p.tags[len(p.tags)-1].Local == "" { - return fmt.Errorf("xml: end tag without start tag", name.Local) - } - if top := p.tags[len(p.tags)-1]; top != name { - if top.Local != name.Local { - return fmt.Errorf("xml: end tag does not match start tag <%s>", name.Local, top.Local) - } - return fmt.Errorf("xml: end tag in namespace %s does not match start tag <%s> in namespace %s", name.Local, name.Space, top.Local, top.Space) - } - p.tags = p.tags[:len(p.tags)-1] - - p.writeIndent(-1) - p.WriteByte('<') - p.WriteByte('/') - p.writeName(name, false) - p.WriteByte('>') - p.popPrefix() - return nil -} - -func (p *printer) marshalSimple(typ reflect.Type, val reflect.Value) (string, []byte, error) { - switch val.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return strconv.FormatInt(val.Int(), 10), nil, nil - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return strconv.FormatUint(val.Uint(), 10), nil, nil - case reflect.Float32, reflect.Float64: - return strconv.FormatFloat(val.Float(), 'g', -1, val.Type().Bits()), nil, nil - case reflect.String: - return val.String(), nil, nil - case reflect.Bool: - return strconv.FormatBool(val.Bool()), nil, nil - case reflect.Array: - if typ.Elem().Kind() != reflect.Uint8 { - break - } - // [...]byte - var bytes []byte - if val.CanAddr() { - bytes = val.Slice(0, val.Len()).Bytes() - } else { - bytes = make([]byte, val.Len()) - reflect.Copy(reflect.ValueOf(bytes), val) - } - return "", bytes, nil - case reflect.Slice: - if typ.Elem().Kind() != reflect.Uint8 { - break - } - // []byte - return "", val.Bytes(), nil - } - return "", nil, &UnsupportedTypeError{typ} -} - -var ddBytes = []byte("--") - -func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error { - s := parentStack{p: p} - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - if finfo.flags&fAttr != 0 { - continue - } - vf := finfo.value(val) - - // Dereference or skip nil pointer, interface values. - switch vf.Kind() { - case reflect.Ptr, reflect.Interface: - if !vf.IsNil() { - vf = vf.Elem() - } - } - - switch finfo.flags & fMode { - case fCharData: - if err := s.setParents(&noField, reflect.Value{}); err != nil { - return err - } - if vf.CanInterface() && vf.Type().Implements(textMarshalerType) { - data, err := vf.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return err - } - Escape(p, data) - continue - } - if vf.CanAddr() { - pv := vf.Addr() - if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { - data, err := pv.Interface().(encoding.TextMarshaler).MarshalText() - if err != nil { - return err - } - Escape(p, data) - continue - } - } - var scratch [64]byte - switch vf.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - Escape(p, strconv.AppendInt(scratch[:0], vf.Int(), 10)) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - Escape(p, strconv.AppendUint(scratch[:0], vf.Uint(), 10)) - case reflect.Float32, reflect.Float64: - Escape(p, strconv.AppendFloat(scratch[:0], vf.Float(), 'g', -1, vf.Type().Bits())) - case reflect.Bool: - Escape(p, strconv.AppendBool(scratch[:0], vf.Bool())) - case reflect.String: - if err := EscapeText(p, []byte(vf.String())); err != nil { - return err - } - case reflect.Slice: - if elem, ok := vf.Interface().([]byte); ok { - if err := EscapeText(p, elem); err != nil { - return err - } - } - } - continue - - case fComment: - if err := s.setParents(&noField, reflect.Value{}); err != nil { - return err - } - k := vf.Kind() - if !(k == reflect.String || k == reflect.Slice && vf.Type().Elem().Kind() == reflect.Uint8) { - return fmt.Errorf("xml: bad type for comment field of %s", val.Type()) - } - if vf.Len() == 0 { - continue - } - p.writeIndent(0) - p.WriteString("" is invalid grammar. Make it "- -->" - p.WriteByte(' ') - } - p.WriteString("-->") - continue - - case fInnerXml: - iface := vf.Interface() - switch raw := iface.(type) { - case []byte: - p.Write(raw) - continue - case string: - p.WriteString(raw) - continue - } - - case fElement, fElement | fAny: - if err := s.setParents(finfo, vf); err != nil { - return err - } - } - if err := p.marshalValue(vf, finfo, nil); err != nil { - return err - } - } - if err := s.setParents(&noField, reflect.Value{}); err != nil { - return err - } - return p.cachedWriteError() -} - -var noField fieldInfo - -// return the bufio Writer's cached write error -func (p *printer) cachedWriteError() error { - _, err := p.Write(nil) - return err -} - -func (p *printer) writeIndent(depthDelta int) { - if len(p.prefix) == 0 && len(p.indent) == 0 { - return - } - if depthDelta < 0 { - p.depth-- - if p.indentedIn { - p.indentedIn = false - return - } - p.indentedIn = false - } - if p.putNewline { - p.WriteByte('\n') - } else { - p.putNewline = true - } - if len(p.prefix) > 0 { - p.WriteString(p.prefix) - } - if len(p.indent) > 0 { - for i := 0; i < p.depth; i++ { - p.WriteString(p.indent) - } - } - if depthDelta > 0 { - p.depth++ - p.indentedIn = true - } -} - -type parentStack struct { - p *printer - xmlns string - parents []string -} - -// setParents sets the stack of current parents to those found in finfo. -// It only writes the start elements if vf holds a non-nil value. -// If finfo is &noField, it pops all elements. -func (s *parentStack) setParents(finfo *fieldInfo, vf reflect.Value) error { - xmlns := s.p.defaultNS - if finfo.xmlns != "" { - xmlns = finfo.xmlns - } - commonParents := 0 - if xmlns == s.xmlns { - for ; commonParents < len(finfo.parents) && commonParents < len(s.parents); commonParents++ { - if finfo.parents[commonParents] != s.parents[commonParents] { - break - } - } - } - // Pop off any parents that aren't in common with the previous field. - for i := len(s.parents) - 1; i >= commonParents; i-- { - if err := s.p.writeEnd(Name{ - Space: s.xmlns, - Local: s.parents[i], - }); err != nil { - return err - } - } - s.parents = finfo.parents - s.xmlns = xmlns - if commonParents >= len(s.parents) { - // No new elements to push. - return nil - } - if (vf.Kind() == reflect.Ptr || vf.Kind() == reflect.Interface) && vf.IsNil() { - // The element is nil, so no need for the start elements. - s.parents = s.parents[:commonParents] - return nil - } - // Push any new parents required. - for _, name := range s.parents[commonParents:] { - start := &StartElement{ - Name: Name{ - Space: s.xmlns, - Local: name, - }, - } - // Set the default name space for parent elements - // to match what we do with other elements. - if s.xmlns != s.p.defaultNS { - start.setDefaultNamespace() - } - if err := s.p.writeStart(start); err != nil { - return err - } - } - return nil -} - -// A MarshalXMLError is returned when Marshal encounters a type -// that cannot be converted into XML. -type UnsupportedTypeError struct { - Type reflect.Type -} - -func (e *UnsupportedTypeError) Error() string { - return "xml: unsupported type: " + e.Type.String() -} - -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/marshal_test.go b/deps/golang.org/x/net/webdav/internal/xml/marshal_test.go deleted file mode 100644 index 226cfd013..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/marshal_test.go +++ /dev/null @@ -1,1939 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "bytes" - "errors" - "fmt" - "io" - "reflect" - "strconv" - "strings" - "sync" - "testing" - "time" -) - -type DriveType int - -const ( - HyperDrive DriveType = iota - ImprobabilityDrive -) - -type Passenger struct { - Name []string `xml:"name"` - Weight float32 `xml:"weight"` -} - -type Ship struct { - XMLName struct{} `xml:"spaceship"` - - Name string `xml:"name,attr"` - Pilot string `xml:"pilot,attr"` - Drive DriveType `xml:"drive"` - Age uint `xml:"age"` - Passenger []*Passenger `xml:"passenger"` - secret string -} - -type NamedType string - -type Port struct { - XMLName struct{} `xml:"port"` - Type string `xml:"type,attr,omitempty"` - Comment string `xml:",comment"` - Number string `xml:",chardata"` -} - -type Domain struct { - XMLName struct{} `xml:"domain"` - Country string `xml:",attr,omitempty"` - Name []byte `xml:",chardata"` - Comment []byte `xml:",comment"` -} - -type Book struct { - XMLName struct{} `xml:"book"` - Title string `xml:",chardata"` -} - -type Event struct { - XMLName struct{} `xml:"event"` - Year int `xml:",chardata"` -} - -type Movie struct { - XMLName struct{} `xml:"movie"` - Length uint `xml:",chardata"` -} - -type Pi struct { - XMLName struct{} `xml:"pi"` - Approximation float32 `xml:",chardata"` -} - -type Universe struct { - XMLName struct{} `xml:"universe"` - Visible float64 `xml:",chardata"` -} - -type Particle struct { - XMLName struct{} `xml:"particle"` - HasMass bool `xml:",chardata"` -} - -type Departure struct { - XMLName struct{} `xml:"departure"` - When time.Time `xml:",chardata"` -} - -type SecretAgent struct { - XMLName struct{} `xml:"agent"` - Handle string `xml:"handle,attr"` - Identity string - Obfuscate string `xml:",innerxml"` -} - -type NestedItems struct { - XMLName struct{} `xml:"result"` - Items []string `xml:">item"` - Item1 []string `xml:"Items>item1"` -} - -type NestedOrder struct { - XMLName struct{} `xml:"result"` - Field1 string `xml:"parent>c"` - Field2 string `xml:"parent>b"` - Field3 string `xml:"parent>a"` -} - -type MixedNested struct { - XMLName struct{} `xml:"result"` - A string `xml:"parent1>a"` - B string `xml:"b"` - C string `xml:"parent1>parent2>c"` - D string `xml:"parent1>d"` -} - -type NilTest struct { - A interface{} `xml:"parent1>parent2>a"` - B interface{} `xml:"parent1>b"` - C interface{} `xml:"parent1>parent2>c"` -} - -type Service struct { - XMLName struct{} `xml:"service"` - Domain *Domain `xml:"host>domain"` - Port *Port `xml:"host>port"` - Extra1 interface{} - Extra2 interface{} `xml:"host>extra2"` -} - -var nilStruct *Ship - -type EmbedA struct { - EmbedC - EmbedB EmbedB - FieldA string -} - -type EmbedB struct { - FieldB string - *EmbedC -} - -type EmbedC struct { - FieldA1 string `xml:"FieldA>A1"` - FieldA2 string `xml:"FieldA>A2"` - FieldB string - FieldC string -} - -type NameCasing struct { - XMLName struct{} `xml:"casing"` - Xy string - XY string - XyA string `xml:"Xy,attr"` - XYA string `xml:"XY,attr"` -} - -type NamePrecedence struct { - XMLName Name `xml:"Parent"` - FromTag XMLNameWithoutTag `xml:"InTag"` - FromNameVal XMLNameWithoutTag - FromNameTag XMLNameWithTag - InFieldName string -} - -type XMLNameWithTag struct { - XMLName Name `xml:"InXMLNameTag"` - Value string `xml:",chardata"` -} - -type XMLNameWithNSTag struct { - XMLName Name `xml:"ns InXMLNameWithNSTag"` - Value string `xml:",chardata"` -} - -type XMLNameWithoutTag struct { - XMLName Name - Value string `xml:",chardata"` -} - -type NameInField struct { - Foo Name `xml:"ns foo"` -} - -type AttrTest struct { - Int int `xml:",attr"` - Named int `xml:"int,attr"` - Float float64 `xml:",attr"` - Uint8 uint8 `xml:",attr"` - Bool bool `xml:",attr"` - Str string `xml:",attr"` - Bytes []byte `xml:",attr"` -} - -type OmitAttrTest struct { - Int int `xml:",attr,omitempty"` - Named int `xml:"int,attr,omitempty"` - Float float64 `xml:",attr,omitempty"` - Uint8 uint8 `xml:",attr,omitempty"` - Bool bool `xml:",attr,omitempty"` - Str string `xml:",attr,omitempty"` - Bytes []byte `xml:",attr,omitempty"` -} - -type OmitFieldTest struct { - Int int `xml:",omitempty"` - Named int `xml:"int,omitempty"` - Float float64 `xml:",omitempty"` - Uint8 uint8 `xml:",omitempty"` - Bool bool `xml:",omitempty"` - Str string `xml:",omitempty"` - Bytes []byte `xml:",omitempty"` - Ptr *PresenceTest `xml:",omitempty"` -} - -type AnyTest struct { - XMLName struct{} `xml:"a"` - Nested string `xml:"nested>value"` - AnyField AnyHolder `xml:",any"` -} - -type AnyOmitTest struct { - XMLName struct{} `xml:"a"` - Nested string `xml:"nested>value"` - AnyField *AnyHolder `xml:",any,omitempty"` -} - -type AnySliceTest struct { - XMLName struct{} `xml:"a"` - Nested string `xml:"nested>value"` - AnyField []AnyHolder `xml:",any"` -} - -type AnyHolder struct { - XMLName Name - XML string `xml:",innerxml"` -} - -type RecurseA struct { - A string - B *RecurseB -} - -type RecurseB struct { - A *RecurseA - B string -} - -type PresenceTest struct { - Exists *struct{} -} - -type IgnoreTest struct { - PublicSecret string `xml:"-"` -} - -type MyBytes []byte - -type Data struct { - Bytes []byte - Attr []byte `xml:",attr"` - Custom MyBytes -} - -type Plain struct { - V interface{} -} - -type MyInt int - -type EmbedInt struct { - MyInt -} - -type Strings struct { - X []string `xml:"A>B,omitempty"` -} - -type PointerFieldsTest struct { - XMLName Name `xml:"dummy"` - Name *string `xml:"name,attr"` - Age *uint `xml:"age,attr"` - Empty *string `xml:"empty,attr"` - Contents *string `xml:",chardata"` -} - -type ChardataEmptyTest struct { - XMLName Name `xml:"test"` - Contents *string `xml:",chardata"` -} - -type MyMarshalerTest struct { -} - -var _ Marshaler = (*MyMarshalerTest)(nil) - -func (m *MyMarshalerTest) MarshalXML(e *Encoder, start StartElement) error { - e.EncodeToken(start) - e.EncodeToken(CharData([]byte("hello world"))) - e.EncodeToken(EndElement{start.Name}) - return nil -} - -type MyMarshalerAttrTest struct{} - -var _ MarshalerAttr = (*MyMarshalerAttrTest)(nil) - -func (m *MyMarshalerAttrTest) MarshalXMLAttr(name Name) (Attr, error) { - return Attr{name, "hello world"}, nil -} - -type MyMarshalerValueAttrTest struct{} - -var _ MarshalerAttr = MyMarshalerValueAttrTest{} - -func (m MyMarshalerValueAttrTest) MarshalXMLAttr(name Name) (Attr, error) { - return Attr{name, "hello world"}, nil -} - -type MarshalerStruct struct { - Foo MyMarshalerAttrTest `xml:",attr"` -} - -type MarshalerValueStruct struct { - Foo MyMarshalerValueAttrTest `xml:",attr"` -} - -type InnerStruct struct { - XMLName Name `xml:"testns outer"` -} - -type OuterStruct struct { - InnerStruct - IntAttr int `xml:"int,attr"` -} - -type OuterNamedStruct struct { - InnerStruct - XMLName Name `xml:"outerns test"` - IntAttr int `xml:"int,attr"` -} - -type OuterNamedOrderedStruct struct { - XMLName Name `xml:"outerns test"` - InnerStruct - IntAttr int `xml:"int,attr"` -} - -type OuterOuterStruct struct { - OuterStruct -} - -type NestedAndChardata struct { - AB []string `xml:"A>B"` - Chardata string `xml:",chardata"` -} - -type NestedAndComment struct { - AB []string `xml:"A>B"` - Comment string `xml:",comment"` -} - -type XMLNSFieldStruct struct { - Ns string `xml:"xmlns,attr"` - Body string -} - -type NamedXMLNSFieldStruct struct { - XMLName struct{} `xml:"testns test"` - Ns string `xml:"xmlns,attr"` - Body string -} - -type XMLNSFieldStructWithOmitEmpty struct { - Ns string `xml:"xmlns,attr,omitempty"` - Body string -} - -type NamedXMLNSFieldStructWithEmptyNamespace struct { - XMLName struct{} `xml:"test"` - Ns string `xml:"xmlns,attr"` - Body string -} - -type RecursiveXMLNSFieldStruct struct { - Ns string `xml:"xmlns,attr"` - Body *RecursiveXMLNSFieldStruct `xml:",omitempty"` - Text string `xml:",omitempty"` -} - -func ifaceptr(x interface{}) interface{} { - return &x -} - -var ( - nameAttr = "Sarah" - ageAttr = uint(12) - contentsAttr = "lorem ipsum" -) - -// Unless explicitly stated as such (or *Plain), all of the -// tests below are two-way tests. When introducing new tests, -// please try to make them two-way as well to ensure that -// marshalling and unmarshalling are as symmetrical as feasible. -var marshalTests = []struct { - Value interface{} - ExpectXML string - MarshalOnly bool - UnmarshalOnly bool -}{ - // Test nil marshals to nothing - {Value: nil, ExpectXML: ``, MarshalOnly: true}, - {Value: nilStruct, ExpectXML: ``, MarshalOnly: true}, - - // Test value types - {Value: &Plain{true}, ExpectXML: `true`}, - {Value: &Plain{false}, ExpectXML: `false`}, - {Value: &Plain{int(42)}, ExpectXML: `42`}, - {Value: &Plain{int8(42)}, ExpectXML: `42`}, - {Value: &Plain{int16(42)}, ExpectXML: `42`}, - {Value: &Plain{int32(42)}, ExpectXML: `42`}, - {Value: &Plain{uint(42)}, ExpectXML: `42`}, - {Value: &Plain{uint8(42)}, ExpectXML: `42`}, - {Value: &Plain{uint16(42)}, ExpectXML: `42`}, - {Value: &Plain{uint32(42)}, ExpectXML: `42`}, - {Value: &Plain{float32(1.25)}, ExpectXML: `1.25`}, - {Value: &Plain{float64(1.25)}, ExpectXML: `1.25`}, - {Value: &Plain{uintptr(0xFFDD)}, ExpectXML: `65501`}, - {Value: &Plain{"gopher"}, ExpectXML: `gopher`}, - {Value: &Plain{[]byte("gopher")}, ExpectXML: `gopher`}, - {Value: &Plain{""}, ExpectXML: `</>`}, - {Value: &Plain{[]byte("")}, ExpectXML: `</>`}, - {Value: &Plain{[3]byte{'<', '/', '>'}}, ExpectXML: `</>`}, - {Value: &Plain{NamedType("potato")}, ExpectXML: `potato`}, - {Value: &Plain{[]int{1, 2, 3}}, ExpectXML: `123`}, - {Value: &Plain{[3]int{1, 2, 3}}, ExpectXML: `123`}, - {Value: ifaceptr(true), MarshalOnly: true, ExpectXML: `true`}, - - // Test time. - { - Value: &Plain{time.Unix(1e9, 123456789).UTC()}, - ExpectXML: `2001-09-09T01:46:40.123456789Z`, - }, - - // A pointer to struct{} may be used to test for an element's presence. - { - Value: &PresenceTest{new(struct{})}, - ExpectXML: ``, - }, - { - Value: &PresenceTest{}, - ExpectXML: ``, - }, - - // A pointer to struct{} may be used to test for an element's presence. - { - Value: &PresenceTest{new(struct{})}, - ExpectXML: ``, - }, - { - Value: &PresenceTest{}, - ExpectXML: ``, - }, - - // A []byte field is only nil if the element was not found. - { - Value: &Data{}, - ExpectXML: ``, - UnmarshalOnly: true, - }, - { - Value: &Data{Bytes: []byte{}, Custom: MyBytes{}, Attr: []byte{}}, - ExpectXML: ``, - UnmarshalOnly: true, - }, - - // Check that []byte works, including named []byte types. - { - Value: &Data{Bytes: []byte("ab"), Custom: MyBytes("cd"), Attr: []byte{'v'}}, - ExpectXML: `abcd`, - }, - - // Test innerxml - { - Value: &SecretAgent{ - Handle: "007", - Identity: "James Bond", - Obfuscate: "", - }, - ExpectXML: `James Bond`, - MarshalOnly: true, - }, - { - Value: &SecretAgent{ - Handle: "007", - Identity: "James Bond", - Obfuscate: "James Bond", - }, - ExpectXML: `James Bond`, - UnmarshalOnly: true, - }, - - // Test structs - {Value: &Port{Type: "ssl", Number: "443"}, ExpectXML: `443`}, - {Value: &Port{Number: "443"}, ExpectXML: `443`}, - {Value: &Port{Type: ""}, ExpectXML: ``}, - {Value: &Port{Number: "443", Comment: "https"}, ExpectXML: `443`}, - {Value: &Port{Number: "443", Comment: "add space-"}, ExpectXML: `443`, MarshalOnly: true}, - {Value: &Domain{Name: []byte("google.com&friends")}, ExpectXML: `google.com&friends`}, - {Value: &Domain{Name: []byte("google.com"), Comment: []byte(" &friends ")}, ExpectXML: `google.com`}, - {Value: &Book{Title: "Pride & Prejudice"}, ExpectXML: `Pride & Prejudice`}, - {Value: &Event{Year: -3114}, ExpectXML: `-3114`}, - {Value: &Movie{Length: 13440}, ExpectXML: `13440`}, - {Value: &Pi{Approximation: 3.14159265}, ExpectXML: `3.1415927`}, - {Value: &Universe{Visible: 9.3e13}, ExpectXML: `9.3e+13`}, - {Value: &Particle{HasMass: true}, ExpectXML: `true`}, - {Value: &Departure{When: ParseTime("2013-01-09T00:15:00-09:00")}, ExpectXML: `2013-01-09T00:15:00-09:00`}, - {Value: atomValue, ExpectXML: atomXml}, - { - Value: &Ship{ - Name: "Heart of Gold", - Pilot: "Computer", - Age: 1, - Drive: ImprobabilityDrive, - Passenger: []*Passenger{ - { - Name: []string{"Zaphod", "Beeblebrox"}, - Weight: 7.25, - }, - { - Name: []string{"Trisha", "McMillen"}, - Weight: 5.5, - }, - { - Name: []string{"Ford", "Prefect"}, - Weight: 7, - }, - { - Name: []string{"Arthur", "Dent"}, - Weight: 6.75, - }, - }, - }, - ExpectXML: `` + - `` + strconv.Itoa(int(ImprobabilityDrive)) + `` + - `1` + - `` + - `Zaphod` + - `Beeblebrox` + - `7.25` + - `` + - `` + - `Trisha` + - `McMillen` + - `5.5` + - `` + - `` + - `Ford` + - `Prefect` + - `7` + - `` + - `` + - `Arthur` + - `Dent` + - `6.75` + - `` + - ``, - }, - - // Test a>b - { - Value: &NestedItems{Items: nil, Item1: nil}, - ExpectXML: `` + - `` + - `` + - ``, - }, - { - Value: &NestedItems{Items: []string{}, Item1: []string{}}, - ExpectXML: `` + - `` + - `` + - ``, - MarshalOnly: true, - }, - { - Value: &NestedItems{Items: nil, Item1: []string{"A"}}, - ExpectXML: `` + - `` + - `A` + - `` + - ``, - }, - { - Value: &NestedItems{Items: []string{"A", "B"}, Item1: nil}, - ExpectXML: `` + - `` + - `A` + - `B` + - `` + - ``, - }, - { - Value: &NestedItems{Items: []string{"A", "B"}, Item1: []string{"C"}}, - ExpectXML: `` + - `` + - `A` + - `B` + - `C` + - `` + - ``, - }, - { - Value: &NestedOrder{Field1: "C", Field2: "B", Field3: "A"}, - ExpectXML: `` + - `` + - `C` + - `B` + - `A` + - `` + - ``, - }, - { - Value: &NilTest{A: "A", B: nil, C: "C"}, - ExpectXML: `` + - `` + - `A` + - `C` + - `` + - ``, - MarshalOnly: true, // Uses interface{} - }, - { - Value: &MixedNested{A: "A", B: "B", C: "C", D: "D"}, - ExpectXML: `` + - `A` + - `B` + - `` + - `C` + - `D` + - `` + - ``, - }, - { - Value: &Service{Port: &Port{Number: "80"}}, - ExpectXML: `80`, - }, - { - Value: &Service{}, - ExpectXML: ``, - }, - { - Value: &Service{Port: &Port{Number: "80"}, Extra1: "A", Extra2: "B"}, - ExpectXML: `` + - `80` + - `A` + - `B` + - ``, - MarshalOnly: true, - }, - { - Value: &Service{Port: &Port{Number: "80"}, Extra2: "example"}, - ExpectXML: `` + - `80` + - `example` + - ``, - MarshalOnly: true, - }, - { - Value: &struct { - XMLName struct{} `xml:"space top"` - A string `xml:"x>a"` - B string `xml:"x>b"` - C string `xml:"space x>c"` - C1 string `xml:"space1 x>c"` - D1 string `xml:"space1 x>d"` - E1 string `xml:"x>e"` - }{ - A: "a", - B: "b", - C: "c", - C1: "c1", - D1: "d1", - E1: "e1", - }, - ExpectXML: `` + - `abc` + - `` + - `c1` + - `d1` + - `` + - `` + - `e1` + - `` + - ``, - }, - { - Value: &struct { - XMLName Name - A string `xml:"x>a"` - B string `xml:"x>b"` - C string `xml:"space x>c"` - C1 string `xml:"space1 x>c"` - D1 string `xml:"space1 x>d"` - }{ - XMLName: Name{ - Space: "space0", - Local: "top", - }, - A: "a", - B: "b", - C: "c", - C1: "c1", - D1: "d1", - }, - ExpectXML: `` + - `ab` + - `c` + - `` + - `c1` + - `d1` + - `` + - ``, - }, - { - Value: &struct { - XMLName struct{} `xml:"top"` - B string `xml:"space x>b"` - B1 string `xml:"space1 x>b"` - }{ - B: "b", - B1: "b1", - }, - ExpectXML: `` + - `b` + - `b1` + - ``, - }, - - // Test struct embedding - { - Value: &EmbedA{ - EmbedC: EmbedC{ - FieldA1: "", // Shadowed by A.A - FieldA2: "", // Shadowed by A.A - FieldB: "A.C.B", - FieldC: "A.C.C", - }, - EmbedB: EmbedB{ - FieldB: "A.B.B", - EmbedC: &EmbedC{ - FieldA1: "A.B.C.A1", - FieldA2: "A.B.C.A2", - FieldB: "", // Shadowed by A.B.B - FieldC: "A.B.C.C", - }, - }, - FieldA: "A.A", - }, - ExpectXML: `` + - `A.C.B` + - `A.C.C` + - `` + - `A.B.B` + - `` + - `A.B.C.A1` + - `A.B.C.A2` + - `` + - `A.B.C.C` + - `` + - `A.A` + - ``, - }, - - // Test that name casing matters - { - Value: &NameCasing{Xy: "mixed", XY: "upper", XyA: "mixedA", XYA: "upperA"}, - ExpectXML: `mixedupper`, - }, - - // Test the order in which the XML element name is chosen - { - Value: &NamePrecedence{ - FromTag: XMLNameWithoutTag{Value: "A"}, - FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "InXMLName"}, Value: "B"}, - FromNameTag: XMLNameWithTag{Value: "C"}, - InFieldName: "D", - }, - ExpectXML: `` + - `A` + - `B` + - `C` + - `D` + - ``, - MarshalOnly: true, - }, - { - Value: &NamePrecedence{ - XMLName: Name{Local: "Parent"}, - FromTag: XMLNameWithoutTag{XMLName: Name{Local: "InTag"}, Value: "A"}, - FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "FromNameVal"}, Value: "B"}, - FromNameTag: XMLNameWithTag{XMLName: Name{Local: "InXMLNameTag"}, Value: "C"}, - InFieldName: "D", - }, - ExpectXML: `` + - `A` + - `B` + - `C` + - `D` + - ``, - UnmarshalOnly: true, - }, - - // xml.Name works in a plain field as well. - { - Value: &NameInField{Name{Space: "ns", Local: "foo"}}, - ExpectXML: ``, - }, - { - Value: &NameInField{Name{Space: "ns", Local: "foo"}}, - ExpectXML: ``, - UnmarshalOnly: true, - }, - - // Marshaling zero xml.Name uses the tag or field name. - { - Value: &NameInField{}, - ExpectXML: ``, - MarshalOnly: true, - }, - - // Test attributes - { - Value: &AttrTest{ - Int: 8, - Named: 9, - Float: 23.5, - Uint8: 255, - Bool: true, - Str: "str", - Bytes: []byte("byt"), - }, - ExpectXML: ``, - }, - { - Value: &AttrTest{Bytes: []byte{}}, - ExpectXML: ``, - }, - { - Value: &OmitAttrTest{ - Int: 8, - Named: 9, - Float: 23.5, - Uint8: 255, - Bool: true, - Str: "str", - Bytes: []byte("byt"), - }, - ExpectXML: ``, - }, - { - Value: &OmitAttrTest{}, - ExpectXML: ``, - }, - - // pointer fields - { - Value: &PointerFieldsTest{Name: &nameAttr, Age: &ageAttr, Contents: &contentsAttr}, - ExpectXML: `lorem ipsum`, - MarshalOnly: true, - }, - - // empty chardata pointer field - { - Value: &ChardataEmptyTest{}, - ExpectXML: ``, - MarshalOnly: true, - }, - - // omitempty on fields - { - Value: &OmitFieldTest{ - Int: 8, - Named: 9, - Float: 23.5, - Uint8: 255, - Bool: true, - Str: "str", - Bytes: []byte("byt"), - Ptr: &PresenceTest{}, - }, - ExpectXML: `` + - `8` + - `9` + - `23.5` + - `255` + - `true` + - `str` + - `byt` + - `` + - ``, - }, - { - Value: &OmitFieldTest{}, - ExpectXML: ``, - }, - - // Test ",any" - { - ExpectXML: `knownunknown`, - Value: &AnyTest{ - Nested: "known", - AnyField: AnyHolder{ - XMLName: Name{Local: "other"}, - XML: "unknown", - }, - }, - }, - { - Value: &AnyTest{Nested: "known", - AnyField: AnyHolder{ - XML: "", - XMLName: Name{Local: "AnyField"}, - }, - }, - ExpectXML: `known`, - }, - { - ExpectXML: `b`, - Value: &AnyOmitTest{ - Nested: "b", - }, - }, - { - ExpectXML: `bei`, - Value: &AnySliceTest{ - Nested: "b", - AnyField: []AnyHolder{ - { - XMLName: Name{Local: "c"}, - XML: "e", - }, - { - XMLName: Name{Space: "f", Local: "g"}, - XML: "i", - }, - }, - }, - }, - { - ExpectXML: `b`, - Value: &AnySliceTest{ - Nested: "b", - }, - }, - - // Test recursive types. - { - Value: &RecurseA{ - A: "a1", - B: &RecurseB{ - A: &RecurseA{"a2", nil}, - B: "b1", - }, - }, - ExpectXML: `a1a2b1`, - }, - - // Test ignoring fields via "-" tag - { - ExpectXML: ``, - Value: &IgnoreTest{}, - }, - { - ExpectXML: ``, - Value: &IgnoreTest{PublicSecret: "can't tell"}, - MarshalOnly: true, - }, - { - ExpectXML: `ignore me`, - Value: &IgnoreTest{}, - UnmarshalOnly: true, - }, - - // Test escaping. - { - ExpectXML: `dquote: "; squote: '; ampersand: &; less: <; greater: >;`, - Value: &AnyTest{ - Nested: `dquote: "; squote: '; ampersand: &; less: <; greater: >;`, - AnyField: AnyHolder{XMLName: Name{Local: "empty"}}, - }, - }, - { - ExpectXML: `newline: ; cr: ; tab: ;`, - Value: &AnyTest{ - Nested: "newline: \n; cr: \r; tab: \t;", - AnyField: AnyHolder{XMLName: Name{Local: "AnyField"}}, - }, - }, - { - ExpectXML: "1\r2\r\n3\n\r4\n5", - Value: &AnyTest{ - Nested: "1\n2\n3\n\n4\n5", - }, - UnmarshalOnly: true, - }, - { - ExpectXML: `42`, - Value: &EmbedInt{ - MyInt: 42, - }, - }, - // Test omitempty with parent chain; see golang.org/issue/4168. - { - ExpectXML: ``, - Value: &Strings{}, - }, - // Custom marshalers. - { - ExpectXML: `hello world`, - Value: &MyMarshalerTest{}, - }, - { - ExpectXML: ``, - Value: &MarshalerStruct{}, - }, - { - ExpectXML: ``, - Value: &MarshalerValueStruct{}, - }, - { - ExpectXML: ``, - Value: &OuterStruct{IntAttr: 10}, - }, - { - ExpectXML: ``, - Value: &OuterNamedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10}, - }, - { - ExpectXML: ``, - Value: &OuterNamedOrderedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10}, - }, - { - ExpectXML: ``, - Value: &OuterOuterStruct{OuterStruct{IntAttr: 10}}, - }, - { - ExpectXML: `test`, - Value: &NestedAndChardata{AB: make([]string, 2), Chardata: "test"}, - }, - { - ExpectXML: ``, - Value: &NestedAndComment{AB: make([]string, 2), Comment: "test"}, - }, - { - ExpectXML: `hello world`, - Value: &XMLNSFieldStruct{Ns: "http://example.com/ns", Body: "hello world"}, - }, - { - ExpectXML: `hello world`, - Value: &NamedXMLNSFieldStruct{Ns: "http://example.com/ns", Body: "hello world"}, - }, - { - ExpectXML: `hello world`, - Value: &NamedXMLNSFieldStruct{Ns: "", Body: "hello world"}, - }, - { - ExpectXML: `hello world`, - Value: &XMLNSFieldStructWithOmitEmpty{Body: "hello world"}, - }, - { - // The xmlns attribute must be ignored because the - // element is in the empty namespace, so it's not possible - // to set the default namespace to something non-empty. - ExpectXML: `hello world`, - Value: &NamedXMLNSFieldStructWithEmptyNamespace{Ns: "foo", Body: "hello world"}, - MarshalOnly: true, - }, - { - ExpectXML: `hello world`, - Value: &RecursiveXMLNSFieldStruct{ - Ns: "foo", - Body: &RecursiveXMLNSFieldStruct{ - Text: "hello world", - }, - }, - }, -} - -func TestMarshal(t *testing.T) { - for idx, test := range marshalTests { - if test.UnmarshalOnly { - continue - } - data, err := Marshal(test.Value) - if err != nil { - t.Errorf("#%d: marshal(%#v): %s", idx, test.Value, err) - continue - } - if got, want := string(data), test.ExpectXML; got != want { - if strings.Contains(want, "\n") { - t.Errorf("#%d: marshal(%#v):\nHAVE:\n%s\nWANT:\n%s", idx, test.Value, got, want) - } else { - t.Errorf("#%d: marshal(%#v):\nhave %#q\nwant %#q", idx, test.Value, got, want) - } - } - } -} - -type AttrParent struct { - X string `xml:"X>Y,attr"` -} - -type BadAttr struct { - Name []string `xml:"name,attr"` -} - -var marshalErrorTests = []struct { - Value interface{} - Err string - Kind reflect.Kind -}{ - { - Value: make(chan bool), - Err: "xml: unsupported type: chan bool", - Kind: reflect.Chan, - }, - { - Value: map[string]string{ - "question": "What do you get when you multiply six by nine?", - "answer": "42", - }, - Err: "xml: unsupported type: map[string]string", - Kind: reflect.Map, - }, - { - Value: map[*Ship]bool{nil: false}, - Err: "xml: unsupported type: map[*xml.Ship]bool", - Kind: reflect.Map, - }, - { - Value: &Domain{Comment: []byte("f--bar")}, - Err: `xml: comments must not contain "--"`, - }, - // Reject parent chain with attr, never worked; see golang.org/issue/5033. - { - Value: &AttrParent{}, - Err: `xml: X>Y chain not valid with attr flag`, - }, - { - Value: BadAttr{[]string{"X", "Y"}}, - Err: `xml: unsupported type: []string`, - }, -} - -var marshalIndentTests = []struct { - Value interface{} - Prefix string - Indent string - ExpectXML string -}{ - { - Value: &SecretAgent{ - Handle: "007", - Identity: "James Bond", - Obfuscate: "", - }, - Prefix: "", - Indent: "\t", - ExpectXML: fmt.Sprintf("\n\tJames Bond\n"), - }, -} - -func TestMarshalErrors(t *testing.T) { - for idx, test := range marshalErrorTests { - data, err := Marshal(test.Value) - if err == nil { - t.Errorf("#%d: marshal(%#v) = [success] %q, want error %v", idx, test.Value, data, test.Err) - continue - } - if err.Error() != test.Err { - t.Errorf("#%d: marshal(%#v) = [error] %v, want %v", idx, test.Value, err, test.Err) - } - if test.Kind != reflect.Invalid { - if kind := err.(*UnsupportedTypeError).Type.Kind(); kind != test.Kind { - t.Errorf("#%d: marshal(%#v) = [error kind] %s, want %s", idx, test.Value, kind, test.Kind) - } - } - } -} - -// Do invertibility testing on the various structures that we test -func TestUnmarshal(t *testing.T) { - for i, test := range marshalTests { - if test.MarshalOnly { - continue - } - if _, ok := test.Value.(*Plain); ok { - continue - } - vt := reflect.TypeOf(test.Value) - dest := reflect.New(vt.Elem()).Interface() - err := Unmarshal([]byte(test.ExpectXML), dest) - - switch fix := dest.(type) { - case *Feed: - fix.Author.InnerXML = "" - for i := range fix.Entry { - fix.Entry[i].Author.InnerXML = "" - } - } - - if err != nil { - t.Errorf("#%d: unexpected error: %#v", i, err) - } else if got, want := dest, test.Value; !reflect.DeepEqual(got, want) { - t.Errorf("#%d: unmarshal(%q):\nhave %#v\nwant %#v", i, test.ExpectXML, got, want) - } - } -} - -func TestMarshalIndent(t *testing.T) { - for i, test := range marshalIndentTests { - data, err := MarshalIndent(test.Value, test.Prefix, test.Indent) - if err != nil { - t.Errorf("#%d: Error: %s", i, err) - continue - } - if got, want := string(data), test.ExpectXML; got != want { - t.Errorf("#%d: MarshalIndent:\nGot:%s\nWant:\n%s", i, got, want) - } - } -} - -type limitedBytesWriter struct { - w io.Writer - remain int // until writes fail -} - -func (lw *limitedBytesWriter) Write(p []byte) (n int, err error) { - if lw.remain <= 0 { - println("error") - return 0, errors.New("write limit hit") - } - if len(p) > lw.remain { - p = p[:lw.remain] - n, _ = lw.w.Write(p) - lw.remain = 0 - return n, errors.New("write limit hit") - } - n, err = lw.w.Write(p) - lw.remain -= n - return n, err -} - -func TestMarshalWriteErrors(t *testing.T) { - var buf bytes.Buffer - const writeCap = 1024 - w := &limitedBytesWriter{&buf, writeCap} - enc := NewEncoder(w) - var err error - var i int - const n = 4000 - for i = 1; i <= n; i++ { - err = enc.Encode(&Passenger{ - Name: []string{"Alice", "Bob"}, - Weight: 5, - }) - if err != nil { - break - } - } - if err == nil { - t.Error("expected an error") - } - if i == n { - t.Errorf("expected to fail before the end") - } - if buf.Len() != writeCap { - t.Errorf("buf.Len() = %d; want %d", buf.Len(), writeCap) - } -} - -func TestMarshalWriteIOErrors(t *testing.T) { - enc := NewEncoder(errWriter{}) - - expectErr := "unwritable" - err := enc.Encode(&Passenger{}) - if err == nil || err.Error() != expectErr { - t.Errorf("EscapeTest = [error] %v, want %v", err, expectErr) - } -} - -func TestMarshalFlush(t *testing.T) { - var buf bytes.Buffer - enc := NewEncoder(&buf) - if err := enc.EncodeToken(CharData("hello world")); err != nil { - t.Fatalf("enc.EncodeToken: %v", err) - } - if buf.Len() > 0 { - t.Fatalf("enc.EncodeToken caused actual write: %q", buf.Bytes()) - } - if err := enc.Flush(); err != nil { - t.Fatalf("enc.Flush: %v", err) - } - if buf.String() != "hello world" { - t.Fatalf("after enc.Flush, buf.String() = %q, want %q", buf.String(), "hello world") - } -} - -var encodeElementTests = []struct { - desc string - value interface{} - start StartElement - expectXML string -}{{ - desc: "simple string", - value: "hello", - start: StartElement{ - Name: Name{Local: "a"}, - }, - expectXML: `hello`, -}, { - desc: "string with added attributes", - value: "hello", - start: StartElement{ - Name: Name{Local: "a"}, - Attr: []Attr{{ - Name: Name{Local: "x"}, - Value: "y", - }, { - Name: Name{Local: "foo"}, - Value: "bar", - }}, - }, - expectXML: `hello`, -}, { - desc: "start element with default name space", - value: struct { - Foo XMLNameWithNSTag - }{ - Foo: XMLNameWithNSTag{ - Value: "hello", - }, - }, - start: StartElement{ - Name: Name{Space: "ns", Local: "a"}, - Attr: []Attr{{ - Name: Name{Local: "xmlns"}, - // "ns" is the name space defined in XMLNameWithNSTag - Value: "ns", - }}, - }, - expectXML: `hello`, -}, { - desc: "start element in name space with different default name space", - value: struct { - Foo XMLNameWithNSTag - }{ - Foo: XMLNameWithNSTag{ - Value: "hello", - }, - }, - start: StartElement{ - Name: Name{Space: "ns2", Local: "a"}, - Attr: []Attr{{ - Name: Name{Local: "xmlns"}, - // "ns" is the name space defined in XMLNameWithNSTag - Value: "ns", - }}, - }, - expectXML: `hello`, -}, { - desc: "XMLMarshaler with start element with default name space", - value: &MyMarshalerTest{}, - start: StartElement{ - Name: Name{Space: "ns2", Local: "a"}, - Attr: []Attr{{ - Name: Name{Local: "xmlns"}, - // "ns" is the name space defined in XMLNameWithNSTag - Value: "ns", - }}, - }, - expectXML: `hello world`, -}} - -func TestEncodeElement(t *testing.T) { - for idx, test := range encodeElementTests { - var buf bytes.Buffer - enc := NewEncoder(&buf) - err := enc.EncodeElement(test.value, test.start) - if err != nil { - t.Fatalf("enc.EncodeElement: %v", err) - } - err = enc.Flush() - if err != nil { - t.Fatalf("enc.Flush: %v", err) - } - if got, want := buf.String(), test.expectXML; got != want { - t.Errorf("#%d(%s): EncodeElement(%#v, %#v):\nhave %#q\nwant %#q", idx, test.desc, test.value, test.start, got, want) - } - } -} - -func BenchmarkMarshal(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - Marshal(atomValue) - } -} - -func BenchmarkUnmarshal(b *testing.B) { - b.ReportAllocs() - xml := []byte(atomXml) - for i := 0; i < b.N; i++ { - Unmarshal(xml, &Feed{}) - } -} - -// golang.org/issue/6556 -func TestStructPointerMarshal(t *testing.T) { - type A struct { - XMLName string `xml:"a"` - B []interface{} - } - type C struct { - XMLName Name - Value string `xml:"value"` - } - - a := new(A) - a.B = append(a.B, &C{ - XMLName: Name{Local: "c"}, - Value: "x", - }) - - b, err := Marshal(a) - if err != nil { - t.Fatal(err) - } - if x := string(b); x != "x" { - t.Fatal(x) - } - var v A - err = Unmarshal(b, &v) - if err != nil { - t.Fatal(err) - } -} - -var encodeTokenTests = []struct { - desc string - toks []Token - want string - err string -}{{ - desc: "start element with name space", - toks: []Token{ - StartElement{Name{"space", "local"}, nil}, - }, - want: ``, -}, { - desc: "start element with no name", - toks: []Token{ - StartElement{Name{"space", ""}, nil}, - }, - err: "xml: start tag with no name", -}, { - desc: "end element with no name", - toks: []Token{ - EndElement{Name{"space", ""}}, - }, - err: "xml: end tag with no name", -}, { - desc: "char data", - toks: []Token{ - CharData("foo"), - }, - want: `foo`, -}, { - desc: "char data with escaped chars", - toks: []Token{ - CharData(" \t\n"), - }, - want: " \n", -}, { - desc: "comment", - toks: []Token{ - Comment("foo"), - }, - want: ``, -}, { - desc: "comment with invalid content", - toks: []Token{ - Comment("foo-->"), - }, - err: "xml: EncodeToken of Comment containing --> marker", -}, { - desc: "proc instruction", - toks: []Token{ - ProcInst{"Target", []byte("Instruction")}, - }, - want: ``, -}, { - desc: "proc instruction with empty target", - toks: []Token{ - ProcInst{"", []byte("Instruction")}, - }, - err: "xml: EncodeToken of ProcInst with invalid Target", -}, { - desc: "proc instruction with bad content", - toks: []Token{ - ProcInst{"", []byte("Instruction?>")}, - }, - err: "xml: EncodeToken of ProcInst with invalid Target", -}, { - desc: "directive", - toks: []Token{ - Directive("foo"), - }, - want: ``, -}, { - desc: "more complex directive", - toks: []Token{ - Directive("DOCTYPE doc [ '> ]"), - }, - want: `'> ]>`, -}, { - desc: "directive instruction with bad name", - toks: []Token{ - Directive("foo>"), - }, - err: "xml: EncodeToken of Directive containing wrong < or > markers", -}, { - desc: "end tag without start tag", - toks: []Token{ - EndElement{Name{"foo", "bar"}}, - }, - err: "xml: end tag without start tag", -}, { - desc: "mismatching end tag local name", - toks: []Token{ - StartElement{Name{"", "foo"}, nil}, - EndElement{Name{"", "bar"}}, - }, - err: "xml: end tag does not match start tag ", - want: ``, -}, { - desc: "mismatching end tag namespace", - toks: []Token{ - StartElement{Name{"space", "foo"}, nil}, - EndElement{Name{"another", "foo"}}, - }, - err: "xml: end tag in namespace another does not match start tag in namespace space", - want: ``, -}, { - desc: "start element with explicit namespace", - toks: []Token{ - StartElement{Name{"space", "local"}, []Attr{ - {Name{"xmlns", "x"}, "space"}, - {Name{"space", "foo"}, "value"}, - }}, - }, - want: ``, -}, { - desc: "start element with explicit namespace and colliding prefix", - toks: []Token{ - StartElement{Name{"space", "local"}, []Attr{ - {Name{"xmlns", "x"}, "space"}, - {Name{"space", "foo"}, "value"}, - {Name{"x", "bar"}, "other"}, - }}, - }, - want: ``, -}, { - desc: "start element using previously defined namespace", - toks: []Token{ - StartElement{Name{"", "local"}, []Attr{ - {Name{"xmlns", "x"}, "space"}, - }}, - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"space", "x"}, "y"}, - }}, - }, - want: ``, -}, { - desc: "nested name space with same prefix", - toks: []Token{ - StartElement{Name{"", "foo"}, []Attr{ - {Name{"xmlns", "x"}, "space1"}, - }}, - StartElement{Name{"", "foo"}, []Attr{ - {Name{"xmlns", "x"}, "space2"}, - }}, - StartElement{Name{"", "foo"}, []Attr{ - {Name{"space1", "a"}, "space1 value"}, - {Name{"space2", "b"}, "space2 value"}, - }}, - EndElement{Name{"", "foo"}}, - EndElement{Name{"", "foo"}}, - StartElement{Name{"", "foo"}, []Attr{ - {Name{"space1", "a"}, "space1 value"}, - {Name{"space2", "b"}, "space2 value"}, - }}, - }, - want: ``, -}, { - desc: "start element defining several prefixes for the same name space", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"xmlns", "a"}, "space"}, - {Name{"xmlns", "b"}, "space"}, - {Name{"space", "x"}, "value"}, - }}, - }, - want: ``, -}, { - desc: "nested element redefines name space", - toks: []Token{ - StartElement{Name{"", "foo"}, []Attr{ - {Name{"xmlns", "x"}, "space"}, - }}, - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"xmlns", "y"}, "space"}, - {Name{"space", "a"}, "value"}, - }}, - }, - want: ``, -}, { - desc: "nested element creates alias for default name space", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - }}, - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"xmlns", "y"}, "space"}, - {Name{"space", "a"}, "value"}, - }}, - }, - want: ``, -}, { - desc: "nested element defines default name space with existing prefix", - toks: []Token{ - StartElement{Name{"", "foo"}, []Attr{ - {Name{"xmlns", "x"}, "space"}, - }}, - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - {Name{"space", "a"}, "value"}, - }}, - }, - want: ``, -}, { - desc: "nested element uses empty attribute name space when default ns defined", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - }}, - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "attr"}, "value"}, - }}, - }, - want: ``, -}, { - desc: "redefine xmlns", - toks: []Token{ - StartElement{Name{"", "foo"}, []Attr{ - {Name{"foo", "xmlns"}, "space"}, - }}, - }, - err: `xml: cannot redefine xmlns attribute prefix`, -}, { - desc: "xmlns with explicit name space #1", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"xml", "xmlns"}, "space"}, - }}, - }, - want: ``, -}, { - desc: "xmlns with explicit name space #2", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{xmlURL, "xmlns"}, "space"}, - }}, - }, - want: ``, -}, { - desc: "empty name space declaration is ignored", - toks: []Token{ - StartElement{Name{"", "foo"}, []Attr{ - {Name{"xmlns", "foo"}, ""}, - }}, - }, - want: ``, -}, { - desc: "attribute with no name is ignored", - toks: []Token{ - StartElement{Name{"", "foo"}, []Attr{ - {Name{"", ""}, "value"}, - }}, - }, - want: ``, -}, { - desc: "namespace URL with non-valid name", - toks: []Token{ - StartElement{Name{"/34", "foo"}, []Attr{ - {Name{"/34", "x"}, "value"}, - }}, - }, - want: `<_:foo xmlns:_="/34" _:x="value">`, -}, { - desc: "nested element resets default namespace to empty", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - }}, - StartElement{Name{"", "foo"}, []Attr{ - {Name{"", "xmlns"}, ""}, - {Name{"", "x"}, "value"}, - {Name{"space", "x"}, "value"}, - }}, - }, - want: ``, -}, { - desc: "nested element requires empty default name space", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - }}, - StartElement{Name{"", "foo"}, nil}, - }, - want: ``, -}, { - desc: "attribute uses name space from xmlns", - toks: []Token{ - StartElement{Name{"some/space", "foo"}, []Attr{ - {Name{"", "attr"}, "value"}, - {Name{"some/space", "other"}, "other value"}, - }}, - }, - want: ``, -}, { - desc: "default name space should not be used by attributes", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - {Name{"xmlns", "bar"}, "space"}, - {Name{"space", "baz"}, "foo"}, - }}, - StartElement{Name{"space", "baz"}, nil}, - EndElement{Name{"space", "baz"}}, - EndElement{Name{"space", "foo"}}, - }, - want: ``, -}, { - desc: "default name space not used by attributes, not explicitly defined", - toks: []Token{ - StartElement{Name{"space", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - {Name{"space", "baz"}, "foo"}, - }}, - StartElement{Name{"space", "baz"}, nil}, - EndElement{Name{"space", "baz"}}, - EndElement{Name{"space", "foo"}}, - }, - want: ``, -}, { - desc: "impossible xmlns declaration", - toks: []Token{ - StartElement{Name{"", "foo"}, []Attr{ - {Name{"", "xmlns"}, "space"}, - }}, - StartElement{Name{"space", "bar"}, []Attr{ - {Name{"space", "attr"}, "value"}, - }}, - }, - want: ``, -}} - -func TestEncodeToken(t *testing.T) { -loop: - for i, tt := range encodeTokenTests { - var buf bytes.Buffer - enc := NewEncoder(&buf) - var err error - for j, tok := range tt.toks { - err = enc.EncodeToken(tok) - if err != nil && j < len(tt.toks)-1 { - t.Errorf("#%d %s token #%d: %v", i, tt.desc, j, err) - continue loop - } - } - errorf := func(f string, a ...interface{}) { - t.Errorf("#%d %s token #%d:%s", i, tt.desc, len(tt.toks)-1, fmt.Sprintf(f, a...)) - } - switch { - case tt.err != "" && err == nil: - errorf(" expected error; got none") - continue - case tt.err == "" && err != nil: - errorf(" got error: %v", err) - continue - case tt.err != "" && err != nil && tt.err != err.Error(): - errorf(" error mismatch; got %v, want %v", err, tt.err) - continue - } - if err := enc.Flush(); err != nil { - errorf(" %v", err) - continue - } - if got := buf.String(); got != tt.want { - errorf("\ngot %v\nwant %v", got, tt.want) - continue - } - } -} - -func TestProcInstEncodeToken(t *testing.T) { - var buf bytes.Buffer - enc := NewEncoder(&buf) - - if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err != nil { - t.Fatalf("enc.EncodeToken: expected to be able to encode xml target ProcInst as first token, %s", err) - } - - if err := enc.EncodeToken(ProcInst{"Target", []byte("Instruction")}); err != nil { - t.Fatalf("enc.EncodeToken: expected to be able to add non-xml target ProcInst") - } - - if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err == nil { - t.Fatalf("enc.EncodeToken: expected to not be allowed to encode xml target ProcInst when not first token") - } -} - -func TestDecodeEncode(t *testing.T) { - var in, out bytes.Buffer - in.WriteString(` - - - -`) - dec := NewDecoder(&in) - enc := NewEncoder(&out) - for tok, err := dec.Token(); err == nil; tok, err = dec.Token() { - err = enc.EncodeToken(tok) - if err != nil { - t.Fatalf("enc.EncodeToken: Unable to encode token (%#v), %v", tok, err) - } - } -} - -// Issue 9796. Used to fail with GORACE="halt_on_error=1" -race. -func TestRace9796(t *testing.T) { - type A struct{} - type B struct { - C []A `xml:"X>Y"` - } - var wg sync.WaitGroup - for i := 0; i < 2; i++ { - wg.Add(1) - go func() { - Marshal(B{[]A{{}}}) - wg.Done() - }() - } - wg.Wait() -} - -func TestIsValidDirective(t *testing.T) { - testOK := []string{ - "<>", - "< < > >", - "' '>' >", - " ]>", - " '<' ' doc ANY> ]>", - ">>> a < comment --> [ ] >", - } - testKO := []string{ - "<", - ">", - "", - "< > > < < >", - " -->", - "", - "'", - "", - } - for _, s := range testOK { - if !isValidDirective(Directive(s)) { - t.Errorf("Directive %q is expected to be valid", s) - } - } - for _, s := range testKO { - if isValidDirective(Directive(s)) { - t.Errorf("Directive %q is expected to be invalid", s) - } - } -} - -// Issue 11719. EncodeToken used to silently eat tokens with an invalid type. -func TestSimpleUseOfEncodeToken(t *testing.T) { - var buf bytes.Buffer - enc := NewEncoder(&buf) - if err := enc.EncodeToken(&StartElement{Name: Name{"", "object1"}}); err == nil { - t.Errorf("enc.EncodeToken: pointer type should be rejected") - } - if err := enc.EncodeToken(&EndElement{Name: Name{"", "object1"}}); err == nil { - t.Errorf("enc.EncodeToken: pointer type should be rejected") - } - if err := enc.EncodeToken(StartElement{Name: Name{"", "object2"}}); err != nil { - t.Errorf("enc.EncodeToken: StartElement %s", err) - } - if err := enc.EncodeToken(EndElement{Name: Name{"", "object2"}}); err != nil { - t.Errorf("enc.EncodeToken: EndElement %s", err) - } - if err := enc.EncodeToken(Universe{}); err == nil { - t.Errorf("enc.EncodeToken: invalid type not caught") - } - if err := enc.Flush(); err != nil { - t.Errorf("enc.Flush: %s", err) - } - if buf.Len() == 0 { - t.Errorf("enc.EncodeToken: empty buffer") - } - want := "" - if buf.String() != want { - t.Errorf("enc.EncodeToken: expected %q; got %q", want, buf.String()) - } -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/read.go b/deps/golang.org/x/net/webdav/internal/xml/read.go deleted file mode 100644 index 4089056a1..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/read.go +++ /dev/null @@ -1,692 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "bytes" - "encoding" - "errors" - "fmt" - "reflect" - "strconv" - "strings" -) - -// BUG(rsc): Mapping between XML elements and data structures is inherently flawed: -// an XML element is an order-dependent collection of anonymous -// values, while a data structure is an order-independent collection -// of named values. -// See package json for a textual representation more suitable -// to data structures. - -// Unmarshal parses the XML-encoded data and stores the result in -// the value pointed to by v, which must be an arbitrary struct, -// slice, or string. Well-formed data that does not fit into v is -// discarded. -// -// Because Unmarshal uses the reflect package, it can only assign -// to exported (upper case) fields. Unmarshal uses a case-sensitive -// comparison to match XML element names to tag values and struct -// field names. -// -// Unmarshal maps an XML element to a struct using the following rules. -// In the rules, the tag of a field refers to the value associated with the -// key 'xml' in the struct field's tag (see the example above). -// -// * If the struct has a field of type []byte or string with tag -// ",innerxml", Unmarshal accumulates the raw XML nested inside the -// element in that field. The rest of the rules still apply. -// -// * If the struct has a field named XMLName of type xml.Name, -// Unmarshal records the element name in that field. -// -// * If the XMLName field has an associated tag of the form -// "name" or "namespace-URL name", the XML element must have -// the given name (and, optionally, name space) or else Unmarshal -// returns an error. -// -// * If the XML element has an attribute whose name matches a -// struct field name with an associated tag containing ",attr" or -// the explicit name in a struct field tag of the form "name,attr", -// Unmarshal records the attribute value in that field. -// -// * If the XML element contains character data, that data is -// accumulated in the first struct field that has tag ",chardata". -// The struct field may have type []byte or string. -// If there is no such field, the character data is discarded. -// -// * If the XML element contains comments, they are accumulated in -// the first struct field that has tag ",comment". The struct -// field may have type []byte or string. If there is no such -// field, the comments are discarded. -// -// * If the XML element contains a sub-element whose name matches -// the prefix of a tag formatted as "a" or "a>b>c", unmarshal -// will descend into the XML structure looking for elements with the -// given names, and will map the innermost elements to that struct -// field. A tag starting with ">" is equivalent to one starting -// with the field name followed by ">". -// -// * If the XML element contains a sub-element whose name matches -// a struct field's XMLName tag and the struct field has no -// explicit name tag as per the previous rule, unmarshal maps -// the sub-element to that struct field. -// -// * If the XML element contains a sub-element whose name matches a -// field without any mode flags (",attr", ",chardata", etc), Unmarshal -// maps the sub-element to that struct field. -// -// * If the XML element contains a sub-element that hasn't matched any -// of the above rules and the struct has a field with tag ",any", -// unmarshal maps the sub-element to that struct field. -// -// * An anonymous struct field is handled as if the fields of its -// value were part of the outer struct. -// -// * A struct field with tag "-" is never unmarshalled into. -// -// Unmarshal maps an XML element to a string or []byte by saving the -// concatenation of that element's character data in the string or -// []byte. The saved []byte is never nil. -// -// Unmarshal maps an attribute value to a string or []byte by saving -// the value in the string or slice. -// -// Unmarshal maps an XML element to a slice by extending the length of -// the slice and mapping the element to the newly created value. -// -// Unmarshal maps an XML element or attribute value to a bool by -// setting it to the boolean value represented by the string. -// -// Unmarshal maps an XML element or attribute value to an integer or -// floating-point field by setting the field to the result of -// interpreting the string value in decimal. There is no check for -// overflow. -// -// Unmarshal maps an XML element to an xml.Name by recording the -// element name. -// -// Unmarshal maps an XML element to a pointer by setting the pointer -// to a freshly allocated value and then mapping the element to that value. -// -func Unmarshal(data []byte, v interface{}) error { - return NewDecoder(bytes.NewReader(data)).Decode(v) -} - -// Decode works like xml.Unmarshal, except it reads the decoder -// stream to find the start element. -func (d *Decoder) Decode(v interface{}) error { - return d.DecodeElement(v, nil) -} - -// DecodeElement works like xml.Unmarshal except that it takes -// a pointer to the start XML element to decode into v. -// It is useful when a client reads some raw XML tokens itself -// but also wants to defer to Unmarshal for some elements. -func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error { - val := reflect.ValueOf(v) - if val.Kind() != reflect.Ptr { - return errors.New("non-pointer passed to Unmarshal") - } - return d.unmarshal(val.Elem(), start) -} - -// An UnmarshalError represents an error in the unmarshalling process. -type UnmarshalError string - -func (e UnmarshalError) Error() string { return string(e) } - -// Unmarshaler is the interface implemented by objects that can unmarshal -// an XML element description of themselves. -// -// UnmarshalXML decodes a single XML element -// beginning with the given start element. -// If it returns an error, the outer call to Unmarshal stops and -// returns that error. -// UnmarshalXML must consume exactly one XML element. -// One common implementation strategy is to unmarshal into -// a separate value with a layout matching the expected XML -// using d.DecodeElement, and then to copy the data from -// that value into the receiver. -// Another common strategy is to use d.Token to process the -// XML object one token at a time. -// UnmarshalXML may not use d.RawToken. -type Unmarshaler interface { - UnmarshalXML(d *Decoder, start StartElement) error -} - -// UnmarshalerAttr is the interface implemented by objects that can unmarshal -// an XML attribute description of themselves. -// -// UnmarshalXMLAttr decodes a single XML attribute. -// If it returns an error, the outer call to Unmarshal stops and -// returns that error. -// UnmarshalXMLAttr is used only for struct fields with the -// "attr" option in the field tag. -type UnmarshalerAttr interface { - UnmarshalXMLAttr(attr Attr) error -} - -// receiverType returns the receiver type to use in an expression like "%s.MethodName". -func receiverType(val interface{}) string { - t := reflect.TypeOf(val) - if t.Name() != "" { - return t.String() - } - return "(" + t.String() + ")" -} - -// unmarshalInterface unmarshals a single XML element into val. -// start is the opening tag of the element. -func (p *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error { - // Record that decoder must stop at end tag corresponding to start. - p.pushEOF() - - p.unmarshalDepth++ - err := val.UnmarshalXML(p, *start) - p.unmarshalDepth-- - if err != nil { - p.popEOF() - return err - } - - if !p.popEOF() { - return fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", receiverType(val), start.Name.Local) - } - - return nil -} - -// unmarshalTextInterface unmarshals a single XML element into val. -// The chardata contained in the element (but not its children) -// is passed to the text unmarshaler. -func (p *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler, start *StartElement) error { - var buf []byte - depth := 1 - for depth > 0 { - t, err := p.Token() - if err != nil { - return err - } - switch t := t.(type) { - case CharData: - if depth == 1 { - buf = append(buf, t...) - } - case StartElement: - depth++ - case EndElement: - depth-- - } - } - return val.UnmarshalText(buf) -} - -// unmarshalAttr unmarshals a single XML attribute into val. -func (p *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error { - if val.Kind() == reflect.Ptr { - if val.IsNil() { - val.Set(reflect.New(val.Type().Elem())) - } - val = val.Elem() - } - - if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) { - // This is an unmarshaler with a non-pointer receiver, - // so it's likely to be incorrect, but we do what we're told. - return val.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(unmarshalerAttrType) { - return pv.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) - } - } - - // Not an UnmarshalerAttr; try encoding.TextUnmarshaler. - if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { - // This is an unmarshaler with a non-pointer receiver, - // so it's likely to be incorrect, but we do what we're told. - return val.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) - } - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { - return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) - } - } - - copyValue(val, []byte(attr.Value)) - return nil -} - -var ( - unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() - unmarshalerAttrType = reflect.TypeOf((*UnmarshalerAttr)(nil)).Elem() - textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() -) - -// Unmarshal a single XML element into val. -func (p *Decoder) unmarshal(val reflect.Value, start *StartElement) error { - // Find start element if we need it. - if start == nil { - for { - tok, err := p.Token() - if err != nil { - return err - } - if t, ok := tok.(StartElement); ok { - start = &t - break - } - } - } - - // Load value from interface, but only if the result will be - // usefully addressable. - if val.Kind() == reflect.Interface && !val.IsNil() { - e := val.Elem() - if e.Kind() == reflect.Ptr && !e.IsNil() { - val = e - } - } - - if val.Kind() == reflect.Ptr { - if val.IsNil() { - val.Set(reflect.New(val.Type().Elem())) - } - val = val.Elem() - } - - if val.CanInterface() && val.Type().Implements(unmarshalerType) { - // This is an unmarshaler with a non-pointer receiver, - // so it's likely to be incorrect, but we do what we're told. - return p.unmarshalInterface(val.Interface().(Unmarshaler), start) - } - - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(unmarshalerType) { - return p.unmarshalInterface(pv.Interface().(Unmarshaler), start) - } - } - - if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { - return p.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler), start) - } - - if val.CanAddr() { - pv := val.Addr() - if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { - return p.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler), start) - } - } - - var ( - data []byte - saveData reflect.Value - comment []byte - saveComment reflect.Value - saveXML reflect.Value - saveXMLIndex int - saveXMLData []byte - saveAny reflect.Value - sv reflect.Value - tinfo *typeInfo - err error - ) - - switch v := val; v.Kind() { - default: - return errors.New("unknown type " + v.Type().String()) - - case reflect.Interface: - // TODO: For now, simply ignore the field. In the near - // future we may choose to unmarshal the start - // element on it, if not nil. - return p.Skip() - - case reflect.Slice: - typ := v.Type() - if typ.Elem().Kind() == reflect.Uint8 { - // []byte - saveData = v - break - } - - // Slice of element values. - // Grow slice. - n := v.Len() - if n >= v.Cap() { - ncap := 2 * n - if ncap < 4 { - ncap = 4 - } - new := reflect.MakeSlice(typ, n, ncap) - reflect.Copy(new, v) - v.Set(new) - } - v.SetLen(n + 1) - - // Recur to read element into slice. - if err := p.unmarshal(v.Index(n), start); err != nil { - v.SetLen(n) - return err - } - return nil - - case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.String: - saveData = v - - case reflect.Struct: - typ := v.Type() - if typ == nameType { - v.Set(reflect.ValueOf(start.Name)) - break - } - - sv = v - tinfo, err = getTypeInfo(typ) - if err != nil { - return err - } - - // Validate and assign element name. - if tinfo.xmlname != nil { - finfo := tinfo.xmlname - if finfo.name != "" && finfo.name != start.Name.Local { - return UnmarshalError("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">") - } - if finfo.xmlns != "" && finfo.xmlns != start.Name.Space { - e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have " - if start.Name.Space == "" { - e += "no name space" - } else { - e += start.Name.Space - } - return UnmarshalError(e) - } - fv := finfo.value(sv) - if _, ok := fv.Interface().(Name); ok { - fv.Set(reflect.ValueOf(start.Name)) - } - } - - // Assign attributes. - // Also, determine whether we need to save character data or comments. - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - switch finfo.flags & fMode { - case fAttr: - strv := finfo.value(sv) - // Look for attribute. - for _, a := range start.Attr { - if a.Name.Local == finfo.name && (finfo.xmlns == "" || finfo.xmlns == a.Name.Space) { - if err := p.unmarshalAttr(strv, a); err != nil { - return err - } - break - } - } - - case fCharData: - if !saveData.IsValid() { - saveData = finfo.value(sv) - } - - case fComment: - if !saveComment.IsValid() { - saveComment = finfo.value(sv) - } - - case fAny, fAny | fElement: - if !saveAny.IsValid() { - saveAny = finfo.value(sv) - } - - case fInnerXml: - if !saveXML.IsValid() { - saveXML = finfo.value(sv) - if p.saved == nil { - saveXMLIndex = 0 - p.saved = new(bytes.Buffer) - } else { - saveXMLIndex = p.savedOffset() - } - } - } - } - } - - // Find end element. - // Process sub-elements along the way. -Loop: - for { - var savedOffset int - if saveXML.IsValid() { - savedOffset = p.savedOffset() - } - tok, err := p.Token() - if err != nil { - return err - } - switch t := tok.(type) { - case StartElement: - consumed := false - if sv.IsValid() { - consumed, err = p.unmarshalPath(tinfo, sv, nil, &t) - if err != nil { - return err - } - if !consumed && saveAny.IsValid() { - consumed = true - if err := p.unmarshal(saveAny, &t); err != nil { - return err - } - } - } - if !consumed { - if err := p.Skip(); err != nil { - return err - } - } - - case EndElement: - if saveXML.IsValid() { - saveXMLData = p.saved.Bytes()[saveXMLIndex:savedOffset] - if saveXMLIndex == 0 { - p.saved = nil - } - } - break Loop - - case CharData: - if saveData.IsValid() { - data = append(data, t...) - } - - case Comment: - if saveComment.IsValid() { - comment = append(comment, t...) - } - } - } - - if saveData.IsValid() && saveData.CanInterface() && saveData.Type().Implements(textUnmarshalerType) { - if err := saveData.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { - return err - } - saveData = reflect.Value{} - } - - if saveData.IsValid() && saveData.CanAddr() { - pv := saveData.Addr() - if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { - if err := pv.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { - return err - } - saveData = reflect.Value{} - } - } - - if err := copyValue(saveData, data); err != nil { - return err - } - - switch t := saveComment; t.Kind() { - case reflect.String: - t.SetString(string(comment)) - case reflect.Slice: - t.Set(reflect.ValueOf(comment)) - } - - switch t := saveXML; t.Kind() { - case reflect.String: - t.SetString(string(saveXMLData)) - case reflect.Slice: - t.Set(reflect.ValueOf(saveXMLData)) - } - - return nil -} - -func copyValue(dst reflect.Value, src []byte) (err error) { - dst0 := dst - - if dst.Kind() == reflect.Ptr { - if dst.IsNil() { - dst.Set(reflect.New(dst.Type().Elem())) - } - dst = dst.Elem() - } - - // Save accumulated data. - switch dst.Kind() { - case reflect.Invalid: - // Probably a comment. - default: - return errors.New("cannot unmarshal into " + dst0.Type().String()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits()) - if err != nil { - return err - } - dst.SetInt(itmp) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - utmp, err := strconv.ParseUint(string(src), 10, dst.Type().Bits()) - if err != nil { - return err - } - dst.SetUint(utmp) - case reflect.Float32, reflect.Float64: - ftmp, err := strconv.ParseFloat(string(src), dst.Type().Bits()) - if err != nil { - return err - } - dst.SetFloat(ftmp) - case reflect.Bool: - value, err := strconv.ParseBool(strings.TrimSpace(string(src))) - if err != nil { - return err - } - dst.SetBool(value) - case reflect.String: - dst.SetString(string(src)) - case reflect.Slice: - if len(src) == 0 { - // non-nil to flag presence - src = []byte{} - } - dst.SetBytes(src) - } - return nil -} - -// unmarshalPath walks down an XML structure looking for wanted -// paths, and calls unmarshal on them. -// The consumed result tells whether XML elements have been consumed -// from the Decoder until start's matching end element, or if it's -// still untouched because start is uninteresting for sv's fields. -func (p *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []string, start *StartElement) (consumed bool, err error) { - recurse := false -Loop: - for i := range tinfo.fields { - finfo := &tinfo.fields[i] - if finfo.flags&fElement == 0 || len(finfo.parents) < len(parents) || finfo.xmlns != "" && finfo.xmlns != start.Name.Space { - continue - } - for j := range parents { - if parents[j] != finfo.parents[j] { - continue Loop - } - } - if len(finfo.parents) == len(parents) && finfo.name == start.Name.Local { - // It's a perfect match, unmarshal the field. - return true, p.unmarshal(finfo.value(sv), start) - } - if len(finfo.parents) > len(parents) && finfo.parents[len(parents)] == start.Name.Local { - // It's a prefix for the field. Break and recurse - // since it's not ok for one field path to be itself - // the prefix for another field path. - recurse = true - - // We can reuse the same slice as long as we - // don't try to append to it. - parents = finfo.parents[:len(parents)+1] - break - } - } - if !recurse { - // We have no business with this element. - return false, nil - } - // The element is not a perfect match for any field, but one - // or more fields have the path to this element as a parent - // prefix. Recurse and attempt to match these. - for { - var tok Token - tok, err = p.Token() - if err != nil { - return true, err - } - switch t := tok.(type) { - case StartElement: - consumed2, err := p.unmarshalPath(tinfo, sv, parents, &t) - if err != nil { - return true, err - } - if !consumed2 { - if err := p.Skip(); err != nil { - return true, err - } - } - case EndElement: - return true, nil - } - } -} - -// Skip reads tokens until it has consumed the end element -// matching the most recent start element already consumed. -// It recurs if it encounters a start element, so it can be used to -// skip nested structures. -// It returns nil if it finds an end element matching the start -// element; otherwise it returns an error describing the problem. -func (d *Decoder) Skip() error { - for { - tok, err := d.Token() - if err != nil { - return err - } - switch tok.(type) { - case StartElement: - if err := d.Skip(); err != nil { - return err - } - case EndElement: - return nil - } - } -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/read_test.go b/deps/golang.org/x/net/webdav/internal/xml/read_test.go deleted file mode 100644 index 02f1e10c3..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/read_test.go +++ /dev/null @@ -1,744 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "bytes" - "fmt" - "io" - "reflect" - "strings" - "testing" - "time" -) - -// Stripped down Atom feed data structures. - -func TestUnmarshalFeed(t *testing.T) { - var f Feed - if err := Unmarshal([]byte(atomFeedString), &f); err != nil { - t.Fatalf("Unmarshal: %s", err) - } - if !reflect.DeepEqual(f, atomFeed) { - t.Fatalf("have %#v\nwant %#v", f, atomFeed) - } -} - -// hget http://codereview.appspot.com/rss/mine/rsc -const atomFeedString = ` - -Code Review - My issueshttp://codereview.appspot.com/rietveld<>rietveld: an attempt at pubsubhubbub -2009-10-04T01:35:58+00:00email-address-removedurn:md5:134d9179c41f806be79b3a5f7877d19a - An attempt at adding pubsubhubbub support to Rietveld. -http://code.google.com/p/pubsubhubbub -http://code.google.com/p/rietveld/issues/detail?id=155 - -The server side of the protocol is trivial: - 1. add a &lt;link rel=&quot;hub&quot; href=&quot;hub-server&quot;&gt; tag to all - feeds that will be pubsubhubbubbed. - 2. every time one of those feeds changes, tell the hub - with a simple POST request. - -I have tested this by adding debug prints to a local hub -server and checking that the server got the right publish -requests. - -I can&#39;t quite get the server to work, but I think the bug -is not in my code. I think that the server expects to be -able to grab the feed and see the feed&#39;s actual URL in -the link rel=&quot;self&quot;, but the default value for that drops -the :port from the URL, and I cannot for the life of me -figure out how to get the Atom generator deep inside -django not to do that, or even where it is doing that, -or even what code is running to generate the Atom feed. -(I thought I knew but I added some assert False statements -and it kept running!) - -Ignoring that particular problem, I would appreciate -feedback on the right way to get the two values at -the top of feeds.py marked NOTE(rsc). - - -rietveld: correct tab handling -2009-10-03T23:02:17+00:00email-address-removedurn:md5:0a2a4f19bb815101f0ba2904aed7c35a - This fixes the buggy tab rendering that can be seen at -http://codereview.appspot.com/116075/diff/1/2 - -The fundamental problem was that the tab code was -not being told what column the text began in, so it -didn&#39;t know where to put the tab stops. Another problem -was that some of the code assumed that string byte -offsets were the same as column offsets, which is only -true if there are no tabs. - -In the process of fixing this, I cleaned up the arguments -to Fold and ExpandTabs and renamed them Break and -_ExpandTabs so that I could be sure that I found all the -call sites. I also wanted to verify that ExpandTabs was -not being used from outside intra_region_diff.py. - - - ` - -type Feed struct { - XMLName Name `xml:"http://www.w3.org/2005/Atom feed"` - Title string `xml:"title"` - Id string `xml:"id"` - Link []Link `xml:"link"` - Updated time.Time `xml:"updated,attr"` - Author Person `xml:"author"` - Entry []Entry `xml:"entry"` -} - -type Entry struct { - Title string `xml:"title"` - Id string `xml:"id"` - Link []Link `xml:"link"` - Updated time.Time `xml:"updated"` - Author Person `xml:"author"` - Summary Text `xml:"summary"` -} - -type Link struct { - Rel string `xml:"rel,attr,omitempty"` - Href string `xml:"href,attr"` -} - -type Person struct { - Name string `xml:"name"` - URI string `xml:"uri"` - Email string `xml:"email"` - InnerXML string `xml:",innerxml"` -} - -type Text struct { - Type string `xml:"type,attr,omitempty"` - Body string `xml:",chardata"` -} - -var atomFeed = Feed{ - XMLName: Name{"http://www.w3.org/2005/Atom", "feed"}, - Title: "Code Review - My issues", - Link: []Link{ - {Rel: "alternate", Href: "http://codereview.appspot.com/"}, - {Rel: "self", Href: "http://codereview.appspot.com/rss/mine/rsc"}, - }, - Id: "http://codereview.appspot.com/", - Updated: ParseTime("2009-10-04T01:35:58+00:00"), - Author: Person{ - Name: "rietveld<>", - InnerXML: "rietveld<>", - }, - Entry: []Entry{ - { - Title: "rietveld: an attempt at pubsubhubbub\n", - Link: []Link{ - {Rel: "alternate", Href: "http://codereview.appspot.com/126085"}, - }, - Updated: ParseTime("2009-10-04T01:35:58+00:00"), - Author: Person{ - Name: "email-address-removed", - InnerXML: "email-address-removed", - }, - Id: "urn:md5:134d9179c41f806be79b3a5f7877d19a", - Summary: Text{ - Type: "html", - Body: ` - An attempt at adding pubsubhubbub support to Rietveld. -http://code.google.com/p/pubsubhubbub -http://code.google.com/p/rietveld/issues/detail?id=155 - -The server side of the protocol is trivial: - 1. add a <link rel="hub" href="hub-server"> tag to all - feeds that will be pubsubhubbubbed. - 2. every time one of those feeds changes, tell the hub - with a simple POST request. - -I have tested this by adding debug prints to a local hub -server and checking that the server got the right publish -requests. - -I can't quite get the server to work, but I think the bug -is not in my code. I think that the server expects to be -able to grab the feed and see the feed's actual URL in -the link rel="self", but the default value for that drops -the :port from the URL, and I cannot for the life of me -figure out how to get the Atom generator deep inside -django not to do that, or even where it is doing that, -or even what code is running to generate the Atom feed. -(I thought I knew but I added some assert False statements -and it kept running!) - -Ignoring that particular problem, I would appreciate -feedback on the right way to get the two values at -the top of feeds.py marked NOTE(rsc). - - -`, - }, - }, - { - Title: "rietveld: correct tab handling\n", - Link: []Link{ - {Rel: "alternate", Href: "http://codereview.appspot.com/124106"}, - }, - Updated: ParseTime("2009-10-03T23:02:17+00:00"), - Author: Person{ - Name: "email-address-removed", - InnerXML: "email-address-removed", - }, - Id: "urn:md5:0a2a4f19bb815101f0ba2904aed7c35a", - Summary: Text{ - Type: "html", - Body: ` - This fixes the buggy tab rendering that can be seen at -http://codereview.appspot.com/116075/diff/1/2 - -The fundamental problem was that the tab code was -not being told what column the text began in, so it -didn't know where to put the tab stops. Another problem -was that some of the code assumed that string byte -offsets were the same as column offsets, which is only -true if there are no tabs. - -In the process of fixing this, I cleaned up the arguments -to Fold and ExpandTabs and renamed them Break and -_ExpandTabs so that I could be sure that I found all the -call sites. I also wanted to verify that ExpandTabs was -not being used from outside intra_region_diff.py. - - -`, - }, - }, - }, -} - -const pathTestString = ` - - 1 - - - A - - - B - - - C - D - - <_> - E - - - 2 - -` - -type PathTestItem struct { - Value string -} - -type PathTestA struct { - Items []PathTestItem `xml:">Item1"` - Before, After string -} - -type PathTestB struct { - Other []PathTestItem `xml:"Items>Item1"` - Before, After string -} - -type PathTestC struct { - Values1 []string `xml:"Items>Item1>Value"` - Values2 []string `xml:"Items>Item2>Value"` - Before, After string -} - -type PathTestSet struct { - Item1 []PathTestItem -} - -type PathTestD struct { - Other PathTestSet `xml:"Items"` - Before, After string -} - -type PathTestE struct { - Underline string `xml:"Items>_>Value"` - Before, After string -} - -var pathTests = []interface{}{ - &PathTestA{Items: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"}, - &PathTestB{Other: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"}, - &PathTestC{Values1: []string{"A", "C", "D"}, Values2: []string{"B"}, Before: "1", After: "2"}, - &PathTestD{Other: PathTestSet{Item1: []PathTestItem{{"A"}, {"D"}}}, Before: "1", After: "2"}, - &PathTestE{Underline: "E", Before: "1", After: "2"}, -} - -func TestUnmarshalPaths(t *testing.T) { - for _, pt := range pathTests { - v := reflect.New(reflect.TypeOf(pt).Elem()).Interface() - if err := Unmarshal([]byte(pathTestString), v); err != nil { - t.Fatalf("Unmarshal: %s", err) - } - if !reflect.DeepEqual(v, pt) { - t.Fatalf("have %#v\nwant %#v", v, pt) - } - } -} - -type BadPathTestA struct { - First string `xml:"items>item1"` - Other string `xml:"items>item2"` - Second string `xml:"items"` -} - -type BadPathTestB struct { - Other string `xml:"items>item2>value"` - First string `xml:"items>item1"` - Second string `xml:"items>item1>value"` -} - -type BadPathTestC struct { - First string - Second string `xml:"First"` -} - -type BadPathTestD struct { - BadPathEmbeddedA - BadPathEmbeddedB -} - -type BadPathEmbeddedA struct { - First string -} - -type BadPathEmbeddedB struct { - Second string `xml:"First"` -} - -var badPathTests = []struct { - v, e interface{} -}{ - {&BadPathTestA{}, &TagPathError{reflect.TypeOf(BadPathTestA{}), "First", "items>item1", "Second", "items"}}, - {&BadPathTestB{}, &TagPathError{reflect.TypeOf(BadPathTestB{}), "First", "items>item1", "Second", "items>item1>value"}}, - {&BadPathTestC{}, &TagPathError{reflect.TypeOf(BadPathTestC{}), "First", "", "Second", "First"}}, - {&BadPathTestD{}, &TagPathError{reflect.TypeOf(BadPathTestD{}), "First", "", "Second", "First"}}, -} - -func TestUnmarshalBadPaths(t *testing.T) { - for _, tt := range badPathTests { - err := Unmarshal([]byte(pathTestString), tt.v) - if !reflect.DeepEqual(err, tt.e) { - t.Fatalf("Unmarshal with %#v didn't fail properly:\nhave %#v,\nwant %#v", tt.v, err, tt.e) - } - } -} - -const OK = "OK" -const withoutNameTypeData = ` - -` - -type TestThree struct { - XMLName Name `xml:"Test3"` - Attr string `xml:",attr"` -} - -func TestUnmarshalWithoutNameType(t *testing.T) { - var x TestThree - if err := Unmarshal([]byte(withoutNameTypeData), &x); err != nil { - t.Fatalf("Unmarshal: %s", err) - } - if x.Attr != OK { - t.Fatalf("have %v\nwant %v", x.Attr, OK) - } -} - -func TestUnmarshalAttr(t *testing.T) { - type ParamVal struct { - Int int `xml:"int,attr"` - } - - type ParamPtr struct { - Int *int `xml:"int,attr"` - } - - type ParamStringPtr struct { - Int *string `xml:"int,attr"` - } - - x := []byte(``) - - p1 := &ParamPtr{} - if err := Unmarshal(x, p1); err != nil { - t.Fatalf("Unmarshal: %s", err) - } - if p1.Int == nil { - t.Fatalf("Unmarshal failed in to *int field") - } else if *p1.Int != 1 { - t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p1.Int, 1) - } - - p2 := &ParamVal{} - if err := Unmarshal(x, p2); err != nil { - t.Fatalf("Unmarshal: %s", err) - } - if p2.Int != 1 { - t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p2.Int, 1) - } - - p3 := &ParamStringPtr{} - if err := Unmarshal(x, p3); err != nil { - t.Fatalf("Unmarshal: %s", err) - } - if p3.Int == nil { - t.Fatalf("Unmarshal failed in to *string field") - } else if *p3.Int != "1" { - t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p3.Int, 1) - } -} - -type Tables struct { - HTable string `xml:"http://www.w3.org/TR/html4/ table"` - FTable string `xml:"http://www.w3schools.com/furniture table"` -} - -var tables = []struct { - xml string - tab Tables - ns string -}{ - { - xml: `` + - `
  • hello
    ` + - `world
    ` + - ``, - tab: Tables{"hello", "world"}, - }, - { - xml: `` + - `world
    ` + - `hello
    ` + - `
    `, - tab: Tables{"hello", "world"}, - }, - { - xml: `` + - `world` + - `hello` + - ``, - tab: Tables{"hello", "world"}, - }, - { - xml: `` + - `bogus
    ` + - `
    `, - tab: Tables{}, - }, - { - xml: `` + - `only
    ` + - `
    `, - tab: Tables{HTable: "only"}, - ns: "http://www.w3.org/TR/html4/", - }, - { - xml: `` + - `only
    ` + - `
    `, - tab: Tables{FTable: "only"}, - ns: "http://www.w3schools.com/furniture", - }, - { - xml: `` + - `only
    ` + - `
    `, - tab: Tables{}, - ns: "something else entirely", - }, -} - -func TestUnmarshalNS(t *testing.T) { - for i, tt := range tables { - var dst Tables - var err error - if tt.ns != "" { - d := NewDecoder(strings.NewReader(tt.xml)) - d.DefaultSpace = tt.ns - err = d.Decode(&dst) - } else { - err = Unmarshal([]byte(tt.xml), &dst) - } - if err != nil { - t.Errorf("#%d: Unmarshal: %v", i, err) - continue - } - want := tt.tab - if dst != want { - t.Errorf("#%d: dst=%+v, want %+v", i, dst, want) - } - } -} - -func TestRoundTrip(t *testing.T) { - // From issue 7535 - const s = `` - in := bytes.NewBufferString(s) - for i := 0; i < 10; i++ { - out := &bytes.Buffer{} - d := NewDecoder(in) - e := NewEncoder(out) - - for { - t, err := d.Token() - if err == io.EOF { - break - } - if err != nil { - fmt.Println("failed:", err) - return - } - e.EncodeToken(t) - } - e.Flush() - in = out - } - if got := in.String(); got != s { - t.Errorf("have: %q\nwant: %q\n", got, s) - } -} - -func TestMarshalNS(t *testing.T) { - dst := Tables{"hello", "world"} - data, err := Marshal(&dst) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - want := `hello
    world
    ` - str := string(data) - if str != want { - t.Errorf("have: %q\nwant: %q\n", str, want) - } -} - -type TableAttrs struct { - TAttr TAttr -} - -type TAttr struct { - HTable string `xml:"http://www.w3.org/TR/html4/ table,attr"` - FTable string `xml:"http://www.w3schools.com/furniture table,attr"` - Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` - Other1 string `xml:"http://golang.org/xml/ other,attr,omitempty"` - Other2 string `xml:"http://golang.org/xmlfoo/ other,attr,omitempty"` - Other3 string `xml:"http://golang.org/json/ other,attr,omitempty"` - Other4 string `xml:"http://golang.org/2/json/ other,attr,omitempty"` -} - -var tableAttrs = []struct { - xml string - tab TableAttrs - ns string -}{ - { - xml: ``, - tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, - }, - { - xml: ``, - tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, - }, - { - xml: ``, - tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, - }, - { - // Default space does not apply to attribute names. - xml: ``, - tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}}, - }, - { - // Default space does not apply to attribute names. - xml: ``, - tab: TableAttrs{TAttr{HTable: "", FTable: "world"}}, - }, - { - xml: ``, - tab: TableAttrs{}, - }, - { - // Default space does not apply to attribute names. - xml: ``, - tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}}, - ns: "http://www.w3schools.com/furniture", - }, - { - // Default space does not apply to attribute names. - xml: ``, - tab: TableAttrs{TAttr{HTable: "", FTable: "world"}}, - ns: "http://www.w3.org/TR/html4/", - }, - { - xml: ``, - tab: TableAttrs{}, - ns: "something else entirely", - }, -} - -func TestUnmarshalNSAttr(t *testing.T) { - for i, tt := range tableAttrs { - var dst TableAttrs - var err error - if tt.ns != "" { - d := NewDecoder(strings.NewReader(tt.xml)) - d.DefaultSpace = tt.ns - err = d.Decode(&dst) - } else { - err = Unmarshal([]byte(tt.xml), &dst) - } - if err != nil { - t.Errorf("#%d: Unmarshal: %v", i, err) - continue - } - want := tt.tab - if dst != want { - t.Errorf("#%d: dst=%+v, want %+v", i, dst, want) - } - } -} - -func TestMarshalNSAttr(t *testing.T) { - src := TableAttrs{TAttr{"hello", "world", "en_US", "other1", "other2", "other3", "other4"}} - data, err := Marshal(&src) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - want := `` - str := string(data) - if str != want { - t.Errorf("Marshal:\nhave: %#q\nwant: %#q\n", str, want) - } - - var dst TableAttrs - if err := Unmarshal(data, &dst); err != nil { - t.Errorf("Unmarshal: %v", err) - } - - if dst != src { - t.Errorf("Unmarshal = %q, want %q", dst, src) - } -} - -type MyCharData struct { - body string -} - -func (m *MyCharData) UnmarshalXML(d *Decoder, start StartElement) error { - for { - t, err := d.Token() - if err == io.EOF { // found end of element - break - } - if err != nil { - return err - } - if char, ok := t.(CharData); ok { - m.body += string(char) - } - } - return nil -} - -var _ Unmarshaler = (*MyCharData)(nil) - -func (m *MyCharData) UnmarshalXMLAttr(attr Attr) error { - panic("must not call") -} - -type MyAttr struct { - attr string -} - -func (m *MyAttr) UnmarshalXMLAttr(attr Attr) error { - m.attr = attr.Value - return nil -} - -var _ UnmarshalerAttr = (*MyAttr)(nil) - -type MyStruct struct { - Data *MyCharData - Attr *MyAttr `xml:",attr"` - - Data2 MyCharData - Attr2 MyAttr `xml:",attr"` -} - -func TestUnmarshaler(t *testing.T) { - xml := ` - - hello world - howdy world - - ` - - var m MyStruct - if err := Unmarshal([]byte(xml), &m); err != nil { - t.Fatal(err) - } - - if m.Data == nil || m.Attr == nil || m.Data.body != "hello world" || m.Attr.attr != "attr1" || m.Data2.body != "howdy world" || m.Attr2.attr != "attr2" { - t.Errorf("m=%#+v\n", m) - } -} - -type Pea struct { - Cotelydon string -} - -type Pod struct { - Pea interface{} `xml:"Pea"` -} - -// https://golang.org/issue/6836 -func TestUnmarshalIntoInterface(t *testing.T) { - pod := new(Pod) - pod.Pea = new(Pea) - xml := `Green stuff` - err := Unmarshal([]byte(xml), pod) - if err != nil { - t.Fatalf("failed to unmarshal %q: %v", xml, err) - } - pea, ok := pod.Pea.(*Pea) - if !ok { - t.Fatalf("unmarshalled into wrong type: have %T want *Pea", pod.Pea) - } - have, want := pea.Cotelydon, "Green stuff" - if have != want { - t.Errorf("failed to unmarshal into interface, have %q want %q", have, want) - } -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/typeinfo.go b/deps/golang.org/x/net/webdav/internal/xml/typeinfo.go deleted file mode 100644 index fdde288bc..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/typeinfo.go +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xml - -import ( - "fmt" - "reflect" - "strings" - "sync" -) - -// typeInfo holds details for the xml representation of a type. -type typeInfo struct { - xmlname *fieldInfo - fields []fieldInfo -} - -// fieldInfo holds details for the xml representation of a single field. -type fieldInfo struct { - idx []int - name string - xmlns string - flags fieldFlags - parents []string -} - -type fieldFlags int - -const ( - fElement fieldFlags = 1 << iota - fAttr - fCharData - fInnerXml - fComment - fAny - - fOmitEmpty - - fMode = fElement | fAttr | fCharData | fInnerXml | fComment | fAny -) - -var tinfoMap = make(map[reflect.Type]*typeInfo) -var tinfoLock sync.RWMutex - -var nameType = reflect.TypeOf(Name{}) - -// getTypeInfo returns the typeInfo structure with details necessary -// for marshalling and unmarshalling typ. -func getTypeInfo(typ reflect.Type) (*typeInfo, error) { - tinfoLock.RLock() - tinfo, ok := tinfoMap[typ] - tinfoLock.RUnlock() - if ok { - return tinfo, nil - } - tinfo = &typeInfo{} - if typ.Kind() == reflect.Struct && typ != nameType { - n := typ.NumField() - for i := 0; i < n; i++ { - f := typ.Field(i) - if f.PkgPath != "" || f.Tag.Get("xml") == "-" { - continue // Private field - } - - // For embedded structs, embed its fields. - if f.Anonymous { - t := f.Type - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - if t.Kind() == reflect.Struct { - inner, err := getTypeInfo(t) - if err != nil { - return nil, err - } - if tinfo.xmlname == nil { - tinfo.xmlname = inner.xmlname - } - for _, finfo := range inner.fields { - finfo.idx = append([]int{i}, finfo.idx...) - if err := addFieldInfo(typ, tinfo, &finfo); err != nil { - return nil, err - } - } - continue - } - } - - finfo, err := structFieldInfo(typ, &f) - if err != nil { - return nil, err - } - - if f.Name == "XMLName" { - tinfo.xmlname = finfo - continue - } - - // Add the field if it doesn't conflict with other fields. - if err := addFieldInfo(typ, tinfo, finfo); err != nil { - return nil, err - } - } - } - tinfoLock.Lock() - tinfoMap[typ] = tinfo - tinfoLock.Unlock() - return tinfo, nil -} - -// structFieldInfo builds and returns a fieldInfo for f. -func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, error) { - finfo := &fieldInfo{idx: f.Index} - - // Split the tag from the xml namespace if necessary. - tag := f.Tag.Get("xml") - if i := strings.Index(tag, " "); i >= 0 { - finfo.xmlns, tag = tag[:i], tag[i+1:] - } - - // Parse flags. - tokens := strings.Split(tag, ",") - if len(tokens) == 1 { - finfo.flags = fElement - } else { - tag = tokens[0] - for _, flag := range tokens[1:] { - switch flag { - case "attr": - finfo.flags |= fAttr - case "chardata": - finfo.flags |= fCharData - case "innerxml": - finfo.flags |= fInnerXml - case "comment": - finfo.flags |= fComment - case "any": - finfo.flags |= fAny - case "omitempty": - finfo.flags |= fOmitEmpty - } - } - - // Validate the flags used. - valid := true - switch mode := finfo.flags & fMode; mode { - case 0: - finfo.flags |= fElement - case fAttr, fCharData, fInnerXml, fComment, fAny: - if f.Name == "XMLName" || tag != "" && mode != fAttr { - valid = false - } - default: - // This will also catch multiple modes in a single field. - valid = false - } - if finfo.flags&fMode == fAny { - finfo.flags |= fElement - } - if finfo.flags&fOmitEmpty != 0 && finfo.flags&(fElement|fAttr) == 0 { - valid = false - } - if !valid { - return nil, fmt.Errorf("xml: invalid tag in field %s of type %s: %q", - f.Name, typ, f.Tag.Get("xml")) - } - } - - // Use of xmlns without a name is not allowed. - if finfo.xmlns != "" && tag == "" { - return nil, fmt.Errorf("xml: namespace without name in field %s of type %s: %q", - f.Name, typ, f.Tag.Get("xml")) - } - - if f.Name == "XMLName" { - // The XMLName field records the XML element name. Don't - // process it as usual because its name should default to - // empty rather than to the field name. - finfo.name = tag - return finfo, nil - } - - if tag == "" { - // If the name part of the tag is completely empty, get - // default from XMLName of underlying struct if feasible, - // or field name otherwise. - if xmlname := lookupXMLName(f.Type); xmlname != nil { - finfo.xmlns, finfo.name = xmlname.xmlns, xmlname.name - } else { - finfo.name = f.Name - } - return finfo, nil - } - - if finfo.xmlns == "" && finfo.flags&fAttr == 0 { - // If it's an element no namespace specified, get the default - // from the XMLName of enclosing struct if possible. - if xmlname := lookupXMLName(typ); xmlname != nil { - finfo.xmlns = xmlname.xmlns - } - } - - // Prepare field name and parents. - parents := strings.Split(tag, ">") - if parents[0] == "" { - parents[0] = f.Name - } - if parents[len(parents)-1] == "" { - return nil, fmt.Errorf("xml: trailing '>' in field %s of type %s", f.Name, typ) - } - finfo.name = parents[len(parents)-1] - if len(parents) > 1 { - if (finfo.flags & fElement) == 0 { - return nil, fmt.Errorf("xml: %s chain not valid with %s flag", tag, strings.Join(tokens[1:], ",")) - } - finfo.parents = parents[:len(parents)-1] - } - - // If the field type has an XMLName field, the names must match - // so that the behavior of both marshalling and unmarshalling - // is straightforward and unambiguous. - if finfo.flags&fElement != 0 { - ftyp := f.Type - xmlname := lookupXMLName(ftyp) - if xmlname != nil && xmlname.name != finfo.name { - return nil, fmt.Errorf("xml: name %q in tag of %s.%s conflicts with name %q in %s.XMLName", - finfo.name, typ, f.Name, xmlname.name, ftyp) - } - } - return finfo, nil -} - -// lookupXMLName returns the fieldInfo for typ's XMLName field -// in case it exists and has a valid xml field tag, otherwise -// it returns nil. -func lookupXMLName(typ reflect.Type) (xmlname *fieldInfo) { - for typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - if typ.Kind() != reflect.Struct { - return nil - } - for i, n := 0, typ.NumField(); i < n; i++ { - f := typ.Field(i) - if f.Name != "XMLName" { - continue - } - finfo, err := structFieldInfo(typ, &f) - if finfo.name != "" && err == nil { - return finfo - } - // Also consider errors as a non-existent field tag - // and let getTypeInfo itself report the error. - break - } - return nil -} - -func min(a, b int) int { - if a <= b { - return a - } - return b -} - -// addFieldInfo adds finfo to tinfo.fields if there are no -// conflicts, or if conflicts arise from previous fields that were -// obtained from deeper embedded structures than finfo. In the latter -// case, the conflicting entries are dropped. -// A conflict occurs when the path (parent + name) to a field is -// itself a prefix of another path, or when two paths match exactly. -// It is okay for field paths to share a common, shorter prefix. -func addFieldInfo(typ reflect.Type, tinfo *typeInfo, newf *fieldInfo) error { - var conflicts []int -Loop: - // First, figure all conflicts. Most working code will have none. - for i := range tinfo.fields { - oldf := &tinfo.fields[i] - if oldf.flags&fMode != newf.flags&fMode { - continue - } - if oldf.xmlns != "" && newf.xmlns != "" && oldf.xmlns != newf.xmlns { - continue - } - minl := min(len(newf.parents), len(oldf.parents)) - for p := 0; p < minl; p++ { - if oldf.parents[p] != newf.parents[p] { - continue Loop - } - } - if len(oldf.parents) > len(newf.parents) { - if oldf.parents[len(newf.parents)] == newf.name { - conflicts = append(conflicts, i) - } - } else if len(oldf.parents) < len(newf.parents) { - if newf.parents[len(oldf.parents)] == oldf.name { - conflicts = append(conflicts, i) - } - } else { - if newf.name == oldf.name { - conflicts = append(conflicts, i) - } - } - } - // Without conflicts, add the new field and return. - if conflicts == nil { - tinfo.fields = append(tinfo.fields, *newf) - return nil - } - - // If any conflict is shallower, ignore the new field. - // This matches the Go field resolution on embedding. - for _, i := range conflicts { - if len(tinfo.fields[i].idx) < len(newf.idx) { - return nil - } - } - - // Otherwise, if any of them is at the same depth level, it's an error. - for _, i := range conflicts { - oldf := &tinfo.fields[i] - if len(oldf.idx) == len(newf.idx) { - f1 := typ.FieldByIndex(oldf.idx) - f2 := typ.FieldByIndex(newf.idx) - return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")} - } - } - - // Otherwise, the new field is shallower, and thus takes precedence, - // so drop the conflicting fields from tinfo and append the new one. - for c := len(conflicts) - 1; c >= 0; c-- { - i := conflicts[c] - copy(tinfo.fields[i:], tinfo.fields[i+1:]) - tinfo.fields = tinfo.fields[:len(tinfo.fields)-1] - } - tinfo.fields = append(tinfo.fields, *newf) - return nil -} - -// A TagPathError represents an error in the unmarshalling process -// caused by the use of field tags with conflicting paths. -type TagPathError struct { - Struct reflect.Type - Field1, Tag1 string - Field2, Tag2 string -} - -func (e *TagPathError) Error() string { - return fmt.Sprintf("%s field %q with tag %q conflicts with field %q with tag %q", e.Struct, e.Field1, e.Tag1, e.Field2, e.Tag2) -} - -// value returns v's field value corresponding to finfo. -// It's equivalent to v.FieldByIndex(finfo.idx), but initializes -// and dereferences pointers as necessary. -func (finfo *fieldInfo) value(v reflect.Value) reflect.Value { - for i, x := range finfo.idx { - if i > 0 { - t := v.Type() - if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct { - if v.IsNil() { - v.Set(reflect.New(v.Type().Elem())) - } - v = v.Elem() - } - } - v = v.Field(x) - } - return v -} diff --git a/deps/golang.org/x/net/webdav/internal/xml/xml.go b/deps/golang.org/x/net/webdav/internal/xml/xml.go deleted file mode 100644 index 5b79cbecb..000000000 --- a/deps/golang.org/x/net/webdav/internal/xml/xml.go +++ /dev/null @@ -1,1998 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package xml implements a simple XML 1.0 parser that -// understands XML name spaces. -package xml - -// References: -// Annotated XML spec: http://www.xml.com/axml/testaxml.htm -// XML name spaces: http://www.w3.org/TR/REC-xml-names/ - -// TODO(rsc): -// Test error handling. - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -// A SyntaxError represents a syntax error in the XML input stream. -type SyntaxError struct { - Msg string - Line int -} - -func (e *SyntaxError) Error() string { - return "XML syntax error on line " + strconv.Itoa(e.Line) + ": " + e.Msg -} - -// A Name represents an XML name (Local) annotated with a name space -// identifier (Space). In tokens returned by Decoder.Token, the Space -// identifier is given as a canonical URL, not the short prefix used in -// the document being parsed. -// -// As a special case, XML namespace declarations will use the literal -// string "xmlns" for the Space field instead of the fully resolved URL. -// See Encoder.EncodeToken for more information on namespace encoding -// behaviour. -type Name struct { - Space, Local string -} - -// isNamespace reports whether the name is a namespace-defining name. -func (name Name) isNamespace() bool { - return name.Local == "xmlns" || name.Space == "xmlns" -} - -// An Attr represents an attribute in an XML element (Name=Value). -type Attr struct { - Name Name - Value string -} - -// A Token is an interface holding one of the token types: -// StartElement, EndElement, CharData, Comment, ProcInst, or Directive. -type Token interface{} - -// A StartElement represents an XML start element. -type StartElement struct { - Name Name - Attr []Attr -} - -func (e StartElement) Copy() StartElement { - attrs := make([]Attr, len(e.Attr)) - copy(attrs, e.Attr) - e.Attr = attrs - return e -} - -// End returns the corresponding XML end element. -func (e StartElement) End() EndElement { - return EndElement{e.Name} -} - -// setDefaultNamespace sets the namespace of the element -// as the default for all elements contained within it. -func (e *StartElement) setDefaultNamespace() { - if e.Name.Space == "" { - // If there's no namespace on the element, don't - // set the default. Strictly speaking this might be wrong, as - // we can't tell if the element had no namespace set - // or was just using the default namespace. - return - } - // Don't add a default name space if there's already one set. - for _, attr := range e.Attr { - if attr.Name.Space == "" && attr.Name.Local == "xmlns" { - return - } - } - e.Attr = append(e.Attr, Attr{ - Name: Name{ - Local: "xmlns", - }, - Value: e.Name.Space, - }) -} - -// An EndElement represents an XML end element. -type EndElement struct { - Name Name -} - -// A CharData represents XML character data (raw text), -// in which XML escape sequences have been replaced by -// the characters they represent. -type CharData []byte - -func makeCopy(b []byte) []byte { - b1 := make([]byte, len(b)) - copy(b1, b) - return b1 -} - -func (c CharData) Copy() CharData { return CharData(makeCopy(c)) } - -// A Comment represents an XML comment of the form . -// The bytes do not include the comment markers. -type Comment []byte - -func (c Comment) Copy() Comment { return Comment(makeCopy(c)) } - -// A ProcInst represents an XML processing instruction of the form -type ProcInst struct { - Target string - Inst []byte -} - -func (p ProcInst) Copy() ProcInst { - p.Inst = makeCopy(p.Inst) - return p -} - -// A Directive represents an XML directive of the form . -// The bytes do not include the markers. -type Directive []byte - -func (d Directive) Copy() Directive { return Directive(makeCopy(d)) } - -// CopyToken returns a copy of a Token. -func CopyToken(t Token) Token { - switch v := t.(type) { - case CharData: - return v.Copy() - case Comment: - return v.Copy() - case Directive: - return v.Copy() - case ProcInst: - return v.Copy() - case StartElement: - return v.Copy() - } - return t -} - -// A Decoder represents an XML parser reading a particular input stream. -// The parser assumes that its input is encoded in UTF-8. -type Decoder struct { - // Strict defaults to true, enforcing the requirements - // of the XML specification. - // If set to false, the parser allows input containing common - // mistakes: - // * If an element is missing an end tag, the parser invents - // end tags as necessary to keep the return values from Token - // properly balanced. - // * In attribute values and character data, unknown or malformed - // character entities (sequences beginning with &) are left alone. - // - // Setting: - // - // d.Strict = false; - // d.AutoClose = HTMLAutoClose; - // d.Entity = HTMLEntity - // - // creates a parser that can handle typical HTML. - // - // Strict mode does not enforce the requirements of the XML name spaces TR. - // In particular it does not reject name space tags using undefined prefixes. - // Such tags are recorded with the unknown prefix as the name space URL. - Strict bool - - // When Strict == false, AutoClose indicates a set of elements to - // consider closed immediately after they are opened, regardless - // of whether an end element is present. - AutoClose []string - - // Entity can be used to map non-standard entity names to string replacements. - // The parser behaves as if these standard mappings are present in the map, - // regardless of the actual map content: - // - // "lt": "<", - // "gt": ">", - // "amp": "&", - // "apos": "'", - // "quot": `"`, - Entity map[string]string - - // CharsetReader, if non-nil, defines a function to generate - // charset-conversion readers, converting from the provided - // non-UTF-8 charset into UTF-8. If CharsetReader is nil or - // returns an error, parsing stops with an error. One of the - // the CharsetReader's result values must be non-nil. - CharsetReader func(charset string, input io.Reader) (io.Reader, error) - - // DefaultSpace sets the default name space used for unadorned tags, - // as if the entire XML stream were wrapped in an element containing - // the attribute xmlns="DefaultSpace". - DefaultSpace string - - r io.ByteReader - buf bytes.Buffer - saved *bytes.Buffer - stk *stack - free *stack - needClose bool - toClose Name - nextToken Token - nextByte int - ns map[string]string - err error - line int - offset int64 - unmarshalDepth int -} - -// NewDecoder creates a new XML parser reading from r. -// If r does not implement io.ByteReader, NewDecoder will -// do its own buffering. -func NewDecoder(r io.Reader) *Decoder { - d := &Decoder{ - ns: make(map[string]string), - nextByte: -1, - line: 1, - Strict: true, - } - d.switchToReader(r) - return d -} - -// Token returns the next XML token in the input stream. -// At the end of the input stream, Token returns nil, io.EOF. -// -// Slices of bytes in the returned token data refer to the -// parser's internal buffer and remain valid only until the next -// call to Token. To acquire a copy of the bytes, call CopyToken -// or the token's Copy method. -// -// Token expands self-closing elements such as
    -// into separate start and end elements returned by successive calls. -// -// Token guarantees that the StartElement and EndElement -// tokens it returns are properly nested and matched: -// if Token encounters an unexpected end element, -// it will return an error. -// -// Token implements XML name spaces as described by -// http://www.w3.org/TR/REC-xml-names/. Each of the -// Name structures contained in the Token has the Space -// set to the URL identifying its name space when known. -// If Token encounters an unrecognized name space prefix, -// it uses the prefix as the Space rather than report an error. -func (d *Decoder) Token() (t Token, err error) { - if d.stk != nil && d.stk.kind == stkEOF { - err = io.EOF - return - } - if d.nextToken != nil { - t = d.nextToken - d.nextToken = nil - } else if t, err = d.rawToken(); err != nil { - return - } - - if !d.Strict { - if t1, ok := d.autoClose(t); ok { - d.nextToken = t - t = t1 - } - } - switch t1 := t.(type) { - case StartElement: - // In XML name spaces, the translations listed in the - // attributes apply to the element name and - // to the other attribute names, so process - // the translations first. - for _, a := range t1.Attr { - if a.Name.Space == "xmlns" { - v, ok := d.ns[a.Name.Local] - d.pushNs(a.Name.Local, v, ok) - d.ns[a.Name.Local] = a.Value - } - if a.Name.Space == "" && a.Name.Local == "xmlns" { - // Default space for untagged names - v, ok := d.ns[""] - d.pushNs("", v, ok) - d.ns[""] = a.Value - } - } - - d.translate(&t1.Name, true) - for i := range t1.Attr { - d.translate(&t1.Attr[i].Name, false) - } - d.pushElement(t1.Name) - t = t1 - - case EndElement: - d.translate(&t1.Name, true) - if !d.popElement(&t1) { - return nil, d.err - } - t = t1 - } - return -} - -const xmlURL = "http://www.w3.org/XML/1998/namespace" - -// Apply name space translation to name n. -// The default name space (for Space=="") -// applies only to element names, not to attribute names. -func (d *Decoder) translate(n *Name, isElementName bool) { - switch { - case n.Space == "xmlns": - return - case n.Space == "" && !isElementName: - return - case n.Space == "xml": - n.Space = xmlURL - case n.Space == "" && n.Local == "xmlns": - return - } - if v, ok := d.ns[n.Space]; ok { - n.Space = v - } else if n.Space == "" { - n.Space = d.DefaultSpace - } -} - -func (d *Decoder) switchToReader(r io.Reader) { - // Get efficient byte at a time reader. - // Assume that if reader has its own - // ReadByte, it's efficient enough. - // Otherwise, use bufio. - if rb, ok := r.(io.ByteReader); ok { - d.r = rb - } else { - d.r = bufio.NewReader(r) - } -} - -// Parsing state - stack holds old name space translations -// and the current set of open elements. The translations to pop when -// ending a given tag are *below* it on the stack, which is -// more work but forced on us by XML. -type stack struct { - next *stack - kind int - name Name - ok bool -} - -const ( - stkStart = iota - stkNs - stkEOF -) - -func (d *Decoder) push(kind int) *stack { - s := d.free - if s != nil { - d.free = s.next - } else { - s = new(stack) - } - s.next = d.stk - s.kind = kind - d.stk = s - return s -} - -func (d *Decoder) pop() *stack { - s := d.stk - if s != nil { - d.stk = s.next - s.next = d.free - d.free = s - } - return s -} - -// Record that after the current element is finished -// (that element is already pushed on the stack) -// Token should return EOF until popEOF is called. -func (d *Decoder) pushEOF() { - // Walk down stack to find Start. - // It might not be the top, because there might be stkNs - // entries above it. - start := d.stk - for start.kind != stkStart { - start = start.next - } - // The stkNs entries below a start are associated with that - // element too; skip over them. - for start.next != nil && start.next.kind == stkNs { - start = start.next - } - s := d.free - if s != nil { - d.free = s.next - } else { - s = new(stack) - } - s.kind = stkEOF - s.next = start.next - start.next = s -} - -// Undo a pushEOF. -// The element must have been finished, so the EOF should be at the top of the stack. -func (d *Decoder) popEOF() bool { - if d.stk == nil || d.stk.kind != stkEOF { - return false - } - d.pop() - return true -} - -// Record that we are starting an element with the given name. -func (d *Decoder) pushElement(name Name) { - s := d.push(stkStart) - s.name = name -} - -// Record that we are changing the value of ns[local]. -// The old value is url, ok. -func (d *Decoder) pushNs(local string, url string, ok bool) { - s := d.push(stkNs) - s.name.Local = local - s.name.Space = url - s.ok = ok -} - -// Creates a SyntaxError with the current line number. -func (d *Decoder) syntaxError(msg string) error { - return &SyntaxError{Msg: msg, Line: d.line} -} - -// Record that we are ending an element with the given name. -// The name must match the record at the top of the stack, -// which must be a pushElement record. -// After popping the element, apply any undo records from -// the stack to restore the name translations that existed -// before we saw this element. -func (d *Decoder) popElement(t *EndElement) bool { - s := d.pop() - name := t.Name - switch { - case s == nil || s.kind != stkStart: - d.err = d.syntaxError("unexpected end element ") - return false - case s.name.Local != name.Local: - if !d.Strict { - d.needClose = true - d.toClose = t.Name - t.Name = s.name - return true - } - d.err = d.syntaxError("element <" + s.name.Local + "> closed by ") - return false - case s.name.Space != name.Space: - d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space + - "closed by in space " + name.Space) - return false - } - - // Pop stack until a Start or EOF is on the top, undoing the - // translations that were associated with the element we just closed. - for d.stk != nil && d.stk.kind != stkStart && d.stk.kind != stkEOF { - s := d.pop() - if s.ok { - d.ns[s.name.Local] = s.name.Space - } else { - delete(d.ns, s.name.Local) - } - } - - return true -} - -// If the top element on the stack is autoclosing and -// t is not the end tag, invent the end tag. -func (d *Decoder) autoClose(t Token) (Token, bool) { - if d.stk == nil || d.stk.kind != stkStart { - return nil, false - } - name := strings.ToLower(d.stk.name.Local) - for _, s := range d.AutoClose { - if strings.ToLower(s) == name { - // This one should be auto closed if t doesn't close it. - et, ok := t.(EndElement) - if !ok || et.Name.Local != name { - return EndElement{d.stk.name}, true - } - break - } - } - return nil, false -} - -var errRawToken = errors.New("xml: cannot use RawToken from UnmarshalXML method") - -// RawToken is like Token but does not verify that -// start and end elements match and does not translate -// name space prefixes to their corresponding URLs. -func (d *Decoder) RawToken() (Token, error) { - if d.unmarshalDepth > 0 { - return nil, errRawToken - } - return d.rawToken() -} - -func (d *Decoder) rawToken() (Token, error) { - if d.err != nil { - return nil, d.err - } - if d.needClose { - // The last element we read was self-closing and - // we returned just the StartElement half. - // Return the EndElement half now. - d.needClose = false - return EndElement{d.toClose}, nil - } - - b, ok := d.getc() - if !ok { - return nil, d.err - } - - if b != '<' { - // Text section. - d.ungetc(b) - data := d.text(-1, false) - if data == nil { - return nil, d.err - } - return CharData(data), nil - } - - if b, ok = d.mustgetc(); !ok { - return nil, d.err - } - switch b { - case '/': - // ' { - d.err = d.syntaxError("invalid characters between ") - return nil, d.err - } - return EndElement{name}, nil - - case '?': - // ' { - break - } - b0 = b - } - data := d.buf.Bytes() - data = data[0 : len(data)-2] // chop ?> - - if target == "xml" { - content := string(data) - ver := procInst("version", content) - if ver != "" && ver != "1.0" { - d.err = fmt.Errorf("xml: unsupported version %q; only version 1.0 is supported", ver) - return nil, d.err - } - enc := procInst("encoding", content) - if enc != "" && enc != "utf-8" && enc != "UTF-8" { - if d.CharsetReader == nil { - d.err = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", enc) - return nil, d.err - } - newr, err := d.CharsetReader(enc, d.r.(io.Reader)) - if err != nil { - d.err = fmt.Errorf("xml: opening charset %q: %v", enc, err) - return nil, d.err - } - if newr == nil { - panic("CharsetReader returned a nil Reader for charset " + enc) - } - d.switchToReader(newr) - } - } - return ProcInst{target, data}, nil - - case '!': - // ' { - break - } - b0, b1 = b1, b - } - data := d.buf.Bytes() - data = data[0 : len(data)-3] // chop --> - return Comment(data), nil - - case '[': // . - data := d.text(-1, true) - if data == nil { - return nil, d.err - } - return CharData(data), nil - } - - // Probably a directive: , , etc. - // We don't care, but accumulate for caller. Quoted angle - // brackets do not count for nesting. - d.buf.Reset() - d.buf.WriteByte(b) - inquote := uint8(0) - depth := 0 - for { - if b, ok = d.mustgetc(); !ok { - return nil, d.err - } - if inquote == 0 && b == '>' && depth == 0 { - break - } - HandleB: - d.buf.WriteByte(b) - switch { - case b == inquote: - inquote = 0 - - case inquote != 0: - // in quotes, no special action - - case b == '\'' || b == '"': - inquote = b - - case b == '>' && inquote == 0: - depth-- - - case b == '<' && inquote == 0: - // Look for ` - -var testEntity = map[string]string{"何": "What", "is-it": "is it?"} - -var rawTokens = []Token{ - CharData("\n"), - ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)}, - CharData("\n"), - Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`), - CharData("\n"), - StartElement{Name{"", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}}, - CharData("\n "), - StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}, - CharData("World <>'\" 白鵬翔"), - EndElement{Name{"", "hello"}}, - CharData("\n "), - StartElement{Name{"", "query"}, []Attr{}}, - CharData("What is it?"), - EndElement{Name{"", "query"}}, - CharData("\n "), - StartElement{Name{"", "goodbye"}, []Attr{}}, - EndElement{Name{"", "goodbye"}}, - CharData("\n "), - StartElement{Name{"", "outer"}, []Attr{{Name{"foo", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}}, - CharData("\n "), - StartElement{Name{"", "inner"}, []Attr{}}, - EndElement{Name{"", "inner"}}, - CharData("\n "), - EndElement{Name{"", "outer"}}, - CharData("\n "), - StartElement{Name{"tag", "name"}, []Attr{}}, - CharData("\n "), - CharData("Some text here."), - CharData("\n "), - EndElement{Name{"tag", "name"}}, - CharData("\n"), - EndElement{Name{"", "body"}}, - Comment(" missing final newline "), -} - -var cookedTokens = []Token{ - CharData("\n"), - ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)}, - CharData("\n"), - Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`), - CharData("\n"), - StartElement{Name{"ns2", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}}, - CharData("\n "), - StartElement{Name{"ns2", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}, - CharData("World <>'\" 白鵬翔"), - EndElement{Name{"ns2", "hello"}}, - CharData("\n "), - StartElement{Name{"ns2", "query"}, []Attr{}}, - CharData("What is it?"), - EndElement{Name{"ns2", "query"}}, - CharData("\n "), - StartElement{Name{"ns2", "goodbye"}, []Attr{}}, - EndElement{Name{"ns2", "goodbye"}}, - CharData("\n "), - StartElement{Name{"ns2", "outer"}, []Attr{{Name{"ns1", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}}, - CharData("\n "), - StartElement{Name{"ns2", "inner"}, []Attr{}}, - EndElement{Name{"ns2", "inner"}}, - CharData("\n "), - EndElement{Name{"ns2", "outer"}}, - CharData("\n "), - StartElement{Name{"ns3", "name"}, []Attr{}}, - CharData("\n "), - CharData("Some text here."), - CharData("\n "), - EndElement{Name{"ns3", "name"}}, - CharData("\n"), - EndElement{Name{"ns2", "body"}}, - Comment(" missing final newline "), -} - -const testInputAltEncoding = ` - -VALUE` - -var rawTokensAltEncoding = []Token{ - CharData("\n"), - ProcInst{"xml", []byte(`version="1.0" encoding="x-testing-uppercase"`)}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("value"), - EndElement{Name{"", "tag"}}, -} - -var xmlInput = []string{ - // unexpected EOF cases - "<", - "", - "", - "", - // "", // let the Token() caller handle - "", - "", - "", - "", - " c;", - "", - "", - "", - // "", // let the Token() caller handle - "", - "", - "cdata]]>", -} - -func TestRawToken(t *testing.T) { - d := NewDecoder(strings.NewReader(testInput)) - d.Entity = testEntity - testRawToken(t, d, testInput, rawTokens) -} - -const nonStrictInput = ` -non&entity -&unknown;entity -{ -&#zzz; -&なまえ3; -<-gt; -&; -&0a; -` - -var nonStringEntity = map[string]string{"": "oops!", "0a": "oops!"} - -var nonStrictTokens = []Token{ - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("non&entity"), - EndElement{Name{"", "tag"}}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("&unknown;entity"), - EndElement{Name{"", "tag"}}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("{"), - EndElement{Name{"", "tag"}}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("&#zzz;"), - EndElement{Name{"", "tag"}}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("&なまえ3;"), - EndElement{Name{"", "tag"}}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("<-gt;"), - EndElement{Name{"", "tag"}}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("&;"), - EndElement{Name{"", "tag"}}, - CharData("\n"), - StartElement{Name{"", "tag"}, []Attr{}}, - CharData("&0a;"), - EndElement{Name{"", "tag"}}, - CharData("\n"), -} - -func TestNonStrictRawToken(t *testing.T) { - d := NewDecoder(strings.NewReader(nonStrictInput)) - d.Strict = false - testRawToken(t, d, nonStrictInput, nonStrictTokens) -} - -type downCaser struct { - t *testing.T - r io.ByteReader -} - -func (d *downCaser) ReadByte() (c byte, err error) { - c, err = d.r.ReadByte() - if c >= 'A' && c <= 'Z' { - c += 'a' - 'A' - } - return -} - -func (d *downCaser) Read(p []byte) (int, error) { - d.t.Fatalf("unexpected Read call on downCaser reader") - panic("unreachable") -} - -func TestRawTokenAltEncoding(t *testing.T) { - d := NewDecoder(strings.NewReader(testInputAltEncoding)) - d.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) { - if charset != "x-testing-uppercase" { - t.Fatalf("unexpected charset %q", charset) - } - return &downCaser{t, input.(io.ByteReader)}, nil - } - testRawToken(t, d, testInputAltEncoding, rawTokensAltEncoding) -} - -func TestRawTokenAltEncodingNoConverter(t *testing.T) { - d := NewDecoder(strings.NewReader(testInputAltEncoding)) - token, err := d.RawToken() - if token == nil { - t.Fatalf("expected a token on first RawToken call") - } - if err != nil { - t.Fatal(err) - } - token, err = d.RawToken() - if token != nil { - t.Errorf("expected a nil token; got %#v", token) - } - if err == nil { - t.Fatalf("expected an error on second RawToken call") - } - const encoding = "x-testing-uppercase" - if !strings.Contains(err.Error(), encoding) { - t.Errorf("expected error to contain %q; got error: %v", - encoding, err) - } -} - -func testRawToken(t *testing.T, d *Decoder, raw string, rawTokens []Token) { - lastEnd := int64(0) - for i, want := range rawTokens { - start := d.InputOffset() - have, err := d.RawToken() - end := d.InputOffset() - if err != nil { - t.Fatalf("token %d: unexpected error: %s", i, err) - } - if !reflect.DeepEqual(have, want) { - var shave, swant string - if _, ok := have.(CharData); ok { - shave = fmt.Sprintf("CharData(%q)", have) - } else { - shave = fmt.Sprintf("%#v", have) - } - if _, ok := want.(CharData); ok { - swant = fmt.Sprintf("CharData(%q)", want) - } else { - swant = fmt.Sprintf("%#v", want) - } - t.Errorf("token %d = %s, want %s", i, shave, swant) - } - - // Check that InputOffset returned actual token. - switch { - case start < lastEnd: - t.Errorf("token %d: position [%d,%d) for %T is before previous token", i, start, end, have) - case start >= end: - // Special case: EndElement can be synthesized. - if start == end && end == lastEnd { - break - } - t.Errorf("token %d: position [%d,%d) for %T is empty", i, start, end, have) - case end > int64(len(raw)): - t.Errorf("token %d: position [%d,%d) for %T extends beyond input", i, start, end, have) - default: - text := raw[start:end] - if strings.ContainsAny(text, "<>") && (!strings.HasPrefix(text, "<") || !strings.HasSuffix(text, ">")) { - t.Errorf("token %d: misaligned raw token %#q for %T", i, text, have) - } - } - lastEnd = end - } -} - -// Ensure that directives (specifically !DOCTYPE) include the complete -// text of any nested directives, noting that < and > do not change -// nesting depth if they are in single or double quotes. - -var nestedDirectivesInput = ` -]> -">]> -]> -'>]> -]> -'>]> -]> -` - -var nestedDirectivesTokens = []Token{ - CharData("\n"), - Directive(`DOCTYPE []`), - CharData("\n"), - Directive(`DOCTYPE [">]`), - CharData("\n"), - Directive(`DOCTYPE []`), - CharData("\n"), - Directive(`DOCTYPE ['>]`), - CharData("\n"), - Directive(`DOCTYPE []`), - CharData("\n"), - Directive(`DOCTYPE ['>]`), - CharData("\n"), - Directive(`DOCTYPE []`), - CharData("\n"), -} - -func TestNestedDirectives(t *testing.T) { - d := NewDecoder(strings.NewReader(nestedDirectivesInput)) - - for i, want := range nestedDirectivesTokens { - have, err := d.Token() - if err != nil { - t.Fatalf("token %d: unexpected error: %s", i, err) - } - if !reflect.DeepEqual(have, want) { - t.Errorf("token %d = %#v want %#v", i, have, want) - } - } -} - -func TestToken(t *testing.T) { - d := NewDecoder(strings.NewReader(testInput)) - d.Entity = testEntity - - for i, want := range cookedTokens { - have, err := d.Token() - if err != nil { - t.Fatalf("token %d: unexpected error: %s", i, err) - } - if !reflect.DeepEqual(have, want) { - t.Errorf("token %d = %#v want %#v", i, have, want) - } - } -} - -func TestSyntax(t *testing.T) { - for i := range xmlInput { - d := NewDecoder(strings.NewReader(xmlInput[i])) - var err error - for _, err = d.Token(); err == nil; _, err = d.Token() { - } - if _, ok := err.(*SyntaxError); !ok { - t.Fatalf(`xmlInput "%s": expected SyntaxError not received`, xmlInput[i]) - } - } -} - -type allScalars struct { - True1 bool - True2 bool - False1 bool - False2 bool - Int int - Int8 int8 - Int16 int16 - Int32 int32 - Int64 int64 - Uint int - Uint8 uint8 - Uint16 uint16 - Uint32 uint32 - Uint64 uint64 - Uintptr uintptr - Float32 float32 - Float64 float64 - String string - PtrString *string -} - -var all = allScalars{ - True1: true, - True2: true, - False1: false, - False2: false, - Int: 1, - Int8: -2, - Int16: 3, - Int32: -4, - Int64: 5, - Uint: 6, - Uint8: 7, - Uint16: 8, - Uint32: 9, - Uint64: 10, - Uintptr: 11, - Float32: 13.0, - Float64: 14.0, - String: "15", - PtrString: &sixteen, -} - -var sixteen = "16" - -const testScalarsInput = ` - true - 1 - false - 0 - 1 - -2 - 3 - -4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12.0 - 13.0 - 14.0 - 15 - 16 -` - -func TestAllScalars(t *testing.T) { - var a allScalars - err := Unmarshal([]byte(testScalarsInput), &a) - - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(a, all) { - t.Errorf("have %+v want %+v", a, all) - } -} - -type item struct { - Field_a string -} - -func TestIssue569(t *testing.T) { - data := `abcd` - var i item - err := Unmarshal([]byte(data), &i) - - if err != nil || i.Field_a != "abcd" { - t.Fatal("Expecting abcd") - } -} - -func TestUnquotedAttrs(t *testing.T) { - data := "" - d := NewDecoder(strings.NewReader(data)) - d.Strict = false - token, err := d.Token() - if _, ok := err.(*SyntaxError); ok { - t.Errorf("Unexpected error: %v", err) - } - if token.(StartElement).Name.Local != "tag" { - t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local) - } - attr := token.(StartElement).Attr[0] - if attr.Value != "azAZ09:-_" { - t.Errorf("Unexpected attribute value: %v", attr.Value) - } - if attr.Name.Local != "attr" { - t.Errorf("Unexpected attribute name: %v", attr.Name.Local) - } -} - -func TestValuelessAttrs(t *testing.T) { - tests := [][3]string{ - {"

    ", "p", "nowrap"}, - {"

    ", "p", "nowrap"}, - {"", "input", "checked"}, - {"", "input", "checked"}, - } - for _, test := range tests { - d := NewDecoder(strings.NewReader(test[0])) - d.Strict = false - token, err := d.Token() - if _, ok := err.(*SyntaxError); ok { - t.Errorf("Unexpected error: %v", err) - } - if token.(StartElement).Name.Local != test[1] { - t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local) - } - attr := token.(StartElement).Attr[0] - if attr.Value != test[2] { - t.Errorf("Unexpected attribute value: %v", attr.Value) - } - if attr.Name.Local != test[2] { - t.Errorf("Unexpected attribute name: %v", attr.Name.Local) - } - } -} - -func TestCopyTokenCharData(t *testing.T) { - data := []byte("same data") - var tok1 Token = CharData(data) - tok2 := CopyToken(tok1) - if !reflect.DeepEqual(tok1, tok2) { - t.Error("CopyToken(CharData) != CharData") - } - data[1] = 'o' - if reflect.DeepEqual(tok1, tok2) { - t.Error("CopyToken(CharData) uses same buffer.") - } -} - -func TestCopyTokenStartElement(t *testing.T) { - elt := StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}} - var tok1 Token = elt - tok2 := CopyToken(tok1) - if tok1.(StartElement).Attr[0].Value != "en" { - t.Error("CopyToken overwrote Attr[0]") - } - if !reflect.DeepEqual(tok1, tok2) { - t.Error("CopyToken(StartElement) != StartElement") - } - tok1.(StartElement).Attr[0] = Attr{Name{"", "lang"}, "de"} - if reflect.DeepEqual(tok1, tok2) { - t.Error("CopyToken(CharData) uses same buffer.") - } -} - -func TestSyntaxErrorLineNum(t *testing.T) { - testInput := "

    Foo

    \n\n

    Bar\n" - d := NewDecoder(strings.NewReader(testInput)) - var err error - for _, err = d.Token(); err == nil; _, err = d.Token() { - } - synerr, ok := err.(*SyntaxError) - if !ok { - t.Error("Expected SyntaxError.") - } - if synerr.Line != 3 { - t.Error("SyntaxError didn't have correct line number.") - } -} - -func TestTrailingRawToken(t *testing.T) { - input := ` ` - d := NewDecoder(strings.NewReader(input)) - var err error - for _, err = d.RawToken(); err == nil; _, err = d.RawToken() { - } - if err != io.EOF { - t.Fatalf("d.RawToken() = _, %v, want _, io.EOF", err) - } -} - -func TestTrailingToken(t *testing.T) { - input := ` ` - d := NewDecoder(strings.NewReader(input)) - var err error - for _, err = d.Token(); err == nil; _, err = d.Token() { - } - if err != io.EOF { - t.Fatalf("d.Token() = _, %v, want _, io.EOF", err) - } -} - -func TestEntityInsideCDATA(t *testing.T) { - input := `` - d := NewDecoder(strings.NewReader(input)) - var err error - for _, err = d.Token(); err == nil; _, err = d.Token() { - } - if err != io.EOF { - t.Fatalf("d.Token() = _, %v, want _, io.EOF", err) - } -} - -var characterTests = []struct { - in string - err string -}{ - {"\x12", "illegal character code U+0012"}, - {"\x0b", "illegal character code U+000B"}, - {"\xef\xbf\xbe", "illegal character code U+FFFE"}, - {"\r\n\x07", "illegal character code U+0007"}, - {"what's up", "expected attribute name in element"}, - {"&abc\x01;", "invalid character entity &abc (no semicolon)"}, - {"&\x01;", "invalid character entity & (no semicolon)"}, - {"&\xef\xbf\xbe;", "invalid character entity &\uFFFE;"}, - {"&hello;", "invalid character entity &hello;"}, -} - -func TestDisallowedCharacters(t *testing.T) { - - for i, tt := range characterTests { - d := NewDecoder(strings.NewReader(tt.in)) - var err error - - for err == nil { - _, err = d.Token() - } - synerr, ok := err.(*SyntaxError) - if !ok { - t.Fatalf("input %d d.Token() = _, %v, want _, *SyntaxError", i, err) - } - if synerr.Msg != tt.err { - t.Fatalf("input %d synerr.Msg wrong: want %q, got %q", i, tt.err, synerr.Msg) - } - } -} - -type procInstEncodingTest struct { - expect, got string -} - -var procInstTests = []struct { - input string - expect [2]string -}{ - {`version="1.0" encoding="utf-8"`, [2]string{"1.0", "utf-8"}}, - {`version="1.0" encoding='utf-8'`, [2]string{"1.0", "utf-8"}}, - {`version="1.0" encoding='utf-8' `, [2]string{"1.0", "utf-8"}}, - {`version="1.0" encoding=utf-8`, [2]string{"1.0", ""}}, - {`encoding="FOO" `, [2]string{"", "FOO"}}, -} - -func TestProcInstEncoding(t *testing.T) { - for _, test := range procInstTests { - if got := procInst("version", test.input); got != test.expect[0] { - t.Errorf("procInst(version, %q) = %q; want %q", test.input, got, test.expect[0]) - } - if got := procInst("encoding", test.input); got != test.expect[1] { - t.Errorf("procInst(encoding, %q) = %q; want %q", test.input, got, test.expect[1]) - } - } -} - -// Ensure that directives with comments include the complete -// text of any nested directives. - -var directivesWithCommentsInput = ` -]> -]> - --> --> []> -` - -var directivesWithCommentsTokens = []Token{ - CharData("\n"), - Directive(`DOCTYPE []`), - CharData("\n"), - Directive(`DOCTYPE []`), - CharData("\n"), - Directive(`DOCTYPE []`), - CharData("\n"), -} - -func TestDirectivesWithComments(t *testing.T) { - d := NewDecoder(strings.NewReader(directivesWithCommentsInput)) - - for i, want := range directivesWithCommentsTokens { - have, err := d.Token() - if err != nil { - t.Fatalf("token %d: unexpected error: %s", i, err) - } - if !reflect.DeepEqual(have, want) { - t.Errorf("token %d = %#v want %#v", i, have, want) - } - } -} - -// Writer whose Write method always returns an error. -type errWriter struct{} - -func (errWriter) Write(p []byte) (n int, err error) { return 0, fmt.Errorf("unwritable") } - -func TestEscapeTextIOErrors(t *testing.T) { - expectErr := "unwritable" - err := EscapeText(errWriter{}, []byte{'A'}) - - if err == nil || err.Error() != expectErr { - t.Errorf("have %v, want %v", err, expectErr) - } -} - -func TestEscapeTextInvalidChar(t *testing.T) { - input := []byte("A \x00 terminated string.") - expected := "A \uFFFD terminated string." - - buff := new(bytes.Buffer) - if err := EscapeText(buff, input); err != nil { - t.Fatalf("have %v, want nil", err) - } - text := buff.String() - - if text != expected { - t.Errorf("have %v, want %v", text, expected) - } -} - -func TestIssue5880(t *testing.T) { - type T []byte - data, err := Marshal(T{192, 168, 0, 1}) - if err != nil { - t.Errorf("Marshal error: %v", err) - } - if !utf8.Valid(data) { - t.Errorf("Marshal generated invalid UTF-8: %x", data) - } -} diff --git a/deps/golang.org/x/net/webdav/litmus_test_server.go b/deps/golang.org/x/net/webdav/litmus_test_server.go deleted file mode 100644 index 514db5dd1..000000000 --- a/deps/golang.org/x/net/webdav/litmus_test_server.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -/* -This program is a server for the WebDAV 'litmus' compliance test at -http://www.webdav.org/neon/litmus/ -To run the test: - -go run litmus_test_server.go - -and separately, from the downloaded litmus-xxx directory: - -make URL=http://localhost:9999/ check -*/ -package main - -import ( - "flag" - "fmt" - "log" - "net/http" - "net/url" - - "golang.org/x/net/webdav" -) - -var port = flag.Int("port", 9999, "server port") - -func main() { - flag.Parse() - log.SetFlags(0) - h := &webdav.Handler{ - FileSystem: webdav.NewMemFS(), - LockSystem: webdav.NewMemLS(), - Logger: func(r *http.Request, err error) { - litmus := r.Header.Get("X-Litmus") - if len(litmus) > 19 { - litmus = litmus[:16] + "..." - } - - switch r.Method { - case "COPY", "MOVE": - dst := "" - if u, err := url.Parse(r.Header.Get("Destination")); err == nil { - dst = u.Path - } - o := r.Header.Get("Overwrite") - log.Printf("%-20s%-10s%-30s%-30so=%-2s%v", litmus, r.Method, r.URL.Path, dst, o, err) - default: - log.Printf("%-20s%-10s%-30s%v", litmus, r.Method, r.URL.Path, err) - } - }, - } - - // The next line would normally be: - // http.Handle("/", h) - // but we wrap that HTTP handler h to cater for a special case. - // - // The propfind_invalid2 litmus test case expects an empty namespace prefix - // declaration to be an error. The FAQ in the webdav litmus test says: - // - // "What does the "propfind_invalid2" test check for?... - // - // If a request was sent with an XML body which included an empty namespace - // prefix declaration (xmlns:ns1=""), then the server must reject that with - // a "400 Bad Request" response, as it is invalid according to the XML - // Namespace specification." - // - // On the other hand, the Go standard library's encoding/xml package - // accepts an empty xmlns namespace, as per the discussion at - // https://github.com/golang/go/issues/8068 - // - // Empty namespaces seem disallowed in the second (2006) edition of the XML - // standard, but allowed in a later edition. The grammar differs between - // http://www.w3.org/TR/2006/REC-xml-names-20060816/#ns-decl and - // http://www.w3.org/TR/REC-xml-names/#dt-prefix - // - // Thus, we assume that the propfind_invalid2 test is obsolete, and - // hard-code the 400 Bad Request response that the test expects. - http.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Header.Get("X-Litmus") == "props: 3 (propfind_invalid2)" { - http.Error(w, "400 Bad Request", http.StatusBadRequest) - return - } - h.ServeHTTP(w, r) - })) - - addr := fmt.Sprintf(":%d", *port) - log.Printf("Serving %v", addr) - log.Fatal(http.ListenAndServe(addr, nil)) -} diff --git a/deps/golang.org/x/net/webdav/lock.go b/deps/golang.org/x/net/webdav/lock.go deleted file mode 100644 index 344ac5cea..000000000 --- a/deps/golang.org/x/net/webdav/lock.go +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "container/heap" - "errors" - "strconv" - "strings" - "sync" - "time" -) - -var ( - // ErrConfirmationFailed is returned by a LockSystem's Confirm method. - ErrConfirmationFailed = errors.New("webdav: confirmation failed") - // ErrForbidden is returned by a LockSystem's Unlock method. - ErrForbidden = errors.New("webdav: forbidden") - // ErrLocked is returned by a LockSystem's Create, Refresh and Unlock methods. - ErrLocked = errors.New("webdav: locked") - // ErrNoSuchLock is returned by a LockSystem's Refresh and Unlock methods. - ErrNoSuchLock = errors.New("webdav: no such lock") -) - -// Condition can match a WebDAV resource, based on a token or ETag. -// Exactly one of Token and ETag should be non-empty. -type Condition struct { - Not bool - Token string - ETag string -} - -// LockSystem manages access to a collection of named resources. The elements -// in a lock name are separated by slash ('/', U+002F) characters, regardless -// of host operating system convention. -type LockSystem interface { - // Confirm confirms that the caller can claim all of the locks specified by - // the given conditions, and that holding the union of all of those locks - // gives exclusive access to all of the named resources. Up to two resources - // can be named. Empty names are ignored. - // - // Exactly one of release and err will be non-nil. If release is non-nil, - // all of the requested locks are held until release is called. Calling - // release does not unlock the lock, in the WebDAV UNLOCK sense, but once - // Confirm has confirmed that a lock claim is valid, that lock cannot be - // Confirmed again until it has been released. - // - // If Confirm returns ErrConfirmationFailed then the Handler will continue - // to try any other set of locks presented (a WebDAV HTTP request can - // present more than one set of locks). If it returns any other non-nil - // error, the Handler will write a "500 Internal Server Error" HTTP status. - Confirm(now time.Time, name0, name1 string, conditions ...Condition) (release func(), err error) - - // Create creates a lock with the given depth, duration, owner and root - // (name). The depth will either be negative (meaning infinite) or zero. - // - // If Create returns ErrLocked then the Handler will write a "423 Locked" - // HTTP status. If it returns any other non-nil error, the Handler will - // write a "500 Internal Server Error" HTTP status. - // - // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.10.6 for - // when to use each error. - // - // The token returned identifies the created lock. It should be an absolute - // URI as defined by RFC 3986, Section 4.3. In particular, it should not - // contain whitespace. - Create(now time.Time, details LockDetails) (token string, err error) - - // Refresh refreshes the lock with the given token. - // - // If Refresh returns ErrLocked then the Handler will write a "423 Locked" - // HTTP Status. If Refresh returns ErrNoSuchLock then the Handler will write - // a "412 Precondition Failed" HTTP Status. If it returns any other non-nil - // error, the Handler will write a "500 Internal Server Error" HTTP status. - // - // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.10.6 for - // when to use each error. - Refresh(now time.Time, token string, duration time.Duration) (LockDetails, error) - - // Unlock unlocks the lock with the given token. - // - // If Unlock returns ErrForbidden then the Handler will write a "403 - // Forbidden" HTTP Status. If Unlock returns ErrLocked then the Handler - // will write a "423 Locked" HTTP status. If Unlock returns ErrNoSuchLock - // then the Handler will write a "409 Conflict" HTTP Status. If it returns - // any other non-nil error, the Handler will write a "500 Internal Server - // Error" HTTP status. - // - // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.11.1 for - // when to use each error. - Unlock(now time.Time, token string) error -} - -// LockDetails are a lock's metadata. -type LockDetails struct { - // Root is the root resource name being locked. For a zero-depth lock, the - // root is the only resource being locked. - Root string - // Duration is the lock timeout. A negative duration means infinite. - Duration time.Duration - // OwnerXML is the verbatim XML given in a LOCK HTTP request. - // - // TODO: does the "verbatim" nature play well with XML namespaces? - // Does the OwnerXML field need to have more structure? See - // https://codereview.appspot.com/175140043/#msg2 - OwnerXML string - // ZeroDepth is whether the lock has zero depth. If it does not have zero - // depth, it has infinite depth. - ZeroDepth bool -} - -// NewMemLS returns a new in-memory LockSystem. -func NewMemLS() LockSystem { - return &memLS{ - byName: make(map[string]*memLSNode), - byToken: make(map[string]*memLSNode), - gen: uint64(time.Now().Unix()), - } -} - -type memLS struct { - mu sync.Mutex - byName map[string]*memLSNode - byToken map[string]*memLSNode - gen uint64 - // byExpiry only contains those nodes whose LockDetails have a finite - // Duration and are yet to expire. - byExpiry byExpiry -} - -func (m *memLS) nextToken() string { - m.gen++ - return strconv.FormatUint(m.gen, 10) -} - -func (m *memLS) collectExpiredNodes(now time.Time) { - for len(m.byExpiry) > 0 { - if now.Before(m.byExpiry[0].expiry) { - break - } - m.remove(m.byExpiry[0]) - } -} - -func (m *memLS) Confirm(now time.Time, name0, name1 string, conditions ...Condition) (func(), error) { - m.mu.Lock() - defer m.mu.Unlock() - m.collectExpiredNodes(now) - - var n0, n1 *memLSNode - if name0 != "" { - if n0 = m.lookup(slashClean(name0), conditions...); n0 == nil { - return nil, ErrConfirmationFailed - } - } - if name1 != "" { - if n1 = m.lookup(slashClean(name1), conditions...); n1 == nil { - return nil, ErrConfirmationFailed - } - } - - // Don't hold the same node twice. - if n1 == n0 { - n1 = nil - } - - if n0 != nil { - m.hold(n0) - } - if n1 != nil { - m.hold(n1) - } - return func() { - m.mu.Lock() - defer m.mu.Unlock() - if n1 != nil { - m.unhold(n1) - } - if n0 != nil { - m.unhold(n0) - } - }, nil -} - -// lookup returns the node n that locks the named resource, provided that n -// matches at least one of the given conditions and that lock isn't held by -// another party. Otherwise, it returns nil. -// -// n may be a parent of the named resource, if n is an infinite depth lock. -func (m *memLS) lookup(name string, conditions ...Condition) (n *memLSNode) { - // TODO: support Condition.Not and Condition.ETag. - for _, c := range conditions { - n = m.byToken[c.Token] - if n == nil || n.held { - continue - } - if name == n.details.Root { - return n - } - if n.details.ZeroDepth { - continue - } - if n.details.Root == "/" || strings.HasPrefix(name, n.details.Root+"/") { - return n - } - } - return nil -} - -func (m *memLS) hold(n *memLSNode) { - if n.held { - panic("webdav: memLS inconsistent held state") - } - n.held = true - if n.details.Duration >= 0 && n.byExpiryIndex >= 0 { - heap.Remove(&m.byExpiry, n.byExpiryIndex) - } -} - -func (m *memLS) unhold(n *memLSNode) { - if !n.held { - panic("webdav: memLS inconsistent held state") - } - n.held = false - if n.details.Duration >= 0 { - heap.Push(&m.byExpiry, n) - } -} - -func (m *memLS) Create(now time.Time, details LockDetails) (string, error) { - m.mu.Lock() - defer m.mu.Unlock() - m.collectExpiredNodes(now) - details.Root = slashClean(details.Root) - - if !m.canCreate(details.Root, details.ZeroDepth) { - return "", ErrLocked - } - n := m.create(details.Root) - n.token = m.nextToken() - m.byToken[n.token] = n - n.details = details - if n.details.Duration >= 0 { - n.expiry = now.Add(n.details.Duration) - heap.Push(&m.byExpiry, n) - } - return n.token, nil -} - -func (m *memLS) Refresh(now time.Time, token string, duration time.Duration) (LockDetails, error) { - m.mu.Lock() - defer m.mu.Unlock() - m.collectExpiredNodes(now) - - n := m.byToken[token] - if n == nil { - return LockDetails{}, ErrNoSuchLock - } - if n.held { - return LockDetails{}, ErrLocked - } - if n.byExpiryIndex >= 0 { - heap.Remove(&m.byExpiry, n.byExpiryIndex) - } - n.details.Duration = duration - if n.details.Duration >= 0 { - n.expiry = now.Add(n.details.Duration) - heap.Push(&m.byExpiry, n) - } - return n.details, nil -} - -func (m *memLS) Unlock(now time.Time, token string) error { - m.mu.Lock() - defer m.mu.Unlock() - m.collectExpiredNodes(now) - - n := m.byToken[token] - if n == nil { - return ErrNoSuchLock - } - if n.held { - return ErrLocked - } - m.remove(n) - return nil -} - -func (m *memLS) canCreate(name string, zeroDepth bool) bool { - return walkToRoot(name, func(name0 string, first bool) bool { - n := m.byName[name0] - if n == nil { - return true - } - if first { - if n.token != "" { - // The target node is already locked. - return false - } - if !zeroDepth { - // The requested lock depth is infinite, and the fact that n exists - // (n != nil) means that a descendent of the target node is locked. - return false - } - } else if n.token != "" && !n.details.ZeroDepth { - // An ancestor of the target node is locked with infinite depth. - return false - } - return true - }) -} - -func (m *memLS) create(name string) (ret *memLSNode) { - walkToRoot(name, func(name0 string, first bool) bool { - n := m.byName[name0] - if n == nil { - n = &memLSNode{ - details: LockDetails{ - Root: name0, - }, - byExpiryIndex: -1, - } - m.byName[name0] = n - } - n.refCount++ - if first { - ret = n - } - return true - }) - return ret -} - -func (m *memLS) remove(n *memLSNode) { - delete(m.byToken, n.token) - n.token = "" - walkToRoot(n.details.Root, func(name0 string, first bool) bool { - x := m.byName[name0] - x.refCount-- - if x.refCount == 0 { - delete(m.byName, name0) - } - return true - }) - if n.byExpiryIndex >= 0 { - heap.Remove(&m.byExpiry, n.byExpiryIndex) - } -} - -func walkToRoot(name string, f func(name0 string, first bool) bool) bool { - for first := true; ; first = false { - if !f(name, first) { - return false - } - if name == "/" { - break - } - name = name[:strings.LastIndex(name, "/")] - if name == "" { - name = "/" - } - } - return true -} - -type memLSNode struct { - // details are the lock metadata. Even if this node's name is not explicitly locked, - // details.Root will still equal the node's name. - details LockDetails - // token is the unique identifier for this node's lock. An empty token means that - // this node is not explicitly locked. - token string - // refCount is the number of self-or-descendent nodes that are explicitly locked. - refCount int - // expiry is when this node's lock expires. - expiry time.Time - // byExpiryIndex is the index of this node in memLS.byExpiry. It is -1 - // if this node does not expire, or has expired. - byExpiryIndex int - // held is whether this node's lock is actively held by a Confirm call. - held bool -} - -type byExpiry []*memLSNode - -func (b *byExpiry) Len() int { - return len(*b) -} - -func (b *byExpiry) Less(i, j int) bool { - return (*b)[i].expiry.Before((*b)[j].expiry) -} - -func (b *byExpiry) Swap(i, j int) { - (*b)[i], (*b)[j] = (*b)[j], (*b)[i] - (*b)[i].byExpiryIndex = i - (*b)[j].byExpiryIndex = j -} - -func (b *byExpiry) Push(x interface{}) { - n := x.(*memLSNode) - n.byExpiryIndex = len(*b) - *b = append(*b, n) -} - -func (b *byExpiry) Pop() interface{} { - i := len(*b) - 1 - n := (*b)[i] - (*b)[i] = nil - n.byExpiryIndex = -1 - *b = (*b)[:i] - return n -} - -const infiniteTimeout = -1 - -// parseTimeout parses the Timeout HTTP header, as per section 10.7. If s is -// empty, an infiniteTimeout is returned. -func parseTimeout(s string) (time.Duration, error) { - if s == "" { - return infiniteTimeout, nil - } - if i := strings.IndexByte(s, ','); i >= 0 { - s = s[:i] - } - s = strings.TrimSpace(s) - if s == "Infinite" { - return infiniteTimeout, nil - } - const pre = "Second-" - if !strings.HasPrefix(s, pre) { - return 0, errInvalidTimeout - } - s = s[len(pre):] - if s == "" || s[0] < '0' || '9' < s[0] { - return 0, errInvalidTimeout - } - n, err := strconv.ParseInt(s, 10, 64) - if err != nil || 1<<32-1 < n { - return 0, errInvalidTimeout - } - return time.Duration(n) * time.Second, nil -} diff --git a/deps/golang.org/x/net/webdav/lock_test.go b/deps/golang.org/x/net/webdav/lock_test.go deleted file mode 100644 index 5cf14cda4..000000000 --- a/deps/golang.org/x/net/webdav/lock_test.go +++ /dev/null @@ -1,731 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "fmt" - "math/rand" - "path" - "reflect" - "sort" - "strconv" - "strings" - "testing" - "time" -) - -func TestWalkToRoot(t *testing.T) { - testCases := []struct { - name string - want []string - }{{ - "/a/b/c/d", - []string{ - "/a/b/c/d", - "/a/b/c", - "/a/b", - "/a", - "/", - }, - }, { - "/a", - []string{ - "/a", - "/", - }, - }, { - "/", - []string{ - "/", - }, - }} - - for _, tc := range testCases { - var got []string - if !walkToRoot(tc.name, func(name0 string, first bool) bool { - if first != (len(got) == 0) { - t.Errorf("name=%q: first=%t but len(got)==%d", tc.name, first, len(got)) - return false - } - got = append(got, name0) - return true - }) { - continue - } - if !reflect.DeepEqual(got, tc.want) { - t.Errorf("name=%q:\ngot %q\nwant %q", tc.name, got, tc.want) - } - } -} - -var lockTestDurations = []time.Duration{ - infiniteTimeout, // infiniteTimeout means to never expire. - 0, // A zero duration means to expire immediately. - 100 * time.Hour, // A very large duration will not expire in these tests. -} - -// lockTestNames are the names of a set of mutually compatible locks. For each -// name fragment: -// - _ means no explicit lock. -// - i means an infinite-depth lock, -// - z means a zero-depth lock, -var lockTestNames = []string{ - "/_/_/_/_/z", - "/_/_/i", - "/_/z", - "/_/z/i", - "/_/z/z", - "/_/z/_/i", - "/_/z/_/z", - "/i", - "/z", - "/z/_/i", - "/z/_/z", -} - -func lockTestZeroDepth(name string) bool { - switch name[len(name)-1] { - case 'i': - return false - case 'z': - return true - } - panic(fmt.Sprintf("lock name %q did not end with 'i' or 'z'", name)) -} - -func TestMemLSCanCreate(t *testing.T) { - now := time.Unix(0, 0) - m := NewMemLS().(*memLS) - - for _, name := range lockTestNames { - _, err := m.Create(now, LockDetails{ - Root: name, - Duration: infiniteTimeout, - ZeroDepth: lockTestZeroDepth(name), - }) - if err != nil { - t.Fatalf("creating lock for %q: %v", name, err) - } - } - - wantCanCreate := func(name string, zeroDepth bool) bool { - for _, n := range lockTestNames { - switch { - case n == name: - // An existing lock has the same name as the proposed lock. - return false - case strings.HasPrefix(n, name): - // An existing lock would be a child of the proposed lock, - // which conflicts if the proposed lock has infinite depth. - if !zeroDepth { - return false - } - case strings.HasPrefix(name, n): - // An existing lock would be an ancestor of the proposed lock, - // which conflicts if the ancestor has infinite depth. - if n[len(n)-1] == 'i' { - return false - } - } - } - return true - } - - var check func(int, string) - check = func(recursion int, name string) { - for _, zeroDepth := range []bool{false, true} { - got := m.canCreate(name, zeroDepth) - want := wantCanCreate(name, zeroDepth) - if got != want { - t.Errorf("canCreate name=%q zeroDepth=%t: got %t, want %t", name, zeroDepth, got, want) - } - } - if recursion == 6 { - return - } - if name != "/" { - name += "/" - } - for _, c := range "_iz" { - check(recursion+1, name+string(c)) - } - } - check(0, "/") -} - -func TestMemLSLookup(t *testing.T) { - now := time.Unix(0, 0) - m := NewMemLS().(*memLS) - - badToken := m.nextToken() - t.Logf("badToken=%q", badToken) - - for _, name := range lockTestNames { - token, err := m.Create(now, LockDetails{ - Root: name, - Duration: infiniteTimeout, - ZeroDepth: lockTestZeroDepth(name), - }) - if err != nil { - t.Fatalf("creating lock for %q: %v", name, err) - } - t.Logf("%-15q -> node=%p token=%q", name, m.byName[name], token) - } - - baseNames := append([]string{"/a", "/b/c"}, lockTestNames...) - for _, baseName := range baseNames { - for _, suffix := range []string{"", "/0", "/1/2/3"} { - name := baseName + suffix - - goodToken := "" - base := m.byName[baseName] - if base != nil && (suffix == "" || !lockTestZeroDepth(baseName)) { - goodToken = base.token - } - - for _, token := range []string{badToken, goodToken} { - if token == "" { - continue - } - - got := m.lookup(name, Condition{Token: token}) - want := base - if token == badToken { - want = nil - } - if got != want { - t.Errorf("name=%-20qtoken=%q (bad=%t): got %p, want %p", - name, token, token == badToken, got, want) - } - } - } - } -} - -func TestMemLSConfirm(t *testing.T) { - now := time.Unix(0, 0) - m := NewMemLS().(*memLS) - alice, err := m.Create(now, LockDetails{ - Root: "/alice", - Duration: infiniteTimeout, - ZeroDepth: false, - }) - tweedle, err := m.Create(now, LockDetails{ - Root: "/tweedle", - Duration: infiniteTimeout, - ZeroDepth: false, - }) - if err != nil { - t.Fatalf("Create: %v", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Create: inconsistent state: %v", err) - } - - // Test a mismatch between name and condition. - _, err = m.Confirm(now, "/tweedle/dee", "", Condition{Token: alice}) - if err != ErrConfirmationFailed { - t.Fatalf("Confirm (mismatch): got %v, want ErrConfirmationFailed", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Confirm (mismatch): inconsistent state: %v", err) - } - - // Test two names (that fall under the same lock) in the one Confirm call. - release, err := m.Confirm(now, "/tweedle/dee", "/tweedle/dum", Condition{Token: tweedle}) - if err != nil { - t.Fatalf("Confirm (twins): %v", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Confirm (twins): inconsistent state: %v", err) - } - release() - if err := m.consistent(); err != nil { - t.Fatalf("release (twins): inconsistent state: %v", err) - } - - // Test the same two names in overlapping Confirm / release calls. - releaseDee, err := m.Confirm(now, "/tweedle/dee", "", Condition{Token: tweedle}) - if err != nil { - t.Fatalf("Confirm (sequence #0): %v", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Confirm (sequence #0): inconsistent state: %v", err) - } - - _, err = m.Confirm(now, "/tweedle/dum", "", Condition{Token: tweedle}) - if err != ErrConfirmationFailed { - t.Fatalf("Confirm (sequence #1): got %v, want ErrConfirmationFailed", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Confirm (sequence #1): inconsistent state: %v", err) - } - - releaseDee() - if err := m.consistent(); err != nil { - t.Fatalf("release (sequence #2): inconsistent state: %v", err) - } - - releaseDum, err := m.Confirm(now, "/tweedle/dum", "", Condition{Token: tweedle}) - if err != nil { - t.Fatalf("Confirm (sequence #3): %v", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Confirm (sequence #3): inconsistent state: %v", err) - } - - // Test that you can't unlock a held lock. - err = m.Unlock(now, tweedle) - if err != ErrLocked { - t.Fatalf("Unlock (sequence #4): got %v, want ErrLocked", err) - } - - releaseDum() - if err := m.consistent(); err != nil { - t.Fatalf("release (sequence #5): inconsistent state: %v", err) - } - - err = m.Unlock(now, tweedle) - if err != nil { - t.Fatalf("Unlock (sequence #6): %v", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Unlock (sequence #6): inconsistent state: %v", err) - } -} - -func TestMemLSNonCanonicalRoot(t *testing.T) { - now := time.Unix(0, 0) - m := NewMemLS().(*memLS) - token, err := m.Create(now, LockDetails{ - Root: "/foo/./bar//", - Duration: 1 * time.Second, - }) - if err != nil { - t.Fatalf("Create: %v", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Create: inconsistent state: %v", err) - } - if err := m.Unlock(now, token); err != nil { - t.Fatalf("Unlock: %v", err) - } - if err := m.consistent(); err != nil { - t.Fatalf("Unlock: inconsistent state: %v", err) - } -} - -func TestMemLSExpiry(t *testing.T) { - m := NewMemLS().(*memLS) - testCases := []string{ - "setNow 0", - "create /a.5", - "want /a.5", - "create /c.6", - "want /a.5 /c.6", - "create /a/b.7", - "want /a.5 /a/b.7 /c.6", - "setNow 4", - "want /a.5 /a/b.7 /c.6", - "setNow 5", - "want /a/b.7 /c.6", - "setNow 6", - "want /a/b.7", - "setNow 7", - "want ", - "setNow 8", - "want ", - "create /a.12", - "create /b.13", - "create /c.15", - "create /a/d.16", - "want /a.12 /a/d.16 /b.13 /c.15", - "refresh /a.14", - "want /a.14 /a/d.16 /b.13 /c.15", - "setNow 12", - "want /a.14 /a/d.16 /b.13 /c.15", - "setNow 13", - "want /a.14 /a/d.16 /c.15", - "setNow 14", - "want /a/d.16 /c.15", - "refresh /a/d.20", - "refresh /c.20", - "want /a/d.20 /c.20", - "setNow 20", - "want ", - } - - tokens := map[string]string{} - zTime := time.Unix(0, 0) - now := zTime - for i, tc := range testCases { - j := strings.IndexByte(tc, ' ') - if j < 0 { - t.Fatalf("test case #%d %q: invalid command", i, tc) - } - op, arg := tc[:j], tc[j+1:] - switch op { - default: - t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op) - - case "create", "refresh": - parts := strings.Split(arg, ".") - if len(parts) != 2 { - t.Fatalf("test case #%d %q: invalid create", i, tc) - } - root := parts[0] - d, err := strconv.Atoi(parts[1]) - if err != nil { - t.Fatalf("test case #%d %q: invalid duration", i, tc) - } - dur := time.Unix(0, 0).Add(time.Duration(d) * time.Second).Sub(now) - - switch op { - case "create": - token, err := m.Create(now, LockDetails{ - Root: root, - Duration: dur, - ZeroDepth: true, - }) - if err != nil { - t.Fatalf("test case #%d %q: Create: %v", i, tc, err) - } - tokens[root] = token - - case "refresh": - token := tokens[root] - if token == "" { - t.Fatalf("test case #%d %q: no token for %q", i, tc, root) - } - got, err := m.Refresh(now, token, dur) - if err != nil { - t.Fatalf("test case #%d %q: Refresh: %v", i, tc, err) - } - want := LockDetails{ - Root: root, - Duration: dur, - ZeroDepth: true, - } - if got != want { - t.Fatalf("test case #%d %q:\ngot %v\nwant %v", i, tc, got, want) - } - } - - case "setNow": - d, err := strconv.Atoi(arg) - if err != nil { - t.Fatalf("test case #%d %q: invalid duration", i, tc) - } - now = time.Unix(0, 0).Add(time.Duration(d) * time.Second) - - case "want": - m.mu.Lock() - m.collectExpiredNodes(now) - got := make([]string, 0, len(m.byToken)) - for _, n := range m.byToken { - got = append(got, fmt.Sprintf("%s.%d", - n.details.Root, n.expiry.Sub(zTime)/time.Second)) - } - m.mu.Unlock() - sort.Strings(got) - want := []string{} - if arg != "" { - want = strings.Split(arg, " ") - } - if !reflect.DeepEqual(got, want) { - t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, want) - } - } - - if err := m.consistent(); err != nil { - t.Fatalf("test case #%d %q: inconsistent state: %v", i, tc, err) - } - } -} - -func TestMemLS(t *testing.T) { - now := time.Unix(0, 0) - m := NewMemLS().(*memLS) - rng := rand.New(rand.NewSource(0)) - tokens := map[string]string{} - nConfirm, nCreate, nRefresh, nUnlock := 0, 0, 0, 0 - const N = 2000 - - for i := 0; i < N; i++ { - name := lockTestNames[rng.Intn(len(lockTestNames))] - duration := lockTestDurations[rng.Intn(len(lockTestDurations))] - confirmed, unlocked := false, false - - // If the name was already locked, we randomly confirm/release, refresh - // or unlock it. Otherwise, we create a lock. - token := tokens[name] - if token != "" { - switch rng.Intn(3) { - case 0: - confirmed = true - nConfirm++ - release, err := m.Confirm(now, name, "", Condition{Token: token}) - if err != nil { - t.Fatalf("iteration #%d: Confirm %q: %v", i, name, err) - } - if err := m.consistent(); err != nil { - t.Fatalf("iteration #%d: inconsistent state: %v", i, err) - } - release() - - case 1: - nRefresh++ - if _, err := m.Refresh(now, token, duration); err != nil { - t.Fatalf("iteration #%d: Refresh %q: %v", i, name, err) - } - - case 2: - unlocked = true - nUnlock++ - if err := m.Unlock(now, token); err != nil { - t.Fatalf("iteration #%d: Unlock %q: %v", i, name, err) - } - } - - } else { - nCreate++ - var err error - token, err = m.Create(now, LockDetails{ - Root: name, - Duration: duration, - ZeroDepth: lockTestZeroDepth(name), - }) - if err != nil { - t.Fatalf("iteration #%d: Create %q: %v", i, name, err) - } - } - - if !confirmed { - if duration == 0 || unlocked { - // A zero-duration lock should expire immediately and is - // effectively equivalent to being unlocked. - tokens[name] = "" - } else { - tokens[name] = token - } - } - - if err := m.consistent(); err != nil { - t.Fatalf("iteration #%d: inconsistent state: %v", i, err) - } - } - - if nConfirm < N/10 { - t.Fatalf("too few Confirm calls: got %d, want >= %d", nConfirm, N/10) - } - if nCreate < N/10 { - t.Fatalf("too few Create calls: got %d, want >= %d", nCreate, N/10) - } - if nRefresh < N/10 { - t.Fatalf("too few Refresh calls: got %d, want >= %d", nRefresh, N/10) - } - if nUnlock < N/10 { - t.Fatalf("too few Unlock calls: got %d, want >= %d", nUnlock, N/10) - } -} - -func (m *memLS) consistent() error { - m.mu.Lock() - defer m.mu.Unlock() - - // If m.byName is non-empty, then it must contain an entry for the root "/", - // and its refCount should equal the number of locked nodes. - if len(m.byName) > 0 { - n := m.byName["/"] - if n == nil { - return fmt.Errorf(`non-empty m.byName does not contain the root "/"`) - } - if n.refCount != len(m.byToken) { - return fmt.Errorf("root node refCount=%d, differs from len(m.byToken)=%d", n.refCount, len(m.byToken)) - } - } - - for name, n := range m.byName { - // The map keys should be consistent with the node's copy of the key. - if n.details.Root != name { - return fmt.Errorf("node name %q != byName map key %q", n.details.Root, name) - } - - // A name must be clean, and start with a "/". - if len(name) == 0 || name[0] != '/' { - return fmt.Errorf(`node name %q does not start with "/"`, name) - } - if name != path.Clean(name) { - return fmt.Errorf(`node name %q is not clean`, name) - } - - // A node's refCount should be positive. - if n.refCount <= 0 { - return fmt.Errorf("non-positive refCount for node at name %q", name) - } - - // A node's refCount should be the number of self-or-descendents that - // are locked (i.e. have a non-empty token). - var list []string - for name0, n0 := range m.byName { - // All of lockTestNames' name fragments are one byte long: '_', 'i' or 'z', - // so strings.HasPrefix is equivalent to self-or-descendent name match. - // We don't have to worry about "/foo/bar" being a false positive match - // for "/foo/b". - if strings.HasPrefix(name0, name) && n0.token != "" { - list = append(list, name0) - } - } - if n.refCount != len(list) { - sort.Strings(list) - return fmt.Errorf("node at name %q has refCount %d but locked self-or-descendents are %q (len=%d)", - name, n.refCount, list, len(list)) - } - - // A node n is in m.byToken if it has a non-empty token. - if n.token != "" { - if _, ok := m.byToken[n.token]; !ok { - return fmt.Errorf("node at name %q has token %q but not in m.byToken", name, n.token) - } - } - - // A node n is in m.byExpiry if it has a non-negative byExpiryIndex. - if n.byExpiryIndex >= 0 { - if n.byExpiryIndex >= len(m.byExpiry) { - return fmt.Errorf("node at name %q has byExpiryIndex %d but m.byExpiry has length %d", name, n.byExpiryIndex, len(m.byExpiry)) - } - if n != m.byExpiry[n.byExpiryIndex] { - return fmt.Errorf("node at name %q has byExpiryIndex %d but that indexes a different node", name, n.byExpiryIndex) - } - } - } - - for token, n := range m.byToken { - // The map keys should be consistent with the node's copy of the key. - if n.token != token { - return fmt.Errorf("node token %q != byToken map key %q", n.token, token) - } - - // Every node in m.byToken is in m.byName. - if _, ok := m.byName[n.details.Root]; !ok { - return fmt.Errorf("node at name %q in m.byToken but not in m.byName", n.details.Root) - } - } - - for i, n := range m.byExpiry { - // The slice indices should be consistent with the node's copy of the index. - if n.byExpiryIndex != i { - return fmt.Errorf("node byExpiryIndex %d != byExpiry slice index %d", n.byExpiryIndex, i) - } - - // Every node in m.byExpiry is in m.byName. - if _, ok := m.byName[n.details.Root]; !ok { - return fmt.Errorf("node at name %q in m.byExpiry but not in m.byName", n.details.Root) - } - - // No node in m.byExpiry should be held. - if n.held { - return fmt.Errorf("node at name %q in m.byExpiry is held", n.details.Root) - } - } - return nil -} - -func TestParseTimeout(t *testing.T) { - testCases := []struct { - s string - want time.Duration - wantErr error - }{{ - "", - infiniteTimeout, - nil, - }, { - "Infinite", - infiniteTimeout, - nil, - }, { - "Infinitesimal", - 0, - errInvalidTimeout, - }, { - "infinite", - 0, - errInvalidTimeout, - }, { - "Second-0", - 0 * time.Second, - nil, - }, { - "Second-123", - 123 * time.Second, - nil, - }, { - " Second-456 ", - 456 * time.Second, - nil, - }, { - "Second-4100000000", - 4100000000 * time.Second, - nil, - }, { - "junk", - 0, - errInvalidTimeout, - }, { - "Second-", - 0, - errInvalidTimeout, - }, { - "Second--1", - 0, - errInvalidTimeout, - }, { - "Second--123", - 0, - errInvalidTimeout, - }, { - "Second-+123", - 0, - errInvalidTimeout, - }, { - "Second-0x123", - 0, - errInvalidTimeout, - }, { - "second-123", - 0, - errInvalidTimeout, - }, { - "Second-4294967295", - 4294967295 * time.Second, - nil, - }, { - // Section 10.7 says that "The timeout value for TimeType "Second" - // must not be greater than 2^32-1." - "Second-4294967296", - 0, - errInvalidTimeout, - }, { - // This test case comes from section 9.10.9 of the spec. It says, - // - // "In this request, the client has specified that it desires an - // infinite-length lock, if available, otherwise a timeout of 4.1 - // billion seconds, if available." - // - // The Go WebDAV package always supports infinite length locks, - // and ignores the fallback after the comma. - "Infinite, Second-4100000000", - infiniteTimeout, - nil, - }} - - for _, tc := range testCases { - got, gotErr := parseTimeout(tc.s) - if got != tc.want || gotErr != tc.wantErr { - t.Errorf("parsing %q:\ngot %v, %v\nwant %v, %v", tc.s, got, gotErr, tc.want, tc.wantErr) - } - } -} diff --git a/deps/golang.org/x/net/webdav/prop.go b/deps/golang.org/x/net/webdav/prop.go deleted file mode 100644 index 4d7be3492..000000000 --- a/deps/golang.org/x/net/webdav/prop.go +++ /dev/null @@ -1,470 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "bytes" - "encoding/xml" - "errors" - "fmt" - "io" - "mime" - "net/http" - "os" - "path/filepath" - "strconv" - - "golang.org/x/net/context" -) - -// Proppatch describes a property update instruction as defined in RFC 4918. -// See http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH -type Proppatch struct { - // Remove specifies whether this patch removes properties. If it does not - // remove them, it sets them. - Remove bool - // Props contains the properties to be set or removed. - Props []Property -} - -// Propstat describes a XML propstat element as defined in RFC 4918. -// See http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat -type Propstat struct { - // Props contains the properties for which Status applies. - Props []Property - - // Status defines the HTTP status code of the properties in Prop. - // Allowed values include, but are not limited to the WebDAV status - // code extensions for HTTP/1.1. - // http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11 - Status int - - // XMLError contains the XML representation of the optional error element. - // XML content within this field must not rely on any predefined - // namespace declarations or prefixes. If empty, the XML error element - // is omitted. - XMLError string - - // ResponseDescription contains the contents of the optional - // responsedescription field. If empty, the XML element is omitted. - ResponseDescription string -} - -// makePropstats returns a slice containing those of x and y whose Props slice -// is non-empty. If both are empty, it returns a slice containing an otherwise -// zero Propstat whose HTTP status code is 200 OK. -func makePropstats(x, y Propstat) []Propstat { - pstats := make([]Propstat, 0, 2) - if len(x.Props) != 0 { - pstats = append(pstats, x) - } - if len(y.Props) != 0 { - pstats = append(pstats, y) - } - if len(pstats) == 0 { - pstats = append(pstats, Propstat{ - Status: http.StatusOK, - }) - } - return pstats -} - -// DeadPropsHolder holds the dead properties of a resource. -// -// Dead properties are those properties that are explicitly defined. In -// comparison, live properties, such as DAV:getcontentlength, are implicitly -// defined by the underlying resource, and cannot be explicitly overridden or -// removed. See the Terminology section of -// http://www.webdav.org/specs/rfc4918.html#rfc.section.3 -// -// There is a whitelist of the names of live properties. This package handles -// all live properties, and will only pass non-whitelisted names to the Patch -// method of DeadPropsHolder implementations. -type DeadPropsHolder interface { - // DeadProps returns a copy of the dead properties held. - DeadProps() (map[xml.Name]Property, error) - - // Patch patches the dead properties held. - // - // Patching is atomic; either all or no patches succeed. It returns (nil, - // non-nil) if an internal server error occurred, otherwise the Propstats - // collectively contain one Property for each proposed patch Property. If - // all patches succeed, Patch returns a slice of length one and a Propstat - // element with a 200 OK HTTP status code. If none succeed, for reasons - // other than an internal server error, no Propstat has status 200 OK. - // - // For more details on when various HTTP status codes apply, see - // http://www.webdav.org/specs/rfc4918.html#PROPPATCH-status - Patch([]Proppatch) ([]Propstat, error) -} - -// liveProps contains all supported, protected DAV: properties. -var liveProps = map[xml.Name]struct { - // findFn implements the propfind function of this property. If nil, - // it indicates a hidden property. - findFn func(context.Context, FileSystem, LockSystem, string, os.FileInfo) (string, error) - // dir is true if the property applies to directories. - dir bool -}{ - {Space: "DAV:", Local: "resourcetype"}: { - findFn: findResourceType, - dir: true, - }, - {Space: "DAV:", Local: "displayname"}: { - findFn: findDisplayName, - dir: true, - }, - {Space: "DAV:", Local: "getcontentlength"}: { - findFn: findContentLength, - dir: false, - }, - {Space: "DAV:", Local: "getlastmodified"}: { - findFn: findLastModified, - // http://webdav.org/specs/rfc4918.html#PROPERTY_getlastmodified - // suggests that getlastmodified should only apply to GETable - // resources, and this package does not support GET on directories. - // - // Nonetheless, some WebDAV clients expect child directories to be - // sortable by getlastmodified date, so this value is true, not false. - // See golang.org/issue/15334. - dir: true, - }, - {Space: "DAV:", Local: "creationdate"}: { - findFn: nil, - dir: false, - }, - {Space: "DAV:", Local: "getcontentlanguage"}: { - findFn: nil, - dir: false, - }, - {Space: "DAV:", Local: "getcontenttype"}: { - findFn: findContentType, - dir: false, - }, - {Space: "DAV:", Local: "getetag"}: { - findFn: findETag, - // findETag implements ETag as the concatenated hex values of a file's - // modification time and size. This is not a reliable synchronization - // mechanism for directories, so we do not advertise getetag for DAV - // collections. - dir: false, - }, - - // TODO: The lockdiscovery property requires LockSystem to list the - // active locks on a resource. - {Space: "DAV:", Local: "lockdiscovery"}: {}, - {Space: "DAV:", Local: "supportedlock"}: { - findFn: findSupportedLock, - dir: true, - }, -} - -// TODO(nigeltao) merge props and allprop? - -// Props returns the status of the properties named pnames for resource name. -// -// Each Propstat has a unique status and each property name will only be part -// of one Propstat element. -func props(ctx context.Context, fs FileSystem, ls LockSystem, name string, pnames []xml.Name) ([]Propstat, error) { - f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0) - if err != nil { - return nil, err - } - defer f.Close() - fi, err := f.Stat() - if err != nil { - return nil, err - } - isDir := fi.IsDir() - - var deadProps map[xml.Name]Property - if dph, ok := f.(DeadPropsHolder); ok { - deadProps, err = dph.DeadProps() - if err != nil { - return nil, err - } - } - - pstatOK := Propstat{Status: http.StatusOK} - pstatNotFound := Propstat{Status: http.StatusNotFound} - for _, pn := range pnames { - // If this file has dead properties, check if they contain pn. - if dp, ok := deadProps[pn]; ok { - pstatOK.Props = append(pstatOK.Props, dp) - continue - } - // Otherwise, it must either be a live property or we don't know it. - if prop := liveProps[pn]; prop.findFn != nil && (prop.dir || !isDir) { - innerXML, err := prop.findFn(ctx, fs, ls, name, fi) - if err != nil { - return nil, err - } - pstatOK.Props = append(pstatOK.Props, Property{ - XMLName: pn, - InnerXML: []byte(innerXML), - }) - } else { - pstatNotFound.Props = append(pstatNotFound.Props, Property{ - XMLName: pn, - }) - } - } - return makePropstats(pstatOK, pstatNotFound), nil -} - -// Propnames returns the property names defined for resource name. -func propnames(ctx context.Context, fs FileSystem, ls LockSystem, name string) ([]xml.Name, error) { - f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0) - if err != nil { - return nil, err - } - defer f.Close() - fi, err := f.Stat() - if err != nil { - return nil, err - } - isDir := fi.IsDir() - - var deadProps map[xml.Name]Property - if dph, ok := f.(DeadPropsHolder); ok { - deadProps, err = dph.DeadProps() - if err != nil { - return nil, err - } - } - - pnames := make([]xml.Name, 0, len(liveProps)+len(deadProps)) - for pn, prop := range liveProps { - if prop.findFn != nil && (prop.dir || !isDir) { - pnames = append(pnames, pn) - } - } - for pn := range deadProps { - pnames = append(pnames, pn) - } - return pnames, nil -} - -// Allprop returns the properties defined for resource name and the properties -// named in include. -// -// Note that RFC 4918 defines 'allprop' to return the DAV: properties defined -// within the RFC plus dead properties. Other live properties should only be -// returned if they are named in 'include'. -// -// See http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND -func allprop(ctx context.Context, fs FileSystem, ls LockSystem, name string, include []xml.Name) ([]Propstat, error) { - pnames, err := propnames(ctx, fs, ls, name) - if err != nil { - return nil, err - } - // Add names from include if they are not already covered in pnames. - nameset := make(map[xml.Name]bool) - for _, pn := range pnames { - nameset[pn] = true - } - for _, pn := range include { - if !nameset[pn] { - pnames = append(pnames, pn) - } - } - return props(ctx, fs, ls, name, pnames) -} - -// Patch patches the properties of resource name. The return values are -// constrained in the same manner as DeadPropsHolder.Patch. -func patch(ctx context.Context, fs FileSystem, ls LockSystem, name string, patches []Proppatch) ([]Propstat, error) { - conflict := false -loop: - for _, patch := range patches { - for _, p := range patch.Props { - if _, ok := liveProps[p.XMLName]; ok { - conflict = true - break loop - } - } - } - if conflict { - pstatForbidden := Propstat{ - Status: http.StatusForbidden, - XMLError: ``, - } - pstatFailedDep := Propstat{ - Status: StatusFailedDependency, - } - for _, patch := range patches { - for _, p := range patch.Props { - if _, ok := liveProps[p.XMLName]; ok { - pstatForbidden.Props = append(pstatForbidden.Props, Property{XMLName: p.XMLName}) - } else { - pstatFailedDep.Props = append(pstatFailedDep.Props, Property{XMLName: p.XMLName}) - } - } - } - return makePropstats(pstatForbidden, pstatFailedDep), nil - } - - f, err := fs.OpenFile(ctx, name, os.O_RDWR, 0) - if err != nil { - return nil, err - } - defer f.Close() - if dph, ok := f.(DeadPropsHolder); ok { - ret, err := dph.Patch(patches) - if err != nil { - return nil, err - } - // http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat says that - // "The contents of the prop XML element must only list the names of - // properties to which the result in the status element applies." - for _, pstat := range ret { - for i, p := range pstat.Props { - pstat.Props[i] = Property{XMLName: p.XMLName} - } - } - return ret, nil - } - // The file doesn't implement the optional DeadPropsHolder interface, so - // all patches are forbidden. - pstat := Propstat{Status: http.StatusForbidden} - for _, patch := range patches { - for _, p := range patch.Props { - pstat.Props = append(pstat.Props, Property{XMLName: p.XMLName}) - } - } - return []Propstat{pstat}, nil -} - -func escapeXML(s string) string { - for i := 0; i < len(s); i++ { - // As an optimization, if s contains only ASCII letters, digits or a - // few special characters, the escaped value is s itself and we don't - // need to allocate a buffer and convert between string and []byte. - switch c := s[i]; { - case c == ' ' || c == '_' || - ('+' <= c && c <= '9') || // Digits as well as + , - . and / - ('A' <= c && c <= 'Z') || - ('a' <= c && c <= 'z'): - continue - } - // Otherwise, go through the full escaping process. - var buf bytes.Buffer - xml.EscapeText(&buf, []byte(s)) - return buf.String() - } - return s -} - -func findResourceType(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { - if fi.IsDir() { - return ``, nil - } - return "", nil -} - -func findDisplayName(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { - if slashClean(name) == "/" { - // Hide the real name of a possibly prefixed root directory. - return "", nil - } - return escapeXML(fi.Name()), nil -} - -func findContentLength(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { - return strconv.FormatInt(fi.Size(), 10), nil -} - -func findLastModified(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { - return fi.ModTime().UTC().Format(http.TimeFormat), nil -} - -// ErrNotImplemented should be returned by optional interfaces if they -// want the original implementation to be used. -var ErrNotImplemented = errors.New("not implemented") - -// ContentTyper is an optional interface for the os.FileInfo -// objects returned by the FileSystem. -// -// If this interface is defined then it will be used to read the -// content type from the object. -// -// If this interface is not defined the file will be opened and the -// content type will be guessed from the initial contents of the file. -type ContentTyper interface { - // ContentType returns the content type for the file. - // - // If this returns error ErrNotImplemented then the error will - // be ignored and the base implementation will be used - // instead. - ContentType(ctx context.Context) (string, error) -} - -func findContentType(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { - if do, ok := fi.(ContentTyper); ok { - ctype, err := do.ContentType(ctx) - if err != ErrNotImplemented { - return ctype, err - } - } - f, err := fs.OpenFile(ctx, name, os.O_RDONLY, 0) - if err != nil { - return "", err - } - defer f.Close() - // This implementation is based on serveContent's code in the standard net/http package. - ctype := mime.TypeByExtension(filepath.Ext(name)) - if ctype != "" { - return ctype, nil - } - // Read a chunk to decide between utf-8 text and binary. - var buf [512]byte - n, err := io.ReadFull(f, buf[:]) - if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { - return "", err - } - ctype = http.DetectContentType(buf[:n]) - // Rewind file. - _, err = f.Seek(0, os.SEEK_SET) - return ctype, err -} - -// ETager is an optional interface for the os.FileInfo objects -// returned by the FileSystem. -// -// If this interface is defined then it will be used to read the ETag -// for the object. -// -// If this interface is not defined an ETag will be computed using the -// ModTime() and the Size() methods of the os.FileInfo object. -type ETager interface { - // ETag returns an ETag for the file. This should be of the - // form "value" or W/"value" - // - // If this returns error ErrNotImplemented then the error will - // be ignored and the base implementation will be used - // instead. - ETag(ctx context.Context) (string, error) -} - -func findETag(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { - if do, ok := fi.(ETager); ok { - etag, err := do.ETag(ctx) - if err != ErrNotImplemented { - return etag, err - } - } - // The Apache http 2.4 web server by default concatenates the - // modification time and size of a file. We replicate the heuristic - // with nanosecond granularity. - return fmt.Sprintf(`"%x%x"`, fi.ModTime().UnixNano(), fi.Size()), nil -} - -func findSupportedLock(ctx context.Context, fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { - return `` + - `` + - `` + - `` + - ``, nil -} diff --git a/deps/golang.org/x/net/webdav/prop_test.go b/deps/golang.org/x/net/webdav/prop_test.go deleted file mode 100644 index bc42b9132..000000000 --- a/deps/golang.org/x/net/webdav/prop_test.go +++ /dev/null @@ -1,717 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "encoding/xml" - "fmt" - "net/http" - "os" - "reflect" - "regexp" - "sort" - "testing" - - "golang.org/x/net/context" -) - -func TestMemPS(t *testing.T) { - ctx := context.Background() - // calcProps calculates the getlastmodified and getetag DAV: property - // values in pstats for resource name in file-system fs. - calcProps := func(name string, fs FileSystem, ls LockSystem, pstats []Propstat) error { - fi, err := fs.Stat(ctx, name) - if err != nil { - return err - } - for _, pst := range pstats { - for i, p := range pst.Props { - switch p.XMLName { - case xml.Name{Space: "DAV:", Local: "getlastmodified"}: - p.InnerXML = []byte(fi.ModTime().UTC().Format(http.TimeFormat)) - pst.Props[i] = p - case xml.Name{Space: "DAV:", Local: "getetag"}: - if fi.IsDir() { - continue - } - etag, err := findETag(ctx, fs, ls, name, fi) - if err != nil { - return err - } - p.InnerXML = []byte(etag) - pst.Props[i] = p - } - } - } - return nil - } - - const ( - lockEntry = `` + - `` + - `` + - `` + - `` - statForbiddenError = `` - ) - - type propOp struct { - op string - name string - pnames []xml.Name - patches []Proppatch - wantPnames []xml.Name - wantPropstats []Propstat - } - - testCases := []struct { - desc string - noDeadProps bool - buildfs []string - propOp []propOp - }{{ - desc: "propname", - buildfs: []string{"mkdir /dir", "touch /file"}, - propOp: []propOp{{ - op: "propname", - name: "/dir", - wantPnames: []xml.Name{ - {Space: "DAV:", Local: "resourcetype"}, - {Space: "DAV:", Local: "displayname"}, - {Space: "DAV:", Local: "supportedlock"}, - {Space: "DAV:", Local: "getlastmodified"}, - }, - }, { - op: "propname", - name: "/file", - wantPnames: []xml.Name{ - {Space: "DAV:", Local: "resourcetype"}, - {Space: "DAV:", Local: "displayname"}, - {Space: "DAV:", Local: "getcontentlength"}, - {Space: "DAV:", Local: "getlastmodified"}, - {Space: "DAV:", Local: "getcontenttype"}, - {Space: "DAV:", Local: "getetag"}, - {Space: "DAV:", Local: "supportedlock"}, - }, - }}, - }, { - desc: "allprop dir and file", - buildfs: []string{"mkdir /dir", "write /file foobarbaz"}, - propOp: []propOp{{ - op: "allprop", - name: "/dir", - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, - InnerXML: []byte(``), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, - InnerXML: []byte("dir"), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"}, - InnerXML: nil, // Calculated during test. - }, { - XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"}, - InnerXML: []byte(lockEntry), - }}, - }}, - }, { - op: "allprop", - name: "/file", - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, - InnerXML: []byte(""), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, - InnerXML: []byte("file"), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getcontentlength"}, - InnerXML: []byte("9"), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"}, - InnerXML: nil, // Calculated during test. - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getcontenttype"}, - InnerXML: []byte("text/plain; charset=utf-8"), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, - InnerXML: nil, // Calculated during test. - }, { - XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"}, - InnerXML: []byte(lockEntry), - }}, - }}, - }, { - op: "allprop", - name: "/file", - pnames: []xml.Name{ - {"DAV:", "resourcetype"}, - {"foo", "bar"}, - }, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, - InnerXML: []byte(""), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, - InnerXML: []byte("file"), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getcontentlength"}, - InnerXML: []byte("9"), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"}, - InnerXML: nil, // Calculated during test. - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getcontenttype"}, - InnerXML: []byte("text/plain; charset=utf-8"), - }, { - XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, - InnerXML: nil, // Calculated during test. - }, { - XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"}, - InnerXML: []byte(lockEntry), - }}}, { - Status: http.StatusNotFound, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}}, - }, - }}, - }, { - desc: "propfind DAV:resourcetype", - buildfs: []string{"mkdir /dir", "touch /file"}, - propOp: []propOp{{ - op: "propfind", - name: "/dir", - pnames: []xml.Name{{"DAV:", "resourcetype"}}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, - InnerXML: []byte(``), - }}, - }}, - }, { - op: "propfind", - name: "/file", - pnames: []xml.Name{{"DAV:", "resourcetype"}}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, - InnerXML: []byte(""), - }}, - }}, - }}, - }, { - desc: "propfind unsupported DAV properties", - buildfs: []string{"mkdir /dir"}, - propOp: []propOp{{ - op: "propfind", - name: "/dir", - pnames: []xml.Name{{"DAV:", "getcontentlanguage"}}, - wantPropstats: []Propstat{{ - Status: http.StatusNotFound, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "getcontentlanguage"}, - }}, - }}, - }, { - op: "propfind", - name: "/dir", - pnames: []xml.Name{{"DAV:", "creationdate"}}, - wantPropstats: []Propstat{{ - Status: http.StatusNotFound, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "creationdate"}, - }}, - }}, - }}, - }, { - desc: "propfind getetag for files but not for directories", - buildfs: []string{"mkdir /dir", "touch /file"}, - propOp: []propOp{{ - op: "propfind", - name: "/dir", - pnames: []xml.Name{{"DAV:", "getetag"}}, - wantPropstats: []Propstat{{ - Status: http.StatusNotFound, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, - }}, - }}, - }, { - op: "propfind", - name: "/file", - pnames: []xml.Name{{"DAV:", "getetag"}}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, - InnerXML: nil, // Calculated during test. - }}, - }}, - }}, - }, { - desc: "proppatch property on no-dead-properties file system", - buildfs: []string{"mkdir /dir"}, - noDeadProps: true, - propOp: []propOp{{ - op: "proppatch", - name: "/dir", - patches: []Proppatch{{ - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusForbidden, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - }, { - op: "proppatch", - name: "/dir", - patches: []Proppatch{{ - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusForbidden, - XMLError: statForbiddenError, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, - }}, - }}, - }}, - }, { - desc: "proppatch dead property", - buildfs: []string{"mkdir /dir"}, - propOp: []propOp{{ - op: "proppatch", - name: "/dir", - patches: []Proppatch{{ - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - InnerXML: []byte("baz"), - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - }, { - op: "propfind", - name: "/dir", - pnames: []xml.Name{{Space: "foo", Local: "bar"}}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - InnerXML: []byte("baz"), - }}, - }}, - }}, - }, { - desc: "proppatch dead property with failed dependency", - buildfs: []string{"mkdir /dir"}, - propOp: []propOp{{ - op: "proppatch", - name: "/dir", - patches: []Proppatch{{ - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - InnerXML: []byte("baz"), - }}, - }, { - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, - InnerXML: []byte("xxx"), - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusForbidden, - XMLError: statForbiddenError, - Props: []Property{{ - XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, - }}, - }, { - Status: StatusFailedDependency, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - }, { - op: "propfind", - name: "/dir", - pnames: []xml.Name{{Space: "foo", Local: "bar"}}, - wantPropstats: []Propstat{{ - Status: http.StatusNotFound, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - }}, - }, { - desc: "proppatch remove dead property", - buildfs: []string{"mkdir /dir"}, - propOp: []propOp{{ - op: "proppatch", - name: "/dir", - patches: []Proppatch{{ - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - InnerXML: []byte("baz"), - }, { - XMLName: xml.Name{Space: "spam", Local: "ham"}, - InnerXML: []byte("eggs"), - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }, { - XMLName: xml.Name{Space: "spam", Local: "ham"}, - }}, - }}, - }, { - op: "propfind", - name: "/dir", - pnames: []xml.Name{ - {Space: "foo", Local: "bar"}, - {Space: "spam", Local: "ham"}, - }, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - InnerXML: []byte("baz"), - }, { - XMLName: xml.Name{Space: "spam", Local: "ham"}, - InnerXML: []byte("eggs"), - }}, - }}, - }, { - op: "proppatch", - name: "/dir", - patches: []Proppatch{{ - Remove: true, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - }, { - op: "propfind", - name: "/dir", - pnames: []xml.Name{ - {Space: "foo", Local: "bar"}, - {Space: "spam", Local: "ham"}, - }, - wantPropstats: []Propstat{{ - Status: http.StatusNotFound, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }, { - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "spam", Local: "ham"}, - InnerXML: []byte("eggs"), - }}, - }}, - }}, - }, { - desc: "propname with dead property", - buildfs: []string{"touch /file"}, - propOp: []propOp{{ - op: "proppatch", - name: "/file", - patches: []Proppatch{{ - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - InnerXML: []byte("baz"), - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - }, { - op: "propname", - name: "/file", - wantPnames: []xml.Name{ - {Space: "DAV:", Local: "resourcetype"}, - {Space: "DAV:", Local: "displayname"}, - {Space: "DAV:", Local: "getcontentlength"}, - {Space: "DAV:", Local: "getlastmodified"}, - {Space: "DAV:", Local: "getcontenttype"}, - {Space: "DAV:", Local: "getetag"}, - {Space: "DAV:", Local: "supportedlock"}, - {Space: "foo", Local: "bar"}, - }, - }}, - }, { - desc: "proppatch remove unknown dead property", - buildfs: []string{"mkdir /dir"}, - propOp: []propOp{{ - op: "proppatch", - name: "/dir", - patches: []Proppatch{{ - Remove: true, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - wantPropstats: []Propstat{{ - Status: http.StatusOK, - Props: []Property{{ - XMLName: xml.Name{Space: "foo", Local: "bar"}, - }}, - }}, - }}, - }, { - desc: "bad: propfind unknown property", - buildfs: []string{"mkdir /dir"}, - propOp: []propOp{{ - op: "propfind", - name: "/dir", - pnames: []xml.Name{{"foo:", "bar"}}, - wantPropstats: []Propstat{{ - Status: http.StatusNotFound, - Props: []Property{{ - XMLName: xml.Name{Space: "foo:", Local: "bar"}, - }}, - }}, - }}, - }} - - for _, tc := range testCases { - fs, err := buildTestFS(tc.buildfs) - if err != nil { - t.Fatalf("%s: cannot create test filesystem: %v", tc.desc, err) - } - if tc.noDeadProps { - fs = noDeadPropsFS{fs} - } - ls := NewMemLS() - for _, op := range tc.propOp { - desc := fmt.Sprintf("%s: %s %s", tc.desc, op.op, op.name) - if err = calcProps(op.name, fs, ls, op.wantPropstats); err != nil { - t.Fatalf("%s: calcProps: %v", desc, err) - } - - // Call property system. - var propstats []Propstat - switch op.op { - case "propname": - pnames, err := propnames(ctx, fs, ls, op.name) - if err != nil { - t.Errorf("%s: got error %v, want nil", desc, err) - continue - } - sort.Sort(byXMLName(pnames)) - sort.Sort(byXMLName(op.wantPnames)) - if !reflect.DeepEqual(pnames, op.wantPnames) { - t.Errorf("%s: pnames\ngot %q\nwant %q", desc, pnames, op.wantPnames) - } - continue - case "allprop": - propstats, err = allprop(ctx, fs, ls, op.name, op.pnames) - case "propfind": - propstats, err = props(ctx, fs, ls, op.name, op.pnames) - case "proppatch": - propstats, err = patch(ctx, fs, ls, op.name, op.patches) - default: - t.Fatalf("%s: %s not implemented", desc, op.op) - } - if err != nil { - t.Errorf("%s: got error %v, want nil", desc, err) - continue - } - // Compare return values from allprop, propfind or proppatch. - for _, pst := range propstats { - sort.Sort(byPropname(pst.Props)) - } - for _, pst := range op.wantPropstats { - sort.Sort(byPropname(pst.Props)) - } - sort.Sort(byStatus(propstats)) - sort.Sort(byStatus(op.wantPropstats)) - if !reflect.DeepEqual(propstats, op.wantPropstats) { - t.Errorf("%s: propstat\ngot %q\nwant %q", desc, propstats, op.wantPropstats) - } - } - } -} - -func cmpXMLName(a, b xml.Name) bool { - if a.Space != b.Space { - return a.Space < b.Space - } - return a.Local < b.Local -} - -type byXMLName []xml.Name - -func (b byXMLName) Len() int { return len(b) } -func (b byXMLName) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b byXMLName) Less(i, j int) bool { return cmpXMLName(b[i], b[j]) } - -type byPropname []Property - -func (b byPropname) Len() int { return len(b) } -func (b byPropname) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b byPropname) Less(i, j int) bool { return cmpXMLName(b[i].XMLName, b[j].XMLName) } - -type byStatus []Propstat - -func (b byStatus) Len() int { return len(b) } -func (b byStatus) Swap(i, j int) { b[i], b[j] = b[j], b[i] } -func (b byStatus) Less(i, j int) bool { return b[i].Status < b[j].Status } - -type noDeadPropsFS struct { - FileSystem -} - -func (fs noDeadPropsFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (File, error) { - f, err := fs.FileSystem.OpenFile(ctx, name, flag, perm) - if err != nil { - return nil, err - } - return noDeadPropsFile{f}, nil -} - -// noDeadPropsFile wraps a File but strips any optional DeadPropsHolder methods -// provided by the underlying File implementation. -type noDeadPropsFile struct { - f File -} - -func (f noDeadPropsFile) Close() error { return f.f.Close() } -func (f noDeadPropsFile) Read(p []byte) (int, error) { return f.f.Read(p) } -func (f noDeadPropsFile) Readdir(count int) ([]os.FileInfo, error) { return f.f.Readdir(count) } -func (f noDeadPropsFile) Seek(off int64, whence int) (int64, error) { return f.f.Seek(off, whence) } -func (f noDeadPropsFile) Stat() (os.FileInfo, error) { return f.f.Stat() } -func (f noDeadPropsFile) Write(p []byte) (int, error) { return f.f.Write(p) } - -type overrideContentType struct { - os.FileInfo - contentType string - err error -} - -func (o *overrideContentType) ContentType(ctx context.Context) (string, error) { - return o.contentType, o.err -} - -func TestFindContentTypeOverride(t *testing.T) { - fs, err := buildTestFS([]string{"touch /file"}) - if err != nil { - t.Fatalf("cannot create test filesystem: %v", err) - } - ctx := context.Background() - fi, err := fs.Stat(ctx, "/file") - if err != nil { - t.Fatalf("cannot Stat /file: %v", err) - } - - // Check non overridden case - originalContentType, err := findContentType(ctx, fs, nil, "/file", fi) - if err != nil { - t.Fatalf("findContentType /file failed: %v", err) - } - if originalContentType != "text/plain; charset=utf-8" { - t.Fatalf("ContentType wrong want %q got %q", "text/plain; charset=utf-8", originalContentType) - } - - // Now try overriding the ContentType - o := &overrideContentType{fi, "OverriddenContentType", nil} - ContentType, err := findContentType(ctx, fs, nil, "/file", o) - if err != nil { - t.Fatalf("findContentType /file failed: %v", err) - } - if ContentType != o.contentType { - t.Fatalf("ContentType wrong want %q got %q", o.contentType, ContentType) - } - - // Now return ErrNotImplemented and check we get the original content type - o = &overrideContentType{fi, "OverriddenContentType", ErrNotImplemented} - ContentType, err = findContentType(ctx, fs, nil, "/file", o) - if err != nil { - t.Fatalf("findContentType /file failed: %v", err) - } - if ContentType != originalContentType { - t.Fatalf("ContentType wrong want %q got %q", originalContentType, ContentType) - } -} - -type overrideETag struct { - os.FileInfo - eTag string - err error -} - -func (o *overrideETag) ETag(ctx context.Context) (string, error) { - return o.eTag, o.err -} - -func TestFindETagOverride(t *testing.T) { - fs, err := buildTestFS([]string{"touch /file"}) - if err != nil { - t.Fatalf("cannot create test filesystem: %v", err) - } - ctx := context.Background() - fi, err := fs.Stat(ctx, "/file") - if err != nil { - t.Fatalf("cannot Stat /file: %v", err) - } - - // Check non overridden case - originalETag, err := findETag(ctx, fs, nil, "/file", fi) - if err != nil { - t.Fatalf("findETag /file failed: %v", err) - } - matchETag := regexp.MustCompile(`^"-?[0-9a-f]{6,}"$`) - if !matchETag.MatchString(originalETag) { - t.Fatalf("ETag wrong, wanted something matching %v got %q", matchETag, originalETag) - } - - // Now try overriding the ETag - o := &overrideETag{fi, `"OverriddenETag"`, nil} - ETag, err := findETag(ctx, fs, nil, "/file", o) - if err != nil { - t.Fatalf("findETag /file failed: %v", err) - } - if ETag != o.eTag { - t.Fatalf("ETag wrong want %q got %q", o.eTag, ETag) - } - - // Now return ErrNotImplemented and check we get the original Etag - o = &overrideETag{fi, `"OverriddenETag"`, ErrNotImplemented} - ETag, err = findETag(ctx, fs, nil, "/file", o) - if err != nil { - t.Fatalf("findETag /file failed: %v", err) - } - if ETag != originalETag { - t.Fatalf("ETag wrong want %q got %q", originalETag, ETag) - } -} diff --git a/deps/golang.org/x/net/webdav/webdav.go b/deps/golang.org/x/net/webdav/webdav.go deleted file mode 100644 index 7b56687fc..000000000 --- a/deps/golang.org/x/net/webdav/webdav.go +++ /dev/null @@ -1,702 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package webdav provides a WebDAV server implementation. -package webdav // import "golang.org/x/net/webdav" - -import ( - "errors" - "fmt" - "io" - "net/http" - "net/url" - "os" - "path" - "strings" - "time" -) - -type Handler struct { - // Prefix is the URL path prefix to strip from WebDAV resource paths. - Prefix string - // FileSystem is the virtual file system. - FileSystem FileSystem - // LockSystem is the lock management system. - LockSystem LockSystem - // Logger is an optional error logger. If non-nil, it will be called - // for all HTTP requests. - Logger func(*http.Request, error) -} - -func (h *Handler) stripPrefix(p string) (string, int, error) { - if h.Prefix == "" { - return p, http.StatusOK, nil - } - if r := strings.TrimPrefix(p, h.Prefix); len(r) < len(p) { - return r, http.StatusOK, nil - } - return p, http.StatusNotFound, errPrefixMismatch -} - -func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - status, err := http.StatusBadRequest, errUnsupportedMethod - if h.FileSystem == nil { - status, err = http.StatusInternalServerError, errNoFileSystem - } else if h.LockSystem == nil { - status, err = http.StatusInternalServerError, errNoLockSystem - } else { - switch r.Method { - case "OPTIONS": - status, err = h.handleOptions(w, r) - case "GET", "HEAD", "POST": - status, err = h.handleGetHeadPost(w, r) - case "DELETE": - status, err = h.handleDelete(w, r) - case "PUT": - status, err = h.handlePut(w, r) - case "MKCOL": - status, err = h.handleMkcol(w, r) - case "COPY", "MOVE": - status, err = h.handleCopyMove(w, r) - case "LOCK": - status, err = h.handleLock(w, r) - case "UNLOCK": - status, err = h.handleUnlock(w, r) - case "PROPFIND": - status, err = h.handlePropfind(w, r) - case "PROPPATCH": - status, err = h.handleProppatch(w, r) - } - } - - if status != 0 { - w.WriteHeader(status) - if status != http.StatusNoContent { - w.Write([]byte(StatusText(status))) - } - } - if h.Logger != nil { - h.Logger(r, err) - } -} - -func (h *Handler) lock(now time.Time, root string) (token string, status int, err error) { - token, err = h.LockSystem.Create(now, LockDetails{ - Root: root, - Duration: infiniteTimeout, - ZeroDepth: true, - }) - if err != nil { - if err == ErrLocked { - return "", StatusLocked, err - } - return "", http.StatusInternalServerError, err - } - return token, 0, nil -} - -func (h *Handler) confirmLocks(r *http.Request, src, dst string) (release func(), status int, err error) { - hdr := r.Header.Get("If") - if hdr == "" { - // An empty If header means that the client hasn't previously created locks. - // Even if this client doesn't care about locks, we still need to check that - // the resources aren't locked by another client, so we create temporary - // locks that would conflict with another client's locks. These temporary - // locks are unlocked at the end of the HTTP request. - now, srcToken, dstToken := time.Now(), "", "" - if src != "" { - srcToken, status, err = h.lock(now, src) - if err != nil { - return nil, status, err - } - } - if dst != "" { - dstToken, status, err = h.lock(now, dst) - if err != nil { - if srcToken != "" { - h.LockSystem.Unlock(now, srcToken) - } - return nil, status, err - } - } - - return func() { - if dstToken != "" { - h.LockSystem.Unlock(now, dstToken) - } - if srcToken != "" { - h.LockSystem.Unlock(now, srcToken) - } - }, 0, nil - } - - ih, ok := parseIfHeader(hdr) - if !ok { - return nil, http.StatusBadRequest, errInvalidIfHeader - } - // ih is a disjunction (OR) of ifLists, so any ifList will do. - for _, l := range ih.lists { - lsrc := l.resourceTag - if lsrc == "" { - lsrc = src - } else { - u, err := url.Parse(lsrc) - if err != nil { - continue - } - if u.Host != r.Host { - continue - } - lsrc, status, err = h.stripPrefix(u.Path) - if err != nil { - return nil, status, err - } - } - release, err = h.LockSystem.Confirm(time.Now(), lsrc, dst, l.conditions...) - if err == ErrConfirmationFailed { - continue - } - if err != nil { - return nil, http.StatusInternalServerError, err - } - return release, 0, nil - } - // Section 10.4.1 says that "If this header is evaluated and all state lists - // fail, then the request must fail with a 412 (Precondition Failed) status." - // We follow the spec even though the cond_put_corrupt_token test case from - // the litmus test warns on seeing a 412 instead of a 423 (Locked). - return nil, http.StatusPreconditionFailed, ErrLocked -} - -func (h *Handler) handleOptions(w http.ResponseWriter, r *http.Request) (status int, err error) { - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - ctx := getContext(r) - allow := "OPTIONS, LOCK, PUT, MKCOL" - if fi, err := h.FileSystem.Stat(ctx, reqPath); err == nil { - if fi.IsDir() { - allow = "OPTIONS, LOCK, DELETE, PROPPATCH, COPY, MOVE, UNLOCK, PROPFIND" - } else { - allow = "OPTIONS, LOCK, GET, HEAD, POST, DELETE, PROPPATCH, COPY, MOVE, UNLOCK, PROPFIND, PUT" - } - } - w.Header().Set("Allow", allow) - // http://www.webdav.org/specs/rfc4918.html#dav.compliance.classes - w.Header().Set("DAV", "1, 2") - // http://msdn.microsoft.com/en-au/library/cc250217.aspx - w.Header().Set("MS-Author-Via", "DAV") - return 0, nil -} - -func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (status int, err error) { - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - // TODO: check locks for read-only access?? - ctx := getContext(r) - f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDONLY, 0) - if err != nil { - return http.StatusNotFound, err - } - defer f.Close() - fi, err := f.Stat() - if err != nil { - return http.StatusNotFound, err - } - if fi.IsDir() { - return http.StatusMethodNotAllowed, nil - } - etag, err := findETag(ctx, h.FileSystem, h.LockSystem, reqPath, fi) - if err != nil { - return http.StatusInternalServerError, err - } - w.Header().Set("ETag", etag) - // Let ServeContent determine the Content-Type header. - http.ServeContent(w, r, reqPath, fi.ModTime(), f) - return 0, nil -} - -func (h *Handler) handleDelete(w http.ResponseWriter, r *http.Request) (status int, err error) { - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - release, status, err := h.confirmLocks(r, reqPath, "") - if err != nil { - return status, err - } - defer release() - - ctx := getContext(r) - - // TODO: return MultiStatus where appropriate. - - // "godoc os RemoveAll" says that "If the path does not exist, RemoveAll - // returns nil (no error)." WebDAV semantics are that it should return a - // "404 Not Found". We therefore have to Stat before we RemoveAll. - if _, err := h.FileSystem.Stat(ctx, reqPath); err != nil { - if os.IsNotExist(err) { - return http.StatusNotFound, err - } - return http.StatusMethodNotAllowed, err - } - if err := h.FileSystem.RemoveAll(ctx, reqPath); err != nil { - return http.StatusMethodNotAllowed, err - } - return http.StatusNoContent, nil -} - -func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int, err error) { - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - release, status, err := h.confirmLocks(r, reqPath, "") - if err != nil { - return status, err - } - defer release() - // TODO(rost): Support the If-Match, If-None-Match headers? See bradfitz' - // comments in http.checkEtag. - ctx := getContext(r) - - f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if err != nil { - return http.StatusNotFound, err - } - _, copyErr := io.Copy(f, r.Body) - fi, statErr := f.Stat() - closeErr := f.Close() - // TODO(rost): Returning 405 Method Not Allowed might not be appropriate. - if copyErr != nil { - return http.StatusMethodNotAllowed, copyErr - } - if statErr != nil { - return http.StatusMethodNotAllowed, statErr - } - if closeErr != nil { - return http.StatusMethodNotAllowed, closeErr - } - etag, err := findETag(ctx, h.FileSystem, h.LockSystem, reqPath, fi) - if err != nil { - return http.StatusInternalServerError, err - } - w.Header().Set("ETag", etag) - return http.StatusCreated, nil -} - -func (h *Handler) handleMkcol(w http.ResponseWriter, r *http.Request) (status int, err error) { - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - release, status, err := h.confirmLocks(r, reqPath, "") - if err != nil { - return status, err - } - defer release() - - ctx := getContext(r) - - if r.ContentLength > 0 { - return http.StatusUnsupportedMediaType, nil - } - if err := h.FileSystem.Mkdir(ctx, reqPath, 0777); err != nil { - if os.IsNotExist(err) { - return http.StatusConflict, err - } - return http.StatusMethodNotAllowed, err - } - return http.StatusCreated, nil -} - -func (h *Handler) handleCopyMove(w http.ResponseWriter, r *http.Request) (status int, err error) { - hdr := r.Header.Get("Destination") - if hdr == "" { - return http.StatusBadRequest, errInvalidDestination - } - u, err := url.Parse(hdr) - if err != nil { - return http.StatusBadRequest, errInvalidDestination - } - if u.Host != r.Host { - return http.StatusBadGateway, errInvalidDestination - } - - src, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - - dst, status, err := h.stripPrefix(u.Path) - if err != nil { - return status, err - } - - if dst == "" { - return http.StatusBadGateway, errInvalidDestination - } - if dst == src { - return http.StatusForbidden, errDestinationEqualsSource - } - - ctx := getContext(r) - - if r.Method == "COPY" { - // Section 7.5.1 says that a COPY only needs to lock the destination, - // not both destination and source. Strictly speaking, this is racy, - // even though a COPY doesn't modify the source, if a concurrent - // operation modifies the source. However, the litmus test explicitly - // checks that COPYing a locked-by-another source is OK. - release, status, err := h.confirmLocks(r, "", dst) - if err != nil { - return status, err - } - defer release() - - // Section 9.8.3 says that "The COPY method on a collection without a Depth - // header must act as if a Depth header with value "infinity" was included". - depth := infiniteDepth - if hdr := r.Header.Get("Depth"); hdr != "" { - depth = parseDepth(hdr) - if depth != 0 && depth != infiniteDepth { - // Section 9.8.3 says that "A client may submit a Depth header on a - // COPY on a collection with a value of "0" or "infinity"." - return http.StatusBadRequest, errInvalidDepth - } - } - return copyFiles(ctx, h.FileSystem, src, dst, r.Header.Get("Overwrite") != "F", depth, 0) - } - - release, status, err := h.confirmLocks(r, src, dst) - if err != nil { - return status, err - } - defer release() - - // Section 9.9.2 says that "The MOVE method on a collection must act as if - // a "Depth: infinity" header was used on it. A client must not submit a - // Depth header on a MOVE on a collection with any value but "infinity"." - if hdr := r.Header.Get("Depth"); hdr != "" { - if parseDepth(hdr) != infiniteDepth { - return http.StatusBadRequest, errInvalidDepth - } - } - return moveFiles(ctx, h.FileSystem, src, dst, r.Header.Get("Overwrite") == "T") -} - -func (h *Handler) handleLock(w http.ResponseWriter, r *http.Request) (retStatus int, retErr error) { - duration, err := parseTimeout(r.Header.Get("Timeout")) - if err != nil { - return http.StatusBadRequest, err - } - li, status, err := readLockInfo(r.Body) - if err != nil { - return status, err - } - - ctx := getContext(r) - token, ld, now, created := "", LockDetails{}, time.Now(), false - if li == (lockInfo{}) { - // An empty lockInfo means to refresh the lock. - ih, ok := parseIfHeader(r.Header.Get("If")) - if !ok { - return http.StatusBadRequest, errInvalidIfHeader - } - if len(ih.lists) == 1 && len(ih.lists[0].conditions) == 1 { - token = ih.lists[0].conditions[0].Token - } - if token == "" { - return http.StatusBadRequest, errInvalidLockToken - } - ld, err = h.LockSystem.Refresh(now, token, duration) - if err != nil { - if err == ErrNoSuchLock { - return http.StatusPreconditionFailed, err - } - return http.StatusInternalServerError, err - } - - } else { - // Section 9.10.3 says that "If no Depth header is submitted on a LOCK request, - // then the request MUST act as if a "Depth:infinity" had been submitted." - depth := infiniteDepth - if hdr := r.Header.Get("Depth"); hdr != "" { - depth = parseDepth(hdr) - if depth != 0 && depth != infiniteDepth { - // Section 9.10.3 says that "Values other than 0 or infinity must not be - // used with the Depth header on a LOCK method". - return http.StatusBadRequest, errInvalidDepth - } - } - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - ld = LockDetails{ - Root: reqPath, - Duration: duration, - OwnerXML: li.Owner.InnerXML, - ZeroDepth: depth == 0, - } - token, err = h.LockSystem.Create(now, ld) - if err != nil { - if err == ErrLocked { - return StatusLocked, err - } - return http.StatusInternalServerError, err - } - defer func() { - if retErr != nil { - h.LockSystem.Unlock(now, token) - } - }() - - // Create the resource if it didn't previously exist. - if _, err := h.FileSystem.Stat(ctx, reqPath); err != nil { - f, err := h.FileSystem.OpenFile(ctx, reqPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) - if err != nil { - // TODO: detect missing intermediate dirs and return http.StatusConflict? - return http.StatusInternalServerError, err - } - f.Close() - created = true - } - - // http://www.webdav.org/specs/rfc4918.html#HEADER_Lock-Token says that the - // Lock-Token value is a Coded-URL. We add angle brackets. - w.Header().Set("Lock-Token", "<"+token+">") - } - - w.Header().Set("Content-Type", "application/xml; charset=utf-8") - if created { - // This is "w.WriteHeader(http.StatusCreated)" and not "return - // http.StatusCreated, nil" because we write our own (XML) response to w - // and Handler.ServeHTTP would otherwise write "Created". - w.WriteHeader(http.StatusCreated) - } - writeLockInfo(w, token, ld) - return 0, nil -} - -func (h *Handler) handleUnlock(w http.ResponseWriter, r *http.Request) (status int, err error) { - // http://www.webdav.org/specs/rfc4918.html#HEADER_Lock-Token says that the - // Lock-Token value is a Coded-URL. We strip its angle brackets. - t := r.Header.Get("Lock-Token") - if len(t) < 2 || t[0] != '<' || t[len(t)-1] != '>' { - return http.StatusBadRequest, errInvalidLockToken - } - t = t[1 : len(t)-1] - - switch err = h.LockSystem.Unlock(time.Now(), t); err { - case nil: - return http.StatusNoContent, err - case ErrForbidden: - return http.StatusForbidden, err - case ErrLocked: - return StatusLocked, err - case ErrNoSuchLock: - return http.StatusConflict, err - default: - return http.StatusInternalServerError, err - } -} - -func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status int, err error) { - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - ctx := getContext(r) - fi, err := h.FileSystem.Stat(ctx, reqPath) - if err != nil { - if os.IsNotExist(err) { - return http.StatusNotFound, err - } - return http.StatusMethodNotAllowed, err - } - depth := infiniteDepth - if hdr := r.Header.Get("Depth"); hdr != "" { - depth = parseDepth(hdr) - if depth == invalidDepth { - return http.StatusBadRequest, errInvalidDepth - } - } - pf, status, err := readPropfind(r.Body) - if err != nil { - return status, err - } - - mw := multistatusWriter{w: w} - - walkFn := func(reqPath string, info os.FileInfo, err error) error { - if err != nil { - return err - } - var pstats []Propstat - if pf.Propname != nil { - pnames, err := propnames(ctx, h.FileSystem, h.LockSystem, reqPath) - if err != nil { - return err - } - pstat := Propstat{Status: http.StatusOK} - for _, xmlname := range pnames { - pstat.Props = append(pstat.Props, Property{XMLName: xmlname}) - } - pstats = append(pstats, pstat) - } else if pf.Allprop != nil { - pstats, err = allprop(ctx, h.FileSystem, h.LockSystem, reqPath, pf.Prop) - } else { - pstats, err = props(ctx, h.FileSystem, h.LockSystem, reqPath, pf.Prop) - } - if err != nil { - return err - } - return mw.write(makePropstatResponse(path.Join(h.Prefix, reqPath), pstats)) - } - - walkErr := walkFS(ctx, h.FileSystem, depth, reqPath, fi, walkFn) - closeErr := mw.close() - if walkErr != nil { - return http.StatusInternalServerError, walkErr - } - if closeErr != nil { - return http.StatusInternalServerError, closeErr - } - return 0, nil -} - -func (h *Handler) handleProppatch(w http.ResponseWriter, r *http.Request) (status int, err error) { - reqPath, status, err := h.stripPrefix(r.URL.Path) - if err != nil { - return status, err - } - release, status, err := h.confirmLocks(r, reqPath, "") - if err != nil { - return status, err - } - defer release() - - ctx := getContext(r) - - if _, err := h.FileSystem.Stat(ctx, reqPath); err != nil { - if os.IsNotExist(err) { - return http.StatusNotFound, err - } - return http.StatusMethodNotAllowed, err - } - patches, status, err := readProppatch(r.Body) - if err != nil { - return status, err - } - pstats, err := patch(ctx, h.FileSystem, h.LockSystem, reqPath, patches) - if err != nil { - return http.StatusInternalServerError, err - } - mw := multistatusWriter{w: w} - writeErr := mw.write(makePropstatResponse(r.URL.Path, pstats)) - closeErr := mw.close() - if writeErr != nil { - return http.StatusInternalServerError, writeErr - } - if closeErr != nil { - return http.StatusInternalServerError, closeErr - } - return 0, nil -} - -func makePropstatResponse(href string, pstats []Propstat) *response { - resp := response{ - Href: []string{(&url.URL{Path: href}).EscapedPath()}, - Propstat: make([]propstat, 0, len(pstats)), - } - for _, p := range pstats { - var xmlErr *xmlError - if p.XMLError != "" { - xmlErr = &xmlError{InnerXML: []byte(p.XMLError)} - } - resp.Propstat = append(resp.Propstat, propstat{ - Status: fmt.Sprintf("HTTP/1.1 %d %s", p.Status, StatusText(p.Status)), - Prop: p.Props, - ResponseDescription: p.ResponseDescription, - Error: xmlErr, - }) - } - return &resp -} - -const ( - infiniteDepth = -1 - invalidDepth = -2 -) - -// parseDepth maps the strings "0", "1" and "infinity" to 0, 1 and -// infiniteDepth. Parsing any other string returns invalidDepth. -// -// Different WebDAV methods have further constraints on valid depths: -// - PROPFIND has no further restrictions, as per section 9.1. -// - COPY accepts only "0" or "infinity", as per section 9.8.3. -// - MOVE accepts only "infinity", as per section 9.9.2. -// - LOCK accepts only "0" or "infinity", as per section 9.10.3. -// These constraints are enforced by the handleXxx methods. -func parseDepth(s string) int { - switch s { - case "0": - return 0 - case "1": - return 1 - case "infinity": - return infiniteDepth - } - return invalidDepth -} - -// http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11 -const ( - StatusMulti = 207 - StatusUnprocessableEntity = 422 - StatusLocked = 423 - StatusFailedDependency = 424 - StatusInsufficientStorage = 507 -) - -func StatusText(code int) string { - switch code { - case StatusMulti: - return "Multi-Status" - case StatusUnprocessableEntity: - return "Unprocessable Entity" - case StatusLocked: - return "Locked" - case StatusFailedDependency: - return "Failed Dependency" - case StatusInsufficientStorage: - return "Insufficient Storage" - } - return http.StatusText(code) -} - -var ( - errDestinationEqualsSource = errors.New("webdav: destination equals source") - errDirectoryNotEmpty = errors.New("webdav: directory not empty") - errInvalidDepth = errors.New("webdav: invalid depth") - errInvalidDestination = errors.New("webdav: invalid destination") - errInvalidIfHeader = errors.New("webdav: invalid If header") - errInvalidLockInfo = errors.New("webdav: invalid lock info") - errInvalidLockToken = errors.New("webdav: invalid lock token") - errInvalidPropfind = errors.New("webdav: invalid propfind") - errInvalidProppatch = errors.New("webdav: invalid proppatch") - errInvalidResponse = errors.New("webdav: invalid response") - errInvalidTimeout = errors.New("webdav: invalid timeout") - errNoFileSystem = errors.New("webdav: no file system") - errNoLockSystem = errors.New("webdav: no lock system") - errNotADirectory = errors.New("webdav: not a directory") - errPrefixMismatch = errors.New("webdav: prefix mismatch") - errRecursionTooDeep = errors.New("webdav: recursion too deep") - errUnsupportedLockInfo = errors.New("webdav: unsupported lock info") - errUnsupportedMethod = errors.New("webdav: unsupported method") -) diff --git a/deps/golang.org/x/net/webdav/webdav_test.go b/deps/golang.org/x/net/webdav/webdav_test.go deleted file mode 100644 index 25e0d5421..000000000 --- a/deps/golang.org/x/net/webdav/webdav_test.go +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "errors" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/http/httptest" - "net/url" - "os" - "reflect" - "regexp" - "sort" - "strings" - "testing" - - "golang.org/x/net/context" -) - -// TODO: add tests to check XML responses with the expected prefix path -func TestPrefix(t *testing.T) { - const dst, blah = "Destination", "blah blah blah" - - // createLockBody comes from the example in Section 9.10.7. - const createLockBody = ` - - - - - http://example.org/~ejw/contact.html - - - ` - - do := func(method, urlStr string, body string, wantStatusCode int, headers ...string) (http.Header, error) { - var bodyReader io.Reader - if body != "" { - bodyReader = strings.NewReader(body) - } - req, err := http.NewRequest(method, urlStr, bodyReader) - if err != nil { - return nil, err - } - for len(headers) >= 2 { - req.Header.Add(headers[0], headers[1]) - headers = headers[2:] - } - res, err := http.DefaultTransport.RoundTrip(req) - if err != nil { - return nil, err - } - defer res.Body.Close() - if res.StatusCode != wantStatusCode { - return nil, fmt.Errorf("got status code %d, want %d", res.StatusCode, wantStatusCode) - } - return res.Header, nil - } - - prefixes := []string{ - "/", - "/a/", - "/a/b/", - "/a/b/c/", - } - ctx := context.Background() - for _, prefix := range prefixes { - fs := NewMemFS() - h := &Handler{ - FileSystem: fs, - LockSystem: NewMemLS(), - } - mux := http.NewServeMux() - if prefix != "/" { - h.Prefix = prefix - } - mux.Handle(prefix, h) - srv := httptest.NewServer(mux) - defer srv.Close() - - // The script is: - // MKCOL /a - // MKCOL /a/b - // PUT /a/b/c - // COPY /a/b/c /a/b/d - // MKCOL /a/b/e - // MOVE /a/b/d /a/b/e/f - // LOCK /a/b/e/g - // PUT /a/b/e/g - // which should yield the (possibly stripped) filenames /a/b/c, - // /a/b/e/f and /a/b/e/g, plus their parent directories. - - wantA := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusMovedPermanently, - "/a/b/": http.StatusNotFound, - "/a/b/c/": http.StatusNotFound, - }[prefix] - if _, err := do("MKCOL", srv.URL+"/a", "", wantA); err != nil { - t.Errorf("prefix=%-9q MKCOL /a: %v", prefix, err) - continue - } - - wantB := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusCreated, - "/a/b/": http.StatusMovedPermanently, - "/a/b/c/": http.StatusNotFound, - }[prefix] - if _, err := do("MKCOL", srv.URL+"/a/b", "", wantB); err != nil { - t.Errorf("prefix=%-9q MKCOL /a/b: %v", prefix, err) - continue - } - - wantC := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusCreated, - "/a/b/": http.StatusCreated, - "/a/b/c/": http.StatusMovedPermanently, - }[prefix] - if _, err := do("PUT", srv.URL+"/a/b/c", blah, wantC); err != nil { - t.Errorf("prefix=%-9q PUT /a/b/c: %v", prefix, err) - continue - } - - wantD := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusCreated, - "/a/b/": http.StatusCreated, - "/a/b/c/": http.StatusMovedPermanently, - }[prefix] - if _, err := do("COPY", srv.URL+"/a/b/c", "", wantD, dst, srv.URL+"/a/b/d"); err != nil { - t.Errorf("prefix=%-9q COPY /a/b/c /a/b/d: %v", prefix, err) - continue - } - - wantE := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusCreated, - "/a/b/": http.StatusCreated, - "/a/b/c/": http.StatusNotFound, - }[prefix] - if _, err := do("MKCOL", srv.URL+"/a/b/e", "", wantE); err != nil { - t.Errorf("prefix=%-9q MKCOL /a/b/e: %v", prefix, err) - continue - } - - wantF := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusCreated, - "/a/b/": http.StatusCreated, - "/a/b/c/": http.StatusNotFound, - }[prefix] - if _, err := do("MOVE", srv.URL+"/a/b/d", "", wantF, dst, srv.URL+"/a/b/e/f"); err != nil { - t.Errorf("prefix=%-9q MOVE /a/b/d /a/b/e/f: %v", prefix, err) - continue - } - - var lockToken string - wantG := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusCreated, - "/a/b/": http.StatusCreated, - "/a/b/c/": http.StatusNotFound, - }[prefix] - if h, err := do("LOCK", srv.URL+"/a/b/e/g", createLockBody, wantG); err != nil { - t.Errorf("prefix=%-9q LOCK /a/b/e/g: %v", prefix, err) - continue - } else { - lockToken = h.Get("Lock-Token") - } - - ifHeader := fmt.Sprintf("<%s/a/b/e/g> (%s)", srv.URL, lockToken) - wantH := map[string]int{ - "/": http.StatusCreated, - "/a/": http.StatusCreated, - "/a/b/": http.StatusCreated, - "/a/b/c/": http.StatusNotFound, - }[prefix] - if _, err := do("PUT", srv.URL+"/a/b/e/g", blah, wantH, "If", ifHeader); err != nil { - t.Errorf("prefix=%-9q PUT /a/b/e/g: %v", prefix, err) - continue - } - - got, err := find(ctx, nil, fs, "/") - if err != nil { - t.Errorf("prefix=%-9q find: %v", prefix, err) - continue - } - sort.Strings(got) - want := map[string][]string{ - "/": {"/", "/a", "/a/b", "/a/b/c", "/a/b/e", "/a/b/e/f", "/a/b/e/g"}, - "/a/": {"/", "/b", "/b/c", "/b/e", "/b/e/f", "/b/e/g"}, - "/a/b/": {"/", "/c", "/e", "/e/f", "/e/g"}, - "/a/b/c/": {"/"}, - }[prefix] - if !reflect.DeepEqual(got, want) { - t.Errorf("prefix=%-9q find:\ngot %v\nwant %v", prefix, got, want) - continue - } - } -} - -func TestEscapeXML(t *testing.T) { - // These test cases aren't exhaustive, and there is more than one way to - // escape e.g. a quot (as """ or """) or an apos. We presume that - // the encoding/xml package tests xml.EscapeText more thoroughly. This test - // here is just a sanity check for this package's escapeXML function, and - // its attempt to provide a fast path (and avoid a bytes.Buffer allocation) - // when escaping filenames is obviously a no-op. - testCases := map[string]string{ - "": "", - " ": " ", - "&": "&", - "*": "*", - "+": "+", - ",": ",", - "-": "-", - ".": ".", - "/": "/", - "0": "0", - "9": "9", - ":": ":", - "<": "<", - ">": ">", - "A": "A", - "_": "_", - "a": "a", - "~": "~", - "\u0201": "\u0201", - "&": "&amp;", - "foo&baz": "foo&<b/ar>baz", - } - - for in, want := range testCases { - if got := escapeXML(in); got != want { - t.Errorf("in=%q: got %q, want %q", in, got, want) - } - } -} - -func TestFilenameEscape(t *testing.T) { - hrefRe := regexp.MustCompile(`([^<]*)`) - displayNameRe := regexp.MustCompile(`([^<]*)`) - do := func(method, urlStr string) (string, string, error) { - req, err := http.NewRequest(method, urlStr, nil) - if err != nil { - return "", "", err - } - res, err := http.DefaultClient.Do(req) - if err != nil { - return "", "", err - } - defer res.Body.Close() - - b, err := ioutil.ReadAll(res.Body) - if err != nil { - return "", "", err - } - hrefMatch := hrefRe.FindStringSubmatch(string(b)) - if len(hrefMatch) != 2 { - return "", "", errors.New("D:href not found") - } - displayNameMatch := displayNameRe.FindStringSubmatch(string(b)) - if len(displayNameMatch) != 2 { - return "", "", errors.New("D:displayname not found") - } - - return hrefMatch[1], displayNameMatch[1], nil - } - - testCases := []struct { - name, wantHref, wantDisplayName string - }{{ - name: `/foo%bar`, - wantHref: `/foo%25bar`, - wantDisplayName: `foo%bar`, - }, { - name: `/こんにちわ世界`, - wantHref: `/%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%82%8F%E4%B8%96%E7%95%8C`, - wantDisplayName: `こんにちわ世界`, - }, { - name: `/Program Files/`, - wantHref: `/Program%20Files`, - wantDisplayName: `Program Files`, - }, { - name: `/go+lang`, - wantHref: `/go+lang`, - wantDisplayName: `go+lang`, - }, { - name: `/go&lang`, - wantHref: `/go&lang`, - wantDisplayName: `go&lang`, - }, { - name: `/goexclusive"` - Shared *struct{} `xml:"lockscope>shared"` - Write *struct{} `xml:"locktype>write"` - Owner owner `xml:"owner"` -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_owner -type owner struct { - InnerXML string `xml:",innerxml"` -} - -func readLockInfo(r io.Reader) (li lockInfo, status int, err error) { - c := &countingReader{r: r} - if err = ixml.NewDecoder(c).Decode(&li); err != nil { - if err == io.EOF { - if c.n == 0 { - // An empty body means to refresh the lock. - // http://www.webdav.org/specs/rfc4918.html#refreshing-locks - return lockInfo{}, 0, nil - } - err = errInvalidLockInfo - } - return lockInfo{}, http.StatusBadRequest, err - } - // We only support exclusive (non-shared) write locks. In practice, these are - // the only types of locks that seem to matter. - if li.Exclusive == nil || li.Shared != nil || li.Write == nil { - return lockInfo{}, http.StatusNotImplemented, errUnsupportedLockInfo - } - return li, 0, nil -} - -type countingReader struct { - n int - r io.Reader -} - -func (c *countingReader) Read(p []byte) (int, error) { - n, err := c.r.Read(p) - c.n += n - return n, err -} - -func writeLockInfo(w io.Writer, token string, ld LockDetails) (int, error) { - depth := "infinity" - if ld.ZeroDepth { - depth = "0" - } - timeout := ld.Duration / time.Second - return fmt.Fprintf(w, "\n"+ - "\n"+ - " \n"+ - " \n"+ - " %s\n"+ - " %s\n"+ - " Second-%d\n"+ - " %s\n"+ - " %s\n"+ - "", - depth, ld.OwnerXML, timeout, escape(token), escape(ld.Root), - ) -} - -func escape(s string) string { - for i := 0; i < len(s); i++ { - switch s[i] { - case '"', '&', '\'', '<', '>': - b := bytes.NewBuffer(nil) - ixml.EscapeText(b, []byte(s)) - return b.String() - } - } - return s -} - -// Next returns the next token, if any, in the XML stream of d. -// RFC 4918 requires to ignore comments, processing instructions -// and directives. -// http://www.webdav.org/specs/rfc4918.html#property_values -// http://www.webdav.org/specs/rfc4918.html#xml-extensibility -func next(d *ixml.Decoder) (ixml.Token, error) { - for { - t, err := d.Token() - if err != nil { - return t, err - } - switch t.(type) { - case ixml.Comment, ixml.Directive, ixml.ProcInst: - continue - default: - return t, nil - } - } -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_prop (for propfind) -type propfindProps []xml.Name - -// UnmarshalXML appends the property names enclosed within start to pn. -// -// It returns an error if start does not contain any properties or if -// properties contain values. Character data between properties is ignored. -func (pn *propfindProps) UnmarshalXML(d *ixml.Decoder, start ixml.StartElement) error { - for { - t, err := next(d) - if err != nil { - return err - } - switch t.(type) { - case ixml.EndElement: - if len(*pn) == 0 { - return fmt.Errorf("%s must not be empty", start.Name.Local) - } - return nil - case ixml.StartElement: - name := t.(ixml.StartElement).Name - t, err = next(d) - if err != nil { - return err - } - if _, ok := t.(ixml.EndElement); !ok { - return fmt.Errorf("unexpected token %T", t) - } - *pn = append(*pn, xml.Name(name)) - } - } -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propfind -type propfind struct { - XMLName ixml.Name `xml:"DAV: propfind"` - Allprop *struct{} `xml:"DAV: allprop"` - Propname *struct{} `xml:"DAV: propname"` - Prop propfindProps `xml:"DAV: prop"` - Include propfindProps `xml:"DAV: include"` -} - -func readPropfind(r io.Reader) (pf propfind, status int, err error) { - c := countingReader{r: r} - if err = ixml.NewDecoder(&c).Decode(&pf); err != nil { - if err == io.EOF { - if c.n == 0 { - // An empty body means to propfind allprop. - // http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND - return propfind{Allprop: new(struct{})}, 0, nil - } - err = errInvalidPropfind - } - return propfind{}, http.StatusBadRequest, err - } - - if pf.Allprop == nil && pf.Include != nil { - return propfind{}, http.StatusBadRequest, errInvalidPropfind - } - if pf.Allprop != nil && (pf.Prop != nil || pf.Propname != nil) { - return propfind{}, http.StatusBadRequest, errInvalidPropfind - } - if pf.Prop != nil && pf.Propname != nil { - return propfind{}, http.StatusBadRequest, errInvalidPropfind - } - if pf.Propname == nil && pf.Allprop == nil && pf.Prop == nil { - return propfind{}, http.StatusBadRequest, errInvalidPropfind - } - return pf, 0, nil -} - -// Property represents a single DAV resource property as defined in RFC 4918. -// See http://www.webdav.org/specs/rfc4918.html#data.model.for.resource.properties -type Property struct { - // XMLName is the fully qualified name that identifies this property. - XMLName xml.Name - - // Lang is an optional xml:lang attribute. - Lang string `xml:"xml:lang,attr,omitempty"` - - // InnerXML contains the XML representation of the property value. - // See http://www.webdav.org/specs/rfc4918.html#property_values - // - // Property values of complex type or mixed-content must have fully - // expanded XML namespaces or be self-contained with according - // XML namespace declarations. They must not rely on any XML - // namespace declarations within the scope of the XML document, - // even including the DAV: namespace. - InnerXML []byte `xml:",innerxml"` -} - -// ixmlProperty is the same as the Property type except it holds an ixml.Name -// instead of an xml.Name. -type ixmlProperty struct { - XMLName ixml.Name - Lang string `xml:"xml:lang,attr,omitempty"` - InnerXML []byte `xml:",innerxml"` -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_error -// See multistatusWriter for the "D:" namespace prefix. -type xmlError struct { - XMLName ixml.Name `xml:"D:error"` - InnerXML []byte `xml:",innerxml"` -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat -// See multistatusWriter for the "D:" namespace prefix. -type propstat struct { - Prop []Property `xml:"D:prop>_ignored_"` - Status string `xml:"D:status"` - Error *xmlError `xml:"D:error"` - ResponseDescription string `xml:"D:responsedescription,omitempty"` -} - -// ixmlPropstat is the same as the propstat type except it holds an ixml.Name -// instead of an xml.Name. -type ixmlPropstat struct { - Prop []ixmlProperty `xml:"D:prop>_ignored_"` - Status string `xml:"D:status"` - Error *xmlError `xml:"D:error"` - ResponseDescription string `xml:"D:responsedescription,omitempty"` -} - -// MarshalXML prepends the "D:" namespace prefix on properties in the DAV: namespace -// before encoding. See multistatusWriter. -func (ps propstat) MarshalXML(e *ixml.Encoder, start ixml.StartElement) error { - // Convert from a propstat to an ixmlPropstat. - ixmlPs := ixmlPropstat{ - Prop: make([]ixmlProperty, len(ps.Prop)), - Status: ps.Status, - Error: ps.Error, - ResponseDescription: ps.ResponseDescription, - } - for k, prop := range ps.Prop { - ixmlPs.Prop[k] = ixmlProperty{ - XMLName: ixml.Name(prop.XMLName), - Lang: prop.Lang, - InnerXML: prop.InnerXML, - } - } - - for k, prop := range ixmlPs.Prop { - if prop.XMLName.Space == "DAV:" { - prop.XMLName = ixml.Name{Space: "", Local: "D:" + prop.XMLName.Local} - ixmlPs.Prop[k] = prop - } - } - // Distinct type to avoid infinite recursion of MarshalXML. - type newpropstat ixmlPropstat - return e.EncodeElement(newpropstat(ixmlPs), start) -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_response -// See multistatusWriter for the "D:" namespace prefix. -type response struct { - XMLName ixml.Name `xml:"D:response"` - Href []string `xml:"D:href"` - Propstat []propstat `xml:"D:propstat"` - Status string `xml:"D:status,omitempty"` - Error *xmlError `xml:"D:error"` - ResponseDescription string `xml:"D:responsedescription,omitempty"` -} - -// MultistatusWriter marshals one or more Responses into a XML -// multistatus response. -// See http://www.webdav.org/specs/rfc4918.html#ELEMENT_multistatus -// TODO(rsto, mpl): As a workaround, the "D:" namespace prefix, defined as -// "DAV:" on this element, is prepended on the nested response, as well as on all -// its nested elements. All property names in the DAV: namespace are prefixed as -// well. This is because some versions of Mini-Redirector (on windows 7) ignore -// elements with a default namespace (no prefixed namespace). A less intrusive fix -// should be possible after golang.org/cl/11074. See https://golang.org/issue/11177 -type multistatusWriter struct { - // ResponseDescription contains the optional responsedescription - // of the multistatus XML element. Only the latest content before - // close will be emitted. Empty response descriptions are not - // written. - responseDescription string - - w http.ResponseWriter - enc *ixml.Encoder -} - -// Write validates and emits a DAV response as part of a multistatus response -// element. -// -// It sets the HTTP status code of its underlying http.ResponseWriter to 207 -// (Multi-Status) and populates the Content-Type header. If r is the -// first, valid response to be written, Write prepends the XML representation -// of r with a multistatus tag. Callers must call close after the last response -// has been written. -func (w *multistatusWriter) write(r *response) error { - switch len(r.Href) { - case 0: - return errInvalidResponse - case 1: - if len(r.Propstat) > 0 != (r.Status == "") { - return errInvalidResponse - } - default: - if len(r.Propstat) > 0 || r.Status == "" { - return errInvalidResponse - } - } - err := w.writeHeader() - if err != nil { - return err - } - return w.enc.Encode(r) -} - -// writeHeader writes a XML multistatus start element on w's underlying -// http.ResponseWriter and returns the result of the write operation. -// After the first write attempt, writeHeader becomes a no-op. -func (w *multistatusWriter) writeHeader() error { - if w.enc != nil { - return nil - } - w.w.Header().Add("Content-Type", "text/xml; charset=utf-8") - w.w.WriteHeader(StatusMulti) - _, err := fmt.Fprintf(w.w, ``) - if err != nil { - return err - } - w.enc = ixml.NewEncoder(w.w) - return w.enc.EncodeToken(ixml.StartElement{ - Name: ixml.Name{ - Space: "DAV:", - Local: "multistatus", - }, - Attr: []ixml.Attr{{ - Name: ixml.Name{Space: "xmlns", Local: "D"}, - Value: "DAV:", - }}, - }) -} - -// Close completes the marshalling of the multistatus response. It returns -// an error if the multistatus response could not be completed. If both the -// return value and field enc of w are nil, then no multistatus response has -// been written. -func (w *multistatusWriter) close() error { - if w.enc == nil { - return nil - } - var end []ixml.Token - if w.responseDescription != "" { - name := ixml.Name{Space: "DAV:", Local: "responsedescription"} - end = append(end, - ixml.StartElement{Name: name}, - ixml.CharData(w.responseDescription), - ixml.EndElement{Name: name}, - ) - } - end = append(end, ixml.EndElement{ - Name: ixml.Name{Space: "DAV:", Local: "multistatus"}, - }) - for _, t := range end { - err := w.enc.EncodeToken(t) - if err != nil { - return err - } - } - return w.enc.Flush() -} - -var xmlLangName = ixml.Name{Space: "http://www.w3.org/XML/1998/namespace", Local: "lang"} - -func xmlLang(s ixml.StartElement, d string) string { - for _, attr := range s.Attr { - if attr.Name == xmlLangName { - return attr.Value - } - } - return d -} - -type xmlValue []byte - -func (v *xmlValue) UnmarshalXML(d *ixml.Decoder, start ixml.StartElement) error { - // The XML value of a property can be arbitrary, mixed-content XML. - // To make sure that the unmarshalled value contains all required - // namespaces, we encode all the property value XML tokens into a - // buffer. This forces the encoder to redeclare any used namespaces. - var b bytes.Buffer - e := ixml.NewEncoder(&b) - for { - t, err := next(d) - if err != nil { - return err - } - if e, ok := t.(ixml.EndElement); ok && e.Name == start.Name { - break - } - if err = e.EncodeToken(t); err != nil { - return err - } - } - err := e.Flush() - if err != nil { - return err - } - *v = b.Bytes() - return nil -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_prop (for proppatch) -type proppatchProps []Property - -// UnmarshalXML appends the property names and values enclosed within start -// to ps. -// -// An xml:lang attribute that is defined either on the DAV:prop or property -// name XML element is propagated to the property's Lang field. -// -// UnmarshalXML returns an error if start does not contain any properties or if -// property values contain syntactically incorrect XML. -func (ps *proppatchProps) UnmarshalXML(d *ixml.Decoder, start ixml.StartElement) error { - lang := xmlLang(start, "") - for { - t, err := next(d) - if err != nil { - return err - } - switch elem := t.(type) { - case ixml.EndElement: - if len(*ps) == 0 { - return fmt.Errorf("%s must not be empty", start.Name.Local) - } - return nil - case ixml.StartElement: - p := Property{ - XMLName: xml.Name(t.(ixml.StartElement).Name), - Lang: xmlLang(t.(ixml.StartElement), lang), - } - err = d.DecodeElement(((*xmlValue)(&p.InnerXML)), &elem) - if err != nil { - return err - } - *ps = append(*ps, p) - } - } -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_set -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_remove -type setRemove struct { - XMLName ixml.Name - Lang string `xml:"xml:lang,attr,omitempty"` - Prop proppatchProps `xml:"DAV: prop"` -} - -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propertyupdate -type propertyupdate struct { - XMLName ixml.Name `xml:"DAV: propertyupdate"` - Lang string `xml:"xml:lang,attr,omitempty"` - SetRemove []setRemove `xml:",any"` -} - -func readProppatch(r io.Reader) (patches []Proppatch, status int, err error) { - var pu propertyupdate - if err = ixml.NewDecoder(r).Decode(&pu); err != nil { - return nil, http.StatusBadRequest, err - } - for _, op := range pu.SetRemove { - remove := false - switch op.XMLName { - case ixml.Name{Space: "DAV:", Local: "set"}: - // No-op. - case ixml.Name{Space: "DAV:", Local: "remove"}: - for _, p := range op.Prop { - if len(p.InnerXML) > 0 { - return nil, http.StatusBadRequest, errInvalidProppatch - } - } - remove = true - default: - return nil, http.StatusBadRequest, errInvalidProppatch - } - patches = append(patches, Proppatch{Remove: remove, Props: op.Prop}) - } - return patches, 0, nil -} diff --git a/deps/golang.org/x/net/webdav/xml_test.go b/deps/golang.org/x/net/webdav/xml_test.go deleted file mode 100644 index a3d9e1ed8..000000000 --- a/deps/golang.org/x/net/webdav/xml_test.go +++ /dev/null @@ -1,906 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package webdav - -import ( - "bytes" - "encoding/xml" - "fmt" - "io" - "net/http" - "net/http/httptest" - "reflect" - "sort" - "strings" - "testing" - - ixml "golang.org/x/net/webdav/internal/xml" -) - -func TestReadLockInfo(t *testing.T) { - // The "section x.y.z" test cases come from section x.y.z of the spec at - // http://www.webdav.org/specs/rfc4918.html - testCases := []struct { - desc string - input string - wantLI lockInfo - wantStatus int - }{{ - "bad: junk", - "xxx", - lockInfo{}, - http.StatusBadRequest, - }, { - "bad: invalid owner XML", - "" + - "\n" + - " \n" + - " \n" + - " \n" + - " no end tag \n" + - " \n" + - "", - lockInfo{}, - http.StatusBadRequest, - }, { - "bad: invalid UTF-8", - "" + - "\n" + - " \n" + - " \n" + - " \n" + - " \xff \n" + - " \n" + - "", - lockInfo{}, - http.StatusBadRequest, - }, { - "bad: unfinished XML #1", - "" + - "\n" + - " \n" + - " \n", - lockInfo{}, - http.StatusBadRequest, - }, { - "bad: unfinished XML #2", - "" + - "\n" + - " \n" + - " \n" + - " \n", - lockInfo{}, - http.StatusBadRequest, - }, { - "good: empty", - "", - lockInfo{}, - 0, - }, { - "good: plain-text owner", - "" + - "\n" + - " \n" + - " \n" + - " gopher\n" + - "", - lockInfo{ - XMLName: ixml.Name{Space: "DAV:", Local: "lockinfo"}, - Exclusive: new(struct{}), - Write: new(struct{}), - Owner: owner{ - InnerXML: "gopher", - }, - }, - 0, - }, { - "section 9.10.7", - "" + - "\n" + - " \n" + - " \n" + - " \n" + - " http://example.org/~ejw/contact.html\n" + - " \n" + - "", - lockInfo{ - XMLName: ixml.Name{Space: "DAV:", Local: "lockinfo"}, - Exclusive: new(struct{}), - Write: new(struct{}), - Owner: owner{ - InnerXML: "\n http://example.org/~ejw/contact.html\n ", - }, - }, - 0, - }} - - for _, tc := range testCases { - li, status, err := readLockInfo(strings.NewReader(tc.input)) - if tc.wantStatus != 0 { - if err == nil { - t.Errorf("%s: got nil error, want non-nil", tc.desc) - continue - } - } else if err != nil { - t.Errorf("%s: %v", tc.desc, err) - continue - } - if !reflect.DeepEqual(li, tc.wantLI) || status != tc.wantStatus { - t.Errorf("%s:\ngot lockInfo=%v, status=%v\nwant lockInfo=%v, status=%v", - tc.desc, li, status, tc.wantLI, tc.wantStatus) - continue - } - } -} - -func TestReadPropfind(t *testing.T) { - testCases := []struct { - desc string - input string - wantPF propfind - wantStatus int - }{{ - desc: "propfind: propname", - input: "" + - "\n" + - " \n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Propname: new(struct{}), - }, - }, { - desc: "propfind: empty body means allprop", - input: "", - wantPF: propfind{ - Allprop: new(struct{}), - }, - }, { - desc: "propfind: allprop", - input: "" + - "\n" + - " \n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Allprop: new(struct{}), - }, - }, { - desc: "propfind: allprop followed by include", - input: "" + - "\n" + - " \n" + - " \n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Allprop: new(struct{}), - Include: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, - }, - }, { - desc: "propfind: include followed by allprop", - input: "" + - "\n" + - " \n" + - " \n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Allprop: new(struct{}), - Include: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, - }, - }, { - desc: "propfind: propfind", - input: "" + - "\n" + - " \n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, - }, - }, { - desc: "propfind: prop with ignored comments", - input: "" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, - }, - }, { - desc: "propfind: propfind with ignored whitespace", - input: "" + - "\n" + - " \n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, - }, - }, { - desc: "propfind: propfind with ignored mixed-content", - input: "" + - "\n" + - " foobar\n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, - }, - }, { - desc: "propfind: propname with ignored element (section A.4)", - input: "" + - "\n" + - " \n" + - " *boss*\n" + - "", - wantPF: propfind{ - XMLName: ixml.Name{Space: "DAV:", Local: "propfind"}, - Propname: new(struct{}), - }, - }, { - desc: "propfind: bad: junk", - input: "xxx", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: propname and allprop (section A.3)", - input: "" + - "\n" + - " " + - " " + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: propname and prop", - input: "" + - "\n" + - " \n" + - " \n" + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: allprop and prop", - input: "" + - "\n" + - " \n" + - " \n" + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: empty propfind with ignored element (section A.4)", - input: "" + - "\n" + - " \n" + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: empty prop", - input: "" + - "\n" + - " \n" + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: prop with just chardata", - input: "" + - "\n" + - " foo\n" + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "bad: interrupted prop", - input: "" + - "\n" + - " \n", - wantStatus: http.StatusBadRequest, - }, { - desc: "bad: malformed end element prop", - input: "" + - "\n" + - " \n", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: property with chardata value", - input: "" + - "\n" + - " bar\n" + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: property with whitespace value", - input: "" + - "\n" + - " \n" + - "", - wantStatus: http.StatusBadRequest, - }, { - desc: "propfind: bad: include without allprop", - input: "" + - "\n" + - " \n" + - "", - wantStatus: http.StatusBadRequest, - }} - - for _, tc := range testCases { - pf, status, err := readPropfind(strings.NewReader(tc.input)) - if tc.wantStatus != 0 { - if err == nil { - t.Errorf("%s: got nil error, want non-nil", tc.desc) - continue - } - } else if err != nil { - t.Errorf("%s: %v", tc.desc, err) - continue - } - if !reflect.DeepEqual(pf, tc.wantPF) || status != tc.wantStatus { - t.Errorf("%s:\ngot propfind=%v, status=%v\nwant propfind=%v, status=%v", - tc.desc, pf, status, tc.wantPF, tc.wantStatus) - continue - } - } -} - -func TestMultistatusWriter(t *testing.T) { - ///The "section x.y.z" test cases come from section x.y.z of the spec at - // http://www.webdav.org/specs/rfc4918.html - testCases := []struct { - desc string - responses []response - respdesc string - writeHeader bool - wantXML string - wantCode int - wantErr error - }{{ - desc: "section 9.2.2 (failed dependency)", - responses: []response{{ - Href: []string{"http://example.com/foo"}, - Propstat: []propstat{{ - Prop: []Property{{ - XMLName: xml.Name{ - Space: "http://ns.example.com/", - Local: "Authors", - }, - }}, - Status: "HTTP/1.1 424 Failed Dependency", - }, { - Prop: []Property{{ - XMLName: xml.Name{ - Space: "http://ns.example.com/", - Local: "Copyright-Owner", - }, - }}, - Status: "HTTP/1.1 409 Conflict", - }}, - ResponseDescription: "Copyright Owner cannot be deleted or altered.", - }}, - wantXML: `` + - `` + - `` + - ` ` + - ` http://example.com/foo` + - ` ` + - ` ` + - ` ` + - ` ` + - ` HTTP/1.1 424 Failed Dependency` + - ` ` + - ` ` + - ` ` + - ` ` + - ` ` + - ` HTTP/1.1 409 Conflict` + - ` ` + - ` Copyright Owner cannot be deleted or altered.` + - `` + - ``, - wantCode: StatusMulti, - }, { - desc: "section 9.6.2 (lock-token-submitted)", - responses: []response{{ - Href: []string{"http://example.com/foo"}, - Status: "HTTP/1.1 423 Locked", - Error: &xmlError{ - InnerXML: []byte(``), - }, - }}, - wantXML: `` + - `` + - `` + - ` ` + - ` http://example.com/foo` + - ` HTTP/1.1 423 Locked` + - ` ` + - ` ` + - ``, - wantCode: StatusMulti, - }, { - desc: "section 9.1.3", - responses: []response{{ - Href: []string{"http://example.com/foo"}, - Propstat: []propstat{{ - Prop: []Property{{ - XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "bigbox"}, - InnerXML: []byte(`` + - `` + - `Box type A` + - ``), - }, { - XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "author"}, - InnerXML: []byte(`` + - `` + - `J.J. Johnson` + - ``), - }}, - Status: "HTTP/1.1 200 OK", - }, { - Prop: []Property{{ - XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "DingALing"}, - }, { - XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "Random"}, - }}, - Status: "HTTP/1.1 403 Forbidden", - ResponseDescription: "The user does not have access to the DingALing property.", - }}, - }}, - respdesc: "There has been an access violation error.", - wantXML: `` + - `` + - `` + - ` ` + - ` http://example.com/foo` + - ` ` + - ` ` + - ` Box type A` + - ` J.J. Johnson` + - ` ` + - ` HTTP/1.1 200 OK` + - ` ` + - ` ` + - ` ` + - ` ` + - ` ` + - ` ` + - ` HTTP/1.1 403 Forbidden` + - ` The user does not have access to the DingALing property.` + - ` ` + - ` ` + - ` There has been an access violation error.` + - ``, - wantCode: StatusMulti, - }, { - desc: "no response written", - // default of http.responseWriter - wantCode: http.StatusOK, - }, { - desc: "no response written (with description)", - respdesc: "too bad", - // default of http.responseWriter - wantCode: http.StatusOK, - }, { - desc: "empty multistatus with header", - writeHeader: true, - wantXML: ``, - wantCode: StatusMulti, - }, { - desc: "bad: no href", - responses: []response{{ - Propstat: []propstat{{ - Prop: []Property{{ - XMLName: xml.Name{ - Space: "http://example.com/", - Local: "foo", - }, - }}, - Status: "HTTP/1.1 200 OK", - }}, - }}, - wantErr: errInvalidResponse, - // default of http.responseWriter - wantCode: http.StatusOK, - }, { - desc: "bad: multiple hrefs and no status", - responses: []response{{ - Href: []string{"http://example.com/foo", "http://example.com/bar"}, - }}, - wantErr: errInvalidResponse, - // default of http.responseWriter - wantCode: http.StatusOK, - }, { - desc: "bad: one href and no propstat", - responses: []response{{ - Href: []string{"http://example.com/foo"}, - }}, - wantErr: errInvalidResponse, - // default of http.responseWriter - wantCode: http.StatusOK, - }, { - desc: "bad: status with one href and propstat", - responses: []response{{ - Href: []string{"http://example.com/foo"}, - Propstat: []propstat{{ - Prop: []Property{{ - XMLName: xml.Name{ - Space: "http://example.com/", - Local: "foo", - }, - }}, - Status: "HTTP/1.1 200 OK", - }}, - Status: "HTTP/1.1 200 OK", - }}, - wantErr: errInvalidResponse, - // default of http.responseWriter - wantCode: http.StatusOK, - }, { - desc: "bad: multiple hrefs and propstat", - responses: []response{{ - Href: []string{ - "http://example.com/foo", - "http://example.com/bar", - }, - Propstat: []propstat{{ - Prop: []Property{{ - XMLName: xml.Name{ - Space: "http://example.com/", - Local: "foo", - }, - }}, - Status: "HTTP/1.1 200 OK", - }}, - }}, - wantErr: errInvalidResponse, - // default of http.responseWriter - wantCode: http.StatusOK, - }} - - n := xmlNormalizer{omitWhitespace: true} -loop: - for _, tc := range testCases { - rec := httptest.NewRecorder() - w := multistatusWriter{w: rec, responseDescription: tc.respdesc} - if tc.writeHeader { - if err := w.writeHeader(); err != nil { - t.Errorf("%s: got writeHeader error %v, want nil", tc.desc, err) - continue - } - } - for _, r := range tc.responses { - if err := w.write(&r); err != nil { - if err != tc.wantErr { - t.Errorf("%s: got write error %v, want %v", - tc.desc, err, tc.wantErr) - } - continue loop - } - } - if err := w.close(); err != tc.wantErr { - t.Errorf("%s: got close error %v, want %v", - tc.desc, err, tc.wantErr) - continue - } - if rec.Code != tc.wantCode { - t.Errorf("%s: got HTTP status code %d, want %d\n", - tc.desc, rec.Code, tc.wantCode) - continue - } - gotXML := rec.Body.String() - eq, err := n.equalXML(strings.NewReader(gotXML), strings.NewReader(tc.wantXML)) - if err != nil { - t.Errorf("%s: equalXML: %v", tc.desc, err) - continue - } - if !eq { - t.Errorf("%s: XML body\ngot %s\nwant %s", tc.desc, gotXML, tc.wantXML) - } - } -} - -func TestReadProppatch(t *testing.T) { - ppStr := func(pps []Proppatch) string { - var outer []string - for _, pp := range pps { - var inner []string - for _, p := range pp.Props { - inner = append(inner, fmt.Sprintf("{XMLName: %q, Lang: %q, InnerXML: %q}", - p.XMLName, p.Lang, p.InnerXML)) - } - outer = append(outer, fmt.Sprintf("{Remove: %t, Props: [%s]}", - pp.Remove, strings.Join(inner, ", "))) - } - return "[" + strings.Join(outer, ", ") + "]" - } - - testCases := []struct { - desc string - input string - wantPP []Proppatch - wantStatus int - }{{ - desc: "proppatch: section 9.2 (with simple property value)", - input: `` + - `` + - `` + - ` ` + - ` somevalue` + - ` ` + - ` ` + - ` ` + - ` ` + - ``, - wantPP: []Proppatch{{ - Props: []Property{{ - xml.Name{Space: "http://ns.example.com/z/", Local: "Authors"}, - "", - []byte(`somevalue`), - }}, - }, { - Remove: true, - Props: []Property{{ - xml.Name{Space: "http://ns.example.com/z/", Local: "Copyright-Owner"}, - "", - nil, - }}, - }}, - }, { - desc: "proppatch: lang attribute on prop", - input: `` + - `` + - `` + - ` ` + - ` ` + - ` ` + - ` ` + - ` ` + - ``, - wantPP: []Proppatch{{ - Props: []Property{{ - xml.Name{Space: "http://example.com/ns", Local: "foo"}, - "en", - nil, - }}, - }}, - }, { - desc: "bad: remove with value", - input: `` + - `` + - `` + - ` ` + - ` ` + - ` ` + - ` Jim Whitehead` + - ` ` + - ` ` + - ` ` + - ``, - wantStatus: http.StatusBadRequest, - }, { - desc: "bad: empty propertyupdate", - input: `` + - `` + - ``, - wantStatus: http.StatusBadRequest, - }, { - desc: "bad: empty prop", - input: `` + - `` + - `` + - ` ` + - ` ` + - ` ` + - ``, - wantStatus: http.StatusBadRequest, - }} - - for _, tc := range testCases { - pp, status, err := readProppatch(strings.NewReader(tc.input)) - if tc.wantStatus != 0 { - if err == nil { - t.Errorf("%s: got nil error, want non-nil", tc.desc) - continue - } - } else if err != nil { - t.Errorf("%s: %v", tc.desc, err) - continue - } - if status != tc.wantStatus { - t.Errorf("%s: got status %d, want %d", tc.desc, status, tc.wantStatus) - continue - } - if !reflect.DeepEqual(pp, tc.wantPP) || status != tc.wantStatus { - t.Errorf("%s: proppatch\ngot %v\nwant %v", tc.desc, ppStr(pp), ppStr(tc.wantPP)) - } - } -} - -func TestUnmarshalXMLValue(t *testing.T) { - testCases := []struct { - desc string - input string - wantVal string - }{{ - desc: "simple char data", - input: "foo", - wantVal: "foo", - }, { - desc: "empty element", - input: "", - wantVal: "", - }, { - desc: "preserve namespace", - input: ``, - wantVal: ``, - }, { - desc: "preserve root element namespace", - input: ``, - wantVal: ``, - }, { - desc: "preserve whitespace", - input: " \t ", - wantVal: " \t ", - }, { - desc: "preserve mixed content", - input: ` a `, - wantVal: ` a `, - }, { - desc: "section 9.2", - input: `` + - `` + - ` Jim Whitehead` + - ` Roy Fielding` + - ``, - wantVal: `` + - ` Jim Whitehead` + - ` Roy Fielding`, - }, { - desc: "section 4.3.1 (mixed content)", - input: `` + - `` + - ` Jane Doe` + - ` ` + - ` mailto:jane.doe@example.com` + - ` http://www.example.com` + - ` ` + - ` Jane has been working way too long on the` + - ` long-awaited revision of ]]>.` + - ` ` + - ``, - wantVal: `` + - ` Jane Doe` + - ` ` + - ` mailto:jane.doe@example.com` + - ` http://www.example.com` + - ` ` + - ` Jane has been working way too long on the` + - ` long-awaited revision of <RFC2518>.` + - ` `, - }} - - var n xmlNormalizer - for _, tc := range testCases { - d := ixml.NewDecoder(strings.NewReader(tc.input)) - var v xmlValue - if err := d.Decode(&v); err != nil { - t.Errorf("%s: got error %v, want nil", tc.desc, err) - continue - } - eq, err := n.equalXML(bytes.NewReader(v), strings.NewReader(tc.wantVal)) - if err != nil { - t.Errorf("%s: equalXML: %v", tc.desc, err) - continue - } - if !eq { - t.Errorf("%s:\ngot %s\nwant %s", tc.desc, string(v), tc.wantVal) - } - } -} - -// xmlNormalizer normalizes XML. -type xmlNormalizer struct { - // omitWhitespace instructs to ignore whitespace between element tags. - omitWhitespace bool - // omitComments instructs to ignore XML comments. - omitComments bool -} - -// normalize writes the normalized XML content of r to w. It applies the -// following rules -// -// * Rename namespace prefixes according to an internal heuristic. -// * Remove unnecessary namespace declarations. -// * Sort attributes in XML start elements in lexical order of their -// fully qualified name. -// * Remove XML directives and processing instructions. -// * Remove CDATA between XML tags that only contains whitespace, if -// instructed to do so. -// * Remove comments, if instructed to do so. -// -func (n *xmlNormalizer) normalize(w io.Writer, r io.Reader) error { - d := ixml.NewDecoder(r) - e := ixml.NewEncoder(w) - for { - t, err := d.Token() - if err != nil { - if t == nil && err == io.EOF { - break - } - return err - } - switch val := t.(type) { - case ixml.Directive, ixml.ProcInst: - continue - case ixml.Comment: - if n.omitComments { - continue - } - case ixml.CharData: - if n.omitWhitespace && len(bytes.TrimSpace(val)) == 0 { - continue - } - case ixml.StartElement: - start, _ := ixml.CopyToken(val).(ixml.StartElement) - attr := start.Attr[:0] - for _, a := range start.Attr { - if a.Name.Space == "xmlns" || a.Name.Local == "xmlns" { - continue - } - attr = append(attr, a) - } - sort.Sort(byName(attr)) - start.Attr = attr - t = start - } - err = e.EncodeToken(t) - if err != nil { - return err - } - } - return e.Flush() -} - -// equalXML tests for equality of the normalized XML contents of a and b. -func (n *xmlNormalizer) equalXML(a, b io.Reader) (bool, error) { - var buf bytes.Buffer - if err := n.normalize(&buf, a); err != nil { - return false, err - } - normA := buf.String() - buf.Reset() - if err := n.normalize(&buf, b); err != nil { - return false, err - } - normB := buf.String() - return normA == normB, nil -} - -type byName []ixml.Attr - -func (a byName) Len() int { return len(a) } -func (a byName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a byName) Less(i, j int) bool { - if a[i].Name.Space != a[j].Name.Space { - return a[i].Name.Space < a[j].Name.Space - } - return a[i].Name.Local < a[j].Name.Local -} diff --git a/deps/golang.org/x/net/websocket/dial_test.go b/deps/golang.org/x/net/websocket/dial_test.go deleted file mode 100644 index aa03e30dd..000000000 --- a/deps/golang.org/x/net/websocket/dial_test.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "crypto/tls" - "fmt" - "log" - "net" - "net/http/httptest" - "testing" - "time" -) - -// This test depend on Go 1.3+ because in earlier versions the Dialer won't be -// used in TLS connections and a timeout won't be triggered. -func TestDialConfigTLSWithDialer(t *testing.T) { - tlsServer := httptest.NewTLSServer(nil) - tlsServerAddr := tlsServer.Listener.Addr().String() - log.Print("Test TLS WebSocket server listening on ", tlsServerAddr) - defer tlsServer.Close() - config, _ := NewConfig(fmt.Sprintf("wss://%s/echo", tlsServerAddr), "http://localhost") - config.Dialer = &net.Dialer{ - Deadline: time.Now().Add(-time.Minute), - } - config.TlsConfig = &tls.Config{ - InsecureSkipVerify: true, - } - _, err := DialConfig(config) - dialerr, ok := err.(*DialError) - if !ok { - t.Fatalf("DialError expected, got %#v", err) - } - neterr, ok := dialerr.Err.(*net.OpError) - if !ok { - t.Fatalf("net.OpError error expected, got %#v", dialerr.Err) - } - if !neterr.Timeout() { - t.Fatalf("expected timeout error, got %#v", neterr) - } -} diff --git a/deps/golang.org/x/net/websocket/exampledial_test.go b/deps/golang.org/x/net/websocket/exampledial_test.go deleted file mode 100644 index 72bb9d48e..000000000 --- a/deps/golang.org/x/net/websocket/exampledial_test.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket_test - -import ( - "fmt" - "log" - - "golang.org/x/net/websocket" -) - -// This example demonstrates a trivial client. -func ExampleDial() { - origin := "http://localhost/" - url := "ws://localhost:12345/ws" - ws, err := websocket.Dial(url, "", origin) - if err != nil { - log.Fatal(err) - } - if _, err := ws.Write([]byte("hello, world!\n")); err != nil { - log.Fatal(err) - } - var msg = make([]byte, 512) - var n int - if n, err = ws.Read(msg); err != nil { - log.Fatal(err) - } - fmt.Printf("Received: %s.\n", msg[:n]) -} diff --git a/deps/golang.org/x/net/websocket/examplehandler_test.go b/deps/golang.org/x/net/websocket/examplehandler_test.go deleted file mode 100644 index f22a98fcd..000000000 --- a/deps/golang.org/x/net/websocket/examplehandler_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket_test - -import ( - "io" - "net/http" - - "golang.org/x/net/websocket" -) - -// Echo the data received on the WebSocket. -func EchoServer(ws *websocket.Conn) { - io.Copy(ws, ws) -} - -// This example demonstrates a trivial echo server. -func ExampleHandler() { - http.Handle("/echo", websocket.Handler(EchoServer)) - err := http.ListenAndServe(":12345", nil) - if err != nil { - panic("ListenAndServe: " + err.Error()) - } -} diff --git a/deps/golang.org/x/net/websocket/hybi_test.go b/deps/golang.org/x/net/websocket/hybi_test.go deleted file mode 100644 index 9504aa2d3..000000000 --- a/deps/golang.org/x/net/websocket/hybi_test.go +++ /dev/null @@ -1,608 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bufio" - "bytes" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "testing" -) - -// Test the getNonceAccept function with values in -// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 -func TestSecWebSocketAccept(t *testing.T) { - nonce := []byte("dGhlIHNhbXBsZSBub25jZQ==") - expected := []byte("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=") - accept, err := getNonceAccept(nonce) - if err != nil { - t.Errorf("getNonceAccept: returned error %v", err) - return - } - if !bytes.Equal(expected, accept) { - t.Errorf("getNonceAccept: expected %q got %q", expected, accept) - } -} - -func TestHybiClientHandshake(t *testing.T) { - type test struct { - url, host string - } - tests := []test{ - {"ws://server.example.com/chat", "server.example.com"}, - {"ws://127.0.0.1/chat", "127.0.0.1"}, - } - if _, err := url.ParseRequestURI("http://[fe80::1%25lo0]"); err == nil { - tests = append(tests, test{"ws://[fe80::1%25lo0]/chat", "[fe80::1]"}) - } - - for _, tt := range tests { - var b bytes.Buffer - bw := bufio.NewWriter(&b) - br := bufio.NewReader(strings.NewReader(`HTTP/1.1 101 Switching Protocols -Upgrade: websocket -Connection: Upgrade -Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= -Sec-WebSocket-Protocol: chat - -`)) - var err error - var config Config - config.Location, err = url.ParseRequestURI(tt.url) - if err != nil { - t.Fatal("location url", err) - } - config.Origin, err = url.ParseRequestURI("http://example.com") - if err != nil { - t.Fatal("origin url", err) - } - config.Protocol = append(config.Protocol, "chat") - config.Protocol = append(config.Protocol, "superchat") - config.Version = ProtocolVersionHybi13 - config.handshakeData = map[string]string{ - "key": "dGhlIHNhbXBsZSBub25jZQ==", - } - if err := hybiClientHandshake(&config, br, bw); err != nil { - t.Fatal("handshake", err) - } - req, err := http.ReadRequest(bufio.NewReader(&b)) - if err != nil { - t.Fatal("read request", err) - } - if req.Method != "GET" { - t.Errorf("request method expected GET, but got %s", req.Method) - } - if req.URL.Path != "/chat" { - t.Errorf("request path expected /chat, but got %s", req.URL.Path) - } - if req.Proto != "HTTP/1.1" { - t.Errorf("request proto expected HTTP/1.1, but got %s", req.Proto) - } - if req.Host != tt.host { - t.Errorf("request host expected %s, but got %s", tt.host, req.Host) - } - var expectedHeader = map[string]string{ - "Connection": "Upgrade", - "Upgrade": "websocket", - "Sec-Websocket-Key": config.handshakeData["key"], - "Origin": config.Origin.String(), - "Sec-Websocket-Protocol": "chat, superchat", - "Sec-Websocket-Version": fmt.Sprintf("%d", ProtocolVersionHybi13), - } - for k, v := range expectedHeader { - if req.Header.Get(k) != v { - t.Errorf("%s expected %s, but got %v", k, v, req.Header.Get(k)) - } - } - } -} - -func TestHybiClientHandshakeWithHeader(t *testing.T) { - b := bytes.NewBuffer([]byte{}) - bw := bufio.NewWriter(b) - br := bufio.NewReader(strings.NewReader(`HTTP/1.1 101 Switching Protocols -Upgrade: websocket -Connection: Upgrade -Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= -Sec-WebSocket-Protocol: chat - -`)) - var err error - config := new(Config) - config.Location, err = url.ParseRequestURI("ws://server.example.com/chat") - if err != nil { - t.Fatal("location url", err) - } - config.Origin, err = url.ParseRequestURI("http://example.com") - if err != nil { - t.Fatal("origin url", err) - } - config.Protocol = append(config.Protocol, "chat") - config.Protocol = append(config.Protocol, "superchat") - config.Version = ProtocolVersionHybi13 - config.Header = http.Header(make(map[string][]string)) - config.Header.Add("User-Agent", "test") - - config.handshakeData = map[string]string{ - "key": "dGhlIHNhbXBsZSBub25jZQ==", - } - err = hybiClientHandshake(config, br, bw) - if err != nil { - t.Errorf("handshake failed: %v", err) - } - req, err := http.ReadRequest(bufio.NewReader(b)) - if err != nil { - t.Fatalf("read request: %v", err) - } - if req.Method != "GET" { - t.Errorf("request method expected GET, but got %q", req.Method) - } - if req.URL.Path != "/chat" { - t.Errorf("request path expected /chat, but got %q", req.URL.Path) - } - if req.Proto != "HTTP/1.1" { - t.Errorf("request proto expected HTTP/1.1, but got %q", req.Proto) - } - if req.Host != "server.example.com" { - t.Errorf("request Host expected server.example.com, but got %v", req.Host) - } - var expectedHeader = map[string]string{ - "Connection": "Upgrade", - "Upgrade": "websocket", - "Sec-Websocket-Key": config.handshakeData["key"], - "Origin": config.Origin.String(), - "Sec-Websocket-Protocol": "chat, superchat", - "Sec-Websocket-Version": fmt.Sprintf("%d", ProtocolVersionHybi13), - "User-Agent": "test", - } - for k, v := range expectedHeader { - if req.Header.Get(k) != v { - t.Errorf(fmt.Sprintf("%s expected %q but got %q", k, v, req.Header.Get(k))) - } - } -} - -func TestHybiServerHandshake(t *testing.T) { - config := new(Config) - handshaker := &hybiServerHandshaker{Config: config} - br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 -Host: server.example.com -Upgrade: websocket -Connection: Upgrade -Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== -Origin: http://example.com -Sec-WebSocket-Protocol: chat, superchat -Sec-WebSocket-Version: 13 - -`)) - req, err := http.ReadRequest(br) - if err != nil { - t.Fatal("request", err) - } - code, err := handshaker.ReadHandshake(br, req) - if err != nil { - t.Errorf("handshake failed: %v", err) - } - if code != http.StatusSwitchingProtocols { - t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code) - } - expectedProtocols := []string{"chat", "superchat"} - if fmt.Sprintf("%v", config.Protocol) != fmt.Sprintf("%v", expectedProtocols) { - t.Errorf("protocol expected %q but got %q", expectedProtocols, config.Protocol) - } - b := bytes.NewBuffer([]byte{}) - bw := bufio.NewWriter(b) - - config.Protocol = config.Protocol[:1] - - err = handshaker.AcceptHandshake(bw) - if err != nil { - t.Errorf("handshake response failed: %v", err) - } - expectedResponse := strings.Join([]string{ - "HTTP/1.1 101 Switching Protocols", - "Upgrade: websocket", - "Connection: Upgrade", - "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", - "Sec-WebSocket-Protocol: chat", - "", ""}, "\r\n") - - if b.String() != expectedResponse { - t.Errorf("handshake expected %q but got %q", expectedResponse, b.String()) - } -} - -func TestHybiServerHandshakeNoSubProtocol(t *testing.T) { - config := new(Config) - handshaker := &hybiServerHandshaker{Config: config} - br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 -Host: server.example.com -Upgrade: websocket -Connection: Upgrade -Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== -Origin: http://example.com -Sec-WebSocket-Version: 13 - -`)) - req, err := http.ReadRequest(br) - if err != nil { - t.Fatal("request", err) - } - code, err := handshaker.ReadHandshake(br, req) - if err != nil { - t.Errorf("handshake failed: %v", err) - } - if code != http.StatusSwitchingProtocols { - t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code) - } - if len(config.Protocol) != 0 { - t.Errorf("len(config.Protocol) expected 0, but got %q", len(config.Protocol)) - } - b := bytes.NewBuffer([]byte{}) - bw := bufio.NewWriter(b) - - err = handshaker.AcceptHandshake(bw) - if err != nil { - t.Errorf("handshake response failed: %v", err) - } - expectedResponse := strings.Join([]string{ - "HTTP/1.1 101 Switching Protocols", - "Upgrade: websocket", - "Connection: Upgrade", - "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", - "", ""}, "\r\n") - - if b.String() != expectedResponse { - t.Errorf("handshake expected %q but got %q", expectedResponse, b.String()) - } -} - -func TestHybiServerHandshakeHybiBadVersion(t *testing.T) { - config := new(Config) - handshaker := &hybiServerHandshaker{Config: config} - br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 -Host: server.example.com -Upgrade: websocket -Connection: Upgrade -Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== -Sec-WebSocket-Origin: http://example.com -Sec-WebSocket-Protocol: chat, superchat -Sec-WebSocket-Version: 9 - -`)) - req, err := http.ReadRequest(br) - if err != nil { - t.Fatal("request", err) - } - code, err := handshaker.ReadHandshake(br, req) - if err != ErrBadWebSocketVersion { - t.Errorf("handshake expected err %q but got %q", ErrBadWebSocketVersion, err) - } - if code != http.StatusBadRequest { - t.Errorf("status expected %q but got %q", http.StatusBadRequest, code) - } -} - -func testHybiFrame(t *testing.T, testHeader, testPayload, testMaskedPayload []byte, frameHeader *hybiFrameHeader) { - b := bytes.NewBuffer([]byte{}) - frameWriterFactory := &hybiFrameWriterFactory{bufio.NewWriter(b), false} - w, _ := frameWriterFactory.NewFrameWriter(TextFrame) - w.(*hybiFrameWriter).header = frameHeader - _, err := w.Write(testPayload) - w.Close() - if err != nil { - t.Errorf("Write error %q", err) - } - var expectedFrame []byte - expectedFrame = append(expectedFrame, testHeader...) - expectedFrame = append(expectedFrame, testMaskedPayload...) - if !bytes.Equal(expectedFrame, b.Bytes()) { - t.Errorf("frame expected %q got %q", expectedFrame, b.Bytes()) - } - frameReaderFactory := &hybiFrameReaderFactory{bufio.NewReader(b)} - r, err := frameReaderFactory.NewFrameReader() - if err != nil { - t.Errorf("Read error %q", err) - } - if header := r.HeaderReader(); header == nil { - t.Errorf("no header") - } else { - actualHeader := make([]byte, r.Len()) - n, err := header.Read(actualHeader) - if err != nil { - t.Errorf("Read header error %q", err) - } else { - if n < len(testHeader) { - t.Errorf("header too short %q got %q", testHeader, actualHeader[:n]) - } - if !bytes.Equal(testHeader, actualHeader[:n]) { - t.Errorf("header expected %q got %q", testHeader, actualHeader[:n]) - } - } - } - if trailer := r.TrailerReader(); trailer != nil { - t.Errorf("unexpected trailer %q", trailer) - } - frame := r.(*hybiFrameReader) - if frameHeader.Fin != frame.header.Fin || - frameHeader.OpCode != frame.header.OpCode || - len(testPayload) != int(frame.header.Length) { - t.Errorf("mismatch %v (%d) vs %v", frameHeader, len(testPayload), frame) - } - payload := make([]byte, len(testPayload)) - _, err = r.Read(payload) - if err != nil && err != io.EOF { - t.Errorf("read %v", err) - } - if !bytes.Equal(testPayload, payload) { - t.Errorf("payload %q vs %q", testPayload, payload) - } -} - -func TestHybiShortTextFrame(t *testing.T) { - frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame} - payload := []byte("hello") - testHybiFrame(t, []byte{0x81, 0x05}, payload, payload, frameHeader) - - payload = make([]byte, 125) - testHybiFrame(t, []byte{0x81, 125}, payload, payload, frameHeader) -} - -func TestHybiShortMaskedTextFrame(t *testing.T) { - frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame, - MaskingKey: []byte{0xcc, 0x55, 0x80, 0x20}} - payload := []byte("hello") - maskedPayload := []byte{0xa4, 0x30, 0xec, 0x4c, 0xa3} - header := []byte{0x81, 0x85} - header = append(header, frameHeader.MaskingKey...) - testHybiFrame(t, header, payload, maskedPayload, frameHeader) -} - -func TestHybiShortBinaryFrame(t *testing.T) { - frameHeader := &hybiFrameHeader{Fin: true, OpCode: BinaryFrame} - payload := []byte("hello") - testHybiFrame(t, []byte{0x82, 0x05}, payload, payload, frameHeader) - - payload = make([]byte, 125) - testHybiFrame(t, []byte{0x82, 125}, payload, payload, frameHeader) -} - -func TestHybiControlFrame(t *testing.T) { - payload := []byte("hello") - - frameHeader := &hybiFrameHeader{Fin: true, OpCode: PingFrame} - testHybiFrame(t, []byte{0x89, 0x05}, payload, payload, frameHeader) - - frameHeader = &hybiFrameHeader{Fin: true, OpCode: PingFrame} - testHybiFrame(t, []byte{0x89, 0x00}, nil, nil, frameHeader) - - frameHeader = &hybiFrameHeader{Fin: true, OpCode: PongFrame} - testHybiFrame(t, []byte{0x8A, 0x05}, payload, payload, frameHeader) - - frameHeader = &hybiFrameHeader{Fin: true, OpCode: PongFrame} - testHybiFrame(t, []byte{0x8A, 0x00}, nil, nil, frameHeader) - - frameHeader = &hybiFrameHeader{Fin: true, OpCode: CloseFrame} - payload = []byte{0x03, 0xe8} // 1000 - testHybiFrame(t, []byte{0x88, 0x02}, payload, payload, frameHeader) -} - -func TestHybiLongFrame(t *testing.T) { - frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame} - payload := make([]byte, 126) - testHybiFrame(t, []byte{0x81, 126, 0x00, 126}, payload, payload, frameHeader) - - payload = make([]byte, 65535) - testHybiFrame(t, []byte{0x81, 126, 0xff, 0xff}, payload, payload, frameHeader) - - payload = make([]byte, 65536) - testHybiFrame(t, []byte{0x81, 127, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}, payload, payload, frameHeader) -} - -func TestHybiClientRead(t *testing.T) { - wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o', - 0x89, 0x05, 'h', 'e', 'l', 'l', 'o', // ping - 0x81, 0x05, 'w', 'o', 'r', 'l', 'd'} - br := bufio.NewReader(bytes.NewBuffer(wireData)) - bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) - conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil) - - msg := make([]byte, 512) - n, err := conn.Read(msg) - if err != nil { - t.Errorf("read 1st frame, error %q", err) - } - if n != 5 { - t.Errorf("read 1st frame, expect 5, got %d", n) - } - if !bytes.Equal(wireData[2:7], msg[:n]) { - t.Errorf("read 1st frame %v, got %v", wireData[2:7], msg[:n]) - } - n, err = conn.Read(msg) - if err != nil { - t.Errorf("read 2nd frame, error %q", err) - } - if n != 5 { - t.Errorf("read 2nd frame, expect 5, got %d", n) - } - if !bytes.Equal(wireData[16:21], msg[:n]) { - t.Errorf("read 2nd frame %v, got %v", wireData[16:21], msg[:n]) - } - n, err = conn.Read(msg) - if err == nil { - t.Errorf("read not EOF") - } - if n != 0 { - t.Errorf("expect read 0, got %d", n) - } -} - -func TestHybiShortRead(t *testing.T) { - wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o', - 0x89, 0x05, 'h', 'e', 'l', 'l', 'o', // ping - 0x81, 0x05, 'w', 'o', 'r', 'l', 'd'} - br := bufio.NewReader(bytes.NewBuffer(wireData)) - bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) - conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil) - - step := 0 - pos := 0 - expectedPos := []int{2, 5, 16, 19} - expectedLen := []int{3, 2, 3, 2} - for { - msg := make([]byte, 3) - n, err := conn.Read(msg) - if step >= len(expectedPos) { - if err == nil { - t.Errorf("read not EOF") - } - if n != 0 { - t.Errorf("expect read 0, got %d", n) - } - return - } - pos = expectedPos[step] - endPos := pos + expectedLen[step] - if err != nil { - t.Errorf("read from %d, got error %q", pos, err) - return - } - if n != endPos-pos { - t.Errorf("read from %d, expect %d, got %d", pos, endPos-pos, n) - } - if !bytes.Equal(wireData[pos:endPos], msg[:n]) { - t.Errorf("read from %d, frame %v, got %v", pos, wireData[pos:endPos], msg[:n]) - } - step++ - } -} - -func TestHybiServerRead(t *testing.T) { - wireData := []byte{0x81, 0x85, 0xcc, 0x55, 0x80, 0x20, - 0xa4, 0x30, 0xec, 0x4c, 0xa3, // hello - 0x89, 0x85, 0xcc, 0x55, 0x80, 0x20, - 0xa4, 0x30, 0xec, 0x4c, 0xa3, // ping: hello - 0x81, 0x85, 0xed, 0x83, 0xb4, 0x24, - 0x9a, 0xec, 0xc6, 0x48, 0x89, // world - } - br := bufio.NewReader(bytes.NewBuffer(wireData)) - bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) - conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, new(http.Request)) - - expected := [][]byte{[]byte("hello"), []byte("world")} - - msg := make([]byte, 512) - n, err := conn.Read(msg) - if err != nil { - t.Errorf("read 1st frame, error %q", err) - } - if n != 5 { - t.Errorf("read 1st frame, expect 5, got %d", n) - } - if !bytes.Equal(expected[0], msg[:n]) { - t.Errorf("read 1st frame %q, got %q", expected[0], msg[:n]) - } - - n, err = conn.Read(msg) - if err != nil { - t.Errorf("read 2nd frame, error %q", err) - } - if n != 5 { - t.Errorf("read 2nd frame, expect 5, got %d", n) - } - if !bytes.Equal(expected[1], msg[:n]) { - t.Errorf("read 2nd frame %q, got %q", expected[1], msg[:n]) - } - - n, err = conn.Read(msg) - if err == nil { - t.Errorf("read not EOF") - } - if n != 0 { - t.Errorf("expect read 0, got %d", n) - } -} - -func TestHybiServerReadWithoutMasking(t *testing.T) { - wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o'} - br := bufio.NewReader(bytes.NewBuffer(wireData)) - bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) - conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, new(http.Request)) - // server MUST close the connection upon receiving a non-masked frame. - msg := make([]byte, 512) - _, err := conn.Read(msg) - if err != io.EOF { - t.Errorf("read 1st frame, expect %q, but got %q", io.EOF, err) - } -} - -func TestHybiClientReadWithMasking(t *testing.T) { - wireData := []byte{0x81, 0x85, 0xcc, 0x55, 0x80, 0x20, - 0xa4, 0x30, 0xec, 0x4c, 0xa3, // hello - } - br := bufio.NewReader(bytes.NewBuffer(wireData)) - bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) - conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil) - - // client MUST close the connection upon receiving a masked frame. - msg := make([]byte, 512) - _, err := conn.Read(msg) - if err != io.EOF { - t.Errorf("read 1st frame, expect %q, but got %q", io.EOF, err) - } -} - -// Test the hybiServerHandshaker supports firefox implementation and -// checks Connection request header include (but it's not necessary -// equal to) "upgrade" -func TestHybiServerFirefoxHandshake(t *testing.T) { - config := new(Config) - handshaker := &hybiServerHandshaker{Config: config} - br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 -Host: server.example.com -Upgrade: websocket -Connection: keep-alive, upgrade -Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== -Origin: http://example.com -Sec-WebSocket-Protocol: chat, superchat -Sec-WebSocket-Version: 13 - -`)) - req, err := http.ReadRequest(br) - if err != nil { - t.Fatal("request", err) - } - code, err := handshaker.ReadHandshake(br, req) - if err != nil { - t.Errorf("handshake failed: %v", err) - } - if code != http.StatusSwitchingProtocols { - t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code) - } - b := bytes.NewBuffer([]byte{}) - bw := bufio.NewWriter(b) - - config.Protocol = []string{"chat"} - - err = handshaker.AcceptHandshake(bw) - if err != nil { - t.Errorf("handshake response failed: %v", err) - } - expectedResponse := strings.Join([]string{ - "HTTP/1.1 101 Switching Protocols", - "Upgrade: websocket", - "Connection: Upgrade", - "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", - "Sec-WebSocket-Protocol: chat", - "", ""}, "\r\n") - - if b.String() != expectedResponse { - t.Errorf("handshake expected %q but got %q", expectedResponse, b.String()) - } -} diff --git a/deps/golang.org/x/net/websocket/websocket.go b/deps/golang.org/x/net/websocket/websocket.go index 1f4f7be40..8d46bbd1e 100644 --- a/deps/golang.org/x/net/websocket/websocket.go +++ b/deps/golang.org/x/net/websocket/websocket.go @@ -10,7 +10,7 @@ // // https://godoc.org/github.com/gorilla/websocket // -package websocket // import "golang.org/x/net/websocket" +package websocket import ( "bufio" @@ -241,10 +241,7 @@ func (ws *Conn) Close() error { return err1 } -// IsClientConn reports whether ws is a client-side connection. func (ws *Conn) IsClientConn() bool { return ws.request == nil } - -// IsServerConn reports whether ws is a server-side connection. func (ws *Conn) IsServerConn() bool { return ws.request != nil } // LocalAddr returns the WebSocket Origin for the connection for client, or diff --git a/deps/golang.org/x/net/websocket/websocket_test.go b/deps/golang.org/x/net/websocket/websocket_test.go deleted file mode 100644 index 2054ce85a..000000000 --- a/deps/golang.org/x/net/websocket/websocket_test.go +++ /dev/null @@ -1,665 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package websocket - -import ( - "bytes" - "crypto/rand" - "fmt" - "io" - "log" - "net" - "net/http" - "net/http/httptest" - "net/url" - "reflect" - "runtime" - "strings" - "sync" - "testing" - "time" -) - -var serverAddr string -var once sync.Once - -func echoServer(ws *Conn) { - defer ws.Close() - io.Copy(ws, ws) -} - -type Count struct { - S string - N int -} - -func countServer(ws *Conn) { - defer ws.Close() - for { - var count Count - err := JSON.Receive(ws, &count) - if err != nil { - return - } - count.N++ - count.S = strings.Repeat(count.S, count.N) - err = JSON.Send(ws, count) - if err != nil { - return - } - } -} - -type testCtrlAndDataHandler struct { - hybiFrameHandler -} - -func (h *testCtrlAndDataHandler) WritePing(b []byte) (int, error) { - h.hybiFrameHandler.conn.wio.Lock() - defer h.hybiFrameHandler.conn.wio.Unlock() - w, err := h.hybiFrameHandler.conn.frameWriterFactory.NewFrameWriter(PingFrame) - if err != nil { - return 0, err - } - n, err := w.Write(b) - w.Close() - return n, err -} - -func ctrlAndDataServer(ws *Conn) { - defer ws.Close() - h := &testCtrlAndDataHandler{hybiFrameHandler: hybiFrameHandler{conn: ws}} - ws.frameHandler = h - - go func() { - for i := 0; ; i++ { - var b []byte - if i%2 != 0 { // with or without payload - b = []byte(fmt.Sprintf("#%d-CONTROL-FRAME-FROM-SERVER", i)) - } - if _, err := h.WritePing(b); err != nil { - break - } - if _, err := h.WritePong(b); err != nil { // unsolicited pong - break - } - time.Sleep(10 * time.Millisecond) - } - }() - - b := make([]byte, 128) - for { - n, err := ws.Read(b) - if err != nil { - break - } - if _, err := ws.Write(b[:n]); err != nil { - break - } - } -} - -func subProtocolHandshake(config *Config, req *http.Request) error { - for _, proto := range config.Protocol { - if proto == "chat" { - config.Protocol = []string{proto} - return nil - } - } - return ErrBadWebSocketProtocol -} - -func subProtoServer(ws *Conn) { - for _, proto := range ws.Config().Protocol { - io.WriteString(ws, proto) - } -} - -func startServer() { - http.Handle("/echo", Handler(echoServer)) - http.Handle("/count", Handler(countServer)) - http.Handle("/ctrldata", Handler(ctrlAndDataServer)) - subproto := Server{ - Handshake: subProtocolHandshake, - Handler: Handler(subProtoServer), - } - http.Handle("/subproto", subproto) - server := httptest.NewServer(nil) - serverAddr = server.Listener.Addr().String() - log.Print("Test WebSocket server listening on ", serverAddr) -} - -func newConfig(t *testing.T, path string) *Config { - config, _ := NewConfig(fmt.Sprintf("ws://%s%s", serverAddr, path), "http://localhost") - return config -} - -func TestEcho(t *testing.T) { - once.Do(startServer) - - // websocket.Dial() - client, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal("dialing", err) - } - conn, err := NewClient(newConfig(t, "/echo"), client) - if err != nil { - t.Errorf("WebSocket handshake error: %v", err) - return - } - - msg := []byte("hello, world\n") - if _, err := conn.Write(msg); err != nil { - t.Errorf("Write: %v", err) - } - var actual_msg = make([]byte, 512) - n, err := conn.Read(actual_msg) - if err != nil { - t.Errorf("Read: %v", err) - } - actual_msg = actual_msg[0:n] - if !bytes.Equal(msg, actual_msg) { - t.Errorf("Echo: expected %q got %q", msg, actual_msg) - } - conn.Close() -} - -func TestAddr(t *testing.T) { - once.Do(startServer) - - // websocket.Dial() - client, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal("dialing", err) - } - conn, err := NewClient(newConfig(t, "/echo"), client) - if err != nil { - t.Errorf("WebSocket handshake error: %v", err) - return - } - - ra := conn.RemoteAddr().String() - if !strings.HasPrefix(ra, "ws://") || !strings.HasSuffix(ra, "/echo") { - t.Errorf("Bad remote addr: %v", ra) - } - la := conn.LocalAddr().String() - if !strings.HasPrefix(la, "http://") { - t.Errorf("Bad local addr: %v", la) - } - conn.Close() -} - -func TestCount(t *testing.T) { - once.Do(startServer) - - // websocket.Dial() - client, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal("dialing", err) - } - conn, err := NewClient(newConfig(t, "/count"), client) - if err != nil { - t.Errorf("WebSocket handshake error: %v", err) - return - } - - var count Count - count.S = "hello" - if err := JSON.Send(conn, count); err != nil { - t.Errorf("Write: %v", err) - } - if err := JSON.Receive(conn, &count); err != nil { - t.Errorf("Read: %v", err) - } - if count.N != 1 { - t.Errorf("count: expected %d got %d", 1, count.N) - } - if count.S != "hello" { - t.Errorf("count: expected %q got %q", "hello", count.S) - } - if err := JSON.Send(conn, count); err != nil { - t.Errorf("Write: %v", err) - } - if err := JSON.Receive(conn, &count); err != nil { - t.Errorf("Read: %v", err) - } - if count.N != 2 { - t.Errorf("count: expected %d got %d", 2, count.N) - } - if count.S != "hellohello" { - t.Errorf("count: expected %q got %q", "hellohello", count.S) - } - conn.Close() -} - -func TestWithQuery(t *testing.T) { - once.Do(startServer) - - client, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal("dialing", err) - } - - config := newConfig(t, "/echo") - config.Location, err = url.ParseRequestURI(fmt.Sprintf("ws://%s/echo?q=v", serverAddr)) - if err != nil { - t.Fatal("location url", err) - } - - ws, err := NewClient(config, client) - if err != nil { - t.Errorf("WebSocket handshake: %v", err) - return - } - ws.Close() -} - -func testWithProtocol(t *testing.T, subproto []string) (string, error) { - once.Do(startServer) - - client, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal("dialing", err) - } - - config := newConfig(t, "/subproto") - config.Protocol = subproto - - ws, err := NewClient(config, client) - if err != nil { - return "", err - } - msg := make([]byte, 16) - n, err := ws.Read(msg) - if err != nil { - return "", err - } - ws.Close() - return string(msg[:n]), nil -} - -func TestWithProtocol(t *testing.T) { - proto, err := testWithProtocol(t, []string{"chat"}) - if err != nil { - t.Errorf("SubProto: unexpected error: %v", err) - } - if proto != "chat" { - t.Errorf("SubProto: expected %q, got %q", "chat", proto) - } -} - -func TestWithTwoProtocol(t *testing.T) { - proto, err := testWithProtocol(t, []string{"test", "chat"}) - if err != nil { - t.Errorf("SubProto: unexpected error: %v", err) - } - if proto != "chat" { - t.Errorf("SubProto: expected %q, got %q", "chat", proto) - } -} - -func TestWithBadProtocol(t *testing.T) { - _, err := testWithProtocol(t, []string{"test"}) - if err != ErrBadStatus { - t.Errorf("SubProto: expected %v, got %v", ErrBadStatus, err) - } -} - -func TestHTTP(t *testing.T) { - once.Do(startServer) - - // If the client did not send a handshake that matches the protocol - // specification, the server MUST return an HTTP response with an - // appropriate error code (such as 400 Bad Request) - resp, err := http.Get(fmt.Sprintf("http://%s/echo", serverAddr)) - if err != nil { - t.Errorf("Get: error %#v", err) - return - } - if resp == nil { - t.Error("Get: resp is null") - return - } - if resp.StatusCode != http.StatusBadRequest { - t.Errorf("Get: expected %q got %q", http.StatusBadRequest, resp.StatusCode) - } -} - -func TestTrailingSpaces(t *testing.T) { - // http://code.google.com/p/go/issues/detail?id=955 - // The last runs of this create keys with trailing spaces that should not be - // generated by the client. - once.Do(startServer) - config := newConfig(t, "/echo") - for i := 0; i < 30; i++ { - // body - ws, err := DialConfig(config) - if err != nil { - t.Errorf("Dial #%d failed: %v", i, err) - break - } - ws.Close() - } -} - -func TestDialConfigBadVersion(t *testing.T) { - once.Do(startServer) - config := newConfig(t, "/echo") - config.Version = 1234 - - _, err := DialConfig(config) - - if dialerr, ok := err.(*DialError); ok { - if dialerr.Err != ErrBadProtocolVersion { - t.Errorf("dial expected err %q but got %q", ErrBadProtocolVersion, dialerr.Err) - } - } -} - -func TestDialConfigWithDialer(t *testing.T) { - once.Do(startServer) - config := newConfig(t, "/echo") - config.Dialer = &net.Dialer{ - Deadline: time.Now().Add(-time.Minute), - } - _, err := DialConfig(config) - dialerr, ok := err.(*DialError) - if !ok { - t.Fatalf("DialError expected, got %#v", err) - } - neterr, ok := dialerr.Err.(*net.OpError) - if !ok { - t.Fatalf("net.OpError error expected, got %#v", dialerr.Err) - } - if !neterr.Timeout() { - t.Fatalf("expected timeout error, got %#v", neterr) - } -} - -func TestSmallBuffer(t *testing.T) { - // http://code.google.com/p/go/issues/detail?id=1145 - // Read should be able to handle reading a fragment of a frame. - once.Do(startServer) - - // websocket.Dial() - client, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal("dialing", err) - } - conn, err := NewClient(newConfig(t, "/echo"), client) - if err != nil { - t.Errorf("WebSocket handshake error: %v", err) - return - } - - msg := []byte("hello, world\n") - if _, err := conn.Write(msg); err != nil { - t.Errorf("Write: %v", err) - } - var small_msg = make([]byte, 8) - n, err := conn.Read(small_msg) - if err != nil { - t.Errorf("Read: %v", err) - } - if !bytes.Equal(msg[:len(small_msg)], small_msg) { - t.Errorf("Echo: expected %q got %q", msg[:len(small_msg)], small_msg) - } - var second_msg = make([]byte, len(msg)) - n, err = conn.Read(second_msg) - if err != nil { - t.Errorf("Read: %v", err) - } - second_msg = second_msg[0:n] - if !bytes.Equal(msg[len(small_msg):], second_msg) { - t.Errorf("Echo: expected %q got %q", msg[len(small_msg):], second_msg) - } - conn.Close() -} - -var parseAuthorityTests = []struct { - in *url.URL - out string -}{ - { - &url.URL{ - Scheme: "ws", - Host: "www.google.com", - }, - "www.google.com:80", - }, - { - &url.URL{ - Scheme: "wss", - Host: "www.google.com", - }, - "www.google.com:443", - }, - { - &url.URL{ - Scheme: "ws", - Host: "www.google.com:80", - }, - "www.google.com:80", - }, - { - &url.URL{ - Scheme: "wss", - Host: "www.google.com:443", - }, - "www.google.com:443", - }, - // some invalid ones for parseAuthority. parseAuthority doesn't - // concern itself with the scheme unless it actually knows about it - { - &url.URL{ - Scheme: "http", - Host: "www.google.com", - }, - "www.google.com", - }, - { - &url.URL{ - Scheme: "http", - Host: "www.google.com:80", - }, - "www.google.com:80", - }, - { - &url.URL{ - Scheme: "asdf", - Host: "127.0.0.1", - }, - "127.0.0.1", - }, - { - &url.URL{ - Scheme: "asdf", - Host: "www.google.com", - }, - "www.google.com", - }, -} - -func TestParseAuthority(t *testing.T) { - for _, tt := range parseAuthorityTests { - out := parseAuthority(tt.in) - if out != tt.out { - t.Errorf("got %v; want %v", out, tt.out) - } - } -} - -type closerConn struct { - net.Conn - closed int // count of the number of times Close was called -} - -func (c *closerConn) Close() error { - c.closed++ - return c.Conn.Close() -} - -func TestClose(t *testing.T) { - if runtime.GOOS == "plan9" { - t.Skip("see golang.org/issue/11454") - } - - once.Do(startServer) - - conn, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal("dialing", err) - } - - cc := closerConn{Conn: conn} - - client, err := NewClient(newConfig(t, "/echo"), &cc) - if err != nil { - t.Fatalf("WebSocket handshake: %v", err) - } - - // set the deadline to ten minutes ago, which will have expired by the time - // client.Close sends the close status frame. - conn.SetDeadline(time.Now().Add(-10 * time.Minute)) - - if err := client.Close(); err == nil { - t.Errorf("ws.Close(): expected error, got %v", err) - } - if cc.closed < 1 { - t.Fatalf("ws.Close(): expected underlying ws.rwc.Close to be called > 0 times, got: %v", cc.closed) - } -} - -var originTests = []struct { - req *http.Request - origin *url.URL -}{ - { - req: &http.Request{ - Header: http.Header{ - "Origin": []string{"http://www.example.com"}, - }, - }, - origin: &url.URL{ - Scheme: "http", - Host: "www.example.com", - }, - }, - { - req: &http.Request{}, - }, -} - -func TestOrigin(t *testing.T) { - conf := newConfig(t, "/echo") - conf.Version = ProtocolVersionHybi13 - for i, tt := range originTests { - origin, err := Origin(conf, tt.req) - if err != nil { - t.Error(err) - continue - } - if !reflect.DeepEqual(origin, tt.origin) { - t.Errorf("#%d: got origin %v; want %v", i, origin, tt.origin) - continue - } - } -} - -func TestCtrlAndData(t *testing.T) { - once.Do(startServer) - - c, err := net.Dial("tcp", serverAddr) - if err != nil { - t.Fatal(err) - } - ws, err := NewClient(newConfig(t, "/ctrldata"), c) - if err != nil { - t.Fatal(err) - } - defer ws.Close() - - h := &testCtrlAndDataHandler{hybiFrameHandler: hybiFrameHandler{conn: ws}} - ws.frameHandler = h - - b := make([]byte, 128) - for i := 0; i < 2; i++ { - data := []byte(fmt.Sprintf("#%d-DATA-FRAME-FROM-CLIENT", i)) - if _, err := ws.Write(data); err != nil { - t.Fatalf("#%d: %v", i, err) - } - var ctrl []byte - if i%2 != 0 { // with or without payload - ctrl = []byte(fmt.Sprintf("#%d-CONTROL-FRAME-FROM-CLIENT", i)) - } - if _, err := h.WritePing(ctrl); err != nil { - t.Fatalf("#%d: %v", i, err) - } - n, err := ws.Read(b) - if err != nil { - t.Fatalf("#%d: %v", i, err) - } - if !bytes.Equal(b[:n], data) { - t.Fatalf("#%d: got %v; want %v", i, b[:n], data) - } - } -} - -func TestCodec_ReceiveLimited(t *testing.T) { - const limit = 2048 - var payloads [][]byte - for _, size := range []int{ - 1024, - 2048, - 4096, // receive of this message would be interrupted due to limit - 2048, // this one is to make sure next receive recovers discarding leftovers - } { - b := make([]byte, size) - rand.Read(b) - payloads = append(payloads, b) - } - handlerDone := make(chan struct{}) - limitedHandler := func(ws *Conn) { - defer close(handlerDone) - ws.MaxPayloadBytes = limit - defer ws.Close() - for i, p := range payloads { - t.Logf("payload #%d (size %d, exceeds limit: %v)", i, len(p), len(p) > limit) - var recv []byte - err := Message.Receive(ws, &recv) - switch err { - case nil: - case ErrFrameTooLarge: - if len(p) <= limit { - t.Fatalf("unexpected frame size limit: expected %d bytes of payload having limit at %d", len(p), limit) - } - continue - default: - t.Fatalf("unexpected error: %v (want either nil or ErrFrameTooLarge)", err) - } - if len(recv) > limit { - t.Fatalf("received %d bytes of payload having limit at %d", len(recv), limit) - } - if !bytes.Equal(p, recv) { - t.Fatalf("received payload differs:\ngot:\t%v\nwant:\t%v", recv, p) - } - } - } - server := httptest.NewServer(Handler(limitedHandler)) - defer server.CloseClientConnections() - defer server.Close() - addr := server.Listener.Addr().String() - ws, err := Dial("ws://"+addr+"/", "", "http://localhost/") - if err != nil { - t.Fatal(err) - } - defer ws.Close() - for i, p := range payloads { - if err := Message.Send(ws, p); err != nil { - t.Fatalf("payload #%d (size %d): %v", i, len(p), err) - } - } - <-handlerDone -} diff --git a/deps/golang.org/x/net/xsrftoken/xsrf.go b/deps/golang.org/x/net/xsrftoken/xsrf.go deleted file mode 100644 index bc861e1f3..000000000 --- a/deps/golang.org/x/net/xsrftoken/xsrf.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package xsrftoken provides methods for generating and validating secure XSRF tokens. -package xsrftoken // import "golang.org/x/net/xsrftoken" - -import ( - "crypto/hmac" - "crypto/sha1" - "crypto/subtle" - "encoding/base64" - "fmt" - "strconv" - "strings" - "time" -) - -// Timeout is the duration for which XSRF tokens are valid. -// It is exported so clients may set cookie timeouts that match generated tokens. -const Timeout = 24 * time.Hour - -// clean sanitizes a string for inclusion in a token by replacing all ":"s. -func clean(s string) string { - return strings.Replace(s, ":", "_", -1) -} - -// Generate returns a URL-safe secure XSRF token that expires in 24 hours. -// -// key is a secret key for your application; it must be non-empty. -// userID is an optional unique identifier for the user. -// actionID is an optional action the user is taking (e.g. POSTing to a particular path). -func Generate(key, userID, actionID string) string { - return generateTokenAtTime(key, userID, actionID, time.Now()) -} - -// generateTokenAtTime is like Generate, but returns a token that expires 24 hours from now. -func generateTokenAtTime(key, userID, actionID string, now time.Time) string { - if len(key) == 0 { - panic("zero length xsrf secret key") - } - // Round time up and convert to milliseconds. - milliTime := (now.UnixNano() + 1e6 - 1) / 1e6 - - h := hmac.New(sha1.New, []byte(key)) - fmt.Fprintf(h, "%s:%s:%d", clean(userID), clean(actionID), milliTime) - - // Get the padded base64 string then removing the padding. - tok := string(h.Sum(nil)) - tok = base64.URLEncoding.EncodeToString([]byte(tok)) - tok = strings.TrimRight(tok, "=") - - return fmt.Sprintf("%s:%d", tok, milliTime) -} - -// Valid reports whether a token is a valid, unexpired token returned by Generate. -func Valid(token, key, userID, actionID string) bool { - return validTokenAtTime(token, key, userID, actionID, time.Now()) -} - -// validTokenAtTime reports whether a token is valid at the given time. -func validTokenAtTime(token, key, userID, actionID string, now time.Time) bool { - if len(key) == 0 { - panic("zero length xsrf secret key") - } - // Extract the issue time of the token. - sep := strings.LastIndex(token, ":") - if sep < 0 { - return false - } - millis, err := strconv.ParseInt(token[sep+1:], 10, 64) - if err != nil { - return false - } - issueTime := time.Unix(0, millis*1e6) - - // Check that the token is not expired. - if now.Sub(issueTime) >= Timeout { - return false - } - - // Check that the token is not from the future. - // Allow 1 minute grace period in case the token is being verified on a - // machine whose clock is behind the machine that issued the token. - if issueTime.After(now.Add(1 * time.Minute)) { - return false - } - - expected := generateTokenAtTime(key, userID, actionID, issueTime) - - // Check that the token matches the expected value. - // Use constant time comparison to avoid timing attacks. - return subtle.ConstantTimeCompare([]byte(token), []byte(expected)) == 1 -} diff --git a/deps/golang.org/x/net/xsrftoken/xsrf_test.go b/deps/golang.org/x/net/xsrftoken/xsrf_test.go deleted file mode 100644 index 6c8e7d9b5..000000000 --- a/deps/golang.org/x/net/xsrftoken/xsrf_test.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package xsrftoken - -import ( - "encoding/base64" - "testing" - "time" -) - -const ( - key = "quay" - userID = "12345678" - actionID = "POST /form" -) - -var ( - now = time.Now() - oneMinuteFromNow = now.Add(1 * time.Minute) -) - -func TestValidToken(t *testing.T) { - tok := generateTokenAtTime(key, userID, actionID, now) - if !validTokenAtTime(tok, key, userID, actionID, oneMinuteFromNow) { - t.Error("One second later: Expected token to be valid") - } - if !validTokenAtTime(tok, key, userID, actionID, now.Add(Timeout-1*time.Nanosecond)) { - t.Error("Just before timeout: Expected token to be valid") - } - if !validTokenAtTime(tok, key, userID, actionID, now.Add(-1*time.Minute+1*time.Millisecond)) { - t.Error("One minute in the past: Expected token to be valid") - } -} - -// TestSeparatorReplacement tests that separators are being correctly substituted -func TestSeparatorReplacement(t *testing.T) { - tok := generateTokenAtTime("foo:bar", "baz", "wah", now) - tok2 := generateTokenAtTime("foo", "bar:baz", "wah", now) - if tok == tok2 { - t.Errorf("Expected generated tokens to be different") - } -} - -func TestInvalidToken(t *testing.T) { - invalidTokenTests := []struct { - name, key, userID, actionID string - t time.Time - }{ - {"Bad key", "foobar", userID, actionID, oneMinuteFromNow}, - {"Bad userID", key, "foobar", actionID, oneMinuteFromNow}, - {"Bad actionID", key, userID, "foobar", oneMinuteFromNow}, - {"Expired", key, userID, actionID, now.Add(Timeout + 1*time.Millisecond)}, - {"More than 1 minute from the future", key, userID, actionID, now.Add(-1*time.Nanosecond - 1*time.Minute)}, - } - - tok := generateTokenAtTime(key, userID, actionID, now) - for _, itt := range invalidTokenTests { - if validTokenAtTime(tok, itt.key, itt.userID, itt.actionID, itt.t) { - t.Errorf("%v: Expected token to be invalid", itt.name) - } - } -} - -// TestValidateBadData primarily tests that no unexpected panics are triggered -// during parsing -func TestValidateBadData(t *testing.T) { - badDataTests := []struct { - name, tok string - }{ - {"Invalid Base64", "ASDab24(@)$*=="}, - {"No delimiter", base64.URLEncoding.EncodeToString([]byte("foobar12345678"))}, - {"Invalid time", base64.URLEncoding.EncodeToString([]byte("foobar:foobar"))}, - {"Wrong length", "1234" + generateTokenAtTime(key, userID, actionID, now)}, - } - - for _, bdt := range badDataTests { - if validTokenAtTime(bdt.tok, key, userID, actionID, oneMinuteFromNow) { - t.Errorf("%v: Expected token to be invalid", bdt.name) - } - } -} diff --git a/deps/golang.org/x/tools/CONTRIBUTING.md b/deps/golang.org/x/tools/CONTRIBUTING.md index 88dff59bc..d0485e887 100644 --- a/deps/golang.org/x/tools/CONTRIBUTING.md +++ b/deps/golang.org/x/tools/CONTRIBUTING.md @@ -4,16 +4,15 @@ Go is an open source project. It is the work of hundreds of contributors. We appreciate your help! - ## Filing issues When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: -1. What version of Go are you using (`go version`)? -2. What operating system and processor architecture are you using? -3. What did you do? -4. What did you expect to see? -5. What did you see instead? +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. The gophers there will answer or ask you to file an issue if you've tripped over a bug. @@ -23,9 +22,5 @@ The gophers there will answer or ask you to file an issue if you've tripped over Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) before sending patches. -**We do not accept GitHub pull requests** -(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). - Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file. - diff --git a/deps/golang.org/x/tools/blog/blog.go b/deps/golang.org/x/tools/blog/blog.go index 4055b1b7c..73c184d4b 100644 --- a/deps/golang.org/x/tools/blog/blog.go +++ b/deps/golang.org/x/tools/blog/blog.go @@ -24,7 +24,14 @@ import ( "golang.org/x/tools/present" ) -var validJSONPFunc = regexp.MustCompile(`(?i)^[a-z_][a-z0-9_.]*$`) +var ( + validJSONPFunc = regexp.MustCompile(`(?i)^[a-z_][a-z0-9_.]*$`) + // used to serve relative paths when ServeLocalLinks is enabled. + golangOrgAbsLinkReplacer = strings.NewReplacer( + `href="https://golang.org/pkg`, `href="/pkg`, + `href="https://golang.org/cmd`, `href="/cmd`, + ) +) // Config specifies Server configuration values. type Config struct { @@ -40,7 +47,8 @@ type Config struct { FeedArticles int // Articles to include in Atom and JSON feeds. FeedTitle string // The title of the Atom XML feed - PlayEnabled bool + PlayEnabled bool + ServeLocalLinks bool // rewrite golang.org/{pkg,cmd} links to host-less, relative paths. } // Doc represents an article adorned with presentation data. @@ -191,8 +199,8 @@ func (s *Server) loadDocs(root string) error { if err != nil { return err } - html := new(bytes.Buffer) - err = d.Render(html, s.template.doc) + var html bytes.Buffer + err = d.Render(&html, s.template.doc) if err != nil { return err } @@ -417,7 +425,18 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { d.Doc = doc t = s.template.article } - err := t.ExecuteTemplate(w, "root", d) + var err error + if s.cfg.ServeLocalLinks { + var buf bytes.Buffer + err = t.ExecuteTemplate(&buf, "root", d) + if err != nil { + log.Println(err) + return + } + _, err = golangOrgAbsLinkReplacer.WriteString(w, buf.String()) + } else { + err = t.ExecuteTemplate(w, "root", d) + } if err != nil { log.Println(err) } diff --git a/deps/golang.org/x/tools/blog/blog_test.go b/deps/golang.org/x/tools/blog/blog_test.go new file mode 100644 index 000000000..c84be2a71 --- /dev/null +++ b/deps/golang.org/x/tools/blog/blog_test.go @@ -0,0 +1,44 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package blog + +import ( + "bytes" + "testing" +) + +func TestLinkRewrite(t *testing.T) { + tests := []struct { + input string + output string + }{ + { + `For instance, the bytes package from the standard library exports the Buffer type.`, + `For instance, the bytes package from the standard library exports the Buffer type.`}, + { + `(The gofmt command has a -r flag that provides a syntax-aware search and replace, making large-scale refactoring easier.)`, + `(The gofmt command has a -r flag that provides a syntax-aware search and replace, making large-scale refactoring easier.)`, + }, + { + `BSD license.
    Terms of Service `, + `BSD license.
    Terms of Service `, + }, + { + `For instance, the websocket package from the go.net sub-repository has an import path of "golang.org/x/net/websocket".`, + `For instance, the websocket package from the go.net sub-repository has an import path of "golang.org/x/net/websocket".`, + }, + } + for _, test := range tests { + var buf bytes.Buffer + _, err := golangOrgAbsLinkReplacer.WriteString(&buf, test.input) + if err != nil { + t.Errorf("unexpected error during replacing links. Got: %#v, Want: nil.\n", err) + continue + } + if got, want := buf.String(), test.output; got != want { + t.Errorf("WriteString(%q) = %q. Expected: %q", test.input, got, want) + } + } +} diff --git a/deps/golang.org/x/tools/cmd/callgraph/main.go b/deps/golang.org/x/tools/cmd/callgraph/main.go index 8ef4597c1..204b1160d 100644 --- a/deps/golang.org/x/tools/cmd/callgraph/main.go +++ b/deps/golang.org/x/tools/cmd/callgraph/main.go @@ -37,7 +37,7 @@ import ( "golang.org/x/tools/go/callgraph/cha" "golang.org/x/tools/go/callgraph/rta" "golang.org/x/tools/go/callgraph/static" - "golang.org/x/tools/go/loader" + "golang.org/x/tools/go/packages" "golang.org/x/tools/go/pointer" "golang.org/x/tools/go/ssa" "golang.org/x/tools/go/ssa/ssautil" @@ -67,7 +67,7 @@ const Usage = `callgraph: display the the call graph of a Go program. Usage: - callgraph [-algo=static|cha|rta|pta] [-test] [-format=...] ... + callgraph [-algo=static|cha|rta|pta] [-test] [-format=...] package... Flags: @@ -118,8 +118,6 @@ Flags: import path of the enclosing package. Consult the go/ssa API documentation for details. -` + loader.FromArgsUsage + ` - Examples: Show the call graph of the trivial web server application: @@ -158,7 +156,7 @@ func init() { func main() { flag.Parse() - if err := doCallgraph(&build.Default, *algoFlag, *formatFlag, *testFlag, flag.Args()); err != nil { + if err := doCallgraph("", "", *algoFlag, *formatFlag, *testFlag, flag.Args()); err != nil { fmt.Fprintf(os.Stderr, "callgraph: %s\n", err) os.Exit(1) } @@ -166,28 +164,27 @@ func main() { var stdout io.Writer = os.Stdout -func doCallgraph(ctxt *build.Context, algo, format string, tests bool, args []string) error { - conf := loader.Config{Build: ctxt} - +func doCallgraph(dir, gopath, algo, format string, tests bool, args []string) error { if len(args) == 0 { fmt.Fprintln(os.Stderr, Usage) return nil } - // Use the initial packages from the command line. - _, err := conf.FromArgs(args, tests) - if err != nil { - return err + cfg := &packages.Config{ + Mode: packages.LoadAllSyntax, + Tests: tests, + Dir: dir, } - - // Load, parse and type-check the whole program. - iprog, err := conf.Load() + if gopath != "" { + cfg.Env = append(os.Environ(), "GOPATH="+gopath) // to enable testing + } + initial, err := packages.Load(cfg, args...) if err != nil { return err } // Create and build SSA-form program representation. - prog := ssautil.CreateProgram(iprog, 0) + prog, pkgs := ssautil.Packages(initial, 0) prog.Build() // -- call graph construction ------------------------------------------ @@ -221,7 +218,7 @@ func doCallgraph(ctxt *build.Context, algo, format string, tests bool, args []st } } - mains, err := mainPackages(prog, tests) + mains, err := mainPackages(pkgs) if err != nil { return err } @@ -237,7 +234,7 @@ func doCallgraph(ctxt *build.Context, algo, format string, tests bool, args []st cg = ptares.CallGraph case "rta": - mains, err := mainPackages(prog, tests) + mains, err := mainPackages(pkgs) if err != nil { return err } @@ -305,25 +302,13 @@ func doCallgraph(ctxt *build.Context, algo, format string, tests bool, args []st // mainPackages returns the main packages to analyze. // Each resulting package is named "main" and has a main function. -func mainPackages(prog *ssa.Program, tests bool) ([]*ssa.Package, error) { - pkgs := prog.AllPackages() // TODO(adonovan): use only initial packages - - // If tests, create a "testmain" package for each test. +func mainPackages(pkgs []*ssa.Package) ([]*ssa.Package, error) { var mains []*ssa.Package - if tests { - for _, pkg := range pkgs { - if main := prog.CreateTestMainPackage(pkg); main != nil { - mains = append(mains, main) - } + for _, p := range pkgs { + if p != nil && p.Pkg.Name() == "main" && p.Func("main") != nil { + mains = append(mains, p) } - if mains == nil { - return nil, fmt.Errorf("no tests") - } - return mains, nil } - - // Otherwise, use the main packages. - mains = append(mains, ssautil.MainPackages(pkgs)...) if len(mains) == 0 { return nil, fmt.Errorf("no main packages") } diff --git a/deps/golang.org/x/tools/cmd/callgraph/main_test.go b/deps/golang.org/x/tools/cmd/callgraph/main_test.go index c42f56daf..1d286193a 100644 --- a/deps/golang.org/x/tools/cmd/callgraph/main_test.go +++ b/deps/golang.org/x/tools/cmd/callgraph/main_test.go @@ -5,31 +5,30 @@ // No testdata on Android. // +build !android +// +build go1.11 package main import ( "bytes" "fmt" - "go/build" - "reflect" - "sort" + "path/filepath" "strings" "testing" ) func TestCallgraph(t *testing.T) { - ctxt := build.Default // copy - ctxt.GOPATH = "testdata" - - const format = "{{.Caller}} --> {{.Callee}}" + gopath, err := filepath.Abs("testdata") + if err != nil { + t.Fatal(err) + } for _, test := range []struct { - algo, format string - tests bool - want []string + algo string + tests bool + want []string }{ - {"rta", format, false, []string{ + {"rta", false, []string{ // rta imprecisely shows cross product of {main,main2} x {C,D} `pkg.main --> (pkg.C).f`, `pkg.main --> (pkg.D).f`, @@ -37,7 +36,7 @@ func TestCallgraph(t *testing.T) { `pkg.main2 --> (pkg.C).f`, `pkg.main2 --> (pkg.D).f`, }}, - {"pta", format, false, []string{ + {"pta", false, []string{ // pta distinguishes main->C, main2->D. Also has a root node. ` --> pkg.init`, ` --> pkg.main`, @@ -45,37 +44,42 @@ func TestCallgraph(t *testing.T) { `pkg.main --> pkg.main2`, `pkg.main2 --> (pkg.D).f`, }}, - // tests: main is not called. - {"rta", format, true, []string{ - `pkg$testmain.init --> pkg.init`, + // tests: both the package's main and the test's main are called. + // The callgraph includes all the guts of the "testing" package. + {"rta", true, []string{ + `pkg.test.main --> testing.MainStart`, + `testing.runExample --> pkg.Example`, `pkg.Example --> (pkg.C).f`, + `pkg.main --> (pkg.C).f`, }}, - {"pta", format, true, []string{ - ` --> pkg$testmain.init`, - ` --> pkg.Example`, - `pkg$testmain.init --> pkg.init`, + {"pta", true, []string{ + ` --> pkg.test.main`, + ` --> pkg.main`, + `pkg.test.main --> testing.MainStart`, + `testing.runExample --> pkg.Example`, `pkg.Example --> (pkg.C).f`, + `pkg.main --> (pkg.C).f`, }}, } { + const format = "{{.Caller}} --> {{.Callee}}" stdout = new(bytes.Buffer) - if err := doCallgraph(&ctxt, test.algo, test.format, test.tests, []string{"pkg"}); err != nil { + if err := doCallgraph("testdata/src", gopath, test.algo, format, test.tests, []string{"pkg"}); err != nil { t.Error(err) continue } - got := sortedLines(fmt.Sprint(stdout)) - if !reflect.DeepEqual(got, test.want) { - t.Errorf("callgraph(%q, %q, %t):\ngot:\n%s\nwant:\n%s", - test.algo, test.format, test.tests, - strings.Join(got, "\n"), - strings.Join(test.want, "\n")) + edges := make(map[string]bool) + for _, line := range strings.Split(fmt.Sprint(stdout), "\n") { + edges[line] = true + } + for _, edge := range test.want { + if !edges[edge] { + t.Errorf("callgraph(%q, %t): missing edge: %s", + test.algo, test.tests, edge) + } + } + if t.Failed() { + t.Log("got:\n", stdout) } } } - -func sortedLines(s string) []string { - s = strings.TrimSpace(s) - lines := strings.Split(s, "\n") - sort.Strings(lines) - return lines -} diff --git a/deps/golang.org/x/tools/cmd/callgraph/testdata/src/pkg/pkg_test.go b/deps/golang.org/x/tools/cmd/callgraph/testdata/src/pkg/pkg_test.go index d6247577b..0dae2c310 100644 --- a/deps/golang.org/x/tools/cmd/callgraph/testdata/src/pkg/pkg_test.go +++ b/deps/golang.org/x/tools/cmd/callgraph/testdata/src/pkg/pkg_test.go @@ -1,7 +1,10 @@ package main -// Don't import "testing", it adds a lot of callgraph edges. +// An Example function must have an "Output:" comment for the go build +// system to generate a call to it from the test main package. func Example() { C(0).f() + + // Output: } diff --git a/deps/golang.org/x/tools/cmd/compilebench/main.go b/deps/golang.org/x/tools/cmd/compilebench/main.go index d2cd70b21..4d3b74ef7 100644 --- a/deps/golang.org/x/tools/cmd/compilebench/main.go +++ b/deps/golang.org/x/tools/cmd/compilebench/main.go @@ -67,9 +67,9 @@ package main import ( "bytes" + "encoding/json" "flag" "fmt" - "go/build" "io/ioutil" "log" "os" @@ -144,6 +144,7 @@ func main() { log.Fatalf("%s env GOROOT: %v", *flagGoCmd, err) } goroot = strings.TrimSpace(string(s)) + os.Setenv("GOROOT", goroot) // for any subcommands compiler = *flagCompiler if compiler == "" { @@ -250,11 +251,28 @@ func runBuild(name, dir string, count int) { return } - pkg, err := build.Import(dir, ".", 0) + // Make sure dependencies needed by go tool compile are installed to GOROOT/pkg. + out, err := exec.Command(*flagGoCmd, "build", "-i", dir).CombinedOutput() if err != nil { - log.Print(err) + log.Printf("go build -i %s: %v\n%s", dir, err, out) return } + + // Find dir and source file list. + var pkg struct { + Dir string + GoFiles []string + } + out, err = exec.Command(*flagGoCmd, "list", "-json", dir).Output() + if err != nil { + log.Printf("go list -json %s: %v\n", dir, err) + return + } + if err := json.Unmarshal(out, &pkg); err != nil { + log.Printf("go list -json %s: unmarshal: %v", dir, err) + return + } + args := []string{"-o", "_compilebench_.o"} if is6g { *flagMemprofilerate = -1 diff --git a/deps/golang.org/x/tools/cmd/digraph/digraph.go b/deps/golang.org/x/tools/cmd/digraph/digraph.go index 3ad295001..8ef2e45ef 100644 --- a/deps/golang.org/x/tools/cmd/digraph/digraph.go +++ b/deps/golang.org/x/tools/cmd/digraph/digraph.go @@ -8,7 +8,7 @@ // // TODO(adonovan): // - support input files other than stdin -// - suport alternative formats (AT&T GraphViz, CSV, etc), +// - support alternative formats (AT&T GraphViz, CSV, etc), // a comment syntax, etc. // - allow queries to nest, like Blaze query language. // @@ -89,11 +89,12 @@ Example usage: ` func main() { + flag.Usage = func() { fmt.Fprintln(os.Stderr, Usage) } flag.Parse() args := flag.Args() if len(args) == 0 { - fmt.Println(Usage) + fmt.Fprintln(os.Stderr, Usage) return } diff --git a/deps/golang.org/x/tools/cmd/godex/print.go b/deps/golang.org/x/tools/cmd/godex/print.go index adce86462..1bb5214ed 100644 --- a/deps/golang.org/x/tools/cmd/godex/print.go +++ b/deps/golang.org/x/tools/cmd/godex/print.go @@ -7,7 +7,7 @@ package main import ( "bytes" "fmt" - exact "go/constant" + "go/constant" "go/token" "go/types" "io" @@ -213,9 +213,9 @@ func (p *printer) printDecl(keyword string, n int, printGroup func()) { // absInt returns the absolute value of v as a *big.Int. // v must be a numeric value. -func absInt(v exact.Value) *big.Int { +func absInt(v constant.Value) *big.Int { // compute big-endian representation of v - b := exact.Bytes(v) // little-endian + b := constant.Bytes(v) // little-endian for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { b[i], b[j] = b[j], b[i] } @@ -229,14 +229,14 @@ var ( // floatString returns the string representation for a // numeric value v in normalized floating-point format. -func floatString(v exact.Value) string { - if exact.Sign(v) == 0 { +func floatString(v constant.Value) string { + if constant.Sign(v) == 0 { return "0.0" } // x != 0 // convert |v| into a big.Rat x - x := new(big.Rat).SetFrac(absInt(exact.Num(v)), absInt(exact.Denom(v))) + x := new(big.Rat).SetFrac(absInt(constant.Num(v)), absInt(constant.Denom(v))) // normalize x and determine exponent e // (This is not very efficient, but also not speed-critical.) @@ -272,7 +272,7 @@ func floatString(v exact.Value) string { if e != 0 { s += fmt.Sprintf("e%+d", e) } - if exact.Sign(v) < 0 { + if constant.Sign(v) < 0 { s = "-" + s } @@ -286,29 +286,29 @@ func floatString(v exact.Value) string { // valString returns the string representation for the value v. // Setting floatFmt forces an integer value to be formatted in // normalized floating-point format. -// TODO(gri) Move this code into package exact. -func valString(v exact.Value, floatFmt bool) string { +// TODO(gri) Move this code into package constant. +func valString(v constant.Value, floatFmt bool) string { switch v.Kind() { - case exact.Int: + case constant.Int: if floatFmt { return floatString(v) } - case exact.Float: + case constant.Float: return floatString(v) - case exact.Complex: - re := exact.Real(v) - im := exact.Imag(v) + case constant.Complex: + re := constant.Real(v) + im := constant.Imag(v) var s string - if exact.Sign(re) != 0 { + if constant.Sign(re) != 0 { s = floatString(re) - if exact.Sign(im) >= 0 { + if constant.Sign(im) >= 0 { s += " + " } else { s += " - " - im = exact.UnaryOp(token.SUB, im, 0) // negate im + im = constant.UnaryOp(token.SUB, im, 0) // negate im } } - // im != 0, otherwise v would be exact.Int or exact.Float + // im != 0, otherwise v would be constant.Int or constant.Float return s + floatString(im) + "i" } return v.String() diff --git a/deps/golang.org/x/tools/cmd/godoc/autocert.go b/deps/golang.org/x/tools/cmd/godoc/autocert.go index 9fc3a8fc5..9c2da414a 100644 --- a/deps/golang.org/x/tools/cmd/godoc/autocert.go +++ b/deps/golang.org/x/tools/cmd/godoc/autocert.go @@ -32,21 +32,28 @@ var ( ) func init() { - serveAutoCertHook = serveAutoCert + runHTTPS = runHTTPSAutocert + certInit = certInitAutocert + wrapHTTPMux = wrapHTTPMuxAutocert } -func serveAutoCert(h http.Handler) error { - m := autocert.Manager{ +var autocertManager *autocert.Manager + +func certInitAutocert() { + autocertManager = &autocert.Manager{ Cache: autocert.DirCache(*autoCertDirFlag), Prompt: autocert.AcceptTOS, } if *autoCertHostFlag != "" { - m.HostPolicy = autocert.HostWhitelist(*autoCertHostFlag) + autocertManager.HostPolicy = autocert.HostWhitelist(*autoCertHostFlag) } +} + +func runHTTPSAutocert(h http.Handler) error { srv := &http.Server{ Handler: h, TLSConfig: &tls.Config{ - GetCertificate: m.GetCertificate, + GetCertificate: autocertManager.GetCertificate, }, IdleTimeout: 60 * time.Second, } @@ -58,6 +65,10 @@ func serveAutoCert(h http.Handler) error { return srv.Serve(tls.NewListener(tcpKeepAliveListener{ln.(*net.TCPListener)}, srv.TLSConfig)) } +func wrapHTTPMuxAutocert(h http.Handler) http.Handler { + return autocertManager.HTTPHandler(h) +} + // tcpKeepAliveListener sets TCP keep-alive timeouts on accepted // connections. It's used by ListenAndServe and ListenAndServeTLS so // dead TCP connections (e.g. closing laptop mid-download) eventually diff --git a/deps/golang.org/x/tools/cmd/godoc/blog.go b/deps/golang.org/x/tools/cmd/godoc/blog.go index dec4732fc..42abeb691 100644 --- a/deps/golang.org/x/tools/cmd/godoc/blog.go +++ b/deps/golang.org/x/tools/cmd/godoc/blog.go @@ -21,7 +21,7 @@ import ( const ( blogRepo = "golang.org/x/blog" - blogURL = "http://blog.golang.org/" + blogURL = "https://blog.golang.org/" blogPath = "/blog/" ) @@ -34,16 +34,19 @@ var ( func init() { // Initialize blog only when first accessed. http.HandleFunc(blogPath, func(w http.ResponseWriter, r *http.Request) { - blogInitOnce.Do(blogInit) + blogInitOnce.Do(func() { + blogInit(r.Host) + }) blogServer.ServeHTTP(w, r) }) } -func blogInit() { - // Binary distributions will include the blog content in "/blog". +func blogInit(host string) { + // Binary distributions included the blog content in "/blog". + // We stopped including this in Go 1.11. root := filepath.Join(runtime.GOROOT(), "blog") - // Prefer content from go.blog repository if present. + // Prefer content from the golang.org/x/blog repository if present. if pkg, err := build.Import(blogRepo, "", build.FindOnly); err == nil { root = pkg.Dir } @@ -57,12 +60,13 @@ func blogInit() { } s, err := blog.NewServer(blog.Config{ - BaseURL: blogPath, - BasePath: strings.TrimSuffix(blogPath, "/"), - ContentPath: filepath.Join(root, "content"), - TemplatePath: filepath.Join(root, "template"), - HomeArticles: 5, - PlayEnabled: playEnabled, + BaseURL: blogPath, + BasePath: strings.TrimSuffix(blogPath, "/"), + ContentPath: filepath.Join(root, "content"), + TemplatePath: filepath.Join(root, "template"), + HomeArticles: 5, + PlayEnabled: playEnabled, + ServeLocalLinks: strings.HasPrefix(host, "localhost"), }) if err != nil { log.Fatal(err) diff --git a/deps/golang.org/x/tools/cmd/godoc/godoc_test.go b/deps/golang.org/x/tools/cmd/godoc/godoc_test.go index a2552d9dd..b967e2837 100644 --- a/deps/golang.org/x/tools/cmd/godoc/godoc_test.go +++ b/deps/golang.org/x/tools/cmd/godoc/godoc_test.go @@ -8,6 +8,7 @@ import ( "bufio" "bytes" "fmt" + "go/build" "io" "io/ioutil" "net" @@ -202,6 +203,17 @@ func waitForServer(t *testing.T, url, match string, timeout time.Duration, rever t.Fatalf("Server failed to respond in %v", timeout) } +// hasTag checks whether a given release tag is contained in the current version +// of the go binary. +func hasTag(t string) bool { + for _, v := range build.Default.ReleaseTags { + if t == v { + return true + } + } + return false +} + func killAndWait(cmd *exec.Cmd) { cmd.Process.Kill() cmd.Wait() @@ -236,7 +248,12 @@ func testWeb(t *testing.T, withIndex bool) { cmd.Stdout = os.Stderr cmd.Stderr = os.Stderr cmd.Args[0] = "godoc" - cmd.Env = godocEnv() + + // Set GOPATH variable to non-existing path. + // We cannot just unset GOPATH variable because godoc would default it to ~/go. + // (We don't want the indexer looking at the local workspace during tests.) + cmd.Env = append(os.Environ(), "GOPATH=does_not_exist") + if err := cmd.Start(); err != nil { t.Fatalf("failed to start godoc: %s", err) } @@ -250,71 +267,109 @@ func testWeb(t *testing.T, withIndex bool) { } tests := []struct { - path string - match []string - dontmatch []string - needIndex bool + path string + contains []string // substring + match []string // regexp + notContains []string + needIndex bool + releaseTag string // optional release tag that must be in go/build.ReleaseTags }{ { - path: "/", - match: []string{"Go is an open source programming language"}, + path: "/", + contains: []string{"Go is an open source programming language"}, }, { - path: "/pkg/fmt/", - match: []string{"Package fmt implements formatted I/O"}, + path: "/pkg/fmt/", + contains: []string{"Package fmt implements formatted I/O"}, }, { - path: "/src/fmt/", - match: []string{"scan_test.go"}, + path: "/src/fmt/", + contains: []string{"scan_test.go"}, }, { - path: "/src/fmt/print.go", - match: []string{"// Println formats using"}, + path: "/src/fmt/print.go", + contains: []string{"// Println formats using"}, }, { path: "/pkg", - match: []string{ + contains: []string{ "Standard library", "Package fmt implements formatted I/O", }, - dontmatch: []string{ + notContains: []string{ "internal/syscall", "cmd/gc", }, }, { path: "/pkg/?m=all", - match: []string{ + contains: []string{ "Standard library", "Package fmt implements formatted I/O", "internal/syscall/?m=all", }, - dontmatch: []string{ + notContains: []string{ "cmd/gc", }, }, { path: "/search?q=ListenAndServe", - match: []string{ + contains: []string{ "/src", }, - dontmatch: []string{ + notContains: []string{ "/pkg/bootstrap", }, needIndex: true, }, { path: "/pkg/strings/", - match: []string{ + contains: []string{ `href="/src/strings/strings.go"`, }, }, { path: "/cmd/compile/internal/amd64/", - match: []string{ + contains: []string{ `href="/src/cmd/compile/internal/amd64/ssa.go"`, }, }, + { + path: "/pkg/math/bits/", + contains: []string{ + `Added in Go 1.9`, + }, + }, + { + path: "/pkg/net/", + contains: []string{ + `// IPv6 scoped addressing zone; added in Go 1.1`, + }, + }, + { + path: "/pkg/net/http/httptrace/", + match: []string{ + `Got1xxResponse.*// Go 1\.11`, + }, + releaseTag: "go1.11", + }, + // Verify we don't add version info to a struct field added the same time + // as the struct itself: + { + path: "/pkg/net/http/httptrace/", + match: []string{ + `(?m)GotFirstResponseByte func\(\)\s*$`, + }, + }, + // Remove trailing periods before adding semicolons: + { + path: "/pkg/database/sql/", + contains: []string{ + "The number of connections currently in use; added in Go 1.11", + "The number of idle connections; added in Go 1.11", + }, + releaseTag: "go1.11", + }, } for _, test := range tests { if test.needIndex && !withIndex { @@ -327,18 +382,34 @@ func testWeb(t *testing.T, withIndex bool) { continue } body, err := ioutil.ReadAll(resp.Body) + strBody := string(body) resp.Body.Close() if err != nil { t.Errorf("GET %s: failed to read body: %s (response: %v)", url, err, resp) } isErr := false - for _, substr := range test.match { + for _, substr := range test.contains { + if test.releaseTag != "" && !hasTag(test.releaseTag) { + continue + } if !bytes.Contains(body, []byte(substr)) { t.Errorf("GET %s: wanted substring %q in body", url, substr) isErr = true } } - for _, substr := range test.dontmatch { + for _, re := range test.match { + if test.releaseTag != "" && !hasTag(test.releaseTag) { + continue + } + if ok, err := regexp.MatchString(re, strBody); !ok || err != nil { + if err != nil { + t.Fatalf("Bad regexp %q: %v", re, err) + } + t.Errorf("GET %s: wanted to match %s in body", url, re) + isErr = true + } + } + for _, substr := range test.notContains { if bytes.Contains(body, []byte(substr)) { t.Errorf("GET %s: didn't want substring %q in body", url, substr) isErr = true @@ -390,14 +461,9 @@ func main() { print(lib.V) } defer cleanup() addr := serverAddress(t) cmd := exec.Command(bin, fmt.Sprintf("-http=%s", addr), "-analysis=type") + cmd.Env = os.Environ() cmd.Env = append(cmd.Env, fmt.Sprintf("GOROOT=%s", filepath.Join(tmpdir, "goroot"))) cmd.Env = append(cmd.Env, fmt.Sprintf("GOPATH=%s", filepath.Join(tmpdir, "gopath"))) - for _, e := range os.Environ() { - if strings.HasPrefix(e, "GOROOT=") || strings.HasPrefix(e, "GOPATH=") { - continue - } - cmd.Env = append(cmd.Env, e) - } cmd.Stdout = os.Stderr stderr, err := cmd.StderrPipe() if err != nil { @@ -475,15 +541,3 @@ tryagain: } } } - -// godocEnv returns the process environment without the GOPATH variable. -// (We don't want the indexer looking at the local workspace during tests.) -func godocEnv() (env []string) { - for _, v := range os.Environ() { - if strings.HasPrefix(v, "GOPATH=") { - continue - } - env = append(env, v) - } - return -} diff --git a/deps/golang.org/x/tools/cmd/godoc/goroot.go b/deps/golang.org/x/tools/cmd/godoc/goroot.go new file mode 100644 index 000000000..998e86936 --- /dev/null +++ b/deps/golang.org/x/tools/cmd/godoc/goroot.go @@ -0,0 +1,74 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "os" + "path/filepath" + "runtime" +) + +// Copies of functions from src/cmd/go/internal/cfg/cfg.go for +// finding the GOROOT. +// Keep them in sync until support is moved to a common place, if ever. + +func findGOROOT() string { + if env := os.Getenv("GOROOT"); env != "" { + return filepath.Clean(env) + } + def := filepath.Clean(runtime.GOROOT()) + if runtime.Compiler == "gccgo" { + // gccgo has no real GOROOT, and it certainly doesn't + // depend on the executable's location. + return def + } + exe, err := os.Executable() + if err == nil { + exe, err = filepath.Abs(exe) + if err == nil { + if dir := filepath.Join(exe, "../.."); isGOROOT(dir) { + // If def (runtime.GOROOT()) and dir are the same + // directory, prefer the spelling used in def. + if isSameDir(def, dir) { + return def + } + return dir + } + exe, err = filepath.EvalSymlinks(exe) + if err == nil { + if dir := filepath.Join(exe, "../.."); isGOROOT(dir) { + if isSameDir(def, dir) { + return def + } + return dir + } + } + } + } + return def +} + +// isGOROOT reports whether path looks like a GOROOT. +// +// It does this by looking for the path/pkg/tool directory, +// which is necessary for useful operation of the cmd/go tool, +// and is not typically present in a GOPATH. +func isGOROOT(path string) bool { + stat, err := os.Stat(filepath.Join(path, "pkg", "tool")) + if err != nil { + return false + } + return stat.IsDir() +} + +// isSameDir reports whether dir1 and dir2 are the same directory. +func isSameDir(dir1, dir2 string) bool { + if dir1 == dir2 { + return true + } + info1, err1 := os.Stat(dir1) + info2, err2 := os.Stat(dir2) + return err1 == nil && err2 == nil && os.SameFile(info1, info2) +} diff --git a/deps/golang.org/x/tools/cmd/godoc/handlers.go b/deps/golang.org/x/tools/cmd/godoc/handlers.go index 6691ed723..a8447b371 100644 --- a/deps/golang.org/x/tools/cmd/godoc/handlers.go +++ b/deps/golang.org/x/tools/cmd/godoc/handlers.go @@ -55,7 +55,7 @@ func (h hostEnforcerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, r.URL.String(), http.StatusFound) return } - w.Header().Set("Strict-Transport-Security", "max-age=31536000; preload") + w.Header().Set("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload") h.h.ServeHTTP(w, r) } @@ -120,6 +120,7 @@ func readTemplates(p *godoc.Presentation, html bool) { p.ImplementsHTML = readTemplate("implements.html") p.MethodSetHTML = readTemplate("methodset.html") p.PackageHTML = readTemplate("package.html") + p.PackageRootHTML = readTemplate("packageroot.html") p.SearchHTML = readTemplate("search.html") p.SearchDocHTML = readTemplate("searchdoc.html") p.SearchCodeHTML = readTemplate("searchcode.html") diff --git a/deps/golang.org/x/tools/cmd/godoc/main.go b/deps/golang.org/x/tools/cmd/godoc/main.go index 901e992a1..89e9bba8f 100644 --- a/deps/golang.org/x/tools/cmd/godoc/main.go +++ b/deps/golang.org/x/tools/cmd/godoc/main.go @@ -72,6 +72,7 @@ var ( // layout control html = flag.Bool("html", false, "print HTML in command-line mode") srcMode = flag.Bool("src", false, "print (exported) source in command-line mode") + allMode = flag.Bool("all", false, "include unexported identifiers in command-line mode") urlFlag = flag.String("url", "", "print HTML for named URL") // command-line searches @@ -81,7 +82,7 @@ var ( // file system roots // TODO(gri) consider the invariant that goroot always end in '/' - goroot = flag.String("goroot", runtime.GOROOT(), "Go root directory") + goroot = flag.String("goroot", findGOROOT(), "Go root directory") // layout control tabWidth = flag.Int("tabwidth", 4, "tab width") @@ -164,6 +165,10 @@ func main() { flag.Usage = usage flag.Parse() + if certInit != nil { + certInit() + } + playEnabled = *showPlayground // Check usage: server and no args. @@ -178,6 +183,9 @@ func main() { usage() } + // Setting the resolved goroot. + vfs.GOROOT = *goroot + var fsGate chan bool fsGate = make(chan bool, 20) @@ -245,6 +253,10 @@ func main() { } } + // Initialize the version info before readTemplates, which saves + // the map value in a method value. + corpus.InitVersionInfo() + pres = godoc.NewPresentation(corpus) pres.TabWidth = *tabWidth pres.ShowTimestamps = *showTimestamps @@ -253,6 +265,7 @@ func main() { pres.DeclLinks = *declLinks pres.SrcMode = *srcMode pres.HTMLMode = *html + pres.AllMode = *allMode if *notesRx != "" { pres.NotesRx = regexp.MustCompile(*notesRx) } @@ -323,9 +336,9 @@ func main() { go analysis.Run(pointerAnalysis, &corpus.Analysis) } - if serveAutoCertHook != nil { + if runHTTPS != nil { go func() { - if err := serveAutoCertHook(handler); err != nil { + if err := runHTTPS(handler); err != nil { log.Fatalf("ListenAndServe TLS: %v", err) } }() @@ -335,6 +348,9 @@ func main() { if *verbose { log.Println("starting HTTP server") } + if wrapHTTPMux != nil { + handler = wrapHTTPMux(handler) + } if err := http.ListenAndServe(*httpAddr, handler); err != nil { log.Fatalf("ListenAndServe %s: %v", *httpAddr, err) } @@ -347,11 +363,16 @@ func main() { return } + build.Default.GOROOT = *goroot if err := godoc.CommandLine(os.Stdout, fs, pres, flag.Args()); err != nil { log.Print(err) } } -// serveAutoCertHook if non-nil specifies a function to listen on port 443. -// See autocert.go. -var serveAutoCertHook func(http.Handler) error +// Hooks that are set non-nil in autocert.go if the "autocert" build tag +// is used. +var ( + certInit func() + runHTTPS func(http.Handler) error + wrapHTTPMux func(http.Handler) http.Handler +) diff --git a/deps/golang.org/x/tools/cmd/godoc/setup-godoc-app.bash b/deps/golang.org/x/tools/cmd/godoc/setup-godoc-app.bash index f22773898..b50d94744 100755 --- a/deps/golang.org/x/tools/cmd/godoc/setup-godoc-app.bash +++ b/deps/golang.org/x/tools/cmd/godoc/setup-godoc-app.bash @@ -14,7 +14,7 @@ # is consulted to find the $GOROOT. # # The script creates a .zip file representing the $GOROOT file system -# and computes the correspondig search index files. These files are then +# and computes the corresponding search index files. These files are then # copied to $APPDIR. A corresponding godoc configuration file is created # in $APPDIR/appconfig.go. diff --git a/deps/golang.org/x/tools/cmd/godoc/x.go b/deps/golang.org/x/tools/cmd/godoc/x.go index 13e600c7f..0e51ea817 100644 --- a/deps/golang.org/x/tools/cmd/godoc/x.go +++ b/deps/golang.org/x/tools/cmd/godoc/x.go @@ -22,9 +22,9 @@ type xRepo struct { } var xMap = map[string]xRepo{ - "codereview": {"https://code.google.com/p/go.codereview", "hg"}, + "codereview": {"https://code.google.com/p/go.codereview", "hg"}, // Not included at https://golang.org/pkg/#subrepo. - "arch": {"https://go.googlesource.com/arch", "git"}, + "arch": {"https://go.googlesource.com/arch", "git"}, // Not included at https://golang.org/pkg/#subrepo. "benchmarks": {"https://go.googlesource.com/benchmarks", "git"}, "blog": {"https://go.googlesource.com/blog", "git"}, "build": {"https://go.googlesource.com/build", "git"}, @@ -32,20 +32,22 @@ var xMap = map[string]xRepo{ "debug": {"https://go.googlesource.com/debug", "git"}, "exp": {"https://go.googlesource.com/exp", "git"}, "image": {"https://go.googlesource.com/image", "git"}, + "lint": {"https://go.googlesource.com/lint", "git"}, // Not included at https://golang.org/pkg/#subrepo. "mobile": {"https://go.googlesource.com/mobile", "git"}, "net": {"https://go.googlesource.com/net", "git"}, - "oauth2": {"https://go.googlesource.com/oauth2", "git"}, + "oauth2": {"https://go.googlesource.com/oauth2", "git"}, // Not included at https://golang.org/pkg/#subrepo. "perf": {"https://go.googlesource.com/perf", "git"}, - "playground": {"https://go.googlesource.com/playground", "git"}, + "playground": {"https://go.googlesource.com/playground", "git"}, // Not included at https://golang.org/pkg/#subrepo. "review": {"https://go.googlesource.com/review", "git"}, "sync": {"https://go.googlesource.com/sync", "git"}, "sys": {"https://go.googlesource.com/sys", "git"}, - "talks": {"https://go.googlesource.com/talks", "git"}, - "term": {"https://go.googlesource.com/term", "git"}, + "talks": {"https://go.googlesource.com/talks", "git"}, // Not included at https://golang.org/pkg/#subrepo. + "term": {"https://go.googlesource.com/term", "git"}, // Not included at https://golang.org/pkg/#subrepo. "text": {"https://go.googlesource.com/text", "git"}, "time": {"https://go.googlesource.com/time", "git"}, "tools": {"https://go.googlesource.com/tools", "git"}, "tour": {"https://go.googlesource.com/tour", "git"}, + "vgo": {"https://go.googlesource.com/vgo", "git"}, // Not included at https://golang.org/pkg/#subrepo. } func init() { diff --git a/deps/golang.org/x/tools/cmd/goimports/goimports.go b/deps/golang.org/x/tools/cmd/goimports/goimports.go index 16e30834f..0ce85c9c3 100644 --- a/deps/golang.org/x/tools/cmd/goimports/goimports.go +++ b/deps/golang.org/x/tools/cmd/goimports/goimports.go @@ -47,7 +47,7 @@ var ( func init() { flag.BoolVar(&options.AllErrors, "e", false, "report all errors (not just the first 10 on different lines)") - flag.StringVar(&imports.LocalPrefix, "local", "", "put imports beginning with this string after 3rd-party packages") + flag.StringVar(&imports.LocalPrefix, "local", "", "put imports beginning with this string after 3rd-party packages; comma-separated list") } func report(err error) { diff --git a/deps/golang.org/x/tools/cmd/gomvpkg/main.go b/deps/golang.org/x/tools/cmd/gomvpkg/main.go index 959b84ef5..043b0613a 100644 --- a/deps/golang.org/x/tools/cmd/gomvpkg/main.go +++ b/deps/golang.org/x/tools/cmd/gomvpkg/main.go @@ -19,7 +19,7 @@ import ( var ( fromFlag = flag.String("from", "", "Import path of package to be moved") toFlag = flag.String("to", "", "Destination import path for package") - vcsMvCmdFlag = flag.String("vcs_mv_cmd", "", `A template for the version control system's "move directory" command, e.g. "git mv {{.Src}} {{.Dst}}`) + vcsMvCmdFlag = flag.String("vcs_mv_cmd", "", `A template for the version control system's "move directory" command, e.g. "git mv {{.Src}} {{.Dst}}"`) helpFlag = flag.Bool("help", false, "show usage message") ) diff --git a/deps/golang.org/x/tools/cmd/goyacc/yacc.go b/deps/golang.org/x/tools/cmd/goyacc/yacc.go index 062bc47e2..592e551c0 100644 --- a/deps/golang.org/x/tools/cmd/goyacc/yacc.go +++ b/deps/golang.org/x/tools/cmd/goyacc/yacc.go @@ -387,6 +387,8 @@ func setup() { yaccpar = strings.Replace(yaccpartext, "$$", prefix, -1) openup() + fmt.Fprintf(ftable, "// Code generated by goyacc %s. DO NOT EDIT.\n", strings.Join(os.Args[1:], " ")) + defin(0, "$end") extval = PRIVATE // tokens start in unicode 'private use' defin(0, "error") @@ -1412,8 +1414,7 @@ loop: if nnc == '/' { fcode.WriteRune('*') fcode.WriteRune('/') - c = getrune(finput) - break swt + continue loop } ungetrune(finput, nnc) } diff --git a/deps/golang.org/x/tools/cmd/guru/describe.go b/deps/golang.org/x/tools/cmd/guru/describe.go index dd32911de..4975f4cac 100644 --- a/deps/golang.org/x/tools/cmd/guru/describe.go +++ b/deps/golang.org/x/tools/cmd/guru/describe.go @@ -8,7 +8,7 @@ import ( "bytes" "fmt" "go/ast" - exact "go/constant" + "go/constant" "go/token" "go/types" "os" @@ -349,10 +349,10 @@ func describeValue(qpos *queryPos, path []ast.Node) (*describeValueResult, error type describeValueResult struct { qpos *queryPos - expr ast.Expr // query node - typ types.Type // type of expression - constVal exact.Value // value of expression, if constant - obj types.Object // var/func/const object, if expr was Ident + expr ast.Expr // query node + typ types.Type // type of expression + constVal constant.Value // value of expression, if constant + obj types.Object // var/func/const object, if expr was Ident methods []*types.Selection fields []describeField } diff --git a/deps/golang.org/x/tools/cmd/guru/guru.go b/deps/golang.org/x/tools/cmd/guru/guru.go index af3a27d8e..8dea3b537 100644 --- a/deps/golang.org/x/tools/cmd/guru/guru.go +++ b/deps/golang.org/x/tools/cmd/guru/guru.go @@ -75,7 +75,7 @@ type Query struct { PTALog io.Writer // (optional) pointer-analysis log file Reflection bool // model reflection soundly (currently slow). - // result-printing function + // result-printing function, safe for concurrent use Output func(*token.FileSet, QueryResult) } diff --git a/deps/golang.org/x/tools/cmd/guru/guru_test.go b/deps/golang.org/x/tools/cmd/guru/guru_test.go index 34322552f..5a06d09c0 100644 --- a/deps/golang.org/x/tools/cmd/guru/guru_test.go +++ b/deps/golang.org/x/tools/cmd/guru/guru_test.go @@ -6,7 +6,7 @@ package main_test // This file defines a test framework for guru queries. // -// The files beneath testdata/src/main contain Go programs containing +// The files beneath testdata/src contain Go programs containing // query annotations of the form: // // @verb id "select" @@ -210,6 +210,11 @@ func doQuery(out io.Writer, q *query, json bool) { } func TestGuru(t *testing.T) { + if testing.Short() { + // These tests are super slow. + // TODO: make a lighter version of the tests for short mode? + t.Skipf("skipping in short mode") + } switch runtime.GOOS { case "android": t.Skipf("skipping test on %q (no testdata dir)", runtime.GOOS) @@ -246,60 +251,64 @@ func TestGuru(t *testing.T) { "testdata/src/referrers-json/main.go", "testdata/src/what-json/main.go", } { - if filename == "testdata/src/referrers/main.go" && runtime.GOOS == "plan9" { - // Disable this test on plan9 since it expects a particular - // wording for a "no such file or directory" error. - continue - } - if filename == "testdata/src/alias/alias.go" && !guru.HasAlias { - continue - } - if strings.HasSuffix(filename, "19.go") && !contains(build.Default.ReleaseTags, "go1.9") { - // TODO(adonovan): recombine the 'describe' and 'definition' - // tests once we drop support for go1.8. - continue - } + filename := filename + name := strings.Split(filename, "/")[2] + t.Run(name, func(t *testing.T) { + t.Parallel() + if filename == "testdata/src/referrers/main.go" && runtime.GOOS == "plan9" { + // Disable this test on plan9 since it expects a particular + // wording for a "no such file or directory" error. + t.Skip() + } + if filename == "testdata/src/alias/alias.go" && !guru.HasAlias { + t.Skip() + } + if strings.HasSuffix(filename, "19.go") && !contains(build.Default.ReleaseTags, "go1.9") { + // TODO(adonovan): recombine the 'describe' and 'definition' + // tests once we drop support for go1.8. + t.Skip() + } - json := strings.Contains(filename, "-json/") - queries := parseQueries(t, filename) - golden := filename + "lden" - got := filename + "t" - gotfh, err := os.Create(got) - if err != nil { - t.Errorf("Create(%s) failed: %s", got, err) - continue - } - defer os.Remove(got) - defer gotfh.Close() + json := strings.Contains(filename, "-json/") + queries := parseQueries(t, filename) + golden := filename + "lden" + got := filename + "t" + gotfh, err := os.Create(got) + if err != nil { + t.Fatalf("Create(%s) failed: %s", got, err) + } + defer os.Remove(got) + defer gotfh.Close() - // Run the guru on each query, redirecting its output - // and error (if any) to the foo.got file. - for _, q := range queries { - doQuery(gotfh, q, json) - } + // Run the guru on each query, redirecting its output + // and error (if any) to the foo.got file. + for _, q := range queries { + doQuery(gotfh, q, json) + } - // Compare foo.got with foo.golden. - var cmd *exec.Cmd - switch runtime.GOOS { - case "plan9": - cmd = exec.Command("/bin/diff", "-c", golden, got) - default: - cmd = exec.Command("/usr/bin/diff", "-u", golden, got) - } - buf := new(bytes.Buffer) - cmd.Stdout = buf - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - t.Errorf("Guru tests for %s failed: %s.\n%s\n", - filename, err, buf) - - if *updateFlag { - t.Logf("Updating %s...", golden) - if err := exec.Command("/bin/cp", got, golden).Run(); err != nil { - t.Errorf("Update failed: %s", err) + // Compare foo.got with foo.golden. + var cmd *exec.Cmd + switch runtime.GOOS { + case "plan9": + cmd = exec.Command("/bin/diff", "-c", golden, got) + default: + cmd = exec.Command("/usr/bin/diff", "-u", golden, got) + } + buf := new(bytes.Buffer) + cmd.Stdout = buf + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + t.Errorf("Guru tests for %s failed: %s.\n%s\n", + filename, err, buf) + + if *updateFlag { + t.Logf("Updating %s...", golden) + if err := exec.Command("/bin/cp", got, golden).Run(); err != nil { + t.Errorf("Update failed: %s", err) + } } } - } + }) } } diff --git a/deps/golang.org/x/tools/cmd/guru/main.go b/deps/golang.org/x/tools/cmd/guru/main.go index 761828a09..8e4af004a 100644 --- a/deps/golang.org/x/tools/cmd/guru/main.go +++ b/deps/golang.org/x/tools/cmd/guru/main.go @@ -19,6 +19,8 @@ import ( "io" "log" "os" + "path/filepath" + "runtime" "runtime/pprof" "strings" "sync" @@ -38,6 +40,14 @@ var ( func init() { flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsFlagDoc) + + // gccgo does not provide a GOROOT with standard library sources. + // If we have one in the environment, force gc mode. + if build.Default.Compiler == "gccgo" { + if _, err := os.Stat(filepath.Join(runtime.GOROOT(), "src", "runtime", "runtime.go")); err == nil { + build.Default.Compiler = "gc" + } + } } const useHelp = "Run 'guru -help' for more information.\n" diff --git a/deps/golang.org/x/tools/cmd/guru/referrers.go b/deps/golang.org/x/tools/cmd/guru/referrers.go index d6b9df90e..d079e274b 100644 --- a/deps/golang.org/x/tools/cmd/guru/referrers.go +++ b/deps/golang.org/x/tools/cmd/guru/referrers.go @@ -9,17 +9,21 @@ import ( "fmt" "go/ast" "go/build" + "go/parser" "go/token" "go/types" "io" "log" + "os" "sort" + "strconv" "strings" "sync" "golang.org/x/tools/cmd/guru/serial" "golang.org/x/tools/go/buildutil" "golang.org/x/tools/go/loader" + "golang.org/x/tools/imports" "golang.org/x/tools/refactor/importgraph" ) @@ -34,6 +38,12 @@ func referrers(q *Query) error { return err } + // Load tests of the query package + // even if the query location is not in the tests. + for path := range lconf.ImportPkgs { + lconf.ImportPkgs[path] = true + } + // Load/parse/type-check the query package. lprog, err := lconf.Load() if err != nil { @@ -70,23 +80,27 @@ func referrers(q *Query) error { return fmt.Errorf("references to predeclared %q are everywhere!", obj.Name()) } + q.Output(fset, &referrersInitialResult{ + qinfo: qpos.info, + obj: obj, + }) + // For a globally accessible object defined in package P, we // must load packages that depend on P. Specifically, for a // package-level object, we need load only direct importers - // of P, but for a field or interface method, we must load + // of P, but for a field or method, we must load // any package that transitively imports P. + if global, pkglevel := classify(obj); global { + if pkglevel { + return globalReferrersPkgLevel(q, obj, fset) + } // We'll use the the object's position to identify it in the larger program. objposn := fset.Position(obj.Pos()) defpkg := obj.Pkg().Path() // defining package - return globalReferrers(q, qpos.info.Pkg.Path(), defpkg, objposn, pkglevel) + return globalReferrers(q, qpos.info.Pkg.Path(), defpkg, objposn) } - q.Output(fset, &referrersInitialResult{ - qinfo: qpos.info, - obj: obj, - }) - outputUses(q, fset, usesOf(obj, qpos.info), obj.Pkg()) return nil // success @@ -210,26 +224,16 @@ func outputUses(q *Query, fset *token.FileSet, refs []*ast.Ident, pkg *types.Pac } // globalReferrers reports references throughout the entire workspace to the -// object at the specified source position. Its defining package is defpkg, -// and the query package is qpkg. isPkgLevel indicates whether the object -// is defined at package-level. -func globalReferrers(q *Query, qpkg, defpkg string, objposn token.Position, isPkgLevel bool) error { +// object (a field or method) at the specified source position. +// Its defining package is defpkg, and the query package is qpkg. +func globalReferrers(q *Query, qpkg, defpkg string, objposn token.Position) error { // Scan the workspace and build the import graph. // Ignore broken packages. _, rev, _ := importgraph.Build(q.Build) // Find the set of packages that depend on defpkg. // Only function bodies in those packages need type-checking. - var users map[string]bool - if isPkgLevel { - users = rev[defpkg] // direct importers - if users == nil { - users = make(map[string]bool) - } - users[defpkg] = true // plus the defining package itself - } else { - users = rev.Search(defpkg) // transitive importers - } + users := rev.Search(defpkg) // transitive importers // Prepare to load the larger program. fset := token.NewFileSet() @@ -261,9 +265,8 @@ func globalReferrers(q *Query, qpkg, defpkg string, objposn token.Position, isPk // to completion. var ( - mu sync.Mutex - qobj types.Object - qinfo *loader.PackageInfo // info for qpkg + mu sync.Mutex + qobj types.Object ) // For efficiency, we scan each package for references @@ -287,13 +290,6 @@ func globalReferrers(q *Query, qpkg, defpkg string, objposn token.Position, isPk log.Fatalf("object at %s not found in package %s", objposn, defpkg) } - - // Object found. - qinfo = info - q.Output(fset, &referrersInitialResult{ - qinfo: qinfo, - obj: qobj, - }) } obj := qobj mu.Unlock() @@ -316,6 +312,287 @@ func globalReferrers(q *Query, qpkg, defpkg string, objposn token.Position, isPk return nil // success } +// globalReferrersPkgLevel reports references throughout the entire workspace to the package-level object obj. +// It assumes that the query object itself has already been reported. +func globalReferrersPkgLevel(q *Query, obj types.Object, fset *token.FileSet) error { + // globalReferrersPkgLevel uses go/ast and friends instead of go/types. + // This affords a considerable performance benefit. + // It comes at the cost of some code complexity. + // + // Here's a high level summary. + // + // The goal is to find references to the query object p.Q. + // There are several possible scenarios, each handled differently. + // + // 1. We are looking in a package other than p, and p is not dot-imported. + // This is the simplest case. Q must be referred to as n.Q, + // where n is the name under which p is imported. + // We look at all imports of p to gather all names under which it is imported. + // (In the typical case, it is imported only once, under its default name.) + // Then we look at all selector expressions and report any matches. + // + // 2. We are looking in a package other than p, and p is dot-imported. + // In this case, Q will be referred to just as Q. + // Furthermore, go/ast's object resolution will not be able to resolve + // Q to any other object, unlike any local (file- or function- or block-scoped) object. + // So we look at all matching identifiers and report all unresolvable ones. + // + // 3. We are looking in package p. + // (Care must be taken to separate p and p_test (an xtest package), + // and make sure that they are treated as separate packages.) + // In this case, we give go/ast the entire package for object resolution, + // instead of going file by file. + // We then iterate over all identifiers that resolve to the query object. + // (The query object itself has already been reported, so we don't re-report it.) + // + // We always skip all files that don't contain the string Q, as they cannot be + // relevant to finding references to Q. + // + // We parse all files leniently. In the presence of parsing errors, results are best-effort. + + // Scan the workspace and build the import graph. + // Ignore broken packages. + _, rev, _ := importgraph.Build(q.Build) + + // Find the set of packages that directly import defpkg. + defpkg := obj.Pkg().Path() + defpkg = strings.TrimSuffix(defpkg, "_test") // package x_test actually has package name x + defpkg = imports.VendorlessPath(defpkg) // remove vendor goop + + users := rev[defpkg] + if len(users) == 0 { + users = make(map[string]bool) + } + // We also need to check defpkg itself, and its xtests. + // For the reverse graph packages, we process xtests with the main package. + // defpkg gets special handling; we must distinguish between in-package vs out-of-package. + // To make the control flow below simpler, add defpkg and defpkg xtest placeholders. + // Use "!test" instead of "_test" because "!" is not a valid character in an import path. + // (More precisely, it is not guaranteed to be a valid character in an import path, + // so it is unlikely that it will be in use. See https://golang.org/ref/spec#Import_declarations.) + users[defpkg] = true + users[defpkg+"!test"] = true + + cwd, err := os.Getwd() + if err != nil { + return err + } + + defname := obj.Pkg().Name() // name of defining package, used for imports using import path only + isxtest := strings.HasSuffix(defname, "_test") // indicates whether the query object is defined in an xtest package + + name := obj.Name() + namebytes := []byte(name) // byte slice version of query object name, for early filtering + objpos := fset.Position(obj.Pos()) // position of query object, used to prevent re-emitting original decl + + sema := make(chan struct{}, 20) // counting semaphore to limit I/O concurrency + var wg sync.WaitGroup + + for u := range users { + u := u + wg.Add(1) + go func() { + defer wg.Done() + + uIsXTest := strings.HasSuffix(u, "!test") // indicates whether this package is the special defpkg xtest package + u = strings.TrimSuffix(u, "!test") + + // Resolve package. + sema <- struct{}{} // acquire token + pkg, err := q.Build.Import(u, cwd, build.IgnoreVendor) + <-sema // release token + if err != nil { + return + } + + // If we're not in the query package, + // the object is in another package regardless, + // so we want to process all files. + // If we are in the query package, + // we want to only process the files that are + // part of that query package; + // that set depends on whether the query package itself is an xtest. + inQueryPkg := u == defpkg && isxtest == uIsXTest + var files []string + if !inQueryPkg || !isxtest { + files = append(files, pkg.GoFiles...) + files = append(files, pkg.TestGoFiles...) + files = append(files, pkg.CgoFiles...) // use raw cgo files, as we're only parsing + } + if !inQueryPkg || isxtest { + files = append(files, pkg.XTestGoFiles...) + } + + if len(files) == 0 { + return + } + + var deffiles map[string]*ast.File + if inQueryPkg { + deffiles = make(map[string]*ast.File) + } + + buf := new(bytes.Buffer) // reusable buffer for reading files + + for _, file := range files { + if !buildutil.IsAbsPath(q.Build, file) { + file = buildutil.JoinPath(q.Build, pkg.Dir, file) + } + buf.Reset() + sema <- struct{}{} // acquire token + src, err := readFile(q.Build, file, buf) + <-sema // release token + if err != nil { + continue + } + + // Fast path: If the object's name isn't present anywhere in the source, ignore the file. + if !bytes.Contains(src, namebytes) { + continue + } + + if inQueryPkg { + // If we're in the query package, we defer final processing until we have + // parsed all of the candidate files in the package. + // Best effort; allow errors and use what we can from what remains. + f, _ := parser.ParseFile(fset, file, src, parser.AllErrors) + if f != nil { + deffiles[file] = f + } + continue + } + + // We aren't in the query package. Go file by file. + + // Parse out only the imports, to check whether the defining package + // was imported, and if so, under what names. + // Best effort; allow errors and use what we can from what remains. + f, _ := parser.ParseFile(fset, file, src, parser.ImportsOnly|parser.AllErrors) + if f == nil { + continue + } + + // pkgnames is the set of names by which defpkg is imported in this file. + // (Multiple imports in the same file are legal but vanishingly rare.) + pkgnames := make([]string, 0, 1) + var isdotimport bool + for _, imp := range f.Imports { + path, err := strconv.Unquote(imp.Path.Value) + if err != nil || path != defpkg { + continue + } + switch { + case imp.Name == nil: + pkgnames = append(pkgnames, defname) + case imp.Name.Name == ".": + isdotimport = true + default: + pkgnames = append(pkgnames, imp.Name.Name) + } + } + if len(pkgnames) == 0 && !isdotimport { + // Defining package not imported, bail. + continue + } + + // Re-parse the entire file. + // Parse errors are ok; we'll do the best we can with a partial AST, if we have one. + f, _ = parser.ParseFile(fset, file, src, parser.AllErrors) + if f == nil { + continue + } + + // Walk the AST looking for references. + var refs []*ast.Ident + ast.Inspect(f, func(n ast.Node) bool { + // Check selector expressions. + // If the selector matches the target name, + // and the expression is one of the names + // that the defining package was imported under, + // then we have a match. + if sel, ok := n.(*ast.SelectorExpr); ok && sel.Sel.Name == name { + if id, ok := sel.X.(*ast.Ident); ok { + for _, n := range pkgnames { + if n == id.Name { + refs = append(refs, sel.Sel) + // Don't recurse further, to avoid duplicate entries + // from the dot import check below. + return false + } + } + } + } + // Dot imports are special. + // Objects imported from the defining package are placed in the package scope. + // go/ast does not resolve them to an object. + // At all other scopes (file, local), go/ast can do the resolution. + // So we're looking for object-free idents with the right name. + // The only other way to get something with the right name at the package scope + // is to *be* the defining package. We handle that case separately (inQueryPkg). + if isdotimport { + if id, ok := n.(*ast.Ident); ok && id.Obj == nil && id.Name == name { + refs = append(refs, id) + return false + } + } + return true + }) + + // Emit any references we found. + if len(refs) > 0 { + q.Output(fset, &referrersPackageResult{ + pkg: types.NewPackage(pkg.ImportPath, pkg.Name), + build: q.Build, + fset: fset, + refs: refs, + }) + } + } + + // If we're in the query package, we've now collected all the files in the package. + // (Or at least the ones that might contain references to the object.) + // Find and emit refs. + if inQueryPkg { + // Bundle the files together into a package. + // This does package-level object resolution. + qpkg, _ := ast.NewPackage(fset, deffiles, nil, nil) + // Look up the query object; we know that it is defined in the package scope. + pkgobj := qpkg.Scope.Objects[name] + if pkgobj == nil { + panic("missing defpkg object for " + defpkg + "." + name) + } + // Find all references to the query object. + var refs []*ast.Ident + ast.Inspect(qpkg, func(n ast.Node) bool { + if id, ok := n.(*ast.Ident); ok { + // Check both that this is a reference to the query object + // and that it is not the query object itself; + // the query object itself was already emitted. + if id.Obj == pkgobj && objpos != fset.Position(id.Pos()) { + refs = append(refs, id) + return false + } + } + return true + }) + if len(refs) > 0 { + q.Output(fset, &referrersPackageResult{ + pkg: types.NewPackage(pkg.ImportPath, pkg.Name), + build: q.Build, + fset: fset, + refs: refs, + }) + } + deffiles = nil // allow GC + } + }() + } + + wg.Wait() + + return nil +} + // findObject returns the object defined at the specified position. func findObject(fset *token.FileSet, info *types.Info, objposn token.Position) types.Object { good := func(obj types.Object) bool { @@ -453,7 +730,7 @@ func (r *referrersPackageResult) foreachRef(f func(id *ast.Ident, text string)) // start asynchronous read. go func() { sema <- struct{}{} // acquire token - content, err := readFile(r.build, posn.Filename) + content, err := readFile(r.build, posn.Filename, nil) <-sema // release token if err != nil { fi.data <- err @@ -491,14 +768,17 @@ func (r *referrersPackageResult) foreachRef(f func(id *ast.Ident, text string)) // readFile is like ioutil.ReadFile, but // it goes through the virtualized build.Context. -func readFile(ctxt *build.Context, filename string) ([]byte, error) { +// If non-nil, buf must have been reset. +func readFile(ctxt *build.Context, filename string, buf *bytes.Buffer) ([]byte, error) { rc, err := buildutil.OpenFile(ctxt, filename) if err != nil { return nil, err } defer rc.Close() - var buf bytes.Buffer - if _, err := io.Copy(&buf, rc); err != nil { + if buf == nil { + buf = new(bytes.Buffer) + } + if _, err := io.Copy(buf, rc); err != nil { return nil, err } return buf.Bytes(), nil diff --git a/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/int_test.go b/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/int_test.go index 9102cd6f8..397842bd0 100644 --- a/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/int_test.go +++ b/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/int_test.go @@ -5,4 +5,6 @@ import "lib" func _() { // This reference should be found by the ref-method query. _ = (lib.Type).Method // ref from internal test package + + _ = notexported } diff --git a/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.go b/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.go index 1fc80ea22..acaae1fe9 100644 --- a/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.go +++ b/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.go @@ -25,6 +25,8 @@ func main() { s2.f = 1 } +var notexported int // @referrers unexported-from-test "notexported" + // Test //line directives: type U int // @referrers ref-type-U "U" diff --git a/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.golden b/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.golden index 230e95e73..3ac8075ff 100644 --- a/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.golden +++ b/deps/golang.org/x/tools/cmd/guru/testdata/src/referrers/main.golden @@ -33,7 +33,7 @@ type _ lib.T var _ lib.Var // @what pkg "lib" -------- @referrers ref-method -------- -references to func (Type).Method(x *int) *int +references to func (lib.Type).Method(x *int) *int _ = (lib.Type).Method // ref from external test package _ = (lib.Type).Method // ref from internal test package _ = v.Method @@ -54,6 +54,10 @@ references to field f int _ = s{}.f // @referrers ref-field "f" s2.f = 1 +-------- @referrers unexported-from-test -------- +references to var notexported int + _ = notexported + -------- @referrers ref-type-U -------- references to type U int open testdata/src/referrers/nosuchfile.y: no such file or directory (+ 1 more refs in this file) diff --git a/deps/golang.org/x/tools/cmd/present/static/styles.css b/deps/golang.org/x/tools/cmd/present/static/styles.css index 2d8d3544d..bc525591d 100644 --- a/deps/golang.org/x/tools/cmd/present/static/styles.css +++ b/deps/golang.org/x/tools/cmd/present/static/styles.css @@ -415,6 +415,14 @@ p.link { margin-left: 20px; } +.pagenumber { + color: #8c8c8c; + font-size: 75%; + position: absolute; + bottom: 0px; + right: 10px; +} + /* Code */ div.code { outline: 0px solid transparent; diff --git a/deps/golang.org/x/tools/cmd/present/templates/slides.tmpl b/deps/golang.org/x/tools/cmd/present/templates/slides.tmpl index 37484000c..03945d28a 100644 --- a/deps/golang.org/x/tools/cmd/present/templates/slides.tmpl +++ b/deps/golang.org/x/tools/cmd/present/templates/slides.tmpl @@ -62,8 +62,9 @@ {{else}}

    {{$s.Title}}

    {{end}} + {{pagenum $s 1}} - + {{end}}{{/* of Slide block */}}
    diff --git a/deps/golang.org/x/tools/cmd/ssadump/main.go b/deps/golang.org/x/tools/cmd/ssadump/main.go index 8c4dbd120..5dcf92b57 100644 --- a/deps/golang.org/x/tools/cmd/ssadump/main.go +++ b/deps/golang.org/x/tools/cmd/ssadump/main.go @@ -15,7 +15,7 @@ import ( "runtime/pprof" "golang.org/x/tools/go/buildutil" - "golang.org/x/tools/go/loader" + "golang.org/x/tools/go/packages" "golang.org/x/tools/go/ssa" "golang.org/x/tools/go/ssa/interp" "golang.org/x/tools/go/ssa/ssautil" @@ -25,9 +25,9 @@ import ( var ( mode = ssa.BuilderMode(0) - testFlag = flag.Bool("test", false, "Loads test code (*_test.go) for imported packages.") + testFlag = flag.Bool("test", false, "include implicit test packages and executables") - runFlag = flag.Bool("run", false, "Invokes the SSA interpreter on the program.") + runFlag = flag.Bool("run", false, "interpret the SSA program") interpFlag = flag.String("interp", "", `Options controlling the SSA test interpreter. The value is a sequence of zero or more more of these letters: @@ -36,23 +36,25 @@ T [T]race execution of the program. Best for single-threaded programs! `) cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file") + + args stringListValue ) func init() { flag.Var(&mode, "build", ssa.BuilderModeDoc) flag.Var((*buildutil.TagsFlag)(&build.Default.BuildTags), "tags", buildutil.TagsFlagDoc) + flag.Var(&args, "arg", "add argument to interpreted program") } const usage = `SSA builder and interpreter. -Usage: ssadump [ ...] ... +Usage: ssadump [-build=[DBCSNFL]] [-test] [-run] [-interp=[TR]] [-arg=...] package... Use -help flag to display options. Examples: % ssadump -build=F hello.go # dump SSA form of a single package % ssadump -build=F -test fmt # dump SSA form of a package and its tests % ssadump -run -interp=T hello.go # interpret a program, with tracing -` + loader.FromArgsUsage + - ` + The -run flag causes ssadump to run the first package named main. Interpretation of the standard "testing" package is no longer supported. @@ -67,17 +69,24 @@ func main() { func doMain() error { flag.Parse() - args := flag.Args() + if len(flag.Args()) == 0 { + fmt.Fprint(os.Stderr, usage) + os.Exit(1) + } - conf := loader.Config{Build: &build.Default} + cfg := &packages.Config{ + Mode: packages.LoadSyntax, + Tests: *testFlag, + } // Choose types.Sizes from conf.Build. + // TODO(adonovan): remove this when go/packages provides a better way. var wordSize int64 = 8 - switch conf.Build.GOARCH { + switch build.Default.GOARCH { case "386", "arm": wordSize = 4 } - conf.TypeChecker.Sizes = &types.StdSizes{ + sizes := &types.StdSizes{ MaxAlign: 8, WordSize: wordSize, } @@ -94,11 +103,6 @@ func doMain() error { } } - if len(args) == 0 { - fmt.Fprint(os.Stderr, usage) - os.Exit(1) - } - // Profiling support. if *cpuprofile != "" { f, err := os.Create(*cpuprofile) @@ -110,58 +114,46 @@ func doMain() error { defer pprof.StopCPUProfile() } - // Use the initial packages from the command line. - args, err := conf.FromArgs(args, *testFlag) - if err != nil { - return err - } - - // The interpreter needs the runtime package. + // Load, parse and type-check the initial packages, + // and, if -run, their dependencies. if *runFlag { - conf.Import("runtime") + cfg.Mode = packages.LoadAllSyntax } - - // Load, parse and type-check the whole program. - lprog, err := conf.Load() + initial, err := packages.Load(cfg, flag.Args()...) if err != nil { return err } + if len(initial) == 0 { + return fmt.Errorf("no packages") + } + + // Create SSA-form program representation. + prog, pkgs := ssautil.Packages(initial, mode) - // Create and build SSA-form program representation. - prog := ssautil.CreateProgram(lprog, mode) - - // Build and display only the initial packages - // (and synthetic wrappers), unless -run is specified. - var initpkgs []*ssa.Package - for _, info := range lprog.InitialPackages() { - ssapkg := prog.Package(info.Pkg) - ssapkg.Build() - if info.Pkg.Path() != "runtime" { - initpkgs = append(initpkgs, ssapkg) + for i, p := range pkgs { + if p == nil { + return fmt.Errorf("cannot build SSA for package %s", initial[i]) } } - // Run the interpreter. - if *runFlag { + if !*runFlag { + // Build and display only the initial packages + // (and synthetic wrappers). + for _, p := range pkgs { + p.Build() + } + + } else { + // Run the interpreter. + // Build SSA for all packages. prog.Build() - var mains []*ssa.Package - if *testFlag { - // If -test, run the tests. - for _, pkg := range initpkgs { - if main := prog.CreateTestMainPackage(pkg); main != nil { - mains = append(mains, main) - } - } - if mains == nil { - return fmt.Errorf("no tests") - } - } else { - // Otherwise, run the main packages. - mains = ssautil.MainPackages(initpkgs) - if len(mains) == 0 { - return fmt.Errorf("no main package") - } + // The interpreter needs the runtime package. + // It is a limitation of go/packages that + // we cannot add "runtime" to its initial set, + // we can only check that it is present. + if prog.ImportedPackage("runtime") == nil { + return fmt.Errorf("-run: program does not depend on runtime") } if runtime.GOARCH != build.Default.GOARCH { @@ -169,12 +161,27 @@ func doMain() error { build.Default.GOARCH, runtime.GOARCH) } - for _, main := range mains { - if len(mains) > 1 { - fmt.Fprintf(os.Stderr, "Running: %s\n", main.Pkg.Path()) - } - interp.Interpret(main, interpMode, conf.TypeChecker.Sizes, main.Pkg.Path(), args) + // Run first main package. + for _, main := range ssautil.MainPackages(pkgs) { + fmt.Fprintf(os.Stderr, "Running: %s\n", main.Pkg.Path()) + os.Exit(interp.Interpret(main, interpMode, sizes, main.Pkg.Path(), args)) } + return fmt.Errorf("no main package") } return nil } + +// stringListValue is a flag.Value that accumulates strings. +// e.g. --flag=one --flag=two would produce []string{"one", "two"}. +type stringListValue []string + +func newStringListValue(val []string, p *[]string) *stringListValue { + *p = val + return (*stringListValue)(p) +} + +func (ss *stringListValue) Get() interface{} { return []string(*ss) } + +func (ss *stringListValue) String() string { return fmt.Sprintf("%q", *ss) } + +func (ss *stringListValue) Set(s string) error { *ss = append(*ss, s); return nil } diff --git a/deps/golang.org/x/tools/cmd/stringer/endtoend_test.go b/deps/golang.org/x/tools/cmd/stringer/endtoend_test.go index 273f29bd8..f8530a6cb 100644 --- a/deps/golang.org/x/tools/cmd/stringer/endtoend_test.go +++ b/deps/golang.org/x/tools/cmd/stringer/endtoend_test.go @@ -9,6 +9,7 @@ package main import ( + "bytes" "fmt" "go/build" "io" @@ -26,17 +27,8 @@ import ( // binary panics if the String method for X is not correct, including for error cases. func TestEndToEnd(t *testing.T) { - dir, err := ioutil.TempDir("", "stringer") - if err != nil { - t.Fatal(err) - } + dir, stringer := buildStringer(t) defer os.RemoveAll(dir) - // Create stringer in temporary directory. - stringer := filepath.Join(dir, "stringer.exe") - err = run("go", "build", "-o", stringer) - if err != nil { - t.Fatalf("building stringer: %s", err) - } // Read the testdata directory. fd, err := os.Open("testdata") if err != nil { @@ -53,6 +45,10 @@ func TestEndToEnd(t *testing.T) { t.Errorf("%s is not a Go file", name) continue } + if strings.HasPrefix(name, "tag_") { + // This file is used for tag processing in TestTags, below. + continue + } if name == "cgo.go" && !build.Default.CgoEnabled { t.Logf("cgo is not enabled for %s", name) continue @@ -63,9 +59,69 @@ func TestEndToEnd(t *testing.T) { } } +// TestTags verifies that the -tags flag works as advertised. +func TestTags(t *testing.T) { + dir, stringer := buildStringer(t) + defer os.RemoveAll(dir) + var ( + protectedConst = []byte("TagProtected") + output = filepath.Join(dir, "const_string.go") + ) + for _, file := range []string{"tag_main.go", "tag_tag.go"} { + + err := copy(filepath.Join(dir, file), filepath.Join("testdata", file)) + if err != nil { + t.Fatal(err) + } + + } + err := run(stringer, "-type", "Const", dir) + if err != nil { + t.Fatal(err) + } + result, err := ioutil.ReadFile(output) + if err != nil { + t.Fatal(err) + } + if bytes.Contains(result, protectedConst) { + t.Fatal("tagged variable appears in untagged run") + } + err = os.Remove(output) + if err != nil { + t.Fatal(err) + } + err = run(stringer, "-type", "Const", "-tags", "tag", dir) + if err != nil { + t.Fatal(err) + } + result, err = ioutil.ReadFile(output) + if err != nil { + t.Fatal(err) + } + if !bytes.Contains(result, protectedConst) { + t.Fatal("tagged variable does not appear in tagged run") + } +} + +// buildStringer creates a temporary directory and installs stringer there. +func buildStringer(t *testing.T) (dir string, stringer string) { + t.Helper() + dir, err := ioutil.TempDir("", "stringer") + if err != nil { + t.Fatal(err) + } + stringer = filepath.Join(dir, "stringer.exe") + err = run("go", "build", "-o", stringer) + if err != nil { + t.Fatalf("building stringer: %s", err) + } + return dir, stringer +} + // stringerCompileAndRun runs stringer for the named file and compiles and // runs the target binary in directory dir. That binary will panic if the String method is incorrect. func stringerCompileAndRun(t *testing.T, dir, stringer, typeName, fileName string) { + t.Helper() t.Logf("run: %s %s\n", fileName, typeName) source := filepath.Join(dir, fileName) err := copy(source, filepath.Join("testdata", fileName)) diff --git a/deps/golang.org/x/tools/cmd/stringer/stringer.go b/deps/golang.org/x/tools/cmd/stringer/stringer.go index 4b8d1ba41..5c3ad3547 100644 --- a/deps/golang.org/x/tools/cmd/stringer/stringer.go +++ b/deps/golang.org/x/tools/cmd/stringer/stringer.go @@ -64,7 +64,7 @@ import ( "fmt" "go/ast" "go/build" - exact "go/constant" + "go/constant" "go/format" "go/parser" "go/token" @@ -82,6 +82,7 @@ var ( output = flag.String("output", "", "output file name; default srcdir/_string.go") trimprefix = flag.String("trimprefix", "", "trim the `prefix` from the generated constant names") linecomment = flag.Bool("linecomment", false, "use line comment text as printed text when present") + buildTags = flag.String("tags", "", "comma-separated list of build tags to apply") ) // Usage is a replacement usage function for the flags package. @@ -105,6 +106,10 @@ func main() { os.Exit(2) } types := strings.Split(*typeNames, ",") + var tags []string + if len(*buildTags) > 0 { + tags = strings.Split(*buildTags, ",") + } // We accept either one directory or a list of files. Which do we have? args := flag.Args() @@ -121,8 +126,11 @@ func main() { } if len(args) == 1 && isDirectory(args[0]) { dir = args[0] - g.parsePackageDir(args[0]) + g.parsePackageDir(args[0], tags) } else { + if len(tags) != 0 { + log.Fatal("-tags option applies only to directories, not when files are specified") + } dir = filepath.Dir(args[0]) g.parsePackageFiles(args) } @@ -197,9 +205,15 @@ type Package struct { typesPkg *types.Package } +func buildContext(tags []string) *build.Context { + ctx := build.Default + ctx.BuildTags = tags + return &ctx +} + // parsePackageDir parses the package residing in the directory. -func (g *Generator) parsePackageDir(directory string) { - pkg, err := build.Default.ImportDir(directory, 0) +func (g *Generator) parsePackageDir(directory string, tags []string) { + pkg, err := buildContext(tags).ImportDir(directory, 0) if err != nil { log.Fatalf("cannot process directory %s: %s", directory, err) } @@ -261,14 +275,17 @@ func (g *Generator) parsePackage(directory string, names []string, text interfac g.pkg.name = astFiles[0].Name.Name g.pkg.files = files g.pkg.dir = directory - // Type check the package. - g.pkg.check(fs, astFiles) + g.pkg.typeCheck(fs, astFiles) } -// check type-checks the package. The package must be OK to proceed. -func (pkg *Package) check(fs *token.FileSet, astFiles []*ast.File) { +// check type-checks the package so we can evaluate contants whose values we are printing. +func (pkg *Package) typeCheck(fs *token.FileSet, astFiles []*ast.File) { pkg.defs = make(map[*ast.Ident]types.Object) - config := types.Config{Importer: defaultImporter(), FakeImportC: true} + config := types.Config{ + IgnoreFuncBodies: true, // We only need to evaluate constants. + Importer: defaultImporter(), + FakeImportC: true, + } info := &types.Info{ Defs: pkg.defs, } @@ -373,7 +390,7 @@ type Value struct { // by Value.String. value uint64 // Will be converted to int64 when needed. signed bool // Whether the constant is a signed type. - str string // The string representation given by the "go/exact" package. + str string // The string representation given by the "go/constant" package. } func (v *Value) String() string { @@ -447,11 +464,11 @@ func (f *File) genDecl(node ast.Node) bool { log.Fatalf("can't handle non-integer constant type %s", typ) } value := obj.(*types.Const).Val() // Guaranteed to succeed as this is CONST. - if value.Kind() != exact.Int { + if value.Kind() != constant.Int { log.Fatalf("can't happen: constant is not an integer %s", name) } - i64, isInt := exact.Int64Val(value) - u64, isUint := exact.Uint64Val(value) + i64, isInt := constant.Int64Val(value) + u64, isUint := constant.Uint64Val(value) if !isInt && !isUint { log.Fatalf("internal error: value of %s is not an integer: %s", name, value.String()) } diff --git a/deps/golang.org/x/tools/cmd/stringer/testdata/tag_main.go b/deps/golang.org/x/tools/cmd/stringer/testdata/tag_main.go new file mode 100644 index 000000000..449ea0d47 --- /dev/null +++ b/deps/golang.org/x/tools/cmd/stringer/testdata/tag_main.go @@ -0,0 +1,11 @@ +// No build tag in this file. + +package main + +type Const int + +const ( + A Const = iota + B + C +) diff --git a/deps/golang.org/x/tools/cmd/stringer/testdata/tag_tag.go b/deps/golang.org/x/tools/cmd/stringer/testdata/tag_tag.go new file mode 100644 index 000000000..6844cb007 --- /dev/null +++ b/deps/golang.org/x/tools/cmd/stringer/testdata/tag_tag.go @@ -0,0 +1,7 @@ +// This file has a build tag "tag" + +// +build tag + +package main + +const TagProtected Const = C + 1 diff --git a/deps/golang.org/x/tools/cmd/tip/talks.go b/deps/golang.org/x/tools/cmd/tip/talks.go index 3fc9e1e4c..a1a7a9555 100644 --- a/deps/golang.org/x/tools/cmd/tip/talks.go +++ b/deps/golang.org/x/tools/cmd/tip/talks.go @@ -21,7 +21,7 @@ func (b talksBuilder) Signature(heads map[string]string) string { return heads["talks"] } -const talksToolsRev = "e04df2157ae7263e17159baabadc99fb03fc7514" +const talksToolsRev = "8cab8a1319f0be9798e7fe78b15da75e5f94b2e9" func (b talksBuilder) Init(dir, hostport string, heads map[string]string) (*exec.Cmd, error) { toolsDir := filepath.Join(dir, "gopath/src/golang.org/x/tools") diff --git a/deps/golang.org/x/tools/cmd/tip/tip.go b/deps/golang.org/x/tools/cmd/tip/tip.go index 91032dc20..35b06ec5b 100644 --- a/deps/golang.org/x/tools/cmd/tip/tip.go +++ b/deps/golang.org/x/tools/cmd/tip/tip.go @@ -408,7 +408,7 @@ func (h httpsOnlyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if r.Header.Get("X-Appengine-Https") == "on" || r.Header.Get("X-Forwarded-Proto") == "https" || (!isProxiedReq(r) && r.TLS != nil) { // Only set this header when we're actually in production. - w.Header().Set("Strict-Transport-Security", "max-age=31536000; preload") + w.Header().Set("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload") } h.h.ServeHTTP(w, r) } diff --git a/deps/golang.org/x/tools/go/ast/astutil/imports.go b/deps/golang.org/x/tools/go/ast/astutil/imports.go index 83f196cd5..04ad6795d 100644 --- a/deps/golang.org/x/tools/go/ast/astutil/imports.go +++ b/deps/golang.org/x/tools/go/ast/astutil/imports.go @@ -101,8 +101,8 @@ func AddNamedImport(fset *token.FileSet, f *ast.File, name, ipath string) (added impDecl.TokPos = f.Decls[lastImport].End() } else { // There are no existing imports. - // Our new import goes after the package declaration and after - // the comment, if any, that starts on the same line as the + // Our new import, preceded by a blank line, goes after the package declaration + // and after the comment, if any, that starts on the same line as the // package declaration. impDecl.TokPos = f.Package @@ -112,7 +112,8 @@ func AddNamedImport(fset *token.FileSet, f *ast.File, name, ipath string) (added if file.Line(c.Pos()) > pkgLine { break } - impDecl.TokPos = c.End() + // +2 for a blank line + impDecl.TokPos = c.End() + 2 } } f.Decls = append(f.Decls, nil) diff --git a/deps/golang.org/x/tools/go/ast/astutil/imports_test.go b/deps/golang.org/x/tools/go/ast/astutil/imports_test.go index 8bc348087..da775ef4c 100644 --- a/deps/golang.org/x/tools/go/ast/astutil/imports_test.go +++ b/deps/golang.org/x/tools/go/ast/astutil/imports_test.go @@ -367,6 +367,7 @@ type T time.Time type T time.Time `, out: `package main // comment + import "time" type T time.Time @@ -399,6 +400,7 @@ type T time.Time `, out: `// comment before package main // comment on + import "time" type T time.Time diff --git a/deps/golang.org/x/tools/go/buildutil/allpackages_test.go b/deps/golang.org/x/tools/go/buildutil/allpackages_test.go index 0440ff240..1815512b9 100644 --- a/deps/golang.org/x/tools/go/buildutil/allpackages_test.go +++ b/deps/golang.org/x/tools/go/buildutil/allpackages_test.go @@ -10,6 +10,7 @@ package buildutil_test import ( "go/build" + "runtime" "sort" "strings" "testing" @@ -18,6 +19,10 @@ import ( ) func TestAllPackages(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo has no standard packages") + } + all := buildutil.AllPackages(&build.Default) set := make(map[string]bool) diff --git a/deps/golang.org/x/tools/go/buildutil/fakecontext.go b/deps/golang.org/x/tools/go/buildutil/fakecontext.go index 24cbcbea2..8b7f06673 100644 --- a/deps/golang.org/x/tools/go/buildutil/fakecontext.go +++ b/deps/golang.org/x/tools/go/buildutil/fakecontext.go @@ -41,6 +41,7 @@ func FakeContext(pkgs map[string]map[string]string) *build.Context { ctxt := build.Default // copy ctxt.GOROOT = "/go" ctxt.GOPATH = "" + ctxt.Compiler = "gc" ctxt.IsDir = func(dir string) bool { dir = clean(dir) if dir == "" { diff --git a/deps/golang.org/x/tools/go/buildutil/util_test.go b/deps/golang.org/x/tools/go/buildutil/util_test.go index 72db3172a..c72d59d50 100644 --- a/deps/golang.org/x/tools/go/buildutil/util_test.go +++ b/deps/golang.org/x/tools/go/buildutil/util_test.go @@ -8,7 +8,6 @@ import ( "go/build" "io/ioutil" "os" - "path/filepath" "runtime" "testing" @@ -16,9 +15,13 @@ import ( ) func TestContainingPackage(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo has no GOROOT") + } + // unvirtualized: goroot := runtime.GOROOT() - gopath := filepath.SplitList(os.Getenv("GOPATH"))[0] + gopath := gopathContainingTools(t) type Test struct { gopath, filename, wantPkg string @@ -70,3 +73,13 @@ func TestContainingPackage(t *testing.T) { // TODO(adonovan): test on virtualized GOPATH too. } + +// gopathContainingTools returns the path of the GOPATH workspace +// with golang.org/x/tools, or fails the test if it can't locate it. +func gopathContainingTools(t *testing.T) string { + p, err := build.Import("golang.org/x/tools", "", build.FindOnly) + if err != nil { + t.Fatal(err) + } + return p.Root +} diff --git a/deps/golang.org/x/tools/go/callgraph/cha/cha.go b/deps/golang.org/x/tools/go/callgraph/cha/cha.go index 68ffffebd..215ff173d 100644 --- a/deps/golang.org/x/tools/go/callgraph/cha/cha.go +++ b/deps/golang.org/x/tools/go/callgraph/cha/cha.go @@ -47,23 +47,36 @@ func CallGraph(prog *ssa.Program) *callgraph.Graph { // methodsByName contains all methods, // grouped by name for efficient lookup. + // (methodsById would be better but not every SSA method has a go/types ID.) methodsByName := make(map[string][]*ssa.Function) - // methodsMemo records, for every abstract method call call I.f on - // interface type I, the set of concrete methods C.f of all + // An imethod represents an interface method I.m. + // (There's no go/types object for it; + // a *types.Func may be shared by many interfaces due to interface embedding.) + type imethod struct { + I *types.Interface + id string + } + // methodsMemo records, for every abstract method call I.m on + // interface type I, the set of concrete methods C.m of all // types C that satisfy interface I. - methodsMemo := make(map[*types.Func][]*ssa.Function) - lookupMethods := func(m *types.Func) []*ssa.Function { - methods, ok := methodsMemo[m] + // + // Abstract methods may be shared by several interfaces, + // hence we must pass I explicitly, not guess from m. + // + // methodsMemo is just a cache, so it needn't be a typeutil.Map. + methodsMemo := make(map[imethod][]*ssa.Function) + lookupMethods := func(I *types.Interface, m *types.Func) []*ssa.Function { + id := m.Id() + methods, ok := methodsMemo[imethod{I, id}] if !ok { - I := m.Type().(*types.Signature).Recv().Type().Underlying().(*types.Interface) for _, f := range methodsByName[m.Name()] { C := f.Signature.Recv().Type() // named or *named if types.Implements(C, I) { methods = append(methods, f) } } - methodsMemo[m] = methods + methodsMemo[imethod{I, id}] = methods } return methods } @@ -109,7 +122,8 @@ func CallGraph(prog *ssa.Program) *callgraph.Graph { if site, ok := instr.(ssa.CallInstruction); ok { call := site.Common() if call.IsInvoke() { - addEdges(fnode, site, lookupMethods(call.Method)) + tiface := call.Value.Type().Underlying().(*types.Interface) + addEdges(fnode, site, lookupMethods(tiface, call.Method)) } else if g := call.StaticCallee(); g != nil { addEdge(fnode, site, g) } else if _, ok := call.Value.(*ssa.Builtin); !ok { diff --git a/deps/golang.org/x/tools/go/callgraph/cha/cha_test.go b/deps/golang.org/x/tools/go/callgraph/cha/cha_test.go index 7e56c0630..cb2d58525 100644 --- a/deps/golang.org/x/tools/go/callgraph/cha/cha_test.go +++ b/deps/golang.org/x/tools/go/callgraph/cha/cha_test.go @@ -30,6 +30,7 @@ var inputs = []string{ "testdata/func.go", "testdata/iface.go", "testdata/recv.go", + "testdata/issue23925.go", } func expectation(f *ast.File) (string, token.Pos) { diff --git a/deps/golang.org/x/tools/go/callgraph/cha/testdata/issue23925.go b/deps/golang.org/x/tools/go/callgraph/cha/testdata/issue23925.go new file mode 100644 index 000000000..59eaf1838 --- /dev/null +++ b/deps/golang.org/x/tools/go/callgraph/cha/testdata/issue23925.go @@ -0,0 +1,38 @@ +package main + +// Regression test for https://github.com/golang/go/issues/23925 + +type stringFlagImpl string + +func (*stringFlagImpl) Set(s string) error { return nil } + +type boolFlagImpl bool + +func (*boolFlagImpl) Set(s string) error { return nil } +func (*boolFlagImpl) extra() {} + +// A copy of flag.boolFlag interface, without a dependency. +// Must appear first, so that it becomes the owner of the Set methods. +type boolFlag interface { + flagValue + extra() +} + +// A copy of flag.Value, without adding a dependency. +type flagValue interface { + Set(string) error +} + +func main() { + var x flagValue = new(stringFlagImpl) + x.Set("") + + var y boolFlag = new(boolFlagImpl) + y.Set("") +} + +// WANT: +// Dynamic calls +// main --> (*boolFlagImpl).Set +// main --> (*boolFlagImpl).Set +// main --> (*stringFlagImpl).Set diff --git a/deps/golang.org/x/tools/go/gcexportdata/example_test.go b/deps/golang.org/x/tools/go/gcexportdata/example_test.go index 4ad73abcb..b67d55f96 100644 --- a/deps/golang.org/x/tools/go/gcexportdata/example_test.go +++ b/deps/golang.org/x/tools/go/gcexportdata/example_test.go @@ -3,6 +3,7 @@ // license that can be found in the LICENSE file. // +build go1.7 +// +build gc package gcexportdata_test diff --git a/deps/golang.org/x/tools/go/gcexportdata/gcexportdata.go b/deps/golang.org/x/tools/go/gcexportdata/gcexportdata.go index e53270e06..4c238d101 100644 --- a/deps/golang.org/x/tools/go/gcexportdata/gcexportdata.go +++ b/deps/golang.org/x/tools/go/gcexportdata/gcexportdata.go @@ -7,9 +7,6 @@ // gc compiler. This package supports go1.7 export data format and all // later versions. // -// This package replaces the deprecated golang.org/x/tools/go/gcimporter15 -// package, which will be deleted in October 2017. -// // Although it might seem convenient for this package to live alongside // go/types in the standard library, this would cause version skew // problems for developer tools that use it, since they must be able to @@ -32,7 +29,7 @@ import ( "io" "io/ioutil" - gcimporter "golang.org/x/tools/go/gcimporter15" + "golang.org/x/tools/go/internal/gcimporter" ) // Find returns the name of an object (.o) or archive (.a) file @@ -88,6 +85,14 @@ func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, return gcimporter.ImportData(imports, path, path, bytes.NewReader(data)) } + // The indexed export format starts with an 'i'; the older + // binary export format starts with a 'c', 'd', or 'v' + // (from "version"). Select appropriate importer. + if len(data) > 0 && data[0] == 'i' { + _, pkg, err := gcimporter.IImportData(fset, imports, data[1:], path) + return pkg, err + } + _, pkg, err := gcimporter.BImportData(fset, imports, data, path) return pkg, err } @@ -95,6 +100,10 @@ func Read(in io.Reader, fset *token.FileSet, imports map[string]*types.Package, // Write writes encoded type information for the specified package to out. // The FileSet provides file position information for named objects. func Write(out io.Writer, fset *token.FileSet, pkg *types.Package) error { - _, err := out.Write(gcimporter.BExportData(fset, pkg)) + b, err := gcimporter.BExportData(fset, pkg) + if err != nil { + return err + } + _, err = out.Write(b) return err } diff --git a/deps/golang.org/x/tools/go/gcexportdata/main.go b/deps/golang.org/x/tools/go/gcexportdata/main.go index 106046c4c..2713dce64 100644 --- a/deps/golang.org/x/tools/go/gcexportdata/main.go +++ b/deps/golang.org/x/tools/go/gcexportdata/main.go @@ -20,11 +20,13 @@ import ( "golang.org/x/tools/go/types/typeutil" ) +var packageFlag = flag.String("package", "", "alternative package to print") + func main() { log.SetPrefix("gcexportdata: ") log.SetFlags(0) flag.Usage = func() { - fmt.Fprintln(os.Stderr, "usage: gcexportdata file.a") + fmt.Fprintln(os.Stderr, "usage: gcexportdata [-package path] file.a") } flag.Parse() if flag.NArg() != 1 { @@ -44,11 +46,27 @@ func main() { } // Decode the package. + const primary = "" imports := make(map[string]*types.Package) fset := token.NewFileSet() - pkg, err := gcexportdata.Read(r, fset, imports, "dummy") + pkg, err := gcexportdata.Read(r, fset, imports, primary) if err != nil { - log.Fatal("%s: %s", filename, err) + log.Fatalf("%s: %s", filename, err) + } + + // Optionally select an indirectly mentioned package. + if *packageFlag != "" { + pkg = imports[*packageFlag] + if pkg == nil { + fmt.Fprintf(os.Stderr, "export data file %s does not mention %s; has:\n", + filename, *packageFlag) + for p := range imports { + if p != primary { + fmt.Fprintf(os.Stderr, "\t%s\n", p) + } + } + os.Exit(1) + } } // Print all package-level declarations, including non-exported ones. diff --git a/deps/golang.org/x/tools/go/gcimporter15/testdata/versions/test.go b/deps/golang.org/x/tools/go/gcimporter15/testdata/versions/test.go deleted file mode 100644 index ac9c968c2..000000000 --- a/deps/golang.org/x/tools/go/gcimporter15/testdata/versions/test.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// To create a test case for a new export format version, -// build this package with the latest compiler and store -// the resulting .a file appropriately named in the versions -// directory. The VersionHandling test will pick it up. -// -// In the testdata/versions: -// -// go build -o test_go1.$X_$Y.a test.go -// -// with $X = Go version and $Y = export format version. -// -// Make sure this source is extended such that it exercises -// whatever export format change has taken place. - -package test - -// Any release before and including Go 1.7 didn't encode -// the package for a blank struct field. -type BlankField struct { - _ int -} diff --git a/deps/golang.org/x/tools/go/loader/cgo.go b/deps/golang.org/x/tools/go/internal/cgo/cgo.go similarity index 85% rename from deps/golang.org/x/tools/go/loader/cgo.go rename to deps/golang.org/x/tools/go/internal/cgo/cgo.go index 72c6f502d..0f652ea6f 100644 --- a/deps/golang.org/x/tools/go/loader/cgo.go +++ b/deps/golang.org/x/tools/go/internal/cgo/cgo.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package loader +package cgo // This file handles cgo preprocessing of files containing `import "C"`. // @@ -66,10 +66,10 @@ import ( "strings" ) -// processCgoFiles invokes the cgo preprocessor on bp.CgoFiles, parses +// ProcessFiles invokes the cgo preprocessor on bp.CgoFiles, parses // the output and returns the resulting ASTs. // -func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) { +func ProcessFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(path string) string, mode parser.Mode) ([]*ast.File, error) { tmpdir, err := ioutil.TempDir("", strings.Replace(bp.ImportPath, "/", "_", -1)+"_C") if err != nil { return nil, err @@ -81,7 +81,7 @@ func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(pa pkgdir = DisplayPath(pkgdir) } - cgoFiles, cgoDisplayFiles, err := runCgo(bp, pkgdir, tmpdir) + cgoFiles, cgoDisplayFiles, err := Run(bp, pkgdir, tmpdir, false) if err != nil { return nil, err } @@ -104,15 +104,20 @@ func processCgoFiles(bp *build.Package, fset *token.FileSet, DisplayPath func(pa var cgoRe = regexp.MustCompile(`[/\\:]`) -// runCgo invokes the cgo preprocessor on bp.CgoFiles and returns two +// Run invokes the cgo preprocessor on bp.CgoFiles and returns two // lists of files: the resulting processed files (in temporary // directory tmpdir) and the corresponding names of the unprocessed files. // -// runCgo is adapted from (*builder).cgo in +// Run is adapted from (*builder).cgo in // $GOROOT/src/cmd/go/build.go, but these features are unsupported: // Objective C, CGOPKGPATH, CGO_FLAGS. // -func runCgo(bp *build.Package, pkgdir, tmpdir string) (files, displayFiles []string, err error) { +// If useabs is set to true, absolute paths of the bp.CgoFiles will be passed in +// to the cgo preprocessor. This in turn will set the // line comments +// referring to those files to use absolute paths. This is needed for +// go/packages using the legacy go list support so it is able to find +// the original files. +func Run(bp *build.Package, pkgdir, tmpdir string, useabs bool) (files, displayFiles []string, err error) { cgoCPPFLAGS, _, _, _ := cflags(bp, true) _, cgoexeCFLAGS, _, _ := cflags(bp, false) @@ -145,9 +150,17 @@ func runCgo(bp *build.Package, pkgdir, tmpdir string) (files, displayFiles []str cgoflags = append(cgoflags, "-import_syscall=false") } + var cgoFiles []string = bp.CgoFiles + if useabs { + cgoFiles = make([]string, len(bp.CgoFiles)) + for i := range cgoFiles { + cgoFiles[i] = filepath.Join(pkgdir, bp.CgoFiles[i]) + } + } + args := stringList( "go", "tool", "cgo", "-objdir", tmpdir, cgoflags, "--", - cgoCPPFLAGS, cgoexeCFLAGS, bp.CgoFiles, + cgoCPPFLAGS, cgoexeCFLAGS, cgoFiles, ) if false { log.Printf("Running cgo for package %q: %s (dir=%s)", bp.ImportPath, args, pkgdir) diff --git a/deps/golang.org/x/tools/go/loader/cgo_pkgconfig.go b/deps/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go similarity index 98% rename from deps/golang.org/x/tools/go/loader/cgo_pkgconfig.go rename to deps/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go index de57422df..b5bb95a63 100644 --- a/deps/golang.org/x/tools/go/loader/cgo_pkgconfig.go +++ b/deps/golang.org/x/tools/go/internal/cgo/cgo_pkgconfig.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package loader +package cgo import ( "errors" diff --git a/deps/golang.org/x/tools/go/internal/gccgoimporter/gccgoinstallation_test.go b/deps/golang.org/x/tools/go/internal/gccgoimporter/gccgoinstallation_test.go index fb1fa6d4b..ca8c2419f 100644 --- a/deps/golang.org/x/tools/go/internal/gccgoimporter/gccgoinstallation_test.go +++ b/deps/golang.org/x/tools/go/internal/gccgoimporter/gccgoinstallation_test.go @@ -64,8 +64,6 @@ var importablePackages = [...]string{ "encoding/pem", "encoding/xml", "errors", - "exp/proxy", - "exp/terminal", "expvar", "flag", "fmt", @@ -116,8 +114,6 @@ var importablePackages = [...]string{ "net/smtp", "net/textproto", "net/url", - "old/regexp", - "old/template", "os/exec", "os", "os/signal", @@ -183,12 +179,12 @@ func TestInstallationImporter(t *testing.T) { // Test for certain specific entities in the imported data. for _, test := range [...]importerTest{ - {pkgpath: "io", name: "Reader", want: "type Reader interface{Read(p []uint8) (n int, err error)}"}, + {pkgpath: "io", name: "Reader", want: "type Reader interface{Read(p []byte) (n int, err error)}"}, {pkgpath: "io", name: "ReadWriter", want: "type ReadWriter interface{Reader; Writer}"}, {pkgpath: "math", name: "Pi", want: "const Pi untyped float"}, {pkgpath: "math", name: "Sin", want: "func Sin(x float64) float64"}, {pkgpath: "sort", name: "Ints", want: "func Ints(a []int)"}, - {pkgpath: "unsafe", name: "Pointer", want: "type Pointer unsafe.Pointer"}, + {pkgpath: "unsafe", name: "Pointer", want: "type Pointer"}, } { runImporterTest(t, imp, nil, &test) } diff --git a/deps/golang.org/x/tools/go/internal/gccgoimporter/importer_test.go b/deps/golang.org/x/tools/go/internal/gccgoimporter/importer_test.go index 2c6f1cb4f..02c100a6b 100644 --- a/deps/golang.org/x/tools/go/internal/gccgoimporter/importer_test.go +++ b/deps/golang.org/x/tools/go/internal/gccgoimporter/importer_test.go @@ -144,6 +144,13 @@ func TestObjImporter(t *testing.T) { for _, test := range importerTests { gofile := filepath.Join("testdata", test.pkgpath+".go") + + if _, err := os.Stat(gofile); err != nil { + // There is a .gox file but no .go file, + // so there is nothing to compile. + continue + } + ofile := filepath.Join(tmpdir, test.pkgpath+".o") afile := filepath.Join(artmpdir, "lib"+test.pkgpath+".a") @@ -154,6 +161,10 @@ func TestObjImporter(t *testing.T) { t.Fatalf("gccgo %s failed: %s", gofile, err) } + // The expected initializations are version dependent, + // so don't check for them. + test.wantinits = nil + runImporterTest(t, imp, initmap, &test) cmd = exec.Command("ar", "cr", afile, ofile) diff --git a/deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface10.go b/deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface10.go new file mode 100644 index 000000000..9a108d486 --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface10.go @@ -0,0 +1,21 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.11 + +package gccgoimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + named := make([]*types.Named, len(embeddeds)) + for i, e := range embeddeds { + var ok bool + named[i], ok = e.(*types.Named) + if !ok { + panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") + } + } + return types.NewInterface(methods, named) +} diff --git a/deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface11.go b/deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface11.go new file mode 100644 index 000000000..1636610b3 --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gccgoimporter/newInterface11.go @@ -0,0 +1,13 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.11 + +package gccgoimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + return types.NewInterfaceType(methods, embeddeds) +} diff --git a/deps/golang.org/x/tools/go/internal/gccgoimporter/parser.go b/deps/golang.org/x/tools/go/internal/gccgoimporter/parser.go index 9e20df0e5..18a186321 100644 --- a/deps/golang.org/x/tools/go/internal/gccgoimporter/parser.go +++ b/deps/golang.org/x/tools/go/internal/gccgoimporter/parser.go @@ -587,13 +587,13 @@ func (p *parser) parseInterfaceType(pkg *types.Package) types.Type { p.expectKeyword("interface") var methods []*types.Func - var typs []*types.Named + var embeddeds []types.Type p.expect('{') for p.tok != '}' && p.tok != scanner.EOF { if p.tok == '?' { p.next() - typs = append(typs, p.parseType(pkg).(*types.Named)) + embeddeds = append(embeddeds, p.parseType(pkg)) } else { method := p.parseFunc(pkg) methods = append(methods, method) @@ -602,7 +602,7 @@ func (p *parser) parseInterfaceType(pkg *types.Package) types.Type { } p.expect('}') - return types.NewInterface(methods, typs) + return newInterface(methods, embeddeds) } // PointerType = "*" ("any" | Type) . diff --git a/deps/golang.org/x/tools/go/gcimporter15/bexport.go b/deps/golang.org/x/tools/go/internal/gcimporter/bexport.go similarity index 92% rename from deps/golang.org/x/tools/go/gcimporter15/bexport.go rename to deps/golang.org/x/tools/go/internal/gcimporter/bexport.go index cbf8bc00d..6a9821ae4 100644 --- a/deps/golang.org/x/tools/go/gcimporter15/bexport.go +++ b/deps/golang.org/x/tools/go/internal/gcimporter/bexport.go @@ -16,7 +16,6 @@ import ( "go/constant" "go/token" "go/types" - "log" "math" "math/big" "sort" @@ -39,6 +38,11 @@ const debugFormat = false // default: false const trace = false // default: false // Current export format version. Increase with each format change. +// Note: The latest binary (non-indexed) export format is at version 6. +// This exporter is still at level 4, but it doesn't matter since +// the binary importer can handle older versions just fine. +// 6: package height (CL 105038) -- NOT IMPLEMENTED HERE +// 5: improved position encoding efficiency (issue 20080, CL 41619) -- NOT IMPLEMEMTED HERE // 4: type name objects support type aliases, uses aliasTag // 3: Go1.8 encoding (same as version 2, aliasTag defined but never used) // 2: removed unused bool in ODCL export (compiler only) @@ -76,9 +80,29 @@ type exporter struct { indent int // for trace } +// internalError represents an error generated inside this package. +type internalError string + +func (e internalError) Error() string { return "gcimporter: " + string(e) } + +func internalErrorf(format string, args ...interface{}) error { + return internalError(fmt.Sprintf(format, args...)) +} + // BExportData returns binary export data for pkg. // If no file set is provided, position info will be missing. -func BExportData(fset *token.FileSet, pkg *types.Package) []byte { +func BExportData(fset *token.FileSet, pkg *types.Package) (b []byte, err error) { + defer func() { + if e := recover(); e != nil { + if ierr, ok := e.(internalError); ok { + err = ierr + return + } + // Not an internal error; panic again. + panic(e) + } + }() + p := exporter{ fset: fset, strIndex: map[string]int{"": 0}, // empty string is mapped to 0 @@ -107,7 +131,7 @@ func BExportData(fset *token.FileSet, pkg *types.Package) []byte { p.typIndex[typ] = index } if len(p.typIndex) != len(predeclared) { - log.Fatalf("gcimporter: duplicate entries in type map?") + return nil, internalError("duplicate entries in type map?") } // write package data @@ -145,12 +169,12 @@ func BExportData(fset *token.FileSet, pkg *types.Package) []byte { // --- end of export data --- - return p.out.Bytes() + return p.out.Bytes(), nil } func (p *exporter) pkg(pkg *types.Package, emptypath bool) { if pkg == nil { - log.Fatalf("gcimporter: unexpected nil pkg") + panic(internalError("unexpected nil pkg")) } // if we saw the package before, write its index (>= 0) @@ -209,7 +233,7 @@ func (p *exporter) obj(obj types.Object) { p.paramList(sig.Results(), false) default: - log.Fatalf("gcimporter: unexpected object %v (%T)", obj, obj) + panic(internalErrorf("unexpected object %v (%T)", obj, obj)) } } @@ -273,7 +297,7 @@ func (p *exporter) qualifiedName(obj types.Object) { func (p *exporter) typ(t types.Type) { if t == nil { - log.Fatalf("gcimporter: nil type") + panic(internalError("nil type")) } // Possible optimization: Anonymous pointer types *T where @@ -356,7 +380,7 @@ func (p *exporter) typ(t types.Type) { p.typ(t.Elem()) default: - log.Fatalf("gcimporter: unexpected type %T: %s", t, t) + panic(internalErrorf("unexpected type %T: %s", t, t)) } } @@ -422,7 +446,7 @@ func (p *exporter) fieldList(t *types.Struct) { func (p *exporter) field(f *types.Var) { if !f.IsField() { - log.Fatalf("gcimporter: field expected") + panic(internalError("field expected")) } p.pos(f) @@ -452,7 +476,7 @@ func (p *exporter) iface(t *types.Interface) { func (p *exporter) method(m *types.Func) { sig := m.Type().(*types.Signature) if sig.Recv() == nil { - log.Fatalf("gcimporter: method expected") + panic(internalError("method expected")) } p.pos(m) @@ -575,13 +599,13 @@ func (p *exporter) value(x constant.Value) { p.tag(unknownTag) default: - log.Fatalf("gcimporter: unexpected value %v (%T)", x, x) + panic(internalErrorf("unexpected value %v (%T)", x, x)) } } func (p *exporter) float(x constant.Value) { if x.Kind() != constant.Float { - log.Fatalf("gcimporter: unexpected constant %v, want float", x) + panic(internalErrorf("unexpected constant %v, want float", x)) } // extract sign (there is no -0) sign := constant.Sign(x) @@ -616,7 +640,7 @@ func (p *exporter) float(x constant.Value) { m.SetMantExp(&m, int(m.MinPrec())) mant, acc := m.Int(nil) if acc != big.Exact { - log.Fatalf("gcimporter: internal error") + panic(internalError("internal error")) } p.int(sign) @@ -653,7 +677,7 @@ func (p *exporter) bool(b bool) bool { func (p *exporter) index(marker byte, index int) { if index < 0 { - log.Fatalf("gcimporter: invalid index < 0") + panic(internalError("invalid index < 0")) } if debugFormat { p.marker('t') @@ -666,7 +690,7 @@ func (p *exporter) index(marker byte, index int) { func (p *exporter) tag(tag int) { if tag >= 0 { - log.Fatalf("gcimporter: invalid tag >= 0") + panic(internalError("invalid tag >= 0")) } if debugFormat { p.marker('t') diff --git a/deps/golang.org/x/tools/go/gcimporter15/bexport19_test.go b/deps/golang.org/x/tools/go/internal/gcimporter/bexport19_test.go similarity index 93% rename from deps/golang.org/x/tools/go/gcimporter15/bexport19_test.go rename to deps/golang.org/x/tools/go/internal/gcimporter/bexport19_test.go index f6e9733b1..5c3cf2ddd 100644 --- a/deps/golang.org/x/tools/go/gcimporter15/bexport19_test.go +++ b/deps/golang.org/x/tools/go/internal/gcimporter/bexport19_test.go @@ -13,7 +13,7 @@ import ( "go/types" "testing" - gcimporter "golang.org/x/tools/go/gcimporter15" + "golang.org/x/tools/go/internal/gcimporter" ) const src = ` @@ -80,7 +80,10 @@ func TestTypeAliases(t *testing.T) { checkPkg(t, pkg1, "export") // export - exportdata := gcimporter.BExportData(fset1, pkg1) + exportdata, err := gcimporter.BExportData(fset1, pkg1) + if err != nil { + t.Fatal(err) + } // import imports := make(map[string]*types.Package) diff --git a/deps/golang.org/x/tools/go/gcimporter15/bexport_test.go b/deps/golang.org/x/tools/go/internal/gcimporter/bexport_test.go similarity index 96% rename from deps/golang.org/x/tools/go/gcimporter15/bexport_test.go rename to deps/golang.org/x/tools/go/internal/gcimporter/bexport_test.go index 6ab3bcb10..e78b78db0 100644 --- a/deps/golang.org/x/tools/go/gcimporter15/bexport_test.go +++ b/deps/golang.org/x/tools/go/internal/gcimporter/bexport_test.go @@ -18,11 +18,14 @@ import ( "testing" "golang.org/x/tools/go/buildutil" - gcimporter "golang.org/x/tools/go/gcimporter15" + "golang.org/x/tools/go/internal/gcimporter" "golang.org/x/tools/go/loader" ) func TestBExportData_stdlib(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo standard library is inaccessible") + } if runtime.GOOS == "android" { t.Skipf("incomplete std lib on %s", runtime.GOOS) } @@ -63,7 +66,10 @@ type UnknownType undefined if info.Files == nil { continue // empty directory } - exportdata := gcimporter.BExportData(conf.Fset, pkg) + exportdata, err := gcimporter.BExportData(conf.Fset, pkg) + if err != nil { + t.Fatal(err) + } imports := make(map[string]*types.Package) fset2 := token.NewFileSet() @@ -306,7 +312,10 @@ func TestVeryLongFile(t *testing.T) { } // export - exportdata := gcimporter.BExportData(fset1, pkg) + exportdata, err := gcimporter.BExportData(fset1, pkg) + if err != nil { + t.Fatal(err) + } // import imports := make(map[string]*types.Package) diff --git a/deps/golang.org/x/tools/go/gcimporter15/bimport.go b/deps/golang.org/x/tools/go/internal/gcimporter/bimport.go similarity index 87% rename from deps/golang.org/x/tools/go/gcimporter15/bimport.go rename to deps/golang.org/x/tools/go/internal/gcimporter/bimport.go index 1936a7f6c..b31eacfc0 100644 --- a/deps/golang.org/x/tools/go/gcimporter15/bimport.go +++ b/deps/golang.org/x/tools/go/internal/gcimporter/bimport.go @@ -39,8 +39,7 @@ type importer struct { posInfoFormat bool prevFile string prevLine int - fset *token.FileSet - files map[string]*token.File + fake fakeFileSet // debugging support debugFormat bool @@ -53,12 +52,16 @@ type importer struct { // compromised, an error is returned. func BImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { // catch panics and return them as errors + const currentVersion = 6 + version := -1 // unknown version defer func() { if e := recover(); e != nil { - // The package (filename) causing the problem is added to this - // error by a wrapper in the caller (Import in gcimporter.go). // Return a (possibly nil or incomplete) package unchanged (see #16088). - err = fmt.Errorf("cannot import, possibly version skew (%v) - reinstall package", e) + if version > currentVersion { + err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) + } else { + err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) + } } }() @@ -66,11 +69,13 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data [] imports: imports, data: data, importpath: path, - version: -1, // unknown version + version: version, strList: []string{""}, // empty string is mapped to 0 pathList: []string{""}, // empty string is mapped to 0 - fset: fset, - files: make(map[string]*token.File), + fake: fakeFileSet{ + fset: fset, + files: make(map[string]*token.File), + }, } // read version info @@ -89,7 +94,7 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data [] p.posInfoFormat = p.int() != 0 versionstr = p.string() if versionstr == "v1" { - p.version = 0 + version = 0 } } else { // Go1.8 extensible encoding @@ -97,24 +102,25 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data [] versionstr = p.rawStringln(b) if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" { if v, err := strconv.Atoi(s[1]); err == nil && v > 0 { - p.version = v + version = v } } } + p.version = version // read version specific flags - extend as necessary switch p.version { - // case 6: + // case currentVersion: // ... // fallthrough - case 5, 4, 3, 2, 1: + case currentVersion, 5, 4, 3, 2, 1: p.debugFormat = p.rawStringln(p.rawByte()) == "debug" p.trackAllTypes = p.int() != 0 p.posInfoFormat = p.int() != 0 case 0: // Go1.7 encoding format - nothing to do here default: - errorf("unknown export format version %d (%q)", p.version, versionstr) + errorf("unknown bexport format version %d (%q)", p.version, versionstr) } // --- generic export data --- @@ -125,7 +131,7 @@ func BImportData(fset *token.FileSet, imports map[string]*types.Package, data [] // read package data pkg = p.pkg() - // read objects of phase 1 only (see cmd/compiler/internal/gc/bexport.go) + // read objects of phase 1 only (see cmd/compile/internal/gc/bexport.go) objcount := 0 for { tag := p.tagOrIndex() @@ -184,6 +190,9 @@ func (p *importer) pkg() *types.Package { } else { path = p.string() } + if p.version >= 6 { + p.int() // package height; unused by go/types + } // we should never see an empty package name if name == "" { @@ -259,7 +268,7 @@ func (p *importer) obj(tag int) { case constTag: pos := p.pos() pkg, name := p.qualifiedName() - typ := p.typ(nil) + typ := p.typ(nil, nil) val := p.value() p.declare(types.NewConst(pos, pkg, name, typ, val)) @@ -267,16 +276,16 @@ func (p *importer) obj(tag int) { // TODO(gri) verify type alias hookup is correct pos := p.pos() pkg, name := p.qualifiedName() - typ := p.typ(nil) + typ := p.typ(nil, nil) p.declare(types.NewTypeName(pos, pkg, name, typ)) case typeTag: - p.typ(nil) + p.typ(nil, nil) case varTag: pos := p.pos() pkg, name := p.qualifiedName() - typ := p.typ(nil) + typ := p.typ(nil, nil) p.declare(types.NewVar(pos, pkg, name, typ)) case funcTag: @@ -323,15 +332,23 @@ func (p *importer) pos() token.Pos { p.prevFile = file p.prevLine = line - // Synthesize a token.Pos + return p.fake.pos(file, line) +} +// Synthesize a token.Pos +type fakeFileSet struct { + fset *token.FileSet + files map[string]*token.File +} + +func (s *fakeFileSet) pos(file string, line int) token.Pos { // Since we don't know the set of needed file positions, we // reserve maxlines positions per file. const maxlines = 64 * 1024 - f := p.files[file] + f := s.files[file] if f == nil { - f = p.fset.AddFile(file, -1, maxlines) - p.files[file] = f + f = s.fset.AddFile(file, -1, maxlines) + s.files[file] = f // Allocate the fake linebreak indices on first use. // TODO(adonovan): opt: save ~512KB using a more complex scheme? fakeLinesOnce.Do(func() { @@ -381,7 +398,11 @@ func (t *dddSlice) String() string { return "..." + t.elem.String() } // the package currently imported. The parent package is needed for // exported struct fields and interface methods which don't contain // explicit package information in the export data. -func (p *importer) typ(parent *types.Package) types.Type { +// +// A non-nil tname is used as the "owner" of the result type; i.e., +// the result type is the underlying type of tname. tname is used +// to give interface methods a named receiver type where possible. +func (p *importer) typ(parent *types.Package, tname *types.Named) types.Type { // if the type was seen before, i is its index (>= 0) i := p.tagOrIndex() if i >= 0 { @@ -411,15 +432,15 @@ func (p *importer) typ(parent *types.Package) types.Type { t0 := types.NewNamed(obj.(*types.TypeName), nil, nil) // but record the existing type, if any - t := obj.Type().(*types.Named) - p.record(t) + tname := obj.Type().(*types.Named) // tname is either t0 or the existing type + p.record(tname) // read underlying type - t0.SetUnderlying(p.typ(parent)) + t0.SetUnderlying(p.typ(parent, t0)) // interfaces don't have associated methods if types.IsInterface(t0) { - return t + return tname } // read associated methods @@ -440,7 +461,7 @@ func (p *importer) typ(parent *types.Package) types.Type { t0.AddMethod(types.NewFunc(pos, parent, name, sig)) } - return t + return tname case arrayTag: t := new(types.Array) @@ -449,7 +470,7 @@ func (p *importer) typ(parent *types.Package) types.Type { } n := p.int64() - *t = *types.NewArray(p.typ(parent), n) + *t = *types.NewArray(p.typ(parent, nil), n) return t case sliceTag: @@ -458,7 +479,7 @@ func (p *importer) typ(parent *types.Package) types.Type { p.record(t) } - *t = *types.NewSlice(p.typ(parent)) + *t = *types.NewSlice(p.typ(parent, nil)) return t case dddTag: @@ -467,7 +488,7 @@ func (p *importer) typ(parent *types.Package) types.Type { p.record(t) } - t.elem = p.typ(parent) + t.elem = p.typ(parent, nil) return t case structTag: @@ -485,7 +506,7 @@ func (p *importer) typ(parent *types.Package) types.Type { p.record(t) } - *t = *types.NewPointer(p.typ(parent)) + *t = *types.NewPointer(p.typ(parent, nil)) return t case signatureTag: @@ -504,18 +525,20 @@ func (p *importer) typ(parent *types.Package) types.Type { // cannot expect the interface type to appear in a cycle, as any // such cycle must contain a named type which would have been // first defined earlier. + // TODO(gri) Is this still true now that we have type aliases? + // See issue #23225. n := len(p.typList) if p.trackAllTypes { p.record(nil) } - var embeddeds []*types.Named + var embeddeds []types.Type for n := p.int(); n > 0; n-- { p.pos() - embeddeds = append(embeddeds, p.typ(parent).(*types.Named)) + embeddeds = append(embeddeds, p.typ(parent, nil)) } - t := types.NewInterface(p.methodList(parent), embeddeds) + t := newInterface(p.methodList(parent, tname), embeddeds) p.interfaceList = append(p.interfaceList, t) if p.trackAllTypes { p.typList[n] = t @@ -528,8 +551,8 @@ func (p *importer) typ(parent *types.Package) types.Type { p.record(t) } - key := p.typ(parent) - val := p.typ(parent) + key := p.typ(parent, nil) + val := p.typ(parent, nil) *t = *types.NewMap(key, val) return t @@ -539,19 +562,8 @@ func (p *importer) typ(parent *types.Package) types.Type { p.record(t) } - var dir types.ChanDir - // tag values must match the constants in cmd/compile/internal/gc/go.go - switch d := p.int(); d { - case 1 /* Crecv */ : - dir = types.RecvOnly - case 2 /* Csend */ : - dir = types.SendOnly - case 3 /* Cboth */ : - dir = types.SendRecv - default: - errorf("unexpected channel dir %d", d) - } - val := p.typ(parent) + dir := chanDir(p.int()) + val := p.typ(parent, nil) *t = *types.NewChan(dir, val) return t @@ -561,6 +573,21 @@ func (p *importer) typ(parent *types.Package) types.Type { } } +func chanDir(d int) types.ChanDir { + // tag values must match the constants in cmd/compile/internal/gc/go.go + switch d { + case 1 /* Crecv */ : + return types.RecvOnly + case 2 /* Csend */ : + return types.SendOnly + case 3 /* Cboth */ : + return types.SendRecv + default: + errorf("unexpected channel dir %d", d) + return 0 + } +} + func (p *importer) fieldList(parent *types.Package) (fields []*types.Var, tags []string) { if n := p.int(); n > 0 { fields = make([]*types.Var, n) @@ -575,7 +602,7 @@ func (p *importer) fieldList(parent *types.Package) (fields []*types.Var, tags [ func (p *importer) field(parent *types.Package) (*types.Var, string) { pos := p.pos() pkg, name, alias := p.fieldName(parent) - typ := p.typ(parent) + typ := p.typ(parent, nil) tag := p.string() anonymous := false @@ -599,22 +626,30 @@ func (p *importer) field(parent *types.Package) (*types.Var, string) { return types.NewField(pos, pkg, name, typ, anonymous), tag } -func (p *importer) methodList(parent *types.Package) (methods []*types.Func) { +func (p *importer) methodList(parent *types.Package, baseType *types.Named) (methods []*types.Func) { if n := p.int(); n > 0 { methods = make([]*types.Func, n) for i := range methods { - methods[i] = p.method(parent) + methods[i] = p.method(parent, baseType) } } return } -func (p *importer) method(parent *types.Package) *types.Func { +func (p *importer) method(parent *types.Package, baseType *types.Named) *types.Func { pos := p.pos() pkg, name, _ := p.fieldName(parent) + // If we don't have a baseType, use a nil receiver. + // A receiver using the actual interface type (which + // we don't know yet) will be filled in when we call + // types.Interface.Complete. + var recv *types.Var + if baseType != nil { + recv = types.NewVar(token.NoPos, parent, "", baseType) + } params, isddd := p.paramList() result, _ := p.paramList() - sig := types.NewSignature(nil, params, result, isddd) + sig := types.NewSignature(recv, params, result, isddd) return types.NewFunc(pos, pkg, name, sig) } @@ -670,7 +705,7 @@ func (p *importer) paramList() (*types.Tuple, bool) { } func (p *importer) param(named bool) (*types.Var, bool) { - t := p.typ(nil) + t := p.typ(nil, nil) td, isddd := t.(*dddSlice) if isddd { t = types.NewSlice(td.elem) diff --git a/deps/golang.org/x/tools/go/gcimporter15/exportdata.go b/deps/golang.org/x/tools/go/internal/gcimporter/exportdata.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/exportdata.go rename to deps/golang.org/x/tools/go/internal/gcimporter/exportdata.go diff --git a/deps/golang.org/x/tools/go/gcimporter15/gcimporter.go b/deps/golang.org/x/tools/go/internal/gcimporter/gcimporter.go similarity index 94% rename from deps/golang.org/x/tools/go/gcimporter15/gcimporter.go rename to deps/golang.org/x/tools/go/internal/gcimporter/gcimporter.go index 6fbc9d761..47dd46136 100644 --- a/deps/golang.org/x/tools/go/gcimporter15/gcimporter.go +++ b/deps/golang.org/x/tools/go/internal/gcimporter/gcimporter.go @@ -2,25 +2,21 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// This file is a copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, +// This file is a modified copy of $GOROOT/src/go/internal/gcimporter/gcimporter.go, // but it also contains the original source-based importer code for Go1.6. // Once we stop supporting 1.6, we can remove that code. -// Package gcimporter15 provides various functions for reading +// Package gcimporter provides various functions for reading // gc-generated object files that can be used to implement the // Importer interface defined by the Go 1.5 standard library package. -// -// Deprecated: this package will be deleted in October 2017. -// New code should use golang.org/x/tools/go/gcexportdata. -// -package gcimporter // import "golang.org/x/tools/go/gcimporter15" +package gcimporter // import "golang.org/x/tools/go/internal/gcimporter" import ( "bufio" "errors" "fmt" "go/build" - exact "go/constant" + "go/constant" "go/token" "go/types" "io" @@ -59,6 +55,7 @@ func FindPkg(path, srcDir string) (filename, id string) { } bp, _ := build.Import(path, srcDir, build.FindOnly|build.AllowBinary) if bp.PkgObj == "" { + id = path // make sure we have an id to print in error message return } noext = strings.TrimSuffix(bp.PkgObj, ".a") @@ -137,7 +134,7 @@ func Import(packages map[string]*types.Package, path, srcDir string) (pkg *types if path == "unsafe" { return types.Unsafe, nil } - err = fmt.Errorf("can't find import: %s", id) + err = fmt.Errorf("can't find import: %q", id) return } @@ -168,14 +165,27 @@ func Import(packages map[string]*types.Package, path, srcDir string) (pkg *types switch hdr { case "$$\n": return ImportData(packages, filename, id, buf) + case "$$B\n": var data []byte data, err = ioutil.ReadAll(buf) - if err == nil { - fset := token.NewFileSet() + if err != nil { + break + } + + // TODO(gri): allow clients of go/importer to provide a FileSet. + // Or, define a new standard go/types/gcexportdata package. + fset := token.NewFileSet() + + // The indexed export format starts with an 'i'; the older + // binary export format starts with a 'c', 'd', or 'v' + // (from "version"). Select appropriate importer. + if len(data) > 0 && data[0] == 'i' { + _, pkg, err = IImportData(fset, packages, data[1:], id) + } else { _, pkg, err = BImportData(fset, packages, data, id) - return } + default: err = fmt.Errorf("unknown export data header: %q", hdr) } @@ -767,9 +777,9 @@ func (p *parser) parseInt() string { // number = int_lit [ "p" int_lit ] . // -func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) { +func (p *parser) parseNumber() (typ *types.Basic, val constant.Value) { // mantissa - mant := exact.MakeFromLiteral(p.parseInt(), token.INT, 0) + mant := constant.MakeFromLiteral(p.parseInt(), token.INT, 0) if mant == nil { panic("invalid mantissa") } @@ -782,14 +792,14 @@ func (p *parser) parseNumber() (typ *types.Basic, val exact.Value) { p.error(err) } if exp < 0 { - denom := exact.MakeInt64(1) - denom = exact.Shift(denom, token.SHL, uint(-exp)) + denom := constant.MakeInt64(1) + denom = constant.Shift(denom, token.SHL, uint(-exp)) typ = types.Typ[types.UntypedFloat] - val = exact.BinaryOp(mant, token.QUO, denom) + val = constant.BinaryOp(mant, token.QUO, denom) return } if exp > 0 { - mant = exact.Shift(mant, token.SHL, uint(exp)) + mant = constant.Shift(mant, token.SHL, uint(exp)) } typ = types.Typ[types.UntypedFloat] val = mant @@ -820,7 +830,7 @@ func (p *parser) parseConstDecl() { p.expect('=') var typ types.Type - var val exact.Value + var val constant.Value switch p.tok { case scanner.Ident: // bool_lit @@ -828,7 +838,7 @@ func (p *parser) parseConstDecl() { p.error("expected true or false") } typ = types.Typ[types.UntypedBool] - val = exact.MakeBool(p.lit == "true") + val = constant.MakeBool(p.lit == "true") p.next() case '-', scanner.Int: @@ -852,18 +862,18 @@ func (p *parser) parseConstDecl() { p.expectKeyword("i") p.expect(')') typ = types.Typ[types.UntypedComplex] - val = exact.BinaryOp(re, token.ADD, exact.MakeImag(im)) + val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) case scanner.Char: // rune_lit typ = types.Typ[types.UntypedRune] - val = exact.MakeFromLiteral(p.lit, token.CHAR, 0) + val = constant.MakeFromLiteral(p.lit, token.CHAR, 0) p.next() case scanner.String: // string_lit typ = types.Typ[types.UntypedString] - val = exact.MakeFromLiteral(p.lit, token.STRING, 0) + val = constant.MakeFromLiteral(p.lit, token.STRING, 0) p.next() default: diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/gcimporter11_test.go b/deps/golang.org/x/tools/go/internal/gcimporter/gcimporter11_test.go new file mode 100644 index 000000000..787620d64 --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gcimporter/gcimporter11_test.go @@ -0,0 +1,134 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.11 + +package gcimporter + +import ( + "go/types" + "os" + "runtime" + "strings" + "testing" +) + +var importedObjectTests = []struct { + name string + want string +}{ + // non-interfaces + {"crypto.Hash", "type Hash uint"}, + {"go/ast.ObjKind", "type ObjKind int"}, + {"go/types.Qualifier", "type Qualifier func(*Package) string"}, + {"go/types.Comparable", "func Comparable(T Type) bool"}, + {"math.Pi", "const Pi untyped float"}, + {"math.Sin", "func Sin(x float64) float64"}, + {"go/ast.NotNilFilter", "func NotNilFilter(_ string, v reflect.Value) bool"}, + {"go/internal/gcimporter.BImportData", "func BImportData(fset *go/token.FileSet, imports map[string]*go/types.Package, data []byte, path string) (_ int, pkg *go/types.Package, err error)"}, + + // interfaces + {"context.Context", "type Context interface{Deadline() (deadline time.Time, ok bool); Done() <-chan struct{}; Err() error; Value(key interface{}) interface{}}"}, + {"crypto.Decrypter", "type Decrypter interface{Decrypt(rand io.Reader, msg []byte, opts DecrypterOpts) (plaintext []byte, err error); Public() PublicKey}"}, + {"encoding.BinaryMarshaler", "type BinaryMarshaler interface{MarshalBinary() (data []byte, err error)}"}, + {"io.Reader", "type Reader interface{Read(p []byte) (n int, err error)}"}, + {"io.ReadWriter", "type ReadWriter interface{Reader; Writer}"}, + {"go/ast.Node", "type Node interface{End() go/token.Pos; Pos() go/token.Pos}"}, + {"go/types.Type", "type Type interface{String() string; Underlying() Type}"}, +} + +func TestImportedTypes(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + for _, test := range importedObjectTests { + s := strings.Split(test.name, ".") + if len(s) != 2 { + t.Fatal("inconsistent test data") + } + importPath := s[0] + objName := s[1] + + pkg, err := Import(make(map[string]*types.Package), importPath, ".") + if err != nil { + t.Error(err) + continue + } + + obj := pkg.Scope().Lookup(objName) + if obj == nil { + t.Errorf("%s: object not found", test.name) + continue + } + + got := types.ObjectString(obj, types.RelativeTo(pkg)) + if got != test.want { + t.Errorf("%s: got %q; want %q", test.name, got, test.want) + } + + if named, _ := obj.Type().(*types.Named); named != nil { + verifyInterfaceMethodRecvs(t, named, 0) + } + } +} + +// verifyInterfaceMethodRecvs verifies that method receiver types +// are named if the methods belong to a named interface type. +func verifyInterfaceMethodRecvs(t *testing.T, named *types.Named, level int) { + // avoid endless recursion in case of an embedding bug that lead to a cycle + if level > 10 { + t.Errorf("%s: embeds itself", named) + return + } + + iface, _ := named.Underlying().(*types.Interface) + if iface == nil { + return // not an interface + } + + // check explicitly declared methods + for i := 0; i < iface.NumExplicitMethods(); i++ { + m := iface.ExplicitMethod(i) + recv := m.Type().(*types.Signature).Recv() + if recv == nil { + t.Errorf("%s: missing receiver type", m) + continue + } + if recv.Type() != named { + t.Errorf("%s: got recv type %s; want %s", m, recv.Type(), named) + } + } + + // check embedded interfaces (if they are named, too) + for i := 0; i < iface.NumEmbeddeds(); i++ { + // embedding of interfaces cannot have cycles; recursion will terminate + if etype, _ := iface.EmbeddedType(i).(*types.Named); etype != nil { + verifyInterfaceMethodRecvs(t, etype, level+1) + } + } +} +func TestIssue25301(t *testing.T) { + skipSpecialPlatforms(t) + + // This package only handles gc export data. + if runtime.Compiler != "gc" { + t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) + } + + // On windows, we have to set the -D option for the compiler to avoid having a drive + // letter and an illegal ':' in the import path - just skip it (see also issue #3483). + if runtime.GOOS == "windows" { + t.Skip("avoid dealing with relative paths/drive letters on windows") + } + + if f := compile(t, "testdata", "issue25301.go"); f != "" { + defer os.Remove(f) + } + + importPkg(t, "./testdata/issue25301") +} diff --git a/deps/golang.org/x/tools/go/gcimporter15/gcimporter_test.go b/deps/golang.org/x/tools/go/internal/gcimporter/gcimporter_test.go similarity index 91% rename from deps/golang.org/x/tools/go/gcimporter15/gcimporter_test.go rename to deps/golang.org/x/tools/go/internal/gcimporter/gcimporter_test.go index 56cdfc04f..bfcb7389b 100644 --- a/deps/golang.org/x/tools/go/gcimporter15/gcimporter_test.go +++ b/deps/golang.org/x/tools/go/internal/gcimporter/gcimporter_test.go @@ -185,9 +185,21 @@ func TestVersionHandling(t *testing.T) { } pkgpath := "./" + name[:len(name)-2] + if testing.Verbose() { + t.Logf("importing %s", name) + } + // test that export data can be imported _, err := Import(make(map[string]*types.Package), pkgpath, dir) if err != nil { + // ok to fail if it fails with a newer version error for select files + if strings.Contains(err.Error(), "newer version") { + switch name { + case "test_go1.11_999b.a", "test_go1.11_999i.a": + continue + } + // fall through + } t.Errorf("import %q failed: %v", pkgpath, err) continue } @@ -240,55 +252,6 @@ func TestImportStdLib(t *testing.T) { t.Logf("tested %d imports", nimports) } -var importedObjectTests = []struct { - name string - want string -}{ - {"math.Pi", "const Pi untyped float"}, - {"io.Reader", "type Reader interface{Read(p []byte) (n int, err error)}"}, - // Go 1.7 and 1.8 don't know about embedded interfaces. Leave this - // test out for now - the code is tested in the std library anyway. - // TODO(gri) enable again once we're off 1.7 and 1.8. - // {"io.ReadWriter", "type ReadWriter interface{Reader; Writer}"}, - {"math.Sin", "func Sin(x float64) float64"}, - // TODO(gri) add more tests -} - -func TestImportedTypes(t *testing.T) { - skipSpecialPlatforms(t) - - // This package only handles gc export data. - if runtime.Compiler != "gc" { - t.Skipf("gc-built packages not available (compiler = %s)", runtime.Compiler) - } - - for _, test := range importedObjectTests { - s := strings.Split(test.name, ".") - if len(s) != 2 { - t.Fatal("inconsistent test data") - } - importPath := s[0] - objName := s[1] - - pkg, err := Import(make(map[string]*types.Package), importPath, ".") - if err != nil { - t.Error(err) - continue - } - - obj := pkg.Scope().Lookup(objName) - if obj == nil { - t.Errorf("%s: object not found", test.name) - continue - } - - got := types.ObjectString(obj, types.RelativeTo(pkg)) - if got != test.want { - t.Errorf("%s: got %q; want %q", test.name, got, test.want) - } - } -} - func TestIssue5815(t *testing.T) { skipSpecialPlatforms(t) diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/iimport.go b/deps/golang.org/x/tools/go/internal/gcimporter/iimport.go new file mode 100644 index 000000000..0fd22bb03 --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gcimporter/iimport.go @@ -0,0 +1,598 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Indexed package import. +// See cmd/compile/internal/gc/iexport.go for the export data format. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/iimport.go. + +package gcimporter + +import ( + "bytes" + "encoding/binary" + "fmt" + "go/constant" + "go/token" + "go/types" + "io" + "sort" +) + +type intReader struct { + *bytes.Reader + path string +} + +func (r *intReader) int64() int64 { + i, err := binary.ReadVarint(r.Reader) + if err != nil { + errorf("import %q: read varint error: %v", r.path, err) + } + return i +} + +func (r *intReader) uint64() uint64 { + i, err := binary.ReadUvarint(r.Reader) + if err != nil { + errorf("import %q: read varint error: %v", r.path, err) + } + return i +} + +const predeclReserved = 32 + +type itag uint64 + +const ( + // Types + definedType itag = iota + pointerType + sliceType + arrayType + chanType + mapType + signatureType + structType + interfaceType +) + +// IImportData imports a package from the serialized package data +// and returns the number of bytes consumed and a reference to the package. +// If the export data version is not recognized or the format is otherwise +// compromised, an error is returned. +func IImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) { + const currentVersion = 0 + version := -1 + defer func() { + if e := recover(); e != nil { + if version > currentVersion { + err = fmt.Errorf("cannot import %q (%v), export data is newer version - update tool", path, e) + } else { + err = fmt.Errorf("cannot import %q (%v), possibly version skew - reinstall package", path, e) + } + } + }() + + r := &intReader{bytes.NewReader(data), path} + + version = int(r.uint64()) + switch version { + case currentVersion: + default: + errorf("unknown iexport format version %d", version) + } + + sLen := int64(r.uint64()) + dLen := int64(r.uint64()) + + whence, _ := r.Seek(0, io.SeekCurrent) + stringData := data[whence : whence+sLen] + declData := data[whence+sLen : whence+sLen+dLen] + r.Seek(sLen+dLen, io.SeekCurrent) + + p := iimporter{ + ipath: path, + + stringData: stringData, + stringCache: make(map[uint64]string), + pkgCache: make(map[uint64]*types.Package), + + declData: declData, + pkgIndex: make(map[*types.Package]map[string]uint64), + typCache: make(map[uint64]types.Type), + + fake: fakeFileSet{ + fset: fset, + files: make(map[string]*token.File), + }, + } + + for i, pt := range predeclared { + p.typCache[uint64(i)] = pt + } + + pkgList := make([]*types.Package, r.uint64()) + for i := range pkgList { + pkgPathOff := r.uint64() + pkgPath := p.stringAt(pkgPathOff) + pkgName := p.stringAt(r.uint64()) + _ = r.uint64() // package height; unused by go/types + + if pkgPath == "" { + pkgPath = path + } + pkg := imports[pkgPath] + if pkg == nil { + pkg = types.NewPackage(pkgPath, pkgName) + imports[pkgPath] = pkg + } else if pkg.Name() != pkgName { + errorf("conflicting names %s and %s for package %q", pkg.Name(), pkgName, path) + } + + p.pkgCache[pkgPathOff] = pkg + + nameIndex := make(map[string]uint64) + for nSyms := r.uint64(); nSyms > 0; nSyms-- { + name := p.stringAt(r.uint64()) + nameIndex[name] = r.uint64() + } + + p.pkgIndex[pkg] = nameIndex + pkgList[i] = pkg + } + + localpkg := pkgList[0] + + names := make([]string, 0, len(p.pkgIndex[localpkg])) + for name := range p.pkgIndex[localpkg] { + names = append(names, name) + } + sort.Strings(names) + for _, name := range names { + p.doDecl(localpkg, name) + } + + for _, typ := range p.interfaceList { + typ.Complete() + } + + // record all referenced packages as imports + list := append(([]*types.Package)(nil), pkgList[1:]...) + sort.Sort(byPath(list)) + localpkg.SetImports(list) + + // package was imported completely and without errors + localpkg.MarkComplete() + + consumed, _ := r.Seek(0, io.SeekCurrent) + return int(consumed), localpkg, nil +} + +type iimporter struct { + ipath string + + stringData []byte + stringCache map[uint64]string + pkgCache map[uint64]*types.Package + + declData []byte + pkgIndex map[*types.Package]map[string]uint64 + typCache map[uint64]types.Type + + fake fakeFileSet + interfaceList []*types.Interface +} + +func (p *iimporter) doDecl(pkg *types.Package, name string) { + // See if we've already imported this declaration. + if obj := pkg.Scope().Lookup(name); obj != nil { + return + } + + off, ok := p.pkgIndex[pkg][name] + if !ok { + errorf("%v.%v not in index", pkg, name) + } + + r := &importReader{p: p, currPkg: pkg} + r.declReader.Reset(p.declData[off:]) + + r.obj(name) +} + +func (p *iimporter) stringAt(off uint64) string { + if s, ok := p.stringCache[off]; ok { + return s + } + + slen, n := binary.Uvarint(p.stringData[off:]) + if n <= 0 { + errorf("varint failed") + } + spos := off + uint64(n) + s := string(p.stringData[spos : spos+slen]) + p.stringCache[off] = s + return s +} + +func (p *iimporter) pkgAt(off uint64) *types.Package { + if pkg, ok := p.pkgCache[off]; ok { + return pkg + } + path := p.stringAt(off) + errorf("missing package %q in %q", path, p.ipath) + return nil +} + +func (p *iimporter) typAt(off uint64, base *types.Named) types.Type { + if t, ok := p.typCache[off]; ok && (base == nil || !isInterface(t)) { + return t + } + + if off < predeclReserved { + errorf("predeclared type missing from cache: %v", off) + } + + r := &importReader{p: p} + r.declReader.Reset(p.declData[off-predeclReserved:]) + t := r.doType(base) + + if base == nil || !isInterface(t) { + p.typCache[off] = t + } + return t +} + +type importReader struct { + p *iimporter + declReader bytes.Reader + currPkg *types.Package + prevFile string + prevLine int64 +} + +func (r *importReader) obj(name string) { + tag := r.byte() + pos := r.pos() + + switch tag { + case 'A': + typ := r.typ() + + r.declare(types.NewTypeName(pos, r.currPkg, name, typ)) + + case 'C': + typ, val := r.value() + + r.declare(types.NewConst(pos, r.currPkg, name, typ, val)) + + case 'F': + sig := r.signature(nil) + + r.declare(types.NewFunc(pos, r.currPkg, name, sig)) + + case 'T': + // Types can be recursive. We need to setup a stub + // declaration before recursing. + obj := types.NewTypeName(pos, r.currPkg, name, nil) + named := types.NewNamed(obj, nil, nil) + r.declare(obj) + + underlying := r.p.typAt(r.uint64(), named).Underlying() + named.SetUnderlying(underlying) + + if !isInterface(underlying) { + for n := r.uint64(); n > 0; n-- { + mpos := r.pos() + mname := r.ident() + recv := r.param() + msig := r.signature(recv) + + named.AddMethod(types.NewFunc(mpos, r.currPkg, mname, msig)) + } + } + + case 'V': + typ := r.typ() + + r.declare(types.NewVar(pos, r.currPkg, name, typ)) + + default: + errorf("unexpected tag: %v", tag) + } +} + +func (r *importReader) declare(obj types.Object) { + obj.Pkg().Scope().Insert(obj) +} + +func (r *importReader) value() (typ types.Type, val constant.Value) { + typ = r.typ() + + switch b := typ.Underlying().(*types.Basic); b.Info() & types.IsConstType { + case types.IsBoolean: + val = constant.MakeBool(r.bool()) + + case types.IsString: + val = constant.MakeString(r.string()) + + case types.IsInteger: + val = r.mpint(b) + + case types.IsFloat: + val = r.mpfloat(b) + + case types.IsComplex: + re := r.mpfloat(b) + im := r.mpfloat(b) + val = constant.BinaryOp(re, token.ADD, constant.MakeImag(im)) + + default: + errorf("unexpected type %v", typ) // panics + panic("unreachable") + } + + return +} + +func intSize(b *types.Basic) (signed bool, maxBytes uint) { + if (b.Info() & types.IsUntyped) != 0 { + return true, 64 + } + + switch b.Kind() { + case types.Float32, types.Complex64: + return true, 3 + case types.Float64, types.Complex128: + return true, 7 + } + + signed = (b.Info() & types.IsUnsigned) == 0 + switch b.Kind() { + case types.Int8, types.Uint8: + maxBytes = 1 + case types.Int16, types.Uint16: + maxBytes = 2 + case types.Int32, types.Uint32: + maxBytes = 4 + default: + maxBytes = 8 + } + + return +} + +func (r *importReader) mpint(b *types.Basic) constant.Value { + signed, maxBytes := intSize(b) + + maxSmall := 256 - maxBytes + if signed { + maxSmall = 256 - 2*maxBytes + } + if maxBytes == 1 { + maxSmall = 256 + } + + n, _ := r.declReader.ReadByte() + if uint(n) < maxSmall { + v := int64(n) + if signed { + v >>= 1 + if n&1 != 0 { + v = ^v + } + } + return constant.MakeInt64(v) + } + + v := -n + if signed { + v = -(n &^ 1) >> 1 + } + if v < 1 || uint(v) > maxBytes { + errorf("weird decoding: %v, %v => %v", n, signed, v) + } + + buf := make([]byte, v) + io.ReadFull(&r.declReader, buf) + + // convert to little endian + // TODO(gri) go/constant should have a more direct conversion function + // (e.g., once it supports a big.Float based implementation) + for i, j := 0, len(buf)-1; i < j; i, j = i+1, j-1 { + buf[i], buf[j] = buf[j], buf[i] + } + + x := constant.MakeFromBytes(buf) + if signed && n&1 != 0 { + x = constant.UnaryOp(token.SUB, x, 0) + } + return x +} + +func (r *importReader) mpfloat(b *types.Basic) constant.Value { + x := r.mpint(b) + if constant.Sign(x) == 0 { + return x + } + + exp := r.int64() + switch { + case exp > 0: + x = constant.Shift(x, token.SHL, uint(exp)) + case exp < 0: + d := constant.Shift(constant.MakeInt64(1), token.SHL, uint(-exp)) + x = constant.BinaryOp(x, token.QUO, d) + } + return x +} + +func (r *importReader) ident() string { + return r.string() +} + +func (r *importReader) qualifiedIdent() (*types.Package, string) { + name := r.string() + pkg := r.pkg() + return pkg, name +} + +func (r *importReader) pos() token.Pos { + delta := r.int64() + if delta != deltaNewFile { + r.prevLine += delta + } else if l := r.int64(); l == -1 { + r.prevLine += deltaNewFile + } else { + r.prevFile = r.string() + r.prevLine = l + } + + if r.prevFile == "" && r.prevLine == 0 { + return token.NoPos + } + + return r.p.fake.pos(r.prevFile, int(r.prevLine)) +} + +func (r *importReader) typ() types.Type { + return r.p.typAt(r.uint64(), nil) +} + +func isInterface(t types.Type) bool { + _, ok := t.(*types.Interface) + return ok +} + +func (r *importReader) pkg() *types.Package { return r.p.pkgAt(r.uint64()) } +func (r *importReader) string() string { return r.p.stringAt(r.uint64()) } + +func (r *importReader) doType(base *types.Named) types.Type { + switch k := r.kind(); k { + default: + errorf("unexpected kind tag in %q: %v", r.p.ipath, k) + return nil + + case definedType: + pkg, name := r.qualifiedIdent() + r.p.doDecl(pkg, name) + return pkg.Scope().Lookup(name).(*types.TypeName).Type() + case pointerType: + return types.NewPointer(r.typ()) + case sliceType: + return types.NewSlice(r.typ()) + case arrayType: + n := r.uint64() + return types.NewArray(r.typ(), int64(n)) + case chanType: + dir := chanDir(int(r.uint64())) + return types.NewChan(dir, r.typ()) + case mapType: + return types.NewMap(r.typ(), r.typ()) + case signatureType: + r.currPkg = r.pkg() + return r.signature(nil) + + case structType: + r.currPkg = r.pkg() + + fields := make([]*types.Var, r.uint64()) + tags := make([]string, len(fields)) + for i := range fields { + fpos := r.pos() + fname := r.ident() + ftyp := r.typ() + emb := r.bool() + tag := r.string() + + fields[i] = types.NewField(fpos, r.currPkg, fname, ftyp, emb) + tags[i] = tag + } + return types.NewStruct(fields, tags) + + case interfaceType: + r.currPkg = r.pkg() + + embeddeds := make([]types.Type, r.uint64()) + for i := range embeddeds { + _ = r.pos() + embeddeds[i] = r.typ() + } + + methods := make([]*types.Func, r.uint64()) + for i := range methods { + mpos := r.pos() + mname := r.ident() + + // TODO(mdempsky): Matches bimport.go, but I + // don't agree with this. + var recv *types.Var + if base != nil { + recv = types.NewVar(token.NoPos, r.currPkg, "", base) + } + + msig := r.signature(recv) + methods[i] = types.NewFunc(mpos, r.currPkg, mname, msig) + } + + typ := newInterface(methods, embeddeds) + r.p.interfaceList = append(r.p.interfaceList, typ) + return typ + } +} + +func (r *importReader) kind() itag { + return itag(r.uint64()) +} + +func (r *importReader) signature(recv *types.Var) *types.Signature { + params := r.paramList() + results := r.paramList() + variadic := params.Len() > 0 && r.bool() + return types.NewSignature(recv, params, results, variadic) +} + +func (r *importReader) paramList() *types.Tuple { + xs := make([]*types.Var, r.uint64()) + for i := range xs { + xs[i] = r.param() + } + return types.NewTuple(xs...) +} + +func (r *importReader) param() *types.Var { + pos := r.pos() + name := r.ident() + typ := r.typ() + return types.NewParam(pos, r.currPkg, name, typ) +} + +func (r *importReader) bool() bool { + return r.uint64() != 0 +} + +func (r *importReader) int64() int64 { + n, err := binary.ReadVarint(&r.declReader) + if err != nil { + errorf("readVarint: %v", err) + } + return n +} + +func (r *importReader) uint64() uint64 { + n, err := binary.ReadUvarint(&r.declReader) + if err != nil { + errorf("readUvarint: %v", err) + } + return n +} + +func (r *importReader) byte() byte { + x, err := r.declReader.ReadByte() + if err != nil { + errorf("declReader.ReadByte: %v", err) + } + return x +} diff --git a/deps/golang.org/x/tools/go/gcimporter15/isAlias18.go b/deps/golang.org/x/tools/go/internal/gcimporter/isAlias18.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/isAlias18.go rename to deps/golang.org/x/tools/go/internal/gcimporter/isAlias18.go diff --git a/deps/golang.org/x/tools/go/gcimporter15/isAlias19.go b/deps/golang.org/x/tools/go/internal/gcimporter/isAlias19.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/isAlias19.go rename to deps/golang.org/x/tools/go/internal/gcimporter/isAlias19.go diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/newInterface10.go b/deps/golang.org/x/tools/go/internal/gcimporter/newInterface10.go new file mode 100644 index 000000000..463f25227 --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gcimporter/newInterface10.go @@ -0,0 +1,21 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.11 + +package gcimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + named := make([]*types.Named, len(embeddeds)) + for i, e := range embeddeds { + var ok bool + named[i], ok = e.(*types.Named) + if !ok { + panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") + } + } + return types.NewInterface(methods, named) +} diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/newInterface11.go b/deps/golang.org/x/tools/go/internal/gcimporter/newInterface11.go new file mode 100644 index 000000000..ab28b95cb --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gcimporter/newInterface11.go @@ -0,0 +1,13 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.11 + +package gcimporter + +import "go/types" + +func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { + return types.NewInterfaceType(methods, embeddeds) +} diff --git a/deps/golang.org/x/tools/go/gcimporter15/testdata/a.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/a.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/testdata/a.go rename to deps/golang.org/x/tools/go/internal/gcimporter/testdata/a.go diff --git a/deps/golang.org/x/tools/go/gcimporter15/testdata/b.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/b.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/testdata/b.go rename to deps/golang.org/x/tools/go/internal/gcimporter/testdata/b.go diff --git a/deps/golang.org/x/tools/go/gcimporter15/testdata/exports.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/exports.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/testdata/exports.go rename to deps/golang.org/x/tools/go/internal/gcimporter/testdata/exports.go diff --git a/deps/golang.org/x/tools/go/gcimporter15/testdata/issue15920.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue15920.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/testdata/issue15920.go rename to deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue15920.go diff --git a/deps/golang.org/x/tools/go/gcimporter15/testdata/issue20046.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue20046.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/testdata/issue20046.go rename to deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue20046.go diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue25301.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue25301.go new file mode 100644 index 000000000..e3dc98b4e --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/issue25301.go @@ -0,0 +1,17 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package issue25301 + +type ( + A = interface { + M() + } + T interface { + A + } + S struct{} +) + +func (S) M() { println("m") } diff --git a/deps/golang.org/x/tools/go/gcimporter15/testdata/p.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/p.go similarity index 100% rename from deps/golang.org/x/tools/go/gcimporter15/testdata/p.go rename to deps/golang.org/x/tools/go/internal/gcimporter/testdata/p.go diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test.go b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test.go new file mode 100644 index 000000000..6362adc21 --- /dev/null +++ b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test.go @@ -0,0 +1,30 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file is a copy of $GOROOT/src/go/internal/gcimporter/testdata/versions.test.go. + +// To create a test case for a new export format version, +// build this package with the latest compiler and store +// the resulting .a file appropriately named in the versions +// directory. The VersionHandling test will pick it up. +// +// In the testdata/versions: +// +// go build -o test_go1.$X_$Y.a test.go +// +// with $X = Go version and $Y = export format version +// (add 'b' or 'i' to distinguish between binary and +// indexed format starting with 1.11 as long as both +// formats are supported). +// +// Make sure this source is extended such that it exercises +// whatever export format change has taken place. + +package test + +// Any release before and including Go 1.7 didn't encode +// the package for a blank struct field. +type BlankField struct { + _ int +} diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_0i.a b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_0i.a new file mode 100644 index 0000000000000000000000000000000000000000..b00fefed0462172f5f5370f9769ed19342fc0c16 GIT binary patch literal 2420 zcmd5--)q}e6h69muBw_KLdZ-RK{Y0XwvlDomSrzBA-GAqvNg0Rgub}4e66UFB}bN1 zGRnHwvDZCpu!ju#KkT)%u;;z(|JYw}yK^PWah)GyZ@WnM+1DqefAUVHk@lW)sAU!R=Z-ziAz*d$3R7Pll9 zcIA!Y&f_PKAMce$p6nHiH}FUCis}R)bTZs2 zZF!b|xb0G}ckQ0=MuV0B_x9eXpn!016NLK`U_uExPS8<$Mh9x4pq?oLj0}OT#_rqmo&#X{*fU1qhfxSD`(3C5+jDF$ zuq|)&{&(G~RkWJbrCP0AH}tATjdIsCbd8o9mRYWS5?ra+J!)g4U219-z0oiCdtFNF z{hC>?+FfAy*!r%Am2Oz$C~&AxLo1@a7O=a?4(QRj`j3Du#?EdKc%S6!>snnm>iurN zVOUzZZc?*eGi`%bsAf~$1lDo_6}O@$7Vyes0pbClCe#!zDr7zrrnKiC z)Ep?mkht`l%9?7!(MVim;V9&%Z~u} z&`C3<^pF0^eSS?8e@W;6X4CzqHjQ6P2bWkLA7fG=w}b~Xfskcb1`VgV488`UoRM-$ zM#>1;tSDrq9NyWuK~`LlLFOp3h`=S1gWMT#SHf54q z+T#odoZ&U^e&Pgo*>!b7pd|!ECs+{S7h$A2oh&h85CxPB_vkWqRYuG#M&X~SNmgMM zZB`t@P{fp{!UpC9b61q0`2t5RMmF&rp{ityyoT3k+e8ErZ43Su@LJ@R8XUD5qxKP+ q<vTbv3ss< z^@i{M(5+HID_KpdmGWgnFKX1tH%&v=Xue{Z`O*i*g@WCpHa6O%rdH4^?R>k{q_o^F zndPG01cq;^-R)tdo7O0B9Xg=C70}ieu#M;h^z>T%r@$6NWz%(gANXtQT3I*B?Pj}T zSX#bpQnOq#ZG#r5W>eh+w&l1g9z~7FZ%WTLT670(_YRYd*kn3^%dz4ze>=G2TLXvQ zL099b;V|e2cNkUCXcGAKtZc@vZ%bPyHi)vu6LB@L>x^L{u7-8p#GItDJsQ~4Z>ku_ za+7j=R;%Ys!?ONp5On)gb?jz07^+$x*mguUz^cQqy1E`-@yTbc0#jlbQd+)my#}@t zqNcv`<=Ada4{R+Wj|z%s1>uzemYwq1cmhlg_waVW#XGT@%E*cRpK2@e{*Sel%zLaX z*b}o@WcUR8pSUf&CrQAbNCJctzKp1E`2Jw33BU0TVcx?bRLyrTXZ&so(JmxrgiG3M zFKUVtu9KeLMmnaSX1KD(2;}M4A&&L2{JofNgD4tTV7E*^Yvf)G@qdtW{BF*1b6EGe zi0giCQulLl-Ot5!AJ5Q;J;wCU|4w~!PZWQR*Z(Es^Tsl^UyCQVNNyiuVj!3Jy8&PV zA!$g1hRaj}KLb%tNGT;DC4^*B6p~U3pJdn|DbC9va}-%b;1WqeY648li6jCu9GJ!j zftgF-!z)1P)5x>9Ox_6aMo1N90;DFBG&vTlu-Fq#P<{|_%>ELN?EXrGm|aCF0h89o z4C~}vfO8?GA;Z$POj1jA&d}iuXMFgX6Kt^i>X<-_2#8KFAi_IgqO4 E0@X}F`Tzg` literal 0 HcmV?d00001 diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_999b.a b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_999b.a new file mode 100644 index 0000000000000000000000000000000000000000..c35d22dce691e67127e04ea74ddd8c97a57e22ff GIT binary patch literal 2600 zcmd5-QE%c#5MFNy=W|eEYCj zofNe{t4~#>{-OSb&aBx$f#kU>+p|0K%{Q~N-rZLxPV5d&m2OwR`tYv({kfJlV9tK4GN1>%$9hg#UXWp1K*PW)>y)|`=NRW*-&W<%|Dk5#Om*JxNw>r9#U!*r~b zP0ci$Mx$A+X{J%OwbuqT?WWm}oe_(|V4Sd6=}m*7rv;u?yl%MV_s08v?Wf6Q6m@>S zx_JAs)U_|7*t!_KtKHs)x1H;^ei#;&H_#MC+23y|pIJN!!m-w9G!%tU=~==i2_YNG z@A|fKfBo+A$IHvk#w2#X^22Q&a_kIW_--(Y!Wa_RM!e@F&i0IHqM%0i!xycgGydf~ zU_+05O{vr+l#orjNhAW1m98Il^>AK5QK?63X_$73{$JMel|qOgmK#G)BLDpLr;&V# zn63|;$v`g_^@UP^kwyqP;Ej138~ZV%zGZv9{g znV&e*B=p&s#ZJP!Q?wnYb7FUEW^{*u9S-P);czK(-!$r`Rqyxu4a+ggb(`7sn(bPw z!VH(0Ho{N+P=|@>X^{1WI|EEG?uSo;jsdh=}V&d^_VEymMv z5{#JcyS*Tp=tdb=^(-YE!-<85gnq;ihxvBU5u^!MAa>%|`GU%Q?zyr%_5^ko2BC*( zkn~83oP=*VG!&Pjci*5^9g-`C$oe6cpk{Da~(`lDJVy;zog4 zbVW=-{{e#MzIi6gvuXw^X8{AKl@uyEI2~bJx6@$%1PEUGwmQYvIB5<$qk2Z$*50 zk75>_FIQD5p>37s>5beZJ44wf8d^aX7v%GO;k|hPJq4YWL!pz878ng++&xoiZnuMs z17y5kpgjiH=els+Gz1+rDI`qsK{i@_81CZGq8iaMXf;*%R8ePV0gI{7COseryqA?D z63LJRsHGFggVXp7#Hd+yYxGLd9RSj+|6dE7!@>Xn literal 0 HcmV?d00001 diff --git a/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_999i.a b/deps/golang.org/x/tools/go/internal/gcimporter/testdata/versions/test_go1.11_999i.a new file mode 100644 index 0000000000000000000000000000000000000000..99401d7c37ca48fbca32f0448b71606b7f853ce4 GIT binary patch literal 2420 zcmd5-&uimG6n+|9N2{11LU7Geg4UQ2(nOZ!Uy7R;W4zgI15L=fG&ip-j}>(l%aP@5 z1EJe%>9vOzdPrgahhCRm=((5v4ZZd+nDmWgC0^&p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bcH4R-RMHG&w{maQJ;xx|E6)s5%ZeOiq3bOJu&;eg||9}IQ_ZoB=#&>Ou*?)Uvb_&CH^jO@O<8#-Yy7GfCgjE0^+ z28o4*QH+`1;L-z1-V)|$7vdayp7)`O2X8d2V7P1wxZN4 z-cXKntI_>QA9B$jbiawL;MK!F3v!I5|== z3j6Bc=7-C={;N8_&5{K{S;gN}n`>;zf2Z`RKuIZWK?`jB&onfAL7izv)6|Rx4$y8e z0J;j2uF)nmFIg?7HITLbI_v&N^f`g&#PApey3c5fK42sG_$Pwv#_!cC@0;`)foH_9 zk+gQ3(dOEBCFx1IoRyrmWF5)?-KC6V-HXGTWSi6kQ!70khD%qntp>8NW4CD+x@a4E z2APiPXT(Bz*!o&GVEX~?Y{^_~Q9zPMb5$~UJ9Z7ZrKMZ~v%mQBri;N$8`F8p1bGlny&5i&D%B(^TFPz z;3p!_;8<196I3*1d$M-+mg4B!qV3?+X{?VH6}; zz?1Qxf9!a!=Lo0ognYn9KF4h@^mjvUyFI_}4PGPndO;`x9AYR2cF)}%IiqkWM1Qn1 z=zGBsB-S;G6U_7upOjf7Qc>_ygdc<4o>m}E-^l+I`eFz0rHAA0H@Xfz|BPke|1)`+iXcrZt?40oFTZL8Nb(Rod^G~7A$jbiewML-p{&gCc zI5|==3j6$@=6j2}{);-l&5{{GS;gN}n`>;vzft*Aprn+xpanMmXBry5pw2X-X=+9T z2WU4L09^%1*Ju-(m#h}k8pv9Io%Qg2`hvgr@ zU9=57hg?VXGh(4UY<-~{u>A;kwq!20C?LtBI_PL^_?O^Zt&-WS*lx{!fFX@4#LpRh hN$fL%fd7&p;{9E%1IcdUhrv&SSzxYkem?yz{|7p9b&dc4 literal 0 HcmV?d00001 diff --git a/deps/golang.org/x/tools/go/loader/loader.go b/deps/golang.org/x/tools/go/loader/loader.go index de756f7fc..c45666118 100644 --- a/deps/golang.org/x/tools/go/loader/loader.go +++ b/deps/golang.org/x/tools/go/loader/loader.go @@ -22,6 +22,7 @@ import ( "time" "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/go/internal/cgo" ) var ignoreVendor build.ImportMode @@ -754,7 +755,7 @@ func (conf *Config) parsePackageFiles(bp *build.Package, which rune) ([]*ast.Fil // Preprocess CgoFiles and parse the outputs (sequentially). if which == 'g' && bp.CgoFiles != nil { - cgofiles, err := processCgoFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode) + cgofiles, err := cgo.ProcessFiles(bp, conf.fset(), conf.DisplayPath, conf.ParserMode) if err != nil { errs = append(errs, err) } else { diff --git a/deps/golang.org/x/tools/go/loader/loader_test.go b/deps/golang.org/x/tools/go/loader/loader_test.go index 02630eb29..dab9b2254 100644 --- a/deps/golang.org/x/tools/go/loader/loader_test.go +++ b/deps/golang.org/x/tools/go/loader/loader_test.go @@ -15,6 +15,7 @@ import ( "go/types" "path/filepath" "reflect" + "runtime" "sort" "strings" "sync" @@ -127,6 +128,10 @@ func TestLoad_MissingInitialPackage(t *testing.T) { } func TestLoad_MissingInitialPackage_AllowErrors(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo has no standard library test files") + } + var conf loader.Config conf.AllowErrors = true conf.Import("nosuchpkg") @@ -251,6 +256,10 @@ func TestLoad_FromSource_Success(t *testing.T) { } func TestLoad_FromImports_Success(t *testing.T) { + if runtime.Compiler == "gccgo" { + t.Skip("gccgo has no standard library test files") + } + var conf loader.Config conf.ImportWithTests("fmt") conf.ImportWithTests("errors") diff --git a/deps/golang.org/x/tools/go/packages/doc.go b/deps/golang.org/x/tools/go/packages/doc.go new file mode 100644 index 000000000..e5d23b50a --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/doc.go @@ -0,0 +1,243 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package packages loads Go packages for inspection and analysis. + +NOTE: THIS PACKAGE IS NOT YET READY FOR WIDESPREAD USE: + - The interface is still being revised and minor changes are likely. + - The implementation depends on the Go 1.11 go command; + support for earlier versions will be added soon. + - We intend to finalize the API before Go 1.11 is released. + +The Load function takes as input a list of patterns and return a list of Package +structs describing individual packages matched by those patterns. +The LoadMode controls the amount of detail in the loaded packages. + +The patterns are used as arguments to the underlying build tool, +such as the go command or Bazel, and are interpreted according to +that tool's conventions. + +The Package struct provides basic information about the package, including + + - ID, a unique identifier for the package in the returned set; + - GoFiles, the names of the package's Go source files; + - Imports, a map from source import strings to the Packages they name; + - Types, the type information for the package's exported symbols; + - Syntax, the parsed syntax trees for the package's source code; and + - TypeInfo, the result of a complete type-check of the package syntax trees. + +(See the documentation for type Package for the complete list of fields +and more detailed descriptions.) + +For example, + + Load(nil, "bytes", "unicode...") + +returns four Package structs describing the standard library packages +bytes, unicode, unicode/utf16, and unicode/utf8. Note that one pattern +can match multiple packages and that a package might be matched by +multiple patterns: in general it is not possible to determine which +packages correspond to which patterns. + +Note that the list returned by Load contains only the packages matched +by the patterns. Their dependencies can be found by walking the import +graph using the Imports fields. + +The Load function can be configured by passing a pointer to a Config as +the first argument. A nil Config is equivalent to the zero Config, which +causes Load to run in LoadFiles mode, collecting minimal information. +See the documentation for type Config for details. + +As noted earlier, the Config.Mode controls the amount of detail +reported about the loaded packages, with each mode returning all the data of the +previous mode with some extra added. See the documentation for type LoadMode +for details. + +Most tools should pass their command-line arguments (after any flags) +uninterpreted to the loader, so that the loader can interpret them +according to the conventions of the underlying build system. +For example, this program prints the names of the source files +for each package listed on the command line: + + package main + + import ( + "flag" + "fmt" + "log" + + "golang.org/x/tools/go/packages" + ) + + func main() { + flag.Parse() + pkgs, err := packages.Load(nil, flag.Args()...) + if err != nil { + log.Fatal(err) + } + for _, pkg := range pkgs { + fmt.Print(pkg.ID, pkg.GoFiles) + } + } +*/ +package packages // import "golang.org/x/tools/go/packages" + +/* + +Motivation and design considerations + +The new package's design solves problems addressed by two existing +packages: go/build, which locates and describes packages, and +golang.org/x/tools/go/loader, which loads, parses and type-checks them. +The go/build.Package structure encodes too much of the 'go build' way +of organizing projects, leaving us in need of a data type that describes a +package of Go source code independent of the underlying build system. +We wanted something that works equally well with go build and vgo, and +also other build systems such as Bazel and Blaze, making it possible to +construct analysis tools that work in all these environments. +Tools such as errcheck and staticcheck were essentially unavailable to +the Go community at Google, and some of Google's internal tools for Go +are unavailable externally. +This new package provides a uniform way to obtain package metadata by +querying each of these build systems, optionally supporting their +preferred command-line notations for packages, so that tools integrate +neatly with users' build environments. The Metadata query function +executes an external query tool appropriate to the current workspace. + +Loading packages always returns the complete import graph "all the way down", +even if all you want is information about a single package, because the query +mechanisms of all the build systems we currently support ({go,vgo} list, and +blaze/bazel aspect-based query) cannot provide detailed information +about one package without visiting all its dependencies too, so there is +no additional asymptotic cost to providing transitive information. +(This property might not be true of a hypothetical 5th build system.) + +In calls to TypeCheck, all initial packages, and any package that +transitively depends on one of them, must be loaded from source. +Consider A->B->C->D->E: if A,C are initial, A,B,C must be loaded from +source; D may be loaded from export data, and E may not be loaded at all +(though it's possible that D's export data mentions it, so a +types.Package may be created for it and exposed.) + +The old loader had a feature to suppress type-checking of function +bodies on a per-package basis, primarily intended to reduce the work of +obtaining type information for imported packages. Now that imports are +satisfied by export data, the optimization no longer seems necessary. + +Despite some early attempts, the old loader did not exploit export data, +instead always using the equivalent of WholeProgram mode. This was due +to the complexity of mixing source and export data packages (now +resolved by the upward traversal mentioned above), and because export data +files were nearly always missing or stale. Now that 'go build' supports +caching, all the underlying build systems can guarantee to produce +export data in a reasonable (amortized) time. + +Test "main" packages synthesized by the build system are now reported as +first-class packages, avoiding the need for clients (such as go/ssa) to +reinvent this generation logic. + +One way in which go/packages is simpler than the old loader is in its +treatment of in-package tests. In-package tests are packages that +consist of all the files of the library under test, plus the test files. +The old loader constructed in-package tests by a two-phase process of +mutation called "augmentation": first it would construct and type check +all the ordinary library packages and type-check the packages that +depend on them; then it would add more (test) files to the package and +type-check again. This two-phase approach had four major problems: +1) in processing the tests, the loader modified the library package, + leaving no way for a client application to see both the test + package and the library package; one would mutate into the other. +2) because test files can declare additional methods on types defined in + the library portion of the package, the dispatch of method calls in + the library portion was affected by the presence of the test files. + This should have been a clue that the packages were logically + different. +3) this model of "augmentation" assumed at most one in-package test + per library package, which is true of projects using 'go build', + but not other build systems. +4) because of the two-phase nature of test processing, all packages that + import the library package had to be processed before augmentation, + forcing a "one-shot" API and preventing the client from calling Load + in several times in sequence as is now possible in WholeProgram mode. + (TypeCheck mode has a similar one-shot restriction for a different reason.) + +Early drafts of this package supported "multi-shot" operation. +Although it allowed clients to make a sequence of calls (or concurrent +calls) to Load, building up the graph of Packages incrementally, +it was of marginal value: it complicated the API +(since it allowed some options to vary across calls but not others), +it complicated the implementation, +it cannot be made to work in Types mode, as explained above, +and it was less efficient than making one combined call (when this is possible). +Among the clients we have inspected, none made multiple calls to load +but could not be easily and satisfactorily modified to make only a single call. +However, applications changes may be required. +For example, the ssadump command loads the user-specified packages +and in addition the runtime package. It is tempting to simply append +"runtime" to the user-provided list, but that does not work if the user +specified an ad-hoc package such as [a.go b.go]. +Instead, ssadump no longer requests the runtime package, +but seeks it among the dependencies of the user-specified packages, +and emits an error if it is not found. + +Overlays: the ParseFile hook in the API permits clients to vary the way +in which ASTs are obtained from filenames; the default implementation is +based on parser.ParseFile. This features enables editor-integrated tools +that analyze the contents of modified but unsaved buffers: rather than +read from the file system, a tool can read from an archive of modified +buffers provided by the editor. +This approach has its limits. Because package metadata is obtained by +fork/execing an external query command for each build system, we can +fake only the file contents seen by the parser, type-checker, and +application, but not by the metadata query, so, for example: +- additional imports in the fake file will not be described by the + metadata, so the type checker will fail to load imports that create + new dependencies. +- in TypeCheck mode, because export data is produced by the query + command, it will not reflect the fake file contents. +- this mechanism cannot add files to a package without first saving them. + +Questions & Tasks + +- Add GOARCH/GOOS? + They are not portable concepts, but could be made portable. + Our goal has been to allow users to express themselves using the conventions + of the underlying build system: if the build system honors GOARCH + during a build and during a metadata query, then so should + applications built atop that query mechanism. + Conversely, if the target architecture of the build is determined by + command-line flags, the application can pass the relevant + flags through to the build system using a command such as: + myapp -query_flag="--cpu=amd64" -query_flag="--os=darwin" + However, this approach is low-level, unwieldy, and non-portable. + GOOS and GOARCH seem important enough to warrant a dedicated option. + +- How should we handle partial failures such as a mixture of good and + malformed patterns, existing and non-existent packages, successful and + failed builds, import failures, import cycles, and so on, in a call to + Load? + +- Support bazel, blaze, and go1.10 list, not just go1.11 list. + +- Handle (and test) various partial success cases, e.g. + a mixture of good packages and: + invalid patterns + nonexistent packages + empty packages + packages with malformed package or import declarations + unreadable files + import cycles + other parse errors + type errors + Make sure we record errors at the correct place in the graph. + +- Missing packages among initial arguments are not reported. + Return bogus packages for them, like golist does. + +- "undeclared name" errors (for example) are reported out of source file + order. I suspect this is due to the breadth-first resolution now used + by go/types. Is that a bug? Discuss with gri. + +*/ diff --git a/deps/golang.org/x/tools/go/packages/external.go b/deps/golang.org/x/tools/go/packages/external.go new file mode 100644 index 000000000..80aac505e --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/external.go @@ -0,0 +1,68 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file enables an external tool to intercept package requests. +// If the tool is present then its results are used in preference to +// the go list command. + +package packages + +import ( + "bytes" + "encoding/json" + "fmt" + "os/exec" + "strings" +) + +// findExternalTool returns the file path of a tool that supplies supplies +// the build system package structure, or "" if not found." +// If GOPACKAGESDRIVER is set in the environment findExternalTool returns its +// value, otherwise it searches for a binary named gopackagesdriver on the PATH. +func findExternalDriver(cfg *Config) driver { + const toolPrefix = "GOPACKAGESDRIVER=" + tool := "" + for _, env := range cfg.Env { + if val := strings.TrimPrefix(env, toolPrefix); val != env { + tool = val + } + } + if tool != "" && tool == "off" { + return nil + } + if tool == "" { + var err error + tool, err = exec.LookPath("gopackagesdriver") + if err != nil { + return nil + } + } + return func(cfg *Config, words ...string) (*driverResponse, error) { + buf := new(bytes.Buffer) + fullargs := []string{ + "list", + fmt.Sprintf("-test=%t", cfg.Tests), + fmt.Sprintf("-export=%t", usesExportData(cfg)), + fmt.Sprintf("-deps=%t", cfg.Mode >= LoadImports), + } + for _, f := range cfg.BuildFlags { + fullargs = append(fullargs, fmt.Sprintf("-buildflag=%v", f)) + } + fullargs = append(fullargs, "--") + fullargs = append(fullargs, words...) + cmd := exec.CommandContext(cfg.Context, tool, fullargs...) + cmd.Env = cfg.Env + cmd.Dir = cfg.Dir + cmd.Stdout = buf + cmd.Stderr = new(bytes.Buffer) + if err := cmd.Run(); err != nil { + return nil, fmt.Errorf("%v: %v: %s", tool, err, cmd.Stderr) + } + var response driverResponse + if err := json.Unmarshal(buf.Bytes(), &response); err != nil { + return nil, err + } + return &response, nil + } +} diff --git a/deps/golang.org/x/tools/go/packages/golist.go b/deps/golang.org/x/tools/go/packages/golist.go new file mode 100644 index 000000000..d3ead604f --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/golist.go @@ -0,0 +1,337 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packages + +import ( + "bytes" + "encoding/json" + "fmt" + "log" + "os" + "os/exec" + "path/filepath" + "strings" +) + +// A goTooOldError reports that the go command +// found by exec.LookPath is too old to use the new go list behavior. +type goTooOldError struct { + error +} + +// goListDriver uses the go list command to interpret the patterns and produce +// the build system package structure. +// See driver for more details. +func goListDriver(cfg *Config, patterns ...string) (*driverResponse, error) { + // Determine files requested in contains patterns + var containFiles []string + restPatterns := make([]string, 0, len(patterns)) + for _, pattern := range patterns { + if strings.HasPrefix(pattern, "contains:") { + containFile := strings.TrimPrefix(pattern, "contains:") + containFiles = append(containFiles, containFile) + } else { + restPatterns = append(restPatterns, pattern) + } + } + containFiles = absJoin(cfg.Dir, containFiles) + patterns = restPatterns + + // TODO(matloob): Remove the definition of listfunc and just use golistPackages once go1.12 is released. + var listfunc driver + listfunc = func(cfg *Config, words ...string) (*driverResponse, error) { + response, err := golistDriverCurrent(cfg, patterns...) + if _, ok := err.(goTooOldError); ok { + listfunc = golistDriverFallback + return listfunc(cfg, patterns...) + } + listfunc = golistDriverCurrent + return response, err + } + + var response *driverResponse + var err error + + // see if we have any patterns to pass through to go list. + if len(patterns) > 0 { + response, err = listfunc(cfg, patterns...) + if err != nil { + return nil, err + } + } else { + response = &driverResponse{} + } + + // Run go list for contains: patterns. + seenPkgs := make(map[string]*Package) // for deduplication. different containing queries could produce same packages + if len(containFiles) > 0 { + for _, pkg := range response.Packages { + seenPkgs[pkg.ID] = pkg + } + } + for _, f := range containFiles { + // TODO(matloob): Do only one query per directory. + fdir := filepath.Dir(f) + cfg.Dir = fdir + dirResponse, err := listfunc(cfg, ".") + if err != nil { + return nil, err + } + isRoot := make(map[string]bool, len(dirResponse.Roots)) + for _, root := range dirResponse.Roots { + isRoot[root] = true + } + for _, pkg := range dirResponse.Packages { + // Add any new packages to the main set + // We don't bother to filter packages that will be dropped by the changes of roots, + // that will happen anyway during graph construction outside this function. + // Over-reporting packages is not a problem. + if _, ok := seenPkgs[pkg.ID]; !ok { + // it is a new package, just add it + seenPkgs[pkg.ID] = pkg + response.Packages = append(response.Packages, pkg) + } + // if the package was not a root one, it cannot have the file + if !isRoot[pkg.ID] { + continue + } + for _, pkgFile := range pkg.GoFiles { + if filepath.Base(f) == filepath.Base(pkgFile) { + response.Roots = append(response.Roots, pkg.ID) + break + } + } + } + } + return response, nil +} + +// Fields must match go list; +// see $GOROOT/src/cmd/go/internal/load/pkg.go. +type jsonPackage struct { + ImportPath string + Dir string + Name string + Export string + GoFiles []string + CompiledGoFiles []string + CFiles []string + CgoFiles []string + CXXFiles []string + MFiles []string + HFiles []string + FFiles []string + SFiles []string + SwigFiles []string + SwigCXXFiles []string + SysoFiles []string + Imports []string + ImportMap map[string]string + Deps []string + TestGoFiles []string + TestImports []string + XTestGoFiles []string + XTestImports []string + ForTest string // q in a "p [q.test]" package, else "" + DepOnly bool +} + +func otherFiles(p *jsonPackage) [][]string { + return [][]string{p.CFiles, p.CXXFiles, p.MFiles, p.HFiles, p.FFiles, p.SFiles, p.SwigFiles, p.SwigCXXFiles, p.SysoFiles} +} + +// golistDriverCurrent uses the "go list" command to expand the +// pattern words and return metadata for the specified packages. +// dir may be "" and env may be nil, as per os/exec.Command. +func golistDriverCurrent(cfg *Config, words ...string) (*driverResponse, error) { + // go list uses the following identifiers in ImportPath and Imports: + // + // "p" -- importable package or main (command) + // "q.test" -- q's test executable + // "p [q.test]" -- variant of p as built for q's test executable + // "q_test [q.test]" -- q's external test package + // + // The packages p that are built differently for a test q.test + // are q itself, plus any helpers used by the external test q_test, + // typically including "testing" and all its dependencies. + + // Run "go list" for complete + // information on the specified packages. + buf, err := golist(cfg, golistargs(cfg, words)) + if err != nil { + return nil, err + } + // Decode the JSON and convert it to Package form. + var response driverResponse + for dec := json.NewDecoder(buf); dec.More(); { + p := new(jsonPackage) + if err := dec.Decode(p); err != nil { + return nil, fmt.Errorf("JSON decoding failed: %v", err) + } + + // Bad package? + if p.Name == "" { + // This could be due to: + // - no such package + // - package directory contains no Go source files + // - all package declarations are mangled + // - and possibly other things. + // + // For now, we throw it away and let later + // stages rediscover the problem, but this + // discards the error message computed by go list + // and computes a new one---by different logic: + // if only one of the package declarations is + // bad, for example, should we report an error + // in Metadata mode? + // Unless we parse and typecheck, we might not + // notice there's a problem. + // + // Perhaps we should save a map of PackageID to + // errors for such cases. + continue + } + + id := p.ImportPath + + // Extract the PkgPath from the package's ID. + pkgpath := id + if i := strings.IndexByte(id, ' '); i >= 0 { + pkgpath = id[:i] + } + + if pkgpath == "unsafe" { + p.GoFiles = nil // ignore fake unsafe.go file + } + + // Assume go list emits only absolute paths for Dir. + if !filepath.IsAbs(p.Dir) { + log.Fatalf("internal error: go list returned non-absolute Package.Dir: %s", p.Dir) + } + + export := p.Export + if export != "" && !filepath.IsAbs(export) { + export = filepath.Join(p.Dir, export) + } + + // imports + // + // Imports contains the IDs of all imported packages. + // ImportsMap records (path, ID) only where they differ. + ids := make(map[string]bool) + for _, id := range p.Imports { + ids[id] = true + } + imports := make(map[string]*Package) + for path, id := range p.ImportMap { + imports[path] = &Package{ID: id} // non-identity import + delete(ids, id) + } + for id := range ids { + if id == "C" { + continue + } + + imports[id] = &Package{ID: id} // identity import + } + if !p.DepOnly { + response.Roots = append(response.Roots, id) + } + pkg := &Package{ + ID: id, + Name: p.Name, + PkgPath: pkgpath, + GoFiles: absJoin(p.Dir, p.GoFiles, p.CgoFiles), + CompiledGoFiles: absJoin(p.Dir, p.CompiledGoFiles), + OtherFiles: absJoin(p.Dir, otherFiles(p)...), + Imports: imports, + ExportFile: export, + } + // TODO(matloob): Temporary hack since CompiledGoFiles isn't always set. + if len(pkg.CompiledGoFiles) == 0 { + pkg.CompiledGoFiles = pkg.GoFiles + } + response.Packages = append(response.Packages, pkg) + } + + return &response, nil +} + +// absJoin absolutizes and flattens the lists of files. +func absJoin(dir string, fileses ...[]string) (res []string) { + for _, files := range fileses { + for _, file := range files { + if !filepath.IsAbs(file) { + file = filepath.Join(dir, file) + } + res = append(res, file) + } + } + return res +} + +func golistargs(cfg *Config, words []string) []string { + fullargs := []string{ + "list", "-e", "-json", "-compiled", + fmt.Sprintf("-test=%t", cfg.Tests), + fmt.Sprintf("-export=%t", usesExportData(cfg)), + fmt.Sprintf("-deps=%t", cfg.Mode >= LoadImports), + } + fullargs = append(fullargs, cfg.BuildFlags...) + fullargs = append(fullargs, "--") + fullargs = append(fullargs, words...) + return fullargs +} + +// golist returns the JSON-encoded result of a "go list args..." query. +func golist(cfg *Config, args []string) (*bytes.Buffer, error) { + out := new(bytes.Buffer) + cmd := exec.CommandContext(cfg.Context, "go", args...) + cmd.Env = cfg.Env + cmd.Dir = cfg.Dir + cmd.Stdout = out + cmd.Stderr = new(bytes.Buffer) + if err := cmd.Run(); err != nil { + exitErr, ok := err.(*exec.ExitError) + if !ok { + // Catastrophic error: + // - executable not found + // - context cancellation + return nil, fmt.Errorf("couldn't exec 'go list': %s %T", err, err) + } + + // Old go list? + if strings.Contains(fmt.Sprint(cmd.Stderr), "flag provided but not defined") { + return nil, goTooOldError{fmt.Errorf("unsupported version of go list: %s: %s", exitErr, cmd.Stderr)} + } + + // Export mode entails a build. + // If that build fails, errors appear on stderr + // (despite the -e flag) and the Export field is blank. + // Do not fail in that case. + if !usesExportData(cfg) { + return nil, fmt.Errorf("go list: %s: %s", exitErr, cmd.Stderr) + } + } + + // Print standard error output from "go list". + // Due to the -e flag, this should be empty. + // However, in -export mode it contains build errors. + // Should go list save build errors in the Package.Error JSON field? + // See https://github.com/golang/go/issues/26319. + // If so, then we should continue to print stderr as go list + // will be silent unless something unexpected happened. + // If not, perhaps we should suppress it to reduce noise. + if stderr := fmt.Sprint(cmd.Stderr); stderr != "" { + fmt.Fprintf(os.Stderr, "go list stderr <<%s>>\n", stderr) + } + + // debugging + if false { + fmt.Fprintln(os.Stderr, out) + } + + return out, nil +} diff --git a/deps/golang.org/x/tools/go/packages/golist_fallback.go b/deps/golang.org/x/tools/go/packages/golist_fallback.go new file mode 100644 index 000000000..835e2aba2 --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/golist_fallback.go @@ -0,0 +1,282 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packages + +import ( + "encoding/json" + "fmt" + + "go/build" + "io/ioutil" + "os" + "path/filepath" + "sort" + "strings" + + "golang.org/x/tools/go/internal/cgo" +) + +// TODO(matloob): Delete this file once Go 1.12 is released. + +// This file provides backwards compatibility support for +// loading for versions of Go earlier than 1.10.4. This support is meant to +// assist with migration to the Package API until there's +// widespread adoption of these newer Go versions. +// This support will be removed once Go 1.12 is released +// in Q1 2019. + +func golistDriverFallback(cfg *Config, words ...string) (*driverResponse, error) { + original, deps, err := getDeps(cfg, words...) + if err != nil { + return nil, err + } + + var tmpdir string // used for generated cgo files + + var response driverResponse + addPackage := func(p *jsonPackage) { + if p.Name == "" { + return + } + + id := p.ImportPath + isRoot := original[id] != nil + pkgpath := id + + if pkgpath == "unsafe" { + p.GoFiles = nil // ignore fake unsafe.go file + } + + importMap := func(importlist []string) map[string]*Package { + importMap := make(map[string]*Package) + for _, id := range importlist { + + if id == "C" { + for _, path := range []string{"unsafe", "syscall", "runtime/cgo"} { + if pkgpath != path && importMap[path] == nil { + importMap[path] = &Package{ID: path} + } + } + continue + } + importMap[vendorlessPath(id)] = &Package{ID: id} + } + return importMap + } + compiledGoFiles := absJoin(p.Dir, p.GoFiles) + // Use a function to simplify control flow. It's just a bunch of gotos. + var cgoErrors []error + processCgo := func() bool { + // Suppress any cgo errors. Any relevant errors will show up in typechecking. + // TODO(matloob): Skip running cgo if Mode < LoadTypes. + if tmpdir == "" { + if tmpdir, err = ioutil.TempDir("", "gopackages"); err != nil { + cgoErrors = append(cgoErrors, err) + return false + } + } + outdir := filepath.Join(tmpdir, strings.Replace(p.ImportPath, "/", "_", -1)) + if err := os.Mkdir(outdir, 0755); err != nil { + cgoErrors = append(cgoErrors, err) + return false + } + files, _, err := runCgo(p.Dir, outdir, cfg.Env) + if err != nil { + cgoErrors = append(cgoErrors, err) + return false + } + compiledGoFiles = append(compiledGoFiles, files...) + return true + } + if len(p.CgoFiles) == 0 || !processCgo() { + compiledGoFiles = append(compiledGoFiles, absJoin(p.Dir, p.CgoFiles)...) // Punt to typechecker. + } + if isRoot { + response.Roots = append(response.Roots, id) + } + response.Packages = append(response.Packages, &Package{ + ID: id, + Name: p.Name, + GoFiles: absJoin(p.Dir, p.GoFiles, p.CgoFiles), + CompiledGoFiles: compiledGoFiles, + OtherFiles: absJoin(p.Dir, otherFiles(p)...), + PkgPath: pkgpath, + Imports: importMap(p.Imports), + // TODO(matloob): set errors on the Package to cgoErrors + }) + if cfg.Tests { + testID := fmt.Sprintf("%s [%s.test]", id, id) + if len(p.TestGoFiles) > 0 || len(p.XTestGoFiles) > 0 { + if isRoot { + response.Roots = append(response.Roots, testID) + } + response.Packages = append(response.Packages, &Package{ + ID: testID, + Name: p.Name, + GoFiles: absJoin(p.Dir, p.GoFiles, p.CgoFiles, p.TestGoFiles), + CompiledGoFiles: append(compiledGoFiles, absJoin(p.Dir, p.TestGoFiles)...), + OtherFiles: absJoin(p.Dir, otherFiles(p)...), + PkgPath: pkgpath, + Imports: importMap(append(p.Imports, p.TestImports...)), + // TODO(matloob): set errors on the Package to cgoErrors + }) + if len(p.XTestGoFiles) > 0 { + xtestID := fmt.Sprintf("%s_test [%s.test]", id, id) + if isRoot { + response.Roots = append(response.Roots, xtestID) + } + for i, imp := range p.XTestImports { + if imp == p.ImportPath { + p.XTestImports[i] = testID + break + } + } + response.Packages = append(response.Packages, &Package{ + ID: xtestID, + Name: p.Name + "_test", + GoFiles: absJoin(p.Dir, p.XTestGoFiles), + CompiledGoFiles: absJoin(p.Dir, p.XTestGoFiles), + PkgPath: pkgpath, + Imports: importMap(p.XTestImports), + }) + } + } + } + } + + for _, pkg := range original { + addPackage(pkg) + } + if cfg.Mode < LoadImports || len(deps) == 0 { + return &response, nil + } + + buf, err := golist(cfg, golistArgsFallback(cfg, deps)) + if err != nil { + return nil, err + } + + // Decode the JSON and convert it to Package form. + for dec := json.NewDecoder(buf); dec.More(); { + p := new(jsonPackage) + if err := dec.Decode(p); err != nil { + return nil, fmt.Errorf("JSON decoding failed: %v", err) + } + + addPackage(p) + } + + return &response, nil +} + +// vendorlessPath returns the devendorized version of the import path ipath. +// For example, VendorlessPath("foo/bar/vendor/a/b") returns "a/b". +// Copied from golang.org/x/tools/imports/fix.go. +func vendorlessPath(ipath string) string { + // Devendorize for use in import statement. + if i := strings.LastIndex(ipath, "/vendor/"); i >= 0 { + return ipath[i+len("/vendor/"):] + } + if strings.HasPrefix(ipath, "vendor/") { + return ipath[len("vendor/"):] + } + return ipath +} + +// getDeps runs an initial go list to determine all the dependency packages. +func getDeps(cfg *Config, words ...string) (originalSet map[string]*jsonPackage, deps []string, err error) { + buf, err := golist(cfg, golistArgsFallback(cfg, words)) + if err != nil { + return nil, nil, err + } + + depsSet := make(map[string]bool) + originalSet = make(map[string]*jsonPackage) + var testImports []string + + // Extract deps from the JSON. + for dec := json.NewDecoder(buf); dec.More(); { + p := new(jsonPackage) + if err := dec.Decode(p); err != nil { + return nil, nil, fmt.Errorf("JSON decoding failed: %v", err) + } + + originalSet[p.ImportPath] = p + for _, dep := range p.Deps { + depsSet[dep] = true + } + if cfg.Tests { + // collect the additional imports of the test packages. + pkgTestImports := append(p.TestImports, p.XTestImports...) + for _, imp := range pkgTestImports { + if depsSet[imp] { + continue + } + depsSet[imp] = true + testImports = append(testImports, imp) + } + } + } + // Get the deps of the packages imported by tests. + if len(testImports) > 0 { + buf, err = golist(cfg, golistArgsFallback(cfg, testImports)) + if err != nil { + return nil, nil, err + } + // Extract deps from the JSON. + for dec := json.NewDecoder(buf); dec.More(); { + p := new(jsonPackage) + if err := dec.Decode(p); err != nil { + return nil, nil, fmt.Errorf("JSON decoding failed: %v", err) + } + for _, dep := range p.Deps { + depsSet[dep] = true + } + } + } + + for orig := range originalSet { + delete(depsSet, orig) + } + + deps = make([]string, 0, len(depsSet)) + for dep := range depsSet { + deps = append(deps, dep) + } + sort.Strings(deps) // ensure output is deterministic + return originalSet, deps, nil +} + +func golistArgsFallback(cfg *Config, words []string) []string { + fullargs := []string{"list", "-e", "-json"} + fullargs = append(fullargs, cfg.BuildFlags...) + fullargs = append(fullargs, "--") + fullargs = append(fullargs, words...) + return fullargs +} + +func runCgo(pkgdir, tmpdir string, env []string) (files, displayfiles []string, err error) { + // Use go/build to open cgo files and determine the cgo flags, etc, from them. + // This is tricky so it's best to avoid reimplementing as much as we can, and + // we plan to delete this support once Go 1.12 is released anyways. + // TODO(matloob): This isn't completely correct because we're using the Default + // context. Perhaps we should more accurately fill in the context. + bp, err := build.ImportDir(pkgdir, build.ImportMode(0)) + if err != nil { + return nil, nil, err + } + for _, ev := range env { + if v := strings.TrimPrefix(ev, "CGO_CPPFLAGS"); v != ev { + bp.CgoCPPFLAGS = append(bp.CgoCPPFLAGS, strings.Fields(v)...) + } else if v := strings.TrimPrefix(ev, "CGO_CFLAGS"); v != ev { + bp.CgoCFLAGS = append(bp.CgoCFLAGS, strings.Fields(v)...) + } else if v := strings.TrimPrefix(ev, "CGO_CXXFLAGS"); v != ev { + bp.CgoCXXFLAGS = append(bp.CgoCXXFLAGS, strings.Fields(v)...) + } else if v := strings.TrimPrefix(ev, "CGO_LDFLAGS"); v != ev { + bp.CgoLDFLAGS = append(bp.CgoLDFLAGS, strings.Fields(v)...) + } + } + return cgo.Run(bp, pkgdir, tmpdir, true) +} diff --git a/deps/golang.org/x/tools/go/packages/gopackages/main.go b/deps/golang.org/x/tools/go/packages/gopackages/main.go new file mode 100644 index 000000000..5b22de5a9 --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/gopackages/main.go @@ -0,0 +1,273 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// The gopackages command is a diagnostic tool that demonstrates +// how to use golang.org/x/tools/go/packages to load, parse, +// type-check, and print one or more Go packages. +// Its precise output is unspecified and may change. +package main + +import ( + "encoding/json" + "flag" + "fmt" + "go/types" + "log" + "os" + "runtime" + "runtime/pprof" + "runtime/trace" + "sort" + "strings" + + "golang.org/x/tools/go/packages" + "golang.org/x/tools/go/types/typeutil" +) + +// flags +var ( + depsFlag = flag.Bool("deps", false, "show dependencies too") + testFlag = flag.Bool("test", false, "include any tests implied by the patterns") + mode = flag.String("mode", "imports", "mode (one of files, imports, types, syntax, allsyntax)") + private = flag.Bool("private", false, "show non-exported declarations too") + printJSON = flag.Bool("json", false, "print package in JSON form") + + cpuprofile = flag.String("cpuprofile", "", "write CPU profile to this file") + memprofile = flag.String("memprofile", "", "write memory profile to this file") + traceFlag = flag.String("trace", "", "write trace log to this file") + + buildFlags stringListValue +) + +func init() { + flag.Var(&buildFlags, "buildflag", "pass argument to underlying build system (may be repeated)") +} + +func usage() { + fmt.Fprintln(os.Stderr, `Usage: gopackages [-deps] [-cgo] [-mode=...] [-private] package... + +The gopackages command loads, parses, type-checks, +and prints one or more Go packages. + +Packages are specified using the notation of "go list", +or other underlying build system. + +Flags:`) + flag.PrintDefaults() +} + +func main() { + log.SetPrefix("gopackages: ") + log.SetFlags(0) + flag.Usage = usage + flag.Parse() + + if len(flag.Args()) == 0 { + usage() + os.Exit(1) + } + + if *cpuprofile != "" { + f, err := os.Create(*cpuprofile) + if err != nil { + log.Fatal(err) + } + if err := pprof.StartCPUProfile(f); err != nil { + log.Fatal(err) + } + // NB: profile won't be written in case of error. + defer pprof.StopCPUProfile() + } + + if *traceFlag != "" { + f, err := os.Create(*traceFlag) + if err != nil { + log.Fatal(err) + } + if err := trace.Start(f); err != nil { + log.Fatal(err) + } + // NB: trace log won't be written in case of error. + defer func() { + trace.Stop() + log.Printf("To view the trace, run:\n$ go tool trace view %s", *traceFlag) + }() + } + + if *memprofile != "" { + f, err := os.Create(*memprofile) + if err != nil { + log.Fatal(err) + } + // NB: memprofile won't be written in case of error. + defer func() { + runtime.GC() // get up-to-date statistics + if err := pprof.WriteHeapProfile(f); err != nil { + log.Fatalf("Writing memory profile: %v", err) + } + f.Close() + }() + } + + // Load, parse, and type-check the packages named on the command line. + cfg := &packages.Config{ + Mode: packages.LoadSyntax, + Error: func(error) {}, // we'll take responsibility for printing errors + Tests: *testFlag, + BuildFlags: buildFlags, + } + + // -mode flag + switch strings.ToLower(*mode) { + case "files": + cfg.Mode = packages.LoadFiles + case "imports": + cfg.Mode = packages.LoadImports + case "types": + cfg.Mode = packages.LoadTypes + case "syntax": + cfg.Mode = packages.LoadSyntax + case "allsyntax": + cfg.Mode = packages.LoadAllSyntax + default: + log.Fatalf("invalid mode: %s", *mode) + } + + lpkgs, err := packages.Load(cfg, flag.Args()...) + if err != nil { + log.Fatal(err) + } + + // -deps: print dependencies too. + if *depsFlag { + // We can't use packages.All because + // we need an ordered traversal. + var all []*packages.Package // postorder + seen := make(map[*packages.Package]bool) + var visit func(*packages.Package) + visit = func(lpkg *packages.Package) { + if !seen[lpkg] { + seen[lpkg] = true + + // visit imports + var importPaths []string + for path := range lpkg.Imports { + importPaths = append(importPaths, path) + } + sort.Strings(importPaths) // for determinism + for _, path := range importPaths { + visit(lpkg.Imports[path]) + } + + all = append(all, lpkg) + } + } + for _, lpkg := range lpkgs { + visit(lpkg) + } + lpkgs = all + } + + for _, lpkg := range lpkgs { + print(lpkg) + } +} + +func print(lpkg *packages.Package) { + if *printJSON { + data, _ := json.MarshalIndent(lpkg, "", "\t") + os.Stdout.Write(data) + return + } + // title + var kind string + // TODO(matloob): If IsTest is added back print "test command" or + // "test package" for packages with IsTest == true. + if lpkg.Name == "main" { + kind += "command" + } else { + kind += "package" + } + fmt.Printf("Go %s %q:\n", kind, lpkg.ID) // unique ID + fmt.Printf("\tpackage %s\n", lpkg.Name) + + // characterize type info + if lpkg.Types == nil { + fmt.Printf("\thas no exported type info\n") + } else if !lpkg.Types.Complete() { + fmt.Printf("\thas incomplete exported type info\n") + } else if len(lpkg.Syntax) == 0 { + fmt.Printf("\thas complete exported type info\n") + } else { + fmt.Printf("\thas complete exported type info and typed ASTs\n") + } + if lpkg.Types != nil && lpkg.IllTyped && len(lpkg.Errors) == 0 { + fmt.Printf("\thas an error among its dependencies\n") + } + + // source files + for _, src := range lpkg.GoFiles { + fmt.Printf("\tfile %s\n", src) + } + + // imports + var lines []string + for importPath, imp := range lpkg.Imports { + var line string + if imp.ID == importPath { + line = fmt.Sprintf("\timport %q", importPath) + } else { + line = fmt.Sprintf("\timport %q => %q", importPath, imp.ID) + } + lines = append(lines, line) + } + sort.Strings(lines) + for _, line := range lines { + fmt.Println(line) + } + + // errors + for _, err := range lpkg.Errors { + fmt.Printf("\t%s\n", err) + } + + // package members (TypeCheck or WholeProgram mode) + if lpkg.Types != nil { + qual := types.RelativeTo(lpkg.Types) + scope := lpkg.Types.Scope() + for _, name := range scope.Names() { + obj := scope.Lookup(name) + if !obj.Exported() && !*private { + continue // skip unexported names + } + + fmt.Printf("\t%s\n", types.ObjectString(obj, qual)) + if _, ok := obj.(*types.TypeName); ok { + for _, meth := range typeutil.IntuitiveMethodSet(obj.Type(), nil) { + if !meth.Obj().Exported() && !*private { + continue // skip unexported names + } + fmt.Printf("\t%s\n", types.SelectionString(meth, qual)) + } + } + } + } + + fmt.Println() +} + +// stringListValue is a flag.Value that accumulates strings. +// e.g. --flag=one --flag=two would produce []string{"one", "two"}. +type stringListValue []string + +func newStringListValue(val []string, p *[]string) *stringListValue { + *p = val + return (*stringListValue)(p) +} + +func (ss *stringListValue) Get() interface{} { return []string(*ss) } + +func (ss *stringListValue) String() string { return fmt.Sprintf("%q", *ss) } + +func (ss *stringListValue) Set(s string) error { *ss = append(*ss, s); return nil } diff --git a/deps/golang.org/x/tools/go/packages/packages.go b/deps/golang.org/x/tools/go/packages/packages.go new file mode 100644 index 000000000..1a4c1da54 --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/packages.go @@ -0,0 +1,854 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packages + +// See doc.go for package documentation and implementation notes. + +import ( + "context" + "encoding/json" + "fmt" + "go/ast" + "go/parser" + "go/token" + "go/types" + "log" + "os" + "sync" + + "golang.org/x/tools/go/gcexportdata" +) + +// A LoadMode specifies the amount of detail to return when loading. +// Higher-numbered modes cause Load to return more information, +// but may be slower. Load may return more information than requested. +type LoadMode int + +const ( + // LoadFiles finds the packages and computes their source file lists. + // Package fields: ID, Name, Errors, GoFiles, and OtherFiles. + LoadFiles LoadMode = iota + + // LoadImports adds import information for each package + // and its dependencies. + // Package fields added: Imports. + LoadImports + + // LoadTypes adds type information for package-level + // declarations in the packages matching the patterns. + // Package fields added: Types, Fset, and IllTyped. + // This mode uses type information provided by the build system when + // possible, and may fill in the ExportFile field. + LoadTypes + + // LoadSyntax adds typed syntax trees for the packages matching the patterns. + // Package fields added: Syntax, and TypesInfo, for direct pattern matches only. + LoadSyntax + + // LoadAllSyntax adds typed syntax trees for the packages matching the patterns + // and all dependencies. + // Package fields added: Types, Fset, Illtyped, Syntax, and TypesInfo, + // for all packages in the import graph. + LoadAllSyntax +) + +// An Config specifies details about how packages should be loaded. +// The zero value is a valid configuration. +// Calls to Load do not modify this struct. +type Config struct { + // Mode controls the level of information returned for each package. + Mode LoadMode + + // Context specifies the context for the load operation. + // If the context is cancelled, the loader may stop early + // and return an ErrCancelled error. + // If Context is nil, the load cannot be cancelled. + Context context.Context + + // Dir is the directory in which to run the build system's query tool + // that provides information about the packages. + // If Dir is empty, the tool is run in the current directory. + Dir string + + // Env is the environment to use when invoking the build system's query tool. + // If Env is nil, the current environment is used. + // As in os/exec's Cmd, only the last value in the slice for + // each environment key is used. To specify the setting of only + // a few variables, append to the current environment, as in: + // + // opt.Env = append(os.Environ(), "GOOS=plan9", "GOARCH=386") + // + Env []string + + // BuildFlags is a list of command-line flags to be passed through to + // the build system's query tool. + BuildFlags []string + + // Error is called for each error encountered during parsing and type-checking. + // It must be safe to call Error simultaneously from multiple goroutines. + // In addition to calling Error, the loader records each error + // in the corresponding Package's Errors list. + // If Error is nil, the loader prints errors to os.Stderr. + // To disable printing of errors, set opt.Error = func(error) {}. + Error func(error) + + // Fset provides source position information for syntax trees and types. + // If Fset is nil, the loader will create a new FileSet. + Fset *token.FileSet + + // ParseFile is called to read and parse each file + // when preparing a package's type-checked syntax tree. + // It must be safe to call ParseFile simultaneously from multiple goroutines. + // If ParseFile is nil, the loader will uses parser.ParseFile. + // + // Setting ParseFile to a custom implementation can allow + // providing alternate file content in order to type-check + // unsaved text editor buffers, or to selectively eliminate + // unwanted function bodies to reduce the amount of work + // done by the type checker. + ParseFile func(fset *token.FileSet, filename string) (*ast.File, error) + + // If Tests is set, the loader includes not just the packages + // matching a particular pattern but also any related test packages, + // including test-only variants of the package and the test executable. + // + // For example, when using the go command, loading "fmt" with Tests=true + // returns four packages, with IDs "fmt" (the standard package), + // "fmt [fmt.test]" (the package as compiled for the test), + // "fmt_test" (the test functions from source files in package fmt_test), + // and "fmt.test" (the test binary). + // + // In build systems with explicit names for tests, + // setting Tests may have no effect. + Tests bool +} + +// driver is the type for functions that query the build system for the +// packages named by the patterns. +type driver func(cfg *Config, patterns ...string) (*driverResponse, error) + +// driverResponse contains the results for a driver query. +type driverResponse struct { + // Roots is the set of package IDs that make up the root packages. + // We have to encode this separately because when we encode a single package + // we cannot know if it is one of the roots as that requires knowledge of the + // graph it is part of. + Roots []string `json:",omitempty"` + + // Packages is the full set of packages in the graph. + // The packages are not connected into a graph. + // The Imports if populated will be stubs that only have their ID set. + // Imports will be connected and then type and syntax information added in a + // later pass (see refine). + Packages []*Package +} + +// Load loads and returns the Go packages named by the given patterns. +// +// Config specifies loading options; +// nil behaves the same as an empty Config. +// +// Load returns an error if any of the patterns was invalid +// as defined by the underlying build system. +// It may return an empty list of packages without an error, +// for instance for an empty expansion of a valid wildcard. +func Load(cfg *Config, patterns ...string) ([]*Package, error) { + l := newLoader(cfg) + response, err := defaultDriver(&l.Config, patterns...) + if err != nil { + return nil, err + } + return l.refine(response.Roots, response.Packages...) +} + +// defaultDriver is a driver that looks for an external driver binary, and if +// it does not find it falls back to the built in go list driver. +func defaultDriver(cfg *Config, patterns ...string) (*driverResponse, error) { + driver := findExternalDriver(cfg) + if driver == nil { + driver = goListDriver + } + return driver(cfg, patterns...) +} + +// A Package describes a loaded Go package. +type Package struct { + // ID is a unique identifier for a package, + // in a syntax provided by the underlying build system. + // + // Because the syntax varies based on the build system, + // clients should treat IDs as opaque and not attempt to + // interpret them. + ID string + + // Name is the package name as it appears in the package source code. + Name string + + // PkgPath is the package path as used by the go/types package. + PkgPath string + + // Errors contains any errors encountered while parsing or type-checking the package. + // Possible error types include *scanner.ErrorList and types.Error, + // whose fields provide structured position information. + // Error strings are typically of the form "file:line: message" or + // "file:line:col: message". + // TODO(adonovan): export packageError as packages.Error + // and add that type to the list of structured errors. + Errors []error + + // GoFiles lists the absolute file paths of the package's Go source files. + GoFiles []string + + // CompiledGoFiles lists the absolute file paths of the package's source + // files that were presented to the compiler. + // This may differ from GoFiles if files are processed before compilation. + CompiledGoFiles []string + + // OtherFiles lists the absolute file paths of the package's non-Go source files, + // including assembly, C, C++, Fortran, Objective-C, SWIG, and so on. + OtherFiles []string + + // ExportFile is the absolute path to a file containing type + // information for the package as provided by the build system. + ExportFile string + + // Imports maps import paths appearing in the package's Go source files + // to corresponding loaded Packages. + Imports map[string]*Package + + // Types provides type information for the package. + // Modes LoadTypes and above set this field for packages matching the + // patterns; type information for dependencies may be missing or incomplete. + // Mode LoadSyntaxAll sets this field for all packages, including dependencies. + Types *types.Package + + // Fset provides position information for Types, TypesInfo, and Syntax. + // It is set only when Types is set. + Fset *token.FileSet + + // IllTyped indicates whether the package has any type errors. + // It is set only when Types is set. + IllTyped bool + + // Syntax is the package's syntax trees, for the files listed in CompiledGoFiles. + // + // Mode LoadSyntax sets this field for packages matching the patterns. + // Mode LoadSyntaxAll sets this field for all packages, including dependencies. + Syntax []*ast.File + + // TypesInfo provides type information about the package's syntax trees. + // It is set only when Syntax is set. + TypesInfo *types.Info +} + +// packageError is used to serialize structured errors as much as possible. +// This has members compatible with the golist error type, and possibly some +// more if we need other error information to survive. +type packageError struct { + Pos string // position of error + Err string // the error itself +} + +func (e *packageError) Error() string { + return e.Pos + ": " + e.Err +} + +// flatPackage is the JSON form of Package +// It drops all the type and syntax fields, and transforms the Imports and Errors +type flatPackage struct { + ID string + Name string `json:",omitempty"` + PkgPath string `json:",omitempty"` + Errors []*packageError `json:",omitempty"` + GoFiles []string `json:",omitempty"` + CompiledGoFiles []string `json:",omitempty"` + OtherFiles []string `json:",omitempty"` + ExportFile string `json:",omitempty"` + Imports map[string]string `json:",omitempty"` +} + +// MarshalJSON returns the Package in its JSON form. +// For the most part, the structure fields are written out unmodified, and +// the type and syntax fields are skipped. +// The imports are written out as just a map of path to package id. +// The errors are written using a custom type that tries to preserve the +// structure of error types we know about. +// +// This method exists to enable support for additional build systems. It is +// not intended for use by clients of the API and we may change the format. +func (p *Package) MarshalJSON() ([]byte, error) { + flat := &flatPackage{ + ID: p.ID, + Name: p.Name, + PkgPath: p.PkgPath, + GoFiles: p.GoFiles, + CompiledGoFiles: p.CompiledGoFiles, + OtherFiles: p.OtherFiles, + ExportFile: p.ExportFile, + } + if len(p.Errors) > 0 { + flat.Errors = make([]*packageError, len(p.Errors)) + for i, err := range p.Errors { + //TODO: best effort mapping of errors to the serialized form + switch err := err.(type) { + case *packageError: + flat.Errors[i] = err + default: + flat.Errors[i] = &packageError{Err: err.Error()} + } + } + } + if len(p.Imports) > 0 { + flat.Imports = make(map[string]string, len(p.Imports)) + for path, ipkg := range p.Imports { + flat.Imports[path] = ipkg.ID + } + } + return json.Marshal(flat) +} + +// UnmarshalJSON reads in a Package from its JSON format. +// See MarshalJSON for details about the format accepted. +func (p *Package) UnmarshalJSON(b []byte) error { + flat := &flatPackage{} + if err := json.Unmarshal(b, &flat); err != nil { + return err + } + *p = Package{ + ID: flat.ID, + Name: flat.Name, + PkgPath: flat.PkgPath, + GoFiles: flat.GoFiles, + CompiledGoFiles: flat.CompiledGoFiles, + OtherFiles: flat.OtherFiles, + ExportFile: flat.ExportFile, + } + if len(flat.Errors) > 0 { + p.Errors = make([]error, len(flat.Errors)) + for i, err := range flat.Errors { + p.Errors[i] = err + } + } + if len(flat.Imports) > 0 { + p.Imports = make(map[string]*Package, len(flat.Imports)) + for path, id := range flat.Imports { + p.Imports[path] = &Package{ID: id} + } + } + return nil +} + +func (p *Package) String() string { return p.ID } + +// loaderPackage augments Package with state used during the loading phase +type loaderPackage struct { + *Package + importErrors map[string]error // maps each bad import to its error + loadOnce sync.Once + color uint8 // for cycle detection + needsrc bool // load from source (Mode >= LoadTypes) + needtypes bool // type information is either requested or depended on + initial bool // package was matched by a pattern +} + +// loader holds the working state of a single call to load. +type loader struct { + pkgs map[string]*loaderPackage + Config + exportMu sync.Mutex // enforces mutual exclusion of exportdata operations +} + +func newLoader(cfg *Config) *loader { + ld := &loader{} + if cfg != nil { + ld.Config = *cfg + } + if ld.Config.Env == nil { + ld.Config.Env = os.Environ() + } + if ld.Context == nil { + ld.Context = context.Background() + } + if ld.Dir == "" { + if dir, err := os.Getwd(); err == nil { + ld.Dir = dir + } + } + + if ld.Mode >= LoadTypes { + if ld.Fset == nil { + ld.Fset = token.NewFileSet() + } + + // Error and ParseFile are required even in LoadTypes mode + // because we load source if export data is missing. + + if ld.Error == nil { + ld.Error = func(e error) { + fmt.Fprintln(os.Stderr, e) + } + } + + if ld.ParseFile == nil { + ld.ParseFile = func(fset *token.FileSet, filename string) (*ast.File, error) { + const mode = parser.AllErrors | parser.ParseComments + return parser.ParseFile(fset, filename, nil, mode) + } + } + } + return ld +} + +// refine connects the supplied packages into a graph and then adds type and +// and syntax information as requested by the LoadMode. +func (ld *loader) refine(roots []string, list ...*Package) ([]*Package, error) { + if len(list) == 0 { + return nil, fmt.Errorf("packages not found") + } + isRoot := make(map[string]bool, len(roots)) + for _, root := range roots { + isRoot[root] = true + } + ld.pkgs = make(map[string]*loaderPackage) + // first pass, fixup and build the map and roots + var initial []*loaderPackage + for _, pkg := range list { + lpkg := &loaderPackage{ + Package: pkg, + needtypes: ld.Mode >= LoadAllSyntax || + ld.Mode >= LoadTypes && isRoot[pkg.ID], + needsrc: ld.Mode >= LoadAllSyntax || + ld.Mode >= LoadSyntax && isRoot[pkg.ID] || + pkg.ExportFile == "" && pkg.PkgPath != "unsafe", + } + ld.pkgs[lpkg.ID] = lpkg + if isRoot[lpkg.ID] { + initial = append(initial, lpkg) + lpkg.initial = true + } + } + + // Materialize the import graph. + + const ( + white = 0 // new + grey = 1 // in progress + black = 2 // complete + ) + + // visit traverses the import graph, depth-first, + // and materializes the graph as Packages.Imports. + // + // Valid imports are saved in the Packages.Import map. + // Invalid imports (cycles and missing nodes) are saved in the importErrors map. + // Thus, even in the presence of both kinds of errors, the Import graph remains a DAG. + // + // visit returns whether the package needs src or has a transitive + // dependency on a package that does. These are the only packages + // for which we load source code. + var stack []*loaderPackage + var visit func(lpkg *loaderPackage) bool + var srcPkgs []*loaderPackage + visit = func(lpkg *loaderPackage) bool { + switch lpkg.color { + case black: + return lpkg.needsrc + case grey: + panic("internal error: grey node") + } + lpkg.color = grey + stack = append(stack, lpkg) // push + stubs := lpkg.Imports // the structure form has only stubs with the ID in the Imports + lpkg.Imports = make(map[string]*Package, len(stubs)) + for importPath, ipkg := range stubs { + var importErr error + imp := ld.pkgs[ipkg.ID] + if imp == nil { + // (includes package "C" when DisableCgo) + importErr = fmt.Errorf("missing package: %q", ipkg.ID) + } else if imp.color == grey { + importErr = fmt.Errorf("import cycle: %s", stack) + } + if importErr != nil { + if lpkg.importErrors == nil { + lpkg.importErrors = make(map[string]error) + } + lpkg.importErrors[importPath] = importErr + continue + } + + if visit(imp) { + lpkg.needsrc = true + } + lpkg.Imports[importPath] = imp.Package + } + if lpkg.needsrc { + srcPkgs = append(srcPkgs, lpkg) + } + stack = stack[:len(stack)-1] // pop + lpkg.color = black + + return lpkg.needsrc + } + + if ld.Mode < LoadImports { + //we do this to drop the stub import packages that we are not even going to try to resolve + for _, lpkg := range initial { + lpkg.Imports = nil + } + } else { + // For each initial package, create its import DAG. + for _, lpkg := range initial { + visit(lpkg) + } + } + for _, lpkg := range srcPkgs { + // Complete type information is required for the + // immediate dependencies of each source package. + for _, ipkg := range lpkg.Imports { + imp := ld.pkgs[ipkg.ID] + imp.needtypes = true + } + } + // Load type data if needed, starting at + // the initial packages (roots of the import DAG). + if ld.Mode >= LoadTypes { + var wg sync.WaitGroup + for _, lpkg := range initial { + wg.Add(1) + go func(lpkg *loaderPackage) { + ld.loadRecursive(lpkg) + wg.Done() + }(lpkg) + } + wg.Wait() + } + + result := make([]*Package, len(initial)) + for i, lpkg := range initial { + result[i] = lpkg.Package + } + return result, nil +} + +// loadRecursive loads the specified package and its dependencies, +// recursively, in parallel, in topological order. +// It is atomic and idempotent. +// Precondition: ld.Mode >= LoadTypes. +func (ld *loader) loadRecursive(lpkg *loaderPackage) { + lpkg.loadOnce.Do(func() { + // Load the direct dependencies, in parallel. + var wg sync.WaitGroup + for _, ipkg := range lpkg.Imports { + imp := ld.pkgs[ipkg.ID] + wg.Add(1) + go func(imp *loaderPackage) { + ld.loadRecursive(imp) + wg.Done() + }(imp) + } + wg.Wait() + + ld.loadPackage(lpkg) + }) +} + +// loadPackage loads the specified package. +// It must be called only once per Package, +// after immediate dependencies are loaded. +// Precondition: ld.Mode >= LoadTypes. +func (ld *loader) loadPackage(lpkg *loaderPackage) { + if lpkg.PkgPath == "unsafe" { + // Fill in the blanks to avoid surprises. + lpkg.Types = types.Unsafe + lpkg.Fset = ld.Fset + lpkg.Syntax = []*ast.File{} + lpkg.TypesInfo = new(types.Info) + return + } + + // Call NewPackage directly with explicit name. + // This avoids skew between golist and go/types when the files' + // package declarations are inconsistent. + lpkg.Types = types.NewPackage(lpkg.PkgPath, lpkg.Name) + + // Subtle: we populate all Types fields with an empty Package + // before loading export data so that export data processing + // never has to create a types.Package for an indirect dependency, + // which would then require that such created packages be explicitly + // inserted back into the Import graph as a final step after export data loading. + // The Diamond test exercises this case. + if !lpkg.needtypes { + return + } + if !lpkg.needsrc { + ld.loadFromExportData(lpkg) + return // not a source package, don't get syntax trees + } + + hardErrors := false + appendError := func(err error) { + if terr, ok := err.(types.Error); ok && terr.Soft { + // Don't mark the package as bad. + } else { + hardErrors = true + } + ld.Error(err) + lpkg.Errors = append(lpkg.Errors, err) + } + + files, errs := ld.parseFiles(lpkg.CompiledGoFiles) + for _, err := range errs { + appendError(err) + } + + lpkg.Fset = ld.Fset + lpkg.Syntax = files + + lpkg.TypesInfo = &types.Info{ + Types: make(map[ast.Expr]types.TypeAndValue), + Defs: make(map[*ast.Ident]types.Object), + Uses: make(map[*ast.Ident]types.Object), + Implicits: make(map[ast.Node]types.Object), + Scopes: make(map[ast.Node]*types.Scope), + Selections: make(map[*ast.SelectorExpr]*types.Selection), + } + + importer := importerFunc(func(path string) (*types.Package, error) { + if path == "unsafe" { + return types.Unsafe, nil + } + + // The imports map is keyed by import path. + ipkg := lpkg.Imports[path] + if ipkg == nil { + if err := lpkg.importErrors[path]; err != nil { + return nil, err + } + // There was skew between the metadata and the + // import declarations, likely due to an edit + // race, or because the ParseFile feature was + // used to supply alternative file contents. + return nil, fmt.Errorf("no metadata for %s", path) + } + + if ipkg.Types != nil && ipkg.Types.Complete() { + return ipkg.Types, nil + } + log.Fatalf("internal error: nil Pkg importing %q from %q", path, lpkg) + panic("unreachable") + }) + + // type-check + tc := &types.Config{ + Importer: importer, + + // Type-check bodies of functions only in non-initial packages. + // Example: for import graph A->B->C and initial packages {A,C}, + // we can ignore function bodies in B. + IgnoreFuncBodies: ld.Mode < LoadAllSyntax && !lpkg.initial, + + Error: appendError, + + // TODO(adonovan): derive Sizes from the underlying + // build system. + } + types.NewChecker(tc, ld.Fset, lpkg.Types, lpkg.TypesInfo).Files(lpkg.Syntax) + + lpkg.importErrors = nil // no longer needed + + // If !Cgo, the type-checker uses FakeImportC mode, so + // it doesn't invoke the importer for import "C", + // nor report an error for the import, + // or for any undefined C.f reference. + // We must detect this explicitly and correctly + // mark the package as IllTyped (by reporting an error). + // TODO(adonovan): if these errors are annoying, + // we could just set IllTyped quietly. + if tc.FakeImportC { + outer: + for _, f := range lpkg.Syntax { + for _, imp := range f.Imports { + if imp.Path.Value == `"C"` { + err := types.Error{Fset: ld.Fset, Pos: imp.Pos(), Msg: `import "C" ignored`} + appendError(err) + break outer + } + } + } + } + + // Record accumulated errors. + for _, imp := range lpkg.Imports { + if imp.IllTyped { + hardErrors = true + break + } + } + + lpkg.IllTyped = hardErrors +} + +// An importFunc is an implementation of the single-method +// types.Importer interface based on a function value. +type importerFunc func(path string) (*types.Package, error) + +func (f importerFunc) Import(path string) (*types.Package, error) { return f(path) } + +// We use a counting semaphore to limit +// the number of parallel I/O calls per process. +var ioLimit = make(chan bool, 20) + +// parseFiles reads and parses the Go source files and returns the ASTs +// of the ones that could be at least partially parsed, along with a +// list of I/O and parse errors encountered. +// +// Because files are scanned in parallel, the token.Pos +// positions of the resulting ast.Files are not ordered. +// +func (ld *loader) parseFiles(filenames []string) ([]*ast.File, []error) { + var wg sync.WaitGroup + n := len(filenames) + parsed := make([]*ast.File, n) + errors := make([]error, n) + for i, file := range filenames { + wg.Add(1) + go func(i int, filename string) { + ioLimit <- true // wait + // ParseFile may return both an AST and an error. + parsed[i], errors[i] = ld.ParseFile(ld.Fset, filename) + <-ioLimit // signal + wg.Done() + }(i, file) + } + wg.Wait() + + // Eliminate nils, preserving order. + var o int + for _, f := range parsed { + if f != nil { + parsed[o] = f + o++ + } + } + parsed = parsed[:o] + + o = 0 + for _, err := range errors { + if err != nil { + errors[o] = err + o++ + } + } + errors = errors[:o] + + return parsed, errors +} + +// loadFromExportData returns type information for the specified +// package, loading it from an export data file on the first request. +func (ld *loader) loadFromExportData(lpkg *loaderPackage) (*types.Package, error) { + if lpkg.PkgPath == "" { + log.Fatalf("internal error: Package %s has no PkgPath", lpkg) + } + + // Because gcexportdata.Read has the potential to create or + // modify the types.Package for each node in the transitive + // closure of dependencies of lpkg, all exportdata operations + // must be sequential. (Finer-grained locking would require + // changes to the gcexportdata API.) + // + // The exportMu lock guards the Package.Pkg field and the + // types.Package it points to, for each Package in the graph. + // + // Not all accesses to Package.Pkg need to be protected by exportMu: + // graph ordering ensures that direct dependencies of source + // packages are fully loaded before the importer reads their Pkg field. + ld.exportMu.Lock() + defer ld.exportMu.Unlock() + + if tpkg := lpkg.Types; tpkg != nil && tpkg.Complete() { + return tpkg, nil // cache hit + } + + lpkg.IllTyped = true // fail safe + + if lpkg.ExportFile == "" { + // Errors while building export data will have been printed to stderr. + return nil, fmt.Errorf("no export data file") + } + f, err := os.Open(lpkg.ExportFile) + if err != nil { + return nil, err + } + defer f.Close() + + // Read gc export data. + // + // We don't currently support gccgo export data because all + // underlying workspaces use the gc toolchain. (Even build + // systems that support gccgo don't use it for workspace + // queries.) + r, err := gcexportdata.NewReader(f) + if err != nil { + return nil, fmt.Errorf("reading %s: %v", lpkg.ExportFile, err) + } + + // Build the view. + // + // The gcexportdata machinery has no concept of package ID. + // It identifies packages by their PkgPath, which although not + // globally unique is unique within the scope of one invocation + // of the linker, type-checker, or gcexportdata. + // + // So, we must build a PkgPath-keyed view of the global + // (conceptually ID-keyed) cache of packages and pass it to + // gcexportdata. The view must contain every existing + // package that might possibly be mentioned by the + // current package---its transitive closure. + // + // In loadPackage, we unconditionally create a types.Package for + // each dependency so that export data loading does not + // create new ones. + // + // TODO(adonovan): it would be simpler and more efficient + // if the export data machinery invoked a callback to + // get-or-create a package instead of a map. + // + view := make(map[string]*types.Package) // view seen by gcexportdata + seen := make(map[*loaderPackage]bool) // all visited packages + var visit func(pkgs map[string]*Package) + visit = func(pkgs map[string]*Package) { + for _, p := range pkgs { + lpkg := ld.pkgs[p.ID] + if !seen[lpkg] { + seen[lpkg] = true + view[lpkg.PkgPath] = lpkg.Types + visit(lpkg.Imports) + } + } + } + visit(lpkg.Imports) + + viewLen := len(view) + 1 // adding the self package + // Parse the export data. + // (May modify incomplete packages in view but not create new ones.) + tpkg, err := gcexportdata.Read(r, ld.Fset, view, lpkg.PkgPath) + if err != nil { + return nil, fmt.Errorf("reading %s: %v", lpkg.ExportFile, err) + } + if viewLen != len(view) { + log.Fatalf("Unexpected package creation during export data loading") + } + + lpkg.Types = tpkg + lpkg.IllTyped = false + + return tpkg, nil +} + +func usesExportData(cfg *Config) bool { + return LoadTypes <= cfg.Mode && cfg.Mode < LoadAllSyntax +} diff --git a/deps/golang.org/x/tools/go/packages/packages110_test.go b/deps/golang.org/x/tools/go/packages/packages110_test.go new file mode 100644 index 000000000..d4005682d --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/packages110_test.go @@ -0,0 +1,11 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.11 + +package packages_test + +func init() { + usesOldGolist = true +} diff --git a/deps/golang.org/x/tools/go/packages/packages_test.go b/deps/golang.org/x/tools/go/packages/packages_test.go new file mode 100644 index 000000000..bdf918a16 --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/packages_test.go @@ -0,0 +1,1536 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packages_test + +import ( + "bytes" + "encoding/json" + "fmt" + "go/ast" + "go/parser" + "go/token" + "go/types" + "io/ioutil" + "os" + "path/filepath" + "reflect" + "runtime" + "sort" + "strings" + "sync" + "testing" + + "golang.org/x/tools/go/packages" +) + +func init() { + // Insulate the tests from the users' environment. + os.Setenv("GOPACKAGESDRIVER", "off") +} + +// TODO(matloob): remove this once Go 1.12 is released as we will end support +// for versions of go list before Go 1.10.4. +var usesOldGolist = false + +// TODO(adonovan): more test cases to write: +// +// - When the tests fail, make them print a 'cd & load' command +// that will allow the maintainer to interact with the failing scenario. +// - errors in go-list metadata +// - a foo.test package that cannot be built for some reason (e.g. +// import error) will result in a JSON blob with no name and a +// nonexistent testmain file in GoFiles. Test that we handle this +// gracefully. +// - test more Flags. +// +// LoadSyntax & LoadAllSyntax modes: +// - Fset may be user-supplied or not. +// - Packages.Info is correctly set. +// - typechecker configuration is honored +// - import cycles are gracefully handled in type checker. +// - test typechecking of generated test main and cgo. + +// The zero-value of Config has LoadFiles mode. +func TestLoadZeroConfig(t *testing.T) { + initial, err := packages.Load(nil, "hash") + if err != nil { + t.Fatal(err) + } + if len(initial) != 1 { + t.Fatalf("got %s, want [hash]", initial) + } + hash := initial[0] + // Even though the hash package has imports, + // they are not reported. + got := fmt.Sprintf("name=%s srcs=%v imports=%v", hash.Name, srcs(hash), hash.Imports) + want := "name=hash srcs=[hash.go] imports=map[]" + if got != want { + t.Fatalf("got %s, want %s", got, want) + } +} + +func TestLoadImportsGraph(t *testing.T) { + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; const A = 1`, + "src/b/b.go": `package b; import ("a"; _ "errors"); var B = a.A`, + "src/c/c.go": `package c; import (_ "b"; _ "unsafe")`, + "src/c/c2.go": "// +build ignore\n\n" + `package c; import _ "fmt"`, + "src/subdir/d/d.go": `package d`, + "src/subdir/d/d_test.go": `package d; import _ "math/bits"`, + "src/subdir/d/x_test.go": `package d_test; import _ "subdir/d"`, // TODO(adonovan): test bad import here + "src/subdir/e/d.go": `package e`, + "src/e/e.go": `package main; import _ "b"`, + "src/e/e2.go": `package main; import _ "c"`, + "src/f/f.go": `package f`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadImports, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + initial, err := packages.Load(cfg, "c", "subdir/d", "e") + if err != nil { + t.Fatal(err) + } + + // Check graph topology. + graph, all := importGraph(initial) + wantGraph := ` + a + b +* c +* e + errors +* subdir/d + unsafe + b -> a + b -> errors + c -> b + c -> unsafe + e -> b + e -> c +`[1:] + + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } + + cfg.Tests = true + initial, err = packages.Load(cfg, "c", "subdir/d", "e") + if err != nil { + t.Fatal(err) + } + + // Check graph topology. + graph, all = importGraph(initial) + wantGraph = ` + a + b +* c +* e + errors + math/bits +* subdir/d +* subdir/d [subdir/d.test] +* subdir/d.test +* subdir/d_test [subdir/d.test] + unsafe + b -> a + b -> errors + c -> b + c -> unsafe + e -> b + e -> c + subdir/d [subdir/d.test] -> math/bits + subdir/d.test -> os (pruned) + subdir/d.test -> subdir/d [subdir/d.test] + subdir/d.test -> subdir/d_test [subdir/d.test] + subdir/d.test -> testing (pruned) + subdir/d.test -> testing/internal/testdeps (pruned) + subdir/d_test [subdir/d.test] -> subdir/d [subdir/d.test] +`[1:] + + // Legacy go list support does not create test main package. + wantOldGraph := ` + a + b +* c +* e + errors + math/bits +* subdir/d +* subdir/d [subdir/d.test] +* subdir/d_test [subdir/d.test] + unsafe + b -> a + b -> errors + c -> b + c -> unsafe + e -> b + e -> c + subdir/d [subdir/d.test] -> math/bits + subdir/d_test [subdir/d.test] -> subdir/d [subdir/d.test] +`[1:] + + if graph != wantGraph && !usesOldGolist { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } else if graph != wantOldGraph && usesOldGolist { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantOldGraph) + } + + // Check node information: kind, name, srcs. + for _, test := range []struct { + id string + wantName string + wantKind string + wantSrcs string + }{ + {"a", "a", "package", "a.go"}, + {"b", "b", "package", "b.go"}, + {"c", "c", "package", "c.go"}, // c2.go is ignored + {"e", "main", "command", "e.go e2.go"}, + {"errors", "errors", "package", "errors.go"}, + {"subdir/d", "d", "package", "d.go"}, + {"subdir/d.test", "main", "command", "0.go"}, + {"unsafe", "unsafe", "package", ""}, + } { + if usesOldGolist && test.id == "subdir/d.test" { + // Legacy go list support does not create test main package. + continue + } + p, ok := all[test.id] + if !ok { + t.Errorf("no package %s", test.id) + continue + } + if p.Name != test.wantName { + t.Errorf("%s.Name = %q, want %q", test.id, p.Name, test.wantName) + } + + // kind + var kind string + if p.Name == "main" { + kind += "command" + } else { + kind += "package" + } + if kind != test.wantKind { + t.Errorf("%s.Kind = %q, want %q", test.id, kind, test.wantKind) + } + + if srcs := strings.Join(srcs(p), " "); srcs != test.wantSrcs { + t.Errorf("%s.Srcs = [%s], want [%s]", test.id, srcs, test.wantSrcs) + } + } + + // Test an ad-hoc package, analogous to "go run hello.go". + if initial, err := packages.Load(cfg, filepath.Join(tmp, "src/c/c.go")); len(initial) == 0 { + t.Errorf("failed to obtain metadata for ad-hoc package: %s", err) + } else { + got := fmt.Sprintf("%s %s", initial[0].ID, srcs(initial[0])) + if want := "command-line-arguments [c.go]"; got != want && !usesOldGolist { + t.Errorf("oops: got %s, want %s", got, want) + } + } + + // Wildcards + // See StdlibTest for effective test of "std" wildcard. + // TODO(adonovan): test "all" returns everything in the current module. + { + // "..." (subdirectory) + initial, err = packages.Load(cfg, "subdir/...") + if err != nil { + t.Fatal(err) + } + graph, all = importGraph(initial) + wantGraph = ` + math/bits +* subdir/d +* subdir/d [subdir/d.test] +* subdir/d.test +* subdir/d_test [subdir/d.test] +* subdir/e + subdir/d [subdir/d.test] -> math/bits + subdir/d.test -> os (pruned) + subdir/d.test -> subdir/d [subdir/d.test] + subdir/d.test -> subdir/d_test [subdir/d.test] + subdir/d.test -> testing (pruned) + subdir/d.test -> testing/internal/testdeps (pruned) + subdir/d_test [subdir/d.test] -> subdir/d [subdir/d.test] +`[1:] + + // Legacy go list support does not create test main package. + wantOldGraph = ` + math/bits +* subdir/d +* subdir/d [subdir/d.test] +* subdir/d_test [subdir/d.test] +* subdir/e + subdir/d [subdir/d.test] -> math/bits + subdir/d_test [subdir/d.test] -> subdir/d [subdir/d.test] +`[1:] + if graph != wantGraph && !usesOldGolist { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } else if graph != wantOldGraph && usesOldGolist { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantOldGraph) + } + } +} + +func TestLoadImportsTestVariants(t *testing.T) { + if usesOldGolist { + t.Skip("not yet supported in pre-Go 1.10.4 golist fallback implementation") + } + + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import _ "b"`, + "src/b/b.go": `package b`, + "src/b/b_test.go": `package b`, + "src/b/bx_test.go": `package b_test; import _ "a"`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadImports, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + Tests: true, + } + initial, err := packages.Load(cfg, "a", "b") + if err != nil { + t.Fatal(err) + } + + // Check graph topology. + graph, _ := importGraph(initial) + wantGraph := ` +* a + a [b.test] +* b +* b [b.test] +* b.test +* b_test [b.test] + a -> b + a [b.test] -> b [b.test] + b.test -> b [b.test] + b.test -> b_test [b.test] + b.test -> os (pruned) + b.test -> testing (pruned) + b.test -> testing/internal/testdeps (pruned) + b_test [b.test] -> a [b.test] +`[1:] + + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } +} + +func TestLoadImportsC(t *testing.T) { + // This test checks that when a package depends on the + // test variant of "syscall", "unsafe", or "runtime/cgo", that dependency + // is not removed when those packages are added when it imports "C". + // + // For this test to work, the external test of syscall must have a dependency + // on net, and net must import "syscall" and "C". + if runtime.GOOS == "windows" { + t.Skipf("skipping on windows; packages on windows do not satisfy conditions for test.") + } + if runtime.GOOS == "plan9" { + // See https://github.com/golang/go/issues/27100. + t.Skip(`skipping on plan9; for some reason "net [syscall.test]" is not loaded`) + } + if usesOldGolist { + t.Skip("not yet supported in pre-Go 1.10.4 golist fallback implementation") + } + + cfg := &packages.Config{ + Mode: packages.LoadImports, + Tests: true, + } + initial, err := packages.Load(cfg, "syscall", "net") + if err != nil { + t.Fatalf("failed to load imports: %v", err) + } + + _, all := importGraph(initial) + + for _, test := range []struct { + pattern string + wantImport string // an import to check for + }{ + {"net", "syscall:syscall"}, + {"net [syscall.test]", "syscall:syscall [syscall.test]"}, + {"syscall_test [syscall.test]", "net:net [syscall.test]"}, + } { + // Test the import paths. + pkg := all[test.pattern] + if pkg == nil { + t.Errorf("package %q not loaded", test.pattern) + continue + } + if imports := strings.Join(imports(pkg), " "); !strings.Contains(imports, test.wantImport) { + t.Errorf("package %q: got \n%s, \nwant to have %s", test.pattern, imports, test.wantImport) + } + } +} + +func TestVendorImports(t *testing.T) { + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import _ "b"; import _ "c";`, + "src/a/vendor/b/b.go": `package b; import _ "c"`, + "src/c/c.go": `package c; import _ "b"`, + "src/c/vendor/b/b.go": `package b`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadImports, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + initial, err := packages.Load(cfg, "a", "c") + if err != nil { + t.Fatal(err) + } + + graph, all := importGraph(initial) + wantGraph := ` +* a + a/vendor/b +* c + c/vendor/b + a -> a/vendor/b + a -> c + a/vendor/b -> c + c -> c/vendor/b +`[1:] + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } + + for _, test := range []struct { + pattern string + wantImports string + }{ + {"a", "b:a/vendor/b c:c"}, + {"c", "b:c/vendor/b"}, + {"a/vendor/b", "c:c"}, + {"c/vendor/b", ""}, + } { + // Test the import paths. + pkg := all[test.pattern] + if imports := strings.Join(imports(pkg), " "); imports != test.wantImports { + t.Errorf("package %q: got %s, want %s", test.pattern, imports, test.wantImports) + } + } +} + +func imports(p *packages.Package) []string { + if p == nil { + return nil + } + keys := make([]string, 0, len(p.Imports)) + for k, v := range p.Imports { + keys = append(keys, fmt.Sprintf("%s:%s", k, v.ID)) + } + sort.Strings(keys) + return keys +} + +func TestConfigDir(t *testing.T) { + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; const Name = "a" `, + "src/a/b/b.go": `package b; const Name = "a/b"`, + "src/b/b.go": `package b; const Name = "b"`, + }) + defer cleanup() + + for _, test := range []struct { + dir string + pattern string + want string // value of Name constant, or error + }{ + {"", "a", `"a"`}, + {"", "b", `"b"`}, + {"", "./a", "packages not found"}, + {"", "./b", "packages not found"}, + {filepath.Join(tmp, "/src"), "a", `"a"`}, + {filepath.Join(tmp, "/src"), "b", `"b"`}, + {filepath.Join(tmp, "/src"), "./a", `"a"`}, + {filepath.Join(tmp, "/src"), "./b", `"b"`}, + {filepath.Join(tmp, "/src/a"), "a", `"a"`}, + {filepath.Join(tmp, "/src/a"), "b", `"b"`}, + {filepath.Join(tmp, "/src/a"), "./a", "packages not found"}, + {filepath.Join(tmp, "/src/a"), "./b", `"a/b"`}, + } { + cfg := &packages.Config{ + Mode: packages.LoadSyntax, // Use LoadSyntax to ensure that files can be opened. + Dir: test.dir, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + + initial, err := packages.Load(cfg, test.pattern) + var got string + if err != nil { + got = err.Error() + } else { + got = constant(initial[0], "Name").Val().String() + } + if got != test.want { + t.Errorf("dir %q, pattern %q: got %s, want %s", + test.dir, test.pattern, got, test.want) + } + } + +} + +func TestConfigFlags(t *testing.T) { + // Test satisfying +build line tags, with -tags flag. + tmp, cleanup := makeTree(t, map[string]string{ + // package a + "src/a/a.go": `package a; import _ "a/b"`, + "src/a/b.go": `// +build tag + +package a`, + "src/a/c.go": `// +build tag tag2 + +package a`, + "src/a/d.go": `// +build tag,tag2 + +package a`, + // package a/b + "src/a/b/a.go": `package b`, + "src/a/b/b.go": `// +build tag + +package b`, + }) + defer cleanup() + + for _, test := range []struct { + pattern string + tags []string + wantSrcs string + wantImportSrcs string + }{ + {`a`, []string{}, "a.go", "a.go"}, + {`a`, []string{`-tags=tag`}, "a.go b.go c.go", "a.go b.go"}, + {`a`, []string{`-tags=tag2`}, "a.go c.go", "a.go"}, + {`a`, []string{`-tags=tag tag2`}, "a.go b.go c.go d.go", "a.go b.go"}, + } { + cfg := &packages.Config{ + Mode: packages.LoadImports, + BuildFlags: test.tags, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + + initial, err := packages.Load(cfg, test.pattern) + if err != nil { + t.Error(err) + continue + } + if len(initial) != 1 { + t.Errorf("test tags %v: pattern %s, expected 1 package, got %d packages.", test.tags, test.pattern, len(initial)) + continue + } + pkg := initial[0] + if srcs := strings.Join(srcs(pkg), " "); srcs != test.wantSrcs { + t.Errorf("test tags %v: srcs of package %s = [%s], want [%s]", test.tags, test.pattern, srcs, test.wantSrcs) + } + for path, ipkg := range pkg.Imports { + if srcs := strings.Join(srcs(ipkg), " "); srcs != test.wantImportSrcs { + t.Errorf("build tags %v: srcs of imported package %s = [%s], want [%s]", test.tags, path, srcs, test.wantImportSrcs) + } + } + + } +} + +type errCollector struct { + mu sync.Mutex + errors []error +} + +func (ec *errCollector) add(err error) { + ec.mu.Lock() + ec.errors = append(ec.errors, err) + ec.mu.Unlock() +} + +func TestLoadTypes(t *testing.T) { + // In LoadTypes and LoadSyntax modes, the compiler will + // fail to generate an export data file for c, because it has + // a type error. The loader should fall back loading a and c + // from source, but use the export data for b. + + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import "b"; import "c"; const A = "a" + b.B + c.C`, + "src/b/b.go": `package b; const B = "b"`, + "src/c/c.go": `package c; const C = "c" + 1`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadTypes, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + Error: func(error) {}, + } + initial, err := packages.Load(cfg, "a") + if err != nil { + t.Fatal(err) + } + + graph, all := importGraph(initial) + wantGraph := ` +* a + b + c + a -> b + a -> c +`[1:] + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } + + for _, test := range []struct { + id string + wantSyntax bool + }{ + {"a", true}, // need src, no export data for c + {"b", false}, // use export data + {"c", true}, // need src, no export data for c + } { + if usesOldGolist && !test.wantSyntax { + // legacy go list always upgrades to LoadAllSyntax, syntax will be filled in. + // still check that types information is complete. + test.wantSyntax = true + } + p := all[test.id] + if p == nil { + t.Errorf("missing package: %s", test.id) + continue + } + if p.Types == nil { + t.Errorf("missing types.Package for %s", p) + continue + } else if !p.Types.Complete() { + t.Errorf("incomplete types.Package for %s", p) + } + if (p.Syntax != nil) != test.wantSyntax { + if test.wantSyntax { + t.Errorf("missing ast.Files for %s", p) + } else { + t.Errorf("unexpected ast.Files for for %s", p) + } + } + } +} + +func TestLoadSyntaxOK(t *testing.T) { + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import "b"; const A = "a" + b.B`, + "src/b/b.go": `package b; import "c"; const B = "b" + c.C`, + "src/c/c.go": `package c; import "d"; const C = "c" + d.D`, + "src/d/d.go": `package d; import "e"; const D = "d" + e.E`, + "src/e/e.go": `package e; import "f"; const E = "e" + f.F`, + "src/f/f.go": `package f; const F = "f"`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadSyntax, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + Error: func(error) {}, + } + initial, err := packages.Load(cfg, "a", "c") + if err != nil { + t.Fatal(err) + } + + graph, all := importGraph(initial) + wantGraph := ` +* a + b +* c + d + e + f + a -> b + b -> c + c -> d + d -> e + e -> f +`[1:] + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } + + for _, test := range []struct { + id string + wantSyntax bool + wantComplete bool + }{ + {"a", true, true}, // source package + {"b", true, true}, // source package + {"c", true, true}, // source package + {"d", false, true}, // export data package + {"e", false, false}, // export data package + {"f", false, false}, // export data package + } { + // TODO(matloob): The legacy go list based support loads + // everything from source because it doesn't do a build + // and the .a files don't exist. + // Can we simulate its existence? + if usesOldGolist { + test.wantComplete = true + test.wantSyntax = true + } + p := all[test.id] + if p == nil { + t.Errorf("missing package: %s", test.id) + continue + } + if p.Types == nil { + t.Errorf("missing types.Package for %s", p) + continue + } else if p.Types.Complete() != test.wantComplete { + if test.wantComplete { + t.Errorf("incomplete types.Package for %s", p) + } else { + t.Errorf("unexpected complete types.Package for %s", p) + } + } + if (p.Syntax != nil) != test.wantSyntax { + if test.wantSyntax { + t.Errorf("missing ast.Files for %s", p) + } else { + t.Errorf("unexpected ast.Files for for %s", p) + } + } + if p.Errors != nil { + t.Errorf("errors in package: %s: %s", p, p.Errors) + } + } + + // Check value of constant. + aA := constant(all["a"], "A") + if got, want := fmt.Sprintf("%v %v", aA, aA.Val()), `const a.A untyped string "abcdef"`; got != want { + t.Errorf("a.A: got %s, want %s", got, want) + } +} + +func TestLoadDiamondTypes(t *testing.T) { + // We make a diamond dependency and check the type d.D is the same through both paths + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import ("b"; "c"); var _ = b.B == c.C`, + "src/b/b.go": `package b; import "d"; var B d.D`, + "src/c/c.go": `package c; import "d"; var C d.D`, + "src/d/d.go": `package d; type D int`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadSyntax, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + Error: func(err error) { + t.Errorf("Error during load: %v", err) + }, + } + initial, err := packages.Load(cfg, "a") + if err != nil { + t.Fatal(err) + } + + var visit func(pkg *packages.Package) + seen := make(map[string]bool) + visit = func(pkg *packages.Package) { + if seen[pkg.ID] { + return + } + seen[pkg.ID] = true + for _, err := range pkg.Errors { + t.Errorf("Error on package %v: %v", pkg.ID, err) + } + for _, imp := range pkg.Imports { + visit(imp) + } + } + for _, pkg := range initial { + visit(pkg) + } + + graph, _ := importGraph(initial) + wantGraph := ` +* a + b + c + d + a -> b + a -> c + b -> d + c -> d +`[1:] + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } +} + +func TestLoadSyntaxError(t *testing.T) { + // A type error in a lower-level package (e) prevents go list + // from producing export data for all packages that depend on it + // [a-e]. Only f should be loaded from export data, and the rest + // should be IllTyped. + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import "b"; const A = "a" + b.B`, + "src/b/b.go": `package b; import "c"; const B = "b" + c.C`, + "src/c/c.go": `package c; import "d"; const C = "c" + d.D`, + "src/d/d.go": `package d; import "e"; const D = "d" + e.E`, + "src/e/e.go": `package e; import "f"; const E = "e" + f.F + 1`, // type error + "src/f/f.go": `package f; const F = "f"`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadSyntax, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + Error: func(error) {}, + } + initial, err := packages.Load(cfg, "a", "c") + if err != nil { + t.Fatal(err) + } + + all := make(map[string]*packages.Package) + var visit func(p *packages.Package) + visit = func(p *packages.Package) { + if all[p.ID] == nil { + all[p.ID] = p + for _, imp := range p.Imports { + visit(imp) + } + } + } + for _, p := range initial { + visit(p) + } + + for _, test := range []struct { + id string + wantSyntax bool + wantIllTyped bool + }{ + {"a", true, true}, + {"b", true, true}, + {"c", true, true}, + {"d", true, true}, + {"e", true, true}, + {"f", false, false}, + } { + if usesOldGolist && !test.wantSyntax { + // legacy go list always upgrades to LoadAllSyntax, syntax will be filled in. + test.wantSyntax = true + } + p := all[test.id] + if p == nil { + t.Errorf("missing package: %s", test.id) + continue + } + if p.Types == nil { + t.Errorf("missing types.Package for %s", p) + continue + } else if !p.Types.Complete() { + t.Errorf("incomplete types.Package for %s", p) + } + if (p.Syntax != nil) != test.wantSyntax { + if test.wantSyntax { + t.Errorf("missing ast.Files for %s", test.id) + } else { + t.Errorf("unexpected ast.Files for for %s", test.id) + } + } + if p.IllTyped != test.wantIllTyped { + t.Errorf("IllTyped was %t for %s", p.IllTyped, test.id) + } + } + + // Check value of constant. + aA := constant(all["a"], "A") + if got, want := aA.String(), `const a.A invalid type`; got != want { + t.Errorf("a.A: got %s, want %s", got, want) + } +} + +// This function tests use of the ParseFile hook to supply +// alternative file contents to the parser and type-checker. +func TestLoadAllSyntaxOverlay(t *testing.T) { + type M = map[string]string + + tmp, cleanup := makeTree(t, M{ + "src/a/a.go": `package a; import "b"; const A = "a" + b.B`, + "src/b/b.go": `package b; import "c"; const B = "b" + c.C`, + "src/c/c.go": `package c; const C = "c"`, + "src/d/d.go": `package d; const D = "d"`, + }) + defer cleanup() + + for i, test := range []struct { + overlay M + want string // expected value of a.A + wantErrs []string + }{ + {nil, `"abc"`, nil}, // default + {M{}, `"abc"`, nil}, // empty overlay + {M{filepath.Join(tmp, "src/c/c.go"): `package c; const C = "C"`}, `"abC"`, nil}, + {M{filepath.Join(tmp, "src/b/b.go"): `package b; import "c"; const B = "B" + c.C`}, `"aBc"`, nil}, + {M{filepath.Join(tmp, "src/b/b.go"): `package b; import "d"; const B = "B" + d.D`}, `unknown`, + []string{`could not import d (no metadata for d)`}}, + } { + var parseFile func(fset *token.FileSet, filename string) (*ast.File, error) + if test.overlay != nil { + parseFile = func(fset *token.FileSet, filename string) (*ast.File, error) { + var src interface{} + if content, ok := test.overlay[filename]; ok { + src = content + } + const mode = parser.AllErrors | parser.ParseComments + return parser.ParseFile(fset, filename, src, mode) + } + } + var errs errCollector + cfg := &packages.Config{ + Mode: packages.LoadAllSyntax, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + Error: errs.add, + ParseFile: parseFile, + } + initial, err := packages.Load(cfg, "a") + if err != nil { + t.Error(err) + continue + } + + // Check value of a.A. + a := initial[0] + got := constant(a, "A").Val().String() + if got != test.want { + t.Errorf("%d. a.A: got %s, want %s", i, got, test.want) + } + + if errs := errorMessages(errs.errors); !reflect.DeepEqual(errs, test.wantErrs) { + t.Errorf("%d. got errors %s, want %s", i, errs, test.wantErrs) + } + } +} + +func TestLoadAllSyntaxImportErrors(t *testing.T) { + // TODO(matloob): Remove this once go list -e -compiled is fixed. See golang.org/issue/26755 + t.Skip("go list -compiled -e fails with non-zero exit status for empty packages") + + if usesOldGolist { + t.Skip("not yet supported in pre-Go 1.10.4 golist fallback implementation") + } + + tmp, cleanup := makeTree(t, map[string]string{ + "src/unicycle/unicycle.go": `package unicycle; import _ "unicycle"`, + "src/bicycle1/bicycle1.go": `package bicycle1; import _ "bicycle2"`, + "src/bicycle2/bicycle2.go": `package bicycle2; import _ "bicycle1"`, + "src/bad/bad.go": `not a package declaration`, + "src/root/root.go": `package root +import ( + _ "bicycle1" + _ "unicycle" + _ "nonesuch" + _ "empty" + _ "bad" +)`, + }) + defer cleanup() + + os.Mkdir(filepath.Join(tmp, "src/empty"), 0777) // create an existing but empty package + + var errs2 errCollector + cfg := &packages.Config{ + Mode: packages.LoadAllSyntax, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + Error: errs2.add, + } + initial, err := packages.Load(cfg, "root") + if err != nil { + t.Fatal(err) + } + + // Cycle-forming edges are removed from the graph: + // bicycle2 -> bicycle1 + // unicycle -> unicycle + graph, all := importGraph(initial) + wantGraph := ` + bicycle1 + bicycle2 +* root + unicycle + bicycle1 -> bicycle2 + root -> bicycle1 + root -> unicycle +`[1:] + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } + for _, test := range []struct { + id string + wantErrs []string + }{ + {"bicycle1", nil}, + {"bicycle2", []string{ + "could not import bicycle1 (import cycle: [root bicycle1 bicycle2])", + }}, + {"unicycle", []string{ + "could not import unicycle (import cycle: [root unicycle])", + }}, + {"root", []string{ + `could not import bad (missing package: "bad")`, + `could not import empty (missing package: "empty")`, + `could not import nonesuch (missing package: "nonesuch")`, + }}, + } { + p := all[test.id] + if p == nil { + t.Errorf("missing package: %s", test.id) + continue + } + if p.Types == nil { + t.Errorf("missing types.Package for %s", test.id) + } + if p.Syntax == nil { + t.Errorf("missing ast.Files for %s", test.id) + } + if !p.IllTyped { + t.Errorf("IllTyped was false for %s", test.id) + } + if errs := errorMessages(p.Errors); !reflect.DeepEqual(errs, test.wantErrs) { + t.Errorf("in package %s, got errors %s, want %s", p, errs, test.wantErrs) + } + } +} + +func TestAbsoluteFilenames(t *testing.T) { + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; const A = 1`, + "src/b/b.go": `package b; import ("a"; _ "errors"); var B = a.A`, + "src/b/vendor/a/a.go": `package a; const A = 1`, + "src/c/c.go": `package c; import (_ "b"; _ "unsafe")`, + "src/c/c2.go": "// +build ignore\n\n" + `package c; import _ "fmt"`, + "src/subdir/d/d.go": `package d`, + "src/subdir/e/d.go": `package e`, + "src/e/e.go": `package main; import _ "b"`, + "src/e/e2.go": `package main; import _ "c"`, + "src/f/f.go": `package f`, + "src/f/f.s": ``, + }) + defer cleanup() + + checkFile := func(filename string) { + if !filepath.IsAbs(filename) { + t.Errorf("filename is not absolute: %s", filename) + } + if _, err := os.Stat(filename); err != nil { + t.Errorf("stat error, %s: %v", filename, err) + } + } + + for _, test := range []struct { + pattern string + want string + }{ + // Import paths + {"a", "a.go"}, + {"b/vendor/a", "a.go"}, + {"b", "b.go"}, + {"c", "c.go"}, + {"subdir/d", "d.go"}, + {"subdir/e", "d.go"}, + {"e", "e.go e2.go"}, + {"f", "f.go f.s"}, + // Relative paths + {"./a", "a.go"}, + {"./b/vendor/a", "a.go"}, + {"./b", "b.go"}, + {"./c", "c.go"}, + {"./subdir/d", "d.go"}, + {"./subdir/e", "d.go"}, + {"./e", "e.go e2.go"}, + {"./f", "f.go f.s"}, + } { + cfg := &packages.Config{ + Mode: packages.LoadFiles, + Dir: filepath.Join(tmp, "src"), + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + pkgs, err := packages.Load(cfg, test.pattern) + if err != nil { + t.Errorf("pattern %s: %v", test.pattern, err) + continue + } + + if got := strings.Join(srcs(pkgs[0]), " "); got != test.want { + t.Errorf("in package %s, got %s, want %s", test.pattern, got, test.want) + } + + // Test that files in all packages exist and are absolute paths. + _, all := importGraph(pkgs) + for _, pkg := range all { + for _, filename := range pkg.GoFiles { + checkFile(filename) + } + for _, filename := range pkg.OtherFiles { + checkFile(filename) + } + } + } +} + +func TestContains(t *testing.T) { + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import "b"`, + "src/b/b.go": `package b; import "c"`, + "src/c/c.go": `package c`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadImports, + Dir: tmp, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + initial, err := packages.Load(cfg, "contains:src/b/b.go") + if err != nil { + t.Fatal(err) + } + + graph, _ := importGraph(initial) + wantGraph := ` +* b + c + b -> c +`[1:] + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } +} + +// TestContains_FallbackSticks ensures that when there are both contains and non-contains queries +// the decision whether to fallback to the pre-1.11 go list sticks across both sets of calls to +// go list. +func TestContains_FallbackSticks(t *testing.T) { + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; import "b"`, + "src/b/b.go": `package b; import "c"`, + "src/c/c.go": `package c`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadImports, + Dir: tmp, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + initial, err := packages.Load(cfg, "a", "contains:src/b/b.go") + if err != nil { + t.Fatal(err) + } + + graph, _ := importGraph(initial) + wantGraph := ` +* a +* b + c + a -> b + b -> c +`[1:] + if graph != wantGraph { + t.Errorf("wrong import graph: got <<%s>>, want <<%s>>", graph, wantGraph) + } +} + +func TestJSON(t *testing.T) { + //TODO: add in some errors + tmp, cleanup := makeTree(t, map[string]string{ + "src/a/a.go": `package a; const A = 1`, + "src/b/b.go": `package b; import "a"; var B = a.A`, + "src/c/c.go": `package c; import "b" ; var C = b.B`, + "src/d/d.go": `package d; import "b" ; var D = b.B`, + }) + defer cleanup() + + cfg := &packages.Config{ + Mode: packages.LoadImports, + Env: append(os.Environ(), "GOPATH="+tmp, "GO111MODULE=off"), + } + initial, err := packages.Load(cfg, "c", "d") + if err != nil { + t.Fatal(err) + } + buf := &bytes.Buffer{} + enc := json.NewEncoder(buf) + enc.SetIndent("", "\t") + seen := make(map[string]bool) + var visit func(*packages.Package) + visit = func(pkg *packages.Package) { + if seen[pkg.ID] { + return + } + seen[pkg.ID] = true + + // Trim the source lists for stable results. + pkg.GoFiles = cleanPaths(pkg.GoFiles) + pkg.CompiledGoFiles = cleanPaths(pkg.CompiledGoFiles) + pkg.OtherFiles = cleanPaths(pkg.OtherFiles) + + // Visit imports. + var importPaths []string + for path := range pkg.Imports { + importPaths = append(importPaths, path) + } + sort.Strings(importPaths) // for determinism + for _, path := range importPaths { + visit(pkg.Imports[path]) + } + + if err := enc.Encode(pkg); err != nil { + t.Fatal(err) + } + } + for _, pkg := range initial { + visit(pkg) + } + wantJSON := ` +{ + "ID": "a", + "Name": "a", + "PkgPath": "a", + "GoFiles": [ + "a.go" + ], + "CompiledGoFiles": [ + "a.go" + ] +} +{ + "ID": "b", + "Name": "b", + "PkgPath": "b", + "GoFiles": [ + "b.go" + ], + "CompiledGoFiles": [ + "b.go" + ], + "Imports": { + "a": "a" + } +} +{ + "ID": "c", + "Name": "c", + "PkgPath": "c", + "GoFiles": [ + "c.go" + ], + "CompiledGoFiles": [ + "c.go" + ], + "Imports": { + "b": "b" + } +} +{ + "ID": "d", + "Name": "d", + "PkgPath": "d", + "GoFiles": [ + "d.go" + ], + "CompiledGoFiles": [ + "d.go" + ], + "Imports": { + "b": "b" + } +} +`[1:] + + if buf.String() != wantJSON { + t.Errorf("wrong JSON: got <<%s>>, want <<%s>>", buf.String(), wantJSON) + } + // now decode it again + var decoded []*packages.Package + dec := json.NewDecoder(buf) + for dec.More() { + p := new(packages.Package) + if err := dec.Decode(p); err != nil { + t.Fatal(err) + } + decoded = append(decoded, p) + } + if len(decoded) != 4 { + t.Fatalf("got %d packages, want 4", len(decoded)) + } + for i, want := range []*packages.Package{{ + ID: "a", + Name: "a", + }, { + ID: "b", + Name: "b", + Imports: map[string]*packages.Package{ + "a": &packages.Package{ID: "a"}, + }, + }, { + ID: "c", + Name: "c", + Imports: map[string]*packages.Package{ + "b": &packages.Package{ID: "b"}, + }, + }, { + ID: "d", + Name: "d", + Imports: map[string]*packages.Package{ + "b": &packages.Package{ID: "b"}, + }, + }} { + got := decoded[i] + if got.ID != want.ID { + t.Errorf("Package %d has ID %q want %q", i, got.ID, want.ID) + } + if got.Name != want.Name { + t.Errorf("Package %q has Name %q want %q", got.ID, got.Name, want.Name) + } + if len(got.Imports) != len(want.Imports) { + t.Errorf("Package %q has %d imports want %d", got.ID, len(got.Imports), len(want.Imports)) + continue + } + for path, ipkg := range got.Imports { + if want.Imports[path] == nil { + t.Errorf("Package %q has unexpected import %q", got.ID, path) + continue + } + if want.Imports[path].ID != ipkg.ID { + t.Errorf("Package %q import %q is %q want %q", got.ID, path, ipkg.ID, want.Imports[path].ID) + } + } + } +} + +func TestConfigDefaultEnv(t *testing.T) { + if runtime.GOOS == "windows" { + // TODO(jayconrod): write an equivalent batch script for windows. + // Hint: "type" can be used to read a file to stdout. + t.Skip("test requires sh") + } + tmp, cleanup := makeTree(t, map[string]string{ + "bin/gopackagesdriver": `#!/bin/sh + +cat - <<'EOF' +{ + "Roots": ["gopackagesdriver"], + "Packages": [{"ID": "gopackagesdriver", "Name": "gopackagesdriver"}] +} +EOF +`, + "src/golist/golist.go": "package golist", + }) + defer cleanup() + if err := os.Chmod(filepath.Join(tmp, "bin", "gopackagesdriver"), 0755); err != nil { + t.Fatal(err) + } + + path, ok := os.LookupEnv("PATH") + var pathWithDriver string + if ok { + pathWithDriver = filepath.Join(tmp, "bin") + string(os.PathListSeparator) + path + } else { + pathWithDriver = filepath.Join(tmp, "bin") + } + + for _, test := range []struct { + desc string + env []string + wantIDs string + }{ + { + desc: "driver_off", + env: []string{"PATH", pathWithDriver, "GOPATH", tmp, "GOPACKAGESDRIVER", "off"}, + wantIDs: "[golist]", + }, { + desc: "driver_unset", + env: []string{"PATH", pathWithDriver, "GOPATH", "", "GOPACKAGESDRIVER", ""}, + wantIDs: "[gopackagesdriver]", + }, { + desc: "driver_set", + env: []string{"GOPACKAGESDRIVER", filepath.Join(tmp, "bin", "gopackagesdriver")}, + wantIDs: "[gopackagesdriver]", + }, + } { + t.Run(test.desc, func(t *testing.T) { + for i := 0; i < len(test.env); i += 2 { + key, value := test.env[i], test.env[i+1] + old, ok := os.LookupEnv(key) + if value == "" { + os.Unsetenv(key) + } else { + os.Setenv(key, value) + } + if ok { + defer os.Setenv(key, old) + } else { + defer os.Unsetenv(key) + } + } + + pkgs, err := packages.Load(nil, "golist") + if err != nil { + t.Fatal(err) + } + + gotIds := make([]string, len(pkgs)) + for i, pkg := range pkgs { + gotIds[i] = pkg.ID + } + if fmt.Sprint(pkgs) != test.wantIDs { + t.Errorf("got %v; want %v", gotIds, test.wantIDs) + } + }) + } +} + +func errorMessages(errors []error) []string { + var msgs []string + for _, err := range errors { + msg := err.Error() + // Strip off /tmp filename. + if i := strings.Index(msg, ": "); i >= 0 { + msg = msg[i+len(": "):] + } + msgs = append(msgs, msg) + } + sort.Strings(msgs) + return msgs +} + +func srcs(p *packages.Package) []string { + return cleanPaths(append(p.GoFiles, p.OtherFiles...)) +} + +// cleanPaths attempts to reduce path names to stable forms +func cleanPaths(paths []string) []string { + result := make([]string, len(paths)) + for i, src := range paths { + // The default location for cache data is a subdirectory named go-build + // in the standard user cache directory for the current operating system. + if strings.Contains(filepath.ToSlash(src), "/go-build/") { + result[i] = fmt.Sprintf("%d.go", i) // make cache names predictable + } else { + result[i] = filepath.Base(src) + } + } + return result +} + +// importGraph returns the import graph as a user-friendly string, +// and a map containing all packages keyed by ID. +func importGraph(initial []*packages.Package) (string, map[string]*packages.Package) { + out := new(bytes.Buffer) + + initialSet := make(map[*packages.Package]bool) + for _, p := range initial { + initialSet[p] = true + } + + var nodes, edges []string + res := make(map[string]*packages.Package) + seen := make(map[*packages.Package]bool) + var visit func(p *packages.Package) + visit = func(p *packages.Package) { + if !seen[p] { + seen[p] = true + if res[p.ID] != nil { + panic("duplicate ID: " + p.ID) + } + res[p.ID] = p + + star := ' ' // mark initial packages with a star + if initialSet[p] { + star = '*' + } + nodes = append(nodes, fmt.Sprintf("%c %s", star, p.ID)) + + // To avoid a lot of noise, + // we prune uninteresting dependencies of testmain packages, + // which we identify by this import: + isTestMain := p.Imports["testing/internal/testdeps"] != nil + + for _, imp := range p.Imports { + if isTestMain { + switch imp.ID { + case "os", "testing", "testing/internal/testdeps": + edges = append(edges, fmt.Sprintf("%s -> %s (pruned)", p, imp)) + continue + } + } + edges = append(edges, fmt.Sprintf("%s -> %s", p, imp)) + visit(imp) + } + } + } + for _, p := range initial { + visit(p) + } + + // Sort, ignoring leading optional star prefix. + sort.Slice(nodes, func(i, j int) bool { return nodes[i][2:] < nodes[j][2:] }) + for _, node := range nodes { + fmt.Fprintf(out, "%s\n", node) + } + + sort.Strings(edges) + for _, edge := range edges { + fmt.Fprintf(out, " %s\n", edge) + } + + return out.String(), res +} + +const skipCleanup = false // for debugging; don't commit 'true'! + +// makeTree creates a new temporary directory containing the specified +// file tree, and chdirs to it. Call the cleanup function to restore the +// cwd and delete the tree. +func makeTree(t *testing.T, tree map[string]string) (dir string, cleanup func()) { + dir, err := ioutil.TempDir("", "") + if err != nil { + t.Fatal(err) + } + + cleanup = func() { + if skipCleanup { + t.Logf("Skipping cleanup of temp dir: %s", dir) + return + } + os.RemoveAll(dir) // ignore errors + } + + for name, content := range tree { + name := filepath.Join(dir, name) + if err := os.MkdirAll(filepath.Dir(name), 0777); err != nil { + cleanup() + t.Fatal(err) + } + if err := ioutil.WriteFile(name, []byte(content), 0666); err != nil { + cleanup() + t.Fatal(err) + } + } + return dir, cleanup +} + +func constant(p *packages.Package, name string) *types.Const { + return p.Types.Scope().Lookup(name).(*types.Const) +} diff --git a/deps/golang.org/x/tools/go/packages/stdlib_test.go b/deps/golang.org/x/tools/go/packages/stdlib_test.go new file mode 100644 index 000000000..ecaa89d62 --- /dev/null +++ b/deps/golang.org/x/tools/go/packages/stdlib_test.go @@ -0,0 +1,135 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package packages_test + +import ( + "bytes" + "io/ioutil" + "path/filepath" + "runtime" + "strings" + "testing" + "time" + + "golang.org/x/tools/go/packages" +) + +// This test loads the metadata for the standard library, +func TestStdlibMetadata(t *testing.T) { + // TODO(adonovan): see if we can get away without this hack. + // if runtime.GOOS == "android" { + // t.Skipf("incomplete std lib on %s", runtime.GOOS) + // } + + runtime.GC() + t0 := time.Now() + var memstats runtime.MemStats + runtime.ReadMemStats(&memstats) + alloc := memstats.Alloc + + // Load, parse and type-check the program. + cfg := &packages.Config{ + Mode: packages.LoadAllSyntax, + Error: func(error) {}, + } + pkgs, err := packages.Load(cfg, "std") + if err != nil { + t.Fatalf("failed to load metadata: %v", err) + } + + t1 := time.Now() + runtime.GC() + runtime.ReadMemStats(&memstats) + runtime.KeepAlive(pkgs) + + t.Logf("Loaded %d packages", len(pkgs)) + numPkgs := len(pkgs) + + want := 150 // 186 on linux, 185 on windows. + if numPkgs < want { + t.Errorf("Loaded only %d packages, want at least %d", numPkgs, want) + } + + t.Log("GOMAXPROCS: ", runtime.GOMAXPROCS(0)) + t.Log("Metadata: ", t1.Sub(t0)) // ~800ms on 12 threads + t.Log("#MB: ", int64(memstats.Alloc-alloc)/1000000) // ~1MB +} + +func TestCgoOption(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode; uses tons of memory (golang.org/issue/14113)") + } + + // TODO(adonovan): see if we can get away without these old + // go/loader hacks now that we use the go list command. + // + // switch runtime.GOOS { + // // On these systems, the net and os/user packages don't use cgo + // // or the std library is incomplete (Android). + // case "android", "plan9", "solaris", "windows": + // t.Skipf("no cgo or incomplete std lib on %s", runtime.GOOS) + // } + // // In nocgo builds (e.g. linux-amd64-nocgo), + // // there is no "runtime/cgo" package, + // // so cgo-generated Go files will have a failing import. + // if !build.Default.CgoEnabled { + // return + // } + + // Test that we can load cgo-using packages with + // DisableCgo=true/false, which, among other things, causes go + // list to select pure Go/native implementations, respectively, + // based on build tags. + // + // Each entry specifies a package-level object and the generic + // file expected to define it when cgo is disabled. + // When cgo is enabled, the exact file is not specified (since + // it varies by platform), but must differ from the generic one. + // + // The test also loads the actual file to verify that the + // object is indeed defined at that location. + for _, test := range []struct { + pkg, name, genericFile string + }{ + {"net", "cgoLookupHost", "cgo_stub.go"}, + {"os/user", "current", "lookup_stubs.go"}, + } { + cfg := &packages.Config{ + Mode: packages.LoadSyntax, + Error: func(error) {}, + } + pkgs, err := packages.Load(cfg, test.pkg) + if err != nil { + t.Errorf("Load failed: %v", err) + continue + } + pkg := pkgs[0] + obj := pkg.Types.Scope().Lookup(test.name) + if obj == nil { + t.Errorf("no object %s.%s", test.pkg, test.name) + continue + } + posn := pkg.Fset.Position(obj.Pos()) + gotFile := filepath.Base(posn.Filename) + filesMatch := gotFile == test.genericFile + + if filesMatch { + t.Errorf("!DisableCgo: %s found in %s, want native file", + obj, gotFile) + } + + // Load the file and check the object is declared at the right place. + b, err := ioutil.ReadFile(posn.Filename) + if err != nil { + t.Errorf("can't read %s: %s", posn.Filename, err) + continue + } + line := string(bytes.Split(b, []byte("\n"))[posn.Line-1]) + // Don't assume posn.Column is accurate. + if !strings.Contains(line, "func "+test.name) { + t.Errorf("%s: %s not declared here (looking at %q)", posn, obj, line) + } + } +} diff --git a/deps/golang.org/x/tools/go/pointer/api.go b/deps/golang.org/x/tools/go/pointer/api.go index 2b7e79e67..3c5c6dce9 100644 --- a/deps/golang.org/x/tools/go/pointer/api.go +++ b/deps/golang.org/x/tools/go/pointer/api.go @@ -132,7 +132,7 @@ func (c *Config) AddIndirectQuery(v ssa.Value) { // // 'type T struct { F *int }', the following query will access the field F. // c.AddExtendedQuery(v, "x[1][0].F") func (c *Config) AddExtendedQuery(v ssa.Value, query string) (*Pointer, error) { - ops, _, err := parseExtendedQuery(v.Type().Underlying(), query) + ops, _, err := parseExtendedQuery(v.Type(), query) if err != nil { return nil, fmt.Errorf("invalid query %q: %s", query, err) } diff --git a/deps/golang.org/x/tools/go/pointer/query.go b/deps/golang.org/x/tools/go/pointer/query.go index 1263d318e..b52cc9f3b 100644 --- a/deps/golang.org/x/tools/go/pointer/query.go +++ b/deps/golang.org/x/tools/go/pointer/query.go @@ -67,7 +67,7 @@ func destructuringOps(typ types.Type, expr ast.Expr) ([]interface{}, types.Type, } var structT *types.Struct - switch typ := typ.(type) { + switch typ := typ.Underlying().(type) { case *types.Pointer: var ok bool structT, ok = typ.Elem().Underlying().(*types.Struct) @@ -107,7 +107,7 @@ func destructuringOps(typ types.Type, expr ast.Expr) ([]interface{}, types.Type, if err != nil { return nil, nil, err } - switch typ := typ.(type) { + switch typ := typ.Underlying().(type) { case *types.Array: out = append(out, "arrayelem") return out, typ.Elem().Underlying(), nil diff --git a/deps/golang.org/x/tools/go/pointer/query_test.go b/deps/golang.org/x/tools/go/pointer/query_test.go index 099cc5421..2756fc0e0 100644 --- a/deps/golang.org/x/tools/go/pointer/query_test.go +++ b/deps/golang.org/x/tools/go/pointer/query_test.go @@ -1,17 +1,20 @@ package pointer import ( - "go/ast" - "go/parser" - "go/token" - "go/types" "reflect" "testing" + + "golang.org/x/tools/go/loader" ) func TestParseExtendedQuery(t *testing.T) { const myprog = ` package pkg + +import "reflect" + +type T []*int + var V1 *int var V2 **int var V3 []*int @@ -19,6 +22,8 @@ var V4 chan []*int var V5 struct {F1, F2 chan *int} var V6 [1]chan *int var V7 int +var V8 T +var V9 reflect.Value ` tests := []struct { in string @@ -27,8 +32,10 @@ var V7 int valid bool }{ {`x`, []interface{}{"x"}, "V1", true}, + {`x`, []interface{}{"x"}, "V9", true}, {`*x`, []interface{}{"x", "load"}, "V2", true}, {`x[0]`, []interface{}{"x", "sliceelem"}, "V3", true}, + {`x[0]`, []interface{}{"x", "sliceelem"}, "V8", true}, {`<-x`, []interface{}{"x", "recv"}, "V4", true}, {`(<-x)[0]`, []interface{}{"x", "recv", "sliceelem"}, "V4", true}, {`<-x.F2`, []interface{}{"x", "field", 1, "recv"}, "V5", true}, @@ -40,19 +47,20 @@ var V7 int {`close(x)`, nil, "V1", false}, } - fset := token.NewFileSet() - f, err := parser.ParseFile(fset, "file.go", myprog, 0) + var conf loader.Config + f, err := conf.ParseFile("file.go", myprog) if err != nil { t.Fatal(err) } - cfg := &types.Config{} - pkg, err := cfg.Check("main", fset, []*ast.File{f}, nil) + conf.CreateFromFiles("main", f) + lprog, err := conf.Load() if err != nil { t.Fatal(err) } + pkg := lprog.Created[0].Pkg for _, test := range tests { - typ := pkg.Scope().Lookup(test.v).Type().Underlying() + typ := pkg.Scope().Lookup(test.v).Type() ops, _, err := parseExtendedQuery(typ, test.in) if test.valid && err != nil { t.Errorf("parseExtendedQuery(%q) = %s, expected no error", test.in, err) diff --git a/deps/golang.org/x/tools/go/pointer/reflect.go b/deps/golang.org/x/tools/go/pointer/reflect.go index 3439a8965..7aa1a9cb8 100644 --- a/deps/golang.org/x/tools/go/pointer/reflect.go +++ b/deps/golang.org/x/tools/go/pointer/reflect.go @@ -30,7 +30,7 @@ package pointer import ( "fmt" - exact "go/constant" + "go/constant" "go/types" "reflect" @@ -1024,7 +1024,7 @@ func ext۰reflect۰ChanOf(a *analysis, cgn *cgnode) { var dir reflect.ChanDir // unknown if site := cgn.callersite; site != nil { if c, ok := site.instr.Common().Args[0].(*ssa.Const); ok { - v, _ := exact.Int64Val(c.Value) + v, _ := constant.Int64Val(c.Value) if 0 <= v && v <= int64(reflect.BothDir) { dir = reflect.ChanDir(v) } @@ -1668,7 +1668,7 @@ func ext۰reflect۰rtype۰FieldByName(a *analysis, cgn *cgnode) { var name string if site := cgn.callersite; site != nil { if c, ok := site.instr.Common().Args[0].(*ssa.Const); ok { - name = exact.StringVal(c.Value) + name = constant.StringVal(c.Value) } } @@ -1751,7 +1751,7 @@ func ext۰reflect۰rtype۰InOut(a *analysis, cgn *cgnode, out bool) { index := -1 if site := cgn.callersite; site != nil { if c, ok := site.instr.Common().Args[0].(*ssa.Const); ok { - v, _ := exact.Int64Val(c.Value) + v, _ := constant.Int64Val(c.Value) index = int(v) } } @@ -1910,7 +1910,7 @@ func ext۰reflect۰rtype۰MethodByName(a *analysis, cgn *cgnode) { var name string if site := cgn.callersite; site != nil { if c, ok := site.instr.Common().Args[0].(*ssa.Const); ok { - name = exact.StringVal(c.Value) + name = constant.StringVal(c.Value) } } diff --git a/deps/golang.org/x/tools/go/ssa/builder.go b/deps/golang.org/x/tools/go/ssa/builder.go index 44abc5b28..fb6638a40 100644 --- a/deps/golang.org/x/tools/go/ssa/builder.go +++ b/deps/golang.org/x/tools/go/ssa/builder.go @@ -32,7 +32,7 @@ package ssa import ( "fmt" "go/ast" - exact "go/constant" + "go/constant" "go/token" "go/types" "os" @@ -63,7 +63,7 @@ var ( // SSA Value constants. vZero = intConst(0) vOne = intConst(1) - vTrue = NewConst(exact.MakeBool(true), tBool) + vTrue = NewConst(constant.MakeBool(true), tBool) ) // builder holds state associated with the package currently being built. @@ -131,11 +131,11 @@ func (b *builder) logicalBinop(fn *Function, e *ast.BinaryExpr) Value { switch e.Op { case token.LAND: b.cond(fn, e.X, rhs, done) - short = NewConst(exact.MakeBool(false), t) + short = NewConst(constant.MakeBool(false), t) case token.LOR: b.cond(fn, e.X, done, rhs) - short = NewConst(exact.MakeBool(true), t) + short = NewConst(constant.MakeBool(true), t) } // Is rhs unreachable? @@ -969,10 +969,10 @@ func (b *builder) setCall(fn *Function, e *ast.CallExpr, c *CallCommon) { c.Args = b.emitCallArgs(fn, sig, e, c.Args) } -// assignOp emits to fn code to perform loc += incr or loc -= incr. -func (b *builder) assignOp(fn *Function, loc lvalue, incr Value, op token.Token) { +// assignOp emits to fn code to perform loc = val. +func (b *builder) assignOp(fn *Function, loc lvalue, val Value, op token.Token, pos token.Pos) { oldv := loc.load(fn) - loc.store(fn, emitArith(fn, op, oldv, emitConv(fn, incr, oldv.Type()), loc.typ(), token.NoPos)) + loc.store(fn, emitArith(fn, op, oldv, emitConv(fn, val, oldv.Type()), loc.typ(), pos)) } // localValueSpec emits to fn code to define all of the vars in the @@ -1998,7 +1998,7 @@ start: op = token.SUB } loc := b.addr(fn, s.X, false) - b.assignOp(fn, loc, NewConst(exact.MakeInt64(1), loc.typ()), op) + b.assignOp(fn, loc, NewConst(constant.MakeInt64(1), loc.typ()), op, s.Pos()) case *ast.AssignStmt: switch s.Tok { @@ -2007,7 +2007,7 @@ start: default: // +=, etc. op := s.Tok + token.ADD - token.ADD_ASSIGN - b.assignOp(fn, b.addr(fn, s.Lhs[0], false), b.expr(fn, s.Rhs[0]), op) + b.assignOp(fn, b.addr(fn, s.Lhs[0], false), b.expr(fn, s.Rhs[0]), op, s.Pos()) } case *ast.GoStmt: diff --git a/deps/golang.org/x/tools/go/ssa/const.go b/deps/golang.org/x/tools/go/ssa/const.go index 2870eea5e..f43792e7f 100644 --- a/deps/golang.org/x/tools/go/ssa/const.go +++ b/deps/golang.org/x/tools/go/ssa/const.go @@ -8,7 +8,7 @@ package ssa import ( "fmt" - exact "go/constant" + "go/constant" "go/token" "go/types" "strconv" @@ -17,14 +17,14 @@ import ( // NewConst returns a new constant of the specified value and type. // val must be valid according to the specification of Const.Value. // -func NewConst(val exact.Value, typ types.Type) *Const { +func NewConst(val constant.Value, typ types.Type) *Const { return &Const{typ, val} } // intConst returns an 'int' constant that evaluates to i. // (i is an int64 in case the host is narrower than the target.) func intConst(i int64) *Const { - return NewConst(exact.MakeInt64(i), tInt) + return NewConst(constant.MakeInt64(i), tInt) } // nilConst returns a nil constant of the specified type, which may @@ -36,7 +36,7 @@ func nilConst(typ types.Type) *Const { // stringConst returns a 'string' constant that evaluates to s. func stringConst(s string) *Const { - return NewConst(exact.MakeString(s), tString) + return NewConst(constant.MakeString(s), tString) } // zeroConst returns a new "zero" constant of the specified type, @@ -48,11 +48,11 @@ func zeroConst(t types.Type) *Const { case *types.Basic: switch { case t.Info()&types.IsBoolean != 0: - return NewConst(exact.MakeBool(false), t) + return NewConst(constant.MakeBool(false), t) case t.Info()&types.IsNumeric != 0: - return NewConst(exact.MakeInt64(0), t) + return NewConst(constant.MakeInt64(0), t) case t.Info()&types.IsString != 0: - return NewConst(exact.MakeString(""), t) + return NewConst(constant.MakeString(""), t) case t.Kind() == types.UnsafePointer: fallthrough case t.Kind() == types.UntypedNil: @@ -74,8 +74,8 @@ func (c *Const) RelString(from *types.Package) string { var s string if c.Value == nil { s = "nil" - } else if c.Value.Kind() == exact.String { - s = exact.StringVal(c.Value) + } else if c.Value.Kind() == constant.String { + s = constant.StringVal(c.Value) const max = 20 // TODO(adonovan): don't cut a rune in half. if len(s) > max { @@ -121,14 +121,14 @@ func (c *Const) IsNil() bool { // a signed 64-bit integer. // func (c *Const) Int64() int64 { - switch x := exact.ToInt(c.Value); x.Kind() { - case exact.Int: - if i, ok := exact.Int64Val(x); ok { + switch x := constant.ToInt(c.Value); x.Kind() { + case constant.Int: + if i, ok := constant.Int64Val(x); ok { return i } return 0 - case exact.Float: - f, _ := exact.Float64Val(x) + case constant.Float: + f, _ := constant.Float64Val(x) return int64(f) } panic(fmt.Sprintf("unexpected constant value: %T", c.Value)) @@ -138,14 +138,14 @@ func (c *Const) Int64() int64 { // an unsigned 64-bit integer. // func (c *Const) Uint64() uint64 { - switch x := exact.ToInt(c.Value); x.Kind() { - case exact.Int: - if u, ok := exact.Uint64Val(x); ok { + switch x := constant.ToInt(c.Value); x.Kind() { + case constant.Int: + if u, ok := constant.Uint64Val(x); ok { return u } return 0 - case exact.Float: - f, _ := exact.Float64Val(x) + case constant.Float: + f, _ := constant.Float64Val(x) return uint64(f) } panic(fmt.Sprintf("unexpected constant value: %T", c.Value)) @@ -155,7 +155,7 @@ func (c *Const) Uint64() uint64 { // a float64. // func (c *Const) Float64() float64 { - f, _ := exact.Float64Val(c.Value) + f, _ := constant.Float64Val(c.Value) return f } @@ -163,7 +163,7 @@ func (c *Const) Float64() float64 { // fit a complex128. // func (c *Const) Complex128() complex128 { - re, _ := exact.Float64Val(exact.Real(c.Value)) - im, _ := exact.Float64Val(exact.Imag(c.Value)) + re, _ := constant.Float64Val(constant.Real(c.Value)) + im, _ := constant.Float64Val(constant.Imag(c.Value)) return complex(re, im) } diff --git a/deps/golang.org/x/tools/go/ssa/create.go b/deps/golang.org/x/tools/go/ssa/create.go index 69ac12b1b..85163a0c5 100644 --- a/deps/golang.org/x/tools/go/ssa/create.go +++ b/deps/golang.org/x/tools/go/ssa/create.go @@ -251,12 +251,19 @@ func (prog *Program) AllPackages() []*Package { return pkgs } -// ImportedPackage returns the importable SSA Package whose import -// path is path, or nil if no such SSA package has been created. +// ImportedPackage returns the importable Package whose PkgPath +// is path, or nil if no such Package has been created. // -// Not all packages are importable. For example, no import -// declaration can resolve to the x_test package created by 'go test' -// or the ad-hoc main package created 'go build foo.go'. +// A parameter to CreatePackage determines whether a package should be +// considered importable. For example, no import declaration can resolve +// to the ad-hoc main package created by 'go build foo.go'. +// +// TODO(adonovan): rethink this function and the "importable" concept; +// most packages are importable. This function assumes that all +// types.Package.Path values are unique within the ssa.Program, which is +// false---yet this function remains very convenient. +// Clients should use (*Program).Package instead where possible. +// SSA doesn't really need a string-keyed map of packages. // func (prog *Program) ImportedPackage(path string) *Package { return prog.imported[path] diff --git a/deps/golang.org/x/tools/go/ssa/doc.go b/deps/golang.org/x/tools/go/ssa/doc.go index 2aa04f436..1a13640f9 100644 --- a/deps/golang.org/x/tools/go/ssa/doc.go +++ b/deps/golang.org/x/tools/go/ssa/doc.go @@ -23,11 +23,13 @@ // such as multi-way branch can be reconstructed as needed; see // ssautil.Switches() for an example. // -// To construct an SSA-form program, call ssautil.CreateProgram on a -// loader.Program, a set of type-checked packages created from -// parsed Go source files. The resulting ssa.Program contains all the -// packages and their members, but SSA code is not created for -// function bodies until a subsequent call to (*Package).Build. +// The simplest way to create the SSA representation of a package is +// to load typed syntax trees using golang.org/x/tools/go/packages, then +// invoke the ssautil.Packages helper function. See ExampleLoadPackages +// and ExampleWholeProgram for examples. +// The resulting ssa.Program contains all the packages and their +// members, but SSA code is not created for function bodies until a +// subsequent call to (*Package).Build or (*Program).Build. // // The builder initially builds a naive SSA form in which all local // variables are addresses of stack locations with explicit loads and diff --git a/deps/golang.org/x/tools/go/ssa/example_test.go b/deps/golang.org/x/tools/go/ssa/example_test.go index 31fa56138..8bbe2d634 100644 --- a/deps/golang.org/x/tools/go/ssa/example_test.go +++ b/deps/golang.org/x/tools/go/ssa/example_test.go @@ -11,9 +11,10 @@ import ( "go/parser" "go/token" "go/types" + "log" "os" - "golang.org/x/tools/go/loader" + "golang.org/x/tools/go/packages" "golang.org/x/tools/go/ssa" "golang.org/x/tools/go/ssa/ssautil" ) @@ -113,26 +114,44 @@ func ExampleBuildPackage() { // return } -// This program shows how to load a main package (cmd/cover) and all its -// dependencies from source, using the loader, and then build SSA code -// for the entire program. This is what you'd typically use for a -// whole-program analysis. -// -func ExampleLoadProgram() { - // Load cmd/cover and its dependencies. - var conf loader.Config - conf.Import("cmd/cover") - lprog, err := conf.Load() +// This example builds SSA code for a set of packages using the +// x/tools/go/packages API. This is what you would typically use for a +// analysis capable of operating on a single package. +func ExampleLoadPackages() { + // Load, parse, and type-check the initial packages. + cfg := &packages.Config{Mode: packages.LoadSyntax} + initial, err := packages.Load(cfg, "fmt", "net/http") if err != nil { - fmt.Print(err) // type error in some package - return + log.Fatal(err) } - // Create SSA-form program representation. - prog := ssautil.CreateProgram(lprog, ssa.SanityCheckFunctions) + // Create SSA packages for all well-typed packages. + prog, pkgs := ssautil.Packages(initial, ssa.PrintPackages) + _ = prog - // Build SSA code for the entire cmd/cover program. - prog.Build() + // Build SSA code for the well-typed initial packages. + for _, p := range pkgs { + if p != nil { + p.Build() + } + } +} - // Output: +// This example builds SSA code for a set of packages plus all their dependencies, +// using the x/tools/go/packages API. +// This is what you'd typically use for a whole-program analysis. +func ExampleLoadWholeProgram() { + // Load, parse, and type-check the whole program. + cfg := packages.Config{Mode: packages.LoadAllSyntax} + initial, err := packages.Load(&cfg, "fmt", "net/http") + if err != nil { + log.Fatal(err) + } + + // Create SSA packages for all well-typed packages. + prog, pkgs := ssautil.Packages(initial, ssa.PrintPackages) + _ = pkgs + + // Build SSA code for the whole program. + prog.Build() } diff --git a/deps/golang.org/x/tools/go/ssa/interp/external.go b/deps/golang.org/x/tools/go/ssa/interp/external.go index 34442caec..2c4dcc76d 100644 --- a/deps/golang.org/x/tools/go/ssa/interp/external.go +++ b/deps/golang.org/x/tools/go/ssa/interp/external.go @@ -32,118 +32,119 @@ var externals = make(map[string]externalFn) func init() { // That little dot ۰ is an Arabic zero numeral (U+06F0), categories [Nd]. for k, v := range map[string]externalFn{ - "(*sync.Pool).Get": ext۰sync۰Pool۰Get, - "(*sync.Pool).Put": ext۰nop, - "(reflect.Value).Bool": ext۰reflect۰Value۰Bool, - "(reflect.Value).CanAddr": ext۰reflect۰Value۰CanAddr, - "(reflect.Value).CanInterface": ext۰reflect۰Value۰CanInterface, - "(reflect.Value).Elem": ext۰reflect۰Value۰Elem, - "(reflect.Value).Field": ext۰reflect۰Value۰Field, - "(reflect.Value).Float": ext۰reflect۰Value۰Float, - "(reflect.Value).Index": ext۰reflect۰Value۰Index, - "(reflect.Value).Int": ext۰reflect۰Value۰Int, - "(reflect.Value).Interface": ext۰reflect۰Value۰Interface, - "(reflect.Value).IsNil": ext۰reflect۰Value۰IsNil, - "(reflect.Value).IsValid": ext۰reflect۰Value۰IsValid, - "(reflect.Value).Kind": ext۰reflect۰Value۰Kind, - "(reflect.Value).Len": ext۰reflect۰Value۰Len, - "(reflect.Value).MapIndex": ext۰reflect۰Value۰MapIndex, - "(reflect.Value).MapKeys": ext۰reflect۰Value۰MapKeys, - "(reflect.Value).NumField": ext۰reflect۰Value۰NumField, - "(reflect.Value).NumMethod": ext۰reflect۰Value۰NumMethod, - "(reflect.Value).Pointer": ext۰reflect۰Value۰Pointer, - "(reflect.Value).Set": ext۰reflect۰Value۰Set, - "(reflect.Value).String": ext۰reflect۰Value۰String, - "(reflect.Value).Type": ext۰reflect۰Value۰Type, - "(reflect.Value).Uint": ext۰reflect۰Value۰Uint, - "(reflect.error).Error": ext۰reflect۰error۰Error, - "(reflect.rtype).Bits": ext۰reflect۰rtype۰Bits, - "(reflect.rtype).Elem": ext۰reflect۰rtype۰Elem, - "(reflect.rtype).Field": ext۰reflect۰rtype۰Field, - "(reflect.rtype).In": ext۰reflect۰rtype۰In, - "(reflect.rtype).Kind": ext۰reflect۰rtype۰Kind, - "(reflect.rtype).NumField": ext۰reflect۰rtype۰NumField, - "(reflect.rtype).NumIn": ext۰reflect۰rtype۰NumIn, - "(reflect.rtype).NumMethod": ext۰reflect۰rtype۰NumMethod, - "(reflect.rtype).NumOut": ext۰reflect۰rtype۰NumOut, - "(reflect.rtype).Out": ext۰reflect۰rtype۰Out, - "(reflect.rtype).Size": ext۰reflect۰rtype۰Size, - "(reflect.rtype).String": ext۰reflect۰rtype۰String, - "bytes.init": ext۰nop, // avoid asm dependency - "bytes.Equal": ext۰bytes۰Equal, - "bytes.IndexByte": ext۰bytes۰IndexByte, - "hash/crc32.haveSSE42": ext۰crc32۰haveSSE42, - "internal/cpu.cpuid": ext۰cpu۰cpuid, - "math.Abs": ext۰math۰Abs, - "math.Exp": ext۰math۰Exp, - "math.Float32bits": ext۰math۰Float32bits, - "math.Float32frombits": ext۰math۰Float32frombits, - "math.Float64bits": ext۰math۰Float64bits, - "math.Float64frombits": ext۰math۰Float64frombits, - "math.Ldexp": ext۰math۰Ldexp, - "math.Log": ext۰math۰Log, - "math.Min": ext۰math۰Min, - "math.hasSSE4": ext۰math۰hasSSE4, - "math.hasVectorFacility": ext۰math۰hasVectorFacility, - "os.runtime_args": ext۰os۰runtime_args, - "os.runtime_beforeExit": ext۰nop, - "os/signal.init": ext۰nop, - "reflect.New": ext۰reflect۰New, - "reflect.SliceOf": ext۰reflect۰SliceOf, - "reflect.TypeOf": ext۰reflect۰TypeOf, - "reflect.ValueOf": ext۰reflect۰ValueOf, - "reflect.Zero": ext۰reflect۰Zero, - "reflect.init": ext۰reflect۰Init, - "reflect.valueInterface": ext۰reflect۰valueInterface, - "runtime.Breakpoint": ext۰runtime۰Breakpoint, - "runtime.Caller": ext۰runtime۰Caller, - "runtime.Callers": ext۰runtime۰Callers, - "runtime.FuncForPC": ext۰runtime۰FuncForPC, - "runtime.GC": ext۰runtime۰GC, - "runtime.GOMAXPROCS": ext۰runtime۰GOMAXPROCS, - "runtime.Goexit": ext۰runtime۰Goexit, - "runtime.Gosched": ext۰runtime۰Gosched, - "runtime.init": ext۰nop, - "runtime.KeepAlive": ext۰nop, - "runtime.NumCPU": ext۰runtime۰NumCPU, - "runtime.NumGoroutine": ext۰runtime۰NumGoroutine, - "runtime.ReadMemStats": ext۰runtime۰ReadMemStats, - "runtime.SetFinalizer": ext۰nop, // ignore - "(*runtime.Func).Entry": ext۰runtime۰Func۰Entry, - "(*runtime.Func).FileLine": ext۰runtime۰Func۰FileLine, - "(*runtime.Func).Name": ext۰runtime۰Func۰Name, - "runtime.environ": ext۰runtime۰environ, - "runtime.getgoroot": ext۰runtime۰getgoroot, - "strings.init": ext۰nop, // avoid asm dependency - "strings.Count": ext۰strings۰Count, - "strings.Index": ext۰strings۰Index, - "strings.IndexByte": ext۰strings۰IndexByte, - "sync.runtime_Semacquire": ext۰nop, // unimplementable - "sync.runtime_Semrelease": ext۰nop, // unimplementable - "sync.runtime_Syncsemcheck": ext۰nop, // unimplementable - "sync.runtime_notifyListCheck": ext۰nop, - "sync.runtime_registerPoolCleanup": ext۰nop, - "sync/atomic.AddInt32": ext۰atomic۰AddInt32, - "sync/atomic.AddUint32": ext۰atomic۰AddUint32, - "sync/atomic.CompareAndSwapInt32": ext۰atomic۰CompareAndSwapInt32, - "sync/atomic.CompareAndSwapUint32": ext۰atomic۰CompareAndSwapUint32, - "sync/atomic.LoadInt32": ext۰atomic۰LoadInt32, - "sync/atomic.LoadUint32": ext۰atomic۰LoadUint32, - "sync/atomic.StoreInt32": ext۰atomic۰StoreInt32, - "sync/atomic.StoreUint32": ext۰atomic۰StoreUint32, - "sync/atomic.AddInt64": ext۰atomic۰AddInt64, - "sync/atomic.AddUint64": ext۰atomic۰AddUint64, - "sync/atomic.CompareAndSwapInt64": ext۰atomic۰CompareAndSwapInt64, - "sync/atomic.CompareAndSwapUint64": ext۰atomic۰CompareAndSwapUint64, - "sync/atomic.LoadInt64": ext۰atomic۰LoadInt64, - "sync/atomic.LoadUint64": ext۰atomic۰LoadUint64, - "sync/atomic.StoreInt64": ext۰atomic۰StoreInt64, - "sync/atomic.StoreUint64": ext۰atomic۰StoreUint64, - "(*sync/atomic.Value).Load": ext۰atomic۰ValueLoad, - "(*sync/atomic.Value).Store": ext۰atomic۰ValueStore, - "testing.MainStart": ext۰testing۰MainStart, - "time.Sleep": ext۰time۰Sleep, - "time.now": ext۰time۰now, + "(*sync.Pool).Get": ext۰sync۰Pool۰Get, + "(*sync.Pool).Put": ext۰nop, + "(reflect.Value).Bool": ext۰reflect۰Value۰Bool, + "(reflect.Value).CanAddr": ext۰reflect۰Value۰CanAddr, + "(reflect.Value).CanInterface": ext۰reflect۰Value۰CanInterface, + "(reflect.Value).Elem": ext۰reflect۰Value۰Elem, + "(reflect.Value).Field": ext۰reflect۰Value۰Field, + "(reflect.Value).Float": ext۰reflect۰Value۰Float, + "(reflect.Value).Index": ext۰reflect۰Value۰Index, + "(reflect.Value).Int": ext۰reflect۰Value۰Int, + "(reflect.Value).Interface": ext۰reflect۰Value۰Interface, + "(reflect.Value).IsNil": ext۰reflect۰Value۰IsNil, + "(reflect.Value).IsValid": ext۰reflect۰Value۰IsValid, + "(reflect.Value).Kind": ext۰reflect۰Value۰Kind, + "(reflect.Value).Len": ext۰reflect۰Value۰Len, + "(reflect.Value).MapIndex": ext۰reflect۰Value۰MapIndex, + "(reflect.Value).MapKeys": ext۰reflect۰Value۰MapKeys, + "(reflect.Value).NumField": ext۰reflect۰Value۰NumField, + "(reflect.Value).NumMethod": ext۰reflect۰Value۰NumMethod, + "(reflect.Value).Pointer": ext۰reflect۰Value۰Pointer, + "(reflect.Value).Set": ext۰reflect۰Value۰Set, + "(reflect.Value).String": ext۰reflect۰Value۰String, + "(reflect.Value).Type": ext۰reflect۰Value۰Type, + "(reflect.Value).Uint": ext۰reflect۰Value۰Uint, + "(reflect.error).Error": ext۰reflect۰error۰Error, + "(reflect.rtype).Bits": ext۰reflect۰rtype۰Bits, + "(reflect.rtype).Elem": ext۰reflect۰rtype۰Elem, + "(reflect.rtype).Field": ext۰reflect۰rtype۰Field, + "(reflect.rtype).In": ext۰reflect۰rtype۰In, + "(reflect.rtype).Kind": ext۰reflect۰rtype۰Kind, + "(reflect.rtype).NumField": ext۰reflect۰rtype۰NumField, + "(reflect.rtype).NumIn": ext۰reflect۰rtype۰NumIn, + "(reflect.rtype).NumMethod": ext۰reflect۰rtype۰NumMethod, + "(reflect.rtype).NumOut": ext۰reflect۰rtype۰NumOut, + "(reflect.rtype).Out": ext۰reflect۰rtype۰Out, + "(reflect.rtype).Size": ext۰reflect۰rtype۰Size, + "(reflect.rtype).String": ext۰reflect۰rtype۰String, + "bytes.init": ext۰nop, // avoid asm dependency + "bytes.Equal": ext۰bytes۰Equal, + "bytes.IndexByte": ext۰bytes۰IndexByte, + "hash/crc32.haveSSE42": ext۰crc32۰haveSSE42, + "internal/cpu.cpuid": ext۰cpu۰cpuid, + "internal/syscall/unix.syscall_fcntl": ext۰syscall۰unix۰syscall_fcntl, + "math.Abs": ext۰math۰Abs, + "math.Exp": ext۰math۰Exp, + "math.Float32bits": ext۰math۰Float32bits, + "math.Float32frombits": ext۰math۰Float32frombits, + "math.Float64bits": ext۰math۰Float64bits, + "math.Float64frombits": ext۰math۰Float64frombits, + "math.Ldexp": ext۰math۰Ldexp, + "math.Log": ext۰math۰Log, + "math.Min": ext۰math۰Min, + "math.hasSSE4": ext۰math۰hasSSE4, + "math.hasVectorFacility": ext۰math۰hasVectorFacility, + "os.runtime_args": ext۰os۰runtime_args, + "os.runtime_beforeExit": ext۰nop, + "os/signal.init": ext۰nop, + "reflect.New": ext۰reflect۰New, + "reflect.SliceOf": ext۰reflect۰SliceOf, + "reflect.TypeOf": ext۰reflect۰TypeOf, + "reflect.ValueOf": ext۰reflect۰ValueOf, + "reflect.Zero": ext۰reflect۰Zero, + "reflect.init": ext۰reflect۰Init, + "reflect.valueInterface": ext۰reflect۰valueInterface, + "runtime.Breakpoint": ext۰runtime۰Breakpoint, + "runtime.Caller": ext۰runtime۰Caller, + "runtime.Callers": ext۰runtime۰Callers, + "runtime.FuncForPC": ext۰runtime۰FuncForPC, + "runtime.GC": ext۰runtime۰GC, + "runtime.GOMAXPROCS": ext۰runtime۰GOMAXPROCS, + "runtime.Goexit": ext۰runtime۰Goexit, + "runtime.Gosched": ext۰runtime۰Gosched, + "runtime.init": ext۰nop, + "runtime.KeepAlive": ext۰nop, + "runtime.NumCPU": ext۰runtime۰NumCPU, + "runtime.NumGoroutine": ext۰runtime۰NumGoroutine, + "runtime.ReadMemStats": ext۰runtime۰ReadMemStats, + "runtime.SetFinalizer": ext۰nop, // ignore + "(*runtime.Func).Entry": ext۰runtime۰Func۰Entry, + "(*runtime.Func).FileLine": ext۰runtime۰Func۰FileLine, + "(*runtime.Func).Name": ext۰runtime۰Func۰Name, + "runtime.environ": ext۰runtime۰environ, + "runtime.getgoroot": ext۰runtime۰getgoroot, + "strings.init": ext۰nop, // avoid asm dependency + "strings.Count": ext۰strings۰Count, + "strings.Index": ext۰strings۰Index, + "strings.IndexByte": ext۰strings۰IndexByte, + "sync.runtime_Semacquire": ext۰nop, // unimplementable + "sync.runtime_Semrelease": ext۰nop, // unimplementable + "sync.runtime_Syncsemcheck": ext۰nop, // unimplementable + "sync.runtime_notifyListCheck": ext۰nop, + "sync.runtime_registerPoolCleanup": ext۰nop, + "sync/atomic.AddInt32": ext۰atomic۰AddInt32, + "sync/atomic.AddUint32": ext۰atomic۰AddUint32, + "sync/atomic.CompareAndSwapInt32": ext۰atomic۰CompareAndSwapInt32, + "sync/atomic.CompareAndSwapUint32": ext۰atomic۰CompareAndSwapUint32, + "sync/atomic.LoadInt32": ext۰atomic۰LoadInt32, + "sync/atomic.LoadUint32": ext۰atomic۰LoadUint32, + "sync/atomic.StoreInt32": ext۰atomic۰StoreInt32, + "sync/atomic.StoreUint32": ext۰atomic۰StoreUint32, + "sync/atomic.AddInt64": ext۰atomic۰AddInt64, + "sync/atomic.AddUint64": ext۰atomic۰AddUint64, + "sync/atomic.CompareAndSwapInt64": ext۰atomic۰CompareAndSwapInt64, + "sync/atomic.CompareAndSwapUint64": ext۰atomic۰CompareAndSwapUint64, + "sync/atomic.LoadInt64": ext۰atomic۰LoadInt64, + "sync/atomic.LoadUint64": ext۰atomic۰LoadUint64, + "sync/atomic.StoreInt64": ext۰atomic۰StoreInt64, + "sync/atomic.StoreUint64": ext۰atomic۰StoreUint64, + "(*sync/atomic.Value).Load": ext۰atomic۰ValueLoad, + "(*sync/atomic.Value).Store": ext۰atomic۰ValueStore, + "testing.MainStart": ext۰testing۰MainStart, + "time.Sleep": ext۰time۰Sleep, + "time.now": ext۰time۰now, } { externals[k] = v } @@ -500,6 +501,10 @@ func ext۰cpu۰cpuid(fr *frame, args []value) value { return tuple{uint32(0), uint32(0), uint32(0), uint32(0)} } +func ext۰syscall۰unix۰syscall_fcntl(fr *frame, args []value) value { + return tuple{int(0), wrapError(nil)} +} + // Pretend: type runtime.Func struct { entry *ssa.Function } func ext۰runtime۰Func۰FileLine(fr *frame, args []value) value { diff --git a/deps/golang.org/x/tools/go/ssa/interp/interp_test.go b/deps/golang.org/x/tools/go/ssa/interp/interp_test.go index 997922f66..3b15636a7 100644 --- a/deps/golang.org/x/tools/go/ssa/interp/interp_test.go +++ b/deps/golang.org/x/tools/go/ssa/interp/interp_test.go @@ -103,8 +103,8 @@ var gorootTestTests = []string{ "floatcmp.go", "crlf.go", // doesn't actually assert anything (runoutput) // Slow tests follow. - "bom.go", // ~1.7s - "gc1.go", // ~1.7s + "bom.go", // ~1.7s + "gc1.go", // ~1.7s "cmplxdivide.go cmplxdivide1.go", // ~2.4s // Working, but not worth enabling: @@ -192,7 +192,7 @@ func run(t *testing.T, dir, input string, success successPredicate) bool { interp.CapturedOutput = nil }() - hint = fmt.Sprintf("To dump SSA representation, run:\n%% go build golang.org/x/tools/cmd/ssadump && ./ssadump -test -build=CFP %s\n", input) + hint = fmt.Sprintf("To dump SSA representation, run:\n%% go build golang.org/x/tools/cmd/ssadump && ./ssadump -test -build=CFP %s\n", strings.Join(inputs, " ")) iprog, err := conf.Load() if err != nil { @@ -227,7 +227,7 @@ func run(t *testing.T, dir, input string, success successPredicate) bool { var out bytes.Buffer interp.CapturedOutput = &out - hint = fmt.Sprintf("To trace execution, run:\n%% go build golang.org/x/tools/cmd/ssadump && ./ssadump -build=C -test -run --interp=T %s\n", input) + hint = fmt.Sprintf("To trace execution, run:\n%% go build golang.org/x/tools/cmd/ssadump && ./ssadump -build=C -test -run --interp=T %s\n", strings.Join(inputs, " ")) exitCode := interp.Interpret(mainPkg, 0, &types.StdSizes{WordSize: 8, MaxAlign: 8}, inputs[0], []string{}) // The definition of success varies with each file. diff --git a/deps/golang.org/x/tools/go/ssa/interp/ops.go b/deps/golang.org/x/tools/go/ssa/interp/ops.go index f3419ec48..334d5b7b4 100644 --- a/deps/golang.org/x/tools/go/ssa/interp/ops.go +++ b/deps/golang.org/x/tools/go/ssa/interp/ops.go @@ -7,7 +7,7 @@ package interp import ( "bytes" "fmt" - exact "go/constant" + "go/constant" "go/token" "go/types" "strings" @@ -40,7 +40,7 @@ func constValue(c *ssa.Const) value { // TODO(adonovan): eliminate untyped constants from SSA form. switch t.Kind() { case types.Bool, types.UntypedBool: - return exact.BoolVal(c.Value) + return constant.BoolVal(c.Value) case types.Int, types.UntypedInt: // Assume sizeof(int) is same on host and target. return int(c.Int64()) @@ -75,8 +75,8 @@ func constValue(c *ssa.Const) value { case types.Complex128, types.UntypedComplex: return c.Complex128() case types.String, types.UntypedString: - if c.Value.Kind() == exact.String { - return exact.StringVal(c.Value) + if c.Value.Kind() == constant.String { + return constant.StringVal(c.Value) } return string(rune(c.Int64())) } diff --git a/deps/golang.org/x/tools/go/ssa/interp/testdata/complit.go b/deps/golang.org/x/tools/go/ssa/interp/testdata/complit.go index 7bec5231d..876c37b25 100644 --- a/deps/golang.org/x/tools/go/ssa/interp/testdata/complit.go +++ b/deps/golang.org/x/tools/go/ssa/interp/testdata/complit.go @@ -5,7 +5,9 @@ package main import "fmt" // Map literals. -func init() { +// TODO(adonovan): we can no longer print maps +// until the interpreter supports (reflect.Value).MapRange. +func _() { type M map[int]int m1 := []*M{{1: 1}, &M{2: 2}} want := "map[1:1] map[2:2]" diff --git a/deps/golang.org/x/tools/go/ssa/source_test.go b/deps/golang.org/x/tools/go/ssa/source_test.go index 43051f80e..d543c1b14 100644 --- a/deps/golang.org/x/tools/go/ssa/source_test.go +++ b/deps/golang.org/x/tools/go/ssa/source_test.go @@ -9,7 +9,7 @@ package ssa_test import ( "fmt" "go/ast" - exact "go/constant" + "go/constant" "go/parser" "go/token" "go/types" @@ -144,7 +144,7 @@ func checkConstValue(t *testing.T, prog *ssa.Program, obj *types.Const) { return } if obj.Name() != "nil" { - if !exact.Compare(c.Value, token.EQL, obj.Val()) { + if !constant.Compare(c.Value, token.EQL, obj.Val()) { t.Errorf("ConstValue(%s).Value (%s) != %s", obj, c.Value, obj.Val()) return diff --git a/deps/golang.org/x/tools/go/ssa/ssa.go b/deps/golang.org/x/tools/go/ssa/ssa.go index e8350f1c7..7f7998a51 100644 --- a/deps/golang.org/x/tools/go/ssa/ssa.go +++ b/deps/golang.org/x/tools/go/ssa/ssa.go @@ -10,7 +10,7 @@ package ssa import ( "fmt" "go/ast" - exact "go/constant" + "go/constant" "go/token" "go/types" "sync" @@ -404,9 +404,8 @@ type Parameter struct { // All source-level constant expressions are represented by a Const // of the same type and value. // -// Value holds the exact value of the constant, independent of its -// Type(), using the same representation as package go/exact uses for -// constants, or nil for a typed nil value. +// Value holds the value of the constant, independent of its Type(), +// using go/constant representation, or nil for a typed nil value. // // Pos() returns token.NoPos. // @@ -417,7 +416,7 @@ type Parameter struct { // type Const struct { typ types.Type - Value exact.Value + Value constant.Value } // A Global is a named Value holding the address of a package-level @@ -547,8 +546,8 @@ type BinOp struct { register // One of: // ADD SUB MUL QUO REM + - * / % - // AND OR XOR SHL SHR AND_NOT & | ^ << >> &~ - // EQL LSS GTR NEQ LEQ GEQ == != < <= < >= + // AND OR XOR SHL SHR AND_NOT & | ^ << >> &^ + // EQL NEQ LSS LEQ GTR GEQ == != < <= < >= Op token.Token X, Y Value } @@ -658,7 +657,7 @@ type ChangeInterface struct { // of X, and Program.Method(m) to find the implementation of a method. // // To construct the zero value of an interface type T, use: -// NewConst(exact.MakeNil(), T, pos) +// NewConst(constant.MakeNil(), T, pos) // // Pos() returns the ast.CallExpr.Lparen, if the instruction arose // from an explicit conversion in the source. @@ -788,7 +787,7 @@ type Slice struct { type FieldAddr struct { register X Value // *struct - Field int // index into X.Type().Deref().(*types.Struct).Fields + Field int // field is X.Type().Underlying().(*types.Pointer).Elem().Underlying().(*types.Struct).Field(Field) } // The Field instruction yields the Field of struct X. diff --git a/deps/golang.org/x/tools/go/ssa/ssautil/load.go b/deps/golang.org/x/tools/go/ssa/ssautil/load.go index 30b8053c7..9a69034b7 100644 --- a/deps/golang.org/x/tools/go/ssa/ssautil/load.go +++ b/deps/golang.org/x/tools/go/ssa/ssautil/load.go @@ -12,9 +12,57 @@ import ( "go/types" "golang.org/x/tools/go/loader" + "golang.org/x/tools/go/packages" "golang.org/x/tools/go/ssa" ) +// Packages creates an SSA program for a set of packages loaded from +// source syntax using the golang.org/x/tools/go/packages.Load function. +// It creates and returns an SSA package for each well-typed package in +// the initial list. The resulting list of packages has the same length +// as initial, and contains a nil if SSA could not be constructed for +// the corresponding initial package. +// +// Code for bodies of functions is not built until Build is called +// on the resulting Program. +// +// The mode parameter controls diagnostics and checking during SSA construction. +// +func Packages(initial []*packages.Package, mode ssa.BuilderMode) (*ssa.Program, []*ssa.Package) { + var fset *token.FileSet + if len(initial) > 0 { + fset = initial[0].Fset + } + + prog := ssa.NewProgram(fset, mode) + seen := make(map[*packages.Package]*ssa.Package) + var create func(p *packages.Package) *ssa.Package + create = func(p *packages.Package) *ssa.Package { + ssapkg, ok := seen[p] + if !ok { + if p.Types == nil || p.IllTyped { + // not well typed + seen[p] = nil + return nil + } + + ssapkg = prog.CreatePackage(p.Types, p.Syntax, p.TypesInfo, true) + seen[p] = ssapkg + + for _, imp := range p.Imports { + create(imp) + } + } + return ssapkg + } + + var ssapkgs []*ssa.Package + for _, p := range initial { + ssapkgs = append(ssapkgs, create(p)) + } + return prog, ssapkgs +} + // CreateProgram returns a new program in SSA form, given a program // loaded from source. An SSA package is created for each transitively // error-free package of lprog. @@ -22,7 +70,10 @@ import ( // Code for bodies of functions is not built until Build is called // on the result. // -// mode controls diagnostics and checking during SSA construction. +// The mode parameter controls diagnostics and checking during SSA construction. +// +// Deprecated: use golang.org/x/tools/go/packages and the Packages +// function instead; see ssa.ExampleLoadPackages. // func CreateProgram(lprog *loader.Program, mode ssa.BuilderMode) *ssa.Program { prog := ssa.NewProgram(lprog.Fset, mode) diff --git a/deps/golang.org/x/tools/go/ssa/ssautil/load_test.go b/deps/golang.org/x/tools/go/ssa/ssautil/load_test.go index 8ccd4637a..5a1efe623 100644 --- a/deps/golang.org/x/tools/go/ssa/ssautil/load_test.go +++ b/deps/golang.org/x/tools/go/ssa/ssautil/load_test.go @@ -5,14 +5,17 @@ package ssautil_test import ( + "bytes" "go/ast" "go/importer" "go/parser" "go/token" "go/types" "os" + "strings" "testing" + "golang.org/x/tools/go/packages" "golang.org/x/tools/go/ssa/ssautil" ) @@ -49,6 +52,42 @@ func TestBuildPackage(t *testing.T) { } } +func TestPackages(t *testing.T) { + cfg := &packages.Config{Mode: packages.LoadSyntax} + initial, err := packages.Load(cfg, "bytes") + if err != nil { + t.Fatal(err) + } + + prog, pkgs := ssautil.Packages(initial, 0) + bytesNewBuffer := pkgs[0].Func("NewBuffer") + bytesNewBuffer.Pkg.Build() + + // We'll dump the SSA of bytes.NewBuffer because it is small and stable. + out := new(bytes.Buffer) + bytesNewBuffer.WriteTo(out) + + // For determinism, sanitize the location. + location := prog.Fset.Position(bytesNewBuffer.Pos()).String() + got := strings.Replace(out.String(), location, "$GOROOT/src/bytes/buffer.go:1", -1) + + want := ` +# Name: bytes.NewBuffer +# Package: bytes +# Location: $GOROOT/src/bytes/buffer.go:1 +func NewBuffer(buf []byte) *Buffer: +0: entry P:0 S:0 + t0 = new Buffer (complit) *Buffer + t1 = &t0.buf [#0] *[]byte + *t1 = buf + return t0 + +`[1:] + if got != want { + t.Errorf("bytes.NewBuffer SSA = <<%s>>, want <<%s>>", got, want) + } +} + func TestBuildPackage_MissingImport(t *testing.T) { fset := token.NewFileSet() f, err := parser.ParseFile(fset, "bad.go", `package bad; import "missing"`, 0) diff --git a/deps/golang.org/x/tools/go/ssa/testmain.go b/deps/golang.org/x/tools/go/ssa/testmain.go index ea232ada9..8ec15ba50 100644 --- a/deps/golang.org/x/tools/go/ssa/testmain.go +++ b/deps/golang.org/x/tools/go/ssa/testmain.go @@ -8,8 +8,8 @@ package ssa // tests of the supplied packages. // It is closely coupled to $GOROOT/src/cmd/go/test.go and $GOROOT/src/testing. // -// TODO(adonovan): this file no longer needs to live in the ssa package. -// Move it to ssautil. +// TODO(adonovan): throws this all away now that x/tools/go/packages +// provides access to the actual synthetic test main files. import ( "bytes" @@ -26,6 +26,8 @@ import ( // FindTests returns the Test, Benchmark, and Example functions // (as defined by "go test") defined in the specified package, // and its TestMain function, if any. +// +// Deprecated: use x/tools/go/packages to access synthetic testmain packages. func FindTests(pkg *Package) (tests, benchmarks, examples []*Function, main *Function) { prog := pkg.Prog @@ -109,6 +111,8 @@ func isTest(name, prefix string) bool { // // Subsequent calls to prog.AllPackages include the new package. // The package pkg must belong to the program prog. +// +// Deprecated: use x/tools/go/packages to access synthetic testmain packages. func (prog *Program) CreateTestMainPackage(pkg *Package) *Package { if pkg.Prog != prog { log.Fatal("Package does not belong to Program") diff --git a/deps/golang.org/x/tools/go/vcs/vcs.go b/deps/golang.org/x/tools/go/vcs/vcs.go index 501c89425..114665aad 100644 --- a/deps/golang.org/x/tools/go/vcs/vcs.go +++ b/deps/golang.org/x/tools/go/vcs/vcs.go @@ -20,6 +20,7 @@ import ( "errors" "fmt" "log" + "net/url" "os" "os/exec" "path/filepath" @@ -566,8 +567,8 @@ func RepoRootForImportDynamic(importPath string, verbose bool) (*RepoRoot, error } } - if !strings.Contains(metaImport.RepoRoot, "://") { - return nil, fmt.Errorf("%s: invalid repo root %q; no scheme", urlStr, metaImport.RepoRoot) + if err := validateRepoRoot(metaImport.RepoRoot); err != nil { + return nil, fmt.Errorf("%s: invalid repo root %q: %v", urlStr, metaImport.RepoRoot, err) } rr := &RepoRoot{ VCS: ByCmd(metaImport.VCS), @@ -580,6 +581,19 @@ func RepoRootForImportDynamic(importPath string, verbose bool) (*RepoRoot, error return rr, nil } +// validateRepoRoot returns an error if repoRoot does not seem to be +// a valid URL with scheme. +func validateRepoRoot(repoRoot string) error { + url, err := url.Parse(repoRoot) + if err != nil { + return err + } + if url.Scheme == "" { + return errors.New("no scheme") + } + return nil +} + // metaImport represents the parsed tags from HTML files. type metaImport struct { @@ -589,15 +603,28 @@ type metaImport struct { // errNoMatch is returned from matchGoImport when there's no applicable match. var errNoMatch = errors.New("no import match") +// pathPrefix reports whether sub is a prefix of s, +// only considering entire path components. +func pathPrefix(s, sub string) bool { + // strings.HasPrefix is necessary but not sufficient. + if !strings.HasPrefix(s, sub) { + return false + } + // The remainder after the prefix must either be empty or start with a slash. + rem := s[len(sub):] + return rem == "" || rem[0] == '/' +} + // matchGoImport returns the metaImport from imports matching importPath. // An error is returned if there are multiple matches. // errNoMatch is returned if none match. func matchGoImport(imports []metaImport, importPath string) (_ metaImport, err error) { match := -1 for i, im := range imports { - if !strings.HasPrefix(importPath, im.Prefix) { + if !pathPrefix(importPath, im.Prefix) { continue } + if match != -1 { err = fmt.Errorf("multiple meta tags match import path %q", importPath) return diff --git a/deps/golang.org/x/tools/go/vcs/vcs_test.go b/deps/golang.org/x/tools/go/vcs/vcs_test.go index 8f36cac70..d18ff18e5 100644 --- a/deps/golang.org/x/tools/go/vcs/vcs_test.go +++ b/deps/golang.org/x/tools/go/vcs/vcs_test.go @@ -5,6 +5,7 @@ package vcs import ( + "errors" "io/ioutil" "os" "path" @@ -140,3 +141,140 @@ func TestParseMetaGoImports(t *testing.T) { } } } + +func TestValidateRepoRoot(t *testing.T) { + tests := []struct { + root string + ok bool + }{ + { + root: "", + ok: false, + }, + { + root: "http://", + ok: true, + }, + { + root: "git+ssh://", + ok: true, + }, + { + root: "http#://", + ok: false, + }, + { + root: "-config", + ok: false, + }, + { + root: "-config://", + ok: false, + }, + } + + for _, test := range tests { + err := validateRepoRoot(test.root) + ok := err == nil + if ok != test.ok { + want := "error" + if test.ok { + want = "nil" + } + t.Errorf("validateRepoRoot(%q) = %q, want %s", test.root, err, want) + } + } +} + +func TestMatchGoImport(t *testing.T) { + tests := []struct { + imports []metaImport + path string + mi metaImport + err error + }{ + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/foo", + mi: metaImport{Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/foo/", + mi: metaImport{Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + {Prefix: "example.com/user/fooa", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/foo", + mi: metaImport{Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + {Prefix: "example.com/user/fooa", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/fooa", + mi: metaImport{Prefix: "example.com/user/fooa", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + {Prefix: "example.com/user/foo/bar", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/foo/bar", + err: errors.New("should not be allowed to create nested repo"), + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + {Prefix: "example.com/user/foo/bar", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/foo/bar/baz", + err: errors.New("should not be allowed to create nested repo"), + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + {Prefix: "example.com/user/foo/bar", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/foo/bar/baz/qux", + err: errors.New("should not be allowed to create nested repo"), + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + {Prefix: "example.com/user/foo/bar", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com/user/foo/bar/baz/", + err: errors.New("should not be allowed to create nested repo"), + }, + { + imports: []metaImport{ + {Prefix: "example.com/user/foo", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + {Prefix: "example.com/user/foo/bar", VCS: "git", RepoRoot: "https://example.com/repo/target"}, + }, + path: "example.com", + err: errors.New("pathologically short path"), + }, + } + + for _, test := range tests { + mi, err := matchGoImport(test.imports, test.path) + if mi != test.mi { + t.Errorf("unexpected metaImport; got %v, want %v", mi, test.mi) + } + + got := err + want := test.err + if (got == nil) != (want == nil) { + t.Errorf("unexpected error; got %v, want %v", got, want) + } + } +} diff --git a/deps/golang.org/x/tools/godoc/analysis/README b/deps/golang.org/x/tools/godoc/analysis/README index 5b29a3260..d3e732eb5 100644 --- a/deps/golang.org/x/tools/godoc/analysis/README +++ b/deps/golang.org/x/tools/godoc/analysis/README @@ -49,7 +49,7 @@ CALLEES: Type info: - In the source viewer's lower pane, use a toggle div around the - IMPLEMENTS and METHODSETS lists, like we do in the pacakge view. + IMPLEMENTS and METHODSETS lists, like we do in the package view. Only expand them initially if short. - Include IMPLEMENTS and METHOD SETS information in search index. - URLs in IMPLEMENTS/METHOD SETS always link to source, even from the diff --git a/deps/golang.org/x/tools/godoc/cmdline.go b/deps/golang.org/x/tools/godoc/cmdline.go index 7c5368134..54f5f7ee7 100644 --- a/deps/golang.org/x/tools/godoc/cmdline.go +++ b/deps/golang.org/x/tools/godoc/cmdline.go @@ -48,6 +48,9 @@ func CommandLine(w io.Writer, fs vfs.NameSpace, pres *Presentation, args []strin // the fake built-in package contains unexported identifiers mode = NoFiltering | NoTypeAssoc } + if pres.AllMode { + mode |= NoFiltering + } if srcMode { // only filter exports if we don't have explicit command-line filter arguments if len(args) > 1 { @@ -69,8 +72,8 @@ func CommandLine(w io.Writer, fs vfs.NameSpace, pres *Presentation, args []strin abspath = pathpkg.Join(pres.PkgFSRoot(), toolsPath+path) cinfo = pres.GetCmdPageInfo(abspath, relpath, mode) if cinfo.IsEmpty() { - // Then try $GOROOT/cmd. - abspath = pathpkg.Join(pres.CmdFSRoot(), path) + // Then try $GOROOT/src/cmd. + abspath = pathpkg.Join(pres.CmdFSRoot(), cmdPrefix, path) cinfo = pres.GetCmdPageInfo(abspath, relpath, mode) } } @@ -131,18 +134,25 @@ func CommandLine(w io.Writer, fs vfs.NameSpace, pres *Presentation, args []strin // for this. That is, if we get passed a directory like the above, we map that // directory so that getPageInfo sees it as /target. // Returns the absolute and relative paths. -func paths(fs vfs.NameSpace, pres *Presentation, path string) (string, string) { +func paths(fs vfs.NameSpace, pres *Presentation, path string) (abspath, relpath string) { if filepath.IsAbs(path) { fs.Bind(target, vfs.OS(path), "/", vfs.BindReplace) return target, target } if build.IsLocalImport(path) { - cwd, _ := os.Getwd() // ignore errors + cwd, err := os.Getwd() + if err != nil { + log.Printf("error while getting working directory: %v", err) + } path = filepath.Join(cwd, path) fs.Bind(target, vfs.OS(path), "/", vfs.BindReplace) return target, target } - if bp, _ := build.Import(path, "", build.FindOnly); bp.Dir != "" && bp.ImportPath != "" { + bp, err := build.Import(path, "", build.FindOnly) + if err != nil { + log.Printf("error while importing build package: %v", err) + } + if bp.Dir != "" && bp.ImportPath != "" { fs.Bind(target, vfs.OS(bp.Dir), "/", vfs.BindReplace) return target, bp.ImportPath } diff --git a/deps/golang.org/x/tools/godoc/cmdline_test.go b/deps/golang.org/x/tools/godoc/cmdline_test.go index 602f2bbab..cebbf70ec 100644 --- a/deps/golang.org/x/tools/godoc/cmdline_test.go +++ b/deps/golang.org/x/tools/godoc/cmdline_test.go @@ -172,6 +172,10 @@ func First() { // Second function is second. func Second() { } + +// unexported function is third. +func unexported() { +} `, "src/gen/gen.go": `// Package gen package gen @@ -202,7 +206,7 @@ package main p: p, c: c, pattern: "/cmd/", - fsRoot: "/src/cmd", + fsRoot: "/src", } p.pkgHandler = handlerServer{ p: p, @@ -220,6 +224,7 @@ package main for _, tc := range []struct { desc string args []string + all bool exp string err bool }{ @@ -253,6 +258,18 @@ package main args: []string{"src/foo", "Second"}, exp: "// Second function is second.\nfunc Second() {\n}", }, + { + desc: "package w. unexported filter", + args: []string{"foo", "unexported"}, + all: true, + exp: "PACKAGE \nfunc unexported()\n unexported function is third.\n", + }, + { + desc: "package w. unexported filter", + args: []string{"foo", "unexported"}, + all: false, + exp: "PACKAGE ", + }, { desc: "package w. //line comments", args: []string{"gen", "F"}, @@ -284,11 +301,12 @@ package main exp: "", }, } { + p.AllMode = tc.all w := new(bytes.Buffer) err := CommandLine(w, fs, p, tc.args) if got, want := w.String(), tc.exp; got != want || tc.err == (err == nil) { - t.Errorf("%s: CommandLine(%v) = %q (%v); want %q (%v)", - tc.desc, tc.args, got, err, want, tc.err) + t.Errorf("%s: CommandLine(%v), All(%v) = %q (%v); want %q (%v)", + tc.desc, tc.args, tc.all, got, err, want, tc.err) } } } diff --git a/deps/golang.org/x/tools/godoc/corpus.go b/deps/golang.org/x/tools/godoc/corpus.go index 8e38365a9..d3f9a6e5a 100644 --- a/deps/golang.org/x/tools/godoc/corpus.go +++ b/deps/golang.org/x/tools/godoc/corpus.go @@ -108,6 +108,10 @@ type Corpus struct { // flag to check whether a corpus is initialized or not initMu sync.RWMutex initDone bool + + // pkgAPIInfo contains the information about which package API + // features were added in which version of Go. + pkgAPIInfo apiVersions } // NewCorpus returns a new Corpus from a filesystem. diff --git a/deps/golang.org/x/tools/godoc/dirtrees.go b/deps/golang.org/x/tools/godoc/dirtrees.go index 2b14a41e3..e9483a0b6 100644 --- a/deps/golang.org/x/tools/godoc/dirtrees.go +++ b/deps/golang.org/x/tools/godoc/dirtrees.go @@ -13,7 +13,11 @@ import ( "log" "os" pathpkg "path" + "runtime" + "sort" "strings" + + "golang.org/x/tools/godoc/vfs" ) // Conventional name for directories containing test data. @@ -27,6 +31,7 @@ type Directory struct { Name string // directory name HasPkg bool // true if the directory contains at least one package Synopsis string // package documentation, if any + RootType vfs.RootType // root type of the filesystem containing the directory Dirs []*Directory // subdirectories } @@ -55,7 +60,13 @@ type treeBuilder struct { // ioGate is a semaphore controlling VFS activity (ReadDir, parseFile, etc). // Send before an operation and receive after. -var ioGate = make(chan bool, 20) +var ioGate = make(chan struct{}, 20) + +// workGate controls the number of concurrent workers. Too many concurrent +// workers and performance degrades and the race detector gets overwhelmed. If +// we cannot check out a concurrent worker, work is performed by the main thread +// instead of spinning up another goroutine. +var workGate = make(chan struct{}, runtime.NumCPU()*4) func (b *treeBuilder) newDirTree(fset *token.FileSet, path, name string, depth int) *Directory { if name == testdataDirName { @@ -88,7 +99,7 @@ func (b *treeBuilder) newDirTree(fset *token.FileSet, path, name string, depth i } } - ioGate <- true + ioGate <- struct{}{} list, err := b.c.fs.ReadDir(path) <-ioGate if err != nil { @@ -101,23 +112,34 @@ func (b *treeBuilder) newDirTree(fset *token.FileSet, path, name string, depth i // determine number of subdirectories and if there are package files var dirchs []chan *Directory + var dirs []*Directory for _, d := range list { filename := pathpkg.Join(path, d.Name()) switch { case isPkgDir(d): - ch := make(chan *Directory, 1) - dirchs = append(dirchs, ch) name := d.Name() - go func() { - ch <- b.newDirTree(fset, filename, name, depth+1) - }() + select { + case workGate <- struct{}{}: + ch := make(chan *Directory, 1) + dirchs = append(dirchs, ch) + go func() { + ch <- b.newDirTree(fset, filename, name, depth+1) + <-workGate + }() + default: + // no free workers, do work synchronously + dir := b.newDirTree(fset, filename, name, depth+1) + if dir != nil { + dirs = append(dirs, dir) + } + } case !haveSummary && isPkgFile(d): // looks like a package file, but may just be a file ending in ".go"; // don't just count it yet (otherwise we may end up with hasPkgFiles even // though the directory doesn't contain any real package files - was bug) // no "optimal" package synopsis yet; continue to collect synopses - ioGate <- true + ioGate <- struct{}{} const flags = parser.ParseComments | parser.PackageClauseOnly file, err := b.c.parseFile(fset, filename, flags) <-ioGate @@ -149,13 +171,18 @@ func (b *treeBuilder) newDirTree(fset *token.FileSet, path, name string, depth i } // create subdirectory tree - var dirs []*Directory for _, ch := range dirchs { if d := <-ch; d != nil { dirs = append(dirs, d) } } + // We need to sort the dirs slice because + // it is appended again after reading from dirchs. + sort.Slice(dirs, func(i, j int) bool { + return dirs[i].Name < dirs[j].Name + }) + // if there are no package files and no subdirectories // containing package files, ignore the directory if !hasPkgFiles && len(dirs) == 0 { @@ -176,6 +203,7 @@ func (b *treeBuilder) newDirTree(fset *token.FileSet, path, name string, depth i Name: name, HasPkg: hasPkgFiles && show, // TODO(bradfitz): add proper Hide field? Synopsis: synopsis, + RootType: b.c.fs.RootType(path), Dirs: dirs, } } @@ -274,12 +302,13 @@ func (dir *Directory) lookup(path string) *Directory { // are useful for presenting an entry in an indented fashion. // type DirEntry struct { - Depth int // >= 0 - Height int // = DirList.MaxHeight - Depth, > 0 - Path string // directory path; includes Name, relative to DirList root - Name string // directory name - HasPkg bool // true if the directory contains at least one package - Synopsis string // package documentation, if any + Depth int // >= 0 + Height int // = DirList.MaxHeight - Depth, > 0 + Path string // directory path; includes Name, relative to DirList root + Name string // directory name + HasPkg bool // true if the directory contains at least one package + Synopsis string // package documentation, if any + RootType vfs.RootType // root type of the filesystem containing the direntry } type DirList struct { @@ -287,6 +316,17 @@ type DirList struct { List []DirEntry } +// hasThirdParty checks whether a list of directory entries has packages outside +// the standard library or not. +func hasThirdParty(list []DirEntry) bool { + for _, entry := range list { + if entry.RootType == vfs.RootTypeGoPath { + return true + } + } + return false +} + // listing creates a (linear) directory listing from a directory tree. // If skipRoot is set, the root directory itself is excluded from the list. // If filter is set, only the directory entries whose paths match the filter @@ -335,6 +375,7 @@ func (root *Directory) listing(skipRoot bool, filter func(string) bool) *DirList p.Name = d.Name p.HasPkg = d.HasPkg p.Synopsis = d.Synopsis + p.RootType = d.RootType list = append(list, p) } diff --git a/deps/golang.org/x/tools/godoc/dirtrees_test.go b/deps/golang.org/x/tools/godoc/dirtrees_test.go new file mode 100644 index 000000000..9727206ec --- /dev/null +++ b/deps/golang.org/x/tools/godoc/dirtrees_test.go @@ -0,0 +1,64 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package godoc + +import ( + "go/build" + "path/filepath" + "runtime" + "sort" + "testing" + + "golang.org/x/tools/godoc/vfs" + "golang.org/x/tools/godoc/vfs/gatefs" +) + +func TestNewDirTree(t *testing.T) { + fsGate := make(chan bool, 20) + rootfs := gatefs.New(vfs.OS(runtime.GOROOT()), fsGate) + fs := vfs.NameSpace{} + fs.Bind("/", rootfs, "/", vfs.BindReplace) + + c := NewCorpus(fs) + // 3 levels deep is enough for testing + dir := c.newDirectory("/", 3) + + processDir(t, dir) +} + +func processDir(t *testing.T, dir *Directory) { + var list []string + for _, d := range dir.Dirs { + list = append(list, d.Name) + // recursively process the lower level + processDir(t, d) + } + + if sort.StringsAreSorted(list) == false { + t.Errorf("list: %v is not sorted\n", list) + } +} + +func BenchmarkNewDirectory(b *testing.B) { + if testing.Short() { + b.Skip("not running tests requiring large file scan in short mode") + } + + fsGate := make(chan bool, 20) + + goroot := runtime.GOROOT() + rootfs := gatefs.New(vfs.OS(goroot), fsGate) + fs := vfs.NameSpace{} + fs.Bind("/", rootfs, "/", vfs.BindReplace) + for _, p := range filepath.SplitList(build.Default.GOPATH) { + fs.Bind("/src/golang.org", gatefs.New(vfs.OS(p), fsGate), "/src/golang.org", vfs.BindAfter) + } + b.ResetTimer() + b.ReportAllocs() + for tries := 0; tries < b.N; tries++ { + corpus := NewCorpus(fs) + corpus.newDirectory("/", -1) + } +} diff --git a/deps/golang.org/x/tools/godoc/dl/dl.go b/deps/golang.org/x/tools/godoc/dl/dl.go index 977ba983f..3f83b1f18 100644 --- a/deps/golang.org/x/tools/godoc/dl/dl.go +++ b/deps/golang.org/x/tools/godoc/dl/dl.go @@ -16,6 +16,7 @@ import ( "crypto/md5" "encoding/json" "fmt" + "html" "html/template" "io" "net/http" @@ -27,7 +28,6 @@ import ( "time" "golang.org/x/net/context" - "google.golang.org/appengine" "google.golang.org/appengine/datastore" "google.golang.org/appengine/log" @@ -41,22 +41,24 @@ const ( ) func RegisterHandlers(mux *http.ServeMux) { - mux.Handle("/dl", http.RedirectHandler("/dl/", http.StatusFound)) + mux.HandleFunc("/dl", getHandler) mux.HandleFunc("/dl/", getHandler) // also serves listHandler mux.HandleFunc("/dl/upload", uploadHandler) mux.HandleFunc("/dl/init", initHandler) } +// File represents a file on the golang.org downloads page. +// It should be kept in sync with the upload code in x/build/cmd/release. type File struct { - Filename string - OS string - Arch string - Version string - Checksum string `datastore:",noindex"` // SHA1; deprecated - ChecksumSHA256 string `datastore:",noindex"` - Size int64 `datastore:",noindex"` - Kind string // "archive", "installer", "source" - Uploaded time.Time + Filename string `json:"filename"` + OS string `json:"os"` + Arch string `json:"arch"` + Version string `json:"version"` + Checksum string `json:"-" datastore:",noindex"` // SHA1; deprecated + ChecksumSHA256 string `json:"sha256" datastore:",noindex"` + Size int64 `json:"size" datastore:",noindex"` + Kind string `json:"kind"` // "archive", "installer", "source" + Uploaded time.Time `json:"-"` } func (f File) ChecksumType() string { @@ -137,11 +139,11 @@ func (f File) URL() string { } type Release struct { - Version string - Stable bool - Files []File - Visible bool // show files on page load - SplitPortTable bool // whether files should be split by primary/other ports. + Version string `json:"version"` + Stable bool `json:"stable"` + Files []File `json:"files"` + Visible bool `json:"-"` // show files on page load + SplitPortTable bool `json:"-"` // whether files should be split by primary/other ports. } type Feature struct { @@ -159,12 +161,12 @@ type Feature struct { var featuredFiles = []Feature{ { Platform: "Microsoft Windows", - Requirements: "Windows XP SP3 or later, Intel 64-bit processor", + Requirements: "Windows 7 or later, Intel 64-bit processor", fileRE: regexp.MustCompile(`\.windows-amd64\.msi$`), }, { Platform: "Apple macOS", - Requirements: "macOS 10.8 or later, Intel 64-bit processor", + Requirements: "macOS 10.10 or later, Intel 64-bit processor", fileRE: regexp.MustCompile(`\.darwin-amd64(-osx10\.8)?\.pkg$`), }, { @@ -221,6 +223,17 @@ func listHandler(w http.ResponseWriter, r *http.Request) { log.Errorf(c, "cache set error: %v", err) } } + + if r.URL.Query().Get("mode") == "json" { + w.Header().Set("Content-Type", "application/json") + enc := json.NewEncoder(w) + enc.SetIndent("", " ") + if err := enc.Encode(d.Stable); err != nil { + log.Errorf(c, "failed rendering JSON for releases: %v", err) + } + return + } + if err := listTemplate.ExecuteTemplate(w, "root", d); err != nil { log.Errorf(c, "error executing template: %v", err) } @@ -415,21 +428,59 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) { } func getHandler(w http.ResponseWriter, r *http.Request) { + // For go get golang.org/dl/go1.x.y, we need to serve the + // same meta tags at /dl for cmd/go to validate against /dl/go1.x.y: + if r.URL.Path == "/dl" && (r.Method == "GET" || r.Method == "HEAD") && r.FormValue("go-get") == "1" { + w.Header().Set("Content-Type", "text/html; charset=utf-8") + fmt.Fprintf(w, ` + +`) + return + } + if r.URL.Path == "/dl" { + http.Redirect(w, r, "/dl/", http.StatusFound) + return + } + name := strings.TrimPrefix(r.URL.Path, "/dl/") if name == "" { listHandler(w, r) return } - if !fileRe.MatchString(name) { - http.NotFound(w, r) + if fileRe.MatchString(name) { + http.Redirect(w, r, downloadBaseURL+name, http.StatusFound) + return + } + if goGetRe.MatchString(name) { + var isGoGet bool + if r.Method == "GET" || r.Method == "HEAD" { + w.Header().Set("Content-Type", "text/html; charset=utf-8") + isGoGet = r.FormValue("go-get") == "1" + } + if !isGoGet { + w.Header().Set("Location", "https://golang.org/dl/#"+name) + w.WriteHeader(http.StatusFound) + } + fmt.Fprintf(w, ` + + + + + + + +Nothing to see here; move along. + + +`, html.EscapeString(name), html.EscapeString(name)) return } - http.Redirect(w, r, downloadBaseURL+name, http.StatusFound) + http.NotFound(w, r) } func validUser(user string) bool { switch user { - case "adg", "bradfitz", "cbro", "andybons": + case "adg", "bradfitz", "cbro", "andybons", "valsorda": return true } return false @@ -441,7 +492,10 @@ func userKey(c context.Context, user string) string { return fmt.Sprintf("%x", h.Sum(nil)) } -var fileRe = regexp.MustCompile(`^go[0-9a-z.]+\.[0-9a-z.-]+\.(tar\.gz|pkg|msi|zip)$`) +var ( + fileRe = regexp.MustCompile(`^go[0-9a-z.]+\.[0-9a-z.-]+\.(tar\.gz|pkg|msi|zip)$`) + goGetRe = regexp.MustCompile(`^go[0-9a-z.]+\.[0-9a-z.-]+$`) +) func initHandler(w http.ResponseWriter, r *http.Request) { var fileRoot struct { diff --git a/deps/golang.org/x/tools/godoc/dl/tmpl.go b/deps/golang.org/x/tools/godoc/dl/tmpl.go index c5df742a1..47ef9f49f 100644 --- a/deps/golang.org/x/tools/godoc/dl/tmpl.go +++ b/deps/golang.org/x/tools/godoc/dl/tmpl.go @@ -220,7 +220,7 @@ $(document).ready(function() {

    This is an unstable version of Go. Use with caution.

    If you already have Go installed, you can install this version by running:

    -go get golang.org/x/build/version/{{.Version}}
    +go get golang.org/dl/{{.Version}}
     

    Then, use the {{.Version}} command instead of the go command to use {{.Version}}.

    {{end}} diff --git a/deps/golang.org/x/tools/godoc/godoc.go b/deps/golang.org/x/tools/godoc/godoc.go index d6c27d0b2..0acb49bf7 100644 --- a/deps/golang.org/x/tools/godoc/godoc.go +++ b/deps/golang.org/x/tools/godoc/godoc.go @@ -10,6 +10,7 @@ package godoc // import "golang.org/x/tools/godoc" import ( + "bufio" "bytes" "fmt" "go/ast" @@ -61,6 +62,7 @@ func (p *Presentation) initFuncMap() { // various helpers "filename": filenameFunc, "repeat": strings.Repeat, + "since": p.Corpus.pkgAPIInfo.sinceVersionFunc, // access to FileInfos (directory listings) "fileInfoName": fileInfoNameFunc, @@ -106,6 +108,9 @@ func (p *Presentation) initFuncMap() { // formatting of PageInfoMode query string "modeQueryString": modeQueryString, + + // check whether to display third party section or not + "hasThirdParty": hasThirdParty, } if p.URLForSrc != nil { p.funcMap["srcLink"] = p.URLForSrc @@ -184,13 +189,13 @@ func (p *Presentation) infoSnippet_htmlFunc(info SpotInfo) string { func (p *Presentation) nodeFunc(info *PageInfo, node interface{}) string { var buf bytes.Buffer - p.writeNode(&buf, info.FSet, node) + p.writeNode(&buf, info, info.FSet, node) return buf.String() } func (p *Presentation) node_htmlFunc(info *PageInfo, node interface{}, linkify bool) string { var buf1 bytes.Buffer - p.writeNode(&buf1, info.FSet, node) + p.writeNode(&buf1, info, info.FSet, node) var buf2 bytes.Buffer if n, _ := node.(ast.Node); n != nil && linkify && p.DeclLinks { @@ -661,6 +666,7 @@ func (p *Presentation) example_htmlFunc(info *PageInfo, funcName string) string play := "" if eg.Play != nil && p.ShowPlayground { var buf bytes.Buffer + eg.Play.Comments = filterOutBuildAnnotations(eg.Play.Comments) if err := format.Node(&buf, info.FSet, eg.Play); err != nil { log.Print(err) } else { @@ -689,6 +695,23 @@ func (p *Presentation) example_htmlFunc(info *PageInfo, funcName string) string return buf.String() } +func filterOutBuildAnnotations(cg []*ast.CommentGroup) []*ast.CommentGroup { + if len(cg) == 0 { + return cg + } + + for i := range cg { + if !strings.HasPrefix(cg[i].Text(), "+build ") { + // Found the first non-build tag, return from here until the end + // of the slice. + return cg[i:] + } + } + + // There weren't any non-build tags, return an empty slice. + return []*ast.CommentGroup{} +} + // example_nameFunc takes an example function name and returns its display // name. For example, "Foo_Bar_quux" becomes "Foo.Bar (Quux)". func (p *Presentation) example_nameFunc(s string) string { @@ -887,8 +910,12 @@ func replaceLeadingIndentation(body, oldIndent, newIndent string) string { return buf.String() } -// Write an AST node to w. -func (p *Presentation) writeNode(w io.Writer, fset *token.FileSet, x interface{}) { +// writeNode writes the AST node x to w. +// +// The provided fset must be non-nil. The pageInfo is optional. If +// present, the pageInfo is used to add comments to struct fields to +// say which version of Go introduced them. +func (p *Presentation) writeNode(w io.Writer, pageInfo *PageInfo, fset *token.FileSet, x interface{}) { // convert trailing tabs into spaces using a tconv filter // to ensure a good outcome in most browsers (there may still // be tabs in comments and strings, but converting those into @@ -897,15 +924,88 @@ func (p *Presentation) writeNode(w io.Writer, fset *token.FileSet, x interface{} // TODO(gri) rethink printer flags - perhaps tconv can be eliminated // with an another printer mode (which is more efficiently // implemented in the printer than here with another layer) + + var pkgName, structName string + var apiInfo pkgAPIVersions + if gd, ok := x.(*ast.GenDecl); ok && pageInfo != nil && pageInfo.PDoc != nil && + p.Corpus != nil && + gd.Tok == token.TYPE && len(gd.Specs) != 0 { + pkgName = pageInfo.PDoc.ImportPath + if ts, ok := gd.Specs[0].(*ast.TypeSpec); ok { + if _, ok := ts.Type.(*ast.StructType); ok { + structName = ts.Name.Name + } + } + apiInfo = p.Corpus.pkgAPIInfo[pkgName] + } + + var out = w + var buf bytes.Buffer + if structName != "" { + out = &buf + } + mode := printer.TabIndent | printer.UseSpaces - err := (&printer.Config{Mode: mode, Tabwidth: p.TabWidth}).Fprint(&tconv{p: p, output: w}, fset, x) + err := (&printer.Config{Mode: mode, Tabwidth: p.TabWidth}).Fprint(&tconv{p: p, output: out}, fset, x) if err != nil { log.Print(err) } + + // Add comments to struct fields saying which Go version introducd them. + if structName != "" { + fieldSince := apiInfo.fieldSince[structName] + typeSince := apiInfo.typeSince[structName] + // Add/rewrite comments on struct fields to note which Go version added them. + var buf2 bytes.Buffer + buf2.Grow(buf.Len() + len(" // Added in Go 1.n")*10) + bs := bufio.NewScanner(&buf) + for bs.Scan() { + line := bs.Bytes() + field := firstIdent(line) + var since string + if field != "" { + since = fieldSince[field] + if since != "" && since == typeSince { + // Don't highlight field versions if they were the + // same as the struct itself. + since = "" + } + } + if since == "" { + buf2.Write(line) + } else { + if bytes.Contains(line, slashSlash) { + line = bytes.TrimRight(line, " \t.") + buf2.Write(line) + buf2.WriteString("; added in Go ") + } else { + buf2.Write(line) + buf2.WriteString(" // Go ") + } + buf2.WriteString(since) + } + buf2.WriteByte('\n') + } + w.Write(buf2.Bytes()) + } } +var slashSlash = []byte("//") + // WriteNode writes x to w. // TODO(bgarcia) Is this method needed? It's just a wrapper for p.writeNode. func (p *Presentation) WriteNode(w io.Writer, fset *token.FileSet, x interface{}) { - p.writeNode(w, fset, x) + p.writeNode(w, nil, fset, x) +} + +// firstIdent returns the first identifier in x. +// This actually parses "identifiers" that begin with numbers too, but we +// never feed it such input, so it's fine. +func firstIdent(x []byte) string { + x = bytes.TrimSpace(x) + i := bytes.IndexFunc(x, func(r rune) bool { return !unicode.IsLetter(r) && !unicode.IsNumber(r) }) + if i == -1 { + return string(x) + } + return string(x[:i]) } diff --git a/deps/golang.org/x/tools/godoc/godoc_test.go b/deps/golang.org/x/tools/godoc/godoc_test.go index c1d631c15..33dbe3f61 100644 --- a/deps/golang.org/x/tools/godoc/godoc_test.go +++ b/deps/golang.org/x/tools/godoc/godoc_test.go @@ -321,3 +321,50 @@ func TestSrcToPkgLinkFunc(t *testing.T) { } } } + +func TestFilterOutBuildAnnotations(t *testing.T) { + // TODO: simplify this by using a multiline string once we stop + // using go vet from 1.10 on the build dashboard. + // https://golang.org/issue/26627 + src := []byte("// +build !foo\n" + + "// +build !anothertag\n" + + "\n" + + "// non-tag comment\n" + + "\n" + + "package foo\n" + + "\n" + + "func bar() int {\n" + + " return 42\n" + + "}\n") + + fset := token.NewFileSet() + af, err := parser.ParseFile(fset, "foo.go", src, parser.ParseComments) + if err != nil { + t.Fatal(err) + } + + var found bool + for _, cg := range af.Comments { + if strings.HasPrefix(cg.Text(), "+build ") { + found = true + break + } + } + if !found { + t.Errorf("TestFilterOutBuildAnnotations is broken: missing build tag in test input") + } + + found = false + for _, cg := range filterOutBuildAnnotations(af.Comments) { + if strings.HasPrefix(cg.Text(), "+build ") { + t.Errorf("filterOutBuildAnnotations failed to filter build tag") + } + + if strings.Contains(cg.Text(), "non-tag comment") { + found = true + } + } + if !found { + t.Errorf("filterOutBuildAnnotations should not remove non-build tag comment") + } +} diff --git a/deps/golang.org/x/tools/godoc/index.go b/deps/golang.org/x/tools/godoc/index.go index 8cefd1423..f6de201fd 100644 --- a/deps/golang.org/x/tools/godoc/index.go +++ b/deps/golang.org/x/tools/godoc/index.go @@ -82,7 +82,7 @@ type interfaceSlice struct { // A RunList is a list of entries that can be sorted according to some // criteria. A RunList may be compressed by grouping "runs" of entries -// which are equal (according to the sort critera) into a new RunList of +// which are equal (according to the sort criteria) into a new RunList of // runs. For instance, a RunList containing pairs (x, y) may be compressed // into a RunList containing pair runs (x, {y}) where each run consists of // a list of y's with the same x. @@ -1532,7 +1532,6 @@ func (c *Corpus) RunIndexer() { } // Repeatedly update the package directory tree and index. - // TODO(bgarcia): Use fsnotify to only update when notified of a filesystem change. for { c.initFSTree() c.UpdateIndex() diff --git a/deps/golang.org/x/tools/godoc/pres.go b/deps/golang.org/x/tools/godoc/pres.go index 855117764..de23c7563 100644 --- a/deps/golang.org/x/tools/godoc/pres.go +++ b/deps/golang.org/x/tools/godoc/pres.go @@ -33,6 +33,7 @@ type Presentation struct { ImplementsHTML, MethodSetHTML, PackageHTML, + PackageRootHTML, PackageText, SearchHTML, SearchDocHTML, @@ -53,6 +54,8 @@ type Presentation struct { SrcMode bool // HTMLMode outputs HTML instead of plain text in command-line mode. HTMLMode bool + // AllMode includes unexported identifiers in the output in command-line mode. + AllMode bool // NotesRx optionally specifies a regexp to match // notes to render in the output. diff --git a/deps/golang.org/x/tools/godoc/redirect/redirect.go b/deps/golang.org/x/tools/godoc/redirect/redirect.go index f86e0ada5..3bec53378 100644 --- a/deps/golang.org/x/tools/godoc/redirect/redirect.go +++ b/deps/golang.org/x/tools/godoc/redirect/redirect.go @@ -99,7 +99,7 @@ var redirects = map[string]string{ "/issues": "https://github.com/golang/go/issues", "/issues/new": "https://github.com/golang/go/issues/new", "/play": "http://play.golang.org", - "/design": "https://github.com/golang/proposal/tree/master/design", + "/design": "https://go.googlesource.com/proposal/+/master/design", // In Go 1.2 the references page is part of /doc/. "/ref": "/doc/#references", @@ -115,7 +115,7 @@ var redirects = map[string]string{ "/tour": "http://tour.golang.org", "/wiki": "https://github.com/golang/go/wiki", - "/doc/articles/c_go_cgo.html": "/blog/c-go-cgo", + "/doc/articles/c_go_cgo.html": "/blog/c-go-cgo", "/doc/articles/concurrency_patterns.html": "/blog/go-concurrency-patterns-timing-out-and", "/doc/articles/defer_panic_recover.html": "/blog/defer-panic-and-recover", "/doc/articles/error_handling.html": "/blog/error-handling-and-go", @@ -245,6 +245,6 @@ func designHandler(w http.ResponseWriter, r *http.Request) { return } name := r.URL.Path[len(prefix):] - target := "https://github.com/golang/proposal/blob/master/design/" + name + ".md" + target := "https://go.googlesource.com/proposal/+/master/design/" + name + ".md" http.Redirect(w, r, target, http.StatusFound) } diff --git a/deps/golang.org/x/tools/godoc/redirect/redirect_test.go b/deps/golang.org/x/tools/godoc/redirect/redirect_test.go index cfc2f9790..a242f4fa7 100644 --- a/deps/golang.org/x/tools/godoc/redirect/redirect_test.go +++ b/deps/golang.org/x/tools/godoc/redirect/redirect_test.go @@ -53,10 +53,10 @@ func TestRedirects(t *testing.T) { "/wiki/foo": {302, "https://github.com/golang/go/wiki/foo"}, "/wiki/foo/": {302, "https://github.com/golang/go/wiki/foo/"}, - "/design": {301, "https://github.com/golang/proposal/tree/master/design"}, + "/design": {301, "https://go.googlesource.com/proposal/+/master/design"}, "/design/": {302, "/design"}, - "/design/123-foo": {302, "https://github.com/golang/proposal/blob/master/design/123-foo.md"}, - "/design/text/123-foo": {302, "https://github.com/golang/proposal/blob/master/design/text/123-foo.md"}, + "/design/123-foo": {302, "https://go.googlesource.com/proposal/+/master/design/123-foo.md"}, + "/design/text/123-foo": {302, "https://go.googlesource.com/proposal/+/master/design/text/123-foo.md"}, "/cl/1": {302, "https://go-review.googlesource.com/1"}, "/cl/1/": {302, "https://go-review.googlesource.com/1"}, diff --git a/deps/golang.org/x/tools/godoc/server.go b/deps/golang.org/x/tools/godoc/server.go index 95b477545..5562da316 100644 --- a/deps/golang.org/x/tools/godoc/server.go +++ b/deps/golang.org/x/tools/godoc/server.go @@ -88,6 +88,14 @@ func (h *handlerServer) GetPageInfo(abspath, relpath string, mode PageInfoMode, return ioutil.NopCloser(bytes.NewReader(data)), nil } + // Make the syscall/js package always visible by default. + // It defaults to the host's GOOS/GOARCH, and golang.org's + // linux/amd64 means the wasm syscall/js package was blank. + // And you can't run godoc on js/wasm anyway, so host defaults + // don't make sense here. + if goos == "" && goarch == "" && relpath == "syscall/js" { + goos, goarch = "js", "wasm" + } if goos != "" { ctxt.GOOS = goos } @@ -200,11 +208,12 @@ func (h *handlerServer) GetPageInfo(abspath, relpath string, mode PageInfoMode, timestamp = ts } if dir == nil { - // no directory tree present (too early after startup or - // command-line mode); compute one level for this page + // no directory tree present (happens in command-line mode); + // compute 2 levels for this page. The second level is to + // get the synopses of sub-directories. // note: cannot use path filter here because in general - // it doesn't contain the FSTree path - dir = h.c.newDirectory(abspath, 1) + // it doesn't contain the FSTree path + dir = h.c.newDirectory(abspath, 2) timestamp = time.Now() } info.Dirs = dir.listing(true, func(path string) bool { return h.includePath(path, mode) }) @@ -320,11 +329,17 @@ func (h *handlerServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { } info.GoogleCN = googleCN(r) + var body []byte + if info.Dirname == "/src" { + body = applyTemplate(h.p.PackageRootHTML, "packageRootHTML", info) + } else { + body = applyTemplate(h.p.PackageHTML, "packageHTML", info) + } h.p.ServePage(w, Page{ Title: title, Tabtitle: tabtitle, Subtitle: subtitle, - Body: applyTemplate(h.p.PackageHTML, "packageHTML", info), + Body: body, GoogleCN: info.GoogleCN, }) } diff --git a/deps/golang.org/x/tools/godoc/server_test.go b/deps/golang.org/x/tools/godoc/server_test.go new file mode 100644 index 000000000..656e5f587 --- /dev/null +++ b/deps/golang.org/x/tools/godoc/server_test.go @@ -0,0 +1,48 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package godoc + +import ( + "testing" + + "golang.org/x/tools/godoc/vfs/mapfs" +) + +// TestIgnoredGoFiles tests the scenario where a folder has no .go or .c files, +// but has an ignored go file. +func TestIgnoredGoFiles(t *testing.T) { + packagePath := "github.com/package" + packageComment := "main is documented in an ignored .go file" + + c := NewCorpus(mapfs.New(map[string]string{ + "src/" + packagePath + "/ignored.go": `// +build ignore + +// ` + packageComment + ` +package main`})) + srv := &handlerServer{ + p: &Presentation{ + Corpus: c, + }, + c: c, + } + pInfo := srv.GetPageInfo("/src/"+packagePath, packagePath, NoFiltering, "linux", "amd64") + + if pInfo.PDoc == nil { + t.Error("pInfo.PDoc = nil; want non-nil.") + } else { + if got, want := pInfo.PDoc.Doc, packageComment+"\n"; got != want { + t.Errorf("pInfo.PDoc.Doc = %q; want %q.", got, want) + } + if got, want := pInfo.PDoc.Name, "main"; got != want { + t.Errorf("pInfo.PDoc.Name = %q; want %q.", got, want) + } + if got, want := pInfo.PDoc.ImportPath, packagePath; got != want { + t.Errorf("pInfo.PDoc.ImportPath = %q; want %q.", got, want) + } + } + if pInfo.FSet == nil { + t.Error("pInfo.FSet = nil; want non-nil.") + } +} diff --git a/deps/golang.org/x/tools/godoc/snippet.go b/deps/golang.org/x/tools/godoc/snippet.go index dd9c8225c..175047860 100644 --- a/deps/golang.org/x/tools/godoc/snippet.go +++ b/deps/golang.org/x/tools/godoc/snippet.go @@ -24,7 +24,7 @@ type Snippet struct { func (p *Presentation) newSnippet(fset *token.FileSet, decl ast.Decl, id *ast.Ident) *Snippet { // TODO instead of pretty-printing the node, should use the original source instead var buf1 bytes.Buffer - p.writeNode(&buf1, fset, decl) + p.writeNode(&buf1, nil, fset, decl) // wrap text with
     tag
     	var buf2 bytes.Buffer
     	buf2.WriteString("
    ")
    diff --git a/deps/golang.org/x/tools/godoc/spec.go b/deps/golang.org/x/tools/godoc/spec.go
    index 6d6b9c23a..9ec94278d 100644
    --- a/deps/golang.org/x/tools/godoc/spec.go
    +++ b/deps/golang.org/x/tools/godoc/spec.go
    @@ -74,7 +74,7 @@ func (p *ebnfParser) parseTerm() bool {
     	case scanner.Ident:
     		p.parseIdentifier(false)
     
    -	case scanner.String:
    +	case scanner.String, scanner.RawString:
     		p.next()
     		const ellipsis = '…' // U+2026, the horizontal ellipsis character
     		if p.tok == ellipsis {
    diff --git a/deps/golang.org/x/tools/godoc/spec_test.go b/deps/golang.org/x/tools/godoc/spec_test.go
    new file mode 100644
    index 000000000..c01651687
    --- /dev/null
    +++ b/deps/golang.org/x/tools/godoc/spec_test.go
    @@ -0,0 +1,22 @@
    +// Copyright 2018 The Go Authors. All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.
    +
    +package godoc
    +
    +import (
    +	"bytes"
    +	"strings"
    +	"testing"
    +)
    +
    +func TestParseEBNFString(t *testing.T) {
    +	var p ebnfParser
    +	var buf bytes.Buffer
    +	src := []byte("octal_byte_value = `\\` octal_digit octal_digit octal_digit .")
    +	p.parse(&buf, src)
    +
    +	if strings.Contains(buf.String(), "error") {
    +		t.Error(buf.String())
    +	}
    +}
    diff --git a/deps/golang.org/x/tools/godoc/static/gen.go b/deps/golang.org/x/tools/godoc/static/gen.go
    index 42268211e..399fb84e0 100644
    --- a/deps/golang.org/x/tools/godoc/static/gen.go
    +++ b/deps/golang.org/x/tools/godoc/static/gen.go
    @@ -5,3 +5,107 @@
     package static
     
     //go:generate go run makestatic.go
    +
    +import (
    +	"bytes"
    +	"fmt"
    +	"go/format"
    +	"io/ioutil"
    +	"time"
    +	"unicode"
    +)
    +
    +var files = []string{
    +	"analysis/call3.png",
    +	"analysis/call-eg.png",
    +	"analysis/callers1.png",
    +	"analysis/callers2.png",
    +	"analysis/chan1.png",
    +	"analysis/chan2a.png",
    +	"analysis/chan2b.png",
    +	"analysis/error1.png",
    +	"analysis/help.html",
    +	"analysis/ident-def.png",
    +	"analysis/ident-field.png",
    +	"analysis/ident-func.png",
    +	"analysis/ipcg-func.png",
    +	"analysis/ipcg-pkg.png",
    +	"analysis/typeinfo-pkg.png",
    +	"analysis/typeinfo-src.png",
    +	"callgraph.html",
    +	"codewalk.html",
    +	"codewalkdir.html",
    +	"dirlist.html",
    +	"error.html",
    +	"example.html",
    +	"godoc.html",
    +	"godocs.js",
    +	"images/minus.gif",
    +	"images/plus.gif",
    +	"images/treeview-black-line.gif",
    +	"images/treeview-black.gif",
    +	"images/treeview-default-line.gif",
    +	"images/treeview-default.gif",
    +	"images/treeview-gray-line.gif",
    +	"images/treeview-gray.gif",
    +	"implements.html",
    +	"jquery.js",
    +	"jquery.treeview.css",
    +	"jquery.treeview.edit.js",
    +	"jquery.treeview.js",
    +	"methodset.html",
    +	"opensearch.xml",
    +	"package.html",
    +	"packageroot.html",
    +	"package.txt",
    +	"play.js",
    +	"playground.js",
    +	"search.html",
    +	"search.txt",
    +	"searchcode.html",
    +	"searchdoc.html",
    +	"searchtxt.html",
    +	"style.css",
    +}
    +
    +// Generate reads a set of files and returns a file buffer that declares
    +// a map of string constants containing contents of the input files.
    +func Generate() ([]byte, error) {
    +	buf := new(bytes.Buffer)
    +	fmt.Fprintf(buf, "%v\n\n%v\n\npackage static\n\n", license, warning)
    +	fmt.Fprintf(buf, "var Files = map[string]string{\n")
    +	for _, fn := range files {
    +		b, err := ioutil.ReadFile(fn)
    +		if err != nil {
    +			return b, err
    +		}
    +		fmt.Fprintf(buf, "\t%q: ", fn)
    +		appendQuote(buf, b)
    +		fmt.Fprintf(buf, ",\n\n")
    +	}
    +	fmt.Fprintln(buf, "}")
    +	return format.Source(buf.Bytes())
    +}
    +
    +// appendQuote is like strconv.AppendQuote, but we avoid the latter
    +// because it changes when Unicode evolves, breaking gen_test.go.
    +func appendQuote(out *bytes.Buffer, data []byte) {
    +	out.WriteByte('"')
    +	for _, b := range data {
    +		if b == '\\' || b == '"' {
    +			out.WriteByte('\\')
    +			out.WriteByte(b)
    +		} else if b <= unicode.MaxASCII && unicode.IsPrint(rune(b)) && !unicode.IsSpace(rune(b)) {
    +			out.WriteByte(b)
    +		} else {
    +			fmt.Fprintf(out, "\\x%02x", b)
    +		}
    +	}
    +	out.WriteByte('"')
    +}
    +
    +const warning = `// Code generated by "makestatic"; DO NOT EDIT.`
    +
    +var license = fmt.Sprintf(`// Copyright %d The Go Authors. All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.`, time.Now().UTC().Year())
    diff --git a/deps/golang.org/x/tools/godoc/static/gen_test.go b/deps/golang.org/x/tools/godoc/static/gen_test.go
    new file mode 100644
    index 000000000..7f14d1307
    --- /dev/null
    +++ b/deps/golang.org/x/tools/godoc/static/gen_test.go
    @@ -0,0 +1,49 @@
    +// Copyright 2018 The Go Authors. All rights reserved.
    +// Use of this source code is governed by a BSD-style
    +// license that can be found in the LICENSE file.
    +
    +package static
    +
    +import (
    +	"bytes"
    +	"io/ioutil"
    +	"strconv"
    +	"testing"
    +	"unicode"
    +)
    +
    +func TestStaticIsUpToDate(t *testing.T) {
    +	oldBuf, err := ioutil.ReadFile("static.go")
    +	if err != nil {
    +		t.Errorf("error while reading static.go: %v\n", err)
    +	}
    +
    +	newBuf, err := Generate()
    +	if err != nil {
    +		t.Errorf("error while generating static.go: %v\n", err)
    +	}
    +
    +	if bytes.Compare(oldBuf, newBuf) != 0 {
    +		t.Error(`static.go is stale.  Run:
    +  $ go generate golang.org/x/tools/godoc/static
    +  $ git diff
    +to see the differences.`)
    +
    +	}
    +}
    +
    +// TestAppendQuote ensures that AppendQuote produces a valid literal.
    +func TestAppendQuote(t *testing.T) {
    +	var in, out bytes.Buffer
    +	for r := rune(0); r < unicode.MaxRune; r++ {
    +		in.WriteRune(r)
    +	}
    +	appendQuote(&out, in.Bytes())
    +	in2, err := strconv.Unquote(out.String())
    +	if err != nil {
    +		t.Fatalf("AppendQuote produced invalid string literal: %v", err)
    +	}
    +	if got, want := in2, in.String(); got != want {
    +		t.Fatal("AppendQuote modified string") // no point printing got/want: huge
    +	}
    +}
    diff --git a/deps/golang.org/x/tools/godoc/static/godoc.html b/deps/golang.org/x/tools/godoc/static/godoc.html
    index fb26901c8..6c7889f05 100644
    --- a/deps/golang.org/x/tools/godoc/static/godoc.html
    +++ b/deps/golang.org/x/tools/godoc/static/godoc.html
    @@ -14,7 +14,16 @@
     
     {{end}}
     
    -
    +
    +
    +
    +
    +
    +{{if .Playground}}
    +
    +{{end}}
    +{{with .Version}}{{end}}
    +
     
     
     
    @@ -103,18 +112,6 @@ 

    - - - - - - -{{if .Playground}} - -{{end}} -{{with .Version}}{{end}} - - diff --git a/deps/golang.org/x/tools/godoc/static/godocs.js b/deps/golang.org/x/tools/godoc/static/godocs.js index e39ea740a..f0ab9d2b5 100644 --- a/deps/golang.org/x/tools/godoc/static/godocs.js +++ b/deps/golang.org/x/tools/godoc/static/godocs.js @@ -253,13 +253,13 @@ function personalizeInstallInstructions() { var filename = s.substr(prefix.length); var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/; - $('.downloadFilename').text(filename); - $('.hideFromDownload').hide(); var m = filenameRE.exec(filename); if (!m) { // Can't interpret file name; bail. return; } + $('.downloadFilename').text(filename); + $('.hideFromDownload').hide(); var os = m[3]; var ext = m[6]; @@ -329,6 +329,28 @@ function addPermalinks() { }); } +$(".js-expandAll").click(function() { + if ($(this).hasClass("collapsed")) { + toggleExamples('toggle'); + $(this).text("(Collapse All)"); + } else { + toggleExamples('toggleVisible'); + $(this).text("(Expand All)"); + } + $(this).toggleClass("collapsed") +}); + +function toggleExamples(className) { + // We need to explicitly iterate through divs starting with "example_" + // to avoid toggling Overview and Index collapsibles. + $("[id^='example_']").each(function() { + // Check for state and click it only if required. + if ($(this).hasClass(className)) { + $(this).find('.toggleButton').first().click(); + } + }); +} + $(document).ready(function() { generateTOC(); addPermalinks(); diff --git a/deps/golang.org/x/tools/godoc/static/makestatic.go b/deps/golang.org/x/tools/godoc/static/makestatic.go index 8ee8e5565..0f910f0c4 100644 --- a/deps/golang.org/x/tools/godoc/static/makestatic.go +++ b/deps/golang.org/x/tools/godoc/static/makestatic.go @@ -4,72 +4,17 @@ // +build ignore -// Command makestatic reads a set of files and writes a Go source file to "static.go" -// that declares a map of string constants containing contents of the input files. +// Command makestatic writes the generated file buffer to "static.go". // It is intended to be invoked via "go generate" (directive in "gen.go"). package main import ( - "bytes" "fmt" - "go/format" "io/ioutil" "os" - "time" - "unicode/utf8" -) -var files = []string{ - "analysis/call3.png", - "analysis/call-eg.png", - "analysis/callers1.png", - "analysis/callers2.png", - "analysis/chan1.png", - "analysis/chan2a.png", - "analysis/chan2b.png", - "analysis/error1.png", - "analysis/help.html", - "analysis/ident-def.png", - "analysis/ident-field.png", - "analysis/ident-func.png", - "analysis/ipcg-func.png", - "analysis/ipcg-pkg.png", - "analysis/typeinfo-pkg.png", - "analysis/typeinfo-src.png", - "callgraph.html", - "codewalk.html", - "codewalkdir.html", - "dirlist.html", - "error.html", - "example.html", - "godoc.html", - "godocs.js", - "images/minus.gif", - "images/plus.gif", - "images/treeview-black-line.gif", - "images/treeview-black.gif", - "images/treeview-default-line.gif", - "images/treeview-default.gif", - "images/treeview-gray-line.gif", - "images/treeview-gray.gif", - "implements.html", - "jquery.js", - "jquery.treeview.css", - "jquery.treeview.edit.js", - "jquery.treeview.js", - "methodset.html", - "opensearch.xml", - "package.html", - "package.txt", - "play.js", - "playground.js", - "search.html", - "search.txt", - "searchcode.html", - "searchdoc.html", - "searchtxt.html", - "style.css", -} + "golang.org/x/tools/godoc/static" +) func main() { if err := makestatic(); err != nil { @@ -79,49 +24,13 @@ func main() { } func makestatic() error { - f, err := os.Create("static.go") + buf, err := static.Generate() if err != nil { - return err + return fmt.Errorf("error while generating static.go: %v\n", err) } - defer f.Close() - buf := new(bytes.Buffer) - fmt.Fprintf(buf, "%v\n\n%v\n\npackage static\n\n", license, warning) - fmt.Fprintf(buf, "var Files = map[string]string{\n") - for _, fn := range files { - b, err := ioutil.ReadFile(fn) - if err != nil { - return err - } - fmt.Fprintf(buf, "\t%q: ", fn) - if utf8.Valid(b) { - fmt.Fprintf(buf, "`%s`", sanitize(b)) - } else { - fmt.Fprintf(buf, "%q", b) - } - fmt.Fprintln(buf, ",\n") - } - fmt.Fprintln(buf, "}") - fmtbuf, err := format.Source(buf.Bytes()) + err = ioutil.WriteFile("static.go", buf, 0666) if err != nil { - return err + return fmt.Errorf("error while writing static.go: %v\n", err) } - return ioutil.WriteFile("static.go", fmtbuf, 0666) -} - -// sanitize prepares a valid UTF-8 string as a raw string constant. -func sanitize(b []byte) []byte { - // Replace ` with `+"`"+` - b = bytes.Replace(b, []byte("`"), []byte("`+\"`\"+`"), -1) - - // Replace BOM with `+"\xEF\xBB\xBF"+` - // (A BOM is valid UTF-8 but not permitted in Go source files. - // I wouldn't bother handling this, but for some insane reason - // jquery.js has a BOM somewhere in the middle.) - return bytes.Replace(b, []byte("\xEF\xBB\xBF"), []byte("`+\"\\xEF\\xBB\\xBF\"+`"), -1) + return nil } - -const warning = `// Code generated by "makestatic"; DO NOT EDIT.` - -var license = fmt.Sprintf(`// Copyright %d The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file.`, time.Now().UTC().Year()) diff --git a/deps/golang.org/x/tools/godoc/static/package.html b/deps/golang.org/x/tools/godoc/static/package.html index 9c81890af..a091e2e1f 100644 --- a/deps/golang.org/x/tools/godoc/static/package.html +++ b/deps/golang.org/x/tools/godoc/static/package.html @@ -90,6 +90,7 @@

    Index ▾

    {{if $.Examples}}

    Examples

    +
    {{range $.Examples}}
    {{example_name .Name}}
    @@ -167,6 +168,8 @@

    Variables

    {{$name_html := html .Name}}

    func {{$name_html}} + {{$since := since "func" "" .Name $.PDoc.ImportPath}} + {{if $since}}{{$since}}{{end}}

    {{node_html $ .Decl true}}
    {{comment_html .Doc}} @@ -179,6 +182,8 @@

    func {{$name_html}}type {{$tname_html}} + {{$since := since "type" "" .Name $.PDoc.ImportPath}} + {{if $since}}{{$since}}{{end}}

    {{comment_html .Doc}}
    {{node_html $ .Decl true}}
    @@ -201,6 +206,8 @@

    type {{$tname_html}}< {{$name_html := html .Name}}

    func {{$name_html}} + {{$since := since "func" "" .Name $.PDoc.ImportPath}} + {{if $since}}{{$since}}{{end}}

    {{node_html $ .Decl true}}
    {{comment_html .Doc}} @@ -212,6 +219,8 @@

    func {{$name_html}}func ({{html .Recv}}) {{$name_html}} + {{$since := since "method" .Recv .Name $.PDoc.ImportPath}} + {{if $since}}{{$since}}{{end}}

    {{node_html $ .Decl true}}
    {{comment_html .Doc}} @@ -245,20 +254,6 @@

    {{noteTitle $marker | html}}s

    {{if $.PDoc}}

    Subdirectories

    {{end}} - {{if eq $.Dirname "/src"}} - -

    Standard library

    - - {{end}} - -
    @@ -266,72 +261,30 @@

    Standard library

    - {{if not (or (eq $.Dirname "/src") (eq $.Dirname "/src/cmd") $.DirFlat)}} + {{if not ((eq $.Dirname "/src/cmd") $.DirFlat)}} {{end}} {{range .List}} + {{if $.DirFlat}} {{if .HasPkg}} - - - - + {{end}} {{else}} - - - - + {{end}} + + {{end}}
    Synopsis
    ..
    - {{html .Path}} - - {{html .Synopsis}} -
    + {{html .Path}} +
    - {{html .Name}} - - {{html .Synopsis}} -
    + {{html .Name}} + + {{html .Synopsis}} +
    - - - {{if eq $.Dirname "/src"}} -

    Other packages

    - -

    Sub-repositories

    -

    - These packages are part of the Go Project but outside the main Go tree. - They are developed under looser compatibility requirements than the Go core. - Install them with "go get". -

    -
      -
    • benchmarks — benchmarks to measure Go as it is developed.
    • -
    • blogblog.golang.org's implementation.
    • -
    • buildbuild.golang.org's implementation.
    • -
    • crypto — additional cryptography packages.
    • -
    • debug — an experimental debugger for Go.
    • -
    • image — additional imaging packages.
    • -
    • mobile — experimental support for Go on mobile platforms.
    • -
    • net — additional networking packages.
    • -
    • sys — packages for making system calls.
    • -
    • text — packages for working with text.
    • -
    • tools — godoc, goimports, gorename, and other tools.
    • -
    • tourtour.golang.org's implementation.
    • -
    • exp — experimental and deprecated packages (handle with care; may change without warning).
    • -
    - -

    Community

    -

    - These services can help you find Open Source packages provided by the community. -

    - - {{end}} {{end}} diff --git a/deps/golang.org/x/tools/godoc/static/packageroot.html b/deps/golang.org/x/tools/godoc/static/packageroot.html new file mode 100644 index 000000000..e8b2feee7 --- /dev/null +++ b/deps/golang.org/x/tools/godoc/static/packageroot.html @@ -0,0 +1,150 @@ + + +{{with .PAst}} + {{range $filename, $ast := .}} + {{$filename|filename|html}}:
    {{node_html $ $ast false}}
    + {{end}} +{{end}} + +{{with .Dirs}} + {{/* DirList entries are numbers and strings - no need for FSet */}} + {{if $.PDoc}} +

    Subdirectories

    + {{end}} +
    +
    +
    Standard library
    + {{if hasThirdParty .List }} +
    Third party
    + {{end}} +
    Other packages
    +
    Sub-repositories
    +
    Community
    +
    +
    + +
    + +
    +

    Standard library ▾

    + +
    + + + + + + + {{range .List}} + + {{if eq .RootType "GOROOT"}} + {{if $.DirFlat}} + {{if .HasPkg}} + + {{end}} + {{else}} + + {{end}} + + {{end}} + + {{end}} +
    NameSynopsis
    + {{html .Path}} + + {{html .Name}} + + {{html .Synopsis}} +
    +
    +
    +
    + + {{if hasThirdParty .List }} +
    + +
    +

    Third party ▾

    +
    + + + + + + + {{range .List}} + + {{if eq .RootType "GOPATH"}} + {{if $.DirFlat}} + {{if .HasPkg}} + + {{end}} + {{else}} + + {{end}} + + {{end}} + + {{end}} +
    NameSynopsis
    + {{html .Path}} + + {{html .Name}} + + {{html .Synopsis}} +
    +
    +
    +
    + {{end}} + +

    Other packages

    +

    Sub-repositories

    +

    + These packages are part of the Go Project but outside the main Go tree. + They are developed under looser compatibility requirements than the Go core. + Install them with "go get". +

    +
      +
    • benchmarks — benchmarks to measure Go as it is developed.
    • +
    • blogblog.golang.org's implementation.
    • +
    • buildbuild.golang.org's implementation.
    • +
    • crypto — additional cryptography packages.
    • +
    • debug — an experimental debugger for Go.
    • +
    • image — additional imaging packages.
    • +
    • mobile — experimental support for Go on mobile platforms.
    • +
    • net — additional networking packages.
    • +
    • perf — packages and tools for performance measurement, storage, and analysis.
    • +
    • review — a tool for working with Gerrit code reviews.
    • +
    • sync — additional concurrency primitives.
    • +
    • sys — packages for making system calls.
    • +
    • text — packages for working with text.
    • +
    • time — additional time packages.
    • +
    • tools — godoc, goimports, gorename, and other tools.
    • +
    • tourtour.golang.org's implementation.
    • +
    • exp — experimental and deprecated packages (handle with care; may change without warning).
    • +
    + +

    Community

    +

    + These services can help you find Open Source packages provided by the community. +

    + +{{end}} diff --git a/deps/golang.org/x/tools/godoc/static/playground.js b/deps/golang.org/x/tools/godoc/static/playground.js index 51b00a439..1b7be65ac 100644 --- a/deps/golang.org/x/tools/godoc/static/playground.js +++ b/deps/golang.org/x/tools/godoc/static/playground.js @@ -40,11 +40,12 @@ here's a skeleton implementation of a playground transport. } */ -function HTTPTransport() { +// HTTPTransport is the default transport. +// enableVet enables running vet if a program was compiled and ran successfully. +// If vet returned any errors, display them before the output of a program. +function HTTPTransport(enableVet) { 'use strict'; - // TODO(adg): support stderr - function playback(output, events) { var timeout; output({Kind: 'start'}); @@ -55,12 +56,12 @@ function HTTPTransport() { } var e = events.shift(); if (e.Delay === 0) { - output({Kind: 'stdout', Body: e.Message}); + output({Kind: e.Kind, Body: e.Message}); next(); return; } timeout = setTimeout(function() { - output({Kind: 'stdout', Body: e.Message}); + output({Kind: e.Kind, Body: e.Message}); next(); }, e.Delay / 1000000); } @@ -69,7 +70,7 @@ function HTTPTransport() { Stop: function() { clearTimeout(timeout); } - } + }; } function error(output, msg) { @@ -96,7 +97,31 @@ function HTTPTransport() { error(output, data.Errors); return; } - playing = playback(output, data.Events); + + if (!enableVet) { + playing = playback(output, data.Events); + return; + } + + $.ajax("/vet", { + data: {"body": body}, + type: "POST", + dataType: "json", + success: function(dataVet) { + if (dataVet.Errors) { + if (!data.Events) { + data.Events = []; + } + // inject errors from the vet as the first events in the output + data.Events.unshift({Message: 'Go vet exited.\n\n', Kind: 'system', Delay: 0}); + data.Events.unshift({Message: dataVet.Errors, Kind: 'stderr', Delay: 0}); + } + playing = playback(output, data.Events); + }, + error: function() { + playing = playback(output, data.Events); + } + }); }, error: function() { error(output, 'Error communicating with remote server.'); @@ -118,11 +143,16 @@ function SocketTransport() { var id = 0; var outputs = {}; var started = {}; - var websocket = new WebSocket('ws://' + window.location.host + '/socket'); + var websocket; + if (window.location.protocol == "http:") { + websocket = new WebSocket('ws://' + window.location.host + '/socket'); + } else if (window.location.protocol == "https:") { + websocket = new WebSocket('wss://' + window.location.host + '/socket'); + } websocket.onclose = function() { console.log('websocket connection closed'); - } + }; websocket.onmessage = function(e) { var m = JSON.parse(e.data); @@ -134,7 +164,7 @@ function SocketTransport() { started[m.Id] = true; } output({Kind: m.Kind, Body: m.Body}); - } + }; function send(m) { websocket.send(JSON.stringify(m)); @@ -202,7 +232,7 @@ function PlaygroundOutput(el) { if (needScroll) el.scrollTop = el.scrollHeight - el.offsetHeight; - } + }; } (function() { @@ -218,7 +248,7 @@ function PlaygroundOutput(el) { return function(write) { if (write.Body) lineHighlight(write.Body); wrappedOutput(write); - } + }; } function lineClear() { $(".lineerror").removeClass("lineerror"); @@ -237,9 +267,10 @@ function PlaygroundOutput(el) { // enableHistory - enable using HTML5 history API (optional) // transport - playground transport to use (default is HTTPTransport) // enableShortcuts - whether to enable shortcuts (Ctrl+S/Cmd+S to save) (default is false) + // enableVet - enable running vet and displaying its errors function playground(opts) { var code = $(opts.codeEl); - var transport = opts['transport'] || new HTTPTransport(); + var transport = opts['transport'] || new HTTPTransport(opts['enableVet']); var running; // autoindent helpers. diff --git a/deps/golang.org/x/tools/godoc/static/static.go b/deps/golang.org/x/tools/godoc/static/static.go index 14739d806..33f59931c 100644 --- a/deps/golang.org/x/tools/godoc/static/static.go +++ b/deps/golang.org/x/tools/godoc/static/static.go @@ -7,3711 +7,103 @@ package static var Files = map[string]string{ - "analysis/call3.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03N\x00\x00\x01\xea\b\x03\x00\x00\x00\x04l\xeeb\x00\x00\x00\x01sRGB\x00\xae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\xd5aVEa\xbb\xab \xae\xbe\x94\x05\x9d\x80DE\xba<\x900x\xa2-\xf0\x05\x8d\xb6\x13z\xbbj]\xaa\xc9\x0e\\\x93\xf2\xb082Z\x16\xbfkVE\xa6/=\xben(\x87N\xc0\neMb\xa6\xd1]\xe9\nݩKGt\x1d\xbc\xb3c\xa8\xe4\af\x95\xe2\x15\xe8\x04\xa2g\x80d\x14\xa7k\xc6\x19l\xe6\xba\xf0\xf5\u007f\xf6F\xf1Q@|\x02\x9d\x80\x05ʦf\x8e\xf6\x17=\u007f\xe0)y٬N\xdc\x02\x9d\x00\xb0\r\xe8\x04\x80m@'\x00l\x03:\x01`\x1b\xd0\t\x00ۀN\x00\xd8\x06t\x02\x8e\x131\xb0y\\\xa79C'\xe04Jn\xb3\xfe\x1f\xc7w\x9a3t\x02#!\x90\xc5l\x85@n\xb3>\\\x9as\xdce&\x9b\xe2\xb4N\xa7\xaa\x94\xbb\x94\xbb\xf7\xd4\xec\xef\x0e\x9b\x04\xd1\x10s\x06\xb1\xedHY\xccV\x17\x87\xfbJ\x15G\x87\xf7H`2\xf8E\xabx\xcbL6\xc5a\x9d\xfa\xaa\x0f\xc9\xdf1\xeb\xaen\xeej\xae\xee\xd6L\x82\xa8\x88=\x83\xd8f\xe4,f\xabq\xcf\xfa:\x1d\xf1\x04\x9d\f\xea\x14o\x99ɦ8\xacS}c\xb7\xa4\xd3\r)i\xe5P\xed\r\xd5$\x88\x96\x983\x88m%\x98\xc5l-\x9fV_'q(8\x15\xd2)\xce2\x93MqV\xa7S5\x03\xb2Ng\xaa\xd9M\xfc\x03\xd5gT\x93 Zb\xce \xb6\x95`\x16\xb3-:\x85\xe0t\x8a\xaf\xccdS\x1cթ\xbf\xbaK\x94uj\x94\xbf\b]ߤ\x9a\x04\x11\xf8g\xc1}`c\x91\xe7\x89\xd7ٓ\xd83\x88et\xb3\x98\x19]\vS]i\xf3\xa4\xc2\r\x19I\x19\x1bD\xf6\x834Sօ\x87*\x8b|\x16\x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94\xbb\xf7\xd4\xec\xef\x0e\x9b\x04\xd1\x10s\x06\xb1\xedHY\xccV\x17\x87\xfbJ\x15G\x87\xf7H`2\xf8E\xabx\xcbL6\xc5a\x9d\xfa\xaa\x0f\xc9\xdf1\xeb\xaen\xeej\xae\xee\xd6L\x82\xa8\x88=\x83\xd8f\xe4,f\xabq\xcf\xfa:\x1d\xf1\x04\x9d\x0c\xea\x14o\x99\xc9\xa68\xacS}c\xb7\xa4\xd3\x0d)i\xe5P\xed\x0d\xd5$\x88\x96\x983\x88m%\x98\xc5l-\x9fV_'q(8\x15\xd2)\xce2\x93MqV\xa7S5\x03\xb2Ng\xaa\xd9M\xfc\x03\xd5gT\x93\x20Zb\xce\x20\xb6\x95`\x16\xb3-:\x85\xe0t\x8a\xaf\xccdS\x1c\xd5\xa9\xbf\xbaK\x94uj\x94\xbf\x08]\xdf\xa4\x9a\x04\x11\xf8g\xc1}`c\x91\xe7\x89\xd7\xd9\x93\xd83\x88et\xb3\x98\x19]\x0bS]i\xf3\xa4\xc2\x0d\x19I\x19\x1bD\xf6\x834S\xd6\x85\x87*\x8b|\x16\xb3^\xdc\xb3\x0a\xd52p:\xd5\xa4\xc9)q\xd7<\x02w\x01\xc6\xe9\x14_\x99\xc9\xa68\xaaS}\xa3\xa8\xe8\xb4K\x8e&8\xb4G5\x09\"p\xb1\xc5-xw\xee\xcd\x96\xf2Sc\xcf\x20\x96\xd1\xcfb\x16\xc5\xa6\xa9\x19\x15\x8de\xa4\x82N\x16\xb8V\xd5\xafr\xe5\xd2\xd3\x87\xda)d\xda\x9a\xb2i\xeaPe\x91\xcfb\xd6\x8b{\xe6Q/\x03\xa7\xd3B\xa2\xe4\x10\x9d\xeb\xec\x9c\x1f<\xc4\xf1:\xc5Uf\xb2)\x9fy\x1c\x00`\x13#8:\x01\x00\xd4@'\x00l\x03:\x01`\x1b\xd0\x09\x00\xdb\x80N\x00\xd8\x06t\x02\xc06\xa0\x13\x00\xb6\x01\x9d\x00\xb0\x0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)8i\x9eQ\xcec-w\x1c\xc9\xe5Q4Cry\\aQ'\xeb\x19\xe5<\xd6r\xc7\x91\\\x1eE3$\x97\xc7\x15\xd1\xeb\x14cF9\x8f\xa5\xdcq$\x97\xfb\xa3h\x86\xe4\xf2\xb8\"\x9a\x91\xbd\x11e\x94\x07\xb1\x9a;\x8e\xe4r\xbfy3$\x97\xc7\x17\x91?w\xb2!\xa3<\x88\xc5\xdcq$\x97#\xb9|\xfcav\xb2g\x8dX2\xca\xf5Ar\xf9\x88@6\xec\xd8`\xafN1d\x94\xeb\x83\xe4\xf2\x91\x01\x9d\xc6\x06\x9bu\x9aH\x20\xb9\x1ch\x81N1\x83\xe4r\xa0\x05:\xc5\x0e\x92\xcb\x81\x06\xe8\x04\x80m@'\x00l\x03:\x01`\x1b\xd0\x09\x00\xdb\x80N\x00\xd8\x06t\x02\xc06\xa0\x13\x00\xb6\x01\x9d\x00\xb0\x0d\xe8\x04\x80m\xd8\xad\x132\xca\xc1\x04\xc6T'd\x94\xcb\x8c\xbc\x87hAF\xf9\xf8\xc5T'd\x94\xcbX\xe8\x81\x03\x19\xe5\x13\x0b3\x9d\x90Q\x1e\x20\xfa\x1e8\x90Q>\xb10\xd3\x09\x19\xe5#\xc2\xb43d\x94'\x14\x91\xb3\"\x90Q\x8e\x8cr`\x81h\x92\x8c\x90Q\x8e\x8cr\x10\x15\xd1\x9f\xec!\xa3\\\xdb\x032\xca\x81\x86\xd8t\xda\x14\x98DF92\xcaA\x88\xd8t\x0aN\"\xa3\x1c\x19\xe5\x20\x84E\x9d\x90Q\x8e\x8cr`L\xf4:!\xa3\\\xdb\x032\xca\x81\x86hF\xf6\x90Q\x8e\x8cr\x10\x15\x91?wBF92\xca\x81\x05\xccN\xf6\xac\x81\x8c\xf28\x01)\xb0c\x83\xbd:!\xa3\x1c\x19\xe5\x13\x1a\x9bu\x9aH\x20\xa3\x1ch\x81N1\x83\x8cr\xa0\x05:\xc5\x0e2\xca\x81\x06\xe8\x04\x80m@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a\xb1\x83\xe4\x9c\xe1\xaei\f\xe0\xb0\x1e-\xe5\x04\xf2\xf1ZGCe\x8d\xf1\x99\x8bY\xb4\xa3\xb7\xa3%\xcf\xe7B~\x1fpX\x8f\xef\xc6\x1cI\x1a\xef\xc2\xff\r\x03Ć\x1e\x1d\xadp\xe8p\x87\x98\xd0\x03p\v\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\a\xc0\x01\xf4\x008\x80\x1e\x00\a\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x83\xf3z\u0605(\xa9\xa9\x80\x97p\\\x0f\xbb\x10%5\x15\xf0\x14N\xeba\x17\xa2\xa4\xa6\x02\xde\xc2a=lC\x94\xd4T\xc0[8\xac\x87m\x88\x92\x9a\nx\v\x87\xf5P\xecB\x94\xd4T\xc0[\xb8\xa6\x87%9\tzx\x12\xd7\xf4\xb0$'A\x0fO\xe2\x9a\x1e\x96\xe4$\xe8\xe1I\\\xd3Ò\x9c\x04=<\x89kzX\x92\x93\xa0\x87'qX\x0f\xfb\x10%5\x15\xf0\x14\x0e\xeba\x1f\xa2\xa4\xa7\x02^\xc2a=\x80\xd8\x02\xf4\x008\x80\x1e\x00\a\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\a\xc0\x01\xf4\x008\x80\x1e\x00\a\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\xc3\xf7\xee\a\x80\x88\x8c\xe8\xe8\x01\xc4;\xa0\a\xc0\x01\xf4\x008\x80\x1e\x00\a\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\a\xc0\x01\xf4\x008\x80\x1e\x00\a\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\a\xc0\x01\xf4\x008\x80\x1e\x00\a\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\x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ҙ\xa7\xf1\x0en\x81Z\xe3\x18B\xacGy\xa2\xaeZ\xbb\x98y\x04/\xfd\x8c^[=\x86\x12\xb7\xe5\xeb\x11i\x8dc\x05\xb1\x1e\xf1\x90\xb1-\xc0\x0f\x99UCx\x0fS\x8fय़\xd1k\xab\xc7P\xe2\xb6|=\"\xadq\xac \xd6#\x1e2\xb6\x05\xf2\xfc\xfa\xd3\xc7K\xb3\xf1Z\x84\x1f\xc1K5F=\x8d\x97~0\xaf0nK-\xcd\xdc\x0e\xf6-\xb0k\x1c+\b\xf5\x88\x8b\x8cm\xd1\xe1ڥ9\xf9\x1b\xb4ԍ\xf1\b^\xea)\xb4\xd4\xd3x\xe9\a\xf3\n\xe3\xb6\xd4\xd2\xcc\xed`\xdf\x02\xbbƱ\x82P\x8f\x98\x00RrQ\"Jz\xc4s\xc6\xd6\xe1us\x95(\xe9\x11\xcf\x19[\x87\xd7\xcdU\xa2\xa4Gu4\x87\xeap\xc66\x91\x18\xba\x1ej}N\xa9\xf5s\x11o\x00\x19ۨ1\f=\x80\xc4\x03\xf4\x008\x80\x1e\x00\a\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\xc3\xff\a'\xa7c\x12\x8d\x96\rF\x00\x00\x00\x00IEND\xaeB`\x82", + "analysis/call-eg.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x02\x1e\x00\x00\x01\xc8\x08\x03\x00\x00\x006\x92\x13\xd7\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x05\x07\x03\x0a\x0d\x09\x0d\x12\x14\x0e\x12\x1d\x11\x13\x10\x1b\x1a\x14\x20\x20\x19\x15\"6\x1f#%!#\x20$%#&(&+)\x1e++$*,*0.\"-/,\x1c0Z120463/6B;8-8:7<>;C@4#Cx@B?AFHDFDKHZx\xb8vxu]{\xbb_}\xbez|y\x84|dX\x80\xbfL\x91K`\x81\xbbb\x80\xc0}\x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\xe0\xb0\x1e-\xe5\x04\xf2\xf1ZGCe\x8d\xf1\x99\x8bY\xb4\xa3\xb7\xa3%\xcf\xe7B~\x1fpX\x8f\xef\xc6\x1cI\x1a\xef\xc2\xff\x0d\x03\xc4\x86\x1e\x1d\xadp\xe8p\x87\x98\xd0\x03p\x0b\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\x07\xc0\x01\xf4\x008\x80\x1e\x00\x07\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x83\xf3z\xd8\x85(\xa9\xa9\x80\x97p\\\x0f\xbb\x10%5\x15\xf0\x14N\xeba\x17\xa2\xa4\xa6\x02\xde\xc2a=lC\x94\xd4T\xc0[8\xac\x87m\x88\x92\x9a\x0ax\x0b\x87\xf5P\xecB\x94\xd4T\xc0[\xb8\xa6\x87%9\x09zx\x12\xd7\xf4\xb0$'A\x0fO\xe2\x9a\x1e\x96\xe4$\xe8\xe1I\\\xd3\xc3\x92\x9c\x04=<\x89kzX\x92\x93\xa0\x87'qX\x0f\xfb\x10%5\x15\xf0\x14\x0e\xeba\x1f\xa2\xa4\xa7\x02^\xc2a=\x80\xd8\x02\xf4\x008\x80\x1e\x00\x07\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\x07\xc0\x01\xf4\x008\x80\x1e\x00\x07\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\xc3\xf7\xee\x07\x80\x88\x8c\xe8\xe8\x01\xc4;\xa0\x07\xc0\x01\xf4\x008\x80\x1e\x00\x07\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\x07\xc0\x01\xf4\x008\x80\x1e\x00\x07\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\x03\xe8\x01p\x00=\x00\x0e\xa0\x07\xc0\x01\xf4\x008\x80\x1e\x00\x07\xd0\x03\xe0\x00z\x00\x1c@\x0f\x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\x0en\x81Z\xe3\x18B\xacGy\xa2\xaeZ\xbb\x98y\x04/\xfd\x8c^[=\x86\x12\xb7\xe5\xeb\x11i\x8dc\x05\xb1\x1e\xf1\x90\xb1-\xc0\x0f\x99UCx\x0fS\x8f\xe0\xa5\x9f\xd1k\xab\xc7P\xe2\xb6|=\"\xadq\xac\x20\xd6#\x1e2\xb6\x05\xf2\xfc\xfa\xd3\xc7K\xb3\xf1Z\x84\x1f\xc1K5F=\x8d\x97~0\xaf0nK-\xcd\xdc\x0e\xf6-\xb0k\x1c+\x08\xf5\x88\x8b\x8cm\xd1\xe1\xda\xa59\xf9\x1b\xb4\xd4\x8d\xf1\x08^\xea)\xb4\xd4\xd3x\xe9\x07\xf3\x0a\xe3\xb6\xd4\xd2\xcc\xed`\xdf\x02\xbb\xc6\xb1\x82P\x8f\x98\x00RrQ\"Jz\xc4s\xc6\xd6\xe1us\x95(\xe9\x11\xcf\x19[\x87\xd7\xcdU\xa2\xa4Gu4\x87\xeap\xc66\x91\x18\xba\x1ej}N\xa9\xf5s\x11o\x00\x19\xdb\xa81\x0c=\x80\xc4\x03\xf4\x008\x80\x1e\x00\x07\xd0\x03\xe0\x00z\x00\x1c@\x0f\x80\xc3\xff\x07'\xa7c\x12\x8d\x96\x0dF\x00\x00\x00\x00IEND\xaeB`\x82", - "analysis/callers1.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03\xa2\x00\x00\x01.\b\x03\x00\x00\x00\xa3\xcb_?\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x04\a\x03\x06\f\x0f\n\r\t\x10\x12\x0f\x17\x17\x13\x1a\x1a\x14 \x1f\x19!# #$\"%$\x1d$%#&'%'(&+)\x1e()'++$*+)+-*/-!,-+-.,02/52'241574796<9-9;8:;C;=:=?#CxAB@CDBDFCKHe\xafac`*{!Ag\xb2ceb)|*dfcfgeghfLi\xafDl\xb0hjgqjR\\k\x88/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H\x1c\xcd\x04+\xd1\n\xcd\x16\x06\xcc\x12\xa6/ є`G\xfe8#4\x0f\x11\x89\xfag1\u007f\xa6Bo,\t\xef\xc4\xd3U\xd2)a\xda\x02\x12\x05&\x01E+\nL2 Q\xe0\xa6\xf9l\xb0z\xd7\x1fn\x18\xe5\x02&\x06H\x14\xb8iv9\x1c\x0e\xc6\xc3N\xc0\xa4\x00\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S3\x9d%Z\x83l\xab\x86\x8d2\x01@r\x99\xce\x12\xf5u\xba\x8bm\x13Z\xf4\x12\x00\xb8\xc1]\xa2Z\xc3\b\x91\xe1c\xee\xd6>\xbd=\xa6\x92.4\x80\x01\xc0\xcc\xf0\x96(\xc30\x02\v']=\xa3\xfd\xaeX?\xa9\x9f*z\r\xd6u\x06\x80d\xc3[\xa2\f\xc3\b|z\x8fؚ\xfa]\xc9\x18\x16\x82D\x01\xb3\xc3Y\xa2,\xc3\b\x9f\x8b\xaeZ\x94\x94A!H\x140;|%\xca4\x8c\xe8\x11\xd5\x1a\xcfO}\xa7\x82\x81\xc8J\xef\x00`J\xf8J\x94i\x18\xd1\xee\x19ns\x1d\xe8N\xcaZ\x18\x82\xad\xb2{,Y\xd7\a\x00\x88\x03\xae\x12e\x1bF\xb4RÈ\x03\xadI\xd1\xe81\x84\xd0=F\x99\x00 y\U00014a0ea\x84g\x0f]\xf5\xda\xdd\x1b{\xef)!`+\xdcѩ\xe7\x12\x02\x00&\x80\xa7Du\f#\xba$\xa7\x88\xaeh\xf7I\x1e\xf4\xa2\x93FY\x00 \xa9\U00014a0eaD\xbf\x9b\x0e\x06O'\xc30\x02ft\x01\xb3\xc3S\xa2\x12\x1a\xc3\b?\xbd\xe9\x12\xd8\xd7\x17s\xb7\xa9\x01$\n\x98\x1d\xde\x12e\x18F\xe0\xbe=}cC-mɘ.2r\x8d\a\x80d\xc3[\xa2,\xc3\b|\xa9\xdd}\xa4\x8f\xbfB\x05_\u007f\x8d5m̜\x814\x85\xb7D\xcd\xc4\x12\x84\n\x921G\x05\x00\t0\x9d%\xea\xeb\x1f\xc3\x00`r\xa6\xb3D\x01 \x05\x00\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x022\xb0>\x8c9\x01\x89\x02\x04\x9f3\x0f-1\xca\x04$\x03\x90( \x12,.v\x9d\x86'\x96M\tw\x89j\f#\x84\x16y\xb5\x94\x031\xf7\x9b\x1aN\xda\xc2k=\xf8\xeb\xf2\xb2\xaa&\xab\xb3\xf7\xaa\xad/\x14n\xb7ng\xa4\x86\xf1\xcf\xcbݢ\r'\x83\xd0Ѿ\x87$\nU\xa9j\x06P\a#\x150\x03\xbc%\xaa5\x8c\x10\\\xfd>\x91>W2\xdcU<\xd9/\x84\xc2yy.gV<\xebm\xfb\xe2\xc8\xe4B\xaePXf\x99\xcdH\r\xf3d\xe1\x96\f\xbf&\x8c\x93@\xac_\xbb\x86\x8ef\xaf\xf0\x8a\x1c\x94\x17:d\xd5\x01\xe37\x90\x97\x91\n\x98\x01\xde\x12e\x18F\xd0\xe3\xf1\xd4\x00\x00\x0f\xb1IDAT\f\xd1U\x8cZ\xbac\xef8E\x84\x9bM?j\xc6\xc18\xc4'j9\xd7e\xd8ؾ\x80B\xd2\x0fd\xac\xc8\b\x15\x1bI\x8dP\xb1\x19g{5a\\\x04]\xb9\xf3bl\x0e\x1d\xad\x8a\x8e1\xabr\xc6T\xa9j`\x81\x18\xf3\xc2Y\xa2,\xc3\bʱ\x17\xf8\xaf\xba\xa0b\x04Ż\xbc\xd9\xd8\x12Ta\xd4\xe2w\xa2\xcep\xd4\x1f^\xf1>\x92\x1aa\xb6{\f\x8dh\xc2x\x18\xa8@\xf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c4\xd3U\xd2)a\xda\x02\x12\x05&\x01E+\x0aL2\x20Q\xe0\xa6\xf9l\xb0z\xd7\x1fn\x18\xe5\x02&\x06H\x14\xb8iv9\x1c\x0e\xc6\xc3N\xc0\xa4\x00\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S\x03\x12\x05\x00S3\x9d%Z\x83l\xab\x86\x8d2\x01@r\x99\xce\x12\xf5u\xba\x8bm\x13Z\xf4\x12\x00\xb8\xc1]\xa2Z\xc3\x08\x91\xe1c\xee\xd6>\xbd=\xa6\x92.4\x80\x01\xc0\xcc\xf0\x96(\xc30\x02\x0b']=\xa3\xfd\xaeX?\xa9\x9f*z\x0d\xd6u\x06\x80d\xc3[\xa2\x0c\xc3\x08|z\x8f\xd8\x9a\xfa]\xc9\x18\x16\x82D\x01\xb3\xc3Y\xa2,\xc3\x08\x9f\x8b\xaeZ\x94\x94A!H\x140;|%\xca4\x8c\xe8\x11\xd5\x1a\xcfO}\xa7\x82\x81\xc8J\xef\x00`J\xf8J\x94i\x18\xd1\xee\x19ns\x1d\xe8N\xcaZ\x18\x82\xad\xb2{,Y\xd7\x07\x00\x88\x03\xae\x12e\x1bF\xb4R\xc3\x88\x03\xadI\xd1\xe81\x84\xd0=F\x99\x00\x20y\xf0\x94\xa8\x8ea\x84g\x0f]\xf5\xda\xdd\x1b{\xef)!`+\xdc\xd1\xa9\xe7\x12\x02\x00&\x80\xa7Du\x0c#\xba$\xa7\x88\xaeh\xf7I\x1e\xf4\xa2\x93FY\x00\x20\xa9\xf0\x94\xa8\x8eaD\xbf\x9b\x0e\x06O'\xc30\x02ft\x01\xb3\xc3S\xa2\x12\x1a\xc3\x08?\xbd\xe9\x12\xd8\xd7\x17s\xb7\xa9\x01$\x0a\x98\x1d\xde\x12e\x18F\xe0\xbe=}cC-m\xc9\x98.2r\x8d\x07\x80d\xc3[\xa2,\xc3\x08|\xa9\xdd}\xa4\x8f\xbfB\x05_\x7f\x8d5m\xcc\x9c\x814\x85\xb7D\xcd\xc4\x12\x84\x0a\x921G\x05\x00\x090\x9d%\xea\xeb\x1f\xc3\x00`r\xa6\xb3D\x01\x20\x05\x00\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x02\x80\xa9\x01\x89\x022\xb0>\x8c9\x01\x89\x02\x04\x9f3\x0f-1\xca\x04$\x03\x90(\x20\x12,.v\x9d\x86'\x96M\x09w\x89j\x0c#\x84\x16y\xb5\x94\x031\xf7\x9b\x1aN\xda\xc2k=\xf8\xeb\xf2\xb2\xaa&\xab\xb3\xf7\xaa\xad/\x14n\xb7ng\xa4\x86\xf1\xcf\xcb\xdd\xa2\x0d'\x83\xd0\xd1\xbe\x87$\x0aU\xa9j\x06P\x07#\x150\x03\xbc%\xaa5\x8c\x10\\\xfd>\x91>W2\xdcU<\xd9/\x84\xc2yy.gV<\xebm\xfb\xe2\xc8\xe4B\xaePXf\x99\xcdH\x0d\xf3d\xe1\x96\x0c\xbf&\x8c\x93@\xac_\xbb\x86\x8ef\xaf\xf0\x8a\x1c\x94\x17:d\xd5\x01\xe37\x90\x97\x91\x0a\x98\x01\xde\x12e\x18F\xd0\xe3\xf1\xd4\x00\x00\x0f\xb1IDAT\x0c\xd1U\x8cZ\xbac\xef8E\x84\x9bM?j\xc6\xc18\xc4'j9\xd7e\xd8\xd8\xbe\x80B\xd2\x0fd\xac\xc8\x08\x15\x1bI\x8dP\xb1\x19g{5a\\\x04]\xb9\xf3bl\x0e\x1d\xad\x8a\x8e1\xabr\xc6T\xa9j`\x81\x18\xf3\xc2Y\xa2,\xc3\x08\xca\xb1\x17\xf8\xaf\xba\xa0b\x04\xc5\xbb\xbc\xd9\xd8\x12Ta\xd4\xe2w\xa2\xcep\xd4\x1f^\xf1>\x92\x1aa\xb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x82\xbbc\x9d\x94\x82̕\x87\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0g\xf9-\xfe\x00\xc0Cn\xf8\x99\xba\xaeP\x87\xf6\x10\xaf\x8e\x14\xdd\x1e\x9d(6\xba.\x93\x03\x122rJ\xa0\b\x11\x12\xb7\xe5+\xf8\x8e畑\x91\x9f\xaf\xab\xb4>\xf2K(\xe6\"+\x9c֟c9\xc3H\x8d\xae+-\xdb\x18%\xd6n\x9aG]j\xf8ٺ\xae`\x06\x9e\xdcib\xaf\xeb\xe2٭\xd2\xf4\xa8\x15\x91\x1fHH\xfc\x96/\xfd\xa1\\_WXc\"\x14s\x91\x15\xfaS\xb1\x8bM\x03\xe2/\xe2\xc5A\x9a\xb6qB\xed\xa6wԥ\x86\x9f\xad\xeb\xcal\xf8\xedu]Iڭ\x92e\xda\xe1\x8f_\xab\x15y\"\xdf:\xeb\f\xc2\x16\xc8\n\x97<\x97\xf8\x153\x88\x94\x8d%\x95\xb4\x8c\xba\xdc\xf0\xab\xc4\xea\xba2\x1a~;]\x17\xc7n%\xf6,\x91\x02\xad(\xcf{\xe3\b\xca\xca_\xc1?\xb5Ae\xb6Kl,\xbe\xe2,v\x1b\x9307\v9\x0eD\xf8\ts\x17\xb3]\xbe\xa3+\x89QO\x00\xa9\xe1g꺢\u007f\xf4\x9fdϔN\x84\xba.\x96\xdd\nc\xefY\"EW&d\xf8-\x93\xba\x17\xca\f?!\x99b\x8b\xb9xΫD¯\xed\xebv\xadB\xf1\xb5`\xfb2䬱YJ\t\xca\b\f\x1b\x17\xb9Bf\xa9P|\xc61\x8d\x99\x83\xcan\x97\xd8X|\xc5Y\xec6&`o\x16r\x92\b\xbfi\xeeb\xb7\xcbwt%3\xea\xf1#3\xfcl]\x17\x1a\xf0i\x93\x83>\xee\x8ciC\xa8\xebb٭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f\rrß5\xf4*\x92\x8eS&\xf3\xb7M\x86B\xc1\xe1\xba$.\xdd\xf7\x96\xc4\\\x1c\x04\x00\x13\b\u007f\x12\x84;\xdcO\x8a꤈^\xb7\xbe\xef\x0e\xbb\x93\xf9\xd4~\xf2j\x06\xee\x99\x06f\v\x10\xfe$\b\xb8w\xc8:I\x19\xcdю\xf7\xd1x\x8e\xfdm\x04\x00\x900\x10\xfe\x99M\xb81\xefɮ\xc1\xae'\xf3d\x1dj\x00\xce\x01\xc2?\xd3\xf1-/r\x15-O\xe6\xa0\x1f\x00l\x81\xf0\x03\x80C\x81\xf0g%\xffh\"\xaa\n8\x16\b\u007fV\x02\xe1\a\xc4@\xf8\xb3\x12\b? \x06\u009f\x95@\xf8\x011\x10\xfe\xac\x04\xc2\x0f\x88\x81\xf0g%\x10~@\f\x84?+\x81\xf0\x03b \xfcYI$\xf8\xff\xf5?\xfd\x03\x15\xfe\xa9Ž\b\x00\"\xc8\r?[ץ2\xee\x85[\xd8\x12\xe4Jû\xfc?\xea\xd9\xff\x9b꿲\xec\xf9[r\xe8'\x81\x00NFj\xf8ٺ.\x95`\xfb\x05\xfa\t\x15\x80\x90wk\xcf\xf1\xff\xa8g\xbf\xf6\xbf\xc6\x1c\xf6\xfb液\xe7\x00\x9c\x87\xd4\xf0\xb3u]*\xbe\x81\x00\x84?Qb\x9e\xd8i\x12\xfeǟ\xfd\xe3?\xfe\u007f\xb5\u007f\xc58\xe7\xdf\xc3y41\xe0<\xa4\x86\x9f\xa3\xebB\xe3\x1dA\b\u007f\n\xb9Y\xf6\xc7\u007f\xfc\xef\xff8\xe7\xff\xf8?\u007f\x16\x1b\xfe`\x11\xfd\xe4o\xc0\xb9\xc8\r?b꺂\xed7Q\x16\x85\x9f#\xfcB\xf6\xe6\xae߭\xad}\xb5\xa1a\xec\xd8\xea\xdd\xf7\x11\xba\xffBC\xed\xa6}\xb7\xd4\xe2#յg^jX\xbd\xef3j\x12ݯ\xad\xae\xae\xd6\x0e\x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\xfeK\xab\x1b^\xfc\x12\xd71'?\xae\xd69\x8b\x8e\xa8?k?\xc5\x1f\xfb\x1fQS\x8e\xcbjw\xdf\xd2\xc2\xff\xbf\xff\xe7\xff\xeb\xbf\xeb7\xf9\xfc慆\xd5\xcf\xea\xdf\x04\xf0\xe7\xed\xe0v\x01p\x18r\xc3\x0f$N\xf4螞d\xf1\xaf\xb5G\xfe\xf5w\xbf\xbb\xff\xf1\v\xab\xefk\xe1\xffo\u007f\x85o\ue9eat\xb9\x1a\xe1\x16\x1f \x02\x84\u007f\xa6\x13\u007f\xf8\xdf]\xad\xdf\xee\xff`\xed\x15=\xfc?\xfb\x9b\xff\xdb\xf2\x95\xde\"\xf8R\x1f`\x00\xe1\x9f\xe9\xc4\x1f\xfe[\x91\xcb\xfa\xb7\xaa?\xfd\xb7\xf8j\xff\u007f\xd0\xce\x02lg\x01\x9c\f\x84\u007ff\xf3[\xedz\x9eu\x92̓\x97j\x8f\x9c\x1b;w\xa4\xf6\xa5\a\x10~@\f\x84\u007ff\xa3]\xcf\xfb\xcc:\xc9\xe1\xc1\xbb\xfb\x1aj\x1b\xf6\xbd\xfb\x00E\x0e\xfb\xe11^\x80\r\x10\xfe\xac\x04\xc2\x0f\x88\x81\xf0g%\x10~@\f\x84?\v\t\xb5\xd6\xe1;\xfc\x9a.\xc0\xc7z\x80\r\x10\xfe\xec#\xbc8\xfa\x95ޓ\x90~\x80\x0f\x84?\xfb\b=t\xf0\xf7\xbf\xff\x9f\xea\x06z\xe8\t\xf8\x0e\x0f\xc0\a\u009f}\x04\x15\xa5\xaa\xea\xa1ª\x85s\x1a\xb3\xe5\xfb\x12@:\x80\xf0g\x1f!\u007f\xb1\xdb=\xdf\xedv/\x1d\x86=?\xc0\a\u009f\x85\x84\x02\xdaS\u0086\xea\n\x95'Du\x01\xe7\x02\xe1\xcfF\xc2\xe1\x90\xfao\xfe|\xef@\xf6<\x1d\tH9r\xc3\xcf\xd4u\x85:\xb4\x87xudӕ\xe9\x81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d8Q\xe2\x86'\x1f\x00\xa9Bn\xf8Y\xba.\xfct\xd87\xda߸\x00\xaf\xea8\x18T\xc0k\x04\xa4\n\xa9\xe1g\xea\xbaP\xb0\xf3$.\xed\x84\xf4\x8b\x19V\x86DU\x00 N\xa4\x86\x9f\xad\xeb\xf2wk\x8f\xf0\xef\xf6\v\xe6\x06 \xfc@*\x91\x1a~\xb6\xaek@\u007f|w/x;\xc4@\xf8\x81\xd4!7\xfc\x88\xa5\xeb\x9a\xea\x1c\x9c\nM\xf9;\xe1y\xafb\xae*\x83\xa2*\x00\x10'\x92\xc3\xcf\xd4u\x85\x06\xd4\xd2>x\x86g\x1c\x84\xdc\v/\x04\xc0\x84\x05\xa4\x04\xc9\xe1g\xe9\xbaB\x03\xdd\xf8\x99\xbe\x03\x90\xfe8\xe8S\x14e\xa5\xa8\x12\x00ă\xec\xf0\xa3X]W\xf4\x82\xdf\x05ь\x00\n\x16\xcek\x19\x04\xc3\t\x90\x12\xa4\x86\x9f\xa9\xeb\n\xb7\xeb\xa68\xcd\xe3\x03\xd83\xac\xc0eQ U\xc8\f?[\xd7\x15\r\xff(\x84_\f\\\xed\aR\x87\xcc\xf0st]\x83\x91\xc3~\xb8\x8e-\x06\xc2\x0f\xa4\x0e\xa9\xe1g\xeb\xbaB]\xdd\xe3\x81\xf1\xee.\xb8\xe0'f\b\xc2\x0f\xa4\f\xa9\xe1\xe7\xe8\xbaB\xc3';N\x0eC\xf6E\x84\x02\xa3\xf5\xae\x80\xa8\x16\x00ĉ\xdc\xf0\x03\xd3\xe1\tE)\xee\x15U\x02\x80x\x81\xf0\xcf\x1e\x02\xa3\xb0\xdb\aR\b\x84\x1f\x00\x1c\n\x84\x1f\x00\x1c\n\x84\x1f\x00\x1c\n\x84\x1f\x00\x1c\n\x84\x1f\x00\x1c\xca\xff\x0fL\f\x1em+\xfdz{\x00\x00\x00\x00IEND\xaeB`\x82", + "analysis/callers2.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x03\xfc\x00\x00\x01\xb0\x08\x03\x00\x00\x00#z\x9e\xf7\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x04\x06\x02\x07\x09\x05\x0a\x0b\x15\x07\x0e\x10\x0f\x11\x0e\x0e\x12\x1d\x15\x16\x15%\x19\x10'\x1a\x0c\x1e\x1d\x17\x16\x1e.!#\x20#$\"$%#%'%'(&)(\"()'-+\x20*+),-+-.,12053'O.\x0f352786<:.9;8=?]\xa1Z\\Y\x16w\x1d\\^[\x19y\x1e:b\xac_a^Ya\x8bac`\x9aZ\x1d*{!@f\xb1Ke\x9e(|*dfclfP+\x7f,fheMj\xaf.\x81.Fm\xb1ikh0\x8301\x841/\x859Jq\xb5mol\x89j_oqn;\x86:>\x88<\xb3h\"{s[Vu\xb5sur?\x8a>@\x8b?uwtB\x8c@@\x8dG\\z\xba\xadq?y{xJ\x8fI^~\xb8L\x90K\x94wq\x85}d~\x80}O\x93Nb\x83\xbdN\x95U\x81\x83\x80W\x95V\xa7|e\x8e\x85gm\x87\xbcZ\x98Y[\x9aZ\x87\x89\x86]\x9b\\^\x9d]\xba\x82Z\\\x9ddr\x8d\xc2\x8a\x8c\x89\x96\x8cnd\x9ddf\x9ff{\x90\xc0\x8f\x91\x8eh\xa1h\xe3\x83+\xd0\x87K\x7f\x93\xc4j\xa3jz\x97\xc6\x93\x95\x92s\xa4l\xa0\x96wq\xa5s\x81\x9a\xc4\x97\x99\x96\xe4\x8b@u\xa9w\x9a\x9c\x99\x86\x9e\xc8\x9c\x9e\x9b\xef\x904~\xaby\xa8\x9e\x7f\x9e\xa0\x9d\x80\xad|\xa0\xa2\x9f\xf9\x94.\xa1\xa3\xa0\xa2\xa4\xa1\x81\xb1\x85\xff\x952\x92\xa6\xcb\xa4\xa6\xa3\xb3\xa6\x82\xa5\xa7\xa4\x8b\xb2\x88\xa7\xa9\xa6\x8d\xb5\x8a\x8e\xb6\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%\xe1\xfd\x15\x07\xfa\xdf\xeb?P\x91\xf4\xaep\xfa-L\x1f\xfd\x12\x9cuR\x02rW\x1e\xc2\x0f\xa4\x96w\x9eZV\xba\xec\xe9\xe9\x1c\xb5N\xbf\x85\xe9\xa2]\x82\xbbc\x9d\x94\x82\xcc\x95\x87\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0\x03\x80C\x81\xf0g\xf9-\xfe\x00\xc0Cn\xf8\x99\xba\xaeP\x87\xf6\x10\xaf\x8e\x14\xdd\x1e\x9d(6\xba.\x93\x03\x122rJ\xa0\x08\x11\x12\xb7\xe5+\xf8\x8e\xe7\x95\x91\x91\x9f\xaf\xab\xb4>\xf2K(\xe6\"+\x9c\xd6\x9fc9\xc3H\x8d\xae+-\xdb\x18%\xd6n\x9aG]j\xf8\xd9\xba\xae`\x06\x9e\xdcib\xaf\xeb\xe2\xd9\xad\xd2\xf4\xa8\x15\x91\x1fHH\xfc\x96/\xfd\xa1\\_WXc\"\x14s\x91\x15\xfaS\xb1\x8bM\x03\xe2/\xe2\xc5A\x9a\xb6qB\xed\xa6w\xd4\xa5\x86\x9f\xad\xeb\xcal\xf8\xedu]I\xda\xad\x92e\xda\xe1\x8f_\xab\x15y\"\xdf:\xeb\x0c\xc2\x16\xc8\x0a\x97<\x97\xf8\x153\x88\x94\x8d%\x95\xb4\x8c\xba\xdc\xf0\xab\xc4\xea\xba2\x1a~;]\x17\xc7n%\xf6,\x91\x02\xad(\xcf{\xe3\x08\xca\xca_\xc1?\xb5Ae\xb6Kl,\xbe\xe2,v\x1b\x9307\x0b9\x0eD\xf8\x09s\x17\xb3]\xbe\xa3+\x89QO\x00\xa9\xe1g\xea\xba\xa2\x7f\xf4\x9fd\xcf\x94N\x84\xba.\x96\xdd\x0ac\xefY\"EW&d\xf8-\x93\xba\x17\xca\x0c?!\x99b\x8b\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ec\xb3\x9db\xf8s\xfe\xc7\x1e\xd9\xf86\xfe\xbb\xd1\x07\xb5p\xe7\xa35\x87\xdf*\xd5*\x18\xedR\xa5\x06\xd7#\x17\x05NsUd\x8e0\x8d\xc9\x0d\xff,!\x83b\xaei1m]W:\x09\x95\xc7$\x1b\xc8,\x10~\x06\x99\x14sM\x87\x19\xfd]\xde\xfeJ\xe9\x17t\x01{\x20\xfcV\x9c!\xe6\x92L\xdb{\xe8GN\xb8[~v\x01\xe1\xb7\xe0\x101\x97\\B\x9e\x0d\xcf/\xcb\xea\xfbef%\x10~+N\x11sI\xa5\xadb\xcb\x84\xa8\x0e\x20\x1b\x08?\x008\x14\x08?\x008\x14\x08?\x008\x14\x08?\x008\x14\x08?\x008\x14\x08?\x008\x14\x08?\x008\x14\x08?\x008\x14\x08\xff\xcc\xbe#\x1e\x00\xd2\x86\xdc\xf0\xb3u]\xe1\xab\xbd\xed'3vW\x1d\xdfn\xf5vi\xe4\x9b\x9f\xa5o\xcb\xf57\xf1\x97FH\xb1b\xfdXl\xf8\x8d\xd9\x1a\xab\xf8\x15\xe2.\xdd\xaf\x0e]\xc5\x84M\x05\x0bl\xd9\x96\x90\xf4\xce\x16\xd7\x96'\xb6\x85x5g\x0eR\xc3\xcf\xd6u\x85}\x1d\xa3\xb7/\xb7_\x16\xcd\x9d&\xf8v\xab\xd7=##\xa7<'FF<\xaf'\xefo\x12\xba\xa9\x18\x15\xf8K#\xa4X\xb1~,6\xfc\xc6l\x8dU\xfc\x0af)\xd9uF\xdd\xcf\xf1\xf0}`S\xc1\x0a[\xb6%$-\xb3E\xd7-\xae-Ol\x0b\xd1j\x0a_\x0f\x12\x91\x1a~\xb6\xae\xeb\xfdv\xac\xeb\xb8\xd9\x9e\x99o\xd3\xd8\xd8\xadN\x94\xe2\xe7?\xab\xaf\xde\x8a\x13\xd1':&\x8e\xd0M\xc5\xac\xc0Y\x1a!\xc5b\xfa\xb1\xd8p\xbb.4\x8fM\xb2]\x17\"\\7*\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x1b*\xf0~\xf7\x8a~aB\xbb\xad@\xa0\xd52\x07\x95\xa7\xd5b8\xba\xc2\xa4\x7f\xcc\xec\x0e\xed*#\x97v\xba\xc2c\x1d\x7fs\xdd\x84[\x9e\xdc\x16\xc4j\xea\x13\xda\xb6\xa0\xc6\x97\xb9\xb93\x84\xdc\xf0\xcf,$\xdb\xad\xca\xdb\x100#y;\xf6\x83\x10G\xe0\xe4\xf0K\xfe./\x84\x7ff\x12~k\x91\x84\xad?\x13qr\xf8%\x03\xe1\x9f\x99\xdc\xad\x8c\xbdU\xdb\x19@\xf8%\xa1_8\x02\x80\x99\x03\x84_\x12\xda\x85\xa3\x99\xf1\xf1.\x00h@\xf8\x01\xc0\xa1@\xf8\x01\xc0\xa1@\xf8\x01\xc0\xa1@\xf8\x01\xc0\xa1@\xf8\x01\xc0\xa1@\xf8\x01\xc0\xa1@\xf8\x01\xc0\xa1@\xf8\x01\xc0\xa1@\xf8e\xdf\xe2\x0f\x003\x04\xb9\xe1't]\xa4\xa3+\xd0\xdb\xd1\x97\x81\xe7\xf8\xe8\xf0u]\x16R&b\x8a\xcb\x00\x95\x02L!\x15\xd1\xf5$\x84_@\x96\"5\xfc\x84\xae\x8btt\x05\xda\xfd\xb7\xfd\xed\x99J?_\xd7\x85\x84B\xaa\xe4\x88\xcb\x00\xc5$A\xd7\x93!\xa4\"\xba\x9e\x84\xf0\x0b\xc8R\xa4\x86\x9f\xd0u\x11\x8e\xae\xf0q\xfc\xe8\xce\x0b\xc73\xb3\x0f\xb2\xd1u\xa1x\x84TI\x91\xec\x17\xfc\x12u=\x19O\xbd2\xba\x9e\x9c\xf0\x0b\xc8J\xa4\x86\x9f\xd0u\x11\x8e\xae\x1b\xed\xf8\x15\x18l\xcf\x8c\xa7\xd7F\xd7\x85\xd2\xf6\xac\xd5d\xc3\x9fhwb\x9fO\x9b\x9c\xf0\x0b\xc8J\xe4\x86_%\xa2\xeb\"\x1c]\x03\xfa\xfb\x80/\x03O\xf0\xb4\x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91\xc3~\xb8\x8e-\x06\xc2\x0f\xa4\x0e\xa9\xe1g\xeb\xbaB]\xdd\xe3\x81\xf1\xee.\xb8\xe0'f\x08\xc2\x0f\xa4\x0c\xa9\xe1\xe7\xe8\xbaB\xc3';N\x0eC\xf6E\x84\x02\xa3\xf5\xae\x80\xa8\x16\x00\xc4\x89\xdc\xf0\x03\xd3\xe1\x09E)\xee\x15U\x02\x80x\x81\xf0\xcf\x1e\x02\xa3\xb0\xdb\x07R\x08\x84\x1f\x00\x1c\x0a\x84\x1f\x00\x1c\x0a\x84\x1f\x00\x1c\x0a\x84\x1f\x00\x1c\x0a\x84\x1f\x00\x1c\xca\xff\x0fL\x0c\x1em+\xfdz{\x00\x00\x00\x00IEND\xaeB`\x82", - "analysis/chan1.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x04\xc0\x00\x00\x02n\b\x03\x00\x00\x00aR\x8e\x00\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\a\n\a\x0f\x11\x0e\x1a\x1a\x14\x1f\x1f\x18!# #$\"\x15%D$%#%'%'(&+)\x1e()'*+)/,!+-*,-+-/,02/63(241564796<9.9;8#?r@=2<>;>@=C@4DA5AB@DFCFHELH:IKHKLJNOMUP?PRORTQTVSVWU]XGWYV_ZI,`\xaeZ[Y7]\xad[]Z\\^[9a\xab;b\xace\xafac`hcQcdbAg\xb2efdCi\xb4fheDl\xb0Mj\xafqjRikhGn\xb2Ip\xb4lmkKr\xb7npmUt\xb4{s\\rtqWv\xb6tvsuwt[y\xb9\\{\xbbxzw]~\xb8e|\xb8\x84|dX\x80\xbf{}za\u007f\xbf|~{~\x80}b\x82\xbc\u007f\x81~d\x84\xbf\x81\x83\x80|\x83\x97\x83\x85\x82l\x86\xbch\x88Ð\x86hn\x88\xbej\x8ać\x88\x86q\x8b\xc1\x89\x8a\x87t\x8e×\x8doz\x8e\xbf\x8c\x8e\x8b|\x90\xc1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\xe7\xdc\xdf\xdb\xda\xdf\xe2\xe0\xde\xe2\xde\xe0\xdd\xf0\xe0\xb3\xd6\xe2\xf0\xdc\xe2\xe4\xe0\xe2\xdf\xde\xe3\xe6\xde\xe2\xf2\xe2\xe4\xe1\xe1\xe6\xe9\xe4\xe6\xe3\xde\xe7\xef\xe8\xe5\xea\xe5\xe7\xe4\xe6\xe8\xe5\xe4\xe9\xeb\xe7\xe9\xe6\xe8\xe8\xf3\xe8\xea\xe7\xe2\xeb\xf3\xe9\xeb\xe8\xec\xee\xeb\xe6\xef\xf7\xe8\xf1\xf9\xef\xf1\xee\xf0\xf0\xfb\xf1\xf3\xf0\xf1\xf6\xf9\xf4\xf6\xf3\xf7\xfa\xf6\xf5\xfa\xfd\xf9\xfb\xf8\xfa\xfc\xf9\xfd\xfb\xff\xf9\xfe\xff\xfc\xfe\xfb\xfe\xff\xfc\xc5\xe5[\xa2\x00\x00 \x00IDATx^\xec\xbdqLS[\xda\xef\xef93\x8b\xab}\x87Ax+\xc3}\xf5^8#\xbe\x1c\xbc^gk\xa9\x17\u007f\xe2A.U\xe1u^\x05މ9\xf6\xe8}\xc9\x18\xc5\x174z\x8fg\t\xddk\xaf\xfd\xac\xb5\xf7j\xd9߮\xf5\xec\xd5\xf5l\xf8\xdb{\x80\x01\x00\x00V\x8e\xbfmH&R\x89HV;\x00\x00\xc02\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\xac\v\x02\xc9\f\x80\x94\x04\x04\fX\xfbx*\xb6\xa0\xfdɌ\x80T\x04\x04\fxO\xda\v\xbc\xc9L\xd4\xc1[Ю| \x90\x97\xc7\xf7\xb8\x95\x8f\x01\xa9\x8d\xda\x02\xe6\xe9j6Y\x06|\xb2\xe4|\x13/М\xa0\xe0_\xaf\x95\xe9k\x83\t\fbiۈ\x046\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xed\xcb\xdazҼ\x91\\\xfa\x11\xd1\xf1U*=\x05\xc1\xf1\x8b\x8c-\xfb\x1c\xb2VHZ\x1c\xaf\xf1\x843?\x19\x9073.s7>\xd3\x1b\x05\xa5\x19;]Vb\xa4}\xaf\xfb\xc6ۇu\x06\xe3#\xb9\xc1S\xd1Iv\x0fK?\xe3\t\xf6\xb3G\x9dQp\x82\x99\xb5\xbcP\xed,=*\xfe\xc8̖~2\xfa\xac\x94\xe9\x8d\aǧ\x03\x18X\x83\xa8-`k\x8eȨo\x9dR\xad\x89\x196.\v\xaf\x8b\xaf\xbd~\xf7\xee\xed\xd3\xf3\x9f\xc5\xfdEl\x8b\xa6B\xf9\xd7\x1c\xedy\b\x96\xd3Y\x9b\x80\x80\xbd'\xeb^\xc0\xf0\xe5\x9c%\xaca\xb1x\xfa\x85\xc9b8X6\x12\xc7\u009b\x1d\xff\x87\xf8\xd3㞸ǀ\x14\x06\x04\xec=\x01\x01S\x89'\xe2\x04\x8a\xa9xS\xfe\x80\xf5\b\b\xd8{!x\xb7\x01\x15\b^\xd1_\xeb{\xd4wM\xff\xd5\x02\x17\xaa\x00\xd6\x03 `\xef\x05\xf3nOb@\x05\x82õ\x06\x9d\xa1v\x18\xf4\v\x88\x00\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x96\"\f\u05fc\x96\xed{\v\"\xeb\xd8\x03\xc0zEm\x01\xf3t5\x9b,\x03\xbe\xa8\xa4o\xe0\x96\xe9\xd6\xc0\xca,\\>\xb9I\xb2\x86M\b\xef\xb1-\xe9{\x17\xbf\x00\xcb_\xaf\x95\xe9k\x170S\xbc_'.\x18\xa3[X\xfci\x1a\x81\xba5\xaaކ\xb4\x0f\x1eC\x1c\x00R\r\x95\x05l\x9a\xb7:\xdd\xce6\xba\x8a\xa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xd26\x9a\x9d\x18\x9fB\xa5\x96\xf6\n\xd4\x14z\n9Ⱥ\x83\xe1\xdc\xf9A[n\xa1\xcd\x16\x1d\xc0\xa3\x95\xbb\xd0y\xbb\x8a\f\xfb&ħ\x90\x13\x82Դ\x16u\xf4\x9f.\xa6=\xa5\xc6\xdd\xf5\xfd\xdf^!\x9a\xf3\xeeO\xec\x19\xa2\xe8\xcez\xda\xc9u\ba\xaa\xc3\x06\xa4\xb2\xe2\xd6\xe1\xfe+\xdc#y\r\x18?\xe7B3\xf6\xa5\xb9\x97\xd1(\x06\x80u\x8d\xca\x02\x86==\x16S۠?*\xe9\x1fj3\xb7\r\xf9\x13\x17]\x0e\\\xfb\xb2\xb6\x9e4oD\xc7H\xbak\xa76\xebӻ\xe4b\xb2\x98\xdbk\xa3\x93Y\x84r\xc7\xd3Xnt\x9f'\xd8QYt\xa8\xfe~\xa5\xce8W\"\xfc\xbaQx`8w\xe33\xbdQ\x10\xa8\xb1\xd3e%Fҵz&\xf8\xbajY\xe6l1I\n\xbf:\n\x1b\xe0\xfb\xc6ۇu\x06\xe3\xa3\xe8\x1a\x88n\xe9E/\x98$ז~\x12\x03\xc0\xfaFm\x01\x03\x96D\xf0\x86\xae/*\xabES\xa1\xfa\xb4\x13\x00Xe\x80\x80\xa5\x06\xc1\x0e\xc3+Y\x867\x1b\x16\xa3\x00\x00\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x10\xb0UG{\x81\xfaљ\"x\vړ\x99\x00\xc0\xaaAm\x01\xf3t5\x9b,\x03\xbe\xa8d`\xbc\xdd\xd4\xe6L\\r\x859\x86\xd2,\xc9l\x16L'\xc7E/.\x11\xa6\x01\x9d\x93\xed\u007f\xd0\x13S\xba\xb5\t\x83^6\xa4\xc1\xafā\x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1e\xea\x02k\xc6\xf8\xae\xe8\r[3\x13Y'tԫ\xa53R\xcfU8Z=\x8eDt_@x\xf8\xf8(\b\x98\xffxVz\xe1PT\\zWaz\xe6\x9e/\x10\xa2\xa1S\xbbvj\xb3>\xbd\xabT\x1b\x00\xa42j\vغ\xe0u\xf1\xb5\xd7\xef\u07bd}z\xfe\xb3\xb7\xc9L\x15H\x16\x9cTA\xc0\x00`\x9d\x02\x02\xb6\f\xf4\x97\b\x1d\xae`Y\xf4\x9c\xfa\x85\x00\x02\x06\x00\v\x05\x04l\x19x\xc2\t\xb3\x1e\xa6\xb8%,\x98\x13-`\\\x14\xff\xf9?\xd1\xd5(>\x1f\xf8\xb01\xe9\x01 %\x01\x01[\x06\x82W\xf4\xd7\xfa\x1e\xf5]\xd3\u007f\xb5\x840\xef\xd1\xe1\xe1\xa3\xf4\xeb?\x85\x96\xd3i\x03\x05\x03\x00\x10\xb0\xe5 8\\k\xd0\x19j\x87\x97\xa0_I\xc2\xc3\xcf\xd0\x05\r\xff\u07ff\xfd\xed\xff~\xbc\x1f~\x9b\r\x00 `\xa9\x85\x0f\xa1\x9d;?\u07b2sdž\n\x98\x96\n\x00 `\xa9ż-'++7++k\xd7К\x99\xf6\v\x00K\x06\x04,\xc5\xf0{&]\x93\x93.\x97\x1bF\x90\x00\x00\x02\x96r@\\H\x00\b\x03\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x96\xfalXq\x92]!\x00,\x13 `\xa9φ7+\f\b\x18\xb0R\x80\x80\xa5> `\xc0\xbaEm\x01\xf3t5\x9b,\x03\xa1)\x00\x0eq\x05\x1dy.\xb08@\xc0\x80u\x8b\xca\x026\xcd[\x9dng\x9b\xb8\xa0\xa1\xcf4\xd0\x14\x9b\v(\xf2\xf6/\U0004e000\x01\xeb\x16\x95\x05\xcc\xc5B\x0f\xf9\xc4\x00\x1e\xd6\x1ewSl.\xa0@\xf0^\xc9\xe9x\xc7$\x02\xb6`-[\xb0\xe1\x9b\x05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V\x14\xb07\xbf\xfb\xd9G\x1f\xfd\xecwa\x01\vW\xb9\x81&\xe84\x8a\xf0Y\x93]-\x00,\x13j\v\xd8:ƻ\xf9\x98w~\xde7t \xeb\x03\xf74C\x02\xa3\x161\xe7\x03\x01\x03V\n\x100\xd5h\xcf\x12F\x8f\x01\xed\xdd$\x96\x8b\x04\x04\fX\xb7\x80\x80\xa9\xc6h\x9a0vt\xa4=Lb\xb9H@\xc0\x80u\v\b\x98j\x04*ҏ\xb5\xf4\xb6\x1cK\xafHf\xb9H\xd4\x16\xb0\x18@\xc0\x80\x95\x02\x04LE\xac{\xb25\xd9{\xac\xc9\xcc\x16\v\b\x18\xb0n\x01\x01K}\x92\x85\xdcX~\x92]!\x00,\x13 `\x00\x00\xa4, `\x00\x00\xa4, `\x00\x00\xa4, `\x00\x00\xa4, `\x00\x00\xa4, `@\"\xfc333\xf3\x18ϓ\xcdZ\xf9\xa9*\xb0\x96\x00\x01\x03\x120\x90\x86\x10J\xf7\xf9\xd2\xc9&-j\x9dE\x00Xy@\xc0\x00\x05\x86k^\xb3\xad\x05Y\x87\x86\x1c\x18;\x86\x86\xac(:\x98\xd2Bi/\xf0&3!x\v\xda\x15\x92\x00\x90\x10\xb5\x05\xcc\xd3\xd5l\xb2\f\x84\x96cp\xf0\xe1i\xe9\x92$\xf0\x01\xf8\x8a\xe3:Ȧ\x83㾊:2v(*D[,w\xb8Va\x15~Kdy~\xb7 `\xc7P\xda\"\x85\xac\x01\x9dKf\xc2hHkPH\x02@\"T\x16\xb0i\xde\xeat;\xdbĥ\v}\xa6\x81PT\"I\x12\xf8\x10\xbc,\xbe\xf3\x03\xd9\xfcp\xa7\xf8eԑ\xe1\xe2~1\xf5\xe8\tV\xa4\x93\xbb/\xa6b\x05\xccc\xdbT\xa7X\xa8wT1\x1b\xff&ͬ| \x06\xebƫ\nI\x00H\x80\xca\x02\xe6\xe2\xe9\r\xe1\xe3\x9dl\xcf\xda\xe3\x0e\xa9\x96$\t|\x10N\x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Ph9\x9d\xa1q%M\xb1h\x93+\xcd\xe5\x1c\xf9\xbc\xb5\b\xfd%\xc2\xe81X6\x82\xbd\xd9\xe1\x15($I\x00H\b\b\xd8rP(\xce$`\x8en\x8f\xb6z\x8d.fZ\u05cbw-l\xa9\x9c\x89'\xb4\x8b\x00\x00 \x00IDAT8<\x11'PLqO\x93X\x02\x80\" `ˁK\x9c\xaf\xe5Jf\x98\xd2\xf8P\xfe\xb1E\xfcT[\x81\xe0\x15\xfd\xb5\xbeG}\xd7\xf4_\x051\x00,\x01\x100`ɜۼә\xcc&1\xc1\xe1Z\x83\xceP;\f\xfa\x05,\r\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x10\xb0uɺY\xb7\bX\u3000\xad?<\x15[\x84\xd5\x06\x01 \xd5\x01\x01[w\x04\xf2\xf2\xf8\x9eD+W\x03@ʠ\xb6\x80y\xba\x9aM\x96\x81\xd0\xefO\x1c\xbc\x95nf\xcclAi\xf3Z\xfa\xc9`\xb7\xd6\x1aJz\x8fmI\xdf\xfb^\x836k\x96\x15/\x94Љ\x8f \x842\x94~\xcb4\x8e\xba\x14r\x01 \x15QY\xc0\xa6y\xab\xd3\xedl\x13\x174\xf4\x99\x06تw>\xfe\xa1\x87\xb0\xa6\xd63\xb4f\xdc\n%wm\xb9~$\xfd\xbd~3\xf89\xfa<\x99I\x98Љ\xdd6\xdb\u05ca\xa1Ɇ\x90|I}\x00H]T\x160\x17O\xc7.>^\xf8\t\x9d\xb5\xc7-\n\xd8\x1a\x1cф\xbb\\^t\x15\a\xdeK\xbf\xf0\x19t&\x99I\x84H_o(\x8e\x80A\xc4E`\xad\xa0\xb2\x80\t!\x0f\xbdB\xf8!\x87\xd9\xe7Y\xbb\x02\x16ƅ\x16>\xfe\x8bC\x1d\xaaKf\xa2\x04\b\x18\xb0\xd6Q[\xc0\b3n\x8b\x95\xf6\x12|&\x17^\xa3\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f\x85\x14\xfad8\xd8QYt\xa8\xfe~\xa5\xce(\xb5\x95\xe4^\x14}J\x17\xf0\\\tK\xe8BO\x1f[\xf51^0k\xc68vd\xb4c<\x9e\xc6\x1c\\L\x95\x86\x844b\xe7\xf6\x1f\xcfJ/\x14\x9e\xbdt\xed\xd4f}zW((^\x99\x8cm\xa4\xb3f\xd3X\x85G\x02\x975\x97c\f\xc8Xt3\x8a}\x8e3v\xba\xac\xc48\x82\xf13\xe1\xc2k\xb1,I\xb0\xa5\x9f\x8c)\x04\xac\x17\xd4\x160`\xb5\x12\xbc\xa1\xebKf\xf3\x1eL3\x17~\x01J\xf8ۣv\xb4xgV\x8b\xa6\x02\xbe\xf9\xd6/ `\x80H\xb0\xc3\xf0*\x99\xcd{\xc0z^~W\x82g\x8f\x01sֱ\xf8G\xe3\xe0͆\xc5(\xd63 `\xc0j\xc1\xa3\xad\x86\xa9\xcc\xc0\xe2\x00\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01[\x0eJ\x91\xb6\x1cb\xc4\x01\xc0\xb2\x03\x02\xb6\x1cxz\xcdy\xda\xc5\xff.\x19\x00\x80š\xb6\x80y\xba\x9aM\x96\x81н\xed\xe0\xe9\"\xac\xf3M\xe2\xe2\xd2͉J\xa6\x18\xbdh<\x99\t\x00\x00\xef\x89\xca\x026\xcd[\x9dng\x9b\xb8\xa0\xa1\xcf4@\x17\xc0\x9b\xe1G=\x84\a\xfcZ\xba\xe5\x87 \xd4\x17\x00,;*\v\x98\x8b\xa7\xab\xaa\xf8x\xc1Ad\xedq\xb3\x15<\x1d,(QӚ\x8a\xcc\x00\x02\x06\x00ˏ\xca\x02&\x04\x16\xf4\xf2\x1e\xbaq\x98}\u009a\xf8\x8c\xbb\xb7\xd6Ժt `\x00\xb0\xfc\xa8-`\x84\x19\xb7\xc5J\x97\xb5\xf3\x99\\8\"`N~:A\x99\xd4c\x1c-(\xee!\x00\x00\xef\x81\xea\x02\xe6\xe5y\xde\xcc\xfaa\xd6n,\x11\xb0p\xa0\xa25\x82_[0\xe0^P\xe8C\x00\x00\x96\x8a\xea\x02\x86\xbd\x1e\a\x8bJ\xe4\xa42\x16\x1607/\t\xfc\xbc&\xb8\x8b\x10ڗ\xcc\b\x00\x80\xf7A}\x01\xc34.d7\x19@:\x03\x81\x80\xbb) \xf4R\xba-Iʤ\x1a>\xed\xd6\xcb=kM\x94\x01`\x95\xa1\xb2\x80\xf9\x05\xb9\x1a\xe7\x03\x93|\b\x0f\xcd1?HP*\x15\x19B\xdd\xc9L\x00\x00xO\xd4\x15\xb0@\x93\xe0\xd9~h\n\x04\xbc\x14\x87\xd9륚\xe6]s#Hx\n\t\x00ˏ\xba\x02\x86\x9b\xbb\xe8\xab?\xec\xb1\x0f\xf9\xc0&\xf9\xb5\xf6\xc3\x1b\x100\x00X~T\x160\x17\xdf\xedt;-\xe2L\xfc\x80\xc7a\xf6xi\xcaɯ\xb5\x80Z\x83 `\x00\xb0\xec\xa8,`\xd8\xd3c1\xb5\r\x8aj\xe5\t\xff\x00\xd2}+A\x99\xd4\xc3\xef\x19-\xd5x\x92Y\x01\x00\xf0\x9e\xa8-`\xeb\x83\xfd\bmmOf\x04\x00\xc0\xfb\x02\x02\xb6\x1cxF\xd7\xda3\t\x00X\x95\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\xaco\x01+E\xdarg2#\x00\x00V+\xeb[\xc0<\xbd\xe6<\xad\xb0\xb4\x8f\xb7 \xfc\xebkI\x12\x00\x80Ռ\xda\x02\xe6\xe9j6Y\x06B\xab\x17:x+\xdb\xfa\x06n\x99n\r\xacȚ\x86\xbdH\x8c\aސ\xd6\x10ʓ$\x01\x00XŨ,`Ӽ\xd5\xe9v\xb6\x89\v\x1a\xfaL\x03lEV_S\x1b\xcdmZ\t\x05\x8b\xac\x9cj\xddx\x15\xc7&\x01\x00X\xbd\xa8,`.\xb6\xf6\xbd\x8f\x17\x1cO\xd6\x1e7\x130\x9b\x85\x06垷\xd8\x12\x94\\.$K?\x9fѸ\x15\x92\x00\x00\xacZT\x160\xcc:Y^!\x12\x91\xc3\xec\x13\xd6\xc4\xef\x11|N\xed+\x11\xdbV\"`\xbe\xec\n\x85$\x00\x00\xab\x16\xb5\x05\x8c0\xe3\xb6Xi$\"\x9f\xc9%\x06\xf5\xf06\xf5z\xfd^[\x937I\xc9\xe5`\x1c\xf5\x86\xd3g\xd2g\x14\x92\x00\x00\xacVT\x170/\xcf\xf3f\xd6\x0f\xb3v\x87\xa3\x12\xcdt\x93ܮ\x15\x91\f\xbf\xb6`\xc0-D\xab\xc4\x03\x91\xde\xd8\x00\xc4\xe4\x00\x80Տ\xea\x02\x86\xbd\x1e\a\x8bJ\xe4\xa42&\b\x98\xbf\xdb\xe2\xf48-\xdd\xf3\xc9\xca.\aw\x11B\xfb\x84\xa4\x1b\xdd\n\xe5J\x92\x00\x00\xacV\xd4\x170L\xe3Bv\x93\x01\xa43\x10\b\xb8\x9b\x02\x01\xea\xc4\xf7\xb3܁d\x05\x97\x01\x9fv\xeb\xe5\x1e\xd1c\xefF-\xa1lI\x12\x00\x80Պ\xca\x02\xe6\x17\x06k\xe3|`\x92\x0f\xe1\t\x98\x1e\xb2܇\xa6@\xa2\xb2\xcb\xc3\x10ꖤ\a\x14\x92\x00\x00\xacV\xd4\x15\xb0@\x93\xe01'R\x15\xf0R\x1cf\xaf7\x10\x12\xb0ѕ\x11\xb0\x88\xb3\xabN\xe3SH\x02\x00\xb0ZQW\xc0ps\x17}\xf5[B\x13&\x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\xf8!\xf7\xc3&\xab\xfa\x9d\fGFNݙ\xac\xb4\x8df'ƧP\xa9\xa5\xbd\x025\x85\x9eB\x0e\xb2\xd1n8w~Ж[h\xb3M\xc6\xd4\xd1Z\xd4\xd1\u007f\xba\xf8%U\xa2\xe2\xd6\xe1\xfe+\xdc#\x96\xbd\x0f\x89\x9a3\xa27\xde\x1f\xae\xd5\x11\xe1zIg\xe2w\xd8\xed\xc4\x16\xd7s\x8dÍ\\=\x96\x17k\xdc]\xdf\xff\xed\x15A\xc6\xf0s\xeeN\xe8\x1c\x97\xd1(\x06\x00 \x06\x95\x05\f{z,\xa6\xb6A\xbf\xb8C]`\xcd$1j1[G?\xd0O\x0f\x17\x85k_\xd6֓\xe6\x8d\xe8\x18Iw\xed\xd4f}z\x97\xf4\x0f\xb3\x98\xdbk\xa3\xf0k\x81P\xeex\x1aˍ\xed\t\xcd\xdd\xf8Lo|L\x12\xf7\x8d\xb7\x0f\xeb\fFA\xbf\xb0Yˋ\x06S\xb5\xfa\xb2\xb3t\x1e\xfeE\xd1\xc5Eǜ\xc1\xce\x13\xfa\x13l\x1e\x98\xac\xd8\xd8\xe9\xb2\x12\xe3\x88X\xb0U/z\xc1l\xe9'1\x00\x00\xb1\xa8-`\xc0\xc2\t\xdeб\xbeX\x8b\xa6B:y\x16\x00\x80\x10 `\xab\x98`\x87\xe1\x15\xc6\xdelX\x8c\x02\x00\x94\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 e\x01\x01\x03\x00 eQ[\xc0<]\xcd&\xcb\x00]\xf9k\xc6\xcc\x16\x946\xb3\xa5u<\xed\xe6.O\xe2\x92+¨\xb0\x88N\xda\x03awr\x13\xca#\x9b#$+\xc3\x15k\xedؓ\x91]ڛ=\x1d{\xe4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\xb0Q\x94\xacy\xf2\xa1f\xa2\xaffP5)\xb4١$I\xae\xbe\xa5g6\x97\xb1\x8ae\x19\x85)`\xb3\x9d\xddBh\xccH'$\x10\xca*\xe4\xc2\u007f\x11\xeb\t\x02\x06\x00+\x03;\x01\x1bBIf\xcb?\x8eR&iîS\xbf\xe6\xa03\x8a\xa4\x85Mc]\xc0\x0e \xf4h\xc7\xf0\x14i\x88\xd9\x03\xcbg\x9d*Q\x93\"\x83\x81\\dJ\xc3\xdc\xc6,AL\x01\x9b\xe5\x8c \xa1\a\xc6%\x10\xca\x1aS\xc0\xc4z\x82\x80\x01\xc0\xca\xc0N\xc0\x88\xc7l\xacS\xd9l\xbbU\x1b(\xdeJQz5\x19\xf4\xae\x1ce0<\xad\v\xd8t\x1ajc\xbfm\xb3\b\xd8\xf4*qZ\x8bS\x8bp\x90m\xb7\xa0d}\xf2j\x0ec\x8d\x98\x026ۙR\r\xf5\x11\xa3\x93\x85MB\x02\xb1\xac1\x05L\xac'\b\x18\x00\xac\fl\x05l\x10\xa1\x03\xea\xd6-\x1fJ\xbdDh\xc3Na\x9d\xb2ct\x89X\x15ʛ\xa1_\xfa\x904\xa1\v\x98\xacuw\xa62\xe9\xf7hw!\xdbQzD\x10\b%\x89L\xb7C(\xc9X\xe7\x15\xd3X'\x96\x80EsV\x8bJاO\xa9\r\x9f@,kl\x01\x13\xea\t\x02\x06\x00+\x03[\x01\xa3c\xac\a\xfb'\xc9\xf8\xf1l\x94\xd4M\u007fhE\xe8>E\xc1\xfaR\xe9\xaa\u0590\x84\xaa\xa7\x94\x91\xa6\x13m3\x86\x90\xd3\xe9l\xe6\u007f\xbc\x10\xb1I\xa6\x14\xd4ukZ\x95\x81\x91dT\xafhJw*j\xb2\bă\xa8P\x11\x9d\xa9R\xe36\xc0\\\xc6:\xaa\xe7\xd9=\xb0(\xce©\xa8~\x9a\xcc\x1cB\x8eq\xb1\a&\x945\xb6\x80\t\xf5\x84u`\x00\xb02\xb0\x170ҡ\xbfN'\x93=G\xa34\xec\xecU\xc9\xf7ek=\xb3n\t\xad\xcaS\xbe\xdc\x1f1\xe7\xc0\x9a\x10r\xfb\xf2\x92\x9c\x01\xb6^!OI:\xa0)OG2J\xcf\xcbDT\x05D\x81\xb8\xe4DR\xce\xeaT\xe4⦚b\x1a먞g\vX4g=\x12r\xe69QJ\x8f\xa5\xcb&\x945\xb6\x80\t\xf5\x84\x95\xf8\x00\xb02\x88C\xc0\x88| ?=)c]\x9bvOOiأ\xbe4\xa7\xef\xac\xfa5\\\xe3\x96R\xf3\x9a\xe8`\u0378\v\xd9\u007f\u007f\x86\x94\xb3\xe7\xdb)\x89\xde\xfb\v\x15\xacJ?\xa1+Ϩ?S\xca,\x19\xd0\xfc0cu\xcf\xd86\x8f\xb4JI\xc3g\x1c\xd3XC\xf5\x1ce\x12?\x9a\xb3PUfrF\xf9(\xb1\b\x98P\xd69\x04\x8c\xaf'\b\x18\x00\xac\f\xe2\x110\vz\xc3\x06\x00\x00X^@\xc0\x00\x00HX@\xc0\x00\x00HX@\xc0\x00\x00HX@\xc0\x00\x00HX\x16 `\x00\x00\x00+\x03\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x96E\x13\xb07\xf0\x8b\xd1w\xc0MK\x00\x00\xee\x12 `\x00\x00$, `\x00\x00$, `\x00\x00$, `\x00\x00$,v\x02v\x1a\xff\xfa\xbb\xe7ʼ[?&wNoY_\xf1\xe2M\xf6\xeb\x1f\x0eV\x14y\xb7\xbc\xfcO\xf6\xe5\U000fd6ca\x9f\xba\xa8\t؍\x17+\x8b6\xed\xbd\xc0yP\x04,\\\xeet\xe4w\x10\xfa\x96z5\"#9`\x04\xfc\xeeI\xd6^\x97\x98\xdcM옏\xed\x029\x84Rh8\xef>\a:\x14ݠ\x9f\x15 \xe3!\xee]\x89\"\x1d\xca\xeeC\x8a\x1fD\xe3~\xdb1\x92\xc4\xdc%\x8d\xa8_\xc7R\xd8\x01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b-\xb9\x98\xa8\xb3\xdb\x00\x00\xdcs,\xb1\x805\xa5\xba\x96~\x00\xc9f\xb7\xc7\xec\xac\x00\x00H8\x96X\xc0\x00\x00\x00\x16\x0f\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x96\xc5\x12\xb0\x1b\xc2\xc3C\x0f\xc56\x04\x00\x00X,\x16G\xc0\xee\x9c\xf2\xde4\xbf\x81\x80\x01\x00\xb0$,\x8e\x80\xdd\xd6\xdf\xcb\xca\x00\x01\x03\x00`I\x00\x01\x03\x00 aI\f\x01\xeb-\x88\x11';~\xb6\xd5\xd8Y\x00VV\xca1\x9b\xbcߌgr\x17X)\xd5\x04\x16\x80\xad\x80]{\xe1ᢍ;\u007f\xa3\xce\xd1\xdfx\xb1\xb2h\xd3^\x161\xed4~\xe3\xfb\x17+\x8a*_\xfe\x9eƄ\xa4\\֓(\x02\x16.w:\xf2i<\x9d\x16\x94\xab\xfex@x\x8d\xe1\xe4\xb6LGI\xacȰ\xb3h\xfc\xf7\x9f\x9f\f\xa3\x00\xa9EI]vvQ\xa0/\xf8B\xae\r#vv\xf3\xa5\x06\xa1fB\x03\xd5\"k\x03\x1ap\xdd\xd5\x06\x1b/+\xe7\x985%\x1d\x8e\xfa\xfb\xa2\x1c\xa8\u007f\xa3\x9a\v\xa4'Y{\xe1[r\xb7\x9d\xe9\xbcl\x17\xc8!\x94B\x0fc\x9f\x03\x1d\x8an\xd0\xcf\n\x90\xf1P̈\xca\xea;\xf0\x0e!\xf5\x1dx6\x8cp\xef\xc0S\x18Ka\x12A߁爒Aȗ\x96\xe9\x1f\xcc\x14\xa3\x00q\xd8\t\xd8\xe5b\xbci\xfb\x8f1\xfe)}\xd7\xfd\x85b\xec\xddZ\x89\xf1k\x84Ł\xac\xc0ś0\xder\x9b\x9c>\x88\xf1\xbe\x837\xf44\xad(\u05c9r=\b\x95\x132\x91\xa2E\xa8\xf6\b\xaf1\xf4e\xbeR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\x85\x83V\x03\xd2\xe1jW7n\xa5+Y\xa5Nŕ̰\x1dU\x1f\",\xa1?δ\xe4H.\u007f\x87G*\xe4\x8b\xce{\xe0\xcb{,O[\a\xc6y0\xb3h@\x88N5m\xa3\xcf3\x9a~\a\x14\xc3:\xb2C\xf9\xf7,}\x16R\x9dB\xe7\xcb\xcb9S\x9f\x85T\xfc\xb0Yy=\xb7\x18\x15\x1a垅\f\x97fd\xef\xe9HV\x8a^\xadM|\xf9\xf9,\b}\x16ґY\x1a\x12j\xc1\xd58V\xe5\x01\xc0\x1e;\x01[j.\xc5\xf1\x18\x91@`>\v\xbc\x13-Zq\xa2\x95\x17\x00\x96\x98\x95&`\xf5h\x9eapkjH\xfc\x98\x82\x10\x19SY\xf4g{\x16\x15\x100\x00\x98\x93\x15%`\xa1\xb1\xaeUҬ\x01\xde\"b\n\u0083\xdah\xc7:\x9f\xbf\xb2\x00\x01\x03\x809YQ\x02V\xae(\xca]l\xb2\xeal\xb1J\xb8We\x1e\xe3\xcf%\x87//\x00\x00QXQ\x02֔\xea\x9a\xe7\x00r^\xb0\xd9\xe21;\xab\x95C\xa2\x95\x17\x00\x96\x9c\x15%`\x00\x00\x00\xf3\x01\x04\f\x00\x80\x84\x05\x04\f\x00\x80\x84\x05\x04\f\x00\x80\x84\x05\x04\f\x00\x80\x84eq\x05L\u007f\x94hn\xeeF\\H\x00\x00~\x80\x80\x80\x01\x00\x90\xb0,\xae\x80]\xfe\xf5y;\x13\x02\x02\x06\x00\xc0\"\xb1\xb8\x02\x16\x1f `\x00\x00,\n\xf7\x8a\x80m\x9b\xcf3\xdd\x00\x00\xdc\x1b\xd8\t\xd8o\xf0\xa9\v\x95ޟ\\#\xe4Ƌ\x95E\x9b\xf6^P\u007f\xbev\xa4r\xfd\xa6}\xea+\xee\xb9\x1dt\x0e\xec\r}\x1e\xecY\xf6RC!\xd9\xe7{7\x15?u\xd1\"`\xe1r\xa7#\x9fưiA\xb9\xea\x8f\a\x84\x97\x1a\xc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+M\xc0\xea\xd1\u007fe\x01\x02\x06\x00s\xb2\xa2\x04\xac\\Q\x94\xbb\xd8d\xd5\xd9b\x95p\xaf\xca<ƟK\x0e_^\x00\x00\xa2\xb0\xa2\x04\xac)\xd55\xcf\x01\xe4\xbc`\xb3\xc5cvV+\x87D+/\x00,9+J\xc0\x00\x00\x00\xe6\x03\b\x18\x00\x00\t\v\b\x18\x00\x00\t\v\b\x18\x00\x00\t\v\b\x18\x00\x00\t\xcb\xe2\n\x98\xfe(\xd1\xdc܍\xb8\x90\x00\x00\xfc\x00\x01\x01\x03\x00 aY\\\x01\xbb\xfc\xeb\xf3v&\x04\x04\f\x00\x80Ebq\x05,>@\xc0\x00\x00X\x14\xee\x15\x01\xdb6\x9fg\xba\x01\x00\xb87\xb0\x13\xb0\xdf\xe0S\x17*\xbd?\xb9Fȍ\x17+\x8b6\xed\xbd\xa0\xfe|\xedH\xe5\xfaM\xfb\xd4W\xdcs;\xe8\x1c\xd8\x1b\xfa<س쥆B\xb2\xcf\xf7n*~\xea\xa2E\xc0\xc2\xe5NG>\x8daӂr\xd5\x1f\x0f\b/5\x8c\x870\n\x90Z\x94\xd4eg\xb7x\xf4$k\x8f\x83'wۙ\xce\xcbv\x81\x1cB)\xf4\x95\xb6}\x0et(\xbaA?+@\xc6C1\x1f\xfeT\xdf\av\b\xa9\xef\x03\xb3a\x84{\x1f\x98\xc2X\n;u\xf4}`\x8e(\x19\x84|i\x99\xfe\xc1L>V\v\x00,\n\xf6\x02\xf6\xa2\x17\xe3\xe2\xdb\xe4B1\xf6n\xad\xc4\xf85\xfa\xeby/.\xde^\x86Yl\x0f~\a\x15\xb0\u007f\xe0\"\x16|\xe8v1}\xa9\xa1\x90\xec\x14\xc6\x15[\x8b\x8av\v\x02\x96\xebD\xb9\x1e\x84\xca\t\x99HѢB{\x84\x97\x1aF\xe5\xac\x18\x97\xa3jշ\xf4\xd9g\xeeIp\xce\xc0b;\x9b\x85\x184\"\xed\xf5\xa3(v\x04\n=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x8c?\x97\x1c\xbe\xbc\x00\x00DaE\tXS\xaak\x9e\x03\xc8y\xc1f\x8b\xc7\xec\xacV\x0e\x89V^\x00XrV\x94\x80\x01\x00\x00\xcc\a\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x96\xff\x0f}\xc6-\xc8\xe3>\xf6\xcf\x00\x00\x00\x00IEND\xaeB`\x82", + "analysis/chan1.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x04\xc0\x00\x00\x02n\x08\x03\x00\x00\x00aR\x8e\x00\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x07\x0a\x07\x0f\x11\x0e\x1a\x1a\x14\x1f\x1f\x18!#\x20#$\"\x15%D$%#%'%'(&+)\x1e()'*+)/,!+-*,-+-/,02/63(241564796<9.9;8#?r@=2<>;>@=C@4DA5AB@DFCFHELH:IKHKLJNOMUP?PRORTQTVSVWU]XGWYV_ZI,`\xaeZ[Y7]\xad[]Z\\^[9a\xab;b\xace\xafac`hcQcdbAg\xb2efdCi\xb4fheDl\xb0Mj\xafqjRikhGn\xb2Ip\xb4lmkKr\xb7npmUt\xb4{s\\rtqWv\xb6tvsuwt[y\xb9\\{\xbbxzw]~\xb8e|\xb8\x84|dX\x80\xbf{}za\x7f\xbf|~{~\x80}b\x82\xbc\x7f\x81~d\x84\xbf\x81\x83\x80|\x83\x97\x83\x85\x82l\x86\xbch\x88\xc3\x90\x86hn\x88\xbej\x8a\xc4\x87\x88\x86q\x8b\xc1\x89\x8a\x87t\x8e\xc3\x97\x8doz\x8e\xbf\x8c\x8e\x8b|\x90\xc1\x8e\x90\x8dx\x92\xc8\x90\x92\x8f~\x93\xc4\x9d\x93ux\x96\xc5\x92\x94\x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x94\xe9\x8d\x07\xc7\xa7\x03\x18X\x83\xa8-`k\x8e\xc8\xa8o\x9dR\xad\x89\x196.\x0b\xaf\x8b\xaf\xbd~\xf7\xee\xed\xd3\xf3\x9f\xc5\xfdEl\x8b\xa6B\xf9\xd7\x1c\xedy\x08\x96\xd3Y\x9b\x80\x80\xbd'\xeb^\xc0\xf0\xe5\x9c%\xaca\xb1x\xfa\x85\xc9b8X6\x12\xc7\xc2\x9b\x1d\xff\x87\xf8\xd3\xe3\x9e\xb8\xc7\x80\x14\x06\x04\xec=\x01\x01S\x89'\xe2\x04\x8a\xa9xS\xfe\x80\xf5\x08\x08\xd8{!x\xb7\x01\x15\x08^\xd1_\xeb{\xd4wM\xff\xd5\x02\x17\xaa\x00\xd6\x03\x20`\xef\x05\xf3nOb@\x05\x82\xc3\xb5\x06\x9d\xa1v\x18\xf4\x0b\x88\x00\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x96\"\x0c\xd7\xbc\x96\xed{\x0b\"\xeb\xd8\x03\xc0zEm\x01\xf3t5\x9b,\x03\xbe\xa8\xa4o\xe0\x96\xe9\xd6\xc0\xca,\\>\xb9I\xb2\x86M\x08\xef\xb1-\xe9{\x17\xbf\x00\xcb_\xaf\x95\xe9k\x170S\xbc_'.\x18\xa3[X\xfci\x1a\x81\xba5\xaa\xde\x86\xb4\x0f\x1eC\x1c\x00R\x0d\x95\x05l\x9a\xb7:\xdd\xce6\xba\x8a\xa1$\xe9kj\xa3\xc9\xa6\x95Q\xb0\xc1\xd0Z\xcb\x12vm\xb9~$}\xf1\x97s\xfaP\xe7Eai\xaaGO\x12\xd9\xdd\xe1\xec\xf6N\xae\xc3n\xdf}'\xae\x8d\xac\x86N\x16\xc8G\x9ek\xddx\x15\x03\xc0\xfaFe\x01s\xb1\xb5\xef}\xbcS\x96\xb4Y\xe82N\xf3\x16[\x92\xd2\xcbD(du\x04/\xba\x8a\x03\x8b\xd7\xaf\x1f\xb8N\x1cd\xf1Zq\x8d4@E\x0c\x1d:q!d}L\x20\xcb0\xd2\x1a^\xe8\x1a\x15r\xcfh\x12\xac\x7f\x0a\x00\xeb\x01\x95\x05L\x88\x94\xe8\xe5=\xb2d\x8f\xe0\xceiO\x14\xdbv\x19\x89\x150\xd7\xd2\"\x09F\x16\xee\x97G\xd8\x89a\xee\x85(`/\xe2\x04S\xc2\xf2\x1a\xae\x18f\x15r}\xd9\x15\x18\x00\xd65j\x0b\x18a\xc6m\xb1\x06dIoS\xaf\xd7\xef\xb55y\x13\x17\\\x06<\xe5\xd9Y\x07\xc4!dSAFn5QU\xbfVXu\xb9Z\x96;\xbe\x11\xa13\xae\xf2\xad\xe9{d\x8b~\xbe\xbd`\xd0\x1d>KC\"\xcd\x95\x09n\xad\x9b4r\xab@\x0d\xb5\x08\xde\xaf)\xae\xbcI\x04\xe8\x99\x8e\xe3\xbeyq\xf1\xa8\xbe\x96\x06s\x8d\x84\xa2\x08\x1b`l\xaf=\xac+\xab=\x1c\x94\xd7\x80\xe7\x8a\x85\x0e\x98<\x97t\xc1\xd2g0\x00\xacgT\x170/\xcf\xf3f_Tr\xa6\x9b$\xbb\xd4\xbf\x1b]\x99\xb9\xe6\xf6_\x20\x0dMW\xa4\x1d\xb7^\xd5\xe6\x13=}hkAu6\x9bG\x96;ci\xde\x9a\x9b\x99S]\x8ed\xe3\xb6a\xee\xabG}g9\xb6\x92;\x8b\x1a\xddL\x83i813\xa6\x01\xb8X`\xe7\xf0\x10R\x96\x9b\x8fv\xf9\xc4\x91o\x98\xd9>\xd2u\x0a\x9e8\xcfv\x94\x86\x90\xc3\xcc\xfd\xfeX\x88\x16V\xc5\x9d~\x8b\x83\xc2\x9a\xee!\x01\x93\x18t\x1e\xa2}\xb3\xce\x92\xe80\xaf#\\H\xb2\xe4CS7\xba\x85\x01`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fB\xa5\x96\xf6\x0a\xd4\x14z\x0a9\xc8\xba\x83\xe1\xdc\xf9A[n\xa1\xcd\x16\x1d\xc0\xa3\x95\xbb\xd0y\xbb\x8a\x0c\xfb&\xc4\xa7\x90\x13\x82\xd4\xb4\x16u\xf4\x9f.\xa6=\xa5\xc6\xdd\xf5\xfd\xdf^!\x9a\xf3\xeeO\xec\x19\xa2\xe8\xcez\xda\xc9u\x08a\xaa\xc3\x06\xa4\xb2\xe2\xd6\xe1\xfe+\xdc#y\x0d\x18?\xe7B3\xf6\xa5\xb9\x97\xd1(\x06\x80u\x8d\xca\x02\x86==\x16S\xdb\xa0?*\xe9\x1fj3\xb7\x0d\xf9\x13\x17]\x0e\\\xfb\xb2\xb6\x9e4oD\xc7H\xbak\xa76\xeb\xd3\xbb\xe4b\xb2\x98\xdbk\xa3\x93Y\x84r\xc7\xd3Xnt\x9f'\xd8QYt\xa8\xfe~\xa5\xce8W\"\xfc\xbaQx`8w\xe33\xbdQ\x10\xa8\xb1\xd3e%F\xd2\xb5z&\xf8\xbajY\xe6l1I\x0a\xbf:\x0a\x1b\xe0\xfb\xc6\xdb\x87u\x06\xe3\xa3\xe8\x1a\x88n\xe9E/\x98$\xd7\x96~\x12\x03\xc0\xfaFm\x01\x03\x96D\xf0\x86\xae/*\xabES\xa1\xfa\xb4\x13\x00Xe\x80\x80\xa5\x06\xc1\x0e\xc3+Y\x867\x1b\x16\xa3\x00\x00\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x10\xb0UG{\x81\xfa\xd1\x99\"x\x0b\xda\x93\x99\x00\xc0\xaaAm\x01\xf3t5\x9b,\x03\xbe\xa8d`\xbc\xdd\xd4\xe6L\\r\x859\x86\xd2,\xc9l\x16L'\xc7E/.\x11\xa6\x01\x9d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x20I\x03@\x8a\xa0\xba\x80a\xaf\xc7\xc1B\x119\xa9\x8c\x09\x02\xd64\xc4\x8e\x0c5%,\xb8\x0c\xb4\x20\xd2\x85\xf9\x9a\x05t\xedb}\xad.\xc4zU\x92!$\x85\xdd\xeeVD]\xeaC4huy\x96\x87$\xabc\x05l\xb2N\x88p4=)\x20_\x1b\xdap\x11\x8fp\xc3\xf8\xe2W\x18\xcf\xf6\x91nV\xf0\xc4y\x9aM\x04\xac\xa3\x88E\xe9\x1e\xe6\xee\x93\xd7\xc7\xc2cIk(H\xf7L\xce\x1e?\x8d?GgTh\xb6\x90\xd7\x0a-I\xf9,\xf4[\xe0\x13\x1a\x87\x17k\xb2H\xef\xab\\\x8b\xe5h\xf2H\x97j&\xb7@\xd66Y3e\x02\xe6F\xb70\x00\xa4\x18\xea\x0b\x18\xa67c7\xf5x\x05\x02\x01wS\x80\xf4h\xda\x84`\xd6\xbdmI\xca}pNe\x91\x17\x17\xa2=\xbf\x8aOXN\xde\x11\xfa*\x11\xb0K\x83\xd6\x82t*%\xa5\xdb\xfc\xf3\x84\x9c\x0a\x1c\xc8`\xb3\x1b\x9c\xb1\x02&2\x89B\xc8\x86u\x86>\"N\xb3,D$~\xd5Y{\xb4\x84\x13CD\xb6rL\xbfp\xfd\xd1\xb9w\x04\xc3\x15\xba\xd3\x1e\x12\xb0\xbb(\xb2\xd0\xb3\x86:\xaa\xceih\xd2{}\xcf\xb6L$\x84\x88<\x12\xce\x95\xa0\xf9\x82\xbe^G^i\xdbd\xcd\x8c\x12\xb0\x16\x0c\x00)\x86\xca\x02\xe6\x17\x1e4\x8e\xf3\x81I>\x84\x07\xf7\x08\xb3\xc1\xda{\x12\x15]\x0e.\x93\xbb\x9btGh\x0f\xec\xd3},go\x01}\x95;\xf1}i\xd4\xb3\xb5]\xd4\xa4\xfd\xe4VgJ\xeb\x8b+`\xd8f\x15\xb0\xc9r\x0d#\xf8\xb1N\x88q\xfb\xf8\xd0\xe1\xc6~\xfbi1HwI\xe5y6j<\xc1\x09\x9c\xa5;\x83!q\xb9\x8c\"\xce)\x16\xb8\x9b\xc5\xa2\x1d\xda\x92\xf3y\x9bm\xe7vy\xae\x14\xc1\x89oC\xa3\xd2\xb6\xc9\x9a)\x13\xb0!4\x80\x01\x20\xc5PW\xc0\x02M\x82_\xe7\xa1)\x10\xf0R\x1cf\xaf7\x80\x9d<\x1d\x0e\x85&W\xa8\x88;m\xaf{<\xb7\x80\xaaj\xc56\x96\xb35\xd2\x03\xa3\xf3\xd2\x04'~&\x15\x88\xf2m\xa3\x0c/\x0e\x08\xa1\xad\x1d\xf1\x05L\x19I\x90\xee\xca\x1a\xea\xa9\xbf\x20\x0a\xd8\xd4\x8b\x92\x0e\x9a\xaa?\xfa\x84\xf1\x8a\xee\xf84\xe2,\xd6\x1eI\x9c\xd9H0\xed\xbc\x02\xfa\x9e\x1d\x88\x1f\xa4\x1bkhTolB>i\xdbd\xcd\x94\x09X\x9df9\x1f\xb5\x02\xc0\xb2\xa0\xae\x80\xe1f\xaa\x07d\x08\x19\xeaky\xc4y`T\xd7z\xd5\x9f\x076\x8a\xb6\x20\xb4\xd3C\x93V6\x82jA\xac3XX\x88\xf14\xb2\x84\x04lK\xf5x\x1d\xe9\xa8\xb1\x99\xed_\x10\xb1(\xd5R\x7fTy\xac\x80\xb9\x1b&\xa3\xb3$H\x04\xec\xf0\x05\xb2\x1f\xac\x12\x87\x90\x18\x8f\xe8\xa8\x0f\x7fL\xf0~5\xdef\xe6\xa5\xdb\x84\xf7\xc3\x97]H\x9f\x05\x1c\xa7z\x14\x91\xaa\x1c\xea\xb3\x0flO$`9\xd4u\x96W(k\x9b\xac\x99R\x01\x0b\xe4%\x88/\x0e\x00\xab\x14\x95\x05\xcc\xc5w;\xddN\x8b8\x13?\xe0q\x98=T\x0b\xdc\xa6\xde\xc9\xde\x15\x98\x89?\xaa\xe9\xb1\xda<\x82N\x94\xa7\x9d\xb2\x9eJ\x13\x1e\xcf\x9d\xd3\\j\xd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c2\xc7\x1d\xf5\xae\x9b6G\xbb\x9a\xc6\xd3\xd8\x93\xa2\xf8_\x9aq\x1a\x84_]9\xac?\xfd\x98\x09X\xf8=\xc3qZ,\xbd2[\xfaI\xa5\xd3Lo<8>\x1d\xc0\xab\x1e\xb5\x05l\xfd!\x9d\xaa\xbf\x9a\x09\xde\xd0\xf5\xe1\x95\xa6ZcIf\xa2\xc4\x12\x8b\x89\xac\xe4'\xd4\x8e>\xe8\xb7\xb6\xe0\xc4_\x0c-\x9a\x8a\x98\xa9\x8f\x8c\xf6<\x04\xcb\xe9\x00+{{,\x8a`\x87\xe1U2\x9be\xe7r\xce\x92\x1c\x09K,&\xb0r\x9fP\xc0\x9c\x15\xe3s}/\x16-`\xde\xec\xf8\xcf\xdd\xa7\xc7=q\x8f\xad\x1a@\xc0\x96\x9b\x95\xbb=\x80\x85\xb1r\x9f\x90G[\x1dw\xe2\xe1\x92X\xb4\x80\xa5<\x20`\xcb\xcb\xf7\xcc\x19\x9c\xcc\x0aX9\xd6\xd2'\xf4b\x84\xbb\xf9\xa75\xd2\x96\x05\x02\x02\xb6\xbc0gp\x825\xff\x80\x95f-}B\xc65\xd4\x96\x05\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x96j\x04\x02\xf3\x01\xfa\x97\xcc\x0e\x00\xd6\x01\x20`)\x86kG^\xde\xdeO\xf2\xf2\xaa?\xe8o\xe8\x00\x205\x01\x01K-\xe65hg\xe1G\x19;wl\xf8W\x85P2\x00\xb0\xceP[\xc0<]\xcd&\xcb@\xa8\xf7\xe0\xe0\x85\xd0\x01>\x9b\xc5\xd4>\xae\xfc\xab\xf8\xb5\xc8\xd2\xc3\xc3\xfb>\xae\xfb\xdb\xdf\x9c\xff\xdf\xdf\xfe\xef\xc7\xfb\xbc\xc9l\x01`\xcd\xa3\xb2\x80M\xf3V\xa7\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\xed\xff~\xbc\x1f~\x9b\x0d\x00\x20`\xa9\x85\x0f\xa1\x9d;?\xde\xb2s\xc7\x86\x0a\x98\x96\x0a\x00\x20`\xa9\xc5\xbc-'++7++k\xd7\xd0\x9a\x99\xf6\x0b\x00K\x06\x04,\xc5\xf0{&]\x93\x93.\x97\x1bF\x90\x00\x00\x02\x96r@\\H\x00\x08\x03\x02\x06\x00@\xca\x02\x02\x06\x00@\xca\x02\x02\x96\xfalXq\x92]!\x00,\x13\x20`\xa9\xcf\x867+\x0c\x08\x18\xb0R\x80\x80\xa5>\x20`\xc0\xbaEm\x01\xf3t5\x9b,\x03\xa1)\x00\x0eq\x05\x1dy.\xb08@\xc0\x80u\x8b\xca\x026\xcd[\x9dng\x9b\xb8\xa0\xa1\xcf4\xd0\x14\x9b\x0b(\xf2\xf6/\xf1\x8e\x80\x80\x01\xeb\x16\x95\x05\xcc\xc5B\x0f\xf9\xc4\x00\x1e\xd6\x1ewSl.\xa0@\xf0^\xc9\xe9x\xc7$\x02\xb6`-[\xb0\xe1\x9b\x05\xd8\x82\x80\x01+\x85\xca\x02\xc6\x02\x16b\xaf\x10\x89\xc8a\xf6\x89k\xe2Ks\x01\x05\xa6j\xb8\xb3\xdf\xc7;\x08\x02\x06\xac[\xd4\x160\xc2\x8c\xdbbe\x91\x88L.I`\xdbP\xee\x1a`~\xcb\xa6/r\xb2{\x8fg\x15Ra\xb6\xed\xc9\xd9\xa4\xdd\xbb\x95\x1e\xf0\x96ksN\x9e\xd4n\x8e^\xfb\xdf\xbc\x85\xa7\x1bw\xa6\x18\xfe,3*B&\x0d\xe91,\xcfz\xa6\xe3\xb8o^\\<\xaa\xaf}\x07\x02\x06\xac_T\x170/\xcf\xf3f\xd6\xe3\xb2vG\"sGr\xd7\x02\xbd\x99\xa8z\x17\xd26l\xb9L\xe3a\x1f\xb9\xd5\xcdk\xd1<\xc6\xfe\xbc\xec\xaf\xcfi\xd2M\xbf\xb8\x1ce\xbf\x1f\xed\xa1\x1b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xff\x07\xf6'\xf0\xb3\xd0\x102\xf4J\x95\xed\xdf\x15\x05\xec\xef\x7f\xfdFj\x1b\xa92<\x84\xa4\xb0\xb3F_.\x00\xa8\x84\xca\x02\xe6\xe2\xbb\x9dng\xc8]\x1f\xf08\xcc\x1eotn\xea\xe3\xcc\xba\xeck\xd94\xee+\xdd\xe9&\x02\xb6\xf9\x9c\xb5\xad\x02\x91N\xe6\xa8\xa6\xc7j\xf3(t\xc0\xf6\x89\xb1\xb4\x131e\xbc\x80%\xbc\xfb\x93\xbd\xd2h\xb7\xb3\xe0\x1fD`\xfe\xcb\xef\xbe\xfb\xee\xd7?\x95\xa8\xcf\xff\x099\xda\xdf\xfcj\xc3\xaf\xd8\x9f\x00\xc9\x13\x9c\xf8!\xc3\x9f\xfe\xea\xbb\xdf\xffXQ\xc0~\xf7\xf1\xbf\xfd\xf9\xbb\xdf\xfd\xd7\xb0\x80\x85\xab\x0c;\xf1\xc3gU\xbed\x00XvT\x160\xec\xe9\xb1\x98\xda\x06\xc5i\x02\x1e\xea\x02k\x8e\xceMy\x02\xa4\xa3\xd5\x9c\x892,\x08\xed\xc7M\x85u9\x9b\xb2\x0b\xe9\x20y@C\x1d\xf4\x9b\x0ac\x9c`f-\xafPMB\x9e\x09\x8f#ki\x9a\x08\xcco\x7f\xf6\xd1\xc7?\xff\x83D}\xde\xfc\xfa\xc7\x1f\xb19\x0fo~\xbf\xe1\x0fo\xfe\xc0<\xf3\x82\x0c\xfd\xddGt\x0aD\xd8\xf0\xf7?\xfd\xe8G\xbfV\x14\xb07\xbf\xfb\xd9G\x1f\xfd\xecwa\x01\x0bW\xb9\x81&\xe84\x8a\xf0Y\x93]-\x00,\x13j\x0b\xd8:\xc6\xbb\xf9\x98w~\xde7t\x20\xeb\x03\xf74C\x02\xa3\x161\xe7\x03\x01\x03V\x0a\x100\xd5h\xcf\x12F\x8f\x01\xed\xdd$\x96\x8b\x04\x04\x0cX\xb7\x80\x80\xa9\xc6h\x9a0vt\xa4=Lb\xb9H@\xc0\x80u\x0b\x08\x98j\x04*\xd2\x8f\xb5\xf4\xb6\x1cK\xafHf\xb9H\xd4\x16\xb0\x18@\xc0\x80\x95\x02\x04LE\xac{\xb25\xd9{\xac\xc9\xcc\x16\x0b\x08\x18\xb0n\x01\x01K}\x92\x85\xdcX~\x92]!\x00,\x13\x20`\x00\x00\xa4,\x20`\x00\x00\xa4,\x20`\x00\x00\xa4,\x20`\x00\x00\xa4,\x20`\x00\x00\xa4,\x20`@\"\xfc333\xf3\x18\xcf\x93\xcdZ\xf9\xa9*\xb0\x96\x00\x01\x03\x120\x90\x86\x10J\xf7\xf9\xd2\xc9&-j\x9dE\x00Xy@\xc0\x00\x05\x86k^\xb3\xad\x05Y\x87\x86\x1c\x18;\x86\x86\xac(:\x98\xd2Bi/\xf0&3!x\x0b\xda\x15\x92\x00\x90\x10\xb5\x05\xcc\xd3\xd5l\xb2\x0c\x84\x96cp\xf0\xe1i\xe9\x92$\xf0\x01\xf8\x8a\xe3:\xc8\xa6\x83\xe3\xbe\x8a:2v(*D[,w\xb8Va\x15~Kdy~\xb7\x20`\xc7P\xda\"\x85\xac\x01\x9dKf\xc2hHkPH\x02@\"T\x16\xb0i\xde\xeat;\xdb\xc4\xa5\x0b}\xa6\x81PT\"I\x12\xf8\x10\xbc,\xbe\xf3\x03\xd9\xfcp\xa7\xf8e\xd4\x91\xe1\xe2~1\xf5\xe8\x09V\xa4\x93\xbb/\xa6b\x05\xccc\xdbT\xa7X\xa8wT1\x1b\xff&\xcd\xac|\x20\x06\xeb\xc6\xab\x0aI\x00H\x80\xca\x02\xe6\xe2\xe9\x0d\xe1\xe3\x9dl\xcf\xda\xe3\x0e\xa9\x96$\x09|\x10N\xdcc\x9b{'b\x8e\x04C\x89\x1a\xd9\"\xafa^\xe8\x1aC\xc9X\x01\xc3X\xa3,`;J\x15\xb3'5\xa7\x14\xf3\x958\xa3q+$\x01\x20>*\x0b\x18f]//\xef\xa1\x1b\x87\xd9\x17\x8a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ff\x19\xe9\x11\xb6h*B\x13x%I\x00H\x04\x08\xd8r0#\xce\xd7b\x93\xc9\x03\xe6\xacc\xc9\x0a\xac2\x82\x1d\x06aR\xec\xfc\xf8Ph9\x9d\xa1q%M\xb1h\x93+\xcd\xe5\x1c\xf9\xbc\xb5\x08\xfd%\xc2\xe81X6\x82\xbd\xd9\xe1\x15($I\x00H\x08\x08\xd8rP(\xce$`\x8en\x8f\xb6z\x8d.fZ\xd7\x8bw-l\xa9\x9c\x89'\xb4\x8b\x00\x00\x20\x00IDAT8<\x11'PLqO\x93X\x02\x80\"\x20`\xcb\x81K\x9c\xaf\xe5Jf\x98\xd2\xf8P\xfe\xb1E\xfcT[\x81\xe0\x15\xfd\xb5\xbeG}\xd7\xf4_\x051\x00,\x01\x100`\xc9\x9c\xdb\xbc\xd3\x99\xcc&1\xc1\xe1Z\x83\xceP;\x0c\xfa\x05,\x0d\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x100\x00\x00R\x16\x10\xb0u\xc9\xbaY\xb7\x08X\xe3\x80\x80\xad?<\x15[\x84\xd5\x06\x01\x20\xd5\x01\x01[w\x04\xf2\xf2\xf8\x9eD+W\x03@\xca\xa0\xb6\x80y\xba\x9aM\x96\x81\xd0\xefO\x1c\xbc\x95nf\xcclAi\xf3Z\xfa\xc9`\xb7\xd6\x1aJz\x8fmI\xdf\xfb^\x836k\x96\x15/\x94\xd0\x89\x8f\x20\x842\x94~\xcb4\x8e\xba\x14r\x01\x20\x15QY\xc0\xa6y\xab\xd3\xedl\x13\x174\xf4\x99\x06\xd8\xaaw>\xfe\xa1\x87\xb0\xa6\xd63\xb4f\xdc\x0a%wm\xb9~$\xfd\xbd~3\xf89\xfa<\x99I\x98\xd0\x89\xdd6\xdb\xd7\x8a\xa1\xc9\x86\x90|I}\x00H]T\x160\x17O\xc7.>^\xf8\x09\x9d\xb5\xc7-\x0a\xd8\x1a\x1c\xd1\x84\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\xb4xgV\x8b\xa6\x02\xbe\xf9\xd6/\x20`\x80H\xb0\xc3\xf0*\x99\xcd{\xc0z^~W\x82g\x8f\x01s\xd6\xb1\xf8G\xe3\xe0\xcd\x86\xc5(\xd63\x20`\xc0j\xc1\xa3\xad\x86\xa9\xcc\xc0\xe2\x00\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01[\x0eJ\x91\xb6\x1cb\xc4\x01\xc0\xb2\x03\x02\xb6\x1cxz\xcdy\xda\xc5\xff.\x19\x00\x80\xc5\xa1\xb6\x80y\xba\x9aM\x96\x81\xd0\xbd\xed\xe0\xe9\"\xac\xf3M\xe2\xe2\xd2\xcd\x89J\xa6\x18\xbdh<\x99\x09\x00\x00\xef\x89\xca\x026\xcd[\x9dng\x9b\xb8\xa0\xa1\xcf4@\x17\xc0\x9b\xe1G=\x84\x07\xfcZ\xba\xe5\x87\x20\xd4\x17\x00,;*\x0b\x98\x8b\xa7\xab\xaa\xf8x\xc1Ad\xedq\xb3\x15<\x1d,(Q\xd3\x9a\x8a\xcc\x00\x02\x06\x00\xcb\x8f\xca\x02&\x04\x16\xf4\xf2\x1e\xbaq\x98}\xc2\x9a\xf8\x8c\xbb\xb7\xd6\xd4\xbat\x20`\x00\xb0\xfc\xa8-`\x84\x19\xb7\xc5J\x97\xb5\xf3\x99\\8\"`N~:A\x99\xd4c\x1c-(\xee!\x00\x00\xef\x81\xea\x02\xe6\xe5y\xde\xcc\xfaa\xd6n,\x11\xb0p\xa0\xa25\x82_[0\xe0^P\xe8C\x00\x00\x96\x8a\xea\x02\x86\xbd\x1e\x07\x8bJ\xe4\xa42\x16\x1607/\x09\xfc\xbc&\xb8\x8b\x10\xda\x97\xcc\x08\x00\x80\xf7A}\x01\xc34.d7\x19@:\x03\x81\x80\xbb)\x20\xf4R\xba-I\xca\xa4\x1a>\xed\xd6\xcb=kM\x94\x01`\x95\xa1\xb2\x80\xf9\x05\xb9\x1a\xe7\x03\x93|\x08\x0f\xcd1?HP*\x15\x19B\xdd\xc9L\x00\x00xO\xd4\x15\xb0@\x93\xe0\xd9~h\x0a\x04\xbc\x14\x87\xd9\xeb\xa5\x9a\xe6]s#Hx\x0a\x09\x00\xcb\x8f\xba\x02\x86\x9b\xbb\xe8\xab?\xec\xb1\x0f\xf9\xc0&\xf9\xb5\xf6\xc3\x1b\x100\x00X~T\x160\x17\xdf\xedt;-\xe2L\xfc\x80\xc7a\xf6xi\xca\xc9\xaf\xb5\x80Z\x83\x20`\x00\xb0\xec\xa8,`\xd8\xd3c1\xb5\x0d\x8aj\xe5\x09\xff\x00\xd2}+A\x99\xd4\xc3\xef\x19-\xd5x\x92Y\x01\x00\xf0\x9e\xa8-`\xeb\x83\xfd\x08mmOf\x04\x00\xc0\xfb\x02\x02\xb6\x1cxF\xd7\xda3\x09\x00X\x95\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\x80\x80\x01\x00\x90\xb2\xaco\x01+E\xdarg2#\x00\x00V+\xeb[\xc0<\xbd\xe6<\xad\xb0\xb4\x8f\xb7\x20\xfc\xebkI\x12\x00\x80\xd5\x8c\xda\x02\xe6\xe9j6Y\x06B\xab\x17:x+\xdb\xfa\x06n\x99n\x0d\xac\xc8\x9a\x86\xbdH\x8c\x07\xde\x90\xd6\x10\xca\x93$\x01\x00X\xc5\xa8,`\xd3\xbc\xd5\xe9v\xb6\x89\x0b\x1a\xfaL\x03lEV_S\x1b\xcdmZ\x09\x05\x8b\xac\x9cj\xddx\x15\xc7&\x01\x00X\xbd\xa8,`.\xb6\xf6\xbd\x8f\x17\x1cO\xd6\x1e7\x130\x9b\x85\x06\xe5\x9e\xb7\xd8\x12\x94\\.$K?\x9f\xd1\xb8\x15\x92\x00\x00\xacZT\x160\xcc:Y^!\x12\x91\xc3\xec\x13\xd6\xc4\xef\x11|N\xed+\x11\xdbV\"`\xbe\xec\x0a\x85$\x00\x00\xab\x16\xb5\x05\x8c0\xe3\xb6Xi$\"\x9f\xc9%\x06\xf5\xf06\xf5z\xfd^[\x937I\xc9\xe5`\x1c\xf5\x86\xd3g\xd2g\x14\x92\x00\x00\xacVT\x170/\xcf\xf3f\xd6\x0f\xb3v\x87\xa3\x12\xcdt\x93\xdc\xae\x15\x91\x0c\xbf\xb6`\xc0-D\xab\xc4\x03\x91\xde\xd8\x00\xc4\xe4\x00\x80\xd5\x8f\xea\x02\x86\xbd\x1e\x07\x8bJ\xe4\xa42&\x08\x98\xbf\xdb\xe2\xf48-\xdd\xf3\xc9\xca.\x07w\x11B\xfb\x84\xa4\x1b\xdd\x0a\xe5J\x92\x00\x00\xacV\xd4\x170L\xe3Bv\x93\x01\xa43\x10\x08\xb8\x9b\x02\x01\xea\xc4\xf7\xb3\xdc\x81d\x05\x97\x01\x9fv\xeb\xe5\x1e\xd1c\xefF-\xa1lI\x12\x00\x80\xd5\x8a\xca\x02\xe6\x17\x06k\xe3|`\x92\x0f\xe1\x09\x98\x1e\xb2\xdc\x87\xa6@\xa2\xb2\xcb\xc3\x10\xea\x96\xa4\x07\x14\x92\x00\x00\xacV\xd4\x15\xb0@\x93\xe01'R\x15\xf0R\x1cf\xaf7\x10\x12\xb0\xd1\x95\x11\xb0\x88\xb3\xabN\xe3SH\x02\x00\xb0ZQW\xc0ps\x17}\xf5[B\x13&\xc4i\x14\xe2\x10r\x85\xa7Q\x04\xf2\xf6*$\x01\x00X\xb5\xa8,`.\xbe\xdb\xe9vZ\xc4\x99\xf8\x01\x8f\xc3\xec\xf1b<\xd3bq\xb8\x1d\x96\x96\x95x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\x1f-!)6&x\xbf\x1ao3\x9b\x0b\x95\xe1\xbe\\\x20o/\x06\x00\x20\x06\x95\x05\xcc\xc5w;\xddN\x8b8\x13?\xe0q\x98=TB\xf8!\xf7\xc3&\xab\xfa\x9d\x0cGFN\xdd\x99\xac\xb4\x8df'\xc6\xa7P\xa9\xa5\xbd\x025\x85\x9eB\x0e\xb2\xd1n8w~\xd0\x96[h\xb3M\xc6\xd4\xd1Z\xd4\xd1\x7f\xba\xf8%U\xa2\xe2\xd6\xe1\xfe+\xdc#\x96\xbd\x0f\x89\x9a3\xa27\xde\x1f\xae\xd5\x11\xe1zIg\xe2w\xd8\xed\xc4\x16\xd7s\x8d\xc3\x8d\\=\x96\x17k\xdc]\xdf\xff\xed\x15A\xc6\xf0s\xeeN\xe8\x1c\x97\xd1(\x06\x00\x20\x06\x95\x05\x0c{z,\xa6\xb6A\xbf\xb8C]`\xcd$1j1[G?\xd0O\x0f\x17\x85k_\xd6\xd6\x93\xe6\x8d\xe8\x18Iw\xed\xd4f}z\x97\xf4\x0f\xb3\x98\xdbk\xa3\xf0k\x81P\xeex\x1a\xcb\x8d\xed\x09\xcd\xdd\xf8Lo|L\x12\xf7\x8d\xb7\x0f\xeb\x0cFA\xbf\xb0Y\xcb\x8b\x06S\xb5\xfa\xb2\xb3t\x1e\xfeE\xd1\xc5E\xc7\x9c\xc1\xce\x13\xfa\x13l\x1e\x98\xac\xd8\xd8\xe9\xb2\x12\xe3\x88X\xb0U/z\xc1l\xe9'1\x00\x00\xb1\xa8-`\xc0\xc2\x09\xde\xd0\xb1\xbeX\x8b\xa6B:y\x16\x00\x80\x10\x20`\xab\x98`\x87\xe1\x15\xc6\xdelX\x8c\x02\x00\x94\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20e\x01\x01\x03\x00\x20eQ[\xc0<]\xcd&\xcb\x00]\xf9k\xc6\xcc\x16\x946\xb3\xa5u<\xed\xe6.O\xe2\x92+\xc2\xa8\xb0\x88N\xda\x03awr\x13\xca#\x9b#$+\xc3\x15k\xed\xd8\x93\x91]\xda\x9b=\x1d{\xe4C\xe1.\xcf\xc9\xf8\xa4N\xfd\x85\xd3\x00`u\xa2\xb2\x80M\xf3V\xa7\xdb\xd9F\x174\xf4\xf1\x0f=\x04\xb6X\xb3\xdbds\xd9L\xab0\xfa\xf4\xfc\xa0\xedkt\xd9\x16Z\xc0\x0c\x0f\xb2\xe5\xa7\xdd6\x92\x1b\x1b\xe7\xac+c\x07\xdf\xb2\x1d!g\xcc\x91\x0f\x85k\xf3'\x97\xac_d~\x02\x0a\x06\x00\x0c\x95\x05\xcc\xc5S\x95\xf2\xf1N\xfa\x12\x16\xac@3\x0dY1\xd0\xbc\x12K\x1a&eH&U\xa1(\xdeC\xb1\x02\xe6\xcd\xdcOt\xce\xb7m\x19\x05l\xffV\x1a\xdf\xd6\x99\xf1E2C\x00X\x1f\xa8,`BTE/\x0d\xdf!\x110\xa7\x89\xde\x97>\xd3\xf2\xdd\xf9\xef\xc1\x82\x05\xecT:\x1b;^B\x0a\x83\xcb\x0fD\xdeV\xb69\xa0\x18\x1e\x09\x00\xd6\x1fj\x0b\x18a\xc6m\xb1\x06d\x02\xd6s\x97m\xee\xaa\x1c\xd5c~\xcb\xa6/r\xb2{\x8fg\x15\xd2\x11\xed\xc1lM\xce\xbeq\x92\xed\xdc\x88\xd0>\x9c\x83P\x16\x1b8\x86\xa5\xcaS\x9e\x9du\x80\x0d!\xa5\xb9\xb8\xa9\x20#\xf7\xffo\xef\xfcc\xe28\xee\xfe\xff\xfdg\x10\xac\x8c\x0eN\x1cB:\xa4\x039\x08\x13Y\xc9`|',\x1cS\x041\x17\xd1`\x93\xafj\xe3\x1f(\xa9\x12\xfb,\x13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eWnD\x13\xb0h\xcezSQZ\x9e\xe2\xac\x87\x88\x09\xf8\xb2\x8a\xb9\x88Y\xf2\xf5\x04\x01\x03\x80\x95\x81\x9d\x80\xad\x13F\x8dY\xa8\x996l\xe4Q:Y#Nt\\\xe9\x97\xa4\xa3\xda[\x84\x0c:Q\x17\x15\xb0$Ow\xff+\xa4\x1f\xa5~\xa8X\x0f\xa6\xa1\xc3\xc6@\x8f)\xcbH\x12\x0a(j\xd0)\xa1\x16\xd5\x8f\xd2!\xea\x91P;!\x1bP\xdd\xb4\xb2?\x1d\xf5\x1a\x99\xc56\xd60\x86\x90({H\xe9H\xa5\xd0\xf2\xb0l\xa28\xbb\x9a\x86\xea\"d\xe6\x00Z5!&\x10\xca*\xe4\"|\x11\xea\xa9\x0aXG\xe3\x20\x01\x00`9\xb1\x13\xb0<\xb4\xc7\xfa\xad\x95\x8e\xdb\x14N\x207\x1d\xc7\xf9\x88\xfa\xc5C\x05\x0c\x85\xe8\x97\x1dZ\xa2\x1dT\xfdx\x01+\xd1&\x8f\xdaPF\x84\xfaa\xd6U\xb4+\xe7V}6\x95\xf7\x19\x99\xc56\xd60\x05L\xdbU\xade\x13\xc5\xd9\x1e\xb4\x8e}\x16\xa061\x81PV!\x17\xe1\x8bPO\x98\x03\x03\x80\x95\x81\x9d\x80\xadF\xf5\xdc\xb7|\xb4\x8b6\xec5\xecKDR\x1ax\x16\xeaV\xbf$\xa1\xb0\"`n\xd5.\xa2\x8e\xf3\xeaiC\xe7\x04,\x92\x8a\x86\xd4\xfdi(\xa8\xf8\xc9a_\x9aP)!\x85(?8Mx\xe60\xd6-t\x01\xcb\xd5v=\xa4\x09\xd8lg$\x07\x9dd\x9fcW-\x09\x84\xb2\x0a\xb9\x08_\x84z\x82\x80\x01\xc0\xca\xc0N\xc06\x08\x13=\xd9\xa8\x816\xec]\xea\xb7\\\xd47\x85Pn>#\x05\xf5+\x02\xb6N3\x8c\x04\xdb\x03\xa5n\x846\x0b\x02\x16FH\x9b\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xa3c\xac\x07\xfb'\xc9\xf8\xf1l\x94\xd4M\x7fhE\xe8>E\xc1\xfaR\xe9\xaa\xd6\x90\x84\xaa\xa7\x94\x91\xa6\x13m3\x86\x90\xd3\xe9l\xe6\x7f\xbc\x10\xb1I\xa6\x14\xd4ukZ\x95\x81\x91dT\xafhJw*j\xb2\x08\xc4\x83\xa8P\x11\x9d\xa9R\xe36\xc0\\\xc6:\xaa\xe7\xd9=\xb0(\xce\xc2\xa9\xa8~\x9a\xcc\x1cB\x8eq\xb1\x07&\x945\xb6\x80\x09\xf5\x84u`\x00\xb02\xb0\x170\xd2\xa1\xbfN'\x93=G\xa34\xec\xecU\xc9\xf7ek=\xb3n\x09\xad\xcaS\xbe\xdc\x1f1\xe7\xc0\x9a\x10r\xfb\xf2\x92\x9c\x01\xb6^!OI:\xa0)OG2J\xcf\xcbDT\x05D\x81\xb8\xe4DR\xce\xeaT\xe4\xe2\xa6\x9ab\x1a\xeb\xa8\x9eg\x0bX4g=\x12r\xe69QJ\x8f\xa5\xcb&\x945\xb6\x80\x09\xf5\x84\x95\xf8\x00\xb02\x88C\xc0\x88|\x20?=)c]\x9bvOOi\xd8\xa3\xbe4\xa7\xef\xac\xfa5\\\xe3\x96R\xf3\x9a\xe8`\xcd\xb8\x0b\xd9\x7f\x7f\x86\x94\xb3\xe7\xdb)\x89\xde\xfb\x0b\x15\xacJ?\xa1+\xcf\xa8?S\xca,\x19\xd0\xfc0cu\xcf\xd86\x8f\xb4JI\xc3g\x1c\xd3XC\xf5\x1ce\x12?\x9a\xb3PUfrF\xf9(\xb1\x08\x98P\xd69\x04\x8c\xaf'\x08\x18\x00\xac\x0c\xe2\x110\x0bz\xc3\x06\x00\x00X^@\xc0\x00\x00HX@\xc0\x00\x00HX@\xc0\x00\x00HX@\xc0\x00\x00HX\x16\x20`\x00\x00\x00+\x03\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x96E\x13\xb07\xf0\x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x97\x9c\xbb\x82\x11\xba\x12\xdfX\x03b\x94\x97s&\xac\xc47r\x8bQ!n%~\xc8\xe1>T\x9f\x91\x94\xdc\x11RW\xe2\xb7\x04\x83W\x85CB\xce8\xee\xef\xe8\xf5%\x07\xf9Zp5\x8eUy\x00\xb8wY\x88\x80\x91\x0b\xbb\xcb\xbc[^\xfe\xfef\xd1\x037\x94o\x7f;X\xe6\xdd~\xe1c\xb5\xd3u\xed\x85\xca\"\xef\xf6S\xa6~)\x02\x16\x18\xf5\xa59\xd6\xf6k\xdf\xa7$\xe31\"\x95[\xe9\x08\xa1T\xf5\xb9\x9b\x81u\x19Nfy\xa2\xf0\x90;%\xb3Pm\x80\x91\x1d\x19\x8e\x07\x87\x05\xdbQ\xf5!\xc2\x12\xfa\xe3LK\x8e\xe4\xf2wx\xa4\xc2Z\xe5\xa7\x94P\x9a\xf2o\xad\xe0Az\xbc\xda\x99U%3g\xc7\xf2\xb4u`\x9c\x073\x8b\x06\x84\xe8T\xd36\xfa<\xa3\xe9w@1\xac#;\x94\x7f\xcf\xd2g!W\x1be\xd7\xcb\xcb9S\x9f\x85T\xfc\xb0Yy=\xb7\x18\x15\x1a\xe5\x9e\x85\x0c\x97fd\xef\xe9HV\x8a^\xadM|\xf9\xf9,\x08}\x16\xd2\x91Y\x1a\x12j\xc1\xd58V\xe5\x01\xe0\xde\xc5N\xc0\x16\x9fK\xe6cDK\x869\xea\x03\x00\xe0\x1eb\xe9\x05\xac\x1e\x1d\xb03Yt@\xc0\x00\xe0\x9ed\x89\x05,4\xd6\xb5J\x92\xed\xac\x16\x1d\x100\x00\xb8'Yb\x01+G\x08-\xb9\x98\xa8\xb3\xdb\x00\x00\xdcs,\xb1\x805\xa5\xba\x96~\x00\xc9f\xb7\xc7\xec\xac\x00\x00H8\x96X\xc0\x00\x00\x00\x16\x0f\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x96\xc5\x12\xb0\x1b\xc2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l\x1c\xf5\xd0}S\x16\x01\x8bqP\xc5\xa6?l\x89&\xaab\x08\x18WH\x93\xbb_\xcd\x18g(f-L\xf4\xd6\x1aO2N\xc0\xf4\x13;\x9c\xe9\xde\xd3\x13\\g\x89Fo\x7fM\xf2\x97\x06/`\x13{&\x98\x80\xf1~\x09\xe9\xd6\x0f\xbaT3<\xac\x0e\x84\xc4#\xa9;\xe3\xe6\xc0\xf8\xdcl*4\xa2\xba\xb7N\xe2sYhs`\xd3\x03$V\xcb\xb2\x11\xb0\xef\xf1\x03\xff\xa4\x9f\x971\xbeM\x9e\xc3\xdb\xe9j0\xf2\x07\xec\xfd~n\x01[\xc5\xe6\x15~\xa1F\x80\x1dC\xeeZtRpk\x11\xb0z\x8b\x80}\xc8_%\xb7\x8c\xfbC\xb9\x9d\xeb\xd6\xe6\xf6\xe4\x12\x113Y\x95g\x841A\x7ff\xc7\xab\x83\xfd\x81\xa8K\xba4\xcbV007%6{\xd7\x8e\x84\xd1\x97zv\x9c\xb4\xf7\xc0e1B\xff^Mu:\xda\x84d\xd5\x1e\x96\xc4S-\xe4\xc6\xd9\xf2\x85\xcci\xca\"\xeef5E>?\x81#\x0a\x18-\x99X\xb79\xee[\x92\x98\x06t\xaa5\xa4\xfdu^\x9ec6\x93\xfasu\x9f!`\xf5\x962\xf0\x07\x95\xcf\x8d\x90CR\xb4!s\xbc\x02v\xb7\xaa\x19\xfd\x0c\xc5\xae\x85\x89\xdeZ\xe3I\xc6\x09\x98~bs\x0b\xe8\xdf\xf1r\x8b\x80\xd9_\x93\xfc\xa5ada\xdeM\x12\xfc\x129\xb3>[\xedp\x1am0\xc6\x85\xc8\x09\x18\x97\x9b]\x85&\xd9\x85@\xac\x93\xf8\\\x16\x01\x07\x1b\xb9u\xa1\x89\x18-\xcbN\xc0\xc8O\xf1O\x15\x05\xbby\x10?\xa5\xa8\x98\x17\xbf\xa0\xe8\xd4\xc5M4\x08\xb7\x20`\xa4\x08\x7f|[\xbfYI\x97Q\xe4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5\xb2\xc0\xb3\xbe\xc0d\x8b\x80\xec\xaa[\xeev4\xef\xca\xcf[\xc0V\x04f5\x1f\xd4F;\xd6\xf9\xfc\x95\xc5\xbcOKbr\xd7\x05\xac\\9\xd3\x89r(\xd5\xd9\xc1y\xb3\xc0d\xf7\x06\xf3\xaf|\xf8\x0c\xaa\x9b_\x8a\x15\x00_\xcdp\xaf\xca<\xc6\x9fK\xce\xfcOK\x82r\xd7\x05\xac)\xd5\xf5\xef\x0e\x20\x97\x0c6;\x18\xfb\xee],\x16\x98\xec\xde`\xfe\x95_\x8b\xf4;8\x09\xc4\xfc\xab\xb9\xbc$Zy\x17\xcc]\x170\x00\x00\x80\xbb\x05\x08\x18\x00\x00\x09\x0b\x08\x18\x00\x00\x09\x0b\x08\x18\x00\x00\x09\x0b\x08\x18\x00\x00\x09\xcb\xe2\x0a\x98\xfe|\xd1\xdc\xbcA\x1f\x06\xd7X\xfc\x18\x92\x00\x00\xfc`\x00\x01\x03\x00\x20aY\\\x01\xbb\xfc\xeb\xf3v&\x04\x04\x0c\x00\x80Ebq\x05,>@\xc0\x00\x00X\x14\xee\x15\x01\xdb6\x9f\xe7r\x01\x00\xb87\xb0\x13\xb0\xdf\xe0S\x17*\xbd?\xb9\xa6\xbe\x18l\xd3^\xed\xad\x85\xd7\x8eT\xae\xdf\xb4O}_>\xb7\x83\xce\x81\xbd\xa1\xcf\x83=\x8b_&\x96d\x9f\xef\xddT\xfc\xd4E\x8b\x80\x85\xcb\x9d\x8e\xfc\x0eB_Z\xa7\xbd.\xfa\x80\xf8\x02\xc48\x08\xa3\x00\x0d5\xf8o\xbcug\xbe\xf4$k\x8f\xf4&w\xdb\x99\xce\xcbv\x81\x1cB)\xf4%\xb7}\x0et(\xbaA?+@\xc6C1\x9f\xe1Q\xdf\xe9t\x08!\xed=\x92s2\xc2\xbd\xd3Ia,\x85\x9d:\xfaN'G\x94\x0cB\xbe\xb4L\xff`\xe6\xc2\xdf(\x02\x001\xb0\x17\xb0\x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3h@\x88N5m\xa3\xcf3\x9a~\x07\x14\xc3:\xb2C\xf9\xf7,}\x16R\x9dB\xe7\xcb\xcb9S\x9f\x85T\xfc\xb0Yy=\xb7\x18\x15\x1a\xe5\x9e\x85\x0c\x97fd\xef\xe9HV\x8a^\xadM|\xf9\xf9,\x08}\x16\xd2\x91Y\x1a\x12j\xc1\xd58V\xe5\x01\xc0\x1e;\x01[j.\xc5\xf1\x18\x91@`>\x0b\xbc\x13-Zq\xa2\x95\x17\x00\x96\x98\x95&`\xf5h\x9eapkjH\xfc\x98\x82\x10\x19SY\xf4g{\x16\x15\x100\x00\x98\x93\x15%`\xa1\xb1\xaeU\xd2\xac\x01\xde\"b\x0a\xc2\x83\xdah\xc7:\x9f\xbf\xb2\x00\x01\x03\x809YQ\x02V\xae(\xca]l\xb2\xeal\xb1J\xb8We\x1e\xe3\xcf%\x87//\x00\x00QXQ\x02\xd6\x94\xea\x9a\xe7\x00r^\xb0\xd9\xe21;\xab\x95C\xa2\x95\x17\x00\x96\x9c\x15%`\x00\x00\x00\xf3\x01\x04\x0c\x00\x80\x84\x05\x04\x0c\x00\x80\x84\x05\x04\x0c\x00\x80\x84\x05\x04\x0c\x00\x80\x84eq\x05L\x7f\x94hn\xeeF\\H\x00\x00~\x80\x80\x80\x01\x00\x90\xb0,\xae\x80]\xfe\xf5y;\x13\x02\x02\x06\x00\xc0\"\xb1\xb8\x02\x16\x1f\x20`\x00\x00,\x0a\xf7\x8a\x80m\x9b\xcf3\xdd\x00\x00\xdc\x1b\xd8\x09\xd8o\xf0\xa9\x0b\x95\xde\x9f\\#\xe4\xc6\x8b\x95E\x9b\xf6^P\x7f\xbev\xa4r\xfd\xa6}\xea+\xee\xb9\x1dt\x0e\xec\x0d}\x1e\xecY\xf6RC!\xd9\xe7{7\x15?u\xd1\"`\xe1r\xa7#\x9f\xc6\xb0iA\xb9\xea\x8f\x07\x84\x97\x1a\xc6C\x18\x05H-J\xea\xb2\xb3[\x07:\x14\xdd\xa0\x9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0f\x0e+\x1b\xdf\xa6VE\xb55\x0c\xf8M\xe9\xf1jgV\x95L,p\xb6F\x16'\x0a\x0f\xb9S2\x0b\x07\xad\x06\xa4\xc3\xd5\xaen\xdcJW\xb2J\x9d\x8a+\x99a;\xaa>DXB\x7f\x9ci\xc9\x91\\\xfe\x0e\x8fT\xc8\x17\x9d\xf7\xc0\x97\xf7X\x9e\xb6\x0e\x8c\xf3`f\xd1\x80\x10\x9dj\xdaF\x9fg4\xfd\x0e(\x86ud\x87\xf2\xefY\xfa,\xa4:\x85\xce\x97\x97s\xa6>\x0b\xa9\xf8a\xb3\xf2zn1*4\xca=\x0b\x19.\xcd\xc8\xde\xd3\x91\xac\x14\xbdZ\x9b\xf8\xf2\xf3Y\x10\xfa,\xa4#\xb34$\xd4\x82\xabq\xac\xca\x03\x80=v\x02\xb6\xd4\\\x8a\xe31\"\x81\xc0|\x16x'Z\xa4\xebD+/\x00,1+M\xc0\xea\xd1\x7fe\x01\x02\x06\x00s\xb2\xa2\x04\xac\\Q\x94\xbb\xd8d\xd5\xd9b\x95p\xaf\xca<\xc6\x9fK\x0e_^\x00\x00\xa2\xb0\xa2\x04\xac)\xd55\xcf\x01\xe4\xbc`\xb3\xc5cvV+\x87D+/\x00,9+J\xc0\x00\x00\x00\xe6\x03\x08\x18\x00\x00\x09\x0b\x08\x18\x00\x00\x09\x0b\x08\x18\x00\x00\x09\x0b\x08\x18\x00\x00\x09\xcb\xe2\x0a\x98\xfe(\xd1\xdc\xdc\x8d\xb8\x90\x00\x00\xfc\x00\x01\x01\x03\x00\x20aY\\\x01\xbb\xfc\xeb\xf3v&\x04\x04\x0c\x00\x80Ebq\x05,>@\xc0\x00\x00X\x14\xee\x15\x01\xdb6\x9fg\xba\x01\x00\xb87\xb0\x13\xb0\xdf\xe0S\x17*\xbd?\xb9F\xc8\x8d\x17+\x8b6\xed\xbd\xa0\xfe|\xedH\xe5\xfaM\xfb\xd4W\xdcs;\xe8\x1c\xd8\x1b\xfa<\xd8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0e\x89V^\x00XrV\x94\x80\x01\x00\x00\xcc\x07\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x16\x100\x00\x00\x12\x96\xff\x0f}\xc6-\xc8\xe3>\xf6\xcf\x00\x00\x00\x00IEND\xaeB`\x82", - "analysis/chan2a.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x04\x89\x00\x00\x01\x95\b\x03\x00\x00\x00M@Q-\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\n\x03\x01\x04\x06\x02\a\n\x06\x0e\x10\r\r\x12\x14\x0e\x12\x1d\x11\x13\x10\x16\x18\x15\x1b\x1a\x13\x13\x1e7\x1f\x1f\x18!# #$\"%$\x1d%%\x1e$%#%'%'(&+)\x1e()'*+)/,!+-*,-+-/,02/63(241564796<9.9;8<=;=>FA?3>@=#CxDA5AB@DFCFHEKHe\xafac`hcQbdaAg\xb2efdCi\xb3ghfMj\xafEm\xb1qjRikhIp\xb4lmkLr\xb7npm{s\\rtqWv\xb6tvsuwt\\z\xbaxzw]~\xb8e|\xb8\x84|dX\x80\xbf{}za\u007f\xbf|~{~\x80}b\x82\xbc\u007f\x81~d\x85\xbf\x82\x83\x80\x83\x85\x82m\x87\xbdh\x88Ð\x86hj\x8ać\x88\x86r\x8c\xc1\x89\x8b\x88t\x8eė\x8do\x8c\x8e\x8bz\x8f\xc0\x8e\x90\x8dx\x92Ȑ\x92\x8f~\x93\xc3x\x95Ē\x93\x90\x81\x95\xc6{\x98Ȕ\x96\x93\xa0\x96w\x96\x98\x95\x82\x9aė\x99\x96\x83\x9cņ\x9b̀\x9d̚\x9b\x98\xa5\x9b|\x87\x9fɃ\xa0Ϝ\x9e\x9b\x89\xa1̞\xa0\x9d\xaa\xa0\x81\xa0\x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\xdc6\xee*\x91\xad\x1b\xf5\xf9\xfd\xb5\x9d=\x9d\xb5\xfb\xa7\xcfͳ\x18l\x9a\xbd4\xb1\x96y\xabT\x1f\xe4\xd9(\xd1v_E\xfd\"\u007f\x8fx\xa9U\xb9\x8d\xa6\n\xea\u0094\x1d\xe59$\xbe*$\x8a\xf7\x93յ\xf5E\xa4\xdaZ(\x00\xb1\xe3\xae\x12ٻQ\x0f\xb6\xd5Uյ\xb13\x14S\x9d\xd1\xdb4{ib\xcda\xa3D\x83%ɉ\v\xdbD\xf1\x94\xeaa\xad\njWnb\xd2\xe2\xafPkk\xb9W\x94\x9b\x92\xbc0\x8a\x116\x00\xa3\xc6]%\x02.\x12\x9b\x89\xb5\x8d\x12\x01\xe0\x1eP\xa2iKl&\xd6P\"\xe0)P\xa2鉓\x89\xb5`\xe5\xff\x96\x95\xe8\xff\x80\x12\x01\xaf\x80\x12MK\x1cM\xac\xa1D`r\x01%\x9a\x9e\xc4lb\x8d\xd1\x19\xf0\x14(\x11P\x80\x12\x01O\x81\x12\x01\x05(\x11\xf0\x14(\x11\x90\x19ܳ\x92\xfe\x02vk\xcbtz\xaa\vL%\xa0D@&G_\x15\xa4\x0eR\x04<\x01J\x04D\xf1\xfc\x1d\xe5\x924$I#w,\x9f9\xbe\x06`R\x01%\x02\xa28@Hn\xee\x1d\xa9\xb9ٳ\x8a\xf0\xcbz\xe0\tP\" \x8a\x97\x82s\x93\x933\x93\x93\x93\x17\xb5M\x9f\xdf!\x83)\xc5LV\xa2\x95$\xa50\xe4\x1443\x18\xec\xeb\xee\xea\xee\xee\xea:\x8d\xf5\xf1\x817\xccd%\xeam\xae\xcaJ\xc1\xa5\xa7B\xbd\xce,~g\x00\xb8\x87\xebJd\xe3F}\xf9T}\xa0Λ\xceI39\xe5\x14\x02\x00\x98x\xdcV\"\x1b7j\xb1\xa1\xaa\xbd\xfbX\xe0X\xf4\x8c\x13C\x1biu\n\x01\x00L<.+\x91\x9d\x1b\xf5\xc9\x00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9d\xc2\x13/=!\xec\x14\xf9X\xa3\x84Ѱ\xddWQ\xbf\xc8\xdf#^jUn\xa3\xa9z\xb90eGy\x0e\x89\xaf\x92;\x92\xf7\x93յ\xf5E\xc4\xf5\t\u007f\x00\xc6\x11w\x95\x88q\xa3\x1el\xab\xab\xaakSoX\xf76\x06\xea=q\x85~\xfb\xe1\xb5\xcb6k\xbf&\xabJ\xa9\xb4nݭ\xcd\xe7\xc8î7\xb4\xa4\xa2Z'J\u05ec(=N\x9f\x11\x12\x84\xbc_.\x93_\x1f\x95\xb7^|lU~\xe9kJ\tG7\xe4o>\xbe\x96v\x84\xae\x1cڨ?O\xc4\xc6\xea%\x8c\x86\xc1\x92\xe4ąm\xa2x*N\x99\x0fR\xf5\xb2+71i\xf1W\b)\x96Ӎ\xb9)\xc9\v\x0fF-\x03\x80I\x8e\xbbJ\x04\x00\x00v@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\b\x00\xe0=P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\b\x00\xe0=P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\b\x00\xe0=SA\x89V\x92\x94B\xd7\x17/\x02\x00\xb8\xc8TP\xa2\xde檬\x14xW\x000\x8dq]\x89\xecܨͭ\x91h&\xa7\xa2\a\x00\x00\xa62n+\x91\x9d\x1b\xb5\xb95\"m\xa45z\x00\x00`*\xe3\xb2\x12ٹQ3[#\x02%\x02`Z\xe3\xae\x12ٺQ3[#\x02%\x02`Z\xe3\xae\x12ٺQ3[#r\x8a\xb8\xeeA\x04\x00p\x0fw\x95H\xb4s\xa3f\xb7Fb0%\xa7\xa5\xc7u\xf3\x0f\x00\x80Kx\xa5D\x8c\x1b5\xb352\a\t!K\x1db\x00\x00S\x15\xaf\x94\x88q\xa3f\xb6Fd %\xa3\xa2\xd9\xe2\xd2\f\x00\x986x\xa5D\x8c\x1b5\xb35\"m\xa4)z\x00\x00`*\xe3\xb1\x12\xb5\x8fZ\x89p\xef\f\x80i\x8cWJĸQ3[#\x02%\x02`Z\xe3\xae\x12ٻQ\x9b[#\xd2\n%\x02`:\xe3\xae\x12ٻQ3[m\x19\xecm_\xe9\xf3ĭ\x1a\x00\xe0\x0e\xee*\xd1ظ\x97\x90\xf4z\xa7 \x00\xc0\x14f*(Q_{\x8fS\b\x00`J3\x15\x94\b\x000݁\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\\W\"\x1b7\xea\x81`m\xa0\xfeԥh\xb9\x00\x00\xd3\x1a\xb7\x95\xc8ƍ\xfalU}g\xf7\xb1\xaazH\x11\x003\x16\x97\x95\xc8\u038d\xba\xb9\x96\x1a\x99\xf5\a\x8eE\xcb\b\x00\x98θ\xabD\xb6n\xd4u\xb5꾆\b\x99\x00\x00\xd3\x1ew\x95\xc8֍\xba\xb7G\xd9\xd2\xf2T\xe4|\x00\x80鍻J$Fr\xa3\x16\xc5\xcb5A\xfb\f\x00\x80\xe9\x8fWJdq\xa3\x96\xbbDU\xfd\x91\xb2\x00\x00\xa6;^)\x91ōZl\xad\x84\xd74\x003\x17\xaf\x94\x88w\xa3\xbe\xd4\x1c\bE\xca\x00\x00\x98\xfex\xacD\xaa\x1b\xf5@C5\xec\xcc\x00\x98\xc9x\xa5D\xac\x1bu\xff\xfe:\xea\xbah\xce^\x03\x00f\x18\xee*\x91\xad\x1b\xf5\xe9\xc0\xfe\xee\xde\xdeޖZ\xa7\xdc\x00\x80銻Jd\xebF}\xb0R\x05O6\x020cqW\x89\x00\x00\xc0\x0e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xfe\xe2+\x00\x00\xe05\xb7\xd3'\x02\x00\x80\xf1\x01J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbcg\x14J$\xee\xc8IIH\xbd\xe7\xa9\x11\xa7\xc0\b\fҌ\xb5d\xb9S\\\xec(%א\x95\xe6\x96\xd1\x1c\x86\xcb0\x16\xf6\x90\"\xa7\x10\x00@L8+QU\"QI\xefq\n\xb5eO\xe2\x904:\x89\x88\x15\xb5d(\x11\x00S\x1fG%\xdaNHn\xcbՑ\xb3Us\x89\xaf\xcd)؆\x11B\xa8^\xf4\xee\t:EƊV2',\xa39\f\x94\b\x80I\x87\x93\x12\x05\t٣\xa6\x86rI\xf2\x9f\xa2\aۡ\xe9\xc5\x04`\xa7D\xa3!\xe6\fV\xa0D\x00\x8c7NJ\x94A6\xe9ɡTR\x12-\xd4\x1e(\x11\x00\xc0\x11\a%:F\xe2.\x19\x1f\xaaɜ\x11z!\u007f\xb3\u007ferR\xceAu\xe3\xe0\x96t_\xf2\xbd\xed4YE\x02\xed\x19\x89\xd9\x03\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e8\xad#\xf7\xad\x92\xe4C%\x0e\x8f.[\xdfR\u007f\xdajY\xb0\x95ߝQ\x94\xc1\x82\xfe\xed\xb3\xff\xcau\xcaaM\xd2\xcdܴ\x9b\\,S\xae\xd9|\xec\x15\xcb}'#|\x11M\x1c\x94\xc8m\xces\xbf\xf4\x18\x03e\xbe&\xa7\x90QQn>^\xe9\x8c9=\x15\x13c\xcc6.\x04\xc3\x1e\x98\x8d\x86u\xc6:\x16&\xb6%c\xafY\x93\xaf\xe4\x86S\xcc\x18\x98\xd8Ӝ\x01L2%\xdaA\xbe\xe9\x14\xe2@u\xfaU\xa7\x90Ѱi\x934z\xc6\xf8\xc5\x1ac\xb6\xf1\xa0!y\x8bS\bK\xec\u05fb\xc9Ķd\xcc5\x1b\x9ak\xffS\xfc\xdbe\x8c\xa792\xa8\x12\xf9\xa7\x1a3\x85ɤD\xfd\x83M\xb3}a]\xd6)@\xcc\u05cf\xca\x18\xb3\x8d\x03bjYL_\xfd\x98\xaf\xf7\xb1\x12s\x93\xb8V\xb3q\xc5<ͻ\xb4A\x92u\xf2z\xe61\x99\x94\xa8P\xfe\x17\x89\xf5\x9b8\tPg(cf\x8cټ`\xe0\x18)s\xa3\xaa\xb17\x89[5\x1bW\xd8\xd3\x1chQ\x19\x88\x96aF0\x99\x94(\x90\x98:\x05\x85H\x9d\xa1\f\xbf\x17\xe0\xc4\x18\xb3y\xc1\":\a9\xe0\x14u\xfb\xc4\xde$n\xd5l\\\x89\xfd4g\x02\x93I\x89\x00\x003\x15(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\aJ\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\xe7\xff\a\xfd\xa4@\x82&\x8eJ\xdf\x00\x00\x00\x00IEND\xaeB`\x82", + "analysis/chan2a.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x04\x89\x00\x00\x01\x95\x08\x03\x00\x00\x00M@Q-\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x0a\x03\x01\x04\x06\x02\x07\x0a\x06\x0e\x10\x0d\x0d\x12\x14\x0e\x12\x1d\x11\x13\x10\x16\x18\x15\x1b\x1a\x13\x13\x1e7\x1f\x1f\x18!#\x20#$\"%$\x1d%%\x1e$%#%'%'(&+)\x1e()'*+)/,!+-*,-+-/,02/63(241564796<9.9;8<=;=>FA?3>@=#CxDA5AB@DFCFHEKHe\xafac`hcQbdaAg\xb2efdCi\xb3ghfMj\xafEm\xb1qjRikhIp\xb4lmkLr\xb7npm{s\\rtqWv\xb6tvsuwt\\z\xbaxzw]~\xb8e|\xb8\x84|dX\x80\xbf{}za\x7f\xbf|~{~\x80}b\x82\xbc\x7f\x81~d\x85\xbf\x82\x83\x80\x83\x85\x82m\x87\xbdh\x88\xc3\x90\x86hj\x8a\xc4\x87\x88\x86r\x8c\xc1\x89\x8b\x88t\x8e\xc4\x97\x8do\x8c\x8e\x8bz\x8f\xc0\x8e\x90\x8dx\x92\xc8\x90\x92\x8f~\x93\xc3x\x95\xc4\x92\x93\x90\x81\x95\xc6{\x98\xc8\x94\x96\x93\xa0\x96w\x96\x98\x95\x82\x9a\xc4\x97\x99\x96\x83\x9c\xc5\x86\x9b\xcc\x80\x9d\xcc\x9a\x9b\x98\xa5\x9b|\x87\x9f\xc9\x83\xa0\xcf\x9c\x9e\x9b\x89\xa1\xcc\x9e\xa0\x9d\xaa\xa0\x81\xa0\xa2\x9f\xa1\xa3\xa0\xa2\xa4\xa1\x91\xa5\xca\xae\xa4\x85\x8f\xa7\xd1\xa4\xa6\xa3\x94\xa7\xcc\xa5\xa7\xa4\xb4\xa7\x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fa\xd8\xaa\xfc\xd2\xd7\xe4\xc4\x1bZa\x87\xc5\x8b+\x94D\xde\xdb\xda\xe1\x04}n\x96\xad\x0e\xc3\xc1\x94\xf0;\\\x06\xc5\xf2\x89%t\xfa\xe5\xd7b\xe6\x8c\x95\xdf\x9dQVr\xc1M\x19)\xc5\x03M\x99\xc9{\xb8$\x8fy\xb4\xd1\xb7\x8eyn\xa2\xd9$\xac\x157\xd3\x0e\xca\xef\xce6\x1f_K;BFC\xf1\xb1z\x09\x16\xfa\xe2W\x9e\xea\x8b\xf1\xa7\x83`\x92\xe0\xae\x12\x81\xb1paI\x94\x1f\xcd\x02\x86\xfa,B\xeeu\x0a\x02\x93\x12(\xd1\xe4\xe7\xc8\x9a?8\x85\x00\x8d\xbeS\x1e<\xac\x0f\xc6\x01(\xd1$\xe7\xe9\x97\xaf|\xf5\x80\x08\xc04\x07J4\xb9\xb9\x20l~\xb4`\x94\x8b\x83\x000u\x81\x12Mr\x0e,+}\xdb)\x06\x80)\x0f\x94\x08\x00\xe0=P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\x08\x00\xe0=P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\x08\x00\xe0=\xae+Q\x98\x1b\xb5(\x0e\xb4<\x15x\xaae\xc0!\xe34b\x92\x98X\x030yp[\x89\xc2\xdd\xa8\xc53\xd5u\xa1\x9eP]\xb5g\xeb6\xba\xce$1\xb1\xa6|\xf0~\xe4}\xcd\xed\x91\xf7\x010\xbe\xb8\xacDvn\xd4\xc1Z\xea\x1fq\xa9vFy\x9a\x8f\xda\x1cu\x02M\xac\xa9\xb1\xe1\x8aR-y\xf9\xd2\xe5\xcb\xf2\xff\xec\xdel~\x155\x00&\x10w\x95\xc8\xd6\x8d\xba\xa9^\xf9P\xef\x89\xf9\xa2W\xc4\xa0D\x13fb-\xbe\xb5Y\xd0\xbcZ\xbb\xb2\xb3\xb2\xee\x99\x97\x95\xb5\x89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x08)\x96\xd3\x8d\xb9)\xc9\x0b\x0fF-\x03\x80I\x8e\xbbJ\x04\x00\x00v@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\x08\x00\xe0=P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\x08\x00\xe0=P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\x08\x00\xe0=SA\x89V\x92\x94B\xd7\x17/\x02\x00\xb8\xc8TP\xa2\xde\xe6\xaa\xac\x14xW\x000\x8dq]\x89\xec\xdc\xa8\xcd\xad\x91h&\xa7\xa2\x07\x00\x00\xa62n+\x91\x9d\x1b\xb5\xb95\"m\xa45z\x00\x00`*\xe3\xb2\x12\xd9\xb9Q3[#\x02%\x02`Z\xe3\xae\x12\xd9\xbaQ3[#\x02%\x02`Z\xe3\xae\x12\xd9\xbaQ3[#r\x8a\xb8\xeeA\x04\x00p\x0fw\x95H\xb4s\xa3f\xb7Fb0%\xa7\xa5\xc7u\xf3\x0f\x00\x80Kx\xa5D\x8c\x1b5\xb352\x07\x09!K\x1db\x00\x00S\x15\xaf\x94\x88q\xa3f\xb6Fd\x20%\xa3\xa2\xd9\xe2\xd2\x0c\x00\x986x\xa5D\x8c\x1b5\xb35\"m\xa4)z\x00\x00`*\xe3\xb1\x12\xb5\x8fZ\x89p\xef\x0c\x80i\x8cWJ\xc4\xb8Q3[#\x02%\x02`Z\xe3\xae\x12\xd9\xbbQ\x9b[#\xd2\x0a%\x02`:\xe3\xae\x12\xd9\xbbQ3[m\x19\xecm_\xe9\xf3\xc4\xad\x1a\x00\xe0\x0e\xee*\xd1\xd8\xb8\x97\x90\xf4z\xa7\x20\x00\xc0\x14f*(Q_{\x8fS\x08\x00`J3\x15\x94\x08\x000\xdd\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\\W\"\x1b7\xea\x81`m\xa0\xfe\xd4\xa5h\xb9\x00\x00\xd3\x1a\xb7\x95\xc8\xc6\x8d\xfalU}g\xf7\xb1\xaazH\x11\x003\x16\x97\x95\xc8\xce\x8d\xba\xb9\x96\x1a\x99\xf5\x07\x8eE\xcb\x08\x00\x98\xce\xb8\xabD\xb6n\xd4u\xb5\xea\xbe\x86\x08\x99\x00\x00\xd3\x1ew\x95\xc8\xd6\x8d\xba\xb7G\xd9\xd2\xf2T\xe4|\x00\x80\xe9\x8d\xbbJ$Fr\xa3\x16\xc5\xcb5A\xfb\x0c\x00\x80\xe9\x8fWJdq\xa3\x96\xbbDU\xfd\x91\xb2\x00\x00\xa6;^)\x91\xc5\x8dZl\xad\x84\xd74\x003\x17\xaf\x94\x88w\xa3\xbe\xd4\x1c\x08E\xca\x00\x00\x98\xfex\xacD\xaa\x1b\xf5@C5\xec\xcc\x00\x98\xc9x\xa5D\xac\x1bu\xff\xfe:\xea\xbah\xce^\x03\x00f\x18\xee*\x91\xad\x1b\xf5\xe9\xc0\xfe\xee\xde\xde\xde\x96Z\xa7\xdc\x00\x80\xe9\x8a\xbbJd\xebF}\xb0R\x05O6\x020cqW\x89\x00\x00\xc0\x0e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xfe\xe2+\x00\x00\xe05\xb7\xd3'\x02\x00\x80\xf1\x01J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbcg\x14J$\xee\xc8IIH\xbd\xe7\xa9\x11\xa7\xc0\x08\x0c\xd2\x8c\xb5d\xb9S\\\xec(%\xd7\x90\x95\xe6\x96\xd1\x1c\x86\xcb0\x16\xf6\x90\"\xa7\x10\x00@L8+QU\"QI\xefq\x0a\xb5eO\xe2\x904:\x89\x88\x15\xb5d(\x11\x00S\x1fG%\xdaNHn\xcb\xd5\x91\xb3Us\x89\xaf\xcd)\xd8\x86\x11B\xa8^\xf4\xee\x09:E\xc6\x8aV2',\xa39\x0c\x94\x08\x80I\x87\x93\x12\x05\x09\xd9\xa3\xa6\x86rI\xf2\x9f\xa2\x07\xdb\xa1\xe9\xc5\x04`\xa7D\xa3!\xe6\x0cV\xa0D\x00\x8c7NJ\x94A6\xe9\xc9\xa1TR\x12-\xd4\x1e(\x11\x00\xc0\x11\x07%:F\xe2.\x19\x1f\xaa\xc9\x9c\x11z!\x7f\xb3\x7ferR\xceAu\xe3\xe0\x96t_\xf2\xbd\xed4YE\x02\xed\x19\x89\xd9\x03\x92\xd4\xba:\xcd\xe7\xcf*\x13%i\xab2\xc5\xd4\xabO\xe0\xf4\x15\xcfMH\xbeW\x19\xe5\xd5\x90\x8a?m\x99\xebK/\xbbJ?\x9d\xfdRzB\xd2\xc2*nVOdW\xd8\xd9\xad\x19\xbe\xe4\xe5!\xa5,&\x03[W\xfe(\x96C2\xe7\xa9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x12\x85\x17&\x9f\x86\xfa+\x90\xe6\xc5\x01.\x03_\xd7\x88J\xc4\x9f'\x94\x08\x80\xf1\xc6I\x89:\x09\x9d\x1b\xa2\\[J\x12\xcfK\xf4\x0aMP\xbaI\xfb\xe9\xa3F\xc5$\xfb&\xfd\xd0J|Wu%\x12\xb5[h\xc3i\xf4\xb3\xdd\xbd\xb3:\x924b\x1d\xfd\xd0'\x0b\xa5~\x12g\x99\xf8\xb2\xe6'\x92\xd4\x01\xe6\xc0\x91\x82u\xd4\x92\xc3\x95\xc8\xae\xb0\xa0\x8f$g'\x93\x84\xa0\xa5\x13\xc5\xd55\xb2\x12q\xe7\x89g\xac\x01\x18o\x9c\x95H\x12+r\x92\xe2R\xee\xa9\xd5\xeeD\xc9Wh\xef\xd29\xc9KO\xa9\x1f\xcfnJ\xf7%f\x07\xe88\xc8\xb8w\xd6\x96\x9b\xe2\xcb\xda\xfe\xa7a\x1f\xbdc\xd5\x9f;;\xe9\xa0.!}Ei\xbe\xb4\x95\xedZ9J\xb0\xbagpK\xa6ov\xd6v\xf6\xce{\xe4`\x0d\xb5d\x9b\x19k\xbb\xc2\xfa\x8b\xd3\xe2S\x0a{%\x8b\x12qu\x8d\xa2D\xecyB\x89\x00\x18oF\xa1D\x16\xf4+\x14\x00\x00\xc6\x0b(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x9e\xd8\x95\x08\x00\x00\xc6\x1b(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x9e\xf1R\xa2\xe7\x84o\xdb\xef\xc0\xad6\x00\x80#P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\xcf$Q\xa2\x96\\n\x09\x8f\x98\x18\xcamq\x0a\x01\x00Ln\x1c\x94\xe8E\xe1\xb9?\x7f{M\xfe\xc6W\xa4[/n\\R\xf0\xddO\x95\xad?\xdf\xb56/\x7f\xc3\x93\x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\x8ca\xf9RN\xcf\x95XF\xd2\xef\x95\xfb'7\x9a\x86x\xcf{\xf3\xc0lR\xa2\x0e\xd3aS\xcbf\x00[\x82y`\xb3\xea\x83\x84\xbbC\xc6\x8e\xce4\xbb4\xf64\xd9\x03\xeb\x85\xf5+G\x90FFF\"\xd5\x97k(\x00\xa62NJ$\xcb\xcc;\xdf\xdf(\x08\xffhq\xbd\x8f\xaaD\x0f\xa8\x89\x0cB}\xe23\xc9\xa9\x11\x7f<7-\x1d\xa4\xf6\x86\x94\xa12_:\x99\xeb\xdbN\x17^5\x8d\xee\x19\x9bz^\x89\xb6&h\xf9|\x9b$\xc3v\xd1^\x89\x94i\xa9Z\xc2\xad\xe8\xdaFz\xf5$\xebyo\x1e\x98MJT\x89\xc2\x1e\x160\x03\xd8\x12\xcc\x03\x9bU\xbf\x11o\xdf'\x92\x0c%bO\x93=\xb0^\xd8\xb0\xa23E\xf2P\xedd\x84\xfar\x0d\x05\xc0T&\xba\x12\xdd\xfa\xa3\xeaz\xff#!\xef\xdfy\xd7\xfb\xa8J\xa4z\x1f\x0e\x11Bgd*\xc8\xd66\xdd\x0dQ\xa3K\xbf,\x03\xa9u\xfd\xa4\x7f\x7f\xea\x1e\x895uel\xea9\xa1\x11}\xfaS\x8d\xac\x01\xac\xbd\x12)\x17{'\xe7H-U\x13c\xde\x87\xf5\xbc\x8fhq\xdd\x1d\xee\xccf\x06\xb0%\x98\x07f\xaa\xae\xcd\x13\xddh\xd7\xca\x0aS\"\xf64mOH\x99'\x12\x9bI\xf9H\x84\xfar\x0d\x05\xc0T&\xba\x12}\"\xdc\xad8.~(\x08\xd7y\xd7\xfb\xa8J4[\x99\x13\xdeC\x94?\xe4\x83$}\xabe\x98s\xcd\xb8\xf7uC\xb9w\xa6\xd8\xf3\x98\x17\x18cS\xcf\x19\xd2\x97\xc5\x9d\xd7\xb2\x85]\xb8j\x80\x99\xf4)SUu\x8a\x95\xab\xc1IS\x98X\xcf\xfb\x88JT\xe1\xe3\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xac\x9bbY\x0e\xe4\xb6\x95hh\xeem\xff\x14\x1f\x000j&Z\x89\xfa\x07\x9bf\xfbD\xa7\xa8q\xe7\xb6\x95\x08\x00\xe0&\x13\xadD\x85\x84\x8cq%\xa2\xdb@\x9d\xd5\x05\x00L\x19&Z\x89\x02\x89\xa9\xae\x0b\x91:\xab;\xe8\x14\x05\x00\x984L\xb4\x12\x01\x00\x803P\"\x00\x80\xf7@\x89\x00\x00\xde\x03%\x02\x00x\x0f\x94\x08\x00\xe0=\xe3\xaaD\xfaB\x8e\xd1y\x8e.}\xad1:o4\x00\xc04\x07J\x04\x00\xf0\x9eqU\xa2\x0f\x9f{\xdd)D\x82\x12\x01\x00\xc2\x18W%\x1a\x1dP\"\x00\x80\x85i\xa7D-\xb91\xfe\xb26*[b\xf9\xd9-\x88\xc2di\xc9\xa1\xdcQ{\x81\x8f\x85\xc9r\x9aS\x0f\x07%\xfa\x91\xf0\xc2\x9b\xeb\xf3\xff\xe1#u\xa1\xa2U\x0fi\xcb\xa1}\xb4o\xfd\x92U\x0f\xabk\\3;\xe8<\xd1\x0f\xb4\x85\x8b\xa4\xc7\x85'%K\xb6w\x1eZ\xb5\xec\xc1\xdfZ\x94h\xa00\xd9\x9f\xd3\x20\xd1u\xc1\xe6\xa9\x1b+\xb8\x95\xd5\x86\xb6\xa4\xf9\x97\x8f\xdaG'0\xae\xbfr;C\xca\xa5\xad$.\xd6\x05L(\x0dt\x15\xa2\xd4{{\xa4qf\x13!t\x95\xb9*B\xac\xdf\xf9\xf6\xd4\x09\xbd\xc6n\x8f\xc9\xd3\x92\x818\xfbU\x16\xc6\xa5\xf9n\xe34\xc7H0^[\xfc*>\xba\xc7\xb9F\xdf\xd29iE\x9di\x7fR\xd6\xcc\xf2\x0f8\x85+t\x12\x92+I\xcdr\x86S\x91\x83\x98\xe6c\xae\xd8\x18\x1a\xd5Q\x89\xbe\x9b/\x08\xcb\xaeKo.\x13\xf27\xae\x17\x84\xef\xd3\xad\xaf\xe7\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f5\x9b8\x09Pg(cf\x8c\xd9\xbc`\xe0\x18)s\xa3\xaa\xb17\x89[5\x1bW\xd8\xd3\x1chQ\x19\x88\x96aF0\x99\x94(\x90\x98:\x05\x85H\x9d\xa1\x0c\xbf\x17\xe0\xc4\x18\xb3y\xc1\":\x079\xe0\x14u\xfb\xc4\xde$n\xd5l\\\x89\xfd4g\x02\x93I\x89\x00\x003\x15(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\x07J\x04\x00\xf0\x1e(\x11\x00\xc0{\xa0D\x00\x00\xef\x81\x12\x01\x00\xbc\xe7\xff\x07\xfd\xa4@\x82&\x8eJ\xdf\x00\x00\x00\x00IEND\xaeB`\x82", - "analysis/chan2b.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x04Q\x00\x00\x011\b\x03\x00\x00\x00\x83\v\xcdh\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x03\x06\x02\b\n\x06\x0e\x10\r\x19\x1a\x18!# #$\"$%#%'$&(%'(&()'*+)+-*,-+-.,01/2313425747968:7:;9<>;>@=AB@CEBEGDFHEIKHKLJMOMPROSURUVTVXV,`\xae7]\xad[\\Z8^\xae8`\xaa]^\\:b\xab;b\xacIH=\x88k\x89Z\xcfsS\xdb\xe7\xf4L\xf7\xe9\x99\xd3Ӄ6\r\xcc\xfc>\u007f̜9\xfd;\xa7\xcf\xe9\x9e\xfe\xce\xe9\xd3=\xfd\x1d\xf3\xeb+\x80\x00\x00\x00h\xc6h\xa9\x867\xb4*\a\x00 \xc0\x00E\x01\x00@?@Q\x00\x00\xd0\x0fP\x14\x00\x00\xf4\x03\x14\x05\x00\x00\xfd\x00E\x01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bb\xec\xa8\xe3\xcb\u007f6\xfd\xe7\u007fv*\xca\xff\xfe\x17\x91\xff\xfd%\xba\xc0\xdftEPI\x00\xf0+\x8cU\x14\xa6K)\xa6\xab\xad\x1f\xe5\xf9\x8b\u007f\xa4\xa0#\xffM\x1e\xa5H\xf3(żd4J%\x01\xc0\xaf0VQ\x98.\xa5\x82\xb4\xe0\x97\xeb\xd9-̢\xa3\x0f\xac\x1f\xf2L\x8a\xa4(5\xfc5W\x04\x95\x04\x00\xbf\xc2XEa\xbb\x94\xd6g\xb7\n\x8b\xf6\x1e\xf3Z\xc3(\x82\b\b\xbe\xda\xf3\xbf\x14\x8a\xd2iM\xc2\xd6\xdeYY\x88N\x02\x80_a\x84\xa2h\xb9\x94\xfe\x98\xfdݝ\xef\xf3\x8a\x9ej\xd53ZpJȿ\xfe\xe3\u007fW(\n\xaa\x8dY\xfe\xf5\x85,\xe2\xc6G%\x01\xc0\x9f0BQ4]J/\xe6\xe7\x16]\xec\xf7^\xc9(\xe2K&\u0082۩6K\xe2i\x12C%\x01\xc0\x8f0BQ\x02\rUE\x01\x00\xbf\a\x14E\u007f@Q\x80\xc0\x05\x14E\u007f@Q\x80\xc0\x05\x14E\u007f@Q\x80\xc0\x05\x14E\u007f@Q\x80\xc0\x05\x14E\u007f@Q\x80\xc0\x05\x14E\u007f@Q\x80\xc0\x05\x14\x05\x00\x00\xfd\x00E\x01\x00@?@Q\x00\x00\xd0\x0fP\x14\x00\x00\xf4\x03\x14\x05\x00\x00\xfd\x00E\x01\x00#h\xf5\x9f\xbf\xc2z\x05\x14\x05\x00\f\xa0gҍ\xa7\x01\xa1)\x06)\nå\xb4\xe5\xc8^{\xfeI\xf2\x88\x03\xd4r(\xf7\x88\xbf<\xc1\xcd7\x9a7\x98\xadi\xb5\xd6Gh\x1b\xcf\xf3\xe6\xbbZ\xe1\xc0h\xe7\xe9\x98\t\xdfw\x04\x82\xa4\x18\xa3(\f\x97\xd2{\xd9%\xf5w\xea\x0f\xec\x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x00\f\xa0}\xcc\xd6\x1e2H\x996\x86\xf0\x9b\xedm~s%B\x01(\n\x00\x18@\xfb\x98-]\xe8\xdf\xec\xff\xfek\xf9\x98\x05\xff\xb4y\xf3\x16\xfb7~\xfaP7P\x14\x000\x80\xf61\x9b;z6\xbe\xb6\xf9ᅫ\x9ft\xb8\xbe\xa9\xa9\xa9\xd5O\xef\xc6\aE\x01\x00\x03\x10\x14\xa5m\u0558\xff\xf4\x0f\xff\xfe\xeb\xde\xd72[z\xfa\xfb\xfds\x84\x02\x8a\x02\x00\x86 (J\xfc\x987>~-\xf3\xef\u007f\xff\x87Yu~:>\xc1\x80\xa2\x00\x80\x01\xb4\x8f\t\x1d3g\xf7\xa9\xd9\xdc\u007f\xfc\xba\xf97\xf9~:\x87\x82\x01E\x01\x00\x03h\x1f\xf3ZD^]k\xf9k\xb9\u007f\xff\x8f\u07fc\xe5\xc7\u007f\x16\x04E\x01\x00\x03h\u007fma~}G\u007f\xdbl\xee\xdf\xda~\x13Y\x0f\x8a\xc2D\xabr\x00\x00D\x9e\xfe\xd3qAPP\xcf\xe1\xdf\xfc\xa7\xdf\xfcç?\x82\xa20Ѫ\x1c\x00\x00\x91\x9e\xb6V\xf2H\xa0\xf6\xa2\x88\xf9[N\xc2<\n\x1b\xad\xcaG:\x8b\xb9\xb0\xdf\xfb\xcdCY\x80\x91\x8d\xf3rq\u007fۍ\xba\xeb\xfez\a>&\xa0\x15\xa5\xe5h\xee\xec0\xf1a\xf0m\x11\x87\\\xb9T\x12\x00\xf4\xa6\xbf\xa7\xa7\xc7\u007fG(\x86)\x8a\x86K)\x1d`,ǸKbbs\xd0\x17\xae<*\t\x00\xc0\xa00FQ4\\J\xa9\x00\xa3\xf9\x96;\xe5L\x95\x8cݎ<\x93\x00\x00\f\x06C\x14Eå\x94\x0e0\x1aYQ\xd0\xfa\xe0[\x8c$\x00\x00\x83\xc0\bE\xd1r)\xa5\x02\f\x87R\x94\x8e\xa9\xf1\x8c$\x00\x00\x83\xc0\bE\xd1r)\xa5\x02\f\xe7\x12wLJ\xaf\x0f\xe9b$\x01\x00\xf0\x1d#\x14\x05i\xb8\x94R\x01\x86\xd3\x13\x16q\xf2\x8eS\xe4N\xca\xe3\x15*\t\x00\x80\xef\x18\xab(l\x97R*\xc0x\x0es\x1c\xb7PL\xde\xe2\x0e\xb8r\xa9$\x00\x00\xbec\xac\xa2\xb0]J\xa9\x00\xc3\xe9\x98\x1d\xdf\xceH\x02\x00\xe0;\xc6*\nۥ\x94\n0\x1cJQ\xfag/`$\x01\x00\x18\x04F(\x8a\xa6K)\x15`4\xa7dE\xd9\xca]d$\x01\x00\x18\x04F(\x8a\xa6K)\x1d`$=-\x17\x17\a\xbb\xdcQ\x8f\x87|\x84<\x93\x00\x00\f\x06#\x14e\xc4\xf2\x16\xc7\xcd8\xe4L\xef\x1f\x1f\xdf\xe3\x99\x04\x00`P\x04\xb4\xa2\xb4\\\xbc\xe3J\xb6M\xfd\x82\x91\x04\x00`p\x04\xb4\xa2\x00\x00\xa03\xa0(\x00\x00\xe8\a(\n\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\a(\n\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\a(\n\x00\x00\xfa\x01\x8a\x12(\x9cI|\xa4\x15\x12\x10\x90\xed0\xb4N\xb4\xee\xab\x18ڵ\x8d0\fR\x14\xef.\xa5\x1dU\xf9\xf6C\x97\xe0\xff\xbe\xbeS\xcc\v\xccK(\x1b\x10?\xd6ĝq\x8f\xd8&\x04\x98\xefʟ\x0f\xf2\x058\xb8>,\x17\xd9î\xbbG3\x19L,\x8b\xc6(\xa1\r\x19\xd2GF#u\xa18\xe6\xcfR\xfa\xbe\x89_\ue664qn\a\xb6\x13mc\xf2\"˚\xda\xf7\xaf0\x16\xb9\xf0\xa1\x17\x9e\xab\b$\xdf[c\x14ŻKi{\ue87a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xd0W\x9c\x10\x1d\x97V\xf1\x9e)\t\xa5;g \x9c?\xaf\xfbb<\xff\xac\xd2\xf5AX\xc8\\\xb1G\xf2v\b^\x15?q\xeaR\xcfsPf祖U\xac)\xb0\x99\xacI\xce;͜\x8dlt6\x8c\x17\x0eQ\xaa\x91\x8aX\xaao\xae\x1e\xb3\xb7\x83\xb3\xb2d\xa4XE\xcd<|\xcf\xfc\t\x9e\x9fW\x83\xd0ݔE\xcbr*L\xb8\x98\x94t+&o\aډֵ[\xfeP\x96\xb3\xdc\x1c\x97\"^>s\xb5\x8c\xaeA\xee\x05\xdd\xc8+&\x9cgZӬ\xbe\x8a\x00\xf2\xbd5BQ\xfc\x86B\xdff\x17F\"\x03Y\xa6j\xad\x18\x8283\xcb`\x14w\x9eµ\x1dtt\xa2}d\xde\xf1\xe8ŋ'?}\xb6\xe8\t\xf9\xccX\x85\x8ek\x1b\xf1\x80\xa2\xf8L\u007f\xee\xa4\x15Z1#\x97\x81b\xdb/Z1\x18\x15E\x19ݝ\xa7\x10\xb7\x83\x9eN\xb4\xa7\x9dw\xe1\xf4ŊCJ\xcfU蹶\x11\x0f(\x8aϴ\x84\xad2|\xee\xd8xT\x14%0:\xffR\\\x8b\x12Ow\x9a\xa3njD\x06\x04\xa0(\x00\x858\x17\r\f\x86\xbe\f\xf3\x8e\xea\xda\xea\x1d\xe6\f\xb7\xbbq\x02\x13P\x14\x80\x82\xccE3.R\x01^\x188\xb3\xc1j\xb2&\x9f\x05A\xc1\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\a(\n\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xff\x1f\xec\x88D\xdc\xfa\xfa\x88\xfa\x00\x00\x00\x00IEND\xaeB`\x82", + "analysis/chan2b.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x04Q\x00\x00\x011\x08\x03\x00\x00\x00\x83\x0b\xcdh\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x03\x06\x02\x08\x0a\x06\x0e\x10\x0d\x19\x1a\x18!#\x20#$\"$%#%'$&(%'(&()'*+)+-*,-+-.,01/2313425747968:7:;9<>;>@=AB@CEBEGDFHEIKHKLJMOMPROSURUVTVXV,`\xae7]\xad[\\Z8^\xae8`\xaa]^\\:b\xab;b\xacIH=\x88k\x89Z\xcfsS\xdb\xe7\xf4L\xf7\xe9\x99\xd3\xd3\x836\x0d\xcc\xfc>\x7f\xcc\x9c9\xfd;\xa7\xcf\xe9\x9e\xfe\xce\xe9\xd3=\xfd\x1d\xf3\xeb+\x80\x00\x00\x00h\xc6h\xa9\x867\xb4*\x07\x00\x20\xc0\x00E\x01\x00@?@Q\x00\x00\xd0\x0fP\x14\x00\x00\xf4\x03\x14\x05\x00\x00\xfd\x00E\x01\x00@?@Q\x00\x00\xd0\x0fP\x14\x00\x00\xf4\x03\x14\x05xE\xfa\xb5\x02\x80@\x02\x14\x05x\x15Z\xe2\xa7poi\x05\x01\x01\x04(\xca\x08\xe6PD\xabV\x881\xb4E\x1cb/\xe8\x9f=\xdb^\xde\xc4^\x06\x04$\x06)\xca\xb1zW\xaa\xfe\xf0\xee\xfc\xf38\xd1Q\x95o?t\xa9\xc7-\xa9\xc6\xdfv,\x89I\xee\xf3\x16\xe1A\xe1XNd\xec\x01\xadPL\xdd\xfc\xd0)\x8b\x8fM\xb9\x87\xe2\x85\"\xa1\xd7\xb5\xc2\x09G9.\xa2\x1f\x1d\x10\x0a|\xa3\x1eT>\xb9\xc8\x95l]1%dA\xbf{\xae\x1a\x9b\xb9\x8dZ!/AM\xdc\x19\xad\x10\xc2i\x13/b:!4%\xe8\x0bf\xd0%\xee03\x1f\x08X\x8cQ\x94{\xd9\xdf\x89\x89\x9er\xfb\xa9\xa6\x8b\xd97\x10j\xcf=T\xd7t~wa\x8f\"\xa9\xca'q_\xa7\x9b\x9fx\x09\xf0d3WU\x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\xda\x00T\xc3X\x14\xb3/\xe6\x0ar\xcfU\xf1\x0d\x05\x80a\xc5\x08E\x01^\x95\x81,S\xb5[\x96\xaao(\x00\x0c'\xa0(\xa3\x82\x81b\xdb/\x8a\x0co\xbe\xa1\x000|\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\x07(\x0a\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\x07(\x0a\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\x07(\x0a\x00\x00\xfa\x01\x8a2\x829\x14\xd1\xaa\x15b\x0c\xe0\x89\x0a\xf8\x8aA\x8a\xe2\xdd\xa5T\xa0\xce\xfeR\x169CK.~\x80A\xd8\xfc\xa1|\x0c\xc9\xd7|T\xa5\xda\xb2\xcd\xdcF\xc5\xe7\x15\\P\xbeJ\xa8\x07\xda\xb1\xf1B\xdfB\xaf{\x8fA\xefd\x8a\xef\xe0\x89\x0a\xf8\x881\x8a\xe2\xdd\xa5\x14ao\xc1\x93y^\xca\x1b\xccQ\xa7\x86\xb4\xe5r_\x1c\xcd\x8d\xe0\x8ey\x0f\x7f\x15\x9e\\N,@l2\x83v+3Z\xaa\xc6mb\x87z\xa2\x1d{\xab\xaa*S\xcb\x9e\xe3;n\xad3\x05\x9e\xa8\x80o\x18\xa2(\x1a.\xa5\x02E\xe5wF\x90\xa2\xfcn\xb13Q\xc7\x1dA\xa8\x7f\xee,\xaf\xd1\xafH\x8a\x8a\xa2\xdc\x18\xbf\x16\xb9\x13\xec\xb3\xa2\xf8\x14\xfb\xad\x86\xa2\x1c\x9f&)\x0ax\xa2\x02\xbea\x84\xa2h\xba\x94\xa2\xba\xddO[F\x90\xa2HO\x94%\x8a\x822\xb9\xc1{\x20\xfb\x8e\x9a\xa2\xc4O\xf5\\\xab\x0f*!\xe1C\xac\x86\xa2\xbc\xc3-\x0e\x95\x14\x05\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\xa9\xd5O\xef\xc6\x07E\x01\x00\x03\x10\x14\xa5m\xd5\x98\xff\xf4\x0f\xff\xfe\xeb\xde\xd72[z\xfa\xfb\xfds\x84\x02\x8a\x02\x00\x86\x20(J\xfc\x987>~-\xf3\xef\x7f\xff\x87Yu~:>\xc1\x80\xa2\x00\x80\x01\xb4\x8f\x09\x1d3g\xf7\xa9\xd9\xdc\x7f\xfc\xba\xf97\xf9~:\x87\x82\x01E\x01\x00\x03h\x1f\xf3ZD^]k\xf9k\xb9\x7f\xff\x8f\xdf\xbc\xe5\xc7\x7f\x16\x04E\x01\x00\x03h\x7fma~}G\x7f\xdbl\xee\xdf\xda~\x13Y\x0f\x8a\xc2D\xabr\x00\x00D\x9e\xfe\xd3qAPP\xcf\xe1\xdf\xfc\xa7\xdf\xfc\xc3\xa7?\x82\xa20\xd1\xaa\x1c\x00\x00\x91\x9e\xb6V\xf2H\xa0\xf6\xa2\x88\xf9[N\xc2<\x0a\x1b\xad\xcaG:\x8b\xb9\xb0\xdf\xfb\xcdCY\x80\x91\x8d\xf3rq\x7f\xdb\x8d\xba\xeb\xfez\x07>&\xa0\x15\xa5\xe5h\xee\xec0\xf1a\xf0m\x11\x87\\\xb9T\x12\x00\xf4\xa6\xbf\xa7\xa7\xc7\x7fG(\x86)\x8a\x86K)\x1d`,\xc7\xb8Kbbs\xd0\x17\xae<*\x09\x00\xc0\xa00FQ4\\J\xa9\x00\xa3\xf9\x96;\xe5L\x95\x8c\xdd\x8e<\x93\x00\x00\x0c\x06C\x14E\xc3\xa5\x94\x0e0\x1aYQ\xd0\xfa\xe0[\x8c$\x00\x00\x83\xc0\x08E\xd1r)\xa5\x02\x0c\x87R\x94\x8e\xa9\xf1\x8c$\x00\x00\x83\xc0\x08E\xd1r)\xa5\x02\x0c\xe7\x12wLJ\xaf\x0f\xe9b$\x01\x00\xf0\x1d#\x14\x05i\xb8\x94R\x01\x86\xd3\x13\x16q\xf2\x8eS\xe4N\xca\xe3\x15*\x09\x00\x80\xef\x18\xab(l\x97R*\xc0x\x0es\x1c\xb7PL\xde\xe2\x0e\xb8r\xa9$\x00\x00\xbec\xac\xa2\xb0]J\xa9\x00\xc3\xe9\x98\x1d\xdf\xceH\x02\x00\xe0;\xc6*\x0a\xdb\xa5\x94\x0a0\x1cJQ\xfag/`$\x01\x00\x18\x04F(\x8a\xa6K)\x15`4\xa7dE\xd9\xca]d$\x01\x00\x18\x04F(\x8a\xa6K)\x1d`$=-\x17\x17\x07\xbb\xdcQ\x8f\x87|\x84<\x93\x00\x00\x0c\x06#\x14e\xc4\xf2\x16\xc7\xcd8\xe4L\xef\x1f\x1f\xdf\xe3\x99\x04\x00`P\x04\xb4\xa2\xb4\\\xbc\xe3J\xb6M\xfd\x82\x91\x04\x00`p\x04\xb4\xa2\x00\x00\xa03\xa0(\x00\x00\xe8\x07(\x0a\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\x07(\x0a\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\x07(\x0a\x00\x00\xfa\x01\x8a\x12(\x9cI|\xa4\x15\x12\x10\x90\xed0\xb4N\xb4\xee\xab\x18\xda\xb5\x8d0\x0cR\x14\xef.\xa5\x1dU\xf9\xf6C\x97\xe0\xff\xbe\xbeS\xcc\x0b\xccK(\x1b\x10?\xd6\xc4\x9dq\x8f\xd8&\x04\x98\xef\xca\x9f\x0f\xf2\x058\xb8>,\x17\xd9\xc3\xae\xbbG3\x19L,\x8b\xc6(\xa1\x0d\x19\xd2GF#u\xa18\xe6\xcfR\xfa\xbe\x89_\xee\x99\xa4qn\x07\xb6\x13mc\xf2\"\xcb\x9a\xda\xf7\xaf0\x16\xb9\xf0\xa1\x17\x9e\xab\x08$\xdf[c\x14\xc5\xbbKi{\xee\xa1\xba\xa6\xf3\xbb\x0bAR\xd8\xd4^\xf3\xc8z|\x90\xafp\x9cK\xe3\xf7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04\xa0(\x00\x858\x17\x0d\x0c\x86\xbe\x0c\xf3\x8e\xea\xda\xea\x1d\xe6\x0c\xb7\xbbq\x02\x13P\x14\x80\x82\xccE3.R\x01^\x188\xb3\xc1j\xb2&\x9f\x05A\xc1\x80\xa2\x00\x00\xa0\x1f\xa0(\x00\x00\xe8\x07(\x0a\x00\x00\xfa\x01\x8a\x02\x00\x80~\x80\xa2\x00\x00\xa0\x1f\xff\x1f\xec\x88D\xdc\xfa\xfa\x88\xfa\x00\x00\x00\x00IEND\xaeB`\x82", - "analysis/error1.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x04\xc1\x00\x00\x00\xbd\b\x03\x00\x00\x00\x8d\xa5\x9a\x96\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x02\x05\x01\n\x03\x01\x05\a\x03\x1e\x01\x00\v\r\n\x10\x12\x0f\x16\x17\x13y\x00\x01\x19\x1b\x18\x1b\x1b\x14\x83\x01\x00\x8c\x00\x00\x8c\x00\x04 \x1f\x19!# #$\"%%\x1e$%#&'%'(&+)\x1e()'++$*,)/,!-/,02/63(241\x98\x1b\x1b786;8,\x82%#:;9><0>?=C@4@B@\xa0*,CEB\x9c.-KH\tn\aPRP\xa9:e\xaf*{!bda)}*Bh\xb2egdLj\xafpiR.\x81.Em\xb1ikh\xb3XX0\x8301\x841/\x858Jq\xb5mol;\x86:Vu\xb4>\x89={t\\tvs@\x8b?B\x8c@@\x8dG\\z\xbay{xJ\x8eI^~\xb8\x84|d\xbbkkL\x90K~\u007f}O\x93Mb\x83\xbdN\x95UW\x95V\x82\x84\x81\x8f\x85hm\x87\xbdZ\x98Y[\x9aZ\x87\x89\x86\xc0{|]\x9c\\\\\x9dcr\x8d\u0096\x8cnd\x9dd\x8c\x8e\x8b{\x8f\xc0f\x9fg\x90\x92\x8f~\x93\xc4j\xa3jy\x96Ŕ\x96\x93s\xa4l\xa1\x96xq\xa5s\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\xe5\xe7\xe4\xe6\xe3\xe8\xe5\xea\xe5\xe7\xe4\xf2\xe4\xe5\xe6\xe8\xe5\xe3\xe9\xeb\xe7\xe9\xe6\xe8\xea\xe7\xeb\xed\xea\xf6\xf0\xef\xf2\xf4\xf1\xfe\xf8\xf7\xf9\xfb\xf8\xfe\xff\xfc!l\x99S\x00\x00 \x00IDATx^\xed\x9d\x0fXTם\xf7\xf7\xd9\xd9\xd8w\xd3$C\x03\x9b\x12-K^\xd6fm\xfb\xdc\xe1\x19\xa9\xbe+\f\x8d\x1d\x14\xd7?1+\xbeVQ\x8aV1\x1b1\x18\xe7a\x13\xa3\x82ƄL\n\x19%) B\xe6\x89E\x1eY3*\xbe\">\x19Me\xc1\x96hqm\x12\xe8S\xa6ѱ\xb6\xda\xe4\xf2(\xac\xe4y\xaf\xe7\xed\xa6\xe5y\xcf9\xf7߹ý3(\x03\x97\xd1\xdf\xe7\xd1;\x87;\xbf\xf3\xbb眹\xf7;\xe7\xfc\xee\x99{\xfejh\x14 \x00\x00\x00\xf3\x18\x1a\xfa\xabH*\x15\x8eH\xee\x01\x00\x00\xc6\x10P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x173\x15,p\xa0\xaa\xa2\xfa\x18O\x92\u0099\xba\x8a\xba\xceH\x19\x00\x00\x004\x98\xa8`A\xb7\xb7\xb3\xbb\xb3\xae\nK\x98\xe0\xf5\x9c\xee>Yq2R\x16\x00\x00\x00\x16\x13\x15\xac\xcbݍ\xb7\xbc\x1bw\xbd\xceT\\#;*\xf8Hy\x00\x00\x00\x18LT0D\xf5*\xe8\x0e \xe4=@wTB'\f\x00\x80;\xc1L\x05\xc3\xf4wW{\x05\x84\xea|\xf4/\xef\xfe\b\xe6\x00\x00\x00,\xa6*X\xd0\xedv{HO\xecX\xe5\x00\xde\x0ex\xea\"\xe5\x00\x00\x00`0U\xc1P0\xd0^M\"\xf9\xbc\xc7\x1b\xec\x0fx\xddՑ2\x00\x00\x000\x98\xab`\x98\x81\xea&\xbc\xbd\xe6\xc5ݱ\x16\xaf7\x925\x00\x00\x00\x83\x89\n6 З3n\xfa\xda\u007fM@\x95\xc7\xc2f\x00\x00\x00\xd0b\x9e\x82\t\x95b\xf8\xfeL\x05V\xb0A\x92\xea\"\xb7%\x01\x00\x00F\x8cy\n\x86\xaa\xe8\x14\n:\x8a\xect\a\x11\xe2\xab|\x91\xb2\x00\x00\x00\xb0\x98\xa8`]\xee\xa6\xce\xeeN\x1a\xc9\xefr\x9f\xec>S\xe9\x85\t\xad\x00\x00\xdc\x11&*\x18\n4UWԵ\x90y\x14\xe8t\xb5\xc7{Z\x88\x94\x01\x00\x00@\x83\x99\n\x06\x00\x000:@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]bK\xc1\\.\xbd$\x00\x00\xf7+&+X\xbb[z4~\xc0\xeb9\x10\xf1\t\xad\x1fs;u\x92\x84z\x8e\xe3\xcaQ9\xde\xd6\x0fϦ\xd0k\xe3\x16\xe1\x17\x176K\xeb\tc\xa7\xe5\xb8\xe3p\x98w\xef\xd0\xd9\xe8\xc0\a\xab\xc1/5\x1c\xc7\xea\xf7\x8b\x1cר\xfcq\xeeG\x8eY+[\x97|0,\xafH-k\x1b\x81\x17Gd{w\x8d\xfaً\x0e\xfb\x8f\xa2\xf28%\xed\x81\xc3\u007fX\xe3\xc3D(\xc3\xfd\x83\xb9\n\xc6W\x1c\xab\xa4\x89\xee\n_\x97\xaf\xa2;\x82y\x91\xfd\x8aN\x92\xc0\xbf\xcb\xed\xbe\x8e\xae\xbfŽ\x1b\xf6)\x89\x1d.;\xde^\xf2\xfbk9\xa3K|8\xcdi\xe1\xae\xe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8.\xcbl\x900\x00\x18k\xccU0\xbe\xe2\x18}\x80\x1f\xef\xf1\xb6w\x9f\xf4\xd4\xdd\x03\x12&+\xd8\xd06\xcbB\x900\x00\x18c\xccU0oS7U\xb0\xa6j\xf2\xa4\xbfkQ[\xb6\xdbDxKŗ\xa2\x84m\xb2,\x05\t\x03\x80\xb1\xc5T\x05k\xf7\xf0\xe2s\xf2\xeb\xc4'\xeb\xf9\xbca\xcdc\x02\xde\xe2\xfe\x93\xa8`C\xeb,\xf9\x01\x900\x00\x18K\xccT0\xbe\xa2KZ\xe9# >\x01\xfe\xd8D|D\xe8\x1d\xc2[v\xfd\xe9\xcb/\xc5\xd6ɵ\xac\x03\t\x03\x80\xb1\xc4L\x05\xf36\xb1k\x15!$Ti\x96b\x8cM\xb0\x82\xfd?\xb9\x136\xb4в!x\x0f\xc4\xf6\x00`\xc2b\xa2\x82uzx\xad\x82\x1d\xf3\\3\xb6\x8e\x15xK\xa9@:a\u007f9v\xf4\xe8Q\xdfc\x96b\x900\x00\x18;\xccS0\xbe\xa2S\x10\x84\xeeJA\x90v\xb4\xb8\xb5+\xba\xc6&X\xc1\x06i',\xc5\"R\xca\v\b\x00\x80\xb1\xc1<\x05\xbb\xe8\x96!됡A\x9f\xbb3R\x96X\x00+X?\xfaSŗCM\x969\x9b\xb6m+u7\x05A\xc1\x00`\xac0O\xc1\x84 \xa1\xdd\x13\xa4W8\xef\xad\fD\xca\x11\x13\xf0\x96m\xfc`\xb1e\xdb_\x86\xe2\xa7\xec\xef\xbcx\xb1;8`\xb9\xe7\x88\xd4\b\x000^\x98\xa7`\"R\x1c\xecZU\x1d\x8fE\xed\x1ex\xa0\x03Q\xb0u\x96I\u007f\xfb\xe5P\x95eW`\x00\x0f\x94\x91\xe5\xe6=\x06(\x180a0W\xc1\x84@\xbb'p\r\xa1\ue2aa\xee@ po̦ؖk\x99\xb6\xc1\xb2\xeb/\u007f\xf9\xdb'\xdb\xe9\\\nP0\x00\x18+\xccU\xb0\x00\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b\xe0A\xa8Y\x92\xb6\xa4V\xa0\xbfxc\xb3)\xd8K\\\xb32\x8b\xae \x83l\xfa\x87\xc0\xfd\xaf\x82\xf4\xb9%\xefڨ\xb3\xe3y\x8e\xf4\x95\xe4˵qey\x96-3/\xe4t\x13j\x16\xd8\x1d\x85\xf5\vlyFeP<\x8c\xben\xb8\x83\xd08\x83Kk\x14\xc37\xfa~\a\xb6\xa6\xdb\xf3B'@\x9c\x9dU\x86U\xac#\xd4֠d2j\xdd4\xce\x16\x95\x17Π\x8d\xca\x14\x9d\xf5\xa0f\xd3T\x88\x84ȕ\xfew}ڰI\x1al\xfb\xf6\xe4\xd9g\xac~U,NOa\u058c\xe5\x87FRH\xfdOHm\x12\xfdʳ|`#嵭<\x87BΒ\xe1\xce4\x06j\xd2%5\x89\xd8\xf5ԩ&s\x9e\x19\x95\xf7>\xc2\\\x05\x1b1\xafr\x1f\xeb$\xc7\x03et\x06L\x00\xfa\xed\xea\xc5z\x88\v\xed\x9cL\x00\xae\xa7\xbdx]\x10\xfa\xce\x16\xa6G\xabp\x13\xb2\x9a\x13\x88\x18Q0\xf3\x1e\xab\x03\n6\x91hT\xee\xbd\n\xef\xce\x1a\xdf\x13ad\x1c\x92F\xb9\x82#4\xfauwL\xd0jN bD\xc1\xcc\x03\x14l\xc2Pފ\xf2\xca\xe4?\xae8J\x8c\x83\x0e\xe6qV\xba\xf1y\x8e\xd3\r\xc0\xdf1\x13\xb4\x9a\x13\bP\xb0\xb0\x88\x91[`\"\xd0\xcf-{)s\xa2\x8f\xa8\x04W\x9a\xab\xb1\xb5\x11o#Y\x02\xd1\x01\x14,,4r\xdb\x1b\xc9\n\x18\x17\xca\xd2\xf2\"<\xf8o\"pxu\xa6-sMtƐ@d@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]bK\xc1\x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1\xf9Vu\x9dۭ:K\xde\x12t\x14\fm}\x0e=G\xa3\xfe\xec\xb2\xee\x05\x8e\v\xbd\xb3\xe8R\x8b\xea\xca\xf1\x9fq\xb5\xd4\f\x14\f\x00b\b\xf3\x14L\x84\t~\x85\x8d\x83\x8d\xa0\v\xa6\xab`\x1d\xf6+v\xbaT\a\xbb\xac;\x99M\xd1l#\xbb\x99\x95\xe3\x97g\xf5!\xd4c\x97\x14\xacww\f<\x92\x1d\x00\xee{\xccU0!\xd0\xee\t\\\vM\xeaQ\xa2\xf6\xbbJ\xf4\xba`\xfa\xab\xd7c\xb7\x99\xab3C\x96\x80\xef\xf3/w}0\xd8_\x90\xd9z\x9d]9\xfeBZVyY\xba\xb8N=Y\xec\xfdG\xc3\x0f\x02\x00\xc0\x04\xc3\\\x05\v\x90\xd8WUhR\x87\xebiE:I\x06\xfd\xd5\xeb15\xf6\x1a\xd1BYֽ\x96\u061d%s\xc5\xc8\xe2\x83\xea\xca\xf1=\x05\xe9sK\u07b5\x89\xd9\xea\x1d\xf5:G\x01\x00`ba\xae\x82\x8d\x98W\xb9\x8fu\x92\x00\x00\xdc\xe7Ĉ\x82\xc1cu\x00\x00\xd0!F\x14\f\x00\x00@\aP0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\xf3\x18\xe8\xef\xef\x1fDh\x10\xbf\fD\xb2\x05\x00@\x0fP0\xd38\x16g\xb5Z\x13y>\x11\xbf\xc4\x1d\x8dd\r\x00\x80\x0e\xa0`c\x88wf\x10\xa1k3\r\xd6\"\xaf\xb6z[Z\xda\x11joi\xf1Z\xab\xf5m\x00\x00\b\x8b\xc9\n\xd6\ue997w\xbf\x87>c\xda\x13\x8d\xc1\xd4~\xabDR\x18oMI\x06\xb2\x12\x9ek\xf9I\x89sF\xbc\xb0\xee6k1}\x89ۦ\xfbv\xb5\xb5[Nv߁\x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Oɏ\x00\x00\x00\x00IEND\xaeB`\x82", + "analysis/error1.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x04\xc1\x00\x00\x00\xbd\x08\x03\x00\x00\x00\x8d\xa5\x9a\x96\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x02\x05\x01\x0a\x03\x01\x05\x07\x03\x1e\x01\x00\x0b\x0d\x0a\x10\x12\x0f\x16\x17\x13y\x00\x01\x19\x1b\x18\x1b\x1b\x14\x83\x01\x00\x8c\x00\x00\x8c\x00\x04\x20\x1f\x19!#\x20#$\"%%\x1e$%#&'%'(&+)\x1e()'++$*,)/,!-/,02/63(241\x98\x1b\x1b786;8,\x82%#:;9><0>?=C@4@B@\xa0*,CEB\x9c.-KH\x09n\x07PRP\xa9:e\xaf*{!bda)}*Bh\xb2egdLj\xafpiR.\x81.Em\xb1ikh\xb3XX0\x8301\x841/\x858Jq\xb5mol;\x86:Vu\xb4>\x89={t\\tvs@\x8b?B\x8c@@\x8dG\\z\xbay{xJ\x8eI^~\xb8\x84|d\xbbkkL\x90K~\x7f}O\x93Mb\x83\xbdN\x95UW\x95V\x82\x84\x81\x8f\x85hm\x87\xbdZ\x98Y[\x9aZ\x87\x89\x86\xc0{|]\x9c\\\\\x9dcr\x8d\xc2\x96\x8cnd\x9dd\x8c\x8e\x8b{\x8f\xc0f\x9fg\x90\x92\x8f~\x93\xc4j\xa3jy\x96\xc5\x94\x96\x93s\xa4l\xa1\x96xq\xa5s\x81\x99\xc3\x97\x99\x96\x83\x9b\xc5\xa5\x9b}u\xaaw\x9a\x9c\x98\xc7\x91\x92\x9c\x9e\x9b~\xaby\x88\xa0\xca\x9e\xa0\x9d\x81\xad|\xab\xa0\x82\x8e\xa2\xc7\xa1\xa3\xa0\xa2\xa4\xa1\x81\xb1\x85\x92\xa5\xca\x8b\xb2\x88\xb4\xa7\x83\xa6\xa8\xa5\x8d\xb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xe4\xf2\xe4\xe5\xe6\xe8\xe5\xe3\xe9\xeb\xe7\xe9\xe6\xe8\xea\xe7\xeb\xed\xea\xf6\xf0\xef\xf2\xf4\xf1\xfe\xf8\xf7\xf9\xfb\xf8\xfe\xff\xfc!l\x99S\x00\x00\x20\x00IDATx^\xed\x9d\x0fXT\xd7\x9d\xf7\xf7\xd9\xd9\xd8w\xd3$C\x03\x9b\x12-K^\xd6fm\xfb\xdc\xe1\x19\xa9\xbe+\x0c\x8d\x1d\x14\xd7?1+\xbeVQ\x8aV1\x1b1\x18\xe7a\x13\xa3\x82\xc6\x84L\x0a\x19%)\x20B\xe6\x89E\x1eY3*\xbe\">\x19Me\xc1\x96hqm\x12\xe8S\xa6\xd1\xb1\xb6\xda\xe4\xf2(\xac\xe4y\xaf\xe7\xed\xa6\xe5y\xcf9\xf7\xdf\xb9\xc3\xbd3(\x03\x97\xd1\xdf\xe7\xd1;\x87;\xbf\xf3\xbb\xe7\x9c\xb9\xf7;\xe7\xfc\xee\x99{\xfejh\x14\x20\x00\x00\x00\xf3\x18\x1a\xfa\xabH*\x15\x8eH\xee\x01\x00\x00\xc6\x10P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x173\x15,p\xa0\xaa\xa2\xfa\x18O\x92\xc2\x99\xba\x8a\xba\xceH\x19\x00\x00\x004\x98\xa8`A\xb7\xb7\xb3\xbb\xb3\xae\x0aK\x98\xe0\xf5\x9c\xee>Yq2R\x16\x00\x00\x00\x16\x13\x15\xac\xcb\xdd\x8d\xb7\xbc\x1bw\xbd\xceT\\#;*\xf8Hy\x00\x00\x00\x18LT0D\xf5*\xe8\x0e\x20\xe4=@wTB'\x0c\x00\x80;\xc1L\x05\xc3\xf4wW{\x05\x84\xea|\xf4/\xef\xfe\x08\xe6\x00\x00\x00,\xa6*X\xd0\xedv{HO\xecX\xe5\x00\xde\x0ex\xea\"\xe5\x00\x00\x00`0U\xc1P0\xd0^M\"\xf9\xbc\xc7\x1b\xec\x0fx\xdd\xd5\x912\x00\x00\x000\x98\xab`\x98\x81\xea&\xbc\xbd\xe6\xc5\xdd\xb1\x16\xaf7\x925\x00\x00\x00\x83\x89\x0a6\x20\xd0\x973n\xfa\xda\x7fM@\x95\xc7\xc2f\x00\x00\x00\xd0b\x9e\x82\x09\x95b\xf8\xfeL\x05V\xb0A\x92\xea\"\xb7%\x01\x00\x00F\x8cy\x0a\x86\xaa\xe8\x14\x0a:\x8a\xect\x07\x11\xe2\xab|\x91\xb2\x00\x00\x00\xb0\x98\xa8`]\xee\xa6\xce\xeeN\x1a\xc9\xefr\x9f\xec>S\xe9\x85\x09\xad\x00\x00\xdc\x11&*\x18\x0a4UW\xd4\xb5\x90y\x14\xe8t\xb5\xc7{Z\x88\x94\x01\x00\x00@\x83\x99\x0a\x06\x00\x000:@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]bK\xc1\\.\xbd$\x00\x00\xf7+&+X\xbb[z4~\xc0\xeb9\x10\xf1\x09\xad\x1fs;u\x92\x84z\x8e\xe3\xcaQ9\xde\xd6\x0f\xcf\xa6\xd0k\xe3\x16\xe1\x17\x176K\xeb\x09c\xa7\xe5\xb8\xe3p\x98w\xef\xd0\xd9\xe8\xc0\x07\xab\xc1/5\x1c\xc7\xea\xf7\x8b\x1c\xd7\xa8\xfcq\xeeG\x8eY+[\x97|0,\xafH-k\x1b\x81\x17Gd{w\x8d\xfa\xd9\x8b\x0e\xfb\x8f\xa2\xf28%\xed\x81\xc3\x7fX\xe3\xc3D(\xc3\xfd\x83\xb9\x0a\xc6W\x1c\xab\xa4\x89\xee\x0a_\x97\xaf\xa2;\x82y\x91\xfd\x8aN\x92\xc0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J/\xe81p\xc6\xda2\x87`\x8as\x98\x13YF\xde\xf7\xaf\xce\xb29~\x94\x854\xa8\xb5`\xd9)^(\x85;Y\xbfXi\xb6\xba2\xc5\xe2\x14fR\x0do\xa6\xbbk\x97\xa5-\xa9\x153\xf6\x14:\xf01\x88\xecc\x05\xdb\x8a\x8fl\xff\x8c\xf1\xa0)\x0e\x83\xbdDn\xbeh6\xea\xa0C<\x9a\xd8\x8d\x96\x0bi\xf0\x01\xe8\xb7\x03[!\xf5\xc0\xca\x87E\x88\xd4\xea\x06\xce\xe4\xe20\xd945fZ]\xc9\xc6\xfa\xd5\x94A\xc7\x19\x10e\xccT0o\x13\x92\x14\xacN\\(\xf2X]8s\x97\xed\x92NR\xe2\x02\xd7<00\xd0L\x14\xac\x99s\xb56\x16p\x1d\x08}\xdch\xe3\x1c\xe553\xc8e\xdf3kA\xfd\xe1\xd5\\\xe8\xc5\xe6\xe2\xb66\xd78\x96\x09h\xa0\xb11k\xc1\x8c\xac\x92\"\xaeW\xe3\xf8\xac\xdf/\xf6DZgq%y\x9cc\xb7\xa3\x86\xfa\xcd\xda]\x9e\x95v\xc1\xc0\x19c\xcb\xece\x8a\xc3\x7f\xe0_\x90\xe7\xf7\xfb\x89\xe8\x9c\xe5\x8a\x1a\x8f\xd7;8\xed\xd8C\xad\x05K\xfd\x0fPG\xd6\x07hY=\xeb\x17+\x0d\xb7\xac\xb1q\x09)No\x16\xb7\xa6\xbccP,\x8e\xbd\xac\xb9\xcc^D\x92\xadi\xcb\xde:^No\x03`\x05\xbbR\xc4\xd5t\xb0\x1e\xd8\xe2\xb0\xd8\xb9E\x8d\x87\x1d\xa4\xf9\xa2\xda\xa8\xe7\xfc\x8d\\\xb9\xdfO\x15C)\xa4\x81\xad~;\xb0\x15b\x0e\xac|X\x91[\xdd\xc0\x99R\x1c&\x1b[c\xb6\xd5\x95l\x1a\xbfl\x19t\x9c\x01Q\xc6D\x05\xeb\xf4\xf0\xb2\x82U\x9e\xa4{NV\x861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9e3b\\\xc0\xfd\x08\x01Q\xc2\\\x05\x0b\x900X\x15M\x1d\xa8\xf0\x86\xf9]\xe4\xf5\xb4\"\x9d\xa4\x0a\xfb\xbbH\xa1f\x81\xddQX\xbf\xc0\x96\xf7\"\xfe\xdbv\x81L\xd0\xc1\xfd\x9b\x9e\x82\xf4\xb9%\xef\xdap\xd2%\xc52\xe87\xfe\xf1\x00\x83vP*\xc4\x1eX\xf9\xb0\x88A\x84V\xd7w\xa6\x16\x87\xc9\xa6\xf5\xc0\xb4\x99\x9aM\xf5\xcb\x96A\xcf\x191\xaew\x84\xfb\xf5.pG\x98\xab`#\xe6U\xeec\x9d\xa4yH\xe3\x04\x00\x00\xcc%F\x14l\xa2=V\x07\x14\x0c\x00&\x041\xa2`\x13\x0dP0\x00\x98\x10\x80\x82\xdd\x05b`V\xe6\xcdo=\xc4\xf2\xad7\xc3\xe4\x04\x00\x20\xaa\x80\x82\xdd\x0540\xdb+\xa6\xff\xa8\xd5/\xaaa\x7f\x0c\x9b\x1b\x00\x80\xa8\x01\x0a6J\x86\x0b\x18\x96\xb0H\x99\x00\x00\x88\x0e\xa0`\xa3\xe3M\x1d\x01{\xe8!\x18H\x02\xc0\xf8\x00\x0a6:\xf4\xba`\xd0\x09\x03\x80\xf1\x02\x14lt\xe8\x0a\xd8C\x0fE\xca\x06\x00@T\x00\x05\x1b\x1d\xa0`\x00`&\xa0`\xa3\x03\x14\x0c\x00\xcc\x04\x14lt\x80\x82\x01\x80\x99\x80\x82\x8d\x0eP0\x000\x13P\xb0\xd1qo)\x98wf0\x92\xc9\xb8sm\xa67\x92\x09p\x1fc\xb2\x82\xb5\xbb\x95\xd3\xd3\x17~\xb1\xc8\x11\xe3\xb1Z\xad\xc5\xa8\x18o+\xc2X]\x8c\xb7N\xc3/\xb9\xd8,\xb1+\x8c]$\"+X\xbe5\xae\xda0{\x08\xbb\xacqU\x91ld\xc6\xa0\x9e\xdb\xb0\xc3\xc848\x9dG\xc2\x1a\x1ct:\x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cbl\x900\x00\x18k\xccU0\xbe\xe2\x18}\x80\x1f\xef\xf1\xb6w\x9f\xf4\xd4\xdd\x03\x12&+\xd8\xd06\xcbB\x900\x00\x18c\xccU0oS7U\xb0\xa6j\xf2\xa4\xbfkQ[\xb6\xdbDxK\xc5\x97\xa2\x84m\xb2,\x05\x09\x03\x80\xb1\xc5T\x05k\xf7\xf0\xe2s\xf2\xeb\xc4'\xeb\xf9\xbca\xcdc\x02\xde\xe2\xfe\x93\xa8`C\xeb,\xf9\x01\x900\x00\x18K\xccT0\xbe\xa2KZ\xe9#\x20>\x01\xfe\xd8D|D\xe8\x1d\xc2[v\xfd\xe9\xcb/\xc5\xd6\xc9\xb5\xac\x03\x09\x03\x80\xb1\xc4L\x05\xf36\xb1k\x15!$Ti\x96b\x8cM\xb0\x82\xfd?\xb9\x136\xb4\xd0\xb2!x\x0f\xc4\xf6\x00`\xc2b\xa2\x82uzx\xad\x82\x1d\xf3\\3\xb6\x8e\x15xK\xa9@:a\x7f9v\xf4\xe8Q\xdfc\x96b\x900\x00\x18;\xccS0\xbe\xa2S\x10\x84\xeeJA\x90v\xb4\xb8\xb5+\xba\xc6&X\xc1\x06i',\xc5\"R\xca\x0b\x08\x00\x80\xb1\xc1<\x05\xbb\xe8\x96!\xeb\x90\xa1A\x9f\xbb3R\x96X\x00+X?\xfaS\xc5\x97CM\x969\x9b\xb6m+u7\x05A\xc1\x00`\xac0O\xc1\x84\x20\xa1\xdd\x13\xa4W8\xef\xad\x0cD\xca\x11\x13\xf0\x96m\xfc`\xb1e\xdb_\x86\xe2\xa7\xec\xef\xbcx\xb1;8`\xb9\xe7\x88\xd4\x08\x000^\x98\xa7`\"R\x1c\xecZU\x1d\x8fE\xed\x1ex\xa0\x03Q\xb0u\x96I\x7f\xfb\xe5P\x95eW`\x00\x0f\x94\x91\xe5\xe6=\x06(\x180a0W\xc1\x84@\xbb'p\x0d\xa1\xee\x8a\xaa\xee@\x20po\xcc\xa6\xd8\x96k\x99\xb6\x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xa9&s\x9e\x19\x95\xf7>\xc2\\\x05\x1b1\xafr\x1f\xeb$\xc7\x03et\x06L\x00\xfa\xed\xea\xc5z\x88\x0b\xed\x9cL\x00\xae\xa7\xbdx]\x10\xfa\xce\x16\xa6G\xabp\x13\xb2\x9a\x13\x88\x18Q0\xf3\x1e\xab\x03\x0a6\x91hT\xee\xbd\x0a\xef\xce\x1a\xdf\x13ad\x1c\x92F\xb9\x82#4\xfauwL\xd0jN\x20bD\xc1\xcc\x03\x14l\xc2P\xde\x8a\xf2\xca\xe4?\xae8J\x8c\x83\x0e\xe6qV\xba\xf1y\x8e\xd3\x0d\xc0\xdf1\x13\xb4\x9a\x13\x08P\xb0\xb0\x88\x91[`\"\xd0\xcf-{)s\xa2\x8f\xa8\x04W\x9a\xab\xb1\xb5\x11o#Y\x02\xd1\x01\x14,,4r\xdb\x1b\xc9\x0a\x18\x17\xca\xd2\xf2\"<\xf8o\"pxu\xa6-sMt\xc6\x90@d@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]@\xc1\x00\x00\x88]bK\xc1\xcc\xfby$\x00\x00\x13\x11\x93\x15\xac\xdd\xed\xd5I\x1a\xf11\xb7S')3\xd2\x95\xd8k\x8d\x97\xebR\xd6\xe7\x02\x00\x20&0W\xc1\xf8\x8ac\x95\xc3\x93\x86\x14\xa9\xeb\xdc\x16\x0d[\xf2v\xc4+\xb1\xf7\xf9\x97\x1b\xfeZ[Z\x9f\x0b\x00\x80\xd8\xc0\\\x05\xf36uW\x0eO\x1a\xd1\xc3\x95\xe8$U\x86=J\xce\x88\x02\xe3\xe7M\x0c{\xca4\x00\x00\x13\x18S\x15\xac\xdd\xc3\xcb\xebE2IC\\j\xbf\xcb5\xbc\x0bv\x07\x80\x82\x01\xc0=\x82\x99\x0a\xc6Wt\xc9+\xde2ICzm[u\x92\x12\xba\xab\xd77\xe2}\xe5\xca:\xf5\xea\xb2\xeeX\xc1\xb6\xe2\x9dv\xb2\xca\x8c\xbar\xfc\x95\xa2\xcc\xf4B\x18E\x02@,a\xa6\x82y\x9b\x945\xbb\x99\xa4!.\xdb%\x9d\xa4\x8c\xde\xea\xf5\xfd\xfeYe\xd7\xe5u\xea\x99e\xdd\xb1\x82])\xe2j\xc8\x83\xbf\xd4\x95\xe3{f-\xa8?\xbc\x9a\x03\x05\x03\x80\x18\xc2D\x05\xeb\xf4\xf0\xb2l1ICzm/\xea$Y\x94U\xbb\x94\xd5\xeb\x91\x8b,\x97\xf0<\x99x\xc1.\xeb\x8e\x15\xac\xc6N\x9f\xe0\xc4\xac\x1c\xbfrA?Ys\x0b\x14\x0c\x00b\x08\xf3\x14\x8c\xaf\xe8\x14\x04\xa1\xbbR\x10\xd8\xa41/\xa9O\x1ad\x92,\x8a\x82\x11\xc5\x12\x03Z\xad\xf6~\xd4\x9fF\x16\xd0f\x97u/(/\xe3\xc4\x99\x17\xea\xca\xf1}t\x89!q\x8dT\x00\x00b\x04\xf3\x14\xec\xa2[&\xc0$\x0d\xcd#.y\xab\xb7r*\x12\x1c\x87\xd0!\xba:\x04\xbb\xac{\x81c\xc6\"q-+u\xe5\xf8\xb3\x1c\xd19\x88\xe4\x03@La\x9e\x82\x09AB\xbb'\x18\x14\x98\xa4\xa1\xf9Vu\x9d\xdb\xad:K\xde\x12t\x14\x0cm}\x0e=G\xa3\xfe\xec\xb2\xee\x05\x8e\x0b\xbd\xb3\xe8R\x8b\xea\xca\xf1\x9fq\xb5\xd4\x0c\x14\x0c\x00b\x08\xf3\x14L\x84\x09~\x85\x8d\x83\x8d\xa0\x0b\xa6\xab`\x1d\xf6+v\xbaT\x07\xbb\xac;\x99M\xd1l#\xbb\x99\x95\xe3\x97g\xf5!\xd4c\x97\x14\xacww\x0c<\x92\x1d\x00\xee{\xccU0!\xd0\xee\x09\\\x0bM\xeaQ\xa2\xf6\xbbJ\xf4\xba`\xfa\xab\xd7c\xb7\x99\xab3C\x96\x80\xef\xf3/w}0\xd8_\x90\xd9z\x9d]9\xfeBZVyY\xba\xb8N=Y\xec\xfdG\xc3\x0f\x02\x00\xc0\x04\xc3\\\x05\x0b\x90\xd8WUhR\x87\xebiE:I\x06\xfd\xd5\xeb15\xf6\x1a\xd1BY\xd6\xbd\x96\xd8\x9d%s\xc5\xc8\xe2\x83\xea\xca\xf1=\x05\xe9sK\xde\xb5\x89\xd9\xea\x1d\xf5:G\x01\x00`ba\xae\x82\x8d\x98W\xb9\x8fu\x92\x00\x00\xdc\xe7\xc4\x88\x82\xc1cu\x00\x00\xd0!F\x14\x0c\x00\x00@\x07P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\x00\x00b\x17P0\xf3\x18\xe8\xef\xef\x1fDh\x10\xbf\x0cD\xb2\x05\x00@\x0fP0\xd38\x16g\xb5Z\x13y>\x11\xbf\xc4\x1d\x8dd\x0d\x00\x80\x0e\xa0`c\x88wf\x10\xa1k3\x0d\xd6\"\xaf\xb6z[Z\xda\x11joi\xf1Z\xab\xf5m\x00\x00\x08\x8b\xc9\x0a\xd6\xee\xa6\x97w\xbf\x87>c\xda\x13\x8d\xc1\xd4~\xabDR\x18oMI\x06\xb2\x12\x9ek\xf9I\x89sF\xbc\xb0\xee6k1}\x89\xdb\xa6\xfbv\xb5\xb5[Nv\xdf\x81\x82\xdde\xd1G\xca\xa9\xef;Ern\x871\xca9a\xfc&\x00\x8c#\xe6*\x18_q\x8c>\x98\x95w\x9f\x09`\x82\x91\xecG\x02\x7f,>\xd7\x87\xd9`\x0d\xe3\xce\x9b8r\xc9`\x98\x9d\xec\xceM\xe4#YI\xec\x8a\xf3\x88\x09\xef\xa3\xa5z\xefGR0\xdf\xe9\xe1\xfb\xd0]\x17}\xa4\xdcj\xcb~\xa5\x0d\xb3\xc7\xf9\xb9\xb1\xd1\x89\x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\x20\x00\xc4\"\xa0`\xb1\xcf\xe98q\xf8\xd8\x1e\x17\xe6N\x08\x00\xdc\x93\x80\x82\xc5>Bnb~\x95\xaf*?Q\xef\xf7\xe3\x00pO\x03\x0av/\xe0\x9d\x9d\x1c\x9f<\xe7\x0e\x1e\x9c\x01\x00\xf7\x08\xa0`\x00\x00\xc4.\xa0`\x00\x00\xc4.CC\xff\x1f\xf8\xaa\xf0z\xf7O\xc9\x8f\x00\x00\x00\x00IEND\xaeB`\x82", - "analysis/help.html": ` + "analysis/help.html": "\x0a\x0a\x0a\x0a\x0a\x0a

    \x0a\x20\x20When\x20invoked\x20with\x20the\x20-analysis\x20flag,\x20godoc\x20performs\x0a\x20\x20static\x20analysis\x20on\x20the\x20Go\x20packages\x20it\x20indexes\x20and\x20displays\x20the\x0a\x20\x20results\x20in\x20the\x20source\x20and\x20package\x20views.\x20\x20This\x20document\x20provides\x20a\x0a\x20\x20brief\x20tour\x20of\x20these\x20features.\x0a

    \x0a\x0a

    Type\x20analysis\x20features

    \x0a

    \x0a\x20\x20godoc\x20-analysis=type\x20performs\x20static\x20checking\x20similar\x0a\x20\x20to\x20that\x20done\x20by\x20a\x20compiler:\x20it\x20detects\x20ill-formed\x20programs,\x20resolves\x0a\x20\x20each\x20identifier\x20to\x20the\x20entity\x20it\x20denotes,\x20computes\x20the\x20type\x20of\x20each\x0a\x20\x20expression\x20and\x20the\x20method\x20set\x20of\x20each\x20type,\x20and\x20determines\x20which\x0a\x20\x20types\x20are\x20assignable\x20to\x20each\x20interface\x20type.\x0a\x0a\x20\x20Type\x20analysis\x20is\x20relatively\x20quick,\x20requiring\x20about\x2010\x20seconds\x20for\x0a\x20\x20the\x20>200\x20packages\x20of\x20the\x20standard\x20library,\x20for\x20example.\x0a

    \x0a\x0a

    Compiler\x20errors

    \x0a

    \x0a\x20\x20If\x20any\x20source\x20file\x20contains\x20a\x20compilation\x20error,\x20the\x20source\x20view\x0a\x20\x20will\x20highlight\x20the\x20errant\x20location\x20in\x20red.\x20\x20Hovering\x20over\x20it\x0a\x20\x20displays\x20the\x20error\x20message.\x0a

    \x0a
    \x0a\x0a

    Identifier\x20resolution

    \x0a

    \x0a\x20\x20In\x20the\x20source\x20view,\x20every\x20referring\x20identifier\x20is\x20annotated\x20with\x0a\x20\x20information\x20about\x20the\x20language\x20entity\x20it\x20refers\x20to:\x20a\x20package,\x0a\x20\x20constant,\x20variable,\x20type,\x20function\x20or\x20statement\x20label.\x0a\x0a\x20\x20Hovering\x20over\x20the\x20identifier\x20reveals\x20the\x20entity's\x20kind\x20and\x20type\x0a\x20\x20(e.g.\x20var\x20x\x20int\x20or\x20func\x20f\x0a\x20\x20func(int)\x20string).\x0a

    \x0a
    \x0a
    \x0a\x0a

    \x0a\x20\x20Clicking\x20the\x20link\x20takes\x20you\x20to\x20the\x20entity's\x20definition.\x0a

    \x0a
    \x0a\x0a

    Type\x20information:\x20size/alignment,\x20method\x20set,\x20interfaces

    \x0a

    \x0a\x20\x20Clicking\x20on\x20the\x20identifier\x20that\x20defines\x20a\x20named\x20type\x20causes\x20a\x20panel\x0a\x20\x20to\x20appear,\x20displaying\x20information\x20about\x20the\x20named\x20type,\x20including\x0a\x20\x20its\x20size\x20and\x20alignment\x20in\x20bytes,\x20its\x0a\x20\x20method\x20set,\x20and\x20its\x0a\x20\x20implements\x20relation:\x20the\x20set\x20of\x20types\x20T\x20that\x20are\x20assignable\x20to\x0a\x20\x20or\x20from\x20this\x20type\x20U\x20where\x20at\x20least\x20one\x20of\x20T\x20or\x20U\x20is\x20an\x20interface.\x0a\x0a\x20\x20This\x20example\x20shows\x20information\x20about\x20net/rpc.methodType.\x0a

    \x0a\x0a

    \x0a\x20\x20The\x20method\x20set\x20includes\x20not\x20only\x20the\x20declared\x20methods\x20of\x20the\x20type,\x0a\x20\x20but\x20also\x20any\x20methods\x20\"promoted\"\x20from\x20anonymous\x20fields\x20of\x20structs,\x0a\x20\x20such\x20as\x20sync.Mutex\x20in\x20this\x20example.\x0a\x0a\x20\x20In\x20addition,\x20the\x20receiver\x20type\x20is\x20displayed\x20as\x20*T\x20or\x0a\x20\x20T\x20depending\x20on\x20whether\x20it\x20requires\x20the\x20address\x20or\x20just\x0a\x20\x20a\x20copy\x20of\x20the\x20receiver\x20value.\x0a

    \x0a

    \x0a\x20\x20The\x20method\x20set\x20and\x20implements\x20relation\x20are\x20also\x20available\x0a\x20\x20via\x20the\x20package\x20view.\x0a

    \x0a\x0a\x0a

    Pointer\x20analysis\x20features

    \x0a

    \x0a\x20\x20godoc\x20-analysis=pointer\x20additionally\x20performs\x20a\x20precise\x0a\x20\x20whole-program\x20pointer\x20analysis.\x20\x20In\x20other\x20words,\x20it\x0a\x20\x20approximates\x20the\x20set\x20of\x20memory\x20locations\x20to\x20which\x20each\x0a\x20\x20reference—not\x20just\x20vars\x20of\x20kind\x20*T,\x20but\x20also\x0a\x20\x20[]T,\x20func,\x20map,\x0a\x20\x20chan,\x20and\x20interface—may\x20refer.\x20\x20This\x0a\x20\x20information\x20reveals\x20the\x20possible\x20destinations\x20of\x20each\x20dynamic\x20call\x0a\x20\x20(via\x20a\x20func\x20variable\x20or\x20interface\x20method),\x20and\x20the\x0a\x20\x20relationship\x20between\x20send\x20and\x20receive\x20operations\x20on\x20the\x20same\x0a\x20\x20channel.\x0a

    \x0a

    \x0a\x20\x20Compared\x20to\x20type\x20analysis,\x20pointer\x20analysis\x20requires\x20more\x20time\x20and\x0a\x20\x20memory,\x20and\x20is\x20impractical\x20for\x20code\x20bases\x20exceeding\x20a\x20million\x20lines.\x0a

    \x0a\x0a

    Call\x20graph\x20navigation

    \x0a

    \x0a\x20\x20When\x20pointer\x20analysis\x20is\x20complete,\x20the\x20source\x20view\x20annotates\x20the\x0a\x20\x20code\x20with\x20callers\x20and\x20callees\x20information:\x20callers\x0a\x20\x20information\x20is\x20associated\x20with\x20the\x20func\x20keyword\x20that\x0a\x20\x20declares\x20a\x20function,\x20and\x20callees\x20information\x20is\x20associated\x20with\x20the\x0a\x20\x20open\x20paren\x20'('\x20of\x0a\x20\x20a\x20function\x20call.\x0a

    \x0a

    \x0a\x20\x20In\x20this\x20example,\x20hovering\x20over\x20the\x20declaration\x20of\x20the\x0a\x20\x20rot13\x20function\x20(defined\x20in\x20strings/strings_test.go)\x0a\x20\x20reveals\x20that\x20it\x20is\x20called\x20in\x20exactly\x20one\x20place.\x0a

    \x0a\x0a

    \x0a\x20\x20Clicking\x20the\x20link\x20navigates\x20to\x20the\x20sole\x20caller.\x20\x20(If\x20there\x20were\x0a\x20\x20multiple\x20callers,\x20a\x20list\x20of\x20choices\x20would\x20be\x20displayed\x20first.)\x0a

    \x0a\x0a

    \x0a\x20\x20Notice\x20that\x20hovering\x20over\x20this\x20call\x20reveals\x20that\x20there\x20are\x2019\x0a\x20\x20possible\x20callees\x20at\x20this\x20site,\x20of\x20which\x20our\x20rot13\x0a\x20\x20function\x20was\x20just\x20one:\x20this\x20is\x20a\x20dynamic\x20call\x20through\x20a\x20variable\x20of\x0a\x20\x20type\x20func(rune)\x20rune.\x0a\x0a\x20\x20Clicking\x20on\x20the\x20call\x20brings\x20up\x20the\x20list\x20of\x20all\x2019\x20potential\x20callees,\x0a\x20\x20shown\x20truncated.\x20\x20Many\x20of\x20them\x20are\x20anonymous\x20functions.\x0a

    \x0a\x0a

    \x0a\x20\x20Pointer\x20analysis\x20gives\x20a\x20very\x20precise\x20approximation\x20of\x20the\x20call\x0a\x20\x20graph\x20compared\x20to\x20type-based\x20techniques.\x0a\x0a\x20\x20As\x20a\x20case\x20in\x20point,\x20the\x20next\x20example\x20shows\x20the\x20dynamic\x20call\x20inside\x0a\x20\x20the\x20testing\x20package\x20responsible\x20for\x20calling\x20all\x0a\x20\x20user-defined\x20functions\x20named\x20ExampleXYZ.\x0a

    \x0a\x0a

    \x0a\x20\x20Recall\x20that\x20all\x20such\x20functions\x20have\x20type\x20func(),\x0a\x20\x20i.e.\x20no\x20arguments\x20and\x20no\x20results.\x20\x20A\x20type-based\x20approximation\x20could\x0a\x20\x20only\x20conclude\x20that\x20this\x20call\x20might\x20dispatch\x20to\x20any\x20function\x20matching\x0a\x20\x20that\x20type—and\x20these\x20are\x20very\x20numerous\x20in\x20most\x0a\x20\x20programs—but\x20pointer\x20analysis\x20can\x20track\x20the\x20flow\x20of\x20specific\x0a\x20\x20func\x20values\x20through\x20the\x20testing\x20package.\x0a\x0a\x20\x20As\x20an\x20indication\x20of\x20its\x20precision,\x20the\x20result\x20contains\x20only\x0a\x20\x20functions\x20whose\x20name\x20starts\x20with\x20Example.\x0a

    \x0a\x0a

    Intra-package\x20call\x20graph

    \x0a

    \x0a\x20\x20The\x20same\x20call\x20graph\x20information\x20is\x20presented\x20in\x20a\x20very\x20different\x20way\x0a\x20\x20in\x20the\x20package\x20view.\x20\x20For\x20each\x20package,\x20an\x20interactive\x20tree\x20view\x0a\x20\x20allows\x20exploration\x20of\x20the\x20call\x20graph\x20as\x20it\x20relates\x20to\x20just\x20that\x0a\x20\x20package;\x20all\x20functions\x20from\x20other\x20packages\x20are\x20elided.\x0a\x0a\x20\x20The\x20roots\x20of\x20the\x20tree\x20are\x20the\x20external\x20entry\x20points\x20of\x20the\x20package:\x0a\x20\x20not\x20only\x20its\x20exported\x20functions,\x20but\x20also\x20any\x20unexported\x20or\x0a\x20\x20anonymous\x20functions\x20that\x20are\x20called\x20(dynamically)\x20from\x20outside\x20the\x0a\x20\x20package.\x0a

    \x0a

    \x0a\x20\x20This\x20example\x20shows\x20the\x20entry\x20points\x20of\x20the\x0a\x20\x20path/filepath\x20package,\x20with\x20the\x20call\x20graph\x20for\x0a\x20\x20Glob\x20expanded\x20several\x20levels\x0a

    \x0a\x0a

    \x0a\x20\x20Notice\x20that\x20the\x20nodes\x20for\x20Glob\x20and\x20Join\x20appear\x20multiple\x20times:\x20the\x0a\x20\x20tree\x20is\x20a\x20partial\x20unrolling\x20of\x20a\x20cyclic\x20graph;\x20the\x20full\x20unrolling\x0a\x20\x20is\x20in\x20general\x20infinite.\x0a

    \x0a

    \x0a\x20\x20For\x20each\x20function\x20documented\x20in\x20the\x20package\x20view,\x20another\x0a\x20\x20interactive\x20tree\x20view\x20allows\x20exploration\x20of\x20the\x20same\x20graph\x20starting\x0a\x20\x20at\x20that\x20function.\x0a\x0a\x20\x20This\x20is\x20a\x20portion\x20of\x20the\x20internal\x20graph\x20of\x0a\x20\x20net/http.ListenAndServe.\x0a

    \x0a\x0a\x0a

    Channel\x20peers\x20(send\x20\xe2\x86\x94\x20receive)

    \x0a

    \x0a\x20\x20Because\x20concurrent\x20Go\x20programs\x20use\x20channels\x20to\x20pass\x20not\x20just\x20values\x0a\x20\x20but\x20also\x20control\x20between\x20different\x20goroutines,\x20it\x20is\x20natural\x20when\x0a\x20\x20reading\x20Go\x20code\x20to\x20want\x20to\x20navigate\x20from\x20a\x20channel\x20send\x20to\x20the\x0a\x20\x20corresponding\x20receive\x20so\x20as\x20to\x20understand\x20the\x20sequence\x20of\x20events.\x0a

    \x0a

    \x0a\x20\x20Godoc\x20annotates\x20every\x20channel\x20operation—make,\x20send,\x20range,\x0a\x20\x20receive,\x20close—with\x20a\x20link\x20to\x20a\x20panel\x20displaying\x20information\x0a\x20\x20about\x20other\x20operations\x20that\x20might\x20alias\x20the\x20same\x20channel.\x0a

    \x0a

    \x0a\x20\x20This\x20example,\x20from\x20the\x20tests\x20of\x20net/http,\x20shows\x20a\x20send\x0a\x20\x20operation\x20on\x20a\x20chan\x20bool.\x0a

    \x0a\x0a

    \x0a\x20\x20Clicking\x20on\x20the\x20<-\x20send\x20operator\x20reveals\x20that\x20this\x0a\x20\x20channel\x20is\x20made\x20at\x20a\x20unique\x20location\x20(line\x20332)\x20and\x20that\x20there\x20are\x0a\x20\x20three\x20receive\x20operations\x20that\x20might\x20read\x20this\x20value.\x0a\x0a\x20\x20It\x20hardly\x20needs\x20pointing\x20out\x20that\x20some\x20channel\x20element\x20types\x20are\x0a\x20\x20very\x20widely\x20used\x20(e.g.\x20struct{},\x20bool,\x20int,\x20interface{})\x20and\x20that\x20a\x0a\x20\x20typical\x20Go\x20program\x20might\x20contain\x20dozens\x20of\x20receive\x20operations\x20on\x20a\x0a\x20\x20value\x20of\x20type\x20chan\x20bool;\x20yet\x20the\x20pointer\x20analysis\x20is\x0a\x20\x20able\x20to\x20distinguish\x20operations\x20on\x20channels\x20at\x20a\x20much\x20finer\x20precision\x0a\x20\x20than\x20based\x20on\x20their\x20type\x20alone.\x0a

    \x0a

    \x0a\x20\x20Notice\x20also\x20that\x20the\x20send\x20occurs\x20in\x20a\x20different\x20(anonymous)\x20function\x0a\x20\x20from\x20the\x20outer\x20one\x20containing\x20the\x20make\x20and\x20the\x20receive\x0a\x20\x20operations.\x0a

    \x0a

    \x0a\x20\x20Here's\x20another\x20example\x20of\x20send\x20on\x20a\x20different\x20chan\x0a\x20\x20bool,\x20also\x20in\x20package\x20net/http:\x0a

    \x0a\x0a

    \x0a\x20\x20The\x20analysis\x20finds\x20just\x20one\x20receive\x20operation\x20that\x20might\x20receive\x0a\x20\x20from\x20this\x20channel,\x20in\x20the\x20test\x20for\x20this\x20feature.\x0a

    \x0a\x0a\x0a

    Known\x20issues

    \x0a

    \x0a\x20\x20All\x20analysis\x20results\x20pertain\x20to\x20exactly\x0a\x20\x20one\x20configuration\x20(e.g.\x20amd64\x20linux).\x20\x20Files\x20that\x20are\x20conditionally\x0a\x20\x20compiled\x20based\x20on\x20different\x20platforms\x20or\x20build\x20tags\x20are\x20not\x20visible\x0a\x20\x20to\x20the\x20analysis.\x0a

    \x0a

    \x0a\x20\x20Files\x20that\x20import\x20\"C\"\x20require\x0a\x20\x20preprocessing\x20by\x20the\x20cgo\x20tool.\x20\x20The\x20file\x20offsets\x20after\x20preprocessing\x0a\x20\x20do\x20not\x20align\x20with\x20the\x20unpreprocessed\x20file,\x20so\x20markup\x20is\x20misaligned.\x0a

    \x0a

    \x0a\x20\x20Files\x20are\x20not\x20periodically\x20re-analyzed.\x0a\x20\x20If\x20the\x20files\x20change\x20underneath\x20the\x20running\x20server,\x20the\x20displayed\x0a\x20\x20markup\x20is\x20misaligned.\x0a

    \x0a

    \x0a\x20\x20Additional\x20issues\x20are\x20listed\x20at\x0a\x20\x20tools/godoc/analysis/README.\x0a

    \x0a", - + "analysis/ident-def.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x03\xd2\x00\x00\x00\xf5\x08\x03\x00\x00\x00\x8b\x0c=\xff\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE!#\x20#$\"$%#($#&'%'(&-'\")+(4,\",.+01/>/\"241A2%685G6$8:7;<:Q9$>@=W>#AB@CEB\\B'cC$GIF\x00f\x00\x00g\x00\x00h\x00gF'\x00i\x01KLJ\x00j\x02\x02k\x03\x04l\x05mJ&\x06m\x06sJ(OQN\x0bo\x08\x0ep\x0awN&\x0aq\x16TUS\x10q\x0c\x0cr\x17\x0fs\x18~R%WYV\x12u\x1a,`\xae7]\xad\x15v\x1c\x86T)\x16w\x1d[]Z9a\xab\x19y\x1e^_];b\xace\xaf)z\x20ac`+{\"(|*\x92]%cebAh\xb2egd+\x7f,\x9a_)Li\xafDl\xb0.\x81.ikh0\x830Ho\xb31\x841/\x858Jq\xb6mol\xa3f);\x86:Us\xb3\xabg->\x88B\x8c@\xb3m,vxu@\x8dGC\x8dA\\z\xbbxzwI\x8dH]}\xb7K\x8fJ\xb9r*_\x80\xbaM\x91L}\x7f|\xc1s-O\x93MP\x94Oc\x84\xbeN\x95U\x81\x83\x80\xc7x+W\x95VX\x97Xm\x87\xbcY\x98Y\xd1z(Z\x99Z[\x9aZ\x87\x89\x86\\\x9b[r\x8c\xc2\xd6~-^\x9d]\\\x9dc\x8a\x8c\x89d\x9ddz\x8f\xbff\x9ff\x8f\x91\x8eh\xa1h\xde\x85+~\x93\xc4j\xa3j\x92\x94\x91k\xa4ky\x97\xc6s\xa4lq\xa5s\x95\x97\x94\xec\x8a,\x83\x9b\xc5\x98\x9a\x96\x9a\x9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xdf\xda\xdc\xde\xdb\xda\xdf\xe2\xd7\xe1\xdc\xe0\xde\xe2\xde\xe0\xdd\xd8\xe2\xdd\xdd\xe2\xe5\xe0\xe2\xdf\xe2\xe4\xe1\xdf\xe5\xe7\xe4\xe6\xe3\xe8\xe5\xea\xe2\xe7\xea\xe5\xe7\xe4\xe6\xe8\xe5\xe4\xe9\xec\xe7\xe9\xe6\xfe\xff\xfc\x93\x8dkM\x00\x00\x20\x00IDATx^\xed\x9d\x7ft\x14\xd5\xdd\xff\x07%\x064*\x15\xe1y<\xb3=lbJ0@\x94\x86F\xac(\x98o\xe5\xb4\x86\xf4\x89i\xfa\x8d\xf6\xa4R\x7f`A\x10\x1a\xcd\x93\xc3\xb1\"\x02\x15\x1e\x8c\xf5l\xea\x81\xd8\xb4\x91`h\xf6(\xb89r\xb2\x12\xe4\xc8\xba(<\x12\xda''\x94\xd2\xf6!\xc5\x08\xc8S(\xc8\x93v\xd7\xd4\xb3\xde\xef\xf9\xde{\xe7\xd7\xbd\xb3wfv\x03a\xc8\xec\xe7\xf5\xc7\xee\xec\xe43\xf7\xde\xf9\xcc\xbc\xf7\xde;;\x99\xb7\xf4\xff.\x00\x04\x00\xc0e\x86\xe4$[;\x9c\x0a\x07\x00\xe0R\x03\x92\x06\x00O\x01\x92\x06\x00O\x01\x92\x06\x00O\x01\x92\x06\x00O1\x92$]_/Z\x04\x00\x80\xc1=I\xf7w4\x07Zv\x9dS?u\x07\x82\xb6\xd1\x98?\xc9\xeb\x04\x8b\x84_\xcb\x849\xed\xc9\xdbX\xf0\xb1O.u\x8a\xb1'\xc5\x12\x9e\x95\xe5\x90S\xccP\xe9$;]\x82\x17z\x17\x14\x16TE\xca\xf6!\x94h\x983\xcd7\xed\x9eF\x84\xa2\xb2\\\x95@!\x1c\x11q*\xc7\x0e\xf1n\xa6\xb8\xf3\xa8\x0eW\x9f\xd7\xe7\x14\xa5s\xb6\xbe(wA\xc2)*\x89\xc8\xf4\x9dN!\x19\x85k\x92>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\xa2\xbd\xa14o\xfaB\xf2M\x97h\x98S\x20\x17\xcciL\xd0\x12B\xb8[,2Of\xb4*\xf8\x8a\xd3H\x14\xbb\x96\xa5\xd5\xdfJ\xdf\x99D\xd5\xa9\xb3f\xd2\xe7\xf6U\xe7\xe6\xd7\xbch\x99\x87x\x01\x8d\xf4\xfd\xd9t\x00\xb4\xe6$\x8a\xf0\xfe\xe4\xcby!\xd3\x1c\xfc\xb7j\x15\xf4\xd8\xeb\x89\xb2:,\x19\x81{\x92N\x83\x17\xe5?\x09\x16\x01\x00HfDH\x1a\xfe\xab\x12\x00ReDH\x1a\x00\x80T\x01I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x18I\x92\x86[\xbd\x01\xc0\x11\xf7$m\x18\xe8\xc4\x9a\x94\xe7\x149\xf8BX\x1b\xe8\x10\x86\xcdF%U\xb7\x98\xa1\xe3\xd8t\xc7\x00\x95\xa1\xda\xf5\xa4it#&\xd5FR\xd2O\xeaP\xf7-\xf3pM\xd2\x8c\x81\xce\xb9\xc0\xfe~\xccI\x87-\xac\x0dt\x08\x86\x8d\x8a#i\xfa\xac\xa4f\x95s\x018:\xc08\xed\xdb\x85\xda\xf5\xa4it#F\xd8H\xcb\xec\x08\x92j\x9f\xc9\xa1\xee[\xe6\xe1\x9a\xa4\x19\x03\x9ds\x81\xa3N\xd1\xc8\xde@\x87\x90\xfa\x03^\xd3\xf5YI\xd1*g\xe88:\xc08\xec\xdbE\xb0\xebI\xc3\x15\xc3\x0aQ#\xad\xb3\x93\x9cT\xa7L\x0ey\xdf2\x0c\xd7$\xcd\x18\xe8\xa4&i;\x03\x9d\xf4H\xd7g%E\xab\x9c\x8b\xc0\x10\x0b\xbb\x08v=\x17A\xd2\"\xacw(9\xa9N;?\xe4}\xcb0\x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0b\x12\x19\xd2\x18\xb6/l\x09b\xb7\x18\xce\x9e\xc5(L\xf7z\xb1\xb4\xe0\x11\xb9\xba\x88\x1d`\x84\x01\xdc\xbe\xb1\xa4l\xd7\x83.\xdc\xe8\x86M\xaaa\xb6c\xd5Hc\x87\x9c-x\x04\x994U\\s\x20R5E9\xfc\xeb\xee\x98\x92|\xba\xe8\xfb\x86Y(/H\xfa{f\xe0\x9a\xa4Y\x03\x9d\x13\x1d\xcd\x81`\xb7\xb5\xa2\x9d\x0ct\x18\x1b\x15\xce\x17\xc6\xbf\xba\xbe`F-=\xffY\xff\x16\x91!\x8da\xfb\xc2\x95\x20t\x8b\xe1\xecY\x8c\xc2t\xeb\x19\x0b\x0b\x1e\xb1\xab\x8b\xd8\x01F\x18\xc0{\xde0\xa4l\xd7C\xb80\xa3\x1b.\xa9\x86\xd9\x8eU#\x99\x1dr\xb4\xe0\x11d\x92\xa3\xb4qI\xbeZ1\xb9\x81PtEE\xdb7L\xfb\xf4vA@&\xe0\x9e\xa4\xd3`\xa8\x06:p\xbf\xd10py$5\xe6\xcfL\xc3\xab\x14\x18\x11\x92\x1e\xea\x7fU^\x1eg\x9f\xc7\xb8<\x92\x1a\x82+\xdbV\x8c\x08I\x0f\x95\xcb\xe3\xec\xf3\x18\x97AR\x1b#\xa8\xba\xc1)(c\xf1\xb0\xa4\x95\x0b5\xc0E\xe5rHjL._Yt\xde)*c\xf1\xb0\xa4\xe9\x85\x1a\xe1\x8df\xc0\x90\xb9,\x92\xda\x90_m\xbe\x11\x1e\xd0\xf1\xb0\xa4\x01\x20\x13\x01I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x18I\x92\x1e\xea\xad\xde\x00\x90A\xb8'i\xc3@\x07\xd3\xb3\xad\xa9e\xaf}\xbc\x83\x81\x0e\x00\x00\x04\xd7$\xcd\x18\xe8\xa0xG`\xf7\x91\xbd\x81C\xf6[\xd8\x1b\xe8\x00\x00@pM\xd2\x8c\x81\x0e\xea\x20\x9e\x1b'\xe9\xa25N\x06:\x00\x00\x20\x17%\xcd\x18\xe8\xf4+O\x1d;g\x1f\x7f\xf1\x0ct\x00\xc0\xc3\xb8'i\xa4\x1b\xe8\xec\x0e\x0c:\x19\xb99\x18\xe8\x00\x00\xa0\xe2\xa2\xa4u\x03\x9d`\xb0gk\xa0y\xd7\x85\x18\xe8\x00\x00\xa0\xe0\xa2\xa4u\x03\x9d\x16j\xa0\xd3\xdcra\x06:\x00\x00\x20w%\x8d\xb4\xe7x\xd3\xbez\x20\xb0\xc7&\xd0\xd9@\x07\x00\x00\xe4\xa2\xa4\x19\x03\x1d\xd59'l\xe3\xb6\x91\x82\x81\x0e\x00\x00\xc8=I\xb3\x06:{\x9b\xa8\xbc;.\xcc@\x07\x00\x00\xe4\x9e\xa4Y\x03\x1d\xc5:\xe7\\\xc0\xfa\xf6\xb1T\x0ct\x00\x00@.J\x9a1\xd0A{\x03{\x8fv7m\x15\xd8\xb4\xaa8\x19\xe8\x00\x00\xa0\xe2\x9a\xa4Y\x03\x1dt(\x18\xd8\xb2\xd7Z\xd1\x8e\x06:\x00\x00\xa8\xb8'\xe94\x18\xaa\x81\x0e\x00d\x1e#B\xd2\xf0_\x95\x00\x90*#B\xd2\x00\x00\xa4\x0aH\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\xc5H\x924\xdc\xea\x0d\x00\x8e\xb8'i\xdd@g\xb0)\xa0\xd0l\xbf\x81\x9d\x81N\xef\x82\xc2\x82\xaaH\xd9>\xf36\xb6<+\xcb!\xa7\x18\xf2\x88a\xb9\xd4)\xe6\xa2\x11\x99\xbe\xd3)D\xe7l}Q\xee\x02\xc7\x87%#T%\x93\xfd\x0c\xe1\xd7*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-m\\\x92?\xa3V\xb9\xd8b\x1cB\xed\xb8q\x87\xc5\x1b\xb8'\xe94\x00\x03\x1d\x00H\x95\x11!i\xf8\xafJ\x00H\x95\x11!i\x00\x00R\x05$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9e\x02$\x0d\x00\x9eb$I\x1an\xf5\x06\x00G\xdc\x93\xb4n\xa0\x83\xd0\xc0\xae-\x81-\xbb\x06\x1c6\xb03\xd0\xd1\xb9\xf4\x86)\xe9x\xde0\x88Mf:\xc9\xff\x0c\x92'\xd8\x1a\x8e@\x89\x869\xd3|\xd3\xeei$O'\x91\xab\x12\xd4\x09\xc7\xf4\xbf\x84Cm\x83\x90\xce\xd2\xdc\xb2Py\xd2\x7f\xa4\xda\x93\x86\xa5\x0d0\xcc\xb8&i\xc3@\x07\x9dk\xda\xdas\xb4gK\x93\xfd\x93M\xec\x0ct\xd26\xc5\xb9\x88\xa4\xe3y\xc3\x206\x99\x19\xd8\x17-Xt\x98s\x04\x8a\xc8\x0b\xda\xba\xda\x17\xcaQ\x14\x8f\xc8\xb9Q\x14\x0b\xc9\x11\xf3\x03#\x84m\x18\x9a/\xcc\xebrm\xe7Z9\xdd\xc7\xf8\xa7ai\x03\x0c3\xaeI\x9a1\xd0\x09\xb7\x90\xe7\xfe\x0c\xb6\x84m7\xb03\xd0I\xdf\x14\xe7\"\x92\xba\xe7\x0d\x83\xb5\xc9L\xe1Z\xc49\x02\xad.\x20\x02\x8eOYM\x9e\x08X[\x87\xd0\xc7r\xf2v\xa26\x0c\xc9\x17\xa6On\xc0\xaf\xab\xd3\x954J\xc7\xff\x02\x18V\\\x934c\xa0\xd3\xb1\x95\xae\x08\xda?\x9d\xdf\xce@'\xe9\xa9\x9f\x97=\xd6&3T\xd2\x8c#P5}\xbe&\xaa\xa8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x7f\x97\xfe\x15]\xf9\xd51\xd7~\xe3\xc1+\xa5[\x99XZ\x8c\xb6\x9bx\xae\x9b\xc5\xff$\x87\xd93J\x99\xbc\x06\xd0\x0f\xf0\xeb\xe8\xeel\xfcJ\xf2\x10\x7f('{\xaa2%\xd5R\xb2_\x09%=k\xfcj\xbax\x05\xf9\x95+\xb1fBV\xce\xbc\xc0\xf8\xd1\xb8_gs\xc6d\x12\x9d\xb8b\xde\xfe\x13\xf8\x20\xc6\xfb\xf7\xce\xcb\xd2\xe6P\x82=\x16\xd7\xc6,\xe2\xea\xd6\xdf\x94}\xd3K\x09\xd3Z\x0e\xad6\x20\x09\xf7$}\x89xht\x8bS\xc8\xa5\xa2yt\xa5\xf9\x8e\x89\x8b\xf6\x9fX\x97\xc1nn\x9dH/y\xcd\x95\xa4\xafh\x17\xcaE{|\x91Pk\x03\x92\xf0\xbc\xa4\xd1\x9aq'\x9cB.\x0dg\xae{.y\xa5\x93`\x9dQ\x0b\xba\x1cv\xf3\xc4~\xdc;\xf7\x7fxL\xfb,\xdc\xe3\x8b\x06\xad\x0dH\xc2\xfb\x92\xbe\xbcq\x12\xac3N5\x00\x19\x06H\xda]\x9c\x04\xeb\x8cS\x0d@\x86\x01\x92v\x17'\xc1:\xe3T\x03\x90a\x80\xa4\xdd\xc5I\xb0\xce8\xd5\x00d\x18\x20iwq\x12\xac3N5\x00\x19\x06H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\xda+\xc0\x0d\xcf\x00\x05$\xed\x09\xc0N\x06\xd0\x00I{\x01\xb0\x93\x01t\\\x95tw@\xfd\x97\x9d\xfe`\xa0\xc3\x9d{\xf0\x19g\x19\x0b\xb7\x18{S\x9c!\x13\xbc:\xf5\x07\xe2i\x8d\xac\x94$)\xfb\x90\x20\x00\xecd\x00\x1d7%}.\xb0K\xf9\xef\xf9c\x81\xf0\xa1p@\xff\x07\x9eK\x09\xe3,c\xe1\x16\xe3`\x8a3T\x16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3{\x82\xfdWH\xd2\xf2C\xf3\xc7g\xdf>\x88?5M\xce\x9e\xf0\xc8\x00\x1e\x93\xa8O\x19\x9aD\x9eC4\xaa\x09\x1d\x19-M\xe4bY\xd7\x1c\x96\xe13\xf1\x01\xbc\x88{\x926\x0ct\x08^\x92t\xac\xa5\xf9+\x13\xc6\x8e{d\xbe\x84\xd5Y9\xea\xa1\xe0\xfa\x9cI\x094\xb0+\xc0\x88\xc4-I+xw.\xad\xf5\xc7\x1dR\x0by[\xfe\x1cy\x9d:\x15\xa1\x13tE\xf6b\xfc\xad69\x8b\x8f\x15JzXM|\x00\x0f\xe2\xa6\xa4u\x03\x9dX\x7f\x7f`G\xbf\xc9ay\xe42\xb8\x9b^\xdbVT\xb6X\x9a\xd7\x12\xacT\x9cgWd\xad\xd9z[\xf61\xbc45\xe7\xb9\xe7&KW\x04z\x98X\xd65\x87a\x18M|\x00/\xe2\xa6\xa4u\x03\x9d\xbd\xca\xac\xfa\x9c\xd3\x06#\x84\xfd\x8a\xe5\xcd7\x95O\x1d\xb7\xe5\\=U1\xcb\x89?\x94\x93=\x95\x0eG\x0eM\xcd\x1e{\xfbbI\xfa\x01\x13\xcb\xba\xe6\xb0\x0c\x9f\x89\x0f\xe0E\xdc\x944\x00\x00\x17\x1d\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x0a\x904\x00x\x8a\x8c\x96\xf4<)g>X\x02\x00\xde\"\xa3%\xdd\xbf#01g\xc0)\x0a\x00F\x12\xaeJZ3\xd0\x19\x08\xb7\x04\x82\xfb\x07\x1d\xa2\x87\x85\xb0\xb4\xdf)\x04\x00F\x12nJZ3\xd09\x17\x08v\x1f\xd9\xdb\xb4\xd5\x0dM\xef\x91v;\x85\x00\xc0H\xc2MIk\x06:;Z\xc8\xf3\xc7\xce\x04\x86\xea\x18u!\x80\xa4\x01\x8f\xe1\xa2\xa4u\x03\x9d\xad-\xf4\xf3\x0e\xdd\xc6\xf2\x12\x02\x92\x06<\x86{\x926\x0ct\xfa\x8f\xd1\x15\xbb\xb6\xd8\xc6\x0f\x0f\xddR\xd8)\x04\x00F\x12\xeeI\x9a7\xd0A(\xd1\xec\x86\xb8\xe29\x93w\x1dK8E\x01\xc0\x88\xc15I\x9b\x0ctp'\x1d8c\x1d=|l3\x1e\xfc\x07\x00\x1e\xc0-I\x9b\x0dt\xd0\xee\xc0\x11\xdb\x0d\x86\x89\x81\x9c\xf1\xebw\xb8R3\x00\x0c\x0bnI\xdad\xa03\xb8#\xe0\xcem\\{\xa4\x0e\xa7\x10\x00\x18I\xb8%i\xde@g\x20\xd8\xc4=\x8e\xfe\xd2\x01W\xbc\x01\x8f\xe1\x96\xa4\x15\xd4\xb9\xf4\x99\xe6-\xe7\xb0\xcac\x0e\xd1\xc3\x01H\x1a\xf0\x18nJZ3\xd09\x1ah>\xd2\xdf\xdf\xbf\xab\xc5i\x83a`7H\x1a\xf0\x16nJZ3\xd0\xd9\xa6\xce\xaa/\xf9\xad&\xf1\xfe\xbd\xf3\xb2\\\x1a\xf1\x03\xc0\xf0\xe0\xa6\xa4]g\xae$}\xe5\x92\x7f\x8f\x00\xc0\xb0\x92\xd1\x92\xee\xff\xf0\x98S\x08\x00\x8c02Z\xd2\x00\xe0=@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)\xfe??\xe8B\x81\x97E\xcd\x14\x00\x00\x00\x00IEND\xaeB`\x82", - + "analysis/ident-field.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x03\xd2\x00\x00\x00\xde\x08\x03\x00\x00\x00\xe6g\xc8\x0a\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x02\x05\x01\x0a\x03\x01\x05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K\x1c\xc7q\x13\x9a\x8d\xa2F\x02t\xb1\xf3\x13\xa3(\x1dr\xc8\xce\xe7\x8d\xa2F\x0f\x20i\x00\x08*@\xd2\x00\x10T\x80\xa4\x01\x20\xa8\x00I\x03@P\x01\x92\x06\x80\xa0\x02$\x0d\x00A\x05H\x1a\x00\x82\x0a\x904\x00\x04\x15\x20i\xb38\x92\xfd\xe5\xf0Z\xb9\x00\xa3\x13\xf3$\xed6\xd0q\x15\xd1\xdb\x14\x15i\xddK(\x88\xd9\xcb\x97\x92\x8b\x18\x87\xcf\xca\x05\x18\xa5\x98%i\xd9@\xe7\xb2\xfdMr\xab\"s\xff{\xc5\x1f0\xfe-\xe4\xfec\x7f\x12\x12\xc3f\xe5\x02\x8cR\xcc\x92\xb4l\xa0s\xd9n\xae\xd1\x9f\xdf`\xfd[\xce\x0bw\xc4$\x0c\x97\x95\x0b0J1I\xd2\x8c\x81\xce\xa8\x914{\x83\xcaM)]\xee\xe4pY\xb9\x00\xa3\x14\x93$\xcd\x18\xe8\x98(i\x0d\xa7\x16\xd6\x14G\xd3\xa9\xc5\x87X-7\x1e\xa5\x7fK\xcf=R'\xadm\xe5\x02\x00\x83\xc5$I3\x06:\x97\xed\x958YcB\xb3\xd6rja\\]\xb4\x9dZ\x8cc5\xddx\x94\xfe-\xef\x087\xf8\x16\xd0\xb0r\x01\x80Ac\x92\xa4\x19\x03\x9d+4Y\xf2\xbc\xdf5\xad\xe7\xbb#\xb9\xba\xe88\xb5\x18\xc5\xea\xba\xf1\xc8\x03\xef:\xd6\xe0\xd2\xd3\xca\x05\x00\x06\x8fI\x92\x96\x0dt\x10:M\xc4\xec*\xf2{W\xa5\xe7\xbb#\xb9\xba\xe88\xb5\x18\xc4\xea\xbb\xf1\xc8\x92>\xc23\xff\xef\xefi\xe5\x02\x00\x83\xc7$I\xcb\x06:nj\xfc\xdeU\xe9\xf9\xeeH\xae.:N-\x06\xb1\xfan<\xb2\xa4\xcf\xf0g\xe4<<\xad\\\x00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\xa8\xaf\x1c\x1a%\x80\xa4\x81\x01\xe3i$\xd4\x1e\xb5Y3\x12\xf0?\x20i`\xa0\x80\x91\xd0\x88\x06$\x0d\x0c\x140\x12\x1a\xd1\x80\xa4\x01\x20\xa8\x00I\x03@P\x01\x92\x06\x80\xa0\x02$\x0d\x00A\x05H\x1a\x00\x82\x0a\x904\x00\x04\x15\x20i\x00\x08*@\xd2\x00\x10T\x80\xa4\x01\x20\xa80O\xd2\xa2kNw\xb1]\xa0\x18\x01\x00p\xdd\x98%i\xc95\xc7e?\xee\xc4\x1c\xb37\x18\xed\x12\xe8T\x1dG\x000\xec\x98%i\xd95\xe74\xb9\xdb\xaf\xab8\xf8\xefBq\xfb`nY\x06\x00\x03\xc4$I\xab]s\x1c\xfe\xbfO\x91\xdf\x19\xd4]\x08\x01`\x80\x98$i\x95kN\x93=x\xfe]]\xe9\xb0\xe3\xb6\xe0q\x88\xb7\xd4\x89!7\xdd\x19_\x8cZB\xb9)\x8aX\xd6\"\x86e`.4\x00`\x92\xa4U\xae9%\x95^\xa3\x03\x0a\x85\xc3\x8ed\xc1\xd3y\x88\xde\x85\xb0\xa6\x89\xde\x1ao\x0d\xfeQK\x0fS\xc4*,b\x18\x06\xe6B\x03\x00&IZ\xe9\x9a\xd3b\x1fBS\xd3\x11\x80\xe4\xb0\xa3\xb4\xe0\x91\x06\xde\xec\x0dle7\x1e\xa5E\x8c\xc8\x00]h\x00\xc0$I+]s*K\xbcG\x07\x1a\x92\xc3\x8e\xd2\x82G[\xd2\x92\x1b\x8f\xd2\"Fd\x80.4\x00`\x92\xa4\x95\xae9E\xa6\xdc\x96\x7f\xf8\x90\x1cvb\xc4\x19\xb4`\xc1\xa3-i\xc9\x8dGy\xf3y\x91\x01\xba\xd0\x00\x80I\x92V\xb8\xe6t\xd8\xbd\xd9T\x04\x20\x92x=-x\x0aH\x9fL\xc5\xbb\"L\x19\xab-\xe9\xa1u\xa1\x01F\x01&IZ\xe1\x9a\xd3b\xbfl\x10\x1e`H2UX\xf0\xc4\xc5!\xe4\xa4\x1b\xc2\x97!\xd4{\xbbO\x92\x1eZ\x17\x1a`\x14`\x92\xa4\x15\xae9Mv\xf7\xcaw0\xa0p\xd8\x91,x\x10Q\xeb\x86\xb2\xe9\xe1d!pZ\xd4\xbau\xd3\xb8\x09EML,k\x11\xc320\x17\x1a\x000K\xd2\xackN\x8b\xdbw<(P:\xec\xb8-x0\xae\xcc\xc8\xf08\xba\x1e\xd8\x1c\x17\x1e1c\x19\xc7e2\xb1\xacE\x8c\x82\x01\xb9\xd0\x00\x80i\x92\x06\x00`8\x00I\x03@P\x01\x92\x06\x80\xa0\x02$\x0d\x00A\x05H\x1a\x00\x82\x0a\x904\x00\x04\x15\x20i\x00\x08*@\xd2\x00\x10T\x80\xa4\x01\x20\xa8\x00I\x03@P\x01\x92\x06\x80\xa0\x02$\x0d\x00A\xc5(\x96\xf4\x1c.j^\x93Q\x10\x00\x04\x18\xa3X\xd2\xce\xaa\xa2)Q\x9dFQ\x00\x10X\x98'i\xd1@\x07\xa1\xceC\xbb\x0av\x1d2E[U\\\xd0{|\x00\xa3\x0d\xb3$-\x19\xe8\xa0\xcb\xc5\xbb\x9a\xda\x9bv\x15\x9bqg\x93Z\xee\xb0Q\x08\x00\x04\x16fIZ6\xd0\xa9)!7B\xe8.\xa91\xdae\x18\x00I\x03A\x87I\x92f\x0ct*\x85\xbb\x84\x96\x99qw~\x904\x10t\x98$i\xc6@\xa7\xa3\xb8\xaa\xc3\xd5QS\xdc\xe1-~\x98h\xe0\xaa\x8cB\x00\x20\xb00I\xd2\xac\x81\x0e\x9eV\xdb\xed\xfbL\xb9\xa3\xa0+j\xda\xa1\xf6^\xa3(\x00\x08\x20L\x924c\xa0\xe3\xaa,ir6\x95T\x9ab]\xb9\x8f\xe3\xb8\xbb\x8d\x82\x00\x20\x800I\xd2\x8c\x81N\x0d5\xc6r\x95\x98a0\xdd\x195isU\x90\xf9\x02\x00\xa3\x1c\x93$\xcd\x18\xe8\x14\xd0\x852\xf4f\x81\xb7\xf8a\xa2\x963cQ\x0e\x00\x86\x11\x93$\xcd\x18\xe8\x88\x92>n\x8e\xa4a\xc5\x1b\x082L\x924c\xa0S%\x0e\xbc\xcdX{\x06I\x03A\x87I\x92f\x0ct\\\xcf\x97\x9cn?]\xf2\xbc\x19K\xde\x87A\xd2@\xb0a\x96\xa4\x19\x03\x1dW\xed\xae\xa2]\xb5\xfeW\xb4\xcby|N\x98\xd2\x80\x0a\x00\x02\x1e\xd3$m>\xb38.\xba\xcc(\x08\x00\x02\x8cQ,i\xe7\xf1v\xa3\x10\x00\x088F\xb1\xa4\x01\x20\x18\x01I\x03@P\x01\x92\x06\x80\xa0\x02$\x0d\x00A\x05H\x1a\x00\x82\x0a\x904\x00\x04\x15\x20i\x00\x08*@\xd2\x00\x10T\x80\xa4\x01\x20\xa8\x00I\x03@P\x01\x92\x06\x80\xa0\x02$\x0d\x00A\x85y\x92\x96\x0ctz\x1b\xca\x0av\x8d\x1c\xbf\xb9\xd6\xdc\xe4\xe4\x9c\x93Yg\x8c\xe2\x04N\xa4\x1c\xd1\x7f\xb3\x94\xb7\x91w\xeb\x92\xf8R\xed\x80-<_\xad\xfd\x0e\xfa\xc4\xc6/\xd2ykh\x09\x88B\x02\xbec\x96\xa4e\x03\x1d\xe4(:\xder\xac\xe0\x98\xd1\x1e~\xe2][\xee+\xd5\xb9\xfa\xadX\xc5\xabI\xaf\xe8\xbf\xf9E^\xd2C\xf8\xe9\xa1\xc4\xbc/\x94o\x9c|Wx\xbe\xd8h\xd3\xd1\x11\xea;\xb3\xd1\xa6\xf3\xd6\xd0\x12\x10\x85\x04|\xc7,I\xcb\x06:o\x16\x90\x9b\xf27\x17\x98\xe2s\xe7\xc9\xaa\x9c>\xdcT7\xfa*i\xd4\xe7\xed\xcd\xc2\xdc\xa4k\xe8\xab\xc4\xdcB\xd5\xf6\xec\xb5\xee\x94\xaeZp\xf7\xe9'\xb5\x04D!\x01\x9f1I\xd2\x8c\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\x1fs\xf6oXw\xa5\x7f\xdd:\x04\x92\x06\x06\x00Hz\x84\xe1\x9a\x1e\xfdO\x0f@\xd2\x80\xcf\x98#\xe9\xeeb\xbb@1y\xe5,+\xdag\xc2=MF&\xaei\x93\xff\xe1\xc1,\x904\xe0+\xe6H\x94>:\xac\x00\x00\x0c\x08IDAT\xdae?\xee\xc4\x1c\xb37\xe0\x17\xed\x055\xcd5\x05\xaa\x9bS\x8fZ\\\xd3&zn\x8c\x8e\x02I\x03>b\x8e\xa4\xd1iz\xefnz\x0b\xc1^\xfax\xa8\x18.\x8f\xa2\xb8\x96\x8d\xa9\xb9\xa2bW\xc8\xbd\xa7A\xd2\x80o\x98$i\x8a\x83\xdc\xa7\x085\x15Py\x17\x8c\x1c\xefJS\xe9m\x0a\x0d\xb9\xe1\xbb\x94\xb1\x84\x1b0!?(iq\xa1\x90\x00\xc5\xe8\x13\x03C\x8b\x89\x92n\x12n\x0aZ)xb9\xcc\xb8\x9f\xe0H\xc4uz\xc5\xac\xe9230\x99\x8e\x86\xcb\xbd(\xe4j@\x02\x92\xf63&J\xba\xa4\x92>\xed\x12n\xe0}\xc8\x84[\xf3\x8fL\\\xce\x96&\x05\xcd-N\xf2\x9fX\x20i\xc0\x17\xcc\x93t\x8b]X\x11+\xae\xa5O\xb5\xc5\xde\x82G\x17\xdd.%\xddt\x9d\x01$\x0d\xf8\x82y\x92\xae\x14M\xb0D\xe7\xca*\x7f\xdb\xdc\x05\x1c\x20i\xc0\x17\xcc\x93t\x91h(M\x1d7\x10*\x83\xb9\xb4\x01D\xd2O\x8e\xc5\x8f\xac\xb6C<\x12\xde\xf0)HB/Z7\x17\xcd7@\xd2~\xc64Iw\xd8E_\x88&;q\xbc\xbbb\x87\x15o\x03\x88`\xc6\xfd\xf9\xaawI\x7f~\xdfMcn\xf8\xe9\xee\xab\xdahi.\xe4\x16\xe1\xf9\x16\x8fl}\x94t\x88F\x8a}\xdb\xe8s\x01C\x8bi\x92n\xb1_\x16\x12\x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e3w\x1a\x85\x8cb@\xd2\xfe\xa4\xed\xa8e\xbdj\x86\x1cP\xb8,\xf3\x1f\x89\xff\xda(\x0a0\x15\x90\xb4?YHV\x9a\xda\x8c\xa2F0[c\x17\xb7\x19\xc5\x00\xe6\x02\x92\x06\x80\xa0\x02$\x0d\x00A\x05H\x1a\x00\x82\x0a\x904\x00\x04\x15\x20i\x00\x08*\xfe?\xb6^u\x0b\xa5[\x1f\x81\x00\x00\x00\x00IEND\xaeB`\x82", -

    - When invoked with the -analysis flag, godoc performs - static analysis on the Go packages it indexes and displays the - results in the source and package views. This document provides a - brief tour of these features. -

    + "analysis/ident-func.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x03\xd2\x00\x00\x00\xda\x08\x03\x00\x00\x00}\xf6\x8a\x1c\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x01\x04\x00\x02\x05\x01\x0a\x03\x01\x05\x08\x03\x09\x0c\x08\x09\x0f\x11\x0e\x10\x0c\x10\x12\x0f\x13\x15\x12\x15\x16\x14\x0f\x17&\x19\x18\x11\x1a\x1a\x13\x1a\x1c\x19\x1c\x1c\x16\x13\x1e7\x20\x1f\x19!#\x20$$\x1d#$\"$%#'(&)(\"+)\x1e\x14+N++$*,)/-\"-.,.2402/63(241:7+685;9-:;9?<0=?=C@4AB@CEBGE8KH|u]tvsB\x8c@@\x8dG\\z\xbby{x]~\xb7e|\xb8\x84|dK\x90J_\x80\xba}\x7f|O\x93Nb\x83\xbd\x8b\x81cN\x95Ud\x85\xbf\x81\x83\x80W\x95Vl\x87\xbc\x8f\x86hZ\x98Yo\x89\xbe\\\x9a[\x87\x89\x86\x93\x89k^\x9d]\\\x9dds\x8d\xc3\x8b\x8d\x8a\x96\x8doz\x8e\xbfe\x9ef\x8d\x8f\x8c|\x90\xc1\x9b\x91s\x90\x92\x8fi\xa2i~\x93\xc4x\x95\xc4\x80\x94\xc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x8a\xc2\xb9%:\xb6\xa8-#:b\xd6\x09*\xe9\x96\xb8\x88\x89\xb3\x96s\xdc\x12\xd6\xa08n]t\xf8\xa48\xf1z\xd3\x92\xc8\x88\xb8Z\xf6\x1eo\xa7a\xc1\x8cA\xc3\x04\xba\x06\x95\x86=\xa1\xd5\xd5\xb1^(\x9a\xcf\x91\xbf%9-O\x90\x1b{6\x8b\xa2\xe8T\x9f\xdc\x18\xf0\x0an\xe3\xccyd\xbe&\xb7d\xc7\x96\xf4\xc4G\xceRIK]\x835P\x9c\xd8\xde\xfc\xe4\xc4l\xe1\xa6P\x8dVG\x9a\x07\xa4<\x8a\xad\xb7G\xdc\xbe\xd5+\x96\xa5-<\xa5\xa1\xcd\xd4\xbf\xae4O\xd2\xa1a\x99\xad\xc4\xc8\xc4\\^\xb4e\xf4\x18\xd9\x0c\x9aNa\xe9\x1br\x06\xd1\xea\xc2\xf6\xd8\xe0\xe8\xf6\x9e\x9f\x19\x10\xc4V/\x9b\xca\xc1\x1fW\x06\x95M\xd1\x03\xbf\x9f8\x84\xb4O\x0a\xd6\x9f\x04\x11\xcc\x92\xf4\x20Z=\xa4\x92\x0en\xab\xb75\x04\xe7\xf6q?\xb1\xbc\xa4G5\xa6Iz\xe0\x84T\xd2\x96\x06$maZ\xf6q\xcb\xcc\xde\x7f\xf5\x8f/\xe8f\xa7\x91\x95\x0e\x17\xea\xf9\xfcw\x07\x9b\xd8z\x80\xa4-\xccL\x8e\xe3\xc2[\x8c\xac\x86\x03t\xb3\xf3s48\xb2I\xe2\x0bFV\xa3\x06\x904\x00X\x0a\x904\x00X\x0a\x904\x00X\x0a\x904\x00X\x0a\x904\x00X\x0a\x904\x00X\x0a\x904\x00X\x0a\x904\x00X\x0a\x90\xb4i\x1c\xcf\xfa*\xb8\xae\\\x80Q\x89\x89\x92\xf68\xd0q\x17\xd1\xc7\x14\x15i=K\xc8\xc2\xbc\xc4\x97\x92\x9b\x18\x83\xe7\xca\x05\x18\x9d\x98&i\xd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a\x05\xeee\x00ka\xa2\xa4E\x07:\x08u\x1e\xde]\xb0\xfb\xb0)\xda\xaa\xe6,\xef\xe3\x03\x18e\x98&i\xc9\x81\x0ej/\xde\xdd\xecj\xde]l\xc6\x93Mj\xb9\xa3F&\x000\xa20M\xd2\xb2\x03\x9d\x9a\x12\xf2\x20\x84\x9e\x92\x1a\xa3$A\x00$\x0dX\x0d\xb3$\xcd8\xd0\xa9\x14\x9e\x12Zf\xc6\xd3\xf9A\xd2\x80\xd50K\xd2\x8c\x03\x9d\xf6\xe2\xeavw{\x8d)\x13\xef\x06\xae\xda\xc8\x04\x00F\x14fI\x9au\xa0\x83\x97\xd5N\xe7>S\x9e(\xe8\x8e\x9aq\xd8\xd5gd\x05\x00#\x07\xb3$\xcd8\xd0qW\x964\xbb\x9aK*Mq]\xb9O~\xf0\x1f\x00X\x01\xb3$\xcd8\xd0\xa9\xa1\x8e\xb1\xdc%f8\x98\xee\x8c\x9a\xbc\xb5\xdab~\x01\x80\xd1\x8dY\x92f\x1c\xe8\x14\x08\x97\x86\x1b\x0a|\xd9\x07\x89Z\xce\x8cM9\x00\x08\x1efI\x9aq\xa0#J\xfa\xa49\x92\x86\x1do\xc0Z\x98%i\xc6\x81N\xb58\xf16c\xef\x19$\x0dX\x0d\xb3$\xcd8\xd0q\xbfX\xd2\xe4j*y\xd1\x8c-\xef\xa3\x20i\xc0b\x98&i\xc6\x81\x8e\xbbvw\xd1\xee\xda\xd0+\xda\xed:\x99b\xb3\x96\xafz\x000O\xd2\xe63\x87\xe3\xa2\xcb\x8c\x8c\x00`d1\x9a%\xed:\x09C4`9F\xb3\xa4\x01\xc0\x82\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x98(i\xc9\x81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xca\xc9s\x8aPs\x01\x95w\xc1\xf0\xf1]\x09\x00#\x173%M\x9f#\x88P\xa5\xe0\x13\xab\xdc\x8c\xe7\x09\x02\x80\xd50S\xd2%\x95\xf4m\xb7\xf0\x00\xef\xc3&<\x9a\x1f\x00,\x87\x89\x92n\x15\x9f\xdc]\\K\xdfj\x8b}\x19\x03\x00\xe0\x17&J\xbaRt\x82%z\xae\xac\x0e\xb5\x9b;\x00\xb0\"&J\xbaHt(])x\xa1-\x83\xb54\x00\x0c\x1d\xf3$\xdd\xee\x14\xfdB4;\x89\xc7\xbb\xabN\xd8\xf1\x06\x80\xa1c\x9e\xa4[\x9d\xedB\xa0\x8f\xfa\xce\xa9\x86\xeb\xd2\x00\x10\x00\xcc\x93t\xb3\xd3\xe32\xc7UP\xddZ\x0dw\x8f\x01@\x200O\xd2\xad\xf2v\x98k_A\x19(\x1a\x00\x02\x81y\x92\x06\x00\x20\x08\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\xd1\xda\xb5ZA\x00\x18\x99\x98$i\xa5\x03\x1d\x84\xaa\xcd{\xa4\xc9\xdf\xecOk\x04=\x1c\xb0c\x12p\xe0\x83_\xc7\xc7.:\xb6\xe0m\x1c\xdc>\xf7\xceiw\xce\xdd\x81P\x9d\xdd\xbe\x08\xa1\xfd\xd8\xe2\x98:]\x908\x16\xff')|~\x9a\xfd^\x1f\xa6\xbeYk\xb7\xef7\xb2\x19\x10\x81k\xa8\xd5\xd8,\xe6\xbc\x91\x15\xa0\x87I\x92V8\xd0A\xa8\xcdYk\x90\x20x\xac\x8a\xb9\xa4\x11\xf4\xe0~\xbb.v\xc5\x07\x08\x9d\x99\xf6\xd0\x81\xfd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xd8\x1f8}lQ,\xa9\xa6\\\x07\x06\xdd\x1c\x9eN\x88U\xbb/\x1b\\C\x11\xe2\x17\x0b\xdbvri\xc2\xddc\xbb\xea\xeaHn\x9a\x0d\x85y\x88\xdc`\x0ahb\x9e\xa4e\x07:'\x84\xdb\xbd\xaf\xfa\xb2\x0e\x06\x97bVi\x04Y\x0e,\x88\x89}\x88\xaaf\xe1k\xdb\xef\x8d\x89\x17.\xe3n\x9f\x1bk\x8f%\xb7.\xbfI/\xa9\xf6-\x8cWt\xf13\xc2\xa2OXH\xa2c\x8b\xe3c\x17\x1d\"\xa1\x7f\xaeN\x88Y|\x86J\xfa\xfc\xa2\x98\xd8\xc5\xbf\xb7\xdb\xd7\xb2\x06\xfb\x17\xedH\x98\x16\xbf\x88*\x1a\xb97\xde\x19\xb3\xe84R\x20f,\xe4\xf0\xd0\x9d\x09O\xffq\x1a\xcd\x81\xe1\xfc\x8a\x84\xd8\x85d\xd1\xde\xb7knL\xfc\x8a\xd7\xe6N[\xb4\x16\xa7\x98\xf6\x01\xb9\xa4\xad\xb4\xbdw\xc7\x8a\xd8\xf8U\x82\xcc\xe5J\xca\xe8\xe6p^](\x1adC\x11v\xc5\xec\xa2\xefri\xf4\x1eo\xcf\xaaY\xb3\xa1h2\xf5\x06>\xe0\xc1Type analysis features -

    - godoc -analysis=type performs static checking similar - to that done by a compiler: it detects ill-formed programs, resolves - each identifier to the entity it denotes, computes the type of each - expression and the method set of each type, and determines which - types are assignable to each interface type. + "analysis/ipcg-func.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x02\xaa\x00\x00\x01\xb1\x08\x03\x00\x00\x00\x9d\xa2d\x9d\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x02\x04\x00\x07\x09\x05\x0a\x0c\x08\x0e\x10\x0d\x13\x15\x12!#\x20'(&+-*2319:8?@>QSPVXU,`\xae7]\xadZ\\Z8^\xae8a\xa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\x15\x12D\x0f\xcb{\xa4\xf3_7y\x98\x94\x90Y\xe7S\x0dKQ\x0a\xc4\x9a\xbb\xc9\x1e\x1a\x05\xe6\xbc8\x14G\xa8j\x11\x12D\xb7\x93\x93\xe1\xc5f\x8dh\xf2\x96\xa7\xa9\x86\xa5D\x0a\x18gI\xcca\x13\xe6\xbc8\x14'\xa8j\x15\x12\xc4\xdetC\xb7\x94\xbe\xba@+$\x85\xde\xe7\xfe&\x1f\xa6\x14\x96\x12)\xa0\\\xd5F\x1a\x05\xe6\xbc8\x14\x07\xa8j\x19\x12D\xf7\x91O\xe4\xc2\xaa\xfc\x0d\xc7\xc9_\x1a\xf2W\xf6\",%R@\xf9p\x15sr\x13s^\x1cJ\x7f\xabJ\x13\x08\x09\xa2\x1dZH\x18\xfa\x80\x1e#\xc7\xe9\x83`/\xc2R\x94\x02\xaeN\xccI%\xccyq(\x0eP5\x01f\x8d\xd2\x0f+\xce\xe7\xca\x13\xf4)\x87\xa5\xa8\xa7\x9a\x82\xc5\xe1\x04\x00\xda\xbe\xb2M.`\xce\x8bCq\x82\xaaV!A\x94\x9e\xf0\xc4|P\x99ZX\x8a\xb1\x80\xd6\x13\xfd\x83\xa7\x0a2\x83\xff\xc0\x9c\x17\xc7\xe2\x04U\x13`\x997zN\x99ZX\x8a\xb1`\xa7\xef9\xbd\xbf\xcdy\x1b\xf8\x0f\xccyq,@T\x0d\xce\xd7\x1a\xadj\x92\xa6Q\x9b\xdbeU\x838\x06\x20\xaa\xd2`\xfd\xd0t\x1fY\\-X\x89'\xd6\x01\x01EU\xc4\xf5\xa0\xaa\x08\x10PU\x04\x08\xa8*\x02\x04T\x15\x01\x02\xaa\x8a\x00\x01UE\x80\x80\xaa\"@@U\x11\x20\xa0\xaa\x08\x10PU\x04\x08\x0eU\x15\x93W\x90h\x1c\xaaj\x04L^A$\xceV\x15\x93W\x10\x1dg\xabJ1y\x05\x09\xe3dU1y\x05Qp\xb2\xaa\x02L^A$\x8eW\x15\x93W\x10\x89SU\xc5\xe4\x15$\x0a\xa7\xaa\x8a\xc9+H\x14\x0eV\x15\x93W\x10\x15\x07\xab\x8a\xc9+\x88\x8a\x93UM(y\x05q\x0bNV5\x91\xe4\x15\x0c\x09r\x0d\x0eV5\x91\xe4\x15\xdbB\x82\xd2\xd0/\xd2;\x1c\xacj\x02\xc9+\xf6\x85\x04\xa5\xa5_\xa478X\xd5\x04\x92Wl\x0c\x09JK\xbfH/p\xb0\xaa\xd6\xc9+v\x86\x04\xa5\xa5_\xa4\x178YU\xcb\xe4\x15;C\x82R\xeb\x17I\x1f\x8eV\xd5*y\xc5\xce\x90\xa0\xd4\xfaE\xd2\x87\x93U\xb5L^\xb15$(\xd5~\x914\xe1`U\xad\x93Wl\x0d\x09\xa2)\xf6\x8b\xa4\x09\xa7\xaaJ\x13I^\xb13$(\xe5~\x914\xe1`U\xad\xb13$(\xe5~\x914\xe1dU\xad\x93Wl\x0c\x09J\xb9_$M8YUk\xec\x0b\x09J\xb1_$}\xc0V\xd5\xbe\x90\xa0\x14\xfbE\xd2\x07pU1$\xc8=\x00W\x15C\x82\xdc\x03tU\x11\xd7\x80\xaa\"@@U\x11\x20\xa0\xaa\x08\x10PU\x04\x08\xa8*\x02\x04T\x15\x01\x02\xaa\x8a\x00\x01UE\x80\x80\xaa\"@@U\x11\x20\xa0\xaa\x08\x10`\xaa\xda\x8d!A\xee\x03\xa6\xaa\xf7)}i&\x86\x04\xb9\x0b\x98\xaa2:\xa3\xc2\x02\x91\x81\x0eLU\xd9;\xff\xde\xd7\xaf\xe1\x04\xc0U\xc0T\x15'\x00.\x04\xa6\xaa\x14'\x00\xee\x03\xa6\xaa8\x01p!0U\xc5\x09\x80\x0b\x81\xa9*\xc5\x09\x80\xfb\x80\xa9\xaa\x9c\x00tw\xd2\xee\xfb\xfc\x0b\x87W7\x00S\xd5\xd0\x04\x00q\x130Uet\xde\xe8y(\xc5\x90\xa0\x81\x06LU\xf95\x00o\xdd\xdf\xfbR\xe7\xde\xd5\xec\xeb\xee\xc1\xb51\x15\xb6\x85\x04U\x11B\xb2N\xc5\xb6\xab\xfc\xad:\xdf7\x03o\x83\xd1K`\xaa\xca\xefi\xfd\x93\xef^\x9fy[|\xdd\xd8\xf6\x93\xe8\x02\xfbB\x82\xce\x06\x02\xeb\xc2\xb7y\x8d\x87\xbf`\xc3\x1c\xdf\xf5\x9ek\x10+`\xaa\xca\xb8\xfb\x1d\xbd\xf6\xd7\xd0\xd7\x8dsQO\xda\x18\x12D\xf9}\x83{V\xf5*i\xa0\xc1\xe8\xfb\xb5\"\xc9\x02SUq\x06\xe0J\xfc\xe7m\x0c\x09\xa2\xd6\xaa\x9e\xea\xddF\x11\x09LU\xc5\x19\x80\xaf\xba\xef\xc69YegH\x10UT\x0d\xae\x1f\x975v\x9d\x98\x94^\xae\x1c2t\xe1\xc2!\xd9\x8d\x0f\x86\xc8\x9b\xad/\x88]\x0fI\x0a\x98\xaa\xd2\x9e?\x02\xb03$\x88*\xaa\xce\xd1\x96n_\xaaU\xb1\xa5\x07\x0f\x17\xac\xab\xf5\xfa6\x97\xd5\xd3\xc3\x81\xad\xa4.\x10\xb8\x10\xbb\x1e\x92\x140U\xb5\xb8\x06\xc0\xd6\x90\xa0\x88\xaa\xcd\xa49\xfc\xbd\x91\x1c\xa1t\x1d9.\xdaq\x02\x90\x16`\xaajq\x0d\x80\xcd!AaU\xe7\x95\x88\x1f\x0f\xb3auq.[8\x19R\x14UM\x0b0U\xa5=O\x00\xec\x0c\x09\xa2\x11U'\xc9\x1b\xad\x97O\xa4\xb4>\xe32\x1f_\xe5\x11\x1d\xaa\x9a\x16`\xaaj1\x01\xb03$\x88FT\x9d;\x82{\x1e\x1c>\x87\xd2\xaf=e_\x1f\x19=I\x9e\xf6GU\xd3\x02LU\xad.\x02\xb41$\x88FT\xdd.&\xb7[\xf9\x1c\xe3\x10\xc9'\xc4\xff\x8d|\x1eUM\x0b0U\xa5\x16\x17\x01\xda\x18\x12t\x9e\x7fZU\x1f\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8\x13\x93[\xea\xafN6\xf8\x02I\x0b\x00U\x95$\x1b[A[\xbc\x0foh\xae!\x9biB\xe9\x11\xb1\x01\x15L\xd5\xec\xda\x0f\x9a\xe6\x12>\x17M<\xf8\x02I\x170UM!\xb6\x82\xd2\x93\xb3\x87\x0e\x9a(\xaeC\xb1N\x8f0\x09\xa8\xa0\xafM\xab+\xd2\x0a\xfc-\xe2A\xc2\xc1\x17H\xba\x80\xa9j_\xc7V`@\x85\x03\x81\xa9*\xed\xdb\xd8\x0a\x0c\xa8p\"0U\xc5\x1b\x01\xb9\x10\x98\xaa\xe2\x8d\x80\\\x08LU)\xde\x08\xc8}\xc0T\x15'\x00.\x04\xa6\xaa8\x01p!0U\xa58\x01p\x1f0U\xc5\x09\x80\x0b\x81\xa9*N\x00\\\x08LU)N\x00\xdc\x07XU\x11\xb7\x01SU6I\xfdxm\xfc\xebU\x91\x81\x08LUq\xae\xeaB`\xaaJq\xae\xea>`\xaa\x8a'\xab\\\x08LUq\x02\xe0B`\xaaJq\x02\xe0>`\xaa\x8a\x13\x00\x17\x02SU\x9c\x00\xb8\x10\x98\xaaR\x9c\x00\xb8\x0f\x98\xaa\xca\x09@w'\xed\xbe\xcf\xbfpxu\x030U\x0dM\x00\x107\x01SUF\xe7\x8d\x9e\x87R\x8c\xad\x18h\xc0T\x95_\x03\xf0\xd6\xfd\xbd/u\xee]\xcd\xbe\xee\x1e\\\x1bS\xd1/\xb1\x15Gg\xe4\xe7Lk)\x89\xbd[\x06\x92\x06`\xaa\xca\xef\xb2\xfa\x93\xef^\x9fy[|\xdd\xe8\xdf\xd8\x8a\x96\xf0-\x83\x0ei\xe5MoT\x10y\xbb*\xbd\xd5\xbc\x16I\x1a\x98\xaa2\xee~G\xaf\xfd5\xf4u\xe3\\\xd4\x93\xb6\xc6VLx2\xb4P\xe6g\x03\xe6\xac\xd6\x8d\x00\x00\x07LIDATy\xb0J\xaa\xaa\xb7\x9a\xd7\"I\x03SUq\x06\xe0J\xfc\xe7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002\xf0\x80\xa9\xaa\xe5\x04\x00\x19x\xc0T\x95ZN\x00\x90\x01\x07LUq\x02\xe0B`\xaa\x8a\x13\x00\x17\x02SU\x8a\x13\x00\xf7\x01SU\x9c\x00\xb8\x10\x98\xaa\xe2\x04\xc0\x85\xc0T\x95\xe2\x04\xc0}\xa0\xaa\x08\x10`\xaa\x8asU\x17\x02SU\x9c\xab\xba\x10\x98\xaaR\x9c\x00\xb8\x0f\x98\xaa\xe2\x04\xc0\x85\xc0T\x15'\x00.\x04\xa6\xaa\x14'\x00\xee\x03\xa6\xaa8\x01p!0U\xc5\x09\x80\x0b\x81\xa9*\xc5\x09\x80\xfb\x80\xa9*\xc6V\xb8\x10\x98\xaabl\x85\x0b\x81\xa9*\xed\xdb\xd8\x0a\x10\xb8.[\x03\xac\xaa\x07\xdf\xeb>\xf8\xdbN\xf9\xf5_\xbf\x8fy:\xb1\xd8\x8a\xe6\x0c\xe2\xd9G?\xf1\x10\xdfu\xabRA\xbdW\xde\xb5\xa5\x8a\x10\x92u*\xdc\xba#\xaf\x07i\x8exXm\xe4~\x7f=\xd6&E\xdcl\x8d\xf0N\x0e4`\xaa\xca\x06\xd4_L\xbe\xb1\x96}=\xc2\xbe\xae\xbd\xfe\xf3\xe8\x02=\xb6\xa2\xe7\x9c\x88\x8e\xb7\xc9\x8e\x07\xb4c\xd4\x84\x04\xd3$J4y\xeb\xa9\xb3\x81\xc0\xba\xf0\xdd\x06)\xfd\x20;\xfaV\xac\x0a]\x9f\x8c-\x09\x9c\xd7\x1f\x9a\xd6\xa6\x18f\x11'[#\xbc\x93\xc9\x91\xe2>\xd8\x08LU\xad\x88\xc4VX\xe4D\xb4\x93[\x94\xd6\x0e\x89\xa8\xd4#w<\x95\x9e\xf0\xfd\x01\xf7GT\xa5=\x8f\xdf\xfc\x96j\x11\xccjS\x0d\xb30\xcd\xd6Pw2\x09R\xdd\x07\xfb\x18\x98\xaaFb+,r\"\xb8\xaa\xcd\x99-=\xd6Dh!\x87H\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E\xb3\xd7f\xd8\x07\xa720U\x8d\xc4V(9\x11\x91\xd8\x0am\xe1\xdc\x9c\xc2\xca\x0b|\x88\xe1\xd7\x00\xd0i$\x83\x0f\x91J\x90DdQ\xaf\xdd\x91\xc1O\x986\x11\x92\xb1\x83\xce\x09M\xf8\xd8\x11\xff\x01\x8f\\\x94\xd1\x16\xf5Z}h\x0f\xc2=\x1c\x0d=O|'\xd4ZC\x06\x86I\x98\x851E#\xdczDv\x10\x1aKM\xb25\xd4\x9dT_\xb1\xbah\xf2\xda\x8c\xfb\xe0P\x06\xa8\xaa=\xc7VD\xa6\xb2\xd6$Sk/\xbd\xcf\xd6p\xeek3c\x80\xaa\xdaslE2\xbf\xa2djm%\x0d\xd9\x1a\x8e}m\xa6\x0cTU{$\x99_Q2\xb5\xd0\x80\xf5\xda\\\xa8\xea7\xe2\x88\xc5\xaaJ\x92L-4\xa0\xbd6\x17\xaa*\x8eX\xdaiB$S\x0b\x0dh\xaf\xcd\x85\xaa\"0AU\x11\x20\xa0\xaa\x08\x10PU\x04\x08\xa8*\x02\x04T\x15\x01\x02\xaa\x8a\x00\x01UE\x80\x80\xaa\"@@U\x11\x20\xa0\xaa\x08\x10PU\x04\x08\xa8*\x02\x04T\x15\x01\x02\xaa\x8a\x00\x01UE\x80\x80\xaa\"@@U\x11\x20\xa0\xaa\x08\x10PU\x04\x08\xa8*\x02\x04T\x15\x01\xc2\xff\x07mu\xa3\x1c\xa2\xebff\x00\x00\x00\x00IEND\xaeB`\x82", - Type analysis is relatively quick, requiring about 10 seconds for - the >200 packages of the standard library, for example. -

    + "analysis/ipcg-pkg.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x02\xf0\x00\x00\x03\xc6\x08\x03\x00\x00\x00\xb2,^L\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x02\x04\x00\x09\x0b\x07\x0d\x0f\x0c\x10\x12\x0f\x13\x15\x12\x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\x00Q8/<%)5\x0b\x08\xff\x9a\xb8J\x93\xcb\xe5\x91\xe9\")\xbc\xa5\xd4\xacf\xd21\x83\xab\xb6\xab\x03`\xc5y\xe1\x93\x95\x9a\x05\x84_\x9a\xe7\xa7\x12Y\xe5\xe7\x7fX\x0ao)5k\x13MrX\xbf1v]\x00\xa2p^x\x93\xb8\x0d\x20\xe6;\xad-5\xe2Ei\xf9\xe2\x86\xe7\xa7\x8a\xa2\x17\xdf\x8d(5\xab\x1b[\xd3\xa2\x0fw\xd9o\x00\x00\x0b,\x84OTjf~\x96F+\xdb\xa9G\x18\xff\x96R\xad`\xc9k\xa5\x9a;\xb2\xd4\xac\xcd=!\x7fz\x9b\xdd\xda\x00D\xc2Bx\x94\x9a\x01U\xb0\x10\x9ePj\x06\x14\xc1Bx\\j\x0f\xa8\x82\x85\xf0\xb8\xd4\x1eP\x05\x0b\xe1\x09\x97\xda\x03\x8a`!<\"\x0dP\x05\x0b\xe1\x11i\x80*X\x08O\x884@\x11,\x84G\xa4\x01\xaa`!<\"\x0dP\x05\x0b\xe1\x09\x91\x06(\x02\xc2\x83\xac\x82\x85\xf0\xc8\xf0@\x15,\x84G\x86\x07\xaa`!a\xdc]\xddrK\xde\x85\x84\x0f7\x99\x85\xab\xce\x96\x0bm\xe7\xaa\x07\\\x95\x17\x08\x00{\x18\x08\x9f\xb8\xd4\xecV\xce\x16\xeb\xc3\x90\xf0\xe1&\xb3p\xd5\xd9_\x1a\xc7\x89\x02\xcfo\xf3\x16\x10\x00\xf60\x10>q\xa9\xd9'\xa2\xc5\xfa0(\xbc\xa5\xc9\xccRuFZ\xbe\xbew\xaf)\x20\x00\xecq^\xf8$\xa5f\xfd\xe3l\xf7\xf0\xd6&\xb3p\xd5\x19iK\xf5\x1b\x8fF\x00\xd8\xe3\xb0\xf0\x94\xbc\xd4,\x90\xe1\xfb\xcd\xc2\x83\xa0\xf0\x96&3k\xd5\x99&\x0b\xea!<\x88\x8b\xf3\xc2S\x92R\xb3\x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\xed\xf9[+\x8b\xb5\xe2\xcaV\xf8\x0e\xd2\x80\x85\xf0\x09\"\x0d\xae\x1e\x0c\x86\x15\x16\xc2\xd3\x20\"\x0d\x00\x83\x81\x85\xf0\x83\x8a4\x00\x0c\x02\x16\xc2#\xd2\x00U\xb0\x10\x9e\x10i\x80\"X\x08\x8fH\x03T\xc1BxD\x1a\xa0\x0a\x16\xc2\x13\"\x0dP\x04\x0b\xe1\x07\x11i\x10u\xc0\xa0`!|\xba\x91\x06Q\x07\x0c\x16\x16\xc2S\x9a\x91\x06Q\x07\x0c\x16\x16\xc2#\xd2\x00U\xb0\x10>\xe5H\x13h\xf7\xd39\xf8\xc6\xe7>\x1f\xda\xfd@\xba\xb0\x10\x9e\xd2\x8f4\x9bf\xa3\x13\x04\x0c\x02\x16\xc2\x0f\"\xd2\xa0\xce\x12\x0c\x0a\x16\xc2\xa7\x1ci\xe4\x10\xed~`\x08\xb0\x10\x9eR\x8e4}h\xf7\x03C\x82\x85\xf0\xa9G\x9a>\xb4\xfb\x81!\xc1B\xf8\xd4#M\x1f\xda\xfd\xc0\x90`!<\xa5\x13i\xd0\xee\x07\x86\x00\x0b\xe1\xd3\x8b4\xc9\xdb\xfdZ\xe4e\xc8&F\x7f\xbb{\x7fA\xab\xddd\x90U\xb0\x10>\xadH\x93B\xbb_\xd7!o\xde\xa2\x98\xe2\x8fVWK\xf4\"\x90u\xb0\x10\x9e\xd2\x894\xa9\xb5\xfb\x15\xad\x8e]\x86\x0bz\x00\x1e\xc2\xa7\x17iRj\xf7\xb3\x13\x1e\x00\x1e\xc2\xa7\x15i\x92\xb6\xfb\x19\x98\xc2\x87+\xfd\xae\xe7\x0a\x91#/\x1dO\xcb\x85\xb6s\xd5\x03\xae\xca\xe0\x95\xe5AV\xc1BxJ'\xd2$k\xf731\x85\xb7T\xfa\xb5{\xbd\xe3\x8d\x0a\x9c\xbf4\x8e\x13\x05\x9e\xdf\xe6-\x88]\x09\x8c~X\x08\x9f^\xa41\xda\x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83\x85\xf0\x8eG\x9a\xf4q\xac\xd4\xcc_\x9b\xbb\xac\xe9@\xd3\xb2\xdce\xc3\xf6G#\xab`!\xbc\xf3\x91&}\x1c+5\xf3\xb7V\x16k\xc5\x95\xad\xf0}P\xb0\x10\x9eF`\xa4\x01#\x13\x16\xc2\x8f\xc0H\x03F(,\x84\x1f\x89\x91\x06\x8cLX\x08O\x884@\x11,\x84G\xa4\x01\xaa`!<\"\x0dP\x05\x0b\xe1)\xc3\x91\x06\x80\x20,\x84\xcft\xa4\x19@\xa9\x19\x08\xc0B\xf8LG\x1a\xfcE\x00AX\x08O\x99\x8f4i\xfdE\x00\xa3\x17\x16\xc2+\x884i\xfdE\x00\xa3\x17\x16\xc2#\xd2\x00U\xb0\x10\x9e\x10i\x80\"X\x08\x8fH\x03T\xc1BxD\x1a\xa0\x0a\x16\xc2\x13\"\x0dP\x04\x0b\xe1UD\x1a\x94\x9a\x01\x09\x0b\xe1\x15E\x1a\x00x\x08O*\"M:\xb3\xc1\xa8\x85\x85\xf0\x0a\"M\xdcR3\xef\xd8\xc0\xc5\x95\xc6\x9f\x8c\xbb~\x98\x93s&\xe4M?Pv(y\xebY\xfc\xaa3\xe0$,\x84W\x10i\xe2\x96\x9a\xdd:T8G^>o\x97H\xe1:/\xc7\xb4\xaa\x96]\x0b\x8c\xd6\x8fd\xadg\xf1\xab\xce\x80\x93\xb0\x10\x9e2\x1fi\x12\x94\x9aM4.\x98\xf7Q*\xc2W\xba\xfdF#\x82\xb9\xefNR\x02\x05\xe19\xc2Bx\x05\x91&A\xa9\x99)|\xff\xb6\x1b\xf1&\x84\x99h\\z\xe9d\xa0\x8d\x00\xc2\x8f@X\x08\xaf\x20\xd2$(5\x9b\x18\xb8$jD\xa1\x18\xf9_\x99\xe2z\xb8\xc1O\xb7\x8b\xb4\xdf\x14\x17\x1fX\x91\xef\xee\"ZR(/\xfb\xe5\xdfk^\xea\xdd\xa6\xf5,\\T\xa6\x0b\xffT\xa8\x87\x0c\xb0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xa18\xa2\xb7\x18d\x07,\x84\x1fL\xa4\xb1\x96\x0a[\x0a\x88wM\xf7\x94h\x85\xee\x03\x91\x0d\xc5\xfa>\xde=!\x7f\xba\xb1\xf3\x0f7\x14G\xf4\x16\x83\xec\x80\x85\xf04\xa8H\x03@\xfa\xb0\x10~0\x91\x06\x80\xc1\xc0B\xf8\xc1D\x1a\x00\x06\x03\x0b\xe1\x09\x91\x06(\x82\x85\xf0\x884@\x15,\x84G\xa4\x01\xaa`!\x10i\x00\xc88,\x84'4n\x03E\xb0\x10^\x8f4\x07w\xf7\x1d\xd9\xec;\xf2\x92\xfe\xaf\xf7\xf8v\xeb\x93\xc7r\x8c\xf2\x8e\xd8\xee\xb1-\xe3\x7f+\xef\x92Vr\x03\x10\x86\x85\xf0\xfa\xce\xfd\x85\x857\xdf\xac\xee6\xff\xed\xf9\xa5\xf5\xc9\xdb\xefx\x1b\xc4\x16\xef;\xfd\xd1k\x95iF\x95A\xd2Jn\x00\xc2\xb0\x10^\xa7\xf7&}\xf9q\xe0_\xf7\xc5\xa8'\xdb\xc5;\xb1kt\xe5\xd4\xe4t\x19#\x08\x0fR\x86\x85\xf0\xc6\x1bO\x9d\xf1\x9f\xb7\x15\xde+\x8e\x89\x03\xc6\x08\xc2\x83\x94a!\xbcq\x96\xe6\xfc@o\xbc\xd3\x92!\xe1\xc35\xdbD\x9eb*6M\xd7V\xd6\x8ao\x11\xf5?\xe8\x8e\x9c\x00\x80\x0d,\x84\xa7D\x91&\xf0N\xeb\xe1~\xb2\xd4l\xf7\xb4\x89\xfa.\xea\xfa\x8dh\xbb%\xcf\xd2T\x1e\xde_\x9e\xff\x91u\x02\x00\xb6\xb0\x10>a\xa49\x11\xfe,M\xb8f{\xffX!\x9a\xa8E\x88\xb1\xfb\x89\x1e\xf4,\xce+\xae\x91=\xf3\xe1\x09\x00\xd8\xc2B\xf8d\x91\x06\x80\xe1\x82\x85\xf0\x84o<\x01E\xb0\x10>\xd9Y\x1a\x00\x86\x0b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b0\x10\x1e\x97\xda\x03\xaa`!<\xe1R{@\x11,\x84G\xa4\x01\xaa`!<\"\x0dP\x05\x0b\xe1\x09\x91\x06(\x82\x85\xf0\x884@\x15,\x84G\xa4\x01\xaa`!Compiler errors -

    - If any source file contains a compilation error, the source view - will highlight the errant location in red. Hovering over it - displays the error message. -

    -
    + "analysis/typeinfo-pkg.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x042\x00\x00\x03\xa2\x08\x03\x00\x00\x00\xb5\xb6\x07\xdf\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x03\x00PLTE!#\x20#$\"$%#&(%()'*,),.,/0.231463685;<:>@=BDAGHF\x00f\x00JLI\x00j\x02\x03l\x04OQN\x0dp\x0aSUR\x0cr\x17VXU,`\xae7]\xad8^\xae\x16w\x1d[]Z8a\xaa:b\xab;b\xact(\x14\x0a\xa2\xd6\x87\xa1\x8c\xed<\x86\xe1\xa9y\x06\xa4)jU\x08J\xad\x04\x19\x89\xd0\x82R\xadB\x88$s~\xf7\xdc\xbf\xe7\xde=w\xef\x9e\xdd\xbb\xd9\xbd\xbb\xef\x97#\xb9{\xf7s\xce\xf9\x9c\xb3{\xde{\xef\xb9w\xf7\xadP\x00\x00H\x18\xc5/\x00\x00\x00l\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09|$\xe3\x18\x00\x00p@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12\xc8H\xc6\x07\xbf\xf7\xa8D\x8a\xdf6\xce\xf8?\xd1\x92\x8a;\x9ey\xd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19\x00\xe4\x0d\xf2\x92\xf1\x8b_<\xc7n\x95\xe0\xee\x03\x87d\x00\x907\xc8KF\xad\xbe\xf8Xa\xff\xdc\x16$\x03\x80\xbcA^2\xfeUS\x8cq\xdc7\xc1\x20\x19\x00\xe4\x0d\xf2\x92\xd129Z<\xad\x81\xbfE\x1b\x92\x01@\xde\x20/\x19\x00\x80<\x06\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\xc0G2\x00\x00\x80\x07\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x20e\xc9\xf8\xfcD\x17\x00\x20oHQ2\xbe\xf4\xab\x1f\x00\x90S\xa4&\x19P\x0c\x00\xf2\x8c\xd4$\xc3\xafv\x00@\x8e\x91\x92d|\xeeW;\x00\x20\xc7HI2\xb0\xf2\x09@\xbe\x91\x92d\xf8U\x0e\x00\xc85\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x09\xd0\xe9\x17\x00@\xde\x00\xc9\xf0c\xef\x94A\xcax\xbf\x20\x00\xf2\x05H\x86\x1fC\x87>\xbcr\xb7_\x10\x00\xf9BVH\xc6\xf6\xb1\x03\x07\x8cZ}\xf1Z\xbf\xb8L\xb0]Y\xe9\x17\x02@\x1e\x11\xb0d\xac\xde\x14\xbb\xcf\x97M\x91+\x9e\\<^Q\x9e\xf0\x0b\x94F&\x1d\x8f\xd8MJV*\x19\x00\x19\"`\xc9\x189)v\x9f/c/g\xffNI\x83d\xc8\xa4\xe3\x11\x0b\xc9\x00\x80'`\xc9\x18.1G-\x86\xdc\xc6\xfe\xdd\xae<\xe9\x17(\x8dL:\x1e\xb1\x90\x0c\x00x\x82\x94\x8c\xe5\x8a\xcep}\xf3\xb6\xaey\xea\xbfOLW\xce\xbf\xff\xba\xc1\x03\xafxU\x8bytd\xc1\xd0Y\x1d\xcer\x93.\xda\xae\x15\xef\xe0\x03^:_\xad\xe1\xd5+\x87\x14\x8c\xed|B\xadf\x9e^\x998\xc0Q\xdb\xda\xb1\x83#\x03\xc7\x0ev\xa4\xc3\xc5NW\xce[\xdc\xf5ZD\x19\xaa\x05\xbf6~`d\xd0\xd8\xdd|\xac\x8b\xd5\x90\x0c\x008\x82\x94\x8c\x8e\xb5\xab\x87\x8eZ\xbdz\xf5\xabls\xf0u{\xbb\xf6\xde5`m\xc7\xf6\xc5\xe7+\x83\xe7\xcd\x1b\\\xc0ta\xcay\xd3\x97\xdf?p\xb8s\x92\xef\x1e|\xde\xd8yk\xf5}V\xc0_\x9eX\xb0\xa7La\x9b\x91!\xea\xac\xeb\x18<\x92}\xf0?\xda\xc5f\xf5bg\xa9\x8ey##\xca\x00v\x08\xe1\x08\x18\xae\\\xce\x0a\xb2zX\xb5WN\xf1\x0e\xb0yp\x20\xd3\x9e\xfb\x07h\x0f\xb8\x93\x0d;\x96IF\xd7]L2\xfe2\x98\x1d\xa1t>\xd1\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f9k\xa6\xee,f\xf3\xfa\xf5#.\xf9\xd6\x0f\xd4$\x9d}3\xeb\xfd\xe50v\xef\xc4\xdd\xea\xbf\xbfb\xcb\x9fw^:\xe6\xf6?\xc5\xa9W\x90\xaf83\x8f\xces\xc5\xf8q\xb0k\x10\x8e$\xc8#2&\x19?\x18\xf6\xbf\x82M\x10\x17\xfb\xd4\x09\x80\x0c\x911\xc9\xc0\xb7\xde\x93\x00\x92\x012N\xc6$\x03$\x01$\x03d\x1cHFx\xd0\xd7G\x01\xc8(\x90\x8c\xf0\xf0\xcf\xe6r%\x00\x99\x03\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x20P\xc9\x98\xa4\x0c\x9c\xb2]\xd4\x0a\x00\x20G\x08T2v\xaf~t\xe8\xc0\x0eQ3\x00\x80\xdc\x20P\xc9PY\xad\xbc$\xd8\x0b\x00\xc8\x11\x82\x96\x8cM\xcaZ\xc1^\x00@\x8e\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x10\xb4dlWV\x0b\xf6\x02\x00r\x84\xa0%\xa3s\xe0\xc8\xb5\xbb\xe1\x8b\x03@\xae\x12\xb4dt\xadT\x14\xe5\x0a\xd1\x13\x00\x80\x1c\x20h\xc9\xe8\x188\xe4\xfe\xd5\xaf\x09\x9e\x00\x00\xe4\x02AK\xc6&e\xa5`/\x00\x20G\x08^2p\xc5\x04\x80\x1c\x06\x92\x01\x00\x90\x20h\xc9X\x0b\xc9\x00\x20\x97\x09T2:wo\x9a\x14\xd9-j\x06\x00\x90\x1b\x04*\x19\xe3\x15e\xf0rQ+\x00\x80\x1c!P\xc9\xd8\xfb\x12\x0e1\x00\xc8m\x02\x95\x0c\x00@\xae\x03\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x90\x92d\x9c\xf0\xab\x1d\x00\x90c\xa4$\x19\x9f\xfb\xd5\x0e\x00\xc81R\x92\x0c\x9c\x99\x00\x90o\xa4&\x19_\xfaU\x0f\x00\xc8-R\x93\x0ch\x06\x00yF\x8a\x92A\xe9\xe7X\x03\x05\x20\x8fHY2\x00\x00\xf9\x04$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20A\xca\x92\xb1\xf6\xca\xc1\x91\x01\x17\xdf\xb6\xd7/.\xe3t\x9e\xf5\x8b\xf0\xa0S1\xb8`\xc8\x94\xddlG\x87\xf182\xf8\xcaMV\xd0\xbc\xe1\x05\x91\x8b\xc6\xafu\x95\x0d\xcd\xe8\x00\x90\x20)J\xc6\xd9\xf1\xc6\xf49\xff~\xbf\xd0\x0c\xf3`\xc1\xe7~!\x1e\xa8\x92Q0@\xe5B\xd6\xcf\xd5\xd4\x96\x0c\xc6<=\xe6\xd1\x88\xf1x,\xdfJxF\x07\x80DIQ2\xe6(\x05\x0f\xbe\xfby\xe7K\xea\xdcX\xe9\x17\x9b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\x9dM\x97\x0f\x8c\xa8{>g\xab%~\x92\xd1\x11Q\x8fOb%\x83\xd2\xed\xd3\x87^\x10\xb9h\x92\xfb'v\x82\x18\x1dH\x06\xc8&R\x96\x8c4c\xcea\x00@V\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x90\xed\x92\x01\x00\xc8*\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x20\x19\x00\x00\x09\x82\x97\x8c\x1a\xf2S\xbf\x10\xc6*\xf2}\xbf\x10\x1f\x8e\xf7\xfaE\x00\x00\x82&\xb4\x92\xd1\xf7\\\xc9i\xbf\x18\x00@\xd0\x84V2z\x08\x81d\x00\xd0\xef@2\x00\x00\x12@2\x00\x00\x12\xa4$\x19\xbb_\xb3\xd8m\xed\xd4%c\x1dY\xf5\xd7\xc6\xf2\xe2\x99\xdbh\xdf\xba\x19\xd1\x8a\xa6\xd3\xda\xbe\x15\x87\xea'\x96\xde\xfa\xeb>jI\xc6\xf1\xa6\xaahY\xdd.\xeaQ\xc4\x15\xd0|\x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\x8c\x19\xda\xbe5\xa4\x9e\xf6\x96\xb0x\x95\xdeR\xf2f\xdf\x04\xb2_{\xb0\x88\x93\x8c;H\xcd\x9b\xe7\x8cmQm\x00\x80\xfe!5\xc9\xa0s\xdc\x07\x19\xbad4\x93\xc7)m%\xcd\xbadt\x132\xe3V\x8d(i\xb3%\xa3V\x8b\xdf\xa8\xfe\xfd\x98\x10\xe3N\x8e\x1a\xb2\xf1\x14!\xdd\xc63\xb6d\xbc\x19%d\xc2\xfc\xcd\x7fW7\x85\xb5\x01\x00\xfa\x87\x14%C?\xcc\xe0\x0e2t\xc98L\xa6R\xba\x80\x1c\xd1%\xe3Sb\xb3\xcd}\x91\x95I\xc6ARd\x94\xae%k\x8e\x10\xa2o\xb7\xf2WL>\\P\xa2\x96.j\xec\x16\xd7\x06\x00\xe8\x1fR\x94\x0c\xfd0\x83;\xc8\xd0%\x83V\x93\x83=\xeay\x89.\x19\xa7\x89*\x1e\x16\x02\xc9\xf8\x84?\xca\xf8\xbby\x94\xf1\xb2\xf3\xbe\x8c\xde\xf6\xa7g\x12\xd2\x20\xae\x0d\x00\xd0?\xa4*\x19\xec0\x83?\xc80$\xe3i\xb2b\x87z^b\xace\\\xc5\xaem0\xf6||N$\x19\xbd\xc5\xf6ZF{_\x19yK{\xb0\xcc\x96\x8c\xbe\x8f\xdf\xd0\xfe\xae!E\xe7\x84\xb5\x01\x00\xfa\x87T%\x83\x1dfL\xe1\x1f\xeb\x92q\x80\xccld\x07\x03\xbad4\x92\x9b\xd8\x15\x14\xba\x93\x14\x9f\xa2\xbd\x84\xfc\x83:%\x83\xd6\x1b\xf7\x8bn$\x13zh\x83\xfe\xa0\xa7\xca\x96\x8c\x93d\xf4g\xec\xef!R\xd8+\xac\x0d\x00\xd0?\xa4,\x19\x9d\x11\x85?\xc80$\x83V\x91q\xec\x8a\x88.\x19\x87\x8a\xc9Cg(}\xbbL\xbb_#J\xb6u\x9fsJ\xc6\xfe\"\xb2\xa2\x97\xd2\xd6\x12\xd2B\xe9\x91(Y\xd5G\xcf\xcc'\x8e+&w\xa8\x9aqz>\x0b\x16\xd5\x06\x00\xe8\x1fR\x96\x0c:\xc7q\x90aJ\xc6\xe3\x84\x9d\x97\x18\x92A[\xa3\xa4x\xf64B\xe6\xb2%\x8b\xd9\x84\x906\xa7d\xd0\xcdEd\xe2\xcd\x15\x844\xb1\xe3\x87mQR~s\x09\xa9\xe7$\xe3X\x19\x89\xde8\xb3\x84\x94\x1f\x15\xd7\x06\x00\xe8\x1fR\x97\x8cN\xc7A\x86)\x19\xef\xe8ZaH\x06=\xf2\xa3\xaah\xc9\xec\x16\xed+\"\x87j\x8a'\xbe\xec\x92\x0cz\xb0\xa1\"zM}\x9b^\xc7\xfb\xf3\xcbKnm\xdb\xc6/\x7f\x1eo\x9a\x16-\xae^\xfaw*\xae\x0d\x00\xd0?\xa4.\x19\x00\x80<\x02\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92A[kN\xf9\x85H\xf2\xd5\xdcV\xbf\x90\x14\x08>\xdf~\x20\xbdC\x02\xfa\x91\\\x93\x8c\x85\xa4p\x9b\xc7S\xc7\xa3d\x86`w\x0bi\xees\xee9X_>\xf1\x8e=7\xbd)\x08N\x8c\xbe\x96\xc2\xe7\x84O\xac)\xfe\x99p\xbf\x0cz\xbe\x8d\x84\x90qG\xcd}\xbb*v\xc4+\x928\x07\x0b\xd5z\x1b\xad\x87\x81\xd5\xeb=$\x20l\xe4\x8ad\xec9\xa0\xff=\xd9\x1em\xf6\x08\xe9{\xa71\x1a\xbbw]\xe1\xaf]{\x0eD\xeb[_\xbe\x97\x10/\xe9I\x84\x9dE\xebD\xbbgGo\x12\xed\xf6\xc1\xec\x9b\x86\x91\xef\xdf\xda\xdb\xd7\x93\xb7\xcd\x9d;J_\x89)\xe5\x8f\xa3^\x9dso\xdf|S\xfb\xa7\xd6Ca\xbd\x82b\x89\xe01$\x20l\xe4\x8ad\xd4<`nyJ\x06\xa5\xcd\xd1\x98]\xc7\xa2\xcb\xcc\xcd/j\xbf\xd0\xfe\xd6\xd5\xaa\x9f\xe2}\x8d)I\x06]\x11\xfd[\xec\xce\xee\xc2\x86\xc2\xee\xd8\xdd~\xd8}s\xe4\xbb\xcf\x96\x0c\xea:NJ\x0c\xbe^\x8b\xdaZ\xfe\x91\xa8^a\xb1\x04\x10\x0e\x09\x08\x1d\xb9\"\x19\xb7\xdegn\xc9IFcE\x8f\xb9\xf9!\xf9P\xfb;\xed\xa7\xec\xdf\x83$\xa5\x93\xef\xee\x0a\xfb\xf0\xde\xa2\x9d\x1c\x20{bw\xfba\xf7\xcd\x91//\x19I\xc1\xd7k\xe1\x94\x0c\x11\xc2b\x09\x20\x1c\x12\x10:\xc2%\x19\xe7\xae\x89>}m\xe5\x9eEe\xb5\xec\xc3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\x7f\x8c^\x10Rr\xc4\xb3^\xae\x98Y\x99\xb8\x09\xdf!\x01a$\\\x92\x91\x06\xfa\x96D\xb7\xf9\xc5H\xb3-\xda\xe8\xb85B\x1e\xefo\xca\xa4#\xdf~\x20\xf5!\x01\xd9A\xdeK\x06\xed[s\xed\xdf\xfdb$\xf9\xaa\xe2\xb9\xa4\xbe\xf4\xc1\xe1}\xdb{\x1a\xf2\xed\x07\x02\x18\x12\x90\x1d@2\xb2\x938\xdf\x94\x01\x20\x93@2\xb2\x91\x93\xdar\xa2_\x14\x00\x19\x00\x92\x91\x8dh\xcb\x89\xf6}\x9e\x00d\x0f\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x8c4x\x9cf\x8f\x01i\xf0}\x031d\xcf\xcb\xdd/\xe4\x9add\xaf'\xeb\x0b\xc4\xb4?\xd9,(bb$\xe9\xb4\\5\xe0jh-2~\xd7\xa2\xa8\x95\xdbl\x1b\xcd\xfeN\xae?b\x96\x88\xed\x9b\x88\x98bn\xe2\x0c\xaa\x1f\xc9\xba\xba\xc6\xbcX\xbe9d\xae\x17y\xe67\x9b+\x92\x91\xfd\x9e\xacg^$\xcf\x9d\xa2\xa7Z\xc8\x8bgD%\x0c\x8c$\x9d\x96\xab\x06\\\x0d-\xc4\xf8U\xae\xd1-\xdcf\xcf\x9b\xd1\xc6\xf6=\xeb\xaaK>\xd2\x0b\xc4\xf6M\x88\xbb\x98E\x02\x83j\xe1\xe1\xd4\x9a\x9c[\xac\xe0\xc5\xf2\xcd!\x93\xbd\xc8+\xbf\xd9\\\x91\x8c\x10x\xb2\x1e\xd2~@s\x0fq\xff\x96\xa0\x0b3I\x81\x7f\xa2]\xc3\xba\xa8\x11P\xb2\x8e\xdb4:\xdf]Y\xa7\x85s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\xd7\x19\xea\xee\x9ej\xe6\xbff\xbb\xa6\xf0\x95e\xb2\x17y\xe47\x1b:\xc9\x08\xaf'\xeb!\xf2\xb3}\xfb\xf6\xad\xd1\xdee_\xac\xaf\xbba\"\xd1\x0e\x06,7SW\x92\xa6\x0cpM\xf05xH\x06S\x94r}\x15\x86\xf3o\xb53\xb3\xbd^93X\xbe\x18\x97\x99pP9\xc4N\xad\xaeq\xb0&\x9be\xda\xba\xacL\xfd\xe7c\xef\xa5\"~\x1c\x1c\xb6\xafO\xb3\xdd\x1b\x98M\xad-\x19|e\x99\xecE\x1e\xf9\xcd\x86N2\xc2\xeb\xc9\xca\xadD\xec\xab\xa8Z\xda\xda^\xabK\x86\x99\xaf+IS\x06\xb8&\x12X\xcbh\xda\xb7\xef\x13c\xf9\x8f\xf3o\xb53\xd3\xcf\xf7\x99\xd7+g\x06\xcb\x15\xe33\x13\x0e*\x8f\xd0\xa9\xd55\x0e\xd6d\xb3jX3\xfa\x0bv\xec\xf7!\xf5\x80\x1f\x07\x0f\x9bZqe\x99\xecE\x1e\xf9\xcd\x86X2\xc2\xe6\xc9\xcaM\xf8\x195l\xba.pJ\x86+IS\x06\xb8&\x12\x90\x0c\xb3;\xd4\xe1\xdfjgf{\xbdrf\xb0\\1>3\xe1\xa0r\x88\x9dZ]\xe3\x10;\xd9\xfeZX\xf7\xd7\x83\xd5s=\xaf[\xf2\xe3\x10kS\xbb\x99\xd9\xd4j\x95=\xe3\xae,\x93\xbd\xc8#\xbf\xd9\x10KF\xd8@\xca\x1b\xbd\x7f\xf8\x13d;\x90\x8c4\xf8\x96f\xc2\xa43\xf8^\x04M\xdf\x8c\x19\x1bw\x1dW\x95\xa3\xfd\x85\x19W\xe9?\"\x98\x89\x81\x02)\x92k\x92\x91\xdd\x9e\xac\xa4\xbc\xee}A\xbcM\xb2\x16\xa6\x09\xba\xafz\x93d\xc3\xffh\xba\xa6\xa4>\xc1\x86\x0f\xea?\x7f\xc5\xd8\xc3~\x9e\x9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afZ\x96\xab\xd4\xce\xd7U\xccD\xec:\xea\xdb\xb0~\xc5D39\xe0MP\xb9\x86\xf9WH\x15G\xeb\x0c\xe4\x1d\xfbz\xab\xc8\xcdT\xd4\x9a#u\xeb\x85\xf5\xe8\x10H#\xe1\x92\x8c0{\xb2\xb2\xdb#Z\xd4\xb8\xea\xf2\x1d\\1\xde\xdb\xd36\xff\x14\x1b\x85z\xb6&t_\xb5,W\x19F\xbe\xeeb\x06b\xd7Q\xbf\x86{\xcb\xb4\xcd\"v\x15\xd6a\x82\xca5\xcc\xbdB\xf4\xefE\xf7\x1d\xfc\x8c]V\xfe\xec\xfd\x05Q\xd3IY\xecf*h\xcd\x91\xba\xf5\xc2zt\x08\xa4\x91pIF\x1a\xc8\xb0'k@\xa6\xa2i\xe9E\xd0\xb4\xce\xd4\x94~>!S\xcd\x0bD\x89\x0f\x14\xc8\x16\xf2^22\xec\xc9\x1a\x94\xa9h\x1az\x91\x06N\x1dT\x8f.>;\xf0\xa9\xf9Xb\xa0@\xb6\x00\xc9\xc8,y\xec\xed\x09\xc2\x09$#\xb3\xe4\xb1\xb7'\x08'\x90\x8c\x0c\x93\xbf\xde\x9e\x20\x9c@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00H\x04\xd8\xc9\x1a@2\x00\xf0\x05v\xb26\x90\x8c4\xb8\x99f\xbb\xd5h\xf0=\xceq`'\xcb\x91k\x92\x91\x7f\x9e\xac\xed\xa3\xc9\xdc>\xfa\x0a!\xa3\xed\xdf\xd3\x8cO\xaa\xfe\xad\xbe$\xd1\x8b\x14H\xb25\xd8\xc9&I\xaeHF\xfez\xb2\xf6\xec\"%\xed\xb4\xfb\x15\xb2+\xc6BHL\xca\xfe\xad6\x1e\x99\x09{\x916\x92\x183\x06\xecd\x93$W$#\x8f=Y\xbbIC\xa3z\x0cE\x12\xf4F\x0d\xc0\xbf\xd5\xc2+\xb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\x17\x15C\x92\xc52\xc1\xd16\xf2\xd8[\xfd\x90\xaa\xfc\x90\xf4Wf\"\x20\x19\x20I\xb4U\xbd\xe3T\x96$\x8be\x82\xb9j\xaaE\xae\xef\x8a\xa5\x03\xf9!\xe9\xaf\xccD@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x82\xb00u\x11\x9c\xffez\x08\xbe\xc7\xfdK\xb6\x8fon\x93k\x92\x91\x93\x9e\xac\xc19sj\xf8\x99\xb6z\x0cT,Iu\xc8\xc9\xa1\xba\xd2\x8a\x86=\x151\x12\x167\x87\xe0\xfcE\x81<\xb9\"\x199\xed\xc9\x1a\xa43g\x02\xa6\xad\xe2\x81\x8a%\xb9\x0e9h+\xad\xd9\xb8u6\x89\xfdi\x09\x9f\x1c\x82\xf2\x17\x05\xf2\xe4\x8ad\xe4\xb8'k\x80\xce\x9c\x89\x98\xb6\x0a\x06J@\x92\x1d\xe2\xf8j\xe2\xfc^J\xbb\xabE\xbfF\x13?\x87\x80\xfcE\x81<\xb9\"\x19\xee\xdfw\x17\"x\x17\x86\xc5\x9358g\xceDL[\x13\x93\x8c$;\xc4\xb1\xacD\xfb\xed\xba5\xf2\x92\x11\x90\xbf(\x90'\\\x92\x91\xbf\x9e\xac\x819sZ=\xa6\xf4\x93\x05\xe5\xd1\x8az\xe6\xae\"\x1e(\xae2.\xd6&\xb9\x0e\xf1\x03U\xad\x1b}|\xb1\xa6W:\x07\x81\xbf\xa8\xa8\x09\xa7\xe5\xaa\xd9\x84\xafS+\xf0&\\\x92\x91\xaf\x9e\xac\x01:sZ=\xa6{Joi\xd9\xd5L\xd8H\x8a\x07\xca\xae\x8c\x8f\xb5I\xaeC\\@o!\xb7\"!\x99\x83\xc0_T\xd4\x84\xe3e\xb1\x9a\xf0uj\x05\xde\x84L2\xf2\xd6\x9350gN\xab\xc7=Uu\xeal\xef\xdd\xf6\x95\xd7@q\x95q\xb1<\xc9u\xc8\x0e8\xce\x9d\xd3\xc8\xe6\x10;\xbe^\xaf\x85\xb5\xc9;\xc0\xfa;\xb5\x02\x0fB'\x19\xf9\xe8\xc9\x1a\xa43\xa7\xd5\xe36\xf2\x81\xb9O$%\x19\xe9\xe8q\xff\xd2o\xe3\x0b\x04@2\xc2Lr\x92\x01@\x0a@2BL&\x9d9A\xbe\x02\xc9\x081\x99t\xe6\x04\xf9\x0a$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$#\x0d\x0e\xa5Y\xe9\x19\x1a|7\x93$+G\x07$L\xaeIF6{\xb2R\xfa\x8f\xa6kJ\xea\x13\xf8RH\x06\x8cX\xe3\x11l:pT\x0d7\xb9\"\x19!\xf0dU\xa9\xad\xd8\xf0P\xc9i\xd13N2`\xc4\x1a\x8f\xa0\xd3\x81\xa3j\x98\xc9\x15\xc9\x08\x81'\xabzHN\xd6\xd1>\xf7\xaf\xdc\x0a\xc9\x84\x11\xab\x00sH\x82N\x07\x8e\xaa!&W$#\x04\x9e\xac\x94\x1e%;bw\x0a\xc9\x84\x11\xab\x00sH\x82N\x07\x8e\xaa!&\\\x92\x11fO\xd6\xde\xab\xf4$\x1fs\xc5r\xae\xa3i7b\xf5j\xd8\xaa\x97\x87\x1b\x92\x80\xd3\x11:\xaa\x82\x90\x10.\xc9\x08\xb5'\xeb\x07\xed[Is;\xfb\xe5sG,\xe7:\x9av#V\x8f\x86\xedzy\xb8!\x098\x1d\xa1\xa3*\x08\x09!\x93\x8cP{\xb2\xf2'&V,WC?\x18\xb1\x8a\x1b\xe6\xeb\xe5\xb1\x86$\xe0t\xc4\xa3\x03\xc2A\xe8$#\xcc\x9e\xac\xbcd\x98\xb1\\\x0d\xfd`\xc4*l\xd8Q\xaf\x0d7$\x01\xa7\xe3\xe5X\x0b\xc2@\xe8$#\xbc\x9e\xacN\xc90c\xb9\x1a\xfa\xc1\x88U\xd8\xb0\xa3^\x1bnH\x02NG<:\x20\x1c\x84X2\xc2\xe6\xc9\xea\x94\x0c3\x96\xab\xa1\x1f\x8cX\x85\x0d;\xea\xe5\xb0\x87$\xe0t\xc4\xa3\x03\xc2A\x88%#l\x9e\xacN\xc90c\xb9\x1a\xfa\xc1\x88U\xdc0_\xaf\x03sH\x82NG8:\x20\x1c\x84L2\xc2\xec\xc9\xaa_1y\xa7\xcfe\x09\xca\xf5\"\xedF\xac\x1e\x0d\xf3\xf5\x0a\x09:\x1d\x91\xa3*\x08\x09\xe1\x92\x8c0{\xb2\xf6\x96i\x01EG\xdc\xb1\\/\xd2m\xc4\xea\xd50W\xaf\x88\xa0\xd3\x11;\xaa\x82p\x10.\xc9H\x03iq(M\xabghR\x16i\x09t3\xa9z\x93)\x96\xd6\xd1\x01\xe9&\xef%#\x1d\x0e\xa5\xe9\xf5\x0c\x95\x9f\xa3\x0c\xffn&W\xaf|\xb1\xf4\x8e\x0eH7\x90\x8c\xd0!=G\x13$\xc9z\x93,\x06\xc2\x0a$#l\xa4\xcb\x885\xc9z\x93,\x06B\x0b$#l\xa4\xcb\x885\xc9z\x93,\x06B\x0b$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$\x03\x00\x20\x01$#\x0df\xa5\xd9\xee:\x1a|\x8f\x03%\xdb\x87/\xcf\xc95\xc9\x80'\xab?\xa9\xd8\xb3r\xa4-I\x98\xb6f5\xb9\"\x19\xf0dM\x98\x94\xecY9\xd2\x98$L[\xb3\x98\\\x91\x0cx\xb2&J\x92\xf6\xac\x1cA:\xb5z\x00\xd3\xd6\xec%W$\x03\x9e\xac\x89\x92\xa4=+G\x90N\xad\x1e\xc0\xb45{\x09\x97d\xe4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K2\xd2@\x02f\xa5\xf2\xf4\x83\xebh\x9c\x9b\\}H\xb8\xc7\xc97a\x92d\x0d\xfd0|\x20i\xf2^2\x120+\x95\xa6?\\G\x93\x9c\x8d\x8cD{\x9cB\x13\x06\xc9\xd5\xd0\x1f\xc3\x07\x92\x06\x92\x11R\x92\x9b\x8dR\xa4\xdeD\xea5\x80\xac\x03\x92\x11JNjk\x88~Q)\x91z\x13\xa9\xd7\x00\xb2\x10HF(\xd1\xd6\x10\x8f\xd3t\x92z\x13\xa9\xd7\x00\xb2\x10H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02HF\x1a\x1cJ\xb3\xc7TT\xeb[\xf6\xa4\x03r\x80\\\x93\x8c\xec\xf6d\x8dK\x1a\xe6\xaa\xc97\x0cr\x9a\x10KF\xd8,\xfc\xc0'RD\xc6fn\xc6\x1a\x06Y\x0a$\xa3\xbf\xe8k,i\xda\xb6g[SIS\x12\x1f\xf9G\xdb\xc8co%Q.e2\xd60\xc8V\x20\x19\xfdF\xdf\x8e\xba\xcahe\xdd\x8ed&\xe0\\BH\xd1Q\xbf\xa84\x90\xb1\x86A\xb6\x02\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\xc8iOV\x0e\xd8\xb3\x82@\xc85\xc9\x80'\xab\x07\xb0g\x05\xc1\x90+\x92\x01O\xd6\xf8\xf4\xa7=+\xc8irE2\xe0\xc9\x1a\x97~\xb5g\x059M\xaeH\x06z\xb2\xf2\xce\xa7\xd1\xc7\x1b'V6|\xc66\xad\xbe\xf1=v\xb8\xa4rM\xa4j\xcf\x1aL\x0e\x20'\x08\x97d\xa4\x81\x90x\xb2\xea\xc4\xb9\xb3\xd5\x87\x20\xecYu\x92\xcf\x01\xe4\x04y/\x19!\xf1d\xd5Ia\xba\x06`\xcf\xaa\x93B\x0e\x20\x17\x80d\xf4\x17\xa9y\xb2\xead\xc3t\xcd\x86\x1c@\x06\x81d\xf4\x17)y\xb2j\x9c\xd4\x16\x19\xfd\xa2\xd2K6\xe4\x002\x0a$\xa3\xdfH\xc5\x93UC[d\xe4n\xe3\xcc\x04\xd9\x90\x03\xc8(\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x0c\x00\x80\x04\x90\x8c\xbc\xf2d\x0d1\xf1\x065\xec}\x0b\x15\xb9&\x19!\xf6d\xd5\xd0\x93L\x835jl7\x9dx\x8cN,)\x8f\x0e\xa5\x87\xeaJ+\x1a\xf6T\xc4L\xf3\xb89\xc4\x19T\xbf\xbe\x09\xd9U\xb1\xc3/$U\xfa\xa1\x89\xd4\xf0\x9d-\xadE\xc6\xcf\xb7\x16\xd9z\x9d+\x92\x11bOV\x07z\x92\x81X\xa3\xee\xe1\x7f}+\xb6\x9b.\xc4\xa3\x13K\x00\xa3\xd3VZ\xb3q\xeblB\x8e\xb8\x9f\xf0\xc9\xc1kP}\xfb&dGi\xac7C\xc0\xa4\xdc\xc4\x9ex?\xa0\x96\x02\x09\xcf\x96\x16\xd2\xde\xbe\x9e\xacko\x1f\xddb=\x93+\x92\x11bOV\x17Z\x92AX\xa3\xdaC\xe2\xe8\xa6'\x82\xd1\x11\x90\xfa\xe8|5q~/\xa5\xdd\xd5\xb1\x92\xe1\x97\x83xP\x13\xe9\x9b\x08\x89\x03\x13\xf3\xad!\x8bD\x13B\xf8\x97P\x06\xbf|\x13\x9e-\xeb\xa2\xec\x17\xe9\xdf\xa6\xb4\xc4V\xeb\\\x91\x8c\x10{\xb2\xba\xb0%#EkT\xfe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xef\xd9\x8e\x89hn\xb6\x1b\x17\xe3\xdb\xa3\x8a\x8cn\x0d\x88\x0c\xdfx\xb4.>\xb9[\xe2/1`\xff\xb1+\xde=W\x8f^\xc2\x8cL\x8a\x9b\xd4\x80\xc8\xf0\x8d\xd3B\x88\x83\x8flG\x81J\xd1\x9cj\xfc\x1c\xdd\x1a\x9d\x14\xb7[\x03\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\xa3\x04\xa1\xe7\xbet\xb2\x0eN\xf1\x1b5\\`u-\x84\xaaE\x86\xd52\xd9C\xe5\x9d\xac\xc1`\x91\\C\xbfX\x8e\x8e\xdd\xc9j3\x9f\xdaG\x88\x19x\x7fau\x1d%U\x89\x8c\xcc\x96\xc94\xd5w\xb2\x06\x83=\x93\xcf.\x89\xaf\xfe\xe8s\xb4\xd5\xc9j5\x9fZG\x88)`\x7fau\xcdJ\x09V\xd7\xaaDFf\xcbd\x8aqp\xb2F\x17\x12\xdd\x14\xe9\x8b\x18\xa6`v\x87\x90\xc5|\xda\x7f\x84.\x83\xef/\xac\xae\x99)\xc1\xeaZ\x95\xc8\xc8l\x99L1\x0eN\xd6B\"#\x8b\xf94[d\x0c\xbe\xbf\xb0\xbaf\xa6\x04\xab\xab_\x91Q\x90eR1\x16NV\x1a\x19\xb6\x89M\x0b\x82\xd5u\x00\xe5j\xb5\xac\xae~EFA\x96I\xc5X8Y\x83\xc1vw\xd7\xc3\xc8\xb0MlZ\x10\xac\xae\x03(W\xabeu\xf5,2\x8a\xb1L*\xc6\xc2\xc9\xba\x15?\xd9le\x98\xd8\xb4\x20X]\x07R\xaeV\xc9\xea\xea]d\x14a\x99T\x8c\x85\x93\xb53\xd8\xbd{\xf7.\x07\x91a\x9d\xd8\xb4\x20X]C\xf2)W\xabeu\xf5.2\x8a\xb0L*\xc6\xc2\xc9J\xde\xcb\xb0NlZ\x10\xac\xae!\xf9\x94\xab\xd5\xb2\xbaz\x1c\x19\xf9-\x93\x8a\xb1p\xb2\x92\xc8\xb0NlZ\x10\xac\xae\x11\xf9\x94\xab\x95\xb2\xbaz\x1c\x19\xf9-\x93\x84qp\xb2\x92\xc8\xb0Nl\\\x10\xac\xae!N\xcaUB\x85\xac\xae\x9eEF!\x96I\xca\x188Y\xb5o\x7f\xda&6.\x08V\xd7\x10'\xe5*C\xd1S\x8c\xc0\xea\xeaWd\x14b\x99\xd4\xa9\xbe\x93U\xfd\x8d\xc9u\xeb\xc4\xd2\xb8bX]#\\\x94\xab\x0cEO1\x02\xab\xab_\x91Q\x02\xa5\x08=\xf7\x9f\x93upJ\xd9\xa8\xe1\x02\xabktc0\xdf\xda\xd8GF\x19B\xcf\xfd\xe8d\x1d\x9c\x126j\xb8\xc0\xea\x1a\x07&\"c\xcc\x18Ud\x80\xfd\xc7(\xac\xae\x88\x0c\xdf\x80\x93\x15\xb8S\xa0\xd5\x15\x91\xe1\x1bp\xb2\x82\x1c\x14guEd\x00\x00\x1c@d\x00\x00\x1c@d\x00\x00\x1c@d\x00\x00\x1c@d\x00\x00\x1c@d\x00\x00\x1c@d\x00\x00\x1c@d\x80!\xd2nG\xff\x00\x7fAd\x80a\xb1\xbd\\\x17\xefK\xf9\x91\x98]N_\x83\x00\xf8\x03\"\xa3\x04\x1d\xe7(\x9c\xac\xc5\xaf\xa2h\xda'O^\xdfx\xdcI\x8e\xd6\x8d\x933\xa6k\xea\x03\x96Q\x9cQ&\xaa\x16\x19\x9e;Ys;8sIE\x099'~\xb9rtr!\xe3\xc4\xd1e\x83B6\xc5\x83>\x07\x96H\xcee\xf6\xa55!N\xb7\xe5M!&6l\x87R\xfa\x9c\xa91\xcbB\x88\xc3\xd1\x9f\x06\xe4?\xa3\x8a\xa7*\x91Q\x11'+\xeb\xe0\xcc\xe0\xd5\xcc'\x15%\xe4\x9c\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x9eS\xb7\xef\xff\xa6\xeeq\x92\x8a\x96\x81\xde\x80\x91\x97c\xc0\xe1\x8c*\x1dD\xc6h\xb9\x7f\x20\xfa\x85\xf8\xe1\x01\xf55\x8aq\"\xbbT\xb4$\xf4\x06\x8c\xbc\x1c\x0f@d\x8c\x96\xf6\xf2\xe4\xca\xda\xe6\xda\xca\xe4\xca\xbey\x16\x19/\xd0\x00W\x10\x19#\xa6}{\xfe\xf5\xda\xeb\xf3\xb7q\xc2\x8e\x084\xc0\x11D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x02u\xe9\"2\x00\x00\xfdH\xb9t\x11\x19%\xd8L\xf7\x93A\x93\xa3\xf8\x15\x83\xea\x92v\xe9V-2\x94\xac\xd8\xa5\x1c\x17\x9b)\xd9I\xdd\x92\xfaY\xb4g\xda\x08\xc4\xdf\xaaX]\xbc\xfa\xbe\\\xb8\xd6\x89\x0c\xe2C\xd5z\x9c\xd4\xbb\xd5\xd9\xf5\x85\xf61!\xa6\x0dW\xc61\x99pw>=9\xf5\xde\x7f\xdeX\xd7\x0e&\xa5\x1b\x1a\x90\xc5\x99p\x97\xa7\x83'\xd3\xf3\xa9\xc8\x20\xa5\xf3\x0d\xa0\x0fS\x95\x19:d\x7f}\xc0UF\x1a+\xc9\x8b\x02\xb2}:\xc3w\xe9z\x17\x19\xfe:Yy\xa1\xa7\xb2\x83\xd2\"\xb7\xc4\x17\xdf\xdf\x9e\x9b|\xac\x1fK\xad\xa3\xd1\x9b\x98Wu\xa1'Q\x8d\x1afS+v)'\x20\xab\xcd\x94\xec$\xad\xf7\xc9\xc4Or\xef\xc8\x86>\x02\x15\xc7*:\x91qI\\\xea\x13\x19\xda\x82v\xdf9\xda\xff\xe3B\xc6\x84\xdb>\x1c=7\xa7\"\x83\x94\xce6@{\x98\xaa\xcc\xd0\xa1\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\xca\xc5\xc5f\xba+\xde=W\xcf\xf8\x9b\xf9\xd0x\xb4.>\xb9k\xaf=M\xce\x87e\x83o\xec\xbe\xda>D\x86\x97\x84ow=\x96\xa3\xc5\xc5f\xda\x9cj\x18\xff\xdabT\x9c\x0e\xde\x04\xb4\\\xc2\x86!\xe7\xc3\xb2ah\xec~\xda>D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x81\xff\x03&\xf2B\xcdI\x1b+\x96\x00\x00\x00\x00IEND\xaeB`\x82", -

    Identifier resolution

    -

    - In the source view, every referring identifier is annotated with - information about the language entity it refers to: a package, - constant, variable, type, function or statement label. + "analysis/typeinfo-src.png": "\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x02\xc1\x00\x00\x01\xb3\x08\x03\x00\x00\x00\xf9m:\x11\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x0a\x03\x01\x05\x07\x03\x02\x0d\x14\x0a\x0c\x08\x10\x12\x0e\x0f\x13\x1e\x1b\x1a\x14\x20\x1f\x19\x1c\x20\"\x17!;!#\x20#$\"$%#&'%'(&+)\x1e()'\x18-T*,)/,!-/,12053'35386*6758:7<:.<>;>@=CA5&CxAB@EFDIJH\x00g\x00KLJ\x00j\x026NzNOM0R\x95\x06m\x06UP?PRO>V\x82\x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.s?e\x8a\xbd\xbc\xe8z-[\xb2z>\x8c#\xd6-h\x16#,6\xd7\x17\xbc\x94+\x95h\xae\xa2\xb7Jb\xc8\x8d\x8e\x91\xd8\x05\x0aac\x12r'\x161vg\xbd)+\x91\x98b,\x09i41\xb9\x96H,-\x9b\x17\x92\xb6c\x1a-&\xd4\x13\x93[\xaf\x0a\xfd\x9c\xcf>/g\xe6\xbf\xc1\xc3\xed\xcd\xbd\xfd\xbd\xcd\xed\xc3\xe1\x16\x03\x00\x1d\x12c\xb0\xaf\xaewdd\xa4\xafq\x04Ow4_\x14aO\x0e\x18/\x891\xf8\x8c\xdbO\xbfX\xd7M_\xe8\xae\x0b\xb7\x18\x00\xe8\x90\x18\x83\xc5ABO\xfd\xe0\xa0\x08\x06\x03\x13\"A\x06S\xe4\xa3i\xb4\x8a\xb8\xd8\x0cG\xd3\x80\xf1`\xa8\xc1\xbe\xfe\xfezo\xff\x20{2\xd2\xdfS\xdf?\x84g67\xf7\xf4\xf547\xc3\xc1\x08`<\x18jp\x17\xab}\x99\xab\xfdd\xb2\x09O\x0cw\xee\xafo\xed\x84C\x11\xc0\xb80\xd4`\x00\x88;`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\xa6`$R\x83\x99\x0b\x18<\x0eF\x86GF\xf0\xff#5\x8b\x17\xfd%ihI\xa4F3\x1608fzggf\xe6eef\x96\x1bu=hf\xa6\xbb\xbd/R\xa3\x19\x8b\xd1\x06k\xa4N\x8dt\xb7\xd6\xb5*\xb3\x8d\xe2!A8\xa2\xf3\xd2y\xa7\xb0J\x14\x8f9\x05\x86S\xd5n\xd8\x82rs\x93l\xb9s\x936\x1a\xa3p\x0fj\x8b\xd4d&c\xb0\xc1\x1a\xa9S\xa2\xa7\xbe\xbb\xaf+\x90\x84\xa2\x857\xdc\x8b\xb1\xf2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4\xd4\x0f\x86\x09i\x9a$\x82\x0d\xde\xe87\xd8\xca\x0c\x96\x8fE4\xa3A13\x87|g\x14\xea\x1b\xdcU2\x10U\xbe\x00\x00\x1e\xa0IDAT)\x92Z\xc3\x16U\xfa\x9b\xb26\x82\xae\xc1u\xaa\x8ce@\x9b\x04\x19\xcc\xa5NQ\x12S\x07+\xca\xd8\xb0\x80#s\x83\x0c\x1eJ]\x82\xab\x82\x91\xdctQt\x10\xa3F\xb2\xf4\x0d\xae\xa6\x01@b\xee\x1a1\x0a\x94\xb5\xd1g\x1a\x06\xe7\xe6\xe2\x8fv\xb8\xfcV\xc0\x8f\xa1\x06k\xa6NaF\xfa{\xea\xfbCn\x05\x9ed\xd8\xed\xc5]%\x16/._r\xec\xdb\xb6\xe5\xa0\x94\xfa\xde^{\x8d\xaf\xd9\xd2\xe3[\x96\xdbG\xce\xc9\xe5\xd4\xb7\xe6\xa5t\x10A\x0b\xdd\xdbf#{M'\x9fE\xc5MV#[\xb5\xa7\xb5$\xcc\xdf\x95\xe1\x08\xacM\x1c\xee\xf4z\xad%\xde\x0e\x9fzs\xb0\xc85\xad\xf3m0\x06G\x81\xa1\x06k\xa7Na\x99\xc8\xdc\xa6pKN\x02\xf4\xf6\xe2\x1e\x92\x20U&\x8a\xa7sm\xa9y\x1b\x10Z\x93\x86PS*\xb25\xb3\xf0Tr]\xc4\"\xb2\x95#5\x19V\xfb\xb2\xfaY\x96\\>\x8b\x8a\x9bl\xcc\xadvX\xd2r\xa3\x128\xb0\xb62\xb1+\x99\xf5\xe0Vo\x8ex\xb1\xccn\xcb\x9d\x94s%\xd3\x0eC\x0d\x06\x80\xb8\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b\x13\x18\\\x88\xec\xcb\xe1\x961@\x07\x13\x18\xdc\xef\xad\xcf\xb4\x1b\xfe\x17?\x01\x93`\xb4\xc1\xa1\xa9SA\x01T\xdaK\xa1n\x11\x00\xb40\xd8`\x8d\xd4)u\x00\x956\x93\x94+\x02L\x03\x8c5X+uJ\x1d@\xa5\x0d\x18\x0c\xe8a\xa8\xc1\x9a\xa9S`00\x11\x0c5X3u*\x1a\x83{\xa2\xbb\xff\x0c\x98\x81\x18j\xb0\xa8\x95:\xc5\x07P\xe91l\xcf\xe9\xe8K@&\x0a0\xf5I\x90\xc1\\\xea\x147\xa9O\x1bBhQ\xb8\x06\xc0L%A\x06+\xa9S\xaaI=|\xf6\xf4\xda\xf6\xc8\xc5\x060\x03I\x94\xc1\x8c\x8eV\xad\xc9P:Q{\x98W\x81\x99L\x82\x0c\xe6R\xa7\xb8I]\xe0X\x04\xa0G\x82\x0c\xe6R\xa7\x82\x03\xa8\xb4\x00\x83\x01=\x0c5X3uJ\x1d@\xa5\x0d\x18\x0c\xe8a\xa8\xc1\xda\xa9S\xaa\x00*\x0d\x86\xfb\xbb\x0a\xad\x86G\xb3\x02&\xc1P\x83\xc7\xc7\x12\x84\xd2\xc3\xed\xe6\x013\x1a\x13\x18\xdc\xdf\x0d\xc7\xd1\x00]L`0\x00\x84\x01\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807F\x1b\x1c\x9a:\x85\xe9m\xabo\xee\x0a\xb3\x10\x00\xe8b\xb0\xc1\x1a\xa9S\xe2p\xbb\xbb\xf3L\x97\xfbL\xb8\xe5\x00@\x07c\x0d\xd6J\x9d\x12\xdb\xeb\xfa\x89\xda\x10\xb0\x0a\x8c\x07C\x0d\xd6L\x9d\xeaw\xd3;\xe4\x20^\x15\x18\x17\x86\x1a\xac\x99:\xd5Y\x17.w\x15\x00\xc2c\xa8\xc1\xa2V\xeaT\xab\xa7\xb75R\xea\x14\x00\xe8\x91\x20\x83\xb9\xa8\xa9f:\xd9\xd4\x0c#10\x1e\x12d0\x175\xe5\xa9\x8b\x9c:\x05\x00z$\xca`\x06\x89\x9a\xf2\xb2\xfb\x90\xbdp;20\x1e\x12d0\x175\xd5U?\xc2\xcd\x01\x80\xd8H\x90\xc1\\\xd4\xd4\x10=\x9a\xe6\x93\x0f\xb3\x01@l\x18j\xb0f\xea\x94\xd8U\xd7\xd5\xd7\xd3\xd8\x0a{r\xc0x0\xd4`\xed\xd4)\xf1Lk\xfd\xfe.\x10\x18\x18\x17\x86\x1a\x0c\x00q\x07\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0x*0\x12\xa9\x01\xa0\x0b\x18\x9cp\xfaK\xd2\xd0\x92H\x8d\x00=\xc0\xe0\x84\x93\x99\xe9n\x87\xbf76n\x8c68$uj\xb8\x91]r\xe9n\x8a\xb0\xe4$s\xbc\xe8X\xa4&\x93C\x0fj\x8b\xd4\x04\x08\x83\xc1\x06\x87\xa6N\xf9\xdc]d\xaa\xcb\x1d\xe6/\x83{\xbb\xf4_\x8b\x17\xc7\xf2\x8fDj\xa2A,[\xa6\xd3\xb6\x0buh\xce\x07\xa2\xc3X\x83\xb5R\xa7\xd8]\xcb\x8d\xe1~\x8ds\x0b\xc3\xbc\x18/\xaeDj\xa0E,[\xa6\xd3\x16\xfe\xea\xf9\xc40\xd4`\xcd\xd4)\x8ag\x7f\xb8{4f\xc7\xe0\x89\xb1\xc4\xb2e:m\xc1\xe0\x89\xf1g\x1b\x00\xc0\xccL`\x0c\x06\x80)\x00\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xccMX\x83\xeb\x11O\x7f\xb8\xa6\x00\x90\x18\xc0`\xc0\xdc\x845x\xf4\x1aa.\xaa\xa6\xff\x8e\x86k\x0a\x00\x89!\x8a:8\x07\xd5DjbjJJ\xf8g\xcb\x90\xa8\xd7P\xcdU\xbb\x9b\xfd[\x9e~{\xa6\x9b}\xbc\xdbsli\x85C\xfa\xcb,B\xa3\xd1\xae\xe0Z\xa5\xc3\xe2\xa8\xbc\x86\xa7jr\"\xb5\x9d\xd1\x80\xc1]\xd6a\xfei\x94\x82I\xa3\xf3\x115\xf8j:*\xac\x9e\x8b\x0a\xc9\xf46\x94Q]\x92\x92\xea\xd3](z\x83G\xb3Pn\xf5|\x94uC\x92n\xa4\xd5Gj=\x93\x89\xc5\xe0F\x94\xc9&jP\x99\xd4\x84j\x86\x0aSSs\x18\xf4\x07^\x92zC\xbbg\x20F\x83;\x88\xba\xe4\xbbm\x1b5\x98\x1e^k#\xf3*\xd1\"\x89=\xc9\xd0\xee\x83#j\x83G}\xb2\xc1\xbeh\x07\xaeq0\xc8\x1c\xd9\x88\xe6W\x97\xa7\xa2.j\xb0XO\xd8\x80\xec\xa2t-\x13\x97\xa3\xcb\x93\xd3\xb1\xc2e\x852\xa4j\xe8\x1e\x95\x14\x83\xaf\xf5W\xa3\x9cQ\xe9**'u\xd5\xb2\xe02\xf8\xcc\xed\xb65\xd5\xcbRH\x9d\xe17\xd8\x97\x86\x96T\xceJ\xb5\x13\x83mi\x8bZ\xdd\xf6\xe4~\xf5\x1a\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0\x8e\x14kJ\x14\xf7.\xb4:\x03\x0ce|\x06\xaf\x8fV\xaf\x20\xf6\x16\x07J\x88\x8f\x85\x8fC^\xe6\x89z\x15c\x9f\xc9\x06\x7f\x16]yr\xb38\xb4`\x88\xcd`\xee]hu\x06\x18J8\x83\xff\xb4\xc2\xf9O\xa5\xc5\xe7\x1a\x96n!)2\x81|\xafSr\xddI2l$\xd7c\x81\x081.!\xec\xf3]\xc5K\xef\x0f\xad\"\xc6\x0a\xe4\xc1\xeb\xe8\xaa\xd7>\x11>y}\xd5\xd18\xad\x82\x1a,\x05\x85\x9b\x1d\xdd[\xbct;\xbd\"2\xd0/\xe5\xe9\xfc\x10\xd5c\xc99S\xde\x05A\xa33\xc0P\xc2\x8e\xc1\xe7\x0a\x84\xc7\xb6\x08w\x1e^A\xbe\x9f\x03\xf9^7\x07\xe8=\xb5\x03T\x0e\x97\xb0\xf6\xc4\xa9\x154\xe6@I\x08\xfb\xa4`\xed\xf3\xa7\xb6\x0a!\x06\x93\xdb\xcf)\x9f\xef\x12\xd6\xe1\xff\xee\xff\"N\xab\x90\x0d\x0e\x0a7+=x\xb04\xffc\xbe_\xca\x80\xf0\xff\xa4\x20b\xc99S\xde\x05A\xa33\xc0P\xc2W\x11\xc5\xbb\xa4\xd7\x85S4-L\x9d\xef\xa5|\xc5\x17\xfd\x1b6\x84D\x88q\x09a\xf7\xae\"{\xea\xebC\x0c~]\xf8\x83\x7f\xf2\xacSp\xd2\xf0\x85\xb8\xacB6X\x1dnv7\x1e\xd6\xaf\x97V\x05\xf5\x8b?>B\xc8A\x8b\x18r\xceT\xefB\xb33\xc0P\"\x18|BzO\xb8)=\xfe`p\xbe\x97\xa2\x17yN+^%!\xec:\x8bOx:\xc4\xe0S\x82\x1c\x86p\xfd1g\xb1P\xecz\xec\xdf\xe2\xb4\x8a\x80\xc1|\xb8\x19\xfd\xae?*\\W\xf7K\xa4\x0b9<\x17C\xce\x19\xf7.\x08\x1a\x9d\x01\x86\x12\xc1\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&\x05\x11c\xce\x19\xf7.4:\x03\x0cf|\xe7\xe4\xc6\xcdX\x83s\x92\xf7\xdd\x03\xe1f\xda\xa7\xf2^r\xee\x9dxt\x94\xff]\xc4\xa53`b\x18l\xb04\xf6l\xe9\xf5Hm&D\x20\xdcL\xd3\xe0\xeb\xc5\x87\x95\x03\x0c\xe3\x87\xbd\x8b8u\x06L\x08\xa3\x0d\x9e\\\xf8p\xb30\x97S\x00\xd3\x88ie0\x17n\xf69\xdd\x01\x8c\xd0\x1e\x98\x06L+\x83\xb9p3\xba\x03\x08q\xe83\x80\xe9e00\xf3\x00\x83\x01s\x03\x06\x03\xe6\x06\x0c\x06\xcc\x0d\x18\x0c\x98\x1b0\x1807`0`n\xc0`\xc0\xdc\x80\xc1\x80\xb91\xdc\xe0\xe9\x91\x9b\x16\x0b\x113\xd6\xe2\xf4#I\xc4{\x9b\x02L\xcc\xe0\x88\xa1f!L\xc5\xdc\xb4s\x0b\x84{\xc7HF\xc5\x82\xb3\x1a\x8b0>\xde\xba\xb8x\xd7\xb9b\x95j{\xe5K\x8a\xd5\x93\xc1D\xccX\x8b\xfeGr\xb6(\xdc[\x9c\xa11n\xe338\xeaP\xb3`\xa6dn\xda\xd8Y!\x7f@\xbayJ8\xabk\xd2\xd9\xc5U\xcf\x9fX/\x08*I?'+~/x2\x88\x88\x19k\xd1\xffH\xa4\xd7\x16k\x18\xec\xffAI34\xc6m|\x06G\x1dj\x16\xc4\x14\xcdM\xbb)\xec\xda\x8b7N\xd0\xbdi\xf3z\x01\xb9Q\xf9\xe6*!x\x98Un\xd0\xe3'9\"f\xacq\x0d\"\xa3\xf5\x09S~P33\xc6m|\x06G\x1dj\x16\xc4\x14\xcdM\xbb)\x9c]<\x16\xce\xe0\xc7\xf3\xe9\xddJ\xcf\xc6np\xc4\x8c5\xae\xc1\xf8X\xcf\x19<\x13c\xdc\x207M\"\x06\x7f\xb6\xfe\x145\xb8\x81$\x05\xd3\xfaZ\xb5e\xab\x1e\xa6\xed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f0\xb3\xae\xd7X\xd3\x88\x09i\xc0\xe4\x00\xb9iR\x90\xc1\x0fK\xa1iV\xca\x8a\xb1\xc6\xbf\x0b,\xb7\xfd\xe0\xd3\x01U#&\xa4\x01\x93C\xe4\xcc\x1e\xe7DC\xcd\x14\xa6jn\x1a\xd1\x9c$\xf7\x1c\x95\xf8\xb5IJ\xbf\xca\x8a\xa5g\x05\xa5\xc4\xdd^T\xb0\xf6~\xf9i\xc4\x844`r\x88l\xb0k\xa2\xa1f\x0aS57m\x80F\xdd\xb0JV\xd3`e\xc5x\x0c\xfe0\xb0\xdc\xf6\xa2\x8f?+\x90\x8f\xe1ELH\x03&\x87\xa8\x0d\x1e\x7f\xa8\x19\xc7T\xcdM[J\xa4\xdf\xbb\x94h\xa7i0\xb7\xe2\x9b\xc5[\xc8{h\x20\x9f\x0fr4\xed\xacS6:bB\x1a0)@n\x1a\xe1\x84\xd0p\xf6\xfb\xe4u~m\\\x16\x1a\xb7b\xe9\x9ck\xdd\xd1\xb3\x0d\xb8\x0e\xbf>P\x85\xdb\xde\xdc^|\x8e^\xe9\x111!\x0d\x98\x14\x207\x8d5\xa8Z\\E^\xe7\xd7\xc6e\xa1\xf1+\x96\xfe\xf0`iA\xd5)z]\x84\x20|p\x02?var x int or func f - func(int) string). -

    -
    -
    - -

    - Clicking the link takes you to the entity's definition. -

    -
    + "callgraph.html": "\x0a\x09\x0a\x09\x09\xe2\x96\xb9\x20Internal\x20call\x20graph

    \x0a\x09
    \x0a\x09\x0a\x09\x09\xe2\x96\xbe\x20Internal\x20call\x20graph

    \x0a\x09\x09

    \x0a\x09\x09\x20\x20This\x20viewer\x20shows\x20the\x20portion\x20of\x20the\x20internal\x20call\x0a\x09\x09\x20\x20graph\x20of\x20this\x20package\x20that\x20is\x20reachable\x20from\x20this\x20function.\x0a\x09\x09\x20\x20See\x20the\x20package's\x20call\x0a\x09\x09\x20\x20graph\x20for\x20more\x20information.\x0a\x09\x09

    \x0a\x09\x09\x0a\x09\x0a\x0a", -

    Type information: size/alignment, method set, interfaces

    -

    - Clicking on the identifier that defines a named type causes a panel - to appear, displaying information about the named type, including - its size and alignment in bytes, its - method set, and its - implements relation: the set of types T that are assignable to - or from this type U where at least one of T or U is an interface. + "codewalk.html": "\x0a\x0a@import\x20\"/doc/codewalk/codewalk.css\";\x0a\x0a\x0a\x0a\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{range\x20.File}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{html\x20.}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{{end}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20code\x20on\x20left\x20•\x20right\x0a\x20\x20\x20\x20\x20\x20code\x20width\x2070%\x0a\x20\x20\x20\x20\x20\x20filepaths\x20shown\x20•\x20hidden\x0a\x20\x20\x20\x20\x0a\x20\x20\x0a\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20{{range\x20.Step}}\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20{{html\x20.Title}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x09{{with\x20.Err}}\x0a\x09ERROR\x20LOADING\x20FILE:\x20{{html\x20.}}

    \x0a\x09{{end}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20{{.XML}}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20{{html\x20.}}\x0a\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20{{end}}\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20previous\x20step\x0a\x20\x20\x20\x20\x20\x20•\x0a\x20\x20\x20\x20\x20\x20next\x20step\x0a\x20\x20\x20\x20\x0a\x20\x20\x0a\x0a", - This example shows information about net/rpc.methodType. -

    - -

    - The method set includes not only the declared methods of the type, - but also any methods "promoted" from anonymous fields of structs, - such as sync.Mutex in this example. + "codewalkdir.html": "\x0a\x0a\x0a{{range\x20.}}\x0a

    {{$name_html}}{{html\x20.Title}}
    \x0a", - In addition, the receiver type is displayed as *T or - T depending on whether it requires the address or just - a copy of the receiver value. -

    -

    - The method set and implements relation are also available - via the package view. -

    - + "dirlist.html": "\x0a\x0a

    \x0a\x0a

    ..
    \x0a

    \x0a", -

    Pointer analysis features

    -

    - godoc -analysis=pointer additionally performs a precise - whole-program pointer analysis. In other words, it - approximates the set of memory locations to which each - reference—not just vars of kind *T, but also - []T, func, map, - chan, and interface—may refer. This - information reveals the possible destinations of each dynamic call - (via a func variable or interface method), and the - relationship between send and receive operations on the same - channel. -

    -

    - Compared to type analysis, pointer analysis requires more time and - memory, and is impractical for code bases exceeding a million lines. -

    + "error.html": "\x0a\x0a

    \x0a{{html\x20.}}\x0a

    \x0a", -

    Call graph navigation

    -

    - When pointer analysis is complete, the source view annotates the - code with callers and callees information: callers - information is associated with the func keyword that - declares a function, and callees information is associated with the - open paren '(' of - a function call. -

    -

    - In this example, hovering over the declaration of the - rot13 function (defined in strings/strings_test.go) - reveals that it is called in exactly one place. -

    - -

    - Clicking the link navigates to the sole caller. (If there were - multiple callers, a list of choices would be displayed first.) -

    - -

    - Notice that hovering over this call reveals that there are 19 - possible callees at this site, of which our rot13 - function was just one: this is a dynamic call through a variable of - type func(rune) rune. + "example.html": "\x0a\x09\x0a\x09\x09\xe2\x96\xb9\x20Example{{example_suffix\x20.Name}}

    \x0a\x09\x0a\x09\x0a\x09\x09\xe2\x96\xbe\x20Example{{example_suffix\x20.Name}}

    \x0a\x09\x09{{with\x20.Doc}}

    {{html\x20.}}

    {{end}}\x0a\x09\x09{{$output\x20:=\x20.Output}}\x0a\x09\x09{{with\x20.Play}}\x0a\x09\x09\x09\x0a\x09\x09\x09\x09{{html\x20.}}\x0a\x09\x09\x09\x09
    {{html\x20$output}}
    \x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09Run\x0a\x09\x09\x09\x09\x09Format\x0a\x09\x09\x09\x09\x09{{if\x20not\x20$.GoogleCN}}\x0a\x09\x09\x09\x09\x09Share\x0a\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x0a\x09\x09{{else}}\x0a\x09\x09\x09

    Code:

    \x0a\x09\x09\x09{{.Code}}\x0a\x09\x09\x09{{with\x20.Output}}\x0a\x09\x09\x09

    Output:

    \x0a\x09\x09\x09{{html\x20.}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09\x0a\x0a", - Clicking on the call brings up the list of all 19 potential callees, - shown truncated. Many of them are anonymous functions. -

    - -

    - Pointer analysis gives a very precise approximation of the call - graph compared to type-based techniques. + "godoc.html": "\x0a\x0a\x0a\x0a\x0a\x0a{{with\x20.Tabtitle}}\x0a\x20\x20{{html\x20.}}\x20-\x20The\x20Go\x20Programming\x20Language\x0a{{else}}\x0a\x20\x20The\x20Go\x20Programming\x20Language\x0a{{end}}\x0a\x0a{{if\x20.SearchBox}}\x0a\x0a{{end}}\x0a\x0a\x0a\x0a\x0a\x0a\x0a{{if\x20.Playground}}\x0a\x0a{{end}}\x0a{{with\x20.Version}}{{end}}\x0a\x0a\x0a\x0a\x0a\x0a...\x0a\x0a\x0a\x0aThe\x20Go\x20Programming\x20Language\x0aGo\x0a▽\x0a\x0a\x0aDocuments\x0aPackages\x0aThe\x20Project\x0aHelp\x0a{{if\x20not\x20.GoogleCN}}\x0aBlog\x0a{{end}}\x0a{{if\x20.Playground}}\x0aPlay\x0a{{end}}\x0asubmit\x20search\x0a\x0a\x0a\x0a\x0a\x0a{{if\x20.Playground}}\x0a\x0a\x09package\x20main\x0a\x0aimport\x20\"fmt\"\x0a\x0afunc\x20main()\x20{\x0a\x09fmt.Println(\"Hello,\x20\xe4\xb8\x96\xe7\x95\x8c\")\x0a}\x0a\x09\x0a\x09\x0a\x09\x09Run\x0a\x09\x09Format\x0a\x09\x09{{if\x20not\x20$.GoogleCN}}\x0a\x09\x09Share\x0a\x09\x09{{end}}\x0a\x09\x0a\x0a{{end}}\x0a\x0a\x0a\x0a\x0a{{if\x20or\x20.Title\x20.SrcPath}}\x0a\x20\x20

    \x0a\x20\x20\x20\x20{{html\x20.Title}}\x0a\x20\x20\x20\x20{{html\x20.SrcPath\x20|\x20srcBreadcrumb}}\x0a\x20\x20

    \x0a{{end}}\x0a\x0a{{with\x20.Subtitle}}\x0a\x20\x20

    {{html\x20.}}

    \x0a{{end}}\x0a\x0a{{with\x20.SrcPath}}\x0a\x20\x20

    \x0a\x20\x20\x20\x20Documentation:\x20{{html\x20.\x20|\x20srcToPkgLink}}\x0a\x20\x20

    \x0a{{end}}\x0a\x0a{{/*\x20The\x20Table\x20of\x20Contents\x20is\x20automatically\x20inserted\x20in\x20this\x20
    .\x0a\x20\x20\x20\x20\x20Do\x20not\x20delete\x20this\x20
    .\x20*/}}\x0a
    \x0a\x0a{{/*\x20Body\x20is\x20HTML-escaped\x20elsewhere\x20*/}}\x0a{{printf\x20\"%s\"\x20.Body}}\x0a\x0a\x0aBuild\x20version\x20{{html\x20.Version}}.
    \x0aExcept\x20as\x20noted,\x0athe\x20content\x20of\x20this\x20page\x20is\x20licensed\x20under\x20the\x0aCreative\x20Commons\x20Attribution\x203.0\x20License,\x0aand\x20code\x20is\x20licensed\x20under\x20a\x20BSD\x20license.
    \x0aTerms\x20of\x20Service\x20|\x0aPrivacy\x20Policy\x0a
    \x0a\x0a\x0a\x0a\x0a\x0a\x0a", - As a case in point, the next example shows the dynamic call inside - the testing package responsible for calling all - user-defined functions named ExampleXYZ. -

    - -

    - Recall that all such functions have type func(), - i.e. no arguments and no results. A type-based approximation could - only conclude that this call might dispatch to any function matching - that type—and these are very numerous in most - programs—but pointer analysis can track the flow of specific - func values through the testing package. + "godocs.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x20A\x20little\x20code\x20to\x20ease\x20navigation\x20of\x20these\x20documents.\x0a\x20*\x0a\x20*\x20On\x20window\x20load\x20we:\x0a\x20*\x20\x20+\x20Generate\x20a\x20table\x20of\x20contents\x20(generateTOC)\x0a\x20*\x20\x20+\x20Bind\x20foldable\x20sections\x20(bindToggles)\x0a\x20*\x20\x20+\x20Bind\x20links\x20to\x20foldable\x20sections\x20(bindToggleLinks)\x0a\x20*/\x0a\x0a(function()\x20{\x0a'use\x20strict';\x0a\x0a//\x20Mobile-friendly\x20topbar\x20menu\x0a$(function()\x20{\x0a\x20\x20var\x20menu\x20=\x20$('#menu');\x0a\x20\x20var\x20menuButton\x20=\x20$('#menu-button');\x0a\x20\x20var\x20menuButtonArrow\x20=\x20$('#menu-button-arrow');\x0a\x20\x20menuButton.click(function(event)\x20{\x0a\x20\x20\x20\x20menu.toggleClass('menu-visible');\x0a\x20\x20\x20\x20menuButtonArrow.toggleClass('vertical-flip');\x0a\x20\x20\x20\x20event.preventDefault();\x0a\x20\x20\x20\x20return\x20false;\x0a\x20\x20});\x0a});\x0a\x0a/*\x20Generates\x20a\x20table\x20of\x20contents:\x20looks\x20for\x20h2\x20and\x20h3\x20elements\x20and\x20generates\x0a\x20*\x20links.\x20\"Decorates\"\x20the\x20element\x20with\x20id==\"nav\"\x20with\x20this\x20table\x20of\x20contents.\x0a\x20*/\x0afunction\x20generateTOC()\x20{\x0a\x20\x20if\x20($('#manual-nav').length\x20>\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20nav\x20=\x20$('#nav');\x0a\x20\x20if\x20(nav.length\x20===\x200)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20toc_items\x20=\x20[];\x0a\x20\x20$(nav).nextAll('h2,\x20h3').each(function()\x20{\x0a\x20\x20\x20\x20var\x20node\x20=\x20this;\x0a\x20\x20\x20\x20if\x20(node.id\x20==\x20'')\x0a\x20\x20\x20\x20\x20\x20node.id\x20=\x20'tmp_'\x20+\x20toc_items.length;\x0a\x20\x20\x20\x20var\x20link\x20=\x20$('').attr('href',\x20'#'\x20+\x20node.id).text($(node).text());\x0a\x20\x20\x20\x20var\x20item;\x0a\x20\x20\x20\x20if\x20($(node).is('h2'))\x20{\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('

    ');\x0a\x20\x20\x20\x20}\x20else\x20{\x20//\x20h3\x0a\x20\x20\x20\x20\x20\x20item\x20=\x20$('');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20item.append(link);\x0a\x20\x20\x20\x20toc_items.push(item);\x0a\x20\x20});\x0a\x20\x20if\x20(toc_items.length\x20<=\x201)\x20{\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20dl1\x20=\x20$('
    ');\x0a\x20\x20var\x20dl2\x20=\x20$('
    ');\x0a\x0a\x20\x20var\x20split_index\x20=\x20(toc_items.length\x20/\x202)\x20+\x201;\x0a\x20\x20if\x20(split_index\x20<\x208)\x20{\x0a\x20\x20\x20\x20split_index\x20=\x20toc_items.length;\x0a\x20\x20}\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20split_index;\x20i++)\x20{\x0a\x20\x20\x20\x20dl1.append(toc_items[i]);\x0a\x20\x20}\x0a\x20\x20for\x20(/*\x20keep\x20using\x20i\x20*/;\x20i\x20<\x20toc_items.length;\x20i++)\x20{\x0a\x20\x20\x20\x20dl2.append(toc_items[i]);\x0a\x20\x20}\x0a\x0a\x20\x20var\x20tocTable\x20=\x20$('').appendTo(nav);\x0a\x20\x20var\x20tocBody\x20=\x20$('
    ').appendTo(tocRow).append(dl2);\x0a}\x0a\x0afunction\x20bindToggle(el)\x20{\x0a\x20\x20$('.toggleButton',\x20el).click(function()\x20{\x0a\x20\x20\x20\x20if\x20($(this).closest(\".toggle,\x20.toggleVisible\")[0]\x20!=\x20el)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Only\x20trigger\x20the\x20closest\x20toggle\x20header.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20($(el).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggleVisible').removeClass('toggle');\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$(el).addClass('toggle').removeClass('toggleVisible');\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggles(selector)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggle(el);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20bindToggleLink(el,\x20prefix)\x20{\x0a\x20\x20$(el).click(function()\x20{\x0a\x20\x20\x20\x20var\x20href\x20=\x20$(el).attr('href');\x0a\x20\x20\x20\x20var\x20i\x20=\x20href.indexOf('#'+prefix);\x0a\x20\x20\x20\x20if\x20(i\x20<\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20id\x20=\x20'#'\x20+\x20prefix\x20+\x20href.slice(i+1+prefix.length);\x0a\x20\x20\x20\x20if\x20($(id).is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20$(id).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0afunction\x20bindToggleLinks(selector,\x20prefix)\x20{\x0a\x20\x20$(selector).each(function(i,\x20el)\x20{\x0a\x20\x20\x20\x20bindToggleLink(el,\x20prefix);\x0a\x20\x20});\x0a}\x0a\x0afunction\x20setupDropdownPlayground()\x20{\x0a\x20\x20if\x20(!$('#page').is('.wide'))\x20{\x0a\x20\x20\x20\x20return;\x20//\x20don't\x20show\x20on\x20front\x20page\x0a\x20\x20}\x0a\x20\x20var\x20button\x20=\x20$('#playgroundButton');\x0a\x20\x20var\x20div\x20=\x20$('#playground');\x0a\x20\x20var\x20setup\x20=\x20false;\x0a\x20\x20button.toggle(function()\x20{\x0a\x20\x20\x20\x20button.addClass('active');\x0a\x20\x20\x20\x20div.show();\x0a\x20\x20\x20\x20if\x20(setup)\x20{\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20setup\x20=\x20true;\x0a\x20\x20\x20\x20playground({\x0a\x20\x20\x20\x20\x20\x20'codeEl':\x20$('.code',\x20div),\x0a\x20\x20\x20\x20\x20\x20'outputEl':\x20$('.output',\x20div),\x0a\x20\x20\x20\x20\x20\x20'runEl':\x20$('.run',\x20div),\x0a\x20\x20\x20\x20\x20\x20'fmtEl':\x20$('.fmt',\x20div),\x0a\x20\x20\x20\x20\x20\x20'shareEl':\x20$('.share',\x20div),\x0a\x20\x20\x20\x20\x20\x20'shareRedirect':\x20'//play.golang.org/p/'\x0a\x20\x20\x20\x20});\x0a\x20\x20},\x0a\x20\x20function()\x20{\x0a\x20\x20\x20\x20button.removeClass('active');\x0a\x20\x20\x20\x20div.hide();\x0a\x20\x20});\x0a\x20\x20button.show();\x0a\x20\x20$('#menu').css('min-width',\x20'+=60');\x0a}\x0a\x0afunction\x20setupInlinePlayground()\x20{\x0a\x09'use\x20strict';\x0a\x09//\x20Set\x20up\x20playground\x20when\x20each\x20element\x20is\x20toggled.\x0a\x09$('div.play').each(function\x20(i,\x20el)\x20{\x0a\x09\x09//\x20Set\x20up\x20playground\x20for\x20this\x20example.\x0a\x09\x09var\x20setup\x20=\x20function()\x20{\x0a\x09\x09\x09var\x20code\x20=\x20$('.code',\x20el);\x0a\x09\x09\x09playground({\x0a\x09\x09\x09\x09'codeEl':\x20\x20\x20code,\x0a\x09\x09\x09\x09'outputEl':\x20$('.output',\x20el),\x0a\x09\x09\x09\x09'runEl':\x20\x20\x20\x20$('.run',\x20el),\x0a\x09\x09\x09\x09'fmtEl':\x20\x20\x20\x20$('.fmt',\x20el),\x0a\x09\x09\x09\x09'shareEl':\x20\x20$('.share',\x20el),\x0a\x09\x09\x09\x09'shareRedirect':\x20'//play.golang.org/p/'\x0a\x09\x09\x09});\x0a\x0a\x09\x09\x09//\x20Make\x20the\x20code\x20textarea\x20resize\x20to\x20fit\x20content.\x0a\x09\x09\x09var\x20resize\x20=\x20function()\x20{\x0a\x09\x09\x09\x09code.height(0);\x0a\x09\x09\x09\x09var\x20h\x20=\x20code[0].scrollHeight;\x0a\x09\x09\x09\x09code.height(h+20);\x20//\x20minimize\x20bouncing.\x0a\x09\x09\x09\x09code.closest('.input').height(h);\x0a\x09\x09\x09};\x0a\x09\x09\x09code.on('keydown',\x20resize);\x0a\x09\x09\x09code.on('keyup',\x20resize);\x0a\x09\x09\x09code.keyup();\x20//\x20resize\x20now.\x0a\x09\x09};\x0a\x0a\x09\x09//\x20If\x20example\x20already\x20visible,\x20set\x20up\x20playground\x20now.\x0a\x09\x09if\x20($(el).is(':visible'))\x20{\x0a\x09\x09\x09setup();\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09//\x20Otherwise,\x20set\x20up\x20playground\x20when\x20example\x20is\x20expanded.\x0a\x09\x09var\x20built\x20=\x20false;\x0a\x09\x09$(el).closest('.toggle').click(function()\x20{\x0a\x09\x09\x09//\x20Only\x20set\x20up\x20once.\x0a\x09\x09\x09if\x20(!built)\x20{\x0a\x09\x09\x09\x09setup();\x0a\x09\x09\x09\x09built\x20=\x20true;\x0a\x09\x09\x09}\x0a\x09\x09});\x0a\x09});\x0a}\x0a\x0a//\x20fixFocus\x20tries\x20to\x20put\x20focus\x20to\x20div#page\x20so\x20that\x20keyboard\x20navigation\x20works.\x0afunction\x20fixFocus()\x20{\x0a\x20\x20var\x20page\x20=\x20$('div#page');\x0a\x20\x20var\x20topbar\x20=\x20$('div#topbar');\x0a\x20\x20page.css('outline',\x200);\x20//\x20disable\x20outline\x20when\x20focused\x0a\x20\x20page.attr('tabindex',\x20-1);\x20//\x20and\x20set\x20tabindex\x20so\x20that\x20it\x20is\x20focusable\x0a\x20\x20$(window).resize(function\x20(evt)\x20{\x0a\x20\x20\x20\x20//\x20only\x20focus\x20page\x20when\x20the\x20topbar\x20is\x20at\x20fixed\x20position\x20(that\x20is,\x20it's\x20in\x0a\x20\x20\x20\x20//\x20front\x20of\x20page,\x20and\x20keyboard\x20event\x20will\x20go\x20to\x20the\x20former\x20by\x20default.)\x0a\x20\x20\x20\x20//\x20by\x20focusing\x20page,\x20keyboard\x20event\x20will\x20go\x20to\x20page\x20so\x20that\x20up/down\x20arrow,\x0a\x20\x20\x20\x20//\x20space,\x20etc.\x20will\x20work\x20as\x20expected.\x0a\x20\x20\x20\x20if\x20(topbar.css('position')\x20==\x20\"fixed\")\x0a\x20\x20\x20\x20\x20\x20page.focus();\x0a\x20\x20}).resize();\x0a}\x0a\x0afunction\x20toggleHash()\x20{\x0a\x20\x20var\x20id\x20=\x20window.location.hash.substring(1);\x0a\x20\x20//\x20Open\x20all\x20of\x20the\x20toggles\x20for\x20a\x20particular\x20hash.\x0a\x20\x20var\x20els\x20=\x20$(\x0a\x20\x20\x20\x20document.getElementById(id),\x0a\x20\x20\x20\x20$('a[name]').filter(function()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(this).attr('name')\x20==\x20id;\x0a\x20\x20\x20\x20})\x0a\x20\x20);\x0a\x0a\x20\x20while\x20(els.length)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20els.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20el\x20=\x20$(els[i]);\x0a\x20\x20\x20\x20\x20\x20if\x20(el.is('.toggle'))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.find('.toggleButton').first().click();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20els\x20=\x20el.parent();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20personalizeInstallInstructions()\x20{\x0a\x20\x20var\x20prefix\x20=\x20'?download=';\x0a\x20\x20var\x20s\x20=\x20window.location.search;\x0a\x20\x20if\x20(s.indexOf(prefix)\x20!=\x200)\x20{\x0a\x20\x20\x20\x20//\x20No\x20'download'\x20query\x20string;\x20detect\x20\"test\"\x20instructions\x20from\x20User\x20Agent.\x0a\x20\x20\x20\x20if\x20(navigator.platform.indexOf('Win')\x20!=\x20-1)\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20filename\x20=\x20s.substr(prefix.length);\x0a\x20\x20var\x20filenameRE\x20=\x20/^go1\\.\\d+(\\.\\d+)?([a-z0-9]+)?\\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\\.[68])?\\.([a-z.]+)$/;\x0a\x20\x20var\x20m\x20=\x20filenameRE.exec(filename);\x0a\x20\x20if\x20(!m)\x20{\x0a\x20\x20\x20\x20//\x20Can't\x20interpret\x20file\x20name;\x20bail.\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x20\x20$('.downloadFilename').text(filename);\x0a\x20\x20$('.hideFromDownload').hide();\x0a\x0a\x20\x20var\x20os\x20=\x20m[3];\x0a\x20\x20var\x20ext\x20=\x20m[6];\x0a\x20\x20if\x20(ext\x20!=\x20'tar.gz')\x20{\x0a\x20\x20\x20\x20$('#tarballInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'darwin'\x20||\x20ext\x20!=\x20'pkg')\x20{\x0a\x20\x20\x20\x20$('#darwinPackageInstructions').hide();\x0a\x20\x20}\x0a\x20\x20if\x20(os\x20!=\x20'windows')\x20{\x0a\x20\x20\x20\x20$('#windowsInstructions').hide();\x0a\x20\x20\x20\x20$('.testUnix').show();\x0a\x20\x20\x20\x20$('.testWindows').hide();\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'msi')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsInstallerInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(ext\x20!=\x20'zip')\x20{\x0a\x20\x20\x20\x20\x20\x20$('#windowsZipInstructions').hide();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20$('.testUnix').hide();\x0a\x20\x20\x20\x20$('.testWindows').show();\x0a\x20\x20}\x0a\x0a\x20\x20var\x20download\x20=\x20\"https://dl.google.com/go/\"\x20+\x20filename;\x0a\x0a\x20\x20var\x20message\x20=\x20$(''+\x0a\x20\x20\x20\x20'Your\x20download\x20should\x20begin\x20shortly.\x20'+\x0a\x20\x20\x20\x20'If\x20it\x20does\x20not,\x20click\x20this\x20link.

    ');\x0a\x20\x20message.find('a').attr('href',\x20download);\x0a\x20\x20message.insertAfter('#nav');\x0a\x0a\x20\x20window.location\x20=\x20download;\x0a}\x0a\x0afunction\x20updateVersionTags()\x20{\x0a\x20\x20var\x20v\x20=\x20window.goVersion;\x0a\x20\x20if\x20(/^go[0-9.]+$/.test(v))\x20{\x0a\x20\x20\x20\x20$(\".versionTag\").empty().text(v);\x0a\x20\x20\x20\x20$(\".whereTag\").hide();\x0a\x20\x20}\x0a}\x0a\x0afunction\x20addPermalinks()\x20{\x0a\x20\x20function\x20addPermalink(source,\x20parent)\x20{\x0a\x20\x20\x20\x20var\x20id\x20=\x20source.attr(\"id\");\x0a\x20\x20\x20\x20if\x20(id\x20==\x20\"\"\x20||\x20id.indexOf(\"tmp_\")\x20===\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Auto-generated\x20permalink.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20if\x20(parent.find(\">\x20.permalink\").length)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20Already\x20attached.\x0a\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20parent.append(\"\x20\").append($(\"¶\").attr(\"href\",\x20\"#\"\x20+\x20id));\x0a\x20\x20}\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"h2[id],\x20h3[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20addPermalink(el,\x20el);\x0a\x20\x20});\x0a\x0a\x20\x20$(\"#page\x20.container\").find(\"dl[id]\").each(function()\x20{\x0a\x20\x20\x20\x20var\x20el\x20=\x20$(this);\x0a\x20\x20\x20\x20//\x20Add\x20the\x20anchor\x20to\x20the\x20\"dt\"\x20element.\x0a\x20\x20\x20\x20addPermalink(el,\x20el.find(\">\x20dt\").first());\x0a\x20\x20});\x0a}\x0a\x0a$(\".js-expandAll\").click(function()\x20{\x0a\x20\x20if\x20($(this).hasClass(\"collapsed\"))\x20{\x0a\x20\x20\x20\x20toggleExamples('toggle');\x0a\x20\x20\x20\x20$(this).text(\"(Collapse\x20All)\");\x0a\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20toggleExamples('toggleVisible');\x0a\x20\x20\x20\x20$(this).text(\"(Expand\x20All)\");\x0a\x20\x20}\x0a\x20\x20$(this).toggleClass(\"collapsed\")\x0a});\x0a\x0afunction\x20toggleExamples(className)\x20{\x0a\x20\x20//\x20We\x20need\x20to\x20explicitly\x20iterate\x20through\x20divs\x20starting\x20with\x20\"example_\"\x0a\x20\x20//\x20to\x20avoid\x20toggling\x20Overview\x20and\x20Index\x20collapsibles.\x0a\x20\x20$(\"[id^='example_']\").each(function()\x20{\x0a\x20\x20\x20\x20//\x20Check\x20for\x20state\x20and\x20click\x20it\x20only\x20if\x20required.\x0a\x20\x20\x20\x20if\x20($(this).hasClass(className))\x20{\x0a\x20\x20\x20\x20\x20\x20$(this).find('.toggleButton').first().click();\x0a\x20\x20\x20\x20}\x0a\x20\x20});\x0a}\x0a\x0a$(document).ready(function()\x20{\x0a\x20\x20generateTOC();\x0a\x20\x20addPermalinks();\x0a\x20\x20bindToggles(\".toggle\");\x0a\x20\x20bindToggles(\".toggleVisible\");\x0a\x20\x20bindToggleLinks(\".exampleLink\",\x20\"example_\");\x0a\x20\x20bindToggleLinks(\".overviewLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".examplesLink\",\x20\"\");\x0a\x20\x20bindToggleLinks(\".indexLink\",\x20\"\");\x0a\x20\x20setupDropdownPlayground();\x0a\x20\x20setupInlinePlayground();\x0a\x20\x20fixFocus();\x0a\x20\x20setupTypeInfo();\x0a\x20\x20setupCallgraphs();\x0a\x20\x20toggleHash();\x0a\x20\x20personalizeInstallInstructions();\x0a\x20\x20updateVersionTags();\x0a\x0a\x20\x20//\x20godoc.html\x20defines\x20window.initFuncs\x20in\x20the\x20\x20tag,\x20and\x20root.html\x20and\x0a\x20\x20//\x20codewalk.js\x20push\x20their\x20on-page-ready\x20functions\x20to\x20the\x20list.\x0a\x20\x20//\x20We\x20execute\x20those\x20functions\x20here,\x20to\x20avoid\x20loading\x20jQuery\x20until\x20the\x20page\x0a\x20\x20//\x20content\x20is\x20loaded.\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20window.initFuncs.length;\x20i++)\x20window.initFuncs[i]();\x0a});\x0a\x0a//\x20--\x20analysis\x20---------------------------------------------------------\x0a\x0a//\x20escapeHTML\x20returns\x20HTML\x20for\x20s,\x20with\x20metacharacters\x20quoted.\x0a//\x20It\x20is\x20safe\x20for\x20use\x20in\x20both\x20elements\x20and\x20attributes\x0a//\x20(unlike\x20the\x20\"set\x20innerText,\x20read\x20innerHTML\"\x20trick).\x0afunction\x20escapeHTML(s)\x20{\x0a\x20\x20\x20\x20return\x20s.replace(/&/g,\x20'&').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(/\\\"/g,\x20'"').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(/\\'/g,\x20''').\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20replace(//g,\x20'>');\x0a}\x0a\x0a//\x20makeAnchor\x20returns\x20HTML\x20for\x20an\x20\x20element,\x20given\x20an\x20anchorJSON\x20object.\x0afunction\x20makeAnchor(json)\x20{\x0a\x20\x20var\x20html\x20=\x20escapeHTML(json.Text);\x0a\x20\x20if\x20(json.Href\x20!=\x20\"\")\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20=\x20\"\"\x20+\x20html\x20+\x20\"\";\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0afunction\x20showLowFrame(html)\x20{\x0a\x20\x20var\x20lowframe\x20=\x20document.getElementById('lowframe');\x0a\x20\x20lowframe.style.height\x20=\x20\"200px\";\x0a\x20\x20lowframe.innerHTML\x20=\x20\"\"\x20+\x20html\x20+\x20\"

    \\n\"\x20+\x0a\x20\x20\x20\x20\x20\x20\"\xe2\x9c\x98\"\x0a};\x0a\x0adocument.hideLowFrame\x20=\x20function()\x20{\x0a\x20\x20var\x20lowframe\x20=\x20document.getElementById('lowframe');\x0a\x20\x20lowframe.style.height\x20=\x20\"0px\";\x0a}\x0a\x0a//\x20onClickCallers\x20is\x20the\x20onclick\x20action\x20for\x20the\x20'func'\x20tokens\x20of\x20a\x0a//\x20function\x20declaration.\x0adocument.onClickCallers\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index]\x0a\x20\x20if\x20(data.Callers.length\x20==\x201\x20&&\x20data.Callers[0].Sites.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20data.Callers[0].Sites[0].Href;\x20//\x20jump\x20to\x20sole\x20caller\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Callers\x20of\x20\"\x20+\x20escapeHTML(data.Callee)\x20+\x20\":
    \\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20data.Callers.length;\x20i++)\x20{\x0a\x20\x20\x20\x20var\x20caller\x20=\x20data.Callers[i];\x0a\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20escapeHTML(caller.Func)\x20+\x20\"\";\x0a\x20\x20\x20\x20var\x20sites\x20=\x20caller.Sites;\x0a\x20\x20\x20\x20if\x20(sites\x20!=\x20null\x20&&\x20sites.length\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\x20at\x20line\x20\";\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20j\x20=\x200;\x20j\x20<\x20sites.length;\x20j++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(j\x20>\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\",\x20\";\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(sites[j])\x20+\x20\"\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20html\x20+=\x20\"
    \\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20onClickCallees\x20is\x20the\x20onclick\x20action\x20for\x20the\x20'('\x20token\x20of\x20a\x20function\x20call.\x0adocument.onClickCallees\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index]\x0a\x20\x20if\x20(data.Callees.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20data.Callees[0].Href;\x20//\x20jump\x20to\x20sole\x20callee\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Callees\x20of\x20this\x20\"\x20+\x20escapeHTML(data.Descr)\x20+\x20\":
    \\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20data.Callees.length;\x20i++)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(data.Callees[i])\x20+\x20\"
    \\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20onClickTypeInfo\x20is\x20the\x20onclick\x20action\x20for\x20identifiers\x20declaring\x20a\x20named\x20type.\x0adocument.onClickTypeInfo\x20=\x20function(index)\x20{\x0a\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[index];\x0a\x20\x20var\x20html\x20=\x20\"Type\x20\"\x20+\x20data.Name\x20+\x20\":\x20\"\x20+\x0a\x20\x20\"      (size=\"\x20+\x20data.Size\x20+\x20\",\x20align=\"\x20+\x20data.Align\x20+\x20\")
    \\n\";\x0a\x20\x20html\x20+=\x20implementsHTML(data);\x0a\x20\x20html\x20+=\x20methodsetHTML(data);\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a//\x20implementsHTML\x20returns\x20HTML\x20for\x20the\x20implements\x20relation\x20of\x20the\x0a//\x20specified\x20TypeInfoJSON\x20value.\x0afunction\x20implementsHTML(info)\x20{\x0a\x20\x20var\x20html\x20=\x20\"\";\x0a\x20\x20if\x20(info.ImplGroups\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20info.ImplGroups.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20group\x20=\x20info.ImplGroups[i];\x0a\x20\x20\x20\x20\x20\x20var\x20x\x20=\x20\"\"\x20+\x20escapeHTML(group.Descr)\x20+\x20\"\x20\";\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20j\x20=\x200;\x20j\x20<\x20group.Facts.length;\x20j++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20fact\x20=\x20group.Facts[j];\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20y\x20=\x20\"\"\x20+\x20makeAnchor(fact.Other)\x20+\x20\"\";\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fact.ByKind\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20escapeHTML(fact.ByKind)\x20+\x20\"\x20type\x20\"\x20+\x20y\x20+\x20\"\x20implements\x20\"\x20+\x20x;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20x\x20+\x20\"\x20implements\x20\"\x20+\x20y;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20html\x20+=\x20\"
    \\n\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0a\x0a//\x20methodsetHTML\x20returns\x20HTML\x20for\x20the\x20methodset\x20of\x20the\x20specified\x0a//\x20TypeInfoJSON\x20value.\x0afunction\x20methodsetHTML(info)\x20{\x0a\x20\x20var\x20html\x20=\x20\"\";\x0a\x20\x20if\x20(info.Methods\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20info.Methods.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20html\x20+=\x20\"\"\x20+\x20makeAnchor(info.Methods[i])\x20+\x20\"
    \\n\";\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20return\x20html;\x0a}\x0a\x0a//\x20onClickComm\x20is\x20the\x20onclick\x20action\x20for\x20channel\x20\"make\"\x20and\x20\"<-\"\x0a//\x20send/receive\x20tokens.\x0adocument.onClickComm\x20=\x20function(index)\x20{\x0a\x20\x20var\x20ops\x20=\x20document.ANALYSIS_DATA[index].Ops\x0a\x20\x20if\x20(ops.length\x20==\x201)\x20{\x0a\x20\x20\x20\x20document.location\x20=\x20ops[0].Op.Href;\x20//\x20jump\x20to\x20sole\x20element\x0a\x20\x20\x20\x20return;\x0a\x20\x20}\x0a\x0a\x20\x20var\x20html\x20=\x20\"Operations\x20on\x20this\x20channel:
    \\n\";\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20ops.length;\x20i++)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20makeAnchor(ops[i].Op)\x20+\x20\"\x20by\x20\"\x20+\x20escapeHTML(ops[i].Fn)\x20+\x20\"
    \\n\";\x0a\x20\x20}\x0a\x20\x20if\x20(ops.length\x20==\x200)\x20{\x0a\x20\x20\x20\x20html\x20+=\x20\"(none)
    \\n\";\x0a\x20\x20}\x0a\x20\x20showLowFrame(html);\x0a};\x0a\x0a$(window).load(function()\x20{\x0a\x20\x20\x20\x20//\x20Scroll\x20window\x20so\x20that\x20first\x20selection\x20is\x20visible.\x0a\x20\x20\x20\x20//\x20(This\x20means\x20we\x20don't\x20need\x20to\x20emit\x20id='L%d'\x20spans\x20for\x20each\x20line.)\x0a\x20\x20\x20\x20//\x20TODO(adonovan):\x20ideally,\x20scroll\x20it\x20so\x20that\x20it's\x20under\x20the\x20pointer,\x0a\x20\x20\x20\x20//\x20but\x20I\x20don't\x20know\x20how\x20to\x20get\x20the\x20pointer\x20y\x20coordinate.\x0a\x20\x20\x20\x20var\x20elts\x20=\x20document.getElementsByClassName(\"selection\");\x0a\x20\x20\x20\x20if\x20(elts.length\x20>\x200)\x20{\x0a\x09elts[0].scrollIntoView()\x0a\x20\x20\x20\x20}\x0a});\x0a\x0a//\x20setupTypeInfo\x20populates\x20the\x20\"Implements\"\x20and\x20\"Method\x20set\"\x20toggle\x20for\x0a//\x20each\x20type\x20in\x20the\x20package\x20doc.\x0afunction\x20setupTypeInfo()\x20{\x0a\x20\x20for\x20(var\x20i\x20in\x20document.ANALYSIS_DATA)\x20{\x0a\x20\x20\x20\x20var\x20data\x20=\x20document.ANALYSIS_DATA[i];\x0a\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\"implements-\"\x20+\x20i);\x0a\x20\x20\x20\x20if\x20(el\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20el\x20!=\x20null\x20=>\x20data\x20is\x20TypeInfoJSON.\x0a\x20\x20\x20\x20\x20\x20if\x20(data.ImplGroups\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20implementsHTML(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\"methodset-\"\x20+\x20i);\x0a\x20\x20\x20\x20if\x20(el\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20el\x20!=\x20null\x20=>\x20data\x20is\x20TypeInfoJSON.\x0a\x20\x20\x20\x20\x20\x20if\x20(data.Methods\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.innerHTML\x20=\x20methodsetHTML(data);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a}\x0a\x0afunction\x20setupCallgraphs()\x20{\x0a\x20\x20if\x20(document.CALLGRAPH\x20==\x20null)\x20{\x0a\x20\x20\x20\x20return\x0a\x20\x20}\x0a\x20\x20document.getElementById(\"pkg-callgraph\").style.display\x20=\x20\"block\";\x0a\x0a\x20\x20var\x20treeviews\x20=\x20document.getElementsByClassName(\"treeview\");\x0a\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20treeviews.length;\x20i++)\x20{\x0a\x20\x20\x20\x20var\x20tree\x20=\x20treeviews[i];\x0a\x20\x20\x20\x20if\x20(tree.id\x20==\x20null\x20||\x20tree.id.indexOf(\"callgraph-\")\x20!=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20continue;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20id\x20=\x20tree.id.substring(\"callgraph-\".length);\x0a\x20\x20\x20\x20$(tree).treeview({collapsed:\x20true,\x20animated:\x20\"fast\"});\x0a\x20\x20\x20\x20document.cgAddChildren(tree,\x20tree,\x20[id]);\x0a\x20\x20\x20\x20tree.parentNode.parentNode.style.display\x20=\x20\"block\";\x0a\x20\x20}\x0a}\x0a\x0adocument.cgAddChildren\x20=\x20function(tree,\x20ul,\x20indices)\x20{\x0a\x20\x20if\x20(indices\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20indices.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20var\x20li\x20=\x20cgAddChild(tree,\x20ul,\x20document.CALLGRAPH[indices[i]]);\x0a\x20\x20\x20\x20\x20\x20if\x20(i\x20==\x20indices.length\x20-\x201)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20$(li).addClass(\"last\");\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20$(tree).treeview({animated:\x20\"fast\",\x20add:\x20ul});\x0a}\x0a\x0a//\x20cgAddChild\x20adds\x20an\x20
  • \x20element\x20for\x20document.CALLGRAPH\x20node\x20cgn\x20to\x0a//\x20the\x20parent\x20
      \x20element\x20ul.\x20tree\x20is\x20the\x20tree's\x20root\x20
        \x20element.\x0afunction\x20cgAddChild(tree,\x20ul,\x20cgn)\x20{\x0a\x20\x20\x20var\x20li\x20=\x20document.createElement(\"li\");\x0a\x20\x20\x20ul.appendChild(li);\x0a\x20\x20\x20li.className\x20=\x20\"closed\";\x0a\x0a\x20\x20\x20var\x20code\x20=\x20document.createElement(\"code\");\x0a\x0a\x20\x20\x20if\x20(cgn.Callees\x20!=\x20null)\x20{\x0a\x20\x20\x20\x20\x20$(li).addClass(\"expandable\");\x0a\x0a\x20\x20\x20\x20\x20//\x20Event\x20handlers\x20and\x20innerHTML\x20updates\x20don't\x20play\x20nicely\x20together,\x0a\x20\x20\x20\x20\x20//\x20hence\x20all\x20this\x20explicit\x20DOM\x20manipulation.\x0a\x20\x20\x20\x20\x20var\x20hitarea\x20=\x20document.createElement(\"div\");\x0a\x20\x20\x20\x20\x20hitarea.className\x20=\x20\"hitarea\x20expandable-hitarea\";\x0a\x20\x20\x20\x20\x20li.appendChild(hitarea);\x0a\x0a\x20\x20\x20\x20\x20li.appendChild(code);\x0a\x0a\x20\x20\x20\x20\x20var\x20childUL\x20=\x20document.createElement(\"ul\");\x0a\x20\x20\x20\x20\x20li.appendChild(childUL);\x0a\x20\x20\x20\x20\x20childUL.setAttribute('style',\x20\"display:\x20none;\");\x0a\x0a\x20\x20\x20\x20\x20var\x20onClick\x20=\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20document.cgAddChildren(tree,\x20childUL,\x20cgn.Callees);\x0a\x20\x20\x20\x20\x20\x20\x20hitarea.removeEventListener('click',\x20onClick)\x0a\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20hitarea.addEventListener('click',\x20onClick);\x0a\x0a\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20li.appendChild(code);\x0a\x20\x20\x20}\x0a\x20\x20\x20code.innerHTML\x20+=\x20\" \"\x20+\x20makeAnchor(cgn.Func);\x0a\x20\x20\x20return\x20li\x0a}\x0a\x0a})();\x0a", - As an indication of its precision, the result contains only - functions whose name starts with Example. -

        + "images/minus.gif": "GIF89a\x09\x00\x09\x00\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x09\x00\x09\x00\x00\x08\"\x00\x03\x08\x1cH\xf0\x9f\xc1\x83\xff\x04\"<\xa8pa\xc2\x00\xff\x00H\x94\xf8\xd0aE\x87\x0d\x17\x12\xdc\x18\x20\x20\x00;", -

        Intra-package call graph

        -

        - The same call graph information is presented in a very different way - in the package view. For each package, an interactive tree view - allows exploration of the call graph as it relates to just that - package; all functions from other packages are elided. + "images/plus.gif": "GIF89a\x09\x00\x09\x00\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x09\x00\x09\x00\x00\x08&\x00\x03\x08\x1cH\xf0\x9f\xc1\x83\xff\x04\x1e\x04pP\xa1A\x86\x06\x15\x02\x9881a\x80\x85\x0d/>\xcc\x880#A\x82\x01\x01\x00;", - The roots of the tree are the external entry points of the package: - not only its exported functions, but also any unexported or - anonymous functions that are called (dynamically) from outside the - package. -

        -

        - This example shows the entry points of the - path/filepath package, with the call graph for - Glob expanded several levels -

        - -

        - Notice that the nodes for Glob and Join appear multiple times: the - tree is a partial unrolling of a cyclic graph; the full unrolling - is in general infinite. -

        -

        - For each function documented in the package view, another - interactive tree view allows exploration of the same graph starting - at that function. + "images/treeview-black-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\x08\xff\x00\xff\x09\x1c\xf8\x0f\x00\xc1\x83\x08\x0d\"\\X\x90\xe1B\x85\x0e\x09B\x8c(p\"E\x8b\x111:\xd4\xc8\x10\x80\xc7\x8f\x1f\x1fR\x948r\x20G\x91%\x1b\xa6<\x990\xa5\xca\x92,\x0f\xc6$\xb9\xd2\xe5L\x936s\xd6\xdc\x09SgO\x9e#oV\xf4\x19\x94\xe8E\xa3\x19\x91nT\xda\x91)\xca\x9fP\x8b\x02=:5i\xd5\xa5W\x9bf}*5*U\xafV\xc1b\x15\xab\x95,\xd7\xaf]\xd3\xa2]\x1bVm[\xb6c\xdd\xc6\x85[Vn]\xbag\xdf\xea\x9d\xbb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xbcc\xef{\xf2\xccs\xef\xbc\xf6\xc8\xcf\xfc\xbd\xf7\xd5\x93\x7f\xbd\xf9\xd9\xa3\xbf\xbd\xf8\xe5\xb3\x7f\xbe\xfb\xe9\xc3\xbf\xfe\xd2\xf2\x87O\xff\xfd\xc0K\xaf\x7f\xf4\xfc\x83?\xbd\xfa\xf6\xcb_\xff\x00\xf8\xbf\xfa\x15\x10\x7f\xca#\xe0\xfe\xfc\xb7@\x05\x0e\xd0\x80\x0d\x84\xe0\x03\x11\xd8=\x092p\x82\x02\xbc\xa0\x06\x1d\xb8A\x0br\xf0\x83\x1e\x0c!\x05\xc7'\xc2\x0c\x82p\x84\xedC\xe1\xfbT\x18?\x16\xce\xcf\x84%L`\x0c+\xe8\xc2\x00\xca\xb0\x86\x07\x84!\x0e#\xb8C\x0c\xdeP\x87@\xfc\xa1\x102i\x18D\"\x0e\x91\x84=\xec`\x12OXD$61\x85O\\a\x14[8\xc5\x17\x1e\x11\x8aW\x94b\x16\xa9\xb8E+\x1a\xf1\x8bN\xec\xa2\x0di\x08\x12\x90\x04\x04\x00;", - This is a portion of the internal graph of - net/http.ListenAndServe. -

        - + "images/treeview-black.gif": "GIF89a`\x00\x85\x00\xa1\x01\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff!\xf9\x04\x01\x00\x00\x02\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x94\x8f\xa9\xcb\xed\x0fE\x98\xc1\xd1\x88\xb3\xde\xa8\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xea\xca\xb6\xee\x0a\xc4\xb2\xfc\xd6&\xb0\xe0\xf6\xfe\xe9\x82\xef\xe3\x09#\xc0Cp\x88d\xe0f\xcbY\xf2\x89(\x1a\x8eP\xa8\xf4W\xcdNs\xda,\xd3\xd9\xedR\xc3^\xb2yl~\xa2\xd3\xc85[\xe8~\xabRF9\x8f\xbe\xb5o.\x96\x09W?R\x12\x07\x98\x80Gx\x88\x98\x08\xf8E\xa3\xa826\xe8\x88\x01)yBY)\xf8\xe3\xc4\x84\xd9\xf3\xd7\x09r\x09\xea\xa9\x109\x9a\xc3hz\xda\xa0\xba\xfa\xd0\xea\xca\x1a{3\x9bY\x1b\x02\xebj\x98\xbb\xba\x1b\xcb\xd7\x00\x1c\xf5k\xdb{{\x8c\x9c\xac\x8c\xca\xb8\xac\xf4\xe9<\x9c\x87\x15\x9dp\xc5{\xdaD\xc3Y}]m]7\xfdM\x0d>>\x95j\x9e\xae\xbe\xce\xde\x8ed\xb8\x0e\xff+\xac@\x7f\xeb\x9b\x8eo\xae?\xce\xef\x8e\x1d+\x15@P\xa2\xc6yKw\xd0\x9c\xb6\x18\x9a\x1aEKh0\x1c\xb9\x88\xa5\xd4\x09t\x871\xa3\xc6d\x8d\x06\xe4\xe5\xdb\xe8\xb1\x97\x9f>!O\x95\xfcv\xb2ZJ\x8e,\x0d\xa2C\x08\xed[A\x991\xbb5d\xc8\xedaM\x9d\x15a\xf6T\xf8\xb2\xa5\xd0\xa1DG\xadtvtY\xd2J\xf6:\x8cT\xb8q`-\xa9\xb3\xa8\x06\xfc\x17\x94b9\xa8?\xb5J\x83\xca)\xa7\xb3\x996\xbb\xd24\xdb-k\xd1\xb5l\xdb\xba}\x0b7.\x82\x02\x00;", -

        Channel peers (send ↔ receive)

        -

        - Because concurrent Go programs use channels to pass not just values - but also control between different goroutines, it is natural when - reading Go code to want to navigate from a channel send to the - corresponding receive so as to understand the sequence of events. -

        -

        - Godoc annotates every channel operation—make, send, range, - receive, close—with a link to a panel displaying information - about other operations that might alias the same channel. -

        -

        - This example, from the tests of net/http, shows a send - operation on a chan bool. -

        - -

        - Clicking on the <- send operator reveals that this - channel is made at a unique location (line 332) and that there are - three receive operations that might read this value. + "images/treeview-default-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\x08\xff\x00\xff\x09\x1cH\xb0\xa0A\x81\x01\x0e*\\x0!\xc3\x87\x0b\x1dB\x9cHP\"E\x8a\x093\xfe\xd3x\xb1a\xc7\x8b\x16?2\x0c)R!\xc9\x92\x06O\xa2\xac\xb8rd\xcb\x88/M\xc6\xf48\xb3\xa0\xca\x977[\xe6\\\xb9\x13e\xcf\x92?E\x06\xfd8\xb4cQ\x905m&e\xb9\x14aS\xa7O\x8fb|\xba\x91\xaa\xd4\x89W!f}\xb8\xd5eT\xab`\xbf\x8am\xda\x15\xe6\xd8\xa5ee\x9eM\x9a\x96&\xd9\xb0o\xd7\xd6l\x9b\x12.Z\xbbl\xf1\xce\xd5;\x93\xaeR\xb9}\xf9\xc6\xf4\xcb4\xae\xe1\xbb\x80\x07\x0b\xc6\xb9Xgc\x9e\x8f}F\x06:Yhe\xa2\x97\xa9j\xde\xcc\xb93\xd7\xccH\x133\x16\xed\x984d\xd3\x92QSVm\x995f\xd7FAO\x85\x1d\xfap^\xda\xb3m\xef\xc5\x8dUvo\xdeZ}\x07\x07\xfe\x99\xb8W\xdd\x81\x8d\x9bE\xaeX\xb9Z\xe6\xa3\xa1\x97\x96~\x9azj\xeb\xab\xb1\xb7\xd6\xfe\x9a{l\xe7n\x11{\xff\xaf-\xbe\xfc\xed\xf1\xb9\xcd\xefF\xff\x9b\xfdp\xf7\xc5\xe1\x1fW\x9f\\\xfer\xfa\xcd\xed?\xc7\x1f\x9d\xfft\xff\xd5\x01x\x9d\x80\xd9\x11\xb8\x9d\x81\xdd!\xf8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8f\x84\xfd3\xe1\xffP\x18@\x15\x0e\xd0\x85\x05\x84\xe1\x01e\x98@\x16.\x90\x86\x0d\xb4\xe1\x03q\x18A\x1dN\xd0\x87\x15\x04\xe2\x05\xa6\x85\x98A\"n\xd0\x88\x1dD\xe2\x07\x95\x18B\x1e\x8ep\x20\x84\x81\xa2pf\xc8\xc4\x13J\x11yN\x14\xa1\x16\xb3\xc8\xc5*\xae\xf0\x8a\xf7\xf3\xe2\x0b\xc5\x18C2R\x11\x8c%4c\x0d\xd1\x98B5\xe6\x90\x8d-tc\x0f\xe1xC9>\x11*a\xa4\xe3\x0e\xed\xb8E>vQ\x8f?\x04d\x10\x059DB\x16\xd1\x90GDd\x12\x15\xb9DF6\xd1\x8f\x90t\xa4\x15\xf1\x98FI~\x91\x92m\xb4\xe4\x185YFN\x9e\x11\x93q\xf4\xe4\x1aAYGQ\xbe\x91\x94{4\xe5\x1cQ\x19HV\x0e\xd2\x95\x85\x84\xe5!e\x99HZ.\xd2)\x1a\xc9H@\x00\x00;", - It hardly needs pointing out that some channel element types are - very widely used (e.g. struct{}, bool, int, interface{}) and that a - typical Go program might contain dozens of receive operations on a - value of type chan bool; yet the pointer analysis is - able to distinguish operations on channels at a much finer precision - than based on their type alone. -

        -

        - Notice also that the send occurs in a different (anonymous) function - from the outer one containing the make and the receive - operations. -

        -

        - Here's another example of send on a different chan - bool, also in package net/http: -

        - -

        - The analysis finds just one receive operation that might receive - from this channel, in the test for this feature. -

        - + "images/treeview-default.gif": "GIF89a`\x00\x85\x00\xa1\x03\x00\x00\x00\x00\x80\x80\x80\xbc\xbc\xbc\xff\xff\xff!\xf9\x04\x01\x00\x00\x03\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x9c\x8f\xa9\xcb\xed\x0f\x07\x98\xc0\xd1\x88\xb3\xde\xa8\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xea\xca\xb6\xee\x1a\xc4\xb2\xfc\xd6f\xb0\xe0\xf6\xfe\xe9\xd2\xe1\xe3\x09#>Rp\x88d\xe0(\x93\x01\xee\x99\x8c\"\x8a@\xa9uz0^\xb7GCw;\x9c\x89\xc1\xe4\xb2\xd9yN\xab\xa5\xdf\xb5\xfb}j\xc3M\x82y\xb2\xae\x90\xdb\x13\x82\xfe\xa3\x8f\xb7\xf7\x11\x08\xa2'h@x\xa8\xb8\xc8\xc8&F\xd3(\xf2e\x18\xf90Y\x19r\x89\xd9#\xc1\x84\x06\xb5\x89\xa1\x19\xaa1J*\x9asZ\xfa\x18\xa3\xeajE\xf9*\xeb\x12;k\x1bw\xdb\x90\x98\xfb\x97J\x0a\xf8\xe7w\xbb\xbbQkG\xcc\x9b\xac\xbc\xfc\xc6\xda\xca\xec\xe5\x0bM\x15\x0d\x8df\xa0e\xbd\xe4\x09e\xbcI}=\x9dU\xa5-\xcd\xec\xecm\xad\xbe\xce\xde\xee\xae\x81\xac\x1e\xff\x0b\xac+l;\x0fM\x9c\xfe\xfb~\xb0\xef/\x20:u\xa6\x96\x81\xe3\x17\xea\x20\xc1N\x17\xba\x19\x1cWM\x1c6r\x12\x13\x20\xfc\xe6,\xa0\xc6b\x8d\x1c\xf5i\xcc\xc7\x0c$\xa6z\xf6DV2\x99\x0c%/\x95\x1d[\xde\x1aX.\xcfB\x991-.dR\xc1\xa1\xb2\x82;\xcd=\xa49-\xa3\xcb\xa1D\x8b\x1eb9\xec\xe3\xca{\x0bH\x1a\x9du\xf1i\xa5\xa8R\x0f\xc1\xac\x88\xa5fV\xac\x14\xcf1l\xa23\x19O\xb1>{\x02='\xb4\xaa\xda\xb5l\xdb\xba}\xcb\xab\x00\x00;", -

        Known issues

        -

        - All analysis results pertain to exactly - one configuration (e.g. amd64 linux). Files that are conditionally - compiled based on different platforms or build tags are not visible - to the analysis. -

        -

        - Files that import "C" require - preprocessing by the cgo tool. The file offsets after preprocessing - do not align with the unpreprocessed file, so markup is misaligned. -

        -

        - Files are not periodically re-analyzed. - If the files change underneath the running server, the displayed - markup is misaligned. -

        -

        - Additional issues are listed at - tools/godoc/analysis/README. -

        -`, + "images/treeview-gray-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\x08\xff\x00\xff\x09\x1c\xf8/\x00\xc1\x83\x08\x0d\"\\X\x90\xe1B\x85\x0e\x09B\x8c(p\"E\x8b\x111:\xd4\xc80\x80\xc7\x8f\x1f\x1fR\x948r\x20G\x91%\x1b\xa6<\x990\xa5\xca\x92,\x0f\xc6$\xb9\xd2\xe5L\x936s\xd6\xdc\x09SgO\x9e#oV\xf4\x19\x94\xe8E\xa3\x19\x91nT\xda\x91)\xca\x9fP\x8b\x02=:5i\xd5\xa5W\x9bf}*5*U\xafV\xc1b\x15\xab\x95,\xd7\xaf]\xd3\xa2]\x1bVm[\xb6c\xdd\xc6\x85[Vn]\xbag\xdf\xea\x9d\xbb\xf7n\xdf\xbc|\x03\xfb\x15\x0cx\xb0\xe1\xc2\x88[nUl\x96\xb1\xdd\xc42\x9d:\xc6;\xf9oe\xc2\x97\x0fg\x86L\xb3q\xe4\xc5\x9f=w~\xbc\xb9th\xd2\xa7)\xa7\xb6\xbc\x1ask\xcd\xaf9\xe3\x04=Zum\xd6\xb7]\xe7\x86\xbd[\xf6P\xda\xb3E\x07G\xdd\xdbt\xf1\xd8\xc6\x87\xdbV\x8e\x9b\xb9n\xe7\xbc\xa1\xfb~I\xdc\xa5\xf5\xeb\xd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x06\x1d\xb8A\x0br\xf0\x83\x1e\x0c!\x05\xc7'\xc2\x0c\x82p\x84\xedC\xe1\xfbT\x18?\x16\xce\xcf\x84%L`\x0c+\xe8\xc2\x00\xca\xb0\x86\x07\x84!\x0e#\xb8C\x0c\xdeP\x87@\xfc\xa1\x102i\x18D\"\x0e\x91\x84=\xec`\x12OXD$61\x85O\\a\x14[8\xc5\x17\x1e\x11\x8aW\x94b\x16\xa9\xb8E+\x1a\xf1\x8bN\xec\xa2\x0di\x08\x12\x90\x04\x04\x00;", - "analysis/ident-def.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03\xd2\x00\x00\x00\xf5\b\x03\x00\x00\x00\x8b\f=\xff\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE!# #$\"$%#($#&'%'(&-'\")+(4,\",.+01/>/\"241A2%685G6$8:7;<:Q9$>@=W>#AB@CEB\\B'cC$GIF\x00f\x00\x00g\x00\x00h\x00gF'\x00i\x01KLJ\x00j\x02\x02k\x03\x04l\x05mJ&\x06m\x06sJ(OQN\vo\b\x0ep\nwN&\nq\x16TUS\x10q\f\fr\x17\x0fs\x18~R%WYV\x12u\x1a,`\xae7]\xad\x15v\x1c\x86T)\x16w\x1d[]Z9a\xab\x19y\x1e^_];b\xace\xaf)z ac`+{\"(|*\x92]%cebAh\xb2egd+\u007f,\x9a_)Li\xafDl\xb0.\x81.ikh0\x830Ho\xb31\x841/\x858Jq\xb6mol\xa3f);\x86:Us\xb3\xabg->\x88B\x8c@\xb3m,vxu@\x8dGC\x8dA\\z\xbbxzwI\x8dH]}\xb7K\x8fJ\xb9r*_\x80\xbaM\x91L}\u007f|\xc1s-O\x93MP\x94Oc\x84\xbeN\x95U\x81\x83\x80\xc7x+W\x95VX\x97Xm\x87\xbcY\x98Y\xd1z(Z\x99Z[\x9aZ\x87\x89\x86\\\x9b[r\x8c\xc2\xd6~-^\x9d]\\\x9dc\x8a\x8c\x89d\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\xb9,\x92ڐ_m\xbe\x11\x1e\xd0\xf1\xb0\xa4\x01 \x13\x01I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x00I\x03\x80\xa7\x18I\x92\x1e\xea\xad\xde\x00\x90A\xb8'i\xc3@\aӳ\xad\xa9e\xaf}\xbc\x83\x81\x0e\x00\x00\x04\xd7$\xcd\x18\xe8\xa0xG`\xf7\x91\xbd\x81C\xf6[\xd8\x1b\xe8\x00\x00@pMҌ\x81\x0e\xea \x9e\x1b'\xe9\xa25N\x06:\x00\x00 \x17%\xcd\x18\xe8\xf4+O\x1d;g\x1f\u007f\xf1\ft\x00\xc0ø'i\xa4\x1b\xe8\xec\x0e\f:\x19\xb99\x18\xe8\x00\x00\xa0⢤u\x03\x9d`\xb0gk\xa0yׅ\x18\xe8\x00\x00\xa0ࢤu\x03\x9d\x16j\xa0\xd3\xdcra\x06:\x00\x00 w%\x8d\xb4\xe7xӾz \xb0\xc7&\xd0\xd9@\a\x00\x00䢤\x19\x03\x1d\xd59'l㶑\x82\x81\x0e\x00\x00\xc8=I\xb3\x06:{\x9b\xa8\xbc;.\xcc@\a\x00\x00䞤Y\x03\x1d\xc5:\xe7\\\xc0\xfa\xf6\xb1T\ft\x00\x00@.J\x9a1\xd0A{\x03{\x8fv7m\x15ش\xaa8\x19\xe8\x00\x00\xa0⚤Y\x03\x1dt(\x18ز\xd7Zю\x06:\x00\x00\xa8\xb8'\xe94\x18\xaa\x81\x0e\x00d\x1e#B\xd2\xf0_\x95\x00\x90*#B\xd2\x00\x00\xa4\nH\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\x05H\x1a\x00<\xc5H\x924\xdc\xea\r\x00\x8e\xb8'i\xdd@g\xb0)\xa0\xd0l\xbf\x81\x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?5MΞ\xf0\xc8\x00\x1e\x93\xa8O\x19\x9aD\x9eC4\xaa\t\x1d\x19-M\xe4bY\xd7\x1c\x96\xe13\xf1\x01\xbc\x88{\x926\ft\b^\x92t\xac\xa5\xf9+\x13Ǝ{d\xbe\x84\xd5Y9\xea\xa1\xe0\xfa\x9cI\t4\xb0+\xc0\x88\xc4-I+xw.\xad\xf5\xc7\x1dR\vy[\xfe\x1cy\x9d:\x15\xa1\x13tE\xf6b\xfc\xad69\x8b\x8f\x15JzXM|\x00\x0f⦤u\x03\x9dX\u007f\u007f`G\xbf\xc9ay\xe42\xb8\x9b^\xdbVT\xb6X\x9a\xd7\x12\xacT\x9cgWd\xad\xd9z[\xf61\xbc45\xe7\xb9\xe7&KW\x04z\x98X\xd65\x87a\x18M|\x00/⦤u\x03\x9d\xbdʬ\xfa\x9c\xd3\x06#\x84\xfd\x8a\xe5\xcd7\x95O\x1d\xb7\xe5\\=U1ˉ?\x94\x93=\x95\x0eG\x0eM\xcd\x1e{\xfbbI\xfa\x01\x13˺\xe6\xb0\f\x9f\x89\x0f\xe0Eܔ4\x00\x00\x17\x1d\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\n\x904\x00x\x8a\x8c\x96\xf4<)g>X\x02\x00\xde\"\xa3%ݿ#01g\xc0)\n\x00F\x12\xaeJZ3\xd0\x19\b\xb7\x04\x82\xfb\a\x1d\xa2\x87\x85\xb0\xb4\xdf)\x04\x00F\x12nJZ3\xd09\x17\bv\x1f\xd9۴\xd5\rM\xef\x91v;\x85\x00\xc0H\xc2MIk\x06:;Z\xc8\xf3\xc7\xce\x04\x86\xea\x18u!\x80\xa4\x01\x8fᢤu\x03\x9d\xad-\xf4\xf3\x0e\xdd\xc6\xf2\x12\x02\x92\x06<\x86{\x926\ft\xfa\x8f\xd1\x15\xbb\xb6\xd8\xc6\x0f\x0f\xddR\xd8)\x04\x00F\x12\xeeI\x9a7\xd0A(\xd1솸\xe29\x93w\x1dK8E\x01\xc0\x88\xc15I\x9b\ftp'\x1d8c\x1d=|l3\x1e\xfc\a\x00\x1e\xc0-I\x9b\rt\xd0\xee\xc0\x11\xdb\r\x86\x89\x81\x9c\xf1\xebw\xb8R3\x00\f\vnI\xdad\xa03\xb8#\xe0\xcem\\{\xa4\x0e\xa7\x10\x00\x18I\xb8%i\xde@g \xd8\xc4=\x8e\xfe\xd2\x01W\xbc\x01\x8fᖤ\x15Թ\xf4\x99\xe6-\xe7\xb0\xcac\x0e\xd1\xc3\x01H\x1a\xf0\x18nJZ3\xd09\x1ah>\xd2\xdf\u07ff\xab\xc5i\x83a`7H\x1a\xf0\x16nJZ3\xd0٦Ϊ/\xf9\xad&\xf1\xfe\xbd\xf3\xb2\\\x1a\xf1\x03\xc0\xf0ত]g\xae$}\xe5\x92\u007f\x8f\x00\xc0\xb0\x92ђ\xee\xff\xf0\x98S\b\x00\x8c02Z\xd2\x00\xe0=@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)@\xd2\x00\xe0)\xfe??\xe8B\x81\x97E\xcd\x14\x00\x00\x00\x00IEND\xaeB`\x82", + "images/treeview-gray.gif": "GIF89a`\x00\x85\x00\xa1\x03\x00\x00\x00\x00\x80\x80\x80\xbc\xbc\xbc\xff\xff\xff!\xf9\x04\x01\x00\x00\x03\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x9c\x8f\xa9\xcb\xed\x0f\x87\x98\xc2\xd1\x88\xb3\xde\xa8\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xea\xca\xb6\xee\x1a\xc4\xb2\xfc\xd6f\xb0\xe0\xf6\xfe\xe9\x03p\xf0\xf1\x86\x11\x1f\xd0\x20$*\x198\x80\xd39\x98%\x97Kc\x90\x8aUX\x91\xd9.W\xeb\xedJg\xe1\xf2\xb4,F\xab\xcfj*\xbb\xad|\xc3\x87\xf2\xb9*u\xb5\xef\xf0_\xfdh\xf2p\x01\xe67RRG\x98\xc0\x87\xb8\xc8\xd8H8F\xe3\xa8rv(\x89Aiy\x82\x99i\xf8\xf3\x04$\xc5\xd9\x93#*\xb2Y::\x88\xca\x01\x19\xb3\xda\xf9\xaa\x19+;\x0b[\x1bRy\xdb\x90{\xab\xc8[\xeb;+\xd80\x8c\xf0K\xa8\xa8q\xec\x97\xac\xeb\xfc\x0c\x0d\xdd\xba\xfcz\x1a\xadz\x14u\xcdt\x90M\xbd\xda\xf4\x19E\xb6\xdd\xe7]\x8e\x9d\x87\xaen\xbcn\xdc\xea\x1e/?O_\xef\xd5,\x8f\xffJ\x81_\xec\x1c\x9c\x8fT@U\xee\x00\xdac7oZB\x81\xf1\xb6h\x93\xe7\xf0\x1b\xaapO\xc6E*\x17q\xa1\x81ms\x10\x19\xbaSx0\xa4\xc8\x91$%\x90\xd4W\xf0\x9a?\x05+{\x9d|Y2fL\x90\x0d=\xae\xb3v\xd3&:\x8aPB\xed\xd4\x89\x11\xe86\x9c;\xe1\xc9<\x8a4\xe9*\x94\xeb\x98\xa2sZ\xaa\xe5\x01\xa9\xd7$\xea\xb2z\x0bk-\xad\xb3\xb8\x96\xa2\xf9QhU\xb1\xd1\x88\x06\xfd\x04\x8a\\P\x829\xd9\xfet\x8b\xd1\xa8\xd2\xb9t\xeb\xda\xbd\x8b7\xaf\x82\x02\x00;", - "analysis/ident-field.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03\xd2\x00\x00\x00\xde\b\x03\x00\x00\x00\xe6g\xc8\n\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x02\x05\x01\n\x03\x01\x05\b\x03\f\x0e\v\f\x10\x1c\x0e\x11\x14\x10\x12\x0f\r\x15$\x16\x17\x14\x1c\x1b\x15\x1b\x1d\x1a\x1f\x1f\x19\x13#A!# $$\x1d#$\"$%#&'%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<\xc7g\x06\fc\xad\x97M\xe1\xe0\x9f+\x87\x95\r\xd1^\x96\xdḑc\xe2:\xa3\x90\xeb\xc0,I\x0f\xa2\xd6\xfd*\xe9\xe1\xadug\xc3@?\xfc\xd0\x12\xec\x92\x1e\u0558&\xe9\x81\xe3WI\a7 \xe9\xe0\xa5y\x1f\xb7\xc4\xf4\xf5W\x9f\xb8H\x17;\x8d\xa2t8_\xc7?\xfd\xd6`w\x0eB@\xd2\xc1K\x1c\xc7q\x13\x9a\x8d\xa2F\x02t\xb1\xf3\x13\xa3(\x1dr\xc8\xce獢F\x0f i\x00\b*@\xd2\x00\x10T\x80\xa4\x01 \xa8\x00I\x03@P\x01\x92\x06\x80\xa0\x02$\r\x00A\x05H\x1a\x00\x82\n\x904\x00\x04\x15 i\xb38\x92\xfd\xe5\xf0Z\xb9\x00\xa3\x13\xf3$\xed6\xd0q\x15\xd1\xdb\x14\x15i\xddK(\x88\xd9˗\x92\x8b\x18\x87\xcf\xca\x05\x18\xa5\x98%i\xd9@\xe7\xb2\xfdMr\xab\"s\xff{\xc5\x1f0\xfe-\xe4\xfec\u007f\x12\x12\xc3f\xe5\x02\x8cR̒\xb4l\xa0s\xd9n\xaeџ\xdf`\xfd[\xce\vw\xc4$\f\x97\x95\v0J1IҌ\x81Ψ\x914{\x83\xcaM)]\xee\xe4pY\xb9\x00\xa3\x14\x93$\xcd\x18\xe8\x98(i\r\xa7\x16\xd6\x14GөŇX-7\x1e\xa5\u007fK\xcf=R'\xadm\xe5\x02\x00\x83\xc5$I3\x06:\x97\xed\x958YcB\xb3\xd6rja\\]\xb4\x9dZ\x8cc5\xddx\x94\xfe-\xef\b7\xf8\x16аr\x01\x80Ac\x92\xa4\x19\x03\x9d+4Y\xf2\xbc\xdf5\xad\xe7\xbb#\xb9\xba\xe88\xb5\x18\xc5\xea\xba\xf1\xc8\x03\xef:\xd6\xe0\xd2\xd3\xca\x05\x00\x06\x8fI\x92\x96\rt\x10:M\xc4\xec*\xf2{W\x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\x00A\x05H\x1a\x00\x82\n\x904\x00\x04\x15 i\x00\b*@\xd2\x00\x10T\x80\xa4\x01 \xa8\x00I\x03@P\x01\x92\x06\x80\xa0\x02$\r\x00A\xc5(\x96\xf4\x1c.j^\x93Q\x10\x00\x04\x18\xa3X\xd2Ϊ\xa2)Q\x9dFQ\x00\x10X\x98'i\xd1@\a\xa1\xceC\xbb\nv\x1d2E[U\\\xd0{|\x00\xa3\r\xb3$-\x19\xe8\xa0\xcbŻ\x9aڛv\x15\x9bqg\x93Z\xee\xb0Q\b\x00\x04\x16fIZ6Щ)!7B\xe8.\xa91\xdae\x18\x00I\x03A\x87I\x92f\ft*\x85\xbb\x84\x96\x99qw~\x904\x10t\x98$i\xc6@\xa7\xa3\xb8\xaa\xc3\xd5QS\xdc\xe1-~\x98hઌB\x00 \xb00IҬ\x81\x0e\x9eV\xdb\xed\xfbL\xb9\xa3\xa0+jڡ\xf6^\xa3(\x00\b L\x924c\xa0\xe3\xaa,ir6\x95T\x9ab]\xb9\x8f㸻\x8d\x82\x00 \x800IҌ\x81N\r5\xc6r\x95\x98a0\xdd\x195isU\x90\xf9\x02\x00\xa3\x1c\x93$\xcd\x18\xe8\x14Ѕ2\xf4f\x81\xb7\xf8a\xa2\x963cQ\x0e\x00\x86\x11\x93$\xcd\x18舒>n\x8e\xa4a\xc5\x1b\b2L\x924c\xa0S%\x0e\xbc\xcdX{\x06I\x03A\x87I\x92f\ft\\ϗ\x9cn?]\xf2\xbc\x19KއA\xd2@\xb0a\x96\xa4\x19\x03\x1dW\xed\xae\xa2]\xb5\xfeW\xb4\xcby|N\x98Ҁ\n\x00\x02\x1e\xd3$m>\xb38.\xba\xcc(\b\x00\x02\x8cQ,i\xe7\xf1v\xa3\x10\x00\b8F\xb1\xa4\x01 \x18\x01I\x03@P\x01\x92\x06\x80\xa0\x02$\r\x00A\x05H\x1a\x00\x82\n\x904\x00\x04\x15 i\x00\b*@\xd2\x00\x10T\x80\xa4\x01 \xa8\x00I\x03@P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\xd3$-\x1b\xe8\x1c\x13.\xf7\xbe\xe2-z8\xb8d]\xa9\x91d90\xdf\x1a\xbb\x94\xaaf\xc1\v[g[\xe3\x85Ӹ[g\xc6Zbɥ˯\xd1S\xaa\xbd\v\xe2\x15M\xfc\xac0\xe9\x13&\x92\xe8\xe8\xe2\xf8\u0605\aI\xea\xef\xab\x13\xac\x8b\xcfRI\xb7-\xb4\xc6.\xfe\xad\xc5\xf20\x1b\xf0\xd2\xc2\xed\tS\xe3\x17\xbeFws\xad\xbfú\xf0\x14R f,\xe4\xb0\xf4\x8e\x84'\xfe8բZ\xa5o[\x9e\x10\xbb\x80tg\xbd;gZ㗿0s\xea\u0087\xf1\x1eS\xdf#\xa7\xb4\x95\xb1\xb3\xb7/\x8f\x8d_)\xc8\\.\xa4\x8cn\x0em\x16\xcf\x01͠*\x8a\xb0Ӻ\x93>\xcbG\xa3\xd7x\xbbg͚\x15EwS/\xe0\x03\x12\xa6I\xda|~k\xf9\xabFrx\x11\x96\xc7\x02\x1a\x97\xf55\xa3\x90\xe1g\xe9b\xa3\x88\xd1\xcb(\x96\xb4\x19\xffU\x19\x04\x92>\xe0\xd9\xd7\xfa\x9dg-\xaa1\x05 3\x8a%m\x06\x81.\xe9\xed\xaf\xa1\xc5[\x8d\x82\x86\x9d\x8f\xe3w\x1a\x85\x8cb@\xd2\xfe\xa4\xed\xa8e\xbdj\x86\x1cP\xb8,\xf3\x1f\x89\xff\xda(\n0\x15\x90\xb4?YHV\x9aڌ\xa2F0[c\x17\xb7\x19\xc5\x00\xe6\x02\x92\x06\x80\xa0\x02$\r\x00A\x05H\x1a\x00\x82\n\x904\x00\x04\x15 i\x00\b*\xfe?\xb6^u\v\xa5[\x1f\x81\x00\x00\x00\x00IEND\xaeB`\x82", + "implements.html": "\x0a\x09\x0a\x09\x09\xe2\x96\xb9\x20Implements

        \x0a\x09\x0a\x09\x0a\x09\x09\xe2\x96\xbe\x20Implements

        \x0a\x09\x09...\x0a\x09\x0a\x0a", - "analysis/ident-func.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03\xd2\x00\x00\x00\xda\b\x03\x00\x00\x00}\xf6\x8a\x1c\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\x01\x04\x00\x02\x05\x01\n\x03\x01\x05\b\x03\t\f\b\t\x0f\x11\x0e\x10\f\x10\x12\x0f\x13\x15\x12\x15\x16\x14\x0f\x17&\x19\x18\x11\x1a\x1a\x13\x1a\x1c\x19\x1c\x1c\x16\x13\x1e7 \x1f\x19!# $$\x1d#$\"$%#'(&)(\"+)\x1e\x14+N++$*,)/-\"-.,.2402/63(241:7+685;9-:;9?<0=?=C@4AB@CEBGE8KH|u]tvsB\x8c@@\x8dG\\z\xbby{x]~\xb7e|\xb8\x84|dK\x90J_\x80\xba}\u007f|O\x93Nb\x83\xbd\x8b\x81cN\x95Ud\x85\xbf\x81\x83\x80W\x95Vl\x87\xbc\x8f\x86hZ\x98Yo\x89\xbe\\\x9a[\x87\x89\x86\x93\x89k^\x9d]\\\x9dds\x8dË\x8d\x8a\x96\x8doz\x8e\xbfe\x9ef\x8d\x8f\x8c|\x90\xc1\x9b\x91s\x90\x92\x8fi\xa2i~\x93\xc4x\x95Ā\x94œ\x94\x91{\x98\xc7s\xa4l\xa0\x96xq\xa5s\x97\x99\x96\x83\x9bţ\x99{\x99\x9b\x98u\xaaw\xa7\x9d~\x87\x9fɜ\x9e\x9b\u007f\xabz\x89\xa1˫\xa0\x82\x9f\xa1\x9e\x8f\xa2ǡ\xa3\xa0\xa2\xa4\xa1\x92\xa5ʂ\xb1\x85\xa5\xa7\xa4\x94\xa8ͳ\xa7\x82\x8b\xb3\x89\xa7\xa9\xa6\x96\xaa϶\xa9\x84\x8e\xb6\x8c\x9d\xac̪\xac\xa9\x8d\xb8\x93\xba\xad\x88\x9f\xafέ\xaf\xac\xa1\xb1ѯ\xb1\xae\x97\xbb\x97\xc0\xb3\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VG\x9a\a\xa4<\x8a\xad\xb7Gܾ\xd5+\x96\xa5-<\xa5\xa1\xcdԿ\xae4Oҡa\x99\xad\xc4\xc8\xc4\\^\xb4e\xf4\x18\xd9\f\x9aNa\xe9\x1br\x06\xd1\xea\xc2\xf6\xd8\xe0\xe8\xf6\x9e\x9f\x19\x10\xc4V/\x9b\xca\xc1\x1fW\x06\x95M\xd1\x03\xbf\x9f8\x84\xb4O\n֟\x04\x11̒\xf4 Z=\xa4\x92\x0en\xab\xb75\x04\xe7\xf6q?\xb1\xbc\xa4G5\xa6Iz\xe0\x84TҖ\x06$maZ\xf6q\xcb\xcc\xde\u007f\xf5\x8f/\xe8f\xa7\x91\x95\x0e\x17\xea\xf9\xfcw\a\x9b\xd8z\x80\xa4-\xccL\x8e\xe3\xc2[\x8c\xac\x86\x03t\xb3\xf3s48\xb2I\xe2\vFV\xa3\x06\x904\x00X\n\x904\x00X\n\x904\x00X\n\x904\x00X\n\x904\x00X\n\x904\x00X\n\x904\x00X\n\x904\x00X\n\x90\xb4i\x1c\xcf\xfa*\xb8\xae\\\x80Q\x89\x89\x92\xf68\xd0q\x17\xd1\xc7\x14\x15i=K\xc8¼ė\x92\x9b\x18\x83\xe7\xca\x05\x18\x9d\x98&iفN\xbb\xb3\xc1\x85\x19\xe8\x9f\xee\x8c<\x18\xff-\xe4\x91#\x03k\x02\x92\x06,\x89+c\x127\xc7\xc8Ȓ\x80\xa4G\x1f\xd4s\xcf\xd0\x19\u07be\u007f\xa6NuV\x9a\xf6\xe4YS1Q\xd2\x1e\a:\xca`h\xa9\x8c\x92\xfeL\xbb}IT\xc4lS\xe6j\x9f;\xf8\xfb\x8cl\x10y\xae\x12\xe6\xae\xcc\n\xbf\xefH\xd5\xc9W\xf4\xdc\xd3>+\xf2I\x8do\a@\x80}\xff\x94G\xfa\xff'\xf3\x9e\xf3\x96\xc1q\\D\x8b\x86A\x03\xb7O#vT`\x9a\xa4e\a:l0ԔGHO<\x9b5ə\x11\xd1\xee\x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\xf8\xc8YQҢmh*\t\x84\n\xf3$\r\x98\x85z{\f\xb0\x14 \xe9\xd1\aH\xdaҀ\xa4G\x1f iK\x03\x92\x1eu\\\xa8\xe7\xf3\xdf\xf5\xf9\xf7c\xc0H\x06$=\xea\xc8&\xbb]\x17\x8c\xac\x80\x91\nH\x1a\x00,\x05H\x1a\x00,\x05H\x1a\x00,\x05H\x1a\x00,\x05H\x1a\x00,\x05H\x1a\x00,\x05H\x1a\x00,\x05H\x1a\x00,\x05H\x1a\x00,\x85I\x92\xee)v\n\x14\x93O\xae\xb2\xa2}&<\xd3\x04\x00,\x88I\x92v;O\xba0'\xe8\xb3M\\\x055-5\x05\xa0i\x00\b\x00&I\x1a5\xd1gw\xd3G\b\xf6\xd1\xd7\xc3\xc5}\x06I\x00\x000\xc6,IS\xca\xc9s\x8aPs\x01\x95w\xc1\xf0\xf1]\t\x00#\x173%M\x9f#\x88P\xa5\xe0\x13\xab܌\xe7\t\x02\x80\xd50S\xd2%\x95\xf4m\xb7\xf0\x00\xef\xc3&<\x9a\x1f\x00,\x87\x89\x92n\x15\x9f\xdc]\\K\xdfj\x8b}\x19\x03\x00\xe0\x17&J\xbaRt\x82%z\xae\xac\x0e\xb5\x9b;\x00\xb0\"&J\xbaHt(])x\xa1-\x83\xb54\x00\f\x1d\xf3$\xdd\xee\x14\xfdB4;\x89ǻ\xabN\xd8\xf1\x06\x80\xa1c\x9e\xa4[\x9d\xedB\xa0\x8f\xfaΩ\x86\xeb\xd2\x00\x10\x00̓t\xb3\xd3\xe32\xc7UP\xddZ\rw\x8f\x01@ 0Oҭ\xf2v\x98k_A\x19(\x1a\x00\x02\x81y\x92\x06\x00 \b\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc0R\x80\xa4\x01\xc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c꺺N<\xd8\xc7$\xec\xd8~\xa7\x90\x03ñ\x98{\xf7\x1c\xdah\u007f\x8dd\xb6b\xcfs\v\xf04\xfe\xf4\xa5\xbai\xabO\xa33\xab\xa7\xd5)\xaf\xba\xc7\xd8\x1f8}lQ,\xa9\xa6\\\a\x06\xdd\x1c\x9eN\x88U\xbb/\x1b\\C\x11\xe2\x17\v\xdbvri\xc2\xddc\xbb\xea\xeaHn\x9a\r\x85y\x88\xdc`\nhb\x9e\xa4e\a:'\x84۽\xaf\xfa\xb2\x0e\x06\x97bVi\x04Y\x0e,\x88\x89}\x88\xaaf\xe1k\xdb\uf349\x17.\xe3n\x9f\x1bk\x8f%\xb7.\xbfI/\xa9\xf6-\x8cWt\xf13¢OXH\xa2c\x8b\xe3c\x17\x1d\"\xa1\u007f\xaeN\x88Y|\x86J\xfa\xfc\xa2\x98\xd8ſ\xb7\xdbײ\x06\xfb\x17\xedH\x98\x16\xbf\x88*\x1a\xb97\xde\x19\xb3\xe84R f,\xe4\xf0Н\tO\xffq\x1á\xe1\xfc\x8a\x84\u0605d\xd1\u07b7knL\xfc\x8a\xd7\xe6N[\xb4\x16\xa7\x98\xf6\x01\xb9\xa4\xad\xb4\xbdwNJ\xd8\xf8U\x82\xcc\xe5J\xca\xe8\xe6p^](\x1adC\x11v\xc5\xec\xa2\xefri\xf4\x1eoϪY\xb3\xa1h2\xf5\x06>\xe0\xc1=0===c})}function\x20bk(a){var\x20b=bl.split(\"|\"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return\x20c}function\x20bC(a,b){return\x20a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function\x20bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var\x20c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete\x20g.handle,g.events={};for(c\x20in\x20h)for(d=0,e=h[c].length;d\").appendTo(e.body),c=b.css(\"display\");b.remove();if(c===\"none\"||c===\"\"){bI=e.body.appendChild(bI||p.extend(e.createElement(\"iframe\"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(\"\"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,\"display\"),e.body.removeChild(bI)}return\x20bS[a]=c,c}function\x20ci(a,b,c,d){var\x20e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+\"[\"+(typeof\x20e==\"object\"?b:\"\")+\"]\",e,c,d)});else\x20if(!c&&p.type(b)===\"object\")for(e\x20in\x20b)ci(a+\"[\"+e+\"]\",b[e],c,d);else\x20d(a,b)}function\x20cz(a){return\x20function(b,c){typeof\x20b!=\"string\"&&(c=b,b=\"*\");var\x20d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\\w\\-]*)$)/,v=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,w=/^[\\],:{}\\s]*$/,x=/(?:^|:|,)(?:\\s*\\[)+/g,y=/\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,z=/\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/g,A=/^-ms-/,B=/-([\\da-z])/gi,C=function(a,b){return(b+\"\").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener(\"DOMContentLoaded\",D,!1),p.ready()):e.readyState===\"complete\"&&(e.detachEvent(\"onreadystatechange\",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var\x20f,g,h,i;if(!a)return\x20this;if(a.nodeType)return\x20this.context=this[0]=a,this.length=1,this;if(typeof\x20a==\"string\"){a.charAt(0)===\"<\"&&a.charAt(a.length-1)===\">\"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return\x20c=c\x20instanceof\x20p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return\x20d.find(a);this.length=1,this[0]=g}return\x20this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return\x20p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:\"\",jquery:\"1.8.2\",length:0,size:function(){return\x20this.length},toArray:function(){return\x20k.call(this)},get:function(a){return\x20a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var\x20d=p.merge(this.constructor(),a);return\x20d.prevObject=this,d.context=this.context,b===\"find\"?d.selector=this.selector+(this.selector?\"\x20\":\"\")+c:b&&(d.selector=this.selector+\".\"+b+\"(\"+c+\")\"),d},each:function(a,b){return\x20p.each(this,a,b)},ready:function(a){return\x20p.ready.promise().done(a),this},eq:function(a){return\x20a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return\x20this.eq(0)},last:function(){return\x20this.eq(-1)},slice:function(){return\x20this.pushStack(k.apply(this,arguments),\"slice\",k.call(arguments).join(\",\"))},map:function(a){return\x20this.pushStack(p.map(this,function(b,c){return\x20a.call(b,c,b)}))},end:function(){return\x20this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var\x20a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof\x20h==\"boolean\"&&(k=h,h=arguments[1]||{},i=2),typeof\x20h!=\"object\"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger(\"ready\").off(\"ready\")},isFunction:function(a){return\x20p.type(a)===\"function\"},isArray:Array.isArray||function(a){return\x20p.type(a)===\"array\"},isWindow:function(a){return\x20a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return\x20a==null?String(a):E[m.call(a)]||\"object\"},isPlainObject:function(a){if(!a||p.type(a)!==\"object\"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,\"constructor\")&&!n.call(a.constructor.prototype,\"isPrototypeOf\"))return!1}catch(c){return!1}var\x20d;for(d\x20in\x20a);return\x20d===b||n.call(a,d)},isEmptyObject:function(a){var\x20b;for(b\x20in\x20a)return!1;return!0},error:function(a){throw\x20new\x20Error(a)},parseHTML:function(a,b,c){var\x20d;return!a||typeof\x20a!=\"string\"?null:(typeof\x20b==\"boolean\"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof\x20b!=\"string\")return\x20null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return\x20a.JSON.parse(b);if(w.test(b.replace(y,\"@\").replace(z,\"]\").replace(x,\"\")))return(new\x20Function(\"return\x20\"+b))();p.error(\"Invalid\x20JSON:\x20\"+b)},parseXML:function(c){var\x20d,e;if(!c||typeof\x20c!=\"string\")return\x20null;try{a.DOMParser?(e=new\x20DOMParser,d=e.parseFromString(c,\"text/xml\")):(d=new\x20ActiveXObject(\"Microsoft.XMLDOM\"),d.async=\"false\",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName(\"parsererror\").length)&&p.error(\"Invalid\x20XML:\x20\"+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return\x20a.replace(A,\"ms-\").replace(B,C)},nodeName:function(a,b){return\x20a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var\x20e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e\x20in\x20a)if(c.apply(a[e],d)===!1)break}else\x20for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return\x20p.inArray(a,i)>-1},empty:function(){return\x20i=[],this},disable:function(){return\x20i=j=c=b,this},disabled:function(){return!i},lock:function(){return\x20j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return\x20b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return\x20l.fireWith(this,arguments),this},fired:function(){return!!d}};return\x20l},p.extend({Deferred:function(a){var\x20b=[[\"resolve\",\"done\",p.Callbacks(\"once\x20memory\"),\"resolved\"],[\"reject\",\"fail\",p.Callbacks(\"once\x20memory\"),\"rejected\"],[\"notify\",\"progress\",p.Callbacks(\"memory\")]],c=\"pending\",d={state:function(){return\x20c},always:function(){return\x20e.done(arguments).fail(arguments),this},then:function(){var\x20a=arguments;return\x20p.Deferred(function(c){p.each(b,function(b,d){var\x20f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var\x20a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+\"With\"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return\x20a!=null?p.extend(a,d):d}},e={};return\x20d.pipe=d.then,p.each(b,function(a,f){var\x20g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+\"With\"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var\x20b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return\x20function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new\x20Array(d),i=new\x20Array(d),j=new\x20Array(d);for(;b
        a\",c=n.getElementsByTagName(\"*\"),d=n.getElementsByTagName(\"a\")[0],d.style.cssText=\"top:1px;float:left;opacity:.5\";if(!c||!c.length)return{};f=e.createElement(\"select\"),g=f.appendChild(e.createElement(\"option\")),h=n.getElementsByTagName(\"input\")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName(\"tbody\").length,htmlSerialize:!!n.getElementsByTagName(\"link\").length,style:/top/.test(d.getAttribute(\"style\")),hrefNormalized:d.getAttribute(\"href\")===\"/a\",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value===\"on\",optSelected:g.selected,getSetAttribute:n.className!==\"t\",enctype:!!e.createElement(\"form\").enctype,html5Clone:e.createElement(\"nav\").cloneNode(!0).outerHTML!==\"<:nav>\",boxModel:e.compatMode===\"CSS1Compat\",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete\x20n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent(\"onclick\",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent(\"onclick\"),n.detachEvent(\"onclick\",m)),h=e.createElement(\"input\"),h.value=\"t\",h.setAttribute(\"type\",\"radio\"),b.radioValue=h.value===\"t\",h.setAttribute(\"checked\",\"checked\"),h.setAttribute(\"name\",\"t\"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k\x20in{submit:!0,change:!0,focusin:!0})j=\"on\"+k,l=j\x20in\x20n,l||(n.setAttribute(j,\"return;\"),l=typeof\x20n[j]==\"function\"),b[k+\"Bubbles\"]=l;return\x20p(function(){var\x20c,d,f,g,h=\"padding:0;margin:0;border:0;display:block;overflow:hidden;\",i=e.getElementsByTagName(\"body\")[0];if(!i)return;c=e.createElement(\"div\"),c.style.cssText=\"visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px\",i.insertBefore(c,i.firstChild),d=e.createElement(\"div\"),c.appendChild(d),d.innerHTML=\"
        t
        \",f=d.getElementsByTagName(\"td\"),f[0].style.cssText=\"padding:0;margin:0;border:0;display:none\",l=f[0].offsetHeight===0,f[0].style.display=\"\",f[1].style.display=\"none\",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML=\"\",d.style.cssText=\"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!==\"1%\",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:\"4px\"}).width===\"4px\",g=e.createElement(\"div\"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width=\"0\",d.style.width=\"1px\",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof\x20d.style.zoom!=\"undefined\"&&(d.innerHTML=\"\",d.style.cssText=h+\"width:1px;padding:1px;display:inline;zoom:1\",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display=\"block\",d.style.overflow=\"visible\",d.innerHTML=\"
        \",d.firstChild.style.width=\"5px\",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var\x20H=/(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:\"jQuery\"+(p.fn.jquery+Math.random()).replace(/\\D/g,\"\"),noData:{embed:!0,object:\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",applet:!0},hasData:function(a){return\x20a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var\x20f,g,h=p.expando,i=typeof\x20c==\"string\",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof\x20c==\"object\"||typeof\x20c==\"function\")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return\x20f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var\x20d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b\x20in\x20d?b=[b]:(b=p.camelCase(b),b\x20in\x20d?b=[b]:b=b.split(\"\x20\")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return\x20this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var\x20d;if(a)return\x20b=(b||\"fx\")+\"queue\",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||\"fx\";var\x20c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e===\"inprogress\"&&(e=c.shift(),d--),e&&(b===\"fx\"&&c.unshift(\"inprogress\"),delete\x20f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var\x20c=b+\"queueHooks\";return\x20p._data(a,c)||p._data(a,c,{empty:p.Callbacks(\"once\x20memory\").add(function(){p.removeData(a,b+\"queue\",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var\x20d=2;return\x20typeof\x20a!=\"string\"&&(c=a,a=\"fx\",d--),arguments.length1)},removeAttr:function(a){return\x20this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return\x20p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return\x20a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete\x20this[a]}catch(c){}})},addClass:function(a){var\x20b,c,d,e,f,g,h;if(p.isFunction(a))return\x20this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof\x20a==\"string\"){b=a.split(s);for(c=0,d=this.length;c=0)d=d.replace(\"\x20\"+c[f]+\"\x20\",\"\x20\");e.className=a?p.trim(d):\"\"}}}return\x20this},toggleClass:function(a,b){var\x20c=typeof\x20a,d=typeof\x20b==\"boolean\";return\x20p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c===\"string\"){var\x20e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?\"addClass\":\"removeClass\"](e)}else\x20if(c===\"undefined\"||c===\"boolean\")this.className&&p._data(this,\"__className__\",this.className),this.className=this.className||a===!1?\"\":p._data(this,\"__className__\")||\"\"})},hasClass:function(a){var\x20b=\"\x20\"+a+\"\x20\",c=0,d=this.length;for(;c=0)return!0;return!1},val:function(a){var\x20c,d,e,f=this[0];if(!arguments.length){if(f)return\x20c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&\"get\"in\x20c&&(d=c.get(f,\"value\"))!==b?d:(d=f.value,typeof\x20d==\"string\"?d.replace(P,\"\"):d==null?\"\":d);return}return\x20e=p.isFunction(a),this.each(function(d){var\x20f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f=\"\":typeof\x20f==\"number\"?f+=\"\":p.isArray(f)&&(f=p.map(f,function(a){return\x20a==null?\"\":a+\"\"})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!(\"set\"in\x20c)||c.set(this,f,\"value\")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var\x20b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var\x20b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type===\"select-one\";if(f<0)return\x20null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var\x20f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return\x20p(a)[c](d);if(typeof\x20a.getAttribute==\"undefined\")return\x20p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return\x20g&&\"set\"in\x20g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+\"\"),d)}return\x20g&&\"get\"in\x20g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var\x20c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var\x20V=/^(?:textarea|input|select)$/i,W=/^([^\\.]*|)(?:\\.(.+)|)$/,X=/(?:^|\\s)hover(\\.\\S+|)\\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return\x20p.event.special.hover?a:a.replace(X,\"mouseenter$1\x20mouseleave$1\")};p.event={add:function(a,c,d,e,f){var\x20g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return\x20typeof\x20p!=\"undefined\"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(\"\x20\");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(\".\")>=0&&(t=s.split(\".\"),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof\x20c==\"object\"?c[p.expando]?c:new\x20p.Event(s,c):new\x20p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join(\".\"),c.namespace_re=c.namespace?new\x20RegExp(\"(^|\\\\.)\"+t.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,m=s.indexOf(\":\")<0?\"on\"+s:\"\";if(!f){h=p.cache;for(j\x20in\x20h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function\x20bc(a,b,c,d){c=c||[],b=b||r;var\x20e,f,i,j,k=b.nodeType;if(!a||typeof\x20a!=\"string\")return\x20c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return\x20c;if(f.id===j)return\x20c.push(f),c}else\x20if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return\x20c.push(f),c}else{if(e[2])return\x20w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return\x20w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return\x20bp(a.replace(L,\"$1\"),b,c,d,i)}function\x20bd(a){return\x20function(b){var\x20c=b.nodeName.toLowerCase();return\x20c===\"input\"&&b.type===a}}function\x20be(a){return\x20function(b){var\x20c=b.nodeName.toLowerCase();return(c===\"input\"||c===\"button\")&&b.type===a}}function\x20bf(a){return\x20z(function(b){return\x20b=+b,z(function(c,d){var\x20e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function\x20bg(a,b,c){if(a===b)return\x20c;var\x20d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return\x201}function\x20bh(a,b){var\x20c,d,f,g,h,i,j,k=C[o][a];if(k)return\x20b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new\x20q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L,\"\x20\");for(g\x20in\x20e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new\x20q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return\x20b?h.length:h?bc.error(a):C(a,i).slice(0)}function\x20bi(a,b,d){var\x20e=b.dir,f=d&&b.dir===\"parentNode\",g=u++;return\x20b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return\x20a(b,c,d)}:function(b,d,h){if(!h){var\x20i,j=t+\"\x20\"+g+\"\x20\",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return\x20b.sizset;if(typeof\x20i==\"string\"&&i.indexOf(j)===0){if(b.sizset)return\x20b}else{b[o]=k;if(a(b,d,h))return\x20b.sizset=!0,b;b.sizset=!1}}}else\x20while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return\x20b}}function\x20bj(a){return\x20a.length>1?function(b,c,d){var\x20e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function\x20bk(a,b,c,d,e){var\x20f,g=[],h=0,i=a.length,j=b!=null;for(;h-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i1&&bj(m),i>1&&a.slice(0,i-1).join(\"\").replace(L,\"$1\"),c,i0,f=a.length>0,g=function(h,i,j,k,m){var\x20n,o,p,q=[],s=0,u=\"0\",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG(\"*\",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return\x20y&&(t=B,l=z),x};return\x20g.el=0,d?z(g):g}function\x20bo(a,b,c,d){var\x20e=0,f=b.length;for(;e2&&(j=h[0]).type===\"ID\"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,\"\"),b,f)[0];if(!b)return\x20c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,\"\"),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join(\"\");if(!a)return\x20w.apply(c,x.call(d,0)),c;break}}}return\x20i(a,m)(d,b,f,c,R.test(a)),c}function\x20bq(){}var\x20c,d,e,f,g,h,i,j,k,l,m=!0,n=\"undefined\",o=(\"sizcache\"+Math.random()).replace(\".\",\"\"),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var\x20b=0,c=this.length;for(;be.cacheLength&&delete\x20a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",F=\"(?:\\\\\\\\.|[-\\\\w]|[^\\\\x00-\\\\xa0])+\",G=F.replace(\"w\",\"w#\"),H=\"([*^$|!~]?=)\",I=\"\\\\[\"+E+\"*(\"+F+\")\"+E+\"*(?:\"+H+E+\"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\"+G+\")|)|)\"+E+\"*\\\\]\",J=\":(\"+F+\")(?:\\\\((?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\2|([^()[\\\\]]*|(?:(?:\"+I+\")|[^:]|\\\\\\\\.)*|.*))\\\\)|)\",K=\":(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+E+\"*((?:-\\\\d)?\\\\d*)\"+E+\"*\\\\)|)(?=[^-]|$)\",L=new\x20RegExp(\"^\"+E+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+E+\"+$\",\"g\"),M=new\x20RegExp(\"^\"+E+\"*,\"+E+\"*\"),N=new\x20RegExp(\"^\"+E+\"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\"+E+\"*\"),O=new\x20RegExp(J),P=/^(?:#([\\w\\-]+)|(\\w+)|\\.([\\w\\-]+))$/,Q=/^:not/,R=/[\\x20\\t\\r\\n\\f]*[+~]/,S=/:not\\($/,T=/h\\d/i,U=/input|select|textarea|button/i,V=/\\\\(?!\\\\)/g,W={ID:new\x20RegExp(\"^#(\"+F+\")\"),CLASS:new\x20RegExp(\"^\\\\.(\"+F+\")\"),NAME:new\x20RegExp(\"^\\\\[name=['\\\"]?(\"+F+\")['\\\"]?\\\\]\"),TAG:new\x20RegExp(\"^(\"+F.replace(\"w\",\"w*\")+\")\"),ATTR:new\x20RegExp(\"^\"+I),PSEUDO:new\x20RegExp(\"^\"+J),POS:new\x20RegExp(K,\"i\"),CHILD:new\x20RegExp(\"^:(only|nth|first|last)-child(?:\\\\(\"+E+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+E+\"*(?:([+-]|)\"+E+\"*(\\\\d+)|))\"+E+\"*\\\\)|)\",\"i\"),needsContext:new\x20RegExp(\"^\"+E+\"*[>+~]|\"+K,\"i\")},X=function(a){var\x20b=r.createElement(\"div\");try{return\x20a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return\x20a.appendChild(r.createComment(\"\")),!a.getElementsByTagName(\"*\").length}),Z=X(function(a){return\x20a.innerHTML=\"\",a.firstChild&&typeof\x20a.firstChild.getAttribute!==n&&a.firstChild.getAttribute(\"href\")===\"#\"}),$=X(function(a){a.innerHTML=\"\";var\x20b=typeof\x20a.lastChild.getAttribute(\"multiple\");return\x20b!==\"boolean\"&&b!==\"string\"}),_=X(function(a){return\x20a.innerHTML=\"\",!a.getElementsByClassName||!a.getElementsByClassName(\"e\").length?!1:(a.lastChild.className=\"e\",a.getElementsByClassName(\"e\").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML=\"\",s.insertBefore(a,s.firstChild);var\x20b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return\x20d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var\x20b,c=[];for(;b=this[a];a++)c.push(b);return\x20c}}bc.matches=function(a,b){return\x20bc(a,null,null,b)},bc.matchesSelector=function(a,b){return\x20bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var\x20b,c=\"\",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof\x20a.textContent==\"string\")return\x20a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else\x20if(e===3||e===4)return\x20a.nodeValue}else\x20for(;b=a[d];d++)c+=f(b);return\x20c},g=bc.isXML=function(a){var\x20b=a&&(a.ownerDocument||a).documentElement;return\x20b?b.nodeName!==\"HTML\":!1},h=bc.contains=s.contains?function(a,b){var\x20c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return\x20a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return\x20b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var\x20c,d=g(a);return\x20d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof\x20a[b]==\"boolean\"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return\x20a.getAttribute(\"href\",2)},type:function(a){return\x20a.getAttribute(\"type\")}},find:{ID:d?function(a,b,c){if(typeof\x20b.getElementById!==n&&!c){var\x20d=b.getElementById(a);return\x20d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof\x20c.getElementById!==n&&!d){var\x20e=c.getElementById(a);return\x20e?e.id===a||typeof\x20e.getAttributeNode!==n&&e.getAttributeNode(\"id\").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof\x20b.getElementsByTagName!==n)return\x20b.getElementsByTagName(a)}:function(a,b){var\x20c=b.getElementsByTagName(a);if(a===\"*\"){var\x20d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return\x20e}return\x20c},NAME:ba&&function(a,b){if(typeof\x20b.getElementsByName!==n)return\x20b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof\x20b.getElementsByClassName!==n&&!c)return\x20b.getElementsByClassName(a)}},relative:{\">\":{dir:\"parentNode\",first:!0},\"\x20\":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(a){return\x20a[1]=a[1].replace(V,\"\"),a[3]=(a[4]||a[5]||\"\").replace(V,\"\"),a[2]===\"~=\"&&(a[3]=\"\x20\"+a[3]+\"\x20\"),a.slice(0,4)},CHILD:function(a){return\x20a[1]=a[1].toLowerCase(),a[1]===\"nth\"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]===\"even\"||a[2]===\"odd\")),a[4]=+(a[6]+a[7]||a[2]===\"odd\")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var\x20b,c;if(W.CHILD.test(a[0]))return\x20null;if(a[3])a[2]=a[3];else\x20if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(\")\",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return\x20a.slice(0,3)}},filter:{ID:d?function(a){return\x20a=a.replace(V,\"\"),function(b){return\x20b.getAttribute(\"id\")===a}}:function(a){return\x20a=a.replace(V,\"\"),function(b){var\x20c=typeof\x20b.getAttributeNode!==n&&b.getAttributeNode(\"id\");return\x20c&&c.value===a}},TAG:function(a){return\x20a===\"*\"?function(){return!0}:(a=a.replace(V,\"\").toLowerCase(),function(b){return\x20b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var\x20b=B[o][a];return\x20b||(b=B(a,new\x20RegExp(\"(^|\"+E+\")\"+a+\"(\"+E+\"|$)\"))),function(a){return\x20b.test(a.className||typeof\x20a.getAttribute!==n&&a.getAttribute(\"class\")||\"\")}},ATTR:function(a,b,c){return\x20function(d,e){var\x20f=bc.attr(d,a);return\x20f==null?b===\"!=\":b?(f+=\"\",b===\"=\"?f===c:b===\"!=\"?f!==c:b===\"^=\"?c&&f.indexOf(c)===0:b===\"*=\"?c&&f.indexOf(c)>-1:b===\"$=\"?c&&f.substr(f.length-c.length)===c:b===\"~=\"?(\"\x20\"+f+\"\x20\").indexOf(c)>-1:b===\"|=\"?f===c||f.substr(0,c.length+1)===c+\"-\":!1):!0}},CHILD:function(a,b,c,d){return\x20a===\"nth\"?function(a){var\x20b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return\x20e-=d,e===c||e%c===0&&e/c>=0}:function(b){var\x20c=b;switch(a){case\"only\":case\"first\":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a===\"first\")return!0;c=b;case\"last\":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var\x20c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error(\"unsupported\x20pseudo:\x20\"+a);return\x20d[o]?d(b):d.length>1?(c=[a,a,\"\",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var\x20e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return\x20d(a,0,c)}):d}},pseudos:{not:z(function(a){var\x20b=[],c=[],d=i(a.replace(L,\"$1\"));return\x20d[o]?z(function(a,b,c,e){var\x20f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return\x20b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return\x20function(b){return\x20bc(a,b).length>0}}),contains:z(function(a){return\x20function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return\x20a.disabled===!1},disabled:function(a){return\x20a.disabled===!0},checked:function(a){var\x20b=a.nodeName.toLowerCase();return\x20b===\"input\"&&!!a.checked||b===\"option\"&&!!a.selected},selected:function(a){return\x20a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var\x20b;a=a.firstChild;while(a){if(a.nodeName>\"@\"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return\x20T.test(a.nodeName)},text:function(a){var\x20b,c;return\x20a.nodeName.toLowerCase()===\"input\"&&(b=a.type)===\"text\"&&((c=a.getAttribute(\"type\"))==null||c.toLowerCase()===b)},radio:bd(\"radio\"),checkbox:bd(\"checkbox\"),file:bd(\"file\"),password:bd(\"password\"),image:bd(\"image\"),submit:be(\"submit\"),reset:be(\"reset\"),button:function(a){var\x20b=a.nodeName.toLowerCase();return\x20b===\"input\"&&a.type===\"button\"||b===\"button\"},input:function(a){return\x20U.test(a.nodeName)},focus:function(a){var\x20b=a.ownerDocument;return\x20a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return\x20a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var\x20d=0;d=0;)a.push(d);return\x20a}),gt:bf(function(a,b,c){for(var\x20d=c<0?c+b:c;++d\",a.querySelectorAll(\"[selected]\").length||e.push(\"\\\\[\"+E+\"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\"),a.querySelectorAll(\":checked\").length||e.push(\":checked\")}),X(function(a){a.innerHTML=\"

        \",a.querySelectorAll(\"[test^='']\").length&&e.push(\"[*^$]=\"+E+\"*(?:\\\"\\\"|'')\"),a.innerHTML=\"\",a.querySelectorAll(\":enabled\").length||e.push(\":enabled\",\":disabled\")}),e=new\x20RegExp(e.join(\"|\")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var\x20i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!==\"object\"){i=bh(a),(k=d.getAttribute(\"id\"))?l=k.replace(c,\"\\\\$&\"):d.setAttribute(\"id\",l),l=\"[id='\"+l+\"']\x20\",j=i.length;while(j--)i[j]=l+i[j].join(\"\");m=R.test(a)&&d.parentNode||d,n=i.join(\",\")}if(n)try{return\x20w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute(\"id\")}}return\x20b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,\"div\");try{h.call(b,\"[test!='']:sizzle\"),f.push(\"!=\",J)}catch(c){}}),f=new\x20RegExp(f.join(\"|\")),bc.matchesSelector=function(b,c){c=c.replace(d,\"='$1']\");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var\x20i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return\x20i}catch(j){}return\x20bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new\x20bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[\":\"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var\x20bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\\[\\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var\x20b,c,d,e,f,g,h=this;if(typeof\x20a!=\"string\")return\x20p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var\x20c,d=0,e=this.length,f=[],g=bf.test(a)||typeof\x20a!=\"string\"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return\x20f=f.length>1?p.unique(f):f,this.pushStack(f,\"closest\",a)},index:function(a){return\x20a?typeof\x20a==\"string\"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var\x20c=typeof\x20a==\"string\"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return\x20this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return\x20this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var\x20b=a.parentNode;return\x20b&&b.nodeType!==11?b:null},parents:function(a){return\x20p.dir(a,\"parentNode\")},parentsUntil:function(a,b,c){return\x20p.dir(a,\"parentNode\",c)},next:function(a){return\x20bi(a,\"nextSibling\")},prev:function(a){return\x20bi(a,\"previousSibling\")},nextAll:function(a){return\x20p.dir(a,\"nextSibling\")},prevAll:function(a){return\x20p.dir(a,\"previousSibling\")},nextUntil:function(a,b,c){return\x20p.dir(a,\"nextSibling\",c)},prevUntil:function(a,b,c){return\x20p.dir(a,\"previousSibling\",c)},siblings:function(a){return\x20p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return\x20p.sibling(a.firstChild)},contents:function(a){return\x20p.nodeName(a,\"iframe\")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var\x20e=p.map(this,b,c);return\x20bc.test(a)||(d=c),d&&typeof\x20d==\"string\"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(\",\"))}}),p.extend({filter:function(a,b,c){return\x20c&&(a=\":not(\"+a+\")\"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var\x20e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return\x20e},sibling:function(a,b){var\x20c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return\x20c}});var\x20bl=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",bm=/\x20jQuery\\d+=\"(?:null|\\d+)\"/g,bn=/^\\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,bp=/<([\\w:]+)/,bq=/
  • \",\"
    \"],tr:[2,\"\",\"
    \"],td:[3,\"\",\"
    \"],col:[2,\"\",\"
    \"],area:[1,\"\",\"\"],_default:[0,\"\",\"\"]},bA=bk(e),bB=bA.appendChild(e.createElement(\"div\"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,\"X

    \",\"
    \"]),p.fn.extend({text:function(a){return\x20p.access(this,function(a){return\x20a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return\x20this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var\x20b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var\x20a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return\x20a}).append(this)}return\x20this},wrapInner:function(a){return\x20p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var\x20b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var\x20b=p.isFunction(a);return\x20this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return\x20this.parent().each(function(){p.nodeName(this,\"body\")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return\x20this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return\x20this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return\x20this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var\x20a=p.clean(arguments);return\x20this.pushStack(p.merge(a,this),\"before\",this.selector)}},after:function(){if(!bh(this[0]))return\x20this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var\x20a=p.clean(arguments);return\x20this.pushStack(p.merge(this,a),\"after\",this.selector)}},remove:function(a,b){var\x20c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName(\"*\")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return\x20this},empty:function(){var\x20a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName(\"*\"));while(a.firstChild)a.removeChild(a.firstChild)}return\x20this},clone:function(a,b){return\x20a=a==null?!1:a,b=b==null?a:b,this.map(function(){return\x20p.clone(this,a,b)})},html:function(a){return\x20p.access(this,function(a){var\x20c=this[0]||{},d=0,e=this.length;if(a===b)return\x20c.nodeType===1?c.innerHTML.replace(bm,\"\"):b;if(typeof\x20a==\"string\"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||[\"\",\"\"])[1].toLowerCase()]){a=a.replace(bo,\"<$1>\");try{for(;d1&&typeof\x20j==\"string\"&&bw.test(j))return\x20this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return\x20this.each(function(e){var\x20f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,\"tr\");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return\x20this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var\x20d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test(\"<\"+a.nodeName+\">\")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return\x20d=e=null,g},clean:function(a,b,c,d){var\x20f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof\x20b.createDocumentFragment==\"undefined\")b=e;for(f=0;(h=a[f])!=null;f++){typeof\x20h==\"number\"&&(h+=\"\");if(!h)continue;if(typeof\x20h==\"string\")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement(\"div\"),s.appendChild(l),h=h.replace(bo,\"<$1>\"),i=(bp.exec(h)||[\"\",\"\"])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i===\"table\"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===\"\"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],\"tbody\")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,\"input\")?bG(h):typeof\x20h.getElementsByTagName!=\"undefined\"&&p.grep(h.getElementsByTagName(\"input\"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return\x20d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,\"script\")||!q(h))c.appendChild(h),typeof\x20h.getElementsByTagName!=\"undefined\"&&(r=p.grep(p.merge([],h.getElementsByTagName(\"script\")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return\x20t},cleanData:function(a,b){var\x20c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f\x20in\x20c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete\x20i[d],j?delete\x20e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var\x20a,b;p.uaMatch=function(a){a=a.toLowerCase();var\x20b=/(chrome)[\x20\\/]([\\w.]+)/.exec(a)||/(webkit)[\x20\\/]([\\w.]+)/.exec(a)||/(opera)(?:.*version|)[\x20\\/]([\\w.]+)/.exec(a)||/(msie)\x20([\\w.]+)/.exec(a)||a.indexOf(\"compatible\")<0&&/(mozilla)(?:.*?\x20rv:([\\w.]+)|)/.exec(a)||[];return{browser:b[1]||\"\",version:b[2]||\"0\"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function\x20a(b,c){return\x20new\x20a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function\x20c(c,d){return\x20d&&d\x20instanceof\x20p&&!(d\x20instanceof\x20a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var\x20b=a(e);return\x20a}}();var\x20bH,bI,bJ,bK=/alpha\\([^)]*\\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new\x20RegExp(\"^(\"+q+\")(.*)$\",\"i\"),bQ=new\x20RegExp(\"^(\"+q+\")(?!px)[a-z%]+$\",\"i\"),bR=new\x20RegExp(\"^([-+])=(\"+q+\")\",\"i\"),bS={},bT={position:\"absolute\",visibility:\"hidden\",display:\"block\"},bU={letterSpacing:0,fontWeight:400},bV=[\"Top\",\"Right\",\"Bottom\",\"Left\"],bW=[\"Webkit\",\"O\",\"Moz\",\"ms\"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return\x20p.access(this,function(a,c,d){return\x20d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return\x20b$(this,!0)},hide:function(){return\x20b$(this)},toggle:function(a,b){var\x20c=typeof\x20a==\"boolean\";return\x20p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var\x20c=bH(a,\"opacity\");return\x20c===\"\"?\"1\":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":p.support.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var\x20f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return\x20h&&\"get\"in\x20h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof\x20d,g===\"string\"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g=\"number\");if(d==null||g===\"number\"&&isNaN(d))return;g===\"number\"&&!p.cssNumber[i]&&(d+=\"px\");if(!h||!(\"set\"in\x20h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var\x20f,g,h,i=p.camelCase(c);return\x20c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&\"get\"in\x20h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f===\"normal\"&&c\x20in\x20bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var\x20d,e,f={};for(e\x20in\x20b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e\x20in\x20b)a.style[e]=f[e];return\x20d}}),a.getComputedStyle?bH=function(b,c){var\x20d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return\x20h&&(d=h[c],d===\"\"&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var\x20c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return\x20e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b===\"fontSize\"?\"1em\":e,e=f.pixelLeft+\"px\",f.left=c,d&&(a.runtimeStyle.left=d)),e===\"\"?\"auto\":e}),p.each([\"height\",\"width\"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return\x20a.offsetWidth===0&&bN.test(bH(a,\"display\"))?p.swap(a,bT,function(){return\x20cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return\x20b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,\"boxSizing\")===\"border-box\"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return\x20bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":b?\"1\":\"\"},set:function(a,b){var\x20c=a.style,d=a.currentStyle,e=p.isNumeric(b)?\"alpha(opacity=\"+b*100+\")\":\"\",f=d&&d.filter||c.filter||\"\";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,\"\"))===\"\"&&c.removeAttribute){c.removeAttribute(\"filter\");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+\"\x20\"+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return\x20p.swap(a,{display:\"inline-block\"},function(){if(b)return\x20bH(a,\"marginRight\")})}}),!p.support.pixelPosition&&p.fn.position&&p.each([\"top\",\"left\"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var\x20d=bH(a,b);return\x20bQ.test(d)?p(a).position()[b]+\"px\":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return\x20a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,\"display\"))===\"none\"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:\"\",padding:\"\",border:\"Width\"},function(a,b){p.cssHooks[a+b]={expand:function(c){var\x20d,e=typeof\x20c==\"string\"?c.split(\"\x20\"):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return\x20f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var\x20cd=/%20/g,ce=/\\[\\]$/,cf=/\\r?\\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return\x20p.param(this.serializeArray())},serializeArray:function(){return\x20this.map(function(){return\x20this.elements?p.makeArray(this.elements):this}).filter(function(){return\x20this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var\x20c=p(this).val();return\x20c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,\"\\r\\n\")}}):{name:b.name,value:c.replace(cf,\"\\r\\n\")}}).get()}}),p.param=function(a,c){var\x20d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?\"\":b,e[e.length]=encodeURIComponent(a)+\"=\"+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else\x20for(d\x20in\x20a)ci(d,a[d],c,f);return\x20e.join(\"&\").replace(cd,\"+\")};var\x20cj,ck,cl=/#.*$/,cm=/^(.*?):[\x20\\t]*([^\\r\\n]*)\\r?$/mg,cn=/^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\\/\\//,cq=/\\?/,cr=/)<[^<]*)*<\\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=[\"*/\"]+[\"*\"];try{ck=f.href}catch(cy){ck=e.createElement(\"a\"),ck.href=\"\",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof\x20a!=\"string\"&&cu)return\x20cu.apply(this,arguments);if(!this.length)return\x20this;var\x20e,f,g,h=this,i=a.indexOf(\"\x20\");return\x20i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof\x20c==\"object\"&&(f=\"POST\"),p.ajax({url:a,type:f,dataType:\"html\",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p(\"
    \").append(a.replace(cr,\"\")).find(e):a)}),this},p.each(\"ajaxStart\x20ajaxStop\x20ajaxComplete\x20ajaxError\x20ajaxSuccess\x20ajaxSend\".split(\"\x20\"),function(a,b){p.fn[b]=function(a){return\x20this.on(b,a)}}),p.each([\"get\",\"post\"],function(a,c){p[c]=function(a,d,e,f){return\x20p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return\x20p.get(a,b,c,\"script\")},getJSON:function(a,b,c){return\x20p.get(a,b,c,\"json\")},ajaxSetup:function(a,b){return\x20b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:\"GET\",contentType:\"application/x-www-form-urlencoded;\x20charset=UTF-8\",processData:!0,async:!0,accepts:{xml:\"application/xml,\x20text/xml\",html:\"text/html\",text:\"text/plain\",json:\"application/json,\x20text/javascript\",\"*\":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\"},converters:{\"*\x20text\":a.String,\"text\x20html\":!0,\"text\x20json\":p.parseJSON,\"text\x20xml\":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function\x20y(a,c,f,i){var\x20k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||\"\",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader(\"Last-Modified\"),w&&(p.lastModified[d]=w),w=x.getResponseHeader(\"Etag\"),w&&(p.etag[d]=w)),a===304?(y=\"notmodified\",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y=\"error\",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+\"\",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger(\"ajax\"+(k?\"Success\":\"Error\"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger(\"ajaxComplete\",[x,l]),--p.active||p.event.trigger(\"ajaxStop\"))}typeof\x20a==\"object\"&&(c=a,a=b),c=c||{};var\x20d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m\x20instanceof\x20p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks(\"once\x20memory\"),r=l.statusCode||{},t={},u={},v=0,w=\"canceled\",x={readyState:0,setRequestHeader:function(a,b){if(!v){var\x20c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return\x20this},getAllResponseHeaders:function(){return\x20v===2?e:null},getResponseHeader:function(a){var\x20c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return\x20c===b?null:c},overrideMimeType:function(a){return\x20v||(l.mimeType=a),this},abort:function(a){return\x20a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var\x20b;if(v<2)for(b\x20in\x20a)r[b]=[r[b],a[b]];else\x20b=a[x.status],x.always(b)}return\x20this},l.url=((a||l.url)+\"\").replace(cl,\"\").replace(cp,cj[1]+\"//\"),l.dataTypes=p.trim(l.dataType||\"*\").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(\":\")+(i[3]?\"\":i[1]===\"http:\"?80:443)!==cj.join(\":\")+(cj[3]?\"\":cj[1]===\"http:\"?80:443)),l.data&&l.processData&&typeof\x20l.data!=\"string\"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return\x20x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger(\"ajaxStart\");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?\"&\":\"?\")+l.data,delete\x20l.data),d=l.url;if(l.cache===!1){var\x20z=p.now(),A=l.url.replace(cs,\"$1_=\"+z);l.url=A+(A===l.url?(cq.test(l.url)?\"&\":\"?\")+\"_=\"+z:\"\")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader(\"Content-Type\",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader(\"If-Modified-Since\",p.lastModified[d]),p.etag[d]&&x.setRequestHeader(\"If-None-Match\",p.etag[d])),x.setRequestHeader(\"Accept\",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!==\"*\"?\",\x20\"+cx+\";\x20q=0.01\":\"\"):l.accepts[\"*\"]);for(k\x20in\x20l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w=\"abort\";for(k\x20in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,\"No\x20Transport\");else{x.readyState=1,j&&n.trigger(\"ajaxSend\",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort(\"timeout\")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else\x20throw\x20B}}return\x20x}return\x20x.abort()},active:0,lastModified:{},etag:{}});var\x20cE=[],cF=/\\?/,cG=/(=)\\?(?=&|$)|\\?\\?/,cH=p.now();p.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var\x20a=cE.pop()||p.expando+\"_\"+cH++;return\x20this[a]=!0,a}}),p.ajaxPrefilter(\"json\x20jsonp\",function(c,d,e){var\x20f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof\x20i==\"string\"&&!(c.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&cG.test(i);if(c.dataTypes[0]===\"jsonp\"||l||m)return\x20f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,\"$1\"+f):m?c.data=i.replace(cG,\"$1\"+f):k&&(c.url+=(cF.test(j)?\"&\":\"?\")+c.jsonp+\"=\"+f),c.converters[\"script\x20json\"]=function(){return\x20h||p.error(f+\"\x20was\x20not\x20called\"),h[0]},c.dataTypes[0]=\"json\",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),\"script\"}),p.ajaxSetup({accepts:{script:\"text/javascript,\x20application/javascript,\x20application/ecmascript,\x20application/x-ecmascript\"},contents:{script:/javascript|ecmascript/},converters:{\"text\x20script\":function(a){return\x20p.globalEval(a),a}}}),p.ajaxPrefilter(\"script\",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type=\"GET\",a.global=!1)}),p.ajaxTransport(\"script\",function(a){if(a.crossDomain){var\x20c,d=e.head||e.getElementsByTagName(\"head\")[0]||e.documentElement;return{send:function(f,g){c=e.createElement(\"script\"),c.async=\"async\",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,\"success\")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var\x20cI,cJ=a.ActiveXObject?function(){for(var\x20a\x20in\x20cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&\"withCredentials\"in\x20a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var\x20d;return{send:function(e,f){var\x20g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h\x20in\x20c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e[\"X-Requested-With\"]&&(e[\"X-Requested-With\"]=\"XMLHttpRequest\");try{for(h\x20in\x20e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var\x20h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete\x20cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=\"\"}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var\x20cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new\x20RegExp(\"^(?:([-+])=|)(\"+q+\")([a-z%]*)$\",\"i\"),cR=/queueHooks$/,cS=[cY],cT={\"*\":[function(a,b){var\x20c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?\"\":\"px\");if(d!==\"px\"&&h){h=p.css(e.elem,a,!0)||c||1;do\x20i=i||\".5\",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return\x20e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=[\"*\"]):a=a.split(\"\x20\");var\x20c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),\"using\"in\x20b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var\x20a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return\x20c.top-=parseFloat(p.css(a,\"marginTop\"))||0,c.left-=parseFloat(p.css(a,\"marginLeft\"))||0,d.top+=parseFloat(p.css(b[0],\"borderTopWidth\"))||0,d.left+=parseFloat(p.css(b[0],\"borderLeftWidth\"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return\x20this.map(function(){var\x20a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,\"position\")===\"static\")a=a.offsetParent;return\x20a||e.body})}}),p.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(a,c){var\x20d=/Y/.test(c);p.fn[a]=function(e){return\x20p.access(this,function(a,e,f){var\x20g=da(a);if(f===b)return\x20g?c\x20in\x20g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:\"height\",Width:\"width\"},function(a,c){p.each({padding:\"inner\"+a,content:c,\"\":\"outer\"+a},function(d,e){p.fn[e]=function(e,f){var\x20g=arguments.length&&(d||typeof\x20e!=\"boolean\"),h=d||(e===!0||f===!0?\"margin\":\"border\");return\x20p.access(this,function(c,d,e){var\x20f;return\x20p.isWindow(c)?c.document.documentElement[\"client\"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body[\"scroll\"+a],f[\"scroll\"+a],c.body[\"offset\"+a],f[\"offset\"+a],f[\"client\"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof\x20define==\"function\"&&define.amd&&define.amd.jQuery&&define(\"jquery\",[],function(){return\x20p})})(window);", - "analysis/ipcg-func.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x02\xaa\x00\x00\x01\xb1\b\x03\x00\x00\x00\x9d\xa2d\x9d\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\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aa\b\x10PU\x04\b\x0eU\x15\x93W\x90h\x1c\xaaj\x04L^A$\xceV\x15\x93W\x10\x1dg\xabJ1y\x05\t\xe3dU1y\x05Qp\xb2\xaa\x02L^A$\x8eW\x15\x93W\x10\x89SU\xc5\xe4\x15$\n\xa7\xaa\x8a\xc9+H\x14\x0eV\x15\x93W\x10\x15\a\xab\x8a\xc9+\x88\x8a\x93UM(y\x05q\vNV5\x91\xe4\x15\f\tr\r\x0eV5\x91\xe4\x15\xdbB\x82\xd2\xd0/\xd2;\x1c\xacj\x02\xc9+\xf6\x85\x04\xa5\xa5_\xa478X\xd5\x04\x92Wl\f\tJK\xbfH/p\xb0\xaa\xd6\xc9+v\x86\x04\xa5\xa5_\xa4\x178YU\xcb\xe4\x15;C\x82R\xeb\x17I\x1f\x8eV\xd5*y\xc5ΐ\xa0\xd4\xfaE҇\x93U\xb5L^\xb15$(\xd5~\x914\xe1`U\xad\x93Wl\r\t\xa2)\xf6\x8b\xa4\t\xa7\xaaJ\x13I^\xb13$(\xe5~\x914\xe1`U\xad\xb13$(\xe5~\x914\xe1dU\xad\x93Wl\f\tJ\xb9_$M8YUk\xec\v\tJ\xb1_$}\xc0Vվ\x90\xa0\x14\xfbE\xd2\apU1$\xc8=\x00W\x15C\x82\xdc\x03tU\x11׀\xaa\"@@U\x11 \xa0\xaa\b\x10PU\x04\b\xa8*\x02\x04T\x15\x01\x02\xaa\x8a\x00\x01UE\x80\x80\xaa\"@@U\x11 \xa0\xaa\b\x10`\xaaڍ!A\xee\x03\xa6\xaa\xf7)}i&\x86\x04\xb9\v\x98\xaa2:\xa3\xc2\x02\x91\x81\x0eLU\xd9;\xff\xde\u05ef\xe1\x04\xc0U\xc0T\x15'\x00.\x04\xa6\xaa\x14'\x00\xee\x03\xa6\xaa8\x01p!0U\xc5\t\x80\v\x81\xa9*\xc5\t\x80\xfb\x80\xa9\xaa\x9c\x00tw\xd2\xee\xfb\xfc\v\x87W7\x00S\xd5\xd0\x04\x00q\x130Uet\xde\xe8y(Ő\xa0\x81\x06LU\xf95\x00o\xdd\xdf\xfbR\xe7\xde\xd5\xec\xeb\xee\xc1\xb51\x15\xb6\x85\x04U\x11B\xb2NŶ\xab\xfc\xad:\xdf7\x03o\x83\xd1K`\xaa\xca\xefi\xfd\x93\xef^\x9fy[|\xdd\xd8\xf6\x93\xe8\x02\xfbB\x82\xce\x06\x02\xeb·y\x8d\x87\xbf`\xc3\x1c\xdf\xf5\x9ek\x10+`\xaaʸ\xfb\x1d\xbd\xf6\xd7\xd0\u05cdsQO\xda\x18\x12D\xf9}\x83{V\xf5*i\xa0\xc1\xe8\xfb\xb5\"\xc9\x02SUq\x06\xe0J\xfc\xe7m\f\t\xa2֪\x9e\xea\xddF\x11\tLU\xc5\x19\x80\xaf\xba\xef\xc69YegH\x10UT\r\xae\x1f\x975v\x9d\x98\x94^\xae\x1c2t\xe1\xc2!ٍ\x0f\x86ț\xad/\x88]\x0fI\n\x98\xaaҞ?\x02\xb03$\x88*\xaa\xceіn_\xaaU\xb1\xa5\a\x0f\x17\xac\xab\xf5\xfa6\x97\xd5\xd3Á\xad\xa4.\x10\xb8\x10\xbb\x1e\x92\x140U\xb5\xb8\x06\xc0\u0590\xa0\x88\xaaͤ9\xfc\xbd\x91\x1c\xa1t\x1d9.\xdaq\x02\x90\x16`\xaajq\r\x80\xcd!AaU畈\x1f\x0f\xb3auq.[8\x19R\x14UM\v0U\xa5=O\x00\xec\f\t\xa2\x11U'\xc9\x1b\xad\x97O\xa4\xb4>\xe32\x1f_\xe5\x11\x1d\xaa\x9a\x16`\xaaj1\x01\xb03$\x88FT\x9d;\x82{\x1e\x1c>\x87ү=e_\x1f\x19=I\x9e\xf6GU\xd3\x02LU\xad.\x02\xb41$\x88FT\xdd.&\xb7[\xf9\x1c\xe3\x10\xc9'\xc4\xff\x8d|\x1eUM\v0U\xa5\x16\x17\x01\xda\x18\x12t\x9e\u007fZU\x1f\b\xf0\tm\xa5g\xf1\xbb\x8b=\x95l\xe9\x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e\xadP\xe7\x9f\xf7v\x94\x89\xbba+\xad\x97ו\x8d\xc8!r\x9bz+\xe6Z$\rLUi\xcf\x13\x00\x9bc+\xc2\xfa\xed\xe7\xf3`\x1a\x94\xddGZ\v\x8a\x165\x05\xfcQ\xaab\xaeE\xd2\xc0T\xd5b\x02`sl\x05\xd7o\xf3ה\x16\x88\xc4\n\xbad\x94\xa1\xb5x\"\xff\x1b\x99\xa5\xa8\xca[1\xd7\"i`\xaaju\x11\xa0\xad\xb1\x15~?\xa5\x97xC~\xe1U\xbe\xa6L\\\xd1[\x8b\xf8\xc3\xe0X\xa9\xaaފ\xb9\x16I\x03SUjq\x11\xa0}\xb1\x15\xbc]\xabo\xf2g\xb3?\x88|RP\xdb\xdc\xe4\xf7\x9d4\xb4֑\xd9\xebV\x8cg\x13\x87}j+\xe6Z$\rLU-\xff\x15\x80m\xb1\x15\x8c{5\x83}\xd3\xf6\xb3\x85\t\x9b\x97\x14g\xe7U\x9c4\xb6\x06\xebGkyOn\x1e\xa5\xf9\xd5V̵H\x1a\x98\xaaZM\x000\xb6b\x00\x02SUj\xf9\xaf\x000\xb6b\xc0\x01SU\xcb\t\x002\xf0\x80\xa9\xaa\xe5\x04\x00\x19x\xc0T\x95ZN\x00\x90\x01\aLUq\x02\xe0B`\xaa\x8a\x13\x00\x17\x02SU\x8a\x13\x00\xf7\x01SU\x9c\x00\xb8\x10\x98\xaa\xe2\x04\xc0\x85\xc0T\x95\xe2\x04\xc0}\xa0\xaa\b\x10`\xaa\x8asU\x17\x02SU\x9c\xab\xba\x10\x98\xaaR\x9c\x00\xb8\x0f\x98\xaa\xe2\x04\xc0\x85\xc0T\x15'\x00.\x04\xa6\xaa\x14'\x00\xee\x03\xa6\xaa8\x01p!0U\xc5\t\x80\v\x81\xa9*\xc5\t\x80\xfb\x80\xa9*\xc6V\xb8\x10\x98\xaabl\x85\v\x81\xa9*\xed\xdb\xd8\n\x10\xb8.[\x03\xac\xaa\a\xdf\xeb>\xf8\xdbN\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\x15\x01\xc2\xff\amu\xa3\x1c\xa2\xebff\x00\x00\x00\x00IEND\xaeB`\x82", + "jquery.treeview.css": "/*\x20https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.css\x20*/\x0a/*\x20License:\x20MIT.\x20*/\x0a.treeview,\x20.treeview\x20ul\x20{\x0a\x09padding:\x200;\x0a\x09margin:\x200;\x0a\x09list-style:\x20none;\x0a}\x0a\x0a.treeview\x20ul\x20{\x0a\x09background-color:\x20white;\x0a\x09margin-top:\x204px;\x0a}\x0a\x0a.treeview\x20.hitarea\x20{\x0a\x09background:\x20url(images/treeview-default.gif)\x20-64px\x20-25px\x20no-repeat;\x0a\x09height:\x2016px;\x0a\x09width:\x2016px;\x0a\x09margin-left:\x20-16px;\x0a\x09float:\x20left;\x0a\x09cursor:\x20pointer;\x0a}\x0a/*\x20fix\x20for\x20IE6\x20*/\x0a*\x20html\x20.hitarea\x20{\x0a\x09display:\x20inline;\x0a\x09float:none;\x0a}\x0a\x0a.treeview\x20li\x20{\x0a\x09margin:\x200;\x0a\x09padding:\x203px\x200pt\x203px\x2016px;\x0a}\x0a\x0a.treeview\x20a.selected\x20{\x0a\x09background-color:\x20#eee;\x0a}\x0a\x0a#treecontrol\x20{\x20margin:\x201em\x200;\x20display:\x20none;\x20}\x0a\x0a.treeview\x20.hover\x20{\x20color:\x20red;\x20cursor:\x20pointer;\x20}\x0a\x0a.treeview\x20li\x20{\x20background:\x20url(images/treeview-default-line.gif)\x200\x200\x20no-repeat;\x20}\x0a.treeview\x20li.collapsable,\x20.treeview\x20li.expandable\x20{\x20background-position:\x200\x20-176px;\x20}\x0a\x0a.treeview\x20.expandable-hitarea\x20{\x20background-position:\x20-80px\x20-3px;\x20}\x0a\x0a.treeview\x20li.last\x20{\x20background-position:\x200\x20-1766px\x20}\x0a.treeview\x20li.lastCollapsable,\x20.treeview\x20li.lastExpandable\x20{\x20background-image:\x20url(images/treeview-default.gif);\x20}\x0a.treeview\x20li.lastCollapsable\x20{\x20background-position:\x200\x20-111px\x20}\x0a.treeview\x20li.lastExpandable\x20{\x20background-position:\x20-32px\x20-67px\x20}\x0a\x0a.treeview\x20div.lastCollapsable-hitarea,\x20.treeview\x20div.lastExpandable-hitarea\x20{\x20background-position:\x200;\x20}\x0a\x0a.treeview-red\x20li\x20{\x20background-image:\x20url(images/treeview-red-line.gif);\x20}\x0a.treeview-red\x20.hitarea,\x20.treeview-red\x20li.lastCollapsable,\x20.treeview-red\x20li.lastExpandable\x20{\x20background-image:\x20url(images/treeview-red.gif);\x20}\x0a\x0a.treeview-black\x20li\x20{\x20background-image:\x20url(images/treeview-black-line.gif);\x20}\x0a.treeview-black\x20.hitarea,\x20.treeview-black\x20li.lastCollapsable,\x20.treeview-black\x20li.lastExpandable\x20{\x20background-image:\x20url(images/treeview-black.gif);\x20}\x0a\x0a.treeview-gray\x20li\x20{\x20background-image:\x20url(images/treeview-gray-line.gif);\x20}\x0a.treeview-gray\x20.hitarea,\x20.treeview-gray\x20li.lastCollapsable,\x20.treeview-gray\x20li.lastExpandable\x20{\x20background-image:\x20url(images/treeview-gray.gif);\x20}\x0a\x0a.treeview-famfamfam\x20li\x20{\x20background-image:\x20url(images/treeview-famfamfam-line.gif);\x20}\x0a.treeview-famfamfam\x20.hitarea,\x20.treeview-famfamfam\x20li.lastCollapsable,\x20.treeview-famfamfam\x20li.lastExpandable\x20{\x20background-image:\x20url(images/treeview-famfamfam.gif);\x20}\x0a\x0a.treeview\x20.placeholder\x20{\x0a\x09background:\x20url(images/ajax-loader.gif)\x200\x200\x20no-repeat;\x0a\x09height:\x2016px;\x0a\x09width:\x2016px;\x0a\x09display:\x20block;\x0a}\x0a\x0a.filetree\x20li\x20{\x20padding:\x203px\x200\x202px\x2016px;\x20}\x0a.filetree\x20span.folder,\x20.filetree\x20span.file\x20{\x20padding:\x201px\x200\x201px\x2016px;\x20display:\x20block;\x20}\x0a.filetree\x20span.folder\x20{\x20background:\x20url(images/folder.gif)\x200\x200\x20no-repeat;\x20}\x0a.filetree\x20li.expandable\x20span.folder\x20{\x20background:\x20url(images/folder-closed.gif)\x200\x200\x20no-repeat;\x20}\x0a.filetree\x20span.file\x20{\x20background:\x20url(images/file.gif)\x200\x200\x20no-repeat;\x20}\x0a", - "analysis/ipcg-pkg.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x02\xf0\x00\x00\x03\xc6\b\x03\x00\x00\x00\xb2,^L\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x02\x04\x00\t\v\a\r\x0f\f\x10\x12\x0f\x13\x15\x12\x1b\x1d\x1a !\x1f!#!$%#&(&+-*/1.2416859:8<=;>@=AB@DFCFHEJKIOQNQSPTVSWYV,`\xae7]\xad8^\xae[]Z8a\xaa:b\xab;b\xac_`^\xc75\xf1\x17\u007f4\x1f\xc7j\xfb\xd7\x17\xdd\x05Zn\xc9/\xfe\xa7#\xf1\x1a\xb1k\x1e\xae-\x19\x9f_\xfej\xc73\xfa3\x9e\xa8_%f3\x9a\x10\x85\x1dG\x97M\xd4\xd7\xf8}x\xc3\xff\xfd7\xcfC\xae\xdc\xc9O\xbfo\xd9\xec\x83\"\x02\xedp\a\x18i\xa4/\xfc\xe1\u007f5\xff\xef.>\x1c%\xfc+\xae\xc0\x03\xb7\xa1\xb4a\xd9*\xf9\xb8\xf8\xab\xc4lF\n\xff?\xf9撪\xbf\x067\xbc\xad\xcc\\2\xe9\x84e\xbb\"\x82E\x1d`đ\xb6\xf0Zq\xf0\xffow\xa4\xf0\xaf\x8e\r\x99\xf0\xa8\xbe\x1f5,\xcb3\x96=\x1f\xbbbGG\x95\b\xf3\x9frA\xb4\xb6\x87\xf3\xc3\x13j\x13\xae\x11\xbd\xe6\x1f\xb5\xe0\xb4\t\"$|\xe8W\x89ٌ>;//\xb8dAp\xc3\xc1W\xaf\x98g\xd9\xf2\xcf,\xebb\a?\"I[x}w\xe8\xf9\xe3\x169\x18\xf7玷^\x9d\xaa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b\xf5[\xed}\x97~\xbb\xdc~}\x00°\x10\xbe\x97H\x8f4\x84\x8b\x15\x80\x8c\xc3BxJ\x14i\x00\x18FX\b\x8fK\xed\x01U\xb0\x10\x1e\x97\xda\x03\xaa`!<\xe1R{@\x11,\x84G\xa4\x01\xaa`!<\"\rP\x05\v\xe1\t\x91\x06(\x82\x85\xf0\x884@\x15,\x84G\xa4\x01\xaa`!.hitarea\")\x0a\x09\x09\x09\x09.removeClass(CLASSES.lastCollapsableHitarea)\x0a\x09\x09\x09\x09.removeClass(CLASSES.lastExpandableHitarea);\x0a\x09\x09\x09$(branches).find(\"li\").andSelf().prepareBranches(settings).applyClasses(settings,\x20$(this).data(\"toggler\"));\x0a\x09\x09}).bind(\"remove\",\x20function(event,\x20branches)\x20{\x0a\x09\x09\x09var\x20prev\x20=\x20$(branches).prev();\x0a\x09\x09\x09var\x20parent\x20=\x20$(branches).parent();\x0a\x09\x09\x09$(branches).remove();\x0a\x09\x09\x09prev.filter(\":last-child\").addClass(CLASSES.last)\x0a\x09\x09\x09\x09.filter(\".\"\x20+\x20CLASSES.expandable).replaceClass(CLASSES.last,\x20CLASSES.lastExpandable).end()\x0a\x09\x09\x09\x09.find(\">.hitarea\").replaceClass(CLASSES.expandableHitarea,\x20CLASSES.lastExpandableHitarea).end()\x0a\x09\x09\x09\x09.filter(\".\"\x20+\x20CLASSES.collapsable).replaceClass(CLASSES.last,\x20CLASSES.lastCollapsable).end()\x0a\x09\x09\x09\x09.find(\">.hitarea\").replaceClass(CLASSES.collapsableHitarea,\x20CLASSES.lastCollapsableHitarea);\x0a\x09\x09\x09if\x20(parent.is(\":not(:has(>))\")\x20&&\x20parent[0]\x20!=\x20this)\x20{\x0a\x09\x09\x09\x09parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable)\x0a\x09\x09\x09\x09parent.siblings(\".hitarea\").andSelf().remove();\x0a\x09\x09\x09}\x0a\x09\x09});\x0a\x09};\x0a\x09\x0a})(jQuery);\x0a", - "analysis/typeinfo-pkg.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x042\x00\x00\x03\xa2\b\x03\x00\x00\x00\xb5\xb6\a\xdf\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x03\x00PLTE!# #$\"$%#&(%()'*,),.,/0.231463685;<:>@=BDAGHF\x00f\x00JLI\x00j\x02\x03l\x04OQN\rp\nSUR\fr\x17VXU,`\xae7]\xad8^\xae\x16w\x1d[]Z8a\xaa:b\xab;b\xact(\x14\n\xa2և\xa1\x8c\xed<\x86\xe1\xa9y\x06\xa4)jU\bJ\xad\x04\x19\x89ЂR\xadB\x88$s~\xf7ܿ\xe7\xde=w\xef\x9eݻٽ\xbb\xef\x97#\xb9{\xf7s\xce\xf9\x9c\xb3{\xde{\xef\xb9w\xf7\xadP\x00\x00H\x18\xc5/\x00\x00\x00l \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t|$\xe3\x18\x00\x00p@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12\xc8H\xc6\a\xbf\xf7\xa8D\x8a\xdf6\xce\xf8?ђ\x8a;\x9ey\xdf/\x12\x00\x90u$.\x19\x9f\xb4\\\xb5Գ\x9a\x84\xd9\u007f\a1\x19\xd7\xe2\x17\f\x00\xc86\x12\x96\x8c\xdf\xcf$$u\xc9\xf8`\x06\xe1X\xe1\x17\x0e\x00\xc82\x12\x96\x8cz\x12\x84d,aJQRS?\xb7\x82mD\xff\xe0\x17\x0f\x00\xc8.\xfaY2&\xab\xb5,\xf8@\xdd8\xfc8ӌF\xbfx\x00@vѿ\x92\xb1\x9f\xe9\xc4\a\xfa\xf6lusF\xfcp\x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\xdb\xe6\x9a\x02\x93\f\xfd\xa2)1\xceP\x9e#\x16\xe3\xfe\xc07\xf7\xfe\r\x84\xa3j\xbf(\xd8-\x02?d\x8fG\x9b\xe7\x1e~\xd1\x00\x80t\x92\xb0d\xbc\xaf߀\xa5\x9f\x9bh'\v\xe5\xe6\xb7G\xb4\xe5\xcf*}\x1a/\xd0OV\x9aM\t\xf9?\xbfu\xb6\xb7\xbfΞ\xf2s\r\x19p\x05\xbbE@;\x9b\x99k=\xf4\x89\x06\x00\xa4\x93\x84%\xe3\xd8\x1f\xea'G'\x1b\xdfng\x17=\xc9\x0f\xcdg\xb4\x8b\xac\x1f4M\x8dr_~\u007fkɌ\xb2\xa2\t7/\xfd\xe0\x98\x9b\xdf7~gr\xb4\xb8\xe2;?\xb4\xc5\xc4\x19\x1c#\x02\xec\xeb-\xeb\xec\x87>\xd1\x00\x804\x92\xb8d\xf0\xecd\xf3\xd4\xfa\n\xbb}_\x06\x00 \xc7IJ2>ak\x19\xf6\xd7\xcd \x19\x00\xe4\r\xf2\x92\xf1\x8b_<\xc7n\x95\xe0\xee\x03\x87d\x00\x907\xc8KF\xad\xbe\xf8Xa\xff\xdc\x16$\x03\x80\xbcA^2\xfeUS\x8cq\xdc7\xc1 \x19\x00\xe4\r\xf2\x92\xd129Z<\xad\x81\xbfE\x1b\x92\x01@\xde /\x19\x00\x80<\x06\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\xc0G2\x00\x00\x80\a\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90 e\xc9\xf8\xfcD\x17\x00 oHQ2\xbe\xf4\xab\x1f\x00\x90S\xa4&\x19P\f\x00\xf2\x8c\xd4$ïv\x00@\x8e\x91\x92d|\xeeW;\x00 \xc7HI2\xb0\xf2\t@\xbe\x91\x92d\xf8U\x0e\x00\xc85 \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\t\xd0\xe9\x17\x00@\xde\x00\xc9\xf0c\xef\x94A\xcax\xbf \x00\xf2\x05H\x86\x1fC\x87>\xbcr\xb7_\x10\x00\xf9BVH\xc6\xf6\xb1\x03\a\x8cZ}\xf1Z\xbf\xb8L\xb0]Y\xe9\x17\x02@\x1e\x11\xb0d\xac\xde\x14\xbbϗM\x91+\x9e\\<^Q\x9e\xf0\v\x94F&\x1d\x8f\xd8MJV*\x19\x00\x19\"`\xc9\x189)v\x9f/c/g\xffNI\x83dȤ\xe3\x11\v\xc9\x00\x80'`\xc9\x18.1G-\x86\xdc\xc6\xfeݮ<\xe9\x17(\x8dL:\x1e\xb1\x90\f\x00x\x82\x94\x8c\xe5\x8a\xcep}\xf3\xb6\xaey\xea\xbfOLWο\xff\xba\xc1\x03\xafxU\x8bytd\xc1\xd0Y\x1d\xcer\x93.ڮ\x15\xef\xe0\x03^:_\xad\xe1\xd5+\x87\x14\x8c\xed|B\xadf\x9e^\x998\xc0Q\xdbڱ\x83#\x03\xc7\x0ev\xa4\xc3\xc5NW\xce[\xdc\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\xfd\xe50v\xef\xc4\xdd꿿b˟w^:\xe6\xf6?ũW\x90\xaf83\x8f\xces\xc5\xf8q\xb0k\x10\x8e$\xc8#2&\x19?\x18\xf6\xbf\x82M\x10\x17\xfb\xd4\t\x80\f\x911\xc9\xc0\xb7ޓ\x00\x92\x012N\xc6$\x03$\x01$\x03d\x1cHFx\xd0\xd7G\x01\xc8(\x90\x8c\xf0\xf0\xcf\xe6r%\x00\x99\x03\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90 Pɘ\xa4\f\x9c\xb2]\xd4\n\x00 G\bT2v\xaf~t\xe8\xc0\x0eQ3\x00\x80\xdc P\xc9PY\xad\xbc$\xd8\v\x00\xc8\x11\x82\x96\x8cM\xcaZ\xc1^\x00@\x8e\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x10\xb4dlWV\v\xf6\x02\x00r\x84\xa0%\xa3s\xe0ȵ\xbb\xe1\x8b\x03@\xae\x12\xb4dt\xadT\x14\xe5\n\xd1\x13\x00\x80\x1c h\xc9\xe8\x188\xe4\xfeկ\t\x9e\x00\x00\xe4\x02AK\xc6&e\xa5`/\x00 G\b^2p\xc5\x04\x80\x1c\x06\x92\x01\x00\x90 h\xc9X\v\xc9\x00 \x97\tT2:wo\x9a\x14\xd9-j\x06\x00\x90\x1b\x04*\x19\xe3\x15e\xf0rQ+\x00\x80\x1c!P\xc9\xd8\xfb\x12\x0e1\x00\xc8m\x02\x95\f\x00@\xae\x03\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x90\x92d\x9c\xf0\xab\x1d\x00\x90c\xa4$\x19\x9f\xfb\xd5\x0e\x00\xc81R\x92\f\x9c\x99\x00\x90o\xa4&\x19_\xfaU\x0f\x00\xc8-R\x93\fh\x06\x00yF\x8a\x92A\xe9\xe7X\x03\x05 \x8fHY2\x00\x00\xf9\x04$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 Aʒ\xb1\xf6\xca\xc1\x91\x01\x17߶\xd7/.\xe3t\x9e\xf5\x8b\xf0\xa0S1\xb8`Ȕ\xddlG\x87\xf182\xf8\xcaMVм\xe1\x05\x91\x8bƯu\x95\r\xcd\xe8\x00\x90 )J\xc6\xd9\xf1\xc6\xf49\xff~\xbf\xd0\f\xf3`\xc1\xe7~!\x1e\xa8\x92Q0@\xe5B\xd6\xcf\xd5Ԗ\f\xc6<=\xe6ш\xf1x,\xdfJxF\a\x80DIQ2\xe6(\x05\x0f\xbe\xfby\xe7K\xea\xdcX\xe9\x17\x9bQ\xce*J\n\x92ѡm|\xbd}\xa8\u0084G\x95\x8c\xbd\x9f\xabt\xbd:VQ^e\xcf\xccR\x94\xf1/u}\xb9\xf7\xae\x882\xeak\xbbdhF\a\x80\x84IM2>\x8f(ơ\xf8\x14eH\xfc\xd0\f\x13\x84d\xa8b\x11Q\x9e\xd0$\xa3S\u007f|v\x882E\xfd\xb3ZQ\x16\xeb;^R\x94G\xad\x82\xe1\x19\x1d\x00\x12&5\xc9xM\x89\x18\x1f\xaa{\xadi\x94\x9d\x04#\x19t\xa4r\x1b/\x19\xf4\x1ee\xb0Z\xf7 e\xba\x190\x9d\x13\x87\xf0\x8c\x0e\x00\t\x93\x9ad\xec\xb5g\xd3\xea\xed_\xb2?\x9d\xb3\x86D\x06\x8e\u007f\x89m>\xaa<\xfcҐ\x82\x91s\x94\xf1z\xc4u\xca]\xc2\x00\xb3\x06\xfb!\x17\xb3X\xb9\xe7\xdd\xf1\x03.\x1c\xb9\xdc3\x82vL\x1f\x1c\x190\xeaQ}u\xd3Q\xf4\xfe\x13\xb3\x06G\x86\xdcv\x82\x9d\"0v\xbb\x82\r\xd6N\xba(R0\xf4\xb6.W\x19\x13^2\x86+s\x1c\x92\xf1\x84r\xa1Z^Q\xfeb\x06t\xdc\xff\xaaU0\xd0\xd1\x01 ;HM2\xe8\x10e\xe8Z\xee䝾T\xa0D\x86\x0f\xd1W\x05\x1fU\xe6\\\xa0(\x05\xef*\x11\xed\xf3\xfd\xec\x85\xca^a\x809}\xad\x87|\xccbeRAd\xec\xa8\xf3\x94\xeb\xbc\"\xf6^\xa8\f\x18>TQƺ\xdb_\xac̺H\xb9p\xa0\xa2\f=K\x97OR\x94\xf1Wv:\x83\r\xa6+\xcaE\xc3\a\xa9\xff\x9cp\x961\xe1$c\xb7\xa2,wH\xc6]\xcaPJoc\xff\x88\brt\x00\xc8\x0eR\x94\x8c\xed\x11E\x190\xfe\xd1\xdd\xc6\xc3\xce\v\x959\xea\xc7\xe9\xf6\x01l\xb9\xefQ\xe5\xbc!\xab7=\xa9\x1e\xcck\x87\b\xab\x95\xe1\x1e\x01\x06\xe6CG\xccbE\x19\xf2g\xf5\x18\u007f\x00\xabD\x181^\xb9M\x9d\x96\xbb\a\xb0u\x03wѡ\xdb\xd5c\x80\x88\xf2\xa4ub\xc2\a\x1blR\nا\xfa\xf6\x02\xe5AW\x19\xb3S\x86d\x9c\xed\\>H\x19r\x96\x97\x8c\x13\x83\x94Y\x94^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\x15\xe5\x1e\x81d\xa8\xc7\x13ʔ\xed\x9f\u007f\xbd\xf76\xc5\xf1\xb5\xb4`Fg\xf9\xc3\xdb)\x00\xd9B\x8a\x92\xf1\xb9\xf9\xf5nmb\xab\x1f\xac\x11傑C\x14\xe5\xf2\xb3\x8eIq\x8fb.Ix\x040\xac\x87|\xccbe\xc8\x05\xe7\xb3\x1b\"\xef\xf1\x8a\xf8\xcb@%r\xf1\xf0\x02ePGLQ~\xfa\x8fTs\xdc\xe4\f\xd6yXQ\x06_1\xf2\xbc\x01w\xb1\xeb\xab>\x92\xa1\x8a@\xa4C \x19g\xa7\x98\xc3p\x05\xffM\x96`Fgx\x9ck\xb8\x00\xf47)J\x06\xa5/\xcd\x1a: r\xd1\x15ˍ\x0f\u05ceYC\"\x05#\x1ff\x87\xfdܤ\xe8P\x14\xf3\x16Hq\x00u<\xe4b\xd49\xbc\xfb\x8a\x82\x81Wl\xf7\x8c\xa0\x9ds\x86D.\x18z\xd7\tAQm\x97>\xfd\xdf\x1du\xc1\x80\x95\xae`\x9dM\x97\x0f\x8c\xa8{>g\xab%~\x92\xd1\x11Q\x8fOb%\x83\xd2\xedӇ^\x10\xb9h\x92\xfb'v\x82\x18\x1dH\x06\xc8&R\x96\x8c4c\xcea\x00@V\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x90\xed\x92\x01\x00\xc8* \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00\x00\t \x19\x00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\x91(Y\xd5G\xcf\xcc'\x8e+&w\xa8\x9aqz>\v\x16\xd5\x06\x00\xe8\x1fR\x96\f:\xc7q\x90aJ\xc6ㄝ\x97\x18\x92A[\xa3\xa4x\xf64B\xe6\xb2%\x8bل\x906\xa7d\xd0\xcdEd\xe2\xcd\x15\x844\xb1\xe3\x87mQR~s\t\xa9\xe7$\xe3X\x19\x89\xde8\xb3\x84\x94\x1f\x15\xd7\x06\x00\xe8\x1fR\x97\x8cN\xc7A\x86)\x19\xef\xe8ZaH\x06=\xf2\xa3\xaah\xc9\xec\x16\xed+\"\x87j\x8a'\xbe\xec\x92\fz\xb0\xa1\"zM}\x9b^\xc7\xfb\xf3\xcbKnm\xdb\xc6/\u007f\x1eo\x9a\x16-\xae^\xfaw*\xae\r\x00\xd0?\xa4.\x19\x00\x80<\x02\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\x00\x92\x01\x00\x90\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xbab\x87Z\x83\xe3\xe6\x0fǐ\x88ƌ1\x9fh\xf3\xf9\xdc[7\xdfԮ\xb2A=\x93\xf3\xaa\xd7.fU&n\xc2wH@\x18\t\x97d\xf4]C\xc8\xd6\t\xa4t\x9b~\xaa\xdcV{U\xd9\xdc6\xed\x99\xdeE\x93K\xee\xd8\xc7\xee\x10 $z\xb8T\xfdw\xa1\x1a\xben\xf6\xb8\xd9\xfa}\x19G\xeb'O[\xfab\x11\xdb\xebdE\xb1\xfb\x04\xbbf\xf3Og\x94V\xcc\xd7/M\x98Mh_\xbe \xc4\xfc\x9c\\\x17]cl\x89\x03\xde(\xb1\xef\x9f0\xd85\x9a\xdd\xc8\xd1J\xc8\xe8]꣏\xef\xbbvB\x8d~\xb3\x18\xb7iw(\xfax\xe3\xc4ʆϴ\xbdf\xdf4\x8c|\x1f2V\f\x1e\xa0t\xbf\xde2\xd9@\xe9\xaf\xefh\xae\x8aV\xd4:o\x17s\f\x89h\xcc\x18/Tl`\u007f\x8c^\x10Rrij^\xae\x98Y\x99\xb8\t\xdf!\x01a$\\\x92\x91\x06\xfa\x96D\xb7\xf9\xc5H\xb3-\xda\xe8\xb85B\x1e\xefoʤ#\xdf~ \xf5!\x01\xd9A\xdeK\x06\xed[s\xed\xdf\xfdb$\xf9\xaa\u2e64\xbe\xf4\xc1\xe1}\xdb{\x1a\xf2\xed\a\x02\x18\x12\x90\x1d@2\xb2\x938ߔ\x01 \x93@2\xb2\x91\x93\xdar\xa2_\x14\x00\x19\x00\x92\x91\x8dhˉ\xf6}\x9e\x00d\x0f\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\x8c4x\x9cf\x8f\x01i\xf0}\x031d\xcf\xcb\xdd/\xe4\x9add\xaf'\xeb\vĴ?\xd9,(bb$\xe9\xb4\\5\xe0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ԁ#\xc0n\xed\xb3\x8a\xaa\xf5\xad\xf3\x8bc%\xc3 s#\xc9g6\xb7\xa2eU\r\xd1\xde\xd5\xe2\xa1\xe6[\vʦ6\\\x92\x91\x87\x9e\xac\xf6wL6\xaa\xf2\xc0:V\xa2M\x0fk\xb3M\xfd;\x93k\xc6\xecЁ\xb2\x15\xb4\xa5t\x1f\xe5q\x1a\xb1\n\x86\x8f\xfe\xbd\xa4A\x18\xcby\xa7ڛ\xd1\xc7\x1b'V6\x186\xd0\xf1M[y\x1bU\xae\x98\xc8-Vl\xb9\x9a\xa4\xc1\xabk|7\x97\x12爸\x02\xec־h\xac*\xa9=\xe0)\x19\x99\x1bI>\xb3\xa3\xb5%\x13\xea\x9ev\xe5\xe0\x18>\xae\xb5\xa0lj\xc3%\x19i -\x16\xa6\x99\xb4\x04M\xadCO\x13\xee\x88\xc5\x0f\xc7\x19Q\xe2$Y,\x10Z\x89\xeb(#.\xee\xe5O\x19\xd2;\x92\xf2\x99\x05\xf6\x9e\xcc{\xc9H\x87\x85if-AS\xeaЏ\x9a\xfc\"8\xa4\xdf\xe8:I\x16\v\x80\xbe\x17\xcbd\xfa\x97\xc4ĴI\xefHJg\x16\xdc{\x12\x92\x01\x92F\xfa\x8d\xae\x93d\xb1\x008Y\xbe\xc4u\xd19>\xd2\x133Y\xa4\x87\xa4\xdf2\x8b\x05\x92\x01\x92䤶\xaa\xe7\x17\x15C\x92\xc52\xc1\xd16\xf2\xd8[\xfd\x90\xaa\xfc\x90\xf4Wf\" \x19 I\xb4U\xbd\xe3T\x96$\x8be\x82\xb9j\xaaE\xae\uf2a5\x03\xf9!\xe9\xaf\xccD@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x00\x00\x12@2\x82\xb00u\x11\x9c\xffez\b\xbe\xc7\xfdK\xb6\x8fon\x93k\x92\x91\x93\x9e\xac\xc19sj\xf8\x99\xb6z\fT,Iu\xc8ɡ\xbaҊ\x86=\x151\x12\x167\x87\xe0\xfcE\x81<\xb9\"\x199\xed\xc9\x1a\xa43g\x02\xa6\xad⁊%\xb9\x0e9h+\xadٸu6\x89\xfdi\t\x9f\x1c\x82\xf2\x17\x05\xf2\xe4\x8ad\xe4\xb8'k\x80Μ\x89\x98\xb6\n\x06J@\x92\x1d\xe2\xf8j\xe2\xfc^J\xbb\xabE\xbfF\x13?\x87\x80\xfcE\x81<\xb9\"\x19\xee\xdfw\x17\"x\x17\x86œ58g\xceDL[\x13\x93\x8c$;ı\xacD\xfb\xed\xba5\xf2\x92\x11\x90\xbf(\x90'\\\x92\x91\xbf\x9e\xac\x819sZ=\xa6\xf4\x93\x05\xe5ъz\xe6\xae\"\x1e(\xae2.\xd6&\xb9\x0e\xf1\x03U\xad\x1b}|\xb1\xa6W:\a\x81\xbf\xa8\xa8\t\xa7\xe5\xaaل\xafS+\xf0&\\\x92\x91\xaf\x9e\xac\x01:sZ=\xa6{Joi\xd9\xd5L\xd8H\x8a\aʮ\x8c\x8f\xb5I\xaeC\\@o!\xb7\"!\x99\x83\xc0_TԄ\xe3e\xb1\x9a\xf0uj\x05ބL2\xf2֓50gN\xab\xc7=Uu\xeal\xef\xdd\xf6\x95\xd7@q\x95q\xb1<\xc9u\xc8\x0e8Ν\xd3\xc8\xe6\x10;\xbe^\xaf\x85\xb5\xc9;\xc0\xfa;\xb5\x02\x0fB'\x19\xf9\xe8\xc9\x1a\xa43\xa7\xd5\xe36\xf2\x81\xb9O$%\x19\xe9\xe8q\xff\xd2o\xe3\v\x04@2\xc2Lr\x92\x01@\n@2BL&\x9d9A\xbe\x02\xc9\b1\x99t\xe6\x04\xf9\n$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$\x03\x00 \x01$#\r\x0e\xa5Y\xe9\x19\x1a|7\x93$+G\a$L\xa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82\xc7ǩ5\x90$aښńX2\xf2ϓ\x95\xf78\x8d^\xa3Ω\xee\x1bj\x1d\xdd\xe4:\xcf\xc5:\x92\xf4\xb1g\x157\xe1$\xbeSk I´5{\t\x99d\xe4\xb7'+\xefq\x1a%\xb7l\xdb\\]ƒ\xb4\xba\xc9w\x9e\x8f\xe5\a\xcaǞգ\t!iL\x12\xa6\xad\xd9K\xb8$#\xcf=Yy\x8f\xd3\xe8\xe3\x8d\x13+\x1b>c\x9bV7\xf9\xce;\xfcP\xb9&|\xecY=\x9a\x10\x91\xc6$aښńK2\xd2@\x02f\xa5\xf2\xf4\x83\xebh\x9c\x9b\\}H\xb8\xc7\xc97a\x92d\r\xfd0| i\xf2^2\x120+\x95\xa6?\\G\x93\x9c\x8d\x8cD{\x9cB\x13\x06\xc9\xd5\xd0\x1f\xc3\a\x92\x06\x92\x11R\x92\x9b\x8dR\xa4\xdeD\xea5\x80\xac\x03\x92\x11JNjk\x88~Q)\x91z\x13\xa9\xd7\x00\xb2\x10HF(\xd1\xd6\x10\x8f\xd3t\x92z\x13\xa9\xd7\x00\xb2\x10H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02H\x06\x00@\x02HF\x1a\x1cJ\xb3\xc7TT\xeb[\xf6\xa4\x03r\x80\\\x93\x8c\xec\xf6d\x8dK\x1a\xe6\xaa\xc97\fr\x9a\x10KF\xd8,\xfc\xc0'RD\xc6fn\xc6\x1a\x06Y\n$\xa3\xbf\xe8k,iڶg[SIS\x12\x1f\xf9G\xdb\xc8co%Q.e2\xd60\xc8V \x19\xfdFߎ\xba\xcaheݎd&\xe0\\BH\xd1Q\xbf\xa84\x90\xb1\x86A\xb6\x02\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\x00\x00H\x00\xc9\xc8iOV\x0eس\x82@\xc85ɀ'\xab\a\xb0g\x05\xc1\x90+\x92\x01O\xd6\xf8\xf4\xa7=+\xc8irE2\xe0\xc9\x1a\x97~\xb5g\x059M\xaeH\x06z\xb2\xf2Χ\xd1\xc7\x1b'V6|\xc66\xad\xbe\xf1=v\xb8\xa4rM\xa4j\xcf\x1aL\x0e '\b\x97d\xa4\x81\x90x\xb2\xeaĹ\xb3Շ \xecYu\x92\xcf\x01\xe4\x04y/\x19!\xf1d\xd5Ia\xba\x06`Ϫ\x93B\x0e \x17\x80d\xf4\x17\xa9y\xb2\xead\xc3t͆\x1c@\x06\x81d\xf4\x17)y\xb2j\x9c\xd4\x16\x19\xfd\xa2\xd2K6\xe4\x002\n$\xa3\xdfHœUC[d\xe4n\xe3\xcc\x04ِ\x03\xc8(\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\f\x00\x80\x04\x90\x8c\xbc\xf2d\r1\xf1\x065\xec}\v\x15\xb9&\x19!\xf6d\xd5ГL\x835jl7\x9dx\x8cN,)\x8f\x0e\xa5\x87\xeaJ+\x1a\xf6T\xc4L\xf3\xb89\xc4\x19T\xbf\xbe\t\xd9U\xb1\xc3/$U\xfa\xa1\x89\xd4\xf0\x9d-\xadE\xc6Ϸ\x16\xd9z\x9d+\x92\x11bOV\az\x92\x81X\xa3\xee\xe1\u007f}+\xb6\x9b.ģ\x13K\x00\xa3\xd3VZ\xb3q\xeblB\x8e\xb8\x9f\xf0\xc9\xc1kP}\xfb&dGi\xac7C\xc0\xa4\xdcĞx?\xa0\x96\x02\tϖ\x16\xd2\u07be\x9e\xacko\x1f\xddb=\x93+\x92\x11bOV\x17Z\x92AX\xa3\xdaC\xe2\xe8\xa6'\x82\xd1\x11\x90\xfa\xe8|5q~/\xa5\xddձ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xb7[\x03\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\x03\x00\xe0\x00\"\xa3\x04\xa1\xe7\xbet\xb2\x0eN\xf1\x1b5\\`u-\x84\xaaE\x86\xd52\xd9C坬\xc1`\x91\\C\xbfX\x8e\x8e\xdd\xc9j3\x9f\xdaG\x88\x19x\u007fau\x1d%U\x89\x8c̖\xc94\xd5w\xb2\x06\x83=\x93\xcf.\x89\xaf\xfe\xe8s\xb4\xd5\xc9j5\x9fZG\x88)`\u007fau\xcdJ\tVתDFf\xcbd\x8aqp\xb2F\x17\x12\xdd\x14\xe9\x8b\x18\xa6`v\x87\x90\xc5|\xda\u007f\x84.\x83\xef/\xac\xae\x99)\xc1\xeaZ\x95\xc8\xc8l\x99L1\x0eN\xd6B\"#\x8b\xf94[d\f\xbe\xbf\xb0\xbaf\xa6\x04\xab\xab_\x91Q\x90eR1\x16NV\x1a\x19\xb6\x89M\v\x82\xd5u\x00\xe5j\xb5\xac\xae~EFA\x96I\xc5X8Y\x83\xc1vw\xd7\xc3ȰMlZ\x10\xac\xae\x03(W\xabeu\xf5,2\x8a\xb1L*\xc6\xc2ɺ\x15?\xd9le\x98ش X]\aR\xaeV\xc9\xea\xea]d\x14a\x99T\x8c\x85\x93\xb53ؽ{\xf7.\a\x91a\x9dش X]C\xf2)W\xabeu\xf5.2\x8a\xb0L*\xc6\xc2\xc9J\xde˰NlZ\x10\xac\xae!\xf9\x94\xabղ\xbaz\x1c\x19\xf9-\x93\x8a\xb1p\xb2\x92ȰNlZ\x10\xac\xae\x11\xf9\x94\xab\x95\xb2\xbaz\x1c\x19\xf9-\x93\x84qp\xb2\x92ȰNl\\\x10\xac\xae!N\xcaUB\x85\xac\xae\x9eEF!\x96I\xca\x188Y\xb5o\u007f\xda&6.\bV\xd7\x10'\xe5*C\xd1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b9\x1e\xe6P\x99\xa9\xb1\xe5o\x9f\x19ͥ\x8b\xc8\xf0\x94\x01\"\xa3 \x9ct\xb2\xcd\xcdv\xe3\xa2\xed\xa0Aq5\xaa\xe6\xf8\xd9\x0f\xc8\xf10\x87\xca\xd8\xc6\x0ee\xfb2\x82\xc8\xf0\x92\xa7\xe1\xdb]\xb6\xa3\xca\xc5\xc5f\xba+\xde=W\xcf\xf8\x9b\xf9\xd0x\xb4.>\xb9k\xaf=M·e\x83o\xec\xbe\xda>D\x86\x97\x84ow=\x96\xa3\xc5\xc5fڜj\x18\xff\xdabT\x9c\x0e\xde\x04\xb4\\\u0086!\xe7òah\xec~\xda>D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x01D\x06\x00\xc0\x81\xff\x03&\xf2B\xcdI\x1b+\x96\x00\x00\x00\x00IEND\xaeB`\x82", + "jquery.treeview.js": "/*\x0a\x20*\x20Treeview\x201.4.1\x20-\x20jQuery\x20plugin\x20to\x20hide\x20and\x20show\x20branches\x20of\x20a\x20tree\x0a\x20*\x20\x0a\x20*\x20http://bassistance.de/jquery-plugins/jquery-plugin-treeview/\x0a\x20*\x20http://docs.jquery.com/Plugins/Treeview\x0a\x20*\x0a\x20*\x20Copyright\x20(c)\x202007\x20J\xc3\xb6rn\x20Zaefferer\x0a\x20*\x0a\x20*\x20Dual\x20licensed\x20under\x20the\x20MIT\x20and\x20GPL\x20licenses:\x0a\x20*\x20\x20\x20http://www.opensource.org/licenses/mit-license.php\x0a\x20*\x20\x20\x20http://www.gnu.org/licenses/gpl.html\x0a\x20*\x0a\x20*\x20Revision:\x20$Id:\x20jquery.treeview.js\x205759\x202008-07-01\x2007:50:28Z\x20joern.zaefferer\x20$\x0a\x20*\x0a\x20*/\x0a\x0a;(function($)\x20{\x0a\x0a\x09//\x20TODO\x20rewrite\x20as\x20a\x20widget,\x20removing\x20all\x20the\x20extra\x20plugins\x0a\x09$.extend($.fn,\x20{\x0a\x09\x09swapClass:\x20function(c1,\x20c2)\x20{\x0a\x09\x09\x09var\x20c1Elements\x20=\x20this.filter('.'\x20+\x20c1);\x0a\x09\x09\x09this.filter('.'\x20+\x20c2).removeClass(c2).addClass(c1);\x0a\x09\x09\x09c1Elements.removeClass(c1).addClass(c2);\x0a\x09\x09\x09return\x20this;\x0a\x09\x09},\x0a\x09\x09replaceClass:\x20function(c1,\x20c2)\x20{\x0a\x09\x09\x09return\x20this.filter('.'\x20+\x20c1).removeClass(c1).addClass(c2).end();\x0a\x09\x09},\x0a\x09\x09hoverClass:\x20function(className)\x20{\x0a\x09\x09\x09className\x20=\x20className\x20||\x20\"hover\";\x0a\x09\x09\x09return\x20this.hover(function()\x20{\x0a\x09\x09\x09\x09$(this).addClass(className);\x0a\x09\x09\x09},\x20function()\x20{\x0a\x09\x09\x09\x09$(this).removeClass(className);\x0a\x09\x09\x09});\x0a\x09\x09},\x0a\x09\x09heightToggle:\x20function(animated,\x20callback)\x20{\x0a\x09\x09\x09animated\x20?\x0a\x09\x09\x09\x09this.animate({\x20height:\x20\"toggle\"\x20},\x20animated,\x20callback)\x20:\x0a\x09\x09\x09\x09this.each(function(){\x0a\x09\x09\x09\x09\x09jQuery(this)[\x20jQuery(this).is(\":hidden\")\x20?\x20\"show\"\x20:\x20\"hide\"\x20]();\x0a\x09\x09\x09\x09\x09if(callback)\x0a\x09\x09\x09\x09\x09\x09callback.apply(this,\x20arguments);\x0a\x09\x09\x09\x09});\x0a\x09\x09},\x0a\x09\x09heightHide:\x20function(animated,\x20callback)\x20{\x0a\x09\x09\x09if\x20(animated)\x20{\x0a\x09\x09\x09\x09this.animate({\x20height:\x20\"hide\"\x20},\x20animated,\x20callback);\x0a\x09\x09\x09}\x20else\x20{\x0a\x09\x09\x09\x09this.hide();\x0a\x09\x09\x09\x09if\x20(callback)\x0a\x09\x09\x09\x09\x09this.each(callback);\x09\x09\x09\x09\x0a\x09\x09\x09}\x0a\x09\x09},\x0a\x09\x09prepareBranches:\x20function(settings)\x20{\x0a\x09\x09\x09if\x20(!settings.prerendered)\x20{\x0a\x09\x09\x09\x09//\x20mark\x20last\x20tree\x20items\x0a\x09\x09\x09\x09this.filter(\":last-child:not(ul)\").addClass(CLASSES.last);\x0a\x09\x09\x09\x09//\x20collapse\x20whole\x20tree,\x20or\x20only\x20those\x20marked\x20as\x20closed,\x20anyway\x20except\x20those\x20marked\x20as\x20open\x0a\x09\x09\x09\x09this.filter((settings.collapsed\x20?\x20\"\"\x20:\x20\".\"\x20+\x20CLASSES.closed)\x20+\x20\":not(.\"\x20+\x20CLASSES.open\x20+\x20\")\").find(\">ul\").hide();\x0a\x09\x09\x09}\x0a\x09\x09\x09//\x20return\x20all\x20items\x20with\x20sublists\x0a\x09\x09\x09return\x20this.filter(\":has(>ul)\");\x0a\x09\x09},\x0a\x09\x09applyClasses:\x20function(settings,\x20toggler)\x20{\x0a\x09\x09\x09//\x20TODO\x20use\x20event\x20delegation\x0a\x09\x09\x09this.filter(\":has(>ul):not(:has(>a))\").find(\">span\").unbind(\"click.treeview\").bind(\"click.treeview\",\x20function(event)\x20{\x0a\x09\x09\x09\x09//\x20don't\x20handle\x20click\x20events\x20on\x20children,\x20eg.\x20checkboxes\x0a\x09\x09\x09\x09if\x20(\x20this\x20==\x20event.target\x20)\x0a\x09\x09\x09\x09\x09toggler.apply($(this).next());\x0a\x09\x09\x09}).add(\x20$(\"a\",\x20this)\x20).hoverClass();\x0a\x09\x09\x09\x0a\x09\x09\x09if\x20(!settings.prerendered)\x20{\x0a\x09\x09\x09\x09//\x20handle\x20closed\x20ones\x20first\x0a\x09\x09\x09\x09this.filter(\":has(>ul:hidden)\")\x0a\x09\x09\x09\x09\x09\x09.addClass(CLASSES.expandable)\x0a\x09\x09\x09\x09\x09\x09.replaceClass(CLASSES.last,\x20CLASSES.lastExpandable);\x0a\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09//\x20handle\x20open\x20ones\x0a\x09\x09\x09\x09this.not(\":has(>ul:hidden)\")\x0a\x09\x09\x09\x09\x09\x09.addClass(CLASSES.collapsable)\x0a\x09\x09\x09\x09\x09\x09.replaceClass(CLASSES.last,\x20CLASSES.lastCollapsable);\x0a\x09\x09\x09\x09\x09\x09\x0a\x09\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20create\x20hitarea\x20if\x20not\x20present\x0a\x09\x09\x09\x09var\x20hitarea\x20=\x20this.find(\"div.\"\x20+\x20CLASSES.hitarea);\x0a\x09\x09\x09\x09if\x20(!hitarea.length)\x0a\x09\x09\x09\x09\x09hitarea\x20=\x20this.prepend(\"\").find(\"div.\"\x20+\x20CLASSES.hitarea);\x0a\x09\x09\x09\x09hitarea.removeClass().addClass(CLASSES.hitarea).each(function()\x20{\x0a\x09\x09\x09\x09\x09var\x20classes\x20=\x20\"\";\x0a\x09\x09\x09\x09\x09$.each($(this).parent().attr(\"class\").split(\"\x20\"),\x20function()\x20{\x0a\x09\x09\x09\x09\x09\x09classes\x20+=\x20this\x20+\x20\"-hitarea\x20\";\x0a\x09\x09\x09\x09\x09});\x0a\x09\x09\x09\x09\x09$(this).addClass(\x20classes\x20);\x0a\x09\x09\x09\x09})\x0a\x09\x09\x09}\x0a\x09\x09\x09\x0a\x09\x09\x09//\x20apply\x20event\x20to\x20hitarea\x0a\x09\x09\x09this.find(\"div.\"\x20+\x20CLASSES.hitarea).click(\x20toggler\x20);\x0a\x09\x09},\x0a\x09\x09treeview:\x20function(settings)\x20{\x0a\x09\x09\x09\x0a\x09\x09\x09settings\x20=\x20$.extend({\x0a\x09\x09\x09\x09cookieId:\x20\"treeview\"\x0a\x09\x09\x09},\x20settings);\x0a\x09\x09\x09\x0a\x09\x09\x09if\x20(\x20settings.toggle\x20)\x20{\x0a\x09\x09\x09\x09var\x20callback\x20=\x20settings.toggle;\x0a\x09\x09\x09\x09settings.toggle\x20=\x20function()\x20{\x0a\x09\x09\x09\x09\x09return\x20callback.apply($(this).parent()[0],\x20arguments);\x0a\x09\x09\x09\x09};\x0a\x09\x09\x09}\x0a\x09\x09\x0a\x09\x09\x09//\x20factory\x20for\x20treecontroller\x0a\x09\x09\x09function\x20treeController(tree,\x20control)\x20{\x0a\x09\x09\x09\x09//\x20factory\x20for\x20click\x20handlers\x0a\x09\x09\x09\x09function\x20handler(filter)\x20{\x0a\x09\x09\x09\x09\x09return\x20function()\x20{\x0a\x09\x09\x09\x09\x09\x09//\x20reuse\x20toggle\x20event\x20handler,\x20applying\x20the\x20elements\x20to\x20toggle\x0a\x09\x09\x09\x09\x09\x09//\x20start\x20searching\x20for\x20all\x20hitareas\x0a\x09\x09\x09\x09\x09\x09toggler.apply(\x20$(\"div.\"\x20+\x20CLASSES.hitarea,\x20tree).filter(function()\x20{\x0a\x09\x09\x09\x09\x09\x09\x09//\x20for\x20plain\x20toggle,\x20no\x20filter\x20is\x20provided,\x20otherwise\x20we\x20need\x20to\x20check\x20the\x20parent\x20element\x0a\x09\x09\x09\x09\x09\x09\x09return\x20filter\x20?\x20$(this).parent(\".\"\x20+\x20filter).length\x20:\x20true;\x0a\x09\x09\x09\x09\x09\x09})\x20);\x0a\x09\x09\x09\x09\x09\x09return\x20false;\x0a\x09\x09\x09\x09\x09};\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\x09//\x20click\x20on\x20first\x20element\x20to\x20collapse\x20tree\x0a\x09\x09\x09\x09$(\"a:eq(0)\",\x20control).click(\x20handler(CLASSES.collapsable)\x20);\x0a\x09\x09\x09\x09//\x20click\x20on\x20second\x20to\x20expand\x20tree\x0a\x09\x09\x09\x09$(\"a:eq(1)\",\x20control).click(\x20handler(CLASSES.expandable)\x20);\x0a\x09\x09\x09\x09//\x20click\x20on\x20third\x20to\x20toggle\x20tree\x0a\x09\x09\x09\x09$(\"a:eq(2)\",\x20control).click(\x20handler()\x20);\x20\x0a\x09\x09\x09}\x0a\x09\x09\x0a\x09\x09\x09//\x20handle\x20toggle\x20event\x0a\x09\x09\x09function\x20toggler()\x20{\x0a\x09\x09\x09\x09$(this)\x0a\x09\x09\x09\x09\x09.parent()\x0a\x09\x09\x09\x09\x09//\x20swap\x20classes\x20for\x20hitarea\x0a\x09\x09\x09\x09\x09.find(\">.hitarea\")\x0a\x09\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.collapsableHitarea,\x20CLASSES.expandableHitarea\x20)\x0a\x09\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.lastCollapsableHitarea,\x20CLASSES.lastExpandableHitarea\x20)\x0a\x09\x09\x09\x09\x09.end()\x0a\x09\x09\x09\x09\x09//\x20swap\x20classes\x20for\x20parent\x20li\x0a\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.collapsable,\x20CLASSES.expandable\x20)\x0a\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.lastCollapsable,\x20CLASSES.lastExpandable\x20)\x0a\x09\x09\x09\x09\x09//\x20find\x20child\x20lists\x0a\x09\x09\x09\x09\x09.find(\x20\">ul\"\x20)\x0a\x09\x09\x09\x09\x09//\x20toggle\x20them\x0a\x09\x09\x09\x09\x09.heightToggle(\x20settings.animated,\x20settings.toggle\x20);\x0a\x09\x09\x09\x09if\x20(\x20settings.unique\x20)\x20{\x0a\x09\x09\x09\x09\x09$(this).parent()\x0a\x09\x09\x09\x09\x09\x09.siblings()\x0a\x09\x09\x09\x09\x09\x09//\x20swap\x20classes\x20for\x20hitarea\x0a\x09\x09\x09\x09\x09\x09.find(\">.hitarea\")\x0a\x09\x09\x09\x09\x09\x09\x09.replaceClass(\x20CLASSES.collapsableHitarea,\x20CLASSES.expandableHitarea\x20)\x0a\x09\x09\x09\x09\x09\x09\x09.replaceClass(\x20CLASSES.lastCollapsableHitarea,\x20CLASSES.lastExpandableHitarea\x20)\x0a\x09\x09\x09\x09\x09\x09.end()\x0a\x09\x09\x09\x09\x09\x09.replaceClass(\x20CLASSES.collapsable,\x20CLASSES.expandable\x20)\x0a\x09\x09\x09\x09\x09\x09.replaceClass(\x20CLASSES.lastCollapsable,\x20CLASSES.lastExpandable\x20)\x0a\x09\x09\x09\x09\x09\x09.find(\x20\">ul\"\x20)\x0a\x09\x09\x09\x09\x09\x09.heightHide(\x20settings.animated,\x20settings.toggle\x20);\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09}\x0a\x09\x09\x09this.data(\"toggler\",\x20toggler);\x0a\x09\x09\x09\x0a\x09\x09\x09function\x20serialize()\x20{\x0a\x09\x09\x09\x09function\x20binary(arg)\x20{\x0a\x09\x09\x09\x09\x09return\x20arg\x20?\x201\x20:\x200;\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\x09var\x20data\x20=\x20[];\x0a\x09\x09\x09\x09branches.each(function(i,\x20e)\x20{\x0a\x09\x09\x09\x09\x09data[i]\x20=\x20$(e).is(\":has(>ul:visible)\")\x20?\x201\x20:\x200;\x0a\x09\x09\x09\x09});\x0a\x09\x09\x09\x09$.cookie(settings.cookieId,\x20data.join(\"\"),\x20settings.cookieOptions\x20);\x0a\x09\x09\x09}\x0a\x09\x09\x09\x0a\x09\x09\x09function\x20deserialize()\x20{\x0a\x09\x09\x09\x09var\x20stored\x20=\x20$.cookie(settings.cookieId);\x0a\x09\x09\x09\x09if\x20(\x20stored\x20)\x20{\x0a\x09\x09\x09\x09\x09var\x20data\x20=\x20stored.split(\"\");\x0a\x09\x09\x09\x09\x09branches.each(function(i,\x20e)\x20{\x0a\x09\x09\x09\x09\x09\x09$(e).find(\">ul\")[\x20parseInt(data[i])\x20?\x20\"show\"\x20:\x20\"hide\"\x20]();\x0a\x09\x09\x09\x09\x09});\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09}\x0a\x09\x09\x09\x0a\x09\x09\x09//\x20add\x20treeview\x20class\x20to\x20activate\x20styles\x0a\x09\x09\x09this.addClass(\"treeview\");\x0a\x09\x09\x09\x0a\x09\x09\x09//\x20prepare\x20branches\x20and\x20find\x20all\x20tree\x20items\x20with\x20child\x20lists\x0a\x09\x09\x09var\x20branches\x20=\x20this.find(\"li\").prepareBranches(settings);\x0a\x09\x09\x09\x0a\x09\x09\x09switch(settings.persist)\x20{\x0a\x09\x09\x09case\x20\"cookie\":\x0a\x09\x09\x09\x09var\x20toggleCallback\x20=\x20settings.toggle;\x0a\x09\x09\x09\x09settings.toggle\x20=\x20function()\x20{\x0a\x09\x09\x09\x09\x09serialize();\x0a\x09\x09\x09\x09\x09if\x20(toggleCallback)\x20{\x0a\x09\x09\x09\x09\x09\x09toggleCallback.apply(this,\x20arguments);\x0a\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09};\x0a\x09\x09\x09\x09deserialize();\x0a\x09\x09\x09\x09break;\x0a\x09\x09\x09case\x20\"location\":\x0a\x09\x09\x09\x09var\x20current\x20=\x20this.find(\"a\").filter(function()\x20{\x0a\x09\x09\x09\x09\x09return\x20this.href.toLowerCase()\x20==\x20location.href.toLowerCase();\x0a\x09\x09\x09\x09});\x0a\x09\x09\x09\x09if\x20(\x20current.length\x20)\x20{\x0a\x09\x09\x09\x09\x09//\x20TODO\x20update\x20the\x20open/closed\x20classes\x0a\x09\x09\x09\x09\x09var\x20items\x20=\x20current.addClass(\"selected\").parents(\"ul,\x20li\").add(\x20current.next()\x20).show();\x0a\x09\x09\x09\x09\x09if\x20(settings.prerendered)\x20{\x0a\x09\x09\x09\x09\x09\x09//\x20if\x20prerendered\x20is\x20on,\x20replicate\x20the\x20basic\x20class\x20swapping\x0a\x09\x09\x09\x09\x09\x09items.filter(\"li\")\x0a\x09\x09\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.collapsable,\x20CLASSES.expandable\x20)\x0a\x09\x09\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.lastCollapsable,\x20CLASSES.lastExpandable\x20)\x0a\x09\x09\x09\x09\x09\x09\x09.find(\">.hitarea\")\x0a\x09\x09\x09\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.collapsableHitarea,\x20CLASSES.expandableHitarea\x20)\x0a\x09\x09\x09\x09\x09\x09\x09\x09.swapClass(\x20CLASSES.lastCollapsableHitarea,\x20CLASSES.lastExpandableHitarea\x20);\x0a\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\x09break;\x0a\x09\x09\x09}\x0a\x09\x09\x09\x0a\x09\x09\x09branches.applyClasses(settings,\x20toggler);\x0a\x09\x09\x09\x09\x0a\x09\x09\x09//\x20if\x20control\x20option\x20is\x20set,\x20create\x20the\x20treecontroller\x20and\x20show\x20it\x0a\x09\x09\x09if\x20(\x20settings.control\x20)\x20{\x0a\x09\x09\x09\x09treeController(this,\x20settings.control);\x0a\x09\x09\x09\x09$(settings.control).show();\x0a\x09\x09\x09}\x0a\x09\x09\x09\x0a\x09\x09\x09return\x20this;\x0a\x09\x09}\x0a\x09});\x0a\x09\x0a\x09//\x20classes\x20used\x20by\x20the\x20plugin\x0a\x09//\x20need\x20to\x20be\x20styled\x20via\x20external\x20stylesheet,\x20see\x20first\x20example\x0a\x09$.treeview\x20=\x20{};\x0a\x09var\x20CLASSES\x20=\x20($.treeview.classes\x20=\x20{\x0a\x09\x09open:\x20\"open\",\x0a\x09\x09closed:\x20\"closed\",\x0a\x09\x09expandable:\x20\"expandable\",\x0a\x09\x09expandableHitarea:\x20\"expandable-hitarea\",\x0a\x09\x09lastExpandableHitarea:\x20\"lastExpandable-hitarea\",\x0a\x09\x09collapsable:\x20\"collapsable\",\x0a\x09\x09collapsableHitarea:\x20\"collapsable-hitarea\",\x0a\x09\x09lastCollapsableHitarea:\x20\"lastCollapsable-hitarea\",\x0a\x09\x09lastCollapsable:\x20\"lastCollapsable\",\x0a\x09\x09lastExpandable:\x20\"lastExpandable\",\x0a\x09\x09last:\x20\"last\",\x0a\x09\x09hitarea:\x20\"hitarea\"\x0a\x09});\x0a\x09\x0a})(jQuery);\x0a", - "analysis/typeinfo-src.png": "\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x02\xc1\x00\x00\x01\xb3\b\x03\x00\x00\x00\xf9m:\x11\x00\x00\x00\x01sRGB\x00\xae\xce\x1c\xe9\x00\x00\x02\xfdPLTE\x00\x01\x00\n\x03\x01\x05\a\x03\x02\r\x14\n\f\b\x10\x12\x0e\x0f\x13\x1e\x1b\x1a\x14 \x1f\x19\x1c \"\x17!;!# #$\"$%#&'%'(&+)\x1e()'\x18-T*,)/,!-/,12053'35386*6758:7<:.<>;>@=CA5&CxAB@EFDIJH\x00g\x00KLJ\x00j\x026NzNOM0R\x95\x06m\x06UP?PRO>V\x82\x0fq\vTVS\rr\x17\\WEVXU,`\xae7]\xad\x15w\x1c[]Z8`\xaa\x19y\x1e;b\xac_a^=d\xae?f\xb0*{!bdaSe\x84)}+Bh\xb3efdDi\xb4ghfLj\xafpiQEm\xb1ikh0\x820Ol\xb2Ip\xb4lnkTp\xa3Kr\xb7npm6\x869Nt\xb9zs[Wu\xb5>\x89=strZx\xb9vwt]{\xbbG\x8eHy{xX\x80\xbf^\u007f\xb9\x85}ea\u007f\xbf}\u007f|O\x93N\u007f\x81~c\x84\xbeW\x95V\x82\x84\x81m\x87\xbch\x88Ð\x86h[\x99Zj\x8ać\x88\x85q\x8b\xc1\x8a\x8c\x89`\x9dd\x96\x8cnt\x8e\xc4z\x8f\xbf\x8f\x91\x8eg\xa1hy\x93\xc9~\x93\xc4x\x95Ē\x94\x91\x81\x95Ɵ\x95w{\x98ǃ\x98ɂ\x9aė\x99\x96u\xa8v\x86\x9b̀\x9d̙\x9b\x98\xa5\x9b|\x85\x9eȂ\xa0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03\xe6\x06\f\x06\xcc\r\x18\f\x98\x1b\x13\x18\\\x88\xec\xcb\xe1\x961@\a\x13\x18\xdc\xef\xadϴ\x1b\xfe\x17?\x01\x93`\xb4\xc1\xa1\xa9SA\x01T\xdaK\xa1n\x11\x00\xb40\xd8`\x8d\xd4)u\x00\x956\x93\x94+\x02L\x03\x8c5X+uJ\x1d@\xa5\r\x18\f\xe8a\xa8\xc1\x9a\xa9S`00\x11\f5X3u*\x1a\x83{\xa2\xbb\xff\f\x98\x81\x18j\xb0\xa8\x95:\xc5\aP\xe91l\xcf\xe9\xe8K@&\n0\xf5I\x90\xc1\\\xea\x147\xa9O\x1bBhQ\xb8\x06\xc0L%A\x06+\xa9S\xaaI=|\xf6\xf4\xda\xf6\xc8\xc5\x060\x03I\x94\xc1\x8c\x8eV\xad\xc9P:Q{\x98W\x81\x99L\x82\f\xe6R\xa7\xb8I]\xe0X\x04\xa0G\x82\f\xe6R\xa7\x82\x03\xa8\xb4\x00\x83\x01=\f5X3uJ\x1d@\xa5\r\x18\f\xe8a\xa8\xc1کS\xaa\x00*\r\x86\xfb\xbb\n\xad\x86G\xb3\x02&\xc1P\x83\xc7\xc7\x12\x84\xd2\xc3\xed\xe6\x013\x1a\x13\x18\xdc\xdf\r\xc7\xd1\x00]L`0\x00\x84\x01\f\x06\xcc\r\x18\f\x98\x1b0\x1807`0`n\xc0`\xc0܀\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\f\x06\xcc\r\x18\f\x98\x1b0\x1807F\x1b\x1c\x9a:\x85\xe9m\xabo\xee\n\xb3\x10\x00\xe8b\xb0\xc1\x1a\xa9S\xe2p\xbb\xbb\xf3L\x97\xfbL\xb8\xe5\x00@\ac\r\xd6J\x9d\x12\xdb\xeb\xfa\x89\xda\x10\xb0\n\x8c\aC\r\xd6L\x9d\xeaw\xd3;\xe4 ^\x15\x18\x17\x86\x1a\xac\x99:\xd5Y\x17.w\x15\x00\xc2c\xa8\xc1\xa2V\xeaT\xab\xa7\xb75R\xea\x14\x00\xe8\x91 \x83\xb9\xa8\xa9f:\xd9\xd4\f#10\x1e\x12d0\x175婋\x9c:\x05\x00z$\xca`\x06\x89\x9a\xf2\xb2\xfb\x90\xbdp;20\x1e\x12d0\x175\xd5U?\xc2\xcd\x01\x80\xd8H\x90\xc1\\\xd4\xd4\x10=\x9a\xe6\x93\x0f\xb3\x01@l\x18j\xb0f\xea\x94\xd8U\xd7\xd5\xd7\xd3\xd8\n{r\xc0x0\xd4`\xed\xd4)\xf1Lk\xfd\xfe.\x10\x18\x18\x17\x86\x1a\f\x00q\a\f\x06\xcc\r\x18\f\x98\x1b0\x1807`0`n\xc0`\xc0܀\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\f\x06\xcc\r\x18\f\x98\x1b0x*0\x12\xa9\x01\xa0\v\x18\x9cp\xfaK\xd2ВH\x8d\x00=\xc0\xe0\x84\x93\x99\xe9n\x87\xbf76n\x8c68$uj\xb8\x91]r\xe9n\x8a\xb0\xe4$s\xbc\xe8X\xa4&\x93C\x0fj\x8b\xd4\x04\b\x83\xc1\x06\x87\xa6N\xf9\xdc]d\xaa\xcb\x1d\xe6/\x83{\xbb\xf4_\x8b\x17\xc7\xf2\x8fDj\xa2A,[\xa6Ӷ\vuh\xce\a\xa2\xc3X\x83\xb5R\xa7\xd8]ˍ\xe1~\x8ds\vü\x18/\xaeDj\xa0E,[\xa6\xd3\x16\xfe\xea\xf9\xc40\xd4`\xcd\xd4)\x8ag\u007f\xb8{4f\xc7\xe0\x89\xb1IJe:m\xc1\xe0\x89\xf1g\x1b\x00\xc0\xccL`\f\x06\x80)\x00\x18\f\x98\x1b0\x1807`0`n\xc0`\xc0܀\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\f\x06\xcc\r\x18\f\x98\x1b0\x1807`0`n\xc0`\xc0܀\xc1\x80\xb9\x01\x83\x01s\x03\x06\x03\xe6\x06\f\x06\xcc\r\x18\f\x98\x1b0\x1807`0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xbfʊ\xa5g\x05\xa5\xc4\xdd^T\xb0\xf6~\xf9iĄ4`r\x88l\xb0k\xa2\xa1f\nS57m\x80FݰJV\xd3`e\xc5x\f\xfe0\xb0\xdc\xf6\xa2\x8f?+\x90\x8f\xe1ELH\x03&\x87\xa8\r\x1e\u007f\xa8\x19\xc7T\xcdM[J\xa4\u07fb\x94h\xa7i0\xb7\xe2\x9b\xc5[\xc8{h \x9f\x0fr4\xed\xacS6:bB\x1a0)@n\x1a\xe1\x84\xd0p\xf6\xfb\xe4u~m\\\x16\x1a\xb7b\xe9\x9ck\xddѳ\r\xb8\x0e\xbf>P\x85\xdb\xde\xdc^|\x8e^\xe9\x111!\r\x98\x14 7\x8d5\xa8Z\\E^\xe7\xd7\xc6e\xa1\xf1+\x96\xfe\xf0`iA\xd5)z]\x84 |p\x02?\x0a\x09\x0a\x09\x09\xe2\x96\xb9\x20Method\x20set

    \x0a\x09
    \x0a\x09\x0a\x09\x09\xe2\x96\xbe\x20Method\x20set

    \x0a\x09\x09...\x0a\x09\x0a\x0a", - "callgraph.html": ` -`, + "opensearch.xml": "\x0a\x0a\x20\x20godoc\x0a\x20\x20The\x20Go\x20Programming\x20Language\x0a\x20\x20go\x20golang\x0a\x20\x20\x0a\x20\x20\x0a\x20\x20/favicon.ico\x0a\x20\x20UTF-8\x0a\x20\x20UTF-8\x0a\x0a", - "codewalk.html": ` + "package.html": "\x0a\x0a{{with\x20.PDoc}}\x0a\x09\x0a\x09document.ANALYSIS_DATA\x20=\x20{{$.AnalysisData}};\x0a\x09document.CALLGRAPH\x20=\x20{{$.CallGraph}};\x0a\x09\x0a\x0a\x09{{if\x20$.IsMain}}\x0a\x09\x09{{/*\x20command\x20documentation\x20*/}}\x0a\x09\x09{{comment_html\x20.Doc}}\x0a\x09{{else}}\x0a\x09\x09{{/*\x20package\x20documentation\x20*/}}\x0a\x09\x09\x0a\x09\x09\x09
    \x0a\x09\x09\x09
    import\x20\"{{html\x20.ImportPath}}\"
    \x0a\x09\x09\x09
    \x0a\x09\x09\x09
    \x0a\x09\x09\x09
    Overview
    \x0a\x09\x09\x09
    Index
    \x0a\x09\x09\x09{{if\x20$.Examples}}\x0a\x09\x09\x09\x09
    Examples
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09{{if\x20$.Dirs}}\x0a\x09\x09\x09\x09
    Subdirectories
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09
    \x0a\x09\x09\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09\x09Overview\x20\xe2\x96\xb9\x0a\x09\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09\x09Overview\x20\xe2\x96\xbe\x0a\x09\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09\x09{{example_html\x20$\x20\"\"}}\x0a\x09\x09\x09\x0a\x09\x09\x0a\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09\x09Index\x20\xe2\x96\xb9\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09\x09Index\x20\xe2\x96\xbe\x0a\x0a\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09
    \x0a\x09\x09\x09{{if\x20.Consts}}\x0a\x09\x09\x09\x09
    Constants
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09{{if\x20.Vars}}\x0a\x09\x09\x09\x09
    Variables
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09{{range\x20.Funcs}}\x0a\x09\x09\x09\x09{{$name_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20false\x20|\x20sanitize}}
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09{{range\x20.Types}}\x0a\x09\x09\x09\x09{{$tname_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09\x09
    type\x20{{$tname_html}}
    \x0a\x09\x09\x09\x09{{range\x20.Funcs}}\x0a\x09\x09\x09\x09\x09{{$name_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09\x09\x09
     \x20 \x20{{node_html\x20$\x20.Decl\x20false\x20|\x20sanitize}}
    \x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09{{range\x20.Methods}}\x0a\x09\x09\x09\x09\x09{{$name_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09\x09\x09
     \x20 \x20{{node_html\x20$\x20.Decl\x20false\x20|\x20sanitize}}
    \x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09{{if\x20$.Notes}}\x0a\x09\x09\x09\x09{{range\x20$marker,\x20$item\x20:=\x20$.Notes}}\x0a\x09\x09\x09\x09
    {{noteTitle\x20$marker\x20|\x20html}}s
    \x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09
    \x0a\x09\x09\x09\x0a\x0a\x09\x09{{if\x20$.Examples}}\x0a\x09\x09\x0a\x09\x09\x09

    Examples

    \x0a\x09\x09\x09(Expand\x20All)\x0a\x09\x09\x09
    \x0a\x09\x09\x09{{range\x20$.Examples}}\x0a\x09\x09\x09
    {{example_name\x20.Name}}
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09
    \x0a\x09\x09\x0a\x09\x09{{end}}\x0a\x0a\x09\x09{{with\x20.Filenames}}\x0a\x09\x09\x09

    Package\x20files

    \x0a\x09\x09\x09

    \x0a\x09\x09\x09\x0a\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09\x09{{.|filename|html}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09\x0a\x09\x09\x09

    \x0a\x09\x09{{end}}\x0a\x09\x09\x0a\x09\x09\x0a\x0a\x09\x09\x0a\x09\x09\x0a\x09\x09\x09Internal\x20call\x20graph\x20\xe2\x96\xb9\x0a\x09\x09\x20\x0a\x09\x09\x0a\x09\x09\x09Internal\x20call\x20graph\x20\xe2\x96\xbe\x0a\x09\x09\x09

    \x0a\x09\x09\x09\x20\x20In\x20the\x20call\x20graph\x20viewer\x20below,\x20each\x20node\x0a\x09\x09\x09\x20\x20is\x20a\x20function\x20belonging\x20to\x20this\x20package\x0a\x09\x09\x09\x20\x20and\x20its\x20children\x20are\x20the\x20functions\x20it\x0a\x09\x09\x09\x20\x20calls—perhaps\x20dynamically.\x0a\x09\x09\x09

    \x0a\x09\x09\x09

    \x0a\x09\x09\x09\x20\x20The\x20root\x20nodes\x20are\x20the\x20entry\x20points\x20of\x20the\x0a\x09\x09\x09\x20\x20package:\x20functions\x20that\x20may\x20be\x20called\x20from\x0a\x09\x09\x09\x20\x20outside\x20the\x20package.\x0a\x09\x09\x09\x20\x20There\x20may\x20be\x20non-exported\x20or\x20anonymous\x0a\x09\x09\x09\x20\x20functions\x20among\x20them\x20if\x20they\x20are\x20called\x0a\x09\x09\x09\x20\x20dynamically\x20from\x20another\x20package.\x0a\x09\x09\x09

    \x0a\x09\x09\x09

    \x0a\x09\x09\x09\x20\x20Click\x20a\x20node\x20to\x20visit\x20that\x20function's\x20source\x20code.\x0a\x09\x09\x09\x20\x20From\x20there\x20you\x20can\x20visit\x20its\x20callers\x20by\x0a\x09\x09\x09\x20\x20clicking\x20its\x20declaring\x20func\x0a\x09\x09\x09\x20\x20token.\x0a\x09\x09\x09

    \x0a\x09\x09\x09

    \x0a\x09\x09\x09\x20\x20Functions\x20may\x20be\x20omitted\x20if\x20they\x20were\x0a\x09\x09\x09\x20\x20determined\x20to\x20be\x20unreachable\x20in\x20the\x0a\x09\x09\x09\x20\x20particular\x20programs\x20or\x20tests\x20that\x20were\x0a\x09\x09\x09\x20\x20analyzed.\x0a\x09\x09\x09

    \x0a\x09\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x0a\x09\x09\x20\x0a\x0a\x09\x09{{with\x20.Consts}}\x0a\x09\x09\x09Constants\x0a\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09\x09{{with\x20.Vars}}\x0a\x09\x09\x09Variables\x0a\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09\x09{{range\x20.Funcs}}\x0a\x09\x09\x09{{/*\x20Name\x20is\x20a\x20string\x20-\x20no\x20need\x20for\x20FSet\x20*/}}\x0a\x09\x09\x09{{$name_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09func\x20{{$name_html}}\x0a\x09\x09\x09\x09¶\x0a\x09\x09\x09\x09{{$since\x20:=\x20since\x20\"func\"\x20\"\"\x20.Name\x20$.PDoc.ImportPath}}\x0a\x09\x09\x09\x09{{if\x20$since}}{{$since}}{{end}}\x0a\x09\x09\x09\x0a\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09{{example_html\x20$\x20.Name}}\x0a\x09\x09\x09{{callgraph_html\x20$\x20\"\"\x20.Name}}\x0a\x0a\x09\x09{{end}}\x0a\x09\x09{{range\x20.Types}}\x0a\x09\x09\x09{{$tname\x20:=\x20.Name}}\x0a\x09\x09\x09{{$tname_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09type\x20{{$tname_html}}\x0a\x09\x09\x09\x09¶\x0a\x09\x09\x09\x09{{$since\x20:=\x20since\x20\"type\"\x20\"\"\x20.Name\x20$.PDoc.ImportPath}}\x0a\x09\x09\x09\x09{{if\x20$since}}{{$since}}{{end}}\x0a\x09\x09\x09\x0a\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x0a\x09\x09\x09{{range\x20.Consts}}\x0a\x09\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x09\x09\x09{{end}}\x0a\x0a\x09\x09\x09{{range\x20.Vars}}\x0a\x09\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x09\x09\x09{{end}}\x0a\x0a\x09\x09\x09{{example_html\x20$\x20$tname}}\x0a\x09\x09\x09{{implements_html\x20$\x20$tname}}\x0a\x09\x09\x09{{methodset_html\x20$\x20$tname}}\x0a\x0a\x09\x09\x09{{range\x20.Funcs}}\x0a\x09\x09\x09\x09{{$name_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09\x09func\x20{{$name_html}}\x0a\x09\x09\x09\x09\x09¶\x0a\x09\x09\x09\x09\x09{{$since\x20:=\x20since\x20\"func\"\x20\"\"\x20.Name\x20$.PDoc.ImportPath}}\x0a\x09\x09\x09\x09\x09{{if\x20$since}}{{$since}}{{end}}\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x09\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09\x09{{example_html\x20$\x20.Name}}\x0a\x09\x09\x09\x09{{callgraph_html\x20$\x20\"\"\x20.Name}}\x0a\x09\x09\x09{{end}}\x0a\x0a\x09\x09\x09{{range\x20.Methods}}\x0a\x09\x09\x09\x09{{$name_html\x20:=\x20html\x20.Name}}\x0a\x09\x09\x09\x09func\x20({{html\x20.Recv}})\x20{{$name_html}}\x0a\x09\x09\x09\x09\x09¶\x0a\x09\x09\x09\x09\x09{{$since\x20:=\x20since\x20\"method\"\x20.Recv\x20.Name\x20$.PDoc.ImportPath}}\x0a\x09\x09\x09\x09\x09{{if\x20$since}}{{$since}}{{end}}\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09
    {{node_html\x20$\x20.Decl\x20true}}
    \x0a\x09\x09\x09\x09{{comment_html\x20.Doc}}\x0a\x09\x09\x09\x09{{$name\x20:=\x20printf\x20\"%s_%s\"\x20$tname\x20.Name}}\x0a\x09\x09\x09\x09{{example_html\x20$\x20$name}}\x0a\x09\x09\x09\x09{{callgraph_html\x20$\x20.Recv\x20.Name}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a\x0a\x09{{with\x20$.Notes}}\x0a\x09\x09{{range\x20$marker,\x20$content\x20:=\x20.}}\x0a\x09\x09\x09{{noteTitle\x20$marker\x20|\x20html}}s\x0a\x09\x09\x09\x0a\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09
  • ☞\x20{{comment_html\x20.Body}}
  • \x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.PAst}}\x0a\x09{{range\x20$filename,\x20$ast\x20:=\x20.}}\x0a\x09\x09{{$filename|filename|html}}:
    {{node_html\x20$\x20$ast\x20false}}
    \x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.Dirs}}\x0a\x09{{/*\x20DirList\x20entries\x20are\x20numbers\x20and\x20strings\x20-\x20no\x20need\x20for\x20FSet\x20*/}}\x0a\x09{{if\x20$.PDoc}}\x0a\x09\x09Subdirectories\x0a\x09{{end}}\x0a\x09\x0a\x09\x09
    \x0a\x09\x09\x09\x0a\x09\x09\x09\x09Name\x0a\x09\x09\x09\x09Synopsis\x0a\x09\x09\x09\x0a\x0a\x09\x09\x09{{if\x20not\x20((eq\x20$.Dirname\x20\"/src/cmd\")\x20$.DirFlat)}}\x0a\x09\x09\x09\x0a\x09\x09\x09\x09..\x0a\x09\x09\x09\x0a\x09\x09\x09{{end}}\x0a\x0a\x09\x09\x09{{range\x20.List}}\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09{{if\x20$.DirFlat}}\x0a\x09\x09\x09\x09\x09{{if\x20.HasPkg}}\x0a\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09{{html\x20.Path}}\x0a\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09{{else}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09{{html\x20.Name}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09{{html\x20.Synopsis}}\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x0a\x09\x09\x09{{end}}\x0a\x09\x09
    \x0a\x09\x0a{{end}}\x0a", - - + "packageroot.html": "\x0a\x0a{{with\x20.PAst}}\x0a\x09{{range\x20$filename,\x20$ast\x20:=\x20.}}\x0a\x09\x09{{$filename|filename|html}}:
    {{node_html\x20$\x20$ast\x20false}}
    \x0a\x09{{end}}\x0a{{end}}\x0a\x0a{{with\x20.Dirs}}\x0a\x09{{/*\x20DirList\x20entries\x20are\x20numbers\x20and\x20strings\x20-\x20no\x20need\x20for\x20FSet\x20*/}}\x0a\x09{{if\x20$.PDoc}}\x0a\x09\x09Subdirectories\x0a\x09{{end}}\x0a\x09\x09\x0a\x09\x09\x09
    \x0a\x09\x09\x09\x09
    Standard\x20library
    \x0a\x09\x09\x09\x09{{if\x20hasThirdParty\x20.List\x20}}\x0a\x09\x09\x09\x09\x09
    Third\x20party
    \x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09
    Other\x20packages
    \x0a\x09\x09\x09\x09
    Sub-repositories
    \x0a\x09\x09\x09\x09
    Community
    \x0a\x09\x09\x09
    \x0a\x09\x09\x0a\x0a\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09\x09Standard\x20library\x20\xe2\x96\xb9\x0a\x09\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09\x09Standard\x20library\x20\xe2\x96\xbe\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09Name\x0a\x09\x09\x09\x09\x09\x09\x09Synopsis\x0a\x09\x09\x09\x09\x09\x09\x0a\x0a\x09\x09\x09\x09\x09\x09{{range\x20.List}}\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09{{if\x20eq\x20.RootType\x20\"GOROOT\"}}\x0a\x09\x09\x09\x09\x09\x09\x09{{if\x20$.DirFlat}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20.HasPkg}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Path}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09{{else}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Name}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Synopsis}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09
    \x0a\x09\x09\x09\x09\x20\x0a\x09\x09\x09\x20\x0a\x09\x09\x20\x0a\x0a\x09{{if\x20hasThirdParty\x20.List\x20}}\x0a\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09\x09Third\x20party\x20\xe2\x96\xb9\x0a\x09\x09\x09\x0a\x09\x09\x09\x0a\x09\x09\x09\x09Third\x20party\x20\xe2\x96\xbe\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09Name\x0a\x09\x09\x09\x09\x09\x09\x09Synopsis\x0a\x09\x09\x09\x09\x09\x09\x0a\x0a\x09\x09\x09\x09\x09\x09{{range\x20.List}}\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20eq\x20.RootType\x20\"GOPATH\"}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20$.DirFlat}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09{{if\x20.HasPkg}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Path}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{else}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Name}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x09{{html\x20.Synopsis}}\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09
    \x0a\x09\x09\x09\x09\x20\x0a\x09\x09\x09\x20\x0a\x09\x09\x20\x0a\x09{{end}}\x0a\x0a\x09Other\x20packages\x0a\x09Sub-repositories\x0a\x09

    \x0a\x09These\x20packages\x20are\x20part\x20of\x20the\x20Go\x20Project\x20but\x20outside\x20the\x20main\x20Go\x20tree.\x0a\x09They\x20are\x20developed\x20under\x20looser\x20compatibility\x20requirements\x20than\x20the\x20Go\x20core.\x0a\x09Install\x20them\x20with\x20\"go\x20get\".\x0a\x09

    \x0a\x09
      \x0a\x09\x09
    • benchmarks\x20\xe2\x80\x94\x20benchmarks\x20to\x20measure\x20Go\x20as\x20it\x20is\x20developed.
    • \x0a\x09\x09
    • blog\x20\xe2\x80\x94\x20blog.golang.org's\x20implementation.
    • \x0a\x09\x09
    • build\x20\xe2\x80\x94\x20build.golang.org's\x20implementation.
    • \x0a\x09\x09
    • crypto\x20\xe2\x80\x94\x20additional\x20cryptography\x20packages.
    • \x0a\x09\x09
    • debug\x20\xe2\x80\x94\x20an\x20experimental\x20debugger\x20for\x20Go.
    • \x0a\x09\x09
    • image\x20\xe2\x80\x94\x20additional\x20imaging\x20packages.
    • \x0a\x09\x09
    • mobile\x20\xe2\x80\x94\x20experimental\x20support\x20for\x20Go\x20on\x20mobile\x20platforms.
    • \x0a\x09\x09
    • net\x20\xe2\x80\x94\x20additional\x20networking\x20packages.
    • \x0a\x09\x09
    • perf\x20\xe2\x80\x94\x20packages\x20and\x20tools\x20for\x20performance\x20measurement,\x20storage,\x20and\x20analysis.
    • \x0a\x09\x09
    • review\x20\xe2\x80\x94\x20a\x20tool\x20for\x20working\x20with\x20Gerrit\x20code\x20reviews.
    • \x0a\x09\x09
    • sync\x20\xe2\x80\x94\x20additional\x20concurrency\x20primitives.
    • \x0a\x09\x09
    • sys\x20\xe2\x80\x94\x20packages\x20for\x20making\x20system\x20calls.
    • \x0a\x09\x09
    • text\x20\xe2\x80\x94\x20packages\x20for\x20working\x20with\x20text.
    • \x0a\x09\x09
    • time\x20\xe2\x80\x94\x20additional\x20time\x20packages.
    • \x0a\x09\x09
    • tools\x20\xe2\x80\x94\x20godoc,\x20goimports,\x20gorename,\x20and\x20other\x20tools.
    • \x0a\x09\x09
    • tour\x20\xe2\x80\x94\x20tour.golang.org's\x20implementation.
    • \x0a\x09\x09
    • exp\x20\xe2\x80\x94\x20experimental\x20and\x20deprecated\x20packages\x20(handle\x20with\x20care;\x20may\x20change\x20without\x20warning).
    • \x0a\x09
    \x0a\x0a\x09Community\x0a\x09

    \x0a\x09These\x20services\x20can\x20help\x20you\x20find\x20Open\x20Source\x20packages\x20provided\x20by\x20the\x20community.\x0a\x09

    \x0a\x09
      \x0a\x09\x09
    • GoDoc\x20-\x20a\x20package\x20index\x20and\x20search\x20engine.
    • \x0a\x09\x09
    • Go\x20Search\x20-\x20a\x20code\x20search\x20engine.
    • \x0a\x09\x09
    • Projects\x20at\x20the\x20Go\x20Wiki\x20-\x20a\x20curated\x20list\x20of\x20Go\x20projects.
    • \x0a\x09
    \x0a{{end}}\x0a", -
    -
    -
    -
    -
    - - Pop Out Code - - -
    -
    - -
    -
    -
    - code on leftright - code width 70% - filepaths shownhidden -
    -
    -
    -
    - {{range .Step}} -
    - -
    {{html .Title}}
    -
    - {{with .Err}} - ERROR LOADING FILE: {{html .}}

    - {{end}} - {{.XML}} -
    -
    {{html .}}
    -
    - {{end}} -
    -
    - previous step - • - next step -
    -
    -
    -`, + "package.txt": "{{$info\x20:=\x20.}}{{$filtered\x20:=\x20.IsFiltered}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20$filtered}}{{range\x20.PAst}}{{range\x20.Decls}}{{node\x20$info\x20.}}\x0a\x0a{{end}}{{end}}{{else}}{{with\x20.PAst}}{{range\x20$filename,\x20$ast\x20:=\x20.}}{{$filename}}:\x0a{{node\x20$\x20$ast}}{{end}}{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20and\x20$filtered\x20(not\x20(or\x20.PDoc\x20.PAst))}}No\x20match\x20found.\x0a{{end}}{{with\x20.PDoc}}{{if\x20$.IsMain}}COMMAND\x20DOCUMENTATION\x0a\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{else}}{{if\x20not\x20$filtered}}PACKAGE\x20DOCUMENTATION\x0a\x0apackage\x20{{.Name}}\x0a\x20\x20\x20\x20import\x20\"{{.ImportPath}}\"\x0a\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{example_text\x20$\x20\"\"\x20\"\x20\x20\x20\x20\"}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Consts}}{{if\x20not\x20$filtered}}CONSTANTS\x0a\x0a{{end}}{{range\x20.}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Vars}}{{if\x20not\x20$filtered}}VARIABLES\x0a\x0a{{end}}{{range\x20.}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Funcs}}{{if\x20not\x20$filtered}}FUNCTIONS\x0a\x0a{{end}}{{range\x20.}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{example_text\x20$\x20.Name\x20\"\x20\x20\x20\x20\"}}{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Types}}{{if\x20not\x20$filtered}}TYPES\x0a\x0a{{end}}{{range\x20.}}{{$tname\x20:=\x20.Name}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20.Consts}}{{range\x20.Consts}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20.Vars}}{{range\x20.Vars}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{range\x20$name\x20:=\x20.Names}}{{example_text\x20$\x20$name\x20\"\x20\x20\x20\x20\"}}{{end}}{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20.Funcs}}{{range\x20.Funcs}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{example_text\x20$\x20.Name\x20\"\x20\x20\x20\x20\"}}{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20.Methods}}{{range\x20.Methods}}{{node\x20$\x20.Decl}}\x0a{{comment_text\x20.Doc\x20\"\x20\x20\x20\x20\"\x20\"\\t\"}}\x0a{{$name\x20:=\x20printf\x20\"%s_%s\"\x20$tname\x20.Name}}{{example_text\x20$\x20$name\x20\"\x20\x20\x20\x20\"}}{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20and\x20$filtered\x20(not\x20(or\x20.Consts\x20(or\x20.Vars\x20(or\x20.Funcs\x20.Types))))}}No\x20match\x20found.\x0a{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20$.Notes}}\x0a{{range\x20$marker,\x20$content\x20:=\x20.}}\x0a{{$marker}}S\x0a\x0a{{range\x20$content}}{{comment_text\x20.Body\x20\"\x20\x20\x20\"\x20\"\\t\"}}\x0a{{end}}{{end}}{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20not\x20$filtered}}{{with\x20.Dirs}}SUBDIRECTORIES\x0a{{if\x20$.DirFlat}}{{range\x20.List}}{{if\x20.HasPkg}}\x0a\x09{{.Path}}{{end}}{{end}}\x0a{{else}}{{range\x20.List}}\x0a\x09{{repeat\x20`.\x20`\x20.Depth}}{{.Name}}{{end}}\x0a{{end}}{{end}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{end}}{{/*\x0aMake\x20sure\x20there\x20is\x20no\x20newline\x20at\x20the\x20end\x20of\x20this\x20file.\x0aperl\x20-i\x20-pe\x20'chomp\x20if\x20eof'\x20package.txt\x0a*/}}\x0a", - "codewalkdir.html": ` + "play.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0afunction\x20initPlayground(transport)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09function\x20text(node)\x20{\x0a\x09\x09var\x20s\x20=\x20'';\x0a\x09\x09for\x20(var\x20i\x20=\x200;\x20i\x20<\x20node.childNodes.length;\x20i++)\x20{\x0a\x09\x09\x09var\x20n\x20=\x20node.childNodes[i];\x0a\x09\x09\x09if\x20(n.nodeType\x20===\x201)\x20{\x0a\x09\x09\x09\x09if\x20(n.tagName\x20===\x20'BUTTON')\x20continue\x0a\x09\x09\x09\x09if\x20(n.tagName\x20===\x20'SPAN'\x20&&\x20n.className\x20===\x20'number')\x20continue;\x0a\x09\x09\x09\x09if\x20(n.tagName\x20===\x20'DIV'\x20||\x20n.tagName\x20==\x20'BR')\x20{\x0a\x09\x09\x09\x09\x09s\x20+=\x20\"\\n\";\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\x09s\x20+=\x20text(n);\x0a\x09\x09\x09\x09continue;\x0a\x09\x09\x09}\x0a\x09\x09\x09if\x20(n.nodeType\x20===\x203)\x20{\x0a\x09\x09\x09\x09s\x20+=\x20n.nodeValue;\x0a\x09\x09\x09}\x0a\x09\x09}\x0a\x09\x09return\x20s.replace('\\xA0',\x20'\x20');\x20//\x20replace\x20non-breaking\x20spaces\x0a\x09}\x0a\x0a\x09//\x20When\x20presenter\x20notes\x20are\x20enabled,\x20the\x20index\x20passed\x0a\x09//\x20here\x20will\x20identify\x20the\x20playground\x20to\x20be\x20synced\x0a\x09function\x20init(code,\x20index)\x20{\x0a\x09\x09var\x20output\x20=\x20document.createElement('div');\x0a\x09\x09var\x20outpre\x20=\x20document.createElement('pre');\x0a\x09\x09var\x20running;\x0a\x0a\x09\x09if\x20($\x20&&\x20$(output).resizable)\x20{\x0a\x09\x09\x09$(output).resizable({\x0a\x09\x09\x09\x09handles:\x20\x09'n,w,nw',\x0a\x09\x09\x09\x09minHeight:\x0927,\x0a\x09\x09\x09\x09minWidth:\x09135,\x0a\x09\x09\x09\x09maxHeight:\x09608,\x0a\x09\x09\x09\x09maxWidth:\x09990\x0a\x09\x09\x09});\x0a\x09\x09}\x0a\x0a\x09\x09function\x20onKill()\x20{\x0a\x09\x09\x09if\x20(running)\x20running.Kill();\x0a\x09\x09\x09if\x20(window.notesEnabled)\x20updatePlayStorage('onKill',\x20index);\x0a\x09\x09}\x0a\x0a\x09\x09function\x20onRun(e)\x20{\x0a\x09\x09\x09var\x20sk\x20=\x20e.shiftKey\x20||\x20localStorage.getItem('play-shiftKey')\x20===\x20'true';\x0a\x09\x09\x09if\x20(running)\x20running.Kill();\x0a\x09\x09\x09output.style.display\x20=\x20'block';\x0a\x09\x09\x09outpre.innerHTML\x20=\x20'';\x0a\x09\x09\x09run1.style.display\x20=\x20'none';\x0a\x09\x09\x09var\x20options\x20=\x20{Race:\x20sk};\x0a\x09\x09\x09running\x20=\x20transport.Run(text(code),\x20PlaygroundOutput(outpre),\x20options);\x0a\x09\x09\x09if\x20(window.notesEnabled)\x20updatePlayStorage('onRun',\x20index,\x20e);\x0a\x09\x09}\x0a\x0a\x09\x09function\x20onClose()\x20{\x0a\x09\x09\x09if\x20(running)\x20running.Kill();\x0a\x09\x09\x09output.style.display\x20=\x20'none';\x0a\x09\x09\x09run1.style.display\x20=\x20'inline-block';\x0a\x09\x09\x09if\x20(window.notesEnabled)\x20updatePlayStorage('onClose',\x20index);\x0a\x09\x09}\x0a\x0a\x09\x09if\x20(window.notesEnabled)\x20{\x0a\x09\x09\x09playgroundHandlers.onRun.push(onRun);\x0a\x09\x09\x09playgroundHandlers.onClose.push(onClose);\x0a\x09\x09\x09playgroundHandlers.onKill.push(onKill);\x0a\x09\x09}\x0a\x0a\x09\x09var\x20run1\x20=\x20document.createElement('button');\x0a\x09\x09run1.innerHTML\x20=\x20'Run';\x0a\x09\x09run1.className\x20=\x20'run';\x0a\x09\x09run1.addEventListener(\"click\",\x20onRun,\x20false);\x0a\x09\x09var\x20run2\x20=\x20document.createElement('button');\x0a\x09\x09run2.className\x20=\x20'run';\x0a\x09\x09run2.innerHTML\x20=\x20'Run';\x0a\x09\x09run2.addEventListener(\"click\",\x20onRun,\x20false);\x0a\x09\x09var\x20kill\x20=\x20document.createElement('button');\x0a\x09\x09kill.className\x20=\x20'kill';\x0a\x09\x09kill.innerHTML\x20=\x20'Kill';\x0a\x09\x09kill.addEventListener(\"click\",\x20onKill,\x20false);\x0a\x09\x09var\x20close\x20=\x20document.createElement('button');\x0a\x09\x09close.className\x20=\x20'close';\x0a\x09\x09close.innerHTML\x20=\x20'Close';\x0a\x09\x09close.addEventListener(\"click\",\x20onClose,\x20false);\x0a\x0a\x09\x09var\x20button\x20=\x20document.createElement('div');\x0a\x09\x09button.classList.add('buttons');\x0a\x09\x09button.appendChild(run1);\x0a\x09\x09//\x20Hack\x20to\x20simulate\x20insertAfter\x0a\x09\x09code.parentNode.insertBefore(button,\x20code.nextSibling);\x0a\x0a\x09\x09var\x20buttons\x20=\x20document.createElement('div');\x0a\x09\x09buttons.classList.add('buttons');\x0a\x09\x09buttons.appendChild(run2);\x0a\x09\x09buttons.appendChild(kill);\x0a\x09\x09buttons.appendChild(close);\x0a\x0a\x09\x09output.classList.add('output');\x0a\x09\x09output.appendChild(buttons);\x0a\x09\x09output.appendChild(outpre);\x0a\x09\x09output.style.display\x20=\x20'none';\x0a\x09\x09code.parentNode.insertBefore(output,\x20button.nextSibling);\x0a\x09}\x0a\x0a\x09var\x20play\x20=\x20document.querySelectorAll('div.playground');\x0a\x09for\x20(var\x20i\x20=\x200;\x20i\x20<\x20play.length;\x20i++)\x20{\x0a\x09\x09init(play[i],\x20i);\x0a\x09}\x0a}\x0a", - -{{range .}} - - {{$name_html := html .Name}} - - - - -{{end}} -
    {{$name_html}} {{html .Title}}
    -`, + "playground.js": "//\x20Copyright\x202012\x20The\x20Go\x20Authors.\x20All\x20rights\x20reserved.\x0a//\x20Use\x20of\x20this\x20source\x20code\x20is\x20governed\x20by\x20a\x20BSD-style\x0a//\x20license\x20that\x20can\x20be\x20found\x20in\x20the\x20LICENSE\x20file.\x0a\x0a/*\x0aIn\x20the\x20absence\x20of\x20any\x20formal\x20way\x20to\x20specify\x20interfaces\x20in\x20JavaScript,\x0ahere's\x20a\x20skeleton\x20implementation\x20of\x20a\x20playground\x20transport.\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20Transport()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Set\x20up\x20any\x20transport\x20state\x20(eg,\x20make\x20a\x20websocket\x20connection).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Compile\x20and\x20run\x20the\x20program\x20'body'\x20with\x20'options'.\x0a\x09\x09\x09\x09//\x20Call\x20the\x20'output'\x20callback\x20to\x20display\x20program\x20output.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kill:\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20Kill\x20the\x20running\x20program.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20output\x20callback\x20is\x20called\x20multiple\x20times,\x20and\x20each\x20time\x20it\x20is\x0a\x09//\x20passed\x20an\x20object\x20of\x20this\x20form.\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20write\x20=\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Kind:\x20'string',\x20//\x20'start',\x20'stdout',\x20'stderr',\x20'end'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Body:\x20'string'\x20\x20//\x20content\x20of\x20write\x20or\x20end\x20status\x20message\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x0a\x09//\x20The\x20first\x20call\x20must\x20be\x20of\x20Kind\x20'start'\x20with\x20no\x20body.\x0a\x09//\x20Subsequent\x20calls\x20may\x20be\x20of\x20Kind\x20'stdout'\x20or\x20'stderr'\x0a\x09//\x20and\x20must\x20have\x20a\x20non-null\x20Body\x20string.\x0a\x09//\x20The\x20final\x20call\x20should\x20be\x20of\x20Kind\x20'end'\x20with\x20an\x20optional\x0a\x09//\x20Body\x20string,\x20signifying\x20a\x20failure\x20(\"killed\",\x20for\x20example).\x0a\x0a\x09//\x20The\x20output\x20callback\x20must\x20be\x20of\x20this\x20form.\x0a\x09//\x20See\x20PlaygroundOutput\x20(below)\x20for\x20an\x20implementation.\x0a\x20\x20\x20\x20\x20\x20\x20\x20function\x20outputCallback(write)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a*/\x0a\x0a//\x20HTTPTransport\x20is\x20the\x20default\x20transport.\x0a//\x20enableVet\x20enables\x20running\x20vet\x20if\x20a\x20program\x20was\x20compiled\x20and\x20ran\x20successfully.\x0a//\x20If\x20vet\x20returned\x20any\x20errors,\x20display\x20them\x20before\x20the\x20output\x20of\x20a\x20program.\x0afunction\x20HTTPTransport(enableVet)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09function\x20playback(output,\x20events)\x20{\x0a\x09\x09var\x20timeout;\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09function\x20next()\x20{\x0a\x09\x09\x09if\x20(!events\x20||\x20events.length\x20===\x200)\x20{\x0a\x09\x09\x09\x09output({Kind:\x20'end'});\x0a\x09\x09\x09\x09return;\x0a\x09\x09\x09}\x0a\x09\x09\x09var\x20e\x20=\x20events.shift();\x0a\x09\x09\x09if\x20(e.Delay\x20===\x200)\x20{\x0a\x09\x09\x09\x09output({Kind:\x20e.Kind,\x20Body:\x20e.Message});\x0a\x09\x09\x09\x09next();\x0a\x09\x09\x09\x09return;\x0a\x09\x09\x09}\x0a\x09\x09\x09timeout\x20=\x20setTimeout(function()\x20{\x0a\x09\x09\x09\x09output({Kind:\x20e.Kind,\x20Body:\x20e.Message});\x0a\x09\x09\x09\x09next();\x0a\x09\x09\x09},\x20e.Delay\x20/\x201000000);\x0a\x09\x09}\x0a\x09\x09next();\x0a\x09\x09return\x20{\x0a\x09\x09\x09Stop:\x20function()\x20{\x0a\x09\x09\x09\x09clearTimeout(timeout);\x0a\x09\x09\x09}\x0a\x09\x09};\x0a\x09}\x0a\x0a\x09function\x20error(output,\x20msg)\x20{\x0a\x09\x09output({Kind:\x20'start'});\x0a\x09\x09output({Kind:\x20'stderr',\x20Body:\x20msg});\x0a\x09\x09output({Kind:\x20'end'});\x0a\x09}\x0a\x0a\x09var\x20seq\x20=\x200;\x0a\x09return\x20{\x0a\x09\x09Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x09\x09\x09seq++;\x0a\x09\x09\x09var\x20cur\x20=\x20seq;\x0a\x09\x09\x09var\x20playing;\x0a\x09\x09\x09$.ajax('/compile',\x20{\x0a\x09\x09\x09\x09type:\x20'POST',\x0a\x09\x09\x09\x09data:\x20{'version':\x202,\x20'body':\x20body},\x0a\x09\x09\x09\x09dataType:\x20'json',\x0a\x09\x09\x09\x09success:\x20function(data)\x20{\x0a\x09\x09\x09\x09\x09if\x20(seq\x20!=\x20cur)\x20return;\x0a\x09\x09\x09\x09\x09if\x20(!data)\x20return;\x0a\x09\x09\x09\x09\x09if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x09\x09\x09\x09\x09if\x20(data.Errors)\x20{\x0a\x09\x09\x09\x09\x09\x09error(output,\x20data.Errors);\x0a\x09\x09\x09\x09\x09\x09return;\x0a\x09\x09\x09\x09\x09}\x0a\x0a\x09\x09\x09\x09\x09if\x20(!enableVet)\x20{\x0a\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data.Events);\x0a\x09\x09\x09\x09\x09\x09return;\x0a\x09\x09\x09\x09\x09}\x0a\x0a\x09\x09\x09\x09\x09$.ajax(\"/vet\",\x20{\x0a\x09\x09\x09\x09\x09\x09data:\x20{\"body\":\x20body},\x0a\x09\x09\x09\x09\x09\x09type:\x20\"POST\",\x0a\x09\x09\x09\x09\x09\x09dataType:\x20\"json\",\x0a\x09\x09\x09\x09\x09\x09success:\x20function(dataVet)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09if\x20(dataVet.Errors)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09\x09if\x20(!data.Events)\x20{\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09data.Events\x20=\x20[];\x0a\x09\x09\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09\x09\x09//\x20inject\x20errors\x20from\x20the\x20vet\x20as\x20the\x20first\x20events\x20in\x20the\x20output\x0a\x09\x09\x09\x09\x09\x09\x09\x09data.Events.unshift({Message:\x20'Go\x20vet\x20exited.\\n\\n',\x20Kind:\x20'system',\x20Delay:\x200});\x0a\x09\x09\x09\x09\x09\x09\x09\x09data.Events.unshift({Message:\x20dataVet.Errors,\x20Kind:\x20'stderr',\x20Delay:\x200});\x0a\x09\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data.Events);\x0a\x09\x09\x09\x09\x09\x09},\x0a\x09\x09\x09\x09\x09\x09error:\x20function()\x20{\x0a\x09\x09\x09\x09\x09\x09\x09playing\x20=\x20playback(output,\x20data.Events);\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09});\x0a\x09\x09\x09\x09},\x0a\x09\x09\x09\x09error:\x20function()\x20{\x0a\x09\x09\x09\x09\x09error(output,\x20'Error\x20communicating\x20with\x20remote\x20server.');\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09});\x0a\x09\x09\x09return\x20{\x0a\x09\x09\x09\x09Kill:\x20function()\x20{\x0a\x09\x09\x09\x09\x09if\x20(playing\x20!=\x20null)\x20playing.Stop();\x0a\x09\x09\x09\x09\x09output({Kind:\x20'end',\x20Body:\x20'killed'});\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09};\x0a\x09\x09}\x0a\x09};\x0a}\x0a\x0afunction\x20SocketTransport()\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09var\x20id\x20=\x200;\x0a\x09var\x20outputs\x20=\x20{};\x0a\x09var\x20started\x20=\x20{};\x0a\x09var\x20websocket;\x0a\x09if\x20(window.location.protocol\x20==\x20\"http:\")\x20{\x0a\x09\x09websocket\x20=\x20new\x20WebSocket('ws://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x09}\x20else\x20if\x20(window.location.protocol\x20==\x20\"https:\")\x20{\x0a\x09\x09websocket\x20=\x20new\x20WebSocket('wss://'\x20+\x20window.location.host\x20+\x20'/socket');\x0a\x09}\x0a\x0a\x09websocket.onclose\x20=\x20function()\x20{\x0a\x09\x09console.log('websocket\x20connection\x20closed');\x0a\x09};\x0a\x0a\x09websocket.onmessage\x20=\x20function(e)\x20{\x0a\x09\x09var\x20m\x20=\x20JSON.parse(e.data);\x0a\x09\x09var\x20output\x20=\x20outputs[m.Id];\x0a\x09\x09if\x20(output\x20===\x20null)\x0a\x09\x09\x09return;\x0a\x09\x09if\x20(!started[m.Id])\x20{\x0a\x09\x09\x09output({Kind:\x20'start'});\x0a\x09\x09\x09started[m.Id]\x20=\x20true;\x0a\x09\x09}\x0a\x09\x09output({Kind:\x20m.Kind,\x20Body:\x20m.Body});\x0a\x09};\x0a\x0a\x09function\x20send(m)\x20{\x0a\x09\x09websocket.send(JSON.stringify(m));\x0a\x09}\x0a\x0a\x09return\x20{\x0a\x09\x09Run:\x20function(body,\x20output,\x20options)\x20{\x0a\x09\x09\x09var\x20thisID\x20=\x20id+'';\x0a\x09\x09\x09id++;\x0a\x09\x09\x09outputs[thisID]\x20=\x20output;\x0a\x09\x09\x09send({Id:\x20thisID,\x20Kind:\x20'run',\x20Body:\x20body,\x20Options:\x20options});\x0a\x09\x09\x09return\x20{\x0a\x09\x09\x09\x09Kill:\x20function()\x20{\x0a\x09\x09\x09\x09\x09send({Id:\x20thisID,\x20Kind:\x20'kill'});\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09};\x0a\x09\x09}\x0a\x09};\x0a}\x0a\x0afunction\x20PlaygroundOutput(el)\x20{\x0a\x09'use\x20strict';\x0a\x0a\x09return\x20function(write)\x20{\x0a\x09\x09if\x20(write.Kind\x20==\x20'start')\x20{\x0a\x09\x09\x09el.innerHTML\x20=\x20'';\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09var\x20cl\x20=\x20'system';\x0a\x09\x09if\x20(write.Kind\x20==\x20'stdout'\x20||\x20write.Kind\x20==\x20'stderr')\x0a\x09\x09\x09cl\x20=\x20write.Kind;\x0a\x0a\x09\x09var\x20m\x20=\x20write.Body;\x0a\x09\x09if\x20(write.Kind\x20==\x20'end')\x20{\x0a\x09\x09\x09m\x20=\x20'\\nProgram\x20exited'\x20+\x20(m?(':\x20'+m):'.');\x0a\x09\x09}\x0a\x0a\x09\x09if\x20(m.indexOf('IMAGE:')\x20===\x200)\x20{\x0a\x09\x09\x09//\x20TODO(adg):\x20buffer\x20all\x20writes\x20before\x20creating\x20image\x0a\x09\x09\x09var\x20url\x20=\x20'data:image/png;base64,'\x20+\x20m.substr(6);\x0a\x09\x09\x09var\x20img\x20=\x20document.createElement('img');\x0a\x09\x09\x09img.src\x20=\x20url;\x0a\x09\x09\x09el.appendChild(img);\x0a\x09\x09\x09return;\x0a\x09\x09}\x0a\x0a\x09\x09//\x20^L\x20clears\x20the\x20screen.\x0a\x09\x09var\x20s\x20=\x20m.split('\\x0c');\x0a\x09\x09if\x20(s.length\x20>\x201)\x20{\x0a\x09\x09\x09el.innerHTML\x20=\x20'';\x0a\x09\x09\x09m\x20=\x20s.pop();\x0a\x09\x09}\x0a\x0a\x09\x09m\x20=\x20m.replace(/&/g,\x20'&');\x0a\x09\x09m\x20=\x20m.replace(//g,\x20'>');\x0a\x0a\x09\x09var\x20needScroll\x20=\x20(el.scrollTop\x20+\x20el.offsetHeight)\x20==\x20el.scrollHeight;\x0a\x0a\x09\x09var\x20span\x20=\x20document.createElement('span');\x0a\x09\x09span.className\x20=\x20cl;\x0a\x09\x09span.innerHTML\x20=\x20m;\x0a\x09\x09el.appendChild(span);\x0a\x0a\x09\x09if\x20(needScroll)\x0a\x09\x09\x09el.scrollTop\x20=\x20el.scrollHeight\x20-\x20el.offsetHeight;\x0a\x09};\x0a}\x0a\x0a(function()\x20{\x0a\x20\x20function\x20lineHighlight(error)\x20{\x0a\x20\x20\x20\x20var\x20regex\x20=\x20/prog.go:([0-9]+)/g;\x0a\x20\x20\x20\x20var\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20while\x20(r)\x20{\x0a\x20\x20\x20\x20\x20\x20$(\".lines\x20div\").eq(r[1]-1).addClass(\"lineerror\");\x0a\x20\x20\x20\x20\x20\x20r\x20=\x20regex.exec(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x20\x20function\x20highlightOutput(wrappedOutput)\x20{\x0a\x20\x20\x20\x20return\x20function(write)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(write.Body)\x20lineHighlight(write.Body);\x0a\x20\x20\x20\x20\x20\x20wrappedOutput(write);\x0a\x20\x20\x20\x20};\x0a\x20\x20}\x0a\x20\x20function\x20lineClear()\x20{\x0a\x20\x20\x20\x20$(\".lineerror\").removeClass(\"lineerror\");\x0a\x20\x20}\x0a\x0a\x20\x20//\x20opts\x20is\x20an\x20object\x20with\x20these\x20keys\x0a\x20\x20//\x20\x20codeEl\x20-\x20code\x20editor\x20element\x0a\x20\x20//\x20\x20outputEl\x20-\x20program\x20output\x20element\x0a\x20\x20//\x20\x20runEl\x20-\x20run\x20button\x20element\x0a\x20\x20//\x20\x20fmtEl\x20-\x20fmt\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20fmtImportEl\x20-\x20fmt\x20\"imports\"\x20checkbox\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareEl\x20-\x20share\x20button\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareURLEl\x20-\x20share\x20URL\x20text\x20input\x20element\x20(optional)\x0a\x20\x20//\x20\x20shareRedirect\x20-\x20base\x20URL\x20to\x20redirect\x20to\x20on\x20share\x20(optional)\x0a\x20\x20//\x20\x20toysEl\x20-\x20toys\x20select\x20element\x20(optional)\x0a\x20\x20//\x20\x20enableHistory\x20-\x20enable\x20using\x20HTML5\x20history\x20API\x20(optional)\x0a\x20\x20//\x20\x20transport\x20-\x20playground\x20transport\x20to\x20use\x20(default\x20is\x20HTTPTransport)\x0a\x20\x20//\x20\x20enableShortcuts\x20-\x20whether\x20to\x20enable\x20shortcuts\x20(Ctrl+S/Cmd+S\x20to\x20save)\x20(default\x20is\x20false)\x0a\x20\x20//\x20\x20enableVet\x20-\x20enable\x20running\x20vet\x20and\x20displaying\x20its\x20errors\x0a\x20\x20function\x20playground(opts)\x20{\x0a\x20\x20\x20\x20var\x20code\x20=\x20$(opts.codeEl);\x0a\x20\x20\x20\x20var\x20transport\x20=\x20opts['transport']\x20||\x20new\x20HTTPTransport(opts['enableVet']);\x0a\x20\x20\x20\x20var\x20running;\x0a\x0a\x20\x20\x20\x20//\x20autoindent\x20helpers.\x0a\x20\x20\x20\x20function\x20insertTabs(n)\x20{\x0a\x20\x20\x20\x20\x20\x20//\x20find\x20the\x20selection\x20start\x20and\x20end\x0a\x20\x20\x20\x20\x20\x20var\x20start\x20=\x20code[0].selectionStart;\x0a\x20\x20\x20\x20\x20\x20var\x20end\x20\x20\x20=\x20code[0].selectionEnd;\x0a\x20\x20\x20\x20\x20\x20//\x20split\x20the\x20textarea\x20content\x20into\x20two,\x20and\x20insert\x20n\x20tabs\x0a\x20\x20\x20\x20\x20\x20var\x20v\x20=\x20code[0].value;\x0a\x20\x20\x20\x20\x20\x20var\x20u\x20=\x20v.substr(0,\x20start);\x0a\x20\x20\x20\x20\x20\x20for\x20(var\x20i=0;\x20i\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20curpos--;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(el.value[curpos]\x20==\x20\"\\t\")\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tabs++;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20if\x20(tabs\x20>\x200\x20||\x20el.value[curpos]\x20==\x20\"\\n\")\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20break;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20setTimeout(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(tabs);\x0a\x20\x20\x20\x20\x20\x20},\x201);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20//\x20NOTE(cbro):\x20e\x20is\x20a\x20jQuery\x20event,\x20not\x20a\x20DOM\x20event.\x0a\x20\x20\x20\x20function\x20handleSaveShortcut(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e.isDefaultPrevented())\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(!e.metaKey\x20&&\x20!e.ctrlKey)\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20if\x20(e.key\x20!=\x20\"S\"\x20&&\x20e.key\x20!=\x20\"s\")\x20return\x20false;\x0a\x0a\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x0a\x20\x20\x20\x20\x20\x20//\x20Share\x20and\x20save\x0a\x20\x20\x20\x20\x20\x20share(function(url)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20window.location.href\x20=\x20url\x20+\x20\".go?download=true\";\x0a\x20\x20\x20\x20\x20\x20});\x0a\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20keyHandler(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.enableShortcuts\x20&&\x20handleSaveShortcut(e))\x20return;\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x209\x20&&\x20!e.ctrlKey)\x20{\x20//\x20tab\x20(but\x20not\x20ctrl-tab)\x0a\x20\x20\x20\x20\x20\x20\x20\x20insertTabs(1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e.keyCode\x20==\x2013)\x20{\x20//\x20enter\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(e.shiftKey)\x20{\x20//\x20+shift\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20run();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20if\x20(e.ctrlKey)\x20{\x20//\x20+control\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fmt();\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20e.preventDefault();\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20autoindent(e.target);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20return\x20true;\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20code.unbind('keydown').bind('keydown',\x20keyHandler);\x0a\x20\x20\x20\x20var\x20outdiv\x20=\x20$(opts.outputEl).empty();\x0a\x20\x20\x20\x20var\x20output\x20=\x20$('
    ').appendTo(outdiv);\x0a\x0a\x20\x20\x20\x20function\x20body()\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20$(opts.codeEl).val();\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20setBody(text)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.codeEl).val(text);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20origin(href)\x20{\x0a\x20\x20\x20\x20\x20\x20return\x20(\"\"+href).split(\"/\").slice(0,\x203).join(\"/\");\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20pushedEmpty\x20=\x20(window.location.pathname\x20==\x20\"/\");\x0a\x20\x20\x20\x20function\x20inputChanged()\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(pushedEmpty)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20window.history.pushState(null,\x20\"\",\x20\"/\");\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20popState(e)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20===\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20if\x20(e\x20&&\x20e.state\x20&&\x20e.state.code)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20setBody(e.state.code);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20var\x20rewriteHistory\x20=\x20false;\x0a\x20\x20\x20\x20if\x20(window.history\x20&&\x20window.history.pushState\x20&&\x20window.addEventListener\x20&&\x20opts.enableHistory)\x20{\x0a\x20\x20\x20\x20\x20\x20rewriteHistory\x20=\x20true;\x0a\x20\x20\x20\x20\x20\x20code[0].addEventListener('input',\x20inputChanged);\x0a\x20\x20\x20\x20\x20\x20window.addEventListener('popstate',\x20popState);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20setError(error)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20lineHighlight(error);\x0a\x20\x20\x20\x20\x20\x20output.empty().addClass(\"error\").text(error);\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20loading()\x20{\x0a\x20\x20\x20\x20\x20\x20lineClear();\x0a\x20\x20\x20\x20\x20\x20if\x20(running)\x20running.Kill();\x0a\x20\x20\x20\x20\x20\x20output.removeClass(\"error\").text('Waiting\x20for\x20remote\x20server...');\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20function\x20run()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20running\x20=\x20transport.Run(body(),\x20highlightOutput(PlaygroundOutput(output[0])));\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20function\x20fmt()\x20{\x0a\x20\x20\x20\x20\x20\x20loading();\x0a\x20\x20\x20\x20\x20\x20var\x20data\x20=\x20{\"body\":\x20body()};\x0a\x20\x20\x20\x20\x20\x20if\x20($(opts.fmtImportEl).is(\":checked\"))\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data[\"imports\"]\x20=\x20\"true\";\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$.ajax(\"/fmt\",\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20data,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"POST\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20dataType:\x20\"json\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20success:\x20function(data)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(data.Error)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError(data.Error);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(data.Body);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setError(\"\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20var\x20shareURL;\x20//\x20jQuery\x20element\x20to\x20show\x20the\x20shared\x20URL.\x0a\x20\x20\x20\x20var\x20sharing\x20=\x20false;\x20//\x20true\x20if\x20there\x20is\x20a\x20pending\x20request.\x0a\x20\x20\x20\x20var\x20shareCallbacks\x20=\x20[];\x0a\x20\x20\x20\x20function\x20share(opt_callback)\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opt_callback)\x20shareCallbacks.push(opt_callback);\x0a\x0a\x20\x20\x20\x20\x20\x20if\x20(sharing)\x20return;\x0a\x20\x20\x20\x20\x20\x20sharing\x20=\x20true;\x0a\x0a\x20\x20\x20\x20\x20\x20var\x20sharingData\x20=\x20body();\x0a\x20\x20\x20\x20\x20\x20$.ajax(\"/share\",\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20data:\x20sharingData,\x0a\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"POST\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20contentType:\x20\"text/plain;\x20charset=utf-8\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20sharing\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert(\"Server\x20error;\x20try\x20again.\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(opts.shareRedirect)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.location\x20=\x20opts.shareRedirect\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20path\x20=\x20\"/p/\"\x20+\x20xhr.responseText;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20url\x20=\x20origin(window.location)\x20+\x20path;\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20for\x20(var\x20i\x20=\x200;\x20i\x20<\x20shareCallbacks.length;\x20i++)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks[i](url);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareCallbacks\x20=\x20[];\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(shareURL)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20shareURL.show().val(url).focus().select();\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(rewriteHistory)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20var\x20historyData\x20=\x20{\"code\":\x20sharingData};\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.history.pushState(historyData,\x20\"\",\x20path);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20pushedEmpty\x20=\x20false;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20$(opts.runEl).click(run);\x0a\x20\x20\x20\x20$(opts.fmtEl).click(fmt);\x0a\x0a\x20\x20\x20\x20if\x20(opts.shareEl\x20!==\x20null\x20&&\x20(opts.shareURLEl\x20!==\x20null\x20||\x20opts.shareRedirect\x20!==\x20null))\x20{\x0a\x20\x20\x20\x20\x20\x20if\x20(opts.shareURLEl)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20shareURL\x20=\x20$(opts.shareURLEl).hide();\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20$(opts.shareEl).click(function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20share();\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20if\x20(opts.toysEl\x20!==\x20null)\x20{\x0a\x20\x20\x20\x20\x20\x20$(opts.toysEl).bind('change',\x20function()\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20var\x20toy\x20=\x20$(this).val();\x0a\x20\x20\x20\x20\x20\x20\x20\x20$.ajax(\"/doc/play/\"+toy,\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processData:\x20false,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20type:\x20\"GET\",\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20complete:\x20function(xhr)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(xhr.status\x20!=\x20200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20alert(\"Server\x20error;\x20try\x20again.\");\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20setBody(xhr.responseText);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20\x20\x20});\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x0a\x20\x20window.playground\x20=\x20playground;\x0a})();\x0a",
     
    -	"dirlist.html": `
    +	"search.html": "\x0a{{with\x20.Alert}}\x0a\x09

    \x0a\x09{{html\x20.}}\x0a\x09

    \x0a{{end}}\x0a{{with\x20.Alt}}\x0a\x09

    \x0a\x09Did\x20you\x20mean:\x20\x0a\x09{{range\x20.Alts}}\x0a\x09\x09{{html\x20.}}\x0a\x09{{end}}\x0a\x09

    \x0a{{end}}\x0a", -

    - - - - - - - - - - - -{{range .}} - - {{$name_html := fileInfoName . | html}} - - - - - - -{{end}} + "search.txt": "QUERY\x0a\x09{{.Query}}\x0a\x0a{{with\x20.Alert}}{{.}}\x0a{{end}}{{/*\x20.Alert\x20*/}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Alt}}DID\x20YOU\x20MEAN\x0a\x0a{{range\x20.Alts}}\x09{{.}}\x0a{{end}}\x0a{{end}}{{/*\x20.Alt\x20*/}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Pak}}PACKAGE\x20{{$.Query}}\x0a\x0a{{range\x20.}}\x09{{pkgLink\x20.Pak.Path}}\x0a{{end}}\x0a{{end}}{{/*\x20.Pak\x20*/}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{range\x20$key,\x20$val\x20:=\x20.Idents}}{{if\x20$val}}{{$key.Name}}\x0a{{range\x20$val}}\x20\x20\x20\x20{{.Path}}.{{.Name}}\x0a{{end}}\x0a{{end}}{{end}}{{/*\x20.Idents\x20*/}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Hit}}{{with\x20.Decls}}PACKAGE-LEVEL\x20DECLARATIONS\x0a\x0a{{range\x20.}}package\x20{{.Pak.Name}}\x0a{{range\x20$file\x20:=\x20.Files}}{{range\x20.Groups}}{{range\x20.}}\x09{{srcLink\x20$file.File.Path}}:{{infoLine\x20.}}{{end}}\x0a{{end}}{{end}}{{/*\x20.Files\x20*/}}\x0a{{end}}{{end}}{{/*\x20.Decls\x20*/}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{with\x20.Others}}LOCAL\x20DECLARATIONS\x20AND\x20USES\x0a\x0a{{range\x20.}}package\x20{{.Pak.Name}}\x0a{{range\x20$file\x20:=\x20.Files}}{{range\x20.Groups}}{{range\x20.}}\x09{{srcLink\x20$file.File.Path}}:{{infoLine\x20.}}\x0a{{end}}{{end}}{{end}}{{/*\x20.Files\x20*/}}\x0a{{end}}{{end}}{{/*\x20.Others\x20*/}}{{end}}{{/*\x20.Hit\x20*/}}{{/*\x0a\x0a---------------------------------------\x0a\x0a*/}}{{if\x20.Textual}}{{if\x20.Complete}}{{.Found}}\x20TEXTUAL\x20OCCURRENCES{{else}}MORE\x20THAN\x20{{.Found}}\x20TEXTUAL\x20OCCURRENCES{{end}}\x0a\x0a{{range\x20.Textual}}{{len\x20.Lines}}\x09{{srcLink\x20.Filename}}\x0a{{end}}{{if\x20not\x20.Complete}}...\x09...\x0a{{end}}{{end}}\x0a", -
    File Bytes Modified
    ..
    {{$name_html}}{{html .Size}}{{fileInfoTime . | html}}
    -

    -`, + "searchcode.html": "\x0a{{$query_url\x20:=\x20urlquery\x20.Query}}\x0a{{if\x20not\x20.Idents}}\x0a\x09{{with\x20.Pak}}\x0a\x09\x09Package\x20{{html\x20$.Query}}\x0a\x09\x09

    \x0a\x09\x09\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09

    {{$pkg_html}}
    \x0a\x09\x09

    \x0a\x09{{end}}\x0a{{end}}\x0a{{with\x20.Hit}}\x0a\x09{{with\x20.Decls}}\x0a\x09\x09Package-level\x20declarations\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09package\x20{{html\x20.Pak.Name}}\x0a\x09\x09\x09{{range\x20.Files}}\x0a\x09\x09\x09\x09{{$file\x20:=\x20.File.Path}}\x0a\x09\x09\x09\x09{{range\x20.Groups}}\x0a\x09\x09\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$line\x20:=\x20infoLine\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$file}}:{{$line}}\x0a\x09\x09\x09\x09\x09\x09{{infoSnippet_html\x20.}}\x0a\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a\x09{{with\x20.Others}}\x0a\x09\x09Local\x20declarations\x20and\x20uses\x0a\x09\x09{{range\x20.}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Pak.Path\x20|\x20html}}\x0a\x09\x09\x09package\x20{{html\x20.Pak.Name}}\x0a\x09\x09\x09{{range\x20.Files}}\x0a\x09\x09\x09\x09{{$file\x20:=\x20.File.Path}}\x0a\x09\x09\x09\x09{{$file}}\x0a\x09\x09\x09\x09\x0a\x09\x09\x09\x09{{range\x20.Groups}}\x0a\x09\x09\x09\x09\x09
    \x0a\x09\x09\x09\x09\x09{{range\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$line\x20:=\x20infoLine\x20.}}\x0a\x09\x09\x09\x09\x09\x09{{$line}}\x0a\x09\x09\x09\x09\x09{{end}}\x0a\x09\x09\x09\x09\x09
    \x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a{{end}}\x0a", - "error.html": ` + "searchdoc.html": "\x0a{{range\x20$key,\x20$val\x20:=\x20.Idents}}\x0a\x09{{if\x20$val}}\x0a\x09\x09{{$key.Name}}\x0a\x09\x09{{range\x20$val}}\x0a\x09\x09\x09{{$pkg_html\x20:=\x20pkgLink\x20.Path\x20|\x20html}}\x0a\x09\x09\x09{{if\x20eq\x20\"Packages\"\x20$key.Name}}\x0a\x09\x09\x09\x09{{html\x20.Path}}\x0a\x09\x09\x09{{else}}\x0a\x09\x09\x09\x09{{$doc_html\x20:=\x20docLink\x20.Path\x20.Name|\x20html}}\x0a\x09\x09\x09\x09{{html\x20.Package}}.{{.Name}}\x0a\x09\x09\x09{{end}}\x0a\x09\x09\x09{{if\x20.Doc}}\x0a\x09\x09\x09\x09

    {{comment_html\x20.Doc}}

    \x0a\x09\x09\x09{{else}}\x0a\x09\x09\x09\x09

    No\x20documentation\x20available

    \x0a\x09\x09\x09{{end}}\x0a\x09\x09{{end}}\x0a\x09{{end}}\x0a{{end}}\x0a", -

    -{{html .}} -

    -`, + "searchtxt.html": "\x0a{{$query_url\x20:=\x20urlquery\x20.Query}}\x0a{{with\x20.Textual}}\x0a\x09{{if\x20$.Complete}}\x0a\x09\x09{{html\x20$.Found}}\x20textual\x20occurrences\x0a\x09{{else}}\x0a\x09\x09More\x20than\x20{{html\x20$.Found}}\x20textual\x20occurrences\x0a\x09\x09

    \x0a\x09\x09Not\x20all\x20files\x20or\x20lines\x20containing\x20\"{{html\x20$.Query}}\"\x20are\x20shown.\x0a\x09\x09

    \x0a\x09{{end}}\x0a\x09

    \x0a\x09\x0a\x09{{range\x20.}}\x0a\x09\x09{{$file\x20:=\x20.Filename}}\x0a\x09\x09

    \x0a\x09

    \x0a{{end}}\x0a", - "example.html": `
    - -
    -

    Example{{example_suffix .Name}}

    - {{with .Doc}}

    {{html .}}

    {{end}} - {{$output := .Output}} - {{with .Play}} -
    -
    -
    {{html $output}}
    -
    - Run - Format - {{if not $.GoogleCN}} - - {{end}} -
    -
    - {{else}} -

    Code:

    -
    {{.Code}}
    - {{with .Output}} -

    Output:

    -
    {{html .}}
    - {{end}} - {{end}} -
    -
    -`, - - "godoc.html": ` - - - - - -{{with .Tabtitle}} - {{html .}} - The Go Programming Language -{{else}} - The Go Programming Language -{{end}} - -{{if .SearchBox}} - -{{end}} - - - - - -
    -... -
    - -
    - - - -
    - -
    - -
    - -{{if .Playground}} -
    -
    -
    -
    - Run - Format - {{if not $.GoogleCN}} - - {{end}} -
    -
    -{{end}} - -
    -
    - -{{if or .Title .SrcPath}} -

    - {{html .Title}} - {{html .SrcPath | srcBreadcrumb}} -

    -{{end}} - -{{with .Subtitle}} -

    {{html .}}

    -{{end}} - -{{with .SrcPath}} -

    - Documentation: {{html . | srcToPkgLink}} -

    -{{end}} - -{{/* The Table of Contents is automatically inserted in this
    . - Do not delete this
    . */}} - - -{{/* Body is HTML-escaped elsewhere */}} -{{printf "%s" .Body}} - - - -
    -
    - - - - - - -{{if .Playground}} - -{{end}} -{{with .Version}}{{end}} - - - - - -`, - - "godocs.js": `// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* A little code to ease navigation of these documents. - * - * On window load we: - * + Generate a table of contents (generateTOC) - * + Bind foldable sections (bindToggles) - * + Bind links to foldable sections (bindToggleLinks) - */ - -(function() { -'use strict'; - -// Mobile-friendly topbar menu -$(function() { - var menu = $('#menu'); - var menuButton = $('#menu-button'); - var menuButtonArrow = $('#menu-button-arrow'); - menuButton.click(function(event) { - menu.toggleClass('menu-visible'); - menuButtonArrow.toggleClass('vertical-flip'); - event.preventDefault(); - return false; - }); -}); - -/* Generates a table of contents: looks for h2 and h3 elements and generates - * links. "Decorates" the element with id=="nav" with this table of contents. - */ -function generateTOC() { - if ($('#manual-nav').length > 0) { - return; - } - - var nav = $('#nav'); - if (nav.length === 0) { - return; - } - - var toc_items = []; - $(nav).nextAll('h2, h3').each(function() { - var node = this; - if (node.id == '') - node.id = 'tmp_' + toc_items.length; - var link = $('').attr('href', '#' + node.id).text($(node).text()); - var item; - if ($(node).is('h2')) { - item = $('
    '); - } else { // h3 - item = $('
    '); - } - item.append(link); - toc_items.push(item); - }); - if (toc_items.length <= 1) { - return; - } - - var dl1 = $('
    '); - var dl2 = $('
    '); - - var split_index = (toc_items.length / 2) + 1; - if (split_index < 8) { - split_index = toc_items.length; - } - for (var i = 0; i < split_index; i++) { - dl1.append(toc_items[i]); - } - for (/* keep using i */; i < toc_items.length; i++) { - dl2.append(toc_items[i]); - } - - var tocTable = $('').appendTo(nav); - var tocBody = $('').appendTo(tocTable); - var tocRow = $('').appendTo(tocBody); - - // 1st column - $(']","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"
    ').appendTo(tocRow).append(dl1); - // 2nd column - $('').appendTo(tocRow).append(dl2); -} - -function bindToggle(el) { - $('.toggleButton', el).click(function() { - if ($(this).closest(".toggle, .toggleVisible")[0] != el) { - // Only trigger the closest toggle header. - return; - } - - if ($(el).is('.toggle')) { - $(el).addClass('toggleVisible').removeClass('toggle'); - } else { - $(el).addClass('toggle').removeClass('toggleVisible'); - } - }); -} - -function bindToggles(selector) { - $(selector).each(function(i, el) { - bindToggle(el); - }); -} - -function bindToggleLink(el, prefix) { - $(el).click(function() { - var href = $(el).attr('href'); - var i = href.indexOf('#'+prefix); - if (i < 0) { - return; - } - var id = '#' + prefix + href.slice(i+1+prefix.length); - if ($(id).is('.toggle')) { - $(id).find('.toggleButton').first().click(); - } - }); -} -function bindToggleLinks(selector, prefix) { - $(selector).each(function(i, el) { - bindToggleLink(el, prefix); - }); -} - -function setupDropdownPlayground() { - if (!$('#page').is('.wide')) { - return; // don't show on front page - } - var button = $('#playgroundButton'); - var div = $('#playground'); - var setup = false; - button.toggle(function() { - button.addClass('active'); - div.show(); - if (setup) { - return; - } - setup = true; - playground({ - 'codeEl': $('.code', div), - 'outputEl': $('.output', div), - 'runEl': $('.run', div), - 'fmtEl': $('.fmt', div), - 'shareEl': $('.share', div), - 'shareRedirect': '//play.golang.org/p/' - }); - }, - function() { - button.removeClass('active'); - div.hide(); - }); - button.show(); - $('#menu').css('min-width', '+=60'); -} - -function setupInlinePlayground() { - 'use strict'; - // Set up playground when each element is toggled. - $('div.play').each(function (i, el) { - // Set up playground for this example. - var setup = function() { - var code = $('.code', el); - playground({ - 'codeEl': code, - 'outputEl': $('.output', el), - 'runEl': $('.run', el), - 'fmtEl': $('.fmt', el), - 'shareEl': $('.share', el), - 'shareRedirect': '//play.golang.org/p/' - }); - - // Make the code textarea resize to fit content. - var resize = function() { - code.height(0); - var h = code[0].scrollHeight; - code.height(h+20); // minimize bouncing. - code.closest('.input').height(h); - }; - code.on('keydown', resize); - code.on('keyup', resize); - code.keyup(); // resize now. - }; - - // If example already visible, set up playground now. - if ($(el).is(':visible')) { - setup(); - return; - } - - // Otherwise, set up playground when example is expanded. - var built = false; - $(el).closest('.toggle').click(function() { - // Only set up once. - if (!built) { - setup(); - built = true; - } - }); - }); -} - -// fixFocus tries to put focus to div#page so that keyboard navigation works. -function fixFocus() { - var page = $('div#page'); - var topbar = $('div#topbar'); - page.css('outline', 0); // disable outline when focused - page.attr('tabindex', -1); // and set tabindex so that it is focusable - $(window).resize(function (evt) { - // only focus page when the topbar is at fixed position (that is, it's in - // front of page, and keyboard event will go to the former by default.) - // by focusing page, keyboard event will go to page so that up/down arrow, - // space, etc. will work as expected. - if (topbar.css('position') == "fixed") - page.focus(); - }).resize(); -} - -function toggleHash() { - var id = window.location.hash.substring(1); - // Open all of the toggles for a particular hash. - var els = $( - document.getElementById(id), - $('a[name]').filter(function() { - return $(this).attr('name') == id; - }) - ); - - while (els.length) { - for (var i = 0; i < els.length; i++) { - var el = $(els[i]); - if (el.is('.toggle')) { - el.find('.toggleButton').first().click(); - } - } - els = el.parent(); - } -} - -function personalizeInstallInstructions() { - var prefix = '?download='; - var s = window.location.search; - if (s.indexOf(prefix) != 0) { - // No 'download' query string; detect "test" instructions from User Agent. - if (navigator.platform.indexOf('Win') != -1) { - $('.testUnix').hide(); - $('.testWindows').show(); - } else { - $('.testUnix').show(); - $('.testWindows').hide(); - } - return; - } - - var filename = s.substr(prefix.length); - var filenameRE = /^go1\.\d+(\.\d+)?([a-z0-9]+)?\.([a-z0-9]+)(-[a-z0-9]+)?(-osx10\.[68])?\.([a-z.]+)$/; - $('.downloadFilename').text(filename); - $('.hideFromDownload').hide(); - var m = filenameRE.exec(filename); - if (!m) { - // Can't interpret file name; bail. - return; - } - - var os = m[3]; - var ext = m[6]; - if (ext != 'tar.gz') { - $('#tarballInstructions').hide(); - } - if (os != 'darwin' || ext != 'pkg') { - $('#darwinPackageInstructions').hide(); - } - if (os != 'windows') { - $('#windowsInstructions').hide(); - $('.testUnix').show(); - $('.testWindows').hide(); - } else { - if (ext != 'msi') { - $('#windowsInstallerInstructions').hide(); - } - if (ext != 'zip') { - $('#windowsZipInstructions').hide(); - } - $('.testUnix').hide(); - $('.testWindows').show(); - } - - var download = "https://dl.google.com/go/" + filename; - - var message = $('

    '+ - 'Your download should begin shortly. '+ - 'If it does not, click this link.

    '); - message.find('a').attr('href', download); - message.insertAfter('#nav'); - - window.location = download; -} - -function updateVersionTags() { - var v = window.goVersion; - if (/^go[0-9.]+$/.test(v)) { - $(".versionTag").empty().text(v); - $(".whereTag").hide(); - } -} - -function addPermalinks() { - function addPermalink(source, parent) { - var id = source.attr("id"); - if (id == "" || id.indexOf("tmp_") === 0) { - // Auto-generated permalink. - return; - } - if (parent.find("> .permalink").length) { - // Already attached. - return; - } - parent.append(" ").append($("").attr("href", "#" + id)); - } - - $("#page .container").find("h2[id], h3[id]").each(function() { - var el = $(this); - addPermalink(el, el); - }); - - $("#page .container").find("dl[id]").each(function() { - var el = $(this); - // Add the anchor to the "dt" element. - addPermalink(el, el.find("> dt").first()); - }); -} - -$(document).ready(function() { - generateTOC(); - addPermalinks(); - bindToggles(".toggle"); - bindToggles(".toggleVisible"); - bindToggleLinks(".exampleLink", "example_"); - bindToggleLinks(".overviewLink", ""); - bindToggleLinks(".examplesLink", ""); - bindToggleLinks(".indexLink", ""); - setupDropdownPlayground(); - setupInlinePlayground(); - fixFocus(); - setupTypeInfo(); - setupCallgraphs(); - toggleHash(); - personalizeInstallInstructions(); - updateVersionTags(); - - // godoc.html defines window.initFuncs in the tag, and root.html and - // codewalk.js push their on-page-ready functions to the list. - // We execute those functions here, to avoid loading jQuery until the page - // content is loaded. - for (var i = 0; i < window.initFuncs.length; i++) window.initFuncs[i](); -}); - -// -- analysis --------------------------------------------------------- - -// escapeHTML returns HTML for s, with metacharacters quoted. -// It is safe for use in both elements and attributes -// (unlike the "set innerText, read innerHTML" trick). -function escapeHTML(s) { - return s.replace(/&/g, '&'). - replace(/\"/g, '"'). - replace(/\'/g, '''). - replace(//g, '>'); -} - -// makeAnchor returns HTML for an element, given an anchorJSON object. -function makeAnchor(json) { - var html = escapeHTML(json.Text); - if (json.Href != "") { - html = "" + html + ""; - } - return html; -} - -function showLowFrame(html) { - var lowframe = document.getElementById('lowframe'); - lowframe.style.height = "200px"; - lowframe.innerHTML = "

    " + html + "

    \n" + - "
    " -}; - -document.hideLowFrame = function() { - var lowframe = document.getElementById('lowframe'); - lowframe.style.height = "0px"; -} - -// onClickCallers is the onclick action for the 'func' tokens of a -// function declaration. -document.onClickCallers = function(index) { - var data = document.ANALYSIS_DATA[index] - if (data.Callers.length == 1 && data.Callers[0].Sites.length == 1) { - document.location = data.Callers[0].Sites[0].Href; // jump to sole caller - return; - } - - var html = "Callers of " + escapeHTML(data.Callee) + ":
    \n"; - for (var i = 0; i < data.Callers.length; i++) { - var caller = data.Callers[i]; - html += "" + escapeHTML(caller.Func) + ""; - var sites = caller.Sites; - if (sites != null && sites.length > 0) { - html += " at line "; - for (var j = 0; j < sites.length; j++) { - if (j > 0) { - html += ", "; - } - html += "" + makeAnchor(sites[j]) + ""; - } - } - html += "
    \n"; - } - showLowFrame(html); -}; - -// onClickCallees is the onclick action for the '(' token of a function call. -document.onClickCallees = function(index) { - var data = document.ANALYSIS_DATA[index] - if (data.Callees.length == 1) { - document.location = data.Callees[0].Href; // jump to sole callee - return; - } - - var html = "Callees of this " + escapeHTML(data.Descr) + ":
    \n"; - for (var i = 0; i < data.Callees.length; i++) { - html += "" + makeAnchor(data.Callees[i]) + "
    \n"; - } - showLowFrame(html); -}; - -// onClickTypeInfo is the onclick action for identifiers declaring a named type. -document.onClickTypeInfo = function(index) { - var data = document.ANALYSIS_DATA[index]; - var html = "Type " + data.Name + ": " + - "      (size=" + data.Size + ", align=" + data.Align + ")
    \n"; - html += implementsHTML(data); - html += methodsetHTML(data); - showLowFrame(html); -}; - -// implementsHTML returns HTML for the implements relation of the -// specified TypeInfoJSON value. -function implementsHTML(info) { - var html = ""; - if (info.ImplGroups != null) { - for (var i = 0; i < info.ImplGroups.length; i++) { - var group = info.ImplGroups[i]; - var x = "" + escapeHTML(group.Descr) + " "; - for (var j = 0; j < group.Facts.length; j++) { - var fact = group.Facts[j]; - var y = "" + makeAnchor(fact.Other) + ""; - if (fact.ByKind != null) { - html += escapeHTML(fact.ByKind) + " type " + y + " implements " + x; - } else { - html += x + " implements " + y; - } - html += "
    \n"; - } - } - } - return html; -} - - -// methodsetHTML returns HTML for the methodset of the specified -// TypeInfoJSON value. -function methodsetHTML(info) { - var html = ""; - if (info.Methods != null) { - for (var i = 0; i < info.Methods.length; i++) { - html += "" + makeAnchor(info.Methods[i]) + "
    \n"; - } - } - return html; -} - -// onClickComm is the onclick action for channel "make" and "<-" -// send/receive tokens. -document.onClickComm = function(index) { - var ops = document.ANALYSIS_DATA[index].Ops - if (ops.length == 1) { - document.location = ops[0].Op.Href; // jump to sole element - return; - } - - var html = "Operations on this channel:
    \n"; - for (var i = 0; i < ops.length; i++) { - html += makeAnchor(ops[i].Op) + " by " + escapeHTML(ops[i].Fn) + "
    \n"; - } - if (ops.length == 0) { - html += "(none)
    \n"; - } - showLowFrame(html); -}; - -$(window).load(function() { - // Scroll window so that first selection is visible. - // (This means we don't need to emit id='L%d' spans for each line.) - // TODO(adonovan): ideally, scroll it so that it's under the pointer, - // but I don't know how to get the pointer y coordinate. - var elts = document.getElementsByClassName("selection"); - if (elts.length > 0) { - elts[0].scrollIntoView() - } -}); - -// setupTypeInfo populates the "Implements" and "Method set" toggle for -// each type in the package doc. -function setupTypeInfo() { - for (var i in document.ANALYSIS_DATA) { - var data = document.ANALYSIS_DATA[i]; - - var el = document.getElementById("implements-" + i); - if (el != null) { - // el != null => data is TypeInfoJSON. - if (data.ImplGroups != null) { - el.innerHTML = implementsHTML(data); - el.parentNode.parentNode.style.display = "block"; - } - } - - var el = document.getElementById("methodset-" + i); - if (el != null) { - // el != null => data is TypeInfoJSON. - if (data.Methods != null) { - el.innerHTML = methodsetHTML(data); - el.parentNode.parentNode.style.display = "block"; - } - } - } -} - -function setupCallgraphs() { - if (document.CALLGRAPH == null) { - return - } - document.getElementById("pkg-callgraph").style.display = "block"; - - var treeviews = document.getElementsByClassName("treeview"); - for (var i = 0; i < treeviews.length; i++) { - var tree = treeviews[i]; - if (tree.id == null || tree.id.indexOf("callgraph-") != 0) { - continue; - } - var id = tree.id.substring("callgraph-".length); - $(tree).treeview({collapsed: true, animated: "fast"}); - document.cgAddChildren(tree, tree, [id]); - tree.parentNode.parentNode.style.display = "block"; - } -} - -document.cgAddChildren = function(tree, ul, indices) { - if (indices != null) { - for (var i = 0; i < indices.length; i++) { - var li = cgAddChild(tree, ul, document.CALLGRAPH[indices[i]]); - if (i == indices.length - 1) { - $(li).addClass("last"); - } - } - } - $(tree).treeview({animated: "fast", add: ul}); -} - -// cgAddChild adds an
  • element for document.CALLGRAPH node cgn to -// the parent
      element ul. tree is the tree's root
        element. -function cgAddChild(tree, ul, cgn) { - var li = document.createElement("li"); - ul.appendChild(li); - li.className = "closed"; - - var code = document.createElement("code"); - - if (cgn.Callees != null) { - $(li).addClass("expandable"); - - // Event handlers and innerHTML updates don't play nicely together, - // hence all this explicit DOM manipulation. - var hitarea = document.createElement("div"); - hitarea.className = "hitarea expandable-hitarea"; - li.appendChild(hitarea); - - li.appendChild(code); - - var childUL = document.createElement("ul"); - li.appendChild(childUL); - childUL.setAttribute('style', "display: none;"); - - var onClick = function() { - document.cgAddChildren(tree, childUL, cgn.Callees); - hitarea.removeEventListener('click', onClick) - }; - hitarea.addEventListener('click', onClick); - - } else { - li.appendChild(code); - } - code.innerHTML += " " + makeAnchor(cgn.Func); - return li -} - -})(); -`, - - "images/minus.gif": "GIF89a\t\x00\t\x00\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\t\x00\t\x00\x00\b\"\x00\x03\b\x1cH\xf0\x9f\xc1\x83\xff\x04\"<\xa8pa\xc2\x00\xff\x00H\x94\xf8\xd0aE\x87\r\x17\x12\xdc\x18 \x00;", - - "images/plus.gif": "GIF89a\t\x00\t\x00\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\t\x00\t\x00\x00\b&\x00\x03\b\x1cH\xf0\x9f\xc1\x83\xff\x04\x1e\x04pP\xa1A\x86\x06\x15\x02\x9881a\x80\x85\r/>̈0#A\x82\x01\x01\x00;", - - "images/treeview-black-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\b\xff\x00\xff\t\x1c\xf8\x0f\x00\xc1\x83\b\r\"\\X\x90\xe1B\x85\x0e\tB\x8c(p\"E\x8b\x111:\xd4\xc8\x10\x80Ǐ\x1f\x1fR\x948r G\x91%\x1b\xa6<\x990\xa5ʒ,\x0f\xc6$\xb9\xd2\xe5L\x936s\xd6\xdc\tSgO\x9e#oV\xf4\x19\x94\xe8E\xa3\x19\x91nTڑ)ʟP\x8b\x02=:5iեW\x9bf}*5*U\xafV\xc1b\x15\xab\x95,\u05ef]Ӣ]\x1bVm[\xb6c\xddƅ[Vn]\xbag\xdfꝻ\xf7n\u07fc|\x03\xfb\x15\fx\xb0\xe1\u0088[nUl\x96\xb1\xdd\xc42\x9d:\xc6;\xf9oe\u0097\x0fg\x86L\xb3q\xe4ş=w~\xbc\xb9thҧ)\xa7\xb6\xbc\x1askͯ9\xe3\x04=Zumַ]熽[\xf6PڳE\aG\xdd\x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a1\x102i\x18D\"\x0e\x91\x84=\xec`\x12OXD$61\x85O\\a\x14[8\xc5\x17\x1e\x11\x8aW\x94b\x16\xa9\xb8E+\x1a\xf1\x8bN\xec\xa2\ri\b\x12\x90\x04\x04\x00;", - - "images/treeview-black.gif": "GIF89a`\x00\x85\x00\xa1\x01\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff!\xf9\x04\x01\x00\x00\x02\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x94\x8f\xa9\xcb\xed\x0fE\x98\xc1ш\xb3ި\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xeaʶ\xee\nIJ\xfc\xd6&\xb0\xe0\xf6\xfe\xe9\x82\xef\xe3\t#\xc0Cp\x88d\xe0f\xcbY\xf2\x89(\x1a\x8eP\xa8\xf4W\xcdNs\xda,\xd3\xd9\xedR\xc3^\xb2yl~\xa2\xd3\xc85[\xe8~\xabRF9\x8f\xbe\xb5o.\x96\tW?R\x12\a\x98\x80Gx\x88\x98\b\xf8E\xa3\xa826\xe8\x88\x01)yBY)\xf8\xe3Ą\xd9\xf3\xd7\tr\t\xea\xa9\x109\x9a\xc3hzڠ\xba\xfa\xd0\xea\xca\x1a{3\x9bY\x1b\x02\xebj\x98\xbb\xba\x1b\xcb\xd7\x00\x1c\xf5k\xdb{{\x8c\x9c\xac\x8cʸ\xac\xf4\xe9<\x9c\x87\x15\x9dp\xc5{\xdaD\xc3Y}]m]7\xfdM\r>>\x95j\x9e\xae\xbe\xceގd\xb8\x0e\xff+\xac@\u007f뛎o\xae?\xce\xef\x8e\x1d+\x15@P\xa2\xc6yKwМ\xb6\x18\x9a\x1aEKh0\x1c\xb9\x88\xa5\xd4\tt\x871\xa3\xc6d\x8d\x06\xe4\xe5\xdb豗\x9f>!O\x95\xfcv\xb2ZJ\x8e,\r\xa2C\b\xed[A\x991\xbb5d\xc8\xedaM\x9d\x15a\xf6T\xf8\xb2\xa5СDG\xadtvtY\xd2J\xf6:\x8cT\xb8q`-\xa9\xb3\xa8\x06\xfc\x17\x94b9\xa8?\xb5J\x83\xca)\xa7\xb3\x996\xbb\xd24\xdb-kѵlۺ}\v7.\x82\x02\x00;", - - "images/treeview-default-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\b\xff\x00\xff\t\x1cH\xb0\xa0A\x81\x01\x0e*\\x0!Ç\v\x1dB\x9cHP\"E\x8a\t3\xfe\xd3x\xb1aNj\x16?2\f)R!ɒ\x06O\xa2\xac\xb8rdˈ/M\xc6\xf48\xb3\xa0ʗ7[\xe6\\\xb9\x13eϒ?E\x06\xfd8\xb4cQ\x905m&e\xb9\x14aS\xa7O\x8fb|\xba\x91\xaaԉW!f}\xb8\xd5eT\xab`\xbf\x8am\xda\x15\xe6إee\x9eM\x9a\x96&ٰo\xd7\xd6l\x9b\x12.Z\xbbl\xf1\xce\xd5;\x93\xaeR\xb9}\xf9\xc6\xf4\xcb4\xaeỀ\a\vƹXgc\x9e\x8f}F\x06:Yhe\xa2\x97\xa9j\xde̹3\xd7\xccH\x133\x16\xed\x984dӒQSVm\x995f\xd7FAO\x85\x1d\xfap^ڳm\xefōUvo\xdeZ}\a\a\xfe\x99\xb8W݁\x8d\x9bE\xaeX\xb9Z棡\x97\x96~\x9azj뫱\xb7\xd6\xfe\x9a{l\xe7n\x11{\xff\xaf-\xbe\xfc\xed\xf1\xb9\xcd\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"nЈ\x1dD\xe2\a\x95\x18B\x1e\x8ep \x84\x81\xa2pf\xc8\xc4\x13J\x11yN\x14\xa1\x16\xb3\xc8\xc5*\xae\xf0\x8a\xf7\xf3\xe2\v\xc5\x18C2R\x11\x8c%4c\rјB5損-tc\x0f\xe1xC9>\x11*a\xa4\xe3\x0e\xed\xb8E>vQ\x8f?\x04d\x10\x059DB\x16ѐGDd\x12\x15\xb9DF6я\x90t\xa4\x15\xf1\x98FI~\x91\x92m\xb4\xe4\x185YFN\x9e\x11\x93q\xf4\xe4\x1aAYGQ\xbe\x91\x94{4\xe5\x1cQ\x19HV\x0eҕ\x85\x84\xe5!e\x99HZ.\xd2)\x1a\xc9H@\x00\x00;", - - "images/treeview-default.gif": "GIF89a`\x00\x85\x00\xa1\x03\x00\x00\x00\x00\x80\x80\x80\xbc\xbc\xbc\xff\xff\xff!\xf9\x04\x01\x00\x00\x03\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x9c\x8f\xa9\xcb\xed\x0f\a\x98\xc0ш\xb3ި\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xeaʶ\xee\x1aIJ\xfc\xd6f\xb0\xe0\xf6\xfe\xe9\xd2\xe1\xe3\t#>Rp\x88d\xe0(\x93\x01\ue64c\"\x8a@\xa9uz0^\xb7GCw;\x9c\x89\xc1\xe4\xb2\xd9yN\xab\xa5ߵ\xfb}j\xc3M\x82y\xb2\xae\x90\xdb\x13\x82\xfe\xa3\x8f\xb7\xf7\x11\b\xa2'h@x\xa8\xb8\xc8\xc8&F\xd3(\xf2e\x18\xf90Y\x19r\x89\xd9#\xc1\x84\x06\xb5\x89\xa1\x19\xaa1J*\x9asZ\xfa\x18\xa3\xeajE\xf9*\xeb\x12;k\x1bwې\x98\xfb\x97J\n\xf8\xe7w\xbb\xbbQkG̛\xac\xbc\xfc\xc6\xda\xca\xec\xe5\vM\x15\r\x8df\xa0e\xbd\xe4\te\xbcI}=\x9dU\xa5-\xcd\xec\xecm\xad\xbe\xce\xde\ueb81\xac\x1e\xff\v\xac+l;\x0fM\x9c\xfe\xfb~\xb0\xef/ :u\xa6\x96\x81\xe3\x17\xea \xc1N\x17\xba\x19\x1cWM\x1c6r\x12\x13 \xfc\xe6,\xa0\xc6b\x8d\x1c\xf5i\xcc\xc7\f$\xa6z\xf6DV2\x99\f%/\x95\x1d[\xde\x1aX.\xcfB\x991-.dR\xc1\xa1\xb2\x82;\xcd=\xa49-\xa3ˡD\x8b\x1eb9\xec\xe3\xca{\vH\x1a\x9du\xf1i\xa5\xa8R\x0f\xc1\xac\x88\xa5fV\xac\x14\xcf1l\xa23\x19O\xb1>{\x02='\xb4\xaaڵlۺ}˫\x00\x00;", - - "images/treeview-gray-line.gif": "GIF89a\x10\x00\xf0\x06\xf7\x00\x00\x00\x00\x00\x80\x80\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xf9\x04\x01\x00\x00\xff\x00,\x00\x00\x00\x00\x10\x00\xf0\x06\x00\b\xff\x00\xff\t\x1c\xf8/\x00\xc1\x83\b\r\"\\X\x90\xe1B\x85\x0e\tB\x8c(p\"E\x8b\x111:\xd4\xc80\x80Ǐ\x1f\x1fR\x948r G\x91%\x1b\xa6<\x990\xa5ʒ,\x0f\xc6$\xb9\xd2\xe5L\x936s\xd6\xdc\tSgO\x9e#oV\xf4\x19\x94\xe8E\xa3\x19\x91nTڑ)ʟP\x8b\x02=:5iեW\x9bf}*5*U\xafV\xc1b\x15\xab\x95,\u05ef]Ӣ]\x1bVm[\xb6c\xddƅ[Vn]\xbag\xdfꝻ\xf7n\u07fc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\xd8=\t2p\x82\x02\xbc\xa0\x06\x1d\xb8A\vr\xf0\x83\x1e\f!\x05\xc7'\xc2\f\x82p\x84\xedC\xe1\xfbT\x18?\x16\xceτ%L`\f+\xe8\xc2\x00ʰ\x86\a\x84!\x0e#\xb8C\f\xdeP\x87@\xfc\xa1\x102i\x18D\"\x0e\x91\x84=\xec`\x12OXD$61\x85O\\a\x14[8\xc5\x17\x1e\x11\x8aW\x94b\x16\xa9\xb8E+\x1a\xf1\x8bN\xec\xa2\ri\b\x12\x90\x04\x04\x00;", - - "images/treeview-gray.gif": "GIF89a`\x00\x85\x00\xa1\x03\x00\x00\x00\x00\x80\x80\x80\xbc\xbc\xbc\xff\xff\xff!\xf9\x04\x01\x00\x00\x03\x00,\x00\x00\x00\x00`\x00\x85\x00\x00\x02\xfe\x9c\x8f\xa9\xcb\xed\x0f\x87\x98\xc2ш\xb3ި\xf2\x0f\x86\x9a'\x96\xa6I\x9e\xeaʶ\xee\x1aIJ\xfc\xd6f\xb0\xe0\xf6\xfe\xe9\x03p\xf0\xf1\x86\x11\x1f\xd0 $*\x198\x80\xd39\x98%\x97Kc\x90\x8aUX\x91\xd9.W\xeb\xedJg\xe1\xf2\xb4,F\xab\xcfj*\xbb\xad|Ç\xf2\xb9*u\xb5\xef\xf0_\xfdh\xf2p\x01\xe67RRG\x98\xc0\x87\xb8\xc8\xd8H8F\xe3\xa8rv(\x89Aiy\x82\x99i\xf8\xf3\x04$\xc5ٓ#*\xb2Y::\x88\xca\x01\x19\xb3\xda\xf9\xaa\x19+;\v[\x1bRyې{\xab\xc8[\xeb;+\xd80\x8c\xf0K\xa8\xa8q여\xeb\xfc\f\rݺ\xfcz\x1a\xadz\x14u\xcdt\x90M\xbd\xda\xf4\x19E\xb6\xdd\xe7]\x8e\x9d\x87\xaen\xbcn\xdc\xea\x1e/?O_\xef\xd5,\x8f\xffJ\x81_\xec\x1c\x9c\x8fT@U\xee\x00\xdac7oZB\x81\xf1\xb6h\x93\xe7\xf0\x1b\xaapO\xc6E*\x17q\xa1\x81ms\x10\x19\xbaSx0\xa4ȑ$%\x90\xd4W\xf0\x9a?\x05+{\x9d|Y2fL\x90\r=\xae\xb3v\xd3&:\x8aPB\xedԉ\x11\xe86\x9c;\xe1\xc9<\x8a4\xe9*\x94똢sZ\xaa\xe5\x01\xa9\xd7$\xea\xb2z\vk-\xad\xb3\xb8\x96\xa2\xf9QhU\xb1ш\x06\xfd\x04\x8a\\P\x829\xd9\xfet\x8bѨҹt\xebڽ\x8b7\xaf\x82\x02\x00;", - - "implements.html": ` -`, - - "jquery.js": `/*! jQuery v1.8.2 jquery.com | jquery.org/license */ -(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b
        a",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="
        t
        ",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="
        ",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;be.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="
        ",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="

        ",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/
  • ","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X
    ","
    "]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("
    ").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);`, - - "jquery.treeview.css": `/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.css */ -/* License: MIT. */ -.treeview, .treeview ul { - padding: 0; - margin: 0; - list-style: none; -} - -.treeview ul { - background-color: white; - margin-top: 4px; -} - -.treeview .hitarea { - background: url(images/treeview-default.gif) -64px -25px no-repeat; - height: 16px; - width: 16px; - margin-left: -16px; - float: left; - cursor: pointer; -} -/* fix for IE6 */ -* html .hitarea { - display: inline; - float:none; -} - -.treeview li { - margin: 0; - padding: 3px 0pt 3px 16px; -} - -.treeview a.selected { - background-color: #eee; -} - -#treecontrol { margin: 1em 0; display: none; } - -.treeview .hover { color: red; cursor: pointer; } - -.treeview li { background: url(images/treeview-default-line.gif) 0 0 no-repeat; } -.treeview li.collapsable, .treeview li.expandable { background-position: 0 -176px; } - -.treeview .expandable-hitarea { background-position: -80px -3px; } - -.treeview li.last { background-position: 0 -1766px } -.treeview li.lastCollapsable, .treeview li.lastExpandable { background-image: url(images/treeview-default.gif); } -.treeview li.lastCollapsable { background-position: 0 -111px } -.treeview li.lastExpandable { background-position: -32px -67px } - -.treeview div.lastCollapsable-hitarea, .treeview div.lastExpandable-hitarea { background-position: 0; } - -.treeview-red li { background-image: url(images/treeview-red-line.gif); } -.treeview-red .hitarea, .treeview-red li.lastCollapsable, .treeview-red li.lastExpandable { background-image: url(images/treeview-red.gif); } - -.treeview-black li { background-image: url(images/treeview-black-line.gif); } -.treeview-black .hitarea, .treeview-black li.lastCollapsable, .treeview-black li.lastExpandable { background-image: url(images/treeview-black.gif); } - -.treeview-gray li { background-image: url(images/treeview-gray-line.gif); } -.treeview-gray .hitarea, .treeview-gray li.lastCollapsable, .treeview-gray li.lastExpandable { background-image: url(images/treeview-gray.gif); } - -.treeview-famfamfam li { background-image: url(images/treeview-famfamfam-line.gif); } -.treeview-famfamfam .hitarea, .treeview-famfamfam li.lastCollapsable, .treeview-famfamfam li.lastExpandable { background-image: url(images/treeview-famfamfam.gif); } - -.treeview .placeholder { - background: url(images/ajax-loader.gif) 0 0 no-repeat; - height: 16px; - width: 16px; - display: block; -} - -.filetree li { padding: 3px 0 2px 16px; } -.filetree span.folder, .filetree span.file { padding: 1px 0 1px 16px; display: block; } -.filetree span.folder { background: url(images/folder.gif) 0 0 no-repeat; } -.filetree li.expandable span.folder { background: url(images/folder-closed.gif) 0 0 no-repeat; } -.filetree span.file { background: url(images/file.gif) 0 0 no-repeat; } -`, - - "jquery.treeview.edit.js": `/* https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.edit.js */ -/* License: MIT. */ -(function($) { - var CLASSES = $.treeview.classes; - var proxied = $.fn.treeview; - $.fn.treeview = function(settings) { - settings = $.extend({}, settings); - if (settings.add) { - return this.trigger("add", [settings.add]); - } - if (settings.remove) { - return this.trigger("remove", [settings.remove]); - } - return proxied.apply(this, arguments).bind("add", function(event, branches) { - $(branches).prev() - .removeClass(CLASSES.last) - .removeClass(CLASSES.lastCollapsable) - .removeClass(CLASSES.lastExpandable) - .find(">.hitarea") - .removeClass(CLASSES.lastCollapsableHitarea) - .removeClass(CLASSES.lastExpandableHitarea); - $(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings, $(this).data("toggler")); - }).bind("remove", function(event, branches) { - var prev = $(branches).prev(); - var parent = $(branches).parent(); - $(branches).remove(); - prev.filter(":last-child").addClass(CLASSES.last) - .filter("." + CLASSES.expandable).replaceClass(CLASSES.last, CLASSES.lastExpandable).end() - .find(">.hitarea").replaceClass(CLASSES.expandableHitarea, CLASSES.lastExpandableHitarea).end() - .filter("." + CLASSES.collapsable).replaceClass(CLASSES.last, CLASSES.lastCollapsable).end() - .find(">.hitarea").replaceClass(CLASSES.collapsableHitarea, CLASSES.lastCollapsableHitarea); - if (parent.is(":not(:has(>))") && parent[0] != this) { - parent.parent().removeClass(CLASSES.collapsable).removeClass(CLASSES.expandable) - parent.siblings(".hitarea").andSelf().remove(); - } - }); - }; - -})(jQuery); -`, - - "jquery.treeview.js": `/* - * Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree - * - * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ - * http://docs.jquery.com/Plugins/Treeview - * - * Copyright (c) 2007 Jörn Zaefferer - * - * Dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $ - * - */ - -;(function($) { - - // TODO rewrite as a widget, removing all the extra plugins - $.extend($.fn, { - swapClass: function(c1, c2) { - var c1Elements = this.filter('.' + c1); - this.filter('.' + c2).removeClass(c2).addClass(c1); - c1Elements.removeClass(c1).addClass(c2); - return this; - }, - replaceClass: function(c1, c2) { - return this.filter('.' + c1).removeClass(c1).addClass(c2).end(); - }, - hoverClass: function(className) { - className = className || "hover"; - return this.hover(function() { - $(this).addClass(className); - }, function() { - $(this).removeClass(className); - }); - }, - heightToggle: function(animated, callback) { - animated ? - this.animate({ height: "toggle" }, animated, callback) : - this.each(function(){ - jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ](); - if(callback) - callback.apply(this, arguments); - }); - }, - heightHide: function(animated, callback) { - if (animated) { - this.animate({ height: "hide" }, animated, callback); - } else { - this.hide(); - if (callback) - this.each(callback); - } - }, - prepareBranches: function(settings) { - if (!settings.prerendered) { - // mark last tree items - this.filter(":last-child:not(ul)").addClass(CLASSES.last); - // collapse whole tree, or only those marked as closed, anyway except those marked as open - this.filter((settings.collapsed ? "" : "." + CLASSES.closed) + ":not(." + CLASSES.open + ")").find(">ul").hide(); - } - // return all items with sublists - return this.filter(":has(>ul)"); - }, - applyClasses: function(settings, toggler) { - // TODO use event delegation - this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) { - // don't handle click events on children, eg. checkboxes - if ( this == event.target ) - toggler.apply($(this).next()); - }).add( $("a", this) ).hoverClass(); - - if (!settings.prerendered) { - // handle closed ones first - this.filter(":has(>ul:hidden)") - .addClass(CLASSES.expandable) - .replaceClass(CLASSES.last, CLASSES.lastExpandable); - - // handle open ones - this.not(":has(>ul:hidden)") - .addClass(CLASSES.collapsable) - .replaceClass(CLASSES.last, CLASSES.lastCollapsable); - - // create hitarea if not present - var hitarea = this.find("div." + CLASSES.hitarea); - if (!hitarea.length) - hitarea = this.prepend("
    ").find("div." + CLASSES.hitarea); - hitarea.removeClass().addClass(CLASSES.hitarea).each(function() { - var classes = ""; - $.each($(this).parent().attr("class").split(" "), function() { - classes += this + "-hitarea "; - }); - $(this).addClass( classes ); - }) - } - - // apply event to hitarea - this.find("div." + CLASSES.hitarea).click( toggler ); - }, - treeview: function(settings) { - - settings = $.extend({ - cookieId: "treeview" - }, settings); - - if ( settings.toggle ) { - var callback = settings.toggle; - settings.toggle = function() { - return callback.apply($(this).parent()[0], arguments); - }; - } - - // factory for treecontroller - function treeController(tree, control) { - // factory for click handlers - function handler(filter) { - return function() { - // reuse toggle event handler, applying the elements to toggle - // start searching for all hitareas - toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() { - // for plain toggle, no filter is provided, otherwise we need to check the parent element - return filter ? $(this).parent("." + filter).length : true; - }) ); - return false; - }; - } - // click on first element to collapse tree - $("a:eq(0)", control).click( handler(CLASSES.collapsable) ); - // click on second to expand tree - $("a:eq(1)", control).click( handler(CLASSES.expandable) ); - // click on third to toggle tree - $("a:eq(2)", control).click( handler() ); - } - - // handle toggle event - function toggler() { - $(this) - .parent() - // swap classes for hitarea - .find(">.hitarea") - .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) - .end() - // swap classes for parent li - .swapClass( CLASSES.collapsable, CLASSES.expandable ) - .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - // find child lists - .find( ">ul" ) - // toggle them - .heightToggle( settings.animated, settings.toggle ); - if ( settings.unique ) { - $(this).parent() - .siblings() - // swap classes for hitarea - .find(">.hitarea") - .replaceClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .replaceClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ) - .end() - .replaceClass( CLASSES.collapsable, CLASSES.expandable ) - .replaceClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - .find( ">ul" ) - .heightHide( settings.animated, settings.toggle ); - } - } - this.data("toggler", toggler); - - function serialize() { - function binary(arg) { - return arg ? 1 : 0; - } - var data = []; - branches.each(function(i, e) { - data[i] = $(e).is(":has(>ul:visible)") ? 1 : 0; - }); - $.cookie(settings.cookieId, data.join(""), settings.cookieOptions ); - } - - function deserialize() { - var stored = $.cookie(settings.cookieId); - if ( stored ) { - var data = stored.split(""); - branches.each(function(i, e) { - $(e).find(">ul")[ parseInt(data[i]) ? "show" : "hide" ](); - }); - } - } - - // add treeview class to activate styles - this.addClass("treeview"); - - // prepare branches and find all tree items with child lists - var branches = this.find("li").prepareBranches(settings); - - switch(settings.persist) { - case "cookie": - var toggleCallback = settings.toggle; - settings.toggle = function() { - serialize(); - if (toggleCallback) { - toggleCallback.apply(this, arguments); - } - }; - deserialize(); - break; - case "location": - var current = this.find("a").filter(function() { - return this.href.toLowerCase() == location.href.toLowerCase(); - }); - if ( current.length ) { - // TODO update the open/closed classes - var items = current.addClass("selected").parents("ul, li").add( current.next() ).show(); - if (settings.prerendered) { - // if prerendered is on, replicate the basic class swapping - items.filter("li") - .swapClass( CLASSES.collapsable, CLASSES.expandable ) - .swapClass( CLASSES.lastCollapsable, CLASSES.lastExpandable ) - .find(">.hitarea") - .swapClass( CLASSES.collapsableHitarea, CLASSES.expandableHitarea ) - .swapClass( CLASSES.lastCollapsableHitarea, CLASSES.lastExpandableHitarea ); - } - } - break; - } - - branches.applyClasses(settings, toggler); - - // if control option is set, create the treecontroller and show it - if ( settings.control ) { - treeController(this, settings.control); - $(settings.control).show(); - } - - return this; - } - }); - - // classes used by the plugin - // need to be styled via external stylesheet, see first example - $.treeview = {}; - var CLASSES = ($.treeview.classes = { - open: "open", - closed: "closed", - expandable: "expandable", - expandableHitarea: "expandable-hitarea", - lastExpandableHitarea: "lastExpandable-hitarea", - collapsable: "collapsable", - collapsableHitarea: "collapsable-hitarea", - lastCollapsableHitarea: "lastCollapsable-hitarea", - lastCollapsable: "lastCollapsable", - lastExpandable: "lastExpandable", - last: "last", - hitarea: "hitarea" - }); - -})(jQuery); -`, - - "methodset.html": ` -`, - - "opensearch.xml": ` - - godoc - The Go Programming Language - go golang - - - /favicon.ico - UTF-8 - UTF-8 - -`, - - "package.html": ` - -{{with .PDoc}} - - - {{if $.IsMain}} - {{/* command documentation */}} - {{comment_html .Doc}} - {{else}} - {{/* package documentation */}} -
    -
    -
    import "{{html .ImportPath}}"
    -
    -
    -
    Overview
    -
    Index
    - {{if $.Examples}} -
    Examples
    - {{end}} - {{if $.Dirs}} -
    Subdirectories
    - {{end}} -
    -
    - -
    - -
    -

    Overview ▾

    - {{comment_html .Doc}} -
    -
    - {{example_html $ ""}} - -
    - -
    -

    Index ▾

    - - -
    -
    - {{if .Consts}} -
    Constants
    - {{end}} - {{if .Vars}} -
    Variables
    - {{end}} - {{range .Funcs}} - {{$name_html := html .Name}} -
    {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{range .Types}} - {{$tname_html := html .Name}} -
    type {{$tname_html}}
    - {{range .Funcs}} - {{$name_html := html .Name}} -
        {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{range .Methods}} - {{$name_html := html .Name}} -
        {{node_html $ .Decl false | sanitize}}
    - {{end}} - {{end}} - {{if $.Notes}} - {{range $marker, $item := $.Notes}} -
    {{noteTitle $marker | html}}s
    - {{end}} - {{end}} -
    -
    - - {{if $.Examples}} -
    -

    Examples

    -
    - {{range $.Examples}} -
    {{example_name .Name}}
    - {{end}} -
    -
    - {{end}} - - {{with .Filenames}} -

    Package files

    -

    - - {{range .}} - {{.|filename|html}} - {{end}} - -

    - {{end}} -
    -
    - - - - {{with .Consts}} -

    Constants

    - {{range .}} - {{comment_html .Doc}} -
    {{node_html $ .Decl true}}
    - {{end}} - {{end}} - {{with .Vars}} -

    Variables

    - {{range .}} - {{comment_html .Doc}} -
    {{node_html $ .Decl true}}
    - {{end}} - {{end}} - {{range .Funcs}} - {{/* Name is a string - no need for FSet */}} - {{$name_html := html .Name}} -

    func {{$name_html}} - -

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{example_html $ .Name}} - {{callgraph_html $ "" .Name}} - - {{end}} - {{range .Types}} - {{$tname := .Name}} - {{$tname_html := html .Name}} -

    type {{$tname_html}} - -

    - {{comment_html .Doc}} -
    {{node_html $ .Decl true}}
    - - {{range .Consts}} - {{comment_html .Doc}} -
    {{node_html $ .Decl true}}
    - {{end}} - - {{range .Vars}} - {{comment_html .Doc}} -
    {{node_html $ .Decl true}}
    - {{end}} - - {{example_html $ $tname}} - {{implements_html $ $tname}} - {{methodset_html $ $tname}} - - {{range .Funcs}} - {{$name_html := html .Name}} -

    func {{$name_html}} - -

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{example_html $ .Name}} - {{callgraph_html $ "" .Name}} - {{end}} - - {{range .Methods}} - {{$name_html := html .Name}} -

    func ({{html .Recv}}) {{$name_html}} - -

    -
    {{node_html $ .Decl true}}
    - {{comment_html .Doc}} - {{$name := printf "%s_%s" $tname .Name}} - {{example_html $ $name}} - {{callgraph_html $ .Recv .Name}} - {{end}} - {{end}} - {{end}} - - {{with $.Notes}} - {{range $marker, $content := .}} -

    {{noteTitle $marker | html}}s

    -
      - {{range .}} -
    • {{comment_html .Body}}
    • - {{end}} -
    - {{end}} - {{end}} -{{end}} - -{{with .PAst}} - {{range $filename, $ast := .}} - {{$filename|filename|html}}:
    {{node_html $ $ast false}}
    - {{end}} -{{end}} - -{{with .Dirs}} - {{/* DirList entries are numbers and strings - no need for FSet */}} - {{if $.PDoc}} -

    Subdirectories

    - {{end}} - {{if eq $.Dirname "/src"}} - -

    Standard library

    - - {{end}} - - -
    -
    - - - - - - {{if not (or (eq $.Dirname "/src") (eq $.Dirname "/src/cmd") $.DirFlat)}} - - - - {{end}} - - {{range .List}} - {{if $.DirFlat}} - {{if .HasPkg}} - - - - - {{end}} - {{else}} - - - - - {{end}} - {{end}} -
    NameSynopsis
    ..
    - {{html .Path}} - - {{html .Synopsis}} -
    - {{html .Name}} - - {{html .Synopsis}} -
    -
    - - - {{if eq $.Dirname "/src"}} -

    Other packages

    - -

    Sub-repositories

    -

    - These packages are part of the Go Project but outside the main Go tree. - They are developed under looser compatibility requirements than the Go core. - Install them with "go get". -

    -
      -
    • benchmarks — benchmarks to measure Go as it is developed.
    • -
    • blogblog.golang.org's implementation.
    • -
    • buildbuild.golang.org's implementation.
    • -
    • crypto — additional cryptography packages.
    • -
    • debug — an experimental debugger for Go.
    • -
    • image — additional imaging packages.
    • -
    • mobile — experimental support for Go on mobile platforms.
    • -
    • net — additional networking packages.
    • -
    • sys — packages for making system calls.
    • -
    • text — packages for working with text.
    • -
    • tools — godoc, goimports, gorename, and other tools.
    • -
    • tourtour.golang.org's implementation.
    • -
    • exp — experimental and deprecated packages (handle with care; may change without warning).
    • -
    - -

    Community

    -

    - These services can help you find Open Source packages provided by the community. -

    - - {{end}} -{{end}} -`, - - "package.txt": `{{$info := .}}{{$filtered := .IsFiltered}}{{/* - ---------------------------------------- - -*/}}{{if $filtered}}{{range .PAst}}{{range .Decls}}{{node $info .}} - -{{end}}{{end}}{{else}}{{with .PAst}}{{range $filename, $ast := .}}{{$filename}}: -{{node $ $ast}}{{end}}{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{if and $filtered (not (or .PDoc .PAst))}}No match found. -{{end}}{{with .PDoc}}{{if $.IsMain}}COMMAND DOCUMENTATION - -{{comment_text .Doc " " "\t"}} -{{else}}{{if not $filtered}}PACKAGE DOCUMENTATION - -package {{.Name}} - import "{{.ImportPath}}" - -{{comment_text .Doc " " "\t"}} -{{example_text $ "" " "}}{{end}}{{/* - ---------------------------------------- - -*/}}{{with .Consts}}{{if not $filtered}}CONSTANTS - -{{end}}{{range .}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{with .Vars}}{{if not $filtered}}VARIABLES - -{{end}}{{range .}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{with .Funcs}}{{if not $filtered}}FUNCTIONS - -{{end}}{{range .}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{example_text $ .Name " "}}{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{with .Types}}{{if not $filtered}}TYPES - -{{end}}{{range .}}{{$tname := .Name}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{/* - ---------------------------------------- - -*/}}{{if .Consts}}{{range .Consts}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{if .Vars}}{{range .Vars}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{range $name := .Names}}{{example_text $ $name " "}}{{end}}{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{if .Funcs}}{{range .Funcs}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{example_text $ .Name " "}}{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{if .Methods}}{{range .Methods}}{{node $ .Decl}} -{{comment_text .Doc " " "\t"}} -{{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name " "}}{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{if and $filtered (not (or .Consts (or .Vars (or .Funcs .Types))))}}No match found. -{{end}}{{/* - ---------------------------------------- - -*/}}{{end}}{{/* - ---------------------------------------- - -*/}}{{with $.Notes}} -{{range $marker, $content := .}} -{{$marker}}S - -{{range $content}}{{comment_text .Body " " "\t"}} -{{end}}{{end}}{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{if not $filtered}}{{with .Dirs}}SUBDIRECTORIES -{{if $.DirFlat}}{{range .List}}{{if .HasPkg}} - {{.Path}}{{end}}{{end}} -{{else}}{{range .List}} - {{repeat ` + "`" + `. ` + "`" + ` .Depth}}{{.Name}}{{end}} -{{end}}{{end}}{{/* - ---------------------------------------- - -*/}}{{end}}{{/* -Make sure there is no newline at the end of this file. -perl -i -pe 'chomp if eof' package.txt -*/}} -`, - - "play.js": `// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -function initPlayground(transport) { - 'use strict'; - - function text(node) { - var s = ''; - for (var i = 0; i < node.childNodes.length; i++) { - var n = node.childNodes[i]; - if (n.nodeType === 1) { - if (n.tagName === 'BUTTON') continue - if (n.tagName === 'SPAN' && n.className === 'number') continue; - if (n.tagName === 'DIV' || n.tagName == 'BR') { - s += "\n"; - } - s += text(n); - continue; - } - if (n.nodeType === 3) { - s += n.nodeValue; - } - } - return s.replace('\xA0', ' '); // replace non-breaking spaces - } - - // When presenter notes are enabled, the index passed - // here will identify the playground to be synced - function init(code, index) { - var output = document.createElement('div'); - var outpre = document.createElement('pre'); - var running; - - if ($ && $(output).resizable) { - $(output).resizable({ - handles: 'n,w,nw', - minHeight: 27, - minWidth: 135, - maxHeight: 608, - maxWidth: 990 - }); - } - - function onKill() { - if (running) running.Kill(); - if (window.notesEnabled) updatePlayStorage('onKill', index); - } - - function onRun(e) { - var sk = e.shiftKey || localStorage.getItem('play-shiftKey') === 'true'; - if (running) running.Kill(); - output.style.display = 'block'; - outpre.innerHTML = ''; - run1.style.display = 'none'; - var options = {Race: sk}; - running = transport.Run(text(code), PlaygroundOutput(outpre), options); - if (window.notesEnabled) updatePlayStorage('onRun', index, e); - } - - function onClose() { - if (running) running.Kill(); - output.style.display = 'none'; - run1.style.display = 'inline-block'; - if (window.notesEnabled) updatePlayStorage('onClose', index); - } - - if (window.notesEnabled) { - playgroundHandlers.onRun.push(onRun); - playgroundHandlers.onClose.push(onClose); - playgroundHandlers.onKill.push(onKill); - } - - var run1 = document.createElement('button'); - run1.innerHTML = 'Run'; - run1.className = 'run'; - run1.addEventListener("click", onRun, false); - var run2 = document.createElement('button'); - run2.className = 'run'; - run2.innerHTML = 'Run'; - run2.addEventListener("click", onRun, false); - var kill = document.createElement('button'); - kill.className = 'kill'; - kill.innerHTML = 'Kill'; - kill.addEventListener("click", onKill, false); - var close = document.createElement('button'); - close.className = 'close'; - close.innerHTML = 'Close'; - close.addEventListener("click", onClose, false); - - var button = document.createElement('div'); - button.classList.add('buttons'); - button.appendChild(run1); - // Hack to simulate insertAfter - code.parentNode.insertBefore(button, code.nextSibling); - - var buttons = document.createElement('div'); - buttons.classList.add('buttons'); - buttons.appendChild(run2); - buttons.appendChild(kill); - buttons.appendChild(close); - - output.classList.add('output'); - output.appendChild(buttons); - output.appendChild(outpre); - output.style.display = 'none'; - code.parentNode.insertBefore(output, button.nextSibling); - } - - var play = document.querySelectorAll('div.playground'); - for (var i = 0; i < play.length; i++) { - init(play[i], i); - } -} -`, - - "playground.js": `// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -In the absence of any formal way to specify interfaces in JavaScript, -here's a skeleton implementation of a playground transport. - - function Transport() { - // Set up any transport state (eg, make a websocket connection). - return { - Run: function(body, output, options) { - // Compile and run the program 'body' with 'options'. - // Call the 'output' callback to display program output. - return { - Kill: function() { - // Kill the running program. - } - }; - } - }; - } - - // The output callback is called multiple times, and each time it is - // passed an object of this form. - var write = { - Kind: 'string', // 'start', 'stdout', 'stderr', 'end' - Body: 'string' // content of write or end status message - } - - // The first call must be of Kind 'start' with no body. - // Subsequent calls may be of Kind 'stdout' or 'stderr' - // and must have a non-null Body string. - // The final call should be of Kind 'end' with an optional - // Body string, signifying a failure ("killed", for example). - - // The output callback must be of this form. - // See PlaygroundOutput (below) for an implementation. - function outputCallback(write) { - } -*/ - -function HTTPTransport() { - 'use strict'; - - // TODO(adg): support stderr - - function playback(output, events) { - var timeout; - output({Kind: 'start'}); - function next() { - if (!events || events.length === 0) { - output({Kind: 'end'}); - return; - } - var e = events.shift(); - if (e.Delay === 0) { - output({Kind: 'stdout', Body: e.Message}); - next(); - return; - } - timeout = setTimeout(function() { - output({Kind: 'stdout', Body: e.Message}); - next(); - }, e.Delay / 1000000); - } - next(); - return { - Stop: function() { - clearTimeout(timeout); - } - } - } - - function error(output, msg) { - output({Kind: 'start'}); - output({Kind: 'stderr', Body: msg}); - output({Kind: 'end'}); - } - - var seq = 0; - return { - Run: function(body, output, options) { - seq++; - var cur = seq; - var playing; - $.ajax('/compile', { - type: 'POST', - data: {'version': 2, 'body': body}, - dataType: 'json', - success: function(data) { - if (seq != cur) return; - if (!data) return; - if (playing != null) playing.Stop(); - if (data.Errors) { - error(output, data.Errors); - return; - } - playing = playback(output, data.Events); - }, - error: function() { - error(output, 'Error communicating with remote server.'); - } - }); - return { - Kill: function() { - if (playing != null) playing.Stop(); - output({Kind: 'end', Body: 'killed'}); - } - }; - } - }; -} - -function SocketTransport() { - 'use strict'; - - var id = 0; - var outputs = {}; - var started = {}; - var websocket = new WebSocket('ws://' + window.location.host + '/socket'); - - websocket.onclose = function() { - console.log('websocket connection closed'); - } - - websocket.onmessage = function(e) { - var m = JSON.parse(e.data); - var output = outputs[m.Id]; - if (output === null) - return; - if (!started[m.Id]) { - output({Kind: 'start'}); - started[m.Id] = true; - } - output({Kind: m.Kind, Body: m.Body}); - } - - function send(m) { - websocket.send(JSON.stringify(m)); - } - - return { - Run: function(body, output, options) { - var thisID = id+''; - id++; - outputs[thisID] = output; - send({Id: thisID, Kind: 'run', Body: body, Options: options}); - return { - Kill: function() { - send({Id: thisID, Kind: 'kill'}); - } - }; - } - }; -} - -function PlaygroundOutput(el) { - 'use strict'; - - return function(write) { - if (write.Kind == 'start') { - el.innerHTML = ''; - return; - } - - var cl = 'system'; - if (write.Kind == 'stdout' || write.Kind == 'stderr') - cl = write.Kind; - - var m = write.Body; - if (write.Kind == 'end') { - m = '\nProgram exited' + (m?(': '+m):'.'); - } - - if (m.indexOf('IMAGE:') === 0) { - // TODO(adg): buffer all writes before creating image - var url = 'data:image/png;base64,' + m.substr(6); - var img = document.createElement('img'); - img.src = url; - el.appendChild(img); - return; - } - - // ^L clears the screen. - var s = m.split('\x0c'); - if (s.length > 1) { - el.innerHTML = ''; - m = s.pop(); - } - - m = m.replace(/&/g, '&'); - m = m.replace(//g, '>'); - - var needScroll = (el.scrollTop + el.offsetHeight) == el.scrollHeight; - - var span = document.createElement('span'); - span.className = cl; - span.innerHTML = m; - el.appendChild(span); - - if (needScroll) - el.scrollTop = el.scrollHeight - el.offsetHeight; - } -} - -(function() { - function lineHighlight(error) { - var regex = /prog.go:([0-9]+)/g; - var r = regex.exec(error); - while (r) { - $(".lines div").eq(r[1]-1).addClass("lineerror"); - r = regex.exec(error); - } - } - function highlightOutput(wrappedOutput) { - return function(write) { - if (write.Body) lineHighlight(write.Body); - wrappedOutput(write); - } - } - function lineClear() { - $(".lineerror").removeClass("lineerror"); - } - - // opts is an object with these keys - // codeEl - code editor element - // outputEl - program output element - // runEl - run button element - // fmtEl - fmt button element (optional) - // fmtImportEl - fmt "imports" checkbox element (optional) - // shareEl - share button element (optional) - // shareURLEl - share URL text input element (optional) - // shareRedirect - base URL to redirect to on share (optional) - // toysEl - toys select element (optional) - // enableHistory - enable using HTML5 history API (optional) - // transport - playground transport to use (default is HTTPTransport) - // enableShortcuts - whether to enable shortcuts (Ctrl+S/Cmd+S to save) (default is false) - function playground(opts) { - var code = $(opts.codeEl); - var transport = opts['transport'] || new HTTPTransport(); - var running; - - // autoindent helpers. - function insertTabs(n) { - // find the selection start and end - var start = code[0].selectionStart; - var end = code[0].selectionEnd; - // split the textarea content into two, and insert n tabs - var v = code[0].value; - var u = v.substr(0, start); - for (var i=0; i 0) { - curpos--; - if (el.value[curpos] == "\t") { - tabs++; - } else if (tabs > 0 || el.value[curpos] == "\n") { - break; - } - } - setTimeout(function() { - insertTabs(tabs); - }, 1); - } - - // NOTE(cbro): e is a jQuery event, not a DOM event. - function handleSaveShortcut(e) { - if (e.isDefaultPrevented()) return false; - if (!e.metaKey && !e.ctrlKey) return false; - if (e.key != "S" && e.key != "s") return false; - - e.preventDefault(); - - // Share and save - share(function(url) { - window.location.href = url + ".go?download=true"; - }); - - return true; - } - - function keyHandler(e) { - if (opts.enableShortcuts && handleSaveShortcut(e)) return; - - if (e.keyCode == 9 && !e.ctrlKey) { // tab (but not ctrl-tab) - insertTabs(1); - e.preventDefault(); - return false; - } - if (e.keyCode == 13) { // enter - if (e.shiftKey) { // +shift - run(); - e.preventDefault(); - return false; - } if (e.ctrlKey) { // +control - fmt(); - e.preventDefault(); - } else { - autoindent(e.target); - } - } - return true; - } - code.unbind('keydown').bind('keydown', keyHandler); - var outdiv = $(opts.outputEl).empty(); - var output = $('
    ').appendTo(outdiv);
    -
    -    function body() {
    -      return $(opts.codeEl).val();
    -    }
    -    function setBody(text) {
    -      $(opts.codeEl).val(text);
    -    }
    -    function origin(href) {
    -      return (""+href).split("/").slice(0, 3).join("/");
    -    }
    -
    -    var pushedEmpty = (window.location.pathname == "/");
    -    function inputChanged() {
    -      if (pushedEmpty) {
    -        return;
    -      }
    -      pushedEmpty = true;
    -      $(opts.shareURLEl).hide();
    -      window.history.pushState(null, "", "/");
    -    }
    -    function popState(e) {
    -      if (e === null) {
    -        return;
    -      }
    -      if (e && e.state && e.state.code) {
    -        setBody(e.state.code);
    -      }
    -    }
    -    var rewriteHistory = false;
    -    if (window.history && window.history.pushState && window.addEventListener && opts.enableHistory) {
    -      rewriteHistory = true;
    -      code[0].addEventListener('input', inputChanged);
    -      window.addEventListener('popstate', popState);
    -    }
    -
    -    function setError(error) {
    -      if (running) running.Kill();
    -      lineClear();
    -      lineHighlight(error);
    -      output.empty().addClass("error").text(error);
    -    }
    -    function loading() {
    -      lineClear();
    -      if (running) running.Kill();
    -      output.removeClass("error").text('Waiting for remote server...');
    -    }
    -    function run() {
    -      loading();
    -      running = transport.Run(body(), highlightOutput(PlaygroundOutput(output[0])));
    -    }
    -
    -    function fmt() {
    -      loading();
    -      var data = {"body": body()};
    -      if ($(opts.fmtImportEl).is(":checked")) {
    -        data["imports"] = "true";
    -      }
    -      $.ajax("/fmt", {
    -        data: data,
    -        type: "POST",
    -        dataType: "json",
    -        success: function(data) {
    -          if (data.Error) {
    -            setError(data.Error);
    -          } else {
    -            setBody(data.Body);
    -            setError("");
    -          }
    -        }
    -      });
    -    }
    -
    -    var shareURL; // jQuery element to show the shared URL.
    -    var sharing = false; // true if there is a pending request.
    -    var shareCallbacks = [];
    -    function share(opt_callback) {
    -      if (opt_callback) shareCallbacks.push(opt_callback);
    -
    -      if (sharing) return;
    -      sharing = true;
    -
    -      var sharingData = body();
    -      $.ajax("/share", {
    -        processData: false,
    -        data: sharingData,
    -        type: "POST",
    -        contentType: "text/plain; charset=utf-8",
    -        complete: function(xhr) {
    -          sharing = false;
    -          if (xhr.status != 200) {
    -            alert("Server error; try again.");
    -            return;
    -          }
    -          if (opts.shareRedirect) {
    -            window.location = opts.shareRedirect + xhr.responseText;
    -          }
    -          var path = "/p/" + xhr.responseText;
    -          var url = origin(window.location) + path;
    -
    -          for (var i = 0; i < shareCallbacks.length; i++) {
    -            shareCallbacks[i](url);
    -          }
    -          shareCallbacks = [];
    -
    -          if (shareURL) {
    -            shareURL.show().val(url).focus().select();
    -
    -            if (rewriteHistory) {
    -              var historyData = {"code": sharingData};
    -              window.history.pushState(historyData, "", path);
    -              pushedEmpty = false;
    -            }
    -          }
    -        }
    -      });
    -    }
    -
    -    $(opts.runEl).click(run);
    -    $(opts.fmtEl).click(fmt);
    -
    -    if (opts.shareEl !== null && (opts.shareURLEl !== null || opts.shareRedirect !== null)) {
    -      if (opts.shareURLEl) {
    -        shareURL = $(opts.shareURLEl).hide();
    -      }
    -      $(opts.shareEl).click(function() {
    -        share();
    -      });
    -    }
    -
    -    if (opts.toysEl !== null) {
    -      $(opts.toysEl).bind('change', function() {
    -        var toy = $(this).val();
    -        $.ajax("/doc/play/"+toy, {
    -          processData: false,
    -          type: "GET",
    -          complete: function(xhr) {
    -            if (xhr.status != 200) {
    -              alert("Server error; try again.");
    -              return;
    -            }
    -            setBody(xhr.responseText);
    -          }
    -        });
    -      });
    -    }
    -  }
    -
    -  window.playground = playground;
    -})();
    -`,
    -
    -	"search.html": `
    -{{with .Alert}}
    -	

    - {{html .}} -

    -{{end}} -{{with .Alt}} -

    - Did you mean: - {{range .Alts}} - {{html .}} - {{end}} -

    -{{end}} -`, - - "search.txt": `QUERY - {{.Query}} - -{{with .Alert}}{{.}} -{{end}}{{/* .Alert */}}{{/* - ---------------------------------------- - -*/}}{{with .Alt}}DID YOU MEAN - -{{range .Alts}} {{.}} -{{end}} -{{end}}{{/* .Alt */}}{{/* - ---------------------------------------- - -*/}}{{with .Pak}}PACKAGE {{$.Query}} - -{{range .}} {{pkgLink .Pak.Path}} -{{end}} -{{end}}{{/* .Pak */}}{{/* - ---------------------------------------- - -*/}}{{range $key, $val := .Idents}}{{if $val}}{{$key.Name}} -{{range $val}} {{.Path}}.{{.Name}} -{{end}} -{{end}}{{end}}{{/* .Idents */}}{{/* - ---------------------------------------- - -*/}}{{with .Hit}}{{with .Decls}}PACKAGE-LEVEL DECLARATIONS - -{{range .}}package {{.Pak.Name}} -{{range $file := .Files}}{{range .Groups}}{{range .}} {{srcLink $file.File.Path}}:{{infoLine .}}{{end}} -{{end}}{{end}}{{/* .Files */}} -{{end}}{{end}}{{/* .Decls */}}{{/* - ---------------------------------------- - -*/}}{{with .Others}}LOCAL DECLARATIONS AND USES - -{{range .}}package {{.Pak.Name}} -{{range $file := .Files}}{{range .Groups}}{{range .}} {{srcLink $file.File.Path}}:{{infoLine .}} -{{end}}{{end}}{{end}}{{/* .Files */}} -{{end}}{{end}}{{/* .Others */}}{{end}}{{/* .Hit */}}{{/* - ---------------------------------------- - -*/}}{{if .Textual}}{{if .Complete}}{{.Found}} TEXTUAL OCCURRENCES{{else}}MORE THAN {{.Found}} TEXTUAL OCCURRENCES{{end}} - -{{range .Textual}}{{len .Lines}} {{srcLink .Filename}} -{{end}}{{if not .Complete}}... ... -{{end}}{{end}} -`, - - "searchcode.html": ` -{{$query_url := urlquery .Query}} -{{if not .Idents}} - {{with .Pak}} -

    Package {{html $.Query}}

    -

    - - {{range .}} - {{$pkg_html := pkgLink .Pak.Path | html}} - - {{end}} -
    {{$pkg_html}}
    -

    - {{end}} -{{end}} -{{with .Hit}} - {{with .Decls}} -

    Package-level declarations

    - {{range .}} - {{$pkg_html := pkgLink .Pak.Path | html}} -

    package {{html .Pak.Name}}

    - {{range .Files}} - {{$file := .File.Path}} - {{range .Groups}} - {{range .}} - {{$line := infoLine .}} - {{$file}}:{{$line}} - {{infoSnippet_html .}} - {{end}} - {{end}} - {{end}} - {{end}} - {{end}} - {{with .Others}} -

    Local declarations and uses

    - {{range .}} - {{$pkg_html := pkgLink .Pak.Path | html}} -

    package {{html .Pak.Name}}

    - {{range .Files}} - {{$file := .File.Path}} - {{$file}} - - {{range .Groups}} - - - - - - - {{end}} -
    {{index . 0 | infoKind_html}} - {{range .}} - {{$line := infoLine .}} - {{$line}} - {{end}} -
    - {{end}} - {{end}} - {{end}} -{{end}} -`, - - "searchdoc.html": ` -{{range $key, $val := .Idents}} - {{if $val}} -

    {{$key.Name}}

    - {{range $val}} - {{$pkg_html := pkgLink .Path | html}} - {{if eq "Packages" $key.Name}} - {{html .Path}} - {{else}} - {{$doc_html := docLink .Path .Name| html}} - {{html .Package}}.{{.Name}} - {{end}} - {{if .Doc}} -

    {{comment_html .Doc}}

    - {{else}} -

    No documentation available

    - {{end}} - {{end}} - {{end}} -{{end}} -`, - - "searchtxt.html": ` -{{$query_url := urlquery .Query}} -{{with .Textual}} - {{if $.Complete}} -

    {{html $.Found}} textual occurrences

    - {{else}} -

    More than {{html $.Found}} textual occurrences

    -

    - Not all files or lines containing "{{html $.Query}}" are shown. -

    - {{end}} -

    - - {{range .}} - {{$file := .Filename}} - - - - - - - - {{end}} - {{if not $.Complete}} - - {{end}} -
    - {{$file}}: - {{len .Lines}} - {{range .Lines}} - {{html .}} - {{end}} - {{if not $.Complete}} - ... - {{end}} -
    ...
    -

    -{{end}} -`, - - "style.css": `body { - margin: 0; - font-family: Arial, sans-serif; - font-size: 16px; - background-color: #fff; - line-height: 1.3em; -} -pre, -code { - font-family: Menlo, monospace; - font-size: 14px; -} -pre { - line-height: 1.4em; - overflow-x: auto; -} -pre .comment { - color: #006600; -} -pre .highlight, -pre .highlight-comment, -pre .selection-highlight, -pre .selection-highlight-comment { - background: #FFFF00; -} -pre .selection, -pre .selection-comment { - background: #FF9632; -} -pre .ln { - color: #999; - background: #efefef; -} -.ln { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -body { - color: #222; -} -a, -.exampleHeading .text { - color: #375EAB; - text-decoration: none; -} -a:hover, -.exampleHeading .text:hover { - text-decoration: underline; -} -.article a { - text-decoration: underline; -} -.article .title a { - text-decoration: none; -} - -.permalink { - display: none; -} -:hover > .permalink { - display: inline; -} - -p, li { - max-width: 800px; - word-wrap: break-word; -} -p, -pre, -ul, -ol { - margin: 20px; -} -pre { - background: #EFEFEF; - padding: 10px; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} - -h1, -h2, -h3, -h4, -.rootHeading { - margin: 20px 0 20px; - padding: 0; - color: #375EAB; - font-weight: bold; -} -h1 { - font-size: 28px; - line-height: 1; -} -h1 .text-muted { - color:#777; -} -h2 { - font-size: 20px; - background: #E0EBF5; - padding: 8px; - line-height: 1.25; - font-weight: normal; -} -h2 a { - font-weight: bold; -} -h3 { - font-size: 20px; -} -h3, -h4 { - margin: 20px 5px; -} -h4 { - font-size: 16px; -} -.rootHeading { - font-size: 20px; - margin: 0; -} - -dl { - margin: 20px; -} -dd { - margin: 0 0 0 20px; -} -dl, -dd { - font-size: 14px; -} -div#nav table td { - vertical-align: top; -} - - -#pkg-index h3 { - font-size: 16px; -} -.pkg-dir { - padding: 0 10px; -} -.pkg-dir table { - border-collapse: collapse; - border-spacing: 0; -} -.pkg-name { - padding-right: 10px; -} -.alert { - color: #AA0000; -} - -.top-heading { - float: left; - padding: 21px 0; - font-size: 20px; - font-weight: normal; -} -.top-heading a { - color: #222; - text-decoration: none; -} - -div#topbar { - background: #E0EBF5; - height: 64px; - overflow: hidden; -} - -body { - text-align: center; -} -div#page { - width: 100%; -} -div#page > .container, -div#topbar > .container { - text-align: left; - margin-left: auto; - margin-right: auto; - padding: 0 20px; -} -div#topbar > .container, -div#page > .container { - max-width: 950px; -} -div#page.wide > .container, -div#topbar.wide > .container { - max-width: none; -} -div#plusone { - float: right; - clear: right; - margin-top: 5px; -} - -div#footer { - text-align: center; - color: #666; - font-size: 14px; - margin: 40px 0; -} - -div#menu > a, -input#search, -div#learn .buttons a, -div.play .buttons a, -div#blog .read a, -#menu-button { - padding: 10px; - - text-decoration: none; - font-size: 16px; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -div#playground .buttons a, -div#menu > a, -input#search, -#menu-button { - border: 1px solid #375EAB; -} -div#playground .buttons a, -div#menu > a, -#menu-button { - color: white; - background: #375EAB; -} -#playgroundButton.active { - background: white; - color: #375EAB; -} -a#start, -div#learn .buttons a, -div.play .buttons a, -div#blog .read a { - color: #222; - border: 1px solid #375EAB; - background: #E0EBF5; -} -.download { - width: 150px; -} - -div#menu { - text-align: right; - padding: 10px; - white-space: nowrap; - max-height: 0; - -moz-transition: max-height .25s linear; - transition: max-height .25s linear; - width: 100%; -} -div#menu.menu-visible { - max-height: 500px; -} -div#menu > a, -#menu-button { - margin: 10px 2px; - padding: 10px; -} -::-webkit-input-placeholder { - color: #7f7f7f; - opacity: 1; -} -::placeholder { - color: #7f7f7f; - opacity: 1; -} -#menu .search-box { - display: inline-flex; - width: 140px; -} -input#search { - background: white; - color: #222; - box-sizing: border-box; - -webkit-appearance: none; - border-top-right-radius: 0; - border-bottom-right-radius: 0; - border-right: 0; - margin-right: 0; - flex-grow: 1; - max-width: 100%; - min-width: 90px; -} -input#search:-moz-ui-invalid { - box-shadow: unset; -} -input#search + button { - display: inline; - font-size: 1em; - background-color: #375EAB; - color: white; - border: 1px solid #375EAB; - border-top-left-radius: 0; - border-top-right-radius: 5px; - border-bottom-left-radius: 0; - border-bottom-right-radius: 5px; - margin-left: 0; - cursor: pointer; -} -input#search + button span { - display: flex; -} -input#search + button svg { - fill: white -} - -#menu-button { - display: none; - position: absolute; - right: 5px; - top: 0; - margin-right: 5px; -} -#menu-button-arrow { - display: inline-block; -} -.vertical-flip { - transform: rotate(-180deg); -} - -div.left { - float: left; - clear: left; - margin-right: 2.5%; -} -div.right { - float: right; - clear: right; - margin-left: 2.5%; -} -div.left, -div.right { - width: 45%; -} - -div#learn, -div#about { - padding-top: 20px; -} -div#learn h2, -div#about { - margin: 0; -} -div#about { - font-size: 20px; - margin: 0 auto 30px; -} -div#gopher { - background: url(/doc/gopher/frontpage.png) no-repeat; - background-position: center top; - height: 155px; -} -a#start { - display: block; - padding: 10px; - - text-align: center; - text-decoration: none; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -a#start .big { - display: block; - font-weight: bold; - font-size: 20px; -} -a#start .desc { - display: block; - font-size: 14px; - font-weight: normal; - margin-top: 5px; -} - -div#learn .popout { - float: right; - display: block; - cursor: pointer; - font-size: 12px; - background: url(/doc/share.png) no-repeat; - background-position: right top; - padding: 5px 27px; -} -div#learn pre, -div#learn textarea { - padding: 0; - margin: 0; - font-family: Menlo, monospace; - font-size: 14px; -} -div#learn .input { - padding: 10px; - margin-top: 10px; - height: 150px; - - -webkit-border-top-left-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} -div#learn .input textarea { - width: 100%; - height: 100%; - border: none; - outline: none; - resize: none; -} -div#learn .output { - border-top: none !important; - - padding: 10px; - height: 59px; - overflow: auto; - - -webkit-border-bottom-right-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-bottomleft: 5px; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; -} -div#learn .output pre { - padding: 0; - - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -div#learn .input, -div#learn .input textarea, -div#learn .output, -div#learn .output pre { - background: #FFFFD8; -} -div#learn .input, -div#learn .output { - border: 1px solid #375EAB; -} -div#learn .buttons { - float: right; - padding: 20px 0 10px 0; - text-align: right; -} -div#learn .buttons a { - height: 16px; - margin-left: 5px; - padding: 10px; -} -div#learn .toys { - margin-top: 8px; -} -div#learn .toys select { - border: 1px solid #375EAB; - margin: 0; -} -div#learn .output .exit { - display: none; -} - -div#video { - max-width: 100%; -} -div#blog, -div#video { - margin-top: 40px; -} -div#blog > a, -div#blog > div, -div#blog > h2, -div#video > a, -div#video > div, -div#video > h2 { - margin-bottom: 10px; -} -div#blog .title, -div#video .title { - display: block; - font-size: 20px; -} -div#blog .when { - color: #666; - font-size: 14px; -} -div#blog .read { - text-align: right; -} - -.toggleButton { cursor: pointer; } -.toggle > .collapsed { display: block; } -.toggle > .expanded { display: none; } -.toggleVisible > .collapsed { display: none; } -.toggleVisible > .expanded { display: block; } - -table.codetable { margin-left: auto; margin-right: auto; border-style: none; } -table.codetable td { padding-right: 10px; } -hr { border-style: none; border-top: 1px solid black; } - -img.gopher { - float: right; - margin-left: 10px; - margin-bottom: 10px; - z-index: -1; -} -h2 { clear: right; } - -/* example and drop-down playground */ -div.play { - padding: 0 20px 40px 20px; -} -div.play pre, -div.play textarea, -div.play .lines { - padding: 0; - margin: 0; - font-family: Menlo, monospace; - font-size: 14px; -} -div.play .input { - padding: 10px; - margin-top: 10px; - - -webkit-border-top-left-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - - overflow: hidden; -} -div.play .input textarea { - width: 100%; - height: 100%; - border: none; - outline: none; - resize: none; - - overflow: hidden; -} -div#playground .input textarea { - overflow: auto; - resize: auto; -} -div.play .output { - border-top: none !important; - - padding: 10px; - max-height: 200px; - overflow: auto; - - -webkit-border-bottom-right-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-bottomleft: 5px; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; -} -div.play .output pre { - padding: 0; - - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -div.play .input, -div.play .input textarea, -div.play .output, -div.play .output pre { - background: #FFFFD8; -} -div.play .input, -div.play .output { - border: 1px solid #375EAB; -} -div.play .buttons { - float: right; - padding: 20px 0 10px 0; - text-align: right; -} -div.play .buttons a { - height: 16px; - margin-left: 5px; - padding: 10px; - cursor: pointer; -} -.output .stderr { - color: #933; -} -.output .system { - color: #999; -} - -/* drop-down playground */ -#playgroundButton, -div#playground { - /* start hidden; revealed by javascript */ - display: none; -} -div#playground { - position: absolute; - top: 63px; - right: 20px; - padding: 0 10px 10px 10px; - z-index: 1; - text-align: left; - background: #E0EBF5; - - border: 1px solid #B0BBC5; - border-top: none; - - -webkit-border-bottom-left-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -moz-border-radius-bottomleft: 5px; - -moz-border-radius-bottomright: 5px; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; -} -div#playground .code { - width: 520px; - height: 200px; -} -div#playground .output { - height: 100px; -} - -/* Inline runnable snippets (play.js/initPlayground) */ -#content .code pre, #content .playground pre, #content .output pre { - margin: 0; - padding: 0; - background: none; - border: none; - outline: 0px solid transparent; - overflow: auto; -} -#content .playground .number, #content .code .number { - color: #999; -} -#content .code, #content .playground, #content .output { - width: auto; - margin: 20px; - padding: 10px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -#content .code, #content .playground { - background: #e9e9e9; -} -#content .output { - background: #202020; -} -#content .output .stdout, #content .output pre { - color: #e6e6e6; -} -#content .output .stderr, #content .output .error { - color: rgb(244, 74, 63); -} -#content .output .system, #content .output .exit { - color: rgb(255, 209, 77) -} -#content .buttons { - position: relative; - float: right; - top: -50px; - right: 30px; -} -#content .output .buttons { - top: -60px; - right: 0; - height: 0; -} -#content .buttons .kill { - display: none; - visibility: hidden; -} -a.error { - font-weight: bold; - color: white; - background-color: darkred; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - padding: 2px 4px 2px 4px; /* TRBL */ -} - - -#heading-narrow { - display: none; -} - -.downloading { - background: #F9F9BE; - padding: 10px; - text-align: center; - border-radius: 5px; -} - -@media (max-width: 930px) { - #heading-wide { - display: none; - } - #heading-narrow { - display: block; - } -} - - -@media (max-width: 760px) { - .container .left, - .container .right { - width: auto; - float: none; - } - - div#about { - max-width: 500px; - text-align: center; - } -} - -@media (min-width: 700px) and (max-width: 1000px) { - div#menu > a { - margin: 5px 0; - font-size: 14px; - } - - input#search { - font-size: 14px; - } -} - -@media (max-width: 700px) { - body { - font-size: 15px; - } - - pre, - code { - font-size: 13px; - } - - div#page > .container { - padding: 0 10px; - } - - div#topbar { - height: auto; - padding: 10px; - } - - div#topbar > .container { - padding: 0; - } - - #heading-wide { - display: block; - } - #heading-narrow { - display: none; - } - - .top-heading { - float: none; - display: inline-block; - padding: 12px; - } - - div#menu { - padding: 0; - min-width: 0; - text-align: left; - float: left; - } - - div#menu > a { - display: block; - margin-left: 0; - margin-right: 0; - } - - #menu .search-box { - display: flex; - width: 100%; - } - - #menu-button { - display: inline-block; - } - - p, - pre, - ul, - ol { - margin: 10px; - } - - .pkg-synopsis { - display: none; - } - - img.gopher { - display: none; - } -} - -@media (max-width: 480px) { - #heading-wide { - display: none; - } - #heading-narrow { - display: block; - } -} - -@media print { - pre { - background: #FFF; - border: 1px solid #BBB; - white-space: pre-wrap; - } -} -`, + "style.css": "body\x20{\x0a\x09margin:\x200;\x0a\x09font-family:\x20Arial,\x20sans-serif;\x0a\x09background-color:\x20#fff;\x0a\x09line-height:\x201.3;\x0a\x09text-align:\x20center;\x0a\x09color:\x20#222;\x0a}\x0apre,\x0acode\x20{\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0apre\x20{\x0a\x09line-height:\x201.4;\x0a\x09overflow-x:\x20auto;\x0a}\x0apre\x20.comment\x20{\x0a\x09color:\x20#006600;\x0a}\x0apre\x20.highlight,\x0apre\x20.highlight-comment,\x0apre\x20.selection-highlight,\x0apre\x20.selection-highlight-comment\x20{\x0a\x09background:\x20#FFFF00;\x0a}\x0apre\x20.selection,\x0apre\x20.selection-comment\x20{\x0a\x09background:\x20#FF9632;\x0a}\x0apre\x20.ln\x20{\x0a\x09color:\x20#999;\x0a\x09background:\x20#efefef;\x0a}\x0a.ln\x20{\x0a\x09-webkit-user-select:\x20none;\x0a\x09-moz-user-select:\x20none;\x0a\x09-ms-user-select:\x20none;\x0a\x09user-select:\x20none;\x0a}\x0a\x0aa,\x0a.exampleHeading\x20.text,\x0a.expandAll\x20{\x0a\x09color:\x20#375EAB;\x0a\x09text-decoration:\x20none;\x0a}\x0aa:hover,\x0a.exampleHeading\x20.text:hover,\x0a.expandAll:hover\x20{\x0a\x09text-decoration:\x20underline;\x0a}\x0a.article\x20a\x20{\x0a\x09text-decoration:\x20underline;\x0a}\x0a.article\x20.title\x20a\x20{\x0a\x09text-decoration:\x20none;\x0a}\x0a\x0a.permalink\x20{\x0a\x09display:\x20none;\x0a}\x0a:hover\x20>\x20.permalink\x20{\x0a\x09display:\x20inline;\x0a}\x0a\x0ap,\x20li\x20{\x0a\x09max-width:\x2050rem;\x0a\x09word-wrap:\x20break-word;\x0a}\x0ap,\x0apre,\x0aul,\x0aol\x20{\x0a\x09margin:\x201.25rem;\x0a}\x0apre\x20{\x0a\x09background:\x20#EFEFEF;\x0a\x09padding:\x200.625rem;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0a\x0ah1,\x0ah2,\x0ah3,\x0ah4,\x0a.rootHeading\x20{\x0a\x09margin:\x201.25rem\x200\x201.25rem;\x0a\x09padding:\x200;\x0a\x09color:\x20#375EAB;\x0a\x09font-weight:\x20bold;\x0a}\x0ah1\x20{\x0a\x09font-size:\x201.75rem;\x0a\x09line-height:\x201;\x0a}\x0ah1\x20.text-muted\x20{\x0a\x09color:#777;\x0a}\x0ah2\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09background:\x20#E0EBF5;\x0a\x09padding:\x200.5rem;\x0a\x09line-height:\x201.25;\x0a\x09font-weight:\x20normal;\x0a\x09overflow:\x20auto;\x0a\x09overflow-wrap:\x20break-word;\x0a}\x0ah2\x20a\x20{\x0a\x09font-weight:\x20bold;\x0a}\x0ah3\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09line-height:\x201.25;\x0a\x09overflow:\x20auto;\x0a\x09overflow-wrap:\x20break-word;\x0a}\x0ah3,\x0ah4\x20{\x0a\x09margin:\x201.25rem\x200.3125rem;\x0a}\x0ah4\x20{\x0a\x09font-size:\x201rem;\x0a}\x0a.rootHeading\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09margin:\x200;\x0a}\x0a\x0ah2\x20>\x20span,\x0ah3\x20>\x20span\x20{\x0a\x09float:\x20right;\x0a\x09margin:\x200\x2025px\x200\x200;\x0a\x09font-weight:\x20normal;\x0a\x09color:\x20#5279C7;\x0a}\x0a\x0adl\x20{\x0a\x09margin:\x201.25rem;\x0a}\x0add\x20{\x0a\x09margin:\x200\x200\x200\x201.25rem;\x0a}\x0adl,\x0add\x20{\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#nav\x20table\x20td\x20{\x0a\x09vertical-align:\x20top;\x0a}\x0a\x0a#pkg-index\x20h3\x20{\x0a\x09font-size:\x201rem;\x0a}\x0a.pkg-dir\x20{\x0a\x09padding:\x200\x200.625rem;\x0a}\x0a.pkg-dir\x20table\x20{\x0a\x09border-collapse:\x20collapse;\x0a\x09border-spacing:\x200;\x0a}\x0a.pkg-name\x20{\x0a\x09padding-right:\x200.625rem;\x0a}\x0a.alert\x20{\x0a\x09color:\x20#AA0000;\x0a}\x0a\x0a.top-heading\x20{\x0a\x09float:\x20left;\x0a\x09padding:\x201.313rem\x200;\x0a\x09font-size:\x201.25rem;\x0a\x09font-weight:\x20normal;\x0a}\x0a.top-heading\x20a\x20{\x0a\x09color:\x20#222;\x0a\x09text-decoration:\x20none;\x0a}\x0a\x0a#pkg-examples\x20h3\x20{\x0a\x09float:\x20left;\x0a}\x0a\x0a#pkg-examples\x20dl\x20{\x0a\x09clear:\x20both;\x0a}\x0a\x0a.expandAll\x20{\x0a\x09cursor:\x20pointer;\x0a\x09float:\x20left;\x0a\x09margin:\x201.25rem\x200;\x0a}\x0a\x0adiv#topbar\x20{\x0a\x09background:\x20#E0EBF5;\x0a\x09height:\x204rem;\x0a\x09overflow:\x20hidden;\x0a}\x0a\x0adiv#page\x20{\x0a\x09width:\x20100%;\x0a}\x0adiv#page\x20>\x20.container,\x0adiv#topbar\x20>\x20.container\x20{\x0a\x09text-align:\x20left;\x0a\x09margin-left:\x20auto;\x0a\x09margin-right:\x20auto;\x0a\x09padding:\x200\x201.25rem;\x0a}\x0adiv#topbar\x20>\x20.container,\x0adiv#page\x20>\x20.container\x20{\x0a\x09max-width:\x2059.38rem;\x0a}\x0adiv#page.wide\x20>\x20.container,\x0adiv#topbar.wide\x20>\x20.container\x20{\x0a\x09max-width:\x20none;\x0a}\x0adiv#plusone\x20{\x0a\x09float:\x20right;\x0a\x09clear:\x20right;\x0a\x09margin-top:\x200.3125rem;\x0a}\x0a\x0adiv#footer\x20{\x0a\x09text-align:\x20center;\x0a\x09color:\x20#666;\x0a\x09font-size:\x200.875rem;\x0a\x09margin:\x202.5rem\x200;\x0a}\x0a\x0adiv#menu\x20>\x20a,\x0ainput#search,\x0adiv#learn\x20.buttons\x20a,\x0adiv.play\x20.buttons\x20a,\x0adiv#blog\x20.read\x20a,\x0a#menu-button\x20{\x0a\x09padding:\x200.625rem;\x0a\x0a\x09text-decoration:\x20none;\x0a\x09font-size:\x201rem;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.buttons\x20a,\x0adiv#menu\x20>\x20a,\x0ainput#search,\x0a#menu-button\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv#playground\x20.buttons\x20a,\x0adiv#menu\x20>\x20a,\x0a#menu-button\x20{\x0a\x09color:\x20white;\x0a\x09background:\x20#375EAB;\x0a}\x0a#playgroundButton.active\x20{\x0a\x09background:\x20white;\x0a\x09color:\x20#375EAB;\x0a}\x0aa#start,\x0adiv#learn\x20.buttons\x20a,\x0adiv.play\x20.buttons\x20a,\x0adiv#blog\x20.read\x20a\x20{\x0a\x09color:\x20#222;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09background:\x20#E0EBF5;\x0a}\x0a.download\x20{\x0a\x09width:\x209.375rem;\x0a}\x0a\x0adiv#menu\x20{\x0a\x09text-align:\x20right;\x0a\x09padding:\x200.625rem;\x0a\x09white-space:\x20nowrap;\x0a\x09max-height:\x200;\x0a\x09-moz-transition:\x20max-height\x20.25s\x20linear;\x0a\x09transition:\x20max-height\x20.25s\x20linear;\x0a\x09width:\x20100%;\x0a}\x0adiv#menu.menu-visible\x20{\x0a\x09max-height:\x2031.25rem;\x0a}\x0adiv#menu\x20>\x20a,\x0a#menu-button\x20{\x0a\x09margin:\x200.625rem\x200.125rem;\x0a\x09padding:\x200.625rem;\x0a}\x0a::-webkit-input-placeholder\x20{\x0a\x09color:\x20#7f7f7f;\x0a\x09opacity:\x201;\x0a}\x0a::placeholder\x20{\x0a\x09color:\x20#7f7f7f;\x0a\x09opacity:\x201;\x0a}\x0a#menu\x20.search-box\x20{\x0a\x09display:\x20inline-flex;\x0a\x09width:\x208.75rem;\x0a}\x0ainput#search\x20{\x0a\x09background:\x20white;\x0a\x09color:\x20#222;\x0a\x09box-sizing:\x20border-box;\x0a\x09-webkit-appearance:\x20none;\x0a\x09border-top-right-radius:\x200;\x0a\x09border-bottom-right-radius:\x200;\x0a\x09border-right:\x200;\x0a\x09margin-right:\x200;\x0a\x09flex-grow:\x201;\x0a\x09max-width:\x20100%;\x0a\x09min-width:\x205.625rem;\x0a}\x0ainput#search:-moz-ui-invalid\x20{\x0a\x09box-shadow:\x20unset;\x0a}\x0ainput#search\x20+\x20button\x20{\x0a\x09display:\x20inline;\x0a\x09font-size:\x201em;\x0a\x09background-color:\x20#375EAB;\x0a\x09color:\x20white;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09border-top-left-radius:\x200;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200;\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09margin-left:\x200;\x0a\x09cursor:\x20pointer;\x0a}\x0ainput#search\x20+\x20button\x20span\x20{\x0a\x09display:\x20flex;\x0a}\x0ainput#search\x20+\x20button\x20svg\x20{\x0a\x09fill:\x20white\x0a}\x0a\x0a#menu-button\x20{\x0a\x09display:\x20none;\x0a\x09position:\x20absolute;\x0a\x09right:\x200.3125rem;\x0a\x09top:\x200;\x0a\x09margin-right:\x200.3125rem;\x0a}\x0a#menu-button-arrow\x20{\x0a\x09display:\x20inline-block;\x0a}\x0a.vertical-flip\x20{\x0a\x09transform:\x20rotate(-180deg);\x0a}\x0a\x0adiv.left\x20{\x0a\x09float:\x20left;\x0a\x09clear:\x20left;\x0a\x09margin-right:\x202.5%;\x0a}\x0adiv.right\x20{\x0a\x09float:\x20right;\x0a\x09clear:\x20right;\x0a\x09margin-left:\x202.5%;\x0a}\x0adiv.left,\x0adiv.right\x20{\x0a\x09width:\x2045%;\x0a}\x0a\x0adiv#learn,\x0adiv#about\x20{\x0a\x09padding-top:\x201.25rem;\x0a}\x0adiv#learn\x20h2,\x0adiv#about\x20{\x0a\x09margin:\x200;\x0a}\x0adiv#about\x20{\x0a\x09font-size:\x201.25rem;\x0a\x09margin:\x200\x20auto\x201.875rem;\x0a}\x0adiv#gopher\x20{\x0a\x09background:\x20url(/doc/gopher/frontpage.png)\x20no-repeat;\x0a\x09background-position:\x20center\x20top;\x0a\x09height:\x209.688rem;\x0a\x09max-height:\x20200px;\x20/*\x20Setting\x20in\x20px\x20to\x20prevent\x20the\x20gopher\x20from\x20blowing\x20up\x20in\x20very\x20high\x20default\x20font-sizes\x20*/\x0a}\x0aa#start\x20{\x0a\x09display:\x20block;\x0a\x09padding:\x200.625rem;\x0a\x0a\x09text-align:\x20center;\x0a\x09text-decoration:\x20none;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0aa#start\x20.big\x20{\x0a\x09display:\x20block;\x0a\x09font-weight:\x20bold;\x0a\x09font-size:\x201.25rem;\x0a}\x0aa#start\x20.desc\x20{\x0a\x09display:\x20block;\x0a\x09font-size:\x200.875rem;\x0a\x09font-weight:\x20normal;\x0a\x09margin-top:\x200.3125rem;\x0a}\x0a\x0adiv#learn\x20.popout\x20{\x0a\x09float:\x20right;\x0a\x09display:\x20block;\x0a\x09cursor:\x20pointer;\x0a\x09font-size:\x200.75rem;\x0a\x09background:\x20url(/doc/share.png)\x20no-repeat;\x0a\x09background-position:\x20right\x20center;\x0a\x09padding:\x200.375rem\x201.688rem;\x0a}\x0adiv#learn\x20pre,\x0adiv#learn\x20textarea\x20{\x0a\x09padding:\x200;\x0a\x09margin:\x200;\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#learn\x20.input\x20{\x0a\x09padding:\x200.625rem;\x0a\x09margin-top:\x200.625rem;\x0a\x09height:\x209.375rem;\x0a\x0a\x09border-top-left-radius:\x200.3125rem;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a}\x0adiv#learn\x20.input\x20textarea\x20{\x0a\x09width:\x20100%;\x0a\x09height:\x20100%;\x0a\x09border:\x20none;\x0a\x09outline:\x20none;\x0a\x09resize:\x20none;\x0a}\x0adiv#learn\x20.output\x20{\x0a\x09border-top:\x20none\x20!important;\x0a\x0a\x09padding:\x200.625rem;\x0a\x09height:\x203.688rem;\x0a\x09overflow:\x20auto;\x0a\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv#learn\x20.output\x20pre\x20{\x0a\x09padding:\x200;\x0a\x09border-radius:\x200;\x0a}\x0adiv#learn\x20.input,\x0adiv#learn\x20.input\x20textarea,\x0adiv#learn\x20.output,\x0adiv#learn\x20.output\x20pre\x20{\x0a\x09background:\x20#FFFFD8;\x0a}\x0adiv#learn\x20.input,\x0adiv#learn\x20.output\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv#learn\x20.buttons\x20{\x0a\x09float:\x20right;\x0a\x09padding:\x201.25rem\x200\x200.625rem\x200;\x0a\x09text-align:\x20right;\x0a}\x0adiv#learn\x20.buttons\x20a\x20{\x0a\x09height:\x201rem;\x0a\x09margin-left:\x200.3125rem;\x0a\x09padding:\x200.625rem;\x0a}\x0adiv#learn\x20.toys\x20{\x0a\x09margin-top:\x200.5rem;\x0a}\x0adiv#learn\x20.toys\x20select\x20{\x0a\x09font-size:\x200.875rem;\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a\x09margin:\x200;\x0a}\x0adiv#learn\x20.output\x20.exit\x20{\x0a\x09display:\x20none;\x0a}\x0a\x0adiv#video\x20{\x0a\x09max-width:\x20100%;\x0a}\x0adiv#blog,\x0adiv#video\x20{\x0a\x09margin-top:\x202.5rem;\x0a}\x0adiv#blog\x20>\x20a,\x0adiv#blog\x20>\x20div,\x0adiv#blog\x20>\x20h2,\x0adiv#video\x20>\x20a,\x0adiv#video\x20>\x20div,\x0adiv#video\x20>\x20h2\x20{\x0a\x09margin-bottom:\x200.625rem;\x0a}\x0adiv#blog\x20.title,\x0adiv#video\x20.title\x20{\x0a\x09display:\x20block;\x0a\x09font-size:\x201.25rem;\x0a}\x0adiv#blog\x20.when\x20{\x0a\x09color:\x20#666;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv#blog\x20.read\x20{\x0a\x09text-align:\x20right;\x0a}\x0a\x0a@supports\x20(--c:\x200)\x20{\x0a\x09[style*=\"--aspect-ratio-padding:\"]\x20{\x0a\x09\x09position:\x20relative;\x0a\x09\x09overflow:\x20hidden;\x0a\x09\x09padding-top:\x20var(--aspect-ratio-padding);\x0a\x09}\x0a\x0a\x09[style*=\"--aspect-ratio-padding:\"]>*\x20{\x0a\x09\x09position:\x20absolute;\x0a\x09\x09top:\x200;\x0a\x09\x09left:\x200;\x0a\x09\x09width:\x20100%;\x0a\x09\x09height:\x20100%;\x0a\x09}\x0a}\x0a\x0a.toggleButton\x20{\x20cursor:\x20pointer;\x20}\x0a.toggle\x20>\x20.collapsed\x20{\x20display:\x20block;\x20}\x0a.toggle\x20>\x20.expanded\x20{\x20display:\x20none;\x20}\x0a.toggleVisible\x20>\x20.collapsed\x20{\x20display:\x20none;\x20}\x0a.toggleVisible\x20>\x20.expanded\x20{\x20display:\x20block;\x20}\x0a\x0atable.codetable\x20{\x20margin-left:\x20auto;\x20margin-right:\x20auto;\x20border-style:\x20none;\x20}\x0atable.codetable\x20td\x20{\x20padding-right:\x200.625rem;\x20}\x0ahr\x20{\x20border-style:\x20none;\x20border-top:\x200.0625rem\x20solid\x20black;\x20}\x0a\x0aimg.gopher\x20{\x0a\x09float:\x20right;\x0a\x09margin-left:\x200.625rem;\x0a\x09margin-bottom:\x200.625rem;\x0a\x09z-index:\x20-1;\x0a}\x0ah2\x20{\x20clear:\x20right;\x20}\x0a\x0a/*\x20example\x20and\x20drop-down\x20playground\x20*/\x0adiv.play\x20{\x0a\x09padding:\x200\x201.25rem\x202.5rem\x201.25rem;\x0a}\x0adiv.play\x20pre,\x0adiv.play\x20textarea,\x0adiv.play\x20.lines\x20{\x0a\x09padding:\x200;\x0a\x09margin:\x200;\x0a\x09font-family:\x20Menlo,\x20monospace;\x0a\x09font-size:\x200.875rem;\x0a}\x0adiv.play\x20.input\x20{\x0a\x09padding:\x200.625rem;\x0a\x09margin-top:\x200.625rem;\x0a\x0a\x09border-top-left-radius:\x200.3125rem;\x0a\x09border-top-right-radius:\x200.3125rem;\x0a\x0a\x09overflow:\x20hidden;\x0a}\x0adiv.play\x20.input\x20textarea\x20{\x0a\x09width:\x20100%;\x0a\x09height:\x20100%;\x0a\x09border:\x20none;\x0a\x09outline:\x20none;\x0a\x09resize:\x20none;\x0a\x0a\x09overflow:\x20hidden;\x0a}\x0adiv#playground\x20.input\x20textarea\x20{\x0a\x09overflow:\x20auto;\x0a\x09resize:\x20auto;\x0a}\x0adiv.play\x20.output\x20{\x0a\x09border-top:\x20none\x20!important;\x0a\x0a\x09padding:\x200.625rem;\x0a\x09max-height:\x2012.5rem;\x0a\x09overflow:\x20auto;\x0a\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a}\x0adiv.play\x20.output\x20pre\x20{\x0a\x09padding:\x200;\x0a\x09border-radius:\x200;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.input\x20textarea,\x0adiv.play\x20.output,\x0adiv.play\x20.output\x20pre\x20{\x0a\x09background:\x20#FFFFD8;\x0a}\x0adiv.play\x20.input,\x0adiv.play\x20.output\x20{\x0a\x09border:\x200.0625rem\x20solid\x20#375EAB;\x0a}\x0adiv.play\x20.buttons\x20{\x0a\x09float:\x20right;\x0a\x09padding:\x201.25rem\x200\x200.625rem\x200;\x0a\x09text-align:\x20right;\x0a}\x0adiv.play\x20.buttons\x20a\x20{\x0a\x09height:\x201rem;\x0a\x09margin-left:\x200.3125rem;\x0a\x09padding:\x200.625rem;\x0a\x09cursor:\x20pointer;\x0a}\x0a.output\x20.stderr\x20{\x0a\x09color:\x20#933;\x0a}\x0a.output\x20.system\x20{\x0a\x09color:\x20#999;\x0a}\x0a\x0a/*\x20drop-down\x20playground\x20*/\x0a#playgroundButton,\x0adiv#playground\x20{\x0a\x09/*\x20start\x20hidden;\x20revealed\x20by\x20javascript\x20*/\x0a\x09display:\x20none;\x0a}\x0adiv#playground\x20{\x0a\x09position:\x20absolute;\x0a\x09top:\x203.938rem;\x0a\x09right:\x201.25rem;\x0a\x09padding:\x200\x200.625rem\x200.625rem\x200.625rem;\x0a\x09z-index:\x201;\x0a\x09text-align:\x20left;\x0a\x09background:\x20#E0EBF5;\x0a\x0a\x09border:\x200.0625rem\x20solid\x20#B0BBC5;\x0a\x09border-top:\x20none;\x0a\x0a\x09border-bottom-left-radius:\x200.3125rem;\x0a\x09border-bottom-right-radius:\x200.3125rem;\x0a}\x0adiv#playground\x20.code\x20{\x0a\x09width:\x2032.5rem;\x0a\x09height:\x2012.5rem;\x0a}\x0adiv#playground\x20.output\x20{\x0a\x09height:\x206.25rem;\x0a}\x0a\x0a/*\x20Inline\x20runnable\x20snippets\x20(play.js/initPlayground)\x20*/\x0a#content\x20.code\x20pre,\x20#content\x20.playground\x20pre,\x20#content\x20.output\x20pre\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border:\x20none;\x0a\x09outline:\x200\x20solid\x20transparent;\x0a\x20\x20\x20\x20\x20\x20\x20\x20overflow:\x20auto;\x0a}\x0a#content\x20.playground\x20.number,\x20#content\x20.code\x20.number\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#999;\x0a}\x0a#content\x20.code,\x20#content\x20.playground,\x20#content\x20.output\x20{\x0a\x09width:\x20auto;\x0a\x20\x20\x20\x20\x20\x20\x20\x20margin:\x201.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200.625rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-radius:\x200.3125rem;\x0a}\x0a#content\x20.code,\x20#content\x20.playground\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#e9e9e9;\x0a}\x0a#content\x20.output\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20background:\x20#202020;\x0a}\x0a#content\x20.output\x20.stdout,\x20#content\x20.output\x20pre\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20#e6e6e6;\x0a}\x0a#content\x20.output\x20.stderr,\x20#content\x20.output\x20.error\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20rgb(244,\x2074,\x2063);\x0a}\x0a#content\x20.output\x20.system,\x20#content\x20.output\x20.exit\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20rgb(255,\x20209,\x2077)\x0a}\x0a#content\x20.buttons\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20position:\x20relative;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float:\x20right;\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x20-3.125rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20right:\x201.875rem;\x0a}\x0a#content\x20.output\x20.buttons\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20top:\x20-3.75rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20right:\x200;\x0a\x20\x20\x20\x20\x20\x20\x20\x20height:\x200;\x0a}\x0a#content\x20.buttons\x20.kill\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20display:\x20none;\x0a\x20\x20\x20\x20\x20\x20\x20\x20visibility:\x20hidden;\x0a}\x0aa.error\x20{\x0a\x09font-weight:\x20bold;\x0a\x20\x20\x20\x20\x20\x20\x20\x20color:\x20white;\x0a\x09background-color:\x20darkred;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-bottom-left-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-bottom-right-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-top-left-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20border-top-right-radius:\x200.25rem;\x0a\x20\x20\x20\x20\x20\x20\x20\x20padding:\x200.125rem\x200.25rem\x200.125rem\x200.25rem;\x20/*\x20TRBL\x20*/\x0a}\x0a\x0a\x0a#heading-narrow\x20{\x0a\x09display:\x20none;\x0a}\x0a\x0a.downloading\x20{\x0a\x09background:\x20#F9F9BE;\x0a\x09padding:\x200.625rem;\x0a\x09text-align:\x20center;\x0a\x09border-radius:\x200.3125rem;\x0a}\x0a\x0a@media\x20(max-width:\x2058.125em)\x20{\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2047.5em)\x20{\x0a\x09.container\x20.left,\x0a\x09.container\x20.right\x20{\x0a\x09\x09width:\x20auto;\x0a\x09\x09float:\x20none;\x0a\x09}\x0a\x0a\x09div#about\x20{\x0a\x09\x09max-width:\x2031.25rem;\x0a\x09\x09text-align:\x20center;\x0a\x09}\x0a}\x0a\x0a@media\x20(min-width:\x2043.75em)\x20and\x20(max-width:\x2062.5em)\x20{\x0a\x09div#menu\x20>\x20a\x20{\x0a\x09\x09margin:\x200.3125rem\x200;\x0a\x09\x09font-size:\x200.875rem;\x0a\x09}\x0a\x0a\x09input#search\x20{\x0a\x09\x09font-size:\x200.875rem;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2043.75em)\x20{\x0a\x09body\x20{\x0a\x09\x09font-size:\x200.9375rem;\x0a\x09}\x0a\x0a\x09pre,\x0a\x09code\x20{\x0a\x09\x09font-size:\x200.866rem;\x0a\x09}\x0a\x0a\x09div#page\x20>\x20.container\x20{\x0a\x09\x09padding:\x200\x200.625rem;\x0a\x09}\x0a\x0a\x09div#topbar\x20{\x0a\x09\x09height:\x20auto;\x0a\x09\x09padding:\x200.625rem;\x0a\x09}\x0a\x0a\x09div#topbar\x20>\x20.container\x20{\x0a\x09\x09padding:\x200;\x0a\x09}\x0a\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x0a\x09.top-heading\x20{\x0a\x09\x09float:\x20none;\x0a\x09\x09display:\x20inline-block;\x0a\x09\x09padding:\x200.75rem;\x0a\x09}\x0a\x0a\x09div#menu\x20{\x0a\x09\x09padding:\x200;\x0a\x09\x09min-width:\x200;\x0a\x09\x09text-align:\x20left;\x0a\x09\x09float:\x20left;\x0a\x09}\x0a\x0a\x09div#menu\x20>\x20a\x20{\x0a\x09\x09display:\x20block;\x0a\x09\x09margin-left:\x200;\x0a\x09\x09margin-right:\x200;\x0a\x09}\x0a\x0a\x09#menu\x20.search-box\x20{\x0a\x09\x09display:\x20flex;\x0a\x09\x09width:\x20100%;\x0a\x09}\x0a\x0a\x09#menu-button\x20{\x0a\x09\x09display:\x20inline-block;\x0a\x09}\x0a\x0a\x09p,\x0a\x09pre,\x0a\x09ul,\x0a\x09ol\x20{\x0a\x09\x09margin:\x200.625rem;\x0a\x09}\x0a\x0a\x09.pkg-synopsis\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x0a\x09img.gopher\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a}\x0a\x0a@media\x20(max-width:\x2030em)\x20{\x0a\x09#heading-wide\x20{\x0a\x09\x09display:\x20none;\x0a\x09}\x0a\x09#heading-narrow\x20{\x0a\x09\x09display:\x20block;\x0a\x09}\x0a}\x0a\x0a@media\x20print\x20{\x0a\x09pre\x20{\x0a\x09\x09background:\x20#FFF;\x0a\x09\x09border:\x200.0625rem\x20solid\x20#BBB;\x0a\x09\x09white-space:\x20pre-wrap;\x0a\x09}\x0a}\x0a", } diff --git a/deps/golang.org/x/tools/godoc/static/style.css b/deps/golang.org/x/tools/godoc/static/style.css index 79989eea7..05cfbcb65 100644 --- a/deps/golang.org/x/tools/godoc/static/style.css +++ b/deps/golang.org/x/tools/godoc/static/style.css @@ -1,17 +1,18 @@ body { margin: 0; font-family: Arial, sans-serif; - font-size: 16px; background-color: #fff; - line-height: 1.3em; + line-height: 1.3; + text-align: center; + color: #222; } pre, code { font-family: Menlo, monospace; - font-size: 14px; + font-size: 0.875rem; } pre { - line-height: 1.4em; + line-height: 1.4; overflow-x: auto; } pre .comment { @@ -38,16 +39,15 @@ pre .ln { user-select: none; } -body { - color: #222; -} a, -.exampleHeading .text { +.exampleHeading .text, +.expandAll { color: #375EAB; text-decoration: none; } a:hover, -.exampleHeading .text:hover { +.exampleHeading .text:hover, +.expandAll:hover { text-decoration: underline; } .article a { @@ -65,22 +65,19 @@ a:hover, } p, li { - max-width: 800px; + max-width: 50rem; word-wrap: break-word; } p, pre, ul, ol { - margin: 20px; + margin: 1.25rem; } pre { background: #EFEFEF; - padding: 10px; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + padding: 0.625rem; + border-radius: 0.3125rem; } h1, @@ -88,70 +85,82 @@ h2, h3, h4, .rootHeading { - margin: 20px 0 20px; + margin: 1.25rem 0 1.25rem; padding: 0; color: #375EAB; font-weight: bold; } h1 { - font-size: 28px; + font-size: 1.75rem; line-height: 1; } h1 .text-muted { color:#777; } h2 { - font-size: 20px; + font-size: 1.25rem; background: #E0EBF5; - padding: 8px; + padding: 0.5rem; line-height: 1.25; font-weight: normal; + overflow: auto; + overflow-wrap: break-word; } h2 a { font-weight: bold; } h3 { - font-size: 20px; + font-size: 1.25rem; + line-height: 1.25; + overflow: auto; + overflow-wrap: break-word; } h3, h4 { - margin: 20px 5px; + margin: 1.25rem 0.3125rem; } h4 { - font-size: 16px; + font-size: 1rem; } .rootHeading { - font-size: 20px; + font-size: 1.25rem; margin: 0; } +h2 > span, +h3 > span { + float: right; + margin: 0 25px 0 0; + font-weight: normal; + color: #5279C7; +} + dl { - margin: 20px; + margin: 1.25rem; } dd { - margin: 0 0 0 20px; + margin: 0 0 0 1.25rem; } dl, dd { - font-size: 14px; + font-size: 0.875rem; } div#nav table td { vertical-align: top; } - #pkg-index h3 { - font-size: 16px; + font-size: 1rem; } .pkg-dir { - padding: 0 10px; + padding: 0 0.625rem; } .pkg-dir table { border-collapse: collapse; border-spacing: 0; } .pkg-name { - padding-right: 10px; + padding-right: 0.625rem; } .alert { color: #AA0000; @@ -159,8 +168,8 @@ div#nav table td { .top-heading { float: left; - padding: 21px 0; - font-size: 20px; + padding: 1.313rem 0; + font-size: 1.25rem; font-weight: normal; } .top-heading a { @@ -168,15 +177,26 @@ div#nav table td { text-decoration: none; } +#pkg-examples h3 { + float: left; +} + +#pkg-examples dl { + clear: both; +} + +.expandAll { + cursor: pointer; + float: left; + margin: 1.25rem 0; +} + div#topbar { background: #E0EBF5; - height: 64px; + height: 4rem; overflow: hidden; } -body { - text-align: center; -} div#page { width: 100%; } @@ -185,11 +205,11 @@ div#topbar > .container { text-align: left; margin-left: auto; margin-right: auto; - padding: 0 20px; + padding: 0 1.25rem; } div#topbar > .container, div#page > .container { - max-width: 950px; + max-width: 59.38rem; } div#page.wide > .container, div#topbar.wide > .container { @@ -198,14 +218,14 @@ div#topbar.wide > .container { div#plusone { float: right; clear: right; - margin-top: 5px; + margin-top: 0.3125rem; } div#footer { text-align: center; color: #666; - font-size: 14px; - margin: 40px 0; + font-size: 0.875rem; + margin: 2.5rem 0; } div#menu > a, @@ -214,20 +234,17 @@ div#learn .buttons a, div.play .buttons a, div#blog .read a, #menu-button { - padding: 10px; + padding: 0.625rem; text-decoration: none; - font-size: 16px; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + font-size: 1rem; + border-radius: 0.3125rem; } div#playground .buttons a, div#menu > a, input#search, #menu-button { - border: 1px solid #375EAB; + border: 0.0625rem solid #375EAB; } div#playground .buttons a, div#menu > a, @@ -244,16 +261,16 @@ div#learn .buttons a, div.play .buttons a, div#blog .read a { color: #222; - border: 1px solid #375EAB; + border: 0.0625rem solid #375EAB; background: #E0EBF5; } .download { - width: 150px; + width: 9.375rem; } div#menu { text-align: right; - padding: 10px; + padding: 0.625rem; white-space: nowrap; max-height: 0; -moz-transition: max-height .25s linear; @@ -261,12 +278,12 @@ div#menu { width: 100%; } div#menu.menu-visible { - max-height: 500px; + max-height: 31.25rem; } div#menu > a, #menu-button { - margin: 10px 2px; - padding: 10px; + margin: 0.625rem 0.125rem; + padding: 0.625rem; } ::-webkit-input-placeholder { color: #7f7f7f; @@ -278,7 +295,7 @@ div#menu > a, } #menu .search-box { display: inline-flex; - width: 140px; + width: 8.75rem; } input#search { background: white; @@ -291,7 +308,7 @@ input#search { margin-right: 0; flex-grow: 1; max-width: 100%; - min-width: 90px; + min-width: 5.625rem; } input#search:-moz-ui-invalid { box-shadow: unset; @@ -301,11 +318,11 @@ input#search + button { font-size: 1em; background-color: #375EAB; color: white; - border: 1px solid #375EAB; + border: 0.0625rem solid #375EAB; border-top-left-radius: 0; - border-top-right-radius: 5px; + border-top-right-radius: 0.3125rem; border-bottom-left-radius: 0; - border-bottom-right-radius: 5px; + border-bottom-right-radius: 0.3125rem; margin-left: 0; cursor: pointer; } @@ -319,9 +336,9 @@ input#search + button svg { #menu-button { display: none; position: absolute; - right: 5px; + right: 0.3125rem; top: 0; - margin-right: 5px; + margin-right: 0.3125rem; } #menu-button-arrow { display: inline-block; @@ -347,71 +364,65 @@ div.right { div#learn, div#about { - padding-top: 20px; + padding-top: 1.25rem; } div#learn h2, div#about { margin: 0; } div#about { - font-size: 20px; - margin: 0 auto 30px; + font-size: 1.25rem; + margin: 0 auto 1.875rem; } div#gopher { background: url(/doc/gopher/frontpage.png) no-repeat; background-position: center top; - height: 155px; + height: 9.688rem; + max-height: 200px; /* Setting in px to prevent the gopher from blowing up in very high default font-sizes */ } a#start { display: block; - padding: 10px; + padding: 0.625rem; text-align: center; text-decoration: none; - - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + border-radius: 0.3125rem; } a#start .big { display: block; font-weight: bold; - font-size: 20px; + font-size: 1.25rem; } a#start .desc { display: block; - font-size: 14px; + font-size: 0.875rem; font-weight: normal; - margin-top: 5px; + margin-top: 0.3125rem; } div#learn .popout { float: right; display: block; cursor: pointer; - font-size: 12px; + font-size: 0.75rem; background: url(/doc/share.png) no-repeat; - background-position: right top; - padding: 5px 27px; + background-position: right center; + padding: 0.375rem 1.688rem; } div#learn pre, div#learn textarea { padding: 0; margin: 0; font-family: Menlo, monospace; - font-size: 14px; + font-size: 0.875rem; } div#learn .input { - padding: 10px; - margin-top: 10px; - height: 150px; + padding: 0.625rem; + margin-top: 0.625rem; + height: 9.375rem; - -webkit-border-top-left-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; + border-top-left-radius: 0.3125rem; + border-top-right-radius: 0.3125rem; } div#learn .input textarea { width: 100%; @@ -423,22 +434,15 @@ div#learn .input textarea { div#learn .output { border-top: none !important; - padding: 10px; - height: 59px; + padding: 0.625rem; + height: 3.688rem; overflow: auto; - -webkit-border-bottom-right-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-bottomleft: 5px; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; + border-bottom-right-radius: 0.3125rem; + border-bottom-left-radius: 0.3125rem; } div#learn .output pre { padding: 0; - - -webkit-border-radius: 0; - -moz-border-radius: 0; border-radius: 0; } div#learn .input, @@ -449,23 +453,24 @@ div#learn .output pre { } div#learn .input, div#learn .output { - border: 1px solid #375EAB; + border: 0.0625rem solid #375EAB; } div#learn .buttons { float: right; - padding: 20px 0 10px 0; + padding: 1.25rem 0 0.625rem 0; text-align: right; } div#learn .buttons a { - height: 16px; - margin-left: 5px; - padding: 10px; + height: 1rem; + margin-left: 0.3125rem; + padding: 0.625rem; } div#learn .toys { - margin-top: 8px; + margin-top: 0.5rem; } div#learn .toys select { - border: 1px solid #375EAB; + font-size: 0.875rem; + border: 0.0625rem solid #375EAB; margin: 0; } div#learn .output .exit { @@ -477,7 +482,7 @@ div#video { } div#blog, div#video { - margin-top: 40px; + margin-top: 2.5rem; } div#blog > a, div#blog > div, @@ -485,21 +490,37 @@ div#blog > h2, div#video > a, div#video > div, div#video > h2 { - margin-bottom: 10px; + margin-bottom: 0.625rem; } div#blog .title, div#video .title { display: block; - font-size: 20px; + font-size: 1.25rem; } div#blog .when { color: #666; - font-size: 14px; + font-size: 0.875rem; } div#blog .read { text-align: right; } +@supports (--c: 0) { + [style*="--aspect-ratio-padding:"] { + position: relative; + overflow: hidden; + padding-top: var(--aspect-ratio-padding); + } + + [style*="--aspect-ratio-padding:"]>* { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} + .toggleButton { cursor: pointer; } .toggle > .collapsed { display: block; } .toggle > .expanded { display: none; } @@ -507,20 +528,20 @@ div#blog .read { .toggleVisible > .expanded { display: block; } table.codetable { margin-left: auto; margin-right: auto; border-style: none; } -table.codetable td { padding-right: 10px; } -hr { border-style: none; border-top: 1px solid black; } +table.codetable td { padding-right: 0.625rem; } +hr { border-style: none; border-top: 0.0625rem solid black; } img.gopher { float: right; - margin-left: 10px; - margin-bottom: 10px; + margin-left: 0.625rem; + margin-bottom: 0.625rem; z-index: -1; } h2 { clear: right; } /* example and drop-down playground */ div.play { - padding: 0 20px 40px 20px; + padding: 0 1.25rem 2.5rem 1.25rem; } div.play pre, div.play textarea, @@ -528,18 +549,14 @@ div.play .lines { padding: 0; margin: 0; font-family: Menlo, monospace; - font-size: 14px; + font-size: 0.875rem; } div.play .input { - padding: 10px; - margin-top: 10px; + padding: 0.625rem; + margin-top: 0.625rem; - -webkit-border-top-left-radius: 5px; - -webkit-border-top-right-radius: 5px; - -moz-border-radius-topleft: 5px; - -moz-border-radius-topright: 5px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; + border-top-left-radius: 0.3125rem; + border-top-right-radius: 0.3125rem; overflow: hidden; } @@ -559,22 +576,15 @@ div#playground .input textarea { div.play .output { border-top: none !important; - padding: 10px; - max-height: 200px; + padding: 0.625rem; + max-height: 12.5rem; overflow: auto; - -webkit-border-bottom-right-radius: 5px; - -webkit-border-bottom-left-radius: 5px; - -moz-border-radius-bottomright: 5px; - -moz-border-radius-bottomleft: 5px; - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; + border-bottom-right-radius: 0.3125rem; + border-bottom-left-radius: 0.3125rem; } div.play .output pre { padding: 0; - - -webkit-border-radius: 0; - -moz-border-radius: 0; border-radius: 0; } div.play .input, @@ -585,17 +595,17 @@ div.play .output pre { } div.play .input, div.play .output { - border: 1px solid #375EAB; + border: 0.0625rem solid #375EAB; } div.play .buttons { float: right; - padding: 20px 0 10px 0; + padding: 1.25rem 0 0.625rem 0; text-align: right; } div.play .buttons a { - height: 16px; - margin-left: 5px; - padding: 10px; + height: 1rem; + margin-left: 0.3125rem; + padding: 0.625rem; cursor: pointer; } .output .stderr { @@ -613,29 +623,25 @@ div#playground { } div#playground { position: absolute; - top: 63px; - right: 20px; - padding: 0 10px 10px 10px; + top: 3.938rem; + right: 1.25rem; + padding: 0 0.625rem 0.625rem 0.625rem; z-index: 1; text-align: left; background: #E0EBF5; - border: 1px solid #B0BBC5; + border: 0.0625rem solid #B0BBC5; border-top: none; - -webkit-border-bottom-left-radius: 5px; - -webkit-border-bottom-right-radius: 5px; - -moz-border-radius-bottomleft: 5px; - -moz-border-radius-bottomright: 5px; - border-bottom-left-radius: 5px; - border-bottom-right-radius: 5px; + border-bottom-left-radius: 0.3125rem; + border-bottom-right-radius: 0.3125rem; } div#playground .code { - width: 520px; - height: 200px; + width: 32.5rem; + height: 12.5rem; } div#playground .output { - height: 100px; + height: 6.25rem; } /* Inline runnable snippets (play.js/initPlayground) */ @@ -644,7 +650,7 @@ div#playground .output { padding: 0; background: none; border: none; - outline: 0px solid transparent; + outline: 0 solid transparent; overflow: auto; } #content .playground .number, #content .code .number { @@ -652,11 +658,9 @@ div#playground .output { } #content .code, #content .playground, #content .output { width: auto; - margin: 20px; - padding: 10px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + margin: 1.25rem; + padding: 0.625rem; + border-radius: 0.3125rem; } #content .code, #content .playground { background: #e9e9e9; @@ -676,11 +680,11 @@ div#playground .output { #content .buttons { position: relative; float: right; - top: -50px; - right: 30px; + top: -3.125rem; + right: 1.875rem; } #content .output .buttons { - top: -60px; + top: -3.75rem; right: 0; height: 0; } @@ -692,11 +696,11 @@ a.error { font-weight: bold; color: white; background-color: darkred; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - padding: 2px 4px 2px 4px; /* TRBL */ + border-bottom-left-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + padding: 0.125rem 0.25rem 0.125rem 0.25rem; /* TRBL */ } @@ -706,12 +710,12 @@ a.error { .downloading { background: #F9F9BE; - padding: 10px; + padding: 0.625rem; text-align: center; - border-radius: 5px; + border-radius: 0.3125rem; } -@media (max-width: 930px) { +@media (max-width: 58.125em) { #heading-wide { display: none; } @@ -720,8 +724,7 @@ a.error { } } - -@media (max-width: 760px) { +@media (max-width: 47.5em) { .container .left, .container .right { width: auto; @@ -729,39 +732,39 @@ a.error { } div#about { - max-width: 500px; + max-width: 31.25rem; text-align: center; } } -@media (min-width: 700px) and (max-width: 1000px) { +@media (min-width: 43.75em) and (max-width: 62.5em) { div#menu > a { - margin: 5px 0; - font-size: 14px; + margin: 0.3125rem 0; + font-size: 0.875rem; } input#search { - font-size: 14px; + font-size: 0.875rem; } } -@media (max-width: 700px) { +@media (max-width: 43.75em) { body { - font-size: 15px; + font-size: 0.9375rem; } pre, code { - font-size: 13px; + font-size: 0.866rem; } div#page > .container { - padding: 0 10px; + padding: 0 0.625rem; } div#topbar { height: auto; - padding: 10px; + padding: 0.625rem; } div#topbar > .container { @@ -778,7 +781,7 @@ a.error { .top-heading { float: none; display: inline-block; - padding: 12px; + padding: 0.75rem; } div#menu { @@ -807,7 +810,7 @@ a.error { pre, ul, ol { - margin: 10px; + margin: 0.625rem; } .pkg-synopsis { @@ -819,7 +822,7 @@ a.error { } } -@media (max-width: 480px) { +@media (max-width: 30em) { #heading-wide { display: none; } @@ -831,7 +834,7 @@ a.error { @media print { pre { background: #FFF; - border: 1px solid #BBB; + border: 0.0625rem solid #BBB; white-space: pre-wrap; } } diff --git a/deps/golang.org/x/tools/godoc/template.go b/deps/golang.org/x/tools/godoc/template.go index eda5874d0..1e4e42e30 100644 --- a/deps/golang.org/x/tools/godoc/template.go +++ b/deps/golang.org/x/tools/godoc/template.go @@ -90,7 +90,7 @@ func (p *Presentation) code(file string, arg ...interface{}) (s string, err erro command = fmt.Sprintf("code %q %s %s", file, stringFor(arg[0]), stringFor(arg[1])) text = p.Corpus.multipleLines(file, text, arg[0], arg[1]) default: - return "", fmt.Errorf("incorrect code invocation: code %q %q", file, arg) + return "", fmt.Errorf("incorrect code invocation: code %q [%v, ...] (%d arguments)", file, arg[0], len(arg)) } // Trim spaces from output. text = strings.Trim(text, "\n") diff --git a/deps/golang.org/x/tools/godoc/versions.go b/deps/golang.org/x/tools/godoc/versions.go new file mode 100644 index 000000000..f03c714fe --- /dev/null +++ b/deps/golang.org/x/tools/godoc/versions.go @@ -0,0 +1,224 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This file caches information about which standard library types, methods, +// and functions appeared in what version of Go + +package godoc + +import ( + "bufio" + "go/build" + "log" + "os" + "path/filepath" + "strings" + "unicode" +) + +// apiVersions is a map of packages to information about those packages' +// symbols and when they were added to Go. +// +// Only things added after Go1 are tracked. Version strings are of the +// form "1.1", "1.2", etc. +type apiVersions map[string]pkgAPIVersions // keyed by Go package ("net/http") + +// pkgAPIVersions contains information about which version of Go added +// certain package symbols. +// +// Only things added after Go1 are tracked. Version strings are of the +// form "1.1", "1.2", etc. +type pkgAPIVersions struct { + typeSince map[string]string // "Server" -> "1.7" + methodSince map[string]map[string]string // "*Server" ->"Shutdown"->1.8 + funcSince map[string]string // "NewServer" -> "1.7" + fieldSince map[string]map[string]string // "ClientTrace" -> "Got1xxResponse" -> "1.11" +} + +// sinceVersionFunc returns a string (such as "1.7") specifying which Go +// version introduced a symbol, unless it was introduced in Go1, in +// which case it returns the empty string. +// +// The kind is one of "type", "method", or "func". +// +// The receiver is only used for "methods" and specifies the receiver type, +// such as "*Server". +// +// The name is the symbol name ("Server") and the pkg is the package +// ("net/http"). +func (v apiVersions) sinceVersionFunc(kind, receiver, name, pkg string) string { + pv := v[pkg] + switch kind { + case "func": + return pv.funcSince[name] + case "type": + return pv.typeSince[name] + case "method": + return pv.methodSince[receiver][name] + } + return "" +} + +// versionedRow represents an API feature, a parsed line of a +// $GOROOT/api/go.*txt file. +type versionedRow struct { + pkg string // "net/http" + kind string // "type", "func", "method", "field" TODO: "const", "var" + recv string // for methods, the receiver type ("Server", "*Server") + name string // name of type, (struct) field, func, method + structName string // for struct fields, the outer struct name +} + +// versionParser parses $GOROOT/api/go*.txt files and stores them in in its rows field. +type versionParser struct { + res apiVersions // initialized lazily +} + +func (vp *versionParser) parseFile(name string) error { + base := filepath.Base(name) + ver := strings.TrimPrefix(strings.TrimSuffix(base, ".txt"), "go") + if ver == "1" { + return nil + } + f, err := os.Open(name) + if err != nil { + return err + } + defer f.Close() + + sc := bufio.NewScanner(f) + for sc.Scan() { + row, ok := parseRow(sc.Text()) + if !ok { + continue + } + if vp.res == nil { + vp.res = make(apiVersions) + } + pkgi, ok := vp.res[row.pkg] + if !ok { + pkgi = pkgAPIVersions{ + typeSince: make(map[string]string), + methodSince: make(map[string]map[string]string), + funcSince: make(map[string]string), + fieldSince: make(map[string]map[string]string), + } + vp.res[row.pkg] = pkgi + } + switch row.kind { + case "func": + pkgi.funcSince[row.name] = ver + case "type": + pkgi.typeSince[row.name] = ver + case "method": + if _, ok := pkgi.methodSince[row.recv]; !ok { + pkgi.methodSince[row.recv] = make(map[string]string) + } + pkgi.methodSince[row.recv][row.name] = ver + case "field": + if _, ok := pkgi.fieldSince[row.structName]; !ok { + pkgi.fieldSince[row.structName] = make(map[string]string) + } + pkgi.fieldSince[row.structName][row.name] = ver + } + } + return sc.Err() +} + +func parseRow(s string) (vr versionedRow, ok bool) { + if !strings.HasPrefix(s, "pkg ") { + // Skip comments, blank lines, etc. + return + } + rest := s[len("pkg "):] + endPkg := strings.IndexFunc(rest, func(r rune) bool { return !(unicode.IsLetter(r) || r == '/' || unicode.IsDigit(r)) }) + if endPkg == -1 { + return + } + vr.pkg, rest = rest[:endPkg], rest[endPkg:] + if !strings.HasPrefix(rest, ", ") { + // If the part after the pkg name isn't ", ", then it's a OS/ARCH-dependent line of the form: + // pkg syscall (darwin-amd64), const ImplementsGetwd = false + // We skip those for now. + return + } + rest = rest[len(", "):] + + switch { + case strings.HasPrefix(rest, "type "): + rest = rest[len("type "):] + sp := strings.IndexByte(rest, ' ') + if sp == -1 { + return + } + vr.name, rest = rest[:sp], rest[sp+1:] + if !strings.HasPrefix(rest, "struct, ") { + vr.kind = "type" + return vr, true + } + rest = rest[len("struct, "):] + if i := strings.IndexByte(rest, ' '); i != -1 { + vr.kind = "field" + vr.structName = vr.name + vr.name = rest[:i] + return vr, true + } + case strings.HasPrefix(rest, "func "): + vr.kind = "func" + rest = rest[len("func "):] + if i := strings.IndexByte(rest, '('); i != -1 { + vr.name = rest[:i] + return vr, true + } + case strings.HasPrefix(rest, "method "): // "method (*File) SetModTime(time.Time)" + vr.kind = "method" + rest = rest[len("method "):] // "(*File) SetModTime(time.Time)" + sp := strings.IndexByte(rest, ' ') + if sp == -1 { + return + } + vr.recv = strings.Trim(rest[:sp], "()") // "*File" + rest = rest[sp+1:] // SetMode(os.FileMode) + paren := strings.IndexByte(rest, '(') + if paren == -1 { + return + } + vr.name = rest[:paren] + return vr, true + } + return // TODO: handle more cases +} + +// InitVersionInfo parses the $GOROOT/api/go*.txt API definition files to discover +// which API features were added in which Go releases. +func (c *Corpus) InitVersionInfo() { + var err error + c.pkgAPIInfo, err = parsePackageAPIInfo() + if err != nil { + // TODO: consider making this fatal, after the Go 1.11 cycle. + log.Printf("godoc: error parsing API version files: %v", err) + } +} + +func parsePackageAPIInfo() (apiVersions, error) { + var apiGlob string + if os.Getenv("GOROOT") == "" { + apiGlob = filepath.Join(build.Default.GOROOT, "api", "go*.txt") + } else { + apiGlob = filepath.Join(os.Getenv("GOROOT"), "api", "go*.txt") + } + + files, err := filepath.Glob(apiGlob) + if err != nil { + return nil, err + } + + vp := new(versionParser) + for _, f := range files { + if err := vp.parseFile(f); err != nil { + return nil, err + } + } + return vp.res, nil +} diff --git a/deps/golang.org/x/tools/godoc/versions_test.go b/deps/golang.org/x/tools/godoc/versions_test.go new file mode 100644 index 000000000..ad2d5e434 --- /dev/null +++ b/deps/golang.org/x/tools/godoc/versions_test.go @@ -0,0 +1,132 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package godoc + +import ( + "go/build" + "testing" +) + +func TestParseVersionRow(t *testing.T) { + tests := []struct { + row string + want versionedRow + }{ + { + row: "# comment", + }, + { + row: "", + }, + { + row: "pkg archive/tar, type Writer struct", + want: versionedRow{ + pkg: "archive/tar", + kind: "type", + name: "Writer", + }, + }, + { + row: "pkg archive/tar, type Header struct, AccessTime time.Time", + want: versionedRow{ + pkg: "archive/tar", + kind: "field", + structName: "Header", + name: "AccessTime", + }, + }, + { + row: "pkg archive/tar, method (*Reader) Read([]uint8) (int, error)", + want: versionedRow{ + pkg: "archive/tar", + kind: "method", + name: "Read", + recv: "*Reader", + }, + }, + { + row: "pkg archive/zip, func FileInfoHeader(os.FileInfo) (*FileHeader, error)", + want: versionedRow{ + pkg: "archive/zip", + kind: "func", + name: "FileInfoHeader", + }, + }, + { + row: "pkg encoding/base32, method (Encoding) WithPadding(int32) *Encoding", + want: versionedRow{ + pkg: "encoding/base32", + kind: "method", + name: "WithPadding", + recv: "Encoding", + }, + }, + } + + for i, tt := range tests { + got, ok := parseRow(tt.row) + if !ok { + got = versionedRow{} + } + if got != tt.want { + t.Errorf("%d. parseRow(%q) = %+v; want %+v", i, tt.row, got, tt.want) + } + } +} + +// hasTag checks whether a given release tag is contained in the current version +// of the go binary. +func hasTag(t string) bool { + for _, v := range build.Default.ReleaseTags { + if t == v { + return true + } + } + return false +} + +func TestAPIVersion(t *testing.T) { + av, err := parsePackageAPIInfo() + if err != nil { + t.Fatal(err) + } + for _, tc := range []struct { + kind string + pkg string + name string + receiver string + want string + }{ + // Things that were added post-1.0 should appear + {"func", "archive/tar", "FileInfoHeader", "", "1.1"}, + {"type", "bufio", "Scanner", "", "1.1"}, + {"method", "bufio", "WriteTo", "*Reader", "1.1"}, + + {"func", "bytes", "LastIndexByte", "", "1.5"}, + {"type", "crypto", "Decrypter", "", "1.5"}, + {"method", "crypto/rsa", "Decrypt", "*PrivateKey", "1.5"}, + {"method", "debug/dwarf", "GoString", "Class", "1.5"}, + + {"func", "os", "IsTimeout", "", "1.10"}, + {"type", "strings", "Builder", "", "1.10"}, + {"method", "strings", "WriteString", "*Builder", "1.10"}, + + // Things from package syscall should never appear + {"func", "syscall", "FchFlags", "", ""}, + {"type", "syscall", "Inet4Pktinfo", "", ""}, + + // Things added in Go 1 should never appear + {"func", "archive/tar", "NewReader", "", ""}, + {"type", "archive/tar", "Header", "", ""}, + {"method", "archive/tar", "Next", "*Reader", ""}, + } { + if tc.want != "" && !hasTag("go"+tc.want) { + continue + } + if got := av.sinceVersionFunc(tc.kind, tc.receiver, tc.name, tc.pkg); got != tc.want { + t.Errorf(`sinceFunc("%s", "%s", "%s", "%s") = "%s"; want "%s"`, tc.kind, tc.receiver, tc.name, tc.pkg, got, tc.want) + } + } +} diff --git a/deps/golang.org/x/tools/godoc/vfs/emptyvfs.go b/deps/golang.org/x/tools/godoc/vfs/emptyvfs.go index 01b6942f0..0803206c5 100644 --- a/deps/golang.org/x/tools/godoc/vfs/emptyvfs.go +++ b/deps/golang.org/x/tools/godoc/vfs/emptyvfs.go @@ -57,6 +57,10 @@ func (e *emptyVFS) String() string { return "emptyVFS(/)" } +func (e *emptyVFS) RootType(path string) RootType { + return "" +} + // These functions below implement os.FileInfo for the single // empty emulated directory. diff --git a/deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs.go b/deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs.go index 7045a5cad..fe0462dc2 100644 --- a/deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs.go +++ b/deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs.go @@ -37,6 +37,10 @@ func (fs gatefs) String() string { return fmt.Sprintf("gated(%s, %d)", fs.fs.String(), cap(fs.gate)) } +func (fs gatefs) RootType(path string) vfs.RootType { + return fs.fs.RootType(path) +} + func (fs gatefs) Open(p string) (vfs.ReadSeekCloser, error) { fs.enter() defer fs.leave() diff --git a/deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs_test.go b/deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs_test.go new file mode 100644 index 000000000..a0156b450 --- /dev/null +++ b/deps/golang.org/x/tools/godoc/vfs/gatefs/gatefs_test.go @@ -0,0 +1,39 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package gatefs_test + +import ( + "os" + "runtime" + "testing" + + "golang.org/x/tools/godoc/vfs" + "golang.org/x/tools/godoc/vfs/gatefs" +) + +func TestRootType(t *testing.T) { + goPath := os.Getenv("GOPATH") + var expectedType vfs.RootType + if goPath == "" { + expectedType = "" + } else { + expectedType = vfs.RootTypeGoPath + } + tests := []struct { + path string + fsType vfs.RootType + }{ + {runtime.GOROOT(), vfs.RootTypeGoRoot}, + {goPath, expectedType}, + {"/tmp/", ""}, + } + + for _, item := range tests { + fs := gatefs.New(vfs.OS(item.path), make(chan bool, 1)) + if fs.RootType("path") != item.fsType { + t.Errorf("unexpected fsType. Expected- %v, Got- %v", item.fsType, fs.RootType("path")) + } + } +} diff --git a/deps/golang.org/x/tools/godoc/vfs/mapfs/mapfs.go b/deps/golang.org/x/tools/godoc/vfs/mapfs/mapfs.go index 660b1ca78..5de7ce72e 100644 --- a/deps/golang.org/x/tools/godoc/vfs/mapfs/mapfs.go +++ b/deps/golang.org/x/tools/godoc/vfs/mapfs/mapfs.go @@ -29,6 +29,10 @@ type mapFS map[string]string func (fs mapFS) String() string { return "mapfs" } +func (fs mapFS) RootType(p string) vfs.RootType { + return "" +} + func (fs mapFS) Close() error { return nil } func filename(p string) string { diff --git a/deps/golang.org/x/tools/godoc/vfs/namespace.go b/deps/golang.org/x/tools/godoc/vfs/namespace.go index ca1213eb2..b8a1122d0 100644 --- a/deps/golang.org/x/tools/godoc/vfs/namespace.go +++ b/deps/golang.org/x/tools/godoc/vfs/namespace.go @@ -381,6 +381,20 @@ func (ns NameSpace) ReadDir(path string) ([]os.FileInfo, error) { return all, nil } +// RootType returns the RootType for the given path in the namespace. +func (ns NameSpace) RootType(path string) RootType { + // We resolve the given path to a list of mountedFS and then return + // the root type for the filesystem which contains the path. + for _, m := range ns.resolve(path) { + _, err := m.fs.ReadDir(m.translate(path)) + // Found a match, return the filesystem's root type + if err == nil { + return m.fs.RootType(path) + } + } + return "" +} + // byName implements sort.Interface. type byName []os.FileInfo diff --git a/deps/golang.org/x/tools/godoc/vfs/os.go b/deps/golang.org/x/tools/godoc/vfs/os.go index fa9814248..35d050946 100644 --- a/deps/golang.org/x/tools/godoc/vfs/os.go +++ b/deps/golang.org/x/tools/godoc/vfs/os.go @@ -6,24 +6,64 @@ package vfs import ( "fmt" + "go/build" "io/ioutil" "os" pathpkg "path" "path/filepath" + "runtime" ) +// We expose a new variable because otherwise we need to copy the findGOROOT logic again +// from cmd/godoc which is already copied twice from the standard library. + +// GOROOT is the GOROOT path under which the godoc binary is running. +// It is needed to check whether a filesystem root is under GOROOT or not. +// This is set from cmd/godoc/main.go. +var GOROOT = runtime.GOROOT() + // OS returns an implementation of FileSystem reading from the // tree rooted at root. Recording a root is convenient everywhere // but necessary on Windows, because the slash-separated path // passed to Open has no way to specify a drive letter. Using a root // lets code refer to OS(`c:\`), OS(`d:\`) and so on. func OS(root string) FileSystem { - return osFS(root) + var t RootType + switch { + case root == GOROOT: + t = RootTypeGoRoot + case isGoPath(root): + t = RootTypeGoPath + } + return osFS{rootPath: root, rootType: t} } -type osFS string +type osFS struct { + rootPath string + rootType RootType +} -func (root osFS) String() string { return "os(" + string(root) + ")" } +func isGoPath(path string) bool { + for _, bp := range filepath.SplitList(build.Default.GOPATH) { + for _, gp := range filepath.SplitList(path) { + if bp == gp { + return true + } + } + } + return false +} + +func (root osFS) String() string { return "os(" + root.rootPath + ")" } + +// RootType returns the root type for the filesystem. +// +// Note that we ignore the path argument because roottype is a property of +// this filesystem. But for other filesystems, the roottype might need to be +// dynamically deduced at call time. +func (root osFS) RootType(path string) RootType { + return root.rootType +} func (root osFS) resolve(path string) string { // Clean the path so that it cannot possibly begin with ../. @@ -32,7 +72,7 @@ func (root osFS) resolve(path string) string { // with .. in it, but be safe anyway. path = pathpkg.Clean("/" + path) - return filepath.Join(string(root), path) + return filepath.Join(root.rootPath, path) } func (root osFS) Open(path string) (ReadSeekCloser, error) { diff --git a/deps/golang.org/x/tools/godoc/vfs/os_test.go b/deps/golang.org/x/tools/godoc/vfs/os_test.go new file mode 100644 index 000000000..98631e051 --- /dev/null +++ b/deps/golang.org/x/tools/godoc/vfs/os_test.go @@ -0,0 +1,38 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package vfs_test + +import ( + "os" + "runtime" + "testing" + + "golang.org/x/tools/godoc/vfs" +) + +func TestRootType(t *testing.T) { + goPath := os.Getenv("GOPATH") + var expectedType vfs.RootType + if goPath == "" { + expectedType = "" + } else { + expectedType = vfs.RootTypeGoPath + } + tests := []struct { + path string + fsType vfs.RootType + }{ + {runtime.GOROOT(), vfs.RootTypeGoRoot}, + {goPath, expectedType}, + {"/tmp/", ""}, + } + + for _, item := range tests { + fs := vfs.OS(item.path) + if fs.RootType("path") != item.fsType { + t.Errorf("unexpected fsType. Expected- %v, Got- %v", item.fsType, fs.RootType("path")) + } + } +} diff --git a/deps/golang.org/x/tools/godoc/vfs/vfs.go b/deps/golang.org/x/tools/godoc/vfs/vfs.go index ad06b1a1d..d70526d5a 100644 --- a/deps/golang.org/x/tools/godoc/vfs/vfs.go +++ b/deps/golang.org/x/tools/godoc/vfs/vfs.go @@ -12,6 +12,18 @@ import ( "os" ) +// RootType indicates the type of files contained within a directory. +// +// It is used to indicate whether a directory is the root +// of a GOROOT, a GOPATH, or neither. +// An empty string represents the case when a directory is neither. +type RootType string + +const ( + RootTypeGoRoot RootType = "GOROOT" + RootTypeGoPath RootType = "GOPATH" +) + // The FileSystem interface specifies the methods godoc is using // to access the file system for which it serves documentation. type FileSystem interface { @@ -19,6 +31,7 @@ type FileSystem interface { Lstat(path string) (os.FileInfo, error) Stat(path string) (os.FileInfo, error) ReadDir(path string) ([]os.FileInfo, error) + RootType(path string) RootType String() string } diff --git a/deps/golang.org/x/tools/godoc/vfs/zipfs/zipfs.go b/deps/golang.org/x/tools/godoc/vfs/zipfs/zipfs.go index e554446e4..b216f5582 100644 --- a/deps/golang.org/x/tools/godoc/vfs/zipfs/zipfs.go +++ b/deps/golang.org/x/tools/godoc/vfs/zipfs/zipfs.go @@ -20,9 +20,11 @@ package zipfs // import "golang.org/x/tools/godoc/vfs/zipfs" import ( "archive/zip" "fmt" + "go/build" "io" "os" "path" + "path/filepath" "sort" "strings" "time" @@ -81,6 +83,26 @@ func (fs *zipFS) String() string { return "zip(" + fs.name + ")" } +func (fs *zipFS) RootType(abspath string) vfs.RootType { + var t vfs.RootType + switch { + case abspath == vfs.GOROOT: + t = vfs.RootTypeGoRoot + case isGoPath(abspath): + t = vfs.RootTypeGoPath + } + return t +} + +func isGoPath(path string) bool { + for _, p := range filepath.SplitList(build.Default.GOPATH) { + if p == path { + return true + } + } + return false +} + func (fs *zipFS) Close() error { fs.list = nil return fs.ReadCloser.Close() diff --git a/deps/golang.org/x/tools/imports/fastwalk_test.go b/deps/golang.org/x/tools/imports/fastwalk_test.go deleted file mode 100644 index 5b307d11b..000000000 --- a/deps/golang.org/x/tools/imports/fastwalk_test.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package imports - -import ( - "bytes" - "flag" - "fmt" - "os" - "path/filepath" - "reflect" - "runtime" - "sort" - "strings" - "sync" - "testing" -) - -func formatFileModes(m map[string]os.FileMode) string { - var keys []string - for k := range m { - keys = append(keys, k) - } - sort.Strings(keys) - var buf bytes.Buffer - for _, k := range keys { - fmt.Fprintf(&buf, "%-20s: %v\n", k, m[k]) - } - return buf.String() -} - -func testFastWalk(t *testing.T, files map[string]string, callback func(path string, typ os.FileMode) error, want map[string]os.FileMode) { - testConfig{ - gopathFiles: files, - }.test(t, func(t *goimportTest) { - got := map[string]os.FileMode{} - var mu sync.Mutex - if err := fastWalk(t.gopath, func(path string, typ os.FileMode) error { - mu.Lock() - defer mu.Unlock() - if !strings.HasPrefix(path, t.gopath) { - t.Fatalf("bogus prefix on %q, expect %q", path, t.gopath) - } - key := filepath.ToSlash(strings.TrimPrefix(path, t.gopath)) - if old, dup := got[key]; dup { - t.Fatalf("callback called twice for key %q: %v -> %v", key, old, typ) - } - got[key] = typ - return callback(path, typ) - }); err != nil { - t.Fatalf("callback returned: %v", err) - } - if !reflect.DeepEqual(got, want) { - t.Errorf("walk mismatch.\n got:\n%v\nwant:\n%v", formatFileModes(got), formatFileModes(want)) - } - }) -} - -func TestFastWalk_Basic(t *testing.T) { - testFastWalk(t, map[string]string{ - "foo/foo.go": "one", - "bar/bar.go": "two", - "skip/skip.go": "skip", - }, - func(path string, typ os.FileMode) error { - return nil - }, - map[string]os.FileMode{ - "": os.ModeDir, - "/src": os.ModeDir, - "/src/bar": os.ModeDir, - "/src/bar/bar.go": 0, - "/src/foo": os.ModeDir, - "/src/foo/foo.go": 0, - "/src/skip": os.ModeDir, - "/src/skip/skip.go": 0, - }) -} - -func TestFastWalk_Symlink(t *testing.T) { - switch runtime.GOOS { - case "windows", "plan9": - t.Skipf("skipping on %s", runtime.GOOS) - } - testFastWalk(t, map[string]string{ - "foo/foo.go": "one", - "bar/bar.go": "LINK:../foo.go", - "symdir": "LINK:foo", - }, - func(path string, typ os.FileMode) error { - return nil - }, - map[string]os.FileMode{ - "": os.ModeDir, - "/src": os.ModeDir, - "/src/bar": os.ModeDir, - "/src/bar/bar.go": os.ModeSymlink, - "/src/foo": os.ModeDir, - "/src/foo/foo.go": 0, - "/src/symdir": os.ModeSymlink, - }) -} - -func TestFastWalk_SkipDir(t *testing.T) { - testFastWalk(t, map[string]string{ - "foo/foo.go": "one", - "bar/bar.go": "two", - "skip/skip.go": "skip", - }, - func(path string, typ os.FileMode) error { - if typ == os.ModeDir && strings.HasSuffix(path, "skip") { - return filepath.SkipDir - } - return nil - }, - map[string]os.FileMode{ - "": os.ModeDir, - "/src": os.ModeDir, - "/src/bar": os.ModeDir, - "/src/bar/bar.go": 0, - "/src/foo": os.ModeDir, - "/src/foo/foo.go": 0, - "/src/skip": os.ModeDir, - }) -} - -func TestFastWalk_TraverseSymlink(t *testing.T) { - switch runtime.GOOS { - case "windows", "plan9": - t.Skipf("skipping on %s", runtime.GOOS) - } - - testFastWalk(t, map[string]string{ - "foo/foo.go": "one", - "bar/bar.go": "two", - "skip/skip.go": "skip", - "symdir": "LINK:foo", - }, - func(path string, typ os.FileMode) error { - if typ == os.ModeSymlink { - return traverseLink - } - return nil - }, - map[string]os.FileMode{ - "": os.ModeDir, - "/src": os.ModeDir, - "/src/bar": os.ModeDir, - "/src/bar/bar.go": 0, - "/src/foo": os.ModeDir, - "/src/foo/foo.go": 0, - "/src/skip": os.ModeDir, - "/src/skip/skip.go": 0, - "/src/symdir": os.ModeSymlink, - "/src/symdir/foo.go": 0, - }) -} - -var benchDir = flag.String("benchdir", runtime.GOROOT(), "The directory to scan for BenchmarkFastWalk") - -func BenchmarkFastWalk(b *testing.B) { - b.ReportAllocs() - for i := 0; i < b.N; i++ { - err := fastWalk(*benchDir, func(path string, typ os.FileMode) error { return nil }) - if err != nil { - b.Fatal(err) - } - } -} diff --git a/deps/golang.org/x/tools/imports/fix.go b/deps/golang.org/x/tools/imports/fix.go index de6608790..af0067053 100644 --- a/deps/golang.org/x/tools/imports/fix.go +++ b/deps/golang.org/x/tools/imports/fix.go @@ -7,6 +7,7 @@ package imports import ( "bufio" "bytes" + "context" "fmt" "go/ast" "go/build" @@ -18,30 +19,37 @@ import ( "path" "path/filepath" "sort" + "strconv" "strings" "sync" "golang.org/x/tools/go/ast/astutil" + "golang.org/x/tools/internal/fastwalk" ) // Debug controls verbose logging. var Debug = false -var ( - inTests = false // set true by fix_test.go; if false, no need to use testMu - testMu sync.RWMutex // guards globals reset by tests; used only if inTests -) - -// LocalPrefix, if set, instructs Process to sort import paths with the given -// prefix into another group after 3rd-party packages. +// LocalPrefix is a comma-separated string of import path prefixes, which, if +// set, instructs Process to sort the import paths with the given prefixes +// into another group after 3rd-party packages. var LocalPrefix string +func localPrefixes() []string { + if LocalPrefix != "" { + return strings.Split(LocalPrefix, ",") + } + return nil +} + // importToGroup is a list of functions which map from an import path to // a group number. var importToGroup = []func(importPath string) (num int, ok bool){ func(importPath string) (num int, ok bool) { - if LocalPrefix != "" && strings.HasPrefix(importPath, LocalPrefix) { - return 3, true + for _, p := range localPrefixes() { + if strings.HasPrefix(importPath, p) || strings.TrimSuffix(p, "/") == importPath { + return 3, true + } } return }, @@ -282,15 +290,27 @@ func fixImports(fset *token.FileSet, f *ast.File, filename string) (added []stri } // Search for imports matching potential package references. - searches := 0 type result struct { - ipath string // import path (if err == nil) + ipath string // import path name string // optional name to rename import as - err error } - results := make(chan result) + results := make(chan result, len(refs)) + + ctx, cancel := context.WithCancel(context.TODO()) + var wg sync.WaitGroup + defer func() { + cancel() + wg.Wait() + }() + var ( + firstErr error + firstErrOnce sync.Once + ) for pkgName, symbols := range refs { + wg.Add(1) go func(pkgName string, symbols map[string]bool) { + defer wg.Done() + if packageInfo != nil { sibling := packageInfo.Imports[pkgName] if sibling.Path != "" { @@ -303,39 +323,64 @@ func fixImports(fset *token.FileSet, f *ast.File, filename string) (added []stri } } } - ipath, rename, err := findImport(pkgName, symbols, filename) - r := result{ipath: ipath, err: err} + + ipath, rename, err := findImport(ctx, pkgName, symbols, filename) + if err != nil { + firstErrOnce.Do(func() { + firstErr = err + cancel() + }) + return + } + + if ipath == "" { + return // No matching package. + } + + r := result{ipath: ipath} if rename { r.name = pkgName } results <- r + return }(pkgName, symbols) - searches++ } - for i := 0; i < searches; i++ { - result := <-results - if result.err != nil { - return nil, result.err - } - if result.ipath != "" { - if result.name != "" { - astutil.AddNamedImport(fset, f, result.name, result.ipath) - } else { - astutil.AddImport(fset, f, result.ipath) - } - added = append(added, result.ipath) + go func() { + wg.Wait() + close(results) + }() + + for result := range results { + if result.name != "" { + astutil.AddNamedImport(fset, f, result.name, result.ipath) + } else { + astutil.AddImport(fset, f, result.ipath) } + added = append(added, result.ipath) } + if firstErr != nil { + return nil, firstErr + } return added, nil } // importPathToName returns the package name for the given import path. var importPathToName func(importPath, srcDir string) (packageName string) = importPathToNameGoPath -// importPathToNameBasic assumes the package name is the base of import path. +// importPathToNameBasic assumes the package name is the base of import path, +// except that if the path ends in foo/vN, it assumes the package name is foo. func importPathToNameBasic(importPath, srcDir string) (packageName string) { - return path.Base(importPath) + base := path.Base(importPath) + if strings.HasPrefix(base, "v") { + if _, err := strconv.Atoi(base[1:]); err == nil { + dir := path.Dir(importPath) + if dir != "." { + return path.Base(dir) + } + } + } + return base } // importPathToNameGoPath finds out the actual package name, as declared in its .go files. @@ -435,7 +480,7 @@ var ( populateIgnoreOnce sync.Once ignoredDirs []os.FileInfo - dirScanMu sync.RWMutex + dirScanMu sync.Mutex dirScan map[string]*pkg // abs dir path => *pkg ) @@ -443,12 +488,16 @@ type pkg struct { dir string // absolute file path to pkg directory ("/usr/lib/go/src/net/http") importPath string // full pkg import path ("net/http", "foo/bar/vendor/a/b") importPathShort string // vendorless import path ("net/http", "a/b") - distance int // relative distance to target +} + +type pkgDistance struct { + pkg *pkg + distance int // relative distance to target } // byDistanceOrImportPathShortLength sorts by relative distance breaking ties // on the short import path length and then the import string itself. -type byDistanceOrImportPathShortLength []*pkg +type byDistanceOrImportPathShortLength []pkgDistance func (s byDistanceOrImportPathShortLength) Len() int { return len(s) } func (s byDistanceOrImportPathShortLength) Less(i, j int) bool { @@ -463,7 +512,7 @@ func (s byDistanceOrImportPathShortLength) Less(i, j int) bool { return di < dj } - vi, vj := s[i].importPathShort, s[j].importPathShort + vi, vj := s[i].pkg.importPathShort, s[j].pkg.importPathShort if len(vi) != len(vj) { return len(vi) < len(vj) } @@ -535,16 +584,13 @@ func skipDir(fi os.FileInfo) bool { return false } -// shouldTraverse reports whether the symlink fi should, found in dir, +// shouldTraverse reports whether the symlink fi, found in dir, // should be followed. It makes sure symlinks were never visited // before to avoid symlink loops. func shouldTraverse(dir string, fi os.FileInfo) bool { path := filepath.Join(dir, fi.Name()) target, err := filepath.EvalSymlinks(path) if err != nil { - if !os.IsNotExist(err) { - fmt.Fprintln(os.Stderr, err) - } return false } ts, err := os.Stat(target) @@ -582,39 +628,35 @@ func shouldTraverse(dir string, fi os.FileInfo) bool { var testHookScanDir = func(dir string) {} -var scanGoRootDone = make(chan struct{}) // closed when scanGoRoot is done +type goDirType string -func scanGoRoot() { - go func() { - scanGoDirs(true) - close(scanGoRootDone) - }() -} +const ( + goRoot goDirType = "$GOROOT" + goPath goDirType = "$GOPATH" +) -func scanGoPath() { scanGoDirs(false) } +var scanGoRootDone = make(chan struct{}) // closed when scanGoRoot is done -func scanGoDirs(goRoot bool) { +// scanGoDirs populates the dirScan map for the given directory type. It may be +// called concurrently (and usually is, if both directory types are needed). +func scanGoDirs(which goDirType) { if Debug { - which := "$GOROOT" - if !goRoot { - which = "$GOPATH" - } - log.Printf("scanning " + which) - defer log.Printf("scanned " + which) + log.Printf("scanning %s", which) + defer log.Printf("scanned %s", which) } - dirScanMu.Lock() - if dirScan == nil { - dirScan = make(map[string]*pkg) - } - dirScanMu.Unlock() for _, srcDir := range build.Default.SrcDirs() { isGoroot := srcDir == filepath.Join(build.Default.GOROOT, "src") - if isGoroot != goRoot { + if isGoroot != (which == goRoot) { continue } testHookScanDir(srcDir) + srcV := filepath.Join(srcDir, "v") + srcMod := filepath.Join(srcDir, "mod") walkFn := func(path string, typ os.FileMode) error { + if path == srcV || path == srcMod { + return filepath.SkipDir + } dir := filepath.Dir(path) if typ.IsRegular() { if dir == srcDir { @@ -625,16 +667,21 @@ func scanGoDirs(goRoot bool) { if !strings.HasSuffix(path, ".go") { return nil } + dirScanMu.Lock() - if _, dup := dirScan[dir]; !dup { - importpath := filepath.ToSlash(dir[len(srcDir)+len("/"):]) - dirScan[dir] = &pkg{ - importPath: importpath, - importPathShort: vendorlessImportPath(importpath), - dir: dir, - } + defer dirScanMu.Unlock() + if _, dup := dirScan[dir]; dup { + return nil + } + if dirScan == nil { + dirScan = make(map[string]*pkg) + } + importpath := filepath.ToSlash(dir[len(srcDir)+len("/"):]) + dirScan[dir] = &pkg{ + importPath: importpath, + importPathShort: VendorlessPath(importpath), + dir: dir, } - dirScanMu.Unlock() return nil } if typ == os.ModeDir { @@ -664,20 +711,20 @@ func scanGoDirs(goRoot bool) { return nil } if shouldTraverse(dir, fi) { - return traverseLink + return fastwalk.TraverseLink } } return nil } - if err := fastWalk(srcDir, walkFn); err != nil { + if err := fastwalk.Walk(srcDir, walkFn); err != nil { log.Printf("goimports: scanning directory %v: %v", srcDir, err) } } } -// vendorlessImportPath returns the devendorized version of the provided import path. -// e.g. "foo/bar/vendor/a/b" => "a/b" -func vendorlessImportPath(ipath string) string { +// VendorlessPath returns the devendorized version of the import path ipath. +// For example, VendorlessPath("foo/bar/vendor/a/b") returns "a/b". +func VendorlessPath(ipath string) string { // Devendorize for use in import statement. if i := strings.LastIndex(ipath, "/vendor/"); i >= 0 { return ipath[i+len("/vendor/"):] @@ -690,20 +737,20 @@ func vendorlessImportPath(ipath string) string { // loadExports returns the set of exported symbols in the package at dir. // It returns nil on error or if the package name in dir does not match expectPackage. -var loadExports func(expectPackage, dir string) map[string]bool = loadExportsGoPath +var loadExports func(ctx context.Context, expectPackage, dir string) (map[string]bool, error) = loadExportsGoPath -func loadExportsGoPath(expectPackage, dir string) map[string]bool { +func loadExportsGoPath(ctx context.Context, expectPackage, dir string) (map[string]bool, error) { if Debug { log.Printf("loading exports in dir %s (seeking package %s)", dir, expectPackage) } exports := make(map[string]bool) - ctx := build.Default + buildCtx := build.Default // ReadDir is like ioutil.ReadDir, but only returns *.go files // and filters out _test.go files since they're not relevant // and only slow things down. - ctx.ReadDir = func(dir string) (notTests []os.FileInfo, err error) { + buildCtx.ReadDir = func(dir string) (notTests []os.FileInfo, err error) { all, err := ioutil.ReadDir(dir) if err != nil { return nil, err @@ -718,16 +765,22 @@ func loadExportsGoPath(expectPackage, dir string) map[string]bool { return notTests, nil } - files, err := ctx.ReadDir(dir) + files, err := buildCtx.ReadDir(dir) if err != nil { log.Print(err) - return nil + return nil, err } fset := token.NewFileSet() for _, fi := range files { - match, err := ctx.MatchFile(dir, fi.Name()) + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } + + match, err := buildCtx.MatchFile(dir, fi.Name()) if err != nil || !match { continue } @@ -737,19 +790,20 @@ func loadExportsGoPath(expectPackage, dir string) map[string]bool { if Debug { log.Printf("Parsing %s: %v", fullFile, err) } - return nil + return nil, err } pkgName := f.Name.Name if pkgName == "documentation" { // Special case from go/build.ImportDir, not - // handled by ctx.MatchFile. + // handled by buildCtx.MatchFile. continue } if pkgName != expectPackage { + err := fmt.Errorf("scan of dir %v is not expected package %v (actually %v)", dir, expectPackage, pkgName) if Debug { - log.Printf("scan of dir %v is not expected package %v (actually %v)", dir, expectPackage, pkgName) + log.Print(err) } - return nil + return nil, err } for name := range f.Scope.Objects { if ast.IsExported(name) { @@ -766,7 +820,7 @@ func loadExportsGoPath(expectPackage, dir string) map[string]bool { sort.Strings(exportList) log.Printf("loaded exports in dir %v (package %v): %v", dir, expectPackage, strings.Join(exportList, ", ")) } - return exports + return exports, nil } // findImport searches for a package with the given symbols. @@ -781,16 +835,11 @@ func loadExportsGoPath(expectPackage, dir string) map[string]bool { // import line: // import pkg "foo/bar" // to satisfy uses of pkg.X in the file. -var findImport func(pkgName string, symbols map[string]bool, filename string) (foundPkg string, rename bool, err error) = findImportGoPath +var findImport func(ctx context.Context, pkgName string, symbols map[string]bool, filename string) (foundPkg string, rename bool, err error) = findImportGoPath // findImportGoPath is the normal implementation of findImport. // (Some companies have their own internally.) -func findImportGoPath(pkgName string, symbols map[string]bool, filename string) (foundPkg string, rename bool, err error) { - if inTests { - testMu.RLock() - defer testMu.RUnlock() - } - +func findImportGoPath(ctx context.Context, pkgName string, symbols map[string]bool, filename string) (foundPkg string, rename bool, err error) { pkgDir, err := filepath.Abs(filename) if err != nil { return "", false, err @@ -828,18 +877,25 @@ func findImportGoPath(pkgName string, symbols map[string]bool, filename string) // // TODO(bradfitz): run each $GOPATH entry async. But nobody // really has more than one anyway, so low priority. - scanGoRootOnce.Do(scanGoRoot) // async + scanGoRootOnce.Do(func() { + go func() { + scanGoDirs(goRoot) + close(scanGoRootDone) + }() + }) if !fileInDir(filename, build.Default.GOROOT) { - scanGoPathOnce.Do(scanGoPath) // blocking + scanGoPathOnce.Do(func() { scanGoDirs(goPath) }) } <-scanGoRootDone // Find candidate packages, looking only at their directory names first. - var candidates []*pkg + var candidates []pkgDistance for _, pkg := range dirScan { if pkgIsCandidate(filename, pkgName, pkg) { - pkg.distance = distance(pkgDir, pkg.dir) - candidates = append(candidates, pkg) + candidates = append(candidates, pkgDistance{ + pkg: pkg, + distance: distance(pkgDir, pkg.dir), + }) } } @@ -849,60 +905,63 @@ func findImportGoPath(pkgName string, symbols map[string]bool, filename string) // there's no "penalty" for vendoring. sort.Sort(byDistanceOrImportPathShortLength(candidates)) if Debug { - for i, pkg := range candidates { - log.Printf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), pkg.importPathShort, pkg.dir) + for i, c := range candidates { + log.Printf("%s candidate %d/%d: %v in %v", pkgName, i+1, len(candidates), c.pkg.importPathShort, c.pkg.dir) } } // Collect exports for packages with matching names. - done := make(chan struct{}) // closed when we find the answer - defer close(done) - rescv := make([]chan *pkg, len(candidates)) for i := range candidates { - rescv[i] = make(chan *pkg) + rescv[i] = make(chan *pkg, 1) } const maxConcurrentPackageImport = 4 loadExportsSem := make(chan struct{}, maxConcurrentPackageImport) + ctx, cancel := context.WithCancel(ctx) + var wg sync.WaitGroup + defer func() { + cancel() + wg.Wait() + }() + + wg.Add(1) go func() { - for i, pkg := range candidates { + defer wg.Done() + for i, c := range candidates { select { case loadExportsSem <- struct{}{}: - select { - case <-done: - return - default: - } - case <-done: + case <-ctx.Done(): return } - pkg := pkg - resc := rescv[i] - go func() { - if inTests { - testMu.RLock() - defer testMu.RUnlock() + + wg.Add(1) + go func(c pkgDistance, resc chan<- *pkg) { + defer func() { + <-loadExportsSem + wg.Done() + }() + + exports, err := loadExports(ctx, pkgName, c.pkg.dir) + if err != nil { + resc <- nil + return } - defer func() { <-loadExportsSem }() - exports := loadExports(pkgName, pkg.dir) // If it doesn't have the right // symbols, send nil to mean no match. for symbol := range symbols { if !exports[symbol] { - pkg = nil - break + resc <- nil + return } } - select { - case resc <- pkg: - case <-done: - } - }() + resc <- c.pkg + }(c, rescv[i]) } }() + for _, resc := range rescv { pkg := <-resc if pkg == nil { @@ -945,7 +1004,7 @@ func pkgIsCandidate(filename, pkgIdent string, pkg *pkg) bool { // permit a directory "foo" to be package // "bar", which is strongly discouraged // anyway. There's no reason goimports needs - // to be slow just to accomodate that. + // to be slow just to accommodate that. lastTwo := lastTwoComponents(pkg.importPathShort) if strings.Contains(lastTwo, pkgIdent) { return true diff --git a/deps/golang.org/x/tools/imports/fix_test.go b/deps/golang.org/x/tools/imports/fix_test.go index 83ceb0250..e5b307406 100644 --- a/deps/golang.org/x/tools/imports/fix_test.go +++ b/deps/golang.org/x/tools/imports/fix_test.go @@ -6,7 +6,9 @@ package imports import ( "bytes" + "context" "flag" + "fmt" "go/build" "io/ioutil" "os" @@ -887,6 +889,169 @@ import "fmt" func main() { _ = fmt.Println } +`, + }, + + { + name: "issue #23709", + in: `package main + +import ( + "math" // fun +) + +func main() { + x := math.MaxInt64 + fmt.Println(strings.Join(",", []string{"hi"}), x) +}`, + out: `package main + +import ( + "fmt" + "math" // fun + "strings" +) + +func main() { + x := math.MaxInt64 + fmt.Println(strings.Join(",", []string{"hi"}), x) +} +`, + }, + + { + name: "issue #26246 1", + in: `package main + +import ( + _ "io" + _ "net/http" + _ "net/http/pprof" // install the pprof http handlers + _ "strings" +) + +func main() { +} +`, + out: `package main + +import ( + _ "io" + _ "net/http" + _ "net/http/pprof" // install the pprof http handlers + _ "strings" +) + +func main() { +} +`, + }, + + { + name: "issue #26246 2", + in: `package main + +import ( + _ "io" + _ "net/http/pprof" // install the pprof http handlers + _ "net/http" + _ "strings" +) + +func main() { +} +`, + out: `package main + +import ( + _ "io" + _ "net/http" + _ "net/http/pprof" // install the pprof http handlers + _ "strings" +) + +func main() { +} +`, + }, + + { + name: "issue #26246 3", + in: `package main + +import ( + "encoding/json" + "io" + "net/http" + _ "net/http/pprof" // install the pprof http handlers + "strings" + + "github.com/pkg/errors" +) + +func main() { + _ = strings.ToUpper("hello") + _ = io.EOF + var ( + _ json.Number + _ *http.Request + _ errors.Frame + ) +} +`, + out: `package main + +import ( + "encoding/json" + "io" + "net/http" + _ "net/http/pprof" // install the pprof http handlers + "strings" + + "github.com/pkg/errors" +) + +func main() { + _ = strings.ToUpper("hello") + _ = io.EOF + var ( + _ json.Number + _ *http.Request + _ errors.Frame + ) +} +`, + }, + + { + name: "issue #26290 1", + in: `package p // comment + +import "math" + +var _ = fmt.Printf +`, + out: `package p // comment + +import "fmt" + +var _ = fmt.Printf +`, + }, + + { + name: "issue #26290 2", + in: `package p + +import "math" + +var _ = fmt.Printf +`, + out: `package p + +import "fmt" + +var _ = fmt.Printf `, }, } @@ -902,16 +1067,22 @@ func TestFixImports(t *testing.T) { "regexp": "regexp", "snappy": "code.google.com/p/snappy-go/snappy", "str": "strings", + "strings": "strings", "user": "appengine/user", "zip": "archive/zip", } - old := findImport + oldFindImport := findImport + oldDirPackageInfo := dirPackageInfo defer func() { - findImport = old + findImport = oldFindImport + dirPackageInfo = oldDirPackageInfo }() - findImport = func(pkgName string, symbols map[string]bool, filename string) (string, bool, error) { + findImport = func(_ context.Context, pkgName string, symbols map[string]bool, filename string) (string, bool, error) { return simplePkgs[pkgName], pkgName == "str", nil } + dirPackageInfo = func(_, _, _ string) (*packageInfo, error) { + return nil, fmt.Errorf("no directory package info in tests") + } options := &Options{ TabWidth: 8, @@ -936,6 +1107,72 @@ func TestFixImports(t *testing.T) { } } +func TestProcess_nil_src(t *testing.T) { + dir, err := ioutil.TempDir("", "goimports-") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(dir) + tests := []struct { + name string + in, out string + }{ + { + name: "nil-src", + in: `package foo +func bar() { +fmt.Println("hi") +} +`, + out: `package foo + +import "fmt" + +func bar() { + fmt.Println("hi") +} +`, + }, + { + name: "missing package", + in: ` +func bar() { +fmt.Println("hi") +} +`, + out: ` +import "fmt" + +func bar() { + fmt.Println("hi") +} +`, + }, + } + + options := &Options{ + TabWidth: 8, + TabIndent: true, + Comments: true, + Fragment: true, + } + + for _, tt := range tests { + filename := filepath.Join(dir, tt.name+".go") + if err := ioutil.WriteFile(filename, []byte(tt.in), 0666); err != nil { + t.Fatal(err) + } + buf, err := Process(filename, nil, options) + if err != nil { + t.Errorf("error on %q: %v", tt.name, err) + continue + } + if got := string(buf); got != tt.out { + t.Errorf("results diff on %q\nGOT:\n%s\nWANT:\n%s\n", tt.name, got, tt.out) + } + } +} + // Test support for packages in GOPATH that are actually symlinks. // Also test that a symlink loop does not block the process. func TestImportSymlinks(t *testing.T) { @@ -1046,6 +1283,32 @@ var ( } +// Test for x/y/v2 convention for package y. +func TestFixModuleVersion(t *testing.T) { + testConfig{}.test(t, func(t *goimportTest) { + input := `package p + +import ( + "fmt" + + "foo/v2" +) + +var ( + _ = fmt.Print + _ = foo.Foo +) +` + buf, err := Process(filepath.Join(t.gopath, "src/mypkg.com/outpkg/toformat.go"), []byte(input), &Options{}) + if err != nil { + t.Fatal(err) + } + if got := string(buf); got != input { + t.Fatalf("results differ\nGOT:\n%s\nWANT:\n%s\n", got, input) + } + }) +} + // Test for correctly identifying the name of a vendored package when it // differs from its directory name. In this test, the import line // "mypkg.com/mypkg.v1" would be removed if goimports wasn't able to detect @@ -1119,7 +1382,7 @@ type Buffer2 struct {} } build.Default.GOROOT = goroot - got, rename, err := findImportGoPath("bytes", map[string]bool{"Buffer2": true}, "x.go") + got, rename, err := findImportGoPath(context.Background(), "bytes", map[string]bool{"Buffer2": true}, "x.go") if err != nil { t.Fatal(err) } @@ -1127,7 +1390,7 @@ type Buffer2 struct {} t.Errorf(`findImportGoPath("bytes", Buffer2 ...)=%q, %t, want "%s", false`, got, rename, bytesPkgPath) } - got, rename, err = findImportGoPath("bytes", map[string]bool{"Missing": true}, "x.go") + got, rename, err = findImportGoPath(context.Background(), "bytes", map[string]bool{"Missing": true}, "x.go") if err != nil { t.Fatal(err) } @@ -1137,34 +1400,26 @@ type Buffer2 struct {} }) } -func init() { - inTests = true -} - func withEmptyGoPath(fn func()) { - testMu.Lock() - - dirScanMu.Lock() populateIgnoreOnce = sync.Once{} scanGoRootOnce = sync.Once{} scanGoPathOnce = sync.Once{} dirScan = nil ignoredDirs = nil scanGoRootDone = make(chan struct{}) - dirScanMu.Unlock() oldGOPATH := build.Default.GOPATH oldGOROOT := build.Default.GOROOT + oldCompiler := build.Default.Compiler build.Default.GOPATH = "" + build.Default.Compiler = "gc" testHookScanDir = func(string) {} - testMu.Unlock() defer func() { - testMu.Lock() testHookScanDir = func(string) {} build.Default.GOPATH = oldGOPATH build.Default.GOROOT = oldGOROOT - testMu.Unlock() + build.Default.Compiler = oldCompiler }() fn() @@ -1180,7 +1435,7 @@ func TestFindImportInternal(t *testing.T) { t.Skip(err) } - got, rename, err := findImportGoPath("race", map[string]bool{"Acquire": true}, filepath.Join(runtime.GOROOT(), "src/math/x.go")) + got, rename, err := findImportGoPath(context.Background(), "race", map[string]bool{"Acquire": true}, filepath.Join(runtime.GOROOT(), "src/math/x.go")) if err != nil { t.Fatal(err) } @@ -1189,7 +1444,7 @@ func TestFindImportInternal(t *testing.T) { } // should not be able to use internal from outside that tree - got, rename, err = findImportGoPath("race", map[string]bool{"Acquire": true}, filepath.Join(runtime.GOROOT(), "x.go")) + got, rename, err = findImportGoPath(context.Background(), "race", map[string]bool{"Acquire": true}, filepath.Join(runtime.GOROOT(), "x.go")) if err != nil { t.Fatal(err) } @@ -1229,7 +1484,7 @@ func TestFindImportRandRead(t *testing.T) { for _, sym := range tt.syms { m[sym] = true } - got, _, err := findImportGoPath("rand", m, file) + got, _, err := findImportGoPath(context.Background(), "rand", m, file) if err != nil { t.Errorf("for %q: %v", tt.syms, err) continue @@ -1247,7 +1502,7 @@ func TestFindImportVendor(t *testing.T) { "vendor/golang.org/x/net/http2/hpack/huffman.go": "package hpack\nfunc HuffmanDecode() { }\n", }, }.test(t, func(t *goimportTest) { - got, rename, err := findImportGoPath("hpack", map[string]bool{"HuffmanDecode": true}, filepath.Join(t.goroot, "src/math/x.go")) + got, rename, err := findImportGoPath(context.Background(), "hpack", map[string]bool{"HuffmanDecode": true}, filepath.Join(t.goroot, "src/math/x.go")) if err != nil { t.Fatal(err) } @@ -1420,33 +1675,96 @@ const Y = bar.X // Tests that the LocalPrefix option causes imports // to be added into a later group (num=3). func TestLocalPrefix(t *testing.T) { - defer func(s string) { LocalPrefix = s }(LocalPrefix) - LocalPrefix = "foo/" + tests := []struct { + config testConfig + localPrefix string + src string + want string + }{ + { + config: testConfig{ + gopathFiles: map[string]string{ + "foo/bar/bar.go": "package bar \n const X = 1", + }, + }, + localPrefix: "foo/", + src: "package main \n const Y = bar.X \n const _ = runtime.GOOS", + want: `package main - testConfig{ - gopathFiles: map[string]string{ - "foo/bar/bar.go": "package bar \n const X = 1", +import ( + "runtime" + + "foo/bar" +) + +const Y = bar.X +const _ = runtime.GOOS +`, }, - }.test(t, func(t *goimportTest) { - buf, err := Process(t.gopath+"/src/test/t.go", []byte("package main \n const Y = bar.X \n const _ = runtime.GOOS"), &Options{}) - if err != nil { - t.Fatal(err) - } - const want = `package main + { + config: testConfig{ + gopathFiles: map[string]string{ + "foo/foo.go": "package foo \n const X = 1", + "foo/bar/bar.go": "package bar \n const X = 1", + }, + }, + localPrefix: "foo/", + src: "package main \n const Y = bar.X \n const Z = foo.X \n const _ = runtime.GOOS", + want: `package main import ( "runtime" + "foo" "foo/bar" ) const Y = bar.X +const Z = foo.X const _ = runtime.GOOS -` - if string(buf) != want { - t.Errorf("Got:\n%s\nWant:\n%s", buf, want) - } - }) +`, + }, + { + config: testConfig{ + gopathFiles: map[string]string{ + "example.org/pkg/pkg.go": "package pkg \n const A = 1", + "foo/bar/bar.go": "package bar \n const B = 1", + "code.org/r/p/expproj/expproj.go": "package expproj \n const C = 1", + }, + }, + localPrefix: "example.org/pkg,foo/,code.org", + src: "package main \n const X = pkg.A \n const Y = bar.B \n const Z = expproj.C \n const _ = runtime.GOOS", + want: `package main + +import ( + "runtime" + + "code.org/r/p/expproj" + "example.org/pkg" + "foo/bar" +) + +const X = pkg.A +const Y = bar.B +const Z = expproj.C +const _ = runtime.GOOS +`, + }, + } + + for _, tt := range tests { + tt.config.test(t, func(t *goimportTest) { + defer func(s string) { LocalPrefix = s }(LocalPrefix) + LocalPrefix = tt.localPrefix + buf, err := Process(t.gopath+"/src/test/t.go", []byte(tt.src), &Options{}) + if err != nil { + t.Fatal(err) + } + if string(buf) != tt.want { + t.Errorf("Got:\n%s\nWant:\n%s", buf, tt.want) + } + }) + } } // Tests that running goimport on files in GOROOT (for people hacking @@ -1521,8 +1839,8 @@ func TestImportPathToNameGoPathParse(t *testing.T) { func TestIgnoreConfiguration(t *testing.T) { testConfig{ gopathFiles: map[string]string{ - ".goimportsignore": "# comment line\n\n example.net", // tests comment, blank line, whitespace trimming - "example.net/pkg/pkg.go": "package pkg\nconst X = 1", + ".goimportsignore": "# comment line\n\n example.net", // tests comment, blank line, whitespace trimming + "example.net/pkg/pkg.go": "package pkg\nconst X = 1", "otherwise-longer-so-worse.example.net/foo/pkg/pkg.go": "package pkg\nconst X = 1", }, }.test(t, func(t *goimportTest) { @@ -2050,8 +2368,7 @@ const x = mypkg.Sprintf("%s", "my package") // end ` - if got := string(out); got != want { - t.Errorf("Process returned unexpected result.\ngot:\n%v\nwant:\n%v", got, want) + t.Errorf("Process returned unexpected result.\ngot:\n%.100v\nwant:\n%.100v", got, want) } } diff --git a/deps/golang.org/x/tools/imports/imports.go b/deps/golang.org/x/tools/imports/imports.go index 062324874..a4cbf5c76 100644 --- a/deps/golang.org/x/tools/imports/imports.go +++ b/deps/golang.org/x/tools/imports/imports.go @@ -18,6 +18,7 @@ import ( "go/printer" "go/token" "io" + "io/ioutil" "regexp" "strconv" "strings" @@ -47,6 +48,13 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) { if opt == nil { opt = &Options{Comments: true, TabIndent: true, TabWidth: 8} } + if src == nil { + b, err := ioutil.ReadFile(filename) + if err != nil { + return nil, err + } + src = b + } fileSet := token.NewFileSet() file, adjust, err := parse(fileSet, filename, src, opt) diff --git a/deps/golang.org/x/tools/imports/sortimports.go b/deps/golang.org/x/tools/imports/sortimports.go index 653afc517..f3dd56c7a 100644 --- a/deps/golang.org/x/tools/imports/sortimports.go +++ b/deps/golang.org/x/tools/imports/sortimports.go @@ -167,15 +167,33 @@ func sortSpecs(fset *token.FileSet, f *ast.File, specs []ast.Spec) []ast.Spec { } s.Path.ValuePos = pos[i].Start s.EndPos = pos[i].End + nextSpecPos := pos[i].End + for _, g := range importComment[s] { for _, c := range g.List { c.Slash = pos[i].End + nextSpecPos = c.End() } } + if i < len(specs)-1 { + pos[i+1].Start = nextSpecPos + pos[i+1].End = nextSpecPos + } } sort.Sort(byCommentPos(comments)) + // Fixup comments can insert blank lines, because import specs are on different lines. + // We remove those blank lines here by merging import spec to the first import spec line. + firstSpecLine := fset.Position(specs[0].Pos()).Line + for _, s := range specs[1:] { + p := s.Pos() + line := fset.File(p).Line(p) + for previousLine := line - 1; previousLine >= firstSpecLine; { + fset.File(p).MergeLine(previousLine) + previousLine-- + } + } return specs } diff --git a/deps/golang.org/x/tools/imports/fastwalk.go b/deps/golang.org/x/tools/internal/fastwalk/fastwalk.go similarity index 83% rename from deps/golang.org/x/tools/imports/fastwalk.go rename to deps/golang.org/x/tools/internal/fastwalk/fastwalk.go index 31e6e27b0..5cc7df53f 100644 --- a/deps/golang.org/x/tools/imports/fastwalk.go +++ b/deps/golang.org/x/tools/internal/fastwalk/fastwalk.go @@ -2,17 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// A faster implementation of filepath.Walk. -// -// filepath.Walk's design necessarily calls os.Lstat on each file, -// even if the caller needs less info. And goimports only need to know -// the type of each file. The kernel interface provides the type in -// the Readdir call but the standard library ignored it. -// fastwalk_unix.go contains a fork of the syscall routines. -// -// See golang.org/issue/16399 - -package imports +// Package fastwalk provides a faster version of filepath.Walk for file system +// scanning tools. +package fastwalk import ( "errors" @@ -22,10 +14,22 @@ import ( "sync" ) -// traverseLink is a sentinel error for fastWalk, similar to filepath.SkipDir. -var traverseLink = errors.New("traverse symlink, assuming target is a directory") +// TraverseLink is used as a return value from WalkFuncs to indicate that the +// symlink named in the call may be traversed. +var TraverseLink = errors.New("fastwalk: traverse symlink, assuming target is a directory") -// fastWalk walks the file tree rooted at root, calling walkFn for +// Walk is a faster implementation of filepath.Walk. +// +// filepath.Walk's design necessarily calls os.Lstat on each file, +// even if the caller needs less info. +// Many tools need only the type of each file. +// On some platforms, this information is provided directly by the readdir +// system call, avoiding the need to stat each file individually. +// fastwalk_unix.go contains a fork of the syscall routines. +// +// See golang.org/issue/16399 +// +// Walk walks the file tree rooted at root, calling walkFn for // each file or directory in the tree, including root. // // If fastWalk returns filepath.SkipDir, the directory is skipped. @@ -36,10 +40,10 @@ var traverseLink = errors.New("traverse symlink, assuming target is a directory" // any permission bits. // * multiple goroutines stat the filesystem concurrently. The provided // walkFn must be safe for concurrent use. -// * fastWalk can follow symlinks if walkFn returns the traverseLink +// * fastWalk can follow symlinks if walkFn returns the TraverseLink // sentinel error. It is the walkFn's responsibility to prevent // fastWalk from going into symlink cycles. -func fastWalk(root string, walkFn func(path string, typ os.FileMode) error) error { +func Walk(root string, walkFn func(path string, typ os.FileMode) error) error { // TODO(bradfitz): make numWorkers configurable? We used a // minimum of 4 to give the kernel more info about multiple // things we want, in hopes its I/O scheduling can take @@ -158,7 +162,7 @@ func (w *walker) onDirEnt(dirName, baseName string, typ os.FileMode) error { err := w.fn(joined, typ) if typ == os.ModeSymlink { - if err == traverseLink { + if err == TraverseLink { // Set callbackDone so we don't call it twice for both the // symlink-as-symlink and the symlink-as-directory later: w.enqueue(walkItem{dir: joined, callbackDone: true}) diff --git a/deps/golang.org/x/tools/imports/fastwalk_dirent_fileno.go b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go similarity index 94% rename from deps/golang.org/x/tools/imports/fastwalk_dirent_fileno.go rename to deps/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go index f1fd64949..ccffec5ad 100644 --- a/deps/golang.org/x/tools/imports/fastwalk_dirent_fileno.go +++ b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_fileno.go @@ -4,7 +4,7 @@ // +build freebsd openbsd netbsd -package imports +package fastwalk import "syscall" diff --git a/deps/golang.org/x/tools/imports/fastwalk_dirent_ino.go b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go similarity index 94% rename from deps/golang.org/x/tools/imports/fastwalk_dirent_ino.go rename to deps/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go index 9fc6de038..ab7fbc0a9 100644 --- a/deps/golang.org/x/tools/imports/fastwalk_dirent_ino.go +++ b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_dirent_ino.go @@ -5,7 +5,7 @@ // +build linux darwin // +build !appengine -package imports +package fastwalk import "syscall" diff --git a/deps/golang.org/x/tools/imports/fastwalk_portable.go b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go similarity index 97% rename from deps/golang.org/x/tools/imports/fastwalk_portable.go rename to deps/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go index 6c2658347..e8ea50d65 100644 --- a/deps/golang.org/x/tools/imports/fastwalk_portable.go +++ b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_portable.go @@ -4,7 +4,7 @@ // +build appengine !linux,!darwin,!freebsd,!openbsd,!netbsd -package imports +package fastwalk import ( "io/ioutil" diff --git a/deps/golang.org/x/tools/internal/fastwalk/fastwalk_test.go b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_test.go new file mode 100644 index 000000000..e9ab0d59f --- /dev/null +++ b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_test.go @@ -0,0 +1,190 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package fastwalk_test + +import ( + "bytes" + "flag" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "reflect" + "runtime" + "sort" + "strings" + "sync" + "testing" + + "golang.org/x/tools/internal/fastwalk" +) + +func formatFileModes(m map[string]os.FileMode) string { + var keys []string + for k := range m { + keys = append(keys, k) + } + sort.Strings(keys) + var buf bytes.Buffer + for _, k := range keys { + fmt.Fprintf(&buf, "%-20s: %v\n", k, m[k]) + } + return buf.String() +} + +func testFastWalk(t *testing.T, files map[string]string, callback func(path string, typ os.FileMode) error, want map[string]os.FileMode) { + tempdir, err := ioutil.TempDir("", "test-fast-walk") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(tempdir) + for path, contents := range files { + file := filepath.Join(tempdir, "/src", path) + if err := os.MkdirAll(filepath.Dir(file), 0755); err != nil { + t.Fatal(err) + } + var err error + if strings.HasPrefix(contents, "LINK:") { + err = os.Symlink(strings.TrimPrefix(contents, "LINK:"), file) + } else { + err = ioutil.WriteFile(file, []byte(contents), 0644) + } + if err != nil { + t.Fatal(err) + } + } + got := map[string]os.FileMode{} + var mu sync.Mutex + if err := fastwalk.Walk(tempdir, func(path string, typ os.FileMode) error { + mu.Lock() + defer mu.Unlock() + if !strings.HasPrefix(path, tempdir) { + t.Fatalf("bogus prefix on %q, expect %q", path, tempdir) + } + key := filepath.ToSlash(strings.TrimPrefix(path, tempdir)) + if old, dup := got[key]; dup { + t.Fatalf("callback called twice for key %q: %v -> %v", key, old, typ) + } + got[key] = typ + return callback(path, typ) + }); err != nil { + t.Fatalf("callback returned: %v", err) + } + if !reflect.DeepEqual(got, want) { + t.Errorf("walk mismatch.\n got:\n%v\nwant:\n%v", formatFileModes(got), formatFileModes(want)) + } +} + +func TestFastWalk_Basic(t *testing.T) { + testFastWalk(t, map[string]string{ + "foo/foo.go": "one", + "bar/bar.go": "two", + "skip/skip.go": "skip", + }, + func(path string, typ os.FileMode) error { + return nil + }, + map[string]os.FileMode{ + "": os.ModeDir, + "/src": os.ModeDir, + "/src/bar": os.ModeDir, + "/src/bar/bar.go": 0, + "/src/foo": os.ModeDir, + "/src/foo/foo.go": 0, + "/src/skip": os.ModeDir, + "/src/skip/skip.go": 0, + }) +} + +func TestFastWalk_Symlink(t *testing.T) { + switch runtime.GOOS { + case "windows", "plan9": + t.Skipf("skipping on %s", runtime.GOOS) + } + testFastWalk(t, map[string]string{ + "foo/foo.go": "one", + "bar/bar.go": "LINK:../foo.go", + "symdir": "LINK:foo", + }, + func(path string, typ os.FileMode) error { + return nil + }, + map[string]os.FileMode{ + "": os.ModeDir, + "/src": os.ModeDir, + "/src/bar": os.ModeDir, + "/src/bar/bar.go": os.ModeSymlink, + "/src/foo": os.ModeDir, + "/src/foo/foo.go": 0, + "/src/symdir": os.ModeSymlink, + }) +} + +func TestFastWalk_SkipDir(t *testing.T) { + testFastWalk(t, map[string]string{ + "foo/foo.go": "one", + "bar/bar.go": "two", + "skip/skip.go": "skip", + }, + func(path string, typ os.FileMode) error { + if typ == os.ModeDir && strings.HasSuffix(path, "skip") { + return filepath.SkipDir + } + return nil + }, + map[string]os.FileMode{ + "": os.ModeDir, + "/src": os.ModeDir, + "/src/bar": os.ModeDir, + "/src/bar/bar.go": 0, + "/src/foo": os.ModeDir, + "/src/foo/foo.go": 0, + "/src/skip": os.ModeDir, + }) +} + +func TestFastWalk_TraverseSymlink(t *testing.T) { + switch runtime.GOOS { + case "windows", "plan9": + t.Skipf("skipping on %s", runtime.GOOS) + } + + testFastWalk(t, map[string]string{ + "foo/foo.go": "one", + "bar/bar.go": "two", + "skip/skip.go": "skip", + "symdir": "LINK:foo", + }, + func(path string, typ os.FileMode) error { + if typ == os.ModeSymlink { + return fastwalk.TraverseLink + } + return nil + }, + map[string]os.FileMode{ + "": os.ModeDir, + "/src": os.ModeDir, + "/src/bar": os.ModeDir, + "/src/bar/bar.go": 0, + "/src/foo": os.ModeDir, + "/src/foo/foo.go": 0, + "/src/skip": os.ModeDir, + "/src/skip/skip.go": 0, + "/src/symdir": os.ModeSymlink, + "/src/symdir/foo.go": 0, + }) +} + +var benchDir = flag.String("benchdir", runtime.GOROOT(), "The directory to scan for BenchmarkFastWalk") + +func BenchmarkFastWalk(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + err := fastwalk.Walk(*benchDir, func(path string, typ os.FileMode) error { return nil }) + if err != nil { + b.Fatal(err) + } + } +} diff --git a/deps/golang.org/x/tools/imports/fastwalk_unix.go b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go similarity index 97% rename from deps/golang.org/x/tools/imports/fastwalk_unix.go rename to deps/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go index db6ee8daf..67db6caf9 100644 --- a/deps/golang.org/x/tools/imports/fastwalk_unix.go +++ b/deps/golang.org/x/tools/internal/fastwalk/fastwalk_unix.go @@ -5,7 +5,7 @@ // +build linux darwin freebsd openbsd netbsd // +build !appengine -package imports +package fastwalk import ( "bytes" @@ -24,7 +24,7 @@ const unknownFileMode os.FileMode = os.ModeNamedPipe | os.ModeSocket | os.ModeDe func readDir(dirName string, fn func(dirName, entName string, typ os.FileMode) error) error { fd, err := syscall.Open(dirName, 0, 0) if err != nil { - return err + return &os.PathError{Op: "open", Path: dirName, Err: err} } defer syscall.Close(fd) diff --git a/deps/golang.org/x/tools/playground/appengine.go b/deps/golang.org/x/tools/playground/appengine.go index 94c5d5232..08c61f3d1 100644 --- a/deps/golang.org/x/tools/playground/appengine.go +++ b/deps/golang.org/x/tools/playground/appengine.go @@ -7,20 +7,28 @@ package playground import ( + "context" + "io" "net/http" - "appengine" - "appengine/urlfetch" + "google.golang.org/appengine" + "google.golang.org/appengine/log" + "google.golang.org/appengine/urlfetch" ) func init() { onAppengine = !appengine.IsDevAppServer() } -func client(r *http.Request) *http.Client { - return urlfetch.Client(appengine.NewContext(r)) +func contextFunc(r *http.Request) context.Context { + return appengine.NewContext(r) +} + +func post(ctx context.Context, url, contentType string, body io.Reader) (*http.Response, error) { + return urlfetch.Client(ctx).Post(url, contentType, body) } func report(r *http.Request, err error) { - appengine.NewContext(r).Errorf("%v", err) + ctx := appengine.NewContext(r) + log.Errorf(ctx, "%v", err) } diff --git a/deps/golang.org/x/tools/playground/appenginevm.go b/deps/golang.org/x/tools/playground/appenginevm.go deleted file mode 100644 index aa3a21268..000000000 --- a/deps/golang.org/x/tools/playground/appenginevm.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build appenginevm - -package playground - -func init() { - onAppengine = true -} diff --git a/deps/golang.org/x/tools/playground/common.go b/deps/golang.org/x/tools/playground/common.go index 186537a6e..f34a4b776 100644 --- a/deps/golang.org/x/tools/playground/common.go +++ b/deps/golang.org/x/tools/playground/common.go @@ -9,10 +9,12 @@ package playground // import "golang.org/x/tools/playground" import ( "bytes" + "context" "errors" "fmt" "io" "net/http" + "time" ) const baseURL = "https://golang.org" @@ -25,7 +27,7 @@ func init() { func bounce(w http.ResponseWriter, r *http.Request) { b := new(bytes.Buffer) if err := passThru(b, r); err != nil { - http.Error(w, "Server error.", http.StatusInternalServerError) + http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) report(r, err) return } @@ -38,7 +40,9 @@ func passThru(w io.Writer, req *http.Request) error { } defer req.Body.Close() url := baseURL + req.URL.Path - r, err := client(req).Post(url, req.Header.Get("Content-type"), req.Body) + ctx, cancel := context.WithTimeout(contextFunc(req), 60*time.Second) + defer cancel() + r, err := post(ctx, url, req.Header.Get("Content-type"), req.Body) if err != nil { return fmt.Errorf("making POST request: %v", err) } @@ -49,7 +53,7 @@ func passThru(w io.Writer, req *http.Request) error { return nil } -var onAppengine = false // will be overriden by appengine.go and appenginevm.go +var onAppengine = false // will be overridden by appengine.go func allowShare(r *http.Request) bool { if !onAppengine { diff --git a/deps/golang.org/x/tools/playground/local.go b/deps/golang.org/x/tools/playground/local.go index b114b8778..452054bd4 100644 --- a/deps/golang.org/x/tools/playground/local.go +++ b/deps/golang.org/x/tools/playground/local.go @@ -7,12 +7,23 @@ package playground import ( + "context" + "fmt" + "io" "log" "net/http" ) -func client(r *http.Request) *http.Client { - return http.DefaultClient +func post(ctx context.Context, url, contentType string, body io.Reader) (*http.Response, error) { + req, err := http.NewRequest("POST", url, body) + if err != nil { + return nil, fmt.Errorf("http.NewRequest: %v", err) + } + return http.DefaultClient.Do(req.WithContext(ctx)) +} + +func contextFunc(_ *http.Request) context.Context { + return context.Background() } func report(r *http.Request, err error) { diff --git a/deps/golang.org/x/tools/present/doc.go b/deps/golang.org/x/tools/present/doc.go index 45039b646..4d2761071 100644 --- a/deps/golang.org/x/tools/present/doc.go +++ b/deps/golang.org/x/tools/present/doc.go @@ -224,7 +224,7 @@ html: The function html includes the contents of the specified file as unescaped HTML. This is useful for including custom HTML elements that cannot be created using only the slide format. -It is your responsibilty to make sure the included HTML is valid and safe. +It is your responsibility to make sure the included HTML is valid and safe. .html file.html diff --git a/deps/golang.org/x/tools/present/parse.go b/deps/golang.org/x/tools/present/parse.go index d7289dbaf..dd0f00b27 100644 --- a/deps/golang.org/x/tools/present/parse.go +++ b/deps/golang.org/x/tools/present/parse.go @@ -168,8 +168,17 @@ func renderElem(t *template.Template, e Elem) (template.HTML, error) { return execTemplate(t, e.TemplateName(), data) } +// pageNum derives a page number from a section. +func pageNum(s Section, offset int) int { + if len(s.Number) == 0 { + return offset + } + return s.Number[0] + offset +} + func init() { funcs["elem"] = renderElem + funcs["pagenum"] = pageNum } // execTemplate is a helper to execute a template and return the output as a diff --git a/deps/golang.org/x/tools/refactor/eg/eg.go b/deps/golang.org/x/tools/refactor/eg/eg.go index bf0ee2909..0cd1937ac 100644 --- a/deps/golang.org/x/tools/refactor/eg/eg.go +++ b/deps/golang.org/x/tools/refactor/eg/eg.go @@ -145,6 +145,7 @@ type Transformer struct { env map[string]ast.Expr // maps parameter name to wildcard binding importedObjs map[types.Object]*ast.SelectorExpr // objects imported by after(). before, after ast.Expr + afterStmts []ast.Stmt allowWildcards bool // Working state of Transform(): @@ -198,7 +199,7 @@ func NewTransformer(fset *token.FileSet, tmplPkg *types.Package, tmplFile *ast.F if err != nil { return nil, fmt.Errorf("before: %s", err) } - after, err := soleExpr(afterDecl) + afterStmts, after, err := stmtAndExpr(afterDecl) if err != nil { return nil, fmt.Errorf("after: %s", err) } @@ -242,6 +243,7 @@ func NewTransformer(fset *token.FileSet, tmplPkg *types.Package, tmplFile *ast.F importedObjs: make(map[types.Object]*ast.SelectorExpr), before: before, after: after, + afterStmts: afterStmts, } // Combine type info from the template and input packages, and @@ -279,6 +281,7 @@ func WriteAST(fset *token.FileSet, filename string, f *ast.File) (err error) { if err != nil { return err } + defer func() { if err2 := fh.Close(); err != nil { err = err2 // prefer earlier error @@ -319,6 +322,33 @@ func soleExpr(fn *ast.FuncDecl) (ast.Expr, error) { return nil, fmt.Errorf("must contain a single return or expression statement") } +// stmtAndExpr returns the expression in the last return statement as well as the preceding lines. +func stmtAndExpr(fn *ast.FuncDecl) ([]ast.Stmt, ast.Expr, error) { + if fn.Body == nil { + return nil, nil, fmt.Errorf("no body") + } + + n := len(fn.Body.List) + if n == 0 { + return nil, nil, fmt.Errorf("must contain at least one statement") + } + + stmts, last := fn.Body.List[:n-1], fn.Body.List[n-1] + + switch last := last.(type) { + case *ast.ReturnStmt: + if len(last.Results) != 1 { + return nil, nil, fmt.Errorf("return statement must have a single operand") + } + return stmts, last.Results[0], nil + + case *ast.ExprStmt: + return stmts, last.X, nil + } + + return nil, nil, fmt.Errorf("must end with a single return or expression statement") +} + // mergeTypeInfo adds type info from src to dst. func mergeTypeInfo(dst, src *types.Info) { for k, v := range src.Types { diff --git a/deps/golang.org/x/tools/refactor/eg/eg_test.go b/deps/golang.org/x/tools/refactor/eg/eg_test.go index 896bc9b08..fc3dc321d 100644 --- a/deps/golang.org/x/tools/refactor/eg/eg_test.go +++ b/deps/golang.org/x/tools/refactor/eg/eg_test.go @@ -11,7 +11,7 @@ package eg_test import ( "bytes" "flag" - exact "go/constant" + "go/constant" "go/parser" "go/token" "go/types" @@ -78,6 +78,12 @@ func Test(t *testing.T) { "testdata/H.template", "testdata/H1.go", + "testdata/I.template", + "testdata/I1.go", + + "testdata/J.template", + "testdata/J1.go", + "testdata/bad_type.template", "testdata/no_before.template", "testdata/no_after_return.template", @@ -104,7 +110,7 @@ func Test(t *testing.T) { if err != nil { if shouldFail == nil { t.Errorf("NewTransformer(%s): %s", filename, err) - } else if want := exact.StringVal(shouldFail.Val()); !strings.Contains(err.Error(), want) { + } else if want := constant.StringVal(shouldFail.Val()); !strings.Contains(err.Error(), want) { t.Errorf("NewTransformer(%s): got error %q, want error %q", filename, err, want) } } else if shouldFail != nil { diff --git a/deps/golang.org/x/tools/refactor/eg/match.go b/deps/golang.org/x/tools/refactor/eg/match.go index 43466202a..89c0f8d45 100644 --- a/deps/golang.org/x/tools/refactor/eg/match.go +++ b/deps/golang.org/x/tools/refactor/eg/match.go @@ -7,7 +7,7 @@ package eg import ( "fmt" "go/ast" - exact "go/constant" + "go/constant" "go/token" "go/types" "log" @@ -67,9 +67,9 @@ func (tr *Transformer) matchExpr(x, y ast.Expr) bool { case *ast.BasicLit: y := y.(*ast.BasicLit) - xval := exact.MakeFromLiteral(x.Value, x.Kind, 0) - yval := exact.MakeFromLiteral(y.Value, y.Kind, 0) - return exact.Compare(xval, token.EQL, yval) + xval := constant.MakeFromLiteral(x.Value, x.Kind, 0) + yval := constant.MakeFromLiteral(y.Value, y.Kind, 0) + return constant.Compare(xval, token.EQL, yval) case *ast.FuncLit: // func literals (and thus statement syntax) never match. diff --git a/deps/golang.org/x/tools/refactor/eg/rewrite.go b/deps/golang.org/x/tools/refactor/eg/rewrite.go index dd28aa578..1c3ee6185 100644 --- a/deps/golang.org/x/tools/refactor/eg/rewrite.go +++ b/deps/golang.org/x/tools/refactor/eg/rewrite.go @@ -22,6 +22,52 @@ import ( "golang.org/x/tools/go/ast/astutil" ) +// transformItem takes a reflect.Value representing a variable of type ast.Node +// transforms its child elements recursively with apply, and then transforms the +// actual element if it contains an expression. +func (tr *Transformer) transformItem(rv reflect.Value) (reflect.Value, bool, map[string]ast.Expr) { + // don't bother if val is invalid to start with + if !rv.IsValid() { + return reflect.Value{}, false, nil + } + + rv, changed, newEnv := tr.apply(tr.transformItem, rv) + + e := rvToExpr(rv) + if e == nil { + return rv, changed, newEnv + } + + savedEnv := tr.env + tr.env = make(map[string]ast.Expr) // inefficient! Use a slice of k/v pairs + + if tr.matchExpr(tr.before, e) { + if tr.verbose { + fmt.Fprintf(os.Stderr, "%s matches %s", + astString(tr.fset, tr.before), astString(tr.fset, e)) + if len(tr.env) > 0 { + fmt.Fprintf(os.Stderr, " with:") + for name, ast := range tr.env { + fmt.Fprintf(os.Stderr, " %s->%s", + name, astString(tr.fset, ast)) + } + } + fmt.Fprintf(os.Stderr, "\n") + } + tr.nsubsts++ + + // Clone the replacement tree, performing parameter substitution. + // We update all positions to n.Pos() to aid comment placement. + rv = tr.subst(tr.env, reflect.ValueOf(tr.after), + reflect.ValueOf(e.Pos())) + changed = true + newEnv = tr.env + } + tr.env = savedEnv + + return rv, changed, newEnv +} + // Transform applies the transformation to the specified parsed file, // whose type information is supplied in info, and returns the number // of replacements that were made. @@ -43,48 +89,14 @@ func (tr *Transformer) Transform(info *types.Info, pkg *types.Package, file *ast if tr.verbose { fmt.Fprintf(os.Stderr, "before: %s\n", astString(tr.fset, tr.before)) fmt.Fprintf(os.Stderr, "after: %s\n", astString(tr.fset, tr.after)) + fmt.Fprintf(os.Stderr, "afterStmts: %s\n", tr.afterStmts) } - var f func(rv reflect.Value) reflect.Value - f = func(rv reflect.Value) reflect.Value { - // don't bother if val is invalid to start with - if !rv.IsValid() { - return reflect.Value{} - } - - rv = apply(f, rv) - - e := rvToExpr(rv) - if e != nil { - savedEnv := tr.env - tr.env = make(map[string]ast.Expr) // inefficient! Use a slice of k/v pairs - - if tr.matchExpr(tr.before, e) { - if tr.verbose { - fmt.Fprintf(os.Stderr, "%s matches %s", - astString(tr.fset, tr.before), astString(tr.fset, e)) - if len(tr.env) > 0 { - fmt.Fprintf(os.Stderr, " with:") - for name, ast := range tr.env { - fmt.Fprintf(os.Stderr, " %s->%s", - name, astString(tr.fset, ast)) - } - } - fmt.Fprintf(os.Stderr, "\n") - } - tr.nsubsts++ - - // Clone the replacement tree, performing parameter substitution. - // We update all positions to n.Pos() to aid comment placement. - rv = tr.subst(tr.env, reflect.ValueOf(tr.after), - reflect.ValueOf(e.Pos())) - } - tr.env = savedEnv - } - - return rv + o, changed, _ := tr.apply(tr.transformItem, reflect.ValueOf(file)) + if changed { + panic("BUG") } - file2 := apply(f, reflect.ValueOf(file)).Interface().(*ast.File) + file2 := o.Interface().(*ast.File) // By construction, the root node is unchanged. if file != file2 { @@ -150,45 +162,91 @@ var ( identType = reflect.TypeOf((*ast.Ident)(nil)) selectorExprType = reflect.TypeOf((*ast.SelectorExpr)(nil)) objectPtrType = reflect.TypeOf((*ast.Object)(nil)) + statementType = reflect.TypeOf((*ast.Stmt)(nil)).Elem() positionType = reflect.TypeOf(token.NoPos) scopePtrType = reflect.TypeOf((*ast.Scope)(nil)) ) // apply replaces each AST field x in val with f(x), returning val. // To avoid extra conversions, f operates on the reflect.Value form. -func apply(f func(reflect.Value) reflect.Value, val reflect.Value) reflect.Value { +// f takes a reflect.Value representing the variable to modify of type ast.Node. +// It returns a reflect.Value containing the transformed value of type ast.Node, +// whether any change was made, and a map of identifiers to ast.Expr (so we can +// do contextually correct substitutions in the parent statements). +func (tr *Transformer) apply(f func(reflect.Value) (reflect.Value, bool, map[string]ast.Expr), val reflect.Value) (reflect.Value, bool, map[string]ast.Expr) { if !val.IsValid() { - return reflect.Value{} + return reflect.Value{}, false, nil } // *ast.Objects introduce cycles and are likely incorrect after // rewrite; don't follow them but replace with nil instead if val.Type() == objectPtrType { - return objectPtrNil + return objectPtrNil, false, nil } // similarly for scopes: they are likely incorrect after a rewrite; // replace them with nil if val.Type() == scopePtrType { - return scopePtrNil + return scopePtrNil, false, nil } switch v := reflect.Indirect(val); v.Kind() { case reflect.Slice: + // no possible rewriting of statements. + if v.Type().Elem() != statementType { + changed := false + var envp map[string]ast.Expr + for i := 0; i < v.Len(); i++ { + e := v.Index(i) + o, localchanged, env := f(e) + if localchanged { + changed = true + // we clobber envp here, + // which means if we have two successive + // replacements inside the same statement + // we will only generate the setup for one of them. + envp = env + } + setValue(e, o) + } + return val, changed, envp + } + + // statements are rewritten. + var out []ast.Stmt for i := 0; i < v.Len(); i++ { e := v.Index(i) - setValue(e, f(e)) + o, changed, env := f(e) + if changed { + for _, s := range tr.afterStmts { + t := tr.subst(env, reflect.ValueOf(s), reflect.Value{}).Interface() + out = append(out, t.(ast.Stmt)) + } + } + setValue(e, o) + out = append(out, e.Interface().(ast.Stmt)) } + return reflect.ValueOf(out), false, nil case reflect.Struct: + changed := false + var envp map[string]ast.Expr for i := 0; i < v.NumField(); i++ { e := v.Field(i) - setValue(e, f(e)) + o, localchanged, env := f(e) + if localchanged { + changed = true + envp = env + } + setValue(e, o) } + return val, changed, envp case reflect.Interface: e := v.Elem() - setValue(v, f(e)) + o, changed, env := f(e) + setValue(v, o) + return val, changed, env } - return val + return val, false, nil } // subst returns a copy of (replacement) pattern with values from env diff --git a/deps/golang.org/x/tools/refactor/eg/testdata/I.template b/deps/golang.org/x/tools/refactor/eg/testdata/I.template new file mode 100644 index 000000000..d03e77482 --- /dev/null +++ b/deps/golang.org/x/tools/refactor/eg/testdata/I.template @@ -0,0 +1,14 @@ +// +build ignore + +package templates + +import ( + "errors" + "fmt" +) + +func before(s string) error { return fmt.Errorf("%s", s) } +func after(s string) error { + n := fmt.Sprintf("error - %s", s) + return errors.New(n) +} diff --git a/deps/golang.org/x/tools/refactor/eg/testdata/I1.go b/deps/golang.org/x/tools/refactor/eg/testdata/I1.go new file mode 100644 index 000000000..d1762ebb3 --- /dev/null +++ b/deps/golang.org/x/tools/refactor/eg/testdata/I1.go @@ -0,0 +1,9 @@ +// +build ignore + +package I1 + +import "fmt" + +func example() { + _ = fmt.Errorf("%s", "foo") +} diff --git a/deps/golang.org/x/tools/refactor/eg/testdata/I1.golden b/deps/golang.org/x/tools/refactor/eg/testdata/I1.golden new file mode 100644 index 000000000..f33b3e106 --- /dev/null +++ b/deps/golang.org/x/tools/refactor/eg/testdata/I1.golden @@ -0,0 +1,14 @@ +// +build ignore + +package I1 + +import ( + "errors" + "fmt" +) + +func example() { + + n := fmt.Sprintf("error - %s", "foo") + _ = errors.New(n) +} diff --git a/deps/golang.org/x/tools/refactor/eg/testdata/J.template b/deps/golang.org/x/tools/refactor/eg/testdata/J.template new file mode 100644 index 000000000..6f82cdfe8 --- /dev/null +++ b/deps/golang.org/x/tools/refactor/eg/testdata/J.template @@ -0,0 +1,11 @@ +// +build ignore + +package templates + +import () + +func before(x int) int { return x + x + x } +func after(x int) int { + temp := x + x + return temp + x +} diff --git a/deps/golang.org/x/tools/refactor/eg/testdata/J1.go b/deps/golang.org/x/tools/refactor/eg/testdata/J1.go new file mode 100644 index 000000000..2fbeee801 --- /dev/null +++ b/deps/golang.org/x/tools/refactor/eg/testdata/J1.go @@ -0,0 +1,10 @@ +// +build ignore + +package I1 + +import "fmt" + +func example() { + temp := 5 + fmt.Print(temp + temp + temp) +} diff --git a/deps/golang.org/x/tools/refactor/eg/testdata/J1.golden b/deps/golang.org/x/tools/refactor/eg/testdata/J1.golden new file mode 100644 index 000000000..bb2f11c60 --- /dev/null +++ b/deps/golang.org/x/tools/refactor/eg/testdata/J1.golden @@ -0,0 +1,11 @@ +// +build ignore + +package I1 + +import "fmt" + +func example() { + temp := 5 + temp := temp + temp + fmt.Print(temp + temp) +} diff --git a/deps/golang.org/x/tools/refactor/eg/testdata/no_after_return.template b/deps/golang.org/x/tools/refactor/eg/testdata/no_after_return.template index 536b01e67..dd2cbf61e 100644 --- a/deps/golang.org/x/tools/refactor/eg/testdata/no_after_return.template +++ b/deps/golang.org/x/tools/refactor/eg/testdata/no_after_return.template @@ -1,6 +1,4 @@ package template -const shouldFail = "after: must contain a single statement" - func before() int { return 0 } func after() int { println(); return 0 } diff --git a/deps/golang.org/x/tools/refactor/rename/rename.go b/deps/golang.org/x/tools/refactor/rename/rename.go index b026e7877..e952b9841 100644 --- a/deps/golang.org/x/tools/refactor/rename/rename.go +++ b/deps/golang.org/x/tools/refactor/rename/rename.go @@ -494,7 +494,7 @@ func (r *renamer) update() error { } } } - if len(generatedFileNames) > 0 { + if !Force && len(generatedFileNames) > 0 { return fmt.Errorf("refusing to modify generated file%s containing DO NOT EDIT marker: %v", plural(len(generatedFileNames)), generatedFileNames) } diff --git a/deps/k8s.io/api/Godeps/Godeps.json b/deps/k8s.io/api/Godeps/Godeps.json index 50af2d281..c722583e9 100644 --- a/deps/k8s.io/api/Godeps/Godeps.json +++ b/deps/k8s.io/api/Godeps/Godeps.json @@ -1,11 +1,19 @@ { "ImportPath": "k8s.io/api", - "GoVersion": "go1.9", - "GodepVersion": "v79", + "GoVersion": "go1.10", + "GodepVersion": "v80", "Packages": [ "./..." ], "Deps": [ + { + "ImportPath": "github.com/davecgh/go-spew/spew", + "Rev": "782f4967f2dc4564575ca782fe2d04090b5faca8" + }, + { + "ImportPath": "github.com/ghodss/yaml", + "Rev": "73d445a93680fa1a78ae23a5839bad48f32ba1ee" + }, { "ImportPath": "github.com/gogo/protobuf/proto", "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" @@ -18,13 +26,41 @@ "ImportPath": "github.com/golang/glog", "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" }, + { + "ImportPath": "github.com/golang/protobuf/proto", + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" + }, { "ImportPath": "github.com/google/gofuzz", "Rev": "44d81051d367757e1c7c6a5a86423ece9afcf63c" }, + { + "ImportPath": "github.com/json-iterator/go", + "Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682" + }, + { + "ImportPath": "github.com/modern-go/concurrent", + "Rev": "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" + }, + { + "ImportPath": "github.com/modern-go/reflect2", + "Rev": "05fbef0ca5da472bbf96c9322b84a53edc03c9fd" + }, + { + "ImportPath": "github.com/pmezard/go-difflib/difflib", + "Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d" + }, { "ImportPath": "github.com/spf13/pflag", - "Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea" + "Rev": "583c0c0531f06d5278b7d917446061adc344b5cd" + }, + { + "ImportPath": "github.com/stretchr/testify/assert", + "Rev": "c679ae2cc0cb27ec3293fea7e254e47386f05d69" + }, + { + "ImportPath": "github.com/stretchr/testify/require", + "Rev": "c679ae2cc0cb27ec3293fea7e254e47386f05d69" }, { "ImportPath": "golang.org/x/net/http2", @@ -62,89 +98,157 @@ "ImportPath": "gopkg.in/inf.v0", "Rev": "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4" }, + { + "ImportPath": "gopkg.in/yaml.v2", + "Rev": "670d4cfef0544295bc27a114dbac37980d83185a" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/api/equality", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/api/meta", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/util/diff", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/util/framer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/util/naming", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" } ] } diff --git a/deps/k8s.io/api/Godeps/OWNERS b/deps/k8s.io/api/Godeps/OWNERS new file mode 100644 index 000000000..3d49f3060 --- /dev/null +++ b/deps/k8s.io/api/Godeps/OWNERS @@ -0,0 +1,2 @@ +approvers: +- dep-approvers diff --git a/deps/k8s.io/api/OWNERS b/deps/k8s.io/api/OWNERS index b2c570008..e79d5f1d4 100644 --- a/deps/k8s.io/api/OWNERS +++ b/deps/k8s.io/api/OWNERS @@ -48,3 +48,5 @@ reviewers: - yifan-gu - yujuhong - zmerlynn +labels: +- sig/architecture diff --git a/deps/k8s.io/api/SECURITY_CONTACTS b/deps/k8s.io/api/SECURITY_CONTACTS new file mode 100644 index 000000000..0648a8ebf --- /dev/null +++ b/deps/k8s.io/api/SECURITY_CONTACTS @@ -0,0 +1,17 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +cjcullen +jessfraz +liggitt +philips +tallclair diff --git a/deps/k8s.io/api/admission/v1beta1/BUILD b/deps/k8s.io/api/admission/v1beta1/BUILD deleted file mode 100644 index fd69b9170..000000000 --- a/deps/k8s.io/api/admission/v1beta1/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/admission/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - ], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/admission/v1beta1/generated.pb.go b/deps/k8s.io/api/admission/v1beta1/generated.pb.go index f56a0f063..d2b938e5a 100644 --- a/deps/k8s.io/api/admission/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/admission/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -39,6 +39,8 @@ import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + import strings "strings" import reflect "reflect" @@ -147,6 +149,16 @@ func (m *AdmissionRequest) MarshalTo(dAtA []byte) (int, error) { return 0, err } i += n5 + if m.DryRun != nil { + dAtA[i] = 0x58 + i++ + if *m.DryRun { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } return i, nil } @@ -199,6 +211,28 @@ func (m *AdmissionResponse) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PatchType))) i += copy(dAtA[i:], *m.PatchType) } + if len(m.AuditAnnotations) > 0 { + keysForAuditAnnotations := make([]string, 0, len(m.AuditAnnotations)) + for k := range m.AuditAnnotations { + keysForAuditAnnotations = append(keysForAuditAnnotations, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + for _, k := range keysForAuditAnnotations { + dAtA[i] = 0x32 + i++ + v := m.AuditAnnotations[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } return i, nil } @@ -290,6 +324,9 @@ func (m *AdmissionRequest) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.OldObject.Size() n += 1 + l + sovGenerated(uint64(l)) + if m.DryRun != nil { + n += 2 + } return n } @@ -311,6 +348,14 @@ func (m *AdmissionResponse) Size() (n int) { l = len(*m.PatchType) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.AuditAnnotations) > 0 { + for k, v := range m.AuditAnnotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } return n } @@ -356,6 +401,7 @@ func (this *AdmissionRequest) String() string { `UserInfo:` + strings.Replace(strings.Replace(this.UserInfo.String(), "UserInfo", "k8s_io_api_authentication_v1.UserInfo", 1), `&`, ``, 1) + `,`, `Object:` + strings.Replace(strings.Replace(this.Object.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, `OldObject:` + strings.Replace(strings.Replace(this.OldObject.String(), "RawExtension", "k8s_io_apimachinery_pkg_runtime.RawExtension", 1), `&`, ``, 1) + `,`, + `DryRun:` + valueToStringGenerated(this.DryRun) + `,`, `}`, }, "") return s @@ -364,12 +410,23 @@ func (this *AdmissionResponse) String() string { if this == nil { return "nil" } + keysForAuditAnnotations := make([]string, 0, len(this.AuditAnnotations)) + for k := range this.AuditAnnotations { + keysForAuditAnnotations = append(keysForAuditAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAuditAnnotations) + mapStringForAuditAnnotations := "map[string]string{" + for _, k := range keysForAuditAnnotations { + mapStringForAuditAnnotations += fmt.Sprintf("%v: %v,", k, this.AuditAnnotations[k]) + } + mapStringForAuditAnnotations += "}" s := strings.Join([]string{`&AdmissionResponse{`, `UID:` + fmt.Sprintf("%v", this.UID) + `,`, `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "Status", "k8s_io_apimachinery_pkg_apis_meta_v1.Status", 1) + `,`, `Patch:` + valueToStringGenerated(this.Patch) + `,`, `PatchType:` + valueToStringGenerated(this.PatchType) + `,`, + `AuditAnnotations:` + mapStringForAuditAnnotations + `,`, `}`, }, "") return s @@ -717,6 +774,27 @@ func (m *AdmissionRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.DryRun = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -910,6 +988,122 @@ func (m *AdmissionResponse) Unmarshal(dAtA []byte) error { s := PatchType(dAtA[iNdEx:postIndex]) m.PatchType = &s iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuditAnnotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.AuditAnnotations == nil { + m.AuditAnnotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.AuditAnnotations[mapkey] = mapvalue + } else { + var mapvalue string + m.AuditAnnotations[mapkey] = mapvalue + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -1157,52 +1351,57 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 739 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00,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 0x8f, 0xc8, 0xb4, 0xff, 0xcd, - 0xd6, 0xf5, 0x07, 0x39, 0xda, 0x27, 0x5e, 0x97, 0x05, 0x34, 0x3a, 0x73, 0xc2, 0x5e, 0x27, 0x49, - 0x08, 0xc7, 0xa7, 0x92, 0x7c, 0x8f, 0xe5, 0x4c, 0x63, 0x45, 0x71, 0x20, 0x99, 0x4f, 0x6f, 0x11, - 0x36, 0x7f, 0x46, 0x10, 0x5e, 0x97, 0xfa, 0xe4, 0x16, 0xef, 0xfe, 0x34, 0x5e, 0x2c, 0x59, 0xdf, - 0x61, 0x81, 0x14, 0x32, 0xba, 0x49, 0x5a, 0xfe, 0x52, 0x02, 0x0b, 0xdb, 0x99, 0x8d, 0x98, 0xbe, - 0x89, 0xa9, 0x90, 0xd0, 0x05, 0xb3, 0x31, 0x6b, 0x5b, 0xc6, 0x92, 0xb1, 0x62, 0xba, 0xf7, 0xce, - 0x87, 0x8d, 0xc2, 0x68, 0xd8, 0x98, 0x6d, 0xee, 0xed, 0x5c, 0x0f, 0x1b, 0xff, 0x4e, 0xeb, 0x22, - 0xcf, 0x42, 0x2a, 0x50, 0x73, 0x6f, 0x07, 0x27, 0x64, 0xf8, 0x1c, 0x14, 0x7b, 0x2c, 0x68, 0x5b, - 0x33, 0x4b, 0xc6, 0x4a, 0x6d, 0x63, 0x13, 0xe5, 0x63, 0x1b, 0xd3, 0x50, 0xd8, 0xeb, 0x24, 0x09, - 0x81, 0x12, 0xef, 0xd0, 0x60, 0x1d, 0x3d, 0x89, 0x78, 0x1c, 0x3e, 0xa3, 0x51, 0xf2, 0x67, 0x9e, - 0xb2, 0xa0, 0xed, 0xce, 0xe9, 0xe6, 0xc5, 0x24, 0xc2, 0x4a, 0x11, 0x76, 0x41, 0x35, 0xa2, 0x82, - 0xc7, 0x91, 0x47, 0xad, 0x59, 0xa5, 0xfe, 0xe8, 0xd7, 0xd5, 0xb1, 0x56, 0x70, 0x17, 0x74, 0x87, - 0x6a, 0x96, 0xc1, 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06, 0x00, 0x00, + // 821 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x37, 0x69, 0x12, 0x4f, 0x2a, 0x36, 0x3b, 0x80, 0x64, 0x45, 0xc8, 0x09, 0x3d, 0xa0, + 0x20, 0x6d, 0xc7, 0xb4, 0x82, 0x55, 0xb5, 0xe2, 0x12, 0xd3, 0x08, 0x55, 0x48, 0xdb, 0x6a, 0x76, + 0x83, 0x80, 0x03, 0xd2, 0xc4, 0x9e, 0x4d, 0x4c, 0xe2, 0x19, 0xe3, 0x99, 0x49, 0xc9, 0x0d, 0x71, + 0xe5, 0x82, 0xc4, 0x9f, 0xc4, 0xa5, 0xc7, 0x3d, 0xee, 0x29, 0xa2, 0xe1, 0xbf, 0xe8, 0x09, 0x79, + 0x3c, 0x8e, 0x43, 0xba, 0x85, 0x5d, 0xb4, 0x27, 0xfb, 0xfd, 0xf8, 0xbe, 0x37, 0xf3, 0xbd, 0x37, + 0x0f, 0x0c, 0x67, 0x27, 0x02, 0x45, 0xdc, 0x9b, 0xa9, 0x31, 0x4d, 0x19, 0x95, 0x54, 0x78, 0x0b, + 0xca, 0x42, 0x9e, 0x7a, 0x26, 0x40, 0x92, 0xc8, 0x23, 0x61, 0x1c, 0x09, 0x11, 0x71, 0xe6, 0x2d, + 0x8e, 0xc6, 0x54, 0x92, 0x23, 0x6f, 0x42, 0x19, 0x4d, 0x89, 0xa4, 0x21, 0x4a, 0x52, 0x2e, 0x39, + 0xfc, 0x20, 0xcf, 0x46, 0x24, 0x89, 0xd0, 0x26, 0x1b, 0x99, 0xec, 0xce, 0xe1, 0x24, 0x92, 0x53, + 0x35, 0x46, 0x01, 0x8f, 0xbd, 0x09, 0x9f, 0x70, 0x4f, 0x83, 0xc6, 0xea, 0xb9, 0xb6, 0xb4, 0xa1, + 0xff, 0x72, 0x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8, 0x45, 0x44, 0x2f, 0xe1, 0x08, 0x34, 0xd2, 0x7c, 0x49, 0x6a, 0x8e, 0xd6, + 0x31, 0x7a, 0xed, 0xcb, 0x69, 0x94, 0xdf, 0xca, 0x5a, 0x6d, 0x0c, 0x5c, 0x70, 0xc1, 0x6f, 0xf5, + 0x4a, 0xd3, 0xb7, 0x37, 0x0b, 0xd3, 0x7b, 0x43, 0xd1, 0xfc, 0x7d, 0xb3, 0xc3, 0xb4, 0x85, 0x37, + 0x74, 0xfe, 0xe1, 0xd5, 0xb5, 0x5b, 0x79, 0x71, 0xed, 0x56, 0x5e, 0x5e, 0xbb, 0x95, 0x9f, 0xd7, + 0xae, 0x75, 0xb5, 0x76, 0xad, 0x17, 0x6b, 0xd7, 0x7a, 0xb9, 0x76, 0xad, 0x3f, 0xd7, 0xae, 0xf5, + 0xdb, 0x5f, 0x6e, 0xe5, 0xbb, 0x86, 0x21, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xc2, 0x6f, + 0x1b, 0x71, 0x07, 0x00, 0x00, } diff --git a/deps/k8s.io/api/admission/v1beta1/generated.proto b/deps/k8s.io/api/admission/v1beta1/generated.proto index a4e4ca266..451d4c9ad 100644 --- a/deps/k8s.io/api/admission/v1beta1/generated.proto +++ b/deps/k8s.io/api/admission/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import "k8s.io/api/authentication/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -74,6 +73,11 @@ message AdmissionRequest { // OldObject is the existing object. Only populated for UPDATE requests. // +optional optional k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10; + + // DryRun indicates that modifications will definitely not be persisted for this request. + // Defaults to false. + // +optional + optional bool dryRun = 11; } // AdmissionResponse describes an admission response. @@ -97,6 +101,13 @@ message AdmissionResponse { // The type of Patch. Currently we only allow "JSONPatch". // +optional optional string patchType = 5; + + // AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). + // MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with + // admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by + // the admission webhook to add additional context to the audit log for this request. + // +optional + map auditAnnotations = 6; } // AdmissionReview describes an admission review request/response. diff --git a/deps/k8s.io/api/admission/v1beta1/types.go b/deps/k8s.io/api/admission/v1beta1/types.go index 9ad939c39..653e84710 100644 --- a/deps/k8s.io/api/admission/v1beta1/types.go +++ b/deps/k8s.io/api/admission/v1beta1/types.go @@ -71,6 +71,10 @@ type AdmissionRequest struct { // OldObject is the existing object. Only populated for UPDATE requests. // +optional OldObject runtime.RawExtension `json:"oldObject,omitempty" protobuf:"bytes,10,opt,name=oldObject"` + // DryRun indicates that modifications will definitely not be persisted for this request. + // Defaults to false. + // +optional + DryRun *bool `json:"dryRun,omitempty" protobuf:"varint,11,opt,name=dryRun"` } // AdmissionResponse describes an admission response. @@ -94,6 +98,13 @@ type AdmissionResponse struct { // The type of Patch. Currently we only allow "JSONPatch". // +optional PatchType *PatchType `json:"patchType,omitempty" protobuf:"bytes,5,opt,name=patchType"` + + // AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). + // MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with + // admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by + // the admission webhook to add additional context to the audit log for this request. + // +optional + AuditAnnotations map[string]string `json:"auditAnnotations,omitempty" protobuf:"bytes,6,opt,name=auditAnnotations"` } // PatchType is the type of patch being used to represent the mutated object diff --git a/deps/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go index 1f5313517..8a938db3b 100644 --- a/deps/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AdmissionRequest = map[string]string{ "": "AdmissionRequest describes the admission.Attributes for the admission request.", "uid": "UID is an identifier for the individual request/response. It allows us to distinguish instances of requests which are otherwise identical (parallel requests, requests when earlier requests did not modify etc) The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", @@ -39,6 +39,7 @@ var map_AdmissionRequest = map[string]string{ "userInfo": "UserInfo is information about the requesting user", "object": "Object is the object from the incoming request prior to default values being applied", "oldObject": "OldObject is the existing object. Only populated for UPDATE requests.", + "dryRun": "DryRun indicates that modifications will definitely not be persisted for this request. Defaults to false.", } func (AdmissionRequest) SwaggerDoc() map[string]string { @@ -46,12 +47,13 @@ func (AdmissionRequest) SwaggerDoc() map[string]string { } var map_AdmissionResponse = map[string]string{ - "": "AdmissionResponse describes an admission response.", - "uid": "UID is an identifier for the individual request/response. This should be copied over from the corresponding AdmissionRequest.", - "allowed": "Allowed indicates whether or not the admission request was permitted.", - "status": "Result contains extra details into why an admission request was denied. This field IS NOT consulted in any way if \"Allowed\" is \"true\".", - "patch": "The patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.", - "patchType": "The type of Patch. Currently we only allow \"JSONPatch\".", + "": "AdmissionResponse describes an admission response.", + "uid": "UID is an identifier for the individual request/response. This should be copied over from the corresponding AdmissionRequest.", + "allowed": "Allowed indicates whether or not the admission request was permitted.", + "status": "Result contains extra details into why an admission request was denied. This field IS NOT consulted in any way if \"Allowed\" is \"true\".", + "patch": "The patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.", + "patchType": "The type of Patch. Currently we only allow \"JSONPatch\".", + "auditAnnotations": "AuditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by the admission webhook to add additional context to the audit log for this request.", } func (AdmissionResponse) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go index 275a326d2..2b4352a94 100644 --- a/deps/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -33,6 +33,11 @@ func (in *AdmissionRequest) DeepCopyInto(out *AdmissionRequest) { in.UserInfo.DeepCopyInto(&out.UserInfo) in.Object.DeepCopyInto(&out.Object) in.OldObject.DeepCopyInto(&out.OldObject) + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = new(bool) + **out = **in + } return } @@ -51,12 +56,8 @@ func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { *out = *in if in.Result != nil { in, out := &in.Result, &out.Result - if *in == nil { - *out = nil - } else { - *out = new(v1.Status) - (*in).DeepCopyInto(*out) - } + *out = new(v1.Status) + (*in).DeepCopyInto(*out) } if in.Patch != nil { in, out := &in.Patch, &out.Patch @@ -65,11 +66,14 @@ func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { } if in.PatchType != nil { in, out := &in.PatchType, &out.PatchType - if *in == nil { - *out = nil - } else { - *out = new(PatchType) - **out = **in + *out = new(PatchType) + **out = **in + } + if in.AuditAnnotations != nil { + in, out := &in.AuditAnnotations, &out.AuditAnnotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val } } return @@ -91,21 +95,13 @@ func (in *AdmissionReview) DeepCopyInto(out *AdmissionReview) { out.TypeMeta = in.TypeMeta if in.Request != nil { in, out := &in.Request, &out.Request - if *in == nil { - *out = nil - } else { - *out = new(AdmissionRequest) - (*in).DeepCopyInto(*out) - } + *out = new(AdmissionRequest) + (*in).DeepCopyInto(*out) } if in.Response != nil { in, out := &in.Response, &out.Response - if *in == nil { - *out = nil - } else { - *out = new(AdmissionResponse) - (*in).DeepCopyInto(*out) - } + *out = new(AdmissionResponse) + (*in).DeepCopyInto(*out) } return } @@ -124,7 +120,6 @@ func (in *AdmissionReview) DeepCopy() *AdmissionReview { func (in *AdmissionReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/api/admissionregistration/v1alpha1/BUILD b/deps/k8s.io/api/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index 417eab39f..000000000 --- a/deps/k8s.io/api/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/admissionregistration/v1alpha1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go b/deps/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go index f5d4941d3..b87f74e52 100644 --- a/deps/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go +++ b/deps/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -989,40 +989,39 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 545 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0x4d, 0x8b, 0x13, 0x3f, - 0x18, 0x6f, 0xfe, 0xdb, 0x42, 0x9b, 0x76, 0xf9, 0xcb, 0xe0, 0xa1, 0x14, 0x99, 0x96, 0x9e, 0x2a, - 0x62, 0x62, 0x57, 0x59, 0xbc, 0xee, 0xec, 0x41, 0x0a, 0xbe, 0x2c, 0x41, 0x3c, 0x88, 0x07, 0xd3, - 0xf6, 0xd9, 0x69, 0x6c, 0x27, 0x19, 0x92, 0x4c, 0x41, 0x4f, 0x5e, 0xbc, 0x0b, 0x7e, 0xa9, 0x1e, - 0xf7, 0xb8, 0xa7, 0x62, 0x47, 0xf0, 0xe8, 0x67, 0x90, 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, 0x6d, 0xd4, 0x3b, 0x18, 0x34, 0xbc, 0xc3, 0x78, 0xdd, - 0x6d, 0x9c, 0x9c, 0x8d, 0x32, 0x90, 0x15, 0x7b, 0x67, 0x88, 0x9b, 0x3c, 0x14, 0xaf, 0x40, 0x27, - 0x39, 0xb2, 0x94, 0x0d, 0xef, 0xff, 0x78, 0xdd, 0x6d, 0x9e, 0x9c, 0x8d, 0x72, 0x98, 0x95, 0xef, - 0x24, 0xfa, 0x1a, 0x8c, 0x8a, 0xf4, 0x04, 0x4c, 0xfb, 0xa0, 0xd0, 0x67, 0x39, 0xc8, 0x8a, 0xbd, - 0x47, 0x56, 0x1b, 0xb7, 0x72, 0xb1, 0x71, 0x2b, 0x97, 0x1b, 0xb7, 0xf2, 0x31, 0x76, 0xd1, 0x2a, - 0x76, 0xd1, 0x45, 0xec, 0xa2, 0xcb, 0xd8, 0x45, 0x5f, 0x63, 0x17, 0x7d, 0xfe, 0xe6, 0x56, 0x5e, - 0xd7, 0xf3, 0xd2, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xfb, 0x23, 0x89, 0xaa, 0x04, 0x00, - 0x00, + // 531 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0x4d, 0x8b, 0x13, 0x31, + 0x18, 0x6e, 0x6c, 0x0b, 0x6d, 0xda, 0x45, 0x19, 0x3c, 0x94, 0x22, 0xd3, 0xd2, 0x53, 0x45, 0x4c, + 0xec, 0x22, 0x8b, 0xd7, 0x9d, 0x3d, 0x48, 0xc1, 0x8f, 0x25, 0x88, 0x07, 0xf1, 0x60, 0xda, 0xbe, + 0x3b, 0x8d, 0xed, 0x4c, 0x86, 0x24, 0x53, 0xd0, 0x93, 0x17, 0xef, 0x82, 0x7f, 0xaa, 0xc7, 0x3d, + 0xee, 0xa9, 0xd8, 0x11, 0x3c, 0xfa, 0x1b, 0x24, 0x33, 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c, 0x81, 0xac, 0xd8, 0x3b, 0x23, 0xdc, 0xe2, 0x91, 0x78, + 0x0d, 0xca, 0xe6, 0xc8, 0x52, 0x36, 0xbd, 0xdb, 0xc9, 0xa6, 0xd7, 0x3a, 0x3e, 0x1d, 0xe7, 0x30, + 0x2b, 0xdf, 0xb1, 0xfa, 0x0a, 0xb4, 0x8c, 0xd5, 0x14, 0x74, 0xa7, 0x5a, 0xe8, 0xb3, 0x1c, 0x64, + 0xc5, 0xde, 0x23, 0xeb, 0xad, 0x5b, 0x39, 0xdf, 0xba, 0x95, 0x8b, 0xad, 0x5b, 0xf9, 0x94, 0xb8, + 0x68, 0x9d, 0xb8, 0xe8, 0x3c, 0x71, 0xd1, 0x45, 0xe2, 0xa2, 0x6f, 0x89, 0x8b, 0xbe, 0x7c, 0x77, + 0x2b, 0x6f, 0x1a, 0x79, 0xe9, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x06, 0xa3, 0xcb, 0x75, + 0x04, 0x00, 0x00, } diff --git a/deps/k8s.io/api/admissionregistration/v1alpha1/generated.proto b/deps/k8s.io/api/admissionregistration/v1alpha1/generated.proto index 11de02ff4..e17b55968 100644 --- a/deps/k8s.io/api/admissionregistration/v1alpha1/generated.proto +++ b/deps/k8s.io/api/admissionregistration/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.admissionregistration.v1alpha1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; diff --git a/deps/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go b/deps/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go index e2494e5d7..69e4b7c64 100644 --- a/deps/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1alpha1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Initializer = map[string]string{ "": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.", "name": "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required", diff --git a/deps/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go index 667b262ab..9f636b484 100644 --- a/deps/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -76,9 +76,8 @@ func (in *InitializerConfiguration) DeepCopy() *InitializerConfiguration { func (in *InitializerConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -110,9 +109,8 @@ func (in *InitializerConfigurationList) DeepCopy() *InitializerConfigurationList func (in *InitializerConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/admissionregistration/v1beta1/BUILD b/deps/k8s.io/api/admissionregistration/v1beta1/BUILD deleted file mode 100644 index dbcfadd2b..000000000 --- a/deps/k8s.io/api/admissionregistration/v1beta1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/admissionregistration/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/admissionregistration/v1beta1/generated.pb.go b/deps/k8s.io/api/admissionregistration/v1beta1/generated.pb.go index 51e5762a8..d6c9d958b 100644 --- a/deps/k8s.io/api/admissionregistration/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/admissionregistration/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -457,6 +457,12 @@ func (m *Webhook) MarshalTo(dAtA []byte) (int, error) { } i += n7 } + if m.SideEffects != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.SideEffects))) + i += copy(dAtA[i:], *m.SideEffects) + } return i, nil } @@ -656,6 +662,10 @@ func (m *Webhook) Size() (n int) { l = m.NamespaceSelector.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.SideEffects != nil { + l = len(*m.SideEffects) + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -779,6 +789,7 @@ func (this *Webhook) String() string { `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "RuleWithOperations", "RuleWithOperations", 1), `&`, ``, 1) + `,`, `FailurePolicy:` + valueToStringGenerated(this.FailurePolicy) + `,`, `NamespaceSelector:` + strings.Replace(fmt.Sprintf("%v", this.NamespaceSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `SideEffects:` + valueToStringGenerated(this.SideEffects) + `,`, `}`, }, "") return s @@ -1813,6 +1824,36 @@ func (m *Webhook) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SideEffects", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := SideEffectClass(dAtA[iNdEx:postIndex]) + m.SideEffects = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2088,63 +2129,62 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 916 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xd6, 0x8e, 0x6c, 0x8f, 0x6d, 0xd1, 0x0c, 0x20, 0x99, 0xa8, 0xda, 0xb5, 0x7c, 0x40, - 0x96, 0x50, 0x76, 0x71, 0x8a, 0x10, 0x42, 0x20, 0x94, 0x8d, 0x54, 0x88, 0x94, 0xb4, 0x66, 0x02, - 0xad, 0x84, 0x38, 0x30, 0x5e, 0xbf, 0xd8, 0x83, 0xf7, 0x97, 0x66, 0x66, 0xdd, 0xe6, 0x86, 0xc4, - 0x3f, 0x80, 0xc4, 0x1f, 0xc1, 0x5f, 0xc1, 0x3d, 0x37, 0x7a, 0x41, 0xf4, 0xb4, 0x22, 0xcb, 0x99, - 0x03, 0xd7, 0x9e, 0xd0, 0xce, 0xae, 0xbd, 0x76, 0x1c, 0xa7, 0xee, 0x85, 0x03, 0x37, 0xcf, 0xf7, - 0xde, 0xf7, 0xbd, 0xf7, 0x3d, 0xbf, 0xb7, 0xe8, 0xcb, 0xe9, 0x47, 0xc2, 0x64, 0x81, 0x35, 0x8d, - 0x86, 0xc0, 0x7d, 0x90, 0x20, 0xac, 0x19, 0xf8, 0xa3, 0x80, 0x5b, 0x79, 0x80, 0x86, 0xcc, 0xa2, - 0x23, 0x8f, 0x09, 0xc1, 0x02, 0x9f, 0xc3, 0x98, 0x09, 0xc9, 0xa9, 0x64, 0x81, 0x6f, 0xcd, 0xfa, - 0x43, 0x90, 0xb4, 0x6f, 0x8d, 0xc1, 0x07, 0x4e, 0x25, 0x8c, 0xcc, 0x90, 0x07, 0x32, 0xc0, 0xbd, - 0x8c, 0x69, 0xd2, 0x90, 0x99, 0x37, 0x32, 0xcd, 0x9c, 0xb9, 0xb7, 0x3f, 0x66, 0x72, 0x12, 0x0d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0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x78, 0x57, 0x76, 0x28, - 0x10, 0x0a, 0x00, 0x00, + // 906 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x37, 0x29, 0x49, 0x26, 0x89, 0x76, 0x3b, 0x80, 0x14, 0xaa, 0x95, 0x1d, 0xe5, 0x80, + 0x22, 0xa1, 0xb5, 0x49, 0x41, 0x08, 0x21, 0x10, 0xaa, 0x0b, 0x0b, 0x95, 0xba, 0xbb, 0x61, 0x0a, + 0xbb, 0x12, 0xe2, 0xc0, 0xc4, 0x79, 0x49, 0x86, 0xf8, 0x97, 0x66, 0xc6, 0x59, 0x7a, 0x43, 0xe2, + 0x1f, 0x40, 0x42, 0xfc, 0x0d, 0xfc, 0x15, 0xdc, 0x7b, 0xdc, 0x0b, 0x62, 0x4f, 0x16, 0x35, 0x67, + 0x0e, 0x5c, 0x7b, 0x42, 0x63, 0x3b, 0x71, 0xd2, 0x6c, 0xbb, 0xe9, 0x85, 0x03, 0x37, 0xcf, 0xf7, + 0xe6, 0xfb, 0xde, 0xfb, 0x9e, 0xdf, 0x1b, 0xf4, 0xc5, 0xec, 0x7d, 0x61, 0xb2, 0xc0, 0x9a, 0x45, + 0x43, 0xe0, 0x3e, 0x48, 0x10, 0xd6, 0x1c, 0xfc, 0x51, 0xc0, 0xad, 0x3c, 0x40, 0x43, 0x66, 0xd1, + 0x91, 0xc7, 0x84, 0x60, 0x81, 0xcf, 0x61, 0xc2, 0x84, 0xe4, 0x54, 0xb2, 0xc0, 0xb7, 0xe6, 0xfd, + 0x21, 0x48, 0xda, 0xb7, 0x26, 0xe0, 0x03, 0xa7, 0x12, 0x46, 0x66, 0xc8, 0x03, 0x19, 0xe0, 0x5e, + 0xc6, 0x34, 0x69, 0xc8, 0xcc, 0x17, 0x32, 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, 0x85, 0x06, 0x8c, 0x7f, 0xae, 0x09, 0x00, 0x00, } diff --git a/deps/k8s.io/api/admissionregistration/v1beta1/generated.proto b/deps/k8s.io/api/admissionregistration/v1beta1/generated.proto index 8dcde259c..4d55ca878 100644 --- a/deps/k8s.io/api/admissionregistration/v1beta1/generated.proto +++ b/deps/k8s.io/api/admissionregistration/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,12 +21,9 @@ syntax = 'proto2'; package k8s.io.api.admissionregistration.v1beta1; -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -155,6 +152,10 @@ message Webhook { // Rules describes what operations on what resources/subresources the webhook cares about. // The webhook cares about an operation if it matches _any_ Rule. + // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks + // from putting the cluster in a state which cannot be recovered from without completely + // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called + // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. repeated RuleWithOperations rules = 3; // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -207,6 +208,15 @@ message Webhook { // Default to the empty LabelSelector, which matches everything. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 5; + + // SideEffects states whether this webhookk has side effects. + // Acceptable values are: Unknown, None, Some, NoneOnDryRun + // Webhooks with side effects MUST implement a reconciliation system, since a request may be + // rejected by a future step in the admission change and the side effects therefore need to be undone. + // Requests with the dryRun attribute will be auto-rejected if they match a webhook with + // sideEffects == Unknown or Some. Defaults to Unknown. + // +optional + optional string sideEffects = 6; } // WebhookClientConfig contains the information to make a TLS @@ -246,9 +256,7 @@ message WebhookClientConfig { // // If the webhook is running within the cluster, then you should use `service`. // - // If there is only one port open for the service, that port will be - // used. If there are multiple ports open, port 443 will be used if it - // is open, otherwise it is an error. + // Port 443 will be used if it is open, otherwise it is an error. // // +optional optional ServiceReference service = 1; diff --git a/deps/k8s.io/api/admissionregistration/v1beta1/types.go b/deps/k8s.io/api/admissionregistration/v1beta1/types.go index be5c1339a..0b948ba1d 100644 --- a/deps/k8s.io/api/admissionregistration/v1beta1/types.go +++ b/deps/k8s.io/api/admissionregistration/v1beta1/types.go @@ -60,6 +60,22 @@ const ( Fail FailurePolicyType = "Fail" ) +type SideEffectClass string + +const ( + // SideEffectClassUnknown means that no information is known about the side effects of calling the webhook. + // If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail. + SideEffectClassUnknown SideEffectClass = "Unknown" + // SideEffectClassNone means that calling the webhook will have no side effects. + SideEffectClassNone SideEffectClass = "None" + // SideEffectClassSome means that calling the webhook will possibly have side effects. + // If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail. + SideEffectClassSome SideEffectClass = "Some" + // SideEffectClassNoneOnDryRun means that calling the webhook will possibly have side effects, but if the + // request being reviewed has the dry-run attribute, the side effects will be suppressed. + SideEffectClassNoneOnDryRun SideEffectClass = "NoneOnDryRun" +) + // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -135,6 +151,10 @@ type Webhook struct { // Rules describes what operations on what resources/subresources the webhook cares about. // The webhook cares about an operation if it matches _any_ Rule. + // However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks + // from putting the cluster in a state which cannot be recovered from without completely + // disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called + // on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. Rules []RuleWithOperations `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - @@ -187,6 +207,15 @@ type Webhook struct { // Default to the empty LabelSelector, which matches everything. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,5,opt,name=namespaceSelector"` + + // SideEffects states whether this webhookk has side effects. + // Acceptable values are: Unknown, None, Some, NoneOnDryRun + // Webhooks with side effects MUST implement a reconciliation system, since a request may be + // rejected by a future step in the admission change and the side effects therefore need to be undone. + // Requests with the dryRun attribute will be auto-rejected if they match a webhook with + // sideEffects == Unknown or Some. Defaults to Unknown. + // +optional + SideEffects *SideEffectClass `json:"sideEffects,omitempty" protobuf:"bytes,6,opt,name=sideEffects,casttype=SideEffectClass"` } // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make @@ -250,9 +279,7 @@ type WebhookClientConfig struct { // // If the webhook is running within the cluster, then you should use `service`. // - // If there is only one port open for the service, that port will be - // used. If there are multiple ports open, port 443 will be used if it - // is open, otherwise it is an error. + // Port 443 will be used if it is open, otherwise it is an error. // // +optional Service *ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"` diff --git a/deps/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go index 6dd18e973..aab917a40 100644 --- a/deps/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_MutatingWebhookConfiguration = map[string]string{ "": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", @@ -102,9 +102,10 @@ var map_Webhook = map[string]string{ "": "Webhook describes an admission webhook and the resources and operations it applies to.", "name": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", "clientConfig": "ClientConfig defines how to communicate with the hook. Required", - "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", + "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", "namespaceSelector": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", + "sideEffects": "SideEffects states whether this webhookk has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", } func (Webhook) SwaggerDoc() map[string]string { @@ -114,7 +115,7 @@ func (Webhook) SwaggerDoc() map[string]string { var map_WebhookClientConfig = map[string]string{ "": "WebhookClientConfig contains the information to make a TLS connection with the webhook", "url": "`url` gives the location of the webhook, in standard URL form (`[scheme://]host:port/path`). Exactly one of `url` or `service` must be specified.\n\nThe `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address.\n\nPlease note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.\n\nThe scheme must be \"https\"; the URL must begin with \"https://\".\n\nA path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.\n\nAttempting to use a user or basic auth e.g. \"user:password@\" is not allowed. Fragments (\"#...\") and query parameters (\"?...\") are not allowed, either.", - "service": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.\n\nIf there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error.", + "service": "`service` is a reference to the service for this webhook. Either `service` or `url` must be specified.\n\nIf the webhook is running within the cluster, then you should use `service`.\n\nPort 443 will be used if it is open, otherwise it is an error.", "caBundle": "`caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. Required.", } diff --git a/deps/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go index fb0cf9c47..c6867be12 100644 --- a/deps/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -54,9 +54,8 @@ func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -88,9 +87,8 @@ func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigura func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -151,12 +149,8 @@ func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -200,9 +194,8 @@ func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfigura func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -234,9 +227,8 @@ func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfi func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -252,21 +244,18 @@ func (in *Webhook) DeepCopyInto(out *Webhook) { } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy - if *in == nil { - *out = nil - } else { - *out = new(FailurePolicyType) - **out = **in - } + *out = new(FailurePolicyType) + **out = **in } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.SideEffects != nil { + in, out := &in.SideEffects, &out.SideEffects + *out = new(SideEffectClass) + **out = **in } return } @@ -286,21 +275,13 @@ func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service - if *in == nil { - *out = nil - } else { - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } + *out = new(ServiceReference) + (*in).DeepCopyInto(*out) } if in.CABundle != nil { in, out := &in.CABundle, &out.CABundle diff --git a/deps/k8s.io/api/apps/v1/BUILD b/deps/k8s.io/api/apps/v1/BUILD deleted file mode 100644 index 7902387f5..000000000 --- a/deps/k8s.io/api/apps/v1/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/apps/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/apps/v1/generated.pb.go b/deps/k8s.io/api/apps/v1/generated.pb.go index 02123859b..eac6ef2a1 100644 --- a/deps/k8s.io/api/apps/v1/generated.pb.go +++ b/deps/k8s.io/api/apps/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -61,7 +61,6 @@ import fmt "fmt" import math "math" import k8s_io_api_core_v1 "k8s.io/api/core/v1" - import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -6812,134 +6811,133 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 2051 bytes of a gzipped FileDescriptorProto + // 2037 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x24, 0x47, 0x1d, 0x75, 0xcf, 0x87, 0x3d, 0x2e, 0xaf, 0xed, 0xdd, 0xb2, 0xb1, 0x27, 0xbb, 0x64, 0x66, 0x19, - 0x60, 0xe3, 0xcd, 0x66, 0x7b, 0xf0,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, 0xff, 0xbc, 0x6b, 0x01, + 0x7b, 0x12, 0x26, 0x00, 0x00, } diff --git a/deps/k8s.io/api/apps/v1/generated.proto b/deps/k8s.io/api/apps/v1/generated.proto index 46473baa8..c8a957ac6 100644 --- a/deps/k8s.io/api/apps/v1/generated.proto +++ b/deps/k8s.io/api/apps/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ syntax = 'proto2'; package k8s.io.api.apps.v1; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/api/policy/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -501,9 +500,9 @@ message RollingUpdateDeployment { // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // Defaults to 25%. - // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods - // immediately when the rolling update starts. Once new pods are ready, old RC - // can be scaled down further, followed by scaling up the new RC, ensuring + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. // +optional @@ -515,10 +514,10 @@ message RollingUpdateDeployment { // This can not be 0 if MaxUnavailable is 0. // Absolute number is calculated from percentage by rounding up. // Defaults to 25%. - // Example: when this is set to 30%, the new RC can be scaled up immediately when + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when // the rolling update starts, such that the total number of old and new pods do not exceed // 130% of desired pods. Once old pods have been killed, - // new RC can be scaled up further, ensuring that total number of pods running + // new ReplicaSet can be scaled up further, ensuring that total number of pods running // at any time during the update is at most 130% of desired pods. // +optional optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; diff --git a/deps/k8s.io/api/apps/v1/types.go b/deps/k8s.io/api/apps/v1/types.go index b5df22c6f..4431ca2c3 100644 --- a/deps/k8s.io/api/apps/v1/types.go +++ b/deps/k8s.io/api/apps/v1/types.go @@ -307,8 +307,8 @@ type DeploymentSpec struct { const ( // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added - // to existing RCs (and label key that is added to its pods) to prevent the existing RCs - // to select new pods (and old pods being select by new RC). + // to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets + // to select new pods (and old pods being select by new ReplicaSet). DefaultDeploymentUniqueLabelKey string = "pod-template-hash" ) @@ -333,7 +333,7 @@ const ( // Kill all existing pods before creating new ones. RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate" - // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one. + // Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one. RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate" ) @@ -344,9 +344,9 @@ type RollingUpdateDeployment struct { // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // Defaults to 25%. - // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods - // immediately when the rolling update starts. Once new pods are ready, old RC - // can be scaled down further, followed by scaling up the new RC, ensuring + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. // +optional @@ -358,10 +358,10 @@ type RollingUpdateDeployment struct { // This can not be 0 if MaxUnavailable is 0. // Absolute number is calculated from percentage by rounding up. // Defaults to 25%. - // Example: when this is set to 30%, the new RC can be scaled up immediately when + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when // the rolling update starts, such that the total number of old and new pods do not exceed // 130% of desired pods. Once old pods have been killed, - // new RC can be scaled up further, ensuring that total number of pods running + // new ReplicaSet can be scaled up further, ensuring that total number of pods running // at any time during the update is at most 130% of desired pods. // +optional MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"` diff --git a/deps/k8s.io/api/apps/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/apps/v1/types_swagger_doc_generated.go index 4dec6f2f8..85fb159dd 100644 --- a/deps/k8s.io/api/apps/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/apps/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ControllerRevision = map[string]string{ "": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -271,8 +271,8 @@ func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string { var map_RollingUpdateDeployment = map[string]string{ "": "Spec to control the desired behavior of rolling update.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", + "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", } func (RollingUpdateDeployment) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/apps/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/apps/v1/zz_generated.deepcopy.go index 9419e8e72..885203fca 100644 --- a/deps/k8s.io/api/apps/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/apps/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" ) @@ -50,9 +50,8 @@ func (in *ControllerRevision) DeepCopy() *ControllerRevision { func (in *ControllerRevision) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -84,9 +83,8 @@ func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList { func (in *ControllerRevisionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -113,9 +111,8 @@ func (in *DaemonSet) DeepCopy() *DaemonSet { func (in *DaemonSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -164,9 +161,8 @@ func (in *DaemonSetList) DeepCopy() *DaemonSetList { func (in *DaemonSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -174,23 +170,15 @@ func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec) { *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -210,12 +198,8 @@ func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) { *out = *in if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -242,12 +226,8 @@ func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy) { *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateDaemonSet) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateDaemonSet) + (*in).DeepCopyInto(*out) } return } @@ -286,9 +266,8 @@ func (in *Deployment) DeepCopy() *Deployment { func (in *Deployment) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -338,9 +317,8 @@ func (in *DeploymentList) DeepCopy() *DeploymentList { func (in *DeploymentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -348,41 +326,25 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) in.Strategy.DeepCopyInto(&out.Strategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.ProgressDeadlineSeconds != nil { in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -409,12 +371,8 @@ func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { } if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -434,12 +392,8 @@ func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) { *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateDeployment) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateDeployment) + (*in).DeepCopyInto(*out) } return } @@ -478,9 +432,8 @@ func (in *ReplicaSet) DeepCopy() *ReplicaSet { func (in *ReplicaSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -529,9 +482,8 @@ func (in *ReplicaSetList) DeepCopy() *ReplicaSetList { func (in *ReplicaSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -539,21 +491,13 @@ func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) return @@ -597,12 +541,8 @@ func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -622,21 +562,13 @@ func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } if in.MaxSurge != nil { in, out := &in.MaxSurge, &out.MaxSurge - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -656,12 +588,8 @@ func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateState *out = *in if in.Partition != nil { in, out := &in.Partition, &out.Partition - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -700,9 +628,8 @@ func (in *StatefulSet) DeepCopy() *StatefulSet { func (in *StatefulSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -751,9 +678,8 @@ func (in *StatefulSetList) DeepCopy() *StatefulSetList { func (in *StatefulSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -761,26 +687,18 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]core_v1.PersistentVolumeClaim, len(*in)) + *out = make([]corev1.PersistentVolumeClaim, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -788,12 +706,8 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) { in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -813,12 +727,8 @@ func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) { *out = *in if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -845,12 +755,8 @@ func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateStatefulSetStrategy) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateStatefulSetStrategy) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/api/apps/v1beta1/BUILD b/deps/k8s.io/api/apps/v1beta1/BUILD deleted file mode 100644 index f40a41e3e..000000000 --- a/deps/k8s.io/api/apps/v1beta1/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/apps/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/apps/v1beta1/generated.pb.go b/deps/k8s.io/api/apps/v1beta1/generated.pb.go index 04183fc2d..ef9aa8e09 100644 --- a/deps/k8s.io/api/apps/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/apps/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -54,7 +54,6 @@ import fmt "fmt" import math "math" import k8s_io_api_core_v1 "k8s.io/api/core/v1" - import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -5170,122 +5169,122 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1871 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x52, 0xa4, 0x44, 0x3d, 0x45, 0x94, 0x3d, 0x52, 0x2d, 0x46, 0x69, 0x29, 0x61, 0x1b, - 0x24, 0x72, 0x12, 0x2d, 0x63, 0x25, 0x0d, 0x12, 0xbb, 0x08, 0x2a, 0xca, 0x6e, 0xe2, 0x40, 0xaa, - 0x94, 0xa1, 0x94, 0xa2, 0x69, 0x0b, 0x64, 0xb8, 0x1c, 0xd3, 0x1b, 0xed, 0x3f, 0xec, 0x0e, 0x59, - 0x13, 0xbd, 0xf4, 0x03, 0x14, 0x48, 0xcf, 0xfd, 0x14, 0x3d, 0x16, 0xed, 0xad, 0x27, 0x5f, 0x0a, - 0x04, 0xbd, 0x34, 0x27, 0xa1, 0xa6, 0xaf, 0x6d, 0x6f, 0xbd, 0x18, 0x28, 0x50, 0xcc, 0xec, 0xec, - 0xff, 0x5d, 0x89, 0x2a, 0x20, 0x1d, 0x72, 0xe3, 0xce, 0x7b, 0xef, 0xf7, 0xde, 0xcc, 0xbc, 0xf7, - 0xe6, 0xfd, 0x08, 0x3f, 0x3a, 0x7d, 0xdf, 0xd7, 0x0c, 0xa7, 0x7d, 0x3a, 0xec, 0x51, 0xcf, 0xa6, - 0x8c, 0xfa, 0xed, 0x11, 0xb5, 0xfb, 0x8e, 0xd7, 0x96, 0x02, 0xe2, 0x1a, 0x6d, 0xe2, 0xba, 0x7e, - 0x7b, 0x74, 0xa7, 0x47, 0x19, 0xb9, 0xd3, 0x1e, 0x50, 0x9b, 0x7a, 0x84, 0xd1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69, 0xe0, 0x02, 0xab, 0x60, 0x3e, - 0x92, 0x05, 0x50, 0x11, 0x81, 0x26, 0xe6, 0xa3, 0x5c, 0x11, 0xec, 0xc2, 0xb2, 0xac, 0xfd, 0x50, - 0x28, 0x92, 0x35, 0x71, 0xef, 0x27, 0x69, 0x31, 0xce, 0xea, 0xa3, 0x8f, 0xe0, 0x26, 0x19, 0x11, - 0xc3, 0x24, 0x3d, 0x93, 0x46, 0x20, 0x55, 0x01, 0xf2, 0xb2, 0x04, 0xb9, 0xb9, 0x9b, 0x55, 0xc0, - 0x79, 0x1b, 0x74, 0x00, 0x2b, 0x43, 0x3b, 0x0f, 0x15, 0xe4, 0xe1, 0x2b, 0x12, 0x6a, 0xe5, 0x24, - 0xaf, 0x82, 0x8b, 0xec, 0xd0, 0x17, 0x00, 0x7a, 0xf8, 0x30, 0xfb, 0xcd, 0x39, 0xd1, 0x49, 0xdf, - 0x9a, 0xa2, 0x5e, 0xa2, 0xd7, 0x3c, 0xee, 0x62, 0xd1, 0x92, 0x8f, 0x13, 0x98, 0xe8, 0x1e, 0x2c, - 0x79, 0xbc, 0x02, 0xa2, 0x50, 0xe7, 0x45, 0xa8, 0xdf, 0x91, 0x66, 0x4b, 0x38, 0x29, 0xc4, 0x69, - 0x5d, 0x74, 0x17, 0x1a, 0xba, 0x63, 0x9a, 0x22, 0xf3, 0xf7, 0x9c, 0xa1, 0xcd, 0x44, 0xf2, 0xd6, - 0x3a, 0x88, 0xbf, 0xcc, 0x7b, 0x29, 0x09, 0xce, 0x68, 0xaa, 0x7f, 0x56, 0x92, 0xcf, 0x4c, 0x58, - 0xce, 0xe8, 0x6e, 0x6a, 0xf4, 0x79, 0x2d, 0x33, 0xfa, 0xdc, 0xca, 0x5b, 0x24, 0x26, 0x1f, 0x03, - 0x96, 0x78, 0xf2, 0x1b, 0xf6, 0x20, 0xb8, 0x70, 0xd9, 0x12, 0xdf, 0x3e, 0xb7, 0x94, 0x22, 0xed, - 0xc4, 0xc3, 0x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fc, 0x16, 0xbf, 0xde, 0xf9, 0x59, 0xe3, 0x43, - 0x68, 0x30, 0xe2, 0x0d, 0x28, 0x0b, 0x65, 0xe2, 0xc0, 0x16, 0xe2, 0x49, 0xff, 0x38, 0x25, 0xc5, - 0x19, 0xed, 0xf5, 0x7b, 0xb0, 0x94, 0x72, 0x76, 0xa9, 0x21, 0xec, 0x2b, 0x7e, 0x38, 0x71, 0x72, - 0x5e, 0x43, 0x76, 0x7d, 0x92, 0xca, 0xae, 0xad, 0xf2, 0xc3, 0x4c, 0x94, 0x4c, 0x59, 0x8e, 0xe1, - 0x4c, 0x8e, 0xbd, 0x31, 0x15, 0xda, 0xf9, 0x99, 0xf6, 0xaf, 0x0a, 0xac, 0x26, 0xb4, 0x63, 0x6e, - 0xfa, 0xc3, 0x54, 0x83, 0xde, 0xca, 0x34, 0xe8, 0x66, 0x91, 0xcd, 0x95, 0x91, 0xd3, 0x62, 0x76, - 0x37, 0x7b, 0xd5, 0xec, 0xee, 0x0a, 0x48, 0xb1, 0xfa, 0x27, 0x05, 0x96, 0x13, 0x67, 0x77, 0x0d, - 0x8c, 0xf1, 0x61, 0x9a, 0x31, 0xbe, 0x3a, 0x4d, 0xd2, 0x94, 0x50, 0xc6, 0xbf, 0xd6, 0x52, 0xc1, - 0x7f, 0xeb, 0x49, 0xcc, 0xaf, 0x61, 0x75, 0xe4, 0x98, 0x43, 0x8b, 0xee, 0x99, 0xc4, 0xb0, 0x42, - 0x05, 0x3e, 0x31, 0xce, 0x66, 0xff, 0x18, 0x8a, 0xe0, 0xa9, 0xe7, 0x1b, 0x3e, 0xa3, 0x36, 0xfb, - 0x2c, 0xb6, 0xec, 0x7c, 0x57, 0x3a, 0x59, 0xfd, 0xac, 0x00, 0x0e, 0x17, 0x3a, 0x41, 0x3f, 0x80, - 0x45, 0x3e, 0x30, 0x1b, 0x3a, 0xe5, 0xdc, 0x5b, 0x26, 0xd6, 0x8a, 0x04, 0x5a, 0xec, 0xc6, 0x22, - 0x9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 0x78, 0x77, 0xbd, 0x62, 0x6a, 0xf4, 0xc1, 0x74, - 0xd4, 0xa8, 0x60, 0x6e, 0xbf, 0x98, 0x23, 0x75, 0xb6, 0x9f, 0x3e, 0x6b, 0xcd, 0x7c, 0xfd, 0xac, - 0x35, 0xf3, 0xcd, 0xb3, 0xd6, 0xcc, 0x6f, 0x26, 0x2d, 0xe5, 0xe9, 0xa4, 0xa5, 0x7c, 0x3d, 0x69, - 0x29, 0xdf, 0x4c, 0x5a, 0xca, 0x3f, 0x26, 0x2d, 0xe5, 0x77, 0xcf, 0x5b, 0x33, 0x9f, 0xcf, 0x4b, - 0x8f, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x5d, 0x9e, 0x04, 0x8c, 0x1b, 0x00, 0x00, + // 1859 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x6f, 0x24, 0x47, + 0x15, 0x77, 0x8f, 0x67, 0xec, 0xf1, 0x73, 0x3c, 0xde, 0x2d, 0x9b, 0xf5, 0xc4, 0x81, 0xb1, 0xd5, + 0x44, 0x89, 0xf3, 0xe1, 0x9e, 0xac, 0x13, 0xa2, 0x64, 0x17, 0x45, 0x78, 0xbc, 0x4b, 0xb2, 0x91, + 0x8d, 0x9d, 0xb2, 0x1d, 0x44, 0x00, 0x29, 0x35, 0x3d, 0xb5, 0xb3, 0x1d, 0xf7, 0x97, 0xba, 0x6b, + 0x86, 0x1d, 0x71, 0xe1, 0x0f, 0x40, 0x0a, 0x67, 0xfe, 0x0a, 0x8e, 0x08, 0x6e, 0x9c, 0xf6, 0x82, + 0x14, 0x71, 0x21, 0x27, 0x8b, 0x9d, 0x5c, 0x81, 0x1b, 0x97, 0x95, 0x90, 0x50, 0x55, 0x57, 0x7f, + 0x77, 0xdb, 0x6d, 0xa4, 0xf5, 0x21, 0xb7, 0xe9, 0x7a, 0xef, 0xfd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xb4, 0x0b, 0x98, 0xca, 0x42, 0x55, 0xa6, 0x82, 0x48, 0x8a, 0x84, + 0x81, 0xc8, 0xf1, 0xed, 0x2a, 0xb1, 0x5c, 0x99, 0x85, 0xa9, 0x7f, 0x53, 0xe0, 0xc5, 0xd2, 0x24, + 0x40, 0xbb, 0xa9, 0x96, 0xbb, 0x9d, 0x69, 0xb9, 0xdf, 0x2b, 0x35, 0x4c, 0xf4, 0x5d, 0xaf, 0x98, + 0x1a, 0xbd, 0x5f, 0x8d, 0x1a, 0x15, 0xcc, 0xed, 0x97, 0x73, 0xa4, 0xde, 0xf6, 0x93, 0xa7, 0x9d, + 0x99, 0xaf, 0x9e, 0x76, 0x66, 0xbe, 0x7e, 0xda, 0x99, 0xf9, 0xcd, 0xb4, 0xa3, 0x3c, 0x99, 0x76, + 0x94, 0xaf, 0xa6, 0x1d, 0xe5, 0xeb, 0x69, 0x47, 0xf9, 0xc7, 0xb4, 0xa3, 0xfc, 0xee, 0x9b, 0xce, + 0xcc, 0x67, 0xf3, 0xd2, 0xe3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x89, 0x29, 0x5c, 0x61, + 0x1b, 0x00, 0x00, } diff --git a/deps/k8s.io/api/apps/v1beta1/generated.proto b/deps/k8s.io/api/apps/v1beta1/generated.proto index da160922d..6f41f06bc 100644 --- a/deps/k8s.io/api/apps/v1beta1/generated.proto +++ b/deps/k8s.io/api/apps/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ syntax = 'proto2'; package k8s.io.api.apps.v1beta1; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/api/policy/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -245,9 +244,9 @@ message RollingUpdateDeployment { // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // Defaults to 25%. - // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods - // immediately when the rolling update starts. Once new pods are ready, old RC - // can be scaled down further, followed by scaling up the new RC, ensuring + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. // +optional @@ -259,10 +258,10 @@ message RollingUpdateDeployment { // This can not be 0 if MaxUnavailable is 0. // Absolute number is calculated from percentage by rounding up. // Defaults to 25%. - // Example: when this is set to 30%, the new RC can be scaled up immediately when + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when // the rolling update starts, such that the total number of old and new pods do not exceed // 130% of desired pods. Once old pods have been killed, - // new RC can be scaled up further, ensuring that total number of pods running + // new ReplicaSet can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of desired pods. // +optional optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; diff --git a/deps/k8s.io/api/apps/v1beta1/types.go b/deps/k8s.io/api/apps/v1beta1/types.go index dd9e97e10..d462604d7 100644 --- a/deps/k8s.io/api/apps/v1beta1/types.go +++ b/deps/k8s.io/api/apps/v1beta1/types.go @@ -379,8 +379,8 @@ type RollbackConfig struct { const ( // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added - // to existing RCs (and label key that is added to its pods) to prevent the existing RCs - // to select new pods (and old pods being select by new RC). + // to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets + // to select new pods (and old pods being select by new ReplicaSet). DefaultDeploymentUniqueLabelKey string = "pod-template-hash" ) @@ -405,7 +405,7 @@ const ( // Kill all existing pods before creating new ones. RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate" - // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one. + // Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one. RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate" ) @@ -416,9 +416,9 @@ type RollingUpdateDeployment struct { // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // Defaults to 25%. - // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods - // immediately when the rolling update starts. Once new pods are ready, old RC - // can be scaled down further, followed by scaling up the new RC, ensuring + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. // +optional @@ -430,10 +430,10 @@ type RollingUpdateDeployment struct { // This can not be 0 if MaxUnavailable is 0. // Absolute number is calculated from percentage by rounding up. // Defaults to 25%. - // Example: when this is set to 30%, the new RC can be scaled up immediately when + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when // the rolling update starts, such that the total number of old and new pods do not exceed // 130% of desired pods. Once old pods have been killed, - // new RC can be scaled up further, ensuring that total number of pods running + // new ReplicaSet can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of desired pods. // +optional MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"` diff --git a/deps/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go index d12baf39f..68ebef348 100644 --- a/deps/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/apps/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ControllerRevision = map[string]string{ "": "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -148,8 +148,8 @@ func (RollbackConfig) SwaggerDoc() map[string]string { var map_RollingUpdateDeployment = map[string]string{ "": "Spec to control the desired behavior of rolling update.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", + "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", } func (RollingUpdateDeployment) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go index d83e9d6fe..93892bfd0 100644 --- a/deps/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/apps/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -50,9 +50,8 @@ func (in *ControllerRevision) DeepCopy() *ControllerRevision { func (in *ControllerRevision) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -84,9 +83,8 @@ func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList { func (in *ControllerRevisionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -113,9 +111,8 @@ func (in *Deployment) DeepCopy() *Deployment { func (in *Deployment) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -165,9 +162,8 @@ func (in *DeploymentList) DeepCopy() *DeploymentList { func (in *DeploymentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -199,9 +195,8 @@ func (in *DeploymentRollback) DeepCopy() *DeploymentRollback { func (in *DeploymentRollback) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -209,50 +204,30 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) in.Strategy.DeepCopyInto(&out.Strategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.RollbackTo != nil { in, out := &in.RollbackTo, &out.RollbackTo - if *in == nil { - *out = nil - } else { - *out = new(RollbackConfig) - **out = **in - } + *out = new(RollbackConfig) + **out = **in } if in.ProgressDeadlineSeconds != nil { in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -279,12 +254,8 @@ func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { } if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -304,12 +275,8 @@ func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) { *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateDeployment) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateDeployment) + (*in).DeepCopyInto(*out) } return } @@ -345,21 +312,13 @@ func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } if in.MaxSurge != nil { in, out := &in.MaxSurge, &out.MaxSurge - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -379,12 +338,8 @@ func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateState *out = *in if in.Partition != nil { in, out := &in.Partition, &out.Partition - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -423,9 +378,8 @@ func (in *Scale) DeepCopy() *Scale { func (in *Scale) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -491,9 +445,8 @@ func (in *StatefulSet) DeepCopy() *StatefulSet { func (in *StatefulSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -542,9 +495,8 @@ func (in *StatefulSetList) DeepCopy() *StatefulSetList { func (in *StatefulSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -552,26 +504,18 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]core_v1.PersistentVolumeClaim, len(*in)) + *out = make([]corev1.PersistentVolumeClaim, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -579,12 +523,8 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) { in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -604,21 +544,13 @@ func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) { *out = *in if in.ObservedGeneration != nil { in, out := &in.ObservedGeneration, &out.ObservedGeneration - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -645,12 +577,8 @@ func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateStatefulSetStrategy) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateStatefulSetStrategy) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/api/apps/v1beta2/BUILD b/deps/k8s.io/api/apps/v1beta2/BUILD deleted file mode 100644 index c13a6ff57..000000000 --- a/deps/k8s.io/api/apps/v1beta2/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/apps/v1beta2", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/apps/v1beta2/generated.pb.go b/deps/k8s.io/api/apps/v1beta2/generated.pb.go index cfd422edb..72d832c34 100644 --- a/deps/k8s.io/api/apps/v1beta2/generated.pb.go +++ b/deps/k8s.io/api/apps/v1beta2/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -64,7 +64,6 @@ import fmt "fmt" import math "math" import k8s_io_api_core_v1 "k8s.io/api/core/v1" - import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -7445,142 +7444,141 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 2186 bytes of a gzipped FileDescriptorProto + // 2176 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcb, 0x6f, 0x1c, 0xb7, - 0x19, 0xf7, 0xec, 0x43, 0x5a, 0x51, 0x96, 0x64, 0x53, 0xaa, 0xb4, 0x91, 0xdb, 0x95, 0xb1, 0x09, - 0x1c, 0x39, 0xb6, 0x66, 0x6d, 0xe5, 0x81, 0xc4, 0x2e, 0xda, 0x6a, 0xa5, 0xd4, 0x76, 0xa0, 0x57, + 0x19, 0xd7, 0xec, 0x43, 0x5a, 0x51, 0x91, 0x64, 0x53, 0xaa, 0xb4, 0x91, 0xdb, 0x95, 0xb1, 0x09, + 0x1c, 0x25, 0xb6, 0x66, 0x6d, 0xe5, 0x81, 0xc4, 0x2e, 0xda, 0x6a, 0xa5, 0xd4, 0x76, 0xa0, 0x57, 0x28, 0xcb, 0x40, 0x83, 0x16, 0x35, 0xb5, 0x4b, 0xaf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, 0x28, 0x00, 0x00, } diff --git a/deps/k8s.io/api/apps/v1beta2/generated.proto b/deps/k8s.io/api/apps/v1beta2/generated.proto index 4a8b28c15..cc3656d28 100644 --- a/deps/k8s.io/api/apps/v1beta2/generated.proto +++ b/deps/k8s.io/api/apps/v1beta2/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ syntax = 'proto2'; package k8s.io.api.apps.v1beta2; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/api/policy/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -509,9 +508,9 @@ message RollingUpdateDeployment { // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // Defaults to 25%. - // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods - // immediately when the rolling update starts. Once new pods are ready, old RC - // can be scaled down further, followed by scaling up the new RC, ensuring + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. // +optional @@ -523,10 +522,10 @@ message RollingUpdateDeployment { // This can not be 0 if MaxUnavailable is 0. // Absolute number is calculated from percentage by rounding up. // Defaults to 25%. - // Example: when this is set to 30%, the new RC can be scaled up immediately when + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when // the rolling update starts, such that the total number of old and new pods do not exceed // 130% of desired pods. Once old pods have been killed, - // new RC can be scaled up further, ensuring that total number of pods running + // new ReplicaSet can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of desired pods. // +optional optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; diff --git a/deps/k8s.io/api/apps/v1beta2/types.go b/deps/k8s.io/api/apps/v1beta2/types.go index c8be2aaca..e5525222a 100644 --- a/deps/k8s.io/api/apps/v1beta2/types.go +++ b/deps/k8s.io/api/apps/v1beta2/types.go @@ -359,8 +359,8 @@ type DeploymentSpec struct { const ( // DefaultDeploymentUniqueLabelKey is the default key of the selector that is added - // to existing RCs (and label key that is added to its pods) to prevent the existing RCs - // to select new pods (and old pods being select by new RC). + // to existing ReplicaSets (and label key that is added to its pods) to prevent the existing ReplicaSets + // to select new pods (and old pods being select by new ReplicaSet). DefaultDeploymentUniqueLabelKey string = "pod-template-hash" ) @@ -385,7 +385,7 @@ const ( // Kill all existing pods before creating new ones. RecreateDeploymentStrategyType DeploymentStrategyType = "Recreate" - // Replace the old RCs by new one using rolling update i.e gradually scale down the old RCs and scale up the new one. + // Replace the old ReplicaSets by new one using rolling update i.e gradually scale down the old ReplicaSets and scale up the new one. RollingUpdateDeploymentStrategyType DeploymentStrategyType = "RollingUpdate" ) @@ -396,9 +396,9 @@ type RollingUpdateDeployment struct { // Absolute number is calculated from percentage by rounding down. // This can not be 0 if MaxSurge is 0. // Defaults to 25%. - // Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods - // immediately when the rolling update starts. Once new pods are ready, old RC - // can be scaled down further, followed by scaling up the new RC, ensuring + // Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + // immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + // can be scaled down further, followed by scaling up the new ReplicaSet, ensuring // that the total number of pods available at all times during the update is at // least 70% of desired pods. // +optional @@ -410,10 +410,10 @@ type RollingUpdateDeployment struct { // This can not be 0 if MaxUnavailable is 0. // Absolute number is calculated from percentage by rounding up. // Defaults to 25%. - // Example: when this is set to 30%, the new RC can be scaled up immediately when + // Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when // the rolling update starts, such that the total number of old and new pods do not exceed // 130% of desired pods. Once old pods have been killed, - // new RC can be scaled up further, ensuring that total number of pods running + // new ReplicaSet can be scaled up further, ensuring that total number of pods running // at any time during the update is atmost 130% of desired pods. // +optional MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,2,opt,name=maxSurge"` diff --git a/deps/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go b/deps/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go index e2f133b51..627df3ab7 100644 --- a/deps/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/apps/v1beta2/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta2 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ControllerRevision = map[string]string{ "": "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -271,8 +271,8 @@ func (RollingUpdateDaemonSet) SwaggerDoc() map[string]string { var map_RollingUpdateDeployment = map[string]string{ "": "Spec to control the desired behavior of rolling update.", - "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", + "maxUnavailable": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "maxSurge": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", } func (RollingUpdateDeployment) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go b/deps/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go index f2d847ed5..8a0bad22e 100644 --- a/deps/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/apps/v1beta2/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta2 import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -50,9 +50,8 @@ func (in *ControllerRevision) DeepCopy() *ControllerRevision { func (in *ControllerRevision) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -84,9 +83,8 @@ func (in *ControllerRevisionList) DeepCopy() *ControllerRevisionList { func (in *ControllerRevisionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -113,9 +111,8 @@ func (in *DaemonSet) DeepCopy() *DaemonSet { func (in *DaemonSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -164,9 +161,8 @@ func (in *DaemonSetList) DeepCopy() *DaemonSetList { func (in *DaemonSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -174,23 +170,15 @@ func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec) { *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -210,12 +198,8 @@ func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) { *out = *in if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -242,12 +226,8 @@ func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy) { *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateDaemonSet) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateDaemonSet) + (*in).DeepCopyInto(*out) } return } @@ -286,9 +266,8 @@ func (in *Deployment) DeepCopy() *Deployment { func (in *Deployment) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -338,9 +317,8 @@ func (in *DeploymentList) DeepCopy() *DeploymentList { func (in *DeploymentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -348,41 +326,25 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) in.Strategy.DeepCopyInto(&out.Strategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.ProgressDeadlineSeconds != nil { in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -409,12 +371,8 @@ func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { } if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -434,12 +392,8 @@ func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) { *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateDeployment) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateDeployment) + (*in).DeepCopyInto(*out) } return } @@ -478,9 +432,8 @@ func (in *ReplicaSet) DeepCopy() *ReplicaSet { func (in *ReplicaSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -529,9 +482,8 @@ func (in *ReplicaSetList) DeepCopy() *ReplicaSetList { func (in *ReplicaSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -539,21 +491,13 @@ func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) return @@ -597,12 +541,8 @@ func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -622,21 +562,13 @@ func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } if in.MaxSurge != nil { in, out := &in.MaxSurge, &out.MaxSurge - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -656,12 +588,8 @@ func (in *RollingUpdateStatefulSetStrategy) DeepCopyInto(out *RollingUpdateState *out = *in if in.Partition != nil { in, out := &in.Partition, &out.Partition - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -700,9 +628,8 @@ func (in *Scale) DeepCopy() *Scale { func (in *Scale) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -768,9 +695,8 @@ func (in *StatefulSet) DeepCopy() *StatefulSet { func (in *StatefulSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -819,9 +745,8 @@ func (in *StatefulSetList) DeepCopy() *StatefulSetList { func (in *StatefulSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -829,26 +754,18 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) if in.VolumeClaimTemplates != nil { in, out := &in.VolumeClaimTemplates, &out.VolumeClaimTemplates - *out = make([]core_v1.PersistentVolumeClaim, len(*in)) + *out = make([]corev1.PersistentVolumeClaim, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -856,12 +773,8 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) { in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -881,12 +794,8 @@ func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) { *out = *in if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -913,12 +822,8 @@ func (in *StatefulSetUpdateStrategy) DeepCopyInto(out *StatefulSetUpdateStrategy *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateStatefulSetStrategy) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateStatefulSetStrategy) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/api/authentication/v1/BUILD b/deps/k8s.io/api/authentication/v1/BUILD deleted file mode 100644 index 26e557e46..000000000 --- a/deps/k8s.io/api/authentication/v1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/authentication/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/authentication/v1/generated.pb.go b/deps/k8s.io/api/authentication/v1/generated.pb.go index d090ce579..2ce2e2d78 100644 --- a/deps/k8s.io/api/authentication/v1/generated.pb.go +++ b/deps/k8s.io/api/authentication/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2087,62 +2087,61 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 905 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0xfa, 0x47, 0x64, 0x8f, 0x9b, 0x90, 0x4c, 0xa9, 0x64, 0x05, 0xb0, 0x8d, 0x91, 0x90, - 0x05, 0x74, 0xb7, 0x36, 0xa8, 0x54, 0x45, 0x42, 0xca, 0x12, 0x0b, 0x2c, 0x04, 0xad, 0xa6, 0x4d, - 0x40, 0x9c, 0x18, 0xdb, 0x2f, 0xce, 0xe0, 0xee, 0xec, 0x32, 0x3b, 0x6b, 0xea, 0x5b, 0xff, 0x04, - 0x8e, 0x20, 0x71, 0xe0, 0x8f, 0x40, 0xe2, 0xc8, 0x35, 0xc7, 0x8a, 0x53, 0x0f, 0xc8, 0x22, 0xcb, - 0xbf, 0xc0, 0x89, 0x13, 0x9a, 0xd9, 0x89, 0xd7, 0x3f, 0x12, 0xc7, 0xa7, 0xde, 0x3c, 0xef, 0x7d, - 0xef, 0x9b, 0xf7, 0xbe, 0xf9, 0xfc, 0x16, 0x75, 0x46, 0xf7, 0x42, 0x9b, 0xf9, 0xce, 0x28, 0xea, - 0x81, 0xe0, 0x20, 0x21, 0x74, 0xc6, 0xc0, 0x07, 0xbe, 0x70, 0x4c, 0x82, 0x06, 0xcc, 0xa1, 0x91, - 0x3c, 0x05, 0x2e, 0x59, 0x9f, 0x4a, 0xe6, 0x73, 0x67, 0xdc, 0x72, 0x86, 0xc0, 0x41, 0x50, 0x09, - 0x03, 0x3b, 0x10, 0xbe, 0xf4, 0xf1, 0xeb, 0x09, 0xda, 0xa6, 0x01, 0xb3, 0x17, 0xd1, 0xf6, 0xb8, - 0xb5, 0x7f, 0x7b, 0xc8, 0xe4, 0x69, 0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, 0x1f, 0x00, 0x00, 0xff, - 0xff, 0x5f, 0x39, 0x60, 0xb1, 0xbd, 0x08, 0x00, 0x00, + // 892 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x8e, 0xf3, 0x63, 0xb5, 0x99, 0x74, 0x97, 0xdd, 0x29, 0x95, 0xa2, 0x05, 0xec, 0x60, 0x24, + 0x14, 0x01, 0xb5, 0x9b, 0x08, 0x95, 0xaa, 0x48, 0x48, 0x6b, 0x36, 0x82, 0x08, 0x41, 0xab, 0x69, + 0x77, 0x41, 0x9c, 0x98, 0xd8, 0x6f, 0xb3, 0x26, 0x78, 0x6c, 0xec, 0x71, 0x68, 0x6e, 0xfd, 0x13, + 0x38, 0x82, 0xc4, 0x81, 0x3f, 0x02, 0x89, 0x23, 0xd7, 0x3d, 0x56, 0x9c, 0x7a, 0x40, 0x11, 0x6b, + 0xfe, 0x05, 0x4e, 0x9c, 0xd0, 0x8c, 0x67, 0xe3, 0xfc, 0xd8, 0x4d, 0x73, 0xea, 0x2d, 0xf3, 0xde, + 0xf7, 0xbe, 0x79, 0xef, 0x9b, 0x2f, 0xcf, 0xa8, 0x37, 0xba, 0x97, 0x58, 0x7e, 0x68, 0x8f, 0xd2, + 0x01, 0xc4, 0x0c, 0x38, 0x24, 0xf6, 0x18, 0x98, 0x17, 0xc6, 0xb6, 0x4a, 0xd0, 0xc8, 0xb7, 0x69, + 0xca, 0xcf, 0x80, 0x71, 0xdf, 0xa5, 0xdc, 0x0f, 0x99, 0x3d, 0xee, 0xd8, 0x43, 0x60, 0x10, 0x53, + 0x0e, 0x9e, 0x15, 0xc5, 0x21, 0x0f, 0xf1, 0xeb, 0x39, 0xda, 0xa2, 0x91, 0x6f, 0x2d, 0xa2, 0xad, + 0x71, 0xe7, 0xe0, 0xf6, 0xd0, 0xe7, 0x67, 0xe9, 0xc0, 0x72, 0xc3, 0xc0, 0x1e, 0x86, 0xc3, 0xd0, + 0x96, 0x45, 0x83, 0xf4, 0x54, 0x9e, 0xe4, 0x41, 0xfe, 0xca, 0xc9, 0x0e, 0xde, 0x2f, 0xae, 0x0e, + 0xa8, 0x7b, 0xe6, 0x33, 0x88, 0x27, 0x76, 0x34, 0x1a, 0x8a, 0x40, 0x62, 0x07, 0xc0, 0xe9, 0x15, + 0x2d, 0x1c, 0xd8, 0xd7, 0x55, 0xc5, 0x29, 0xe3, 0x7e, 0x00, 0x2b, 0x05, 0x77, 0x5f, 0x54, 0x90, + 0xb8, 0x67, 0x10, 0xd0, 0xe5, 0x3a, 0xf3, 0x4f, 0x0d, 0xbd, 0xea, 0x84, 0x29, 0xf3, 0x1e, 0x0c, + 0xbe, 0x05, 0x97, 0x13, 0x38, 0x85, 0x18, 0x98, 0x0b, 0xb8, 0x85, 0xaa, 0x23, 0x9f, 0x79, 0x4d, + 0xad, 0xa5, 0xb5, 0xeb, 0xce, 0x8d, 0xf3, 0xa9, 0x51, 0xca, 0xa6, 0x46, 0xf5, 0x33, 0x9f, 0x79, + 0x44, 0x66, 0x70, 0x17, 0x21, 0xfa, 0xb0, 0x7f, 0x02, 0x71, 0xe2, 0x87, 0xac, 0x59, 0x96, 0x38, + 0xac, 0x70, 0xe8, 0x70, 0x96, 0x21, 0x73, 0x28, 0xc1, 0xca, 0x68, 0x00, 0xcd, 0xca, 0x22, 0xeb, + 0x17, 0x34, 0x00, 0x22, 0x33, 0xd8, 0x41, 0x95, 0xb4, 0x7f, 0xd4, 0xac, 0x4a, 0xc0, 0x1d, 0x05, + 0xa8, 0x1c, 0xf7, 0x8f, 0xfe, 0x9b, 0x1a, 0x6f, 0x5e, 0x37, 0x24, 0x9f, 0x44, 0x90, 0x58, 0xc7, + 0xfd, 0x23, 0x22, 0x8a, 0xcd, 0x0f, 0x10, 0xea, 0x3d, 0xe1, 0x31, 0x3d, 0xa1, 0xdf, 0xa5, 0x80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89, 0x20, 0xc9, 0x73, + 0xe6, 0xef, 0x65, 0xb4, 0x7d, 0xc9, 0x82, 0xdf, 0x43, 0xdb, 0xa2, 0x52, 0xae, 0xe4, 0x7c, 0xec, + 0x3d, 0x55, 0x24, 0x31, 0x22, 0x4e, 0x66, 0x08, 0xfc, 0x06, 0xaa, 0xa4, 0xbe, 0xa7, 0x36, 0x7d, + 0x63, 0x6e, 0x35, 0x13, 0x11, 0xc7, 0x26, 0xda, 0x1a, 0xc6, 0x61, 0x1a, 0x89, 0xc7, 0x12, 0x5b, + 0x00, 0x09, 0xdd, 0x3f, 0x91, 0x11, 0xa2, 0x32, 0xf8, 0x04, 0xd5, 0x40, 0x6c, 0xe6, 0x66, 0xb5, + 0x55, 0x69, 0x37, 0xba, 0x9d, 0xcd, 0xa6, 0xb5, 0xe4, 0x36, 0xef, 0x31, 0x1e, 0x4f, 0xe6, 0xa6, + 0x12, 0x31, 0x92, 0xd3, 0x1d, 0x0c, 0xd4, 0xc6, 0x97, 0x18, 0xbc, 0x87, 0x2a, 0x23, 0x98, 0xe4, + 0x13, 0x11, 0xf1, 0x13, 0x7f, 0x84, 0x6a, 0x63, 0xf1, 0x31, 0x50, 0x2a, 0xb7, 0xd7, 0xdf, 0x5b, + 0x7c, 0x3c, 0x48, 0x5e, 0x76, 0xbf, 0x7c, 0x4f, 0x73, 0xda, 0xe7, 0x17, 0x7a, 0xe9, 0xd9, 0x85, + 0x5e, 0x7a, 0x7e, 0xa1, 0x97, 0x9e, 0x66, 0xba, 0x76, 0x9e, 0xe9, 0xda, 0xb3, 0x4c, 0xd7, 0x9e, + 0x67, 0xba, 0xf6, 0x77, 0xa6, 0x6b, 0x3f, 0xfe, 0xa3, 0x97, 0xbe, 0x2e, 0x8f, 0x3b, 0xff, 0x07, + 0x00, 0x00, 0xff, 0xff, 0x5e, 0x8d, 0x94, 0x78, 0x88, 0x08, 0x00, 0x00, } diff --git a/deps/k8s.io/api/authentication/v1/generated.proto b/deps/k8s.io/api/authentication/v1/generated.proto index 1fd432a70..10c792171 100644 --- a/deps/k8s.io/api/authentication/v1/generated.proto +++ b/deps/k8s.io/api/authentication/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.authentication.v1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; diff --git a/deps/k8s.io/api/authentication/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/authentication/v1/types_swagger_doc_generated.go index 68ecea8ea..6632a5dd5 100644 --- a/deps/k8s.io/api/authentication/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/authentication/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_BoundObjectReference = map[string]string{ "": "BoundObjectReference is a reference to an object that a token is bound to.", "kind": "Kind of the referent. Valid kinds are 'Pod' and 'Secret'.", diff --git a/deps/k8s.io/api/authentication/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/authentication/v1/zz_generated.deepcopy.go index 807866dd1..f36c253b2 100644 --- a/deps/k8s.io/api/authentication/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/authentication/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -40,6 +40,26 @@ func (in *BoundObjectReference) DeepCopy() *BoundObjectReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ExtraValue) DeepCopyInto(out *ExtraValue) { + { + in := &in + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. +func (in ExtraValue) DeepCopy() ExtraValue { + if in == nil { + return nil + } + out := new(ExtraValue) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TokenRequest) DeepCopyInto(out *TokenRequest) { *out = *in @@ -64,9 +84,8 @@ func (in *TokenRequest) DeepCopy() *TokenRequest { func (in *TokenRequest) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -79,21 +98,13 @@ func (in *TokenRequestSpec) DeepCopyInto(out *TokenRequestSpec) { } if in.ExpirationSeconds != nil { in, out := &in.ExpirationSeconds, &out.ExpirationSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.BoundObjectRef != nil { in, out := &in.BoundObjectRef, &out.BoundObjectRef - if *in == nil { - *out = nil - } else { - *out = new(BoundObjectReference) - **out = **in - } + *out = new(BoundObjectReference) + **out = **in } return } @@ -149,9 +160,8 @@ func (in *TokenReview) DeepCopy() *TokenReview { func (in *TokenReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -199,8 +209,15 @@ func (in *UserInfo) DeepCopyInto(out *UserInfo) { in, out := &in.Extra, &out.Extra *out = make(map[string]ExtraValue, len(*in)) for key, val := range *in { - (*out)[key] = make(ExtraValue, len(val)) - copy((*out)[key], val) + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal } } return diff --git a/deps/k8s.io/api/authentication/v1beta1/BUILD b/deps/k8s.io/api/authentication/v1beta1/BUILD deleted file mode 100644 index 998d793fe..000000000 --- a/deps/k8s.io/api/authentication/v1beta1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/authentication/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/authentication/v1beta1/generated.pb.go b/deps/k8s.io/api/authentication/v1beta1/generated.pb.go index 86e362b87..8503d212b 100644 --- a/deps/k8s.io/api/authentication/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/authentication/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1257,46 +1257,45 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 650 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4d, 0x4f, 0x14, 0x4d, - 0x10, 0xc7, 0x67, 0xf6, 0x85, 0x67, 0xb7, 0xf7, 0x41, 0xb1, 0x13, 0x93, 0xcd, 0x26, 0xce, 0xae, - 0xeb, 0x85, 0x44, 0xe9, 0x11, 0x24, 0x48, 0xf0, 0xe4, 0x28, 0x31, 0x98, 0x10, 0x93, 0x16, 0x3c, - 0xa8, 0x07, 0x7b, 0x67, 0x8b, 0xd9, 0x76, 0x99, 0x97, 0xf4, 0xf4, 0xac, 0x72, 0xe3, 0x23, 0x78, - 0xf4, 0x68, 0xe2, 0x27, 0x31, 0xf1, 0xc0, 0x91, 0x23, 0x07, 0x43, 0x64, 0xfc, 0x22, 0xa6, 0x7b, - 0x5a, 0x76, 0x61, 0x43, 0x80, 0xdb, 0xf4, 0xbf, 0xea, 0xff, 0x9b, 0xaa, 0xea, 0x2e, 0xf4, 0x72, - 0xb8, 0x9a, 0x12, 0x1e, 0xbb, 0xc3, 0xac, 0x07, 0x22, 0x02, 0x09, 0xa9, 0x3b, 0x82, 0xa8, 0x1f, - 0x0b, 0xd7, 0x04, 0x58, 0xc2, 0x5d, 0x96, 0xc9, 0x01, 0x44, 0x92, 0xfb, 0x4c, 0xf2, 0x38, 0x72, - 0x47, 0x8b, 0x3d, 0x90, 0x6c, 0xd1, 0x0d, 0x20, 0x02, 0xc1, 0x24, 0xf4, 0x49, 0x22, 0x62, 0x19, - 0xe3, 0xbb, 0x85, 0x85, 0xb0, 0x84, 0x93, 0xb3, 0x16, 0x62, 0x2c, 0xad, 0x85, 0x80, 0xcb, 0x41, - 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3, 0x44, 0x5d, 0x9b, 0x7a, - 0xaa, 0x48, 0x0d, 0xff, 0x85, 0x56, 0xa8, 0x89, 0xe0, 0x77, 0xa8, 0x0a, 0xea, 0x6d, 0x37, 0x2b, - 0x9d, 0xf2, 0x7c, 0x63, 0x69, 0xe5, 0x1a, 0x2d, 0x13, 0xbd, 0x14, 0xeb, 0x91, 0x14, 0x7b, 0x13, - 0xad, 0x29, 0x8d, 0x16, 0xcc, 0x56, 0x60, 0x16, 0x47, 0xe7, 0xe0, 0x39, 0x54, 0x1e, 0xc2, 0x5e, - 0xd1, 0x16, 0x55, 0x9f, 0xf8, 0x19, 0xaa, 0x8e, 0xd4, 0x4e, 0x99, 0x79, 0x2f, 0x5c, 0xe1, 0xe7, - 0xe3, 0x45, 0xa4, 0x85, 0x77, 0xad, 0xb4, 0x6a, 0x7b, 0x0b, 0x07, 0x27, 0x8e, 0x75, 0x78, 0xe2, - 0x58, 0x47, 0x27, 0x8e, 0xb5, 0x9f, 0x3b, 0xf6, 0x41, 0xee, 0xd8, 0x87, 0xb9, 0x63, 0x1f, 0xe5, - 0x8e, 0xfd, 0x3b, 0x77, 0xec, 0x2f, 0x7f, 0x1c, 0xeb, 0xed, 0x7f, 0x06, 0xf2, 0x37, 0x00, 0x00, - 0xff, 0xff, 0x36, 0x0e, 0x35, 0x2a, 0x43, 0x05, 0x00, 0x00, + // 635 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xcf, 0x4f, 0xd4, 0x40, + 0x14, 0x6e, 0xf7, 0x07, 0xee, 0xce, 0x8a, 0xe2, 0x24, 0x26, 0x9b, 0x4d, 0xec, 0xae, 0xeb, 0x85, + 0x44, 0x99, 0x0a, 0x21, 0x48, 0xf0, 0x64, 0x95, 0x18, 0x4c, 0x88, 0xc9, 0x08, 0x1e, 0xd4, 0x83, + 0xb3, 0xdd, 0x47, 0xb7, 0xae, 0xed, 0x34, 0xd3, 0x69, 0x95, 0x1b, 0x7f, 0x82, 0x47, 0x8f, 0x26, + 0xfe, 0x25, 0x26, 0x1e, 0x38, 0x72, 0xe4, 0x60, 0x88, 0xd4, 0x7f, 0xc4, 0xcc, 0x74, 0x64, 0x17, + 0x88, 0x01, 0x6e, 0xf3, 0xbe, 0xf7, 0xbe, 0x6f, 0xde, 0xf7, 0x66, 0x1e, 0x7a, 0x31, 0x5e, 0x4d, + 0x49, 0xc8, 0xdd, 0x71, 0x36, 0x00, 0x11, 0x83, 0x84, 0xd4, 0xcd, 0x21, 0x1e, 0x72, 0xe1, 0x9a, + 0x04, 0x4b, 0x42, 0x97, 0x65, 0x72, 0x04, 0xb1, 0x0c, 0x7d, 0x26, 0x43, 0x1e, 0xbb, 0xf9, 0xe2, + 0x00, 0x24, 0x5b, 0x74, 0x03, 0x88, 0x41, 0x30, 0x09, 0x43, 0x92, 0x08, 0x2e, 0x39, 0xbe, 0x5b, + 0x52, 0x08, 0x4b, 0x42, 0x72, 0x9a, 0x42, 0x0c, 0xa5, 0xb3, 0x10, 0x84, 0x72, 0x94, 0x0d, 0x88, + 0xcf, 0x23, 0x37, 0xe0, 0x01, 0x77, 0x35, 0x73, 0x90, 0xed, 0xe8, 0x48, 0x07, 0xfa, 0x54, 0x2a, + 0x76, 0x96, 0x27, 0x4d, 0x44, 0xcc, 0x1f, 0x85, 0x31, 0x88, 0x5d, 0x37, 0x19, 0x07, 0x0a, 0x48, + 0xdd, 0x08, 0x24, 0x73, 0xf3, 0x73, 0x7d, 0x74, 0xdc, 0xff, 0xb1, 0x44, 0x16, 0xcb, 0x30, 0x82, + 0x73, 0x84, 0x95, 0x8b, 0x08, 0xa9, 0x3f, 0x82, 0x88, 0x9d, 0xe5, 0xf5, 0x1f, 0x21, 0xb4, 0xfe, + 0x59, 0x0a, 0xf6, 0x9a, 0x7d, 0xcc, 0x00, 0x77, 0x51, 0x3d, 0x94, 0x10, 0xa5, 0x6d, 0xbb, 0x57, + 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2, 0xb1, 0x0f, 0x0a, 0xc7, 0x3e, 0x2c, + 0x1c, 0xfb, 0x77, 0xe1, 0xd8, 0x5f, 0xfe, 0x38, 0xd6, 0x9b, 0x6b, 0x46, 0xe4, 0x6f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x39, 0x00, 0xe7, 0xfa, 0x0e, 0x05, 0x00, 0x00, } diff --git a/deps/k8s.io/api/authentication/v1beta1/generated.proto b/deps/k8s.io/api/authentication/v1beta1/generated.proto index 3d0abd15d..a057bc591 100644 --- a/deps/k8s.io/api/authentication/v1beta1/generated.proto +++ b/deps/k8s.io/api/authentication/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.authentication.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; diff --git a/deps/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go index f910bea6f..968999d1e 100644 --- a/deps/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/authentication/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_TokenReview = map[string]string{ "": "TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.", "spec": "Spec holds information about the request being evaluated", diff --git a/deps/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go index 65aabe7c4..3a5f6d5a9 100644 --- a/deps/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/authentication/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -24,6 +24,26 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ExtraValue) DeepCopyInto(out *ExtraValue) { + { + in := &in + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. +func (in ExtraValue) DeepCopy() ExtraValue { + if in == nil { + return nil + } + out := new(ExtraValue) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TokenReview) DeepCopyInto(out *TokenReview) { *out = *in @@ -48,9 +68,8 @@ func (in *TokenReview) DeepCopy() *TokenReview { func (in *TokenReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -98,8 +117,15 @@ func (in *UserInfo) DeepCopyInto(out *UserInfo) { in, out := &in.Extra, &out.Extra *out = make(map[string]ExtraValue, len(*in)) for key, val := range *in { - (*out)[key] = make(ExtraValue, len(val)) - copy((*out)[key], val) + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal } } return diff --git a/deps/k8s.io/api/authorization/v1/BUILD b/deps/k8s.io/api/authorization/v1/BUILD deleted file mode 100644 index af9e74a63..000000000 --- a/deps/k8s.io/api/authorization/v1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/authorization/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/authorization/v1/generated.pb.go b/deps/k8s.io/api/authorization/v1/generated.pb.go index bdb606c0b..e9145af02 100644 --- a/deps/k8s.io/api/authorization/v1/generated.pb.go +++ b/deps/k8s.io/api/authorization/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -3452,77 +3452,77 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1152 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xae, 0xed, 0xd4, 0x1e, 0x37, 0x24, 0x9d, 0x28, 0xcd, 0x36, 0x15, 0x76, 0xb4, 0x48, - 0x90, 0x8a, 0xb2, 0x4b, 0x4c, 0xdb, 0x44, 0x95, 0x2a, 0x14, 0x2b, 0x11, 0x8a, 0xd4, 0x96, 0x6a, - 0xa2, 0x44, 0xa2, 0x08, 0xc4, 0x78, 0x3d, 0xb1, 0x97, 0xd8, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x38, - 0x55, 0xe2, 0x0b, 0x70, 0xe4, 0xc0, 0x81, 0x6f, 0xc0, 0x05, 0x89, 0x1b, 0x07, 0x0e, 0x28, 0xc7, - 0x1e, 0x8b, 0x84, 0x2c, 0xb2, 0x9c, 0xf9, 0x0e, 0x68, 0x66, 0xc7, 0xde, 0x75, 0xb2, 0x76, 0x13, - 0x0e, 0xf4, 0xd2, 0xdb, 0xee, 0xfb, 0xfd, 0xde, 0x9f, 0x79, 0x7f, 0x66, 0x1e, 0xd8, 0x3a, 0xdc, - 0x60, 0x96, 0xeb, 0xdb, 0x87, 0x61, 0x93, 0x50, 0x8f, 0x70, 0xc2, 0xec, 0x3e, 0xf1, 0x5a, 0x3e, - 0xb5, 0x15, 0x80, 0x03, 0xd7, 0xc6, 0x21, 0xef, 0xf8, 0xd4, 0xfd, 0x06, 0x73, 0xd7, 0xf7, 0xec, - 0xfe, 0x9a, 0xdd, 0x26, 0x1e, 0xa1, 0x98, 0x93, 0x96, 0x15, 0x50, 0x9f, 0xfb, 0xf0, 0x66, 0x4c, - 0xb6, 0x70, 0xe0, 0x5a, 0x63, 0x64, 0xab, 0xbf, 0xb6, 0xfc, 0x5e, 0xdb, 0xe5, 0x9d, 0xb0, 0x69, - 0x39, 0x7e, 0xcf, 0x6e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, 0x04, 0xa5, 0x58, 0x59, 0x75, 0x29, 0x5c, 0xae, 0x2e, 0x8d, 0xd5, 0x93, 0xd3, 0x6a, - 0xee, 0xf9, 0x69, 0x35, 0xf7, 0xe2, 0xb4, 0x9a, 0x7b, 0x16, 0x55, 0xb5, 0x93, 0xa8, 0xaa, 0x3d, - 0x8f, 0xaa, 0xda, 0x8b, 0xa8, 0xaa, 0xfd, 0x15, 0x55, 0xb5, 0xef, 0xfe, 0xae, 0xe6, 0x9e, 0xea, - 0xfd, 0xb5, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x0e, 0xab, 0x82, 0x7c, 0x0f, 0x00, 0x00, + // 1140 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0x1b, 0xc5, + 0x1b, 0xf7, 0xae, 0xed, 0xc4, 0x1e, 0x37, 0xff, 0xa4, 0x13, 0xa5, 0xd9, 0xa6, 0xfa, 0xdb, 0xd1, + 0x22, 0x41, 0x2a, 0xca, 0x2e, 0xb1, 0xda, 0x26, 0xaa, 0x54, 0xa1, 0x58, 0x89, 0x50, 0xa4, 0xb6, + 0x54, 0x13, 0x25, 0x12, 0x45, 0x20, 0xc6, 0xeb, 0x89, 0xbd, 0xc4, 0xde, 0x5d, 0x66, 0x66, 0x1d, + 0xc2, 0xa9, 0x12, 0x5f, 0x80, 0x23, 0x07, 0x0e, 0x7c, 0x03, 0x2e, 0x48, 0xdc, 0x38, 0x70, 0x40, + 0x39, 0xf6, 0x58, 0x24, 0x64, 0x91, 0xe5, 0xcc, 0x77, 0x40, 0x33, 0x3b, 0xf6, 0xae, 0x93, 0xb5, + 0x9b, 0x70, 0xa0, 0x97, 0xde, 0x76, 0x9f, 0xdf, 0xef, 0x79, 0x99, 0xe7, 0x65, 0xe6, 0x01, 0xdb, + 0x47, 0x9b, 0xcc, 0x72, 0x7d, 0xfb,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 0x97, 0x96, 0xa6, 0x56, 0x17, 0xf9, 0x0b, 0x29, 0x58, 0xf0, 0xc6, + 0x77, 0xe6, 0x78, 0xa9, 0xaa, 0xd4, 0xef, 0x5c, 0x76, 0x1c, 0xa4, 0x37, 0x43, 0x79, 0x5b, 0x38, + 0x07, 0x30, 0x74, 0xc1, 0x3e, 0xac, 0x03, 0xe0, 0x7a, 0x8e, 0xdf, 0x0b, 0xba, 0x84, 0x13, 0x99, + 0xde, 0x52, 0x72, 0x0f, 0xee, 0x8e, 0x10, 0x94, 0x62, 0x65, 0xd5, 0xa5, 0x70, 0xb5, 0xba, 0x34, + 0xd6, 0x4e, 0xcf, 0xaa, 0xb9, 0x17, 0x67, 0xd5, 0xdc, 0xcb, 0xb3, 0x6a, 0xee, 0x79, 0x54, 0xd5, + 0x4e, 0xa3, 0xaa, 0xf6, 0x22, 0xaa, 0x6a, 0x2f, 0xa3, 0xaa, 0xf6, 0x67, 0x54, 0xd5, 0xbe, 0xfd, + 0xab, 0x9a, 0x7b, 0xa6, 0xf7, 0xd7, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x85, 0x45, 0x74, + 0x47, 0x0f, 0x00, 0x00, } diff --git a/deps/k8s.io/api/authorization/v1/generated.proto b/deps/k8s.io/api/authorization/v1/generated.proto index 2cd4af0c0..f68a04e49 100644 --- a/deps/k8s.io/api/authorization/v1/generated.proto +++ b/deps/k8s.io/api/authorization/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.authorization.v1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; diff --git a/deps/k8s.io/api/authorization/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/authorization/v1/types_swagger_doc_generated.go index 85503660c..8445f7116 100644 --- a/deps/k8s.io/api/authorization/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/authorization/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_LocalSubjectAccessReview = map[string]string{ "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", diff --git a/deps/k8s.io/api/authorization/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/authorization/v1/zz_generated.deepcopy.go index 06a78643f..1d11b38b0 100644 --- a/deps/k8s.io/api/authorization/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/authorization/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -24,6 +24,26 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ExtraValue) DeepCopyInto(out *ExtraValue) { + { + in := &in + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. +func (in ExtraValue) DeepCopy() ExtraValue { + if in == nil { + return nil + } + out := new(ExtraValue) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview) { *out = *in @@ -48,9 +68,8 @@ func (in *LocalSubjectAccessReview) DeepCopy() *LocalSubjectAccessReview { func (in *LocalSubjectAccessReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -171,9 +190,8 @@ func (in *SelfSubjectAccessReview) DeepCopy() *SelfSubjectAccessReview { func (in *SelfSubjectAccessReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -181,21 +199,13 @@ func (in *SelfSubjectAccessReviewSpec) DeepCopyInto(out *SelfSubjectAccessReview *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(ResourceAttributes) - **out = **in - } + *out = new(ResourceAttributes) + **out = **in } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(NonResourceAttributes) - **out = **in - } + *out = new(NonResourceAttributes) + **out = **in } return } @@ -234,9 +244,8 @@ func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview { func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -279,9 +288,8 @@ func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview { func (in *SubjectAccessReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -289,21 +297,13 @@ func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) { *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(ResourceAttributes) - **out = **in - } + *out = new(ResourceAttributes) + **out = **in } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(NonResourceAttributes) - **out = **in - } + *out = new(NonResourceAttributes) + **out = **in } if in.Groups != nil { in, out := &in.Groups, &out.Groups @@ -314,8 +314,15 @@ func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) { in, out := &in.Extra, &out.Extra *out = make(map[string]ExtraValue, len(*in)) for key, val := range *in { - (*out)[key] = make(ExtraValue, len(val)) - copy((*out)[key], val) + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal } } return diff --git a/deps/k8s.io/api/authorization/v1beta1/BUILD b/deps/k8s.io/api/authorization/v1beta1/BUILD deleted file mode 100644 index 06c953f2a..000000000 --- a/deps/k8s.io/api/authorization/v1beta1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/authorization/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/authorization/v1beta1/generated.pb.go b/deps/k8s.io/api/authorization/v1beta1/generated.pb.go index a9a8116b3..75ee6cf91 100644 --- a/deps/k8s.io/api/authorization/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/authorization/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -3452,78 +3452,77 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1154 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4d, 0x6f, 0x1b, 0xc5, - 0x1b, 0xf7, 0xfa, 0x25, 0xb1, 0xc7, 0xcd, 0x3f, 0xe9, 0x44, 0x69, 0xb6, 0xf9, 0x0b, 0xdb, 0x32, - 0x12, 0x0a, 0xa2, 0xdd, 0x25, 0xa1, 0x90, 0x12, 0xe8, 0x21, 0x56, 0x22, 0x14, 0xa9, 0x2d, 0xd5, - 0x44, 0xc9, 0x81, 0x4a, 0xc0, 0x78, 0x3d, 0xb1, 0x17, 0xdb, 0xbb, 0xcb, 0xcc, 0xac, 0x43, 0x10, - 0x87, 0x1e, 0x39, 0x72, 0xe4, 0xc8, 0x89, 0xef, 0xc0, 0x05, 0x09, 0x4e, 0x39, 0xf6, 0x18, 0x24, - 0x64,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d, 0xcc, 0x5b, 0xb2, 0x70, - 0x85, 0x28, 0xbf, 0x67, 0x98, 0xb7, 0x90, 0x44, 0x84, 0x46, 0x8f, 0xd0, 0xba, 0xbc, 0x7c, 0x4c, - 0xe3, 0x88, 0xd0, 0x3a, 0x92, 0x48, 0xf5, 0x6b, 0xb0, 0x18, 0x73, 0x8e, 0xfc, 0x8e, 0xec, 0xad, - 0x80, 0x46, 0x7a, 0x2b, 0x2c, 0x18, 0x0a, 0xe5, 0xf0, 0x11, 0x58, 0x74, 0x22, 0x9b, 0x43, 0xf4, - 0x98, 0xe9, 0x69, 0xa9, 0xba, 0x1c, 0xf4, 0xcb, 0x71, 0x77, 0x02, 0x42, 0x97, 0x75, 0xc5, 0x40, - 0xc0, 0x84, 0xdb, 0x98, 0xa0, 0xe0, 0xe0, 0x2e, 0x61, 0x1e, 0xb6, 0x88, 0xba, 0xd2, 0x6d, 0x95, - 0x70, 0xe1, 0xe9, 0x00, 0x40, 0x91, 0xce, 0xf4, 0xcb, 0xc1, 0x37, 0x41, 0xae, 0x49, 0x5d, 0xdf, - 0x93, 0xdd, 0x29, 0xd4, 0x16, 0x94, 0x4a, 0xee, 0x13, 0x21, 0x44, 0x21, 0x06, 0xdf, 0x06, 0xf3, - 0x3d, 0x42, 0x99, 0xed, 0x3a, 0x7a, 0x56, 0xaa, 0x2d, 0x2a, 0xb5, 0xf9, 0xa3, 0x50, 0x8c, 0x06, - 0x38, 0xbc, 0x07, 0xf2, 0x54, 0x25, 0xae, 0xe7, 0xa4, 0xee, 0x92, 0xd2, 0xcd, 0x0f, 0x2b, 0x38, - 0xd4, 0x80, 0xef, 0x83, 0x22, 0xf3, 0xeb, 0x43, 0x83, 0x39, 0x69, 0xb0, 0xac, 0x0c, 0x8a, 0x07, - 0x11, 0x84, 0xe2, 0x7a, 0xe2, 0x5a, 0xe2, 0x8e, 0xfa, 0xfc, 0xe8, 0xb5, 0x44, 0x09, 0x90, 0x44, - 0xaa, 0xbf, 0x6b, 0x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06, 0x8b, 0x7b, 0xa3, 0x30, 0xba, 0xac, 0x2f, 0x42, 0x35, 0x88, 0x63, 0x93, 0x86, 0x64, - 0x6f, 0xf9, 0x28, 0xd4, 0xae, 0x94, 0x22, 0x85, 0x56, 0xff, 0x49, 0x03, 0x7d, 0xd2, 0xb3, 0x07, - 0xdb, 0x11, 0x8b, 0x91, 0xa0, 0x24, 0x52, 0xc5, 0x4d, 0xe3, 0xfa, 0x2b, 0x23, 0xcc, 0x6a, 0x2b, - 0x2a, 0xf6, 0x42, 0x5c, 0x1a, 0x63, 0x3e, 0xf2, 0x08, 0x4f, 0xc0, 0x92, 0x33, 0x4a, 0xb9, 0x43, - 0x4e, 0x56, 0xdc, 0xdc, 0x98, 0x69, 0x41, 0x64, 0x48, 0x5d, 0x85, 0x5c, 0xba, 0x04, 0x30, 0x34, - 0x16, 0x04, 0x6e, 0x02, 0x60, 0x3b, 0x96, 0xdb, 0xf5, 0x3a, 0x84, 0x13, 0x59, 0xe8, 0x7c, 0xf4, - 0x5a, 0xee, 0x0f, 0x11, 0x14, 0xd3, 0x4a, 0xea, 0x50, 0x76, 0xb6, 0x0e, 0xd5, 0xee, 0x9f, 0x5d, - 0x94, 0x52, 0x2f, 0x2f, 0x4a, 0xa9, 0xf3, 0x8b, 0x52, 0xea, 0x45, 0x50, 0xd2, 0xce, 0x82, 0x92, - 0xf6, 0x32, 0x28, 0x69, 0xe7, 0x41, 0x49, 0xfb, 0x2b, 0x28, 0x69, 0x3f, 0xfc, 0x5d, 0x4a, 0x7d, - 0x36, 0xaf, 0x6e, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, 0xb3, 0x5e, 0x05, 0xd9, 0x0f, - 0x00, 0x00, + // 1137 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcb, 0x6f, 0x1b, 0x45, + 0x18, 0xf7, 0xfa, 0x91, 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0x7f, 0x2a, 0x99, 0xcf, + 0x67, 0x55, 0x84, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc5, 0xba, 0xf8, 0x96, 0xa4, 0x0f, 0x00, + 0x00, } diff --git a/deps/k8s.io/api/authorization/v1beta1/generated.proto b/deps/k8s.io/api/authorization/v1beta1/generated.proto index b64c0642c..3876a3eeb 100644 --- a/deps/k8s.io/api/authorization/v1beta1/generated.proto +++ b/deps/k8s.io/api/authorization/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.authorization.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; diff --git a/deps/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go index 2371b21c6..3ae6e7206 100644 --- a/deps/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/authorization/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_LocalSubjectAccessReview = map[string]string{ "": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", "spec": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", diff --git a/deps/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go index fed07fbb2..58b2dfe75 100644 --- a/deps/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/authorization/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -24,6 +24,26 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ExtraValue) DeepCopyInto(out *ExtraValue) { + { + in := &in + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. +func (in ExtraValue) DeepCopy() ExtraValue { + if in == nil { + return nil + } + out := new(ExtraValue) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview) { *out = *in @@ -48,9 +68,8 @@ func (in *LocalSubjectAccessReview) DeepCopy() *LocalSubjectAccessReview { func (in *LocalSubjectAccessReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -171,9 +190,8 @@ func (in *SelfSubjectAccessReview) DeepCopy() *SelfSubjectAccessReview { func (in *SelfSubjectAccessReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -181,21 +199,13 @@ func (in *SelfSubjectAccessReviewSpec) DeepCopyInto(out *SelfSubjectAccessReview *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(ResourceAttributes) - **out = **in - } + *out = new(ResourceAttributes) + **out = **in } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(NonResourceAttributes) - **out = **in - } + *out = new(NonResourceAttributes) + **out = **in } return } @@ -234,9 +244,8 @@ func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview { func (in *SelfSubjectRulesReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -279,9 +288,8 @@ func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview { func (in *SubjectAccessReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -289,21 +297,13 @@ func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) { *out = *in if in.ResourceAttributes != nil { in, out := &in.ResourceAttributes, &out.ResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(ResourceAttributes) - **out = **in - } + *out = new(ResourceAttributes) + **out = **in } if in.NonResourceAttributes != nil { in, out := &in.NonResourceAttributes, &out.NonResourceAttributes - if *in == nil { - *out = nil - } else { - *out = new(NonResourceAttributes) - **out = **in - } + *out = new(NonResourceAttributes) + **out = **in } if in.Groups != nil { in, out := &in.Groups, &out.Groups @@ -314,8 +314,15 @@ func (in *SubjectAccessReviewSpec) DeepCopyInto(out *SubjectAccessReviewSpec) { in, out := &in.Extra, &out.Extra *out = make(map[string]ExtraValue, len(*in)) for key, val := range *in { - (*out)[key] = make(ExtraValue, len(val)) - copy((*out)[key], val) + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal } } return diff --git a/deps/k8s.io/api/autoscaling/v1/BUILD b/deps/k8s.io/api/autoscaling/v1/BUILD deleted file mode 100644 index ccf587be0..000000000 --- a/deps/k8s.io/api/autoscaling/v1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/autoscaling/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/autoscaling/v1/generated.pb.go b/deps/k8s.io/api/autoscaling/v1/generated.pb.go index 4c6a17127..8d67ef976 100644 --- a/deps/k8s.io/api/autoscaling/v1/generated.pb.go +++ b/deps/k8s.io/api/autoscaling/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,6 +26,8 @@ limitations under the License. It has these top-level messages: CrossVersionObjectReference + ExternalMetricSource + ExternalMetricStatus HorizontalPodAutoscaler HorizontalPodAutoscalerCondition HorizontalPodAutoscalerList @@ -76,80 +78,90 @@ func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } +func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } +func (*ExternalMetricSource) ProtoMessage() {} +func (*ExternalMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } +func (*ExternalMetricStatus) ProtoMessage() {} +func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} + return fileDescriptorGenerated, []int{4} } func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} + return fileDescriptorGenerated, []int{5} } func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{4} + return fileDescriptorGenerated, []int{6} } func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{5} + return fileDescriptorGenerated, []int{7} } func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} -func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} -func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} -func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} -func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} -func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} -func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} -func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} -func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *Scale) Reset() { *m = Scale{} } func (*Scale) ProtoMessage() {} -func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*Scale) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func (m *ScaleSpec) Reset() { *m = ScaleSpec{} } func (*ScaleSpec) ProtoMessage() {} -func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*ScaleSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } func (m *ScaleStatus) Reset() { *m = ScaleStatus{} } func (*ScaleStatus) ProtoMessage() {} -func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*ScaleStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } func init() { proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v1.CrossVersionObjectReference") + proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v1.ExternalMetricSource") + proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v1.ExternalMetricStatus") proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscaler") proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerCondition") proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v1.HorizontalPodAutoscalerList") @@ -197,6 +209,108 @@ func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ExternalMetricSource) 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 *ExternalMetricSource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) + i += copy(dAtA[i:], m.MetricName) + if m.MetricSelector != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size())) + n1, err := m.MetricSelector.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.TargetValue != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size())) + n2, err := m.TargetValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.TargetAverageValue != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size())) + n3, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} + +func (m *ExternalMetricStatus) 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 *ExternalMetricStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) + i += copy(dAtA[i:], m.MetricName) + if m.MetricSelector != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size())) + n4, err := m.MetricSelector.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size())) + n5, err := m.CurrentValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if m.CurrentAverageValue != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size())) + n6, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -215,27 +329,27 @@ func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n7, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n1 + i += n7 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n2, err := m.Spec.MarshalTo(dAtA[i:]) + n8, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n2 + i += n8 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n3, err := m.Status.MarshalTo(dAtA[i:]) + n9, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n9 return i, nil } @@ -265,11 +379,11 @@ func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n10, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n10 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -299,11 +413,11 @@ func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n5, err := m.ListMeta.MarshalTo(dAtA[i:]) + n11, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n11 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -337,11 +451,11 @@ func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size())) - n6, err := m.ScaleTargetRef.MarshalTo(dAtA[i:]) + n12, err := m.ScaleTargetRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n12 if m.MinReplicas != nil { dAtA[i] = 0x10 i++ @@ -382,11 +496,11 @@ func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size())) - n7, err := m.LastScaleTime.MarshalTo(dAtA[i:]) + n13, err := m.LastScaleTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n13 } dAtA[i] = 0x18 i++ @@ -425,31 +539,41 @@ func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size())) - n8, err := m.Object.MarshalTo(dAtA[i:]) + n14, err := m.Object.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n14 } if m.Pods != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size())) - n9, err := m.Pods.MarshalTo(dAtA[i:]) + n15, err := m.Pods.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n15 } if m.Resource != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size())) - n10, err := m.Resource.MarshalTo(dAtA[i:]) + n16, err := m.Resource.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if m.External != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size())) + n17, err := m.External.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n17 } return i, nil } @@ -477,31 +601,41 @@ func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size())) - n11, err := m.Object.MarshalTo(dAtA[i:]) + n18, err := m.Object.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n18 } if m.Pods != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size())) - n12, err := m.Pods.MarshalTo(dAtA[i:]) + n19, err := m.Pods.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n19 } if m.Resource != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size())) - n13, err := m.Resource.MarshalTo(dAtA[i:]) + n20, err := m.Resource.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n20 + } + if m.External != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size())) + n21, err := m.External.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 } return i, nil } @@ -524,11 +658,11 @@ func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size())) - n14, err := m.Target.MarshalTo(dAtA[i:]) + n22, err := m.Target.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n22 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) @@ -536,11 +670,11 @@ func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size())) - n15, err := m.TargetValue.MarshalTo(dAtA[i:]) + n23, err := m.TargetValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n23 return i, nil } @@ -562,11 +696,11 @@ func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size())) - n16, err := m.Target.MarshalTo(dAtA[i:]) + n24, err := m.Target.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n24 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) @@ -574,11 +708,11 @@ func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size())) - n17, err := m.CurrentValue.MarshalTo(dAtA[i:]) + n25, err := m.CurrentValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n25 return i, nil } @@ -604,11 +738,11 @@ func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size())) - n18, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) + n26, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n26 return i, nil } @@ -634,11 +768,11 @@ func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size())) - n19, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) + n27, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n27 return i, nil } @@ -670,11 +804,11 @@ func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size())) - n20, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) + n28, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n28 } return i, nil } @@ -706,11 +840,11 @@ func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size())) - n21, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) + n29, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n29 return i, nil } @@ -732,27 +866,27 @@ func (m *Scale) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n22, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n30, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n30 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n23, err := m.Spec.MarshalTo(dAtA[i:]) + n31, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n31 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n24, err := m.Status.MarshalTo(dAtA[i:]) + n32, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n32 return i, nil } @@ -841,6 +975,44 @@ func (m *CrossVersionObjectReference) Size() (n int) { return n } +func (m *ExternalMetricSource) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + if m.MetricSelector != nil { + l = m.MetricSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.TargetValue != nil { + l = m.TargetValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.TargetAverageValue != nil { + l = m.TargetAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ExternalMetricStatus) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + if m.MetricSelector != nil { + l = m.MetricSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.CurrentValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.CurrentAverageValue != nil { + l = m.CurrentAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *HorizontalPodAutoscaler) Size() (n int) { var l int _ = l @@ -933,6 +1105,10 @@ func (m *MetricSpec) Size() (n int) { l = m.Resource.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.External != nil { + l = m.External.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -953,6 +1129,10 @@ func (m *MetricStatus) Size() (n int) { l = m.Resource.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.External != nil { + l = m.External.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -1081,6 +1261,32 @@ func (this *CrossVersionObjectReference) String() string { }, "") return s } +func (this *ExternalMetricSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExternalMetricSource{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `TargetValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, + `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ExternalMetricStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExternalMetricStatus{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `CurrentAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, + `}`, + }, "") + return s +} func (this *HorizontalPodAutoscaler) String() string { if this == nil { return "nil" @@ -1154,6 +1360,7 @@ func (this *MetricSpec) String() string { `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`, `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`, `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`, + `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricSource", "ExternalMetricSource", 1) + `,`, `}`, }, "") return s @@ -1167,6 +1374,7 @@ func (this *MetricStatus) String() string { `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`, `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`, `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`, + `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricStatus", "ExternalMetricStatus", 1) + `,`, `}`, }, "") return s @@ -1419,7 +1627,7 @@ func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { +func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1442,15 +1650,44 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") + return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1474,13 +1711,16 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.MetricSelector == nil { + m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} + } + if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1504,13 +1744,16 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.TargetValue == nil { + m.TargetValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1534,7 +1777,10 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.TargetAverageValue == nil { + m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1559,7 +1805,7 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { } return nil } -func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { +func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1582,15 +1828,15 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group") + return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1615,13 +1861,13 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex]) + m.MetricName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1631,24 +1877,28 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) + if m.MetricSelector == nil { + m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} + } + if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1672,15 +1922,15 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1690,24 +1940,335 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Reason = string(dAtA[iNdEx:postIndex]) + if m.CurrentAverageValue == nil { + m.CurrentAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscaler) 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 ErrIntOverflowGenerated + } + 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: HorizontalPodAutoscaler: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscalerCondition) 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 ErrIntOverflowGenerated + } + 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: HorizontalPodAutoscalerCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2323,6 +2884,39 @@ func (m *MetricSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field External", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.External == nil { + m.External = &ExternalMetricSource{} + } + if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2501,6 +3095,39 @@ func (m *MetricStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field External", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.External == nil { + m.External = &ExternalMetricStatus{} + } + if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3696,91 +4323,97 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1370 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4d, 0x6f, 0x13, 0xc7, - 0x1b, 0x8f, 0x5f, 0x12, 0xc2, 0x38, 0x10, 0xfe, 0x03, 0x02, 0x13, 0xfe, 0x78, 0xa3, 0x2d, 0x42, - 0xf4, 0x85, 0xdd, 0xc6, 0xa5, 0x88, 0x1e, 0x63, 0x57, 0x14, 0xd4, 0x04, 0xc2, 0x60, 0x28, 0x7d, - 0x51, 0xc5, 0x64, 0x77, 0x70, 0x86, 0x78, 0x5f, 0x34, 0x33, 0xb6, 0x1a, 0xa4, 0x4a, 0xed, 0xa1, - 0xe7, 0x56, 0x95, 0xfa, 0x31, 0x7a, 0xe6, 0x50, 0xf5, 0xd0, 0x4a, 0x95, 0x38, 0x72, 0xe8, 0x81, - 0x93, 0x55, 0xb6, 0xc7, 0x7e, 0x03, 0x4e, 0xd5, 0xcc, 0x8e, 0xd7, 0xbb, 0xb6, 0xd7, 0x21, 0x21, - 0x42, 0xbd, 0xed, 0xce, 0xfc, 0x9e, 0xdf, 0xf3, 0x3a, 0xcf, 0x3c, 0x03, 0x1a, 0xdb, 0x57, 0xb8, - 0x45, 0x03, 0x7b, 0xbb, 0xbb, 0x49, 0x98, 0x4f, 0x04, 0xe1, 0x76, 0x8f, 0xf8, 0x6e, 0xc0, 0x6c, - 0xbd, 0x81, 0x43, 0x6a, 0xe3, 0xae, 0x08, 0xb8, 0x83, 0x3b, 0xd4, 0x6f, 0xdb, 0xbd, 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0x48, 0xed, 0xc0, 0x3a, 0x00, 0x38, 0xa4, 0x5a, 0x41, 0xb5, 0xa4, 0x70, - 0x50, 0xe3, 0xc0, 0xea, 0xc6, 0x75, 0xbd, 0x83, 0x52, 0x28, 0xf3, 0x71, 0x11, 0x9c, 0xba, 0x16, - 0x30, 0xfa, 0x28, 0xf0, 0x05, 0xee, 0x6c, 0x04, 0xee, 0xaa, 0x2e, 0x0a, 0xc2, 0xe0, 0x7d, 0x30, - 0x2f, 0x83, 0xed, 0x62, 0x81, 0x95, 0x5d, 0x95, 0xfa, 0xbb, 0xd6, 0xb0, 0x7c, 0x12, 0xdf, 0xad, - 0x70, 0xbb, 0x2d, 0x17, 0xb8, 0x25, 0xd1, 0x56, 0x6f, 0xc5, 0x8a, 0x9d, 0x5b, 0x27, 0x02, 0x0f, - 0xf5, 0x0f, 0xd7, 0x50, 0xc2, 0x0a, 0xef, 0x81, 0x32, 0x0f, 0x89, 0xa3, 0x7c, 0xaa, 0xd4, 0x2f, - 0x5b, 0xb9, 0xc5, 0x69, 0xe5, 0xd8, 0x78, 0x3b, 0x24, 0xce, 0x30, 0x16, 0xf2, 0x0f, 0x29, 0x46, - 0x78, 0x1f, 0xcc, 0x71, 0x81, 0x45, 0x97, 0xab, 0x38, 0x54, 0xea, 0x57, 0xf6, 0xc1, 0xad, 0xe4, - 0x1b, 0x47, 0x35, 0xfb, 0x5c, 0xfc, 0x8f, 0x34, 0xaf, 0xf9, 0x5d, 0x09, 0x2c, 0xe7, 0x48, 0x36, - 0x03, 0xdf, 0xa5, 0x82, 0x06, 0x3e, 0xbc, 0x06, 0xca, 0x62, 0x27, 0x24, 0x3a, 0xad, 0x97, 0x06, - 0x86, 0xb6, 0x76, 0x42, 0xf2, 0xa2, 0x6f, 0x9c, 0xdb, 0x4d, 0x5e, 0xe2, 0x90, 0x62, 0x80, 0x6b, - 0x89, 0x43, 0xc5, 0x0c, 0x97, 0x36, 0xeb, 0x45, 0xdf, 0x98, 0x70, 0x20, 0xad, 0x84, 0x29, 0x6b, - 0x3c, 0xec, 0x01, 0xd8, 0xc1, 0x5c, 0xb4, 0x18, 0xf6, 0x79, 0xac, 0x89, 0x7a, 0x44, 0x87, 0xea, - 0xad, 0x97, 0x4b, 0xb2, 0x94, 0x68, 0x2c, 0x69, 0x2b, 0xe0, 0xda, 0x18, 0x1b, 0x9a, 0xa0, 0x01, - 0x9e, 0x07, 0x73, 0x8c, 0x60, 0x1e, 0xf8, 0xd5, 0xb2, 0xf2, 0x22, 0x09, 0x2e, 0x52, 0xab, 0x48, - 0xef, 0xc2, 0x37, 0xc1, 0x21, 0x8f, 0x70, 0x8e, 0xdb, 0xa4, 0x3a, 0xab, 0x80, 0x8b, 0x1a, 0x78, - 0x68, 0x3d, 0x5e, 0x46, 0x83, 0x7d, 0xf3, 0xcf, 0x02, 0x38, 0x93, 0x13, 0xc7, 0x35, 0xca, 0x05, - 0xfc, 0x62, 0xac, 0x8a, 0xad, 0x97, 0x73, 0x50, 0x4a, 0xab, 0x1a, 0x3e, 0xa6, 0x75, 0xcf, 0x0f, - 0x56, 0x52, 0x15, 0xfc, 0x09, 0x98, 0xa5, 0x82, 0x78, 0x32, 0x2b, 0xa5, 0x0b, 0x95, 0x7a, 0x7d, - 0xef, 0x65, 0xd6, 0x38, 0xa2, 0xe9, 0x67, 0xaf, 0x4b, 0x22, 0x14, 0xf3, 0x99, 0xff, 0x14, 0x73, - 0xdd, 0x92, 0x65, 0x0e, 0x7b, 0xe0, 0xa8, 0xfa, 0x6b, 0x61, 0xd6, 0x26, 0xb2, 0x91, 0x68, 0xe7, - 0xa6, 0x1d, 0xa2, 0x29, 0x0d, 0xa8, 0x71, 0x52, 0x5b, 0x71, 0xf4, 0x76, 0x86, 0x15, 0x8d, 0x68, - 0x81, 0x2b, 0xa0, 0xe2, 0x51, 0x1f, 0x91, 0xb0, 0x43, 0x1d, 0x1c, 0x17, 0xe3, 0x6c, 0x63, 0x31, - 0xea, 0x1b, 0x95, 0xf5, 0xe1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, 0xdb, 0x22, 0x98, 0x55, 0xe3, 0xd9, 0x6b, 0x78, 0x54, 0x5f, - 0xcd, 0x3c, 0xaa, 0xcf, 0x4d, 0x69, 0xaf, 0xca, 0xa2, 0xdc, 0x27, 0xf4, 0x8d, 0x91, 0x27, 0xf4, - 0xf9, 0x5d, 0x99, 0xa6, 0x3f, 0x98, 0x3f, 0x00, 0x87, 0x13, 0x85, 0xf0, 0x1d, 0x79, 0x13, 0xeb, - 0xb9, 0xb2, 0xa0, 0x72, 0x9b, 0xbc, 0xb2, 0x92, 0x81, 0x32, 0x41, 0x98, 0x14, 0x54, 0x52, 0x1a, - 0xf6, 0x26, 0x2c, 0xd1, 0x9c, 0x74, 0x88, 0x23, 0x02, 0xa6, 0xaf, 0x83, 0x04, 0x7d, 0x5b, 0xaf, - 0xa3, 0x04, 0xd1, 0xb8, 0xf0, 0xe4, 0x79, 0x6d, 0xe6, 0xe9, 0xf3, 0xda, 0xcc, 0xb3, 0xe7, 0xb5, - 0x99, 0x6f, 0xa2, 0x5a, 0xe1, 0x49, 0x54, 0x2b, 0x3c, 0x8d, 0x6a, 0x85, 0x67, 0x51, 0xad, 0xf0, - 0x57, 0x54, 0x2b, 0xfc, 0xf0, 0x77, 0x6d, 0xe6, 0xb3, 0x62, 0x6f, 0xe5, 0xdf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x45, 0xeb, 0xd1, 0x70, 0x8f, 0x13, 0x00, 0x00, + // 1471 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x6f, 0x14, 0xc7, + 0x13, 0xf7, 0x3e, 0x6c, 0xec, 0x5e, 0x63, 0xf3, 0x6f, 0x10, 0x18, 0xf3, 0x67, 0xc7, 0x9a, 0x20, + 0x44, 0x1e, 0xcc, 0xc6, 0x0e, 0x41, 0xe4, 0xe8, 0xdd, 0x84, 0x80, 0xe2, 0x05, 0xd3,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4, 0xfc, 0x8a, 0x43, 0x38, 0x4e, 0xd3, 0x55, 0xc9, 0x92, 0x62, 0x1d, 0x97, + 0x53, 0x67, 0x58, 0xcd, 0xe5, 0x9d, 0x04, 0x7c, 0x7b, 0x93, 0x38, 0x78, 0x50, 0xce, 0xfc, 0x21, + 0x07, 0xce, 0xd4, 0x98, 0xe7, 0xfb, 0x77, 0x08, 0xf3, 0xa9, 0xe7, 0xde, 0xdc, 0x78, 0x40, 0x6c, + 0x8e, 0xc8, 0x7d, 0xc2, 0x88, 0x6b, 0x13, 0xb8, 0x00, 0x8a, 0x5b, 0xd4, 0x6d, 0xcc, 0xe5, 0x16, + 0x72, 0x17, 0xa6, 0xaa, 0xd3, 0x4f, 0x02, 0x63, 0x2c, 0x0c, 0x8c, 0xe2, 0x47, 0xd4, 0x6d, 0x20, + 0x49, 0x11, 0x1c, 0x2e, 0x76, 0xc8, 0x5c, 0x3e, 0xc9, 0x71, 0x03, 0x3b, 0x04, 0x49, 0x0a, 0x5c, + 0x02, 0x00, 0xb7, 0xa9, 0x56, 0x30, 0x57, 0x90, 0x7c, 0x50, 0xf3, 0x81, 0xe5, 0xd5, 0xeb, 0x9a, + 0x82, 0x62, 0x5c, 0xe6, 0x8f, 0x05, 0x70, 0xe2, 0x83, 0x87, 0x9c, 0x30, 0x17, 0xb7, 0xea, 0x84, + 0x33, 0x6a, 0xaf, 0x49, 0xfb, 0x0a, 0x30, 0x47, 0xae, 0x85, 0x02, 0xbd, 0xad, 0x08, 0xac, 0x1e, + 0x51, 0x50, 0x8c, 0x0b, 0x7a, 0x60, 0x46, 0xad, 0xd6, 0x48, 0x8b, 0xd8, 0xdc, 0x63, 0x72, 0xb3, + 0xa5, 0xa5, 0x77, 0xac, 0x7e, 0x00, 0x45, 0x56, 0xb3, 0xda, 0x5b, 0x4d, 0xf1, 0xc3, 0xb7, 0x84, + 0x73, 0xac, 0xee, 0xa2, 0xb5, 0x82, 0x37, 0x48, 0xab, 0x27, 0x5a, 0x85,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x4b, 0xf7, 0xbf, 0x30, 0x30, 0x8e, 0xae, 0xc4, 0x41, 0x50, 0x12, 0x13, 0x2e, 0x83, 0x59, + 0x9d, 0xec, 0x07, 0xac, 0x7e, 0x4a, 0x5b, 0x7d, 0xb6, 0x96, 0x24, 0xa3, 0x41, 0x7e, 0x01, 0xd1, + 0x20, 0x3e, 0x65, 0xa4, 0x11, 0x41, 0x14, 0x93, 0x10, 0xef, 0x27, 0xc9, 0x68, 0x90, 0x1f, 0x3a, + 0xc0, 0xd0, 0xa8, 0x99, 0x1e, 0x1c, 0x97, 0x90, 0xaf, 0x85, 0x81, 0x61, 0xd4, 0x46, 0xb3, 0xa2, + 0x9d, 0xb0, 0x44, 0x1b, 0xa8, 0x7b, 0x07, 0x79, 0x41, 0x2e, 0x25, 0x52, 0xef, 0xc2, 0x40, 0xea, + 0x3d, 0x16, 0x6f, 0x14, 0x63, 0x69, 0xf6, 0x16, 0x98, 0xf0, 0xe4, 0xcd, 0xd0, 0x7e, 0xb9, 0x38, + 0xe2, 0x3a, 0x45, 0x25, 0x2d, 0x02, 0xaa, 0x02, 0x91, 0xcb, 0xf4, 0xd5, 0xd2, 0x40, 0xf0, 0x3a, + 0x28, 0xb6, 0xbd, 0x46, 0xaf, 0x10, 0xbd, 0x39, 0x02, 0x70, 0xd5, 0x6b, 0xf8, 0x09, 0xb8, 0x49, + 0xb1, 0x63, 0xf1, 0x17, 0x49, 0x08, 0xf8, 0x09, 0x98, 0xec, 0x15, 0x7c, 0xdd, 0x1d, 0x54, 0x46, + 0xc0, 0x21, 0xcd, 0x9a, 0x80, 0x9c, 0x16, 0x89, 0xac, 0x47, 0x41, 0x11, 0x9c, 0x80, 0x26, 0xba, + 0x55, 0x93, 0x5e, 0x19, 0x0d, 0x9d, 0xd6, 0x6e, 0x2b, 0xe8, 0x1e, 0x05, 0x45, 0x70, 0xe6, 0x4f, + 0x05, 0x30, 0x9d, 0x68, 0xff, 0x0e, 0xd9, 0x35, 0xaa, 0x8e, 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xc3, + 0xc0, 0x38, 0x5d, 0xcb, 0x62, 0x42, 0xd9, 0xf2, 0x59, 0x91, 0x56, 0x38, 0xa4, 0x48, 0xfb, 0x3a, + 0x0f, 0xc6, 0x65, 0x53, 0x79, 0x08, 0x4f, 0x01, 0x57, 0x13, 0x4f, 0x01, 0xe7, 0x46, 0xa4, 0x57, + 0xb9, 0xa3, 0xcc, 0xc1, 0xff, 0xc6, 0xc0, 0xe0, 0x7f, 0x7e, 0x47, 0xa4, 0xd1, 0x63, 0xfe, 0x7b, + 0x60, 0x2a, 0x52, 0x08, 0xdf, 0x12, 0x45, 0x5e, 0x77, 0xc3, 0x39, 0xe9, 0xdb, 0x68, 0x36, 0x8c, + 0xda, 0xe0, 0x88, 0xc3, 0xa4, 0xa0, 0x14, 0xd3, 0xb0, 0x37, 0x61, 0xc1, 0xed, 0xc7, 0x1f, 0xba, + 0xa6, 0xfa, 0xdc, 0xd1, 0x8b, 0x55, 0xc4, 0x51, 0xbd, 0xf0, 0xe4, 0x79, 0x79, 0xec, 0xe9, 0xf3, + 0xf2, 0xd8, 0xb3, 0xe7, 0xe5, 0xb1, 0xaf, 0xc2, 0x72, 0xee, 0x49, 0x58, 0xce, 0x3d, 0x0d, 0xcb, + 0xb9, 0x67, 0x61, 0x39, 0xf7, 0x67, 0x58, 0xce, 0x7d, 0xf7, 0x57, 0x79, 0xec, 0xd3, 0x7c, 0x77, + 0xf1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x5f, 0x69, 0x0c, 0x4c, 0x17, 0x00, 0x00, } diff --git a/deps/k8s.io/api/autoscaling/v1/generated.proto b/deps/k8s.io/api/autoscaling/v1/generated.proto index 33eecf4de..a3c542de2 100644 --- a/deps/k8s.io/api/autoscaling/v1/generated.proto +++ b/deps/k8s.io/api/autoscaling/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; @@ -44,6 +43,49 @@ message CrossVersionObjectReference { optional string apiVersion = 3; } +// ExternalMetricSource indicates how to scale on a metric not associated with +// any Kubernetes object (for example length of queue in cloud +// messaging service, or QPS from loadbalancer running outside of cluster). +message ExternalMetricSource { + // metricName is the name of the metric in question. + optional string metricName = 1; + + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2; + + // targetValue is the target value of the metric (as a quantity). + // Mutually exclusive with TargetAverageValue. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; + + // targetAverageValue is the target per-pod value of global metric (as a quantity). + // Mutually exclusive with TargetValue. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4; +} + +// ExternalMetricStatus indicates the current value of a global metric +// not associated with any Kubernetes object. +message ExternalMetricStatus { + // metricName is the name of a metric used for autoscaling in + // metric system. + optional string metricName = 1; + + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2; + + // currentValue is the current value of the metric (as a quantity) + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; + + // currentAverageValue is the current value of metric averaged over autoscaled pods. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4; +} + // configuration of a horizontal pod autoscaler. message HorizontalPodAutoscaler { // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata @@ -160,6 +202,14 @@ message MetricSpec { // to normal per-pod metrics using the "pods" source. // +optional optional ResourceMetricSource resource = 4; + + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + optional ExternalMetricSource external = 5; } // MetricStatus describes the last-read state of a single metric. @@ -186,6 +236,14 @@ message MetricStatus { // to normal per-pod metrics using the "pods" source. // +optional optional ResourceMetricStatus resource = 4; + + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + optional ExternalMetricStatus external = 5; } // ObjectMetricSource indicates how to scale on a metric describing a diff --git a/deps/k8s.io/api/autoscaling/v1/types.go b/deps/k8s.io/api/autoscaling/v1/types.go index eeadaf884..344af774f 100644 --- a/deps/k8s.io/api/autoscaling/v1/types.go +++ b/deps/k8s.io/api/autoscaling/v1/types.go @@ -161,6 +161,12 @@ var ( // Kubernetes, and have special scaling options on top of those available // to normal per-pod metrics (the "pods" source). ResourceMetricSourceType MetricSourceType = "Resource" + // ExternalMetricSourceType is a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + ExternalMetricSourceType MetricSourceType = "External" ) // MetricSpec specifies how to scale based on a single metric @@ -186,6 +192,13 @@ type MetricSpec struct { // to normal per-pod metrics using the "pods" source. // +optional Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + External *ExternalMetricSource `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"` } // ObjectMetricSource indicates how to scale on a metric describing a @@ -234,6 +247,26 @@ type ResourceMetricSource struct { TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"` } +// ExternalMetricSource indicates how to scale on a metric not associated with +// any Kubernetes object (for example length of queue in cloud +// messaging service, or QPS from loadbalancer running outside of cluster). +type ExternalMetricSource struct { + // metricName is the name of the metric in question. + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"` + // targetValue is the target value of the metric (as a quantity). + // Mutually exclusive with TargetAverageValue. + // +optional + TargetValue *resource.Quantity `json:"targetValue,omitempty" protobuf:"bytes,3,opt,name=targetValue"` + // targetAverageValue is the target per-pod value of global metric (as a quantity). + // Mutually exclusive with TargetValue. + // +optional + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,4,opt,name=targetAverageValue"` +} + // MetricStatus describes the last-read state of a single metric. type MetricStatus struct { // type is the type of metric source. It will be one of "Object", @@ -256,6 +289,13 @@ type MetricStatus struct { // to normal per-pod metrics using the "pods" source. // +optional Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + External *ExternalMetricStatus `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"` } // HorizontalPodAutoscalerConditionType are the valid conditions of @@ -337,3 +377,20 @@ type ResourceMetricStatus struct { // It will always be set, regardless of the corresponding metric specification. CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"` } + +// ExternalMetricStatus indicates the current value of a global metric +// not associated with any Kubernetes object. +type ExternalMetricStatus struct { + // metricName is the name of a metric used for autoscaling in + // metric system. + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"` + // currentValue is the current value of the metric (as a quantity) + CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"` + // currentAverageValue is the current value of metric averaged over autoscaled pods. + // +optional + CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty" protobuf:"bytes,4,opt,name=currentAverageValue"` +} diff --git a/deps/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go index 5506b76f3..e84909269 100644 --- a/deps/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/autoscaling/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CrossVersionObjectReference = map[string]string{ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", @@ -38,6 +38,30 @@ func (CrossVersionObjectReference) SwaggerDoc() map[string]string { return map_CrossVersionObjectReference } +var map_ExternalMetricSource = map[string]string{ + "": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", + "metricName": "metricName is the name of the metric in question.", + "metricSelector": "metricSelector is used to identify a specific time series within a given metric.", + "targetValue": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", + "targetAverageValue": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", +} + +func (ExternalMetricSource) SwaggerDoc() map[string]string { + return map_ExternalMetricSource +} + +var map_ExternalMetricStatus = map[string]string{ + "": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + "metricName": "metricName is the name of a metric used for autoscaling in metric system.", + "metricSelector": "metricSelector is used to identify a specific time series within a given metric.", + "currentValue": "currentValue is the current value of the metric (as a quantity)", + "currentAverageValue": "currentAverageValue is the current value of metric averaged over autoscaled pods.", +} + +func (ExternalMetricStatus) SwaggerDoc() map[string]string { + return map_ExternalMetricStatus +} + var map_HorizontalPodAutoscaler = map[string]string{ "": "configuration of a horizontal pod autoscaler.", "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -103,6 +127,7 @@ var map_MetricSpec = map[string]string{ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } func (MetricSpec) SwaggerDoc() map[string]string { @@ -115,6 +140,7 @@ var map_MetricStatus = map[string]string{ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } func (MetricStatus) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go index 3622cf450..6bafc0887 100644 --- a/deps/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/autoscaling/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - resource "k8s.io/apimachinery/pkg/api/resource" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -42,6 +41,64 @@ func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) { + *out = *in + if in.MetricSelector != nil { + in, out := &in.MetricSelector, &out.MetricSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.TargetValue != nil { + in, out := &in.TargetValue, &out.TargetValue + x := (*in).DeepCopy() + *out = &x + } + if in.TargetAverageValue != nil { + in, out := &in.TargetAverageValue, &out.TargetAverageValue + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricSource. +func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource { + if in == nil { + return nil + } + out := new(ExternalMetricSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) { + *out = *in + if in.MetricSelector != nil { + in, out := &in.MetricSelector, &out.MetricSelector + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) + } + out.CurrentValue = in.CurrentValue.DeepCopy() + if in.CurrentAverageValue != nil { + in, out := &in.CurrentAverageValue, &out.CurrentAverageValue + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricStatus. +func (in *ExternalMetricStatus) DeepCopy() *ExternalMetricStatus { + if in == nil { + return nil + } + out := new(ExternalMetricStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HorizontalPodAutoscaler) DeepCopyInto(out *HorizontalPodAutoscaler) { *out = *in @@ -66,9 +123,8 @@ func (in *HorizontalPodAutoscaler) DeepCopy() *HorizontalPodAutoscaler { func (in *HorizontalPodAutoscaler) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -117,9 +173,8 @@ func (in *HorizontalPodAutoscalerList) DeepCopy() *HorizontalPodAutoscalerList { func (in *HorizontalPodAutoscalerList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -128,21 +183,13 @@ func (in *HorizontalPodAutoscalerSpec) DeepCopyInto(out *HorizontalPodAutoscaler out.ScaleTargetRef = in.ScaleTargetRef if in.MinReplicas != nil { in, out := &in.MinReplicas, &out.MinReplicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.TargetCPUUtilizationPercentage != nil { in, out := &in.TargetCPUUtilizationPercentage, &out.TargetCPUUtilizationPercentage - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -162,30 +209,17 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopyInto(out *HorizontalPodAutoscal *out = *in if in.ObservedGeneration != nil { in, out := &in.ObservedGeneration, &out.ObservedGeneration - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.LastScaleTime != nil { in, out := &in.LastScaleTime, &out.LastScaleTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.CurrentCPUUtilizationPercentage != nil { in, out := &in.CurrentCPUUtilizationPercentage, &out.CurrentCPUUtilizationPercentage - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -205,30 +239,23 @@ func (in *MetricSpec) DeepCopyInto(out *MetricSpec) { *out = *in if in.Object != nil { in, out := &in.Object, &out.Object - if *in == nil { - *out = nil - } else { - *out = new(ObjectMetricSource) - (*in).DeepCopyInto(*out) - } + *out = new(ObjectMetricSource) + (*in).DeepCopyInto(*out) } if in.Pods != nil { in, out := &in.Pods, &out.Pods - if *in == nil { - *out = nil - } else { - *out = new(PodsMetricSource) - (*in).DeepCopyInto(*out) - } + *out = new(PodsMetricSource) + (*in).DeepCopyInto(*out) } if in.Resource != nil { in, out := &in.Resource, &out.Resource - if *in == nil { - *out = nil - } else { - *out = new(ResourceMetricSource) - (*in).DeepCopyInto(*out) - } + *out = new(ResourceMetricSource) + (*in).DeepCopyInto(*out) + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(ExternalMetricSource) + (*in).DeepCopyInto(*out) } return } @@ -248,30 +275,23 @@ func (in *MetricStatus) DeepCopyInto(out *MetricStatus) { *out = *in if in.Object != nil { in, out := &in.Object, &out.Object - if *in == nil { - *out = nil - } else { - *out = new(ObjectMetricStatus) - (*in).DeepCopyInto(*out) - } + *out = new(ObjectMetricStatus) + (*in).DeepCopyInto(*out) } if in.Pods != nil { in, out := &in.Pods, &out.Pods - if *in == nil { - *out = nil - } else { - *out = new(PodsMetricStatus) - (*in).DeepCopyInto(*out) - } + *out = new(PodsMetricStatus) + (*in).DeepCopyInto(*out) } if in.Resource != nil { in, out := &in.Resource, &out.Resource - if *in == nil { - *out = nil - } else { - *out = new(ResourceMetricStatus) - (*in).DeepCopyInto(*out) - } + *out = new(ResourceMetricStatus) + (*in).DeepCopyInto(*out) + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(ExternalMetricStatus) + (*in).DeepCopyInto(*out) } return } @@ -361,21 +381,13 @@ func (in *ResourceMetricSource) DeepCopyInto(out *ResourceMetricSource) { *out = *in if in.TargetAverageUtilization != nil { in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.TargetAverageValue != nil { in, out := &in.TargetAverageValue, &out.TargetAverageValue - if *in == nil { - *out = nil - } else { - *out = new(resource.Quantity) - **out = (*in).DeepCopy() - } + x := (*in).DeepCopy() + *out = &x } return } @@ -395,12 +407,8 @@ func (in *ResourceMetricStatus) DeepCopyInto(out *ResourceMetricStatus) { *out = *in if in.CurrentAverageUtilization != nil { in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() return @@ -440,9 +448,8 @@ func (in *Scale) DeepCopy() *Scale { func (in *Scale) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/autoscaling/v2beta1/BUILD b/deps/k8s.io/api/autoscaling/v2beta1/BUILD deleted file mode 100644 index 32fc333eb..000000000 --- a/deps/k8s.io/api/autoscaling/v2beta1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/autoscaling/v2beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/autoscaling/v2beta1/generated.pb.go b/deps/k8s.io/api/autoscaling/v2beta1/generated.pb.go index 908c049ed..33f67913a 100644 --- a/deps/k8s.io/api/autoscaling/v2beta1/generated.pb.go +++ b/deps/k8s.io/api/autoscaling/v2beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,6 +26,8 @@ limitations under the License. It has these top-level messages: CrossVersionObjectReference + ExternalMetricSource + ExternalMetricStatus HorizontalPodAutoscaler HorizontalPodAutoscalerCondition HorizontalPodAutoscalerList @@ -73,68 +75,78 @@ func (*CrossVersionObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } +func (m *ExternalMetricSource) Reset() { *m = ExternalMetricSource{} } +func (*ExternalMetricSource) ProtoMessage() {} +func (*ExternalMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *ExternalMetricStatus) Reset() { *m = ExternalMetricStatus{} } +func (*ExternalMetricStatus) ProtoMessage() {} +func (*ExternalMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + func (m *HorizontalPodAutoscaler) Reset() { *m = HorizontalPodAutoscaler{} } func (*HorizontalPodAutoscaler) ProtoMessage() {} -func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (*HorizontalPodAutoscaler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } func (m *HorizontalPodAutoscalerCondition) Reset() { *m = HorizontalPodAutoscalerCondition{} } func (*HorizontalPodAutoscalerCondition) ProtoMessage() {} func (*HorizontalPodAutoscalerCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} + return fileDescriptorGenerated, []int{4} } func (m *HorizontalPodAutoscalerList) Reset() { *m = HorizontalPodAutoscalerList{} } func (*HorizontalPodAutoscalerList) ProtoMessage() {} func (*HorizontalPodAutoscalerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} + return fileDescriptorGenerated, []int{5} } func (m *HorizontalPodAutoscalerSpec) Reset() { *m = HorizontalPodAutoscalerSpec{} } func (*HorizontalPodAutoscalerSpec) ProtoMessage() {} func (*HorizontalPodAutoscalerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{4} + return fileDescriptorGenerated, []int{6} } func (m *HorizontalPodAutoscalerStatus) Reset() { *m = HorizontalPodAutoscalerStatus{} } func (*HorizontalPodAutoscalerStatus) ProtoMessage() {} func (*HorizontalPodAutoscalerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{5} + return fileDescriptorGenerated, []int{7} } func (m *MetricSpec) Reset() { *m = MetricSpec{} } func (*MetricSpec) ProtoMessage() {} -func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*MetricSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *MetricStatus) Reset() { *m = MetricStatus{} } func (*MetricStatus) ProtoMessage() {} -func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*MetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *ObjectMetricSource) Reset() { *m = ObjectMetricSource{} } func (*ObjectMetricSource) ProtoMessage() {} -func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*ObjectMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *ObjectMetricStatus) Reset() { *m = ObjectMetricStatus{} } func (*ObjectMetricStatus) ProtoMessage() {} -func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*ObjectMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *PodsMetricSource) Reset() { *m = PodsMetricSource{} } func (*PodsMetricSource) ProtoMessage() {} -func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*PodsMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *PodsMetricStatus) Reset() { *m = PodsMetricStatus{} } func (*PodsMetricStatus) ProtoMessage() {} -func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*PodsMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *ResourceMetricSource) Reset() { *m = ResourceMetricSource{} } func (*ResourceMetricSource) ProtoMessage() {} -func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*ResourceMetricSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *ResourceMetricStatus) Reset() { *m = ResourceMetricStatus{} } func (*ResourceMetricStatus) ProtoMessage() {} -func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*ResourceMetricStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func init() { proto.RegisterType((*CrossVersionObjectReference)(nil), "k8s.io.api.autoscaling.v2beta1.CrossVersionObjectReference") + proto.RegisterType((*ExternalMetricSource)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricSource") + proto.RegisterType((*ExternalMetricStatus)(nil), "k8s.io.api.autoscaling.v2beta1.ExternalMetricStatus") proto.RegisterType((*HorizontalPodAutoscaler)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscaler") proto.RegisterType((*HorizontalPodAutoscalerCondition)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition") proto.RegisterType((*HorizontalPodAutoscalerList)(nil), "k8s.io.api.autoscaling.v2beta1.HorizontalPodAutoscalerList") @@ -179,6 +191,108 @@ func (m *CrossVersionObjectReference) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ExternalMetricSource) 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 *ExternalMetricSource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) + i += copy(dAtA[i:], m.MetricName) + if m.MetricSelector != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size())) + n1, err := m.MetricSelector.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.TargetValue != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size())) + n2, err := m.TargetValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.TargetAverageValue != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size())) + n3, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} + +func (m *ExternalMetricStatus) 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 *ExternalMetricStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) + i += copy(dAtA[i:], m.MetricName) + if m.MetricSelector != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.MetricSelector.Size())) + n4, err := m.MetricSelector.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size())) + n5, err := m.CurrentValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if m.CurrentAverageValue != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size())) + n6, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + func (m *HorizontalPodAutoscaler) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -197,27 +311,27 @@ func (m *HorizontalPodAutoscaler) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n7, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n1 + i += n7 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n2, err := m.Spec.MarshalTo(dAtA[i:]) + n8, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n2 + i += n8 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n3, err := m.Status.MarshalTo(dAtA[i:]) + n9, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n3 + i += n9 return i, nil } @@ -247,11 +361,11 @@ func (m *HorizontalPodAutoscalerCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n4, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n10, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n4 + i += n10 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -281,11 +395,11 @@ func (m *HorizontalPodAutoscalerList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n5, err := m.ListMeta.MarshalTo(dAtA[i:]) + n11, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n5 + i += n11 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -319,11 +433,11 @@ func (m *HorizontalPodAutoscalerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleTargetRef.Size())) - n6, err := m.ScaleTargetRef.MarshalTo(dAtA[i:]) + n12, err := m.ScaleTargetRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n12 if m.MinReplicas != nil { dAtA[i] = 0x10 i++ @@ -371,11 +485,11 @@ func (m *HorizontalPodAutoscalerStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastScaleTime.Size())) - n7, err := m.LastScaleTime.MarshalTo(dAtA[i:]) + n13, err := m.LastScaleTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n13 } dAtA[i] = 0x18 i++ @@ -433,31 +547,41 @@ func (m *MetricSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size())) - n8, err := m.Object.MarshalTo(dAtA[i:]) + n14, err := m.Object.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n14 } if m.Pods != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size())) - n9, err := m.Pods.MarshalTo(dAtA[i:]) + n15, err := m.Pods.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n15 } if m.Resource != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size())) - n10, err := m.Resource.MarshalTo(dAtA[i:]) + n16, err := m.Resource.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if m.External != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size())) + n17, err := m.External.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n17 } return i, nil } @@ -485,31 +609,41 @@ func (m *MetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Object.Size())) - n11, err := m.Object.MarshalTo(dAtA[i:]) + n18, err := m.Object.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n18 } if m.Pods != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Pods.Size())) - n12, err := m.Pods.MarshalTo(dAtA[i:]) + n19, err := m.Pods.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n19 } if m.Resource != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size())) - n13, err := m.Resource.MarshalTo(dAtA[i:]) + n20, err := m.Resource.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n20 + } + if m.External != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.External.Size())) + n21, err := m.External.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 } return i, nil } @@ -532,11 +666,11 @@ func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size())) - n14, err := m.Target.MarshalTo(dAtA[i:]) + n22, err := m.Target.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n22 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) @@ -544,11 +678,11 @@ func (m *ObjectMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetValue.Size())) - n15, err := m.TargetValue.MarshalTo(dAtA[i:]) + n23, err := m.TargetValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n23 return i, nil } @@ -570,11 +704,11 @@ func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Target.Size())) - n16, err := m.Target.MarshalTo(dAtA[i:]) + n24, err := m.Target.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n24 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MetricName))) @@ -582,11 +716,11 @@ func (m *ObjectMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentValue.Size())) - n17, err := m.CurrentValue.MarshalTo(dAtA[i:]) + n25, err := m.CurrentValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n25 return i, nil } @@ -612,11 +746,11 @@ func (m *PodsMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size())) - n18, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) + n26, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n26 return i, nil } @@ -642,11 +776,11 @@ func (m *PodsMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size())) - n19, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) + n27, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n27 return i, nil } @@ -678,11 +812,11 @@ func (m *ResourceMetricSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetAverageValue.Size())) - n20, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) + n28, err := m.TargetAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n28 } return i, nil } @@ -714,11 +848,11 @@ func (m *ResourceMetricStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentAverageValue.Size())) - n21, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) + n29, err := m.CurrentAverageValue.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n29 return i, nil } @@ -761,6 +895,44 @@ func (m *CrossVersionObjectReference) Size() (n int) { return n } +func (m *ExternalMetricSource) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + if m.MetricSelector != nil { + l = m.MetricSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.TargetValue != nil { + l = m.TargetValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.TargetAverageValue != nil { + l = m.TargetAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *ExternalMetricStatus) Size() (n int) { + var l int + _ = l + l = len(m.MetricName) + n += 1 + l + sovGenerated(uint64(l)) + if m.MetricSelector != nil { + l = m.MetricSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.CurrentValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.CurrentAverageValue != nil { + l = m.CurrentAverageValue.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *HorizontalPodAutoscaler) Size() (n int) { var l int _ = l @@ -865,6 +1037,10 @@ func (m *MetricSpec) Size() (n int) { l = m.Resource.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.External != nil { + l = m.External.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -885,6 +1061,10 @@ func (m *MetricStatus) Size() (n int) { l = m.Resource.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.External != nil { + l = m.External.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -985,6 +1165,32 @@ func (this *CrossVersionObjectReference) String() string { }, "") return s } +func (this *ExternalMetricSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExternalMetricSource{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `TargetValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, + `TargetAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.TargetAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ExternalMetricStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExternalMetricStatus{`, + `MetricName:` + fmt.Sprintf("%v", this.MetricName) + `,`, + `MetricSelector:` + strings.Replace(fmt.Sprintf("%v", this.MetricSelector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `CurrentValue:` + strings.Replace(strings.Replace(this.CurrentValue.String(), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1), `&`, ``, 1) + `,`, + `CurrentAverageValue:` + strings.Replace(fmt.Sprintf("%v", this.CurrentAverageValue), "Quantity", "k8s_io_apimachinery_pkg_api_resource.Quantity", 1) + `,`, + `}`, + }, "") + return s +} func (this *HorizontalPodAutoscaler) String() string { if this == nil { return "nil" @@ -1059,6 +1265,7 @@ func (this *MetricSpec) String() string { `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricSource", "ObjectMetricSource", 1) + `,`, `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricSource", "PodsMetricSource", 1) + `,`, `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricSource", "ResourceMetricSource", 1) + `,`, + `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricSource", "ExternalMetricSource", 1) + `,`, `}`, }, "") return s @@ -1072,6 +1279,7 @@ func (this *MetricStatus) String() string { `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "ObjectMetricStatus", "ObjectMetricStatus", 1) + `,`, `Pods:` + strings.Replace(fmt.Sprintf("%v", this.Pods), "PodsMetricStatus", "PodsMetricStatus", 1) + `,`, `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceMetricStatus", "ResourceMetricStatus", 1) + `,`, + `External:` + strings.Replace(fmt.Sprintf("%v", this.External), "ExternalMetricStatus", "ExternalMetricStatus", 1) + `,`, `}`, }, "") return s @@ -1291,7 +1499,7 @@ func (m *CrossVersionObjectReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { +func (m *ExternalMetricSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1314,15 +1522,44 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: wiretype end group for non-group") + return fmt.Errorf("proto: ExternalMetricSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExternalMetricSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MetricName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1346,13 +1583,16 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.MetricSelector == nil { + m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} + } + if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1376,13 +1616,16 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.TargetValue == nil { + m.TargetValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.TargetValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TargetAverageValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1406,7 +1649,10 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.TargetAverageValue == nil { + m.TargetAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.TargetAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1431,7 +1677,7 @@ func (m *HorizontalPodAutoscaler) Unmarshal(dAtA []byte) error { } return nil } -func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { +func (m *ExternalMetricStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1454,15 +1700,15 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: wiretype end group for non-group") + return fmt.Errorf("proto: ExternalMetricStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ExternalMetricStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1487,13 +1733,13 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex]) + m.MetricName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MetricSelector", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1503,24 +1749,28 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) + if m.MetricSelector == nil { + m.MetricSelector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} + } + if err := m.MetricSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentValue", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1544,15 +1794,15 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.CurrentValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CurrentAverageValue", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1562,31 +1812,342 @@ func (m *HorizontalPodAutoscalerCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Reason = string(dAtA[iNdEx:postIndex]) + if m.CurrentAverageValue == nil { + m.CurrentAverageValue = &k8s_io_apimachinery_pkg_api_resource.Quantity{} + } + if err := m.CurrentAverageValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscaler) 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 ErrIntOverflowGenerated + } + 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: HorizontalPodAutoscaler: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscaler: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HorizontalPodAutoscalerCondition) 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 ErrIntOverflowGenerated + } + 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: HorizontalPodAutoscalerCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HorizontalPodAutoscalerCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = HorizontalPodAutoscalerConditionType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] @@ -2248,6 +2809,39 @@ func (m *MetricSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field External", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.External == nil { + m.External = &ExternalMetricSource{} + } + if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2426,6 +3020,39 @@ func (m *MetricStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field External", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.External == nil { + m.External = &ExternalMetricStatus{} + } + if err := m.External.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -3314,88 +3941,95 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1316 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0x8f, 0x1d, 0x27, 0x0d, 0xe3, 0x34, 0x29, 0xd3, 0xaa, 0x75, 0x53, 0x6a, 0x47, 0x2b, 0x84, - 0x4a, 0x45, 0x77, 0x5b, 0x13, 0x3e, 0x24, 0x84, 0x44, 0x6c, 0x44, 0x5b, 0x91, 0xb4, 0x65, 0x9a, - 0x56, 0x08, 0x0a, 0x62, 0xb2, 0x3b, 0x75, 0x86, 0x78, 0x3f, 0x34, 0x33, 0xb6, 0x48, 0x11, 0x12, - 0x17, 0xee, 0x1c, 0x40, 0xfc, 0x15, 0x5c, 0xe1, 0x0c, 0x12, 0x52, 0x85, 0x38, 0xf4, 0x58, 0x84, - 0x64, 0x51, 0xf3, 0x5f, 0xf4, 0x84, 0xe6, 0xc3, 0xfb, 0x61, 0x7b, 0xe3, 0xc4, 0x44, 0xc0, 0xcd, - 0x3b, 0xef, 0xf7, 0x7e, 0xef, 0xbd, 0xdf, 0xbc, 0x79, 0x33, 0x06, 0x57, 0x77, 0x5f, 0xe7, 0x36, - 0x0d, 0x9d, 0xdd, 0xce, 0x36, 0x61, 0x01, 0x11, 0x84, 0x3b, 0x5d, 0x12, 0x78, 0x21, 0x73, 0x8c, - 0x01, 0x47, 0xd4, 0xc1, 0x1d, 0x11, 0x72, 0x17, 0xb7, 0x69, 0xd0, 0x72, 0xba, 0xf5, 0x6d, 0x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, 0xd8, 0x27, 0x48, 0x59, 0x60, 0x1d, 0x00, 0x1c, 0x51, 0x13, - 0xa0, 0x32, 0xab, 0x70, 0xd0, 0xe0, 0xc0, 0xfa, 0xad, 0xeb, 0xc6, 0x82, 0x52, 0x28, 0xeb, 0xa7, - 0x22, 0x38, 0x73, 0x2d, 0x64, 0xf4, 0x41, 0x18, 0x08, 0xdc, 0xbe, 0x15, 0x7a, 0xeb, 0xa6, 0x33, - 0x08, 0x83, 0x9f, 0x80, 0x05, 0x29, 0xb6, 0x87, 0x05, 0x56, 0x79, 0x95, 0xeb, 0x97, 0xed, 0xa4, - 0x87, 0xe2, 0xda, 0xed, 0x68, 0xb7, 0x25, 0x17, 0xb8, 0x2d, 0xd1, 0x76, 0xf7, 0x8a, 0xad, 0x8b, - 0xdb, 0x24, 0x02, 0x27, 0xf1, 0x93, 0x35, 0x14, 0xb3, 0xc2, 0x8f, 0x40, 0x89, 0x47, 0xc4, 0x55, - 0x35, 0x95, 0xeb, 0x6f, 0xd8, 0xfb, 0x77, 0xa8, 0x9d, 0x93, 0xe8, 0xed, 0x88, 0xb8, 0x89, 0x20, - 0xf2, 0x0b, 0x29, 0x5a, 0x48, 0xc0, 0x3c, 0x17, 0x58, 0x74, 0xb8, 0x12, 0xa3, 0x5c, 0x7f, 0x73, - 0xda, 0x00, 0x8a, 0xa4, 0xb1, 0x64, 0x42, 0xcc, 0xeb, 0x6f, 0x64, 0xc8, 0xad, 0xaf, 0x66, 0xc1, - 0x6a, 0x8e, 0x67, 0x33, 0x0c, 0x3c, 0x2a, 0x68, 0x18, 0xc0, 0x6b, 0xa0, 0x24, 0xf6, 0x22, 0x62, - 0x36, 0x78, 0x6d, 0x90, 0xed, 0xd6, 0x5e, 0x44, 0x9e, 0xf6, 0x6a, 0xcf, 0x4f, 0xf2, 0x97, 0x38, - 0xa4, 0x18, 0xe0, 0x46, 0x5c, 0x55, 0x31, 0xc3, 0x65, 0xd2, 0x7a, 0xda, 0xab, 0x8d, 0x39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, 0x26, 0x8d, 0x0a, 0x76, 0xbe, 0xdf, 0xab, 0x9d, 0x6d, - 0xe6, 0x81, 0x50, 0xbe, 0x7f, 0x5e, 0xa7, 0xcd, 0xfe, 0x3b, 0x9d, 0xd6, 0xb8, 0xf4, 0xf0, 0x49, - 0x75, 0xe6, 0xd1, 0x93, 0xea, 0xcc, 0xe3, 0x27, 0xd5, 0x99, 0x2f, 0xfb, 0xd5, 0xc2, 0xc3, 0x7e, - 0xb5, 0xf0, 0xa8, 0x5f, 0x2d, 0x3c, 0xee, 0x57, 0x0b, 0x7f, 0xf6, 0xab, 0x85, 0xaf, 0xff, 0xaa, - 0xce, 0x7c, 0x70, 0xcc, 0xcc, 0xbd, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xac, 0xf1, 0x6a, 0x4f, - 0x90, 0x12, 0x00, 0x00, + // 1426 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcb, 0x8f, 0x1b, 0x45, + 0x13, 0x5f, 0x3f, 0x76, 0xb3, 0x69, 0x6f, 0x76, 0xf3, 0x75, 0xa2, 0xc4, 0xd9, 0x7c, 0xf1, 0xac, + 0x46, 0x08, 0x85, 0x88, 0xcc, 0x24, 0x66, 0x79, 0x48, 0x08, 0x89, 0xb5, 0x81, 0x24, 0x62, 0x9d, + 0x84, 0xde, 0x4d, 0x84, 0x20, 0x20, 0xda, 0xe3, 0x8e, 0xb7, 0x59, 0xcf, 0x8c, 0x35, 0xdd, 0xb6, + 0xb2, 0x41, 0x48, 0x5c, 0xb8, 0x73, 0xe0, 0x71, 0xe5, 0x8c, 0xe0, 0x0a, 0x67, 0x90, 0x90, 0x72, + 0xcc, 0x31, 0x08, 0xc9, 0x22, 0xc3, 0x7f, 0x91, 0x13, 0xea, 0xc7, 0x8c, 0x67, 0xfc, 0x58, 0x3b, + 0x66, 0x13, 0xe0, 0x36, 0xdd, 0x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0xa5, 0xb9, 0x07, 0x0f, 0x4b, 0x73, 0x9f, 0x85, 0xa5, 0xcc, 0xbd, 0xb0, 0x94, + 0xb9, 0x1f, 0x96, 0x32, 0x0f, 0xc2, 0x52, 0xe6, 0x8f, 0xb0, 0x94, 0xf9, 0xe2, 0xcf, 0xd2, 0xdc, + 0x7b, 0x87, 0x74, 0xdd, 0xfb, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xb1, 0xdd, 0xcd, 0x57, 0x16, + 0x00, 0x00, } diff --git a/deps/k8s.io/api/autoscaling/v2beta1/generated.proto b/deps/k8s.io/api/autoscaling/v2beta1/generated.proto index 0c682b35e..5cc6063d0 100644 --- a/deps/k8s.io/api/autoscaling/v2beta1/generated.proto +++ b/deps/k8s.io/api/autoscaling/v2beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v2beta1"; @@ -44,6 +43,50 @@ message CrossVersionObjectReference { optional string apiVersion = 3; } +// ExternalMetricSource indicates how to scale on a metric not associated with +// any Kubernetes object (for example length of queue in cloud +// messaging service, or QPS from loadbalancer running outside of cluster). +// Exactly one "target" type should be set. +message ExternalMetricSource { + // metricName is the name of the metric in question. + optional string metricName = 1; + + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2; + + // targetValue is the target value of the metric (as a quantity). + // Mutually exclusive with TargetAverageValue. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3; + + // targetAverageValue is the target per-pod value of global metric (as a quantity). + // Mutually exclusive with TargetValue. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 4; +} + +// ExternalMetricStatus indicates the current value of a global metric +// not associated with any Kubernetes object. +message ExternalMetricStatus { + // metricName is the name of a metric used for autoscaling in + // metric system. + optional string metricName = 1; + + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector metricSelector = 2; + + // currentValue is the current value of the metric (as a quantity) + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3; + + // currentAverageValue is the current value of metric averaged over autoscaled pods. + // +optional + optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 4; +} + // HorizontalPodAutoscaler is the configuration for a horizontal pod // autoscaler, which automatically manages the replica count of any resource // implementing the scale subresource based on the metrics specified. @@ -175,6 +218,14 @@ message MetricSpec { // to normal per-pod metrics using the "pods" source. // +optional optional ResourceMetricSource resource = 4; + + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + optional ExternalMetricSource external = 5; } // MetricStatus describes the last-read state of a single metric. @@ -201,6 +252,14 @@ message MetricStatus { // to normal per-pod metrics using the "pods" source. // +optional optional ResourceMetricStatus resource = 4; + + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + optional ExternalMetricStatus external = 5; } // ObjectMetricSource indicates how to scale on a metric describing a diff --git a/deps/k8s.io/api/autoscaling/v2beta1/types.go b/deps/k8s.io/api/autoscaling/v2beta1/types.go index 22e53573b..f842cc342 100644 --- a/deps/k8s.io/api/autoscaling/v2beta1/types.go +++ b/deps/k8s.io/api/autoscaling/v2beta1/types.go @@ -73,6 +73,12 @@ var ( // Kubernetes, and have special scaling options on top of those available // to normal per-pod metrics (the "pods" source). ResourceMetricSourceType MetricSourceType = "Resource" + // ExternalMetricSourceType is a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + ExternalMetricSourceType MetricSourceType = "External" ) // MetricSpec specifies how to scale based on a single metric @@ -98,6 +104,13 @@ type MetricSpec struct { // to normal per-pod metrics using the "pods" source. // +optional Resource *ResourceMetricSource `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + External *ExternalMetricSource `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"` } // ObjectMetricSource indicates how to scale on a metric describing a @@ -146,6 +159,27 @@ type ResourceMetricSource struct { TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,3,opt,name=targetAverageValue"` } +// ExternalMetricSource indicates how to scale on a metric not associated with +// any Kubernetes object (for example length of queue in cloud +// messaging service, or QPS from loadbalancer running outside of cluster). +// Exactly one "target" type should be set. +type ExternalMetricSource struct { + // metricName is the name of the metric in question. + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"` + // targetValue is the target value of the metric (as a quantity). + // Mutually exclusive with TargetAverageValue. + // +optional + TargetValue *resource.Quantity `json:"targetValue,omitempty" protobuf:"bytes,3,opt,name=targetValue"` + // targetAverageValue is the target per-pod value of global metric (as a quantity). + // Mutually exclusive with TargetValue. + // +optional + TargetAverageValue *resource.Quantity `json:"targetAverageValue,omitempty" protobuf:"bytes,4,opt,name=targetAverageValue"` +} + // HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. type HorizontalPodAutoscalerStatus struct { // observedGeneration is the most recent generation observed by this autoscaler. @@ -231,6 +265,13 @@ type MetricStatus struct { // to normal per-pod metrics using the "pods" source. // +optional Resource *ResourceMetricStatus `json:"resource,omitempty" protobuf:"bytes,4,opt,name=resource"` + // external refers to a global metric that is not associated + // with any Kubernetes object. It allows autoscaling based on information + // coming from components running outside of cluster + // (for example length of queue in cloud messaging service, or + // QPS from loadbalancer running outside of cluster). + // +optional + External *ExternalMetricStatus `json:"external,omitempty" protobuf:"bytes,5,opt,name=external"` } // ObjectMetricStatus indicates the current value of a metric describing a @@ -277,6 +318,23 @@ type ResourceMetricStatus struct { CurrentAverageValue resource.Quantity `json:"currentAverageValue" protobuf:"bytes,3,name=currentAverageValue"` } +// ExternalMetricStatus indicates the current value of a global metric +// not associated with any Kubernetes object. +type ExternalMetricStatus struct { + // metricName is the name of a metric used for autoscaling in + // metric system. + MetricName string `json:"metricName" protobuf:"bytes,1,name=metricName"` + // metricSelector is used to identify a specific time series + // within a given metric. + // +optional + MetricSelector *metav1.LabelSelector `json:"metricSelector,omitempty" protobuf:"bytes,2,opt,name=metricSelector"` + // currentValue is the current value of the metric (as a quantity) + CurrentValue resource.Quantity `json:"currentValue" protobuf:"bytes,3,name=currentValue"` + // currentAverageValue is the current value of metric averaged over autoscaled pods. + // +optional + CurrentAverageValue *resource.Quantity `json:"currentAverageValue,omitempty" protobuf:"bytes,4,opt,name=currentAverageValue"` +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/deps/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go index 8bcf0f4b3..6fa9385c2 100644 --- a/deps/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/autoscaling/v2beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v2beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CrossVersionObjectReference = map[string]string{ "": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", "kind": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", @@ -38,6 +38,30 @@ func (CrossVersionObjectReference) SwaggerDoc() map[string]string { return map_CrossVersionObjectReference } +var map_ExternalMetricSource = map[string]string{ + "": "ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \"target\" type should be set.", + "metricName": "metricName is the name of the metric in question.", + "metricSelector": "metricSelector is used to identify a specific time series within a given metric.", + "targetValue": "targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.", + "targetAverageValue": "targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.", +} + +func (ExternalMetricSource) SwaggerDoc() map[string]string { + return map_ExternalMetricSource +} + +var map_ExternalMetricStatus = map[string]string{ + "": "ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.", + "metricName": "metricName is the name of a metric used for autoscaling in metric system.", + "metricSelector": "metricSelector is used to identify a specific time series within a given metric.", + "currentValue": "currentValue is the current value of the metric (as a quantity)", + "currentAverageValue": "currentAverageValue is the current value of metric averaged over autoscaled pods.", +} + +func (ExternalMetricStatus) SwaggerDoc() map[string]string { + return map_ExternalMetricStatus +} + var map_HorizontalPodAutoscaler = map[string]string{ "": "HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.", "metadata": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -104,6 +128,7 @@ var map_MetricSpec = map[string]string{ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } func (MetricSpec) SwaggerDoc() map[string]string { @@ -116,6 +141,7 @@ var map_MetricStatus = map[string]string{ "object": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", "pods": "pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.", "resource": "resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \"pods\" source.", + "external": "external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).", } func (MetricStatus) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go index 70bec2b5b..41da778fa 100644 --- a/deps/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/autoscaling/v2beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v2beta1 import ( - resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -42,6 +41,64 @@ func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalMetricSource) DeepCopyInto(out *ExternalMetricSource) { + *out = *in + if in.MetricSelector != nil { + in, out := &in.MetricSelector, &out.MetricSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + if in.TargetValue != nil { + in, out := &in.TargetValue, &out.TargetValue + x := (*in).DeepCopy() + *out = &x + } + if in.TargetAverageValue != nil { + in, out := &in.TargetAverageValue, &out.TargetAverageValue + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricSource. +func (in *ExternalMetricSource) DeepCopy() *ExternalMetricSource { + if in == nil { + return nil + } + out := new(ExternalMetricSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExternalMetricStatus) DeepCopyInto(out *ExternalMetricStatus) { + *out = *in + if in.MetricSelector != nil { + in, out := &in.MetricSelector, &out.MetricSelector + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) + } + out.CurrentValue = in.CurrentValue.DeepCopy() + if in.CurrentAverageValue != nil { + in, out := &in.CurrentAverageValue, &out.CurrentAverageValue + x := (*in).DeepCopy() + *out = &x + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricStatus. +func (in *ExternalMetricStatus) DeepCopy() *ExternalMetricStatus { + if in == nil { + return nil + } + out := new(ExternalMetricStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HorizontalPodAutoscaler) DeepCopyInto(out *HorizontalPodAutoscaler) { *out = *in @@ -66,9 +123,8 @@ func (in *HorizontalPodAutoscaler) DeepCopy() *HorizontalPodAutoscaler { func (in *HorizontalPodAutoscaler) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -117,9 +173,8 @@ func (in *HorizontalPodAutoscalerList) DeepCopy() *HorizontalPodAutoscalerList { func (in *HorizontalPodAutoscalerList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -128,12 +183,8 @@ func (in *HorizontalPodAutoscalerSpec) DeepCopyInto(out *HorizontalPodAutoscaler out.ScaleTargetRef = in.ScaleTargetRef if in.MinReplicas != nil { in, out := &in.MinReplicas, &out.MinReplicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Metrics != nil { in, out := &in.Metrics, &out.Metrics @@ -160,21 +211,12 @@ func (in *HorizontalPodAutoscalerStatus) DeepCopyInto(out *HorizontalPodAutoscal *out = *in if in.ObservedGeneration != nil { in, out := &in.ObservedGeneration, &out.ObservedGeneration - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.LastScaleTime != nil { in, out := &in.LastScaleTime, &out.LastScaleTime - if *in == nil { - *out = nil - } else { - *out = new(v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.CurrentMetrics != nil { in, out := &in.CurrentMetrics, &out.CurrentMetrics @@ -208,30 +250,23 @@ func (in *MetricSpec) DeepCopyInto(out *MetricSpec) { *out = *in if in.Object != nil { in, out := &in.Object, &out.Object - if *in == nil { - *out = nil - } else { - *out = new(ObjectMetricSource) - (*in).DeepCopyInto(*out) - } + *out = new(ObjectMetricSource) + (*in).DeepCopyInto(*out) } if in.Pods != nil { in, out := &in.Pods, &out.Pods - if *in == nil { - *out = nil - } else { - *out = new(PodsMetricSource) - (*in).DeepCopyInto(*out) - } + *out = new(PodsMetricSource) + (*in).DeepCopyInto(*out) } if in.Resource != nil { in, out := &in.Resource, &out.Resource - if *in == nil { - *out = nil - } else { - *out = new(ResourceMetricSource) - (*in).DeepCopyInto(*out) - } + *out = new(ResourceMetricSource) + (*in).DeepCopyInto(*out) + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(ExternalMetricSource) + (*in).DeepCopyInto(*out) } return } @@ -251,30 +286,23 @@ func (in *MetricStatus) DeepCopyInto(out *MetricStatus) { *out = *in if in.Object != nil { in, out := &in.Object, &out.Object - if *in == nil { - *out = nil - } else { - *out = new(ObjectMetricStatus) - (*in).DeepCopyInto(*out) - } + *out = new(ObjectMetricStatus) + (*in).DeepCopyInto(*out) } if in.Pods != nil { in, out := &in.Pods, &out.Pods - if *in == nil { - *out = nil - } else { - *out = new(PodsMetricStatus) - (*in).DeepCopyInto(*out) - } + *out = new(PodsMetricStatus) + (*in).DeepCopyInto(*out) } if in.Resource != nil { in, out := &in.Resource, &out.Resource - if *in == nil { - *out = nil - } else { - *out = new(ResourceMetricStatus) - (*in).DeepCopyInto(*out) - } + *out = new(ResourceMetricStatus) + (*in).DeepCopyInto(*out) + } + if in.External != nil { + in, out := &in.External, &out.External + *out = new(ExternalMetricStatus) + (*in).DeepCopyInto(*out) } return } @@ -364,21 +392,13 @@ func (in *ResourceMetricSource) DeepCopyInto(out *ResourceMetricSource) { *out = *in if in.TargetAverageUtilization != nil { in, out := &in.TargetAverageUtilization, &out.TargetAverageUtilization - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.TargetAverageValue != nil { in, out := &in.TargetAverageValue, &out.TargetAverageValue - if *in == nil { - *out = nil - } else { - *out = new(resource.Quantity) - **out = (*in).DeepCopy() - } + x := (*in).DeepCopy() + *out = &x } return } @@ -398,12 +418,8 @@ func (in *ResourceMetricStatus) DeepCopyInto(out *ResourceMetricStatus) { *out = *in if in.CurrentAverageUtilization != nil { in, out := &in.CurrentAverageUtilization, &out.CurrentAverageUtilization - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } out.CurrentAverageValue = in.CurrentAverageValue.DeepCopy() return diff --git a/deps/k8s.io/api/batch/v1/BUILD b/deps/k8s.io/api/batch/v1/BUILD deleted file mode 100644 index a7ca7a232..000000000 --- a/deps/k8s.io/api/batch/v1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/batch/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/batch/v1/generated.pb.go b/deps/k8s.io/api/batch/v1/generated.pb.go index 8599b6733..aa5cdf89b 100644 --- a/deps/k8s.io/api/batch/v1/generated.pb.go +++ b/deps/k8s.io/api/batch/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1554,62 +1554,61 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 907 bytes of a gzipped FileDescriptorProto + // 893 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6f, 0xe3, 0x44, - 0x18, 0x8d, 0x9b, 0xa6, 0x4d, 0x26, 0x69, 0x77, 0x19, 0x54, 0x29, 0x54, 0xc8, 0x59, 0x82, 0x84, - 0x0a, 0x12, 0x36, 0xe9, 0x56, 0x08, 0x21, 0x40, 0xc2, 0x45, 0x2b, 0x51, 0xa5, 0xda, 0x32, 0x29, - 0x42, 0x42, 0x20, 0x31, 0xb6, 0xbf, 0xa4, 0x43, 0x6c, 0x8f, 0xe5, 0x99, 0x44, 0xea, 0x8d, 0x9f, - 0xc0, 0x8f, 0x40, 0xfc, 0x14, 0xd4, 0xe3, 0x1e, 0xf7, 0x14, 0x51, 0xc3, 0x9d, 0xfb, 0x9e, 0xd0, - 0x8c, 0x1d, 0xdb, 0x69, 0x13, 0xd1, 0xe5, 0x66, 0xbf, 0x79, 0xef, 0x7d, 0x33, 0xf3, 0xbd, 0xf9, - 0xd0, 0x67, 0xd3, 0x4f, 0x84, 0xc5, 0xb8, 0x3d, 0x9d, 0xb9, 0x90, 0x44, 0x20, 0x41, 0xd8, 0x73, - 0x88, 0x7c, 0x9e, 0xd8, 0xf9, 0x02, 0x8d, 0x99, 0xed, 0x52, 0xe9, 0x5d, 0xd9, 0xf3, 0x81, 0x3d, - 0x81, 0x08, 0x12, 0x2a, 0xc1, 0xb7, 0xe2, 0x84, 0x4b, 0x8e, 0xdf, 0xcc, 0x48, 0x16, 0x8d, 0x99, - 0xa5, 0x49, 0xd6, 0x7c, 0x70, 0xf8, 0xe1, 0x84, 0xc9, 0xab, 0x99, 0x6b, 0x79, 0x3c, 0xb4, 0x27, - 0x7c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, 0xe0, 0xef, 0x10, 0xf2, 0x96, 0x8f, 0x9d, + 0x77, 0x0d, 0x15, 0x9c, 0x77, 0xee, 0x0b, 0x4e, 0x31, 0x16, 0xca, 0x19, 0x5a, 0x40, 0x9c, 0x54, + 0x8c, 0xf0, 0xf7, 0xa8, 0xc5, 0x05, 0x4d, 0x85, 0x7a, 0xb6, 0x1b, 0x8f, 0x7e, 0xb6, 0x3b, 0xd9, + 0xa2, 0xd7, 0x1a, 0x2d, 0x0d, 0x48, 0xe9, 0x85, 0xc7, 0x68, 0xb7, 0x4c, 0xd0, 0x6b, 0x8e, 0x20, + 0x75, 0x5d, 0x27, 0x2b, 0x2e, 0xe4, 0x96, 0xab, 0x1c, 0x04, 0x79, 0xc4, 0x54, 0x8e, 0x1a, 0xe5, + 0x20, 0xc8, 0xf3, 0x48, 0xf4, 0x2e, 0xb6, 0x51, 0x8b, 0xcf, 0x3c, 0x0f, 0xc0, 0x07, 0x5f, 0xa5, + 0xa1, 0xe1, 0xbc, 0xa1, 0xa9, 0xad, 0xd1, 0x72, 0x83, 0x94, 0x1c, 0x69, 0x3c, 0xa6, 0x41, 0x08, + 0xbe, 0x4a, 0x41, 0xc5, 0xf8, 0x99, 0x42, 0x89, 0xde, 0x75, 0x0e, 0xaf, 0x6f, 0xcc, 0xda, 0x8b, + 0x1b, 0xb3, 0xf6, 0xf2, 0xc6, 0xac, 0xfd, 0x9a, 0x99, 0xc6, 0x75, 0x66, 0x1a, 0x2f, 0x32, 0xd3, + 0x78, 0x99, 0x99, 0xc6, 0x5f, 0x99, 0x69, 0xfc, 0xf6, 0xb7, 0x59, 0xfb, 0x61, 0x63, 0x3e, 0xf8, + 0x2f, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xcc, 0x84, 0xd1, 0x61, 0x08, 0x00, 0x00, } diff --git a/deps/k8s.io/api/batch/v1/generated.proto b/deps/k8s.io/api/batch/v1/generated.proto index b0306f3bc..91858b019 100644 --- a/deps/k8s.io/api/batch/v1/generated.proto +++ b/deps/k8s.io/api/batch/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; diff --git a/deps/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/batch/v1/types_swagger_doc_generated.go index 0ddf4b116..2bb794a5f 100644 --- a/deps/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Job = map[string]string{ "": "Job represents the configuration of a single job.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", diff --git a/deps/k8s.io/api/batch/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/batch/v1/zz_generated.deepcopy.go index 53392f45a..d641cf308 100644 --- a/deps/k8s.io/api/batch/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/batch/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -49,9 +49,8 @@ func (in *Job) DeepCopy() *Job { func (in *Job) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -101,9 +100,8 @@ func (in *JobList) DeepCopy() *JobList { func (in *JobList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -111,57 +109,33 @@ func (in *JobSpec) DeepCopyInto(out *JobSpec) { *out = *in if in.Parallelism != nil { in, out := &in.Parallelism, &out.Parallelism - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Completions != nil { in, out := &in.Completions, &out.Completions - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.ActiveDeadlineSeconds != nil { in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.BackoffLimit != nil { in, out := &in.BackoffLimit, &out.BackoffLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } if in.ManualSelector != nil { in, out := &in.ManualSelector, &out.ManualSelector - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } in.Template.DeepCopyInto(&out.Template) return @@ -189,21 +163,11 @@ func (in *JobStatus) DeepCopyInto(out *JobStatus) { } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.CompletionTime != nil { in, out := &in.CompletionTime, &out.CompletionTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } diff --git a/deps/k8s.io/api/batch/v1beta1/BUILD b/deps/k8s.io/api/batch/v1beta1/BUILD deleted file mode 100644 index 3f0197b9c..000000000 --- a/deps/k8s.io/api/batch/v1beta1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/batch/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/batch/v1beta1/generated.pb.go b/deps/k8s.io/api/batch/v1beta1/generated.pb.go index 6544184db..ece2204f9 100644 --- a/deps/k8s.io/api/batch/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/batch/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1456,54 +1456,54 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 784 bytes of a gzipped FileDescriptorProto + // 771 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6f, 0xe3, 0x44, 0x14, 0xc7, 0xe3, 0x34, 0xbf, 0x76, 0xc2, 0x42, 0xd7, 0xa0, 0x5d, 0x2b, 0x20, 0x27, 0x64, 0xb5, - 0x22, 0x20, 0x76, 0x4c, 0x0b, 0x42, 0x9c, 0x90, 0xd6, 0x8b, 0x16, 0x28, 0x45, 0x8b, 0x9c, 0x22, - 0x24, 0x54, 0xa1, 0x8e, 0xc7, 0x2f, 0xc9, 0x34, 0xb6, 0xc7, 0xf2, 0x8c, 0x23, 0xe5, 0xc6, 0x85, - 0x3b, 0xff, 0x08, 0x27, 0xfe, 0x89, 0x88, 0x53, 0x8f, 0x3d, 0x45, 0xd4, 0xfc, 0x17, 0x9c, 0x90, - 0x27, 0xce, 0x8f, 0xe6, 0x47, 0x5b, 0x2e, 0xbd, 0x79, 0x9e, 0xbf, 0xdf, 0xcf, 0xbc, 0x79, 0xef, - 0xcd, 0xa0, 0x17, 0xc3, 0x2f, 0x04, 0x66, 0xdc, 0x1a, 0x26, 0x2e, 0xc4, 0x21, 0x48, 0x10, 0xd6, - 0x08, 0x42, 0x8f, 0xc7, 0x56, 0xfe, 0x83, 0x44, 0xcc, 0x72, 0x89, 0xa4, 0x03, 0x6b, 0x74, 0xe0, - 0x82, 0x24, 0x07, 0x56, 0x1f, 0x42, 0x88, 0x89, 0x04, 0x0f, 0x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, 0xed, 0xf2, 0x64, 0x0e, 0xfb, 0xbd, 0x74, 0xda, 0xdc, 0x3f, 0x5e, 0xe3, 0x38, + 0x1b, 0xe4, 0xf6, 0x44, 0x43, 0xab, 0xdd, 0xb9, 0x87, 0xe7, 0xeb, 0x67, 0x54, 0x93, 0xf3, 0x89, + 0x2a, 0xbe, 0xe9, 0x44, 0x2d, 0x6e, 0xe2, 0x62, 0x9c, 0x16, 0xb0, 0xec, 0xf5, 0x79, 0x67, 0x4d, + 0x7f, 0x0f, 0xbf, 0xf3, 0xd5, 0xb5, 0xd7, 0xf8, 0x83, 0x6d, 0xbf, 0x82, 0x6f, 0x78, 0x84, 0xed, + 0xe7, 0x93, 0x2b, 0xb3, 0x70, 0x71, 0x65, 0x16, 0x2e, 0xaf, 0xcc, 0xc2, 0x6f, 0xa9, 0xa9, 0x4d, + 0x52, 0x53, 0xbb, 0x48, 0x4d, 0xed, 0x32, 0x35, 0xb5, 0x7f, 0x52, 0x53, 0xfb, 0xe3, 0x5f, 0xb3, + 0xf0, 0x4b, 0x35, 0x2f, 0xc8, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x9f, 0xb3, 0xdd, 0xdf, + 0x07, 0x00, 0x00, } diff --git a/deps/k8s.io/api/batch/v1beta1/generated.proto b/deps/k8s.io/api/batch/v1beta1/generated.proto index 9278a3d9b..043b3551b 100644 --- a/deps/k8s.io/api/batch/v1beta1/generated.proto +++ b/deps/k8s.io/api/batch/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; diff --git a/deps/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go index 3b53ac08a..abbdfec01 100644 --- a/deps/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/batch/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CronJob = map[string]string{ "": "CronJob represents the configuration of a single cron job.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", diff --git a/deps/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go index 528283773..1c8bc4478 100644 --- a/deps/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/batch/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -50,9 +49,8 @@ func (in *CronJob) DeepCopy() *CronJob { func (in *CronJob) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -84,9 +82,8 @@ func (in *CronJobList) DeepCopy() *CronJobList { func (in *CronJobList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -94,40 +91,24 @@ func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) { *out = *in if in.StartingDeadlineSeconds != nil { in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.Suspend != nil { in, out := &in.Suspend, &out.Suspend - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } in.JobTemplate.DeepCopyInto(&out.JobTemplate) if in.SuccessfulJobsHistoryLimit != nil { in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.FailedJobsHistoryLimit != nil { in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -152,12 +133,7 @@ func (in *CronJobStatus) DeepCopyInto(out *CronJobStatus) { } if in.LastScheduleTime != nil { in, out := &in.LastScheduleTime, &out.LastScheduleTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -195,9 +171,8 @@ func (in *JobTemplate) DeepCopy() *JobTemplate { func (in *JobTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/batch/v2alpha1/BUILD b/deps/k8s.io/api/batch/v2alpha1/BUILD deleted file mode 100644 index 0fc0ab57a..000000000 --- a/deps/k8s.io/api/batch/v2alpha1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/batch/v2alpha1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/batch/v2alpha1/generated.pb.go b/deps/k8s.io/api/batch/v2alpha1/generated.pb.go index 2560953eb..6ab41ebbc 100644 --- a/deps/k8s.io/api/batch/v2alpha1/generated.pb.go +++ b/deps/k8s.io/api/batch/v2alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1456,55 +1456,54 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 787 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0xcf, 0x6f, 0xe3, 0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96, 0x7b, 0x12, 0x6b, 0xca, - 0x45, 0xac, 0x29, 0x97, 0xb1, 0xa6, 0x5c, 0xc5, 0x9a, 0xf2, 0x26, 0xd6, 0x94, 0x67, 0x6f, 0xb5, - 0xdc, 0xff, 0x95, 0x49, 0x45, 0xde, 0x07, 0x00, 0x00, 0xff, 0xff, 0x02, 0x60, 0xaa, 0x00, 0x1c, - 0x08, 0x00, 0x00, + // 774 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4d, 0x6f, 0xdb, 0x36, + 0x18, 0xc7, 0x2d, 0xc7, 0x6f, 0xa1, 0x97, 0x2d, 0xd1, 0x86, 0xc4, 0xf3, 0x06, 0xd9, 0x50, 0xb0, + 0xc1, 0x18, 0x36, 0x6a, 0x09, 0x86, 0x61, 0xa7, 0x01, 0x53, 0x86, 0x36, 0x4d, 0x53, 0x34, 0x90, + 0x53, 0xa0, 0x28, 0x82, 0xa2, 0x14, 0x45, 0xdb, 0x8c, 0x25, 0x51, 0x10, 0x29, 0x03, 0xbe, 0xf5, + 0xd6, 0x6b, 0x3f, 0x49, 0x2f, 0xed, 0x87, 0x48, 0x7b, 0xca, 0x31, 0x27, 0xa3, 0x51, 0xbf, 0x45, + 0x4f, 0x85, 0x68, 0xf9, 0x25, 0x7e, 0x49, 0xd2, 0x4b, 0x6e, 0xe2, 0xa3, 0xff, 0xff, 0xc7, 0x87, + 0xcf, 0xf3, 0x90, 0xc0, 0xec, 0xfe, 0xc3, 0x21, 0x65, 0x46, 0x37, 0xb2, 0x49, 0xe8, 0x13, 0x41, + 0xb8, 0xd1, 0x23, 0xbe, 0xc3, 0x42, 0x23, 0xfd, 0x81, 0x02, 0x6a, 0xd8, 0x48, 0xe0, 0x8e, 0xd1, + 0xdb, 0x45, 0x6e, 0xd0, 0x41, 0x3b, 0x46, 0x9b, 0xf8, 0x24, 0x44, 0x82, 0x38, 0x30, 0x08, 0x99, + 0x60, 0xea, 0x8f, 0x43, 0x29, 0x44, 0x01, 0x85, 0x52, 0x0a, 0x47, 0xd2, 0xea, 0x1f, 0x6d, 0x2a, + 0x3a, 0x91, 0x0d, 0x31, 0xf3, 0x8c, 0x36, 0x6b, 0x33, 0x43, 0x3a, 0xec, 0xa8, 0x25, 0x57, 0x72, + 0x21, 0xbf, 0x86, 0xa4, 0xea, 0xf6, 0xfc, 0xa6, 0x73, 0xdb, 0x55, 0xf5, 0x29, 0x11, 0x66, 0x21, + 0x59, 0xa4, 0xf9, 0x6b, 0xa2, 0xf1, 0x10, 0xee, 0x50, 0x9f, 0x84, 0x7d, 0x23, 0xe8, 0xb6, 0x93, + 0x00, 0x37, 0x3c, 0x22, 0xd0, 0x22, 0x97, 0xb1, 0xcc, 0x15, 0x46, 0xbe, 0xa0, 0x1e, 0x99, 0x33, + 0xfc, 0x7d, 0x93, 0x81, 0xe3, 0x0e, 0xf1, 0xd0, 0xac, 0x4f, 0x7f, 0x95, 0x05, 0xc5, 0xbd, 0x90, + 0xf9, 0x07, 0xcc, 0x56, 0x5f, 0x80, 0x52, 0x92, 0x8f, 0x83, 0x04, 0xaa, 0x28, 0x75, 0xa5, 0x51, + 0xde, 0xfd, 0x13, 0x4e, 0x0a, 0x3a, 0xc6, 0xc2, 0xa0, 0xdb, 0x4e, 0x02, 0x1c, 0x26, 0x6a, 0xd8, + 0xdb, 0x81, 0x8f, 0xed, 0x53, 0x82, 0xc5, 0x23, 0x22, 0x90, 0xa9, 0x9e, 0x0d, 0x6a, 0x99, 0x78, + 0x50, 0x03, 0x93, 0x98, 0x35, 0xa6, 0xaa, 0xfb, 0x20, 0xc7, 0x03, 0x82, 0x2b, 0x59, 0x49, 0xff, + 0x15, 0x2e, 0x6d, 0x17, 0x4c, 0x73, 0x6a, 0x06, 0x04, 0x9b, 0xdf, 0xa4, 0xcc, 0x5c, 0xb2, 0xb2, + 0x24, 0x41, 0x3d, 0x02, 0x05, 0x2e, 0x90,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xd5, 0x23, 0x35, 0xbe, 0x8b, 0xe3, 0x79, 0x1a, 0xd3, 0xf4, 0xb7, 0x0a, + 0xf8, 0x6e, 0x46, 0x7f, 0x07, 0xe7, 0xf9, 0xf7, 0xca, 0x93, 0xfc, 0xf3, 0x82, 0xb3, 0xc8, 0x53, + 0x2c, 0x7b, 0x88, 0x4d, 0x78, 0x76, 0xa9, 0x65, 0xce, 0x2f, 0xb5, 0xcc, 0xc5, 0xa5, 0x96, 0x79, + 0x19, 0x6b, 0xca, 0x59, 0xac, 0x29, 0xe7, 0xb1, 0xa6, 0x5c, 0xc4, 0x9a, 0xf2, 0x31, 0xd6, 0x94, + 0xd7, 0x9f, 0xb4, 0xcc, 0xb3, 0xd2, 0xa8, 0x22, 0x5f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x20, 0x1c, + 0xcf, 0x94, 0xe7, 0x07, 0x00, 0x00, } diff --git a/deps/k8s.io/api/batch/v2alpha1/generated.proto b/deps/k8s.io/api/batch/v2alpha1/generated.proto index e4de3644c..4321c3361 100644 --- a/deps/k8s.io/api/batch/v2alpha1/generated.proto +++ b/deps/k8s.io/api/batch/v2alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v2alpha1"; diff --git a/deps/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go b/deps/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go index d166b807f..f448a92cf 100644 --- a/deps/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/batch/v2alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v2alpha1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CronJob = map[string]string{ "": "CronJob represents the configuration of a single cron job.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", diff --git a/deps/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go b/deps/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go index 387e5610e..20d87e7e7 100644 --- a/deps/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/batch/v2alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v2alpha1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -50,9 +49,8 @@ func (in *CronJob) DeepCopy() *CronJob { func (in *CronJob) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -84,9 +82,8 @@ func (in *CronJobList) DeepCopy() *CronJobList { func (in *CronJobList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -94,40 +91,24 @@ func (in *CronJobSpec) DeepCopyInto(out *CronJobSpec) { *out = *in if in.StartingDeadlineSeconds != nil { in, out := &in.StartingDeadlineSeconds, &out.StartingDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.Suspend != nil { in, out := &in.Suspend, &out.Suspend - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } in.JobTemplate.DeepCopyInto(&out.JobTemplate) if in.SuccessfulJobsHistoryLimit != nil { in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.FailedJobsHistoryLimit != nil { in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -152,12 +133,7 @@ func (in *CronJobStatus) DeepCopyInto(out *CronJobStatus) { } if in.LastScheduleTime != nil { in, out := &in.LastScheduleTime, &out.LastScheduleTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -195,9 +171,8 @@ func (in *JobTemplate) DeepCopy() *JobTemplate { func (in *JobTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/certificates/v1beta1/BUILD b/deps/k8s.io/api/certificates/v1beta1/BUILD deleted file mode 100644 index 4c94dd064..000000000 --- a/deps/k8s.io/api/certificates/v1beta1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/certificates/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/certificates/v1beta1/generated.pb.go b/deps/k8s.io/api/certificates/v1beta1/generated.pb.go index 7f704bf82..eda159900 100644 --- a/deps/k8s.io/api/certificates/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/certificates/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1638,56 +1638,56 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 816 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0xfa, 0x2b, 0xf6, 0x38, 0xa4, 0xd5, 0x08, 0x55, 0x4b, 0xa4, 0xee, 0x46, 0x2b, 0x40, - 0xe1, 0xa3, 0xb3, 0xa4, 0x20, 0x88, 0x72, 0x40, 0xb0, 0xa1, 0x82, 0x88, 0x56, 0x48, 0xd3, 0x86, - 0x03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xf6, 0x64, 0xea, 0x58, 0x17, 0x53, 0xc7, 0x7a, - 0x3a, 0x75, 0xac, 0x67, 0x53, 0xc7, 0xfa, 0x67, 0xea, 0x58, 0xbf, 0xfc, 0xeb, 0xd4, 0xbe, 0xdb, - 0x32, 0xdd, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x73, 0x7d, 0xca, 0x2a, 0xb4, 0x07, 0x00, 0x00, + // 804 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x8f, 0xdb, 0x44, + 0x18, 0x8e, 0xf3, 0xb5, 0xc9, 0x64, 0xd9, 0x56, 0x23, 0x54, 0x99, 0x95, 0x6a, 0xaf, 0x2c, 0x40, + 0xcb, 0x47, 0xc7, 0x6c, 0x85, 0x60, 0xb5, 0x07, 0x04, 0x5e, 0x2a, 0x58, 0xd1, 0x0a, 0x69, 0xda, + 0x70, 0x40, 0x48, 0x74, 0xe2, 0xbc, 0x75, 0xa6, 0xa9, 0x3f, 0xf0, 0x8c, 0x03, 0xb9, 0xf5, 0x27, + 0x70, 0xe4, 0x82, 0xc4, 0x2f, 0xe1, 0xbc, 0x1c, 0x90, 0x7a, 0xec, 0x01, 0x45, 0x6c, 0xf8, 0x17, + 0x3d, 0xa1, 0x19, 0x4f, 0xe2, 0x90, 0x55, 0x48, 0xd5, 0xbd, 0x79, 0x9e, 0xf7, 0x79, 0x9e, 0xf7, + 0x63, 0xde, 0x31, 0xfa, 0x72, 0x7c, 0x2c, 0x08, 0x4f, 0xfd, 0x71, 0x31, 0x80, 0x3c, 0x01, 0x09, + 0xc2, 0x9f, 0x40, 0x32, 0x4c, 0x73, 0xdf, 0x04, 0x58, 0xc6, 0xfd, 0x10, 0x72, 0xc9, 0x1f, 0xf1, + 0x90, 0xe9, 0xf0, 0xd1, 0x00, 0x24, 0x3b, 0xf2, 0x23, 0x48, 0x20, 0x67, 0x12, 0x86, 0x24, 0xcb, + 0x53, 0x99, 0x62, 0xb7, 0x14, 0x10, 0x96, 0x71, 0xb2, 0x2a, 0x20, 0x46, 0xb0, 0x7f, 0x2b, 0xe2, + 0x72, 0x54, 0x0c, 0x48, 0x98, 0xc6, 0x7e, 0x94, 0x46, 0xa9, 0xaf, 0x75, 0x83, 0xe2, 0x91, 0x3e, + 0xe9, 0x83, 0xfe, 0x2a, 0xfd, 0xf6, 0x3f, 0xac, 0x0a, 0x88, 0x59, 0x38, 0xe2, 0x09, 0xe4, 0x53, + 0x3f, 0x1b, 0x47, 0x0a, 0x10, 0x7e, 0x0c, 0x92, 0xf9, 0x93, 0x4b, 0x55, 0xec, 0xfb, 0x9b, 0x54, + 0x79, 0x91, 0x48, 0x1e, 0xc3, 0x25, 0xc1, 0x47, 0xdb, 0x04, 0x22, 0x1c, 0x41, 0xcc, 0xd6, 0x75, + 0xde, 0x1f, 0x75, 0xf4, 0xc6, 0x69, 0xd5, 0xe6, 0x7d, 0x1e, 0x25, 0x3c, 0x89, 0x28, 0xfc, 0x50, + 0x80, 0x90, 0xf8, 0x21, 0xea, 0xa8, 0x0a, 0x87, 0x4c, 0x32, 0xdb, 0x3a, 0xb0, 0x0e, 0x7b, 0xb7, + 0x3f, 0x20, 0xd5, 0x7c, 0x96, 0x89, 0x48, 0x36, 0x8e, 0x14, 0x20, 0x88, 0x62, 0x93, 0xc9, 0x11, + 0xf9, 0x7a, 0xf0, 0x18, 0x42, 0x79, 0x0f, 0x24, 0x0b, 0xf0, 0xf9, 0xcc, 0xad, 0xcd, 0x67, 0x2e, + 0xaa, 0x30, 0xba, 0x74, 0xc5, 0x0f, 0x51, 0x53, 0x64, 0x10, 0xda, 0x75, 0xed, 0xfe, 0x09, 0xd9, + 0x32, 0x7d, 0xb2, 0xb1, 0xd6, 0xfb, 0x19, 0x84, 0xc1, 0xae, 0xc9, 0xd5, 0x54, 0x27, 0xaa, 0x9d, + 0xf1, 0x08, 0xb5, 0x85, 0x64, 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, 0xb6, 0xa5, 0xfb, 0x3f, 0x7d, 0xf5, 0xfe, 0x97, 0xef, 0xbc, 0xfa, 0x51, 0x2e, 0x21, + 0x41, 0x57, 0x52, 0xe1, 0x23, 0xd4, 0x5b, 0xb1, 0xd6, 0x9d, 0xee, 0x06, 0xd7, 0xe6, 0x33, 0xb7, + 0xb7, 0x62, 0x4e, 0x57, 0x39, 0xde, 0xc7, 0x66, 0x6c, 0xba, 0x51, 0xec, 0x2e, 0xf6, 0xdf, 0xd2, + 0x77, 0xdc, 0x5d, 0xdf, 0xdf, 0x93, 0xce, 0x2f, 0xbf, 0xb9, 0xb5, 0xa7, 0x7f, 0x1d, 0xd4, 0x82, + 0x5b, 0xe7, 0x17, 0x4e, 0xed, 0xd9, 0x85, 0x53, 0x7b, 0x7e, 0xe1, 0xd4, 0x9e, 0xce, 0x1d, 0xeb, + 0x7c, 0xee, 0x58, 0xcf, 0xe6, 0x8e, 0xf5, 0x7c, 0xee, 0x58, 0x7f, 0xcf, 0x1d, 0xeb, 0xe7, 0x7f, + 0x9c, 0xda, 0xb7, 0x3b, 0xa6, 0xbb, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x6b, 0x5b, 0xf9, + 0x7f, 0x07, 0x00, 0x00, } diff --git a/deps/k8s.io/api/certificates/v1beta1/generated.proto b/deps/k8s.io/api/certificates/v1beta1/generated.proto index e3cd9000f..5200224a2 100644 --- a/deps/k8s.io/api/certificates/v1beta1/generated.proto +++ b/deps/k8s.io/api/certificates/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.certificates.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; diff --git a/deps/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go index 4fd91df06..f6a7e16ac 100644 --- a/deps/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/certificates/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_CertificateSigningRequest = map[string]string{ "": "Describes a certificate signing request", "spec": "The certificate request itself and any additional information.", diff --git a/deps/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go index 53634ad17..1b103f155 100644 --- a/deps/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/certificates/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -48,9 +48,8 @@ func (in *CertificateSigningRequest) DeepCopy() *CertificateSigningRequest { func (in *CertificateSigningRequest) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -99,9 +98,8 @@ func (in *CertificateSigningRequestList) DeepCopy() *CertificateSigningRequestLi func (in *CertificateSigningRequestList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -126,8 +124,15 @@ func (in *CertificateSigningRequestSpec) DeepCopyInto(out *CertificateSigningReq in, out := &in.Extra, &out.Extra *out = make(map[string]ExtraValue, len(*in)) for key, val := range *in { - (*out)[key] = make(ExtraValue, len(val)) - copy((*out)[key], val) + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal } } return @@ -170,3 +175,23 @@ func (in *CertificateSigningRequestStatus) DeepCopy() *CertificateSigningRequest in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ExtraValue) DeepCopyInto(out *ExtraValue) { + { + in := &in + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. +func (in ExtraValue) DeepCopy() ExtraValue { + if in == nil { + return nil + } + out := new(ExtraValue) + in.DeepCopyInto(out) + return *out +} diff --git a/deps/k8s.io/api/coordination/v1beta1/doc.go b/deps/k8s.io/api/coordination/v1beta1/doc.go new file mode 100644 index 000000000..fecb513fc --- /dev/null +++ b/deps/k8s.io/api/coordination/v1beta1/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:openapi-gen=true + +// +groupName=coordination.k8s.io +package v1beta1 // import "k8s.io/api/coordination/v1beta1" diff --git a/deps/k8s.io/api/coordination/v1beta1/generated.pb.go b/deps/k8s.io/api/coordination/v1beta1/generated.pb.go new file mode 100644 index 000000000..6c2dbd91f --- /dev/null +++ b/deps/k8s.io/api/coordination/v1beta1/generated.pb.go @@ -0,0 +1,883 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1/generated.proto +// DO NOT EDIT! + +/* + Package v1beta1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1/generated.proto + + It has these top-level messages: + Lease + LeaseList + LeaseSpec +*/ +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *Lease) Reset() { *m = Lease{} } +func (*Lease) ProtoMessage() {} +func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *LeaseList) Reset() { *m = LeaseList{} } +func (*LeaseList) ProtoMessage() {} +func (*LeaseList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } +func (*LeaseSpec) ProtoMessage() {} +func (*LeaseSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func init() { + proto.RegisterType((*Lease)(nil), "k8s.io.api.coordination.v1beta1.Lease") + proto.RegisterType((*LeaseList)(nil), "k8s.io.api.coordination.v1beta1.LeaseList") + proto.RegisterType((*LeaseSpec)(nil), "k8s.io.api.coordination.v1beta1.LeaseSpec") +} +func (m *Lease) 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 *Lease) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) + n2, err := m.Spec.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + return i, nil +} + +func (m *LeaseList) 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 *LeaseList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n3, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *LeaseSpec) 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 *LeaseSpec) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.HolderIdentity != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.HolderIdentity))) + i += copy(dAtA[i:], *m.HolderIdentity) + } + if m.LeaseDurationSeconds != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseDurationSeconds)) + } + if m.AcquireTime != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.AcquireTime.Size())) + n4, err := m.AcquireTime.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.RenewTime != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.RenewTime.Size())) + n5, err := m.RenewTime.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.LeaseTransitions != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseTransitions)) + } + return i, nil +} + +func encodeFixed64Generated(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 encodeFixed32Generated(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 encodeVarintGenerated(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 *Lease) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *LeaseList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *LeaseSpec) Size() (n int) { + var l int + _ = l + if m.HolderIdentity != nil { + l = len(*m.HolderIdentity) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.LeaseDurationSeconds != nil { + n += 1 + sovGenerated(uint64(*m.LeaseDurationSeconds)) + } + if m.AcquireTime != nil { + l = m.AcquireTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.RenewTime != nil { + l = m.RenewTime.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.LeaseTransitions != nil { + n += 1 + sovGenerated(uint64(*m.LeaseTransitions)) + } + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Lease) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Lease{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LeaseSpec", "LeaseSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *LeaseList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LeaseList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Lease", "Lease", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *LeaseSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LeaseSpec{`, + `HolderIdentity:` + valueToStringGenerated(this.HolderIdentity) + `,`, + `LeaseDurationSeconds:` + valueToStringGenerated(this.LeaseDurationSeconds) + `,`, + `AcquireTime:` + strings.Replace(fmt.Sprintf("%v", this.AcquireTime), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1) + `,`, + `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1) + `,`, + `LeaseTransitions:` + valueToStringGenerated(this.LeaseTransitions) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Lease) 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 ErrIntOverflowGenerated + } + 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: Lease: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseList) 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 ErrIntOverflowGenerated + } + 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: LeaseList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Lease{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LeaseSpec) 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 ErrIntOverflowGenerated + } + 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: LeaseSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LeaseSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HolderIdentity", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.HolderIdentity = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseDurationSeconds", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LeaseDurationSeconds = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AcquireTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AcquireTime == nil { + m.AcquireTime = &k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime{} + } + if err := m.AcquireTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RenewTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RenewTime == nil { + m.RenewTime = &k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime{} + } + if err := m.RenewTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LeaseTransitions", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LeaseTransitions = &v + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(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, ErrIntOverflowGenerated + } + 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, ErrIntOverflowGenerated + } + 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, ErrIntOverflowGenerated + } + 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, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + 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 := skipGenerated(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 ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/coordination/v1beta1/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 540 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0xe3, 0xb6, 0x11, 0xcd, 0x86, 0x96, 0xc8, 0xca, 0xc1, 0xca, 0xc1, 0xae, 0x72, 0x40, + 0x15, 0x52, 0x77, 0x49, 0x85, 0x10, 0xe2, 0x04, 0x16, 0x87, 0x56, 0xb8, 0x42, 0x72, 0x7b, 0x42, + 0x3d, 0xb0, 0xb6, 0x07, 0x67, 0x49, 0xed, 0x35, 0xbb, 0xeb, 0xa0, 0xde, 0x78, 0x04, 0xae, 0xbc, + 0x08, 0xbc, 0x42, 0x8e, 0x3d, 0xf6, 0x64, 0x11, 0xf3, 0x22, 0xc8, 0x1b, 0xb7, 0x09, 0x49, 0x51, + 0x23, 0x6e, 0xde, 0x99, 0xf9, 0xbf, 0xf9, 0xe7, 0x37, 0x3a, 0x1a, 0xbd, 0x90, 0x98, 0x71, 0x32, + 0xca, 0x03, 0x10, 0x29, 0x28, 0x90, 0x64, 0x0c, 0x69, 0xc4, 0x05, 0xa9, 0x1b, 0x34, 0x63, 0x24, + 0xe4, 0x5c, 0x44, 0x2c, 0xa5, 0x8a, 0xf1, 0x94, 0x8c, 0x07, 0x01, 0x28, 0x3a, 0x20, 0x31, 0xa4, + 0x20, 0xa8, 0x82, 0x08, 0x67, 0x82, 0x2b, 0x6e, 0x3a, 0x33, 0x01, 0xa6, 0x19, 0xc3, 0x8b, 0x02, + 0x5c, 0x0b, 0x7a, 0x07, 0x31, 0x53, 0xc3, 0x3c, 0xc0, 0x21, 0x4f, 0x48, 0xcc, 0x63, 0x4e, 0xb4, + 0x2e, 0xc8, 0x3f, 0xea, 0x97, 0x7e, 0xe8, 0xaf, 0x19, 0xaf, 0xf7, 0x6c, 0x6e, 0x20, 0xa1, 0xe1, + 0x90, 0xa5, 0x20, 0x2e, 0x49, 0x36, 0x8a, 0xab, 0x82, 0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xd4, 0xf6, 0x5b, 0xae, 0x59, 0x16, 0xce, 0xee, 0xd1, 0x5f, 0x1d, 0x7f, 0x69, 0xd2, 0xf4, 0x50, + 0xf7, 0xa2, 0x02, 0xbd, 0xc9, 0x85, 0x5e, 0x7f, 0x0a, 0x21, 0x4f, 0x23, 0xa9, 0x03, 0x6e, 0xba, + 0x56, 0x59, 0x38, 0x5d, 0xef, 0x8e, 0xbe, 0x7f, 0xa7, 0xca, 0x0c, 0x50, 0x9b, 0x86, 0x9f, 0x73, + 0x26, 0xe0, 0x8c, 0x25, 0x60, 0x6d, 0xea, 0x14, 0xc9, 0x7a, 0x29, 0x9e, 0xb0, 0x50, 0xf0, 0x4a, + 0xe6, 0x3e, 0x2a, 0x0b, 0xa7, 0xfd, 0x7a, 0xce, 0xf1, 0x17, 0xa1, 0xe6, 0x39, 0x6a, 0x09, 0x48, + 0xe1, 0x8b, 0xde, 0xb0, 0xf5, 0x7f, 0x1b, 0x76, 0xca, 0xc2, 0x69, 0xf9, 0x37, 0x14, 0x7f, 0x0e, + 0x34, 0x5f, 0xa1, 0x8e, 0xbe, 0xec, 0x4c, 0xd0, 0x54, 0xb2, 0xea, 0x36, 0x69, 0x35, 0x75, 0x16, + 0xdd, 0xb2, 0x70, 0x3a, 0xde, 0x52, 0xcf, 0x5f, 0x99, 0x76, 0x0f, 0x26, 0x53, 0xbb, 0x71, 0x35, + 0xb5, 0x1b, 0xd7, 0x53, 0xbb, 0xf1, 0xb5, 0xb4, 0x8d, 0x49, 0x69, 0x1b, 0x57, 0xa5, 0x6d, 0x5c, + 0x97, 0xb6, 0xf1, 0xab, 0xb4, 0x8d, 0x6f, 0xbf, 0xed, 0xc6, 0xfb, 0x07, 0xf5, 0x6f, 0xfe, 0x13, + 0x00, 0x00, 0xff, 0xff, 0x51, 0x34, 0x6a, 0x0f, 0x77, 0x04, 0x00, 0x00, +} diff --git a/deps/k8s.io/api/coordination/v1beta1/generated.proto b/deps/k8s.io/api/coordination/v1beta1/generated.proto new file mode 100644 index 000000000..918e0de1c --- /dev/null +++ b/deps/k8s.io/api/coordination/v1beta1/generated.proto @@ -0,0 +1,80 @@ +/* +Copyright The Kubernetes 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. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.api.coordination.v1beta1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// Lease defines a lease concept. +message Lease { + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Specification of the Lease. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // +optional + optional LeaseSpec spec = 2; +} + +// LeaseList is a list of Lease objects. +message LeaseList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is a list of schema objects. + repeated Lease items = 2; +} + +// LeaseSpec is a specification of a Lease. +message LeaseSpec { + // holderIdentity contains the identity of the holder of a current lease. + // +optional + optional string holderIdentity = 1; + + // leaseDurationSeconds is a duration that candidates for a lease need + // to wait to force acquire it. This is measure against time of last + // observed RenewTime. + // +optional + optional int32 leaseDurationSeconds = 2; + + // acquireTime is a time when the current lease was acquired. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime acquireTime = 3; + + // renewTime is a time when the current holder of a lease has last + // updated the lease. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime renewTime = 4; + + // leaseTransitions is the number of transitions of a lease between + // holders. + // +optional + optional int32 leaseTransitions = 5; +} + diff --git a/deps/k8s.io/api/coordination/v1beta1/register.go b/deps/k8s.io/api/coordination/v1beta1/register.go new file mode 100644 index 000000000..85efaa64e --- /dev/null +++ b/deps/k8s.io/api/coordination/v1beta1/register.go @@ -0,0 +1,53 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "coordination.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Lease{}, + &LeaseList{}, + ) + + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/deps/k8s.io/api/coordination/v1beta1/types.go b/deps/k8s.io/api/coordination/v1beta1/types.go new file mode 100644 index 000000000..846f72802 --- /dev/null +++ b/deps/k8s.io/api/coordination/v1beta1/types.go @@ -0,0 +1,74 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Lease defines a lease concept. +type Lease struct { + metav1.TypeMeta `json:",inline"` + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Specification of the Lease. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status + // +optional + Spec LeaseSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// LeaseSpec is a specification of a Lease. +type LeaseSpec struct { + // holderIdentity contains the identity of the holder of a current lease. + // +optional + HolderIdentity *string `json:"holderIdentity,omitempty" protobuf:"bytes,1,opt,name=holderIdentity"` + // leaseDurationSeconds is a duration that candidates for a lease need + // to wait to force acquire it. This is measure against time of last + // observed RenewTime. + // +optional + LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty" protobuf:"varint,2,opt,name=leaseDurationSeconds"` + // acquireTime is a time when the current lease was acquired. + // +optional + AcquireTime *metav1.MicroTime `json:"acquireTime,omitempty" protobuf:"bytes,3,opt,name=acquireTime"` + // renewTime is a time when the current holder of a lease has last + // updated the lease. + // +optional + RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,4,opt,name=renewTime"` + // leaseTransitions is the number of transitions of a lease between + // holders. + // +optional + LeaseTransitions *int32 `json:"leaseTransitions,omitempty" protobuf:"varint,5,opt,name=leaseTransitions"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// LeaseList is a list of Lease objects. +type LeaseList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Items is a list of schema objects. + Items []Lease `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/deps/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go new file mode 100644 index 000000000..4532d322a --- /dev/null +++ b/deps/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go @@ -0,0 +1,63 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_Lease = map[string]string{ + "": "Lease defines a lease concept.", + "metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "spec": "Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", +} + +func (Lease) SwaggerDoc() map[string]string { + return map_Lease +} + +var map_LeaseList = map[string]string{ + "": "LeaseList is a list of Lease objects.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "items": "Items is a list of schema objects.", +} + +func (LeaseList) SwaggerDoc() map[string]string { + return map_LeaseList +} + +var map_LeaseSpec = map[string]string{ + "": "LeaseSpec is a specification of a Lease.", + "holderIdentity": "holderIdentity contains the identity of the holder of a current lease.", + "leaseDurationSeconds": "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.", + "acquireTime": "acquireTime is a time when the current lease was acquired.", + "renewTime": "renewTime is a time when the current holder of a lease has last updated the lease.", + "leaseTransitions": "leaseTransitions is the number of transitions of a lease between holders.", +} + +func (LeaseSpec) SwaggerDoc() map[string]string { + return map_LeaseSpec +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/deps/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..a628ac19b --- /dev/null +++ b/deps/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,124 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Lease) DeepCopyInto(out *Lease) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Lease. +func (in *Lease) DeepCopy() *Lease { + if in == nil { + return nil + } + out := new(Lease) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Lease) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LeaseList) DeepCopyInto(out *LeaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Lease, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseList. +func (in *LeaseList) DeepCopy() *LeaseList { + if in == nil { + return nil + } + out := new(LeaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *LeaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LeaseSpec) DeepCopyInto(out *LeaseSpec) { + *out = *in + if in.HolderIdentity != nil { + in, out := &in.HolderIdentity, &out.HolderIdentity + *out = new(string) + **out = **in + } + if in.LeaseDurationSeconds != nil { + in, out := &in.LeaseDurationSeconds, &out.LeaseDurationSeconds + *out = new(int32) + **out = **in + } + if in.AcquireTime != nil { + in, out := &in.AcquireTime, &out.AcquireTime + *out = (*in).DeepCopy() + } + if in.RenewTime != nil { + in, out := &in.RenewTime, &out.RenewTime + *out = (*in).DeepCopy() + } + if in.LeaseTransitions != nil { + in, out := &in.LeaseTransitions, &out.LeaseTransitions + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseSpec. +func (in *LeaseSpec) DeepCopy() *LeaseSpec { + if in == nil { + return nil + } + out := new(LeaseSpec) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/api/core/v1/BUILD b/deps/k8s.io/api/core/v1/BUILD deleted file mode 100644 index 804092361..000000000 --- a/deps/k8s.io/api/core/v1/BUILD +++ /dev/null @@ -1,65 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "taint_test.go", - "toleration_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/api/core/v1", -) - -go_library( - name = "go_default_library", - srcs = [ - "annotation_key_constants.go", - "doc.go", - "generated.pb.go", - "meta.go", - "objectreference.go", - "register.go", - "resource.go", - "taint.go", - "toleration.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/core/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/core/v1/annotation_key_constants.go b/deps/k8s.io/api/core/v1/annotation_key_constants.go index de4e3cee4..16a0cfced 100644 --- a/deps/k8s.io/api/core/v1/annotation_key_constants.go +++ b/deps/k8s.io/api/core/v1/annotation_key_constants.go @@ -45,24 +45,17 @@ const ( // to one container of a pod. SeccompContainerAnnotationKeyPrefix string = "container.seccomp.security.alpha.kubernetes.io/" + // SeccompProfileRuntimeDefault represents the default seccomp profile used by container runtime. + SeccompProfileRuntimeDefault string = "runtime/default" + + // DeprecatedSeccompProfileDockerDefault represents the default seccomp profile used by docker. + // This is now deprecated and should be replaced by SeccompProfileRuntimeDefault. + DeprecatedSeccompProfileDockerDefault string = "docker/default" + // PreferAvoidPodsAnnotationKey represents the key of preferAvoidPods data (json serialized) // in the Annotations of a Node. PreferAvoidPodsAnnotationKey string = "scheduler.alpha.kubernetes.io/preferAvoidPods" - // SysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure - // container of a pod. The annotation value is a comma separated list of sysctl_name=value - // key-value pairs. Only a limited set of whitelisted and isolated sysctls is supported by - // the kubelet. Pods with other sysctls will fail to launch. - SysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/sysctls" - - // UnsafeSysctlsPodAnnotationKey represents the key of sysctls which are set for the infrastructure - // container of a pod. The annotation value is a comma separated list of sysctl_name=value - // key-value pairs. Unsafe sysctls must be explicitly enabled for a kubelet. They are properly - // namespaced to a pod or a container, but their isolation is usually unclear or weak. Their use - // is at-your-own-risk. Pods that attempt to set an unsafe sysctl that is not enabled for a kubelet - // will fail to launch. - UnsafeSysctlsPodAnnotationKey string = "security.alpha.kubernetes.io/unsafe-sysctls" - // ObjectTTLAnnotations represents a suggestion for kubelet for how long it can cache // an object (e.g. secret, config map) before fetching it again from apiserver. // This annotation can be attached to node. diff --git a/deps/k8s.io/api/core/v1/generated.pb.go b/deps/k8s.io/api/core/v1/generated.pb.go index 7f11d1127..6b98b60db 100644 --- a/deps/k8s.io/api/core/v1/generated.pb.go +++ b/deps/k8s.io/api/core/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,6 +37,7 @@ limitations under the License. Capabilities CephFSPersistentVolumeSource CephFSVolumeSource + CinderPersistentVolumeSource CinderVolumeSource ClientIPConfig ComponentCondition @@ -46,6 +47,7 @@ limitations under the License. ConfigMapEnvSource ConfigMapKeySelector ConfigMapList + ConfigMapNodeConfigSource ConfigMapProjection ConfigMapVolumeSource Container @@ -57,7 +59,6 @@ limitations under the License. ContainerStateWaiting ContainerStatus DaemonEndpoint - DeleteOptions DownwardAPIProjection DownwardAPIVolumeFile DownwardAPIVolumeSource @@ -96,7 +97,6 @@ limitations under the License. LimitRangeList LimitRangeSpec List - ListOptions LoadBalancerIngress LoadBalancerStatus LocalObjectReference @@ -111,6 +111,7 @@ limitations under the License. NodeAffinity NodeCondition NodeConfigSource + NodeConfigStatus NodeDaemonEndpoints NodeList NodeProxyOptions @@ -122,7 +123,6 @@ limitations under the License. NodeStatus NodeSystemInfo ObjectFieldSelector - ObjectMeta ObjectReference PersistentVolume PersistentVolumeClaim @@ -149,6 +149,7 @@ limitations under the License. PodLogOptions PodPortForwardOptions PodProxyOptions + PodReadinessGate PodSecurityContext PodSignature PodSpec @@ -181,6 +182,8 @@ limitations under the License. SELinuxOptions ScaleIOPersistentVolumeSource ScaleIOVolumeSource + ScopeSelector + ScopedResourceSelectorRequirement Secret SecretEnvSource SecretKeySelector @@ -193,6 +196,7 @@ limitations under the License. Service ServiceAccount ServiceAccountList + ServiceAccountTokenProjection ServiceList ServicePort ServiceProxyOptions @@ -205,9 +209,12 @@ limitations under the License. TCPSocketAction Taint Toleration + TopologySelectorLabelRequirement + TopologySelectorTerm Volume VolumeDevice VolumeMount + VolumeNodeAffinity VolumeProjection VolumeSource VsphereVirtualDiskVolumeSource @@ -299,255 +306,259 @@ func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSourc func (*CephFSVolumeSource) ProtoMessage() {} func (*CephFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (m *CinderPersistentVolumeSource) Reset() { *m = CinderPersistentVolumeSource{} } +func (*CinderPersistentVolumeSource) ProtoMessage() {} +func (*CinderPersistentVolumeSource) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{12} +} + func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} } func (*CinderVolumeSource) ProtoMessage() {} -func (*CinderVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } +func (*CinderVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *ClientIPConfig) Reset() { *m = ClientIPConfig{} } func (*ClientIPConfig) ProtoMessage() {} -func (*ClientIPConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*ClientIPConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *ComponentCondition) Reset() { *m = ComponentCondition{} } func (*ComponentCondition) ProtoMessage() {} -func (*ComponentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*ComponentCondition) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *ComponentStatus) Reset() { *m = ComponentStatus{} } func (*ComponentStatus) ProtoMessage() {} -func (*ComponentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*ComponentStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} } func (*ComponentStatusList) ProtoMessage() {} -func (*ComponentStatusList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*ComponentStatusList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } func (m *ConfigMap) Reset() { *m = ConfigMap{} } func (*ConfigMap) ProtoMessage() {} -func (*ConfigMap) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*ConfigMap) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} } func (*ConfigMapEnvSource) ProtoMessage() {} -func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } +func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} } func (*ConfigMapKeySelector) ProtoMessage() {} -func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } func (m *ConfigMapList) Reset() { *m = ConfigMapList{} } func (*ConfigMapList) ProtoMessage() {} -func (*ConfigMapList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*ConfigMapList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } + +func (m *ConfigMapNodeConfigSource) Reset() { *m = ConfigMapNodeConfigSource{} } +func (*ConfigMapNodeConfigSource) ProtoMessage() {} +func (*ConfigMapNodeConfigSource) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{22} +} func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} } func (*ConfigMapProjection) ProtoMessage() {} -func (*ConfigMapProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*ConfigMapProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} } func (*ConfigMapVolumeSource) ProtoMessage() {} -func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } +func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} -func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *ContainerImage) Reset() { *m = ContainerImage{} } func (*ContainerImage) ProtoMessage() {} -func (*ContainerImage) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*ContainerImage) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *ContainerPort) Reset() { *m = ContainerPort{} } func (*ContainerPort) ProtoMessage() {} -func (*ContainerPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*ContainerPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *ContainerState) Reset() { *m = ContainerState{} } func (*ContainerState) ProtoMessage() {} -func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } func (*ContainerStateRunning) ProtoMessage() {} -func (*ContainerStateRunning) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*ContainerStateRunning) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} } func (*ContainerStateTerminated) ProtoMessage() {} func (*ContainerStateTerminated) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{28} + return fileDescriptorGenerated, []int{30} } func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} } func (*ContainerStateWaiting) ProtoMessage() {} -func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } +func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } func (*ContainerStatus) ProtoMessage() {} -func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } +func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } func (m *DaemonEndpoint) Reset() { *m = DaemonEndpoint{} } func (*DaemonEndpoint) ProtoMessage() {} -func (*DaemonEndpoint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } - -func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } -func (*DeleteOptions) ProtoMessage() {} -func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } +func (*DaemonEndpoint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } func (m *DownwardAPIProjection) Reset() { *m = DownwardAPIProjection{} } func (*DownwardAPIProjection) ProtoMessage() {} -func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } +func (*DownwardAPIProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } func (m *DownwardAPIVolumeFile) Reset() { *m = DownwardAPIVolumeFile{} } func (*DownwardAPIVolumeFile) ProtoMessage() {} -func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } +func (*DownwardAPIVolumeFile) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } func (m *DownwardAPIVolumeSource) Reset() { *m = DownwardAPIVolumeSource{} } func (*DownwardAPIVolumeSource) ProtoMessage() {} func (*DownwardAPIVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{35} + return fileDescriptorGenerated, []int{36} } func (m *EmptyDirVolumeSource) Reset() { *m = EmptyDirVolumeSource{} } func (*EmptyDirVolumeSource) ProtoMessage() {} -func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } +func (*EmptyDirVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } func (m *EndpointAddress) Reset() { *m = EndpointAddress{} } func (*EndpointAddress) ProtoMessage() {} -func (*EndpointAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } +func (*EndpointAddress) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } func (m *EndpointPort) Reset() { *m = EndpointPort{} } func (*EndpointPort) ProtoMessage() {} -func (*EndpointPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } +func (*EndpointPort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } func (m *EndpointSubset) Reset() { *m = EndpointSubset{} } func (*EndpointSubset) ProtoMessage() {} -func (*EndpointSubset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{39} } +func (*EndpointSubset) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} } func (m *Endpoints) Reset() { *m = Endpoints{} } func (*Endpoints) ProtoMessage() {} -func (*Endpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{40} } +func (*Endpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } func (m *EndpointsList) Reset() { *m = EndpointsList{} } func (*EndpointsList) ProtoMessage() {} -func (*EndpointsList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{41} } +func (*EndpointsList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } func (m *EnvFromSource) Reset() { *m = EnvFromSource{} } func (*EnvFromSource) ProtoMessage() {} -func (*EnvFromSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{42} } +func (*EnvFromSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} } func (m *EnvVar) Reset() { *m = EnvVar{} } func (*EnvVar) ProtoMessage() {} -func (*EnvVar) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{43} } +func (*EnvVar) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} } func (m *EnvVarSource) Reset() { *m = EnvVarSource{} } func (*EnvVarSource) ProtoMessage() {} -func (*EnvVarSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{44} } +func (*EnvVarSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} } func (m *Event) Reset() { *m = Event{} } func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{45} } +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } func (m *EventList) Reset() { *m = EventList{} } func (*EventList) ProtoMessage() {} -func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{46} } +func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} } func (m *EventSeries) Reset() { *m = EventSeries{} } func (*EventSeries) ProtoMessage() {} -func (*EventSeries) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{47} } +func (*EventSeries) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{48} } func (m *EventSource) Reset() { *m = EventSource{} } func (*EventSource) ProtoMessage() {} -func (*EventSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{48} } +func (*EventSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } func (m *ExecAction) Reset() { *m = ExecAction{} } func (*ExecAction) ProtoMessage() {} -func (*ExecAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{49} } +func (*ExecAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } func (m *FCVolumeSource) Reset() { *m = FCVolumeSource{} } func (*FCVolumeSource) ProtoMessage() {} -func (*FCVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{50} } +func (*FCVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{51} } func (m *FlexPersistentVolumeSource) Reset() { *m = FlexPersistentVolumeSource{} } func (*FlexPersistentVolumeSource) ProtoMessage() {} func (*FlexPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{51} + return fileDescriptorGenerated, []int{52} } func (m *FlexVolumeSource) Reset() { *m = FlexVolumeSource{} } func (*FlexVolumeSource) ProtoMessage() {} -func (*FlexVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{52} } +func (*FlexVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } func (m *FlockerVolumeSource) Reset() { *m = FlockerVolumeSource{} } func (*FlockerVolumeSource) ProtoMessage() {} -func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{53} } +func (*FlockerVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{54} } func (m *GCEPersistentDiskVolumeSource) Reset() { *m = GCEPersistentDiskVolumeSource{} } func (*GCEPersistentDiskVolumeSource) ProtoMessage() {} func (*GCEPersistentDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{54} + return fileDescriptorGenerated, []int{55} } func (m *GitRepoVolumeSource) Reset() { *m = GitRepoVolumeSource{} } func (*GitRepoVolumeSource) ProtoMessage() {} -func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{55} } +func (*GitRepoVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} } func (m *GlusterfsVolumeSource) Reset() { *m = GlusterfsVolumeSource{} } func (*GlusterfsVolumeSource) ProtoMessage() {} -func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{56} } +func (*GlusterfsVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} } func (m *HTTPGetAction) Reset() { *m = HTTPGetAction{} } func (*HTTPGetAction) ProtoMessage() {} -func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{57} } +func (*HTTPGetAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} } func (m *HTTPHeader) Reset() { *m = HTTPHeader{} } func (*HTTPHeader) ProtoMessage() {} -func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{58} } +func (*HTTPHeader) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} } func (m *Handler) Reset() { *m = Handler{} } func (*Handler) ProtoMessage() {} -func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{59} } +func (*Handler) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} } func (m *HostAlias) Reset() { *m = HostAlias{} } func (*HostAlias) ProtoMessage() {} -func (*HostAlias) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{60} } +func (*HostAlias) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} } func (m *HostPathVolumeSource) Reset() { *m = HostPathVolumeSource{} } func (*HostPathVolumeSource) ProtoMessage() {} -func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{61} } +func (*HostPathVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{62} } func (m *ISCSIPersistentVolumeSource) Reset() { *m = ISCSIPersistentVolumeSource{} } func (*ISCSIPersistentVolumeSource) ProtoMessage() {} func (*ISCSIPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{62} + return fileDescriptorGenerated, []int{63} } func (m *ISCSIVolumeSource) Reset() { *m = ISCSIVolumeSource{} } func (*ISCSIVolumeSource) ProtoMessage() {} -func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{63} } +func (*ISCSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{64} } func (m *KeyToPath) Reset() { *m = KeyToPath{} } func (*KeyToPath) ProtoMessage() {} -func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{64} } +func (*KeyToPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} } func (m *Lifecycle) Reset() { *m = Lifecycle{} } func (*Lifecycle) ProtoMessage() {} -func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{65} } +func (*Lifecycle) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} } func (m *LimitRange) Reset() { *m = LimitRange{} } func (*LimitRange) ProtoMessage() {} -func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{66} } +func (*LimitRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} } func (m *LimitRangeItem) Reset() { *m = LimitRangeItem{} } func (*LimitRangeItem) ProtoMessage() {} -func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{67} } +func (*LimitRangeItem) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} } func (m *LimitRangeList) Reset() { *m = LimitRangeList{} } func (*LimitRangeList) ProtoMessage() {} -func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{68} } +func (*LimitRangeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} } func (m *LimitRangeSpec) Reset() { *m = LimitRangeSpec{} } func (*LimitRangeSpec) ProtoMessage() {} -func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{69} } +func (*LimitRangeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} } func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} -func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{70} } - -func (m *ListOptions) Reset() { *m = ListOptions{} } -func (*ListOptions) ProtoMessage() {} -func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} } +func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{71} } func (m *LoadBalancerIngress) Reset() { *m = LoadBalancerIngress{} } func (*LoadBalancerIngress) ProtoMessage() {} @@ -605,55 +616,55 @@ func (m *NodeConfigSource) Reset() { *m = NodeConfigSource{} func (*NodeConfigSource) ProtoMessage() {} func (*NodeConfigSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{85} } +func (m *NodeConfigStatus) Reset() { *m = NodeConfigStatus{} } +func (*NodeConfigStatus) ProtoMessage() {} +func (*NodeConfigStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} } + func (m *NodeDaemonEndpoints) Reset() { *m = NodeDaemonEndpoints{} } func (*NodeDaemonEndpoints) ProtoMessage() {} -func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{86} } +func (*NodeDaemonEndpoints) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} } func (m *NodeList) Reset() { *m = NodeList{} } func (*NodeList) ProtoMessage() {} -func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{87} } +func (*NodeList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{88} } func (m *NodeProxyOptions) Reset() { *m = NodeProxyOptions{} } func (*NodeProxyOptions) ProtoMessage() {} -func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{88} } +func (*NodeProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{89} } func (m *NodeResources) Reset() { *m = NodeResources{} } func (*NodeResources) ProtoMessage() {} -func (*NodeResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{89} } +func (*NodeResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{90} } func (m *NodeSelector) Reset() { *m = NodeSelector{} } func (*NodeSelector) ProtoMessage() {} -func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{90} } +func (*NodeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{91} } func (m *NodeSelectorRequirement) Reset() { *m = NodeSelectorRequirement{} } func (*NodeSelectorRequirement) ProtoMessage() {} func (*NodeSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{91} + return fileDescriptorGenerated, []int{92} } func (m *NodeSelectorTerm) Reset() { *m = NodeSelectorTerm{} } func (*NodeSelectorTerm) ProtoMessage() {} -func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{92} } +func (*NodeSelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{93} } func (m *NodeSpec) Reset() { *m = NodeSpec{} } func (*NodeSpec) ProtoMessage() {} -func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{93} } +func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{94} } func (m *NodeStatus) Reset() { *m = NodeStatus{} } func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{94} } +func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{95} } func (m *NodeSystemInfo) Reset() { *m = NodeSystemInfo{} } func (*NodeSystemInfo) ProtoMessage() {} -func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{95} } +func (*NodeSystemInfo) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{96} } func (m *ObjectFieldSelector) Reset() { *m = ObjectFieldSelector{} } func (*ObjectFieldSelector) ProtoMessage() {} -func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{96} } - -func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } -func (*ObjectMeta) ProtoMessage() {} -func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} } +func (*ObjectFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{97} } func (m *ObjectReference) Reset() { *m = ObjectReference{} } func (*ObjectReference) ProtoMessage() {} @@ -775,276 +786,310 @@ func (m *PodProxyOptions) Reset() { *m = PodProxyOptions{} } func (*PodProxyOptions) ProtoMessage() {} func (*PodProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{123} } +func (m *PodReadinessGate) Reset() { *m = PodReadinessGate{} } +func (*PodReadinessGate) ProtoMessage() {} +func (*PodReadinessGate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{124} } + func (m *PodSecurityContext) Reset() { *m = PodSecurityContext{} } func (*PodSecurityContext) ProtoMessage() {} -func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{124} } +func (*PodSecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} } func (m *PodSignature) Reset() { *m = PodSignature{} } func (*PodSignature) ProtoMessage() {} -func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{125} } +func (*PodSignature) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} } func (m *PodSpec) Reset() { *m = PodSpec{} } func (*PodSpec) ProtoMessage() {} -func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{126} } +func (*PodSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} } func (m *PodStatus) Reset() { *m = PodStatus{} } func (*PodStatus) ProtoMessage() {} -func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{127} } +func (*PodStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } func (m *PodStatusResult) Reset() { *m = PodStatusResult{} } func (*PodStatusResult) ProtoMessage() {} -func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{128} } +func (*PodStatusResult) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } func (m *PodTemplate) Reset() { *m = PodTemplate{} } func (*PodTemplate) ProtoMessage() {} -func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{129} } +func (*PodTemplate) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } func (m *PodTemplateList) Reset() { *m = PodTemplateList{} } func (*PodTemplateList) ProtoMessage() {} -func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{130} } +func (*PodTemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } func (m *PodTemplateSpec) Reset() { *m = PodTemplateSpec{} } func (*PodTemplateSpec) ProtoMessage() {} -func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{131} } +func (*PodTemplateSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } func (m *PortworxVolumeSource) Reset() { *m = PortworxVolumeSource{} } func (*PortworxVolumeSource) ProtoMessage() {} -func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{132} } +func (*PortworxVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{133} } +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } func (m *PreferAvoidPodsEntry) Reset() { *m = PreferAvoidPodsEntry{} } func (*PreferAvoidPodsEntry) ProtoMessage() {} -func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{134} } +func (*PreferAvoidPodsEntry) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{135} } func (m *PreferredSchedulingTerm) Reset() { *m = PreferredSchedulingTerm{} } func (*PreferredSchedulingTerm) ProtoMessage() {} func (*PreferredSchedulingTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{135} + return fileDescriptorGenerated, []int{136} } func (m *Probe) Reset() { *m = Probe{} } func (*Probe) ProtoMessage() {} -func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{136} } +func (*Probe) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } func (m *ProjectedVolumeSource) Reset() { *m = ProjectedVolumeSource{} } func (*ProjectedVolumeSource) ProtoMessage() {} -func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{137} } +func (*ProjectedVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } func (m *QuobyteVolumeSource) Reset() { *m = QuobyteVolumeSource{} } func (*QuobyteVolumeSource) ProtoMessage() {} -func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{138} } +func (*QuobyteVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{139} } func (m *RBDPersistentVolumeSource) Reset() { *m = RBDPersistentVolumeSource{} } func (*RBDPersistentVolumeSource) ProtoMessage() {} func (*RBDPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{139} + return fileDescriptorGenerated, []int{140} } func (m *RBDVolumeSource) Reset() { *m = RBDVolumeSource{} } func (*RBDVolumeSource) ProtoMessage() {} -func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{140} } +func (*RBDVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } func (*RangeAllocation) ProtoMessage() {} -func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{141} } +func (*RangeAllocation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } func (m *ReplicationController) Reset() { *m = ReplicationController{} } func (*ReplicationController) ProtoMessage() {} -func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{142} } +func (*ReplicationController) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{143} } func (m *ReplicationControllerCondition) Reset() { *m = ReplicationControllerCondition{} } func (*ReplicationControllerCondition) ProtoMessage() {} func (*ReplicationControllerCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{143} + return fileDescriptorGenerated, []int{144} } func (m *ReplicationControllerList) Reset() { *m = ReplicationControllerList{} } func (*ReplicationControllerList) ProtoMessage() {} func (*ReplicationControllerList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{144} + return fileDescriptorGenerated, []int{145} } func (m *ReplicationControllerSpec) Reset() { *m = ReplicationControllerSpec{} } func (*ReplicationControllerSpec) ProtoMessage() {} func (*ReplicationControllerSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{145} + return fileDescriptorGenerated, []int{146} } func (m *ReplicationControllerStatus) Reset() { *m = ReplicationControllerStatus{} } func (*ReplicationControllerStatus) ProtoMessage() {} func (*ReplicationControllerStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{146} + return fileDescriptorGenerated, []int{147} } func (m *ResourceFieldSelector) Reset() { *m = ResourceFieldSelector{} } func (*ResourceFieldSelector) ProtoMessage() {} -func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{147} } +func (*ResourceFieldSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } func (m *ResourceQuota) Reset() { *m = ResourceQuota{} } func (*ResourceQuota) ProtoMessage() {} -func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{148} } +func (*ResourceQuota) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } func (m *ResourceQuotaList) Reset() { *m = ResourceQuotaList{} } func (*ResourceQuotaList) ProtoMessage() {} -func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{149} } +func (*ResourceQuotaList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } func (m *ResourceQuotaSpec) Reset() { *m = ResourceQuotaSpec{} } func (*ResourceQuotaSpec) ProtoMessage() {} -func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{150} } +func (*ResourceQuotaSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } func (m *ResourceQuotaStatus) Reset() { *m = ResourceQuotaStatus{} } func (*ResourceQuotaStatus) ProtoMessage() {} -func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{151} } +func (*ResourceQuotaStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } func (m *ResourceRequirements) Reset() { *m = ResourceRequirements{} } func (*ResourceRequirements) ProtoMessage() {} -func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{152} } +func (*ResourceRequirements) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } func (m *SELinuxOptions) Reset() { *m = SELinuxOptions{} } func (*SELinuxOptions) ProtoMessage() {} -func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{153} } +func (*SELinuxOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{154} } func (m *ScaleIOPersistentVolumeSource) Reset() { *m = ScaleIOPersistentVolumeSource{} } func (*ScaleIOPersistentVolumeSource) ProtoMessage() {} func (*ScaleIOPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{154} + return fileDescriptorGenerated, []int{155} } func (m *ScaleIOVolumeSource) Reset() { *m = ScaleIOVolumeSource{} } func (*ScaleIOVolumeSource) ProtoMessage() {} -func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{155} } +func (*ScaleIOVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} } + +func (m *ScopeSelector) Reset() { *m = ScopeSelector{} } +func (*ScopeSelector) ProtoMessage() {} +func (*ScopeSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} } + +func (m *ScopedResourceSelectorRequirement) Reset() { *m = ScopedResourceSelectorRequirement{} } +func (*ScopedResourceSelectorRequirement) ProtoMessage() {} +func (*ScopedResourceSelectorRequirement) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{158} +} func (m *Secret) Reset() { *m = Secret{} } func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{156} } +func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{159} } func (m *SecretEnvSource) Reset() { *m = SecretEnvSource{} } func (*SecretEnvSource) ProtoMessage() {} -func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{157} } +func (*SecretEnvSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{160} } func (m *SecretKeySelector) Reset() { *m = SecretKeySelector{} } func (*SecretKeySelector) ProtoMessage() {} -func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{158} } +func (*SecretKeySelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{161} } func (m *SecretList) Reset() { *m = SecretList{} } func (*SecretList) ProtoMessage() {} -func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{159} } +func (*SecretList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{162} } func (m *SecretProjection) Reset() { *m = SecretProjection{} } func (*SecretProjection) ProtoMessage() {} -func (*SecretProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{160} } +func (*SecretProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{163} } func (m *SecretReference) Reset() { *m = SecretReference{} } func (*SecretReference) ProtoMessage() {} -func (*SecretReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{161} } +func (*SecretReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{164} } func (m *SecretVolumeSource) Reset() { *m = SecretVolumeSource{} } func (*SecretVolumeSource) ProtoMessage() {} -func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{162} } +func (*SecretVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{165} } func (m *SecurityContext) Reset() { *m = SecurityContext{} } func (*SecurityContext) ProtoMessage() {} -func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{163} } +func (*SecurityContext) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{166} } func (m *SerializedReference) Reset() { *m = SerializedReference{} } func (*SerializedReference) ProtoMessage() {} -func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{164} } +func (*SerializedReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{167} } func (m *Service) Reset() { *m = Service{} } func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{165} } +func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{168} } func (m *ServiceAccount) Reset() { *m = ServiceAccount{} } func (*ServiceAccount) ProtoMessage() {} -func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{166} } +func (*ServiceAccount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{169} } func (m *ServiceAccountList) Reset() { *m = ServiceAccountList{} } func (*ServiceAccountList) ProtoMessage() {} -func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{167} } +func (*ServiceAccountList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{170} } + +func (m *ServiceAccountTokenProjection) Reset() { *m = ServiceAccountTokenProjection{} } +func (*ServiceAccountTokenProjection) ProtoMessage() {} +func (*ServiceAccountTokenProjection) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{171} +} func (m *ServiceList) Reset() { *m = ServiceList{} } func (*ServiceList) ProtoMessage() {} -func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{168} } +func (*ServiceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{172} } func (m *ServicePort) Reset() { *m = ServicePort{} } func (*ServicePort) ProtoMessage() {} -func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{169} } +func (*ServicePort) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{173} } func (m *ServiceProxyOptions) Reset() { *m = ServiceProxyOptions{} } func (*ServiceProxyOptions) ProtoMessage() {} -func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{170} } +func (*ServiceProxyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{174} } func (m *ServiceSpec) Reset() { *m = ServiceSpec{} } func (*ServiceSpec) ProtoMessage() {} -func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{171} } +func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{175} } func (m *ServiceStatus) Reset() { *m = ServiceStatus{} } func (*ServiceStatus) ProtoMessage() {} -func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{172} } +func (*ServiceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{176} } func (m *SessionAffinityConfig) Reset() { *m = SessionAffinityConfig{} } func (*SessionAffinityConfig) ProtoMessage() {} -func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{173} } +func (*SessionAffinityConfig) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{177} } func (m *StorageOSPersistentVolumeSource) Reset() { *m = StorageOSPersistentVolumeSource{} } func (*StorageOSPersistentVolumeSource) ProtoMessage() {} func (*StorageOSPersistentVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{174} + return fileDescriptorGenerated, []int{178} } func (m *StorageOSVolumeSource) Reset() { *m = StorageOSVolumeSource{} } func (*StorageOSVolumeSource) ProtoMessage() {} -func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{175} } +func (*StorageOSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{179} } func (m *Sysctl) Reset() { *m = Sysctl{} } func (*Sysctl) ProtoMessage() {} -func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{176} } +func (*Sysctl) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{180} } func (m *TCPSocketAction) Reset() { *m = TCPSocketAction{} } func (*TCPSocketAction) ProtoMessage() {} -func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{177} } +func (*TCPSocketAction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{181} } func (m *Taint) Reset() { *m = Taint{} } func (*Taint) ProtoMessage() {} -func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{178} } +func (*Taint) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{182} } func (m *Toleration) Reset() { *m = Toleration{} } func (*Toleration) ProtoMessage() {} -func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{179} } +func (*Toleration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{183} } + +func (m *TopologySelectorLabelRequirement) Reset() { *m = TopologySelectorLabelRequirement{} } +func (*TopologySelectorLabelRequirement) ProtoMessage() {} +func (*TopologySelectorLabelRequirement) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{184} +} + +func (m *TopologySelectorTerm) Reset() { *m = TopologySelectorTerm{} } +func (*TopologySelectorTerm) ProtoMessage() {} +func (*TopologySelectorTerm) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{185} } func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} -func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{180} } +func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{186} } func (m *VolumeDevice) Reset() { *m = VolumeDevice{} } func (*VolumeDevice) ProtoMessage() {} -func (*VolumeDevice) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{181} } +func (*VolumeDevice) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{187} } func (m *VolumeMount) Reset() { *m = VolumeMount{} } func (*VolumeMount) ProtoMessage() {} -func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{182} } +func (*VolumeMount) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{188} } + +func (m *VolumeNodeAffinity) Reset() { *m = VolumeNodeAffinity{} } +func (*VolumeNodeAffinity) ProtoMessage() {} +func (*VolumeNodeAffinity) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{189} } func (m *VolumeProjection) Reset() { *m = VolumeProjection{} } func (*VolumeProjection) ProtoMessage() {} -func (*VolumeProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{183} } +func (*VolumeProjection) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{190} } func (m *VolumeSource) Reset() { *m = VolumeSource{} } func (*VolumeSource) ProtoMessage() {} -func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{184} } +func (*VolumeSource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{191} } func (m *VsphereVirtualDiskVolumeSource) Reset() { *m = VsphereVirtualDiskVolumeSource{} } func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {} func (*VsphereVirtualDiskVolumeSource) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{185} + return fileDescriptorGenerated, []int{192} } func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} } func (*WeightedPodAffinityTerm) ProtoMessage() {} func (*WeightedPodAffinityTerm) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{186} + return fileDescriptorGenerated, []int{193} } func init() { @@ -1060,6 +1105,7 @@ func init() { proto.RegisterType((*Capabilities)(nil), "k8s.io.api.core.v1.Capabilities") proto.RegisterType((*CephFSPersistentVolumeSource)(nil), "k8s.io.api.core.v1.CephFSPersistentVolumeSource") proto.RegisterType((*CephFSVolumeSource)(nil), "k8s.io.api.core.v1.CephFSVolumeSource") + proto.RegisterType((*CinderPersistentVolumeSource)(nil), "k8s.io.api.core.v1.CinderPersistentVolumeSource") proto.RegisterType((*CinderVolumeSource)(nil), "k8s.io.api.core.v1.CinderVolumeSource") proto.RegisterType((*ClientIPConfig)(nil), "k8s.io.api.core.v1.ClientIPConfig") proto.RegisterType((*ComponentCondition)(nil), "k8s.io.api.core.v1.ComponentCondition") @@ -1069,6 +1115,7 @@ func init() { proto.RegisterType((*ConfigMapEnvSource)(nil), "k8s.io.api.core.v1.ConfigMapEnvSource") proto.RegisterType((*ConfigMapKeySelector)(nil), "k8s.io.api.core.v1.ConfigMapKeySelector") proto.RegisterType((*ConfigMapList)(nil), "k8s.io.api.core.v1.ConfigMapList") + proto.RegisterType((*ConfigMapNodeConfigSource)(nil), "k8s.io.api.core.v1.ConfigMapNodeConfigSource") proto.RegisterType((*ConfigMapProjection)(nil), "k8s.io.api.core.v1.ConfigMapProjection") proto.RegisterType((*ConfigMapVolumeSource)(nil), "k8s.io.api.core.v1.ConfigMapVolumeSource") proto.RegisterType((*Container)(nil), "k8s.io.api.core.v1.Container") @@ -1080,7 +1127,6 @@ func init() { proto.RegisterType((*ContainerStateWaiting)(nil), "k8s.io.api.core.v1.ContainerStateWaiting") proto.RegisterType((*ContainerStatus)(nil), "k8s.io.api.core.v1.ContainerStatus") proto.RegisterType((*DaemonEndpoint)(nil), "k8s.io.api.core.v1.DaemonEndpoint") - proto.RegisterType((*DeleteOptions)(nil), "k8s.io.api.core.v1.DeleteOptions") proto.RegisterType((*DownwardAPIProjection)(nil), "k8s.io.api.core.v1.DownwardAPIProjection") proto.RegisterType((*DownwardAPIVolumeFile)(nil), "k8s.io.api.core.v1.DownwardAPIVolumeFile") proto.RegisterType((*DownwardAPIVolumeSource)(nil), "k8s.io.api.core.v1.DownwardAPIVolumeSource") @@ -1119,7 +1165,6 @@ func init() { proto.RegisterType((*LimitRangeList)(nil), "k8s.io.api.core.v1.LimitRangeList") proto.RegisterType((*LimitRangeSpec)(nil), "k8s.io.api.core.v1.LimitRangeSpec") proto.RegisterType((*List)(nil), "k8s.io.api.core.v1.List") - proto.RegisterType((*ListOptions)(nil), "k8s.io.api.core.v1.ListOptions") proto.RegisterType((*LoadBalancerIngress)(nil), "k8s.io.api.core.v1.LoadBalancerIngress") proto.RegisterType((*LoadBalancerStatus)(nil), "k8s.io.api.core.v1.LoadBalancerStatus") proto.RegisterType((*LocalObjectReference)(nil), "k8s.io.api.core.v1.LocalObjectReference") @@ -1134,6 +1179,7 @@ func init() { proto.RegisterType((*NodeAffinity)(nil), "k8s.io.api.core.v1.NodeAffinity") proto.RegisterType((*NodeCondition)(nil), "k8s.io.api.core.v1.NodeCondition") proto.RegisterType((*NodeConfigSource)(nil), "k8s.io.api.core.v1.NodeConfigSource") + proto.RegisterType((*NodeConfigStatus)(nil), "k8s.io.api.core.v1.NodeConfigStatus") proto.RegisterType((*NodeDaemonEndpoints)(nil), "k8s.io.api.core.v1.NodeDaemonEndpoints") proto.RegisterType((*NodeList)(nil), "k8s.io.api.core.v1.NodeList") proto.RegisterType((*NodeProxyOptions)(nil), "k8s.io.api.core.v1.NodeProxyOptions") @@ -1145,7 +1191,6 @@ func init() { proto.RegisterType((*NodeStatus)(nil), "k8s.io.api.core.v1.NodeStatus") proto.RegisterType((*NodeSystemInfo)(nil), "k8s.io.api.core.v1.NodeSystemInfo") proto.RegisterType((*ObjectFieldSelector)(nil), "k8s.io.api.core.v1.ObjectFieldSelector") - proto.RegisterType((*ObjectMeta)(nil), "k8s.io.api.core.v1.ObjectMeta") proto.RegisterType((*ObjectReference)(nil), "k8s.io.api.core.v1.ObjectReference") proto.RegisterType((*PersistentVolume)(nil), "k8s.io.api.core.v1.PersistentVolume") proto.RegisterType((*PersistentVolumeClaim)(nil), "k8s.io.api.core.v1.PersistentVolumeClaim") @@ -1172,6 +1217,7 @@ func init() { proto.RegisterType((*PodLogOptions)(nil), "k8s.io.api.core.v1.PodLogOptions") proto.RegisterType((*PodPortForwardOptions)(nil), "k8s.io.api.core.v1.PodPortForwardOptions") proto.RegisterType((*PodProxyOptions)(nil), "k8s.io.api.core.v1.PodProxyOptions") + proto.RegisterType((*PodReadinessGate)(nil), "k8s.io.api.core.v1.PodReadinessGate") proto.RegisterType((*PodSecurityContext)(nil), "k8s.io.api.core.v1.PodSecurityContext") proto.RegisterType((*PodSignature)(nil), "k8s.io.api.core.v1.PodSignature") proto.RegisterType((*PodSpec)(nil), "k8s.io.api.core.v1.PodSpec") @@ -1204,6 +1250,8 @@ func init() { proto.RegisterType((*SELinuxOptions)(nil), "k8s.io.api.core.v1.SELinuxOptions") proto.RegisterType((*ScaleIOPersistentVolumeSource)(nil), "k8s.io.api.core.v1.ScaleIOPersistentVolumeSource") proto.RegisterType((*ScaleIOVolumeSource)(nil), "k8s.io.api.core.v1.ScaleIOVolumeSource") + proto.RegisterType((*ScopeSelector)(nil), "k8s.io.api.core.v1.ScopeSelector") + proto.RegisterType((*ScopedResourceSelectorRequirement)(nil), "k8s.io.api.core.v1.ScopedResourceSelectorRequirement") proto.RegisterType((*Secret)(nil), "k8s.io.api.core.v1.Secret") proto.RegisterType((*SecretEnvSource)(nil), "k8s.io.api.core.v1.SecretEnvSource") proto.RegisterType((*SecretKeySelector)(nil), "k8s.io.api.core.v1.SecretKeySelector") @@ -1216,6 +1264,7 @@ func init() { proto.RegisterType((*Service)(nil), "k8s.io.api.core.v1.Service") proto.RegisterType((*ServiceAccount)(nil), "k8s.io.api.core.v1.ServiceAccount") proto.RegisterType((*ServiceAccountList)(nil), "k8s.io.api.core.v1.ServiceAccountList") + proto.RegisterType((*ServiceAccountTokenProjection)(nil), "k8s.io.api.core.v1.ServiceAccountTokenProjection") proto.RegisterType((*ServiceList)(nil), "k8s.io.api.core.v1.ServiceList") proto.RegisterType((*ServicePort)(nil), "k8s.io.api.core.v1.ServicePort") proto.RegisterType((*ServiceProxyOptions)(nil), "k8s.io.api.core.v1.ServiceProxyOptions") @@ -1228,9 +1277,12 @@ func init() { proto.RegisterType((*TCPSocketAction)(nil), "k8s.io.api.core.v1.TCPSocketAction") proto.RegisterType((*Taint)(nil), "k8s.io.api.core.v1.Taint") proto.RegisterType((*Toleration)(nil), "k8s.io.api.core.v1.Toleration") + proto.RegisterType((*TopologySelectorLabelRequirement)(nil), "k8s.io.api.core.v1.TopologySelectorLabelRequirement") + proto.RegisterType((*TopologySelectorTerm)(nil), "k8s.io.api.core.v1.TopologySelectorTerm") proto.RegisterType((*Volume)(nil), "k8s.io.api.core.v1.Volume") proto.RegisterType((*VolumeDevice)(nil), "k8s.io.api.core.v1.VolumeDevice") proto.RegisterType((*VolumeMount)(nil), "k8s.io.api.core.v1.VolumeMount") + proto.RegisterType((*VolumeNodeAffinity)(nil), "k8s.io.api.core.v1.VolumeNodeAffinity") proto.RegisterType((*VolumeProjection)(nil), "k8s.io.api.core.v1.VolumeProjection") proto.RegisterType((*VolumeSource)(nil), "k8s.io.api.core.v1.VolumeSource") proto.RegisterType((*VsphereVirtualDiskVolumeSource)(nil), "k8s.io.api.core.v1.VsphereVirtualDiskVolumeSource") @@ -1574,6 +1626,58 @@ func (m *CSIPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType))) i += copy(dAtA[i:], m.FSType) + if len(m.VolumeAttributes) > 0 { + keysForVolumeAttributes := make([]string, 0, len(m.VolumeAttributes)) + for k := range m.VolumeAttributes { + keysForVolumeAttributes = append(keysForVolumeAttributes, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForVolumeAttributes) + for _, k := range keysForVolumeAttributes { + dAtA[i] = 0x2a + i++ + v := m.VolumeAttributes[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.ControllerPublishSecretRef != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ControllerPublishSecretRef.Size())) + n6, err := m.ControllerPublishSecretRef.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.NodeStageSecretRef != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.NodeStageSecretRef.Size())) + n7, err := m.NodeStageSecretRef.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.NodePublishSecretRef != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.NodePublishSecretRef.Size())) + n8, err := m.NodePublishSecretRef.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } return i, nil } @@ -1671,11 +1775,11 @@ func (m *CephFSPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n6, err := m.SecretRef.MarshalTo(dAtA[i:]) + n9, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n6 + i += n9 } dAtA[i] = 0x30 i++ @@ -1734,11 +1838,11 @@ func (m *CephFSVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n7, err := m.SecretRef.MarshalTo(dAtA[i:]) + n10, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n7 + i += n10 } dAtA[i] = 0x30 i++ @@ -1751,6 +1855,50 @@ func (m *CephFSVolumeSource) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *CinderPersistentVolumeSource) 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 *CinderPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeID))) + i += copy(dAtA[i:], m.VolumeID) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.FSType))) + i += copy(dAtA[i:], m.FSType) + dAtA[i] = 0x18 + i++ + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if m.SecretRef != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) + n11, err := m.SecretRef.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} + func (m *CinderVolumeSource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1782,6 +1930,16 @@ func (m *CinderVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0 } i++ + if m.SecretRef != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) + n12, err := m.SecretRef.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } return i, nil } @@ -1860,11 +2018,11 @@ func (m *ComponentStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n8, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n13, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n13 if len(m.Conditions) > 0 { for _, msg := range m.Conditions { dAtA[i] = 0x12 @@ -1898,11 +2056,11 @@ func (m *ComponentStatusList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n9, err := m.ListMeta.MarshalTo(dAtA[i:]) + n14, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n14 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -1936,11 +2094,11 @@ func (m *ConfigMap) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n10, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n15, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n15 if len(m.Data) > 0 { keysForData := make([]string, 0, len(m.Data)) for k := range m.Data { @@ -2012,11 +2170,11 @@ func (m *ConfigMapEnvSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size())) - n11, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) + n16, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n16 if m.Optional != nil { dAtA[i] = 0x10 i++ @@ -2048,11 +2206,11 @@ func (m *ConfigMapKeySelector) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size())) - n12, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) + n17, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n17 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) @@ -2088,11 +2246,11 @@ func (m *ConfigMapList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n13, err := m.ListMeta.MarshalTo(dAtA[i:]) + n18, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n18 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -2108,6 +2266,44 @@ func (m *ConfigMapList) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ConfigMapNodeConfigSource) 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 *ConfigMapNodeConfigSource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i += copy(dAtA[i:], m.Namespace) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i += copy(dAtA[i:], m.UID) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i += copy(dAtA[i:], m.ResourceVersion) + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.KubeletConfigKey))) + i += copy(dAtA[i:], m.KubeletConfigKey) + return i, nil +} + func (m *ConfigMapProjection) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2126,11 +2322,11 @@ func (m *ConfigMapProjection) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size())) - n14, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) + n19, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n19 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -2174,11 +2370,11 @@ func (m *ConfigMapVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size())) - n15, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) + n20, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n20 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -2293,11 +2489,11 @@ func (m *Container) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x42 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Resources.Size())) - n16, err := m.Resources.MarshalTo(dAtA[i:]) + n21, err := m.Resources.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n21 if len(m.VolumeMounts) > 0 { for _, msg := range m.VolumeMounts { dAtA[i] = 0x4a @@ -2314,31 +2510,31 @@ func (m *Container) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LivenessProbe.Size())) - n17, err := m.LivenessProbe.MarshalTo(dAtA[i:]) + n22, err := m.LivenessProbe.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n22 } if m.ReadinessProbe != nil { dAtA[i] = 0x5a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ReadinessProbe.Size())) - n18, err := m.ReadinessProbe.MarshalTo(dAtA[i:]) + n23, err := m.ReadinessProbe.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n23 } if m.Lifecycle != nil { dAtA[i] = 0x62 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Lifecycle.Size())) - n19, err := m.Lifecycle.MarshalTo(dAtA[i:]) + n24, err := m.Lifecycle.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n24 } dAtA[i] = 0x6a i++ @@ -2352,11 +2548,11 @@ func (m *Container) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x7a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecurityContext.Size())) - n20, err := m.SecurityContext.MarshalTo(dAtA[i:]) + n25, err := m.SecurityContext.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n25 } dAtA[i] = 0x80 i++ @@ -2516,31 +2712,31 @@ func (m *ContainerState) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Waiting.Size())) - n21, err := m.Waiting.MarshalTo(dAtA[i:]) + n26, err := m.Waiting.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n26 } if m.Running != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Running.Size())) - n22, err := m.Running.MarshalTo(dAtA[i:]) + n27, err := m.Running.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n27 } if m.Terminated != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Terminated.Size())) - n23, err := m.Terminated.MarshalTo(dAtA[i:]) + n28, err := m.Terminated.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n28 } return i, nil } @@ -2563,11 +2759,11 @@ func (m *ContainerStateRunning) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n24, err := m.StartedAt.MarshalTo(dAtA[i:]) + n29, err := m.StartedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n24 + i += n29 return i, nil } @@ -2603,19 +2799,19 @@ func (m *ContainerStateTerminated) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n25, err := m.StartedAt.MarshalTo(dAtA[i:]) + n30, err := m.StartedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n25 + i += n30 dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FinishedAt.Size())) - n26, err := m.FinishedAt.MarshalTo(dAtA[i:]) + n31, err := m.FinishedAt.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n26 + i += n31 dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerID))) @@ -2671,19 +2867,19 @@ func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.State.Size())) - n27, err := m.State.MarshalTo(dAtA[i:]) + n32, err := m.State.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n27 + i += n32 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTerminationState.Size())) - n28, err := m.LastTerminationState.MarshalTo(dAtA[i:]) + n33, err := m.LastTerminationState.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n28 + i += n33 dAtA[i] = 0x20 i++ if m.Ready { @@ -2731,55 +2927,6 @@ func (m *DaemonEndpoint) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *DeleteOptions) 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 *DeleteOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.GracePeriodSeconds != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(*m.GracePeriodSeconds)) - } - if m.Preconditions != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Preconditions.Size())) - n29, err := m.Preconditions.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n29 - } - if m.OrphanDependents != nil { - dAtA[i] = 0x18 - i++ - if *m.OrphanDependents { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.PropagationPolicy != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PropagationPolicy))) - i += copy(dAtA[i:], *m.PropagationPolicy) - } - return i, nil -} - func (m *DownwardAPIProjection) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2833,21 +2980,21 @@ func (m *DownwardAPIVolumeFile) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FieldRef.Size())) - n30, err := m.FieldRef.MarshalTo(dAtA[i:]) + n34, err := m.FieldRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n30 + i += n34 } if m.ResourceFieldRef != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceFieldRef.Size())) - n31, err := m.ResourceFieldRef.MarshalTo(dAtA[i:]) + n35, err := m.ResourceFieldRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n31 + i += n35 } if m.Mode != nil { dAtA[i] = 0x20 @@ -2915,11 +3062,11 @@ func (m *EmptyDirVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SizeLimit.Size())) - n32, err := m.SizeLimit.MarshalTo(dAtA[i:]) + n36, err := m.SizeLimit.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n32 + i += n36 } return i, nil } @@ -2947,11 +3094,11 @@ func (m *EndpointAddress) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetRef.Size())) - n33, err := m.TargetRef.MarshalTo(dAtA[i:]) + n37, err := m.TargetRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n33 + i += n37 } dAtA[i] = 0x1a i++ @@ -3067,11 +3214,11 @@ func (m *Endpoints) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n34, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n38, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n34 + i += n38 if len(m.Subsets) > 0 { for _, msg := range m.Subsets { dAtA[i] = 0x12 @@ -3105,11 +3252,11 @@ func (m *EndpointsList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n35, err := m.ListMeta.MarshalTo(dAtA[i:]) + n39, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n35 + i += n39 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -3148,21 +3295,21 @@ func (m *EnvFromSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMapRef.Size())) - n36, err := m.ConfigMapRef.MarshalTo(dAtA[i:]) + n40, err := m.ConfigMapRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n36 + i += n40 } if m.SecretRef != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n37, err := m.SecretRef.MarshalTo(dAtA[i:]) + n41, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n37 + i += n41 } return i, nil } @@ -3194,11 +3341,11 @@ func (m *EnvVar) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ValueFrom.Size())) - n38, err := m.ValueFrom.MarshalTo(dAtA[i:]) + n42, err := m.ValueFrom.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n38 + i += n42 } return i, nil } @@ -3222,41 +3369,41 @@ func (m *EnvVarSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FieldRef.Size())) - n39, err := m.FieldRef.MarshalTo(dAtA[i:]) + n43, err := m.FieldRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n39 + i += n43 } if m.ResourceFieldRef != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceFieldRef.Size())) - n40, err := m.ResourceFieldRef.MarshalTo(dAtA[i:]) + n44, err := m.ResourceFieldRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n40 + i += n44 } if m.ConfigMapKeyRef != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMapKeyRef.Size())) - n41, err := m.ConfigMapKeyRef.MarshalTo(dAtA[i:]) + n45, err := m.ConfigMapKeyRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n41 + i += n45 } if m.SecretKeyRef != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretKeyRef.Size())) - n42, err := m.SecretKeyRef.MarshalTo(dAtA[i:]) + n46, err := m.SecretKeyRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n42 + i += n46 } return i, nil } @@ -3279,19 +3426,19 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n43, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n47, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n43 + i += n47 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.InvolvedObject.Size())) - n44, err := m.InvolvedObject.MarshalTo(dAtA[i:]) + n48, err := m.InvolvedObject.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n44 + i += n48 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -3303,27 +3450,27 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size())) - n45, err := m.Source.MarshalTo(dAtA[i:]) + n49, err := m.Source.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n45 + i += n49 dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FirstTimestamp.Size())) - n46, err := m.FirstTimestamp.MarshalTo(dAtA[i:]) + n50, err := m.FirstTimestamp.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n46 + i += n50 dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTimestamp.Size())) - n47, err := m.LastTimestamp.MarshalTo(dAtA[i:]) + n51, err := m.LastTimestamp.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n47 + i += n51 dAtA[i] = 0x40 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Count)) @@ -3334,20 +3481,20 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.EventTime.Size())) - n48, err := m.EventTime.MarshalTo(dAtA[i:]) + n52, err := m.EventTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n48 + i += n52 if m.Series != nil { dAtA[i] = 0x5a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Series.Size())) - n49, err := m.Series.MarshalTo(dAtA[i:]) + n53, err := m.Series.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n49 + i += n53 } dAtA[i] = 0x62 i++ @@ -3357,11 +3504,11 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x6a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Related.Size())) - n50, err := m.Related.MarshalTo(dAtA[i:]) + n54, err := m.Related.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n50 + i += n54 } dAtA[i] = 0x72 i++ @@ -3392,11 +3539,11 @@ func (m *EventList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n51, err := m.ListMeta.MarshalTo(dAtA[i:]) + n55, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n51 + i += n55 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -3433,11 +3580,11 @@ func (m *EventSeries) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastObservedTime.Size())) - n52, err := m.LastObservedTime.MarshalTo(dAtA[i:]) + n56, err := m.LastObservedTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n52 + i += n56 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.State))) @@ -3596,11 +3743,11 @@ func (m *FlexPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n53, err := m.SecretRef.MarshalTo(dAtA[i:]) + n57, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n53 + i += n57 } dAtA[i] = 0x20 i++ @@ -3662,11 +3809,11 @@ func (m *FlexVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n54, err := m.SecretRef.MarshalTo(dAtA[i:]) + n58, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n54 + i += n58 } dAtA[i] = 0x20 i++ @@ -3850,11 +3997,11 @@ func (m *HTTPGetAction) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size())) - n55, err := m.Port.MarshalTo(dAtA[i:]) + n59, err := m.Port.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n55 + i += n59 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host))) @@ -3923,31 +4070,31 @@ func (m *Handler) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Exec.Size())) - n56, err := m.Exec.MarshalTo(dAtA[i:]) + n60, err := m.Exec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n56 + i += n60 } if m.HTTPGet != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.HTTPGet.Size())) - n57, err := m.HTTPGet.MarshalTo(dAtA[i:]) + n61, err := m.HTTPGet.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n57 + i += n61 } if m.TCPSocket != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TCPSocket.Size())) - n58, err := m.TCPSocket.MarshalTo(dAtA[i:]) + n62, err := m.TCPSocket.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n58 + i += n62 } return i, nil } @@ -4086,11 +4233,11 @@ func (m *ISCSIPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n59, err := m.SecretRef.MarshalTo(dAtA[i:]) + n63, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n59 + i += n63 } dAtA[i] = 0x58 i++ @@ -4178,11 +4325,11 @@ func (m *ISCSIVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x52 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n60, err := m.SecretRef.MarshalTo(dAtA[i:]) + n64, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n60 + i += n64 } dAtA[i] = 0x58 i++ @@ -4251,21 +4398,21 @@ func (m *Lifecycle) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PostStart.Size())) - n61, err := m.PostStart.MarshalTo(dAtA[i:]) + n65, err := m.PostStart.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n61 + i += n65 } if m.PreStop != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PreStop.Size())) - n62, err := m.PreStop.MarshalTo(dAtA[i:]) + n66, err := m.PreStop.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n62 + i += n66 } return i, nil } @@ -4288,19 +4435,19 @@ func (m *LimitRange) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n63, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n67, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n63 + i += n67 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n64, err := m.Spec.MarshalTo(dAtA[i:]) + n68, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n64 + i += n68 return i, nil } @@ -4347,11 +4494,11 @@ func (m *LimitRangeItem) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n65, err := (&v).MarshalTo(dAtA[i:]) + n69, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n65 + i += n69 } } if len(m.Min) > 0 { @@ -4378,11 +4525,11 @@ func (m *LimitRangeItem) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n66, err := (&v).MarshalTo(dAtA[i:]) + n70, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n66 + i += n70 } } if len(m.Default) > 0 { @@ -4409,11 +4556,11 @@ func (m *LimitRangeItem) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n67, err := (&v).MarshalTo(dAtA[i:]) + n71, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n67 + i += n71 } } if len(m.DefaultRequest) > 0 { @@ -4440,11 +4587,11 @@ func (m *LimitRangeItem) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n68, err := (&v).MarshalTo(dAtA[i:]) + n72, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n68 + i += n72 } } if len(m.MaxLimitRequestRatio) > 0 { @@ -4471,11 +4618,11 @@ func (m *LimitRangeItem) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n69, err := (&v).MarshalTo(dAtA[i:]) + n73, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n69 + i += n73 } } return i, nil @@ -4499,11 +4646,11 @@ func (m *LimitRangeList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n70, err := m.ListMeta.MarshalTo(dAtA[i:]) + n74, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n70 + i += n74 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -4567,11 +4714,11 @@ func (m *List) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n71, err := m.ListMeta.MarshalTo(dAtA[i:]) + n75, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n71 + i += n75 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -4587,57 +4734,6 @@ func (m *List) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ListOptions) 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 *ListOptions) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LabelSelector))) - i += copy(dAtA[i:], m.LabelSelector) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldSelector))) - i += copy(dAtA[i:], m.FieldSelector) - dAtA[i] = 0x18 - i++ - if m.Watch { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) - i += copy(dAtA[i:], m.ResourceVersion) - if m.TimeoutSeconds != nil { - dAtA[i] = 0x28 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) - } - dAtA[i] = 0x30 - i++ - if m.IncludeUninitialized { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} - func (m *LoadBalancerIngress) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4790,27 +4886,27 @@ func (m *Namespace) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n72, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n76, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n72 + i += n76 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n73, err := m.Spec.MarshalTo(dAtA[i:]) + n77, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n73 + i += n77 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n74, err := m.Status.MarshalTo(dAtA[i:]) + n78, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n74 + i += n78 return i, nil } @@ -4832,11 +4928,11 @@ func (m *NamespaceList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n75, err := m.ListMeta.MarshalTo(dAtA[i:]) + n79, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n75 + i += n79 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -4925,27 +5021,27 @@ func (m *Node) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n76, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n80, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n76 + i += n80 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n77, err := m.Spec.MarshalTo(dAtA[i:]) + n81, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n77 + i += n81 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n78, err := m.Status.MarshalTo(dAtA[i:]) + n82, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n78 + i += n82 return i, nil } @@ -4994,11 +5090,11 @@ func (m *NodeAffinity) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RequiredDuringSchedulingIgnoredDuringExecution.Size())) - n79, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(dAtA[i:]) + n83, err := m.RequiredDuringSchedulingIgnoredDuringExecution.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n79 + i += n83 } if len(m.PreferredDuringSchedulingIgnoredDuringExecution) > 0 { for _, msg := range m.PreferredDuringSchedulingIgnoredDuringExecution { @@ -5041,19 +5137,19 @@ func (m *NodeCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastHeartbeatTime.Size())) - n80, err := m.LastHeartbeatTime.MarshalTo(dAtA[i:]) + n84, err := m.LastHeartbeatTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n80 + i += n84 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n81, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n85, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n81 + i += n85 dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -5080,16 +5176,68 @@ func (m *NodeConfigSource) MarshalTo(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ConfigMapRef != nil { + if m.ConfigMap != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMap.Size())) + n86, err := m.ConfigMap.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + return i, nil +} + +func (m *NodeConfigStatus) 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 *NodeConfigStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Assigned != nil { dAtA[i] = 0xa i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMapRef.Size())) - n82, err := m.ConfigMapRef.MarshalTo(dAtA[i:]) + i = encodeVarintGenerated(dAtA, i, uint64(m.Assigned.Size())) + n87, err := m.Assigned.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.Active != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Active.Size())) + n88, err := m.Active.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.LastKnownGood != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.LastKnownGood.Size())) + n89, err := m.LastKnownGood.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n82 + i += n89 } + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Error))) + i += copy(dAtA[i:], m.Error) return i, nil } @@ -5111,11 +5259,11 @@ func (m *NodeDaemonEndpoints) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.KubeletEndpoint.Size())) - n83, err := m.KubeletEndpoint.MarshalTo(dAtA[i:]) + n90, err := m.KubeletEndpoint.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n83 + i += n90 return i, nil } @@ -5137,11 +5285,11 @@ func (m *NodeList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n84, err := m.ListMeta.MarshalTo(dAtA[i:]) + n91, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n84 + i += n91 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -5218,11 +5366,11 @@ func (m *NodeResources) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n85, err := (&v).MarshalTo(dAtA[i:]) + n92, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n85 + i += n92 } } return i, nil @@ -5326,6 +5474,18 @@ func (m *NodeSelectorTerm) MarshalTo(dAtA []byte) (int, error) { i += n } } + if len(m.MatchFields) > 0 { + for _, msg := range m.MatchFields { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -5350,8 +5510,8 @@ func (m *NodeSpec) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], m.PodCIDR) dAtA[i] = 0x12 i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExternalID))) - i += copy(dAtA[i:], m.ExternalID) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DoNotUse_ExternalID))) + i += copy(dAtA[i:], m.DoNotUse_ExternalID) dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProviderID))) @@ -5380,11 +5540,11 @@ func (m *NodeSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigSource.Size())) - n86, err := m.ConfigSource.MarshalTo(dAtA[i:]) + n93, err := m.ConfigSource.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n86 + i += n93 } return i, nil } @@ -5428,11 +5588,11 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n87, err := (&v).MarshalTo(dAtA[i:]) + n94, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n87 + i += n94 } } if len(m.Allocatable) > 0 { @@ -5459,11 +5619,11 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n88, err := (&v).MarshalTo(dAtA[i:]) + n95, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n88 + i += n95 } } dAtA[i] = 0x1a @@ -5497,19 +5657,19 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.DaemonEndpoints.Size())) - n89, err := m.DaemonEndpoints.MarshalTo(dAtA[i:]) + n96, err := m.DaemonEndpoints.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n89 + i += n96 dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.NodeInfo.Size())) - n90, err := m.NodeInfo.MarshalTo(dAtA[i:]) + n97, err := m.NodeInfo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n90 + i += n97 if len(m.Images) > 0 { for _, msg := range m.Images { dAtA[i] = 0x42 @@ -5549,6 +5709,16 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { i += n } } + if m.Config != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Config.Size())) + n98, err := m.Config.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + } return i, nil } @@ -5636,161 +5806,6 @@ func (m *ObjectFieldSelector) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func (m *ObjectMeta) 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 *ObjectMeta) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.GenerateName))) - i += copy(dAtA[i:], m.GenerateName) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i += copy(dAtA[i:], m.Namespace) - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SelfLink))) - i += copy(dAtA[i:], m.SelfLink) - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i += copy(dAtA[i:], m.UID) - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) - i += copy(dAtA[i:], m.ResourceVersion) - dAtA[i] = 0x38 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.CreationTimestamp.Size())) - n91, err := m.CreationTimestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n91 - if m.DeletionTimestamp != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.DeletionTimestamp.Size())) - n92, err := m.DeletionTimestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n92 - } - if m.DeletionGracePeriodSeconds != nil { - dAtA[i] = 0x50 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(*m.DeletionGracePeriodSeconds)) - } - if len(m.Labels) > 0 { - keysForLabels := make([]string, 0, len(m.Labels)) - for k := range m.Labels { - keysForLabels = append(keysForLabels, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - for _, k := range keysForLabels { - dAtA[i] = 0x5a - i++ - v := m.Labels[string(k)] - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - if len(m.Annotations) > 0 { - keysForAnnotations := make([]string, 0, len(m.Annotations)) - for k := range m.Annotations { - keysForAnnotations = append(keysForAnnotations, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - for _, k := range keysForAnnotations { - dAtA[i] = 0x62 - i++ - v := m.Annotations[string(k)] - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - if len(m.OwnerReferences) > 0 { - for _, msg := range m.OwnerReferences { - dAtA[i] = 0x6a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Finalizers) > 0 { - for _, s := range m.Finalizers { - dAtA[i] = 0x72 - 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) - } - } - dAtA[i] = 0x7a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterName))) - i += copy(dAtA[i:], m.ClusterName) - if m.Initializers != nil { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Initializers.Size())) - n93, err := m.Initializers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n93 - } - return i, nil -} - func (m *ObjectReference) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -5855,27 +5870,27 @@ func (m *PersistentVolume) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n94, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n99, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n94 + i += n99 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n95, err := m.Spec.MarshalTo(dAtA[i:]) + n100, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n95 + i += n100 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n96, err := m.Status.MarshalTo(dAtA[i:]) + n101, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n96 + i += n101 return i, nil } @@ -5897,27 +5912,27 @@ func (m *PersistentVolumeClaim) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n97, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n102, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n97 + i += n102 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n98, err := m.Spec.MarshalTo(dAtA[i:]) + n103, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n98 + i += n103 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n99, err := m.Status.MarshalTo(dAtA[i:]) + n104, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n99 + i += n104 return i, nil } @@ -5947,19 +5962,19 @@ func (m *PersistentVolumeClaimCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastProbeTime.Size())) - n100, err := m.LastProbeTime.MarshalTo(dAtA[i:]) + n105, err := m.LastProbeTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n100 + i += n105 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n101, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n106, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n101 + i += n106 dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -5989,11 +6004,11 @@ func (m *PersistentVolumeClaimList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n102, err := m.ListMeta.MarshalTo(dAtA[i:]) + n107, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n102 + i += n107 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -6042,11 +6057,11 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Resources.Size())) - n103, err := m.Resources.MarshalTo(dAtA[i:]) + n108, err := m.Resources.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n103 + i += n108 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.VolumeName))) @@ -6055,11 +6070,11 @@ func (m *PersistentVolumeClaimSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Selector.Size())) - n104, err := m.Selector.MarshalTo(dAtA[i:]) + n109, err := m.Selector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n104 + i += n109 } if m.StorageClassName != nil { dAtA[i] = 0x2a @@ -6134,11 +6149,11 @@ func (m *PersistentVolumeClaimStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n105, err := (&v).MarshalTo(dAtA[i:]) + n110, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n105 + i += n110 } } if len(m.Conditions) > 0 { @@ -6204,11 +6219,11 @@ func (m *PersistentVolumeList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n106, err := m.ListMeta.MarshalTo(dAtA[i:]) + n111, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n106 + i += n111 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -6243,151 +6258,151 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.GCEPersistentDisk.Size())) - n107, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:]) + n112, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n107 + i += n112 } if m.AWSElasticBlockStore != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AWSElasticBlockStore.Size())) - n108, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:]) + n113, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n108 + i += n113 } if m.HostPath != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPath.Size())) - n109, err := m.HostPath.MarshalTo(dAtA[i:]) + n114, err := m.HostPath.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n109 + i += n114 } if m.Glusterfs != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Glusterfs.Size())) - n110, err := m.Glusterfs.MarshalTo(dAtA[i:]) + n115, err := m.Glusterfs.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n110 + i += n115 } if m.NFS != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.NFS.Size())) - n111, err := m.NFS.MarshalTo(dAtA[i:]) + n116, err := m.NFS.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n111 + i += n116 } if m.RBD != nil { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RBD.Size())) - n112, err := m.RBD.MarshalTo(dAtA[i:]) + n117, err := m.RBD.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n112 + i += n117 } if m.ISCSI != nil { dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ISCSI.Size())) - n113, err := m.ISCSI.MarshalTo(dAtA[i:]) + n118, err := m.ISCSI.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n113 + i += n118 } if m.Cinder != nil { dAtA[i] = 0x42 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Cinder.Size())) - n114, err := m.Cinder.MarshalTo(dAtA[i:]) + n119, err := m.Cinder.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n114 + i += n119 } if m.CephFS != nil { dAtA[i] = 0x4a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CephFS.Size())) - n115, err := m.CephFS.MarshalTo(dAtA[i:]) + n120, err := m.CephFS.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n115 + i += n120 } if m.FC != nil { dAtA[i] = 0x52 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FC.Size())) - n116, err := m.FC.MarshalTo(dAtA[i:]) + n121, err := m.FC.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n116 + i += n121 } if m.Flocker != nil { dAtA[i] = 0x5a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Flocker.Size())) - n117, err := m.Flocker.MarshalTo(dAtA[i:]) + n122, err := m.Flocker.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n117 + i += n122 } if m.FlexVolume != nil { dAtA[i] = 0x62 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FlexVolume.Size())) - n118, err := m.FlexVolume.MarshalTo(dAtA[i:]) + n123, err := m.FlexVolume.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n118 + i += n123 } if m.AzureFile != nil { dAtA[i] = 0x6a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureFile.Size())) - n119, err := m.AzureFile.MarshalTo(dAtA[i:]) + n124, err := m.AzureFile.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n119 + i += n124 } if m.VsphereVolume != nil { dAtA[i] = 0x72 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.VsphereVolume.Size())) - n120, err := m.VsphereVolume.MarshalTo(dAtA[i:]) + n125, err := m.VsphereVolume.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n120 + i += n125 } if m.Quobyte != nil { dAtA[i] = 0x7a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Quobyte.Size())) - n121, err := m.Quobyte.MarshalTo(dAtA[i:]) + n126, err := m.Quobyte.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n121 + i += n126 } if m.AzureDisk != nil { dAtA[i] = 0x82 @@ -6395,11 +6410,11 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureDisk.Size())) - n122, err := m.AzureDisk.MarshalTo(dAtA[i:]) + n127, err := m.AzureDisk.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n122 + i += n127 } if m.PhotonPersistentDisk != nil { dAtA[i] = 0x8a @@ -6407,11 +6422,11 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PhotonPersistentDisk.Size())) - n123, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:]) + n128, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n123 + i += n128 } if m.PortworxVolume != nil { dAtA[i] = 0x92 @@ -6419,11 +6434,11 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PortworxVolume.Size())) - n124, err := m.PortworxVolume.MarshalTo(dAtA[i:]) + n129, err := m.PortworxVolume.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n124 + i += n129 } if m.ScaleIO != nil { dAtA[i] = 0x9a @@ -6431,11 +6446,11 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleIO.Size())) - n125, err := m.ScaleIO.MarshalTo(dAtA[i:]) + n130, err := m.ScaleIO.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n125 + i += n130 } if m.Local != nil { dAtA[i] = 0xa2 @@ -6443,11 +6458,11 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Local.Size())) - n126, err := m.Local.MarshalTo(dAtA[i:]) + n131, err := m.Local.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n126 + i += n131 } if m.StorageOS != nil { dAtA[i] = 0xaa @@ -6455,11 +6470,11 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StorageOS.Size())) - n127, err := m.StorageOS.MarshalTo(dAtA[i:]) + n132, err := m.StorageOS.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n127 + i += n132 } if m.CSI != nil { dAtA[i] = 0xb2 @@ -6467,11 +6482,11 @@ func (m *PersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CSI.Size())) - n128, err := m.CSI.MarshalTo(dAtA[i:]) + n133, err := m.CSI.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n128 + i += n133 } return i, nil } @@ -6515,21 +6530,21 @@ func (m *PersistentVolumeSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n129, err := (&v).MarshalTo(dAtA[i:]) + n134, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n129 + i += n134 } } dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PersistentVolumeSource.Size())) - n130, err := m.PersistentVolumeSource.MarshalTo(dAtA[i:]) + n135, err := m.PersistentVolumeSource.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n130 + i += n135 if len(m.AccessModes) > 0 { for _, s := range m.AccessModes { dAtA[i] = 0x1a @@ -6549,11 +6564,11 @@ func (m *PersistentVolumeSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ClaimRef.Size())) - n131, err := m.ClaimRef.MarshalTo(dAtA[i:]) + n136, err := m.ClaimRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n131 + i += n136 } dAtA[i] = 0x2a i++ @@ -6584,6 +6599,16 @@ func (m *PersistentVolumeSpec) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VolumeMode))) i += copy(dAtA[i:], *m.VolumeMode) } + if m.NodeAffinity != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.NodeAffinity.Size())) + n137, err := m.NodeAffinity.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n137 + } return i, nil } @@ -6661,27 +6686,27 @@ func (m *Pod) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n132, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n138, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n132 + i += n138 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n133, err := m.Spec.MarshalTo(dAtA[i:]) + n139, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n133 + i += n139 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n134, err := m.Status.MarshalTo(dAtA[i:]) + n140, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n134 + i += n140 return i, nil } @@ -6746,11 +6771,11 @@ func (m *PodAffinityTerm) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LabelSelector.Size())) - n135, err := m.LabelSelector.MarshalTo(dAtA[i:]) + n141, err := m.LabelSelector.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n135 + i += n141 } if len(m.Namespaces) > 0 { for _, s := range m.Namespaces { @@ -6896,19 +6921,19 @@ func (m *PodCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastProbeTime.Size())) - n136, err := m.LastProbeTime.MarshalTo(dAtA[i:]) + n142, err := m.LastProbeTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n136 + i += n142 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n137, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n143, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n137 + i += n143 dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -7095,11 +7120,11 @@ func (m *PodList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n138, err := m.ListMeta.MarshalTo(dAtA[i:]) + n144, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n138 + i += n144 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -7159,11 +7184,11 @@ func (m *PodLogOptions) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SinceTime.Size())) - n139, err := m.SinceTime.MarshalTo(dAtA[i:]) + n145, err := m.SinceTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n139 + i += n145 } dAtA[i] = 0x30 i++ @@ -7233,6 +7258,28 @@ func (m *PodProxyOptions) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *PodReadinessGate) 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 *PodReadinessGate) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConditionType))) + i += copy(dAtA[i:], m.ConditionType) + return i, nil +} + func (m *PodSecurityContext) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -7252,11 +7299,11 @@ func (m *PodSecurityContext) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size())) - n140, err := m.SELinuxOptions.MarshalTo(dAtA[i:]) + n146, err := m.SELinuxOptions.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n140 + i += n146 } if m.RunAsUser != nil { dAtA[i] = 0x10 @@ -7285,6 +7332,23 @@ func (m *PodSecurityContext) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(*m.FSGroup)) } + if m.RunAsGroup != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.RunAsGroup)) + } + if len(m.Sysctls) > 0 { + for _, msg := range m.Sysctls { + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -7307,11 +7371,11 @@ func (m *PodSignature) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PodController.Size())) - n141, err := m.PodController.MarshalTo(dAtA[i:]) + n147, err := m.PodController.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n141 + i += n147 } return i, nil } @@ -7435,11 +7499,11 @@ func (m *PodSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x72 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecurityContext.Size())) - n142, err := m.SecurityContext.MarshalTo(dAtA[i:]) + n148, err := m.SecurityContext.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n142 + i += n148 } if len(m.ImagePullSecrets) > 0 { for _, msg := range m.ImagePullSecrets { @@ -7471,11 +7535,11 @@ func (m *PodSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Affinity.Size())) - n143, err := m.Affinity.MarshalTo(dAtA[i:]) + n149, err := m.Affinity.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n143 + i += n149 } dAtA[i] = 0x9a i++ @@ -7556,11 +7620,45 @@ func (m *PodSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.DNSConfig.Size())) - n144, err := m.DNSConfig.MarshalTo(dAtA[i:]) + n150, err := m.DNSConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n144 + i += n150 + } + if m.ShareProcessNamespace != nil { + dAtA[i] = 0xd8 + i++ + dAtA[i] = 0x1 + i++ + if *m.ShareProcessNamespace { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.ReadinessGates) > 0 { + for _, msg := range m.ReadinessGates { + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.RuntimeClassName != nil { + dAtA[i] = 0xea + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.RuntimeClassName))) + i += copy(dAtA[i:], *m.RuntimeClassName) } return i, nil } @@ -7616,11 +7714,11 @@ func (m *PodStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StartTime.Size())) - n145, err := m.StartTime.MarshalTo(dAtA[i:]) + n151, err := m.StartTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n145 + i += n151 } if len(m.ContainerStatuses) > 0 { for _, msg := range m.ContainerStatuses { @@ -7675,19 +7773,19 @@ func (m *PodStatusResult) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n146, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n152, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n146 + i += n152 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n147, err := m.Status.MarshalTo(dAtA[i:]) + n153, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n147 + i += n153 return i, nil } @@ -7709,19 +7807,19 @@ func (m *PodTemplate) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n148, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n154, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n148 + i += n154 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n149, err := m.Template.MarshalTo(dAtA[i:]) + n155, err := m.Template.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n149 + i += n155 return i, nil } @@ -7743,11 +7841,11 @@ func (m *PodTemplateList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n150, err := m.ListMeta.MarshalTo(dAtA[i:]) + n156, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n150 + i += n156 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -7781,19 +7879,19 @@ func (m *PodTemplateSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n151, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n157, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n151 + i += n157 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n152, err := m.Spec.MarshalTo(dAtA[i:]) + n158, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n152 + i += n158 return i, nil } @@ -7873,19 +7971,19 @@ func (m *PreferAvoidPodsEntry) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PodSignature.Size())) - n153, err := m.PodSignature.MarshalTo(dAtA[i:]) + n159, err := m.PodSignature.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n153 + i += n159 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.EvictionTime.Size())) - n154, err := m.EvictionTime.MarshalTo(dAtA[i:]) + n160, err := m.EvictionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n154 + i += n160 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -7918,11 +8016,11 @@ func (m *PreferredSchedulingTerm) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Preference.Size())) - n155, err := m.Preference.MarshalTo(dAtA[i:]) + n161, err := m.Preference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n155 + i += n161 return i, nil } @@ -7944,11 +8042,11 @@ func (m *Probe) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Handler.Size())) - n156, err := m.Handler.MarshalTo(dAtA[i:]) + n162, err := m.Handler.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n156 + i += n162 dAtA[i] = 0x10 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.InitialDelaySeconds)) @@ -8098,11 +8196,11 @@ func (m *RBDPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n157, err := m.SecretRef.MarshalTo(dAtA[i:]) + n163, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n157 + i += n163 } dAtA[i] = 0x40 i++ @@ -8169,11 +8267,11 @@ func (m *RBDVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n158, err := m.SecretRef.MarshalTo(dAtA[i:]) + n164, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n158 + i += n164 } dAtA[i] = 0x40 i++ @@ -8204,11 +8302,11 @@ func (m *RangeAllocation) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n159, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n165, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n159 + i += n165 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Range))) @@ -8240,27 +8338,27 @@ func (m *ReplicationController) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n160, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n166, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n160 + i += n166 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n161, err := m.Spec.MarshalTo(dAtA[i:]) + n167, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n161 + i += n167 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n162, err := m.Status.MarshalTo(dAtA[i:]) + n168, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n162 + i += n168 return i, nil } @@ -8290,11 +8388,11 @@ func (m *ReplicationControllerCondition) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LastTransitionTime.Size())) - n163, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) + n169, err := m.LastTransitionTime.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n163 + i += n169 dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) @@ -8324,11 +8422,11 @@ func (m *ReplicationControllerList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n164, err := m.ListMeta.MarshalTo(dAtA[i:]) + n170, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n164 + i += n170 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -8390,11 +8488,11 @@ func (m *ReplicationControllerSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n165, err := m.Template.MarshalTo(dAtA[i:]) + n171, err := m.Template.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n165 + i += n171 } dAtA[i] = 0x20 i++ @@ -8473,11 +8571,11 @@ func (m *ResourceFieldSelector) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Divisor.Size())) - n166, err := m.Divisor.MarshalTo(dAtA[i:]) + n172, err := m.Divisor.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n166 + i += n172 return i, nil } @@ -8499,27 +8597,27 @@ func (m *ResourceQuota) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n167, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n173, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n167 + i += n173 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n168, err := m.Spec.MarshalTo(dAtA[i:]) + n174, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n168 + i += n174 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n169, err := m.Status.MarshalTo(dAtA[i:]) + n175, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n169 + i += n175 return i, nil } @@ -8541,11 +8639,11 @@ func (m *ResourceQuotaList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n170, err := m.ListMeta.MarshalTo(dAtA[i:]) + n176, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n170 + i += n176 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -8600,11 +8698,11 @@ func (m *ResourceQuotaSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n171, err := (&v).MarshalTo(dAtA[i:]) + n177, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n171 + i += n177 } } if len(m.Scopes) > 0 { @@ -8622,6 +8720,16 @@ func (m *ResourceQuotaSpec) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], s) } } + if m.ScopeSelector != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ScopeSelector.Size())) + n178, err := m.ScopeSelector.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n178 + } return i, nil } @@ -8664,11 +8772,11 @@ func (m *ResourceQuotaStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n172, err := (&v).MarshalTo(dAtA[i:]) + n179, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n172 + i += n179 } } if len(m.Used) > 0 { @@ -8695,11 +8803,11 @@ func (m *ResourceQuotaStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n173, err := (&v).MarshalTo(dAtA[i:]) + n180, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n173 + i += n180 } } return i, nil @@ -8744,11 +8852,11 @@ func (m *ResourceRequirements) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n174, err := (&v).MarshalTo(dAtA[i:]) + n181, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n174 + i += n181 } } if len(m.Requests) > 0 { @@ -8775,11 +8883,11 @@ func (m *ResourceRequirements) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n175, err := (&v).MarshalTo(dAtA[i:]) + n182, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n175 + i += n182 } } return i, nil @@ -8846,11 +8954,11 @@ func (m *ScaleIOPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n176, err := m.SecretRef.MarshalTo(dAtA[i:]) + n183, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n176 + i += n183 } dAtA[i] = 0x20 i++ @@ -8918,11 +9026,11 @@ func (m *ScaleIOVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n177, err := m.SecretRef.MarshalTo(dAtA[i:]) + n184, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n177 + i += n184 } dAtA[i] = 0x20 i++ @@ -8963,6 +9071,77 @@ func (m *ScaleIOVolumeSource) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ScopeSelector) 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 *ScopeSelector) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.MatchExpressions) > 0 { + for _, msg := range m.MatchExpressions { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ScopedResourceSelectorRequirement) 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 *ScopedResourceSelectorRequirement) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ScopeName))) + i += copy(dAtA[i:], m.ScopeName) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operator))) + i += copy(dAtA[i:], m.Operator) + if len(m.Values) > 0 { + for _, s := range m.Values { + dAtA[i] = 0x1a + 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) + } + } + return i, nil +} + func (m *Secret) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -8981,11 +9160,11 @@ func (m *Secret) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n178, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n185, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n178 + i += n185 if len(m.Data) > 0 { keysForData := make([]string, 0, len(m.Data)) for k := range m.Data { @@ -9061,11 +9240,11 @@ func (m *SecretEnvSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size())) - n179, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) + n186, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n179 + i += n186 if m.Optional != nil { dAtA[i] = 0x10 i++ @@ -9097,11 +9276,11 @@ func (m *SecretKeySelector) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size())) - n180, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) + n187, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n180 + i += n187 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) @@ -9137,11 +9316,11 @@ func (m *SecretList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n181, err := m.ListMeta.MarshalTo(dAtA[i:]) + n188, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n181 + i += n188 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -9175,11 +9354,11 @@ func (m *SecretProjection) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LocalObjectReference.Size())) - n182, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) + n189, err := m.LocalObjectReference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n182 + i += n189 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -9299,11 +9478,11 @@ func (m *SecurityContext) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Capabilities.Size())) - n183, err := m.Capabilities.MarshalTo(dAtA[i:]) + n190, err := m.Capabilities.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n183 + i += n190 } if m.Privileged != nil { dAtA[i] = 0x10 @@ -9319,11 +9498,11 @@ func (m *SecurityContext) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size())) - n184, err := m.SELinuxOptions.MarshalTo(dAtA[i:]) + n191, err := m.SELinuxOptions.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n184 + i += n191 } if m.RunAsUser != nil { dAtA[i] = 0x20 @@ -9360,6 +9539,11 @@ func (m *SecurityContext) MarshalTo(dAtA []byte) (int, error) { } i++ } + if m.RunAsGroup != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.RunAsGroup)) + } return i, nil } @@ -9381,11 +9565,11 @@ func (m *SerializedReference) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Reference.Size())) - n185, err := m.Reference.MarshalTo(dAtA[i:]) + n192, err := m.Reference.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n185 + i += n192 return i, nil } @@ -9407,27 +9591,27 @@ func (m *Service) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n186, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n193, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n186 + i += n193 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n187, err := m.Spec.MarshalTo(dAtA[i:]) + n194, err := m.Spec.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n187 + i += n194 dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n188, err := m.Status.MarshalTo(dAtA[i:]) + n195, err := m.Status.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n188 + i += n195 return i, nil } @@ -9449,11 +9633,11 @@ func (m *ServiceAccount) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n189, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + n196, err := m.ObjectMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n189 + i += n196 if len(m.Secrets) > 0 { for _, msg := range m.Secrets { dAtA[i] = 0x12 @@ -9509,11 +9693,11 @@ func (m *ServiceAccountList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n190, err := m.ListMeta.MarshalTo(dAtA[i:]) + n197, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n190 + i += n197 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -9529,6 +9713,37 @@ func (m *ServiceAccountList) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *ServiceAccountTokenProjection) 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 *ServiceAccountTokenProjection) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Audience))) + i += copy(dAtA[i:], m.Audience) + if m.ExpirationSeconds != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(*m.ExpirationSeconds)) + } + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) + return i, nil +} + func (m *ServiceList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -9547,11 +9762,11 @@ func (m *ServiceList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n191, err := m.ListMeta.MarshalTo(dAtA[i:]) + n198, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n191 + i += n198 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -9596,11 +9811,11 @@ func (m *ServicePort) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TargetPort.Size())) - n192, err := m.TargetPort.MarshalTo(dAtA[i:]) + n199, err := m.TargetPort.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n192 + i += n199 dAtA[i] = 0x28 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.NodePort)) @@ -9747,11 +9962,11 @@ func (m *ServiceSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x72 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SessionAffinityConfig.Size())) - n193, err := m.SessionAffinityConfig.MarshalTo(dAtA[i:]) + n200, err := m.SessionAffinityConfig.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n193 + i += n200 } return i, nil } @@ -9774,11 +9989,11 @@ func (m *ServiceStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.LoadBalancer.Size())) - n194, err := m.LoadBalancer.MarshalTo(dAtA[i:]) + n201, err := m.LoadBalancer.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n194 + i += n201 return i, nil } @@ -9801,11 +10016,11 @@ func (m *SessionAffinityConfig) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ClientIP.Size())) - n195, err := m.ClientIP.MarshalTo(dAtA[i:]) + n202, err := m.ClientIP.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n195 + i += n202 } return i, nil } @@ -9849,11 +10064,11 @@ func (m *StorageOSPersistentVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n196, err := m.SecretRef.MarshalTo(dAtA[i:]) + n203, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n196 + i += n203 } return i, nil } @@ -9897,11 +10112,11 @@ func (m *StorageOSVolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.SecretRef.Size())) - n197, err := m.SecretRef.MarshalTo(dAtA[i:]) + n204, err := m.SecretRef.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n197 + i += n204 } return i, nil } @@ -9950,11 +10165,11 @@ func (m *TCPSocketAction) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Port.Size())) - n198, err := m.Port.MarshalTo(dAtA[i:]) + n205, err := m.Port.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n198 + i += n205 dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host))) @@ -9993,11 +10208,11 @@ func (m *Taint) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.TimeAdded.Size())) - n199, err := m.TimeAdded.MarshalTo(dAtA[i:]) + n206, err := m.TimeAdded.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n199 + i += n206 } return i, nil } @@ -10041,6 +10256,73 @@ func (m *Toleration) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *TopologySelectorLabelRequirement) 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 *TopologySelectorLabelRequirement) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + if len(m.Values) > 0 { + for _, s := range m.Values { + dAtA[i] = 0x12 + 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) + } + } + return i, nil +} + +func (m *TopologySelectorTerm) 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 *TopologySelectorTerm) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.MatchLabelExpressions) > 0 { + for _, msg := range m.MatchLabelExpressions { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + func (m *Volume) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -10063,11 +10345,11 @@ func (m *Volume) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.VolumeSource.Size())) - n200, err := m.VolumeSource.MarshalTo(dAtA[i:]) + n207, err := m.VolumeSource.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n200 + i += n207 return i, nil } @@ -10141,6 +10423,34 @@ func (m *VolumeMount) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *VolumeNodeAffinity) 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 *VolumeNodeAffinity) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Required != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Required.Size())) + n208, err := m.Required.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n208 + } + return i, nil +} + func (m *VolumeProjection) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -10160,31 +10470,41 @@ func (m *VolumeProjection) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Secret.Size())) - n201, err := m.Secret.MarshalTo(dAtA[i:]) + n209, err := m.Secret.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n201 + i += n209 } if m.DownwardAPI != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.DownwardAPI.Size())) - n202, err := m.DownwardAPI.MarshalTo(dAtA[i:]) + n210, err := m.DownwardAPI.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n202 + i += n210 } if m.ConfigMap != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMap.Size())) - n203, err := m.ConfigMap.MarshalTo(dAtA[i:]) + n211, err := m.ConfigMap.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n203 + i += n211 + } + if m.ServiceAccountToken != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ServiceAccountToken.Size())) + n212, err := m.ServiceAccountToken.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n212 } return i, nil } @@ -10208,151 +10528,151 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.HostPath.Size())) - n204, err := m.HostPath.MarshalTo(dAtA[i:]) + n213, err := m.HostPath.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n204 + i += n213 } if m.EmptyDir != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.EmptyDir.Size())) - n205, err := m.EmptyDir.MarshalTo(dAtA[i:]) + n214, err := m.EmptyDir.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n205 + i += n214 } if m.GCEPersistentDisk != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.GCEPersistentDisk.Size())) - n206, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:]) + n215, err := m.GCEPersistentDisk.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n206 + i += n215 } if m.AWSElasticBlockStore != nil { dAtA[i] = 0x22 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AWSElasticBlockStore.Size())) - n207, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:]) + n216, err := m.AWSElasticBlockStore.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n207 + i += n216 } if m.GitRepo != nil { dAtA[i] = 0x2a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.GitRepo.Size())) - n208, err := m.GitRepo.MarshalTo(dAtA[i:]) + n217, err := m.GitRepo.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n208 + i += n217 } if m.Secret != nil { dAtA[i] = 0x32 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Secret.Size())) - n209, err := m.Secret.MarshalTo(dAtA[i:]) + n218, err := m.Secret.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n209 + i += n218 } if m.NFS != nil { dAtA[i] = 0x3a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.NFS.Size())) - n210, err := m.NFS.MarshalTo(dAtA[i:]) + n219, err := m.NFS.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n210 + i += n219 } if m.ISCSI != nil { dAtA[i] = 0x42 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ISCSI.Size())) - n211, err := m.ISCSI.MarshalTo(dAtA[i:]) + n220, err := m.ISCSI.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n211 + i += n220 } if m.Glusterfs != nil { dAtA[i] = 0x4a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Glusterfs.Size())) - n212, err := m.Glusterfs.MarshalTo(dAtA[i:]) + n221, err := m.Glusterfs.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n212 + i += n221 } if m.PersistentVolumeClaim != nil { dAtA[i] = 0x52 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PersistentVolumeClaim.Size())) - n213, err := m.PersistentVolumeClaim.MarshalTo(dAtA[i:]) + n222, err := m.PersistentVolumeClaim.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n213 + i += n222 } if m.RBD != nil { dAtA[i] = 0x5a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.RBD.Size())) - n214, err := m.RBD.MarshalTo(dAtA[i:]) + n223, err := m.RBD.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n214 + i += n223 } if m.FlexVolume != nil { dAtA[i] = 0x62 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FlexVolume.Size())) - n215, err := m.FlexVolume.MarshalTo(dAtA[i:]) + n224, err := m.FlexVolume.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n215 + i += n224 } if m.Cinder != nil { dAtA[i] = 0x6a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Cinder.Size())) - n216, err := m.Cinder.MarshalTo(dAtA[i:]) + n225, err := m.Cinder.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n216 + i += n225 } if m.CephFS != nil { dAtA[i] = 0x72 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.CephFS.Size())) - n217, err := m.CephFS.MarshalTo(dAtA[i:]) + n226, err := m.CephFS.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n217 + i += n226 } if m.Flocker != nil { dAtA[i] = 0x7a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Flocker.Size())) - n218, err := m.Flocker.MarshalTo(dAtA[i:]) + n227, err := m.Flocker.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n218 + i += n227 } if m.DownwardAPI != nil { dAtA[i] = 0x82 @@ -10360,11 +10680,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.DownwardAPI.Size())) - n219, err := m.DownwardAPI.MarshalTo(dAtA[i:]) + n228, err := m.DownwardAPI.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n219 + i += n228 } if m.FC != nil { dAtA[i] = 0x8a @@ -10372,11 +10692,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.FC.Size())) - n220, err := m.FC.MarshalTo(dAtA[i:]) + n229, err := m.FC.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n220 + i += n229 } if m.AzureFile != nil { dAtA[i] = 0x92 @@ -10384,11 +10704,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureFile.Size())) - n221, err := m.AzureFile.MarshalTo(dAtA[i:]) + n230, err := m.AzureFile.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n221 + i += n230 } if m.ConfigMap != nil { dAtA[i] = 0x9a @@ -10396,11 +10716,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ConfigMap.Size())) - n222, err := m.ConfigMap.MarshalTo(dAtA[i:]) + n231, err := m.ConfigMap.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n222 + i += n231 } if m.VsphereVolume != nil { dAtA[i] = 0xa2 @@ -10408,11 +10728,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.VsphereVolume.Size())) - n223, err := m.VsphereVolume.MarshalTo(dAtA[i:]) + n232, err := m.VsphereVolume.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n223 + i += n232 } if m.Quobyte != nil { dAtA[i] = 0xaa @@ -10420,11 +10740,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Quobyte.Size())) - n224, err := m.Quobyte.MarshalTo(dAtA[i:]) + n233, err := m.Quobyte.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n224 + i += n233 } if m.AzureDisk != nil { dAtA[i] = 0xb2 @@ -10432,11 +10752,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AzureDisk.Size())) - n225, err := m.AzureDisk.MarshalTo(dAtA[i:]) + n234, err := m.AzureDisk.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n225 + i += n234 } if m.PhotonPersistentDisk != nil { dAtA[i] = 0xba @@ -10444,11 +10764,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PhotonPersistentDisk.Size())) - n226, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:]) + n235, err := m.PhotonPersistentDisk.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n226 + i += n235 } if m.PortworxVolume != nil { dAtA[i] = 0xc2 @@ -10456,11 +10776,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PortworxVolume.Size())) - n227, err := m.PortworxVolume.MarshalTo(dAtA[i:]) + n236, err := m.PortworxVolume.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n227 + i += n236 } if m.ScaleIO != nil { dAtA[i] = 0xca @@ -10468,11 +10788,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ScaleIO.Size())) - n228, err := m.ScaleIO.MarshalTo(dAtA[i:]) + n237, err := m.ScaleIO.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n228 + i += n237 } if m.Projected != nil { dAtA[i] = 0xd2 @@ -10480,11 +10800,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Projected.Size())) - n229, err := m.Projected.MarshalTo(dAtA[i:]) + n238, err := m.Projected.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n229 + i += n238 } if m.StorageOS != nil { dAtA[i] = 0xda @@ -10492,11 +10812,11 @@ func (m *VolumeSource) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.StorageOS.Size())) - n230, err := m.StorageOS.MarshalTo(dAtA[i:]) + n239, err := m.StorageOS.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n230 + i += n239 } return i, nil } @@ -10556,11 +10876,11 @@ func (m *WeightedPodAffinityTerm) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.PodAffinityTerm.Size())) - n231, err := m.PodAffinityTerm.MarshalTo(dAtA[i:]) + n240, err := m.PodAffinityTerm.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n231 + i += n240 return i, nil } @@ -10714,6 +11034,26 @@ func (m *CSIPersistentVolumeSource) Size() (n int) { n += 2 l = len(m.FSType) n += 1 + l + sovGenerated(uint64(l)) + if len(m.VolumeAttributes) > 0 { + for k, v := range m.VolumeAttributes { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + if m.ControllerPublishSecretRef != nil { + l = m.ControllerPublishSecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.NodeStageSecretRef != nil { + l = m.NodeStageSecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.NodePublishSecretRef != nil { + l = m.NodePublishSecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -10781,6 +11121,21 @@ func (m *CephFSVolumeSource) Size() (n int) { return n } +func (m *CinderPersistentVolumeSource) Size() (n int) { + var l int + _ = l + l = len(m.VolumeID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.FSType) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + if m.SecretRef != nil { + l = m.SecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *CinderVolumeSource) Size() (n int) { var l int _ = l @@ -10789,6 +11144,10 @@ func (m *CinderVolumeSource) Size() (n int) { l = len(m.FSType) n += 1 + l + sovGenerated(uint64(l)) n += 2 + if m.SecretRef != nil { + l = m.SecretRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -10909,6 +11268,22 @@ func (m *ConfigMapList) Size() (n int) { return n } +func (m *ConfigMapNodeConfigSource) Size() (n int) { + var l int + _ = l + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.KubeletConfigKey) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ConfigMapProjection) Size() (n int) { var l int _ = l @@ -11135,26 +11510,6 @@ func (m *DaemonEndpoint) Size() (n int) { return n } -func (m *DeleteOptions) Size() (n int) { - var l int - _ = l - if m.GracePeriodSeconds != nil { - n += 1 + sovGenerated(uint64(*m.GracePeriodSeconds)) - } - if m.Preconditions != nil { - l = m.Preconditions.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.OrphanDependents != nil { - n += 2 - } - if m.PropagationPolicy != nil { - l = len(*m.PropagationPolicy) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - func (m *DownwardAPIProjection) Size() (n int) { var l int _ = l @@ -11815,23 +12170,6 @@ func (m *List) Size() (n int) { return n } -func (m *ListOptions) Size() (n int) { - var l int - _ = l - l = len(m.LabelSelector) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.FieldSelector) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = len(m.ResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - if m.TimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) - } - n += 2 - return n -} - func (m *LoadBalancerIngress) Size() (n int) { var l int _ = l @@ -11986,13 +12324,33 @@ func (m *NodeCondition) Size() (n int) { func (m *NodeConfigSource) Size() (n int) { var l int _ = l - if m.ConfigMapRef != nil { - l = m.ConfigMapRef.Size() + if m.ConfigMap != nil { + l = m.ConfigMap.Size() n += 1 + l + sovGenerated(uint64(l)) } return n } +func (m *NodeConfigStatus) Size() (n int) { + var l int + _ = l + if m.Assigned != nil { + l = m.Assigned.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Active != nil { + l = m.Active.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.LastKnownGood != nil { + l = m.LastKnownGood.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Error) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *NodeDaemonEndpoints) Size() (n int) { var l int _ = l @@ -12075,6 +12433,12 @@ func (m *NodeSelectorTerm) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if len(m.MatchFields) > 0 { + for _, e := range m.MatchFields { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -12083,7 +12447,7 @@ func (m *NodeSpec) Size() (n int) { _ = l l = len(m.PodCIDR) n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ExternalID) + l = len(m.DoNotUse_ExternalID) n += 1 + l + sovGenerated(uint64(l)) l = len(m.ProviderID) n += 1 + l + sovGenerated(uint64(l)) @@ -12158,6 +12522,10 @@ func (m *NodeStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.Config != nil { + l = m.Config.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -12197,68 +12565,6 @@ func (m *ObjectFieldSelector) Size() (n int) { return n } -func (m *ObjectMeta) Size() (n int) { - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.GenerateName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.SelfLink) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ResourceVersion) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Generation)) - l = m.CreationTimestamp.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.DeletionTimestamp != nil { - l = m.DeletionTimestamp.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.DeletionGracePeriodSeconds != nil { - n += 1 + sovGenerated(uint64(*m.DeletionGracePeriodSeconds)) - } - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.OwnerReferences) > 0 { - for _, e := range m.OwnerReferences { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Finalizers) > 0 { - for _, s := range m.Finalizers { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.ClusterName) - n += 1 + l + sovGenerated(uint64(l)) - if m.Initializers != nil { - l = m.Initializers.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - return n -} - func (m *ObjectReference) Size() (n int) { var l int _ = l @@ -12547,6 +12853,10 @@ func (m *PersistentVolumeSpec) Size() (n int) { l = len(*m.VolumeMode) n += 1 + l + sovGenerated(uint64(l)) } + if m.NodeAffinity != nil { + l = m.NodeAffinity.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -12779,6 +13089,14 @@ func (m *PodProxyOptions) Size() (n int) { return n } +func (m *PodReadinessGate) Size() (n int) { + var l int + _ = l + l = len(m.ConditionType) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *PodSecurityContext) Size() (n int) { var l int _ = l @@ -12800,6 +13118,15 @@ func (m *PodSecurityContext) Size() (n int) { if m.FSGroup != nil { n += 1 + sovGenerated(uint64(*m.FSGroup)) } + if m.RunAsGroup != nil { + n += 1 + sovGenerated(uint64(*m.RunAsGroup)) + } + if len(m.Sysctls) > 0 { + for _, e := range m.Sysctls { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -12905,6 +13232,19 @@ func (m *PodSpec) Size() (n int) { l = m.DNSConfig.Size() n += 2 + l + sovGenerated(uint64(l)) } + if m.ShareProcessNamespace != nil { + n += 3 + } + if len(m.ReadinessGates) > 0 { + for _, e := range m.ReadinessGates { + l = e.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + } + if m.RuntimeClassName != nil { + l = len(*m.RuntimeClassName) + n += 2 + l + sovGenerated(uint64(l)) + } return n } @@ -13286,6 +13626,10 @@ func (m *ResourceQuotaSpec) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if m.ScopeSelector != nil { + l = m.ScopeSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -13403,6 +13747,34 @@ func (m *ScaleIOVolumeSource) Size() (n int) { return n } +func (m *ScopeSelector) Size() (n int) { + var l int + _ = l + if len(m.MatchExpressions) > 0 { + for _, e := range m.MatchExpressions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ScopedResourceSelectorRequirement) Size() (n int) { + var l int + _ = l + l = len(m.ScopeName) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Operator) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *Secret) Size() (n int) { var l int _ = l @@ -13544,6 +13916,9 @@ func (m *SecurityContext) Size() (n int) { if m.AllowPrivilegeEscalation != nil { n += 2 } + if m.RunAsGroup != nil { + n += 1 + sovGenerated(uint64(*m.RunAsGroup)) + } return n } @@ -13604,6 +13979,19 @@ func (m *ServiceAccountList) Size() (n int) { return n } +func (m *ServiceAccountTokenProjection) Size() (n int) { + var l int + _ = l + l = len(m.Audience) + n += 1 + l + sovGenerated(uint64(l)) + if m.ExpirationSeconds != nil { + n += 1 + sovGenerated(uint64(*m.ExpirationSeconds)) + } + l = len(m.Path) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *ServiceList) Size() (n int) { var l int _ = l @@ -13795,6 +14183,32 @@ func (m *Toleration) Size() (n int) { return n } +func (m *TopologySelectorLabelRequirement) Size() (n int) { + var l int + _ = l + l = len(m.Key) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *TopologySelectorTerm) Size() (n int) { + var l int + _ = l + if len(m.MatchLabelExpressions) > 0 { + for _, e := range m.MatchLabelExpressions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m *Volume) Size() (n int) { var l int _ = l @@ -13832,6 +14246,16 @@ func (m *VolumeMount) Size() (n int) { return n } +func (m *VolumeNodeAffinity) Size() (n int) { + var l int + _ = l + if m.Required != nil { + l = m.Required.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *VolumeProjection) Size() (n int) { var l int _ = l @@ -13847,6 +14271,10 @@ func (m *VolumeProjection) Size() (n int) { l = m.ConfigMap.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.ServiceAccountToken != nil { + l = m.ServiceAccountToken.Size() + n += 1 + l + sovGenerated(uint64(l)) + } return n } @@ -14101,11 +14529,25 @@ func (this *CSIPersistentVolumeSource) String() string { if this == nil { return "nil" } + keysForVolumeAttributes := make([]string, 0, len(this.VolumeAttributes)) + for k := range this.VolumeAttributes { + keysForVolumeAttributes = append(keysForVolumeAttributes, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForVolumeAttributes) + mapStringForVolumeAttributes := "map[string]string{" + for _, k := range keysForVolumeAttributes { + mapStringForVolumeAttributes += fmt.Sprintf("%v: %v,", k, this.VolumeAttributes[k]) + } + mapStringForVolumeAttributes += "}" s := strings.Join([]string{`&CSIPersistentVolumeSource{`, `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, `VolumeHandle:` + fmt.Sprintf("%v", this.VolumeHandle) + `,`, `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`, + `VolumeAttributes:` + mapStringForVolumeAttributes + `,`, + `ControllerPublishSecretRef:` + strings.Replace(fmt.Sprintf("%v", this.ControllerPublishSecretRef), "SecretReference", "SecretReference", 1) + `,`, + `NodeStageSecretRef:` + strings.Replace(fmt.Sprintf("%v", this.NodeStageSecretRef), "SecretReference", "SecretReference", 1) + `,`, + `NodePublishSecretRef:` + strings.Replace(fmt.Sprintf("%v", this.NodePublishSecretRef), "SecretReference", "SecretReference", 1) + `,`, `}`, }, "") return s @@ -14151,6 +14593,19 @@ func (this *CephFSVolumeSource) String() string { }, "") return s } +func (this *CinderPersistentVolumeSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CinderPersistentVolumeSource{`, + `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`, + `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "SecretReference", "SecretReference", 1) + `,`, + `}`, + }, "") + return s +} func (this *CinderVolumeSource) String() string { if this == nil { return "nil" @@ -14159,6 +14614,7 @@ func (this *CinderVolumeSource) String() string { `VolumeID:` + fmt.Sprintf("%v", this.VolumeID) + `,`, `FSType:` + fmt.Sprintf("%v", this.FSType) + `,`, `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `SecretRef:` + strings.Replace(fmt.Sprintf("%v", this.SecretRef), "LocalObjectReference", "LocalObjectReference", 1) + `,`, `}`, }, "") return s @@ -14274,6 +14730,20 @@ func (this *ConfigMapList) String() string { }, "") return s } +func (this *ConfigMapNodeConfigSource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ConfigMapNodeConfigSource{`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `KubeletConfigKey:` + fmt.Sprintf("%v", this.KubeletConfigKey) + `,`, + `}`, + }, "") + return s +} func (this *ConfigMapProjection) String() string { if this == nil { return "nil" @@ -14430,19 +14900,6 @@ func (this *DaemonEndpoint) String() string { }, "") return s } -func (this *DeleteOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeleteOptions{`, - `GracePeriodSeconds:` + valueToStringGenerated(this.GracePeriodSeconds) + `,`, - `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`, - `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, - `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`, - `}`, - }, "") - return s -} func (this *DownwardAPIProjection) String() string { if this == nil { return "nil" @@ -14992,21 +15449,6 @@ func (this *List) String() string { }, "") return s } -func (this *ListOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ListOptions{`, - `LabelSelector:` + fmt.Sprintf("%v", this.LabelSelector) + `,`, - `FieldSelector:` + fmt.Sprintf("%v", this.FieldSelector) + `,`, - `Watch:` + fmt.Sprintf("%v", this.Watch) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`, - `}`, - }, "") - return s -} func (this *LoadBalancerIngress) String() string { if this == nil { return "nil" @@ -15157,7 +15599,20 @@ func (this *NodeConfigSource) String() string { return "nil" } s := strings.Join([]string{`&NodeConfigSource{`, - `ConfigMapRef:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMapRef), "ObjectReference", "ObjectReference", 1) + `,`, + `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapNodeConfigSource", "ConfigMapNodeConfigSource", 1) + `,`, + `}`, + }, "") + return s +} +func (this *NodeConfigStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NodeConfigStatus{`, + `Assigned:` + strings.Replace(fmt.Sprintf("%v", this.Assigned), "NodeConfigSource", "NodeConfigSource", 1) + `,`, + `Active:` + strings.Replace(fmt.Sprintf("%v", this.Active), "NodeConfigSource", "NodeConfigSource", 1) + `,`, + `LastKnownGood:` + strings.Replace(fmt.Sprintf("%v", this.LastKnownGood), "NodeConfigSource", "NodeConfigSource", 1) + `,`, + `Error:` + fmt.Sprintf("%v", this.Error) + `,`, `}`, }, "") return s @@ -15241,6 +15696,7 @@ func (this *NodeSelectorTerm) String() string { } s := strings.Join([]string{`&NodeSelectorTerm{`, `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "NodeSelectorRequirement", "NodeSelectorRequirement", 1), `&`, ``, 1) + `,`, + `MatchFields:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchFields), "NodeSelectorRequirement", "NodeSelectorRequirement", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -15251,7 +15707,7 @@ func (this *NodeSpec) String() string { } s := strings.Join([]string{`&NodeSpec{`, `PodCIDR:` + fmt.Sprintf("%v", this.PodCIDR) + `,`, - `ExternalID:` + fmt.Sprintf("%v", this.ExternalID) + `,`, + `DoNotUse_ExternalID:` + fmt.Sprintf("%v", this.DoNotUse_ExternalID) + `,`, `ProviderID:` + fmt.Sprintf("%v", this.ProviderID) + `,`, `Unschedulable:` + fmt.Sprintf("%v", this.Unschedulable) + `,`, `Taints:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Taints), "Taint", "Taint", 1), `&`, ``, 1) + `,`, @@ -15295,6 +15751,7 @@ func (this *NodeStatus) String() string { `Images:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Images), "ContainerImage", "ContainerImage", 1), `&`, ``, 1) + `,`, `VolumesInUse:` + fmt.Sprintf("%v", this.VolumesInUse) + `,`, `VolumesAttached:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VolumesAttached), "AttachedVolume", "AttachedVolume", 1), `&`, ``, 1) + `,`, + `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "NodeConfigStatus", "NodeConfigStatus", 1) + `,`, `}`, }, "") return s @@ -15329,51 +15786,6 @@ func (this *ObjectFieldSelector) String() string { }, "") return s } -func (this *ObjectMeta) String() string { - if this == nil { - return "nil" - } - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) - } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) - } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&ObjectMeta{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `GenerateName:` + fmt.Sprintf("%v", this.GenerateName) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `SelfLink:` + fmt.Sprintf("%v", this.SelfLink) + `,`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, - `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, - `CreationTimestamp:` + strings.Replace(strings.Replace(this.CreationTimestamp.String(), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1), `&`, ``, 1) + `,`, - `DeletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.DeletionTimestamp), "Time", "k8s_io_apimachinery_pkg_apis_meta_v1.Time", 1) + `,`, - `DeletionGracePeriodSeconds:` + valueToStringGenerated(this.DeletionGracePeriodSeconds) + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `OwnerReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OwnerReferences), "OwnerReference", "k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference", 1), `&`, ``, 1) + `,`, - `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, - `ClusterName:` + fmt.Sprintf("%v", this.ClusterName) + `,`, - `Initializers:` + strings.Replace(fmt.Sprintf("%v", this.Initializers), "Initializers", "k8s_io_apimachinery_pkg_apis_meta_v1.Initializers", 1) + `,`, - `}`, - }, "") - return s -} func (this *ObjectReference) String() string { if this == nil { return "nil" @@ -15512,7 +15924,7 @@ func (this *PersistentVolumeSource) String() string { `NFS:` + strings.Replace(fmt.Sprintf("%v", this.NFS), "NFSVolumeSource", "NFSVolumeSource", 1) + `,`, `RBD:` + strings.Replace(fmt.Sprintf("%v", this.RBD), "RBDPersistentVolumeSource", "RBDPersistentVolumeSource", 1) + `,`, `ISCSI:` + strings.Replace(fmt.Sprintf("%v", this.ISCSI), "ISCSIPersistentVolumeSource", "ISCSIPersistentVolumeSource", 1) + `,`, - `Cinder:` + strings.Replace(fmt.Sprintf("%v", this.Cinder), "CinderVolumeSource", "CinderVolumeSource", 1) + `,`, + `Cinder:` + strings.Replace(fmt.Sprintf("%v", this.Cinder), "CinderPersistentVolumeSource", "CinderPersistentVolumeSource", 1) + `,`, `CephFS:` + strings.Replace(fmt.Sprintf("%v", this.CephFS), "CephFSPersistentVolumeSource", "CephFSPersistentVolumeSource", 1) + `,`, `FC:` + strings.Replace(fmt.Sprintf("%v", this.FC), "FCVolumeSource", "FCVolumeSource", 1) + `,`, `Flocker:` + strings.Replace(fmt.Sprintf("%v", this.Flocker), "FlockerVolumeSource", "FlockerVolumeSource", 1) + `,`, @@ -15554,6 +15966,7 @@ func (this *PersistentVolumeSpec) String() string { `StorageClassName:` + fmt.Sprintf("%v", this.StorageClassName) + `,`, `MountOptions:` + fmt.Sprintf("%v", this.MountOptions) + `,`, `VolumeMode:` + valueToStringGenerated(this.VolumeMode) + `,`, + `NodeAffinity:` + strings.Replace(fmt.Sprintf("%v", this.NodeAffinity), "VolumeNodeAffinity", "VolumeNodeAffinity", 1) + `,`, `}`, }, "") return s @@ -15742,6 +16155,16 @@ func (this *PodProxyOptions) String() string { }, "") return s } +func (this *PodReadinessGate) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodReadinessGate{`, + `ConditionType:` + fmt.Sprintf("%v", this.ConditionType) + `,`, + `}`, + }, "") + return s +} func (this *PodSecurityContext) String() string { if this == nil { return "nil" @@ -15752,6 +16175,8 @@ func (this *PodSecurityContext) String() string { `RunAsNonRoot:` + valueToStringGenerated(this.RunAsNonRoot) + `,`, `SupplementalGroups:` + fmt.Sprintf("%v", this.SupplementalGroups) + `,`, `FSGroup:` + valueToStringGenerated(this.FSGroup) + `,`, + `RunAsGroup:` + valueToStringGenerated(this.RunAsGroup) + `,`, + `Sysctls:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Sysctls), "Sysctl", "Sysctl", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -15807,6 +16232,9 @@ func (this *PodSpec) String() string { `PriorityClassName:` + fmt.Sprintf("%v", this.PriorityClassName) + `,`, `Priority:` + valueToStringGenerated(this.Priority) + `,`, `DNSConfig:` + strings.Replace(fmt.Sprintf("%v", this.DNSConfig), "PodDNSConfig", "PodDNSConfig", 1) + `,`, + `ShareProcessNamespace:` + valueToStringGenerated(this.ShareProcessNamespace) + `,`, + `ReadinessGates:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ReadinessGates), "PodReadinessGate", "PodReadinessGate", 1), `&`, ``, 1) + `,`, + `RuntimeClassName:` + valueToStringGenerated(this.RuntimeClassName) + `,`, `}`, }, "") return s @@ -16134,6 +16562,7 @@ func (this *ResourceQuotaSpec) String() string { s := strings.Join([]string{`&ResourceQuotaSpec{`, `Hard:` + mapStringForHard + `,`, `Scopes:` + fmt.Sprintf("%v", this.Scopes) + `,`, + `ScopeSelector:` + strings.Replace(fmt.Sprintf("%v", this.ScopeSelector), "ScopeSelector", "ScopeSelector", 1) + `,`, `}`, }, "") return s @@ -16251,6 +16680,28 @@ func (this *ScaleIOVolumeSource) String() string { }, "") return s } +func (this *ScopeSelector) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ScopeSelector{`, + `MatchExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchExpressions), "ScopedResourceSelectorRequirement", "ScopedResourceSelectorRequirement", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ScopedResourceSelectorRequirement) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ScopedResourceSelectorRequirement{`, + `ScopeName:` + fmt.Sprintf("%v", this.ScopeName) + `,`, + `Operator:` + fmt.Sprintf("%v", this.Operator) + `,`, + `Values:` + fmt.Sprintf("%v", this.Values) + `,`, + `}`, + }, "") + return s +} func (this *Secret) String() string { if this == nil { return "nil" @@ -16366,6 +16817,7 @@ func (this *SecurityContext) String() string { `RunAsNonRoot:` + valueToStringGenerated(this.RunAsNonRoot) + `,`, `ReadOnlyRootFilesystem:` + valueToStringGenerated(this.ReadOnlyRootFilesystem) + `,`, `AllowPrivilegeEscalation:` + valueToStringGenerated(this.AllowPrivilegeEscalation) + `,`, + `RunAsGroup:` + valueToStringGenerated(this.RunAsGroup) + `,`, `}`, }, "") return s @@ -16416,6 +16868,18 @@ func (this *ServiceAccountList) String() string { }, "") return s } +func (this *ServiceAccountTokenProjection) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ServiceAccountTokenProjection{`, + `Audience:` + fmt.Sprintf("%v", this.Audience) + `,`, + `ExpirationSeconds:` + valueToStringGenerated(this.ExpirationSeconds) + `,`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `}`, + }, "") + return s +} func (this *ServiceList) String() string { if this == nil { return "nil" @@ -16580,6 +17044,27 @@ func (this *Toleration) String() string { }, "") return s } +func (this *TopologySelectorLabelRequirement) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TopologySelectorLabelRequirement{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Values:` + fmt.Sprintf("%v", this.Values) + `,`, + `}`, + }, "") + return s +} +func (this *TopologySelectorTerm) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TopologySelectorTerm{`, + `MatchLabelExpressions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.MatchLabelExpressions), "TopologySelectorLabelRequirement", "TopologySelectorLabelRequirement", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *Volume) String() string { if this == nil { return "nil" @@ -16616,6 +17101,16 @@ func (this *VolumeMount) String() string { }, "") return s } +func (this *VolumeNodeAffinity) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VolumeNodeAffinity{`, + `Required:` + strings.Replace(fmt.Sprintf("%v", this.Required), "NodeSelector", "NodeSelector", 1) + `,`, + `}`, + }, "") + return s +} func (this *VolumeProjection) String() string { if this == nil { return "nil" @@ -16624,6 +17119,7 @@ func (this *VolumeProjection) String() string { `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "SecretProjection", "SecretProjection", 1) + `,`, `DownwardAPI:` + strings.Replace(fmt.Sprintf("%v", this.DownwardAPI), "DownwardAPIProjection", "DownwardAPIProjection", 1) + `,`, `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapProjection", "ConfigMapProjection", 1) + `,`, + `ServiceAccountToken:` + strings.Replace(fmt.Sprintf("%v", this.ServiceAccountToken), "ServiceAccountTokenProjection", "ServiceAccountTokenProjection", 1) + `,`, `}`, }, "") return s @@ -17932,6 +18428,221 @@ func (m *CSIPersistentVolumeSource) Unmarshal(dAtA []byte) error { } m.FSType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeAttributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.VolumeAttributes == nil { + m.VolumeAttributes = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.VolumeAttributes[mapkey] = mapvalue + } else { + var mapvalue string + m.VolumeAttributes[mapkey] = mapvalue + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ControllerPublishSecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ControllerPublishSecretRef == nil { + m.ControllerPublishSecretRef = &SecretReference{} + } + if err := m.ControllerPublishSecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeStageSecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodeStageSecretRef == nil { + m.NodeStageSecretRef = &SecretReference{} + } + if err := m.NodeStageSecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodePublishSecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodePublishSecretRef == nil { + m.NodePublishSecretRef = &SecretReference{} + } + if err := m.NodePublishSecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -18499,7 +19210,7 @@ func (m *CephFSVolumeSource) Unmarshal(dAtA []byte) error { } return nil } -func (m *CinderVolumeSource) Unmarshal(dAtA []byte) error { +func (m *CinderPersistentVolumeSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18522,10 +19233,10 @@ func (m *CinderVolumeSource) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CinderVolumeSource: wiretype end group for non-group") + return fmt.Errorf("proto: CinderPersistentVolumeSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CinderVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CinderPersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -18606,61 +19317,11 @@ func (m *CinderVolumeSource) Unmarshal(dAtA []byte) error { } } m.ReadOnly = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientIPConfig) 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 ErrIntOverflowGenerated - } - 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: ClientIPConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientIPConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) } - var v int32 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -18670,12 +19331,25 @@ func (m *ClientIPConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int32(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - m.TimeoutSeconds = &v + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecretRef == nil { + m.SecretRef = &SecretReference{} + } + if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -18697,7 +19371,7 @@ func (m *ClientIPConfig) Unmarshal(dAtA []byte) error { } return nil } -func (m *ComponentCondition) Unmarshal(dAtA []byte) error { +func (m *CinderVolumeSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18720,15 +19394,15 @@ func (m *ComponentCondition) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComponentCondition: wiretype end group for non-group") + return fmt.Errorf("proto: CinderVolumeSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComponentCondition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CinderVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VolumeID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -18753,11 +19427,11 @@ func (m *ComponentCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = ComponentConditionType(dAtA[iNdEx:postIndex]) + m.VolumeID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -18782,13 +19456,13 @@ func (m *ComponentCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) + m.FSType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -18798,26 +19472,17 @@ func (m *ComponentCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.ReadOnly = bool(v != 0) case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -18827,20 +19492,24 @@ func (m *ComponentCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Error = string(dAtA[iNdEx:postIndex]) + if m.SecretRef == nil { + m.SecretRef = &LocalObjectReference{} + } + if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -18863,7 +19532,7 @@ func (m *ComponentCondition) Unmarshal(dAtA []byte) error { } return nil } -func (m *ComponentStatus) Unmarshal(dAtA []byte) error { +func (m *ClientIPConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18886,47 +19555,17 @@ func (m *ComponentStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComponentStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ClientIPConfig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComponentStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ClientIPConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) } - var msglen int + var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -18936,23 +19575,12 @@ func (m *ComponentStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + v |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, ComponentCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex + m.TimeoutSeconds = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -18974,7 +19602,7 @@ func (m *ComponentStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ComponentStatusList) Unmarshal(dAtA []byte) error { +func (m *ComponentCondition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -18997,17 +19625,17 @@ func (m *ComponentStatusList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ComponentStatusList: wiretype end group for non-group") + return fmt.Errorf("proto: ComponentCondition: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ComponentStatusList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ComponentCondition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -19017,27 +19645,26 @@ func (m *ComponentStatusList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Type = ComponentConditionType(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -19047,22 +19674,78 @@ func (m *ComponentStatusList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ComponentStatus{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -19085,7 +19768,229 @@ func (m *ComponentStatusList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigMap) Unmarshal(dAtA []byte) error { +func (m *ComponentStatus) 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 ErrIntOverflowGenerated + } + 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: ComponentStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComponentStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Conditions = append(m.Conditions, ComponentCondition{}) + if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ComponentStatusList) 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 ErrIntOverflowGenerated + } + 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: ComponentStatusList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ComponentStatusList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, ComponentStatus{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigMap) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -19740,7 +20645,7 @@ func (m *ConfigMapList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConfigMapProjection) Unmarshal(dAtA []byte) error { +func (m *ConfigMapNodeConfigSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -19763,17 +20668,17 @@ func (m *ConfigMapProjection) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConfigMapProjection: wiretype end group for non-group") + return fmt.Errorf("proto: ConfigMapNodeConfigSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigMapProjection: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ConfigMapNodeConfigSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -19783,27 +20688,26 @@ func (m *ConfigMapProjection) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Namespace = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -19813,28 +20717,55 @@ func (m *ConfigMapProjection) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, KeyToPath{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -19844,13 +20775,182 @@ func (m *ConfigMapProjection) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - b := bool(v != 0) - m.Optional = &b + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KubeletConfigKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KubeletConfigKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConfigMapProjection) 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 ErrIntOverflowGenerated + } + 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: ConfigMapProjection: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConfigMapProjection: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LocalObjectReference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LocalObjectReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, KeyToPath{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Optional", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Optional = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -21862,160 +22962,6 @@ func (m *DaemonEndpoint) Unmarshal(dAtA []byte) error { } return nil } -func (m *DeleteOptions) 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 ErrIntOverflowGenerated - } - 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: DeleteOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeleteOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.GracePeriodSeconds = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Preconditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Preconditions == nil { - m.Preconditions = &Preconditions{} - } - if err := m.Preconditions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OrphanDependents", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.OrphanDependents = &b - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PropagationPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := DeletionPropagation(dAtA[iNdEx:postIndex]) - m.PropagationPolicy = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *DownwardAPIProjection) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -28459,203 +29405,6 @@ func (m *List) Unmarshal(dAtA []byte) error { } return nil } -func (m *ListOptions) 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 ErrIntOverflowGenerated - } - 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: ListOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LabelSelector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldSelector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldSelector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Watch", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Watch = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.TimeoutSeconds = &v - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeUninitialized = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *LoadBalancerIngress) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -30157,9 +30906,9 @@ func (m *NodeConfigSource) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: NodeConfigSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigMapRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -30183,10 +30932,10 @@ func (m *NodeConfigSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ConfigMapRef == nil { - m.ConfigMapRef = &ObjectReference{} + if m.ConfigMap == nil { + m.ConfigMap = &ConfigMapNodeConfigSource{} } - if err := m.ConfigMapRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ConfigMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -30211,7 +30960,7 @@ func (m *NodeConfigSource) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeDaemonEndpoints) Unmarshal(dAtA []byte) error { +func (m *NodeConfigStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -30234,15 +30983,15 @@ func (m *NodeDaemonEndpoints) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeDaemonEndpoints: wiretype end group for non-group") + return fmt.Errorf("proto: NodeConfigStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeDaemonEndpoints: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KubeletEndpoint", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Assigned", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -30266,63 +31015,16 @@ func (m *NodeDaemonEndpoints) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.KubeletEndpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Assigned == nil { + m.Assigned = &NodeConfigSource{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.Assigned.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeList) 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 ErrIntOverflowGenerated - } - 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: NodeList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -30346,13 +31048,16 @@ func (m *NodeList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Active == nil { + m.Active = &NodeConfigSource{} + } + if err := m.Active.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastKnownGood", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -30376,11 +31081,42 @@ func (m *NodeList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, Node{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.LastKnownGood == nil { + m.LastKnownGood = &NodeConfigSource{} + } + if err := m.LastKnownGood.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -30402,7 +31138,7 @@ func (m *NodeList) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error { +func (m *NodeDaemonEndpoints) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -30425,17 +31161,17 @@ func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeProxyOptions: wiretype end group for non-group") + return fmt.Errorf("proto: NodeDaemonEndpoints: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeDaemonEndpoints: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field KubeletEndpoint", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -30445,20 +31181,21 @@ func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Path = string(dAtA[iNdEx:postIndex]) + if err := m.KubeletEndpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -30481,7 +31218,7 @@ func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeResources) Unmarshal(dAtA []byte) error { +func (m *NodeList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -30504,15 +31241,15 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeResources: wiretype end group for non-group") + return fmt.Errorf("proto: NodeList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeResources: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -30536,22 +31273,15 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - var stringLenmapkey uint64 + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -30561,74 +31291,21 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { + postIndex := iNdEx + msglen + if postIndex > l { return io.ErrUnexpectedEOF } - mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.Capacity == nil { - m.Capacity = make(ResourceList) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Capacity[ResourceName(mapkey)] = *mapvalue - } else { - var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity - m.Capacity[ResourceName(mapkey)] = mapvalue + m.Items = append(m.Items, Node{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -30652,7 +31329,7 @@ func (m *NodeResources) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeSelector) Unmarshal(dAtA []byte) error { +func (m *NodeProxyOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -30675,17 +31352,17 @@ func (m *NodeSelector) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeSelector: wiretype end group for non-group") + return fmt.Errorf("proto: NodeProxyOptions: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeSelector: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeProxyOptions: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeSelectorTerms", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -30695,22 +31372,20 @@ func (m *NodeSelector) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.NodeSelectorTerms = append(m.NodeSelectorTerms, NodeSelectorTerm{}) - if err := m.NodeSelectorTerms[len(m.NodeSelectorTerms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -30733,7 +31408,7 @@ func (m *NodeSelector) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error { +func (m *NodeResources) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -30756,17 +31431,17 @@ func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeSelectorRequirement: wiretype end group for non-group") + return fmt.Errorf("proto: NodeResources: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeResources: 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) + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -30776,26 +31451,19 @@ func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) - } - var stringLen uint64 + var keykey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -30805,26 +31473,12 @@ func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + keykey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operator = NodeSelectorOperator(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var stringLen uint64 + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -30834,20 +31488,75 @@ func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + stringLenmapkey |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex > l { + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } - m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) + mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Capacity == nil { + m.Capacity = make(ResourceList) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + m.Capacity[ResourceName(mapkey)] = *mapvalue + } else { + var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity + m.Capacity[ResourceName(mapkey)] = mapvalue + } iNdEx = postIndex default: iNdEx = preIndex @@ -30870,7 +31579,7 @@ func (m *NodeSelectorRequirement) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeSelectorTerm) Unmarshal(dAtA []byte) error { +func (m *NodeSelector) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -30893,15 +31602,15 @@ func (m *NodeSelectorTerm) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NodeSelectorTerm: wiretype end group for non-group") + return fmt.Errorf("proto: NodeSelector: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NodeSelectorTerm: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NodeSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeSelectorTerms", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -30925,8 +31634,8 @@ func (m *NodeSelectorTerm) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.MatchExpressions = append(m.MatchExpressions, NodeSelectorRequirement{}) - if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.NodeSelectorTerms = append(m.NodeSelectorTerms, NodeSelectorTerm{}) + if err := m.NodeSelectorTerms[len(m.NodeSelectorTerms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -30951,7 +31660,256 @@ func (m *NodeSelectorTerm) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeSpec) Unmarshal(dAtA []byte) error { +func (m *NodeSelectorRequirement) 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 ErrIntOverflowGenerated + } + 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: NodeSelectorRequirement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeSelectorRequirement: 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 ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Operator = NodeSelectorOperator(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeSelectorTerm) 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 ErrIntOverflowGenerated + } + 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: NodeSelectorTerm: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeSelectorTerm: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchExpressions = append(m.MatchExpressions, NodeSelectorRequirement{}) + if err := m.MatchExpressions[len(m.MatchExpressions)-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 MatchFields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatchFields = append(m.MatchFields, NodeSelectorRequirement{}) + if err := m.MatchFields[len(m.MatchFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NodeSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -31011,7 +31969,7 @@ func (m *NodeSpec) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalID", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DoNotUse_ExternalID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -31036,7 +31994,7 @@ func (m *NodeSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExternalID = string(dAtA[iNdEx:postIndex]) + m.DoNotUse_ExternalID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -31685,6 +32643,39 @@ func (m *NodeStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &NodeConfigStatus{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -32102,658 +33093,11 @@ func (m *ObjectFieldSelector) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.APIVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ObjectMeta) 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 ErrIntOverflowGenerated - } - 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: ObjectMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ObjectMeta: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenerateName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GenerateName = string(dAtA[iNdEx:postIndex]) - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelfLink", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SelfLink = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) - } - m.Generation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Generation |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CreationTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DeletionTimestamp == nil { - m.DeletionTimestamp = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} - } - if err := m.DeletionTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeletionGracePeriodSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.DeletionGracePeriodSeconds = &v - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.Labels == nil { - m.Labels = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.Labels[mapkey] = mapvalue - } else { - var mapvalue string - m.Labels[mapkey] = mapvalue - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.Annotations == nil { - m.Annotations = make(map[string]string) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - m.Annotations[mapkey] = mapvalue - } else { - var mapvalue string - m.Annotations[mapkey] = mapvalue - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OwnerReferences", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OwnerReferences = append(m.OwnerReferences, k8s_io_apimachinery_pkg_apis_meta_v1.OwnerReference{}) - if err := m.OwnerReferences[len(m.OwnerReferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Finalizers = append(m.Finalizers, string(dAtA[iNdEx:postIndex])) + m.APIVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 15: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -32778,40 +33122,7 @@ func (m *ObjectMeta) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ClusterName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Initializers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Initializers == nil { - m.Initializers = &k8s_io_apimachinery_pkg_apis_meta_v1.Initializers{} - } - if err := m.Initializers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.FieldPath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -34692,7 +35003,7 @@ func (m *PersistentVolumeSource) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Cinder == nil { - m.Cinder = &CinderVolumeSource{} + m.Cinder = &CinderPersistentVolumeSource{} } if err := m.Cinder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -35540,6 +35851,39 @@ func (m *PersistentVolumeSpec) Unmarshal(dAtA []byte) error { s := PersistentVolumeMode(dAtA[iNdEx:postIndex]) m.VolumeMode = &s iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeAffinity", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NodeAffinity == nil { + m.NodeAffinity = &VolumeNodeAffinity{} + } + if err := m.NodeAffinity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -37666,6 +38010,85 @@ func (m *PodProxyOptions) Unmarshal(dAtA []byte) error { } return nil } +func (m *PodReadinessGate) 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 ErrIntOverflowGenerated + } + 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: PodReadinessGate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodReadinessGate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConditionType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConditionType = PodConditionType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *PodSecurityContext) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -37851,6 +38274,57 @@ func (m *PodSecurityContext) Unmarshal(dAtA []byte) error { } } m.FSGroup = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsGroup", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RunAsGroup = &v + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sysctls", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sysctls = append(m.Sysctls, Sysctl{}) + if err := m.Sysctls[len(m.Sysctls)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -38787,6 +39261,88 @@ func (m *PodSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareProcessNamespace", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.ShareProcessNamespace = &b + case 28: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadinessGates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ReadinessGates = append(m.ReadinessGates, PodReadinessGate{}) + if err := m.ReadinessGates[len(m.ReadinessGates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 29: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RuntimeClassName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.RuntimeClassName = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -42688,6 +43244,331 @@ func (m *ResourceQuotaSpec) Unmarshal(dAtA []byte) error { } m.Scopes = append(m.Scopes, ResourceQuotaScope(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeSelector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ScopeSelector == nil { + m.ScopeSelector = &ScopeSelector{} + } + if err := m.ScopeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceQuotaStatus) 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 ErrIntOverflowGenerated + } + 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: ResourceQuotaStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceQuotaStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Hard == nil { + m.Hard = make(ResourceList) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + m.Hard[ResourceName(mapkey)] = *mapvalue + } else { + var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity + m.Hard[ResourceName(mapkey)] = mapvalue + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Used", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Used == nil { + m.Used = make(ResourceList) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + m.Used[ResourceName(mapkey)] = *mapvalue + } else { + var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity + m.Used[ResourceName(mapkey)] = mapvalue + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -42709,7 +43590,7 @@ func (m *ResourceQuotaSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error { +func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -42732,15 +43613,15 @@ func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceQuotaStatus: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceRequirements: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceQuotaStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceRequirements: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -42804,8 +43685,8 @@ func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error { } mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey - if m.Hard == nil { - m.Hard = make(ResourceList) + if m.Limits == nil { + m.Limits = make(ResourceList) } if iNdEx < postIndex { var valuekey uint64 @@ -42853,15 +43734,15 @@ func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postmsgIndex - m.Hard[ResourceName(mapkey)] = *mapvalue + m.Limits[ResourceName(mapkey)] = *mapvalue } else { var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity - m.Hard[ResourceName(mapkey)] = mapvalue + m.Limits[ResourceName(mapkey)] = mapvalue } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Used", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -42925,8 +43806,8 @@ func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error { } mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey - if m.Used == nil { - m.Used = make(ResourceList) + if m.Requests == nil { + m.Requests = make(ResourceList) } if iNdEx < postIndex { var valuekey uint64 @@ -42974,10 +43855,10 @@ func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postmsgIndex - m.Used[ResourceName(mapkey)] = *mapvalue + m.Requests[ResourceName(mapkey)] = *mapvalue } else { var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity - m.Used[ResourceName(mapkey)] = mapvalue + m.Requests[ResourceName(mapkey)] = mapvalue } iNdEx = postIndex default: @@ -43001,7 +43882,7 @@ func (m *ResourceQuotaStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { +func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -43024,17 +43905,17 @@ func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceRequirements: wiretype end group for non-group") + return fmt.Errorf("proto: SELinuxOptions: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceRequirements: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SELinuxOptions: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -43044,34 +43925,26 @@ func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + m.User = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) } - var stringLenmapkey uint64 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -43081,81 +43954,26 @@ func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { + postIndex := iNdEx + intStringLen + if postIndex > l { return io.ErrUnexpectedEOF } - mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.Limits == nil { - m.Limits = make(ResourceList) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Limits[ResourceName(mapkey)] = *mapvalue - } else { - var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity - m.Limits[ResourceName(mapkey)] = mapvalue - } + m.Role = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -43165,34 +43983,26 @@ func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) } - var stringLenmapkey uint64 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -43202,75 +44012,20 @@ func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { + postIndex := iNdEx + intStringLen + if postIndex > l { return io.ErrUnexpectedEOF } - mapkey := ResourceName(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.Requests == nil { - m.Requests = make(ResourceList) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &k8s_io_apimachinery_pkg_api_resource.Quantity{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.Requests[ResourceName(mapkey)] = *mapvalue - } else { - var mapvalue k8s_io_apimachinery_pkg_api_resource.Quantity - m.Requests[ResourceName(mapkey)] = mapvalue - } + m.Level = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -43293,7 +44048,7 @@ func (m *ResourceRequirements) Unmarshal(dAtA []byte) error { } return nil } -func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { +func (m *ScaleIOPersistentVolumeSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -43316,15 +44071,44 @@ func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: SELinuxOptions: wiretype end group for non-group") + return fmt.Errorf("proto: ScaleIOPersistentVolumeSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: SELinuxOptions: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ScaleIOPersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Gateway = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field System", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -43349,11 +44133,64 @@ func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.User = string(dAtA[iNdEx:postIndex]) + m.System = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SecretRef == nil { + m.SecretRef = &SecretReference{} + } + if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SSLEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SSLEnabled = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProtectionDomain", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -43378,11 +44215,11 @@ func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Role = string(dAtA[iNdEx:postIndex]) + m.ProtectionDomain = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StoragePool", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -43407,11 +44244,11 @@ func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = string(dAtA[iNdEx:postIndex]) + m.StoragePool = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StorageMode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -43436,8 +44273,86 @@ func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Level = string(dAtA[iNdEx:postIndex]) + m.StorageMode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VolumeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FSType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -43459,7 +44374,7 @@ func (m *SELinuxOptions) Unmarshal(dAtA []byte) error { } return nil } -func (m *ScaleIOPersistentVolumeSource) Unmarshal(dAtA []byte) error { +func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -43482,10 +44397,10 @@ func (m *ScaleIOPersistentVolumeSource) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ScaleIOPersistentVolumeSource: wiretype end group for non-group") + return fmt.Errorf("proto: ScaleIOVolumeSource: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ScaleIOPersistentVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ScaleIOVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -43573,7 +44488,7 @@ func (m *ScaleIOPersistentVolumeSource) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.SecretRef == nil { - m.SecretRef = &SecretReference{} + m.SecretRef = &LocalObjectReference{} } if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -43785,7 +44700,7 @@ func (m *ScaleIOPersistentVolumeSource) Unmarshal(dAtA []byte) error { } return nil } -func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error { +func (m *ScopeSelector) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -43808,17 +44723,17 @@ func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ScaleIOVolumeSource: wiretype end group for non-group") + return fmt.Errorf("proto: ScopeSelector: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ScaleIOVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ScopeSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchExpressions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -43828,24 +44743,76 @@ func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Gateway = string(dAtA[iNdEx:postIndex]) + m.MatchExpressions = append(m.MatchExpressions, ScopedResourceSelectorRequirement{}) + if err := m.MatchExpressions[len(m.MatchExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScopedResourceSelectorRequirement) 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 ErrIntOverflowGenerated + } + 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: ScopedResourceSelectorRequirement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScopedResourceSelectorRequirement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field System", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ScopeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -43870,13 +44837,13 @@ func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.System = string(dAtA[iNdEx:postIndex]) + m.ScopeName = ResourceQuotaScope(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -43886,48 +44853,24 @@ func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.SecretRef == nil { - m.SecretRef = &LocalObjectReference{} - } - if err := m.SecretRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Operator = ScopeSelectorOperator(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SSLEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.SSLEnabled = bool(v != 0) - case 5: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProtectionDomain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -43952,144 +44895,8 @@ func (m *ScaleIOVolumeSource) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ProtectionDomain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoragePool", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoragePool = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StorageMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StorageMode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VolumeName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VolumeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FSType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FSType = string(dAtA[iNdEx:postIndex]) + m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ReadOnly = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -45385,6 +46192,26 @@ func (m *SecurityContext) Unmarshal(dAtA []byte) error { } b := bool(v != 0) m.AllowPrivilegeEscalation = &b + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsGroup", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RunAsGroup = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -45681,44 +46508,176 @@ func (m *ServiceAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Secrets = append(m.Secrets, ObjectReference{}) + if err := m.Secrets[len(m.Secrets)-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 ImagePullSecrets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImagePullSecrets = append(m.ImagePullSecrets, LocalObjectReference{}) + if err := m.ImagePullSecrets[len(m.ImagePullSecrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.AutomountServiceAccountToken = &b + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceAccountList) 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 ErrIntOverflowGenerated + } + 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: ServiceAccountList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceAccountList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, ObjectReference{}) - if err := m.Secrets[len(m.Secrets)-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 ImagePullSecrets", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -45742,32 +46701,11 @@ func (m *ServiceAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ImagePullSecrets = append(m.ImagePullSecrets, LocalObjectReference{}) - if err := m.ImagePullSecrets[len(m.ImagePullSecrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ServiceAccount{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AutomountServiceAccountToken", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.AutomountServiceAccountToken = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -45789,7 +46727,7 @@ func (m *ServiceAccount) Unmarshal(dAtA []byte) error { } return nil } -func (m *ServiceAccountList) Unmarshal(dAtA []byte) error { +func (m *ServiceAccountTokenProjection) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -45812,17 +46750,17 @@ func (m *ServiceAccountList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ServiceAccountList: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceAccountTokenProjection: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceAccountList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ServiceAccountTokenProjection: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Audience", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -45832,27 +46770,46 @@ func (m *ServiceAccountList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Audience = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpirationSeconds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ExpirationSeconds = &v + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -45862,22 +46819,20 @@ func (m *ServiceAccountList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ServiceAccount{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -47587,7 +48542,177 @@ func (m *Taint) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Effect = TaintEffect(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeAdded == nil { + m.TimeAdded = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} + } + if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Toleration) 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 ErrIntOverflowGenerated + } + 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: Toleration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Toleration: 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 ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -47612,11 +48737,11 @@ func (m *Taint) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Value = string(dAtA[iNdEx:postIndex]) + m.Operator = TolerationOperator(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -47641,13 +48766,13 @@ func (m *Taint) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Effect = TaintEffect(dAtA[iNdEx:postIndex]) + m.Value = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeAdded", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -47657,25 +48782,41 @@ func (m *Taint) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.TimeAdded == nil { - m.TimeAdded = &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} + m.Effect = TaintEffect(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType) } - if err := m.TimeAdded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex + m.TolerationSeconds = &v default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -47697,7 +48838,7 @@ func (m *Taint) Unmarshal(dAtA []byte) error { } return nil } -func (m *Toleration) Unmarshal(dAtA []byte) error { +func (m *TopologySelectorLabelRequirement) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -47720,10 +48861,10 @@ func (m *Toleration) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Toleration: wiretype end group for non-group") + return fmt.Errorf("proto: TopologySelectorLabelRequirement: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Toleration: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TopologySelectorLabelRequirement: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -47757,7 +48898,7 @@ func (m *Toleration) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -47782,42 +48923,63 @@ func (m *Toleration) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Operator = TolerationOperator(dAtA[iNdEx:postIndex]) + m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: - 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 ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { + if skippy < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TopologySelectorTerm) 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 ErrIntOverflowGenerated + } + 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: TopologySelectorTerm: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TopologySelectorTerm: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Effect", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchLabelExpressions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -47827,41 +48989,23 @@ func (m *Toleration) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Effect = TaintEffect(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TolerationSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } + m.MatchLabelExpressions = append(m.MatchLabelExpressions, TopologySelectorLabelRequirement{}) + if err := m.MatchLabelExpressions[len(m.MatchLabelExpressions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.TolerationSeconds = &v + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -48287,6 +49431,89 @@ func (m *VolumeMount) Unmarshal(dAtA []byte) error { } return nil } +func (m *VolumeNodeAffinity) 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 ErrIntOverflowGenerated + } + 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: VolumeNodeAffinity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VolumeNodeAffinity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Required", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Required == nil { + m.Required = &NodeSelector{} + } + if err := m.Required.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *VolumeProjection) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -48415,6 +49642,39 @@ func (m *VolumeProjection) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountToken", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ServiceAccountToken == nil { + m.ServiceAccountToken = &ServiceAccountTokenProjection{} + } + if err := m.ServiceAccountToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -49752,784 +51012,798 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 12452 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x6d, 0x90, 0x24, 0x47, - 0x56, 0xd8, 0x55, 0xf7, 0x7c, 0xf5, 0x9b, 0xef, 0xdc, 0x5d, 0xa9, 0x77, 0x24, 0x6d, 0xaf, 0x4a, - 0x77, 0xab, 0xd5, 0xd7, 0xcc, 0x69, 0x25, 0x9d, 0x96, 0xd3, 0x9d, 0x60, 0x66, 0x7a, 0x66, 0xb7, - 0xb5, 0x3b, 0xb3, 0xad, 0xec, 0xd9, 0xdd, 0x3b, 0x21, 0xce, 0x57, 0xd3, 0x9d, 0x33, 0x53, 0x9a, - 0x9a, 0xaa, 0x56, 0x55, 0xf5, 0xec, 0x8e, 0x02, 0x22, 0x6c, 0x19, 0xf0, 0x07, 0xfc, 0xb8, 0x30, - 0x84, 0x8d, 0x81, 0xc0, 0x11, 0x36, 0x0e, 0x38, 0x63, 0x3b, 0x02, 0x83, 0x01, 0x03, 0xb6, 0x31, - 0x76, 0x38, 0xe0, 0x0f, 0x06, 0xf3, 0xe3, 0x88, 0x20, 0x3c, 0x86, 0x85, 0xb0, 0x83, 0x1f, 0x76, - 0x38, 0xcc, 0x2f, 0xc6, 0xd8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, 0x94, 0x4f, 0x12, 0x80, 0x13, 0x1c, 0x7a, 0x2c, 0xc7, - 0xf1, 0x41, 0x19, 0x31, 0x54, 0xb5, 0x5d, 0x36, 0x36, 0xbe, 0x8c, 0x69, 0x39, 0xba, 0x09, 0xa3, - 0xc4, 0xdf, 0x5f, 0x0d, 0x83, 0xbd, 0xf2, 0x99, 0xfc, 0x3d, 0xbb, 0xc2, 0x51, 0x38, 0x43, 0x4f, - 0xae, 0x28, 0xa2, 0x18, 0x4b, 0x12, 0xe8, 0x3e, 0x94, 0x33, 0x66, 0x84, 0x4f, 0xc0, 0x59, 0x36, - 0x01, 0x5f, 0x10, 0x75, 0xcb, 0x1b, 0x39, 0x78, 0x47, 0x3d, 0x60, 0x38, 0x97, 0x3a, 0xfa, 0x2e, - 0x98, 0xe4, 0x1b, 0x8a, 0x6b, 0xae, 0xa3, 0xf2, 0x39, 0xf6, 0x35, 0x17, 0xf3, 0x37, 0x27, 0x47, - 0x5c, 0x3a, 0x27, 0x3a, 0x34, 0xa9, 0x97, 0x46, 0xd8, 0xa4, 0x66, 0x6f, 0xc2, 0x94, 0xe2, 0x5b, - 0x6c, 0xe9, 0xa0, 0x0a, 0x0c, 0x53, 0x86, 0x2c, 0x75, 0x0a, 0x25, 0x3a, 0x53, 0x4c, 0xe3, 0x88, - 0x79, 0x39, 0x9b, 0x29, 0xf7, 0x03, 0xb2, 0x74, 0x10, 0x13, 0x7e, 0x2f, 0x2c, 0x6a, 0x33, 0x25, - 0x01, 0x38, 0xc1, 0xb1, 0xff, 0x1f, 0x97, 0x7b, 0x12, 0xe6, 0x38, 0xc0, 0x71, 0xf0, 0x22, 0x8c, - 0xed, 0x04, 0x51, 0x4c, 0xb1, 0x59, 0x1b, 0xc3, 0x89, 0xa4, 0x73, 0x5d, 0x94, 0x63, 0x85, 0x81, - 0xde, 0x80, 0xc9, 0xa6, 0xde, 0x80, 0x38, 0xcb, 0xd4, 0x10, 0x18, 0xad, 0x63, 0x13, 0x17, 0x5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, 0xef, 0x98, 0x24, 0x70, 0x9a, 0xe6, 0xa9, 0x1e, 0x9f, 0x73, 0x3e, 0xcc, 0xa4, 0x37, - 0xd6, 0x23, 0x3d, 0xae, 0xff, 0x68, 0x08, 0xa6, 0xcc, 0x85, 0x80, 0x16, 0xa0, 0x24, 0x88, 0xa8, - 0x20, 0x9e, 0x6a, 0x6d, 0xaf, 0x49, 0x00, 0x4e, 0x70, 0x58, 0x10, 0x53, 0x56, 0x5d, 0xb3, 0x03, - 0x4c, 0x82, 0x98, 0x2a, 0x08, 0xd6, 0xb0, 0xa8, 0x10, 0xbd, 0x19, 0x04, 0xb1, 0x3a, 0x0a, 0xd4, - 0x6a, 0x59, 0x62, 0xa5, 0x58, 0x40, 0xe9, 0x11, 0xb0, 0x4b, 0x42, 0x9f, 0x78, 0xa6, 0x26, 0x53, - 0x1d, 0x01, 0x37, 0x74, 0x20, 0x36, 0x71, 0xe9, 0x91, 0x16, 0x44, 0x6c, 0xf9, 0x09, 0x51, 0x3d, - 0xb1, 0xab, 0x6c, 0x70, 0xb7, 0x79, 0x09, 0x47, 0x5f, 0x86, 0xc7, 0x95, 0x97, 0x3b, 0xe6, 0x9a, - 0x61, 0xd9, 0xe2, 0x88, 0x71, 0xb3, 0x7e, 0x7c, 0x39, 0x1b, 0x0d, 0xe7, 0xd5, 0x47, 0x6f, 0xc2, - 0x94, 0x10, 0x81, 0x25, 0xc5, 0x51, 0xd3, 0x58, 0xe1, 0x86, 0x01, 0xc5, 0x29, 0x6c, 0x54, 0x85, - 0x19, 0x5a, 0xc2, 0xa4, 0x50, 0x49, 0x81, 0x7b, 0xeb, 0xab, 0xb3, 0xfe, 0x46, 0x0a, 0x8e, 0xbb, - 0x6a, 0xa0, 0x45, 0x98, 0xe6, 0x32, 0x0a, 0xbd, 0x53, 0xb2, 0x79, 0x10, 0xee, 0x1e, 0x6a, 0x23, - 0xdc, 0x32, 0xc1, 0x38, 0x8d, 0x8f, 0xae, 0xc2, 0x84, 0x13, 0x36, 0x77, 0xdc, 0x98, 0x34, 0xe3, - 0x4e, 0xc8, 0xfd, 0x40, 0x34, 0x6b, 0x8f, 0x45, 0x0d, 0x86, 0x0d, 0x4c, 0xfb, 0x03, 0x38, 0x93, - 0xe1, 0x29, 0x46, 0x17, 0x8e, 0xd3, 0x76, 0xe5, 0x37, 0xa5, 0x2c, 0x24, 0x17, 0xeb, 0x35, 0xf9, - 0x35, 0x1a, 0x16, 0x5d, 0x9d, 0x4c, 0x25, 0xae, 0x85, 0xa1, 0x57, 0xab, 0x73, 0x55, 0x02, 0x70, - 0x82, 0x63, 0xff, 0x26, 0x80, 0xa6, 0xd0, 0x19, 0xc0, 0x3e, 0xee, 0x2a, 0x4c, 0xc8, 0xdc, 0x09, - 0x5a, 0xcc, 0x6e, 0xf5, 0x99, 0xd7, 0x34, 0x18, 0x36, 0x30, 0x69, 0xdf, 0x7c, 0x15, 0x71, 0x3c, - 0x65, 0x8f, 0x99, 0xc4, 0x1b, 0x4f, 0x70, 0xd0, 0x8b, 0x30, 0x16, 0x11, 0x6f, 0xeb, 0xa6, 0xeb, - 0xef, 0x8a, 0x85, 0xad, 0xb8, 0x70, 0x43, 0x94, 0x63, 0x85, 0x81, 0x96, 0xa0, 0xd8, 0x71, 0x5b, - 0x62, 0x29, 0xcb, 0x03, 0xbf, 0x78, 0xbb, 0x56, 0x3d, 0x3a, 0xac, 0x3c, 0x9d, 0x97, 0x12, 0x82, - 0x5e, 0xed, 0xa3, 0x79, 0xba, 0xfd, 0x68, 0xe5, 0xac, 0xb7, 0x81, 0x91, 0x63, 0xbe, 0x0d, 0x5c, - 0x01, 0x10, 0x5f, 0x2d, 0xd7, 0x72, 0x31, 0x99, 0xb5, 0x6b, 0x0a, 0x82, 0x35, 0x2c, 0x14, 0xc1, - 0x6c, 0x33, 0x24, 0x8e, 0xbc, 0x43, 0x73, 0x9f, 0xa7, 0xb1, 0x87, 0x57, 0x10, 0x2c, 0xa7, 0x89, - 0xe1, 0x6e, 0xfa,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 0x0d, 0x4c, 0x2b, 0xa2, 0xeb, - 0x50, 0x0c, 0x37, 0x5b, 0xe2, 0x69, 0x21, 0x53, 0x2e, 0xc5, 0x4b, 0xd5, 0xec, 0x45, 0xc2, 0x29, - 0xe1, 0xa5, 0x2a, 0xa6, 0x24, 0x50, 0x1d, 0x86, 0x99, 0xd3, 0x94, 0x78, 0x41, 0xc8, 0x14, 0x48, - 0x7b, 0x38, 0x1f, 0xf2, 0xa8, 0x0c, 0x0c, 0x01, 0x73, 0x42, 0xe8, 0x2d, 0x18, 0x69, 0xb2, 0x8c, - 0x51, 0x42, 0xf1, 0x93, 0x1d, 0xae, 0xab, 0x2b, 0xa7, 0x14, 0x7f, 0x41, 0xe5, 0xe5, 0x58, 0x50, - 0x40, 0x1b, 0x30, 0xd2, 0x24, 0xed, 0x9d, 0xad, 0x48, 0xe8, 0x73, 0x3e, 0x9b, 0x49, 0xab, 0x47, - 0x82, 0x34, 0x41, 0x95, 0x61, 0x60, 0x41, 0x0b, 0x7d, 0x1e, 0x0a, 0x5b, 0x4d, 0xe1, 0x49, 0x95, - 0xf9, 0x86, 0x60, 0x46, 0xca, 0x58, 0x1a, 0x79, 0x70, 0x58, 0x29, 0xac, 0x2e, 0xe3, 0xc2, 0x56, - 0x13, 0xad, 0xc3, 0xe8, 0x16, 0xf7, 0xad, 0x17, 0x01, 0x6c, 0x9e, 0xcd, 0x76, 0xfb, 0xef, 0x72, - 0xbf, 0xe7, 0x1e, 0x40, 0x02, 0x80, 0x25, 0x11, 0x16, 0x2f, 0x58, 0xc5, 0x08, 0x10, 0x81, 0xf3, - 0xe7, 0x8f, 0x17, 0xd7, 0x41, 0xa8, 0x39, 0x14, 0x15, 0xac, 0x51, 0x44, 0x5f, 0x85, 0x92, 0x23, - 0x73, 0x1c, 0x8a, 0x20, 0x38, 0xaf, 0x64, 0x6e, 0xc7, 0xde, 0xe9, 0x1f, 0xf9, 0x5a, 0x56, 0x48, - 0x38, 0x21, 0x8a, 0x76, 0x61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, 0x5e, - 0x8e, 0x15, 0x06, 0xdd, 0x0f, 0x9c, 0x19, 0xa6, 0x19, 0xa0, 0x30, 0xf6, 0x11, 0xd0, 0xe3, 0x31, - 0x40, 0x74, 0x11, 0x86, 0x3a, 0x11, 0x09, 0x65, 0x72, 0x6b, 0xc9, 0xbf, 0x99, 0xa6, 0x92, 0x41, - 0xa8, 0x68, 0xba, 0xad, 0x94, 0x84, 0x9a, 0x68, 0xca, 0xd5, 0x84, 0x1c, 0x66, 0x7f, 0xad, 0x08, - 0xe7, 0x73, 0x8d, 0x8d, 0x69, 0x97, 0xf6, 0x02, 0xdf, 0x8d, 0x03, 0xf5, 0xc0, 0xc4, 0x03, 0xe6, - 0x90, 0xf6, 0xce, 0x9a, 0x28, 0xc7, 0x0a, 0x03, 0x5d, 0x82, 0x61, 0x76, 0x11, 0xef, 0xca, 0x89, - 0xb4, 0x54, 0xe5, 0x71, 0x1c, 0x38, 0x78, 0xe0, 0x7c, 0x73, 0xcf, 0xc0, 0x50, 0x3b, 0x08, 0xbc, - 0x34, 0x33, 0xa2, 0xdd, 0x0d, 0x02, 0x0f, 0x33, 0x20, 0xfa, 0x8c, 0x18, 0x87, 0xd4, 0x8b, 0x0a, - 0x76, 0x5a, 0x41, 0xa4, 0x0d, 0xc6, 0x73, 0x30, 0xba, 0x4b, 0x0e, 0x42, 0xd7, 0xdf, 0x4e, 0xbf, - 0xb4, 0xdd, 0xe0, 0xc5, 0x58, 0xc2, 0xcd, 0x94, 0x20, 0xa3, 0x27, 0x9d, 0x28, 0x6e, 0xac, 0xef, - 0xd1, 0xf6, 0x03, 0x45, 0x98, 0xc6, 0x4b, 0xd5, 0x6f, 0x4d, 0xc4, 0xed, 0xee, 0x89, 0x38, 0xe9, - 0x44, 0x71, 0xfd, 0x67, 0xe3, 0x17, 0x2c, 0x98, 0x66, 0x61, 0xb3, 0x45, 0xc0, 0x17, 0x37, 0xf0, - 0x4f, 0x41, 0x74, 0x7b, 0x06, 0x86, 0x43, 0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0x26, 0xf3, 0xb8, 0x0b, 0x79, 0x3e, 0x29, - 0xb9, 0xc5, 0x3f, 0x37, 0x70, 0x07, 0x44, 0x22, 0xaa, 0x28, 0xe5, 0x71, 0x27, 0x8b, 0xfb, 0x7b, - 0xdc, 0xc9, 0x96, 0xe7, 0x5c, 0x18, 0xd7, 0xbe, 0xe6, 0x91, 0xce, 0xf8, 0x2e, 0x3d, 0x51, 0xb4, - 0x7e, 0x3f, 0xd2, 0x59, 0xff, 0x31, 0x0b, 0x52, 0x26, 0x75, 0x4a, 0x25, 0x65, 0xe5, 0xaa, 0xa4, - 0x2e, 0xc2, 0x50, 0x18, 0x78, 0x24, 0x9d, 0xaa, 0x06, 0x07, 0x1e, 0xc1, 0x0c, 0x42, 0x31, 0xe2, - 0x44, 0x21, 0x31, 0xa1, 0x5f, 0xb6, 0xc4, 0x35, 0xea, 0x19, 0x18, 0xf6, 0xc8, 0x3e, 0x91, 0xda, - 0x08, 0xc5, 0x93, 0x6f, 0xd2, 0x42, 0xcc, 0x61, 0xf6, 0x2f, 0x0c, 0xc1, 0x53, 0x3d, 0x7d, 0x56, - 0xe9, 0x95, 0x65, 0xdb, 0x89, 0xc9, 0x3d, 0xe7, 0x20, 0x1d, 0x48, 0xfb, 0x1a, 0x2f, 0xc6, 0x12, - 0xce, 0x0c, 0x80, 0x79, 0x2c, 0xce, 0x94, 0x02, 0x4f, 0x84, 0xe0, 0x14, 0x50, 0x53, 0x71, 0x54, - 0x3c, 0x09, 0xc5, 0xd1, 0x15, 0x80, 0x28, 0xf2, 0x56, 0x7c, 0x2a, 0x81, 0xb5, 0x84, 0x65, 0x71, - 0x12, 0xb3, 0xb5, 0x71, 0x53, 0x40, 0xb0, 0x86, 0x85, 0xaa, 0x30, 0xd3, 0x0e, 0x83, 0x98, 0xeb, - 0x43, 0xab, 0xdc, 0xa6, 0x65, 0xd8, 0x74, 0x17, 0xac, 0xa7, 0xe0, 0xb8, 0xab, 0x06, 0x7a, 0x0d, - 0xc6,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61, 0x2f, 0xe6, 0xfb, 0x5f, - 0x88, 0x78, 0xb0, 0xea, 0xf0, 0x30, 0xa2, 0xc0, 0x1a, 0xb4, 0xec, 0x16, 0x08, 0x68, 0x95, 0x30, - 0x25, 0x43, 0xff, 0xde, 0x5c, 0x01, 0x68, 0x31, 0x5c, 0x2d, 0x97, 0xa0, 0x62, 0x55, 0x55, 0x05, - 0xc1, 0x1a, 0x96, 0xfd, 0x43, 0x05, 0x18, 0x97, 0x91, 0x48, 0xe9, 0x3d, 0xbe, 0x7f, 0x2b, 0xc7, - 0x4a, 0x43, 0xc0, 0x92, 0x6f, 0x52, 0xc2, 0x2a, 0x5a, 0xbd, 0x9e, 0x7c, 0x53, 0x02, 0x70, 0x82, - 0x83, 0x9e, 0x83, 0xd1, 0xa8, 0xb3, 0xc9, 0xd0, 0x53, 0x46, 0xf4, 0x0d, 0x5e, 0x8c, 0x25, 0x1c, - 0x7d, 0x09, 0x66, 0x78, 0xbd, 0x30, 0x68, 0x3b, 0xdb, 0x5c, 0x83, 0x34, 0xac, 0xbc, 0xda, 0x66, - 0xd6, 0x52, 0xb0, 0xa3, 0xc3, 0xca, 0xd9, 0x74, 0x19, 0xd3, 0x3d, 0x76, 0x51, 0xa1, 0xfb, 0x62, - 0x26, 0xed, 0x30, 0x83, 0xae, 0xc3, 0x08, 0x67, 0x79, 0x82, 0x05, 0xf5, 0x78, 0x51, 0xd2, 0xdc, - 0x6c, 0x58, 0x5c, 0x76, 0xc1, 0x35, 0x45, 0x7d, 0xf4, 0x2e, 0x8c, 0xb7, 0x82, 0x7b, 0xfe, 0x3d, - 0x27, 0x6c, 0x2d, 0xd6, 0x6b, 0x62, 0xd5, 0x64, 0x4a, 0x4e, 0xd5, 0x04, 0x4d, 0x77, 0xdd, 0x61, - 0xda, 0xd3, 0x04, 0x84, 0x75, 0x72, 0x68, 0x83, 0x05, 0x8b, 0xe2, 0xd9, 0xf1, 0x7b, 0x59, 0x9d, - 0xa9, 0x84, 0xfa, 0x1a, 0xe5, 0x49, 0x11, 0x51, 0x4a, 0xe4, 0xd6, 0x4f, 0x08, 0xd9, 0x1f, 0x9e, - 0x01, 0x63, 0xb5, 0x1a, 0x69, 0x08, 0xac, 0x13, 0x4a, 0x43, 0x80, 0x61, 0x8c, 0xec, 0xb5, 0xe3, - 0x83, 0xaa, 0x1b, 0xf6, 0xca, 0x63, 0xb3, 0x22, 0x70, 0xba, 0x69, 0x4a, 0x08, 0x56, 0x74, 0xb2, - 0x73, 0x45, 0x14, 0x3f, 0xc6, 0x5c, 0x11, 0x43, 0xa7, 0x98, 0x2b, 0x62, 0x1d, 0x46, 0xb7, 0xdd, - 0x18, 0x93, 0x76, 0x20, 0x8e, 0xfb, 0xcc, 0x95, 0x70, 0x8d, 0xa3, 0x74, 0x47, 0x2a, 0x17, 0x00, - 0x2c, 0x89, 0xa0, 0xb7, 0xd4, 0x1e, 0x18, 0xc9, 0x97, 0x96, 0xbb, 0x1f, 0x1f, 0x32, 0x77, 0x81, - 0xc8, 0x0d, 0x31, 0xfa, 0xb0, 0xb9, 0x21, 0x56, 0x65, 0x46, 0x87, 0xb1, 0x7c, 0x23, 0x4d, 0x96, - 0xb0, 0xa1, 0x4f, 0x1e, 0x07, 0x23, 0xf7, 0x45, 0xe9, 0xe4, 0x72, 0x5f, 0x7c, 0xbf, 0x05, 0xe7, - 0xda, 0x59, 0x69, 0x60, 0x44, 0x46, 0x86, 0xd7, 0x06, 0xce, 0x73, 0x63, 0x34, 0xc8, 0xae, 0x4d, - 0x99, 0x68, 0x38, 0xbb, 0x39, 0x3a, 0xd0, 0xe1, 0x66, 0x4b, 0xa4, 0x71, 0x78, 0x26, 0x27, 0x89, - 0x46, 0x8f, 0xd4, 0x19, 0x1b, 0x19, 0xa9, 0x1b, 0x3e, 0x9d, 0x97, 0xba, 0x61, 0xe0, 0x84, 0x0d, - 0x49, 0xfa, 0x8c, 0xc9, 0x8f, 0x9c, 0x3e, 0xe3, 0x2d, 0x95, 0x3e, 0xa3,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 0xe0, 0xee, 0x3a, 0x68, 0x11, 0xa6, 0x8d, 0xc2, 0x5a, 0x55, 0x08, 0xfb, 0x4a, 0x41, - 0xd2, 0x30, 0xc1, 0x38, 0x8d, 0x6f, 0x7f, 0xdd, 0x82, 0xc7, 0x73, 0x62, 0x5f, 0x0f, 0x1c, 0x57, - 0x61, 0x0b, 0xa6, 0xdb, 0x66, 0xd5, 0x3e, 0xe1, 0x57, 0x8c, 0x08, 0xdb, 0xaa, 0xaf, 0x29, 0x00, - 0x4e, 0x13, 0x5d, 0xba, 0xfc, 0x1b, 0x7f, 0x78, 0xe1, 0x53, 0xbf, 0xfd, 0x87, 0x17, 0x3e, 0xf5, - 0x7b, 0x7f, 0x78, 0xe1, 0x53, 0x7f, 0xf5, 0xc1, 0x05, 0xeb, 0x37, 0x1e, 0x5c, 0xb0, 0x7e, 0xfb, - 0xc1, 0x05, 0xeb, 0xf7, 0x1e, 0x5c, 0xb0, 0xfe, 0xe0, 0xc1, 0x05, 0xeb, 0x6b, 0x7f, 0x74, 0xe1, - 0x53, 0xef, 0x14, 0xf6, 0x5f, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x16, 0xdf, 0x88, 0xcf, - 0xae, 0xe0, 0x00, 0x00, + // 12687 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x6b, 0x6c, 0x24, 0x57, + 0x76, 0x18, 0xbc, 0xd5, 0xdd, 0x7c, 0xf4, 0xe1, 0xfb, 0xce, 0x43, 0x1c, 0x4a, 0x33, 0x3d, 0x2a, + 0xed, 0x8e, 0x46, 0x2b, 0x89, 0xb3, 0x1a, 0x49, 0x2b, 0x79, 0xb5, 0x2b, 0x9b, 0x64, 0x93, 0x33, + 0xd4, 0x0c, 0x39, 0xad, 0xdb, 0x9c, 0xd1, 0xae, 0xac, 0x5d, 0x6f, 0xb1, 0xfb, 0xb2, 0x59, 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b3, 0xd6, 0xe5, 0xe2, 0xd5, 0xb1, 0xeb, 0x57, 0x33, 0x3f, 0xd6, 0x44, 0x5d, 0xf6, + 0xe3, 0x70, 0x7f, 0xf1, 0x31, 0xd1, 0xde, 0x54, 0x0a, 0x8a, 0xd3, 0x94, 0xed, 0x7f, 0x55, 0x80, + 0x73, 0x0b, 0xef, 0x77, 0x42, 0x52, 0x75, 0xa3, 0x9d, 0xf4, 0x0a, 0x6f, 0xba, 0xd1, 0xce, 0x7a, + 0x32, 0x02, 0x6a, 0x69, 0x55, 0x45, 0x39, 0x56, 0x18, 0xe8, 0x79, 0x18, 0xa1, 0xbf, 0xef, 0xe2, + 0x55, 0xf1, 0xc9, 0x67, 0x04, 0xf2, 0x58, 0xd5, 0x89, 0x9d, 0x2a, 0x07, 0x61, 0x89, 0x83, 0xd6, + 0x60, 0xac, 0xc1, 0x36, 0x64, 0x6b, 0x2d, 0x68, 0x12, 0x36, 0x99, 0xe5, 0xc5, 0x67, 0x29, 0xfa, + 0x52, 0x52, 0x7c, 0x74, 0x50, 0x99, 0xe5, 0x7d, 0x13, 0x24, 0x34, 0x18, 0xd6, 0xeb, 0x23, 0x5b, + 0xed, 0xaf, 0x12, 0xa3, 0x04, 0x19, 0x7b, 0xeb, 0xaa, 0xb6, 0x55, 0x86, 0xd8, 0x56, 0x19, 0xcf, + 0xde, 0x26, 0xe8, 0x05, 0x28, 0xed, 0xb8, 0x7e, 0x73, 0x76, 0x98, 0xd1, 0xba, 0x48, 0xe7, 0xfc, + 0x96, 0xeb, 0x37, 0x8f, 0x0e, 0x2a, 0x33, 0x46, 0x77, 0x68, 0x21, 0x66, 0xa8, 0xf6, 0x1f, 0x59, + 0x50, 0x61, 0xb0, 0x15, 0xd7, 0x23, 0x35, 0x12, 0x46, 0x6e, 0x14, 0x13, 0x3f, 0x36, 0x06, 0xf4, + 0x3a, 0x40, 0x44, 0x1a, 0x21, 0x89, 0xb5, 0x21, 0x55, 0x0b, 0xa3, 0xae, 0x20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0x6f, 0x5a, 0x30, 0x25, 0xd7, 0xfd, 0x42, 0xb3, 0x19, 0x92, 0x28, 0x42, 0x73, 0x50, + 0x70, 0xdb, 0xa2, 0x97, 0x20, 0x7a, 0x59, 0x58, 0xad, 0xe1, 0x82, 0xdb, 0x46, 0x35, 0x28, 0x73, + 0x73, 0x8d, 0x64, 0x71, 0x0d, 0x64, 0xf4, 0xc1, 0x7a, 0xb0, 0x21, 0x6b, 0xe2, 0x84, 0x88, 0xe4, + 0xe0, 0xd8, 0x99, 0x59, 0x34, 0x5f, 0xbd, 0x6e, 0x8a, 0x72, 0xac, 0x30, 0xd0, 0x55, 0x18, 0xf5, + 0x83, 0x26, 0xb7, 0x9e, 0xe1, 0xb7, 0x1f, 0x5b, 0xb2, 0xeb, 0xa2, 0x0c, 0x2b, 0xa8, 0xfd, 0x43, + 0x16, 0x8c, 0xcb, 0x2f, 0x1b, 0x90, 0x99, 0xa4, 0x5b, 0x2b, 0x61, 0x24, 0x93, 0xad, 0x45, 0x99, + 0x41, 0x06, 0x31, 0x78, 0xc0, 0xe2, 0x71, 0x78, 0x40, 0xfb, 0xc7, 0x0a, 0x30, 0x29, 0xbb, 0x53, + 0xef, 0x6c, 0x46, 0x24, 0x46, 0x1b, 0x50, 0x76, 0xf8, 0x90, 0x13, 0xb9, 0x62, 0x9f, 0xca, 0x16, + 0x3e, 0x8c, 0xf9, 0x49, 0xae, 0xe5, 0x05, 0x59, 0x1b, 0x27, 0x84, 0x90, 0x07, 0x33, 0x7e, 0x10, + 0xb3, 0x23, 0x5a, 0xc1, 0x7b, 0x3d, 0x81, 0xa4, 0xa9, 0x5f, 0x10, 0xd4, 0x67, 0xd6, 0xd3, 0x54, + 0x70, 0x37, 0x61, 0xb4, 0x2c, 0x15, 0x1e, 0xc5, 0x7c, 0x71, 0x43, 0x9f, 0x85, 0x6c, 0x7d, 0x87, + 0xfd, 0xab, 0x16, 0x94, 0x25, 0xda, 0x69, 0xbc, 0x76, 0xad, 0xc1, 0x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4a, 0xe7, 0x67, 0xa1, + 0x2c, 0x15, 0xc0, 0x91, 0x70, 0x6c, 0x62, 0x54, 0xa5, 0x7e, 0x38, 0xc2, 0x09, 0xdc, 0xde, 0x82, + 0xb3, 0xec, 0xe5, 0xdf, 0x89, 0xb7, 0x8d, 0x3d, 0xd6, 0x7f, 0x31, 0x3f, 0x27, 0x04, 0x31, 0x3e, + 0x33, 0xb3, 0x9a, 0xef, 0xc0, 0xb8, 0xa4, 0x98, 0x08, 0x65, 0xf6, 0x1f, 0x96, 0xe0, 0xf1, 0xd5, + 0x7a, 0xbe, 0xc3, 0xe2, 0xab, 0x30, 0xce, 0xd9, 0x34, 0xba, 0xb4, 0x1d, 0x4f, 0xb4, 0xab, 0xde, + 0xc5, 0x36, 0x34, 0x18, 0x36, 0x30, 0xd1, 0x45, 0x28, 0xba, 0xef, 0xf9, 0x69, 0x33, 0xdc, 0xd5, + 0x37, 0xd7, 0x31, 0x2d, 0xa7, 0x60, 0xca, 0xf1, 0xf1, 0xa3, 0x54, 0x81, 0x15, 0xd7, 0xf7, 0x3a, + 0x4c, 0xba, 0x51, 0x23, 0x72, 0x57, 0x7d, 0x7a, 0xce, 0x24, 0xce, 0xae, 0x89, 0x92, 0x80, 0x76, + 0x5a, 0x41, 0x71, 0x0a, 0x5b, 0x3b, 0xd7, 0x87, 0x06, 0xe6, 0x1a, 0xfb, 0x7a, 0xfa, 0x50, 0x86, + 0xb8, 0xcd, 0xbe, 0x2e, 0x62, 0x46, 0x6d, 0x82, 0x21, 0xe6, 0x1f, 0x1c, 0x61, 0x09, 0xa3, 0x12, + 0x58, 0x63, 0xdb, 0x69, 0x2f, 0x74, 0xe2, 0xed, 0xaa, 0x1b, 0x35, 0x82, 0x3d, 0x12, 0xee, 0x33, + 0xe1, 0x79, 0x34, 0x91, 0xc0, 0x14, 0x60, 0xe9, 0xe6, 0x42, 0x8d, 0x62, 0xe2, 0xee, 0x3a, 0x26, + 0x57, 0x08, 0x27, 0xc1, 0x15, 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0xaa, 0xa1, 0x41, 0x6d, 0xa8, 0x86, 0xfb, 0x78, 0x91, 0xf8, 0x30, 0xdd, 0x15, + 0x6f, 0xe0, 0x6d, 0x28, 0x2b, 0x5b, 0x37, 0x71, 0xe8, 0xf4, 0x0e, 0xdb, 0x91, 0xa6, 0xc0, 0x55, + 0x24, 0x89, 0x9d, 0x65, 0x42, 0xce, 0xfe, 0x47, 0x05, 0xa3, 0x41, 0x3e, 0x89, 0xeb, 0x30, 0xea, + 0x44, 0x91, 0xdb, 0xf2, 0x49, 0x53, 0xec, 0xd8, 0x8f, 0xe7, 0xed, 0x58, 0xa3, 0x19, 0x66, 0x6f, + 0xb8, 0x20, 0x6a, 0x62, 0x45, 0x03, 0xdd, 0xe4, 0xc6, 0x40, 0x7b, 0x92, 0x9f, 0x1f, 0x8c, 0x1a, + 0x48, 0x73, 0xa1, 0x3d, 0x82, 0x45, 0x7d, 0xf4, 0x45, 0x6e, 0xad, 0x75, 0xcb, 0x0f, 0xee, 0xfb, + 0x37, 0x82, 0x40, 0x7a, 0x98, 0x0d, 0x46, 0x70, 0x46, 0xda, 0x68, 0xa9, 0xea, 0xd8, 0xa4, 0x36, + 0x58, 0x4c, 0x9e, 0xef, 0x86, 0x33, 0x94, 0xb4, 0xe9, 0x27, 0x12, 0x21, 0x02, 0x53, 0x22, 0x12, + 0x82, 0x2c, 0x13, 0x63, 0x97, 0xc9, 0xaa, 0x9b, 0xb5, 0x13, 0x85, 0xde, 0x2d, 0x93, 0x04, 0x4e, + 0xd3, 0xb4, 0x7f, 0xda, 0x02, 0x66, 0xe1, 0x7e, 0x0a, 0x2c, 0xc3, 0xe7, 0x4c, 0x96, 0x61, 0x36, + 0x6f, 0x90, 0x73, 0xb8, 0x85, 0x97, 0xf8, 0xca, 0xaa, 0x85, 0xc1, 0x83, 0x7d, 0xf1, 0x52, 0x3e, + 0x00, 0x97, 0xfa, 0x7f, 0x2c, 0x7e, 0x88, 0x29, 0xa7, 0x73, 0xf4, 0x3d, 0x30, 0xda, 0x70, 0xda, + 0x4e, 0x83, 0x87, 0xec, 0xcd, 0xd5, 0xd8, 0x18, 0x95, 0xe6, 0x97, 0x44, 0x0d, 0xae, 0x81, 0x90, + 0x11, 0x35, 0x46, 0x65, 0x71, 0x5f, 0xad, 0x83, 0x6a, 0x72, 0x6e, 0x07, 0x26, 0x0c, 0x62, 0x8f, + 0x54, 0x5c, 0xfd, 0x1e, 0x7e, 0xc5, 0xaa, 0x08, 0x30, 0xbb, 0x30, 0xe3, 0x6b, 0xff, 0xe9, 0x85, + 0x22, 0x45, 0x90, 0x8f, 0xf7, 0xbb, 0x44, 0xd9, 0xed, 0xa3, 0x59, 0xf0, 0xa7, 0xc8, 0xe0, 0x6e, + 0xca, 0xf6, 0x4f, 0x5a, 0xf0, 0x98, 0x8e, 0xa8, 0xc5, 0x03, 0xe8, 0xa7, 0x03, 0xae, 0xc2, 0x68, + 0xd0, 0x26, 0xa1, 0x13, 0x07, 0xa1, 0xb8, 0x35, 0xae, 0xca, 0x41, 0xbf, 0x23, 0xca, 0x8f, 0x44, + 0xec, 0x44, 0x49, 0x5d, 0x96, 0x63, 0x55, 0x13, 0xd9, 0x30, 0xcc, 0x06, 0x23, 0x12, 0xb1, 0x1a, + 0xd8, 0x19, 0xc0, 0x9e, 0x43, 0x23, 0x2c, 0x20, 0xf6, 0x1f, 0x5a, 0x7c, 0x61, 0xe9, 0x5d, 0x47, + 0xef, 0xc1, 0xf4, 0xae, 0x13, 0x37, 0xb6, 0x97, 0x1f, 0xb4, 0x43, 0xae, 0xfa, 0x96, 0xe3, 0xf4, + 0x6c, 0xbf, 0x71, 0xd2, 0x3e, 0x32, 0x31, 0x40, 0x5b, 0x4b, 0x11, 0xc3, 0x5d, 0xe4, 0xd1, 0x26, + 0x8c, 0xb1, 0x32, 0x66, 0xe9, 0x1c, 0xf5, 0x62, 0x0d, 0xf2, 0x5a, 0x53, 0x2f, 0xca, 0x6b, 0x09, + 0x1d, 0xac, 0x13, 0xb5,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xcb, 0x89, 0x66, 0x58, 0xb2, 0xa0, 0xc1, 0xb0, 0x81, 0x69, + 0xbf, 0x0f, 0x67, 0x32, 0x9c, 0xd2, 0xe8, 0xc2, 0x71, 0xda, 0xae, 0xfc, 0xa6, 0x94, 0x31, 0xe6, + 0x42, 0x6d, 0x55, 0x7e, 0x8d, 0x86, 0x45, 0x57, 0x27, 0x73, 0x5e, 0xd3, 0x12, 0x4c, 0xa8, 0xd5, + 0xb9, 0x22, 0x01, 0x38, 0xc1, 0xb1, 0xff, 0x57, 0x01, 0xa6, 0x32, 0x14, 0xeb, 0x2c, 0xc9, 0x41, + 0x4a, 0xf6, 0x48, 0x72, 0x1a, 0x98, 0x81, 0xfd, 0x0a, 0xc7, 0x08, 0xec, 0x57, 0xec, 0x17, 0xd8, + 0xaf, 0xf4, 0x41, 0x02, 0xfb, 0x99, 0x23, 0x36, 0x34, 0xd0, 0x88, 0x65, 0x04, 0x03, 0x1c, 0x3e, + 0x66, 0x30, 0x40, 0x63, 0xd0, 0x47, 0x06, 0x18, 0xf4, 0x1f, 0x29, 0xc0, 0x74, 0xda, 0x00, 0xee, + 0x14, 0xd4, 0xb1, 0x6f, 0x18, 0xea, 0xd8, 0xec, 0x94, 0x21, 0x69, 0xb3, 0xbc, 0x3c, 0xd5, 0x2c, + 0x4e, 0xa9, 0x66, 0x3f, 0x39, 0x10, 0xb5, 0xde, 0x6a, 0xda, 0xbf, 0x53, 0x80, 0x73, 0xe9, 0x2a, + 0x4b, 0x9e, 0xe3, 0xee, 0x9e, 0xc2, 0xd8, 0xdc, 0x31, 0xc6, 0xe6, 0xf9, 0x41, 0xbe, 0x86, 0x75, + 0x2d, 0x77, 0x80, 0xde, 0x4a, 0x0d, 0xd0, 0xb5, 0xc1, 0x49, 0xf6, 0x1e, 0xa5, 0x6f, 0x16, 0xe1, + 0x52, 0x66, 0xbd, 0x44, 0x9b, 0xb9, 0x62, 0x68, 0x33, 0xaf, 0xa7, 0xb4, 0x99, 0x76, 0xef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e, 0x7b, 0x93, + 0x13, 0x59, 0x97, 0x54, 0x73, 0xfc, 0xa5, 0x0e, 0x0b, 0x28, 0xfa, 0x3c, 0x00, 0x7f, 0x69, 0xa3, + 0x62, 0x4d, 0xbf, 0xc8, 0x3a, 0x46, 0x50, 0x10, 0x2d, 0x98, 0x83, 0xac, 0x8f, 0x35, 0x5a, 0xf6, + 0x4f, 0x17, 0x61, 0x88, 0xbd, 0xec, 0xa0, 0x15, 0x18, 0xd9, 0xe6, 0xe1, 0x91, 0x07, 0x89, 0xc4, + 0x9c, 0xc8, 0x87, 0xbc, 0x00, 0xcb, 0xca, 0x68, 0x0d, 0xce, 0xf0, 0xf0, 0xd2, 0x5e, 0x95, 0x78, + 0xce, 0xbe, 0x54, 0x33, 0xf0, 0x4c, 0x45, 0x2a, 0x30, 0xc5, 0x6a, 0x37, 0x0a, 0xce, 0xaa, 0x87, + 0x5e, 0x87, 0x49, 0xca, 0x97, 0x05, 0x9d, 0x58, 0x52, 0xe2, 0x81, 0xa5, 0x15, 0x23, 0xb8, 0x61, + 0x40, 0x71, 0x0a, 0x9b, 0x0a, 0x4c, 0xed, 0x2e, 0x85, 0x8a, 0x96, 0xfb, 0xdf, 0x54, 0xa2, 0x98, + 0xb8, 0xcc, 0x04, 0xa9, 0xc3, 0x0c, 0xae, 0x36, 0xb6, 0x43, 0x12, 0x6d, 0x07, 0x5e, 0x53, 0x24, + 0xba, 0x4e, 0x4c, 0x90, 0x52, 0x70, 0xdc, 0x55, 0x83, 0x52, 0xd9, 0x72, 0x5c, 0xaf, 0x13, 0x92, + 0x84, 0xca, 0xb0, 0x49, 0x65, 0x25, 0x05, 0xc7, 0x5d, 0x35, 0xe8, 0x3a, 0x3a, 0x27, 0x32, 0x4f, + 0x4b, 0x77, 0x79, 0x65, 0x57, 0x36, 0x22, 0x1d, 0x87, 0x7a, 0xc4, 0x8b, 0x11, 0x96, 0x37, 0x2a, + 0x77, 0xb5, 0xa6, 0x07, 0x14, 0x2e, 0x43,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0x41, + 0x19, 0x7a, 0xf7, 0x38, 0xf1, 0x5c, 0x5e, 0xcb, 0x22, 0x8d, 0xb3, 0x5b, 0xb4, 0xbf, 0xdf, 0x02, + 0xe1, 0x24, 0x34, 0xc0, 0xc6, 0x7e, 0x5b, 0x26, 0x3b, 0x35, 0x42, 0x80, 0x5f, 0xce, 0xf7, 0x9a, + 0x12, 0x81, 0xbf, 0xd5, 0x45, 0x6a, 0x84, 0xfb, 0x36, 0x68, 0xd9, 0x4d, 0x10, 0xd0, 0x2a, 0x61, + 0x7a, 0xa2, 0xfe, 0xbd, 0xb9, 0x0e, 0xd0, 0x64, 0xb8, 0x5a, 0xca, 0x43, 0x75, 0x6c, 0x57, 0x15, + 0x04, 0x6b, 0x58, 0xf6, 0x0f, 0x17, 0x60, 0x4c, 0x86, 0x9c, 0xee, 0xf8, 0x83, 0x48, 0x73, 0xc7, + 0xca, 0x3c, 0xc3, 0x72, 0x84, 0x52, 0xc2, 0xb5, 0x44, 0x08, 0x4e, 0x72, 0x84, 0x4a, 0x00, 0x4e, + 0x70, 0xd0, 0x33, 0x30, 0x12, 0x75, 0x36, 0x19, 0x7a, 0xca, 0xf5, 0xa5, 0xce, 0x8b, 0xb1, 0x84, + 0xa3, 0xcf, 0xc3, 0x34, 0xaf, 0x17, 0x06, 0x6d, 0xa7, 0xc5, 0x95, 0x86, 0x43, 0xca, 0x17, 0x75, + 0x7a, 0x2d, 0x05, 0x3b, 0x3a, 0xa8, 0x9c, 0x4d, 0x97, 0x31, 0x75, 0x73, 0x17, 0x15, 0xfb, 0xcb, + 0x80, 0xba, 0xa3, 0x68, 0xa3, 0x37, 0xb8, 0x01, 0x92, 0x1b, 0x92, 0x66, 0x2f, 0x3d, 0xb2, 0xee, + 0x3a, 0x29, 0xcd, 0xcf, 0x79, 0x2d, 0xac, 0xea, 0xdb, 0x7f, 0xb5, 0x08, 0xd3, 0x69, 0x47, 0x3a, + 0x74, 0x13, 0x86, 0xf9, 0x05, 0x23, 0xc8,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0xb1, 0xb7, 0x0b, 0x7b, 0x2f, + 0xfc, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x98, 0x6b, 0x40, 0xc0, 0xe5, 0x00, 0x00, } diff --git a/deps/k8s.io/api/core/v1/generated.proto b/deps/k8s.io/api/core/v1/generated.proto index 4c0e84852..f89b7d858 100644 --- a/deps/k8s.io/api/core/v1/generated.proto +++ b/deps/k8s.io/api/core/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ syntax = 'proto2'; package k8s.io.api.core.v1; -import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; @@ -170,7 +169,7 @@ message Binding { optional ObjectReference target = 2; } -// Represents storage that is managed by an external CSI volume driver +// Represents storage that is managed by an external CSI volume driver (Beta feature) message CSIPersistentVolumeSource { // Driver is the name of the driver to use for this volume. // Required. @@ -188,9 +187,37 @@ message CSIPersistentVolumeSource { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // Ex. "ext4", "xfs", "ntfs". // +optional optional string fsType = 4; + + // Attributes of the volume to publish. + // +optional + map volumeAttributes = 5; + + // ControllerPublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // ControllerPublishVolume and ControllerUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + // +optional + optional SecretReference controllerPublishSecretRef = 6; + + // NodeStageSecretRef is a reference to the secret object containing sensitive + // information to pass to the CSI driver to complete the CSI NodeStageVolume + // and NodeStageVolume and NodeUnstageVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + // +optional + optional SecretReference nodeStageSecretRef = 7; + + // NodePublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // NodePublishVolume and NodeUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + // +optional + optional SecretReference nodePublishSecretRef = 8; } // Adds and removes POSIX capabilities from running containers. @@ -270,6 +297,34 @@ message CephFSVolumeSource { optional bool readOnly = 6; } +// Represents a cinder volume resource in Openstack. +// A Cinder volume must exist before mounting to a container. +// The volume must also be in the same region as the kubelet. +// Cinder volumes support ownership management and SELinux relabeling. +message CinderPersistentVolumeSource { + // volume id used to identify the volume in cinder + // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + optional string volumeID = 1; + + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional + optional string fsType = 2; + + // Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional + optional bool readOnly = 3; + + // Optional: points to a secret object containing parameters used to connect + // to OpenStack. + // +optional + optional SecretReference secretRef = 4; +} + // Represents a cinder volume resource in Openstack. // A Cinder volume must exist before mounting to a container. // The volume must also be in the same region as the kubelet. @@ -291,6 +346,11 @@ message CinderVolumeSource { // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md // +optional optional bool readOnly = 3; + + // Optional: points to a secret object containing parameters used to connect + // to OpenStack. + // +optional + optional LocalObjectReference secretRef = 4; } // ClientIPConfig represents the configurations of Client IP based session affinity. @@ -411,6 +471,31 @@ message ConfigMapList { repeated ConfigMap items = 2; } +// ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. +message ConfigMapNodeConfigSource { + // Namespace is the metadata.namespace of the referenced ConfigMap. + // This field is required in all cases. + optional string namespace = 1; + + // Name is the metadata.name of the referenced ConfigMap. + // This field is required in all cases. + optional string name = 2; + + // UID is the metadata.UID of the referenced ConfigMap. + // This field is forbidden in Node.Spec, and required in Node.Status. + // +optional + optional string uid = 3; + + // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. + // This field is forbidden in Node.Spec, and required in Node.Status. + // +optional + optional string resourceVersion = 4; + + // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure + // This field is required in all cases. + optional string kubeletConfigKey = 5; +} + // Adapts a ConfigMap into a projected volume. // // The contents of the target ConfigMap's Data field will be presented in a @@ -541,7 +626,7 @@ message Container { // Compute Resources required by this container. // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ // +optional optional ResourceRequirements resources = 8; @@ -781,41 +866,6 @@ message DaemonEndpoint { optional int32 Port = 1; } -// DeleteOptions may be provided when deleting an API object -// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. -// +k8s:openapi-gen=false -message DeleteOptions { - // The duration in seconds before the object should be deleted. Value must be non-negative integer. - // The value zero indicates delete immediately. If this value is nil, the default grace period for the - // specified type will be used. - // Defaults to a per object value if not specified. zero means delete immediately. - // +optional - optional int64 gracePeriodSeconds = 1; - - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be - // returned. - // +optional - optional Preconditions preconditions = 2; - - // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. - // Should the dependent objects be orphaned. If true/false, the "orphan" - // finalizer will be added to/removed from the object's finalizers list. - // Either this field or PropagationPolicy may be set, but not both. - // +optional - optional bool orphanDependents = 3; - - // Whether and how garbage collection will be performed. - // Either this field or OrphanDependents may be set, but not both. - // The default policy is decided by the existing finalizer set in the - // metadata.finalizers and the resource-specific default policy. - // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - - // allow the garbage collector to delete the dependents in the background; - // 'Foreground' - a cascading policy that deletes all dependents in the - // foreground. - // +optional - optional string propagationPolicy = 4; -} - // Represents downward API info for projecting into a projected volume. // Note that this is identical to a downwardAPI volume source without the default // mode. @@ -976,6 +1026,7 @@ message Endpoints { // subsets for the different ports. No address will appear in both Addresses and // NotReadyAddresses in the same subset. // Sets of addresses and ports that comprise a service. + // +optional repeated EndpointSubset subsets = 2; } @@ -1299,6 +1350,10 @@ message GCEPersistentDiskVolumeSource { // Represents a volume that is populated with the contents of a git repository. // Git repo volumes do not support ownership management. // Git repo volumes support SELinux relabeling. +// +// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an +// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir +// into the Pod's container. message GitRepoVolumeSource { // Repository URL optional string repository = 1; @@ -1633,43 +1688,6 @@ message List { repeated k8s.io.apimachinery.pkg.runtime.RawExtension items = 2; } -// ListOptions is the query options to a standard REST list call. -// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. -// +k8s:openapi-gen=false -message ListOptions { - // A selector to restrict the list of returned objects by their labels. - // Defaults to everything. - // +optional - optional string labelSelector = 1; - - // A selector to restrict the list of returned objects by their fields. - // Defaults to everything. - // +optional - optional string fieldSelector = 2; - - // If true, partially initialized resources are included in the response. - // +optional - optional bool includeUninitialized = 6; - - // Watch for changes to the described resources and return them as a stream of - // add, update, and remove notifications. Specify resourceVersion. - // +optional - optional bool watch = 3; - - // When specified with a watch call, shows changes that occur after that particular version of a resource. - // Defaults to changes from the beginning of history. - // When specified for list: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. - // +optional - optional string resourceVersion = 4; - - // Timeout for the list/watch call. - // +optional - optional int64 timeoutSeconds = 5; -} - // LoadBalancerIngress represents the status of a load-balancer ingress point: // traffic intended for the service should be sent to an ingress point. message LoadBalancerIngress { @@ -1702,11 +1720,13 @@ message LocalObjectReference { optional string name = 1; } -// Local represents directly-attached storage with node affinity +// Local represents directly-attached storage with node affinity (Beta feature) message LocalVolumeSource { - // The full path to the volume on the node - // For alpha, this path must be a directory - // Once block as a source is supported, then this path can point to a block device + // The full path to the volume on the node. + // It can be either a directory or block device (disk, partition, ...). + // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. + // Block devices can be represented only by VolumeMode=Block, which also requires the + // BlockVolume alpha feature gate to be enabled. optional string path = 1; } @@ -1856,7 +1876,58 @@ message NodeCondition { // NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. message NodeConfigSource { - optional ObjectReference configMapRef = 1; + // ConfigMap is a reference to a Node's ConfigMap + optional ConfigMapNodeConfigSource configMap = 2; +} + +// NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. +message NodeConfigStatus { + // Assigned reports the checkpointed config the node will try to use. + // When Node.Spec.ConfigSource is updated, the node checkpoints the associated + // config payload to local disk, along with a record indicating intended + // config. The node refers to this record to choose its config checkpoint, and + // reports this record in Assigned. Assigned only updates in the status after + // the record has been checkpointed to disk. When the Kubelet is restarted, + // it tries to make the Assigned config the Active config by loading and + // validating the checkpointed payload identified by Assigned. + // +optional + optional NodeConfigSource assigned = 1; + + // Active reports the checkpointed config the node is actively using. + // Active will represent either the current version of the Assigned config, + // or the current LastKnownGood config, depending on whether attempting to use the + // Assigned config results in an error. + // +optional + optional NodeConfigSource active = 2; + + // LastKnownGood reports the checkpointed config the node will fall back to + // when it encounters an error attempting to use the Assigned config. + // The Assigned config becomes the LastKnownGood config when the node determines + // that the Assigned config is stable and correct. + // This is currently implemented as a 10-minute soak period starting when the local + // record of Assigned config is updated. If the Assigned config is Active at the end + // of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is + // reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, + // because the local default config is always assumed good. + // You should not make assumptions about the node's method of determining config stability + // and correctness, as this may change or become configurable in the future. + // +optional + optional NodeConfigSource lastKnownGood = 3; + + // Error describes any problems reconciling the Spec.ConfigSource to the Active config. + // Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned + // record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting + // to load or validate the Assigned config, etc. + // Errors may occur at different points while syncing config. Earlier errors (e.g. download or + // checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across + // Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in + // a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error + // by fixing the config assigned in Spec.ConfigSource. + // You can find additional information for debugging by searching the error message in the Kubelet log. + // Error is a human-readable description of the error state; machines can check whether or not Error + // is empty, but should not rely on the stability of the Error text across Kubelet versions. + // +optional + optional string error = 4; } // NodeDaemonEndpoints lists ports opened by daemons running on the Node. @@ -1918,10 +1989,17 @@ message NodeSelectorRequirement { repeated string values = 3; } -// A null or empty node selector term matches no objects. +// A null or empty node selector term matches no objects. The requirements of +// them are ANDed. +// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. message NodeSelectorTerm { - // Required. A list of node selector requirements. The requirements are ANDed. + // A list of node selector requirements by node's labels. + // +optional repeated NodeSelectorRequirement matchExpressions = 1; + + // A list of node selector requirements by node's fields. + // +optional + repeated NodeSelectorRequirement matchFields = 2; } // NodeSpec describes the attributes that a node is created with. @@ -1930,11 +2008,6 @@ message NodeSpec { // +optional optional string podCIDR = 1; - // External ID of the node assigned by some machine database (e.g. a cloud provider). - // Deprecated. - // +optional - optional string externalID = 2; - // ID of the node assigned by the cloud provider in the format: :// // +optional optional string providerID = 3; @@ -1952,6 +2025,11 @@ message NodeSpec { // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field // +optional optional NodeConfigSource configSource = 6; + + // Deprecated. Not all kubelets will set this field. Remove field after 1.13. + // see: https://issues.k8s.io/61966 + // +optional + optional string externalID = 2; } // NodeStatus is information about the current status of a node. @@ -2007,6 +2085,10 @@ message NodeStatus { // List of volumes that are attached to the node. // +optional repeated AttachedVolume volumesAttached = 10; + + // Status of the config assigned to the node via the dynamic Kubelet config feature. + // +optional + optional NodeConfigStatus config = 11; } // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. @@ -2056,170 +2138,6 @@ message ObjectFieldSelector { optional string fieldPath = 2; } -// ObjectMeta is metadata that all persisted resources must have, which includes all objects -// users must create. -// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. -// +k8s:openapi-gen=false -message ObjectMeta { - // Name must be unique within a namespace. Is required when creating resources, although - // some resources may allow a client to request the generation of an appropriate name - // automatically. Name is primarily intended for creation idempotence and configuration - // definition. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +optional - optional string name = 1; - - // GenerateName is an optional prefix, used by the server, to generate a unique - // name ONLY IF the Name field has not been provided. - // If this field is used, the name returned to the client will be different - // than the name passed. This value will also be combined with a unique suffix. - // The provided value has the same validation rules as the Name field, - // and may be truncated by the length of the suffix required to make the value - // unique on the server. - // - // If this field is specified and the generated name exists, the server will - // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - // ServerTimeout indicating a unique name could not be found in the time allotted, and the client - // should retry (optionally after the time indicated in the Retry-After header). - // - // Applied only if Name is not specified. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency - // +optional - optional string generateName = 2; - - // Namespace defines the space within each name must be unique. An empty namespace is - // equivalent to the "default" namespace, but "default" is the canonical representation. - // Not all objects are required to be scoped to a namespace - the value of this field for - // those objects will be empty. - // - // Must be a DNS_LABEL. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - // +optional - optional string namespace = 3; - - // SelfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // +optional - optional string selfLink = 4; - - // UID is the unique in time and space value for this object. It is typically generated by - // the server on successful creation of a resource and is not allowed to change on PUT - // operations. - // - // Populated by the system. - // Read-only. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - // +optional - optional string uid = 5; - - // An opaque value that represents the internal version of this object that can - // be used by clients to determine when objects have changed. May be used for optimistic - // concurrency, change detection, and the watch operation on a resource or set of resources. - // Clients must treat these values as opaque and passed unmodified back to the server. - // They may only be valid for a particular resource or set of resources. - // - // Populated by the system. - // Read-only. - // Value must be treated as opaque by clients and . - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - // +optional - optional string resourceVersion = 6; - - // A sequence number representing a specific generation of the desired state. - // Populated by the system. Read-only. - // +optional - optional int64 generation = 7; - - // CreationTimestamp is a timestamp representing the server time when this object was - // created. It is not guaranteed to be set in happens-before order across separate operations. - // Clients may not set this value. It is represented in RFC3339 form and is in UTC. - // - // Populated by the system. - // Read-only. - // Null for lists. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time creationTimestamp = 8; - - // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This - // field is set by the server when a graceful deletion is requested by the user, and is not - // directly settable by a client. The resource is expected to be deleted (no longer visible - // from resource lists, and not reachable by name) after the time in this field. Once set, - // this value may not be unset or be set further into the future, although it may be shortened - // or the resource may be deleted prior to this time. For example, a user may request that - // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination - // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard - // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the - // API. In the presence of network partitions, this object may still exist after this - // timestamp, until an administrator or automated process can determine the resource is - // fully terminated. - // If not set, graceful deletion of the object has not been requested. - // - // Populated by the system when a graceful deletion is requested. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deletionTimestamp = 9; - - // Number of seconds allowed for this object to gracefully terminate before - // it will be removed from the system. Only set when deletionTimestamp is also set. - // May only be shortened. - // Read-only. - // +optional - optional int64 deletionGracePeriodSeconds = 10; - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May match selectors of replication controllers - // and services. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - // +optional - map labels = 11; - - // Annotations is an unstructured key value map stored with a resource that may be - // set by external tools to store and retrieve arbitrary metadata. They are not - // queryable and should be preserved when modifying objects. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - // +optional - map annotations = 12; - - // List of objects depended by this object. If ALL objects in the list have - // been deleted, this object will be garbage collected. If this object is managed by a controller, - // then an entry in this list will point to this controller, with the controller field set to true. - // There cannot be more than one managing controller. - // +optional - // +patchMergeKey=uid - // +patchStrategy=merge - repeated k8s.io.apimachinery.pkg.apis.meta.v1.OwnerReference ownerReferences = 13; - - // An initializer is a controller which enforces some system invariant at object creation time. - // This field is a list of initializers that have not yet acted on this object. If nil or empty, - // this object has been completely initialized. Otherwise, the object is considered uninitialized - // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to - // observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. - // Only privileged users may set or modify this list. Once it is empty, it may not be modified further - // by any user. - optional k8s.io.apimachinery.pkg.apis.meta.v1.Initializers initializers = 16; - - // Must be empty before the object is deleted from the registry. Each entry - // is an identifier for the responsible component that will remove the entry - // from the list. If the deletionTimestamp of the object is non-nil, entries - // in this list can only be removed. - // +optional - // +patchStrategy=merge - repeated string finalizers = 14; - - // The name of the cluster which the object belongs to. - // This is used to distinguish resources with same name and namespace in different clusters. - // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. - // +optional - optional string clusterName = 15; -} - // ObjectReference contains enough information to let you inspect or modify the referred object. // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message ObjectReference { @@ -2473,7 +2391,7 @@ message PersistentVolumeSource { // Cinder represents a cinder volume attached and mounted on kubelets host machine // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md // +optional - optional CinderVolumeSource cinder = 8; + optional CinderPersistentVolumeSource cinder = 8; // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime // +optional @@ -2528,7 +2446,7 @@ message PersistentVolumeSource { // +optional optional StorageOSPersistentVolumeSource storageos = 21; - // CSI represents storage that handled by an external CSI driver + // CSI represents storage that handled by an external CSI driver (Beta feature). // +optional optional CSIPersistentVolumeSource csi = 22; } @@ -2556,8 +2474,9 @@ message PersistentVolumeSpec { optional ObjectReference claimRef = 4; // What happens to a persistent volume when released from its claim. - // Valid options are Retain (default) and Recycle. - // Recycling must be supported by the volume plugin underlying this persistent volume. + // Valid options are Retain (default for manually created PersistentVolumes), Delete (default + // for dynamically provisioned PersistentVolumes), and Recycle (deprecated). + // Recycle must be supported by the volume plugin underlying this PersistentVolume. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming // +optional optional string persistentVolumeReclaimPolicy = 5; @@ -2578,6 +2497,11 @@ message PersistentVolumeSpec { // This is an alpha feature and may change in the future. // +optional optional string volumeMode = 8; + + // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. + // This field influences the scheduling of pods that use this volume. + // +optional + optional VolumeNodeAffinity nodeAffinity = 9; } // PersistentVolumeStatus is the current status of a persistent volume. @@ -2740,7 +2664,6 @@ message PodAttachOptions { // PodCondition contains details for the current condition of this pod. message PodCondition { // Type is the type of the condition. - // Currently only Ready. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions optional string type = 1; @@ -2909,6 +2832,12 @@ message PodProxyOptions { optional string path = 1; } +// PodReadinessGate contains the reference to a pod condition +message PodReadinessGate { + // ConditionType refers to a condition in the pod's condition list with matching type. + optional string conditionType = 1; +} + // PodSecurityContext holds pod-level security attributes and common container settings. // Some fields are also present in container.securityContext. Field values of // container.securityContext take precedence over field values of PodSecurityContext. @@ -2929,6 +2858,14 @@ message PodSecurityContext { // +optional optional int64 runAsUser = 2; + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // +optional + optional int64 runAsGroup = 6; + // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it // does not run as UID 0 (root) and fail to start the container if it does. @@ -2955,6 +2892,11 @@ message PodSecurityContext { // If unset, the Kubelet will not modify the ownership and permissions of any volume. // +optional optional int64 fsGroup = 5; + + // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + // sysctls (by the container runtime) might fail to launch. + // +optional + repeated Sysctl sysctls = 7; } // Describes the class of pods that should avoid this node. @@ -3028,7 +2970,6 @@ message PodSpec { // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. // To have DNS options set along with hostNetwork, you have to specify DNS policy // explicitly to 'ClusterFirstWithHostNet'. - // Note that 'None' policy is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it. // +optional optional string dnsPolicy = 6; @@ -3078,6 +3019,16 @@ message PodSpec { // +optional optional bool hostIPC = 13; + // Share a single process namespace between all of the containers in a pod. + // When this is set containers will be able to view and signal processes from other containers + // in the same pod, and the first process in each container will not be assigned PID 1. + // HostPID and ShareProcessNamespace cannot both be set. + // Optional: Default to false. + // This field is beta-level and may be disabled with the PodShareProcessNamespace feature. + // +k8s:conversion-gen=false + // +optional + optional bool shareProcessNamespace = 27; + // SecurityContext holds pod-level security attributes and common container settings. // Optional: Defaults to empty. See type description for default values of each field. // +optional @@ -3142,15 +3093,47 @@ message PodSpec { // Specifies the DNS parameters of a pod. // Parameters specified here will be merged to the generated DNS // configuration based on DNSPolicy. - // This is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it. // +optional optional PodDNSConfig dnsConfig = 26; + + // If specified, all readiness gates will be evaluated for pod readiness. + // A pod is ready when all its containers are ready AND + // all conditions specified in the readiness gates have status equal to "True" + // More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md + // +optional + repeated PodReadinessGate readinessGates = 28; + + // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + // empty definition that uses the default runtime handler. + // More info: https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md + // This is an alpha feature and may change in the future. + // +optional + optional string runtimeClassName = 29; } // PodStatus represents information about the status of a pod. Status may trail the actual -// state of a system. +// state of a system, especially if the node that hosts the pod cannot contact the control +// plane. message PodStatus { - // Current condition of the pod. + // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. + // The conditions array, the reason and message fields, and the individual container status + // arrays contain more detail about the pod's status. + // There are five possible phase values: + // + // Pending: The pod has been accepted by the Kubernetes system, but one or more of the + // container images has not been created. This includes time before being scheduled as + // well as time spent downloading images over the network, which could take a while. + // Running: The pod has been bound to a node, and all of the containers have been created. + // At least one container is still running, or is in the process of starting or restarting. + // Succeeded: All containers in the pod have terminated in success, and will not be restarted. + // Failed: All containers in the pod have terminated, and at least one container has + // terminated in failure. The container either exited with non-zero status or was terminated + // by the system. + // Unknown: For some reason the state of the pod could not be obtained, typically due to an + // error in communicating with the host of the pod. + // // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase // +optional optional string phase = 1; @@ -3670,7 +3653,7 @@ message ResourceQuotaList { // ResourceQuotaSpec defines the desired hard limits to enforce for Quota. message ResourceQuotaSpec { - // Hard is the set of desired hard limits for each named resource. + // hard is the set of desired hard limits for each named resource. // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ // +optional map hard = 1; @@ -3679,6 +3662,12 @@ message ResourceQuotaSpec { // If not specified, the quota matches all objects. // +optional repeated string scopes = 2; + + // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota + // but expressed using ScopeSelectorOperator in combination with possible values. + // For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + // +optional + optional ScopeSelector scopeSelector = 3; } // ResourceQuotaStatus defines the enforced hard limits and observed use. @@ -3752,6 +3741,7 @@ message ScaleIOPersistentVolumeSource { optional string storagePool = 6; // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Default is ThinProvisioned. // +optional optional string storageMode = 7; @@ -3761,7 +3751,8 @@ message ScaleIOPersistentVolumeSource { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // Ex. "ext4", "xfs", "ntfs". + // Default is "xfs" // +optional optional string fsType = 9; @@ -3796,6 +3787,7 @@ message ScaleIOVolumeSource { optional string storagePool = 6; // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Default is ThinProvisioned. // +optional optional string storageMode = 7; @@ -3805,7 +3797,8 @@ message ScaleIOVolumeSource { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // Ex. "ext4", "xfs", "ntfs". + // Default is "xfs". // +optional optional string fsType = 9; @@ -3815,6 +3808,32 @@ message ScaleIOVolumeSource { optional bool readOnly = 10; } +// A scope selector represents the AND of the selectors represented +// by the scoped-resource selector requirements. +message ScopeSelector { + // A list of scope selector requirements by scope of the resources. + // +optional + repeated ScopedResourceSelectorRequirement matchExpressions = 1; +} + +// A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator +// that relates the scope name and values. +message ScopedResourceSelectorRequirement { + // The name of the scope that the selector applies to. + optional string scopeName = 1; + + // Represents a scope's relationship to a set of values. + // Valid operators are In, NotIn, Exists, DoesNotExist. + optional string operator = 2; + + // An array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. + // This array is replaced during a strategic merge patch. + // +optional + repeated string values = 3; +} + // Secret holds secret data of a certain type. The total bytes of the values in // the Data field must be less than MaxSecretSize bytes. message Secret { @@ -3981,6 +4000,13 @@ message SecurityContext { // +optional optional int64 runAsUser = 4; + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + optional int64 runAsGroup = 8; + // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it // does not run as UID 0 (root) and fail to start the container if it does. @@ -4076,6 +4102,32 @@ message ServiceAccountList { repeated ServiceAccount items = 2; } +// ServiceAccountTokenProjection represents a projected service account token +// volume. This projection can be used to insert a service account token into +// the pods runtime filesystem for use against APIs (Kubernetes API Server or +// otherwise). +message ServiceAccountTokenProjection { + // Audience is the intended audience of the token. A recipient of a token + // must identify itself with an identifier specified in the audience of the + // token, and otherwise should reject the token. The audience defaults to the + // identifier of the apiserver. + // +optional + optional string audience = 1; + + // ExpirationSeconds is the requested duration of validity of the service + // account token. As the token approaches expiration, the kubelet volume + // plugin will proactively rotate the service account token. The kubelet will + // start trying to rotate the token if the token is older than 80 percent of + // its time to live or if the token is older than 24 hours.Defaults to 1 hour + // and must be at least 10 minutes. + // +optional + optional int64 expirationSeconds = 2; + + // Path is the path relative to the mount point of the file to project the + // token into. + optional string path = 3; +} + // ServiceList holds a list of services. message ServiceList { // Standard list metadata. @@ -4242,9 +4294,6 @@ message ServiceSpec { // The primary use case for setting this field is to use a StatefulSet's Headless Service // to propagate SRV records for its Pods without respect to their readiness for purpose // of peer discovery. - // This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints - // when that annotation is deprecated and all clients have been converted to use this - // field. // +optional optional bool publishNotReadyAddresses = 13; @@ -4407,6 +4456,28 @@ message Toleration { optional int64 tolerationSeconds = 5; } +// A topology selector requirement is a selector that matches given label. +// This is an alpha feature and may change in the future. +message TopologySelectorLabelRequirement { + // The label key that the selector applies to. + optional string key = 1; + + // An array of string values. One value must match the label to be selected. + // Each entry in Values is ORed. + repeated string values = 2; +} + +// A topology selector term represents the result of label queries. +// A null or empty topology selector term matches no objects. +// The requirements of them are ANDed. +// It provides a subset of functionality as NodeSelectorTerm. +// This is an alpha feature and may change in the future. +message TopologySelectorTerm { + // A list of topology selector requirements by labels. + // +optional + repeated TopologySelectorLabelRequirement matchLabelExpressions = 1; +} + // Volume represents a named volume in a pod that may be accessed by any container in the pod. message Volume { // Volume's name. @@ -4450,23 +4521,35 @@ message VolumeMount { // mountPropagation determines how mounts are propagated from the host // to container and the other way around. - // When not set, MountPropagationHostToContainer is used. - // This field is alpha in 1.8 and can be reworked or removed in a future - // release. + // When not set, MountPropagationNone is used. + // This field is beta in 1.10. // +optional optional string mountPropagation = 5; } +// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. +message VolumeNodeAffinity { + // Required specifies hard node constraints that must be met. + optional NodeSelector required = 1; +} + // Projection that may be projected along with other supported volume types message VolumeProjection { // information about the secret data to project + // +optional optional SecretProjection secret = 1; // information about the downwardAPI data to project + // +optional optional DownwardAPIProjection downwardAPI = 2; // information about the configMap data to project + // +optional optional ConfigMapProjection configMap = 3; + + // information about the serviceAccountToken data to project + // +optional + optional ServiceAccountTokenProjection serviceAccountToken = 4; } // Represents the source of a volume to mount. @@ -4501,6 +4584,9 @@ message VolumeSource { optional AWSElasticBlockStoreVolumeSource awsElasticBlockStore = 4; // GitRepo represents a git repository at a particular revision. + // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir + // into the Pod's container. // +optional optional GitRepoVolumeSource gitRepo = 5; diff --git a/deps/k8s.io/api/core/v1/meta.go b/deps/k8s.io/api/core/v1/meta.go deleted file mode 100644 index 0e3f5d920..000000000 --- a/deps/k8s.io/api/core/v1/meta.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" -) - -func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj } - -// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows -// fast, direct access to metadata fields for API objects. -func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } -func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } -func (meta *ObjectMeta) GetName() string { return meta.Name } -func (meta *ObjectMeta) SetName(name string) { meta.Name = name } -func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } -func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } -func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } -func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } -func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } -func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } -func (meta *ObjectMeta) GetGeneration() int64 { return meta.Generation } -func (meta *ObjectMeta) SetGeneration(generation int64) { meta.Generation = generation } -func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } -func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } -func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp } -func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) { - meta.CreationTimestamp = creationTimestamp -} -func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp } -func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) { - meta.DeletionTimestamp = deletionTimestamp -} -func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { return meta.DeletionGracePeriodSeconds } -func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) { - meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds -} -func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } -func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels } -func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations } -func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations } -func (meta *ObjectMeta) GetInitializers() *metav1.Initializers { return meta.Initializers } -func (meta *ObjectMeta) SetInitializers(initializers *metav1.Initializers) { - meta.Initializers = initializers -} -func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } -func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } - -func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference { - ret := make([]metav1.OwnerReference, len(meta.OwnerReferences)) - for i := 0; i < len(meta.OwnerReferences); i++ { - ret[i].Kind = meta.OwnerReferences[i].Kind - ret[i].Name = meta.OwnerReferences[i].Name - ret[i].UID = meta.OwnerReferences[i].UID - ret[i].APIVersion = meta.OwnerReferences[i].APIVersion - if meta.OwnerReferences[i].Controller != nil { - value := *meta.OwnerReferences[i].Controller - ret[i].Controller = &value - } - if meta.OwnerReferences[i].BlockOwnerDeletion != nil { - value := *meta.OwnerReferences[i].BlockOwnerDeletion - ret[i].BlockOwnerDeletion = &value - } - } - return ret -} - -func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) { - newReferences := make([]metav1.OwnerReference, len(references)) - for i := 0; i < len(references); i++ { - newReferences[i].Kind = references[i].Kind - newReferences[i].Name = references[i].Name - newReferences[i].UID = references[i].UID - newReferences[i].APIVersion = references[i].APIVersion - if references[i].Controller != nil { - value := *references[i].Controller - newReferences[i].Controller = &value - } - if references[i].BlockOwnerDeletion != nil { - value := *references[i].BlockOwnerDeletion - newReferences[i].BlockOwnerDeletion = &value - } - } - meta.OwnerReferences = newReferences -} - -func (meta *ObjectMeta) GetClusterName() string { - return meta.ClusterName -} -func (meta *ObjectMeta) SetClusterName(clusterName string) { - meta.ClusterName = clusterName -} diff --git a/deps/k8s.io/api/core/v1/register.go b/deps/k8s.io/api/core/v1/register.go index 526e1320a..1aac0cb41 100644 --- a/deps/k8s.io/api/core/v1/register.go +++ b/deps/k8s.io/api/core/v1/register.go @@ -57,7 +57,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Endpoints{}, &EndpointsList{}, &Node{}, - &NodeConfigSource{}, &NodeList{}, &NodeProxyOptions{}, &Binding{}, diff --git a/deps/k8s.io/api/core/v1/resource.go b/deps/k8s.io/api/core/v1/resource.go index 3bd6fec62..bb8041254 100644 --- a/deps/k8s.io/api/core/v1/resource.go +++ b/deps/k8s.io/api/core/v1/resource.go @@ -48,13 +48,6 @@ func (self *ResourceList) Pods() *resource.Quantity { return &resource.Quantity{} } -func (self *ResourceList) NvidiaGPU() *resource.Quantity { - if val, ok := (*self)[ResourceNvidiaGPU]; ok { - return &val - } - return &resource.Quantity{} -} - func (self *ResourceList) StorageEphemeral() *resource.Quantity { if val, ok := (*self)[ResourceEphemeralStorage]; ok { return &val diff --git a/deps/k8s.io/api/core/v1/types.go b/deps/k8s.io/api/core/v1/types.go index 62ff5820d..96e7b30a3 100644 --- a/deps/k8s.io/api/core/v1/types.go +++ b/deps/k8s.io/api/core/v1/types.go @@ -23,214 +23,13 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" ) -// The comments for the structs and fields can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored and not exported to the SwaggerAPI. -// -// The aforementioned methods can be generated by hack/update-generated-swagger-docs.sh - -// Common string formats -// --------------------- -// Many fields in this API have formatting requirements. The commonly used -// formats are defined here. -// -// C_IDENTIFIER: This is a string that conforms to the definition of an "identifier" -// in the C language. This is captured by the following regex: -// [A-Za-z_][A-Za-z0-9_]* -// This defines the format, but not the length restriction, which should be -// specified at the definition of any field of this type. -// -// DNS_LABEL: This is a string, no more than 63 characters long, that conforms -// to the definition of a "label" in RFCs 1035 and 1123. This is captured -// by the following regex: -// [a-z0-9]([-a-z0-9]*[a-z0-9])? -// -// DNS_SUBDOMAIN: This is a string, no more than 253 characters long, that conforms -// to the definition of a "subdomain" in RFCs 1035 and 1123. This is captured -// by the following regex: -// [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* -// or more simply: -// DNS_LABEL(\.DNS_LABEL)* -// -// IANA_SVC_NAME: This is a string, no more than 15 characters long, that -// conforms to the definition of IANA service name in RFC 6335. -// It must contains at least one letter [a-z] and it must contains only [a-z0-9-]. -// Hypens ('-') cannot be leading or trailing character of the string -// and cannot be adjacent to other hyphens. - -// ObjectMeta is metadata that all persisted resources must have, which includes all objects -// users must create. -// DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon. -// +k8s:openapi-gen=false -type ObjectMeta struct { - // Name must be unique within a namespace. Is required when creating resources, although - // some resources may allow a client to request the generation of an appropriate name - // automatically. Name is primarily intended for creation idempotence and configuration - // definition. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // GenerateName is an optional prefix, used by the server, to generate a unique - // name ONLY IF the Name field has not been provided. - // If this field is used, the name returned to the client will be different - // than the name passed. This value will also be combined with a unique suffix. - // The provided value has the same validation rules as the Name field, - // and may be truncated by the length of the suffix required to make the value - // unique on the server. - // - // If this field is specified and the generated name exists, the server will - // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - // ServerTimeout indicating a unique name could not be found in the time allotted, and the client - // should retry (optionally after the time indicated in the Retry-After header). - // - // Applied only if Name is not specified. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency - // +optional - GenerateName string `json:"generateName,omitempty" protobuf:"bytes,2,opt,name=generateName"` - - // Namespace defines the space within each name must be unique. An empty namespace is - // equivalent to the "default" namespace, but "default" is the canonical representation. - // Not all objects are required to be scoped to a namespace - the value of this field for - // those objects will be empty. - // - // Must be a DNS_LABEL. - // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` - - // SelfLink is a URL representing this object. - // Populated by the system. - // Read-only. - // +optional - SelfLink string `json:"selfLink,omitempty" protobuf:"bytes,4,opt,name=selfLink"` - - // UID is the unique in time and space value for this object. It is typically generated by - // the server on successful creation of a resource and is not allowed to change on PUT - // operations. - // - // Populated by the system. - // Read-only. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - // +optional - UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` - - // An opaque value that represents the internal version of this object that can - // be used by clients to determine when objects have changed. May be used for optimistic - // concurrency, change detection, and the watch operation on a resource or set of resources. - // Clients must treat these values as opaque and passed unmodified back to the server. - // They may only be valid for a particular resource or set of resources. - // - // Populated by the system. - // Read-only. - // Value must be treated as opaque by clients and . - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"` - - // A sequence number representing a specific generation of the desired state. - // Populated by the system. Read-only. - // +optional - Generation int64 `json:"generation,omitempty" protobuf:"varint,7,opt,name=generation"` - - // CreationTimestamp is a timestamp representing the server time when this object was - // created. It is not guaranteed to be set in happens-before order across separate operations. - // Clients may not set this value. It is represented in RFC3339 form and is in UTC. - // - // Populated by the system. - // Read-only. - // Null for lists. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - // +optional - CreationTimestamp metav1.Time `json:"creationTimestamp,omitempty" protobuf:"bytes,8,opt,name=creationTimestamp"` - - // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This - // field is set by the server when a graceful deletion is requested by the user, and is not - // directly settable by a client. The resource is expected to be deleted (no longer visible - // from resource lists, and not reachable by name) after the time in this field. Once set, - // this value may not be unset or be set further into the future, although it may be shortened - // or the resource may be deleted prior to this time. For example, a user may request that - // a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination - // signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard - // termination signal (SIGKILL) to the container and after cleanup, remove the pod from the - // API. In the presence of network partitions, this object may still exist after this - // timestamp, until an administrator or automated process can determine the resource is - // fully terminated. - // If not set, graceful deletion of the object has not been requested. - // - // Populated by the system when a graceful deletion is requested. - // Read-only. - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - // +optional - DeletionTimestamp *metav1.Time `json:"deletionTimestamp,omitempty" protobuf:"bytes,9,opt,name=deletionTimestamp"` - - // Number of seconds allowed for this object to gracefully terminate before - // it will be removed from the system. Only set when deletionTimestamp is also set. - // May only be shortened. - // Read-only. - // +optional - DeletionGracePeriodSeconds *int64 `json:"deletionGracePeriodSeconds,omitempty" protobuf:"varint,10,opt,name=deletionGracePeriodSeconds"` - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May match selectors of replication controllers - // and services. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - // +optional - Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` - - // Annotations is an unstructured key value map stored with a resource that may be - // set by external tools to store and retrieve arbitrary metadata. They are not - // queryable and should be preserved when modifying objects. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - // +optional - Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` - - // List of objects depended by this object. If ALL objects in the list have - // been deleted, this object will be garbage collected. If this object is managed by a controller, - // then an entry in this list will point to this controller, with the controller field set to true. - // There cannot be more than one managing controller. - // +optional - // +patchMergeKey=uid - // +patchStrategy=merge - OwnerReferences []metav1.OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid" protobuf:"bytes,13,rep,name=ownerReferences"` - - // An initializer is a controller which enforces some system invariant at object creation time. - // This field is a list of initializers that have not yet acted on this object. If nil or empty, - // this object has been completely initialized. Otherwise, the object is considered uninitialized - // and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to - // observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. - // Only privileged users may set or modify this list. Once it is empty, it may not be modified further - // by any user. - Initializers *metav1.Initializers `json:"initializers,omitempty" patchStrategy:"merge" protobuf:"bytes,16,rep,name=initializers"` - - // Must be empty before the object is deleted from the registry. Each entry - // is an identifier for the responsible component that will remove the entry - // from the list. If the deletionTimestamp of the object is non-nil, entries - // in this list can only be removed. - // +optional - // +patchStrategy=merge - Finalizers []string `json:"finalizers,omitempty" patchStrategy:"merge" protobuf:"bytes,14,rep,name=finalizers"` - - // The name of the cluster which the object belongs to. - // This is used to distinguish resources with same name and namespace in different clusters. - // This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. - // +optional - ClusterName string `json:"clusterName,omitempty" protobuf:"bytes,15,opt,name=clusterName"` -} - const ( // NamespaceDefault means the object is in the default namespace which is applied when not specified by clients NamespaceDefault string = "default" // NamespaceAll is the default argument to specify on a context when you want to list or filter resources across all namespaces NamespaceAll string = "" + // NamespaceNodeLease is the namespace where we place node lease objects (used for node heartbeats) + NamespaceNodeLease string = "kube-node-lease" ) // Volume represents a named volume in a pod that may be accessed by any container in the pod. @@ -273,6 +72,9 @@ type VolumeSource struct { // +optional AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" protobuf:"bytes,4,opt,name=awsElasticBlockStore"` // GitRepo represents a git repository at a particular revision. + // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + // EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir + // into the Pod's container. // +optional GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" protobuf:"bytes,5,opt,name=gitRepo"` // Secret represents a secret that should populate this volume. @@ -405,7 +207,7 @@ type PersistentVolumeSource struct { // Cinder represents a cinder volume attached and mounted on kubelets host machine // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md // +optional - Cinder *CinderVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"` + Cinder *CinderPersistentVolumeSource `json:"cinder,omitempty" protobuf:"bytes,8,opt,name=cinder"` // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime // +optional CephFS *CephFSPersistentVolumeSource `json:"cephfs,omitempty" protobuf:"bytes,9,opt,name=cephfs"` @@ -446,7 +248,7 @@ type PersistentVolumeSource struct { // More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md // +optional StorageOS *StorageOSPersistentVolumeSource `json:"storageos,omitempty" protobuf:"bytes,21,opt,name=storageos"` - // CSI represents storage that handled by an external CSI driver + // CSI represents storage that handled by an external CSI driver (Beta feature). // +optional CSI *CSIPersistentVolumeSource `json:"csi,omitempty" protobuf:"bytes,22,opt,name=csi"` } @@ -458,10 +260,6 @@ const ( // MountOptionAnnotation defines mount option annotation used in PVs MountOptionAnnotation = "volume.beta.kubernetes.io/mount-options" - - // AlphaStorageNodeAffinityAnnotation defines node affinity policies for a PersistentVolume. - // Value is a string of the json representation of type NodeAffinity - AlphaStorageNodeAffinityAnnotation = "volume.alpha.kubernetes.io/node-affinity" ) // +genclient @@ -511,8 +309,9 @@ type PersistentVolumeSpec struct { // +optional ClaimRef *ObjectReference `json:"claimRef,omitempty" protobuf:"bytes,4,opt,name=claimRef"` // What happens to a persistent volume when released from its claim. - // Valid options are Retain (default) and Recycle. - // Recycling must be supported by the volume plugin underlying this persistent volume. + // Valid options are Retain (default for manually created PersistentVolumes), Delete (default + // for dynamically provisioned PersistentVolumes), and Recycle (deprecated). + // Recycle must be supported by the volume plugin underlying this PersistentVolume. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming // +optional PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty" protobuf:"bytes,5,opt,name=persistentVolumeReclaimPolicy,casttype=PersistentVolumeReclaimPolicy"` @@ -530,6 +329,16 @@ type PersistentVolumeSpec struct { // This is an alpha feature and may change in the future. // +optional VolumeMode *PersistentVolumeMode `json:"volumeMode,omitempty" protobuf:"bytes,8,opt,name=volumeMode,casttype=PersistentVolumeMode"` + // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. + // This field influences the scheduling of pods that use this volume. + // +optional + NodeAffinity *VolumeNodeAffinity `json:"nodeAffinity,omitempty" protobuf:"bytes,9,opt,name=nodeAffinity"` +} + +// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. +type VolumeNodeAffinity struct { + // Required specifies hard node constraints that must be met. + Required *NodeSelector `json:"required,omitempty" protobuf:"bytes,1,opt,name=required"` } // PersistentVolumeReclaimPolicy describes a policy for end-of-life maintenance of persistent volumes. @@ -924,6 +733,35 @@ type CinderVolumeSource struct { // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md // +optional ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` + // Optional: points to a secret object containing parameters used to connect + // to OpenStack. + // +optional + SecretRef *LocalObjectReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"` +} + +// Represents a cinder volume resource in Openstack. +// A Cinder volume must exist before mounting to a container. +// The volume must also be in the same region as the kubelet. +// Cinder volumes support ownership management and SELinux relabeling. +type CinderPersistentVolumeSource struct { + // volume id used to identify the volume in cinder + // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + VolumeID string `json:"volumeID" protobuf:"bytes,1,opt,name=volumeID"` + // Filesystem type to mount. + // Must be a filesystem type supported by the host operating system. + // Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional + FSType string `json:"fsType,omitempty" protobuf:"bytes,2,opt,name=fsType"` + // Optional: Defaults to false (read/write). ReadOnly here will force + // the ReadOnly setting in VolumeMounts. + // More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,3,opt,name=readOnly"` + // Optional: points to a secret object containing parameters used to connect + // to OpenStack. + // +optional + SecretRef *SecretReference `json:"secretRef,omitempty" protobuf:"bytes,4,opt,name=secretRef"` } // Represents a Ceph Filesystem mount that lasts the lifetime of a pod @@ -1010,8 +848,8 @@ type FlockerVolumeSource struct { type StorageMedium string const ( - StorageMediumDefault StorageMedium = "" // use whatever the default is for the node - StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs) + StorageMediumDefault StorageMedium = "" // use whatever the default is for the node, assume anything we don't explicitly handle is this + StorageMediumMemory StorageMedium = "Memory" // use memory (e.g. tmpfs on linux) StorageMediumHugePages StorageMedium = "HugePages" // use hugepages ) @@ -1168,6 +1006,10 @@ type AWSElasticBlockStoreVolumeSource struct { // Represents a volume that is populated with the contents of a git repository. // Git repo volumes do not support ownership management. // Git repo volumes support SELinux relabeling. +// +// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an +// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir +// into the Pod's container. type GitRepoVolumeSource struct { // Repository URL Repository string `json:"repository" protobuf:"bytes,1,opt,name=repository"` @@ -1499,6 +1341,7 @@ type ScaleIOVolumeSource struct { // +optional StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"` // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Default is ThinProvisioned. // +optional StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` // The name of a volume already created in the ScaleIO system @@ -1506,7 +1349,8 @@ type ScaleIOVolumeSource struct { VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"` // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // Ex. "ext4", "xfs", "ntfs". + // Default is "xfs". // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` // Defaults to false (read/write). ReadOnly here will force @@ -1534,6 +1378,7 @@ type ScaleIOPersistentVolumeSource struct { // +optional StoragePool string `json:"storagePool,omitempty" protobuf:"bytes,6,opt,name=storagePool"` // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // Default is ThinProvisioned. // +optional StorageMode string `json:"storageMode,omitempty" protobuf:"bytes,7,opt,name=storageMode"` // The name of a volume already created in the ScaleIO system @@ -1541,7 +1386,8 @@ type ScaleIOPersistentVolumeSource struct { VolumeName string `json:"volumeName,omitempty" protobuf:"bytes,8,opt,name=volumeName"` // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // Ex. "ext4", "xfs", "ntfs". + // Default is "xfs" // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,9,opt,name=fsType"` // Defaults to false (read/write). ReadOnly here will force @@ -1662,6 +1508,30 @@ type ConfigMapProjection struct { Optional *bool `json:"optional,omitempty" protobuf:"varint,4,opt,name=optional"` } +// ServiceAccountTokenProjection represents a projected service account token +// volume. This projection can be used to insert a service account token into +// the pods runtime filesystem for use against APIs (Kubernetes API Server or +// otherwise). +type ServiceAccountTokenProjection struct { + // Audience is the intended audience of the token. A recipient of a token + // must identify itself with an identifier specified in the audience of the + // token, and otherwise should reject the token. The audience defaults to the + // identifier of the apiserver. + //+optional + Audience string `json:"audience,omitempty" protobuf:"bytes,1,rep,name=audience"` + // ExpirationSeconds is the requested duration of validity of the service + // account token. As the token approaches expiration, the kubelet volume + // plugin will proactively rotate the service account token. The kubelet will + // start trying to rotate the token if the token is older than 80 percent of + // its time to live or if the token is older than 24 hours.Defaults to 1 hour + // and must be at least 10 minutes. + //+optional + ExpirationSeconds *int64 `json:"expirationSeconds,omitempty" protobuf:"varint,2,opt,name=expirationSeconds"` + // Path is the path relative to the mount point of the file to project the + // token into. + Path string `json:"path" protobuf:"bytes,3,opt,name=path"` +} + // Represents a projected volume source type ProjectedVolumeSource struct { // list of volume projections @@ -1680,11 +1550,17 @@ type VolumeProjection struct { // all types below are the supported types for projection into the same volume // information about the secret data to project + // +optional Secret *SecretProjection `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"` // information about the downwardAPI data to project + // +optional DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" protobuf:"bytes,2,opt,name=downwardAPI"` // information about the configMap data to project + // +optional ConfigMap *ConfigMapProjection `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"` + // information about the serviceAccountToken data to project + // +optional + ServiceAccountToken *ServiceAccountTokenProjection `json:"serviceAccountToken,omitempty" protobuf:"bytes,4,opt,name=serviceAccountToken"` } const ( @@ -1709,15 +1585,17 @@ type KeyToPath struct { Mode *int32 `json:"mode,omitempty" protobuf:"varint,3,opt,name=mode"` } -// Local represents directly-attached storage with node affinity +// Local represents directly-attached storage with node affinity (Beta feature) type LocalVolumeSource struct { - // The full path to the volume on the node - // For alpha, this path must be a directory - // Once block as a source is supported, then this path can point to a block device + // The full path to the volume on the node. + // It can be either a directory or block device (disk, partition, ...). + // Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. + // Block devices can be represented only by VolumeMode=Block, which also requires the + // BlockVolume alpha feature gate to be enabled. Path string `json:"path" protobuf:"bytes,1,opt,name=path"` } -// Represents storage that is managed by an external CSI volume driver +// Represents storage that is managed by an external CSI volume driver (Beta feature) type CSIPersistentVolumeSource struct { // Driver is the name of the driver to use for this volume. // Required. @@ -1735,9 +1613,37 @@ type CSIPersistentVolumeSource struct { // Filesystem type to mount. // Must be a filesystem type supported by the host operating system. - // Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + // Ex. "ext4", "xfs", "ntfs". // +optional FSType string `json:"fsType,omitempty" protobuf:"bytes,4,opt,name=fsType"` + + // Attributes of the volume to publish. + // +optional + VolumeAttributes map[string]string `json:"volumeAttributes,omitempty" protobuf:"bytes,5,rep,name=volumeAttributes"` + + // ControllerPublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // ControllerPublishVolume and ControllerUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + // +optional + ControllerPublishSecretRef *SecretReference `json:"controllerPublishSecretRef,omitempty" protobuf:"bytes,6,opt,name=controllerPublishSecretRef"` + + // NodeStageSecretRef is a reference to the secret object containing sensitive + // information to pass to the CSI driver to complete the CSI NodeStageVolume + // and NodeStageVolume and NodeUnstageVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + // +optional + NodeStageSecretRef *SecretReference `json:"nodeStageSecretRef,omitempty" protobuf:"bytes,7,opt,name=nodeStageSecretRef"` + + // NodePublishSecretRef is a reference to the secret object containing + // sensitive information to pass to the CSI driver to complete the CSI + // NodePublishVolume and NodeUnpublishVolume calls. + // This field is optional, and may be empty if no secret is required. If the + // secret object contains more than one secret, all secrets are passed. + // +optional + NodePublishSecretRef *SecretReference `json:"nodePublishSecretRef,omitempty" protobuf:"bytes,8,opt,name=nodePublishSecretRef"` } // ContainerPort represents a network port in a single container. @@ -1782,9 +1688,8 @@ type VolumeMount struct { SubPath string `json:"subPath,omitempty" protobuf:"bytes,4,opt,name=subPath"` // mountPropagation determines how mounts are propagated from the host // to container and the other way around. - // When not set, MountPropagationHostToContainer is used. - // This field is alpha in 1.8 and can be reworked or removed in a future - // release. + // When not set, MountPropagationNone is used. + // This field is beta in 1.10. // +optional MountPropagation *MountPropagationMode `json:"mountPropagation,omitempty" protobuf:"bytes,5,opt,name=mountPropagation,casttype=MountPropagationMode"` } @@ -1793,6 +1698,12 @@ type VolumeMount struct { type MountPropagationMode string const ( + // MountPropagationNone means that the volume in a container will + // not receive new mounts from the host or other containers, and filesystems + // mounted inside the container won't be propagated to the host or other + // containers. + // Note that this mode corresponds to "private" in Linux terminology. + MountPropagationNone MountPropagationMode = "None" // MountPropagationHostToContainer means that the volume in a container will // receive new mounts from the host or other containers, but filesystems // mounted inside the container won't be propagated to the host or other @@ -2150,7 +2061,7 @@ type Container struct { Env []EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Compute Resources required by this container. // Cannot be updated. - // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ // +optional Resources ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"` // Pod volumes to mount into the container's filesystem. @@ -2407,12 +2318,13 @@ const ( // PodReasonUnschedulable reason in PodScheduled PodCondition means that the scheduler // can't schedule the pod right now, for example due to insufficient resources in the cluster. PodReasonUnschedulable = "Unschedulable" + // ContainersReady indicates whether all containers in the pod are ready. + ContainersReady PodConditionType = "ContainersReady" ) // PodCondition contains details for the current condition of this pod. type PodCondition struct { // Type is the type of the condition. - // Currently only Ready. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions Type PodConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=PodConditionType"` // Status is the status of the condition. @@ -2483,10 +2395,16 @@ type NodeSelector struct { NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"` } -// A null or empty node selector term matches no objects. +// A null or empty node selector term matches no objects. The requirements of +// them are ANDed. +// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. type NodeSelectorTerm struct { - //Required. A list of node selector requirements. The requirements are ANDed. - MatchExpressions []NodeSelectorRequirement `json:"matchExpressions" protobuf:"bytes,1,rep,name=matchExpressions"` + // A list of node selector requirements by node's labels. + // +optional + MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` + // A list of node selector requirements by node's fields. + // +optional + MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" protobuf:"bytes,2,rep,name=matchFields"` } // A node selector requirement is a selector that contains values, a key, and an operator @@ -2519,6 +2437,27 @@ const ( NodeSelectorOpLt NodeSelectorOperator = "Lt" ) +// A topology selector term represents the result of label queries. +// A null or empty topology selector term matches no objects. +// The requirements of them are ANDed. +// It provides a subset of functionality as NodeSelectorTerm. +// This is an alpha feature and may change in the future. +type TopologySelectorTerm struct { + // A list of topology selector requirements by labels. + // +optional + MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" protobuf:"bytes,1,rep,name=matchLabelExpressions"` +} + +// A topology selector requirement is a selector that matches given label. +// This is an alpha feature and may change in the future. +type TopologySelectorLabelRequirement struct { + // The label key that the selector applies to. + Key string `json:"key" protobuf:"bytes,1,opt,name=key"` + // An array of string values. One value must match the label to be selected. + // Each entry in Values is ORed. + Values []string `json:"values" protobuf:"bytes,2,rep,name=values"` +} + // Affinity is a group of affinity scheduling rules. type Affinity struct { // Describes node affinity scheduling rules for the pod. @@ -2751,6 +2690,12 @@ const ( TolerationOpEqual TolerationOperator = "Equal" ) +// PodReadinessGate contains the reference to a pod condition +type PodReadinessGate struct { + // ConditionType refers to a condition in the pod's condition list with matching type. + ConditionType PodConditionType `json:"conditionType" protobuf:"bytes,1,opt,name=conditionType,casttype=PodConditionType"` +} + // PodSpec is a description of a pod. type PodSpec struct { // List of volumes that can be mounted by containers belonging to the pod. @@ -2808,7 +2753,6 @@ type PodSpec struct { // DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. // To have DNS options set along with hostNetwork, you have to specify DNS policy // explicitly to 'ClusterFirstWithHostNet'. - // Note that 'None' policy is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it. // +optional DNSPolicy DNSPolicy `json:"dnsPolicy,omitempty" protobuf:"bytes,6,opt,name=dnsPolicy,casttype=DNSPolicy"` // NodeSelector is a selector which must be true for the pod to fit on a node. @@ -2851,6 +2795,15 @@ type PodSpec struct { // +k8s:conversion-gen=false // +optional HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,13,opt,name=hostIPC"` + // Share a single process namespace between all of the containers in a pod. + // When this is set containers will be able to view and signal processes from other containers + // in the same pod, and the first process in each container will not be assigned PID 1. + // HostPID and ShareProcessNamespace cannot both be set. + // Optional: Default to false. + // This field is beta-level and may be disabled with the PodShareProcessNamespace feature. + // +k8s:conversion-gen=false + // +optional + ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" protobuf:"varint,27,opt,name=shareProcessNamespace"` // SecurityContext holds pod-level security attributes and common container settings. // Optional: Defaults to empty. See type description for default values of each field. // +optional @@ -2905,9 +2858,23 @@ type PodSpec struct { // Specifies the DNS parameters of a pod. // Parameters specified here will be merged to the generated DNS // configuration based on DNSPolicy. - // This is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it. // +optional DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty" protobuf:"bytes,26,opt,name=dnsConfig"` + + // If specified, all readiness gates will be evaluated for pod readiness. + // A pod is ready when all its containers are ready AND + // all conditions specified in the readiness gates have status equal to "True" + // More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md + // +optional + ReadinessGates []PodReadinessGate `json:"readinessGates,omitempty" protobuf:"bytes,28,opt,name=readinessGates"` + // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + // to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + // If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + // empty definition that uses the default runtime handler. + // More info: https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md + // This is an alpha feature and may change in the future. + // +optional + RuntimeClassName *string `json:"runtimeClassName,omitempty" protobuf:"bytes,29,opt,name=runtimeClassName"` } // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the @@ -2937,6 +2904,13 @@ type PodSecurityContext struct { // for that container. // +optional RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,2,opt,name=runAsUser"` + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in SecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence + // for that container. + // +optional + RunAsGroup *int64 `json:"runAsGroup,omitempty" protobuf:"varint,6,opt,name=runAsGroup"` // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it // does not run as UID 0 (root) and fail to start the container if it does. @@ -2961,6 +2935,10 @@ type PodSecurityContext struct { // If unset, the Kubelet will not modify the ownership and permissions of any volume. // +optional FSGroup *int64 `json:"fsGroup,omitempty" protobuf:"varint,5,opt,name=fsGroup"` + // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + // sysctls (by the container runtime) might fail to launch. + // +optional + Sysctls []Sysctl `json:"sysctls,omitempty" protobuf:"bytes,7,rep,name=sysctls"` } // PodQOSClass defines the supported qos classes of Pods. @@ -3005,9 +2983,26 @@ type PodDNSConfigOption struct { } // PodStatus represents information about the status of a pod. Status may trail the actual -// state of a system. +// state of a system, especially if the node that hosts the pod cannot contact the control +// plane. type PodStatus struct { - // Current condition of the pod. + // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. + // The conditions array, the reason and message fields, and the individual container status + // arrays contain more detail about the pod's status. + // There are five possible phase values: + // + // Pending: The pod has been accepted by the Kubernetes system, but one or more of the + // container images has not been created. This includes time before being scheduled as + // well as time spent downloading images over the network, which could take a while. + // Running: The pod has been bound to a node, and all of the containers have been created. + // At least one container is still running, or is in the process of starting or restarting. + // Succeeded: All containers in the pod have terminated in success, and will not be restarted. + // Failed: All containers in the pod have terminated, and at least one container has + // terminated in failure. The container either exited with non-zero status or was terminated + // by the system. + // Unknown: For some reason the state of the pod could not be obtained, typically due to an + // error in communicating with the host of the pod. + // // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase // +optional Phase PodPhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=PodPhase"` @@ -3504,9 +3499,6 @@ type ServiceSpec struct { // The primary use case for setting this field is to use a StatefulSet's Headless Service // to propagate SRV records for its Pods without respect to their readiness for purpose // of peer discovery. - // This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints - // when that annotation is deprecated and all clients have been converted to use this - // field. // +optional PublishNotReadyAddresses bool `json:"publishNotReadyAddresses,omitempty" protobuf:"varint,13,opt,name=publishNotReadyAddresses"` // sessionAffinityConfig contains the configurations of session affinity. @@ -3552,6 +3544,7 @@ type ServicePort struct { } // +genclient +// +genclient:skipVerbs=deleteCollection // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Service is a named abstraction of software service (for example, mysql) consisting of local port @@ -3675,7 +3668,8 @@ type Endpoints struct { // subsets for the different ports. No address will appear in both Addresses and // NotReadyAddresses in the same subset. // Sets of addresses and ports that comprise a service. - Subsets []EndpointSubset `json:"subsets" protobuf:"bytes,2,rep,name=subsets"` + // +optional + Subsets []EndpointSubset `json:"subsets,omitempty" protobuf:"bytes,2,rep,name=subsets"` } // EndpointSubset is a group of addresses with a common set of ports. The @@ -3760,10 +3754,6 @@ type NodeSpec struct { // PodCIDR represents the pod IP range assigned to the node. // +optional PodCIDR string `json:"podCIDR,omitempty" protobuf:"bytes,1,opt,name=podCIDR"` - // External ID of the node assigned by some machine database (e.g. a cloud provider). - // Deprecated. - // +optional - ExternalID string `json:"externalID,omitempty" protobuf:"bytes,2,opt,name=externalID"` // ID of the node assigned by the cloud provider in the format: :// // +optional ProviderID string `json:"providerID,omitempty" protobuf:"bytes,3,opt,name=providerID"` @@ -3778,14 +3768,53 @@ type NodeSpec struct { // The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field // +optional ConfigSource *NodeConfigSource `json:"configSource,omitempty" protobuf:"bytes,6,opt,name=configSource"` -} -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + // Deprecated. Not all kubelets will set this field. Remove field after 1.13. + // see: https://issues.k8s.io/61966 + // +optional + DoNotUse_ExternalID string `json:"externalID,omitempty" protobuf:"bytes,2,opt,name=externalID"` +} // NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. type NodeConfigSource struct { - metav1.TypeMeta `json:",inline"` - ConfigMapRef *ObjectReference `json:"configMapRef,omitempty" protobuf:"bytes,1,opt,name=configMapRef"` + // For historical context, regarding the below kind, apiVersion, and configMapRef deprecation tags: + // 1. kind/apiVersion were used by the kubelet to persist this struct to disk (they had no protobuf tags) + // 2. configMapRef and proto tag 1 were used by the API to refer to a configmap, + // but used a generic ObjectReference type that didn't really have the fields we needed + // All uses/persistence of the NodeConfigSource struct prior to 1.11 were gated by alpha feature flags, + // so there was no persisted data for these fields that needed to be migrated/handled. + + // +k8s:deprecated=kind + // +k8s:deprecated=apiVersion + // +k8s:deprecated=configMapRef,protobuf=1 + + // ConfigMap is a reference to a Node's ConfigMap + ConfigMap *ConfigMapNodeConfigSource `json:"configMap,omitempty" protobuf:"bytes,2,opt,name=configMap"` +} + +// ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. +type ConfigMapNodeConfigSource struct { + // Namespace is the metadata.namespace of the referenced ConfigMap. + // This field is required in all cases. + Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` + + // Name is the metadata.name of the referenced ConfigMap. + // This field is required in all cases. + Name string `json:"name" protobuf:"bytes,2,opt,name=name"` + + // UID is the metadata.UID of the referenced ConfigMap. + // This field is forbidden in Node.Spec, and required in Node.Status. + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,3,opt,name=uid"` + + // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. + // This field is forbidden in Node.Spec, and required in Node.Status. + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` + + // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure + // This field is required in all cases. + KubeletConfigKey string `json:"kubeletConfigKey" protobuf:"bytes,5,opt,name=kubeletConfigKey"` } // DaemonEndpoint contains information about a single Daemon endpoint. @@ -3835,6 +3864,53 @@ type NodeSystemInfo struct { Architecture string `json:"architecture" protobuf:"bytes,10,opt,name=architecture"` } +// NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. +type NodeConfigStatus struct { + // Assigned reports the checkpointed config the node will try to use. + // When Node.Spec.ConfigSource is updated, the node checkpoints the associated + // config payload to local disk, along with a record indicating intended + // config. The node refers to this record to choose its config checkpoint, and + // reports this record in Assigned. Assigned only updates in the status after + // the record has been checkpointed to disk. When the Kubelet is restarted, + // it tries to make the Assigned config the Active config by loading and + // validating the checkpointed payload identified by Assigned. + // +optional + Assigned *NodeConfigSource `json:"assigned,omitempty" protobuf:"bytes,1,opt,name=assigned"` + // Active reports the checkpointed config the node is actively using. + // Active will represent either the current version of the Assigned config, + // or the current LastKnownGood config, depending on whether attempting to use the + // Assigned config results in an error. + // +optional + Active *NodeConfigSource `json:"active,omitempty" protobuf:"bytes,2,opt,name=active"` + // LastKnownGood reports the checkpointed config the node will fall back to + // when it encounters an error attempting to use the Assigned config. + // The Assigned config becomes the LastKnownGood config when the node determines + // that the Assigned config is stable and correct. + // This is currently implemented as a 10-minute soak period starting when the local + // record of Assigned config is updated. If the Assigned config is Active at the end + // of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is + // reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, + // because the local default config is always assumed good. + // You should not make assumptions about the node's method of determining config stability + // and correctness, as this may change or become configurable in the future. + // +optional + LastKnownGood *NodeConfigSource `json:"lastKnownGood,omitempty" protobuf:"bytes,3,opt,name=lastKnownGood"` + // Error describes any problems reconciling the Spec.ConfigSource to the Active config. + // Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned + // record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting + // to load or validate the Assigned config, etc. + // Errors may occur at different points while syncing config. Earlier errors (e.g. download or + // checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across + // Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in + // a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error + // by fixing the config assigned in Spec.ConfigSource. + // You can find additional information for debugging by searching the error message in the Kubelet log. + // Error is a human-readable description of the error state; machines can check whether or not Error + // is empty, but should not rely on the stability of the Error text across Kubelet versions. + // +optional + Error string `json:"error,omitempty" protobuf:"bytes,4,opt,name=error"` +} + // NodeStatus is information about the current status of a node. type NodeStatus struct { // Capacity represents the total resources of a node. @@ -3879,6 +3955,9 @@ type NodeStatus struct { // List of volumes that are attached to the node. // +optional VolumesAttached []AttachedVolume `json:"volumesAttached,omitempty" protobuf:"bytes,10,rep,name=volumesAttached"` + // Status of the config assigned to the node via the dynamic Kubelet config feature. + // +optional + Config *NodeConfigStatus `json:"config,omitempty" protobuf:"bytes,11,opt,name=config"` } type UniqueVolumeName string @@ -3962,10 +4041,10 @@ const ( NodeMemoryPressure NodeConditionType = "MemoryPressure" // NodeDiskPressure means the kubelet is under pressure due to insufficient available disk. NodeDiskPressure NodeConditionType = "DiskPressure" + // NodePIDPressure means the kubelet is under pressure due to insufficient available PID. + NodePIDPressure NodeConditionType = "PIDPressure" // NodeNetworkUnavailable means that network for the node is not correctly configured. NodeNetworkUnavailable NodeConditionType = "NetworkUnavailable" - // NodeConfigOK indicates whether the kubelet is correctly configured - NodeConfigOK NodeConditionType = "ConfigOK" ) // NodeCondition contains condition information for a node. @@ -4025,8 +4104,6 @@ const ( // Local ephemeral storage, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) // The resource name for ResourceEphemeralStorage is alpha and it can change across releases. ResourceEphemeralStorage ResourceName = "ephemeral-storage" - // NVIDIA GPU, in devices. Alpha, might change: although fractional and allowing values >1, only one whole device per node is assigned. - ResourceNvidiaGPU ResourceName = "alpha.kubernetes.io/nvidia-gpu" ) const ( @@ -4034,6 +4111,8 @@ const ( ResourceDefaultNamespacePrefix = "kubernetes.io/" // Name prefix for huge page resources (alpha). ResourceHugePagesPrefix = "hugepages-" + // Name prefix for storage resource limits + ResourceAttachableVolumesPrefix = "attachable-volumes-" ) // ResourceList is a set of (resource name, quantity) pairs. @@ -4116,6 +4195,7 @@ const ( // +genclient // +genclient:nonNamespaced +// +genclient:skipVerbs=deleteCollection // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Namespace provides a scope for Names. @@ -4176,95 +4256,6 @@ type Preconditions struct { UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` } -// DeletionPropagation decides if a deletion will propagate to the dependents of the object, and how the garbage collector will handle the propagation. -type DeletionPropagation string - -const ( - // Orphans the dependents. - DeletePropagationOrphan DeletionPropagation = "Orphan" - // Deletes the object from the key-value store, the garbage collector will delete the dependents in the background. - DeletePropagationBackground DeletionPropagation = "Background" - // The object exists in the key-value store until the garbage collector deletes all the dependents whose ownerReference.blockOwnerDeletion=true from the key-value store. - // API sever will put the "DeletingDependents" finalizer on the object, and sets its deletionTimestamp. - // This policy is cascading, i.e., the dependents will be deleted with Foreground. - DeletePropagationForeground DeletionPropagation = "Foreground" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DeleteOptions may be provided when deleting an API object -// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. -// +k8s:openapi-gen=false -type DeleteOptions struct { - metav1.TypeMeta `json:",inline"` - - // The duration in seconds before the object should be deleted. Value must be non-negative integer. - // The value zero indicates delete immediately. If this value is nil, the default grace period for the - // specified type will be used. - // Defaults to a per object value if not specified. zero means delete immediately. - // +optional - GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=gracePeriodSeconds"` - - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be - // returned. - // +optional - Preconditions *Preconditions `json:"preconditions,omitempty" protobuf:"bytes,2,opt,name=preconditions"` - - // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. - // Should the dependent objects be orphaned. If true/false, the "orphan" - // finalizer will be added to/removed from the object's finalizers list. - // Either this field or PropagationPolicy may be set, but not both. - // +optional - OrphanDependents *bool `json:"orphanDependents,omitempty" protobuf:"varint,3,opt,name=orphanDependents"` - - // Whether and how garbage collection will be performed. - // Either this field or OrphanDependents may be set, but not both. - // The default policy is decided by the existing finalizer set in the - // metadata.finalizers and the resource-specific default policy. - // Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - - // allow the garbage collector to delete the dependents in the background; - // 'Foreground' - a cascading policy that deletes all dependents in the - // foreground. - // +optional - PropagationPolicy *DeletionPropagation `protobuf:"bytes,4,opt,name=propagationPolicy,casttype=DeletionPropagation"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ListOptions is the query options to a standard REST list call. -// DEPRECATED: This type has been moved to meta/v1 and will be removed soon. -// +k8s:openapi-gen=false -type ListOptions struct { - metav1.TypeMeta `json:",inline"` - - // A selector to restrict the list of returned objects by their labels. - // Defaults to everything. - // +optional - LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"` - // A selector to restrict the list of returned objects by their fields. - // Defaults to everything. - // +optional - FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"` - // If true, partially initialized resources are included in the response. - // +optional - IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,6,opt,name=includeUninitialized"` - // Watch for changes to the described resources and return them as a stream of - // add, update, and remove notifications. Specify resourceVersion. - // +optional - Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"` - // When specified with a watch call, shows changes that occur after that particular version of a resource. - // Defaults to changes from the beginning of history. - // When specified for list: - // - if unset, then the result is returned from remote storage based on quorum-read flag; - // - if it's 0, then we simply return what we currently have in cache, no guarantee; - // - if set to non zero, then the result is at least as fresh as given rv. - // +optional - ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"` - // Timeout for the list/watch call. - // +optional - TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"` -} - // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // PodLogOptions is the query options for a Pod's logs REST call. @@ -4733,6 +4724,8 @@ const ( // HugePages request, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024) // As burst is not supported for HugePages, we would only quota its request, and ignore the limit. ResourceRequestsHugePagesPrefix = "requests.hugepages-" + // Default resource requests prefix + DefaultResourceRequestsPrefix = "requests." ) // A ResourceQuotaScope defines a filter that must match each object tracked by a quota @@ -4747,11 +4740,13 @@ const ( ResourceQuotaScopeBestEffort ResourceQuotaScope = "BestEffort" // Match all pod objects that do not have best effort quality of service ResourceQuotaScopeNotBestEffort ResourceQuotaScope = "NotBestEffort" + // Match all pod objects that have priority class mentioned + ResourceQuotaScopePriorityClass ResourceQuotaScope = "PriorityClass" ) // ResourceQuotaSpec defines the desired hard limits to enforce for Quota. type ResourceQuotaSpec struct { - // Hard is the set of desired hard limits for each named resource. + // hard is the set of desired hard limits for each named resource. // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ // +optional Hard ResourceList `json:"hard,omitempty" protobuf:"bytes,1,rep,name=hard,casttype=ResourceList,castkey=ResourceName"` @@ -4759,8 +4754,48 @@ type ResourceQuotaSpec struct { // If not specified, the quota matches all objects. // +optional Scopes []ResourceQuotaScope `json:"scopes,omitempty" protobuf:"bytes,2,rep,name=scopes,casttype=ResourceQuotaScope"` + // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota + // but expressed using ScopeSelectorOperator in combination with possible values. + // For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + // +optional + ScopeSelector *ScopeSelector `json:"scopeSelector,omitempty" protobuf:"bytes,3,opt,name=scopeSelector"` +} + +// A scope selector represents the AND of the selectors represented +// by the scoped-resource selector requirements. +type ScopeSelector struct { + // A list of scope selector requirements by scope of the resources. + // +optional + MatchExpressions []ScopedResourceSelectorRequirement `json:"matchExpressions,omitempty" protobuf:"bytes,1,rep,name=matchExpressions"` } +// A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator +// that relates the scope name and values. +type ScopedResourceSelectorRequirement struct { + // The name of the scope that the selector applies to. + ScopeName ResourceQuotaScope `json:"scopeName" protobuf:"bytes,1,opt,name=scopeName"` + // Represents a scope's relationship to a set of values. + // Valid operators are In, NotIn, Exists, DoesNotExist. + Operator ScopeSelectorOperator `json:"operator" protobuf:"bytes,2,opt,name=operator,casttype=ScopedResourceSelectorOperator"` + // An array of string values. If the operator is In or NotIn, + // the values array must be non-empty. If the operator is Exists or DoesNotExist, + // the values array must be empty. + // This array is replaced during a strategic merge patch. + // +optional + Values []string `json:"values,omitempty" protobuf:"bytes,3,rep,name=values"` +} + +// A scope selector operator is the set of operators that can be used in +// a scope selector requirement. +type ScopeSelectorOperator string + +const ( + ScopeSelectorOpIn ScopeSelectorOperator = "In" + ScopeSelectorOpNotIn ScopeSelectorOperator = "NotIn" + ScopeSelectorOpExists ScopeSelectorOperator = "Exists" + ScopeSelectorOpDoesNotExist ScopeSelectorOperator = "DoesNotExist" +) + // ResourceQuotaStatus defines the enforced hard limits and observed use. type ResourceQuotaStatus struct { // Hard is the set of enforced hard limits for each named resource. @@ -5114,6 +5149,12 @@ type SecurityContext struct { // PodSecurityContext, the value specified in SecurityContext takes precedence. // +optional RunAsUser *int64 `json:"runAsUser,omitempty" protobuf:"varint,4,opt,name=runAsUser"` + // The GID to run the entrypoint of the container process. + // Uses runtime default if unset. + // May also be set in PodSecurityContext. If set in both SecurityContext and + // PodSecurityContext, the value specified in SecurityContext takes precedence. + // +optional + RunAsGroup *int64 `json:"runAsGroup,omitempty" protobuf:"varint,8,opt,name=runAsGroup"` // Indicates that the container must run as a non-root user. // If true, the Kubelet will validate the image at runtime to ensure that it // does not run as UID 0 (root) and fail to start the container if it does. @@ -5182,9 +5223,9 @@ const ( // Sysctl defines a kernel parameter to be set type Sysctl struct { // Name of a property to set - Name string `protobuf:"bytes,1,opt,name=name"` + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // Value of a property to set - Value string `protobuf:"bytes,2,opt,name=value"` + Value string `json:"value" protobuf:"bytes,2,opt,name=value"` } // NodeResources is an object for conveying resource information about a node. diff --git a/deps/k8s.io/api/core/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/core/v1/types_swagger_doc_generated.go index 3edb05a62..13d5c7898 100644 --- a/deps/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AWSElasticBlockStoreVolumeSource = map[string]string{ "": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", "volumeID": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", @@ -117,11 +117,15 @@ func (Binding) SwaggerDoc() map[string]string { } var map_CSIPersistentVolumeSource = map[string]string{ - "": "Represents storage that is managed by an external CSI volume driver", - "driver": "Driver is the name of the driver to use for this volume. Required.", - "volumeHandle": "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", - "readOnly": "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", - "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "": "Represents storage that is managed by an external CSI volume driver (Beta feature)", + "driver": "Driver is the name of the driver to use for this volume. Required.", + "volumeHandle": "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.", + "readOnly": "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", + "volumeAttributes": "Attributes of the volume to publish.", + "controllerPublishSecretRef": "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "nodeStageSecretRef": "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", + "nodePublishSecretRef": "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.", } func (CSIPersistentVolumeSource) SwaggerDoc() map[string]string { @@ -166,11 +170,24 @@ func (CephFSVolumeSource) SwaggerDoc() map[string]string { return map_CephFSVolumeSource } +var map_CinderPersistentVolumeSource = map[string]string{ + "": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + "volumeID": "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "secretRef": "Optional: points to a secret object containing parameters used to connect to OpenStack.", +} + +func (CinderPersistentVolumeSource) SwaggerDoc() map[string]string { + return map_CinderPersistentVolumeSource +} + var map_CinderVolumeSource = map[string]string{ - "": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", - "volumeID": "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + "volumeID": "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "readOnly": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "secretRef": "Optional: points to a secret object containing parameters used to connect to OpenStack.", } func (CinderVolumeSource) SwaggerDoc() map[string]string { @@ -258,6 +275,19 @@ func (ConfigMapList) SwaggerDoc() map[string]string { return map_ConfigMapList } +var map_ConfigMapNodeConfigSource = map[string]string{ + "": "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.", + "namespace": "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", + "name": "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", + "uid": "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + "resourceVersion": "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", + "kubeletConfigKey": "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", +} + +func (ConfigMapNodeConfigSource) SwaggerDoc() map[string]string { + return map_ConfigMapNodeConfigSource +} + var map_ConfigMapProjection = map[string]string{ "": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", "items": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", @@ -289,7 +319,7 @@ var map_Container = map[string]string{ "ports": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", "envFrom": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", "env": "List of environment variables to set in the container. Cannot be updated.", - "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "resources": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", "volumeMounts": "Pod volumes to mount into the container's filesystem. Cannot be updated.", "volumeDevices": "volumeDevices is the list of block devices to be used by the container. This is an alpha feature and may change in the future.", "livenessProbe": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", @@ -401,18 +431,6 @@ func (DaemonEndpoint) SwaggerDoc() map[string]string { return map_DaemonEndpoint } -var map_DeleteOptions = map[string]string{ - "": "DeleteOptions may be provided when deleting an API object DEPRECATED: This type has been moved to meta/v1 and will be removed soon.", - "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "PropagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", -} - -func (DeleteOptions) SwaggerDoc() map[string]string { - return map_DeleteOptions -} - var map_DownwardAPIProjection = map[string]string{ "": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", "items": "Items is a list of DownwardAPIVolume file", @@ -667,7 +685,7 @@ func (GCEPersistentDiskVolumeSource) SwaggerDoc() map[string]string { } var map_GitRepoVolumeSource = map[string]string{ - "": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.", + "": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", "repository": "Repository URL", "revision": "Commit hash for the specified revision.", "directory": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", @@ -844,20 +862,6 @@ func (LimitRangeSpec) SwaggerDoc() map[string]string { return map_LimitRangeSpec } -var map_ListOptions = map[string]string{ - "": "ListOptions is the query options to a standard REST list call. DEPRECATED: This type has been moved to meta/v1 and will be removed soon.", - "labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "includeUninitialized": "If true, partially initialized resources are included in the response.", - "watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "timeoutSeconds": "Timeout for the list/watch call.", -} - -func (ListOptions) SwaggerDoc() map[string]string { - return map_ListOptions -} - var map_LoadBalancerIngress = map[string]string{ "": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", "ip": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", @@ -887,8 +891,8 @@ func (LocalObjectReference) SwaggerDoc() map[string]string { } var map_LocalVolumeSource = map[string]string{ - "": "Local represents directly-attached storage with node affinity", - "path": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device", + "": "Local represents directly-attached storage with node affinity (Beta feature)", + "path": "The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). Directories can be represented only by PersistentVolume with VolumeMode=Filesystem. Block devices can be represented only by VolumeMode=Block, which also requires the BlockVolume alpha feature gate to be enabled.", } func (LocalVolumeSource) SwaggerDoc() map[string]string { @@ -991,13 +995,26 @@ func (NodeCondition) SwaggerDoc() map[string]string { } var map_NodeConfigSource = map[string]string{ - "": "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", + "": "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", + "configMap": "ConfigMap is a reference to a Node's ConfigMap", } func (NodeConfigSource) SwaggerDoc() map[string]string { return map_NodeConfigSource } +var map_NodeConfigStatus = map[string]string{ + "": "NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.", + "assigned": "Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned.", + "active": "Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error.", + "lastKnownGood": "LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future.", + "error": "Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions.", +} + +func (NodeConfigStatus) SwaggerDoc() map[string]string { + return map_NodeConfigStatus +} + var map_NodeDaemonEndpoints = map[string]string{ "": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", "kubeletEndpoint": "Endpoint on which Kubelet is listening.", @@ -1056,8 +1073,9 @@ func (NodeSelectorRequirement) SwaggerDoc() map[string]string { } var map_NodeSelectorTerm = map[string]string{ - "": "A null or empty node selector term matches no objects.", - "matchExpressions": "Required. A list of node selector requirements. The requirements are ANDed.", + "": "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.", + "matchExpressions": "A list of node selector requirements by node's labels.", + "matchFields": "A list of node selector requirements by node's fields.", } func (NodeSelectorTerm) SwaggerDoc() map[string]string { @@ -1067,11 +1085,11 @@ func (NodeSelectorTerm) SwaggerDoc() map[string]string { var map_NodeSpec = map[string]string{ "": "NodeSpec describes the attributes that a node is created with.", "podCIDR": "PodCIDR represents the pod IP range assigned to the node.", - "externalID": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.", "providerID": "ID of the node assigned by the cloud provider in the format: ://", "unschedulable": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", "taints": "If specified, the node's taints.", "configSource": "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", + "externalID": "Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966", } func (NodeSpec) SwaggerDoc() map[string]string { @@ -1090,6 +1108,7 @@ var map_NodeStatus = map[string]string{ "images": "List of container images on this node", "volumesInUse": "List of attachable volumes in use (mounted) by the node.", "volumesAttached": "List of volumes that are attached to the node.", + "config": "Status of the config assigned to the node via the dynamic Kubelet config feature.", } func (NodeStatus) SwaggerDoc() map[string]string { @@ -1124,30 +1143,6 @@ func (ObjectFieldSelector) SwaggerDoc() map[string]string { return map_ObjectFieldSelector } -var map_ObjectMeta = map[string]string{ - "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. DEPRECATED: Use k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta instead - this type will be removed soon.", - "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", - "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - "selfLink": "SelfLink is a URL representing this object. Populated by the system. Read-only.", - "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", - "resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - "generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - "creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", - "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/", - "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/", - "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", - "initializers": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", - "finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", - "clusterName": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", -} - -func (ObjectMeta) SwaggerDoc() map[string]string { - return map_ObjectMeta -} - var map_ObjectReference = map[string]string{ "": "ObjectReference contains enough information to let you inspect or modify the referred object.", "kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", @@ -1276,7 +1271,7 @@ var map_PersistentVolumeSource = map[string]string{ "scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", "local": "Local represents directly-attached storage with node affinity", "storageos": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", - "csi": "CSI represents storage that handled by an external CSI driver", + "csi": "CSI represents storage that handled by an external CSI driver (Beta feature).", } func (PersistentVolumeSource) SwaggerDoc() map[string]string { @@ -1288,10 +1283,11 @@ var map_PersistentVolumeSpec = map[string]string{ "capacity": "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", "accessModes": "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", "claimRef": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", - "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", + "persistentVolumeReclaimPolicy": "What happens to a persistent volume when released from its claim. Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", "storageClassName": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", "mountOptions": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", "volumeMode": "volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. This is an alpha feature and may change in the future.", + "nodeAffinity": "NodeAffinity defines constraints that limit what nodes this volume can be accessed from. This field influences the scheduling of pods that use this volume.", } func (PersistentVolumeSpec) SwaggerDoc() map[string]string { @@ -1376,7 +1372,7 @@ func (PodAttachOptions) SwaggerDoc() map[string]string { var map_PodCondition = map[string]string{ "": "PodCondition contains details for the current condition of this pod.", - "type": "Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + "type": "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", "status": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", "lastProbeTime": "Last time we probed the condition.", "lastTransitionTime": "Last time the condition transitioned from one status to another.", @@ -1466,13 +1462,24 @@ func (PodProxyOptions) SwaggerDoc() map[string]string { return map_PodProxyOptions } +var map_PodReadinessGate = map[string]string{ + "": "PodReadinessGate contains the reference to a pod condition", + "conditionType": "ConditionType refers to a condition in the pod's condition list with matching type.", +} + +func (PodReadinessGate) SwaggerDoc() map[string]string { + return map_PodReadinessGate +} + var map_PodSecurityContext = map[string]string{ "": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", "seLinuxOptions": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "runAsGroup": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "supplementalGroups": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", "fsGroup": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw ", + "sysctls": "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.", } func (PodSecurityContext) SwaggerDoc() map[string]string { @@ -1496,7 +1503,7 @@ var map_PodSpec = map[string]string{ "restartPolicy": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", "terminationGracePeriodSeconds": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", "activeDeadlineSeconds": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", - "dnsPolicy": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. Note that 'None' policy is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.", + "dnsPolicy": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", "nodeSelector": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", "serviceAccountName": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", "serviceAccount": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", @@ -1505,6 +1512,7 @@ var map_PodSpec = map[string]string{ "hostNetwork": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", "hostPID": "Use the host's pid namespace. Optional: Default to false.", "hostIPC": "Use the host's ipc namespace. Optional: Default to false.", + "shareProcessNamespace": "Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. This field is beta-level and may be disabled with the PodShareProcessNamespace feature.", "securityContext": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", "imagePullSecrets": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", "hostname": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", @@ -1515,7 +1523,9 @@ var map_PodSpec = map[string]string{ "hostAliases": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", "priorityClassName": "If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", "priority": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", - "dnsConfig": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. This is an alpha feature introduced in v1.9 and CustomPodDNS feature gate must be enabled to use it.", + "dnsConfig": "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", + "readinessGates": "If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://github.com/kubernetes/community/blob/master/keps/sig-network/0007-pod-ready%2B%2B.md", + "runtimeClassName": "RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://github.com/kubernetes/community/blob/master/keps/sig-node/0014-runtime-class.md This is an alpha feature and may change in the future.", } func (PodSpec) SwaggerDoc() map[string]string { @@ -1523,8 +1533,8 @@ func (PodSpec) SwaggerDoc() map[string]string { } var map_PodStatus = map[string]string{ - "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", - "phase": "Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", + "": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.", + "phase": "The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values:\n\nPending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod.\n\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", "conditions": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", "message": "A human readable message indicating details about why the pod is in this condition.", "reason": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", @@ -1795,9 +1805,10 @@ func (ResourceQuotaList) SwaggerDoc() map[string]string { } var map_ResourceQuotaSpec = map[string]string{ - "": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", - "hard": "Hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - "scopes": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", + "": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", + "hard": "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", + "scopes": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", + "scopeSelector": "scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.", } func (ResourceQuotaSpec) SwaggerDoc() map[string]string { @@ -1844,9 +1855,9 @@ var map_ScaleIOPersistentVolumeSource = map[string]string{ "sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false", "protectionDomain": "The name of the ScaleIO Protection Domain for the configured storage.", "storagePool": "The ScaleIO Storage Pool associated with the protection domain.", - "storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.", + "storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", "volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", - "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", } @@ -1862,9 +1873,9 @@ var map_ScaleIOVolumeSource = map[string]string{ "sslEnabled": "Flag to enable/disable SSL communication with Gateway, default false", "protectionDomain": "The name of the ScaleIO Protection Domain for the configured storage.", "storagePool": "The ScaleIO Storage Pool associated with the protection domain.", - "storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.", + "storageMode": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", "volumeName": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", - "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "fsType": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", "readOnly": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", } @@ -1872,6 +1883,26 @@ func (ScaleIOVolumeSource) SwaggerDoc() map[string]string { return map_ScaleIOVolumeSource } +var map_ScopeSelector = map[string]string{ + "": "A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.", + "matchExpressions": "A list of scope selector requirements by scope of the resources.", +} + +func (ScopeSelector) SwaggerDoc() map[string]string { + return map_ScopeSelector +} + +var map_ScopedResourceSelectorRequirement = map[string]string{ + "": "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.", + "scopeName": "The name of the scope that the selector applies to.", + "operator": "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.", + "values": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", +} + +func (ScopedResourceSelectorRequirement) SwaggerDoc() map[string]string { + return map_ScopedResourceSelectorRequirement +} + var map_Secret = map[string]string{ "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -1951,6 +1982,7 @@ var map_SecurityContext = map[string]string{ "privileged": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", "seLinuxOptions": "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "runAsUser": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "runAsGroup": "The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "runAsNonRoot": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", "readOnlyRootFilesystem": "Whether this container has a read-only root filesystem. Default is false.", "allowPrivilegeEscalation": "AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN", @@ -2002,6 +2034,17 @@ func (ServiceAccountList) SwaggerDoc() map[string]string { return map_ServiceAccountList } +var map_ServiceAccountTokenProjection = map[string]string{ + "": "ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).", + "audience": "Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.", + "expirationSeconds": "ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.", + "path": "Path is the path relative to the mount point of the file to project the token into.", +} + +func (ServiceAccountTokenProjection) SwaggerDoc() map[string]string { + return map_ServiceAccountTokenProjection +} + var map_ServiceList = map[string]string{ "": "ServiceList holds a list of services.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", @@ -2047,7 +2090,7 @@ var map_ServiceSpec = map[string]string{ "externalName": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName.", "externalTrafficPolicy": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", "healthCheckNodePort": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", - "publishNotReadyAddresses": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field.", + "publishNotReadyAddresses": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery.", "sessionAffinityConfig": "sessionAffinityConfig contains the configurations of session affinity.", } @@ -2101,8 +2144,8 @@ func (StorageOSVolumeSource) SwaggerDoc() map[string]string { var map_Sysctl = map[string]string{ "": "Sysctl defines a kernel parameter to be set", - "Name": "Name of a property to set", - "Value": "Value of a property to set", + "name": "Name of a property to set", + "value": "Value of a property to set", } func (Sysctl) SwaggerDoc() map[string]string { @@ -2144,6 +2187,25 @@ func (Toleration) SwaggerDoc() map[string]string { return map_Toleration } +var map_TopologySelectorLabelRequirement = map[string]string{ + "": "A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.", + "key": "The label key that the selector applies to.", + "values": "An array of string values. One value must match the label to be selected. Each entry in Values is ORed.", +} + +func (TopologySelectorLabelRequirement) SwaggerDoc() map[string]string { + return map_TopologySelectorLabelRequirement +} + +var map_TopologySelectorTerm = map[string]string{ + "": "A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.", + "matchLabelExpressions": "A list of topology selector requirements by labels.", +} + +func (TopologySelectorTerm) SwaggerDoc() map[string]string { + return map_TopologySelectorTerm +} + var map_Volume = map[string]string{ "": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", "name": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", @@ -2169,18 +2231,28 @@ var map_VolumeMount = map[string]string{ "readOnly": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", "mountPath": "Path within the container at which the volume should be mounted. Must not contain ':'.", "subPath": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release.", + "mountPropagation": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.", } func (VolumeMount) SwaggerDoc() map[string]string { return map_VolumeMount } +var map_VolumeNodeAffinity = map[string]string{ + "": "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", + "required": "Required specifies hard node constraints that must be met.", +} + +func (VolumeNodeAffinity) SwaggerDoc() map[string]string { + return map_VolumeNodeAffinity +} + var map_VolumeProjection = map[string]string{ - "": "Projection that may be projected along with other supported volume types", - "secret": "information about the secret data to project", - "downwardAPI": "information about the downwardAPI data to project", - "configMap": "information about the configMap data to project", + "": "Projection that may be projected along with other supported volume types", + "secret": "information about the secret data to project", + "downwardAPI": "information about the downwardAPI data to project", + "configMap": "information about the configMap data to project", + "serviceAccountToken": "information about the serviceAccountToken data to project", } func (VolumeProjection) SwaggerDoc() map[string]string { @@ -2193,7 +2265,7 @@ var map_VolumeSource = map[string]string{ "emptyDir": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", "gcePersistentDisk": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", "awsElasticBlockStore": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - "gitRepo": "GitRepo represents a git repository at a particular revision.", + "gitRepo": "GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.", "secret": "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", "nfs": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", "iscsi": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", diff --git a/deps/k8s.io/api/core/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/core/v1/zz_generated.deepcopy.go index 50a44edcd..465e3fd36 100644 --- a/deps/k8s.io/api/core/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/core/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - resource "k8s.io/apimachinery/pkg/api/resource" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" types "k8s.io/apimachinery/pkg/types" ) @@ -48,30 +47,18 @@ func (in *Affinity) DeepCopyInto(out *Affinity) { *out = *in if in.NodeAffinity != nil { in, out := &in.NodeAffinity, &out.NodeAffinity - if *in == nil { - *out = nil - } else { - *out = new(NodeAffinity) - (*in).DeepCopyInto(*out) - } + *out = new(NodeAffinity) + (*in).DeepCopyInto(*out) } if in.PodAffinity != nil { in, out := &in.PodAffinity, &out.PodAffinity - if *in == nil { - *out = nil - } else { - *out = new(PodAffinity) - (*in).DeepCopyInto(*out) - } + *out = new(PodAffinity) + (*in).DeepCopyInto(*out) } if in.PodAntiAffinity != nil { in, out := &in.PodAntiAffinity, &out.PodAntiAffinity - if *in == nil { - *out = nil - } else { - *out = new(PodAntiAffinity) - (*in).DeepCopyInto(*out) - } + *out = new(PodAntiAffinity) + (*in).DeepCopyInto(*out) } return } @@ -130,39 +117,23 @@ func (in *AzureDiskVolumeSource) DeepCopyInto(out *AzureDiskVolumeSource) { *out = *in if in.CachingMode != nil { in, out := &in.CachingMode, &out.CachingMode - if *in == nil { - *out = nil - } else { - *out = new(AzureDataDiskCachingMode) - **out = **in - } + *out = new(AzureDataDiskCachingMode) + **out = **in } if in.FSType != nil { in, out := &in.FSType, &out.FSType - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.ReadOnly != nil { in, out := &in.ReadOnly, &out.ReadOnly - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.Kind != nil { in, out := &in.Kind, &out.Kind - if *in == nil { - *out = nil - } else { - *out = new(AzureDataDiskKind) - **out = **in - } + *out = new(AzureDataDiskKind) + **out = **in } return } @@ -182,12 +153,8 @@ func (in *AzureFilePersistentVolumeSource) DeepCopyInto(out *AzureFilePersistent *out = *in if in.SecretNamespace != nil { in, out := &in.SecretNamespace, &out.SecretNamespace - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -241,14 +208,35 @@ func (in *Binding) DeepCopy() *Binding { func (in *Binding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CSIPersistentVolumeSource) DeepCopyInto(out *CSIPersistentVolumeSource) { *out = *in + if in.VolumeAttributes != nil { + in, out := &in.VolumeAttributes, &out.VolumeAttributes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.ControllerPublishSecretRef != nil { + in, out := &in.ControllerPublishSecretRef, &out.ControllerPublishSecretRef + *out = new(SecretReference) + **out = **in + } + if in.NodeStageSecretRef != nil { + in, out := &in.NodeStageSecretRef, &out.NodeStageSecretRef + *out = new(SecretReference) + **out = **in + } + if in.NodePublishSecretRef != nil { + in, out := &in.NodePublishSecretRef, &out.NodePublishSecretRef + *out = new(SecretReference) + **out = **in + } return } @@ -298,12 +286,8 @@ func (in *CephFSPersistentVolumeSource) DeepCopyInto(out *CephFSPersistentVolume } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(SecretReference) - **out = **in - } + *out = new(SecretReference) + **out = **in } return } @@ -328,12 +312,8 @@ func (in *CephFSVolumeSource) DeepCopyInto(out *CephFSVolumeSource) { } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(LocalObjectReference) - **out = **in - } + *out = new(LocalObjectReference) + **out = **in } return } @@ -348,9 +328,35 @@ func (in *CephFSVolumeSource) DeepCopy() *CephFSVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CinderPersistentVolumeSource) DeepCopyInto(out *CinderPersistentVolumeSource) { + *out = *in + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(SecretReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CinderPersistentVolumeSource. +func (in *CinderPersistentVolumeSource) DeepCopy() *CinderPersistentVolumeSource { + if in == nil { + return nil + } + out := new(CinderPersistentVolumeSource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CinderVolumeSource) DeepCopyInto(out *CinderVolumeSource) { *out = *in + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(LocalObjectReference) + **out = **in + } return } @@ -369,12 +375,8 @@ func (in *ClientIPConfig) DeepCopyInto(out *ClientIPConfig) { *out = *in if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -432,9 +434,8 @@ func (in *ComponentStatus) DeepCopy() *ComponentStatus { func (in *ComponentStatus) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -466,9 +467,8 @@ func (in *ComponentStatusList) DeepCopy() *ComponentStatusList { func (in *ComponentStatusList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -487,12 +487,15 @@ func (in *ConfigMap) DeepCopyInto(out *ConfigMap) { in, out := &in.BinaryData, &out.BinaryData *out = make(map[string][]byte, len(*in)) for key, val := range *in { + var outVal []byte if val == nil { (*out)[key] = nil } else { - (*out)[key] = make([]byte, len(val)) - copy((*out)[key], val) + in, out := &val, &outVal + *out = make([]byte, len(*in)) + copy(*out, *in) } + (*out)[key] = outVal } } return @@ -512,9 +515,8 @@ func (in *ConfigMap) DeepCopy() *ConfigMap { func (in *ConfigMap) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -523,12 +525,8 @@ func (in *ConfigMapEnvSource) DeepCopyInto(out *ConfigMapEnvSource) { out.LocalObjectReference = in.LocalObjectReference if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -549,12 +547,8 @@ func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector) { out.LocalObjectReference = in.LocalObjectReference if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -598,9 +592,24 @@ func (in *ConfigMapList) DeepCopy() *ConfigMapList { func (in *ConfigMapList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ConfigMapNodeConfigSource) DeepCopyInto(out *ConfigMapNodeConfigSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapNodeConfigSource. +func (in *ConfigMapNodeConfigSource) DeepCopy() *ConfigMapNodeConfigSource { + if in == nil { return nil } + out := new(ConfigMapNodeConfigSource) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -616,12 +625,8 @@ func (in *ConfigMapProjection) DeepCopyInto(out *ConfigMapProjection) { } if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -649,21 +654,13 @@ func (in *ConfigMapVolumeSource) DeepCopyInto(out *ConfigMapVolumeSource) { } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -725,39 +722,23 @@ func (in *Container) DeepCopyInto(out *Container) { } if in.LivenessProbe != nil { in, out := &in.LivenessProbe, &out.LivenessProbe - if *in == nil { - *out = nil - } else { - *out = new(Probe) - (*in).DeepCopyInto(*out) - } + *out = new(Probe) + (*in).DeepCopyInto(*out) } if in.ReadinessProbe != nil { in, out := &in.ReadinessProbe, &out.ReadinessProbe - if *in == nil { - *out = nil - } else { - *out = new(Probe) - (*in).DeepCopyInto(*out) - } + *out = new(Probe) + (*in).DeepCopyInto(*out) } if in.Lifecycle != nil { in, out := &in.Lifecycle, &out.Lifecycle - if *in == nil { - *out = nil - } else { - *out = new(Lifecycle) - (*in).DeepCopyInto(*out) - } + *out = new(Lifecycle) + (*in).DeepCopyInto(*out) } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext - if *in == nil { - *out = nil - } else { - *out = new(SecurityContext) - (*in).DeepCopyInto(*out) - } + *out = new(SecurityContext) + (*in).DeepCopyInto(*out) } return } @@ -814,30 +795,18 @@ func (in *ContainerState) DeepCopyInto(out *ContainerState) { *out = *in if in.Waiting != nil { in, out := &in.Waiting, &out.Waiting - if *in == nil { - *out = nil - } else { - *out = new(ContainerStateWaiting) - **out = **in - } + *out = new(ContainerStateWaiting) + **out = **in } if in.Running != nil { in, out := &in.Running, &out.Running - if *in == nil { - *out = nil - } else { - *out = new(ContainerStateRunning) - (*in).DeepCopyInto(*out) - } + *out = new(ContainerStateRunning) + (*in).DeepCopyInto(*out) } if in.Terminated != nil { in, out := &in.Terminated, &out.Terminated - if *in == nil { - *out = nil - } else { - *out = new(ContainerStateTerminated) - (*in).DeepCopyInto(*out) - } + *out = new(ContainerStateTerminated) + (*in).DeepCopyInto(*out) } return } @@ -937,68 +906,6 @@ func (in *DaemonEndpoint) DeepCopy() *DaemonEndpoint { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeleteOptions) DeepCopyInto(out *DeleteOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.GracePeriodSeconds != nil { - in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - if in.Preconditions != nil { - in, out := &in.Preconditions, &out.Preconditions - if *in == nil { - *out = nil - } else { - *out = new(Preconditions) - (*in).DeepCopyInto(*out) - } - } - if in.OrphanDependents != nil { - in, out := &in.OrphanDependents, &out.OrphanDependents - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } - } - if in.PropagationPolicy != nil { - in, out := &in.PropagationPolicy, &out.PropagationPolicy - if *in == nil { - *out = nil - } else { - *out = new(DeletionPropagation) - **out = **in - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeleteOptions. -func (in *DeleteOptions) DeepCopy() *DeleteOptions { - if in == nil { - return nil - } - out := new(DeleteOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeleteOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DownwardAPIProjection) DeepCopyInto(out *DownwardAPIProjection) { *out = *in @@ -1027,30 +934,18 @@ func (in *DownwardAPIVolumeFile) DeepCopyInto(out *DownwardAPIVolumeFile) { *out = *in if in.FieldRef != nil { in, out := &in.FieldRef, &out.FieldRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectFieldSelector) - **out = **in - } + *out = new(ObjectFieldSelector) + **out = **in } if in.ResourceFieldRef != nil { in, out := &in.ResourceFieldRef, &out.ResourceFieldRef - if *in == nil { - *out = nil - } else { - *out = new(ResourceFieldSelector) - (*in).DeepCopyInto(*out) - } + *out = new(ResourceFieldSelector) + (*in).DeepCopyInto(*out) } if in.Mode != nil { in, out := &in.Mode, &out.Mode - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -1077,12 +972,8 @@ func (in *DownwardAPIVolumeSource) DeepCopyInto(out *DownwardAPIVolumeSource) { } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -1102,12 +993,8 @@ func (in *EmptyDirVolumeSource) DeepCopyInto(out *EmptyDirVolumeSource) { *out = *in if in.SizeLimit != nil { in, out := &in.SizeLimit, &out.SizeLimit - if *in == nil { - *out = nil - } else { - *out = new(resource.Quantity) - **out = (*in).DeepCopy() - } + x := (*in).DeepCopy() + *out = &x } return } @@ -1127,21 +1014,13 @@ func (in *EndpointAddress) DeepCopyInto(out *EndpointAddress) { *out = *in if in.NodeName != nil { in, out := &in.NodeName, &out.NodeName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.TargetRef != nil { in, out := &in.TargetRef, &out.TargetRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + *out = new(ObjectReference) + **out = **in } return } @@ -1236,9 +1115,8 @@ func (in *Endpoints) DeepCopy() *Endpoints { func (in *Endpoints) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1270,9 +1148,8 @@ func (in *EndpointsList) DeepCopy() *EndpointsList { func (in *EndpointsList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1280,21 +1157,13 @@ func (in *EnvFromSource) DeepCopyInto(out *EnvFromSource) { *out = *in if in.ConfigMapRef != nil { in, out := &in.ConfigMapRef, &out.ConfigMapRef - if *in == nil { - *out = nil - } else { - *out = new(ConfigMapEnvSource) - (*in).DeepCopyInto(*out) - } + *out = new(ConfigMapEnvSource) + (*in).DeepCopyInto(*out) } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(SecretEnvSource) - (*in).DeepCopyInto(*out) - } + *out = new(SecretEnvSource) + (*in).DeepCopyInto(*out) } return } @@ -1314,12 +1183,8 @@ func (in *EnvVar) DeepCopyInto(out *EnvVar) { *out = *in if in.ValueFrom != nil { in, out := &in.ValueFrom, &out.ValueFrom - if *in == nil { - *out = nil - } else { - *out = new(EnvVarSource) - (*in).DeepCopyInto(*out) - } + *out = new(EnvVarSource) + (*in).DeepCopyInto(*out) } return } @@ -1339,39 +1204,23 @@ func (in *EnvVarSource) DeepCopyInto(out *EnvVarSource) { *out = *in if in.FieldRef != nil { in, out := &in.FieldRef, &out.FieldRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectFieldSelector) - **out = **in - } + *out = new(ObjectFieldSelector) + **out = **in } if in.ResourceFieldRef != nil { in, out := &in.ResourceFieldRef, &out.ResourceFieldRef - if *in == nil { - *out = nil - } else { - *out = new(ResourceFieldSelector) - (*in).DeepCopyInto(*out) - } + *out = new(ResourceFieldSelector) + (*in).DeepCopyInto(*out) } if in.ConfigMapKeyRef != nil { in, out := &in.ConfigMapKeyRef, &out.ConfigMapKeyRef - if *in == nil { - *out = nil - } else { - *out = new(ConfigMapKeySelector) - (*in).DeepCopyInto(*out) - } + *out = new(ConfigMapKeySelector) + (*in).DeepCopyInto(*out) } if in.SecretKeyRef != nil { in, out := &in.SecretKeyRef, &out.SecretKeyRef - if *in == nil { - *out = nil - } else { - *out = new(SecretKeySelector) - (*in).DeepCopyInto(*out) - } + *out = new(SecretKeySelector) + (*in).DeepCopyInto(*out) } return } @@ -1398,21 +1247,13 @@ func (in *Event) DeepCopyInto(out *Event) { in.EventTime.DeepCopyInto(&out.EventTime) if in.Series != nil { in, out := &in.Series, &out.Series - if *in == nil { - *out = nil - } else { - *out = new(EventSeries) - (*in).DeepCopyInto(*out) - } + *out = new(EventSeries) + (*in).DeepCopyInto(*out) } if in.Related != nil { in, out := &in.Related, &out.Related - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + *out = new(ObjectReference) + **out = **in } return } @@ -1431,9 +1272,8 @@ func (in *Event) DeepCopy() *Event { func (in *Event) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1465,9 +1305,8 @@ func (in *EventList) DeepCopy() *EventList { func (in *EventList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1534,12 +1373,8 @@ func (in *FCVolumeSource) DeepCopyInto(out *FCVolumeSource) { } if in.Lun != nil { in, out := &in.Lun, &out.Lun - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.WWIDs != nil { in, out := &in.WWIDs, &out.WWIDs @@ -1564,12 +1399,8 @@ func (in *FlexPersistentVolumeSource) DeepCopyInto(out *FlexPersistentVolumeSour *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(SecretReference) - **out = **in - } + *out = new(SecretReference) + **out = **in } if in.Options != nil { in, out := &in.Options, &out.Options @@ -1596,12 +1427,8 @@ func (in *FlexVolumeSource) DeepCopyInto(out *FlexVolumeSource) { *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(LocalObjectReference) - **out = **in - } + *out = new(LocalObjectReference) + **out = **in } if in.Options != nil { in, out := &in.Options, &out.Options @@ -1730,30 +1557,18 @@ func (in *Handler) DeepCopyInto(out *Handler) { *out = *in if in.Exec != nil { in, out := &in.Exec, &out.Exec - if *in == nil { - *out = nil - } else { - *out = new(ExecAction) - (*in).DeepCopyInto(*out) - } + *out = new(ExecAction) + (*in).DeepCopyInto(*out) } if in.HTTPGet != nil { in, out := &in.HTTPGet, &out.HTTPGet - if *in == nil { - *out = nil - } else { - *out = new(HTTPGetAction) - (*in).DeepCopyInto(*out) - } + *out = new(HTTPGetAction) + (*in).DeepCopyInto(*out) } if in.TCPSocket != nil { in, out := &in.TCPSocket, &out.TCPSocket - if *in == nil { - *out = nil - } else { - *out = new(TCPSocketAction) - **out = **in - } + *out = new(TCPSocketAction) + **out = **in } return } @@ -1794,12 +1609,8 @@ func (in *HostPathVolumeSource) DeepCopyInto(out *HostPathVolumeSource) { *out = *in if in.Type != nil { in, out := &in.Type, &out.Type - if *in == nil { - *out = nil - } else { - *out = new(HostPathType) - **out = **in - } + *out = new(HostPathType) + **out = **in } return } @@ -1824,21 +1635,13 @@ func (in *ISCSIPersistentVolumeSource) DeepCopyInto(out *ISCSIPersistentVolumeSo } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(SecretReference) - **out = **in - } + *out = new(SecretReference) + **out = **in } if in.InitiatorName != nil { in, out := &in.InitiatorName, &out.InitiatorName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -1863,21 +1666,13 @@ func (in *ISCSIVolumeSource) DeepCopyInto(out *ISCSIVolumeSource) { } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(LocalObjectReference) - **out = **in - } + *out = new(LocalObjectReference) + **out = **in } if in.InitiatorName != nil { in, out := &in.InitiatorName, &out.InitiatorName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -1897,12 +1692,8 @@ func (in *KeyToPath) DeepCopyInto(out *KeyToPath) { *out = *in if in.Mode != nil { in, out := &in.Mode, &out.Mode - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -1922,21 +1713,13 @@ func (in *Lifecycle) DeepCopyInto(out *Lifecycle) { *out = *in if in.PostStart != nil { in, out := &in.PostStart, &out.PostStart - if *in == nil { - *out = nil - } else { - *out = new(Handler) - (*in).DeepCopyInto(*out) - } + *out = new(Handler) + (*in).DeepCopyInto(*out) } if in.PreStop != nil { in, out := &in.PreStop, &out.PreStop - if *in == nil { - *out = nil - } else { - *out = new(Handler) - (*in).DeepCopyInto(*out) - } + *out = new(Handler) + (*in).DeepCopyInto(*out) } return } @@ -1974,9 +1757,8 @@ func (in *LimitRange) DeepCopy() *LimitRange { func (in *LimitRange) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2059,9 +1841,8 @@ func (in *LimitRangeList) DeepCopy() *LimitRangeList { func (in *LimitRangeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2116,44 +1897,8 @@ func (in *List) DeepCopy() *List { func (in *List) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil - } -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ListOptions) DeepCopyInto(out *ListOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListOptions. -func (in *ListOptions) DeepCopy() *ListOptions { - if in == nil { - return nil - } - out := new(ListOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ListOptions) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2265,9 +2010,8 @@ func (in *Namespace) DeepCopy() *Namespace { func (in *Namespace) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2299,9 +2043,8 @@ func (in *NamespaceList) DeepCopy() *NamespaceList { func (in *NamespaceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2365,9 +2108,8 @@ func (in *Node) DeepCopy() *Node { func (in *Node) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2391,12 +2133,8 @@ func (in *NodeAffinity) DeepCopyInto(out *NodeAffinity) { *out = *in if in.RequiredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.RequiredDuringSchedulingIgnoredDuringExecution, &out.RequiredDuringSchedulingIgnoredDuringExecution - if *in == nil { - *out = nil - } else { - *out = new(NodeSelector) - (*in).DeepCopyInto(*out) - } + *out = new(NodeSelector) + (*in).DeepCopyInto(*out) } if in.PreferredDuringSchedulingIgnoredDuringExecution != nil { in, out := &in.PreferredDuringSchedulingIgnoredDuringExecution, &out.PreferredDuringSchedulingIgnoredDuringExecution @@ -2439,15 +2177,10 @@ func (in *NodeCondition) DeepCopy() *NodeCondition { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeConfigSource) DeepCopyInto(out *NodeConfigSource) { *out = *in - out.TypeMeta = in.TypeMeta - if in.ConfigMapRef != nil { - in, out := &in.ConfigMapRef, &out.ConfigMapRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + if in.ConfigMap != nil { + in, out := &in.ConfigMap, &out.ConfigMap + *out = new(ConfigMapNodeConfigSource) + **out = **in } return } @@ -2462,13 +2195,35 @@ func (in *NodeConfigSource) DeepCopy() *NodeConfigSource { return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeConfigSource) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NodeConfigStatus) DeepCopyInto(out *NodeConfigStatus) { + *out = *in + if in.Assigned != nil { + in, out := &in.Assigned, &out.Assigned + *out = new(NodeConfigSource) + (*in).DeepCopyInto(*out) + } + if in.Active != nil { + in, out := &in.Active, &out.Active + *out = new(NodeConfigSource) + (*in).DeepCopyInto(*out) + } + if in.LastKnownGood != nil { + in, out := &in.LastKnownGood, &out.LastKnownGood + *out = new(NodeConfigSource) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigStatus. +func (in *NodeConfigStatus) DeepCopy() *NodeConfigStatus { + if in == nil { return nil } + out := new(NodeConfigStatus) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2517,9 +2272,8 @@ func (in *NodeList) DeepCopy() *NodeList { func (in *NodeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2543,9 +2297,8 @@ func (in *NodeProxyOptions) DeepCopy() *NodeProxyOptions { func (in *NodeProxyOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2625,6 +2378,13 @@ func (in *NodeSelectorTerm) DeepCopyInto(out *NodeSelectorTerm) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.MatchFields != nil { + in, out := &in.MatchFields, &out.MatchFields + *out = make([]NodeSelectorRequirement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } @@ -2650,12 +2410,8 @@ func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { } if in.ConfigSource != nil { in, out := &in.ConfigSource, &out.ConfigSource - if *in == nil { - *out = nil - } else { - *out = new(NodeConfigSource) - (*in).DeepCopyInto(*out) - } + *out = new(NodeConfigSource) + (*in).DeepCopyInto(*out) } return } @@ -2718,6 +2474,11 @@ func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = make([]AttachedVolume, len(*in)) copy(*out, *in) } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = new(NodeConfigStatus) + (*in).DeepCopyInto(*out) + } return } @@ -2763,76 +2524,6 @@ func (in *ObjectFieldSelector) DeepCopy() *ObjectFieldSelector { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { - *out = *in - in.CreationTimestamp.DeepCopyInto(&out.CreationTimestamp) - if in.DeletionTimestamp != nil { - in, out := &in.DeletionTimestamp, &out.DeletionTimestamp - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } - } - if in.DeletionGracePeriodSeconds != nil { - in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.OwnerReferences != nil { - in, out := &in.OwnerReferences, &out.OwnerReferences - *out = make([]meta_v1.OwnerReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Initializers != nil { - in, out := &in.Initializers, &out.Initializers - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Initializers) - (*in).DeepCopyInto(*out) - } - } - if in.Finalizers != nil { - in, out := &in.Finalizers, &out.Finalizers - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta. -func (in *ObjectMeta) DeepCopy() *ObjectMeta { - if in == nil { - return nil - } - out := new(ObjectMeta) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { *out = *in @@ -2853,9 +2544,8 @@ func (in *ObjectReference) DeepCopy() *ObjectReference { func (in *ObjectReference) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2882,9 +2572,8 @@ func (in *PersistentVolume) DeepCopy() *PersistentVolume { func (in *PersistentVolume) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2911,9 +2600,8 @@ func (in *PersistentVolumeClaim) DeepCopy() *PersistentVolumeClaim { func (in *PersistentVolumeClaim) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2963,9 +2651,8 @@ func (in *PersistentVolumeClaimList) DeepCopy() *PersistentVolumeClaimList { func (in *PersistentVolumeClaimList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -2978,31 +2665,19 @@ func (in *PersistentVolumeClaimSpec) DeepCopyInto(out *PersistentVolumeClaimSpec } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Resources.DeepCopyInto(&out.Resources) if in.StorageClassName != nil { in, out := &in.StorageClassName, &out.StorageClassName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.VolumeMode != nil { in, out := &in.VolumeMode, &out.VolumeMode - if *in == nil { - *out = nil - } else { - *out = new(PersistentVolumeMode) - **out = **in - } + *out = new(PersistentVolumeMode) + **out = **in } return } @@ -3097,9 +2772,8 @@ func (in *PersistentVolumeList) DeepCopy() *PersistentVolumeList { func (in *PersistentVolumeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3107,201 +2781,113 @@ func (in *PersistentVolumeSource) DeepCopyInto(out *PersistentVolumeSource) { *out = *in if in.GCEPersistentDisk != nil { in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk - if *in == nil { - *out = nil - } else { - *out = new(GCEPersistentDiskVolumeSource) - **out = **in - } + *out = new(GCEPersistentDiskVolumeSource) + **out = **in } if in.AWSElasticBlockStore != nil { in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore - if *in == nil { - *out = nil - } else { - *out = new(AWSElasticBlockStoreVolumeSource) - **out = **in - } + *out = new(AWSElasticBlockStoreVolumeSource) + **out = **in } if in.HostPath != nil { in, out := &in.HostPath, &out.HostPath - if *in == nil { - *out = nil - } else { - *out = new(HostPathVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(HostPathVolumeSource) + (*in).DeepCopyInto(*out) } if in.Glusterfs != nil { in, out := &in.Glusterfs, &out.Glusterfs - if *in == nil { - *out = nil - } else { - *out = new(GlusterfsVolumeSource) - **out = **in - } + *out = new(GlusterfsVolumeSource) + **out = **in } if in.NFS != nil { in, out := &in.NFS, &out.NFS - if *in == nil { - *out = nil - } else { - *out = new(NFSVolumeSource) - **out = **in - } + *out = new(NFSVolumeSource) + **out = **in } if in.RBD != nil { in, out := &in.RBD, &out.RBD - if *in == nil { - *out = nil - } else { - *out = new(RBDPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(RBDPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.ISCSI != nil { in, out := &in.ISCSI, &out.ISCSI - if *in == nil { - *out = nil - } else { - *out = new(ISCSIPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(ISCSIPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.Cinder != nil { in, out := &in.Cinder, &out.Cinder - if *in == nil { - *out = nil - } else { - *out = new(CinderVolumeSource) - **out = **in - } + *out = new(CinderPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.CephFS != nil { in, out := &in.CephFS, &out.CephFS - if *in == nil { - *out = nil - } else { - *out = new(CephFSPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(CephFSPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.FC != nil { in, out := &in.FC, &out.FC - if *in == nil { - *out = nil - } else { - *out = new(FCVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(FCVolumeSource) + (*in).DeepCopyInto(*out) } if in.Flocker != nil { in, out := &in.Flocker, &out.Flocker - if *in == nil { - *out = nil - } else { - *out = new(FlockerVolumeSource) - **out = **in - } + *out = new(FlockerVolumeSource) + **out = **in } if in.FlexVolume != nil { in, out := &in.FlexVolume, &out.FlexVolume - if *in == nil { - *out = nil - } else { - *out = new(FlexPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(FlexPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.AzureFile != nil { in, out := &in.AzureFile, &out.AzureFile - if *in == nil { - *out = nil - } else { - *out = new(AzureFilePersistentVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(AzureFilePersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.VsphereVolume != nil { in, out := &in.VsphereVolume, &out.VsphereVolume - if *in == nil { - *out = nil - } else { - *out = new(VsphereVirtualDiskVolumeSource) - **out = **in - } + *out = new(VsphereVirtualDiskVolumeSource) + **out = **in } if in.Quobyte != nil { in, out := &in.Quobyte, &out.Quobyte - if *in == nil { - *out = nil - } else { - *out = new(QuobyteVolumeSource) - **out = **in - } + *out = new(QuobyteVolumeSource) + **out = **in } if in.AzureDisk != nil { in, out := &in.AzureDisk, &out.AzureDisk - if *in == nil { - *out = nil - } else { - *out = new(AzureDiskVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(AzureDiskVolumeSource) + (*in).DeepCopyInto(*out) } if in.PhotonPersistentDisk != nil { in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk - if *in == nil { - *out = nil - } else { - *out = new(PhotonPersistentDiskVolumeSource) - **out = **in - } + *out = new(PhotonPersistentDiskVolumeSource) + **out = **in } if in.PortworxVolume != nil { in, out := &in.PortworxVolume, &out.PortworxVolume - if *in == nil { - *out = nil - } else { - *out = new(PortworxVolumeSource) - **out = **in - } + *out = new(PortworxVolumeSource) + **out = **in } if in.ScaleIO != nil { in, out := &in.ScaleIO, &out.ScaleIO - if *in == nil { - *out = nil - } else { - *out = new(ScaleIOPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(ScaleIOPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.Local != nil { in, out := &in.Local, &out.Local - if *in == nil { - *out = nil - } else { - *out = new(LocalVolumeSource) - **out = **in - } + *out = new(LocalVolumeSource) + **out = **in } if in.StorageOS != nil { in, out := &in.StorageOS, &out.StorageOS - if *in == nil { - *out = nil - } else { - *out = new(StorageOSPersistentVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(StorageOSPersistentVolumeSource) + (*in).DeepCopyInto(*out) } if in.CSI != nil { in, out := &in.CSI, &out.CSI - if *in == nil { - *out = nil - } else { - *out = new(CSIPersistentVolumeSource) - **out = **in - } + *out = new(CSIPersistentVolumeSource) + (*in).DeepCopyInto(*out) } return } @@ -3334,12 +2920,8 @@ func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) { } if in.ClaimRef != nil { in, out := &in.ClaimRef, &out.ClaimRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + *out = new(ObjectReference) + **out = **in } if in.MountOptions != nil { in, out := &in.MountOptions, &out.MountOptions @@ -3348,12 +2930,13 @@ func (in *PersistentVolumeSpec) DeepCopyInto(out *PersistentVolumeSpec) { } if in.VolumeMode != nil { in, out := &in.VolumeMode, &out.VolumeMode - if *in == nil { - *out = nil - } else { - *out = new(PersistentVolumeMode) - **out = **in - } + *out = new(PersistentVolumeMode) + **out = **in + } + if in.NodeAffinity != nil { + in, out := &in.NodeAffinity, &out.NodeAffinity + *out = new(VolumeNodeAffinity) + (*in).DeepCopyInto(*out) } return } @@ -3424,9 +3007,8 @@ func (in *Pod) DeepCopy() *Pod { func (in *Pod) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3464,12 +3046,8 @@ func (in *PodAffinityTerm) DeepCopyInto(out *PodAffinityTerm) { *out = *in if in.LabelSelector != nil { in, out := &in.LabelSelector, &out.LabelSelector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } if in.Namespaces != nil { in, out := &in.Namespaces, &out.Namespaces @@ -3540,9 +3118,8 @@ func (in *PodAttachOptions) DeepCopy() *PodAttachOptions { func (in *PodAttachOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3601,12 +3178,8 @@ func (in *PodDNSConfigOption) DeepCopyInto(out *PodDNSConfigOption) { *out = *in if in.Value != nil { in, out := &in.Value, &out.Value - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -3647,9 +3220,8 @@ func (in *PodExecOptions) DeepCopy() *PodExecOptions { func (in *PodExecOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3681,9 +3253,8 @@ func (in *PodList) DeepCopy() *PodList { func (in *PodList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3692,39 +3263,22 @@ func (in *PodLogOptions) DeepCopyInto(out *PodLogOptions) { out.TypeMeta = in.TypeMeta if in.SinceSeconds != nil { in, out := &in.SinceSeconds, &out.SinceSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.SinceTime != nil { in, out := &in.SinceTime, &out.SinceTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.TailLines != nil { in, out := &in.TailLines, &out.TailLines - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.LimitBytes != nil { in, out := &in.LimitBytes, &out.LimitBytes - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } return } @@ -3743,9 +3297,8 @@ func (in *PodLogOptions) DeepCopy() *PodLogOptions { func (in *PodLogOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3774,9 +3327,8 @@ func (in *PodPortForwardOptions) DeepCopy() *PodPortForwardOptions { func (in *PodPortForwardOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3800,9 +3352,24 @@ func (in *PodProxyOptions) DeepCopy() *PodProxyOptions { func (in *PodProxyOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodReadinessGate) DeepCopyInto(out *PodReadinessGate) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodReadinessGate. +func (in *PodReadinessGate) DeepCopy() *PodReadinessGate { + if in == nil { return nil } + out := new(PodReadinessGate) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -3810,30 +3377,23 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { *out = *in if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions - if *in == nil { - *out = nil - } else { - *out = new(SELinuxOptions) - **out = **in - } + *out = new(SELinuxOptions) + **out = **in } if in.RunAsUser != nil { in, out := &in.RunAsUser, &out.RunAsUser - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in + } + if in.RunAsGroup != nil { + in, out := &in.RunAsGroup, &out.RunAsGroup + *out = new(int64) + **out = **in } if in.RunAsNonRoot != nil { in, out := &in.RunAsNonRoot, &out.RunAsNonRoot - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.SupplementalGroups != nil { in, out := &in.SupplementalGroups, &out.SupplementalGroups @@ -3842,12 +3402,13 @@ func (in *PodSecurityContext) DeepCopyInto(out *PodSecurityContext) { } if in.FSGroup != nil { in, out := &in.FSGroup, &out.FSGroup - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in + } + if in.Sysctls != nil { + in, out := &in.Sysctls, &out.Sysctls + *out = make([]Sysctl, len(*in)) + copy(*out, *in) } return } @@ -3867,12 +3428,8 @@ func (in *PodSignature) DeepCopyInto(out *PodSignature) { *out = *in if in.PodController != nil { in, out := &in.PodController, &out.PodController - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.OwnerReference) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.OwnerReference) + (*in).DeepCopyInto(*out) } return } @@ -3913,21 +3470,13 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { } if in.TerminationGracePeriodSeconds != nil { in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.ActiveDeadlineSeconds != nil { in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector @@ -3938,21 +3487,18 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { } if in.AutomountServiceAccountToken != nil { in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in + } + if in.ShareProcessNamespace != nil { + in, out := &in.ShareProcessNamespace, &out.ShareProcessNamespace + *out = new(bool) + **out = **in } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext - if *in == nil { - *out = nil - } else { - *out = new(PodSecurityContext) - (*in).DeepCopyInto(*out) - } + *out = new(PodSecurityContext) + (*in).DeepCopyInto(*out) } if in.ImagePullSecrets != nil { in, out := &in.ImagePullSecrets, &out.ImagePullSecrets @@ -3961,12 +3507,8 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { } if in.Affinity != nil { in, out := &in.Affinity, &out.Affinity - if *in == nil { - *out = nil - } else { - *out = new(Affinity) - (*in).DeepCopyInto(*out) - } + *out = new(Affinity) + (*in).DeepCopyInto(*out) } if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations @@ -3984,21 +3526,23 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { } if in.Priority != nil { in, out := &in.Priority, &out.Priority - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.DNSConfig != nil { in, out := &in.DNSConfig, &out.DNSConfig - if *in == nil { - *out = nil - } else { - *out = new(PodDNSConfig) - (*in).DeepCopyInto(*out) - } + *out = new(PodDNSConfig) + (*in).DeepCopyInto(*out) + } + if in.ReadinessGates != nil { + in, out := &in.ReadinessGates, &out.ReadinessGates + *out = make([]PodReadinessGate, len(*in)) + copy(*out, *in) + } + if in.RuntimeClassName != nil { + in, out := &in.RuntimeClassName, &out.RuntimeClassName + *out = new(string) + **out = **in } return } @@ -4025,12 +3569,7 @@ func (in *PodStatus) DeepCopyInto(out *PodStatus) { } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.InitContainerStatuses != nil { in, out := &in.InitContainerStatuses, &out.InitContainerStatuses @@ -4082,9 +3621,8 @@ func (in *PodStatusResult) DeepCopy() *PodStatusResult { func (in *PodStatusResult) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4110,9 +3648,8 @@ func (in *PodTemplate) DeepCopy() *PodTemplate { func (in *PodTemplate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4144,9 +3681,8 @@ func (in *PodTemplateList) DeepCopy() *PodTemplateList { func (in *PodTemplateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4188,12 +3724,8 @@ func (in *Preconditions) DeepCopyInto(out *Preconditions) { *out = *in if in.UID != nil { in, out := &in.UID, &out.UID - if *in == nil { - *out = nil - } else { - *out = new(types.UID) - **out = **in - } + *out = new(types.UID) + **out = **in } return } @@ -4272,12 +3804,8 @@ func (in *ProjectedVolumeSource) DeepCopyInto(out *ProjectedVolumeSource) { } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -4318,12 +3846,8 @@ func (in *RBDPersistentVolumeSource) DeepCopyInto(out *RBDPersistentVolumeSource } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(SecretReference) - **out = **in - } + *out = new(SecretReference) + **out = **in } return } @@ -4348,12 +3872,8 @@ func (in *RBDVolumeSource) DeepCopyInto(out *RBDVolumeSource) { } if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(LocalObjectReference) - **out = **in - } + *out = new(LocalObjectReference) + **out = **in } return } @@ -4395,9 +3915,8 @@ func (in *RangeAllocation) DeepCopy() *RangeAllocation { func (in *RangeAllocation) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4424,9 +3943,8 @@ func (in *ReplicationController) DeepCopy() *ReplicationController { func (in *ReplicationController) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4475,9 +3993,8 @@ func (in *ReplicationControllerList) DeepCopy() *ReplicationControllerList { func (in *ReplicationControllerList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4485,12 +4002,8 @@ func (in *ReplicationControllerSpec) DeepCopyInto(out *ReplicationControllerSpec *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector @@ -4501,12 +4014,8 @@ func (in *ReplicationControllerSpec) DeepCopyInto(out *ReplicationControllerSpec } if in.Template != nil { in, out := &in.Template, &out.Template - if *in == nil { - *out = nil - } else { - *out = new(PodTemplateSpec) - (*in).DeepCopyInto(*out) - } + *out = new(PodTemplateSpec) + (*in).DeepCopyInto(*out) } return } @@ -4561,6 +4070,28 @@ func (in *ResourceFieldSelector) DeepCopy() *ResourceFieldSelector { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ResourceList) DeepCopyInto(out *ResourceList) { + { + in := &in + *out = make(ResourceList, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList. +func (in ResourceList) DeepCopy() ResourceList { + if in == nil { + return nil + } + out := new(ResourceList) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceQuota) DeepCopyInto(out *ResourceQuota) { *out = *in @@ -4585,9 +4116,8 @@ func (in *ResourceQuota) DeepCopy() *ResourceQuota { func (in *ResourceQuota) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4619,9 +4149,8 @@ func (in *ResourceQuotaList) DeepCopy() *ResourceQuotaList { func (in *ResourceQuotaList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4639,6 +4168,11 @@ func (in *ResourceQuotaSpec) DeepCopyInto(out *ResourceQuotaSpec) { *out = make([]ResourceQuotaScope, len(*in)) copy(*out, *in) } + if in.ScopeSelector != nil { + in, out := &in.ScopeSelector, &out.ScopeSelector + *out = new(ScopeSelector) + (*in).DeepCopyInto(*out) + } return } @@ -4733,12 +4267,8 @@ func (in *ScaleIOPersistentVolumeSource) DeepCopyInto(out *ScaleIOPersistentVolu *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(SecretReference) - **out = **in - } + *out = new(SecretReference) + **out = **in } return } @@ -4758,12 +4288,8 @@ func (in *ScaleIOVolumeSource) DeepCopyInto(out *ScaleIOVolumeSource) { *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(LocalObjectReference) - **out = **in - } + *out = new(LocalObjectReference) + **out = **in } return } @@ -4778,6 +4304,50 @@ func (in *ScaleIOVolumeSource) DeepCopy() *ScaleIOVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ScopeSelector) DeepCopyInto(out *ScopeSelector) { + *out = *in + if in.MatchExpressions != nil { + in, out := &in.MatchExpressions, &out.MatchExpressions + *out = make([]ScopedResourceSelectorRequirement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeSelector. +func (in *ScopeSelector) DeepCopy() *ScopeSelector { + if in == nil { + return nil + } + out := new(ScopeSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ScopedResourceSelectorRequirement) DeepCopyInto(out *ScopedResourceSelectorRequirement) { + *out = *in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopedResourceSelectorRequirement. +func (in *ScopedResourceSelectorRequirement) DeepCopy() *ScopedResourceSelectorRequirement { + if in == nil { + return nil + } + out := new(ScopedResourceSelectorRequirement) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Secret) DeepCopyInto(out *Secret) { *out = *in @@ -4787,12 +4357,15 @@ func (in *Secret) DeepCopyInto(out *Secret) { in, out := &in.Data, &out.Data *out = make(map[string][]byte, len(*in)) for key, val := range *in { + var outVal []byte if val == nil { (*out)[key] = nil } else { - (*out)[key] = make([]byte, len(val)) - copy((*out)[key], val) + in, out := &val, &outVal + *out = make([]byte, len(*in)) + copy(*out, *in) } + (*out)[key] = outVal } } if in.StringData != nil { @@ -4819,9 +4392,8 @@ func (in *Secret) DeepCopy() *Secret { func (in *Secret) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4830,12 +4402,8 @@ func (in *SecretEnvSource) DeepCopyInto(out *SecretEnvSource) { out.LocalObjectReference = in.LocalObjectReference if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -4856,12 +4424,8 @@ func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) { out.LocalObjectReference = in.LocalObjectReference if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -4905,9 +4469,8 @@ func (in *SecretList) DeepCopy() *SecretList { func (in *SecretList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -4923,12 +4486,8 @@ func (in *SecretProjection) DeepCopyInto(out *SecretProjection) { } if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -4971,21 +4530,13 @@ func (in *SecretVolumeSource) DeepCopyInto(out *SecretVolumeSource) { } if in.DefaultMode != nil { in, out := &in.DefaultMode, &out.DefaultMode - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Optional != nil { in, out := &in.Optional, &out.Optional - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -5005,66 +4556,43 @@ func (in *SecurityContext) DeepCopyInto(out *SecurityContext) { *out = *in if in.Capabilities != nil { in, out := &in.Capabilities, &out.Capabilities - if *in == nil { - *out = nil - } else { - *out = new(Capabilities) - (*in).DeepCopyInto(*out) - } + *out = new(Capabilities) + (*in).DeepCopyInto(*out) } if in.Privileged != nil { in, out := &in.Privileged, &out.Privileged - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions - if *in == nil { - *out = nil - } else { - *out = new(SELinuxOptions) - **out = **in - } + *out = new(SELinuxOptions) + **out = **in } if in.RunAsUser != nil { in, out := &in.RunAsUser, &out.RunAsUser - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in + } + if in.RunAsGroup != nil { + in, out := &in.RunAsGroup, &out.RunAsGroup + *out = new(int64) + **out = **in } if in.RunAsNonRoot != nil { in, out := &in.RunAsNonRoot, &out.RunAsNonRoot - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.ReadOnlyRootFilesystem != nil { in, out := &in.ReadOnlyRootFilesystem, &out.ReadOnlyRootFilesystem - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.AllowPrivilegeEscalation != nil { in, out := &in.AllowPrivilegeEscalation, &out.AllowPrivilegeEscalation - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -5101,9 +4629,8 @@ func (in *SerializedReference) DeepCopy() *SerializedReference { func (in *SerializedReference) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -5130,9 +4657,8 @@ func (in *Service) DeepCopy() *Service { func (in *Service) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -5152,12 +4678,8 @@ func (in *ServiceAccount) DeepCopyInto(out *ServiceAccount) { } if in.AutomountServiceAccountToken != nil { in, out := &in.AutomountServiceAccountToken, &out.AutomountServiceAccountToken - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -5176,9 +4698,8 @@ func (in *ServiceAccount) DeepCopy() *ServiceAccount { func (in *ServiceAccount) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -5210,9 +4731,29 @@ func (in *ServiceAccountList) DeepCopy() *ServiceAccountList { func (in *ServiceAccountList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceAccountTokenProjection) DeepCopyInto(out *ServiceAccountTokenProjection) { + *out = *in + if in.ExpirationSeconds != nil { + in, out := &in.ExpirationSeconds, &out.ExpirationSeconds + *out = new(int64) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountTokenProjection. +func (in *ServiceAccountTokenProjection) DeepCopy() *ServiceAccountTokenProjection { + if in == nil { return nil } + out := new(ServiceAccountTokenProjection) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -5244,9 +4785,8 @@ func (in *ServiceList) DeepCopy() *ServiceList { func (in *ServiceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -5287,9 +4827,8 @@ func (in *ServiceProxyOptions) DeepCopy() *ServiceProxyOptions { func (in *ServiceProxyOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -5319,12 +4858,8 @@ func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec) { } if in.SessionAffinityConfig != nil { in, out := &in.SessionAffinityConfig, &out.SessionAffinityConfig - if *in == nil { - *out = nil - } else { - *out = new(SessionAffinityConfig) - (*in).DeepCopyInto(*out) - } + *out = new(SessionAffinityConfig) + (*in).DeepCopyInto(*out) } return } @@ -5361,12 +4896,8 @@ func (in *SessionAffinityConfig) DeepCopyInto(out *SessionAffinityConfig) { *out = *in if in.ClientIP != nil { in, out := &in.ClientIP, &out.ClientIP - if *in == nil { - *out = nil - } else { - *out = new(ClientIPConfig) - (*in).DeepCopyInto(*out) - } + *out = new(ClientIPConfig) + (*in).DeepCopyInto(*out) } return } @@ -5386,12 +4917,8 @@ func (in *StorageOSPersistentVolumeSource) DeepCopyInto(out *StorageOSPersistent *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + *out = new(ObjectReference) + **out = **in } return } @@ -5411,12 +4938,8 @@ func (in *StorageOSVolumeSource) DeepCopyInto(out *StorageOSVolumeSource) { *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef - if *in == nil { - *out = nil - } else { - *out = new(LocalObjectReference) - **out = **in - } + *out = new(LocalObjectReference) + **out = **in } return } @@ -5469,12 +4992,7 @@ func (in *Taint) DeepCopyInto(out *Taint) { *out = *in if in.TimeAdded != nil { in, out := &in.TimeAdded, &out.TimeAdded - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -5494,12 +5012,8 @@ func (in *Toleration) DeepCopyInto(out *Toleration) { *out = *in if in.TolerationSeconds != nil { in, out := &in.TolerationSeconds, &out.TolerationSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } return } @@ -5514,6 +5028,50 @@ func (in *Toleration) DeepCopy() *Toleration { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopologySelectorLabelRequirement) DeepCopyInto(out *TopologySelectorLabelRequirement) { + *out = *in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySelectorLabelRequirement. +func (in *TopologySelectorLabelRequirement) DeepCopy() *TopologySelectorLabelRequirement { + if in == nil { + return nil + } + out := new(TopologySelectorLabelRequirement) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TopologySelectorTerm) DeepCopyInto(out *TopologySelectorTerm) { + *out = *in + if in.MatchLabelExpressions != nil { + in, out := &in.MatchLabelExpressions, &out.MatchLabelExpressions + *out = make([]TopologySelectorLabelRequirement, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologySelectorTerm. +func (in *TopologySelectorTerm) DeepCopy() *TopologySelectorTerm { + if in == nil { + return nil + } + out := new(TopologySelectorTerm) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Volume) DeepCopyInto(out *Volume) { *out = *in @@ -5552,12 +5110,8 @@ func (in *VolumeMount) DeepCopyInto(out *VolumeMount) { *out = *in if in.MountPropagation != nil { in, out := &in.MountPropagation, &out.MountPropagation - if *in == nil { - *out = nil - } else { - *out = new(MountPropagationMode) - **out = **in - } + *out = new(MountPropagationMode) + **out = **in } return } @@ -5572,35 +5126,49 @@ func (in *VolumeMount) DeepCopy() *VolumeMount { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VolumeNodeAffinity) DeepCopyInto(out *VolumeNodeAffinity) { + *out = *in + if in.Required != nil { + in, out := &in.Required, &out.Required + *out = new(NodeSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeNodeAffinity. +func (in *VolumeNodeAffinity) DeepCopy() *VolumeNodeAffinity { + if in == nil { + return nil + } + out := new(VolumeNodeAffinity) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *VolumeProjection) DeepCopyInto(out *VolumeProjection) { *out = *in if in.Secret != nil { in, out := &in.Secret, &out.Secret - if *in == nil { - *out = nil - } else { - *out = new(SecretProjection) - (*in).DeepCopyInto(*out) - } + *out = new(SecretProjection) + (*in).DeepCopyInto(*out) } if in.DownwardAPI != nil { in, out := &in.DownwardAPI, &out.DownwardAPI - if *in == nil { - *out = nil - } else { - *out = new(DownwardAPIProjection) - (*in).DeepCopyInto(*out) - } + *out = new(DownwardAPIProjection) + (*in).DeepCopyInto(*out) } if in.ConfigMap != nil { in, out := &in.ConfigMap, &out.ConfigMap - if *in == nil { - *out = nil - } else { - *out = new(ConfigMapProjection) - (*in).DeepCopyInto(*out) - } + *out = new(ConfigMapProjection) + (*in).DeepCopyInto(*out) + } + if in.ServiceAccountToken != nil { + in, out := &in.ServiceAccountToken, &out.ServiceAccountToken + *out = new(ServiceAccountTokenProjection) + (*in).DeepCopyInto(*out) } return } @@ -5620,246 +5188,138 @@ func (in *VolumeSource) DeepCopyInto(out *VolumeSource) { *out = *in if in.HostPath != nil { in, out := &in.HostPath, &out.HostPath - if *in == nil { - *out = nil - } else { - *out = new(HostPathVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(HostPathVolumeSource) + (*in).DeepCopyInto(*out) } if in.EmptyDir != nil { in, out := &in.EmptyDir, &out.EmptyDir - if *in == nil { - *out = nil - } else { - *out = new(EmptyDirVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(EmptyDirVolumeSource) + (*in).DeepCopyInto(*out) } if in.GCEPersistentDisk != nil { in, out := &in.GCEPersistentDisk, &out.GCEPersistentDisk - if *in == nil { - *out = nil - } else { - *out = new(GCEPersistentDiskVolumeSource) - **out = **in - } + *out = new(GCEPersistentDiskVolumeSource) + **out = **in } if in.AWSElasticBlockStore != nil { in, out := &in.AWSElasticBlockStore, &out.AWSElasticBlockStore - if *in == nil { - *out = nil - } else { - *out = new(AWSElasticBlockStoreVolumeSource) - **out = **in - } + *out = new(AWSElasticBlockStoreVolumeSource) + **out = **in } if in.GitRepo != nil { in, out := &in.GitRepo, &out.GitRepo - if *in == nil { - *out = nil - } else { - *out = new(GitRepoVolumeSource) - **out = **in - } + *out = new(GitRepoVolumeSource) + **out = **in } if in.Secret != nil { in, out := &in.Secret, &out.Secret - if *in == nil { - *out = nil - } else { - *out = new(SecretVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(SecretVolumeSource) + (*in).DeepCopyInto(*out) } if in.NFS != nil { in, out := &in.NFS, &out.NFS - if *in == nil { - *out = nil - } else { - *out = new(NFSVolumeSource) - **out = **in - } + *out = new(NFSVolumeSource) + **out = **in } if in.ISCSI != nil { in, out := &in.ISCSI, &out.ISCSI - if *in == nil { - *out = nil - } else { - *out = new(ISCSIVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(ISCSIVolumeSource) + (*in).DeepCopyInto(*out) } if in.Glusterfs != nil { in, out := &in.Glusterfs, &out.Glusterfs - if *in == nil { - *out = nil - } else { - *out = new(GlusterfsVolumeSource) - **out = **in - } + *out = new(GlusterfsVolumeSource) + **out = **in } if in.PersistentVolumeClaim != nil { in, out := &in.PersistentVolumeClaim, &out.PersistentVolumeClaim - if *in == nil { - *out = nil - } else { - *out = new(PersistentVolumeClaimVolumeSource) - **out = **in - } + *out = new(PersistentVolumeClaimVolumeSource) + **out = **in } if in.RBD != nil { in, out := &in.RBD, &out.RBD - if *in == nil { - *out = nil - } else { - *out = new(RBDVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(RBDVolumeSource) + (*in).DeepCopyInto(*out) } if in.FlexVolume != nil { in, out := &in.FlexVolume, &out.FlexVolume - if *in == nil { - *out = nil - } else { - *out = new(FlexVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(FlexVolumeSource) + (*in).DeepCopyInto(*out) } if in.Cinder != nil { in, out := &in.Cinder, &out.Cinder - if *in == nil { - *out = nil - } else { - *out = new(CinderVolumeSource) - **out = **in - } + *out = new(CinderVolumeSource) + (*in).DeepCopyInto(*out) } if in.CephFS != nil { in, out := &in.CephFS, &out.CephFS - if *in == nil { - *out = nil - } else { - *out = new(CephFSVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(CephFSVolumeSource) + (*in).DeepCopyInto(*out) } if in.Flocker != nil { in, out := &in.Flocker, &out.Flocker - if *in == nil { - *out = nil - } else { - *out = new(FlockerVolumeSource) - **out = **in - } + *out = new(FlockerVolumeSource) + **out = **in } if in.DownwardAPI != nil { in, out := &in.DownwardAPI, &out.DownwardAPI - if *in == nil { - *out = nil - } else { - *out = new(DownwardAPIVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(DownwardAPIVolumeSource) + (*in).DeepCopyInto(*out) } if in.FC != nil { in, out := &in.FC, &out.FC - if *in == nil { - *out = nil - } else { - *out = new(FCVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(FCVolumeSource) + (*in).DeepCopyInto(*out) } if in.AzureFile != nil { in, out := &in.AzureFile, &out.AzureFile - if *in == nil { - *out = nil - } else { - *out = new(AzureFileVolumeSource) - **out = **in - } + *out = new(AzureFileVolumeSource) + **out = **in } if in.ConfigMap != nil { in, out := &in.ConfigMap, &out.ConfigMap - if *in == nil { - *out = nil - } else { - *out = new(ConfigMapVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(ConfigMapVolumeSource) + (*in).DeepCopyInto(*out) } if in.VsphereVolume != nil { in, out := &in.VsphereVolume, &out.VsphereVolume - if *in == nil { - *out = nil - } else { - *out = new(VsphereVirtualDiskVolumeSource) - **out = **in - } + *out = new(VsphereVirtualDiskVolumeSource) + **out = **in } if in.Quobyte != nil { in, out := &in.Quobyte, &out.Quobyte - if *in == nil { - *out = nil - } else { - *out = new(QuobyteVolumeSource) - **out = **in - } + *out = new(QuobyteVolumeSource) + **out = **in } if in.AzureDisk != nil { in, out := &in.AzureDisk, &out.AzureDisk - if *in == nil { - *out = nil - } else { - *out = new(AzureDiskVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(AzureDiskVolumeSource) + (*in).DeepCopyInto(*out) } if in.PhotonPersistentDisk != nil { in, out := &in.PhotonPersistentDisk, &out.PhotonPersistentDisk - if *in == nil { - *out = nil - } else { - *out = new(PhotonPersistentDiskVolumeSource) - **out = **in - } + *out = new(PhotonPersistentDiskVolumeSource) + **out = **in } if in.Projected != nil { in, out := &in.Projected, &out.Projected - if *in == nil { - *out = nil - } else { - *out = new(ProjectedVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(ProjectedVolumeSource) + (*in).DeepCopyInto(*out) } if in.PortworxVolume != nil { in, out := &in.PortworxVolume, &out.PortworxVolume - if *in == nil { - *out = nil - } else { - *out = new(PortworxVolumeSource) - **out = **in - } + *out = new(PortworxVolumeSource) + **out = **in } if in.ScaleIO != nil { in, out := &in.ScaleIO, &out.ScaleIO - if *in == nil { - *out = nil - } else { - *out = new(ScaleIOVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(ScaleIOVolumeSource) + (*in).DeepCopyInto(*out) } if in.StorageOS != nil { in, out := &in.StorageOS, &out.StorageOS - if *in == nil { - *out = nil - } else { - *out = new(StorageOSVolumeSource) - (*in).DeepCopyInto(*out) - } + *out = new(StorageOSVolumeSource) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/api/events/v1beta1/BUILD b/deps/k8s.io/api/events/v1beta1/BUILD deleted file mode 100644 index 851874e78..000000000 --- a/deps/k8s.io/api/events/v1beta1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/events/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/events/v1beta1/generated.pb.go b/deps/k8s.io/api/events/v1beta1/generated.pb.go index 9aac8420f..e24a82ab1 100644 --- a/deps/k8s.io/api/events/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/events/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1251,56 +1251,56 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 814 bytes of a gzipped FileDescriptorProto + // 801 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x16, 0x13, 0x4b, 0xb6, 0x56, 0x49, 0x2c, 0x6f, 0x0e, 0xde, 0xb8, 0x00, 0xa5, 0x3a, 0x40, - 0x60, 0x14, 0x08, 0x59, 0xa7, 0x45, 0xdb, 0x6b, 0x18, 0xbb, 0x45, 0x02, 0xbb, 0x01, 0xd6, 0x3e, - 0x15, 0x3d, 0x64, 0x45, 0x4d, 0xe8, 0xad, 0xa5, 0x5d, 0x62, 0x77, 0x29, 0xc0, 0xb7, 0x5e, 0x0a, - 0xf4, 0xd8, 0x67, 0xe8, 0x13, 0xf4, 0x31, 0x7c, 0xcc, 0x31, 0x27, 0xa1, 0x66, 0xdf, 0xa2, 0xa7, - 0x82, 0xcb, 0x95, 0x28, 0x8b, 0x16, 0xec, 0x22, 0x37, 0x72, 0xe6, 0xfb, 0x99, 0x19, 0x0e, 0x07, - 0x45, 0xe7, 0xdf, 0xe9, 0x80, 0xcb, 0xf0, 0x3c, 0x1b, 0x80, 0x12, 0x60, 0x40, 0x87, 0x13, 0x10, - 0x43, 0xa9, 0x42, 0x97, 0x60, 0x29, 0x0f, 0x61, 0x02, 0xc2, 0xe8, 0x70, 0xb2, 0x3f, 0x00, 0xc3, - 0xf6, 0xc3, 0x04, 0x04, 0x28, 0x66, 0x60, 0x18, 0xa4, 0x4a, 0x1a, 0x89, 0x9f, 0x94, 0xd0, 0x80, - 0xa5, 0x3c, 0x28, 0xa1, 0x81, 0x83, 0xee, 0x3c, 0x4f, 0xb8, 0x39, 0xcb, 0x06, 0x41, 0x2c, 0xc7, - 0x61, 0x22, 0x13, 0x19, 0x5a, 0xc6, 0x20, 0x7b, 0x6f, 0xdf, 0xec, 0x8b, 0x7d, 0x2a, 0x95, 0x76, - 0x76, 0x17, 0x4c, 0x63, 0xa9, 0x20, 0x9c, 0xd4, 0xdc, 0x76, 0xbe, 0xae, 0x30, 0x63, 0x16, 0x9f, - 0x71, 0x01, 0xea, 0x22, 0x4c, 0xcf, 0x93, 0x22, 0xa0, 0xc3, 0x31, 0x18, 0x76, 0x13, 0x2b, 0x5c, - 0xc5, 0x52, 0x99, 0x30, 0x7c, 0x0c, 0x35, 0xc2, 0x37, 0xb7, 0x11, 0x74, 0x7c, 0x06, 0x63, 0x56, - 0xe3, 0x7d, 0xb5, 0x8a, 0x97, 0x19, 0x3e, 0x0a, 0xb9, 0x30, 0xda, 0xa8, 0x65, 0xd2, 0xee, 0x9f, - 0x6d, 0xd4, 0x3c, 0x2c, 0x26, 0x87, 0xdf, 0xa1, 0x8d, 0xa2, 0x85, 0x21, 0x33, 0x8c, 0x78, 0x7d, - 0x6f, 0xaf, 0xf3, 0xe2, 0xcb, 0xa0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, + 0x5d, 0xe4, 0xc1, 0x7f, 0x66, 0xed, 0xd6, 0x52, 0x23, 0x26, 0x46, 0x0b, 0x7c, 0xf0, 0xfc, 0xe6, + 0xd6, 0xad, 0x7c, 0xb8, 0x75, 0x2b, 0x1f, 0x6f, 0xdd, 0xca, 0x2f, 0x99, 0xeb, 0xdc, 0x64, 0xae, + 0xf3, 0x21, 0x73, 0x9d, 0x8f, 0x99, 0xeb, 0xfc, 0x95, 0xb9, 0xce, 0xef, 0x7f, 0xbb, 0x95, 0x1f, + 0xeb, 0x76, 0x5e, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x25, 0x9b, 0x14, 0x4d, 0xbd, 0x07, 0x00, + 0x00, } diff --git a/deps/k8s.io/api/events/v1beta1/generated.proto b/deps/k8s.io/api/events/v1beta1/generated.proto index 0637f780a..b3e565e67 100644 --- a/deps/k8s.io/api/events/v1beta1/generated.proto +++ b/deps/k8s.io/api/events/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; diff --git a/deps/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go index 17ec3d777..a15672c19 100644 --- a/deps/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/events/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Event = map[string]string{ "": "Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.", "eventTime": "Required. Time when this Event was first observed.", diff --git a/deps/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go index 626feacf0..e52e142c6 100644 --- a/deps/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/events/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -33,22 +33,14 @@ func (in *Event) DeepCopyInto(out *Event) { in.EventTime.DeepCopyInto(&out.EventTime) if in.Series != nil { in, out := &in.Series, &out.Series - if *in == nil { - *out = nil - } else { - *out = new(EventSeries) - (*in).DeepCopyInto(*out) - } + *out = new(EventSeries) + (*in).DeepCopyInto(*out) } out.Regarding = in.Regarding if in.Related != nil { in, out := &in.Related, &out.Related - if *in == nil { - *out = nil - } else { - *out = new(v1.ObjectReference) - **out = **in - } + *out = new(v1.ObjectReference) + **out = **in } out.DeprecatedSource = in.DeprecatedSource in.DeprecatedFirstTimestamp.DeepCopyInto(&out.DeprecatedFirstTimestamp) @@ -70,9 +62,8 @@ func (in *Event) DeepCopy() *Event { func (in *Event) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -104,9 +95,8 @@ func (in *EventList) DeepCopy() *EventList { func (in *EventList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/extensions/v1beta1/BUILD b/deps/k8s.io/api/extensions/v1beta1/BUILD deleted file mode 100644 index 360ad999c..000000000 --- a/deps/k8s.io/api/extensions/v1beta1/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/extensions/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/extensions/v1beta1/generated.pb.go b/deps/k8s.io/api/extensions/v1beta1/generated.pb.go index fcb80615f..9d76a5b93 100644 --- a/deps/k8s.io/api/extensions/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/extensions/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -465,6 +465,14 @@ func (m *AllowedHostPath) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.PathPrefix))) i += copy(dAtA[i:], m.PathPrefix) + dAtA[i] = 0x10 + i++ + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ return i, nil } @@ -2249,6 +2257,40 @@ func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) { i += n } } + if len(m.AllowedUnsafeSysctls) > 0 { + for _, s := range m.AllowedUnsafeSysctls { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + 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 len(m.ForbiddenSysctls) > 0 { + for _, s := range m.ForbiddenSysctls { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + 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) + } + } return i, nil } @@ -2818,6 +2860,7 @@ func (m *AllowedHostPath) Size() (n int) { _ = l l = len(m.PathPrefix) n += 1 + l + sovGenerated(uint64(l)) + n += 2 return n } @@ -3457,6 +3500,18 @@ func (m *PodSecurityPolicySpec) Size() (n int) { n += 2 + l + sovGenerated(uint64(l)) } } + if len(m.AllowedUnsafeSysctls) > 0 { + for _, s := range m.AllowedUnsafeSysctls { + l = len(s) + n += 2 + l + sovGenerated(uint64(l)) + } + } + if len(m.ForbiddenSysctls) > 0 { + for _, s := range m.ForbiddenSysctls { + l = len(s) + n += 2 + l + sovGenerated(uint64(l)) + } + } return n } @@ -3677,6 +3732,7 @@ func (this *AllowedHostPath) String() string { } s := strings.Join([]string{`&AllowedHostPath{`, `PathPrefix:` + fmt.Sprintf("%v", this.PathPrefix) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, `}`, }, "") return s @@ -4189,6 +4245,8 @@ func (this *PodSecurityPolicySpec) String() string { `AllowPrivilegeEscalation:` + valueToStringGenerated(this.AllowPrivilegeEscalation) + `,`, `AllowedHostPaths:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedHostPaths), "AllowedHostPath", "AllowedHostPath", 1), `&`, ``, 1) + `,`, `AllowedFlexVolumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedFlexVolumes), "AllowedFlexVolume", "AllowedFlexVolume", 1), `&`, ``, 1) + `,`, + `AllowedUnsafeSysctls:` + fmt.Sprintf("%v", this.AllowedUnsafeSysctls) + `,`, + `ForbiddenSysctls:` + fmt.Sprintf("%v", this.ForbiddenSysctls) + `,`, `}`, }, "") return s @@ -4520,6 +4578,26 @@ func (m *AllowedHostPath) Unmarshal(dAtA []byte) error { } m.PathPrefix = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -10306,6 +10384,64 @@ func (m *PodSecurityPolicySpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedUnsafeSysctls", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedUnsafeSysctls = append(m.AllowedUnsafeSysctls, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForbiddenSysctls", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForbiddenSysctls = append(m.ForbiddenSysctls, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -12285,229 +12421,232 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 3571 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x1c, 0x47, - 0x76, 0x57, 0xcf, 0x0c, 0x39, 0xc3, 0x47, 0xf1, 0xab, 0x28, 0x93, 0x63, 0xca, 0xe2, 0xc8, 0x6d, - 0x40, 0x91, 0x1c, 0x69, 0xc6, 0x92, 0x2d, 0x59, 0xb1, 0x10, 0x3b, 0x1c, 0x52, 0x1f, 0x74, 0xf8, - 0xa5, 0x1a, 0x52, 0x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1, 0x64, 0x7b, 0x5d, 0x75, 0x81, 0x43, 0x5e, 0x1f, 0x20, 0xbf, 0x8a, 0x86, 0xda, 0x57, - 0xe0, 0xb7, 0xd2, 0x3e, 0x68, 0x5a, 0x13, 0x3d, 0x34, 0x60, 0x13, 0xfd, 0x5c, 0x1b, 0x5f, 0x96, - 0x53, 0x4d, 0xc5, 0xb1, 0x49, 0x8b, 0x27, 0xa2, 0x52, 0x90, 0x53, 0x37, 0xf8, 0x28, 0x16, 0x54, - 0xf4, 0x38, 0x12, 0xb2, 0xa5, 0x93, 0x84, 0xec, 0x78, 0x76, 0xb8, 0xa2, 0x2d, 0x98, 0x35, 0x2d, - 0xa3, 0x6d, 0x11, 0xdb, 0x5e, 0x22, 0x4a, 0x4b, 0x53, 0x75, 0xe2, 0xf9, 0xc7, 0xed, 0x88, 0xce, - 0x1f, 0x1d, 0x56, 0x66, 0x37, 0xd2, 0x59, 0x70, 0x96, 0xac, 0xfc, 0xb4, 0x00, 0x93, 0xf1, 0x0a, - 0x98, 0xd1, 0xa4, 0x4a, 0x27, 0x6a, 0x52, 0xaf, 0x86, 0x36, 0x83, 0xdb, 0xc1, 0xfb, 0xab, 0x9f, - 0xb2, 0x21, 0x16, 0x60, 0x42, 0x64, 0x03, 0x8f, 0x28, 0xda, 0x74, 0x7f, 0xf5, 0xb7, 0xa2, 0x64, - 0x1c, 0xe7, 0x67, 0xad, 0x67, 0xd0, 0x51, 0x7a, 0x20, 0x85, 0x68, 0xeb, 0xb9, 0x10, 0x67, 0xc0, - 0x49, 0x19, 0xb4, 0x0a, 0xd3, 0x8e, 0x9e, 0x84, 0x72, 0xa3, 0xf1, 0xbc, 0x80, 0x9a, 0xde, 0x4a, - 0xb2, 0xe0, 0x34, 0x39, 0xb4, 0x13, 0xe9, 0x46, 0x87, 0x79, 0x86, 0xbd, 0xd1, 0xf7, 0xde, 0xe9, - 0xbb, 0x1d, 0x45, 0x77, 0x60, 0xcc, 0xe2, 0xdf, 0x1d, 0x9e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e, 0xd9, 0xd8, 0xc5, 0x92, 0x57, 0x61, 0x8c, 0x5f, 0x22, 0x18, 0x16, 0xe5, 0x6e, 0x41, 0x17, - 0x20, 0xdf, 0x51, 0x75, 0x51, 0x67, 0x47, 0x85, 0x4c, 0x9e, 0xd5, 0x08, 0x36, 0xce, 0xc9, 0xca, - 0x81, 0xc8, 0x3c, 0x01, 0x59, 0x39, 0xc0, 0x6c, 0x5c, 0xbe, 0x0f, 0x45, 0xe1, 0xee, 0x30, 0x50, - 0xfe, 0x78, 0xa0, 0x7c, 0x0a, 0xd0, 0x3a, 0x14, 0x97, 0x37, 0xea, 0x9a, 0xe1, 0x76, 0x5d, 0x4d, - 0xb5, 0x65, 0xc5, 0xd7, 0x62, 0x71, 0x79, 0x09, 0x63, 0x4e, 0x41, 0x32, 0x0c, 0x93, 0x83, 0x26, - 0x31, 0x29, 0x8f, 0x88, 0x91, 0x3a, 0xb0, 0x55, 0xbe, 0xcb, 0x47, 0xb0, 0xa0, 0xc8, 0xff, 0x90, - 0x83, 0xa2, 0x70, 0xc7, 0x29, 0x7c, 0x85, 0xad, 0x44, 0xbe, 0xc2, 0x5e, 0xef, 0x2f, 0x34, 0x32, - 0x3f, 0xc1, 0x36, 0x63, 0x9f, 0x60, 0x57, 0xfb, 0xc4, 0x3b, 0xfe, 0xfb, 0xeb, 0x7f, 0x24, 0x18, - 0x8f, 0x06, 0x25, 0xba, 0x09, 0xa3, 0xac, 0xe0, 0xa8, 0x4d, 0xb2, 0x16, 0xf4, 0xb9, 0xfe, 0x21, - 0x4c, 0x23, 0x20, 0xe1, 0x30, 0x1f, 0x6a, 0xfb, 0x62, 0x2c, 0x8e, 0xc4, 0xa4, 0xb3, 0x5d, 0xea, - 0x50, 0x55, 0xab, 0xba, 0x17, 0x63, 0xd5, 0x65, 0x9d, 0xae, 0x5b, 0x0d, 0x6a, 0xa9, 0x7a, 0x3b, - 0xa1, 0x88, 0x07, 0x65, 0x18, 0x59, 0xfe, 0x3f, 0x09,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x44, - 0x15, 0x18, 0x62, 0x71, 0xe6, 0xd6, 0x93, 0x91, 0xfa, 0x08, 0xb3, 0x90, 0x85, 0x9f, 0x8d, 0xdd, - 0x71, 0x74, 0x03, 0xc0, 0x26, 0x4d, 0x8b, 0x50, 0x9e, 0x0c, 0x72, 0xd1, 0x4b, 0xe5, 0x86, 0x4f, - 0xc1, 0x21, 0x2e, 0xf9, 0x47, 0x12, 0x8c, 0xad, 0x11, 0xfa, 0xa9, 0x61, 0xed, 0x6d, 0xf0, 0xc7, - 0x00, 0xa7, 0x90, 0x6c, 0x71, 0x24, 0xd9, 0xbe, 0xd1, 0x63, 0x65, 0x22, 0xd6, 0x65, 0xa5, 0x5c, - 0xf9, 0x4b, 0x09, 0x66, 0x23, 0x9c, 0x77, 0x83, 0xad, 0xbb, 0x05, 0x43, 0xa6, 0x61, 0x51, 0xaf, - 0x10, 0x0f, 0xa4, 0x90, 0xa5, 0xb1, 0x50, 0x29, 0x66, 0x30, 0xd8, 0x45, 0x43, 0x2b, 0x90, 0xa3, - 0x86, 0x08, 0xd5, 0xc1, 0x30, 0x09, 0xb1, 0xea, 0x20, 0x30, 0x73, 0x9b, 0x06, 0xce, 0x51, 0x83, - 0x2d, 0x44, 0x39, 0xc2, 0x15, 0x4e, 0x3e, 0x2f, 0x68, 0x06, 0x18, 0x0a, 0x3b, 0x96, 0xd1, 0x39, - 0xf1, 0x1c, 0xfc, 0x85, 0xb8, 0x67, 0x19, 0x1d, 0xcc, 0xb1, 0xe4, 0xaf, 0x24, 0x98, 0x8a, 0x70, - 0x9e, 0x42, 0xe2, 0x7f, 0x18, 0x4d, 0xfc, 0x57, 0x07, 0x99, 0x48, 0x46, 0xfa, 0xff, 0x2a, 0x17, - 0x9b, 0x06, 0x9b, 0x30, 0xda, 0x81, 0x51, 0xd3, 0x68, 0x35, 0x9e, 0xc3, 0x75, 0xe0, 0x04, 0xab, - 0x9b, 0x1b, 0x01, 0x16, 0x0e, 0x03, 0xa3, 0x03, 0x98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df, 0xcd, 0x9f, 0xf9, 0xe6, - 0xbb, 0xf9, 0x33, 0xdf, 0x7e, 0x37, 0x7f, 0xe6, 0xaf, 0x8e, 0xe6, 0xa5, 0xa7, 0x47, 0xf3, 0xd2, - 0x37, 0x47, 0xf3, 0xd2, 0xb7, 0x47, 0xf3, 0xd2, 0xcf, 0x8e, 0xe6, 0xa5, 0x7f, 0xfc, 0x7e, 0xfe, - 0xcc, 0x87, 0x45, 0x01, 0xf7, 0xeb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xb3, 0xc8, 0xe2, 0x54, - 0x3c, 0x00, 0x00, + // 3627 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcd, 0x6f, 0x1c, 0xc7, + 0x72, 0xd7, 0xec, 0x2e, 0xb9, 0xcb, 0xa2, 0xf8, 0xd5, 0xa4, 0xc9, 0xb5, 0x64, 0x71, 0xe5, 0x31, + 0xa0, 0xc8, 0x8e, 0xb4, 0x6b, 0xc9, 0x96, 0xac, 0x58, 0x88, 0x6d, 0x2e, 0x29, 0x4a, 0x74, 0xf8, + 0xa5, 0x5e, 0x52, 0x71, 0x8c, 0xc8, 0xf1, 0x70, 0xb7, 0xb9, 0x1c, 0x71, 0x76, 0x66, 0x3c, 0xd3, + 0x43, 0x73, 0x81, 0x20, 0xc8, 0x21, 0x08, 0x10, 0x20, 0x41, 0x92, 0x83, 0xf3, 0x71, 0x8b, 0x2f, + 0x39, 0x25, 0x48, 0x6e, 0xc9, 0xc1, 0x30, 0x10, 0xc0, 0x01, 0x84, 0xc0, 0x01, 0x7c, 0x8b, 0x4f, + 0x44, 0x4c, 0x9f, 0x82, 0xfc, 0x03, 0x0f, 0x3a, 0x3c, 0x3c, 0x74, 0x4f, 0xcf, 0xf7, 0x0c, 0x77, + 0x97, 0x96, 0x88, 0x87, 0x87, 0x77, 0xe3, 0x76, 0x55, 0xfd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 0xfe, 0xf8, 0x78, 0x5e, 0x7a, 0x7a, 0x3c, 0x2f, 0x7d, 0x77, 0x3c, 0x2f, 0x7d, 0x7f, 0x3c, 0x2f, + 0xfd, 0xef, 0xf1, 0xbc, 0xf4, 0x57, 0x3f, 0xce, 0x9f, 0xfb, 0xb8, 0x28, 0xe0, 0x7e, 0x11, 0x00, + 0x00, 0xff, 0xff, 0x26, 0xef, 0x73, 0xa6, 0xe7, 0x3c, 0x00, 0x00, } diff --git a/deps/k8s.io/api/extensions/v1beta1/generated.proto b/deps/k8s.io/api/extensions/v1beta1/generated.proto index 8308786d1..1d40fd6c7 100644 --- a/deps/k8s.io/api/extensions/v1beta1/generated.proto +++ b/deps/k8s.io/api/extensions/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ syntax = 'proto2'; package k8s.io.api.extensions.v1beta1; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/api/policy/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; @@ -33,15 +32,17 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; option go_package = "v1beta1"; // AllowedFlexVolume represents a single Flexvolume that is allowed to be used. +// Deprecated: use AllowedFlexVolume from policy API Group instead. message AllowedFlexVolume { - // Driver is the name of the Flexvolume driver. + // driver is the name of the Flexvolume driver. optional string driver = 1; } -// defines the host volume conditions that will be enabled by a policy +// AllowedHostPath defines the host volume conditions that will be enabled by a policy // for pods to use. It requires the path prefix to be defined. +// Deprecated: use AllowedHostPath from policy API Group instead. message AllowedHostPath { - // is the path prefix that the host volume must match. + // pathPrefix is the path prefix that the host volume must match. // It does not support `*`. // Trailing slashes are trimmed when validating the path prefix with a host path. // @@ -49,6 +50,10 @@ message AllowedHostPath { // `/foo` would allow `/foo`, `/foo/` and `/foo/bar` // `/foo` would not allow `/food` or `/etc/foo` optional string pathPrefix = 1; + + // when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. + // +optional + optional bool readOnly = 2; } message CustomMetricCurrentStatus { @@ -347,8 +352,8 @@ message DeploymentSpec { // is considered to be failed. The deployment controller will continue to // process failed deployments and a condition with a ProgressDeadlineExceeded // reason will be surfaced in the deployment status. Note that progress will - // not be estimated during the time a deployment is paused. This is not set - // by default. + // not be estimated during the time a deployment is paused. This is set to + // the max value of int32 (i.e. 2147483647) by default, which means "no deadline". // +optional optional int32 progressDeadlineSeconds = 9; } @@ -409,13 +414,14 @@ message DeploymentStrategy { } // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. +// Deprecated: use FSGroupStrategyOptions from policy API Group instead. message FSGroupStrategyOptions { - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. // +optional optional string rule = 1; - // Ranges are the allowed ranges of fs groups. If you would like to force a single - // fs group then supply a single range with the same start and end. + // ranges are the allowed ranges of fs groups. If you would like to force a single + // fs group then supply a single range with the same start and end. Required for MustRunAs. // +optional repeated IDRange ranges = 2; } @@ -448,8 +454,9 @@ message HTTPIngressRuleValue { repeated HTTPIngressPath paths = 1; } -// Host Port Range defines a range of host ports that will be enabled by a policy +// HostPortRange defines a range of host ports that will be enabled by a policy // for pods to use. It requires both the start and end to be defined. +// Deprecated: use HostPortRange from policy API Group instead. message HostPortRange { // min is the start of the range, inclusive. optional int32 min = 1; @@ -458,12 +465,13 @@ message HostPortRange { optional int32 max = 2; } -// ID Range provides a min/max of an allowed range of IDs. +// IDRange provides a min/max of an allowed range of IDs. +// Deprecated: use IDRange from policy API Group instead. message IDRange { - // Min is the start of the range, inclusive. + // min is the start of the range, inclusive. optional int64 min = 1; - // Max is the end of the range, inclusive. + // max is the end of the range, inclusive. optional int64 max = 2; } @@ -678,20 +686,26 @@ message NetworkPolicyList { // DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer. message NetworkPolicyPeer { - // This is a label selector which selects Pods in this namespace. - // This field follows standard label selector semantics. - // If present but empty, this selector selects all pods in this namespace. + // This is a label selector which selects Pods. This field follows standard label + // selector semantics; if present but empty, it selects all pods. + // + // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; - // Selects Namespaces using cluster scoped-labels. This - // matches all pods in all namespaces selected by this label selector. - // This field follows standard label selector semantics. - // If present but empty, this selector selects all namespaces. + // Selects Namespaces using cluster-scoped labels. This field follows standard label + // selector semantics; if present but empty, it selects all namespaces. + // + // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2; - // IPBlock defines policy on a particular IPBlock + // IPBlock defines policy on a particular IPBlock. If this field is set then + // neither of the other fields can be. // +optional optional IPBlock ipBlock = 3; } @@ -755,8 +769,9 @@ message NetworkPolicySpec { repeated string policyTypes = 4; } -// Pod Security Policy governs the ability to make requests that affect the Security Context +// PodSecurityPolicy governs the ability to make requests that affect the Security Context // that will be applied to a pod and container. +// Deprecated: use PodSecurityPolicy from policy API Group instead. message PodSecurityPolicy { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata @@ -768,43 +783,45 @@ message PodSecurityPolicy { optional PodSecurityPolicySpec spec = 2; } -// Pod Security Policy List is a list of PodSecurityPolicy objects. +// PodSecurityPolicyList is a list of PodSecurityPolicy objects. +// Deprecated: use PodSecurityPolicyList from policy API Group instead. message PodSecurityPolicyList { // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // Items is a list of schema objects. + // items is a list of schema objects. repeated PodSecurityPolicy items = 2; } -// Pod Security Policy Spec defines the policy enforced. +// PodSecurityPolicySpec defines the policy enforced. +// Deprecated: use PodSecurityPolicySpec from policy API Group instead. message PodSecurityPolicySpec { // privileged determines if a pod can request to be run as privileged. // +optional optional bool privileged = 1; - // DefaultAddCapabilities is the default set of capabilities that will be added to the container + // defaultAddCapabilities is the default set of capabilities that will be added to the container // unless the pod spec specifically drops the capability. You may not list a capability in both - // DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly - // allowed, and need not be included in the AllowedCapabilities list. + // defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly + // allowed, and need not be included in the allowedCapabilities list. // +optional repeated string defaultAddCapabilities = 2; - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These + // requiredDropCapabilities are the capabilities that will be dropped from the container. These // are required to be dropped and cannot be added. // +optional repeated string requiredDropCapabilities = 3; - // AllowedCapabilities is a list of capabilities that can be requested to add to the container. + // allowedCapabilities is a list of capabilities that can be requested to add to the container. // Capabilities in this field may be added at the pod author's discretion. - // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. + // You must not list a capability in both allowedCapabilities and requiredDropCapabilities. // +optional repeated string allowedCapabilities = 4; - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins - // may be used. + // volumes is a white list of allowed volume plugins. Empty indicates that + // no volumes may be used. To allow all volumes you may use '*'. // +optional repeated string volumes = 5; @@ -830,13 +847,13 @@ message PodSecurityPolicySpec { // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. optional RunAsUserStrategyOptions runAsUser = 11; - // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. + // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. optional SupplementalGroupsStrategyOptions supplementalGroups = 12; - // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. + // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. optional FSGroupStrategyOptions fsGroup = 13; - // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file + // readOnlyRootFilesystem when set to true will force containers to run with a read only root file // system. If the container specifically requests to run with a non-read only root file system // the PSP should deny the pod. // If set to false the container may run with a read only root file system if it wishes but it @@ -844,25 +861,47 @@ message PodSecurityPolicySpec { // +optional optional bool readOnlyRootFilesystem = 14; - // DefaultAllowPrivilegeEscalation controls the default setting for whether a + // defaultAllowPrivilegeEscalation controls the default setting for whether a // process can gain more privileges than its parent process. // +optional optional bool defaultAllowPrivilegeEscalation = 15; - // AllowPrivilegeEscalation determines if a pod can request to allow + // allowPrivilegeEscalation determines if a pod can request to allow // privilege escalation. If unspecified, defaults to true. // +optional optional bool allowPrivilegeEscalation = 16; - // is a white list of allowed host paths. Empty indicates that all host paths may be used. + // allowedHostPaths is a white list of allowed host paths. Empty indicates + // that all host paths may be used. // +optional repeated AllowedHostPath allowedHostPaths = 17; - // AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes - // is allowed in the "Volumes" field. + // is allowed in the "volumes" field. // +optional repeated AllowedFlexVolume allowedFlexVolumes = 18; + + // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. + // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // + // Examples: + // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. + // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. + // +optional + repeated string allowedUnsafeSysctls = 19; + + // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. + // + // Examples: + // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. + // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. + // +optional + repeated string forbiddenSysctls = 20; } // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for @@ -1041,19 +1080,22 @@ message RollingUpdateDeployment { optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 2; } -// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy. +// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. +// Deprecated: use RunAsUserStrategyOptions from policy API Group instead. message RunAsUserStrategyOptions { - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. + // rule is the strategy that will dictate the allowable RunAsUser values that may be set. optional string rule = 1; - // Ranges are the allowed ranges of uids that may be used. + // ranges are the allowed ranges of uids that may be used. If you would like to force a single uid + // then supply a single range with the same start and end. Required for MustRunAs. // +optional repeated IDRange ranges = 2; } -// SELinux Strategy Options defines the strategy type and any options used to create the strategy. +// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. +// Deprecated: use SELinuxStrategyOptions from policy API Group instead. message SELinuxStrategyOptions { - // type is the strategy that will dictate the allowable labels that may be set. + // rule is the strategy that will dictate the allowable labels that may be set. optional string rule = 1; // seLinuxOptions required to run as; required for MustRunAs @@ -1104,13 +1146,14 @@ message ScaleStatus { } // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. +// Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead. message SupplementalGroupsStrategyOptions { - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. // +optional optional string rule = 1; - // Ranges are the allowed ranges of supplemental groups. If you would like to force a single - // supplemental group then supply a single range with the same start and end. + // ranges are the allowed ranges of supplemental groups. If you would like to force a single + // supplemental group then supply a single range with the same start and end. Required for MustRunAs. // +optional repeated IDRange ranges = 2; } diff --git a/deps/k8s.io/api/extensions/v1beta1/types.go b/deps/k8s.io/api/extensions/v1beta1/types.go index c3d9f72d7..a2b17822c 100644 --- a/deps/k8s.io/api/extensions/v1beta1/types.go +++ b/deps/k8s.io/api/extensions/v1beta1/types.go @@ -168,8 +168,8 @@ type DeploymentSpec struct { // is considered to be failed. The deployment controller will continue to // process failed deployments and a condition with a ProgressDeadlineExceeded // reason will be surfaced in the deployment status. Note that progress will - // not be estimated during the time a deployment is paused. This is not set - // by default. + // not be estimated during the time a deployment is paused. This is set to + // the max value of int32 (i.e. 2147483647) by default, which means "no deadline". // +optional ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"varint,9,opt,name=progressDeadlineSeconds"` } @@ -862,8 +862,9 @@ type ReplicaSetCondition struct { // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// Pod Security Policy governs the ability to make requests that affect the Security Context +// PodSecurityPolicy governs the ability to make requests that affect the Security Context // that will be applied to a pod and container. +// Deprecated: use PodSecurityPolicy from policy API Group instead. type PodSecurityPolicy struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. @@ -876,28 +877,29 @@ type PodSecurityPolicy struct { Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } -// Pod Security Policy Spec defines the policy enforced. +// PodSecurityPolicySpec defines the policy enforced. +// Deprecated: use PodSecurityPolicySpec from policy API Group instead. type PodSecurityPolicySpec struct { // privileged determines if a pod can request to be run as privileged. // +optional Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"` - // DefaultAddCapabilities is the default set of capabilities that will be added to the container + // defaultAddCapabilities is the default set of capabilities that will be added to the container // unless the pod spec specifically drops the capability. You may not list a capability in both - // DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly - // allowed, and need not be included in the AllowedCapabilities list. + // defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly + // allowed, and need not be included in the allowedCapabilities list. // +optional DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/api/core/v1.Capability"` - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These + // requiredDropCapabilities are the capabilities that will be dropped from the container. These // are required to be dropped and cannot be added. // +optional RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/api/core/v1.Capability"` - // AllowedCapabilities is a list of capabilities that can be requested to add to the container. + // allowedCapabilities is a list of capabilities that can be requested to add to the container. // Capabilities in this field may be added at the pod author's discretion. - // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. + // You must not list a capability in both allowedCapabilities and requiredDropCapabilities. // +optional AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/api/core/v1.Capability"` - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins - // may be used. + // volumes is a white list of allowed volume plugins. Empty indicates that + // no volumes may be used. To allow all volumes you may use '*'. // +optional Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"` // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. @@ -916,39 +918,60 @@ type PodSecurityPolicySpec struct { SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"` // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. RunAsUser RunAsUserStrategyOptions `json:"runAsUser" protobuf:"bytes,11,opt,name=runAsUser"` - // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. + // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups" protobuf:"bytes,12,opt,name=supplementalGroups"` - // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. + // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. FSGroup FSGroupStrategyOptions `json:"fsGroup" protobuf:"bytes,13,opt,name=fsGroup"` - // ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file + // readOnlyRootFilesystem when set to true will force containers to run with a read only root file // system. If the container specifically requests to run with a non-read only root file system // the PSP should deny the pod. // If set to false the container may run with a read only root file system if it wishes but it // will not be forced to. // +optional ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"` - // DefaultAllowPrivilegeEscalation controls the default setting for whether a + // defaultAllowPrivilegeEscalation controls the default setting for whether a // process can gain more privileges than its parent process. // +optional DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty" protobuf:"varint,15,opt,name=defaultAllowPrivilegeEscalation"` - // AllowPrivilegeEscalation determines if a pod can request to allow + // allowPrivilegeEscalation determines if a pod can request to allow // privilege escalation. If unspecified, defaults to true. // +optional AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,16,opt,name=allowPrivilegeEscalation"` - // is a white list of allowed host paths. Empty indicates that all host paths may be used. + // allowedHostPaths is a white list of allowed host paths. Empty indicates + // that all host paths may be used. // +optional AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" protobuf:"bytes,17,rep,name=allowedHostPaths"` - // AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes - // is allowed in the "Volumes" field. + // is allowed in the "volumes" field. // +optional AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,18,rep,name=allowedFlexVolumes"` + // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. + // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // + // Examples: + // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. + // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. + // +optional + AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty" protobuf:"bytes,19,rep,name=allowedUnsafeSysctls"` + // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. + // + // Examples: + // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. + // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. + // +optional + ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" protobuf:"bytes,20,rep,name=forbiddenSysctls"` } -// defines the host volume conditions that will be enabled by a policy +// AllowedHostPath defines the host volume conditions that will be enabled by a policy // for pods to use. It requires the path prefix to be defined. +// Deprecated: use AllowedHostPath from policy API Group instead. type AllowedHostPath struct { - // is the path prefix that the host volume must match. + // pathPrefix is the path prefix that the host volume must match. // It does not support `*`. // Trailing slashes are trimmed when validating the path prefix with a host path. // @@ -956,9 +979,14 @@ type AllowedHostPath struct { // `/foo` would allow `/foo`, `/foo/` and `/foo/bar` // `/foo` would not allow `/food` or `/etc/foo` PathPrefix string `json:"pathPrefix,omitempty" protobuf:"bytes,1,rep,name=pathPrefix"` + + // when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` } -// FS Type gives strong typing to different file systems that are used by volumes. +// FSType gives strong typing to different file systems that are used by volumes. +// Deprecated: use FSType from policy API Group instead. type FSType string var ( @@ -987,13 +1015,15 @@ var ( ) // AllowedFlexVolume represents a single Flexvolume that is allowed to be used. +// Deprecated: use AllowedFlexVolume from policy API Group instead. type AllowedFlexVolume struct { - // Driver is the name of the Flexvolume driver. + // driver is the name of the Flexvolume driver. Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` } -// Host Port Range defines a range of host ports that will be enabled by a policy +// HostPortRange defines a range of host ports that will be enabled by a policy // for pods to use. It requires both the start and end to be defined. +// Deprecated: use HostPortRange from policy API Group instead. type HostPortRange struct { // min is the start of the range, inclusive. Min int32 `json:"min" protobuf:"varint,1,opt,name=min"` @@ -1001,9 +1031,10 @@ type HostPortRange struct { Max int32 `json:"max" protobuf:"varint,2,opt,name=max"` } -// SELinux Strategy Options defines the strategy type and any options used to create the strategy. +// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. +// Deprecated: use SELinuxStrategyOptions from policy API Group instead. type SELinuxStrategyOptions struct { - // type is the strategy that will dictate the allowable labels that may be set. + // rule is the strategy that will dictate the allowable labels that may be set. Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"` // seLinuxOptions required to run as; required for MustRunAs // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ @@ -1013,92 +1044,111 @@ type SELinuxStrategyOptions struct { // SELinuxStrategy denotes strategy types for generating SELinux options for a // Security Context. +// Deprecated: use SELinuxStrategy from policy API Group instead. type SELinuxStrategy string const ( - // container must have SELinux labels of X applied. + // SELinuxStrategyMustRunAs means that container must have SELinux labels of X applied. + // Deprecated: use SELinuxStrategyMustRunAs from policy API Group instead. SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs" - // container may make requests for any SELinux context labels. + // SELinuxStrategyRunAsAny means that container may make requests for any SELinux context labels. + // Deprecated: use SELinuxStrategyRunAsAny from policy API Group instead. SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny" ) -// Run A sUser Strategy Options defines the strategy type and any options used to create the strategy. +// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. +// Deprecated: use RunAsUserStrategyOptions from policy API Group instead. type RunAsUserStrategyOptions struct { - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. + // rule is the strategy that will dictate the allowable RunAsUser values that may be set. Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"` - // Ranges are the allowed ranges of uids that may be used. + // ranges are the allowed ranges of uids that may be used. If you would like to force a single uid + // then supply a single range with the same start and end. Required for MustRunAs. // +optional Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` } -// ID Range provides a min/max of an allowed range of IDs. +// IDRange provides a min/max of an allowed range of IDs. +// Deprecated: use IDRange from policy API Group instead. type IDRange struct { - // Min is the start of the range, inclusive. + // min is the start of the range, inclusive. Min int64 `json:"min" protobuf:"varint,1,opt,name=min"` - // Max is the end of the range, inclusive. + // max is the end of the range, inclusive. Max int64 `json:"max" protobuf:"varint,2,opt,name=max"` } // RunAsUserStrategy denotes strategy types for generating RunAsUser values for a // Security Context. +// Deprecated: use RunAsUserStrategy from policy API Group instead. type RunAsUserStrategy string const ( - // container must run as a particular uid. + // RunAsUserStrategyMustRunAs means that container must run as a particular uid. + // Deprecated: use RunAsUserStrategyMustRunAs from policy API Group instead. RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs" - // container must run as a non-root uid + // RunAsUserStrategyMustRunAsNonRoot means that container must run as a non-root uid. + // Deprecated: use RunAsUserStrategyMustRunAsNonRoot from policy API Group instead. RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot" - // container may make requests for any uid. + // RunAsUserStrategyRunAsAny means that container may make requests for any uid. + // Deprecated: use RunAsUserStrategyRunAsAny from policy API Group instead. RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny" ) // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. +// Deprecated: use FSGroupStrategyOptions from policy API Group instead. type FSGroupStrategyOptions struct { - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. // +optional Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"` - // Ranges are the allowed ranges of fs groups. If you would like to force a single - // fs group then supply a single range with the same start and end. + // ranges are the allowed ranges of fs groups. If you would like to force a single + // fs group then supply a single range with the same start and end. Required for MustRunAs. // +optional Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` } // FSGroupStrategyType denotes strategy types for generating FSGroup values for a // SecurityContext +// Deprecated: use FSGroupStrategyType from policy API Group instead. type FSGroupStrategyType string const ( - // container must have FSGroup of X applied. + // FSGroupStrategyMustRunAs meant that container must have FSGroup of X applied. + // Deprecated: use FSGroupStrategyMustRunAs from policy API Group instead. FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs" - // container may make requests for any FSGroup labels. + // FSGroupStrategyRunAsAny means that container may make requests for any FSGroup labels. + // Deprecated: use FSGroupStrategyRunAsAny from policy API Group instead. FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny" ) // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. +// Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead. type SupplementalGroupsStrategyOptions struct { - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. // +optional Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"` - // Ranges are the allowed ranges of supplemental groups. If you would like to force a single - // supplemental group then supply a single range with the same start and end. + // ranges are the allowed ranges of supplemental groups. If you would like to force a single + // supplemental group then supply a single range with the same start and end. Required for MustRunAs. // +optional Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` } // SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental // groups for a SecurityContext. +// Deprecated: use SupplementalGroupsStrategyType from policy API Group instead. type SupplementalGroupsStrategyType string const ( - // container must run as a particular gid. + // SupplementalGroupsStrategyMustRunAs means that container must run as a particular gid. + // Deprecated: use SupplementalGroupsStrategyMustRunAs from policy API Group instead. SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs" - // container may make requests for any gid. + // SupplementalGroupsStrategyRunAsAny means that container may make requests for any gid. + // Deprecated: use SupplementalGroupsStrategyRunAsAny from policy API Group instead. SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// Pod Security Policy List is a list of PodSecurityPolicy objects. +// PodSecurityPolicyList is a list of PodSecurityPolicy objects. +// Deprecated: use PodSecurityPolicyList from policy API Group instead. type PodSecurityPolicyList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. @@ -1106,7 +1156,7 @@ type PodSecurityPolicyList struct { // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Items is a list of schema objects. + // items is a list of schema objects. Items []PodSecurityPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -1256,22 +1306,26 @@ type IPBlock struct { // DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer. type NetworkPolicyPeer struct { - // Exactly one of the following must be specified. - - // This is a label selector which selects Pods in this namespace. - // This field follows standard label selector semantics. - // If present but empty, this selector selects all pods in this namespace. + // This is a label selector which selects Pods. This field follows standard label + // selector semantics; if present but empty, it selects all pods. + // + // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. // +optional PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"` - // Selects Namespaces using cluster scoped-labels. This - // matches all pods in all namespaces selected by this label selector. - // This field follows standard label selector semantics. - // If present but empty, this selector selects all namespaces. + // Selects Namespaces using cluster-scoped labels. This field follows standard label + // selector semantics; if present but empty, it selects all namespaces. + // + // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"` - // IPBlock defines policy on a particular IPBlock + // IPBlock defines policy on a particular IPBlock. If this field is set then + // neither of the other fields can be. // +optional IPBlock *IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,3,rep,name=ipBlock"` } diff --git a/deps/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go index 236d934fa..c9ffadec1 100644 --- a/deps/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/extensions/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,10 +26,10 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AllowedFlexVolume = map[string]string{ - "": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", - "driver": "Driver is the name of the Flexvolume driver.", + "": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used. Deprecated: use AllowedFlexVolume from policy API Group instead.", + "driver": "driver is the name of the Flexvolume driver.", } func (AllowedFlexVolume) SwaggerDoc() map[string]string { @@ -37,8 +37,9 @@ func (AllowedFlexVolume) SwaggerDoc() map[string]string { } var map_AllowedHostPath = map[string]string{ - "": "defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", - "pathPrefix": "is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + "": "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. Deprecated: use AllowedHostPath from policy API Group instead.", + "pathPrefix": "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + "readOnly": "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", } func (AllowedHostPath) SwaggerDoc() map[string]string { @@ -195,7 +196,7 @@ var map_DeploymentSpec = map[string]string{ "revisionHistoryLimit": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", "paused": "Indicates that the deployment is paused and will not be processed by the deployment controller.", "rollbackTo": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", - "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is not set by default.", + "progressDeadlineSeconds": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. This is set to the max value of int32 (i.e. 2147483647) by default, which means \"no deadline\".", } func (DeploymentSpec) SwaggerDoc() map[string]string { @@ -229,9 +230,9 @@ func (DeploymentStrategy) SwaggerDoc() map[string]string { } var map_FSGroupStrategyOptions = map[string]string{ - "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", - "rule": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", - "ranges": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.", + "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use FSGroupStrategyOptions from policy API Group instead.", + "rule": "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", + "ranges": "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", } func (FSGroupStrategyOptions) SwaggerDoc() map[string]string { @@ -258,7 +259,7 @@ func (HTTPIngressRuleValue) SwaggerDoc() map[string]string { } var map_HostPortRange = map[string]string{ - "": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "": "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined. Deprecated: use HostPortRange from policy API Group instead.", "min": "min is the start of the range, inclusive.", "max": "max is the end of the range, inclusive.", } @@ -268,9 +269,9 @@ func (HostPortRange) SwaggerDoc() map[string]string { } var map_IDRange = map[string]string{ - "": "ID Range provides a min/max of an allowed range of IDs.", - "min": "Min is the start of the range, inclusive.", - "max": "Max is the end of the range, inclusive.", + "": "IDRange provides a min/max of an allowed range of IDs. Deprecated: use IDRange from policy API Group instead.", + "min": "min is the start of the range, inclusive.", + "max": "max is the end of the range, inclusive.", } func (IDRange) SwaggerDoc() map[string]string { @@ -407,9 +408,9 @@ func (NetworkPolicyList) SwaggerDoc() map[string]string { var map_NetworkPolicyPeer = map[string]string{ "": "DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer.", - "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.", - "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.", - "ipBlock": "IPBlock defines policy on a particular IPBlock", + "podSelector": "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", + "namespaceSelector": "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", + "ipBlock": "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", } func (NetworkPolicyPeer) SwaggerDoc() map[string]string { @@ -439,7 +440,7 @@ func (NetworkPolicySpec) SwaggerDoc() map[string]string { } var map_PodSecurityPolicy = map[string]string{ - "": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + "": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", "spec": "spec defines the policy enforced.", } @@ -449,9 +450,9 @@ func (PodSecurityPolicy) SwaggerDoc() map[string]string { } var map_PodSecurityPolicyList = map[string]string{ - "": "Pod Security Policy List is a list of PodSecurityPolicy objects.", + "": "PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use PodSecurityPolicyList from policy API Group instead.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "items": "Items is a list of schema objects.", + "items": "items is a list of schema objects.", } func (PodSecurityPolicyList) SwaggerDoc() map[string]string { @@ -459,25 +460,27 @@ func (PodSecurityPolicyList) SwaggerDoc() map[string]string { } var map_PodSecurityPolicySpec = map[string]string{ - "": "Pod Security Policy Spec defines the policy enforced.", + "": "PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.", "privileged": "privileged determines if a pod can request to be run as privileged.", - "defaultAddCapabilities": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both DefaultAddCapabilities and RequiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the AllowedCapabilities list.", - "requiredDropCapabilities": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", - "allowedCapabilities": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.", - "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.", + "defaultAddCapabilities": "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", + "requiredDropCapabilities": "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + "allowedCapabilities": "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", + "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.", "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.", "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", "seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.", "runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", - "supplementalGroups": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", - "fsGroup": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.", - "readOnlyRootFilesystem": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", - "defaultAllowPrivilegeEscalation": "DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", - "allowPrivilegeEscalation": "AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", - "allowedHostPaths": "is a white list of allowed host paths. Empty indicates that all host paths may be used.", - "allowedFlexVolumes": "AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"Volumes\" field.", + "supplementalGroups": "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + "fsGroup": "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + "readOnlyRootFilesystem": "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + "defaultAllowPrivilegeEscalation": "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", + "allowPrivilegeEscalation": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", + "allowedHostPaths": "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", + "allowedFlexVolumes": "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + "forbiddenSysctls": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", } func (PodSecurityPolicySpec) SwaggerDoc() map[string]string { @@ -581,9 +584,9 @@ func (RollingUpdateDeployment) SwaggerDoc() map[string]string { } var map_RunAsUserStrategyOptions = map[string]string{ - "": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", - "rule": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.", - "ranges": "Ranges are the allowed ranges of uids that may be used.", + "": "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsUserStrategyOptions from policy API Group instead.", + "rule": "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + "ranges": "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", } func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string { @@ -591,8 +594,8 @@ func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string { } var map_SELinuxStrategyOptions = map[string]string{ - "": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", - "rule": "type is the strategy that will dictate the allowable labels that may be set.", + "": "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use SELinuxStrategyOptions from policy API Group instead.", + "rule": "rule is the strategy that will dictate the allowable labels that may be set.", "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", } @@ -632,9 +635,9 @@ func (ScaleStatus) SwaggerDoc() map[string]string { } var map_SupplementalGroupsStrategyOptions = map[string]string{ - "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", - "rule": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", - "ranges": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.", + "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead.", + "rule": "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + "ranges": "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", } func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go index 564d4177d..0e94ab1fb 100644 --- a/deps/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -163,9 +163,8 @@ func (in *DaemonSet) DeepCopy() *DaemonSet { func (in *DaemonSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -214,9 +213,8 @@ func (in *DaemonSetList) DeepCopy() *DaemonSetList { func (in *DaemonSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -224,23 +222,15 @@ func (in *DaemonSetSpec) DeepCopyInto(out *DaemonSetSpec) { *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -260,12 +250,8 @@ func (in *DaemonSetStatus) DeepCopyInto(out *DaemonSetStatus) { *out = *in if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -292,12 +278,8 @@ func (in *DaemonSetUpdateStrategy) DeepCopyInto(out *DaemonSetUpdateStrategy) { *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateDaemonSet) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateDaemonSet) + (*in).DeepCopyInto(*out) } return } @@ -336,9 +318,8 @@ func (in *Deployment) DeepCopy() *Deployment { func (in *Deployment) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -388,9 +369,8 @@ func (in *DeploymentList) DeepCopy() *DeploymentList { func (in *DeploymentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -422,9 +402,8 @@ func (in *DeploymentRollback) DeepCopy() *DeploymentRollback { func (in *DeploymentRollback) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -432,50 +411,30 @@ func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) in.Strategy.DeepCopyInto(&out.Strategy) if in.RevisionHistoryLimit != nil { in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.RollbackTo != nil { in, out := &in.RollbackTo, &out.RollbackTo - if *in == nil { - *out = nil - } else { - *out = new(RollbackConfig) - **out = **in - } + *out = new(RollbackConfig) + **out = **in } if in.ProgressDeadlineSeconds != nil { in, out := &in.ProgressDeadlineSeconds, &out.ProgressDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -502,12 +461,8 @@ func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { } if in.CollisionCount != nil { in, out := &in.CollisionCount, &out.CollisionCount - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } return } @@ -527,12 +482,8 @@ func (in *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) { *out = *in if in.RollingUpdate != nil { in, out := &in.RollingUpdate, &out.RollingUpdate - if *in == nil { - *out = nil - } else { - *out = new(RollingUpdateDeployment) - (*in).DeepCopyInto(*out) - } + *out = new(RollingUpdateDeployment) + (*in).DeepCopyInto(*out) } return } @@ -683,9 +634,8 @@ func (in *Ingress) DeepCopy() *Ingress { func (in *Ingress) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -734,9 +684,8 @@ func (in *IngressList) DeepCopy() *IngressList { func (in *IngressList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -761,12 +710,8 @@ func (in *IngressRuleValue) DeepCopyInto(out *IngressRuleValue) { *out = *in if in.HTTP != nil { in, out := &in.HTTP, &out.HTTP - if *in == nil { - *out = nil - } else { - *out = new(HTTPIngressRuleValue) - (*in).DeepCopyInto(*out) - } + *out = new(HTTPIngressRuleValue) + (*in).DeepCopyInto(*out) } return } @@ -786,12 +731,8 @@ func (in *IngressSpec) DeepCopyInto(out *IngressSpec) { *out = *in if in.Backend != nil { in, out := &in.Backend, &out.Backend - if *in == nil { - *out = nil - } else { - *out = new(IngressBackend) - **out = **in - } + *out = new(IngressBackend) + **out = **in } if in.TLS != nil { in, out := &in.TLS, &out.TLS @@ -881,9 +822,8 @@ func (in *NetworkPolicy) DeepCopy() *NetworkPolicy { func (in *NetworkPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -975,9 +915,8 @@ func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList { func (in *NetworkPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -985,30 +924,18 @@ func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer) { *out = *in if in.PodSelector != nil { in, out := &in.PodSelector, &out.PodSelector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } if in.IPBlock != nil { in, out := &in.IPBlock, &out.IPBlock - if *in == nil { - *out = nil - } else { - *out = new(IPBlock) - (*in).DeepCopyInto(*out) - } + *out = new(IPBlock) + (*in).DeepCopyInto(*out) } return } @@ -1028,21 +955,13 @@ func (in *NetworkPolicyPort) DeepCopyInto(out *NetworkPolicyPort) { *out = *in if in.Protocol != nil { in, out := &in.Protocol, &out.Protocol - if *in == nil { - *out = nil - } else { - *out = new(core_v1.Protocol) - **out = **in - } + *out = new(corev1.Protocol) + **out = **in } if in.Port != nil { in, out := &in.Port, &out.Port - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -1116,9 +1035,8 @@ func (in *PodSecurityPolicy) DeepCopy() *PodSecurityPolicy { func (in *PodSecurityPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1150,9 +1068,8 @@ func (in *PodSecurityPolicyList) DeepCopy() *PodSecurityPolicyList { func (in *PodSecurityPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1160,17 +1077,17 @@ func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) { *out = *in if in.DefaultAddCapabilities != nil { in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]core_v1.Capability, len(*in)) + *out = make([]corev1.Capability, len(*in)) copy(*out, *in) } if in.RequiredDropCapabilities != nil { in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]core_v1.Capability, len(*in)) + *out = make([]corev1.Capability, len(*in)) copy(*out, *in) } if in.AllowedCapabilities != nil { in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]core_v1.Capability, len(*in)) + *out = make([]corev1.Capability, len(*in)) copy(*out, *in) } if in.Volumes != nil { @@ -1189,21 +1106,13 @@ func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) { in.FSGroup.DeepCopyInto(&out.FSGroup) if in.DefaultAllowPrivilegeEscalation != nil { in, out := &in.DefaultAllowPrivilegeEscalation, &out.DefaultAllowPrivilegeEscalation - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.AllowPrivilegeEscalation != nil { in, out := &in.AllowPrivilegeEscalation, &out.AllowPrivilegeEscalation - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.AllowedHostPaths != nil { in, out := &in.AllowedHostPaths, &out.AllowedHostPaths @@ -1215,6 +1124,16 @@ func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) { *out = make([]AllowedFlexVolume, len(*in)) copy(*out, *in) } + if in.AllowedUnsafeSysctls != nil { + in, out := &in.AllowedUnsafeSysctls, &out.AllowedUnsafeSysctls + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ForbiddenSysctls != nil { + in, out := &in.ForbiddenSysctls, &out.ForbiddenSysctls + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -1252,9 +1171,8 @@ func (in *ReplicaSet) DeepCopy() *ReplicaSet { func (in *ReplicaSet) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1303,9 +1221,8 @@ func (in *ReplicaSetList) DeepCopy() *ReplicaSetList { func (in *ReplicaSetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1313,21 +1230,13 @@ func (in *ReplicaSetSpec) DeepCopyInto(out *ReplicaSetSpec) { *out = *in if in.Replicas != nil { in, out := &in.Replicas, &out.Replicas - if *in == nil { - *out = nil - } else { - *out = new(int32) - **out = **in - } + *out = new(int32) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } in.Template.DeepCopyInto(&out.Template) return @@ -1387,9 +1296,8 @@ func (in *ReplicationControllerDummy) DeepCopy() *ReplicationControllerDummy { func (in *ReplicationControllerDummy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -1413,12 +1321,8 @@ func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -1438,21 +1342,13 @@ func (in *RollingUpdateDeployment) DeepCopyInto(out *RollingUpdateDeployment) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } if in.MaxSurge != nil { in, out := &in.MaxSurge, &out.MaxSurge - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -1493,12 +1389,8 @@ func (in *SELinuxStrategyOptions) DeepCopyInto(out *SELinuxStrategyOptions) { *out = *in if in.SELinuxOptions != nil { in, out := &in.SELinuxOptions, &out.SELinuxOptions - if *in == nil { - *out = nil - } else { - *out = new(core_v1.SELinuxOptions) - **out = **in - } + *out = new(corev1.SELinuxOptions) + **out = **in } return } @@ -1537,9 +1429,8 @@ func (in *Scale) DeepCopy() *Scale { func (in *Scale) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/imagepolicy/v1alpha1/BUILD b/deps/k8s.io/api/imagepolicy/v1alpha1/BUILD deleted file mode 100644 index 455205f7a..000000000 --- a/deps/k8s.io/api/imagepolicy/v1alpha1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/imagepolicy/v1alpha1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go b/deps/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go index f521979b7..ef2275443 100644 --- a/deps/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go +++ b/deps/k8s.io/api/imagepolicy/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1036,41 +1036,41 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 575 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x6e, 0xd4, 0x30, - 0x10, 0xc6, 0x37, 0xdb, 0xbf, 0xeb, 0x05, 0xda, 0x1a, 0x0e, 0xab, 0x3d, 0xa4, 0xd5, 0x22, 0xa1, - 0x72, 0xc0, 0xa6, 0x05, 0xa1, 0xc2, 0x01, 0xd4, 0x20, 0x24, 0x38, 0x00, 0x92, 0xb9, 0xf5, 0x84, - 0x37, 0x3b, 0xcd, 0x9a, 0x4d, 0xec, 0x28, 0x76, 0x52, 0xf6, 0xc6, 0x23, 0xf0, 0x06, 0xbc, 0x4e, - 0x8f, 0x3d, 0xf6, 0x54, 0xd1, 0x70, 0xe4, 0x25, 0x50, 0x9c, 0x6c, 0x13, 0xba, 0x54, 0x68, 0x6f, - 0x9e, 0x19, 0x7f, 0xbf, 0x19, 0x7f, 0x63, 0xf4, 0x76, 0x72, 0xa0, 0x89, 0x50, 0x74, 0x92, 0x0e, - 0x21, 0x91, 0x60, 0x40, 0xd3, 0x0c, 0xe4, 0x48, 0x25, 0xb4, 0x2a, 0xf0, 0x58, 0x50, 0x11, 0xf1, - 0x00, 0x62, 0x15, 0x0a, 0x7f, 0x4a, 0xb3, 0x3d, 0x1e, 0xc6, 0x63, 0xbe, 0x47, 0x03, 0x90, 0x90, - 0x70, 0x03, 0x23, 0x12, 0x27, 0xca, 0x28, 0xbc, 0x5d, 0x0a, 0x08, 0x8f, 0x05, 0x69, 0x08, 0xc8, - 0x4c, 0xd0, 0x7f, 0x14, 0x08, 0x33, 0x4e, 0x87, 0xc4, 0x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bf, 0x05, 0xb3, 0x59, 0x56, 0x55, 0x3d, 0x72, 0x7a, 0xe9, - 0xb6, 0xce, 0x2e, 0xdd, 0xd6, 0xf9, 0xa5, 0xdb, 0xfa, 0x96, 0xbb, 0xce, 0x69, 0xee, 0x3a, 0x67, - 0xb9, 0xeb, 0x9c, 0xe7, 0xae, 0xf3, 0x33, 0x77, 0x9d, 0xef, 0xbf, 0xdc, 0xd6, 0xd1, 0xfa, 0xcc, - 0xcb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x2d, 0x62, 0x44, 0xd7, 0x04, 0x00, 0x00, + // 562 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4f, 0x6f, 0xd3, 0x30, + 0x18, 0xc6, 0x9b, 0xee, 0x6f, 0x5d, 0x60, 0x9b, 0xe1, 0x10, 0xf5, 0x90, 0x4d, 0x45, 0x42, 0xe3, + 0x80, 0xcd, 0x26, 0x84, 0x06, 0x07, 0x50, 0x83, 0x90, 0xe0, 0x00, 0x48, 0xe6, 0xb6, 0x13, 0x6e, + 0xfa, 0x2e, 0x0d, 0x6d, 0xec, 0x28, 0x76, 0x32, 0x7a, 0xe3, 0x23, 0xf0, 0x0d, 0xf8, 0x3a, 0x3d, + 0xee, 0xb8, 0xd3, 0x44, 0xc3, 0x91, 0x2f, 0x81, 0xe2, 0xa4, 0x4d, 0x68, 0x41, 0xa8, 0xb7, 0xbc, + 0xef, 0xeb, 0xe7, 0xf7, 0x3e, 0x79, 0x6c, 0xf4, 0x66, 0x74, 0xa6, 0x48, 0x20, 0xe9, 0x28, 0xe9, + 0x43, 0x2c, 0x40, 0x83, 0xa2, 0x29, 0x88, 0x81, 0x8c, 0x69, 0x39, 0xe0, 0x51, 0x40, 0x83, 0x90, + 0xfb, 0x10, 0xc9, 0x71, 0xe0, 0x4d, 0x68, 0x7a, 0xc2, 0xc7, 0xd1,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 0xeb, 0xee, 0x95, 0x1e, 0x76, 0x7a, 0x45, 0x9b, 0xcd, 0xe7, + 0xf8, 0x01, 0xda, 0x8e, 0x81, 0x2b, 0x29, 0x0a, 0x74, 0xf5, 0x2c, 0x98, 0xe9, 0xb2, 0x72, 0xea, + 0x92, 0xe9, 0xcc, 0x69, 0x5c, 0xcd, 0x9c, 0xc6, 0xf5, 0xcc, 0x69, 0x7c, 0xcd, 0x1c, 0x6b, 0x9a, + 0x39, 0xd6, 0x55, 0xe6, 0x58, 0xd7, 0x99, 0x63, 0xfd, 0xc8, 0x1c, 0xeb, 0xdb, 0x4f, 0xa7, 0x71, + 0xbe, 0x3b, 0xcf, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xb6, 0xff, 0xb4, 0xa2, 0x04, + 0x00, 0x00, } diff --git a/deps/k8s.io/api/imagepolicy/v1alpha1/generated.proto b/deps/k8s.io/api/imagepolicy/v1alpha1/generated.proto index a19967cbe..ffd9512a9 100644 --- a/deps/k8s.io/api/imagepolicy/v1alpha1/generated.proto +++ b/deps/k8s.io/api/imagepolicy/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.imagepolicy.v1alpha1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; diff --git a/deps/k8s.io/api/imagepolicy/v1alpha1/types_swagger_doc_generated.go b/deps/k8s.io/api/imagepolicy/v1alpha1/types_swagger_doc_generated.go index f4b26f5e8..129d63d08 100644 --- a/deps/k8s.io/api/imagepolicy/v1alpha1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/imagepolicy/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1alpha1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ImageReview = map[string]string{ "": "ImageReview checks if the set of images in a pod are allowed.", "spec": "Spec holds information about the pod being evaluated", diff --git a/deps/k8s.io/api/imagepolicy/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/api/imagepolicy/v1alpha1/zz_generated.deepcopy.go index f0463d29d..a41d89700 100644 --- a/deps/k8s.io/api/imagepolicy/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/imagepolicy/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -48,9 +48,8 @@ func (in *ImageReview) DeepCopy() *ImageReview { func (in *ImageReview) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/networking/v1/BUILD b/deps/k8s.io/api/networking/v1/BUILD deleted file mode 100644 index beb3afcaf..000000000 --- a/deps/k8s.io/api/networking/v1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/networking/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/networking/v1/generated.pb.go b/deps/k8s.io/api/networking/v1/generated.pb.go index 05aaf1d9a..7b1c04b29 100644 --- a/deps/k8s.io/api/networking/v1/generated.pb.go +++ b/deps/k8s.io/api/networking/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1813,57 +1813,56 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 829 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xf6, 0x3a, 0xce, 0x47, 0x27, 0x94, 0x92, 0x41, 0x08, 0x2b, 0x88, 0x75, 0xd8, 0x0b, 0x41, - 0x55, 0x67, 0x71, 0x8b, 0x10, 0x37, 0xc4, 0x42, 0x29, 0x96, 0x9a, 0xc4, 0x9a, 0xf4, 0x02, 0x02, - 0x89, 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x04, 0x87, 0x57, 0xd7, 0x6e, 0xed, 0xf9, - 0xb5, 0x5b, 0x7b, 0x71, 0xed, 0xd6, 0x7e, 0x2d, 0x5c, 0xe7, 0xaa, 0x70, 0x9d, 0xe7, 0x85, 0xeb, - 0xbc, 0x28, 0x5c, 0xe7, 0xef, 0xc2, 0x75, 0x7e, 0xfb, 0xc7, 0xad, 0xfd, 0x50, 0x1f, 0xb7, 0xff, - 0x0d, 0x00, 0x00, 0xff, 0xff, 0x48, 0x47, 0x24, 0xc9, 0xc1, 0x08, 0x00, 0x00, + // 804 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x8e, 0x9d, 0x6c, 0x92, 0x4e, 0x28, 0x65, 0x07, 0x21, 0xac, 0x45, 0xd8, 0xc1, 0x17, 0x56, + 0xaa, 0x18, 0x93, 0x16, 0x21, 0x6e, 0x08, 0x43, 0x29, 0x91, 0xba, 0xbb, 0xd1, 0x6c, 0x2f, 0x20, + 0x90, 0x70, 0x9c, 0x59, 0xef, 0x34, 0xb1, 0xc7, 0x1a, 0x4f, 0x42, 0xf7, 0xc6, 0x9f, 0xc0, 0x1f, + 0xc2, 0x91, 0x1b, 0x87, 0x72, 0xdc, 0x63, 0x8f, 0x3d, 0x59, 0xac, 0xf9, 0x2f, 0xf6, 0x84, 0x66, + 0x3c, 0x89, 0xf3, 0xa3, 0x11, 0xd9, 0x15, 0xbd, 0x65, 0xde, 0xbc, 0xef, 0x7b, 0xf3, 0xde, 0xfb, + 0xf2, 0x19, 0x7c, 0x35, 0xfe, 0x22, 0x43, 0x94, 0x79, 0xe3, 0xe9, 0x90, 0xf0, 0x84, 0x08, 0x92, + 0x79, 0x33, 0x92, 0x8c, 0x18, 0xf7, 0xf4, 0x45, 0x90, 0x52, 0x2f, 0x21, 0xe2, 0x17, 0xc6, 0xc7, + 0x34,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0xfc, 0x5d, 0x2d, 0xb3, 0xed, 0x4b, 0xff, 0x09, 0xb4, 0x68, 0xf9, 0x27, + 0xd7, 0x12, 0x7e, 0xb0, 0xa3, 0x84, 0x97, 0xac, 0xc1, 0xbf, 0xa7, 0xcb, 0xb4, 0xe6, 0xc1, 0x39, + 0x27, 0xfc, 0x1e, 0x34, 0x49, 0xc9, 0x5e, 0x57, 0xec, 0xbd, 0x1d, 0xd9, 0x2b, 0xbf, 0xf4, 0xdf, + 0xd6, 0xe4, 0x4d, 0x1d, 0xd3, 0x84, 0xf0, 0x4b, 0x39, 0x25, 0x99, 0xfb, 0xf4, 0x22, 0x25, 0x99, + 0xd5, 0x50, 0xdf, 0x93, 0x0f, 0xcb, 0x66, 0x17, 0xe1, 0xeb, 0xdc, 0x01, 0xd5, 0x11, 0x2f, 0x23, + 0xfc, 0xc3, 0xcb, 0x2b, 0xbb, 0xf6, 0xf2, 0xca, 0xae, 0xbd, 0xba, 0xb2, 0x6b, 0xbf, 0x16, 0xb6, + 0x71, 0x59, 0xd8, 0xc6, 0xcb, 0xc2, 0x36, 0x5e, 0x15, 0xb6, 0xf1, 0x77, 0x61, 0x1b, 0xbf, 0xfd, + 0x63, 0xd7, 0x7e, 0x30, 0x67, 0xbd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x7b, 0xc9, 0x59, + 0x67, 0x08, 0x00, 0x00, } diff --git a/deps/k8s.io/api/networking/v1/generated.proto b/deps/k8s.io/api/networking/v1/generated.proto index 06365ebe3..eacf0ed90 100644 --- a/deps/k8s.io/api/networking/v1/generated.proto +++ b/deps/k8s.io/api/networking/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,8 +22,6 @@ syntax = 'proto2'; package k8s.io.api.networking.v1; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/api/extensions/v1beta1/generated.proto"; -import "k8s.io/api/policy/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; @@ -111,22 +109,29 @@ message NetworkPolicyList { repeated NetworkPolicy items = 2; } -// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields -// must be specified. +// NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of +// fields are allowed message NetworkPolicyPeer { - // This is a label selector which selects Pods in this namespace. This field - // follows standard label selector semantics. If present but empty, this selector - // selects all pods in this namespace. + // This is a label selector which selects Pods. This field follows standard label + // selector semantics; if present but empty, it selects all pods. + // + // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector podSelector = 1; - // Selects Namespaces using cluster scoped-labels. This matches all pods in all - // namespaces selected by this label selector. This field follows standard label - // selector semantics. If present but empty, this selector selects all namespaces. + // Selects Namespaces using cluster-scoped labels. This field follows standard label + // selector semantics; if present but empty, it selects all namespaces. + // + // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector namespaceSelector = 2; - // IPBlock defines policy on a particular IPBlock + // IPBlock defines policy on a particular IPBlock. If this field is set then + // neither of the other fields can be. // +optional optional IPBlock ipBlock = 3; } diff --git a/deps/k8s.io/api/networking/v1/types.go b/deps/k8s.io/api/networking/v1/types.go index 57bc8005e..e1b81fdc7 100644 --- a/deps/k8s.io/api/networking/v1/types.go +++ b/deps/k8s.io/api/networking/v1/types.go @@ -161,22 +161,29 @@ type IPBlock struct { Except []string `json:"except,omitempty" protobuf:"bytes,2,rep,name=except"` } -// NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields -// must be specified. +// NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of +// fields are allowed type NetworkPolicyPeer struct { - // This is a label selector which selects Pods in this namespace. This field - // follows standard label selector semantics. If present but empty, this selector - // selects all pods in this namespace. + // This is a label selector which selects Pods. This field follows standard label + // selector semantics; if present but empty, it selects all pods. + // + // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. // +optional PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" protobuf:"bytes,1,opt,name=podSelector"` - // Selects Namespaces using cluster scoped-labels. This matches all pods in all - // namespaces selected by this label selector. This field follows standard label - // selector semantics. If present but empty, this selector selects all namespaces. + // Selects Namespaces using cluster-scoped labels. This field follows standard label + // selector semantics; if present but empty, it selects all namespaces. + // + // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects + // the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. + // Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,2,opt,name=namespaceSelector"` - // IPBlock defines policy on a particular IPBlock + // IPBlock defines policy on a particular IPBlock. If this field is set then + // neither of the other fields can be. // +optional IPBlock *IPBlock `json:"ipBlock,omitempty" protobuf:"bytes,3,rep,name=ipBlock"` } diff --git a/deps/k8s.io/api/networking/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/networking/v1/types_swagger_doc_generated.go index ad0bafeac..af2553a9d 100644 --- a/deps/k8s.io/api/networking/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/networking/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_IPBlock = map[string]string{ "": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule.", "cidr": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"", @@ -78,10 +78,10 @@ func (NetworkPolicyList) SwaggerDoc() map[string]string { } var map_NetworkPolicyPeer = map[string]string{ - "": "NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified.", - "podSelector": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.", - "namespaceSelector": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.", - "ipBlock": "IPBlock defines policy on a particular IPBlock", + "": "NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed", + "podSelector": "This is a label selector which selects Pods. This field follows standard label selector semantics; if present but empty, it selects all pods.\n\nIf NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace.", + "namespaceSelector": "Selects Namespaces using cluster-scoped labels. This field follows standard label selector semantics; if present but empty, it selects all namespaces.\n\nIf PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector.", + "ipBlock": "IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be.", } func (NetworkPolicyPeer) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/networking/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/networking/v1/zz_generated.deepcopy.go index 3dbe87055..d1e4e8845 100644 --- a/deps/k8s.io/api/networking/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/networking/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" ) @@ -71,9 +71,8 @@ func (in *NetworkPolicy) DeepCopy() *NetworkPolicy { func (in *NetworkPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -165,9 +164,8 @@ func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList { func (in *NetworkPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -175,30 +173,18 @@ func (in *NetworkPolicyPeer) DeepCopyInto(out *NetworkPolicyPeer) { *out = *in if in.PodSelector != nil { in, out := &in.PodSelector, &out.PodSelector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.LabelSelector) + (*in).DeepCopyInto(*out) } if in.IPBlock != nil { in, out := &in.IPBlock, &out.IPBlock - if *in == nil { - *out = nil - } else { - *out = new(IPBlock) - (*in).DeepCopyInto(*out) - } + *out = new(IPBlock) + (*in).DeepCopyInto(*out) } return } @@ -218,21 +204,13 @@ func (in *NetworkPolicyPort) DeepCopyInto(out *NetworkPolicyPort) { *out = *in if in.Protocol != nil { in, out := &in.Protocol, &out.Protocol - if *in == nil { - *out = nil - } else { - *out = new(core_v1.Protocol) - **out = **in - } + *out = new(corev1.Protocol) + **out = **in } if in.Port != nil { in, out := &in.Port, &out.Port - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } diff --git a/deps/k8s.io/api/policy/OWNERS b/deps/k8s.io/api/policy/OWNERS index 99e0bffb5..a245fde35 100755 --- a/deps/k8s.io/api/policy/OWNERS +++ b/deps/k8s.io/api/policy/OWNERS @@ -2,3 +2,7 @@ approvers: - sig-apps-api-approvers reviewers: - sig-apps-reviewers +- pweil- +- liggitt +- tallclair +- php-coder diff --git a/deps/k8s.io/api/policy/v1beta1/BUILD b/deps/k8s.io/api/policy/v1beta1/BUILD deleted file mode 100644 index 6e4a07deb..000000000 --- a/deps/k8s.io/api/policy/v1beta1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/policy/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/policy/v1beta1/generated.pb.go b/deps/k8s.io/api/policy/v1beta1/generated.pb.go index 4ed4d29ca..505fb0e03 100644 --- a/deps/k8s.io/api/policy/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/policy/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,11 +25,22 @@ limitations under the License. k8s.io/kubernetes/vendor/k8s.io/api/policy/v1beta1/generated.proto It has these top-level messages: + AllowedFlexVolume + AllowedHostPath Eviction + FSGroupStrategyOptions + HostPortRange + IDRange PodDisruptionBudget PodDisruptionBudgetList PodDisruptionBudgetSpec PodDisruptionBudgetStatus + PodSecurityPolicy + PodSecurityPolicyList + PodSecurityPolicySpec + RunAsUserStrategyOptions + SELinuxStrategyOptions + SupplementalGroupsStrategyOptions */ package v1beta1 @@ -37,6 +48,7 @@ import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" +import k8s_io_api_core_v1 "k8s.io/api/core/v1" import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" import k8s_io_apimachinery_pkg_util_intstr "k8s.io/apimachinery/pkg/util/intstr" @@ -59,35 +71,146 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +func (m *AllowedFlexVolume) Reset() { *m = AllowedFlexVolume{} } +func (*AllowedFlexVolume) ProtoMessage() {} +func (*AllowedFlexVolume) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *AllowedHostPath) Reset() { *m = AllowedHostPath{} } +func (*AllowedHostPath) ProtoMessage() {} +func (*AllowedHostPath) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + func (m *Eviction) Reset() { *m = Eviction{} } func (*Eviction) ProtoMessage() {} -func (*Eviction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } +func (*Eviction) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } +func (*FSGroupStrategyOptions) ProtoMessage() {} +func (*FSGroupStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *HostPortRange) Reset() { *m = HostPortRange{} } +func (*HostPortRange) ProtoMessage() {} +func (*HostPortRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *IDRange) Reset() { *m = IDRange{} } +func (*IDRange) ProtoMessage() {} +func (*IDRange) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } func (*PodDisruptionBudget) ProtoMessage() {} -func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } +func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (*PodDisruptionBudgetList) ProtoMessage() {} -func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } +func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (*PodDisruptionBudgetSpec) ProtoMessage() {} -func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } +func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{4} + return fileDescriptorGenerated, []int{9} +} + +func (m *PodSecurityPolicy) Reset() { *m = PodSecurityPolicy{} } +func (*PodSecurityPolicy) ProtoMessage() {} +func (*PodSecurityPolicy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } + +func (m *PodSecurityPolicyList) Reset() { *m = PodSecurityPolicyList{} } +func (*PodSecurityPolicyList) ProtoMessage() {} +func (*PodSecurityPolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } + +func (m *PodSecurityPolicySpec) Reset() { *m = PodSecurityPolicySpec{} } +func (*PodSecurityPolicySpec) ProtoMessage() {} +func (*PodSecurityPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } + +func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} } +func (*RunAsUserStrategyOptions) ProtoMessage() {} +func (*RunAsUserStrategyOptions) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{13} +} + +func (m *SELinuxStrategyOptions) Reset() { *m = SELinuxStrategyOptions{} } +func (*SELinuxStrategyOptions) ProtoMessage() {} +func (*SELinuxStrategyOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } + +func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } +func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} +func (*SupplementalGroupsStrategyOptions) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{15} } func init() { + proto.RegisterType((*AllowedFlexVolume)(nil), "k8s.io.api.policy.v1beta1.AllowedFlexVolume") + proto.RegisterType((*AllowedHostPath)(nil), "k8s.io.api.policy.v1beta1.AllowedHostPath") proto.RegisterType((*Eviction)(nil), "k8s.io.api.policy.v1beta1.Eviction") + proto.RegisterType((*FSGroupStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.FSGroupStrategyOptions") + proto.RegisterType((*HostPortRange)(nil), "k8s.io.api.policy.v1beta1.HostPortRange") + proto.RegisterType((*IDRange)(nil), "k8s.io.api.policy.v1beta1.IDRange") proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudget") proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetList") proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetSpec") proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetStatus") + proto.RegisterType((*PodSecurityPolicy)(nil), "k8s.io.api.policy.v1beta1.PodSecurityPolicy") + proto.RegisterType((*PodSecurityPolicyList)(nil), "k8s.io.api.policy.v1beta1.PodSecurityPolicyList") + proto.RegisterType((*PodSecurityPolicySpec)(nil), "k8s.io.api.policy.v1beta1.PodSecurityPolicySpec") + proto.RegisterType((*RunAsUserStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.RunAsUserStrategyOptions") + proto.RegisterType((*SELinuxStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.SELinuxStrategyOptions") + proto.RegisterType((*SupplementalGroupsStrategyOptions)(nil), "k8s.io.api.policy.v1beta1.SupplementalGroupsStrategyOptions") +} +func (m *AllowedFlexVolume) 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 *AllowedFlexVolume) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i += copy(dAtA[i:], m.Driver) + return i, nil +} + +func (m *AllowedHostPath) 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 *AllowedHostPath) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.PathPrefix))) + i += copy(dAtA[i:], m.PathPrefix) + dAtA[i] = 0x10 + i++ + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil } + func (m *Eviction) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -124,6 +247,88 @@ func (m *Eviction) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *FSGroupStrategyOptions) 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 *FSGroupStrategyOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule))) + i += copy(dAtA[i:], m.Rule) + if len(m.Ranges) > 0 { + for _, msg := range m.Ranges { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *HostPortRange) 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 *HostPortRange) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Min)) + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Max)) + return i, nil +} + +func (m *IDRange) 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 *IDRange) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Min)) + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Max)) + return i, nil +} + func (m *PodDisruptionBudget) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -316,202 +521,2412 @@ func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64Generated(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 encodeFixed32Generated(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 encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *PodSecurityPolicy) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return offset + 1 + return dAtA[:n], nil } -func (m *Eviction) Size() (n int) { + +func (m *PodSecurityPolicy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.DeleteOptions != nil { - l = m.DeleteOptions.Size() - n += 1 + l + sovGenerated(uint64(l)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n11, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err } - return n + i += n11 + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) + n12, err := m.Spec.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + return i, nil } -func (m *PodDisruptionBudget) Size() (n int) { - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n +func (m *PodSecurityPolicyList) 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 *PodDisruptionBudgetList) Size() (n int) { +func (m *PodSecurityPolicyList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n13, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n } } - return n + return i, nil } -func (m *PodDisruptionBudgetSpec) Size() (n int) { - var l int - _ = l - if m.MinAvailable != nil { - l = m.MinAvailable.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Selector != nil { - l = m.Selector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.MaxUnavailable != nil { - l = m.MaxUnavailable.Size() - n += 1 + l + sovGenerated(uint64(l)) +func (m *PodSecurityPolicySpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func (m *PodDisruptionBudgetStatus) Size() (n int) { +func (m *PodSecurityPolicySpec) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i var l int _ = l - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) - if len(m.DisruptedPods) > 0 { - for k, v := range m.DisruptedPods { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + dAtA[i] = 0x8 + i++ + if m.Privileged { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if len(m.DefaultAddCapabilities) > 0 { + for _, s := range m.DefaultAddCapabilities { + dAtA[i] = 0x12 + 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) } } - n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed)) - n += 1 + sovGenerated(uint64(m.CurrentHealthy)) - n += 1 + sovGenerated(uint64(m.DesiredHealthy)) - n += 1 + sovGenerated(uint64(m.ExpectedPods)) - return n + if len(m.RequiredDropCapabilities) > 0 { + for _, s := range m.RequiredDropCapabilities { + dAtA[i] = 0x1a + 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 len(m.AllowedCapabilities) > 0 { + for _, s := range m.AllowedCapabilities { + dAtA[i] = 0x22 + 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 len(m.Volumes) > 0 { + for _, s := range m.Volumes { + dAtA[i] = 0x2a + 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) + } + } + dAtA[i] = 0x30 + i++ + if m.HostNetwork { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if len(m.HostPorts) > 0 { + for _, msg := range m.HostPorts { + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + dAtA[i] = 0x40 + i++ + if m.HostPID { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x48 + i++ + if m.HostIPC { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x52 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.SELinux.Size())) + n14, err := m.SELinux.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + dAtA[i] = 0x5a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.RunAsUser.Size())) + n15, err := m.RunAsUser.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + dAtA[i] = 0x62 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.SupplementalGroups.Size())) + n16, err := m.SupplementalGroups.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + dAtA[i] = 0x6a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.FSGroup.Size())) + n17, err := m.FSGroup.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + dAtA[i] = 0x70 + i++ + if m.ReadOnlyRootFilesystem { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if m.DefaultAllowPrivilegeEscalation != nil { + dAtA[i] = 0x78 + i++ + if *m.DefaultAllowPrivilegeEscalation { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.AllowPrivilegeEscalation != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x1 + i++ + if *m.AllowPrivilegeEscalation { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.AllowedHostPaths) > 0 { + for _, msg := range m.AllowedHostPaths { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.AllowedFlexVolumes) > 0 { + for _, msg := range m.AllowedFlexVolumes { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.AllowedUnsafeSysctls) > 0 { + for _, s := range m.AllowedUnsafeSysctls { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + 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 len(m.ForbiddenSysctls) > 0 { + for _, s := range m.ForbiddenSysctls { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + 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) + } + } + return i, nil } -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } +func (m *RunAsUserStrategyOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - return n + return dAtA[:n], nil } -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + +func (m *RunAsUserStrategyOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule))) + i += copy(dAtA[i:], m.Rule) + if len(m.Ranges) > 0 { + for _, msg := range m.Ranges { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil } -func (this *Eviction) String() string { - if this == nil { - return "nil" + +func (m *SELinuxStrategyOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := strings.Join([]string{`&Eviction{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions", 1) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *PodDisruptionBudget) String() string { - if this == nil { - return "nil" + +func (m *SELinuxStrategyOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule))) + i += copy(dAtA[i:], m.Rule) + if m.SELinuxOptions != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.SELinuxOptions.Size())) + n18, err := m.SELinuxOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 } - s := strings.Join([]string{`&PodDisruptionBudget{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + return i, nil } -func (this *PodDisruptionBudgetList) String() string { - if this == nil { - return "nil" + +func (m *SupplementalGroupsStrategyOptions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err } - s := strings.Join([]string{`&PodDisruptionBudgetList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s + return dAtA[:n], nil } -func (this *PodDisruptionBudgetSpec) String() string { - if this == nil { - return "nil" + +func (m *SupplementalGroupsStrategyOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule))) + i += copy(dAtA[i:], m.Rule) + if len(m.Ranges) > 0 { + for _, msg := range m.Ranges { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } } - s := strings.Join([]string{`&PodDisruptionBudgetSpec{`, - `MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, - `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, - `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, - `}`, - }, "") - return s + return i, nil } -func (this *PodDisruptionBudgetStatus) String() string { - if this == nil { - return "nil" + +func encodeFixed64Generated(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 encodeFixed32Generated(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 encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods)) - for k := range this.DisruptedPods { - keysForDisruptedPods = append(keysForDisruptedPods, k) + dAtA[offset] = uint8(v) + return offset + 1 +} +func (m *AllowedFlexVolume) Size() (n int) { + var l int + _ = l + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *AllowedHostPath) Size() (n int) { + var l int + _ = l + l = len(m.PathPrefix) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + return n +} + +func (m *Eviction) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.DeleteOptions != nil { + l = m.DeleteOptions.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *FSGroupStrategyOptions) Size() (n int) { + var l int + _ = l + l = len(m.Rule) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Ranges) > 0 { + for _, e := range m.Ranges { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *HostPortRange) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Min)) + n += 1 + sovGenerated(uint64(m.Max)) + return n +} + +func (m *IDRange) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.Min)) + n += 1 + sovGenerated(uint64(m.Max)) + return n +} + +func (m *PodDisruptionBudget) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *PodDisruptionBudgetList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PodDisruptionBudgetSpec) Size() (n int) { + var l int + _ = l + if m.MinAvailable != nil { + l = m.MinAvailable.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Selector != nil { + l = m.Selector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.MaxUnavailable != nil { + l = m.MaxUnavailable.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *PodDisruptionBudgetStatus) Size() (n int) { + var l int + _ = l + n += 1 + sovGenerated(uint64(m.ObservedGeneration)) + if len(m.DisruptedPods) > 0 { + for k, v := range m.DisruptedPods { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + n += 1 + sovGenerated(uint64(m.PodDisruptionsAllowed)) + n += 1 + sovGenerated(uint64(m.CurrentHealthy)) + n += 1 + sovGenerated(uint64(m.DesiredHealthy)) + n += 1 + sovGenerated(uint64(m.ExpectedPods)) + return n +} + +func (m *PodSecurityPolicy) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *PodSecurityPolicyList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PodSecurityPolicySpec) Size() (n int) { + var l int + _ = l + n += 2 + if len(m.DefaultAddCapabilities) > 0 { + for _, s := range m.DefaultAddCapabilities { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.RequiredDropCapabilities) > 0 { + for _, s := range m.RequiredDropCapabilities { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.AllowedCapabilities) > 0 { + for _, s := range m.AllowedCapabilities { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Volumes) > 0 { + for _, s := range m.Volumes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 2 + if len(m.HostPorts) > 0 { + for _, e := range m.HostPorts { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 2 + n += 2 + l = m.SELinux.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.RunAsUser.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.SupplementalGroups.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.FSGroup.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + if m.DefaultAllowPrivilegeEscalation != nil { + n += 2 + } + if m.AllowPrivilegeEscalation != nil { + n += 3 + } + if len(m.AllowedHostPaths) > 0 { + for _, e := range m.AllowedHostPaths { + l = e.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + } + if len(m.AllowedFlexVolumes) > 0 { + for _, e := range m.AllowedFlexVolumes { + l = e.Size() + n += 2 + l + sovGenerated(uint64(l)) + } + } + if len(m.AllowedUnsafeSysctls) > 0 { + for _, s := range m.AllowedUnsafeSysctls { + l = len(s) + n += 2 + l + sovGenerated(uint64(l)) + } + } + if len(m.ForbiddenSysctls) > 0 { + for _, s := range m.ForbiddenSysctls { + l = len(s) + n += 2 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *RunAsUserStrategyOptions) Size() (n int) { + var l int + _ = l + l = len(m.Rule) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Ranges) > 0 { + for _, e := range m.Ranges { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *SELinuxStrategyOptions) Size() (n int) { + var l int + _ = l + l = len(m.Rule) + n += 1 + l + sovGenerated(uint64(l)) + if m.SELinuxOptions != nil { + l = m.SELinuxOptions.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *SupplementalGroupsStrategyOptions) Size() (n int) { + var l int + _ = l + l = len(m.Rule) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Ranges) > 0 { + for _, e := range m.Ranges { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AllowedFlexVolume) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllowedFlexVolume{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `}`, + }, "") + return s +} +func (this *AllowedHostPath) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllowedHostPath{`, + `PathPrefix:` + fmt.Sprintf("%v", this.PathPrefix) + `,`, + `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`, + `}`, + }, "") + return s +} +func (this *Eviction) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Eviction{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions", 1) + `,`, + `}`, + }, "") + return s +} +func (this *FSGroupStrategyOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FSGroupStrategyOptions{`, + `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`, + `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *HostPortRange) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HostPortRange{`, + `Min:` + fmt.Sprintf("%v", this.Min) + `,`, + `Max:` + fmt.Sprintf("%v", this.Max) + `,`, + `}`, + }, "") + return s +} +func (this *IDRange) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IDRange{`, + `Min:` + fmt.Sprintf("%v", this.Min) + `,`, + `Max:` + fmt.Sprintf("%v", this.Max) + `,`, + `}`, + }, "") + return s +} +func (this *PodDisruptionBudget) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodDisruptionBudget{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodDisruptionBudgetList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodDisruptionBudgetList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodDisruptionBudgetSpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodDisruptionBudgetSpec{`, + `MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, + `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector", 1) + `,`, + `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "k8s_io_apimachinery_pkg_util_intstr.IntOrString", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodDisruptionBudgetStatus) String() string { + if this == nil { + return "nil" + } + keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods)) + for k := range this.DisruptedPods { + keysForDisruptedPods = append(keysForDisruptedPods, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) + mapStringForDisruptedPods := "map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time{" + for _, k := range keysForDisruptedPods { + mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k]) + } + mapStringForDisruptedPods += "}" + s := strings.Join([]string{`&PodDisruptionBudgetStatus{`, + `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, + `DisruptedPods:` + mapStringForDisruptedPods + `,`, + `PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`, + `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`, + `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`, + `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`, + `}`, + }, "") + return s +} +func (this *PodSecurityPolicy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSecurityPolicy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySpec", "PodSecurityPolicySpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSecurityPolicyList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSecurityPolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PodSecurityPolicy", "PodSecurityPolicy", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PodSecurityPolicySpec) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PodSecurityPolicySpec{`, + `Privileged:` + fmt.Sprintf("%v", this.Privileged) + `,`, + `DefaultAddCapabilities:` + fmt.Sprintf("%v", this.DefaultAddCapabilities) + `,`, + `RequiredDropCapabilities:` + fmt.Sprintf("%v", this.RequiredDropCapabilities) + `,`, + `AllowedCapabilities:` + fmt.Sprintf("%v", this.AllowedCapabilities) + `,`, + `Volumes:` + fmt.Sprintf("%v", this.Volumes) + `,`, + `HostNetwork:` + fmt.Sprintf("%v", this.HostNetwork) + `,`, + `HostPorts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.HostPorts), "HostPortRange", "HostPortRange", 1), `&`, ``, 1) + `,`, + `HostPID:` + fmt.Sprintf("%v", this.HostPID) + `,`, + `HostIPC:` + fmt.Sprintf("%v", this.HostIPC) + `,`, + `SELinux:` + strings.Replace(strings.Replace(this.SELinux.String(), "SELinuxStrategyOptions", "SELinuxStrategyOptions", 1), `&`, ``, 1) + `,`, + `RunAsUser:` + strings.Replace(strings.Replace(this.RunAsUser.String(), "RunAsUserStrategyOptions", "RunAsUserStrategyOptions", 1), `&`, ``, 1) + `,`, + `SupplementalGroups:` + strings.Replace(strings.Replace(this.SupplementalGroups.String(), "SupplementalGroupsStrategyOptions", "SupplementalGroupsStrategyOptions", 1), `&`, ``, 1) + `,`, + `FSGroup:` + strings.Replace(strings.Replace(this.FSGroup.String(), "FSGroupStrategyOptions", "FSGroupStrategyOptions", 1), `&`, ``, 1) + `,`, + `ReadOnlyRootFilesystem:` + fmt.Sprintf("%v", this.ReadOnlyRootFilesystem) + `,`, + `DefaultAllowPrivilegeEscalation:` + valueToStringGenerated(this.DefaultAllowPrivilegeEscalation) + `,`, + `AllowPrivilegeEscalation:` + valueToStringGenerated(this.AllowPrivilegeEscalation) + `,`, + `AllowedHostPaths:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedHostPaths), "AllowedHostPath", "AllowedHostPath", 1), `&`, ``, 1) + `,`, + `AllowedFlexVolumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedFlexVolumes), "AllowedFlexVolume", "AllowedFlexVolume", 1), `&`, ``, 1) + `,`, + `AllowedUnsafeSysctls:` + fmt.Sprintf("%v", this.AllowedUnsafeSysctls) + `,`, + `ForbiddenSysctls:` + fmt.Sprintf("%v", this.ForbiddenSysctls) + `,`, + `}`, + }, "") + return s +} +func (this *RunAsUserStrategyOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RunAsUserStrategyOptions{`, + `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`, + `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *SELinuxStrategyOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SELinuxStrategyOptions{`, + `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`, + `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "k8s_io_api_core_v1.SELinuxOptions", 1) + `,`, + `}`, + }, "") + return s +} +func (this *SupplementalGroupsStrategyOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SupplementalGroupsStrategyOptions{`, + `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`, + `Ranges:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ranges), "IDRange", "IDRange", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *AllowedFlexVolume) 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 ErrIntOverflowGenerated + } + 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: AllowedFlexVolume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllowedFlexVolume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Driver = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllowedHostPath) 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 ErrIntOverflowGenerated + } + 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: AllowedHostPath: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllowedHostPath: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PathPrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PathPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Eviction) 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 ErrIntOverflowGenerated + } + 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: Eviction: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Eviction: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeleteOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DeleteOptions == nil { + m.DeleteOptions = &k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions{} + } + if err := m.DeleteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FSGroupStrategyOptions) 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 ErrIntOverflowGenerated + } + 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: FSGroupStrategyOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FSGroupStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rule = FSGroupStrategyType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ranges = append(m.Ranges, IDRange{}) + if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HostPortRange) 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 ErrIntOverflowGenerated + } + 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: HostPortRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostPortRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + m.Min = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Min |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + m.Max = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Max |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IDRange) 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 ErrIntOverflowGenerated + } + 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: IDRange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IDRange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) + } + m.Min = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Min |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) + } + m.Max = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Max |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodDisruptionBudget) 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 ErrIntOverflowGenerated + } + 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: PodDisruptionBudget: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodDisruptionBudgetList) 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 ErrIntOverflowGenerated + } + 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: PodDisruptionBudgetList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, PodDisruptionBudget{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodDisruptionBudgetSpec) 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 ErrIntOverflowGenerated + } + 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: PodDisruptionBudgetSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodDisruptionBudgetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinAvailable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MinAvailable == nil { + m.MinAvailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} + } + if err := m.MinAvailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Selector == nil { + m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} + } + if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MaxUnavailable == nil { + m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} + } + if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodDisruptionBudgetStatus) 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 ErrIntOverflowGenerated + } + 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: PodDisruptionBudgetStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodDisruptionBudgetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + } + m.ObservedGeneration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ObservedGeneration |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.DisruptedPods == nil { + m.DisruptedPods = make(map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue := &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + m.DisruptedPods[mapkey] = *mapvalue + } else { + var mapvalue k8s_io_apimachinery_pkg_apis_meta_v1.Time + m.DisruptedPods[mapkey] = mapvalue + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType) + } + m.PodDisruptionsAllowed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType) + } + m.CurrentHealthy = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentHealthy |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType) + } + m.DesiredHealthy = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DesiredHealthy |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType) + } + m.ExpectedPods = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpectedPods |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSecurityPolicy) 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 ErrIntOverflowGenerated + } + 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: PodSecurityPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSecurityPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) - mapStringForDisruptedPods := "map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time{" - for _, k := range keysForDisruptedPods { - mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k]) + + if iNdEx > l { + return io.ErrUnexpectedEOF } - mapStringForDisruptedPods += "}" - s := strings.Join([]string{`&PodDisruptionBudgetStatus{`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, - `DisruptedPods:` + mapStringForDisruptedPods + `,`, - `PodDisruptionsAllowed:` + fmt.Sprintf("%v", this.PodDisruptionsAllowed) + `,`, - `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`, - `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`, - `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`, - `}`, - }, "") - return s + return nil } -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" +func (m *PodSecurityPolicyList) 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 ErrIntOverflowGenerated + } + 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: PodSecurityPolicyList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSecurityPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, PodSecurityPolicy{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *Eviction) Unmarshal(dAtA []byte) error { +func (m *PodSecurityPolicySpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -524,25 +2939,181 @@ func (m *Eviction) Unmarshal(dAtA []byte) error { if iNdEx >= l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break + 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: PodSecurityPolicySpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSecurityPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Privileged = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultAddCapabilities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DefaultAddCapabilities = append(m.DefaultAddCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredDropCapabilities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequiredDropCapabilities = append(m.RequiredDropCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedCapabilities", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedCapabilities = append(m.AllowedCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, FSType(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostNetwork", wireType) } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Eviction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Eviction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostNetwork = bool(v != 0) + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field HostPorts", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -566,13 +3137,54 @@ func (m *Eviction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.HostPorts = append(m.HostPorts, HostPortRange{}) + if err := m.HostPorts[len(m.HostPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPID", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostPID = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostIPC", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.HostIPC = bool(v != 0) + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeleteOptions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SELinux", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -596,66 +3208,73 @@ func (m *Eviction) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.DeleteOptions == nil { - m.DeleteOptions = &k8s_io_apimachinery_pkg_apis_meta_v1.DeleteOptions{} - } - if err := m.DeleteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SELinux.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType) } - if skippy < 0 { + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { return ErrInvalidLengthGenerated } - if (iNdEx + skippy) > l { + postIndex := iNdEx + msglen + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodDisruptionBudget) 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 ErrIntOverflowGenerated + if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if iNdEx >= l { + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break + if err := m.SupplementalGroups.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodDisruptionBudget: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -679,13 +3298,75 @@ func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FSGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnlyRootFilesystem = bool(v != 0) + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultAllowPrivilegeEscalation", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.DefaultAllowPrivilegeEscalation = &b + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowPrivilegeEscalation", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.AllowPrivilegeEscalation = &b + case 17: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllowedHostPaths", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -709,13 +3390,14 @@ func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.AllowedHostPaths = append(m.AllowedHostPaths, AllowedHostPath{}) + if err := m.AllowedHostPaths[len(m.AllowedHostPaths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 18: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AllowedFlexVolumes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -727,21 +3409,80 @@ func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedFlexVolumes = append(m.AllowedFlexVolumes, AllowedFlexVolume{}) + if err := m.AllowedFlexVolumes[len(m.AllowedFlexVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedUnsafeSysctls", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedUnsafeSysctls = append(m.AllowedUnsafeSysctls, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForbiddenSysctls", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ForbiddenSysctls = append(m.ForbiddenSysctls, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -764,7 +3505,7 @@ func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error { +func (m *RunAsUserStrategyOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -787,17 +3528,17 @@ func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodDisruptionBudgetList: wiretype end group for non-group") + return fmt.Errorf("proto: RunAsUserStrategyOptions: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RunAsUserStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -807,25 +3548,24 @@ func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Rule = RunAsUserStrategy(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -849,8 +3589,8 @@ func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, PodDisruptionBudget{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Ranges = append(m.Ranges, IDRange{}) + if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -875,7 +3615,7 @@ func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error { +func (m *SELinuxStrategyOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -898,17 +3638,17 @@ func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodDisruptionBudgetSpec: wiretype end group for non-group") + return fmt.Errorf("proto: SELinuxStrategyOptions: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodDisruptionBudgetSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SELinuxStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinAvailable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -918,61 +3658,24 @@ func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.MinAvailable == nil { - m.MinAvailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} - } - if err := m.MinAvailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Rule = SELinuxStrategy(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selector == nil { - m.Selector = &k8s_io_apimachinery_pkg_apis_meta_v1.LabelSelector{} - } - if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -996,10 +3699,10 @@ func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.MaxUnavailable == nil { - m.MaxUnavailable = &k8s_io_apimachinery_pkg_util_intstr.IntOrString{} + if m.SELinuxOptions == nil { + m.SELinuxOptions = &k8s_io_api_core_v1.SELinuxOptions{} } - if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1024,7 +3727,7 @@ func (m *PodDisruptionBudgetSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error { +func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1047,17 +3750,17 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodDisruptionBudgetStatus: wiretype end group for non-group") + return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodDisruptionBudgetStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) } - m.ObservedGeneration = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1067,14 +3770,24 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ObservedGeneration |= (int64(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rule = SupplementalGroupsStrategyType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisruptedPods", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1098,177 +3811,11 @@ func (m *PodDisruptionBudgetStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var keykey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - keykey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - if m.DisruptedPods == nil { - m.DisruptedPods = make(map[string]k8s_io_apimachinery_pkg_apis_meta_v1.Time) - } - if iNdEx < postIndex { - var valuekey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - valuekey |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue := &k8s_io_apimachinery_pkg_apis_meta_v1.Time{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - m.DisruptedPods[mapkey] = *mapvalue - } else { - var mapvalue k8s_io_apimachinery_pkg_apis_meta_v1.Time - m.DisruptedPods[mapkey] = mapvalue + m.Ranges = append(m.Ranges, IDRange{}) + if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PodDisruptionsAllowed", wireType) - } - m.PodDisruptionsAllowed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PodDisruptionsAllowed |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentHealthy", wireType) - } - m.CurrentHealthy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CurrentHealthy |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DesiredHealthy", wireType) - } - m.DesiredHealthy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DesiredHealthy |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpectedPods", wireType) - } - m.ExpectedPods = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpectedPods |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -1400,55 +3947,110 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 795 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 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xc5, 0xd6, 0xa1, 0xe5, 0xde, 0xb9, 0xb8, 0xb4, 0x5b, 0x2f, 0x2f, 0xed, 0xd6, - 0xab, 0x4b, 0xbb, 0xf5, 0x4b, 0x61, 0x5b, 0x17, 0x85, 0x6d, 0xbd, 0x2c, 0x6c, 0xeb, 0x55, 0x61, - 0x5b, 0x7f, 0x17, 0xb6, 0xf5, 0xdb, 0x3f, 0x76, 0xeb, 0xfb, 0xb7, 0xcc, 0xc5, 0xff, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x00, 0xc0, 0xac, 0xb5, 0x48, 0x08, 0x00, 0x00, + // 1679 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4f, 0x6f, 0x23, 0xb7, + 0x15, 0xf7, 0xac, 0x6c, 0x4b, 0xa6, 0x6d, 0xad, 0x4d, 0x7b, 0xdd, 0x89, 0xd1, 0xd5, 0x24, 0x0a, + 0x50, 0x6c, 0x83, 0x64, 0x14, 0x7b, 0x93, 0xd6, 0x68, 0xda, 0x22, 0x1e, 0xcb, 0xff, 0x02, 0xbb, + 0x56, 0xa9, 0xdd, 0xa0, 0x2d, 0xb6, 0x45, 0x29, 0x0d, 0x2d, 0x31, 0x1e, 0xcd, 0x4c, 0x49, 0x8e, + 0x22, 0xdd, 0x7a, 0xe8, 0xa1, 0xe8, 0xa9, 0x5f, 0xa0, 0x9f, 0xa0, 0xe8, 0xa9, 0x5f, 0xc2, 0x05, + 0x8a, 0x22, 0xc7, 0xa0, 0x07, 0xa1, 0xab, 0xa2, 0x5f, 0x22, 0xa7, 0x62, 0x28, 0x8e, 0xa4, 0xf9, + 0x23, 0x79, 0x1d, 0x60, 0xf7, 0xa6, 0xe1, 0xfb, 0xfd, 0x7e, 0xef, 0xf1, 0xf1, 0xf1, 0x91, 0x14, + 0xb0, 0x6e, 0x0e, 0xb8, 0x49, 0xbd, 0xca, 0x4d, 0x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0xa2, 0x6a, 0x73, 0xf1, 0x3f, 0x3c, + 0x62, 0x31, 0x86, 0xe7, 0x53, 0x78, 0x43, 0x51, 0x12, 0xd1, 0x16, 0x97, 0x6f, 0x8b, 0xf8, 0x18, + 0x4a, 0xa8, 0x95, 0xff, 0xae, 0x81, 0x77, 0xee, 0x6c, 0x50, 0xd0, 0x8a, 0x85, 0x6e, 0x26, 0x42, + 0x2f, 0xcd, 0x16, 0x78, 0x3d, 0xff, 0x7b, 0x58, 0x1f, 0xdc, 0xbe, 0x2c, 0x2d, 0x7c, 0xf5, 0xb2, + 0xb4, 0xf0, 0xf5, 0xcb, 0xd2, 0xc2, 0xef, 0x87, 0x25, 0xed, 0x76, 0x58, 0xd2, 0xbe, 0x1a, 0x96, + 0xb4, 0xaf, 0x87, 0x25, 0xed, 0x3f, 0xc3, 0x92, 0xf6, 0xe7, 0xff, 0x96, 0x16, 0x7e, 0x95, 0x57, + 0x72, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x91, 0xe5, 0x7f, 0xdc, 0x14, 0x00, 0x00, } diff --git a/deps/k8s.io/api/policy/v1beta1/generated.proto b/deps/k8s.io/api/policy/v1beta1/generated.proto index 2e01cf3d9..9353d423d 100644 --- a/deps/k8s.io/api/policy/v1beta1/generated.proto +++ b/deps/k8s.io/api/policy/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -30,6 +30,29 @@ import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; +// AllowedFlexVolume represents a single Flexvolume that is allowed to be used. +message AllowedFlexVolume { + // driver is the name of the Flexvolume driver. + optional string driver = 1; +} + +// AllowedHostPath defines the host volume conditions that will be enabled by a policy +// for pods to use. It requires the path prefix to be defined. +message AllowedHostPath { + // pathPrefix is the path prefix that the host volume must match. + // It does not support `*`. + // Trailing slashes are trimmed when validating the path prefix with a host path. + // + // Examples: + // `/foo` would allow `/foo`, `/foo/` and `/foo/bar` + // `/foo` would not allow `/food` or `/etc/foo` + optional string pathPrefix = 1; + + // when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. + // +optional + optional bool readOnly = 2; +} + // Eviction evicts a pod from its node subject to certain policies and safety constraints. // This is a subresource of Pod. A request to cause such an eviction is // created by POSTing to .../pods//evictions. @@ -41,6 +64,37 @@ message Eviction { optional k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions deleteOptions = 2; } +// FSGroupStrategyOptions defines the strategy type and options used to create the strategy. +message FSGroupStrategyOptions { + // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + // +optional + optional string rule = 1; + + // ranges are the allowed ranges of fs groups. If you would like to force a single + // fs group then supply a single range with the same start and end. Required for MustRunAs. + // +optional + repeated IDRange ranges = 2; +} + +// HostPortRange defines a range of host ports that will be enabled by a policy +// for pods to use. It requires both the start and end to be defined. +message HostPortRange { + // min is the start of the range, inclusive. + optional int32 min = 1; + + // max is the end of the range, inclusive. + optional int32 max = 2; +} + +// IDRange provides a min/max of an allowed range of IDs. +message IDRange { + // min is the start of the range, inclusive. + optional int64 min = 1; + + // max is the end of the range, inclusive. + optional int64 max = 2; +} + // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods message PodDisruptionBudget { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; @@ -97,6 +151,7 @@ message PodDisruptionBudgetStatus { // the list automatically by PodDisruptionBudget controller after some time. // If everything goes smooth this map should be empty for the most of the time. // Large number of entries in the map may indicate problems with pod deletions. + // +optional map disruptedPods = 2; // Number of pod disruptions that are currently allowed. @@ -112,3 +167,169 @@ message PodDisruptionBudgetStatus { optional int32 expectedPods = 6; } +// PodSecurityPolicy governs the ability to make requests that affect the Security Context +// that will be applied to a pod and container. +message PodSecurityPolicy { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // spec defines the policy enforced. + // +optional + optional PodSecurityPolicySpec spec = 2; +} + +// PodSecurityPolicyList is a list of PodSecurityPolicy objects. +message PodSecurityPolicyList { + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is a list of schema objects. + repeated PodSecurityPolicy items = 2; +} + +// PodSecurityPolicySpec defines the policy enforced. +message PodSecurityPolicySpec { + // privileged determines if a pod can request to be run as privileged. + // +optional + optional bool privileged = 1; + + // defaultAddCapabilities is the default set of capabilities that will be added to the container + // unless the pod spec specifically drops the capability. You may not list a capability in both + // defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly + // allowed, and need not be included in the allowedCapabilities list. + // +optional + repeated string defaultAddCapabilities = 2; + + // requiredDropCapabilities are the capabilities that will be dropped from the container. These + // are required to be dropped and cannot be added. + // +optional + repeated string requiredDropCapabilities = 3; + + // allowedCapabilities is a list of capabilities that can be requested to add to the container. + // Capabilities in this field may be added at the pod author's discretion. + // You must not list a capability in both allowedCapabilities and requiredDropCapabilities. + // +optional + repeated string allowedCapabilities = 4; + + // volumes is a white list of allowed volume plugins. Empty indicates that + // no volumes may be used. To allow all volumes you may use '*'. + // +optional + repeated string volumes = 5; + + // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. + // +optional + optional bool hostNetwork = 6; + + // hostPorts determines which host port ranges are allowed to be exposed. + // +optional + repeated HostPortRange hostPorts = 7; + + // hostPID determines if the policy allows the use of HostPID in the pod spec. + // +optional + optional bool hostPID = 8; + + // hostIPC determines if the policy allows the use of HostIPC in the pod spec. + // +optional + optional bool hostIPC = 9; + + // seLinux is the strategy that will dictate the allowable labels that may be set. + optional SELinuxStrategyOptions seLinux = 10; + + // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. + optional RunAsUserStrategyOptions runAsUser = 11; + + // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. + optional SupplementalGroupsStrategyOptions supplementalGroups = 12; + + // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. + optional FSGroupStrategyOptions fsGroup = 13; + + // readOnlyRootFilesystem when set to true will force containers to run with a read only root file + // system. If the container specifically requests to run with a non-read only root file system + // the PSP should deny the pod. + // If set to false the container may run with a read only root file system if it wishes but it + // will not be forced to. + // +optional + optional bool readOnlyRootFilesystem = 14; + + // defaultAllowPrivilegeEscalation controls the default setting for whether a + // process can gain more privileges than its parent process. + // +optional + optional bool defaultAllowPrivilegeEscalation = 15; + + // allowPrivilegeEscalation determines if a pod can request to allow + // privilege escalation. If unspecified, defaults to true. + // +optional + optional bool allowPrivilegeEscalation = 16; + + // allowedHostPaths is a white list of allowed host paths. Empty indicates + // that all host paths may be used. + // +optional + repeated AllowedHostPath allowedHostPaths = 17; + + // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes + // is allowed in the "volumes" field. + // +optional + repeated AllowedFlexVolume allowedFlexVolumes = 18; + + // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. + // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // + // Examples: + // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. + // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. + // +optional + repeated string allowedUnsafeSysctls = 19; + + // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. + // + // Examples: + // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. + // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. + // +optional + repeated string forbiddenSysctls = 20; +} + +// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. +message RunAsUserStrategyOptions { + // rule is the strategy that will dictate the allowable RunAsUser values that may be set. + optional string rule = 1; + + // ranges are the allowed ranges of uids that may be used. If you would like to force a single uid + // then supply a single range with the same start and end. Required for MustRunAs. + // +optional + repeated IDRange ranges = 2; +} + +// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. +message SELinuxStrategyOptions { + // rule is the strategy that will dictate the allowable labels that may be set. + optional string rule = 1; + + // seLinuxOptions required to run as; required for MustRunAs + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + // +optional + optional k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 2; +} + +// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. +message SupplementalGroupsStrategyOptions { + // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + // +optional + optional string rule = 1; + + // ranges are the allowed ranges of supplemental groups. If you would like to force a single + // supplemental group then supply a single range with the same start and end. Required for MustRunAs. + // +optional + repeated IDRange ranges = 2; +} + diff --git a/deps/k8s.io/api/policy/v1beta1/register.go b/deps/k8s.io/api/policy/v1beta1/register.go index d77f13040..b3efd6326 100644 --- a/deps/k8s.io/api/policy/v1beta1/register.go +++ b/deps/k8s.io/api/policy/v1beta1/register.go @@ -46,6 +46,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, + &PodSecurityPolicy{}, + &PodSecurityPolicyList{}, &Eviction{}, ) // Add the watch version that applies diff --git a/deps/k8s.io/api/policy/v1beta1/types.go b/deps/k8s.io/api/policy/v1beta1/types.go index a69a57207..3314e0c0e 100644 --- a/deps/k8s.io/api/policy/v1beta1/types.go +++ b/deps/k8s.io/api/policy/v1beta1/types.go @@ -17,6 +17,7 @@ limitations under the License. package v1beta1 import ( + "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" ) @@ -59,7 +60,8 @@ type PodDisruptionBudgetStatus struct { // the list automatically by PodDisruptionBudget controller after some time. // If everything goes smooth this map should be empty for the most of the time. // Large number of entries in the map may indicate problems with pod deletions. - DisruptedPods map[string]metav1.Time `json:"disruptedPods" protobuf:"bytes,2,rep,name=disruptedPods"` + // +optional + DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty" protobuf:"bytes,2,rep,name=disruptedPods"` // Number of pod disruptions that are currently allowed. PodDisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"` @@ -113,3 +115,280 @@ type Eviction struct { // DeleteOptions may be provided DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` } + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PodSecurityPolicy governs the ability to make requests that affect the Security Context +// that will be applied to a pod and container. +type PodSecurityPolicy struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // spec defines the policy enforced. + // +optional + Spec PodSecurityPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` +} + +// PodSecurityPolicySpec defines the policy enforced. +type PodSecurityPolicySpec struct { + // privileged determines if a pod can request to be run as privileged. + // +optional + Privileged bool `json:"privileged,omitempty" protobuf:"varint,1,opt,name=privileged"` + // defaultAddCapabilities is the default set of capabilities that will be added to the container + // unless the pod spec specifically drops the capability. You may not list a capability in both + // defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly + // allowed, and need not be included in the allowedCapabilities list. + // +optional + DefaultAddCapabilities []v1.Capability `json:"defaultAddCapabilities,omitempty" protobuf:"bytes,2,rep,name=defaultAddCapabilities,casttype=k8s.io/api/core/v1.Capability"` + // requiredDropCapabilities are the capabilities that will be dropped from the container. These + // are required to be dropped and cannot be added. + // +optional + RequiredDropCapabilities []v1.Capability `json:"requiredDropCapabilities,omitempty" protobuf:"bytes,3,rep,name=requiredDropCapabilities,casttype=k8s.io/api/core/v1.Capability"` + // allowedCapabilities is a list of capabilities that can be requested to add to the container. + // Capabilities in this field may be added at the pod author's discretion. + // You must not list a capability in both allowedCapabilities and requiredDropCapabilities. + // +optional + AllowedCapabilities []v1.Capability `json:"allowedCapabilities,omitempty" protobuf:"bytes,4,rep,name=allowedCapabilities,casttype=k8s.io/api/core/v1.Capability"` + // volumes is a white list of allowed volume plugins. Empty indicates that + // no volumes may be used. To allow all volumes you may use '*'. + // +optional + Volumes []FSType `json:"volumes,omitempty" protobuf:"bytes,5,rep,name=volumes,casttype=FSType"` + // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. + // +optional + HostNetwork bool `json:"hostNetwork,omitempty" protobuf:"varint,6,opt,name=hostNetwork"` + // hostPorts determines which host port ranges are allowed to be exposed. + // +optional + HostPorts []HostPortRange `json:"hostPorts,omitempty" protobuf:"bytes,7,rep,name=hostPorts"` + // hostPID determines if the policy allows the use of HostPID in the pod spec. + // +optional + HostPID bool `json:"hostPID,omitempty" protobuf:"varint,8,opt,name=hostPID"` + // hostIPC determines if the policy allows the use of HostIPC in the pod spec. + // +optional + HostIPC bool `json:"hostIPC,omitempty" protobuf:"varint,9,opt,name=hostIPC"` + // seLinux is the strategy that will dictate the allowable labels that may be set. + SELinux SELinuxStrategyOptions `json:"seLinux" protobuf:"bytes,10,opt,name=seLinux"` + // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. + RunAsUser RunAsUserStrategyOptions `json:"runAsUser" protobuf:"bytes,11,opt,name=runAsUser"` + // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. + SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups" protobuf:"bytes,12,opt,name=supplementalGroups"` + // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. + FSGroup FSGroupStrategyOptions `json:"fsGroup" protobuf:"bytes,13,opt,name=fsGroup"` + // readOnlyRootFilesystem when set to true will force containers to run with a read only root file + // system. If the container specifically requests to run with a non-read only root file system + // the PSP should deny the pod. + // If set to false the container may run with a read only root file system if it wishes but it + // will not be forced to. + // +optional + ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem,omitempty" protobuf:"varint,14,opt,name=readOnlyRootFilesystem"` + // defaultAllowPrivilegeEscalation controls the default setting for whether a + // process can gain more privileges than its parent process. + // +optional + DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty" protobuf:"varint,15,opt,name=defaultAllowPrivilegeEscalation"` + // allowPrivilegeEscalation determines if a pod can request to allow + // privilege escalation. If unspecified, defaults to true. + // +optional + AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,16,opt,name=allowPrivilegeEscalation"` + // allowedHostPaths is a white list of allowed host paths. Empty indicates + // that all host paths may be used. + // +optional + AllowedHostPaths []AllowedHostPath `json:"allowedHostPaths,omitempty" protobuf:"bytes,17,rep,name=allowedHostPaths"` + // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all + // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes + // is allowed in the "volumes" field. + // +optional + AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,18,rep,name=allowedFlexVolumes"` + // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. + // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. + // + // Examples: + // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. + // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. + // +optional + AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty" protobuf:"bytes,19,rep,name=allowedUnsafeSysctls"` + // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered + // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. + // + // Examples: + // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. + // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. + // +optional + ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" protobuf:"bytes,20,rep,name=forbiddenSysctls"` +} + +// AllowedHostPath defines the host volume conditions that will be enabled by a policy +// for pods to use. It requires the path prefix to be defined. +type AllowedHostPath struct { + // pathPrefix is the path prefix that the host volume must match. + // It does not support `*`. + // Trailing slashes are trimmed when validating the path prefix with a host path. + // + // Examples: + // `/foo` would allow `/foo`, `/foo/` and `/foo/bar` + // `/foo` would not allow `/food` or `/etc/foo` + PathPrefix string `json:"pathPrefix,omitempty" protobuf:"bytes,1,rep,name=pathPrefix"` + + // when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. + // +optional + ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"` +} + +// FSType gives strong typing to different file systems that are used by volumes. +type FSType string + +var ( + AzureFile FSType = "azureFile" + Flocker FSType = "flocker" + FlexVolume FSType = "flexVolume" + HostPath FSType = "hostPath" + EmptyDir FSType = "emptyDir" + GCEPersistentDisk FSType = "gcePersistentDisk" + AWSElasticBlockStore FSType = "awsElasticBlockStore" + GitRepo FSType = "gitRepo" + Secret FSType = "secret" + NFS FSType = "nfs" + ISCSI FSType = "iscsi" + Glusterfs FSType = "glusterfs" + PersistentVolumeClaim FSType = "persistentVolumeClaim" + RBD FSType = "rbd" + Cinder FSType = "cinder" + CephFS FSType = "cephFS" + DownwardAPI FSType = "downwardAPI" + FC FSType = "fc" + ConfigMap FSType = "configMap" + Quobyte FSType = "quobyte" + AzureDisk FSType = "azureDisk" + All FSType = "*" +) + +// AllowedFlexVolume represents a single Flexvolume that is allowed to be used. +type AllowedFlexVolume struct { + // driver is the name of the Flexvolume driver. + Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` +} + +// HostPortRange defines a range of host ports that will be enabled by a policy +// for pods to use. It requires both the start and end to be defined. +type HostPortRange struct { + // min is the start of the range, inclusive. + Min int32 `json:"min" protobuf:"varint,1,opt,name=min"` + // max is the end of the range, inclusive. + Max int32 `json:"max" protobuf:"varint,2,opt,name=max"` +} + +// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. +type SELinuxStrategyOptions struct { + // rule is the strategy that will dictate the allowable labels that may be set. + Rule SELinuxStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=SELinuxStrategy"` + // seLinuxOptions required to run as; required for MustRunAs + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + // +optional + SELinuxOptions *v1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"` +} + +// SELinuxStrategy denotes strategy types for generating SELinux options for a +// Security Context. +type SELinuxStrategy string + +const ( + // SELinuxStrategyMustRunAs means that container must have SELinux labels of X applied. + SELinuxStrategyMustRunAs SELinuxStrategy = "MustRunAs" + // SELinuxStrategyRunAsAny means that container may make requests for any SELinux context labels. + SELinuxStrategyRunAsAny SELinuxStrategy = "RunAsAny" +) + +// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. +type RunAsUserStrategyOptions struct { + // rule is the strategy that will dictate the allowable RunAsUser values that may be set. + Rule RunAsUserStrategy `json:"rule" protobuf:"bytes,1,opt,name=rule,casttype=RunAsUserStrategy"` + // ranges are the allowed ranges of uids that may be used. If you would like to force a single uid + // then supply a single range with the same start and end. Required for MustRunAs. + // +optional + Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` +} + +// IDRange provides a min/max of an allowed range of IDs. +type IDRange struct { + // min is the start of the range, inclusive. + Min int64 `json:"min" protobuf:"varint,1,opt,name=min"` + // max is the end of the range, inclusive. + Max int64 `json:"max" protobuf:"varint,2,opt,name=max"` +} + +// RunAsUserStrategy denotes strategy types for generating RunAsUser values for a +// Security Context. +type RunAsUserStrategy string + +const ( + // RunAsUserStrategyMustRunAs means that container must run as a particular uid. + RunAsUserStrategyMustRunAs RunAsUserStrategy = "MustRunAs" + // RunAsUserStrategyMustRunAsNonRoot means that container must run as a non-root uid. + RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategy = "MustRunAsNonRoot" + // RunAsUserStrategyRunAsAny means that container may make requests for any uid. + RunAsUserStrategyRunAsAny RunAsUserStrategy = "RunAsAny" +) + +// FSGroupStrategyOptions defines the strategy type and options used to create the strategy. +type FSGroupStrategyOptions struct { + // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + // +optional + Rule FSGroupStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=FSGroupStrategyType"` + // ranges are the allowed ranges of fs groups. If you would like to force a single + // fs group then supply a single range with the same start and end. Required for MustRunAs. + // +optional + Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` +} + +// FSGroupStrategyType denotes strategy types for generating FSGroup values for a +// SecurityContext +type FSGroupStrategyType string + +const ( + // FSGroupStrategyMustRunAs meant that container must have FSGroup of X applied. + FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs" + // FSGroupStrategyRunAsAny means that container may make requests for any FSGroup labels. + FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny" +) + +// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. +type SupplementalGroupsStrategyOptions struct { + // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + // +optional + Rule SupplementalGroupsStrategyType `json:"rule,omitempty" protobuf:"bytes,1,opt,name=rule,casttype=SupplementalGroupsStrategyType"` + // ranges are the allowed ranges of supplemental groups. If you would like to force a single + // supplemental group then supply a single range with the same start and end. Required for MustRunAs. + // +optional + Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` +} + +// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental +// groups for a SecurityContext. +type SupplementalGroupsStrategyType string + +const ( + // SupplementalGroupsStrategyMustRunAs means that container must run as a particular gid. + SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs" + // SupplementalGroupsStrategyRunAsAny means that container may make requests for any gid. + SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PodSecurityPolicyList is a list of PodSecurityPolicy objects. +type PodSecurityPolicyList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is a list of schema objects. + Items []PodSecurityPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/deps/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go index 29432506d..122287645 100644 --- a/deps/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,26 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_AllowedFlexVolume = map[string]string{ + "": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", + "driver": "driver is the name of the Flexvolume driver.", +} + +func (AllowedFlexVolume) SwaggerDoc() map[string]string { + return map_AllowedFlexVolume +} + +var map_AllowedHostPath = map[string]string{ + "": "AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", + "pathPrefix": "pathPrefix is the path prefix that the host volume must match. It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", + "readOnly": "when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly.", +} + +func (AllowedHostPath) SwaggerDoc() map[string]string { + return map_AllowedHostPath +} + var map_Eviction = map[string]string{ "": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions.", "metadata": "ObjectMeta describes the pod that is being evicted.", @@ -37,6 +56,36 @@ func (Eviction) SwaggerDoc() map[string]string { return map_Eviction } +var map_FSGroupStrategyOptions = map[string]string{ + "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "rule": "rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", + "ranges": "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs.", +} + +func (FSGroupStrategyOptions) SwaggerDoc() map[string]string { + return map_FSGroupStrategyOptions +} + +var map_HostPortRange = map[string]string{ + "": "HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "min": "min is the start of the range, inclusive.", + "max": "max is the end of the range, inclusive.", +} + +func (HostPortRange) SwaggerDoc() map[string]string { + return map_HostPortRange +} + +var map_IDRange = map[string]string{ + "": "IDRange provides a min/max of an allowed range of IDs.", + "min": "min is the start of the range, inclusive.", + "max": "max is the end of the range, inclusive.", +} + +func (IDRange) SwaggerDoc() map[string]string { + return map_IDRange +} + var map_PodDisruptionBudget = map[string]string{ "": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "spec": "Specification of the desired behavior of the PodDisruptionBudget.", @@ -80,4 +129,82 @@ func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string { return map_PodDisruptionBudgetStatus } +var map_PodSecurityPolicy = map[string]string{ + "": "PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "spec": "spec defines the policy enforced.", +} + +func (PodSecurityPolicy) SwaggerDoc() map[string]string { + return map_PodSecurityPolicy +} + +var map_PodSecurityPolicyList = map[string]string{ + "": "PodSecurityPolicyList is a list of PodSecurityPolicy objects.", + "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "items": "items is a list of schema objects.", +} + +func (PodSecurityPolicyList) SwaggerDoc() map[string]string { + return map_PodSecurityPolicyList +} + +var map_PodSecurityPolicySpec = map[string]string{ + "": "PodSecurityPolicySpec defines the policy enforced.", + "privileged": "privileged determines if a pod can request to be run as privileged.", + "defaultAddCapabilities": "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.", + "requiredDropCapabilities": "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", + "allowedCapabilities": "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.", + "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'.", + "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", + "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.", + "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.", + "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", + "seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.", + "runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", + "supplementalGroups": "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", + "fsGroup": "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", + "readOnlyRootFilesystem": "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", + "defaultAllowPrivilegeEscalation": "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", + "allowPrivilegeEscalation": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", + "allowedHostPaths": "allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.", + "allowedFlexVolumes": "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"volumes\" field.", + "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", + "forbiddenSysctls": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", +} + +func (PodSecurityPolicySpec) SwaggerDoc() map[string]string { + return map_PodSecurityPolicySpec +} + +var map_RunAsUserStrategyOptions = map[string]string{ + "": "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", + "rule": "rule is the strategy that will dictate the allowable RunAsUser values that may be set.", + "ranges": "ranges are the allowed ranges of uids that may be used. If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs.", +} + +func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string { + return map_RunAsUserStrategyOptions +} + +var map_SELinuxStrategyOptions = map[string]string{ + "": "SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.", + "rule": "rule is the strategy that will dictate the allowable labels that may be set.", + "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", +} + +func (SELinuxStrategyOptions) SwaggerDoc() map[string]string { + return map_SELinuxStrategyOptions +} + +var map_SupplementalGroupsStrategyOptions = map[string]string{ + "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + "rule": "rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", + "ranges": "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs.", +} + +func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string { + return map_SupplementalGroupsStrategyOptions +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/deps/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go index 78a597b5b..96e350967 100644 --- a/deps/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,16 +16,49 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedFlexVolume) DeepCopyInto(out *AllowedFlexVolume) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedFlexVolume. +func (in *AllowedFlexVolume) DeepCopy() *AllowedFlexVolume { + if in == nil { + return nil + } + out := new(AllowedFlexVolume) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AllowedHostPath) DeepCopyInto(out *AllowedHostPath) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedHostPath. +func (in *AllowedHostPath) DeepCopy() *AllowedHostPath { + if in == nil { + return nil + } + out := new(AllowedHostPath) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Eviction) DeepCopyInto(out *Eviction) { *out = *in @@ -33,12 +66,8 @@ func (in *Eviction) DeepCopyInto(out *Eviction) { in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions - if *in == nil { - *out = nil - } else { - *out = new(v1.DeleteOptions) - (*in).DeepCopyInto(*out) - } + *out = new(v1.DeleteOptions) + (*in).DeepCopyInto(*out) } return } @@ -57,9 +86,61 @@ func (in *Eviction) DeepCopy() *Eviction { func (in *Eviction) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FSGroupStrategyOptions) DeepCopyInto(out *FSGroupStrategyOptions) { + *out = *in + if in.Ranges != nil { + in, out := &in.Ranges, &out.Ranges + *out = make([]IDRange, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FSGroupStrategyOptions. +func (in *FSGroupStrategyOptions) DeepCopy() *FSGroupStrategyOptions { + if in == nil { + return nil + } + out := new(FSGroupStrategyOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HostPortRange) DeepCopyInto(out *HostPortRange) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPortRange. +func (in *HostPortRange) DeepCopy() *HostPortRange { + if in == nil { + return nil + } + out := new(HostPortRange) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IDRange) DeepCopyInto(out *IDRange) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IDRange. +func (in *IDRange) DeepCopy() *IDRange { + if in == nil { return nil } + out := new(IDRange) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -86,9 +167,8 @@ func (in *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget { func (in *PodDisruptionBudget) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -120,9 +200,8 @@ func (in *PodDisruptionBudgetList) DeepCopy() *PodDisruptionBudgetList { func (in *PodDisruptionBudgetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -130,30 +209,18 @@ func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) { *out = *in if in.MinAvailable != nil { in, out := &in.MinAvailable, &out.MinAvailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable - if *in == nil { - *out = nil - } else { - *out = new(intstr.IntOrString) - **out = **in - } + *out = new(intstr.IntOrString) + **out = **in } return } @@ -190,3 +257,201 @@ func (in *PodDisruptionBudgetStatus) DeepCopy() *PodDisruptionBudgetStatus { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodSecurityPolicy) DeepCopyInto(out *PodSecurityPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicy. +func (in *PodSecurityPolicy) DeepCopy() *PodSecurityPolicy { + if in == nil { + return nil + } + out := new(PodSecurityPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PodSecurityPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodSecurityPolicyList) DeepCopyInto(out *PodSecurityPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PodSecurityPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyList. +func (in *PodSecurityPolicyList) DeepCopy() *PodSecurityPolicyList { + if in == nil { + return nil + } + out := new(PodSecurityPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PodSecurityPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodSecurityPolicySpec) DeepCopyInto(out *PodSecurityPolicySpec) { + *out = *in + if in.DefaultAddCapabilities != nil { + in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities + *out = make([]corev1.Capability, len(*in)) + copy(*out, *in) + } + if in.RequiredDropCapabilities != nil { + in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities + *out = make([]corev1.Capability, len(*in)) + copy(*out, *in) + } + if in.AllowedCapabilities != nil { + in, out := &in.AllowedCapabilities, &out.AllowedCapabilities + *out = make([]corev1.Capability, len(*in)) + copy(*out, *in) + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]FSType, len(*in)) + copy(*out, *in) + } + if in.HostPorts != nil { + in, out := &in.HostPorts, &out.HostPorts + *out = make([]HostPortRange, len(*in)) + copy(*out, *in) + } + in.SELinux.DeepCopyInto(&out.SELinux) + in.RunAsUser.DeepCopyInto(&out.RunAsUser) + in.SupplementalGroups.DeepCopyInto(&out.SupplementalGroups) + in.FSGroup.DeepCopyInto(&out.FSGroup) + if in.DefaultAllowPrivilegeEscalation != nil { + in, out := &in.DefaultAllowPrivilegeEscalation, &out.DefaultAllowPrivilegeEscalation + *out = new(bool) + **out = **in + } + if in.AllowPrivilegeEscalation != nil { + in, out := &in.AllowPrivilegeEscalation, &out.AllowPrivilegeEscalation + *out = new(bool) + **out = **in + } + if in.AllowedHostPaths != nil { + in, out := &in.AllowedHostPaths, &out.AllowedHostPaths + *out = make([]AllowedHostPath, len(*in)) + copy(*out, *in) + } + if in.AllowedFlexVolumes != nil { + in, out := &in.AllowedFlexVolumes, &out.AllowedFlexVolumes + *out = make([]AllowedFlexVolume, len(*in)) + copy(*out, *in) + } + if in.AllowedUnsafeSysctls != nil { + in, out := &in.AllowedUnsafeSysctls, &out.AllowedUnsafeSysctls + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ForbiddenSysctls != nil { + in, out := &in.ForbiddenSysctls, &out.ForbiddenSysctls + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySpec. +func (in *PodSecurityPolicySpec) DeepCopy() *PodSecurityPolicySpec { + if in == nil { + return nil + } + out := new(PodSecurityPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RunAsUserStrategyOptions) DeepCopyInto(out *RunAsUserStrategyOptions) { + *out = *in + if in.Ranges != nil { + in, out := &in.Ranges, &out.Ranges + *out = make([]IDRange, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunAsUserStrategyOptions. +func (in *RunAsUserStrategyOptions) DeepCopy() *RunAsUserStrategyOptions { + if in == nil { + return nil + } + out := new(RunAsUserStrategyOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SELinuxStrategyOptions) DeepCopyInto(out *SELinuxStrategyOptions) { + *out = *in + if in.SELinuxOptions != nil { + in, out := &in.SELinuxOptions, &out.SELinuxOptions + *out = new(corev1.SELinuxOptions) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SELinuxStrategyOptions. +func (in *SELinuxStrategyOptions) DeepCopy() *SELinuxStrategyOptions { + if in == nil { + return nil + } + out := new(SELinuxStrategyOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SupplementalGroupsStrategyOptions) DeepCopyInto(out *SupplementalGroupsStrategyOptions) { + *out = *in + if in.Ranges != nil { + in, out := &in.Ranges, &out.Ranges + *out = make([]IDRange, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupplementalGroupsStrategyOptions. +func (in *SupplementalGroupsStrategyOptions) DeepCopy() *SupplementalGroupsStrategyOptions { + if in == nil { + return nil + } + out := new(SupplementalGroupsStrategyOptions) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/api/rbac/v1/BUILD b/deps/k8s.io/api/rbac/v1/BUILD deleted file mode 100644 index 539afb7ae..000000000 --- a/deps/k8s.io/api/rbac/v1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/rbac/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/rbac/v1/generated.pb.go b/deps/k8s.io/api/rbac/v1/generated.pb.go index 5343731cc..21010fbee 100644 --- a/deps/k8s.io/api/rbac/v1/generated.pb.go +++ b/deps/k8s.io/api/rbac/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2693,57 +2693,56 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 827 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0xcf, 0x8b, 0x23, 0x45, - 0x18, 0x4d, 0x65, 0x12, 0x26, 0x5d, 0x31, 0xc4, 0x2d, 0x17, 0x69, 0xa2, 0x74, 0x86, 0x16, 0x24, - 0xa0, 0x76, 0x9b, 0x5d, 0x51, 0x41, 0xf6, 0xb0, 0xbd, 0xa2, 0x0c, 0x3b, 0x8e, 0x4b, 0x2d, 0x7a, - 0x10, 0x0f, 0x56, 0x77, 0x6a, 0x3b, 0x65, 0xfa, 0x17, 0x55, 0xd5, 0x81, 0xc5, 0x8b, 0x08, 0x1e, - 0xbc, 0x79, 0xd4, 0xbf, 0xc0, 0x8b, 0x1e, 0xfd, 0x0b, 0xbc, 0xcc, 0x71, 0x8f, 0x7b, 0x0a, 0x4e, - 0xfb, 0x87, 0x28, 0xfd, 0x2b, 0x9d, 0xa4, 0x3b, 0x4e, 0x4e, 0x01, 0xf1, 0x34, 0x53, 0xdf, 0xf7, - 0xde, 0xfb, 0x5e, 0xbf, 0xa9, 0xaf, 0x06, 0x7e, 0xb0, 0x78, 0x5f, 0x18, 0x2c, 0x34, 0x17, 0xb1, - 0x4d, 0x79, 0x40, 0x25, 0x15, 0xe6, 0x92, 0x06, 0xb3, 0x90, 0x9b, 0x45, 0x83, 0x44, 0xcc, 0xe4, - 0x36, 0x71, 0xcc, 0xe5, 0xd4, 0x74, 0x69, 0x40, 0x39, 0x91, 0x74, 0x66, 0x44, 0x3c, 0x94, 0x21, - 0x42, 0x39, 0xc6, 0x20, 0x11, 0x33, 0x52, 0x8c, 0xb1, 0x9c, 0x8e, 0xde, 0x72, 0x99, 0x9c, 0xc7, - 0xb6, 0xe1, 0x84, 0xbe, 0xe9, 0x86, 0x6e, 0x68, 0x66, 0x50, 0x3b, 0x7e, 0x92, 0x9d, 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0x19, 0xce, 0x3a, 0x29, 0x22, 0x20, 0x7e, 0xfe, 0x6f, 0x75, 0x03, 0x91, 0x6e, 0x33, 0xce, - 0x3a, 0xfa, 0xaf, 0x00, 0x9e, 0x16, 0xb7, 0x67, 0xad, 0x07, 0xf6, 0xea, 0x6d, 0xfa, 0x6b, 0x1f, - 0xe2, 0xef, 0xdf, 0xa7, 0x23, 0x13, 0x2a, 0xe9, 0x4f, 0x11, 0x11, 0x87, 0xaa, 0x9d, 0x0c, 0x76, - 0xab, 0x80, 0x29, 0x97, 0x65, 0x03, 0x57, 0x18, 0x6b, 0x72, 0x75, 0xad, 0xb5, 0x9e, 0x5d, 0x6b, - 0xad, 0xe7, 0xd7, 0x5a, 0xeb, 0xdb, 0x44, 0x03, 0x57, 0x89, 0x06, 0x9e, 0x25, 0x1a, 0x78, 0x9e, - 0x68, 0xe0, 0xcf, 0x44, 0x03, 0x3f, 0xfe, 0xa5, 0xb5, 0xbe, 0x68, 0x2f, 0xa7, 0xff, 0x04, 0x00, - 0x00, 0xff, 0xff, 0x32, 0xe3, 0x23, 0xf8, 0x2e, 0x0b, 0x00, 0x00, + // 807 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x55, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0xce, 0xa4, 0x89, 0x1a, 0x4f, 0x88, 0x42, 0x87, 0x0a, 0x59, 0x05, 0x39, 0x95, 0x91, 0x50, + 0x25, 0xc0, 0x26, 0x05, 0x01, 0x12, 0xea, 0xa1, 0x2e, 0x02, 0x55, 0x2d, 0xa5, 0x9a, 0x0a, 0x0e, + 0x88, 0x03, 0x63, 0x67, 0xea, 0x0e, 0xf1, 0x2f, 0xcd, 0xd8, 0x91, 0x2a, 0x2e, 0x08, 0x89, 0x03, + 0xb7, 0x3d, 0xee, 0xfe, 0x05, 0x7b, 0xd9, 0x3d, 0xee, 0x5f, 0xb0, 0x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0x98, 0xcf, 0x0a, 0x00, 0x00, } diff --git a/deps/k8s.io/api/rbac/v1/generated.proto b/deps/k8s.io/api/rbac/v1/generated.proto index 2f8d863df..4b321a7c2 100644 --- a/deps/k8s.io/api/rbac/v1/generated.proto +++ b/deps/k8s.io/api/rbac/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,9 @@ syntax = 'proto2'; package k8s.io.api.rbac.v1; -import "k8s.io/api/rbac/v1alpha1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; @@ -62,6 +60,7 @@ message ClusterRoleBinding { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. + // +optional repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -134,6 +133,7 @@ message RoleBinding { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. + // +optional repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/deps/k8s.io/api/rbac/v1/types.go b/deps/k8s.io/api/rbac/v1/types.go index 91990548b..17163cbb2 100644 --- a/deps/k8s.io/api/rbac/v1/types.go +++ b/deps/k8s.io/api/rbac/v1/types.go @@ -124,7 +124,8 @@ type RoleBinding struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. - Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + // +optional + Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. // If the RoleRef cannot be resolved, the Authorizer must return an error. @@ -199,7 +200,8 @@ type ClusterRoleBinding struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. - Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + // +optional + Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. // If the RoleRef cannot be resolved, the Authorizer must return an error. diff --git a/deps/k8s.io/api/rbac/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/rbac/v1/types_swagger_doc_generated.go index 280ae5a82..0ec20c88e 100644 --- a/deps/k8s.io/api/rbac/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/rbac/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", diff --git a/deps/k8s.io/api/rbac/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/rbac/v1/zz_generated.deepcopy.go index 085edaa12..07eb321ea 100644 --- a/deps/k8s.io/api/rbac/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/rbac/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -30,7 +30,7 @@ func (in *AggregationRule) DeepCopyInto(out *AggregationRule) { *out = *in if in.ClusterRoleSelectors != nil { in, out := &in.ClusterRoleSelectors, &out.ClusterRoleSelectors - *out = make([]meta_v1.LabelSelector, len(*in)) + *out = make([]metav1.LabelSelector, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -62,12 +62,8 @@ func (in *ClusterRole) DeepCopyInto(out *ClusterRole) { } if in.AggregationRule != nil { in, out := &in.AggregationRule, &out.AggregationRule - if *in == nil { - *out = nil - } else { - *out = new(AggregationRule) - (*in).DeepCopyInto(*out) - } + *out = new(AggregationRule) + (*in).DeepCopyInto(*out) } return } @@ -86,9 +82,8 @@ func (in *ClusterRole) DeepCopy() *ClusterRole { func (in *ClusterRole) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -119,9 +114,8 @@ func (in *ClusterRoleBinding) DeepCopy() *ClusterRoleBinding { func (in *ClusterRoleBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -153,9 +147,8 @@ func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList { func (in *ClusterRoleBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -187,9 +180,8 @@ func (in *ClusterRoleList) DeepCopy() *ClusterRoleList { func (in *ClusterRoleList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -262,9 +254,8 @@ func (in *Role) DeepCopy() *Role { func (in *Role) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -295,9 +286,8 @@ func (in *RoleBinding) DeepCopy() *RoleBinding { func (in *RoleBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -329,9 +319,8 @@ func (in *RoleBindingList) DeepCopy() *RoleBindingList { func (in *RoleBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -363,9 +352,8 @@ func (in *RoleList) DeepCopy() *RoleList { func (in *RoleList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/rbac/v1alpha1/BUILD b/deps/k8s.io/api/rbac/v1alpha1/BUILD deleted file mode 100644 index 68d7cdfbb..000000000 --- a/deps/k8s.io/api/rbac/v1alpha1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/rbac/v1alpha1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/rbac/v1alpha1/generated.pb.go b/deps/k8s.io/api/rbac/v1alpha1/generated.pb.go index c07cdc75d..71eced8d4 100644 --- a/deps/k8s.io/api/rbac/v1alpha1/generated.pb.go +++ b/deps/k8s.io/api/rbac/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2693,58 +2693,57 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 844 bytes of a gzipped FileDescriptorProto + // 830 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x8f, 0xe3, 0x44, - 0x14, 0xce, 0x64, 0x13, 0x36, 0x99, 0x65, 0x15, 0x6e, 0x38, 0x21, 0x6b, 0x85, 0x9c, 0xc5, 0x02, - 0xe9, 0x10, 0x87, 0xcd, 0xee, 0x21, 0xa0, 0xa1, 0x58, 0x5f, 0x81, 0x16, 0x96, 0xbd, 0x65, 0x4e, - 0x5c, 0x81, 0x28, 0x98, 0x38, 0x73, 0xce, 0x10, 0xdb, 0x63, 0xcd, 0x8c, 0x23, 0x9d, 0x68, 0x68, - 0x68, 0x11, 0x0d, 0x05, 0x3d, 0x2d, 0x0d, 0x94, 0xfc, 0x03, 0x4b, 0x77, 0xe5, 0x56, 0x11, 0x6b, - 0xfe, 0x10, 0x90, 0xc7, 0x76, 0xec, 0xfc, 0x22, 0xa9, 0x22, 0x21, 0x51, 0x25, 0xf3, 0xde, 0xf7, - 0xbe, 0xf7, 0xde, 0x37, 0xf3, 0x9e, 0xe1, 0xd9, 0xf8, 0x03, 0x69, 0x33, 0xee, 0x8c, 0x93, 0x01, - 0x15, 0x11, 0x55, 0x54, 0x3a, 0x13, 0x1a, 0x0d, 0xb9, 0x70, 0x0a, 0x07, 0x89, 0x99, 0x23, 0x06, - 0xc4, 0x73, 0x26, 0x27, 0x24, 0x88, 0x47, 0xe4, 0xc4, 0xf1, 0x69, 0x44, 0x05, 0x51, 0x74, 0x68, - 0xc7, 0x82, 0x2b, 0x8e, 0x8c, 0x1c, 0x69, 0x93, 0x98, 0xd9, 0x19, 0xd2, 0x2e, 0x91, 0x47, 0x6f, - 0xfb, 0x4c, 0x8d, 0x92, 0x81, 0xed, 0xf1, 0xd0, 0xf1, 0xb9, 0xcf, 0x1d, 0x1d, 0x30, 0x48, 0x9e, - 0xea, 0x93, 0x3e, 0xe8, 0x7f, 0x39, 0xd1, 0xd1, 0xbb, 0x55, 0xca, 0x90, 0x78, 0x23, 0x16, 0x51, - 0xf1, 0xcc, 0x89, 0xc7, 0x7e, 0x66, 0x90, 0x4e, 0x48, 0x15, 0x71, 0x26, 0x4b, 0xe9, 0x8f, 0x9c, - 0x75, 0x51, 0x22, 0x89, 0x14, 0x0b, 0xe9, 0x52, 0xc0, 0x7b, 0x9b, 0x02, 0xa4, 0x37, 0xa2, 0x21, - 0x59, 0x8a, 0x7b, 0xb0, 0x2e, 0x2e, 0x51, 0x2c, 0x70, 0x58, 0xa4, 0xa4, 0x12, 0x8b, 0x41, 0xd6, - 0x4f, 0x00, 0xf6, 0xce, 0x7c, 0x5f, 0x50, 0x9f, 0x28, 0xc6, 0x23, 0x9c, 0x04, 0x14,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8d, 0xe7, 0xb7, - 0x66, 0xe3, 0xe6, 0xd6, 0x6c, 0x7c, 0x9b, 0x9a, 0xe0, 0x3a, 0x35, 0xc1, 0xf3, 0xd4, 0x04, 0x37, - 0xa9, 0x09, 0xfe, 0x4c, 0x4d, 0xf0, 0xc3, 0x5f, 0x66, 0xe3, 0x8b, 0x4e, 0x29, 0xfe, 0x3f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xeb, 0xcc, 0xe2, 0x61, 0x5e, 0x0b, 0x00, 0x00, + 0x14, 0xce, 0x64, 0x13, 0x36, 0x99, 0x25, 0x0a, 0x37, 0x9c, 0x90, 0xb5, 0x42, 0xce, 0x62, 0x81, + 0x74, 0x88, 0xc3, 0x66, 0x17, 0x04, 0x34, 0x14, 0xf1, 0x15, 0x28, 0x10, 0xf6, 0x96, 0x39, 0x71, + 0x05, 0xa2, 0x60, 0xe2, 0xcc, 0x39, 0x43, 0x6c, 0x8f, 0x35, 0x63, 0x47, 0x3a, 0xd1, 0xd0, 0xd0, + 0x22, 0x1a, 0x0a, 0x7a, 0x5a, 0x1a, 0x28, 0xf9, 0x07, 0x96, 0xee, 0xca, 0xad, 0x22, 0xd6, 0xfc, + 0x21, 0x20, 0x8f, 0xed, 0xd8, 0xf9, 0x45, 0x52, 0x45, 0x42, 0xba, 0x2a, 0x99, 0xf7, 0xbe, 0xf7, + 0xbd, 0xf7, 0xbe, 0x99, 0xf7, 0x0c, 0xfb, 0xd3, 0x0f, 0xa5, 0xc9, 0xb8, 0x35, 0x8d, 0x47, 0x54, + 0x04, 0x34, 0xa2, 0xd2, 0x9a, 0xd1, 0x60, 0xcc, 0x85, 0x95, 0x3b, 0x48, 0xc8, 0x2c, 0x31, 0x22, + 0x8e, 0x35, 0x3b, 0x27, 0x5e, 0x38, 0x21, 0xe7, 0x96, 0x4b, 0x03, 0x2a, 0x48, 0x44, 0xc7, 0x66, + 0x28, 0x78, 0xc4, 0x91, 0x96, 0x21, 0x4d, 0x12, 0x32, 0x33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1, 0x58, 0xab, 0x2b, 0xe4, + 0x8b, 0x39, 0xb2, 0xf1, 0x29, 0x0b, 0xc6, 0x58, 0x79, 0x52, 0x44, 0x40, 0xfc, 0xec, 0x93, 0x5c, + 0x41, 0xa4, 0xb3, 0x8e, 0x95, 0xc7, 0xf8, 0x0d, 0xc0, 0xe3, 0xfc, 0x3d, 0x2d, 0xf8, 0xc0, 0x56, + 0xbe, 0x0b, 0x08, 0x49, 0xc8, 0x1e, 0x53, 0x21, 0x19, 0x0f, 0xf2, 0xbc, 0x8b, 0x97, 0xde, 0xbf, + 0x1a, 0xe4, 0x1e, 0x5c, 0x41, 0xed, 0xae, 0x01, 0x59, 0xb0, 0x9d, 0xfe, 0xca, 0x90, 0x38, 0x54, + 0x6b, 0x28, 0xd8, 0x9d, 0x1c, 0xd6, 0xbe, 0x2c, 0x1c, 0xb8, 0xc4, 0xd8, 0xe6, 0xf5, 0xad, 0x5e, + 0x7b, 0x76, 0xab, 0xd7, 0x6e, 0x6e, 0xf5, 0xda, 0x77, 0x89, 0x0e, 0xae, 0x13, 0x1d, 0x3c, 0x4b, + 0x74, 0x70, 0x93, 0xe8, 0xe0, 0xaf, 0x44, 0x07, 0x3f, 0xfe, 0xad, 0xd7, 0xbe, 0x6c, 0x15, 0xe2, + 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x73, 0x15, 0x10, 0x29, 0x0b, 0x00, 0x00, } diff --git a/deps/k8s.io/api/rbac/v1alpha1/generated.proto b/deps/k8s.io/api/rbac/v1alpha1/generated.proto index 41a193f55..cde3aaac9 100644 --- a/deps/k8s.io/api/rbac/v1alpha1/generated.proto +++ b/deps/k8s.io/api/rbac/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.rbac.v1alpha1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; @@ -61,6 +60,7 @@ message ClusterRoleBinding { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. + // +optional repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -134,6 +134,7 @@ message RoleBinding { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. + // +optional repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/deps/k8s.io/api/rbac/v1alpha1/types.go b/deps/k8s.io/api/rbac/v1alpha1/types.go index 843d998ec..398d6a169 100644 --- a/deps/k8s.io/api/rbac/v1alpha1/types.go +++ b/deps/k8s.io/api/rbac/v1alpha1/types.go @@ -126,7 +126,8 @@ type RoleBinding struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. - Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + // +optional + Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. // If the RoleRef cannot be resolved, the Authorizer must return an error. @@ -201,7 +202,8 @@ type ClusterRoleBinding struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. - Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + // +optional + Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. // If the RoleRef cannot be resolved, the Authorizer must return an error. diff --git a/deps/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go b/deps/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go index e56cd0f10..1d6ef30b0 100644 --- a/deps/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/rbac/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1alpha1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", diff --git a/deps/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go index 3037f666c..97f63331e 100644 --- a/deps/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/rbac/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -62,12 +62,8 @@ func (in *ClusterRole) DeepCopyInto(out *ClusterRole) { } if in.AggregationRule != nil { in, out := &in.AggregationRule, &out.AggregationRule - if *in == nil { - *out = nil - } else { - *out = new(AggregationRule) - (*in).DeepCopyInto(*out) - } + *out = new(AggregationRule) + (*in).DeepCopyInto(*out) } return } @@ -86,9 +82,8 @@ func (in *ClusterRole) DeepCopy() *ClusterRole { func (in *ClusterRole) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -119,9 +114,8 @@ func (in *ClusterRoleBinding) DeepCopy() *ClusterRoleBinding { func (in *ClusterRoleBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -153,9 +147,8 @@ func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList { func (in *ClusterRoleBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -187,9 +180,8 @@ func (in *ClusterRoleList) DeepCopy() *ClusterRoleList { func (in *ClusterRoleList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -262,9 +254,8 @@ func (in *Role) DeepCopy() *Role { func (in *Role) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -295,9 +286,8 @@ func (in *RoleBinding) DeepCopy() *RoleBinding { func (in *RoleBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -329,9 +319,8 @@ func (in *RoleBindingList) DeepCopy() *RoleBindingList { func (in *RoleBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -363,9 +352,8 @@ func (in *RoleList) DeepCopy() *RoleList { func (in *RoleList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/rbac/v1beta1/BUILD b/deps/k8s.io/api/rbac/v1beta1/BUILD deleted file mode 100644 index c9aa763f4..000000000 --- a/deps/k8s.io/api/rbac/v1beta1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/rbac/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/rbac/v1beta1/generated.pb.go b/deps/k8s.io/api/rbac/v1beta1/generated.pb.go index c2525e0df..71e5799e3 100644 --- a/deps/k8s.io/api/rbac/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/rbac/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2693,58 +2693,56 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbf, 0x8f, 0xe3, 0x44, - 0x14, 0xce, 0x64, 0x13, 0x6d, 0x3c, 0xcb, 0x2a, 0xdc, 0x70, 0x02, 0x6b, 0x05, 0xce, 0x2a, 0x50, - 0x44, 0x3a, 0xce, 0x66, 0xef, 0x10, 0xd0, 0x20, 0x71, 0xa6, 0x80, 0xd5, 0x2d, 0x61, 0x35, 0x27, - 0x28, 0x10, 0x05, 0x63, 0x67, 0xce, 0x19, 0xe2, 0x5f, 0x9a, 0x19, 0x47, 0x3a, 0xd1, 0xd0, 0xd0, - 0x51, 0x20, 0x51, 0xd1, 0x52, 0x53, 0x51, 0xf2, 0x17, 0xa4, 0xbc, 0xf2, 0xaa, 0x88, 0x35, 0x7f, - 0x08, 0x68, 0xfc, 0x23, 0x4e, 0xe2, 0xf8, 0x2e, 0x55, 0x24, 0xa4, 0xab, 0x76, 0xe7, 0xbd, 0xef, - 0x7d, 0xef, 0x7b, 0x9f, 0x67, 0x5e, 0xe0, 0x27, 0xb3, 0x8f, 0x84, 0xc9, 0x22, 0x6b, 0x96, 0x38, - 0x94, 0x87, 0x54, 0x52, 0x61, 0xcd, 0x69, 0x38, 0x89, 0xb8, 0x55, 0x24, 0x48, 0xcc, 0x2c, 0xee, - 0x10, 0xd7, 0x9a, 0x5f, 0x38, 0x54, 0x92, 0x0b, 0xcb, 0xa3, 0x21, 0xe5, 0x44, 0xd2, 0x89, 0x19, - 0xf3, 0x48, 0x46, 0xe8, 0x8d, 0x1c, 0x68, 0x92, 0x98, 0x99, 0x0a, 0x68, 0x16, 0xc0, 0xb3, 0xbb, - 0x1e, 0x93, 0xd3, 0xc4, 0x31, 0xdd, 0x28, 0xb0, 0xbc, 0xc8, 0x8b, 0xac, 0x0c, 0xef, 0x24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xaf, 0x14, 0xc8, 0xce, 0x43, 0x16, 0x4e, 0x70, 0x96, 0x51, 0x88, 0x90, 0x04, 0xf9, - 0x0f, 0xf1, 0x1a, 0x42, 0x3d, 0x73, 0x9c, 0x65, 0x94, 0x57, 0xc7, 0xc5, 0x65, 0x5a, 0xf1, 0x81, - 0x46, 0xbe, 0x75, 0x7d, 0xed, 0x7d, 0xf4, 0x3d, 0xbf, 0x3b, 0xb2, 0xa0, 0xa6, 0xfe, 0x8a, 0x98, - 0xb8, 0x54, 0xef, 0x64, 0xb0, 0x5b, 0x05, 0x4c, 0x1b, 0x97, 0x09, 0x5c, 0x61, 0xec, 0xbb, 0x8b, - 0x1b, 0xa3, 0xf5, 0xf4, 0xc6, 0x68, 0x3d, 0xbb, 0x31, 0x5a, 0x3f, 0xa6, 0x06, 0x58, 0xa4, 0x06, - 0x78, 0x9a, 0x1a, 0xe0, 0x59, 0x6a, 0x80, 0xbf, 0x53, 0x03, 0xfc, 0xf2, 0x8f, 0xd1, 0xfa, 0xe6, - 0xb8, 0x70, 0xfd, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x99, 0xaf, 0xff, 0x74, 0x0b, 0x00, - 0x00, + // 808 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xbd, 0x6f, 0xfb, 0x44, + 0x18, 0xce, 0xa5, 0x89, 0x12, 0x5f, 0x88, 0xc2, 0xef, 0xa8, 0xc0, 0xaa, 0xc0, 0x89, 0x02, 0x43, + 0xa5, 0x52, 0x9b, 0x16, 0x04, 0x2c, 0x48, 0xd4, 0x0c, 0x50, 0xb5, 0x84, 0xea, 0x2a, 0x18, 0x10, + 0x03, 0x67, 0xe7, 0xea, 0x1e, 0xf1, 0x97, 0xee, 0xec, 0x48, 0x15, 0x0b, 0x0b, 0x1b, 0x03, 0x12, + 0x13, 0x2b, 0x33, 0x13, 0x23, 0x7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, 0x81, 0x2e, 0x60, 0x83, 0x07, 0x2e, 0xc5, 0xf4, 0x26, 0x77, 0x6a, 0x33, 0x1d, 0xce, + 0x70, 0x66, 0x27, 0xa7, 0x6b, 0xe4, 0x01, 0x5c, 0x30, 0xf4, 0x27, 0x00, 0xbe, 0xba, 0xea, 0xca, + 0x25, 0x13, 0x11, 0xfa, 0x66, 0xc5, 0x19, 0x7d, 0xcb, 0x0b, 0xcd, 0x44, 0xe6, 0xcb, 0x6c, 0x8a, + 0x22, 0x32, 0xe7, 0xca, 0x15, 0xac, 0xb3, 0x88, 0x7a, 0x85, 0x25, 0x47, 0x1b, 0x67, 0x58, 0x55, + 0x57, 0xde, 0xa4, 0x73, 0xc9, 0x80, 0x33, 0xa2, 0xfe, 0x9f, 0x00, 0x76, 0xe6, 0xc0, 0x3b, 0x98, + 0xe1, 0x7c, 0x71, 0x86, 0xb7, 0xb6, 0x9a, 0x61, 0xbd, 0xf8, 0x7f, 0x00, 0x84, 0xe5, 0x5b, 0x41, + 0x5d, 0x58, 0x1f, 0x53, 0x6e, 0x65, 0x9b, 0x44, 0x31, 0x15, 0x89, 0xff, 0x4a, 0x06, 0x70, 0x16, + 0x47, 0x47, 0x50, 0x21, 0x21, 0xfb, 0x94, 0x07, 0x71, 0x98, 0xb5, 0x57, 0xcc, 0x76, 0x32, 0xed, + 0x2a, 0x67, 0x57, 0xe7, 0x59, 0x10, 0x97, 0x79, 0x09, 0xe6, 0x54, 0x04, 0x31, 0xb7, 0xa9, 0x50, + 0xf7, 0x4a, 0x30, 0x2e, 0x82, 0xb8, 0xcc, 0xa3, 0x0f, 0x60, 0xbb, 0x38, 0x0c, 0x88, 0x47, 0x85, + 0x5a, 0x4b, 0x0b, 0x5e, 0x24, 0xd3, 0x6e, 0x1b, 0xcf, 0x27, 0xf0, 0x22, 0x0e, 0x7d, 0x04, 0x3b, + 0x7e, 0xe0, 0x17, 0x90, 0x2f, 0xf1, 0xa5, 0x50, 0xeb, 0x69, 0x69, 0x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0x77, 0xcd, 0x15, 0x0b, 0x00, 0x00, } diff --git a/deps/k8s.io/api/rbac/v1beta1/generated.proto b/deps/k8s.io/api/rbac/v1beta1/generated.proto index aa9960b8e..27bd30ce9 100644 --- a/deps/k8s.io/api/rbac/v1beta1/generated.proto +++ b/deps/k8s.io/api/rbac/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,9 @@ syntax = 'proto2'; package k8s.io.api.rbac.v1beta1; -import "k8s.io/api/rbac/v1alpha1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -62,6 +60,7 @@ message ClusterRoleBinding { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. + // +optional repeated Subject subjects = 2; // RoleRef can only reference a ClusterRole in the global namespace. @@ -135,6 +134,7 @@ message RoleBinding { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; // Subjects holds references to the objects the role applies to. + // +optional repeated Subject subjects = 2; // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. diff --git a/deps/k8s.io/api/rbac/v1beta1/types.go b/deps/k8s.io/api/rbac/v1beta1/types.go index 091fc1dc9..857b67a6f 100644 --- a/deps/k8s.io/api/rbac/v1beta1/types.go +++ b/deps/k8s.io/api/rbac/v1beta1/types.go @@ -125,7 +125,8 @@ type RoleBinding struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. - Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + // +optional + Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. // If the RoleRef cannot be resolved, the Authorizer must return an error. @@ -199,7 +200,8 @@ type ClusterRoleBinding struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Subjects holds references to the objects the role applies to. - Subjects []Subject `json:"subjects" protobuf:"bytes,2,rep,name=subjects"` + // +optional + Subjects []Subject `json:"subjects,omitempty" protobuf:"bytes,2,rep,name=subjects"` // RoleRef can only reference a ClusterRole in the global namespace. // If the RoleRef cannot be resolved, the Authorizer must return an error. diff --git a/deps/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go index 6180d6d43..66dba6ca1 100644 --- a/deps/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/rbac/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AggregationRule = map[string]string{ "": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "clusterRoleSelectors": "ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added", diff --git a/deps/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go index 7e035cd27..c085c90b1 100644 --- a/deps/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/rbac/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -62,12 +62,8 @@ func (in *ClusterRole) DeepCopyInto(out *ClusterRole) { } if in.AggregationRule != nil { in, out := &in.AggregationRule, &out.AggregationRule - if *in == nil { - *out = nil - } else { - *out = new(AggregationRule) - (*in).DeepCopyInto(*out) - } + *out = new(AggregationRule) + (*in).DeepCopyInto(*out) } return } @@ -86,9 +82,8 @@ func (in *ClusterRole) DeepCopy() *ClusterRole { func (in *ClusterRole) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -119,9 +114,8 @@ func (in *ClusterRoleBinding) DeepCopy() *ClusterRoleBinding { func (in *ClusterRoleBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -153,9 +147,8 @@ func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList { func (in *ClusterRoleBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -187,9 +180,8 @@ func (in *ClusterRoleList) DeepCopy() *ClusterRoleList { func (in *ClusterRoleList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -262,9 +254,8 @@ func (in *Role) DeepCopy() *Role { func (in *Role) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -295,9 +286,8 @@ func (in *RoleBinding) DeepCopy() *RoleBinding { func (in *RoleBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -329,9 +319,8 @@ func (in *RoleBindingList) DeepCopy() *RoleBindingList { func (in *RoleBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -363,9 +352,8 @@ func (in *RoleList) DeepCopy() *RoleList { func (in *RoleList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/roundtrip_test.go b/deps/k8s.io/api/roundtrip_test.go new file mode 100644 index 000000000..0c79c3eb4 --- /dev/null +++ b/deps/k8s.io/api/roundtrip_test.go @@ -0,0 +1,151 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testing + +import ( + "math/rand" + "testing" + + admissionv1beta1 "k8s.io/api/admission/v1beta1" + admissionregv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + admissionregv1beta1 "k8s.io/api/admissionregistration/v1beta1" + appsv1 "k8s.io/api/apps/v1" + appsv1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta2 "k8s.io/api/apps/v1beta2" + authenticationv1 "k8s.io/api/authentication/v1" + authenticationv1beta1 "k8s.io/api/authentication/v1beta1" + authorizationv1 "k8s.io/api/authorization/v1" + authorizationv1beta1 "k8s.io/api/authorization/v1beta1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" + batchv1 "k8s.io/api/batch/v1" + batchv1beta1 "k8s.io/api/batch/v1beta1" + batchv2alpha1 "k8s.io/api/batch/v2alpha1" + certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + corev1 "k8s.io/api/core/v1" + eventsv1beta1 "k8s.io/api/events/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + imagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1" + networkingv1 "k8s.io/api/networking/v1" + policyv1beta1 "k8s.io/api/policy/v1beta1" + rbacv1 "k8s.io/api/rbac/v1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" + schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" + settingsv1alpha1 "k8s.io/api/settings/v1alpha1" + storagev1 "k8s.io/api/storage/v1" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + storagev1beta1 "k8s.io/api/storage/v1beta1" + + "github.com/stretchr/testify/require" + "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" + "k8s.io/apimachinery/pkg/api/apitesting/roundtrip" + genericfuzzer "k8s.io/apimachinery/pkg/apis/meta/fuzzer" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" +) + +var groups = []runtime.SchemeBuilder{ + admissionv1beta1.SchemeBuilder, + admissionregv1alpha1.SchemeBuilder, + admissionregv1beta1.SchemeBuilder, + appsv1beta1.SchemeBuilder, + appsv1beta2.SchemeBuilder, + appsv1.SchemeBuilder, + authenticationv1beta1.SchemeBuilder, + authenticationv1.SchemeBuilder, + authorizationv1beta1.SchemeBuilder, + authorizationv1.SchemeBuilder, + autoscalingv1.SchemeBuilder, + autoscalingv2beta1.SchemeBuilder, + batchv2alpha1.SchemeBuilder, + batchv1beta1.SchemeBuilder, + batchv1.SchemeBuilder, + certificatesv1beta1.SchemeBuilder, + corev1.SchemeBuilder, + eventsv1beta1.SchemeBuilder, + extensionsv1beta1.SchemeBuilder, + imagepolicyv1alpha1.SchemeBuilder, + networkingv1.SchemeBuilder, + policyv1beta1.SchemeBuilder, + rbacv1alpha1.SchemeBuilder, + rbacv1beta1.SchemeBuilder, + rbacv1.SchemeBuilder, + schedulingv1alpha1.SchemeBuilder, + schedulingv1beta1.SchemeBuilder, + settingsv1alpha1.SchemeBuilder, + storagev1alpha1.SchemeBuilder, + storagev1beta1.SchemeBuilder, + storagev1.SchemeBuilder, +} + +func TestRoundTripExternalTypes(t *testing.T) { + for _, builder := range groups { + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + + require.NoError(t, builder.AddToScheme(scheme)) + seed := rand.Int63() + // I'm only using the generic fuzzer funcs, but at some point in time we might need to + // switch to specialized. For now we're happy with the current serialization test. + fuzzer := fuzzer.FuzzerFor(genericfuzzer.Funcs, rand.NewSource(seed), codecs) + + roundtrip.RoundTripExternalTypes(t, scheme, codecs, fuzzer, nil) + } +} + +func TestFailRoundTrip(t *testing.T) { + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + groupVersion := schema.GroupVersion{Group: "broken", Version: "v1"} + builder := runtime.NewSchemeBuilder(func(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(groupVersion, &BrokenType{}) + metav1.AddToGroupVersion(scheme, groupVersion) + return nil + }) + require.NoError(t, builder.AddToScheme(scheme)) + seed := rand.Int63() + fuzzer := fuzzer.FuzzerFor(genericfuzzer.Funcs, rand.NewSource(seed), codecs) + tmpT := new(testing.T) + roundtrip.RoundTripExternalTypes(tmpT, scheme, codecs, fuzzer, nil) + // It's very hacky way of making sure the DeepCopy is actually invoked inside RoundTripExternalTypes + // used in the other test. If for some reason this tests starts passing we need to fail b/c we're not testing + // the DeepCopy in the other method which we care so much about. + if !tmpT.Failed() { + t.Log("RoundTrip should've failed on DeepCopy but it did not!") + t.FailNow() + } +} + +type BrokenType struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Field1 string `json:"field1,omitempty"` + Field2 string `json:"field2,omitempty"` +} + +func (in *BrokenType) DeepCopy() *BrokenType { + return new(BrokenType) +} + +func (in *BrokenType) DeepCopyObject() runtime.Object { + return in.DeepCopy() +} diff --git a/deps/k8s.io/api/scheduling/v1alpha1/BUILD b/deps/k8s.io/api/scheduling/v1alpha1/BUILD deleted file mode 100644 index c8c197664..000000000 --- a/deps/k8s.io/api/scheduling/v1alpha1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/scheduling/v1alpha1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/scheduling/v1alpha1/generated.pb.go b/deps/k8s.io/api/scheduling/v1alpha1/generated.pb.go index 39c0b9e6a..97c07c984 100644 --- a/deps/k8s.io/api/scheduling/v1alpha1/generated.pb.go +++ b/deps/k8s.io/api/scheduling/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -608,34 +608,33 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 460 bytes of a gzipped FileDescriptorProto + // 447 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x8b, 0xd3, 0x40, 0x18, 0xc6, 0x33, 0x5d, 0x0b, 0x75, 0x4a, 0x41, 0x23, 0x42, 0xe8, 0x61, 0x36, 0xac, 0x97, 0x5c, - 0x76, 0xc6, 0xae, 0x7f, 0x10, 0xbc, 0xc5, 0x85, 0x45, 0x50, 0x94, 0x1c, 0x3c, 0x88, 0x07, 0x27, - 0xc9, 0x6c, 0x3a, 0x36, 0xc9, 0x84, 0x99, 0x37, 0x81, 0xbd, 0x79, 0xf6, 0xe4, 0x97, 0x12, 0x7a, - 0xdc, 0xe3, 0x9e, 0x16, 0x1b, 0xbf, 0x88, 0x24, 0x4d, 0x37, 0xad, 0x65, 0xd5, 0x5b, 0xe6, 0x79, - 0x9f, 0xdf, 0x33, 0xf3, 0x3e, 0x04, 0x9f, 0x2d, 0x5e, 0x18, 0x2a, 0x15, 0x5b, 0x94, 0xa1, 0xd0, - 0xb9, 0x00, 0x61, 0x58, 0x25, 0xf2, 0x58, 0x69, 0xd6, 0x0d, 0x78, 0x21, 0x99, 0x89, 0xe6, 0x22, - 0x2e, 0x53, 0x99, 0x27, 0xac, 0x9a, 0xf1, 0xb4, 0x98, 0xf3, 0x19, 0x4b, 0x44, 0x2e, 0x34, 0x07, - 0x11, 0x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 0x7d, 0x18, 0x6d, + 0x32, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xab, 0x20, 0x12, 0x63, 0x3c, 0x03, 0x00, 0x00, } diff --git a/deps/k8s.io/api/scheduling/v1alpha1/generated.proto b/deps/k8s.io/api/scheduling/v1alpha1/generated.proto index 588ef9718..5fb547211 100644 --- a/deps/k8s.io/api/scheduling/v1alpha1/generated.proto +++ b/deps/k8s.io/api/scheduling/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.api.scheduling.v1alpha1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; @@ -43,6 +42,9 @@ message PriorityClass { // globalDefault specifies whether this PriorityClass should be considered as // the default priority for pods that do not have any priority class. + // Only one PriorityClass can be marked as `globalDefault`. However, if more than + // one PriorityClasses exists with their `globalDefault` field set to true, + // the smallest value of such global default PriorityClasses will be used as the default priority. // +optional optional bool globalDefault = 3; diff --git a/deps/k8s.io/api/scheduling/v1alpha1/types.go b/deps/k8s.io/api/scheduling/v1alpha1/types.go index 07bf337fb..21e3df0af 100644 --- a/deps/k8s.io/api/scheduling/v1alpha1/types.go +++ b/deps/k8s.io/api/scheduling/v1alpha1/types.go @@ -39,6 +39,9 @@ type PriorityClass struct { // globalDefault specifies whether this PriorityClass should be considered as // the default priority for pods that do not have any priority class. + // Only one PriorityClass can be marked as `globalDefault`. However, if more than + // one PriorityClasses exists with their `globalDefault` field set to true, + // the smallest value of such global default PriorityClasses will be used as the default priority. // +optional GlobalDefault bool `json:"globalDefault,omitempty" protobuf:"bytes,3,opt,name=globalDefault"` diff --git a/deps/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go b/deps/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go index 4b68bf04a..f406f4402 100644 --- a/deps/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/scheduling/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,12 +26,12 @@ package v1alpha1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_PriorityClass = map[string]string{ "": "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", - "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class.", + "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", } diff --git a/deps/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go index 344e6cc62..fe0c86040 100644 --- a/deps/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/scheduling/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -46,9 +46,8 @@ func (in *PriorityClass) DeepCopy() *PriorityClass { func (in *PriorityClass) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -80,7 +79,6 @@ func (in *PriorityClassList) DeepCopy() *PriorityClassList { func (in *PriorityClassList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/api/scheduling/v1beta1/doc.go b/deps/k8s.io/api/scheduling/v1beta1/doc.go new file mode 100644 index 000000000..f2dd1cfac --- /dev/null +++ b/deps/k8s.io/api/scheduling/v1beta1/doc.go @@ -0,0 +1,21 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:openapi-gen=true + +// +groupName=scheduling.k8s.io +package v1beta1 // import "k8s.io/api/scheduling/v1beta1" diff --git a/deps/k8s.io/api/scheduling/v1beta1/generated.pb.go b/deps/k8s.io/api/scheduling/v1beta1/generated.pb.go new file mode 100644 index 000000000..ea8f8d5e6 --- /dev/null +++ b/deps/k8s.io/api/scheduling/v1beta1/generated.pb.go @@ -0,0 +1,640 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto +// DO NOT EDIT! + +/* + Package v1beta1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto + + It has these top-level messages: + PriorityClass + PriorityClassList +*/ +package v1beta1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *PriorityClass) Reset() { *m = PriorityClass{} } +func (*PriorityClass) ProtoMessage() {} +func (*PriorityClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *PriorityClassList) Reset() { *m = PriorityClassList{} } +func (*PriorityClassList) ProtoMessage() {} +func (*PriorityClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func init() { + proto.RegisterType((*PriorityClass)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClass") + proto.RegisterType((*PriorityClassList)(nil), "k8s.io.api.scheduling.v1beta1.PriorityClassList") +} +func (m *PriorityClass) 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 *PriorityClass) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + dAtA[i] = 0x10 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Value)) + dAtA[i] = 0x18 + i++ + if m.GlobalDefault { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) + return i, nil +} + +func (m *PriorityClassList) 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 *PriorityClassList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n2, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func encodeFixed64Generated(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 encodeFixed32Generated(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 encodeVarintGenerated(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 *PriorityClass) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Value)) + n += 2 + l = len(m.Description) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *PriorityClassList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *PriorityClass) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PriorityClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `GlobalDefault:` + fmt.Sprintf("%v", this.GlobalDefault) + `,`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `}`, + }, "") + return s +} +func (this *PriorityClassList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PriorityClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "PriorityClass", "PriorityClass", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *PriorityClass) 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 ErrIntOverflowGenerated + } + 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: PriorityClass: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PriorityClass: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GlobalDefault", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.GlobalDefault = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PriorityClassList) 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 ErrIntOverflowGenerated + } + 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: PriorityClassList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PriorityClassList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, PriorityClass{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(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, ErrIntOverflowGenerated + } + 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, ErrIntOverflowGenerated + } + 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, ErrIntOverflowGenerated + } + 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, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + 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 := skipGenerated(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 ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/scheduling/v1beta1/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 448 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8b, 0xd3, 0x40, + 0x18, 0xc5, 0x33, 0x5d, 0x8b, 0x75, 0x4a, 0x41, 0x23, 0x42, 0x28, 0x38, 0x1b, 0xd6, 0x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0xbd, 0x6c, 0x22, 0x82, 0x75, 0x92, + 0x7f, 0xb8, 0x5c, 0x11, 0xeb, 0x6c, 0x45, 0xac, 0xf3, 0x15, 0xb1, 0xbe, 0xd4, 0x04, 0x2d, 0x6b, + 0x82, 0xce, 0x6a, 0x82, 0xce, 0x6b, 0x82, 0x7e, 0xd4, 0x04, 0x7d, 0xfb, 0x49, 0xac, 0x0f, 0xd7, + 0xbb, 0xc8, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x41, 0x74, 0x8a, 0x60, 0x38, 0x03, 0x00, 0x00, +} diff --git a/deps/k8s.io/api/scheduling/v1beta1/generated.proto b/deps/k8s.io/api/scheduling/v1beta1/generated.proto new file mode 100644 index 000000000..0a9575503 --- /dev/null +++ b/deps/k8s.io/api/scheduling/v1beta1/generated.proto @@ -0,0 +1,67 @@ +/* +Copyright The Kubernetes 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. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.api.scheduling.v1beta1; + +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1beta1"; + +// PriorityClass defines mapping from a priority class name to the priority +// integer value. The value can be any valid integer. +message PriorityClass { + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // The value of this priority class. This is the actual priority that pods + // receive when they have the name of this class in their pod spec. + optional int32 value = 2; + + // globalDefault specifies whether this PriorityClass should be considered as + // the default priority for pods that do not have any priority class. + // Only one PriorityClass can be marked as `globalDefault`. However, if more than + // one PriorityClasses exists with their `globalDefault` field set to true, + // the smallest value of such global default PriorityClasses will be used as the default priority. + // +optional + optional bool globalDefault = 3; + + // description is an arbitrary string that usually provides guidelines on + // when this priority class should be used. + // +optional + optional string description = 4; +} + +// PriorityClassList is a collection of priority classes. +message PriorityClassList { + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // items is the list of PriorityClasses + repeated PriorityClass items = 2; +} + diff --git a/deps/k8s.io/api/scheduling/v1beta1/register.go b/deps/k8s.io/api/scheduling/v1beta1/register.go new file mode 100644 index 000000000..fb26557bb --- /dev/null +++ b/deps/k8s.io/api/scheduling/v1beta1/register.go @@ -0,0 +1,52 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "scheduling.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +// Adds the list of known types to the given scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &PriorityClass{}, + &PriorityClassList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/deps/k8s.io/api/scheduling/v1beta1/types.go b/deps/k8s.io/api/scheduling/v1beta1/types.go new file mode 100644 index 000000000..a9aaa8665 --- /dev/null +++ b/deps/k8s.io/api/scheduling/v1beta1/types.go @@ -0,0 +1,66 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PriorityClass defines mapping from a priority class name to the priority +// integer value. The value can be any valid integer. +type PriorityClass struct { + metav1.TypeMeta `json:",inline"` + // Standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // The value of this priority class. This is the actual priority that pods + // receive when they have the name of this class in their pod spec. + Value int32 `json:"value" protobuf:"bytes,2,opt,name=value"` + + // globalDefault specifies whether this PriorityClass should be considered as + // the default priority for pods that do not have any priority class. + // Only one PriorityClass can be marked as `globalDefault`. However, if more than + // one PriorityClasses exists with their `globalDefault` field set to true, + // the smallest value of such global default PriorityClasses will be used as the default priority. + // +optional + GlobalDefault bool `json:"globalDefault,omitempty" protobuf:"bytes,3,opt,name=globalDefault"` + + // description is an arbitrary string that usually provides guidelines on + // when this priority class should be used. + // +optional + Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PriorityClassList is a collection of priority classes. +type PriorityClassList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // items is the list of PriorityClasses + Items []PriorityClass `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/deps/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go new file mode 100644 index 000000000..c18f54a82 --- /dev/null +++ b/deps/k8s.io/api/scheduling/v1beta1/types_swagger_doc_generated.go @@ -0,0 +1,52 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-generated-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. +var map_PriorityClass = map[string]string{ + "": "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", + "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "value": "The value of this priority class. This is the actual priority that pods receive when they have the name of this class in their pod spec.", + "globalDefault": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.", + "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", +} + +func (PriorityClass) SwaggerDoc() map[string]string { + return map_PriorityClass +} + +var map_PriorityClassList = map[string]string{ + "": "PriorityClassList is a collection of priority classes.", + "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "items": "items is the list of PriorityClasses", +} + +func (PriorityClassList) SwaggerDoc() map[string]string { + return map_PriorityClassList +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/deps/k8s.io/api/scheduling/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/scheduling/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..6f68e4ac5 --- /dev/null +++ b/deps/k8s.io/api/scheduling/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,84 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PriorityClass) DeepCopyInto(out *PriorityClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClass. +func (in *PriorityClass) DeepCopy() *PriorityClass { + if in == nil { + return nil + } + out := new(PriorityClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PriorityClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PriorityClassList) DeepCopyInto(out *PriorityClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PriorityClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClassList. +func (in *PriorityClassList) DeepCopy() *PriorityClassList { + if in == nil { + return nil + } + out := new(PriorityClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PriorityClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/deps/k8s.io/api/settings/v1alpha1/BUILD b/deps/k8s.io/api/settings/v1alpha1/BUILD deleted file mode 100644 index d7457427d..000000000 --- a/deps/k8s.io/api/settings/v1alpha1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/settings/v1alpha1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/settings/v1alpha1/generated.pb.go b/deps/k8s.io/api/settings/v1alpha1/generated.pb.go index bfc6a5a11..15285bae5 100644 --- a/deps/k8s.io/api/settings/v1alpha1/generated.pb.go +++ b/deps/k8s.io/api/settings/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -891,40 +891,39 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 556 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8e, 0xd2, 0x4e, - 0x1c, 0xc7, 0xe9, 0xb2, 0x04, 0xfe, 0x03, 0x9b, 0xbf, 0x69, 0x3c, 0x34, 0xc4, 0x94, 0x95, 0x8b, - 0x9b, 0x18, 0x67, 0x64, 0xd7, 0x18, 0xbd, 0x36, 0xc1, 0xc4, 0x04, 0xe2, 0xa6, 0x24, 0x9b, 0x68, - 0x3c, 0x38, 0x94, 0x9f, 0xa5, 0x42, 0x67, 0x9a, 0x99, 0x69, 0x13, 0x6f, 0x3e, 0x82, 0x2f, 0xe0, - 0x93, 0xe8, 0x03, 0x70, 0xdc, 0xe3, 0x9e, 0x36, 0x52, 0x5f, 0xc4, 0x4c, 0x99, 0x02, 0x8a, 0x28, - 0xb7, 0xce, 0x8f, 0xef, 0xe7, 0x33, 0xbf, 0x2f, 0x2d, 0xea, 0xcf, 0x9e, 0x49, 0x1c, 0x71, 0x32, - 0x4b, 0xc7, 0x20, 0x18, 0x28, 0x90, 0x24, 0x03, 0x36, 0xe1, 0x82, 0x98, 0x1f, 0x68, 0x12, 0x11, - 0x09, 0x4a, 0x45, 0x2c, 0x94, 0x24, 0xeb, 0xd1, 0x79, 0x32, 0xa5, 0x3d, 0x12, 0x02, 0x03, 0x41, - 0x15, 0x4c, 0x70, 0x22, 0xb8, 0xe2, 0xf6, 0xbd, 0x55, 0x1a, 0xd3, 0x24, 0xc2, 0x65, 0x1a, 0x97, - 0xe9, 0xf6, 0xa3, 0x30, 0x52, 0xd3, 0x74, 0x8c, 0x03, 0x1e, 0x93, 0x90, 0x87, 0x9c, 0x14, 0xd0, - 0x38, 0x7d, 0x5f, 0x9c, 0x8a, 0x43, 0xf1, 0xb4, 0x92, 0xb5, 0xbb, 0x5b, 0x57, 0x07, 0x5c, 0x00, - 0xc9, 0x76, 0x2e, 0x6c, 0x3f, 0xd9, 0x64, 0x62, 0x1a, 0x4c, 0x23, 0x06, 0xe2, 0x23, 0x49, 0x66, - 0xa1, 0x1e, 0x48, 0x12, 0x83, 0xa2, 0x7f, 0xa2, 0xc8, 0x3e, 0x4a, 0xa4, 0x4c, 0x45, 0x31, 0xec, - 0x00, 0x4f, 0xff, 0x05, 0xc8, 0x60, 0x0a, 0x31, 0xdd, 0xe1, 0x2e, 0xf6, 0x71, 0xa9, 0x8a, 0xe6, - 0x24, 0x62, 0x4a, 0x2a, 0xf1, 0x3b, 0xd4, 0xfd, 0x66, 0xa1, 0xff, 0x2e, 0xf9, 0xe4, 0x52, 0x80, - 0x04, 0x65, 0xbf, 0x43, 0x0d, 0x5d, 0x63, 0x42, 0x15, 0x75, 0xac, 0x53, 0xeb, 0xac, 0x79, 0xfe, - 0x18, 0x6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7, 0x5a, 0xe0, 0xf7, 0xf7, 0xe0, 0x3a, 0x32, 0xe2, 0xa9, - 0x08, 0xc0, 0xfb, 0xdf, 0x58, 0xea, 0x66, 0xec, 0x97, 0x0a, 0xbb, 0x8f, 0xea, 0x19, 0x9f, 0xa7, - 0x31, 0x48, 0xe7, 0x78, 0xff, 0x32, 0x57, 0x45, 0x64, 0xa3, 0x59, 0x9d, 0xa5, 0x5f, 0xb2, 0xf6, - 0x6b, 0xd4, 0x5a, 0x3d, 0x0e, 0x79, 0xca, 0x94, 0x74, 0x6a, 0x85, 0xab, 0xb3, 0xdf, 0x55, 0xe4, - 0xbc, 0xbb, 0x46, 0xd8, 0xda, 0x1a, 0x4a, 0xff, 0x17, 0x95, 0x87, 0x17, 0x4b, 0xb7, 0x72, 0xbd, - 0x74, 0x2b, 0x37, 0x4b, 0xb7, 0xf2, 0x29, 0x77, 0xad, 0x45, 0xee, 0x5a, 0xd7, 0xb9, 0x6b, 0xdd, - 0xe4, 0xae, 0xf5, 0x3d, 0x77, 0xad, 0xcf, 0x3f, 0xdc, 0xca, 0x9b, 0x46, 0xf9, 0xbe, 0x7f, 0x06, - 0x00, 0x00, 0xff, 0xff, 0x0e, 0x35, 0x98, 0xb5, 0xd9, 0x04, 0x00, 0x00, + // 542 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8e, 0xd2, 0x40, + 0x1c, 0xc6, 0xe9, 0xb2, 0x04, 0x1c, 0xd8, 0x68, 0x1a, 0x0f, 0x0d, 0x31, 0x65, 0xe5, 0xe2, 0x26, + 0xc6, 0x19, 0x59, 0x8d, 0xd1, 0x6b, 0x13, 0x4c, 0x4c, 0x20, 0x6e, 0x4a, 0xb2, 0x89, 0xc6, 0x83, + 0x43, 0xf9, 0x5b, 0x2a, 0xb4, 0xd3, 0xcc, 0x4c, 0x9b, 0x78, 0xf3, 0x11, 0x7c, 0x01, 0x9f, 0x44, + 0x1f, 0x80, 0xe3, 0x1e, 0xf7, 0xb4, 0x91, 0xfa, 0x22, 0x66, 0x86, 0x29, 0xa0, 0x88, 0x72, 0x9b, + 0xff, 0x9f, 0xef, 0xfb, 0xcd, 0xf7, 0x31, 0x45, 0xfd, 0xd9, 0x73, 0x81, 0x23, 0x46, 0x66, 0xd9, + 0x18, 0x78, 0x02, 0x12, 0x04, 0xc9, 0x21, 0x99, 0x30, 0x4e, 0xcc, 0x0f, 0x34, 0x8d, 0x88, 0x00, + 0x29, 0xa3, 0x24, 0x14, 0x24, 0xef, 0xd1, 0x79, 0x3a, 0xa5, 0x3d, 0x12, 0x42, 0x02, 0x9c, 0x4a, + 0x98, 0xe0, 0x94, 0x33, 0xc9, 0xec, 0x7b, 0x2b, 0x35, 0xa6, 0x69, 0x84, 0x4b, 0x35, 0x2e, 0xd5, + 0xed, 0x47, 0x61, 0x24, 0xa7, 0xd9, 0x18, 0x07, 0x2c, 0x26, 0x21, 0x0b, 0x19, 0xd1, 0xa6, 0x71, + 0xf6, 0x41, 0x4f, 0x7a, 0xd0, 0xa7, 0x15, 0xac, 0xdd, 0xdd, 0xba, 0x3a, 0x60, 0x1c, 0x48, 0xbe, + 0x73, 0x61, 0xfb, 0xe9, 0x46, 0x13, 0xd3, 0x60, 0x1a, 0x25, 0xc0, 0x3f, 0x91, 0x74, 0x16, 0xaa, + 0x85, 0x20, 0x31, 0x48, 0xfa, 0x37, 0x17, 0xd9, 0xe7, 0xe2, 0x59, 0x22, 0xa3, 0x18, 0x76, 0x0c, + 0xcf, 0xfe, 0x67, 0x10, 0xc1, 0x14, 0x62, 0xfa, 0xa7, 0xaf, 0xfb, 0xdd, 0x42, 0xb7, 0x2e, 0xd8, + 0xe4, 0x82, 0x83, 0x00, 0x69, 0xbf, 0x47, 0x0d, 0x95, 0x68, 0x42, 0x25, 0x75, 0xac, 0x53, 0xeb, + 0xac, 0x79, 0xfe, 0x18, 0x6f, 0xfe, 0x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fb, 0xfd, 0x3d, 0x76, 0x25, + 0x19, 0xb1, 0x8c, 0x07, 0xe0, 0xdd, 0x36, 0x94, 0xba, 0x59, 0xfb, 0x25, 0xc2, 0xee, 0xa3, 0x7a, + 0xce, 0xe6, 0x59, 0x0c, 0xc2, 0x39, 0xde, 0x1f, 0xe6, 0x52, 0x4b, 0x36, 0x98, 0xd5, 0x2c, 0xfc, + 0xd2, 0x6b, 0xbf, 0x41, 0xad, 0xd5, 0x71, 0xc8, 0xb2, 0x44, 0x0a, 0xa7, 0xa6, 0x59, 0x9d, 0xfd, + 0x2c, 0xad, 0xf3, 0xee, 0x1a, 0x60, 0x6b, 0x6b, 0x29, 0xfc, 0xdf, 0x50, 0x1e, 0x5e, 0x2c, 0xdd, + 0xca, 0xd5, 0xd2, 0xad, 0x5c, 0x2f, 0xdd, 0xca, 0xe7, 0xc2, 0xb5, 0x16, 0x85, 0x6b, 0x5d, 0x15, + 0xae, 0x75, 0x5d, 0xb8, 0xd6, 0x8f, 0xc2, 0xb5, 0xbe, 0xfc, 0x74, 0x2b, 0x6f, 0x1b, 0xe5, 0x7b, + 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x46, 0x15, 0xf2, 0x97, 0xa4, 0x04, 0x00, 0x00, } diff --git a/deps/k8s.io/api/settings/v1alpha1/generated.proto b/deps/k8s.io/api/settings/v1alpha1/generated.proto index 098e8dd9b..d5534c4de 100644 --- a/deps/k8s.io/api/settings/v1alpha1/generated.proto +++ b/deps/k8s.io/api/settings/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; diff --git a/deps/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go b/deps/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go index 2a89e5566..508c452f1 100644 --- a/deps/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/settings/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1alpha1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_PodPreset = map[string]string{ "": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.", } diff --git a/deps/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go index 537668658..6397a88ab 100644 --- a/deps/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/settings/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -48,9 +48,8 @@ func (in *PodPreset) DeepCopy() *PodPreset { func (in *PodPreset) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -82,9 +81,8 @@ func (in *PodPresetList) DeepCopy() *PodPresetList { func (in *PodPresetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/api/storage/v1/BUILD b/deps/k8s.io/api/storage/v1/BUILD deleted file mode 100644 index 50a09f0eb..000000000 --- a/deps/k8s.io/api/storage/v1/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/storage/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/storage/v1/generated.pb.go b/deps/k8s.io/api/storage/v1/generated.pb.go index 31988b70d..d43a98298 100644 --- a/deps/k8s.io/api/storage/v1/generated.pb.go +++ b/deps/k8s.io/api/storage/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -152,6 +152,18 @@ func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VolumeBindingMode))) i += copy(dAtA[i:], *m.VolumeBindingMode) } + if len(m.AllowedTopologies) > 0 { + for _, msg := range m.AllowedTopologies { + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -252,6 +264,12 @@ func (m *StorageClass) Size() (n int) { l = len(*m.VolumeBindingMode) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.AllowedTopologies) > 0 { + for _, e := range m.AllowedTopologies { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -304,6 +322,7 @@ func (this *StorageClass) String() string { `MountOptions:` + fmt.Sprintf("%v", this.MountOptions) + `,`, `AllowVolumeExpansion:` + valueToStringGenerated(this.AllowVolumeExpansion) + `,`, `VolumeBindingMode:` + valueToStringGenerated(this.VolumeBindingMode) + `,`, + `AllowedTopologies:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedTopologies), "TopologySelectorTerm", "k8s_io_api_core_v1.TopologySelectorTerm", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -641,6 +660,37 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { s := VolumeBindingMode(dAtA[iNdEx:postIndex]) m.VolumeBindingMode = &s iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedTopologies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedTopologies = append(m.AllowedTopologies, k8s_io_api_core_v1.TopologySelectorTerm{}) + if err := m.AllowedTopologies[len(m.AllowedTopologies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -883,44 +933,46 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 623 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4f, 0x6f, 0xd3, 0x3c, - 0x18, 0x6f, 0xda, 0xb7, 0x2f, 0x9b, 0xbb, 0x89, 0x2e, 0x0c, 0x29, 0xea, 0x21, 0xa9, 0xc6, 0xa5, - 0x9a, 0x84, 0xb3, 0x6e, 0x03, 0x4d, 0x48, 0x20, 0x11, 0x34, 0x09, 0xa4, 0x4d, 0xab, 0x82, 0x34, - 0x21, 0xc4, 0x01, 0x37, 0x7d, 0xc8, 0x4c, 0x13, 0x3b, 0xb2, 0x9d, 0x40, 0x6f, 0x7c, 0x04, 0xce, - 0x7c, 0x14, 0x3e, 0xc1, 0x8e, 0x3b, 0xee, 0x14, 0xb1, 0xf0, 0x2d, 0x76, 0x42, 0x49, 0xca, 0x9a, - 0xad, 0x9d, 0xd8, 0x2d, 0xfe, 0xfd, 0xb3, 0x9f, 0x27, 0x3f, 0xf4, 0x62, 0xbc, 0x27, 0x31, 0xe5, - 0xf6, 0x38, 0x1e, 0x82, 0x60, 0xa0, 0x40, 0xda, 0x09, 0xb0, 0x11, 0x17, 0xf6, 0x94, 0x20, 0x11, - 0xb5, 0xa5, 0xe2, 0x82, 0xf8, 0x60, 0x27, 0x7d, 0xdb, 0x07, 0x06, 0x82, 0x28, 0x18, 0xe1, 0x48, - 0x70, 0xc5, 0xf5, 0x87, 0xa5, 0x0c, 0x93, 0x88, 0xe2, 0xa9, 0x0c, 0x27, 0xfd, 0xce, 0x63, 0x9f, - 0xaa, 0x93, 0x78, 0x88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0x04, 0xb7, 0x3c, 0x3c, 0xab, 0xef, 0x69, 0x1b, 0x3f, 0x35, 0xd4, 0xae, 0xfe, 0xca, 0x03, - 0x2a, 0x95, 0xfe, 0x61, 0xae, 0xa0, 0xf8, 0x6e, 0x05, 0xcd, 0xdd, 0x45, 0x3d, 0xdb, 0xd3, 0x02, - 0x2c, 0xfd, 0x45, 0x2a, 0xe5, 0x7c, 0x8d, 0x9a, 0x54, 0x41, 0x28, 0x8d, 0x7a, 0x51, 0xb0, 0x47, - 0x77, 0x28, 0x98, 0xb3, 0x3a, 0xcd, 0x6b, 0xbe, 0xc9, 0x9d, 0x6e, 0x19, 0xe0, 0xf4, 0x4e, 0x2f, - 0xcc, 0xda, 0xd9, 0x85, 0x59, 0x3b, 0xbf, 0x30, 0x6b, 0xdf, 0x32, 0x53, 0x3b, 0xcd, 0x4c, 0xed, - 0x2c, 0x33, 0xb5, 0xf3, 0xcc, 0xd4, 0x7e, 0x65, 0xa6, 0xf6, 0xfd, 0xb7, 0x59, 0x7b, 0x5f, 0x4f, - 0xfa, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xee, 0x56, 0xcc, 0xfd, 0x0a, 0x05, 0x00, 0x00, + // 656 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcd, 0x6e, 0xd3, 0x4a, + 0x14, 0x8e, 0x93, 0x9b, 0xde, 0x74, 0xd2, 0xea, 0x26, 0xbe, 0xbd, 0x92, 0x6f, 0x16, 0x4e, 0x54, + 0x36, 0x11, 0x12, 0xe3, 0xa6, 0x14, 0x54, 0x21, 0x81, 0x54, 0xa3, 0x4a, 0x20, 0xb5, 0x6a, 0xe4, + 0x56, 0x15, 0x42, 0x2c, 0x98, 0x38, 0x07, 0x77, 0x88, 0xed, 0x31, 0x33, 0x63, 0x43, 0x76, 0xbc, + 0x00, 0x12, 0xcf, 0xc3, 0x13, 0x74, 0xd9, 0x65, 0x57, 0x16, 0x35, 0x6f, 0xd1, 0x15, 0xf2, 0x0f, + 0x8d, 0x9b, 0x04, 0xd1, 0xdd, 0xcc, 0x77, 0xbe, 0xef, 0x3b, 0x33, 0xe7, 0x07, 0x3d, 0x9b, 0xec, + 0x0a, 0x4c, 0x99, 0x31, 0x09, 0x47, 0xc0, 0x7d, 0x90, 0x20, 0x8c, 0x08, 0xfc, 0x31, 0xe3, 0x46, + 0x11, 0x20, 0x01, 0x35, 0x84, 0x64, 0x9c, 0x38, 0x60, 0x44, 0x03, 0xc3, 0x01, 0x1f, 0x38, 0x91, + 0x30, 0xc6, 0x01, 0x67, 0x92, 0xa9, 0xff, 0xe5, 0x34, 0x4c, 0x02, 0x8a, 0x0b, 0x1a, 0x8e, 0x06, + 0x9d, 0x07, 0x0e, 0x95, 0x67, 0xe1, 0x08, 0xdb, 0xcc, 0x33, 0x1c, 0xe6, 0x30, 0x23, 0x63, 0x8f, + 0xc2, 0x77, 0xd9, 0x2d, 0xbb, 0x64, 0xa7, 0xdc, 0xa5, 0xb3, 0x59, 0x4a, 0x66, 0x33, 0xbe, 0x2c, + 0x53, 0x67, 0x67, 0xc6, 0xf1, 0x88, 0x7d, 0x46, 0x7d, 0xe0, 0x53, 0x23, 0x98, 0x38, 0x29, 0x20, + 0x0c, 0x0f, 0x24, 0x59, 0xa6, 0x32, 0x7e, 0xa7, 0xe2, 0xa1, 0x2f, 0xa9, 0x07, 0x0b, 0x82, 0xc7, + 0x7f, 0x12, 0x08, 0xfb, 0x0c, 0x3c, 0x32, 0xaf, 0xdb, 0xfc, 0xb2, 0x82, 0xd6, 0x8e, 0xf3, 0x02, + 0x3c, 0x77, 0x89, 0x10, 0xea, 0x5b, 0xd4, 0x48, 0x1f, 0x35, 0x26, 0x92, 0x68, 0x4a, 0x4f, 0xe9, + 0x37, 0xb7, 0xb7, 0xf0, 0xac, 0x58, 0x37, 0xde, 0x38, 0x98, 0x38, 0x29, 0x20, 0x70, 0xca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0x5e, 0xf9, 0x9c, 0xe8, 0xca, 0x79, 0xa2, + 0x2b, 0x17, 0x89, 0xae, 0x5c, 0x26, 0xba, 0xf2, 0x3d, 0xd1, 0x95, 0xaf, 0x3f, 0xf4, 0xca, 0xeb, + 0x6a, 0x34, 0xf8, 0x19, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x64, 0x41, 0x83, 0x40, 0x05, 0x00, 0x00, } diff --git a/deps/k8s.io/api/storage/v1/generated.proto b/deps/k8s.io/api/storage/v1/generated.proto index 72b3ceb83..df9f1dc45 100644 --- a/deps/k8s.io/api/storage/v1/generated.proto +++ b/deps/k8s.io/api/storage/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,10 @@ syntax = 'proto2'; package k8s.io.api.storage.v1; -import "k8s.io/api/storage/v1beta1/generated.proto"; +import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; @@ -70,6 +69,14 @@ message StorageClass { // the VolumeScheduling feature. // +optional optional string volumeBindingMode = 7; + + // Restrict the node topologies where volumes can be dynamically provisioned. + // Each volume plugin defines its own supported topology specifications. + // An empty TopologySelectorTerm list means there is no topology restriction. + // This field is alpha-level and is only honored by servers that enable + // the DynamicProvisioningScheduling feature. + // +optional + repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8; } // StorageClassList is a collection of storage classes. diff --git a/deps/k8s.io/api/storage/v1/types.go b/deps/k8s.io/api/storage/v1/types.go index 288d40abb..45bfa7681 100644 --- a/deps/k8s.io/api/storage/v1/types.go +++ b/deps/k8s.io/api/storage/v1/types.go @@ -66,6 +66,14 @@ type StorageClass struct { // the VolumeScheduling feature. // +optional VolumeBindingMode *VolumeBindingMode `json:"volumeBindingMode,omitempty" protobuf:"bytes,7,opt,name=volumeBindingMode"` + + // Restrict the node topologies where volumes can be dynamically provisioned. + // Each volume plugin defines its own supported topology specifications. + // An empty TopologySelectorTerm list means there is no topology restriction. + // This field is alpha-level and is only honored by servers that enable + // the DynamicProvisioningScheduling feature. + // +optional + AllowedTopologies []v1.TopologySelectorTerm `json:"allowedTopologies,omitempty" protobuf:"bytes,8,rep,name=allowedTopologies"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/deps/k8s.io/api/storage/v1/types_swagger_doc_generated.go b/deps/k8s.io/api/storage/v1/types_swagger_doc_generated.go index 3eb9bdab7..1d6587047 100644 --- a/deps/k8s.io/api/storage/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/storage/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_StorageClass = map[string]string{ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -36,6 +36,7 @@ var map_StorageClass = map[string]string{ "mountOptions": "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", "allowVolumeExpansion": "AllowVolumeExpansion shows whether the storage class allow volume expand", "volumeBindingMode": "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is alpha-level and is only honored by servers that enable the VolumeScheduling feature.", + "allowedTopologies": "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is alpha-level and is only honored by servers that enable the DynamicProvisioningScheduling feature.", } func (StorageClass) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/storage/v1/zz_generated.deepcopy.go b/deps/k8s.io/api/storage/v1/zz_generated.deepcopy.go index 63bdcc43c..0e850dc34 100644 --- a/deps/k8s.io/api/storage/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/storage/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -39,12 +39,8 @@ func (in *StorageClass) DeepCopyInto(out *StorageClass) { } if in.ReclaimPolicy != nil { in, out := &in.ReclaimPolicy, &out.ReclaimPolicy - if *in == nil { - *out = nil - } else { - *out = new(core_v1.PersistentVolumeReclaimPolicy) - **out = **in - } + *out = new(corev1.PersistentVolumeReclaimPolicy) + **out = **in } if in.MountOptions != nil { in, out := &in.MountOptions, &out.MountOptions @@ -53,20 +49,19 @@ func (in *StorageClass) DeepCopyInto(out *StorageClass) { } if in.AllowVolumeExpansion != nil { in, out := &in.AllowVolumeExpansion, &out.AllowVolumeExpansion - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.VolumeBindingMode != nil { in, out := &in.VolumeBindingMode, &out.VolumeBindingMode - if *in == nil { - *out = nil - } else { - *out = new(VolumeBindingMode) - **out = **in + *out = new(VolumeBindingMode) + **out = **in + } + if in.AllowedTopologies != nil { + in, out := &in.AllowedTopologies, &out.AllowedTopologies + *out = make([]corev1.TopologySelectorTerm, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) } } return @@ -86,9 +81,8 @@ func (in *StorageClass) DeepCopy() *StorageClass { func (in *StorageClass) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -120,7 +114,6 @@ func (in *StorageClassList) DeepCopy() *StorageClassList { func (in *StorageClassList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/api/storage/v1alpha1/BUILD b/deps/k8s.io/api/storage/v1alpha1/BUILD deleted file mode 100644 index 98342a426..000000000 --- a/deps/k8s.io/api/storage/v1alpha1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/storage/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/storage/v1alpha1/generated.pb.go b/deps/k8s.io/api/storage/v1alpha1/generated.pb.go index 586a1b672..507b5c1d5 100644 --- a/deps/k8s.io/api/storage/v1alpha1/generated.pb.go +++ b/deps/k8s.io/api/storage/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1472,52 +1472,49 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 745 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x3d, 0x6f, 0xdb, 0x46, - 0x18, 0xc7, 0x45, 0x49, 0xb6, 0xe5, 0x53, 0x5f, 0x8c, 0x83, 0xd0, 0x0a, 0x2a, 0x40, 0x19, 0x9a, - 0xdc, 0xa2, 0x3e, 0x56, 0x76, 0x51, 0x18, 0xdd, 0x44, 0xd8, 0x43, 0x51, 0xcb, 0x2d, 0xe8, 0xa2, - 0x43, 0xdb, 0xa1, 0x27, 0xf2, 0x31, 0x45, 0x4b, 0x7c, 0xc1, 0xdd, 0x51, 0x88, 0xb7, 0x4c, 0x99, - 0xb3, 0xe5, 0x1b, 0xe4, 0xb3, 0x68, 0x8b, 0x47, 0x4f, 0x42, 0xcc, 0x7c, 0x8b, 0x2c, 0x09, 0x78, - 0x3c, 0x89, 0xb2, 0x29, 0x25, 0xb6, 0x37, 0x3e, 0xcf, 0x3d, 0xff, 0xdf, 0xf3, 0x76, 0x47, 0x74, - 0x3c, 0x3a, 0xe2, 0xc4, 0x0b, 0x8d, 0x51, 0x3c, 0x00, 0x16, 0x80, 0x00, 0x6e, 0x4c, 0x20, 0x70, - 0x42, 0x66, 0xa8, 0x03, 0x1a, 0x79, 0x06, 0x17, 0x21,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xcf, 0x87, 0xfc, 0x0f, 0x96, - 0x5a, 0x96, 0xa4, 0xe0, 0xef, 0xd1, 0x96, 0x0f, 0x9c, 0x53, 0x57, 0x65, 0x36, 0xbf, 0x56, 0x41, - 0x5b, 0xfd, 0xcc, 0x6d, 0xcd, 0xcf, 0x4d, 0x32, 0xbd, 0xd5, 0x4b, 0xd7, 0xb7, 0x7a, 0xe9, 0xe6, - 0x56, 0x2f, 0x3d, 0x4f, 0x74, 0x6d, 0x9a, 0xe8, 0xda, 0x75, 0xa2, 0x6b, 0x37, 0x89, 0xae, 0xbd, - 0x4d, 0x74, 0xed, 0xe5, 0x3b, 0xbd, 0xf4, 0x4f, 0x6d, 0x3e, 0xb8, 0x8f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x68, 0x82, 0x7b, 0x73, 0x9e, 0x07, 0x00, 0x00, + // 704 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0xc7, 0xe3, 0x24, 0x6d, 0xd3, 0xcd, 0xf3, 0x52, 0xad, 0xa2, 0xe7, 0x89, 0x82, 0xe4, 0x54, + 0x39, 0x15, 0x44, 0xd7, 0xa4, 0x20, 0x54, 0x71, 0x8b, 0xd5, 0x1e, 0x10, 0x6d, 0x41, 0x5b, 0xc4, + 0x01, 0x38, 0xb0, 0xb1, 0xa7, 0x8e, 0x9b, 0xfa, 0x45, 0xbb, 0xeb, 0x48, 0xbd, 0x71, 0xe2, 0xcc, + 0x8d, 0x6f, 0xc0, 0x67, 0xc9, 0x8d, 0x1e, 0x7b, 0x8a, 0xa8, 0xf9, 0x16, 0x5c, 0x40, 0x5e, 0x6f, + 0x5e, 0x68, 0x52, 0x68, 0x7b, 0xf3, 0xcc, 0xce, 0xfc, 0x66, 0xe6, 0xbf, 0xb3, 0x46, 0x3b, 0xfd, + 0x6d, 0x41, 0xfc, 0xc8, 0xea, 0x27, 0x5d, 0xe0, 0x21, 0x48, 0x10, 0xd6, 0x00, 0x42, 0x37, 0xe2, + 0x96, 0x3e, 0x60, 0xb1, 0x6f, 0x09, 0x19, 0x71, 0xe6, 0x81, 0x35, 0x68, 0xb3, 0x93, 0xb8, 0xc7, + 0xda, 0x96, 0x07, 0x21, 0x70, 0x26, 0xc1, 0x25, 0x31, 0x8f, 0x64, 0x84, 0xef, 0xe4, 0xc1, 0x84, + 0xc5, 0x3e, 0xd1, 0xc1, 0x64, 0x1c, 0xdc, 0xd8, 0xf4, 0x7c, 0xd9, 0x4b, 0xba, 0xc4, 0x89, 0x02, + 0xcb, 0x8b, 0xbc, 0xc8, 0x52, 0x39, 0xdd, 0xe4, 0x48, 0x59, 0xca, 0x50, 0x5f, 0x39, 0xab, 0xf1, + 0x68, 0x5a, 0x38, 0x60, 0x4e, 0xcf, 0x0f, 0x81, 0x9f, 0x5a, 0x71, 0xdf, 0xcb, 0x1c, 0xc2, 0x0a, + 0x40, 0x32, 0x6b, 0x30, 0xd7, 0x41, 0xc3, 0xba, 0x2a, 0x8b, 0x27, 0xa1, 0xf4, 0x03, 0x98, 0x4b, + 0x78, 0xfc, 0xa7, 0x04, 0xe1, 0xf4, 0x20, 0x60, 0x97, 0xf3, 0x5a, 0x9f, 0x8b, 0x68, 0xed, 0x55, + 0x74, 0x92, 0x04, 0xd0, 0x91, 0x92, 0x39, 0xbd, 0x00, 0x42, 0x89, 0xdf, 0xa1, 0x4a, 0xd6, 0x98, + 0xcb, 0x24, 0xab, 0x1b, 0xeb, 0xc6, 0x46, 0x75, 0xeb, 0x01, 0x99, 0x4a, 0x32, 0xe1, 0x93, 0xb8, + 0xef, 0x65, 0x0e, 0x41, 0xb2, 0x68, 0x32, 0x68, 0x93, 0xe7, 0xdd, 0x63, 0x70, 0xe4, 0x3e, 0x48, + 0x66, 0xe3, 0xe1, 0xa8, 0x59, 0x48, 0x47, 0x4d, 0x34, 0xf5, 0xd1, 0x09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x83, 0x56, 0xf6, 0x73, 0x37, 0x1d, 0x9f, 0xdb, 0x64, 0x78, + 0x61, 0x16, 0xce, 0x2e, 0xcc, 0xc2, 0xf9, 0x85, 0x59, 0x78, 0x9f, 0x9a, 0xc6, 0x30, 0x35, 0x8d, + 0xb3, 0xd4, 0x34, 0xce, 0x53, 0xd3, 0xf8, 0x9a, 0x9a, 0xc6, 0xc7, 0x6f, 0x66, 0xe1, 0x75, 0x65, + 0x2c, 0xdc, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0xba, 0xdb, 0x12, 0x1a, 0x07, 0x00, 0x00, } diff --git a/deps/k8s.io/api/storage/v1alpha1/generated.proto b/deps/k8s.io/api/storage/v1alpha1/generated.proto index 289ef5f3e..ccb947540 100644 --- a/deps/k8s.io/api/storage/v1alpha1/generated.proto +++ b/deps/k8s.io/api/storage/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,11 +21,9 @@ syntax = 'proto2'; package k8s.io.api.storage.v1alpha1; -import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; diff --git a/deps/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go b/deps/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go index faca8e939..32d7dcc52 100644 --- a/deps/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/storage/v1alpha1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1alpha1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_VolumeAttachment = map[string]string{ "": "VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.\n\nVolumeAttachment objects are non-namespaced.", "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", diff --git a/deps/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go index e1561dba1..e27c6ff3f 100644 --- a/deps/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/storage/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -48,9 +48,8 @@ func (in *VolumeAttachment) DeepCopy() *VolumeAttachment { func (in *VolumeAttachment) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -82,9 +81,8 @@ func (in *VolumeAttachmentList) DeepCopy() *VolumeAttachmentList { func (in *VolumeAttachmentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -92,12 +90,8 @@ func (in *VolumeAttachmentSource) DeepCopyInto(out *VolumeAttachmentSource) { *out = *in if in.PersistentVolumeName != nil { in, out := &in.PersistentVolumeName, &out.PersistentVolumeName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -141,21 +135,13 @@ func (in *VolumeAttachmentStatus) DeepCopyInto(out *VolumeAttachmentStatus) { } if in.AttachError != nil { in, out := &in.AttachError, &out.AttachError - if *in == nil { - *out = nil - } else { - *out = new(VolumeError) - (*in).DeepCopyInto(*out) - } + *out = new(VolumeError) + (*in).DeepCopyInto(*out) } if in.DetachError != nil { in, out := &in.DetachError, &out.DetachError - if *in == nil { - *out = nil - } else { - *out = new(VolumeError) - (*in).DeepCopyInto(*out) - } + *out = new(VolumeError) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/api/storage/v1beta1/BUILD b/deps/k8s.io/api/storage/v1beta1/BUILD deleted file mode 100644 index e659e9de0..000000000 --- a/deps/k8s.io/api/storage/v1beta1/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/api/storage/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/api/storage/v1beta1/generated.pb.go b/deps/k8s.io/api/storage/v1beta1/generated.pb.go index 425d0e717..fed8c7a63 100644 --- a/deps/k8s.io/api/storage/v1beta1/generated.pb.go +++ b/deps/k8s.io/api/storage/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -188,6 +188,18 @@ func (m *StorageClass) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VolumeBindingMode))) i += copy(dAtA[i:], *m.VolumeBindingMode) } + if len(m.AllowedTopologies) > 0 { + for _, msg := range m.AllowedTopologies { + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -524,6 +536,12 @@ func (m *StorageClass) Size() (n int) { l = len(*m.VolumeBindingMode) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.AllowedTopologies) > 0 { + for _, e := range m.AllowedTopologies { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -657,6 +675,7 @@ func (this *StorageClass) String() string { `MountOptions:` + fmt.Sprintf("%v", this.MountOptions) + `,`, `AllowVolumeExpansion:` + valueToStringGenerated(this.AllowVolumeExpansion) + `,`, `VolumeBindingMode:` + valueToStringGenerated(this.VolumeBindingMode) + `,`, + `AllowedTopologies:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedTopologies), "TopologySelectorTerm", "k8s_io_api_core_v1.TopologySelectorTerm", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -1073,6 +1092,37 @@ func (m *StorageClass) Unmarshal(dAtA []byte) error { s := VolumeBindingMode(dAtA[iNdEx:postIndex]) m.VolumeBindingMode = &s iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedTopologies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedTopologies = append(m.AllowedTopologies, k8s_io_api_core_v1.TopologySelectorTerm{}) + if err := m.AllowedTopologies[len(m.AllowedTopologies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2145,67 +2195,67 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 977 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xc6, 0xf9, 0x1c, 0x27, 0x34, 0x1d, 0x22, 0xb0, 0x7c, 0x58, 0x47, 0xbe, 0x60, 0xaa, - 0x66, 0xb7, 0x09, 0x05, 0x45, 0x48, 0x1c, 0xb2, 0x25, 0x07, 0x50, 0xdc, 0x86, 0x29, 0xaa, 0x50, - 0xc5, 0x81, 0xc9, 0xee, 0xab, 0x33, 0xd8, 0xfb, 0xa1, 0x99, 0x59, 0xd3, 0xdc, 0x38, 0x71, 0xe6, - 0xc4, 0x95, 0x0b, 0xff, 0x07, 0x47, 0x72, 0x42, 0x3d, 0xf6, 0x64, 0x91, 0xe5, 0xbf, 0x88, 0x38, - 0xa0, 0x99, 0x9d, 0x78, 0xd7, 0x5e, 0x5b, 0x4d, 0x7a, 0xe8, 0x2d, 0xf3, 0xde, 0xfb, 0xfd, 0xde, - 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02, 0xcc, 0x50, 0x3d, 0xb7, 0x1e, 0x71, 0x1e, - 0x73, 0x73, 0x45, 0x1f, 0xbd, 0xb9, 0x20, 0x1d, 0xee, 0xd9, 0xea, 0x17, 0xf2, 0xb0, 0xc0, 0x5f, - 0x8d, 0x5a, 0xf5, 0x92, 0x9f, 0x94, 0xb9, 0x55, 0xaa, 0x00, 0x8a, 0x54, 0x4b, 0x6f, 0x91, 0xea, - 0x4b, 0x98, 0x9f, 0xaa, 0xc4, 0xdd, 0x3c, 0x42, 0x1f, 0xce, 0x19, 0xd0, 0xad, 0x3e, 0xf5, 0xbf, - 0x58, 0xa8, 0x9c, 0x03, 0x1f, 0xa3, 0x25, 0xf5, 0x0f, 0x8f, 0x39, 0xfa, 0x7b, 0x37, 0x3b, 0xfa, - 0x6f, 0x59, 0x08, 0xc5, 0xb7, 0x4b, 0xbd, 0x88, 0x66, 0xc1, 0x1f, 0xa3, 0xd5, 0x10, 0x84, 0xa0, - 0x3d, 0x93, 0xd9, 0xbb, 0x63, 0x82, 0x56, 0xbb, 0xb9, 0x99, 0x5c, 0xfb, 0xbd, 0xdd, 0x8b, 0x4b, - 0x7b, 0xe1, 0xd5, 0xa5, 0xbd, 0xf0, 0xfa, 0xd2, 0x5e, 0xf8, 0x39, 0xb3, 0xad, 0x8b, 0xcc, 0xb6, - 0x5e, 0x65, 0xb6, 0xf5, 0x3a, 0xb3, 0xad, 0x7f, 0x32, 0xdb, 0xfa, 0xf5, 0x5f, 0x7b, 0xe1, 0xf9, - 0xaa, 0x99, 0xdb, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x7f, 0x8a, 0x3b, 0x1c, 0x0b, 0x00, - 0x00, + // 988 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xc6, 0xf9, 0x70, 0xc6, 0x09, 0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x6a, 0x72, 0x6d, 0x77, 0xef, 0x5f, 0x5c, 0x36, 0x17, 0x5e, 0x5c, 0x36, 0x17, + 0x5e, 0x5e, 0x36, 0x17, 0x7e, 0xca, 0x9a, 0xd6, 0x45, 0xd6, 0xb4, 0x5e, 0x64, 0x4d, 0xeb, 0x65, + 0xd6, 0xb4, 0xfe, 0xce, 0x9a, 0xd6, 0x2f, 0xff, 0x34, 0x17, 0x9e, 0xad, 0x9a, 0xbe, 0xfd, 0x17, + 0x00, 0x00, 0xff, 0xff, 0xb4, 0x63, 0x7e, 0xa7, 0x0b, 0x0b, 0x00, 0x00, } diff --git a/deps/k8s.io/api/storage/v1beta1/generated.proto b/deps/k8s.io/api/storage/v1beta1/generated.proto index 1c6db8d41..359b68634 100644 --- a/deps/k8s.io/api/storage/v1beta1/generated.proto +++ b/deps/k8s.io/api/storage/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -22,11 +22,9 @@ syntax = 'proto2'; package k8s.io.api.storage.v1beta1; import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -71,6 +69,14 @@ message StorageClass { // the VolumeScheduling feature. // +optional optional string volumeBindingMode = 7; + + // Restrict the node topologies where volumes can be dynamically provisioned. + // Each volume plugin defines its own supported topology specifications. + // An empty TopologySelectorTerm list means there is no topology restriction. + // This field is alpha-level and is only honored by servers that enable + // the DynamicProvisioningScheduling feature. + // +optional + repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8; } // StorageClassList is a collection of storage classes. diff --git a/deps/k8s.io/api/storage/v1beta1/types.go b/deps/k8s.io/api/storage/v1beta1/types.go index 99c9e4594..7ec1e908f 100644 --- a/deps/k8s.io/api/storage/v1beta1/types.go +++ b/deps/k8s.io/api/storage/v1beta1/types.go @@ -66,6 +66,14 @@ type StorageClass struct { // the VolumeScheduling feature. // +optional VolumeBindingMode *VolumeBindingMode `json:"volumeBindingMode,omitempty" protobuf:"bytes,7,opt,name=volumeBindingMode"` + + // Restrict the node topologies where volumes can be dynamically provisioned. + // Each volume plugin defines its own supported topology specifications. + // An empty TopologySelectorTerm list means there is no topology restriction. + // This field is alpha-level and is only honored by servers that enable + // the DynamicProvisioningScheduling feature. + // +optional + AllowedTopologies []v1.TopologySelectorTerm `json:"allowedTopologies,omitempty" protobuf:"bytes,8,rep,name=allowedTopologies"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/deps/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go index c9c20c453..423e7f271 100644 --- a/deps/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/api/storage/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_StorageClass = map[string]string{ "": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -36,6 +36,7 @@ var map_StorageClass = map[string]string{ "mountOptions": "Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.", "allowVolumeExpansion": "AllowVolumeExpansion shows whether the storage class allow volume expand", "volumeBindingMode": "VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is alpha-level and is only honored by servers that enable the VolumeScheduling feature.", + "allowedTopologies": "Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is alpha-level and is only honored by servers that enable the DynamicProvisioningScheduling feature.", } func (StorageClass) SwaggerDoc() map[string]string { diff --git a/deps/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go index e00feb3ea..8096dba9b 100644 --- a/deps/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/api/storage/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -39,12 +39,8 @@ func (in *StorageClass) DeepCopyInto(out *StorageClass) { } if in.ReclaimPolicy != nil { in, out := &in.ReclaimPolicy, &out.ReclaimPolicy - if *in == nil { - *out = nil - } else { - *out = new(v1.PersistentVolumeReclaimPolicy) - **out = **in - } + *out = new(v1.PersistentVolumeReclaimPolicy) + **out = **in } if in.MountOptions != nil { in, out := &in.MountOptions, &out.MountOptions @@ -53,20 +49,19 @@ func (in *StorageClass) DeepCopyInto(out *StorageClass) { } if in.AllowVolumeExpansion != nil { in, out := &in.AllowVolumeExpansion, &out.AllowVolumeExpansion - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.VolumeBindingMode != nil { in, out := &in.VolumeBindingMode, &out.VolumeBindingMode - if *in == nil { - *out = nil - } else { - *out = new(VolumeBindingMode) - **out = **in + *out = new(VolumeBindingMode) + **out = **in + } + if in.AllowedTopologies != nil { + in, out := &in.AllowedTopologies, &out.AllowedTopologies + *out = make([]v1.TopologySelectorTerm, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) } } return @@ -86,9 +81,8 @@ func (in *StorageClass) DeepCopy() *StorageClass { func (in *StorageClass) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -120,9 +114,8 @@ func (in *StorageClassList) DeepCopy() *StorageClassList { func (in *StorageClassList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -149,9 +142,8 @@ func (in *VolumeAttachment) DeepCopy() *VolumeAttachment { func (in *VolumeAttachment) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -183,9 +175,8 @@ func (in *VolumeAttachmentList) DeepCopy() *VolumeAttachmentList { func (in *VolumeAttachmentList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -193,12 +184,8 @@ func (in *VolumeAttachmentSource) DeepCopyInto(out *VolumeAttachmentSource) { *out = *in if in.PersistentVolumeName != nil { in, out := &in.PersistentVolumeName, &out.PersistentVolumeName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -242,21 +229,13 @@ func (in *VolumeAttachmentStatus) DeepCopyInto(out *VolumeAttachmentStatus) { } if in.AttachError != nil { in, out := &in.AttachError, &out.AttachError - if *in == nil { - *out = nil - } else { - *out = new(VolumeError) - (*in).DeepCopyInto(*out) - } + *out = new(VolumeError) + (*in).DeepCopyInto(*out) } if in.DetachError != nil { in, out := &in.DetachError, &out.DetachError - if *in == nil { - *out = nil - } else { - *out = new(VolumeError) - (*in).DeepCopyInto(*out) - } + *out = new(VolumeError) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/apiextensions-apiserver/BUILD b/deps/k8s.io/apiextensions-apiserver/BUILD deleted file mode 100644 index 12f3029b2..000000000 --- a/deps/k8s.io/apiextensions-apiserver/BUILD +++ /dev/null @@ -1,56 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "apiextensions-apiserver", - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/apiextensions-apiserver", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/logs:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/cmd/server:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/controller/finalizer:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/controller/status:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/features:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/test/integration:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/Godeps/Godeps.json b/deps/k8s.io/apiextensions-apiserver/Godeps/Godeps.json index 02ee5d061..04be09fa7 100644 --- a/deps/k8s.io/apiextensions-apiserver/Godeps/Godeps.json +++ b/deps/k8s.io/apiextensions-apiserver/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/apiextensions-apiserver", - "GoVersion": "go1.9", - "GodepVersion": "v79", + "GoVersion": "go1.10", + "GodepVersion": "v80", "Packages": [ "./..." ], @@ -10,6 +10,14 @@ "ImportPath": "bitbucket.org/ww/goautoneg", "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" }, + { + "ImportPath": "github.com/Azure/go-ansiterm", + "Rev": "19f72df4d05d31cbe1c56bfc8045c96babff6c7e" + }, + { + "ImportPath": "github.com/Azure/go-ansiterm/winterm", + "Rev": "19f72df4d05d31cbe1c56bfc8045c96babff6c7e" + }, { "ImportPath": "github.com/NYTimes/gziphandler", "Rev": "56545f4a5d46df9a6648819d1664c3a03a13ffdb" @@ -30,6 +38,22 @@ "ImportPath": "github.com/beorn7/perks/quantile", "Rev": "3ac7bf7a47d159a033b107610db8a1b6575507a4" }, + { + "ImportPath": "github.com/cockroachdb/cmux", + "Rev": "112f0506e7743d64a6eb8fedbcff13d9979bbf92" + }, + { + "ImportPath": "github.com/coreos/bbolt", + "Rev": "48ea1b39c25fc1bab3506fbc712ecbaa842c4d2d" + }, + { + "ImportPath": "github.com/coreos/etcd/alarm", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/auth", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/auth/authpb", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" @@ -42,26 +66,214 @@ "ImportPath": "github.com/coreos/etcd/clientv3", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/clientv3/concurrency", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/clientv3/namespace", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/clientv3/naming", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/compactor", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/discovery", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/embed", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/error", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/etcdhttp", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v2http", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v2http/httptypes", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3client", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3election", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb/gw", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3lock", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb/gw", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3rpc", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/auth", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/etcdserver/etcdserverpb", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/etcdserverpb/gw", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/membership", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/etcdserver/stats", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/integration", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/lease", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/lease/leasehttp", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/lease/leasepb", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/mvcc", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/mvcc/backend", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/mvcc/mvccpb", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/pkg/adt", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/contention", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/cors", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/cpuutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/crc", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/debugutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/fileutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/httputil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/idutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/ioutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/logutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/monotime", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/netutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/pkg/pathutil", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/pkg/pbutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/runtime", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/schedule", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/pkg/srv", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/pkg/testutil", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/pkg/tlsutil", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" @@ -74,10 +286,58 @@ "ImportPath": "github.com/coreos/etcd/pkg/types", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/pkg/wait", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/proxy/grpcproxy", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/proxy/grpcproxy/adapter", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/proxy/grpcproxy/cache", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/raft", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/raft/raftpb", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/rafthttp", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/snap", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/snap/snappb", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/store", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/etcd/version", "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" }, + { + "ImportPath": "github.com/coreos/etcd/wal", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, + { + "ImportPath": "github.com/coreos/etcd/wal/walpb", + "Rev": "95a726a27e09030f9ccbd9982a1508f5a6d25ada" + }, { "ImportPath": "github.com/coreos/go-semver/semver", "Rev": "568e959cd89871e61434c1143528d9162da89ef2" @@ -86,10 +346,30 @@ "ImportPath": "github.com/coreos/go-systemd/daemon", "Rev": "48702e0da86bd25e76cfef347e2adeb434a0d0a6" }, + { + "ImportPath": "github.com/coreos/go-systemd/journal", + "Rev": "48702e0da86bd25e76cfef347e2adeb434a0d0a6" + }, + { + "ImportPath": "github.com/coreos/pkg/capnslog", + "Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8" + }, { "ImportPath": "github.com/davecgh/go-spew/spew", "Rev": "782f4967f2dc4564575ca782fe2d04090b5faca8" }, + { + "ImportPath": "github.com/dgrijalva/jwt-go", + "Rev": "01aeca54ebda6e0fbfafd0a524d234159c05ec20" + }, + { + "ImportPath": "github.com/docker/docker/pkg/term", + "Rev": "4f3616fb1c112e206b88cb7a9922bf49067a7756" + }, + { + "ImportPath": "github.com/docker/docker/pkg/term/windows", + "Rev": "4f3616fb1c112e206b88cb7a9922bf49067a7756" + }, { "ImportPath": "github.com/elazarl/go-bindata-assetfs", "Rev": "3dcc96556217539f50599357fb481ac0dc7439b9" @@ -108,7 +388,7 @@ }, { "ImportPath": "github.com/evanphx/json-patch", - "Rev": "944e07253867aacae43c04b2e6a239005443f33a" + "Rev": "94e38aa1586e8a6c8a75770bddf5ff84c48a106b" }, { "ImportPath": "github.com/ghodss/yaml", @@ -140,7 +420,7 @@ }, { "ImportPath": "github.com/go-openapi/spec", - "Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d" + "Rev": "1de3e0542de65ad8d75452a595886fdd0befb363" }, { "ImportPath": "github.com/go-openapi/strfmt", @@ -152,7 +432,7 @@ }, { "ImportPath": "github.com/go-openapi/validate", - "Rev": "deaf2c9013bc1a7f4c774662259a506ba874d80f" + "Rev": "d509235108fcf6ab4913d2dcb3a2260c0db2108e" }, { "ImportPath": "github.com/gogo/protobuf/proto", @@ -166,29 +446,45 @@ "ImportPath": "github.com/golang/glog", "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" }, + { + "ImportPath": "github.com/golang/groupcache/lru", + "Rev": "02826c3e79038b59d737d3b1c0a1d937f71a4433" + }, + { + "ImportPath": "github.com/golang/protobuf/jsonpb", + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" + }, { "ImportPath": "github.com/golang/protobuf/proto", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/protoc-gen-go/descriptor", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/any", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/duration", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" + }, + { + "ImportPath": "github.com/golang/protobuf/ptypes/struct", + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/timestamp", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" + }, + { + "ImportPath": "github.com/google/btree", + "Rev": "7d79101e329e5a3adf994758c578dab82b90c017" }, { "ImportPath": "github.com/google/gofuzz", @@ -206,6 +502,30 @@ "ImportPath": "github.com/googleapis/gnostic/extensions", "Rev": "0c5108395e2debce0d731cf0287ddf7242066aba" }, + { + "ImportPath": "github.com/gregjones/httpcache", + "Rev": "787624de3eb7bd915c329cba748687a3b22666a6" + }, + { + "ImportPath": "github.com/gregjones/httpcache/diskcache", + "Rev": "787624de3eb7bd915c329cba748687a3b22666a6" + }, + { + "ImportPath": "github.com/grpc-ecosystem/go-grpc-prometheus", + "Rev": "2500245aa6110c562d17020fb31a2c133d737799" + }, + { + "ImportPath": "github.com/grpc-ecosystem/grpc-gateway/runtime", + "Rev": "8cc3a55af3bcf171a1c23a90c4df9cf591706104" + }, + { + "ImportPath": "github.com/grpc-ecosystem/grpc-gateway/runtime/internal", + "Rev": "8cc3a55af3bcf171a1c23a90c4df9cf591706104" + }, + { + "ImportPath": "github.com/grpc-ecosystem/grpc-gateway/utilities", + "Rev": "8cc3a55af3bcf171a1c23a90c4df9cf591706104" + }, { "ImportPath": "github.com/hashicorp/golang-lru", "Rev": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4" @@ -214,21 +534,21 @@ "ImportPath": "github.com/hashicorp/golang-lru/simplelru", "Rev": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4" }, - { - "ImportPath": "github.com/howeyc/gopass", - "Rev": "bf9dde6d0d2c004a008c27aaee91170c786f6db8" - }, { "ImportPath": "github.com/imdario/mergo", - "Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc" + "Rev": "9316a62528ac99aaecb4e47eadd6dc8aa6533d58" }, { "ImportPath": "github.com/inconshreveable/mousetrap", "Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" }, + { + "ImportPath": "github.com/jonboulle/clockwork", + "Rev": "72f9bd7c4e0c2a40055ab3d0f09654f730cce982" + }, { "ImportPath": "github.com/json-iterator/go", - "Rev": "13f86432b882000a51c6e610c620974462691a97" + "Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682" }, { "ImportPath": "github.com/mailru/easyjson/buffer", @@ -244,16 +564,24 @@ }, { "ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil", - "Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a" + "Rev": "c12348ce28de40eed0136aa2b644d0ee0650e56c" + }, + { + "ImportPath": "github.com/modern-go/concurrent", + "Rev": "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" }, { - "ImportPath": "github.com/mxk/go-flowrate/flowrate", - "Rev": "cca7078d478f8520f85629ad7c68962d31ed7682" + "ImportPath": "github.com/modern-go/reflect2", + "Rev": "05fbef0ca5da472bbf96c9322b84a53edc03c9fd" }, { "ImportPath": "github.com/pborman/uuid", "Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4" }, + { + "ImportPath": "github.com/peterbourgon/diskv", + "Rev": "5f041e8faa004a95c88a202771f4cc3e991971e6" + }, { "ImportPath": "github.com/pmezard/go-difflib/difflib", "Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d" @@ -286,40 +614,48 @@ "ImportPath": "github.com/prometheus/procfs/xfs", "Rev": "65c1f6f8f0fc1e2185eb9863a3bc751496404259" }, + { + "ImportPath": "github.com/sirupsen/logrus", + "Rev": "89742aefa4b206dcf400792f3bd35b542998eb3b" + }, { "ImportPath": "github.com/spf13/cobra", - "Rev": "19e54c4a2b8a78c9d54b2bed61b1a6c5e1bfcf6f" + "Rev": "c439c4fa093711d42e1b01acb1235b52004753c1" }, { "ImportPath": "github.com/spf13/pflag", - "Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea" + "Rev": "583c0c0531f06d5278b7d917446061adc344b5cd" }, { "ImportPath": "github.com/stretchr/testify/assert", - "Rev": "f6abca593680b2315d2075e0f5e2a9751e3f431a" + "Rev": "c679ae2cc0cb27ec3293fea7e254e47386f05d69" }, { "ImportPath": "github.com/stretchr/testify/require", - "Rev": "f6abca593680b2315d2075e0f5e2a9751e3f431a" + "Rev": "c679ae2cc0cb27ec3293fea7e254e47386f05d69" }, { "ImportPath": "github.com/ugorji/go/codec", "Rev": "ded73eae5db7e7a0ef6f55aace87a2873c5d2b74" }, { - "ImportPath": "golang.org/x/crypto/ssh/terminal", - "Rev": "81e90905daefcd6fd217b62423c0908922eadb30" + "ImportPath": "github.com/xiang90/probing", + "Rev": "07dd2e8dfe18522e9c447ba95f2fe95262f63bb2" }, { - "ImportPath": "golang.org/x/net/context", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "ImportPath": "golang.org/x/crypto/bcrypt", + "Rev": "de0752318171da717af4ce24d0a2e8626afaeb11" }, { - "ImportPath": "golang.org/x/net/html", - "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" + "ImportPath": "golang.org/x/crypto/blowfish", + "Rev": "de0752318171da717af4ce24d0a2e8626afaeb11" + }, + { + "ImportPath": "golang.org/x/crypto/ssh/terminal", + "Rev": "de0752318171da717af4ce24d0a2e8626afaeb11" }, { - "ImportPath": "golang.org/x/net/html/atom", + "ImportPath": "golang.org/x/net/context", "Rev": "1c05540f6879653db88113bc4a2b70aec4bd491f" }, { @@ -500,1187 +836,1323 @@ }, { "ImportPath": "k8s.io/api/admission/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/apps/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/apps/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/apps/v1beta2", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/authentication/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/authentication/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/authorization/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/authorization/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/autoscaling/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/autoscaling/v2beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/batch/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/batch/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/batch/v2alpha1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/certificates/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" + }, + { + "ImportPath": "k8s.io/api/coordination/v1beta1", + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/core/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/events/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/extensions/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/networking/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/policy/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/rbac/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/rbac/v1alpha1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/rbac/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/scheduling/v1alpha1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" + }, + { + "ImportPath": "k8s.io/api/scheduling/v1beta1", + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/settings/v1alpha1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/storage/v1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/storage/v1alpha1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { "ImportPath": "k8s.io/api/storage/v1beta1", - "Rev": "2694da5be9c4ab4f3fd826112d4c3f71b8bf4b23" + "Rev": "e7796012e019aac998c7035d60c53f4a25219604" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/testing", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/equality", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/errors", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/validation", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/meta", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/validation/path", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/meta/table", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/resource", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/validation", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/api/validation/path", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/validation", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/util/duration", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/util/errors", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/util/framer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/util/naming", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/util/proxy", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "ImportPath": "k8s.io/apimachinery/pkg/util/net", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/rand", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/uuid", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/waitgroup", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" - }, - { - "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "616b23029fa3dc3e0ccefd47963f5651a6543d94" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apiserver/pkg/admission", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/configuration", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/initializer", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/metrics", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/initialization", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/config", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/errors", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/generic", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/namespace", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/request", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/rules", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/validating", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" - }, - { - "ImportPath": "k8s.io/apiserver/pkg/admission/plugin/webhook/versioned", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/apiserver", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/apiserver/install", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/install", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/apis/audit/v1", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/v1alpha1", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/v1beta1", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/audit/validation", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/audit", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/audit/policy", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/authenticator", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/authenticatorfactory", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/group", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/anonymous", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/bearertoken", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/headerrequest", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/union", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/websocket", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/request/x509", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/serviceaccount", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/token/tokenfile", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authentication/user", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authorization/authorizer", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authorization/authorizerfactory", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/authorization/path", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/authorization/union", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/discovery", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/filters", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/handlers", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/handlers/negotiation", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/metrics", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/openapi", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/endpoints/request", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/features", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/registry/generic", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/registry/generic/registry", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/registry/generic/testing", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/registry/rest", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/registry/rest/resttest", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/filters", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/healthz", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/httplog", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/mux", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/options", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/resourceconfig", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/routes", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/routes/data/swagger", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/server/storage", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/storage/cacher", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/errors", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/etcd", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/etcdtest", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/metrics", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { - "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/util", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/testing", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { - "ImportPath": "k8s.io/apiserver/pkg/storage/etcd3", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/testing/testingcert", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { - "ImportPath": "k8s.io/apiserver/pkg/storage/etcd3/preflight", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "ImportPath": "k8s.io/apiserver/pkg/storage/etcd/util", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/storage/etcd3", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/names", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/storagebackend", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/storagebackend/factory", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/storage/testing", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/storage/value", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/util/dryrun", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/util/feature", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/util/flag", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/util/flushwriter", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/util/logs", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/pkg/util/openapi", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/util/trace", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/util/webhook", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/pkg/util/wsstream", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/plugin/pkg/audit/buffered", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/audit/log", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" + }, + { + "ImportPath": "k8s.io/apiserver/plugin/pkg/audit/truncate", + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/audit/webhook", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/authenticator/token/webhook", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/apiserver/plugin/pkg/authorizer/webhook", - "Rev": "16f07649a010bed64bb9c7986bd9988f68ce0421" + "Rev": "838b98e1f1cc3de13169c9bef8e6879521db9f4f" }, { "ImportPath": "k8s.io/client-go/discovery", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/discovery/fake", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/dynamic", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/admissionregistration/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/apps", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/apps/v1beta2", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/autoscaling/v2beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/batch", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/batch/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/batch/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/batch/v2alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/certificates", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/certificates/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/informers/coordination", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/informers/coordination/v1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/core", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/core/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/events", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/events/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/extensions", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/extensions/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/internalinterfaces", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/networking", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/networking/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/policy", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/policy/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/rbac", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/rbac/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/scheduling", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/scheduling/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/informers/scheduling/v1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/settings", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/settings/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/storage", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/informers/storage/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/scheme", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/apps/v1beta2", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/batch/v2alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/certificates/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/kubernetes/typed/coordination/v1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/core/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/events/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/extensions/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/networking/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/policy/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/rbac/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/settings/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/kubernetes/typed/storage/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/admissionregistration/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/apps/v1beta2", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/autoscaling/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/autoscaling/v2beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/batch/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/batch/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/batch/v2alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/certificates/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/listers/coordination/v1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/core/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/events/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/extensions/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/networking/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/policy/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/rbac/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/scheduling/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/listers/scheduling/v1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/settings/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1alpha1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/listers/storage/v1beta1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/pkg/apis/clientauthentication", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/pkg/version", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/plugin/pkg/client/auth/exec", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/rest", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/rest/watch", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/restmapper", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale/scheme", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale/scheme/appsint", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale/scheme/appsv1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale/scheme/appsv1beta2", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale/scheme/autoscalingv1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale/scheme/extensionsint", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/scale/scheme/extensionsv1beta1", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/testing", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/third_party/forked/golang/template", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/auth", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/cache", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api/latest", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/clientcmd/api/v1", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/metrics", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/pager", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/tools/reference", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/transport", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/util/buffer", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/util/cert", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/util/connrotation", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/util/flowcontrol", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/util/homedir", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/util/integer", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" + }, + { + "ImportPath": "k8s.io/client-go/util/jsonpath", + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/util/retry", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/client-go/util/workqueue", - "Rev": "7cd1d3291b7d9b1e2d54d4b69eb65995eaf8888e" + "Rev": "79cb21f5b3b1dd8f8b23bd3f79925b4fda4e2562" }, { "ImportPath": "k8s.io/kube-openapi/pkg/builder", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" }, { "ImportPath": "k8s.io/kube-openapi/pkg/handler", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" } ] } diff --git a/deps/k8s.io/apiextensions-apiserver/Godeps/OWNERS b/deps/k8s.io/apiextensions-apiserver/Godeps/OWNERS new file mode 100644 index 000000000..3d49f3060 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/Godeps/OWNERS @@ -0,0 +1,2 @@ +approvers: +- dep-approvers diff --git a/deps/k8s.io/apiextensions-apiserver/OWNERS b/deps/k8s.io/apiextensions-apiserver/OWNERS index e0cd3186f..f76281ad3 100644 --- a/deps/k8s.io/apiextensions-apiserver/OWNERS +++ b/deps/k8s.io/apiextensions-apiserver/OWNERS @@ -2,7 +2,10 @@ reviewers: - deads2k - sttts - enisoc +- mbohlool approvers: - deads2k - lavalamp - sttts +labels: +- sig/api-machinery diff --git a/deps/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS b/deps/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS new file mode 100644 index 000000000..0648a8ebf --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/SECURITY_CONTACTS @@ -0,0 +1,17 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +cjcullen +jessfraz +liggitt +philips +tallclair diff --git a/deps/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml b/deps/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml index 48058b058..86b5d3070 100644 --- a/deps/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml +++ b/deps/k8s.io/apiextensions-apiserver/artifacts/example/rc.yaml @@ -23,4 +23,4 @@ spec: - "--etcd-servers=http://localhost:2379" - "--audit-log-path=-" - name: etcd - image: quay.io/coreos/etcd:v3.2.14 + image: quay.io/coreos/etcd:v3.2.18 diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/BUILD deleted file mode 100644 index 9bf1895c2..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/update-codegen.sh b/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/update-codegen.sh index 3659ad330..ea26ad63c 100755 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/update-codegen.sh +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/update-codegen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/verify-codegen.sh b/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/verify-codegen.sh index 9cc02a5a4..d02a6fa39 100755 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/verify-codegen.sh +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/hack/verify-codegen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/BUILD deleted file mode 100644 index b600f9212..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["register.go"], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr", - visibility = ["//visibility:public"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/BUILD deleted file mode 100644 index 0379da4b1..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/register.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/register.go index bd3b2ba64..65b65fb32 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/register.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/register.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -47,5 +48,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Example{}, &ExampleList{}, ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/zz_generated.deepcopy.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/zz_generated.deepcopy.go index 97a35e3f9..50828809d 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -48,9 +48,8 @@ func (in *Example) DeepCopy() *Example { func (in *Example) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -82,9 +81,8 @@ func (in *ExampleList) DeepCopy() *ExampleList { func (in *ExampleList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/BUILD deleted file mode 100644 index 0698e1f9a..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "clientset.go", - "doc.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go index 45745dd27..92ff15819 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package versioned import ( - glog "github.com/golang/glog" crv1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -72,7 +73,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/doc.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/doc.go index 7d2f4d80d..41721ca52 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package versioned diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/BUILD deleted file mode 100644 index 3620b1569..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "clientset_generated.go", - "doc.go", - "register.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go index 2a03c770e..28089890d 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -39,11 +41,20 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", testing.DefaultWatchReactor(watch.NewFake(), nil)) + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/doc.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/doc.go index 3fd8e1e2c..9b99e7167 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/register.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/register.go index 4e6435d2a..1260d0d3a 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/register.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -22,15 +24,14 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + crv1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -43,11 +44,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - crv1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/BUILD deleted file mode 100644 index 8b8fa05a1..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/doc.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/doc.go index 3ec2200d0..7dc375616 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/register.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/register.go index 311152e38..5743937a9 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/register.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( @@ -22,15 +24,14 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + crv1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -43,11 +44,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - crv1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/BUILD deleted file mode 100644 index 25b9f2fc4..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "cr_client.go", - "doc.go", - "example.go", - "generated_expansion.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go index 8c662905c..04e3930e1 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/cr_client.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( @@ -28,7 +30,7 @@ type CrV1Interface interface { ExamplesGetter } -// CrV1Client is used to interact with features provided by the cr.client-go.k8s.io group. +// CrV1Client is used to interact with features provided by the cr.example.apiextensions.k8s.io group. type CrV1Client struct { restClient rest.Interface } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/doc.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/doc.go index b6a2a4672..3af5d054f 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go index 66e0e1cff..b9408f1c5 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/example.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1" scheme "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/scheme" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" @@ -35,11 +37,11 @@ type ExamplesGetter interface { type ExampleInterface interface { Create(*v1.Example) (*v1.Example, error) Update(*v1.Example) (*v1.Example, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Example, error) - List(opts meta_v1.ListOptions) (*v1.ExampleList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Example, error) + List(opts metav1.ListOptions) (*v1.ExampleList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Example, err error) ExampleExpansion } @@ -59,7 +61,7 @@ func newExamples(c *CrV1Client, namespace string) *examples { } // Get takes name of the example, and returns the corresponding example object, and an error if there is any. -func (c *examples) Get(name string, options meta_v1.GetOptions) (result *v1.Example, err error) { +func (c *examples) Get(name string, options metav1.GetOptions) (result *v1.Example, err error) { result = &v1.Example{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *examples) Get(name string, options meta_v1.GetOptions) (result *v1.Exam } // List takes label and field selectors, and returns the list of Examples that match those selectors. -func (c *examples) List(opts meta_v1.ListOptions) (result *v1.ExampleList, err error) { +func (c *examples) List(opts metav1.ListOptions) (result *v1.ExampleList, err error) { result = &v1.ExampleList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *examples) List(opts meta_v1.ListOptions) (result *v1.ExampleList, err e } // Watch returns a watch.Interface that watches the requested examples. -func (c *examples) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *examples) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *examples) Update(example *v1.Example) (result *v1.Example, err error) { } // Delete takes name of the example and deletes it. Returns an error if one occurs. -func (c *examples) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *examples) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("examples"). @@ -130,7 +132,7 @@ func (c *examples) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *examples) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *examples) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("examples"). diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/BUILD deleted file mode 100644 index d9c1a5e6c..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_cr_client.go", - "fake_example.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/doc.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/doc.go index c58fac35e..16f443990 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_cr_client.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_cr_client.go index b3f6247c4..5ce902313 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_cr_client.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_cr_client.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go index 7a8dd94b9..f7f5691ee 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/fake/fake_example.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - cr_v1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1" + crv1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -32,25 +34,25 @@ type FakeExamples struct { ns string } -var examplesResource = schema.GroupVersionResource{Group: "cr.client-go.k8s.io", Version: "v1", Resource: "examples"} +var examplesResource = schema.GroupVersionResource{Group: "cr.example.apiextensions.k8s.io", Version: "v1", Resource: "examples"} -var examplesKind = schema.GroupVersionKind{Group: "cr.client-go.k8s.io", Version: "v1", Kind: "Example"} +var examplesKind = schema.GroupVersionKind{Group: "cr.example.apiextensions.k8s.io", Version: "v1", Kind: "Example"} // Get takes name of the example, and returns the corresponding example object, and an error if there is any. -func (c *FakeExamples) Get(name string, options v1.GetOptions) (result *cr_v1.Example, err error) { +func (c *FakeExamples) Get(name string, options v1.GetOptions) (result *crv1.Example, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(examplesResource, c.ns, name), &cr_v1.Example{}) + Invokes(testing.NewGetAction(examplesResource, c.ns, name), &crv1.Example{}) if obj == nil { return nil, err } - return obj.(*cr_v1.Example), err + return obj.(*crv1.Example), err } // List takes label and field selectors, and returns the list of Examples that match those selectors. -func (c *FakeExamples) List(opts v1.ListOptions) (result *cr_v1.ExampleList, err error) { +func (c *FakeExamples) List(opts v1.ListOptions) (result *crv1.ExampleList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(examplesResource, examplesKind, c.ns, opts), &cr_v1.ExampleList{}) + Invokes(testing.NewListAction(examplesResource, examplesKind, c.ns, opts), &crv1.ExampleList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeExamples) List(opts v1.ListOptions) (result *cr_v1.ExampleList, err if label == nil { label = labels.Everything() } - list := &cr_v1.ExampleList{} - for _, item := range obj.(*cr_v1.ExampleList).Items { + list := &crv1.ExampleList{ListMeta: obj.(*crv1.ExampleList).ListMeta} + for _, item := range obj.(*crv1.ExampleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeExamples) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a example and creates it. Returns the server's representation of the example, and an error, if there is any. -func (c *FakeExamples) Create(example *cr_v1.Example) (result *cr_v1.Example, err error) { +func (c *FakeExamples) Create(example *crv1.Example) (result *crv1.Example, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(examplesResource, c.ns, example), &cr_v1.Example{}) + Invokes(testing.NewCreateAction(examplesResource, c.ns, example), &crv1.Example{}) if obj == nil { return nil, err } - return obj.(*cr_v1.Example), err + return obj.(*crv1.Example), err } // Update takes the representation of a example and updates it. Returns the server's representation of the example, and an error, if there is any. -func (c *FakeExamples) Update(example *cr_v1.Example) (result *cr_v1.Example, err error) { +func (c *FakeExamples) Update(example *crv1.Example) (result *crv1.Example, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(examplesResource, c.ns, example), &cr_v1.Example{}) + Invokes(testing.NewUpdateAction(examplesResource, c.ns, example), &crv1.Example{}) if obj == nil { return nil, err } - return obj.(*cr_v1.Example), err + return obj.(*crv1.Example), err } // Delete takes name of the example and deletes it. Returns an error if one occurs. func (c *FakeExamples) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(examplesResource, c.ns, name), &cr_v1.Example{}) + Invokes(testing.NewDeleteAction(examplesResource, c.ns, name), &crv1.Example{}) return err } @@ -110,17 +112,17 @@ func (c *FakeExamples) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeExamples) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(examplesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &cr_v1.ExampleList{}) + _, err := c.Fake.Invokes(action, &crv1.ExampleList{}) return err } // Patch applies the patch and returns the patched example. -func (c *FakeExamples) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *cr_v1.Example, err error) { +func (c *FakeExamples) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *crv1.Example, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(examplesResource, c.ns, name, data, subresources...), &cr_v1.Example{}) + Invokes(testing.NewPatchSubresourceAction(examplesResource, c.ns, name, data, subresources...), &crv1.Example{}) if obj == nil { return nil, err } - return obj.(*cr_v1.Example), err + return obj.(*crv1.Example), err } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/generated_expansion.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/generated_expansion.go index 70b162feb..755021ec4 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/generated_expansion.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned/typed/cr/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type ExampleExpansion interface{} diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/BUILD deleted file mode 100644 index cd892cb07..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "factory.go", - "generic.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/BUILD deleted file mode 100644 index 5d32d09b7..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/interface.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/interface.go index 9366da3be..0c633e3ef 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/interface.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package cr @@ -30,15 +30,17 @@ type Interface interface { } type group struct { - internalinterfaces.SharedInformerFactory + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory) Interface { - return &group{f} +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // V1 returns a new v1.Interface. func (g *group) V1() v1.Interface { - return v1.New(g.SharedInformerFactory) + return v1.New(g.factory, g.namespace, g.tweakListOptions) } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/BUILD deleted file mode 100644 index 8ac5ac14e..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "example.go", - "interface.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/example.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/example.go index 39918ff5a..2496cd2ce 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/example.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/example.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,20 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( - cr_v1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1" + time "time" + + crv1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1" versioned "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned" internalinterfaces "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces" v1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - time "time" ) // ExampleInformer provides access to a shared informer and lister for @@ -38,34 +39,49 @@ type ExampleInformer interface { } type exampleInformer struct { - factory internalinterfaces.SharedInformerFactory + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string } // NewExampleInformer constructs a new informer for Example type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewExampleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredExampleInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredExampleInformer constructs a new informer for Example type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredExampleInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } return client.CrV1().Examples(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } return client.CrV1().Examples(namespace).Watch(options) }, }, - &cr_v1.Example{}, + &crv1.Example{}, resyncPeriod, indexers, ) } -func defaultExampleInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewExampleInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}) +func (f *exampleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredExampleInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *exampleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&cr_v1.Example{}, defaultExampleInformer) + return f.factory.InformerFor(&crv1.Example{}, f.defaultInformer) } func (f *exampleInformer) Lister() v1.ExampleLister { diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/interface.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/interface.go index 0612ce3bd..96ee1514c 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/interface.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 @@ -29,15 +29,17 @@ type Interface interface { } type version struct { - internalinterfaces.SharedInformerFactory + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory) Interface { - return &version{f} +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // Examples returns a ExampleInformer. func (v *version) Examples() ExampleInformer { - return &exampleInformer{factory: v.SharedInformerFactory} + return &exampleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go index f9ae8be12..67c55af39 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,26 +14,34 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions import ( + reflect "reflect" + sync "sync" + time "time" + versioned "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned" cr "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/cr" internalinterfaces "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" - reflect "reflect" - sync "sync" - time "time" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { - client versioned.Interface - lock sync.Mutex - defaultResync time.Duration + client versioned.Interface + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc + lock sync.Mutex + defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -41,14 +49,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync) +} + +// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. +// Listers obtained via this SharedInformerFactory will be subject to the same filters +// as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead +func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) } + + return factory } // Start initializes all requested informers. @@ -97,7 +153,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer @@ -114,5 +176,5 @@ type SharedInformerFactory interface { } func (f *sharedInformerFactory) Cr() cr.Interface { - return cr.New(f) + return cr.New(f, f.namespace, f.tweakListOptions) } diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/generic.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/generic.go index 12390b7a9..2bf6c5a47 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/generic.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions import ( "fmt" + v1 "k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" @@ -51,7 +52,7 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=Cr, Version=V1 + // Group=cr.example.apiextensions.k8s.io, Version=v1 case v1.SchemeGroupVersion.WithResource("examples"): return &genericInformer{resource: resource.GroupResource(), informer: f.Cr().V1().Examples().Informer()}, nil diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/BUILD deleted file mode 100644 index 20b878299..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["factory_interfaces.go"], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go index d8f00586b..5b81f037b 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces import ( + time "time" + versioned "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/clientset/versioned" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" cache "k8s.io/client-go/tools/cache" - time "time" ) type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer @@ -32,3 +34,5 @@ type SharedInformerFactory interface { Start(stopCh <-chan struct{}) InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer } + +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/BUILD b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/BUILD deleted file mode 100644 index 69e2f3c92..000000000 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "example.go", - "expansion_generated.go", - ], - importpath = "k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis/cr/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go index 554c9f2db..8a64d09cc 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/example.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/expansion_generated.go b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/expansion_generated.go index 7397d6f6c..5291ebaec 100644 --- a/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/expansion_generated.go +++ b/deps/k8s.io/apiextensions-apiserver/examples/client-go/pkg/client/listers/cr/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/apiextensions-apiserver/hack/boilerplate.go.txt b/deps/k8s.io/apiextensions-apiserver/hack/boilerplate.go.txt new file mode 100644 index 000000000..b7c650da4 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/hack/boilerplate.go.txt @@ -0,0 +1,16 @@ +/* +Copyright The Kubernetes 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/deps/k8s.io/apiextensions-apiserver/hack/build-image.sh b/deps/k8s.io/apiextensions-apiserver/hack/build-image.sh index c9152a4de..d0d129078 100755 --- a/deps/k8s.io/apiextensions-apiserver/hack/build-image.sh +++ b/deps/k8s.io/apiextensions-apiserver/hack/build-image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # diff --git a/deps/k8s.io/apiextensions-apiserver/hack/update-codegen.sh b/deps/k8s.io/apiextensions-apiserver/hack/update-codegen.sh index 8b1e582bb..0dc83d07f 100755 --- a/deps/k8s.io/apiextensions-apiserver/hack/update-codegen.sh +++ b/deps/k8s.io/apiextensions-apiserver/hack/update-codegen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # @@ -18,62 +18,17 @@ set -o errexit set -o nounset set -o pipefail -SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")/.. -SCRIPT_BASE=${SCRIPT_ROOT}/../.. -CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo k8s.io/code-generator)} - -if LANG=C sed --help 2>&1 | grep -q GNU; then - SED="sed" -elif which gsed &>/dev/null; then - SED="gsed" -else - echo "Failed to find GNU sed as sed or gsed. If you are on Mac: brew install gnu-sed." >&2 - exit 1 -fi - -# Register function to be called on EXIT to remove generated binary. -function cleanup { - rm -f "${CLIENTGEN:-}" - rm -f "${listergen:-}" - rm -f "${informergen:-}" -} -trap cleanup EXIT - -echo "Building client-gen" -CLIENTGEN="${PWD}/client-gen-binary" -go build -o "${CLIENTGEN}" ${CODEGEN_PKG}/cmd/client-gen - -PREFIX=k8s.io/apiextensions-apiserver/pkg/apis -INPUT_BASE="--input-base ${PREFIX}" -INPUT_APIS=( -apiextensions/ -apiextensions/v1beta1 -) -INPUT="--input ${INPUT_APIS[@]}" -CLIENTSET_PATH="--output-package k8s.io/apiextensions-apiserver/pkg/client/clientset" - -${CLIENTGEN} ${INPUT_BASE} ${INPUT} ${CLIENTSET_PATH} --output-base ${SCRIPT_BASE} -${CLIENTGEN} --clientset-name="clientset" ${INPUT_BASE} --input apiextensions/v1beta1 ${CLIENTSET_PATH} --output-base ${SCRIPT_BASE} - - -echo "Building lister-gen" -listergen="${PWD}/lister-gen" -go build -o "${listergen}" ${CODEGEN_PKG}/cmd/lister-gen - -LISTER_INPUT="--input-dirs k8s.io/apiextensions-apiserver/pkg/apis/apiextensions --input-dirs k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" -LISTER_PATH="--output-package k8s.io/apiextensions-apiserver/pkg/client/listers" -${listergen} ${LISTER_INPUT} ${LISTER_PATH} --output-base ${SCRIPT_BASE} - - -echo "Building informer-gen" -informergen="${PWD}/informer-gen" -go build -o "${informergen}" ${CODEGEN_PKG}/cmd/informer-gen - -${informergen} \ - --output-base ${SCRIPT_BASE} \ - --input-dirs k8s.io/apiextensions-apiserver/pkg/apis/apiextensions --input-dirs k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1 \ - --versioned-clientset-package k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset \ - --internal-clientset-package k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset \ - --listers-package k8s.io/apiextensions-apiserver/pkg/client/listers \ - --output-package k8s.io/apiextensions-apiserver/pkg/client/informers - "$@" +SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. +CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)} + +# generate the code with: +# --output-base because this script should also be able to run inside the vendor dir of +# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir +# instead of the $GOPATH directly. For normal projects this can be dropped. +CLIENTSET_NAME_VERSIONED=clientset \ +CLIENTSET_NAME_INTERNAL=internalclientset \ +${CODEGEN_PKG}/generate-internal-groups.sh all \ + k8s.io/apiextensions-apiserver/pkg/client k8s.io/apiextensions-apiserver/pkg/apis k8s.io/apiextensions-apiserver/pkg/apis \ + "apiextensions:v1beta1" \ + --output-base "$(dirname ${BASH_SOURCE})/../../.." \ + --go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt diff --git a/deps/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh b/deps/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh index f5835c425..ab43ba23d 100755 --- a/deps/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh +++ b/deps/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # diff --git a/deps/k8s.io/apiextensions-apiserver/main.go b/deps/k8s.io/apiextensions-apiserver/main.go index 7723e6513..888a04b1a 100644 --- a/deps/k8s.io/apiextensions-apiserver/main.go +++ b/deps/k8s.io/apiextensions-apiserver/main.go @@ -19,7 +19,6 @@ package main import ( "flag" "os" - "runtime" "github.com/golang/glog" @@ -32,12 +31,8 @@ func main() { logs.InitLogs() defer logs.FlushLogs() - if len(os.Getenv("GOMAXPROCS")) == 0 { - runtime.GOMAXPROCS(runtime.NumCPU()) - } - stopCh := genericapiserver.SetupSignalHandler() - cmd := server.NewCommandStartCustomResourceDefinitionsServer(os.Stdout, os.Stderr, stopCh) + cmd := server.NewServerCommand(os.Stdout, os.Stderr, stopCh) cmd.Flags().AddGoFlagSet(flag.CommandLine) if err := cmd.Execute(); err != nil { glog.Fatal(err) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/BUILD deleted file mode 100644 index 5f6161f0c..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/BUILD +++ /dev/null @@ -1,53 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "deepcopy.go", - "doc.go", - "helpers.go", - "register.go", - "types.go", - "types_jsonschema.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["helpers_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions", - deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go index dd9680c36..37b4d1df9 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go @@ -16,6 +16,8 @@ limitations under the License. package apiextensions +import "k8s.io/apimachinery/pkg/runtime" + // TODO: Update this after a tag is created for interface fields in DeepCopy func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { if in == nil { @@ -26,14 +28,14 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { *out = *in if in.Default != nil { - defaultJSON := JSON(deepCopyJSON(*(in.Default))) + defaultJSON := JSON(runtime.DeepCopyJSONValue(*(in.Default))) out.Default = &(defaultJSON) } else { out.Default = nil } if in.Example != nil { - exampleJSON := JSON(deepCopyJSON(*(in.Example))) + exampleJSON := JSON(runtime.DeepCopyJSONValue(*(in.Example))) out.Example = &(exampleJSON) } else { out.Example = nil @@ -121,7 +123,7 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { if in.Enum != nil { out.Enum = make([]JSON, len(in.Enum)) for i := range in.Enum { - out.Enum[i] = deepCopyJSON(in.Enum[i]) + out.Enum[i] = runtime.DeepCopyJSONValue(in.Enum[i]) } } @@ -258,22 +260,3 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { return out } - -func deepCopyJSON(x interface{}) interface{} { - switch x := x.(type) { - case map[string]interface{}: - clone := make(map[string]interface{}, len(x)) - for k, v := range x { - clone[k] = deepCopyJSON(v) - } - return clone - case []interface{}: - clone := make([]interface{}, len(x)) - for i := range x { - clone[i] = deepCopyJSON(x[i]) - } - return clone - default: - return x - } -} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/BUILD deleted file mode 100644 index a6e5ed9df..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["fuzzer.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/fuzzer.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/fuzzer.go index a7cfb0ae7..ff8cc0334 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/fuzzer.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer/fuzzer.go @@ -23,9 +23,12 @@ import ( "github.com/google/gofuzz" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" ) +var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() + // Funcs returns the fuzzer functions for the apiextensions apis. func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { return []interface{}{ @@ -42,6 +45,33 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 { obj.Names.ListKind = obj.Names.Kind + "List" } + if len(obj.Versions) == 0 && len(obj.Version) != 0 { + obj.Versions = []apiextensions.CustomResourceDefinitionVersion{ + { + Name: obj.Version, + Served: true, + Storage: true, + }, + } + } else if len(obj.Versions) != 0 { + obj.Version = obj.Versions[0].Name + } + if len(obj.AdditionalPrinterColumns) == 0 { + obj.AdditionalPrinterColumns = []apiextensions.CustomResourceColumnDefinition{ + {Name: "Age", Type: "date", Description: swaggerMetadataDescriptions["creationTimestamp"], JSONPath: ".metadata.creationTimestamp"}, + } + } + }, + func(obj *apiextensions.CustomResourceDefinition, c fuzz.Continue) { + c.FuzzNoCustom(obj) + + if len(obj.Status.StoredVersions) == 0 { + for _, v := range obj.Spec.Versions { + if v.Storage && !apiextensions.IsStoredVersion(obj, v.Name) { + obj.Status.StoredVersions = append(obj.Status.StoredVersions, v.Name) + } + } + } }, func(obj *apiextensions.JSONSchemaProps, c fuzz.Continue) { // we cannot use c.FuzzNoCustom because of the interface{} fields. So let's loop with reflection. @@ -81,6 +111,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} { }, func(obj *apiextensions.JSONSchemaPropsOrBool, c fuzz.Continue) { if c.RandBool() { + obj.Allows = true obj.Schema = &apiextensions.JSONSchemaProps{} c.Fuzz(obj.Schema) } else { diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go index 8dc7f72d6..92cad7d9b 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go @@ -17,6 +17,7 @@ limitations under the License. package apiextensions import ( + "fmt" "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -116,3 +117,33 @@ func CRDRemoveFinalizer(crd *CustomResourceDefinition, needle string) { } crd.Finalizers = newFinalizers } + +// HasServedCRDVersion returns true if `version` is in the list of CRD's versions and the Served flag is set. +func HasServedCRDVersion(crd *CustomResourceDefinition, version string) bool { + for _, v := range crd.Spec.Versions { + if v.Name == version { + return v.Served + } + } + return false +} + +// GetCRDStorageVersion returns the storage version for given CRD. +func GetCRDStorageVersion(crd *CustomResourceDefinition) (string, error) { + for _, v := range crd.Spec.Versions { + if v.Storage { + return v.Name, nil + } + } + // This should not happened if crd is valid + return "", fmt.Errorf("invalid CustomResourceDefinition, no storage version") +} + +func IsStoredVersion(crd *CustomResourceDefinition, version string) bool { + for _, v := range crd.Status.StoredVersions { + if version == v { + return true + } + } + return false +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers_test.go index 1abb49815..df58a7cbf 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers_test.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers_test.go @@ -19,6 +19,7 @@ package apiextensions import ( "reflect" "testing" + "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -88,3 +89,333 @@ func TestCRDRemoveFinalizer(t *testing.T) { } } } + +func TestSetCRDCondition(t *testing.T) { + tests := []struct { + name string + crdCondition []CustomResourceDefinitionCondition + newCondition CustomResourceDefinitionCondition + expectedcrdCondition []CustomResourceDefinitionCondition + }{ + { + name: "test setCRDcondition when one condition", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + newCondition: CustomResourceDefinitionCondition{ + Type: Established, + Status: ConditionFalse, + Reason: "NotAccepted", + Message: "Not accepted", + LastTransitionTime: metav1.Date(2018, 1, 2, 0, 0, 0, 0, time.UTC), + }, + expectedcrdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionFalse, + Reason: "NotAccepted", + Message: "Not accepted", + LastTransitionTime: metav1.Date(2018, 1, 2, 0, 0, 0, 0, time.UTC), + }, + }, + }, + { + name: "test setCRDcondition when two condition", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionTrue, + Reason: "NoConflicts", + Message: "no conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + newCondition: CustomResourceDefinitionCondition{ + Type: NamesAccepted, + Status: ConditionFalse, + Reason: "Conflicts", + Message: "conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 2, 0, 0, 0, 0, time.UTC), + }, + expectedcrdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionFalse, + Reason: "Conflicts", + Message: "conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 2, 0, 0, 0, 0, time.UTC), + }, + }, + }, + { + name: "test setCRDcondition when condition needs to be appended", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + newCondition: CustomResourceDefinitionCondition{ + Type: Terminating, + Status: ConditionFalse, + Reason: "NeverEstablished", + Message: "resource was never established", + LastTransitionTime: metav1.Date(2018, 2, 1, 0, 0, 0, 0, time.UTC), + }, + expectedcrdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: Terminating, + Status: ConditionFalse, + Reason: "NeverEstablished", + Message: "resource was never established", + LastTransitionTime: metav1.Date(2018, 2, 1, 0, 0, 0, 0, time.UTC), + }, + }, + }, + } + for _, tc := range tests { + crd := generateCRDwithCondition(tc.crdCondition) + SetCRDCondition(crd, tc.newCondition) + if len(tc.expectedcrdCondition) != len(crd.Status.Conditions) { + t.Errorf("%v expected %v, got %v", tc.name, tc.expectedcrdCondition, crd.Status.Conditions) + } + for i := range tc.expectedcrdCondition { + if !IsCRDConditionEquivalent(&tc.expectedcrdCondition[i], &crd.Status.Conditions[i]) { + t.Errorf("%v expected %v, got %v", tc.name, tc.expectedcrdCondition, crd.Status.Conditions) + } + } + } +} + +func TestRemoveCRDCondition(t *testing.T) { + tests := []struct { + name string + crdCondition []CustomResourceDefinitionCondition + conditionType CustomResourceDefinitionConditionType + expectedcrdCondition []CustomResourceDefinitionCondition + }{ + { + name: "test remove CRDCondition when the conditionType meets", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionTrue, + Reason: "NoConflicts", + Message: "no conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + conditionType: NamesAccepted, + expectedcrdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2011, 1, 2, 0, 0, 0, 0, time.UTC), + }, + }, + }, + { + name: "test remove CRDCondition when the conditionType not meets", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionTrue, + Reason: "NoConflicts", + Message: "no conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + conditionType: Terminating, + expectedcrdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionTrue, + Reason: "NoConflicts", + Message: "no conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + }, + } + for _, tc := range tests { + crd := generateCRDwithCondition(tc.crdCondition) + RemoveCRDCondition(crd, tc.conditionType) + if len(tc.expectedcrdCondition) != len(crd.Status.Conditions) { + t.Errorf("%v expected %v, got %v", tc.name, tc.expectedcrdCondition, crd.Status.Conditions) + } + for i := range tc.expectedcrdCondition { + if !IsCRDConditionEquivalent(&tc.expectedcrdCondition[i], &crd.Status.Conditions[i]) { + t.Errorf("%v expected %v, got %v", tc.name, tc.expectedcrdCondition, crd.Status.Conditions) + } + } + } +} + +func TestIsCRDConditionPresentAndEqual(t *testing.T) { + tests := []struct { + name string + crdCondition []CustomResourceDefinitionCondition + conditionType CustomResourceDefinitionConditionType + status ConditionStatus + expectresult bool + }{ + { + name: "test CRDCondition is not Present", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionTrue, + Reason: "NoConflicts", + Message: "no conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + conditionType: Terminating, + status: ConditionTrue, + expectresult: false, + }, + { + name: "test CRDCondition is Present but not Equal", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionTrue, + Reason: "NoConflicts", + Message: "no conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + conditionType: Established, + status: ConditionFalse, + expectresult: false, + }, + { + name: "test CRDCondition is Present and Equal", + crdCondition: []CustomResourceDefinitionCondition{ + { + Type: Established, + Status: ConditionTrue, + Reason: "Accepted", + Message: "the initial names have been accepted", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + { + Type: NamesAccepted, + Status: ConditionTrue, + Reason: "NoConflicts", + Message: "no conflicts found", + LastTransitionTime: metav1.Date(2018, 1, 1, 0, 0, 0, 0, time.UTC), + }, + }, + conditionType: NamesAccepted, + status: ConditionTrue, + expectresult: true, + }, + } + for _, tc := range tests { + crd := generateCRDwithCondition(tc.crdCondition) + res := IsCRDConditionPresentAndEqual(crd, tc.conditionType, tc.status) + if res != tc.expectresult { + t.Errorf("%v expected %t, got %t", tc.name, tc.expectresult, res) + } + } +} + +func generateCRDwithCondition(conditions []CustomResourceDefinitionCondition) *CustomResourceDefinition { + testCRDObjectMeta := metav1.ObjectMeta{ + Name: "plural.group.com", + ResourceVersion: "12", + } + testCRDSpec := CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Scope: ResourceScope("Cluster"), + Names: CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "kind", + ListKind: "listkind", + }, + } + testCRDAcceptedNames := CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "kind", + ListKind: "listkind", + } + return &CustomResourceDefinition{ + ObjectMeta: testCRDObjectMeta, + Spec: testCRDSpec, + Status: CustomResourceDefinitionStatus{ + AcceptedNames: testCRDAcceptedNames, + Conditions: conditions, + }, + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/BUILD deleted file mode 100644 index 1ae69bfa7..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["roundtrip_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing/roundtrip:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["install.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/install.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/install.go index 25cee84d2..2fd04b77d 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/install.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/install.go @@ -19,25 +19,13 @@ package install import ( "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/sets" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - if err := announced.NewGroupMetaFactory( - &announced.GroupMetaFactoryArgs{ - GroupName: apiextensions.GroupName, - RootScopedKinds: sets.NewString("CustomResourceDefinition"), - VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version}, - AddInternalObjectsToScheme: apiextensions.AddToScheme, - }, - announced.VersionToSchemeFunc{ - v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, - }, - ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { - panic(err) - } +func Install(scheme *runtime.Scheme) { + utilruntime.Must(apiextensions.AddToScheme(scheme)) + utilruntime.Must(v1beta1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion)) } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/roundtrip_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/roundtrip_test.go index 353e81287..f199dd5e5 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/roundtrip_test.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install/roundtrip_test.go @@ -20,7 +20,7 @@ import ( "testing" apiextensionsfuzzer "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer" - "k8s.io/apimachinery/pkg/api/testing/roundtrip" + "k8s.io/apimachinery/pkg/api/apitesting/roundtrip" ) func TestRoundTrip(t *testing.T) { diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go index 880da65ce..6fc75154f 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go @@ -16,13 +16,18 @@ limitations under the License. package apiextensions -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) // CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpec struct { // Group is the group this resource belongs in Group string // Version is the version this resource belongs in + // Should be always first item in Versions field if provided. + // Optional, but at least one of Version or Versions must be set. + // Deprecated: Please use `Versions`. Version string // Names are the names used to describe this custom resource Names CustomResourceDefinitionNames @@ -30,6 +35,54 @@ type CustomResourceDefinitionSpec struct { Scope ResourceScope // Validation describes the validation methods for CustomResources Validation *CustomResourceValidation + // Subresources describes the subresources for CustomResources + Subresources *CustomResourceSubresources + // Versions is the list of all supported versions for this resource. + // If Version field is provided, this field is optional. + // Validation: All versions must use the same validation schema for now. i.e., top + // level Validation field is applied to all of these versions. + // Order: The version name will be used to compute the order. + // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered + // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), + // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first + // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing + // major version, then minor version. An example sorted list of versions: + // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + Versions []CustomResourceDefinitionVersion + // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. + AdditionalPrinterColumns []CustomResourceColumnDefinition +} + +type CustomResourceDefinitionVersion struct { + // Name is the version name, e.g. “v1”, “v2beta1”, etc. + Name string + // Served is a flag enabling/disabling this version from being served via REST APIs + Served bool + // Storage flags the version as storage version. There must be exactly one flagged + // as storage version. + Storage bool +} + +// CustomResourceColumnDefinition specifies a column for server side printing. +type CustomResourceColumnDefinition struct { + // name is a human readable name for the column. + Name string + // type is an OpenAPI type definition for this column. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. + Type string + // format is an optional OpenAPI type definition for this column. The 'name' format is applied + // to the primary identifier column to assist in clients identifying column is the resource name. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. + Format string + // description is a human readable description of this column. + Description string + // priority is an integer defining the relative importance of this column compared to others. Lower + // numbers are considered higher priority. Columns that may be omitted in limited space scenarios + // should be given a higher priority. + Priority int32 + + // JSONPath is a simple JSON path, i.e. without array notation. + JSONPath string } // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition @@ -45,6 +98,9 @@ type CustomResourceDefinitionNames struct { Kind string // ListKind is the serialized kind of the list for this resource. Defaults to List. ListKind string + // Categories is a list of grouped resources custom resources belong to (e.g. 'all') + // +optional + Categories []string } // ResourceScope is an enum defining the different scopes available to a custom resource @@ -108,6 +164,14 @@ type CustomResourceDefinitionStatus struct { // AcceptedNames are the names that are actually being used to serve discovery // They may be different than the names in spec. AcceptedNames CustomResourceDefinitionNames + + // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these + // versions allows a migration path for stored versions in etcd. The field is mutable + // so the migration controller can first finish a migration to another version (i.e. + // that no old objects are left in the storage), and then remove the rest of the + // versions from this list. + // None of the versions in this list can be removed from the spec.Versions field. + StoredVersions []string } // CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of @@ -146,3 +210,41 @@ type CustomResourceValidation struct { // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. OpenAPIV3Schema *JSONSchemaProps } + +// CustomResourceSubresources defines the status and scale subresources for CustomResources. +type CustomResourceSubresources struct { + // Status denotes the status subresource for CustomResources + Status *CustomResourceSubresourceStatus + // Scale denotes the scale subresource for CustomResources + Scale *CustomResourceSubresourceScale +} + +// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. +// Status is represented by the `.status` JSON path inside of a CustomResource. When set, +// * exposes a /status subresource for the custom resource +// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza +// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza +type CustomResourceSubresourceStatus struct{} + +// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. +type CustomResourceSubresourceScale struct { + // SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .spec. + // If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET. + SpecReplicasPath string + // StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .status. + // If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource + // will default to 0. + StatusReplicasPath string + // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .status. + // Must be set to work with HPA. + // If there is no value under the given path in the CustomResource, the status label selector value in the /scale + // subresource will default to the empty string. + // +optional + LabelSelectorPath *string +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD deleted file mode 100644 index 46ee524ea..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/BUILD +++ /dev/null @@ -1,69 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "deepcopy.go", - "defaults.go", - "doc.go", - "generated.pb.go", - "marshal.go", - "register.go", - "types.go", - "types_jsonschema.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = [ - "conversion_test.go", - "marshal_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go index 903773ae2..f6a114e2b 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go @@ -236,22 +236,3 @@ func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { return out } - -func deepCopyJSON(x interface{}) interface{} { - switch x := x.(type) { - case map[string]interface{}: - clone := make(map[string]interface{}, len(x)) - for k, v := range x { - clone[k] = deepCopyJSON(v) - } - return clone - case []interface{}: - clone := make([]interface{}, len(x)) - for i := range x { - clone[i] = deepCopyJSON(x[i]) - } - return clone - default: - return x - } -} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go index edffaed55..e3235e870 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go @@ -19,9 +19,12 @@ package v1beta1 import ( "strings" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) +var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() + func addDefaultingFuncs(scheme *runtime.Scheme) error { scheme.AddTypeDefaultingFunc(&CustomResourceDefinition{}, func(obj interface{}) { SetDefaults_CustomResourceDefinition(obj.(*CustomResourceDefinition)) }) // TODO figure out why I can't seem to get my defaulter generated @@ -31,6 +34,14 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error { func SetDefaults_CustomResourceDefinition(obj *CustomResourceDefinition) { SetDefaults_CustomResourceDefinitionSpec(&obj.Spec) + if len(obj.Status.StoredVersions) == 0 { + for _, v := range obj.Spec.Versions { + if v.Storage { + obj.Status.StoredVersions = append(obj.Status.StoredVersions, v.Name) + break + } + } + } } func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) { @@ -43,4 +54,21 @@ func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 { obj.Names.ListKind = obj.Names.Kind + "List" } + // If there is no list of versions, create on using deprecated Version field. + if len(obj.Versions) == 0 && len(obj.Version) != 0 { + obj.Versions = []CustomResourceDefinitionVersion{{ + Name: obj.Version, + Storage: true, + Served: true, + }} + } + // For backward compatibility set the version field to the first item in versions list. + if len(obj.Version) == 0 && len(obj.Versions) != 0 { + obj.Version = obj.Versions[0].Name + } + if len(obj.AdditionalPrinterColumns) == 0 { + obj.AdditionalPrinterColumns = []CustomResourceColumnDefinition{ + {Name: "Age", Type: "date", Description: swaggerMetadataDescriptions["creationTimestamp"], JSONPath: ".metadata.creationTimestamp"}, + } + } } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go index 488f53560..c771e61cb 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,12 +25,17 @@ limitations under the License. k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto It has these top-level messages: + CustomResourceColumnDefinition CustomResourceDefinition CustomResourceDefinitionCondition CustomResourceDefinitionList CustomResourceDefinitionNames CustomResourceDefinitionSpec CustomResourceDefinitionStatus + CustomResourceDefinitionVersion + CustomResourceSubresourceScale + CustomResourceSubresourceStatus + CustomResourceSubresources CustomResourceValidation ExternalDocumentation JSON @@ -63,81 +68,116 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package +func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } +func (*CustomResourceColumnDefinition) ProtoMessage() {} +func (*CustomResourceColumnDefinition) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{0} +} + func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } func (*CustomResourceDefinition) ProtoMessage() {} func (*CustomResourceDefinition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{0} + return fileDescriptorGenerated, []int{1} } func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } func (*CustomResourceDefinitionCondition) ProtoMessage() {} func (*CustomResourceDefinitionCondition) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{1} + return fileDescriptorGenerated, []int{2} } func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } func (*CustomResourceDefinitionList) ProtoMessage() {} func (*CustomResourceDefinitionList) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{2} + return fileDescriptorGenerated, []int{3} } func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } func (*CustomResourceDefinitionNames) ProtoMessage() {} func (*CustomResourceDefinitionNames) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{3} + return fileDescriptorGenerated, []int{4} } func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } func (*CustomResourceDefinitionSpec) ProtoMessage() {} func (*CustomResourceDefinitionSpec) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{4} + return fileDescriptorGenerated, []int{5} } func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } func (*CustomResourceDefinitionStatus) ProtoMessage() {} func (*CustomResourceDefinitionStatus) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{5} + return fileDescriptorGenerated, []int{6} +} + +func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } +func (*CustomResourceDefinitionVersion) ProtoMessage() {} +func (*CustomResourceDefinitionVersion) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{7} +} + +func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } +func (*CustomResourceSubresourceScale) ProtoMessage() {} +func (*CustomResourceSubresourceScale) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{8} +} + +func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } +func (*CustomResourceSubresourceStatus) ProtoMessage() {} +func (*CustomResourceSubresourceStatus) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{9} +} + +func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } +func (*CustomResourceSubresources) ProtoMessage() {} +func (*CustomResourceSubresources) Descriptor() ([]byte, []int) { + return fileDescriptorGenerated, []int{10} } func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } func (*CustomResourceValidation) ProtoMessage() {} func (*CustomResourceValidation) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{6} + return fileDescriptorGenerated, []int{11} } func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } func (*ExternalDocumentation) ProtoMessage() {} -func (*ExternalDocumentation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*ExternalDocumentation) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *JSON) Reset() { *m = JSON{} } func (*JSON) ProtoMessage() {} -func (*JSON) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*JSON) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } func (*JSONSchemaProps) ProtoMessage() {} -func (*JSONSchemaProps) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*JSONSchemaProps) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } func (*JSONSchemaPropsOrArray) ProtoMessage() {} -func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*JSONSchemaPropsOrArray) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } func (*JSONSchemaPropsOrBool) ProtoMessage() {} -func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*JSONSchemaPropsOrBool) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } func (*JSONSchemaPropsOrStringArray) ProtoMessage() {} func (*JSONSchemaPropsOrStringArray) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{12} + return fileDescriptorGenerated, []int{17} } func init() { + proto.RegisterType((*CustomResourceColumnDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition") proto.RegisterType((*CustomResourceDefinition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition") proto.RegisterType((*CustomResourceDefinitionCondition)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition") proto.RegisterType((*CustomResourceDefinitionList)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList") proto.RegisterType((*CustomResourceDefinitionNames)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames") proto.RegisterType((*CustomResourceDefinitionSpec)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec") proto.RegisterType((*CustomResourceDefinitionStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus") + proto.RegisterType((*CustomResourceDefinitionVersion)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion") + proto.RegisterType((*CustomResourceSubresourceScale)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale") + proto.RegisterType((*CustomResourceSubresourceStatus)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus") + proto.RegisterType((*CustomResourceSubresources)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources") proto.RegisterType((*CustomResourceValidation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation") proto.RegisterType((*ExternalDocumentation)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation") proto.RegisterType((*JSON)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSON") @@ -146,6 +186,47 @@ func init() { proto.RegisterType((*JSONSchemaPropsOrBool)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool") proto.RegisterType((*JSONSchemaPropsOrStringArray)(nil), "k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray") } +func (m *CustomResourceColumnDefinition) 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 *CustomResourceColumnDefinition) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Format))) + i += copy(dAtA[i:], m.Format) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) + dAtA[i] = 0x28 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Priority)) + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) + i += copy(dAtA[i:], m.JSONPath) + return i, nil +} + func (m *CustomResourceDefinition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -314,6 +395,21 @@ func (m *CustomResourceDefinitionNames) MarshalTo(dAtA []byte) (int, error) { i++ i = encodeVarintGenerated(dAtA, i, uint64(len(m.ListKind))) i += copy(dAtA[i:], m.ListKind) + if len(m.Categories) > 0 { + for _, s := range m.Categories { + 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) + } + } return i, nil } @@ -362,6 +458,40 @@ func (m *CustomResourceDefinitionSpec) MarshalTo(dAtA []byte) (int, error) { } i += n7 } + if m.Subresources != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Subresources.Size())) + n8, err := m.Subresources.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if len(m.Versions) > 0 { + for _, msg := range m.Versions { + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.AdditionalPrinterColumns) > 0 { + for _, msg := range m.AdditionalPrinterColumns { + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -395,11 +525,152 @@ func (m *CustomResourceDefinitionStatus) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AcceptedNames.Size())) - n8, err := m.AcceptedNames.MarshalTo(dAtA[i:]) + n9, err := m.AcceptedNames.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n8 + i += n9 + if len(m.StoredVersions) > 0 { + for _, s := range m.StoredVersions { + dAtA[i] = 0x1a + 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) + } + } + return i, nil +} + +func (m *CustomResourceDefinitionVersion) 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 *CustomResourceDefinitionVersion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x10 + i++ + if m.Served { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x18 + i++ + if m.Storage { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} + +func (m *CustomResourceSubresourceScale) 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 *CustomResourceSubresourceScale) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.SpecReplicasPath))) + i += copy(dAtA[i:], m.SpecReplicasPath) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.StatusReplicasPath))) + i += copy(dAtA[i:], m.StatusReplicasPath) + if m.LabelSelectorPath != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LabelSelectorPath))) + i += copy(dAtA[i:], *m.LabelSelectorPath) + } + return i, nil +} + +func (m *CustomResourceSubresourceStatus) 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 *CustomResourceSubresourceStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *CustomResourceSubresources) 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 *CustomResourceSubresources) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Status != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) + n10, err := m.Status.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Scale != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Scale.Size())) + n11, err := m.Scale.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } return i, nil } @@ -422,11 +693,11 @@ func (m *CustomResourceValidation) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.OpenAPIV3Schema.Size())) - n9, err := m.OpenAPIV3Schema.MarshalTo(dAtA[i:]) + n12, err := m.OpenAPIV3Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n9 + i += n12 } return i, nil } @@ -530,11 +801,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x42 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Default.Size())) - n10, err := m.Default.MarshalTo(dAtA[i:]) + n13, err := m.Default.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n10 + i += n13 } if m.Maximum != nil { dAtA[i] = 0x49 @@ -658,11 +929,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Items.Size())) - n11, err := m.Items.MarshalTo(dAtA[i:]) + n14, err := m.Items.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n11 + i += n14 } if len(m.AllOf) > 0 { for _, msg := range m.AllOf { @@ -712,11 +983,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Not.Size())) - n12, err := m.Not.MarshalTo(dAtA[i:]) + n15, err := m.Not.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n15 } if len(m.Properties) > 0 { keysForProperties := make([]string, 0, len(m.Properties)) @@ -744,11 +1015,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n13, err := (&v).MarshalTo(dAtA[i:]) + n16, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n16 } } if m.AdditionalProperties != nil { @@ -757,11 +1028,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x1 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AdditionalProperties.Size())) - n14, err := m.AdditionalProperties.MarshalTo(dAtA[i:]) + n17, err := m.AdditionalProperties.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n17 } if len(m.PatternProperties) > 0 { keysForPatternProperties := make([]string, 0, len(m.PatternProperties)) @@ -789,11 +1060,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n15, err := (&v).MarshalTo(dAtA[i:]) + n18, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n18 } } if len(m.Dependencies) > 0 { @@ -822,11 +1093,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n16, err := (&v).MarshalTo(dAtA[i:]) + n19, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n16 + i += n19 } } if m.AdditionalItems != nil { @@ -835,11 +1106,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.AdditionalItems.Size())) - n17, err := m.AdditionalItems.MarshalTo(dAtA[i:]) + n20, err := m.AdditionalItems.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n17 + i += n20 } if len(m.Definitions) > 0 { keysForDefinitions := make([]string, 0, len(m.Definitions)) @@ -867,11 +1138,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n18, err := (&v).MarshalTo(dAtA[i:]) + n21, err := (&v).MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n18 + i += n21 } } if m.ExternalDocs != nil { @@ -880,11 +1151,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ExternalDocs.Size())) - n19, err := m.ExternalDocs.MarshalTo(dAtA[i:]) + n22, err := m.ExternalDocs.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n19 + i += n22 } if m.Example != nil { dAtA[i] = 0xa2 @@ -892,11 +1163,11 @@ func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x2 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Example.Size())) - n20, err := m.Example.MarshalTo(dAtA[i:]) + n23, err := m.Example.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n20 + i += n23 } return i, nil } @@ -920,11 +1191,11 @@ func (m *JSONSchemaPropsOrArray) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Schema.Size())) - n21, err := m.Schema.MarshalTo(dAtA[i:]) + n24, err := m.Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n21 + i += n24 } if len(m.JSONSchemas) > 0 { for _, msg := range m.JSONSchemas { @@ -968,11 +1239,11 @@ func (m *JSONSchemaPropsOrBool) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Schema.Size())) - n22, err := m.Schema.MarshalTo(dAtA[i:]) + n25, err := m.Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n22 + i += n25 } return i, nil } @@ -996,11 +1267,11 @@ func (m *JSONSchemaPropsOrStringArray) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Schema.Size())) - n23, err := m.Schema.MarshalTo(dAtA[i:]) + n26, err := m.Schema.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n23 + i += n26 } if len(m.Property) > 0 { for _, s := range m.Property { @@ -1047,6 +1318,23 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return offset + 1 } +func (m *CustomResourceColumnDefinition) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Type) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Format) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Description) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Priority)) + l = len(m.JSONPath) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *CustomResourceDefinition) Size() (n int) { var l int _ = l @@ -1106,6 +1394,12 @@ func (m *CustomResourceDefinitionNames) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = len(m.ListKind) n += 1 + l + sovGenerated(uint64(l)) + if len(m.Categories) > 0 { + for _, s := range m.Categories { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -1124,6 +1418,22 @@ func (m *CustomResourceDefinitionSpec) Size() (n int) { l = m.Validation.Size() n += 1 + l + sovGenerated(uint64(l)) } + if m.Subresources != nil { + l = m.Subresources.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.Versions) > 0 { + for _, e := range m.Versions { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.AdditionalPrinterColumns) > 0 { + for _, e := range m.AdditionalPrinterColumns { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -1138,9 +1448,59 @@ func (m *CustomResourceDefinitionStatus) Size() (n int) { } l = m.AcceptedNames.Size() n += 1 + l + sovGenerated(uint64(l)) - return n -} - + if len(m.StoredVersions) > 0 { + for _, s := range m.StoredVersions { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *CustomResourceDefinitionVersion) Size() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + n += 2 + n += 2 + return n +} + +func (m *CustomResourceSubresourceScale) Size() (n int) { + var l int + _ = l + l = len(m.SpecReplicasPath) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.StatusReplicasPath) + n += 1 + l + sovGenerated(uint64(l)) + if m.LabelSelectorPath != nil { + l = len(*m.LabelSelectorPath) + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + +func (m *CustomResourceSubresourceStatus) Size() (n int) { + var l int + _ = l + return n +} + +func (m *CustomResourceSubresources) Size() (n int) { + var l int + _ = l + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.Scale != nil { + l = m.Scale.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n +} + func (m *CustomResourceValidation) Size() (n int) { var l int _ = l @@ -1375,6 +1735,21 @@ func sovGenerated(x uint64) (n int) { func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *CustomResourceColumnDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomResourceColumnDefinition{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Format:` + fmt.Sprintf("%v", this.Format) + `,`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, + `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, + `}`, + }, "") + return s +} func (this *CustomResourceDefinition) String() string { if this == nil { return "nil" @@ -1422,6 +1797,7 @@ func (this *CustomResourceDefinitionNames) String() string { `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`, `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, `ListKind:` + fmt.Sprintf("%v", this.ListKind) + `,`, + `Categories:` + fmt.Sprintf("%v", this.Categories) + `,`, `}`, }, "") return s @@ -1436,6 +1812,9 @@ func (this *CustomResourceDefinitionSpec) String() string { `Names:` + strings.Replace(strings.Replace(this.Names.String(), "CustomResourceDefinitionNames", "CustomResourceDefinitionNames", 1), `&`, ``, 1) + `,`, `Scope:` + fmt.Sprintf("%v", this.Scope) + `,`, `Validation:` + strings.Replace(fmt.Sprintf("%v", this.Validation), "CustomResourceValidation", "CustomResourceValidation", 1) + `,`, + `Subresources:` + strings.Replace(fmt.Sprintf("%v", this.Subresources), "CustomResourceSubresources", "CustomResourceSubresources", 1) + `,`, + `Versions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Versions), "CustomResourceDefinitionVersion", "CustomResourceDefinitionVersion", 1), `&`, ``, 1) + `,`, + `AdditionalPrinterColumns:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AdditionalPrinterColumns), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -1447,6 +1826,51 @@ func (this *CustomResourceDefinitionStatus) String() string { s := strings.Join([]string{`&CustomResourceDefinitionStatus{`, `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "CustomResourceDefinitionCondition", "CustomResourceDefinitionCondition", 1), `&`, ``, 1) + `,`, `AcceptedNames:` + strings.Replace(strings.Replace(this.AcceptedNames.String(), "CustomResourceDefinitionNames", "CustomResourceDefinitionNames", 1), `&`, ``, 1) + `,`, + `StoredVersions:` + fmt.Sprintf("%v", this.StoredVersions) + `,`, + `}`, + }, "") + return s +} +func (this *CustomResourceDefinitionVersion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomResourceDefinitionVersion{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Served:` + fmt.Sprintf("%v", this.Served) + `,`, + `Storage:` + fmt.Sprintf("%v", this.Storage) + `,`, + `}`, + }, "") + return s +} +func (this *CustomResourceSubresourceScale) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomResourceSubresourceScale{`, + `SpecReplicasPath:` + fmt.Sprintf("%v", this.SpecReplicasPath) + `,`, + `StatusReplicasPath:` + fmt.Sprintf("%v", this.StatusReplicasPath) + `,`, + `LabelSelectorPath:` + valueToStringGenerated(this.LabelSelectorPath) + `,`, + `}`, + }, "") + return s +} +func (this *CustomResourceSubresourceStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomResourceSubresourceStatus{`, + `}`, + }, "") + return s +} +func (this *CustomResourceSubresources) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomResourceSubresources{`, + `Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "CustomResourceSubresourceStatus", "CustomResourceSubresourceStatus", 1) + `,`, + `Scale:` + strings.Replace(fmt.Sprintf("%v", this.Scale), "CustomResourceSubresourceScale", "CustomResourceSubresourceScale", 1) + `,`, `}`, }, "") return s @@ -1608,7 +2032,7 @@ func valueToStringGenerated(v interface{}) string { pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } -func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error { +func (m *CustomResourceColumnDefinition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1631,17 +2055,17 @@ func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinition: wiretype end group for non-group") + return fmt.Errorf("proto: CustomResourceColumnDefinition: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CustomResourceColumnDefinition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1651,133 +2075,22 @@ func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionCondition) 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 ErrIntOverflowGenerated - } - 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: CustomResourceDefinitionCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } @@ -1804,11 +2117,11 @@ func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Type = CustomResourceDefinitionConditionType(dAtA[iNdEx:postIndex]) + m.Type = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1833,13 +2146,13 @@ func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) + m.Format = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1849,27 +2162,26 @@ func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + stringLen |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) } - var stringLen uint64 + m.Priority = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -1879,24 +2191,14 @@ func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + m.Priority |= (int32(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1921,7 +2223,7 @@ func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Message = string(dAtA[iNdEx:postIndex]) + m.JSONPath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1944,7 +2246,7 @@ func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { } return nil } -func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { +func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1967,15 +2269,351 @@ func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionList: wiretype end group for non-group") + return fmt.Errorf("proto: CustomResourceDefinition: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CustomResourceDefinition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomResourceDefinitionCondition) 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 ErrIntOverflowGenerated + } + 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: CustomResourceDefinitionCondition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomResourceDefinitionCondition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = CustomResourceDefinitionConditionType(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reason = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomResourceDefinitionList) 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 ErrIntOverflowGenerated + } + 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: CustomResourceDefinitionList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomResourceDefinitionList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2003,9 +2641,528 @@ func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, CustomResourceDefinition{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomResourceDefinitionNames) 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 ErrIntOverflowGenerated + } + 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: CustomResourceDefinitionNames: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomResourceDefinitionNames: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plural", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Plural = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Singular", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Singular = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListKind", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ListKind = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomResourceDefinitionSpec) 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 ErrIntOverflowGenerated + } + 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: CustomResourceDefinitionSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomResourceDefinitionSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Names.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scope = ResourceScope(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Validation == nil { + m.Validation = &CustomResourceValidation{} + } + if err := m.Validation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subresources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Subresources == nil { + m.Subresources = &CustomResourceSubresources{} + } + if err := m.Subresources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Versions = append(m.Versions, CustomResourceDefinitionVersion{}) + if err := m.Versions[len(m.Versions)-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 Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AdditionalPrinterColumns", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2029,8 +3186,8 @@ func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, CustomResourceDefinition{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.AdditionalPrinterColumns = append(m.AdditionalPrinterColumns, CustomResourceColumnDefinition{}) + if err := m.AdditionalPrinterColumns[len(m.AdditionalPrinterColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2055,7 +3212,7 @@ func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { } return nil } -func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { +func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2078,17 +3235,17 @@ func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionNames: wiretype end group for non-group") + return fmt.Errorf("proto: CustomResourceDefinitionStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionNames: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CustomResourceDefinitionStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plural", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2098,26 +3255,28 @@ func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Plural = string(dAtA[iNdEx:postIndex]) + m.Conditions = append(m.Conditions, CustomResourceDefinitionCondition{}) + if err := m.Conditions[len(m.Conditions)-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 Singular", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AcceptedNames", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2127,24 +3286,25 @@ func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - m.Singular = string(dAtA[iNdEx:postIndex]) + if err := m.AcceptedNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StoredVersions", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2169,11 +3329,61 @@ func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) + m.StoredVersions = append(m.StoredVersions, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomResourceDefinitionVersion) 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 ErrIntOverflowGenerated + } + 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: CustomResourceDefinitionVersion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomResourceDefinitionVersion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2198,13 +3408,13 @@ func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListKind", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Served", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -2214,21 +3424,32 @@ func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= (uint64(b) & 0x7F) << shift + v |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated + m.Served = bool(v != 0) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } } - m.ListKind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.Storage = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2250,7 +3471,7 @@ func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { } return nil } -func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { +func (m *CustomResourceSubresourceScale) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2273,15 +3494,15 @@ func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionSpec: wiretype end group for non-group") + return fmt.Errorf("proto: CustomResourceSubresourceScale: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CustomResourceSubresourceScale: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SpecReplicasPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2306,11 +3527,11 @@ func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Group = string(dAtA[iNdEx:postIndex]) + m.SpecReplicasPath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StatusReplicasPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2335,41 +3556,11 @@ func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Version = string(dAtA[iNdEx:postIndex]) + m.StatusReplicasPath = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Names.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LabelSelectorPath", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2394,41 +3585,59 @@ func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Scope = ResourceScope(dAtA[iNdEx:postIndex]) + s := string(dAtA[iNdEx:postIndex]) + m.LabelSelectorPath = &s iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - if msglen < 0 { + if skippy < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.Validation == nil { - m.Validation = &CustomResourceValidation{} + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomResourceSubresourceStatus) 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 ErrIntOverflowGenerated } - if err := m.Validation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex + 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: CustomResourceSubresourceStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomResourceSubresourceStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2450,7 +3659,7 @@ func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { +func (m *CustomResourceSubresources) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2473,15 +3682,15 @@ func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionStatus: wiretype end group for non-group") + return fmt.Errorf("proto: CustomResourceSubresources: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CustomResourceSubresources: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2505,14 +3714,16 @@ func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Conditions = append(m.Conditions, CustomResourceDefinitionCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Status == nil { + m.Status = &CustomResourceSubresourceStatus{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptedNames", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2536,7 +3747,10 @@ func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.AcceptedNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Scale == nil { + m.Scale = &CustomResourceSubresourceScale{} + } + if err := m.Scale.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4660,125 +5874,149 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1917 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xdb, 0x6f, 0x5b, 0x49, - 0x19, 0xcf, 0xd8, 0xb9, 0x4e, 0x92, 0x4d, 0x32, 0x6d, 0xca, 0x69, 0x68, 0xed, 0xd4, 0xcb, 0xae, - 0x02, 0x6c, 0x6d, 0xba, 0x17, 0x76, 0x41, 0xe2, 0x21, 0x6e, 0x02, 0x2a, 0x34, 0x4d, 0x35, 0x69, - 0x8b, 0xc4, 0x2e, 0xec, 0x4e, 0x7c, 0xc6, 0xce, 0x34, 0xe7, 0xcc, 0x39, 0x3d, 0x33, 0xc7, 0x8d, - 0x25, 0x90, 0x40, 0x68, 0x85, 0x84, 0x04, 0x42, 0xd0, 0x17, 0x24, 0x9e, 0x78, 0x44, 0x08, 0x24, - 0xe0, 0x91, 0x3f, 0xa0, 0x8f, 0x2b, 0xf1, 0xb2, 0x4f, 0x16, 0x35, 0xff, 0x02, 0xbc, 0xe4, 0x09, - 0xcd, 0xe5, 0xdc, 0xec, 0x64, 0xb7, 0xd2, 0xda, 0xdb, 0x37, 0x9f, 0xef, 0xf6, 0xfb, 0xcd, 0x37, - 0xdf, 0x7c, 0xf3, 0x8d, 0x61, 0xfb, 0xf8, 0x1d, 0x51, 0x67, 0x41, 0xe3, 0x38, 0x3e, 0xa4, 0x11, - 0xa7, 0x92, 0x8a, 0x46, 0x97, 0x72, 0x37, 0x88, 0x1a, 0x56, 0x41, 0x42, 0x46, 0x4f, 0x24, 0xe5, - 0x82, 0x05, 0x5c, 0x5c, 0x27, 0x21, 0x13, 0x34, 0xea, 0xd2, 0xa8, 0x11, 0x1e, 0x77, 0x94,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4c, 0x21, 0x70, 0x1e, 0xb7, 0xf6, 0x77, 0x00, 0xd7, - 0xcf, 0x6c, 0xac, 0xea, 0x09, 0x4a, 0x3c, 0x2f, 0x78, 0x2c, 0x74, 0x56, 0xe6, 0xb3, 0x27, 0xe8, - 0xb6, 0x96, 0x62, 0xab, 0xcd, 0x65, 0xaf, 0xf4, 0x79, 0x65, 0xaf, 0xf6, 0x4f, 0x00, 0xaf, 0x7c, - 0x52, 0x25, 0xbe, 0x90, 0x2d, 0xdd, 0x82, 0xf3, 0x76, 0x28, 0xea, 0xe9, 0xed, 0xb4, 0xef, 0x00, - 0xdb, 0x34, 0x7a, 0x38, 0xd5, 0x36, 0xaf, 0x3f, 0x7d, 0x56, 0x99, 0xfa, 0xe8, 0x59, 0x65, 0xea, - 0xe3, 0x67, 0x95, 0xa9, 0x9f, 0x0e, 0x2a, 0xe0, 0xe9, 0xa0, 0x02, 0x3e, 0x1a, 0x54, 0xc0, 0xc7, - 0x83, 0x0a, 0xf8, 0xf7, 0xa0, 0x02, 0x7e, 0xf3, 0x9f, 0xca, 0xd4, 0x0f, 0xe6, 0x2c, 0xf8, 0xff, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x73, 0x96, 0x20, 0xc5, 0xd0, 0x1b, 0x00, 0x00, + // 2292 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x6f, 0x5b, 0x49, + 0x15, 0xef, 0xd8, 0x71, 0xe2, 0x8c, 0x93, 0x26, 0x99, 0x6d, 0xca, 0x6d, 0x68, 0xed, 0xd4, 0x65, + 0x57, 0x01, 0xb6, 0x0e, 0x2d, 0xbb, 0xec, 0xb2, 0x12, 0x0f, 0x71, 0x52, 0x50, 0x97, 0xa6, 0x89, + 0xc6, 0x6d, 0x11, 0xec, 0xe7, 0xc4, 0x9e, 0x38, 0xb7, 0xb9, 0x5f, 0xbd, 0x33, 0xd7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x9d, 0xa6, 0x35, 0xe8, 0xd7, + 0xce, 0xad, 0x1d, 0x83, 0x8a, 0x8f, 0xe5, 0x82, 0xfe, 0x02, 0xe0, 0x82, 0xae, 0xa2, 0x29, 0x86, + 0x35, 0x19, 0x40, 0x3a, 0xea, 0x00, 0xe6, 0x71, 0x54, 0x1c, 0x2f, 0xe8, 0x38, 0x2e, 0x0c, 0xe9, + 0xf1, 0x30, 0x35, 0xf4, 0x77, 0x00, 0x67, 0x3a, 0x34, 0xa0, 0x5e, 0x87, 0x7a, 0x6d, 0xc1, 0x75, + 0x79, 0x24, 0x93, 0x66, 0x9e, 0xeb, 0x46, 0x0a, 0x42, 0xd1, 0x6c, 0x68, 0x9a, 0x33, 0x69, 0xd5, + 0x51, 0xbf, 0x76, 0x3e, 0x59, 0x9a, 0xd6, 0xe0, 0x0c, 0x4b, 0xf4, 0x01, 0x80, 0x73, 0xc9, 0x01, + 0xa8, 0x27, 0xe5, 0xf2, 0x18, 0xf3, 0x40, 0xb6, 0xaf, 0x6b, 0x59, 0x40, 0x9c, 0x67, 0x80, 0xfe, + 0x0a, 0x44, 0xa7, 0x16, 0xcf, 0x8d, 0xcc, 0xaa, 0xcb, 0x58, 0xbe, 0x33, 0xf2, 0x58, 0x1a, 0x04, + 0x15, 0xca, 0x17, 0x93, 0x56, 0xd0, 0x68, 0x8e, 0xfa, 0xb5, 0xc5, 0x74, 0x24, 0x8d, 0x02, 0xa7, + 0x19, 0xa2, 0x9f, 0x02, 0x38, 0x43, 0x93, 0x8e, 0x9b, 0x59, 0x57, 0x46, 0x12, 0xc4, 0x63, 0x9b, + 0x78, 0xf5, 0x37, 0xa6, 0x94, 0x8a, 0xe1, 0x0c, 0xb6, 0xe8, 0x20, 0xe9, 0x01, 0x71, 0x03, 0x87, + 0x5a, 0x9f, 0x1b, 0x71, 0x07, 0x79, 0x43, 0xf9, 0xc5, 0x31, 0xc0, 0x92, 0x98, 0x7c, 0x72, 0x37, + 0x07, 0xcd, 0xc3, 0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0xe8, 0x49, 0xf5, 0xcc, 0x0f, 0x06, 0x55, 0xf0, 0x78, + 0x50, 0x05, 0x1f, 0x0e, 0xaa, 0xe0, 0xa3, 0x41, 0x15, 0xfc, 0x6b, 0x50, 0x05, 0xbf, 0xfc, 0x77, + 0xf5, 0xcc, 0x77, 0xa6, 0x34, 0xf8, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x5b, 0x62, 0x04, + 0xd6, 0x21, 0x00, 0x00, } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto index c4d2b2dde..b23163d04 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,11 +24,39 @@ package k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; +// CustomResourceColumnDefinition specifies a column for server side printing. +message CustomResourceColumnDefinition { + // name is a human readable name for the column. + optional string name = 1; + + // type is an OpenAPI type definition for this column. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. + optional string type = 2; + + // format is an optional OpenAPI type definition for this column. The 'name' format is applied + // to the primary identifier column to assist in clients identifying column is the resource name. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. + // +optional + optional string format = 3; + + // description is a human readable description of this column. + // +optional + optional string description = 4; + + // priority is an integer defining the relative importance of this column compared to others. Lower + // numbers are considered higher priority. Columns that may be omitted in limited space scenarios + // should be given a higher priority. + // +optional + optional int32 priority = 5; + + // JSONPath is a simple JSON path, i.e. with array notation. + optional string JSONPath = 6; +} + // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format // <.spec.name>.<.spec.group>. message CustomResourceDefinition { @@ -38,6 +66,7 @@ message CustomResourceDefinition { optional CustomResourceDefinitionSpec spec = 2; // Status indicates the actual state of the CustomResourceDefinition + // +optional optional CustomResourceDefinitionStatus status = 3; } @@ -78,16 +107,23 @@ message CustomResourceDefinitionNames { optional string plural = 1; // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased + // +optional optional string singular = 2; // ShortNames are short names for the resource. It must be all lowercase. + // +optional repeated string shortNames = 3; // Kind is the serialized kind of the resource. It is normally CamelCase and singular. optional string kind = 4; // ListKind is the serialized kind of the list for this resource. Defaults to List. + // +optional optional string listKind = 5; + + // Categories is a list of grouped resources custom resources belong to (e.g. 'all') + // +optional + repeated string categories = 6; } // CustomResourceDefinitionSpec describes how a user wants their resource to appear @@ -96,6 +132,10 @@ message CustomResourceDefinitionSpec { optional string group = 1; // Version is the version this resource belongs in + // Should be always first item in Versions field if provided. + // Optional, but at least one of Version or Versions must be set. + // Deprecated: Please use `Versions`. + // +optional optional string version = 2; // Names are the names used to describe this custom resource @@ -107,6 +147,28 @@ message CustomResourceDefinitionSpec { // Validation describes the validation methods for CustomResources // +optional optional CustomResourceValidation validation = 5; + + // Subresources describes the subresources for CustomResources + // +optional + optional CustomResourceSubresources subresources = 6; + + // Versions is the list of all supported versions for this resource. + // If Version field is provided, this field is optional. + // Validation: All versions must use the same validation schema for now. i.e., top + // level Validation field is applied to all of these versions. + // Order: The version name will be used to compute the order. + // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered + // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), + // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first + // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing + // major version, then minor version. An example sorted list of versions: + // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + // +optional + repeated CustomResourceDefinitionVersion versions = 7; + + // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. + // +optional + repeated CustomResourceColumnDefinition additionalPrinterColumns = 8; } // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition @@ -117,11 +179,76 @@ message CustomResourceDefinitionStatus { // AcceptedNames are the names that are actually being used to serve discovery // They may be different than the names in spec. optional CustomResourceDefinitionNames acceptedNames = 2; + + // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these + // versions allows a migration path for stored versions in etcd. The field is mutable + // so the migration controller can first finish a migration to another version (i.e. + // that no old objects are left in the storage), and then remove the rest of the + // versions from this list. + // None of the versions in this list can be removed from the spec.Versions field. + repeated string storedVersions = 3; +} + +message CustomResourceDefinitionVersion { + // Name is the version name, e.g. “v1”, “v2beta1”, etc. + optional string name = 1; + + // Served is a flag enabling/disabling this version from being served via REST APIs + optional bool served = 2; + + // Storage flags the version as storage version. There must be exactly one + // flagged as storage version. + optional bool storage = 3; +} + +// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. +message CustomResourceSubresourceScale { + // SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .spec. + // If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET. + optional string specReplicasPath = 1; + + // StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .status. + // If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource + // will default to 0. + optional string statusReplicasPath = 2; + + // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .status. + // Must be set to work with HPA. + // If there is no value under the given path in the CustomResource, the status label selector value in the /scale + // subresource will default to the empty string. + // +optional + optional string labelSelectorPath = 3; +} + +// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. +// Status is represented by the `.status` JSON path inside of a CustomResource. When set, +// * exposes a /status subresource for the custom resource +// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza +// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza +message CustomResourceSubresourceStatus { +} + +// CustomResourceSubresources defines the status and scale subresources for CustomResources. +message CustomResourceSubresources { + // Status denotes the status subresource for CustomResources + // +optional + optional CustomResourceSubresourceStatus status = 1; + + // Scale denotes the scale subresource for CustomResources + // +optional + optional CustomResourceSubresourceScale scale = 2; } // CustomResourceValidation is a list of validation methods for CustomResources. message CustomResourceValidation { // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. + // +optional optional JSONSchemaProps openAPIV3Schema = 1; } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go index d8f9f164e..9a8fad3b7 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go @@ -45,6 +45,7 @@ func (s *JSONSchemaPropsOrBool) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &sch); err != nil { return err } + nw.Allows = true nw.Schema = &sch case len(data) == 4 && string(data) == "true": nw.Allows = true diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal_test.go index 0c6d4d4b5..99065ff95 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal_test.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal_test.go @@ -34,13 +34,13 @@ func TestJSONSchemaPropsOrBoolUnmarshalJSON(t *testing.T) { }{ {`{}`, JSONSchemaPropsOrBoolHolder{}}, - {`{"val1": {}}`, JSONSchemaPropsOrBoolHolder{JSPoB: JSONSchemaPropsOrBool{Schema: &JSONSchemaProps{}}}}, - {`{"val1": {"type":"string"}}`, JSONSchemaPropsOrBoolHolder{JSPoB: JSONSchemaPropsOrBool{Schema: &JSONSchemaProps{Type: "string"}}}}, + {`{"val1": {}}`, JSONSchemaPropsOrBoolHolder{JSPoB: JSONSchemaPropsOrBool{Allows: true, Schema: &JSONSchemaProps{}}}}, + {`{"val1": {"type":"string"}}`, JSONSchemaPropsOrBoolHolder{JSPoB: JSONSchemaPropsOrBool{Allows: true, Schema: &JSONSchemaProps{Type: "string"}}}}, {`{"val1": false}`, JSONSchemaPropsOrBoolHolder{JSPoB: JSONSchemaPropsOrBool{}}}, {`{"val1": true}`, JSONSchemaPropsOrBoolHolder{JSPoB: JSONSchemaPropsOrBool{Allows: true}}}, - {`{"val2": {}}`, JSONSchemaPropsOrBoolHolder{JSPoBOmitEmpty: &JSONSchemaPropsOrBool{Schema: &JSONSchemaProps{}}}}, - {`{"val2": {"type":"string"}}`, JSONSchemaPropsOrBoolHolder{JSPoBOmitEmpty: &JSONSchemaPropsOrBool{Schema: &JSONSchemaProps{Type: "string"}}}}, + {`{"val2": {}}`, JSONSchemaPropsOrBoolHolder{JSPoBOmitEmpty: &JSONSchemaPropsOrBool{Allows: true, Schema: &JSONSchemaProps{}}}}, + {`{"val2": {"type":"string"}}`, JSONSchemaPropsOrBoolHolder{JSPoBOmitEmpty: &JSONSchemaPropsOrBool{Allows: true, Schema: &JSONSchemaProps{Type: "string"}}}}, {`{"val2": false}`, JSONSchemaPropsOrBoolHolder{JSPoBOmitEmpty: &JSONSchemaPropsOrBool{}}}, {`{"val2": true}`, JSONSchemaPropsOrBoolHolder{JSPoBOmitEmpty: &JSONSchemaPropsOrBool{Allows: true}}}, } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go index 9ac37efe0..cab705d92 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go @@ -16,14 +16,20 @@ limitations under the License. package v1beta1 -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) // CustomResourceDefinitionSpec describes how a user wants their resource to appear type CustomResourceDefinitionSpec struct { // Group is the group this resource belongs in Group string `json:"group" protobuf:"bytes,1,opt,name=group"` // Version is the version this resource belongs in - Version string `json:"version" protobuf:"bytes,2,opt,name=version"` + // Should be always first item in Versions field if provided. + // Optional, but at least one of Version or Versions must be set. + // Deprecated: Please use `Versions`. + // +optional + Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"` // Names are the names used to describe this custom resource Names CustomResourceDefinitionNames `json:"names" protobuf:"bytes,3,opt,name=names"` // Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced @@ -31,6 +37,60 @@ type CustomResourceDefinitionSpec struct { // Validation describes the validation methods for CustomResources // +optional Validation *CustomResourceValidation `json:"validation,omitempty" protobuf:"bytes,5,opt,name=validation"` + // Subresources describes the subresources for CustomResources + // +optional + Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,6,opt,name=subresources"` + // Versions is the list of all supported versions for this resource. + // If Version field is provided, this field is optional. + // Validation: All versions must use the same validation schema for now. i.e., top + // level Validation field is applied to all of these versions. + // Order: The version name will be used to compute the order. + // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered + // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), + // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first + // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing + // major version, then minor version. An example sorted list of versions: + // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + // +optional + Versions []CustomResourceDefinitionVersion `json:"versions,omitempty" protobuf:"bytes,7,rep,name=versions"` + // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. + // +optional + AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,8,rep,name=additionalPrinterColumns"` +} + +type CustomResourceDefinitionVersion struct { + // Name is the version name, e.g. “v1”, “v2beta1”, etc. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // Served is a flag enabling/disabling this version from being served via REST APIs + Served bool `json:"served" protobuf:"varint,2,opt,name=served"` + // Storage flags the version as storage version. There must be exactly one + // flagged as storage version. + Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"` +} + +// CustomResourceColumnDefinition specifies a column for server side printing. +type CustomResourceColumnDefinition struct { + // name is a human readable name for the column. + Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + // type is an OpenAPI type definition for this column. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. + Type string `json:"type" protobuf:"bytes,2,opt,name=type"` + // format is an optional OpenAPI type definition for this column. The 'name' format is applied + // to the primary identifier column to assist in clients identifying column is the resource name. + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. + // +optional + Format string `json:"format,omitempty" protobuf:"bytes,3,opt,name=format"` + // description is a human readable description of this column. + // +optional + Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` + // priority is an integer defining the relative importance of this column compared to others. Lower + // numbers are considered higher priority. Columns that may be omitted in limited space scenarios + // should be given a higher priority. + // +optional + Priority int32 `json:"priority,omitempty" protobuf:"bytes,5,opt,name=priority"` + + // JSONPath is a simple JSON path, i.e. with array notation. + JSONPath string `json:"JSONPath" protobuf:"bytes,6,opt,name=JSONPath"` } // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition @@ -39,13 +99,19 @@ type CustomResourceDefinitionNames struct { // too: plural.group and it must be all lowercase. Plural string `json:"plural" protobuf:"bytes,1,opt,name=plural"` // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased + // +optional Singular string `json:"singular,omitempty" protobuf:"bytes,2,opt,name=singular"` // ShortNames are short names for the resource. It must be all lowercase. + // +optional ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` // Kind is the serialized kind of the resource. It is normally CamelCase and singular. Kind string `json:"kind" protobuf:"bytes,4,opt,name=kind"` // ListKind is the serialized kind of the list for this resource. Defaults to List. + // +optional ListKind string `json:"listKind,omitempty" protobuf:"bytes,5,opt,name=listKind"` + // Categories is a list of grouped resources custom resources belong to (e.g. 'all') + // +optional + Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` } // ResourceScope is an enum defining the different scopes available to a custom resource @@ -109,6 +175,14 @@ type CustomResourceDefinitionStatus struct { // AcceptedNames are the names that are actually being used to serve discovery // They may be different than the names in spec. AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` + + // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these + // versions allows a migration path for stored versions in etcd. The field is mutable + // so the migration controller can first finish a migration to another version (i.e. + // that no old objects are left in the storage), and then remove the rest of the + // versions from this list. + // None of the versions in this list can be removed from the spec.Versions field. + StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` } // CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of @@ -126,8 +200,9 @@ type CustomResourceDefinition struct { metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec describes how the user wants the resources to appear - Spec CustomResourceDefinitionSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + Spec CustomResourceDefinitionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // Status indicates the actual state of the CustomResourceDefinition + // +optional Status CustomResourceDefinitionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -145,5 +220,46 @@ type CustomResourceDefinitionList struct { // CustomResourceValidation is a list of validation methods for CustomResources. type CustomResourceValidation struct { // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. + // +optional OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"` } + +// CustomResourceSubresources defines the status and scale subresources for CustomResources. +type CustomResourceSubresources struct { + // Status denotes the status subresource for CustomResources + // +optional + Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` + // Scale denotes the scale subresource for CustomResources + // +optional + Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"` +} + +// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. +// Status is represented by the `.status` JSON path inside of a CustomResource. When set, +// * exposes a /status subresource for the custom resource +// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza +// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza +type CustomResourceSubresourceStatus struct{} + +// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. +type CustomResourceSubresourceScale struct { + // SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .spec. + // If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET. + SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"` + // StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .status. + // If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource + // will default to 0. + StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"` + // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. + // Only JSON paths without the array notation are allowed. + // Must be a JSON Path under .status. + // Must be set to work with HPA. + // If there is no value under the given path in the CustomResource, the status label selector value in the /scale + // subresource will default to the empty string. + // +optional + LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"` +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go index 9edd276d8..9776731cf 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go @@ -62,6 +62,19 @@ type JSON struct { Raw []byte `protobuf:"bytes,1,opt,name=raw"` } +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ JSON) OpenAPISchemaType() []string { + // TODO: return actual types when anyOf is supported + return []string{} +} + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ JSON) OpenAPISchemaFormat() string { return "" } + // JSONSchemaURL represents a schema url. type JSONSchemaURL string @@ -72,6 +85,19 @@ type JSONSchemaPropsOrArray struct { JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` } +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ JSONSchemaPropsOrArray) OpenAPISchemaType() []string { + // TODO: return actual types when anyOf is supported + return []string{} +} + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ JSONSchemaPropsOrArray) OpenAPISchemaFormat() string { return "" } + // JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. // Defaults to true for the boolean property. type JSONSchemaPropsOrBool struct { @@ -79,6 +105,19 @@ type JSONSchemaPropsOrBool struct { Schema *JSONSchemaProps `protobuf:"bytes,2,opt,name=schema"` } +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ JSONSchemaPropsOrBool) OpenAPISchemaType() []string { + // TODO: return actual types when anyOf is supported + return []string{} +} + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ JSONSchemaPropsOrBool) OpenAPISchemaFormat() string { return "" } + // JSONSchemaDependencies represent a dependencies property. type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray @@ -88,6 +127,19 @@ type JSONSchemaPropsOrStringArray struct { Property []string `protobuf:"bytes,2,rep,name=property"` } +// OpenAPISchemaType is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +// +// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators +func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaType() []string { + // TODO: return actual types when anyOf is supported + return []string{} +} + +// OpenAPISchemaFormat is used by the kube-openapi generator when constructing +// the OpenAPI spec of this type. +func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaFormat() string { return "" } + // JSONSchemaDefinitions contains the models explicitly defined in this spec. type JSONSchemaDefinitions map[string]JSONSchemaProps diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go index f7d46f6e5..32fe1c8af 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1beta1 @@ -34,35 +34,233 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition, - Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition, - Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition, - Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition, - Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList, - Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList, - Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames, - Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames, - Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec, - Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec, - Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus, - Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus, - Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation, - Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation, - Convert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation, - Convert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation, - Convert_v1beta1_JSON_To_apiextensions_JSON, - Convert_apiextensions_JSON_To_v1beta1_JSON, - Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps, - Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps, - Convert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray, - Convert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray, - Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool, - Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool, - Convert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray, - Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*CustomResourceColumnDefinition)(nil), (*apiextensions.CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(a.(*CustomResourceColumnDefinition), b.(*apiextensions.CustomResourceColumnDefinition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceColumnDefinition)(nil), (*CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(a.(*apiextensions.CustomResourceColumnDefinition), b.(*CustomResourceColumnDefinition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceDefinition)(nil), (*apiextensions.CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(a.(*CustomResourceDefinition), b.(*apiextensions.CustomResourceDefinition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinition)(nil), (*CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(a.(*apiextensions.CustomResourceDefinition), b.(*CustomResourceDefinition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionCondition)(nil), (*apiextensions.CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(a.(*CustomResourceDefinitionCondition), b.(*apiextensions.CustomResourceDefinitionCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionCondition)(nil), (*CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(a.(*apiextensions.CustomResourceDefinitionCondition), b.(*CustomResourceDefinitionCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionList)(nil), (*apiextensions.CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(a.(*CustomResourceDefinitionList), b.(*apiextensions.CustomResourceDefinitionList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionList)(nil), (*CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(a.(*apiextensions.CustomResourceDefinitionList), b.(*CustomResourceDefinitionList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionNames)(nil), (*apiextensions.CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(a.(*CustomResourceDefinitionNames), b.(*apiextensions.CustomResourceDefinitionNames), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionNames)(nil), (*CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(a.(*apiextensions.CustomResourceDefinitionNames), b.(*CustomResourceDefinitionNames), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionSpec)(nil), (*apiextensions.CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(a.(*CustomResourceDefinitionSpec), b.(*apiextensions.CustomResourceDefinitionSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionSpec)(nil), (*CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(a.(*apiextensions.CustomResourceDefinitionSpec), b.(*CustomResourceDefinitionSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionStatus)(nil), (*apiextensions.CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(a.(*CustomResourceDefinitionStatus), b.(*apiextensions.CustomResourceDefinitionStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionStatus)(nil), (*CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(a.(*apiextensions.CustomResourceDefinitionStatus), b.(*CustomResourceDefinitionStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionVersion)(nil), (*apiextensions.CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(a.(*CustomResourceDefinitionVersion), b.(*apiextensions.CustomResourceDefinitionVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionVersion)(nil), (*CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(a.(*apiextensions.CustomResourceDefinitionVersion), b.(*CustomResourceDefinitionVersion), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceScale)(nil), (*apiextensions.CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(a.(*CustomResourceSubresourceScale), b.(*apiextensions.CustomResourceSubresourceScale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceScale)(nil), (*CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(a.(*apiextensions.CustomResourceSubresourceScale), b.(*CustomResourceSubresourceScale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceStatus)(nil), (*apiextensions.CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(a.(*CustomResourceSubresourceStatus), b.(*apiextensions.CustomResourceSubresourceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceStatus)(nil), (*CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(a.(*apiextensions.CustomResourceSubresourceStatus), b.(*CustomResourceSubresourceStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceSubresources)(nil), (*apiextensions.CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(a.(*CustomResourceSubresources), b.(*apiextensions.CustomResourceSubresources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresources)(nil), (*CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(a.(*apiextensions.CustomResourceSubresources), b.(*CustomResourceSubresources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CustomResourceValidation)(nil), (*apiextensions.CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(a.(*CustomResourceValidation), b.(*apiextensions.CustomResourceValidation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceValidation)(nil), (*CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(a.(*apiextensions.CustomResourceValidation), b.(*CustomResourceValidation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExternalDocumentation)(nil), (*apiextensions.ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(a.(*ExternalDocumentation), b.(*apiextensions.ExternalDocumentation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.ExternalDocumentation)(nil), (*ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation(a.(*apiextensions.ExternalDocumentation), b.(*ExternalDocumentation), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JSON)(nil), (*apiextensions.JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JSON_To_apiextensions_JSON(a.(*JSON), b.(*apiextensions.JSON), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.JSON)(nil), (*JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_JSON_To_v1beta1_JSON(a.(*apiextensions.JSON), b.(*JSON), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JSONSchemaProps)(nil), (*apiextensions.JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(a.(*JSONSchemaProps), b.(*apiextensions.JSONSchemaProps), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaProps)(nil), (*JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(a.(*apiextensions.JSONSchemaProps), b.(*JSONSchemaProps), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrArray)(nil), (*apiextensions.JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(a.(*JSONSchemaPropsOrArray), b.(*apiextensions.JSONSchemaPropsOrArray), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrArray)(nil), (*JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray(a.(*apiextensions.JSONSchemaPropsOrArray), b.(*JSONSchemaPropsOrArray), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrBool)(nil), (*apiextensions.JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(a.(*JSONSchemaPropsOrBool), b.(*apiextensions.JSONSchemaPropsOrBool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrBool)(nil), (*JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(a.(*apiextensions.JSONSchemaPropsOrBool), b.(*JSONSchemaPropsOrBool), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrStringArray)(nil), (*apiextensions.JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(a.(*JSONSchemaPropsOrStringArray), b.(*apiextensions.JSONSchemaPropsOrStringArray), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrStringArray)(nil), (*JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(a.(*apiextensions.JSONSchemaPropsOrStringArray), b.(*JSONSchemaPropsOrStringArray), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*apiextensions.JSONSchemaProps)(nil), (*JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(a.(*apiextensions.JSONSchemaProps), b.(*JSONSchemaProps), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*apiextensions.JSON)(nil), (*JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiextensions_JSON_To_v1beta1_JSON(a.(*apiextensions.JSON), b.(*JSON), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*JSON)(nil), (*apiextensions.JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_JSON_To_apiextensions_JSON(a.(*JSON), b.(*apiextensions.JSON), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { + out.Name = in.Name + out.Type = in.Type + out.Format = in.Format + out.Description = in.Description + out.Priority = in.Priority + out.JSONPath = in.JSONPath + return nil +} + +// Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition is an autogenerated conversion function. +func Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { + return autoConvert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in, out, s) +} + +func autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { + out.Name = in.Name + out.Type = in.Type + out.Format = in.Format + out.Description = in.Description + out.Priority = in.Priority + out.JSONPath = in.JSONPath + return nil +} + +// Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition is an autogenerated conversion function. +func Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { + return autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in, out, s) } func autoConvert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { @@ -173,6 +371,7 @@ func autoConvert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomRe out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind + out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) return nil } @@ -187,6 +386,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomRe out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) out.Kind = in.Kind out.ListKind = in.ListKind + out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) return nil } @@ -211,6 +411,9 @@ func autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomRes } else { out.Validation = nil } + out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) + out.Versions = *(*[]apiextensions.CustomResourceDefinitionVersion)(unsafe.Pointer(&in.Versions)) + out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) return nil } @@ -235,6 +438,9 @@ func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomRes } else { out.Validation = nil } + out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) + out.Versions = *(*[]CustomResourceDefinitionVersion)(unsafe.Pointer(&in.Versions)) + out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) return nil } @@ -248,6 +454,7 @@ func autoConvert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomR if err := Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { return err } + out.StoredVersions = *(*[]string)(unsafe.Pointer(&in.StoredVersions)) return nil } @@ -261,6 +468,7 @@ func autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomR if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { return err } + out.StoredVersions = *(*[]string)(unsafe.Pointer(&in.StoredVersions)) return nil } @@ -269,6 +477,94 @@ func Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResou return autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(in, out, s) } +func autoConvert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in *CustomResourceDefinitionVersion, out *apiextensions.CustomResourceDefinitionVersion, s conversion.Scope) error { + out.Name = in.Name + out.Served = in.Served + out.Storage = in.Storage + return nil +} + +// Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion is an autogenerated conversion function. +func Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in *CustomResourceDefinitionVersion, out *apiextensions.CustomResourceDefinitionVersion, s conversion.Scope) error { + return autoConvert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in, out, s) +} + +func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(in *apiextensions.CustomResourceDefinitionVersion, out *CustomResourceDefinitionVersion, s conversion.Scope) error { + out.Name = in.Name + out.Served = in.Served + out.Storage = in.Storage + return nil +} + +// Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion is an autogenerated conversion function. +func Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(in *apiextensions.CustomResourceDefinitionVersion, out *CustomResourceDefinitionVersion, s conversion.Scope) error { + return autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(in, out, s) +} + +func autoConvert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in *CustomResourceSubresourceScale, out *apiextensions.CustomResourceSubresourceScale, s conversion.Scope) error { + out.SpecReplicasPath = in.SpecReplicasPath + out.StatusReplicasPath = in.StatusReplicasPath + out.LabelSelectorPath = (*string)(unsafe.Pointer(in.LabelSelectorPath)) + return nil +} + +// Convert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale is an autogenerated conversion function. +func Convert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in *CustomResourceSubresourceScale, out *apiextensions.CustomResourceSubresourceScale, s conversion.Scope) error { + return autoConvert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in, out, s) +} + +func autoConvert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(in *apiextensions.CustomResourceSubresourceScale, out *CustomResourceSubresourceScale, s conversion.Scope) error { + out.SpecReplicasPath = in.SpecReplicasPath + out.StatusReplicasPath = in.StatusReplicasPath + out.LabelSelectorPath = (*string)(unsafe.Pointer(in.LabelSelectorPath)) + return nil +} + +// Convert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale is an autogenerated conversion function. +func Convert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(in *apiextensions.CustomResourceSubresourceScale, out *CustomResourceSubresourceScale, s conversion.Scope) error { + return autoConvert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(in, out, s) +} + +func autoConvert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in *CustomResourceSubresourceStatus, out *apiextensions.CustomResourceSubresourceStatus, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus is an autogenerated conversion function. +func Convert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in *CustomResourceSubresourceStatus, out *apiextensions.CustomResourceSubresourceStatus, s conversion.Scope) error { + return autoConvert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in, out, s) +} + +func autoConvert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(in *apiextensions.CustomResourceSubresourceStatus, out *CustomResourceSubresourceStatus, s conversion.Scope) error { + return nil +} + +// Convert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus is an autogenerated conversion function. +func Convert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(in *apiextensions.CustomResourceSubresourceStatus, out *CustomResourceSubresourceStatus, s conversion.Scope) error { + return autoConvert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(in, out, s) +} + +func autoConvert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in *CustomResourceSubresources, out *apiextensions.CustomResourceSubresources, s conversion.Scope) error { + out.Status = (*apiextensions.CustomResourceSubresourceStatus)(unsafe.Pointer(in.Status)) + out.Scale = (*apiextensions.CustomResourceSubresourceScale)(unsafe.Pointer(in.Scale)) + return nil +} + +// Convert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources is an autogenerated conversion function. +func Convert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in *CustomResourceSubresources, out *apiextensions.CustomResourceSubresources, s conversion.Scope) error { + return autoConvert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in, out, s) +} + +func autoConvert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(in *apiextensions.CustomResourceSubresources, out *CustomResourceSubresources, s conversion.Scope) error { + out.Status = (*CustomResourceSubresourceStatus)(unsafe.Pointer(in.Status)) + out.Scale = (*CustomResourceSubresourceScale)(unsafe.Pointer(in.Scale)) + return nil +} + +// Convert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources is an autogenerated conversion function. +func Convert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(in *apiextensions.CustomResourceSubresources, out *CustomResourceSubresources, s conversion.Scope) error { + return autoConvert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(in, out, s) +} + func autoConvert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(in *CustomResourceValidation, out *apiextensions.CustomResourceValidation, s conversion.Scope) error { if in.OpenAPIV3Schema != nil { in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go index 363e970da..5e14efbc8 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -24,6 +24,22 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. +func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { + if in == nil { + return nil + } + out := new(CustomResourceColumnDefinition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { *out = *in @@ -48,9 +64,8 @@ func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { func (in *CustomResourceDefinition) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -99,9 +114,8 @@ func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList func (in *CustomResourceDefinitionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -112,6 +126,11 @@ func (in *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinit *out = make([]string, len(*in)) copy(*out, *in) } + if in.Categories != nil { + in, out := &in.Categories, &out.Categories + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -131,12 +150,23 @@ func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefiniti in.Names.DeepCopyInto(&out.Names) if in.Validation != nil { in, out := &in.Validation, &out.Validation - if *in == nil { - *out = nil - } else { - *out = new(CustomResourceValidation) - (*in).DeepCopyInto(*out) - } + *out = new(CustomResourceValidation) + (*in).DeepCopyInto(*out) + } + if in.Subresources != nil { + in, out := &in.Subresources, &out.Subresources + *out = new(CustomResourceSubresources) + (*in).DeepCopyInto(*out) + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]CustomResourceDefinitionVersion, len(*in)) + copy(*out, *in) + } + if in.AdditionalPrinterColumns != nil { + in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns + *out = make([]CustomResourceColumnDefinition, len(*in)) + copy(*out, *in) } return } @@ -162,6 +192,11 @@ func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefini } } in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) + if in.StoredVersions != nil { + in, out := &in.StoredVersions, &out.StoredVersions + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -175,17 +210,91 @@ func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionSt return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. +func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { + if in == nil { + return nil + } + out := new(CustomResourceDefinitionVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { + *out = *in + if in.LabelSelectorPath != nil { + in, out := &in.LabelSelectorPath, &out.LabelSelectorPath + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. +func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { + if in == nil { + return nil + } + out := new(CustomResourceSubresourceScale) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. +func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { + if in == nil { + return nil + } + out := new(CustomResourceSubresourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(CustomResourceSubresourceStatus) + **out = **in + } + if in.Scale != nil { + in, out := &in.Scale, &out.Scale + *out = new(CustomResourceSubresourceScale) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. +func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { + if in == nil { + return nil + } + out := new(CustomResourceSubresources) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { *out = *in if in.OpenAPIV3Schema != nil { in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -237,6 +346,50 @@ func (in *JSON) DeepCopy() *JSON { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { + { + in := &in + *out = make(JSONSchemaDefinitions, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. +func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { + if in == nil { + return nil + } + out := new(JSONSchemaDefinitions) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { + { + in := &in + *out = make(JSONSchemaDependencies, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. +func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { + if in == nil { + return nil + } + out := new(JSONSchemaDependencies) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { clone := in.DeepCopy() @@ -249,12 +402,7 @@ func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.JSONSchemas != nil { in, out := &in.JSONSchemas, &out.JSONSchemas @@ -281,12 +429,7 @@ func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -306,12 +449,7 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStrin *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.Property != nil { in, out := &in.Property, &out.Property diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go index 5c30d5b0a..f65f47a03 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/BUILD deleted file mode 100644 index 23bab9a86..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["validation.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/validation:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["validation_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go index 4a8554645..0568bc181 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go @@ -18,9 +18,11 @@ package validation import ( "fmt" + "reflect" "strings" genericvalidation "k8s.io/apimachinery/pkg/api/validation" + "k8s.io/apimachinery/pkg/util/sets" validationutil "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -30,6 +32,11 @@ import ( apiextensionsfeatures "k8s.io/apiextensions-apiserver/pkg/features" ) +var ( + printerColumnDatatypes = sets.NewString("integer", "number", "string", "boolean", "date") + customResourceColumnDefinitionFormats = sets.NewString("int32", "int64", "float", "double", "byte", "date", "date-time", "password") +) + // ValidateCustomResourceDefinition statically validates func ValidateCustomResourceDefinition(obj *apiextensions.CustomResourceDefinition) field.ErrorList { nameValidationFn := func(name string, prefix bool) []string { @@ -44,6 +51,7 @@ func ValidateCustomResourceDefinition(obj *apiextensions.CustomResourceDefinitio allErrs := genericvalidation.ValidateObjectMeta(&obj.ObjectMeta, false, nameValidationFn, field.NewPath("metadata")) allErrs = append(allErrs, ValidateCustomResourceDefinitionSpec(&obj.Spec, field.NewPath("spec"))...) allErrs = append(allErrs, ValidateCustomResourceDefinitionStatus(&obj.Status, field.NewPath("status"))...) + allErrs = append(allErrs, ValidateCustomResourceDefinitionStoredVersions(obj.Status.StoredVersions, obj.Spec.Versions, field.NewPath("status").Child("storedVersions"))...) return allErrs } @@ -52,6 +60,34 @@ func ValidateCustomResourceDefinitionUpdate(obj, oldObj *apiextensions.CustomRes allErrs := genericvalidation.ValidateObjectMetaUpdate(&obj.ObjectMeta, &oldObj.ObjectMeta, field.NewPath("metadata")) allErrs = append(allErrs, ValidateCustomResourceDefinitionSpecUpdate(&obj.Spec, &oldObj.Spec, apiextensions.IsCRDConditionTrue(oldObj, apiextensions.Established), field.NewPath("spec"))...) allErrs = append(allErrs, ValidateCustomResourceDefinitionStatus(&obj.Status, field.NewPath("status"))...) + allErrs = append(allErrs, ValidateCustomResourceDefinitionStoredVersions(obj.Status.StoredVersions, obj.Spec.Versions, field.NewPath("status").Child("storedVersions"))...) + return allErrs +} + +// ValidateCustomResourceDefinitionStoredVersions statically validates +func ValidateCustomResourceDefinitionStoredVersions(storedVersions []string, versions []apiextensions.CustomResourceDefinitionVersion, fldPath *field.Path) field.ErrorList { + if len(storedVersions) == 0 { + return field.ErrorList{field.Invalid(fldPath, storedVersions, "must have at least one stored version")} + } + allErrs := field.ErrorList{} + storedVersionsMap := map[string]int{} + for i, v := range storedVersions { + storedVersionsMap[v] = i + } + for _, v := range versions { + _, ok := storedVersionsMap[v.Name] + if v.Storage && !ok { + allErrs = append(allErrs, field.Invalid(fldPath, v, "must have the storage version "+v.Name)) + } + if ok { + delete(storedVersionsMap, v.Name) + } + } + + for v, i := range storedVersionsMap { + allErrs = append(allErrs, field.Invalid(fldPath.Index(i), v, "must appear in spec.versions")) + } + return allErrs } @@ -74,12 +110,6 @@ func ValidateCustomResourceDefinitionSpec(spec *apiextensions.CustomResourceDefi allErrs = append(allErrs, field.Invalid(fldPath.Child("group"), spec.Group, "should be a domain with at least one dot")) } - if len(spec.Version) == 0 { - allErrs = append(allErrs, field.Required(fldPath.Child("version"), "")) - } else if errs := validationutil.IsDNS1035Label(spec.Version); len(errs) > 0 { - allErrs = append(allErrs, field.Invalid(fldPath.Child("version"), spec.Version, strings.Join(errs, ","))) - } - switch spec.Scope { case "": allErrs = append(allErrs, field.Required(fldPath.Child("scope"), "")) @@ -88,6 +118,37 @@ func ValidateCustomResourceDefinitionSpec(spec *apiextensions.CustomResourceDefi allErrs = append(allErrs, field.NotSupported(fldPath.Child("scope"), spec.Scope, []string{string(apiextensions.ClusterScoped), string(apiextensions.NamespaceScoped)})) } + storageFlagCount := 0 + versionsMap := map[string]bool{} + uniqueNames := true + for i, version := range spec.Versions { + if version.Storage { + storageFlagCount++ + } + if versionsMap[version.Name] { + uniqueNames = false + } else { + versionsMap[version.Name] = true + } + if errs := validationutil.IsDNS1035Label(version.Name); len(errs) > 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("versions").Index(i).Child("name"), spec.Versions[i].Name, strings.Join(errs, ","))) + } + } + if !uniqueNames { + allErrs = append(allErrs, field.Invalid(fldPath.Child("versions"), spec.Versions, "must contain unique version names")) + } + if storageFlagCount != 1 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("versions"), spec.Versions, "must have exactly one version marked as storage version")) + } + if len(spec.Version) != 0 { + if errs := validationutil.IsDNS1035Label(spec.Version); len(errs) > 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("version"), spec.Version, strings.Join(errs, ","))) + } + if len(spec.Versions) >= 1 && spec.Versions[0].Name != spec.Version { + allErrs = append(allErrs, field.Invalid(fldPath.Child("version"), spec.Version, "must match the first version in spec.versions")) + } + } + // in addition to the basic name restrictions, some names are required for spec, but not for status if len(spec.Names.Plural) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("names", "plural"), "")) @@ -105,9 +166,25 @@ func ValidateCustomResourceDefinitionSpec(spec *apiextensions.CustomResourceDefi allErrs = append(allErrs, ValidateCustomResourceDefinitionNames(&spec.Names, fldPath.Child("names"))...) if utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceValidation) { - allErrs = append(allErrs, ValidateCustomResourceDefinitionValidation(spec.Validation, fldPath.Child("validation"))...) + statusEnabled := false + if spec.Subresources != nil && spec.Subresources.Status != nil { + statusEnabled = true + } + allErrs = append(allErrs, ValidateCustomResourceDefinitionValidation(spec.Validation, statusEnabled, fldPath.Child("validation"))...) } else if spec.Validation != nil { - allErrs = append(allErrs, field.Forbidden(fldPath.Child("validation"), "disabled by feature-gate")) + allErrs = append(allErrs, field.Forbidden(fldPath.Child("validation"), "disabled by feature-gate CustomResourceValidation")) + } + + if utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) { + allErrs = append(allErrs, ValidateCustomResourceDefinitionSubresources(spec.Subresources, fldPath.Child("subresources"))...) + } else if spec.Subresources != nil { + allErrs = append(allErrs, field.Forbidden(fldPath.Child("subresources"), "disabled by feature-gate CustomResourceSubresources")) + } + + for i := range spec.AdditionalPrinterColumns { + if errs := ValidateCustomResourceColumnDefinition(&spec.AdditionalPrinterColumns[i], fldPath.Child("columns").Index(i)); len(errs) > 0 { + allErrs = append(allErrs, errs...) + } } return allErrs @@ -119,7 +196,6 @@ func ValidateCustomResourceDefinitionSpecUpdate(spec, oldSpec *apiextensions.Cus if established { // these effect the storage and cannot be changed therefore - allErrs = append(allErrs, genericvalidation.ValidateImmutableField(spec.Version, oldSpec.Version, fldPath.Child("version"))...) allErrs = append(allErrs, genericvalidation.ValidateImmutableField(spec.Scope, oldSpec.Scope, fldPath.Child("scope"))...) allErrs = append(allErrs, genericvalidation.ValidateImmutableField(spec.Names.Kind, oldSpec.Names.Kind, fldPath.Child("names", "kind"))...) } @@ -158,7 +234,6 @@ func ValidateCustomResourceDefinitionNames(names *apiextensions.CustomResourceDe if errs := validationutil.IsDNS1035Label(shortName); len(errs) > 0 { allErrs = append(allErrs, field.Invalid(fldPath.Child("shortNames").Index(i), shortName, strings.Join(errs, ","))) } - } // kind and listKind may not be the same or parsing become ambiguous @@ -166,6 +241,39 @@ func ValidateCustomResourceDefinitionNames(names *apiextensions.CustomResourceDe allErrs = append(allErrs, field.Invalid(fldPath.Child("listKind"), names.ListKind, "kind and listKind may not be the same")) } + for i, category := range names.Categories { + if errs := validationutil.IsDNS1035Label(category); len(errs) > 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("categories").Index(i), category, strings.Join(errs, ","))) + } + } + + return allErrs +} + +// ValidateCustomResourceColumnDefinition statically validates a printer column. +func ValidateCustomResourceColumnDefinition(col *apiextensions.CustomResourceColumnDefinition, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if len(col.Name) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("name"), "")) + } + + if len(col.Type) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("type"), fmt.Sprintf("must be one of %s", strings.Join(printerColumnDatatypes.List(), ",")))) + } else if !printerColumnDatatypes.Has(col.Type) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("type"), col.Type, fmt.Sprintf("must be one of %s", strings.Join(printerColumnDatatypes.List(), ",")))) + } + + if len(col.Format) > 0 && !customResourceColumnDefinitionFormats.Has(col.Format) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("format"), col.Format, fmt.Sprintf("must be one of %s", strings.Join(customResourceColumnDefinitionFormats.List(), ",")))) + } + + if len(col.JSONPath) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("JSONPath"), "")) + } else if errs := validateSimpleJSONPath(col.JSONPath, fldPath.Child("JSONPath")); len(errs) > 0 { + allErrs = append(allErrs, errs...) + } + return allErrs } @@ -175,21 +283,49 @@ type specStandardValidator interface { } // ValidateCustomResourceDefinitionValidation statically validates -func ValidateCustomResourceDefinitionValidation(customResourceValidation *apiextensions.CustomResourceValidation, fldPath *field.Path) field.ErrorList { +func ValidateCustomResourceDefinitionValidation(customResourceValidation *apiextensions.CustomResourceValidation, statusSubresourceEnabled bool, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if customResourceValidation == nil { return allErrs } - if customResourceValidation.OpenAPIV3Schema != nil { + if schema := customResourceValidation.OpenAPIV3Schema; schema != nil { + // if the status subresource is enabled, only certain fields are allowed inside the root schema. + // these fields are chosen such that, if status is extracted as properties["status"], it's validation is not lost. + if utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) && statusSubresourceEnabled { + v := reflect.ValueOf(schema).Elem() + for i := 0; i < v.NumField(); i++ { + // skip zero values + if value := v.Field(i).Interface(); reflect.DeepEqual(value, reflect.Zero(reflect.TypeOf(value)).Interface()) { + continue + } + + fieldName := v.Type().Field(i).Name + + // only "object" type is valid at root of the schema since validation schema for status is extracted as properties["status"] + if fieldName == "Type" { + if schema.Type != "object" { + allErrs = append(allErrs, field.Invalid(fldPath.Child("openAPIV3Schema.type"), schema.Type, fmt.Sprintf(`only "object" is allowed as the type at the root of the schema if the status subresource is enabled`))) + break + } + continue + } + + if !allowedAtRootSchema(fieldName) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("openAPIV3Schema"), *schema, fmt.Sprintf(`only %v fields are allowed at the root of the schema if the status subresource is enabled`, allowedFieldsAtRootSchema))) + break + } + } + } + openAPIV3Schema := &specStandardValidatorV3{} - allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(customResourceValidation.OpenAPIV3Schema, fldPath.Child("openAPIV3Schema"), openAPIV3Schema)...) + allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(schema, fldPath.Child("openAPIV3Schema"), openAPIV3Schema)...) } // if validation passed otherwise, make sure we can actually construct a schema validator from this custom resource validation. if len(allErrs) == 0 { - if _, err := apiservervalidation.NewSchemaValidator(customResourceValidation); err != nil { + if _, _, err := apiservervalidation.NewSchemaValidator(customResourceValidation); err != nil { allErrs = append(allErrs, field.Invalid(fldPath, "", fmt.Sprintf("error building validator: %v", err))) } } @@ -210,14 +346,36 @@ func ValidateCustomResourceDefinitionOpenAPISchema(schema *apiextensions.JSONSch allErrs = append(allErrs, field.Forbidden(fldPath.Child("uniqueItems"), "uniqueItems cannot be set to true since the runtime complexity becomes quadratic")) } - // additionalProperties contradicts Kubernetes API convention to ignore unknown fields + // additionalProperties and properties are mutual exclusive because otherwise they + // contradict Kubernetes' API convention to ignore unknown fields. + // + // In other words: + // - properties are for structs, + // - additionalProperties are for map[string]interface{} + // + // Note: when patternProperties is added to OpenAPI some day, this will have to be + // restricted like additionalProperties. if schema.AdditionalProperties != nil { - if schema.AdditionalProperties.Allows == false { - allErrs = append(allErrs, field.Forbidden(fldPath.Child("additionalProperties"), "additionalProperties cannot be set to false")) + if len(schema.Properties) != 0 { + if schema.AdditionalProperties.Allows == false || schema.AdditionalProperties.Schema != nil { + allErrs = append(allErrs, field.Forbidden(fldPath.Child("additionalProperties"), "additionalProperties and properties are mutual exclusive")) + } } allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(schema.AdditionalProperties.Schema, fldPath.Child("additionalProperties"), ssv)...) } + if len(schema.Properties) != 0 { + for property, jsonSchema := range schema.Properties { + allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("properties").Key(property), ssv)...) + } + } + + if len(schema.PatternProperties) != 0 { + for property, jsonSchema := range schema.PatternProperties { + allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("patternProperties").Key(property), ssv)...) + } + } + if schema.AdditionalItems != nil { allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(schema.AdditionalItems.Schema, fldPath.Child("additionalItems"), ssv)...) } @@ -225,32 +383,20 @@ func ValidateCustomResourceDefinitionOpenAPISchema(schema *apiextensions.JSONSch allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(schema.Not, fldPath.Child("not"), ssv)...) if len(schema.AllOf) != 0 { - for _, jsonSchema := range schema.AllOf { - allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("allOf"), ssv)...) + for i, jsonSchema := range schema.AllOf { + allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("allOf").Index(i), ssv)...) } } if len(schema.OneOf) != 0 { - for _, jsonSchema := range schema.OneOf { - allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("oneOf"), ssv)...) + for i, jsonSchema := range schema.OneOf { + allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("oneOf").Index(i), ssv)...) } } if len(schema.AnyOf) != 0 { - for _, jsonSchema := range schema.AnyOf { - allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("anyOf"), ssv)...) - } - } - - if len(schema.Properties) != 0 { - for property, jsonSchema := range schema.Properties { - allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("properties").Key(property), ssv)...) - } - } - - if len(schema.PatternProperties) != 0 { - for property, jsonSchema := range schema.PatternProperties { - allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("patternProperties").Key(property), ssv)...) + for i, jsonSchema := range schema.AnyOf { + allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("anyOf").Index(i), ssv)...) } } @@ -263,8 +409,8 @@ func ValidateCustomResourceDefinitionOpenAPISchema(schema *apiextensions.JSONSch if schema.Items != nil { allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(schema.Items.Schema, fldPath.Child("items"), ssv)...) if len(schema.Items.JSONSchemas) != 0 { - for _, jsonSchema := range schema.Items.JSONSchemas { - allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("items"), ssv)...) + for i, jsonSchema := range schema.Items.JSONSchemas { + allErrs = append(allErrs, ValidateCustomResourceDefinitionOpenAPISchema(&jsonSchema, fldPath.Child("items").Index(i), ssv)...) } } } @@ -326,3 +472,75 @@ func (v *specStandardValidatorV3) validate(schema *apiextensions.JSONSchemaProps return allErrs } + +// ValidateCustomResourceDefinitionSubresources statically validates +func ValidateCustomResourceDefinitionSubresources(subresources *apiextensions.CustomResourceSubresources, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + if subresources == nil { + return allErrs + } + + if subresources.Scale != nil { + if len(subresources.Scale.SpecReplicasPath) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("scale.specReplicasPath"), "")) + } else { + // should be constrained json path under .spec + if errs := validateSimpleJSONPath(subresources.Scale.SpecReplicasPath, fldPath.Child("scale.specReplicasPath")); len(errs) > 0 { + allErrs = append(allErrs, errs...) + } else if !strings.HasPrefix(subresources.Scale.SpecReplicasPath, ".spec.") { + allErrs = append(allErrs, field.Invalid(fldPath.Child("scale.specReplicasPath"), subresources.Scale.SpecReplicasPath, "should be a json path under .spec")) + } + } + + if len(subresources.Scale.StatusReplicasPath) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("scale.statusReplicasPath"), "")) + } else { + // should be constrained json path under .status + if errs := validateSimpleJSONPath(subresources.Scale.StatusReplicasPath, fldPath.Child("scale.statusReplicasPath")); len(errs) > 0 { + allErrs = append(allErrs, errs...) + } else if !strings.HasPrefix(subresources.Scale.StatusReplicasPath, ".status.") { + allErrs = append(allErrs, field.Invalid(fldPath.Child("scale.statusReplicasPath"), subresources.Scale.StatusReplicasPath, "should be a json path under .status")) + } + } + + // if labelSelectorPath is present, it should be a constrained json path under .status + if subresources.Scale.LabelSelectorPath != nil && len(*subresources.Scale.LabelSelectorPath) > 0 { + if errs := validateSimpleJSONPath(*subresources.Scale.LabelSelectorPath, fldPath.Child("scale.labelSelectorPath")); len(errs) > 0 { + allErrs = append(allErrs, errs...) + } else if !strings.HasPrefix(*subresources.Scale.LabelSelectorPath, ".status.") { + allErrs = append(allErrs, field.Invalid(fldPath.Child("scale.labelSelectorPath"), subresources.Scale.LabelSelectorPath, "should be a json path under .status")) + } + } + } + + return allErrs +} + +func validateSimpleJSONPath(s string, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + + switch { + case len(s) == 0: + allErrs = append(allErrs, field.Invalid(fldPath, s, "must not be empty")) + case s[0] != '.': + allErrs = append(allErrs, field.Invalid(fldPath, s, "must be a simple json path starting with .")) + case s != ".": + if cs := strings.Split(s[1:], "."); len(cs) < 1 { + allErrs = append(allErrs, field.Invalid(fldPath, s, "must be a json path in the dot notation")) + } + } + + return allErrs +} + +var allowedFieldsAtRootSchema = []string{"Description", "Type", "Format", "Title", "Maximum", "ExclusiveMaximum", "Minimum", "ExclusiveMinimum", "MaxLength", "MinLength", "Pattern", "MaxItems", "MinItems", "UniqueItems", "MultipleOf", "Required", "Items", "Properties", "ExternalDocs", "Example"} + +func allowedAtRootSchema(field string) bool { + for _, v := range allowedFieldsAtRootSchema { + if field == v { + return true + } + } + return false +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go index dd712c94f..794142b70 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go @@ -41,17 +41,159 @@ func unsupported(path ...string) validationMatch { func immutable(path ...string) validationMatch { return validationMatch{path: field.NewPath(path[0], path[1:]...), errorType: field.ErrorTypeInvalid} } +func forbidden(path ...string) validationMatch { + return validationMatch{path: field.NewPath(path[0], path[1:]...), errorType: field.ErrorTypeForbidden} +} func (v validationMatch) matches(err *field.Error) bool { return err.Type == v.errorType && err.Field == v.path.String() } func TestValidateCustomResourceDefinition(t *testing.T) { + singleVersionList := []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + } tests := []struct { name string resource *apiextensions.CustomResourceDefinition errors []validationMatch }{ + { + name: "no_storage_version", + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Scope: apiextensions.ResourceScope("Cluster"), + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: false, + }, + { + Name: "version2", + Served: true, + Storage: false, + }, + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{ + invalid("spec", "versions"), + }, + }, + { + name: "multiple_storage_version", + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Scope: apiextensions.ResourceScope("Cluster"), + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + { + Name: "version2", + Served: true, + Storage: true, + }, + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{ + invalid("spec", "versions"), + invalid("status", "storedVersions"), + }, + }, + { + name: "missing_storage_version_in_stored_versions", + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Scope: apiextensions.ResourceScope("Cluster"), + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: false, + }, + { + Name: "version2", + Served: true, + Storage: true, + }, + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{ + invalid("status", "storedVersions"), + }, + }, + { + name: "empty_stored_version", + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Scope: apiextensions.ResourceScope("Cluster"), + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{}, + }, + }, + errors: []validationMatch{ + invalid("status", "storedVersions"), + }, + }, { name: "mismatched name", resource: &apiextensions.CustomResourceDefinition{ @@ -64,8 +206,9 @@ func TestValidateCustomResourceDefinition(t *testing.T) { }, }, errors: []validationMatch{ + invalid("status", "storedVersions"), invalid("metadata", "name"), - required("spec", "version"), + invalid("spec", "versions"), required("spec", "scope"), required("spec", "names", "singular"), required("spec", "names", "kind"), @@ -78,9 +221,10 @@ func TestValidateCustomResourceDefinition(t *testing.T) { ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, }, errors: []validationMatch{ + invalid("status", "storedVersions"), invalid("metadata", "name"), + invalid("spec", "versions"), required("spec", "group"), - required("spec", "version"), required("spec", "scope"), required("spec", "names", "plural"), required("spec", "names", "singular"), @@ -113,9 +257,9 @@ func TestValidateCustomResourceDefinition(t *testing.T) { }, }, errors: []validationMatch{ + invalid("status", "storedVersions"), invalid("metadata", "name"), invalid("spec", "group"), - invalid("spec", "version"), unsupported("spec", "scope"), invalid("spec", "names", "plural"), invalid("spec", "names", "singular"), @@ -127,6 +271,8 @@ func TestValidateCustomResourceDefinition(t *testing.T) { invalid("status", "acceptedNames", "kind"), invalid("status", "acceptedNames", "listKind"), // invalid format invalid("status", "acceptedNames", "listKind"), // kind == listKind + invalid("spec", "versions"), + invalid("spec", "version"), }, }, { @@ -134,8 +280,9 @@ func TestValidateCustomResourceDefinition(t *testing.T) { resource: &apiextensions.CustomResourceDefinition{ ObjectMeta: metav1.ObjectMeta{Name: "plural.group"}, Spec: apiextensions.CustomResourceDefinitionSpec{ - Group: "group.c(*&om", - Version: "version", + Group: "group.c(*&om", + Version: "version", + Versions: singleVersionList, Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural", Singular: "singular", @@ -150,6 +297,7 @@ func TestValidateCustomResourceDefinition(t *testing.T) { Kind: "matching", ListKind: "matching", }, + StoredVersions: []string{"version"}, }, }, errors: []validationMatch{ @@ -160,6 +308,70 @@ func TestValidateCustomResourceDefinition(t *testing.T) { invalid("status", "acceptedNames", "listKind"), }, }, + { + name: "additionalProperties and properties forbidden", + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: singleVersionList, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + Validation: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Properties: map[string]apiextensions.JSONSchemaProps{ + "foo": {}, + }, + AdditionalProperties: &apiextensions.JSONSchemaPropsOrBool{Allows: false}, + }, + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{ + forbidden("spec", "validation", "openAPIV3Schema", "additionalProperties"), + }, + }, + { + name: "additionalProperties without properties allowed (map[string]string)", + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "plural.group.com"}, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: singleVersionList, + Scope: apiextensions.NamespaceScoped, + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "Plural", + ListKind: "PluralList", + }, + Validation: &apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + AdditionalProperties: &apiextensions.JSONSchemaPropsOrBool{ + Allows: true, + Schema: &apiextensions.JSONSchemaProps{ + Type: "string", + }, + }, + }, + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + StoredVersions: []string{"version"}, + }, + }, + errors: []validationMatch{}, + }, } for _, tc := range tests { @@ -206,7 +418,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "group.com", Version: "version", - Scope: apiextensions.ResourceScope("Cluster"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural", Singular: "singular", @@ -231,7 +450,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "group.com", Version: "version", - Scope: apiextensions.ResourceScope("Cluster"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural", Singular: "singular", @@ -246,6 +472,7 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Kind: "kind", ListKind: "listkind", }, + StoredVersions: []string{"version"}, }, }, errors: []validationMatch{}, @@ -260,7 +487,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "group.com", Version: "version", - Scope: apiextensions.ResourceScope("Cluster"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural", Singular: "singular", @@ -288,7 +522,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "group.com", Version: "version", - Scope: apiextensions.ResourceScope("Cluster"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural", Singular: "singular", @@ -303,10 +544,91 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Kind: "kind", ListKind: "listkind", }, + StoredVersions: []string{"version"}, }, }, errors: []validationMatch{}, }, + { + name: "version-deleted", + old: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "plural.group.com", + ResourceVersion: "42", + }, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + { + Name: "version2", + Served: true, + Storage: false, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "kind", + ListKind: "listkind", + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + AcceptedNames: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "kind", + ListKind: "listkind", + }, + StoredVersions: []string{"version", "version2"}, + Conditions: []apiextensions.CustomResourceDefinitionCondition{ + {Type: apiextensions.Established, Status: apiextensions.ConditionTrue}, + }, + }, + }, + resource: &apiextensions.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: "plural.group.com", + ResourceVersion: "42", + }, + Spec: apiextensions.CustomResourceDefinitionSpec{ + Group: "group.com", + Version: "version", + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), + Names: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "kind", + ListKind: "listkind", + }, + }, + Status: apiextensions.CustomResourceDefinitionStatus{ + AcceptedNames: apiextensions.CustomResourceDefinitionNames{ + Plural: "plural", + Singular: "singular", + Kind: "kind", + ListKind: "listkind", + }, + StoredVersions: []string{"version", "version2"}, + }, + }, + errors: []validationMatch{ + invalid("status", "storedVersions[1]"), + }, + }, { name: "changes", old: &apiextensions.CustomResourceDefinition{ @@ -317,7 +639,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "group.com", Version: "version", - Scope: apiextensions.ResourceScope("Cluster"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural", Singular: "singular", @@ -345,7 +674,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "abc.com", Version: "version2", - Scope: apiextensions.ResourceScope("Namespaced"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version2", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Namespaced"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural2", Singular: "singular2", @@ -360,6 +696,7 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Kind: "kind2", ListKind: "listkind2", }, + StoredVersions: []string{"version2"}, }, }, errors: []validationMatch{ @@ -377,7 +714,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "group.com", Version: "version", - Scope: apiextensions.ResourceScope("Cluster"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Cluster"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural", Singular: "singular", @@ -405,7 +749,14 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Spec: apiextensions.CustomResourceDefinitionSpec{ Group: "abc.com", Version: "version2", - Scope: apiextensions.ResourceScope("Namespaced"), + Versions: []apiextensions.CustomResourceDefinitionVersion{ + { + Name: "version2", + Served: true, + Storage: true, + }, + }, + Scope: apiextensions.ResourceScope("Namespaced"), Names: apiextensions.CustomResourceDefinitionNames{ Plural: "plural2", Singular: "singular2", @@ -420,11 +771,11 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { Kind: "kind2", ListKind: "listkind2", }, + StoredVersions: []string{"version2"}, }, }, errors: []validationMatch{ immutable("spec", "group"), - immutable("spec", "version"), immutable("spec", "scope"), immutable("spec", "names", "kind"), immutable("spec", "names", "plural"), @@ -458,3 +809,118 @@ func TestValidateCustomResourceDefinitionUpdate(t *testing.T) { } } } + +func TestValidateCustomResourceDefinitionValidation(t *testing.T) { + tests := []struct { + name string + input apiextensions.CustomResourceValidation + statusEnabled bool + wantError bool + }{ + { + name: "empty", + input: apiextensions.CustomResourceValidation{}, + wantError: false, + }, + { + name: "empty with status", + input: apiextensions.CustomResourceValidation{}, + statusEnabled: true, + wantError: false, + }, + { + name: "root type without status", + input: apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "string", + }, + }, + statusEnabled: false, + wantError: false, + }, + { + name: "root type having invalid value, with status", + input: apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Type: "string", + }, + }, + statusEnabled: true, + wantError: true, + }, + { + name: "non-allowed root field with status", + input: apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + AnyOf: []apiextensions.JSONSchemaProps{ + { + Description: "First schema", + }, + { + Description: "Second schema", + }, + }, + }, + }, + statusEnabled: true, + wantError: true, + }, + { + name: "all allowed fields at the root of the schema with status", + input: apiextensions.CustomResourceValidation{ + OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ + Description: "This is a description", + Type: "object", + Format: "date-time", + Title: "This is a title", + Maximum: float64Ptr(10), + ExclusiveMaximum: true, + Minimum: float64Ptr(5), + ExclusiveMinimum: true, + MaxLength: int64Ptr(10), + MinLength: int64Ptr(5), + Pattern: "^[a-z]$", + MaxItems: int64Ptr(10), + MinItems: int64Ptr(5), + MultipleOf: float64Ptr(3), + Required: []string{"spec", "status"}, + Items: &apiextensions.JSONSchemaPropsOrArray{ + Schema: &apiextensions.JSONSchemaProps{ + Description: "This is a schema nested under Items", + }, + }, + Properties: map[string]apiextensions.JSONSchemaProps{ + "spec": {}, + "status": {}, + }, + ExternalDocs: &apiextensions.ExternalDocumentation{ + Description: "This is an external documentation description", + }, + Example: &example, + }, + }, + statusEnabled: true, + wantError: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := ValidateCustomResourceDefinitionValidation(&tt.input, tt.statusEnabled, field.NewPath("spec", "validation")) + if !tt.wantError && len(got) > 0 { + t.Errorf("Expected no error, but got: %v", got) + } else if tt.wantError && len(got) == 0 { + t.Error("Expected error, but got none") + } + }) + } +} + +var example = apiextensions.JSON(`"This is an example"`) + +func float64Ptr(f float64) *float64 { + return &f +} + +func int64Ptr(f int64) *int64 { + return &f +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go index f94bbae2c..50e7ee880 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package apiextensions @@ -24,6 +24,22 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. +func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { + if in == nil { + return nil + } + out := new(CustomResourceColumnDefinition) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { *out = *in @@ -48,9 +64,8 @@ func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { func (in *CustomResourceDefinition) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -99,9 +114,8 @@ func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList func (in *CustomResourceDefinitionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -112,6 +126,11 @@ func (in *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinit *out = make([]string, len(*in)) copy(*out, *in) } + if in.Categories != nil { + in, out := &in.Categories, &out.Categories + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -131,12 +150,23 @@ func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefiniti in.Names.DeepCopyInto(&out.Names) if in.Validation != nil { in, out := &in.Validation, &out.Validation - if *in == nil { - *out = nil - } else { - *out = new(CustomResourceValidation) - (*in).DeepCopyInto(*out) - } + *out = new(CustomResourceValidation) + (*in).DeepCopyInto(*out) + } + if in.Subresources != nil { + in, out := &in.Subresources, &out.Subresources + *out = new(CustomResourceSubresources) + (*in).DeepCopyInto(*out) + } + if in.Versions != nil { + in, out := &in.Versions, &out.Versions + *out = make([]CustomResourceDefinitionVersion, len(*in)) + copy(*out, *in) + } + if in.AdditionalPrinterColumns != nil { + in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns + *out = make([]CustomResourceColumnDefinition, len(*in)) + copy(*out, *in) } return } @@ -162,6 +192,11 @@ func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefini } } in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) + if in.StoredVersions != nil { + in, out := &in.StoredVersions, &out.StoredVersions + *out = make([]string, len(*in)) + copy(*out, *in) + } return } @@ -175,17 +210,91 @@ func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionSt return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. +func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { + if in == nil { + return nil + } + out := new(CustomResourceDefinitionVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { + *out = *in + if in.LabelSelectorPath != nil { + in, out := &in.LabelSelectorPath, &out.LabelSelectorPath + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. +func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { + if in == nil { + return nil + } + out := new(CustomResourceSubresourceScale) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. +func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { + if in == nil { + return nil + } + out := new(CustomResourceSubresourceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(CustomResourceSubresourceStatus) + **out = **in + } + if in.Scale != nil { + in, out := &in.Scale, &out.Scale + *out = new(CustomResourceSubresourceScale) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. +func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { + if in == nil { + return nil + } + out := new(CustomResourceSubresources) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { *out = *in if in.OpenAPIV3Schema != nil { in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -216,6 +325,50 @@ func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { + { + in := &in + *out = make(JSONSchemaDefinitions, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. +func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { + if in == nil { + return nil + } + out := new(JSONSchemaDefinitions) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { + { + in := &in + *out = make(JSONSchemaDependencies, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. +func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { + if in == nil { + return nil + } + out := new(JSONSchemaDependencies) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { clone := in.DeepCopy() @@ -228,12 +381,7 @@ func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.JSONSchemas != nil { in, out := &in.JSONSchemas, &out.JSONSchemas @@ -260,12 +408,7 @@ func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -285,12 +428,7 @@ func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStrin *out = *in if in.Schema != nil { in, out := &in.Schema, &out.Schema - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.Property != nil { in, out := &in.Property, &out.Property diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD deleted file mode 100644 index 49323c37a..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/BUILD +++ /dev/null @@ -1,91 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "apiserver.go", - "customresource_discovery.go", - "customresource_discovery_controller.go", - "customresource_handler.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/apiserver", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/validation:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/controller/finalizer:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/controller/status:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresource:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/validation:all-srcs", - ], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["customresource_handler_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apiserver", - deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go index 1415ff8d9..f1fc89ba9 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/apiserver.go @@ -19,13 +19,8 @@ package apiserver import ( "fmt" "net/http" - "os" "time" - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -42,21 +37,19 @@ import ( "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset" internalinformers "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion" + "k8s.io/apiextensions-apiserver/pkg/controller/establish" "k8s.io/apiextensions-apiserver/pkg/controller/finalizer" "k8s.io/apiextensions-apiserver/pkg/controller/status" "k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition" - // make sure the generated client works _ "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" _ "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions" _ "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion" ) var ( - groupFactoryRegistry = make(announced.APIGroupFactoryRegistry) - Registry = registered.NewOrDie("") - Scheme = runtime.NewScheme() - Codecs = serializer.NewCodecFactory(Scheme) + Scheme = runtime.NewScheme() + Codecs = serializer.NewCodecFactory(Scheme) // if you modify this, make sure you update the crEncoder unversionedVersion = schema.GroupVersion{Group: "", Version: "v1"} @@ -71,7 +64,7 @@ var ( ) func init() { - install.Install(groupFactoryRegistry, Registry, Scheme) + install.Install(Scheme) // we need to add the options to empty v1 metav1.AddToGroupVersion(Scheme, schema.GroupVersion{Group: "", Version: "v1"}) @@ -81,6 +74,10 @@ func init() { type ExtraConfig struct { CRDRESTOptionsGetter genericregistry.RESTOptionsGetter + + // MasterCount is used to detect whether cluster is HA, and if it is + // the CRD Establishing will be hold by 5 seconds. + MasterCount int } type Config struct { @@ -133,9 +130,8 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) } apiResourceConfig := c.GenericConfig.MergedResourceConfig - apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(apiextensions.GroupName, Registry, Scheme, metav1.ParameterCodec, Codecs) + apiGroupInfo := genericapiserver.NewDefaultAPIGroupInfo(apiextensions.GroupName, Scheme, metav1.ParameterCodec, Codecs) if apiResourceConfig.VersionEnabled(v1beta1.SchemeGroupVersion) { - apiGroupInfo.GroupMeta.GroupVersion = v1beta1.SchemeGroupVersion storage := map[string]rest.Storage{} // customresourcedefinitions customResourceDefintionStorage := customresourcedefinition.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter) @@ -153,16 +149,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) if err != nil { // it's really bad that this is leaking here, but until we can fix the test (which I'm pretty sure isn't even testing what it wants to test), // we need to be able to move forward - kubeAPIVersions := os.Getenv("KUBE_API_VERSIONS") - if len(kubeAPIVersions) == 0 { - return nil, fmt.Errorf("failed to create clientset: %v", err) - } - - // KUBE_API_VERSIONS is used in test-update-storage-objects.sh, disabling a number of API - // groups. This leads to a nil client above and undefined behaviour further down. - // - // TODO: get rid of KUBE_API_VERSIONS or define sane behaviour if set - glog.Errorf("Failed to create clientset with KUBE_API_VERSIONS=%q. KUBE_API_VERSIONS is only for testing. Things will break.", kubeAPIVersions) + return nil, fmt.Errorf("failed to create clientset: %v", err) } s.Informers = internalinformers.NewSharedInformerFactory(crdClient, 5*time.Minute) @@ -179,24 +166,21 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) discovery: map[string]*discovery.APIGroupHandler{}, delegate: delegateHandler, } + establishingController := establish.NewEstablishingController(s.Informers.Apiextensions().InternalVersion().CustomResourceDefinitions(), crdClient.Apiextensions()) crdHandler := NewCustomResourceDefinitionHandler( versionDiscoveryHandler, groupDiscoveryHandler, - s.GenericAPIServer.RequestContextMapper(), s.Informers.Apiextensions().InternalVersion().CustomResourceDefinitions(), delegateHandler, c.ExtraConfig.CRDRESTOptionsGetter, c.GenericConfig.AdmissionControl, + establishingController, + c.ExtraConfig.MasterCount, ) s.GenericAPIServer.Handler.NonGoRestfulMux.Handle("/apis", crdHandler) s.GenericAPIServer.Handler.NonGoRestfulMux.HandlePrefix("/apis/", crdHandler) - // this only happens when KUBE_API_VERSIONS is set. We must return without adding controllers or poststarthooks which would affect healthz - if crdClient == nil { - return s, nil - } - - crdController := NewDiscoveryController(s.Informers.Apiextensions().InternalVersion().CustomResourceDefinitions(), versionDiscoveryHandler, groupDiscoveryHandler, c.GenericConfig.RequestContextMapper) + crdController := NewDiscoveryController(s.Informers.Apiextensions().InternalVersion().CustomResourceDefinitions(), versionDiscoveryHandler, groupDiscoveryHandler) namingController := status.NewNamingConditionController(s.Informers.Apiextensions().InternalVersion().CustomResourceDefinitions(), crdClient.Apiextensions()) finalizingController := finalizer.NewCRDFinalizer( s.Informers.Apiextensions().InternalVersion().CustomResourceDefinitions(), @@ -211,6 +195,7 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget) s.GenericAPIServer.AddPostStartHook("start-apiextensions-controllers", func(context genericapiserver.PostStartHookContext) error { go crdController.Run(context.StopCh) go namingController.Run(context.StopCh) + go establishingController.Run(context.StopCh) go finalizingController.Run(5, context.StopCh) return nil }) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/converter.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/converter.go new file mode 100644 index 000000000..a66f82969 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/converter.go @@ -0,0 +1,117 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import ( + "fmt" + + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// NewCRDConverter returns a new CRD converter based on the conversion settings in crd object. +func NewCRDConverter(crd *apiextensions.CustomResourceDefinition) (safe, unsafe runtime.ObjectConvertor) { + validVersions := map[schema.GroupVersion]bool{} + for _, version := range crd.Spec.Versions { + validVersions[schema.GroupVersion{Group: crd.Spec.Group, Version: version.Name}] = true + } + + // The only converter right now is nopConverter. More converters will be returned based on the + // CRD object when they introduced. + unsafe = &crdConverter{ + clusterScoped: crd.Spec.Scope == apiextensions.ClusterScoped, + delegate: &nopConverter{ + validVersions: validVersions, + }, + } + return &safeConverterWrapper{unsafe}, unsafe +} + +var _ runtime.ObjectConvertor = &crdConverter{} + +// crdConverter extends the delegate with generic CRD conversion behaviour. The delegate will implement the +// user defined conversion strategy given in the CustomResourceDefinition. +type crdConverter struct { + delegate runtime.ObjectConvertor + clusterScoped bool +} + +func (c *crdConverter) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) { + // We currently only support metadata.namespace and metadata.name. + switch { + case label == "metadata.name": + return label, value, nil + case !c.clusterScoped && label == "metadata.namespace": + return label, value, nil + default: + return "", "", fmt.Errorf("field label not supported: %s", label) + } +} + +func (c *crdConverter) Convert(in, out, context interface{}) error { + return c.delegate.Convert(in, out, context) +} + +// ConvertToVersion converts in object to the given gvk in place and returns the same `in` object. +func (c *crdConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) { + // Run the converter on the list items instead of list itself + if list, ok := in.(*unstructured.UnstructuredList); ok { + for i := range list.Items { + obj, err := c.delegate.ConvertToVersion(&list.Items[i], target) + if err != nil { + return nil, err + } + + u, ok := obj.(*unstructured.Unstructured) + if !ok { + return nil, fmt.Errorf("output type %T in not valid for unstructured conversion", obj) + } + list.Items[i] = *u + } + return list, nil + } + + return c.delegate.ConvertToVersion(in, target) +} + +// safeConverterWrapper is a wrapper over an unsafe object converter that makes copy of the input and then delegate to the unsafe converter. +type safeConverterWrapper struct { + unsafe runtime.ObjectConvertor +} + +var _ runtime.ObjectConvertor = &nopConverter{} + +// ConvertFieldLabel delegate the call to the unsafe converter. +func (c *safeConverterWrapper) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) { + return c.unsafe.ConvertFieldLabel(gvk, label, value) +} + +// Convert makes a copy of in object and then delegate the call to the unsafe converter. +func (c *safeConverterWrapper) Convert(in, out, context interface{}) error { + inObject, ok := in.(runtime.Object) + if !ok { + return fmt.Errorf("input type %T in not valid for object conversion", in) + } + return c.unsafe.Convert(inObject.DeepCopyObject(), out, context) +} + +// ConvertToVersion makes a copy of in object and then delegate the call to the unsafe converter. +func (c *safeConverterWrapper) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) { + return c.unsafe.ConvertToVersion(in.DeepCopyObject(), target) +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/nop_converter.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/nop_converter.go new file mode 100644 index 000000000..7fae81375 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/conversion/nop_converter.go @@ -0,0 +1,79 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package conversion + +import ( + "errors" + "fmt" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// nopConverter is a converter that only sets the apiVersion fields, but does not real conversion. +type nopConverter struct { + validVersions map[schema.GroupVersion]bool +} + +var _ runtime.ObjectConvertor = &nopConverter{} + +func (nopConverter) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) { + return "", "", errors.New("unstructured cannot convert field labels") +} + +func (c *nopConverter) Convert(in, out, context interface{}) error { + unstructIn, ok := in.(*unstructured.Unstructured) + if !ok { + return fmt.Errorf("input type %T in not valid for unstructured conversion", in) + } + + unstructOut, ok := out.(*unstructured.Unstructured) + if !ok { + return fmt.Errorf("output type %T in not valid for unstructured conversion", out) + } + + outGVK := unstructOut.GroupVersionKind() + if !c.validVersions[outGVK.GroupVersion()] { + return fmt.Errorf("request to convert CRD from an invalid group/version: %s", outGVK.String()) + } + inGVK := unstructIn.GroupVersionKind() + if !c.validVersions[inGVK.GroupVersion()] { + return fmt.Errorf("request to convert CRD to an invalid group/version: %s", inGVK.String()) + } + + unstructOut.SetUnstructuredContent(unstructIn.UnstructuredContent()) + _, err := c.ConvertToVersion(unstructOut, outGVK.GroupVersion()) + if err != nil { + return err + } + return nil +} + +func (c *nopConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) { + kind := in.GetObjectKind().GroupVersionKind() + gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{kind}) + if !ok { + // TODO: should this be a typed error? + return nil, fmt.Errorf("%v is unstructured and is not suitable for converting to %q", kind, target) + } + if !c.validVersions[gvk.GroupVersion()] { + return nil, fmt.Errorf("request to convert CRD to an invalid group/version: %s", gvk.String()) + } + in.GetObjectKind().SetGroupVersionKind(gvk) + return in, nil +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go index 85a2a27d0..e3b3d0a44 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_discovery_controller.go @@ -18,17 +18,19 @@ package apiserver import ( "fmt" + "sort" "time" "github.com/golang/glog" + autoscaling "k8s.io/api/autoscaling/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/version" "k8s.io/apiserver/pkg/endpoints/discovery" - "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" @@ -40,7 +42,6 @@ import ( type DiscoveryController struct { versionHandler *versionDiscoveryHandler groupHandler *groupDiscoveryHandler - contextMapper request.RequestContextMapper crdLister listers.CustomResourceDefinitionLister crdsSynced cache.InformerSynced @@ -51,13 +52,12 @@ type DiscoveryController struct { queue workqueue.RateLimitingInterface } -func NewDiscoveryController(crdInformer informers.CustomResourceDefinitionInformer, versionHandler *versionDiscoveryHandler, groupHandler *groupDiscoveryHandler, contextMapper request.RequestContextMapper) *DiscoveryController { +func NewDiscoveryController(crdInformer informers.CustomResourceDefinitionInformer, versionHandler *versionDiscoveryHandler, groupHandler *groupDiscoveryHandler) *DiscoveryController { c := &DiscoveryController{ versionHandler: versionHandler, groupHandler: groupHandler, crdLister: crdInformer.Lister(), crdsSynced: crdInformer.Informer().HasSynced, - contextMapper: contextMapper, queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "DiscoveryController"), } @@ -77,6 +77,7 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { apiVersionsForDiscovery := []metav1.GroupVersionForDiscovery{} apiResourcesForDiscovery := []metav1.APIResource{} + versionsForDiscoveryMap := map[metav1.GroupVersion]bool{} crds, err := c.crdLister.List(labels.Everything()) if err != nil { @@ -92,13 +93,29 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { if crd.Spec.Group != version.Group { continue } - foundGroup = true - apiVersionsForDiscovery = append(apiVersionsForDiscovery, metav1.GroupVersionForDiscovery{ - GroupVersion: crd.Spec.Group + "/" + crd.Spec.Version, - Version: crd.Spec.Version, - }) - if crd.Spec.Version != version.Version { + foundThisVersion := false + for _, v := range crd.Spec.Versions { + if !v.Served { + continue + } + // If there is any Served version, that means the group should show up in discovery + foundGroup = true + + gv := metav1.GroupVersion{Group: crd.Spec.Group, Version: v.Name} + if !versionsForDiscoveryMap[gv] { + versionsForDiscoveryMap[gv] = true + apiVersionsForDiscovery = append(apiVersionsForDiscovery, metav1.GroupVersionForDiscovery{ + GroupVersion: crd.Spec.Group + "/" + v.Name, + Version: v.Name, + }) + } + if v.Name == version.Version { + foundThisVersion = true + } + } + + if !foundThisVersion { continue } foundVersion = true @@ -116,7 +133,28 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { Kind: crd.Status.AcceptedNames.Kind, Verbs: verbs, ShortNames: crd.Status.AcceptedNames.ShortNames, + Categories: crd.Status.AcceptedNames.Categories, }) + + if crd.Spec.Subresources != nil && crd.Spec.Subresources.Status != nil { + apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ + Name: crd.Status.AcceptedNames.Plural + "/status", + Namespaced: crd.Spec.Scope == apiextensions.NamespaceScoped, + Kind: crd.Status.AcceptedNames.Kind, + Verbs: metav1.Verbs([]string{"get", "patch", "update"}), + }) + } + + if crd.Spec.Subresources != nil && crd.Spec.Subresources.Scale != nil { + apiResourcesForDiscovery = append(apiResourcesForDiscovery, metav1.APIResource{ + Group: autoscaling.GroupName, + Version: "v1", + Kind: "Scale", + Name: crd.Status.AcceptedNames.Plural + "/scale", + Namespaced: crd.Spec.Scope == apiextensions.NamespaceScoped, + Verbs: metav1.Verbs([]string{"get", "patch", "update"}), + }) + } } if !foundGroup { @@ -125,13 +163,16 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { return nil } + sortGroupDiscoveryByKubeAwareVersion(apiVersionsForDiscovery) + apiGroup := metav1.APIGroup{ Name: version.Group, Versions: apiVersionsForDiscovery, - // the preferred versions for a group is arbitrary since there cannot be duplicate resources + // the preferred versions for a group is the first item in + // apiVersionsForDiscovery after it put in the right ordered PreferredVersion: apiVersionsForDiscovery[0], } - c.groupHandler.setDiscovery(version.Group, discovery.NewAPIGroupHandler(Codecs, apiGroup, c.contextMapper)) + c.groupHandler.setDiscovery(version.Group, discovery.NewAPIGroupHandler(Codecs, apiGroup)) if !foundVersion { c.versionHandler.unsetDiscovery(version) @@ -139,11 +180,17 @@ func (c *DiscoveryController) sync(version schema.GroupVersion) error { } c.versionHandler.setDiscovery(version, discovery.NewAPIVersionHandler(Codecs, version, discovery.APIResourceListerFunc(func() []metav1.APIResource { return apiResourcesForDiscovery - }), c.contextMapper)) + }))) return nil } +func sortGroupDiscoveryByKubeAwareVersion(gd []metav1.GroupVersionForDiscovery) { + sort.Slice(gd, func(i, j int) bool { + return version.CompareKubeAwareVersionStrings(gd[i].Version, gd[j].Version) > 0 + }) +} + func (c *DiscoveryController) Run(stopCh <-chan struct{}) { defer utilruntime.HandleCrash() defer c.queue.ShutDown() @@ -188,7 +235,9 @@ func (c *DiscoveryController) processNextWorkItem() bool { } func (c *DiscoveryController) enqueue(obj *apiextensions.CustomResourceDefinition) { - c.queue.Add(schema.GroupVersion{Group: obj.Spec.Group, Version: obj.Spec.Version}) + for _, v := range obj.Spec.Versions { + c.queue.Add(schema.GroupVersion{Group: obj.Spec.Group, Version: v.Name}) + } } func (c *DiscoveryController) addCustomResourceDefinition(obj interface{}) { @@ -197,10 +246,14 @@ func (c *DiscoveryController) addCustomResourceDefinition(obj interface{}) { c.enqueue(castObj) } -func (c *DiscoveryController) updateCustomResourceDefinition(obj, _ interface{}) { - castObj := obj.(*apiextensions.CustomResourceDefinition) - glog.V(4).Infof("Updating customresourcedefinition %s", castObj.Name) - c.enqueue(castObj) +func (c *DiscoveryController) updateCustomResourceDefinition(oldObj, newObj interface{}) { + castNewObj := newObj.(*apiextensions.CustomResourceDefinition) + castOldObj := oldObj.(*apiextensions.CustomResourceDefinition) + glog.V(4).Infof("Updating customresourcedefinition %s", castOldObj.Name) + // Enqueue both old and new object to make sure we remove and add appropriate Versions. + // The working queue will resolve any duplicates and only changes will stay in the queue. + c.enqueue(castNewObj) + c.enqueue(castOldObj) } func (c *DiscoveryController) deleteCustomResourceDefinition(obj interface{}) { diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go index 624565a1c..697c5e591 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler.go @@ -25,6 +25,9 @@ import ( "sync/atomic" "time" + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/golang/glog" apiequality "k8s.io/apimachinery/pkg/api/equality" @@ -35,6 +38,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/apimachinery/pkg/runtime/serializer/versioning" "k8s.io/apimachinery/pkg/types" @@ -47,15 +51,22 @@ import ( "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" "k8s.io/apiserver/pkg/storage/storagebackend" - "k8s.io/client-go/discovery" + utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/client-go/scale" + "k8s.io/client-go/scale/scheme/autoscalingv1" "k8s.io/client-go/tools/cache" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" apiservervalidation "k8s.io/apiextensions-apiserver/pkg/apiserver/validation" informers "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion" listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion" + "k8s.io/apiextensions-apiserver/pkg/controller/establish" "k8s.io/apiextensions-apiserver/pkg/controller/finalizer" + "k8s.io/apiextensions-apiserver/pkg/crdserverscheme" + apiextensionsfeatures "k8s.io/apiextensions-apiserver/pkg/features" "k8s.io/apiextensions-apiserver/pkg/registry/customresource" + "k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor" ) // crdHandler serves the `/apis` endpoint. @@ -71,13 +82,17 @@ type crdHandler struct { // which is suited for most read and rarely write cases customStorage atomic.Value - requestContextMapper apirequest.RequestContextMapper - crdLister listers.CustomResourceDefinitionLister delegate http.Handler restOptionsGetter generic.RESTOptionsGetter admission admission.Interface + + establishingController *establish.EstablishingController + + // MasterCount is used to implement sleep to improve + // CRD establishing process for HA clusters. + masterCount int } // crdInfo stores enough information to serve the storage for the custom resource @@ -87,8 +102,20 @@ type crdInfo struct { spec *apiextensions.CustomResourceDefinitionSpec acceptedNames *apiextensions.CustomResourceDefinitionNames - storage *customresource.REST - requestScope handlers.RequestScope + // Storage per version + storages map[string]customresource.CustomResourceStorage + + // Request scope per version + requestScopes map[string]handlers.RequestScope + + // Scale scope per version + scaleRequestScopes map[string]handlers.RequestScope + + // Status scope per version + statusRequestScopes map[string]handlers.RequestScope + + // storageVersion is the CRD version used when storing the object in etcd. + storageVersion string } // crdStorageMap goes from customresourcedefinition to its storage @@ -97,22 +124,23 @@ type crdStorageMap map[types.UID]*crdInfo func NewCustomResourceDefinitionHandler( versionDiscoveryHandler *versionDiscoveryHandler, groupDiscoveryHandler *groupDiscoveryHandler, - requestContextMapper apirequest.RequestContextMapper, crdInformer informers.CustomResourceDefinitionInformer, delegate http.Handler, restOptionsGetter generic.RESTOptionsGetter, - admission admission.Interface) *crdHandler { + admission admission.Interface, + establishingController *establish.EstablishingController, + masterCount int) *crdHandler { ret := &crdHandler{ versionDiscoveryHandler: versionDiscoveryHandler, groupDiscoveryHandler: groupDiscoveryHandler, customStorage: atomic.Value{}, - requestContextMapper: requestContextMapper, crdLister: crdInformer.Lister(), delegate: delegate, restOptionsGetter: restOptionsGetter, admission: admission, + establishingController: establishingController, + masterCount: masterCount, } - crdInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ UpdateFunc: ret.updateCustomResourceDefinition, DeleteFunc: func(obj interface{}) { @@ -126,11 +154,7 @@ func NewCustomResourceDefinitionHandler( } func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - ctx, ok := r.requestContextMapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, fmt.Errorf("no context found for request")) - return - } + ctx := req.Context() requestInfo, ok := apirequest.RequestInfoFrom(ctx) if !ok { responsewriters.InternalError(w, req, fmt.Errorf("no RequestInfo found in the context")) @@ -164,18 +188,19 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - if crd.Spec.Version != requestInfo.APIVersion { + if !apiextensions.HasServedCRDVersion(crd, requestInfo.APIVersion) { r.delegate.ServeHTTP(w, req) return } - if !apiextensions.IsCRDConditionTrue(crd, apiextensions.Established) { + // There is a small chance that a CRD is being served because NamesAccepted condition is true, + // but it becomes "unserved" because another names update leads to a conflict + // and EstablishingController wasn't fast enough to put the CRD into the Established condition. + // We accept this as the problem is small and self-healing. + if !apiextensions.IsCRDConditionTrue(crd, apiextensions.NamesAccepted) && + !apiextensions.IsCRDConditionTrue(crd, apiextensions.Established) { r.delegate.ServeHTTP(w, req) return } - if len(requestInfo.Subresource) > 0 { - http.NotFound(w, req) - return - } terminating := apiextensions.IsCRDConditionTrue(crd, apiextensions.Terminating) @@ -185,61 +210,102 @@ func (r *crdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } - storage := crdInfo.storage - requestScope := crdInfo.requestScope - minRequestTimeout := 1 * time.Minute - verb := strings.ToUpper(requestInfo.Verb) resource := requestInfo.Resource subresource := requestInfo.Subresource scope := metrics.CleanScope(requestInfo) + supportedTypes := []string{ + string(types.JSONPatchType), + string(types.MergePatchType), + } var handler http.HandlerFunc + switch { + case subresource == "status" && crd.Spec.Subresources != nil && crd.Spec.Subresources.Status != nil: + handler = r.serveStatus(w, req, requestInfo, crdInfo, terminating, supportedTypes) + case subresource == "scale" && crd.Spec.Subresources != nil && crd.Spec.Subresources.Scale != nil: + handler = r.serveScale(w, req, requestInfo, crdInfo, terminating, supportedTypes) + case len(subresource) == 0: + handler = r.serveResource(w, req, requestInfo, crdInfo, terminating, supportedTypes) + default: + http.Error(w, "the server could not find the requested resource", http.StatusNotFound) + } + + if handler != nil { + handler = metrics.InstrumentHandlerFunc(verb, resource, subresource, scope, handler) + handler(w, req) + return + } +} + +func (r *crdHandler) serveResource(w http.ResponseWriter, req *http.Request, requestInfo *apirequest.RequestInfo, crdInfo *crdInfo, terminating bool, supportedTypes []string) http.HandlerFunc { + requestScope := crdInfo.requestScopes[requestInfo.APIVersion] + storage := crdInfo.storages[requestInfo.APIVersion].CustomResource + minRequestTimeout := 1 * time.Minute switch requestInfo.Verb { case "get": - handler = handlers.GetResource(storage, storage, requestScope) + return handlers.GetResource(storage, storage, requestScope) case "list": forceWatch := false - handler = handlers.ListResource(storage, storage, requestScope, forceWatch, minRequestTimeout) + return handlers.ListResource(storage, storage, requestScope, forceWatch, minRequestTimeout) case "watch": forceWatch := true - handler = handlers.ListResource(storage, storage, requestScope, forceWatch, minRequestTimeout) + return handlers.ListResource(storage, storage, requestScope, forceWatch, minRequestTimeout) case "create": if terminating { http.Error(w, fmt.Sprintf("%v not allowed while CustomResourceDefinition is terminating", requestInfo.Verb), http.StatusMethodNotAllowed) - return + return nil } - handler = handlers.CreateResource(storage, requestScope, discovery.NewUnstructuredObjectTyper(nil), r.admission) + return handlers.CreateResource(storage, requestScope, r.admission) case "update": - if terminating { - http.Error(w, fmt.Sprintf("%v not allowed while CustomResourceDefinition is terminating", requestInfo.Verb), http.StatusMethodNotAllowed) - return - } - handler = handlers.UpdateResource(storage, requestScope, discovery.NewUnstructuredObjectTyper(nil), r.admission) + return handlers.UpdateResource(storage, requestScope, r.admission) case "patch": - if terminating { - http.Error(w, fmt.Sprintf("%v not allowed while CustomResourceDefinition is terminating", requestInfo.Verb), http.StatusMethodNotAllowed) - return - } - supportedTypes := []string{ - string(types.JSONPatchType), - string(types.MergePatchType), - } - handler = handlers.PatchResource(storage, requestScope, r.admission, unstructured.UnstructuredObjectConverter{}, supportedTypes) + return handlers.PatchResource(storage, requestScope, r.admission, supportedTypes) case "delete": allowsOptions := true - handler = handlers.DeleteResource(storage, allowsOptions, requestScope, r.admission) + return handlers.DeleteResource(storage, allowsOptions, requestScope, r.admission) case "deletecollection": checkBody := true - handler = handlers.DeleteCollection(storage, checkBody, requestScope, r.admission) + return handlers.DeleteCollection(storage, checkBody, requestScope, r.admission) default: http.Error(w, fmt.Sprintf("unhandled verb %q", requestInfo.Verb), http.StatusMethodNotAllowed) - return + return nil + } +} + +func (r *crdHandler) serveStatus(w http.ResponseWriter, req *http.Request, requestInfo *apirequest.RequestInfo, crdInfo *crdInfo, terminating bool, supportedTypes []string) http.HandlerFunc { + requestScope := crdInfo.statusRequestScopes[requestInfo.APIVersion] + storage := crdInfo.storages[requestInfo.APIVersion].Status + + switch requestInfo.Verb { + case "get": + return handlers.GetResource(storage, nil, requestScope) + case "update": + return handlers.UpdateResource(storage, requestScope, r.admission) + case "patch": + return handlers.PatchResource(storage, requestScope, r.admission, supportedTypes) + default: + http.Error(w, fmt.Sprintf("unhandled verb %q", requestInfo.Verb), http.StatusMethodNotAllowed) + return nil + } +} + +func (r *crdHandler) serveScale(w http.ResponseWriter, req *http.Request, requestInfo *apirequest.RequestInfo, crdInfo *crdInfo, terminating bool, supportedTypes []string) http.HandlerFunc { + requestScope := crdInfo.scaleRequestScopes[requestInfo.APIVersion] + storage := crdInfo.storages[requestInfo.APIVersion].Scale + + switch requestInfo.Verb { + case "get": + return handlers.GetResource(storage, nil, requestScope) + case "update": + return handlers.UpdateResource(storage, requestScope, r.admission) + case "patch": + return handlers.PatchResource(storage, requestScope, r.admission, supportedTypes) + default: + http.Error(w, fmt.Sprintf("unhandled verb %q", requestInfo.Verb), http.StatusMethodNotAllowed) + return nil } - handler = metrics.InstrumentHandlerFunc(verb, resource, subresource, scope, handler) - handler(w, req) - return } func (r *crdHandler) updateCustomResourceDefinition(oldObj, newObj interface{}) { @@ -249,6 +315,19 @@ func (r *crdHandler) updateCustomResourceDefinition(oldObj, newObj interface{}) r.customStorageLock.Lock() defer r.customStorageLock.Unlock() + // Add CRD to the establishing controller queue. + // For HA clusters, we want to prevent race conditions when changing status to Established, + // so we want to be sure that CRD is Installing at least for 5 seconds before Establishing it. + // TODO: find a real HA safe checkpointing mechanism instead of an arbitrary wait. + if !apiextensions.IsCRDConditionTrue(newCRD, apiextensions.Established) && + apiextensions.IsCRDConditionTrue(newCRD, apiextensions.NamesAccepted) { + if r.masterCount > 1 { + r.establishingController.QueueCRD(newCRD.Name, 5*time.Second) + } else { + r.establishingController.QueueCRD(newCRD.Name, 0) + } + } + storageMap := r.customStorage.Load().(crdStorageMap) oldInfo, found := storageMap[newCRD.UID] if !found { @@ -265,7 +344,10 @@ func (r *crdHandler) updateCustomResourceDefinition(oldObj, newObj interface{}) // as it is used without locking elsewhere. storageMap2 := storageMap.clone() if oldInfo, ok := storageMap2[types.UID(oldCRD.UID)]; ok { - oldInfo.storage.DestroyFunc() + for _, storage := range oldInfo.storages { + // destroy only the main storage. Those for the subresources share cacher and etcd clients. + storage.CustomResource.DestroyFunc() + } delete(storageMap2, types.UID(oldCRD.UID)) } @@ -296,8 +378,11 @@ func (r *crdHandler) removeDeadStorage() { } } if !found { - glog.V(4).Infof("Removing dead CRD storage for %v", s.requestScope.Resource) - s.storage.DestroyFunc() + glog.V(4).Infof("Removing dead CRD storage for %s/%s", s.spec.Group, s.spec.Names.Kind) + for _, storage := range s.storages { + // destroy only the main storage. Those for the subresources share cacher and etcd clients. + storage.CustomResource.DestroyFunc() + } delete(storageMap2, uid) } } @@ -311,9 +396,11 @@ func (r *crdHandler) GetCustomResourceListerCollectionDeleter(crd *apiextensions if err != nil { return nil, err } - return info.storage, nil + return info.storages[info.storageVersion].CustomResource, nil } +var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() + func (r *crdHandler) getOrCreateServingInfoFor(crd *apiextensions.CustomResourceDefinition) (*crdInfo, error) { storageMap := r.customStorage.Load().(crdStorageMap) if ret, ok := storageMap[crd.UID]; ok { @@ -328,91 +415,157 @@ func (r *crdHandler) getOrCreateServingInfoFor(crd *apiextensions.CustomResource return ret, nil } - // In addition to Unstructured objects (Custom Resources), we also may sometimes need to - // decode unversioned Options objects, so we delegate to parameterScheme for such types. - parameterScheme := runtime.NewScheme() - parameterScheme.AddUnversionedTypes(schema.GroupVersion{Group: crd.Spec.Group, Version: crd.Spec.Version}, - &metav1.ListOptions{}, - &metav1.ExportOptions{}, - &metav1.GetOptions{}, - &metav1.DeleteOptions{}, - ) - parameterCodec := runtime.NewParameterCodec(parameterScheme) - - kind := schema.GroupVersionKind{Group: crd.Spec.Group, Version: crd.Spec.Version, Kind: crd.Status.AcceptedNames.Kind} - typer := unstructuredObjectTyper{ - delegate: parameterScheme, - unstructuredTyper: discovery.NewUnstructuredObjectTyper(nil), - } - creator := unstructuredCreator{} - - validator, err := apiservervalidation.NewSchemaValidator(crd.Spec.Validation) + storageVersion, err := apiextensions.GetCRDStorageVersion(crd) if err != nil { return nil, err } - storage := customresource.NewREST( - schema.GroupResource{Group: crd.Spec.Group, Resource: crd.Status.AcceptedNames.Plural}, - schema.GroupVersionKind{Group: crd.Spec.Group, Version: crd.Spec.Version, Kind: crd.Status.AcceptedNames.ListKind}, - customresource.NewStrategy( - typer, - crd.Spec.Scope == apiextensions.NamespaceScoped, - kind, - validator, - ), - r.restOptionsGetter, - ) - - selfLinkPrefix := "" - switch crd.Spec.Scope { - case apiextensions.ClusterScoped: - selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, crd.Spec.Version) + "/" + crd.Status.AcceptedNames.Plural + "/" - case apiextensions.NamespaceScoped: - selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, crd.Spec.Version, "namespaces") + "/" - } - - clusterScoped := crd.Spec.Scope == apiextensions.ClusterScoped - - requestScope := handlers.RequestScope{ - Namer: handlers.ContextBasedNaming{ - GetContext: func(req *http.Request) apirequest.Context { - ret, _ := r.requestContextMapper.Get(req) - return ret + // Scope/Storages per version. + requestScopes := map[string]handlers.RequestScope{} + storages := map[string]customresource.CustomResourceStorage{} + statusScopes := map[string]handlers.RequestScope{} + scaleScopes := map[string]handlers.RequestScope{} + + for _, v := range crd.Spec.Versions { + safeConverter, unsafeConverter := conversion.NewCRDConverter(crd) + // In addition to Unstructured objects (Custom Resources), we also may sometimes need to + // decode unversioned Options objects, so we delegate to parameterScheme for such types. + parameterScheme := runtime.NewScheme() + parameterScheme.AddUnversionedTypes(schema.GroupVersion{Group: crd.Spec.Group, Version: v.Name}, + &metav1.ListOptions{}, + &metav1.ExportOptions{}, + &metav1.GetOptions{}, + &metav1.DeleteOptions{}, + ) + parameterCodec := runtime.NewParameterCodec(parameterScheme) + + kind := schema.GroupVersionKind{Group: crd.Spec.Group, Version: v.Name, Kind: crd.Status.AcceptedNames.Kind} + typer := newUnstructuredObjectTyper(parameterScheme) + creator := unstructuredCreator{} + + validator, _, err := apiservervalidation.NewSchemaValidator(crd.Spec.Validation) + if err != nil { + return nil, err + } + + var statusSpec *apiextensions.CustomResourceSubresourceStatus + var statusValidator *validate.SchemaValidator + if utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) && crd.Spec.Subresources != nil && crd.Spec.Subresources.Status != nil { + statusSpec = crd.Spec.Subresources.Status + + // for the status subresource, validate only against the status schema + if crd.Spec.Validation != nil && crd.Spec.Validation.OpenAPIV3Schema != nil && crd.Spec.Validation.OpenAPIV3Schema.Properties != nil { + if statusSchema, ok := crd.Spec.Validation.OpenAPIV3Schema.Properties["status"]; ok { + openapiSchema := &spec.Schema{} + if err := apiservervalidation.ConvertJSONSchemaProps(&statusSchema, openapiSchema); err != nil { + return nil, err + } + statusValidator = validate.NewSchemaValidator(openapiSchema, nil, "", strfmt.Default) + } + } + } + + var scaleSpec *apiextensions.CustomResourceSubresourceScale + if utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) && crd.Spec.Subresources != nil && crd.Spec.Subresources.Scale != nil { + scaleSpec = crd.Spec.Subresources.Scale + } + + table, err := tableconvertor.New(crd.Spec.AdditionalPrinterColumns) + if err != nil { + glog.V(2).Infof("The CRD for %v has an invalid printer specification, falling back to default printing: %v", kind, err) + } + + storages[v.Name] = customresource.NewStorage( + schema.GroupResource{Group: crd.Spec.Group, Resource: crd.Status.AcceptedNames.Plural}, + schema.GroupVersionKind{Group: crd.Spec.Group, Version: v.Name, Kind: crd.Status.AcceptedNames.ListKind}, + customresource.NewStrategy( + typer, + crd.Spec.Scope == apiextensions.NamespaceScoped, + kind, + validator, + statusValidator, + statusSpec, + scaleSpec, + ), + crdConversionRESTOptionsGetter{ + RESTOptionsGetter: r.restOptionsGetter, + converter: safeConverter, + decoderVersion: schema.GroupVersion{Group: crd.Spec.Group, Version: v.Name}, + encoderVersion: schema.GroupVersion{Group: crd.Spec.Group, Version: storageVersion}, }, - SelfLinker: meta.NewAccessor(), - ClusterScoped: clusterScoped, - SelfLinkPathPrefix: selfLinkPrefix, - }, - ContextFunc: func(req *http.Request) apirequest.Context { - ret, _ := r.requestContextMapper.Get(req) - return ret - }, + crd.Status.AcceptedNames.Categories, + table, + ) + + selfLinkPrefix := "" + switch crd.Spec.Scope { + case apiextensions.ClusterScoped: + selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, v.Name) + "/" + crd.Status.AcceptedNames.Plural + "/" + case apiextensions.NamespaceScoped: + selfLinkPrefix = "/" + path.Join("apis", crd.Spec.Group, v.Name, "namespaces") + "/" + } - Serializer: unstructuredNegotiatedSerializer{typer: typer, creator: creator}, - ParameterCodec: parameterCodec, + clusterScoped := crd.Spec.Scope == apiextensions.ClusterScoped - Creater: creator, - Convertor: crdObjectConverter{ - UnstructuredObjectConverter: unstructured.UnstructuredObjectConverter{}, - clusterScoped: clusterScoped, - }, - Defaulter: unstructuredDefaulter{parameterScheme}, - Typer: typer, - UnsafeConvertor: unstructured.UnstructuredObjectConverter{}, + requestScopes[v.Name] = handlers.RequestScope{ + Namer: handlers.ContextBasedNaming{ + SelfLinker: meta.NewAccessor(), + ClusterScoped: clusterScoped, + SelfLinkPathPrefix: selfLinkPrefix, + }, + Serializer: unstructuredNegotiatedSerializer{typer: typer, creator: creator, converter: safeConverter}, + ParameterCodec: parameterCodec, + + Creater: creator, + Convertor: safeConverter, + Defaulter: unstructuredDefaulter{parameterScheme}, + Typer: typer, + UnsafeConvertor: unsafeConverter, + + Resource: schema.GroupVersionResource{Group: crd.Spec.Group, Version: v.Name, Resource: crd.Status.AcceptedNames.Plural}, + Kind: kind, - Resource: schema.GroupVersionResource{Group: crd.Spec.Group, Version: crd.Spec.Version, Resource: crd.Status.AcceptedNames.Plural}, - Kind: kind, - Subresource: "", + MetaGroupVersion: metav1.SchemeGroupVersion, + + TableConvertor: storages[v.Name].CustomResource, + } + + // override scaleSpec subresource values + // shallow copy + scaleScope := requestScopes[v.Name] + scaleConverter := scale.NewScaleConverter() + scaleScope.Subresource = "scale" + scaleScope.Serializer = serializer.NewCodecFactory(scaleConverter.Scheme()) + scaleScope.Kind = autoscalingv1.SchemeGroupVersion.WithKind("Scale") + scaleScope.Namer = handlers.ContextBasedNaming{ + SelfLinker: meta.NewAccessor(), + ClusterScoped: clusterScoped, + SelfLinkPathPrefix: selfLinkPrefix, + SelfLinkPathSuffix: "/scale", + } + scaleScopes[v.Name] = scaleScope - MetaGroupVersion: metav1.SchemeGroupVersion, + // override status subresource values + // shallow copy + statusScope := requestScopes[v.Name] + statusScope.Subresource = "status" + statusScope.Namer = handlers.ContextBasedNaming{ + SelfLinker: meta.NewAccessor(), + ClusterScoped: clusterScoped, + SelfLinkPathPrefix: selfLinkPrefix, + SelfLinkPathSuffix: "/status", + } + statusScopes[v.Name] = statusScope } ret := &crdInfo{ - spec: &crd.Spec, - acceptedNames: &crd.Status.AcceptedNames, - - storage: storage, - requestScope: requestScope, + spec: &crd.Spec, + acceptedNames: &crd.Status.AcceptedNames, + storages: storages, + requestScopes: requestScopes, + scaleRequestScopes: scaleScopes, + statusRequestScopes: statusScopes, + storageVersion: storageVersion, } // Copy because we cannot write to storageMap without a race @@ -425,27 +578,10 @@ func (r *crdHandler) getOrCreateServingInfoFor(crd *apiextensions.CustomResource return ret, nil } -// crdObjectConverter is a converter that supports field selectors for CRDs. -type crdObjectConverter struct { - unstructured.UnstructuredObjectConverter - clusterScoped bool -} - -func (c crdObjectConverter) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - // We currently only support metadata.namespace and metadata.name. - switch { - case label == "metadata.name": - return label, value, nil - case !c.clusterScoped && label == "metadata.namespace": - return label, value, nil - default: - return "", "", fmt.Errorf("field label not supported: %s", label) - } -} - type unstructuredNegotiatedSerializer struct { - typer runtime.ObjectTyper - creator runtime.ObjectCreater + typer runtime.ObjectTyper + creator runtime.ObjectCreater + converter runtime.ObjectConvertor } func (s unstructuredNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { @@ -470,28 +606,36 @@ func (s unstructuredNegotiatedSerializer) SupportedMediaTypes() []runtime.Serial } func (s unstructuredNegotiatedSerializer) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { - return versioning.NewDefaultingCodecForScheme(Scheme, encoder, nil, gv, nil) + return versioning.NewCodec(encoder, nil, s.converter, Scheme, Scheme, Scheme, gv, nil, "crdNegotiatedSerializer") } func (s unstructuredNegotiatedSerializer) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { - return versioning.NewDefaultingCodecForScheme(Scheme, nil, decoder, nil, gv) + d := schemaCoercingDecoder{delegate: decoder, validator: unstructuredSchemaCoercer{}} + return versioning.NewDefaultingCodecForScheme(Scheme, nil, d, nil, gv) +} + +type UnstructuredObjectTyper struct { + Delegate runtime.ObjectTyper + UnstructuredTyper runtime.ObjectTyper } -type unstructuredObjectTyper struct { - delegate runtime.ObjectTyper - unstructuredTyper runtime.ObjectTyper +func newUnstructuredObjectTyper(Delegate runtime.ObjectTyper) UnstructuredObjectTyper { + return UnstructuredObjectTyper{ + Delegate: Delegate, + UnstructuredTyper: crdserverscheme.NewUnstructuredObjectTyper(), + } } -func (t unstructuredObjectTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { +func (t UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { // Delegate for things other than Unstructured. if _, ok := obj.(runtime.Unstructured); !ok { - return t.delegate.ObjectKinds(obj) + return t.Delegate.ObjectKinds(obj) } - return t.unstructuredTyper.ObjectKinds(obj) + return t.UnstructuredTyper.ObjectKinds(obj) } -func (t unstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { - return t.delegate.Recognizes(gvk) || t.unstructuredTyper.Recognizes(gvk) +func (t UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { + return t.Delegate.Recognizes(gvk) || t.UnstructuredTyper.Recognizes(gvk) } type unstructuredCreator struct{} @@ -520,6 +664,7 @@ type CRDRESTOptionsGetter struct { DefaultWatchCacheSize int EnableGarbageCollection bool DeleteCollectionWorkers int + CountMetricPollPeriod time.Duration } func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (generic.RESTOptions, error) { @@ -529,6 +674,7 @@ func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (gen EnableGarbageCollection: t.EnableGarbageCollection, DeleteCollectionWorkers: t.DeleteCollectionWorkers, ResourcePrefix: resource.Group + "/" + resource.Resource, + CountMetricPollPeriod: t.CountMetricPollPeriod, } if t.EnableWatchCache { ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize) @@ -548,3 +694,202 @@ func (in crdStorageMap) clone() crdStorageMap { } return out } + +// crdConversionRESTOptionsGetter overrides the codec with one using the +// provided custom converter and custom encoder and decoder version. +type crdConversionRESTOptionsGetter struct { + generic.RESTOptionsGetter + converter runtime.ObjectConvertor + encoderVersion schema.GroupVersion + decoderVersion schema.GroupVersion +} + +func (t crdConversionRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (generic.RESTOptions, error) { + ret, err := t.RESTOptionsGetter.GetRESTOptions(resource) + if err == nil { + d := schemaCoercingDecoder{delegate: ret.StorageConfig.Codec, validator: unstructuredSchemaCoercer{ + // drop invalid fields while decoding old CRs (before we had any ObjectMeta validation) + dropInvalidMetadata: true, + }} + c := schemaCoercingConverter{delegate: t.converter, validator: unstructuredSchemaCoercer{}} + ret.StorageConfig.Codec = versioning.NewCodec( + ret.StorageConfig.Codec, + d, + c, + &unstructuredCreator{}, + crdserverscheme.NewUnstructuredObjectTyper(), + &unstructuredDefaulter{delegate: Scheme}, + t.encoderVersion, + t.decoderVersion, + "crdRESTOptions", + ) + } + return ret, err +} + +// schemaCoercingDecoder calls the delegate decoder, and then applies the Unstructured schema validator +// to coerce the schema. +type schemaCoercingDecoder struct { + delegate runtime.Decoder + validator unstructuredSchemaCoercer +} + +var _ runtime.Decoder = schemaCoercingDecoder{} + +func (d schemaCoercingDecoder) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { + obj, gvk, err := d.delegate.Decode(data, defaults, into) + if err != nil { + return nil, gvk, err + } + if u, ok := obj.(*unstructured.Unstructured); ok { + if err := d.validator.apply(u); err != nil { + return nil, gvk, err + } + } + + return obj, gvk, nil +} + +// schemaCoercingConverter calls the delegate converter and applies the Unstructured validator to +// coerce the schema. +type schemaCoercingConverter struct { + delegate runtime.ObjectConvertor + validator unstructuredSchemaCoercer +} + +var _ runtime.ObjectConvertor = schemaCoercingConverter{} + +func (v schemaCoercingConverter) Convert(in, out, context interface{}) error { + if err := v.delegate.Convert(in, out, context); err != nil { + return err + } + + if u, ok := out.(*unstructured.Unstructured); ok { + if err := v.validator.apply(u); err != nil { + return err + } + } + + return nil +} + +func (v schemaCoercingConverter) ConvertToVersion(in runtime.Object, gv runtime.GroupVersioner) (runtime.Object, error) { + out, err := v.delegate.ConvertToVersion(in, gv) + if err != nil { + return nil, err + } + + if u, ok := out.(*unstructured.Unstructured); ok { + if err := v.validator.apply(u); err != nil { + return nil, err + } + } + + return out, nil +} + +func (v schemaCoercingConverter) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) { + return v.delegate.ConvertFieldLabel(gvk, label, value) +} + +// unstructuredSchemaCoercer does the validation for Unstructured that json.Unmarshal +// does for native types. This includes: +// - validating and pruning ObjectMeta (here with optional error instead of pruning) +// - TODO: application of an OpenAPI validator (against the whole object or a top-level field of it). +// - TODO: optionally application of post-validation algorithms like defaulting and/or OpenAPI based pruning. +type unstructuredSchemaCoercer struct { + dropInvalidMetadata bool +} + +func (v *unstructuredSchemaCoercer) apply(u *unstructured.Unstructured) error { + // save implicit meta fields that don't have to be specified in the validation spec + kind, foundKind, err := unstructured.NestedString(u.UnstructuredContent(), "kind") + if err != nil { + return err + } + apiVersion, foundApiVersion, err := unstructured.NestedString(u.UnstructuredContent(), "apiVersion") + if err != nil { + return err + } + objectMeta, foundObjectMeta, err := getObjectMeta(u, v.dropInvalidMetadata) + if err != nil { + return err + } + + // restore meta fields, starting clean + if foundKind { + u.SetKind(kind) + } + if foundApiVersion { + u.SetAPIVersion(apiVersion) + } + if foundObjectMeta { + if err := setObjectMeta(u, objectMeta); err != nil { + return err + } + } + + return nil +} + +var encodingjson = json.CaseSensitiveJsonIterator() + +func getObjectMeta(u *unstructured.Unstructured, dropMalformedFields bool) (*metav1.ObjectMeta, bool, error) { + metadata, found := u.UnstructuredContent()["metadata"] + if !found { + return nil, false, nil + } + + // round-trip through JSON first, hoping that unmarshaling just works + objectMeta := &metav1.ObjectMeta{} + metadataBytes, err := encodingjson.Marshal(metadata) + if err != nil { + return nil, false, err + } + if err = encodingjson.Unmarshal(metadataBytes, objectMeta); err == nil { + // if successful, return + return objectMeta, true, nil + } + if !dropMalformedFields { + // if we're not trying to drop malformed fields, return the error + return nil, true, err + } + + metadataMap, ok := metadata.(map[string]interface{}) + if !ok { + return nil, false, fmt.Errorf("invalid metadata: expected object, got %T", metadata) + } + + // Go field by field accumulating into the metadata object. + // This takes advantage of the fact that you can repeatedly unmarshal individual fields into a single struct, + // each iteration preserving the old key-values. + accumulatedObjectMeta := &metav1.ObjectMeta{} + testObjectMeta := &metav1.ObjectMeta{} + for k, v := range metadataMap { + // serialize a single field + if singleFieldBytes, err := encodingjson.Marshal(map[string]interface{}{k: v}); err == nil { + // do a test unmarshal + if encodingjson.Unmarshal(singleFieldBytes, testObjectMeta) == nil { + // if that succeeds, unmarshal for real + encodingjson.Unmarshal(singleFieldBytes, accumulatedObjectMeta) + } + } + } + + return accumulatedObjectMeta, true, nil +} + +func setObjectMeta(u *unstructured.Unstructured, objectMeta *metav1.ObjectMeta) error { + if objectMeta == nil { + unstructured.RemoveNestedField(u.UnstructuredContent(), "metadata") + return nil + } + + metadata, err := runtime.DefaultUnstructuredConverter.ToUnstructured(objectMeta) + if err != nil { + return err + } + + u.UnstructuredContent()["metadata"] = metadata + return nil +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go index 81c3ac705..fa7c84e66 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go @@ -17,9 +17,24 @@ limitations under the License. package apiserver import ( + "math/rand" + "reflect" "testing" + corev1 "k8s.io/api/core/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + "k8s.io/apiextensions-apiserver/pkg/apiserver/conversion" + "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" + "k8s.io/apimachinery/pkg/api/equality" + metafuzzer "k8s.io/apimachinery/pkg/apis/meta/fuzzer" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/util/diff" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" ) func TestConvertFieldLabel(t *testing.T) { @@ -64,12 +79,16 @@ func TestConvertFieldLabel(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - c := crdObjectConverter{ - UnstructuredObjectConverter: unstructured.UnstructuredObjectConverter{}, - clusterScoped: test.clusterScoped, + crd := apiextensions.CustomResourceDefinition{} + + if test.clusterScoped { + crd.Spec.Scope = apiextensions.ClusterScoped + } else { + crd.Spec.Scope = apiextensions.NamespaceScoped } + _, c := conversion.NewCRDConverter(&crd) - label, value, err := c.ConvertFieldLabel("", "", test.label, "value") + label, value, err := c.ConvertFieldLabel(schema.GroupVersionKind{}, test.label, "value") if e, a := test.expectError, err != nil; e != a { t.Fatalf("err: expected %t, got %t", e, a) } @@ -89,3 +108,202 @@ func TestConvertFieldLabel(t *testing.T) { }) } } + +func TestRoundtripObjectMeta(t *testing.T) { + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + codec := json.NewSerializer(json.DefaultMetaFactory, scheme, scheme, false) + seed := rand.Int63() + fuzzer := fuzzer.FuzzerFor(metafuzzer.Funcs, rand.NewSource(seed), codecs) + + N := 1000 + for i := 0; i < N; i++ { + u := &unstructured.Unstructured{Object: map[string]interface{}{}} + original := &metav1.ObjectMeta{} + fuzzer.Fuzz(original) + if err := setObjectMeta(u, original); err != nil { + t.Fatalf("unexpected error setting ObjectMeta: %v", err) + } + o, _, err := getObjectMeta(u, false) + if err != nil { + t.Fatalf("unexpected error getting the Objectmeta: %v", err) + } + + if !equality.Semantic.DeepEqual(original, o) { + t.Errorf("diff: %v\nCodec: %#v", diff.ObjectReflectDiff(original, o), codec) + } + } +} + +// TestMalformedObjectMetaFields sets a number of different random values and types for all +// metadata fields. If json.Unmarshal accepts them, compare that getObjectMeta +// gives the same result. Otherwise, drop malformed fields. +func TestMalformedObjectMetaFields(t *testing.T) { + fuzzer := fuzzer.FuzzerFor(metafuzzer.Funcs, rand.NewSource(rand.Int63()), serializer.NewCodecFactory(runtime.NewScheme())) + spuriousValues := func() []interface{} { + return []interface{}{ + // primitives + nil, + int64(1), + float64(1.5), + true, + "a", + // well-formed complex values + []interface{}{"a", "b"}, + map[string]interface{}{"a": "1", "b": "2"}, + []interface{}{int64(1), int64(2)}, + []interface{}{float64(1.5), float64(2.5)}, + // known things json decoding tolerates + map[string]interface{}{"a": "1", "b": nil}, + // malformed things + map[string]interface{}{"a": "1", "b": []interface{}{"nested"}}, + []interface{}{"a", int64(1), float64(1.5), true, []interface{}{"nested"}}, + } + } + N := 100 + for i := 0; i < N; i++ { + fuzzedObjectMeta := &metav1.ObjectMeta{} + fuzzer.Fuzz(fuzzedObjectMeta) + goodMetaMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(fuzzedObjectMeta.DeepCopy()) + if err != nil { + t.Fatal(err) + } + for _, pth := range jsonPaths(nil, goodMetaMap) { + for _, v := range spuriousValues() { + // skip values of same type, because they can only cause decoding errors further insides + orig, err := JsonPathValue(goodMetaMap, pth, 0) + if err != nil { + t.Fatalf("unexpected to not find something at %v: %v", pth, err) + } + if reflect.TypeOf(v) == reflect.TypeOf(orig) { + continue + } + + // make a spurious map + spuriousMetaMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(fuzzedObjectMeta.DeepCopy()) + if err != nil { + t.Fatal(err) + } + if err := SetJsonPath(spuriousMetaMap, pth, 0, v); err != nil { + t.Fatal(err) + } + + // See if it can unmarshal to object meta + spuriousJSON, err := encodingjson.Marshal(spuriousMetaMap) + if err != nil { + t.Fatalf("error on %v=%#v: %v", pth, v, err) + } + expectedObjectMeta := &metav1.ObjectMeta{} + if err := encodingjson.Unmarshal(spuriousJSON, expectedObjectMeta); err != nil { + // if standard json unmarshal would fail decoding this field, drop the field entirely + truncatedMetaMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(fuzzedObjectMeta.DeepCopy()) + if err != nil { + t.Fatal(err) + } + + // we expect this logic for the different fields: + switch { + default: + // delete complete top-level field by default + DeleteJsonPath(truncatedMetaMap, pth[:1], 0) + } + + truncatedJSON, err := encodingjson.Marshal(truncatedMetaMap) + if err != nil { + t.Fatalf("error on %v=%#v: %v", pth, v, err) + } + expectedObjectMeta = &metav1.ObjectMeta{} + if err := encodingjson.Unmarshal(truncatedJSON, expectedObjectMeta); err != nil { + t.Fatalf("error on %v=%#v: %v", pth, v, err) + } + } + + // make sure dropInvalidTypedFields+getObjectMeta matches what we expect + u := &unstructured.Unstructured{Object: map[string]interface{}{"metadata": spuriousMetaMap}} + actualObjectMeta, _, err := getObjectMeta(u, true) + if err != nil { + t.Errorf("got unexpected error after dropping invalid typed fields on %v=%#v: %v", pth, v, err) + continue + } + + if !equality.Semantic.DeepEqual(expectedObjectMeta, actualObjectMeta) { + t.Errorf("%v=%#v, diff: %v\n", pth, v, diff.ObjectReflectDiff(expectedObjectMeta, actualObjectMeta)) + t.Errorf("expectedObjectMeta %#v", expectedObjectMeta) + } + } + } + } +} + +func TestGetObjectMetaNils(t *testing.T) { + u := &unstructured.Unstructured{ + Object: map[string]interface{}{ + "kind": "Pod", + "apiVersion": "v1", + "metadata": map[string]interface{}{ + "generateName": nil, + "labels": map[string]interface{}{ + "foo": nil, + }, + }, + }, + } + + o, _, err := getObjectMeta(u, true) + if err != nil { + t.Fatal(err) + } + if o.GenerateName != "" { + t.Errorf("expected null json value to be read as \"\" string, but got: %q", o.GenerateName) + } + if got, expected := o.Labels, map[string]string{"foo": ""}; !reflect.DeepEqual(got, expected) { + t.Errorf("unexpected labels, expected=%#v, got=%#v", expected, got) + } + + // double check this what the kube JSON decode is doing + bs, _ := encodingjson.Marshal(u.UnstructuredContent()) + kubeObj, _, err := clientgoscheme.Codecs.UniversalDecoder(corev1.SchemeGroupVersion).Decode(bs, nil, nil) + if err != nil { + t.Fatal(err) + } + pod, ok := kubeObj.(*corev1.Pod) + if !ok { + t.Fatalf("expected v1 Pod, got: %T", pod) + } + if got, expected := o.GenerateName, pod.ObjectMeta.GenerateName; got != expected { + t.Errorf("expected generatedName to be %q, got %q", expected, got) + } + if got, expected := o.Labels, pod.ObjectMeta.Labels; !reflect.DeepEqual(got, expected) { + t.Errorf("expected labels to be %v, got %v", expected, got) + } +} + +func TestGetObjectMeta(t *testing.T) { + for i := 0; i < 100; i++ { + u := &unstructured.Unstructured{Object: map[string]interface{}{ + "metadata": map[string]interface{}{ + "name": "good", + "Name": "bad1", + "nAme": "bad2", + "naMe": "bad3", + "namE": "bad4", + + "namespace": "good", + "Namespace": "bad1", + "nAmespace": "bad2", + "naMespace": "bad3", + "namEspace": "bad4", + + "creationTimestamp": "a", + }, + }} + + meta, _, err := getObjectMeta(u, true) + if err != nil { + t.Fatal(err) + } + if meta.Name != "good" || meta.Namespace != "good" { + t.Fatalf("got %#v", meta) + } + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/jsonpath_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/jsonpath_test.go new file mode 100644 index 000000000..8d9bb24f8 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/jsonpath_test.go @@ -0,0 +1,235 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apiserver + +import ( + "bytes" + "fmt" + + "k8s.io/apimachinery/pkg/runtime" +) + +type ( + jsonPathNode struct { + index *int + field string + } + JsonPath []jsonPathNode +) + +func (p JsonPath) String() string { + var buf bytes.Buffer + for _, n := range p { + if n.index == nil { + buf.WriteString("." + n.field) + } else { + buf.WriteString(fmt.Sprintf("[%d]", *n.index)) + } + } + return buf.String() +} + +func jsonPaths(base JsonPath, j map[string]interface{}) []JsonPath { + res := make([]JsonPath, 0, len(j)) + for k, old := range j { + kPth := append(append([]jsonPathNode(nil), base...), jsonPathNode{field: k}) + res = append(res, kPth) + + switch old := old.(type) { + case map[string]interface{}: + res = append(res, jsonPaths(kPth, old)...) + case []interface{}: + res = append(res, jsonIterSlice(kPth, old)...) + } + } + return res +} + +func jsonIterSlice(base JsonPath, j []interface{}) []JsonPath { + res := make([]JsonPath, 0, len(j)) + for i, old := range j { + index := i + iPth := append(append([]jsonPathNode(nil), base...), jsonPathNode{index: &index}) + res = append(res, iPth) + + switch old := old.(type) { + case map[string]interface{}: + res = append(res, jsonPaths(iPth, old)...) + case []interface{}: + res = append(res, jsonIterSlice(iPth, old)...) + } + } + return res +} + +func JsonPathValue(j map[string]interface{}, pth JsonPath, base int) (interface{}, error) { + if len(pth) == base { + return nil, fmt.Errorf("empty json path is invalid for object") + } + if pth[base].index != nil { + return nil, fmt.Errorf("index json path is invalid for object") + } + field, ok := j[pth[base].field] + if !ok || len(pth) == base+1 { + if len(pth) > base+1 { + return nil, fmt.Errorf("invalid non-terminal json path %q for non-existing field", pth) + } + return j[pth[base].field], nil + } + switch field := field.(type) { + case map[string]interface{}: + return JsonPathValue(field, pth, base+1) + case []interface{}: + return jsonPathValueSlice(field, pth, base+1) + default: + return nil, fmt.Errorf("invalid non-terminal json path %q for field", pth[:base+1]) + } +} + +func jsonPathValueSlice(j []interface{}, pth JsonPath, base int) (interface{}, error) { + if len(pth) == base { + return nil, fmt.Errorf("empty json path %q is invalid for object", pth) + } + if pth[base].index == nil { + return nil, fmt.Errorf("field json path %q is invalid for object", pth[:base+1]) + } + if *pth[base].index >= len(j) { + return nil, fmt.Errorf("invalid index %q for array of size %d", pth[:base+1], len(j)) + } + if len(pth) == base+1 { + return j[*pth[base].index], nil + } + switch item := j[*pth[base].index].(type) { + case map[string]interface{}: + return JsonPathValue(item, pth, base+1) + case []interface{}: + return jsonPathValueSlice(item, pth, base+1) + default: + return nil, fmt.Errorf("invalid non-terminal json path %q for index", pth[:base+1]) + } +} + +func SetJsonPath(j map[string]interface{}, pth JsonPath, base int, value interface{}) error { + if len(pth) == base { + return fmt.Errorf("empty json path is invalid for object") + } + if pth[base].index != nil { + return fmt.Errorf("index json path is invalid for object") + } + field, ok := j[pth[base].field] + if !ok || len(pth) == base+1 { + if len(pth) > base+1 { + return fmt.Errorf("invalid non-terminal json path %q for non-existing field", pth) + } + j[pth[base].field] = runtime.DeepCopyJSONValue(value) + return nil + } + switch field := field.(type) { + case map[string]interface{}: + return SetJsonPath(field, pth, base+1, value) + case []interface{}: + return setJsonPathSlice(field, pth, base+1, value) + default: + return fmt.Errorf("invalid non-terminal json path %q for field", pth[:base+1]) + } +} + +func setJsonPathSlice(j []interface{}, pth JsonPath, base int, value interface{}) error { + if len(pth) == base { + return fmt.Errorf("empty json path %q is invalid for object", pth) + } + if pth[base].index == nil { + return fmt.Errorf("field json path %q is invalid for object", pth[:base+1]) + } + if *pth[base].index >= len(j) { + return fmt.Errorf("invalid index %q for array of size %d", pth[:base+1], len(j)) + } + if len(pth) == base+1 { + j[*pth[base].index] = runtime.DeepCopyJSONValue(value) + return nil + } + switch item := j[*pth[base].index].(type) { + case map[string]interface{}: + return SetJsonPath(item, pth, base+1, value) + case []interface{}: + return setJsonPathSlice(item, pth, base+1, value) + default: + return fmt.Errorf("invalid non-terminal json path %q for index", pth[:base+1]) + } +} + +func DeleteJsonPath(j map[string]interface{}, pth JsonPath, base int) error { + if len(pth) == base { + return fmt.Errorf("empty json path is invalid for object") + } + if pth[base].index != nil { + return fmt.Errorf("index json path is invalid for object") + } + field, ok := j[pth[base].field] + if !ok || len(pth) == base+1 { + if len(pth) > base+1 { + return fmt.Errorf("invalid non-terminal json path %q for non-existing field", pth) + } + delete(j, pth[base].field) + return nil + } + switch field := field.(type) { + case map[string]interface{}: + return DeleteJsonPath(field, pth, base+1) + case []interface{}: + if len(pth) == base+2 { + if pth[base+1].index == nil { + return fmt.Errorf("field json path %q is invalid for object", pth) + } + j[pth[base].field] = append(field[:*pth[base+1].index], field[*pth[base+1].index+1:]...) + return nil + } + return deleteJsonPathSlice(field, pth, base+1) + default: + return fmt.Errorf("invalid non-terminal json path %q for field", pth[:base+1]) + } +} + +func deleteJsonPathSlice(j []interface{}, pth JsonPath, base int) error { + if len(pth) == base { + return fmt.Errorf("empty json path %q is invalid for object", pth) + } + if pth[base].index == nil { + return fmt.Errorf("field json path %q is invalid for object", pth[:base+1]) + } + if *pth[base].index >= len(j) { + return fmt.Errorf("invalid index %q for array of size %d", pth[:base+1], len(j)) + } + if len(pth) == base+1 { + return fmt.Errorf("cannot delete item at index %q in-place", pth[:base]) + } + switch item := j[*pth[base].index].(type) { + case map[string]interface{}: + return DeleteJsonPath(item, pth, base+1) + case []interface{}: + if len(pth) == base+2 { + if pth[base+1].index == nil { + return fmt.Errorf("field json path %q is invalid for object", pth) + } + j[*pth[base].index] = append(item[:*pth[base+1].index], item[*pth[base+1].index+1:]) + return nil + } + return deleteJsonPathSlice(item, pth, base+1) + default: + return fmt.Errorf("invalid non-terminal json path %q for index", pth[:base+1]) + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/BUILD deleted file mode 100644 index a5e89d499..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/BUILD +++ /dev/null @@ -1,50 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["validation.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apiserver/validation", - deps = [ - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/go-openapi/strfmt:go_default_library", - "//vendor/github.com/go-openapi/validate:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["validation_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver/pkg/apiserver/validation", - deps = [ - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/fuzzer:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - ], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation.go index e39ac3e6d..558ddb1fc 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation.go @@ -25,20 +25,24 @@ import ( ) // NewSchemaValidator creates an openapi schema validator for the given CRD validation. -func NewSchemaValidator(customResourceValidation *apiextensions.CustomResourceValidation) (*validate.SchemaValidator, error) { +func NewSchemaValidator(customResourceValidation *apiextensions.CustomResourceValidation) (*validate.SchemaValidator, *spec.Schema, error) { // Convert CRD schema to openapi schema openapiSchema := &spec.Schema{} if customResourceValidation != nil { - if err := convertJSONSchemaProps(customResourceValidation.OpenAPIV3Schema, openapiSchema); err != nil { - return nil, err + if err := ConvertJSONSchemaProps(customResourceValidation.OpenAPIV3Schema, openapiSchema); err != nil { + return nil, nil, err } } - return validate.NewSchemaValidator(openapiSchema, nil, "", strfmt.Default), nil + return validate.NewSchemaValidator(openapiSchema, nil, "", strfmt.Default), openapiSchema, nil } // ValidateCustomResource validates the Custom Resource against the schema in the CustomResourceDefinition. // CustomResource is a JSON data structure. func ValidateCustomResource(customResource interface{}, validator *validate.SchemaValidator) error { + if validator == nil { + return nil + } + result := validator.Validate(customResource) if result.AsError() != nil { return result.AsError() @@ -46,7 +50,8 @@ func ValidateCustomResource(customResource interface{}, validator *validate.Sche return nil } -func convertJSONSchemaProps(in *apiextensions.JSONSchemaProps, out *spec.Schema) error { +// ConvertJSONSchemaProps converts the schema from apiextensions.JSONSchemaPropos to go-openapi/spec.Schema +func ConvertJSONSchemaProps(in *apiextensions.JSONSchemaProps, out *spec.Schema) error { if in == nil { return nil } @@ -99,7 +104,7 @@ func convertJSONSchemaProps(in *apiextensions.JSONSchemaProps, out *spec.Schema) if in.Not != nil { in, out := &in.Not, &out.Not *out = new(spec.Schema) - if err := convertJSONSchemaProps(*in, *out); err != nil { + if err := ConvertJSONSchemaProps(*in, *out); err != nil { return err } } @@ -176,7 +181,7 @@ func convertSliceOfJSONSchemaProps(in *[]apiextensions.JSONSchemaProps, out *[]s if in != nil { for _, jsonSchemaProps := range *in { schema := spec.Schema{} - if err := convertJSONSchemaProps(&jsonSchemaProps, &schema); err != nil { + if err := ConvertJSONSchemaProps(&jsonSchemaProps, &schema); err != nil { return err } *out = append(*out, schema) @@ -190,7 +195,7 @@ func convertMapOfJSONSchemaProps(in map[string]apiextensions.JSONSchemaProps) (m if len(in) != 0 { for k, jsonSchemaProps := range in { schema := spec.Schema{} - if err := convertJSONSchemaProps(&jsonSchemaProps, &schema); err != nil { + if err := ConvertJSONSchemaProps(&jsonSchemaProps, &schema); err != nil { return nil, err } out[k] = schema @@ -203,7 +208,7 @@ func convertJSONSchemaPropsOrArray(in *apiextensions.JSONSchemaPropsOrArray, out if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(spec.Schema) - if err := convertJSONSchemaProps(*in, *out); err != nil { + if err := ConvertJSONSchemaProps(*in, *out); err != nil { return err } } @@ -211,7 +216,7 @@ func convertJSONSchemaPropsOrArray(in *apiextensions.JSONSchemaPropsOrArray, out in, out := &in.JSONSchemas, &out.Schemas *out = make([]spec.Schema, len(*in)) for i := range *in { - if err := convertJSONSchemaProps(&(*in)[i], &(*out)[i]); err != nil { + if err := ConvertJSONSchemaProps(&(*in)[i], &(*out)[i]); err != nil { return err } } @@ -224,7 +229,7 @@ func convertJSONSchemaPropsorBool(in *apiextensions.JSONSchemaPropsOrBool, out * if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(spec.Schema) - if err := convertJSONSchemaProps(*in, *out); err != nil { + if err := ConvertJSONSchemaProps(*in, *out); err != nil { return err } } @@ -236,7 +241,7 @@ func convertJSONSchemaPropsOrStringArray(in *apiextensions.JSONSchemaPropsOrStri if in.Schema != nil { in, out := &in.Schema, &out.Schema *out = new(spec.Schema) - if err := convertJSONSchemaProps(*in, *out); err != nil { + if err := ConvertJSONSchemaProps(*in, *out); err != nil { return err } } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go index a64c48f2d..ef73c008b 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/apiserver/validation/validation_test.go @@ -22,8 +22,8 @@ import ( "github.com/go-openapi/spec" + "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/api/testing/fuzzer" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/json" @@ -58,7 +58,7 @@ func TestRoundTrip(t *testing.T) { // internal -> go-openapi openAPITypes := &spec.Schema{} - if err := convertJSONSchemaProps(internal, openAPITypes); err != nil { + if err := ConvertJSONSchemaProps(internal, openAPITypes); err != nil { t.Fatal(err) } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/BUILD deleted file mode 100644 index c6312b730..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset.go", - "doc.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go index 441572a4f..63fcb510a 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package clientset import ( - glog "github.com/golang/glog" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -72,7 +73,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/doc.go index 05edbcd1c..ee865e56d 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package clientset diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/BUILD deleted file mode 100644 index 6bf35836d..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset_generated.go", - "doc.go", - "register.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go index 78e14994d..e65fe63ea 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -39,9 +41,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -51,7 +54,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go index 8a3101e39..9b99e7167 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go index 4ae6a1aae..c4c1d2ba8 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -22,15 +24,14 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + apiextensionsv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -43,10 +44,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - apiextensionsv1beta1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/BUILD deleted file mode 100644 index 9906c9c1a..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/doc.go index 3d3ab5f4e..7dc375616 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/register.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/register.go index e009b0921..4232ce5ce 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/register.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( @@ -22,15 +24,14 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + apiextensionsv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -43,10 +44,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - apiextensionsv1beta1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/BUILD deleted file mode 100644 index 054ceeca8..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "apiextensions_client.go", - "customresourcedefinition.go", - "doc.go", - "generated_expansion.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go index 90d280f89..a1fd337f9 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go index e1477df5f..f25a6ce34 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/BUILD deleted file mode 100644 index a1d6e27ad..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_apiextensions_client.go", - "fake_customresourcedefinition.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go index c88a38f54..288683ef9 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_apiextensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go index 6ee92631f..11aefe869 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/fake/fake_customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *v1bet if label == nil { label = labels.Everything() } - list := &v1beta1.CustomResourceDefinitionList{} + list := &v1beta1.CustomResourceDefinitionList{ListMeta: obj.(*v1beta1.CustomResourceDefinitionList).ListMeta} for _, item := range obj.(*v1beta1.CustomResourceDefinitionList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/generated_expansion.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/generated_expansion.go index 35554a068..2a989d4be 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/generated_expansion.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type CustomResourceDefinitionExpansion interface{} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/BUILD deleted file mode 100644 index a31718d05..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset.go", - "doc.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/clientset.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/clientset.go index 076c61b1c..152a9fea0 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/clientset.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalclientset import ( - glog "github.com/golang/glog" apiextensionsinternalversion "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -64,7 +65,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/doc.go index 4ede718de..01b3d5e0f 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package internalclientset diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/BUILD deleted file mode 100644 index 3beb9047a..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset_generated.go", - "doc.go", - "register.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/clientset_generated.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/clientset_generated.go index d223ba7df..72ab169e9 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/clientset_generated.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -39,9 +41,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -51,7 +54,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/doc.go index 8a3101e39..9b99e7167 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/register.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/register.go index 289d7a678..884c7095d 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/register.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -22,15 +24,14 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + apiextensionsinternalversion.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -43,10 +44,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - apiextensionsinternalversion.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/BUILD deleted file mode 100644 index ae5835d47..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/doc.go index 3d3ab5f4e..7dc375616 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/register.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/register.go index 0c43c20e8..01df98a6b 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/register.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( - os "os" - apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install" - announced "k8s.io/apimachinery/pkg/apimachinery/announced" - registered "k8s.io/apimachinery/pkg/apimachinery/registered" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -32,15 +30,12 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) -var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS")) -var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry) - func init() { v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - Install(GroupFactoryRegistry, Registry, Scheme) + Install(Scheme) } // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - apiextensions.Install(groupFactoryRegistry, registry, scheme) +func Install(scheme *runtime.Scheme) { + apiextensions.Install(scheme) } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/BUILD deleted file mode 100644 index d92943a88..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "apiextensions_client.go", - "customresourcedefinition.go", - "doc.go", - "generated_expansion.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/scheme:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/apiextensions_client.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/apiextensions_client.go index fedecdaa5..31b34404c 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/apiextensions_client.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/apiextensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion import ( @@ -64,17 +66,12 @@ func New(c rest.Interface) *ApiextensionsClient { } func setConfigDefaults(config *rest.Config) error { - g, err := scheme.Registry.Group("apiextensions.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { - gv := g.GroupVersion + if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("apiextensions.k8s.io")[0].Group { + gv := scheme.Scheme.PrioritizedVersionsForGroup("apiextensions.k8s.io")[0] config.GroupVersion = &gv } config.NegotiatedSerializer = scheme.Codecs diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/customresourcedefinition.go index b4f14bc16..f3ddc8044 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion import ( diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/doc.go index 861501975..86602442b 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package internalversion diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/BUILD deleted file mode 100644 index 932e84be2..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_apiextensions_client.go", - "fake_customresourcedefinition.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/doc.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/doc.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_apiextensions_client.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_apiextensions_client.go index 3c9d1e02e..1a601e5b0 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_apiextensions_client.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_apiextensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_customresourcedefinition.go index 790b172e6..74016362d 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeCustomResourceDefinitions) List(opts v1.ListOptions) (result *apiex if label == nil { label = labels.Everything() } - list := &apiextensions.CustomResourceDefinitionList{} + list := &apiextensions.CustomResourceDefinitionList{ListMeta: obj.(*apiextensions.CustomResourceDefinitionList).ListMeta} for _, item := range obj.(*apiextensions.CustomResourceDefinitionList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/generated_expansion.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/generated_expansion.go index a1df3b36f..a88821021 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/generated_expansion.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion type CustomResourceDefinitionExpansion interface{} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/BUILD deleted file mode 100644 index 57f38ce25..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "factory.go", - "generic.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/BUILD deleted file mode 100644 index a0b8cee3d..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/interface.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/interface.go index 0a7e72223..7b48c57ca 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/interface.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package apiextensions diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/BUILD deleted file mode 100644 index bd2d06784..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "customresourcedefinition.go", - "interface.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go index a0bffb88f..05e8c4217 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - apiextensions_v1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" clientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" internalinterfaces "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces" v1beta1 "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1" @@ -69,7 +69,7 @@ func NewFilteredCustomResourceDefinitionInformer(client clientset.Interface, res return client.ApiextensionsV1beta1().CustomResourceDefinitions().Watch(options) }, }, - &apiextensions_v1beta1.CustomResourceDefinition{}, + &apiextensionsv1beta1.CustomResourceDefinition{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *customResourceDefinitionInformer) defaultInformer(client clientset.Inte } func (f *customResourceDefinitionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiextensions_v1beta1.CustomResourceDefinition{}, f.defaultInformer) + return f.factory.InformerFor(&apiextensionsv1beta1.CustomResourceDefinition{}, f.defaultInformer) } func (f *customResourceDefinitionInformer) Lister() v1beta1.CustomResourceDefinitionLister { diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/interface.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/interface.go index 667ce98e4..f78edbb59 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/interface.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensions/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go index e39d41c13..94d039c72 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -32,12 +32,16 @@ import ( cache "k8s.io/client-go/tools/cache" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client clientset.Interface namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -45,23 +49,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client clientset.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client clientset.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client clientset.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) } + + return factory } // Start initializes all requested informers. @@ -110,7 +153,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/generic.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/generic.go index 4485a199b..da8a2ab0c 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/generic.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/BUILD deleted file mode 100644 index 56bb1f8d8..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["factory_interfaces.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go index 14f84b306..3b17f5a1a 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/BUILD deleted file mode 100644 index ec24afd53..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "factory.go", - "generic.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions:all-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/BUILD deleted file mode 100644 index b1e3dfa02..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/interface.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/interface.go index 923953a48..8236e2acc 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/interface.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package apiextensions diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/BUILD deleted file mode 100644 index 143223332..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "customresourcedefinition.go", - "interface.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/customresourcedefinition.go index f814ba73d..2c54f3ce5 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/interface.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/interface.go index d80ab3abb..d9444144b 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/interface.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/factory.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/factory.go index dffd521ac..84b04523d 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/factory.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion @@ -32,12 +32,16 @@ import ( cache "k8s.io/client-go/tools/cache" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client internalclientset.Interface namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -45,23 +49,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client internalclientset.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client internalclientset.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client internalclientset.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) } + + return factory } // Start initializes all requested informers. @@ -110,7 +153,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/generic.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/generic.go index 78d66fae2..c12c44074 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/generic.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/BUILD deleted file mode 100644 index 398d1f2f8..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["factory_interfaces.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/factory_interfaces.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/factory_interfaces.go index 71a1acfc5..5854db0ca 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/factory_interfaces.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/BUILD deleted file mode 100644 index 54732b7f9..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "customresourcedefinition.go", - "expansion_generated.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/customresourcedefinition.go index 0c3159fa6..f64f01d9d 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/expansion_generated.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/expansion_generated.go index 33e966b80..5e3ae381d 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/expansion_generated.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/BUILD deleted file mode 100644 index f57e6d77f..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "customresourcedefinition.go", - "expansion_generated.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go index ba7350657..87633217b 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/customresourcedefinition.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/expansion_generated.go b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/expansion_generated.go index a4aa2c7ef..429782deb 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/expansion_generated.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/BUILD deleted file mode 100644 index a5cd39b43..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["start.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/cmd/server", - deps = [ - "//vendor/github.com/spf13/cobra:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apiserver:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/options:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go new file mode 100644 index 000000000..995a31555 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/options/options.go @@ -0,0 +1,116 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package options + +import ( + "fmt" + "io" + "net" + + "github.com/spf13/pflag" + + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/pkg/apiserver" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + genericregistry "k8s.io/apiserver/pkg/registry/generic" + genericapiserver "k8s.io/apiserver/pkg/server" + genericoptions "k8s.io/apiserver/pkg/server/options" +) + +const defaultEtcdPathPrefix = "/registry/apiextensions.kubernetes.io" + +// CustomResourceDefinitionsServerOptions describes the runtime options of an apiextensions-apiserver. +type CustomResourceDefinitionsServerOptions struct { + RecommendedOptions *genericoptions.RecommendedOptions + APIEnablement *genericoptions.APIEnablementOptions + + StdOut io.Writer + StdErr io.Writer +} + +// NewCustomResourceDefinitionsServerOptions creates default options of an apiextensions-apiserver. +func NewCustomResourceDefinitionsServerOptions(out, errOut io.Writer) *CustomResourceDefinitionsServerOptions { + o := &CustomResourceDefinitionsServerOptions{ + RecommendedOptions: genericoptions.NewRecommendedOptions(defaultEtcdPathPrefix, apiserver.Codecs.LegacyCodec(v1beta1.SchemeGroupVersion)), + APIEnablement: genericoptions.NewAPIEnablementOptions(), + + StdOut: out, + StdErr: errOut, + } + + return o +} + +// AddFlags adds the apiextensions-apiserver flags to the flagset. +func (o CustomResourceDefinitionsServerOptions) AddFlags(fs *pflag.FlagSet) { + o.RecommendedOptions.AddFlags(fs) + o.APIEnablement.AddFlags(fs) +} + +// Validate validates the apiextensions-apiserver options. +func (o CustomResourceDefinitionsServerOptions) Validate() error { + errors := []error{} + errors = append(errors, o.RecommendedOptions.Validate()...) + errors = append(errors, o.APIEnablement.Validate(apiserver.Scheme)...) + return utilerrors.NewAggregate(errors) +} + +// Complete fills in missing options. +func (o *CustomResourceDefinitionsServerOptions) Complete() error { + return nil +} + +// Config returns an apiextensions-apiserver configuration. +func (o CustomResourceDefinitionsServerOptions) Config() (*apiserver.Config, error) { + // TODO have a "real" external address + if err := o.RecommendedOptions.SecureServing.MaybeDefaultWithSelfSignedCerts("localhost", nil, []net.IP{net.ParseIP("127.0.0.1")}); err != nil { + return nil, fmt.Errorf("error creating self-signed certificates: %v", err) + } + + serverConfig := genericapiserver.NewRecommendedConfig(apiserver.Codecs) + if err := o.RecommendedOptions.ApplyTo(serverConfig, apiserver.Scheme); err != nil { + return nil, err + } + if err := o.APIEnablement.ApplyTo(&serverConfig.Config, apiserver.DefaultAPIResourceConfigSource(), apiserver.Scheme); err != nil { + return nil, err + } + + config := &apiserver.Config{ + GenericConfig: serverConfig, + ExtraConfig: apiserver.ExtraConfig{ + CRDRESTOptionsGetter: NewCRDRESTOptionsGetter(*o.RecommendedOptions.Etcd), + }, + } + return config, nil +} + +// NewCRDRESTOptionsGetter create a RESTOptionsGetter for CustomResources. +func NewCRDRESTOptionsGetter(etcdOptions genericoptions.EtcdOptions) genericregistry.RESTOptionsGetter { + ret := apiserver.CRDRESTOptionsGetter{ + StorageConfig: etcdOptions.StorageConfig, + StoragePrefix: etcdOptions.StorageConfig.Prefix, + EnableWatchCache: etcdOptions.EnableWatchCache, + DefaultWatchCacheSize: etcdOptions.DefaultWatchCacheSize, + EnableGarbageCollection: etcdOptions.EnableGarbageCollection, + DeleteCollectionWorkers: etcdOptions.DeleteCollectionWorkers, + CountMetricPollPeriod: etcdOptions.StorageConfig.CountMetricPollPeriod, + } + ret.StorageConfig.Codec = unstructured.UnstructuredJSONScheme + + return ret +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/server.go b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/server.go new file mode 100644 index 000000000..b30b9cb65 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/server.go @@ -0,0 +1,64 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "io" + + "github.com/spf13/cobra" + + "k8s.io/apiextensions-apiserver/pkg/cmd/server/options" + genericapiserver "k8s.io/apiserver/pkg/server" +) + +func NewServerCommand(out, errOut io.Writer, stopCh <-chan struct{}) *cobra.Command { + o := options.NewCustomResourceDefinitionsServerOptions(out, errOut) + + cmd := &cobra.Command{ + Short: "Launch an API extensions API server", + Long: "Launch an API extensions API server", + RunE: func(c *cobra.Command, args []string) error { + if err := o.Complete(); err != nil { + return err + } + if err := o.Validate(); err != nil { + return err + } + if err := Run(o, stopCh); err != nil { + return err + } + return nil + }, + } + + fs := cmd.Flags() + o.AddFlags(fs) + return cmd +} + +func Run(o *options.CustomResourceDefinitionsServerOptions, stopCh <-chan struct{}) error { + config, err := o.Config() + if err != nil { + return err + } + + server, err := config.Complete().New(genericapiserver.NewEmptyDelegate()) + if err != nil { + return err + } + return server.GenericAPIServer.PrepareRun().Run(stopCh) +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/start.go b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/start.go deleted file mode 100644 index df3cf3e60..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/start.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package server - -import ( - "fmt" - "io" - "net" - - "github.com/spf13/cobra" - - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apiextensions-apiserver/pkg/apiserver" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - genericregistry "k8s.io/apiserver/pkg/registry/generic" - genericapiserver "k8s.io/apiserver/pkg/server" - genericoptions "k8s.io/apiserver/pkg/server/options" -) - -const defaultEtcdPathPrefix = "/registry/apiextensions.kubernetes.io" - -type CustomResourceDefinitionsServerOptions struct { - RecommendedOptions *genericoptions.RecommendedOptions - APIEnablement *genericoptions.APIEnablementOptions - - StdOut io.Writer - StdErr io.Writer -} - -func NewCustomResourceDefinitionsServerOptions(out, errOut io.Writer) *CustomResourceDefinitionsServerOptions { - o := &CustomResourceDefinitionsServerOptions{ - RecommendedOptions: genericoptions.NewRecommendedOptions(defaultEtcdPathPrefix, apiserver.Codecs.LegacyCodec(v1beta1.SchemeGroupVersion)), - APIEnablement: genericoptions.NewAPIEnablementOptions(), - - StdOut: out, - StdErr: errOut, - } - - // the shared informer is not needed for kube-aggregator. Disable the kubeconfig flag and the client creation. - o.RecommendedOptions.CoreAPI = nil - - return o -} - -func NewCommandStartCustomResourceDefinitionsServer(out, errOut io.Writer, stopCh <-chan struct{}) *cobra.Command { - o := NewCustomResourceDefinitionsServerOptions(out, errOut) - - cmd := &cobra.Command{ - Short: "Launch an API extensions API server", - Long: "Launch an API extensions API server", - RunE: func(c *cobra.Command, args []string) error { - if err := o.Complete(); err != nil { - return err - } - if err := o.Validate(args); err != nil { - return err - } - if err := o.RunCustomResourceDefinitionsServer(stopCh); err != nil { - return err - } - return nil - }, - } - - flags := cmd.Flags() - o.RecommendedOptions.AddFlags(flags) - o.APIEnablement.AddFlags(flags) - return cmd -} - -func (o CustomResourceDefinitionsServerOptions) Validate(args []string) error { - errors := []error{} - errors = append(errors, o.RecommendedOptions.Validate()...) - errors = append(errors, o.APIEnablement.Validate(apiserver.Registry)...) - return utilerrors.NewAggregate(errors) -} - -func (o *CustomResourceDefinitionsServerOptions) Complete() error { - return nil -} - -func (o CustomResourceDefinitionsServerOptions) Config() (*apiserver.Config, error) { - // TODO have a "real" external address - if err := o.RecommendedOptions.SecureServing.MaybeDefaultWithSelfSignedCerts("localhost", nil, []net.IP{net.ParseIP("127.0.0.1")}); err != nil { - return nil, fmt.Errorf("error creating self-signed certificates: %v", err) - } - - serverConfig := genericapiserver.NewRecommendedConfig(apiserver.Codecs) - if err := o.RecommendedOptions.ApplyTo(serverConfig, apiserver.Scheme); err != nil { - return nil, err - } - if err := o.APIEnablement.ApplyTo(&serverConfig.Config, apiserver.DefaultAPIResourceConfigSource(), apiserver.Registry); err != nil { - return nil, err - } - - config := &apiserver.Config{ - GenericConfig: serverConfig, - ExtraConfig: apiserver.ExtraConfig{ - CRDRESTOptionsGetter: NewCRDRESTOptionsGetter(*o.RecommendedOptions.Etcd), - }, - } - return config, nil -} - -func NewCRDRESTOptionsGetter(etcdOptions genericoptions.EtcdOptions) genericregistry.RESTOptionsGetter { - ret := apiserver.CRDRESTOptionsGetter{ - StorageConfig: etcdOptions.StorageConfig, - StoragePrefix: etcdOptions.StorageConfig.Prefix, - EnableWatchCache: etcdOptions.EnableWatchCache, - DefaultWatchCacheSize: etcdOptions.DefaultWatchCacheSize, - EnableGarbageCollection: etcdOptions.EnableGarbageCollection, - DeleteCollectionWorkers: etcdOptions.DeleteCollectionWorkers, - } - ret.StorageConfig.Codec = unstructured.UnstructuredJSONScheme - - return ret -} - -func (o CustomResourceDefinitionsServerOptions) RunCustomResourceDefinitionsServer(stopCh <-chan struct{}) error { - config, err := o.Config() - if err != nil { - return err - } - - server, err := config.Complete().New(genericapiserver.EmptyDelegate) - if err != nil { - return err - } - return server.GenericAPIServer.PrepareRun().Run(stopCh) -} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.crt b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.crt new file mode 100644 index 000000000..6143ecc60 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.crt @@ -0,0 +1,37 @@ +-----BEGIN CERTIFICATE----- +MIIDGjCCAgKgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAiMSAwHgYDVQQDDBdsb2Nh +bGhvc3QtY2FAMTUzMTQ2ODA4NTAgFw0xODA3MTMwNj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Ghvc3QtY2FAMTUzMTQ2ODA4NTAgFw0xODA3MTMwNjQ4MDVaGA8yMTE4MDYxOTA2 +NDgwNVowIjEgMB4GA1UEAwwXbG9jYWxob3N0LWNhQDE1MzE0NjgwODUwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDFDtkZLlseubpzPQr1IT3xE28/1cDM +3UB2vp+pbiwvkmHvfm9RxMmDZbYWqXL5beCG/ladHaJ0RW4f3sBPzxDzUP1zFM94 +iYDZmVA0f7ZvtijuiUrwc6TP21ctX5TlN2YYoh4Er+aZ6E5MQIMAxkP+w1lwyYmj +oxopD1wf/4cmZgv9axZV1zR5MrpyVboQa4mQRUoMlLQFE0erMc0yIJsIVWXx9yS7 +9dzhEXC2WPYnPHh6AYSQZBdzumj5HdZhOQhL/UOWq6AJGP1p7l0uXPArmDG0g9pS +aFxAQx6IxtdSUOZFBlel/p+iOab3H8eoNkgCPMXmrM3WZLW7Uy5Onx6LAgMBAAGj +IzAhMA4GA1UdDwEB/wQEAwICpDAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB +CwUAA4IBAQC0BaURRhpRbORaOiZJFeQR0gCD9goggXNj+cPh8yYol2GNBdLfed6x +B6ZxGW2Y14pOjo2Ba5FdZyzfOenjhkqhUujQSMxKjkWxX03blLjPEvLo/Wi6TLnp +H3Qmm/Gq1GAxmkZUaovcE71/zpZ/lJLWVVxz21wxcGQIA30DUKgdycfOvWdYkYGf +tnsXpY4yIyHvKvfeIbxo8doBnoRvYd4a7QyY0zw/Q3qaCdINo9zKJYV0CnpSZhKy +5RLcrlfvXttEYryP57RWP9GYJMNmiovGcbls4pOwZMNueUx5qEzIbC9lsfyt13Bc +oZ1lk1TqzwJERoALmgT0ccp7LRxIV90P +-----END CERTIFICATE----- diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.key b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.key new file mode 100644 index 000000000..3d652c869 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testdata/localhost_127.0.0.1_localhost.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpgIBAAKCAQEAwvUH8dWABKfsK0iI24p1sN6ViA23+ey7rX14EvOIpWaXOzNs +3rtUKz8oQnnS/4Dz9EMSmz0ugEeUfw4mx+EVnLoy+glORQdGPaJ/iKTfyJpdl84B +olPNoE5CYNfOVYFsA2hzjyr1BfTdRqb8XEr0bDRqIgSfy5RODYcclENFf5QGpWMW +Mm8YJfP8YIVjJBp0HN2CliqhprQWmmsd8bzM2psaVj6YaCxtO/mGXwH9EO77JVTJ +pbJUZsfTqSRb0Z5HpW16Bx8e97pmzIhadvJ42PDStnal8G+mfNAQns6aQimKW457 +qTiAwABNCr484Yc0kuvGYLpIgWTnFJZ1i8y9/QIDAQABAoIBAQC3rgioLpEI0fVO +6m4W+iLcWznjD5nQnNxOHrJsmIqb20aM/myKhVBN1pll2EWVeLdf4Xm8TS5sqgQc +mQast0KXgU7aCL53ht0E4P7rjPtSky2vAubDO9W2PUWI3IqIQQG1TEnkD4L+868v +C9EkW3JiKBf+qQCs27OWR0AD6EWoZfc9NT5AVnL1aTwKnLpSt80umXUMmR5c4ddT +58FO9JgZCzHbcoAyosf4v8fiz588zjBDRRienHourxmUnsKJrIyCMrygBpQ7wIcO +R86e+PuQ+toeSbldq8EfN/XoY0POUvLL/zu6HkbZLhOEjEHQMkMRCMtmLCjuU+sy +TwdRl0xBAoGBAOtC+kqh5eYgQAYtvPaW/XQwrang+G2xIYd/OTXzIlU2T3sTPrDo +IEkwsXwAeKcJx+Z7XcipSG5l1s5QZbc+GIARmJ0DrAwLkDhlwz8RssxBY4q64Jtn +FWRm6CBJkPDq4t16ZbXDdUleXAaqbvxTTnPZMz2o1XHEDpUcPG29MnF1AoGBANQk +hh44qY3IUxRwp6ZoNHVRz7oJC2JLj1++QNoLXX/8LWTXd49RZpI7Byk2lEXl7clf +3rErBuWElrxxuikOahEdzkjKSZq4RSKj1lNpy14spBRo7O9Q+GrJgcr3tcuyT6ri +sXOo6ET5bG72j+uVzv/QbuyCS8elZQHifBIi58FpAoGBAIXsQ8TWcqPUuf2KbeZF +v5Qz3bg1y9XNnpOedbfjZyjw2L/sDaTxDuf7Ix2+uvADnlry4UlILGZD7MrXc3+j +hpjo62J+Y6MbtgaUz1eIwKqLkpm3lgKA5OmZtwwiNLMgUvLXKS0WTh7s6yAUR0e2 +OJO0EfpIsPCpNc/mGfQyXpO9AoGBANEVblo63mGvHrL2lUWdTpaSm3lvkJjAf/6N +NL2yleSeVt8cvemzALT/GH+2G00I4OOoaYOUNKfhle8E58WvPzq/daCoPwMOupT5 +hTORAa8/sDetclgsJaqaECJLIhIxG/QAmYS05LeWXRjASfiXHf1jIPBZOvb6PCMv +Zbk6TdCBAoGBAIxT9W5FhHl+uUpuHIuFvCUg0AoERk9dUPXVEz1C1lqsYfetZ0uz +wh9KtFq2puWrez+K4o04LoInXHFeb34Hx/9SRDCTawmMicuLxivbTm4yjG2RsShl +nbq376nyawu9rcjM3F5ucYLiGHmQOPYWSOvGr2QhGgFgzXiBQ1RcAYdH +-----END RSA PRIVATE KEY----- diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testserver.go b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testserver.go new file mode 100644 index 000000000..3d705576f --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing/testserver.go @@ -0,0 +1,211 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testing + +import ( + "fmt" + "io/ioutil" + "net" + "os" + "path" + "runtime" + "time" + + "github.com/spf13/pflag" + + "k8s.io/apiextensions-apiserver/pkg/cmd/server/options" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/registry/generic/registry" + genericapiserver "k8s.io/apiserver/pkg/server" + "k8s.io/apiserver/pkg/storage/storagebackend" + "k8s.io/client-go/kubernetes" + restclient "k8s.io/client-go/rest" +) + +// TearDownFunc is to be called to tear down a test server. +type TearDownFunc func() + +// TestServerInstanceOptions Instance options the TestServer +type TestServerInstanceOptions struct { + // DisableStorageCleanup Disable the automatic storage cleanup + DisableStorageCleanup bool +} + +// TestServer return values supplied by kube-test-ApiServer +type TestServer struct { + ClientConfig *restclient.Config // Rest client config + ServerOpts *options.CustomResourceDefinitionsServerOptions // ServerOpts + TearDownFn TearDownFunc // TearDown function + TmpDir string // Temp Dir used, by the apiserver +} + +// Logger allows t.Testing and b.Testing to be passed to StartTestServer and StartTestServerOrDie +type Logger interface { + Errorf(format string, args ...interface{}) + Fatalf(format string, args ...interface{}) + Logf(format string, args ...interface{}) +} + +// NewDefaultTestServerOptions Default options for TestServer instances +func NewDefaultTestServerOptions() *TestServerInstanceOptions { + return &TestServerInstanceOptions{ + DisableStorageCleanup: false, + } +} + +// StartTestServer starts a apiextensions-apiserver. A rest client config and a tear-down func, +// and location of the tmpdir are returned. +// +// Note: we return a tear-down func instead of a stop channel because the later will leak temporary +// files that because Golang testing's call to os.Exit will not give a stop channel go routine +// enough time to remove temporary files. +func StartTestServer(t Logger, instanceOptions *TestServerInstanceOptions, customFlags []string, storageConfig *storagebackend.Config) (result TestServer, err error) { + if instanceOptions == nil { + instanceOptions = NewDefaultTestServerOptions() + } + + // TODO : Remove TrackStorageCleanup below when PR + // https://github.com/kubernetes/kubernetes/pull/50690 + // merges as that shuts down storage properly + if !instanceOptions.DisableStorageCleanup { + registry.TrackStorageCleanup() + } + + stopCh := make(chan struct{}) + tearDown := func() { + if !instanceOptions.DisableStorageCleanup { + registry.CleanupStorage() + } + close(stopCh) + if len(result.TmpDir) != 0 { + os.RemoveAll(result.TmpDir) + } + } + defer func() { + if result.TearDownFn == nil { + tearDown() + } + }() + + result.TmpDir, err = ioutil.TempDir("", "apiextensions-apiserver") + if err != nil { + return result, fmt.Errorf("failed to create temp dir: %v", err) + } + + fs := pflag.NewFlagSet("test", pflag.PanicOnError) + + s := options.NewCustomResourceDefinitionsServerOptions(os.Stdout, os.Stderr) + s.AddFlags(fs) + + s.RecommendedOptions.SecureServing.Listener, s.RecommendedOptions.SecureServing.BindPort, err = createLocalhostListenerOnFreePort() + if err != nil { + return result, fmt.Errorf("failed to create listener: %v", err) + } + s.RecommendedOptions.SecureServing.ServerCert.CertDirectory = result.TmpDir + s.RecommendedOptions.SecureServing.ExternalAddress = s.RecommendedOptions.SecureServing.Listener.Addr().(*net.TCPAddr).IP // use listener addr although it is a loopback device + + _, thisFile, _, ok := runtime.Caller(0) + if !ok { + return result, fmt.Errorf("failed to get current file") + } + s.RecommendedOptions.SecureServing.ServerCert.FixtureDirectory = path.Join(path.Dir(thisFile), "testdata") + + if storageConfig != nil { + s.RecommendedOptions.Etcd.StorageConfig = *storageConfig + } + s.APIEnablement.RuntimeConfig.Set("api/all=true") + + fs.Parse(customFlags) + + if err := s.Complete(); err != nil { + return result, fmt.Errorf("failed to set default options: %v", err) + } + if err := s.Validate(); err != nil { + return result, fmt.Errorf("failed to validate options: %v", err) + } + + t.Logf("runtime-config=%v", s.APIEnablement.RuntimeConfig) + t.Logf("Starting apiextensions-apiserver on port %d...", s.RecommendedOptions.SecureServing.BindPort) + + config, err := s.Config() + if err != nil { + return result, fmt.Errorf("failed to create config from options: %v", err) + } + server, err := config.Complete().New(genericapiserver.NewEmptyDelegate()) + if err != nil { + return result, fmt.Errorf("failed to create server: %v", err) + } + + go func(stopCh <-chan struct{}) { + if err := server.GenericAPIServer.PrepareRun().Run(stopCh); err != nil { + t.Errorf("apiextensions-apiserver failed run: %v", err) + } + }(stopCh) + + t.Logf("Waiting for /healthz to be ok...") + + client, err := kubernetes.NewForConfig(server.GenericAPIServer.LoopbackClientConfig) + if err != nil { + return result, fmt.Errorf("failed to create a client: %v", err) + } + err = wait.Poll(100*time.Millisecond, 30*time.Second, func() (bool, error) { + result := client.CoreV1().RESTClient().Get().AbsPath("/healthz").Do() + status := 0 + result.StatusCode(&status) + if status == 200 { + return true, nil + } + return false, nil + }) + if err != nil { + return result, fmt.Errorf("failed to wait for /healthz to return ok: %v", err) + } + + // from here the caller must call tearDown + result.ClientConfig = server.GenericAPIServer.LoopbackClientConfig + result.ServerOpts = s + result.TearDownFn = tearDown + + return result, nil +} + +// StartTestServerOrDie calls StartTestServer t.Fatal if it does not succeed. +func StartTestServerOrDie(t Logger, instanceOptions *TestServerInstanceOptions, flags []string, storageConfig *storagebackend.Config) *TestServer { + result, err := StartTestServer(t, instanceOptions, flags, storageConfig) + if err == nil { + return &result + } + + t.Fatalf("failed to launch server: %v", err) + return nil +} + +func createLocalhostListenerOnFreePort() (net.Listener, int, error) { + ln, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + return nil, 0, err + } + + // get port + tcpAddr, ok := ln.Addr().(*net.TCPAddr) + if !ok { + ln.Close() + return nil, 0, fmt.Errorf("invalid listen address: %q", ln.Addr().String()) + } + + return ln, tcpAddr.Port, nil +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go b/deps/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go new file mode 100644 index 000000000..6420c3a6f --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/controller/establish/establishing_controller.go @@ -0,0 +1,143 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package establish + +import ( + "fmt" + "time" + + "github.com/golang/glog" + apierrors "k8s.io/apimachinery/pkg/api/errors" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" + + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + client "k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion" + informers "k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion" + listers "k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion" +) + +// EstablishingController controls how and when CRD is established. +type EstablishingController struct { + crdClient client.CustomResourceDefinitionsGetter + crdLister listers.CustomResourceDefinitionLister + crdSynced cache.InformerSynced + + // To allow injection for testing. + syncFn func(key string) error + + queue workqueue.RateLimitingInterface +} + +// NewEstablishingController creates new EstablishingController. +func NewEstablishingController(crdInformer informers.CustomResourceDefinitionInformer, + crdClient client.CustomResourceDefinitionsGetter) *EstablishingController { + ec := &EstablishingController{ + crdClient: crdClient, + crdLister: crdInformer.Lister(), + crdSynced: crdInformer.Informer().HasSynced, + queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "crdEstablishing"), + } + + ec.syncFn = ec.sync + + return ec +} + +// QueueCRD adds CRD into the establishing queue. +func (ec *EstablishingController) QueueCRD(key string, timeout time.Duration) { + ec.queue.AddAfter(key, timeout) +} + +// Run starts the EstablishingController. +func (ec *EstablishingController) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + defer ec.queue.ShutDown() + + glog.Infof("Starting EstablishingController") + defer glog.Infof("Shutting down EstablishingController") + + if !cache.WaitForCacheSync(stopCh, ec.crdSynced) { + return + } + + // only start one worker thread since its a slow moving API + go wait.Until(ec.runWorker, time.Second, stopCh) + + <-stopCh +} + +func (ec *EstablishingController) runWorker() { + for ec.processNextWorkItem() { + } +} + +// processNextWorkItem deals with one key off the queue. +// It returns false when it's time to quit. +func (ec *EstablishingController) processNextWorkItem() bool { + key, quit := ec.queue.Get() + if quit { + return false + } + defer ec.queue.Done(key) + + err := ec.syncFn(key.(string)) + if err == nil { + ec.queue.Forget(key) + return true + } + + utilruntime.HandleError(fmt.Errorf("%v failed with: %v", key, err)) + ec.queue.AddRateLimited(key) + + return true +} + +// sync is used to turn CRDs into the Established state. +func (ec *EstablishingController) sync(key string) error { + cachedCRD, err := ec.crdLister.Get(key) + if apierrors.IsNotFound(err) { + return nil + } + if err != nil { + return err + } + + if !apiextensions.IsCRDConditionTrue(cachedCRD, apiextensions.NamesAccepted) || + apiextensions.IsCRDConditionTrue(cachedCRD, apiextensions.Established) { + return nil + } + + crd := cachedCRD.DeepCopy() + establishedCondition := apiextensions.CustomResourceDefinitionCondition{ + Type: apiextensions.Established, + Status: apiextensions.ConditionTrue, + Reason: "InitialNamesAccepted", + Message: "the initial names have been accepted", + } + apiextensions.SetCRDCondition(crd, establishedCondition) + + // Update server with new CRD condition. + _, err = ec.crdClient.CustomResourceDefinitions().UpdateStatus(crd) + if err != nil { + return err + } + + return nil +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD deleted file mode 100644 index 452dfefdf..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/controller/finalizer/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["crd_finalizer.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/controller/finalizer", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD deleted file mode 100644 index a2e00d653..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/BUILD +++ /dev/null @@ -1,54 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["naming_controller_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiextensions-apiserver/pkg/controller/status", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["naming_controller.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/controller/status", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/informers/internalversion/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go b/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go index c0a7cc86f..f00def4b1 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller.go @@ -24,6 +24,7 @@ import ( "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" utilerrors "k8s.io/apimachinery/pkg/util/errors" @@ -182,6 +183,8 @@ func (c *NamingConditionController) calculateNamesAndConditions(in *apiextension newNames.ListKind = requestedNames.ListKind } + newNames.Categories = requestedNames.Categories + // if we haven't changed the condition, then our names must be good. if namesAcceptedCondition.Status == apiextensions.ConditionUnknown { namesAcceptedCondition.Status = apiextensions.ConditionTrue @@ -189,7 +192,10 @@ func (c *NamingConditionController) calculateNamesAndConditions(in *apiextension namesAcceptedCondition.Message = "no conflicts found" } - // set EstablishedCondition to true if all names are accepted. Never set it back to false. + // set EstablishedCondition initially to false, then set it to true in establishing controller. + // The Establishing Controller will see the NamesAccepted condition when it arrives through the shared informer. + // At that time the API endpoint handler will serve the endpoint, avoiding a race + // which we had if we set Established to true here. establishedCondition := apiextensions.CustomResourceDefinitionCondition{ Type: apiextensions.Established, Status: apiextensions.ConditionFalse, @@ -202,8 +208,8 @@ func (c *NamingConditionController) calculateNamesAndConditions(in *apiextension if establishedCondition.Status != apiextensions.ConditionTrue && namesAcceptedCondition.Status == apiextensions.ConditionTrue { establishedCondition = apiextensions.CustomResourceDefinitionCondition{ Type: apiextensions.Established, - Status: apiextensions.ConditionTrue, - Reason: "InitialNamesAccepted", + Status: apiextensions.ConditionFalse, + Reason: "Installing", Message: "the initial names have been accepted", } } @@ -236,12 +242,16 @@ func (c *NamingConditionController) sync(key string) error { return err } + // Skip checking names if Spec and Status names are same. + if equality.Semantic.DeepEqual(inCustomResourceDefinition.Spec.Names, inCustomResourceDefinition.Status.AcceptedNames) { + return nil + } + acceptedNames, namingCondition, establishedCondition := c.calculateNamesAndConditions(inCustomResourceDefinition) // nothing to do if accepted names and NamesAccepted condition didn't change if reflect.DeepEqual(inCustomResourceDefinition.Status.AcceptedNames, acceptedNames) && - apiextensions.IsCRDConditionEquivalent(&namingCondition, apiextensions.FindCRDCondition(inCustomResourceDefinition, apiextensions.NamesAccepted)) && - apiextensions.IsCRDConditionEquivalent(&establishedCondition, apiextensions.FindCRDCondition(inCustomResourceDefinition, apiextensions.Established)) { + apiextensions.IsCRDConditionEquivalent(&namingCondition, apiextensions.FindCRDCondition(inCustomResourceDefinition, apiextensions.NamesAccepted)) { return nil } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller_test.go index 615c5dd85..717e52884 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller_test.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/controller/status/naming_controller_test.go @@ -95,19 +95,17 @@ var acceptedCondition = apiextensions.CustomResourceDefinitionCondition{ Message: "no conflicts found", } -func nameConflictCondition(reason, message string) apiextensions.CustomResourceDefinitionCondition { - return apiextensions.CustomResourceDefinitionCondition{ - Type: apiextensions.NamesAccepted, - Status: apiextensions.ConditionFalse, - Reason: reason, - Message: message, - } +var notAcceptedCondition = apiextensions.CustomResourceDefinitionCondition{ + Type: apiextensions.NamesAccepted, + Status: apiextensions.ConditionFalse, + Reason: "NotAccepted", + Message: "not all names are accepted", } -var establishedCondition = apiextensions.CustomResourceDefinitionCondition{ +var installingCondition = apiextensions.CustomResourceDefinitionCondition{ Type: apiextensions.Established, - Status: apiextensions.ConditionTrue, - Reason: "InitialNamesAccepted", + Status: apiextensions.ConditionFalse, + Reason: "Installing", Message: "the initial names have been accepted", } @@ -118,6 +116,15 @@ var notEstablishedCondition = apiextensions.CustomResourceDefinitionCondition{ Message: "not all names are accepted", } +func nameConflictCondition(reason, message string) apiextensions.CustomResourceDefinitionCondition { + return apiextensions.CustomResourceDefinitionCondition{ + Type: apiextensions.NamesAccepted, + Status: apiextensions.ConditionFalse, + Reason: reason, + Message: message, + } +} + func TestSync(t *testing.T) { tests := []struct { name string @@ -136,7 +143,7 @@ func TestSync(t *testing.T) { Plural: "alfa", }, expectedNameConflictCondition: acceptedCondition, - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: installingCondition, }, { name: "different groups", @@ -146,7 +153,7 @@ func TestSync(t *testing.T) { }, expectedNames: names("alfa", "delta-singular", "echo-kind", "foxtrot-listkind", "golf-shortname-1", "hotel-shortname-2"), expectedNameConflictCondition: acceptedCondition, - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: installingCondition, }, { name: "conflict plural to singular", @@ -206,7 +213,7 @@ func TestSync(t *testing.T) { }, expectedNames: names("alfa", "delta-singular", "echo-kind", "foxtrot-listkind", "golf-shortname-1", "hotel-shortname-2"), expectedNameConflictCondition: acceptedCondition, - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: installingCondition, }, { name: "merge on conflicts", @@ -248,7 +255,7 @@ func TestSync(t *testing.T) { }, expectedNames: names("alfa", "delta-singular", "echo-kind", "foxtrot-listkind", "golf-shortname-1", "hotel-shortname-2"), expectedNameConflictCondition: acceptedCondition, - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: installingCondition, }, { name: "no conflicts on self, remove shortname", @@ -264,44 +271,44 @@ func TestSync(t *testing.T) { }, expectedNames: names("alfa", "delta-singular", "echo-kind", "foxtrot-listkind", "golf-shortname-1"), expectedNameConflictCondition: acceptedCondition, - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: installingCondition, }, { - name: "established before with true condition", - in: newCRD("alfa.bravo.com").Condition(establishedCondition).NewOrDie(), + name: "installing before with true condition", + in: newCRD("alfa.bravo.com").Condition(acceptedCondition).NewOrDie(), existing: []*apiextensions.CustomResourceDefinition{}, expectedNames: apiextensions.CustomResourceDefinitionNames{ Plural: "alfa", }, expectedNameConflictCondition: acceptedCondition, - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: installingCondition, }, { - name: "not established before with false condition", - in: newCRD("alfa.bravo.com").Condition(notEstablishedCondition).NewOrDie(), + name: "not installing before with false condition", + in: newCRD("alfa.bravo.com").Condition(notAcceptedCondition).NewOrDie(), existing: []*apiextensions.CustomResourceDefinition{}, expectedNames: apiextensions.CustomResourceDefinitionNames{ Plural: "alfa", }, expectedNameConflictCondition: acceptedCondition, - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: installingCondition, }, { - name: "conflicting, established before with true condition", + name: "conflicting, installing before with true condition", in: newCRD("alfa.bravo.com").SpecNames("alfa", "delta-singular", "echo-kind", "foxtrot-listkind", "golf-shortname-1", "hotel-shortname-2"). - Condition(establishedCondition). + Condition(acceptedCondition). NewOrDie(), existing: []*apiextensions.CustomResourceDefinition{ newCRD("india.bravo.com").StatusNames("india", "alfa", "", "").NewOrDie(), }, expectedNames: names("", "delta-singular", "echo-kind", "foxtrot-listkind", "golf-shortname-1", "hotel-shortname-2"), expectedNameConflictCondition: nameConflictCondition("PluralConflict", `"alfa" is already in use`), - expectedEstablishedCondition: establishedCondition, + expectedEstablishedCondition: notEstablishedCondition, }, { - name: "conflicting, not established before with false condition", + name: "conflicting, not installing before with false condition", in: newCRD("alfa.bravo.com").SpecNames("alfa", "delta-singular", "echo-kind", "foxtrot-listkind", "golf-shortname-1", "hotel-shortname-2"). - Condition(notEstablishedCondition). + Condition(notAcceptedCondition). NewOrDie(), existing: []*apiextensions.CustomResourceDefinition{ newCRD("india.bravo.com").StatusNames("india", "alfa", "", "").NewOrDie(), @@ -322,7 +329,7 @@ func TestSync(t *testing.T) { crdLister: listers.NewCustomResourceDefinitionLister(crdIndexer), crdMutationCache: cache.NewIntegerResourceVersionMutationCache(crdIndexer, crdIndexer, 60*time.Second, false), } - actualNames, actualNameConflictCondition, actualEstablishedCondition := c.calculateNamesAndConditions(tc.in) + actualNames, actualNameConflictCondition, establishedCondition := c.calculateNamesAndConditions(tc.in) if e, a := tc.expectedNames, actualNames; !reflect.DeepEqual(e, a) { t.Errorf("%v expected %v, got %#v", tc.name, e, a) @@ -330,7 +337,7 @@ func TestSync(t *testing.T) { if e, a := tc.expectedNameConflictCondition, actualNameConflictCondition; !apiextensions.IsCRDConditionEquivalent(&e, &a) { t.Errorf("%v expected %v, got %v", tc.name, e, a) } - if e, a := tc.expectedEstablishedCondition, actualEstablishedCondition; !apiextensions.IsCRDConditionEquivalent(&e, &a) { + if e, a := tc.expectedEstablishedCondition, establishedCondition; !apiextensions.IsCRDConditionEquivalent(&e, &a) { t.Errorf("%v expected %v, got %v", tc.name, e, a) } } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/crdserverscheme/unstructured.go b/deps/k8s.io/apiextensions-apiserver/pkg/crdserverscheme/unstructured.go new file mode 100644 index 000000000..b5e334798 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/crdserverscheme/unstructured.go @@ -0,0 +1,67 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package crdserverscheme + +import ( + "reflect" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// UnstructuredObjectTyper provides a runtime.ObjectTyper implementation for +// runtime.Unstructured object based on discovery information. +type UnstructuredObjectTyper struct { +} + +// NewUnstructuredObjectTyper returns a runtime.ObjectTyper for +// unstructured objects based on discovery information. It accepts a list of fallback typers +// for handling objects that are not runtime.Unstructured. It does not delegate the Recognizes +// check, only ObjectKinds. +// TODO this only works for the apiextensions server and doesn't recognize any types. Move to point of use. +func NewUnstructuredObjectTyper() *UnstructuredObjectTyper { + dot := &UnstructuredObjectTyper{} + return dot +} + +// ObjectKinds returns a slice of one element with the group,version,kind of the +// provided object, or an error if the object is not runtime.Unstructured or +// has no group,version,kind information. unversionedType will always be false +// because runtime.Unstructured object should always have group,version,kind +// information set. +func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) { + if _, ok := obj.(runtime.Unstructured); ok { + gvk := obj.GetObjectKind().GroupVersionKind() + if len(gvk.Kind) == 0 { + return nil, false, runtime.NewMissingKindErr("object has no kind field ") + } + if len(gvk.Version) == 0 { + return nil, false, runtime.NewMissingVersionErr("object has no apiVersion field") + } + return []schema.GroupVersionKind{gvk}, false, nil + } + + return nil, false, runtime.NewNotRegisteredErrForType("crdserverscheme.UnstructuredObjectTyper", reflect.TypeOf(obj)) +} + +// Recognizes returns true if the provided group,version,kind was in the +// discovery information. +func (d *UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { + return false +} + +var _ runtime.ObjectTyper = &UnstructuredObjectTyper{} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/features/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/features/BUILD deleted file mode 100644 index c6438cb40..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/features/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["kube_features.go"], - importpath = "k8s.io/apiextensions-apiserver/pkg/features", - deps = ["//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/features/OWNERS b/deps/k8s.io/apiextensions-apiserver/pkg/features/OWNERS new file mode 100644 index 000000000..fe7b0144e --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/features/OWNERS @@ -0,0 +1,2 @@ +approvers: +- feature-approvers diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go b/deps/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go index 80b37bf7b..24e72f91e 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go @@ -33,6 +33,13 @@ const ( // // CustomResourceValidation is a list of validation methods for CustomResources CustomResourceValidation utilfeature.Feature = "CustomResourceValidation" + + // owner: @sttts, @nikhita + // alpha: v1.10 + // beta: v1.11 + // + // CustomResourceSubresources defines the subresources for CustomResources + CustomResourceSubresources utilfeature.Feature = "CustomResourceSubresources" ) func init() { @@ -43,5 +50,6 @@ func init() { // To add a new feature, define a key for it above and add it here. The features will be // available throughout Kubernetes binaries. var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureSpec{ - CustomResourceValidation: {Default: true, PreRelease: utilfeature.Beta}, + CustomResourceValidation: {Default: true, PreRelease: utilfeature.Beta}, + CustomResourceSubresources: {Default: true, PreRelease: utilfeature.Beta}, } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/BUILD deleted file mode 100644 index 84d77bd5b..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "etcd.go", - "strategy.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/registry/customresource", - deps = [ - "//vendor/github.com/go-openapi/validate:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apiserver/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd.go index 0cbf3b112..0a94bc5c4 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd.go @@ -17,20 +17,65 @@ limitations under the License. package customresource import ( + "context" + "fmt" + "strings" + + autoscalingv1 "k8s.io/api/autoscaling/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest" ) +// CustomResourceStorage includes dummy storage for CustomResources, and their Status and Scale subresources. +type CustomResourceStorage struct { + CustomResource *REST + Status *StatusREST + Scale *ScaleREST +} + +func NewStorage(resource schema.GroupResource, listKind schema.GroupVersionKind, strategy customResourceStrategy, optsGetter generic.RESTOptionsGetter, categories []string, tableConvertor rest.TableConvertor) CustomResourceStorage { + customResourceREST, customResourceStatusREST := newREST(resource, listKind, strategy, optsGetter, categories, tableConvertor) + + s := CustomResourceStorage{ + CustomResource: customResourceREST, + } + + if strategy.status != nil { + s.Status = customResourceStatusREST + } + + if scale := strategy.scale; scale != nil { + var labelSelectorPath string + if scale.LabelSelectorPath != nil { + labelSelectorPath = *scale.LabelSelectorPath + } + + s.Scale = &ScaleREST{ + store: customResourceREST.Store, + specReplicasPath: scale.SpecReplicasPath, + statusReplicasPath: scale.StatusReplicasPath, + labelSelectorPath: labelSelectorPath, + } + } + + return s +} + // REST implements a RESTStorage for API services against etcd type REST struct { *genericregistry.Store + categories []string } -// NewREST returns a RESTStorage object that will work against API services. -func NewREST(resource schema.GroupResource, listKind schema.GroupVersionKind, strategy customResourceDefinitionStorageStrategy, optsGetter generic.RESTOptionsGetter) *REST { +// newREST returns a RESTStorage object that will work against API services. +func newREST(resource schema.GroupResource, listKind schema.GroupVersionKind, strategy customResourceStrategy, optsGetter generic.RESTOptionsGetter, categories []string, tableConvertor rest.TableConvertor) (*REST, *StatusREST) { store := &genericregistry.Store{ NewFunc: func() runtime.Object { return &unstructured.Unstructured{} }, NewListFunc: func() runtime.Object { @@ -45,10 +90,236 @@ func NewREST(resource schema.GroupResource, listKind schema.GroupVersionKind, st CreateStrategy: strategy, UpdateStrategy: strategy, DeleteStrategy: strategy, + + TableConvertor: tableConvertor, } options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: strategy.GetAttrs} if err := store.CompleteWithOptions(options); err != nil { panic(err) // TODO: Propagate error up } - return &REST{store} + + statusStore := *store + statusStore.UpdateStrategy = NewStatusStrategy(strategy) + return &REST{store, categories}, &StatusREST{store: &statusStore} +} + +// Implement CategoriesProvider +var _ rest.CategoriesProvider = &REST{} + +// List returns a list of items matching labels and field according to the store's PredicateFunc. +func (e *REST) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { + l, err := e.Store.List(ctx, options) + if err != nil { + return nil, err + } + + // Shallow copy ObjectMeta in returned list for each item. Native types have `Items []Item` fields and therefore + // implicitly shallow copy ObjectMeta. The generic store sets the self-link for each item. So this is necessary + // to avoid mutation of the objects from the cache. + if ul, ok := l.(*unstructured.UnstructuredList); ok { + for i := range ul.Items { + shallowCopyObjectMeta(&ul.Items[i]) + } + } + + return l, nil +} + +func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + o, err := r.Store.Get(ctx, name, options) + if err != nil { + return nil, err + } + if u, ok := o.(*unstructured.Unstructured); ok { + shallowCopyObjectMeta(u) + } + return o, nil +} + +func shallowCopyObjectMeta(u runtime.Unstructured) { + obj := shallowMapDeepCopy(u.UnstructuredContent()) + if metadata, ok := obj["metadata"]; ok { + if metadata, ok := metadata.(map[string]interface{}); ok { + obj["metadata"] = shallowMapDeepCopy(metadata) + u.SetUnstructuredContent(obj) + } + } +} + +func shallowMapDeepCopy(in map[string]interface{}) map[string]interface{} { + if in == nil { + return nil + } + + out := make(map[string]interface{}, len(in)) + for k, v := range in { + out[k] = v + } + + return out +} + +// Categories implements the CategoriesProvider interface. Returns a list of categories a resource is part of. +func (r *REST) Categories() []string { + return r.categories +} + +// StatusREST implements the REST endpoint for changing the status of a CustomResource +type StatusREST struct { + store *genericregistry.Store +} + +var _ = rest.Patcher(&StatusREST{}) + +func (r *StatusREST) New() runtime.Object { + return &unstructured.Unstructured{} +} + +// Get retrieves the object from the storage. It is required to support Patch. +func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + return r.store.Get(ctx, name, options) +} + +// Update alters the status subset of an object. +func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { + // We are explicitly setting forceAllowCreate to false in the call to the underlying storage because + // subresources should never allow create on update. + return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, false, options) +} + +type ScaleREST struct { + store *genericregistry.Store + specReplicasPath string + statusReplicasPath string + labelSelectorPath string +} + +// ScaleREST implements Patcher +var _ = rest.Patcher(&ScaleREST{}) +var _ = rest.GroupVersionKindProvider(&ScaleREST{}) + +func (r *ScaleREST) GroupVersionKind(containingGV schema.GroupVersion) schema.GroupVersionKind { + return autoscalingv1.SchemeGroupVersion.WithKind("Scale") +} + +// New creates a new Scale object +func (r *ScaleREST) New() runtime.Object { + return &autoscalingv1.Scale{} +} + +func (r *ScaleREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + obj, err := r.store.Get(ctx, name, options) + if err != nil { + return nil, err + } + cr := obj.(*unstructured.Unstructured) + + scaleObject, replicasFound, err := scaleFromCustomResource(cr, r.specReplicasPath, r.statusReplicasPath, r.labelSelectorPath) + if err != nil { + return nil, err + } + if !replicasFound { + return nil, apierrors.NewInternalError(fmt.Errorf("the spec replicas field %q does not exist", r.specReplicasPath)) + } + return scaleObject, err +} + +func (r *ScaleREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { + obj, err := r.store.Get(ctx, name, &metav1.GetOptions{}) + if err != nil { + return nil, false, err + } + cr := obj.(*unstructured.Unstructured) + + const invalidSpecReplicas = -2147483648 // smallest int32 + oldScale, replicasFound, err := scaleFromCustomResource(cr, r.specReplicasPath, r.statusReplicasPath, r.labelSelectorPath) + if err != nil { + return nil, false, err + } + if !replicasFound { + oldScale.Spec.Replicas = invalidSpecReplicas // signal that this was not set before + } + + obj, err = objInfo.UpdatedObject(ctx, oldScale) + if err != nil { + return nil, false, err + } + if obj == nil { + return nil, false, apierrors.NewBadRequest(fmt.Sprintf("nil update passed to Scale")) + } + + scale, ok := obj.(*autoscalingv1.Scale) + if !ok { + return nil, false, apierrors.NewBadRequest(fmt.Sprintf("wrong object passed to Scale update: %v", obj)) + } + + if scale.Spec.Replicas == invalidSpecReplicas { + return nil, false, apierrors.NewBadRequest(fmt.Sprintf("the spec replicas field %q cannot be empty", r.specReplicasPath)) + } + + specReplicasPath := strings.TrimPrefix(r.specReplicasPath, ".") // ignore leading period + if err = unstructured.SetNestedField(cr.Object, int64(scale.Spec.Replicas), strings.Split(specReplicasPath, ".")...); err != nil { + return nil, false, err + } + cr.SetResourceVersion(scale.ResourceVersion) + + obj, _, err = r.store.Update(ctx, cr.GetName(), rest.DefaultUpdatedObjectInfo(cr), createValidation, updateValidation, false, options) + if err != nil { + return nil, false, err + } + cr = obj.(*unstructured.Unstructured) + + newScale, _, err := scaleFromCustomResource(cr, r.specReplicasPath, r.statusReplicasPath, r.labelSelectorPath) + if err != nil { + return nil, false, apierrors.NewBadRequest(err.Error()) + } + return newScale, false, err +} + +// scaleFromCustomResource returns a scale subresource for a customresource and a bool signalling wether +// the specReplicas value was found. +func scaleFromCustomResource(cr *unstructured.Unstructured, specReplicasPath, statusReplicasPath, labelSelectorPath string) (*autoscalingv1.Scale, bool, error) { + specReplicasPath = strings.TrimPrefix(specReplicasPath, ".") // ignore leading period + specReplicas, foundSpecReplicas, err := unstructured.NestedInt64(cr.UnstructuredContent(), strings.Split(specReplicasPath, ".")...) + if err != nil { + return nil, false, err + } else if !foundSpecReplicas { + specReplicas = 0 + } + + statusReplicasPath = strings.TrimPrefix(statusReplicasPath, ".") // ignore leading period + statusReplicas, found, err := unstructured.NestedInt64(cr.UnstructuredContent(), strings.Split(statusReplicasPath, ".")...) + if err != nil { + return nil, false, err + } else if !found { + statusReplicas = 0 + } + + var labelSelector string + if len(labelSelectorPath) > 0 { + labelSelectorPath = strings.TrimPrefix(labelSelectorPath, ".") // ignore leading period + labelSelector, found, err = unstructured.NestedString(cr.UnstructuredContent(), strings.Split(labelSelectorPath, ".")...) + if err != nil { + return nil, false, err + } + } + + scale := &autoscalingv1.Scale{ + ObjectMeta: metav1.ObjectMeta{ + Name: cr.GetName(), + Namespace: cr.GetNamespace(), + UID: cr.GetUID(), + ResourceVersion: cr.GetResourceVersion(), + CreationTimestamp: cr.GetCreationTimestamp(), + }, + Spec: autoscalingv1.ScaleSpec{ + Replicas: int32(specReplicas), + }, + Status: autoscalingv1.ScaleStatus{ + Replicas: int32(statusReplicas), + Selector: labelSelector, + }, + } + + return scale, foundSpecReplicas, nil } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd_test.go new file mode 100644 index 000000000..0a6870dc0 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd_test.go @@ -0,0 +1,575 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package customresource_test + +import ( + "io" + "reflect" + "strings" + "testing" + "time" + + autoscalingv1 "k8s.io/api/autoscaling/v1" + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/errors" + metainternal "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/registry/generic" + registrytest "k8s.io/apiserver/pkg/registry/generic/testing" + "k8s.io/apiserver/pkg/registry/rest" + etcdtesting "k8s.io/apiserver/pkg/storage/etcd/testing" + + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + "k8s.io/apiextensions-apiserver/pkg/apiserver" + "k8s.io/apiextensions-apiserver/pkg/crdserverscheme" + "k8s.io/apiextensions-apiserver/pkg/registry/customresource" + "k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor" +) + +func newStorage(t *testing.T) (customresource.CustomResourceStorage, *etcdtesting.EtcdTestServer) { + server, etcdStorage := etcdtesting.NewUnsecuredEtcd3TestClientServer(t) + etcdStorage.Codec = unstructuredJsonCodec{} + restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1, ResourcePrefix: "noxus"} + + parameterScheme := runtime.NewScheme() + parameterScheme.AddUnversionedTypes(schema.GroupVersion{Group: "mygroup.example.com", Version: "v1beta1"}, + &metav1.ListOptions{}, + &metav1.ExportOptions{}, + &metav1.GetOptions{}, + &metav1.DeleteOptions{}, + ) + + typer := apiserver.UnstructuredObjectTyper{ + Delegate: parameterScheme, + UnstructuredTyper: crdserverscheme.NewUnstructuredObjectTyper(), + } + + kind := schema.GroupVersionKind{Group: "mygroup.example.com", Version: "v1beta1", Kind: "Noxu"} + + labelSelectorPath := ".status.labelSelector" + scale := &apiextensions.CustomResourceSubresourceScale{ + SpecReplicasPath: ".spec.replicas", + StatusReplicasPath: ".status.replicas", + LabelSelectorPath: &labelSelectorPath, + } + + status := &apiextensions.CustomResourceSubresourceStatus{} + + headers := []apiextensions.CustomResourceColumnDefinition{ + {Name: "Age", Type: "date", JSONPath: ".metadata.creationTimestamp"}, + {Name: "Replicas", Type: "integer", JSONPath: ".spec.replicas"}, + {Name: "Missing", Type: "string", JSONPath: ".spec.missing"}, + {Name: "Invalid", Type: "integer", JSONPath: ".spec.string"}, + {Name: "String", Type: "string", JSONPath: ".spec.string"}, + {Name: "StringFloat64", Type: "string", JSONPath: ".spec.float64"}, + {Name: "StringInt64", Type: "string", JSONPath: ".spec.replicas"}, + {Name: "StringBool", Type: "string", JSONPath: ".spec.bool"}, + {Name: "Float64", Type: "number", JSONPath: ".spec.float64"}, + {Name: "Bool", Type: "boolean", JSONPath: ".spec.bool"}, + } + table, _ := tableconvertor.New(headers) + + storage := customresource.NewStorage( + schema.GroupResource{Group: "mygroup.example.com", Resource: "noxus"}, + schema.GroupVersionKind{Group: "mygroup.example.com", Version: "v1beta1", Kind: "NoxuItemList"}, + customresource.NewStrategy( + typer, + true, + kind, + nil, + nil, + status, + scale, + ), + restOptions, + []string{"all"}, + table, + ) + + return storage, server +} + +// createCustomResource is a helper function that returns a CustomResource with the updated resource version. +func createCustomResource(storage *customresource.REST, cr unstructured.Unstructured, t *testing.T) (unstructured.Unstructured, error) { + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), cr.GetNamespace()) + obj, err := storage.Create(ctx, &cr, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("Failed to create CustomResource, %v", err) + } + newCR := obj.(*unstructured.Unstructured) + return *newCR, nil +} + +func validNewCustomResource() *unstructured.Unstructured { + return &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": "mygroup.example.com/v1beta1", + "kind": "Noxu", + "metadata": map[string]interface{}{ + "namespace": "default", + "name": "foo", + "creationTimestamp": time.Now().Add(-time.Hour*12 - 30*time.Minute).UTC().Format(time.RFC3339), + }, + "spec": map[string]interface{}{ + "replicas": int64(7), + "string": "string", + "float64": float64(3.1415926), + "bool": true, + "stringList": []interface{}{"foo", "bar"}, + "mixedList": []interface{}{"foo", int64(42)}, + "nonPrimitiveList": []interface{}{"foo", []interface{}{int64(1), int64(2)}}, + }, + }, + } +} + +var validCustomResource = *validNewCustomResource() + +func TestCreate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + test := registrytest.New(t, storage.CustomResource.Store) + cr := validNewCustomResource() + cr.SetNamespace("") + test.TestCreate( + cr, + ) +} + +func TestGet(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + test := registrytest.New(t, storage.CustomResource.Store) + test.TestGet(validNewCustomResource()) +} + +func TestList(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + test := registrytest.New(t, storage.CustomResource.Store) + test.TestList(validNewCustomResource()) +} + +func TestDelete(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + test := registrytest.New(t, storage.CustomResource.Store) + test.TestDelete(validNewCustomResource()) +} + +func TestGenerationNumber(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + modifiedRno := *validNewCustomResource() + modifiedRno.SetGeneration(10) + ctx := genericapirequest.NewDefaultContext() + cr, err := createCustomResource(storage.CustomResource, modifiedRno, t) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + etcdCR, err := storage.CustomResource.Get(ctx, cr.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + storedCR, _ := etcdCR.(*unstructured.Unstructured) + + // Generation initialization + if storedCR.GetGeneration() != 1 { + t.Fatalf("Unexpected generation number %v", storedCR.GetGeneration()) + } + + // Updates to spec should increment the generation number + setSpecReplicas(storedCR, getSpecReplicas(storedCR)+1) + if _, _, err := storage.CustomResource.Update(ctx, storedCR.GetName(), rest.DefaultUpdatedObjectInfo(storedCR), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil { + t.Errorf("unexpected error: %v", err) + } + etcdCR, err = storage.CustomResource.Get(ctx, cr.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + storedCR, _ = etcdCR.(*unstructured.Unstructured) + if storedCR.GetGeneration() != 2 { + t.Fatalf("Unexpected generation, spec: %v", storedCR.GetGeneration()) + } + + // Updates to status should not increment the generation number + setStatusReplicas(storedCR, getStatusReplicas(storedCR)+1) + if _, _, err := storage.CustomResource.Update(ctx, storedCR.GetName(), rest.DefaultUpdatedObjectInfo(storedCR), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil { + t.Errorf("unexpected error: %v", err) + } + etcdCR, err = storage.CustomResource.Get(ctx, cr.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + storedCR, _ = etcdCR.(*unstructured.Unstructured) + if storedCR.GetGeneration() != 2 { + t.Fatalf("Unexpected generation, spec: %v", storedCR.GetGeneration()) + } + +} + +func TestCategories(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + + expected := []string{"all"} + actual := storage.CustomResource.Categories() + ok := reflect.DeepEqual(actual, expected) + if !ok { + t.Errorf("categories are not equal. expected = %v actual = %v", expected, actual) + } +} + +func TestColumns(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/noxus/" + metav1.NamespaceDefault + "/foo" + validCustomResource := validNewCustomResource() + if err := storage.CustomResource.Storage.Create(ctx, key, validCustomResource, nil, 0, false); err != nil { + t.Fatalf("unexpected error: %v", err) + } + + gottenList, err := storage.CustomResource.List(ctx, &metainternal.ListOptions{}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + tbl, err := storage.CustomResource.ConvertToTable(ctx, gottenList, &metav1beta1.TableOptions{}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + expectedColumns := []struct { + Name, Type string + }{ + {"Name", "string"}, + {"Age", "date"}, + {"Replicas", "integer"}, + {"Missing", "string"}, + {"Invalid", "integer"}, + {"String", "string"}, + {"StringFloat64", "string"}, + {"StringInt64", "string"}, + {"StringBool", "string"}, + {"Float64", "number"}, + {"Bool", "boolean"}, + } + if len(tbl.ColumnDefinitions) != len(expectedColumns) { + t.Fatalf("got %d columns, expected %d. Got: %+v", len(tbl.ColumnDefinitions), len(expectedColumns), tbl.ColumnDefinitions) + } + for i, d := range tbl.ColumnDefinitions { + if d.Name != expectedColumns[i].Name { + t.Errorf("got column %d name %q, expected %q", i, d.Name, expectedColumns[i].Name) + } + if d.Type != expectedColumns[i].Type { + t.Errorf("got column %d type %q, expected %q", i, d.Type, expectedColumns[i].Type) + } + } + + expectedRows := [][]interface{}{ + { + "foo", + "12h", + int64(7), + nil, + nil, + "string", + "3.1415926", + "7", + "true", + float64(3.1415926), + true, + }, + } + for i, r := range tbl.Rows { + if !reflect.DeepEqual(r.Cells, expectedRows[i]) { + t.Errorf("got row %d with cells %#v, expected %#v", i, r.Cells, expectedRows[i]) + } + } +} + +func TestStatusUpdate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/noxus/" + metav1.NamespaceDefault + "/foo" + validCustomResource := validNewCustomResource() + if err := storage.CustomResource.Storage.Create(ctx, key, validCustomResource, nil, 0, false); err != nil { + t.Fatalf("unexpected error: %v", err) + } + + gottenObj, err := storage.CustomResource.Get(ctx, "foo", &metav1.GetOptions{}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + update := gottenObj.(*unstructured.Unstructured) + updateContent := update.Object + updateContent["status"] = map[string]interface{}{ + "replicas": int64(7), + } + + if _, _, err := storage.Status.Update(ctx, update.GetName(), rest.DefaultUpdatedObjectInfo(update), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil { + t.Fatalf("unexpected error: %v", err) + } + + obj, err := storage.CustomResource.Get(ctx, "foo", &metav1.GetOptions{}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + cr, ok := obj.(*unstructured.Unstructured) + if !ok { + t.Fatal("unexpected error: custom resource should be of type Unstructured") + } + content := cr.UnstructuredContent() + + spec := content["spec"].(map[string]interface{}) + status := content["status"].(map[string]interface{}) + + if spec["replicas"].(int64) != 7 { + t.Errorf("we expected .spec.replicas to not be updated but it was updated to %v", spec["replicas"].(int64)) + } + if status["replicas"].(int64) != 7 { + t.Errorf("we expected .status.replicas to be updated to %d but it was %v", 7, status["replicas"].(int64)) + } +} + +func TestScaleGet(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + + name := "foo" + + var cr unstructured.Unstructured + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/noxus/" + metav1.NamespaceDefault + "/" + name + if err := storage.CustomResource.Storage.Create(ctx, key, &validCustomResource, &cr, 0, false); err != nil { + t.Fatalf("error setting new custom resource (key: %s) %v: %v", key, validCustomResource, err) + } + + want := &autoscalingv1.Scale{ + ObjectMeta: metav1.ObjectMeta{ + Name: cr.GetName(), + Namespace: metav1.NamespaceDefault, + UID: cr.GetUID(), + ResourceVersion: cr.GetResourceVersion(), + CreationTimestamp: cr.GetCreationTimestamp(), + }, + Spec: autoscalingv1.ScaleSpec{ + Replicas: int32(7), + }, + } + + obj, err := storage.Scale.Get(ctx, name, &metav1.GetOptions{}) + if err != nil { + t.Fatalf("error fetching scale for %s: %v", name, err) + } + + got := obj.(*autoscalingv1.Scale) + if !apiequality.Semantic.DeepEqual(got, want) { + t.Errorf("unexpected scale: %s", diff.ObjectDiff(got, want)) + } +} + +func TestScaleGetWithoutSpecReplicas(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + + name := "foo" + + var cr unstructured.Unstructured + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/noxus/" + metav1.NamespaceDefault + "/" + name + withoutSpecReplicas := validCustomResource.DeepCopy() + unstructured.RemoveNestedField(withoutSpecReplicas.Object, "spec", "replicas") + if err := storage.CustomResource.Storage.Create(ctx, key, withoutSpecReplicas, &cr, 0, false); err != nil { + t.Fatalf("error setting new custom resource (key: %s) %v: %v", key, withoutSpecReplicas, err) + } + + _, err := storage.Scale.Get(ctx, name, &metav1.GetOptions{}) + if err == nil { + t.Fatalf("error expected for %s", name) + } + if expected := `the spec replicas field ".spec.replicas" does not exist`; !strings.Contains(err.Error(), expected) { + t.Fatalf("expected error string %q, got: %v", expected, err) + } +} + +func TestScaleUpdate(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + + name := "foo" + + var cr unstructured.Unstructured + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/noxus/" + metav1.NamespaceDefault + "/" + name + if err := storage.CustomResource.Storage.Create(ctx, key, &validCustomResource, &cr, 0, false); err != nil { + t.Fatalf("error setting new custom resource (key: %s) %v: %v", key, validCustomResource, err) + } + + obj, err := storage.Scale.Get(ctx, name, &metav1.GetOptions{}) + if err != nil { + t.Fatalf("error fetching scale for %s: %v", name, err) + } + scale, ok := obj.(*autoscalingv1.Scale) + if !ok { + t.Fatalf("%v is not of the type autoscalingv1.Scale", scale) + } + + replicas := 12 + update := autoscalingv1.Scale{ + ObjectMeta: scale.ObjectMeta, + Spec: autoscalingv1.ScaleSpec{ + Replicas: int32(replicas), + }, + } + + if _, _, err := storage.Scale.Update(ctx, update.Name, rest.DefaultUpdatedObjectInfo(&update), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil { + t.Fatalf("error updating scale %v: %v", update, err) + } + + obj, err = storage.Scale.Get(ctx, name, &metav1.GetOptions{}) + if err != nil { + t.Fatalf("error fetching scale for %s: %v", name, err) + } + scale = obj.(*autoscalingv1.Scale) + if scale.Spec.Replicas != int32(replicas) { + t.Errorf("wrong replicas count: expected: %d got: %d", replicas, scale.Spec.Replicas) + } + + update.ResourceVersion = scale.ResourceVersion + update.Spec.Replicas = 15 + + if _, _, err = storage.Scale.Update(ctx, update.Name, rest.DefaultUpdatedObjectInfo(&update), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil && !errors.IsConflict(err) { + t.Fatalf("unexpected error, expecting an update conflict but got %v", err) + } +} + +func TestScaleUpdateWithoutSpecReplicas(t *testing.T) { + storage, server := newStorage(t) + defer server.Terminate(t) + defer storage.CustomResource.Store.DestroyFunc() + + name := "foo" + + var cr unstructured.Unstructured + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := "/noxus/" + metav1.NamespaceDefault + "/" + name + withoutSpecReplicas := validCustomResource.DeepCopy() + unstructured.RemoveNestedField(withoutSpecReplicas.Object, "spec", "replicas") + if err := storage.CustomResource.Storage.Create(ctx, key, withoutSpecReplicas, &cr, 0, false); err != nil { + t.Fatalf("error setting new custom resource (key: %s) %v: %v", key, withoutSpecReplicas, err) + } + + replicas := 12 + update := autoscalingv1.Scale{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + ResourceVersion: cr.GetResourceVersion(), + }, + Spec: autoscalingv1.ScaleSpec{ + Replicas: int32(replicas), + }, + } + + if _, _, err := storage.Scale.Update(ctx, update.Name, rest.DefaultUpdatedObjectInfo(&update), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}); err != nil { + t.Fatalf("error updating scale %v: %v", update, err) + } + + obj, err := storage.Scale.Get(ctx, name, &metav1.GetOptions{}) + if err != nil { + t.Fatalf("error fetching scale for %s: %v", name, err) + } + scale := obj.(*autoscalingv1.Scale) + if scale.Spec.Replicas != int32(replicas) { + t.Errorf("wrong replicas count: expected: %d got: %d", replicas, scale.Spec.Replicas) + } +} + +type unstructuredJsonCodec struct{} + +func (c unstructuredJsonCodec) Decode(data []byte, defaults *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { + obj := into.(*unstructured.Unstructured) + err := obj.UnmarshalJSON(data) + if err != nil { + return nil, nil, err + } + gvk := obj.GroupVersionKind() + return obj, &gvk, nil +} + +func (c unstructuredJsonCodec) Encode(obj runtime.Object, w io.Writer) error { + u := obj.(*unstructured.Unstructured) + bs, err := u.MarshalJSON() + if err != nil { + return err + } + w.Write(bs) + return nil +} + +func setSpecReplicas(u *unstructured.Unstructured, replicas int64) { + setNestedField(u, replicas, "spec", "replicas") +} + +func getSpecReplicas(u *unstructured.Unstructured) int64 { + val, found, err := unstructured.NestedInt64(u.Object, "spec", "replicas") + if !found || err != nil { + return 0 + } + return val +} + +func setStatusReplicas(u *unstructured.Unstructured, replicas int64) { + setNestedField(u, replicas, "status", "replicas") +} + +func getStatusReplicas(u *unstructured.Unstructured) int64 { + val, found, err := unstructured.NestedInt64(u.Object, "status", "replicas") + if !found || err != nil { + return 0 + } + return val +} + +func setNestedField(u *unstructured.Unstructured, value interface{}, fields ...string) { + if u.Object == nil { + u.Object = make(map[string]interface{}) + } + unstructured.SetNestedField(u.Object, value, fields...) +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy.go new file mode 100644 index 000000000..1710eb2e1 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy.go @@ -0,0 +1,59 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package customresource + +import ( + "context" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" +) + +type statusStrategy struct { + customResourceStrategy +} + +func NewStatusStrategy(strategy customResourceStrategy) statusStrategy { + return statusStrategy{strategy} +} + +func (a statusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + // update is only allowed to set status + newCustomResourceObject := obj.(*unstructured.Unstructured) + newCustomResource := newCustomResourceObject.UnstructuredContent() + status, ok := newCustomResource["status"] + + // copy old object into new object + oldCustomResourceObject := old.(*unstructured.Unstructured) + // overridding the resourceVersion in metadata is safe here, we have already checked that + // new object and old object have the same resourceVersion. + *newCustomResourceObject = *oldCustomResourceObject.DeepCopy() + + // set status + newCustomResource = newCustomResourceObject.UnstructuredContent() + if ok { + newCustomResource["status"] = status + } else { + delete(newCustomResource, "status") + } +} + +// ValidateUpdate is the default update validation for an end user updating status. +func (a statusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + return a.customResourceStrategy.validator.ValidateStatusUpdate(ctx, obj, old, a.scale) +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy_test.go new file mode 100644 index 000000000..8a651d12b --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy_test.go @@ -0,0 +1,138 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package customresource + +import ( + "context" + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" +) + +func TestPrepareForUpdate(t *testing.T) { + strategy := statusStrategy{} + tcs := []struct { + old *unstructured.Unstructured + obj *unstructured.Unstructured + expected *unstructured.Unstructured + }{ + { + // changes to spec are ignored + old: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + }, + }, + obj: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "new", + }, + }, + expected: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + }, + }, + }, + { + // changes to other places are also ignored + old: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + }, + }, + obj: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "new": "new", + }, + }, + expected: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + }, + }, + }, + { + // delete status + old: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + "status": "old", + }, + }, + obj: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + }, + }, + expected: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + }, + }, + }, + { + // update status + old: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + "status": "old", + }, + }, + obj: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "status": "new", + }, + }, + expected: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + "status": "new", + }, + }, + }, + { + // update status and other parts + old: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + "status": "old", + }, + }, + obj: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "new", + "new": "new", + "status": "new", + }, + }, + expected: &unstructured.Unstructured{ + Object: map[string]interface{}{ + "spec": "old", + "status": "new", + }, + }, + }, + } + for index, tc := range tcs { + strategy.PrepareForUpdate(context.TODO(), tc.obj, tc.old) + if !reflect.DeepEqual(tc.obj, tc.expected) { + t.Errorf("test %d failed: expected: %v, got %v", index, tc.expected, tc.obj) + } + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go index f001dc57a..4895e287a 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy.go @@ -17,12 +17,12 @@ limitations under the License. package customresource import ( - "fmt" + "context" "github.com/go-openapi/validate" + apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/api/validation" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/fields" @@ -30,64 +30,129 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apiserver/pkg/storage" + apiserverstorage "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/names" + utilfeature "k8s.io/apiserver/pkg/util/feature" - apiservervalidation "k8s.io/apiextensions-apiserver/pkg/apiserver/validation" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + apiextensionsfeatures "k8s.io/apiextensions-apiserver/pkg/features" ) -type customResourceDefinitionStorageStrategy struct { +// customResourceStrategy implements behavior for CustomResources. +type customResourceStrategy struct { runtime.ObjectTyper names.NameGenerator namespaceScoped bool validator customResourceValidator + status *apiextensions.CustomResourceSubresourceStatus + scale *apiextensions.CustomResourceSubresourceScale } -func NewStrategy(typer runtime.ObjectTyper, namespaceScoped bool, kind schema.GroupVersionKind, validator *validate.SchemaValidator) customResourceDefinitionStorageStrategy { - return customResourceDefinitionStorageStrategy{ +func NewStrategy(typer runtime.ObjectTyper, namespaceScoped bool, kind schema.GroupVersionKind, schemaValidator, statusSchemaValidator *validate.SchemaValidator, status *apiextensions.CustomResourceSubresourceStatus, scale *apiextensions.CustomResourceSubresourceScale) customResourceStrategy { + return customResourceStrategy{ ObjectTyper: typer, NameGenerator: names.SimpleNameGenerator, namespaceScoped: namespaceScoped, + status: status, + scale: scale, validator: customResourceValidator{ - namespaceScoped: namespaceScoped, - kind: kind, - validator: validator, + namespaceScoped: namespaceScoped, + kind: kind, + schemaValidator: schemaValidator, + statusSchemaValidator: statusSchemaValidator, }, } } -func (a customResourceDefinitionStorageStrategy) NamespaceScoped() bool { +func (a customResourceStrategy) NamespaceScoped() bool { return a.namespaceScoped } -func (customResourceDefinitionStorageStrategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) { +// PrepareForCreate clears the status of a CustomResource before creation. +func (a customResourceStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { + if utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) && a.status != nil { + customResourceObject := obj.(*unstructured.Unstructured) + customResource := customResourceObject.UnstructuredContent() + + // create cannot set status + if _, ok := customResource["status"]; ok { + delete(customResource, "status") + } + } + + accessor, _ := meta.Accessor(obj) + accessor.SetGeneration(1) } -func (customResourceDefinitionStorageStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime.Object) { +// PrepareForUpdate clears fields that are not allowed to be set by end users on update. +func (a customResourceStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + if !utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) || a.status == nil { + return + } + + newCustomResourceObject := obj.(*unstructured.Unstructured) + oldCustomResourceObject := old.(*unstructured.Unstructured) + + newCustomResource := newCustomResourceObject.UnstructuredContent() + oldCustomResource := oldCustomResourceObject.UnstructuredContent() + + // update is not allowed to set status + _, ok1 := newCustomResource["status"] + _, ok2 := oldCustomResource["status"] + switch { + case ok2: + newCustomResource["status"] = oldCustomResource["status"] + case ok1: + delete(newCustomResource, "status") + } + + // Any changes to the spec increment the generation number, any changes to the + // status should reflect the generation number of the corresponding object. We push + // the burden of managing the status onto the clients because we can't (in general) + // know here what version of spec the writer of the status has seen. It may seem like + // we can at first -- since obj contains spec -- but in the future we will probably make + // status its own object, and even if we don't, writes may be the result of a + // read-update-write loop, so the contents of spec may not actually be the spec that + // the CustomResource has *seen*. + newSpec, ok1 := newCustomResource["spec"] + oldSpec, ok2 := oldCustomResource["spec"] + + // spec is changed, created or deleted + if (ok1 && ok2 && !apiequality.Semantic.DeepEqual(oldSpec, newSpec)) || (ok1 && !ok2) || (!ok1 && ok2) { + oldAccessor, _ := meta.Accessor(oldCustomResourceObject) + newAccessor, _ := meta.Accessor(newCustomResourceObject) + newAccessor.SetGeneration(oldAccessor.GetGeneration() + 1) + } } -func (a customResourceDefinitionStorageStrategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList { - return a.validator.Validate(ctx, obj) +// Validate validates a new CustomResource. +func (a customResourceStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + return a.validator.Validate(ctx, obj, a.scale) } -func (customResourceDefinitionStorageStrategy) AllowCreateOnUpdate() bool { - return false +// Canonicalize normalizes the object after validation. +func (customResourceStrategy) Canonicalize(obj runtime.Object) { } -func (customResourceDefinitionStorageStrategy) AllowUnconditionalUpdate() bool { +// AllowCreateOnUpdate is false for CustomResources; this means a POST is +// needed to create one. +func (customResourceStrategy) AllowCreateOnUpdate() bool { return false } -func (customResourceDefinitionStorageStrategy) Canonicalize(obj runtime.Object) { +// AllowUnconditionalUpdate is the default update policy for CustomResource objects. +func (customResourceStrategy) AllowUnconditionalUpdate() bool { + return false } -func (a customResourceDefinitionStorageStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList { - return a.validator.ValidateUpdate(ctx, obj, old) +// ValidateUpdate is the default update validation for an end user updating status. +func (a customResourceStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + return a.validator.ValidateUpdate(ctx, obj, old, a.scale) } -func (a customResourceDefinitionStorageStrategy) GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { +// GetAttrs returns labels and fields of a given object for filtering purposes. +func (a customResourceStrategy) GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { accessor, err := meta.Accessor(obj) if err != nil { return nil, nil, false, err @@ -108,80 +173,13 @@ func objectMetaFieldsSet(objectMeta metav1.Object, namespaceScoped bool) fields. } } -func (a customResourceDefinitionStorageStrategy) MatchCustomResourceDefinitionStorage(label labels.Selector, field fields.Selector) storage.SelectionPredicate { - return storage.SelectionPredicate{ +// MatchCustomResourceDefinitionStorage is the filter used by the generic etcd backend to route +// watch events from etcd to clients of the apiserver only interested in specific +// labels/fields. +func (a customResourceStrategy) MatchCustomResourceDefinitionStorage(label labels.Selector, field fields.Selector) apiserverstorage.SelectionPredicate { + return apiserverstorage.SelectionPredicate{ Label: label, Field: field, GetAttrs: a.GetAttrs, } } - -type customResourceValidator struct { - namespaceScoped bool - kind schema.GroupVersionKind - validator *validate.SchemaValidator -} - -func (a customResourceValidator) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList { - accessor, err := meta.Accessor(obj) - if err != nil { - return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} - } - typeAccessor, err := meta.TypeAccessor(obj) - if err != nil { - return field.ErrorList{field.Invalid(field.NewPath("kind"), nil, err.Error())} - } - if typeAccessor.GetKind() != a.kind.Kind { - return field.ErrorList{field.Invalid(field.NewPath("kind"), typeAccessor.GetKind(), fmt.Sprintf("must be %v", a.kind.Kind))} - } - if typeAccessor.GetAPIVersion() != a.kind.Group+"/"+a.kind.Version { - return field.ErrorList{field.Invalid(field.NewPath("apiVersion"), typeAccessor.GetAPIVersion(), fmt.Sprintf("must be %v", a.kind.Group+"/"+a.kind.Version))} - } - - customResourceObject, ok := obj.(*unstructured.Unstructured) - // this will never happen. - if !ok { - return field.ErrorList{field.Invalid(field.NewPath(""), customResourceObject, fmt.Sprintf("has type %T. Must be a pointer to an Unstructured type", customResourceObject))} - } - - customResource := customResourceObject.UnstructuredContent() - if err = apiservervalidation.ValidateCustomResource(customResource, a.validator); err != nil { - return field.ErrorList{field.Invalid(field.NewPath(""), customResource, err.Error())} - } - - return validation.ValidateObjectMetaAccessor(accessor, a.namespaceScoped, validation.NameIsDNSSubdomain, field.NewPath("metadata")) -} - -func (a customResourceValidator) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList { - objAccessor, err := meta.Accessor(obj) - if err != nil { - return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} - } - oldAccessor, err := meta.Accessor(old) - if err != nil { - return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} - } - typeAccessor, err := meta.TypeAccessor(obj) - if err != nil { - return field.ErrorList{field.Invalid(field.NewPath("kind"), nil, err.Error())} - } - if typeAccessor.GetKind() != a.kind.Kind { - return field.ErrorList{field.Invalid(field.NewPath("kind"), typeAccessor.GetKind(), fmt.Sprintf("must be %v", a.kind.Kind))} - } - if typeAccessor.GetAPIVersion() != a.kind.Group+"/"+a.kind.Version { - return field.ErrorList{field.Invalid(field.NewPath("apiVersion"), typeAccessor.GetAPIVersion(), fmt.Sprintf("must be %v", a.kind.Group+"/"+a.kind.Version))} - } - - customResourceObject, ok := obj.(*unstructured.Unstructured) - // this will never happen. - if !ok { - return field.ErrorList{field.Invalid(field.NewPath(""), customResourceObject, fmt.Sprintf("has type %T. Must be a pointer to an Unstructured type", customResourceObject))} - } - - customResource := customResourceObject.UnstructuredContent() - if err = apiservervalidation.ValidateCustomResource(customResource, a.validator); err != nil { - return field.ErrorList{field.Invalid(field.NewPath(""), customResource, err.Error())} - } - - return validation.ValidateObjectMetaAccessorUpdate(objAccessor, oldAccessor, field.NewPath("metadata")) -} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go new file mode 100644 index 000000000..e1bed809d --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor.go @@ -0,0 +1,172 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tableconvertor + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "reflect" + + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + "k8s.io/apimachinery/pkg/api/meta" + metatable "k8s.io/apimachinery/pkg/api/meta/table" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/client-go/util/jsonpath" +) + +var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() + +// New creates a new table convertor for the provided CRD column definition. If the printer definition cannot be parsed, +// error will be returned along with a default table convertor. +func New(crdColumns []apiextensions.CustomResourceColumnDefinition) (rest.TableConvertor, error) { + headers := []metav1beta1.TableColumnDefinition{ + {Name: "Name", Type: "string", Format: "name", Description: swaggerMetadataDescriptions["name"]}, + } + c := &convertor{ + headers: headers, + } + + for _, col := range crdColumns { + path := jsonpath.New(col.Name) + if err := path.Parse(fmt.Sprintf("{%s}", col.JSONPath)); err != nil { + return c, fmt.Errorf("unrecognized column definition %q", col.JSONPath) + } + path.AllowMissingKeys(true) + + desc := fmt.Sprintf("Custom resource definition column (in JSONPath format): %s", col.JSONPath) + if len(col.Description) > 0 { + desc = col.Description + } + + c.additionalColumns = append(c.additionalColumns, path) + c.headers = append(c.headers, metav1beta1.TableColumnDefinition{ + Name: col.Name, + Type: col.Type, + Format: col.Format, + Description: desc, + Priority: col.Priority, + }) + } + + return c, nil +} + +type convertor struct { + headers []metav1beta1.TableColumnDefinition + additionalColumns []*jsonpath.JSONPath +} + +func (c *convertor) ConvertToTable(ctx context.Context, obj runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error) { + table := &metav1beta1.Table{ + ColumnDefinitions: c.headers, + } + if m, err := meta.ListAccessor(obj); err == nil { + table.ResourceVersion = m.GetResourceVersion() + table.SelfLink = m.GetSelfLink() + table.Continue = m.GetContinue() + } else { + if m, err := meta.CommonAccessor(obj); err == nil { + table.ResourceVersion = m.GetResourceVersion() + table.SelfLink = m.GetSelfLink() + } + } + + var err error + buf := &bytes.Buffer{} + table.Rows, err = metatable.MetaToTableRow(obj, func(obj runtime.Object, m metav1.Object, name, age string) ([]interface{}, error) { + cells := make([]interface{}, 1, 1+len(c.additionalColumns)) + cells[0] = name + customHeaders := c.headers[1:] + for i, column := range c.additionalColumns { + results, err := column.FindResults(obj.(runtime.Unstructured).UnstructuredContent()) + if err != nil || len(results) == 0 || len(results[0]) == 0 { + cells = append(cells, nil) + continue + } + + // as we only support simple JSON path, we can assume to have only one result (or none, filtered out above) + value := results[0][0].Interface() + if customHeaders[i].Type == "string" { + if err := column.PrintResults(buf, []reflect.Value{reflect.ValueOf(value)}); err == nil { + cells = append(cells, buf.String()) + buf.Reset() + } else { + cells = append(cells, nil) + } + } else { + cells = append(cells, cellForJSONValue(customHeaders[i].Type, value)) + } + } + return cells, nil + }) + return table, err +} + +func cellForJSONValue(headerType string, value interface{}) interface{} { + if value == nil { + return nil + } + + switch headerType { + case "integer": + switch typed := value.(type) { + case int64: + return typed + case float64: + return int64(typed) + case json.Number: + if i64, err := typed.Int64(); err == nil { + return i64 + } + } + case "number": + switch typed := value.(type) { + case int64: + return float64(typed) + case float64: + return typed + case json.Number: + if f, err := typed.Float64(); err == nil { + return f + } + } + case "boolean": + if b, ok := value.(bool); ok { + return b + } + case "string": + if s, ok := value.(string); ok { + return s + } + case "date": + if typed, ok := value.(string); ok { + var timestamp metav1.Time + err := timestamp.UnmarshalQueryParameter(typed) + if err != nil { + return "" + } + return metatable.ConvertToHumanReadableDateType(timestamp) + } + } + + return nil +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor_test.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor_test.go new file mode 100644 index 000000000..179aabb8a --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/tableconvertor/tableconvertor_test.go @@ -0,0 +1,68 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tableconvertor + +import ( + "fmt" + "reflect" + "testing" + "time" +) + +func Test_cellForJSONValue(t *testing.T) { + tests := []struct { + headerType string + value interface{} + want interface{} + }{ + {"integer", int64(42), int64(42)}, + {"integer", float64(3.14), int64(3)}, + {"integer", true, nil}, + {"integer", "foo", nil}, + + {"number", int64(42), float64(42)}, + {"number", float64(3.14), float64(3.14)}, + {"number", true, nil}, + {"number", "foo", nil}, + + {"boolean", int64(42), nil}, + {"boolean", float64(3.14), nil}, + {"boolean", true, true}, + {"boolean", "foo", nil}, + + {"string", int64(42), nil}, + {"string", float64(3.14), nil}, + {"string", true, nil}, + {"string", "foo", "foo"}, + + {"date", int64(42), nil}, + {"date", float64(3.14), nil}, + {"date", true, nil}, + {"date", time.Now().Add(-time.Hour*12 - 30*time.Minute).UTC().Format(time.RFC3339), "12h"}, + {"date", time.Now().Add(+time.Hour*12 + 30*time.Minute).UTC().Format(time.RFC3339), ""}, + {"date", "", ""}, + + {"unknown", "foo", nil}, + } + for _, tt := range tests { + t.Run(fmt.Sprintf("%#v of type %s", tt.value, tt.headerType), func(t *testing.T) { + if got := cellForJSONValue(tt.headerType, tt.value); !reflect.DeepEqual(got, tt.want) { + t.Errorf("cellForJSONValue() = %#v, want %#v", got, tt.want) + } + }) + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go new file mode 100644 index 000000000..5206a17eb --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresource/validator.go @@ -0,0 +1,195 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package customresource + +import ( + "context" + "fmt" + "math" + "strings" + + "github.com/go-openapi/validate" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/api/validation" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/validation/field" + + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" + apiservervalidation "k8s.io/apiextensions-apiserver/pkg/apiserver/validation" +) + +type customResourceValidator struct { + namespaceScoped bool + kind schema.GroupVersionKind + schemaValidator *validate.SchemaValidator + statusSchemaValidator *validate.SchemaValidator +} + +func (a customResourceValidator) Validate(ctx context.Context, obj runtime.Object, scale *apiextensions.CustomResourceSubresourceScale) field.ErrorList { + u, ok := obj.(*unstructured.Unstructured) + if !ok { + return field.ErrorList{field.Invalid(field.NewPath(""), u, fmt.Sprintf("has type %T. Must be a pointer to an Unstructured type", u))} + } + accessor, err := meta.Accessor(obj) + if err != nil { + return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} + } + + if errs := a.ValidateTypeMeta(ctx, u); len(errs) > 0 { + return errs + } + + var allErrs field.ErrorList + + allErrs = append(allErrs, validation.ValidateObjectMetaAccessor(accessor, a.namespaceScoped, validation.NameIsDNSSubdomain, field.NewPath("metadata"))...) + if err = apiservervalidation.ValidateCustomResource(u.UnstructuredContent(), a.schemaValidator); err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath(""), u.UnstructuredContent(), err.Error())) + } + allErrs = append(allErrs, a.ValidateScaleSpec(ctx, u, scale)...) + allErrs = append(allErrs, a.ValidateScaleStatus(ctx, u, scale)...) + + return allErrs +} + +func (a customResourceValidator) ValidateUpdate(ctx context.Context, obj, old runtime.Object, scale *apiextensions.CustomResourceSubresourceScale) field.ErrorList { + u, ok := obj.(*unstructured.Unstructured) + if !ok { + return field.ErrorList{field.Invalid(field.NewPath(""), u, fmt.Sprintf("has type %T. Must be a pointer to an Unstructured type", u))} + } + objAccessor, err := meta.Accessor(obj) + if err != nil { + return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} + } + oldAccessor, err := meta.Accessor(old) + if err != nil { + return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} + } + + if errs := a.ValidateTypeMeta(ctx, u); len(errs) > 0 { + return errs + } + + var allErrs field.ErrorList + + allErrs = append(allErrs, validation.ValidateObjectMetaAccessorUpdate(objAccessor, oldAccessor, field.NewPath("metadata"))...) + if err = apiservervalidation.ValidateCustomResource(u.UnstructuredContent(), a.schemaValidator); err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath(""), u.UnstructuredContent(), err.Error())) + } + allErrs = append(allErrs, a.ValidateScaleSpec(ctx, u, scale)...) + allErrs = append(allErrs, a.ValidateScaleStatus(ctx, u, scale)...) + + return allErrs +} + +func (a customResourceValidator) ValidateStatusUpdate(ctx context.Context, obj, old runtime.Object, scale *apiextensions.CustomResourceSubresourceScale) field.ErrorList { + u, ok := obj.(*unstructured.Unstructured) + if !ok { + return field.ErrorList{field.Invalid(field.NewPath(""), u, fmt.Sprintf("has type %T. Must be a pointer to an Unstructured type", u))} + } + objAccessor, err := meta.Accessor(obj) + if err != nil { + return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} + } + oldAccessor, err := meta.Accessor(old) + if err != nil { + return field.ErrorList{field.Invalid(field.NewPath("metadata"), nil, err.Error())} + } + + if errs := a.ValidateTypeMeta(ctx, u); len(errs) > 0 { + return errs + } + + var allErrs field.ErrorList + + allErrs = append(allErrs, validation.ValidateObjectMetaAccessorUpdate(objAccessor, oldAccessor, field.NewPath("metadata"))...) + if err = apiservervalidation.ValidateCustomResource(u.UnstructuredContent(), a.schemaValidator); err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath(""), u.UnstructuredContent(), err.Error())) + } + allErrs = append(allErrs, a.ValidateScaleStatus(ctx, u, scale)...) + + return allErrs +} + +func (a customResourceValidator) ValidateTypeMeta(ctx context.Context, obj *unstructured.Unstructured) field.ErrorList { + typeAccessor, err := meta.TypeAccessor(obj) + if err != nil { + return field.ErrorList{field.Invalid(field.NewPath("kind"), nil, err.Error())} + } + + var allErrs field.ErrorList + if typeAccessor.GetKind() != a.kind.Kind { + allErrs = append(allErrs, field.Invalid(field.NewPath("kind"), typeAccessor.GetKind(), fmt.Sprintf("must be %v", a.kind.Kind))) + } + if typeAccessor.GetAPIVersion() != a.kind.Group+"/"+a.kind.Version { + allErrs = append(allErrs, field.Invalid(field.NewPath("apiVersion"), typeAccessor.GetAPIVersion(), fmt.Sprintf("must be %v", a.kind.Group+"/"+a.kind.Version))) + } + return allErrs +} + +func (a customResourceValidator) ValidateScaleSpec(ctx context.Context, obj *unstructured.Unstructured, scale *apiextensions.CustomResourceSubresourceScale) field.ErrorList { + if scale == nil { + return nil + } + + var allErrs field.ErrorList + + // validate specReplicas + specReplicasPath := strings.TrimPrefix(scale.SpecReplicasPath, ".") // ignore leading period + specReplicas, _, err := unstructured.NestedInt64(obj.UnstructuredContent(), strings.Split(specReplicasPath, ".")...) + if err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath(scale.SpecReplicasPath), specReplicas, err.Error())) + } else if specReplicas < 0 { + allErrs = append(allErrs, field.Invalid(field.NewPath(scale.SpecReplicasPath), specReplicas, "should be a non-negative integer")) + } else if specReplicas > math.MaxInt32 { + allErrs = append(allErrs, field.Invalid(field.NewPath(scale.SpecReplicasPath), specReplicas, fmt.Sprintf("should be less than or equal to %v", math.MaxInt32))) + } + + return allErrs +} + +func (a customResourceValidator) ValidateScaleStatus(ctx context.Context, obj *unstructured.Unstructured, scale *apiextensions.CustomResourceSubresourceScale) field.ErrorList { + if scale == nil { + return nil + } + + var allErrs field.ErrorList + + // validate statusReplicas + statusReplicasPath := strings.TrimPrefix(scale.StatusReplicasPath, ".") // ignore leading period + statusReplicas, _, err := unstructured.NestedInt64(obj.UnstructuredContent(), strings.Split(statusReplicasPath, ".")...) + if err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath(scale.StatusReplicasPath), statusReplicas, err.Error())) + } else if statusReplicas < 0 { + allErrs = append(allErrs, field.Invalid(field.NewPath(scale.StatusReplicasPath), statusReplicas, "should be a non-negative integer")) + } else if statusReplicas > math.MaxInt32 { + allErrs = append(allErrs, field.Invalid(field.NewPath(scale.StatusReplicasPath), statusReplicas, fmt.Sprintf("should be less than or equal to %v", math.MaxInt32))) + } + + // validate labelSelector + if scale.LabelSelectorPath != nil { + labelSelectorPath := strings.TrimPrefix(*scale.LabelSelectorPath, ".") // ignore leading period + labelSelector, _, err := unstructured.NestedString(obj.UnstructuredContent(), strings.Split(labelSelectorPath, ".")...) + if err != nil { + allErrs = append(allErrs, field.Invalid(field.NewPath(*scale.LabelSelectorPath), labelSelector, err.Error())) + } + } + + return allErrs +} diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/BUILD b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/BUILD deleted file mode 100644 index 2a77d83b3..000000000 --- a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "etcd.go", - "strategy.go", - ], - importpath = "k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition", - deps = [ - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go index c501c6a08..c6b50915f 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/etcd.go @@ -17,18 +17,19 @@ limitations under the License. package customresourcedefinition import ( + "context" "fmt" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic" genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage" storageerr "k8s.io/apiserver/pkg/storage/errors" + "k8s.io/apiserver/pkg/util/dryrun" ) // rest implements a RESTStorage for API services against etcd @@ -66,7 +67,7 @@ func (r *REST) ShortNames() []string { } // Delete adds the CRD finalizer to the list -func (r *REST) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) { +func (r *REST) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) { obj, err := r.Get(ctx, name, &metav1.GetOptions{}) if err != nil { return nil, false, err @@ -129,6 +130,7 @@ func (r *REST) Delete(ctx genericapirequest.Context, name string, options *metav }) return existingCRD, nil }), + dryrun.IsDryRun(options.DryRun), ) if err != nil { @@ -160,13 +162,20 @@ type StatusREST struct { store *genericregistry.Store } -var _ = rest.Updater(&StatusREST{}) +var _ = rest.Patcher(&StatusREST{}) func (r *StatusREST) New() runtime.Object { return &apiextensions.CustomResourceDefinition{} } +// Get retrieves the object from the storage. It is required to support Patch. +func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { + return r.store.Get(ctx, name, options) +} + // Update alters the status subset of an object. -func (r *StatusREST) Update(ctx genericapirequest.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) (runtime.Object, bool, error) { - return r.store.Update(ctx, name, objInfo, createValidation, updateValidation) +func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { + // We are explicitly setting forceAllowCreate to false in the call to the underlying storage because + // subresources should never allow create on update. + return r.store.Update(ctx, name, objInfo, createValidation, updateValidation, false, options) } diff --git a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go index 849cd6f8e..a0bebb7a7 100644 --- a/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go +++ b/deps/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition/strategy.go @@ -17,6 +17,7 @@ limitations under the License. package customresourcedefinition import ( + "context" "fmt" apiequality "k8s.io/apimachinery/pkg/api/equality" @@ -24,7 +25,6 @@ import ( "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/names" @@ -35,6 +35,7 @@ import ( apiextensionsfeatures "k8s.io/apiextensions-apiserver/pkg/features" ) +// strategy implements behavior for CustomResources. type strategy struct { runtime.ObjectTyper names.NameGenerator @@ -48,7 +49,8 @@ func (strategy) NamespaceScoped() bool { return false } -func (strategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) { +// PrepareForCreate clears the status of a CustomResourceDefinition before creation. +func (strategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { crd := obj.(*apiextensions.CustomResourceDefinition) crd.Status = apiextensions.CustomResourceDefinitionStatus{} crd.Generation = 1 @@ -57,9 +59,22 @@ func (strategy) PrepareForCreate(ctx genericapirequest.Context, obj runtime.Obje if !utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceValidation) { crd.Spec.Validation = nil } + if !utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) { + crd.Spec.Subresources = nil + } + + for _, v := range crd.Spec.Versions { + if v.Storage { + if !apiextensions.IsStoredVersion(crd, v.Name) { + crd.Status.StoredVersions = append(crd.Status.StoredVersions, v.Name) + } + break + } + } } -func (strategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime.Object) { +// PrepareForUpdate clears fields that are not allowed to be set by end users on update. +func (strategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newCRD := obj.(*apiextensions.CustomResourceDefinition) oldCRD := old.(*apiextensions.CustomResourceDefinition) newCRD.Status = oldCRD.Status @@ -80,24 +95,43 @@ func (strategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime newCRD.Spec.Validation = nil oldCRD.Spec.Validation = nil } + if !utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) { + newCRD.Spec.Subresources = nil + oldCRD.Spec.Subresources = nil + } + + for _, v := range newCRD.Spec.Versions { + if v.Storage { + if !apiextensions.IsStoredVersion(newCRD, v.Name) { + newCRD.Status.StoredVersions = append(newCRD.Status.StoredVersions, v.Name) + } + break + } + } } -func (strategy) Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList { +// Validate validates a new CustomResourceDefinition. +func (strategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { return validation.ValidateCustomResourceDefinition(obj.(*apiextensions.CustomResourceDefinition)) } +// AllowCreateOnUpdate is false for CustomResourceDefinition; this means a POST is +// needed to create one. func (strategy) AllowCreateOnUpdate() bool { return false } +// AllowUnconditionalUpdate is the default update policy for CustomResourceDefinition objects. func (strategy) AllowUnconditionalUpdate() bool { return false } +// Canonicalize normalizes the object after validation. func (strategy) Canonicalize(obj runtime.Object) { } -func (strategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList { +// ValidateUpdate is the default update validation for an end user updating status. +func (strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { return validation.ValidateCustomResourceDefinitionUpdate(obj.(*apiextensions.CustomResourceDefinition), old.(*apiextensions.CustomResourceDefinition)) } @@ -114,7 +148,7 @@ func (statusStrategy) NamespaceScoped() bool { return false } -func (statusStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime.Object) { +func (statusStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newObj := obj.(*apiextensions.CustomResourceDefinition) oldObj := old.(*apiextensions.CustomResourceDefinition) newObj.Spec = oldObj.Spec @@ -139,14 +173,15 @@ func (statusStrategy) AllowUnconditionalUpdate() bool { func (statusStrategy) Canonicalize(obj runtime.Object) { } -func (statusStrategy) ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList { +func (statusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { return validation.ValidateUpdateCustomResourceDefinitionStatus(obj.(*apiextensions.CustomResourceDefinition), old.(*apiextensions.CustomResourceDefinition)) } +// GetAttrs returns labels and fields of a given object for filtering purposes. func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error) { apiserver, ok := obj.(*apiextensions.CustomResourceDefinition) if !ok { - return nil, nil, false, fmt.Errorf("given object is not a CustomResourceDefinition.") + return nil, nil, false, fmt.Errorf("given object is not a CustomResourceDefinition") } return labels.Set(apiserver.ObjectMeta.Labels), CustomResourceDefinitionToSelectableFields(apiserver), apiserver.Initializers != nil, nil } diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/BUILD b/deps/k8s.io/apiextensions-apiserver/test/integration/BUILD deleted file mode 100644 index 5d26af605..000000000 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "basic_test.go", - "finalization_test.go", - "registration_test.go", - "validation_test.go", - "yaml_test.go", - ], - importpath = "k8s.io/apiextensions-apiserver/test/integration", - tags = ["integration"], - deps = [ - "//vendor/github.com/coreos/etcd/clientv3:go_default_library", - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apiserver:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/test/integration/testserver:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/dynamic:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiextensions-apiserver/test/integration/testserver:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/basic_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/basic_test.go index afb6d1b49..b9f34b3cb 100644 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/basic_test.go +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/basic_test.go @@ -17,13 +17,16 @@ limitations under the License. package integration import ( + "fmt" "reflect" "sort" + "strings" "testing" "time" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apiextensions-apiserver/test/integration/testserver" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -35,185 +38,292 @@ import ( ) func TestServerUp(t *testing.T) { - stopCh, _, _, err := testserver.StartDefaultServer() + tearDown, _, _, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() } func TestNamespaceScopedCRUD(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - testSimpleCRUD(t, ns, noxuDefinition, noxuVersionClient) - testFieldSelector(t, ns, noxuDefinition, noxuVersionClient) + + testSimpleCRUD(t, ns, noxuDefinition, dynamicClient) + testFieldSelector(t, ns, noxuDefinition, dynamicClient) } func TestClusterScopedCRUD(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "" - testSimpleCRUD(t, ns, noxuDefinition, noxuVersionClient) - testFieldSelector(t, ns, noxuDefinition, noxuVersionClient) + testSimpleCRUD(t, ns, noxuDefinition, dynamicClient) + testFieldSelector(t, ns, noxuDefinition, dynamicClient) } -func testSimpleCRUD(t *testing.T, ns string, noxuDefinition *apiextensionsv1beta1.CustomResourceDefinition, noxuVersionClient dynamic.Interface) { - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) - initialList, err := noxuResourceClient.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if e, a := 0, len(initialList.(*unstructured.UnstructuredList).Items); e != a { - t.Errorf("expected %v, got %v", e, a) - } - initialListTypeMeta, err := meta.TypeAccessor(initialList) - if err != nil { - t.Fatal(err) - } - if e, a := noxuDefinition.Spec.Group+"/"+noxuDefinition.Spec.Version, initialListTypeMeta.GetAPIVersion(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := noxuDefinition.Spec.Names.ListKind, initialListTypeMeta.GetKind(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - initialListListMeta, err := meta.ListAccessor(initialList) - if err != nil { - t.Fatal(err) +func testSimpleCRUD(t *testing.T, ns string, noxuDefinition *apiextensionsv1beta1.CustomResourceDefinition, dynamicClient dynamic.Interface) { + noxuResourceClients := map[string]dynamic.ResourceInterface{} + noxuWatchs := map[string]watch.Interface{} + disabledVersions := map[string]bool{} + for _, v := range noxuDefinition.Spec.Versions { + disabledVersions[v.Name] = !v.Served } - noxuWatch, err := noxuResourceClient.Watch(metav1.ListOptions{ResourceVersion: initialListListMeta.GetResourceVersion()}) - if err != nil { - t.Fatal(err) - } - defer noxuWatch.Stop() + for _, v := range noxuDefinition.Spec.Versions { + noxuResourceClients[v.Name] = newNamespacedCustomResourceVersionedClient(ns, dynamicClient, noxuDefinition, v.Name) - createdNoxuInstance, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns, "foo"), noxuResourceClient, noxuDefinition) - if err != nil { - t.Fatalf("unable to create noxu Instance:%v", err) - } - - select { - case watchEvent := <-noxuWatch.ResultChan(): - if e, a := watch.Added, watchEvent.Type; e != a { - t.Errorf("expected %v, got %v", e, a) - break - } - createdObjectMeta, err := meta.Accessor(watchEvent.Object) - if err != nil { - t.Fatal(err) + noxuWatch, err := noxuResourceClients[v.Name].Watch(metav1.ListOptions{}) + if disabledVersions[v.Name] { + if !errors.IsNotFound(err) { + t.Errorf("expected the watch operation fail with NotFound for disabled version %s, got error: %v", v.Name, err) + } + } else { + if err != nil { + t.Fatal(err) + } + noxuWatchs[v.Name] = noxuWatch } - // it should have a UUID - if len(createdObjectMeta.GetUID()) == 0 { - t.Errorf("missing uuid: %#v", watchEvent.Object) + } + defer func() { + for _, w := range noxuWatchs { + w.Stop() } - if e, a := ns, createdObjectMeta.GetNamespace(); e != a { - t.Errorf("expected %v, got %v", e, a) + }() + + for version, noxuResourceClient := range noxuResourceClients { + createdNoxuInstance, err := instantiateVersionedCustomResource(t, fixtures.NewVersionedNoxuInstance(ns, "foo", version), noxuResourceClient, noxuDefinition, version) + if disabledVersions[version] { + if !errors.IsNotFound(err) { + t.Errorf("expected the CR creation fail with NotFound for disabled version %s, got error: %v", version, err) + } + continue } - createdTypeMeta, err := meta.TypeAccessor(watchEvent.Object) if err != nil { - t.Fatal(err) + t.Fatalf("unable to create noxu Instance:%v", err) } - if e, a := noxuDefinition.Spec.Group+"/"+noxuDefinition.Spec.Version, createdTypeMeta.GetAPIVersion(); e != a { + if e, a := noxuDefinition.Spec.Group+"/"+version, createdNoxuInstance.GetAPIVersion(); e != a { t.Errorf("expected %v, got %v", e, a) } - if e, a := noxuDefinition.Spec.Names.Kind, createdTypeMeta.GetKind(); e != a { - t.Errorf("expected %v, got %v", e, a) + for watchVersion, noxuWatch := range noxuWatchs { + select { + case watchEvent := <-noxuWatch.ResultChan(): + if e, a := watch.Added, watchEvent.Type; e != a { + t.Errorf("expected %v, got %v", e, a) + break + } + createdObjectMeta, err := meta.Accessor(watchEvent.Object) + if err != nil { + t.Fatal(err) + } + // it should have a UUID + if len(createdObjectMeta.GetUID()) == 0 { + t.Errorf("missing uuid: %#v", watchEvent.Object) + } + if e, a := ns, createdObjectMeta.GetNamespace(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + createdTypeMeta, err := meta.TypeAccessor(watchEvent.Object) + if err != nil { + t.Fatal(err) + } + if e, a := noxuDefinition.Spec.Group+"/"+watchVersion, createdTypeMeta.GetAPIVersion(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := noxuDefinition.Spec.Names.Kind, createdTypeMeta.GetKind(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + case <-time.After(5 * time.Second): + t.Errorf("missing watch event") + } } - case <-time.After(5 * time.Second): - t.Errorf("missing watch event") - } + // Check get for all versions + for version2, noxuResourceClient2 := range noxuResourceClients { + // Get test + gottenNoxuInstance, err := noxuResourceClient2.Get("foo", metav1.GetOptions{}) - gottenNoxuInstance, err := noxuResourceClient.Get("foo", metav1.GetOptions{}) - if err != nil { - t.Fatal(err) - } - if e, a := createdNoxuInstance, gottenNoxuInstance; !reflect.DeepEqual(e, a) { - t.Errorf("expected %v, got %v", e, a) - } + if disabledVersions[version2] { + if !errors.IsNotFound(err) { + t.Errorf("expected the get operation fail with NotFound for disabled version %s, got error: %v", version2, err) - listWithItem, err := noxuResourceClient.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if e, a := 1, len(listWithItem.(*unstructured.UnstructuredList).Items); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := *createdNoxuInstance, listWithItem.(*unstructured.UnstructuredList).Items[0]; !reflect.DeepEqual(e, a) { - t.Errorf("expected %v, got %v", e, a) - } + } + } else { + if err != nil { + t.Fatal(err) + } - if err := noxuResourceClient.Delete("foo", nil); err != nil { - t.Fatal(err) - } + if e, a := version2, gottenNoxuInstance.GroupVersionKind().Version; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } + } - listWithoutItem, err := noxuResourceClient.List(metav1.ListOptions{}) - if err != nil { - t.Fatal(err) - } - if e, a := 0, len(listWithoutItem.(*unstructured.UnstructuredList).Items); e != a { - t.Errorf("expected %v, got %v", e, a) - } + // List test + listWithItem, err := noxuResourceClient2.List(metav1.ListOptions{}) + if disabledVersions[version2] { + if !errors.IsNotFound(err) { + t.Errorf("expected the list operation fail with NotFound for disabled version %s, got error: %v", version2, err) + + } + } else { + if err != nil { + t.Fatal(err) + } + if e, a := 1, len(listWithItem.Items); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := version2, listWithItem.GroupVersionKind().Version; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := version2, listWithItem.Items[0].GroupVersionKind().Version; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } + } + } - select { - case watchEvent := <-noxuWatch.ResultChan(): - if e, a := watch.Deleted, watchEvent.Type; e != a { - t.Errorf("expected %v, got %v", e, a) - break + // Update test + for version2, noxuResourceClient2 := range noxuResourceClients { + var gottenNoxuInstance *unstructured.Unstructured + if disabledVersions[version2] { + gottenNoxuInstance = &unstructured.Unstructured{} + gottenNoxuInstance.SetName("foo") + } else { + gottenNoxuInstance, err = noxuResourceClient2.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + } + + gottenNoxuInstance.Object["updated"] = version2 + updatedNoxuInstance, err := noxuResourceClient2.Update(gottenNoxuInstance, metav1.UpdateOptions{}) + if disabledVersions[version2] { + if !errors.IsNotFound(err) { + t.Errorf("expected the update operation fail with NotFound for disabled version %s, got error: %v", version2, err) + } + } else { + if err != nil { + t.Fatal(err) + } + + if updated, ok := updatedNoxuInstance.Object["updated"]; !ok { + t.Errorf("expected string 'updated' field") + } else if updated, ok := updated.(string); !ok || updated != version2 { + t.Errorf("expected string 'updated' field to equal %q, got %q of type %T", version2, updated, updated) + } + + if e, a := version2, updatedNoxuInstance.GroupVersionKind().Version; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } + + for _, noxuWatch := range noxuWatchs { + select { + case watchEvent := <-noxuWatch.ResultChan(): + eventMetadata, err := meta.Accessor(watchEvent.Object) + if err != nil { + t.Fatal(err) + } + + if watchEvent.Type != watch.Modified { + t.Errorf("expected modified event, got %v", watchEvent.Type) + break + } + + // it should have a UUID + createdMetadata, err := meta.Accessor(createdNoxuInstance) + if err != nil { + t.Fatal(err) + } + if e, a := createdMetadata.GetUID(), eventMetadata.GetUID(); e != a { + t.Errorf("expected equal UID for (expected) %v, and (actual) %v", createdNoxuInstance, watchEvent.Object) + } + + case <-time.After(5 * time.Second): + t.Errorf("missing watch event") + } + } + } } - deletedObjectMeta, err := meta.Accessor(watchEvent.Object) - if err != nil { + + // Delete test + if err := noxuResourceClient.Delete("foo", metav1.NewDeleteOptions(0)); err != nil { t.Fatal(err) } - // it should have a UUID - createdObjectMeta, err := meta.Accessor(createdNoxuInstance) + + listWithoutItem, err := noxuResourceClient.List(metav1.ListOptions{}) if err != nil { t.Fatal(err) } - if e, a := createdObjectMeta.GetUID(), deletedObjectMeta.GetUID(); e != a { + if e, a := 0, len(listWithoutItem.Items); e != a { t.Errorf("expected %v, got %v", e, a) } - case <-time.After(5 * time.Second): - t.Errorf("missing watch event") + for _, noxuWatch := range noxuWatchs { + select { + case watchEvent := <-noxuWatch.ResultChan(): + eventMetadata, err := meta.Accessor(watchEvent.Object) + if err != nil { + t.Fatal(err) + } + + if watchEvent.Type != watch.Deleted { + t.Errorf("expected delete event, got %v", watchEvent.Type) + break + } + + // it should have a UUID + createdMetadata, err := meta.Accessor(createdNoxuInstance) + if err != nil { + t.Fatal(err) + } + if e, a := createdMetadata.GetUID(), eventMetadata.GetUID(); e != a { + t.Errorf("expected equal UID for (expected) %v, and (actual) %v", createdNoxuInstance, watchEvent.Object) + } + + case <-time.After(5 * time.Second): + t.Errorf("missing watch event") + } + } + + // Delete test + if err := noxuResourceClient.DeleteCollection(metav1.NewDeleteOptions(0), metav1.ListOptions{}); err != nil { + t.Fatal(err) + } } } -func testFieldSelector(t *testing.T, ns string, noxuDefinition *apiextensionsv1beta1.CustomResourceDefinition, noxuVersionClient dynamic.Interface) { - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) +func testFieldSelector(t *testing.T, ns string, noxuDefinition *apiextensionsv1beta1.CustomResourceDefinition, dynamicClient dynamic.Interface) { + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) initialList, err := noxuResourceClient.List(metav1.ListOptions{}) if err != nil { t.Fatal(err) } - if e, a := 0, len(initialList.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 0, len(initialList.Items); e != a { t.Errorf("expected %v, got %v", e, a) } initialListTypeMeta, err := meta.TypeAccessor(initialList) if err != nil { t.Fatal(err) } - if e, a := noxuDefinition.Spec.Group+"/"+noxuDefinition.Spec.Version, initialListTypeMeta.GetAPIVersion(); e != a { + if e, a := noxuDefinition.Spec.Group+"/"+noxuDefinition.Spec.Versions[0].Name, initialListTypeMeta.GetAPIVersion(); e != a { t.Errorf("expected %v, got %v", e, a) } if e, a := noxuDefinition.Spec.Names.ListKind, initialListTypeMeta.GetKind(); e != a { @@ -235,11 +345,11 @@ func testFieldSelector(t *testing.T, ns string, noxuDefinition *apiextensionsv1b } defer noxuWatch.Stop() - _, err = instantiateCustomResource(t, testserver.NewNoxuInstance(ns, "bar"), noxuResourceClient, noxuDefinition) + _, err = instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, "bar"), noxuResourceClient, noxuDefinition) if err != nil { t.Fatalf("unable to create noxu Instance:%v", err) } - createdNoxuInstanceFoo, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns, "foo"), noxuResourceClient, noxuDefinition) + createdNoxuInstanceFoo, err := instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, "foo"), noxuResourceClient, noxuDefinition) if err != nil { t.Fatalf("unable to create noxu Instance:%v", err) } @@ -268,7 +378,7 @@ func testFieldSelector(t *testing.T, ns string, noxuDefinition *apiextensionsv1b if err != nil { t.Fatal(err) } - if e, a := noxuDefinition.Spec.Group+"/"+noxuDefinition.Spec.Version, createdTypeMeta.GetAPIVersion(); e != a { + if e, a := noxuDefinition.Spec.Group+"/"+noxuDefinition.Spec.Versions[0].Name, createdTypeMeta.GetAPIVersion(); e != a { t.Errorf("expected %v, got %v", e, a) } if e, a := noxuDefinition.Spec.Names.Kind, createdTypeMeta.GetKind(); e != a { @@ -291,10 +401,10 @@ func testFieldSelector(t *testing.T, ns string, noxuDefinition *apiextensionsv1b if err != nil { t.Fatal(err) } - if e, a := 1, len(listWithItem.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 1, len(listWithItem.Items); e != a { t.Errorf("expected %v, got %v", e, a) } - if e, a := *createdNoxuInstanceFoo, listWithItem.(*unstructured.UnstructuredList).Items[0]; !reflect.DeepEqual(e, a) { + if e, a := *createdNoxuInstanceFoo, listWithItem.Items[0]; !reflect.DeepEqual(e, a) { t.Errorf("expected %v, got %v", e, a) } @@ -309,7 +419,7 @@ func testFieldSelector(t *testing.T, ns string, noxuDefinition *apiextensionsv1b if err != nil { t.Fatal(err) } - if e, a := 0, len(listWithoutItem.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 0, len(listWithoutItem.Items); e != a { t.Errorf("expected %v, got %v", e, a) } @@ -347,15 +457,15 @@ func TestDiscovery(t *testing.T) { group := "mygroup.example.com" version := "v1beta1" - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() scope := apiextensionsv1beta1.NamespaceScoped - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(scope) - _, err = testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(scope) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } @@ -388,28 +498,32 @@ func TestDiscovery(t *testing.T) { if !reflect.DeepEqual([]string(r.Verbs), expectedVerbs) { t.Fatalf("Unexpected verbs for resource \"noxus\" in group version %v/%v via discovery: expected=%v got=%v", group, version, expectedVerbs, r.Verbs) } + + if !reflect.DeepEqual(r.Categories, []string{"all"}) { + t.Fatalf("Expected exactly the category \"all\" in group version %v/%v via discovery, got: %v", group, version, r.Categories) + } } func TestNoNamespaceReject(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) initialList, err := noxuResourceClient.List(metav1.ListOptions{}) if err != nil { t.Fatal(err) } - if e, a := 0, len(initialList.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 0, len(initialList.Items); e != a { t.Errorf("expected %v, got %v", e, a) } initialListTypeMeta, err := meta.TypeAccessor(initialList) @@ -423,54 +537,51 @@ func TestNoNamespaceReject(t *testing.T) { t.Errorf("expected %v, got %v", e, a) } - createdNoxuInstance, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns, "foo"), noxuResourceClient, noxuDefinition) + createdNoxuInstance, err := instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, "foo"), noxuResourceClient, noxuDefinition) if err == nil { t.Fatalf("unexpected non-error: an empty namespace may not be set during creation while creating noxu instance: %v ", createdNoxuInstance) } } func TestSameNameDiffNamespace(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns1 := "namespace-1" - testSimpleCRUD(t, ns1, noxuDefinition, noxuVersionClient) + testSimpleCRUD(t, ns1, noxuDefinition, dynamicClient) ns2 := "namespace-2" - testSimpleCRUD(t, ns2, noxuDefinition, noxuVersionClient) + testSimpleCRUD(t, ns2, noxuDefinition, dynamicClient) } func TestSelfLink(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() // namespace scoped - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuNamespacedResourceClient := noxuVersionClient.Resource(&metav1.APIResource{ - Name: noxuDefinition.Spec.Names.Plural, - Namespaced: noxuDefinition.Spec.Scope == apiextensionsv1beta1.NamespaceScoped, - }, ns) + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) - noxuInstanceToCreate := testserver.NewNoxuInstance(ns, "foo") - createdNoxuInstance, err := noxuNamespacedResourceClient.Create(noxuInstanceToCreate) + noxuInstanceToCreate := fixtures.NewNoxuInstance(ns, "foo") + createdNoxuInstance, err := noxuNamespacedResourceClient.Create(noxuInstanceToCreate, metav1.CreateOptions{}) if err != nil { t.Fatal(err) } @@ -480,19 +591,16 @@ func TestSelfLink(t *testing.T) { } // cluster scoped - curletDefinition := testserver.NewCurletCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) - curletVersionClient, err := testserver.CreateNewCustomResourceDefinition(curletDefinition, apiExtensionClient, clientPool) + curletDefinition := fixtures.NewCurletCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + curletDefinition, err = fixtures.CreateNewCustomResourceDefinition(curletDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - curletResourceClient := curletVersionClient.Resource(&metav1.APIResource{ - Name: curletDefinition.Spec.Names.Plural, - Namespaced: curletDefinition.Spec.Scope == apiextensionsv1beta1.NamespaceScoped, - }, ns) + curletResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, curletDefinition) - curletInstanceToCreate := testserver.NewCurletInstance(ns, "foo") - createdCurletInstance, err := curletResourceClient.Create(curletInstanceToCreate) + curletInstanceToCreate := fixtures.NewCurletInstance(ns, "foo") + createdCurletInstance, err := curletResourceClient.Create(curletInstanceToCreate, metav1.CreateOptions{}) if err != nil { t.Fatal(err) } @@ -503,26 +611,23 @@ func TestSelfLink(t *testing.T) { } func TestPreserveInt(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuNamespacedResourceClient := noxuVersionClient.Resource(&metav1.APIResource{ - Name: noxuDefinition.Spec.Names.Plural, - Namespaced: true, - }, ns) + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) - noxuInstanceToCreate := testserver.NewNoxuInstance(ns, "foo") - createdNoxuInstance, err := noxuNamespacedResourceClient.Create(noxuInstanceToCreate) + noxuInstanceToCreate := fixtures.NewNoxuInstance(ns, "foo") + createdNoxuInstance, err := noxuNamespacedResourceClient.Create(noxuInstanceToCreate, metav1.CreateOptions{}) if err != nil { t.Fatal(err) } @@ -548,60 +653,64 @@ func TestPreserveInt(t *testing.T) { } func TestPatch(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuNamespacedResourceClient := noxuVersionClient.Resource(&metav1.APIResource{ - Name: noxuDefinition.Spec.Names.Plural, - Namespaced: true, - }, ns) + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) - noxuInstanceToCreate := testserver.NewNoxuInstance(ns, "foo") - createdNoxuInstance, err := noxuNamespacedResourceClient.Create(noxuInstanceToCreate) + t.Logf("Creating foo") + noxuInstanceToCreate := fixtures.NewNoxuInstance(ns, "foo") + _, err = noxuNamespacedResourceClient.Create(noxuInstanceToCreate, metav1.CreateOptions{}) if err != nil { t.Fatal(err) } + t.Logf("Patching .num.num2 to 999") patch := []byte(`{"num": {"num2":999}}`) - createdNoxuInstance, err = noxuNamespacedResourceClient.Patch("foo", types.MergePatchType, patch) + patchedNoxuInstance, err := noxuNamespacedResourceClient.Patch("foo", types.MergePatchType, patch, metav1.UpdateOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) } - - // this call waits for the resourceVersion to be reached in the cache before returning. - // We need to do this because the patch gets its initial object from the storage, and the cache serves that. - // If it is out of date, then our initial patch is applied to an old resource version, which conflicts - // and then the updated object shows a conflicting diff, which permanently fails the patch. - // This gives expected stability in the patch without retrying on an known number of conflicts below in the test. - // See https://issue.k8s.io/42644 - _, err = noxuNamespacedResourceClient.Get("foo", metav1.GetOptions{ResourceVersion: createdNoxuInstance.GetResourceVersion()}) + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 999, "num", "num2") + rv, found, err := unstructured.NestedString(patchedNoxuInstance.UnstructuredContent(), "metadata", "resourceVersion") if err != nil { - t.Fatalf("unexpected error: %v", err) + t.Fatal(err) + } + if !found { + t.Fatalf("metadata.resourceVersion not found") } // a patch with no change - createdNoxuInstance, err = noxuNamespacedResourceClient.Patch("foo", types.MergePatchType, patch) + t.Logf("Patching .num.num2 again to 999") + patchedNoxuInstance, err = noxuNamespacedResourceClient.Patch("foo", types.MergePatchType, patch, metav1.UpdateOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) } + // make sure no-op patch does not increment resourceVersion + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 999, "num", "num2") + expectString(t, patchedNoxuInstance.UnstructuredContent(), rv, "metadata", "resourceVersion") // an empty patch - createdNoxuInstance, err = noxuNamespacedResourceClient.Patch("foo", types.MergePatchType, []byte(`{}`)) + t.Logf("Applying empty patch") + patchedNoxuInstance, err = noxuNamespacedResourceClient.Patch("foo", types.MergePatchType, []byte(`{}`), metav1.UpdateOptions{}) if err != nil { t.Fatalf("unexpected error: %v", err) } + // an empty patch is a no-op patch. make sure it does not increment resourceVersion + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 999, "num", "num2") + expectString(t, patchedNoxuInstance.UnstructuredContent(), rv, "metadata", "resourceVersion") - originalJSON, err := runtime.Encode(unstructured.UnstructuredJSONScheme, createdNoxuInstance) + originalJSON, err := runtime.Encode(unstructured.UnstructuredJSONScheme, patchedNoxuInstance) if err != nil { t.Fatalf("unexpected error: %v", err) } @@ -622,25 +731,25 @@ func TestPatch(t *testing.T) { } func TestCrossNamespaceListWatch(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) initialList, err := noxuResourceClient.List(metav1.ListOptions{}) if err != nil { t.Fatal(err) } - if e, a := 0, len(initialList.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 0, len(initialList.Items); e != a { t.Errorf("expected %v, got %v", e, a) } @@ -657,13 +766,13 @@ func TestCrossNamespaceListWatch(t *testing.T) { instances := make(map[string]*unstructured.Unstructured) ns1 := "namespace-1" - noxuNamespacedResourceClient1 := NewNamespacedCustomResourceClient(ns1, noxuVersionClient, noxuDefinition) + noxuNamespacedResourceClient1 := newNamespacedCustomResourceClient(ns1, dynamicClient, noxuDefinition) instances[ns1] = createInstanceWithNamespaceHelper(t, ns1, "foo1", noxuNamespacedResourceClient1, noxuDefinition) noxuNamespacesWatch1, err := noxuNamespacedResourceClient1.Watch(metav1.ListOptions{ResourceVersion: initialListListMeta.GetResourceVersion()}) defer noxuNamespacesWatch1.Stop() ns2 := "namespace-2" - noxuNamespacedResourceClient2 := NewNamespacedCustomResourceClient(ns2, noxuVersionClient, noxuDefinition) + noxuNamespacedResourceClient2 := newNamespacedCustomResourceClient(ns2, dynamicClient, noxuDefinition) instances[ns2] = createInstanceWithNamespaceHelper(t, ns2, "foo2", noxuNamespacedResourceClient2, noxuDefinition) noxuNamespacesWatch2, err := noxuNamespacedResourceClient2.Watch(metav1.ListOptions{ResourceVersion: initialListListMeta.GetResourceVersion()}) defer noxuNamespacesWatch2.Stop() @@ -673,11 +782,11 @@ func TestCrossNamespaceListWatch(t *testing.T) { t.Fatal(err) } - if e, a := 2, len(createdList.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 2, len(createdList.Items); e != a { t.Errorf("expected %v, got %v", e, a) } - for _, a := range createdList.(*unstructured.UnstructuredList).Items { + for _, a := range createdList.Items { if e := instances[a.GetNamespace()]; !reflect.DeepEqual(e, &a) { t.Errorf("expected %v, got %v", e, a) } @@ -722,7 +831,7 @@ func TestCrossNamespaceListWatch(t *testing.T) { } func createInstanceWithNamespaceHelper(t *testing.T, ns string, name string, noxuNamespacedResourceClient dynamic.ResourceInterface, noxuDefinition *apiextensionsv1beta1.CustomResourceDefinition) *unstructured.Unstructured { - createdInstance, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns, name), noxuNamespacedResourceClient, noxuDefinition) + createdInstance, err := instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, name), noxuNamespacedResourceClient, noxuDefinition) if err != nil { t.Fatalf("unable to create noxu Instance:%v", err) } @@ -758,27 +867,27 @@ func checkNamespacesWatchHelper(t *testing.T, ns string, namespacedwatch watch.I } func TestNameConflict(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - _, err = testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - noxu2Definition := testserver.NewNoxu2CustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - _, err = apiExtensionClient.Apiextensions().CustomResourceDefinitions().Create(noxu2Definition) + noxu2Definition := fixtures.NewNoxu2CustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + _, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Create(noxu2Definition) if err != nil { t.Fatal(err) } // A NameConflict occurs err = wait.Poll(500*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { - crd, err := testserver.GetCustomResourceDefinition(noxu2Definition, apiExtensionClient) + crd, err := apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(noxu2Definition.Name, metav1.GetOptions{}) if err != nil { return false, err } @@ -794,14 +903,14 @@ func TestNameConflict(t *testing.T) { t.Fatal(err) } - err = testserver.DeleteCustomResourceDefinition(noxuDefinition, apiExtensionClient) + err = fixtures.DeleteCustomResourceDefinition(noxuDefinition, apiExtensionClient) if err != nil { t.Fatal(err) } // Names are now accepted err = wait.Poll(500*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { - crd, err := testserver.GetCustomResourceDefinition(noxu2Definition, apiExtensionClient) + crd, err := apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(noxu2Definition.Name, metav1.GetOptions{}) if err != nil { return false, err } @@ -817,3 +926,57 @@ func TestNameConflict(t *testing.T) { t.Fatal(err) } } + +func TestStatusGetAndPatch(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + // make sure we don't get 405 Method Not Allowed from Getting CRD/status subresource + result := &apiextensionsv1beta1.CustomResourceDefinition{} + err = apiExtensionClient.ApiextensionsV1beta1().RESTClient().Get(). + Resource("customresourcedefinitions"). + Name(noxuDefinition.Name). + SubResource("status"). + Do(). + Into(result) + if err != nil { + t.Fatal(err) + } + + // make sure we don't get 405 Method Not Allowed from Patching CRD/status subresource + _, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions(). + Patch(noxuDefinition.Name, types.StrategicMergePatchType, + []byte(fmt.Sprintf(`{"labels":{"test-label":"dummy"}}`)), + "status") + if err != nil { + t.Fatal(err) + } +} + +func expectInt64(t *testing.T, obj map[string]interface{}, value int64, pth ...string) { + if v, found, err := unstructured.NestedInt64(obj, pth...); err != nil { + t.Fatalf("failed to access .%s: %v", strings.Join(pth, "."), err) + } else if !found { + t.Fatalf("failed to find .%s", strings.Join(pth, ".")) + } else if v != value { + t.Fatalf("wanted %d at .%s, got %d", value, strings.Join(pth, "."), v) + } +} +func expectString(t *testing.T, obj map[string]interface{}, value string, pth ...string) { + if v, found, err := unstructured.NestedString(obj, pth...); err != nil { + t.Fatalf("failed to access .%s: %v", strings.Join(pth, "."), err) + } else if !found { + t.Fatalf("failed to find .%s", strings.Join(pth, ".")) + } else if v != value { + t.Fatalf("wanted %q at .%s, got %q", value, strings.Join(pth, "."), v) + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/finalization_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/finalization_test.go index 126348704..745aa5854 100644 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/finalization_test.go +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/finalization_test.go @@ -18,29 +18,32 @@ package integration import ( "testing" + "time" "github.com/stretchr/testify/require" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apiextensions-apiserver/test/integration/testserver" + + "k8s.io/apiextensions-apiserver/test/integration/fixtures" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/wait" ) func TestFinalization(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) require.NoError(t, err) - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) require.NoError(t, err) ns := "not-the-default" name := "foo123" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) - instance := testserver.NewNoxuInstance(ns, name) + instance := fixtures.NewNoxuInstance(ns, name) instance.SetFinalizers([]string{"noxu.example.com/finalizer"}) createdNoxuInstance, err := instantiateCustomResource(t, instance, noxuResourceClient, noxuDefinition) require.NoError(t, err) @@ -73,7 +76,7 @@ func TestFinalization(t *testing.T) { // object will be deleted as part of the finalizer update. for { gottenNoxuInstance.SetFinalizers(nil) - _, err = noxuResourceClient.Update(gottenNoxuInstance) + _, err = noxuResourceClient.Update(gottenNoxuInstance, metav1.UpdateOptions{}) if err == nil { break } @@ -89,3 +92,74 @@ func TestFinalization(t *testing.T) { require.Error(t, err) require.True(t, errors.IsNotFound(err), "%#v", err) } + +func TestFinalizationAndDeletion(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + require.NoError(t, err) + defer tearDown() + + // Create a CRD. + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + require.NoError(t, err) + + // Create a CR with a finalizer. + ns := "not-the-default" + name := "foo123" + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + + instance := fixtures.NewNoxuInstance(ns, name) + instance.SetFinalizers([]string{"noxu.example.com/finalizer"}) + createdNoxuInstance, err := instantiateCustomResource(t, instance, noxuResourceClient, noxuDefinition) + require.NoError(t, err) + + // Delete a CR. Because there's a finalizer, it will not get deleted now. + uid := createdNoxuInstance.GetUID() + err = noxuResourceClient.Delete(name, &metav1.DeleteOptions{ + Preconditions: &metav1.Preconditions{ + UID: &uid, + }, + }) + require.NoError(t, err) + + // Check is the CR scheduled for deletion. + gottenNoxuInstance, err := noxuResourceClient.Get(name, metav1.GetOptions{}) + require.NoError(t, err) + require.NotNil(t, gottenNoxuInstance.GetDeletionTimestamp()) + + // Delete the CRD. + fixtures.DeleteCustomResourceDefinition(noxuDefinition, apiExtensionClient) + + // Check is CR still there after the CRD deletion. + gottenNoxuInstance, err = noxuResourceClient.Get(name, metav1.GetOptions{}) + require.NoError(t, err) + + // Update the CR to remove the finalizer. + for { + gottenNoxuInstance.SetFinalizers(nil) + _, err = noxuResourceClient.Update(gottenNoxuInstance, metav1.UpdateOptions{}) + if err == nil { + break + } + if !errors.IsConflict(err) { + require.NoError(t, err) // Fail on unexpected error + } + gottenNoxuInstance, err = noxuResourceClient.Get(name, metav1.GetOptions{}) + require.NoError(t, err) + } + + // Verify the CR is gone. + // It should return the NonFound error. + _, err = noxuResourceClient.Get(name, metav1.GetOptions{}) + if !errors.IsNotFound(err) { + t.Fatalf("unable to delete cr: %v", err) + } + + err = wait.Poll(500*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { + _, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(noxuDefinition.Name, metav1.GetOptions{}) + return errors.IsNotFound(err), err + }) + if !errors.IsNotFound(err) { + t.Fatalf("unable to delete crd: %v", err) + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/resources.go b/deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/resources.go new file mode 100644 index 000000000..9a1f2d848 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/resources.go @@ -0,0 +1,403 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fixtures + +import ( + "fmt" + "time" + + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/apiserver/pkg/storage/names" + "k8s.io/client-go/discovery" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/rest" + "k8s.io/client-go/restmapper" + "k8s.io/client-go/scale" +) + +const ( + noxuInstanceNum int64 = 9223372036854775807 +) + +// NewRandomNameCustomResourceDefinition generates a CRD with random name to avoid name conflict in e2e tests +func NewRandomNameCustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { + // ensure the singular doesn't end in an s for now + gName := names.SimpleNameGenerator.GenerateName("foo") + "a" + return &apiextensionsv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: gName + "s.mygroup.example.com"}, + Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ + Group: "mygroup.example.com", + Version: "v1beta1", + Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ + Plural: gName + "s", + Singular: gName, + Kind: gName, + ListKind: gName + "List", + }, + Scope: scope, + }, + } +} + +// NewNoxuCustomResourceDefinition returns a WishIHadChosenNoxu CRD. +func NewNoxuCustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { + return &apiextensionsv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "noxus.mygroup.example.com"}, + Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ + Group: "mygroup.example.com", + Version: "v1beta1", + Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ + Plural: "noxus", + Singular: "nonenglishnoxu", + Kind: "WishIHadChosenNoxu", + ShortNames: []string{"foo", "bar", "abc", "def"}, + ListKind: "NoxuItemList", + Categories: []string{"all"}, + }, + Scope: scope, + }, + } +} + +// NewVersionedNoxuInstance returns a WishIHadChosenNoxu instance for a given version +func NewVersionedNoxuInstance(namespace, name, version string) *unstructured.Unstructured { + return &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": "mygroup.example.com/" + version, + "kind": "WishIHadChosenNoxu", + "metadata": map[string]interface{}{ + "namespace": namespace, + "name": name, + }, + "content": map[string]interface{}{ + "key": "value", + }, + "num": map[string]interface{}{ + "num1": noxuInstanceNum, + "num2": 1000000, + }, + }, + } +} + +// NewNoxuInstance returns a WishIHadChosenNoxu instance for v1beta1. +func NewNoxuInstance(namespace, name string) *unstructured.Unstructured { + return NewVersionedNoxuInstance(namespace, name, "v1beta1") +} + +// NewMultipleVersionNoxuCRD returns a WishIHadChosenNoxu with multiple versions. +func NewMultipleVersionNoxuCRD(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { + return &apiextensionsv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "noxus.mygroup.example.com"}, + Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ + Group: "mygroup.example.com", + Version: "v1beta1", + Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ + Plural: "noxus", + Singular: "nonenglishnoxu", + Kind: "WishIHadChosenNoxu", + ShortNames: []string{"foo", "bar", "abc", "def"}, + ListKind: "NoxuItemList", + Categories: []string{"all"}, + }, + Scope: scope, + Versions: []apiextensionsv1beta1.CustomResourceDefinitionVersion{ + { + Name: "v1beta1", + Served: true, + Storage: false, + }, + { + Name: "v1beta2", + Served: true, + Storage: true, + }, + { + Name: "v0", + Served: false, + Storage: false, + }, + }, + }, + } +} + +// NewNoxu2CustomResourceDefinition returns a WishIHadChosenNoxu2 CRD. +func NewNoxu2CustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { + return &apiextensionsv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "noxus2.mygroup.example.com"}, + Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ + Group: "mygroup.example.com", + Version: "v1alpha1", + Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ + Plural: "noxus2", + Singular: "nonenglishnoxu2", + Kind: "WishIHadChosenNoxu2", + ShortNames: []string{"foo", "bar", "abc", "def"}, + ListKind: "Noxu2ItemList", + }, + Scope: scope, + }, + } +} + +// NewCurletCustomResourceDefinition returns a Curlet CRD. +func NewCurletCustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { + return &apiextensionsv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "curlets.mygroup.example.com"}, + Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ + Group: "mygroup.example.com", + Version: "v1beta1", + Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ + Plural: "curlets", + Singular: "curlet", + Kind: "Curlet", + ListKind: "CurletList", + }, + Scope: scope, + }, + } +} + +// NewCurletInstance returns a Curlet instance. +func NewCurletInstance(namespace, name string) *unstructured.Unstructured { + return &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": "mygroup.example.com/v1beta1", + "kind": "Curlet", + "metadata": map[string]interface{}{ + "namespace": namespace, + "name": name, + }, + "content": map[string]interface{}{ + "key": "value", + }, + }, + } +} + +func servedVersions(crd *apiextensionsv1beta1.CustomResourceDefinition) []string { + if len(crd.Spec.Versions) == 0 { + return []string{crd.Spec.Version} + } + var versions []string + for _, v := range crd.Spec.Versions { + if v.Served { + versions = append(versions, v.Name) + } + } + return versions +} + +func existsInDiscovery(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface, version string) (bool, error) { + groupResource, err := apiExtensionsClient.Discovery().ServerResourcesForGroupVersion(crd.Spec.Group + "/" + version) + if err != nil { + if errors.IsNotFound(err) { + return false, nil + } + return false, err + } + for _, g := range groupResource.APIResources { + if g.Name == crd.Spec.Names.Plural { + return true, nil + } + } + return false, nil +} + +// CreateNewCustomResourceDefinitionWatchUnsafe creates the CRD and makes sure +// the apiextension apiserver has installed the CRD. But it's not safe to watch +// the created CR. Please call CreateNewCustomResourceDefinition if you need to +// watch the CR. +func CreateNewCustomResourceDefinitionWatchUnsafe(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) (*apiextensionsv1beta1.CustomResourceDefinition, error) { + crd, err := apiExtensionsClient.ApiextensionsV1beta1().CustomResourceDefinitions().Create(crd) + if err != nil { + return nil, err + } + + // wait until all resources appears in discovery + for _, version := range servedVersions(crd) { + err := wait.PollImmediate(500*time.Millisecond, 30*time.Second, func() (bool, error) { + return existsInDiscovery(crd, apiExtensionsClient, version) + }) + if err != nil { + return nil, err + } + } + + return crd, err +} + +// CreateNewCustomResourceDefinition creates the given CRD and makes sure its watch cache is primed on the server. +func CreateNewCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface, dynamicClientSet dynamic.Interface) (*apiextensionsv1beta1.CustomResourceDefinition, error) { + crd, err := CreateNewCustomResourceDefinitionWatchUnsafe(crd, apiExtensionsClient) + if err != nil { + return nil, err + } + + // This is only for a test. We need the watch cache to have a resource version that works for the test. + // When new REST storage is created, the storage cacher for the CR starts asynchronously. + // REST API operations return like list use the RV of etcd, but the storage cacher's reflector's list + // can get a different RV because etcd can be touched in between the initial list operation (if that's what you're doing first) + // and the storage cache reflector starting. + // Later, you can issue a watch with the REST apis list.RV and end up earlier than the storage cacher. + // The general working model is that if you get a "resourceVersion too old" message, you re-list and rewatch. + // For this test, we'll actually cycle, "list/watch/create/delete" until we get an RV from list that observes the create and not an error. + // This way all the tests that are checking for watches don't have to worry about RV too old problems because crazy things *could* happen + // before like the created RV could be too old to watch. + err = wait.PollImmediate(500*time.Millisecond, 30*time.Second, func() (bool, error) { + return isWatchCachePrimed(crd, dynamicClientSet) + }) + if err != nil { + return nil, err + } + return crd, nil +} + +func resourceClientForVersion(crd *apiextensionsv1beta1.CustomResourceDefinition, dynamicClientSet dynamic.Interface, namespace, version string) dynamic.ResourceInterface { + gvr := schema.GroupVersionResource{Group: crd.Spec.Group, Version: version, Resource: crd.Spec.Names.Plural} + if crd.Spec.Scope != apiextensionsv1beta1.ClusterScoped { + return dynamicClientSet.Resource(gvr).Namespace(namespace) + } + return dynamicClientSet.Resource(gvr) +} + +// isWatchCachePrimed returns true if the watch is primed for an specified version of CRD watch +func isWatchCachePrimed(crd *apiextensionsv1beta1.CustomResourceDefinition, dynamicClientSet dynamic.Interface) (bool, error) { + ns := "" + if crd.Spec.Scope != apiextensionsv1beta1.ClusterScoped { + ns = "aval" + } + + versions := servedVersions(crd) + if len(versions) == 0 { + return true, nil + } + + resourceClient := resourceClientForVersion(crd, dynamicClientSet, ns, versions[0]) + instanceName := "setup-instance" + instance := &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": crd.Spec.Group + "/" + versions[0], + "kind": crd.Spec.Names.Kind, + "metadata": map[string]interface{}{ + "namespace": ns, + "name": instanceName, + }, + "alpha": "foo_123", + "beta": 10, + "gamma": "bar", + "delta": "hello", + "epsilon": "foobar", + "spec": map[string]interface{}{}, + }, + } + createdInstance, err := resourceClient.Create(instance, metav1.CreateOptions{}) + if err != nil { + return false, err + } + err = resourceClient.Delete(createdInstance.GetName(), nil) + if err != nil { + return false, err + } + + // Wait for all versions of watch cache to be primed and also make sure we consumed the DELETE event for all + // versions so that any new watch with ResourceVersion=0 does not get those events. This is source of some flaky tests. + // When a client creates a watch with resourceVersion=0, it will get an ADD event for any existing objects + // but because they specified resourceVersion=0, there is no starting point in the cache buffer to return existing events + // from, thus the server will return anything from current head of the cache to the end. By accessing the delete + // events for all versions here, we make sure that the head of the cache is passed those events and they will not being + // delivered to any future watch with resourceVersion=0. + for _, v := range versions { + noxuWatch, err := resourceClientForVersion(crd, dynamicClientSet, ns, v).Watch( + metav1.ListOptions{ResourceVersion: createdInstance.GetResourceVersion()}) + if err != nil { + return false, err + } + defer noxuWatch.Stop() + + select { + case watchEvent := <-noxuWatch.ResultChan(): + if watch.Error == watchEvent.Type { + return false, nil + } + if watch.Deleted != watchEvent.Type { + return false, fmt.Errorf("expected DELETE, but got %#v", watchEvent) + } + case <-time.After(5 * time.Second): + return false, fmt.Errorf("gave up waiting for watch event") + } + } + + return true, nil +} + +// DeleteCustomResourceDefinition deletes a CRD and waits until it disappears from discovery. +func DeleteCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) error { + if err := apiExtensionsClient.Apiextensions().CustomResourceDefinitions().Delete(crd.Name, nil); err != nil { + return err + } + for _, version := range servedVersions(crd) { + err := wait.PollImmediate(500*time.Millisecond, 30*time.Second, func() (bool, error) { + exists, err := existsInDiscovery(crd, apiExtensionsClient, version) + return !exists, err + }) + if err != nil { + return err + } + } + return nil +} + +// CreateNewScaleClient returns a scale client. +func CreateNewScaleClient(crd *apiextensionsv1beta1.CustomResourceDefinition, config *rest.Config) (scale.ScalesGetter, error) { + discoveryClient, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + groupResource, err := discoveryClient.ServerResourcesForGroupVersion(crd.Spec.Group + "/" + crd.Spec.Version) + if err != nil { + return nil, err + } + + resources := []*restmapper.APIGroupResources{ + { + Group: metav1.APIGroup{ + Name: crd.Spec.Group, + Versions: []metav1.GroupVersionForDiscovery{ + {Version: crd.Spec.Version}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{Version: crd.Spec.Version}, + }, + VersionedResources: map[string][]metav1.APIResource{ + crd.Spec.Version: groupResource.APIResources, + }, + }, + } + + restMapper := restmapper.NewDiscoveryRESTMapper(resources) + resolver := scale.NewDiscoveryScaleKindResolver(discoveryClient) + + return scale.NewForConfig(config, restMapper, dynamic.LegacyAPIPathResolverFunc, resolver) +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/server.go b/deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/server.go new file mode 100644 index 000000000..0a3d6444e --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/fixtures/server.go @@ -0,0 +1,108 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fixtures + +import ( + "io/ioutil" + "os" + "strings" + + "github.com/pborman/uuid" + "k8s.io/apiextensions-apiserver/pkg/cmd/server/options" + + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + servertesting "k8s.io/apiextensions-apiserver/pkg/cmd/server/testing" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/rest" +) + +// StartDefaultServer starts a test server. +func StartDefaultServer(t servertesting.Logger) (func(), *rest.Config, *options.CustomResourceDefinitionsServerOptions, error) { + // create kubeconfig which will not actually be used. But authz/authn needs it to startup. + fakeKubeConfig, err := ioutil.TempFile("", "kubeconfig") + fakeKubeConfig.WriteString(` +apiVersion: v1 +kind: Config +clusters: +- cluster: + server: http://127.1.2.3:12345 + name: integration +contexts: +- context: + cluster: integration + user: test + name: default-context +current-context: default-context +users: +- name: test + user: + password: test + username: test +`) + fakeKubeConfig.Close() + + s, err := servertesting.StartTestServer(t, nil, []string{ + "--etcd-prefix", uuid.New(), + "--etcd-servers", strings.Join(IntegrationEtcdServers(), ","), + "--authentication-skip-lookup", + "--authentication-kubeconfig", fakeKubeConfig.Name(), + "--authorization-kubeconfig", fakeKubeConfig.Name(), + "--kubeconfig", fakeKubeConfig.Name(), + "--disable-admission-plugins", "NamespaceLifecycle,MutatingAdmissionWebhook,ValidatingAdmissionWebhook", + }, nil) + if err != nil { + os.Remove(fakeKubeConfig.Name()) + return nil, nil, nil, err + } + + tearDownFn := func() { + defer os.Remove(fakeKubeConfig.Name()) + s.TearDownFn() + } + + return tearDownFn, s.ClientConfig, s.ServerOpts, nil +} + +// StartDefaultServerWithClients starts a test server and returns clients for it. +func StartDefaultServerWithClients(t servertesting.Logger) (func(), clientset.Interface, dynamic.Interface, error) { + tearDown, config, _, err := StartDefaultServer(t) + if err != nil { + return nil, nil, nil, err + } + + apiExtensionsClient, err := clientset.NewForConfig(config) + if err != nil { + tearDown() + return nil, nil, nil, err + } + + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + tearDown() + return nil, nil, nil, err + } + + return tearDown, apiExtensionsClient, dynamicClient, nil +} + +// IntegrationEtcdServers returns etcd server URLs. +func IntegrationEtcdServers() []string { + if etcdURL, ok := os.LookupEnv("KUBE_INTEGRATION_ETCD_URL"); ok { + return []string{etcdURL} + } + return []string{"http://127.0.0.1:2379"} +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/helpers.go b/deps/k8s.io/apiextensions-apiserver/test/integration/helpers.go new file mode 100644 index 000000000..763440345 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/helpers.go @@ -0,0 +1,94 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integration + +import ( + "fmt" + "testing" + + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic" +) + +func instantiateCustomResource(t *testing.T, instanceToCreate *unstructured.Unstructured, client dynamic.ResourceInterface, definition *apiextensionsv1beta1.CustomResourceDefinition) (*unstructured.Unstructured, error) { + return instantiateVersionedCustomResource(t, instanceToCreate, client, definition, definition.Spec.Versions[0].Name) +} + +func instantiateVersionedCustomResource(t *testing.T, instanceToCreate *unstructured.Unstructured, client dynamic.ResourceInterface, definition *apiextensionsv1beta1.CustomResourceDefinition, version string) (*unstructured.Unstructured, error) { + createdInstance, err := client.Create(instanceToCreate, metav1.CreateOptions{}) + if err != nil { + t.Logf("%#v", createdInstance) + return nil, err + } + createdObjectMeta, err := meta.Accessor(createdInstance) + if err != nil { + t.Fatal(err) + } + // it should have a UUID + if len(createdObjectMeta.GetUID()) == 0 { + t.Errorf("missing uuid: %#v", createdInstance) + } + createdTypeMeta, err := meta.TypeAccessor(createdInstance) + if err != nil { + t.Fatal(err) + } + if e, a := definition.Spec.Group+"/"+version, createdTypeMeta.GetAPIVersion(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := definition.Spec.Names.Kind, createdTypeMeta.GetKind(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + return createdInstance, nil +} + +func newNamespacedCustomResourceVersionedClient(ns string, client dynamic.Interface, crd *apiextensionsv1beta1.CustomResourceDefinition, version string) dynamic.ResourceInterface { + gvr := schema.GroupVersionResource{Group: crd.Spec.Group, Version: version, Resource: crd.Spec.Names.Plural} + + if crd.Spec.Scope != apiextensionsv1beta1.ClusterScoped { + return client.Resource(gvr).Namespace(ns) + } + return client.Resource(gvr) +} + +func newNamespacedCustomResourceClient(ns string, client dynamic.Interface, crd *apiextensionsv1beta1.CustomResourceDefinition) dynamic.ResourceInterface { + return newNamespacedCustomResourceVersionedClient(ns, client, crd, crd.Spec.Versions[0].Name) +} + +// updateCustomResourceDefinitionWithRetry updates a CRD, retrying up to 5 times on version conflict errors. +func updateCustomResourceDefinitionWithRetry(client clientset.Interface, name string, update func(*apiextensionsv1beta1.CustomResourceDefinition)) (*apiextensionsv1beta1.CustomResourceDefinition, error) { + for i := 0; i < 5; i++ { + crd, err := client.ApiextensionsV1beta1().CustomResourceDefinitions().Get(name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("failed to get CustomResourceDefinition %q: %v", name, err) + } + update(crd) + crd, err = client.ApiextensionsV1beta1().CustomResourceDefinitions().Update(crd) + if err == nil { + return crd, nil + } + if !errors.IsConflict(err) { + return nil, fmt.Errorf("failed to update CustomResourceDefinition %q: %v", name, err) + } + } + return nil, fmt.Errorf("too many retries after conflicts updating CustomResourceDefinition %q", name) +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/objectmeta_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/objectmeta_test.go new file mode 100644 index 000000000..1ce637aa7 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/objectmeta_test.go @@ -0,0 +1,164 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integration + +import ( + "path" + "reflect" + "strings" + "testing" + + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/pkg/transport" + + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + serveroptions "k8s.io/apiextensions-apiserver/pkg/cmd/server/options" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/json" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/client-go/dynamic" +) + +func TestPostInvalidObjectMeta(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + noxuResourceClient := newNamespacedCustomResourceClient("default", dynamicClient, noxuDefinition) + + obj := fixtures.NewNoxuInstance("default", "foo") + unstructured.SetNestedField(obj.UnstructuredContent(), int64(42), "metadata", "unknown") + unstructured.SetNestedField(obj.UnstructuredContent(), map[string]interface{}{"foo": int64(42), "bar": "abc"}, "metadata", "labels") + _, err = instantiateCustomResource(t, obj, noxuResourceClient, noxuDefinition) + if err == nil { + t.Fatalf("unexpected non-error, expected invalid labels to be rejected: %v", err) + } + if status, ok := err.(errors.APIStatus); !ok { + t.Fatalf("expected APIStatus error, but got: %#v", err) + } else if !errors.IsBadRequest(err) { + t.Fatalf("expected BadRequst error, but got: %v", errors.ReasonForError(err)) + } else if !strings.Contains(status.Status().Message, "cannot be handled") { + t.Fatalf("expected 'cannot be handled' error message, got: %v", status.Status().Message) + } + + unstructured.SetNestedField(obj.UnstructuredContent(), map[string]interface{}{"bar": "abc"}, "metadata", "labels") + obj, err = instantiateCustomResource(t, obj, noxuResourceClient, noxuDefinition) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if unknown, found, err := unstructured.NestedInt64(obj.UnstructuredContent(), "metadata", "unknown"); err != nil { + t.Errorf("unexpected error getting metadata.unknown: %v", err) + } else if found { + t.Errorf("unexpected metadata.unknown=%#v: expected this to be pruned", unknown) + } +} + +func TestInvalidObjectMetaInStorage(t *testing.T) { + tearDown, config, options, err := fixtures.StartDefaultServer(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + RESTOptionsGetter := serveroptions.NewCRDRESTOptionsGetter(*options.RecommendedOptions.Etcd) + restOptions, err := RESTOptionsGetter.GetRESTOptions(schema.GroupResource{Group: noxuDefinition.Spec.Group, Resource: noxuDefinition.Spec.Names.Plural}) + if err != nil { + t.Fatal(err) + } + tlsInfo := transport.TLSInfo{ + CertFile: restOptions.StorageConfig.CertFile, + KeyFile: restOptions.StorageConfig.KeyFile, + CAFile: restOptions.StorageConfig.CAFile, + } + tlsConfig, err := tlsInfo.ClientConfig() + if err != nil { + t.Fatal(err) + } + etcdConfig := clientv3.Config{ + Endpoints: restOptions.StorageConfig.ServerList, + TLS: tlsConfig, + } + etcdclient, err := clientv3.New(etcdConfig) + if err != nil { + t.Fatal(err) + } + + t.Logf("Creating object with invalid labels manually in etcd") + + original := fixtures.NewNoxuInstance("default", "foo") + unstructured.SetNestedField(original.UnstructuredContent(), int64(42), "metadata", "unknown") + unstructured.SetNestedField(original.UnstructuredContent(), map[string]interface{}{"foo": int64(42), "bar": "abc"}, "metadata", "labels") + + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), metav1.NamespaceDefault) + key := path.Join("/", restOptions.StorageConfig.Prefix, noxuDefinition.Spec.Group, "noxus/default/foo") + val, _ := json.Marshal(original.UnstructuredContent()) + if _, err := etcdclient.Put(ctx, key, string(val)); err != nil { + t.Fatalf("unexpected error: %v", err) + } + + t.Logf("Checking that ObjectMeta is pruned from unknown fields") + + noxuResourceClient := newNamespacedCustomResourceClient("default", dynamicClient, noxuDefinition) + obj, err := noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if unknown, found, err := unstructured.NestedFieldNoCopy(obj.UnstructuredContent(), "metadata", "unknown"); err != nil { + t.Errorf("unexpected error: %v", err) + } else if found { + t.Errorf("unexpected to find metadata.unknown=%#v", unknown) + } + + t.Logf("Checking that ObjectMeta is pruned from invalid typed fields") + + if labels, found, err := unstructured.NestedStringMap(obj.UnstructuredContent(), "metadata", "labels"); err != nil { + t.Errorf("unexpected error: %v", err) + } else if found && !reflect.DeepEqual(labels, map[string]string{"bar": "abc"}) { + t.Errorf("unexpected to find metadata.lables=%#v", labels) + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/registration_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/registration_test.go index a72ce2dcf..2523210c8 100644 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/registration_test.go +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/registration_test.go @@ -29,8 +29,8 @@ import ( "github.com/coreos/etcd/clientv3" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - "k8s.io/apiextensions-apiserver/test/integration/testserver" + apiextensionsclientset "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,54 +39,20 @@ import ( "k8s.io/client-go/dynamic" ) -func instantiateCustomResource(t *testing.T, instanceToCreate *unstructured.Unstructured, client dynamic.ResourceInterface, definition *apiextensionsv1beta1.CustomResourceDefinition) (*unstructured.Unstructured, error) { - createdInstance, err := client.Create(instanceToCreate) - if err != nil { - t.Logf("%#v", createdInstance) - return nil, err - } - createdObjectMeta, err := meta.Accessor(createdInstance) - if err != nil { - t.Fatal(err) - } - // it should have a UUID - if len(createdObjectMeta.GetUID()) == 0 { - t.Errorf("missing uuid: %#v", createdInstance) - } - createdTypeMeta, err := meta.TypeAccessor(createdInstance) - if err != nil { - t.Fatal(err) - } - if e, a := definition.Spec.Group+"/"+definition.Spec.Version, createdTypeMeta.GetAPIVersion(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - if e, a := definition.Spec.Names.Kind, createdTypeMeta.GetKind(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - return createdInstance, nil -} - -func NewNamespacedCustomResourceClient(ns string, client dynamic.Interface, definition *apiextensionsv1beta1.CustomResourceDefinition) dynamic.ResourceInterface { - return client.Resource(&metav1.APIResource{ - Name: definition.Spec.Names.Plural, - Namespaced: definition.Spec.Scope == apiextensionsv1beta1.NamespaceScoped, - }, ns) -} - func TestMultipleResourceInstances(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() ns := "not-the-default" - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - noxuNamespacedResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) noxuList, err := noxuNamespacedResourceClient.List(metav1.ListOptions{}) if err != nil { t.Fatal(err) @@ -113,7 +79,7 @@ func TestMultipleResourceInstances(t *testing.T) { } for key, val := range instances { - val.Instance, err = instantiateCustomResource(t, testserver.NewNoxuInstance(ns, key), noxuNamespacedResourceClient, noxuDefinition) + val.Instance, err = instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, key), noxuNamespacedResourceClient, noxuDefinition) if err != nil { t.Fatalf("unable to create Noxu Instance %q:%v", key, err) } @@ -153,10 +119,10 @@ func TestMultipleResourceInstances(t *testing.T) { if err != nil { t.Fatal(err) } - if e, a := len(instances), len(listWithItem.(*unstructured.UnstructuredList).Items); e != a { + if e, a := len(instances), len(listWithItem.Items); e != a { t.Errorf("expected %v, got %v", e, a) } - for _, a := range listWithItem.(*unstructured.UnstructuredList).Items { + for _, a := range listWithItem.Items { if e := instances[a.GetName()].Instance; !reflect.DeepEqual(e, &a) { t.Errorf("expected %v, got %v", e, a) } @@ -170,7 +136,7 @@ func TestMultipleResourceInstances(t *testing.T) { if err != nil { t.Fatal(err) } - if e, a := 0, len(listWithoutItem.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 0, len(listWithoutItem.Items); e != a { t.Errorf("expected %v, got %v", e, a) } @@ -198,21 +164,21 @@ func TestMultipleResourceInstances(t *testing.T) { } func TestMultipleRegistration(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() ns := "not-the-default" sameInstanceName := "foo" - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - noxuNamespacedResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) - createdNoxuInstance, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns, sameInstanceName), noxuNamespacedResourceClient, noxuDefinition) + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + createdNoxuInstance, err := instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, sameInstanceName), noxuNamespacedResourceClient, noxuDefinition) if err != nil { t.Fatalf("unable to create noxu Instance:%v", err) } @@ -225,13 +191,13 @@ func TestMultipleRegistration(t *testing.T) { t.Errorf("expected %v, got %v", e, a) } - curletDefinition := testserver.NewCurletCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - curletVersionClient, err := testserver.CreateNewCustomResourceDefinition(curletDefinition, apiExtensionClient, clientPool) + curletDefinition := fixtures.NewCurletCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + curletDefinition, err = fixtures.CreateNewCustomResourceDefinition(curletDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - curletNamespacedResourceClient := NewNamespacedCustomResourceClient(ns, curletVersionClient, curletDefinition) - createdCurletInstance, err := instantiateCustomResource(t, testserver.NewCurletInstance(ns, sameInstanceName), curletNamespacedResourceClient, curletDefinition) + curletNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, curletDefinition) + createdCurletInstance, err := instantiateCustomResource(t, fixtures.NewCurletInstance(ns, sameInstanceName), curletNamespacedResourceClient, curletDefinition) if err != nil { t.Fatalf("unable to create noxu Instance:%v", err) } @@ -254,27 +220,27 @@ func TestMultipleRegistration(t *testing.T) { } func TestDeRegistrationAndReRegistration(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + defer tearDown() + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) ns := "not-the-default" sameInstanceName := "foo" func() { - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition, err := fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - noxuNamespacedResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) - if _, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns, sameInstanceName), noxuNamespacedResourceClient, noxuDefinition); err != nil { + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + if _, err := instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, sameInstanceName), noxuNamespacedResourceClient, noxuDefinition); err != nil { t.Fatal(err) } - if err := testserver.DeleteCustomResourceDefinition(noxuDefinition, apiExtensionClient); err != nil { + if err := fixtures.DeleteCustomResourceDefinition(noxuDefinition, apiExtensionClient); err != nil { t.Fatal(err) } - if _, err := testserver.GetCustomResourceDefinition(noxuDefinition, apiExtensionClient); err == nil || !errors.IsNotFound(err) { + if _, err := apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(noxuDefinition.Name, metav1.GetOptions{}); err == nil || !errors.IsNotFound(err) { t.Fatalf("expected a NotFound error, got:%v", err) } if _, err = noxuNamespacedResourceClient.List(metav1.ListOptions{}); err == nil || !errors.IsNotFound(err) { @@ -286,14 +252,14 @@ func TestDeRegistrationAndReRegistration(t *testing.T) { }() func() { - if _, err := testserver.GetCustomResourceDefinition(noxuDefinition, apiExtensionClient); err == nil || !errors.IsNotFound(err) { + if _, err := apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(noxuDefinition.Name, metav1.GetOptions{}); err == nil || !errors.IsNotFound(err) { t.Fatalf("expected a NotFound error, got:%v", err) } - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition, err := fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - noxuNamespacedResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) initialList, err := noxuNamespacedResourceClient.List(metav1.ListOptions{}) if err != nil { t.Fatal(err) @@ -301,10 +267,10 @@ func TestDeRegistrationAndReRegistration(t *testing.T) { if _, err = noxuNamespacedResourceClient.Get(sameInstanceName, metav1.GetOptions{}); err == nil || !errors.IsNotFound(err) { t.Fatalf("expected a NotFound error, got:%v", err) } - if e, a := 0, len(initialList.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 0, len(initialList.Items); e != a { t.Fatalf("expected %v, got %v", e, a) } - createdNoxuInstance, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns, sameInstanceName), noxuNamespacedResourceClient, noxuDefinition) + createdNoxuInstance, err := instantiateCustomResource(t, fixtures.NewNoxuInstance(ns, sameInstanceName), noxuNamespacedResourceClient, noxuDefinition) if err != nil { t.Fatal(err) } @@ -319,10 +285,10 @@ func TestDeRegistrationAndReRegistration(t *testing.T) { if err != nil { t.Fatal(err) } - if e, a := 1, len(listWithItem.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 1, len(listWithItem.Items); e != a { t.Fatalf("expected %v, got %v", e, a) } - if e, a := *createdNoxuInstance, listWithItem.(*unstructured.UnstructuredList).Items[0]; !reflect.DeepEqual(e, a) { + if e, a := *createdNoxuInstance, listWithItem.Items[0]; !reflect.DeepEqual(e, a) { t.Fatalf("expected %v, got %v", e, a) } @@ -336,44 +302,49 @@ func TestDeRegistrationAndReRegistration(t *testing.T) { if err != nil { t.Fatal(err) } - if e, a := 0, len(listWithoutItem.(*unstructured.UnstructuredList).Items); e != a { + if e, a := 0, len(listWithoutItem.Items); e != a { t.Fatalf("expected %v, got %v", e, a) } }() } func TestEtcdStorage(t *testing.T) { - config, err := testserver.DefaultServerConfig() + tearDown, clientConfig, s, err := fixtures.StartDefaultServer(t) if err != nil { t.Fatal(err) } - stopCh, apiExtensionClient, clientPool, err := testserver.StartServer(config) + defer tearDown() + + apiExtensionClient, err := apiextensionsclientset.NewForConfig(clientConfig) + if err != nil { + t.Fatal(err) + } + dynamicClient, err := dynamic.NewForConfig(clientConfig) if err != nil { t.Fatal(err) } - defer close(stopCh) - etcdPrefix := getPrefixFromConfig(t, config) + etcdPrefix := s.RecommendedOptions.Etcd.StorageConfig.Prefix ns1 := "another-default-is-possible" - curletDefinition := testserver.NewCurletCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) - curletVersionClient, err := testserver.CreateNewCustomResourceDefinition(curletDefinition, apiExtensionClient, clientPool) + curletDefinition := fixtures.NewCurletCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + curletDefinition, err = fixtures.CreateNewCustomResourceDefinition(curletDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - curletNamespacedResourceClient := NewNamespacedCustomResourceClient(ns1, curletVersionClient, curletDefinition) - if _, err := instantiateCustomResource(t, testserver.NewCurletInstance(ns1, "bar"), curletNamespacedResourceClient, curletDefinition); err != nil { + curletNamespacedResourceClient := newNamespacedCustomResourceClient(ns1, dynamicClient, curletDefinition) + if _, err := instantiateCustomResource(t, fixtures.NewCurletInstance(ns1, "bar"), curletNamespacedResourceClient, curletDefinition); err != nil { t.Fatalf("unable to create curlet cluster scoped Instance:%v", err) } ns2 := "the-cruel-default" - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } - noxuNamespacedResourceClient := NewNamespacedCustomResourceClient(ns2, noxuVersionClient, noxuDefinition) - if _, err := instantiateCustomResource(t, testserver.NewNoxuInstance(ns2, "foo"), noxuNamespacedResourceClient, noxuDefinition); err != nil { + noxuNamespacedResourceClient := newNamespacedCustomResourceClient(ns2, dynamicClient, noxuDefinition) + if _, err := instantiateCustomResource(t, fixtures.NewNoxuInstance(ns2, "foo"), noxuNamespacedResourceClient, noxuDefinition); err != nil { t.Fatalf("unable to create noxu namespace scoped Instance:%v", err) } @@ -456,14 +427,6 @@ func TestEtcdStorage(t *testing.T) { } } -func getPrefixFromConfig(t *testing.T, config *extensionsapiserver.Config) string { - extensionsOptionsGetter, ok := config.ExtraConfig.CRDRESTOptionsGetter.(extensionsapiserver.CRDRESTOptionsGetter) - if !ok { - t.Fatal("can't obtain etcd prefix: unable to cast config.CRDRESTOptionsGetter to extensionsapiserver.CRDRESTOptionsGetter") - } - return extensionsOptionsGetter.StoragePrefix -} - func getFromEtcd(keys clientv3.KV, prefix, localPath string) (*metaObject, error) { internalPath := path.Join("/", prefix, localPath) // TODO: Double check, should we concatenate two prefixes? response, err := keys.Get(context.Background(), internalPath) diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go new file mode 100644 index 000000000..c8c8728ee --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/subresources_test.go @@ -0,0 +1,770 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integration + +import ( + "math" + "reflect" + "sort" + "strings" + "testing" + + autoscaling "k8s.io/api/autoscaling/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/dynamic" + + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" +) + +var labelSelectorPath = ".status.labelSelector" + +func NewNoxuSubresourcesCRD(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { + return &apiextensionsv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "noxus.mygroup.example.com"}, + Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ + Group: "mygroup.example.com", + Version: "v1beta1", + Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ + Plural: "noxus", + Singular: "nonenglishnoxu", + Kind: "WishIHadChosenNoxu", + ShortNames: []string{"foo", "bar", "abc", "def"}, + ListKind: "NoxuItemList", + }, + Scope: scope, + Subresources: &apiextensionsv1beta1.CustomResourceSubresources{ + Status: &apiextensionsv1beta1.CustomResourceSubresourceStatus{}, + Scale: &apiextensionsv1beta1.CustomResourceSubresourceScale{ + SpecReplicasPath: ".spec.replicas", + StatusReplicasPath: ".status.replicas", + LabelSelectorPath: &labelSelectorPath, + }, + }, + }, + } +} + +func NewNoxuSubresourceInstance(namespace, name string) *unstructured.Unstructured { + return &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": "mygroup.example.com/v1beta1", + "kind": "WishIHadChosenNoxu", + "metadata": map[string]interface{}{ + "namespace": namespace, + "name": name, + }, + "spec": map[string]interface{}{ + "num": int64(10), + "replicas": int64(3), + }, + "status": map[string]interface{}{ + "replicas": int64(7), + }, + }, + } +} + +func TestStatusSubresource(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + noxuDefinition := NewNoxuSubresourcesCRD(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + ns := "not-the-default" + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + _, err = instantiateCustomResource(t, NewNoxuSubresourceInstance(ns, "foo"), noxuResourceClient, noxuDefinition) + if err != nil { + t.Fatalf("unable to create noxu instance: %v", err) + } + + gottenNoxuInstance, err := noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + + // status should not be set after creation + if val, ok := gottenNoxuInstance.Object["status"]; ok { + t.Fatalf("status should not be set after creation, got %v", val) + } + + // .status.num = 20 + err = unstructured.SetNestedField(gottenNoxuInstance.Object, int64(20), "status", "num") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // .spec.num = 20 + err = unstructured.SetNestedField(gottenNoxuInstance.Object, int64(20), "spec", "num") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // UpdateStatus should not update spec. + // Check that .spec.num = 10 and .status.num = 20 + updatedStatusInstance, err := noxuResourceClient.UpdateStatus(gottenNoxuInstance, metav1.UpdateOptions{}) + if err != nil { + t.Fatalf("unable to update status: %v", err) + } + + specNum, found, err := unstructured.NestedInt64(updatedStatusInstance.Object, "spec", "num") + if !found || err != nil { + t.Fatalf("unable to get .spec.num") + } + if specNum != int64(10) { + t.Fatalf(".spec.num: expected: %v, got: %v", int64(10), specNum) + } + + statusNum, found, err := unstructured.NestedInt64(updatedStatusInstance.Object, "status", "num") + if !found || err != nil { + t.Fatalf("unable to get .status.num") + } + if statusNum != int64(20) { + t.Fatalf(".status.num: expected: %v, got: %v", int64(20), statusNum) + } + + gottenNoxuInstance, err = noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + + // .status.num = 40 + err = unstructured.SetNestedField(gottenNoxuInstance.Object, int64(40), "status", "num") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // .spec.num = 40 + err = unstructured.SetNestedField(gottenNoxuInstance.Object, int64(40), "spec", "num") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // Update should not update status. + // Check that .spec.num = 40 and .status.num = 20 + updatedInstance, err := noxuResourceClient.Update(gottenNoxuInstance, metav1.UpdateOptions{}) + if err != nil { + t.Fatalf("unable to update instance: %v", err) + } + + specNum, found, err = unstructured.NestedInt64(updatedInstance.Object, "spec", "num") + if !found || err != nil { + t.Fatalf("unable to get .spec.num") + } + if specNum != int64(40) { + t.Fatalf(".spec.num: expected: %v, got: %v", int64(40), specNum) + } + + statusNum, found, err = unstructured.NestedInt64(updatedInstance.Object, "status", "num") + if !found || err != nil { + t.Fatalf("unable to get .status.num") + } + if statusNum != int64(20) { + t.Fatalf(".status.num: expected: %v, got: %v", int64(20), statusNum) + } +} + +func TestScaleSubresource(t *testing.T) { + groupResource := schema.GroupResource{ + Group: "mygroup.example.com", + Resource: "noxus", + } + + tearDown, config, _, err := fixtures.StartDefaultServer(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + noxuDefinition := NewNoxuSubresourcesCRD(apiextensionsv1beta1.NamespaceScoped) + + // set invalid json path for specReplicasPath + noxuDefinition.Spec.Subresources.Scale.SpecReplicasPath = "foo,bar" + _, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err == nil { + t.Fatalf("unexpected non-error: specReplicasPath should be a valid json path under .spec") + } + + noxuDefinition.Spec.Subresources.Scale.SpecReplicasPath = ".spec.replicas" + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + ns := "not-the-default" + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + _, err = instantiateCustomResource(t, NewNoxuSubresourceInstance(ns, "foo"), noxuResourceClient, noxuDefinition) + if err != nil { + t.Fatalf("unable to create noxu instance: %v", err) + } + + scaleClient, err := fixtures.CreateNewScaleClient(noxuDefinition, config) + if err != nil { + t.Fatal(err) + } + + // set .status.labelSelector = bar + gottenNoxuInstance, err := noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + err = unstructured.SetNestedField(gottenNoxuInstance.Object, "bar", "status", "labelSelector") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + _, err = noxuResourceClient.UpdateStatus(gottenNoxuInstance, metav1.UpdateOptions{}) + if err != nil { + t.Fatalf("unable to update status: %v", err) + } + + // get the scale object + gottenScale, err := scaleClient.Scales("not-the-default").Get(groupResource, "foo") + if err != nil { + t.Fatal(err) + } + if gottenScale.Spec.Replicas != 3 { + t.Fatalf("Scale.Spec.Replicas: expected: %v, got: %v", 3, gottenScale.Spec.Replicas) + } + if gottenScale.Status.Selector != "bar" { + t.Fatalf("Scale.Status.Selector: expected: %v, got: %v", "bar", gottenScale.Status.Selector) + } + + // check self link + expectedSelfLink := "/apis/mygroup.example.com/v1beta1/namespaces/not-the-default/noxus/foo/scale" + if gottenScale.GetSelfLink() != expectedSelfLink { + t.Fatalf("Scale.Metadata.SelfLink: expected: %v, got: %v", expectedSelfLink, gottenScale.GetSelfLink()) + } + + // update the scale object + // check that spec is updated, but status is not + gottenScale.Spec.Replicas = 5 + gottenScale.Status.Selector = "baz" + updatedScale, err := scaleClient.Scales("not-the-default").Update(groupResource, gottenScale) + if err != nil { + t.Fatal(err) + } + if updatedScale.Spec.Replicas != 5 { + t.Fatalf("replicas: expected: %v, got: %v", 5, updatedScale.Spec.Replicas) + } + if updatedScale.Status.Selector != "bar" { + t.Fatalf("scale should not update status: expected %v, got: %v", "bar", updatedScale.Status.Selector) + } + + // check that .spec.replicas = 5, but status is not updated + updatedNoxuInstance, err := noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + specReplicas, found, err := unstructured.NestedInt64(updatedNoxuInstance.Object, "spec", "replicas") + if !found || err != nil { + t.Fatalf("unable to get .spec.replicas") + } + if specReplicas != 5 { + t.Fatalf("replicas: expected: %v, got: %v", 5, specReplicas) + } + statusLabelSelector, found, err := unstructured.NestedString(updatedNoxuInstance.Object, "status", "labelSelector") + if !found || err != nil { + t.Fatalf("unable to get .status.labelSelector") + } + if statusLabelSelector != "bar" { + t.Fatalf("scale should not update status: expected %v, got: %v", "bar", statusLabelSelector) + } + + // validate maximum value + // set .spec.replicas = math.MaxInt64 + gottenNoxuInstance, err = noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + err = unstructured.SetNestedField(gottenNoxuInstance.Object, int64(math.MaxInt64), "spec", "replicas") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + _, err = noxuResourceClient.Update(gottenNoxuInstance, metav1.UpdateOptions{}) + if err == nil { + t.Fatalf("unexpected non-error: .spec.replicas should be less than 2147483647") + } +} + +func TestValidationSchemaWithStatus(t *testing.T) { + tearDown, config, _, err := fixtures.StartDefaultServer(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + // fields other than properties in root schema are not allowed + noxuDefinition := newNoxuValidationCRD(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition.Spec.Subresources = &apiextensionsv1beta1.CustomResourceSubresources{ + Status: &apiextensionsv1beta1.CustomResourceSubresourceStatus{}, + } + _, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err == nil { + t.Fatalf(`unexpected non-error, expected: must not have "additionalProperties" at the root of the schema if the status subresource is enabled`) + } + + // make sure we are not restricting fields to properties even in subschemas + noxuDefinition.Spec.Validation.OpenAPIV3Schema = &apiextensionsv1beta1.JSONSchemaProps{ + Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{ + "spec": { + Description: "Validation for spec", + Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{ + "replicas": { + Type: "integer", + }, + }, + }, + }, + Required: []string{"spec"}, + Description: "This is a description at the root of the schema", + } + _, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatalf("unable to created crd %v: %v", noxuDefinition.Name, err) + } +} + +func TestValidateOnlyStatus(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + // UpdateStatus should validate only status + // 1. create a crd with max value of .spec.num = 10 and .status.num = 10 + // 2. create a cr with .spec.num = 10 and .status.num = 10 (valid) + // 3. update the spec of the cr with .spec.num = 15 (spec is invalid), expect no error + // 4. update the spec of the cr with .spec.num = 15 (spec is invalid), expect error + + // max value of spec.num = 10 and status.num = 10 + schema := &apiextensionsv1beta1.JSONSchemaProps{ + Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{ + "spec": { + Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{ + "num": { + Type: "integer", + Maximum: float64Ptr(10), + }, + }, + }, + "status": { + Properties: map[string]apiextensionsv1beta1.JSONSchemaProps{ + "num": { + Type: "integer", + Maximum: float64Ptr(10), + }, + }, + }, + }, + } + + noxuDefinition := NewNoxuSubresourcesCRD(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition.Spec.Validation = &apiextensionsv1beta1.CustomResourceValidation{ + OpenAPIV3Schema: schema, + } + + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + ns := "not-the-default" + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + + // set .spec.num = 10 and .status.num = 10 + noxuInstance := NewNoxuSubresourceInstance(ns, "foo") + err = unstructured.SetNestedField(noxuInstance.Object, int64(10), "status", "num") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + createdNoxuInstance, err := instantiateCustomResource(t, noxuInstance, noxuResourceClient, noxuDefinition) + if err != nil { + t.Fatalf("unable to create noxu instance: %v", err) + } + + // update the spec with .spec.num = 15, expecting no error + err = unstructured.SetNestedField(createdNoxuInstance.Object, int64(15), "spec", "num") + if err != nil { + t.Fatalf("unexpected error setting .spec.num: %v", err) + } + createdNoxuInstance, err = noxuResourceClient.UpdateStatus(createdNoxuInstance, metav1.UpdateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // update with .status.num = 15, expecting an error + err = unstructured.SetNestedField(createdNoxuInstance.Object, int64(15), "status", "num") + if err != nil { + t.Fatalf("unexpected error setting .status.num: %v", err) + } + createdNoxuInstance, err = noxuResourceClient.UpdateStatus(createdNoxuInstance, metav1.UpdateOptions{}) + if err == nil { + t.Fatal("expected error, but got none") + } + statusError, isStatus := err.(*apierrors.StatusError) + if !isStatus || statusError == nil { + t.Fatalf("expected status error, got %T: %v", err, err) + } + if !strings.Contains(statusError.Error(), "Invalid value") { + t.Fatalf("expected 'Invalid value' in error, got: %v", err) + } +} + +func TestSubresourcesDiscovery(t *testing.T) { + tearDown, config, _, err := fixtures.StartDefaultServer(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + noxuDefinition := NewNoxuSubresourcesCRD(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + group := "mygroup.example.com" + version := "v1beta1" + + resources, err := apiExtensionClient.Discovery().ServerResourcesForGroupVersion(group + "/" + version) + if err != nil { + t.Fatal(err) + } + + if len(resources.APIResources) != 3 { + t.Fatalf("Expected exactly the resources \"noxus\", \"noxus/status\" and \"noxus/scale\" in group version %v/%v via discovery, got: %v", group, version, resources.APIResources) + } + + // check discovery info for status + status := resources.APIResources[1] + + if status.Name != "noxus/status" { + t.Fatalf("incorrect status via discovery: expected name: %v, got: %v", "noxus/status", status.Name) + } + + if status.Namespaced != true { + t.Fatalf("incorrect status via discovery: expected namespace: %v, got: %v", true, status.Namespaced) + } + + if status.Kind != "WishIHadChosenNoxu" { + t.Fatalf("incorrect status via discovery: expected kind: %v, got: %v", "WishIHadChosenNoxu", status.Kind) + } + + expectedVerbs := []string{"get", "patch", "update"} + sort.Strings(status.Verbs) + if !reflect.DeepEqual([]string(status.Verbs), expectedVerbs) { + t.Fatalf("incorrect status via discovery: expected: %v, got: %v", expectedVerbs, status.Verbs) + } + + // check discovery info for scale + scale := resources.APIResources[2] + + if scale.Group != autoscaling.GroupName { + t.Fatalf("incorrect scale via discovery: expected group: %v, got: %v", autoscaling.GroupName, scale.Group) + } + + if scale.Version != "v1" { + t.Fatalf("incorrect scale via discovery: expected version: %v, got %v", "v1", scale.Version) + } + + if scale.Name != "noxus/scale" { + t.Fatalf("incorrect scale via discovery: expected name: %v, got: %v", "noxus/scale", scale.Name) + } + + if scale.Namespaced != true { + t.Fatalf("incorrect scale via discovery: expected namespace: %v, got: %v", true, scale.Namespaced) + } + + if scale.Kind != "Scale" { + t.Fatalf("incorrect scale via discovery: expected kind: %v, got: %v", "Scale", scale.Kind) + } + + sort.Strings(scale.Verbs) + if !reflect.DeepEqual([]string(scale.Verbs), expectedVerbs) { + t.Fatalf("incorrect scale via discovery: expected: %v, got: %v", expectedVerbs, scale.Verbs) + } +} + +func TestGeneration(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + noxuDefinition := NewNoxuSubresourcesCRD(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + ns := "not-the-default" + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + _, err = instantiateCustomResource(t, NewNoxuSubresourceInstance(ns, "foo"), noxuResourceClient, noxuDefinition) + if err != nil { + t.Fatalf("unable to create noxu instance: %v", err) + } + + // .metadata.generation = 1 + gottenNoxuInstance, err := noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + if gottenNoxuInstance.GetGeneration() != 1 { + t.Fatalf(".metadata.generation should be 1 after creation") + } + + // .status.num = 20 + err = unstructured.SetNestedField(gottenNoxuInstance.Object, int64(20), "status", "num") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // UpdateStatus does not increment generation + updatedStatusInstance, err := noxuResourceClient.UpdateStatus(gottenNoxuInstance, metav1.UpdateOptions{}) + if err != nil { + t.Fatalf("unable to update status: %v", err) + } + if updatedStatusInstance.GetGeneration() != 1 { + t.Fatalf("updating status should not increment .metadata.generation: expected: %v, got: %v", 1, updatedStatusInstance.GetGeneration()) + } + + gottenNoxuInstance, err = noxuResourceClient.Get("foo", metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + + // .spec.num = 20 + err = unstructured.SetNestedField(gottenNoxuInstance.Object, int64(20), "spec", "num") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // Update increments generation + updatedInstance, err := noxuResourceClient.Update(gottenNoxuInstance, metav1.UpdateOptions{}) + if err != nil { + t.Fatalf("unable to update instance: %v", err) + } + if updatedInstance.GetGeneration() != 2 { + t.Fatalf("updating spec should increment .metadata.generation: expected: %v, got: %v", 2, updatedStatusInstance.GetGeneration()) + } +} + +func TestSubresourcePatch(t *testing.T) { + groupResource := schema.GroupResource{ + Group: "mygroup.example.com", + Resource: "noxus", + } + + tearDown, config, _, err := fixtures.StartDefaultServer(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + noxuDefinition := NewNoxuSubresourcesCRD(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + ns := "not-the-default" + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) + + t.Logf("Creating foo") + _, err = instantiateCustomResource(t, NewNoxuSubresourceInstance(ns, "foo"), noxuResourceClient, noxuDefinition) + if err != nil { + t.Fatalf("unable to create noxu instance: %v", err) + } + + scaleClient, err := fixtures.CreateNewScaleClient(noxuDefinition, config) + if err != nil { + t.Fatal(err) + } + + t.Logf("Patching .status.num to 999") + patch := []byte(`{"spec": {"num":999}, "status": {"num":999}}`) + patchedNoxuInstance, err := noxuResourceClient.Patch("foo", types.MergePatchType, patch, metav1.UpdateOptions{}, "status") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 999, "status", "num") // .status.num should be 999 + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 10, "spec", "num") // .spec.num should remain 10 + rv, found, err := unstructured.NestedString(patchedNoxuInstance.UnstructuredContent(), "metadata", "resourceVersion") + if err != nil { + t.Fatal(err) + } + if !found { + t.Fatalf("metadata.resourceVersion not found") + } + + // this call waits for the resourceVersion to be reached in the cache before returning. + // We need to do this because the patch gets its initial object from the storage, and the cache serves that. + // If it is out of date, then our initial patch is applied to an old resource version, which conflicts + // and then the updated object shows a conflicting diff, which permanently fails the patch. + // This gives expected stability in the patch without retrying on an known number of conflicts below in the test. + // See https://issue.k8s.io/42644 + _, err = noxuResourceClient.Get("foo", metav1.GetOptions{ResourceVersion: patchedNoxuInstance.GetResourceVersion()}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // no-op patch + t.Logf("Patching .status.num again to 999") + patchedNoxuInstance, err = noxuResourceClient.Patch("foo", types.MergePatchType, patch, metav1.UpdateOptions{}, "status") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + // make sure no-op patch does not increment resourceVersion + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 999, "status", "num") + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 10, "spec", "num") + expectString(t, patchedNoxuInstance.UnstructuredContent(), rv, "metadata", "resourceVersion") + + // empty patch + t.Logf("Applying empty patch") + patchedNoxuInstance, err = noxuResourceClient.Patch("foo", types.MergePatchType, []byte(`{}`), metav1.UpdateOptions{}, "status") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + // an empty patch is a no-op patch. make sure it does not increment resourceVersion + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 999, "status", "num") + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 10, "spec", "num") + expectString(t, patchedNoxuInstance.UnstructuredContent(), rv, "metadata", "resourceVersion") + + t.Logf("Patching .spec.replicas to 7") + patch = []byte(`{"spec": {"replicas":7}, "status": {"replicas":7}}`) + patchedNoxuInstance, err = noxuResourceClient.Patch("foo", types.MergePatchType, patch, metav1.UpdateOptions{}, "scale") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 7, "spec", "replicas") + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 0, "status", "replicas") // .status.replicas should remain 0 + rv, found, err = unstructured.NestedString(patchedNoxuInstance.UnstructuredContent(), "metadata", "resourceVersion") + if err != nil { + t.Fatal(err) + } + if !found { + t.Fatalf("metadata.resourceVersion not found") + } + + // this call waits for the resourceVersion to be reached in the cache before returning. + // We need to do this because the patch gets its initial object from the storage, and the cache serves that. + // If it is out of date, then our initial patch is applied to an old resource version, which conflicts + // and then the updated object shows a conflicting diff, which permanently fails the patch. + // This gives expected stability in the patch without retrying on an known number of conflicts below in the test. + // See https://issue.k8s.io/42644 + _, err = noxuResourceClient.Get("foo", metav1.GetOptions{ResourceVersion: patchedNoxuInstance.GetResourceVersion()}) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + // Scale.Spec.Replicas = 7 but Scale.Status.Replicas should remain 0 + gottenScale, err := scaleClient.Scales("not-the-default").Get(groupResource, "foo") + if err != nil { + t.Fatal(err) + } + if gottenScale.Spec.Replicas != 7 { + t.Fatalf("Scale.Spec.Replicas: expected: %v, got: %v", 7, gottenScale.Spec.Replicas) + } + if gottenScale.Status.Replicas != 0 { + t.Fatalf("Scale.Status.Replicas: expected: %v, got: %v", 0, gottenScale.Spec.Replicas) + } + + // no-op patch + t.Logf("Patching .spec.replicas again to 7") + patchedNoxuInstance, err = noxuResourceClient.Patch("foo", types.MergePatchType, patch, metav1.UpdateOptions{}, "scale") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + // make sure no-op patch does not increment resourceVersion + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 7, "spec", "replicas") + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 0, "status", "replicas") + expectString(t, patchedNoxuInstance.UnstructuredContent(), rv, "metadata", "resourceVersion") + + // empty patch + t.Logf("Applying empty patch") + patchedNoxuInstance, err = noxuResourceClient.Patch("foo", types.MergePatchType, []byte(`{}`), metav1.UpdateOptions{}, "scale") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + // an empty patch is a no-op patch. make sure it does not increment resourceVersion + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 7, "spec", "replicas") + expectInt64(t, patchedNoxuInstance.UnstructuredContent(), 0, "status", "replicas") + expectString(t, patchedNoxuInstance.UnstructuredContent(), rv, "metadata", "resourceVersion") + + // make sure strategic merge patch is not supported for both status and scale + _, err = noxuResourceClient.Patch("foo", types.StrategicMergePatchType, patch, metav1.UpdateOptions{}, "status") + if err == nil { + t.Fatalf("unexpected non-error: strategic merge patch is not supported for custom resources") + } + + _, err = noxuResourceClient.Patch("foo", types.StrategicMergePatchType, patch, metav1.UpdateOptions{}, "scale") + if err == nil { + t.Fatalf("unexpected non-error: strategic merge patch is not supported for custom resources") + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/table_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/table_test.go new file mode 100644 index 000000000..7aab4f408 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/table_test.go @@ -0,0 +1,218 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integration + +import ( + "fmt" + "testing" + "time" + + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/rest" + + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" +) + +func newTableCRD() *apiextensionsv1beta1.CustomResourceDefinition { + return &apiextensionsv1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{Name: "tables.mygroup.example.com"}, + Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ + Group: "mygroup.example.com", + Version: "v1beta1", + Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ + Plural: "tables", + Singular: "table", + Kind: "Table", + ListKind: "TablemList", + }, + Scope: apiextensionsv1beta1.ClusterScoped, + AdditionalPrinterColumns: []apiextensionsv1beta1.CustomResourceColumnDefinition{ + {Name: "Age", Type: "date", JSONPath: ".metadata.creationTimestamp"}, + {Name: "Alpha", Type: "string", JSONPath: ".spec.alpha"}, + {Name: "Beta", Type: "integer", Description: "the beta field", Format: "int64", Priority: 42, JSONPath: ".spec.beta"}, + {Name: "Gamma", Type: "integer", Description: "a column with wrongly typed values", JSONPath: ".spec.gamma"}, + {Name: "Epsilon", Type: "string", Description: "an array of integers as string", JSONPath: ".spec.epsilon"}, + }, + }, + } +} + +func newTableInstance(name string) *unstructured.Unstructured { + return &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": "mygroup.example.com/v1beta1", + "kind": "Table", + "metadata": map[string]interface{}{ + "name": name, + }, + "spec": map[string]interface{}{ + "alpha": "foo_123", + "beta": 10, + "gamma": "bar", + "delta": "hello", + "epsilon": []int64{1, 2, 3}, + }, + }, + } +} + +func TestTableGet(t *testing.T) { + tearDown, config, _, err := fixtures.StartDefaultServer(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + crd := newTableCRD() + crd, err = fixtures.CreateNewCustomResourceDefinition(crd, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + crd, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(crd.Name, metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + t.Logf("table crd created: %#v", crd) + + crClient := newNamespacedCustomResourceClient("", dynamicClient, crd) + foo, err := crClient.Create(newTableInstance("foo"), metav1.CreateOptions{}) + if err != nil { + t.Fatalf("unable to create noxu instance: %v", err) + } + t.Logf("foo created: %#v", foo.UnstructuredContent()) + + gv := schema.GroupVersion{Group: crd.Spec.Group, Version: crd.Spec.Version} + gvk := gv.WithKind(crd.Spec.Names.Kind) + + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + parameterCodec := runtime.NewParameterCodec(scheme) + metav1.AddToGroupVersion(scheme, gv) + scheme.AddKnownTypes(gv, &metav1beta1.Table{}, &metav1beta1.TableOptions{}) + scheme.AddKnownTypes(metav1beta1.SchemeGroupVersion, &metav1beta1.Table{}, &metav1beta1.TableOptions{}) + + crConfig := *config + crConfig.GroupVersion = &gv + crConfig.APIPath = "/apis" + crConfig.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: codecs} + crRestClient, err := rest.RESTClientFor(&crConfig) + if err != nil { + t.Fatal(err) + } + + ret, err := crRestClient.Get(). + Resource(crd.Spec.Names.Plural). + SetHeader("Accept", fmt.Sprintf("application/json;as=Table;v=%s;g=%s, application/json", metav1beta1.SchemeGroupVersion.Version, metav1beta1.GroupName)). + VersionedParams(&metav1beta1.TableOptions{}, parameterCodec). + Do(). + Get() + if err != nil { + t.Fatalf("failed to list %v resources: %v", gvk, err) + } + + tbl, ok := ret.(*metav1beta1.Table) + if !ok { + t.Fatalf("expected metav1beta1.Table, got %T", ret) + } + t.Logf("%v table list: %#v", gvk, tbl) + + if got, expected := len(tbl.ColumnDefinitions), 6; got != expected { + t.Errorf("expected %d headers, got %d", expected, got) + } else { + age := metav1beta1.TableColumnDefinition{Name: "Age", Type: "date", Format: "", Description: "Custom resource definition column (in JSONPath format): .metadata.creationTimestamp", Priority: 0} + if got, expected := tbl.ColumnDefinitions[1], age; got != expected { + t.Errorf("expected column definition %#v, got %#v", expected, got) + } + + alpha := metav1beta1.TableColumnDefinition{Name: "Alpha", Type: "string", Format: "", Description: "Custom resource definition column (in JSONPath format): .spec.alpha", Priority: 0} + if got, expected := tbl.ColumnDefinitions[2], alpha; got != expected { + t.Errorf("expected column definition %#v, got %#v", expected, got) + } + + beta := metav1beta1.TableColumnDefinition{Name: "Beta", Type: "integer", Format: "int64", Description: "the beta field", Priority: 42} + if got, expected := tbl.ColumnDefinitions[3], beta; got != expected { + t.Errorf("expected column definition %#v, got %#v", expected, got) + } + + gamma := metav1beta1.TableColumnDefinition{Name: "Gamma", Type: "integer", Description: "a column with wrongly typed values"} + if got, expected := tbl.ColumnDefinitions[4], gamma; got != expected { + t.Errorf("expected column definition %#v, got %#v", expected, got) + } + + epsilon := metav1beta1.TableColumnDefinition{Name: "Epsilon", Type: "string", Description: "an array of integers as string"} + if got, expected := tbl.ColumnDefinitions[5], epsilon; got != expected { + t.Errorf("expected column definition %#v, got %#v", expected, got) + } + } + if got, expected := len(tbl.Rows), 1; got != expected { + t.Errorf("expected %d rows, got %d", expected, got) + } else if got, expected := len(tbl.Rows[0].Cells), 6; got != expected { + t.Errorf("expected %d cells, got %d", expected, got) + } else { + if got, expected := tbl.Rows[0].Cells[0], "foo"; got != expected { + t.Errorf("expected cell[0] to equal %q, got %q", expected, got) + } + if s, ok := tbl.Rows[0].Cells[1].(string); !ok { + t.Errorf("expected cell[1] to be a string, got: %#v", tbl.Rows[0].Cells[1]) + } else { + dur, err := time.ParseDuration(s) + if err != nil { + t.Errorf("expected cell[1] to be a duration: %v", err) + } else if abs(dur.Seconds()) > 30.0 { + t.Errorf("expected cell[1] to be a small age, but got: %v", dur) + } + } + if got, expected := tbl.Rows[0].Cells[2], "foo_123"; got != expected { + t.Errorf("expected cell[2] to equal %q, got %q", expected, got) + } + if got, expected := tbl.Rows[0].Cells[3], int64(10); got != expected { + t.Errorf("expected cell[3] to equal %#v, got %#v", expected, got) + } + if got, expected := tbl.Rows[0].Cells[4], interface{}(nil); got != expected { + t.Errorf("expected cell[4] to equal %#v although the type does not match the column, got %#v", expected, got) + } + if got, expected := tbl.Rows[0].Cells[5], "[1 2 3]"; got != expected { + t.Errorf("expected cell[5] to equal %q, got %q", expected, got) + } + } +} + +func abs(x float64) float64 { + if x < 0 { + return -x + } + return x +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/BUILD b/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/BUILD deleted file mode 100644 index 655dbc357..000000000 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "resources.go", - "start.go", - ], - importpath = "k8s.io/apiextensions-apiserver/test/integration/testserver", - deps = [ - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/apiserver:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library", - "//vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/options:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library", - "//vendor/k8s.io/client-go/dynamic:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/resources.go b/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/resources.go deleted file mode 100644 index 562281f4c..000000000 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/resources.go +++ /dev/null @@ -1,295 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testserver - -import ( - "fmt" - "time" - - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/apiserver/pkg/storage/names" - "k8s.io/client-go/dynamic" -) - -const ( - noxuInstanceNum int64 = 9223372036854775807 -) - -//NewRandomNameCustomResourceDefinition generates a CRD with random name to avoid name conflict in e2e tests -func NewRandomNameCustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { - // ensure the singular doesn't end in an s for now - gName := names.SimpleNameGenerator.GenerateName("foo") + "a" - return &apiextensionsv1beta1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{Name: gName + "s.mygroup.example.com"}, - Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ - Group: "mygroup.example.com", - Version: "v1beta1", - Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ - Plural: gName + "s", - Singular: gName, - Kind: gName, - ListKind: gName + "List", - }, - Scope: scope, - }, - } -} - -func NewNoxuCustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { - return &apiextensionsv1beta1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{Name: "noxus.mygroup.example.com"}, - Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ - Group: "mygroup.example.com", - Version: "v1beta1", - Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ - Plural: "noxus", - Singular: "nonenglishnoxu", - Kind: "WishIHadChosenNoxu", - ShortNames: []string{"foo", "bar", "abc", "def"}, - ListKind: "NoxuItemList", - }, - Scope: scope, - }, - } -} - -func NewNoxuInstance(namespace, name string) *unstructured.Unstructured { - return &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "mygroup.example.com/v1beta1", - "kind": "WishIHadChosenNoxu", - "metadata": map[string]interface{}{ - "namespace": namespace, - "name": name, - }, - "content": map[string]interface{}{ - "key": "value", - }, - "num": map[string]interface{}{ - "num1": noxuInstanceNum, - "num2": 1000000, - }, - }, - } -} - -func NewNoxu2CustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { - return &apiextensionsv1beta1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{Name: "noxus2.mygroup.example.com"}, - Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ - Group: "mygroup.example.com", - Version: "v1alpha1", - Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ - Plural: "noxus2", - Singular: "nonenglishnoxu2", - Kind: "WishIHadChosenNoxu2", - ShortNames: []string{"foo", "bar", "abc", "def"}, - ListKind: "Noxu2ItemList", - }, - Scope: scope, - }, - } -} - -func NewCurletCustomResourceDefinition(scope apiextensionsv1beta1.ResourceScope) *apiextensionsv1beta1.CustomResourceDefinition { - return &apiextensionsv1beta1.CustomResourceDefinition{ - ObjectMeta: metav1.ObjectMeta{Name: "curlets.mygroup.example.com"}, - Spec: apiextensionsv1beta1.CustomResourceDefinitionSpec{ - Group: "mygroup.example.com", - Version: "v1beta1", - Names: apiextensionsv1beta1.CustomResourceDefinitionNames{ - Plural: "curlets", - Singular: "curlet", - Kind: "Curlet", - ListKind: "CurletList", - }, - Scope: scope, - }, - } -} - -func NewCurletInstance(namespace, name string) *unstructured.Unstructured { - return &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "mygroup.example.com/v1beta1", - "kind": "Curlet", - "metadata": map[string]interface{}{ - "namespace": namespace, - "name": name, - }, - "content": map[string]interface{}{ - "key": "value", - }, - }, - } -} - -// CreateNewCustomResourceDefinitionWatchUnsafe creates the CRD and makes sure -// the apiextension apiserver has installed the CRD. But it's not safe to watch -// the created CR. Please call CreateNewCustomResourceDefinition if you need to -// watch the CR. -func CreateNewCustomResourceDefinitionWatchUnsafe(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface, clientPool dynamic.ClientPool) (dynamic.Interface, error) { - _, err := apiExtensionsClient.Apiextensions().CustomResourceDefinitions().Create(crd) - if err != nil { - return nil, err - } - - // wait until the resource appears in discovery - err = wait.PollImmediate(500*time.Millisecond, 30*time.Second, func() (bool, error) { - resourceList, err := apiExtensionsClient.Discovery().ServerResourcesForGroupVersion(crd.Spec.Group + "/" + crd.Spec.Version) - if err != nil { - return false, nil - } - for _, resource := range resourceList.APIResources { - if resource.Name == crd.Spec.Names.Plural { - return true, nil - } - } - return false, nil - }) - if err != nil { - return nil, err - } - - return clientPool.ClientForGroupVersionResource(schema.GroupVersionResource{Group: crd.Spec.Group, Version: crd.Spec.Version, Resource: crd.Spec.Names.Plural}) -} - -func CreateNewCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface, clientPool dynamic.ClientPool) (dynamic.Interface, error) { - dynamicClient, err := CreateNewCustomResourceDefinitionWatchUnsafe(crd, apiExtensionsClient, clientPool) - if err != nil { - return nil, err - } - - // This is only for a test. We need the watch cache to have a resource version that works for the test. - // When new REST storage is created, the storage cacher for the CR starts asynchronously. - // REST API operations return like list use the RV of etcd, but the storage cacher's reflector's list - // can get a different RV because etcd can be touched in between the initial list operation (if that's what you're doing first) - // and the storage cache reflector starting. - // Later, you can issue a watch with the REST apis list.RV and end up earlier than the storage cacher. - // The general working model is that if you get a "resourceVersion too old" message, you re-list and rewatch. - // For this test, we'll actually cycle, "list/watch/create/delete" until we get an RV from list that observes the create and not an error. - // This way all the tests that are checking for watches don't have to worry about RV too old problems because crazy things *could* happen - // before like the created RV could be too old to watch. - var primingErr error - wait.PollImmediate(500*time.Millisecond, 30*time.Second, func() (bool, error) { - primingErr = checkForWatchCachePrimed(crd, dynamicClient) - if primingErr == nil { - return true, nil - } - return false, nil - }) - if primingErr != nil { - return nil, primingErr - } - - return dynamicClient, nil -} - -func checkForWatchCachePrimed(crd *apiextensionsv1beta1.CustomResourceDefinition, dynamicClient dynamic.Interface) error { - ns := "" - if crd.Spec.Scope != apiextensionsv1beta1.ClusterScoped { - ns = "aval" - } - resourceClient := dynamicClient.Resource(&metav1.APIResource{ - Name: crd.Spec.Names.Plural, - Namespaced: crd.Spec.Scope != apiextensionsv1beta1.ClusterScoped, - }, ns) - initialList, err := resourceClient.List(metav1.ListOptions{}) - if err != nil { - return err - } - initialListListMeta, err := meta.ListAccessor(initialList) - if err != nil { - return err - } - - instanceName := "setup-instance" - instance := &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": crd.Spec.Group + "/" + crd.Spec.Version, - "kind": crd.Spec.Names.Kind, - "metadata": map[string]interface{}{ - "namespace": ns, - "name": instanceName, - }, - "alpha": "foo_123", - "beta": 10, - "gamma": "bar", - "delta": "hello", - "epsilon": "foobar", - }, - } - if _, err := resourceClient.Create(instance); err != nil { - return err - } - // we created something, clean it up - defer func() { - resourceClient.Delete(instanceName, nil) - }() - - noxuWatch, err := resourceClient.Watch(metav1.ListOptions{ResourceVersion: initialListListMeta.GetResourceVersion()}) - if err != nil { - return err - } - defer noxuWatch.Stop() - - select { - case watchEvent := <-noxuWatch.ResultChan(): - if watch.Added == watchEvent.Type { - return nil - } - return fmt.Errorf("expected add, but got %#v", watchEvent) - - case <-time.After(5 * time.Second): - return fmt.Errorf("gave up waiting for watch event") - } -} - -func DeleteCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) error { - if err := apiExtensionsClient.Apiextensions().CustomResourceDefinitions().Delete(crd.Name, nil); err != nil { - return err - } - err := wait.PollImmediate(500*time.Millisecond, 30*time.Second, func() (bool, error) { - groupResource, err := apiExtensionsClient.Discovery().ServerResourcesForGroupVersion(crd.Spec.Group + "/" + crd.Spec.Version) - if err != nil { - if errors.IsNotFound(err) { - return true, nil - - } - return false, err - } - for _, g := range groupResource.APIResources { - if g.Name == crd.Spec.Names.Plural { - return false, nil - } - } - return true, nil - }) - return err -} - -func GetCustomResourceDefinition(crd *apiextensionsv1beta1.CustomResourceDefinition, apiExtensionsClient clientset.Interface) (*apiextensionsv1beta1.CustomResourceDefinition, error) { - return apiExtensionsClient.Apiextensions().CustomResourceDefinitions().Get(crd.Name, metav1.GetOptions{}) -} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/start.go b/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/start.go deleted file mode 100644 index 35c844faf..000000000 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/testserver/start.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testserver - -import ( - "fmt" - "net" - "os" - "time" - - "github.com/pborman/uuid" - - extensionsapiserver "k8s.io/apiextensions-apiserver/pkg/apiserver" - "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - "k8s.io/apiextensions-apiserver/pkg/cmd/server" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/util/wait" - genericapiserver "k8s.io/apiserver/pkg/server" - genericapiserveroptions "k8s.io/apiserver/pkg/server/options" - "k8s.io/client-go/dynamic" -) - -func DefaultServerConfig() (*extensionsapiserver.Config, error) { - listener, port, err := genericapiserveroptions.CreateListener("tcp", "127.0.0.1:0") - if err != nil { - return nil, err - } - - options := server.NewCustomResourceDefinitionsServerOptions(os.Stdout, os.Stderr) - options.RecommendedOptions.Audit.LogOptions.Path = "-" - options.RecommendedOptions.SecureServing.BindPort = port - options.RecommendedOptions.Authentication = nil // disable - options.RecommendedOptions.Authorization = nil // disable - options.RecommendedOptions.Admission = nil // disable - options.RecommendedOptions.SecureServing.BindAddress = net.ParseIP("127.0.0.1") - options.RecommendedOptions.SecureServing.Listener = listener - etcdURL, ok := os.LookupEnv("KUBE_INTEGRATION_ETCD_URL") - if !ok { - etcdURL = "http://127.0.0.1:2379" - } - options.RecommendedOptions.Etcd.StorageConfig.ServerList = []string{etcdURL} - options.RecommendedOptions.Etcd.StorageConfig.Prefix = uuid.New() - - genericConfig := genericapiserver.NewRecommendedConfig(extensionsapiserver.Codecs) - - if err := options.RecommendedOptions.SecureServing.MaybeDefaultWithSelfSignedCerts("localhost", nil, []net.IP{net.ParseIP("127.0.0.1")}); err != nil { - return nil, fmt.Errorf("error creating self-signed certificates: %v", err) - } - if err := options.RecommendedOptions.ApplyTo(genericConfig, nil); err != nil { - return nil, err - } - if err := options.APIEnablement.ApplyTo(&genericConfig.Config, extensionsapiserver.DefaultAPIResourceConfigSource(), extensionsapiserver.Registry); err != nil { - return nil, err - } - - customResourceDefinitionRESTOptionsGetter := extensionsapiserver.CRDRESTOptionsGetter{ - StorageConfig: options.RecommendedOptions.Etcd.StorageConfig, - StoragePrefix: options.RecommendedOptions.Etcd.StorageConfig.Prefix, - EnableWatchCache: options.RecommendedOptions.Etcd.EnableWatchCache, - DefaultWatchCacheSize: options.RecommendedOptions.Etcd.DefaultWatchCacheSize, - EnableGarbageCollection: options.RecommendedOptions.Etcd.EnableGarbageCollection, - DeleteCollectionWorkers: options.RecommendedOptions.Etcd.DeleteCollectionWorkers, - } - customResourceDefinitionRESTOptionsGetter.StorageConfig.Codec = unstructured.UnstructuredJSONScheme - - config := &extensionsapiserver.Config{ - GenericConfig: genericConfig, - ExtraConfig: extensionsapiserver.ExtraConfig{ - CRDRESTOptionsGetter: customResourceDefinitionRESTOptionsGetter, - }, - } - - return config, nil -} - -func StartServer(config *extensionsapiserver.Config) (chan struct{}, clientset.Interface, dynamic.ClientPool, error) { - stopCh := make(chan struct{}) - server, err := config.Complete().New(genericapiserver.EmptyDelegate) - if err != nil { - return nil, nil, nil, err - } - go func() { - err := server.GenericAPIServer.PrepareRun().Run(stopCh) - if err != nil { - close(stopCh) - panic(err) - } - }() - - // wait until the server is healthy - err = wait.PollImmediate(30*time.Millisecond, 30*time.Second, func() (bool, error) { - healthClient, err := clientset.NewForConfig(server.GenericAPIServer.LoopbackClientConfig) - if err != nil { - return false, nil - } - healthResult := healthClient.Discovery().RESTClient().Get().AbsPath("/healthz").Do() - if healthResult.Error() != nil { - return false, nil - } - rawHealth, err := healthResult.Raw() - if err != nil { - return false, nil - } - if string(rawHealth) != "ok" { - return false, nil - } - - return true, nil - }) - if err != nil { - close(stopCh) - return nil, nil, nil, err - } - - apiExtensionsClient, err := clientset.NewForConfig(server.GenericAPIServer.LoopbackClientConfig) - if err != nil { - close(stopCh) - return nil, nil, nil, err - } - - bytes, _ := apiExtensionsClient.Discovery().RESTClient().Get().AbsPath("/apis/apiextensions.k8s.io/v1beta1").DoRaw() - fmt.Print(string(bytes)) - - return stopCh, apiExtensionsClient, dynamic.NewDynamicClientPool(server.GenericAPIServer.LoopbackClientConfig), nil -} - -func StartDefaultServer() (chan struct{}, clientset.Interface, dynamic.ClientPool, error) { - config, err := DefaultServerConfig() - if err != nil { - return nil, nil, nil, err - } - - return StartServer(config) -} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/validation_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/validation_test.go index e30c0ee1e..37f9d0943 100644 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/validation_test.go +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/validation_test.go @@ -27,24 +27,24 @@ import ( "k8s.io/apimachinery/pkg/util/wait" apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apiextensions-apiserver/test/integration/testserver" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" ) func TestForProperValidationErrors(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) tests := []struct { name string @@ -54,8 +54,7 @@ func TestForProperValidationErrors(t *testing.T) { { name: "bad version", instanceFn: func() *unstructured.Unstructured { - instance := testserver.NewNoxuInstance(ns, "foo") - instance.Object["apiVersion"] = "mygroup.example.com/v2" + instance := fixtures.NewVersionedNoxuInstance(ns, "foo", "v2") return instance }, expectedError: "the API version in the data (mygroup.example.com/v2) does not match the expected API version (mygroup.example.com/v1beta1)", @@ -63,7 +62,7 @@ func TestForProperValidationErrors(t *testing.T) { { name: "bad kind", instanceFn: func() *unstructured.Unstructured { - instance := testserver.NewNoxuInstance(ns, "foo") + instance := fixtures.NewNoxuInstance(ns, "foo") instance.Object["kind"] = "SomethingElse" return instance }, @@ -72,7 +71,7 @@ func TestForProperValidationErrors(t *testing.T) { } for _, tc := range tests { - _, err := noxuResourceClient.Create(tc.instanceFn()) + _, err := noxuResourceClient.Create(tc.instanceFn(), metav1.CreateOptions{}) if err == nil { t.Errorf("%v: expected %v", tc.name, tc.expectedError) continue @@ -169,20 +168,20 @@ func newNoxuValidationInstance(namespace, name string) *unstructured.Unstructure } func TestCustomResourceValidation(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() noxuDefinition := newNoxuValidationCRD(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) _, err = instantiateCustomResource(t, newNoxuValidationInstance(ns, "foo"), noxuResourceClient, noxuDefinition) if err != nil { t.Fatalf("unable to create noxu instance: %v", err) @@ -190,20 +189,20 @@ func TestCustomResourceValidation(t *testing.T) { } func TestCustomResourceUpdateValidation(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() noxuDefinition := newNoxuValidationCRD(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) _, err = instantiateCustomResource(t, newNoxuValidationInstance(ns, "foo"), noxuResourceClient, noxuDefinition) if err != nil { t.Fatalf("unable to create noxu instance: %v", err) @@ -226,27 +225,27 @@ func TestCustomResourceUpdateValidation(t *testing.T) { "delta": "hello", } - _, err = noxuResourceClient.Update(gottenNoxuInstance) + _, err = noxuResourceClient.Update(gottenNoxuInstance, metav1.UpdateOptions{}) if err == nil { t.Fatalf("unexpected non-error: alpha and beta should be present while updating %v", gottenNoxuInstance) } } func TestCustomResourceValidationErrors(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() noxuDefinition := newNoxuValidationCRD(apiextensionsv1beta1.NamespaceScoped) - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) tests := []struct { name string @@ -310,7 +309,7 @@ func TestCustomResourceValidationErrors(t *testing.T) { } for _, tc := range tests { - _, err := noxuResourceClient.Create(tc.instanceFn()) + _, err := noxuResourceClient.Create(tc.instanceFn(), metav1.CreateOptions{}) if err == nil { t.Errorf("%v: expected %v", tc.name, tc.expectedError) continue @@ -324,23 +323,23 @@ func TestCustomResourceValidationErrors(t *testing.T) { } func TestCRValidationOnCRDUpdate(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() noxuDefinition := newNoxuValidationCRD(apiextensionsv1beta1.NamespaceScoped) // set stricter schema noxuDefinition.Spec.Validation.OpenAPIV3Schema.Required = []string{"alpha", "beta", "epsilon"} - noxuVersionClient, err := testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } ns := "not-the-default" - noxuResourceClient := NewNamespacedCustomResourceClient(ns, noxuVersionClient, noxuDefinition) + noxuResourceClient := newNamespacedCustomResourceClient(ns, dynamicClient, noxuDefinition) // CR is rejected _, err = instantiateCustomResource(t, newNoxuValidationInstance(ns, "foo"), noxuResourceClient, noxuDefinition) @@ -348,20 +347,17 @@ func TestCRValidationOnCRDUpdate(t *testing.T) { t.Fatalf("unexpected non-error: CR should be rejected") } - gottenCRD, err := apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get("noxus.mygroup.example.com", metav1.GetOptions{}) - if err != nil { - t.Fatal(err) - } - // update the CRD to a less stricter schema - gottenCRD.Spec.Validation.OpenAPIV3Schema.Required = []string{"alpha", "beta"} - if _, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Update(gottenCRD); err != nil { + _, err = updateCustomResourceDefinitionWithRetry(apiExtensionClient, "noxus.mygroup.example.com", func(crd *apiextensionsv1beta1.CustomResourceDefinition) { + crd.Spec.Validation.OpenAPIV3Schema.Required = []string{"alpha", "beta"} + }) + if err != nil { t.Fatal(err) } // CR is now accepted err = wait.Poll(500*time.Millisecond, wait.ForeverTestTimeout, func() (bool, error) { - _, err := noxuResourceClient.Create(newNoxuValidationInstance(ns, "foo")) + _, err := noxuResourceClient.Create(newNoxuValidationInstance(ns, "foo"), metav1.CreateOptions{}) if statusError, isStatus := err.(*apierrors.StatusError); isStatus { if strings.Contains(statusError.Error(), "is invalid") { return false, nil @@ -378,16 +374,16 @@ func TestCRValidationOnCRDUpdate(t *testing.T) { } func TestForbiddenFieldsInSchema(t *testing.T) { - stopCh, apiExtensionClient, clientPool, err := testserver.StartDefaultServer() + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) if err != nil { t.Fatal(err) } - defer close(stopCh) + defer tearDown() noxuDefinition := newNoxuValidationCRD(apiextensionsv1beta1.NamespaceScoped) noxuDefinition.Spec.Validation.OpenAPIV3Schema.AdditionalProperties.Allows = false - _, err = testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + _, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err == nil { t.Fatalf("unexpected non-error: additionalProperties cannot be set to false") } @@ -398,7 +394,7 @@ func TestForbiddenFieldsInSchema(t *testing.T) { } noxuDefinition.Spec.Validation.OpenAPIV3Schema.AdditionalProperties.Allows = true - _, err = testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + _, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err == nil { t.Fatalf("unexpected non-error: uniqueItems cannot be set to true") } @@ -409,14 +405,14 @@ func TestForbiddenFieldsInSchema(t *testing.T) { UniqueItems: false, } - _, err = testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + _, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err == nil { t.Fatal("unexpected non-error: $ref cannot be non-empty string") } noxuDefinition.Spec.Validation.OpenAPIV3Schema.Ref = nil - _, err = testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/versioning_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/versioning_test.go new file mode 100644 index 000000000..7d305b081 --- /dev/null +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/versioning_test.go @@ -0,0 +1,138 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integration + +import ( + "reflect" + "testing" + + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +func TestVersionedNamspacedScopedCRD(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + noxuDefinition := fixtures.NewMultipleVersionNoxuCRD(apiextensionsv1beta1.NamespaceScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + ns := "not-the-default" + testSimpleCRUD(t, ns, noxuDefinition, dynamicClient) +} + +func TestVersionedClusterScopedCRD(t *testing.T) { + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + noxuDefinition := fixtures.NewMultipleVersionNoxuCRD(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + ns := "" + testSimpleCRUD(t, ns, noxuDefinition, dynamicClient) +} + +func TestStoragedVersionInNamespacedCRDStatus(t *testing.T) { + noxuDefinition := fixtures.NewMultipleVersionNoxuCRD(apiextensionsv1beta1.NamespaceScoped) + ns := "not-the-default" + testStoragedVersionInCRDStatus(t, ns, noxuDefinition) +} + +func TestStoragedVersionInClusterScopedCRDStatus(t *testing.T) { + noxuDefinition := fixtures.NewMultipleVersionNoxuCRD(apiextensionsv1beta1.ClusterScoped) + ns := "" + testStoragedVersionInCRDStatus(t, ns, noxuDefinition) +} + +func testStoragedVersionInCRDStatus(t *testing.T, ns string, noxuDefinition *apiextensionsv1beta1.CustomResourceDefinition) { + versionsV1Beta1Storage := []apiextensionsv1beta1.CustomResourceDefinitionVersion{ + { + Name: "v1beta1", + Served: true, + Storage: true, + }, + { + Name: "v1beta2", + Served: true, + Storage: false, + }, + } + versionsV1Beta2Storage := []apiextensionsv1beta1.CustomResourceDefinitionVersion{ + { + Name: "v1beta1", + Served: true, + Storage: false, + }, + { + Name: "v1beta2", + Served: true, + Storage: true, + }, + } + tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + noxuDefinition.Spec.Versions = versionsV1Beta1Storage + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + // The storage version list should be initilized to storage version + crd, err := apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(noxuDefinition.Name, metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + if e, a := []string{"v1beta1"}, crd.Status.StoredVersions; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } + + // Changing CRD storage version should be reflected immediately + crd.Spec.Versions = versionsV1Beta2Storage + _, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Update(crd) + if err != nil { + t.Fatal(err) + } + crd, err = apiExtensionClient.ApiextensionsV1beta1().CustomResourceDefinitions().Get(noxuDefinition.Name, metav1.GetOptions{}) + if err != nil { + t.Fatal(err) + } + if e, a := []string{"v1beta1", "v1beta2"}, crd.Status.StoredVersions; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } + + err = fixtures.DeleteCustomResourceDefinition(crd, apiExtensionClient) + if err != nil { + t.Fatal(err) + } +} diff --git a/deps/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go b/deps/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go index b64101238..45e5176b0 100644 --- a/deps/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go +++ b/deps/k8s.io/apiextensions-apiserver/test/integration/yaml_test.go @@ -24,27 +24,34 @@ import ( "github.com/ghodss/yaml" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apiextensions-apiserver/test/integration/testserver" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/dynamic" + + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + "k8s.io/apiextensions-apiserver/test/integration/fixtures" ) func TestYAML(t *testing.T) { - config, err := testserver.DefaultServerConfig() + tearDown, config, _, err := fixtures.StartDefaultServer(t) if err != nil { t.Fatal(err) } + defer tearDown() - stopCh, apiExtensionClient, clientPool, err := testserver.StartServer(config) + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + dynamicClient, err := dynamic.NewForConfig(config) if err != nil { t.Fatal(err) } - defer close(stopCh) - noxuDefinition := testserver.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) - _, err = testserver.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, clientPool) + noxuDefinition := fixtures.NewNoxuCustomResourceDefinition(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) if err != nil { t.Fatal(err) } @@ -232,7 +239,7 @@ values: Param("watch", "true"). DoRaw() if !errors.IsNotAcceptable(err) { - t.Fatal("expected not acceptable error, got %v (%s)", err, string(result)) + t.Fatalf("expected not acceptable error, got %v (%s)", err, string(result)) } obj, err := decodeYAML(result) if err != nil { @@ -294,7 +301,7 @@ values: t.Fatal(v, ok, err, string(result)) } if obj.GetUID() != uid { - t.Fatal("uid changed: %v vs %v", uid, obj.GetUID()) + t.Fatalf("uid changed: %v vs %v", uid, obj.GetUID()) } } @@ -302,7 +309,7 @@ values: { yamlBody := []byte(fmt.Sprintf(` values: - numVal: 3`, apiVersion, kind, uid, resourceVersion)) + numVal: 3`)) result, err := rest.Patch(types.MergePatchType). SetHeader("Accept", "application/yaml"). SetHeader("Content-Type", "application/yaml"). @@ -346,6 +353,179 @@ values: } } +func TestYAMLSubresource(t *testing.T) { + tearDown, config, _, err := fixtures.StartDefaultServer(t) + if err != nil { + t.Fatal(err) + } + defer tearDown() + + apiExtensionClient, err := clientset.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + t.Fatal(err) + } + + noxuDefinition := NewNoxuSubresourcesCRD(apiextensionsv1beta1.ClusterScoped) + noxuDefinition, err = fixtures.CreateNewCustomResourceDefinition(noxuDefinition, apiExtensionClient, dynamicClient) + if err != nil { + t.Fatal(err) + } + + kind := noxuDefinition.Spec.Names.Kind + apiVersion := noxuDefinition.Spec.Group + "/" + noxuDefinition.Spec.Version + + rest := apiExtensionClient.Discovery().RESTClient() + + uid := types.UID("") + resourceVersion := "" + + // Create + { + yamlBody := []byte(fmt.Sprintf(` +apiVersion: %s +kind: %s +metadata: + name: mytest +spec: + replicas: 3`, apiVersion, kind)) + + result, err := rest.Post(). + SetHeader("Accept", "application/yaml"). + SetHeader("Content-Type", "application/yaml"). + AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural). + Body(yamlBody). + DoRaw() + if err != nil { + t.Fatal(err, string(result)) + } + obj, err := decodeYAML(result) + if err != nil { + t.Fatal(err) + } + if obj.GetName() != "mytest" { + t.Fatalf("expected mytest, got %s", obj.GetName()) + } + if obj.GetAPIVersion() != apiVersion { + t.Fatalf("expected %s, got %s", apiVersion, obj.GetAPIVersion()) + } + if obj.GetKind() != kind { + t.Fatalf("expected %s, got %s", kind, obj.GetKind()) + } + if v, ok, err := unstructured.NestedFloat64(obj.Object, "spec", "replicas"); v != 3 || !ok || err != nil { + t.Fatal(v, ok, err, string(result)) + } + uid = obj.GetUID() + resourceVersion = obj.GetResourceVersion() + } + + // Get at /status + { + result, err := rest.Get(). + SetHeader("Accept", "application/yaml"). + AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural, "mytest", "status"). + DoRaw() + if err != nil { + t.Fatal(err) + } + obj, err := decodeYAML(result) + if err != nil { + t.Fatal(err, string(result)) + } + if obj.GetName() != "mytest" { + t.Fatalf("expected mytest, got %s", obj.GetName()) + } + if obj.GetAPIVersion() != apiVersion { + t.Fatalf("expected %s, got %s", apiVersion, obj.GetAPIVersion()) + } + if obj.GetKind() != kind { + t.Fatalf("expected %s, got %s", kind, obj.GetKind()) + } + if v, ok, err := unstructured.NestedFloat64(obj.Object, "spec", "replicas"); v != 3 || !ok || err != nil { + t.Fatal(v, ok, err, string(result)) + } + } + + // Update at /status + { + yamlBody := []byte(fmt.Sprintf(` +apiVersion: %s +kind: %s +metadata: + name: mytest + uid: %s + resourceVersion: "%s" +spec: + replicas: 5 +status: + replicas: 3`, apiVersion, kind, uid, resourceVersion)) + result, err := rest.Put(). + SetHeader("Accept", "application/yaml"). + SetHeader("Content-Type", "application/yaml"). + AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural, "mytest", "status"). + Body(yamlBody). + DoRaw() + if err != nil { + t.Fatal(err, string(result)) + } + obj, err := decodeYAML(result) + if err != nil { + t.Fatal(err) + } + if obj.GetName() != "mytest" { + t.Fatalf("expected mytest, got %s", obj.GetName()) + } + if obj.GetAPIVersion() != apiVersion { + t.Fatalf("expected %s, got %s", apiVersion, obj.GetAPIVersion()) + } + if obj.GetKind() != kind { + t.Fatalf("expected %s, got %s", kind, obj.GetKind()) + } + if v, ok, err := unstructured.NestedFloat64(obj.Object, "spec", "replicas"); v != 3 || !ok || err != nil { + t.Fatal(v, ok, err, string(result)) + } + if v, ok, err := unstructured.NestedFloat64(obj.Object, "status", "replicas"); v != 3 || !ok || err != nil { + t.Fatal(v, ok, err, string(result)) + } + if obj.GetUID() != uid { + t.Fatalf("uid changed: %v vs %v", uid, obj.GetUID()) + } + } + + // Get at /scale + { + result, err := rest.Get(). + SetHeader("Accept", "application/yaml"). + AbsPath("/apis", noxuDefinition.Spec.Group, noxuDefinition.Spec.Version, noxuDefinition.Spec.Names.Plural, "mytest", "scale"). + DoRaw() + if err != nil { + t.Fatal(err) + } + obj, err := decodeYAML(result) + if err != nil { + t.Fatal(err, string(result)) + } + if obj.GetName() != "mytest" { + t.Fatalf("expected mytest, got %s", obj.GetName()) + } + if obj.GetAPIVersion() != "autoscaling/v1" { + t.Fatalf("expected %s, got %s", apiVersion, obj.GetAPIVersion()) + } + if obj.GetKind() != "Scale" { + t.Fatalf("expected %s, got %s", kind, obj.GetKind()) + } + if v, ok, err := unstructured.NestedFloat64(obj.Object, "spec", "replicas"); v != 3 || !ok || err != nil { + t.Fatal(v, ok, err, string(result)) + } + if v, ok, err := unstructured.NestedFloat64(obj.Object, "status", "replicas"); v != 3 || !ok || err != nil { + t.Fatal(v, ok, err, string(result)) + } + } +} + func decodeYAML(data []byte) (*unstructured.Unstructured, error) { retval := &unstructured.Unstructured{Object: map[string]interface{}{}} // ensure this isn't JSON diff --git a/deps/k8s.io/apimachinery/Godeps/Godeps.json b/deps/k8s.io/apimachinery/Godeps/Godeps.json index 5ba1aa546..3a2a7473f 100644 --- a/deps/k8s.io/apimachinery/Godeps/Godeps.json +++ b/deps/k8s.io/apimachinery/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/apimachinery", - "GoVersion": "go1.9", - "GodepVersion": "v79", + "GoVersion": "go1.10", + "GodepVersion": "v80", "Packages": [ "./..." ], @@ -24,7 +24,7 @@ }, { "ImportPath": "github.com/evanphx/json-patch", - "Rev": "944e07253867aacae43c04b2e6a239005443f33a" + "Rev": "94e38aa1586e8a6c8a75770bddf5ff84c48a106b" }, { "ImportPath": "github.com/ghodss/yaml", @@ -48,23 +48,23 @@ }, { "ImportPath": "github.com/golang/protobuf/proto", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/any", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/duration", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/timestamp", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/google/gofuzz", @@ -92,7 +92,15 @@ }, { "ImportPath": "github.com/json-iterator/go", - "Rev": "13f86432b882000a51c6e610c620974462691a97" + "Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682" + }, + { + "ImportPath": "github.com/modern-go/concurrent", + "Rev": "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" + }, + { + "ImportPath": "github.com/modern-go/reflect2", + "Rev": "05fbef0ca5da472bbf96c9322b84a53edc03c9fd" }, { "ImportPath": "github.com/mxk/go-flowrate/flowrate", @@ -108,15 +116,15 @@ }, { "ImportPath": "github.com/spf13/pflag", - "Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea" + "Rev": "583c0c0531f06d5278b7d917446061adc344b5cd" }, { "ImportPath": "github.com/stretchr/testify/assert", - "Rev": "f6abca593680b2315d2075e0f5e2a9751e3f431a" + "Rev": "c679ae2cc0cb27ec3293fea7e254e47386f05d69" }, { "ImportPath": "github.com/stretchr/testify/require", - "Rev": "f6abca593680b2315d2075e0f5e2a9751e3f431a" + "Rev": "c679ae2cc0cb27ec3293fea7e254e47386f05d69" }, { "ImportPath": "golang.org/x/net/html", @@ -172,7 +180,7 @@ }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" } ] } diff --git a/deps/k8s.io/apimachinery/Godeps/OWNERS b/deps/k8s.io/apimachinery/Godeps/OWNERS new file mode 100644 index 000000000..3d49f3060 --- /dev/null +++ b/deps/k8s.io/apimachinery/Godeps/OWNERS @@ -0,0 +1,2 @@ +approvers: +- dep-approvers diff --git a/deps/k8s.io/apimachinery/OWNERS b/deps/k8s.io/apimachinery/OWNERS index 7069eeb0b..3449af976 100644 --- a/deps/k8s.io/apimachinery/OWNERS +++ b/deps/k8s.io/apimachinery/OWNERS @@ -19,3 +19,5 @@ reviewers: - sttts - ncdc - tallclair +labels: +- sig/api-machinery diff --git a/deps/k8s.io/apimachinery/SECURITY_CONTACTS b/deps/k8s.io/apimachinery/SECURITY_CONTACTS new file mode 100644 index 000000000..0648a8ebf --- /dev/null +++ b/deps/k8s.io/apimachinery/SECURITY_CONTACTS @@ -0,0 +1,17 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +cjcullen +jessfraz +liggitt +philips +tallclair diff --git a/deps/k8s.io/apimachinery/pkg/api/apitesting/codec.go b/deps/k8s.io/apimachinery/pkg/api/apitesting/codec.go new file mode 100644 index 000000000..542b0aa27 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/api/apitesting/codec.go @@ -0,0 +1,116 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package apitesting + +import ( + "fmt" + "mime" + "os" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" +) + +var ( + testCodecMediaType string + testStorageCodecMediaType string +) + +// TestCodec returns the codec for the API version to test against, as set by the +// KUBE_TEST_API_TYPE env var. +func TestCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec { + if len(testCodecMediaType) != 0 { + serializerInfo, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), testCodecMediaType) + if !ok { + panic(fmt.Sprintf("no serializer for %s", testCodecMediaType)) + } + return codecs.CodecForVersions(serializerInfo.Serializer, codecs.UniversalDeserializer(), schema.GroupVersions(gvs), nil) + } + return codecs.LegacyCodec(gvs...) +} + +// TestStorageCodec returns the codec for the API version to test against used in storage, as set by the +// KUBE_TEST_API_STORAGE_TYPE env var. +func TestStorageCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec { + if len(testStorageCodecMediaType) != 0 { + serializerInfo, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), testStorageCodecMediaType) + if !ok { + panic(fmt.Sprintf("no serializer for %s", testStorageCodecMediaType)) + } + + // etcd2 only supports string data - we must wrap any result before returning + // TODO: remove for etcd3 / make parameterizable + serializer := serializerInfo.Serializer + if !serializerInfo.EncodesAsText { + serializer = runtime.NewBase64Serializer(serializer, serializer) + } + + decoder := recognizer.NewDecoder(serializer, codecs.UniversalDeserializer()) + return codecs.CodecForVersions(serializer, decoder, schema.GroupVersions(gvs), nil) + + } + return codecs.LegacyCodec(gvs...) +} + +func init() { + var err error + if apiMediaType := os.Getenv("KUBE_TEST_API_TYPE"); len(apiMediaType) > 0 { + testCodecMediaType, _, err = mime.ParseMediaType(apiMediaType) + if err != nil { + panic(err) + } + } + + if storageMediaType := os.Getenv("KUBE_TEST_API_STORAGE_TYPE"); len(storageMediaType) > 0 { + testStorageCodecMediaType, _, err = mime.ParseMediaType(storageMediaType) + if err != nil { + panic(err) + } + } +} + +// InstallOrDieFunc mirrors install functions that require success +type InstallOrDieFunc func(scheme *runtime.Scheme) + +// SchemeForInstallOrDie builds a simple test scheme and codecfactory pair for easy unit testing from higher level install methods +func SchemeForInstallOrDie(installFns ...InstallOrDieFunc) (*runtime.Scheme, runtimeserializer.CodecFactory) { + scheme := runtime.NewScheme() + codecFactory := runtimeserializer.NewCodecFactory(scheme) + for _, installFn := range installFns { + installFn(scheme) + } + + return scheme, codecFactory +} + +// InstallFunc mirrors install functions that can return an error +type InstallFunc func(scheme *runtime.Scheme) error + +// SchemeForOrDie builds a simple test scheme and codecfactory pair for easy unit testing from the bare registration methods. +func SchemeForOrDie(installFns ...InstallFunc) (*runtime.Scheme, runtimeserializer.CodecFactory) { + scheme := runtime.NewScheme() + codecFactory := runtimeserializer.NewCodecFactory(scheme) + for _, installFn := range installFns { + if err := installFn(scheme); err != nil { + panic(err) + } + } + + return scheme, codecFactory +} diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/fuzzer.go b/deps/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/fuzzer.go similarity index 100% rename from deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/fuzzer.go rename to deps/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/fuzzer.go diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/valuefuzz.go b/deps/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz.go similarity index 100% rename from deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/valuefuzz.go rename to deps/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz.go diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/valuefuzz_test.go b/deps/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz_test.go similarity index 100% rename from deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/valuefuzz_test.go rename to deps/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz_test.go diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/roundtrip/roundtrip.go b/deps/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go similarity index 92% rename from deps/k8s.io/apimachinery/pkg/api/testing/roundtrip/roundtrip.go rename to deps/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go index 0c032b815..809160d71 100644 --- a/deps/k8s.io/apimachinery/pkg/api/testing/roundtrip/roundtrip.go +++ b/deps/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/roundtrip.go @@ -29,12 +29,10 @@ import ( "github.com/google/gofuzz" flag "github.com/spf13/pflag" + apitesting "k8s.io/apimachinery/pkg/api/apitesting" + "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" apiequality "k8s.io/apimachinery/pkg/api/equality" apimeta "k8s.io/apimachinery/pkg/api/meta" - apitesting "k8s.io/apimachinery/pkg/api/testing" - "k8s.io/apimachinery/pkg/api/testing/fuzzer" - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" metafuzzer "k8s.io/apimachinery/pkg/apis/meta/fuzzer" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -45,15 +43,13 @@ import ( "k8s.io/apimachinery/pkg/util/sets" ) -type InstallFunc func(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) +type InstallFunc func(scheme *runtime.Scheme) // RoundTripTestForAPIGroup is convenient to call from your install package to make sure that a "bare" install of your group provides // enough information to round trip func RoundTripTestForAPIGroup(t *testing.T, installFn InstallFunc, fuzzingFuncs fuzzer.FuzzerFuncs) { - groupFactoryRegistry := make(announced.APIGroupFactoryRegistry) - registry := registered.NewOrDie("") scheme := runtime.NewScheme() - installFn(groupFactoryRegistry, registry, scheme) + installFn(scheme) RoundTripTestForScheme(t, scheme, fuzzingFuncs) } @@ -72,10 +68,8 @@ func RoundTripTestForScheme(t *testing.T, scheme *runtime.Scheme, fuzzingFuncs f // RoundTripProtobufTestForAPIGroup is convenient to call from your install package to make sure that a "bare" install of your group provides // enough information to round trip func RoundTripProtobufTestForAPIGroup(t *testing.T, installFn InstallFunc, fuzzingFuncs fuzzer.FuzzerFuncs) { - groupFactoryRegistry := make(announced.APIGroupFactoryRegistry) - registry := registered.NewOrDie("") scheme := runtime.NewScheme() - installFn(groupFactoryRegistry, registry, scheme) + installFn(scheme) RoundTripProtobufTestForScheme(t, scheme, fuzzingFuncs) } @@ -138,6 +132,24 @@ func roundTripTypes(t *testing.T, scheme *runtime.Scheme, codecFactory runtimese } } +// RoundTripExternalTypes applies the round-trip test to all external round-trippable Kinds +// in the scheme. It will skip all the GroupVersionKinds in the nonRoundTripExternalTypes list . +func RoundTripExternalTypes(t *testing.T, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool) { + kinds := scheme.AllKnownTypes() + for gvk := range kinds { + if gvk.Version == runtime.APIVersionInternal || globalNonRoundTrippableTypes.Has(gvk.Kind) { + continue + } + + // FIXME: this is explicitly testing w/o protobuf which was failing if enabled + // the reason for that is that protobuf is not setting Kind and APIVersion fields + // during obj2 decode, the same then applies to DecodeInto obj3. My guess is we + // should be setting these two fields accordingly when protobuf is passed as codec + // to roundTrip method. + roundTripSpecificKind(t, gvk, scheme, codecFactory, fuzzer, nonRoundTrippableTypes, true) + } +} + func RoundTripSpecificKindWithoutProtobuf(t *testing.T, gvk schema.GroupVersionKind, scheme *runtime.Scheme, codecFactory runtimeserializer.CodecFactory, fuzzer *fuzz.Fuzzer, nonRoundTrippableTypes map[schema.GroupVersionKind]bool) { roundTripSpecificKind(t, gvk, scheme, codecFactory, fuzzer, nonRoundTrippableTypes, true) } diff --git a/deps/k8s.io/apimachinery/pkg/api/equality/BUILD b/deps/k8s.io/apimachinery/pkg/api/equality/BUILD deleted file mode 100644 index 75051f35b..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/equality/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["semantic.go"], - importpath = "k8s.io/apimachinery/pkg/api/equality", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/errors/BUILD b/deps/k8s.io/apimachinery/pkg/api/errors/BUILD deleted file mode 100644 index 384b432bd..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/errors/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["errors_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/api/errors", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - ], - importpath = "k8s.io/apimachinery/pkg/api/errors", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/BUILD b/deps/k8s.io/apimachinery/pkg/api/meta/BUILD deleted file mode 100644 index 29be07874..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/meta/BUILD +++ /dev/null @@ -1,70 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "meta_test.go", - "multirestmapper_test.go", - "priority_test.go", - "restmapper_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/api/meta", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - "firsthit_restmapper.go", - "help.go", - "interfaces.go", - "lazy.go", - "meta.go", - "multirestmapper.go", - "priority.go", - "restmapper.go", - "unstructured.go", - ], - importpath = "k8s.io/apimachinery/pkg/api/meta", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/interfaces.go b/deps/k8s.io/apimachinery/pkg/api/meta/interfaces.go index 5dc9d89e6..42eac3af0 100644 --- a/deps/k8s.io/apimachinery/pkg/api/meta/interfaces.go +++ b/deps/k8s.io/apimachinery/pkg/api/meta/interfaces.go @@ -23,12 +23,6 @@ import ( "k8s.io/apimachinery/pkg/types" ) -// VersionInterfaces contains the interfaces one should use for dealing with types of a particular version. -type VersionInterfaces struct { - runtime.ObjectConvertor - MetadataAccessor -} - type ListMetaAccessor interface { GetListMeta() List } @@ -92,28 +86,19 @@ const ( type RESTScope interface { // Name of the scope Name() RESTScopeName - // ParamName is the optional name of the parameter that should be inserted in the resource url - // If empty, no param will be inserted - ParamName() string - // ArgumentName is the optional name that should be used for the variable holding the value. - ArgumentName() string - // ParamDescription is the optional description to use to document the parameter in api documentation - ParamDescription() string } // RESTMapping contains the information needed to deal with objects of a specific // resource and kind in a RESTful manner. type RESTMapping struct { - // Resource is a string representing the name of this resource as a REST client would see it - Resource string + // Resource is the GroupVersionResource (location) for this endpoint + Resource schema.GroupVersionResource + // GroupVersionKind is the GroupVersionKind (data format) to submit to this endpoint GroupVersionKind schema.GroupVersionKind // Scope contains the information needed to deal with REST Resources that are in a resource hierarchy Scope RESTScope - - runtime.ObjectConvertor - MetadataAccessor } // RESTMapper allows clients to map resources to kind, and map kind and version diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/lazy.go b/deps/k8s.io/apimachinery/pkg/api/meta/lazy.go index 7f92f39a4..431a0a635 100644 --- a/deps/k8s.io/apimachinery/pkg/api/meta/lazy.go +++ b/deps/k8s.io/apimachinery/pkg/api/meta/lazy.go @@ -19,27 +19,25 @@ package meta import ( "sync" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // lazyObject defers loading the mapper and typer until necessary. type lazyObject struct { - loader func() (RESTMapper, runtime.ObjectTyper, error) + loader func() (RESTMapper, error) lock sync.Mutex loaded bool err error mapper RESTMapper - typer runtime.ObjectTyper } // NewLazyObjectLoader handles unrecoverable errors when creating a RESTMapper / ObjectTyper by // returning those initialization errors when the interface methods are invoked. This defers the // initialization and any server calls until a client actually needs to perform the action. -func NewLazyObjectLoader(fn func() (RESTMapper, runtime.ObjectTyper, error)) (RESTMapper, runtime.ObjectTyper) { +func NewLazyRESTMapperLoader(fn func() (RESTMapper, error)) RESTMapper { obj := &lazyObject{loader: fn} - return obj, obj + return obj } // init lazily loads the mapper and typer, returning an error if initialization has failed. @@ -49,13 +47,12 @@ func (o *lazyObject) init() error { if o.loaded { return o.err } - o.mapper, o.typer, o.err = o.loader() + o.mapper, o.err = o.loader() o.loaded = true return o.err } var _ RESTMapper = &lazyObject{} -var _ runtime.ObjectTyper = &lazyObject{} func (o *lazyObject) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { if err := o.init(); err != nil { @@ -105,17 +102,3 @@ func (o *lazyObject) ResourceSingularizer(resource string) (singular string, err } return o.mapper.ResourceSingularizer(resource) } - -func (o *lazyObject) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { - if err := o.init(); err != nil { - return nil, false, err - } - return o.typer.ObjectKinds(obj) -} - -func (o *lazyObject) Recognizes(gvk schema.GroupVersionKind) bool { - if err := o.init(); err != nil { - return false - } - return o.typer.Recognizes(gvk) -} diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/meta.go b/deps/k8s.io/apimachinery/pkg/api/meta/meta.go index b9670071c..1c2a83cfa 100644 --- a/deps/k8s.io/apimachinery/pkg/api/meta/meta.go +++ b/deps/k8s.io/apimachinery/pkg/api/meta/meta.go @@ -38,7 +38,6 @@ var errNotCommon = fmt.Errorf("object does not implement the common interface fo // CommonAccessor returns a Common interface for the provided object or an error if the object does // not provide List. -// TODO: return bool instead of error func CommonAccessor(obj interface{}) (metav1.Common, error) { switch t := obj.(type) { case List: @@ -71,7 +70,6 @@ func CommonAccessor(obj interface{}) (metav1.Common, error) { // not provide List. // IMPORTANT: Objects are NOT a superset of lists. Do not use this check to determine whether an // object *is* a List. -// TODO: return bool instead of error func ListAccessor(obj interface{}) (List, error) { switch t := obj.(type) { case List: @@ -101,7 +99,6 @@ var errNotObject = fmt.Errorf("object does not implement the Object interfaces") // obj must be a pointer to an API type. An error is returned if the minimum // required fields are missing. Fields that are not required return the default // value and are a no-op if set. -// TODO: return bool instead of error func Accessor(obj interface{}) (metav1.Object, error) { switch t := obj.(type) { case metav1.Object: diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/priority.go b/deps/k8s.io/apimachinery/pkg/api/meta/priority.go index df28e64ff..fa11c580f 100644 --- a/deps/k8s.io/apimachinery/pkg/api/meta/priority.go +++ b/deps/k8s.io/apimachinery/pkg/api/meta/priority.go @@ -54,12 +54,12 @@ func (m PriorityRESTMapper) String() string { // ResourceFor finds all resources, then passes them through the ResourcePriority patterns to find a single matching hit. func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionResource, error) { - originalGVRs, err := m.Delegate.ResourcesFor(partiallySpecifiedResource) - if err != nil { - return schema.GroupVersionResource{}, err + originalGVRs, originalErr := m.Delegate.ResourcesFor(partiallySpecifiedResource) + if originalErr != nil && len(originalGVRs) == 0 { + return schema.GroupVersionResource{}, originalErr } if len(originalGVRs) == 1 { - return originalGVRs[0], nil + return originalGVRs[0], originalErr } remainingGVRs := append([]schema.GroupVersionResource{}, originalGVRs...) @@ -77,7 +77,7 @@ func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupV continue case 1: // one match, return - return matchedGVRs[0], nil + return matchedGVRs[0], originalErr default: // more than one match, use the matched hits as the list moving to the next pattern. // this way you can have a series of selection criteria @@ -90,12 +90,12 @@ func (m PriorityRESTMapper) ResourceFor(partiallySpecifiedResource schema.GroupV // KindFor finds all kinds, then passes them through the KindPriority patterns to find a single matching hit. func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource schema.GroupVersionResource) (schema.GroupVersionKind, error) { - originalGVKs, err := m.Delegate.KindsFor(partiallySpecifiedResource) - if err != nil { - return schema.GroupVersionKind{}, err + originalGVKs, originalErr := m.Delegate.KindsFor(partiallySpecifiedResource) + if originalErr != nil && len(originalGVKs) == 0 { + return schema.GroupVersionKind{}, originalErr } if len(originalGVKs) == 1 { - return originalGVKs[0], nil + return originalGVKs[0], originalErr } remainingGVKs := append([]schema.GroupVersionKind{}, originalGVKs...) @@ -113,7 +113,7 @@ func (m PriorityRESTMapper) KindFor(partiallySpecifiedResource schema.GroupVersi continue case 1: // one match, return - return matchedGVKs[0], nil + return matchedGVKs[0], originalErr default: // more than one match, use the matched hits as the list moving to the next pattern. // this way you can have a series of selection criteria @@ -153,9 +153,9 @@ func kindMatches(pattern schema.GroupVersionKind, kind schema.GroupVersionKind) } func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) { - mappings, err := m.Delegate.RESTMappings(gk, versions...) - if err != nil { - return nil, err + mappings, originalErr := m.Delegate.RESTMappings(gk, versions...) + if originalErr != nil && len(mappings) == 0 { + return nil, originalErr } // any versions the user provides take priority @@ -187,7 +187,7 @@ func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) continue case 1: // one match, return - return matching[0], nil + return matching[0], originalErr default: // more than one match, use the matched hits as the list moving to the next pattern. // this way you can have a series of selection criteria @@ -195,7 +195,7 @@ func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) } } if len(remaining) == 1 { - return remaining[0], nil + return remaining[0], originalErr } var kinds []schema.GroupVersionKind diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/priority_test.go b/deps/k8s.io/apimachinery/pkg/api/meta/priority_test.go index 098d53bd5..fff1afd17 100644 --- a/deps/k8s.io/apimachinery/pkg/api/meta/priority_test.go +++ b/deps/k8s.io/apimachinery/pkg/api/meta/priority_test.go @@ -34,6 +34,30 @@ func TestPriorityRESTMapperResourceForErrorHandling(t *testing.T) { result schema.GroupVersionResource err string }{ + { + name: "error", + delegate: fixedRESTMapper{err: errors.New("delegateError")}, + err: "delegateError", + }, + { + name: "single hit + error", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "single-hit"}}, err: errors.New("delegateError")}, + result: schema.GroupVersionResource{Resource: "single-hit"}, + err: "delegateError", + }, + { + name: "group selection + error", + delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{ + {Group: "one", Version: "a", Resource: "first"}, + {Group: "two", Version: "b", Resource: "second"}, + }, err: errors.New("delegateError")}, + resourcePatterns: []schema.GroupVersionResource{ + {Group: "one", Version: AnyVersion, Resource: AnyResource}, + }, + result: schema.GroupVersionResource{Group: "one", Version: "a", Resource: "first"}, + err: "delegateError", + }, + { name: "single hit", delegate: fixedRESTMapper{resourcesFor: []schema.GroupVersionResource{{Resource: "single-hit"}}}, @@ -106,6 +130,10 @@ func TestPriorityRESTMapperResourceForErrorHandling(t *testing.T) { if len(tc.err) == 0 && actualErr == nil { continue } + if len(tc.err) == 0 && actualErr != nil { + t.Errorf("%s: unexpected err: %v", tc.name, actualErr) + continue + } if len(tc.err) > 0 && actualErr == nil { t.Errorf("%s: missing expected err: %v", tc.name, tc.err) continue @@ -125,6 +153,30 @@ func TestPriorityRESTMapperKindForErrorHandling(t *testing.T) { result schema.GroupVersionKind err string }{ + { + name: "error", + delegate: fixedRESTMapper{err: errors.New("delegateErr")}, + err: "delegateErr", + }, + { + name: "single hit + error", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "single-hit"}}, err: errors.New("delegateErr")}, + result: schema.GroupVersionKind{Kind: "single-hit"}, + err: "delegateErr", + }, + { + name: "group selection + error", + delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{ + {Group: "one", Version: "a", Kind: "first"}, + {Group: "two", Version: "b", Kind: "second"}, + }, err: errors.New("delegateErr")}, + kindPatterns: []schema.GroupVersionKind{ + {Group: "one", Version: AnyVersion, Kind: AnyKind}, + }, + result: schema.GroupVersionKind{Group: "one", Version: "a", Kind: "first"}, + err: "delegateErr", + }, + { name: "single hit", delegate: fixedRESTMapper{kindsFor: []schema.GroupVersionKind{{Kind: "single-hit"}}}, @@ -197,6 +249,10 @@ func TestPriorityRESTMapperKindForErrorHandling(t *testing.T) { if len(tc.err) == 0 && actualErr == nil { continue } + if len(tc.err) == 0 && actualErr != nil { + t.Errorf("%s: unexpected err: %v", tc.name, actualErr) + continue + } if len(tc.err) > 0 && actualErr == nil { t.Errorf("%s: missing expected err: %v", tc.name, tc.err) continue @@ -248,6 +304,13 @@ func TestPriorityRESTMapperRESTMapping(t *testing.T) { input: schema.GroupKind{Kind: "Foo"}, err: errors.New("fail on this"), }, + { + name: "result + error", + mapper: PriorityRESTMapper{Delegate: fixedRESTMapper{mappings: []*RESTMapping{mapping1}, err: errors.New("fail on this")}}, + input: schema.GroupKind{Kind: "Foo"}, + result: mapping1, + err: errors.New("fail on this"), + }, { name: "return error for ambiguous", mapper: PriorityRESTMapper{ diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/restmapper.go b/deps/k8s.io/apimachinery/pkg/api/meta/restmapper.go index ff945acd1..41b60d731 100644 --- a/deps/k8s.io/apimachinery/pkg/api/meta/restmapper.go +++ b/deps/k8s.io/apimachinery/pkg/api/meta/restmapper.go @@ -28,30 +28,15 @@ import ( // Implements RESTScope interface type restScope struct { - name RESTScopeName - paramName string - argumentName string - paramDescription string + name RESTScopeName } func (r *restScope) Name() RESTScopeName { return r.name } -func (r *restScope) ParamName() string { - return r.paramName -} -func (r *restScope) ArgumentName() string { - return r.argumentName -} -func (r *restScope) ParamDescription() string { - return r.paramDescription -} var RESTScopeNamespace = &restScope{ - name: RESTScopeNameNamespace, - paramName: "namespaces", - argumentName: "namespace", - paramDescription: "object name and auth scope, such as for teams and projects", + name: RESTScopeNameNamespace, } var RESTScopeRoot = &restScope{ @@ -77,8 +62,6 @@ type DefaultRESTMapper struct { kindToScope map[schema.GroupVersionKind]RESTScope singularToPlural map[schema.GroupVersionResource]schema.GroupVersionResource pluralToSingular map[schema.GroupVersionResource]schema.GroupVersionResource - - interfacesFunc VersionInterfacesFunc } func (m *DefaultRESTMapper) String() string { @@ -87,16 +70,12 @@ func (m *DefaultRESTMapper) String() string { var _ RESTMapper = &DefaultRESTMapper{} -// VersionInterfacesFunc returns the appropriate typer, and metadata accessor for a -// given api version, or an error if no such api version exists. -type VersionInterfacesFunc func(version schema.GroupVersion) (*VersionInterfaces, error) - // NewDefaultRESTMapper initializes a mapping between Kind and APIVersion // to a resource name and back based on the objects in a runtime.Scheme // and the Kubernetes API conventions. Takes a group name, a priority list of the versions // to search when an object has no default version (set empty to return an error), // and a function that retrieves the correct metadata for a given version. -func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, f VersionInterfacesFunc) *DefaultRESTMapper { +func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion) *DefaultRESTMapper { resourceToKind := make(map[schema.GroupVersionResource]schema.GroupVersionKind) kindToPluralResource := make(map[schema.GroupVersionKind]schema.GroupVersionResource) kindToScope := make(map[schema.GroupVersionKind]RESTScope) @@ -111,7 +90,6 @@ func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion, f VersionI defaultGroupVersions: defaultGroupVersions, singularToPlural: singularToPlural, pluralToSingular: pluralToSingular, - interfacesFunc: f, } } @@ -526,18 +504,10 @@ func (m *DefaultRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string return nil, fmt.Errorf("the provided version %q and kind %q cannot be mapped to a supported scope", gvk.GroupVersion(), gvk.Kind) } - interfaces, err := m.interfacesFunc(gvk.GroupVersion()) - if err != nil { - return nil, fmt.Errorf("the provided version %q has no relevant versions: %v", gvk.GroupVersion().String(), err) - } - mappings = append(mappings, &RESTMapping{ - Resource: res.Resource, + Resource: res, GroupVersionKind: gvk, Scope: scope, - - ObjectConvertor: interfaces.ObjectConvertor, - MetadataAccessor: interfaces.MetadataAccessor, }) } diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go b/deps/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go index 1b1c70d65..853404ad6 100644 --- a/deps/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go +++ b/deps/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go @@ -17,42 +17,13 @@ limitations under the License. package meta import ( - "errors" "reflect" "strings" "testing" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -type fakeConvertor struct{} - -func (fakeConvertor) Convert(in, out, context interface{}) error { - return nil -} - -func (fakeConvertor) ConvertToVersion(in runtime.Object, _ runtime.GroupVersioner) (runtime.Object, error) { - return in, nil -} - -func (fakeConvertor) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - return label, value, nil -} - -var validAccessor = resourceAccessor{} -var validConvertor = fakeConvertor{} - -func fakeInterfaces(version schema.GroupVersion) (*VersionInterfaces, error) { - return &VersionInterfaces{ObjectConvertor: validConvertor, MetadataAccessor: validAccessor}, nil -} - -var unmatchedErr = errors.New("no version") - -func unmatchedVersionInterfaces(version schema.GroupVersion) (*VersionInterfaces, error) { - return nil, unmatchedErr -} - func TestRESTMapperVersionAndKindForResource(t *testing.T) { testGroup := "test.group" testVersion := "test" @@ -71,7 +42,7 @@ func TestRESTMapperVersionAndKindForResource(t *testing.T) { {Resource: schema.GroupVersionResource{Resource: "internalobjects"}, ExpectedGVK: testGroupVersion.WithKind("InternalObject")}, } for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}, fakeInterfaces) + mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}) if len(testCase.ExpectedGVK.Kind) != 0 { mapper.Add(testCase.ExpectedGVK, RESTScopeNamespace) } @@ -104,7 +75,7 @@ func TestRESTMapperGroupForResource(t *testing.T) { {Resource: schema.GroupVersionResource{Resource: "myobje"}, Err: true, GroupVersionKind: schema.GroupVersionKind{Group: "testapi", Version: "test", Kind: "MyObject"}}, } for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testCase.GroupVersionKind.GroupVersion()}, fakeInterfaces) + mapper := NewDefaultRESTMapper([]schema.GroupVersion{testCase.GroupVersionKind.GroupVersion()}) mapper.Add(testCase.GroupVersionKind, RESTScopeNamespace) actualGVK, err := mapper.KindFor(testCase.Resource) @@ -249,7 +220,7 @@ func TestRESTMapperKindsFor(t *testing.T) { } for _, testCase := range testCases { tcName := testCase.Name - mapper := NewDefaultRESTMapper(testCase.PreferredOrder, fakeInterfaces) + mapper := NewDefaultRESTMapper(testCase.PreferredOrder) for _, kind := range testCase.KindsToRegister { mapper.Add(kind, RESTScopeNamespace) } @@ -426,7 +397,7 @@ func TestRESTMapperResourcesFor(t *testing.T) { tcName := testCase.Name for _, partialResource := range []schema.GroupVersionResource{testCase.PluralPartialResourceToRequest, testCase.SingularPartialResourceToRequest} { - mapper := NewDefaultRESTMapper(testCase.PreferredOrder, fakeInterfaces) + mapper := NewDefaultRESTMapper(testCase.PreferredOrder) for _, kind := range testCase.KindsToRegister { mapper.Add(kind, RESTScopeNamespace) } @@ -511,7 +482,7 @@ func TestRESTMapperResourceSingularizer(t *testing.T) { {Kind: "lowercases", Plural: "lowercaseses", Singular: "lowercases"}, } for i, testCase := range testCases { - mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}, fakeInterfaces) + mapper := NewDefaultRESTMapper([]schema.GroupVersion{testGroupVersion}) // create singular/plural mapping mapper.Add(testGroupVersion.WithKind(testCase.Kind), RESTScopeNamespace) @@ -535,7 +506,7 @@ func TestRESTMapperRESTMapping(t *testing.T) { APIGroupVersions []schema.GroupVersion DefaultVersions []schema.GroupVersion - Resource string + Resource schema.GroupVersionResource ExpectedGroupVersion *schema.GroupVersion Err bool }{ @@ -544,19 +515,19 @@ func TestRESTMapperRESTMapping(t *testing.T) { {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "Unknown", Err: true}, - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: testGroupVersion.WithResource("internalobjects")}, + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: testGroupVersion.WithResource("internalobjects")}, - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: testGroupVersion.WithResource("internalobjects")}, - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{}, Resource: "internalobjects", ExpectedGroupVersion: &schema.GroupVersion{Group: testGroup, Version: "test"}}, + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{}, Resource: internalGroupVersion.WithResource("internalobjects"), ExpectedGroupVersion: &schema.GroupVersion{Group: testGroup, Version: "test"}}, - {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: "internalobjects"}, + {DefaultVersions: []schema.GroupVersion{testGroupVersion}, Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "test"}}, Resource: testGroupVersion.WithResource("internalobjects")}, // TODO: add test for a resource that exists in one version but not another } for i, testCase := range testCases { - mapper := NewDefaultRESTMapper(testCase.DefaultVersions, fakeInterfaces) + mapper := NewDefaultRESTMapper(testCase.DefaultVersions) mapper.Add(internalGroupVersion.WithKind("InternalObject"), RESTScopeNamespace) preferredVersions := []string{} @@ -577,10 +548,6 @@ func TestRESTMapperRESTMapping(t *testing.T) { t.Errorf("%d: unexpected resource: %#v", i, mapping) } - if mapping.MetadataAccessor == nil || mapping.ObjectConvertor == nil { - t.Errorf("%d: missing codec and accessor: %#v", i, mapping) - } - groupVersion := testCase.ExpectedGroupVersion if groupVersion == nil { groupVersion = &testCase.APIGroupVersions[0] @@ -599,7 +566,7 @@ func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} otherObjectGK := schema.GroupKind{Group: "tgroup", Kind: "OtherObject"} - mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}, fakeInterfaces) + mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}) mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) mapper.Add(expectedGroupVersion2.WithKind("OtherObject"), RESTScopeNamespace) @@ -608,7 +575,7 @@ func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - if mapping.Resource != "otherobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { + if mapping.Resource != expectedGroupVersion2.WithResource("otherobjects") || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { t.Errorf("unexpected mapping: %#v", mapping) } @@ -616,7 +583,7 @@ func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - if mapping.Resource != "internalobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion1 { + if mapping.Resource != expectedGroupVersion1.WithResource("internalobjects") || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion1 { t.Errorf("unexpected mapping: %#v", mapping) } @@ -646,7 +613,7 @@ func TestRESTMapperRESTMappingSelectsVersion(t *testing.T) { if err != nil { t.Fatalf("unexpected error: %v", err) } - if mapping.Resource != "otherobjects" || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { + if mapping.Resource != expectedGroupVersion2.WithResource("otherobjects") || mapping.GroupVersionKind.GroupVersion() != expectedGroupVersion2 { t.Errorf("unexpected mapping: %#v", mapping) } } @@ -678,7 +645,7 @@ func TestRESTMapperRESTMappings(t *testing.T) { Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v2"}}, AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, - ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, + ExpectedRESTMappings: []*RESTMapping{{Resource: schema.GroupVersionResource{Group: testGroup, Version: "v2", Resource: "internalobjects"}, GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, }, // ask for specific versions - only one available - check ExpectedRESTMappings @@ -687,20 +654,29 @@ func TestRESTMapperRESTMappings(t *testing.T) { Kind: "InternalObject", APIGroupVersions: []schema.GroupVersion{{Group: testGroup, Version: "v3"}, {Group: testGroup, Version: "v2"}}, AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, - ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, + ExpectedRESTMappings: []*RESTMapping{{Resource: schema.GroupVersionResource{Group: testGroup, Version: "v2", Resource: "internalobjects"}, GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, }, // do not ask for specific version - search through default versions - check ExpectedRESTMappings { - DefaultVersions: []schema.GroupVersion{testGroupVersion, {Group: testGroup, Version: "v2"}}, - Kind: "InternalObject", - AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v1"}.WithKind("InternalObject"), schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, - ExpectedRESTMappings: []*RESTMapping{{Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v1", Kind: "InternalObject"}}, {Resource: "internalobjects", GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}}}, + DefaultVersions: []schema.GroupVersion{testGroupVersion, {Group: testGroup, Version: "v2"}}, + Kind: "InternalObject", + AddGroupVersionKind: []schema.GroupVersionKind{schema.GroupVersion{Group: testGroup, Version: "v1"}.WithKind("InternalObject"), schema.GroupVersion{Group: testGroup, Version: "v2"}.WithKind("InternalObject")}, + ExpectedRESTMappings: []*RESTMapping{ + { + Resource: schema.GroupVersionResource{Group: testGroup, Version: "v1", Resource: "internalobjects"}, + GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v1", Kind: "InternalObject"}, + }, + { + Resource: schema.GroupVersionResource{Group: testGroup, Version: "v2", Resource: "internalobjects"}, + GroupVersionKind: schema.GroupVersionKind{Group: testGroup, Version: "v2", Kind: "InternalObject"}, + }, + }, }, } for i, testCase := range testCases { - mapper := NewDefaultRESTMapper(testCase.DefaultVersions, fakeInterfaces) + mapper := NewDefaultRESTMapper(testCase.DefaultVersions) for _, gvk := range testCase.AddGroupVersionKind { mapper.Add(gvk, RESTScopeNamespace) } @@ -727,9 +703,6 @@ func TestRESTMapperRESTMappings(t *testing.T) { if mapping.Resource != exp.Resource { t.Errorf("%d - %d: unexpected resource: %#v", i, j, mapping) } - if mapping.MetadataAccessor == nil || mapping.ObjectConvertor == nil { - t.Errorf("%d - %d: missing codec and accessor: %#v", i, j, mapping) - } if mapping.GroupVersionKind != exp.GroupVersionKind { t.Errorf("%d - %d: unexpected GroupVersionKind: %#v", i, j, mapping) } @@ -742,9 +715,9 @@ func TestRESTMapperReportsErrorOnBadVersion(t *testing.T) { expectedGroupVersion2 := schema.GroupVersion{Group: "tgroup", Version: "test2"} internalObjectGK := schema.GroupKind{Group: "tgroup", Kind: "InternalObject"} - mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}, unmatchedVersionInterfaces) + mapper := NewDefaultRESTMapper([]schema.GroupVersion{expectedGroupVersion1, expectedGroupVersion2}) mapper.Add(expectedGroupVersion1.WithKind("InternalObject"), RESTScopeNamespace) - _, err := mapper.RESTMapping(internalObjectGK, expectedGroupVersion1.Version) + _, err := mapper.RESTMapping(internalObjectGK, "test3") if err == nil { t.Errorf("unexpected non-error") } diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/table/table.go b/deps/k8s.io/apimachinery/pkg/api/meta/table/table.go new file mode 100644 index 000000000..2144a77cb --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/api/meta/table/table.go @@ -0,0 +1,71 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package table + +import ( + "time" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/duration" +) + +// MetaToTableRow converts a list or object into one or more table rows. The provided rowFn is invoked for +// each accessed item, with name and age being passed to each. +func MetaToTableRow(obj runtime.Object, rowFn func(obj runtime.Object, m metav1.Object, name, age string) ([]interface{}, error)) ([]metav1beta1.TableRow, error) { + if meta.IsListType(obj) { + rows := make([]metav1beta1.TableRow, 0, 16) + err := meta.EachListItem(obj, func(obj runtime.Object) error { + nestedRows, err := MetaToTableRow(obj, rowFn) + if err != nil { + return err + } + rows = append(rows, nestedRows...) + return nil + }) + if err != nil { + return nil, err + } + return rows, nil + } + + rows := make([]metav1beta1.TableRow, 0, 1) + m, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + row := metav1beta1.TableRow{ + Object: runtime.RawExtension{Object: obj}, + } + row.Cells, err = rowFn(obj, m, m.GetName(), ConvertToHumanReadableDateType(m.GetCreationTimestamp())) + if err != nil { + return nil, err + } + rows = append(rows, row) + return rows, nil +} + +// ConvertToHumanReadableDateType returns the elapsed time since timestamp in +// human-readable approximation. +func ConvertToHumanReadableDateType(timestamp metav1.Time) string { + if timestamp.IsZero() { + return "" + } + return duration.ShortHumanDuration(time.Now().Sub(timestamp.Time)) +} diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go b/deps/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go new file mode 100644 index 000000000..a08b42b82 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/api/meta/testrestmapper/test_restmapper.go @@ -0,0 +1,171 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testrestmapper + +import ( + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/sets" +) + +// TestOnlyStaticRESTMapper returns a union RESTMapper of all known types with priorities chosen in the following order: +// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy +// kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version, +// all other groups alphabetical. +// TODO callers of this method should be updated to build their own specific restmapper based on their scheme for their tests +// TODO the things being tested are related to whether various cases are handled, not tied to the particular types being checked. +func TestOnlyStaticRESTMapper(scheme *runtime.Scheme, versionPatterns ...schema.GroupVersion) meta.RESTMapper { + unionMapper := meta.MultiRESTMapper{} + unionedGroups := sets.NewString() + for _, enabledVersion := range scheme.PrioritizedVersionsAllGroups() { + if !unionedGroups.Has(enabledVersion.Group) { + unionedGroups.Insert(enabledVersion.Group) + unionMapper = append(unionMapper, newRESTMapper(enabledVersion.Group, scheme)) + } + } + + if len(versionPatterns) != 0 { + resourcePriority := []schema.GroupVersionResource{} + kindPriority := []schema.GroupVersionKind{} + for _, versionPriority := range versionPatterns { + resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource)) + kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind)) + } + + return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} + } + + prioritizedGroups := []string{"", "extensions", "metrics"} + resourcePriority, kindPriority := prioritiesForGroups(scheme, prioritizedGroups...) + + prioritizedGroupsSet := sets.NewString(prioritizedGroups...) + remainingGroups := sets.String{} + for _, enabledVersion := range scheme.PrioritizedVersionsAllGroups() { + if !prioritizedGroupsSet.Has(enabledVersion.Group) { + remainingGroups.Insert(enabledVersion.Group) + } + } + + remainingResourcePriority, remainingKindPriority := prioritiesForGroups(scheme, remainingGroups.List()...) + resourcePriority = append(resourcePriority, remainingResourcePriority...) + kindPriority = append(kindPriority, remainingKindPriority...) + + return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} +} + +// prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first, +// then any non-preferred version of the group second. +func prioritiesForGroups(scheme *runtime.Scheme, groups ...string) ([]schema.GroupVersionResource, []schema.GroupVersionKind) { + resourcePriority := []schema.GroupVersionResource{} + kindPriority := []schema.GroupVersionKind{} + + for _, group := range groups { + availableVersions := scheme.PrioritizedVersionsForGroup(group) + if len(availableVersions) > 0 { + resourcePriority = append(resourcePriority, availableVersions[0].WithResource(meta.AnyResource)) + kindPriority = append(kindPriority, availableVersions[0].WithKind(meta.AnyKind)) + } + } + for _, group := range groups { + resourcePriority = append(resourcePriority, schema.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource}) + kindPriority = append(kindPriority, schema.GroupVersionKind{Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind}) + } + + return resourcePriority, kindPriority +} + +func newRESTMapper(group string, scheme *runtime.Scheme) meta.RESTMapper { + mapper := meta.NewDefaultRESTMapper(scheme.PrioritizedVersionsForGroup(group)) + for _, gv := range scheme.PrioritizedVersionsForGroup(group) { + for kind := range scheme.KnownTypes(gv) { + if ignoredKinds.Has(kind) { + continue + } + scope := meta.RESTScopeNamespace + if rootScopedKinds[gv.WithKind(kind).GroupKind()] { + scope = meta.RESTScopeRoot + } + mapper.Add(gv.WithKind(kind), scope) + } + } + + return mapper +} + +// hardcoded is good enough for the test we're running +var rootScopedKinds = map[schema.GroupKind]bool{ + {Group: "admission.k8s.io", Kind: "AdmissionReview"}: true, + + {Group: "admissionregistration.k8s.io", Kind: "InitializerConfiguration"}: true, + {Group: "admissionregistration.k8s.io", Kind: "ValidatingWebhookConfiguration"}: true, + {Group: "admissionregistration.k8s.io", Kind: "MutatingWebhookConfiguration"}: true, + + {Group: "authentication.k8s.io", Kind: "TokenReview"}: true, + + {Group: "authorization.k8s.io", Kind: "SubjectAccessReview"}: true, + {Group: "authorization.k8s.io", Kind: "SelfSubjectAccessReview"}: true, + {Group: "authorization.k8s.io", Kind: "SelfSubjectRulesReview"}: true, + + {Group: "certificates.k8s.io", Kind: "CertificateSigningRequest"}: true, + + {Group: "", Kind: "Node"}: true, + {Group: "", Kind: "Namespace"}: true, + {Group: "", Kind: "PersistentVolume"}: true, + {Group: "", Kind: "ComponentStatus"}: true, + + {Group: "extensions", Kind: "PodSecurityPolicy"}: true, + + {Group: "policy", Kind: "PodSecurityPolicy"}: true, + + {Group: "extensions", Kind: "PodSecurityPolicy"}: true, + + {Group: "rbac.authorization.k8s.io", Kind: "ClusterRole"}: true, + {Group: "rbac.authorization.k8s.io", Kind: "ClusterRoleBinding"}: true, + + {Group: "scheduling.k8s.io", Kind: "PriorityClass"}: true, + + {Group: "storage.k8s.io", Kind: "StorageClass"}: true, + {Group: "storage.k8s.io", Kind: "VolumeAttachment"}: true, + + {Group: "apiextensions.k8s.io", Kind: "CustomResourceDefinition"}: true, + + {Group: "apiserver.k8s.io", Kind: "AdmissionConfiguration"}: true, + + {Group: "audit.k8s.io", Kind: "Event"}: true, + {Group: "audit.k8s.io", Kind: "Policy"}: true, + + {Group: "apiregistration.k8s.io", Kind: "APIService"}: true, + + {Group: "metrics.k8s.io", Kind: "NodeMetrics"}: true, + + {Group: "wardle.k8s.io", Kind: "Fischer"}: true, +} + +// hardcoded is good enough for the test we're running +var ignoredKinds = sets.NewString( + "ListOptions", + "DeleteOptions", + "Status", + "PodLogOptions", + "PodExecOptions", + "PodAttachOptions", + "PodPortForwardOptions", + "PodProxyOptions", + "NodeProxyOptions", + "ServiceProxyOptions", +) diff --git a/deps/k8s.io/apimachinery/pkg/api/meta/unstructured.go b/deps/k8s.io/apimachinery/pkg/api/meta/unstructured.go deleted file mode 100644 index 4e13efea3..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/meta/unstructured.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package meta - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// InterfacesForUnstructuredConversion returns VersionInterfaces suitable for -// dealing with unstructured.Unstructured objects and supports conversion -// from typed objects (provided by parent) to untyped objects. -func InterfacesForUnstructuredConversion(parent VersionInterfacesFunc) VersionInterfacesFunc { - return func(version schema.GroupVersion) (*VersionInterfaces, error) { - if i, err := parent(version); err == nil { - return &VersionInterfaces{ - ObjectConvertor: i.ObjectConvertor, - MetadataAccessor: NewAccessor(), - }, nil - } - return InterfacesForUnstructured(version) - } -} - -// InterfacesForUnstructured returns VersionInterfaces suitable for -// dealing with unstructured.Unstructured objects. It will return errors for -// other conversions. -func InterfacesForUnstructured(schema.GroupVersion) (*VersionInterfaces, error) { - return &VersionInterfaces{ - ObjectConvertor: &unstructured.UnstructuredObjectConverter{}, - MetadataAccessor: NewAccessor(), - }, nil -} diff --git a/deps/k8s.io/apimachinery/pkg/api/resource/BUILD b/deps/k8s.io/apimachinery/pkg/api/resource/BUILD deleted file mode 100644 index 2ae763853..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/resource/BUILD +++ /dev/null @@ -1,71 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "amount_test.go", - "math_test.go", - "quantity_proto_test.go", - "quantity_test.go", - "scale_int_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/api/resource", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/gopkg.in/inf.v0:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "amount.go", - "generated.pb.go", - "math.go", - "quantity.go", - "quantity_proto.go", - "scale_int.go", - "suffix.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/api/resource", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/gopkg.in/inf.v0:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = ["quantity_example_test.go"], - importpath = "k8s.io/apimachinery/pkg/api/resource_test", - deps = ["//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/resource/amount_test.go b/deps/k8s.io/apimachinery/pkg/api/resource/amount_test.go index dd070bad3..8217cb139 100644 --- a/deps/k8s.io/apimachinery/pkg/api/resource/amount_test.go +++ b/deps/k8s.io/apimachinery/pkg/api/resource/amount_test.go @@ -131,3 +131,32 @@ func TestAmountSign(t *testing.T) { } } } + +func TestInt64AmountAsScaledInt64(t *testing.T) { + for _, test := range []struct { + name string + i int64Amount + scaled Scale + result int64 + ok bool + }{ + {"test when i.scale < scaled ", int64Amount{value: 100, scale: 0}, 5, 1, true}, + {"test when i.scale = scaled", int64Amount{value: 100, scale: 1}, 1, 100, true}, + {"test when i.scale > scaled and result doesn't overflow", int64Amount{value: 100, scale: 5}, 2, 100000, true}, + {"test when i.scale > scaled and result overflows", int64Amount{value: 876, scale: 30}, 4, 0, false}, + {"test when i.scale < 0 and fraction exists", int64Amount{value: 93, scale: -1}, 0, 10, true}, + {"test when i.scale < 0 and fraction doesn't exist", int64Amount{value: 100, scale: -1}, 0, 10, true}, + {"test when i.value < 0 and fraction exists", int64Amount{value: -1932, scale: 2}, 4, -20, true}, + {"test when i.value < 0 and fraction doesn't exists", int64Amount{value: -1900, scale: 2}, 4, -19, true}, + } { + t.Run(test.name, func(t *testing.T) { + r, ok := test.i.AsScaledInt64(test.scaled) + if r != test.result { + t.Errorf("%v: expected result: %d, got result: %d", test.name, test.result, r) + } + if ok != test.ok { + t.Errorf("%v: expected ok: %t, got ok: %t", test.name, test.ok, ok) + } + }) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/api/resource/generated.pb.go b/deps/k8s.io/apimachinery/pkg/api/resource/generated.pb.go index 6de71e508..802f22a63 100644 --- a/deps/k8s.io/apimachinery/pkg/api/resource/generated.pb.go +++ b/deps/k8s.io/apimachinery/pkg/api/resource/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,13 +19,13 @@ limitations under the License. // DO NOT EDIT! /* - Package resource is a generated protocol buffer package. +Package resource is a generated protocol buffer package. - It is generated from these files: - k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto +It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto - It has these top-level messages: - Quantity +It has these top-level messages: + Quantity */ package resource @@ -57,21 +57,20 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 255 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x8f, 0xa1, 0x4e, 0x03, 0x41, - 0x10, 0x86, 0x77, 0x0d, 0x29, 0x95, 0x0d, 0x21, 0xa4, 0x62, 0xaf, 0x21, 0x08, 0x0c, 0x3b, 0x02, - 0xd3, 0x20, 0xf1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xb6, 0x4a, 0x2c, 0x92, 0x92, 0xeb, - 0xa4, 0xe4, 0x26, 0x29, 0xb9, 0x4d, 0x4a, 0x7e, 0x25, 0x25, 0x97, 0xdf, 0x4a, 0x3c, 0xf7, 0x8e, - 0xdf, 0xfc, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x5e, 0xda, 0xf9, 0x43, 0x01, 0x00, 0x00, + // 237 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8e, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x40, 0xcf, 0x0b, 0x2a, 0x19, 0x2b, 0x84, 0x10, 0xc3, 0xa5, 0x42, 0x0c, 0x2c, 0xd8, 0x6b, + 0xc5, 0xc8, 0xce, 0x00, 0x23, 0x5b, 0x92, 0x1e, 0xae, 0x15, 0xd5, 0x8e, 0x2e, 0x36, 0x52, 0xb7, + 0x8e, 0x8c, 0x1d, 0x19, 0x9b, 0xbf, 0xe9, 0xd8, 0xb1, 0x03, 0x03, 0x31, 0x3f, 0x82, 0xea, 0x36, + 0x52, 0xb7, 0x7b, 0xef, 0xf4, 0x4e, 0x97, 0xbd, 0xd4, 0xd3, 0x56, 0x1a, 0xa7, 0xea, 0x50, 0x12, + 0x5b, 0xf2, 0xd4, 0xaa, 0x4f, 0xb2, 0x33, 0xc7, 0xea, 0xb4, 0x28, 0x1a, 0xb3, 0x28, 0xaa, 0xb9, + 0xb1, 0xc4, 0x4b, 0xd5, 0xd4, 0xfa, 0x20, 0x14, 0x53, 0xeb, 0x02, 0x57, 0xa4, 0x34, 0x59, 0xe2, + 0xc2, 0xd3, 0x4c, 0x36, 0xec, 0xbc, 0x1b, 0xdf, 0x1f, 0x2b, 0x79, 0x5e, 0xc9, 0xa6, 0xd6, 0x07, + 0x21, 0x87, 0xea, 0xf6, 0x51, 0x1b, 0x3f, 0x0f, 0xa5, 0xac, 0xdc, 0x42, 0x69, 0xa7, 0x9d, 0x4a, + 0x71, 0x19, 0x3e, 0x12, 0x25, 0x48, 0xd3, 0xf1, 0xe8, 0xdd, 0x34, 0x1b, 0xbd, 0x86, 0xc2, 0x7a, + 0xe3, 0x97, 0xe3, 0xeb, 0xec, 0xa2, 0xf5, 0x6c, 0xac, 0xbe, 0x11, 0x13, 0xf1, 0x70, 0xf9, 0x76, + 0xa2, 0xa7, 0xab, 0xef, 0x4d, 0x0e, 0x5f, 0x5d, 0x0e, 0xeb, 0x2e, 0x87, 0x4d, 0x97, 0xc3, 0xea, + 0x67, 0x02, 0xcf, 0x72, 0xdb, 0x23, 0xec, 0x7a, 0x84, 0x7d, 0x8f, 0xb0, 0x8a, 0x28, 0xb6, 0x11, + 0xc5, 0x2e, 0xa2, 0xd8, 0x47, 0x14, 0xbf, 0x11, 0xc5, 0xfa, 0x0f, 0xe1, 0x7d, 0x34, 0x3c, 0xf6, + 0x1f, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x08, 0x88, 0x49, 0x0e, 0x01, 0x00, 0x00, } diff --git a/deps/k8s.io/apimachinery/pkg/api/resource/generated.proto b/deps/k8s.io/apimachinery/pkg/api/resource/generated.proto index 40185777e..2c615d51b 100644 --- a/deps/k8s.io/apimachinery/pkg/api/resource/generated.proto +++ b/deps/k8s.io/apimachinery/pkg/api/resource/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,6 @@ syntax = 'proto2'; package k8s.io.apimachinery.pkg.api.resource; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - // Package-wide variables from generator "generated". option go_package = "resource"; @@ -67,11 +65,6 @@ option go_package = "resource"; // 1.5 will be serialized as "1500m" // 1.5Gi will be serialized as "1536Mi" // -// NOTE: We reserve the right to amend this canonical format, perhaps to -// allow 1.5 to be canonical. -// TODO: Remove above disclaimer after all bikeshedding about format is over, -// or after March 2015. -// // Note that the quantity will NEVER be internally represented by a // floating point number. That is the whole point of this exercise. // diff --git a/deps/k8s.io/apimachinery/pkg/api/resource/quantity.go b/deps/k8s.io/apimachinery/pkg/api/resource/quantity.go index 6a8bb9972..b155a62a4 100644 --- a/deps/k8s.io/apimachinery/pkg/api/resource/quantity.go +++ b/deps/k8s.io/apimachinery/pkg/api/resource/quantity.go @@ -21,12 +21,9 @@ import ( "errors" "fmt" "math/big" - "regexp" "strconv" "strings" - flag "github.com/spf13/pflag" - inf "gopkg.in/inf.v0" ) @@ -71,11 +68,6 @@ import ( // 1.5 will be serialized as "1500m" // 1.5Gi will be serialized as "1536Mi" // -// NOTE: We reserve the right to amend this canonical format, perhaps to -// allow 1.5 to be canonical. -// TODO: Remove above disclaimer after all bikeshedding about format is over, -// or after March 2015. -// // Note that the quantity will NEVER be internally represented by a // floating point number. That is the whole point of this exercise. // @@ -144,9 +136,6 @@ const ( ) var ( - // splitRE is used to get the various parts of a number. - splitRE = regexp.MustCompile(splitREString) - // Errors that could happen while parsing a string. ErrFormatWrong = errors.New("quantities must match the regular expression '" + splitREString + "'") ErrNumeric = errors.New("unable to parse numeric part of quantity") @@ -508,7 +497,7 @@ func (q *Quantity) Sign() int { return q.i.Sign() } -// AsScaled returns the current value, rounded up to the provided scale, and returns +// AsScale returns the current value, rounded up to the provided scale, and returns // false if the scale resulted in a loss of precision. func (q *Quantity) AsScale(scale Scale) (CanonicalValue, bool) { if q.d.Dec != nil { @@ -747,43 +736,3 @@ func (q *Quantity) Copy() *Quantity { Format: q.Format, } } - -// qFlag is a helper type for the Flag function -type qFlag struct { - dest *Quantity -} - -// Sets the value of the internal Quantity. (used by flag & pflag) -func (qf qFlag) Set(val string) error { - q, err := ParseQuantity(val) - if err != nil { - return err - } - // This copy is OK because q will not be referenced again. - *qf.dest = q - return nil -} - -// Converts the value of the internal Quantity to a string. (used by flag & pflag) -func (qf qFlag) String() string { - return qf.dest.String() -} - -// States the type of flag this is (Quantity). (used by pflag) -func (qf qFlag) Type() string { - return "quantity" -} - -// QuantityFlag is a helper that makes a quantity flag (using standard flag package). -// Will panic if defaultValue is not a valid quantity. -func QuantityFlag(flagName, defaultValue, description string) *Quantity { - q := MustParse(defaultValue) - flag.Var(NewQuantityFlagValue(&q), flagName, description) - return &q -} - -// NewQuantityFlagValue returns an object that can be used to back a flag, -// pointing at the given Quantity variable. -func NewQuantityFlagValue(q *Quantity) flag.Value { - return qFlag{q} -} diff --git a/deps/k8s.io/apimachinery/pkg/api/resource/quantity_test.go b/deps/k8s.io/apimachinery/pkg/api/resource/quantity_test.go index 74f091a38..915b2444e 100644 --- a/deps/k8s.io/apimachinery/pkg/api/resource/quantity_test.go +++ b/deps/k8s.io/apimachinery/pkg/api/resource/quantity_test.go @@ -24,7 +24,6 @@ import ( "unicode" fuzz "github.com/google/gofuzz" - "github.com/spf13/pflag" inf "gopkg.in/inf.v0" ) @@ -1059,21 +1058,6 @@ func TestCopy(t *testing.T) { } } -func TestQFlagSet(t *testing.T) { - qf := qFlag{&Quantity{}} - qf.Set("1Ki") - if e, a := "1Ki", qf.String(); e != a { - t.Errorf("Unexpected result %v != %v", e, a) - } -} - -func TestQFlagIsPFlag(t *testing.T) { - var pfv pflag.Value = qFlag{} - if e, a := "quantity", pfv.Type(); e != a { - t.Errorf("Unexpected result %v != %v", e, a) - } -} - func TestSub(t *testing.T) { tests := []struct { a Quantity diff --git a/deps/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go index 186d9007e..ab4740790 100644 --- a/deps/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/api/resource/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package resource diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/BUILD b/deps/k8s.io/apimachinery/pkg/api/testing/BUILD deleted file mode 100644 index f4d21861a..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/testing/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["codec.go"], - importpath = "k8s.io/apimachinery/pkg/api/testing", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/api/testing/fuzzer:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/api/testing/roundtrip:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/codec.go b/deps/k8s.io/apimachinery/pkg/api/testing/codec.go deleted file mode 100644 index 8a13d1ff4..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/testing/codec.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - "fmt" - "mime" - "os" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" -) - -var ( - testCodecMediaType string - testStorageCodecMediaType string -) - -// TestCodec returns the codec for the API version to test against, as set by the -// KUBE_TEST_API_TYPE env var. -func TestCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec { - if len(testCodecMediaType) != 0 { - serializerInfo, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), testCodecMediaType) - if !ok { - panic(fmt.Sprintf("no serializer for %s", testCodecMediaType)) - } - return codecs.CodecForVersions(serializerInfo.Serializer, codecs.UniversalDeserializer(), schema.GroupVersions(gvs), nil) - } - return codecs.LegacyCodec(gvs...) -} - -// TestStorageCodec returns the codec for the API version to test against used in storage, as set by the -// KUBE_TEST_API_STORAGE_TYPE env var. -func TestStorageCodec(codecs runtimeserializer.CodecFactory, gvs ...schema.GroupVersion) runtime.Codec { - if len(testStorageCodecMediaType) != 0 { - serializerInfo, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), testStorageCodecMediaType) - if !ok { - panic(fmt.Sprintf("no serializer for %s", testStorageCodecMediaType)) - } - - // etcd2 only supports string data - we must wrap any result before returning - // TODO: remove for etcd3 / make parameterizable - serializer := serializerInfo.Serializer - if !serializerInfo.EncodesAsText { - serializer = runtime.NewBase64Serializer(serializer, serializer) - } - - decoder := recognizer.NewDecoder(serializer, codecs.UniversalDeserializer()) - return codecs.CodecForVersions(serializer, decoder, schema.GroupVersions(gvs), nil) - - } - return codecs.LegacyCodec(gvs...) -} - -func init() { - var err error - if apiMediaType := os.Getenv("KUBE_TEST_API_TYPE"); len(apiMediaType) > 0 { - testCodecMediaType, _, err = mime.ParseMediaType(apiMediaType) - if err != nil { - panic(err) - } - } - - if storageMediaType := os.Getenv("KUBE_TEST_API_STORAGE_TYPE"); len(storageMediaType) > 0 { - testStorageCodecMediaType, _, err = mime.ParseMediaType(storageMediaType) - if err != nil { - panic(err) - } - } -} diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/BUILD b/deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/BUILD deleted file mode 100644 index 00a56d250..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/testing/fuzzer/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["valuefuzz_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/api/testing/fuzzer", -) - -go_library( - name = "go_default_library", - srcs = [ - "fuzzer.go", - "valuefuzz.go", - ], - importpath = "k8s.io/apimachinery/pkg/api/testing/fuzzer", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/testing/roundtrip/BUILD b/deps/k8s.io/apimachinery/pkg/api/testing/roundtrip/BUILD deleted file mode 100644 index af01af51b..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/testing/roundtrip/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["roundtrip.go"], - importpath = "k8s.io/apimachinery/pkg/api/testing/roundtrip", - deps = [ - "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/github.com/golang/protobuf/proto:go_default_library", - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/validation/BUILD b/deps/k8s.io/apimachinery/pkg/api/validation/BUILD deleted file mode 100644 index 8f6cd93d4..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/validation/BUILD +++ /dev/null @@ -1,54 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["objectmeta_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/api/validation", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generic.go", - "objectmeta.go", - ], - importpath = "k8s.io/apimachinery/pkg/api/validation", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/api/validation/path:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta.go b/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta.go index 3c32a937a..44b9b1600 100644 --- a/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta.go +++ b/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta.go @@ -30,10 +30,6 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" ) -// TODO: delete this global variable when we enable the validation of common -// fields by default. -var RepairMalformedUpdates bool = true - const FieldImmutableErrorMsg string = `field is immutable` const totalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB @@ -254,39 +250,6 @@ func ValidateObjectMetaUpdate(newMeta, oldMeta *metav1.ObjectMeta, fldPath *fiel func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - if !RepairMalformedUpdates && newMeta.GetUID() != oldMeta.GetUID() { - allErrs = append(allErrs, field.Invalid(fldPath.Child("uid"), newMeta.GetUID(), "field is immutable")) - } - // in the event it is left empty, set it, to allow clients more flexibility - // TODO: remove the following code that repairs the update request when we retire the clients that modify the immutable fields. - // Please do not copy this pattern elsewhere; validation functions should not be modifying the objects they are passed! - if RepairMalformedUpdates { - if len(newMeta.GetUID()) == 0 { - newMeta.SetUID(oldMeta.GetUID()) - } - // ignore changes to timestamp - if oldCreationTime := oldMeta.GetCreationTimestamp(); oldCreationTime.IsZero() { - oldMeta.SetCreationTimestamp(newMeta.GetCreationTimestamp()) - } else { - newMeta.SetCreationTimestamp(oldMeta.GetCreationTimestamp()) - } - // an object can never remove a deletion timestamp or clear/change grace period seconds - if !oldMeta.GetDeletionTimestamp().IsZero() { - newMeta.SetDeletionTimestamp(oldMeta.GetDeletionTimestamp()) - } - if oldMeta.GetDeletionGracePeriodSeconds() != nil && newMeta.GetDeletionGracePeriodSeconds() == nil { - newMeta.SetDeletionGracePeriodSeconds(oldMeta.GetDeletionGracePeriodSeconds()) - } - } - - // TODO: needs to check if newMeta==nil && oldMeta !=nil after the repair logic is removed. - if newMeta.GetDeletionGracePeriodSeconds() != nil && (oldMeta.GetDeletionGracePeriodSeconds() == nil || *newMeta.GetDeletionGracePeriodSeconds() != *oldMeta.GetDeletionGracePeriodSeconds()) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionGracePeriodSeconds"), newMeta.GetDeletionGracePeriodSeconds(), "field is immutable; may only be changed via deletion")) - } - if newMeta.GetDeletionTimestamp() != nil && (oldMeta.GetDeletionTimestamp() == nil || !newMeta.GetDeletionTimestamp().Equal(oldMeta.GetDeletionTimestamp())) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("deletionTimestamp"), newMeta.GetDeletionTimestamp(), "field is immutable; may only be changed via deletion")) - } - // Finalizers cannot be added if the object is already being deleted. if oldMeta.GetDeletionTimestamp() != nil { allErrs = append(allErrs, ValidateNoNewFinalizers(newMeta.GetFinalizers(), oldMeta.GetFinalizers(), fldPath.Child("finalizers"))...) @@ -308,6 +271,8 @@ func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, fldPath *f allErrs = append(allErrs, ValidateImmutableField(newMeta.GetNamespace(), oldMeta.GetNamespace(), fldPath.Child("namespace"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetUID(), oldMeta.GetUID(), fldPath.Child("uid"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetCreationTimestamp(), oldMeta.GetCreationTimestamp(), fldPath.Child("creationTimestamp"))...) + allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionTimestamp(), oldMeta.GetDeletionTimestamp(), fldPath.Child("deletionTimestamp"))...) + allErrs = append(allErrs, ValidateImmutableField(newMeta.GetDeletionGracePeriodSeconds(), oldMeta.GetDeletionGracePeriodSeconds(), fldPath.Child("deletionGracePeriodSeconds"))...) allErrs = append(allErrs, ValidateImmutableField(newMeta.GetClusterName(), oldMeta.GetClusterName(), fldPath.Child("clusterName"))...) allErrs = append(allErrs, v1validation.ValidateLabels(newMeta.GetLabels(), fldPath.Child("labels"))...) diff --git a/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go b/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go index 9ec73b040..ebd6c7e7c 100644 --- a/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go +++ b/deps/k8s.io/apimachinery/pkg/api/validation/objectmeta_test.go @@ -219,21 +219,21 @@ func TestValidateObjectMetaUpdateIgnoresCreationTimestamp(t *testing.T) { &metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, field.NewPath("field"), - ); len(errs) != 0 { + ); len(errs) != 1 { t.Fatalf("unexpected errors: %v", errs) } if errs := ValidateObjectMetaUpdate( &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, &metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, field.NewPath("field"), - ); len(errs) != 0 { + ); len(errs) != 1 { t.Fatalf("unexpected errors: %v", errs) } if errs := ValidateObjectMetaUpdate( &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(10, 0))}, &metav1.ObjectMeta{Name: "test", ResourceVersion: "1", CreationTimestamp: metav1.NewTime(time.Unix(11, 0))}, field.NewPath("field"), - ); len(errs) != 0 { + ); len(errs) != 1 { t.Fatalf("unexpected errors: %v", errs) } } @@ -328,38 +328,38 @@ func TestValidateObjectMetaUpdatePreventsDeletionFieldMutation(t *testing.T) { Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, - ExpectedErrs: []string{"field.deletionTimestamp: Invalid value: 1970-01-01 00:16:40 +0000 UTC: field is immutable; may only be changed via deletion"}, + ExpectedErrs: []string{"field.deletionTimestamp: Invalid value: 1970-01-01 00:16:40 +0000 UTC: field is immutable"}, }, "invalid clear deletionTimestamp": { Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, - ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, - ExpectedErrs: []string{}, // no errors, validation copies the old value + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedErrs: []string{"field.deletionTimestamp: Invalid value: \"null\": field is immutable"}, }, "invalid change deletionTimestamp": { Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &later}, - ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &now}, - ExpectedErrs: []string{}, // no errors, validation copies the old value + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionTimestamp: &later}, + ExpectedErrs: []string{"field.deletionTimestamp: Invalid value: 1970-01-01 00:33:20 +0000 UTC: field is immutable"}, }, "invalid set deletionGracePeriodSeconds": { Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, - ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 30: field is immutable; may only be changed via deletion"}, + ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 30: field is immutable"}, }, "invalid clear deletionGracePeriodSeconds": { Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, - ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, - ExpectedErrs: []string{}, // no errors, validation copies the old value + ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1"}, + ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: \"null\": field is immutable"}, }, "invalid change deletionGracePeriodSeconds": { Old: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodShort}, New: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, ExpectedNew: metav1.ObjectMeta{Name: "test", ResourceVersion: "1", DeletionGracePeriodSeconds: &gracePeriodLong}, - ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 40: field is immutable; may only be changed via deletion"}, + ExpectedErrs: []string{"field.deletionGracePeriodSeconds: Invalid value: 40: field is immutable"}, }, } diff --git a/deps/k8s.io/apimachinery/pkg/api/validation/path/BUILD b/deps/k8s.io/apimachinery/pkg/api/validation/path/BUILD deleted file mode 100644 index 33546216a..000000000 --- a/deps/k8s.io/apimachinery/pkg/api/validation/path/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["name_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/api/validation/path", -) - -go_library( - name = "go_default_library", - srcs = ["name.go"], - importpath = "k8s.io/apimachinery/pkg/api/validation/path", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/BUILD b/deps/k8s.io/apimachinery/pkg/apimachinery/BUILD deleted file mode 100644 index 90d016fab..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["types_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apimachinery", - deps = ["//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "types.go", - ], - importpath = "k8s.io/apimachinery/pkg/apimachinery", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/apimachinery/announced:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/apimachinery/registered:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/BUILD b/deps/k8s.io/apimachinery/pkg/apimachinery/announced/BUILD deleted file mode 100644 index 27734e8f5..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["announced_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apimachinery/announced", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "announced.go", - "group_factory.go", - ], - importpath = "k8s.io/apimachinery/pkg/apimachinery/announced", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go b/deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go deleted file mode 100644 index 4e38cc8c5..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package announced contains tools for announcing API group factories. This is -// distinct from registration (in the 'registered' package) in that it's safe -// to announce every possible group linked in, but only groups requested at -// runtime should be registered. This package contains both a registry, and -// factory code (which was formerly copy-pasta in every install package). -package announced - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/apimachinery/registered" - "k8s.io/apimachinery/pkg/runtime" -) - -// APIGroupFactoryRegistry allows for groups and versions to announce themselves, -// which simply makes them available and doesn't take other actions. Later, -// users of the registry can select which groups and versions they'd actually -// like to register with an APIRegistrationManager. -// -// (Right now APIRegistrationManager has separate 'registration' and 'enabled' -// concepts-- APIGroupFactory is going to take over the former function; -// they will overlap until the refactoring is finished.) -// -// The key is the group name. After initialization, this should be treated as -// read-only. It is implemented as a map from group name to group factory, and -// it is safe to use this knowledge to manually pick out groups to register -// (e.g., for testing). -type APIGroupFactoryRegistry map[string]*GroupMetaFactory - -func (gar APIGroupFactoryRegistry) group(groupName string) *GroupMetaFactory { - gmf, ok := gar[groupName] - if !ok { - gmf = &GroupMetaFactory{VersionArgs: map[string]*GroupVersionFactoryArgs{}} - gar[groupName] = gmf - } - return gmf -} - -// AnnounceGroupVersion adds the particular arguments for this group version to the group factory. -func (gar APIGroupFactoryRegistry) AnnounceGroupVersion(gvf *GroupVersionFactoryArgs) error { - gmf := gar.group(gvf.GroupName) - if _, ok := gmf.VersionArgs[gvf.VersionName]; ok { - return fmt.Errorf("version %q in group %q has already been announced", gvf.VersionName, gvf.GroupName) - } - gmf.VersionArgs[gvf.VersionName] = gvf - return nil -} - -// AnnounceGroup adds the group-wide arguments to the group factory. -func (gar APIGroupFactoryRegistry) AnnounceGroup(args *GroupMetaFactoryArgs) error { - gmf := gar.group(args.GroupName) - if gmf.GroupArgs != nil { - return fmt.Errorf("group %q has already been announced", args.GroupName) - } - gmf.GroupArgs = args - return nil -} - -// RegisterAndEnableAll throws every factory at the specified API registration -// manager, and lets it decide which to register. (If you want to do this a la -// cart, you may look through gar itself-- it's just a map.) -func (gar APIGroupFactoryRegistry) RegisterAndEnableAll(m *registered.APIRegistrationManager, scheme *runtime.Scheme) error { - for groupName, gmf := range gar { - if err := gmf.Register(m); err != nil { - return fmt.Errorf("error registering %v: %v", groupName, err) - } - if err := gmf.Enable(m, scheme); err != nil { - return fmt.Errorf("error enabling %v: %v", groupName, err) - } - } - return nil -} - -// AnnouncePreconstructedFactory announces a factory which you've manually assembled. -// You may call this instead of calling AnnounceGroup and AnnounceGroupVersion. -func (gar APIGroupFactoryRegistry) AnnouncePreconstructedFactory(gmf *GroupMetaFactory) error { - name := gmf.GroupArgs.GroupName - if _, exists := gar[name]; exists { - return fmt.Errorf("the group %q has already been announced.", name) - } - gar[name] = gmf - return nil -} diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go b/deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go deleted file mode 100644 index 95882e5df..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/announced_test.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package announced - -import ( - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/util/sets" -) - -func TestFactoryRegistry(t *testing.T) { - regA := make(APIGroupFactoryRegistry) - regB := make(APIGroupFactoryRegistry) - - if err := regA.AnnounceGroup(&GroupMetaFactoryArgs{ - GroupName: "foo", - VersionPreferenceOrder: []string{"v2", "v1"}, - RootScopedKinds: sets.NewString("namespaces"), - }); err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if err := regA.AnnounceGroupVersion(&GroupVersionFactoryArgs{ - GroupName: "foo", - VersionName: "v1", - }); err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if err := regA.AnnounceGroupVersion(&GroupVersionFactoryArgs{ - GroupName: "foo", - VersionName: "v2", - }); err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - if err := regB.AnnouncePreconstructedFactory(NewGroupMetaFactory( - &GroupMetaFactoryArgs{ - GroupName: "foo", - VersionPreferenceOrder: []string{"v2", "v1"}, - RootScopedKinds: sets.NewString("namespaces"), - }, - VersionToSchemeFunc{"v1": nil, "v2": nil}, - )); err != nil { - t.Fatalf("Unexpected error: %v", err) - } - - if !reflect.DeepEqual(regA, regB) { - t.Errorf("Expected both ways of registering to be equivalent, but they were not.\n\n%#v\n\n%#v\n", regA, regB) - } -} diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go b/deps/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go deleted file mode 100644 index 154ed08f5..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/announced/group_factory.go +++ /dev/null @@ -1,255 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package announced - -import ( - "fmt" - - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/apimachinery" - "k8s.io/apimachinery/pkg/apimachinery/registered" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/sets" -) - -type SchemeFunc func(*runtime.Scheme) error -type VersionToSchemeFunc map[string]SchemeFunc - -// GroupVersionFactoryArgs contains all the per-version parts of a GroupMetaFactory. -type GroupVersionFactoryArgs struct { - GroupName string - VersionName string - - AddToScheme SchemeFunc -} - -// GroupMetaFactoryArgs contains the group-level args of a GroupMetaFactory. -type GroupMetaFactoryArgs struct { - // GroupName is the name of the API-Group - // - // example: 'servicecatalog.k8s.io' - GroupName string - VersionPreferenceOrder []string - // RootScopedKinds are resources that are not namespaced. - RootScopedKinds sets.String // nil is allowed - IgnoredKinds sets.String // nil is allowed - - // May be nil if there are no internal objects. - AddInternalObjectsToScheme SchemeFunc -} - -// NewGroupMetaFactory builds the args for you. This is for if you're -// constructing a factory all at once and not using the registry. -func NewGroupMetaFactory(groupArgs *GroupMetaFactoryArgs, versions VersionToSchemeFunc) *GroupMetaFactory { - gmf := &GroupMetaFactory{ - GroupArgs: groupArgs, - VersionArgs: map[string]*GroupVersionFactoryArgs{}, - } - for v, f := range versions { - gmf.VersionArgs[v] = &GroupVersionFactoryArgs{ - GroupName: groupArgs.GroupName, - VersionName: v, - AddToScheme: f, - } - } - return gmf -} - -// Announce adds this Group factory to the global factory registry. It should -// only be called if you constructed the GroupMetaFactory yourself via -// NewGroupMetaFactory. -// Note that this will panic on an error, since it's expected that you'll be -// calling this at initialization time and any error is a result of a -// programmer importing the wrong set of packages. If this assumption doesn't -// work for you, just call DefaultGroupFactoryRegistry.AnnouncePreconstructedFactory -// yourself. -func (gmf *GroupMetaFactory) Announce(groupFactoryRegistry APIGroupFactoryRegistry) *GroupMetaFactory { - if err := groupFactoryRegistry.AnnouncePreconstructedFactory(gmf); err != nil { - panic(err) - } - return gmf -} - -// GroupMetaFactory has the logic for actually assembling and registering a group. -// -// There are two ways of obtaining one of these. -// 1. You can announce your group and versions separately, and then let the -// GroupFactoryRegistry assemble this object for you. (This allows group and -// versions to be imported separately, without referencing each other, to -// keep import trees small.) -// 2. You can call NewGroupMetaFactory(), which is mostly a drop-in replacement -// for the old, bad way of doing things. You can then call .Announce() to -// announce your constructed factory to any code that would like to do -// things the new, better way. -// -// Note that GroupMetaFactory actually does construct GroupMeta objects, but -// currently it does so in a way that's very entangled with an -// APIRegistrationManager. It's a TODO item to cleanly separate that interface. -type GroupMetaFactory struct { - GroupArgs *GroupMetaFactoryArgs - // map of version name to version factory - VersionArgs map[string]*GroupVersionFactoryArgs - - // assembled by Register() - prioritizedVersionList []schema.GroupVersion -} - -// Register constructs the finalized prioritized version list and sanity checks -// the announced group & versions. Then it calls register. -func (gmf *GroupMetaFactory) Register(m *registered.APIRegistrationManager) error { - if gmf.GroupArgs == nil { - return fmt.Errorf("partially announced groups are not allowed, only got versions: %#v", gmf.VersionArgs) - } - if len(gmf.VersionArgs) == 0 { - return fmt.Errorf("group %v announced but no versions announced", gmf.GroupArgs.GroupName) - } - - pvSet := sets.NewString(gmf.GroupArgs.VersionPreferenceOrder...) - if pvSet.Len() != len(gmf.GroupArgs.VersionPreferenceOrder) { - return fmt.Errorf("preference order for group %v has duplicates: %v", gmf.GroupArgs.GroupName, gmf.GroupArgs.VersionPreferenceOrder) - } - prioritizedVersions := []schema.GroupVersion{} - for _, v := range gmf.GroupArgs.VersionPreferenceOrder { - prioritizedVersions = append( - prioritizedVersions, - schema.GroupVersion{ - Group: gmf.GroupArgs.GroupName, - Version: v, - }, - ) - } - - // Go through versions that weren't explicitly prioritized. - unprioritizedVersions := []schema.GroupVersion{} - for _, v := range gmf.VersionArgs { - if v.GroupName != gmf.GroupArgs.GroupName { - return fmt.Errorf("found %v/%v in group %v?", v.GroupName, v.VersionName, gmf.GroupArgs.GroupName) - } - if pvSet.Has(v.VersionName) { - pvSet.Delete(v.VersionName) - continue - } - unprioritizedVersions = append(unprioritizedVersions, schema.GroupVersion{Group: v.GroupName, Version: v.VersionName}) - } - if len(unprioritizedVersions) > 1 { - glog.Warningf("group %v has multiple unprioritized versions: %#v. They will have an arbitrary preference order!", gmf.GroupArgs.GroupName, unprioritizedVersions) - } - if pvSet.Len() != 0 { - return fmt.Errorf("group %v has versions in the priority list that were never announced: %s", gmf.GroupArgs.GroupName, pvSet) - } - prioritizedVersions = append(prioritizedVersions, unprioritizedVersions...) - m.RegisterVersions(prioritizedVersions) - gmf.prioritizedVersionList = prioritizedVersions - return nil -} - -func (gmf *GroupMetaFactory) newRESTMapper(scheme *runtime.Scheme, externalVersions []schema.GroupVersion, groupMeta *apimachinery.GroupMeta) meta.RESTMapper { - // the list of kinds that are scoped at the root of the api hierarchy - // if a kind is not enumerated here, it is assumed to have a namespace scope - rootScoped := sets.NewString() - if gmf.GroupArgs.RootScopedKinds != nil { - rootScoped = gmf.GroupArgs.RootScopedKinds - } - ignoredKinds := sets.NewString() - if gmf.GroupArgs.IgnoredKinds != nil { - ignoredKinds = gmf.GroupArgs.IgnoredKinds - } - - mapper := meta.NewDefaultRESTMapper(externalVersions, groupMeta.InterfacesFor) - for _, gv := range externalVersions { - for kind := range scheme.KnownTypes(gv) { - if ignoredKinds.Has(kind) { - continue - } - scope := meta.RESTScopeNamespace - if rootScoped.Has(kind) { - scope = meta.RESTScopeRoot - } - mapper.Add(gv.WithKind(kind), scope) - } - } - - return mapper -} - -// Enable enables group versions that are allowed, adds methods to the scheme, etc. -func (gmf *GroupMetaFactory) Enable(m *registered.APIRegistrationManager, scheme *runtime.Scheme) error { - externalVersions := []schema.GroupVersion{} - for _, v := range gmf.prioritizedVersionList { - if !m.IsAllowedVersion(v) { - continue - } - externalVersions = append(externalVersions, v) - if err := m.EnableVersions(v); err != nil { - return err - } - gmf.VersionArgs[v.Version].AddToScheme(scheme) - } - if len(externalVersions) == 0 { - glog.V(4).Infof("No version is registered for group %v", gmf.GroupArgs.GroupName) - return nil - } - - if gmf.GroupArgs.AddInternalObjectsToScheme != nil { - gmf.GroupArgs.AddInternalObjectsToScheme(scheme) - } - - preferredExternalVersion := externalVersions[0] - accessor := meta.NewAccessor() - - groupMeta := &apimachinery.GroupMeta{ - GroupVersion: preferredExternalVersion, - GroupVersions: externalVersions, - SelfLinker: runtime.SelfLinker(accessor), - } - for _, v := range externalVersions { - gvf := gmf.VersionArgs[v.Version] - if err := groupMeta.AddVersionInterfaces( - schema.GroupVersion{Group: gvf.GroupName, Version: gvf.VersionName}, - &meta.VersionInterfaces{ - ObjectConvertor: scheme, - MetadataAccessor: accessor, - }, - ); err != nil { - return err - } - } - groupMeta.InterfacesFor = groupMeta.DefaultInterfacesFor - groupMeta.RESTMapper = gmf.newRESTMapper(scheme, externalVersions, groupMeta) - - if err := m.RegisterGroup(*groupMeta); err != nil { - return err - } - return nil -} - -// RegisterAndEnable is provided only to allow this code to get added in multiple steps. -// It's really bad that this is called in init() methods, but supporting this -// temporarily lets us do the change incrementally. -func (gmf *GroupMetaFactory) RegisterAndEnable(registry *registered.APIRegistrationManager, scheme *runtime.Scheme) error { - if err := gmf.Register(registry); err != nil { - return err - } - if err := gmf.Enable(registry, scheme); err != nil { - return err - } - - return nil -} diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/doc.go b/deps/k8s.io/apimachinery/pkg/apimachinery/doc.go deleted file mode 100644 index b238454b2..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package apimachinery contains the generic API machinery code that -// is common to both server and clients. -// This package should never import specific API objects. -package apimachinery // import "k8s.io/apimachinery/pkg/apimachinery" diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/registered/BUILD b/deps/k8s.io/apimachinery/pkg/apimachinery/registered/BUILD deleted file mode 100644 index 873b34838..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/registered/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["registered_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apimachinery/registered", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["registered.go"], - importpath = "k8s.io/apimachinery/pkg/apimachinery/registered", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go b/deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go deleted file mode 100644 index 0da94f50f..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered.go +++ /dev/null @@ -1,336 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package to keep track of API Versions that can be registered and are enabled in a Scheme. -package registered - -import ( - "fmt" - "sort" - "strings" - - "github.com/golang/glog" - - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/apimachinery" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/sets" -) - -// APIRegistrationManager provides the concept of what API groups are enabled. -// -// TODO: currently, it also provides a "registered" concept. But it's wrong to -// have both concepts in the same object. Therefore the "announced" package is -// going to take over the registered concept. After all the install packages -// are switched to using the announce package instead of this package, then we -// can combine the registered/enabled concepts in this object. Simplifying this -// isn't easy right now because there are so many callers of this package. -type APIRegistrationManager struct { - // registeredGroupVersions stores all API group versions for which RegisterGroup is called. - registeredVersions map[schema.GroupVersion]struct{} - - // enabledVersions represents all enabled API versions. It should be a - // subset of registeredVersions. Please call EnableVersions() to add - // enabled versions. - enabledVersions map[schema.GroupVersion]struct{} - - // map of group meta for all groups. - groupMetaMap map[string]*apimachinery.GroupMeta - - // envRequestedVersions represents the versions requested via the - // KUBE_API_VERSIONS environment variable. The install package of each group - // checks this list before add their versions to the latest package and - // Scheme. This list is small and order matters, so represent as a slice - envRequestedVersions []schema.GroupVersion -} - -// NewAPIRegistrationManager constructs a new manager. The argument ought to be -// the value of the KUBE_API_VERSIONS env var, or a value of this which you -// wish to test. -func NewAPIRegistrationManager(kubeAPIVersions string) (*APIRegistrationManager, error) { - m := &APIRegistrationManager{ - registeredVersions: map[schema.GroupVersion]struct{}{}, - enabledVersions: map[schema.GroupVersion]struct{}{}, - groupMetaMap: map[string]*apimachinery.GroupMeta{}, - envRequestedVersions: []schema.GroupVersion{}, - } - - if len(kubeAPIVersions) != 0 { - for _, version := range strings.Split(kubeAPIVersions, ",") { - gv, err := schema.ParseGroupVersion(version) - if err != nil { - return nil, fmt.Errorf("invalid api version: %s in KUBE_API_VERSIONS: %s.", - version, kubeAPIVersions) - } - m.envRequestedVersions = append(m.envRequestedVersions, gv) - } - } - return m, nil -} - -func NewOrDie(kubeAPIVersions string) *APIRegistrationManager { - m, err := NewAPIRegistrationManager(kubeAPIVersions) - if err != nil { - glog.Fatalf("Could not construct version manager: %v (KUBE_API_VERSIONS=%q)", err, kubeAPIVersions) - } - return m -} - -// RegisterVersions adds the given group versions to the list of registered group versions. -func (m *APIRegistrationManager) RegisterVersions(availableVersions []schema.GroupVersion) { - for _, v := range availableVersions { - m.registeredVersions[v] = struct{}{} - } -} - -// RegisterGroup adds the given group to the list of registered groups. -func (m *APIRegistrationManager) RegisterGroup(groupMeta apimachinery.GroupMeta) error { - groupName := groupMeta.GroupVersion.Group - if _, found := m.groupMetaMap[groupName]; found { - return fmt.Errorf("group %q is already registered in groupsMap: %v", groupName, m.groupMetaMap) - } - m.groupMetaMap[groupName] = &groupMeta - return nil -} - -// EnableVersions adds the versions for the given group to the list of enabled versions. -// Note that the caller should call RegisterGroup before calling this method. -// The caller of this function is responsible to add the versions to scheme and RESTMapper. -func (m *APIRegistrationManager) EnableVersions(versions ...schema.GroupVersion) error { - var unregisteredVersions []schema.GroupVersion - for _, v := range versions { - if _, found := m.registeredVersions[v]; !found { - unregisteredVersions = append(unregisteredVersions, v) - } - m.enabledVersions[v] = struct{}{} - } - if len(unregisteredVersions) != 0 { - return fmt.Errorf("Please register versions before enabling them: %v", unregisteredVersions) - } - return nil -} - -// IsAllowedVersion returns if the version is allowed by the KUBE_API_VERSIONS -// environment variable. If the environment variable is empty, then it always -// returns true. -func (m *APIRegistrationManager) IsAllowedVersion(v schema.GroupVersion) bool { - if len(m.envRequestedVersions) == 0 { - return true - } - for _, envGV := range m.envRequestedVersions { - if v == envGV { - return true - } - } - return false -} - -// IsEnabledVersion returns if a version is enabled. -func (m *APIRegistrationManager) IsEnabledVersion(v schema.GroupVersion) bool { - _, found := m.enabledVersions[v] - return found -} - -// EnabledVersions returns all enabled versions. Groups are randomly ordered, but versions within groups -// are priority order from best to worst -func (m *APIRegistrationManager) EnabledVersions() []schema.GroupVersion { - ret := []schema.GroupVersion{} - for _, groupMeta := range m.groupMetaMap { - for _, version := range groupMeta.GroupVersions { - if m.IsEnabledVersion(version) { - ret = append(ret, version) - } - } - } - return ret -} - -// EnabledVersionsForGroup returns all enabled versions for a group in order of best to worst -func (m *APIRegistrationManager) EnabledVersionsForGroup(group string) []schema.GroupVersion { - groupMeta, ok := m.groupMetaMap[group] - if !ok { - return []schema.GroupVersion{} - } - - ret := []schema.GroupVersion{} - for _, version := range groupMeta.GroupVersions { - if m.IsEnabledVersion(version) { - ret = append(ret, version) - } - } - return ret -} - -// Group returns the metadata of a group if the group is registered, otherwise -// an error is returned. -func (m *APIRegistrationManager) Group(group string) (*apimachinery.GroupMeta, error) { - groupMeta, found := m.groupMetaMap[group] - if !found { - return nil, fmt.Errorf("group %v has not been registered", group) - } - groupMetaCopy := *groupMeta - return &groupMetaCopy, nil -} - -// IsRegistered takes a string and determines if it's one of the registered groups -func (m *APIRegistrationManager) IsRegistered(group string) bool { - _, found := m.groupMetaMap[group] - return found -} - -// IsRegisteredVersion returns if a version is registered. -func (m *APIRegistrationManager) IsRegisteredVersion(v schema.GroupVersion) bool { - _, found := m.registeredVersions[v] - return found -} - -// RegisteredGroupVersions returns all registered group versions. -func (m *APIRegistrationManager) RegisteredGroupVersions() []schema.GroupVersion { - ret := []schema.GroupVersion{} - for groupVersion := range m.registeredVersions { - ret = append(ret, groupVersion) - } - return ret -} - -// InterfacesFor is a union meta.VersionInterfacesFunc func for all registered types -func (m *APIRegistrationManager) InterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) { - groupMeta, err := m.Group(version.Group) - if err != nil { - return nil, err - } - return groupMeta.InterfacesFor(version) -} - -// TODO: This is an expedient function, because we don't check if a Group is -// supported throughout the code base. We will abandon this function and -// checking the error returned by the Group() function. -func (m *APIRegistrationManager) GroupOrDie(group string) *apimachinery.GroupMeta { - groupMeta, found := m.groupMetaMap[group] - if !found { - if group == "" { - panic("The legacy v1 API is not registered.") - } else { - panic(fmt.Sprintf("Group %s is not registered.", group)) - } - } - groupMetaCopy := *groupMeta - return &groupMetaCopy -} - -// RESTMapper returns a union RESTMapper of all known types with priorities chosen in the following order: -// 1. if KUBE_API_VERSIONS is specified, then KUBE_API_VERSIONS in order, OR -// 1. legacy kube group preferred version, extensions preferred version, metrics perferred version, legacy -// kube any version, extensions any version, metrics any version, all other groups alphabetical preferred version, -// all other groups alphabetical. -func (m *APIRegistrationManager) RESTMapper(versionPatterns ...schema.GroupVersion) meta.RESTMapper { - unionMapper := meta.MultiRESTMapper{} - unionedGroups := sets.NewString() - for enabledVersion := range m.enabledVersions { - if !unionedGroups.Has(enabledVersion.Group) { - unionedGroups.Insert(enabledVersion.Group) - groupMeta := m.groupMetaMap[enabledVersion.Group] - unionMapper = append(unionMapper, groupMeta.RESTMapper) - } - } - - if len(versionPatterns) != 0 { - resourcePriority := []schema.GroupVersionResource{} - kindPriority := []schema.GroupVersionKind{} - for _, versionPriority := range versionPatterns { - resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource)) - kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind)) - } - - return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} - } - - if len(m.envRequestedVersions) != 0 { - resourcePriority := []schema.GroupVersionResource{} - kindPriority := []schema.GroupVersionKind{} - - for _, versionPriority := range m.envRequestedVersions { - resourcePriority = append(resourcePriority, versionPriority.WithResource(meta.AnyResource)) - kindPriority = append(kindPriority, versionPriority.WithKind(meta.AnyKind)) - } - - return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} - } - - prioritizedGroups := []string{"", "extensions", "metrics"} - resourcePriority, kindPriority := m.prioritiesForGroups(prioritizedGroups...) - - prioritizedGroupsSet := sets.NewString(prioritizedGroups...) - remainingGroups := sets.String{} - for enabledVersion := range m.enabledVersions { - if !prioritizedGroupsSet.Has(enabledVersion.Group) { - remainingGroups.Insert(enabledVersion.Group) - } - } - - remainingResourcePriority, remainingKindPriority := m.prioritiesForGroups(remainingGroups.List()...) - resourcePriority = append(resourcePriority, remainingResourcePriority...) - kindPriority = append(kindPriority, remainingKindPriority...) - - return meta.PriorityRESTMapper{Delegate: unionMapper, ResourcePriority: resourcePriority, KindPriority: kindPriority} -} - -// prioritiesForGroups returns the resource and kind priorities for a PriorityRESTMapper, preferring the preferred version of each group first, -// then any non-preferred version of the group second. -func (m *APIRegistrationManager) prioritiesForGroups(groups ...string) ([]schema.GroupVersionResource, []schema.GroupVersionKind) { - resourcePriority := []schema.GroupVersionResource{} - kindPriority := []schema.GroupVersionKind{} - - for _, group := range groups { - availableVersions := m.EnabledVersionsForGroup(group) - if len(availableVersions) > 0 { - resourcePriority = append(resourcePriority, availableVersions[0].WithResource(meta.AnyResource)) - kindPriority = append(kindPriority, availableVersions[0].WithKind(meta.AnyKind)) - } - } - for _, group := range groups { - resourcePriority = append(resourcePriority, schema.GroupVersionResource{Group: group, Version: meta.AnyVersion, Resource: meta.AnyResource}) - kindPriority = append(kindPriority, schema.GroupVersionKind{Group: group, Version: meta.AnyVersion, Kind: meta.AnyKind}) - } - - return resourcePriority, kindPriority -} - -// AllPreferredGroupVersions returns the preferred versions of all registered -// groups in the form of "group1/version1,group2/version2,..." -func (m *APIRegistrationManager) AllPreferredGroupVersions() string { - if len(m.groupMetaMap) == 0 { - return "" - } - var defaults []string - for _, groupMeta := range m.groupMetaMap { - defaults = append(defaults, groupMeta.GroupVersion.String()) - } - sort.Strings(defaults) - return strings.Join(defaults, ",") -} - -// ValidateEnvRequestedVersions returns a list of versions that are requested in -// the KUBE_API_VERSIONS environment variable, but not enabled. -func (m *APIRegistrationManager) ValidateEnvRequestedVersions() []schema.GroupVersion { - var missingVersions []schema.GroupVersion - for _, v := range m.envRequestedVersions { - if _, found := m.enabledVersions[v]; !found { - missingVersions = append(missingVersions, v) - } - } - return missingVersions -} diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered_test.go b/deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered_test.go deleted file mode 100644 index 58fc0173e..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/registered/registered_test.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package registered - -import ( - "testing" - - "k8s.io/apimachinery/pkg/apimachinery" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func TestAllPreferredGroupVersions(t *testing.T) { - testCases := []struct { - groupMetas []apimachinery.GroupMeta - expect string - }{ - { - groupMetas: []apimachinery.GroupMeta{ - { - GroupVersion: schema.GroupVersion{Group: "group1", Version: "v1"}, - }, - { - GroupVersion: schema.GroupVersion{Group: "group2", Version: "v2"}, - }, - { - GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, - }, - }, - expect: "group1/v1,group2/v2,v1", - }, - { - groupMetas: []apimachinery.GroupMeta{ - { - GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, - }, - }, - expect: "v1", - }, - { - groupMetas: []apimachinery.GroupMeta{}, - expect: "", - }, - } - for _, testCase := range testCases { - m, err := NewAPIRegistrationManager("") - if err != nil { - t.Fatalf("Unexpected failure to make a manager: %v", err) - } - for _, groupMeta := range testCase.groupMetas { - m.RegisterGroup(groupMeta) - } - output := m.AllPreferredGroupVersions() - if testCase.expect != output { - t.Errorf("Error. expect: %s, got: %s", testCase.expect, output) - } - } -} diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/types.go b/deps/k8s.io/apimachinery/pkg/apimachinery/types.go deleted file mode 100644 index baca784fa..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/types.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package apimachinery - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupMeta stores the metadata of a group. -type GroupMeta struct { - // GroupVersion represents the preferred version of the group. - GroupVersion schema.GroupVersion - - // GroupVersions is Group + all versions in that group. - GroupVersions []schema.GroupVersion - - // SelfLinker can set or get the SelfLink field of all API types. - // TODO: when versioning changes, make this part of each API definition. - // TODO(lavalamp): Combine SelfLinker & ResourceVersioner interfaces, force all uses - // to go through the InterfacesFor method below. - SelfLinker runtime.SelfLinker - - // RESTMapper provides the default mapping between REST paths and the objects declared in a Scheme and all known - // versions. - RESTMapper meta.RESTMapper - - // InterfacesFor returns the default Codec and ResourceVersioner for a given version - // string, or an error if the version is not known. - // TODO: make this stop being a func pointer and always use the default - // function provided below once every place that populates this field has been changed. - InterfacesFor func(version schema.GroupVersion) (*meta.VersionInterfaces, error) - - // InterfacesByVersion stores the per-version interfaces. - InterfacesByVersion map[schema.GroupVersion]*meta.VersionInterfaces -} - -// DefaultInterfacesFor returns the default Codec and ResourceVersioner for a given version -// string, or an error if the version is not known. -// TODO: Remove the "Default" prefix. -func (gm *GroupMeta) DefaultInterfacesFor(version schema.GroupVersion) (*meta.VersionInterfaces, error) { - if v, ok := gm.InterfacesByVersion[version]; ok { - return v, nil - } - return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, gm.GroupVersions) -} - -// AddVersionInterfaces adds the given version to the group. Only call during -// init, after that GroupMeta objects should be immutable. Not thread safe. -// (If you use this, be sure to set .InterfacesFor = .DefaultInterfacesFor) -// TODO: remove the "Interfaces" suffix and make this also maintain the -// .GroupVersions member. -func (gm *GroupMeta) AddVersionInterfaces(version schema.GroupVersion, interfaces *meta.VersionInterfaces) error { - if e, a := gm.GroupVersion.Group, version.Group; a != e { - return fmt.Errorf("got a version in group %v, but am in group %v", a, e) - } - if gm.InterfacesByVersion == nil { - gm.InterfacesByVersion = make(map[schema.GroupVersion]*meta.VersionInterfaces) - } - gm.InterfacesByVersion[version] = interfaces - - // TODO: refactor to make the below error not possible, this function - // should *set* GroupVersions rather than depend on it. - for _, v := range gm.GroupVersions { - if v == version { - return nil - } - } - return fmt.Errorf("added a version interface without the corresponding version %v being in the list %#v", version, gm.GroupVersions) -} diff --git a/deps/k8s.io/apimachinery/pkg/apimachinery/types_test.go b/deps/k8s.io/apimachinery/pkg/apimachinery/types_test.go deleted file mode 100644 index ca858788e..000000000 --- a/deps/k8s.io/apimachinery/pkg/apimachinery/types_test.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package apimachinery - -import ( - "testing" - - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func TestAdd(t *testing.T) { - gm := GroupMeta{ - GroupVersion: schema.GroupVersion{ - Group: "test", - Version: "v1", - }, - GroupVersions: []schema.GroupVersion{{Group: "test", Version: "v1"}}, - } - - gm.AddVersionInterfaces(schema.GroupVersion{Group: "test", Version: "v1"}, nil) - if e, a := 1, len(gm.InterfacesByVersion); e != a { - t.Errorf("expected %v, got %v", e, a) - } - - // GroupVersions is unchanged - if e, a := 1, len(gm.GroupVersions); e != a { - t.Errorf("expected %v, got %v", e, a) - } -} diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/OWNERS b/deps/k8s.io/apimachinery/pkg/apis/config/OWNERS new file mode 100644 index 000000000..2f7b10df4 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/OWNERS @@ -0,0 +1,7 @@ +approvers: +- api-approvers +- sttts +- luxas +reviewers: +- api-reviewers +- hanxiaoshuai diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/doc.go b/deps/k8s.io/apimachinery/pkg/apis/config/doc.go new file mode 100644 index 000000000..d849c7aa3 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package + +package config // import "k8s.io/apimachinery/pkg/apis/config" diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/types.go b/deps/k8s.io/apimachinery/pkg/apis/config/types.go new file mode 100644 index 000000000..b32fc8a28 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/types.go @@ -0,0 +1,33 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package config + +// ClientConnectionConfiguration contains details for constructing a client. +type ClientConnectionConfiguration struct { + // kubeconfig is the path to a KubeConfig file. + Kubeconfig string + // acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the + // default value of 'application/json'. This field will control all connections to the server used by a particular + // client. + AcceptContentTypes string + // contentType is the content type used when sending data to the server from this client. + ContentType string + // qps controls the number of queries per second allowed for this connection. + QPS float32 + // burst allows extra queries to accumulate when a client is exceeding its rate. + Burst int32 +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/conversion.go b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/conversion.go new file mode 100644 index 000000000..7e7d34795 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/conversion.go @@ -0,0 +1,37 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/apis/config" + "k8s.io/apimachinery/pkg/conversion" +) + +// Important! The public back-and-forth conversion functions for the types in this generic +// package with ComponentConfig types need to be manually exposed like this in order for +// other packages that reference this package to be able to call these conversion functions +// in an autogenerated manner. +// TODO: Fix the bug in conversion-gen so it automatically discovers these Convert_* functions +// in autogenerated code as well. + +func Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *config.ClientConnectionConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in, out, s) +} + +func Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *config.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error { + return autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in, out, s) +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/defaults.go b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/defaults.go new file mode 100644 index 000000000..37971fcc5 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/defaults.go @@ -0,0 +1,38 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// RecommendedDefaultClientConnectionConfiguration defaults a pointer to a +// ClientConnectionConfiguration struct. This will set the recommended default +// values, but they may be subject to change between API versions. This function +// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo` +// function to allow consumers of this type to set whatever defaults for their +// embedded configs. Forcing consumers to use these defaults would be problematic +// as defaulting in the scheme is done as part of the conversion, and there would +// be no easy way to opt-out. Instead, if you want to use this defaulting method +// run it in your wrapper struct of this type in its `SetDefaults_` method. +func RecommendedDefaultClientConnectionConfiguration(obj *ClientConnectionConfiguration) { + if len(obj.ContentType) == 0 { + obj.ContentType = "application/vnd.kubernetes.protobuf" + } + if obj.QPS == 0.0 { + obj.QPS = 50.0 + } + if obj.Burst == 0 { + obj.Burst = 100 + } +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/doc.go b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/doc.go new file mode 100644 index 000000000..ce0a58a57 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/apimachinery/pkg/apis/config + +package v1alpha1 // import "k8s.io/apimachinery/pkg/apis/config/v1alpha1" diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/register.go b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/register.go new file mode 100644 index 000000000..c09c16389 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/register.go @@ -0,0 +1,27 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go new file mode 100644 index 000000000..b762c4f0b --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/types.go @@ -0,0 +1,33 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +// ClientConnectionConfiguration contains details for constructing a client. +type ClientConnectionConfiguration struct { + // kubeconfig is the path to a KubeConfig file. + Kubeconfig string `json:"kubeconfig"` + // acceptContentTypes defines the Accept header sent by clients when connecting to a server, overriding the + // default value of 'application/json'. This field will control all connections to the server used by a particular + // client. + AcceptContentTypes string `json:"acceptContentTypes"` + // contentType is the content type used when sending data to the server from this client. + ContentType string `json:"contentType"` + // qps controls the number of queries per second allowed for this connection. + QPS float32 `json:"qps"` + // burst allows extra queries to accumulate when a client is exceeding its rate. + Burst int32 `json:"burst"` +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..4cea203cc --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,75 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + config "k8s.io/apimachinery/pkg/apis/config" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*ClientConnectionConfiguration)(nil), (*config.ClientConnectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(a.(*ClientConnectionConfiguration), b.(*config.ClientConnectionConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*config.ClientConnectionConfiguration)(nil), (*ClientConnectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(a.(*config.ClientConnectionConfiguration), b.(*ClientConnectionConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*config.ClientConnectionConfiguration)(nil), (*ClientConnectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(a.(*config.ClientConnectionConfiguration), b.(*ClientConnectionConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ClientConnectionConfiguration)(nil), (*config.ClientConnectionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(a.(*ClientConnectionConfiguration), b.(*config.ClientConnectionConfiguration), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_ClientConnectionConfiguration_To_config_ClientConnectionConfiguration(in *ClientConnectionConfiguration, out *config.ClientConnectionConfiguration, s conversion.Scope) error { + out.Kubeconfig = in.Kubeconfig + out.AcceptContentTypes = in.AcceptContentTypes + out.ContentType = in.ContentType + out.QPS = in.QPS + out.Burst = in.Burst + return nil +} + +func autoConvert_config_ClientConnectionConfiguration_To_v1alpha1_ClientConnectionConfiguration(in *config.ClientConnectionConfiguration, out *ClientConnectionConfiguration, s conversion.Scope) error { + out.Kubeconfig = in.Kubeconfig + out.AcceptContentTypes = in.AcceptContentTypes + out.ContentType = in.ContentType + out.QPS = in.QPS + out.Burst = in.Burst + return nil +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..d03adfbff --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,37 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClientConnectionConfiguration) DeepCopyInto(out *ClientConnectionConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientConnectionConfiguration. +func (in *ClientConnectionConfiguration) DeepCopy() *ClientConnectionConfiguration { + if in == nil { + return nil + } + out := new(ClientConnectionConfiguration) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/config/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/config/zz_generated.deepcopy.go new file mode 100644 index 000000000..f09beb0e3 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/config/zz_generated.deepcopy.go @@ -0,0 +1,37 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package config + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClientConnectionConfiguration) DeepCopyInto(out *ClientConnectionConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientConnectionConfiguration. +func (in *ClientConnectionConfiguration) DeepCopy() *ClientConnectionConfiguration { + if in == nil { + return nil + } + out := new(ClientConnectionConfiguration) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/BUILD b/deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/BUILD deleted file mode 100644 index fa0dd46d3..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["fuzzer.go"], - importpath = "k8s.io/apimachinery/pkg/apis/meta/fuzzer", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go b/deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go index 54fab9c02..c067aa558 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go @@ -25,9 +25,9 @@ import ( "github.com/google/gofuzz" + apitesting "k8s.io/apimachinery/pkg/api/apitesting" + "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" "k8s.io/apimachinery/pkg/api/resource" - apitesting "k8s.io/apimachinery/pkg/api/testing" - "k8s.io/apimachinery/pkg/api/testing/fuzzer" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" "k8s.io/apimachinery/pkg/runtime" @@ -181,16 +181,45 @@ func v1FuzzerFuncs(codecs runtimeserializer.CodecFactory) []interface{} { j.Kind = "" }, func(j *metav1.ObjectMeta, c fuzz.Continue) { - j.Name = c.RandString() + c.FuzzNoCustom(j) + j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10) - j.SelfLink = c.RandString() j.UID = types.UID(c.RandString()) - j.GenerateName = c.RandString() var sec, nsec int64 c.Fuzz(&sec) c.Fuzz(&nsec) j.CreationTimestamp = metav1.Unix(sec, nsec).Rfc3339Copy() + + if j.DeletionTimestamp != nil { + c.Fuzz(&sec) + c.Fuzz(&nsec) + t := metav1.Unix(sec, nsec).Rfc3339Copy() + j.DeletionTimestamp = &t + } + + if len(j.Labels) == 0 { + j.Labels = nil + } else { + delete(j.Labels, "") + } + if len(j.Annotations) == 0 { + j.Annotations = nil + } else { + delete(j.Annotations, "") + } + if len(j.OwnerReferences) == 0 { + j.OwnerReferences = nil + } + if len(j.Finalizers) == 0 { + j.Finalizers = nil + } + }, + func(j *metav1.Initializers, c fuzz.Continue) { + c.FuzzNoCustom(j) + if len(j.Pending) == 0 { + j.Pending = nil + } }, func(j *metav1.ListMeta, c fuzz.Continue) { j.ResourceVersion = strconv.FormatUint(c.RandUint64(), 10) @@ -268,7 +297,7 @@ func v1alpha1FuzzerFuncs(codecs runtimeserializer.CodecFactory) []interface{} { case 0: r.Cells[i] = c.RandString() case 1: - r.Cells[i] = c.Uint64() + r.Cells[i] = c.Int63() case 2: r.Cells[i] = c.RandBool() case 3: @@ -280,7 +309,7 @@ func v1alpha1FuzzerFuncs(codecs runtimeserializer.CodecFactory) []interface{} { case 4: x := make([]interface{}, c.Intn(10)) for i := range x { - x[i] = c.Uint64() + x[i] = c.Int63() } r.Cells[i] = x default: diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD deleted file mode 100644 index defc85ac3..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/BUILD +++ /dev/null @@ -1,60 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "register_test.go", - "roundtrip_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apis/meta/internalversion", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/testing/roundtrip:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "register.go", - "types.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/apis/meta/internalversion", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go index 1ea8c137b..673e56212 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/conversion.go @@ -17,11 +17,8 @@ limitations under the License. package internalversion import ( - "fmt" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/util/validation/field" ) func Convert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions, out *metav1.ListOptions, s conversion.Scope) error { @@ -55,23 +52,3 @@ func Convert_v1_ListOptions_To_internalversion_ListOptions(in *metav1.ListOption out.Continue = in.Continue return nil } - -func Convert_map_to_v1_LabelSelector(in *map[string]string, out *metav1.LabelSelector, s conversion.Scope) error { - if in == nil { - return nil - } - out = new(metav1.LabelSelector) - for labelKey, labelValue := range *in { - metav1.AddLabelToSelector(out, labelKey, labelValue) - } - return nil -} - -func Convert_v1_LabelSelector_to_map(in *metav1.LabelSelector, out *map[string]string, s conversion.Scope) error { - var err error - *out, err = metav1.LabelSelectorAsMap(in) - if err != nil { - err = field.Invalid(field.NewPath("labelSelector"), *in, fmt.Sprintf("cannot convert to old selector: %v", err)) - } - return err -} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go index 4bde90b3f..46b8605f4 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/register.go @@ -57,19 +57,22 @@ func addToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) if err := scheme.AddIgnoredConversionType(&metav1.TypeMeta{}, &metav1.TypeMeta{}); err != nil { return err } - scheme.AddConversionFuncs( + err := scheme.AddConversionFuncs( metav1.Convert_string_To_labels_Selector, metav1.Convert_labels_Selector_To_string, metav1.Convert_string_To_fields_Selector, metav1.Convert_fields_Selector_To_string, - Convert_map_to_v1_LabelSelector, - Convert_v1_LabelSelector_to_map, + metav1.Convert_Map_string_To_string_To_v1_LabelSelector, + metav1.Convert_v1_LabelSelector_To_Map_string_To_string, Convert_internalversion_ListOptions_To_v1_ListOptions, Convert_v1_ListOptions_To_internalversion_ListOptions, ) + if err != nil { + return err + } // ListOptions is the only options struct which needs conversion (it exposes labels and fields // as selectors for convenience). The other types have only a single representation today. scheme.AddKnownTypes(SchemeGroupVersion, @@ -77,6 +80,8 @@ func addToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) &metav1.GetOptions{}, &metav1.ExportOptions{}, &metav1.DeleteOptions{}, + &metav1.CreateOptions{}, + &metav1.UpdateOptions{}, ) scheme.AddKnownTypes(SchemeGroupVersion, &metav1beta1.Table{}, @@ -91,7 +96,10 @@ func addToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) &metav1beta1.PartialObjectMetadataList{}, ) // Allow delete options to be decoded across all version in this scheme (we may want to be more clever than this) - scheme.AddUnversionedTypes(SchemeGroupVersion, &metav1.DeleteOptions{}) + scheme.AddUnversionedTypes(SchemeGroupVersion, + &metav1.DeleteOptions{}, + &metav1.CreateOptions{}, + &metav1.UpdateOptions{}) metav1.AddToGroupVersion(scheme, metav1.SchemeGroupVersion) return nil } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go index 725aa316d..cca50eb4a 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/roundtrip_test.go @@ -19,7 +19,7 @@ package internalversion import ( "testing" - "k8s.io/apimachinery/pkg/api/testing/roundtrip" + "k8s.io/apimachinery/pkg/api/apitesting/roundtrip" "k8s.io/apimachinery/pkg/apis/meta/fuzzer" ) diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go index 247577b0c..18d190b24 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package internalversion @@ -34,13 +34,38 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_internalversion_List_To_v1_List, - Convert_v1_List_To_internalversion_List, - Convert_internalversion_ListOptions_To_v1_ListOptions, - Convert_v1_ListOptions_To_internalversion_ListOptions, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*List)(nil), (*v1.List)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_internalversion_List_To_v1_List(a.(*List), b.(*v1.List), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.List)(nil), (*List)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_List_To_internalversion_List(a.(*v1.List), b.(*List), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ListOptions)(nil), (*v1.ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_internalversion_ListOptions_To_v1_ListOptions(a.(*ListOptions), b.(*v1.ListOptions), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.ListOptions)(nil), (*ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ListOptions_To_internalversion_ListOptions(a.(*v1.ListOptions), b.(*ListOptions), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ListOptions)(nil), (*v1.ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_internalversion_ListOptions_To_v1_ListOptions(a.(*ListOptions), b.(*v1.ListOptions), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1.ListOptions)(nil), (*ListOptions)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ListOptions_To_internalversion_ListOptions(a.(*v1.ListOptions), b.(*ListOptions), scope) + }); err != nil { + return err + } + return nil } func autoConvert_internalversion_List_To_v1_List(in *List, out *v1.List, s conversion.Scope) error { diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go index 2bc1c3f96..81d85e96e 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package internalversion @@ -33,9 +33,7 @@ func (in *List) DeepCopyInto(out *List) { in, out := &in.Items, &out.Items *out = make([]runtime.Object, len(*in)) for i := range *in { - if (*in)[i] == nil { - (*out)[i] = nil - } else { + if (*in)[i] != nil { (*out)[i] = (*in)[i].DeepCopyObject() } } @@ -57,33 +55,24 @@ func (in *List) DeepCopy() *List { func (in *List) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ListOptions) DeepCopyInto(out *ListOptions) { *out = *in out.TypeMeta = in.TypeMeta - if in.LabelSelector == nil { - out.LabelSelector = nil - } else { + if in.LabelSelector != nil { out.LabelSelector = in.LabelSelector.DeepCopySelector() } - if in.FieldSelector == nil { - out.FieldSelector = nil - } else { + if in.FieldSelector != nil { out.FieldSelector = in.FieldSelector.DeepCopySelector() } if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } return } @@ -102,7 +91,6 @@ func (in *ListOptions) DeepCopy() *ListOptions { func (in *ListOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD deleted file mode 100644 index 1c49035bb..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/BUILD +++ /dev/null @@ -1,103 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "controller_ref_test.go", - "duration_test.go", - "group_version_test.go", - "helpers_test.go", - "labels_test.go", - "micro_time_test.go", - "time_test.go", - "types_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1", - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/json-iterator/go:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "controller_ref.go", - "conversion.go", - "doc.go", - "duration.go", - "generated.pb.go", - "group_version.go", - "helpers.go", - "labels.go", - "meta.go", - "micro_time.go", - "micro_time_proto.go", - "register.go", - "time.go", - "time_proto.go", - "types.go", - "types_swagger_doc_generated.go", - "watch.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/selection:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/validation:all-srcs", - ], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_xtest", - srcs = ["conversion_test.go"], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1_test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - ], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go index cd651bcd5..5c36f82c1 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion.go @@ -33,17 +33,17 @@ func AddConversionFuncs(scheme *runtime.Scheme) error { return scheme.AddConversionFuncs( Convert_v1_TypeMeta_To_v1_TypeMeta, - Convert_unversioned_ListMeta_To_unversioned_ListMeta, + Convert_v1_ListMeta_To_v1_ListMeta, Convert_intstr_IntOrString_To_intstr_IntOrString, - Convert_unversioned_Time_To_unversioned_Time, - Convert_unversioned_MicroTime_To_unversioned_MicroTime, - Convert_Pointer_v1_Duration_To_v1_Duration, Convert_v1_Duration_To_Pointer_v1_Duration, - Convert_Slice_string_To_unversioned_Time, + Convert_Slice_string_To_v1_Time, + + Convert_v1_Time_To_v1_Time, + Convert_v1_MicroTime_To_v1_MicroTime, Convert_resource_Quantity_To_resource_Quantity, @@ -71,10 +71,12 @@ func AddConversionFuncs(scheme *runtime.Scheme) error { Convert_Pointer_float64_To_float64, Convert_float64_To_Pointer_float64, - Convert_map_to_unversioned_LabelSelector, - Convert_unversioned_LabelSelector_to_map, + Convert_Map_string_To_string_To_v1_LabelSelector, + Convert_v1_LabelSelector_To_Map_string_To_string, Convert_Slice_string_To_Slice_int32, + + Convert_Slice_string_To_v1_DeletionPropagation, ) } @@ -185,7 +187,7 @@ func Convert_v1_TypeMeta_To_v1_TypeMeta(in, out *TypeMeta, s conversion.Scope) e } // +k8s:conversion-fn=copy-only -func Convert_unversioned_ListMeta_To_unversioned_ListMeta(in, out *ListMeta, s conversion.Scope) error { +func Convert_v1_ListMeta_To_v1_ListMeta(in, out *ListMeta, s conversion.Scope) error { *out = *in return nil } @@ -197,7 +199,14 @@ func Convert_intstr_IntOrString_To_intstr_IntOrString(in, out *intstr.IntOrStrin } // +k8s:conversion-fn=copy-only -func Convert_unversioned_Time_To_unversioned_Time(in *Time, out *Time, s conversion.Scope) error { +func Convert_v1_Time_To_v1_Time(in *Time, out *Time, s conversion.Scope) error { + // Cannot deep copy these, because time.Time has unexported fields. + *out = *in + return nil +} + +// +k8s:conversion-fn=copy-only +func Convert_v1_MicroTime_To_v1_MicroTime(in *MicroTime, out *MicroTime, s conversion.Scope) error { // Cannot deep copy these, because time.Time has unexported fields. *out = *in return nil @@ -218,14 +227,8 @@ func Convert_v1_Duration_To_Pointer_v1_Duration(in *Duration, out **Duration, s return nil } -func Convert_unversioned_MicroTime_To_unversioned_MicroTime(in *MicroTime, out *MicroTime, s conversion.Scope) error { - // Cannot deep copy these, because time.Time has unexported fields. - *out = *in - return nil -} - -// Convert_Slice_string_To_unversioned_Time allows converting a URL query parameter value -func Convert_Slice_string_To_unversioned_Time(input *[]string, out *Time, s conversion.Scope) error { +// Convert_Slice_string_To_v1_Time allows converting a URL query parameter value +func Convert_Slice_string_To_v1_Time(input *[]string, out *Time, s conversion.Scope) error { str := "" if len(*input) > 0 { str = (*input)[0] @@ -273,7 +276,7 @@ func Convert_resource_Quantity_To_resource_Quantity(in *resource.Quantity, out * return nil } -func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *LabelSelector, s conversion.Scope) error { +func Convert_Map_string_To_string_To_v1_LabelSelector(in *map[string]string, out *LabelSelector, s conversion.Scope) error { if in == nil { return nil } @@ -283,7 +286,7 @@ func Convert_map_to_unversioned_LabelSelector(in *map[string]string, out *LabelS return nil } -func Convert_unversioned_LabelSelector_to_map(in *LabelSelector, out *map[string]string, s conversion.Scope) error { +func Convert_v1_LabelSelector_To_Map_string_To_string(in *LabelSelector, out *map[string]string, s conversion.Scope) error { var err error *out, err = LabelSelectorAsMap(in) return err @@ -304,3 +307,13 @@ func Convert_Slice_string_To_Slice_int32(in *[]string, out *[]int32, s conversio } return nil } + +// Convert_Slice_string_To_v1_DeletionPropagation allows converting a URL query parameter propagationPolicy +func Convert_Slice_string_To_v1_DeletionPropagation(input *[]string, out *DeletionPropagation, s conversion.Scope) error { + if len(*input) > 0 { + *out = DeletionPropagation((*input)[0]) + } else { + *out = "" + } + return nil +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go index bc591584e..4c73d1d80 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/conversion_test.go @@ -33,13 +33,13 @@ func TestMapToLabelSelectorRoundTrip(t *testing.T) { } for _, in := range inputs { ls := &v1.LabelSelector{} - if err := v1.Convert_map_to_unversioned_LabelSelector(&in, ls, nil); err != nil { - t.Errorf("Convert_map_to_unversioned_LabelSelector(%#v): %v", in, err) + if err := v1.Convert_Map_string_To_string_To_v1_LabelSelector(&in, ls, nil); err != nil { + t.Errorf("Convert_Map_string_To_string_To_v1_LabelSelector(%#v): %v", in, err) continue } out := map[string]string{} - if err := v1.Convert_unversioned_LabelSelector_to_map(ls, &out, nil); err != nil { - t.Errorf("Convert_unversioned_LabelSelector_to_map(%#v): %v", ls, err) + if err := v1.Convert_v1_LabelSelector_To_Map_string_To_string(ls, &out, nil); err != nil { + t.Errorf("Convert_v1_LabelSelector_To_Map_string_To_string(%#v): %v", ls, err) continue } if !apiequality.Semantic.DeepEqual(in, out) { @@ -47,3 +47,38 @@ func TestMapToLabelSelectorRoundTrip(t *testing.T) { } } } + +func TestConvertSliceStringToDeletionPropagation(t *testing.T) { + tcs := []struct { + Input []string + Output v1.DeletionPropagation + }{ + { + Input: nil, + Output: "", + }, + { + Input: []string{}, + Output: "", + }, + { + Input: []string{"foo"}, + Output: "foo", + }, + { + Input: []string{"bar", "foo"}, + Output: "bar", + }, + } + + for _, tc := range tcs { + var dp v1.DeletionPropagation + if err := v1.Convert_Slice_string_To_v1_DeletionPropagation(&tc.Input, &dp, nil); err != nil { + t.Errorf("Convert_Slice_string_To_v1_DeletionPropagation(%#v): %v", tc.Input, err) + continue + } + if !apiequality.Semantic.DeepEqual(dp, tc.Output) { + t.Errorf("slice string to DeletionPropagation conversion failed: got %v; want %v", dp, tc.Output) + } + } +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go index fea458dfb..2eaabf079 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/duration.go @@ -31,7 +31,10 @@ type Duration struct { // UnmarshalJSON implements the json.Unmarshaller interface. func (d *Duration) UnmarshalJSON(b []byte) error { var str string - json.Unmarshal(b, &str) + err := json.Unmarshal(b, &str) + if err != nil { + return err + } pd, err := time.ParseDuration(str) if err != nil { diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go index 1fa478f5a..b7508f033 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ limitations under the License. APIResource APIResourceList APIVersions + CreateOptions DeleteOptions Duration ExportOptions @@ -60,6 +61,7 @@ limitations under the License. Time Timestamp TypeMeta + UpdateOptions Verbs WatchEvent */ @@ -113,139 +115,147 @@ func (m *APIVersions) Reset() { *m = APIVersions{} } func (*APIVersions) ProtoMessage() {} func (*APIVersions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } +func (m *CreateOptions) Reset() { *m = CreateOptions{} } +func (*CreateOptions) ProtoMessage() {} +func (*CreateOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + func (m *DeleteOptions) Reset() { *m = DeleteOptions{} } func (*DeleteOptions) ProtoMessage() {} -func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } +func (*DeleteOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } func (m *Duration) Reset() { *m = Duration{} } func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } +func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } func (m *ExportOptions) Reset() { *m = ExportOptions{} } func (*ExportOptions) ProtoMessage() {} -func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (*ExportOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } func (m *GetOptions) Reset() { *m = GetOptions{} } func (*GetOptions) ProtoMessage() {} -func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } +func (*GetOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } func (m *GroupKind) Reset() { *m = GroupKind{} } func (*GroupKind) ProtoMessage() {} -func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*GroupKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *GroupResource) Reset() { *m = GroupResource{} } func (*GroupResource) ProtoMessage() {} -func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*GroupResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *GroupVersion) Reset() { *m = GroupVersion{} } func (*GroupVersion) ProtoMessage() {} -func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*GroupVersion) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func (m *GroupVersionForDiscovery) Reset() { *m = GroupVersionForDiscovery{} } func (*GroupVersionForDiscovery) ProtoMessage() {} func (*GroupVersionForDiscovery) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{12} + return fileDescriptorGenerated, []int{13} } func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } func (*GroupVersionKind) ProtoMessage() {} -func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{13} } +func (*GroupVersionKind) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } func (*GroupVersionResource) ProtoMessage() {} -func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{14} } +func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } func (m *Initializer) Reset() { *m = Initializer{} } func (*Initializer) ProtoMessage() {} -func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{15} } +func (*Initializer) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } func (m *Initializers) Reset() { *m = Initializers{} } func (*Initializers) ProtoMessage() {} -func (*Initializers) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{16} } +func (*Initializers) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } func (m *LabelSelector) Reset() { *m = LabelSelector{} } func (*LabelSelector) ProtoMessage() {} -func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{17} } +func (*LabelSelector) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{18} } func (m *LabelSelectorRequirement) Reset() { *m = LabelSelectorRequirement{} } func (*LabelSelectorRequirement) ProtoMessage() {} func (*LabelSelectorRequirement) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{18} + return fileDescriptorGenerated, []int{19} } func (m *List) Reset() { *m = List{} } func (*List) ProtoMessage() {} -func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{19} } +func (*List) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } func (m *ListMeta) Reset() { *m = ListMeta{} } func (*ListMeta) ProtoMessage() {} -func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{20} } +func (*ListMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } func (m *ListOptions) Reset() { *m = ListOptions{} } func (*ListOptions) ProtoMessage() {} -func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{21} } +func (*ListOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } func (m *MicroTime) Reset() { *m = MicroTime{} } func (*MicroTime) ProtoMessage() {} -func (*MicroTime) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{22} } +func (*MicroTime) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } func (m *ObjectMeta) Reset() { *m = ObjectMeta{} } func (*ObjectMeta) ProtoMessage() {} -func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{23} } +func (*ObjectMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } func (m *OwnerReference) Reset() { *m = OwnerReference{} } func (*OwnerReference) ProtoMessage() {} -func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{24} } +func (*OwnerReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } func (m *Patch) Reset() { *m = Patch{} } func (*Patch) ProtoMessage() {} -func (*Patch) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{25} } +func (*Patch) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } func (m *Preconditions) Reset() { *m = Preconditions{} } func (*Preconditions) ProtoMessage() {} -func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{26} } +func (*Preconditions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } func (m *RootPaths) Reset() { *m = RootPaths{} } func (*RootPaths) ProtoMessage() {} -func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{27} } +func (*RootPaths) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{28} } func (m *ServerAddressByClientCIDR) Reset() { *m = ServerAddressByClientCIDR{} } func (*ServerAddressByClientCIDR) ProtoMessage() {} func (*ServerAddressByClientCIDR) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{28} + return fileDescriptorGenerated, []int{29} } func (m *Status) Reset() { *m = Status{} } func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{29} } +func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } func (m *StatusCause) Reset() { *m = StatusCause{} } func (*StatusCause) ProtoMessage() {} -func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{30} } +func (*StatusCause) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } func (m *StatusDetails) Reset() { *m = StatusDetails{} } func (*StatusDetails) ProtoMessage() {} -func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{31} } +func (*StatusDetails) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } func (m *Time) Reset() { *m = Time{} } func (*Time) ProtoMessage() {} -func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{32} } +func (*Time) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } func (m *Timestamp) Reset() { *m = Timestamp{} } func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{33} } +func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } func (m *TypeMeta) Reset() { *m = TypeMeta{} } func (*TypeMeta) ProtoMessage() {} -func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{34} } +func (*TypeMeta) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } + +func (m *UpdateOptions) Reset() { *m = UpdateOptions{} } +func (*UpdateOptions) ProtoMessage() {} +func (*UpdateOptions) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } func (m *Verbs) Reset() { *m = Verbs{} } func (*Verbs) ProtoMessage() {} -func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{35} } +func (*Verbs) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{37} } func (m *WatchEvent) Reset() { *m = WatchEvent{} } func (*WatchEvent) ProtoMessage() {} -func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{36} } +func (*WatchEvent) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{38} } func init() { proto.RegisterType((*APIGroup)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIGroup") @@ -253,6 +263,7 @@ func init() { proto.RegisterType((*APIResource)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResource") proto.RegisterType((*APIResourceList)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIResourceList") proto.RegisterType((*APIVersions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.APIVersions") + proto.RegisterType((*CreateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.CreateOptions") proto.RegisterType((*DeleteOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.DeleteOptions") proto.RegisterType((*Duration)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Duration") proto.RegisterType((*ExportOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.ExportOptions") @@ -283,6 +294,7 @@ func init() { proto.RegisterType((*Time)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Time") proto.RegisterType((*Timestamp)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Timestamp") proto.RegisterType((*TypeMeta)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.TypeMeta") + proto.RegisterType((*UpdateOptions)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.UpdateOptions") proto.RegisterType((*Verbs)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.Verbs") proto.RegisterType((*WatchEvent)(nil), "k8s.io.apimachinery.pkg.apis.meta.v1.WatchEvent") } @@ -535,6 +547,47 @@ func (m *APIVersions) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *CreateOptions) 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 *CreateOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + dAtA[i] = 0xa + 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) + } + } + dAtA[i] = 0x10 + i++ + if m.IncludeUninitialized { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} + func (m *DeleteOptions) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -581,6 +634,21 @@ func (m *DeleteOptions) MarshalTo(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PropagationPolicy))) i += copy(dAtA[i:], *m.PropagationPolicy) } + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + dAtA[i] = 0x2a + 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) + } + } return i, nil } @@ -1604,6 +1672,39 @@ func (m *TypeMeta) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *UpdateOptions) 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 *UpdateOptions) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + dAtA[i] = 0xa + 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) + } + } + return i, nil +} + func (m Verbs) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1793,6 +1894,19 @@ func (m *APIVersions) Size() (n int) { return n } +func (m *CreateOptions) Size() (n int) { + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + n += 2 + return n +} + func (m *DeleteOptions) Size() (n int) { var l int _ = l @@ -1810,6 +1924,12 @@ func (m *DeleteOptions) Size() (n int) { l = len(*m.PropagationPolicy) n += 1 + l + sovGenerated(uint64(l)) } + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -2197,6 +2317,18 @@ func (m *TypeMeta) Size() (n int) { return n } +func (m *UpdateOptions) Size() (n int) { + var l int + _ = l + if len(m.DryRun) > 0 { + for _, s := range m.DryRun { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + func (m Verbs) Size() (n int) { var l int _ = l @@ -2284,6 +2416,17 @@ func (this *APIResourceList) String() string { }, "") return s } +func (this *CreateOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CreateOptions{`, + `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, + `IncludeUninitialized:` + fmt.Sprintf("%v", this.IncludeUninitialized) + `,`, + `}`, + }, "") + return s +} func (this *DeleteOptions) String() string { if this == nil { return "nil" @@ -2293,6 +2436,7 @@ func (this *DeleteOptions) String() string { `Preconditions:` + strings.Replace(fmt.Sprintf("%v", this.Preconditions), "Preconditions", "Preconditions", 1) + `,`, `OrphanDependents:` + valueToStringGenerated(this.OrphanDependents) + `,`, `PropagationPolicy:` + valueToStringGenerated(this.PropagationPolicy) + `,`, + `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, `}`, }, "") return s @@ -2598,6 +2742,16 @@ func (this *TypeMeta) String() string { }, "") return s } +func (this *UpdateOptions) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UpdateOptions{`, + `DryRun:` + fmt.Sprintf("%v", this.DryRun) + `,`, + `}`, + }, "") + return s +} func (this *WatchEvent) String() string { if this == nil { return "nil" @@ -3395,6 +3549,105 @@ func (m *APIVersions) Unmarshal(dAtA []byte) error { } return nil } +func (m *CreateOptions) 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 ErrIntOverflowGenerated + } + 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: CreateOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IncludeUninitialized", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.IncludeUninitialized = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *DeleteOptions) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3528,6 +3781,35 @@ func (m *DeleteOptions) Unmarshal(dAtA []byte) error { s := DeletionPropagation(dAtA[iNdEx:postIndex]) m.PropagationPolicy = &s iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7506,6 +7788,85 @@ func (m *TypeMeta) Unmarshal(dAtA []byte) error { } return nil } +func (m *UpdateOptions) 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 ErrIntOverflowGenerated + } + 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: UpdateOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DryRun = append(m.DryRun, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Verbs) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7804,158 +8165,160 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 2435 bytes of a gzipped FileDescriptorProto + // 2465 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x23, 0x49, - 0x15, 0x4e, 0xdb, 0xb1, 0x63, 0x3f, 0xc7, 0xf9, 0xa9, 0xcd, 0x80, 0x37, 0x02, 0x3b, 0xdb, 0x8b, - 0x56, 0x59, 0x98, 0xb5, 0x49, 0x16, 0x56, 0xc3, 0x00, 0x03, 0xe9, 0x38, 0x33, 0x8a, 0x76, 0x32, - 0x63, 0x55, 0x76, 0x06, 0x31, 0x8c, 0x10, 0x9d, 0x76, 0xc5, 0x69, 0xd2, 0xee, 0xf6, 0x56, 0x95, - 0x33, 0x09, 0x1c, 0xd8, 0x03, 0x48, 0x1c, 0x10, 0x9a, 0x23, 0x27, 0xb4, 0x23, 0xb8, 0x70, 0xe5, - 0xc4, 0x05, 0x4e, 0x48, 0xcc, 0x71, 0x24, 0x2e, 0x7b, 0x40, 0xd6, 0x8e, 0xf7, 0xc0, 0x09, 0x71, - 0xcf, 0x09, 0x55, 0x75, 0xf5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0x07, 0xb5, 0x99, 0xe1, 0xa0, 0x36, 0x7b, - 0xc7, 0xec, 0x12, 0x2c, 0x39, 0xc8, 0x81, 0xc2, 0x09, 0xa1, 0xcc, 0xf6, 0x5c, 0x56, 0xc9, 0xac, - 0x65, 0xd7, 0x4b, 0x9b, 0x37, 0xea, 0x69, 0x82, 0x56, 0x97, 0x06, 0xee, 0xfb, 0xaa, 0x37, 0x3d, - 0xda, 0xb4, 0x99, 0xe5, 0x9d, 0x10, 0x7a, 0x66, 0x2c, 0x29, 0x2b, 0x05, 0xc5, 0x64, 0x38, 0xb4, - 0x80, 0x7e, 0xae, 0xc1, 0x52, 0x8f, 0x92, 0x43, 0x42, 0x29, 0x69, 0x2b, 0x7e, 0x25, 0xbb, 0xa6, - 0x7d, 0x06, 0x66, 0x2b, 0xca, 0xec, 0x52, 0x6b, 0x04, 0x1f, 0x8f, 0x59, 0x44, 0xbf, 0xd3, 0x60, - 0x95, 0x11, 0x7a, 0x42, 0xe8, 0x56, 0xbb, 0x4d, 0x09, 0x63, 0xc6, 0xd9, 0xb6, 0x63, 0x13, 0x97, - 0x6f, 0xef, 0x36, 0x31, 0xab, 0xcc, 0xca, 0x38, 0x7c, 0x27, 0x9d, 0x43, 0xfb, 0x93, 0x70, 0x0c, - 0x5d, 0x79, 0xb4, 0x3a, 0x51, 0x84, 0xe1, 0x17, 0xb8, 0xa1, 0x1f, 0xc2, 0x7c, 0xb0, 0x91, 0xb7, - 0x6d, 0xc6, 0xd1, 0x7d, 0xc8, 0x77, 0xc4, 0x07, 0xab, 0x68, 0xd2, 0xc1, 0x7a, 0x3a, 0x07, 0x03, - 0x0c, 0x63, 0x41, 0xf9, 0x93, 0x97, 0x9f, 0x0c, 0x2b, 0x34, 0xfd, 0xcf, 0x59, 0x28, 0x6d, 0xb5, - 0x76, 0x31, 0x61, 0x5e, 0x9f, 0x5a, 0x24, 0x45, 0xd2, 0x6c, 0x02, 0x88, 0xbf, 0xac, 0x67, 0x5a, - 0xa4, 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 0x4d, 0x49, 0x97, 0xb8, 0x3c, 0x7a, 0x10, - 0xec, 0x8d, 0xe0, 0xe3, 0x31, 0x8b, 0xab, 0x37, 0x60, 0x69, 0xd4, 0x79, 0xb4, 0x04, 0xd9, 0x63, - 0x72, 0xe6, 0xe7, 0x02, 0x16, 0x3f, 0xd1, 0x0a, 0xe4, 0x4e, 0x4c, 0xa7, 0xaf, 0xea, 0x0f, 0xf6, - 0x3f, 0xae, 0x67, 0xae, 0x69, 0xfa, 0xef, 0x35, 0xa8, 0x4c, 0x72, 0x04, 0x7d, 0x31, 0x06, 0x64, - 0x94, 0x94, 0x57, 0xd9, 0x77, 0xc9, 0x99, 0x8f, 0xba, 0x03, 0x05, 0xaf, 0x27, 0x9e, 0x70, 0x1e, - 0x55, 0x79, 0xfe, 0x66, 0x90, 0xbb, 0x77, 0x15, 0xfd, 0x7c, 0x50, 0xbb, 0x92, 0x80, 0x0f, 0x18, - 0x38, 0x54, 0x45, 0x3a, 0xe4, 0xa5, 0x3f, 0xe2, 0x52, 0x16, 0xed, 0x93, 0xdc, 0xfc, 0xfb, 0x92, - 0x82, 0x15, 0x47, 0xff, 0x93, 0x06, 0xb3, 0xb2, 0x3d, 0x7c, 0x08, 0x05, 0x11, 0xbf, 0xb6, 0xc9, - 0x4d, 0xe9, 0x57, 0xea, 0xc7, 0x84, 0xd0, 0xde, 0x23, 0xdc, 0x8c, 0xce, 0x57, 0x40, 0xc1, 0x21, - 0x22, 0xc2, 0x90, 0xb3, 0x39, 0xe9, 0x06, 0x1b, 0xf9, 0xd6, 0x44, 0x68, 0xf5, 0xfe, 0xad, 0x63, - 0xf3, 0xd1, 0xce, 0x29, 0x27, 0xae, 0xd8, 0x8c, 0xa8, 0x18, 0xec, 0x0a, 0x0c, 0xec, 0x43, 0xe9, - 0x7f, 0xd0, 0x20, 0x34, 0x25, 0x8e, 0x3b, 0x23, 0xce, 0xe1, 0x6d, 0xdb, 0x3d, 0x56, 0x61, 0x0d, - 0xdd, 0xd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x32, 0xff, - 0x12, 0xa5, 0x52, 0x77, 0x60, 0xf6, 0x7f, 0xd8, 0xa3, 0xff, 0x00, 0x8a, 0x51, 0x17, 0xf5, 0x19, - 0x9b, 0xd4, 0x7f, 0x04, 0x05, 0x91, 0x8d, 0x41, 0xf7, 0x7f, 0xc9, 0x4d, 0x94, 0xbc, 0x23, 0x32, - 0x69, 0xee, 0x08, 0x7d, 0x13, 0xfc, 0xff, 0x99, 0x89, 0x6a, 0xea, 0xbf, 0xd8, 0x63, 0xd5, 0x34, - 0xfe, 0xfc, 0x8e, 0x8d, 0xcc, 0x7e, 0xa1, 0x01, 0xc8, 0xe7, 0xe3, 0xce, 0x09, 0x71, 0xb9, 0x70, - 0x4c, 0xec, 0xc0, 0xa8, 0x63, 0xf2, 0x18, 0x49, 0x0e, 0xba, 0x07, 0x79, 0x4f, 0x76, 0x57, 0x6a, - 0x86, 0x35, 0xe5, 0x38, 0x20, 0xcc, 0x3a, 0xbf, 0x45, 0xc3, 0x0a, 0xcc, 0x58, 0x7f, 0xfa, 0xbc, - 0x3a, 0xf3, 0xec, 0x79, 0x75, 0xe6, 0xa3, 0xe7, 0xd5, 0x99, 0x0f, 0x86, 0x55, 0xed, 0xe9, 0xb0, - 0xaa, 0x3d, 0x1b, 0x56, 0xb5, 0x8f, 0x86, 0x55, 0xed, 0xe3, 0x61, 0x55, 0x7b, 0xfc, 0x49, 0x75, - 0xe6, 0x41, 0xe6, 0x64, 0xe3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xc5, 0x28, 0xb2, 0x54, - 0x20, 0x00, 0x00, + 0xf5, 0x4f, 0xdb, 0xb1, 0x63, 0x3f, 0xc7, 0xf9, 0xa8, 0xcd, 0xfe, 0xff, 0xde, 0x08, 0xec, 0x6c, + 0x2f, 0x5a, 0x65, 0x61, 0xd6, 0x26, 0x59, 0x58, 0x0d, 0x03, 0x2c, 0xc4, 0x71, 0x66, 0x14, 0xed, + 0x64, 0xc6, 0xaa,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dc, 0x7c, 0xf2, 0xac, 0x3a, 0xf7, + 0xf4, 0x59, 0x75, 0xee, 0xa3, 0x67, 0xd5, 0xb9, 0x0f, 0x46, 0x55, 0xed, 0xc9, 0xa8, 0xaa, 0x3d, + 0x1d, 0x55, 0xb5, 0x8f, 0x46, 0x55, 0xed, 0xe3, 0x51, 0x55, 0x7b, 0xf4, 0x8f, 0xea, 0xdc, 0xbd, + 0xcc, 0xd9, 0xd6, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xab, 0xec, 0x02, 0x4a, 0x00, 0x21, 0x00, + 0x00, } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto index bd5abcb79..8d101a7ce 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ package k8s.io.apimachinery.pkg.apis.meta.v1; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; @@ -49,6 +48,7 @@ message APIGroup { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. + // +optional repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 4; } @@ -124,6 +124,21 @@ message APIVersions { repeated ServerAddressByClientCIDR serverAddressByClientCIDRs = 2; } +// CreateOptions may be provided when creating an API object. +message CreateOptions { + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + repeated string dryRun = 1; + + // If IncludeUninitialized is specified, the object may be + // returned without completing initialization. + optional bool includeUninitialized = 2; +} + // DeleteOptions may be provided when deleting an API object. message DeleteOptions { // The duration in seconds before the object should be deleted. Value must be non-negative integer. @@ -155,6 +170,14 @@ message DeleteOptions { // foreground. // +optional optional string propagationPolicy = 4; + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + repeated string dryRun = 5; } // Duration is a wrapper around time.Duration which supports correct @@ -810,6 +833,17 @@ message TypeMeta { optional string apiVersion = 2; } +// UpdateOptions may be provided when updating an API object. +message UpdateOptions { + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + repeated string dryRun = 1; +} + // Verbs masks the value so protobuf can generate // // +protobuf.nullable=true diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go index 1f7f07e81..5250e33cb 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/group_version_test.go @@ -17,11 +17,11 @@ limitations under the License. package v1 import ( - "encoding/json" + gojson "encoding/json" "reflect" "testing" - jsoniter "github.com/json-iterator/go" + "k8s.io/apimachinery/pkg/runtime/serializer/json" ) type GroupVersionHolder struct { @@ -40,14 +40,15 @@ func TestGroupVersionUnmarshalJSON(t *testing.T) { for _, c := range cases { var result GroupVersionHolder // test golang lib's JSON codec - if err := json.Unmarshal([]byte(c.input), &result); err != nil { + if err := gojson.Unmarshal([]byte(c.input), &result); err != nil { t.Errorf("JSON codec failed to unmarshal input '%v': %v", c.input, err) } if !reflect.DeepEqual(result.GV, c.expect) { t.Errorf("JSON codec failed to unmarshal input '%s': expected %+v, got %+v", c.input, c.expect, result.GV) } // test the json-iterator codec - if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(c.input, &result); err != nil { + iter := json.CaseSensitiveJsonIterator() + if err := iter.Unmarshal(c.input, &result); err != nil { t.Errorf("json-iterator codec failed to unmarshal input '%v': %v", c.input, err) } if !reflect.DeepEqual(result.GV, c.expect) { @@ -67,7 +68,7 @@ func TestGroupVersionMarshalJSON(t *testing.T) { for _, c := range cases { input := GroupVersionHolder{c.input} - result, err := json.Marshal(&input) + result, err := gojson.Marshal(&input) if err != nil { t.Errorf("Failed to marshal input '%v': %v", input, err) } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go index fba6b158e..fa4249300 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + "fmt" "reflect" "strings" "testing" @@ -70,15 +71,21 @@ func TestLabelSelectorAsSelector(t *testing.T) { } for i, tc := range tc { + inCopy := tc.in.DeepCopy() out, err := LabelSelectorAsSelector(tc.in) + // after calling LabelSelectorAsSelector, tc.in shouldn't be modified + if !reflect.DeepEqual(inCopy, tc.in) { + t.Errorf("[%v]expected:\n\t%#v\nbut got:\n\t%#v", i, inCopy, tc.in) + } if err == nil && tc.expectErr { t.Errorf("[%v]expected error but got none.", i) } if err != nil && !tc.expectErr { t.Errorf("[%v]did not expect error but got: %v", i, err) } - if !reflect.DeepEqual(out, tc.out) { - t.Errorf("[%v]expected:\n\t%+v\nbut got:\n\t%+v", i, tc.out, out) + // fmt.Sprint() over String() as nil.String() will panic + if fmt.Sprint(out) != fmt.Sprint(tc.out) { + t.Errorf("[%v]expected:\n\t%s\nbut got:\n\t%s", i, fmt.Sprint(tc.out), fmt.Sprint(out)) } } } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go index c13fe4af8..ee1447541 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go @@ -162,55 +162,9 @@ func (meta *ObjectMeta) GetInitializers() *Initializers { return m func (meta *ObjectMeta) SetInitializers(initializers *Initializers) { meta.Initializers = initializers } func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } - -func (meta *ObjectMeta) GetOwnerReferences() []OwnerReference { - if meta.OwnerReferences == nil { - return nil - } - ret := make([]OwnerReference, len(meta.OwnerReferences)) - for i := 0; i < len(meta.OwnerReferences); i++ { - ret[i].Kind = meta.OwnerReferences[i].Kind - ret[i].Name = meta.OwnerReferences[i].Name - ret[i].UID = meta.OwnerReferences[i].UID - ret[i].APIVersion = meta.OwnerReferences[i].APIVersion - if meta.OwnerReferences[i].Controller != nil { - value := *meta.OwnerReferences[i].Controller - ret[i].Controller = &value - } - if meta.OwnerReferences[i].BlockOwnerDeletion != nil { - value := *meta.OwnerReferences[i].BlockOwnerDeletion - ret[i].BlockOwnerDeletion = &value - } - } - return ret -} - +func (meta *ObjectMeta) GetOwnerReferences() []OwnerReference { return meta.OwnerReferences } func (meta *ObjectMeta) SetOwnerReferences(references []OwnerReference) { - if references == nil { - meta.OwnerReferences = nil - return - } - newReferences := make([]OwnerReference, len(references)) - for i := 0; i < len(references); i++ { - newReferences[i].Kind = references[i].Kind - newReferences[i].Name = references[i].Name - newReferences[i].UID = references[i].UID - newReferences[i].APIVersion = references[i].APIVersion - if references[i].Controller != nil { - value := *references[i].Controller - newReferences[i].Controller = &value - } - if references[i].BlockOwnerDeletion != nil { - value := *references[i].BlockOwnerDeletion - newReferences[i].BlockOwnerDeletion = &value - } - } - meta.OwnerReferences = newReferences -} - -func (meta *ObjectMeta) GetClusterName() string { - return meta.ClusterName -} -func (meta *ObjectMeta) SetClusterName(clusterName string) { - meta.ClusterName = clusterName + meta.OwnerReferences = references } +func (meta *ObjectMeta) GetClusterName() string { return meta.ClusterName } +func (meta *ObjectMeta) SetClusterName(clusterName string) { meta.ClusterName = clusterName } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go index 7e5bc2d4e..6f6c5111b 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go @@ -104,7 +104,10 @@ func (t *MicroTime) UnmarshalJSON(b []byte) error { } var str string - json.Unmarshal(b, &str) + err := json.Unmarshal(b, &str) + if err != nil { + return err + } pt, err := time.Parse(RFC3339Micro, str) if err != nil { diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/register.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/register.go index b300d3701..0827729d0 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/register.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/register.go @@ -19,6 +19,7 @@ package v1 import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // GroupName is the group name for this API. @@ -52,14 +53,15 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) &ExportOptions{}, &GetOptions{}, &DeleteOptions{}, + &CreateOptions{}, + &UpdateOptions{}, ) - scheme.AddConversionFuncs( - Convert_versioned_Event_to_watch_Event, - Convert_versioned_InternalEvent_to_versioned_Event, - Convert_watch_Event_to_versioned_Event, - Convert_versioned_Event_to_versioned_InternalEvent, - ) - + utilruntime.Must(scheme.AddConversionFuncs( + Convert_v1_WatchEvent_To_watch_Event, + Convert_v1_InternalEvent_To_v1_WatchEvent, + Convert_watch_Event_To_v1_WatchEvent, + Convert_v1_WatchEvent_To_v1_InternalEvent, + )) // Register Unversioned types under their own special group scheme.AddUnversionedTypes(Unversioned, &Status{}, @@ -70,8 +72,8 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion) ) // register manually. This usually goes through the SchemeBuilder, which we cannot use here. - AddConversionFuncs(scheme) - RegisterDefaults(scheme) + utilruntime.Must(AddConversionFuncs(scheme)) + utilruntime.Must(RegisterDefaults(scheme)) } // scheme is the registry for the common types that adhere to the meta v1 API spec. @@ -86,8 +88,10 @@ func init() { &ExportOptions{}, &GetOptions{}, &DeleteOptions{}, + &CreateOptions{}, + &UpdateOptions{}, ) // register manually. This usually goes through the SchemeBuilder, which we cannot use here. - RegisterDefaults(scheme) + utilruntime.Must(RegisterDefaults(scheme)) } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/time.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/time.go index 5041954f7..efff656e1 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/time.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/time.go @@ -106,7 +106,10 @@ func (t *Time) UnmarshalJSON(b []byte) error { } var str string - json.Unmarshal(b, &str) + err := json.Unmarshal(b, &str) + if err != nil { + return err + } pt, err := time.Parse(time.RFC3339, str) if err != nil { diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types.go index 917efb37f..caaee1b17 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types.go @@ -418,6 +418,12 @@ const ( DeletePropagationForeground DeletionPropagation = "Foreground" ) +const ( + // DryRunAll means to complete all processing stages, but don't + // persist changes to storage. + DryRunAll = "All" +) + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // DeleteOptions may be provided when deleting an API object. @@ -453,6 +459,48 @@ type DeleteOptions struct { // foreground. // +optional PropagationPolicy *DeletionPropagation `json:"propagationPolicy,omitempty" protobuf:"varint,4,opt,name=propagationPolicy"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,5,rep,name=dryRun"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CreateOptions may be provided when creating an API object. +type CreateOptions struct { + TypeMeta `json:",inline"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` + + // If IncludeUninitialized is specified, the object may be + // returned without completing initialization. + IncludeUninitialized bool `json:"includeUninitialized,omitempty" protobuf:"varint,2,opt,name=includeUninitialized"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// UpdateOptions may be provided when updating an API object. +type UpdateOptions struct { + TypeMeta `json:",inline"` + + // When present, indicates that modifications should not be + // persisted. An invalid or unrecognized dryRun directive will + // result in an error response and no further processing of the + // request. Valid values are: + // - All: all dry run stages will be processed + // +optional + DryRun []string `json:"dryRun,omitempty" protobuf:"bytes,1,rep,name=dryRun"` } // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. @@ -799,7 +847,8 @@ type APIGroup struct { // The server returns only those CIDRs that it thinks that the client can match. // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` + // +optional + ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs,omitempty" protobuf:"bytes,4,rep,name=serverAddressByClientCIDRs"` } // ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go index caf929ee0..71b048c7c 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_APIGroup = map[string]string{ "": "APIGroup contains the name, the supported versions, and the preferred version of a group.", "name": "name is the name of the group.", @@ -85,12 +85,23 @@ func (APIVersions) SwaggerDoc() map[string]string { return map_APIVersions } +var map_CreateOptions = map[string]string{ + "": "CreateOptions may be provided when creating an API object.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "includeUninitialized": "If IncludeUninitialized is specified, the object may be returned without completing initialization.", +} + +func (CreateOptions) SwaggerDoc() map[string]string { + return map_CreateOptions +} + var map_DeleteOptions = map[string]string{ "": "DeleteOptions may be provided when deleting an API object.", "gracePeriodSeconds": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "preconditions": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", "orphanDependents": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "propagationPolicy": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", } func (DeleteOptions) SwaggerDoc() map[string]string { @@ -327,4 +338,13 @@ func (TypeMeta) SwaggerDoc() map[string]string { return map_TypeMeta } +var map_UpdateOptions = map[string]string{ + "": "UpdateOptions may be provided when updating an API object.", + "dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", +} + +func (UpdateOptions) SwaggerDoc() map[string]string { + return map_UpdateOptions +} + // AUTO-GENERATED FUNCTIONS END HERE diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go index 116f7505a..4c55198ee 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/types_test.go @@ -17,14 +17,14 @@ limitations under the License. package v1 import ( - "encoding/json" + gojson "encoding/json" "reflect" "testing" - jsoniter "github.com/json-iterator/go" + "k8s.io/apimachinery/pkg/runtime/serializer/json" ) -func TestVerbsUgorjiMarshalJSON(t *testing.T) { +func TestVerbsMarshalJSON(t *testing.T) { cases := []struct { input APIResource result string @@ -35,7 +35,7 @@ func TestVerbsUgorjiMarshalJSON(t *testing.T) { } for i, c := range cases { - result, err := json.Marshal(&c.input) + result, err := gojson.Marshal(&c.input) if err != nil { t.Errorf("[%d] Failed to marshal input: '%v': %v", i, c.input, err) } @@ -45,7 +45,7 @@ func TestVerbsUgorjiMarshalJSON(t *testing.T) { } } -func TestVerbsUgorjiUnmarshalJSON(t *testing.T) { +func TestVerbsJsonIterUnmarshalJSON(t *testing.T) { cases := []struct { input string result APIResource @@ -56,9 +56,10 @@ func TestVerbsUgorjiUnmarshalJSON(t *testing.T) { {`{"verbs":["delete"]}`, APIResource{Verbs: Verbs([]string{"delete"})}}, } + iter := json.CaseSensitiveJsonIterator() for i, c := range cases { var result APIResource - if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal([]byte(c.input), &result); err != nil { + if err := iter.Unmarshal([]byte(c.input), &result); err != nil { t.Errorf("[%d] Failed to unmarshal input '%v': %v", i, c.input, err) } if !reflect.DeepEqual(result, c.result) { @@ -67,8 +68,8 @@ func TestVerbsUgorjiUnmarshalJSON(t *testing.T) { } } -// TestUgorjiMarshalJSONWithOmit tests that we don't have regressions regarding nil and empty slices with "omit" -func TestUgorjiMarshalJSONWithOmit(t *testing.T) { +// TestMarshalJSONWithOmit tests that we don't have regressions regarding nil and empty slices with "omit" +func TestMarshalJSONWithOmit(t *testing.T) { cases := []struct { input LabelSelector result string @@ -79,7 +80,7 @@ func TestUgorjiMarshalJSONWithOmit(t *testing.T) { } for i, c := range cases { - result, err := json.Marshal(&c.input) + result, err := gojson.Marshal(&c.input) if err != nil { t.Errorf("[%d] Failed to marshal input: '%v': %v", i, c.input, err) } @@ -102,7 +103,7 @@ func TestVerbsUnmarshalJSON(t *testing.T) { for i, c := range cases { var result APIResource - if err := json.Unmarshal([]byte(c.input), &result); err != nil { + if err := gojson.Unmarshal([]byte(c.input), &result); err != nil { t.Errorf("[%d] Failed to unmarshal input '%v': %v", i, c.input, err) } if !reflect.DeepEqual(result, c.result) { diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD deleted file mode 100644 index 4f3bf562d..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/BUILD +++ /dev/null @@ -1,54 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "helpers_test.go", - "unstructured_list_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "helpers.go", - "unstructured.go", - "unstructured_list.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go index 08705ac84..fc138e75a 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go @@ -18,7 +18,6 @@ package unstructured import ( gojson "encoding/json" - "errors" "fmt" "io" "strings" @@ -34,14 +33,17 @@ import ( // Returns false if the value is missing. // No error is returned for a nil field. func NestedFieldCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } return runtime.DeepCopyJSONValue(val), true, nil } -func nestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { +// NestedFieldNoCopy returns a reference to a nested field. +// Returns false if value is not found and an error if unable +// to traverse obj. +func NestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{}, bool, error) { var val interface{} = obj for i, field := range fields { @@ -60,7 +62,7 @@ func nestedFieldNoCopy(obj map[string]interface{}, fields ...string) (interface{ // NestedString returns the string value of a nested field. // Returns false if value is not found and an error if not a string. func NestedString(obj map[string]interface{}, fields ...string) (string, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return "", found, err } @@ -74,7 +76,7 @@ func NestedString(obj map[string]interface{}, fields ...string) (string, bool, e // NestedBool returns the bool value of a nested field. // Returns false if value is not found and an error if not a bool. func NestedBool(obj map[string]interface{}, fields ...string) (bool, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return false, found, err } @@ -88,7 +90,7 @@ func NestedBool(obj map[string]interface{}, fields ...string) (bool, bool, error // NestedFloat64 returns the float64 value of a nested field. // Returns false if value is not found and an error if not a float64. func NestedFloat64(obj map[string]interface{}, fields ...string) (float64, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return 0, found, err } @@ -102,7 +104,7 @@ func NestedFloat64(obj map[string]interface{}, fields ...string) (float64, bool, // NestedInt64 returns the int64 value of a nested field. // Returns false if value is not found and an error if not an int64. func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return 0, found, err } @@ -116,7 +118,7 @@ func NestedInt64(obj map[string]interface{}, fields ...string) (int64, bool, err // NestedStringSlice returns a copy of []string value of a nested field. // Returns false if value is not found and an error if not a []interface{} or contains non-string items in the slice. func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } @@ -138,7 +140,7 @@ func NestedStringSlice(obj map[string]interface{}, fields ...string) ([]string, // NestedSlice returns a deep copy of []interface{} value of a nested field. // Returns false if value is not found and an error if not a []interface{}. func NestedSlice(obj map[string]interface{}, fields ...string) ([]interface{}, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } @@ -180,7 +182,7 @@ func NestedMap(obj map[string]interface{}, fields ...string) (map[string]interfa // nestedMapNoCopy returns a map[string]interface{} value of a nested field. // Returns false if value is not found and an error if not a map[string]interface{}. func nestedMapNoCopy(obj map[string]interface{}, fields ...string) (map[string]interface{}, bool, error) { - val, found, err := nestedFieldNoCopy(obj, fields...) + val, found, err := NestedFieldNoCopy(obj, fields...) if !found || err != nil { return nil, found, err } @@ -433,43 +435,17 @@ func (s unstructuredJSONScheme) decodeToList(data []byte, list *UnstructuredList return nil } -// UnstructuredObjectConverter is an ObjectConverter for use with -// Unstructured objects. Since it has no schema or type information, -// it will only succeed for no-op conversions. This is provided as a -// sane implementation for APIs that require an object converter. -type UnstructuredObjectConverter struct{} - -func (UnstructuredObjectConverter) Convert(in, out, context interface{}) error { - unstructIn, ok := in.(*Unstructured) - if !ok { - return fmt.Errorf("input type %T in not valid for unstructured conversion", in) - } - - unstructOut, ok := out.(*Unstructured) - if !ok { - return fmt.Errorf("output type %T in not valid for unstructured conversion", out) - } - - // maybe deep copy the map? It is documented in the - // ObjectConverter interface that this function is not - // guaranteed to not mutate the input. Or maybe set the input - // object to nil. - unstructOut.Object = unstructIn.Object - return nil +type JSONFallbackEncoder struct { + runtime.Encoder } -func (UnstructuredObjectConverter) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error) { - if kind := in.GetObjectKind().GroupVersionKind(); !kind.Empty() { - gvk, ok := target.KindForGroupVersionKinds([]schema.GroupVersionKind{kind}) - if !ok { - // TODO: should this be a typed error? - return nil, fmt.Errorf("%v is unstructured and is not suitable for converting to %q", kind, target) +func (c JSONFallbackEncoder) Encode(obj runtime.Object, w io.Writer) error { + err := c.Encoder.Encode(obj, w) + if runtime.IsNotRegisteredError(err) { + switch obj.(type) { + case *Unstructured, *UnstructuredList: + return UnstructuredJSONScheme.Encode(obj, w) } - in.GetObjectKind().SetGroupVersionKind(gvk) } - return in, nil -} - -func (UnstructuredObjectConverter) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - return "", "", errors.New("unstructured cannot convert field labels") + return err } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go index 9e774d1c1..d97996211 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers_test.go @@ -58,3 +58,79 @@ func TestRemoveNestedField(t *testing.T) { RemoveNestedField(obj, "x") // Remove of a non-existent field assert.Empty(t, obj) } + +func TestNestedFieldNoCopy(t *testing.T) { + target := map[string]interface{}{"foo": "bar"} + + obj := map[string]interface{}{ + "a": map[string]interface{}{ + "b": target, + "c": nil, + "d": []interface{}{"foo"}, + }, + } + + // case 1: field exists and is non-nil + res, exists, err := NestedFieldNoCopy(obj, "a", "b") + assert.True(t, exists) + assert.Nil(t, err) + assert.Equal(t, target, res) + target["foo"] = "baz" + assert.Equal(t, target["foo"], res.(map[string]interface{})["foo"], "result should be a reference to the expected item") + + // case 2: field exists and is nil + res, exists, err = NestedFieldNoCopy(obj, "a", "c") + assert.True(t, exists) + assert.Nil(t, err) + assert.Nil(t, res) + + // case 3: error traversing obj + res, exists, err = NestedFieldNoCopy(obj, "a", "d", "foo") + assert.False(t, exists) + assert.NotNil(t, err) + assert.Nil(t, res) + + // case 4: field does not exist + res, exists, err = NestedFieldNoCopy(obj, "a", "e") + assert.False(t, exists) + assert.Nil(t, err) + assert.Nil(t, res) +} + +func TestNestedFieldCopy(t *testing.T) { + target := map[string]interface{}{"foo": "bar"} + + obj := map[string]interface{}{ + "a": map[string]interface{}{ + "b": target, + "c": nil, + "d": []interface{}{"foo"}, + }, + } + + // case 1: field exists and is non-nil + res, exists, err := NestedFieldCopy(obj, "a", "b") + assert.True(t, exists) + assert.Nil(t, err) + assert.Equal(t, target, res) + target["foo"] = "baz" + assert.NotEqual(t, target["foo"], res.(map[string]interface{})["foo"], "result should be a copy of the expected item") + + // case 2: field exists and is nil + res, exists, err = NestedFieldCopy(obj, "a", "c") + assert.True(t, exists) + assert.Nil(t, err) + assert.Nil(t, res) + + // case 3: error traversing obj + res, exists, err = NestedFieldCopy(obj, "a", "d", "foo") + assert.False(t, exists) + assert.NotNil(t, err) + assert.Nil(t, res) + + // case 4: field does not exist + res, exists, err = NestedFieldCopy(obj, "a", "e") + assert.False(t, exists) + assert.Nil(t, err) + assert.Nil(t, res) +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go index 2a1333049..781469ec2 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured.go @@ -58,6 +58,26 @@ func (obj *Unstructured) IsList() bool { _, ok = field.([]interface{}) return ok } +func (obj *Unstructured) ToList() (*UnstructuredList, error) { + if !obj.IsList() { + // return an empty list back + return &UnstructuredList{Object: obj.Object}, nil + } + + ret := &UnstructuredList{} + ret.Object = obj.Object + + err := obj.EachListItem(func(item runtime.Object) error { + castItem := item.(*Unstructured) + ret.Items = append(ret.Items, *castItem) + return nil + }) + if err != nil { + return nil, err + } + + return ret, nil +} func (obj *Unstructured) EachListItem(fn func(runtime.Object) error) error { field, ok := obj.Object["items"] @@ -82,7 +102,7 @@ func (obj *Unstructured) EachListItem(fn func(runtime.Object) error) error { func (obj *Unstructured) UnstructuredContent() map[string]interface{} { if obj.Object == nil { - obj.Object = make(map[string]interface{}) + return make(map[string]interface{}) } return obj.Object } @@ -138,7 +158,7 @@ func (u *Unstructured) setNestedMap(value map[string]string, fields ...string) { } func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference { - field, found, err := nestedFieldNoCopy(u.Object, "metadata", "ownerReferences") + field, found, err := NestedFieldNoCopy(u.Object, "metadata", "ownerReferences") if !found || err != nil { return nil } @@ -159,6 +179,11 @@ func (u *Unstructured) GetOwnerReferences() []metav1.OwnerReference { } func (u *Unstructured) SetOwnerReferences(references []metav1.OwnerReference) { + if references == nil { + RemoveNestedField(u.Object, "metadata", "ownerReferences") + return + } + newReferences := make([]interface{}, 0, len(references)) for _, reference := range references { out, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&reference) @@ -192,6 +217,10 @@ func (u *Unstructured) GetNamespace() string { } func (u *Unstructured) SetNamespace(namespace string) { + if len(namespace) == 0 { + RemoveNestedField(u.Object, "metadata", "namespace") + return + } u.setNestedField(namespace, "metadata", "namespace") } @@ -200,6 +229,10 @@ func (u *Unstructured) GetName() string { } func (u *Unstructured) SetName(name string) { + if len(name) == 0 { + RemoveNestedField(u.Object, "metadata", "name") + return + } u.setNestedField(name, "metadata", "name") } @@ -207,8 +240,12 @@ func (u *Unstructured) GetGenerateName() string { return getNestedString(u.Object, "metadata", "generateName") } -func (u *Unstructured) SetGenerateName(name string) { - u.setNestedField(name, "metadata", "generateName") +func (u *Unstructured) SetGenerateName(generateName string) { + if len(generateName) == 0 { + RemoveNestedField(u.Object, "metadata", "generateName") + return + } + u.setNestedField(generateName, "metadata", "generateName") } func (u *Unstructured) GetUID() types.UID { @@ -216,6 +253,10 @@ func (u *Unstructured) GetUID() types.UID { } func (u *Unstructured) SetUID(uid types.UID) { + if len(string(uid)) == 0 { + RemoveNestedField(u.Object, "metadata", "uid") + return + } u.setNestedField(string(uid), "metadata", "uid") } @@ -223,8 +264,12 @@ func (u *Unstructured) GetResourceVersion() string { return getNestedString(u.Object, "metadata", "resourceVersion") } -func (u *Unstructured) SetResourceVersion(version string) { - u.setNestedField(version, "metadata", "resourceVersion") +func (u *Unstructured) SetResourceVersion(resourceVersion string) { + if len(resourceVersion) == 0 { + RemoveNestedField(u.Object, "metadata", "resourceVersion") + return + } + u.setNestedField(resourceVersion, "metadata", "resourceVersion") } func (u *Unstructured) GetGeneration() int64 { @@ -236,6 +281,10 @@ func (u *Unstructured) GetGeneration() int64 { } func (u *Unstructured) SetGeneration(generation int64) { + if generation == 0 { + RemoveNestedField(u.Object, "metadata", "generation") + return + } u.setNestedField(generation, "metadata", "generation") } @@ -244,6 +293,10 @@ func (u *Unstructured) GetSelfLink() string { } func (u *Unstructured) SetSelfLink(selfLink string) { + if len(selfLink) == 0 { + RemoveNestedField(u.Object, "metadata", "selfLink") + return + } u.setNestedField(selfLink, "metadata", "selfLink") } @@ -252,6 +305,10 @@ func (u *Unstructured) GetContinue() string { } func (u *Unstructured) SetContinue(c string) { + if len(c) == 0 { + RemoveNestedField(u.Object, "metadata", "continue") + return + } u.setNestedField(c, "metadata", "continue") } @@ -310,6 +367,10 @@ func (u *Unstructured) GetLabels() map[string]string { } func (u *Unstructured) SetLabels(labels map[string]string) { + if labels == nil { + RemoveNestedField(u.Object, "metadata", "labels") + return + } u.setNestedMap(labels, "metadata", "labels") } @@ -319,6 +380,10 @@ func (u *Unstructured) GetAnnotations() map[string]string { } func (u *Unstructured) SetAnnotations(annotations map[string]string) { + if annotations == nil { + RemoveNestedField(u.Object, "metadata", "annotations") + return + } u.setNestedMap(annotations, "metadata", "annotations") } @@ -367,6 +432,10 @@ func (u *Unstructured) GetFinalizers() []string { } func (u *Unstructured) SetFinalizers(finalizers []string) { + if finalizers == nil { + RemoveNestedField(u.Object, "metadata", "finalizers") + return + } u.setNestedSlice(finalizers, "metadata", "finalizers") } @@ -375,5 +444,9 @@ func (u *Unstructured) GetClusterName() string { } func (u *Unstructured) SetClusterName(clusterName string) { + if len(clusterName) == 0 { + RemoveNestedField(u.Object, "metadata", "clusterName") + return + } u.setNestedField(clusterName, "metadata", "clusterName") } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go index 57d78a09d..bf3fd023f 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_list.go @@ -53,19 +53,18 @@ func (u *UnstructuredList) EachListItem(fn func(runtime.Object) error) error { } // UnstructuredContent returns a map contain an overlay of the Items field onto -// the Object field. Items always overwrites overlay. Changing "items" in the -// returned object will affect items in the underlying Items field, but changing -// the "items" slice itself will have no effect. -// TODO: expose SetUnstructuredContent on runtime.Unstructured that allows -// items to be changed. +// the Object field. Items always overwrites overlay. func (u *UnstructuredList) UnstructuredContent() map[string]interface{} { - out := u.Object - if out == nil { - out = make(map[string]interface{}) + out := make(map[string]interface{}, len(u.Object)+1) + + // shallow copy every property + for k, v := range u.Object { + out[k] = v } + items := make([]interface{}, len(u.Items)) for i, item := range u.Items { - items[i] = item.Object + items[i] = item.UnstructuredContent() } out["items"] = items return out diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go new file mode 100644 index 000000000..4a03fff65 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructured_test.go @@ -0,0 +1,162 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unstructured_test + +import ( + "math/rand" + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + + "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" + "k8s.io/apimachinery/pkg/api/equality" + metafuzzer "k8s.io/apimachinery/pkg/apis/meta/fuzzer" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/util/diff" +) + +func TestNilUnstructuredContent(t *testing.T) { + var u unstructured.Unstructured + uCopy := u.DeepCopy() + content := u.UnstructuredContent() + expContent := make(map[string]interface{}) + assert.EqualValues(t, expContent, content) + assert.Equal(t, uCopy, &u) +} + +// TestUnstructuredMetadataRoundTrip checks that metadata accessors +// correctly set the metadata for unstructured objects. +// First, it fuzzes an empty ObjectMeta and sets this value as the metadata for an unstructured object. +// Next, it uses metadata accessor methods to set these fuzzed values to another unstructured object. +// Finally, it checks that both the unstructured objects are equal. +func TestUnstructuredMetadataRoundTrip(t *testing.T) { + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + seed := rand.Int63() + fuzzer := fuzzer.FuzzerFor(metafuzzer.Funcs, rand.NewSource(seed), codecs) + + N := 1000 + for i := 0; i < N; i++ { + u := &unstructured.Unstructured{Object: map[string]interface{}{}} + uCopy := u.DeepCopy() + metadata := &metav1.ObjectMeta{} + fuzzer.Fuzz(metadata) + + if err := setObjectMeta(u, metadata); err != nil { + t.Fatalf("unexpected error setting fuzzed ObjectMeta: %v", err) + } + setObjectMetaUsingAccessors(u, uCopy) + + // TODO: remove this special casing when creationTimestamp becomes a pointer. + // Right now, creationTimestamp is a struct (metav1.Time) so omitempty holds no meaning for it. + // However, the current behaviour is to remove the field if it holds an empty struct. + // This special casing exists here because custom marshallers for metav1.Time marshal + // an empty value to "null", which gets converted to nil when converting to an unstructured map by "ToUnstructured". + if err := unstructured.SetNestedField(uCopy.UnstructuredContent(), nil, "metadata", "creationTimestamp"); err != nil { + t.Fatalf("unexpected error setting creationTimestamp as nil: %v", err) + } + + if !equality.Semantic.DeepEqual(u, uCopy) { + t.Errorf("diff: %v", diff.ObjectReflectDiff(u, uCopy)) + } + } +} + +// TestUnstructuredMetadataOmitempty checks that ObjectMeta omitempty +// semantics are enforced for unstructured objects. +// The fuzzing test above should catch these cases but this is here just to be safe. +// Example: the metadata.clusterName field has the omitempty json tag +// so if it is set to it's zero value (""), it should be removed from the metadata map. +func TestUnstructuredMetadataOmitempty(t *testing.T) { + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + seed := rand.Int63() + fuzzer := fuzzer.FuzzerFor(metafuzzer.Funcs, rand.NewSource(seed), codecs) + + // fuzz to make sure we don't miss any function calls below + u := &unstructured.Unstructured{Object: map[string]interface{}{}} + metadata := &metav1.ObjectMeta{} + fuzzer.Fuzz(metadata) + if err := setObjectMeta(u, metadata); err != nil { + t.Fatalf("unexpected error setting fuzzed ObjectMeta: %v", err) + } + + // set zero values for all fields in metadata explicitly + // to check that omitempty fields having zero values are never set + u.SetName("") + u.SetGenerateName("") + u.SetNamespace("") + u.SetSelfLink("") + u.SetUID("") + u.SetResourceVersion("") + u.SetGeneration(0) + u.SetCreationTimestamp(metav1.Time{}) + u.SetDeletionTimestamp(nil) + u.SetDeletionGracePeriodSeconds(nil) + u.SetLabels(nil) + u.SetAnnotations(nil) + u.SetOwnerReferences(nil) + u.SetInitializers(nil) + u.SetFinalizers(nil) + u.SetClusterName("") + + gotMetadata, _, err := unstructured.NestedFieldNoCopy(u.UnstructuredContent(), "metadata") + if err != nil { + t.Error(err) + } + emptyMetadata := make(map[string]interface{}) + + if !reflect.DeepEqual(gotMetadata, emptyMetadata) { + t.Errorf("expected %v, got %v", emptyMetadata, gotMetadata) + } +} + +func setObjectMeta(u *unstructured.Unstructured, objectMeta *metav1.ObjectMeta) error { + if objectMeta == nil { + unstructured.RemoveNestedField(u.UnstructuredContent(), "metadata") + return nil + } + metadata, err := runtime.DefaultUnstructuredConverter.ToUnstructured(objectMeta) + if err != nil { + return err + } + u.UnstructuredContent()["metadata"] = metadata + return nil +} + +func setObjectMetaUsingAccessors(u, uCopy *unstructured.Unstructured) { + uCopy.SetName(u.GetName()) + uCopy.SetGenerateName(u.GetGenerateName()) + uCopy.SetNamespace(u.GetNamespace()) + uCopy.SetSelfLink(u.GetSelfLink()) + uCopy.SetUID(u.GetUID()) + uCopy.SetResourceVersion(u.GetResourceVersion()) + uCopy.SetGeneration(u.GetGeneration()) + uCopy.SetCreationTimestamp(u.GetCreationTimestamp()) + uCopy.SetDeletionTimestamp(u.GetDeletionTimestamp()) + uCopy.SetDeletionGracePeriodSeconds(u.GetDeletionGracePeriodSeconds()) + uCopy.SetLabels(u.GetLabels()) + uCopy.SetAnnotations(u.GetAnnotations()) + uCopy.SetOwnerReferences(u.GetOwnerReferences()) + uCopy.SetInitializers(u.GetInitializers()) + uCopy.SetFinalizers(u.GetFinalizers()) + uCopy.SetClusterName(u.GetClusterName()) +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme/scheme.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme/scheme.go new file mode 100644 index 000000000..ab2574e82 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/unstructuredscheme/scheme.go @@ -0,0 +1,129 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package unstructuredscheme + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/runtime/serializer/versioning" +) + +var ( + scheme = runtime.NewScheme() + codecs = serializer.NewCodecFactory(scheme) +) + +// NewUnstructuredNegotiatedSerializer returns a simple, negotiated serializer +func NewUnstructuredNegotiatedSerializer() runtime.NegotiatedSerializer { + return unstructuredNegotiatedSerializer{ + scheme: scheme, + typer: NewUnstructuredObjectTyper(), + creator: NewUnstructuredCreator(), + } +} + +type unstructuredNegotiatedSerializer struct { + scheme *runtime.Scheme + typer runtime.ObjectTyper + creator runtime.ObjectCreater +} + +func (s unstructuredNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { + return []runtime.SerializerInfo{ + { + MediaType: "application/json", + EncodesAsText: true, + Serializer: json.NewSerializer(json.DefaultMetaFactory, s.creator, s.typer, false), + PrettySerializer: json.NewSerializer(json.DefaultMetaFactory, s.creator, s.typer, true), + StreamSerializer: &runtime.StreamSerializerInfo{ + EncodesAsText: true, + Serializer: json.NewSerializer(json.DefaultMetaFactory, s.creator, s.typer, false), + Framer: json.Framer, + }, + }, + { + MediaType: "application/yaml", + EncodesAsText: true, + Serializer: json.NewYAMLSerializer(json.DefaultMetaFactory, s.creator, s.typer), + }, + } +} + +func (s unstructuredNegotiatedSerializer) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { + return versioning.NewDefaultingCodecForScheme(s.scheme, encoder, nil, gv, nil) +} + +func (s unstructuredNegotiatedSerializer) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { + return versioning.NewDefaultingCodecForScheme(s.scheme, nil, decoder, nil, gv) +} + +type unstructuredObjectTyper struct { +} + +// NewUnstructuredObjectTyper returns an object typer that can deal with unstructured things +func NewUnstructuredObjectTyper() runtime.ObjectTyper { + return unstructuredObjectTyper{} +} + +func (t unstructuredObjectTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { + // Delegate for things other than Unstructured. + if _, ok := obj.(runtime.Unstructured); !ok { + return nil, false, fmt.Errorf("cannot type %T", obj) + } + gvk := obj.GetObjectKind().GroupVersionKind() + if len(gvk.Kind) == 0 { + return nil, false, runtime.NewMissingKindErr("object has no kind field ") + } + if len(gvk.Version) == 0 { + return nil, false, runtime.NewMissingVersionErr("object has no apiVersion field") + } + + return []schema.GroupVersionKind{obj.GetObjectKind().GroupVersionKind()}, false, nil +} + +func (t unstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { + return true +} + +type unstructuredCreator struct{} + +// NewUnstructuredCreator returns a simple object creator that always returns an unstructured +func NewUnstructuredCreator() runtime.ObjectCreater { + return unstructuredCreator{} +} + +func (c unstructuredCreator) New(kind schema.GroupVersionKind) (runtime.Object, error) { + ret := &unstructured.Unstructured{} + ret.SetGroupVersionKind(kind) + return ret, nil +} + +type unstructuredDefaulter struct { +} + +// NewUnstructuredDefaulter returns defaulter suitable for unstructured types that doesn't default anything +func NewUnstructuredDefaulter() runtime.ObjectDefaulter { + return unstructuredDefaulter{} +} + +func (d unstructuredDefaulter) Default(in runtime.Object) { +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go index e3bae45ec..9a9f25e8f 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package unstructured @@ -35,9 +35,8 @@ func (in *Unstructured) DeepCopyInto(out *Unstructured) { func (in *Unstructured) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -51,7 +50,6 @@ func (in *UnstructuredList) DeepCopyInto(out *UnstructuredList) { func (in *UnstructuredList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/BUILD b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/BUILD deleted file mode 100644 index 436ae33a5..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["validation_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1/validation", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["validation.go"], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1/validation", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go index 26c5a0cdc..81f86fb30 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation.go @@ -17,9 +17,8 @@ limitations under the License. package validation import ( - "fmt" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" ) @@ -78,13 +77,32 @@ func ValidateLabels(labels map[string]string, fldPath *field.Path) field.ErrorLi func ValidateDeleteOptions(options *metav1.DeleteOptions) field.ErrorList { allErrs := field.ErrorList{} if options.OrphanDependents != nil && options.PropagationPolicy != nil { - allErrs = append(allErrs, field.Invalid(field.NewPath(""), options, "OrphanDependents and DeletionPropagation cannot be both set")) + allErrs = append(allErrs, field.Invalid(field.NewPath("propagationPolicy"), options.PropagationPolicy, "orphanDependents and deletionPropagation cannot be both set")) } if options.PropagationPolicy != nil && *options.PropagationPolicy != metav1.DeletePropagationForeground && *options.PropagationPolicy != metav1.DeletePropagationBackground && *options.PropagationPolicy != metav1.DeletePropagationOrphan { - allErrs = append(allErrs, field.Invalid(field.NewPath(""), options, fmt.Sprintf("DeletionPropagation need to be one of %q, %q, %q or nil", metav1.DeletePropagationForeground, metav1.DeletePropagationBackground, metav1.DeletePropagationOrphan))) + allErrs = append(allErrs, field.NotSupported(field.NewPath("propagationPolicy"), options.PropagationPolicy, []string{string(metav1.DeletePropagationForeground), string(metav1.DeletePropagationBackground), string(metav1.DeletePropagationOrphan), "nil"})) + } + allErrs = append(allErrs, validateDryRun(field.NewPath("dryRun"), options.DryRun)...) + return allErrs +} + +func ValidateCreateOptions(options *metav1.CreateOptions) field.ErrorList { + return validateDryRun(field.NewPath("dryRun"), options.DryRun) +} + +func ValidateUpdateOptions(options *metav1.UpdateOptions) field.ErrorList { + return validateDryRun(field.NewPath("dryRun"), options.DryRun) +} + +var allowedDryRunValues = sets.NewString(metav1.DryRunAll) + +func validateDryRun(fldPath *field.Path, dryRun []string) field.ErrorList { + allErrs := field.ErrorList{} + if !allowedDryRunValues.HasAll(dryRun...) { + allErrs = append(allErrs, field.NotSupported(fldPath, dryRun, allowedDryRunValues.List())) } return allErrs } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go index 9766fa7e7..a7046a548 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/validation/validation_test.go @@ -17,6 +17,7 @@ limitations under the License. package validation import ( + "fmt" "strings" "testing" @@ -92,3 +93,35 @@ func TestValidateLabels(t *testing.T) { } } } + +func TestValidDryRun(t *testing.T) { + tests := [][]string{ + {}, + {"All"}, + {"All", "All"}, + } + + for _, test := range tests { + t.Run(fmt.Sprintf("%v", test), func(t *testing.T) { + if errs := validateDryRun(field.NewPath("dryRun"), test); len(errs) != 0 { + t.Errorf("%v should be a valid dry-run value: %v", test, errs) + } + }) + } +} + +func TestInvalidDryRun(t *testing.T) { + tests := [][]string{ + {"False"}, + {"All", "False"}, + } + + for _, test := range tests { + t.Run(fmt.Sprintf("%v", test), func(t *testing.T) { + if len(validateDryRun(field.NewPath("dryRun"), test)) == 0 { + t.Errorf("%v shouldn't be a valid dry-run value", test) + } + }) + } + +} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go index b7ec50318..58f077380 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/watch.go @@ -39,7 +39,7 @@ type WatchEvent struct { Object runtime.RawExtension `json:"object" protobuf:"bytes,2,opt,name=object"` } -func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *WatchEvent, s conversion.Scope) error { +func Convert_watch_Event_To_v1_WatchEvent(in *watch.Event, out *WatchEvent, s conversion.Scope) error { out.Type = string(in.Type) switch t := in.Object.(type) { case *runtime.Unknown: @@ -52,11 +52,11 @@ func Convert_watch_Event_to_versioned_Event(in *watch.Event, out *WatchEvent, s return nil } -func Convert_versioned_InternalEvent_to_versioned_Event(in *InternalEvent, out *WatchEvent, s conversion.Scope) error { - return Convert_watch_Event_to_versioned_Event((*watch.Event)(in), out, s) +func Convert_v1_InternalEvent_To_v1_WatchEvent(in *InternalEvent, out *WatchEvent, s conversion.Scope) error { + return Convert_watch_Event_To_v1_WatchEvent((*watch.Event)(in), out, s) } -func Convert_versioned_Event_to_watch_Event(in *WatchEvent, out *watch.Event, s conversion.Scope) error { +func Convert_v1_WatchEvent_To_watch_Event(in *WatchEvent, out *watch.Event, s conversion.Scope) error { out.Type = watch.EventType(in.Type) if in.Object.Object != nil { out.Object = in.Object.Object @@ -70,8 +70,8 @@ func Convert_versioned_Event_to_watch_Event(in *WatchEvent, out *watch.Event, s return nil } -func Convert_versioned_Event_to_versioned_InternalEvent(in *WatchEvent, out *InternalEvent, s conversion.Scope) error { - return Convert_versioned_Event_to_watch_Event(in, (*watch.Event)(out), s) +func Convert_v1_WatchEvent_To_v1_InternalEvent(in *WatchEvent, out *InternalEvent, s conversion.Scope) error { + return Convert_v1_WatchEvent_To_watch_Event(in, (*watch.Event)(out), s) } // InternalEvent makes watch.Event versioned diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go index 2aa209025..10845993e 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -57,9 +57,8 @@ func (in *APIGroup) DeepCopy() *APIGroup { func (in *APIGroup) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -90,9 +89,8 @@ func (in *APIGroupList) DeepCopy() *APIGroupList { func (in *APIGroupList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -154,9 +152,8 @@ func (in *APIResourceList) DeepCopy() *APIResourceList { func (in *APIResourceList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -190,9 +187,38 @@ func (in *APIVersions) DeepCopy() *APIVersions { func (in *APIVersions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CreateOptions) DeepCopyInto(out *CreateOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CreateOptions. +func (in *CreateOptions) DeepCopy() *CreateOptions { + if in == nil { return nil } + out := new(CreateOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CreateOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -201,39 +227,28 @@ func (in *DeleteOptions) DeepCopyInto(out *DeleteOptions) { out.TypeMeta = in.TypeMeta if in.GracePeriodSeconds != nil { in, out := &in.GracePeriodSeconds, &out.GracePeriodSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.Preconditions != nil { in, out := &in.Preconditions, &out.Preconditions - if *in == nil { - *out = nil - } else { - *out = new(Preconditions) - (*in).DeepCopyInto(*out) - } + *out = new(Preconditions) + (*in).DeepCopyInto(*out) } if in.OrphanDependents != nil { in, out := &in.OrphanDependents, &out.OrphanDependents - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.PropagationPolicy != nil { in, out := &in.PropagationPolicy, &out.PropagationPolicy - if *in == nil { - *out = nil - } else { - *out = new(DeletionPropagation) - **out = **in - } + *out = new(DeletionPropagation) + **out = **in + } + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) } return } @@ -252,9 +267,8 @@ func (in *DeleteOptions) DeepCopy() *DeleteOptions { func (in *DeleteOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -294,9 +308,8 @@ func (in *ExportOptions) DeepCopy() *ExportOptions { func (in *ExportOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -320,9 +333,8 @@ func (in *GetOptions) DeepCopy() *GetOptions { func (in *GetOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -447,12 +459,8 @@ func (in *Initializers) DeepCopyInto(out *Initializers) { } if in.Result != nil { in, out := &in.Result, &out.Result - if *in == nil { - *out = nil - } else { - *out = new(Status) - (*in).DeepCopyInto(*out) - } + *out = new(Status) + (*in).DeepCopyInto(*out) } return } @@ -470,9 +478,7 @@ func (in *Initializers) DeepCopy() *Initializers { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InternalEvent) DeepCopyInto(out *InternalEvent) { *out = *in - if in.Object == nil { - out.Object = nil - } else { + if in.Object != nil { out.Object = in.Object.DeepCopyObject() } return @@ -568,9 +574,8 @@ func (in *List) DeepCopy() *List { func (in *List) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -595,12 +600,8 @@ func (in *ListOptions) DeepCopyInto(out *ListOptions) { out.TypeMeta = in.TypeMeta if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } return } @@ -619,9 +620,8 @@ func (in *ListOptions) DeepCopy() *ListOptions { func (in *ListOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MicroTime. @@ -640,21 +640,12 @@ func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { in.CreationTimestamp.DeepCopyInto(&out.CreationTimestamp) if in.DeletionTimestamp != nil { in, out := &in.DeletionTimestamp, &out.DeletionTimestamp - if *in == nil { - *out = nil - } else { - *out = new(Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } if in.DeletionGracePeriodSeconds != nil { in, out := &in.DeletionGracePeriodSeconds, &out.DeletionGracePeriodSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.Labels != nil { in, out := &in.Labels, &out.Labels @@ -679,12 +670,8 @@ func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { } if in.Initializers != nil { in, out := &in.Initializers, &out.Initializers - if *in == nil { - *out = nil - } else { - *out = new(Initializers) - (*in).DeepCopyInto(*out) - } + *out = new(Initializers) + (*in).DeepCopyInto(*out) } if in.Finalizers != nil { in, out := &in.Finalizers, &out.Finalizers @@ -709,21 +696,13 @@ func (in *OwnerReference) DeepCopyInto(out *OwnerReference) { *out = *in if in.Controller != nil { in, out := &in.Controller, &out.Controller - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.BlockOwnerDeletion != nil { in, out := &in.BlockOwnerDeletion, &out.BlockOwnerDeletion - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } return } @@ -759,12 +738,8 @@ func (in *Preconditions) DeepCopyInto(out *Preconditions) { *out = *in if in.UID != nil { in, out := &in.UID, &out.UID - if *in == nil { - *out = nil - } else { - *out = new(types.UID) - **out = **in - } + *out = new(types.UID) + **out = **in } return } @@ -823,12 +798,8 @@ func (in *Status) DeepCopyInto(out *Status) { out.ListMeta = in.ListMeta if in.Details != nil { in, out := &in.Details, &out.Details - if *in == nil { - *out = nil - } else { - *out = new(StatusDetails) - (*in).DeepCopyInto(*out) - } + *out = new(StatusDetails) + (*in).DeepCopyInto(*out) } return } @@ -847,9 +818,8 @@ func (in *Status) DeepCopy() *Status { func (in *Status) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -915,6 +885,56 @@ func (in *Timestamp) DeepCopy() *Timestamp { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *UpdateOptions) DeepCopyInto(out *UpdateOptions) { + *out = *in + out.TypeMeta = in.TypeMeta + if in.DryRun != nil { + in, out := &in.DryRun, &out.DryRun + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpdateOptions. +func (in *UpdateOptions) DeepCopy() *UpdateOptions { + if in == nil { + return nil + } + out := new(UpdateOptions) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *UpdateOptions) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Verbs) DeepCopyInto(out *Verbs) { + { + in := &in + *out = make(Verbs, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Verbs. +func (in Verbs) DeepCopy() Verbs { + if in == nil { + return nil + } + out := new(Verbs) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WatchEvent) DeepCopyInto(out *WatchEvent) { *out = *in @@ -936,7 +956,6 @@ func (in *WatchEvent) DeepCopy() *WatchEvent { func (in *WatchEvent) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go index 88d7af085..cce2e603a 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/BUILD b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/BUILD deleted file mode 100644 index 05f33c5b4..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "deepcopy.go", - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "types_swagger_doc_generated.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apimachinery/pkg/apis/meta/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go index 2dd440bb7..3b2bedd92 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/deepcopy.go @@ -16,6 +16,8 @@ limitations under the License. package v1beta1 +import "k8s.io/apimachinery/pkg/runtime" + func (in *TableRow) DeepCopy() *TableRow { if in == nil { return nil @@ -26,7 +28,7 @@ func (in *TableRow) DeepCopy() *TableRow { if in.Cells != nil { out.Cells = make([]interface{}, len(in.Cells)) for i := range in.Cells { - out.Cells[i] = deepCopyJSON(in.Cells[i]) + out.Cells[i] = runtime.DeepCopyJSONValue(in.Cells[i]) } } @@ -40,22 +42,3 @@ func (in *TableRow) DeepCopy() *TableRow { in.Object.DeepCopyInto(&out.Object) return out } - -func deepCopyJSON(x interface{}) interface{} { - switch x := x.(type) { - case map[string]interface{}: - clone := make(map[string]interface{}, len(x)) - for k, v := range x { - clone[k] = deepCopyJSON(v) - } - return clone - case []interface{}: - clone := make([]interface{}, len(x)) - for i := range x { - clone[i] = deepCopyJSON(x[i]) - } - return clone - default: - return x - } -} diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go index dda05bea4..fe3df6916 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -604,30 +604,29 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 391 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbd, 0x6e, 0xd4, 0x40, - 0x10, 0xc7, 0xbd, 0x42, 0x11, 0x64, 0x43, 0x1a, 0x23, 0xa4, 0x70,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 0x00, + // 375 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcd, 0x0a, 0xd3, 0x40, + 0x10, 0xc7, 0xb3, 0x48, 0xd1, 0x6e, 0xed, 0x25, 0x22, 0xd4, 0x1e, 0x36, 0xa5, 0xa7, 0x0a, 0x76, + 0xd7, 0x16, 0x11, 0x8f, 0x92, 0x5b, 0x41, 0x69, 0x09, 0x9e, 0x3c, 0xb9, 0x49, 0xc6, 0x74, 0xcd, + 0xc7, 0x86, 0xec, 0xa6, 0xd0, 0x8b, 0xf8, 0x08, 0x3e, 0x56, 0x8f, 0x3d, 0xf6, 0x14, 0x6c, 0x7c, + 0x0b, 0x4f, 0x92, 0x0f, 0xec, 0x87, 0x15, 0x7b, 0x9b, 0xf9, 0x0f, 0xbf, 0x5f, 0x66, 0xb2, 0xd8, + 0x09, 0xdf, 0x28, 0x2a, 0x24, 0x0b, 0x73, 0x17, 0xb2, 0x04, 0x34, 0x28, 0xb6, 0x81, 0xc4, 0x97, + 0x19, 0x6b, 0x07, 0x3c, 0x15, 0x31, 0xf7, 0xd6, 0x22, 0x81, 0x6c, 0xcb, 0xd2, 0x30, 0xa8, 0x02, + 0xc5, 0x62, 0xd0, 0x9c, 0x6d, 0x66, 0x2e, 0x68, 0x3e, 0x63, 0x01, 0x24, 0x90, 0x71, 0x0d, 0x3e, + 0x4d, 0x33, 0xa9, 0xa5, 0xf9, 0xbc, 0x41, 0xe9, 0x39, 0x4a, 0xd3, 0x30, 0xa8, 0x02, 0x45, 0x2b, + 0x94, 0xb6, 0xe8, 0x70, 0x1a, 0x08, 0xbd, 0xce, 0x5d, 0xea, 0xc9, 0x98, 0x05, 0x32, 0x90, 0xac, + 0x36, 0xb8, 0xf9, 0xe7, 0xba, 0xab, 0x9b, 0xba, 0x6a, 0xcc, 0xc3, 0x57, 0xf7, 0x2c, 0x75, 0xbd, + 0xcf, 0xf0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0xb6, 0xab, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xf3, + 0xe1, 0xde, 0x86, 0xdb, 0x02, 0x00, 0x00, } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto index a9060bf96..83be99790 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.apimachinery.pkg.apis.meta.v1beta1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go index 7b7c47d82..344c533e1 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types.go @@ -66,8 +66,8 @@ type TableColumnDefinition struct { // TableRow is an individual row in a table. // +protobuf=false type TableRow struct { - // cells will be as wide as headers and may contain strings, numbers, booleans, simple maps, or lists, or - // null. See the type field of the column definition for a more detailed description. + // cells will be as wide as headers and may contain strings, numbers (float64 or int64), booleans, simple + // maps, or lists, or null. See the type field of the column definition for a more detailed description. Cells []interface{} `json:"cells"` // conditions describe additional status of a row that are relevant for a human user. // +optional diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go index 2680fbf7e..7394535d9 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2016 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ package v1beta1 // // Those methods can be generated by using hack/update-generated-swagger-docs.sh -// AUTO-GENERATED FUNCTIONS START HERE +// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_PartialObjectMetadata = map[string]string{ "": "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", @@ -80,7 +80,7 @@ func (TableOptions) SwaggerDoc() map[string]string { var map_TableRow = map[string]string{ "": "TableRow is an individual row in a table.", - "cells": "cells will be as wide as headers and may contain strings, numbers, booleans, simple maps, or lists, or null. See the type field of the column definition for a more detailed description.", + "cells": "cells will be as wide as headers and may contain strings, numbers (float64 or int64), booleans, simple maps, or lists, or null. See the type field of the column definition for a more detailed description.", "conditions": "conditions describe additional status of a row that are relevant for a human user.", "object": "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing.", } diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go index a1f58daa3..b77db1b15 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 @@ -46,9 +46,8 @@ func (in *PartialObjectMetadata) DeepCopy() *PartialObjectMetadata { func (in *PartialObjectMetadata) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -59,11 +58,10 @@ func (in *PartialObjectMetadataList) DeepCopyInto(out *PartialObjectMetadataList in, out := &in.Items, &out.Items *out = make([]*PartialObjectMetadata, len(*in)) for i := range *in { - if (*in)[i] == nil { - (*out)[i] = nil - } else { - (*out)[i] = new(PartialObjectMetadata) - (*in)[i].DeepCopyInto((*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(PartialObjectMetadata) + (*in).DeepCopyInto(*out) } } } @@ -84,9 +82,8 @@ func (in *PartialObjectMetadataList) DeepCopy() *PartialObjectMetadataList { func (in *PartialObjectMetadataList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -123,9 +120,8 @@ func (in *Table) DeepCopy() *Table { func (in *Table) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -165,9 +161,8 @@ func (in *TableOptions) DeepCopy() *TableOptions { func (in *TableOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go index b61dda74c..73e63fc11 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go +++ b/deps/k8s.io/apimachinery/pkg/apis/meta/v1beta1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/BUILD b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/BUILD deleted file mode 100644 index 817a0e6ad..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/apis/testapigroup", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/install:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/apis/testapigroup/v1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/BUILD b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/BUILD deleted file mode 100644 index 0f2994c19..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["fuzzer.go"], - importpath = "k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/fuzzer.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/fuzzer.go index a6b93b037..26d7ddd88 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/fuzzer.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer/fuzzer.go @@ -21,8 +21,8 @@ import ( "github.com/google/gofuzz" - apitesting "k8s.io/apimachinery/pkg/api/testing" - "k8s.io/apimachinery/pkg/api/testing/fuzzer" + apitesting "k8s.io/apimachinery/pkg/api/apitesting" + "k8s.io/apimachinery/pkg/api/apitesting/fuzzer" "k8s.io/apimachinery/pkg/apis/testapigroup" "k8s.io/apimachinery/pkg/apis/testapigroup/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/BUILD b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/BUILD deleted file mode 100644 index b2107d46f..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["install.go"], - importpath = "k8s.io/apimachinery/pkg/apis/testapigroup/install", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["roundtrip_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/apis/testapigroup/install", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/testing/roundtrip:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/install.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/install.go index c7ada70f9..6fc079f51 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/install.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/install.go @@ -19,25 +19,15 @@ limitations under the License. package install import ( - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/apis/testapigroup" "k8s.io/apimachinery/pkg/apis/testapigroup/v1" "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - if err := announced.NewGroupMetaFactory( - &announced.GroupMetaFactoryArgs{ - GroupName: testapigroup.GroupName, - VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version}, - AddInternalObjectsToScheme: testapigroup.AddToScheme, - }, - announced.VersionToSchemeFunc{ - v1.SchemeGroupVersion.Version: v1.AddToScheme, - }, - ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { - panic(err) - } +func Install(scheme *runtime.Scheme) { + utilruntime.Must(testapigroup.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) } diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/roundtrip_test.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/roundtrip_test.go index da1a9c8ad..7ad4986b5 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/roundtrip_test.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/install/roundtrip_test.go @@ -19,7 +19,7 @@ package install import ( "testing" - "k8s.io/apimachinery/pkg/api/testing/roundtrip" + "k8s.io/apimachinery/pkg/api/apitesting/roundtrip" testapigroupfuzzer "k8s.io/apimachinery/pkg/apis/testapigroup/fuzzer" ) diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/BUILD b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/BUILD deleted file mode 100644 index 881684426..000000000 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/BUILD +++ /dev/null @@ -1,50 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "defaults.go", - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apimachinery/pkg/apis/testapigroup/v1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go index 4ad2352e5..5fd3c3f97 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -1938,72 +1938,71 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1062 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x6e, 0xdb, 0xc6, - 0x13, 0x36, 0x2d, 0xc9, 0x96, 0xd6, 0x56, 0x62, 0x6f, 0x62, 0x80, 0x3f, 0x03, 0x91, 0x1c, 0x1f, - 0x0c, 0xff, 0x8a, 0x94, 0x8c, 0xdd, 0x26, 0x70, 0x9b, 0x43, 0x11, 0xda, 0x45, 0xed, 0xc2, 0x71, - 0x84, 0x95, 0x8b, 0x14, 0x45, 0x0f, 0x59, 0x51, 0x53, 0x99, 0x95, 0xc8, 0x25, 0x76, 0x97, 0x2a, - 0x74, 0x2b, 0xfa, 0x04, 0x7d, 0x88, 0xde, 0x7a, 0xee, 0x03, 0xf4, 0x50, 0xc0, 0xc7, 0x1c, 0x73, - 0x12, 0x6a, 0xf5, 0x2d, 0x7c, 0x2a, 0x76, 0xf9, 0x47, 0x94, 0xe5, 0xa8, 0x51, 0x6e, 0xdc, 0x99, - 0xef, 0xfb, 0x66, 0x76, 0x67, 0x38, 0x83, 0xbe, 0xe9, 0x1e, 0x08, 0xcb, 0x63, 0x76, 0x37, 0x6a, - 0x01, 0x0f, 0x40, 0x82, 0xb0, 0xfb, 0x10, 0xb4, 0x19, 0xb7, 0x13, 0x07, 0x0d, 0x3d, 0x9f, 0xba, - 0x17, 0x5e, 0x00, 0x7c, 0x60, 0x87, 0xdd, 0x8e, 0x32, 0x08, 0x5b, 0x82, 0x90, 0x34, 0xf4, 0x3a, - 0x9c, 0x45, 0xa1, 0xdd, 0xdf, 0xb3, 0x3b, 0x10, 0x00, 0xa7, 0x12, 0xda, 0x56, 0xc8, 0x99, 0x64, - 0xf8, 0x51, 0xcc, 0xb6, 0xf2, 0x6c, 0x2b, 0xec, 0x76, 0x94, 0x41, 0x58, 0x79, 0xb6, 0xd5, 0xdf, - 0xdb, 0xfc, 0xb8, 0xe3, 0x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, - 0x84, 0x48, 0xac, 0xb7, 0xfd, 0xd7, 0x72, 0x7c, 0x07, 0xd5, 0xf0, 0xf8, 0x14, 0x55, 0xb9, 0xa2, - 0x72, 0xd9, 0x60, 0x3d, 0xcf, 0x1d, 0xe8, 0x26, 0xa8, 0x38, 0x3b, 0x69, 0x61, 0x49, 0xde, 0x79, - 0x7d, 0xd3, 0x40, 0x26, 0xc9, 0xb8, 0x83, 0x1e, 0x48, 0xe0, 0xbe, 0x17, 0x50, 0x55, 0x84, 0xaf, - 0x38, 0x75, 0xa1, 0x01, 0xdc, 0x63, 0xed, 0x26, 0xb8, 0x2c, 0x68, 0x0b, 0x5d, 0xf4, 0x82, 0xf3, - 0x70, 0x34, 0xac, 0x3f, 0x38, 0x9f, 0x05, 0x24, 0xb3, 0x75, 0xf0, 0x4b, 0xb4, 0x41, 0x5d, 0xe9, - 0xf5, 0xe1, 0x08, 0x68, 0xbb, 0xe7, 0x05, 0x90, 0x06, 0x28, 0xe9, 0x00, 0xff, 0x1b, 0x0d, 0xeb, - 0x1b, 0xcf, 0x6f, 0x03, 0x90, 0xdb, 0x79, 0xf8, 0x17, 0x03, 0xad, 0x06, 0xac, 0x0d, 0x4d, 0xe8, - 0x81, 0x2b, 0x19, 0x37, 0x97, 0xf5, 0xab, 0x1f, 0x7f, 0xd8, 0x54, 0xb1, 0xce, 0x72, 0x52, 0x5f, - 0x06, 0x92, 0x0f, 0x9c, 0xfb, 0xc9, 0x8b, 0xae, 0xe6, 0x5d, 0x64, 0x22, 0x26, 0xfe, 0x1a, 0x61, - 0x01, 0xbc, 0xef, 0xb9, 0xf0, 0xdc, 0x75, 0x59, 0x14, 0xc8, 0x33, 0xea, 0x83, 0x59, 0xd6, 0x15, - 0xc9, 0x9a, 0xbf, 0x39, 0x85, 0x20, 0xb7, 0xb0, 0xf0, 0x31, 0xba, 0x33, 0x69, 0x35, 0x2b, 0x5a, - 0x67, 0x2b, 0xd1, 0x31, 0x8f, 0x20, 0xe4, 0xe0,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x14, 0x5e, 0x50, 0x91, - 0x6e, 0x90, 0xb4, 0x5f, 0x4a, 0x0d, 0x65, 0xbc, 0x1e, 0xd6, 0x2b, 0x0a, 0xab, 0x0f, 0x24, 0x06, - 0x62, 0x86, 0x90, 0x9b, 0xee, 0x86, 0x74, 0xcc, 0x3c, 0x9b, 0xbf, 0xe1, 0xb3, 0xfd, 0x32, 0xde, - 0xd7, 0x99, 0x49, 0x90, 0x5c, 0x88, 0xfc, 0xa0, 0x2d, 0xcc, 0x1e, 0xb4, 0xb9, 0xd9, 0x5d, 0x9c, - 0x39, 0xbb, 0x77, 0xd0, 0x52, 0x5c, 0xec, 0x9b, 0x33, 0x3e, 0xee, 0x05, 0x92, 0x78, 0x15, 0xce, - 0xa5, 0x3c, 0x3c, 0x69, 0x24, 0x23, 0x3e, 0xc3, 0x1d, 0x6a, 0x2b, 0x49, 0xbc, 0xf8, 0x15, 0xaa, - 0xe8, 0x81, 0xa6, 0x57, 0xd4, 0xf2, 0xdc, 0x2b, 0xaa, 0xaa, 0x7b, 0x25, 0x15, 0x20, 0x63, 0x2d, - 0x67, 0xf7, 0xf2, 0xaa, 0xb6, 0xf0, 0xe6, 0xaa, 0xb6, 0xf0, 0xf6, 0xaa, 0xb6, 0xf0, 0xf3, 0xa8, - 0x66, 0x5c, 0x8e, 0x6a, 0xc6, 0x9b, 0x51, 0xcd, 0x78, 0x3b, 0xaa, 0x19, 0x7f, 0x8f, 0x6a, 0xc6, - 0xaf, 0xff, 0xd4, 0x16, 0xbe, 0x5b, 0xec, 0xef, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xaa, - 0x9e, 0x7b, 0xcb, 0x0a, 0x00, 0x00, + // 1048 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xc1, 0x6e, 0xdb, 0x46, + 0x10, 0x35, 0x2d, 0xc9, 0x96, 0xd6, 0x56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 0x09, 0x91, 0x1d, 0xb4, 0xb9, 0xd9, 0x83, 0x36, 0x33, 0xbb, + 0xf3, 0x33, 0x67, 0xf7, 0x0e, 0x5a, 0x8a, 0x8b, 0x7d, 0x73, 0xc6, 0xc7, 0xbd, 0x40, 0x8c, 0x57, + 0xe1, 0x3c, 0xca, 0xa3, 0x93, 0xba, 0x19, 0xf1, 0x29, 0xee, 0x50, 0x5b, 0x89, 0xf1, 0xe2, 0x57, + 0xa8, 0xa4, 0x07, 0x9a, 0x5e, 0x51, 0xcb, 0x73, 0xaf, 0xa8, 0xb2, 0xee, 0x95, 0x44, 0x80, 0x8c, + 0xb5, 0xdc, 0xdd, 0xcb, 0xab, 0xca, 0xc2, 0x9b, 0xab, 0xca, 0xc2, 0xdb, 0xab, 0xca, 0xc2, 0x2f, + 0xa3, 0x8a, 0x75, 0x39, 0xaa, 0x58, 0x6f, 0x46, 0x15, 0xeb, 0xed, 0xa8, 0x62, 0xfd, 0x33, 0xaa, + 0x58, 0xbf, 0xfd, 0x5b, 0x59, 0xf8, 0x7e, 0xb1, 0xbf, 0xf7, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xd7, 0x22, 0x1b, 0x36, 0x96, 0x0a, 0x00, 0x00, } diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.proto b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.proto index 70f3408d9..0b058c5f7 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.proto +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ package k8s.io.apimachinery.pkg.apis.testapigroup.v1; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1"; diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.conversion.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.conversion.go index 67f5f803e..1df2cb338 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.conversion.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,14 +16,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1 import ( unsafe "unsafe" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" testapigroup "k8s.io/apimachinery/pkg/apis/testapigroup" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -35,19 +35,58 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1_Carp_To_testapigroup_Carp, - Convert_testapigroup_Carp_To_v1_Carp, - Convert_v1_CarpCondition_To_testapigroup_CarpCondition, - Convert_testapigroup_CarpCondition_To_v1_CarpCondition, - Convert_v1_CarpList_To_testapigroup_CarpList, - Convert_testapigroup_CarpList_To_v1_CarpList, - Convert_v1_CarpSpec_To_testapigroup_CarpSpec, - Convert_testapigroup_CarpSpec_To_v1_CarpSpec, - Convert_v1_CarpStatus_To_testapigroup_CarpStatus, - Convert_testapigroup_CarpStatus_To_v1_CarpStatus, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*Carp)(nil), (*testapigroup.Carp)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Carp_To_testapigroup_Carp(a.(*Carp), b.(*testapigroup.Carp), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*testapigroup.Carp)(nil), (*Carp)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_testapigroup_Carp_To_v1_Carp(a.(*testapigroup.Carp), b.(*Carp), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CarpCondition)(nil), (*testapigroup.CarpCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CarpCondition_To_testapigroup_CarpCondition(a.(*CarpCondition), b.(*testapigroup.CarpCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*testapigroup.CarpCondition)(nil), (*CarpCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_testapigroup_CarpCondition_To_v1_CarpCondition(a.(*testapigroup.CarpCondition), b.(*CarpCondition), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CarpList)(nil), (*testapigroup.CarpList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CarpList_To_testapigroup_CarpList(a.(*CarpList), b.(*testapigroup.CarpList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*testapigroup.CarpList)(nil), (*CarpList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_testapigroup_CarpList_To_v1_CarpList(a.(*testapigroup.CarpList), b.(*CarpList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CarpSpec)(nil), (*testapigroup.CarpSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CarpSpec_To_testapigroup_CarpSpec(a.(*CarpSpec), b.(*testapigroup.CarpSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*testapigroup.CarpSpec)(nil), (*CarpSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_testapigroup_CarpSpec_To_v1_CarpSpec(a.(*testapigroup.CarpSpec), b.(*CarpSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*CarpStatus)(nil), (*testapigroup.CarpStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_CarpStatus_To_testapigroup_CarpStatus(a.(*CarpStatus), b.(*testapigroup.CarpStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*testapigroup.CarpStatus)(nil), (*CarpStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_testapigroup_CarpStatus_To_v1_CarpStatus(a.(*testapigroup.CarpStatus), b.(*CarpStatus), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1_Carp_To_testapigroup_Carp(in *Carp, out *testapigroup.Carp, s conversion.Scope) error { @@ -201,7 +240,7 @@ func autoConvert_v1_CarpStatus_To_testapigroup_CarpStatus(in *CarpStatus, out *t out.Reason = in.Reason out.HostIP = in.HostIP out.CarpIP = in.CarpIP - out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime)) + out.StartTime = (*metav1.Time)(unsafe.Pointer(in.StartTime)) return nil } @@ -217,7 +256,7 @@ func autoConvert_testapigroup_CarpStatus_To_v1_CarpStatus(in *testapigroup.CarpS out.Reason = in.Reason out.HostIP = in.HostIP out.CarpIP = in.CarpIP - out.StartTime = (*meta_v1.Time)(unsafe.Pointer(in.StartTime)) + out.StartTime = (*metav1.Time)(unsafe.Pointer(in.StartTime)) return nil } diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.deepcopy.go index d10f8865a..d2948fbfc 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -49,9 +48,8 @@ func (in *Carp) DeepCopy() *Carp { func (in *Carp) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -101,9 +99,8 @@ func (in *CarpList) DeepCopy() *CarpList { func (in *CarpList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -111,21 +108,13 @@ func (in *CarpSpec) DeepCopyInto(out *CarpSpec) { *out = *in if in.TerminationGracePeriodSeconds != nil { in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.ActiveDeadlineSeconds != nil { in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector @@ -159,12 +148,7 @@ func (in *CarpStatus) DeepCopyInto(out *CarpStatus) { } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.defaults.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.defaults.go index 88d7af085..cce2e603a 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.defaults.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/v1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/zz_generated.deepcopy.go index 77a7bcae8..8f5fa374c 100644 --- a/deps/k8s.io/apimachinery/pkg/apis/testapigroup/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/apis/testapigroup/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,12 +16,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package testapigroup import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -49,9 +48,8 @@ func (in *Carp) DeepCopy() *Carp { func (in *Carp) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -101,9 +99,8 @@ func (in *CarpList) DeepCopy() *CarpList { func (in *CarpList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -111,21 +108,13 @@ func (in *CarpSpec) DeepCopyInto(out *CarpSpec) { *out = *in if in.TerminationGracePeriodSeconds != nil { in, out := &in.TerminationGracePeriodSeconds, &out.TerminationGracePeriodSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.ActiveDeadlineSeconds != nil { in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } + *out = new(int64) + **out = **in } if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector @@ -159,12 +148,7 @@ func (in *CarpStatus) DeepCopyInto(out *CarpStatus) { } if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - if *in == nil { - *out = nil - } else { - *out = new(v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } diff --git a/deps/k8s.io/apimachinery/pkg/conversion/BUILD b/deps/k8s.io/apimachinery/pkg/conversion/BUILD deleted file mode 100644 index 653418164..000000000 --- a/deps/k8s.io/apimachinery/pkg/conversion/BUILD +++ /dev/null @@ -1,50 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "converter_test.go", - "helper_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/conversion", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "converter.go", - "deep_equal.go", - "doc.go", - "helper.go", - ], - importpath = "k8s.io/apimachinery/pkg/conversion", - deps = ["//vendor/k8s.io/apimachinery/third_party/forked/golang/reflect:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/conversion/queryparams:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/conversion/converter.go b/deps/k8s.io/apimachinery/pkg/conversion/converter.go index 7854c207c..bc615dc3a 100644 --- a/deps/k8s.io/apimachinery/pkg/conversion/converter.go +++ b/deps/k8s.io/apimachinery/pkg/conversion/converter.go @@ -40,7 +40,11 @@ type NameFunc func(t reflect.Type) string var DefaultNameFunc = func(t reflect.Type) string { return t.Name() } -type GenericConversionFunc func(a, b interface{}, scope Scope) (bool, error) +// ConversionFunc converts the object a into the object b, reusing arrays or objects +// or pointers if necessary. It should return an error if the object cannot be converted +// or if some data is invalid. If you do not wish a and b to share fields or nested +// objects, you must copy a before calling this function. +type ConversionFunc func(a, b interface{}, scope Scope) error // Converter knows how to convert one type to another. type Converter struct { @@ -49,11 +53,6 @@ type Converter struct { conversionFuncs ConversionFuncs generatedConversionFuncs ConversionFuncs - // genericConversions are called during normal conversion to offer a "fast-path" - // that avoids all reflection. These methods are not called outside of the .Convert() - // method. - genericConversions []GenericConversionFunc - // Set of conversions that should be treated as a no-op ignoredConversions map[typePair]struct{} @@ -98,14 +97,6 @@ func NewConverter(nameFn NameFunc) *Converter { return c } -// AddGenericConversionFunc adds a function that accepts the ConversionFunc call pattern -// (for two conversion types) to the converter. These functions are checked first during -// a normal conversion, but are otherwise not called. Use AddConversionFuncs when registering -// typed conversions. -func (c *Converter) AddGenericConversionFunc(fn GenericConversionFunc) { - c.genericConversions = append(c.genericConversions, fn) -} - // WithConversions returns a Converter that is a copy of c but with the additional // fns merged on top. func (c *Converter) WithConversions(fns ConversionFuncs) *Converter { @@ -161,11 +152,15 @@ type Scope interface { type FieldMappingFunc func(key string, sourceTag, destTag reflect.StructTag) (source string, dest string) func NewConversionFuncs() ConversionFuncs { - return ConversionFuncs{fns: make(map[typePair]reflect.Value)} + return ConversionFuncs{ + fns: make(map[typePair]reflect.Value), + untyped: make(map[typePair]ConversionFunc), + } } type ConversionFuncs struct { - fns map[typePair]reflect.Value + fns map[typePair]reflect.Value + untyped map[typePair]ConversionFunc } // Add adds the provided conversion functions to the lookup table - they must have the signature @@ -183,6 +178,21 @@ func (c ConversionFuncs) Add(fns ...interface{}) error { return nil } +// AddUntyped adds the provided conversion function to the lookup table for the types that are +// supplied as a and b. a and b must be pointers or an error is returned. This method overwrites +// previously defined functions. +func (c ConversionFuncs) AddUntyped(a, b interface{}, fn ConversionFunc) error { + tA, tB := reflect.TypeOf(a), reflect.TypeOf(b) + if tA.Kind() != reflect.Ptr { + return fmt.Errorf("the type %T must be a pointer to register as an untyped conversion", a) + } + if tB.Kind() != reflect.Ptr { + return fmt.Errorf("the type %T must be a pointer to register as an untyped conversion", b) + } + c.untyped[typePair{tA, tB}] = fn + return nil +} + // Merge returns a new ConversionFuncs that contains all conversions from // both other and c, with other conversions taking precedence. func (c ConversionFuncs) Merge(other ConversionFuncs) ConversionFuncs { @@ -193,6 +203,12 @@ func (c ConversionFuncs) Merge(other ConversionFuncs) ConversionFuncs { for k, v := range other.fns { merged.fns[k] = v } + for k, v := range c.untyped { + merged.untyped[k] = v + } + for k, v := range other.untyped { + merged.untyped[k] = v + } return merged } @@ -355,16 +371,32 @@ func verifyConversionFunctionSignature(ft reflect.Type) error { // // conversion logic... // return nil // }) +// DEPRECATED: Will be removed in favor of RegisterUntypedConversionFunc func (c *Converter) RegisterConversionFunc(conversionFunc interface{}) error { return c.conversionFuncs.Add(conversionFunc) } // Similar to RegisterConversionFunc, but registers conversion function that were // automatically generated. +// DEPRECATED: Will be removed in favor of RegisterGeneratedUntypedConversionFunc func (c *Converter) RegisterGeneratedConversionFunc(conversionFunc interface{}) error { return c.generatedConversionFuncs.Add(conversionFunc) } +// RegisterUntypedConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (c *Converter) RegisterUntypedConversionFunc(a, b interface{}, fn ConversionFunc) error { + return c.conversionFuncs.AddUntyped(a, b, fn) +} + +// RegisterGeneratedUntypedConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (c *Converter) RegisterGeneratedUntypedConversionFunc(a, b interface{}, fn ConversionFunc) error { + return c.generatedConversionFuncs.AddUntyped(a, b, fn) +} + // RegisterIgnoredConversion registers a "no-op" for conversion, where any requested // conversion between from and to is ignored. func (c *Converter) RegisterIgnoredConversion(from, to interface{}) error { @@ -380,39 +412,6 @@ func (c *Converter) RegisterIgnoredConversion(from, to interface{}) error { return nil } -// IsConversionIgnored returns true if the specified objects should be dropped during -// conversion. -func (c *Converter) IsConversionIgnored(inType, outType reflect.Type) bool { - _, found := c.ignoredConversions[typePair{inType, outType}] - return found -} - -func (c *Converter) HasConversionFunc(inType, outType reflect.Type) bool { - _, found := c.conversionFuncs.fns[typePair{inType, outType}] - return found -} - -func (c *Converter) ConversionFuncValue(inType, outType reflect.Type) (reflect.Value, bool) { - value, found := c.conversionFuncs.fns[typePair{inType, outType}] - return value, found -} - -// SetStructFieldCopy registers a correspondence. Whenever a struct field is encountered -// which has a type and name matching srcFieldType and srcFieldName, it wil be copied -// into the field in the destination struct matching destFieldType & Name, if such a -// field exists. -// May be called multiple times, even for the same source field & type--all applicable -// copies will be performed. -func (c *Converter) SetStructFieldCopy(srcFieldType interface{}, srcFieldName string, destFieldType interface{}, destFieldName string) error { - st := reflect.TypeOf(srcFieldType) - dt := reflect.TypeOf(destFieldType) - srcKey := typeNamePair{st, srcFieldName} - destKey := typeNamePair{dt, destFieldName} - c.structFieldDests[srcKey] = append(c.structFieldDests[srcKey], destKey) - c.structFieldSources[destKey] = append(c.structFieldSources[destKey], srcKey) - return nil -} - // RegisterInputDefaults registers a field name mapping function, used when converting // from maps to structs. Inputs to the conversion methods are checked for this type and a mapping // applied automatically if the input matches in. A set of default flags for the input conversion @@ -468,15 +467,6 @@ func (f FieldMatchingFlags) IsSet(flag FieldMatchingFlags) bool { // it is not used by Convert() other than storing it in the scope. // Not safe for objects with cyclic references! func (c *Converter) Convert(src, dest interface{}, flags FieldMatchingFlags, meta *Meta) error { - if len(c.genericConversions) > 0 { - // TODO: avoid scope allocation - s := &scope{converter: c, flags: flags, meta: meta} - for _, fn := range c.genericConversions { - if ok, err := fn(src, dest, s); ok { - return err - } - } - } return c.doConversion(src, dest, flags, meta, c.convert) } @@ -495,6 +485,21 @@ func (c *Converter) DefaultConvert(src, dest interface{}, flags FieldMatchingFla type conversionFunc func(sv, dv reflect.Value, scope *scope) error func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags, meta *Meta, f conversionFunc) error { + pair := typePair{reflect.TypeOf(src), reflect.TypeOf(dest)} + scope := &scope{ + converter: c, + flags: flags, + meta: meta, + } + if fn, ok := c.conversionFuncs.untyped[pair]; ok { + return fn(src, dest, scope) + } + if fn, ok := c.generatedConversionFuncs.untyped[pair]; ok { + return fn(src, dest, scope) + } + // TODO: consider everything past this point deprecated - we want to support only point to point top level + // conversions + dv, err := EnforcePtr(dest) if err != nil { return err @@ -506,15 +511,10 @@ func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags if err != nil { return err } - s := &scope{ - converter: c, - flags: flags, - meta: meta, - } // Leave something on the stack, so that calls to struct tag getters never fail. - s.srcStack.push(scopeStackElem{}) - s.destStack.push(scopeStackElem{}) - return f(sv, dv, s) + scope.srcStack.push(scopeStackElem{}) + scope.destStack.push(scopeStackElem{}) + return f(sv, dv, scope) } // callCustom calls 'custom' with sv & dv. custom must be a conversion function. diff --git a/deps/k8s.io/apimachinery/pkg/conversion/converter_test.go b/deps/k8s.io/apimachinery/pkg/conversion/converter_test.go index 5373c8098..924f69913 100644 --- a/deps/k8s.io/apimachinery/pkg/conversion/converter_test.go +++ b/deps/k8s.io/apimachinery/pkg/conversion/converter_test.go @@ -732,95 +732,3 @@ func TestConverter_flags(t *testing.T) { } } } - -func TestConverter_FieldRename(t *testing.T) { - type WeirdMeta struct { - Name string - Type string - } - type NameMeta struct { - Name string - } - type TypeMeta struct { - Type string - } - type A struct { - WeirdMeta - } - type B struct { - TypeMeta - NameMeta - } - - c := NewConverter(DefaultNameFunc) - err := c.SetStructFieldCopy(WeirdMeta{}, "WeirdMeta", TypeMeta{}, "TypeMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.SetStructFieldCopy(WeirdMeta{}, "WeirdMeta", NameMeta{}, "NameMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.SetStructFieldCopy(TypeMeta{}, "TypeMeta", WeirdMeta{}, "WeirdMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - err = c.SetStructFieldCopy(NameMeta{}, "NameMeta", WeirdMeta{}, "WeirdMeta") - if err != nil { - t.Fatalf("unexpected error %v", err) - } - c.Debug = testLogger(t) - - aVal := &A{ - WeirdMeta: WeirdMeta{ - Name: "Foo", - Type: "Bar", - }, - } - - bVal := &B{ - TypeMeta: TypeMeta{"Bar"}, - NameMeta: NameMeta{"Foo"}, - } - - table := map[string]struct { - from, to, expect interface{} - flags FieldMatchingFlags - }{ - "to": { - aVal, - &B{}, - bVal, - AllowDifferentFieldTypeNames | SourceToDest | IgnoreMissingFields, - }, - "from": { - bVal, - &A{}, - aVal, - AllowDifferentFieldTypeNames | SourceToDest, - }, - "toDestFirst": { - aVal, - &B{}, - bVal, - AllowDifferentFieldTypeNames, - }, - "fromDestFirst": { - bVal, - &A{}, - aVal, - AllowDifferentFieldTypeNames | IgnoreMissingFields, - }, - } - - for name, item := range table { - err := c.Convert(item.from, item.to, item.flags, nil) - if err != nil { - t.Errorf("%v: unexpected error: %v", name, err) - continue - } - if e, a := item.expect, item.to; !reflect.DeepEqual(e, a) { - t.Errorf("%v: unexpected diff: %v", name, diff.ObjectDiff(e, a)) - } - } -} diff --git a/deps/k8s.io/apimachinery/pkg/conversion/queryparams/BUILD b/deps/k8s.io/apimachinery/pkg/conversion/queryparams/BUILD deleted file mode 100644 index 8b871ab12..000000000 --- a/deps/k8s.io/apimachinery/pkg/conversion/queryparams/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "convert.go", - "doc.go", - ], - importpath = "k8s.io/apimachinery/pkg/conversion/queryparams", -) - -go_test( - name = "go_default_xtest", - srcs = ["convert_test.go"], - importpath = "k8s.io/apimachinery/pkg/conversion/queryparams_test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion/queryparams:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go b/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go index 17b366617..b3804aa42 100644 --- a/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go +++ b/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go @@ -174,6 +174,9 @@ func convertStruct(result url.Values, st reflect.Type, sv reflect.Value) { kind = ft.Kind() if !field.IsNil() { field = reflect.Indirect(field) + // If the field is non-nil, it should be added to params + // and the omitempty should be overwite to false + omitempty = false } } diff --git a/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go b/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go index b075debf1..1eed5e1fe 100644 --- a/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go +++ b/deps/k8s.io/apimachinery/pkg/conversion/queryparams/convert_test.go @@ -70,6 +70,7 @@ type childStructs struct { Follow bool `json:"follow,omitempty"` Previous bool `json:"previous,omitempty"` SinceSeconds *int64 `json:"sinceSeconds,omitempty"` + TailLines *int64 `json:"tailLines,omitempty"` SinceTime *metav1.Time `json:"sinceTime,omitempty"` EmptyTime *metav1.Time `json:"emptyTime"` NonPointerTime metav1.Time `json:"nonPointerTime"` @@ -99,6 +100,7 @@ func validateResult(t *testing.T, input interface{}, actual, expected url.Values func TestConvert(t *testing.T) { sinceSeconds := int64(123) + tailLines := int64(0) sinceTime := metav1.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC) tests := []struct { @@ -182,6 +184,7 @@ func TestConvert(t *testing.T) { Follow: true, Previous: true, SinceSeconds: &sinceSeconds, + TailLines: nil, SinceTime: &sinceTime, // test a custom marshaller EmptyTime: nil, // test a nil custom marshaller without omitempty NonPointerTime: sinceTime, @@ -194,10 +197,11 @@ func TestConvert(t *testing.T) { Follow: true, Previous: true, SinceSeconds: &sinceSeconds, + TailLines: &tailLines, SinceTime: nil, // test a nil custom marshaller with omitempty NonPointerTime: sinceTime, }, - expected: url.Values{"container": {"mycontainer"}, "follow": {"true"}, "previous": {"true"}, "sinceSeconds": {"123"}, "emptyTime": {""}, "nonPointerTime": {"2000-01-01T12:34:56Z"}}, + expected: url.Values{"container": {"mycontainer"}, "follow": {"true"}, "previous": {"true"}, "sinceSeconds": {"123"}, "tailLines": {"0"}, "emptyTime": {""}, "nonPointerTime": {"2000-01-01T12:34:56Z"}}, }, } diff --git a/deps/k8s.io/apimachinery/pkg/fields/BUILD b/deps/k8s.io/apimachinery/pkg/fields/BUILD deleted file mode 100644 index addb286a2..000000000 --- a/deps/k8s.io/apimachinery/pkg/fields/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "fields_test.go", - "selector_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/fields", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fields.go", - "requirements.go", - "selector.go", - ], - importpath = "k8s.io/apimachinery/pkg/fields", - deps = ["//vendor/k8s.io/apimachinery/pkg/selection:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/fields/selector.go b/deps/k8s.io/apimachinery/pkg/fields/selector.go index 3785d8c2f..e3e4453b6 100644 --- a/deps/k8s.io/apimachinery/pkg/fields/selector.go +++ b/deps/k8s.io/apimachinery/pkg/fields/selector.go @@ -55,6 +55,21 @@ type Selector interface { DeepCopySelector() Selector } +type nothingSelector struct{} + +func (n nothingSelector) Matches(_ Fields) bool { return false } +func (n nothingSelector) Empty() bool { return false } +func (n nothingSelector) String() string { return "" } +func (n nothingSelector) Requirements() Requirements { return nil } +func (n nothingSelector) DeepCopySelector() Selector { return n } +func (n nothingSelector) RequiresExactMatch(field string) (value string, found bool) { return "", false } +func (n nothingSelector) Transform(fn TransformFunc) (Selector, error) { return n, nil } + +// Nothing returns a selector that matches no fields +func Nothing() Selector { + return nothingSelector{} +} + // Everything returns a selector that matches all fields. func Everything() Selector { return andTerm{} @@ -449,6 +464,12 @@ func OneTermEqualSelector(k, v string) Selector { return &hasTerm{field: k, value: v} } +// OneTermNotEqualSelector returns an object that matches objects where one field/field does not equal one value. +// Cannot return an error. +func OneTermNotEqualSelector(k, v string) Selector { + return ¬HasTerm{field: k, value: v} +} + // AndSelectors creates a selector that is the logical AND of all the given selectors func AndSelectors(selectors ...Selector) Selector { return andTerm(selectors) diff --git a/deps/k8s.io/apimachinery/pkg/labels/BUILD b/deps/k8s.io/apimachinery/pkg/labels/BUILD deleted file mode 100644 index dc6af2643..000000000 --- a/deps/k8s.io/apimachinery/pkg/labels/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "labels_test.go", - "selector_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/labels", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/selection:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "labels.go", - "selector.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/labels", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/selection:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/labels/selector.go b/deps/k8s.io/apimachinery/pkg/labels/selector.go index b301b4284..374d2ef13 100644 --- a/deps/k8s.io/apimachinery/pkg/labels/selector.go +++ b/deps/k8s.io/apimachinery/pkg/labels/selector.go @@ -166,7 +166,6 @@ func NewRequirement(key string, op selection.Operator, vals []string) (*Requirem return nil, err } } - sort.Strings(vals) return &Requirement{key: key, operator: op, strValues: vals}, nil } @@ -299,7 +298,9 @@ func (r *Requirement) String() string { if len(r.strValues) == 1 { buffer.WriteString(r.strValues[0]) } else { // only > 1 since == 0 prohibited by NewRequirement - buffer.WriteString(strings.Join(r.strValues, ",")) + // normalizes value order on output, without mutating the in-memory selector representation + // also avoids normalization when it is not required, and ensures we do not mutate shared data + buffer.WriteString(strings.Join(safeSort(r.strValues), ",")) } switch r.operator { @@ -309,6 +310,17 @@ func (r *Requirement) String() string { return buffer.String() } +// safeSort sort input strings without modification +func safeSort(in []string) []string { + if sort.StringsAreSorted(in) { + return in + } + out := make([]string, len(in)) + copy(out, in) + sort.Strings(out) + return out +} + // Add adds requirements to the selector. It copies the current selector returning a new one func (lsel internalSelector) Add(reqs ...Requirement) Selector { var sel internalSelector diff --git a/deps/k8s.io/apimachinery/pkg/labels/selector_test.go b/deps/k8s.io/apimachinery/pkg/labels/selector_test.go index 995317bd1..a2702989b 100644 --- a/deps/k8s.io/apimachinery/pkg/labels/selector_test.go +++ b/deps/k8s.io/apimachinery/pkg/labels/selector_test.go @@ -573,3 +573,47 @@ func TestAdd(t *testing.T) { } } } + +func TestSafeSort(t *testing.T) { + tests := []struct { + name string + in []string + inCopy []string + want []string + }{ + { + name: "nil strings", + in: nil, + inCopy: nil, + want: nil, + }, + { + name: "ordered strings", + in: []string{"bar", "foo"}, + inCopy: []string{"bar", "foo"}, + want: []string{"bar", "foo"}, + }, + { + name: "unordered strings", + in: []string{"foo", "bar"}, + inCopy: []string{"foo", "bar"}, + want: []string{"bar", "foo"}, + }, + { + name: "duplicated strings", + in: []string{"foo", "bar", "foo", "bar"}, + inCopy: []string{"foo", "bar", "foo", "bar"}, + want: []string{"bar", "bar", "foo", "foo"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := safeSort(tt.in); !reflect.DeepEqual(got, tt.want) { + t.Errorf("safeSort() = %v, want %v", got, tt.want) + } + if !reflect.DeepEqual(tt.in, tt.inCopy) { + t.Errorf("after safeSort(), input = %v, want %v", tt.in, tt.inCopy) + } + }) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go index d22cddbff..4d482947f 100644 --- a/deps/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/labels/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package labels diff --git a/deps/k8s.io/apimachinery/pkg/runtime/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/BUILD deleted file mode 100644 index ab87922aa..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/BUILD +++ /dev/null @@ -1,100 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["swagger_doc_generator_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/runtime", -) - -go_library( - name = "go_default_library", - srcs = [ - "codec.go", - "codec_check.go", - "conversion.go", - "converter.go", - "doc.go", - "embedded.go", - "error.go", - "extension.go", - "generated.pb.go", - "helper.go", - "interfaces.go", - "register.go", - "scheme.go", - "scheme_builder.go", - "swagger_doc_generator.go", - "types.go", - "types_proto.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion/queryparams:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = [ - "conversion_test.go", - "converter_test.go", - "embedded_test.go", - "extension_test.go", - "scheme_test.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime_test", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/testing:all-srcs", - ], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/codec.go b/deps/k8s.io/apimachinery/pkg/runtime/codec.go index 10dc12cca..6b859b288 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/codec.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/codec.go @@ -76,24 +76,6 @@ func EncodeOrDie(e Encoder, obj Object) string { return string(bytes) } -// DefaultingSerializer invokes defaulting after decoding. -type DefaultingSerializer struct { - Defaulter ObjectDefaulter - Decoder Decoder - // Encoder is optional to allow this type to be used as both a Decoder and an Encoder - Encoder -} - -// Decode performs a decode and then allows the defaulter to act on the provided object. -func (d DefaultingSerializer) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into Object) (Object, *schema.GroupVersionKind, error) { - obj, gvk, err := d.Decoder.Decode(data, defaultGVK, into) - if err != nil { - return obj, gvk, err - } - d.Defaulter.Default(obj) - return obj, gvk, nil -} - // UseOrCreateObject returns obj if the canonical ObjectKind returned by the provided typer matches gvk, or // invokes the ObjectCreator to instantiate a new gvk. Returns an error if the typer cannot find the object. func UseOrCreateObject(t ObjectTyper, c ObjectCreater, gvk schema.GroupVersionKind, obj Object) (Object, error) { diff --git a/deps/k8s.io/apimachinery/pkg/runtime/conversion.go b/deps/k8s.io/apimachinery/pkg/runtime/conversion.go index afe4fab15..6cc832080 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/conversion.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/conversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Defines conversions between generic types and structs to map query strings +// Package runtime defines conversions between generic types and structs to map query strings // to struct objects. package runtime @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/conversion" ) -// DefaultFieldSelectorConversion auto-accepts metav1 values for name and namespace. +// DefaultMetaV1FieldSelectorConversion auto-accepts metav1 values for name and namespace. // A cluster scoped resource specifying namespace empty works fine and specifying a particular // namespace will return no results, as expected. func DefaultMetaV1FieldSelectorConversion(label, value string) (string, string, error) { diff --git a/deps/k8s.io/apimachinery/pkg/runtime/converter.go b/deps/k8s.io/apimachinery/pkg/runtime/converter.go index f6f7c10de..291d7a4e8 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/converter.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/converter.go @@ -73,7 +73,6 @@ var ( mapStringInterfaceType = reflect.TypeOf(map[string]interface{}{}) stringType = reflect.TypeOf(string("")) int64Type = reflect.TypeOf(int64(0)) - uint64Type = reflect.TypeOf(uint64(0)) float64Type = reflect.TypeOf(float64(0)) boolType = reflect.TypeOf(bool(false)) fieldCache = newFieldsCache() @@ -411,8 +410,7 @@ func (c *unstructuredConverter) ToUnstructured(obj interface{}) (map[string]inte var u map[string]interface{} var err error if unstr, ok := obj.(Unstructured); ok { - // UnstructuredContent() mutates the object so we need to make a copy first - u = unstr.DeepCopyObject().(Unstructured).UnstructuredContent() + u = unstr.UnstructuredContent() } else { t := reflect.TypeOf(obj) value := reflect.ValueOf(obj) @@ -439,22 +437,32 @@ func (c *unstructuredConverter) ToUnstructured(obj interface{}) (map[string]inte } // DeepCopyJSON deep copies the passed value, assuming it is a valid JSON representation i.e. only contains -// types produced by json.Unmarshal(). +// types produced by json.Unmarshal() and also int64. +// bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number and nil func DeepCopyJSON(x map[string]interface{}) map[string]interface{} { return DeepCopyJSONValue(x).(map[string]interface{}) } // DeepCopyJSONValue deep copies the passed value, assuming it is a valid JSON representation i.e. only contains -// types produced by json.Unmarshal(). +// types produced by json.Unmarshal() and also int64. +// bool, int64, float64, string, []interface{}, map[string]interface{}, json.Number and nil func DeepCopyJSONValue(x interface{}) interface{} { switch x := x.(type) { case map[string]interface{}: + if x == nil { + // Typed nil - an interface{} that contains a type map[string]interface{} with a value of nil + return x + } clone := make(map[string]interface{}, len(x)) for k, v := range x { clone[k] = DeepCopyJSONValue(v) } return clone case []interface{}: + if x == nil { + // Typed nil - an interface{} that contains a type []interface{} with a value of nil + return x + } clone := make([]interface{}, len(x)) for i, v := range x { clone[i] = DeepCopyJSONValue(v) @@ -584,10 +592,14 @@ func toUnstructured(sv, dv reflect.Value) error { dv.Set(reflect.ValueOf(sv.Int())) return nil case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + uVal := sv.Uint() + if uVal > math.MaxInt64 { + return fmt.Errorf("unsigned value %d does not fit into int64 (overflow)", uVal) + } if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { - dv.Set(reflect.New(uint64Type)) + dv.Set(reflect.New(int64Type)) } - dv.Set(reflect.ValueOf(sv.Uint())) + dv.Set(reflect.ValueOf(int64(uVal))) return nil case reflect.Float32, reflect.Float64: if dt.Kind() == reflect.Interface && dv.NumMethod() == 0 { diff --git a/deps/k8s.io/apimachinery/pkg/runtime/doc.go b/deps/k8s.io/apimachinery/pkg/runtime/doc.go index 06b45df66..89feb4010 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/doc.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/doc.go @@ -18,20 +18,27 @@ limitations under the License. // that follow the kubernetes API object conventions, which are: // // 0. Your API objects have a common metadata struct member, TypeMeta. +// // 1. Your code refers to an internal set of API objects. +// // 2. In a separate package, you have an external set of API objects. +// // 3. The external set is considered to be versioned, and no breaking -// changes are ever made to it (fields may be added but not changed -// or removed). +// changes are ever made to it (fields may be added but not changed +// or removed). +// // 4. As your api evolves, you'll make an additional versioned package -// with every major change. +// with every major change. +// // 5. Versioned packages have conversion functions which convert to -// and from the internal version. +// and from the internal version. +// // 6. You'll continue to support older versions according to your -// deprecation policy, and you can easily provide a program/library -// to update old versions into new versions because of 5. +// deprecation policy, and you can easily provide a program/library +// to update old versions into new versions because of 5. +// // 7. All of your serializations and deserializations are handled in a -// centralized place. +// centralized place. // // Package runtime provides a conversion helper to make 5 easy, and the // Encode/Decode/DecodeInto trio to accomplish 7. You can also register @@ -41,5 +48,4 @@ limitations under the License. // // As a bonus, a few common types useful from all api objects and versions // are provided in types.go. - package runtime // import "k8s.io/apimachinery/pkg/runtime" diff --git a/deps/k8s.io/apimachinery/pkg/runtime/embedded.go b/deps/k8s.io/apimachinery/pkg/runtime/embedded.go index 2cdac9e14..db11eb8bc 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/embedded.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/embedded.go @@ -31,7 +31,7 @@ type encodable struct { func (e encodable) GetObjectKind() schema.ObjectKind { return e.obj.GetObjectKind() } func (e encodable) DeepCopyObject() Object { - var out encodable = e + out := e out.obj = e.obj.DeepCopyObject() copy(out.versions, e.versions) return out @@ -46,14 +46,14 @@ func NewEncodable(e Encoder, obj Object, versions ...schema.GroupVersion) Object return encodable{e, obj, versions} } -func (re encodable) UnmarshalJSON(in []byte) error { +func (e encodable) UnmarshalJSON(in []byte) error { return errors.New("runtime.encodable cannot be unmarshalled from JSON") } // Marshal may get called on pointers or values, so implement MarshalJSON on value. // http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go -func (re encodable) MarshalJSON() ([]byte, error) { - return Encode(re.E, re.obj) +func (e encodable) MarshalJSON() ([]byte, error) { + return Encode(e.E, e.obj) } // NewEncodableList creates an object that will be encoded with the provided codec on demand. @@ -70,28 +70,28 @@ func NewEncodableList(e Encoder, objects []Object, versions ...schema.GroupVersi return out } -func (re *Unknown) UnmarshalJSON(in []byte) error { - if re == nil { +func (e *Unknown) UnmarshalJSON(in []byte) error { + if e == nil { return errors.New("runtime.Unknown: UnmarshalJSON on nil pointer") } - re.TypeMeta = TypeMeta{} - re.Raw = append(re.Raw[0:0], in...) - re.ContentEncoding = "" - re.ContentType = ContentTypeJSON + e.TypeMeta = TypeMeta{} + e.Raw = append(e.Raw[0:0], in...) + e.ContentEncoding = "" + e.ContentType = ContentTypeJSON return nil } // Marshal may get called on pointers or values, so implement MarshalJSON on value. // http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go -func (re Unknown) MarshalJSON() ([]byte, error) { +func (e Unknown) MarshalJSON() ([]byte, error) { // If ContentType is unset, we assume this is JSON. - if re.ContentType != "" && re.ContentType != ContentTypeJSON { + if e.ContentType != "" && e.ContentType != ContentTypeJSON { return nil, errors.New("runtime.Unknown: MarshalJSON on non-json data") } - if re.Raw == nil { + if e.Raw == nil { return []byte("null"), nil } - return re.Raw, nil + return e.Raw, nil } func Convert_runtime_Object_To_runtime_RawExtension(in *Object, out *RawExtension, s conversion.Scope) error { diff --git a/deps/k8s.io/apimachinery/pkg/runtime/error.go b/deps/k8s.io/apimachinery/pkg/runtime/error.go index 86b24840f..322b0313d 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/error.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/error.go @@ -24,38 +24,47 @@ import ( ) type notRegisteredErr struct { - gvk schema.GroupVersionKind - target GroupVersioner - t reflect.Type + schemeName string + gvk schema.GroupVersionKind + target GroupVersioner + t reflect.Type } -func NewNotRegisteredErrForKind(gvk schema.GroupVersionKind) error { - return ¬RegisteredErr{gvk: gvk} +func NewNotRegisteredErrForKind(schemeName string, gvk schema.GroupVersionKind) error { + return ¬RegisteredErr{schemeName: schemeName, gvk: gvk} } -func NewNotRegisteredErrForType(t reflect.Type) error { - return ¬RegisteredErr{t: t} +func NewNotRegisteredErrForType(schemeName string, t reflect.Type) error { + return ¬RegisteredErr{schemeName: schemeName, t: t} } -func NewNotRegisteredErrForTarget(t reflect.Type, target GroupVersioner) error { - return ¬RegisteredErr{t: t, target: target} +func NewNotRegisteredErrForTarget(schemeName string, t reflect.Type, target GroupVersioner) error { + return ¬RegisteredErr{schemeName: schemeName, t: t, target: target} +} + +func NewNotRegisteredGVKErrForTarget(schemeName string, gvk schema.GroupVersionKind, target GroupVersioner) error { + return ¬RegisteredErr{schemeName: schemeName, gvk: gvk, target: target} } func (k *notRegisteredErr) Error() string { if k.t != nil && k.target != nil { - return fmt.Sprintf("%v is not suitable for converting to %q", k.t, k.target) + return fmt.Sprintf("%v is not suitable for converting to %q in scheme %q", k.t, k.target, k.schemeName) + } + nullGVK := schema.GroupVersionKind{} + if k.gvk != nullGVK && k.target != nil { + return fmt.Sprintf("%q is not suitable for converting to %q in scheme %q", k.gvk.GroupVersion(), k.target, k.schemeName) } if k.t != nil { - return fmt.Sprintf("no kind is registered for the type %v", k.t) + return fmt.Sprintf("no kind is registered for the type %v in scheme %q", k.t, k.schemeName) } if len(k.gvk.Kind) == 0 { - return fmt.Sprintf("no version %q has been registered", k.gvk.GroupVersion()) + return fmt.Sprintf("no version %q has been registered in scheme %q", k.gvk.GroupVersion(), k.schemeName) } if k.gvk.Version == APIVersionInternal { - return fmt.Sprintf("no kind %q is registered for the internal version of group %q", k.gvk.Kind, k.gvk.Group) + return fmt.Sprintf("no kind %q is registered for the internal version of group %q in scheme %q", k.gvk.Kind, k.gvk.Group, k.schemeName) } - return fmt.Sprintf("no kind %q is registered for version %q", k.gvk.Kind, k.gvk.GroupVersion()) + return fmt.Sprintf("no kind %q is registered for version %q in scheme %q", k.gvk.Kind, k.gvk.GroupVersion(), k.schemeName) } // IsNotRegisteredError returns true if the error indicates the provided diff --git a/deps/k8s.io/apimachinery/pkg/runtime/extension.go b/deps/k8s.io/apimachinery/pkg/runtime/extension.go index 737e2e9ff..9056397fa 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/extension.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/extension.go @@ -32,7 +32,7 @@ func (re *RawExtension) UnmarshalJSON(in []byte) error { return nil } -// Marshal may get called on pointers or values, so implement MarshalJSON on value. +// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value. // http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go func (re RawExtension) MarshalJSON() ([]byte, error) { if re.Raw == nil { diff --git a/deps/k8s.io/apimachinery/pkg/runtime/generated.pb.go b/deps/k8s.io/apimachinery/pkg/runtime/generated.pb.go index f561fd476..967e0f530 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/generated.pb.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -744,30 +744,29 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 395 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff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d, 0x45, 0xdf, 0x7f, 0xd2, 0xe8, 0xc3, 0x20, 0x1c, 0xfa, 0x3b, 0x00, - 0x00, 0xff, 0xff, 0x3f, 0x1e, 0x24, 0x09, 0x85, 0x02, 0x00, 0x00, + // 378 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0x4f, 0xab, 0x13, 0x31, + 0x14, 0xc5, 0x27, 0xaf, 0x85, 0x3e, 0xd3, 0xc2, 0x93, 0xb8, 0x70, 0x74, 0x91, 0x79, 0x74, 0xe5, + 0x5b, 0xbc, 0x04, 0x1e, 0x08, 0x6e, 0x3b, 0xa5, 0xa0, 0x88, 0x20, 0xc1, 0x3f, 0xe0, 0xca, 0x74, + 0x26, 0x4e, 0xc3, 0xd0, 0x9b, 0x21, 0xcd, 0x38, 0x76, 0xe7, 0x47, 0xf0, 0x63, 0x75, 0xd9, 0x65, + 0x57, 0xc5, 0x8e, 0x1f, 0xc2, 0xad, 0x34, 0x4d, 0x6b, 0xd5, 0x85, 0xbb, 0xe4, 0x9e, 0xf3, 0x3b, + 0xf7, 0x1e, 0xfc, 0xbc, 0x7c, 0xb6, 0x60, 0xda, 0xf0, 0xb2, 0x9e, 0x2a, 0x0b, 0xca, 0xa9, 0x05, + 0xff, 0xac, 0x20, 0x37, 0x96, 0x07, 0x41, 0x56, 0x7a, 0x2e, 0xb3, 0x99, 0x06, 0x65, 0x97, 0xbc, + 0x2a, 0x0b, 0x6e, 0x6b, 0x70, 0x7a, 0xae, 0x78, 0xa1, 0x40, 0x59, 0xe9, 0x54, 0xce, 0x2a, 0x6b, + 0x9c, 0x21, 0xc9, 0x01, 0x60, 0xe7, 0x00, 0xab, 0xca, 0x82, 0x05, 0xe0, 0xf1, 0x6d, 0xa1, 0xdd, + 0xac, 0x9e, 0xb2, 0xcc, 0xcc, 0x79, 0x61, 0x0a, 0xc3, 0x3d, 0x37, 0xad, 0x3f, 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, 0x66, 0x47, 0xa3, 0xaf, 0x2d, 0x45, 0xab, 0x96, 0xa2, 0x75, 0x4b, 0xd1, 0xa6, + 0xa5, 0xe8, 0x7b, 0x4b, 0xd1, 0xb7, 0x1f, 0x34, 0xfa, 0xd0, 0x0b, 0x45, 0x7f, 0x05, 0x00, 0x00, + 0xff, 0xff, 0xe3, 0x33, 0x18, 0x0b, 0x50, 0x02, 0x00, 0x00, } diff --git a/deps/k8s.io/apimachinery/pkg/runtime/generated.proto b/deps/k8s.io/apimachinery/pkg/runtime/generated.proto index 02e388e90..fb61ac96a 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/generated.proto +++ b/deps/k8s.io/apimachinery/pkg/runtime/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,6 @@ syntax = 'proto2'; package k8s.io.apimachinery.pkg.runtime; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - // Package-wide variables from generator "generated". option go_package = "runtime"; diff --git a/deps/k8s.io/apimachinery/pkg/runtime/helper.go b/deps/k8s.io/apimachinery/pkg/runtime/helper.go index a6c1a8d34..33f11eb10 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/helper.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/helper.go @@ -87,7 +87,7 @@ func Field(v reflect.Value, fieldName string, dest interface{}) error { return fmt.Errorf("couldn't assign/convert %v to %v", field.Type(), destValue.Type()) } -// fieldPtr puts the address of fieldName, which must be a member of v, +// FieldPtr puts the address of fieldName, which must be a member of v, // into dest, which must be an address of a variable to which this field's // address can be assigned. func FieldPtr(v reflect.Value, fieldName string, dest interface{}) error { diff --git a/deps/k8s.io/apimachinery/pkg/runtime/interfaces.go b/deps/k8s.io/apimachinery/pkg/runtime/interfaces.go index 9d00f1650..699ff13e0 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/interfaces.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/interfaces.go @@ -39,14 +39,14 @@ type GroupVersioner interface { KindForGroupVersionKinds(kinds []schema.GroupVersionKind) (target schema.GroupVersionKind, ok bool) } -// Encoders write objects to a serialized form +// Encoder writes objects to a serialized form type Encoder interface { // Encode writes an object to a stream. Implementations may return errors if the versions are // incompatible, or if no conversion is defined. Encode(obj Object, w io.Writer) error } -// Decoders attempt to load an object from data. +// Decoder attempts to load an object from data. type Decoder interface { // Decode attempts to deserialize the provided data using either the innate typing of the scheme or the // default kind, group, and version provided. It returns a decoded object as well as the kind, group, and @@ -174,15 +174,18 @@ type ObjectVersioner interface { // ObjectConvertor converts an object to a different version. type ObjectConvertor interface { - // Convert attempts to convert one object into another, or returns an error. This method does - // not guarantee the in object is not mutated. The context argument will be passed to - // all nested conversions. + // Convert attempts to convert one object into another, or returns an error. This + // method does not mutate the in object, but the in and out object might share data structures, + // i.e. the out object cannot be mutated without mutating the in object as well. + // The context argument will be passed to all nested conversions. Convert(in, out, context interface{}) error // ConvertToVersion takes the provided object and converts it the provided version. This - // method does not guarantee that the in object is not mutated. This method is similar to - // Convert() but handles specific details of choosing the correct output version. + // method does not mutate the in object, but the in and out object might share data structures, + // i.e. the out object cannot be mutated without mutating the in object as well. + // This method is similar to Convert() but handles specific details of choosing the correct + // output version. ConvertToVersion(in Object, gv GroupVersioner) (out Object, err error) - ConvertFieldLabel(version, kind, label, value string) (string, string, error) + ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) } // ObjectTyper contains methods for extracting the APIVersion and Kind @@ -221,7 +224,7 @@ type SelfLinker interface { Namespace(obj Object) (string, error) } -// All API types registered with Scheme must support the Object interface. Since objects in a scheme are +// Object interface must be supported by all API types registered with Scheme. Since objects in a scheme are // expected to be serialized to the wire, the interface an Object must provide to the Scheme allows // serializers to set the kind, version, and group the object is represented as. An Object may choose // to return a no-op ObjectKindAccessor in cases where it is not expected to be serialized. @@ -234,9 +237,9 @@ type Object interface { // to JSON allowed. type Unstructured interface { Object - // UnstructuredContent returns a non-nil, mutable map of the contents of this object. Values may be + // UnstructuredContent returns a non-nil map with this object's contents. Values may be // []interface{}, map[string]interface{}, or any primitive type. Contents are typically serialized to - // and from JSON. + // and from JSON. SetUnstructuredContent should be used to mutate the contents. UnstructuredContent() map[string]interface{} // SetUnstructuredContent updates the object content to match the provided map. SetUnstructuredContent(map[string]interface{}) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go b/deps/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go new file mode 100644 index 000000000..45a0dde5e --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/runtime/local_scheme_test.go @@ -0,0 +1,150 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package runtime + +import ( + "testing" + + "reflect" + + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" +) + +func TestPreferredVersionsAllGroups(t *testing.T) { + tests := []struct { + name string + versionPriority map[string][]string + observedVersions []schema.GroupVersion + expectedPrioritized map[string][]schema.GroupVersion + expectedPreferred map[schema.GroupVersion]bool + }{ + { + name: "observedOnly", + observedVersions: []schema.GroupVersion{ + {Group: "", Version: "v3"}, + {Group: "foo", Version: "v1"}, + {Group: "foo", Version: "v2"}, + {Group: "", Version: "v1"}, + }, + expectedPrioritized: map[string][]schema.GroupVersion{ + "": { + {Group: "", Version: "v3"}, + {Group: "", Version: "v1"}, + }, + "foo": { + {Group: "foo", Version: "v1"}, + {Group: "foo", Version: "v2"}, + }, + }, + expectedPreferred: map[schema.GroupVersion]bool{ + {Group: "", Version: "v3"}: true, + {Group: "foo", Version: "v1"}: true, + }, + }, + { + name: "specifiedOnly", + versionPriority: map[string][]string{ + "": {"v3", "v1"}, + "foo": {"v1", "v2"}, + }, + expectedPrioritized: map[string][]schema.GroupVersion{ + "": { + {Group: "", Version: "v3"}, + {Group: "", Version: "v1"}, + }, + "foo": { + {Group: "foo", Version: "v1"}, + {Group: "foo", Version: "v2"}, + }, + }, + expectedPreferred: map[schema.GroupVersion]bool{ + {Group: "", Version: "v3"}: true, + {Group: "foo", Version: "v1"}: true, + }, + }, + { + name: "both", + versionPriority: map[string][]string{ + "": {"v3", "v1"}, + "foo": {"v1", "v2"}, + }, + observedVersions: []schema.GroupVersion{ + {Group: "", Version: "v1"}, + {Group: "", Version: "v3"}, + {Group: "", Version: "v4"}, + {Group: "", Version: "v5"}, + {Group: "bar", Version: "v1"}, + {Group: "bar", Version: "v2"}, + }, + expectedPrioritized: map[string][]schema.GroupVersion{ + "": { + {Group: "", Version: "v3"}, + {Group: "", Version: "v1"}, + {Group: "", Version: "v4"}, + {Group: "", Version: "v5"}, + }, + "foo": { + {Group: "foo", Version: "v1"}, + {Group: "foo", Version: "v2"}, + }, + "bar": { + {Group: "bar", Version: "v1"}, + {Group: "bar", Version: "v2"}, + }, + }, + expectedPreferred: map[schema.GroupVersion]bool{ + {Group: "", Version: "v3"}: true, + {Group: "foo", Version: "v1"}: true, + {Group: "bar", Version: "v1"}: true, + }, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + scheme := NewScheme() + scheme.versionPriority = test.versionPriority + scheme.observedVersions = test.observedVersions + + for group, expected := range test.expectedPrioritized { + actual := scheme.PrioritizedVersionsForGroup(group) + if !reflect.DeepEqual(expected, actual) { + t.Error(diff.ObjectDiff(expected, actual)) + } + } + + prioritizedAll := scheme.PrioritizedVersionsAllGroups() + actualPrioritizedAll := map[string][]schema.GroupVersion{} + for _, actual := range prioritizedAll { + actualPrioritizedAll[actual.Group] = append(actualPrioritizedAll[actual.Group], actual) + } + if !reflect.DeepEqual(test.expectedPrioritized, actualPrioritizedAll) { + t.Error(diff.ObjectDiff(test.expectedPrioritized, actualPrioritizedAll)) + } + + preferredAll := scheme.PreferredVersionAllGroups() + actualPreferredAll := map[schema.GroupVersion]bool{} + for _, actual := range preferredAll { + actualPreferredAll[actual] = true + } + if !reflect.DeepEqual(test.expectedPreferred, actualPreferredAll) { + t.Error(diff.ObjectDiff(test.expectedPreferred, actualPreferredAll)) + } + }) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/runtime/schema/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/schema/BUILD deleted file mode 100644 index 91ead696c..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/schema/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["group_version_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/runtime/schema", -) - -go_library( - name = "go_default_library", - srcs = [ - "generated.pb.go", - "group_version.go", - "interfaces.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime/schema", - deps = ["//vendor/github.com/gogo/protobuf/proto:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go b/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go index 5357628ad..5c9934c73 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -19,12 +19,12 @@ limitations under the License. // DO NOT EDIT! /* - Package schema is a generated protocol buffer package. +Package schema is a generated protocol buffer package. - It is generated from these files: - k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto +It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto - It has these top-level messages: +It has these top-level messages: */ package schema @@ -48,18 +48,17 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 202 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xce, 0xaf, 0x4e, 0x04, 0x31, - 0x10, 0xc7, 0xf1, 0xd6, 0x20, 0x90, 0xc8, 0x13, 0x23, 0x51, 0xd0, 0x11, 0x18, 0x34, 0x2f, 0x80, - 0xc7, 0x75, 0xf7, 0x86, 0x6e, 0x53, 0xfa, 0x27, 0xed, 0x94, 0x04, 0xc7, 0x23, 0xf0, 0x58, 0x27, - 0x4f, 0xae, 0x64, 0xcb, 0x8b, 0x90, 0xb4, 0x2b, 0x08, 0xc9, 0xb9, 0xfe, 0xd2, 0x7c, 0x26, 0xdf, - 0xeb, 0x67, 0xf7, 0x58, 0x94, 0x8d, 0xe8, 0xea, 0x44, 0x39, 0x10, 0x53, 0xc1, 0x77, 0x0a, 0xc7, - 0x98, 0x71, 0xff, 0xd0, 0xc9, 0x7a, 0x3d, 0x2f, 0x36, 0x50, 0xfe, 0xc0, 0xe4, 0x0c, 0xe6, 0x1a, - 0xd8, 0x7a, 0xc2, 0x32, 0x2f, 0xe4, 0x35, 0x1a, 0x0a, 0x94, 0x35, 0xd3, 0x51, 0xa5, 0x1c, 0x39, - 0xde, 0xdc, 0x0e, 0xa7, 0xfe, 0x3a, 0x95, 0x9c, 0x51, 0xbb, 0x53, 0xc3, 0x1d, 0xee, 0x8d, 0xe5, - 0xa5, 0x4e, 0x6a, 0x8e, 0x1e, 0x4d, 0x34, 0x11, 0x3b, 0x9f, 0xea, 0x6b, 0x5f, 0x7d, 0xf4, 0xd7, - 0x38, 0x7b, 0x78, 0xb8, 0x94, 0x53, 0xd9, 0xbe, 0xa1, 0x0d, 0x5c, 0x38, 0xff, 0x6f, 0x79, 0xba, - 0x3b, 0x6d, 0x20, 0xce, 0x1b, 0x88, 0x75, 0x03, 0xf1, 0xd9, 0x40, 0x9e, 0x1a, 0xc8, 0x73, 0x03, - 0xb9, 0x36, 0x90, 0xdf, 0x0d, 0xe4, 0xd7, 0x0f, 0x88, 0x97, 0xab, 0x51, 0xf4, 0x1b, 0x00, 0x00, - 0xff, 0xff, 0xfd, 0x59, 0x57, 0x93, 0x0b, 0x01, 0x00, 0x00, + // 185 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0xcc, 0xaf, 0x6e, 0xc3, 0x30, + 0x10, 0xc7, 0x71, 0x9b, 0x0c, 0x0c, 0x0e, 0x0e, 0x1c, 0x1c, 0xda, 0x7c, 0x74, 0xb8, 0x2f, 0x50, + 0x5e, 0xe6, 0x24, 0x57, 0xc7, 0xb2, 0xfc, 0x47, 0x8e, 0x5d, 0xa9, 0xac, 0x8f, 0xd0, 0xc7, 0x0a, + 0x0c, 0x0c, 0x6c, 0xdc, 0x17, 0xa9, 0x64, 0x07, 0x94, 0xdd, 0x4f, 0xa7, 0xcf, 0xf7, 0xf3, 0x68, + 0xfe, 0x27, 0xa1, 0x3d, 0x9a, 0xdc, 0x51, 0x74, 0x94, 0x68, 0xc2, 0x0b, 0xb9, 0xc1, 0x47, 0xdc, + 0x1f, 0x32, 0x68, 0x2b, 0xfb, 0x51, 0x3b, 0x8a, 0x57, 0x0c, 0x46, 0x61, 0xcc, 0x2e, 0x69, 0x4b, + 0x38, 0xf5, 0x23, 0x59, 0x89, 0x8a, 0x1c, 0x45, 0x99, 0x68, 0x10, 0x21, 0xfa, 0xe4, 0xbf, 0x7e, + 0x9a, 0x13, 0xef, 0x4e, 0x04, 0xa3, 0xc4, 0xee, 0x44, 0x73, 0xdf, 0x7f, 0x4a, 0xa7, 0x31, 0x77, + 0xa2, 0xf7, 0x16, 0x95, 0x57, 0x1e, 0x2b, 0xef, 0xf2, 0xb9, 0xae, 0x3a, 0xea, 0xd5, 0xb2, 0x87, + 0xdf, 0x79, 0x03, 0xb6, 0x6c, 0xc0, 0xd6, 0x0d, 0xd8, 0xad, 0x00, 0x9f, 0x0b, 0xf0, 0xa5, 0x00, + 0x5f, 0x0b, 0xf0, 0x47, 0x01, 0x7e, 0x7f, 0x02, 0x3b, 0x7d, 0xb4, 0xf8, 0x2b, 0x00, 0x00, 0xff, + 0xff, 0xba, 0x7e, 0x65, 0xf4, 0xd6, 0x00, 0x00, 0x00, } diff --git a/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.proto b/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.proto index 50c2f2a63..5aeeaa100 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.proto +++ b/deps/k8s.io/apimachinery/pkg/runtime/schema/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -21,8 +21,6 @@ syntax = 'proto2'; package k8s.io.apimachinery.pkg.runtime.schema; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - // Package-wide variables from generator "generated". option go_package = "schema"; diff --git a/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version.go b/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version.go index 1a9bba106..5f02961d3 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version.go @@ -36,6 +36,21 @@ func ParseResourceArg(arg string) (*GroupVersionResource, GroupResource) { return gvr, ParseGroupResource(arg) } +// ParseKindArg takes the common style of string which may be either `Kind.group.com` or `Kind.version.group.com` +// and parses it out into both possibilities. This code takes no responsibility for knowing which representation was intended +// but with a knowledge of all GroupKinds, calling code can take a very good guess. If there are only two segments, then +// `*GroupVersionResource` is nil. +// `Kind.group.com` -> `group=com, version=group, kind=Kind` and `group=group.com, kind=Kind` +func ParseKindArg(arg string) (*GroupVersionKind, GroupKind) { + var gvk *GroupVersionKind + if strings.Count(arg, ".") >= 2 { + s := strings.SplitN(arg, ".", 3) + gvk = &GroupVersionKind{Group: s[2], Version: s[1], Kind: s[0]} + } + + return gvk, ParseGroupKind(arg) +} + // GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying // concepts during lookup stages without having partially valid types type GroupResource struct { @@ -58,14 +73,22 @@ func (gr *GroupResource) String() string { return gr.Resource + "." + gr.Group } +func ParseGroupKind(gk string) GroupKind { + i := strings.Index(gk, ".") + if i == -1 { + return GroupKind{Kind: gk} + } + + return GroupKind{Group: gk[i+1:], Kind: gk[:i]} +} + // ParseGroupResource turns "resource.group" string into a GroupResource struct. Empty strings are allowed // for each field. func ParseGroupResource(gr string) GroupResource { - if i := strings.Index(gr, "."); i == -1 { - return GroupResource{Resource: gr} - } else { + if i := strings.Index(gr, "."); i >= 0 { return GroupResource{Group: gr[i+1:], Resource: gr[:i]} } + return GroupResource{Resource: gr} } // GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion diff --git a/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go b/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go index 51f26df7f..3934bc45a 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/schema/group_version_test.go @@ -134,3 +134,47 @@ func TestKindForGroupVersionKinds(t *testing.T) { } } } + +func TestParseKindArg(t *testing.T) { + tests := []struct { + input string + gvk *GroupVersionKind + gk GroupKind + }{ + {input: "Pod", gk: GroupKind{Kind: "Pod"}}, + {input: ".apps", gk: GroupKind{Group: "apps"}}, + {input: "Pod.", gk: GroupKind{Kind: "Pod"}}, + {input: "StatefulSet.apps", gk: GroupKind{Group: "apps", Kind: "StatefulSet"}}, + {input: "StatefulSet.v1.apps", gvk: &GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"}, gk: GroupKind{Group: "v1.apps", Kind: "StatefulSet"}}, + } + for i, test := range tests { + t.Run(test.input, func(t *testing.T) { + gvk, gk := ParseKindArg(test.input) + if (gvk != nil && test.gvk == nil) || (gvk == nil && test.gvk != nil) || (test.gvk != nil && *gvk != *test.gvk) { + t.Errorf("%d: expected output: %#v, got: %#v", i, test.gvk, gvk) + } + if gk != test.gk { + t.Errorf("%d: expected output: %#v, got: %#v", i, test.gk, gk) + } + }) + } +} + +func TestParseGroupKind(t *testing.T) { + tests := []struct { + input string + out GroupKind + }{ + {input: "Pod", out: GroupKind{Kind: "Pod"}}, + {input: ".StatefulSet", out: GroupKind{Group: "StatefulSet"}}, + {input: "StatefulSet.apps", out: GroupKind{Group: "apps", Kind: "StatefulSet"}}, + } + for i, test := range tests { + t.Run(test.input, func(t *testing.T) { + out := ParseGroupKind(test.input) + if out != test.out { + t.Errorf("%d: expected output: %#v, got: %#v", i, test.out, out) + } + }) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/runtime/scheme.go b/deps/k8s.io/apimachinery/pkg/runtime/scheme.go index 08b755381..fd37e293a 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/scheme.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/scheme.go @@ -20,9 +20,13 @@ import ( "fmt" "net/url" "reflect" + "strings" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/naming" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" ) // Scheme defines methods for serializing and deserializing API objects, a type @@ -59,18 +63,29 @@ type Scheme struct { // Map from version and resource to the corresponding func to convert // resource field labels in that version to internal version. - fieldLabelConversionFuncs map[string]map[string]FieldLabelConversionFunc + fieldLabelConversionFuncs map[schema.GroupVersionKind]FieldLabelConversionFunc // defaulterFuncs is an array of interfaces to be called with an object to provide defaulting // the provided object must be a pointer. defaulterFuncs map[reflect.Type]func(interface{}) // converter stores all registered conversion functions. It also has - // default coverting behavior. + // default converting behavior. converter *conversion.Converter + + // versionPriority is a map of groups to ordered lists of versions for those groups indicating the + // default priorities of these versions as registered in the scheme + versionPriority map[string][]string + + // observedVersions keeps track of the order we've seen versions during type registration + observedVersions []schema.GroupVersion + + // schemeName is the name of this scheme. If you don't specify a name, the stack of the NewScheme caller will be used. + // This is useful for error reporting to indicate the origin of the scheme. + schemeName string } -// Function to convert a field selector to internal representation. +// FieldLabelConversionFunc converts a field selector to internal representation. type FieldLabelConversionFunc func(label, value string) (internalLabel, internalValue string, err error) // NewScheme creates a new Scheme. This scheme is pluggable by default. @@ -80,23 +95,19 @@ func NewScheme() *Scheme { typeToGVK: map[reflect.Type][]schema.GroupVersionKind{}, unversionedTypes: map[reflect.Type]schema.GroupVersionKind{}, unversionedKinds: map[string]reflect.Type{}, - fieldLabelConversionFuncs: map[string]map[string]FieldLabelConversionFunc{}, + fieldLabelConversionFuncs: map[schema.GroupVersionKind]FieldLabelConversionFunc{}, defaulterFuncs: map[reflect.Type]func(interface{}){}, + versionPriority: map[string][]string{}, + schemeName: naming.GetNameFromCallsite(internalPackages...), } s.converter = conversion.NewConverter(s.nameFunc) - s.AddConversionFuncs(DefaultEmbeddedConversions()...) + utilruntime.Must(s.AddConversionFuncs(DefaultEmbeddedConversions()...)) // Enable map[string][]string conversions by default - if err := s.AddConversionFuncs(DefaultStringConversions...); err != nil { - panic(err) - } - if err := s.RegisterInputDefaults(&map[string][]string{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields); err != nil { - panic(err) - } - if err := s.RegisterInputDefaults(&url.Values{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields); err != nil { - panic(err) - } + utilruntime.Must(s.AddConversionFuncs(DefaultStringConversions...)) + utilruntime.Must(s.RegisterInputDefaults(&map[string][]string{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields)) + utilruntime.Must(s.RegisterInputDefaults(&url.Values{}, JSONKeyMapper, conversion.AllowDifferentFieldTypeNames|conversion.IgnoreMissingFields)) return s } @@ -111,7 +122,7 @@ func (s *Scheme) nameFunc(t reflect.Type) string { for _, gvk := range gvks { internalGV := gvk.GroupVersion() - internalGV.Version = "__internal" // this is hacky and maybe should be passed in + internalGV.Version = APIVersionInternal // this is hacky and maybe should be passed in internalGVK := internalGV.WithKind(gvk.Kind) if internalType, exists := s.gvkToType[internalGVK]; exists { @@ -141,13 +152,14 @@ func (s *Scheme) Converter() *conversion.Converter { // TODO: there is discussion about removing unversioned and replacing it with objects that are manifest into // every version with particular schemas. Resolve this method at that point. func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Object) { + s.addObservedVersion(version) s.AddKnownTypes(version, types...) for _, obj := range types { t := reflect.TypeOf(obj).Elem() gvk := version.WithKind(t.Name()) s.unversionedTypes[t] = gvk if old, ok := s.unversionedKinds[gvk.Kind]; ok && t != old { - panic(fmt.Sprintf("%v.%v has already been registered as unversioned kind %q - kind name must be unique", old.PkgPath(), old.Name(), gvk)) + panic(fmt.Sprintf("%v.%v has already been registered as unversioned kind %q - kind name must be unique in scheme %q", old.PkgPath(), old.Name(), gvk, s.schemeName)) } s.unversionedKinds[gvk.Kind] = t } @@ -158,6 +170,7 @@ func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Objec // the struct becomes the "kind" field when encoding. Version may not be empty - use the // APIVersionInternal constant if you have a type that does not have a formal version. func (s *Scheme) AddKnownTypes(gv schema.GroupVersion, types ...Object) { + s.addObservedVersion(gv) for _, obj := range types { t := reflect.TypeOf(obj) if t.Kind() != reflect.Ptr { @@ -173,6 +186,7 @@ func (s *Scheme) AddKnownTypes(gv schema.GroupVersion, types ...Object) { // your structs. Version may not be empty - use the APIVersionInternal constant if you have a // type that does not have a formal version. func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) { + s.addObservedVersion(gvk.GroupVersion()) t := reflect.TypeOf(obj) if len(gvk.Version) == 0 { panic(fmt.Sprintf("version is required on all types: %s %v", gvk, t)) @@ -186,7 +200,7 @@ func (s *Scheme) AddKnownTypeWithName(gvk schema.GroupVersionKind, obj Object) { } if oldT, found := s.gvkToType[gvk]; found && oldT != t { - panic(fmt.Sprintf("Double registration of different types for %v: old=%v.%v, new=%v.%v", gvk, oldT.PkgPath(), oldT.Name(), t.PkgPath(), t.Name())) + panic(fmt.Sprintf("Double registration of different types for %v: old=%v.%v, new=%v.%v in scheme %q", gvk, oldT.PkgPath(), oldT.Name(), t.PkgPath(), t.Name(), s.schemeName)) } s.gvkToType[gvk] = t @@ -241,7 +255,7 @@ func (s *Scheme) ObjectKinds(obj Object) ([]schema.GroupVersionKind, bool, error gvks, ok := s.typeToGVK[t] if !ok { - return nil, false, NewNotRegisteredErrForType(t) + return nil, false, NewNotRegisteredErrForType(s.schemeName, t) } _, unversionedType := s.unversionedTypes[t] @@ -279,15 +293,7 @@ func (s *Scheme) New(kind schema.GroupVersionKind) (Object, error) { if t, exists := s.unversionedKinds[kind.Kind]; exists { return reflect.New(t).Interface().(Object), nil } - return nil, NewNotRegisteredErrForKind(kind) -} - -// AddGenericConversionFunc adds a function that accepts the ConversionFunc call pattern -// (for two conversion types) to the converter. These functions are checked first during -// a normal conversion, but are otherwise not called. Use AddConversionFuncs when registering -// typed conversions. -func (s *Scheme) AddGenericConversionFunc(fn conversion.GenericConversionFunc) { - s.converter.AddGenericConversionFunc(fn) + return nil, NewNotRegisteredErrForKind(s.schemeName, kind) } // Log sets a logger on the scheme. For test purposes only @@ -341,36 +347,27 @@ func (s *Scheme) AddConversionFuncs(conversionFuncs ...interface{}) error { return nil } -// AddGeneratedConversionFuncs registers conversion functions that were -// automatically generated. -func (s *Scheme) AddGeneratedConversionFuncs(conversionFuncs ...interface{}) error { - for _, f := range conversionFuncs { - if err := s.converter.RegisterGeneratedConversionFunc(f); err != nil { - return err - } - } - return nil +// AddConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (s *Scheme) AddConversionFunc(a, b interface{}, fn conversion.ConversionFunc) error { + return s.converter.RegisterUntypedConversionFunc(a, b, fn) +} + +// AddGeneratedConversionFunc registers a function that converts between a and b by passing objects of those +// types to the provided function. The function *must* accept objects of a and b - this machinery will not enforce +// any other guarantee. +func (s *Scheme) AddGeneratedConversionFunc(a, b interface{}, fn conversion.ConversionFunc) error { + return s.converter.RegisterGeneratedUntypedConversionFunc(a, b, fn) } // AddFieldLabelConversionFunc adds a conversion function to convert field selectors // of the given kind from the given version to internal version representation. -func (s *Scheme) AddFieldLabelConversionFunc(version, kind string, conversionFunc FieldLabelConversionFunc) error { - if s.fieldLabelConversionFuncs[version] == nil { - s.fieldLabelConversionFuncs[version] = map[string]FieldLabelConversionFunc{} - } - - s.fieldLabelConversionFuncs[version][kind] = conversionFunc +func (s *Scheme) AddFieldLabelConversionFunc(gvk schema.GroupVersionKind, conversionFunc FieldLabelConversionFunc) error { + s.fieldLabelConversionFuncs[gvk] = conversionFunc return nil } -// AddStructFieldConversion allows you to specify a mechanical copy for a moved -// or renamed struct field without writing an entire conversion function. See -// the comment in conversion.Converter.SetStructFieldCopy for parameter details. -// Call as many times as needed, even on the same fields. -func (s *Scheme) AddStructFieldConversion(srcFieldType interface{}, srcFieldName string, destFieldType interface{}, destFieldName string) error { - return s.converter.SetStructFieldCopy(srcFieldType, srcFieldName, destFieldType, destFieldName) -} - // RegisterInputDefaults sets the provided field mapping function and field matching // as the defaults for the provided input type. The fn may be nil, in which case no // mapping will happen by default. Use this method to register a mechanism for handling @@ -379,7 +376,7 @@ func (s *Scheme) RegisterInputDefaults(in interface{}, fn conversion.FieldMappin return s.converter.RegisterInputDefaults(in, fn, defaultFlags) } -// AddTypeDefaultingFuncs registers a function that is passed a pointer to an +// AddTypeDefaultingFunc registers a function that is passed a pointer to an // object and can default fields on the object. These functions will be invoked // when Default() is called. The function will never be called unless the // defaulted object matches srcType. If this function is invoked twice with the @@ -431,6 +428,7 @@ func (s *Scheme) Convert(in, out interface{}, context interface{}) error { return err } unstructuredOut.SetUnstructuredContent(content) + unstructuredOut.GetObjectKind().SetGroupVersionKind(gvk) return nil } @@ -471,11 +469,8 @@ func (s *Scheme) Convert(in, out interface{}, context interface{}) error { // ConvertFieldLabel alters the given field label and value for an kind field selector from // versioned representation to an unversioned one or returns an error. -func (s *Scheme) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { - if s.fieldLabelConversionFuncs[version] == nil { - return DefaultMetaV1FieldSelectorConversion(label, value) - } - conversionFunc, ok := s.fieldLabelConversionFuncs[version][kind] +func (s *Scheme) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) { + conversionFunc, ok := s.fieldLabelConversionFuncs[gvk] if !ok { return DefaultMetaV1FieldSelectorConversion(label, value) } @@ -526,7 +521,7 @@ func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) ( kinds, ok := s.typeToGVK[t] if !ok || len(kinds) == 0 { - return nil, NewNotRegisteredErrForType(t) + return nil, NewNotRegisteredErrForType(s.schemeName, t) } gvk, ok := target.KindForGroupVersionKinds(kinds) @@ -539,7 +534,7 @@ func (s *Scheme) convertToVersion(copy bool, in Object, target GroupVersioner) ( } return copyAndSetTargetKind(copy, in, unversionedKind) } - return nil, NewNotRegisteredErrForTarget(t, target) + return nil, NewNotRegisteredErrForTarget(s.schemeName, t, target) } // target wants to use the existing type, set kind and return (no conversion necessary) @@ -619,3 +614,141 @@ func setTargetKind(obj Object, kind schema.GroupVersionKind) { } obj.GetObjectKind().SetGroupVersionKind(kind) } + +// SetVersionPriority allows specifying a precise order of priority. All specified versions must be in the same group, +// and the specified order overwrites any previously specified order for this group +func (s *Scheme) SetVersionPriority(versions ...schema.GroupVersion) error { + groups := sets.String{} + order := []string{} + for _, version := range versions { + if len(version.Version) == 0 || version.Version == APIVersionInternal { + return fmt.Errorf("internal versions cannot be prioritized: %v", version) + } + + groups.Insert(version.Group) + order = append(order, version.Version) + } + if len(groups) != 1 { + return fmt.Errorf("must register versions for exactly one group: %v", strings.Join(groups.List(), ", ")) + } + + s.versionPriority[groups.List()[0]] = order + return nil +} + +// PrioritizedVersionsForGroup returns versions for a single group in priority order +func (s *Scheme) PrioritizedVersionsForGroup(group string) []schema.GroupVersion { + ret := []schema.GroupVersion{} + for _, version := range s.versionPriority[group] { + ret = append(ret, schema.GroupVersion{Group: group, Version: version}) + } + for _, observedVersion := range s.observedVersions { + if observedVersion.Group != group { + continue + } + found := false + for _, existing := range ret { + if existing == observedVersion { + found = true + break + } + } + if !found { + ret = append(ret, observedVersion) + } + } + + return ret +} + +// PrioritizedVersionsAllGroups returns all known versions in their priority order. Groups are random, but +// versions for a single group are prioritized +func (s *Scheme) PrioritizedVersionsAllGroups() []schema.GroupVersion { + ret := []schema.GroupVersion{} + for group, versions := range s.versionPriority { + for _, version := range versions { + ret = append(ret, schema.GroupVersion{Group: group, Version: version}) + } + } + for _, observedVersion := range s.observedVersions { + found := false + for _, existing := range ret { + if existing == observedVersion { + found = true + break + } + } + if !found { + ret = append(ret, observedVersion) + } + } + return ret +} + +// PreferredVersionAllGroups returns the most preferred version for every group. +// group ordering is random. +func (s *Scheme) PreferredVersionAllGroups() []schema.GroupVersion { + ret := []schema.GroupVersion{} + for group, versions := range s.versionPriority { + for _, version := range versions { + ret = append(ret, schema.GroupVersion{Group: group, Version: version}) + break + } + } + for _, observedVersion := range s.observedVersions { + found := false + for _, existing := range ret { + if existing.Group == observedVersion.Group { + found = true + break + } + } + if !found { + ret = append(ret, observedVersion) + } + } + + return ret +} + +// IsGroupRegistered returns true if types for the group have been registered with the scheme +func (s *Scheme) IsGroupRegistered(group string) bool { + for _, observedVersion := range s.observedVersions { + if observedVersion.Group == group { + return true + } + } + return false +} + +// IsVersionRegistered returns true if types for the version have been registered with the scheme +func (s *Scheme) IsVersionRegistered(version schema.GroupVersion) bool { + for _, observedVersion := range s.observedVersions { + if observedVersion == version { + return true + } + } + + return false +} + +func (s *Scheme) addObservedVersion(version schema.GroupVersion) { + if len(version.Version) == 0 || version.Version == APIVersionInternal { + return + } + for _, observedVersion := range s.observedVersions { + if observedVersion == version { + return + } + } + + s.observedVersions = append(s.observedVersions, version) +} + +func (s *Scheme) Name() string { + return s.schemeName +} + +// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common +// call chains to NewReflector, so they'd be low entropy names for reflectors +var internalPackages = []string{"k8s.io/apimachinery/pkg/runtime/scheme.go"} diff --git a/deps/k8s.io/apimachinery/pkg/runtime/scheme_test.go b/deps/k8s.io/apimachinery/pkg/runtime/scheme_test.go index 24743dcae..66f652faa 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/scheme_test.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/scheme_test.go @@ -22,26 +22,24 @@ import ( "strings" "testing" - "github.com/google/gofuzz" - flag "github.com/spf13/pflag" - "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" runtimetesting "k8s.io/apimachinery/pkg/runtime/testing" "k8s.io/apimachinery/pkg/util/diff" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) -var fuzzIters = flag.Int("fuzz-iters", 50, "How many fuzzing iterations to do.") - func TestScheme(t *testing.T) { internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + internalGVK := internalGV.WithKind("Simple") externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + externalGVK := externalGV.WithKind("Simple") scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + scheme.AddKnownTypeWithName(internalGVK, &runtimetesting.InternalSimple{}) + scheme.AddKnownTypeWithName(externalGVK, &runtimetesting.ExternalSimple{}) // If set, would clear TypeMeta during conversion. //scheme.AddIgnoredConversionType(&TypeMeta{}, &TypeMeta{}) @@ -55,14 +53,26 @@ func TestScheme(t *testing.T) { // Register functions to verify that scope.Meta() gets set correctly. err := scheme.AddConversionFuncs( func(in *runtimetesting.InternalSimple, out *runtimetesting.ExternalSimple, scope conversion.Scope) error { - scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) - scope.Convert(&in.TestString, &out.TestString, 0) + err := scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) + if err != nil { + return err + } + err = scope.Convert(&in.TestString, &out.TestString, 0) + if err != nil { + return err + } internalToExternalCalls++ return nil }, func(in *runtimetesting.ExternalSimple, out *runtimetesting.InternalSimple, scope conversion.Scope) error { - scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) - scope.Convert(&in.TestString, &out.TestString, 0) + err := scope.Convert(&in.TypeMeta, &out.TypeMeta, 0) + if err != nil { + return err + } + err = scope.Convert(&in.TestString, &out.TestString, 0) + if err != nil { + return err + } externalToInternalCalls++ return nil }, @@ -71,140 +81,160 @@ func TestScheme(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - codecs := serializer.NewCodecFactory(scheme) - codec := codecs.LegacyCodec(externalGV) - info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) - jsonserializer := info.Serializer - - simple := &runtimetesting.InternalSimple{ - TestString: "foo", - } - - // Test Encode, Decode, DecodeInto, and DecodeToVersion - obj := runtime.Object(simple) - data, err := runtime.Encode(codec, obj) - if err != nil { - t.Fatal(err) - } - - obj2, err := runtime.Decode(codec, data) - if err != nil { - t.Fatal(err) - } - if _, ok := obj2.(*runtimetesting.InternalSimple); !ok { - t.Fatalf("Got wrong type") - } - if e, a := simple, obj2; !reflect.DeepEqual(e, a) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) - } - - obj3 := &runtimetesting.InternalSimple{} - if err := runtime.DecodeInto(codec, data, obj3); err != nil { - t.Fatal(err) - } - // clearing TypeMeta is a function of the scheme, which we do not test here (ConvertToVersion - // does not automatically clear TypeMeta anymore). - simple.TypeMeta = runtime.TypeMeta{Kind: "Simple", APIVersion: externalGV.String()} - if e, a := simple, obj3; !reflect.DeepEqual(e, a) { - t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) - } + t.Run("Encode, Decode, DecodeInto, and DecodeToVersion", func(t *testing.T) { + simple := &runtimetesting.InternalSimple{ + TestString: "foo", + } - obj4, err := runtime.Decode(jsonserializer, data) - if err != nil { - t.Fatal(err) - } - if _, ok := obj4.(*runtimetesting.ExternalSimple); !ok { - t.Fatalf("Got wrong type") - } + codecs := serializer.NewCodecFactory(scheme) + codec := codecs.LegacyCodec(externalGV) + info, _ := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), runtime.ContentTypeJSON) + jsonserializer := info.Serializer - // Test Convert - external := &runtimetesting.ExternalSimple{} - err = scheme.Convert(simple, external, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if e, a := simple.TestString, external.TestString; e != a { - t.Errorf("Expected %v, got %v", e, a) - } + obj := runtime.Object(simple) + data, err := runtime.Encode(codec, obj) + if err != nil { + t.Fatal(err) + } - // Test convert internal to unstructured - unstructuredObj := &runtimetesting.Unstructured{} - err = scheme.Convert(simple, unstructuredObj, nil) - if err == nil || !strings.Contains(err.Error(), "to Unstructured without providing a preferred version to convert to") { - t.Fatalf("Unexpected non-error: %v", err) - } - err = scheme.Convert(simple, unstructuredObj, schema.GroupVersion{Group: "test.group", Version: "testExternal"}) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if e, a := simple.TestString, unstructuredObj.Object["testString"].(string); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e := unstructuredObj.GetObjectKind().GroupVersionKind(); !reflect.DeepEqual(e, schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "Simple"}) { - t.Errorf("Unexpected object kind: %#v", e) - } - if gvks, unversioned, err := scheme.ObjectKinds(unstructuredObj); err != nil || !reflect.DeepEqual(gvks[0], schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "Simple"}) || unversioned { - t.Errorf("Scheme did not recognize unversioned: %v, %#v %t", err, gvks, unversioned) - } + obj2, err := runtime.Decode(codec, data) + if err != nil { + t.Fatal(err) + } + if _, ok := obj2.(*runtimetesting.InternalSimple); !ok { + t.Fatalf("Got wrong type") + } + if e, a := simple, obj2; !reflect.DeepEqual(e, a) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) + } - // Test convert external to unstructured - unstructuredObj = &runtimetesting.Unstructured{} - err = scheme.Convert(external, unstructuredObj, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if e, a := simple.TestString, unstructuredObj.Object["testString"].(string); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - if e := unstructuredObj.GetObjectKind().GroupVersionKind(); !reflect.DeepEqual(e, schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "Simple"}) { - t.Errorf("Unexpected object kind: %#v", e) - } + obj3 := &runtimetesting.InternalSimple{} + if err := runtime.DecodeInto(codec, data, obj3); err != nil { + t.Fatal(err) + } + // clearing TypeMeta is a function of the scheme, which we do not test here (ConvertToVersion + // does not automatically clear TypeMeta anymore). + simple.TypeMeta = runtime.TypeMeta{Kind: "Simple", APIVersion: externalGV.String()} + if e, a := simple, obj3; !reflect.DeepEqual(e, a) { + t.Errorf("Expected:\n %#v,\n Got:\n %#v", e, a) + } - // Test convert unstructured to unstructured - uIn := &runtimetesting.Unstructured{Object: map[string]interface{}{ - "test": []interface{}{"other", "test"}, - }} - uOut := &runtimetesting.Unstructured{} - err = scheme.Convert(uIn, uOut, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if !reflect.DeepEqual(uIn.Object, uOut.Object) { - t.Errorf("Unexpected object contents: %#v", uOut.Object) - } + obj4, err := runtime.Decode(jsonserializer, data) + if err != nil { + t.Fatal(err) + } + if _, ok := obj4.(*runtimetesting.ExternalSimple); !ok { + t.Fatalf("Got wrong type") + } + }) + t.Run("Convert", func(t *testing.T) { + simple := &runtimetesting.InternalSimple{ + TestString: "foo", + } - // Test convert unstructured to structured - externalOut := &runtimetesting.ExternalSimple{} - err = scheme.Convert(unstructuredObj, externalOut, nil) - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - if !reflect.DeepEqual(external, externalOut) { - t.Errorf("Unexpected object contents: %#v", externalOut) - } + external := &runtimetesting.ExternalSimple{} + err = scheme.Convert(simple, external, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if e, a := simple.TestString, external.TestString; e != a { + t.Errorf("Expected %q, got %q", e, a) + } + }) + t.Run("Convert internal to unstructured", func(t *testing.T) { + simple := &runtimetesting.InternalSimple{ + TestString: "foo", + } - // Encode and Convert should each have caused an increment. - if e, a := 3, internalToExternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } - // DecodeInto and Decode should each have caused an increment because of a conversion - if e, a := 2, externalToInternalCalls; e != a { - t.Errorf("Expected %v, got %v", e, a) - } + unstructuredObj := &runtimetesting.Unstructured{} + err = scheme.Convert(simple, unstructuredObj, nil) + if err == nil || !strings.Contains(err.Error(), "to Unstructured without providing a preferred version to convert to") { + t.Fatalf("Unexpected non-error: %v", err) + } + err = scheme.Convert(simple, unstructuredObj, externalGV) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if e, a := simple.TestString, unstructuredObj.Object["testString"].(string); e != a { + t.Errorf("Expected %q, got %q", e, a) + } + if e := unstructuredObj.GetObjectKind().GroupVersionKind(); e != externalGVK { + t.Errorf("Unexpected object kind: %#v", e) + } + if gvks, unversioned, err := scheme.ObjectKinds(unstructuredObj); err != nil || gvks[0] != externalGVK || unversioned { + t.Errorf("Scheme did not recognize unversioned: %v, %#v %t", err, gvks, unversioned) + } + }) + t.Run("Convert external to unstructured", func(t *testing.T) { + unstructuredObj := &runtimetesting.Unstructured{} + external := &runtimetesting.ExternalSimple{ + TestString: "foo", + } - // Verify that unstructured types must have V and K set - emptyObj := &runtimetesting.Unstructured{Object: make(map[string]interface{})} - if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingKind(err) { - t.Errorf("unexpected error: %v", err) - } - emptyObj.SetGroupVersionKind(schema.GroupVersionKind{Kind: "Test"}) - if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingVersion(err) { - t.Errorf("unexpected error: %v", err) - } - emptyObj.SetGroupVersionKind(schema.GroupVersionKind{Kind: "Test", Version: "v1"}) - if _, _, err := scheme.ObjectKinds(emptyObj); err != nil { - t.Errorf("unexpected error: %v", err) - } + err = scheme.Convert(external, unstructuredObj, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if e, a := external.TestString, unstructuredObj.Object["testString"].(string); e != a { + t.Errorf("Expected %q, got %q", e, a) + } + if e := unstructuredObj.GetObjectKind().GroupVersionKind(); e != externalGVK { + t.Errorf("Unexpected object kind: %#v", e) + } + }) + t.Run("Convert unstructured to unstructured", func(t *testing.T) { + uIn := &runtimetesting.Unstructured{Object: map[string]interface{}{ + "test": []interface{}{"other", "test"}, + }} + uOut := &runtimetesting.Unstructured{} + err = scheme.Convert(uIn, uOut, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if !reflect.DeepEqual(uIn.Object, uOut.Object) { + t.Errorf("Unexpected object contents: %#v", uOut.Object) + } + }) + t.Run("Convert unstructured to structured", func(t *testing.T) { + unstructuredObj := &runtimetesting.Unstructured{ + Object: map[string]interface{}{ + "testString": "bla", + }, + } + unstructuredObj.SetGroupVersionKind(externalGV.WithKind("Simple")) + externalOut := &runtimetesting.ExternalSimple{} + err = scheme.Convert(unstructuredObj, externalOut, nil) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if externalOut.TestString != "bla" { + t.Errorf("Unexpected object contents: %#v", externalOut) + } + }) + t.Run("Encode and Convert should each have caused an increment", func(t *testing.T) { + if e, a := 3, internalToExternalCalls; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + }) + t.Run("DecodeInto and Decode should each have caused an increment because of a conversion", func(t *testing.T) { + if e, a := 2, externalToInternalCalls; e != a { + t.Errorf("Expected %v, got %v", e, a) + } + }) + t.Run("Verify that unstructured types must have V and K set", func(t *testing.T) { + emptyObj := &runtimetesting.Unstructured{Object: make(map[string]interface{})} + if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingKind(err) { + t.Errorf("unexpected error: %v", err) + } + emptyObj.SetGroupVersionKind(schema.GroupVersionKind{Kind: "Test"}) + if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingVersion(err) { + t.Errorf("unexpected error: %v", err) + } + emptyObj.SetGroupVersionKind(schema.GroupVersionKind{Kind: "Test", Version: "v1"}) + if _, _, err := scheme.ObjectKinds(emptyObj); err != nil { + t.Errorf("unexpected error: %v", err) + } + }) } func TestBadJSONRejection(t *testing.T) { @@ -334,11 +364,13 @@ func TestExtensionMapping(t *testing.T) { func TestEncode(t *testing.T) { internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + internalGVK := internalGV.WithKind("Simple") externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + externalGVK := externalGV.WithKind("Simple") scheme := runtime.NewScheme() - scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + scheme.AddKnownTypeWithName(internalGVK, &runtimetesting.InternalSimple{}) + scheme.AddKnownTypeWithName(externalGVK, &runtimetesting.ExternalSimple{}) codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) @@ -357,20 +389,22 @@ func TestEncode(t *testing.T) { if !reflect.DeepEqual(obj2, test) { t.Errorf("Expected:\n %#v,\n Got:\n %#v", test, obj2) } - if !reflect.DeepEqual(gvk, &schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "Simple"}) { - t.Errorf("unexpected gvk returned by decode: %#v", gvk) + if *gvk != externalGVK { + t.Errorf("unexpected gvk returned by decode: %#v", *gvk) } } func TestUnversionedTypes(t *testing.T) { internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} + internalGVK := internalGV.WithKind("Simple") externalGV := schema.GroupVersion{Group: "test.group", Version: "testExternal"} + externalGVK := externalGV.WithKind("Simple") otherGV := schema.GroupVersion{Group: "group", Version: "other"} scheme := runtime.NewScheme() scheme.AddUnversionedTypes(externalGV, &runtimetesting.InternalSimple{}) - scheme.AddKnownTypeWithName(internalGV.WithKind("Simple"), &runtimetesting.InternalSimple{}) - scheme.AddKnownTypeWithName(externalGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) + scheme.AddKnownTypeWithName(internalGVK, &runtimetesting.InternalSimple{}) + scheme.AddKnownTypeWithName(externalGVK, &runtimetesting.ExternalSimple{}) scheme.AddKnownTypeWithName(otherGV.WithKind("Simple"), &runtimetesting.ExternalSimple{}) codec := serializer.NewCodecFactory(scheme).LegacyCodec(externalGV) @@ -407,8 +441,8 @@ func TestUnversionedTypes(t *testing.T) { t.Errorf("Expected:\n %#v,\n Got:\n %#v", test, obj2) } // object is serialized as an unversioned object (in the group and version it was defined in) - if !reflect.DeepEqual(gvk, &schema.GroupVersionKind{Group: "test.group", Version: "testExternal", Kind: "InternalSimple"}) { - t.Errorf("unexpected gvk returned by decode: %#v", gvk) + if *gvk != externalGV.WithKind("InternalSimple") { + t.Errorf("unexpected gvk returned by decode: %#v", *gvk) } // when serialized to a different group, the object is kept in its preferred name @@ -422,23 +456,12 @@ func TestUnversionedTypes(t *testing.T) { } } -// TestObjectFuzzer can randomly populate all the above objects. -var TestObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 100).Funcs( - func(j *runtimetesting.MyWeirdCustomEmbeddedVersionKindField, c fuzz.Continue) { - // We have to customize the randomization of MyWeirdCustomEmbeddedVersionKindFields because their - // APIVersion and Kind must remain blank in memory. - j.APIVersion = "" - j.ObjectKind = "" - j.ID = c.RandString() - }, -) - // Returns a new Scheme set up with the test objects. func GetTestScheme() *runtime.Scheme { - internalGV := schema.GroupVersion{Version: "__internal"} + internalGV := schema.GroupVersion{Version: runtime.APIVersionInternal} externalGV := schema.GroupVersion{Version: "v1"} alternateExternalGV := schema.GroupVersion{Group: "custom", Version: "v1"} - alternateInternalGV := schema.GroupVersion{Group: "custom", Version: "__internal"} + alternateInternalGV := schema.GroupVersion{Group: "custom", Version: runtime.APIVersionInternal} differentExternalGV := schema.GroupVersion{Group: "other", Version: "v2"} s := runtime.NewScheme() @@ -458,9 +481,10 @@ func GetTestScheme() *runtime.Scheme { s.AddKnownTypeWithName(differentExternalGV.WithKind("TestType1"), &runtimetesting.ExternalTestType1{}) s.AddUnversionedTypes(externalGV, &runtimetesting.UnversionedType{}) - s.AddConversionFuncs(func(in *runtimetesting.TestType1, out *runtimetesting.ExternalTestType1, s conversion.Scope) { + utilruntime.Must(s.AddConversionFuncs(func(in *runtimetesting.TestType1, out *runtimetesting.ExternalTestType1, s conversion.Scope) error { out.A = in.A - }) + return nil + })) return s } @@ -614,7 +638,7 @@ func TestConvertToVersion(t *testing.T) { { scheme: GetTestScheme(), in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersion{Version: "__internal"}, + gv: schema.GroupVersion{Version: runtime.APIVersionInternal}, out: &runtimetesting.TestType1{A: "test"}, }, // converts from unstructured to internal @@ -625,7 +649,7 @@ func TestConvertToVersion(t *testing.T) { "kind": "TestType3", "A": "test", }}, - gv: schema.GroupVersion{Version: "__internal"}, + gv: schema.GroupVersion{Version: runtime.APIVersionInternal}, out: &runtimetesting.TestType1{A: "test"}, }, // converts from unstructured to external @@ -643,7 +667,7 @@ func TestConvertToVersion(t *testing.T) { { scheme: GetTestScheme(), in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "__internal"}, {Version: "v1"}}, + gv: schema.GroupVersions{{Version: runtime.APIVersionInternal}, {Version: "v1"}}, out: &runtimetesting.ExternalTestType1{ MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, A: "test", @@ -686,7 +710,7 @@ func TestConvertToVersion(t *testing.T) { { scheme: GetTestScheme(), in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}, {Version: "__internal"}}, + gv: schema.GroupVersions{{Version: "v1"}, {Version: runtime.APIVersionInternal}}, same: true, out: &runtimetesting.ExternalTestType1{ MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, @@ -697,7 +721,7 @@ func TestConvertToVersion(t *testing.T) { { scheme: GetTestScheme(), in: &runtimetesting.ExternalTestType1{A: "test"}, - gv: schema.GroupVersions{{Version: "v1"}, {Version: "__internal"}}, + gv: schema.GroupVersions{{Version: "v1"}, {Version: runtime.APIVersionInternal}}, same: true, out: &runtimetesting.ExternalTestType1{ MyWeirdCustomEmbeddedVersionKindField: runtimetesting.MyWeirdCustomEmbeddedVersionKindField{APIVersion: "v1", ObjectKind: "TestType1"}, @@ -896,7 +920,7 @@ func TestConvert(t *testing.T) { } func TestMetaValues(t *testing.T) { - internalGV := schema.GroupVersion{Group: "test.group", Version: "__internal"} + internalGV := schema.GroupVersion{Group: "test.group", Version: runtime.APIVersionInternal} externalGV := schema.GroupVersion{Group: "test.group", Version: "externalVersion"} s := runtime.NewScheme() diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/BUILD deleted file mode 100644 index 43d36a792..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/BUILD +++ /dev/null @@ -1,65 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["codec_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer", - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "codec_factory.go", - "negotiated_codec.go", - "protobuf_extension.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/json:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/testing:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/versioning:all-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/yaml:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD deleted file mode 100644 index 0fdceeda9..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/BUILD +++ /dev/null @@ -1,57 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["meta_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/json", -) - -go_library( - name = "go_default_library", - srcs = [ - "json.go", - "meta.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/json", - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/json-iterator/go:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/framer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = ["json_test.go"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/json_test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go b/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go index 2b795b5b8..382c4858e 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json.go @@ -24,6 +24,7 @@ import ( "github.com/ghodss/yaml" jsoniter "github.com/json-iterator/go" + "github.com/modern-go/reflect2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -68,36 +69,62 @@ type Serializer struct { var _ runtime.Serializer = &Serializer{} var _ recognizer.RecognizingDecoder = &Serializer{} -func init() { - // Force jsoniter to decode number to interface{} via ints, if possible. - decodeNumberAsInt64IfPossible := func(ptr unsafe.Pointer, iter *jsoniter.Iterator) { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - var number json.Number - iter.ReadVal(&number) - u64, err := strconv.ParseUint(string(number), 10, 64) - if err == nil { - *(*interface{})(ptr) = u64 - return - } - i64, err := strconv.ParseInt(string(number), 10, 64) - if err == nil { - *(*interface{})(ptr) = i64 - return - } - f64, err := strconv.ParseFloat(string(number), 64) - if err == nil { - *(*interface{})(ptr) = f64 - return - } - // Not much we can do here. - default: - *(*interface{})(ptr) = iter.Read() +type customNumberExtension struct { + jsoniter.DummyExtension +} + +func (cne *customNumberExtension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder { + if typ.String() == "interface {}" { + return customNumberDecoder{} + } + return nil +} + +type customNumberDecoder struct { +} + +func (customNumberDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + switch iter.WhatIsNext() { + case jsoniter.NumberValue: + var number jsoniter.Number + iter.ReadVal(&number) + i64, err := strconv.ParseInt(string(number), 10, 64) + if err == nil { + *(*interface{})(ptr) = i64 + return + } + f64, err := strconv.ParseFloat(string(number), 64) + if err == nil { + *(*interface{})(ptr) = f64 + return } + iter.ReportError("DecodeNumber", err.Error()) + default: + *(*interface{})(ptr) = iter.Read() } - jsoniter.RegisterTypeDecoderFunc("interface {}", decodeNumberAsInt64IfPossible) } +// CaseSensitiveJsonIterator returns a jsoniterator API that's configured to be +// case-sensitive when unmarshalling, and otherwise compatible with +// the encoding/json standard library. +func CaseSensitiveJsonIterator() jsoniter.API { + config := jsoniter.Config{ + EscapeHTML: true, + SortMapKeys: true, + ValidateJsonRawMessage: true, + CaseSensitive: true, + }.Froze() + // Force jsoniter to decode number to interface{} via int64/float64, if possible. + config.RegisterExtension(&customNumberExtension{}) + return config +} + +// Private copy of jsoniter to try to shield against possible mutations +// from outside. Still does not protect from package level jsoniter.Register*() functions - someone calling them +// in some other library will mess with every usage of the jsoniter library in the whole program. +// See https://github.com/json-iterator/go/issues/265 +var caseSensitiveJsonIterator = CaseSensitiveJsonIterator() + // gvkWithDefaults returns group kind and version defaulting from provided default func gvkWithDefaults(actual, defaultGVK schema.GroupVersionKind) schema.GroupVersionKind { if len(actual.Kind) == 0 { @@ -162,7 +189,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i types, _, err := s.typer.ObjectKinds(into) switch { case runtime.IsNotRegisteredError(err), isUnstructured: - if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(data, into); err != nil { + if err := caseSensitiveJsonIterator.Unmarshal(data, into); err != nil { return nil, actual, err } return into, actual, nil @@ -186,7 +213,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i return nil, actual, err } - if err := jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(data, obj); err != nil { + if err := caseSensitiveJsonIterator.Unmarshal(data, obj); err != nil { return nil, actual, err } return obj, actual, nil @@ -195,7 +222,7 @@ func (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, i // Encode serializes the provided object to the given writer. func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error { if s.yaml { - json, err := jsoniter.ConfigCompatibleWithStandardLibrary.Marshal(obj) + json, err := caseSensitiveJsonIterator.Marshal(obj) if err != nil { return err } @@ -208,7 +235,7 @@ func (s *Serializer) Encode(obj runtime.Object, w io.Writer) error { } if s.pretty { - data, err := jsoniter.ConfigCompatibleWithStandardLibrary.MarshalIndent(obj, "", " ") + data, err := caseSensitiveJsonIterator.MarshalIndent(obj, "", " ") if err != nil { return err } @@ -246,7 +273,7 @@ func (jsonFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser { return framer.NewJSONFramedReader(r) } -// Framer is the default JSON framing behavior, with newlines delimiting individual objects. +// YAMLFramer is the default JSON framing behavior, with newlines delimiting individual objects. var YAMLFramer = yamlFramer{} type yamlFramer struct{} diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go b/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go index c8ae5550c..7f358da68 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/serializer/json/json_test.go @@ -29,9 +29,31 @@ import ( ) type testDecodable struct { - Other string - Value int `json:"value"` - gvk schema.GroupVersionKind + Other string + Value int `json:"value"` + Spec DecodableSpec `json:"spec"` + Interface interface{} `json:"interface"` + gvk schema.GroupVersionKind +} + +// DecodableSpec has 15 fields. json-iterator treats struct with more than 10 +// fields differently from struct that has less than 10 fields. +type DecodableSpec struct { + A int `json:"A"` + B int `json:"B"` + C int `json:"C"` + D int `json:"D"` + E int `json:"E"` + F int `json:"F"` + G int `json:"G"` + H int `json:"h"` + I int `json:"i"` + J int `json:"j"` + K int `json:"k"` + L int `json:"l"` + M int `json:"m"` + N int `json:"n"` + O int `json:"o"` } func (d *testDecodable) GetObjectKind() schema.ObjectKind { return d } @@ -158,7 +180,7 @@ func TestDecode(t *testing.T) { { data: []byte(`{"kind":"Test","apiVersion":"other/blah","value":1,"Other":"test"}`), into: &testDecodable{}, - typer: &mockTyper{err: runtime.NewNotRegisteredErrForKind(schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"})}, + typer: &mockTyper{err: runtime.NewNotRegisteredErrForKind("mock", schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"})}, expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, expectedObject: &testDecodable{ Other: "test", @@ -221,6 +243,37 @@ func TestDecode(t *testing.T) { }, }, }, + // Error on invalid number + { + data: []byte(`{"kind":"Test","apiVersion":"other/blah","interface":1e1000}`), + creater: &mockCreater{obj: &testDecodable{}}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + errFn: func(err error) bool { + return strings.Contains(err.Error(), `json_test.testDecodable.Interface: DecodeNumber: strconv.ParseFloat: parsing "1e1000": value out of range`) + }, + }, + // Unmarshalling is case-sensitive + { + // "VaLue" should have been "value" + data: []byte(`{"kind":"Test","apiVersion":"other/blah","VaLue":1,"Other":"test"}`), + into: &testDecodable{}, + typer: &mockTyper{err: runtime.NewNotRegisteredErrForKind("mock", schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"})}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedObject: &testDecodable{ + Other: "test", + }, + }, + // Unmarshalling is case-sensitive for big struct. + { + // "b" should have been "B", "I" should have been "i" + data: []byte(`{"kind":"Test","apiVersion":"other/blah","spec": {"A": 1, "b": 2, "h": 3, "I": 4}}`), + into: &testDecodable{}, + typer: &mockTyper{err: runtime.NewNotRegisteredErrForKind("mock", schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"})}, + expectedGVK: &schema.GroupVersionKind{Kind: "Test", Group: "other", Version: "blah"}, + expectedObject: &testDecodable{ + Spec: DecodableSpec{A: 1, H: 3}, + }, + }, } for i, test := range testCases { diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/BUILD deleted file mode 100644 index 3eb91d862..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "protobuf.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/framer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go b/deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go index 8d4ea7118..b99ba25c8 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/serializer/protobuf/protobuf.go @@ -20,10 +20,12 @@ import ( "bytes" "fmt" "io" + "net/http" "reflect" "github.com/gogo/protobuf/proto" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/recognizer" @@ -50,6 +52,15 @@ func (e errNotMarshalable) Error() string { return fmt.Sprintf("object %v does not implement the protobuf marshalling interface and cannot be encoded to a protobuf message", e.t) } +func (e errNotMarshalable) Status() metav1.Status { + return metav1.Status{ + Status: metav1.StatusFailure, + Code: http.StatusNotAcceptable, + Reason: metav1.StatusReason("NotAcceptable"), + Message: e.Error(), + } +} + func IsNotMarshalable(err error) bool { _, ok := err.(errNotMarshalable) return err != nil && ok diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/BUILD deleted file mode 100644 index de54abb3d..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["recognizer.go"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing/BUILD deleted file mode 100644 index 2e293b985..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["recognizer_test.go"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/recognizer/testing", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go b/deps/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go new file mode 100644 index 000000000..3bc9d13bb --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/runtime/serializer/sparse_test.go @@ -0,0 +1,91 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package serializer + +import ( + "testing" + + "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" +) + +type FakeV1Obj struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +func (*FakeV1Obj) DeepCopyObject() runtime.Object { + panic("not supported") +} + +type FakeV2DifferentObj struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +func (*FakeV2DifferentObj) DeepCopyObject() runtime.Object { + panic("not supported") +} +func TestSparse(t *testing.T) { + v1 := schema.GroupVersion{Group: "mygroup", Version: "v1"} + v2 := schema.GroupVersion{Group: "mygroup", Version: "v2"} + + scheme := runtime.NewScheme() + scheme.AddKnownTypes(v1, &FakeV1Obj{}) + scheme.AddKnownTypes(v2, &FakeV2DifferentObj{}) + codecs := NewCodecFactory(scheme) + + srcObj1 := &FakeV1Obj{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + srcObj2 := &FakeV2DifferentObj{ObjectMeta: metav1.ObjectMeta{Name: "foo"}} + + encoder := codecs.LegacyCodec(v2, v1) + decoder := codecs.UniversalDecoder(v2, v1) + + srcObj1Bytes, err := runtime.Encode(encoder, srcObj1) + if err != nil { + t.Fatal(err) + } + t.Log(string(srcObj1Bytes)) + srcObj2Bytes, err := runtime.Encode(encoder, srcObj2) + if err != nil { + t.Fatal(err) + } + t.Log(string(srcObj2Bytes)) + + uncastDstObj1, err := runtime.Decode(decoder, srcObj1Bytes) + if err != nil { + t.Fatal(err) + } + uncastDstObj2, err := runtime.Decode(decoder, srcObj2Bytes) + if err != nil { + t.Fatal(err) + } + + // clear typemeta + uncastDstObj1.(*FakeV1Obj).TypeMeta = metav1.TypeMeta{} + uncastDstObj2.(*FakeV2DifferentObj).TypeMeta = metav1.TypeMeta{} + + if !equality.Semantic.DeepEqual(srcObj1, uncastDstObj1) { + t.Fatal(diff.ObjectDiff(srcObj1, uncastDstObj1)) + } + if !equality.Semantic.DeepEqual(srcObj2, uncastDstObj2) { + t.Fatal(diff.ObjectDiff(srcObj2, uncastDstObj2)) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/streaming/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/streaming/BUILD deleted file mode 100644 index f1a2f341b..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/streaming/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["streaming_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/framer:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["streaming.go"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/BUILD deleted file mode 100644 index fbc00c7ca..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/testing", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/zz_generated.deepcopy.go index d43ae7f04..b419c0ad9 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/serializer/testing/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package testing @@ -46,9 +46,8 @@ func (in *ExternalInternalSame) DeepCopy() *ExternalInternalSame { func (in *ExternalInternalSame) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -71,12 +70,8 @@ func (in *ExternalTestType1) DeepCopyInto(out *ExternalTestType1) { } if in.O != nil { in, out := &in.O, &out.O - if *in == nil { - *out = nil - } else { - *out = new(ExternalTestType2) - **out = **in - } + *out = new(ExternalTestType2) + **out = **in } if in.P != nil { in, out := &in.P, &out.P @@ -100,9 +95,8 @@ func (in *ExternalTestType1) DeepCopy() *ExternalTestType1 { func (in *ExternalTestType1) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -125,9 +119,8 @@ func (in *ExternalTestType2) DeepCopy() *ExternalTestType2 { func (in *ExternalTestType2) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -150,12 +143,8 @@ func (in *TestType1) DeepCopyInto(out *TestType1) { } if in.O != nil { in, out := &in.O, &out.O - if *in == nil { - *out = nil - } else { - *out = new(TestType2) - **out = **in - } + *out = new(TestType2) + **out = **in } if in.P != nil { in, out := &in.P, &out.P @@ -179,9 +168,8 @@ func (in *TestType1) DeepCopy() *TestType1 { func (in *TestType1) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -204,7 +192,6 @@ func (in *TestType2) DeepCopy() *TestType2 { func (in *TestType2) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD deleted file mode 100644 index 2e262cb6b..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["versioning_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["versioning.go"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go b/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go index b717fe8fe..a5ae3ac4b 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go @@ -19,22 +19,11 @@ package versioning import ( "io" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) -// NewCodecForScheme is a convenience method for callers that are using a scheme. -func NewCodecForScheme( - // TODO: I should be a scheme interface? - scheme *runtime.Scheme, - encoder runtime.Encoder, - decoder runtime.Decoder, - encodeVersion runtime.GroupVersioner, - decodeVersion runtime.GroupVersioner, -) runtime.Codec { - return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, nil, encodeVersion, decodeVersion) -} - // NewDefaultingCodecForScheme is a convenience method for callers that are using a scheme. func NewDefaultingCodecForScheme( // TODO: I should be a scheme interface? @@ -44,7 +33,7 @@ func NewDefaultingCodecForScheme( encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, ) runtime.Codec { - return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, encodeVersion, decodeVersion) + return NewCodec(encoder, decoder, runtime.UnsafeObjectConvertor(scheme), scheme, scheme, scheme, encodeVersion, decodeVersion, scheme.Name()) } // NewCodec takes objects in their internal versions and converts them to external versions before @@ -59,6 +48,7 @@ func NewCodec( defaulter runtime.ObjectDefaulter, encodeVersion runtime.GroupVersioner, decodeVersion runtime.GroupVersioner, + originalSchemeName string, ) runtime.Codec { internal := &codec{ encoder: encoder, @@ -70,6 +60,8 @@ func NewCodec( encodeVersion: encodeVersion, decodeVersion: decodeVersion, + + originalSchemeName: originalSchemeName, } return internal } @@ -84,6 +76,9 @@ type codec struct { encodeVersion runtime.GroupVersioner decodeVersion runtime.GroupVersioner + + // originalSchemeName is optional, but when filled in it holds the name of the scheme from which this codec originates + originalSchemeName string } // Decode attempts a decode of the object, then tries to convert it to the internal version. If into is provided and the decoding is @@ -166,9 +161,27 @@ func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into ru // Encode ensures the provided object is output in the appropriate group and version, invoking // conversion if necessary. Unversioned objects (according to the ObjectTyper) are output as is. func (c *codec) Encode(obj runtime.Object, w io.Writer) error { - switch obj.(type) { - case *runtime.Unknown, runtime.Unstructured: + switch obj := obj.(type) { + case *runtime.Unknown: return c.encoder.Encode(obj, w) + case runtime.Unstructured: + // An unstructured list can contain objects of multiple group version kinds. don't short-circuit just + // because the top-level type matches our desired destination type. actually send the object to the converter + // to give it a chance to convert the list items if needed. + if _, ok := obj.(*unstructured.UnstructuredList); !ok { + // avoid conversion roundtrip if GVK is the right one already or is empty (yes, this is a hack, but the old behaviour we rely on in kubectl) + objGVK := obj.GetObjectKind().GroupVersionKind() + if len(objGVK.Version) == 0 { + return c.encoder.Encode(obj, w) + } + targetGVK, ok := c.encodeVersion.KindForGroupVersionKinds([]schema.GroupVersionKind{objGVK}) + if !ok { + return runtime.NewNotRegisteredGVKErrForTarget(c.originalSchemeName, objGVK, c.encodeVersion) + } + if targetGVK == objGVK { + return c.encoder.Encode(obj, w) + } + } } gvks, isUnversioned, err := c.typer.ObjectKinds(obj) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go b/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go index 43c242657..7f13904d6 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning_test.go @@ -72,7 +72,7 @@ func (d *testNestedDecodable) DecodeNestedObjects(_ runtime.Decoder) error { func TestNestedDecode(t *testing.T) { n := &testNestedDecodable{nestedErr: fmt.Errorf("unable to decode")} decoder := &mockSerializer{obj: n} - codec := NewCodec(nil, decoder, nil, nil, nil, nil, nil, nil) + codec := NewCodec(nil, decoder, nil, nil, nil, nil, nil, nil, "TestNestedDecode") if _, _, err := codec.Decode([]byte(`{}`), nil, n); err != n.nestedErr { t.Errorf("unexpected error: %v", err) } @@ -92,6 +92,7 @@ func TestNestedEncode(t *testing.T) { &mockTyper{gvks: []schema.GroupVersionKind{{Kind: "test"}}}, nil, schema.GroupVersion{Group: "other"}, nil, + "TestNestedEncode", ) if err := codec.Encode(n, ioutil.Discard); err != n2.nestedErr { t.Errorf("unexpected error: %v", err) @@ -129,25 +130,25 @@ func TestDecode(t *testing.T) { }{ { serializer: &mockSerializer{actual: gvk1}, - convertor: &checkConvertor{groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, + convertor: &checkConvertor{groupVersion: schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}}, expectedGVK: gvk1, - decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, + decodes: schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}, }, { serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, + convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}}, expectedGVK: gvk1, sameObject: decodable2, - decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, + decodes: schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}, }, // defaultGVK.Group is allowed to force a conversion to the destination group { serializer: &mockSerializer{actual: gvk1, obj: decodable1}, defaultGVK: &schema.GroupVersionKind{Group: "force"}, - convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "force", Version: "__internal"}}, + convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "force", Version: runtime.APIVersionInternal}}, expectedGVK: gvk1, sameObject: decodable2, - decodes: schema.GroupVersion{Group: "force", Version: "__internal"}, + decodes: schema.GroupVersion{Group: "force", Version: runtime.APIVersionInternal}, }, // uses direct conversion for into when objects differ { @@ -184,10 +185,10 @@ func TestDecode(t *testing.T) { into: &runtime.VersionedObjects{Objects: []runtime.Object{}}, serializer: &mockSerializer{actual: gvk1, obj: decodable1}, - convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: "__internal"}}, + convertor: &checkConvertor{in: decodable1, obj: decodable2, groupVersion: schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}}, expectedGVK: gvk1, expectedObject: &runtime.VersionedObjects{Objects: []runtime.Object{decodable1, decodable2}}, - decodes: schema.GroupVersion{Group: "other", Version: "__internal"}, + decodes: schema.GroupVersion{Group: "other", Version: runtime.APIVersionInternal}, }, // decode into the same version as the serialized object @@ -231,7 +232,7 @@ func TestDecode(t *testing.T) { for i, test := range testCases { t.Logf("%d", i) - s := NewCodec(test.serializer, test.serializer, test.convertor, test.creater, test.typer, test.defaulter, test.encodes, test.decodes) + s := NewCodec(test.serializer, test.serializer, test.convertor, test.creater, test.typer, test.defaulter, test.encodes, test.decodes, fmt.Sprintf("mock-%d", i)) obj, gvk, err := s.Decode([]byte(`{}`), test.defaultGVK, test.into) if !reflect.DeepEqual(test.expectedGVK, gvk) { @@ -306,7 +307,7 @@ func (c *checkConvertor) ConvertToVersion(in runtime.Object, outVersion runtime. } return c.obj, c.err } -func (c *checkConvertor) ConvertFieldLabel(version, kind, label, value string) (string, string, error) { +func (c *checkConvertor) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error) { return "", "", fmt.Errorf("unexpected call to ConvertFieldLabel") } diff --git a/deps/k8s.io/apimachinery/pkg/runtime/serializer/yaml/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/serializer/yaml/BUILD deleted file mode 100644 index 104fa7a7b..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/serializer/yaml/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["yaml.go"], - importpath = "k8s.io/apimachinery/pkg/runtime/serializer/yaml", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/testing/BUILD b/deps/k8s.io/apimachinery/pkg/runtime/testing/BUILD deleted file mode 100644 index cee23e557..000000000 --- a/deps/k8s.io/apimachinery/pkg/runtime/testing/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/runtime/testing", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/runtime/testing/types.go b/deps/k8s.io/apimachinery/pkg/runtime/testing/types.go index f7345db0c..b8d67061d 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/testing/types.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/testing/types.go @@ -263,7 +263,7 @@ func (obj *Unstructured) EachListItem(fn func(runtime.Object) error) error { func (obj *Unstructured) UnstructuredContent() map[string]interface{} { if obj.Object == nil { - obj.Object = make(map[string]interface{}) + return make(map[string]interface{}) } return obj.Object } @@ -315,6 +315,9 @@ func (u *Unstructured) GroupVersionKind() schema.GroupVersionKind { } func (u *Unstructured) SetGroupVersionKind(gvk schema.GroupVersionKind) { + if u.Object == nil { + u.Object = make(map[string]interface{}) + } u.Object["apiVersion"] = gvk.GroupVersion().String() u.Object["kind"] = gvk.Kind } diff --git a/deps/k8s.io/apimachinery/pkg/runtime/testing/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/runtime/testing/zz_generated.deepcopy.go index 1927e34c5..d67d76dc8 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/testing/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/testing/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package testing @@ -28,14 +28,10 @@ import ( func (in *EmbeddedTest) DeepCopyInto(out *EmbeddedTest) { *out = *in out.TypeMeta = in.TypeMeta - if in.Object == nil { - out.Object = nil - } else { + if in.Object != nil { out.Object = in.Object.DeepCopyObject() } - if in.EmptyObject == nil { - out.EmptyObject = nil - } else { + if in.EmptyObject != nil { out.EmptyObject = in.EmptyObject.DeepCopyObject() } return @@ -55,9 +51,8 @@ func (in *EmbeddedTest) DeepCopy() *EmbeddedTest { func (in *EmbeddedTest) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -83,9 +78,8 @@ func (in *EmbeddedTestExternal) DeepCopy() *EmbeddedTestExternal { func (in *EmbeddedTestExternal) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -109,9 +103,8 @@ func (in *ExtensionA) DeepCopy() *ExtensionA { func (in *ExtensionA) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -135,9 +128,8 @@ func (in *ExtensionB) DeepCopy() *ExtensionB { func (in *ExtensionB) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -161,9 +153,8 @@ func (in *ExternalComplex) DeepCopy() *ExternalComplex { func (in *ExternalComplex) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -188,9 +179,8 @@ func (in *ExternalExtensionType) DeepCopy() *ExternalExtensionType { func (in *ExternalExtensionType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -215,9 +205,8 @@ func (in *ExternalInternalSame) DeepCopy() *ExternalInternalSame { func (in *ExternalInternalSame) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -242,9 +231,8 @@ func (in *ExternalOptionalExtensionType) DeepCopy() *ExternalOptionalExtensionTy func (in *ExternalOptionalExtensionType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -268,9 +256,8 @@ func (in *ExternalSimple) DeepCopy() *ExternalSimple { func (in *ExternalSimple) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -293,12 +280,8 @@ func (in *ExternalTestType1) DeepCopyInto(out *ExternalTestType1) { } if in.O != nil { in, out := &in.O, &out.O - if *in == nil { - *out = nil - } else { - *out = new(ExternalTestType2) - **out = **in - } + *out = new(ExternalTestType2) + **out = **in } if in.P != nil { in, out := &in.P, &out.P @@ -322,9 +305,8 @@ func (in *ExternalTestType1) DeepCopy() *ExternalTestType1 { func (in *ExternalTestType1) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -347,9 +329,8 @@ func (in *ExternalTestType2) DeepCopy() *ExternalTestType2 { func (in *ExternalTestType2) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -373,18 +354,15 @@ func (in *InternalComplex) DeepCopy() *InternalComplex { func (in *InternalComplex) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InternalExtensionType) DeepCopyInto(out *InternalExtensionType) { *out = *in out.TypeMeta = in.TypeMeta - if in.Extension == nil { - out.Extension = nil - } else { + if in.Extension != nil { out.Extension = in.Extension.DeepCopyObject() } return @@ -404,18 +382,15 @@ func (in *InternalExtensionType) DeepCopy() *InternalExtensionType { func (in *InternalExtensionType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InternalOptionalExtensionType) DeepCopyInto(out *InternalOptionalExtensionType) { *out = *in out.TypeMeta = in.TypeMeta - if in.Extension == nil { - out.Extension = nil - } else { + if in.Extension != nil { out.Extension = in.Extension.DeepCopyObject() } return @@ -435,9 +410,8 @@ func (in *InternalOptionalExtensionType) DeepCopy() *InternalOptionalExtensionTy func (in *InternalOptionalExtensionType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -461,9 +435,8 @@ func (in *InternalSimple) DeepCopy() *InternalSimple { func (in *InternalSimple) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -474,9 +447,7 @@ func (in *ObjectTest) DeepCopyInto(out *ObjectTest) { in, out := &in.Items, &out.Items *out = make([]runtime.Object, len(*in)) for i := range *in { - if (*in)[i] == nil { - (*out)[i] = nil - } else { + if (*in)[i] != nil { (*out)[i] = (*in)[i].DeepCopyObject() } } @@ -498,9 +469,8 @@ func (in *ObjectTest) DeepCopy() *ObjectTest { func (in *ObjectTest) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -531,9 +501,8 @@ func (in *ObjectTestExternal) DeepCopy() *ObjectTestExternal { func (in *ObjectTestExternal) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -556,12 +525,8 @@ func (in *TestType1) DeepCopyInto(out *TestType1) { } if in.O != nil { in, out := &in.O, &out.O - if *in == nil { - *out = nil - } else { - *out = new(TestType2) - **out = **in - } + *out = new(TestType2) + **out = **in } if in.P != nil { in, out := &in.P, &out.P @@ -585,9 +550,8 @@ func (in *TestType1) DeepCopy() *TestType1 { func (in *TestType1) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -610,9 +574,8 @@ func (in *TestType2) DeepCopy() *TestType2 { func (in *TestType2) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -636,9 +599,8 @@ func (in *UnknownType) DeepCopy() *UnknownType { func (in *UnknownType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -662,7 +624,6 @@ func (in *UnversionedType) DeepCopy() *UnversionedType { func (in *UnversionedType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go index 82cf19ce1..8b9182f35 100644 --- a/deps/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/runtime/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package runtime @@ -28,9 +28,7 @@ func (in *RawExtension) DeepCopyInto(out *RawExtension) { *out = make([]byte, len(*in)) copy(*out, *in) } - if in.Object == nil { - out.Object = nil - } else { + if in.Object != nil { out.Object = in.Object.DeepCopyObject() } return @@ -72,9 +70,8 @@ func (in *Unknown) DeepCopy() *Unknown { func (in *Unknown) DeepCopyObject() Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -84,9 +81,7 @@ func (in *VersionedObjects) DeepCopyInto(out *VersionedObjects) { in, out := &in.Objects, &out.Objects *out = make([]Object, len(*in)) for i := range *in { - if (*in)[i] == nil { - (*out)[i] = nil - } else { + if (*in)[i] != nil { (*out)[i] = (*in)[i].DeepCopyObject() } } @@ -108,7 +103,6 @@ func (in *VersionedObjects) DeepCopy() *VersionedObjects { func (in *VersionedObjects) DeepCopyObject() Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apimachinery/pkg/selection/BUILD b/deps/k8s.io/apimachinery/pkg/selection/BUILD deleted file mode 100644 index 3790df9af..000000000 --- a/deps/k8s.io/apimachinery/pkg/selection/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["operator.go"], - importpath = "k8s.io/apimachinery/pkg/selection", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/test/BUILD b/deps/k8s.io/apimachinery/pkg/test/BUILD deleted file mode 100644 index c4946d52a..000000000 --- a/deps/k8s.io/apimachinery/pkg/test/BUILD +++ /dev/null @@ -1,66 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "api_meta_help_test.go", - "api_meta_meta_test.go", - "apis_meta_v1_unstructed_unstructure_test.go", - "runtime_helper_test.go", - "runtime_serializer_protobuf_protobuf_test.go", - "runtime_unversioned_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/test", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/protobuf:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "util.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/testapigroup/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/test/apis_meta_v1_unstructed_unstructure_test.go b/deps/k8s.io/apimachinery/pkg/test/apis_meta_v1_unstructed_unstructure_test.go index 08179540e..4445fb0c2 100644 --- a/deps/k8s.io/apimachinery/pkg/test/apis_meta_v1_unstructed_unstructure_test.go +++ b/deps/k8s.io/apimachinery/pkg/test/apis_meta_v1_unstructed_unstructure_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - apitesting "k8s.io/apimachinery/pkg/api/testing" + apitesting "k8s.io/apimachinery/pkg/api/apitesting" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/apis/testapigroup" diff --git a/deps/k8s.io/apimachinery/pkg/test/runtime_helper_test.go b/deps/k8s.io/apimachinery/pkg/test/runtime_helper_test.go index 0106fb20b..31e6e7af5 100644 --- a/deps/k8s.io/apimachinery/pkg/test/runtime_helper_test.go +++ b/deps/k8s.io/apimachinery/pkg/test/runtime_helper_test.go @@ -19,7 +19,7 @@ package test import ( "testing" - apitesting "k8s.io/apimachinery/pkg/api/testing" + apitesting "k8s.io/apimachinery/pkg/api/apitesting" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/testapigroup" "k8s.io/apimachinery/pkg/runtime" diff --git a/deps/k8s.io/apimachinery/pkg/test/runtime_serializer_protobuf_protobuf_test.go b/deps/k8s.io/apimachinery/pkg/test/runtime_serializer_protobuf_protobuf_test.go index fb305d175..56afe11b9 100644 --- a/deps/k8s.io/apimachinery/pkg/test/runtime_serializer_protobuf_protobuf_test.go +++ b/deps/k8s.io/apimachinery/pkg/test/runtime_serializer_protobuf_protobuf_test.go @@ -24,6 +24,8 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/testapigroup/v1" @@ -331,7 +333,7 @@ func TestDecodeObjects(t *testing.T) { scheme := runtime.NewScheme() for i, test := range testCases { scheme.AddKnownTypes(schema.GroupVersion{Version: "v1"}, &v1.Carp{}) - v1.AddToScheme(scheme) + require.NoError(t, v1.AddToScheme(scheme)) s := protobuf.NewSerializer(scheme, scheme, "application/protobuf") obj, err := runtime.Decode(s, test.data) diff --git a/deps/k8s.io/apimachinery/pkg/test/runtime_unversioned_test.go b/deps/k8s.io/apimachinery/pkg/test/runtime_unversioned_test.go index 4bf833a93..4fa920650 100644 --- a/deps/k8s.io/apimachinery/pkg/test/runtime_unversioned_test.go +++ b/deps/k8s.io/apimachinery/pkg/test/runtime_unversioned_test.go @@ -23,7 +23,7 @@ import ( // TODO: Ideally we should create the necessary package structure in e.g., // pkg/conversion/test/... instead of importing pkg/api here. - apitesting "k8s.io/apimachinery/pkg/api/testing" + apitesting "k8s.io/apimachinery/pkg/api/apitesting" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/deps/k8s.io/apimachinery/pkg/test/util.go b/deps/k8s.io/apimachinery/pkg/test/util.go index 4ed5674d4..fb73461a3 100644 --- a/deps/k8s.io/apimachinery/pkg/test/util.go +++ b/deps/k8s.io/apimachinery/pkg/test/util.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" apiserializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) // List and ListV1 should be kept in sync with k8s.io/kubernetes/pkg/api#List @@ -61,8 +62,8 @@ func TestScheme() (*runtime.Scheme, apiserializer.CodecFactory) { &v1.CarpList{}, &List{}, ) - testapigroup.AddToScheme(scheme) - v1.AddToScheme(scheme) + utilruntime.Must(testapigroup.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) codecs := apiserializer.NewCodecFactory(scheme) return scheme, codecs diff --git a/deps/k8s.io/apimachinery/pkg/test/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/test/zz_generated.deepcopy.go index bf67d1681..34eae6fa7 100644 --- a/deps/k8s.io/apimachinery/pkg/test/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/test/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package test @@ -33,9 +33,7 @@ func (in *List) DeepCopyInto(out *List) { in, out := &in.Items, &out.Items *out = make([]runtime.Object, len(*in)) for i := range *in { - if (*in)[i] == nil { - (*out)[i] = nil - } else { + if (*in)[i] != nil { (*out)[i] = (*in)[i].DeepCopyObject() } } @@ -57,9 +55,8 @@ func (in *List) DeepCopy() *List { func (in *List) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -91,7 +88,6 @@ func (in *ListV1) DeepCopy() *ListV1 { func (in *ListV1) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apimachinery/pkg/types/BUILD b/deps/k8s.io/apimachinery/pkg/types/BUILD deleted file mode 100644 index 3db635c8a..000000000 --- a/deps/k8s.io/apimachinery/pkg/types/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "namespacedname.go", - "nodename.go", - "patch.go", - "uid.go", - ], - importpath = "k8s.io/apimachinery/pkg/types", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/types/namespacedname.go b/deps/k8s.io/apimachinery/pkg/types/namespacedname.go index 1e2130da0..88f0de36d 100644 --- a/deps/k8s.io/apimachinery/pkg/types/namespacedname.go +++ b/deps/k8s.io/apimachinery/pkg/types/namespacedname.go @@ -18,7 +18,6 @@ package types import ( "fmt" - "strings" ) // NamespacedName comprises a resource name, with a mandatory namespace, @@ -42,19 +41,3 @@ const ( func (n NamespacedName) String() string { return fmt.Sprintf("%s%c%s", n.Namespace, Separator, n.Name) } - -// NewNamespacedNameFromString parses the provided string and returns a NamespacedName. -// The expected format is as per String() above. -// If the input string is invalid, the returned NamespacedName has all empty string field values. -// This allows a single-value return from this function, while still allowing error checks in the caller. -// Note that an input string which does not include exactly one Separator is not a valid input (as it could never -// have neem returned by String() ) -func NewNamespacedNameFromString(s string) NamespacedName { - nn := NamespacedName{} - result := strings.Split(s, string(Separator)) - if len(result) == 2 { - nn.Namespace = result[0] - nn.Name = result[1] - } - return nn -} diff --git a/deps/k8s.io/apimachinery/pkg/util/cache/BUILD b/deps/k8s.io/apimachinery/pkg/util/cache/BUILD deleted file mode 100644 index 3b868ef57..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/cache/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "cache_test.go", - "lruexpirecache_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/cache", - deps = [ - "//vendor/github.com/golang/groupcache/lru:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "cache.go", - "lruexpirecache.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/cache", - deps = ["//vendor/github.com/hashicorp/golang-lru:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/clock/BUILD b/deps/k8s.io/apimachinery/pkg/util/clock/BUILD deleted file mode 100644 index e5c117d66..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/clock/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["clock_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/clock", -) - -go_library( - name = "go_default_library", - srcs = ["clock.go"], - importpath = "k8s.io/apimachinery/pkg/util/clock", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/clock/clock.go b/deps/k8s.io/apimachinery/pkg/util/clock/clock.go index c303a212a..9567f9006 100644 --- a/deps/k8s.io/apimachinery/pkg/util/clock/clock.go +++ b/deps/k8s.io/apimachinery/pkg/util/clock/clock.go @@ -26,18 +26,12 @@ import ( type Clock interface { Now() time.Time Since(time.Time) time.Duration - After(d time.Duration) <-chan time.Time - NewTimer(d time.Duration) Timer - Sleep(d time.Duration) - Tick(d time.Duration) <-chan time.Time + After(time.Duration) <-chan time.Time + NewTimer(time.Duration) Timer + Sleep(time.Duration) + NewTicker(time.Duration) Ticker } -var ( - _ = Clock(RealClock{}) - _ = Clock(&FakeClock{}) - _ = Clock(&IntervalClock{}) -) - // RealClock really calls time.Now() type RealClock struct{} @@ -62,8 +56,10 @@ func (RealClock) NewTimer(d time.Duration) Timer { } } -func (RealClock) Tick(d time.Duration) <-chan time.Time { - return time.Tick(d) +func (RealClock) NewTicker(d time.Duration) Ticker { + return &realTicker{ + ticker: time.NewTicker(d), + } } func (RealClock) Sleep(d time.Duration) { @@ -137,7 +133,7 @@ func (f *FakeClock) NewTimer(d time.Duration) Timer { return timer } -func (f *FakeClock) Tick(d time.Duration) <-chan time.Time { +func (f *FakeClock) NewTicker(d time.Duration) Ticker { f.lock.Lock() defer f.lock.Unlock() tickTime := f.time.Add(d) @@ -149,7 +145,9 @@ func (f *FakeClock) Tick(d time.Duration) <-chan time.Time { destChan: ch, }) - return ch + return &fakeTicker{ + c: ch, + } } // Move clock by Duration, notify anyone that's called After, Tick, or NewTimer @@ -242,8 +240,8 @@ func (*IntervalClock) NewTimer(d time.Duration) Timer { // Unimplemented, will panic. // TODO: make interval clock use FakeClock so this can be implemented. -func (*IntervalClock) Tick(d time.Duration) <-chan time.Time { - panic("IntervalClock doesn't implement Tick") +func (*IntervalClock) NewTicker(d time.Duration) Ticker { + panic("IntervalClock doesn't implement NewTicker") } func (*IntervalClock) Sleep(d time.Duration) { @@ -258,11 +256,6 @@ type Timer interface { Reset(d time.Duration) bool } -var ( - _ = Timer(&realTimer{}) - _ = Timer(&fakeTimer{}) -) - // realTimer is backed by an actual time.Timer. type realTimer struct { timer *time.Timer @@ -325,3 +318,31 @@ func (f *fakeTimer) Reset(d time.Duration) bool { return active } + +type Ticker interface { + C() <-chan time.Time + Stop() +} + +type realTicker struct { + ticker *time.Ticker +} + +func (t *realTicker) C() <-chan time.Time { + return t.ticker.C +} + +func (t *realTicker) Stop() { + t.ticker.Stop() +} + +type fakeTicker struct { + c <-chan time.Time +} + +func (t *fakeTicker) C() <-chan time.Time { + return t.c +} + +func (t *fakeTicker) Stop() { +} diff --git a/deps/k8s.io/apimachinery/pkg/util/clock/clock_test.go b/deps/k8s.io/apimachinery/pkg/util/clock/clock_test.go index 27d34605f..c7b371fc6 100644 --- a/deps/k8s.io/apimachinery/pkg/util/clock/clock_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/clock/clock_test.go @@ -21,6 +21,18 @@ import ( "time" ) +var ( + _ = Clock(RealClock{}) + _ = Clock(&FakeClock{}) + _ = Clock(&IntervalClock{}) + + _ = Timer(&realTimer{}) + _ = Timer(&fakeTimer{}) + + _ = Ticker(&realTicker{}) + _ = Ticker(&fakeTicker{}) +) + func TestFakeClock(t *testing.T) { startTime := time.Now() tc := NewFakeClock(startTime) @@ -110,13 +122,13 @@ func TestFakeTick(t *testing.T) { if tc.HasWaiters() { t.Errorf("unexpected waiter?") } - oneSec := tc.Tick(time.Second) + oneSec := tc.NewTicker(time.Second).C() if !tc.HasWaiters() { t.Errorf("unexpected lack of waiter?") } - oneOhOneSec := tc.Tick(time.Second + time.Millisecond) - twoSec := tc.Tick(2 * time.Second) + oneOhOneSec := tc.NewTicker(time.Second + time.Millisecond).C() + twoSec := tc.NewTicker(2 * time.Second).C() select { case <-oneSec: t.Errorf("unexpected channel read") diff --git a/deps/k8s.io/apimachinery/pkg/util/diff/BUILD b/deps/k8s.io/apimachinery/pkg/util/diff/BUILD deleted file mode 100644 index 47d9732b0..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/diff/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["diff_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/diff", -) - -go_library( - name = "go_default_library", - srcs = ["diff.go"], - importpath = "k8s.io/apimachinery/pkg/util/diff", - deps = [ - "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/diff/diff.go b/deps/k8s.io/apimachinery/pkg/util/diff/diff.go index 3d5ec14bf..06042617e 100644 --- a/deps/k8s.io/apimachinery/pkg/util/diff/diff.go +++ b/deps/k8s.io/apimachinery/pkg/util/diff/diff.go @@ -89,20 +89,60 @@ func ObjectReflectDiff(a, b interface{}) string { } out := []string{""} for _, d := range diffs { + elidedA, elidedB := limit(d.a, d.b, 80) out = append(out, fmt.Sprintf("%s:", d.path), - limit(fmt.Sprintf(" a: %#v", d.a), 80), - limit(fmt.Sprintf(" b: %#v", d.b), 80), + fmt.Sprintf(" a: %s", elidedA), + fmt.Sprintf(" b: %s", elidedB), ) } return strings.Join(out, "\n") } -func limit(s string, max int) string { - if len(s) > max { - return s[:max] +// limit: +// 1. stringifies aObj and bObj +// 2. elides identical prefixes if either is too long +// 3. elides remaining content from the end if either is too long +func limit(aObj, bObj interface{}, max int) (string, string) { + elidedPrefix := "" + elidedASuffix := "" + elidedBSuffix := "" + a, b := fmt.Sprintf("%#v", aObj), fmt.Sprintf("%#v", bObj) + + if aObj != nil && bObj != nil { + if aType, bType := fmt.Sprintf("%T", aObj), fmt.Sprintf("%T", bObj); aType != bType { + a = fmt.Sprintf("%s (%s)", a, aType) + b = fmt.Sprintf("%s (%s)", b, bType) + } + } + + for { + switch { + case len(a) > max && len(a) > 4 && len(b) > 4 && a[:4] == b[:4]: + // a is too long, b has data, and the first several characters are the same + elidedPrefix = "..." + a = a[2:] + b = b[2:] + + case len(b) > max && len(b) > 4 && len(a) > 4 && a[:4] == b[:4]: + // b is too long, a has data, and the first several characters are the same + elidedPrefix = "..." + a = a[2:] + b = b[2:] + + case len(a) > max: + a = a[:max] + elidedASuffix = "..." + + case len(b) > max: + b = b[:max] + elidedBSuffix = "..." + + default: + // both are short enough + return elidedPrefix + a + elidedASuffix, elidedPrefix + b + elidedBSuffix + } } - return s } func public(s string) bool { diff --git a/deps/k8s.io/apimachinery/pkg/util/diff/diff_test.go b/deps/k8s.io/apimachinery/pkg/util/diff/diff_test.go index 2b72c2f53..79ea2216d 100644 --- a/deps/k8s.io/apimachinery/pkg/util/diff/diff_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/diff/diff_test.go @@ -75,6 +75,11 @@ object.A: a: []int(nil) b: []int{}`, }, + "display type differences": {a: []interface{}{int64(1)}, b: []interface{}{uint64(1)}, out: ` +object[0]: + a: 1 (int64) + b: 0x1 (uint64)`, + }, } for name, test := range testCases { expect := test.out @@ -94,3 +99,50 @@ func TestStringDiff(t *testing.T) { t.Errorf("diff returned %v", diff) } } + +func TestLimit(t *testing.T) { + testcases := []struct { + a interface{} + b interface{} + expectA string + expectB string + }{ + { + a: `short a`, + b: `short b`, + expectA: `"short a"`, + expectB: `"short b"`, + }, + { + a: `short a`, + b: `long b needs truncating`, + expectA: `"short a"`, + expectB: `"long b ne...`, + }, + { + a: `long a needs truncating`, + b: `long b needs truncating`, + expectA: `...g a needs ...`, + expectB: `...g b needs ...`, + }, + { + a: `long common prefix with different stuff at the end of a`, + b: `long common prefix with different stuff at the end of b`, + expectA: `...end of a"`, + expectB: `...end of b"`, + }, + { + a: `long common prefix with different stuff at the end of a`, + b: `long common prefix with different stuff at the end of b which continues`, + expectA: `...of a"`, + expectB: `...of b which...`, + }, + } + + for _, tc := range testcases { + a, b := limit(tc.a, tc.b, 10) + if a != tc.expectA || b != tc.expectB { + t.Errorf("limit(%q, %q)\n\texpected: %s, %s\n\tgot: %s, %s", tc.a, tc.b, tc.expectA, tc.expectB, a, b) + } + } +} diff --git a/deps/k8s.io/apimachinery/pkg/util/duration/duration.go b/deps/k8s.io/apimachinery/pkg/util/duration/duration.go new file mode 100644 index 000000000..961ec5ed8 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/util/duration/duration.go @@ -0,0 +1,89 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package duration + +import ( + "fmt" + "time" +) + +// ShortHumanDuration returns a succint representation of the provided duration +// with limited precision for consumption by humans. +func ShortHumanDuration(d time.Duration) string { + // Allow deviation no more than 2 seconds(excluded) to tolerate machine time + // inconsistence, it can be considered as almost now. + if seconds := int(d.Seconds()); seconds < -1 { + return fmt.Sprintf("") + } else if seconds < 0 { + return fmt.Sprintf("0s") + } else if seconds < 60 { + return fmt.Sprintf("%ds", seconds) + } else if minutes := int(d.Minutes()); minutes < 60 { + return fmt.Sprintf("%dm", minutes) + } else if hours := int(d.Hours()); hours < 24 { + return fmt.Sprintf("%dh", hours) + } else if hours < 24*365 { + return fmt.Sprintf("%dd", hours/24) + } + return fmt.Sprintf("%dy", int(d.Hours()/24/365)) +} + +// HumanDuration returns a succint representation of the provided duration +// with limited precision for consumption by humans. It provides ~2-3 significant +// figures of duration. +func HumanDuration(d time.Duration) string { + // Allow deviation no more than 2 seconds(excluded) to tolerate machine time + // inconsistence, it can be considered as almost now. + if seconds := int(d.Seconds()); seconds < -1 { + return fmt.Sprintf("") + } else if seconds < 0 { + return fmt.Sprintf("0s") + } else if seconds < 60*2 { + return fmt.Sprintf("%ds", seconds) + } + minutes := int(d / time.Minute) + if minutes < 10 { + s := int(d/time.Second) % 60 + if s == 0 { + return fmt.Sprintf("%dm", minutes) + } + return fmt.Sprintf("%dm%ds", minutes, s) + } else if minutes < 60*3 { + return fmt.Sprintf("%dm", minutes) + } + hours := int(d / time.Hour) + if hours < 8 { + m := int(d/time.Minute) % 60 + if m == 0 { + return fmt.Sprintf("%dh", hours) + } + return fmt.Sprintf("%dh%dm", hours, m) + } else if hours < 48 { + return fmt.Sprintf("%dh", hours) + } else if hours < 24*8 { + h := hours % 24 + if h == 0 { + return fmt.Sprintf("%dd", hours/24) + } + return fmt.Sprintf("%dd%dh", hours/24, h) + } else if hours < 24*365*2 { + return fmt.Sprintf("%dd", hours/24) + } else if hours < 24*365*8 { + return fmt.Sprintf("%dy%dd", hours/24/365, (hours/24)%365) + } + return fmt.Sprintf("%dy", int(hours/24/365)) +} diff --git a/deps/k8s.io/apimachinery/pkg/util/duration/duration_test.go b/deps/k8s.io/apimachinery/pkg/util/duration/duration_test.go new file mode 100644 index 000000000..f11d5386c --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/util/duration/duration_test.go @@ -0,0 +1,47 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package duration + +import ( + "testing" + "time" +) + +func TestHumanDuration(t *testing.T) { + tests := []struct { + d time.Duration + want string + }{ + {d: time.Second, want: "1s"}, + {d: 70 * time.Second, want: "70s"}, + {d: 190 * time.Second, want: "3m10s"}, + {d: 70 * time.Minute, want: "70m"}, + {d: 47 * time.Hour, want: "47h"}, + {d: 49 * time.Hour, want: "2d1h"}, + {d: (8*24 + 2) * time.Hour, want: "8d"}, + {d: (367 * 24) * time.Hour, want: "367d"}, + {d: (365*2*24 + 25) * time.Hour, want: "2y1d"}, + {d: (365*8*24 + 2) * time.Hour, want: "8y"}, + } + for _, tt := range tests { + t.Run(tt.d.String(), func(t *testing.T) { + if got := HumanDuration(tt.d); got != tt.want { + t.Errorf("HumanDuration() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/util/errors/BUILD b/deps/k8s.io/apimachinery/pkg/util/errors/BUILD deleted file mode 100644 index 61999329a..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/errors/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["errors_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/errors", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/errors", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/framer/BUILD b/deps/k8s.io/apimachinery/pkg/util/framer/BUILD deleted file mode 100644 index 8022f0aba..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/framer/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["framer_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/framer", -) - -go_library( - name = "go_default_library", - srcs = ["framer.go"], - importpath = "k8s.io/apimachinery/pkg/util/framer", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/httpstream/BUILD b/deps/k8s.io/apimachinery/pkg/util/httpstream/BUILD deleted file mode 100644 index 6450c3a6d..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/httpstream/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["httpstream_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/httpstream", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "httpstream.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/httpstream", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD b/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD deleted file mode 100644 index 278bf12ae..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/BUILD +++ /dev/null @@ -1,57 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "connection_test.go", - "roundtripper_test.go", - "upgrade_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/httpstream/spdy", - deps = [ - "//vendor/github.com/elazarl/goproxy:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "connection.go", - "roundtripper.go", - "upgrade.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/httpstream/spdy", - deps = [ - "//vendor/github.com/docker/spdystream:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/third_party/forked/golang/netutil:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go b/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go index d2d3ad8cb..dd781cbc8 100644 --- a/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go +++ b/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go @@ -19,6 +19,7 @@ package spdy import ( "bufio" "bytes" + "context" "crypto/tls" "encoding/base64" "fmt" @@ -118,7 +119,7 @@ func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) { } if proxyURL == nil { - return s.dialWithoutProxy(req.URL) + return s.dialWithoutProxy(req.Context(), req.URL) } // ensure we use a canonical host with proxyReq @@ -136,7 +137,7 @@ func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) { proxyReq.Header.Set("Proxy-Authorization", pa) } - proxyDialConn, err := s.dialWithoutProxy(proxyURL) + proxyDialConn, err := s.dialWithoutProxy(req.Context(), proxyURL) if err != nil { return nil, err } @@ -187,14 +188,15 @@ func (s *SpdyRoundTripper) dial(req *http.Request) (net.Conn, error) { } // dialWithoutProxy dials the host specified by url, using TLS if appropriate. -func (s *SpdyRoundTripper) dialWithoutProxy(url *url.URL) (net.Conn, error) { +func (s *SpdyRoundTripper) dialWithoutProxy(ctx context.Context, url *url.URL) (net.Conn, error) { dialAddr := netutil.CanonicalAddr(url) if url.Scheme == "http" { if s.Dialer == nil { - return net.Dial("tcp", dialAddr) + var d net.Dialer + return d.DialContext(ctx, "tcp", dialAddr) } else { - return s.Dialer.Dial("tcp", dialAddr) + return s.Dialer.DialContext(ctx, "tcp", dialAddr) } } diff --git a/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go b/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go index 887adbe8f..fb396bca5 100644 --- a/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper_test.go @@ -399,7 +399,7 @@ func TestRoundTripRedirects(t *testing.T) { var redirects int32 = 0 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { if redirects < test.redirects { - redirects = atomic.AddInt32(&redirects, 1) + atomic.AddInt32(&redirects, 1) http.Redirect(w, req, "redirect", http.StatusFound) return } diff --git a/deps/k8s.io/apimachinery/pkg/util/initialization/BUILD b/deps/k8s.io/apimachinery/pkg/util/initialization/BUILD deleted file mode 100644 index 37691997b..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/initialization/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["initialization.go"], - importpath = "k8s.io/apimachinery/pkg/util/initialization", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/intstr/BUILD b/deps/k8s.io/apimachinery/pkg/util/intstr/BUILD deleted file mode 100644 index b4fe3922f..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/intstr/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["intstr_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/intstr", - deps = ["//vendor/github.com/ghodss/yaml:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "generated.pb.go", - "intstr.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/intstr", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/google/gofuzz:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go b/deps/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go index 161e9a6f8..5c2ac4f23 100644 --- a/deps/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go +++ b/deps/k8s.io/apimachinery/pkg/util/intstr/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/deps/k8s.io/apimachinery/pkg/util/intstr/generated.proto b/deps/k8s.io/apimachinery/pkg/util/intstr/generated.proto index 6819d468d..1c3ec732e 100644 --- a/deps/k8s.io/apimachinery/pkg/util/intstr/generated.proto +++ b/deps/k8s.io/apimachinery/pkg/util/intstr/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/deps/k8s.io/apimachinery/pkg/util/intstr/intstr.go b/deps/k8s.io/apimachinery/pkg/util/intstr/intstr.go index 231498ca0..642b83cec 100644 --- a/deps/k8s.io/apimachinery/pkg/util/intstr/intstr.go +++ b/deps/k8s.io/apimachinery/pkg/util/intstr/intstr.go @@ -18,6 +18,7 @@ package intstr import ( "encoding/json" + "errors" "fmt" "math" "runtime/debug" @@ -142,7 +143,17 @@ func (intstr *IntOrString) Fuzz(c fuzz.Continue) { } } +func ValueOrDefault(intOrPercent *IntOrString, defaultValue IntOrString) *IntOrString { + if intOrPercent == nil { + return &defaultValue + } + return intOrPercent +} + func GetValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) { + if intOrPercent == nil { + return 0, errors.New("nil value for IntOrString") + } value, isPercent, err := getIntOrPercentValue(intOrPercent) if err != nil { return 0, fmt.Errorf("invalid value for IntOrString: %v", err) diff --git a/deps/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go b/deps/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go index 4faba46f8..690fe2d53 100644 --- a/deps/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go @@ -174,3 +174,10 @@ func TestGetValueFromIntOrPercent(t *testing.T) { } } } + +func TestGetValueFromIntOrPercentNil(t *testing.T) { + _, err := GetValueFromIntOrPercent(nil, 0, false) + if err == nil { + t.Errorf("expected error got none") + } +} diff --git a/deps/k8s.io/apimachinery/pkg/util/json/BUILD b/deps/k8s.io/apimachinery/pkg/util/json/BUILD deleted file mode 100644 index 5838be3f7..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/json/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["json.go"], - importpath = "k8s.io/apimachinery/pkg/util/json", -) - -go_test( - name = "go_default_test", - srcs = ["json_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/json", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/BUILD b/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/BUILD deleted file mode 100644 index 233ccad91..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["patch_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/jsonmergepatch", - deps = [ - "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/github.com/evanphx/json-patch:go_default_library", - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["patch.go"], - importpath = "k8s.io/apimachinery/pkg/util/jsonmergepatch", - deps = [ - "//vendor/github.com/evanphx/json-patch:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/mergepatch:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch.go b/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch.go index e81e4f23a..e56e17734 100644 --- a/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch.go +++ b/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch.go @@ -116,11 +116,27 @@ func keepOrDeleteNullInObj(m map[string]interface{}, keepNull bool) (map[string] case val != nil: switch typedVal := val.(type) { case map[string]interface{}: - filteredMap[key], err = keepOrDeleteNullInObj(typedVal, keepNull) + // Explicitly-set empty maps are treated as values instead of empty patches + if len(typedVal) == 0 { + if !keepNull { + filteredMap[key] = typedVal + } + continue + } + + var filteredSubMap map[string]interface{} + filteredSubMap, err = keepOrDeleteNullInObj(typedVal, keepNull) if err != nil { return nil, err } - case []interface{}, string, float64, bool, int, int64, nil: + + // If the returned filtered submap was empty, this is an empty patch for the entire subdict, so the key + // should not be set + if len(filteredSubMap) != 0 { + filteredMap[key] = filteredSubMap + } + + case []interface{}, string, float64, bool, int64, nil: // Lists are always replaced in Json, no need to check each entry in the list. if !keepNull { filteredMap[key] = val diff --git a/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go b/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go index f462bf915..9672deaad 100644 --- a/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/jsonmergepatch/patch_test.go @@ -62,12 +62,12 @@ testCases: expectedWithoutNull: {} - description: simple map with all non-nil values originalObj: - nonNilKey: foo - nonNilKey: bar + nonNilKey1: foo + nonNilKey2: bar expectedWithNull: {} expectedWithoutNull: - nonNilKey: foo - nonNilKey: bar + nonNilKey1: foo + nonNilKey2: bar - description: nested map originalObj: mapKey: @@ -88,19 +88,52 @@ testCases: mapKey: nilKey1: null nilKey2: null + expectedWithoutNull: {} + - description: nested map that all subkeys are non-nil + originalObj: + mapKey: + nonNilKey1: foo + nonNilKey2: bar + expectedWithNull: {} expectedWithoutNull: + mapKey: + nonNilKey1: foo + nonNilKey2: bar + - description: explicitly empty map as value + originalObj: mapKey: {} - - description: nested map that all subkeys are non-nil + expectedWithNull: {} + expectedWithoutNull: + mapKey: {} + - description: explicitly empty nested map originalObj: mapKey: - nonNilKey: foo - nonNilKey: bar + nonNilKey: {} + expectedWithNull: {} + expectedWithoutNull: + mapKey: + nonNilKey: {} + - description: multiple expliclty empty nested maps + originalObj: + mapKey: + nonNilKey1: {} + nonNilKey2: {} + expectedWithNull: {} + expectedWithoutNull: + mapKey: + nonNilKey1: {} + nonNilKey2: {} + - description: nested map with non-null value as empty map + originalObj: + mapKey: + nonNilKey: {} + nilKey: null expectedWithNull: - mapKey: {} + mapKey: + nilKey: null expectedWithoutNull: mapKey: - nonNilKey: foo - nonNilKey: bar + nonNilKey: {} - description: empty list originalObj: listKey: [] diff --git a/deps/k8s.io/apimachinery/pkg/util/mergepatch/BUILD b/deps/k8s.io/apimachinery/pkg/util/mergepatch/BUILD deleted file mode 100644 index 3f50c7618..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/mergepatch/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["util_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/mergepatch", -) - -go_library( - name = "go_default_library", - srcs = [ - "errors.go", - "util.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/mergepatch", - deps = [ - "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/github.com/ghodss/yaml:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/mergepatch/util.go b/deps/k8s.io/apimachinery/pkg/util/mergepatch/util.go index 9261290a7..d09a939be 100644 --- a/deps/k8s.io/apimachinery/pkg/util/mergepatch/util.go +++ b/deps/k8s.io/apimachinery/pkg/util/mergepatch/util.go @@ -125,7 +125,7 @@ func HasConflicts(left, right interface{}) (bool, error) { default: return true, nil } - case string, float64, bool, int, int64, nil: + case string, float64, bool, int64, nil: return !reflect.DeepEqual(left, right), nil default: return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left)) diff --git a/deps/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go b/deps/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go index 1b37e3ef5..e74dfabd4 100644 --- a/deps/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/mergepatch/util_test.go @@ -30,82 +30,80 @@ func TestHasConflicts(t *testing.T) { {A: "hello", B: "hello", Ret: false}, {A: "hello", B: "hell", Ret: true}, {A: "hello", B: nil, Ret: true}, - {A: "hello", B: 1, Ret: true}, + {A: "hello", B: int64(1), Ret: true}, {A: "hello", B: float64(1.0), Ret: true}, {A: "hello", B: false, Ret: true}, - {A: 1, B: 1, Ret: false}, + {A: int64(1), B: int64(1), Ret: false}, {A: nil, B: nil, Ret: false}, {A: false, B: false, Ret: false}, {A: float64(3), B: float64(3), Ret: false}, {A: "hello", B: []interface{}{}, Ret: true}, - {A: []interface{}{1}, B: []interface{}{}, Ret: true}, + {A: []interface{}{int64(1)}, B: []interface{}{}, Ret: true}, {A: []interface{}{}, B: []interface{}{}, Ret: false}, - {A: []interface{}{1}, B: []interface{}{1}, Ret: false}, - {A: map[string]interface{}{}, B: []interface{}{1}, Ret: true}, + {A: []interface{}{int64(1)}, B: []interface{}{int64(1)}, Ret: false}, + {A: map[string]interface{}{}, B: []interface{}{int64(1)}, Ret: true}, - {A: map[string]interface{}{}, B: map[string]interface{}{"a": 1}, Ret: false}, - {A: map[string]interface{}{"a": 1}, B: map[string]interface{}{"a": 1}, Ret: false}, - {A: map[string]interface{}{"a": 1}, B: map[string]interface{}{"a": 2}, Ret: true}, - {A: map[string]interface{}{"a": 1}, B: map[string]interface{}{"b": 2}, Ret: false}, + {A: map[string]interface{}{}, B: map[string]interface{}{"a": int64(1)}, Ret: false}, + {A: map[string]interface{}{"a": int64(1)}, B: map[string]interface{}{"a": int64(1)}, Ret: false}, + {A: map[string]interface{}{"a": int64(1)}, B: map[string]interface{}{"a": int64(2)}, Ret: true}, + {A: map[string]interface{}{"a": int64(1)}, B: map[string]interface{}{"b": int64(2)}, Ret: false}, { - A: map[string]interface{}{"a": []interface{}{1}}, - B: map[string]interface{}{"a": []interface{}{1}}, + A: map[string]interface{}{"a": []interface{}{int64(1)}}, + B: map[string]interface{}{"a": []interface{}{int64(1)}}, Ret: false, }, { - A: map[string]interface{}{"a": []interface{}{1}}, + A: map[string]interface{}{"a": []interface{}{int64(1)}}, B: map[string]interface{}{"a": []interface{}{}}, Ret: true, }, { - A: map[string]interface{}{"a": []interface{}{1}}, - B: map[string]interface{}{"a": 1}, + A: map[string]interface{}{"a": []interface{}{int64(1)}}, + B: map[string]interface{}{"a": int64(1)}, Ret: true, }, // Maps and lists with multiple entries. { - A: map[string]interface{}{"a": 1, "b": 2}, - B: map[string]interface{}{"a": 1, "b": 0}, + A: map[string]interface{}{"a": int64(1), "b": int64(2)}, + B: map[string]interface{}{"a": int64(1), "b": int64(0)}, Ret: true, }, { - A: map[string]interface{}{"a": 1, "b": 2}, - B: map[string]interface{}{"a": 1, "b": 2}, + A: map[string]interface{}{"a": int64(1), "b": int64(2)}, + B: map[string]interface{}{"a": int64(1), "b": int64(2)}, Ret: false, }, { - A: map[string]interface{}{"a": 1, "b": 2}, - B: map[string]interface{}{"a": 1, "b": 0, "c": 3}, + A: map[string]interface{}{"a": int64(1), "b": int64(2)}, + B: map[string]interface{}{"a": int64(1), "b": int64(0), "c": int64(3)}, Ret: true, }, { - A: map[string]interface{}{"a": 1, "b": 2}, - B: map[string]interface{}{"a": 1, "b": 2, "c": 3}, + A: map[string]interface{}{"a": int64(1), "b": int64(2)}, + B: map[string]interface{}{"a": int64(1), "b": int64(2), "c": int64(3)}, Ret: false, }, { - A: map[string]interface{}{"a": []interface{}{1, 2}}, - B: map[string]interface{}{"a": []interface{}{1, 0}}, + A: map[string]interface{}{"a": []interface{}{int64(1), int64(2)}}, + B: map[string]interface{}{"a": []interface{}{int64(1), int64(0)}}, Ret: true, }, { - A: map[string]interface{}{"a": []interface{}{1, 2}}, - B: map[string]interface{}{"a": []interface{}{1, 2}}, + A: map[string]interface{}{"a": []interface{}{int64(1), int64(2)}}, + B: map[string]interface{}{"a": []interface{}{int64(1), int64(2)}}, Ret: false, }, // Numeric types are not interchangeable. // Callers are expected to ensure numeric types are consistent in 'left' and 'right'. - {A: int(0), B: int64(0), Ret: true}, - {A: int(0), B: float64(0), Ret: true}, {A: int64(0), B: float64(0), Ret: true}, // Other types are not interchangeable. - {A: int(0), B: "0", Ret: true}, - {A: int(0), B: nil, Ret: true}, - {A: int(0), B: false, Ret: true}, + {A: int64(0), B: "0", Ret: true}, + {A: int64(0), B: nil, Ret: true}, + {A: int64(0), B: false, Ret: true}, {A: "true", B: true, Ret: true}, {A: "null", B: nil, Ret: true}, } diff --git a/deps/k8s.io/apimachinery/pkg/util/naming/from_stack.go b/deps/k8s.io/apimachinery/pkg/util/naming/from_stack.go new file mode 100644 index 000000000..2965d5a8b --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/util/naming/from_stack.go @@ -0,0 +1,93 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package naming + +import ( + "fmt" + "regexp" + goruntime "runtime" + "runtime/debug" + "strconv" + "strings" +) + +// GetNameFromCallsite walks back through the call stack until we find a caller from outside of the ignoredPackages +// it returns back a shortpath/filename:line to aid in identification of this reflector when it starts logging +func GetNameFromCallsite(ignoredPackages ...string) string { + name := "????" + const maxStack = 10 + for i := 1; i < maxStack; i++ { + _, file, line, ok := goruntime.Caller(i) + if !ok { + file, line, ok = extractStackCreator() + if !ok { + break + } + i += maxStack + } + if hasPackage(file, append(ignoredPackages, "/runtime/asm_")) { + continue + } + + file = trimPackagePrefix(file) + name = fmt.Sprintf("%s:%d", file, line) + break + } + return name +} + +// hasPackage returns true if the file is in one of the ignored packages. +func hasPackage(file string, ignoredPackages []string) bool { + for _, ignoredPackage := range ignoredPackages { + if strings.Contains(file, ignoredPackage) { + return true + } + } + return false +} + +// trimPackagePrefix reduces duplicate values off the front of a package name. +func trimPackagePrefix(file string) string { + if l := strings.LastIndex(file, "/vendor/"); l >= 0 { + return file[l+len("/vendor/"):] + } + if l := strings.LastIndex(file, "/src/"); l >= 0 { + return file[l+5:] + } + if l := strings.LastIndex(file, "/pkg/"); l >= 0 { + return file[l+1:] + } + return file +} + +var stackCreator = regexp.MustCompile(`(?m)^created by (.*)\n\s+(.*):(\d+) \+0x[[:xdigit:]]+$`) + +// extractStackCreator retrieves the goroutine file and line that launched this stack. Returns false +// if the creator cannot be located. +// TODO: Go does not expose this via runtime https://github.com/golang/go/issues/11440 +func extractStackCreator() (string, int, bool) { + stack := debug.Stack() + matches := stackCreator.FindStringSubmatch(string(stack)) + if matches == nil || len(matches) != 4 { + return "", 0, false + } + line, err := strconv.Atoi(matches[3]) + if err != nil { + return "", 0, false + } + return matches[2], line, true +} diff --git a/deps/k8s.io/apimachinery/pkg/util/naming/from_stack_test.go b/deps/k8s.io/apimachinery/pkg/util/naming/from_stack_test.go new file mode 100644 index 000000000..1ff1ec8ad --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/util/naming/from_stack_test.go @@ -0,0 +1,56 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package naming + +import "testing" + +func TestGetNameFromCallsite(t *testing.T) { + tests := []struct { + name string + ignoredPackages []string + expected string + }{ + { + name: "simple", + expected: "k8s.io/apimachinery/pkg/util/naming/from_stack_test.go:50", + }, + { + name: "ignore-package", + ignoredPackages: []string{"k8s.io/apimachinery/pkg/util/naming"}, + expected: "testing/testing.go:777", + }, + { + name: "ignore-file", + ignoredPackages: []string{"k8s.io/apimachinery/pkg/util/naming/from_stack_test.go"}, + expected: "testing/testing.go:777", + }, + { + name: "ignore-multiple", + ignoredPackages: []string{"k8s.io/apimachinery/pkg/util/naming/from_stack_test.go", "testing/testing.go"}, + expected: "????", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + actual := GetNameFromCallsite(tc.ignoredPackages...) + if tc.expected != actual { + t.Fatalf("expected %q, got %q", tc.expected, actual) + } + }) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/util/net/BUILD b/deps/k8s.io/apimachinery/pkg/util/net/BUILD deleted file mode 100644 index 8f6999c92..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/net/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "http_test.go", - "interface_test.go", - "port_range_test.go", - "port_split_test.go", - "util_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/net", - deps = ["//vendor/github.com/spf13/pflag:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "http.go", - "interface.go", - "port_range.go", - "port_split.go", - "util.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/net", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/http2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/net/http.go b/deps/k8s.io/apimachinery/pkg/util/net/http.go index bc2a531b9..8abbdea82 100644 --- a/deps/k8s.io/apimachinery/pkg/util/net/http.go +++ b/deps/k8s.io/apimachinery/pkg/util/net/http.go @@ -19,6 +19,7 @@ package net import ( "bufio" "bytes" + "context" "crypto/tls" "fmt" "io" @@ -61,6 +62,9 @@ func JoinPreservingTrailingSlash(elem ...string) string { // differentiate probable errors in connection behavior between normal "this is // disconnected" should use the method. func IsProbableEOF(err error) bool { + if err == nil { + return false + } if uerr, ok := err.(*url.Error); ok { err = uerr.Err } @@ -87,8 +91,9 @@ func SetOldTransportDefaults(t *http.Transport) *http.Transport { // ProxierWithNoProxyCIDR allows CIDR rules in NO_PROXY t.Proxy = NewProxierWithNoProxyCIDR(http.ProxyFromEnvironment) } - if t.Dial == nil { - t.Dial = defaultTransport.Dial + // If no custom dialer is set, use the default context dialer + if t.DialContext == nil && t.Dial == nil { + t.DialContext = defaultTransport.DialContext } if t.TLSHandshakeTimeout == 0 { t.TLSHandshakeTimeout = defaultTransport.TLSHandshakeTimeout @@ -116,7 +121,7 @@ type RoundTripperWrapper interface { WrappedRoundTripper() http.RoundTripper } -type DialFunc func(net, addr string) (net.Conn, error) +type DialFunc func(ctx context.Context, net, addr string) (net.Conn, error) func DialerFor(transport http.RoundTripper) (DialFunc, error) { if transport == nil { @@ -125,7 +130,18 @@ func DialerFor(transport http.RoundTripper) (DialFunc, error) { switch transport := transport.(type) { case *http.Transport: - return transport.Dial, nil + // transport.DialContext takes precedence over transport.Dial + if transport.DialContext != nil { + return transport.DialContext, nil + } + // adapt transport.Dial to the DialWithContext signature + if transport.Dial != nil { + return func(ctx context.Context, net, addr string) (net.Conn, error) { + return transport.Dial(net, addr) + }, nil + } + // otherwise return nil + return nil, nil case RoundTripperWrapper: return DialerFor(transport.WrappedRoundTripper()) default: @@ -163,10 +179,8 @@ func FormatURL(scheme string, host string, port int, path string) *url.URL { } func GetHTTPClient(req *http.Request) string { - if userAgent, ok := req.Header["User-Agent"]; ok { - if len(userAgent) > 0 { - return userAgent[0] - } + if ua := req.UserAgent(); len(ua) != 0 { + return ua } return "unknown" } diff --git a/deps/k8s.io/apimachinery/pkg/util/net/interface_test.go b/deps/k8s.io/apimachinery/pkg/util/net/interface_test.go index 5f42852ce..4799d43ae 100644 --- a/deps/k8s.io/apimachinery/pkg/util/net/interface_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/net/interface_test.go @@ -623,7 +623,7 @@ func TestFailGettingIPv4Routes(t *testing.T) { errStrFrag := "no such file" _, err := v4File.extract() if err == nil { - fmt.Errorf("Expected error trying to read non-existent v4 route file") + t.Errorf("Expected error trying to read non-existent v4 route file") } if !strings.Contains(err.Error(), errStrFrag) { t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) @@ -638,7 +638,7 @@ func TestFailGettingIPv6Routes(t *testing.T) { errStrFrag := "no such file" _, err := v6File.extract() if err == nil { - fmt.Errorf("Expected error trying to read non-existent v6 route file") + t.Errorf("Expected error trying to read non-existent v6 route file") } if !strings.Contains(err.Error(), errStrFrag) { t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) @@ -653,7 +653,7 @@ func TestGetAllDefaultRoutesFailNoV4RouteFile(t *testing.T) { errStrFrag := "no such file" _, err := getAllDefaultRoutes() if err == nil { - fmt.Errorf("Expected error trying to read non-existent v4 route file") + t.Errorf("Expected error trying to read non-existent v4 route file") } if !strings.Contains(err.Error(), errStrFrag) { t.Errorf("Unable to find %q in error string %q", errStrFrag, err.Error()) diff --git a/deps/k8s.io/apimachinery/pkg/util/net/port_range.go b/deps/k8s.io/apimachinery/pkg/util/net/port_range.go index 6a50e6186..7b6eca893 100644 --- a/deps/k8s.io/apimachinery/pkg/util/net/port_range.go +++ b/deps/k8s.io/apimachinery/pkg/util/net/port_range.go @@ -43,14 +43,19 @@ func (pr PortRange) String() string { return fmt.Sprintf("%d-%d", pr.Base, pr.Base+pr.Size-1) } -// Set parses a string of the form "min-max", inclusive at both ends, and +// Set parses a string of the form "value", "min-max", or "min+offset", inclusive at both ends, and // sets the PortRange from it. This is part of the flag.Value and pflag.Value // interfaces. func (pr *PortRange) Set(value string) error { - value = strings.TrimSpace(value) + const ( + SinglePortNotation = 1 << iota + HyphenNotation + PlusNotation + ) - // TODO: Accept "80" syntax - // TODO: Accept "80+8" syntax + value = strings.TrimSpace(value) + hyphenIndex := strings.Index(value, "-") + plusIndex := strings.Index(value, "+") if value == "" { pr.Base = 0 @@ -58,20 +63,51 @@ func (pr *PortRange) Set(value string) error { return nil } - hyphenIndex := strings.Index(value, "-") - if hyphenIndex == -1 { - return fmt.Errorf("expected hyphen in port range") + var err error + var low, high int + var notation int + + if plusIndex == -1 && hyphenIndex == -1 { + notation |= SinglePortNotation + } + if hyphenIndex != -1 { + notation |= HyphenNotation + } + if plusIndex != -1 { + notation |= PlusNotation } - var err error - var low int - var high int - low, err = strconv.Atoi(value[:hyphenIndex]) - if err == nil { + switch notation { + case SinglePortNotation: + var port int + port, err = strconv.Atoi(value) + if err != nil { + return err + } + low = port + high = port + case HyphenNotation: + low, err = strconv.Atoi(value[:hyphenIndex]) + if err != nil { + return err + } high, err = strconv.Atoi(value[hyphenIndex+1:]) - } - if err != nil { - return fmt.Errorf("unable to parse port range: %s: %v", value, err) + if err != nil { + return err + } + case PlusNotation: + var offset int + low, err = strconv.Atoi(value[:plusIndex]) + if err != nil { + return err + } + offset, err = strconv.Atoi(value[plusIndex+1:]) + if err != nil { + return err + } + high = low + offset + default: + return fmt.Errorf("unable to parse port range: %s", value) } if low > 65535 || high > 65535 { diff --git a/deps/k8s.io/apimachinery/pkg/util/net/port_range_test.go b/deps/k8s.io/apimachinery/pkg/util/net/port_range_test.go index 897b8df61..b4cbe8245 100644 --- a/deps/k8s.io/apimachinery/pkg/util/net/port_range_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/net/port_range_test.go @@ -34,13 +34,21 @@ func TestPortRange(t *testing.T) { {" 100-200 ", true, "100-200", 200, 201}, {"0-0", true, "0-0", 0, 1}, {"", true, "", -1, 0}, - {"100", false, "", -1, -1}, + {"100", true, "100-100", 100, 101}, {"100 - 200", false, "", -1, -1}, {"-100", false, "", -1, -1}, {"100-", false, "", -1, -1}, {"200-100", false, "", -1, -1}, {"60000-70000", false, "", -1, -1}, {"70000-80000", false, "", -1, -1}, + {"70000+80000", false, "", -1, -1}, + {"1+0", true, "1-1", 1, 2}, + {"0+0", true, "0-0", 0, 1}, + {"1+-1", false, "", -1, -1}, + {"1-+1", false, "", -1, -1}, + {"100+200", true, "100-300", 300, 301}, + {"1+65535", false, "", -1, -1}, + {"0+65535", true, "0-65535", 65535, 65536}, } for i := range testCases { @@ -52,7 +60,7 @@ func TestPortRange(t *testing.T) { t.Errorf("expected success, got %q", err) continue } else if err == nil && tc.success == false { - t.Errorf("expected failure") + t.Errorf("expected failure %#v", testCases[i]) continue } else if tc.success { if f.String() != tc.expected { diff --git a/deps/k8s.io/apimachinery/pkg/util/proxy/BUILD b/deps/k8s.io/apimachinery/pkg/util/proxy/BUILD deleted file mode 100644 index 24083b248..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/proxy/BUILD +++ /dev/null @@ -1,62 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "dial_test.go", - "transport_test.go", - "upgradeaware_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/proxy", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/golang.org/x/net/websocket:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "dial.go", - "doc.go", - "transport.go", - "upgradeaware.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/proxy", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/mxk/go-flowrate/flowrate:go_default_library", - "//vendor/golang.org/x/net/html:go_default_library", - "//vendor/golang.org/x/net/html/atom:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/third_party/forked/golang/netutil:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/proxy/dial.go b/deps/k8s.io/apimachinery/pkg/util/proxy/dial.go index 3da7e965f..37a5be487 100644 --- a/deps/k8s.io/apimachinery/pkg/util/proxy/dial.go +++ b/deps/k8s.io/apimachinery/pkg/util/proxy/dial.go @@ -17,6 +17,7 @@ limitations under the License. package proxy import ( + "context" "crypto/tls" "fmt" "net" @@ -29,7 +30,7 @@ import ( "k8s.io/apimachinery/third_party/forked/golang/netutil" ) -func DialURL(url *url.URL, transport http.RoundTripper) (net.Conn, error) { +func DialURL(ctx context.Context, url *url.URL, transport http.RoundTripper) (net.Conn, error) { dialAddr := netutil.CanonicalAddr(url) dialer, err := utilnet.DialerFor(transport) @@ -40,9 +41,10 @@ func DialURL(url *url.URL, transport http.RoundTripper) (net.Conn, error) { switch url.Scheme { case "http": if dialer != nil { - return dialer("tcp", dialAddr) + return dialer(ctx, "tcp", dialAddr) } - return net.Dial("tcp", dialAddr) + var d net.Dialer + return d.DialContext(ctx, "tcp", dialAddr) case "https": // Get the tls config from the transport if we recognize it var tlsConfig *tls.Config @@ -56,7 +58,7 @@ func DialURL(url *url.URL, transport http.RoundTripper) (net.Conn, error) { if dialer != nil { // We have a dialer; use it to open the connection, then // create a tls client using the connection. - netConn, err := dialer("tcp", dialAddr) + netConn, err := dialer(ctx, "tcp", dialAddr) if err != nil { return nil, err } @@ -86,7 +88,7 @@ func DialURL(url *url.URL, transport http.RoundTripper) (net.Conn, error) { } } else { - // Dial + // Dial. This Dial method does not allow to pass a context unfortunately tlsConn, err = tls.Dial("tcp", dialAddr, tlsConfig) if err != nil { return nil, err diff --git a/deps/k8s.io/apimachinery/pkg/util/proxy/dial_test.go b/deps/k8s.io/apimachinery/pkg/util/proxy/dial_test.go index 8b9f78e4d..6ee594174 100644 --- a/deps/k8s.io/apimachinery/pkg/util/proxy/dial_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/proxy/dial_test.go @@ -17,6 +17,7 @@ limitations under the License. package proxy import ( + "context" "crypto/tls" "crypto/x509" "fmt" @@ -42,6 +43,7 @@ func TestDialURL(t *testing.T) { if err != nil { t.Fatal(err) } + var d net.Dialer testcases := map[string]struct { TLSConfig *tls.Config @@ -68,25 +70,25 @@ func TestDialURL(t *testing.T) { "insecure, custom dial": { TLSConfig: &tls.Config{InsecureSkipVerify: true}, - Dial: net.Dial, + Dial: d.DialContext, }, "secure, no roots, custom dial": { TLSConfig: &tls.Config{InsecureSkipVerify: false}, - Dial: net.Dial, + Dial: d.DialContext, ExpectError: "unknown authority", }, "secure with roots, custom dial": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots}, - Dial: net.Dial, + Dial: d.DialContext, }, "secure with mismatched server, custom dial": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots, ServerName: "bogus.com"}, - Dial: net.Dial, + Dial: d.DialContext, ExpectError: "not bogus.com", }, "secure with matched server, custom dial": { TLSConfig: &tls.Config{InsecureSkipVerify: false, RootCAs: roots, ServerName: "example.com"}, - Dial: net.Dial, + Dial: d.DialContext, }, } @@ -102,7 +104,7 @@ func TestDialURL(t *testing.T) { // Clone() mutates the receiver (!), so also call it on the copy tlsConfigCopy.Clone() transport := &http.Transport{ - Dial: tc.Dial, + DialContext: tc.Dial, TLSClientConfig: tlsConfigCopy, } @@ -125,7 +127,7 @@ func TestDialURL(t *testing.T) { u, _ := url.Parse(ts.URL) _, p, _ := net.SplitHostPort(u.Host) u.Host = net.JoinHostPort("127.0.0.1", p) - conn, err := DialURL(u, transport) + conn, err := DialURL(context.Background(), u, transport) // Make sure dialing doesn't mutate the transport's TLSConfig if !reflect.DeepEqual(tc.TLSConfig, tlsConfigCopy) { diff --git a/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go b/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go index 2bc19655e..4d5cd34d4 100644 --- a/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go +++ b/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go @@ -27,7 +27,6 @@ import ( "net/http/httputil" "net/url" "strings" - "sync" "time" "k8s.io/apimachinery/pkg/api/errors" @@ -294,9 +293,12 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques } } - // Proxy the connection. - wg := &sync.WaitGroup{} - wg.Add(2) + // Proxy the connection. This is bidirectional, so we need a goroutine + // to copy in each direction. Once one side of the connection exits, we + // exit the function which performs cleanup and in the process closes + // the other half of the connection in the defer. + writerComplete := make(chan struct{}) + readerComplete := make(chan struct{}) go func() { var writer io.WriteCloser @@ -309,7 +311,7 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { glog.Errorf("Error proxying data from client to backend: %v", err) } - wg.Done() + close(writerComplete) }() go func() { @@ -323,10 +325,17 @@ func (h *UpgradeAwareHandler) tryUpgrade(w http.ResponseWriter, req *http.Reques if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { glog.Errorf("Error proxying data from backend to client: %v", err) } - wg.Done() + close(readerComplete) }() - wg.Wait() + // Wait for one half the connection to exit. Once it does the defer will + // clean up the other half of the connection. + select { + case <-writerComplete: + case <-readerComplete: + } + glog.V(6).Infof("Disconnecting from backend proxy %s\n Headers: %v", &location, clone.Header) + return true } @@ -347,7 +356,7 @@ func (h *UpgradeAwareHandler) DialForUpgrade(req *http.Request) (net.Conn, error // dial dials the backend at req.URL and writes req to it. func dial(req *http.Request, transport http.RoundTripper) (net.Conn, error) { - conn, err := DialURL(req.URL, transport) + conn, err := DialURL(req.Context(), req.URL, transport) if err != nil { return nil, fmt.Errorf("error dialing backend: %v", err) } diff --git a/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware_test.go b/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware_test.go index a33b10e58..c5dfde90d 100644 --- a/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware_test.go +++ b/deps/k8s.io/apimachinery/pkg/util/proxy/upgradeaware_test.go @@ -19,6 +19,7 @@ package proxy import ( "bytes" "compress/gzip" + "context" "crypto/tls" "crypto/x509" "errors" @@ -341,6 +342,7 @@ func TestProxyUpgrade(t *testing.T) { if !localhostPool.AppendCertsFromPEM(localhostCert) { t.Errorf("error setting up localhostCert pool") } + var d net.Dialer testcases := map[string]struct { ServerFunc func(http.Handler) *httptest.Server @@ -395,7 +397,7 @@ func TestProxyUpgrade(t *testing.T) { ts.StartTLS() return ts }, - ProxyTransport: utilnet.SetTransportDefaults(&http.Transport{Dial: net.Dial, TLSClientConfig: &tls.Config{RootCAs: localhostPool}}), + ProxyTransport: utilnet.SetTransportDefaults(&http.Transport{DialContext: d.DialContext, TLSClientConfig: &tls.Config{RootCAs: localhostPool}}), }, "https (valid hostname + RootCAs + custom dialer + bearer token)": { ServerFunc: func(h http.Handler) *httptest.Server { @@ -410,9 +412,9 @@ func TestProxyUpgrade(t *testing.T) { ts.StartTLS() return ts }, - ProxyTransport: utilnet.SetTransportDefaults(&http.Transport{Dial: net.Dial, TLSClientConfig: &tls.Config{RootCAs: localhostPool}}), + ProxyTransport: utilnet.SetTransportDefaults(&http.Transport{DialContext: d.DialContext, TLSClientConfig: &tls.Config{RootCAs: localhostPool}}), UpgradeTransport: NewUpgradeRequestRoundTripper( - utilnet.SetOldTransportDefaults(&http.Transport{Dial: net.Dial, TLSClientConfig: &tls.Config{RootCAs: localhostPool}}), + utilnet.SetOldTransportDefaults(&http.Transport{DialContext: d.DialContext, TLSClientConfig: &tls.Config{RootCAs: localhostPool}}), RoundTripperFunc(func(req *http.Request) (*http.Response, error) { req = utilnet.CloneRequest(req) req.Header.Set("Authorization", "Bearer 1234") @@ -496,9 +498,15 @@ func TestProxyUpgradeErrorResponse(t *testing.T) { expectedErr = errors.New("EXPECTED") ) proxy := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - transport := http.DefaultTransport.(*http.Transport) - transport.Dial = func(network, addr string) (net.Conn, error) { - return &fakeConn{err: expectedErr}, nil + transport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) { + return &fakeConn{err: expectedErr}, nil + }, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, } responder = &fakeResponder{t: t, w: w} proxyHandler := NewUpgradeAwareHandler( diff --git a/deps/k8s.io/apimachinery/pkg/util/rand/BUILD b/deps/k8s.io/apimachinery/pkg/util/rand/BUILD deleted file mode 100644 index 12254b4a2..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/rand/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["rand_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/rand", -) - -go_library( - name = "go_default_library", - srcs = ["rand.go"], - importpath = "k8s.io/apimachinery/pkg/util/rand", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/remotecommand/BUILD b/deps/k8s.io/apimachinery/pkg/util/remotecommand/BUILD deleted file mode 100644 index 9919ad54a..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/remotecommand/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["constants.go"], - importpath = "k8s.io/apimachinery/pkg/util/remotecommand", - deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/runtime/BUILD b/deps/k8s.io/apimachinery/pkg/util/runtime/BUILD deleted file mode 100644 index 521efc220..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/runtime/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["runtime_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/runtime", -) - -go_library( - name = "go_default_library", - srcs = ["runtime.go"], - importpath = "k8s.io/apimachinery/pkg/util/runtime", - deps = ["//vendor/github.com/golang/glog:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/runtime/runtime.go b/deps/k8s.io/apimachinery/pkg/util/runtime/runtime.go index d4cec0b88..da32fe12f 100644 --- a/deps/k8s.io/apimachinery/pkg/util/runtime/runtime.go +++ b/deps/k8s.io/apimachinery/pkg/util/runtime/runtime.go @@ -128,9 +128,8 @@ func (r *rudimentaryErrorBackoff) OnError(error) { r.lastErrorTimeLock.Lock() defer r.lastErrorTimeLock.Unlock() d := time.Since(r.lastErrorTime) - if d < r.minPeriod && d >= 0 { + if d < r.minPeriod { // If the time moves backwards for any reason, do nothing - // TODO: remove check "d >= 0" after go 1.8 is no longer supported time.Sleep(r.minPeriod - d) } r.lastErrorTime = time.Now() @@ -161,3 +160,10 @@ func RecoverFromPanic(err *error) { callers) } } + +// Must panics on non-nil errors. Useful to handling programmer level errors. +func Must(err error) { + if err != nil { + panic(err) + } +} diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/BUILD b/deps/k8s.io/apimachinery/pkg/util/sets/BUILD deleted file mode 100644 index 17bb4010e..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/sets/BUILD +++ /dev/null @@ -1,72 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load("@io_kubernetes_build//defs:go.bzl", "go_genrule") -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "byte.go", - "doc.go", - "empty.go", - "int.go", - "int64.go", - "string.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/sets", -) - -go_genrule( - name = "set-gen", - srcs = [ - "//hack/boilerplate:boilerplate.go.txt", - ], - outs = [ - "byte.go", - "doc.go", - "empty.go", - "int.go", - "int64.go", - "string.go", - ], - cmd = """ -$(location //vendor/k8s.io/code-generator/cmd/set-gen) \ - --input-dirs ./vendor/k8s.io/apimachinery/pkg/util/sets/types \ - --output-base $$(dirname $$(dirname $(location :byte.go))) \ - --go-header-file $(location //hack/boilerplate:boilerplate.go.txt) \ - --output-package sets - """, - go_deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/sets/types:go_default_library", - ], - tools = [ - "//vendor/k8s.io/code-generator/cmd/set-gen", - ], -) - -go_test( - name = "go_default_test", - srcs = ["set_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/sets", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/util/sets/types:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/byte.go b/deps/k8s.io/apimachinery/pkg/util/sets/byte.go index a460e4b1f..766f4501e 100644 --- a/deps/k8s.io/apimachinery/pkg/util/sets/byte.go +++ b/deps/k8s.io/apimachinery/pkg/util/sets/byte.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets @@ -26,7 +26,7 @@ import ( // sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption. type Byte map[byte]Empty -// New creates a Byte from a list of values. +// NewByte creates a Byte from a list of values. func NewByte(items ...byte) Byte { ss := Byte{} ss.Insert(items...) diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/doc.go b/deps/k8s.io/apimachinery/pkg/util/sets/doc.go index 28a6a7d5c..b152a0bf0 100644 --- a/deps/k8s.io/apimachinery/pkg/util/sets/doc.go +++ b/deps/k8s.io/apimachinery/pkg/util/sets/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. // Package sets has auto-generated set types. package sets diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/empty.go b/deps/k8s.io/apimachinery/pkg/util/sets/empty.go index cd22b953a..e11e622c5 100644 --- a/deps/k8s.io/apimachinery/pkg/util/sets/empty.go +++ b/deps/k8s.io/apimachinery/pkg/util/sets/empty.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/int.go b/deps/k8s.io/apimachinery/pkg/util/sets/int.go index 0614e9fb0..a0a513cd9 100644 --- a/deps/k8s.io/apimachinery/pkg/util/sets/int.go +++ b/deps/k8s.io/apimachinery/pkg/util/sets/int.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets @@ -26,7 +26,7 @@ import ( // sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption. type Int map[int]Empty -// New creates a Int from a list of values. +// NewInt creates a Int from a list of values. func NewInt(items ...int) Int { ss := Int{} ss.Insert(items...) diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/int64.go b/deps/k8s.io/apimachinery/pkg/util/sets/int64.go index 82e1ba782..9ca9af0c5 100644 --- a/deps/k8s.io/apimachinery/pkg/util/sets/int64.go +++ b/deps/k8s.io/apimachinery/pkg/util/sets/int64.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets @@ -26,7 +26,7 @@ import ( // sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption. type Int64 map[int64]Empty -// New creates a Int64 from a list of values. +// NewInt64 creates a Int64 from a list of values. func NewInt64(items ...int64) Int64 { ss := Int64{} ss.Insert(items...) diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/string.go b/deps/k8s.io/apimachinery/pkg/util/sets/string.go index baef7a6a2..ba00ad7df 100644 --- a/deps/k8s.io/apimachinery/pkg/util/sets/string.go +++ b/deps/k8s.io/apimachinery/pkg/util/sets/string.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets @@ -26,7 +26,7 @@ import ( // sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. type String map[string]Empty -// New creates a String from a list of values. +// NewString creates a String from a list of values. func NewString(items ...string) String { ss := String{} ss.Insert(items...) diff --git a/deps/k8s.io/apimachinery/pkg/util/sets/types/BUILD b/deps/k8s.io/apimachinery/pkg/util/sets/types/BUILD deleted file mode 100644 index 50f7528df..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/sets/types/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["types.go"], - importpath = "k8s.io/apimachinery/pkg/util/sets/types", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/BUILD b/deps/k8s.io/apimachinery/pkg/util/strategicpatch/BUILD deleted file mode 100644 index 2f4bcea4d..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["patch_test.go"], - data = [ - "testdata/swagger-merge-item.json", - "testdata/swagger-precision-item.json", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/strategicpatch", - deps = [ - "//vendor/github.com/davecgh/go-spew/spew:go_default_library", - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/mergepatch:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch/testing:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "errors.go", - "meta.go", - "patch.go", - "types.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/strategicpatch", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/mergepatch:go_default_library", - "//vendor/k8s.io/apimachinery/third_party/forked/golang/json:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/testing:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS b/deps/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS index 8e8d9fce8..dbbe0de4c 100644 --- a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS +++ b/deps/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS @@ -1,5 +1,6 @@ approvers: - pwittrock +- mengqiy reviewers: - mengqiy - apelisse diff --git a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go b/deps/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go index 2f6ade2be..ddf998172 100644 --- a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go +++ b/deps/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go @@ -880,6 +880,29 @@ func StrategicMergeMapPatchUsingLookupPatchMeta(original, patch JSONMap, schema return mergeMap(original, patch, schema, mergeOptions) } +// MergeStrategicMergeMapPatchUsingLookupPatchMeta merges strategic merge +// patches retaining `null` fields and parallel lists. If 2 patches change the +// same fields and the latter one will override the former one. If you don't +// want that happen, you need to run func MergingMapsHaveConflicts before +// merging these patches. Applying the resulting merged merge patch to a JSONMap +// yields the same as merging each strategic merge patch to the JSONMap in +// succession. +func MergeStrategicMergeMapPatchUsingLookupPatchMeta(schema LookupPatchMeta, patches ...JSONMap) (JSONMap, error) { + mergeOptions := MergeOptions{ + MergeParallelList: false, + IgnoreUnmatchedNulls: false, + } + merged := JSONMap{} + var err error + for _, patch := range patches { + merged, err = mergeMap(merged, patch, schema, mergeOptions) + if err != nil { + return nil, err + } + } + return merged, nil +} + // handleDirectiveInMergeMap handles the patch directive when merging 2 maps. func handleDirectiveInMergeMap(directive interface{}, patch map[string]interface{}) (map[string]interface{}, error) { if directive == replaceDirective { @@ -1853,7 +1876,7 @@ func mergingMapFieldsHaveConflicts( return true, nil } return slicesHaveConflicts(leftType, rightType, schema, fieldPatchStrategy, fieldPatchMergeKey) - case string, float64, bool, int, int64, nil: + case string, float64, bool, int64, nil: return !reflect.DeepEqual(left, right), nil default: return true, fmt.Errorf("unknown type: %v", reflect.TypeOf(left)) diff --git a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/testing/BUILD b/deps/k8s.io/apimachinery/pkg/util/strategicpatch/testing/BUILD deleted file mode 100644 index 8b4268ffe..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/strategicpatch/testing/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["openapi.go"], - importpath = "k8s.io/apimachinery/pkg/util/strategicpatch/testing", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", - "//vendor/github.com/googleapis/gnostic/compiler:go_default_library", - "//vendor/gopkg.in/yaml.v2:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/util/proto:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/uuid/BUILD b/deps/k8s.io/apimachinery/pkg/util/uuid/BUILD deleted file mode 100644 index 786d8fbe3..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/uuid/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["uuid.go"], - importpath = "k8s.io/apimachinery/pkg/util/uuid", - deps = [ - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/validation/BUILD b/deps/k8s.io/apimachinery/pkg/util/validation/BUILD deleted file mode 100644 index 40ee23501..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/validation/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["validation_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/validation", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["validation.go"], - importpath = "k8s.io/apimachinery/pkg/util/validation", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apimachinery/pkg/util/validation/field:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/validation/field/BUILD b/deps/k8s.io/apimachinery/pkg/util/validation/field/BUILD deleted file mode 100644 index 6a2f815ed..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/validation/field/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "errors_test.go", - "path_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/validation/field", -) - -go_library( - name = "go_default_library", - srcs = [ - "errors.go", - "path.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/validation/field", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/validation/field/errors.go b/deps/k8s.io/apimachinery/pkg/util/validation/field/errors.go index 31705dee3..4767fd1dd 100644 --- a/deps/k8s.io/apimachinery/pkg/util/validation/field/errors.go +++ b/deps/k8s.io/apimachinery/pkg/util/validation/field/errors.go @@ -48,7 +48,7 @@ func (v *Error) ErrorBody() string { var s string switch v.Type { case ErrorTypeRequired, ErrorTypeForbidden, ErrorTypeTooLong, ErrorTypeInternal: - s = fmt.Sprintf("%s", v.Type) + s = v.Type.String() default: value := v.BadValue valueType := reflect.TypeOf(value) diff --git a/deps/k8s.io/apimachinery/pkg/util/wait/BUILD b/deps/k8s.io/apimachinery/pkg/util/wait/BUILD deleted file mode 100644 index 20046645a..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/wait/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["wait_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/wait", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "wait.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/wait", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/wait/wait.go b/deps/k8s.io/apimachinery/pkg/util/wait/wait.go index 0997de806..ca61168cd 100644 --- a/deps/k8s.io/apimachinery/pkg/util/wait/wait.go +++ b/deps/k8s.io/apimachinery/pkg/util/wait/wait.go @@ -230,13 +230,13 @@ func pollInternal(wait WaitFunc, condition ConditionFunc) error { // PollImmediate tries a condition func until it returns true, an error, or the timeout // is reached. // -// Poll always checks 'condition' before waiting for the interval. 'condition' +// PollImmediate always checks 'condition' before waiting for the interval. 'condition' // will always be invoked at least once. // // Some intervals may be missed if the condition takes too long or the time // window is too short. // -// If you want to Poll something forever, see PollInfinite. +// If you want to immediately Poll something forever, see PollImmediateInfinite. func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error { return pollImmediateInternal(poller(interval, timeout), condition) } @@ -284,12 +284,32 @@ func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) erro // PollUntil tries a condition func until it returns true, an error or stopCh is // closed. // -// PolUntil always waits interval before the first run of 'condition'. +// PollUntil always waits interval before the first run of 'condition'. // 'condition' will always be invoked at least once. func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error { return WaitFor(poller(interval, 0), condition, stopCh) } +// PollImmediateUntil tries a condition func until it returns true, an error or stopCh is closed. +// +// PollImmediateUntil runs the 'condition' before waiting for the interval. +// 'condition' will always be invoked at least once. +func PollImmediateUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error { + done, err := condition() + if err != nil { + return err + } + if done { + return nil + } + select { + case <-stopCh: + return ErrWaitTimeout + default: + return PollUntil(interval, condition, stopCh) + } +} + // WaitFunc creates a channel that receives an item every time a test // should be executed and is closed when the last test should be invoked. type WaitFunc func(done <-chan struct{}) <-chan struct{} diff --git a/deps/k8s.io/apimachinery/pkg/util/waitgroup/BUILD b/deps/k8s.io/apimachinery/pkg/util/waitgroup/BUILD deleted file mode 100644 index a7ecb9d68..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/waitgroup/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "waitgroup.go", - ], - importpath = "k8s.io/apimachinery/pkg/util/waitgroup", - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["waitgroup_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/waitgroup", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apimachinery/pkg/util/yaml/BUILD b/deps/k8s.io/apimachinery/pkg/util/yaml/BUILD deleted file mode 100644 index 0208039a8..000000000 --- a/deps/k8s.io/apimachinery/pkg/util/yaml/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["decoder_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/util/yaml", -) - -go_library( - name = "go_default_library", - srcs = ["decoder.go"], - importpath = "k8s.io/apimachinery/pkg/util/yaml", - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/version/BUILD b/deps/k8s.io/apimachinery/pkg/version/BUILD deleted file mode 100644 index bdccf7b3a..000000000 --- a/deps/k8s.io/apimachinery/pkg/version/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "types.go", - ], - importpath = "k8s.io/apimachinery/pkg/version", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/version/helpers.go b/deps/k8s.io/apimachinery/pkg/version/helpers.go new file mode 100644 index 000000000..5e041d6f3 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/version/helpers.go @@ -0,0 +1,88 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version + +import ( + "regexp" + "strconv" + "strings" +) + +type versionType int + +const ( + // Bigger the version type number, higher priority it is + versionTypeAlpha versionType = iota + versionTypeBeta + versionTypeGA +) + +var kubeVersionRegex = regexp.MustCompile("^v([\\d]+)(?:(alpha|beta)([\\d]+))?$") + +func parseKubeVersion(v string) (majorVersion int, vType versionType, minorVersion int, ok bool) { + var err error + submatches := kubeVersionRegex.FindStringSubmatch(v) + if len(submatches) != 4 { + return 0, 0, 0, false + } + switch submatches[2] { + case "alpha": + vType = versionTypeAlpha + case "beta": + vType = versionTypeBeta + case "": + vType = versionTypeGA + default: + return 0, 0, 0, false + } + if majorVersion, err = strconv.Atoi(submatches[1]); err != nil { + return 0, 0, 0, false + } + if vType != versionTypeGA { + if minorVersion, err = strconv.Atoi(submatches[3]); err != nil { + return 0, 0, 0, false + } + } + return majorVersion, vType, minorVersion, true +} + +// CompareKubeAwareVersionStrings compares two kube-like version strings. +// Kube-like version strings are starting with a v, followed by a major version, optional "alpha" or "beta" strings +// followed by a minor version (e.g. v1, v2beta1). Versions will be sorted based on GA/alpha/beta first and then major +// and minor versions. e.g. v2, v1, v1beta2, v1beta1, v1alpha1. +func CompareKubeAwareVersionStrings(v1, v2 string) int { + if v1 == v2 { + return 0 + } + v1major, v1type, v1minor, ok1 := parseKubeVersion(v1) + v2major, v2type, v2minor, ok2 := parseKubeVersion(v2) + switch { + case !ok1 && !ok2: + return strings.Compare(v2, v1) + case !ok1 && ok2: + return -1 + case ok1 && !ok2: + return 1 + } + if v1type != v2type { + return int(v1type) - int(v2type) + } + if v1major != v2major { + return v1major - v2major + } + return v1minor - v2minor +} diff --git a/deps/k8s.io/apimachinery/pkg/version/helpers_test.go b/deps/k8s.io/apimachinery/pkg/version/helpers_test.go new file mode 100644 index 000000000..863a53697 --- /dev/null +++ b/deps/k8s.io/apimachinery/pkg/version/helpers_test.go @@ -0,0 +1,52 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package version + +import ( + "testing" +) + +func TestCompareKubeAwareVersionStrings(t *testing.T) { + tests := []*struct { + v1, v2 string + expectedGreater bool + }{ + {"v1", "v2", false}, + {"v2", "v1", true}, + {"v10", "v2", true}, + {"v1", "v2alpha1", true}, + {"v1", "v2beta1", true}, + {"v1alpha2", "v1alpha1", true}, + {"v1beta1", "v2alpha3", true}, + {"v1alpha10", "v1alpha2", true}, + {"v1beta10", "v1beta2", true}, + {"foo", "v1beta2", false}, + {"bar", "foo", true}, + {"version1", "version2", true}, // Non kube-like versions are sorted alphabetically + {"version1", "version10", true}, // Non kube-like versions are sorted alphabetically + } + + for _, tc := range tests { + if e, a := tc.expectedGreater, CompareKubeAwareVersionStrings(tc.v1, tc.v2) > 0; e != a { + if e { + t.Errorf("expected %s to be greater than %s", tc.v1, tc.v2) + } else { + t.Errorf("expected %s to be less than than %s", tc.v1, tc.v2) + } + } + } +} diff --git a/deps/k8s.io/apimachinery/pkg/watch/BUILD b/deps/k8s.io/apimachinery/pkg/watch/BUILD deleted file mode 100644 index 36c4ad64e..000000000 --- a/deps/k8s.io/apimachinery/pkg/watch/BUILD +++ /dev/null @@ -1,71 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "filter.go", - "mux.go", - "streamwatcher.go", - "until.go", - "watch.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apimachinery/pkg/watch", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = [ - "filter_test.go", - "mux_test.go", - "streamwatcher_test.go", - "watch_test.go", - ], - importpath = "k8s.io/apimachinery/pkg/watch_test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["until_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/pkg/watch", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/pkg/watch/filter.go b/deps/k8s.io/apimachinery/pkg/watch/filter.go index 3ca27f22c..22c9449f5 100644 --- a/deps/k8s.io/apimachinery/pkg/watch/filter.go +++ b/deps/k8s.io/apimachinery/pkg/watch/filter.go @@ -62,11 +62,7 @@ func (fw *filteredWatch) Stop() { // loop waits for new values, filters them, and resends them. func (fw *filteredWatch) loop() { defer close(fw.result) - for { - event, ok := <-fw.incoming.ResultChan() - if !ok { - break - } + for event := range fw.incoming.ResultChan() { filtered, keep := fw.f(event) if keep { fw.result <- filtered diff --git a/deps/k8s.io/apimachinery/pkg/watch/mux.go b/deps/k8s.io/apimachinery/pkg/watch/mux.go index a65088c1c..0ac8dc4ef 100644 --- a/deps/k8s.io/apimachinery/pkg/watch/mux.go +++ b/deps/k8s.io/apimachinery/pkg/watch/mux.go @@ -204,11 +204,7 @@ func (m *Broadcaster) Shutdown() { func (m *Broadcaster) loop() { // Deliberately not catching crashes here. Yes, bring down the process if there's a // bug in watch.Broadcaster. - for { - event, ok := <-m.incoming - if !ok { - break - } + for event := range m.incoming { if event.Type == internalRunFunctionMarker { event.Object.(functionFakeRuntimeObject)() continue diff --git a/deps/k8s.io/apimachinery/pkg/watch/until.go b/deps/k8s.io/apimachinery/pkg/watch/until.go deleted file mode 100644 index c2772ddb5..000000000 --- a/deps/k8s.io/apimachinery/pkg/watch/until.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch - -import ( - "errors" - "time" - - "k8s.io/apimachinery/pkg/util/wait" -) - -// ConditionFunc returns true if the condition has been reached, false if it has not been reached yet, -// or an error if the condition cannot be checked and should terminate. In general, it is better to define -// level driven conditions over edge driven conditions (pod has ready=true, vs pod modified and ready changed -// from false to true). -type ConditionFunc func(event Event) (bool, error) - -// ErrWatchClosed is returned when the watch channel is closed before timeout in Until. -var ErrWatchClosed = errors.New("watch closed before Until timeout") - -// Until reads items from the watch until each provided condition succeeds, and then returns the last watch -// encountered. The first condition that returns an error terminates the watch (and the event is also returned). -// If no event has been received, the returned event will be nil. -// Conditions are satisfied sequentially so as to provide a useful primitive for higher level composition. -// A zero timeout means to wait forever. -func Until(timeout time.Duration, watcher Interface, conditions ...ConditionFunc) (*Event, error) { - ch := watcher.ResultChan() - defer watcher.Stop() - var after <-chan time.Time - if timeout > 0 { - after = time.After(timeout) - } else { - ch := make(chan time.Time) - defer close(ch) - after = ch - } - var lastEvent *Event - for _, condition := range conditions { - // check the next condition against the previous event and short circuit waiting for the next watch - if lastEvent != nil { - done, err := condition(*lastEvent) - if err != nil { - return lastEvent, err - } - if done { - continue - } - } - ConditionSucceeded: - for { - select { - case event, ok := <-ch: - if !ok { - return lastEvent, ErrWatchClosed - } - lastEvent = &event - - // TODO: check for watch expired error and retry watch from latest point? - done, err := condition(event) - if err != nil { - return lastEvent, err - } - if done { - break ConditionSucceeded - } - - case <-after: - return lastEvent, wait.ErrWaitTimeout - } - } - } - return lastEvent, nil -} diff --git a/deps/k8s.io/apimachinery/pkg/watch/until_test.go b/deps/k8s.io/apimachinery/pkg/watch/until_test.go deleted file mode 100644 index e872c3681..000000000 --- a/deps/k8s.io/apimachinery/pkg/watch/until_test.go +++ /dev/null @@ -1,172 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package watch - -import ( - "errors" - "strings" - "testing" - "time" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/wait" -) - -type fakePod struct { - name string -} - -func (obj *fakePod) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } -func (obj *fakePod) DeepCopyObject() runtime.Object { panic("DeepCopyObject not supported by fakePod") } - -func TestUntil(t *testing.T) { - fw := NewFake() - go func() { - var obj *fakePod - fw.Add(obj) - fw.Modify(obj) - }() - conditions := []ConditionFunc{ - func(event Event) (bool, error) { return event.Type == Added, nil }, - func(event Event) (bool, error) { return event.Type == Modified, nil }, - } - - timeout := time.Minute - lastEvent, err := Until(timeout, fw, conditions...) - if err != nil { - t.Fatalf("expected nil error, got %#v", err) - } - if lastEvent == nil { - t.Fatal("expected an event") - } - if lastEvent.Type != Modified { - t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) - } - if got, isPod := lastEvent.Object.(*fakePod); !isPod { - t.Fatalf("expected a pod event, got %#v", got) - } -} - -func TestUntilMultipleConditions(t *testing.T) { - fw := NewFake() - go func() { - var obj *fakePod - fw.Add(obj) - }() - conditions := []ConditionFunc{ - func(event Event) (bool, error) { return event.Type == Added, nil }, - func(event Event) (bool, error) { return event.Type == Added, nil }, - } - - timeout := time.Minute - lastEvent, err := Until(timeout, fw, conditions...) - if err != nil { - t.Fatalf("expected nil error, got %#v", err) - } - if lastEvent == nil { - t.Fatal("expected an event") - } - if lastEvent.Type != Added { - t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) - } - if got, isPod := lastEvent.Object.(*fakePod); !isPod { - t.Fatalf("expected a pod event, got %#v", got) - } -} - -func TestUntilMultipleConditionsFail(t *testing.T) { - fw := NewFake() - go func() { - var obj *fakePod - fw.Add(obj) - }() - conditions := []ConditionFunc{ - func(event Event) (bool, error) { return event.Type == Added, nil }, - func(event Event) (bool, error) { return event.Type == Added, nil }, - func(event Event) (bool, error) { return event.Type == Deleted, nil }, - } - - timeout := 10 * time.Second - lastEvent, err := Until(timeout, fw, conditions...) - if err != wait.ErrWaitTimeout { - t.Fatalf("expected ErrWaitTimeout error, got %#v", err) - } - if lastEvent == nil { - t.Fatal("expected an event") - } - if lastEvent.Type != Added { - t.Fatalf("expected ADDED event type, got %v", lastEvent.Type) - } - if got, isPod := lastEvent.Object.(*fakePod); !isPod { - t.Fatalf("expected a pod event, got %#v", got) - } -} - -func TestUntilTimeout(t *testing.T) { - fw := NewFake() - go func() { - var obj *fakePod - fw.Add(obj) - fw.Modify(obj) - }() - conditions := []ConditionFunc{ - func(event Event) (bool, error) { - return event.Type == Added, nil - }, - func(event Event) (bool, error) { - return event.Type == Modified, nil - }, - } - - timeout := time.Duration(0) - lastEvent, err := Until(timeout, fw, conditions...) - if err != nil { - t.Fatalf("expected nil error, got %#v", err) - } - if lastEvent == nil { - t.Fatal("expected an event") - } - if lastEvent.Type != Modified { - t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) - } - if got, isPod := lastEvent.Object.(*fakePod); !isPod { - t.Fatalf("expected a pod event, got %#v", got) - } -} - -func TestUntilErrorCondition(t *testing.T) { - fw := NewFake() - go func() { - var obj *fakePod - fw.Add(obj) - }() - expected := "something bad" - conditions := []ConditionFunc{ - func(event Event) (bool, error) { return event.Type == Added, nil }, - func(event Event) (bool, error) { return false, errors.New(expected) }, - } - - timeout := time.Minute - _, err := Until(timeout, fw, conditions...) - if err == nil { - t.Fatal("expected an error") - } - if !strings.Contains(err.Error(), expected) { - t.Fatalf("expected %q in error string, got %q", expected, err.Error()) - } -} diff --git a/deps/k8s.io/apimachinery/pkg/watch/watch.go b/deps/k8s.io/apimachinery/pkg/watch/watch.go index 5c1380b23..a627d1d57 100644 --- a/deps/k8s.io/apimachinery/pkg/watch/watch.go +++ b/deps/k8s.io/apimachinery/pkg/watch/watch.go @@ -268,3 +268,50 @@ func (f *RaceFreeFakeWatcher) Action(action EventType, obj runtime.Object) { } } } + +// ProxyWatcher lets you wrap your channel in watch Interface. Threadsafe. +type ProxyWatcher struct { + result chan Event + stopCh chan struct{} + + mutex sync.Mutex + stopped bool +} + +var _ Interface = &ProxyWatcher{} + +// NewProxyWatcher creates new ProxyWatcher by wrapping a channel +func NewProxyWatcher(ch chan Event) *ProxyWatcher { + return &ProxyWatcher{ + result: ch, + stopCh: make(chan struct{}), + stopped: false, + } +} + +// Stop implements Interface +func (pw *ProxyWatcher) Stop() { + pw.mutex.Lock() + defer pw.mutex.Unlock() + if !pw.stopped { + pw.stopped = true + close(pw.stopCh) + } +} + +// Stopping returns true if Stop() has been called +func (pw *ProxyWatcher) Stopping() bool { + pw.mutex.Lock() + defer pw.mutex.Unlock() + return pw.stopped +} + +// ResultChan implements Interface +func (pw *ProxyWatcher) ResultChan() <-chan Event { + return pw.result +} + +// StopChan returns stop channel +func (pw *ProxyWatcher) StopChan() <-chan struct{} { + return pw.stopCh +} diff --git a/deps/k8s.io/apimachinery/pkg/watch/watch_test.go b/deps/k8s.io/apimachinery/pkg/watch/watch_test.go index bdf7fedd4..4fb159b0d 100644 --- a/deps/k8s.io/apimachinery/pkg/watch/watch_test.go +++ b/deps/k8s.io/apimachinery/pkg/watch/watch_test.go @@ -17,6 +17,7 @@ limitations under the License. package watch_test import ( + "reflect" "testing" "k8s.io/apimachinery/pkg/runtime" @@ -135,3 +136,40 @@ func TestEmpty(t *testing.T) { t.Errorf("unexpected result channel result") } } + +func TestProxyWatcher(t *testing.T) { + events := []Event{ + {Added, testType("foo")}, + {Modified, testType("qux")}, + {Modified, testType("bar")}, + {Deleted, testType("bar")}, + {Error, testType("error: blah")}, + } + + ch := make(chan Event, len(events)) + w := NewProxyWatcher(ch) + + for _, e := range events { + ch <- e + } + + for _, e := range events { + g := <-w.ResultChan() + if !reflect.DeepEqual(e, g) { + t.Errorf("Expected %#v, got %#v", e, g) + continue + } + } + + w.Stop() + + select { + // Closed channel always reads immediately + case <-w.StopChan(): + default: + t.Error("Channel isn't closed") + } + + // Test double close + w.Stop() +} diff --git a/deps/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go b/deps/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go index 738d0a29c..71ef4da33 100644 --- a/deps/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go +++ b/deps/k8s.io/apimachinery/pkg/watch/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,16 +16,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package watch // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Event) DeepCopyInto(out *Event) { *out = *in - if in.Object == nil { - out.Object = nil - } else { + if in.Object != nil { out.Object = in.Object.DeepCopyObject() } return diff --git a/deps/k8s.io/apimachinery/third_party/forked/golang/json/BUILD b/deps/k8s.io/apimachinery/third_party/forked/golang/json/BUILD deleted file mode 100644 index d4b5f696f..000000000 --- a/deps/k8s.io/apimachinery/third_party/forked/golang/json/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["fields.go"], - importpath = "k8s.io/apimachinery/third_party/forked/golang/json", -) - -go_test( - name = "go_default_test", - srcs = ["fields_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/third_party/forked/golang/json", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD b/deps/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD deleted file mode 100644 index 1df290578..000000000 --- a/deps/k8s.io/apimachinery/third_party/forked/golang/netutil/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["addr.go"], - importpath = "k8s.io/apimachinery/third_party/forked/golang/netutil", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD b/deps/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD deleted file mode 100644 index 1069d9b93..000000000 --- a/deps/k8s.io/apimachinery/third_party/forked/golang/reflect/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["deep_equal_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apimachinery/third_party/forked/golang/reflect", -) - -go_library( - name = "go_default_library", - srcs = ["deep_equal.go"], - importpath = "k8s.io/apimachinery/third_party/forked/golang/reflect", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go b/deps/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go index 9e45dbe1d..7ed1d1cff 100644 --- a/deps/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go +++ b/deps/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go @@ -44,7 +44,7 @@ func (e Equalities) AddFunc(eqFunc interface{}) error { return fmt.Errorf("expected func, got: %v", ft) } if ft.NumIn() != 2 { - return fmt.Errorf("expected three 'in' params, got: %v", ft) + return fmt.Errorf("expected two 'in' params, got: %v", ft) } if ft.NumOut() != 1 { return fmt.Errorf("expected one 'out' param, got: %v", ft) diff --git a/deps/k8s.io/apiserver/pkg/admission/BUILD b/deps/k8s.io/apiserver/pkg/admission/BUILD deleted file mode 100644 index 4af97de95..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/BUILD +++ /dev/null @@ -1,85 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "chain_test.go", - "config_test.go", - "errors_test.go", - "handler_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "attributes.go", - "chain.go", - "config.go", - "errors.go", - "handler.go", - "interfaces.go", - "plugins.go", - ], - importpath = "k8s.io/apiserver/pkg/admission", - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/configuration:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/initializer:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/metrics:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/initialization:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/errors:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/initializer:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/request:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/rules:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/attributes.go b/deps/k8s.io/apiserver/pkg/admission/attributes.go index 406235dd0..c8973cc62 100644 --- a/deps/k8s.io/apiserver/pkg/admission/attributes.go +++ b/deps/k8s.io/apiserver/pkg/admission/attributes.go @@ -17,8 +17,13 @@ limitations under the License. package admission import ( + "fmt" + "strings" + "sync" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apiserver/pkg/authentication/user" ) @@ -29,12 +34,18 @@ type attributesRecord struct { resource schema.GroupVersionResource subresource string operation Operation + dryRun bool object runtime.Object oldObject runtime.Object userInfo user.Info + + // other elements are always accessed in single goroutine. + // But ValidatingAdmissionWebhook add annotations concurrently. + annotations map[string]string + annotationsLock sync.RWMutex } -func NewAttributesRecord(object runtime.Object, oldObject runtime.Object, kind schema.GroupVersionKind, namespace, name string, resource schema.GroupVersionResource, subresource string, operation Operation, userInfo user.Info) Attributes { +func NewAttributesRecord(object runtime.Object, oldObject runtime.Object, kind schema.GroupVersionKind, namespace, name string, resource schema.GroupVersionResource, subresource string, operation Operation, dryRun bool, userInfo user.Info) Attributes { return &attributesRecord{ kind: kind, namespace: namespace, @@ -42,6 +53,7 @@ func NewAttributesRecord(object runtime.Object, oldObject runtime.Object, kind s resource: resource, subresource: subresource, operation: operation, + dryRun: dryRun, object: object, oldObject: oldObject, userInfo: userInfo, @@ -72,6 +84,10 @@ func (record *attributesRecord) GetOperation() Operation { return record.operation } +func (record *attributesRecord) IsDryRun() bool { + return record.dryRun +} + func (record *attributesRecord) GetObject() runtime.Object { return record.object } @@ -83,3 +99,48 @@ func (record *attributesRecord) GetOldObject() runtime.Object { func (record *attributesRecord) GetUserInfo() user.Info { return record.userInfo } + +// getAnnotations implements privateAnnotationsGetter.It's a private method used +// by WithAudit decorator. +func (record *attributesRecord) getAnnotations() map[string]string { + record.annotationsLock.RLock() + defer record.annotationsLock.RUnlock() + + if record.annotations == nil { + return nil + } + cp := make(map[string]string, len(record.annotations)) + for key, value := range record.annotations { + cp[key] = value + } + return cp +} + +func (record *attributesRecord) AddAnnotation(key, value string) error { + if err := checkKeyFormat(key); err != nil { + return err + } + + record.annotationsLock.Lock() + defer record.annotationsLock.Unlock() + + if record.annotations == nil { + record.annotations = make(map[string]string) + } + if v, ok := record.annotations[key]; ok && v != value { + return fmt.Errorf("admission annotations are not allowd to be overwritten, key:%q, old value: %q, new value:%q", key, record.annotations[key], value) + } + record.annotations[key] = value + return nil +} + +func checkKeyFormat(key string) error { + parts := strings.Split(key, "/") + if len(parts) != 2 { + return fmt.Errorf("annotation key has invalid format, the right format is a DNS subdomain prefix and '/' and key name. (e.g. 'podsecuritypolicy.admission.k8s.io/admit-policy')") + } + if msgs := validation.IsQualifiedName(key); len(msgs) != 0 { + return fmt.Errorf("annotation key has invalid format %s. A qualified name like 'podsecuritypolicy.admission.k8s.io/admit-policy' is required.", strings.Join(msgs, ",")) + } + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/admission/audit.go b/deps/k8s.io/apiserver/pkg/admission/audit.go new file mode 100644 index 000000000..13d86b33b --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/audit.go @@ -0,0 +1,95 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package admission + +import ( + "fmt" + + auditinternal "k8s.io/apiserver/pkg/apis/audit" + "k8s.io/apiserver/pkg/audit" +) + +// auditHandler logs annotations set by other admission handlers +type auditHandler struct { + Interface + ae *auditinternal.Event +} + +var _ Interface = &auditHandler{} +var _ MutationInterface = &auditHandler{} +var _ ValidationInterface = &auditHandler{} + +// WithAudit is a decorator for a admission phase. It saves annotations +// of attribute into the audit event. Attributes passed to the Admit and +// Validate function must be instance of privateAnnotationsGetter or +// AnnotationsGetter, otherwise an error is returned. +func WithAudit(i Interface, ae *auditinternal.Event) Interface { + if i == nil { + return i + } + return &auditHandler{i, ae} +} + +func (handler auditHandler) Admit(a Attributes) error { + if !handler.Interface.Handles(a.GetOperation()) { + return nil + } + if err := ensureAnnotationGetter(a); err != nil { + return err + } + var err error + if mutator, ok := handler.Interface.(MutationInterface); ok { + err = mutator.Admit(a) + handler.logAnnotations(a) + } + return err +} + +func (handler auditHandler) Validate(a Attributes) error { + if !handler.Interface.Handles(a.GetOperation()) { + return nil + } + if err := ensureAnnotationGetter(a); err != nil { + return err + } + var err error + if validator, ok := handler.Interface.(ValidationInterface); ok { + err = validator.Validate(a) + handler.logAnnotations(a) + } + return err +} + +func ensureAnnotationGetter(a Attributes) error { + _, okPrivate := a.(privateAnnotationsGetter) + _, okPublic := a.(AnnotationsGetter) + if okPrivate || okPublic { + return nil + } + return fmt.Errorf("attributes must be an instance of privateAnnotationsGetter or AnnotationsGetter") +} + +func (handler auditHandler) logAnnotations(a Attributes) { + switch a := a.(type) { + case privateAnnotationsGetter: + audit.LogAnnotations(handler.ae, a.getAnnotations()) + case AnnotationsGetter: + audit.LogAnnotations(handler.ae, a.GetAnnotations()) + default: + // this will never happen, because we have already checked it in ensureAnnotationGetter + } +} diff --git a/deps/k8s.io/apiserver/pkg/admission/config.go b/deps/k8s.io/apiserver/pkg/admission/config.go index 07c2c90f8..f59d0608b 100644 --- a/deps/k8s.io/apiserver/pkg/admission/config.go +++ b/deps/k8s.io/apiserver/pkg/admission/config.go @@ -29,7 +29,6 @@ import ( "github.com/golang/glog" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/apis/apiserver" @@ -177,26 +176,3 @@ func (p configProvider) ConfigFor(pluginName string) (io.Reader, error) { // there is no registered config that matches on plugin name. return nil, nil } - -// writeYAML writes the specified object to a byte array as yaml. -func writeYAML(obj runtime.Object, scheme *runtime.Scheme) ([]byte, error) { - gvks, _, err := scheme.ObjectKinds(obj) - if err != nil { - return nil, err - } - gvs := []schema.GroupVersion{} - for _, gvk := range gvks { - gvs = append(gvs, gvk.GroupVersion()) - } - codecs := serializer.NewCodecFactory(scheme) - json, err := runtime.Encode(codecs.LegacyCodec(gvs...), obj) - if err != nil { - return nil, err - } - - content, err := yaml.JSONToYAML(json) - if err != nil { - return nil, err - } - return content, err -} diff --git a/deps/k8s.io/apiserver/pkg/admission/configuration/BUILD b/deps/k8s.io/apiserver/pkg/admission/configuration/BUILD deleted file mode 100644 index c892344c3..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/configuration/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "configuration_manager_test.go", - "initializer_manager_test.go", - "mutating_webhook_manager_test.go", - "validating_webhook_manager_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/configuration", - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "configuration_manager.go", - "initializer_manager.go", - "mutating_webhook_manager.go", - "validating_webhook_manager.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/configuration", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/configuration/mutating_webhook_manager.go b/deps/k8s.io/apiserver/pkg/admission/configuration/mutating_webhook_manager.go index bf4d0eabf..4b2256e11 100644 --- a/deps/k8s.io/apiserver/pkg/admission/configuration/mutating_webhook_manager.go +++ b/deps/k8s.io/apiserver/pkg/admission/configuration/mutating_webhook_manager.go @@ -18,84 +18,80 @@ package configuration import ( "fmt" - "reflect" "sort" - - "github.com/golang/glog" + "sync/atomic" "k8s.io/api/admissionregistration/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/labels" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" + "k8s.io/client-go/informers" + admissionregistrationlisters "k8s.io/client-go/listers/admissionregistration/v1beta1" + "k8s.io/client-go/tools/cache" ) -type MutatingWebhookConfigurationLister interface { - List(opts metav1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error) +// mutatingWebhookConfigurationManager collects the mutating webhook objects so that they can be called. +type mutatingWebhookConfigurationManager struct { + configuration *atomic.Value + lister admissionregistrationlisters.MutatingWebhookConfigurationLister + hasSynced func() bool } -// MutatingWebhookConfigurationManager collects the mutating webhook objects so that they can be called. -type MutatingWebhookConfigurationManager struct { - *poller -} +var _ generic.Source = &mutatingWebhookConfigurationManager{} -func NewMutatingWebhookConfigurationManager(c MutatingWebhookConfigurationLister) *MutatingWebhookConfigurationManager { - getFn := func() (runtime.Object, error) { - list, err := c.List(metav1.ListOptions{}) - if err != nil { - if errors.IsNotFound(err) || errors.IsForbidden(err) { - glog.V(5).Infof("MutatingWebhookConfiguration are disabled due to an error: %v", err) - return nil, ErrDisabled - } - return nil, err - } - return mergeMutatingWebhookConfigurations(list), nil +func NewMutatingWebhookConfigurationManager(f informers.SharedInformerFactory) generic.Source { + informer := f.Admissionregistration().V1beta1().MutatingWebhookConfigurations() + manager := &mutatingWebhookConfigurationManager{ + configuration: &atomic.Value{}, + lister: informer.Lister(), + hasSynced: informer.Informer().HasSynced, } - return &MutatingWebhookConfigurationManager{ - newPoller(getFn), - } + // Start with an empty list + manager.configuration.Store(&v1beta1.MutatingWebhookConfiguration{}) + + // On any change, rebuild the config + informer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: func(_ interface{}) { manager.updateConfiguration() }, + UpdateFunc: func(_, _ interface{}) { manager.updateConfiguration() }, + DeleteFunc: func(_ interface{}) { manager.updateConfiguration() }, + }) + + return manager } // Webhooks returns the merged MutatingWebhookConfiguration. -func (im *MutatingWebhookConfigurationManager) Webhooks() (*v1beta1.MutatingWebhookConfiguration, error) { - configuration, err := im.poller.configuration() - if err != nil { - return nil, err - } - mutatingWebhookConfiguration, ok := configuration.(*v1beta1.MutatingWebhookConfiguration) - if !ok { - return nil, fmt.Errorf("expected type %v, got type %v", reflect.TypeOf(mutatingWebhookConfiguration), reflect.TypeOf(configuration)) - } - return mutatingWebhookConfiguration, nil +func (m *mutatingWebhookConfigurationManager) Webhooks() []v1beta1.Webhook { + return m.configuration.Load().(*v1beta1.MutatingWebhookConfiguration).Webhooks } -func (im *MutatingWebhookConfigurationManager) Run(stopCh <-chan struct{}) { - im.poller.Run(stopCh) +func (m *mutatingWebhookConfigurationManager) HasSynced() bool { + return m.hasSynced() } -func mergeMutatingWebhookConfigurations( - list *v1beta1.MutatingWebhookConfigurationList, -) *v1beta1.MutatingWebhookConfiguration { - configurations := append([]v1beta1.MutatingWebhookConfiguration{}, list.Items...) +func (m *mutatingWebhookConfigurationManager) updateConfiguration() { + configurations, err := m.lister.List(labels.Everything()) + if err != nil { + utilruntime.HandleError(fmt.Errorf("error updating configuration: %v", err)) + return + } + m.configuration.Store(mergeMutatingWebhookConfigurations(configurations)) +} + +func mergeMutatingWebhookConfigurations(configurations []*v1beta1.MutatingWebhookConfiguration) *v1beta1.MutatingWebhookConfiguration { var ret v1beta1.MutatingWebhookConfiguration // The internal order of webhooks for each configuration is provided by the user // but configurations themselves can be in any order. As we are going to run these // webhooks in serial, they are sorted here to have a deterministic order. - sort.Sort(byName(configurations)) + sort.SliceStable(configurations, MutatingWebhookConfigurationSorter(configurations).ByName) for _, c := range configurations { ret.Webhooks = append(ret.Webhooks, c.Webhooks...) } return &ret } -// byName sorts MutatingWebhookConfiguration by name. These objects are all in -// cluster namespace (aka no namespace) thus they all have unique names. -type byName []v1beta1.MutatingWebhookConfiguration - -func (x byName) Len() int { return len(x) } - -func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } +type MutatingWebhookConfigurationSorter []*v1beta1.MutatingWebhookConfiguration -func (x byName) Less(i, j int) bool { - return x[i].ObjectMeta.Name < x[j].ObjectMeta.Name +func (a MutatingWebhookConfigurationSorter) ByName(i, j int) bool { + return a[i].Name < a[j].Name } diff --git a/deps/k8s.io/apiserver/pkg/admission/configuration/validating_webhook_manager.go b/deps/k8s.io/apiserver/pkg/admission/configuration/validating_webhook_manager.go index 8f9fd34da..9258258f6 100644 --- a/deps/k8s.io/apiserver/pkg/admission/configuration/validating_webhook_manager.go +++ b/deps/k8s.io/apiserver/pkg/admission/configuration/validating_webhook_manager.go @@ -18,67 +18,80 @@ package configuration import ( "fmt" - "reflect" - - "github.com/golang/glog" + "sort" + "sync/atomic" "k8s.io/api/admissionregistration/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/labels" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" + "k8s.io/client-go/informers" + admissionregistrationlisters "k8s.io/client-go/listers/admissionregistration/v1beta1" + "k8s.io/client-go/tools/cache" ) -type ValidatingWebhookConfigurationLister interface { - List(opts metav1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error) +// validatingWebhookConfigurationManager collects the validating webhook objects so that they can be called. +type validatingWebhookConfigurationManager struct { + configuration *atomic.Value + lister admissionregistrationlisters.ValidatingWebhookConfigurationLister + hasSynced func() bool } -// ValidatingWebhookConfigurationManager collects the validating webhook objects so that they can be called. -type ValidatingWebhookConfigurationManager struct { - *poller -} +var _ generic.Source = &validatingWebhookConfigurationManager{} -func NewValidatingWebhookConfigurationManager(c ValidatingWebhookConfigurationLister) *ValidatingWebhookConfigurationManager { - getFn := func() (runtime.Object, error) { - list, err := c.List(metav1.ListOptions{}) - if err != nil { - if errors.IsNotFound(err) || errors.IsForbidden(err) { - glog.V(5).Infof("ValidatingWebhookConfiguration are disabled due to an error: %v", err) - return nil, ErrDisabled - } - return nil, err - } - return mergeValidatingWebhookConfigurations(list), nil +func NewValidatingWebhookConfigurationManager(f informers.SharedInformerFactory) generic.Source { + informer := f.Admissionregistration().V1beta1().ValidatingWebhookConfigurations() + manager := &validatingWebhookConfigurationManager{ + configuration: &atomic.Value{}, + lister: informer.Lister(), + hasSynced: informer.Informer().HasSynced, } - return &ValidatingWebhookConfigurationManager{ - newPoller(getFn), - } + // Start with an empty list + manager.configuration.Store(&v1beta1.ValidatingWebhookConfiguration{}) + + // On any change, rebuild the config + informer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: func(_ interface{}) { manager.updateConfiguration() }, + UpdateFunc: func(_, _ interface{}) { manager.updateConfiguration() }, + DeleteFunc: func(_ interface{}) { manager.updateConfiguration() }, + }) + + return manager } // Webhooks returns the merged ValidatingWebhookConfiguration. -func (im *ValidatingWebhookConfigurationManager) Webhooks() (*v1beta1.ValidatingWebhookConfiguration, error) { - configuration, err := im.poller.configuration() - if err != nil { - return nil, err - } - validatingWebhookConfiguration, ok := configuration.(*v1beta1.ValidatingWebhookConfiguration) - if !ok { - return nil, fmt.Errorf("expected type %v, got type %v", reflect.TypeOf(validatingWebhookConfiguration), reflect.TypeOf(configuration)) - } - return validatingWebhookConfiguration, nil +func (v *validatingWebhookConfigurationManager) Webhooks() []v1beta1.Webhook { + return v.configuration.Load().(*v1beta1.ValidatingWebhookConfiguration).Webhooks } -func (im *ValidatingWebhookConfigurationManager) Run(stopCh <-chan struct{}) { - im.poller.Run(stopCh) +// HasSynced returns true if the shared informers have synced. +func (v *validatingWebhookConfigurationManager) HasSynced() bool { + return v.hasSynced() +} + +func (v *validatingWebhookConfigurationManager) updateConfiguration() { + configurations, err := v.lister.List(labels.Everything()) + if err != nil { + utilruntime.HandleError(fmt.Errorf("error updating configuration: %v", err)) + return + } + v.configuration.Store(mergeValidatingWebhookConfigurations(configurations)) } func mergeValidatingWebhookConfigurations( - list *v1beta1.ValidatingWebhookConfigurationList, + configurations []*v1beta1.ValidatingWebhookConfiguration, ) *v1beta1.ValidatingWebhookConfiguration { - configurations := list.Items + sort.SliceStable(configurations, ValidatingWebhookConfigurationSorter(configurations).ByName) var ret v1beta1.ValidatingWebhookConfiguration for _, c := range configurations { ret.Webhooks = append(ret.Webhooks, c.Webhooks...) } return &ret } + +type ValidatingWebhookConfigurationSorter []*v1beta1.ValidatingWebhookConfiguration + +func (a ValidatingWebhookConfigurationSorter) ByName(i, j int) bool { + return a[i].Name < a[j].Name +} diff --git a/deps/k8s.io/apiserver/pkg/admission/decorator.go b/deps/k8s.io/apiserver/pkg/admission/decorator.go new file mode 100644 index 000000000..a4b0b28b5 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/decorator.go @@ -0,0 +1,39 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package admission + +type Decorator interface { + Decorate(handler Interface, name string) Interface +} + +type DecoratorFunc func(handler Interface, name string) Interface + +func (d DecoratorFunc) Decorate(handler Interface, name string) Interface { + return d(handler, name) +} + +type Decorators []Decorator + +// Decorate applies the decorator in inside-out order, i.e. the first decorator in the slice is first applied to the given handler. +func (d Decorators) Decorate(handler Interface, name string) Interface { + result := handler + for _, d := range d { + result = d.Decorate(result, name) + } + + return result +} diff --git a/deps/k8s.io/apiserver/pkg/admission/initializer/BUILD b/deps/k8s.io/apiserver/pkg/admission/initializer/BUILD deleted file mode 100644 index 6884d643a..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/initializer/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "initializer.go", - "interfaces.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/initializer", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = ["initializer_test.go"], - importpath = "k8s.io/apiserver/pkg/admission/initializer_test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/initializer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/interfaces.go b/deps/k8s.io/apiserver/pkg/admission/interfaces.go index 76d3864e2..a17c28990 100644 --- a/deps/k8s.io/apiserver/pkg/admission/interfaces.go +++ b/deps/k8s.io/apiserver/pkg/admission/interfaces.go @@ -41,6 +41,11 @@ type Attributes interface { GetSubresource() string // GetOperation is the operation being performed GetOperation() Operation + // IsDryRun indicates that modifications will definitely not be persisted for this request. This is to prevent + // admission controllers with side effects and a method of reconciliation from being overwhelmed. + // However, a value of false for this does not mean that the modification will be persisted, because it + // could still be rejected by a subsequent validation step. + IsDryRun() bool // GetObject is the object from the incoming request prior to default values being applied GetObject() runtime.Object // GetOldObject is the existing object. Only populated for UPDATE requests. @@ -49,6 +54,23 @@ type Attributes interface { GetKind() schema.GroupVersionKind // GetUserInfo is information about the requesting user GetUserInfo() user.Info + + // AddAnnotation sets annotation according to key-value pair. The key should be qualified, e.g., podsecuritypolicy.admission.k8s.io/admit-policy, where + // "podsecuritypolicy" is the name of the plugin, "admission.k8s.io" is the name of the organization, "admit-policy" is the key name. + // An error is returned if the format of key is invalid. When trying to overwrite annotation with a new value, an error is returned. + // Both ValidationInterface and MutationInterface are allowed to add Annotations. + AddAnnotation(key, value string) error +} + +// privateAnnotationsGetter is a private interface which allows users to get annotations from Attributes. +type privateAnnotationsGetter interface { + getAnnotations() map[string]string +} + +// AnnotationsGetter allows users to get annotations from Attributes. An alternate Attribute should implement +// this interface. +type AnnotationsGetter interface { + GetAnnotations() map[string]string } // Interface is an abstract, pluggable interface for Admission Control decisions. diff --git a/deps/k8s.io/apiserver/pkg/admission/metrics/BUILD b/deps/k8s.io/apiserver/pkg/admission/metrics/BUILD deleted file mode 100644 index 22e4b1f3b..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/metrics/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["metrics.go"], - importpath = "k8s.io/apiserver/pkg/admission/metrics", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "metrics_test.go", - "testutil_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/metrics", - deps = [ - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/github.com/prometheus/client_model/go:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/initialization/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/initialization/BUILD deleted file mode 100644 index 9410779b8..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/initialization/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["initialization.go"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/initialization", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/configuration:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["initialization_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/initialization", - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD deleted file mode 100644 index 101cd7700..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle/BUILD +++ /dev/null @@ -1,63 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["admission.go"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/cache:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/initializer:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["admission_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/initializer:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/BUILD deleted file mode 100644 index b4cfcdfb6..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/BUILD +++ /dev/null @@ -1,60 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "authentication.go", - "client.go", - "kubeconfig.go", - "serviceresolver.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/config", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/hashicorp/golang-lru:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/errors:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "authentication_test.go", - "serviceresolver_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/config", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/BUILD deleted file mode 100644 index 3b6bdc2ab..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/install:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/BUILD deleted file mode 100644 index 01d39435e..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.conversion.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.conversion.go index d7e35ffed..eadb147c4 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.conversion.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1alpha1 @@ -32,11 +32,18 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_WebhookAdmission_To_webhookadmission_WebhookAdmission, - Convert_webhookadmission_WebhookAdmission_To_v1alpha1_WebhookAdmission, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*WebhookAdmission)(nil), (*webhookadmission.WebhookAdmission)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_WebhookAdmission_To_webhookadmission_WebhookAdmission(a.(*WebhookAdmission), b.(*webhookadmission.WebhookAdmission), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*webhookadmission.WebhookAdmission)(nil), (*WebhookAdmission)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_webhookadmission_WebhookAdmission_To_v1alpha1_WebhookAdmission(a.(*webhookadmission.WebhookAdmission), b.(*WebhookAdmission), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1alpha1_WebhookAdmission_To_webhookadmission_WebhookAdmission(in *WebhookAdmission, out *webhookadmission.WebhookAdmission, s conversion.Scope) error { diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.deepcopy.go index c9ef335c7..a59d62d6c 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -45,7 +45,6 @@ func (in *WebhookAdmission) DeepCopy() *WebhookAdmission { func (in *WebhookAdmission) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.defaults.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.defaults.go index 5e24d22ca..dd621a3ac 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.defaults.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/zz_generated.deepcopy.go index 890594a7d..90b7e0ae6 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package webhookadmission @@ -45,7 +45,6 @@ func (in *WebhookAdmission) DeepCopy() *WebhookAdmission { func (in *WebhookAdmission) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/client.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/client.go index 808ef944f..9667a396d 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/client.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/client.go @@ -17,6 +17,7 @@ limitations under the License. package config import ( + "context" "encoding/json" "errors" "fmt" @@ -24,8 +25,10 @@ import ( "net/url" lru "github.com/hashicorp/golang-lru" + admissionv1beta1 "k8s.io/api/admission/v1beta1" "k8s.io/api/admissionregistration/v1beta1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" utilerrors "k8s.io/apimachinery/pkg/util/errors" webhookerrors "k8s.io/apiserver/pkg/admission/plugin/webhook/errors" "k8s.io/client-go/rest" @@ -48,14 +51,21 @@ type ClientManager struct { cache *lru.Cache } -// NewClientManager creates a ClientManager. +// NewClientManager creates a clientManager. func NewClientManager() (ClientManager, error) { cache, err := lru.New(defaultCacheSize) if err != nil { return ClientManager{}, err } + admissionScheme := runtime.NewScheme() + if err := admissionv1beta1.AddToScheme(admissionScheme); err != nil { + return ClientManager{}, err + } return ClientManager{ cache: cache, + negotiatedSerializer: serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{ + Serializer: serializer.NewCodecFactory(admissionScheme).LegacyCodec(admissionv1beta1.SchemeGroupVersion), + }), }, nil } @@ -79,22 +89,17 @@ func (cm *ClientManager) SetServiceResolver(sr ServiceResolver) { } } -// SetNegotiatedSerializer sets the NegotiatedSerializer. -func (cm *ClientManager) SetNegotiatedSerializer(n runtime.NegotiatedSerializer) { - cm.negotiatedSerializer = n -} - // Validate checks if ClientManager is properly set up. func (cm *ClientManager) Validate() error { var errs []error if cm.negotiatedSerializer == nil { - errs = append(errs, fmt.Errorf("the ClientManager requires a negotiatedSerializer")) + errs = append(errs, fmt.Errorf("the clientManager requires a negotiatedSerializer")) } if cm.serviceResolver == nil { - errs = append(errs, fmt.Errorf("the ClientManager requires a serviceResolver")) + errs = append(errs, fmt.Errorf("the clientManager requires a serviceResolver")) } if cm.authInfoResolver == nil { - errs = append(errs, fmt.Errorf("the ClientManager requires an authInfoResolver")) + errs = append(errs, fmt.Errorf("the clientManager requires an authInfoResolver")) } return utilerrors.NewAggregate(errs) } @@ -111,7 +116,12 @@ func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error } complete := func(cfg *rest.Config) (*rest.RESTClient, error) { - cfg.TLSClientConfig.CAData = h.ClientConfig.CABundle + // Combine CAData from the config with any existing CA bundle provided + if len(cfg.TLSClientConfig.CAData) > 0 { + cfg.TLSClientConfig.CAData = append(cfg.TLSClientConfig.CAData, '\n') + } + cfg.TLSClientConfig.CAData = append(cfg.TLSClientConfig.CAData, h.ClientConfig.CABundle...) + cfg.ContentConfig.NegotiatedSerializer = cm.negotiatedSerializer cfg.ContentConfig.ContentType = runtime.ContentTypeJSON client, err := rest.UnversionedRESTClientFor(cfg) @@ -133,13 +143,17 @@ func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error if svc.Path != nil { cfg.APIPath = *svc.Path } - cfg.TLSClientConfig.ServerName = serverName + // Set the server name if not already set + if len(cfg.TLSClientConfig.ServerName) == 0 { + cfg.TLSClientConfig.ServerName = serverName + } delegateDialer := cfg.Dial if delegateDialer == nil { - delegateDialer = net.Dial + var d net.Dialer + delegateDialer = d.DialContext } - cfg.Dial = func(network, addr string) (net.Conn, error) { + cfg.Dial = func(ctx context.Context, network, addr string) (net.Conn, error) { if addr == host { u, err := cm.serviceResolver.ResolveEndpoint(svc.Namespace, svc.Name) if err != nil { @@ -147,7 +161,7 @@ func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error } addr = u.Host } - return delegateDialer(network, addr) + return delegateDialer(ctx, network, addr) } return complete(cfg) @@ -168,7 +182,7 @@ func (cm *ClientManager) HookClient(h *v1beta1.Webhook) (*rest.RESTClient, error } cfg := rest.CopyConfig(restConfig) - cfg.Host = u.Host + cfg.Host = u.Scheme + "://" + u.Host cfg.APIPath = u.Path return complete(cfg) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/kubeconfig.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/kubeconfig.go index 7cf0d3193..3f5d22f95 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/kubeconfig.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/config/kubeconfig.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission" "k8s.io/apiserver/pkg/admission/plugin/webhook/config/apis/webhookadmission/v1alpha1" @@ -35,8 +36,8 @@ var ( ) func init() { - webhookadmission.AddToScheme(scheme) - v1alpha1.AddToScheme(scheme) + utilruntime.Must(webhookadmission.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) } // LoadConfig extract the KubeConfigFile from configFile diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/BUILD deleted file mode 100644 index 60b64519b..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - "statuserror.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/errors", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["statuserror_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/errors", - deps = ["//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/statuserror.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/statuserror.go index f37dec017..df38afdcb 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/statuserror.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/errors/statuserror.go @@ -45,3 +45,9 @@ func ToStatusErr(webhookName string, result *metav1.Status) *apierrors.StatusErr ErrStatus: *result, } } + +// NewDryRunUnsupportedErr returns a StatusError with information about the webhook plugin +func NewDryRunUnsupportedErr(webhookName string) *apierrors.StatusError { + reason := fmt.Sprintf("admission webhook %q does not support dry run", webhookName) + return apierrors.NewBadRequest(reason) +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/conversion.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/conversion.go new file mode 100644 index 000000000..a75c63fa9 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/conversion.go @@ -0,0 +1,55 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generic + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// convertor converts objects to the desired version. +type convertor struct { + Scheme *runtime.Scheme +} + +// ConvertToGVK converts object to the desired gvk. +func (c *convertor) ConvertToGVK(obj runtime.Object, gvk schema.GroupVersionKind) (runtime.Object, error) { + // Unlike other resources, custom resources do not have internal version, so + // if obj is a custom resource, it should not need conversion. + if obj.GetObjectKind().GroupVersionKind() == gvk { + return obj, nil + } + out, err := c.Scheme.New(gvk) + if err != nil { + return nil, err + } + err = c.Scheme.Convert(obj, out, nil) + if err != nil { + return nil, err + } + return out, nil +} + +// Validate checks if the conversion has a scheme. +func (c *convertor) Validate() error { + if c.Scheme == nil { + return fmt.Errorf("the convertor requires a scheme") + } + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/interfaces.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/interfaces.go new file mode 100644 index 000000000..3a7edb526 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/interfaces.go @@ -0,0 +1,45 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generic + +import ( + "context" + + "k8s.io/api/admissionregistration/v1beta1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/admission" +) + +// Source can list dynamic webhook plugins. +type Source interface { + Webhooks() []v1beta1.Webhook + HasSynced() bool +} + +// VersionedAttributes is a wrapper around the original admission attributes, adding versioned +// variants of the object and old object. +type VersionedAttributes struct { + admission.Attributes + VersionedOldObject runtime.Object + VersionedObject runtime.Object +} + +// Dispatcher dispatches webhook call to a list of webhooks with admission attributes as argument. +type Dispatcher interface { + // Dispatch a request to the webhooks using the given webhooks. A non-nil error means the request is rejected. + Dispatch(ctx context.Context, a *VersionedAttributes, hooks []*v1beta1.Webhook) error +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go new file mode 100644 index 000000000..fdcbdd9e1 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/generic/webhook.go @@ -0,0 +1,202 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generic + +import ( + "context" + "fmt" + "io" + + "k8s.io/api/admissionregistration/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/admission" + genericadmissioninit "k8s.io/apiserver/pkg/admission/initializer" + "k8s.io/apiserver/pkg/admission/plugin/webhook/config" + "k8s.io/apiserver/pkg/admission/plugin/webhook/namespace" + "k8s.io/apiserver/pkg/admission/plugin/webhook/rules" + "k8s.io/client-go/informers" + clientset "k8s.io/client-go/kubernetes" +) + +// Webhook is an abstract admission plugin with all the infrastructure to define Admit or Validate on-top. +type Webhook struct { + *admission.Handler + + sourceFactory sourceFactory + + hookSource Source + clientManager *config.ClientManager + convertor *convertor + namespaceMatcher *namespace.Matcher + dispatcher Dispatcher +} + +var ( + _ genericadmissioninit.WantsExternalKubeClientSet = &Webhook{} + _ admission.Interface = &Webhook{} +) + +type sourceFactory func(f informers.SharedInformerFactory) Source +type dispatcherFactory func(cm *config.ClientManager) Dispatcher + +// NewWebhook creates a new generic admission webhook. +func NewWebhook(handler *admission.Handler, configFile io.Reader, sourceFactory sourceFactory, dispatcherFactory dispatcherFactory) (*Webhook, error) { + kubeconfigFile, err := config.LoadConfig(configFile) + if err != nil { + return nil, err + } + + cm, err := config.NewClientManager() + if err != nil { + return nil, err + } + authInfoResolver, err := config.NewDefaultAuthenticationInfoResolver(kubeconfigFile) + if err != nil { + return nil, err + } + // Set defaults which may be overridden later. + cm.SetAuthenticationInfoResolver(authInfoResolver) + cm.SetServiceResolver(config.NewDefaultServiceResolver()) + + return &Webhook{ + Handler: handler, + sourceFactory: sourceFactory, + clientManager: &cm, + convertor: &convertor{}, + namespaceMatcher: &namespace.Matcher{}, + dispatcher: dispatcherFactory(&cm), + }, nil +} + +// SetAuthenticationInfoResolverWrapper sets the +// AuthenticationInfoResolverWrapper. +// TODO find a better way wire this, but keep this pull small for now. +func (a *Webhook) SetAuthenticationInfoResolverWrapper(wrapper config.AuthenticationInfoResolverWrapper) { + a.clientManager.SetAuthenticationInfoResolverWrapper(wrapper) +} + +// SetServiceResolver sets a service resolver for the webhook admission plugin. +// Passing a nil resolver does not have an effect, instead a default one will be used. +func (a *Webhook) SetServiceResolver(sr config.ServiceResolver) { + a.clientManager.SetServiceResolver(sr) +} + +// SetScheme sets a serializer(NegotiatedSerializer) which is derived from the scheme +func (a *Webhook) SetScheme(scheme *runtime.Scheme) { + if scheme != nil { + a.convertor.Scheme = scheme + } +} + +// SetExternalKubeClientSet implements the WantsExternalKubeInformerFactory interface. +// It sets external ClientSet for admission plugins that need it +func (a *Webhook) SetExternalKubeClientSet(client clientset.Interface) { + a.namespaceMatcher.Client = client +} + +// SetExternalKubeInformerFactory implements the WantsExternalKubeInformerFactory interface. +func (a *Webhook) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) { + namespaceInformer := f.Core().V1().Namespaces() + a.namespaceMatcher.NamespaceLister = namespaceInformer.Lister() + a.hookSource = a.sourceFactory(f) + a.SetReadyFunc(func() bool { + return namespaceInformer.Informer().HasSynced() && a.hookSource.HasSynced() + }) +} + +// ValidateInitialization implements the InitializationValidator interface. +func (a *Webhook) ValidateInitialization() error { + if a.hookSource == nil { + return fmt.Errorf("kubernetes client is not properly setup") + } + if err := a.namespaceMatcher.Validate(); err != nil { + return fmt.Errorf("namespaceMatcher is not properly setup: %v", err) + } + if err := a.clientManager.Validate(); err != nil { + return fmt.Errorf("clientManager is not properly setup: %v", err) + } + if err := a.convertor.Validate(); err != nil { + return fmt.Errorf("convertor is not properly setup: %v", err) + } + return nil +} + +// ShouldCallHook makes a decision on whether to call the webhook or not by the attribute. +func (a *Webhook) ShouldCallHook(h *v1beta1.Webhook, attr admission.Attributes) (bool, *apierrors.StatusError) { + var matches bool + for _, r := range h.Rules { + m := rules.Matcher{Rule: r, Attr: attr} + if m.Matches() { + matches = true + break + } + } + if !matches { + return false, nil + } + + return a.namespaceMatcher.MatchNamespaceSelector(h, attr) +} + +// Dispatch is called by the downstream Validate or Admit methods. +func (a *Webhook) Dispatch(attr admission.Attributes) error { + if rules.IsWebhookConfigurationResource(attr) { + return nil + } + if !a.WaitForReady() { + return admission.NewForbidden(attr, fmt.Errorf("not yet ready to handle request")) + } + hooks := a.hookSource.Webhooks() + ctx := context.TODO() + + var relevantHooks []*v1beta1.Webhook + for i := range hooks { + call, err := a.ShouldCallHook(&hooks[i], attr) + if err != nil { + return err + } + if call { + relevantHooks = append(relevantHooks, &hooks[i]) + } + } + + if len(relevantHooks) == 0 { + // no matching hooks + return nil + } + + // convert the object to the external version before sending it to the webhook + versionedAttr := VersionedAttributes{ + Attributes: attr, + } + if oldObj := attr.GetOldObject(); oldObj != nil { + out, err := a.convertor.ConvertToGVK(oldObj, attr.GetKind()) + if err != nil { + return apierrors.NewInternalError(err) + } + versionedAttr.VersionedOldObject = out + } + if obj := attr.GetObject(); obj != nil { + out, err := a.convertor.ConvertToGVK(obj, attr.GetKind()) + if err != nil { + return apierrors.NewInternalError(err) + } + versionedAttr.VersionedObject = out + } + return a.dispatcher.Dispatch(ctx, &versionedAttr, relevantHooks) +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD deleted file mode 100644 index 0d46b5d76..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/BUILD +++ /dev/null @@ -1,71 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "admission.go", - "doc.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/evanphx/json-patch:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/admission/v1beta1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/configuration:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/initializer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/config:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/rules:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["admission_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/mutating", - deps = [ - "//vendor/k8s.io/api/admission/v1beta1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/config:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/admission.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/admission.go deleted file mode 100644 index 6d62a36f6..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/admission.go +++ /dev/null @@ -1,325 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package mutating delegates admission checks to dynamically configured -// mutating webhooks. -package mutating - -import ( - "context" - "fmt" - "io" - "time" - - jsonpatch "github.com/evanphx/json-patch" - "github.com/golang/glog" - - admissionv1beta1 "k8s.io/api/admission/v1beta1" - "k8s.io/api/admissionregistration/v1beta1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/apimachinery/pkg/runtime/serializer/json" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/admission/configuration" - genericadmissioninit "k8s.io/apiserver/pkg/admission/initializer" - admissionmetrics "k8s.io/apiserver/pkg/admission/metrics" - "k8s.io/apiserver/pkg/admission/plugin/webhook/config" - webhookerrors "k8s.io/apiserver/pkg/admission/plugin/webhook/errors" - "k8s.io/apiserver/pkg/admission/plugin/webhook/namespace" - "k8s.io/apiserver/pkg/admission/plugin/webhook/request" - "k8s.io/apiserver/pkg/admission/plugin/webhook/rules" - "k8s.io/apiserver/pkg/admission/plugin/webhook/versioned" - "k8s.io/client-go/informers" - clientset "k8s.io/client-go/kubernetes" -) - -const ( - // Name of admission plug-in - PluginName = "MutatingAdmissionWebhook" -) - -// Register registers a plugin -func Register(plugins *admission.Plugins) { - plugins.Register(PluginName, func(configFile io.Reader) (admission.Interface, error) { - plugin, err := NewMutatingWebhook(configFile) - if err != nil { - return nil, err - } - - return plugin, nil - }) -} - -// WebhookSource can list dynamic webhook plugins. -type WebhookSource interface { - Run(stopCh <-chan struct{}) - Webhooks() (*v1beta1.MutatingWebhookConfiguration, error) -} - -// NewMutatingWebhook returns a generic admission webhook plugin. -func NewMutatingWebhook(configFile io.Reader) (*MutatingWebhook, error) { - kubeconfigFile, err := config.LoadConfig(configFile) - if err != nil { - return nil, err - } - - cm, err := config.NewClientManager() - if err != nil { - return nil, err - } - authInfoResolver, err := config.NewDefaultAuthenticationInfoResolver(kubeconfigFile) - if err != nil { - return nil, err - } - // Set defaults which may be overridden later. - cm.SetAuthenticationInfoResolver(authInfoResolver) - cm.SetServiceResolver(config.NewDefaultServiceResolver()) - - return &MutatingWebhook{ - Handler: admission.NewHandler( - admission.Connect, - admission.Create, - admission.Delete, - admission.Update, - ), - clientManager: cm, - }, nil -} - -var _ admission.MutationInterface = &MutatingWebhook{} - -// MutatingWebhook is an implementation of admission.Interface. -type MutatingWebhook struct { - *admission.Handler - hookSource WebhookSource - namespaceMatcher namespace.Matcher - clientManager config.ClientManager - convertor versioned.Convertor - defaulter runtime.ObjectDefaulter - jsonSerializer runtime.Serializer -} - -var ( - _ = genericadmissioninit.WantsExternalKubeClientSet(&MutatingWebhook{}) -) - -// TODO find a better way wire this, but keep this pull small for now. -func (a *MutatingWebhook) SetAuthenticationInfoResolverWrapper(wrapper config.AuthenticationInfoResolverWrapper) { - a.clientManager.SetAuthenticationInfoResolverWrapper(wrapper) -} - -// SetServiceResolver sets a service resolver for the webhook admission plugin. -// Passing a nil resolver does not have an effect, instead a default one will be used. -func (a *MutatingWebhook) SetServiceResolver(sr config.ServiceResolver) { - a.clientManager.SetServiceResolver(sr) -} - -// SetScheme sets a serializer(NegotiatedSerializer) which is derived from the scheme -func (a *MutatingWebhook) SetScheme(scheme *runtime.Scheme) { - if scheme != nil { - a.clientManager.SetNegotiatedSerializer(serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{ - Serializer: serializer.NewCodecFactory(scheme).LegacyCodec(admissionv1beta1.SchemeGroupVersion), - })) - a.convertor.Scheme = scheme - a.defaulter = scheme - a.jsonSerializer = json.NewSerializer(json.DefaultMetaFactory, scheme, scheme, false) - } -} - -// WantsExternalKubeClientSet defines a function which sets external ClientSet for admission plugins that need it -func (a *MutatingWebhook) SetExternalKubeClientSet(client clientset.Interface) { - a.namespaceMatcher.Client = client - a.hookSource = configuration.NewMutatingWebhookConfigurationManager(client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations()) -} - -// SetExternalKubeInformerFactory implements the WantsExternalKubeInformerFactory interface. -func (a *MutatingWebhook) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) { - namespaceInformer := f.Core().V1().Namespaces() - a.namespaceMatcher.NamespaceLister = namespaceInformer.Lister() - a.SetReadyFunc(namespaceInformer.Informer().HasSynced) -} - -// ValidateInitialization implements the InitializationValidator interface. -func (a *MutatingWebhook) ValidateInitialization() error { - if a.hookSource == nil { - return fmt.Errorf("MutatingWebhook admission plugin requires a Kubernetes client to be provided") - } - if a.jsonSerializer == nil { - return fmt.Errorf("MutatingWebhook admission plugin's jsonSerializer is not properly setup") - } - if err := a.namespaceMatcher.Validate(); err != nil { - return fmt.Errorf("MutatingWebhook.namespaceMatcher is not properly setup: %v", err) - } - if err := a.clientManager.Validate(); err != nil { - return fmt.Errorf("MutatingWebhook.clientManager is not properly setup: %v", err) - } - if err := a.convertor.Validate(); err != nil { - return fmt.Errorf("MutatingWebhook.convertor is not properly setup: %v", err) - } - if a.defaulter == nil { - return fmt.Errorf("MutatingWebhook.defaulter is not properly setup") - } - go a.hookSource.Run(wait.NeverStop) - return nil -} - -func (a *MutatingWebhook) loadConfiguration(attr admission.Attributes) (*v1beta1.MutatingWebhookConfiguration, error) { - hookConfig, err := a.hookSource.Webhooks() - // if Webhook configuration is disabled, fail open - if err == configuration.ErrDisabled { - return &v1beta1.MutatingWebhookConfiguration{}, nil - } - if err != nil { - e := apierrors.NewServerTimeout(attr.GetResource().GroupResource(), string(attr.GetOperation()), 1) - e.ErrStatus.Message = fmt.Sprintf("Unable to refresh the Webhook configuration: %v", err) - e.ErrStatus.Reason = "LoadingConfiguration" - e.ErrStatus.Details.Causes = append(e.ErrStatus.Details.Causes, metav1.StatusCause{ - Type: "MutatingWebhookConfigurationFailure", - Message: "An error has occurred while refreshing the MutatingWebhook configuration, no resources can be created/updated/deleted/connected until a refresh succeeds.", - }) - return nil, e - } - return hookConfig, nil -} - -// Admit makes an admission decision based on the request attributes. -func (a *MutatingWebhook) Admit(attr admission.Attributes) error { - hookConfig, err := a.loadConfiguration(attr) - if err != nil { - return err - } - hooks := hookConfig.Webhooks - ctx := context.TODO() - - var relevantHooks []*v1beta1.Webhook - for i := range hooks { - call, err := a.shouldCallHook(&hooks[i], attr) - if err != nil { - return err - } - if call { - relevantHooks = append(relevantHooks, &hooks[i]) - } - } - - if len(relevantHooks) == 0 { - // no matching hooks - return nil - } - - // convert the object to the external version before sending it to the webhook - versionedAttr := versioned.Attributes{ - Attributes: attr, - } - if oldObj := attr.GetOldObject(); oldObj != nil { - out, err := a.convertor.ConvertToGVK(oldObj, attr.GetKind()) - if err != nil { - return apierrors.NewInternalError(err) - } - versionedAttr.OldObject = out - } - if obj := attr.GetObject(); obj != nil { - out, err := a.convertor.ConvertToGVK(obj, attr.GetKind()) - if err != nil { - return apierrors.NewInternalError(err) - } - versionedAttr.Object = out - } - - for _, hook := range relevantHooks { - t := time.Now() - err := a.callAttrMutatingHook(ctx, hook, versionedAttr) - admissionmetrics.Metrics.ObserveWebhook(time.Since(t), err != nil, attr, "admit", hook.Name) - if err == nil { - continue - } - - ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore - if callErr, ok := err.(*webhookerrors.ErrCallingWebhook); ok { - if ignoreClientCallFailures { - glog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) - utilruntime.HandleError(callErr) - continue - } - glog.Warningf("Failed calling webhook, failing closed %v: %v", hook.Name, err) - } - return apierrors.NewInternalError(err) - } - - // convert attr.Object to the internal version - return a.convertor.Convert(versionedAttr.Object, attr.GetObject()) -} - -// TODO: factor into a common place along with the validating webhook version. -func (a *MutatingWebhook) shouldCallHook(h *v1beta1.Webhook, attr admission.Attributes) (bool, *apierrors.StatusError) { - var matches bool - for _, r := range h.Rules { - m := rules.Matcher{Rule: r, Attr: attr} - if m.Matches() { - matches = true - break - } - } - if !matches { - return false, nil - } - - return a.namespaceMatcher.MatchNamespaceSelector(h, attr) -} - -// note that callAttrMutatingHook updates attr -func (a *MutatingWebhook) callAttrMutatingHook(ctx context.Context, h *v1beta1.Webhook, attr versioned.Attributes) error { - // Make the webhook request - request := request.CreateAdmissionReview(attr) - client, err := a.clientManager.HookClient(h) - if err != nil { - return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} - } - response := &admissionv1beta1.AdmissionReview{} - if err := client.Post().Context(ctx).Body(&request).Do().Into(response); err != nil { - return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} - } - - if !response.Response.Allowed { - return webhookerrors.ToStatusErr(h.Name, response.Response.Result) - } - - patchJS := response.Response.Patch - if len(patchJS) == 0 { - return nil - } - patchObj, err := jsonpatch.DecodePatch(patchJS) - if err != nil { - return apierrors.NewInternalError(err) - } - objJS, err := runtime.Encode(a.jsonSerializer, attr.Object) - if err != nil { - return apierrors.NewInternalError(err) - } - patchedJS, err := patchObj.Apply(objJS) - if err != nil { - return apierrors.NewInternalError(err) - } - if _, _, err := a.jsonSerializer.Decode(patchedJS, nil, attr.Object); err != nil { - return apierrors.NewInternalError(err) - } - a.defaulter.Default(attr.Object) - return nil -} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go new file mode 100644 index 000000000..c69e01598 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/dispatcher.go @@ -0,0 +1,165 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package mutating delegates admission checks to dynamically configured +// mutating webhooks. +package mutating + +import ( + "context" + "fmt" + "time" + + jsonpatch "github.com/evanphx/json-patch" + "github.com/golang/glog" + + admissionv1beta1 "k8s.io/api/admission/v1beta1" + "k8s.io/api/admissionregistration/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + admissionmetrics "k8s.io/apiserver/pkg/admission/metrics" + "k8s.io/apiserver/pkg/admission/plugin/webhook/config" + webhookerrors "k8s.io/apiserver/pkg/admission/plugin/webhook/errors" + "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" + "k8s.io/apiserver/pkg/admission/plugin/webhook/request" +) + +type mutatingDispatcher struct { + cm *config.ClientManager + plugin *Plugin +} + +func newMutatingDispatcher(p *Plugin) func(cm *config.ClientManager) generic.Dispatcher { + return func(cm *config.ClientManager) generic.Dispatcher { + return &mutatingDispatcher{cm, p} + } +} + +var _ generic.Dispatcher = &mutatingDispatcher{} + +func (a *mutatingDispatcher) Dispatch(ctx context.Context, attr *generic.VersionedAttributes, relevantHooks []*v1beta1.Webhook) error { + for _, hook := range relevantHooks { + t := time.Now() + err := a.callAttrMutatingHook(ctx, hook, attr) + admissionmetrics.Metrics.ObserveWebhook(time.Since(t), err != nil, attr.Attributes, "admit", hook.Name) + if err == nil { + continue + } + + ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore + if callErr, ok := err.(*webhookerrors.ErrCallingWebhook); ok { + if ignoreClientCallFailures { + glog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) + utilruntime.HandleError(callErr) + continue + } + glog.Warningf("Failed calling webhook, failing closed %v: %v", hook.Name, err) + } + return apierrors.NewInternalError(err) + } + + // convert attr.VersionedObject to the internal version in the underlying admission.Attributes + if attr.VersionedObject != nil { + return a.plugin.scheme.Convert(attr.VersionedObject, attr.Attributes.GetObject(), nil) + } + return nil +} + +// note that callAttrMutatingHook updates attr +func (a *mutatingDispatcher) callAttrMutatingHook(ctx context.Context, h *v1beta1.Webhook, attr *generic.VersionedAttributes) error { + if attr.IsDryRun() { + if h.SideEffects == nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: fmt.Errorf("Webhook SideEffects is nil")} + } + if !(*h.SideEffects == v1beta1.SideEffectClassNone || *h.SideEffects == v1beta1.SideEffectClassNoneOnDryRun) { + return webhookerrors.NewDryRunUnsupportedErr(h.Name) + } + } + + // Make the webhook request + request := request.CreateAdmissionReview(attr) + client, err := a.cm.HookClient(h) + if err != nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} + } + response := &admissionv1beta1.AdmissionReview{} + if err := client.Post().Context(ctx).Body(&request).Do().Into(response); err != nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} + } + + if response.Response == nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: fmt.Errorf("Webhook response was absent")} + } + + for k, v := range response.Response.AuditAnnotations { + key := h.Name + "/" + k + if err := attr.AddAnnotation(key, v); err != nil { + glog.Warningf("Failed to set admission audit annotation %s to %s for mutating webhook %s: %v", key, v, h.Name, err) + } + } + + if !response.Response.Allowed { + return webhookerrors.ToStatusErr(h.Name, response.Response.Result) + } + + patchJS := response.Response.Patch + if len(patchJS) == 0 { + return nil + } + patchObj, err := jsonpatch.DecodePatch(patchJS) + if err != nil { + return apierrors.NewInternalError(err) + } + if len(patchObj) == 0 { + return nil + } + + // if a non-empty patch was provided, and we have no object we can apply it to (e.g. a DELETE admission operation), error + if attr.VersionedObject == nil { + return apierrors.NewInternalError(fmt.Errorf("admission webhook %q attempted to modify the object, which is not supported for this operation", h.Name)) + } + + objJS, err := runtime.Encode(a.plugin.jsonSerializer, attr.VersionedObject) + if err != nil { + return apierrors.NewInternalError(err) + } + patchedJS, err := patchObj.Apply(objJS) + if err != nil { + return apierrors.NewInternalError(err) + } + + var newVersionedObject runtime.Object + if _, ok := attr.VersionedObject.(*unstructured.Unstructured); ok { + // Custom Resources don't have corresponding Go struct's. + // They are represented as Unstructured. + newVersionedObject = &unstructured.Unstructured{} + } else { + newVersionedObject, err = a.plugin.scheme.New(attr.GetKind()) + if err != nil { + return apierrors.NewInternalError(err) + } + } + // TODO: if we have multiple mutating webhooks, we can remember the json + // instead of encoding and decoding for each one. + if _, _, err := a.plugin.jsonSerializer.Decode(patchedJS, nil, newVersionedObject); err != nil { + return apierrors.NewInternalError(err) + } + attr.VersionedObject = newVersionedObject + a.plugin.scheme.Default(attr.VersionedObject) + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go new file mode 100644 index 000000000..f03b1b342 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin.go @@ -0,0 +1,96 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mutating + +import ( + "fmt" + "io" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/admission/configuration" + "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" +) + +const ( + // Name of admission plug-in + PluginName = "MutatingAdmissionWebhook" +) + +// Register registers a plugin +func Register(plugins *admission.Plugins) { + plugins.Register(PluginName, func(configFile io.Reader) (admission.Interface, error) { + plugin, err := NewMutatingWebhook(configFile) + if err != nil { + return nil, err + } + + return plugin, nil + }) +} + +// Plugin is an implementation of admission.Interface. +type Plugin struct { + *generic.Webhook + + scheme *runtime.Scheme + jsonSerializer *json.Serializer +} + +var _ admission.MutationInterface = &Plugin{} + +// NewMutatingWebhook returns a generic admission webhook plugin. +func NewMutatingWebhook(configFile io.Reader) (*Plugin, error) { + handler := admission.NewHandler(admission.Connect, admission.Create, admission.Delete, admission.Update) + p := &Plugin{} + var err error + p.Webhook, err = generic.NewWebhook(handler, configFile, configuration.NewMutatingWebhookConfigurationManager, newMutatingDispatcher(p)) + if err != nil { + return nil, err + } + + return p, nil +} + +// SetScheme sets a serializer(NegotiatedSerializer) which is derived from the scheme +func (a *Plugin) SetScheme(scheme *runtime.Scheme) { + a.Webhook.SetScheme(scheme) + if scheme != nil { + a.scheme = scheme + a.jsonSerializer = json.NewSerializer(json.DefaultMetaFactory, scheme, scheme, false) + } +} + +// ValidateInitialization implements the InitializationValidator interface. +func (a *Plugin) ValidateInitialization() error { + if err := a.Webhook.ValidateInitialization(); err != nil { + return err + } + if a.scheme == nil { + return fmt.Errorf("scheme is not properly setup") + } + if a.jsonSerializer == nil { + return fmt.Errorf("jsonSerializer is not properly setup") + } + return nil +} + +// Admit makes an admission decision based on the request attributes. +func (a *Plugin) Admit(attr admission.Attributes) error { + return a.Webhook.Dispatch(attr) +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/BUILD deleted file mode 100644 index 3c2527269..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "matcher.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/namespace", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["matcher_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/namespace", - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/BUILD deleted file mode 100644 index 036015274..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "admissionreview.go", - "doc.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/request", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admission/v1beta1:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go index 5b8a41db2..cec41315c 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/request/admissionreview.go @@ -22,11 +22,11 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/uuid" - "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" ) // CreateAdmissionReview creates an AdmissionReview for the provided admission.Attributes -func CreateAdmissionReview(attr admission.Attributes) admissionv1beta1.AdmissionReview { +func CreateAdmissionReview(attr *generic.VersionedAttributes) admissionv1beta1.AdmissionReview { gvk := attr.GetKind() gvr := attr.GetResource() aUserInfo := attr.GetUserInfo() @@ -36,6 +36,7 @@ func CreateAdmissionReview(attr admission.Attributes) admissionv1beta1.Admission UID: aUserInfo.GetUID(), Username: aUserInfo.GetName(), } + dryRun := attr.IsDryRun() // Convert the extra information in the user object for key, val := range aUserInfo.GetExtra() { @@ -61,11 +62,12 @@ func CreateAdmissionReview(attr admission.Attributes) admissionv1beta1.Admission Operation: admissionv1beta1.Operation(attr.GetOperation()), UserInfo: userInfo, Object: runtime.RawExtension{ - Object: attr.GetObject(), + Object: attr.VersionedObject, }, OldObject: runtime.RawExtension{ - Object: attr.GetOldObject(), + Object: attr.VersionedOldObject, }, + DryRun: &dryRun, }, } } diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/BUILD deleted file mode 100644 index 4e62c6ac0..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["rules.go"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/rules", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["rules_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/rules", - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go index eb9935756..096ab5021 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go @@ -93,3 +93,15 @@ func (r *Matcher) resource() bool { } return false } + +// IsWebhookConfigurationResource determines if an admission.Attributes object is describing +// the admission of a ValidatingWebhookConfiguration or a MutatingWebhookConfiguration +func IsWebhookConfigurationResource(attr admission.Attributes) bool { + gvk := attr.GetKind() + if gvk.Group == "admissionregistration.k8s.io" { + if gvk.Kind == "ValidatingWebhookConfiguration" || gvk.Kind == "MutatingWebhookConfiguration" { + return true + } + } + return false +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD deleted file mode 100644 index 4226a1391..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/BUILD +++ /dev/null @@ -1,69 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "admission.go", - "doc.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/validating", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/admission/v1beta1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/configuration:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/initializer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/config:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/namespace:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/rules:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["admission_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/validating", - deps = [ - "//vendor/k8s.io/api/admission/v1beta1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/config:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/testcerts:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/admission.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/admission.go deleted file mode 100644 index f68e46fa5..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/admission.go +++ /dev/null @@ -1,321 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package validating delegates admission checks to dynamically configured -// validating webhooks. -package validating - -import ( - "context" - "fmt" - "io" - "sync" - "time" - - "github.com/golang/glog" - - admissionv1beta1 "k8s.io/api/admission/v1beta1" - "k8s.io/api/admissionregistration/v1beta1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/admission" - "k8s.io/apiserver/pkg/admission/configuration" - genericadmissioninit "k8s.io/apiserver/pkg/admission/initializer" - admissionmetrics "k8s.io/apiserver/pkg/admission/metrics" - "k8s.io/apiserver/pkg/admission/plugin/webhook/config" - webhookerrors "k8s.io/apiserver/pkg/admission/plugin/webhook/errors" - "k8s.io/apiserver/pkg/admission/plugin/webhook/namespace" - "k8s.io/apiserver/pkg/admission/plugin/webhook/request" - "k8s.io/apiserver/pkg/admission/plugin/webhook/rules" - "k8s.io/apiserver/pkg/admission/plugin/webhook/versioned" - "k8s.io/client-go/informers" - clientset "k8s.io/client-go/kubernetes" -) - -const ( - // Name of admission plug-in - PluginName = "ValidatingAdmissionWebhook" -) - -// Register registers a plugin -func Register(plugins *admission.Plugins) { - plugins.Register(PluginName, func(configFile io.Reader) (admission.Interface, error) { - plugin, err := NewValidatingAdmissionWebhook(configFile) - if err != nil { - return nil, err - } - - return plugin, nil - }) -} - -// WebhookSource can list dynamic webhook plugins. -type WebhookSource interface { - Run(stopCh <-chan struct{}) - Webhooks() (*v1beta1.ValidatingWebhookConfiguration, error) -} - -// NewValidatingAdmissionWebhook returns a generic admission webhook plugin. -func NewValidatingAdmissionWebhook(configFile io.Reader) (*ValidatingAdmissionWebhook, error) { - kubeconfigFile, err := config.LoadConfig(configFile) - if err != nil { - return nil, err - } - - cm, err := config.NewClientManager() - if err != nil { - return nil, err - } - authInfoResolver, err := config.NewDefaultAuthenticationInfoResolver(kubeconfigFile) - if err != nil { - return nil, err - } - // Set defaults which may be overridden later. - cm.SetAuthenticationInfoResolver(authInfoResolver) - cm.SetServiceResolver(config.NewDefaultServiceResolver()) - - return &ValidatingAdmissionWebhook{ - Handler: admission.NewHandler( - admission.Connect, - admission.Create, - admission.Delete, - admission.Update, - ), - clientManager: cm, - }, nil -} - -var _ admission.ValidationInterface = &ValidatingAdmissionWebhook{} - -// ValidatingAdmissionWebhook is an implementation of admission.Interface. -type ValidatingAdmissionWebhook struct { - *admission.Handler - hookSource WebhookSource - namespaceMatcher namespace.Matcher - clientManager config.ClientManager - convertor versioned.Convertor -} - -var ( - _ = genericadmissioninit.WantsExternalKubeClientSet(&ValidatingAdmissionWebhook{}) -) - -// TODO find a better way wire this, but keep this pull small for now. -func (a *ValidatingAdmissionWebhook) SetAuthenticationInfoResolverWrapper(wrapper config.AuthenticationInfoResolverWrapper) { - a.clientManager.SetAuthenticationInfoResolverWrapper(wrapper) -} - -// SetServiceResolver sets a service resolver for the webhook admission plugin. -// Passing a nil resolver does not have an effect, instead a default one will be used. -func (a *ValidatingAdmissionWebhook) SetServiceResolver(sr config.ServiceResolver) { - a.clientManager.SetServiceResolver(sr) -} - -// SetScheme sets a serializer(NegotiatedSerializer) which is derived from the scheme -func (a *ValidatingAdmissionWebhook) SetScheme(scheme *runtime.Scheme) { - if scheme != nil { - a.clientManager.SetNegotiatedSerializer(serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{ - Serializer: serializer.NewCodecFactory(scheme).LegacyCodec(admissionv1beta1.SchemeGroupVersion), - })) - a.convertor.Scheme = scheme - } -} - -// WantsExternalKubeClientSet defines a function which sets external ClientSet for admission plugins that need it -func (a *ValidatingAdmissionWebhook) SetExternalKubeClientSet(client clientset.Interface) { - a.namespaceMatcher.Client = client - a.hookSource = configuration.NewValidatingWebhookConfigurationManager(client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations()) -} - -// SetExternalKubeInformerFactory implements the WantsExternalKubeInformerFactory interface. -func (a *ValidatingAdmissionWebhook) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) { - namespaceInformer := f.Core().V1().Namespaces() - a.namespaceMatcher.NamespaceLister = namespaceInformer.Lister() - a.SetReadyFunc(namespaceInformer.Informer().HasSynced) -} - -// ValidateInitialization implements the InitializationValidator interface. -func (a *ValidatingAdmissionWebhook) ValidateInitialization() error { - if a.hookSource == nil { - return fmt.Errorf("ValidatingAdmissionWebhook admission plugin requires a Kubernetes client to be provided") - } - if err := a.namespaceMatcher.Validate(); err != nil { - return fmt.Errorf("ValidatingAdmissionWebhook.namespaceMatcher is not properly setup: %v", err) - } - if err := a.clientManager.Validate(); err != nil { - return fmt.Errorf("ValidatingAdmissionWebhook.clientManager is not properly setup: %v", err) - } - if err := a.convertor.Validate(); err != nil { - return fmt.Errorf("ValidatingAdmissionWebhook.convertor is not properly setup: %v", err) - } - go a.hookSource.Run(wait.NeverStop) - return nil -} - -func (a *ValidatingAdmissionWebhook) loadConfiguration(attr admission.Attributes) (*v1beta1.ValidatingWebhookConfiguration, error) { - hookConfig, err := a.hookSource.Webhooks() - // if Webhook configuration is disabled, fail open - if err == configuration.ErrDisabled { - return &v1beta1.ValidatingWebhookConfiguration{}, nil - } - if err != nil { - e := apierrors.NewServerTimeout(attr.GetResource().GroupResource(), string(attr.GetOperation()), 1) - e.ErrStatus.Message = fmt.Sprintf("Unable to refresh the Webhook configuration: %v", err) - e.ErrStatus.Reason = "LoadingConfiguration" - e.ErrStatus.Details.Causes = append(e.ErrStatus.Details.Causes, metav1.StatusCause{ - Type: "ValidatingWebhookConfigurationFailure", - Message: "An error has occurred while refreshing the ValidatingWebhook configuration, no resources can be created/updated/deleted/connected until a refresh succeeds.", - }) - return nil, e - } - return hookConfig, nil -} - -// Validate makes an admission decision based on the request attributes. -func (a *ValidatingAdmissionWebhook) Validate(attr admission.Attributes) error { - hookConfig, err := a.loadConfiguration(attr) - if err != nil { - return err - } - hooks := hookConfig.Webhooks - ctx := context.TODO() - - var relevantHooks []*v1beta1.Webhook - for i := range hooks { - call, err := a.shouldCallHook(&hooks[i], attr) - if err != nil { - return err - } - if call { - relevantHooks = append(relevantHooks, &hooks[i]) - } - } - - if len(relevantHooks) == 0 { - // no matching hooks - return nil - } - - // convert the object to the external version before sending it to the webhook - versionedAttr := versioned.Attributes{ - Attributes: attr, - } - if oldObj := attr.GetOldObject(); oldObj != nil { - out, err := a.convertor.ConvertToGVK(oldObj, attr.GetKind()) - if err != nil { - return apierrors.NewInternalError(err) - } - versionedAttr.OldObject = out - } - if obj := attr.GetObject(); obj != nil { - out, err := a.convertor.ConvertToGVK(obj, attr.GetKind()) - if err != nil { - return apierrors.NewInternalError(err) - } - versionedAttr.Object = out - } - - wg := sync.WaitGroup{} - errCh := make(chan error, len(relevantHooks)) - wg.Add(len(relevantHooks)) - for i := range relevantHooks { - go func(hook *v1beta1.Webhook) { - defer wg.Done() - - t := time.Now() - err := a.callHook(ctx, hook, versionedAttr) - admissionmetrics.Metrics.ObserveWebhook(time.Since(t), err != nil, attr, "validating", hook.Name) - if err == nil { - return - } - - ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore - if callErr, ok := err.(*webhookerrors.ErrCallingWebhook); ok { - if ignoreClientCallFailures { - glog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) - utilruntime.HandleError(callErr) - return - } - - glog.Warningf("Failed calling webhook, failing closed %v: %v", hook.Name, err) - errCh <- apierrors.NewInternalError(err) - return - } - - glog.Warningf("rejected by webhook %q: %#v", hook.Name, err) - errCh <- err - }(relevantHooks[i]) - } - wg.Wait() - close(errCh) - - var errs []error - for e := range errCh { - errs = append(errs, e) - } - if len(errs) == 0 { - return nil - } - if len(errs) > 1 { - for i := 1; i < len(errs); i++ { - // TODO: merge status errors; until then, just return the first one. - utilruntime.HandleError(errs[i]) - } - } - return errs[0] -} - -// TODO: factor into a common place along with the validating webhook version. -func (a *ValidatingAdmissionWebhook) shouldCallHook(h *v1beta1.Webhook, attr admission.Attributes) (bool, *apierrors.StatusError) { - var matches bool - for _, r := range h.Rules { - m := rules.Matcher{Rule: r, Attr: attr} - if m.Matches() { - matches = true - break - } - } - if !matches { - return false, nil - } - - return a.namespaceMatcher.MatchNamespaceSelector(h, attr) -} - -func (a *ValidatingAdmissionWebhook) callHook(ctx context.Context, h *v1beta1.Webhook, attr admission.Attributes) error { - // Make the webhook request - request := request.CreateAdmissionReview(attr) - client, err := a.clientManager.HookClient(h) - if err != nil { - return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} - } - response := &admissionv1beta1.AdmissionReview{} - if err := client.Post().Context(ctx).Body(&request).Do().Into(response); err != nil { - return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} - } - - if response.Response == nil { - return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: fmt.Errorf("Webhook response was absent")} - } - if response.Response.Allowed { - return nil - } - return webhookerrors.ToStatusErr(h.Name, response.Response.Result) -} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go new file mode 100644 index 000000000..8b6214e28 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/dispatcher.go @@ -0,0 +1,133 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validating + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/golang/glog" + + admissionv1beta1 "k8s.io/api/admission/v1beta1" + "k8s.io/api/admissionregistration/v1beta1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + admissionmetrics "k8s.io/apiserver/pkg/admission/metrics" + "k8s.io/apiserver/pkg/admission/plugin/webhook/config" + webhookerrors "k8s.io/apiserver/pkg/admission/plugin/webhook/errors" + "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" + "k8s.io/apiserver/pkg/admission/plugin/webhook/request" +) + +type validatingDispatcher struct { + cm *config.ClientManager +} + +func newValidatingDispatcher(cm *config.ClientManager) generic.Dispatcher { + return &validatingDispatcher{cm} +} + +var _ generic.Dispatcher = &validatingDispatcher{} + +func (d *validatingDispatcher) Dispatch(ctx context.Context, attr *generic.VersionedAttributes, relevantHooks []*v1beta1.Webhook) error { + wg := sync.WaitGroup{} + errCh := make(chan error, len(relevantHooks)) + wg.Add(len(relevantHooks)) + for i := range relevantHooks { + go func(hook *v1beta1.Webhook) { + defer wg.Done() + + t := time.Now() + err := d.callHook(ctx, hook, attr) + admissionmetrics.Metrics.ObserveWebhook(time.Since(t), err != nil, attr.Attributes, "validating", hook.Name) + if err == nil { + return + } + + ignoreClientCallFailures := hook.FailurePolicy != nil && *hook.FailurePolicy == v1beta1.Ignore + if callErr, ok := err.(*webhookerrors.ErrCallingWebhook); ok { + if ignoreClientCallFailures { + glog.Warningf("Failed calling webhook, failing open %v: %v", hook.Name, callErr) + utilruntime.HandleError(callErr) + return + } + + glog.Warningf("Failed calling webhook, failing closed %v: %v", hook.Name, err) + errCh <- apierrors.NewInternalError(err) + return + } + + glog.Warningf("rejected by webhook %q: %#v", hook.Name, err) + errCh <- err + }(relevantHooks[i]) + } + wg.Wait() + close(errCh) + + var errs []error + for e := range errCh { + errs = append(errs, e) + } + if len(errs) == 0 { + return nil + } + if len(errs) > 1 { + for i := 1; i < len(errs); i++ { + // TODO: merge status errors; until then, just return the first one. + utilruntime.HandleError(errs[i]) + } + } + return errs[0] +} + +func (d *validatingDispatcher) callHook(ctx context.Context, h *v1beta1.Webhook, attr *generic.VersionedAttributes) error { + if attr.IsDryRun() { + if h.SideEffects == nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: fmt.Errorf("Webhook SideEffects is nil")} + } + if !(*h.SideEffects == v1beta1.SideEffectClassNone || *h.SideEffects == v1beta1.SideEffectClassNoneOnDryRun) { + return webhookerrors.NewDryRunUnsupportedErr(h.Name) + } + } + + // Make the webhook request + request := request.CreateAdmissionReview(attr) + client, err := d.cm.HookClient(h) + if err != nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} + } + response := &admissionv1beta1.AdmissionReview{} + if err := client.Post().Context(ctx).Body(&request).Do().Into(response); err != nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: err} + } + + if response.Response == nil { + return &webhookerrors.ErrCallingWebhook{WebhookName: h.Name, Reason: fmt.Errorf("Webhook response was absent")} + } + for k, v := range response.Response.AuditAnnotations { + key := h.Name + "/" + k + if err := attr.AddAnnotation(key, v); err != nil { + glog.Warningf("Failed to set admission audit annotation %s to %s for validating webhook %s: %v", key, v, h.Name, err) + } + } + if response.Response.Allowed { + return nil + } + return webhookerrors.ToStatusErr(h.Name, response.Response.Result) +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go new file mode 100644 index 000000000..8417ccffb --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin.go @@ -0,0 +1,64 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validating + +import ( + "io" + + "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/admission/configuration" + "k8s.io/apiserver/pkg/admission/plugin/webhook/generic" +) + +const ( + // Name of admission plug-in + PluginName = "ValidatingAdmissionWebhook" +) + +// Register registers a plugin +func Register(plugins *admission.Plugins) { + plugins.Register(PluginName, func(configFile io.Reader) (admission.Interface, error) { + plugin, err := NewValidatingAdmissionWebhook(configFile) + if err != nil { + return nil, err + } + + return plugin, nil + }) +} + +// Plugin is an implementation of admission.Interface. +type Plugin struct { + *generic.Webhook +} + +var _ admission.ValidationInterface = &Plugin{} + +// NewValidatingAdmissionWebhook returns a generic admission webhook plugin. +func NewValidatingAdmissionWebhook(configFile io.Reader) (*Plugin, error) { + handler := admission.NewHandler(admission.Connect, admission.Create, admission.Delete, admission.Update) + webhook, err := generic.NewWebhook(handler, configFile, configuration.NewValidatingWebhookConfigurationManager, newValidatingDispatcher) + if err != nil { + return nil, err + } + return &Plugin{webhook}, nil +} + +// Validate makes an admission decision based on the request attributes. +func (a *Plugin) Validate(attr admission.Attributes) error { + return a.Webhook.Dispatch(attr) +} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/BUILD b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/BUILD deleted file mode 100644 index f16c617ac..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "attributes.go", - "conversion.go", - "doc.go", - ], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/versioned", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["conversion_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/admission/plugin/webhook/versioned", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example2/v1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/attributes.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/attributes.go deleted file mode 100644 index 58f8ae6aa..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/attributes.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioned - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/admission" -) - -// Attributes is a wrapper around the original admission attributes. It allows -// override the internal objects with the versioned ones. -type Attributes struct { - admission.Attributes - OldObject runtime.Object - Object runtime.Object -} - -// GetObject overrides the original GetObjects() and it returns the versioned -// object. -func (v Attributes) GetObject() runtime.Object { - return v.Object -} - -// GetOldObject overrides the original GetOldObjects() and it returns the -// versioned oldObject. -func (v Attributes) GetOldObject() runtime.Object { - return v.OldObject -} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/conversion.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/conversion.go deleted file mode 100644 index a1ba712fc..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/conversion.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package versioned - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// Convertor converts objects to the desired version. -type Convertor struct { - Scheme *runtime.Scheme -} - -// Convert converts the in object to the out object and returns an error if the -// conversion fails. -func (c Convertor) Convert(in runtime.Object, out runtime.Object) error { - // For custom resources, because ConvertToGVK reuses the passed in object as - // the output. c.Scheme.Convert resets the objects to empty if in == out, so - // we skip the conversion if that's the case. - if in == out { - return nil - } - return c.Scheme.Convert(in, out, nil) -} - -// ConvertToGVK converts object to the desired gvk. -func (c Convertor) ConvertToGVK(obj runtime.Object, gvk schema.GroupVersionKind) (runtime.Object, error) { - // Unlike other resources, custom resources do not have internal version, so - // if obj is a custom resource, it should not need conversion. - if obj.GetObjectKind().GroupVersionKind() == gvk { - return obj, nil - } - out, err := c.Scheme.New(gvk) - if err != nil { - return nil, err - } - err = c.Scheme.Convert(obj, out, nil) - if err != nil { - return nil, err - } - return out, nil -} - -// Validate checks if the conversion has a scheme. -func (c *Convertor) Validate() error { - if c.Scheme == nil { - return fmt.Errorf("the Convertor requires a scheme") - } - return nil -} diff --git a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/doc.go b/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/doc.go deleted file mode 100644 index 7abea7874..000000000 --- a/deps/k8s.io/apiserver/pkg/admission/plugin/webhook/versioned/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package versioned provides tools for making sure the objects sent to a -// webhook are in a version the webhook understands. -package versioned diff --git a/deps/k8s.io/apiserver/pkg/admission/plugins.go b/deps/k8s.io/apiserver/pkg/admission/plugins.go index 05e321ffc..c17d62cd4 100644 --- a/deps/k8s.io/apiserver/pkg/admission/plugins.go +++ b/deps/k8s.io/apiserver/pkg/admission/plugins.go @@ -23,6 +23,7 @@ import ( "io/ioutil" "reflect" "sort" + "strings" "sync" "github.com/golang/glog" @@ -122,12 +123,12 @@ func splitStream(config io.Reader) (io.Reader, io.Reader, error) { return bytes.NewBuffer(configBytes), bytes.NewBuffer(configBytes), nil } -type Decorator func(handler Interface, name string) Interface - // NewFromPlugins returns an admission.Interface that will enforce admission control decisions of all // the given plugins. func (ps *Plugins) NewFromPlugins(pluginNames []string, configProvider ConfigProvider, pluginInitializer PluginInitializer, decorator Decorator) (Interface, error) { handlers := []Interface{} + mutationPlugins := []string{} + validationPlugins := []string{} for _, pluginName := range pluginNames { pluginConfig, err := configProvider.ConfigFor(pluginName) if err != nil { @@ -140,12 +141,25 @@ func (ps *Plugins) NewFromPlugins(pluginNames []string, configProvider ConfigPro } if plugin != nil { if decorator != nil { - handlers = append(handlers, decorator(plugin, pluginName)) + handlers = append(handlers, decorator.Decorate(plugin, pluginName)) } else { handlers = append(handlers, plugin) } + + if _, ok := plugin.(MutationInterface); ok { + mutationPlugins = append(mutationPlugins, pluginName) + } + if _, ok := plugin.(ValidationInterface); ok { + validationPlugins = append(validationPlugins, pluginName) + } } } + if len(mutationPlugins) != 0 { + glog.Infof("Loaded %d mutating admission controller(s) successfully in the following order: %s.", len(mutationPlugins), strings.Join(mutationPlugins, ",")) + } + if len(validationPlugins) != 0 { + glog.Infof("Loaded %d validating admission controller(s) successfully in the following order: %s.", len(validationPlugins), strings.Join(validationPlugins, ",")) + } return chainAdmissionHandler(handlers), nil } @@ -158,16 +172,16 @@ func (ps *Plugins) InitPlugin(name string, config io.Reader, pluginInitializer P plugin, found, err := ps.getPlugin(name, config) if err != nil { - return nil, fmt.Errorf("Couldn't init admission plugin %q: %v", name, err) + return nil, fmt.Errorf("couldn't init admission plugin %q: %v", name, err) } if !found { - return nil, fmt.Errorf("Unknown admission plugin: %s", name) + return nil, fmt.Errorf("unknown admission plugin: %s", name) } pluginInitializer.Initialize(plugin) // ensure that plugins have been properly initialized if err := ValidateInitialization(plugin); err != nil { - return nil, err + return nil, fmt.Errorf("failed to initialize admission plugin %q: %v", name, err) } return plugin, nil diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/BUILD b/deps/k8s.io/apiserver/pkg/apis/apiserver/BUILD deleted file mode 100644 index d8956d72b..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apiserver/pkg/apis/apiserver", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/apis/apiserver/install:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/install/BUILD b/deps/k8s.io/apiserver/pkg/apis/apiserver/install/BUILD deleted file mode 100644 index e92ce5e57..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/install/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["install.go"], - importpath = "k8s.io/apiserver/pkg/apis/apiserver/install", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/install/install.go b/deps/k8s.io/apiserver/pkg/apis/apiserver/install/install.go index ce52be0a2..4b58a9710 100644 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/install/install.go +++ b/deps/k8s.io/apiserver/pkg/apis/apiserver/install/install.go @@ -17,27 +17,15 @@ limitations under the License. package install import ( - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/sets" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/apis/apiserver" "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1" ) // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - if err := announced.NewGroupMetaFactory( - &announced.GroupMetaFactoryArgs{ - GroupName: apiserver.GroupName, - RootScopedKinds: sets.NewString("APIService"), - VersionPreferenceOrder: []string{v1alpha1.SchemeGroupVersion.Version}, - AddInternalObjectsToScheme: apiserver.AddToScheme, - }, - announced.VersionToSchemeFunc{ - v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, - }, - ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { - panic(err) - } +func Install(scheme *runtime.Scheme) { + utilruntime.Must(apiserver.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion)) } diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/BUILD b/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/BUILD deleted file mode 100644 index 3075c3bbe..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apiserver/pkg/apis/apiserver/v1alpha1", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.conversion.go b/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.conversion.go index d9668e990..64909b34a 100644 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.conversion.go +++ b/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1alpha1 @@ -34,13 +34,28 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration, - Convert_apiserver_AdmissionConfiguration_To_v1alpha1_AdmissionConfiguration, - Convert_v1alpha1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration, - Convert_apiserver_AdmissionPluginConfiguration_To_v1alpha1_AdmissionPluginConfiguration, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*AdmissionConfiguration)(nil), (*apiserver.AdmissionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration(a.(*AdmissionConfiguration), b.(*apiserver.AdmissionConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiserver.AdmissionConfiguration)(nil), (*AdmissionConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiserver_AdmissionConfiguration_To_v1alpha1_AdmissionConfiguration(a.(*apiserver.AdmissionConfiguration), b.(*AdmissionConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*AdmissionPluginConfiguration)(nil), (*apiserver.AdmissionPluginConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_AdmissionPluginConfiguration_To_apiserver_AdmissionPluginConfiguration(a.(*AdmissionPluginConfiguration), b.(*apiserver.AdmissionPluginConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*apiserver.AdmissionPluginConfiguration)(nil), (*AdmissionPluginConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_apiserver_AdmissionPluginConfiguration_To_v1alpha1_AdmissionPluginConfiguration(a.(*apiserver.AdmissionPluginConfiguration), b.(*AdmissionPluginConfiguration), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1alpha1_AdmissionConfiguration_To_apiserver_AdmissionConfiguration(in *AdmissionConfiguration, out *apiserver.AdmissionConfiguration, s conversion.Scope) error { diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.deepcopy.go index d795781ff..24151bbd2 100644 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 @@ -52,9 +52,8 @@ func (in *AdmissionConfiguration) DeepCopy() *AdmissionConfiguration { func (in *AdmissionConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -62,12 +61,8 @@ func (in *AdmissionPluginConfiguration) DeepCopyInto(out *AdmissionPluginConfigu *out = *in if in.Configuration != nil { in, out := &in.Configuration, &out.Configuration - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.defaults.go b/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.defaults.go index 5e24d22ca..dd621a3ac 100644 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.defaults.go +++ b/deps/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/apiserver/pkg/apis/apiserver/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/apis/apiserver/zz_generated.deepcopy.go index 431abf61d..542ef977b 100644 --- a/deps/k8s.io/apiserver/pkg/apis/apiserver/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiserver/pkg/apis/apiserver/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package apiserver @@ -52,9 +52,8 @@ func (in *AdmissionConfiguration) DeepCopy() *AdmissionConfiguration { func (in *AdmissionConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -62,12 +61,8 @@ func (in *AdmissionPluginConfiguration) DeepCopyInto(out *AdmissionPluginConfigu *out = *in if in.Configuration != nil { in, out := &in.Configuration, &out.Configuration - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/BUILD b/deps/k8s.io/apiserver/pkg/apis/audit/BUILD deleted file mode 100644 index 2388d79f8..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/audit/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "helpers.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apiserver/pkg/apis/audit", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/fuzzer:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/install:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/apis/audit/validation:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/install/BUILD b/deps/k8s.io/apiserver/pkg/apis/audit/install/BUILD deleted file mode 100644 index c4acc260e..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/audit/install/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["install.go"], - importpath = "k8s.io/apiserver/pkg/apis/audit/install", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["roundtrip_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/apis/audit/install", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/testing/roundtrip:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/fuzzer:go_default_library", - ], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/install/install.go b/deps/k8s.io/apiserver/pkg/apis/audit/install/install.go index 6acf7c5d1..6e7d5bc82 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/install/install.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/install/install.go @@ -19,30 +19,19 @@ limitations under the License. package install import ( - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/sets" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/apis/audit" + "k8s.io/apiserver/pkg/apis/audit/v1" "k8s.io/apiserver/pkg/apis/audit/v1alpha1" "k8s.io/apiserver/pkg/apis/audit/v1beta1" ) // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - if err := announced.NewGroupMetaFactory( - &announced.GroupMetaFactoryArgs{ - GroupName: audit.GroupName, - VersionPreferenceOrder: []string{v1beta1.SchemeGroupVersion.Version, v1alpha1.SchemeGroupVersion.Version}, - // Any Kind that is not namespaced must be cluster scoped. - RootScopedKinds: sets.NewString("Event", "Policy"), - AddInternalObjectsToScheme: audit.AddToScheme, - }, - announced.VersionToSchemeFunc{ - v1beta1.SchemeGroupVersion.Version: v1beta1.AddToScheme, - v1alpha1.SchemeGroupVersion.Version: v1alpha1.AddToScheme, - }, - ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { - panic(err) - } +func Install(scheme *runtime.Scheme) { + utilruntime.Must(audit.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(v1beta1.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion, v1alpha1.SchemeGroupVersion)) } diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/types.go b/deps/k8s.io/apiserver/pkg/apis/audit/types.go index 155381b2c..271274d44 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/types.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/types.go @@ -99,6 +99,10 @@ type Event struct { // Source IPs, from where the request originated and intermediate proxies. // +optional SourceIPs []string + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + UserAgent string // Object reference this request is targeted at. // Does not apply for List-type requests, or non-resource requests. // +optional @@ -128,9 +132,10 @@ type Event struct { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional Annotations map[string]string } @@ -234,10 +239,19 @@ type GroupResources struct { // The empty string represents the core API group. // +optional Group string - // Resources is a list of resources within the API group. Subresources are - // matched using a "/" to indicate the subresource. For example, "pods/log" - // would match request to the log subresource of pods. The top level resource - // does not match subresources, "pods" doesn't match "pods/log". + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. // +optional Resources []string // ResourceNames is a list of resource instance names that the policy matches. diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/doc.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1/doc.go new file mode 100644 index 000000000..f25596153 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/apiserver/pkg/apis/audit +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta + +// +groupName=audit.k8s.io +package v1 diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go new file mode 100644 index 000000000..756ea30ba --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.pb.go @@ -0,0 +1,2852 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by protoc-gen-gogo. +// source: k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto +// DO NOT EDIT! + +/* + Package v1 is a generated protocol buffer package. + + It is generated from these files: + k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto + + It has these top-level messages: + Event + EventList + GroupResources + ObjectReference + Policy + PolicyList + PolicyRule +*/ +package v1 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import k8s_io_api_authentication_v1 "k8s.io/api/authentication/v1" +import k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +import k8s_io_apimachinery_pkg_runtime "k8s.io/apimachinery/pkg/runtime" + +import k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" + +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import strings "strings" +import reflect "reflect" + +import 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +func (m *Event) Reset() { *m = Event{} } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} } + +func (m *EventList) Reset() { *m = EventList{} } +func (*EventList) ProtoMessage() {} +func (*EventList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} } + +func (m *GroupResources) Reset() { *m = GroupResources{} } +func (*GroupResources) ProtoMessage() {} +func (*GroupResources) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} } + +func (m *ObjectReference) Reset() { *m = ObjectReference{} } +func (*ObjectReference) ProtoMessage() {} +func (*ObjectReference) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{3} } + +func (m *Policy) Reset() { *m = Policy{} } +func (*Policy) ProtoMessage() {} +func (*Policy) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{4} } + +func (m *PolicyList) Reset() { *m = PolicyList{} } +func (*PolicyList) ProtoMessage() {} +func (*PolicyList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{5} } + +func (m *PolicyRule) Reset() { *m = PolicyRule{} } +func (*PolicyRule) ProtoMessage() {} +func (*PolicyRule) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{6} } + +func init() { + proto.RegisterType((*Event)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.Event") + proto.RegisterType((*EventList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.EventList") + proto.RegisterType((*GroupResources)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.GroupResources") + proto.RegisterType((*ObjectReference)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.ObjectReference") + proto.RegisterType((*Policy)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.Policy") + proto.RegisterType((*PolicyList)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.PolicyList") + proto.RegisterType((*PolicyRule)(nil), "k8s.io.apiserver.pkg.apis.audit.v1.PolicyRule") +} +func (m *Event) 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 *Event) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level))) + i += copy(dAtA[i:], m.Level) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.AuditID))) + i += copy(dAtA[i:], m.AuditID) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Stage))) + i += copy(dAtA[i:], m.Stage) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.RequestURI))) + i += copy(dAtA[i:], m.RequestURI) + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb))) + i += copy(dAtA[i:], m.Verb) + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.User.Size())) + n1, err := m.User.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.ImpersonatedUser != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ImpersonatedUser.Size())) + n2, err := m.ImpersonatedUser.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if len(m.SourceIPs) > 0 { + for _, s := range m.SourceIPs { + dAtA[i] = 0x42 + 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.ObjectRef != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectRef.Size())) + n3, err := m.ObjectRef.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ResponseStatus != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ResponseStatus.Size())) + n4, err := m.ResponseStatus.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.RequestObject != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.RequestObject.Size())) + n5, err := m.RequestObject.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.ResponseObject != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ResponseObject.Size())) + n6, err := m.ResponseObject.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + dAtA[i] = 0x6a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.RequestReceivedTimestamp.Size())) + n7, err := m.RequestReceivedTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + dAtA[i] = 0x72 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.StageTimestamp.Size())) + n8, err := m.StageTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + if len(m.Annotations) > 0 { + keysForAnnotations := make([]string, 0, len(m.Annotations)) + for k := range m.Annotations { + keysForAnnotations = append(keysForAnnotations, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + for _, k := range keysForAnnotations { + dAtA[i] = 0x7a + i++ + v := m.Annotations[string(k)] + mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserAgent))) + i += copy(dAtA[i:], m.UserAgent) + return i, nil +} + +func (m *EventList) 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 *EventList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n9, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *GroupResources) 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 *GroupResources) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) + i += copy(dAtA[i:], m.Group) + if len(m.Resources) > 0 { + for _, s := range m.Resources { + dAtA[i] = 0x12 + 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 len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + dAtA[i] = 0x1a + 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) + } + } + return i, nil +} + +func (m *ObjectReference) 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 *ObjectReference) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) + i += copy(dAtA[i:], m.Resource) + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) + i += copy(dAtA[i:], m.Namespace) + dAtA[i] = 0x1a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x22 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) + i += copy(dAtA[i:], m.UID) + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) + i += copy(dAtA[i:], m.APIGroup) + dAtA[i] = 0x32 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIVersion))) + i += copy(dAtA[i:], m.APIVersion) + dAtA[i] = 0x3a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) + i += copy(dAtA[i:], m.ResourceVersion) + dAtA[i] = 0x42 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subresource))) + i += copy(dAtA[i:], m.Subresource) + return i, nil +} + +func (m *Policy) 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 *Policy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) + n10, err := m.ObjectMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + if len(m.Rules) > 0 { + for _, msg := range m.Rules { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + dAtA[i] = 0x1a + 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) + } + } + return i, nil +} + +func (m *PolicyList) 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 *PolicyList) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) + n11, err := m.ListMeta.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + if len(m.Items) > 0 { + for _, msg := range m.Items { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *PolicyRule) 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 *PolicyRule) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Level))) + i += copy(dAtA[i:], m.Level) + if len(m.Users) > 0 { + for _, s := range m.Users { + dAtA[i] = 0x12 + 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 len(m.UserGroups) > 0 { + for _, s := range m.UserGroups { + dAtA[i] = 0x1a + 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 len(m.Verbs) > 0 { + for _, s := range m.Verbs { + dAtA[i] = 0x22 + 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 len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x2a + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Namespaces) > 0 { + for _, s := range m.Namespaces { + 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 len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + dAtA[i] = 0x3a + 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 len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + dAtA[i] = 0x42 + 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) + } + } + return i, nil +} + +func encodeFixed64Generated(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 encodeFixed32Generated(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 encodeVarintGenerated(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 *Event) Size() (n int) { + var l int + _ = l + l = len(m.Level) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.AuditID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Stage) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.RequestURI) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Verb) + n += 1 + l + sovGenerated(uint64(l)) + l = m.User.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.ImpersonatedUser != nil { + l = m.ImpersonatedUser.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if len(m.SourceIPs) > 0 { + for _, s := range m.SourceIPs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if m.ObjectRef != nil { + l = m.ObjectRef.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ResponseStatus != nil { + l = m.ResponseStatus.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.RequestObject != nil { + l = m.RequestObject.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + if m.ResponseObject != nil { + l = m.ResponseObject.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = m.RequestReceivedTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.StageTimestamp.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Annotations) > 0 { + for k, v := range m.Annotations { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) + } + } + l = len(m.UserAgent) + n += 2 + l + sovGenerated(uint64(l)) + return n +} + +func (m *EventList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *GroupResources) Size() (n int) { + var l int + _ = l + l = len(m.Group) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Resources) > 0 { + for _, s := range m.Resources { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.ResourceNames) > 0 { + for _, s := range m.ResourceNames { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *ObjectReference) Size() (n int) { + var l int + _ = l + l = len(m.Resource) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Namespace) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.UID) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIGroup) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.APIVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.ResourceVersion) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Subresource) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *Policy) Size() (n int) { + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Rules) > 0 { + for _, e := range m.Rules { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyList) Size() (n int) { + var l int + _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func (m *PolicyRule) Size() (n int) { + var l int + _ = l + l = len(m.Level) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Users) > 0 { + for _, s := range m.Users { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.UserGroups) > 0 { + for _, s := range m.UserGroups { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Verbs) > 0 { + for _, s := range m.Verbs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Namespaces) > 0 { + for _, s := range m.Namespaces { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.NonResourceURLs) > 0 { + for _, s := range m.NonResourceURLs { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.OmitStages) > 0 { + for _, s := range m.OmitStages { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n +} + +func sovGenerated(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Event) String() string { + if this == nil { + return "nil" + } + keysForAnnotations := make([]string, 0, len(this.Annotations)) + for k := range this.Annotations { + keysForAnnotations = append(keysForAnnotations, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations) + mapStringForAnnotations := "map[string]string{" + for _, k := range keysForAnnotations { + mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) + } + mapStringForAnnotations += "}" + s := strings.Join([]string{`&Event{`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `AuditID:` + fmt.Sprintf("%v", this.AuditID) + `,`, + `Stage:` + fmt.Sprintf("%v", this.Stage) + `,`, + `RequestURI:` + fmt.Sprintf("%v", this.RequestURI) + `,`, + `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, + `User:` + strings.Replace(strings.Replace(this.User.String(), "UserInfo", "k8s_io_api_authentication_v1.UserInfo", 1), `&`, ``, 1) + `,`, + `ImpersonatedUser:` + strings.Replace(fmt.Sprintf("%v", this.ImpersonatedUser), "UserInfo", "k8s_io_api_authentication_v1.UserInfo", 1) + `,`, + `SourceIPs:` + fmt.Sprintf("%v", this.SourceIPs) + `,`, + `ObjectRef:` + strings.Replace(fmt.Sprintf("%v", this.ObjectRef), "ObjectReference", "ObjectReference", 1) + `,`, + `ResponseStatus:` + strings.Replace(fmt.Sprintf("%v", this.ResponseStatus), "Status", "k8s_io_apimachinery_pkg_apis_meta_v1.Status", 1) + `,`, + `RequestObject:` + strings.Replace(fmt.Sprintf("%v", this.RequestObject), "Unknown", "k8s_io_apimachinery_pkg_runtime.Unknown", 1) + `,`, + `ResponseObject:` + strings.Replace(fmt.Sprintf("%v", this.ResponseObject), "Unknown", "k8s_io_apimachinery_pkg_runtime.Unknown", 1) + `,`, + `RequestReceivedTimestamp:` + strings.Replace(strings.Replace(this.RequestReceivedTimestamp.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`, + `StageTimestamp:` + strings.Replace(strings.Replace(this.StageTimestamp.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`, + `Annotations:` + mapStringForAnnotations + `,`, + `UserAgent:` + fmt.Sprintf("%v", this.UserAgent) + `,`, + `}`, + }, "") + return s +} +func (this *EventList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EventList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Event", "Event", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *GroupResources) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&GroupResources{`, + `Group:` + fmt.Sprintf("%v", this.Group) + `,`, + `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, + `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, + `}`, + }, "") + return s +} +func (this *ObjectReference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ObjectReference{`, + `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, + `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UID:` + fmt.Sprintf("%v", this.UID) + `,`, + `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, + `APIVersion:` + fmt.Sprintf("%v", this.APIVersion) + `,`, + `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, + `Subresource:` + fmt.Sprintf("%v", this.Subresource) + `,`, + `}`, + }, "") + return s +} +func (this *Policy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Policy{`, + `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Rules:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rules), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + `,`, + `OmitStages:` + fmt.Sprintf("%v", this.OmitStages) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyList) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyList{`, + `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Policy", "Policy", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *PolicyRule) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PolicyRule{`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `Users:` + fmt.Sprintf("%v", this.Users) + `,`, + `UserGroups:` + fmt.Sprintf("%v", this.UserGroups) + `,`, + `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "GroupResources", "GroupResources", 1), `&`, ``, 1) + `,`, + `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, + `NonResourceURLs:` + fmt.Sprintf("%v", this.NonResourceURLs) + `,`, + `OmitStages:` + fmt.Sprintf("%v", this.OmitStages) + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = Level(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuditID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuditID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Stage = Stage(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestURI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestURI = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verb = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImpersonatedUser", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ImpersonatedUser == nil { + m.ImpersonatedUser = &k8s_io_api_authentication_v1.UserInfo{} + } + if err := m.ImpersonatedUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceIPs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceIPs = append(m.SourceIPs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectRef", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObjectRef == nil { + m.ObjectRef = &ObjectReference{} + } + if err := m.ObjectRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseStatus == nil { + m.ResponseStatus = &k8s_io_apimachinery_pkg_apis_meta_v1.Status{} + } + if err := m.ResponseStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestObject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestObject == nil { + m.RequestObject = &k8s_io_apimachinery_pkg_runtime.Unknown{} + } + if err := m.RequestObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseObject", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseObject == nil { + m.ResponseObject = &k8s_io_apimachinery_pkg_runtime.Unknown{} + } + if err := m.ResponseObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestReceivedTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.RequestReceivedTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StageTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StageTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var keykey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + keykey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey := string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + if m.Annotations == nil { + m.Annotations = make(map[string]string) + } + if iNdEx < postIndex { + var valuekey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + valuekey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + m.Annotations[mapkey] = mapvalue + } else { + var mapvalue string + m.Annotations[mapkey] = mapvalue + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserAgent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventList) 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 ErrIntOverflowGenerated + } + 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: EventList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Event{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GroupResources) 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 ErrIntOverflowGenerated + } + 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: GroupResources: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GroupResources: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Group = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ObjectReference) 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 ErrIntOverflowGenerated + } + 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: ObjectReference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + 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 ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIGroup = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field APIVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.APIVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceVersion", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceVersion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subresource", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subresource = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Policy) 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 ErrIntOverflowGenerated + } + 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: Policy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Policy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rules = append(m.Rules, PolicyRule{}) + if err := m.Rules[len(m.Rules)-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 OmitStages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OmitStages = append(m.OmitStages, Stage(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyList) 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 ErrIntOverflowGenerated + } + 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: PolicyList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Items = append(m.Items, Policy{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PolicyRule) 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 ErrIntOverflowGenerated + } + 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: PolicyRule: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Level = Level(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Users = append(m.Users, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserGroups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserGroups = append(m.UserGroups, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, GroupResources{}) + if err := m.Resources[len(m.Resources)-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 Namespaces", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonResourceURLs = append(m.NonResourceURLs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OmitStages", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OmitStages = append(m.OmitStages, Stage(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenerated(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, ErrIntOverflowGenerated + } + 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, ErrIntOverflowGenerated + } + 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, ErrIntOverflowGenerated + } + 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, ErrInvalidLengthGenerated + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenerated + } + 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 := skipGenerated(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 ( + ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto", fileDescriptorGenerated) +} + +var fileDescriptorGenerated = []byte{ + // 1242 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x8e, 0x1b, 0x45, + 0x10, 0xde, 0x59, 0xaf, 0xb3, 0x76, 0x3b, 0xeb, 0x75, 0x3a, 0x11, 0x19, 0xed, 0xc1, 0x36, 0x46, + 0x42, 0x06, 0x96, 0x99, 0xec, 0x12, 0x48, 0x14, 0x09, 0x24, 0x5b, 0x89, 0xc0, 0x22,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2a, 0xde, 0x34, 0x04, 0xca, 0x02, 0x5f, 0xd4, + 0x5a, 0x78, 0xcc, 0xdd, 0x4b, 0xa9, 0xde, 0x58, 0xcc, 0x6b, 0x95, 0xce, 0x8a, 0x06, 0x39, 0xa7, + 0x8a, 0x3f, 0x41, 0x45, 0x16, 0x44, 0xd4, 0x85, 0xce, 0x29, 0x33, 0x0b, 0xf5, 0x5c, 0xb3, 0xd8, + 0xde, 0x5b, 0xcc, 0x6b, 0xc5, 0x6e, 0x6c, 0x24, 0xa9, 0x1f, 0x3f, 0x45, 0xc5, 0xa0, 0xff, 0x23, + 0xb8, 0x9c, 0xc0, 0x33, 0xb3, 0x28, 0xf3, 0xf9, 0xcc, 0x7a, 0xf7, 0x80, 0x58, 0x8f, 0x63, 0x12, + 0x50, 0xf0, 0x5d, 0x50, 0x11, 0x12, 0x23, 0x49, 0x45, 0xf1, 0x08, 0x95, 0x29, 0xb0, 0x30, 0xf0, + 0x19, 0x74, 0xb9, 0xc3, 0x23, 0x66, 0x22, 0x19, 0xe6, 0x30, 0x13, 0x26, 0xe9, 0x85, 0x34, 0x92, + 0x18, 0x03, 0x11, 0x48, 0x71, 0xda, 0x78, 0x31, 0xaf, 0x95, 0xc9, 0x92, 0x0e, 0x59, 0xd1, 0xc5, + 0x0e, 0xda, 0xd3, 0x1f, 0x57, 0x25, 0x62, 0x96, 0x64, 0xa0, 0xe6, 0xda, 0x40, 0x7a, 0x10, 0xac, + 0x9e, 0x3f, 0xf6, 0x83, 0x9f, 0xfc, 0xf6, 0xb5, 0xc5, 0xbc, 0xb6, 0x47, 0xb2, 0x12, 0x64, 0x59, + 0x11, 0x0f, 0xd2, 0x97, 0xd1, 0x31, 0xae, 0x5e, 0x32, 0xc6, 0xd2, 0x8b, 0xe8, 0x20, 0x2b, 0x9a, + 0xf8, 0x17, 0x03, 0x99, 0x3a, 0x2e, 0x01, 0x17, 0xbc, 0x19, 0x0c, 0xbe, 0xf3, 0xa6, 0xc0, 0xb8, + 0x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, 0x5c, 0xc9, 0xf6, 0x5e, 0xbc, 0x75, 0x3b, 0x82, + 0x4f, 0x94, 0x4c, 0xe3, 0x37, 0x03, 0x95, 0xbf, 0xa6, 0x41, 0x14, 0x12, 0x50, 0xab, 0x84, 0xe1, + 0x0f, 0x50, 0x7e, 0x28, 0x2c, 0xfa, 0xae, 0x48, 0x78, 0x0a, 0xa6, 0x7c, 0x62, 0x35, 0xd1, 0x98, + 0x21, 0x73, 0xd1, 0xab, 0x29, 0x91, 0x21, 0xa9, 0x1f, 0xdf, 0x11, 0xe3, 0xac, 0x0e, 0x27, 0xce, + 0x14, 0x98, 0x99, 0x93, 0x04, 0x3d, 0xa4, 0x19, 0x07, 0x59, 0xc6, 0x35, 0x7e, 0xcf, 0xa1, 0xfd, + 0x95, 0xfd, 0x84, 0x0f, 0x51, 0x21, 0x06, 0xe9, 0x0c, 0x93, 0x7a, 0xc5, 0x5a, 0x24, 0x41, 0x88, + 0x66, 0xf0, 0x85, 0x54, 0xe8, 0xb8, 0xfa, 0xcb, 0xa5, 0xcd, 0x70, 0x12, 0x3b, 0x48, 0x8a, 0x11, + 0x37, 0x89, 0x38, 0xe8, 0xab, 0x2a, 0xd9, 0xff, 0x02, 0x4b, 0xa4, 0x07, 0xb7, 0x51, 0x2e, 0xf2, + 0x06, 0xfa, 0x62, 0xba, 0xa5, 0x01, 0xb9, 0xde, 0xa6, 0xb7, 0xa2, 0x20, 0x8b, 0x97, 0x70, 0x42, + 0x4f, 0x56, 0x54, 0xdf, 0x59, 0xc9, 0x4b, 0xb4, 0x4e, 0x3b, 0xaa, 0xd2, 0x09, 0x42, 0xdc, 0x88, + 0x4e, 0xe8, 0x3d, 0x01, 0xca, 0xbc, 0xc0, 0x97, 0x37, 0x58, 0xe6, 0x46, 0x6c, 0x9d, 0x76, 0xb4, + 0x87, 0x64, 0x50, 0xb8, 0x85, 0xf6, 0xe3, 0x22, 0xc4, 0xc4, 0x5d, 0x49, 0xbc, 0xa9, 0x89, 0xfb,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0xb8, 0x70, 0x75, 0x59, 0x08, 0x25, 0xbb, 0x81, 0x99, 0x57, 0xd2, + 0xac, 0x93, 0xe5, 0xc1, 0x48, 0x06, 0x81, 0xbf, 0x44, 0xfb, 0x7e, 0xe0, 0xc7, 0x52, 0x3d, 0xf2, + 0x90, 0x99, 0xbb, 0x92, 0x74, 0x5d, 0x8c, 0xdc, 0xc9, 0xb2, 0x8b, 0xac, 0x62, 0x57, 0x3a, 0xaf, + 0xb0, 0x71, 0xe7, 0xb5, 0x9b, 0x2f, 0xdf, 0x54, 0xb7, 0x5e, 0xbd, 0xa9, 0x6e, 0xbd, 0x7e, 0x53, + 0xdd, 0xfa, 0x79, 0x51, 0x35, 0x5e, 0x2e, 0xaa, 0xc6, 0xab, 0x45, 0xd5, 0x78, 0xbd, 0xa8, 0x1a, + 0x7f, 0x2e, 0xaa, 0xc6, 0xaf, 0x7f, 0x55, 0xb7, 0xbe, 0xdf, 0x9e, 0x1d, 0xfd, 0x1b, 0x00, 0x00, + 0xff, 0xff, 0x2b, 0xa9, 0x3a, 0xe6, 0x82, 0x0d, 0x00, 0x00, +} diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto b/deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto new file mode 100644 index 000000000..4baad752e --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto @@ -0,0 +1,249 @@ +/* +Copyright The Kubernetes 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. +*/ + + +// This file was autogenerated by go-to-protobuf. Do not edit it manually! + +syntax = 'proto2'; + +package k8s.io.apiserver.pkg.apis.audit.v1; + +import "k8s.io/api/authentication/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/generated.proto"; +import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; + +// Package-wide variables from generator "generated". +option go_package = "v1"; + +// Event captures all the information that can be included in an API audit log. +message Event { + // AuditLevel at which event was generated + optional string level = 1; + + // Unique audit ID, generated for each request. + optional string auditID = 2; + + // Stage of the request handling when this event instance was generated. + optional string stage = 3; + + // RequestURI is the request URI as sent by the client to a server. + optional string requestURI = 4; + + // Verb is the kubernetes verb associated with the request. + // For non-resource requests, this is the lower-cased HTTP method. + optional string verb = 5; + + // Authenticated user information. + optional k8s.io.api.authentication.v1.UserInfo user = 6; + + // Impersonated user information. + // +optional + optional k8s.io.api.authentication.v1.UserInfo impersonatedUser = 7; + + // Source IPs, from where the request originated and intermediate proxies. + // +optional + repeated string sourceIPs = 8; + + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + optional string userAgent = 16; + + // Object reference this request is targeted at. + // Does not apply for List-type requests, or non-resource requests. + // +optional + optional ObjectReference objectRef = 9; + + // The response status, populated even when the ResponseObject is not a Status type. + // For successful responses, this will only include the Code and StatusSuccess. + // For non-status type error responses, this will be auto-populated with the error Message. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.Status responseStatus = 10; + + // API object from the request, in JSON format. The RequestObject is recorded as-is in the request + // (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or + // merging. It is an external versioned object type, and may not be a valid object on its own. + // Omitted for non-resource requests. Only logged at Request Level and higher. + // +optional + optional k8s.io.apimachinery.pkg.runtime.Unknown requestObject = 11; + + // API object returned in the response, in JSON. The ResponseObject is recorded after conversion + // to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged + // at Response Level. + // +optional + optional k8s.io.apimachinery.pkg.runtime.Unknown responseObject = 12; + + // Time the request reached the apiserver. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime requestReceivedTimestamp = 13; + + // Time the request reached current audit stage. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime stageTimestamp = 14; + + // Annotations is an unstructured key value map stored with an audit event that may be set by + // plugins invoked in the request serving chain, including authentication, authorization and + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. + // +optional + map annotations = 15; +} + +// EventList is a list of audit Events. +message EventList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated Event items = 2; +} + +// GroupResources represents resource kinds in an API group. +message GroupResources { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + optional string group = 1; + + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + repeated string resources = 2; + + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + repeated string resourceNames = 3; +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +message ObjectReference { + // +optional + optional string resource = 1; + + // +optional + optional string namespace = 2; + + // +optional + optional string name = 3; + + // +optional + optional string uid = 4; + + // APIGroup is the name of the API group that contains the referred object. + // The empty string represents the core API group. + // +optional + optional string apiGroup = 5; + + // APIVersion is the version of the API group that contains the referred object. + // +optional + optional string apiVersion = 6; + + // +optional + optional string resourceVersion = 7; + + // +optional + optional string subresource = 8; +} + +// Policy defines the configuration of audit logging, and the rules for how different request +// categories are logged. +message Policy { + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Rules specify the audit Level a request should be recorded at. + // A request may match multiple rules, in which case the FIRST matching rule is used. + // The default audit level is None, but can be overridden by a catch-all rule at the end of the list. + // PolicyRules are strictly ordered. + repeated PolicyRule rules = 2; + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified per rule in which case the union of both are omitted. + // +optional + repeated string omitStages = 3; +} + +// PolicyList is a list of audit Policies. +message PolicyList { + // +optional + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + repeated Policy items = 2; +} + +// PolicyRule maps requests based off metadata to an audit Level. +// Requests must match the rules of every field (an intersection of rules). +message PolicyRule { + // The Level that requests matching this rule are recorded at. + optional string level = 1; + + // The users (by authenticated user name) this rule applies to. + // An empty list implies every user. + // +optional + repeated string users = 2; + + // The user groups this rule applies to. A user is considered matching + // if it is a member of any of the UserGroups. + // An empty list implies every user group. + // +optional + repeated string userGroups = 3; + + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + repeated string verbs = 4; + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + repeated GroupResources resources = 5; + + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + repeated string namespaces = 6; + + // NonResourceURLs is a set of URL paths that should be audited. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + repeated string nonResourceURLs = 7; + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified policy wide in which case the union of both are omitted. + // An empty list means no restrictions will apply. + // +optional + repeated string omitStages = 8; +} + diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/register.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1/register.go new file mode 100644 index 000000000..46e3e47bc --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/register.go @@ -0,0 +1,58 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "audit.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Event{}, + &EventList{}, + &Policy{}, + &PolicyList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/types.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1/types.go new file mode 100644 index 000000000..cf6bb1a01 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/types.go @@ -0,0 +1,280 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + authnv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" +) + +// Header keys used by the audit system. +const ( + // Header to hold the audit ID as the request is propagated through the serving hierarchy. The + // Audit-ID header should be set by the first server to receive the request (e.g. the federation + // server or kube-aggregator). + HeaderAuditID = "Audit-ID" +) + +// Level defines the amount of information logged during auditing +type Level string + +// Valid audit levels +const ( + // LevelNone disables auditing + LevelNone Level = "None" + // LevelMetadata provides the basic level of auditing. + LevelMetadata Level = "Metadata" + // LevelRequest provides Metadata level of auditing, and additionally + // logs the request object (does not apply for non-resource requests). + LevelRequest Level = "Request" + // LevelRequestResponse provides Request level of auditing, and additionally + // logs the response object (does not apply for non-resource requests). + LevelRequestResponse Level = "RequestResponse" +) + +// Stage defines the stages in request handling that audit events may be generated. +type Stage string + +// Valid audit stages. +const ( + // The stage for events generated as soon as the audit handler receives the request, and before it + // is delegated down the handler chain. + StageRequestReceived = "RequestReceived" + // The stage for events generated once the response headers are sent, but before the response body + // is sent. This stage is only generated for long-running requests (e.g. watch). + StageResponseStarted = "ResponseStarted" + // The stage for events generated once the response body has been completed, and no more bytes + // will be sent. + StageResponseComplete = "ResponseComplete" + // The stage for events generated when a panic occurred. + StagePanic = "Panic" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Event captures all the information that can be included in an API audit log. +type Event struct { + metav1.TypeMeta `json:",inline"` + + // AuditLevel at which event was generated + Level Level `json:"level" protobuf:"bytes,1,opt,name=level,casttype=Level"` + + // Unique audit ID, generated for each request. + AuditID types.UID `json:"auditID" protobuf:"bytes,2,opt,name=auditID,casttype=k8s.io/apimachinery/pkg/types.UID"` + // Stage of the request handling when this event instance was generated. + Stage Stage `json:"stage" protobuf:"bytes,3,opt,name=stage,casttype=Stage"` + + // RequestURI is the request URI as sent by the client to a server. + RequestURI string `json:"requestURI" protobuf:"bytes,4,opt,name=requestURI"` + // Verb is the kubernetes verb associated with the request. + // For non-resource requests, this is the lower-cased HTTP method. + Verb string `json:"verb" protobuf:"bytes,5,opt,name=verb"` + // Authenticated user information. + User authnv1.UserInfo `json:"user" protobuf:"bytes,6,opt,name=user"` + // Impersonated user information. + // +optional + ImpersonatedUser *authnv1.UserInfo `json:"impersonatedUser,omitempty" protobuf:"bytes,7,opt,name=impersonatedUser"` + // Source IPs, from where the request originated and intermediate proxies. + // +optional + SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,8,rep,name=sourceIPs"` + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + UserAgent string `json:"userAgent,omitempty" protobuf:"bytes,16,opt,name=userAgent"` + // Object reference this request is targeted at. + // Does not apply for List-type requests, or non-resource requests. + // +optional + ObjectRef *ObjectReference `json:"objectRef,omitempty" protobuf:"bytes,9,opt,name=objectRef"` + // The response status, populated even when the ResponseObject is not a Status type. + // For successful responses, this will only include the Code and StatusSuccess. + // For non-status type error responses, this will be auto-populated with the error Message. + // +optional + ResponseStatus *metav1.Status `json:"responseStatus,omitempty" protobuf:"bytes,10,opt,name=responseStatus"` + + // API object from the request, in JSON format. The RequestObject is recorded as-is in the request + // (possibly re-encoded as JSON), prior to version conversion, defaulting, admission or + // merging. It is an external versioned object type, and may not be a valid object on its own. + // Omitted for non-resource requests. Only logged at Request Level and higher. + // +optional + RequestObject *runtime.Unknown `json:"requestObject,omitempty" protobuf:"bytes,11,opt,name=requestObject"` + // API object returned in the response, in JSON. The ResponseObject is recorded after conversion + // to the external type, and serialized as JSON. Omitted for non-resource requests. Only logged + // at Response Level. + // +optional + ResponseObject *runtime.Unknown `json:"responseObject,omitempty" protobuf:"bytes,12,opt,name=responseObject"` + // Time the request reached the apiserver. + // +optional + RequestReceivedTimestamp metav1.MicroTime `json:"requestReceivedTimestamp" protobuf:"bytes,13,opt,name=requestReceivedTimestamp"` + // Time the request reached current audit stage. + // +optional + StageTimestamp metav1.MicroTime `json:"stageTimestamp" protobuf:"bytes,14,opt,name=stageTimestamp"` + + // Annotations is an unstructured key value map stored with an audit event that may be set by + // plugins invoked in the request serving chain, including authentication, authorization and + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. + // +optional + Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,15,rep,name=annotations"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// EventList is a list of audit Events. +type EventList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Event `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Policy defines the configuration of audit logging, and the rules for how different request +// categories are logged. +type Policy struct { + metav1.TypeMeta `json:",inline"` + // ObjectMeta is included for interoperability with API infrastructure. + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Rules specify the audit Level a request should be recorded at. + // A request may match multiple rules, in which case the FIRST matching rule is used. + // The default audit level is None, but can be overridden by a catch-all rule at the end of the list. + // PolicyRules are strictly ordered. + Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified per rule in which case the union of both are omitted. + // +optional + OmitStages []Stage `json:"omitStages,omitempty" protobuf:"bytes,3,rep,name=omitStages"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// PolicyList is a list of audit Policies. +type PolicyList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + Items []Policy `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// PolicyRule maps requests based off metadata to an audit Level. +// Requests must match the rules of every field (an intersection of rules). +type PolicyRule struct { + // The Level that requests matching this rule are recorded at. + Level Level `json:"level" protobuf:"bytes,1,opt,name=level,casttype=Level"` + + // The users (by authenticated user name) this rule applies to. + // An empty list implies every user. + // +optional + Users []string `json:"users,omitempty" protobuf:"bytes,2,rep,name=users"` + // The user groups this rule applies to. A user is considered matching + // if it is a member of any of the UserGroups. + // An empty list implies every user group. + // +optional + UserGroups []string `json:"userGroups,omitempty" protobuf:"bytes,3,rep,name=userGroups"` + + // The verbs that match this rule. + // An empty list implies every verb. + // +optional + Verbs []string `json:"verbs,omitempty" protobuf:"bytes,4,rep,name=verbs"` + + // Rules can apply to API resources (such as "pods" or "secrets"), + // non-resource URL paths (such as "/api"), or neither, but not both. + // If neither is specified, the rule is treated as a default for all URLs. + + // Resources that this rule matches. An empty list implies all kinds in all API groups. + // +optional + Resources []GroupResources `json:"resources,omitempty" protobuf:"bytes,5,rep,name=resources"` + // Namespaces that this rule matches. + // The empty string "" matches non-namespaced resources. + // An empty list implies every namespace. + // +optional + Namespaces []string `json:"namespaces,omitempty" protobuf:"bytes,6,rep,name=namespaces"` + + // NonResourceURLs is a set of URL paths that should be audited. + // *s are allowed, but only as the full, final step in the path. + // Examples: + // "/metrics" - Log requests for apiserver metrics + // "/healthz*" - Log all health checks + // +optional + NonResourceURLs []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,7,rep,name=nonResourceURLs"` + + // OmitStages is a list of stages for which no events are created. Note that this can also + // be specified policy wide in which case the union of both are omitted. + // An empty list means no restrictions will apply. + // +optional + OmitStages []Stage `json:"omitStages,omitempty" protobuf:"bytes,8,rep,name=omitStages"` +} + +// GroupResources represents resource kinds in an API group. +type GroupResources struct { + // Group is the name of the API group that contains the resources. + // The empty string represents the core API group. + // +optional + Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. + // +optional + Resources []string `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` + // ResourceNames is a list of resource instance names that the policy matches. + // Using this field requires Resources to be specified. + // An empty list implies that every instance of the resource is matched. + // +optional + ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,3,rep,name=resourceNames"` +} + +// ObjectReference contains enough information to let you inspect or modify the referred object. +type ObjectReference struct { + // +optional + Resource string `json:"resource,omitempty" protobuf:"bytes,1,opt,name=resource"` + // +optional + Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,opt,name=namespace"` + // +optional + Name string `json:"name,omitempty" protobuf:"bytes,3,opt,name=name"` + // +optional + UID types.UID `json:"uid,omitempty" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"` + // APIGroup is the name of the API group that contains the referred object. + // The empty string represents the core API group. + // +optional + APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,5,opt,name=apiGroup"` + // APIVersion is the version of the API group that contains the referred object. + // +optional + APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,6,opt,name=apiVersion"` + // +optional + ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,7,opt,name=resourceVersion"` + // +optional + Subresource string `json:"subresource,omitempty" protobuf:"bytes,8,opt,name=subresource"` +} diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.conversion.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.conversion.go new file mode 100644 index 000000000..0e99ab453 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.conversion.go @@ -0,0 +1,328 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1 + +import ( + unsafe "unsafe" + + authenticationv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + audit "k8s.io/apiserver/pkg/apis/audit" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*Event)(nil), (*audit.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Event_To_audit_Event(a.(*Event), b.(*audit.Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Event_To_v1_Event(a.(*audit.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EventList)(nil), (*audit.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_EventList_To_audit_EventList(a.(*EventList), b.(*audit.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.EventList)(nil), (*EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_EventList_To_v1_EventList(a.(*audit.EventList), b.(*EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GroupResources)(nil), (*audit.GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_GroupResources_To_audit_GroupResources(a.(*GroupResources), b.(*audit.GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.GroupResources)(nil), (*GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_GroupResources_To_v1_GroupResources(a.(*audit.GroupResources), b.(*GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ObjectReference)(nil), (*audit.ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ObjectReference_To_audit_ObjectReference(a.(*ObjectReference), b.(*audit.ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.ObjectReference)(nil), (*ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_ObjectReference_To_v1_ObjectReference(a.(*audit.ObjectReference), b.(*ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Policy)(nil), (*audit.Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Policy_To_audit_Policy(a.(*Policy), b.(*audit.Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Policy)(nil), (*Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Policy_To_v1_Policy(a.(*audit.Policy), b.(*Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyList)(nil), (*audit.PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PolicyList_To_audit_PolicyList(a.(*PolicyList), b.(*audit.PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyList)(nil), (*PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyList_To_v1_PolicyList(a.(*audit.PolicyList), b.(*PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyRule)(nil), (*audit.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_PolicyRule_To_audit_PolicyRule(a.(*PolicyRule), b.(*audit.PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyRule)(nil), (*PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyRule_To_v1_PolicyRule(a.(*audit.PolicyRule), b.(*PolicyRule), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { + out.Level = audit.Level(in.Level) + out.AuditID = types.UID(in.AuditID) + out.Stage = audit.Stage(in.Stage) + out.RequestURI = in.RequestURI + out.Verb = in.Verb + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&in.User, &out.User, 0); err != nil { + return err + } + out.ImpersonatedUser = (*audit.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent + out.ObjectRef = (*audit.ObjectReference)(unsafe.Pointer(in.ObjectRef)) + out.ResponseStatus = (*metav1.Status)(unsafe.Pointer(in.ResponseStatus)) + out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) + out.ResponseObject = (*runtime.Unknown)(unsafe.Pointer(in.ResponseObject)) + out.RequestReceivedTimestamp = in.RequestReceivedTimestamp + out.StageTimestamp = in.StageTimestamp + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +// Convert_v1_Event_To_audit_Event is an autogenerated conversion function. +func Convert_v1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { + return autoConvert_v1_Event_To_audit_Event(in, out, s) +} + +func autoConvert_audit_Event_To_v1_Event(in *audit.Event, out *Event, s conversion.Scope) error { + out.Level = Level(in.Level) + out.AuditID = types.UID(in.AuditID) + out.Stage = Stage(in.Stage) + out.RequestURI = in.RequestURI + out.Verb = in.Verb + // TODO: Inefficient conversion - can we improve it? + if err := s.Convert(&in.User, &out.User, 0); err != nil { + return err + } + out.ImpersonatedUser = (*authenticationv1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent + out.ObjectRef = (*ObjectReference)(unsafe.Pointer(in.ObjectRef)) + out.ResponseStatus = (*metav1.Status)(unsafe.Pointer(in.ResponseStatus)) + out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) + out.ResponseObject = (*runtime.Unknown)(unsafe.Pointer(in.ResponseObject)) + out.RequestReceivedTimestamp = in.RequestReceivedTimestamp + out.StageTimestamp = in.StageTimestamp + out.Annotations = *(*map[string]string)(unsafe.Pointer(&in.Annotations)) + return nil +} + +// Convert_audit_Event_To_v1_Event is an autogenerated conversion function. +func Convert_audit_Event_To_v1_Event(in *audit.Event, out *Event, s conversion.Scope) error { + return autoConvert_audit_Event_To_v1_Event(in, out, s) +} + +func autoConvert_v1_EventList_To_audit_EventList(in *EventList, out *audit.EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]audit.Event)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_EventList_To_audit_EventList is an autogenerated conversion function. +func Convert_v1_EventList_To_audit_EventList(in *EventList, out *audit.EventList, s conversion.Scope) error { + return autoConvert_v1_EventList_To_audit_EventList(in, out, s) +} + +func autoConvert_audit_EventList_To_v1_EventList(in *audit.EventList, out *EventList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Event)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_audit_EventList_To_v1_EventList is an autogenerated conversion function. +func Convert_audit_EventList_To_v1_EventList(in *audit.EventList, out *EventList, s conversion.Scope) error { + return autoConvert_audit_EventList_To_v1_EventList(in, out, s) +} + +func autoConvert_v1_GroupResources_To_audit_GroupResources(in *GroupResources, out *audit.GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_v1_GroupResources_To_audit_GroupResources is an autogenerated conversion function. +func Convert_v1_GroupResources_To_audit_GroupResources(in *GroupResources, out *audit.GroupResources, s conversion.Scope) error { + return autoConvert_v1_GroupResources_To_audit_GroupResources(in, out, s) +} + +func autoConvert_audit_GroupResources_To_v1_GroupResources(in *audit.GroupResources, out *GroupResources, s conversion.Scope) error { + out.Group = in.Group + out.Resources = *(*[]string)(unsafe.Pointer(&in.Resources)) + out.ResourceNames = *(*[]string)(unsafe.Pointer(&in.ResourceNames)) + return nil +} + +// Convert_audit_GroupResources_To_v1_GroupResources is an autogenerated conversion function. +func Convert_audit_GroupResources_To_v1_GroupResources(in *audit.GroupResources, out *GroupResources, s conversion.Scope) error { + return autoConvert_audit_GroupResources_To_v1_GroupResources(in, out, s) +} + +func autoConvert_v1_ObjectReference_To_audit_ObjectReference(in *ObjectReference, out *audit.ObjectReference, s conversion.Scope) error { + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + out.UID = types.UID(in.UID) + out.APIGroup = in.APIGroup + out.APIVersion = in.APIVersion + out.ResourceVersion = in.ResourceVersion + out.Subresource = in.Subresource + return nil +} + +// Convert_v1_ObjectReference_To_audit_ObjectReference is an autogenerated conversion function. +func Convert_v1_ObjectReference_To_audit_ObjectReference(in *ObjectReference, out *audit.ObjectReference, s conversion.Scope) error { + return autoConvert_v1_ObjectReference_To_audit_ObjectReference(in, out, s) +} + +func autoConvert_audit_ObjectReference_To_v1_ObjectReference(in *audit.ObjectReference, out *ObjectReference, s conversion.Scope) error { + out.Resource = in.Resource + out.Namespace = in.Namespace + out.Name = in.Name + out.UID = types.UID(in.UID) + out.APIGroup = in.APIGroup + out.APIVersion = in.APIVersion + out.ResourceVersion = in.ResourceVersion + out.Subresource = in.Subresource + return nil +} + +// Convert_audit_ObjectReference_To_v1_ObjectReference is an autogenerated conversion function. +func Convert_audit_ObjectReference_To_v1_ObjectReference(in *audit.ObjectReference, out *ObjectReference, s conversion.Scope) error { + return autoConvert_audit_ObjectReference_To_v1_ObjectReference(in, out, s) +} + +func autoConvert_v1_Policy_To_audit_Policy(in *Policy, out *audit.Policy, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]audit.PolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]audit.Stage)(unsafe.Pointer(&in.OmitStages)) + return nil +} + +// Convert_v1_Policy_To_audit_Policy is an autogenerated conversion function. +func Convert_v1_Policy_To_audit_Policy(in *Policy, out *audit.Policy, s conversion.Scope) error { + return autoConvert_v1_Policy_To_audit_Policy(in, out, s) +} + +func autoConvert_audit_Policy_To_v1_Policy(in *audit.Policy, out *Policy, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.Rules = *(*[]PolicyRule)(unsafe.Pointer(&in.Rules)) + out.OmitStages = *(*[]Stage)(unsafe.Pointer(&in.OmitStages)) + return nil +} + +// Convert_audit_Policy_To_v1_Policy is an autogenerated conversion function. +func Convert_audit_Policy_To_v1_Policy(in *audit.Policy, out *Policy, s conversion.Scope) error { + return autoConvert_audit_Policy_To_v1_Policy(in, out, s) +} + +func autoConvert_v1_PolicyList_To_audit_PolicyList(in *PolicyList, out *audit.PolicyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]audit.Policy)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1_PolicyList_To_audit_PolicyList is an autogenerated conversion function. +func Convert_v1_PolicyList_To_audit_PolicyList(in *PolicyList, out *audit.PolicyList, s conversion.Scope) error { + return autoConvert_v1_PolicyList_To_audit_PolicyList(in, out, s) +} + +func autoConvert_audit_PolicyList_To_v1_PolicyList(in *audit.PolicyList, out *PolicyList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]Policy)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_audit_PolicyList_To_v1_PolicyList is an autogenerated conversion function. +func Convert_audit_PolicyList_To_v1_PolicyList(in *audit.PolicyList, out *PolicyList, s conversion.Scope) error { + return autoConvert_audit_PolicyList_To_v1_PolicyList(in, out, s) +} + +func autoConvert_v1_PolicyRule_To_audit_PolicyRule(in *PolicyRule, out *audit.PolicyRule, s conversion.Scope) error { + out.Level = audit.Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]audit.GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]audit.Stage)(unsafe.Pointer(&in.OmitStages)) + return nil +} + +// Convert_v1_PolicyRule_To_audit_PolicyRule is an autogenerated conversion function. +func Convert_v1_PolicyRule_To_audit_PolicyRule(in *PolicyRule, out *audit.PolicyRule, s conversion.Scope) error { + return autoConvert_v1_PolicyRule_To_audit_PolicyRule(in, out, s) +} + +func autoConvert_audit_PolicyRule_To_v1_PolicyRule(in *audit.PolicyRule, out *PolicyRule, s conversion.Scope) error { + out.Level = Level(in.Level) + out.Users = *(*[]string)(unsafe.Pointer(&in.Users)) + out.UserGroups = *(*[]string)(unsafe.Pointer(&in.UserGroups)) + out.Verbs = *(*[]string)(unsafe.Pointer(&in.Verbs)) + out.Resources = *(*[]GroupResources)(unsafe.Pointer(&in.Resources)) + out.Namespaces = *(*[]string)(unsafe.Pointer(&in.Namespaces)) + out.NonResourceURLs = *(*[]string)(unsafe.Pointer(&in.NonResourceURLs)) + out.OmitStages = *(*[]Stage)(unsafe.Pointer(&in.OmitStages)) + return nil +} + +// Convert_audit_PolicyRule_To_v1_PolicyRule is an autogenerated conversion function. +func Convert_audit_PolicyRule_To_v1_PolicyRule(in *audit.PolicyRule, out *PolicyRule, s conversion.Scope) error { + return autoConvert_audit_PolicyRule_To_v1_PolicyRule(in, out, s) +} diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..ec2eb26ad --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.deepcopy.go @@ -0,0 +1,291 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + authenticationv1 "k8s.io/api/authentication/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Event) DeepCopyInto(out *Event) { + *out = *in + out.TypeMeta = in.TypeMeta + in.User.DeepCopyInto(&out.User) + if in.ImpersonatedUser != nil { + in, out := &in.ImpersonatedUser, &out.ImpersonatedUser + *out = new(authenticationv1.UserInfo) + (*in).DeepCopyInto(*out) + } + if in.SourceIPs != nil { + in, out := &in.SourceIPs, &out.SourceIPs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ObjectRef != nil { + in, out := &in.ObjectRef, &out.ObjectRef + *out = new(ObjectReference) + **out = **in + } + if in.ResponseStatus != nil { + in, out := &in.ResponseStatus, &out.ResponseStatus + *out = new(metav1.Status) + (*in).DeepCopyInto(*out) + } + if in.RequestObject != nil { + in, out := &in.RequestObject, &out.RequestObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + if in.ResponseObject != nil { + in, out := &in.ResponseObject, &out.ResponseObject + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) + } + in.RequestReceivedTimestamp.DeepCopyInto(&out.RequestReceivedTimestamp) + in.StageTimestamp.DeepCopyInto(&out.StageTimestamp) + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Event. +func (in *Event) DeepCopy() *Event { + if in == nil { + return nil + } + out := new(Event) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Event) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EventList) DeepCopyInto(out *EventList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Event, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. +func (in *EventList) DeepCopy() *EventList { + if in == nil { + return nil + } + out := new(EventList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EventList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupResources) DeepCopyInto(out *GroupResources) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ResourceNames != nil { + in, out := &in.ResourceNames, &out.ResourceNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResources. +func (in *GroupResources) DeepCopy() *GroupResources { + if in == nil { + return nil + } + out := new(GroupResources) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference. +func (in *ObjectReference) DeepCopy() *ObjectReference { + if in == nil { + return nil + } + out := new(ObjectReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Policy) DeepCopyInto(out *Policy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]PolicyRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]Stage, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy. +func (in *Policy) DeepCopy() *Policy { + if in == nil { + return nil + } + out := new(Policy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Policy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyList) DeepCopyInto(out *PolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Policy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList. +func (in *PolicyList) DeepCopy() *PolicyList { + if in == nil { + return nil + } + out := new(PolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PolicyRule) DeepCopyInto(out *PolicyRule) { + *out = *in + if in.Users != nil { + in, out := &in.Users, &out.Users + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.UserGroups != nil { + in, out := &in.UserGroups, &out.UserGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Verbs != nil { + in, out := &in.Verbs, &out.Verbs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]GroupResources, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NonResourceURLs != nil { + in, out := &in.NonResourceURLs, &out.NonResourceURLs + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.OmitStages != nil { + in, out := &in.OmitStages, &out.OmitStages + *out = make([]Stage, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule. +func (in *PolicyRule) DeepCopy() *PolicyRule { + if in == nil { + return nil + } + out := new(PolicyRule) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.defaults.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.defaults.go new file mode 100644 index 000000000..cce2e603a --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/BUILD b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/BUILD deleted file mode 100644 index f1c5fbf33..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/BUILD +++ /dev/null @@ -1,65 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apiserver/pkg/apis/audit/v1alpha1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["conversion_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/apis/audit/v1alpha1", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - ], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.pb.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.pb.go index 5f21dfaf2..73a993c25 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.pb.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -266,6 +266,12 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], v) } } + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserAgent))) + i += copy(dAtA[i:], m.UserAgent) return i, nil } @@ -704,6 +710,8 @@ func (m *Event) Size() (n int) { n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) } } + l = len(m.UserAgent) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -890,6 +898,7 @@ func (this *Event) String() string { `RequestReceivedTimestamp:` + strings.Replace(strings.Replace(this.RequestReceivedTimestamp.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`, `StageTimestamp:` + strings.Replace(strings.Replace(this.StageTimestamp.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`, `Annotations:` + mapStringForAnnotations + `,`, + `UserAgent:` + fmt.Sprintf("%v", this.UserAgent) + `,`, `}`, }, "") return s @@ -1615,6 +1624,35 @@ func (m *Event) Unmarshal(dAtA []byte) error { m.Annotations[mapkey] = mapvalue } iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserAgent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2782,84 +2820,84 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1258 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xd6, 0x71, 0x63, 0x8f, 0x1b, 0xc7, 0x99, 0x56, 0xdf, 0xae, 0x72, 0xb0, 0xfd, 0x35, - 0x12, 0xb2, 0x20, 0xec, 0x26, 0x21, 0xd0, 0x80, 0x04, 0x22, 0x56, 0x2b, 0xb0, 0x94, 0x86, 0x30, - 0x89, 0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7a, 0x49, 0x74, 0xf8, 0xf4, 0xce, 0x81, 0x51, 0x7b, 0x61, - 0xa0, 0xbc, 0x74, 0x7e, 0xe4, 0x32, 0x8e, 0x7f, 0xb8, 0xb1, 0x04, 0xac, 0xe5, 0x32, 0x26, 0xac, - 0xe5, 0x0a, 0x28, 0xa9, 0x88, 0x73, 0xb1, 0x24, 0xb5, 0x00, 0xce, 0x50, 0xd6, 0xe5, 0x30, 0x62, - 0xe6, 0x1d, 0x99, 0x1e, 0xfb, 0x96, 0xe9, 0x69, 0xac, 0xc7, 0x63, 0xb5, 0x29, 0x58, 0x48, 0x44, - 0x56, 0xfb, 0xc3, 0x40, 0xc5, 0x2f, 0xa9, 0x1f, 0x06, 0x04, 0xa2, 0x59, 0xc1, 0xf0, 0x3b, 0x28, - 0xdb, 0x13, 0x92, 0x28, 0x05, 0xda, 0x2e, 0x82, 0x45, 0x3a, 0x31, 0x7b, 0x68, 0x6c, 0x21, 0x23, - 0x52, 0xb3, 0x27, 0xa1, 0x21, 0x5a, 0x8f, 0x1f, 0x89, 0x4e, 0x8d, 0x0e, 0xc7, 0xce, 0x08, 0x98, - 0x99, 0x91, 0x06, 0xaa, 0xff, 0x52, 0x0a, 0x32, 0x8b, 0xab, 0xfd, 0x9a, 0x41, 0x1b, 0x73, 0xa3, - 0x07, 0x6f, 0xa3, 0x5c, 0x0c, 0x52, 0x11, 0x26, 0x59, 0x8b, 0xb9, 0x48, 0x82, 0xc0, 0x36, 0xca, - 0x7b, 0x82, 0x2a, 0x70, 0x3a, 0xea, 0xff, 0xe9, 0xe5, 0x76, 0x1c, 0x2b, 0x88, 0xc6, 0x88, 0x55, - 0x21, 0x0e, 0x72, 0x69, 0xa6, 0x56, 0x85, 0xc0, 0x12, 0xa9, 0xc1, 0x0d, 0x94, 0x09, 0xdd, 0xae, - 0x5a, 0x7d, 0x3b, 0x0a, 0x90, 0x69, 0x2d, 0xbb, 0xf6, 0x84, 0xb1, 0x58, 0x62, 0x4e, 0xe0, 0x3e, - 0x03, 0xca, 0x5c, 0xdf, 0x53, 0x7b, 0x2f, 0x59, 0x62, 0x87, 0x27, 0x4d, 0xa5, 0x21, 0x29, 0x14, - 0x3e, 0x44, 0x1b, 0xf1, 0xb5, 0x62, 0xc3, 0x68, 0xfb, 0x3d, 0x54, 0x86, 0x1b, 0x64, 0x56, 0x4d, - 0xe6, 0xf1, 0xf8, 0x23, 0x54, 0x60, 0x61, 0x3b, 0x49, 0x5f, 0xb4, 0x0e, 0x93, 0x36, 0x39, 0xd5, - 0x2a, 0x92, 0xc6, 0xd5, 0x5e, 0x1b, 0xe8, 0xee, 0x89, 0x3f, 0x74, 0x3b, 0x17, 0x6f, 0xe1, 0xa1, - 0xf3, 0x2d, 0xca, 0xd2, 0x70, 0x08, 0x71, 0x9d, 0xef, 0x2f, 0x5f, 0xe7, 0x51, 0x88, 0x24, 0x1c, - 0x82, 0x2e, 0x5a, 0x71, 0x62, 0x24, 0x62, 0xc4, 0x8f, 0x10, 0xf2, 0x47, 0x2e, 0x97, 0xd3, 0x28, - 0x2e, 0xc2, 0x87, 0x32, 0x90, 0x44, 0xaa, 0x9f, 0x1b, 0x29, 0x68, 0xed, 0x4f, 0x03, 0xa1, 0x88, - 0xfd, 0x2d, 0x34, 0x7a, 0x6b, 0xb6, 0xd1, 0x77, 0x6e, 0x9b, 0x80, 0x05, 0x9d, 0xfe, 0x22, 0x13, - 0xdf, 0x41, 0xe4, 0x44, 0xbf, 0x27, 0x8d, 0x65, 0xde, 0x93, 0x15, 0x94, 0x15, 0x8f, 0x9b, 0xb8, - 0xd5, 0xf3, 0x02, 0x29, 0xde, 0x20, 0x8c, 0x44, 0x72, 0x6c, 0x21, 0x24, 0x3e, 0xe4, 0x8c, 0x88, - 0x53, 0x5b, 0x14, 0xa9, 0x6d, 0x25, 0x52, 0x92, 0x42, 0x08, 0x42, 0xf1, 0xee, 0x62, 0xe6, 0xaa, - 0x26, 0x14, 0xcf, 0x31, 0x46, 0x22, 0x39, 0x76, 0xd3, 0x03, 0x26, 0x2b, 0x33, 0x71, 0xb0, 0x7c, - 0x26, 0x66, 0x47, 0x9a, 0x6e, 0xf9, 0x37, 0x8e, 0x27, 0x0b, 0xa1, 0xa4, 0xff, 0x99, 0x79, 0x57, - 0xc7, 0x9e, 0x0c, 0x08, 0x46, 0x52, 0x08, 0xfc, 0x19, 0xda, 0xf0, 0x7c, 0x2f, 0xa6, 0x6a, 0x91, - 0x23, 0x66, 0xae, 0x49, 0xa3, 0xfb, 0xa2, 0x09, 0x8f, 0x67, 0x55, 0x64, 0x1e, 0x3b, 0x57, 0x85, - 0xb9, 0xa5, 0xab, 0xb0, 0x61, 0x5d, 0x5e, 0x95, 0x57, 0x5e, 0x5e, 0x95, 0x57, 0x5e, 0x5d, 0x95, - 0x57, 0x7e, 0x99, 0x96, 0x8d, 0xcb, 0x69, 0xd9, 0x78, 0x39, 0x2d, 0x1b, 0xaf, 0xa6, 0x65, 0xe3, - 0xaf, 0x69, 0xd9, 0xf8, 0xfd, 0xef, 0xf2, 0xca, 0x77, 0xb9, 0x38, 0x09, 0xff, 0x04, 0x00, 0x00, - 0xff, 0xff, 0x3e, 0x3d, 0x28, 0x0e, 0x4d, 0x0e, 0x00, 0x00, + // 1263 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xd6, 0x71, 0x63, 0x8f, 0x1b, 0xc7, 0x99, 0x56, 0x74, 0x95, 0x83, 0x6d, 0x8c, 0x84, + 0x2c, 0x08, 0xbb, 0x49, 0x14, 0x68, 0x40, 0x02, 0x11, 0xab, 0x15, 0x58, 0x4a, 0x43, 0x78, 0x89, + 0x2b, 0xf1, 0xe7, 0xc0, 0xda, 0x7e, 0xb1, 0x17, 0xdb, 0xbb, 0xcb, 0xce, 0xac, 0xab, 0xdc, 0x38, + 0x70, 0x45, 0xe2, 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, 0x69, 0x46, 0x1a, 0x48, 0xa1, 0xe8, 0x21, 0xd9, 0x88, 0xaf, 0x15, 0x1b, 0x86, 0xeb, 0xf2, + 0x61, 0x64, 0xb8, 0x01, 0xb3, 0x6a, 0x98, 0xc7, 0xd3, 0x0f, 0x49, 0x81, 0x05, 0xed, 0x24, 0x7d, + 0xe1, 0xfe, 0x4c, 0xfa, 0xea, 0x54, 0xa9, 0x20, 0x8d, 0xab, 0xfd, 0xa3, 0x91, 0xbb, 0x27, 0xee, + 0xd0, 0xee, 0x5c, 0xbc, 0x81, 0x97, 0xd1, 0x37, 0x24, 0xeb, 0x07, 0x43, 0x8c, 0xeb, 0x7c, 0x7f, + 0xf9, 0x3a, 0x0f, 0x43, 0x84, 0x60, 0x88, 0xaa, 0x68, 0xc5, 0x89, 0x41, 0xc8, 0x48, 0x1f, 0x11, + 0xe2, 0x8e, 0x6c, 0x2e, 0xc7, 0x57, 0x5c, 0x84, 0x0f, 0x65, 0x20, 0x89, 0x54, 0xbd, 0x4f, 0x52, + 0xd0, 0xda, 0x9f, 0x1a, 0x21, 0x21, 0xfb, 0x1b, 0x68, 0xf4, 0xd6, 0x6c, 0xa3, 0xef, 0xdc, 0x36, + 0x01, 0x0b, 0x3a, 0xfd, 0x45, 0x26, 0xbe, 0x83, 0xc8, 0x89, 0x7a, 0x80, 0x6a, 0xcb, 0x3c, 0x40, + 0x2b, 0x24, 0x2b, 0xa6, 0x66, 0xdc, 0xea, 0x79, 0x81, 0x14, 0x13, 0x95, 0x41, 0x28, 0xa7, 0x06, + 0x21, 0xe2, 0x43, 0xce, 0x88, 0x38, 0xb5, 0x45, 0x91, 0xda, 0x56, 0x22, 0x85, 0x14, 0x42, 0x10, + 0x8a, 0x87, 0x1a, 0xd3, 0x57, 0x15, 0xa1, 0x78, 0xbf, 0x31, 0x08, 0xe5, 0xd4, 0x4e, 0x0f, 0x98, + 0xac, 0xcc, 0xc4, 0xc1, 0xf2, 0x99, 0x98, 0x1d, 0x69, 0xaa, 0xe5, 0x5f, 0x3b, 0x9e, 0x0c, 0x42, + 0x92, 0xfe, 0x67, 0xfa, 0x5d, 0x15, 0x7b, 0x32, 0x20, 0x18, 0xa4, 0x10, 0xf4, 0x53, 0xb2, 0xe1, + 0xb8, 0x4e, 0x4c, 0xd5, 0x82, 0x23, 0xa6, 0xaf, 0x49, 0xa3, 0xfb, 0xa2, 0x09, 0x8f, 0x67, 0x55, + 0x30, 0x8f, 0x9d, 0xab, 0xc2, 0xdc, 0xd2, 0x55, 0xd8, 0x30, 0x2e, 0xaf, 0xca, 0x2b, 0x2f, 0xaf, + 0xca, 0x2b, 0xaf, 0xae, 0xca, 0x2b, 0x3f, 0x4f, 0xcb, 0xda, 0xe5, 0xb4, 0xac, 0xbd, 0x9c, 0x96, + 0xb5, 0x57, 0xd3, 0xb2, 0xf6, 0xd7, 0xb4, 0xac, 0xfd, 0xf6, 0x77, 0x79, 0xe5, 0xdb, 0x5c, 0x9c, + 0x84, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xdf, 0xfc, 0xbf, 0xfd, 0x49, 0x0e, 0x00, 0x00, } diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto index d70d84431..507f5889b 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ import "k8s.io/api/authentication/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1alpha1"; @@ -66,6 +65,11 @@ message Event { // +optional repeated string sourceIPs = 10; + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + optional string userAgent = 18; + // Object reference this request is targeted at. // Does not apply for List-type requests, or non-resource requests. // +optional @@ -100,9 +104,10 @@ message Event { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional map annotations = 17; } @@ -122,10 +127,19 @@ message GroupResources { // +optional optional string group = 1; - // Resources is a list of resources within the API group. Subresources are - // matched using a "/" to indicate the subresource. For example, "pods/logs" - // would match request to the logs subresource of pods. The top level resource - // does not match subresources, "pods" doesn't match "pods/logs". + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. // +optional repeated string resources = 2; diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go index 8bf4a6ecb..4b4b7f25c 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go @@ -105,6 +105,10 @@ type Event struct { // Source IPs, from where the request originated and intermediate proxies. // +optional SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,10,rep,name=sourceIPs"` + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + UserAgent string `json:"userAgent,omitempty" protobuf:"bytes,18,opt,name=userAgent"` // Object reference this request is targeted at. // Does not apply for List-type requests, or non-resource requests. // +optional @@ -135,9 +139,10 @@ type Event struct { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"` } @@ -241,10 +246,19 @@ type GroupResources struct { // The empty string represents the core API group. // +optional Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` - // Resources is a list of resources within the API group. Subresources are - // matched using a "/" to indicate the subresource. For example, "pods/logs" - // would match request to the logs subresource of pods. The top level resource - // does not match subresources, "pods" doesn't match "pods/logs". + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. // +optional Resources []string `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` // ResourceNames is a list of resource instance names that the policy matches. diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.conversion.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.conversion.go index 9fa991203..ac56459ae 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.conversion.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,14 +16,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1alpha1 import ( unsafe "unsafe" - authentication_v1 "k8s.io/api/authentication/v1" + authenticationv1 "k8s.io/api/authentication/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -37,23 +37,98 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1alpha1_Event_To_audit_Event, - Convert_audit_Event_To_v1alpha1_Event, - Convert_v1alpha1_EventList_To_audit_EventList, - Convert_audit_EventList_To_v1alpha1_EventList, - Convert_v1alpha1_GroupResources_To_audit_GroupResources, - Convert_audit_GroupResources_To_v1alpha1_GroupResources, - Convert_v1alpha1_ObjectReference_To_audit_ObjectReference, - Convert_audit_ObjectReference_To_v1alpha1_ObjectReference, - Convert_v1alpha1_Policy_To_audit_Policy, - Convert_audit_Policy_To_v1alpha1_Policy, - Convert_v1alpha1_PolicyList_To_audit_PolicyList, - Convert_audit_PolicyList_To_v1alpha1_PolicyList, - Convert_v1alpha1_PolicyRule_To_audit_PolicyRule, - Convert_audit_PolicyRule_To_v1alpha1_PolicyRule, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*Event)(nil), (*audit.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Event_To_audit_Event(a.(*Event), b.(*audit.Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Event_To_v1alpha1_Event(a.(*audit.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EventList)(nil), (*audit.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_EventList_To_audit_EventList(a.(*EventList), b.(*audit.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.EventList)(nil), (*EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_EventList_To_v1alpha1_EventList(a.(*audit.EventList), b.(*EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GroupResources)(nil), (*audit.GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_GroupResources_To_audit_GroupResources(a.(*GroupResources), b.(*audit.GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.GroupResources)(nil), (*GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_GroupResources_To_v1alpha1_GroupResources(a.(*audit.GroupResources), b.(*GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ObjectReference)(nil), (*audit.ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ObjectReference_To_audit_ObjectReference(a.(*ObjectReference), b.(*audit.ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.ObjectReference)(nil), (*ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_ObjectReference_To_v1alpha1_ObjectReference(a.(*audit.ObjectReference), b.(*ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Policy)(nil), (*audit.Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Policy_To_audit_Policy(a.(*Policy), b.(*audit.Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Policy)(nil), (*Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Policy_To_v1alpha1_Policy(a.(*audit.Policy), b.(*Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyList)(nil), (*audit.PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_PolicyList_To_audit_PolicyList(a.(*PolicyList), b.(*audit.PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyList)(nil), (*PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyList_To_v1alpha1_PolicyList(a.(*audit.PolicyList), b.(*PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyRule)(nil), (*audit.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_PolicyRule_To_audit_PolicyRule(a.(*PolicyRule), b.(*audit.PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyRule)(nil), (*PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyRule_To_v1alpha1_PolicyRule(a.(*audit.PolicyRule), b.(*PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*audit.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Event_To_v1alpha1_Event(a.(*audit.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*audit.ObjectReference)(nil), (*ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_ObjectReference_To_v1alpha1_ObjectReference(a.(*audit.ObjectReference), b.(*ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Event)(nil), (*audit.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Event_To_audit_Event(a.(*Event), b.(*audit.Event), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*ObjectReference)(nil), (*audit.ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ObjectReference_To_audit_ObjectReference(a.(*ObjectReference), b.(*audit.ObjectReference), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1alpha1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { @@ -70,6 +145,7 @@ func autoConvert_v1alpha1_Event_To_audit_Event(in *Event, out *audit.Event, s co } out.ImpersonatedUser = (*audit.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent if in.ObjectRef != nil { in, out := &in.ObjectRef, &out.ObjectRef *out = new(audit.ObjectReference) @@ -98,8 +174,9 @@ func autoConvert_audit_Event_To_v1alpha1_Event(in *audit.Event, out *Event, s co if err := s.Convert(&in.User, &out.User, 0); err != nil { return err } - out.ImpersonatedUser = (*authentication_v1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.ImpersonatedUser = (*authenticationv1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent if in.ObjectRef != nil { in, out := &in.ObjectRef, &out.ObjectRef *out = new(ObjectReference) diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.deepcopy.go index 59088067c..1926b6205 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 import ( v1 "k8s.io/api/authentication/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -35,12 +35,8 @@ func (in *Event) DeepCopyInto(out *Event) { in.User.DeepCopyInto(&out.User) if in.ImpersonatedUser != nil { in, out := &in.ImpersonatedUser, &out.ImpersonatedUser - if *in == nil { - *out = nil - } else { - *out = new(v1.UserInfo) - (*in).DeepCopyInto(*out) - } + *out = new(v1.UserInfo) + (*in).DeepCopyInto(*out) } if in.SourceIPs != nil { in, out := &in.SourceIPs, &out.SourceIPs @@ -49,39 +45,23 @@ func (in *Event) DeepCopyInto(out *Event) { } if in.ObjectRef != nil { in, out := &in.ObjectRef, &out.ObjectRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + *out = new(ObjectReference) + **out = **in } if in.ResponseStatus != nil { in, out := &in.ResponseStatus, &out.ResponseStatus - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Status) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.Status) + (*in).DeepCopyInto(*out) } if in.RequestObject != nil { in, out := &in.RequestObject, &out.RequestObject - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } if in.ResponseObject != nil { in, out := &in.ResponseObject, &out.ResponseObject - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } in.RequestReceivedTimestamp.DeepCopyInto(&out.RequestReceivedTimestamp) in.StageTimestamp.DeepCopyInto(&out.StageTimestamp) @@ -109,9 +89,8 @@ func (in *Event) DeepCopy() *Event { func (in *Event) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -143,9 +122,8 @@ func (in *EventList) DeepCopy() *EventList { func (in *EventList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -224,9 +202,8 @@ func (in *Policy) DeepCopy() *Policy { func (in *Policy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -258,9 +235,8 @@ func (in *PolicyList) DeepCopy() *PolicyList { func (in *PolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.defaults.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.defaults.go index 5e24d22ca..dd621a3ac 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.defaults.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1alpha1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/BUILD b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/BUILD deleted file mode 100644 index 723df6f84..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/BUILD +++ /dev/null @@ -1,66 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "generated.pb.go", - "register.go", - "types.go", - "zz_generated.conversion.go", - "zz_generated.deepcopy.go", - "zz_generated.defaults.go", - ], - importpath = "k8s.io/apiserver/pkg/apis/audit/v1beta1", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) - -filegroup( - name = "go_default_library_protos", - srcs = ["generated.proto"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["conversion_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/apis/audit/v1beta1", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - ], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.pb.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.pb.go index 5cfab75fa..53d25d9c3 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.pb.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.pb.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -266,6 +266,12 @@ func (m *Event) MarshalTo(dAtA []byte) (int, error) { i += copy(dAtA[i:], v) } } + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserAgent))) + i += copy(dAtA[i:], m.UserAgent) return i, nil } @@ -708,6 +714,8 @@ func (m *Event) Size() (n int) { n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) } } + l = len(m.UserAgent) + n += 2 + l + sovGenerated(uint64(l)) return n } @@ -896,6 +904,7 @@ func (this *Event) String() string { `RequestReceivedTimestamp:` + strings.Replace(strings.Replace(this.RequestReceivedTimestamp.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`, `StageTimestamp:` + strings.Replace(strings.Replace(this.StageTimestamp.String(), "MicroTime", "k8s_io_apimachinery_pkg_apis_meta_v1.MicroTime", 1), `&`, ``, 1) + `,`, `Annotations:` + mapStringForAnnotations + `,`, + `UserAgent:` + fmt.Sprintf("%v", this.UserAgent) + `,`, `}`, }, "") return s @@ -1622,6 +1631,35 @@ func (m *Event) Unmarshal(dAtA []byte) error { m.Annotations[mapkey] = mapvalue } iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserAgent", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + 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 ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserAgent = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2818,86 +2856,85 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1283 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xd6, 0x71, 0x63, 0x8f, 0x1b, 0xc7, 0x9d, 0x56, 0x74, 0x95, 0x83, 0x6d, 0x8c, 0x04, - 0x11, 0xa4, 0xbb, 0x6d, 0x5a, 0x48, 0x84, 0x04, 0x28, 0x56, 0x2b, 0xb0, 0x94, 0x86, 0x68, 0x1c, - 0x57, 0x08, 0x38, 0xb0, 0xb6, 0x5f, 0xec, 0xc5, 0xf6, 0xee, 0x32, 0x33, 0x6b, 0x94, 0x1b, 0x7f, - 0x00, 0x89, 0x3b, 0xff, 0x82, 0x1f, 0x50, 0x71, 0xcc, 0xb1, 0xc7, 0x9e, 0x2c, 0x62, 0xfe, 0x45, - 0x04, 0x12, 0x9a, 0xd9, 0xd9, 0x9d, 0xb5, 0x5d, 0xab, 0x0e, 0x87, 0xde, 0x66, 0xde, 0xfb, 0xbe, - 0xef, 0xbd, 0x79, 0x33, 0xf3, 0x66, 0xd0, 0xc9, 0xe0, 0x80, 0x59, 0xae, 0x6f, 0x0f, 0xc2, 0x36, - 0x50, 0x0f, 0x38, 0x30, 0x7b, 0x0c, 0x5e, 0xd7, 0xa7, 0xb6, 0x72, 0x38, 0x81, 0xcb, 0x80, 0x8e, - 0x81, 0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, 0x01, 0x6d, 0x78, 0x67, - 0xbe, 0x56, 0x12, 0x16, 0x22, 0x15, 0x70, 0x1f, 0x95, 0xdc, 0x51, 0x00, 0x94, 0xf9, 0x9e, 0x38, - 0x2a, 0xc2, 0x63, 0xe6, 0xaf, 0xa5, 0x7a, 0x77, 0x3a, 0xa9, 0x94, 0x1a, 0x73, 0x1a, 0x64, 0x41, - 0x15, 0x7f, 0x84, 0xf2, 0xcc, 0x0f, 0x69, 0x07, 0x1a, 0x27, 0xcc, 0x44, 0xd5, 0xcc, 0x4e, 0xbe, - 0xbe, 0x29, 0x36, 0xad, 0x19, 0x1b, 0x89, 0xf6, 0x63, 0x40, 0x79, 0x5f, 0x9e, 0x2b, 0x02, 0x67, - 0x66, 0x41, 0xe6, 0x73, 0x60, 0xad, 0xd8, 0x53, 0xd4, 0x29, 0x25, 0x70, 0x06, 0x14, 0xbc, 0x0e, - 0x44, 0x61, 0x12, 0x23, 0xd1, 0xca, 0xb8, 0x8f, 0x8a, 0x14, 0x58, 0xe0, 0x7b, 0x0c, 0x9a, 0xdc, - 0xe1, 0x21, 0x33, 0x6f, 0xc9, 0x58, 0xbb, 0xab, 0x9d, 0xbe, 0x88, 0x53, 0xc7, 0xd3, 0x49, 0xa5, - 0x48, 0x66, 0x74, 0xc8, 0x9c, 0x2e, 0x76, 0xd0, 0xa6, 0xda, 0xe1, 0x28, 0x11, 0x73, 0x53, 0x06, - 0xda, 0x59, 0x1a, 0x48, 0xf5, 0x0e, 0xab, 0xe5, 0x0d, 0x3c, 0xff, 0x67, 0xaf, 0x7e, 0x7b, 0x3a, - 0xa9, 0x6c, 0x92, 0xb4, 0x04, 0x99, 0x55, 0xc4, 0x5d, 0xbd, 0x18, 0x15, 0xa3, 0x78, 0xcd, 0x18, - 0x33, 0x0b, 0x51, 0x41, 0xe6, 0x34, 0xf1, 0xaf, 0x06, 0x32, 0x55, 0x5c, 0x02, 0x1d, 0x70, 0xc7, - 0xd0, 0x4d, 0xae, 0x9d, 0xb9, 0x25, 0x03, 0xda, 0xab, 0x55, 0xef, 0x99, 0xdb, 0xa1, 0xbe, 0xbc, - 0xc0, 0x55, 0x75, 0x30, 0x4d, 0xb2, 0x44, 0x98, 0x2c, 0x0d, 0x89, 0x7d, 0x54, 0x94, 0x37, 0x4d, - 0x27, 0x51, 0xfa, 0x7f, 0x49, 0xc4, 0x17, 0xb9, 0xd8, 0x9c, 0x91, 0x23, 0x73, 0xf2, 0x78, 0x8c, - 0x0a, 0x8e, 0xe7, 0xf9, 0x5c, 0xde, 0x04, 0x66, 0xde, 0xae, 0x66, 0x76, 0x0a, 0x7b, 0x5f, 0xac, - 0x7c, 0x38, 0x65, 0x07, 0xb6, 0x0e, 0xb5, 0xc2, 0x53, 0x8f, 0xd3, 0xf3, 0xfa, 0x1d, 0x15, 0xbd, - 0x90, 0xf2, 0x90, 0x74, 0xa0, 0xed, 0xcf, 0x51, 0x69, 0x9e, 0x85, 0x4b, 0x28, 0x33, 0x80, 0x73, - 0xd9, 0xc3, 0xf3, 0x44, 0x0c, 0xf1, 0x5d, 0x94, 0x1d, 0x3b, 0xc3, 0x10, 0xa2, 0xc6, 0x4b, 0xa2, - 0xc9, 0xa7, 0x37, 0x0e, 0x8c, 0xda, 0x0b, 0x03, 0xe5, 0x65, 0xf0, 0x23, 0x97, 0x71, 0xfc, 0xfd, - 0xc2, 0x13, 0x60, 0xad, 0x56, 0x30, 0xc1, 0x96, 0x0f, 0x40, 0x49, 0x65, 0x9c, 0x8b, 0x2d, 0xa9, - 0xf6, 0xdf, 0x44, 0x59, 0x97, 0xc3, 0x88, 0x99, 0x37, 0x64, 0x75, 0xac, 0xeb, 0x55, 0xa7, 0xbe, - 0x19, 0xf7, 0xd4, 0x86, 0x10, 0x21, 0x91, 0x56, 0xed, 0x77, 0x03, 0x15, 0xbf, 0xa4, 0x7e, 0x18, - 0x10, 0x88, 0x1a, 0x05, 0xc3, 0xef, 0xa1, 0x6c, 0x4f, 0x58, 0xa2, 0x0a, 0x68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xd6, 0xef, 0x5f, 0x5c, - 0x96, 0xd7, 0x5e, 0x5e, 0x96, 0xd7, 0x5e, 0x5d, 0x96, 0xd7, 0x7e, 0x99, 0x96, 0x8d, 0x8b, 0x69, - 0xd9, 0x78, 0x39, 0x2d, 0x1b, 0xaf, 0xa6, 0x65, 0xe3, 0xaf, 0x69, 0xd9, 0xf8, 0xed, 0xef, 0xf2, - 0xda, 0xb7, 0x1b, 0xaa, 0x06, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xf6, 0x8d, 0xaa, 0xac, - 0x0e, 0x00, 0x00, + // 1278 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xd6, 0x71, 0x63, 0x8f, 0x1b, 0xc7, 0x9d, 0x56, 0x74, 0x95, 0x83, 0x6d, 0x8c, 0x04, + 0x11, 0xa4, 0xbb, 0x4d, 0x28, 0x24, 0x42, 0x02, 0x64, 0xab, 0x15, 0x58, 0x4a, 0x43, 0x34, 0x8e, + 0x2b, 0x04, 0x1c, 0x58, 0xdb, 0x2f, 0xf6, 0x62, 0x7b, 0x77, 0xd9, 0x99, 0x35, 0xca, 0x8d, 0x2f, + 0x80, 0xc4, 0x9d, 0xcf, 0xc0, 0x85, 0x0f, 0x50, 0x71, 0xcc, 0xb1, 0xc7, 0x9e, 0x2c, 0x62, 0xbe, + 0x45, 0x24, 0x24, 0x34, 0x7f, 0x76, 0x67, 0xed, 0xd4, 0xc2, 0xe1, 0xd0, 0xdb, 0xce, 0x7b, 0xbf, + 0xf7, 0x7b, 0x6f, 0xde, 0xbe, 0x3f, 0x83, 0x4e, 0x86, 0x87, 0xd4, 0x72, 0x7d, 0x7b, 0x18, 0x75, + 0x20, 0xf4, 0x80, 0x01, 0xb5, 0x27, 0xe0, 0xf5, 0xfc, 0xd0, 0x56, 0x0a, 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, 0x5a, 0x46, 0x12, 0x56, 0xbc, 0x8b, 0xb2, 0x23, 0x98, 0xc0, 0xc8, 0xbc, 0x55, + 0x35, 0x76, 0xf2, 0x8d, 0xb7, 0x14, 0x38, 0x7b, 0xc4, 0x85, 0x57, 0xf1, 0x07, 0x91, 0x20, 0xfc, + 0x2d, 0xca, 0xf3, 0xc0, 0x29, 0x73, 0xc6, 0x81, 0x99, 0x11, 0x01, 0xbd, 0xbf, 0x5a, 0x40, 0xa7, + 0xee, 0x18, 0x1a, 0x77, 0x15, 0x7b, 0xfe, 0x34, 0x26, 0x21, 0x9a, 0x0f, 0x1f, 0xa3, 0x0d, 0x51, + 0x03, 0xcd, 0x27, 0xe6, 0xba, 0x08, 0xe6, 0xb1, 0x82, 0x6f, 0xd4, 0xa5, 0xf8, 0x6a, 0x5a, 0x79, + 0x7b, 0x59, 0x4a, 0xd9, 0x79, 0x00, 0xd4, 0x6a, 0x37, 0x9f, 0x90, 0x98, 0x84, 0x5f, 0x8d, 0x32, + 0xa7, 0x0f, 0x66, 0x76, 0xfe, 0x6a, 0x2d, 0x2e, 0xbc, 0x8a, 0x3f, 0x88, 0x04, 0xe1, 0x7d, 0x84, + 0x42, 0xf8, 0x31, 0x02, 0xca, 0xda, 0xa4, 0x69, 0xde, 0x16, 0x26, 0x49, 0xea, 0x48, 0xa2, 0x21, + 0x29, 0x14, 0xae, 0xa2, 0xf5, 0x09, 0x84, 0x1d, 0x73, 0x43, 0xa0, 0xef, 0x28, 0xf4, 0xfa, 0x73, + 0x08, 0x3b, 0x44, 0x68, 0xf0, 0x97, 0x68, 0x3d, 0xa2, 0x10, 0x9a, 0x39, 0x91, 0xab, 0x77, 0x53, + 0xb9, 0xb2, 0xe6, 0xcb, 0x94, 0xe7, 0xa8, 0x4d, 0x21, 0x6c, 0x7a, 0x67, 0xbe, 0x66, 0xe2, 0x12, + 0x22, 0x18, 0xf0, 0x00, 0x95, 0xdc, 0x71, 0x00, 0x21, 0xf5, 0x3d, 0x5e, 0x2a, 0x5c, 0x63, 0xe6, + 0x6f, 0xc4, 0x7a, 0x7f, 0x36, 0xad, 0x94, 0x9a, 0x0b, 0x1c, 0xe4, 0x1a, 0x2b, 0xfe, 0x00, 0xe5, + 0xa9, 0x1f, 0x85, 0x5d, 0x68, 0x9e, 0x50, 0x13, 0x55, 0x33, 0x3b, 0xf9, 0xc6, 0x26, 0xff, 0x69, + 0xad, 0x58, 0x48, 0xb4, 0x1e, 0x03, 0xca, 0xfb, 0xa2, 0xae, 0x08, 0x9c, 0x99, 0x05, 0x11, 0xcf, + 0xa1, 0xb5, 0x62, 0x93, 0xab, 0x2a, 0x25, 0x70, 0x06, 0x21, 0x78, 0x5d, 0x90, 0x6e, 0x12, 0x21, + 0xd1, 0xcc, 0x78, 0x80, 0x8a, 0x21, 0xd0, 0xc0, 0xf7, 0x28, 0xb4, 0x98, 0xc3, 0x22, 0x6a, 0xde, + 0x11, 0xbe, 0x76, 0x57, 0xab, 0x3e, 0x69, 0xd3, 0xc0, 0xb3, 0x69, 0xa5, 0x48, 0xe6, 0x78, 0xc8, + 0x02, 0x2f, 0x76, 0xd0, 0xa6, 0xfa, 0xc3, 0x32, 0x10, 0x73, 0x53, 0x38, 0xda, 0x59, 0xea, 0x48, + 0x35, 0xb3, 0xd5, 0xf6, 0x86, 0x9e, 0xff, 0x93, 0xd7, 0xb8, 0x3b, 0x9b, 0x56, 0x36, 0x49, 0x9a, + 0x82, 0xcc, 0x33, 0xe2, 0x9e, 0xbe, 0x8c, 0xf2, 0x51, 0xbc, 0xa1, 0x8f, 0xb9, 0x8b, 0x28, 0x27, + 0x0b, 0x9c, 0xf8, 0x17, 0x03, 0x99, 0xca, 0x2f, 0x81, 0x2e, 0xb8, 0x13, 0xe8, 0x25, 0x6d, 0x67, + 0x6e, 0x09, 0x87, 0xf6, 0x6a, 0xd9, 0x7b, 0xe6, 0x76, 0x43, 0x5f, 0x34, 0x70, 0x55, 0x15, 0xa6, + 0x49, 0x96, 0x10, 0x93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 0xdb, 0x49, 0x98, 0xd4, 0xf1, + 0x49, 0x15, 0xc6, 0x16, 0x22, 0x20, 0x35, 0xa9, 0x12, 0x1a, 0xa2, 0xf5, 0xf8, 0x80, 0x37, 0xb6, + 0x3c, 0x1c, 0x3b, 0x63, 0xa0, 0x66, 0x46, 0x18, 0xa8, 0x76, 0x4d, 0x29, 0xc8, 0x3c, 0xae, 0xf6, + 0x47, 0x06, 0x6d, 0x2d, 0x4c, 0x2a, 0xbc, 0x8b, 0x72, 0x31, 0x48, 0x45, 0x98, 0x24, 0x2d, 0xe6, + 0x22, 0x09, 0x82, 0x57, 0x84, 0xc7, 0xa9, 0x02, 0xa7, 0xab, 0x7e, 0x9f, 0xae, 0x88, 0xe3, 0x58, + 0x41, 0x34, 0x86, 0x2f, 0x16, 0x7e, 0x10, 0x2b, 0x36, 0xb5, 0x58, 0x38, 0x96, 0x08, 0x0d, 0x6e, + 0xa0, 0x4c, 0xe4, 0xf6, 0xd4, 0xa2, 0x7c, 0xa4, 0x00, 0x99, 0xf6, 0xaa, 0x4b, 0x92, 0x1b, 0xf3, + 0x4b, 0x38, 0x81, 0x2b, 0x32, 0xaa, 0x76, 0x64, 0x72, 0x89, 0xfa, 0x49, 0x53, 0x66, 0x3a, 0x41, + 0xf0, 0x05, 0xe9, 0x04, 0xee, 0x73, 0x08, 0xa9, 0xeb, 0x7b, 0x8b, 0x0b, 0xb2, 0x7e, 0xd2, 0x54, + 0x1a, 0x92, 0x42, 0xe1, 0x3a, 0xda, 0x8a, 0x93, 0x10, 0x1b, 0xca, 0x5d, 0xf9, 0x40, 0x19, 0x6e, + 0x91, 0x79, 0x35, 0x59, 0xc4, 0xe3, 0x8f, 0x50, 0x81, 0x46, 0x9d, 0x24, 0xd9, 0x39, 0x61, 0x9e, + 0x34, 0x61, 0x4b, 0xab, 0x48, 0x1a, 0x57, 0xfb, 0xc7, 0x40, 0xb7, 0x4f, 0xfc, 0x91, 0xdb, 0x3d, + 0x7f, 0x03, 0x8f, 0xa8, 0xaf, 0x51, 0x36, 0x8c, 0x46, 0x10, 0x37, 0xc5, 0x87, 0x2b, 0x37, 0x85, + 0x8c, 0x90, 0x44, 0x23, 0xd0, 0x15, 0xce, 0x4f, 0x94, 0x48, 0x42, 0x7c, 0x80, 0x90, 0x3f, 0x76, + 0x99, 0x98, 0x74, 0x71, 0xc5, 0x3e, 0x10, 0x71, 0x24, 0x52, 0xfd, 0x92, 0x49, 0x41, 0x6b, 0x7f, + 0x1a, 0x08, 0x49, 0xf6, 0x37, 0x30, 0x14, 0x4e, 0xe7, 0x87, 0x82, 0x7d, 0xc3, 0xfb, 0x2f, 0x99, + 0x0a, 0x2f, 0x32, 0xf1, 0x15, 0x78, 0x4a, 0xf4, 0x4b, 0xd5, 0x58, 0xe5, 0xa5, 0x5a, 0x41, 0x59, + 0x3e, 0x60, 0xe3, 0xb1, 0x90, 0xe7, 0x48, 0x3e, 0x7c, 0x29, 0x91, 0x72, 0x6c, 0x21, 0xc4, 0x3f, + 0x44, 0x6d, 0xc7, 0x99, 0x2d, 0xf2, 0xcc, 0xb6, 0x13, 0x29, 0x49, 0x21, 0x38, 0x21, 0x7f, 0xd1, + 0x51, 0x73, 0x5d, 0x13, 0xf2, 0x87, 0x1e, 0x25, 0x52, 0x8e, 0x07, 0xe9, 0x61, 0x94, 0x15, 0x89, + 0x38, 0x58, 0x39, 0x11, 0xf3, 0xd3, 0x4f, 0x4f, 0x87, 0xd7, 0x4e, 0x32, 0x0b, 0xa1, 0x64, 0x54, + 0x50, 0xf3, 0xb6, 0x0e, 0x3d, 0x99, 0x25, 0x94, 0xa4, 0x10, 0xf8, 0x53, 0xb4, 0xe5, 0xf9, 0x5e, + 0x4c, 0xd5, 0x26, 0x47, 0xd4, 0xdc, 0x10, 0x46, 0xf7, 0x78, 0x07, 0x1e, 0xcf, 0xab, 0xc8, 0x22, + 0x76, 0xa1, 0x06, 0x73, 0x2b, 0xd7, 0x60, 0xe3, 0xe1, 0xc5, 0x65, 0x79, 0xed, 0xe5, 0x65, 0x79, + 0xed, 0xd5, 0x65, 0x79, 0xed, 0xe7, 0x59, 0xd9, 0xb8, 0x98, 0x95, 0x8d, 0x97, 0xb3, 0xb2, 0xf1, + 0x6a, 0x56, 0x36, 0xfe, 0x9a, 0x95, 0x8d, 0x5f, 0xff, 0x2e, 0xaf, 0x7d, 0xb3, 0xa1, 0x72, 0xf0, + 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xe5, 0x7c, 0x52, 0x6e, 0x0e, 0x00, 0x00, } diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto index 07642a108..2ea4c6a60 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,8 +25,6 @@ import "k8s.io/api/authentication/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; -import "k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto"; // Package-wide variables from generator "generated". option go_package = "v1beta1"; @@ -70,6 +68,11 @@ message Event { // +optional repeated string sourceIPs = 10; + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + optional string userAgent = 18; + // Object reference this request is targeted at. // Does not apply for List-type requests, or non-resource requests. // +optional @@ -104,9 +107,10 @@ message Event { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional map annotations = 17; } @@ -126,10 +130,19 @@ message GroupResources { // +optional optional string group = 1; - // Resources is a list of resources within the API group. Subresources are - // matched using a "/" to indicate the subresource. For example, "pods/log" - // would match request to the log subresource of pods. The top level resource - // does not match subresources, "pods" doesn't match "pods/log". + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. // +optional repeated string resources = 2; diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go index 9f855968a..0317cf6ec 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go @@ -101,6 +101,10 @@ type Event struct { // Source IPs, from where the request originated and intermediate proxies. // +optional SourceIPs []string `json:"sourceIPs,omitempty" protobuf:"bytes,10,rep,name=sourceIPs"` + // UserAgent records the user agent string reported by the client. + // Note that the UserAgent is provided by the client, and must not be trusted. + // +optional + UserAgent string `json:"userAgent,omitempty" protobuf:"bytes,18,opt,name=userAgent"` // Object reference this request is targeted at. // Does not apply for List-type requests, or non-resource requests. // +optional @@ -131,9 +135,10 @@ type Event struct { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"` } @@ -237,10 +242,19 @@ type GroupResources struct { // The empty string represents the core API group. // +optional Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` - // Resources is a list of resources within the API group. Subresources are - // matched using a "/" to indicate the subresource. For example, "pods/log" - // would match request to the log subresource of pods. The top level resource - // does not match subresources, "pods" doesn't match "pods/log". + // Resources is a list of resources this rule applies to. + // + // For example: + // 'pods' matches pods. + // 'pods/log' matches the log subresource of pods. + // '*' matches all resources and their subresources. + // 'pods/*' matches all subresources of pods. + // '*/scale' matches all scale subresources. + // + // If wildcard is present, the validation rule will ensure resources do not + // overlap with each other. + // + // An empty list implies all resources and subresources in this API groups apply. // +optional Resources []string `json:"resources,omitempty" protobuf:"bytes,2,rep,name=resources"` // ResourceNames is a list of resource instance names that the policy matches. diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.conversion.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.conversion.go index 0360f807b..ca16088cf 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.conversion.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,14 +16,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1beta1 import ( unsafe "unsafe" - authentication_v1 "k8s.io/api/authentication/v1" + authenticationv1 "k8s.io/api/authentication/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" @@ -37,23 +37,88 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1beta1_Event_To_audit_Event, - Convert_audit_Event_To_v1beta1_Event, - Convert_v1beta1_EventList_To_audit_EventList, - Convert_audit_EventList_To_v1beta1_EventList, - Convert_v1beta1_GroupResources_To_audit_GroupResources, - Convert_audit_GroupResources_To_v1beta1_GroupResources, - Convert_v1beta1_ObjectReference_To_audit_ObjectReference, - Convert_audit_ObjectReference_To_v1beta1_ObjectReference, - Convert_v1beta1_Policy_To_audit_Policy, - Convert_audit_Policy_To_v1beta1_Policy, - Convert_v1beta1_PolicyList_To_audit_PolicyList, - Convert_audit_PolicyList_To_v1beta1_PolicyList, - Convert_v1beta1_PolicyRule_To_audit_PolicyRule, - Convert_audit_PolicyRule_To_v1beta1_PolicyRule, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*Event)(nil), (*audit.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Event_To_audit_Event(a.(*Event), b.(*audit.Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Event_To_v1beta1_Event(a.(*audit.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*EventList)(nil), (*audit.EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_EventList_To_audit_EventList(a.(*EventList), b.(*audit.EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.EventList)(nil), (*EventList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_EventList_To_v1beta1_EventList(a.(*audit.EventList), b.(*EventList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*GroupResources)(nil), (*audit.GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_GroupResources_To_audit_GroupResources(a.(*GroupResources), b.(*audit.GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.GroupResources)(nil), (*GroupResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_GroupResources_To_v1beta1_GroupResources(a.(*audit.GroupResources), b.(*GroupResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ObjectReference)(nil), (*audit.ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ObjectReference_To_audit_ObjectReference(a.(*ObjectReference), b.(*audit.ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.ObjectReference)(nil), (*ObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_ObjectReference_To_v1beta1_ObjectReference(a.(*audit.ObjectReference), b.(*ObjectReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Policy)(nil), (*audit.Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Policy_To_audit_Policy(a.(*Policy), b.(*audit.Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.Policy)(nil), (*Policy)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Policy_To_v1beta1_Policy(a.(*audit.Policy), b.(*Policy), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyList)(nil), (*audit.PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PolicyList_To_audit_PolicyList(a.(*PolicyList), b.(*audit.PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyList)(nil), (*PolicyList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyList_To_v1beta1_PolicyList(a.(*audit.PolicyList), b.(*PolicyList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*PolicyRule)(nil), (*audit.PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_PolicyRule_To_audit_PolicyRule(a.(*PolicyRule), b.(*audit.PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*audit.PolicyRule)(nil), (*PolicyRule)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_PolicyRule_To_v1beta1_PolicyRule(a.(*audit.PolicyRule), b.(*PolicyRule), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*audit.Event)(nil), (*Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_audit_Event_To_v1beta1_Event(a.(*audit.Event), b.(*Event), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*Event)(nil), (*audit.Event)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Event_To_audit_Event(a.(*Event), b.(*audit.Event), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1beta1_Event_To_audit_Event(in *Event, out *audit.Event, s conversion.Scope) error { @@ -70,6 +135,7 @@ func autoConvert_v1beta1_Event_To_audit_Event(in *Event, out *audit.Event, s con } out.ImpersonatedUser = (*audit.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent out.ObjectRef = (*audit.ObjectReference)(unsafe.Pointer(in.ObjectRef)) out.ResponseStatus = (*v1.Status)(unsafe.Pointer(in.ResponseStatus)) out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) @@ -90,8 +156,9 @@ func autoConvert_audit_Event_To_v1beta1_Event(in *audit.Event, out *Event, s con if err := s.Convert(&in.User, &out.User, 0); err != nil { return err } - out.ImpersonatedUser = (*authentication_v1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) + out.ImpersonatedUser = (*authenticationv1.UserInfo)(unsafe.Pointer(in.ImpersonatedUser)) out.SourceIPs = *(*[]string)(unsafe.Pointer(&in.SourceIPs)) + out.UserAgent = in.UserAgent out.ObjectRef = (*ObjectReference)(unsafe.Pointer(in.ObjectRef)) out.ResponseStatus = (*v1.Status)(unsafe.Pointer(in.ResponseStatus)) out.RequestObject = (*runtime.Unknown)(unsafe.Pointer(in.RequestObject)) diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.deepcopy.go index 26fe89e5d..e8f7adffd 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,13 +16,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( v1 "k8s.io/api/authentication/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -35,12 +35,8 @@ func (in *Event) DeepCopyInto(out *Event) { in.User.DeepCopyInto(&out.User) if in.ImpersonatedUser != nil { in, out := &in.ImpersonatedUser, &out.ImpersonatedUser - if *in == nil { - *out = nil - } else { - *out = new(v1.UserInfo) - (*in).DeepCopyInto(*out) - } + *out = new(v1.UserInfo) + (*in).DeepCopyInto(*out) } if in.SourceIPs != nil { in, out := &in.SourceIPs, &out.SourceIPs @@ -49,39 +45,23 @@ func (in *Event) DeepCopyInto(out *Event) { } if in.ObjectRef != nil { in, out := &in.ObjectRef, &out.ObjectRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + *out = new(ObjectReference) + **out = **in } if in.ResponseStatus != nil { in, out := &in.ResponseStatus, &out.ResponseStatus - if *in == nil { - *out = nil - } else { - *out = new(meta_v1.Status) - (*in).DeepCopyInto(*out) - } + *out = new(metav1.Status) + (*in).DeepCopyInto(*out) } if in.RequestObject != nil { in, out := &in.RequestObject, &out.RequestObject - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } if in.ResponseObject != nil { in, out := &in.ResponseObject, &out.ResponseObject - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } in.RequestReceivedTimestamp.DeepCopyInto(&out.RequestReceivedTimestamp) in.StageTimestamp.DeepCopyInto(&out.StageTimestamp) @@ -109,9 +89,8 @@ func (in *Event) DeepCopy() *Event { func (in *Event) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -143,9 +122,8 @@ func (in *EventList) DeepCopy() *EventList { func (in *EventList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -224,9 +202,8 @@ func (in *Policy) DeepCopy() *Policy { func (in *Policy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -258,9 +235,8 @@ func (in *PolicyList) DeepCopy() *PolicyList { func (in *PolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.defaults.go b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.defaults.go index b61dda74c..73e63fc11 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.defaults.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/v1beta1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/validation/BUILD b/deps/k8s.io/apiserver/pkg/apis/audit/validation/BUILD deleted file mode 100644 index 60740ace0..000000000 --- a/deps/k8s.io/apiserver/pkg/apis/audit/validation/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["validation_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/apis/audit/validation", - deps = ["//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["validation.go"], - importpath = "k8s.io/apiserver/pkg/apis/audit/validation", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/apis/audit/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/apis/audit/zz_generated.deepcopy.go index 937a7a11b..70093df22 100644 --- a/deps/k8s.io/apiserver/pkg/apis/audit/zz_generated.deepcopy.go +++ b/deps/k8s.io/apiserver/pkg/apis/audit/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package audit @@ -32,12 +32,8 @@ func (in *Event) DeepCopyInto(out *Event) { in.User.DeepCopyInto(&out.User) if in.ImpersonatedUser != nil { in, out := &in.ImpersonatedUser, &out.ImpersonatedUser - if *in == nil { - *out = nil - } else { - *out = new(UserInfo) - (*in).DeepCopyInto(*out) - } + *out = new(UserInfo) + (*in).DeepCopyInto(*out) } if in.SourceIPs != nil { in, out := &in.SourceIPs, &out.SourceIPs @@ -46,39 +42,23 @@ func (in *Event) DeepCopyInto(out *Event) { } if in.ObjectRef != nil { in, out := &in.ObjectRef, &out.ObjectRef - if *in == nil { - *out = nil - } else { - *out = new(ObjectReference) - **out = **in - } + *out = new(ObjectReference) + **out = **in } if in.ResponseStatus != nil { in, out := &in.ResponseStatus, &out.ResponseStatus - if *in == nil { - *out = nil - } else { - *out = new(v1.Status) - (*in).DeepCopyInto(*out) - } + *out = new(v1.Status) + (*in).DeepCopyInto(*out) } if in.RequestObject != nil { in, out := &in.RequestObject, &out.RequestObject - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } if in.ResponseObject != nil { in, out := &in.ResponseObject, &out.ResponseObject - if *in == nil { - *out = nil - } else { - *out = new(runtime.Unknown) - (*in).DeepCopyInto(*out) - } + *out = new(runtime.Unknown) + (*in).DeepCopyInto(*out) } in.RequestReceivedTimestamp.DeepCopyInto(&out.RequestReceivedTimestamp) in.StageTimestamp.DeepCopyInto(&out.StageTimestamp) @@ -106,9 +86,8 @@ func (in *Event) DeepCopy() *Event { func (in *Event) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -140,9 +119,28 @@ func (in *EventList) DeepCopy() *EventList { func (in *EventList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ExtraValue) DeepCopyInto(out *ExtraValue) { + { + in := &in + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. +func (in ExtraValue) DeepCopy() ExtraValue { + if in == nil { return nil } + out := new(ExtraValue) + in.DeepCopyInto(out) + return *out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -221,9 +219,8 @@ func (in *Policy) DeepCopy() *Policy { func (in *Policy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -255,9 +252,8 @@ func (in *PolicyList) DeepCopy() *PolicyList { func (in *PolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -325,8 +321,15 @@ func (in *UserInfo) DeepCopyInto(out *UserInfo) { in, out := &in.Extra, &out.Extra *out = make(map[string]ExtraValue, len(*in)) for key, val := range *in { - (*out)[key] = make(ExtraValue, len(val)) - copy((*out)[key], val) + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(ExtraValue, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal } } return diff --git a/deps/k8s.io/apiserver/pkg/audit/BUILD b/deps/k8s.io/apiserver/pkg/audit/BUILD deleted file mode 100644 index 7ec6cea18..000000000 --- a/deps/k8s.io/apiserver/pkg/audit/BUILD +++ /dev/null @@ -1,68 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "format.go", - "metrics.go", - "request.go", - "scheme.go", - "types.go", - "union.go", - ], - importpath = "k8s.io/apiserver/pkg/audit", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "request_test.go", - "union_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/audit", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/audit/policy:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/audit/policy/BUILD b/deps/k8s.io/apiserver/pkg/audit/policy/BUILD deleted file mode 100644 index 0873ac995..000000000 --- a/deps/k8s.io/apiserver/pkg/audit/policy/BUILD +++ /dev/null @@ -1,58 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "checker_test.go", - "reader_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/audit/policy", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/plugin/pkg/audit/webhook:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "checker.go", - "reader.go", - ], - importpath = "k8s.io/apiserver/pkg/audit/policy", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/validation:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/audit/policy/checker.go b/deps/k8s.io/apiserver/pkg/audit/policy/checker.go index 3259013ad..41c6b1a49 100644 --- a/deps/k8s.io/apiserver/pkg/audit/policy/checker.go +++ b/deps/k8s.io/apiserver/pkg/audit/policy/checker.go @@ -76,14 +76,18 @@ func (p *policyChecker) LevelAndStages(attrs authorizer.Attributes) (audit.Level // Check whether the rule matches the request attrs. func ruleMatches(r *audit.PolicyRule, attrs authorizer.Attributes) bool { - if len(r.Users) > 0 && attrs.GetUser() != nil { - if !hasString(r.Users, attrs.GetUser().GetName()) { + user := attrs.GetUser() + if len(r.Users) > 0 { + if user == nil || !hasString(r.Users, user.GetName()) { return false } } - if len(r.UserGroups) > 0 && attrs.GetUser() != nil { + if len(r.UserGroups) > 0 { + if user == nil { + return false + } matched := false - for _, group := range attrs.GetUser().GetGroups() { + for _, group := range user.GetGroups() { if hasString(r.UserGroups, group) { matched = true break @@ -160,11 +164,11 @@ func ruleMatchesResource(r *audit.PolicyRule, attrs authorizer.Attributes) bool apiGroup := attrs.GetAPIGroup() resource := attrs.GetResource() + subresource := attrs.GetSubresource() + combinedResource := resource // If subresource, the resource in the policy must match "(resource)/(subresource)" - // - // TODO: consider adding options like "pods/*" to match all subresources. - if sr := attrs.GetSubresource(); sr != "" { - resource = resource + "/" + sr + if subresource != "" { + combinedResource = resource + "/" + subresource } name := attrs.GetName() @@ -175,8 +179,17 @@ func ruleMatchesResource(r *audit.PolicyRule, attrs authorizer.Attributes) bool return true } for _, res := range gr.Resources { - if res == resource { - if len(gr.ResourceNames) == 0 || hasString(gr.ResourceNames, name) { + if len(gr.ResourceNames) == 0 || hasString(gr.ResourceNames, name) { + // match "*" + if res == combinedResource || res == "*" { + return true + } + // match "*/subresource" + if len(subresource) > 0 && strings.HasPrefix(res, "*/") && subresource == strings.TrimLeft(res, "*/") { + return true + } + // match "resource/*" + if strings.HasSuffix(res, "/*") && resource == strings.TrimRight(res, "/*") { return true } } diff --git a/deps/k8s.io/apiserver/pkg/audit/policy/reader.go b/deps/k8s.io/apiserver/pkg/audit/policy/reader.go index 1d02e1a3f..d582cda88 100644 --- a/deps/k8s.io/apiserver/pkg/audit/policy/reader.go +++ b/deps/k8s.io/apiserver/pkg/audit/policy/reader.go @@ -22,6 +22,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" auditinternal "k8s.io/apiserver/pkg/apis/audit" + auditv1 "k8s.io/apiserver/pkg/apis/audit/v1" auditv1alpha1 "k8s.io/apiserver/pkg/apis/audit/v1alpha1" auditv1beta1 "k8s.io/apiserver/pkg/apis/audit/v1beta1" "k8s.io/apiserver/pkg/apis/audit/validation" @@ -34,6 +35,7 @@ var ( apiGroupVersions = []schema.GroupVersion{ auditv1beta1.SchemeGroupVersion, auditv1alpha1.SchemeGroupVersion, + auditv1.SchemeGroupVersion, } apiGroupVersionSet = map[schema.GroupVersion]bool{} ) diff --git a/deps/k8s.io/apiserver/pkg/audit/request.go b/deps/k8s.io/apiserver/pkg/audit/request.go index d42feccfc..9593b6c8a 100644 --- a/deps/k8s.io/apiserver/pkg/audit/request.go +++ b/deps/k8s.io/apiserver/pkg/audit/request.go @@ -37,15 +37,20 @@ import ( "k8s.io/apiserver/pkg/authorization/authorizer" ) +const ( + maxUserAgentLength = 1024 + userAgentTruncateSuffix = "...TRUNCATED" +) + func NewEventFromRequest(req *http.Request, level auditinternal.Level, attribs authorizer.Attributes) (*auditinternal.Event, error) { ev := &auditinternal.Event{ RequestReceivedTimestamp: metav1.NewMicroTime(time.Now()), Verb: attribs.GetVerb(), RequestURI: req.URL.RequestURI(), + UserAgent: maybeTruncateUserAgent(req), + Level: level, } - ev.Level = level - // prefer the id from the headers. If not available, create a new one. // TODO(audit): do we want to forbid the header for non-front-proxy users? ids := req.Header.Get(auditinternal.HeaderAuditID) @@ -127,7 +132,6 @@ func LogRequestObject(ae *auditinternal.Event, obj runtime.Object, gvr schema.Gr ae.ObjectRef.ResourceVersion = meta.GetResourceVersion() } } - // TODO: ObjectRef should include the API group. if len(ae.ObjectRef.APIVersion) == 0 { ae.ObjectRef.APIGroup = gvr.Group ae.ObjectRef.APIVersion = gvr.Version @@ -153,7 +157,7 @@ func LogRequestObject(ae *auditinternal.Event, obj runtime.Object, gvr schema.Gr } } -// LogRquestPatch fills in the given patch as the request object into an audit event. +// LogRequestPatch fills in the given patch as the request object into an audit event. func LogRequestPatch(ae *auditinternal.Event, patch []byte) { if ae == nil || ae.Level.Less(auditinternal.LevelRequest) { return @@ -172,7 +176,12 @@ func LogResponseObject(ae *auditinternal.Event, obj runtime.Object, gv schema.Gr return } if status, ok := obj.(*metav1.Status); ok { - ae.ResponseStatus = status + // selectively copy the bounded fields. + ae.ResponseStatus = &metav1.Status{ + Status: status.Status, + Reason: status.Reason, + Code: status.Code, + } } if ae.Level.Less(auditinternal.LevelRequestResponse) { @@ -229,3 +238,13 @@ func LogAnnotations(ae *auditinternal.Event, annotations map[string]string) { LogAnnotation(ae, key, value) } } + +// truncate User-Agent if too long, otherwise return it directly. +func maybeTruncateUserAgent(req *http.Request) string { + ua := req.UserAgent() + if len(ua) > maxUserAgentLength { + ua = ua[:maxUserAgentLength] + userAgentTruncateSuffix + } + + return ua +} diff --git a/deps/k8s.io/apiserver/pkg/audit/scheme.go b/deps/k8s.io/apiserver/pkg/audit/scheme.go index 61c32f526..d72e394ec 100644 --- a/deps/k8s.io/apiserver/pkg/audit/scheme.go +++ b/deps/k8s.io/apiserver/pkg/audit/scheme.go @@ -18,10 +18,12 @@ limitations under the License. package audit import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apiserver/pkg/apis/audit/v1" "k8s.io/apiserver/pkg/apis/audit/v1alpha1" "k8s.io/apiserver/pkg/apis/audit/v1beta1" ) @@ -30,7 +32,8 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - v1alpha1.AddToScheme(Scheme) - v1beta1.AddToScheme(Scheme) + metav1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(v1.AddToScheme(Scheme)) + utilruntime.Must(v1alpha1.AddToScheme(Scheme)) + utilruntime.Must(v1beta1.AddToScheme(Scheme)) } diff --git a/deps/k8s.io/apiserver/pkg/audit/types.go b/deps/k8s.io/apiserver/pkg/audit/types.go index f1b7cef54..dbf03b0f5 100644 --- a/deps/k8s.io/apiserver/pkg/audit/types.go +++ b/deps/k8s.io/apiserver/pkg/audit/types.go @@ -39,4 +39,7 @@ type Backend interface { // events are delivered. It can be assumed that this method is called after // the stopCh channel passed to the Run method has been closed. Shutdown() + + // Returns the backend PluginName. + String() string } diff --git a/deps/k8s.io/apiserver/pkg/audit/union.go b/deps/k8s.io/apiserver/pkg/audit/union.go index 856b5c125..6ee441533 100644 --- a/deps/k8s.io/apiserver/pkg/audit/union.go +++ b/deps/k8s.io/apiserver/pkg/audit/union.go @@ -17,6 +17,9 @@ limitations under the License. package audit import ( + "fmt" + "strings" + "k8s.io/apimachinery/pkg/util/errors" auditinternal "k8s.io/apiserver/pkg/apis/audit" ) @@ -55,3 +58,11 @@ func (u union) Shutdown() { backend.Shutdown() } } + +func (u union) String() string { + var backendStrings []string + for _, backend := range u.backends { + backendStrings = append(backendStrings, fmt.Sprintf("%s", backend)) + } + return fmt.Sprintf("union[%s]", strings.Join(backendStrings, ",")) +} diff --git a/deps/k8s.io/apiserver/pkg/authentication/authenticator/BUILD b/deps/k8s.io/apiserver/pkg/authentication/authenticator/BUILD deleted file mode 100644 index 268bb29f1..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/authenticator/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interfaces.go"], - importpath = "k8s.io/apiserver/pkg/authentication/authenticator", - deps = ["//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/authenticatorfactory/BUILD b/deps/k8s.io/apiserver/pkg/authentication/authenticatorfactory/BUILD deleted file mode 100644 index 7782bf5d3..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/authenticatorfactory/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "delegating.go", - "loopback.go", - "requestheader.go", - ], - importpath = "k8s.io/apiserver/pkg/authentication/authenticatorfactory", - deps = [ - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/group:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/anonymous:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/bearertoken:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/headerrequest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/union:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/websocket:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/x509:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/token/tokenfile:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/group/BUILD b/deps/k8s.io/apiserver/pkg/authentication/group/BUILD deleted file mode 100644 index cdb74e4e4..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/group/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "group_adder_test.go", - "token_group_adder_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/group", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "authenticated_group_adder.go", - "group_adder.go", - "token_group_adder.go", - ], - importpath = "k8s.io/apiserver/pkg/authentication/group", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/anonymous/BUILD b/deps/k8s.io/apiserver/pkg/authentication/request/anonymous/BUILD deleted file mode 100644 index 78165e4f4..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/request/anonymous/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["anonymous_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/request/anonymous", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["anonymous.go"], - importpath = "k8s.io/apiserver/pkg/authentication/request/anonymous", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/bearertoken/BUILD b/deps/k8s.io/apiserver/pkg/authentication/request/bearertoken/BUILD deleted file mode 100644 index b338a0c78..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/request/bearertoken/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["bearertoken_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/request/bearertoken", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["bearertoken.go"], - importpath = "k8s.io/apiserver/pkg/authentication/request/bearertoken", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD b/deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD deleted file mode 100644 index 351b1b645..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["requestheader_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/request/headerrequest", - deps = ["//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["requestheader.go"], - importpath = "k8s.io/apiserver/pkg/authentication/request/headerrequest", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/x509:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go b/deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go index 38f132b58..948478b80 100644 --- a/deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go +++ b/deps/k8s.io/apiserver/pkg/authentication/request/headerrequest/requestheader.go @@ -21,6 +21,7 @@ import ( "fmt" "io/ioutil" "net/http" + "net/url" "strings" "k8s.io/apimachinery/pkg/util/sets" @@ -160,6 +161,14 @@ func allHeaderValues(h http.Header, headerNames []string) []string { return ret } +func unescapeExtraKey(encodedKey string) string { + key, err := url.PathUnescape(encodedKey) // Decode %-encoded bytes. + if err != nil { + return encodedKey // Always record extra strings, even if malformed/unencoded. + } + return key +} + func newExtra(h http.Header, headerPrefixes []string) map[string][]string { ret := map[string][]string{} @@ -170,7 +179,7 @@ func newExtra(h http.Header, headerPrefixes []string) map[string][]string { continue } - extraKey := strings.ToLower(headerName[len(prefix):]) + extraKey := unescapeExtraKey(strings.ToLower(headerName[len(prefix):])) ret[extraKey] = append(ret[extraKey], vv...) } } diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/union/BUILD b/deps/k8s.io/apiserver/pkg/authentication/request/union/BUILD deleted file mode 100644 index ce7c9bb50..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/request/union/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["unionauth_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/request/union", - deps = ["//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["union.go"], - importpath = "k8s.io/apiserver/pkg/authentication/request/union", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/websocket/BUILD b/deps/k8s.io/apiserver/pkg/authentication/request/websocket/BUILD deleted file mode 100644 index bab858295..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/request/websocket/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["protocol.go"], - importpath = "k8s.io/apiserver/pkg/authentication/request/websocket", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/wsstream:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["protocol_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/request/websocket", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/x509/BUILD b/deps/k8s.io/apiserver/pkg/authentication/request/x509/BUILD deleted file mode 100644 index 4297b8c4e..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/request/x509/BUILD +++ /dev/null @@ -1,55 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["x509_test.go"], - data = [ - "testdata/client-expired.pem", - "testdata/client-valid.pem", - "testdata/intermediate.pem", - "testdata/root.pem", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/request/x509", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "x509.go", - ], - importpath = "k8s.io/apiserver/pkg/authentication/request/x509", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/request/x509/x509.go b/deps/k8s.io/apiserver/pkg/authentication/request/x509/x509.go index 708a89e9e..c98d7ff68 100644 --- a/deps/k8s.io/apiserver/pkg/authentication/request/x509/x509.go +++ b/deps/k8s.io/apiserver/pkg/authentication/request/x509/x509.go @@ -19,7 +19,6 @@ package x509 import ( "crypto/x509" "crypto/x509/pkix" - "encoding/asn1" "fmt" "net/http" "time" @@ -191,25 +190,3 @@ var CommonNameUserConversion = UserConversionFunc(func(chain []*x509.Certificate Groups: chain[0].Subject.Organization, }, true, nil }) - -// DNSNameUserConversion builds user info from a certificate chain using the first DNSName on the certificate -var DNSNameUserConversion = UserConversionFunc(func(chain []*x509.Certificate) (user.Info, bool, error) { - if len(chain[0].DNSNames) == 0 { - return nil, false, nil - } - return &user.DefaultInfo{Name: chain[0].DNSNames[0]}, true, nil -}) - -// EmailAddressUserConversion builds user info from a certificate chain using the first EmailAddress on the certificate -var EmailAddressUserConversion = UserConversionFunc(func(chain []*x509.Certificate) (user.Info, bool, error) { - var emailAddressOID asn1.ObjectIdentifier = []int{1, 2, 840, 113549, 1, 9, 1} - if len(chain[0].EmailAddresses) == 0 { - for _, name := range chain[0].Subject.Names { - if name.Type.Equal(emailAddressOID) { - return &user.DefaultInfo{Name: name.Value.(string)}, true, nil - } - } - return nil, false, nil - } - return &user.DefaultInfo{Name: chain[0].EmailAddresses[0]}, true, nil -}) diff --git a/deps/k8s.io/apiserver/pkg/authentication/serviceaccount/BUILD b/deps/k8s.io/apiserver/pkg/authentication/serviceaccount/BUILD deleted file mode 100644 index 21dc23720..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/serviceaccount/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["util_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/serviceaccount", -) - -go_library( - name = "go_default_library", - srcs = ["util.go"], - importpath = "k8s.io/apiserver/pkg/authentication/serviceaccount", - deps = ["//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD b/deps/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD deleted file mode 100644 index 6b2233591..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/token/tokenfile/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["tokenfile_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authentication/token/tokenfile", - deps = ["//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["tokenfile.go"], - importpath = "k8s.io/apiserver/pkg/authentication/token/tokenfile", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authentication/user/BUILD b/deps/k8s.io/apiserver/pkg/authentication/user/BUILD deleted file mode 100644 index f22095c25..000000000 --- a/deps/k8s.io/apiserver/pkg/authentication/user/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "user.go", - ], - importpath = "k8s.io/apiserver/pkg/authentication/user", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authorization/authorizer/BUILD b/deps/k8s.io/apiserver/pkg/authorization/authorizer/BUILD deleted file mode 100644 index 2a7508f4d..000000000 --- a/deps/k8s.io/apiserver/pkg/authorization/authorizer/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interfaces.go", - "rule.go", - ], - importpath = "k8s.io/apiserver/pkg/authorization/authorizer", - deps = ["//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/BUILD b/deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/BUILD deleted file mode 100644 index 660c4daac..000000000 --- a/deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["builtin_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authorization/authorizerfactory", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "builtin.go", - "delegating.go", - ], - importpath = "k8s.io/apiserver/pkg/authorization/authorizerfactory", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/plugin/pkg/authorizer/webhook:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go b/deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go index 25b5aa989..c75c0a755 100644 --- a/deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go +++ b/deps/k8s.io/apiserver/pkg/authorization/authorizerfactory/delegating.go @@ -20,9 +20,8 @@ import ( "time" "k8s.io/apiserver/pkg/authorization/authorizer" - authorizationclient "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" - "k8s.io/apiserver/plugin/pkg/authorizer/webhook" + authorizationclient "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" ) // DelegatingAuthorizerConfig is the minimal configuration needed to create an authenticator diff --git a/deps/k8s.io/apiserver/pkg/authorization/path/doc.go b/deps/k8s.io/apiserver/pkg/authorization/path/doc.go new file mode 100644 index 000000000..743d945b4 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/authorization/path/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package path contains an authorizer that allows certain paths and path prefixes. +package path diff --git a/deps/k8s.io/apiserver/pkg/authorization/path/path.go b/deps/k8s.io/apiserver/pkg/authorization/path/path.go new file mode 100644 index 000000000..03f524b38 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/authorization/path/path.go @@ -0,0 +1,67 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package path + +import ( + "fmt" + "strings" + + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/authorization/authorizer" +) + +// NewAuthorizer returns an authorizer which accepts a given set of paths. +// Each path is either a fully matching path or it ends in * in case a prefix match is done. A leading / is optional. +func NewAuthorizer(alwaysAllowPaths []string) (authorizer.Authorizer, error) { + var prefixes []string + paths := sets.NewString() + for _, p := range alwaysAllowPaths { + p = strings.TrimPrefix(p, "/") + if len(p) == 0 { + // matches "/" + paths.Insert(p) + continue + } + if strings.ContainsRune(p[:len(p)-1], '*') { + return nil, fmt.Errorf("only trailing * allowed in %q", p) + } + if strings.HasSuffix(p, "*") { + prefixes = append(prefixes, p[:len(p)-1]) + } else { + paths.Insert(p) + } + } + + return authorizer.AuthorizerFunc(func(a authorizer.Attributes) (authorizer.Decision, string, error) { + if a.IsResourceRequest() { + return authorizer.DecisionNoOpinion, "", nil + } + + pth := strings.TrimPrefix(a.GetPath(), "/") + if paths.Has(pth) { + return authorizer.DecisionAllow, "", nil + } + + for _, prefix := range prefixes { + if strings.HasPrefix(pth, prefix) { + return authorizer.DecisionAllow, "", nil + } + } + + return authorizer.DecisionNoOpinion, "", nil + }), nil +} diff --git a/deps/k8s.io/apiserver/pkg/authorization/union/BUILD b/deps/k8s.io/apiserver/pkg/authorization/union/BUILD deleted file mode 100644 index 84f5aac64..000000000 --- a/deps/k8s.io/apiserver/pkg/authorization/union/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["union_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/authorization/union", - deps = [ - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["union.go"], - importpath = "k8s.io/apiserver/pkg/authorization/union", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/BUILD deleted file mode 100644 index f2a8e3cff..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/BUILD +++ /dev/null @@ -1,108 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "apiserver_test.go", - "audit_test.go", - "installer_test.go", - "proxy_test.go", - "watch_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints", - deps = [ - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/golang.org/x/net/websocket:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing/fuzzer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/fuzzer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit/policy:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/testing:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/filters:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "groupversion.go", - "installer.go", - ], - importpath = "k8s.io/apiserver/pkg/endpoints", - deps = [ - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/negotiation:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/filters:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/discovery:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/filters:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/metrics:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/openapi:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/request:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/testing:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/discovery/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/discovery/BUILD deleted file mode 100644 index d3d120092..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/discovery/BUILD +++ /dev/null @@ -1,64 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "addresses_test.go", - "root_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/discovery", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "addresses.go", - "group.go", - "legacy.go", - "root.go", - "util.go", - "version.go", - ], - importpath = "k8s.io/apiserver/pkg/endpoints/discovery", - deps = [ - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/negotiation:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/discovery/group.go b/deps/k8s.io/apiserver/pkg/endpoints/discovery/group.go index ea47a1046..02330e9f3 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/discovery/group.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/discovery/group.go @@ -17,7 +17,6 @@ limitations under the License. package discovery import ( - "errors" "net/http" "github.com/emicklei/go-restful" @@ -27,18 +26,16 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" ) // APIGroupHandler creates a webservice serving the supported versions, preferred version, and name // of a group. E.g., such a web service will be registered at /apis/extensions. type APIGroupHandler struct { - serializer runtime.NegotiatedSerializer - contextMapper request.RequestContextMapper - group metav1.APIGroup + serializer runtime.NegotiatedSerializer + group metav1.APIGroup } -func NewAPIGroupHandler(serializer runtime.NegotiatedSerializer, group metav1.APIGroup, contextMapper request.RequestContextMapper) *APIGroupHandler { +func NewAPIGroupHandler(serializer runtime.NegotiatedSerializer, group metav1.APIGroup) *APIGroupHandler { if keepUnversioned(group.Name) { // Because in release 1.1, /apis/extensions returns response with empty // APIVersion, we use stripVersionNegotiatedSerializer to keep the @@ -47,9 +44,8 @@ func NewAPIGroupHandler(serializer runtime.NegotiatedSerializer, group metav1.AP } return &APIGroupHandler{ - serializer: serializer, - contextMapper: contextMapper, - group: group, + serializer: serializer, + group: group, } } @@ -73,10 +69,5 @@ func (s *APIGroupHandler) handle(req *restful.Request, resp *restful.Response) { } func (s *APIGroupHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - ctx, ok := s.contextMapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, errors.New("no context found for request")) - return - } - responsewriters.WriteObjectNegotiated(ctx, s.serializer, schema.GroupVersion{}, w, req, http.StatusOK, &s.group) + responsewriters.WriteObjectNegotiated(s.serializer, schema.GroupVersion{}, w, req, http.StatusOK, &s.group) } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/discovery/legacy.go b/deps/k8s.io/apiserver/pkg/endpoints/discovery/legacy.go index 3a98e6320..837cd0130 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/discovery/legacy.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/discovery/legacy.go @@ -17,7 +17,6 @@ limitations under the License. package discovery import ( - "errors" "net/http" "github.com/emicklei/go-restful" @@ -28,31 +27,26 @@ import ( utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" ) // legacyRootAPIHandler creates a webservice serving api group discovery. type legacyRootAPIHandler struct { // addresses is used to build cluster IPs for discovery. - addresses Addresses - apiPrefix string - serializer runtime.NegotiatedSerializer - apiVersions []string - contextMapper request.RequestContextMapper + addresses Addresses + apiPrefix string + serializer runtime.NegotiatedSerializer } -func NewLegacyRootAPIHandler(addresses Addresses, serializer runtime.NegotiatedSerializer, apiPrefix string, apiVersions []string, contextMapper request.RequestContextMapper) *legacyRootAPIHandler { +func NewLegacyRootAPIHandler(addresses Addresses, serializer runtime.NegotiatedSerializer, apiPrefix string) *legacyRootAPIHandler { // Because in release 1.1, /apis returns response with empty APIVersion, we // use stripVersionNegotiatedSerializer to keep the response backwards // compatible. serializer = stripVersionNegotiatedSerializer{serializer} return &legacyRootAPIHandler{ - addresses: addresses, - apiPrefix: apiPrefix, - serializer: serializer, - apiVersions: apiVersions, - contextMapper: contextMapper, + addresses: addresses, + apiPrefix: apiPrefix, + serializer: serializer, } } @@ -72,17 +66,11 @@ func (s *legacyRootAPIHandler) WebService() *restful.WebService { } func (s *legacyRootAPIHandler) handle(req *restful.Request, resp *restful.Response) { - ctx, ok := s.contextMapper.Get(req.Request) - if !ok { - responsewriters.InternalError(resp.ResponseWriter, req.Request, errors.New("no context found for request")) - return - } - clientIP := utilnet.GetClientIP(req.Request) apiVersions := &metav1.APIVersions{ ServerAddressByClientCIDRs: s.addresses.ServerAddressByClientCIDRs(clientIP), - Versions: s.apiVersions, + Versions: []string{"v1"}, } - responsewriters.WriteObjectNegotiated(ctx, s.serializer, schema.GroupVersion{}, resp.ResponseWriter, req.Request, http.StatusOK, apiVersions) + responsewriters.WriteObjectNegotiated(s.serializer, schema.GroupVersion{}, resp.ResponseWriter, req.Request, http.StatusOK, apiVersions) } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/discovery/root.go b/deps/k8s.io/apiserver/pkg/endpoints/discovery/root.go index c1a8ecf65..7ed64a9f5 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/discovery/root.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/discovery/root.go @@ -17,7 +17,6 @@ limitations under the License. package discovery import ( - "errors" "net/http" "sync" @@ -29,7 +28,6 @@ import ( utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" ) // GroupManager is an interface that allows dynamic mutation of the existing webservice to handle @@ -48,8 +46,7 @@ type rootAPIsHandler struct { // addresses is used to build cluster IPs for discovery. addresses Addresses - serializer runtime.NegotiatedSerializer - contextMapper request.RequestContextMapper + serializer runtime.NegotiatedSerializer // Map storing information about all groups to be exposed in discovery response. // The map is from name to the group. @@ -59,17 +56,16 @@ type rootAPIsHandler struct { apiGroupNames []string } -func NewRootAPIsHandler(addresses Addresses, serializer runtime.NegotiatedSerializer, contextMapper request.RequestContextMapper) *rootAPIsHandler { +func NewRootAPIsHandler(addresses Addresses, serializer runtime.NegotiatedSerializer) *rootAPIsHandler { // Because in release 1.1, /apis returns response with empty APIVersion, we // use stripVersionNegotiatedSerializer to keep the response backwards // compatible. serializer = stripVersionNegotiatedSerializer{serializer} return &rootAPIsHandler{ - addresses: addresses, - serializer: serializer, - apiGroups: map[string]metav1.APIGroup{}, - contextMapper: contextMapper, + addresses: addresses, + serializer: serializer, + apiGroups: map[string]metav1.APIGroup{}, } } @@ -99,12 +95,6 @@ func (s *rootAPIsHandler) RemoveGroup(groupName string) { } func (s *rootAPIsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) { - ctx, ok := s.contextMapper.Get(req) - if !ok { - responsewriters.InternalError(resp, req, errors.New("no context found for request")) - return - } - s.lock.RLock() defer s.lock.RUnlock() @@ -121,7 +111,7 @@ func (s *rootAPIsHandler) ServeHTTP(resp http.ResponseWriter, req *http.Request) groups[i].ServerAddressByClientCIDRs = serverCIDR } - responsewriters.WriteObjectNegotiated(ctx, s.serializer, schema.GroupVersion{}, resp, req, http.StatusOK, &metav1.APIGroupList{Groups: groups}) + responsewriters.WriteObjectNegotiated(s.serializer, schema.GroupVersion{}, resp, req, http.StatusOK, &metav1.APIGroupList{Groups: groups}) } func (s *rootAPIsHandler) restfulHandle(req *restful.Request, resp *restful.Response) { diff --git a/deps/k8s.io/apiserver/pkg/endpoints/discovery/version.go b/deps/k8s.io/apiserver/pkg/endpoints/discovery/version.go index a6bd99998..aadfc7a5b 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/discovery/version.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/discovery/version.go @@ -17,7 +17,6 @@ limitations under the License. package discovery import ( - "errors" "net/http" restful "github.com/emicklei/go-restful" @@ -27,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" ) type APIResourceLister interface { @@ -43,14 +41,13 @@ func (f APIResourceListerFunc) ListAPIResources() []metav1.APIResource { // APIVersionHandler creates a webservice serving the supported resources for the version // E.g., such a web service will be registered at /apis/extensions/v1beta1. type APIVersionHandler struct { - serializer runtime.NegotiatedSerializer - contextMapper request.RequestContextMapper + serializer runtime.NegotiatedSerializer groupVersion schema.GroupVersion apiResourceLister APIResourceLister } -func NewAPIVersionHandler(serializer runtime.NegotiatedSerializer, groupVersion schema.GroupVersion, apiResourceLister APIResourceLister, contextMapper request.RequestContextMapper) *APIVersionHandler { +func NewAPIVersionHandler(serializer runtime.NegotiatedSerializer, groupVersion schema.GroupVersion, apiResourceLister APIResourceLister) *APIVersionHandler { if keepUnversioned(groupVersion.Group) { // Because in release 1.1, /apis/extensions returns response with empty // APIVersion, we use stripVersionNegotiatedSerializer to keep the @@ -62,7 +59,6 @@ func NewAPIVersionHandler(serializer runtime.NegotiatedSerializer, groupVersion serializer: serializer, groupVersion: groupVersion, apiResourceLister: apiResourceLister, - contextMapper: contextMapper, } } @@ -82,12 +78,6 @@ func (s *APIVersionHandler) handle(req *restful.Request, resp *restful.Response) } func (s *APIVersionHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - ctx, ok := s.contextMapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, errors.New("no context found for request")) - return - } - - responsewriters.WriteObjectNegotiated(ctx, s.serializer, schema.GroupVersion{}, w, req, http.StatusOK, + responsewriters.WriteObjectNegotiated(s.serializer, schema.GroupVersion{}, w, req, http.StatusOK, &metav1.APIResourceList{GroupVersion: s.groupVersion.String(), APIResources: s.apiResourceLister.ListAPIResources()}) } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/filters/BUILD deleted file mode 100644 index 0e64044e6..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/BUILD +++ /dev/null @@ -1,91 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "audit_test.go", - "authentication_test.go", - "authn_audit_test.go", - "authorization_test.go", - "impersonation_test.go", - "legacy_audit_test.go", - "requestinfo_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/filters", - deps = [ - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit/policy:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "audit.go", - "authentication.go", - "authn_audit.go", - "authorization.go", - "doc.go", - "impersonation.go", - "legacy_audit.go", - "requestinfo.go", - ], - importpath = "k8s.io/apiserver/pkg/endpoints/filters", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit/policy:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/serviceaccount:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/httplog:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/audit.go b/deps/k8s.io/apiserver/pkg/endpoints/filters/audit.go index 6b72bfb32..494634107 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/audit.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/filters/audit.go @@ -38,17 +38,18 @@ import ( // requests coming to the server. Audit level is decided according to requests' // attributes and audit policy. Logs are emitted to the audit sink to // process events. If sink or audit policy is nil, no decoration takes place. -func WithAudit(handler http.Handler, requestContextMapper request.RequestContextMapper, sink audit.Sink, policy policy.Checker, longRunningCheck request.LongRunningRequestCheck) http.Handler { +func WithAudit(handler http.Handler, sink audit.Sink, policy policy.Checker, longRunningCheck request.LongRunningRequestCheck) http.Handler { if sink == nil || policy == nil { return handler } return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - ctx, ev, omitStages, err := createAuditEventAndAttachToContext(requestContextMapper, req, policy) + req, ev, omitStages, err := createAuditEventAndAttachToContext(req, policy) if err != nil { utilruntime.HandleError(fmt.Errorf("failed to create audit event: %v", err)) responsewriters.InternalError(w, req, errors.New("failed to create audit event")) return } + ctx := req.Context() if ev == nil || ctx == nil { handler.ServeHTTP(w, req) return @@ -111,35 +112,29 @@ func WithAudit(handler http.Handler, requestContextMapper request.RequestContext // - context with audit event attached to it // - created audit event // - error if anything bad happened -func createAuditEventAndAttachToContext(requestContextMapper request.RequestContextMapper, req *http.Request, policy policy.Checker) (request.Context, *auditinternal.Event, []auditinternal.Stage, error) { - ctx, ok := requestContextMapper.Get(req) - if !ok { - return nil, nil, nil, fmt.Errorf("no context found for request") - } +func createAuditEventAndAttachToContext(req *http.Request, policy policy.Checker) (*http.Request, *auditinternal.Event, []auditinternal.Stage, error) { + ctx := req.Context() attribs, err := GetAuthorizerAttributes(ctx) if err != nil { - return nil, nil, nil, fmt.Errorf("failed to GetAuthorizerAttributes: %v", err) + return req, nil, nil, fmt.Errorf("failed to GetAuthorizerAttributes: %v", err) } level, omitStages := policy.LevelAndStages(attribs) audit.ObservePolicyLevel(level) if level == auditinternal.LevelNone { // Don't audit. - return nil, nil, nil, nil + return req, nil, nil, nil } ev, err := audit.NewEventFromRequest(req, level, attribs) if err != nil { - return nil, nil, nil, fmt.Errorf("failed to complete audit event from request: %v", err) + return req, nil, nil, fmt.Errorf("failed to complete audit event from request: %v", err) } - ctx = request.WithAuditEvent(ctx, ev) - if err := requestContextMapper.Update(req, ctx); err != nil { - return nil, nil, nil, fmt.Errorf("failed to attach audit event to context: %v", err) - } + req = req.WithContext(request.WithAuditEvent(ctx, ev)) - return ctx, ev, omitStages, nil + return req, ev, omitStages, nil } func processAuditEvent(sink audit.Sink, ev *auditinternal.Event, omitStages []auditinternal.Stage) { diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/authentication.go b/deps/k8s.io/apiserver/pkg/endpoints/filters/authentication.go index d07bab317..ba53fc609 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/authentication.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/filters/authentication.go @@ -50,47 +50,38 @@ func init() { // stores any such user found onto the provided context for the request. If authentication fails or returns an error // the failed handler is used. On success, "Authorization" header is removed from the request and handler // is invoked to serve the request. -func WithAuthentication(handler http.Handler, mapper genericapirequest.RequestContextMapper, auth authenticator.Request, failed http.Handler) http.Handler { +func WithAuthentication(handler http.Handler, auth authenticator.Request, failed http.Handler) http.Handler { if auth == nil { glog.Warningf("Authentication is disabled") return handler } - return genericapirequest.WithRequestContext( - http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - user, ok, err := auth.AuthenticateRequest(req) - if err != nil || !ok { - if err != nil { - glog.Errorf("Unable to authenticate the request due to an error: %v", err) - } - failed.ServeHTTP(w, req) - return + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + user, ok, err := auth.AuthenticateRequest(req) + if err != nil || !ok { + if err != nil { + glog.Errorf("Unable to authenticate the request due to an error: %v", err) } + failed.ServeHTTP(w, req) + return + } - // authorization header is not required anymore in case of a successful authentication. - req.Header.Del("Authorization") + // authorization header is not required anymore in case of a successful authentication. + req.Header.Del("Authorization") - if ctx, ok := mapper.Get(req); ok { - mapper.Update(req, genericapirequest.WithUser(ctx, user)) - } + req = req.WithContext(genericapirequest.WithUser(req.Context(), user)) - authenticatedUserCounter.WithLabelValues(compressUsername(user.GetName())).Inc() + authenticatedUserCounter.WithLabelValues(compressUsername(user.GetName())).Inc() - handler.ServeHTTP(w, req) - }), - mapper, - ) + handler.ServeHTTP(w, req) + }) } -func Unauthorized(requestContextMapper genericapirequest.RequestContextMapper, s runtime.NegotiatedSerializer, supportsBasicAuth bool) http.Handler { +func Unauthorized(s runtime.NegotiatedSerializer, supportsBasicAuth bool) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { if supportsBasicAuth { w.Header().Set("WWW-Authenticate", `Basic realm="kubernetes-master"`) } - ctx, ok := requestContextMapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, errors.New("no context found for request")) - return - } + ctx := req.Context() requestInfo, found := genericapirequest.RequestInfoFrom(ctx) if !found { responsewriters.InternalError(w, req, errors.New("no RequestInfo found in the context")) @@ -98,7 +89,7 @@ func Unauthorized(requestContextMapper genericapirequest.RequestContextMapper, s } gv := schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion} - responsewriters.ErrorNegotiated(ctx, apierrors.NewUnauthorized("Unauthorized"), s, gv, w, req) + responsewriters.ErrorNegotiated(apierrors.NewUnauthorized("Unauthorized"), s, gv, w, req) }) } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/authn_audit.go b/deps/k8s.io/apiserver/pkg/endpoints/filters/authn_audit.go index 86aca9872..09d7db8cc 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/authn_audit.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/filters/authn_audit.go @@ -28,17 +28,16 @@ import ( "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/audit/policy" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" ) // WithFailedAuthenticationAudit decorates a failed http.Handler used in WithAuthentication handler. // It is meant to log only failed authentication requests. -func WithFailedAuthenticationAudit(failedHandler http.Handler, requestContextMapper request.RequestContextMapper, sink audit.Sink, policy policy.Checker) http.Handler { +func WithFailedAuthenticationAudit(failedHandler http.Handler, sink audit.Sink, policy policy.Checker) http.Handler { if sink == nil || policy == nil { return failedHandler } return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - _, ev, omitStages, err := createAuditEventAndAttachToContext(requestContextMapper, req, policy) + req, ev, omitStages, err := createAuditEventAndAttachToContext(req, policy) if err != nil { utilruntime.HandleError(fmt.Errorf("failed to create audit event: %v", err)) responsewriters.InternalError(w, req, errors.New("failed to create audit event")) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/authorization.go b/deps/k8s.io/apiserver/pkg/endpoints/filters/authorization.go index b4610dfce..998c05bcf 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/authorization.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/filters/authorization.go @@ -17,29 +17,39 @@ limitations under the License. package filters import ( + "context" "errors" "net/http" "github.com/golang/glog" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" "k8s.io/apiserver/pkg/endpoints/request" ) +const ( + // Annotation key names set in advanced audit + decisionAnnotationKey = "authorization.k8s.io/decision" + reasonAnnotationKey = "authorization.k8s.io/reason" + + // Annotation values set in advanced audit + decisionAllow = "allow" + decisionForbid = "forbid" + reasonError = "internal error" +) + // WithAuthorizationCheck passes all authorized requests on to handler, and returns a forbidden error otherwise. -func WithAuthorization(handler http.Handler, requestContextMapper request.RequestContextMapper, a authorizer.Authorizer, s runtime.NegotiatedSerializer) http.Handler { +func WithAuthorization(handler http.Handler, a authorizer.Authorizer, s runtime.NegotiatedSerializer) http.Handler { if a == nil { glog.Warningf("Authorization is disabled") return handler } return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - ctx, ok := requestContextMapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, errors.New("no context found for request")) - return - } + ctx := req.Context() + ae := request.AuditEventFrom(ctx) attributes, err := GetAuthorizerAttributes(ctx) if err != nil { @@ -49,20 +59,25 @@ func WithAuthorization(handler http.Handler, requestContextMapper request.Reques authorized, reason, err := a.Authorize(attributes) // an authorizer like RBAC could encounter evaluation errors and still allow the request, so authorizer decision is checked before error here. if authorized == authorizer.DecisionAllow { + audit.LogAnnotation(ae, decisionAnnotationKey, decisionAllow) + audit.LogAnnotation(ae, reasonAnnotationKey, reason) handler.ServeHTTP(w, req) return } if err != nil { + audit.LogAnnotation(ae, reasonAnnotationKey, reasonError) responsewriters.InternalError(w, req, err) return } glog.V(4).Infof("Forbidden: %#v, Reason: %q", req.RequestURI, reason) - responsewriters.Forbidden(ctx, attributes, w, req, reason, s) + audit.LogAnnotation(ae, decisionAnnotationKey, decisionForbid) + audit.LogAnnotation(ae, reasonAnnotationKey, reason) + responsewriters.Forbidden(ctx, attributes, w, req, "", s) }) } -func GetAuthorizerAttributes(ctx request.Context) (authorizer.Attributes, error) { +func GetAuthorizerAttributes(ctx context.Context) (authorizer.Attributes, error) { attribs := authorizer.AttributesRecord{} user, ok := request.UserFrom(ctx) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go b/deps/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go index 9af292e1c..38414a6af 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go @@ -20,6 +20,7 @@ import ( "errors" "fmt" "net/http" + "net/url" "strings" "github.com/golang/glog" @@ -37,7 +38,7 @@ import ( ) // WithImpersonation is a filter that will inspect and check requests that attempt to change the user.Info for their requests -func WithImpersonation(handler http.Handler, requestContextMapper request.RequestContextMapper, a authorizer.Authorizer, s runtime.NegotiatedSerializer) http.Handler { +func WithImpersonation(handler http.Handler, a authorizer.Authorizer, s runtime.NegotiatedSerializer) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { impersonationRequests, err := buildImpersonationRequests(req.Header) if err != nil { @@ -50,11 +51,7 @@ func WithImpersonation(handler http.Handler, requestContextMapper request.Reques return } - ctx, exists := requestContextMapper.Get(req) - if !exists { - responsewriters.InternalError(w, req, errors.New("no context found for request")) - return - } + ctx := req.Context() requestor, exists := request.UserFrom(ctx) if !exists { responsewriters.InternalError(w, req, errors.New("no user found for request")) @@ -113,7 +110,7 @@ func WithImpersonation(handler http.Handler, requestContextMapper request.Reques decision, reason, err := a.Authorize(actingAsAttributes) if err != nil || decision != authorizer.DecisionAllow { glog.V(4).Infof("Forbidden: %#v, Reason: %s, Error: %v", req.RequestURI, reason, err) - responsewriters.Forbidden(ctx, actingAsAttributes, w, req, reason, s) + responsewriters.Forbidden(ctx, actingAsAttributes, w, req, "", s) return } } @@ -129,7 +126,7 @@ func WithImpersonation(handler http.Handler, requestContextMapper request.Reques Groups: groups, Extra: userExtra, } - requestContextMapper.Update(req, request.WithUser(ctx, newUser)) + req = req.WithContext(request.WithUser(ctx, newUser)) oldUser, _ := request.UserFrom(ctx) httplog.LogOf(req, w).Addf("%v is acting as %v", oldUser, newUser) @@ -150,6 +147,14 @@ func WithImpersonation(handler http.Handler, requestContextMapper request.Reques }) } +func unescapeExtraKey(encodedKey string) string { + key, err := url.PathUnescape(encodedKey) // Decode %-encoded bytes. + if err != nil { + return encodedKey // Always record extra strings, even if malformed/unencoded. + } + return key +} + // buildImpersonationRequests returns a list of objectreferences that represent the different things we're requesting to impersonate. // Also includes a map[string][]string representing user.Info.Extra // Each request must be authorized against the current user before switching contexts. @@ -179,7 +184,7 @@ func buildImpersonationRequests(headers http.Header) ([]v1.ObjectReference, erro } hasUserExtra = true - extraKey := strings.ToLower(headerName[len(authenticationv1.ImpersonateUserExtraHeaderPrefix):]) + extraKey := unescapeExtraKey(strings.ToLower(headerName[len(authenticationv1.ImpersonateUserExtraHeaderPrefix):])) // make a separate request for each extra value they're trying to set for _, value := range values { diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/legacy_audit.go b/deps/k8s.io/apiserver/pkg/endpoints/filters/legacy_audit.go index 983b8822a..bdf13c58e 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/legacy_audit.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/filters/legacy_audit.go @@ -18,7 +18,6 @@ package filters import ( "bufio" - "errors" "fmt" "io" "net" @@ -32,7 +31,6 @@ import ( authenticationapi "k8s.io/api/authentication/v1" utilnet "k8s.io/apimachinery/pkg/util/net" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" ) var _ http.ResponseWriter = &legacyAuditResponseWriter{} @@ -96,16 +94,12 @@ var _ http.Hijacker = &fancyLegacyResponseWriterDelegator{} // 2. the response line containing: // - the unique id from 1 // - response code -func WithLegacyAudit(handler http.Handler, requestContextMapper request.RequestContextMapper, out io.Writer) http.Handler { +func WithLegacyAudit(handler http.Handler, out io.Writer) http.Handler { if out == nil { return handler } return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - ctx, ok := requestContextMapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, errors.New("no context found for request")) - return - } + ctx := req.Context() attribs, err := GetAuthorizerAttributes(ctx) if err != nil { responsewriters.InternalError(w, req, err) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/filters/requestinfo.go b/deps/k8s.io/apiserver/pkg/endpoints/filters/requestinfo.go index 4c79a8a28..9cc524d4e 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/filters/requestinfo.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/filters/requestinfo.go @@ -17,7 +17,6 @@ limitations under the License. package filters import ( - "errors" "fmt" "net/http" @@ -26,21 +25,16 @@ import ( ) // WithRequestInfo attaches a RequestInfo to the context. -func WithRequestInfo(handler http.Handler, resolver request.RequestInfoResolver, requestContextMapper request.RequestContextMapper) http.Handler { +func WithRequestInfo(handler http.Handler, resolver request.RequestInfoResolver) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - ctx, ok := requestContextMapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, errors.New("no context found for request")) - return - } - + ctx := req.Context() info, err := resolver.NewRequestInfo(req) if err != nil { responsewriters.InternalError(w, req, fmt.Errorf("failed to create RequestInfo: %v", err)) return } - requestContextMapper.Update(req, request.WithRequestInfo(ctx, info)) + req = req.WithContext(request.WithRequestInfo(ctx, info)) handler.ServeHTTP(w, req) }) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/groupversion.go b/deps/k8s.io/apiserver/pkg/endpoints/groupversion.go index 4b8823758..695c62b59 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/groupversion.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/groupversion.go @@ -22,15 +22,16 @@ import ( "github.com/emicklei/go-restful" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/endpoints/discovery" - "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + openapicommon "k8s.io/kube-openapi/pkg/common" ) // APIGroupVersion is a helper for exposing rest.Storage objects as http.Handlers via go-restful @@ -56,7 +57,8 @@ type APIGroupVersion struct { // version (for when the inevitable meta/v2 group emerges). MetaGroupVersion *schema.GroupVersion - Mapper meta.RESTMapper + // RootScopedKinds are the root scoped kinds for the primary GroupVersion + RootScopedKinds sets.String // Serializer is used to determine how to convert responses from API methods into bytes to send over // the wire. @@ -70,14 +72,21 @@ type APIGroupVersion struct { Linker runtime.SelfLinker UnsafeConvertor runtime.ObjectConvertor - Admit admission.Interface - Context request.RequestContextMapper + // Authorizer determines whether a user is allowed to make a certain request. The Handler does a preliminary + // authorization check using the request URI but it may be necessary to make additional checks, such as in + // the create-on-update case + Authorizer authorizer.Authorizer + + Admit admission.Interface MinRequestTimeout time.Duration // EnableAPIResponseCompression indicates whether API Responses should support compression // if the client requests it via Accept-Encoding EnableAPIResponseCompression bool + + // OpenAPIConfig lets the individual handlers build a subset of the OpenAPI schema before they are installed. + OpenAPIConfig *openapicommon.Config } // InstallREST registers the REST handlers (storage, watch, proxy and redirect) into a restful Container. @@ -93,7 +102,7 @@ func (g *APIGroupVersion) InstallREST(container *restful.Container) error { } apiResources, ws, registrationErrors := installer.Install() - versionDiscoveryHandler := discovery.NewAPIVersionHandler(g.Serializer, g.GroupVersion, staticLister{apiResources}, g.Context) + versionDiscoveryHandler := discovery.NewAPIVersionHandler(g.Serializer, g.GroupVersion, staticLister{apiResources}) versionDiscoveryHandler.AddToWebService(ws) container.Add(ws) return utilerrors.NewAggregate(registrationErrors) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/handlers/BUILD deleted file mode 100644 index f1867bf0e..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/BUILD +++ /dev/null @@ -1,106 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "namer_test.go", - "rest_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/handlers", - deps = [ - "//vendor/github.com/evanphx/json-patch:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/trace:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "create.go", - "delete.go", - "doc.go", - "get.go", - "namer.go", - "patch.go", - "proxy.go", - "response.go", - "rest.go", - "update.go", - "watch.go", - ], - importpath = "k8s.io/apiserver/pkg/endpoints/handlers", - deps = [ - "//vendor/github.com/evanphx/json-patch:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/websocket:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/mergepatch:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/proxy:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/negotiation:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/httplog:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/trace:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/wsstream:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/create.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/create.go index 1d474267d..69006c5bb 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/create.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/create.go @@ -17,13 +17,16 @@ limitations under the License. package handlers import ( + "context" "fmt" "net/http" "time" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/admission" @@ -31,15 +34,21 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) -func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.ObjectTyper, admit admission.Interface, includeName bool) http.HandlerFunc { +func createHandler(r rest.NamedCreater, scope RequestScope, admit admission.Interface, includeName bool) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { // For performance tracking purposes. trace := utiltrace.New("Create " + req.URL.Path) defer trace.LogIfLong(500 * time.Millisecond) + if isDryRun(req.URL) { + scope.err(errors.NewBadRequest("dryRun is not supported yet"), w, req) + return + } + // TODO: we either want to remove timeout or document it (if we document, move timeout out of this function and declare it in api_installer) timeout := parseTimeout(req.URL.Query().Get("timeout")) @@ -57,7 +66,7 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object return } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) gv := scope.Kind.GroupVersion() @@ -74,12 +83,25 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object return } + options := &metav1.CreateOptions{} + values := req.URL.Query() + if err := metainternalversion.ParameterCodec.DecodeParameters(values, scope.MetaGroupVersion, options); err != nil { + err = errors.NewBadRequest(err.Error()) + scope.err(err, w, req) + return + } + if errs := validation.ValidateCreateOptions(options); len(errs) > 0 { + err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "CreateOptions"}, "", errs) + scope.err(err, w, req) + return + } + defaultGVK := scope.Kind original := r.New() trace.Step("About to convert to expected version") obj, gvk, err := decoder.Decode(body, &defaultGVK, original) if err != nil { - err = transformDecodeError(typer, err, original, gvk, body) + err = transformDecodeError(scope.Typer, err, original, gvk, body) scope.err(err, w, req) return } @@ -91,10 +113,11 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object trace.Step("Conversion done") ae := request.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) audit.LogRequestObject(ae, obj, scope.Resource, scope.Subresource, scope.Serializer) userInfo, _ := request.UserFrom(ctx) - admissionAttributes := admission.NewAttributesRecord(obj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, userInfo) + admissionAttributes := admission.NewAttributesRecord(obj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, dryrun.IsDryRun(options.DryRun), userInfo) if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Create) { err = mutatingAdmission.Admit(admissionAttributes) if err != nil { @@ -103,9 +126,6 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object } } - // TODO: replace with content type negotiation? - includeUninitialized := req.URL.Query().Get("includeUninitialized") == "1" - trace.Step("About to store object in database") result, err := finishRequest(timeout, func() (runtime.Object, error) { return r.Create( @@ -113,7 +133,7 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object name, obj, rest.AdmissionToValidateObjectFunc(admit, admissionAttributes), - includeUninitialized, + options, ) }) if err != nil { @@ -150,19 +170,19 @@ func createHandler(r rest.NamedCreater, scope RequestScope, typer runtime.Object } // CreateNamedResource returns a function that will handle a resource creation with name. -func CreateNamedResource(r rest.NamedCreater, scope RequestScope, typer runtime.ObjectTyper, admission admission.Interface) http.HandlerFunc { - return createHandler(r, scope, typer, admission, true) +func CreateNamedResource(r rest.NamedCreater, scope RequestScope, admission admission.Interface) http.HandlerFunc { + return createHandler(r, scope, admission, true) } // CreateResource returns a function that will handle a resource creation. -func CreateResource(r rest.Creater, scope RequestScope, typer runtime.ObjectTyper, admission admission.Interface) http.HandlerFunc { - return createHandler(&namedCreaterAdapter{r}, scope, typer, admission, false) +func CreateResource(r rest.Creater, scope RequestScope, admission admission.Interface) http.HandlerFunc { + return createHandler(&namedCreaterAdapter{r}, scope, admission, false) } type namedCreaterAdapter struct { rest.Creater } -func (c *namedCreaterAdapter) Create(ctx request.Context, name string, obj runtime.Object, createValidatingAdmission rest.ValidateObjectFunc, includeUninitialized bool) (runtime.Object, error) { - return c.Creater.Create(ctx, obj, createValidatingAdmission, includeUninitialized) +func (c *namedCreaterAdapter) Create(ctx context.Context, name string, obj runtime.Object, createValidatingAdmission rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { + return c.Creater.Create(ctx, obj, createValidatingAdmission, options) } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/delete.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/delete.go index b8ac281fa..b753b83b5 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/delete.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/delete.go @@ -24,12 +24,15 @@ import ( "k8s.io/apimachinery/pkg/api/errors" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) @@ -41,6 +44,11 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope RequestSco trace := utiltrace.New("Delete " + req.URL.Path) defer trace.LogIfLong(500 * time.Millisecond) + if isDryRun(req.URL) { + scope.err(errors.NewBadRequest("dryRun is not supported yet"), w, req) + return + } + // TODO: we either want to remove timeout or document it (if we document, move timeout out of this function and declare it in api_installer) timeout := parseTimeout(req.URL.Query().Get("timeout")) @@ -49,8 +57,10 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope RequestSco scope.err(err, w, req) return } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) + ae := request.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) options := &metav1.DeleteOptions{} if allowsOptions { @@ -83,20 +93,23 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope RequestSco audit.LogRequestObject(ae, obj, scope.Resource, scope.Subresource, scope.Serializer) trace.Step("Recorded the audit event") } else { - if values := req.URL.Query(); len(values) > 0 { - if err := metainternalversion.ParameterCodec.DecodeParameters(values, scope.MetaGroupVersion, options); err != nil { - err = errors.NewBadRequest(err.Error()) - scope.err(err, w, req) - return - } + if err := metainternalversion.ParameterCodec.DecodeParameters(req.URL.Query(), scope.MetaGroupVersion, options); err != nil { + err = errors.NewBadRequest(err.Error()) + scope.err(err, w, req) + return } } } + if errs := validation.ValidateDeleteOptions(options); len(errs) > 0 { + err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "DeleteOptions"}, "", errs) + scope.err(err, w, req) + return + } trace.Step("About to check admission control") if admit != nil && admit.Handles(admission.Delete) { userInfo, _ := request.UserFrom(ctx) - attrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Delete, userInfo) + attrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Delete, dryrun.IsDryRun(options.DryRun), userInfo) if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { if err := mutatingAdmission.Admit(attrs); err != nil { scope.err(err, w, req) @@ -167,6 +180,11 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope RequestSco // DeleteCollection returns a function that will handle a collection deletion func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestScope, admit admission.Interface) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { + if isDryRun(req.URL) { + scope.err(errors.NewBadRequest("dryRun is not supported yet"), w, req) + return + } + // TODO: we either want to remove timeout or document it (if we document, move timeout out of this function and declare it in api_installer) timeout := parseTimeout(req.URL.Query().Get("timeout")) @@ -176,28 +194,9 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco return } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) - - if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Delete) { - userInfo, _ := request.UserFrom(ctx) - - err = mutatingAdmission.Admit(admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, "", scope.Resource, scope.Subresource, admission.Delete, userInfo)) - if err != nil { - scope.err(err, w, req) - return - } - } - // TODO: avoid calling Handles twice - if validatingAdmission, ok := admit.(admission.ValidationInterface); ok && validatingAdmission.Handles(admission.Delete) { - userInfo, _ := request.UserFrom(ctx) - - err = validatingAdmission.Validate(admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, "", scope.Resource, scope.Subresource, admission.Delete, userInfo)) - if err != nil { - scope.err(err, w, req) - return - } - } + ae := request.AuditEventFrom(ctx) listOptions := metainternalversion.ListOptions{} if err := metainternalversion.ParameterCodec.DecodeParameters(req.URL.Query(), scope.MetaGroupVersion, &listOptions); err != nil { @@ -210,7 +209,7 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco // TODO: DecodeParametersInto should do this. if listOptions.FieldSelector != nil { fn := func(label, value string) (newLabel, newValue string, err error) { - return scope.Convertor.ConvertFieldLabel(scope.Kind.GroupVersion().String(), scope.Kind.Kind, label, value) + return scope.Convertor.ConvertFieldLabel(scope.Kind, label, value) } if listOptions.FieldSelector, err = listOptions.FieldSelector.Transform(fn); err != nil { // TODO: allow bad request to set field causes based on query parameters @@ -246,6 +245,38 @@ func DeleteCollection(r rest.CollectionDeleter, checkBody bool, scope RequestSco ae := request.AuditEventFrom(ctx) audit.LogRequestObject(ae, obj, scope.Resource, scope.Subresource, scope.Serializer) + } else { + if err := metainternalversion.ParameterCodec.DecodeParameters(req.URL.Query(), scope.MetaGroupVersion, options); err != nil { + err = errors.NewBadRequest(err.Error()) + scope.err(err, w, req) + return + } + } + } + if errs := validation.ValidateDeleteOptions(options); len(errs) > 0 { + err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "DeleteOptions"}, "", errs) + scope.err(err, w, req) + return + } + + admit = admission.WithAudit(admit, ae) + if admit != nil && admit.Handles(admission.Delete) { + userInfo, _ := request.UserFrom(ctx) + attrs := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, "", scope.Resource, scope.Subresource, admission.Delete, dryrun.IsDryRun(options.DryRun), userInfo) + if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { + err = mutatingAdmission.Admit(attrs) + if err != nil { + scope.err(err, w, req) + return + } + } + + if validatingAdmission, ok := admit.(admission.ValidationInterface); ok { + err = validatingAdmission.Validate(attrs) + if err != nil { + scope.err(err, w, req) + return + } } } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/get.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/get.go index 7461ece64..b234bcca4 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/get.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/get.go @@ -17,6 +17,7 @@ limitations under the License. package handlers import ( + "context" "fmt" "math/rand" "net/http" @@ -40,7 +41,7 @@ import ( // getterFunc performs a get request with the given context and object name. The request // may be used to deserialize an options object to pass to the getter. -type getterFunc func(ctx request.Context, name string, req *http.Request, trace *utiltrace.Trace) (runtime.Object, error) +type getterFunc func(ctx context.Context, name string, req *http.Request, trace *utiltrace.Trace) (runtime.Object, error) // getResourceHandler is an HTTP handler function for get requests. It delegates to the // passed-in getterFunc to perform the actual get. @@ -54,7 +55,7 @@ func getResourceHandler(scope RequestScope, getter getterFunc) http.HandlerFunc scope.err(err, w, req) return } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) result, err := getter(ctx, name, req, trace) @@ -80,7 +81,7 @@ func getResourceHandler(scope RequestScope, getter getterFunc) http.HandlerFunc // GetResource returns a function that handles retrieving a single resource from a rest.Storage object. func GetResource(r rest.Getter, e rest.Exporter, scope RequestScope) http.HandlerFunc { return getResourceHandler(scope, - func(ctx request.Context, name string, req *http.Request, trace *utiltrace.Trace) (runtime.Object, error) { + func(ctx context.Context, name string, req *http.Request, trace *utiltrace.Trace) (runtime.Object, error) { // check for export options := metav1.GetOptions{} if values := req.URL.Query(); len(values) > 0 { @@ -110,7 +111,7 @@ func GetResource(r rest.Getter, e rest.Exporter, scope RequestScope) http.Handle // GetResourceWithOptions returns a function that handles retrieving a single resource from a rest.Storage object. func GetResourceWithOptions(r rest.GetterWithOptions, scope RequestScope, isSubresource bool) http.HandlerFunc { return getResourceHandler(scope, - func(ctx request.Context, name string, req *http.Request, trace *utiltrace.Trace) (runtime.Object, error) { + func(ctx context.Context, name string, req *http.Request, trace *utiltrace.Trace) (runtime.Object, error) { opts, subpath, subpathKey := r.NewGetOptions() trace.Step("About to process Get options") if err := getRequestOptions(req, scope, opts, subpath, subpathKey, isSubresource); err != nil { @@ -137,7 +138,7 @@ func getRequestOptions(req *http.Request, scope RequestScope, into runtime.Objec newQuery[k] = v } - ctx := scope.ContextFunc(req) + ctx := req.Context() requestInfo, _ := request.RequestInfoFrom(ctx) startingIndex := 2 if isSubresource { @@ -181,7 +182,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch hasName = false } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) opts := metainternalversion.ListOptions{} @@ -195,7 +196,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch // TODO: DecodeParametersInto should do this. if opts.FieldSelector != nil { fn := func(label, value string) (newLabel, newValue string, err error) { - return scope.Convertor.ConvertFieldLabel(scope.Kind.GroupVersion().String(), scope.Kind.Kind, label, value) + return scope.Convertor.ConvertFieldLabel(scope.Kind, label, value) } if opts.FieldSelector, err = opts.FieldSelector.Transform(fn); err != nil { // TODO: allow bad request to set field causes based on query parameters @@ -207,19 +208,25 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch if hasName { // metadata.name is the canonical internal name. - // SelectionPredicate will notice that this is - // a request for a single object and optimize the - // storage query accordingly. + // SelectionPredicate will notice that this is a request for + // a single object and optimize the storage query accordingly. nameSelector := fields.OneTermEqualSelector("metadata.name", name) + + // Note that fieldSelector setting explicitly the "metadata.name" + // will result in reaching this branch (as the value of that field + // is propagated to requestInfo as the name parameter. + // That said, the allowed field selectors in this branch are: + // nil, fields.Everything and field selector matching metadata.name + // for our name. if opts.FieldSelector != nil && !opts.FieldSelector.Empty() { - // It doesn't make sense to ask for both a name - // and a field selector, since just the name is - // sufficient to narrow down the request to a - // single object. - scope.err(errors.NewBadRequest("both a name and a field selector provided; please provide one or the other."), w, req) - return + selectedName, ok := opts.FieldSelector.RequiresExactMatch("metadata.name") + if !ok || name != selectedName { + scope.err(errors.NewBadRequest("fieldSelector metadata.name doesn't match requested name"), w, req) + return + } + } else { + opts.FieldSelector = nameSelector } - opts.FieldSelector = nameSelector } if opts.Watch || forceWatch { @@ -235,7 +242,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch if timeout == 0 && minRequestTimeout > 0 { timeout = time.Duration(float64(minRequestTimeout) * (rand.Float64() + 1.0)) } - glog.V(2).Infof("Starting watch for %s, rv=%s labels=%s fields=%s timeout=%s", req.URL.Path, opts.ResourceVersion, opts.LabelSelector, opts.FieldSelector, timeout) + glog.V(3).Infof("Starting watch for %s, rv=%s labels=%s fields=%s timeout=%s", req.URL.Path, opts.ResourceVersion, opts.LabelSelector, opts.FieldSelector, timeout) watcher, err := rw.Watch(ctx, &opts) if err != nil { diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/namer.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/namer.go index 8e7a4ef33..16b4199c2 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/namer.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/namer.go @@ -26,9 +26,6 @@ import ( "k8s.io/apiserver/pkg/endpoints/request" ) -// ContextFunc returns a Context given a request - a context must be returned -type ContextFunc func(req *http.Request) request.Context - // ScopeNamer handles accessing names from requests and objects type ScopeNamer interface { // Namespace returns the appropriate namespace value from the request (may be empty) or an @@ -51,7 +48,6 @@ type ScopeNamer interface { } type ContextBasedNaming struct { - GetContext ContextFunc SelfLinker runtime.SelfLinker ClusterScoped bool @@ -67,7 +63,7 @@ func (n ContextBasedNaming) SetSelfLink(obj runtime.Object, url string) error { } func (n ContextBasedNaming) Namespace(req *http.Request) (namespace string, err error) { - requestInfo, ok := request.RequestInfoFrom(n.GetContext(req)) + requestInfo, ok := request.RequestInfoFrom(req.Context()) if !ok { return "", fmt.Errorf("missing requestInfo") } @@ -75,7 +71,7 @@ func (n ContextBasedNaming) Namespace(req *http.Request) (namespace string, err } func (n ContextBasedNaming) Name(req *http.Request) (namespace, name string, err error) { - requestInfo, ok := request.RequestInfoFrom(n.GetContext(req)) + requestInfo, ok := request.RequestInfoFrom(req.Context()) if !ok { return "", "", fmt.Errorf("missing requestInfo") } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD deleted file mode 100644 index 936a35639..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["negotiate_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/handlers/negotiation", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - "negotiate.go", - ], - importpath = "k8s.io/apiserver/pkg/endpoints/handlers/negotiation", - deps = [ - "//vendor/bitbucket.org/ww/goautoneg:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go index 226c0efe9..f9bb47bab 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate.go @@ -119,32 +119,6 @@ func isPrettyPrint(req *http.Request) bool { return false } -// negotiate the most appropriate content type given the accept header and a list of -// alternatives. -func negotiate(header string, alternatives []string) (goautoneg.Accept, bool) { - alternates := make([][]string, 0, len(alternatives)) - for _, alternate := range alternatives { - alternates = append(alternates, strings.SplitN(alternate, "/", 2)) - } - for _, clause := range goautoneg.ParseAccept(header) { - for _, alternate := range alternates { - if clause.Type == alternate[0] && clause.SubType == alternate[1] { - return clause, true - } - if clause.Type == alternate[0] && clause.SubType == "*" { - clause.SubType = alternate[1] - return clause, true - } - if clause.Type == "*" && clause.SubType == "*" { - clause.Type = alternate[0] - clause.SubType = alternate[1] - return clause, true - } - } - } - return goautoneg.Accept{}, false -} - // EndpointRestrictions is an interface that allows content-type negotiation // to verify server support for specific options type EndpointRestrictions interface { diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/patch.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/patch.go index 00bebdd2d..95e7ab5f6 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/patch.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/patch.go @@ -17,16 +17,18 @@ limitations under the License. package handlers import ( + "context" "fmt" "net/http" "strings" "time" "github.com/evanphx/json-patch" - "github.com/golang/glog" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" @@ -39,17 +41,22 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) -// PatchResource returns a function that will handle a resource patch -// TODO: Eventually PatchResource should just use GuaranteedUpdate and this routine should be a bit cleaner -func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface, converter runtime.ObjectConvertor, patchTypes []string) http.HandlerFunc { +// PatchResource returns a function that will handle a resource patch. +func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface, patchTypes []string) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { // For performance tracking purposes. trace := utiltrace.New("Patch " + req.URL.Path) defer trace.LogIfLong(500 * time.Millisecond) + if isDryRun(req.URL) { + scope.err(errors.NewBadRequest("dryRun is not supported yet"), w, req) + return + } + // Do this first, otherwise name extraction can fail for unrecognized content types // TODO: handle this in negotiation contentType := req.Header.Get("Content-Type") @@ -76,22 +83,30 @@ func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface return } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) - versionedObj, err := converter.ConvertToVersion(r.New(), scope.Kind.GroupVersion()) + patchJS, err := readBody(req) if err != nil { scope.err(err, w, req) return } - patchJS, err := readBody(req) - if err != nil { + options := &metav1.UpdateOptions{} + if err := metainternalversion.ParameterCodec.DecodeParameters(req.URL.Query(), scope.MetaGroupVersion, options); err != nil { + err = errors.NewBadRequest(err.Error()) + scope.err(err, w, req) + return + } + if errs := validation.ValidateUpdateOptions(options); len(errs) > 0 { + err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "UpdateOptions"}, "", errs) scope.err(err, w, req) return } ae := request.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) + audit.LogRequestPatch(ae, patchJS) trace.Step("Recorded the audit event") @@ -107,25 +122,63 @@ func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface ) userInfo, _ := request.UserFrom(ctx) - staticAdmissionAttributes := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, userInfo) - updateMutation := func(updatedObject runtime.Object, currentObject runtime.Object) error { + staticAdmissionAttributes := admission.NewAttributesRecord( + nil, + nil, + scope.Kind, + namespace, + name, + scope.Resource, + scope.Subresource, + admission.Update, + dryrun.IsDryRun(options.DryRun), + userInfo, + ) + admissionCheck := func(updatedObject runtime.Object, currentObject runtime.Object) error { + // if we allow create-on-patch, we have this TODO: call the mutating admission chain with the CREATE verb instead of UPDATE if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && admit.Handles(admission.Update) { - return mutatingAdmission.Admit(admission.NewAttributesRecord(updatedObject, currentObject, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, userInfo)) + return mutatingAdmission.Admit(admission.NewAttributesRecord( + updatedObject, + currentObject, + scope.Kind, + namespace, + name, + scope.Resource, + scope.Subresource, + admission.Update, + dryrun.IsDryRun(options.DryRun), + userInfo, + )) } return nil } - result, err := patchResource( - ctx, - updateMutation, - rest.AdmissionToValidateObjectFunc(admit, staticAdmissionAttributes), - rest.AdmissionToValidateObjectUpdateFunc(admit, staticAdmissionAttributes), - timeout, versionedObj, - r, - name, - patchType, - patchJS, - scope.Namer, scope.Creater, scope.Defaulter, scope.UnsafeConvertor, scope.Kind, scope.Resource, codec, trace) + p := patcher{ + namer: scope.Namer, + creater: scope.Creater, + defaulter: scope.Defaulter, + unsafeConvertor: scope.UnsafeConvertor, + kind: scope.Kind, + resource: scope.Resource, + + createValidation: rest.AdmissionToValidateObjectFunc(admit, staticAdmissionAttributes), + updateValidation: rest.AdmissionToValidateObjectUpdateFunc(admit, staticAdmissionAttributes), + admissionCheck: admissionCheck, + + codec: codec, + + timeout: timeout, + options: options, + + restPatcher: r, + name: name, + patchType: patchType, + patchJS: patchJS, + + trace: trace, + } + + result, err := p.patchResource(ctx) if err != nil { scope.err(err, w, req) return @@ -149,286 +202,125 @@ func PatchResource(r rest.Patcher, scope RequestScope, admit admission.Interface type mutateObjectUpdateFunc func(obj, old runtime.Object) error -// patchResource divides PatchResource for easier unit testing -func patchResource( - ctx request.Context, - updateMutation mutateObjectUpdateFunc, - createValidation rest.ValidateObjectFunc, - updateValidation rest.ValidateObjectUpdateFunc, - timeout time.Duration, - versionedObj runtime.Object, - patcher rest.Patcher, - name string, - patchType types.PatchType, - patchJS []byte, - namer ScopeNamer, - creater runtime.ObjectCreater, - defaulter runtime.ObjectDefaulter, - unsafeConvertor runtime.ObjectConvertor, - kind schema.GroupVersionKind, - resource schema.GroupVersionResource, - codec runtime.Codec, - trace *utiltrace.Trace, -) (runtime.Object, error) { - - namespace := request.NamespaceValue(ctx) - - var ( - originalObjJS []byte - originalPatchedObjJS []byte - originalObjMap map[string]interface{} - getOriginalPatchMap func() (map[string]interface{}, error) - lastConflictErr error - originalResourceVersion string - ) - - // applyPatch is called every time GuaranteedUpdate asks for the updated object, - // and is given the currently persisted object as input. - applyPatch := func(_ request.Context, _, currentObject runtime.Object) (runtime.Object, error) { - // Make sure we actually have a persisted currentObject - trace.Step("About to apply patch") - if hasUID, err := hasUID(currentObject); err != nil { - return nil, err - } else if !hasUID { - return nil, errors.NewNotFound(resource.GroupResource(), name) - } - - currentResourceVersion := "" - if currentMetadata, err := meta.Accessor(currentObject); err == nil { - currentResourceVersion = currentMetadata.GetResourceVersion() - } - - switch { - case originalObjJS == nil && originalObjMap == nil: - // first time through, - // 1. apply the patch - // 2. save the original and patched to detect whether there were conflicting changes on retries - - originalResourceVersion = currentResourceVersion - objToUpdate := patcher.New() - - // For performance reasons, in case of strategicpatch, we avoid json - // marshaling and unmarshaling and operate just on map[string]interface{}. - // In case of other patch types, we still have to operate on JSON - // representations. - switch patchType { - case types.JSONPatchType, types.MergePatchType: - originalJS, patchedJS, err := patchObjectJSON(patchType, codec, currentObject, patchJS, objToUpdate, versionedObj) - if err != nil { - return nil, interpretPatchError(err) - } - originalObjJS, originalPatchedObjJS = originalJS, patchedJS - - // Make a getter that can return a fresh strategic patch map if needed for conflict retries - // We have to rebuild it each time we need it, because the map gets mutated when being applied - var originalPatchBytes []byte - getOriginalPatchMap = func() (map[string]interface{}, error) { - if originalPatchBytes == nil { - // Compute once - originalPatchBytes, err = strategicpatch.CreateTwoWayMergePatch(originalObjJS, originalPatchedObjJS, versionedObj) - if err != nil { - return nil, interpretPatchError(err) - } - } - // Return a fresh map every time - originalPatchMap := make(map[string]interface{}) - if err := json.Unmarshal(originalPatchBytes, &originalPatchMap); err != nil { - return nil, errors.NewBadRequest(err.Error()) - } - return originalPatchMap, nil - } - - case types.StrategicMergePatchType: - // Since the patch is applied on versioned objects, we need to convert the - // current object to versioned representation first. - currentVersionedObject, err := unsafeConvertor.ConvertToVersion(currentObject, kind.GroupVersion()) - if err != nil { - return nil, err - } - versionedObjToUpdate, err := creater.New(kind) - if err != nil { - return nil, err - } - // Capture the original object map and patch for possible retries. - originalMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(currentVersionedObject) - if err != nil { - return nil, err - } - if err := strategicPatchObject(codec, defaulter, currentVersionedObject, patchJS, versionedObjToUpdate, versionedObj); err != nil { - return nil, err - } - // Convert the object back to unversioned. - gvk := kind.GroupKind().WithVersion(runtime.APIVersionInternal) - unversionedObjToUpdate, err := unsafeConvertor.ConvertToVersion(versionedObjToUpdate, gvk.GroupVersion()) - if err != nil { - return nil, err - } - objToUpdate = unversionedObjToUpdate - // Store unstructured representation for possible retries. - originalObjMap = originalMap - // Make a getter that can return a fresh strategic patch map if needed for conflict retries - // We have to rebuild it each time we need it, because the map gets mutated when being applied - getOriginalPatchMap = func() (map[string]interface{}, error) { - patchMap := make(map[string]interface{}) - if err := json.Unmarshal(patchJS, &patchMap); err != nil { - return nil, errors.NewBadRequest(err.Error()) - } - return patchMap, nil - } - } - if err := checkName(objToUpdate, name, namespace, namer); err != nil { - return nil, err - } - return objToUpdate, nil - - default: - // on a conflict, - // 1. build a strategic merge patch from originalJS and the patchedJS. Different patch types can - // be specified, but a strategic merge patch should be expressive enough handle them. Build the - // patch with this type to handle those cases. - // 2. build a strategic merge patch from originalJS and the currentJS - // 3. ensure no conflicts between the two patches - // 4. apply the #1 patch to the currentJS object - - // Since the patch is applied on versioned objects, we need to convert the - // current object to versioned representation first. - currentVersionedObject, err := unsafeConvertor.ConvertToVersion(currentObject, kind.GroupVersion()) - if err != nil { - return nil, err - } - currentObjMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(currentVersionedObject) - if err != nil { - return nil, err - } - - var currentPatchMap map[string]interface{} - if originalObjMap != nil { - var err error - currentPatchMap, err = strategicpatch.CreateTwoWayMergeMapPatch(originalObjMap, currentObjMap, versionedObj) - if err != nil { - return nil, interpretPatchError(err) - } - } else { - // Compute current patch. - currentObjJS, err := runtime.Encode(codec, currentObject) - if err != nil { - return nil, err - } - currentPatch, err := strategicpatch.CreateTwoWayMergePatch(originalObjJS, currentObjJS, versionedObj) - if err != nil { - return nil, interpretPatchError(err) - } - currentPatchMap = make(map[string]interface{}) - if err := json.Unmarshal(currentPatch, ¤tPatchMap); err != nil { - return nil, errors.NewBadRequest(err.Error()) - } - } +// patcher breaks the process of patch application and retries into smaller +// pieces of functionality. +// TODO: Use builder pattern to construct this object? +// TODO: As part of that effort, some aspects of PatchResource above could be +// moved into this type. +type patcher struct { + // Pieces of RequestScope + namer ScopeNamer + creater runtime.ObjectCreater + defaulter runtime.ObjectDefaulter + unsafeConvertor runtime.ObjectConvertor + resource schema.GroupVersionResource + kind schema.GroupVersionKind + + // Validation functions + createValidation rest.ValidateObjectFunc + updateValidation rest.ValidateObjectUpdateFunc + admissionCheck mutateObjectUpdateFunc + + codec runtime.Codec + + timeout time.Duration + options *metav1.UpdateOptions + + // Operation information + restPatcher rest.Patcher + name string + patchType types.PatchType + patchJS []byte + + trace *utiltrace.Trace + + // Set at invocation-time (by applyPatch) and immutable thereafter + namespace string + updatedObjectInfo rest.UpdatedObjectInfo + mechanism patchMechanism +} - // Get a fresh copy of the original strategic patch each time through, since applying it mutates the map - originalPatchMap, err := getOriginalPatchMap() - if err != nil { - return nil, err - } +func (p *patcher) toUnversioned(versionedObj runtime.Object) (runtime.Object, error) { + gvk := p.kind.GroupKind().WithVersion(runtime.APIVersionInternal) + return p.unsafeConvertor.ConvertToVersion(versionedObj, gvk.GroupVersion()) +} - hasConflicts, err := mergepatch.HasConflicts(originalPatchMap, currentPatchMap) - if err != nil { - return nil, err - } +type patchMechanism interface { + applyPatchToCurrentObject(currentObject runtime.Object) (runtime.Object, error) +} - if hasConflicts { - diff1, _ := json.Marshal(currentPatchMap) - diff2, _ := json.Marshal(originalPatchMap) - patchDiffErr := fmt.Errorf("there is a meaningful conflict (firstResourceVersion: %q, currentResourceVersion: %q):\n diff1=%v\n, diff2=%v\n", originalResourceVersion, currentResourceVersion, string(diff1), string(diff2)) - glog.V(4).Infof("patchResource failed for resource %s, because there is a meaningful conflict(firstResourceVersion: %q, currentResourceVersion: %q):\n diff1=%v\n, diff2=%v\n", name, originalResourceVersion, currentResourceVersion, string(diff1), string(diff2)) - - // Return the last conflict error we got if we have one - if lastConflictErr != nil { - return nil, lastConflictErr - } - // Otherwise manufacture one of our own - return nil, errors.NewConflict(resource.GroupResource(), name, patchDiffErr) - } +type jsonPatcher struct { + *patcher +} - versionedObjToUpdate, err := creater.New(kind) - if err != nil { - return nil, err - } - if err := applyPatchToObject(codec, defaulter, currentObjMap, originalPatchMap, versionedObjToUpdate, versionedObj); err != nil { - return nil, err - } - // Convert the object back to unversioned. - gvk := kind.GroupKind().WithVersion(runtime.APIVersionInternal) - objToUpdate, err := unsafeConvertor.ConvertToVersion(versionedObjToUpdate, gvk.GroupVersion()) - if err != nil { - return nil, err - } +func (p *jsonPatcher) applyPatchToCurrentObject(currentObject runtime.Object) (runtime.Object, error) { + // Encode will convert & return a versioned object in JSON. + currentObjJS, err := runtime.Encode(p.codec, currentObject) + if err != nil { + return nil, err + } - return objToUpdate, nil - } + // Apply the patch. + patchedObjJS, err := p.applyJSPatch(currentObjJS) + if err != nil { + return nil, interpretPatchError(err) } - // applyAdmission is called every time GuaranteedUpdate asks for the updated object, - // and is given the currently persisted object and the patched object as input. - applyAdmission := func(ctx request.Context, patchedObject runtime.Object, currentObject runtime.Object) (runtime.Object, error) { - trace.Step("About to check admission control") - return patchedObject, updateMutation(patchedObject, currentObject) + // Construct the resulting typed, unversioned object. + objToUpdate := p.restPatcher.New() + if err := runtime.DecodeInto(p.codec, patchedObjJS, objToUpdate); err != nil { + return nil, err } - updatedObjectInfo := rest.DefaultUpdatedObjectInfo(nil, applyPatch, applyAdmission) - return finishRequest(timeout, func() (runtime.Object, error) { - updateObject, _, updateErr := patcher.Update(ctx, name, updatedObjectInfo, createValidation, updateValidation) - for i := 0; i < MaxRetryWhenPatchConflicts && (errors.IsConflict(updateErr)); i++ { - lastConflictErr = updateErr - updateObject, _, updateErr = patcher.Update(ctx, name, updatedObjectInfo, createValidation, updateValidation) - } - return updateObject, updateErr - }) + return objToUpdate, nil } -// patchObjectJSON patches the with and stores -// the result in . -// Currently it also returns the original and patched objects serialized to -// JSONs (this may not be needed once we can apply patches at the -// map[string]interface{} level). -func patchObjectJSON( - patchType types.PatchType, - codec runtime.Codec, - originalObject runtime.Object, - patchJS []byte, - objToUpdate runtime.Object, - versionedObj runtime.Object, -) (originalObjJS []byte, patchedObjJS []byte, retErr error) { - js, err := runtime.Encode(codec, originalObject) - if err != nil { - return nil, nil, err - } - originalObjJS = js - - switch patchType { +// patchJS applies the patch. Input and output objects must both have +// the external version, since that is what the patch must have been constructed against. +func (p *jsonPatcher) applyJSPatch(versionedJS []byte) (patchedJS []byte, retErr error) { + switch p.patchType { case types.JSONPatchType: - patchObj, err := jsonpatch.DecodePatch(patchJS) + patchObj, err := jsonpatch.DecodePatch(p.patchJS) if err != nil { - return nil, nil, err - } - if patchedObjJS, err = patchObj.Apply(originalObjJS); err != nil { - return nil, nil, err + return nil, err } + return patchObj.Apply(versionedJS) case types.MergePatchType: - if patchedObjJS, err = jsonpatch.MergePatch(originalObjJS, patchJS); err != nil { - return nil, nil, err - } - case types.StrategicMergePatchType: - if patchedObjJS, err = strategicpatch.StrategicMergePatch(originalObjJS, patchJS, versionedObj); err != nil { - return nil, nil, err - } + return jsonpatch.MergePatch(versionedJS, p.patchJS) default: // only here as a safety net - go-restful filters content-type - return nil, nil, fmt.Errorf("unknown Content-Type header for patch: %v", patchType) + return nil, fmt.Errorf("unknown Content-Type header for patch: %v", p.patchType) + } +} + +type smpPatcher struct { + *patcher + + // Schema + schemaReferenceObj runtime.Object +} + +func (p *smpPatcher) applyPatchToCurrentObject(currentObject runtime.Object) (runtime.Object, error) { + // Since the patch is applied on versioned objects, we need to convert the + // current object to versioned representation first. + currentVersionedObject, err := p.unsafeConvertor.ConvertToVersion(currentObject, p.kind.GroupVersion()) + if err != nil { + return nil, err + } + versionedObjToUpdate, err := p.creater.New(p.kind) + if err != nil { + return nil, err } - if err := runtime.DecodeInto(codec, patchedObjJS, objToUpdate); err != nil { - return nil, nil, err + if err := strategicPatchObject(p.defaulter, currentVersionedObject, p.patchJS, versionedObjToUpdate, p.schemaReferenceObj); err != nil { + return nil, err } - return + // Convert the object back to unversioned (aka internal version). + unversionedObjToUpdate, err := p.toUnversioned(versionedObjToUpdate) + if err != nil { + return nil, err + } + + return unversionedObjToUpdate, nil } // strategicPatchObject applies a strategic merge patch of to @@ -437,12 +329,11 @@ func patchObjectJSON( // and . // NOTE: Both and are supposed to be versioned. func strategicPatchObject( - codec runtime.Codec, defaulter runtime.ObjectDefaulter, originalObject runtime.Object, patchJS []byte, objToUpdate runtime.Object, - versionedObj runtime.Object, + schemaReferenceObj runtime.Object, ) error { originalObjMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(originalObject) if err != nil { @@ -454,24 +345,73 @@ func strategicPatchObject( return errors.NewBadRequest(err.Error()) } - if err := applyPatchToObject(codec, defaulter, originalObjMap, patchMap, objToUpdate, versionedObj); err != nil { + if err := applyPatchToObject(defaulter, originalObjMap, patchMap, objToUpdate, schemaReferenceObj); err != nil { return err } return nil } +// applyPatch is called every time GuaranteedUpdate asks for the updated object, +// and is given the currently persisted object as input. +func (p *patcher) applyPatch(_ context.Context, _, currentObject runtime.Object) (runtime.Object, error) { + // Make sure we actually have a persisted currentObject + p.trace.Step("About to apply patch") + if hasUID, err := hasUID(currentObject); err != nil { + return nil, err + } else if !hasUID { + return nil, errors.NewNotFound(p.resource.GroupResource(), p.name) + } + + objToUpdate, err := p.mechanism.applyPatchToCurrentObject(currentObject) + if err != nil { + return nil, err + } + if err := checkName(objToUpdate, p.name, p.namespace, p.namer); err != nil { + return nil, err + } + return objToUpdate, nil +} + +// applyAdmission is called every time GuaranteedUpdate asks for the updated object, +// and is given the currently persisted object and the patched object as input. +func (p *patcher) applyAdmission(ctx context.Context, patchedObject runtime.Object, currentObject runtime.Object) (runtime.Object, error) { + p.trace.Step("About to check admission control") + return patchedObject, p.admissionCheck(patchedObject, currentObject) +} + +// patchResource divides PatchResource for easier unit testing +func (p *patcher) patchResource(ctx context.Context) (runtime.Object, error) { + p.namespace = request.NamespaceValue(ctx) + switch p.patchType { + case types.JSONPatchType, types.MergePatchType: + p.mechanism = &jsonPatcher{patcher: p} + case types.StrategicMergePatchType: + schemaReferenceObj, err := p.unsafeConvertor.ConvertToVersion(p.restPatcher.New(), p.kind.GroupVersion()) + if err != nil { + return nil, err + } + p.mechanism = &smpPatcher{patcher: p, schemaReferenceObj: schemaReferenceObj} + default: + return nil, fmt.Errorf("%v: unimplemented patch type", p.patchType) + } + p.updatedObjectInfo = rest.DefaultUpdatedObjectInfo(nil, p.applyPatch, p.applyAdmission) + return finishRequest(p.timeout, func() (runtime.Object, error) { + updateObject, _, updateErr := p.restPatcher.Update(ctx, p.name, p.updatedObjectInfo, p.createValidation, p.updateValidation, false, p.options) + return updateObject, updateErr + }) +} + // applyPatchToObject applies a strategic merge patch of to // and stores the result in . // NOTE: must be a versioned object. func applyPatchToObject( - codec runtime.Codec, defaulter runtime.ObjectDefaulter, originalMap map[string]interface{}, patchMap map[string]interface{}, objToUpdate runtime.Object, - versionedObj runtime.Object, + schemaReferenceObj runtime.Object, ) error { - patchedObjMap, err := strategicpatch.StrategicMergeMapPatch(originalMap, patchMap, versionedObj) + patchedObjMap, err := strategicpatch.StrategicMergeMapPatch(originalMap, patchMap, schemaReferenceObj) if err != nil { return interpretPatchError(err) } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/proxy.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/proxy.go deleted file mode 100644 index cfaf7e02a..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/proxy.go +++ /dev/null @@ -1,287 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package handlers - -import ( - "context" - "errors" - "io" - "math/rand" - "net/http" - "net/http/httputil" - "net/url" - "path" - "strings" - "time" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/httpstream" - "k8s.io/apimachinery/pkg/util/net" - proxyutil "k8s.io/apimachinery/pkg/util/proxy" - "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/metrics" - "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/apiserver/pkg/registry/rest" - "k8s.io/apiserver/pkg/server/httplog" - - "github.com/golang/glog" -) - -// ProxyHandler provides a http.Handler which will proxy traffic to locations -// specified by items implementing Redirector. -type ProxyHandler struct { - Prefix string - Storage map[string]rest.Storage - Serializer runtime.NegotiatedSerializer - Mapper request.RequestContextMapper -} - -func (r *ProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - reqStart := time.Now() - - var httpCode int - var requestInfo *request.RequestInfo - defer RecordMetrics(w, req, requestInfo, httpCode, reqStart) - - ctx, ok := r.Mapper.Get(req) - if !ok { - responsewriters.InternalError(w, req, errors.New("Error getting request context")) - httpCode = http.StatusInternalServerError - return - } - - requestInfo, ok = request.RequestInfoFrom(ctx) - if !ok { - responsewriters.InternalError(w, req, errors.New("Error getting RequestInfo from context")) - httpCode = http.StatusInternalServerError - return - } - - metrics.RecordLongRunning(req, requestInfo, func() { - httpCode = r.serveHTTP(w, req, ctx, requestInfo) - }) -} - -// serveHTTP performs proxy handling and returns the status code of the operation. -func (r *ProxyHandler) serveHTTP(w http.ResponseWriter, req *http.Request, ctx request.Context, requestInfo *request.RequestInfo) int { - proxyHandlerTraceID := rand.Int63() - - if !requestInfo.IsResourceRequest { - responsewriters.NotFound(w, req) - return http.StatusNotFound - } - namespace, resource, parts := requestInfo.Namespace, requestInfo.Resource, requestInfo.Parts - - ctx = request.WithNamespace(ctx, namespace) - if len(parts) < 2 { - responsewriters.NotFound(w, req) - return http.StatusNotFound - } - id := parts[1] - remainder := "" - if len(parts) > 2 { - proxyParts := parts[2:] - remainder = strings.Join(proxyParts, "/") - if strings.HasSuffix(req.URL.Path, "/") { - // The original path had a trailing slash, which has been stripped - // by KindAndNamespace(). We should add it back because some - // servers (like etcd) require it. - remainder = remainder + "/" - } - } - storage, ok := r.Storage[resource] - if !ok { - httplog.LogOf(req, w).Addf("'%v' has no storage object", resource) - responsewriters.NotFound(w, req) - return http.StatusNotFound - } - - gv := schema.GroupVersion{Group: requestInfo.APIGroup, Version: requestInfo.APIVersion} - - redirector, ok := storage.(rest.Redirector) - if !ok { - httplog.LogOf(req, w).Addf("'%v' is not a redirector", resource) - return responsewriters.ErrorNegotiated(ctx, apierrors.NewMethodNotSupported(schema.GroupResource{Resource: resource}, "proxy"), r.Serializer, gv, w, req) - } - - location, roundTripper, err := redirector.ResourceLocation(ctx, id) - if err != nil { - httplog.LogOf(req, w).Addf("Error getting ResourceLocation: %v", err) - return responsewriters.ErrorNegotiated(ctx, err, r.Serializer, gv, w, req) - } - if location == nil { - httplog.LogOf(req, w).Addf("ResourceLocation for %v returned nil", id) - responsewriters.NotFound(w, req) - return http.StatusNotFound - } - - if roundTripper != nil { - glog.V(5).Infof("[%x: %v] using transport %T...", proxyHandlerTraceID, req.URL, roundTripper) - } - - // Default to http - if location.Scheme == "" { - location.Scheme = "http" - } - // Add the subpath - if len(remainder) > 0 { - location.Path = singleJoiningSlash(location.Path, remainder) - } - // Start with anything returned from the storage, and add the original request's parameters - values := location.Query() - for k, vs := range req.URL.Query() { - for _, v := range vs { - values.Add(k, v) - } - } - location.RawQuery = values.Encode() - - // WithContext creates a shallow clone of the request with the new context. - newReq := req.WithContext(context.Background()) - newReq.Header = net.CloneHeader(req.Header) - newReq.URL = location - - // TODO convert this entire proxy to an UpgradeAwareProxy similar to - // https://github.com/openshift/origin/blob/master/pkg/util/httpproxy/upgradeawareproxy.go. - // That proxy needs to be modified to support multiple backends, not just 1. - if r.tryUpgrade(ctx, w, req, newReq, location, roundTripper, gv) { - return http.StatusSwitchingProtocols - } - - // Redirect requests of the form "/{resource}/{name}" to "/{resource}/{name}/" - // This is essentially a hack for http://issue.k8s.io/4958. - // Note: Keep this code after tryUpgrade to not break that flow. - if len(parts) == 2 && !strings.HasSuffix(req.URL.Path, "/") { - var queryPart string - if len(req.URL.RawQuery) > 0 { - queryPart = "?" + req.URL.RawQuery - } - w.Header().Set("Location", req.URL.Path+"/"+queryPart) - w.WriteHeader(http.StatusMovedPermanently) - return http.StatusMovedPermanently - } - - start := time.Now() - glog.V(4).Infof("[%x] Beginning proxy %s...", proxyHandlerTraceID, req.URL) - defer func() { - glog.V(4).Infof("[%x] Proxy %v finished %v.", proxyHandlerTraceID, req.URL, time.Now().Sub(start)) - }() - - proxy := httputil.NewSingleHostReverseProxy(&url.URL{Scheme: location.Scheme, Host: location.Host}) - alreadyRewriting := false - if roundTripper != nil { - _, alreadyRewriting = roundTripper.(*proxyutil.Transport) - glog.V(5).Infof("[%x] Not making a rewriting transport for proxy %s...", proxyHandlerTraceID, req.URL) - } - if !alreadyRewriting { - glog.V(5).Infof("[%x] making a transport for proxy %s...", proxyHandlerTraceID, req.URL) - prepend := path.Join(r.Prefix, resource, id) - if len(namespace) > 0 { - prepend = path.Join(r.Prefix, "namespaces", namespace, resource, id) - } - pTransport := &proxyutil.Transport{ - Scheme: req.URL.Scheme, - Host: req.URL.Host, - PathPrepend: prepend, - RoundTripper: roundTripper, - } - roundTripper = pTransport - } - proxy.Transport = roundTripper - proxy.FlushInterval = 200 * time.Millisecond - proxy.ServeHTTP(w, newReq) - return 0 -} - -// tryUpgrade returns true if the request was handled. -func (r *ProxyHandler) tryUpgrade(ctx request.Context, w http.ResponseWriter, req, newReq *http.Request, location *url.URL, transport http.RoundTripper, gv schema.GroupVersion) bool { - if !httpstream.IsUpgradeRequest(req) { - return false - } - // Only append X-Forwarded-For in the upgrade path, since httputil.NewSingleHostReverseProxy - // handles this in the non-upgrade path. - net.AppendForwardedForHeader(newReq) - - backendConn, err := proxyutil.DialURL(location, transport) - if err != nil { - responsewriters.ErrorNegotiated(ctx, err, r.Serializer, gv, w, req) - return true - } - defer backendConn.Close() - - // TODO should we use _ (a bufio.ReadWriter) instead of requestHijackedConn - // when copying between the client and the backend? Docker doesn't when they - // hijack, just for reference... - requestHijackedConn, _, err := w.(http.Hijacker).Hijack() - if err != nil { - responsewriters.ErrorNegotiated(ctx, err, r.Serializer, gv, w, req) - return true - } - defer requestHijackedConn.Close() - - if err = newReq.Write(backendConn); err != nil { - responsewriters.ErrorNegotiated(ctx, err, r.Serializer, gv, w, req) - return true - } - - done := make(chan struct{}, 2) - - go func() { - _, err := io.Copy(backendConn, requestHijackedConn) - if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { - glog.Errorf("Error proxying data from client to backend: %v", err) - } - done <- struct{}{} - }() - - go func() { - _, err := io.Copy(requestHijackedConn, backendConn) - if err != nil && !strings.Contains(err.Error(), "use of closed network connection") { - glog.Errorf("Error proxying data from backend to client: %v", err) - } - done <- struct{}{} - }() - - <-done - return true -} - -// borrowed from net/http/httputil/reverseproxy.go -func singleJoiningSlash(a, b string) string { - aslash := strings.HasSuffix(a, "/") - bslash := strings.HasPrefix(b, "/") - switch { - case aslash && bslash: - return a + b[1:] - case !aslash && !bslash: - return a + "/" + b - } - return a + b -} - -func RecordMetrics(w http.ResponseWriter, req *http.Request, requestInfo *request.RequestInfo, httpCode int, reqStart time.Time) { - responseLength := 0 - if rw, ok := w.(*metrics.ResponseWriterDelegator); ok { - responseLength = rw.ContentLength() - if httpCode == 0 { - httpCode = rw.Status() - } - } - metrics.Record(req, requestInfo, w.Header().Get("Content-Type"), httpCode, responseLength, time.Now().Sub(reqStart)) -} diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/response.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/response.go index 508b0aede..8cee470a5 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/response.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/response.go @@ -17,6 +17,7 @@ limitations under the License. package handlers import ( + "context" "fmt" "net/http" @@ -28,12 +29,11 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" ) // transformResponseObject takes an object loaded from storage and performs any necessary transformations. // Will write the complete response object. -func transformResponseObject(ctx request.Context, scope RequestScope, req *http.Request, w http.ResponseWriter, statusCode int, result runtime.Object) { +func transformResponseObject(ctx context.Context, scope RequestScope, req *http.Request, w http.ResponseWriter, statusCode int, result runtime.Object) { // TODO: fetch the media type much earlier in request processing and pass it into this method. mediaType, _, err := negotiation.NegotiateOutputMediaType(req, scope.Serializer, &scope) if err != nil { @@ -169,7 +169,7 @@ func transformResponseObject(ctx request.Context, scope RequestScope, req *http. } } - responsewriters.WriteObject(ctx, statusCode, scope.Kind.GroupVersion(), scope.Serializer, result, w, req) + responsewriters.WriteObject(statusCode, scope.Kind.GroupVersion(), scope.Serializer, result, w, req) } // errNotAcceptable indicates Accept negotiation has failed diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/BUILD deleted file mode 100644 index a1ee2eda2..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/BUILD +++ /dev/null @@ -1,67 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "errors_test.go", - "status_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "errors.go", - "status.go", - "writers.go", - ], - importpath = "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/negotiation:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/flushwriter:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/wsstream:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/errors.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/errors.go index 9c49e2c61..d13bee4d2 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/errors.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/errors.go @@ -17,6 +17,7 @@ limitations under the License. package responsewriters import ( + "context" "fmt" "net/http" "strings" @@ -26,22 +27,13 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/authorization/authorizer" - "k8s.io/apiserver/pkg/endpoints/request" ) // Avoid emitting errors that look like valid HTML. Quotes are okay. var sanitizer = strings.NewReplacer(`&`, "&", `<`, "<", `>`, ">") -// BadGatewayError renders a simple bad gateway error. -func BadGatewayError(w http.ResponseWriter, req *http.Request) { - w.Header().Set("Content-Type", "text/plain") - w.Header().Set("X-Content-Type-Options", "nosniff") - w.WriteHeader(http.StatusBadGateway) - fmt.Fprintf(w, "Bad Gateway: %q", sanitizer.Replace(req.RequestURI)) -} - // Forbidden renders a simple forbidden error -func Forbidden(ctx request.Context, attributes authorizer.Attributes, w http.ResponseWriter, req *http.Request, reason string, s runtime.NegotiatedSerializer) { +func Forbidden(ctx context.Context, attributes authorizer.Attributes, w http.ResponseWriter, req *http.Request, reason string, s runtime.NegotiatedSerializer) { msg := sanitizer.Replace(forbiddenMessage(attributes)) w.Header().Set("X-Content-Type-Options", "nosniff") @@ -53,7 +45,7 @@ func Forbidden(ctx request.Context, attributes authorizer.Attributes, w http.Res } gv := schema.GroupVersion{Group: attributes.GetAPIGroup(), Version: attributes.GetAPIVersion()} gr := schema.GroupResource{Group: attributes.GetAPIGroup(), Resource: attributes.GetResource()} - ErrorNegotiated(ctx, apierrors.NewForbidden(gr, attributes.GetName(), fmt.Errorf(errMsg)), s, gv, w, req) + ErrorNegotiated(apierrors.NewForbidden(gr, attributes.GetName(), fmt.Errorf(errMsg)), s, gv, w, req) } func forbiddenMessage(attributes authorizer.Attributes) string { @@ -67,31 +59,20 @@ func forbiddenMessage(attributes authorizer.Attributes) string { } resource := attributes.GetResource() - if group := attributes.GetAPIGroup(); len(group) > 0 { - resource = resource + "." + group - } if subresource := attributes.GetSubresource(); len(subresource) > 0 { resource = resource + "/" + subresource } if ns := attributes.GetNamespace(); len(ns) > 0 { - return fmt.Sprintf("User %q cannot %s %s in the namespace %q", username, attributes.GetVerb(), resource, ns) + return fmt.Sprintf("User %q cannot %s resource %q in API group %q in the namespace %q", username, attributes.GetVerb(), resource, attributes.GetAPIGroup(), ns) } - return fmt.Sprintf("User %q cannot %s %s at the cluster scope", username, attributes.GetVerb(), resource) + return fmt.Sprintf("User %q cannot %s resource %q in API group %q at the cluster scope", username, attributes.GetVerb(), resource, attributes.GetAPIGroup()) } // InternalError renders a simple internal error func InternalError(w http.ResponseWriter, req *http.Request, err error) { - w.Header().Set("Content-Type", "text/plain") - w.Header().Set("X-Content-Type-Options", "nosniff") - w.WriteHeader(http.StatusInternalServerError) - fmt.Fprintf(w, "Internal Server Error: %q: %v", sanitizer.Replace(req.RequestURI), err) + http.Error(w, sanitizer.Replace(fmt.Sprintf("Internal Server Error: %q: %v", req.RequestURI, err)), + http.StatusInternalServerError) utilruntime.HandleError(err) } - -// NotFound renders a simple not found error. -func NotFound(w http.ResponseWriter, req *http.Request) { - w.WriteHeader(http.StatusNotFound) - fmt.Fprintf(w, "Not Found: %q", sanitizer.Replace(req.RequestURI)) -} diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/status.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/status.go index e37a8ea47..99673077b 100755 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/status.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/status.go @@ -61,7 +61,7 @@ func ErrorToAPIStatus(err error) *metav1.Status { // by REST storage - these typically indicate programmer // error by not using pkg/api/errors, or unexpected failure // cases. - runtime.HandleError(fmt.Errorf("apiserver received an error that is not an metav1.Status: %v", err)) + runtime.HandleError(fmt.Errorf("apiserver received an error that is not an metav1.Status: %#+v", err)) return &metav1.Status{ TypeMeta: metav1.TypeMeta{ Kind: "Status", diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go index 58dac561f..fd335b5d7 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters/writers.go @@ -35,30 +35,50 @@ import ( "k8s.io/apiserver/pkg/util/wsstream" ) +// httpResponseWriterWithInit wraps http.ResponseWriter, and implements the io.Writer interface to be used +// with encoding. The purpose is to allow for encoding to a stream, while accommodating a custom HTTP status code +// if encoding fails, and meeting the encoder's io.Writer interface requirement. +type httpResponseWriterWithInit struct { + hasWritten bool + mediaType string + statusCode int + innerW http.ResponseWriter +} + +func (w httpResponseWriterWithInit) Write(b []byte) (n int, err error) { + if !w.hasWritten { + w.innerW.Header().Set("Content-Type", w.mediaType) + w.innerW.WriteHeader(w.statusCode) + w.hasWritten = true + } + + return w.innerW.Write(b) +} + // WriteObject renders a returned runtime.Object to the response as a stream or an encoded object. If the object // returned by the response implements rest.ResourceStreamer that interface will be used to render the // response. The Accept header and current API version will be passed in, and the output will be copied // directly to the response body. If content type is returned it is used, otherwise the content type will // be "application/octet-stream". All other objects are sent to standard JSON serialization. -func WriteObject(ctx request.Context, statusCode int, gv schema.GroupVersion, s runtime.NegotiatedSerializer, object runtime.Object, w http.ResponseWriter, req *http.Request) { +func WriteObject(statusCode int, gv schema.GroupVersion, s runtime.NegotiatedSerializer, object runtime.Object, w http.ResponseWriter, req *http.Request) { stream, ok := object.(rest.ResourceStreamer) if ok { - requestInfo, _ := request.RequestInfoFrom(ctx) + requestInfo, _ := request.RequestInfoFrom(req.Context()) metrics.RecordLongRunning(req, requestInfo, func() { - StreamObject(ctx, statusCode, gv, s, stream, w, req) + StreamObject(statusCode, gv, s, stream, w, req) }) return } - WriteObjectNegotiated(ctx, s, gv, w, req, statusCode, object) + WriteObjectNegotiated(s, gv, w, req, statusCode, object) } // StreamObject performs input stream negotiation from a ResourceStreamer and writes that to the response. // If the client requests a websocket upgrade, negotiate for a websocket reader protocol (because many // browser clients cannot easily handle binary streaming protocols). -func StreamObject(ctx request.Context, statusCode int, gv schema.GroupVersion, s runtime.NegotiatedSerializer, stream rest.ResourceStreamer, w http.ResponseWriter, req *http.Request) { - out, flush, contentType, err := stream.InputStream(gv.String(), req.Header.Get("Accept")) +func StreamObject(statusCode int, gv schema.GroupVersion, s runtime.NegotiatedSerializer, stream rest.ResourceStreamer, w http.ResponseWriter, req *http.Request) { + out, flush, contentType, err := stream.InputStream(req.Context(), gv.String(), req.Header.Get("Accept")) if err != nil { - ErrorNegotiated(ctx, err, s, gv, w, req) + ErrorNegotiated(err, s, gv, w, req) return } if out == nil { @@ -90,18 +110,17 @@ func StreamObject(ctx request.Context, statusCode int, gv schema.GroupVersion, s // SerializeObject renders an object in the content type negotiated by the client using the provided encoder. // The context is optional and can be nil. -func SerializeObject(mediaType string, encoder runtime.Encoder, w http.ResponseWriter, req *http.Request, statusCode int, object runtime.Object) { - w.Header().Set("Content-Type", mediaType) - w.WriteHeader(statusCode) +func SerializeObject(mediaType string, encoder runtime.Encoder, innerW http.ResponseWriter, req *http.Request, statusCode int, object runtime.Object) { + w := httpResponseWriterWithInit{mediaType: mediaType, innerW: innerW, statusCode: statusCode} if err := encoder.Encode(object, w); err != nil { - errorJSONFatal(err, encoder, w) + errSerializationFatal(err, encoder, w) } } // WriteObjectNegotiated renders an object in the content type negotiated by the client. // The context is optional and can be nil. -func WriteObjectNegotiated(ctx request.Context, s runtime.NegotiatedSerializer, gv schema.GroupVersion, w http.ResponseWriter, req *http.Request, statusCode int, object runtime.Object) { +func WriteObjectNegotiated(s runtime.NegotiatedSerializer, gv schema.GroupVersion, w http.ResponseWriter, req *http.Request, statusCode int, object runtime.Object) { serializer, err := negotiation.NegotiateOutputSerializer(req, s) if err != nil { // if original statusCode was not successful we need to return the original error @@ -115,7 +134,7 @@ func WriteObjectNegotiated(ctx request.Context, s runtime.NegotiatedSerializer, return } - if ae := request.AuditEventFrom(ctx); ae != nil { + if ae := request.AuditEventFrom(req.Context()); ae != nil { audit.LogResponseObject(ae, object, gv, s) } @@ -125,7 +144,7 @@ func WriteObjectNegotiated(ctx request.Context, s runtime.NegotiatedSerializer, // ErrorNegotiated renders an error to the response. Returns the HTTP status code of the error. // The context is optional and may be nil. -func ErrorNegotiated(ctx request.Context, err error, s runtime.NegotiatedSerializer, gv schema.GroupVersion, w http.ResponseWriter, req *http.Request) int { +func ErrorNegotiated(err error, s runtime.NegotiatedSerializer, gv schema.GroupVersion, w http.ResponseWriter, req *http.Request) int { status := ErrorToAPIStatus(err) code := int(status.Code) // when writing an error, check to see if the status indicates a retry after period @@ -139,26 +158,27 @@ func ErrorNegotiated(ctx request.Context, err error, s runtime.NegotiatedSeriali return code } - WriteObjectNegotiated(ctx, s, gv, w, req, code, status) + WriteObjectNegotiated(s, gv, w, req, code, status) return code } -// errorJSONFatal renders an error to the response, and if codec fails will render plaintext. +// errSerializationFatal renders an error to the response, and if codec fails will render plaintext. // Returns the HTTP status code of the error. -func errorJSONFatal(err error, codec runtime.Encoder, w http.ResponseWriter) int { +func errSerializationFatal(err error, codec runtime.Encoder, w httpResponseWriterWithInit) { utilruntime.HandleError(fmt.Errorf("apiserver was unable to write a JSON response: %v", err)) status := ErrorToAPIStatus(err) - code := int(status.Code) + candidateStatusCode := int(status.Code) + // If original statusCode was not successful, we need to return the original error. + // We cannot hide it behind serialization problems + if w.statusCode >= http.StatusOK && w.statusCode < http.StatusBadRequest { + w.statusCode = candidateStatusCode + } output, err := runtime.Encode(codec, status) if err != nil { - w.WriteHeader(code) - fmt.Fprintf(w, "%s: %s", status.Reason, status.Message) - return code + w.mediaType = "text/plain" + output = []byte(fmt.Sprintf("%s: %s", status.Reason, status.Message)) } - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(code) w.Write(output) - return code } // WriteRawJSON writes a non-API object in JSON. diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/rest.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/rest.go index 63135aaa8..8b3ca9d62 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/rest.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/rest.go @@ -17,10 +17,12 @@ limitations under the License. package handlers import ( + "context" "encoding/hex" "fmt" "io/ioutil" "net/http" + "net/url" "time" "github.com/golang/glog" @@ -33,16 +35,17 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apiserver/pkg/admission" + "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + openapiproto "k8s.io/kube-openapi/pkg/util/proto" ) // RequestScope encapsulates common fields across all RESTful handler methods. type RequestScope struct { Namer ScopeNamer - ContextFunc Serializer runtime.NegotiatedSerializer runtime.ParameterCodec @@ -52,8 +55,10 @@ type RequestScope struct { Defaulter runtime.ObjectDefaulter Typer runtime.ObjectTyper UnsafeConvertor runtime.ObjectConvertor + Authorizer authorizer.Authorizer TableConvertor rest.TableConvertor + OpenAPISchema openapiproto.Schema Resource schema.GroupVersionResource Kind schema.GroupVersionKind @@ -63,8 +68,7 @@ type RequestScope struct { } func (scope *RequestScope) err(err error, w http.ResponseWriter, req *http.Request) { - ctx := scope.ContextFunc(req) - responsewriters.ErrorNegotiated(ctx, err, scope.Serializer, scope.Kind.GroupVersion(), w, req) + responsewriters.ErrorNegotiated(err, scope.Serializer, scope.Kind.GroupVersion(), w, req) } func (scope *RequestScope) AllowsConversion(gvk schema.GroupVersionKind) bool { @@ -91,19 +95,24 @@ func (scope *RequestScope) AllowsStreamSchema(s string) bool { return s == "watch" } -// MaxRetryWhenPatchConflicts is the maximum number of conflicts retry during a patch operation before returning failure -const MaxRetryWhenPatchConflicts = 5 - // ConnectResource returns a function that handles a connect request on a rest.Storage object. func ConnectResource(connecter rest.Connecter, scope RequestScope, admit admission.Interface, restPath string, isSubresource bool) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { + if isDryRun(req.URL) { + scope.err(errors.NewBadRequest("dryRun is not supported"), w, req) + return + } + namespace, name, err := scope.Namer.Name(req) if err != nil { scope.err(err, w, req) return } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) + ae := request.AuditEventFrom(ctx) + admit = admission.WithAudit(admit, ae) + opts, subpath, subpathKey := connecter.NewConnectOptions() if err := getRequestOptions(req, scope, opts, subpath, subpathKey, isSubresource); err != nil { err = errors.NewBadRequest(err.Error()) @@ -111,22 +120,17 @@ func ConnectResource(connecter rest.Connecter, scope RequestScope, admit admissi return } if admit != nil && admit.Handles(admission.Connect) { - connectRequest := &rest.ConnectRequest{ - Name: name, - Options: opts, - ResourcePath: restPath, - } userInfo, _ := request.UserFrom(ctx) // TODO: remove the mutating admission here as soon as we have ported all plugin that handle CONNECT - if mutatingAdmit, ok := admit.(admission.MutationInterface); ok { - err = mutatingAdmit.Admit(admission.NewAttributesRecord(connectRequest, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, userInfo)) + if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { + err = mutatingAdmission.Admit(admission.NewAttributesRecord(opts, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, false, userInfo)) if err != nil { scope.err(err, w, req) return } } - if mutatingAdmit, ok := admit.(admission.ValidationInterface); ok { - err = mutatingAdmit.Validate(admission.NewAttributesRecord(connectRequest, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, userInfo)) + if validatingAdmission, ok := admit.(admission.ValidationInterface); ok { + err = validatingAdmission.Validate(admission.NewAttributesRecord(opts, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Connect, false, userInfo)) if err != nil { scope.err(err, w, req) return @@ -153,8 +157,7 @@ type responder struct { } func (r *responder) Object(statusCode int, obj runtime.Object) { - ctx := r.scope.ContextFunc(r.req) - responsewriters.WriteObject(ctx, statusCode, r.scope.Kind.GroupVersion(), r.scope.Serializer, obj, r.w, r.req) + responsewriters.WriteObject(statusCode, r.scope.Kind.GroupVersion(), r.scope.Serializer, obj, r.w, r.req) } func (r *responder) Error(err error) { @@ -199,7 +202,7 @@ func finishRequest(timeout time.Duration, fn resultFunc) (result runtime.Object, case p := <-panicCh: panic(p) case <-time.After(timeout): - return nil, errors.NewTimeoutError("request did not complete within allowed duration", 0) + return nil, errors.NewTimeoutError(fmt.Sprintf("request did not complete within requested timeout %s", timeout), 0) } } @@ -266,7 +269,7 @@ func checkName(obj runtime.Object, name, namespace string, namer ScopeNamer) err // setListSelfLink sets the self link of a list to the base URL, then sets the self links // on all child objects returned. Returns the number of items in the list. -func setListSelfLink(obj runtime.Object, ctx request.Context, req *http.Request, namer ScopeNamer) (int, error) { +func setListSelfLink(obj runtime.Object, ctx context.Context, req *http.Request, namer ScopeNamer) (int, error) { if !meta.IsListType(obj) { return 0, nil } @@ -323,3 +326,7 @@ func parseTimeout(str string) time.Duration { } return 30 * time.Second } + +func isDryRun(url *url.URL) bool { + return len(url.Query()["dryRun"]) != 0 +} diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/update.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/update.go index 0eac36660..dafe8c767 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/update.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/update.go @@ -17,28 +17,40 @@ limitations under the License. package handlers import ( + "context" "fmt" "net/http" + "sync" "time" "k8s.io/apimachinery/pkg/api/errors" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/audit" + "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" + "k8s.io/apiserver/pkg/util/dryrun" utiltrace "k8s.io/apiserver/pkg/util/trace" ) // UpdateResource returns a function that will handle a resource update -func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectTyper, admit admission.Interface) http.HandlerFunc { +func UpdateResource(r rest.Updater, scope RequestScope, admit admission.Interface) http.HandlerFunc { return func(w http.ResponseWriter, req *http.Request) { // For performance tracking purposes. trace := utiltrace.New("Update " + req.URL.Path) defer trace.LogIfLong(500 * time.Millisecond) + if isDryRun(req.URL) { + scope.err(errors.NewBadRequest("dryRun is not supported yet"), w, req) + return + } + // TODO: we either want to remove timeout or document it (if we document, move timeout out of this function and declare it in api_installer) timeout := parseTimeout(req.URL.Query().Get("timeout")) @@ -47,7 +59,7 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType scope.err(err, w, req) return } - ctx := scope.ContextFunc(req) + ctx := req.Context() ctx = request.WithNamespace(ctx, namespace) body, err := readBody(req) @@ -56,6 +68,18 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType return } + options := &metav1.UpdateOptions{} + if err := metainternalversion.ParameterCodec.DecodeParameters(req.URL.Query(), scope.MetaGroupVersion, options); err != nil { + err = errors.NewBadRequest(err.Error()) + scope.err(err, w, req) + return + } + if errs := validation.ValidateUpdateOptions(options); len(errs) > 0 { + err := errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "UpdateOptions"}, "", errs) + scope.err(err, w, req) + return + } + s, err := negotiation.NegotiateInputSerializer(req, false, scope.Serializer) if err != nil { scope.err(err, w, req) @@ -67,7 +91,7 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType decoder := scope.Serializer.DecoderToVersion(s.Serializer, schema.GroupVersion{Group: defaultGVK.Group, Version: runtime.APIVersionInternal}) obj, gvk, err := decoder.Decode(body, &defaultGVK, original) if err != nil { - err = transformDecodeError(typer, err, original, gvk, body) + err = transformDecodeError(scope.Typer, err, original, gvk, body) scope.err(err, w, req) return } @@ -80,6 +104,7 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType ae := request.AuditEventFrom(ctx) audit.LogRequestObject(ae, obj, scope.Resource, scope.Subresource, scope.Serializer) + admit = admission.WithAudit(admit, ae) if err := checkName(obj, name, namespace, scope.Namer); err != nil { scope.err(err, w, req) @@ -87,12 +112,37 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType } userInfo, _ := request.UserFrom(ctx) - staticAdmissionAttributes := admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, userInfo) var transformers []rest.TransformFunc - if mutatingAdmission, ok := admit.(admission.MutationInterface); ok && mutatingAdmission.Handles(admission.Update) { - transformers = append(transformers, func(ctx request.Context, newObj, oldObj runtime.Object) (runtime.Object, error) { - return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, oldObj, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, userInfo)) + if mutatingAdmission, ok := admit.(admission.MutationInterface); ok { + transformers = append(transformers, func(ctx context.Context, newObj, oldObj runtime.Object) (runtime.Object, error) { + isNotZeroObject, err := hasUID(oldObj) + if err != nil { + return nil, fmt.Errorf("unexpected error when extracting UID from oldObj: %v", err.Error()) + } else if !isNotZeroObject { + if mutatingAdmission.Handles(admission.Create) { + return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, dryrun.IsDryRun(options.DryRun), userInfo)) + } + } else { + if mutatingAdmission.Handles(admission.Update) { + return newObj, mutatingAdmission.Admit(admission.NewAttributesRecord(newObj, oldObj, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, dryrun.IsDryRun(options.DryRun), userInfo)) + } + } + return newObj, nil }) + + } + + createAuthorizerAttributes := authorizer.AttributesRecord{ + User: userInfo, + ResourceRequest: true, + Path: req.URL.Path, + Verb: "create", + APIGroup: scope.Resource.Group, + APIVersion: scope.Resource.Version, + Resource: scope.Resource.Resource, + Subresource: scope.Subresource, + Namespace: namespace, + Name: name, } trace.Step("About to store object in database") @@ -102,8 +152,15 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType ctx, name, rest.DefaultUpdatedObjectInfo(obj, transformers...), - rest.AdmissionToValidateObjectFunc(admit, staticAdmissionAttributes), - rest.AdmissionToValidateObjectUpdateFunc(admit, staticAdmissionAttributes), + withAuthorization(rest.AdmissionToValidateObjectFunc( + admit, + admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Create, dryrun.IsDryRun(options.DryRun), userInfo)), + scope.Authorizer, createAuthorizerAttributes), + rest.AdmissionToValidateObjectUpdateFunc( + admit, + admission.NewAttributesRecord(nil, nil, scope.Kind, namespace, name, scope.Resource, scope.Subresource, admission.Update, dryrun.IsDryRun(options.DryRun), userInfo)), + false, + options, ) wasCreated = created return obj, err @@ -133,3 +190,35 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType transformResponseObject(ctx, scope, req, w, status, result) } } + +func withAuthorization(validate rest.ValidateObjectFunc, a authorizer.Authorizer, attributes authorizer.Attributes) rest.ValidateObjectFunc { + var once sync.Once + var authorizerDecision authorizer.Decision + var authorizerReason string + var authorizerErr error + return func(obj runtime.Object) error { + if a == nil { + return errors.NewInternalError(fmt.Errorf("no authorizer provided, unable to authorize a create on update")) + } + once.Do(func() { + authorizerDecision, authorizerReason, authorizerErr = a.Authorize(attributes) + }) + // an authorizer like RBAC could encounter evaluation errors and still allow the request, so authorizer decision is checked before error here. + if authorizerDecision == authorizer.DecisionAllow { + // Continue to validating admission + return validate(obj) + } + if authorizerErr != nil { + return errors.NewInternalError(authorizerErr) + } + + // The user is not authorized to perform this action, so we need to build the error response + gr := schema.GroupResource{ + Group: attributes.GetAPIGroup(), + Resource: attributes.GetResource(), + } + name := attributes.GetName() + err := fmt.Errorf("%v", authorizerReason) + return errors.NewForbidden(gr, name, err) + } +} diff --git a/deps/k8s.io/apiserver/pkg/endpoints/handlers/watch.go b/deps/k8s.io/apiserver/pkg/endpoints/handlers/watch.go index 5e4497b0e..0b4e73556 100755 --- a/deps/k8s.io/apiserver/pkg/endpoints/handlers/watch.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/handlers/watch.go @@ -30,6 +30,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" + "k8s.io/apiserver/pkg/endpoints/metrics" "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/server/httplog" "k8s.io/apiserver/pkg/util/wsstream" @@ -89,7 +90,7 @@ func serveWatch(watcher watch.Interface, scope RequestScope, req *http.Request, mediaType += ";stream=watch" } - ctx := scope.ContextFunc(req) + ctx := req.Context() requestInfo, ok := request.RequestInfoFrom(ctx) if !ok { scope.err(fmt.Errorf("missing requestInfo"), w, req) @@ -140,6 +141,10 @@ type WatchServer struct { // ServeHTTP serves a series of encoded events via HTTP with Transfer-Encoding: chunked // or over a websocket connection. func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { + kind := s.Scope.Kind + metrics.RegisteredWatchers.WithLabelValues(kind.Group, kind.Version, kind.Kind).Inc() + defer metrics.RegisteredWatchers.WithLabelValues(kind.Group, kind.Version, kind.Kind).Dec() + w = httplog.Unlogged(w) if wsstream.IsWebSocketRequest(req) { @@ -204,7 +209,7 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { s.Fixup(obj) if err := s.EmbeddedEncoder.Encode(obj, buf); err != nil { // unexpected error - utilruntime.HandleError(fmt.Errorf("unable to encode watch object: %v", err)) + utilruntime.HandleError(fmt.Errorf("unable to encode watch object %T: %v", obj, err)) return } @@ -218,14 +223,14 @@ func (s *WatchServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { // and we get the benefit of using conversion functions which already have to stay in sync outEvent := &metav1.WatchEvent{} *internalEvent = metav1.InternalEvent(event) - err := metav1.Convert_versioned_InternalEvent_to_versioned_Event(internalEvent, outEvent, nil) + err := metav1.Convert_v1_InternalEvent_To_v1_WatchEvent(internalEvent, outEvent, nil) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to convert watch object: %v", err)) // client disconnect. return } if err := e.Encode(outEvent); err != nil { - utilruntime.HandleError(fmt.Errorf("unable to encode watch object: %v (%#v)", err, e)) + utilruntime.HandleError(fmt.Errorf("unable to encode watch object %T: %v (%#v)", outEvent, err, e)) // client disconnect. return } @@ -271,7 +276,7 @@ func (s *WatchServer) HandleWS(ws *websocket.Conn) { s.Fixup(obj) if err := s.EmbeddedEncoder.Encode(obj, buf); err != nil { // unexpected error - utilruntime.HandleError(fmt.Errorf("unable to encode watch object: %v", err)) + utilruntime.HandleError(fmt.Errorf("unable to encode watch object %T: %v", obj, err)) return } @@ -286,7 +291,7 @@ func (s *WatchServer) HandleWS(ws *websocket.Conn) { // and we get the benefit of using conversion functions which already have to stay in sync outEvent := &metav1.WatchEvent{} *internalEvent = metav1.InternalEvent(event) - err := metav1.Convert_versioned_InternalEvent_to_versioned_Event(internalEvent, outEvent, nil) + err := metav1.Convert_v1_InternalEvent_To_v1_WatchEvent(internalEvent, outEvent, nil) if err != nil { utilruntime.HandleError(fmt.Errorf("unable to convert watch object: %v", err)) // client disconnect. diff --git a/deps/k8s.io/apiserver/pkg/endpoints/installer.go b/deps/k8s.io/apiserver/pkg/endpoints/installer.go index 11f658ee8..47aac69c6 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/installer.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/installer.go @@ -28,7 +28,6 @@ import ( restful "github.com/emicklei/go-restful" - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/conversion" "k8s.io/apimachinery/pkg/runtime" @@ -38,9 +37,12 @@ import ( "k8s.io/apiserver/pkg/endpoints/handlers" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" "k8s.io/apiserver/pkg/endpoints/metrics" - "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" genericfilters "k8s.io/apiserver/pkg/server/filters" + utilopenapi "k8s.io/apiserver/pkg/util/openapi" + openapibuilder "k8s.io/kube-openapi/pkg/builder" + openapiutil "k8s.io/kube-openapi/pkg/util" + openapiproto "k8s.io/kube-openapi/pkg/util/proto" ) const ( @@ -96,13 +98,6 @@ func (a *APIInstaller) Install() ([]metav1.APIResource, *restful.WebService, []e var errors []error ws := a.newWebService() - proxyHandler := (&handlers.ProxyHandler{ - Prefix: a.prefix + "/proxy/", - Storage: a.group.Storage, - Serializer: a.group.Serializer, - Mapper: a.group.Context, - }) - // Register the paths in a deterministic (sorted) order to get a deterministic swagger spec. paths := make([]string, len(a.group.Storage)) var i int = 0 @@ -112,7 +107,7 @@ func (a *APIInstaller) Install() ([]metav1.APIResource, *restful.WebService, []e } sort.Strings(paths) for _, path := range paths { - apiResource, err := a.registerResourceHandlers(path, a.group.Storage[path], ws, proxyHandler) + apiResource, err := a.registerResourceHandlers(path, a.group.Storage[path], ws) if err != nil { errors = append(errors, fmt.Errorf("error in registering resource: %s, %v", path, err)) } @@ -167,38 +162,13 @@ func (a *APIInstaller) getResourceKind(path string, storage rest.Storage) (schem if fqKindToRegister.Empty() { return schema.GroupVersionKind{}, fmt.Errorf("unable to locate fully qualified kind for %v: found %v when registering for %v", reflect.TypeOf(object), fqKinds, a.group.GroupVersion) } - return fqKindToRegister, nil -} -// restMapping returns rest mapper for the resource. -// Example REST paths that this mapper maps. -// 1. Resource only, no subresource: -// Resource Type: batch/v1.Job (input args: resource = "jobs") -// REST path: /apis/batch/v1/namespaces/{namespace}/job/{name} -// 2. Subresource and its parent belong to different API groups and/or versions: -// Resource Type: extensions/v1beta1.ReplicaSet (input args: resource = "replicasets") -// Subresource Type: autoscaling/v1.Scale -// REST path: /apis/extensions/v1beta1/namespaces/{namespace}/replicaset/{name}/scale -func (a *APIInstaller) restMapping(resource string) (*meta.RESTMapping, error) { - // subresources must have parent resources, and follow the namespacing rules of their parent. - // So get the storage of the resource (which is the parent resource in case of subresources) - storage, ok := a.group.Storage[resource] - if !ok { - return nil, fmt.Errorf("unable to locate the storage object for resource: %s", resource) - } - fqKindToRegister, err := a.getResourceKind(resource, storage) - if err != nil { - return nil, fmt.Errorf("unable to locate fully qualified kind for mapper resource %s: %v", resource, err) - } - return a.group.Mapper.RESTMapping(fqKindToRegister.GroupKind(), fqKindToRegister.Version) + // group is guaranteed to match based on the check above + return fqKindToRegister, nil } -func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storage, ws *restful.WebService, proxyHandler http.Handler) (*metav1.APIResource, error) { +func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storage, ws *restful.WebService) (*metav1.APIResource, error) { admit := a.group.Admit - context := a.group.Context - if context == nil { - return nil, fmt.Errorf("%v missing Context", a.group.GroupVersion) - } optionsExternalVersion := a.group.GroupVersion if a.group.OptionsExternalVersion != nil { @@ -210,11 +180,6 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag return nil, err } - mapping, err := a.restMapping(resource) - if err != nil { - return nil, err - } - fqKindToRegister, err := a.getResourceKind(path, storage) if err != nil { return nil, err @@ -226,7 +191,28 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } defaultVersionedObject := indirectArbitraryPointer(versionedPtr) kind := fqKindToRegister.Kind - hasSubresource := len(subresource) > 0 + isSubresource := len(subresource) > 0 + + // If there is a subresource, namespace scoping is defined by the parent resource + namespaceScoped := true + if isSubresource { + parentStorage, ok := a.group.Storage[resource] + if !ok { + return nil, fmt.Errorf("missing parent storage: %q", resource) + } + scoper, ok := parentStorage.(rest.Scoper) + if !ok { + return nil, fmt.Errorf("%q must implement scoper", resource) + } + namespaceScoped = scoper.NamespaceScoped() + + } else { + scoper, ok := storage.(rest.Scoper) + if !ok { + return nil, fmt.Errorf("%q must implement scoper", resource) + } + namespaceScoped = scoper.NamespaceScoped() + } // what verbs are supported by the storage, used to know what verbs we support per path creater, isCreater := storage.(rest.Creater) @@ -234,13 +220,11 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag lister, isLister := storage.(rest.Lister) getter, isGetter := storage.(rest.Getter) getterWithOptions, isGetterWithOptions := storage.(rest.GetterWithOptions) - deleter, isDeleter := storage.(rest.Deleter) gracefulDeleter, isGracefulDeleter := storage.(rest.GracefulDeleter) collectionDeleter, isCollectionDeleter := storage.(rest.CollectionDeleter) updater, isUpdater := storage.(rest.Updater) patcher, isPatcher := storage.(rest.Patcher) watcher, isWatcher := storage.(rest.Watcher) - _, isRedirector := storage.(rest.Redirector) connecter, isConnecter := storage.(rest.Connecter) storageMeta, isMetadata := storage.(rest.StorageMetadata) if !isMetadata { @@ -281,16 +265,12 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag var versionedDeleteOptions runtime.Object var versionedDeleterObject interface{} - switch { - case isGracefulDeleter: + if isGracefulDeleter { versionedDeleteOptions, err = a.group.Creater.New(optionsExternalVersion.WithKind("DeleteOptions")) if err != nil { return nil, err } versionedDeleterObject = indirectArbitraryPointer(versionedDeleteOptions) - isDeleter = true - case isDeleter: - gracefulDeleter = rest.GracefulDeleteAdapter{Deleter: deleter} } versionedStatusPtr, err := a.group.Creater.New(optionsExternalVersion.WithKind("Status")) @@ -355,16 +335,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } } - var ctxFn handlers.ContextFunc - ctxFn = func(req *http.Request) request.Context { - if ctx, ok := context.Get(req); ok { - return request.WithUserAgent(ctx, req.Header.Get("User-Agent")) - } - return request.WithUserAgent(request.NewContext(), req.Header.Get("User-Agent")) - } - allowWatchList := isWatcher && isLister // watching on lists is allowed only for kinds that support both watch and list. - scope := mapping.Scope nameParam := ws.PathParameter("name", "name of the "+kind).DataType("string") pathParam := ws.PathParameter("path", "path to the resource").DataType("string") @@ -383,8 +354,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag var apiResource metav1.APIResource // Get the list of actions for the given scope. - switch scope.Name() { - case meta.RESTScopeNameRoot: + switch { + case !namespaceScoped: // Handle non-namespace scoped resources like nodes. resourcePath := resource resourceParams := params @@ -392,7 +363,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag nameParams := append(params, nameParam) proxyParams := append(nameParams, pathParam) suffix := "" - if hasSubresource { + if isSubresource { suffix = "/" + subresource itemPath = itemPath + suffix resourcePath = itemPath @@ -402,7 +373,6 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = false apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - GetContext: ctxFn, SelfLinker: a.group.Linker, ClusterScoped: true, SelfLinkPathPrefix: gpath.Join(a.prefix, resource) + "/", @@ -414,7 +384,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag actions = appendIf(actions, action{"LIST", resourcePath, resourceParams, namer, false}, isLister) actions = appendIf(actions, action{"POST", resourcePath, resourceParams, namer, false}, isCreater) actions = appendIf(actions, action{"DELETECOLLECTION", resourcePath, resourceParams, namer, false}, isCollectionDeleter) - // DEPRECATED + // DEPRECATED in 1.11 actions = appendIf(actions, action{"WATCHLIST", "watch/" + resourcePath, resourceParams, namer, false}, allowWatchList) // Add actions at the item path: /api/apiVersion/resource/{name} @@ -424,21 +394,17 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } actions = appendIf(actions, action{"PUT", itemPath, nameParams, namer, false}, isUpdater) actions = appendIf(actions, action{"PATCH", itemPath, nameParams, namer, false}, isPatcher) - actions = appendIf(actions, action{"DELETE", itemPath, nameParams, namer, false}, isDeleter) + actions = appendIf(actions, action{"DELETE", itemPath, nameParams, namer, false}, isGracefulDeleter) + // DEPRECATED in 1.11 actions = appendIf(actions, action{"WATCH", "watch/" + itemPath, nameParams, namer, false}, isWatcher) - // We add "proxy" subresource to remove the need for the generic top level prefix proxy. - // The generic top level prefix proxy is deprecated in v1.2, and will be removed in 1.3, or 1.4 at the latest. - // TODO: DEPRECATED in v1.2. - actions = appendIf(actions, action{"PROXY", "proxy/" + itemPath + "/{path:*}", proxyParams, namer, false}, isRedirector) - // TODO: DEPRECATED in v1.2. - actions = appendIf(actions, action{"PROXY", "proxy/" + itemPath, nameParams, namer, false}, isRedirector) actions = appendIf(actions, action{"CONNECT", itemPath, nameParams, namer, false}, isConnecter) actions = appendIf(actions, action{"CONNECT", itemPath + "/{path:*}", proxyParams, namer, false}, isConnecter && connectSubpath) break - case meta.RESTScopeNameNamespace: + default: + namespaceParamName := "namespaces" // Handler for standard REST verbs (GET, PUT, POST and DELETE). - namespaceParam := ws.PathParameter(scope.ArgumentName(), scope.ParamDescription()).DataType("string") - namespacedPath := scope.ParamName() + "/{" + scope.ArgumentName() + "}/" + resource + namespaceParam := ws.PathParameter("namespace", "object name and auth scope, such as for teams and projects").DataType("string") + namespacedPath := namespaceParamName + "/{" + "namespace" + "}/" + resource namespaceParams := []*restful.Parameter{namespaceParam} resourcePath := namespacedPath @@ -447,7 +413,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag nameParams := append(namespaceParams, nameParam) proxyParams := append(nameParams, pathParam) itemPathSuffix := "" - if hasSubresource { + if isSubresource { itemPathSuffix = "/" + subresource itemPath = itemPath + itemPathSuffix resourcePath = itemPath @@ -457,17 +423,16 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag apiResource.Namespaced = true apiResource.Kind = resourceKind namer := handlers.ContextBasedNaming{ - GetContext: ctxFn, SelfLinker: a.group.Linker, ClusterScoped: false, - SelfLinkPathPrefix: gpath.Join(a.prefix, scope.ParamName()) + "/", + SelfLinkPathPrefix: gpath.Join(a.prefix, namespaceParamName) + "/", SelfLinkPathSuffix: itemPathSuffix, } actions = appendIf(actions, action{"LIST", resourcePath, resourceParams, namer, false}, isLister) actions = appendIf(actions, action{"POST", resourcePath, resourceParams, namer, false}, isCreater) actions = appendIf(actions, action{"DELETECOLLECTION", resourcePath, resourceParams, namer, false}, isCollectionDeleter) - // DEPRECATED + // DEPRECATED in 1.11 actions = appendIf(actions, action{"WATCHLIST", "watch/" + resourcePath, resourceParams, namer, false}, allowWatchList) actions = appendIf(actions, action{"GET", itemPath, nameParams, namer, false}, isGetter) @@ -476,27 +441,21 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } actions = appendIf(actions, action{"PUT", itemPath, nameParams, namer, false}, isUpdater) actions = appendIf(actions, action{"PATCH", itemPath, nameParams, namer, false}, isPatcher) - actions = appendIf(actions, action{"DELETE", itemPath, nameParams, namer, false}, isDeleter) + actions = appendIf(actions, action{"DELETE", itemPath, nameParams, namer, false}, isGracefulDeleter) + // DEPRECATED in 1.11 actions = appendIf(actions, action{"WATCH", "watch/" + itemPath, nameParams, namer, false}, isWatcher) - // We add "proxy" subresource to remove the need for the generic top level prefix proxy. - // The generic top level prefix proxy is deprecated in v1.2, and will be removed in 1.3, or 1.4 at the latest. - // TODO: DEPRECATED in v1.2. - actions = appendIf(actions, action{"PROXY", "proxy/" + itemPath + "/{path:*}", proxyParams, namer, false}, isRedirector) - // TODO: DEPRECATED in v1.2. - actions = appendIf(actions, action{"PROXY", "proxy/" + itemPath, nameParams, namer, false}, isRedirector) actions = appendIf(actions, action{"CONNECT", itemPath, nameParams, namer, false}, isConnecter) actions = appendIf(actions, action{"CONNECT", itemPath + "/{path:*}", proxyParams, namer, false}, isConnecter && connectSubpath) // list or post across namespace. // For ex: LIST all pods in all namespaces by sending a LIST request at /api/apiVersion/pods. // TODO: more strongly type whether a resource allows these actions on "all namespaces" (bulk delete) - if !hasSubresource { + if !isSubresource { actions = appendIf(actions, action{"LIST", resource, params, namer, true}, isLister) + // DEPRECATED in 1.11 actions = appendIf(actions, action{"WATCHLIST", "watch/" + resource, params, namer, true}, allowWatchList) } break - default: - return nil, fmt.Errorf("unsupported restscope: %s", scope.Name()) } // Create Routes for the actions. @@ -522,7 +481,6 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag kubeVerbs := map[string]struct{}{} reqScope := handlers.RequestScope{ - ContextFunc: ctxFn, Serializer: a.group.Serializer, ParameterCodec: a.group.ParameterCodec, Creater: a.group.Creater, @@ -530,6 +488,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Defaulter: a.group.Defaulter, Typer: a.group.Typer, UnsafeConvertor: a.group.UnsafeConvertor, + Authorizer: a.group.Authorizer, // TODO: Check for the interface on storage TableConvertor: tableProvider, @@ -544,6 +503,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag if a.group.MetaGroupVersion != nil { reqScope.MetaGroupVersion = *a.group.MetaGroupVersion } + reqScope.OpenAPISchema, err = a.getOpenAPISchema(ws.RootPath(), resource, fqKindToRegister, defaultVersionedObject) + if err != nil { + return nil, fmt.Errorf("unable to get openapi schema for %v: %v", fqKindToRegister, err) + } for _, action := range actions { producedObject := storageMeta.ProducesObject(action.Verb) if producedObject == nil { @@ -579,8 +542,13 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag routes := []*restful.RouteBuilder{} // If there is a subresource, kind should be the parent's kind. - if hasSubresource { - fqParentKind, err := a.getResourceKind(resource, a.group.Storage[resource]) + if isSubresource { + parentStorage, ok := a.group.Storage[resource] + if !ok { + return nil, fmt.Errorf("missing parent storage: %q", resource) + } + + fqParentKind, err := a.getResourceKind(resource, parentStorage) if err != nil { return nil, err } @@ -593,7 +561,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag case "GET": // Get a resource. var handler restful.RouteFunction if isGetterWithOptions { - handler = restfulGetResourceWithOptions(getterWithOptions, reqScope, hasSubresource) + handler = restfulGetResourceWithOptions(getterWithOptions, reqScope, isSubresource) } else { handler = restfulGetResource(getter, exporter, reqScope) } @@ -606,10 +574,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } if a.enableAPIResponseCompression { - handler = genericfilters.RestfulWithCompression(handler, a.group.Context) + handler = genericfilters.RestfulWithCompression(handler) } doc := "read the specified " + kind - if hasSubresource { + if isSubresource { doc = "read " + subresource + " of the specified " + kind } route := ws.GET(action.Path).To(handler). @@ -633,12 +601,12 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag routes = append(routes, route) case "LIST": // List all resources of a kind. doc := "list objects of kind " + kind - if hasSubresource { + if isSubresource { doc = "list " + subresource + " of objects of kind " + kind } handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulListResource(lister, watcher, reqScope, false, a.minRequestTimeout)) if a.enableAPIResponseCompression { - handler = genericfilters.RestfulWithCompression(handler, a.group.Context) + handler = genericfilters.RestfulWithCompression(handler) } route := ws.GET(action.Path).To(handler). Doc(doc). @@ -653,13 +621,13 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag switch { case isLister && isWatcher: doc := "list or watch objects of kind " + kind - if hasSubresource { + if isSubresource { doc = "list or watch " + subresource + " of objects of kind " + kind } route.Doc(doc) case isWatcher: doc := "watch objects of kind " + kind - if hasSubresource { + if isSubresource { doc = "watch " + subresource + "of objects of kind " + kind } route.Doc(doc) @@ -668,10 +636,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag routes = append(routes, route) case "PUT": // Update a resource. doc := "replace the specified " + kind - if hasSubresource { + if isSubresource { doc = "replace " + subresource + " of the specified " + kind } - handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulUpdateResource(updater, reqScope, a.group.Typer, admit)) + handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulUpdateResource(updater, reqScope, admit)) route := ws.PUT(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -687,7 +655,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag routes = append(routes, route) case "PATCH": // Partially update a resource doc := "partially update the specified " + kind - if hasSubresource { + if isSubresource { doc = "partially update " + subresource + " of the specified " + kind } supportedTypes := []string{ @@ -695,7 +663,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag string(types.MergePatchType), string(types.StrategicMergePatchType), } - handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulPatchResource(patcher, reqScope, admit, mapping.ObjectConvertor, supportedTypes)) + handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulPatchResource(patcher, reqScope, admit, supportedTypes)) route := ws.PATCH(action.Path).To(handler). Doc(doc). Param(ws.QueryParameter("pretty", "If 'true', then the output is pretty printed.")). @@ -710,14 +678,14 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag case "POST": // Create a resource. var handler restful.RouteFunction if isNamedCreater { - handler = restfulCreateNamedResource(namedCreater, reqScope, a.group.Typer, admit) + handler = restfulCreateNamedResource(namedCreater, reqScope, admit) } else { - handler = restfulCreateResource(creater, reqScope, a.group.Typer, admit) + handler = restfulCreateResource(creater, reqScope, admit) } handler = metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, handler) article := getArticleForNoun(kind, " ") doc := "create" + article + kind - if hasSubresource { + if isSubresource { doc = "create " + subresource + " of" + article + kind } route := ws.POST(action.Path).To(handler). @@ -737,7 +705,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag case "DELETE": // Delete a resource. article := getArticleForNoun(kind, " ") doc := "delete" + article + kind - if hasSubresource { + if isSubresource { doc = "delete " + subresource + " of" + article + kind } handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulDeleteResource(gracefulDeleter, isGracefulDeleter, reqScope, admit)) @@ -747,7 +715,8 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag Operation("delete"+namespaced+kind+strings.Title(subresource)+operationSuffix). Produces(append(storageMeta.ProducesMIMETypes(action.Verb), mediaTypes...)...). Writes(versionedStatus). - Returns(http.StatusOK, "OK", versionedStatus) + Returns(http.StatusOK, "OK", versionedStatus). + Returns(http.StatusAccepted, "Accepted", versionedStatus) if isGracefulDeleter { route.Reads(versionedDeleterObject) if err := addObjectParams(ws, route, versionedDeleteOptions); err != nil { @@ -758,7 +727,7 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag routes = append(routes, route) case "DELETECOLLECTION": doc := "delete collection of " + kind - if hasSubresource { + if isSubresource { doc = "delete collection of " + subresource + " of a " + kind } handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulDeleteCollection(collectionDeleter, isCollectionDeleter, reqScope, admit)) @@ -774,12 +743,13 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } addParams(route, action.Params) routes = append(routes, route) - // TODO: deprecated + // deprecated in 1.11 case "WATCH": // Watch a resource. doc := "watch changes to an object of kind " + kind - if hasSubresource { + if isSubresource { doc = "watch changes to " + subresource + " of an object of kind " + kind } + doc += ". deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter." handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulListResource(lister, watcher, reqScope, true, a.minRequestTimeout)) route := ws.GET(action.Path).To(handler). Doc(doc). @@ -793,12 +763,13 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } addParams(route, action.Params) routes = append(routes, route) - // TODO: deprecated + // deprecated in 1.11 case "WATCHLIST": // Watch all resources of a kind. doc := "watch individual changes to a list of " + kind - if hasSubresource { + if isSubresource { doc = "watch individual changes to a list of " + subresource + " of " + kind } + doc += ". deprecated: use the 'watch' parameter with a list operation instead." handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulListResource(lister, watcher, reqScope, true, a.minRequestTimeout)) route := ws.GET(action.Path).To(handler). Doc(doc). @@ -812,18 +783,6 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } addParams(route, action.Params) routes = append(routes, route) - // We add "proxy" subresource to remove the need for the generic top level prefix proxy. - // The generic top level prefix proxy is deprecated in v1.2, and will be removed in 1.3, or 1.4 at the latest. - // TODO: DEPRECATED in v1.2. - case "PROXY": // Proxy requests to a resource. - // Accept all methods as per http://issue.k8s.io/3996 - routes = append(routes, buildProxyRoute(ws, "GET", a.prefix, action.Path, kind, resource, subresource, namespaced, requestScope, hasSubresource, action.Params, proxyHandler, operationSuffix)) - routes = append(routes, buildProxyRoute(ws, "PUT", a.prefix, action.Path, kind, resource, subresource, namespaced, requestScope, hasSubresource, action.Params, proxyHandler, operationSuffix)) - routes = append(routes, buildProxyRoute(ws, "POST", a.prefix, action.Path, kind, resource, subresource, namespaced, requestScope, hasSubresource, action.Params, proxyHandler, operationSuffix)) - routes = append(routes, buildProxyRoute(ws, "PATCH", a.prefix, action.Path, kind, resource, subresource, namespaced, requestScope, hasSubresource, action.Params, proxyHandler, operationSuffix)) - routes = append(routes, buildProxyRoute(ws, "DELETE", a.prefix, action.Path, kind, resource, subresource, namespaced, requestScope, hasSubresource, action.Params, proxyHandler, operationSuffix)) - routes = append(routes, buildProxyRoute(ws, "HEAD", a.prefix, action.Path, kind, resource, subresource, namespaced, requestScope, hasSubresource, action.Params, proxyHandler, operationSuffix)) - routes = append(routes, buildProxyRoute(ws, "OPTIONS", a.prefix, action.Path, kind, resource, subresource, namespaced, requestScope, hasSubresource, action.Params, proxyHandler, operationSuffix)) case "CONNECT": for _, method := range connecter.ConnectMethods() { connectProducedObject := storageMeta.ProducesObject(method) @@ -831,10 +790,10 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag connectProducedObject = "string" } doc := "connect " + method + " requests to " + kind - if hasSubresource { + if isSubresource { doc = "connect " + method + " requests to " + subresource + " of " + kind } - handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulConnectResource(connecter, reqScope, admit, path, hasSubresource)) + handler := metrics.InstrumentRouteFunc(action.Verb, resource, subresource, requestScope, restfulConnectResource(connecter, reqScope, admit, path, isSubresource)) route := ws.Method(method).Path(action.Path). To(handler). Doc(doc). @@ -849,6 +808,13 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag } addParams(route, action.Params) routes = append(routes, route) + + // transform ConnectMethods to kube verbs + if kubeVerb, found := toDiscoveryKubeVerb[method]; found { + if len(kubeVerb) != 0 { + kubeVerbs[kubeVerb] = struct{}{} + } + } } default: return nil, fmt.Errorf("unrecognized action verb: %s", action.Verb) @@ -887,6 +853,24 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag return &apiResource, nil } +// getOpenAPISchema builds the openapi schema for a single resource model to be given to each handler. It will +// return nil if the apiserver doesn't have openapi enabled, or if the specific path should be ignored by openapi. +func (a *APIInstaller) getOpenAPISchema(rootPath, resource string, kind schema.GroupVersionKind, sampleObject interface{}) (openapiproto.Schema, error) { + path := gpath.Join(rootPath, resource) + if a.group.OpenAPIConfig == nil { + return nil, nil + } + pathsToIgnore := openapiutil.NewTrie(a.group.OpenAPIConfig.IgnorePrefixes) + if pathsToIgnore.HasPrefix(path) { + return nil, nil + } + openAPIDefinitions, err := openapibuilder.BuildOpenAPIDefinitionsForResource(sampleObject, a.group.OpenAPIConfig) + if err != nil { + return nil, err + } + return utilopenapi.ToProtoSchema(openAPIDefinitions, kind) +} + // indirectArbitraryPointer returns *ptrToObject for an arbitrary pointer func indirectArbitraryPointer(ptrToObject interface{}) interface{} { return reflect.Indirect(reflect.ValueOf(ptrToObject)).Interface() @@ -899,34 +883,6 @@ func appendIf(actions []action, a action, shouldAppend bool) []action { return actions } -// Wraps a http.Handler function inside a restful.RouteFunction -func routeFunction(handler http.Handler) restful.RouteFunction { - return func(restReq *restful.Request, restResp *restful.Response) { - handler.ServeHTTP(restResp.ResponseWriter, restReq.Request) - } -} - -func buildProxyRoute(ws *restful.WebService, - method, prefix, path, kind, resource, subresource, namespaced, requestScope string, - hasSubresource bool, - params []*restful.Parameter, - proxyHandler http.Handler, - operationSuffix string) *restful.RouteBuilder { - doc := "proxy " + method + " requests to " + kind - if hasSubresource { - doc = "proxy " + method + " requests to " + subresource + " of " + kind - } - handler := metrics.InstrumentRouteFunc("PROXY", resource, subresource, requestScope, routeFunction(proxyHandler)) - proxyRoute := ws.Method(method).Path(path).To(handler). - Doc(doc). - Operation("proxy" + strings.Title(method) + namespaced + kind + strings.Title(subresource) + operationSuffix). - Produces("*/*"). - Consumes("*/*"). - Writes("string") - addParams(proxyRoute, params) - return proxyRoute -} - func addParams(route *restful.RouteBuilder, params []*restful.Parameter) { for _, param := range params { route.Param(param) @@ -1074,15 +1030,15 @@ func restfulListResource(r rest.Lister, rw rest.Watcher, scope handlers.RequestS } } -func restfulCreateNamedResource(r rest.NamedCreater, scope handlers.RequestScope, typer runtime.ObjectTyper, admit admission.Interface) restful.RouteFunction { +func restfulCreateNamedResource(r rest.NamedCreater, scope handlers.RequestScope, admit admission.Interface) restful.RouteFunction { return func(req *restful.Request, res *restful.Response) { - handlers.CreateNamedResource(r, scope, typer, admit)(res.ResponseWriter, req.Request) + handlers.CreateNamedResource(r, scope, admit)(res.ResponseWriter, req.Request) } } -func restfulCreateResource(r rest.Creater, scope handlers.RequestScope, typer runtime.ObjectTyper, admit admission.Interface) restful.RouteFunction { +func restfulCreateResource(r rest.Creater, scope handlers.RequestScope, admit admission.Interface) restful.RouteFunction { return func(req *restful.Request, res *restful.Response) { - handlers.CreateResource(r, scope, typer, admit)(res.ResponseWriter, req.Request) + handlers.CreateResource(r, scope, admit)(res.ResponseWriter, req.Request) } } @@ -1098,15 +1054,15 @@ func restfulDeleteCollection(r rest.CollectionDeleter, checkBody bool, scope han } } -func restfulUpdateResource(r rest.Updater, scope handlers.RequestScope, typer runtime.ObjectTyper, admit admission.Interface) restful.RouteFunction { +func restfulUpdateResource(r rest.Updater, scope handlers.RequestScope, admit admission.Interface) restful.RouteFunction { return func(req *restful.Request, res *restful.Response) { - handlers.UpdateResource(r, scope, typer, admit)(res.ResponseWriter, req.Request) + handlers.UpdateResource(r, scope, admit)(res.ResponseWriter, req.Request) } } -func restfulPatchResource(r rest.Patcher, scope handlers.RequestScope, admit admission.Interface, converter runtime.ObjectConvertor, supportedTypes []string) restful.RouteFunction { +func restfulPatchResource(r rest.Patcher, scope handlers.RequestScope, admit admission.Interface, supportedTypes []string) restful.RouteFunction { return func(req *restful.Request, res *restful.Response) { - handlers.PatchResource(r, scope, admit, converter, supportedTypes)(res.ResponseWriter, req.Request) + handlers.PatchResource(r, scope, admit, supportedTypes)(res.ResponseWriter, req.Request) } } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/metrics/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/metrics/BUILD deleted file mode 100644 index 57b4aa6e9..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/metrics/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["metrics_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/metrics", -) - -go_library( - name = "go_default_library", - srcs = ["metrics.go"], - importpath = "k8s.io/apiserver/pkg/endpoints/metrics", - deps = [ - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go b/deps/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go index d3f155c11..ae16d43bb 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/metrics/metrics.go @@ -18,12 +18,12 @@ package metrics import ( "bufio" - //"fmt" "net" "net/http" "regexp" "strconv" "strings" + "sync" "time" utilnet "k8s.io/apimachinery/pkg/util/net" @@ -33,6 +33,13 @@ import ( "github.com/prometheus/client_golang/prometheus" ) +// resettableCollector is the interface implemented by prometheus.MetricVec +// that can be used by Prometheus to collect metrics and reset their values. +type resettableCollector interface { + prometheus.Collector + Reset() +} + var ( // TODO(a-robinson): Add unit tests for the handling of these metrics once // the upstream library supports it. @@ -86,6 +93,14 @@ var ( }, []string{"requestKind"}, ) + // RegisteredWatchers is a number of currently registered watchers splitted by resource. + RegisteredWatchers = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "apiserver_registered_watchers", + Help: "Number of currently registered watchers for a given resources", + }, + []string{"group", "version", "kind"}, + ) // Because of volatality of the base metric this is pre-aggregated one. Instead of reporing current usage all the time // it reports maximal usage during the last second. currentInflightRequests = prometheus.NewGaugeVec( @@ -96,6 +111,17 @@ var ( []string{"requestKind"}, ) kubectlExeRegexp = regexp.MustCompile(`^.*((?i:kubectl\.exe))`) + + metrics = []resettableCollector{ + requestCounter, + longRunningRequestGauge, + requestLatencies, + requestLatenciesSummary, + responseSizes, + DroppedRequests, + RegisteredWatchers, + currentInflightRequests, + } ) const ( @@ -105,15 +131,22 @@ const ( MutatingKind = "mutating" ) -func init() { - // Register all metrics. - prometheus.MustRegister(requestCounter) - prometheus.MustRegister(longRunningRequestGauge) - prometheus.MustRegister(requestLatencies) - prometheus.MustRegister(requestLatenciesSummary) - prometheus.MustRegister(responseSizes) - prometheus.MustRegister(DroppedRequests) - prometheus.MustRegister(currentInflightRequests) +var registerMetrics sync.Once + +// Register all metrics. +func Register() { + registerMetrics.Do(func() { + for _, metric := range metrics { + prometheus.MustRegister(metric) + } + }) +} + +// Reset all metrics. +func Reset() { + for _, metric := range metrics { + metric.Reset() + } } func UpdateInflightRequestMetrics(nonmutating, mutating int) { @@ -130,9 +163,9 @@ func Record(req *http.Request, requestInfo *request.RequestInfo, contentType str } scope := CleanScope(requestInfo) if requestInfo.IsResourceRequest { - MonitorRequest(req, strings.ToUpper(requestInfo.Verb), requestInfo.Resource, requestInfo.Subresource, contentType, scope, code, responseSizeInBytes, elapsed) + MonitorRequest(req, strings.ToUpper(requestInfo.Verb), requestInfo.Resource, requestInfo.Subresource, scope, contentType, code, responseSizeInBytes, elapsed) } else { - MonitorRequest(req, strings.ToUpper(requestInfo.Verb), "", requestInfo.Path, contentType, scope, code, responseSizeInBytes, elapsed) + MonitorRequest(req, strings.ToUpper(requestInfo.Verb), "", requestInfo.Path, scope, contentType, code, responseSizeInBytes, elapsed) } } @@ -170,13 +203,6 @@ func MonitorRequest(req *http.Request, verb, resource, subresource, scope, conte } } -func Reset() { - requestCounter.Reset() - requestLatencies.Reset() - requestLatenciesSummary.Reset() - responseSizes.Reset() -} - // InstrumentRouteFunc works like Prometheus' InstrumentHandlerFunc but wraps // the go-restful RouteFunction instead of a HandlerFunc plus some Kubernetes endpoint specific information. func InstrumentRouteFunc(verb, resource, subresource, scope string, routeFunc restful.RouteFunction) restful.RouteFunction { @@ -198,7 +224,7 @@ func InstrumentRouteFunc(verb, resource, subresource, scope string, routeFunc re routeFunc(request, response) - MonitorRequest(request.Request, verb, resource, subresource, scope, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Now().Sub(now)) + MonitorRequest(request.Request, verb, resource, subresource, scope, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Since(now)) }) } @@ -220,7 +246,7 @@ func InstrumentHandlerFunc(verb, resource, subresource, scope string, handler ht handler(w, req) - MonitorRequest(req, verb, resource, subresource, scope, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Now().Sub(now)) + MonitorRequest(req, verb, resource, subresource, scope, delegate.Header().Get("Content-Type"), delegate.Status(), delegate.ContentLength(), time.Since(now)) } } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/openapi/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/openapi/BUILD deleted file mode 100644 index a4b24bdc2..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/openapi/BUILD +++ /dev/null @@ -1,50 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["openapi_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/openapi", - deps = [ - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/openapi/testing:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["openapi.go"], - importpath = "k8s.io/apiserver/pkg/endpoints/openapi", - deps = [ - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/util:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/endpoints/openapi/testing:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go b/deps/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go index 7b8f3589e..e512f29b3 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/openapi/openapi.go @@ -143,12 +143,24 @@ func typeName(t reflect.Type) string { } // NewDefinitionNamer constructs a new DefinitionNamer to be used to customize OpenAPI spec. -func NewDefinitionNamer(s *runtime.Scheme) DefinitionNamer { - ret := DefinitionNamer{ +func NewDefinitionNamer(schemes ...*runtime.Scheme) *DefinitionNamer { + ret := &DefinitionNamer{ typeGroupVersionKinds: map[string]groupVersionKinds{}, } - for gvk, rtype := range s.AllKnownTypes() { - ret.typeGroupVersionKinds[typeName(rtype)] = append(ret.typeGroupVersionKinds[typeName(rtype)], gvkConvert(gvk)) + for _, s := range schemes { + for gvk, rtype := range s.AllKnownTypes() { + newGVK := gvkConvert(gvk) + exists := false + for _, existingGVK := range ret.typeGroupVersionKinds[typeName(rtype)] { + if newGVK == existingGVK { + exists = true + break + } + } + if !exists { + ret.typeGroupVersionKinds[typeName(rtype)] = append(ret.typeGroupVersionKinds[typeName(rtype)], newGVK) + } + } } for _, gvk := range ret.typeGroupVersionKinds { sort.Sort(gvk) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/request/BUILD b/deps/k8s.io/apiserver/pkg/endpoints/request/BUILD deleted file mode 100644 index ff4914bb2..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/request/BUILD +++ /dev/null @@ -1,63 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["requestinfo_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/endpoints/request", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "context.go", - "doc.go", - "requestcontext.go", - "requestinfo.go", - ], - importpath = "k8s.io/apiserver/pkg/endpoints/request", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = ["context_test.go"], - importpath = "k8s.io/apiserver/pkg/endpoints/request_test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/endpoints/request/context.go b/deps/k8s.io/apiserver/pkg/endpoints/request/context.go index e64facc5c..95166f5c4 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/request/context.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/request/context.go @@ -17,38 +17,13 @@ limitations under the License. package request import ( - stderrs "errors" - "time" + "context" - "golang.org/x/net/context" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/authentication/user" ) -// Context carries values across API boundaries. -// This context matches the context.Context interface -// (https://blog.golang.org/context), for the purposes -// of passing the api.Context through to the storage tier. -// TODO: Determine the extent that this abstraction+interface -// is used by the api, and whether we can remove. -type Context interface { - // Value returns the value associated with key or nil if none. - Value(key interface{}) interface{} - - // Deadline returns the time when this Context will be canceled, if any. - Deadline() (deadline time.Time, ok bool) - - // Done returns a channel that is closed when this Context is canceled - // or times out. - Done() <-chan struct{} - - // Err indicates why this context was canceled, after the Done channel - // is closed. - Err() error -} - // The key type is unexported to prevent collisions type key int @@ -59,101 +34,60 @@ const ( // userKey is the context key for the request user. userKey - // uidKey is the context key for the uid to assign to an object on create. - uidKey - - // userAgentKey is the context key for the request user agent. - userAgentKey - // auditKey is the context key for the audit event. auditKey ) // NewContext instantiates a base context object for request flows. -func NewContext() Context { +func NewContext() context.Context { return context.TODO() } // NewDefaultContext instantiates a base context object for request flows in the default namespace -func NewDefaultContext() Context { +func NewDefaultContext() context.Context { return WithNamespace(NewContext(), metav1.NamespaceDefault) } // WithValue returns a copy of parent in which the value associated with key is val. -func WithValue(parent Context, key interface{}, val interface{}) Context { - internalCtx, ok := parent.(context.Context) - if !ok { - panic(stderrs.New("Invalid context type")) - } - return context.WithValue(internalCtx, key, val) +func WithValue(parent context.Context, key interface{}, val interface{}) context.Context { + return context.WithValue(parent, key, val) } // WithNamespace returns a copy of parent in which the namespace value is set -func WithNamespace(parent Context, namespace string) Context { +func WithNamespace(parent context.Context, namespace string) context.Context { return WithValue(parent, namespaceKey, namespace) } // NamespaceFrom returns the value of the namespace key on the ctx -func NamespaceFrom(ctx Context) (string, bool) { +func NamespaceFrom(ctx context.Context) (string, bool) { namespace, ok := ctx.Value(namespaceKey).(string) return namespace, ok } // NamespaceValue returns the value of the namespace key on the ctx, or the empty string if none -func NamespaceValue(ctx Context) string { +func NamespaceValue(ctx context.Context) string { namespace, _ := NamespaceFrom(ctx) return namespace } -// WithNamespaceDefaultIfNone returns a context whose namespace is the default if and only if the parent context has no namespace value -func WithNamespaceDefaultIfNone(parent Context) Context { - namespace, ok := NamespaceFrom(parent) - if !ok || len(namespace) == 0 { - return WithNamespace(parent, metav1.NamespaceDefault) - } - return parent -} - // WithUser returns a copy of parent in which the user value is set -func WithUser(parent Context, user user.Info) Context { +func WithUser(parent context.Context, user user.Info) context.Context { return WithValue(parent, userKey, user) } // UserFrom returns the value of the user key on the ctx -func UserFrom(ctx Context) (user.Info, bool) { +func UserFrom(ctx context.Context) (user.Info, bool) { user, ok := ctx.Value(userKey).(user.Info) return user, ok } -// WithUID returns a copy of parent in which the uid value is set -func WithUID(parent Context, uid types.UID) Context { - return WithValue(parent, uidKey, uid) -} - -// UIDFrom returns the value of the uid key on the ctx -func UIDFrom(ctx Context) (types.UID, bool) { - uid, ok := ctx.Value(uidKey).(types.UID) - return uid, ok -} - -// WithUserAgent returns a copy of parent in which the user value is set -func WithUserAgent(parent Context, userAgent string) Context { - return WithValue(parent, userAgentKey, userAgent) -} - -// UserAgentFrom returns the value of the userAgent key on the ctx -func UserAgentFrom(ctx Context) (string, bool) { - userAgent, ok := ctx.Value(userAgentKey).(string) - return userAgent, ok -} - // WithAuditEvent returns set audit event struct. -func WithAuditEvent(parent Context, ev *audit.Event) Context { +func WithAuditEvent(parent context.Context, ev *audit.Event) context.Context { return WithValue(parent, auditKey, ev) } // AuditEventFrom returns the audit event struct on the ctx -func AuditEventFrom(ctx Context) *audit.Event { +func AuditEventFrom(ctx context.Context) *audit.Event { ev, _ := ctx.Value(auditKey).(*audit.Event) return ev } diff --git a/deps/k8s.io/apiserver/pkg/endpoints/request/requestcontext.go b/deps/k8s.io/apiserver/pkg/endpoints/request/requestcontext.go deleted file mode 100644 index 3dc771baf..000000000 --- a/deps/k8s.io/apiserver/pkg/endpoints/request/requestcontext.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package request - -import ( - "errors" - "net/http" - "sync" - - "github.com/golang/glog" -) - -// LongRunningRequestCheck is a predicate which is true for long-running http requests. -type LongRunningRequestCheck func(r *http.Request, requestInfo *RequestInfo) bool - -// RequestContextMapper keeps track of the context associated with a particular request -type RequestContextMapper interface { - // Get returns the context associated with the given request (if any), and true if the request has an associated context, and false if it does not. - Get(req *http.Request) (Context, bool) - // Update maps the request to the given context. If no context was previously associated with the request, an error is returned. - // Update should only be called with a descendant context of the previously associated context. - // Updating to an unrelated context may return an error in the future. - // The context associated with a request should only be updated by a limited set of callers. - // Valid examples include the authentication layer, or an audit/tracing layer. - Update(req *http.Request, context Context) error -} - -type requestContextMap struct { - contexts map[*http.Request]Context - lock sync.Mutex -} - -// NewRequestContextMapper returns a new RequestContextMapper. -// The returned mapper must be added as a request filter using NewRequestContextFilter. -func NewRequestContextMapper() RequestContextMapper { - return &requestContextMap{ - contexts: make(map[*http.Request]Context), - } -} - -// Get returns the context associated with the given request (if any), and true if the request has an associated context, and false if it does not. -// Get will only return a valid context when called from inside the filter chain set up by NewRequestContextFilter() -func (c *requestContextMap) Get(req *http.Request) (Context, bool) { - c.lock.Lock() - defer c.lock.Unlock() - context, ok := c.contexts[req] - return context, ok -} - -// Update maps the request to the given context. -// If no context was previously associated with the request, an error is returned and the context is ignored. -func (c *requestContextMap) Update(req *http.Request, context Context) error { - c.lock.Lock() - defer c.lock.Unlock() - if _, ok := c.contexts[req]; !ok { - return errors.New("No context associated") - } - // TODO: ensure the new context is a descendant of the existing one - c.contexts[req] = context - return nil -} - -// init maps the request to the given context and returns true if there was no context associated with the request already. -// if a context was already associated with the request, it ignores the given context and returns false. -// init is intentionally unexported to ensure that all init calls are paired with a remove after a request is handled -func (c *requestContextMap) init(req *http.Request, context Context) bool { - c.lock.Lock() - defer c.lock.Unlock() - if _, exists := c.contexts[req]; exists { - return false - } - c.contexts[req] = context - return true -} - -// remove is intentionally unexported to ensure that the context is not removed until a request is handled -func (c *requestContextMap) remove(req *http.Request) { - c.lock.Lock() - defer c.lock.Unlock() - delete(c.contexts, req) -} - -// WithRequestContext ensures there is a Context object associated with the request before calling the passed handler. -// After the passed handler runs, the context is cleaned up. -func WithRequestContext(handler http.Handler, mapper RequestContextMapper) http.Handler { - rcMap, ok := mapper.(*requestContextMap) - if !ok { - glog.Fatal("Unknown RequestContextMapper implementation.") - } - - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - if rcMap.init(req, NewContext()) { - // If we were the ones to successfully initialize, pair with a remove - defer rcMap.remove(req) - } - handler.ServeHTTP(w, req) - }) -} - -// IsEmpty returns true if there are no contexts registered, or an error if it could not be determined. Intended for use by tests. -func IsEmpty(requestsToContexts RequestContextMapper) (bool, error) { - if requestsToContexts, ok := requestsToContexts.(*requestContextMap); ok { - return len(requestsToContexts.contexts) == 0, nil - } - return true, errors.New("Unknown RequestContextMapper implementation") -} diff --git a/deps/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go b/deps/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go index ddbbde399..1520bb3c9 100644 --- a/deps/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go +++ b/deps/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go @@ -17,14 +17,22 @@ limitations under the License. package request import ( + "context" "fmt" "net/http" "strings" + "k8s.io/apimachinery/pkg/api/validation/path" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + + "github.com/golang/glog" ) +// LongRunningRequestCheck is a predicate which is true for long-running http requests. +type LongRunningRequestCheck func(r *http.Request, requestInfo *RequestInfo) bool + type RequestInfoResolver interface { NewRequestInfo(req *http.Request) (*RequestInfo, error) } @@ -199,19 +207,35 @@ func (r *RequestInfoFactory) NewRequestInfo(req *http.Request) (*RequestInfo, er // if there's no name on the request and we thought it was a get before, then the actual verb is a list or a watch if len(requestInfo.Name) == 0 && requestInfo.Verb == "get" { - // Assumes v1.ListOptions - // Any query value that is not 0 or false is considered true - // see apimachinery/pkg/runtime/conversion.go Convert_Slice_string_To_bool - if values := req.URL.Query()["watch"]; len(values) > 0 { - switch strings.ToLower(values[0]) { - case "false", "0": - requestInfo.Verb = "list" - default: - requestInfo.Verb = "watch" + opts := metainternalversion.ListOptions{} + if err := metainternalversion.ParameterCodec.DecodeParameters(req.URL.Query(), metav1.SchemeGroupVersion, &opts); err != nil { + // An error in parsing request will result in default to "list" and not setting "name" field. + glog.Errorf("Couldn't parse request %#v: %v", req.URL.Query(), err) + // Reset opts to not rely on partial results from parsing. + // However, if watch is set, let's report it. + opts = metainternalversion.ListOptions{} + if values := req.URL.Query()["watch"]; len(values) > 0 { + switch strings.ToLower(values[0]) { + case "false", "0": + default: + opts.Watch = true + } } + } + + if opts.Watch { + requestInfo.Verb = "watch" } else { requestInfo.Verb = "list" } + + if opts.FieldSelector != nil { + if name, ok := opts.FieldSelector.RequiresExactMatch("metadata.name"); ok { + if len(path.IsValidPathSegmentName(name)) == 0 { + requestInfo.Name = name + } + } + } } // if there's no name on the request and we thought it was a delete before, then the actual verb is deletecollection if len(requestInfo.Name) == 0 && requestInfo.Verb == "delete" { @@ -229,12 +253,12 @@ type requestInfoKeyType int const requestInfoKey requestInfoKeyType = iota // WithRequestInfo returns a copy of parent in which the request info value is set -func WithRequestInfo(parent Context, info *RequestInfo) Context { +func WithRequestInfo(parent context.Context, info *RequestInfo) context.Context { return WithValue(parent, requestInfoKey, info) } // RequestInfoFrom returns the value of the RequestInfo key on the ctx -func RequestInfoFrom(ctx Context) (*RequestInfo, bool) { +func RequestInfoFrom(ctx context.Context) (*RequestInfo, bool) { info, ok := ctx.Value(requestInfoKey).(*RequestInfo) return info, ok } diff --git a/deps/k8s.io/apiserver/pkg/features/BUILD b/deps/k8s.io/apiserver/pkg/features/BUILD deleted file mode 100644 index 1d45a428e..000000000 --- a/deps/k8s.io/apiserver/pkg/features/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["kube_features.go"], - importpath = "k8s.io/apiserver/pkg/features", - deps = ["//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/features/OWNERS b/deps/k8s.io/apiserver/pkg/features/OWNERS new file mode 100644 index 000000000..fe7b0144e --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/features/OWNERS @@ -0,0 +1,2 @@ +approvers: +- feature-approvers diff --git a/deps/k8s.io/apiserver/pkg/features/kube_features.go b/deps/k8s.io/apiserver/pkg/features/kube_features.go index 57bab8b00..61cf50aca 100644 --- a/deps/k8s.io/apiserver/pkg/features/kube_features.go +++ b/deps/k8s.io/apiserver/pkg/features/kube_features.go @@ -63,6 +63,14 @@ const ( // Allow API clients to retrieve resource lists in chunks rather than // all at once. APIListChunking utilfeature.Feature = "APIListChunking" + + // owner: @apelisse + // alpha: v1.12 + // + // Allow requests to be processed but not stored, so that + // validation, merging, mutation can be tested without + // committing. + DryRun utilfeature.Feature = "DryRun" ) func init() { @@ -78,4 +86,5 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS APIResponseCompression: {Default: false, PreRelease: utilfeature.Alpha}, Initializers: {Default: false, PreRelease: utilfeature.Alpha}, APIListChunking: {Default: true, PreRelease: utilfeature.Beta}, + DryRun: {Default: false, PreRelease: utilfeature.Alpha}, } diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/BUILD b/deps/k8s.io/apiserver/pkg/registry/generic/BUILD deleted file mode 100644 index 43471c043..000000000 --- a/deps/k8s.io/apiserver/pkg/registry/generic/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "matcher.go", - "options.go", - "storage_decorator.go", - ], - importpath = "k8s.io/apiserver/pkg/registry/generic", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/registry/generic/registry:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/registry/generic/rest:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/registry/generic/testing:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/OWNERS b/deps/k8s.io/apiserver/pkg/registry/generic/OWNERS index 429b15e49..75e139342 100755 --- a/deps/k8s.io/apiserver/pkg/registry/generic/OWNERS +++ b/deps/k8s.io/apiserver/pkg/registry/generic/OWNERS @@ -18,7 +18,6 @@ reviewers: - roberthbailey - ncdc - eparis -- timothysc - jlowdermilk - piosz - dims diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/options.go b/deps/k8s.io/apiserver/pkg/registry/generic/options.go index 2f5c850ff..af651371f 100644 --- a/deps/k8s.io/apiserver/pkg/registry/generic/options.go +++ b/deps/k8s.io/apiserver/pkg/registry/generic/options.go @@ -17,6 +17,8 @@ limitations under the License. package generic import ( + "time" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/storagebackend" @@ -30,6 +32,7 @@ type RESTOptions struct { EnableGarbageCollection bool DeleteCollectionWorkers int ResourcePrefix string + CountMetricPollPeriod time.Duration } // Implement RESTOptionsGetter so that RESTOptions can directly be used when available (i.e. tests) diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/registry/BUILD b/deps/k8s.io/apiserver/pkg/registry/generic/registry/BUILD deleted file mode 100644 index 76bac16f2..000000000 --- a/deps/k8s.io/apiserver/pkg/registry/generic/registry/BUILD +++ /dev/null @@ -1,98 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "decorated_watcher_test.go", - "store_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/registry/generic/registry", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/selection:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/testing:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature/testing:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "decorated_watcher.go", - "doc.go", - "storage_factory.go", - "store.go", - ], - importpath = "k8s.io/apiserver/pkg/registry/generic/registry", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/validation/path:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/errors:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend/factory:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go b/deps/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go index d131ba80e..f589dd1ec 100644 --- a/deps/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go +++ b/deps/k8s.io/apiserver/pkg/registry/generic/registry/decorated_watcher.go @@ -17,10 +17,9 @@ limitations under the License. package registry import ( + "context" "net/http" - "golang.org/x/net/context" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" ) diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go b/deps/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go new file mode 100644 index 000000000..08046fa22 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/registry/generic/registry/dryrun.go @@ -0,0 +1,117 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package registry + +import ( + "context" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/apiserver/pkg/storage" +) + +type DryRunnableStorage struct { + Storage storage.Interface + Codec runtime.Codec +} + +func (s *DryRunnableStorage) Versioner() storage.Versioner { + return s.Storage.Versioner() +} + +func (s *DryRunnableStorage) Create(ctx context.Context, key string, obj, out runtime.Object, ttl uint64, dryRun bool) error { + if dryRun { + if err := s.Storage.Get(ctx, key, "", out, false); err == nil { + return storage.NewKeyExistsError(key, 0) + } + s.copyInto(obj, out) + return nil + } + return s.Storage.Create(ctx, key, obj, out, ttl) +} + +func (s *DryRunnableStorage) Delete(ctx context.Context, key string, out runtime.Object, preconditions *storage.Preconditions, dryRun bool) error { + if dryRun { + if err := s.Storage.Get(ctx, key, "", out, false); err != nil { + return err + } + return preconditions.Check(key, out) + } + return s.Storage.Delete(ctx, key, out, preconditions) +} + +func (s *DryRunnableStorage) Watch(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate) (watch.Interface, error) { + return s.Storage.Watch(ctx, key, resourceVersion, p) +} + +func (s *DryRunnableStorage) WatchList(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate) (watch.Interface, error) { + return s.Storage.WatchList(ctx, key, resourceVersion, p) +} + +func (s *DryRunnableStorage) Get(ctx context.Context, key string, resourceVersion string, objPtr runtime.Object, ignoreNotFound bool) error { + return s.Storage.Get(ctx, key, resourceVersion, objPtr, ignoreNotFound) +} + +func (s *DryRunnableStorage) GetToList(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate, listObj runtime.Object) error { + return s.Storage.GetToList(ctx, key, resourceVersion, p, listObj) +} + +func (s *DryRunnableStorage) List(ctx context.Context, key string, resourceVersion string, p storage.SelectionPredicate, listObj runtime.Object) error { + return s.Storage.List(ctx, key, resourceVersion, p, listObj) +} + +func (s *DryRunnableStorage) GuaranteedUpdate( + ctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool, + preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, dryRun bool, suggestion ...runtime.Object) error { + if dryRun { + err := s.Storage.Get(ctx, key, "", ptrToType, ignoreNotFound) + if err != nil { + return err + } + err = preconditions.Check(key, ptrToType) + if err != nil { + return err + } + rev, err := s.Versioner().ObjectResourceVersion(ptrToType) + out, _, err := tryUpdate(ptrToType, storage.ResponseMeta{ResourceVersion: rev}) + if err != nil { + return err + } + s.copyInto(out, ptrToType) + return nil + } + return s.Storage.GuaranteedUpdate(ctx, key, ptrToType, ignoreNotFound, preconditions, tryUpdate, suggestion...) +} + +func (s *DryRunnableStorage) Count(key string) (int64, error) { + return s.Storage.Count(key) +} + +func (s *DryRunnableStorage) copyInto(in, out runtime.Object) error { + var data []byte + + data, err := runtime.Encode(s.Codec, in) + if err != nil { + return err + } + _, _, err = s.Codec.Decode(data, nil, out) + if err != nil { + return err + } + return nil + +} diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go b/deps/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go index c1ef906f6..fc93cc4d2 100644 --- a/deps/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go +++ b/deps/k8s.io/apiserver/pkg/registry/generic/registry/storage_factory.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/storage" + cacherstorage "k8s.io/apiserver/pkg/storage/cacher" etcdstorage "k8s.io/apiserver/pkg/storage/etcd" "k8s.io/apiserver/pkg/storage/storagebackend" "k8s.io/apiserver/pkg/storage/storagebackend/factory" @@ -49,7 +50,7 @@ func StorageWithCacher(capacity int) generic.StorageDecorator { // TODO: we would change this later to make storage always have cacher and hide low level KV layer inside. // Currently it has two layers of same storage interface -- cacher and low level kv. - cacherConfig := storage.CacherConfig{ + cacherConfig := cacherstorage.Config{ CacheCapacity: capacity, Storage: s, Versioner: etcdstorage.APIObjectVersioner{}, @@ -61,7 +62,7 @@ func StorageWithCacher(capacity int) generic.StorageDecorator { TriggerPublisherFunc: triggerFunc, Codec: storageConfig.Codec, } - cacher := storage.NewCacherFromConfig(cacherConfig) + cacher := cacherstorage.NewCacherFromConfig(cacherConfig) destroyFunc := func() { cacher.Stop() d() diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/registry/store.go b/deps/k8s.io/apiserver/pkg/registry/generic/registry/store.go index 0907f0154..615637d8d 100644 --- a/deps/k8s.io/apiserver/pkg/registry/generic/registry/store.go +++ b/deps/k8s.io/apiserver/pkg/registry/generic/registry/store.go @@ -17,6 +17,7 @@ limitations under the License. package registry import ( + "context" "fmt" "reflect" "strings" @@ -36,12 +37,15 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/storage" storeerr "k8s.io/apiserver/pkg/storage/errors" + "k8s.io/apiserver/pkg/storage/etcd/metrics" + "k8s.io/apiserver/pkg/util/dryrun" "github.com/golang/glog" ) @@ -97,14 +101,14 @@ type Store struct { // entire collection (listing and watching). // // KeyRootFunc and KeyFunc must be supplied together or not at all. - KeyRootFunc func(ctx genericapirequest.Context) string + KeyRootFunc func(ctx context.Context) string // KeyFunc returns the key for a specific object in the collection. // KeyFunc is called for Create/Update/Get/Delete. Note that 'namespace' // can be gotten from ctx. // // KeyFunc and KeyRootFunc must be supplied together or not at all. - KeyFunc func(ctx genericapirequest.Context, name string) (string, error) + KeyFunc func(ctx context.Context, name string) (string, error) // ObjectNameFunc returns the name of an object or an error. ObjectNameFunc func(obj runtime.Object) (string, error) @@ -169,8 +173,10 @@ type Store struct { // of items into tabular output. If unset, the default will be used. TableConvertor rest.TableConvertor - // Storage is the interface for the underlying storage for the resource. - Storage storage.Interface + // Storage is the interface for the underlying storage for the + // resource. It is wrapped into a "DryRunnableStorage" that will + // either pass-through or simply dry-run. + Storage DryRunnableStorage // Called to cleanup clients used by the underlying Storage; optional. DestroyFunc func() } @@ -181,11 +187,14 @@ var _ rest.Exporter = &Store{} var _ rest.TableConvertor = &Store{} var _ GenericStore = &Store{} -const OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again" +const ( + OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again" + resourceCountPollPeriodJitter = 1.2 +) // NamespaceKeyRootFunc is the default function for constructing storage paths // to resource directories enforcing namespace rules. -func NamespaceKeyRootFunc(ctx genericapirequest.Context, prefix string) string { +func NamespaceKeyRootFunc(ctx context.Context, prefix string) string { key := prefix ns, ok := genericapirequest.NamespaceFrom(ctx) if ok && len(ns) > 0 { @@ -197,7 +206,7 @@ func NamespaceKeyRootFunc(ctx genericapirequest.Context, prefix string) string { // NamespaceKeyFunc is the default function for constructing storage paths to // a resource relative to the given prefix enforcing namespace rules. If the // context does not contain a namespace, it errors. -func NamespaceKeyFunc(ctx genericapirequest.Context, prefix string, name string) (string, error) { +func NamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, error) { key := NamespaceKeyRootFunc(ctx, prefix) ns, ok := genericapirequest.NamespaceFrom(ctx) if !ok || len(ns) == 0 { @@ -215,7 +224,7 @@ func NamespaceKeyFunc(ctx genericapirequest.Context, prefix string, name string) // NoNamespaceKeyFunc is the default function for constructing storage paths // to a resource relative to the given prefix without a namespace. -func NoNamespaceKeyFunc(ctx genericapirequest.Context, prefix string, name string) (string, error) { +func NoNamespaceKeyFunc(ctx context.Context, prefix string, name string) (string, error) { if len(name) == 0 { return "", kubeerr.NewBadRequest("Name parameter required.") } @@ -236,6 +245,18 @@ func (e *Store) NewList() runtime.Object { return e.NewListFunc() } +// NamespaceScoped indicates whether the resource is namespaced +func (e *Store) NamespaceScoped() bool { + if e.CreateStrategy != nil { + return e.CreateStrategy.NamespaceScoped() + } + if e.UpdateStrategy != nil { + return e.UpdateStrategy.NamespaceScoped() + } + + panic("programmer error: no CRUD for resource, you're crazy, override NamespaceScoped too") +} + // GetCreateStrategy implements GenericStore. func (e *Store) GetCreateStrategy() rest.RESTCreateStrategy { return e.CreateStrategy @@ -258,7 +279,7 @@ func (e *Store) GetExportStrategy() rest.RESTExportStrategy { // List returns a list of items matching labels and field according to the // store's PredicateFunc. -func (e *Store) List(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { +func (e *Store) List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) { label := labels.Everything() if options != nil && options.LabelSelector != nil { label = options.LabelSelector @@ -281,7 +302,7 @@ func (e *Store) List(ctx genericapirequest.Context, options *metainternalversion // ListPredicate returns a list of all the items matching the given // SelectionPredicate. -func (e *Store) ListPredicate(ctx genericapirequest.Context, p storage.SelectionPredicate, options *metainternalversion.ListOptions) (runtime.Object, error) { +func (e *Store) ListPredicate(ctx context.Context, p storage.SelectionPredicate, options *metainternalversion.ListOptions) (runtime.Object, error) { if options == nil { // By default we should serve the request from etcd. options = &metainternalversion.ListOptions{ResourceVersion: ""} @@ -304,7 +325,7 @@ func (e *Store) ListPredicate(ctx genericapirequest.Context, p storage.Selection } // Create inserts a new item according to the unique key from the object. -func (e *Store) Create(ctx genericapirequest.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, includeUninitialized bool) (runtime.Object, error) { +func (e *Store) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) { if err := rest.BeforeCreate(e.CreateStrategy, ctx, obj); err != nil { return nil, err } @@ -330,7 +351,7 @@ func (e *Store) Create(ctx genericapirequest.Context, obj runtime.Object, create return nil, err } out := e.NewFunc() - if err := e.Storage.Create(ctx, key, obj, out, ttl); err != nil { + if err := e.Storage.Create(ctx, key, obj, out, ttl, dryrun.IsDryRun(options.DryRun)); err != nil { err = storeerr.InterpretCreateError(err, qualifiedResource, name) err = rest.CheckGeneratedNameError(e.CreateStrategy, err, obj) if !kubeerr.IsAlreadyExists(err) { @@ -355,11 +376,11 @@ func (e *Store) Create(ctx genericapirequest.Context, obj runtime.Object, create } } if e.Decorator != nil { - if err := e.Decorator(obj); err != nil { + if err := e.Decorator(out); err != nil { return nil, err } } - if !includeUninitialized { + if !options.IncludeUninitialized { return e.WaitForInitialized(ctx, out) } return out, nil @@ -367,7 +388,7 @@ func (e *Store) Create(ctx genericapirequest.Context, obj runtime.Object, create // WaitForInitialized holds until the object is initialized, or returns an error if the default limit expires. // This method is exposed publicly for consumers of generic rest tooling. -func (e *Store) WaitForInitialized(ctx genericapirequest.Context, obj runtime.Object) (runtime.Object, error) { +func (e *Store) WaitForInitialized(ctx context.Context, obj runtime.Object) (runtime.Object, error) { // return early if we don't have initializers, or if they've completed already accessor, err := meta.Accessor(obj) if err != nil { @@ -440,6 +461,7 @@ func (e *Store) WaitForInitialized(ctx genericapirequest.Context, obj runtime.Ob } } case <-ctx.Done(): + return nil, ctx.Err() } } } @@ -447,7 +469,7 @@ func (e *Store) WaitForInitialized(ctx genericapirequest.Context, obj runtime.Ob // shouldDeleteDuringUpdate checks if a Update is removing all the object's // finalizers. If so, it further checks if the object's // DeletionGracePeriodSeconds is 0. -func (e *Store) shouldDeleteDuringUpdate(ctx genericapirequest.Context, key string, obj, existing runtime.Object) bool { +func (e *Store) shouldDeleteDuringUpdate(ctx context.Context, key string, obj, existing runtime.Object) bool { newMeta, err := meta.Accessor(obj) if err != nil { utilruntime.HandleError(err) @@ -463,7 +485,7 @@ func (e *Store) shouldDeleteDuringUpdate(ctx genericapirequest.Context, key stri // shouldDeleteForFailedInitialization returns true if the provided object is initializing and has // a failure recorded. -func (e *Store) shouldDeleteForFailedInitialization(ctx genericapirequest.Context, obj runtime.Object) bool { +func (e *Store) shouldDeleteForFailedInitialization(ctx context.Context, obj runtime.Object) bool { m, err := meta.Accessor(obj) if err != nil { utilruntime.HandleError(err) @@ -477,10 +499,10 @@ func (e *Store) shouldDeleteForFailedInitialization(ctx genericapirequest.Contex // deleteWithoutFinalizers handles deleting an object ignoring its finalizer list. // Used for objects that are either been finalized or have never initialized. -func (e *Store) deleteWithoutFinalizers(ctx genericapirequest.Context, name, key string, obj runtime.Object, preconditions *storage.Preconditions) (runtime.Object, bool, error) { +func (e *Store) deleteWithoutFinalizers(ctx context.Context, name, key string, obj runtime.Object, preconditions *storage.Preconditions, dryRun bool) (runtime.Object, bool, error) { out := e.NewFunc() glog.V(6).Infof("going to delete %s from registry, triggered by update", name) - if err := e.Storage.Delete(ctx, key, out, preconditions); err != nil { + if err := e.Storage.Delete(ctx, key, out, preconditions, dryRun); err != nil { // Deletion is racy, i.e., there could be multiple update // requests to remove all finalizers from the object, so we // ignore the NotFound error. @@ -503,7 +525,7 @@ func (e *Store) deleteWithoutFinalizers(ctx genericapirequest.Context, name, key // Update performs an atomic update and set of the object. Returns the result of the update // or an error. If the registry allows create-on-update, the create flow will be executed. // A bool is returned along with the object and any errors, to indicate object creation. -func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) (runtime.Object, bool, error) { +func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) { key, err := e.KeyFunc(ctx, name) if err != nil { return nil, false, err @@ -545,7 +567,7 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. return nil, nil, err } if version == 0 { - if !e.UpdateStrategy.AllowCreateOnUpdate() { + if !e.UpdateStrategy.AllowCreateOnUpdate() && !forceAllowCreate { return nil, nil, kubeerr.NewNotFound(qualifiedResource, name) } creating = true @@ -580,19 +602,15 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. } else { // Check if the object's resource version matches the latest // resource version. - newVersion, err := e.Storage.Versioner().ObjectResourceVersion(obj) - if err != nil { - return nil, nil, err - } - if newVersion == 0 { + if resourceVersion == 0 { // TODO: The Invalid error should have a field for Resource. // After that field is added, we should fill the Resource and // leave the Kind field empty. See the discussion in #18526. qualifiedKind := schema.GroupKind{Group: qualifiedResource.Group, Kind: qualifiedResource.Resource} - fieldErrList := field.ErrorList{field.Invalid(field.NewPath("metadata").Child("resourceVersion"), newVersion, "must be specified for an update")} + fieldErrList := field.ErrorList{field.Invalid(field.NewPath("metadata").Child("resourceVersion"), resourceVersion, "must be specified for an update")} return nil, nil, kubeerr.NewInvalid(qualifiedKind, name, fieldErrList) } - if newVersion != version { + if resourceVersion != version { return nil, nil, kubeerr.NewConflict(qualifiedResource, name, fmt.Errorf(OptimisticLockErrorMsg)) } } @@ -618,12 +636,12 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. return obj, &ttl, nil } return obj, nil, nil - }) + }, dryrun.IsDryRun(options.DryRun)) if err != nil { // delete the object if err == errEmptiedFinalizers { - return e.deleteWithoutFinalizers(ctx, name, key, deleteObj, storagePreconditions) + return e.deleteWithoutFinalizers(ctx, name, key, deleteObj, storagePreconditions, dryrun.IsDryRun(options.DryRun)) } if creating { err = storeerr.InterpretCreateError(err, qualifiedResource, name) @@ -635,7 +653,7 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. } if e.shouldDeleteForFailedInitialization(ctx, out) { - return e.deleteWithoutFinalizers(ctx, name, key, out, storagePreconditions) + return e.deleteWithoutFinalizers(ctx, name, key, out, storagePreconditions, dryrun.IsDryRun(options.DryRun)) } if creating { @@ -660,7 +678,7 @@ func (e *Store) Update(ctx genericapirequest.Context, name string, objInfo rest. } // Get retrieves the item from storage. -func (e *Store) Get(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { +func (e *Store) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) { obj := e.NewFunc() key, err := e.KeyFunc(ctx, name) if err != nil { @@ -679,7 +697,7 @@ func (e *Store) Get(ctx genericapirequest.Context, name string, options *metav1. // qualifiedResourceFromContext attempts to retrieve a GroupResource from the context's request info. // If the context has no request info, DefaultQualifiedResource is used. -func (e *Store) qualifiedResourceFromContext(ctx genericapirequest.Context) schema.GroupResource { +func (e *Store) qualifiedResourceFromContext(ctx context.Context) schema.GroupResource { if info, ok := genericapirequest.RequestInfoFrom(ctx); ok { return schema.GroupResource{Group: info.APIGroup, Resource: info.Resource} } @@ -698,7 +716,7 @@ var ( // priority, there are three factors affect whether to add/remove the // FinalizerOrphanDependents: options, existing finalizers of the object, // and e.DeleteStrategy.DefaultGarbageCollectionPolicy. -func shouldOrphanDependents(ctx genericapirequest.Context, e *Store, accessor metav1.Object, options *metav1.DeleteOptions) bool { +func shouldOrphanDependents(ctx context.Context, e *Store, accessor metav1.Object, options *metav1.DeleteOptions) bool { // Get default GC policy from this REST object type gcStrategy, ok := e.DeleteStrategy.(rest.GarbageCollectionDeleteStrategy) var defaultGCPolicy rest.GarbageCollectionPolicy @@ -748,7 +766,7 @@ func shouldOrphanDependents(ctx genericapirequest.Context, e *Store, accessor me // priority, there are three factors affect whether to add/remove the // FinalizerDeleteDependents: options, existing finalizers of the object, and // e.DeleteStrategy.DefaultGarbageCollectionPolicy. -func shouldDeleteDependents(ctx genericapirequest.Context, e *Store, accessor metav1.Object, options *metav1.DeleteOptions) bool { +func shouldDeleteDependents(ctx context.Context, e *Store, accessor metav1.Object, options *metav1.DeleteOptions) bool { // Get default GC policy from this REST object type if gcStrategy, ok := e.DeleteStrategy.(rest.GarbageCollectionDeleteStrategy); ok && gcStrategy.DefaultGarbageCollectionPolicy(ctx) == rest.Unsupported { // return false to indicate that we should NOT delete in foreground @@ -791,7 +809,7 @@ func shouldDeleteDependents(ctx genericapirequest.Context, e *Store, accessor me // The finalizers returned are intended to be handled by the garbage collector. // If garbage collection is disabled for the store, this function returns false // to ensure finalizers aren't set which will never be cleared. -func deletionFinalizersForGarbageCollection(ctx genericapirequest.Context, e *Store, accessor metav1.Object, options *metav1.DeleteOptions) (bool, []string) { +func deletionFinalizersForGarbageCollection(ctx context.Context, e *Store, accessor metav1.Object, options *metav1.DeleteOptions) (bool, []string) { if !e.EnableGarbageCollection { return false, []string{} } @@ -855,7 +873,7 @@ func markAsDeleting(obj runtime.Object) (err error) { // should be deleted immediately // 4. a new output object with the state that was updated // 5. a copy of the last existing state of the object -func (e *Store) updateForGracefulDeletionAndFinalizers(ctx genericapirequest.Context, name, key string, options *metav1.DeleteOptions, preconditions storage.Preconditions, in runtime.Object) (err error, ignoreNotFound, deleteImmediately bool, out, lastExisting runtime.Object) { +func (e *Store) updateForGracefulDeletionAndFinalizers(ctx context.Context, name, key string, options *metav1.DeleteOptions, preconditions storage.Preconditions, in runtime.Object) (err error, ignoreNotFound, deleteImmediately bool, out, lastExisting runtime.Object) { lastGraceful := int64(0) var pendingFinalizers bool out = e.NewFunc() @@ -904,6 +922,7 @@ func (e *Store) updateForGracefulDeletionAndFinalizers(ctx genericapirequest.Con lastExisting = existing return existing, nil }), + dryrun.IsDryRun(options.DryRun), ) switch err { case nil: @@ -935,7 +954,7 @@ func (e *Store) updateForGracefulDeletionAndFinalizers(ctx genericapirequest.Con } // Delete removes the item from storage. -func (e *Store) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) { +func (e *Store) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) { key, err := e.KeyFunc(ctx, name) if err != nil { return nil, false, err @@ -985,10 +1004,22 @@ func (e *Store) Delete(ctx genericapirequest.Context, name string, options *meta return out, false, err } + // Going further in this function is not useful when we are + // performing a dry-run request. Worse, it will actually + // override "out" with the version of the object in database + // that doesn't have the finalizer and deletiontimestamp set + // (because the update above was dry-run too). If we already + // have that version available, let's just return it now, + // otherwise, we can call dry-run delete that will get us the + // latest version of the object. + if dryrun.IsDryRun(options.DryRun) && out != nil { + return out, true, nil + } + // delete immediately, or no graceful deletion supported glog.V(6).Infof("going to delete %s from registry: ", name) out = e.NewFunc() - if err := e.Storage.Delete(ctx, key, out, &preconditions); err != nil { + if err := e.Storage.Delete(ctx, key, out, &preconditions, dryrun.IsDryRun(options.DryRun)); err != nil { // Please refer to the place where we set ignoreNotFound for the reason // why we ignore the NotFound error . if storage.IsNotFound(err) && ignoreNotFound && lastExisting != nil { @@ -1013,7 +1044,7 @@ func (e *Store) Delete(ctx genericapirequest.Context, name string, options *meta // are removing all objects of a given type) with the current API (it's technically // possibly with storage API, but watch is not delivered correctly then). // It will be possible to fix it with v3 etcd API. -func (e *Store) DeleteCollection(ctx genericapirequest.Context, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error) { +func (e *Store) DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error) { if listOptions == nil { listOptions = &metainternalversion.ListOptions{} } else { @@ -1065,11 +1096,7 @@ func (e *Store) DeleteCollection(ctx genericapirequest.Context, options *metav1. }) defer wg.Done() - for { - index, ok := <-toProcess - if !ok { - return - } + for index := range toProcess { accessor, err := meta.Accessor(items[index]) if err != nil { errs <- err @@ -1094,7 +1121,7 @@ func (e *Store) DeleteCollection(ctx genericapirequest.Context, options *metav1. // finalizeDelete runs the Store's AfterDelete hook if runHooks is set and // returns the decorated deleted object if appropriate. -func (e *Store) finalizeDelete(ctx genericapirequest.Context, obj runtime.Object, runHooks bool) (runtime.Object, error) { +func (e *Store) finalizeDelete(ctx context.Context, obj runtime.Object, runHooks bool) (runtime.Object, error) { if runHooks && e.AfterDelete != nil { if err := e.AfterDelete(obj); err != nil { return nil, err @@ -1129,7 +1156,7 @@ func (e *Store) finalizeDelete(ctx genericapirequest.Context, obj runtime.Object // WatchPredicate. If possible, you should customize PredicateFunc to produce // a matcher that matches by key. SelectionPredicate does this for you // automatically. -func (e *Store) Watch(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { +func (e *Store) Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) { label := labels.Everything() if options != nil && options.LabelSelector != nil { label = options.LabelSelector @@ -1149,7 +1176,7 @@ func (e *Store) Watch(ctx genericapirequest.Context, options *metainternalversio } // WatchPredicate starts a watch for the items that matches. -func (e *Store) WatchPredicate(ctx genericapirequest.Context, p storage.SelectionPredicate, resourceVersion string) (watch.Interface, error) { +func (e *Store) WatchPredicate(ctx context.Context, p storage.SelectionPredicate, resourceVersion string) (watch.Interface, error) { if name, ok := p.MatchesSingle(); ok { if key, err := e.KeyFunc(ctx, name); err == nil { w, err := e.Storage.Watch(ctx, key, resourceVersion, p) @@ -1211,7 +1238,7 @@ func exportObjectMeta(accessor metav1.Object, exact bool) { } // Export implements the rest.Exporter interface -func (e *Store) Export(ctx genericapirequest.Context, name string, opts metav1.ExportOptions) (runtime.Object, error) { +func (e *Store) Export(ctx context.Context, name string, opts metav1.ExportOptions) (runtime.Object, error) { obj, err := e.Get(ctx, name, &metav1.GetOptions{}) if err != nil { return nil, err @@ -1301,17 +1328,17 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { // Set the default behavior for storage key generation if e.KeyRootFunc == nil && e.KeyFunc == nil { if isNamespaced { - e.KeyRootFunc = func(ctx genericapirequest.Context) string { + e.KeyRootFunc = func(ctx context.Context) string { return NamespaceKeyRootFunc(ctx, prefix) } - e.KeyFunc = func(ctx genericapirequest.Context, name string) (string, error) { + e.KeyFunc = func(ctx context.Context, name string) (string, error) { return NamespaceKeyFunc(ctx, prefix, name) } } else { - e.KeyRootFunc = func(ctx genericapirequest.Context) string { + e.KeyRootFunc = func(ctx context.Context) string { return prefix } - e.KeyFunc = func(ctx genericapirequest.Context, name string) (string, error) { + e.KeyFunc = func(ctx context.Context, name string) (string, error) { return NoNamespaceKeyFunc(ctx, prefix, name) } } @@ -1353,8 +1380,9 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { } } - if e.Storage == nil { - e.Storage, e.DestroyFunc = opts.Decorator( + if e.Storage.Storage == nil { + e.Storage.Codec = opts.StorageConfig.Codec + e.Storage.Storage, e.DestroyFunc = opts.Decorator( opts.StorageConfig, e.NewFunc(), prefix, @@ -1363,12 +1391,41 @@ func (e *Store) CompleteWithOptions(options *generic.StoreOptions) error { attrFunc, triggerFunc, ) + + if opts.CountMetricPollPeriod > 0 { + stopFunc := e.startObservingCount(opts.CountMetricPollPeriod) + previousDestroy := e.DestroyFunc + e.DestroyFunc = func() { + stopFunc() + if previousDestroy != nil { + previousDestroy() + } + } + } } return nil } -func (e *Store) ConvertToTable(ctx genericapirequest.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error) { +// startObservingCount starts monitoring given prefix and periodically updating metrics. It returns a function to stop collection. +func (e *Store) startObservingCount(period time.Duration) func() { + prefix := e.KeyRootFunc(genericapirequest.NewContext()) + resourceName := e.DefaultQualifiedResource.String() + glog.V(2).Infof("Monitoring %v count at /%v", resourceName, prefix) + stopCh := make(chan struct{}) + go wait.JitterUntil(func() { + count, err := e.Storage.Count(prefix) + if err != nil { + glog.V(5).Infof("Failed to update storage count metric: %v", err) + metrics.UpdateObjectCount(resourceName, -1) + } else { + metrics.UpdateObjectCount(resourceName, count) + } + }, period, resourceCountPollPeriodJitter, true, stopCh) + return func() { close(stopCh) } +} + +func (e *Store) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error) { if e.TableConvertor != nil { return e.TableConvertor.ConvertToTable(ctx, object, tableOptions) } diff --git a/deps/k8s.io/apiserver/pkg/registry/generic/testing/tester.go b/deps/k8s.io/apiserver/pkg/registry/generic/testing/tester.go new file mode 100644 index 000000000..1ee637f09 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/registry/generic/testing/tester.go @@ -0,0 +1,202 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package tester + +import ( + "context" + "fmt" + "testing" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" + "k8s.io/apiserver/pkg/registry/rest/resttest" + etcdstorage "k8s.io/apiserver/pkg/storage/etcd" + storagetesting "k8s.io/apiserver/pkg/storage/testing" +) + +type Tester struct { + tester *resttest.Tester + storage *genericregistry.Store +} +type UpdateFunc func(runtime.Object) runtime.Object + +func New(t *testing.T, storage *genericregistry.Store) *Tester { + return &Tester{ + tester: resttest.New(t, storage), + storage: storage, + } +} + +func (t *Tester) TestNamespace() string { + return t.tester.TestNamespace() +} + +func (t *Tester) ClusterScope() *Tester { + t.tester = t.tester.ClusterScope() + return t +} + +func (t *Tester) Namer(namer func(int) string) *Tester { + t.tester = t.tester.Namer(namer) + return t +} + +func (t *Tester) AllowCreateOnUpdate() *Tester { + t.tester = t.tester.AllowCreateOnUpdate() + return t +} + +func (t *Tester) GeneratesName() *Tester { + t.tester = t.tester.GeneratesName() + return t +} + +func (t *Tester) ReturnDeletedObject() *Tester { + t.tester = t.tester.ReturnDeletedObject() + return t +} + +func (t *Tester) TestCreate(valid runtime.Object, invalid ...runtime.Object) { + t.tester.TestCreate( + valid, + t.createObject, + t.getObject, + invalid..., + ) +} + +func (t *Tester) TestUpdate(valid runtime.Object, validUpdateFunc UpdateFunc, invalidUpdateFunc ...UpdateFunc) { + var invalidFuncs []resttest.UpdateFunc + for _, f := range invalidUpdateFunc { + invalidFuncs = append(invalidFuncs, resttest.UpdateFunc(f)) + } + t.tester.TestUpdate( + valid, + t.createObject, + t.getObject, + resttest.UpdateFunc(validUpdateFunc), + invalidFuncs..., + ) +} + +func (t *Tester) TestDelete(valid runtime.Object) { + t.tester.TestDelete( + valid, + t.createObject, + t.getObject, + errors.IsNotFound, + ) +} + +func (t *Tester) TestDeleteGraceful(valid runtime.Object, expectedGrace int64) { + t.tester.TestDeleteGraceful( + valid, + t.createObject, + t.getObject, + expectedGrace, + ) +} + +func (t *Tester) TestGet(valid runtime.Object) { + t.tester.TestGet(valid) +} + +func (t *Tester) TestList(valid runtime.Object) { + t.tester.TestList( + valid, + t.setObjectsForList, + ) +} + +func (t *Tester) TestWatch(valid runtime.Object, labelsPass, labelsFail []labels.Set, fieldsPass, fieldsFail []fields.Set) { + t.tester.TestWatch( + valid, + t.emitObject, + labelsPass, + labelsFail, + fieldsPass, + fieldsFail, + // TODO: This should be filtered, the registry should not be aware of this level of detail + []string{etcdstorage.EtcdCreate, etcdstorage.EtcdDelete}, + ) +} + +// Helper functions + +func (t *Tester) getObject(ctx context.Context, obj runtime.Object) (runtime.Object, error) { + accessor, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + + result, err := t.storage.Get(ctx, accessor.GetName(), &metav1.GetOptions{}) + if err != nil { + return nil, err + } + return result, nil +} + +func (t *Tester) createObject(ctx context.Context, obj runtime.Object) error { + accessor, err := meta.Accessor(obj) + if err != nil { + return err + } + key, err := t.storage.KeyFunc(ctx, accessor.GetName()) + if err != nil { + return err + } + return t.storage.Storage.Create(ctx, key, obj, nil, 0, false) +} + +func (t *Tester) setObjectsForList(objects []runtime.Object) []runtime.Object { + key := t.storage.KeyRootFunc(t.tester.TestContext()) + if _, err := t.storage.DeleteCollection(t.tester.TestContext(), nil, nil); err != nil { + t.tester.Errorf("unable to clear collection: %v", err) + return nil + } + if err := storagetesting.CreateObjList(key, t.storage.Storage.Storage, objects); err != nil { + t.tester.Errorf("unexpected error: %v", err) + return nil + } + return objects +} + +func (t *Tester) emitObject(obj runtime.Object, action string) error { + ctx := t.tester.TestContext() + var err error + + switch action { + case etcdstorage.EtcdCreate: + err = t.createObject(ctx, obj) + case etcdstorage.EtcdDelete: + var accessor metav1.Object + accessor, err = meta.Accessor(obj) + if err != nil { + return err + } + _, _, err = t.storage.Delete(ctx, accessor.GetName(), nil) + default: + err = fmt.Errorf("unexpected action: %v", action) + } + + return err +} diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/BUILD b/deps/k8s.io/apiserver/pkg/registry/rest/BUILD deleted file mode 100644 index e3ab6e10d..000000000 --- a/deps/k8s.io/apiserver/pkg/registry/rest/BUILD +++ /dev/null @@ -1,73 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["meta_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/registry/rest", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "create.go", - "delete.go", - "doc.go", - "export.go", - "meta.go", - "rest.go", - "table.go", - "update.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/apiserver/pkg/registry/rest", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/validation/path:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/uuid:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/names:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/registry/rest/resttest:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/OWNERS b/deps/k8s.io/apiserver/pkg/registry/rest/OWNERS index 9d8627ad1..6427750a9 100755 --- a/deps/k8s.io/apiserver/pkg/registry/rest/OWNERS +++ b/deps/k8s.io/apiserver/pkg/registry/rest/OWNERS @@ -14,7 +14,6 @@ reviewers: - roberthbailey - ncdc - eparis -- timothysc - dims - hongchaodeng - krousey diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/create.go b/deps/k8s.io/apiserver/pkg/registry/rest/create.go index 1f998332e..388ca5233 100644 --- a/deps/k8s.io/apiserver/pkg/registry/rest/create.go +++ b/deps/k8s.io/apiserver/pkg/registry/rest/create.go @@ -17,6 +17,8 @@ limitations under the License. package rest import ( + "context" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" genericvalidation "k8s.io/apimachinery/pkg/api/validation" @@ -26,7 +28,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/admission" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/storage/names" utilfeature "k8s.io/apiserver/pkg/util/feature" @@ -52,12 +53,12 @@ type RESTCreateStrategy interface { // status. Clear the status because status changes are internal. External // callers of an api (users) should not be setting an initial status on // newly created objects. - PrepareForCreate(ctx genericapirequest.Context, obj runtime.Object) + PrepareForCreate(ctx context.Context, obj runtime.Object) // Validate returns an ErrorList with validation errors or nil. Validate // is invoked after default fields in the object have been filled in // before the object is persisted. This method should not mutate the // object. - Validate(ctx genericapirequest.Context, obj runtime.Object) field.ErrorList + Validate(ctx context.Context, obj runtime.Object) field.ErrorList // Canonicalize allows an object to be mutated into a canonical form. This // ensures that code that operates on these objects can rely on the common // form for things like comparison. Canonicalize is invoked after @@ -70,7 +71,7 @@ type RESTCreateStrategy interface { // BeforeCreate ensures that common operations for all resources are performed on creation. It only returns // errors that can be converted to api.Status. It invokes PrepareForCreate, then GenerateName, then Validate. // It returns nil if the object should be created. -func BeforeCreate(strategy RESTCreateStrategy, ctx genericapirequest.Context, obj runtime.Object) error { +func BeforeCreate(strategy RESTCreateStrategy, ctx context.Context, obj runtime.Object) error { objectMeta, kind, kerr := objectMetaAndKind(strategy, obj) if kerr != nil { return kerr @@ -80,13 +81,13 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx genericapirequest.Context, ob if !ValidNamespace(ctx, objectMeta) { return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") } - } else { + } else if len(objectMeta.GetNamespace()) > 0 { objectMeta.SetNamespace(metav1.NamespaceNone) } objectMeta.SetDeletionTimestamp(nil) objectMeta.SetDeletionGracePeriodSeconds(nil) strategy.PrepareForCreate(ctx, obj) - FillObjectMetaSystemFields(ctx, objectMeta) + FillObjectMetaSystemFields(objectMeta) if len(objectMeta.GetGenerateName()) > 0 && len(objectMeta.GetName()) == 0 { objectMeta.SetName(strategy.GenerateName(objectMeta.GetGenerateName())) } @@ -97,7 +98,9 @@ func BeforeCreate(strategy RESTCreateStrategy, ctx genericapirequest.Context, ob } // ClusterName is ignored and should not be saved - objectMeta.SetClusterName("") + if len(objectMeta.GetClusterName()) > 0 { + objectMeta.SetClusterName("") + } if errs := strategy.Validate(ctx, obj); len(errs) > 0 { return errors.NewInvalid(kind.GroupKind(), objectMeta.GetName(), errs) @@ -169,6 +172,7 @@ func AdmissionToValidateObjectFunc(admit admission.Interface, staticAttributes a staticAttributes.GetResource(), staticAttributes.GetSubresource(), staticAttributes.GetOperation(), + staticAttributes.IsDryRun(), staticAttributes.GetUserInfo(), ) if !validatingAdmission.Handles(finalAttributes.GetOperation()) { diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/delete.go b/deps/k8s.io/apiserver/pkg/registry/rest/delete.go index 11a1474c8..7c39f6be1 100644 --- a/deps/k8s.io/apiserver/pkg/registry/rest/delete.go +++ b/deps/k8s.io/apiserver/pkg/registry/rest/delete.go @@ -17,6 +17,7 @@ limitations under the License. package rest import ( + "context" "fmt" "time" @@ -25,7 +26,6 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/validation" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) // RESTDeleteStrategy defines deletion behavior on an object that follows Kubernetes @@ -48,7 +48,7 @@ const ( // orphan dependents by default. type GarbageCollectionDeleteStrategy interface { // DefaultGarbageCollectionPolicy returns the default garbage collection behavior. - DefaultGarbageCollectionPolicy(ctx genericapirequest.Context) GarbageCollectionPolicy + DefaultGarbageCollectionPolicy(ctx context.Context) GarbageCollectionPolicy } // RESTGracefulDeleteStrategy must be implemented by the registry that supports @@ -56,7 +56,7 @@ type GarbageCollectionDeleteStrategy interface { type RESTGracefulDeleteStrategy interface { // CheckGracefulDelete should return true if the object can be gracefully deleted and set // any default values on the DeleteOptions. - CheckGracefulDelete(ctx genericapirequest.Context, obj runtime.Object, options *metav1.DeleteOptions) bool + CheckGracefulDelete(ctx context.Context, obj runtime.Object, options *metav1.DeleteOptions) bool } // BeforeDelete tests whether the object can be gracefully deleted. @@ -68,13 +68,13 @@ type RESTGracefulDeleteStrategy interface { // where we set deletionTimestamp is pkg/registry/generic/registry/store.go. // This function is responsible for setting deletionTimestamp during gracefulDeletion, // other one for cascading deletions. -func BeforeDelete(strategy RESTDeleteStrategy, ctx genericapirequest.Context, obj runtime.Object, options *metav1.DeleteOptions) (graceful, gracefulPending bool, err error) { +func BeforeDelete(strategy RESTDeleteStrategy, ctx context.Context, obj runtime.Object, options *metav1.DeleteOptions) (graceful, gracefulPending bool, err error) { objectMeta, gvk, kerr := objectMetaAndKind(strategy, obj) if kerr != nil { return false, false, kerr } if errs := validation.ValidateDeleteOptions(options); len(errs) > 0 { - return false, false, errors.NewInvalid(schema.GroupKind{}, "", errs) + return false, false, errors.NewInvalid(schema.GroupKind{Group: metav1.GroupName, Kind: "DeleteOptions"}, "", errs) } // Checking the Preconditions here to fail early. They'll be enforced later on when we actually do the deletion, too. if options.Preconditions != nil && options.Preconditions.UID != nil && *options.Preconditions.UID != objectMeta.GetUID() { diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/export.go b/deps/k8s.io/apiserver/pkg/registry/rest/export.go index b0fc292e2..b3fd8af30 100644 --- a/deps/k8s.io/apiserver/pkg/registry/rest/export.go +++ b/deps/k8s.io/apiserver/pkg/registry/rest/export.go @@ -17,8 +17,9 @@ limitations under the License. package rest import ( + "context" + "k8s.io/apimachinery/pkg/runtime" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) // RESTExportStrategy is the interface that defines how to export a Kubernetes @@ -29,5 +30,5 @@ import ( type RESTExportStrategy interface { // Export strips fields that can not be set by the user. If 'exact' is false // fields specific to the cluster are also stripped - Export(ctx genericapirequest.Context, obj runtime.Object, exact bool) error + Export(ctx context.Context, obj runtime.Object, exact bool) error } diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/meta.go b/deps/k8s.io/apiserver/pkg/registry/rest/meta.go index 7257833ba..add6044ab 100644 --- a/deps/k8s.io/apiserver/pkg/registry/rest/meta.go +++ b/deps/k8s.io/apiserver/pkg/registry/rest/meta.go @@ -17,30 +17,24 @@ limitations under the License. package rest import ( + "context" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/uuid" genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) // FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta. -func FillObjectMetaSystemFields(ctx genericapirequest.Context, meta metav1.Object) { +func FillObjectMetaSystemFields(meta metav1.Object) { meta.SetCreationTimestamp(metav1.Now()) - // allows admission controllers to assign a UID earlier in the request processing - // to support tracking resources pending creation. - uid, found := genericapirequest.UIDFrom(ctx) - if !found { - uid = uuid.NewUUID() - } - meta.SetUID(uid) + meta.SetUID(uuid.NewUUID()) meta.SetSelfLink("") } // ValidNamespace returns false if the namespace on the context differs from // the resource. If the resource has no namespace, it is set to the value in // the context. -// -// TODO(sttts): move into pkg/genericapiserver/endpoints -func ValidNamespace(ctx genericapirequest.Context, resource metav1.Object) bool { +func ValidNamespace(ctx context.Context, resource metav1.Object) bool { ns, ok := genericapirequest.NamespaceFrom(ctx) if len(resource.GetNamespace()) == 0 { resource.SetNamespace(ns) diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/rest.go b/deps/k8s.io/apiserver/pkg/registry/rest/rest.go index 8cf9689ac..572f924e7 100644 --- a/deps/k8s.io/apiserver/pkg/registry/rest/rest.go +++ b/deps/k8s.io/apiserver/pkg/registry/rest/rest.go @@ -17,6 +17,7 @@ limitations under the License. package rest import ( + "context" "io" "net/http" "net/url" @@ -27,7 +28,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/watch" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) //TODO: @@ -58,6 +58,13 @@ type Storage interface { New() runtime.Object } +// Scoper indicates what scope the resource is at. It must be specified. +// It is usually provided automatically based on your strategy. +type Scoper interface { + // NamespaceScoped returns true if the storage is namespaced + NamespaceScoped() bool +} + // KindProvider specifies a different kind for its API than for its internal storage. This is necessary for external // objects that are not compiled into the api server. For such objects, there is no in-memory representation for // the object, so they must be represented as generic objects (e.g. runtime.Unknown), but when we present the object as part of @@ -91,7 +98,7 @@ type Lister interface { // This object must be a pointer type for use with Codec.DecodeInto([]byte, runtime.Object) NewList() runtime.Object // List selects resources in the storage which match to the selector. 'options' can be nil. - List(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (runtime.Object, error) + List(ctx context.Context, options *metainternalversion.ListOptions) (runtime.Object, error) } // Exporter is an object that knows how to strip a RESTful resource for export. A store should implement this interface @@ -101,7 +108,7 @@ type Exporter interface { // Export an object. Fields that are not user specified (e.g. Status, ObjectMeta.ResourceVersion) are stripped out // Returns the stripped object. If 'exact' is true, fields that are specific to the cluster (e.g. namespace) are // retained, otherwise they are stripped also. - Export(ctx genericapirequest.Context, name string, opts metav1.ExportOptions) (runtime.Object, error) + Export(ctx context.Context, name string, opts metav1.ExportOptions) (runtime.Object, error) } // Getter is an object that can retrieve a named RESTful resource. @@ -109,7 +116,7 @@ type Getter interface { // Get finds a resource in the storage by name and returns it. // Although it can return an arbitrary error value, IsNotFound(err) is true for the // returned error value err when the specified resource is not found. - Get(ctx genericapirequest.Context, name string, options *metav1.GetOptions) (runtime.Object, error) + Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error) } // GetterWithOptions is an object that retrieve a named RESTful resource and takes @@ -122,7 +129,7 @@ type GetterWithOptions interface { // The options object passed to it is of the same type returned by the NewGetOptions // method. // TODO: Pass metav1.GetOptions. - Get(ctx genericapirequest.Context, name string, options runtime.Object) (runtime.Object, error) + Get(ctx context.Context, name string, options runtime.Object) (runtime.Object, error) // NewGetOptions returns an empty options object that will be used to pass // options to the Get method. It may return a bool and a string, if true, the @@ -134,17 +141,7 @@ type GetterWithOptions interface { } type TableConvertor interface { - ConvertToTable(ctx genericapirequest.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error) -} - -// Deleter is an object that can delete a named RESTful resource. -type Deleter interface { - // Delete finds a resource in the storage and deletes it. - // Although it can return an arbitrary error value, IsNotFound(err) is true for the - // returned error value err when the specified resource is not found. - // Delete *may* return the object that was deleted, or a status object indicating additional - // information about deletion. - Delete(ctx genericapirequest.Context, name string) (runtime.Object, error) + ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error) } // GracefulDeleter knows how to pass deletion options to allow delayed deletion of a @@ -159,18 +156,7 @@ type GracefulDeleter interface { // information about deletion. // It also returns a boolean which is set to true if the resource was instantly // deleted or false if it will be deleted asynchronously. - Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) -} - -// GracefulDeleteAdapter adapts the Deleter interface to GracefulDeleter -type GracefulDeleteAdapter struct { - Deleter -} - -// Delete implements RESTGracefulDeleter in terms of Deleter -func (w GracefulDeleteAdapter) Delete(ctx genericapirequest.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) { - obj, err := w.Deleter.Delete(ctx, name) - return obj, true, err + Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error) } // CollectionDeleter is an object that can delete a collection @@ -181,7 +167,7 @@ type CollectionDeleter interface { // them or return an invalid request error. // DeleteCollection may not be atomic - i.e. it may delete some objects and still // return an error after it. On success, returns a list of deleted objects. - DeleteCollection(ctx genericapirequest.Context, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error) + DeleteCollection(ctx context.Context, options *metav1.DeleteOptions, listOptions *metainternalversion.ListOptions) (runtime.Object, error) } // Creater is an object that can create an instance of a RESTful object. @@ -192,7 +178,7 @@ type Creater interface { // Create creates a new version of a resource. If includeUninitialized is set, the object may be returned // without completing initialization. - Create(ctx genericapirequest.Context, obj runtime.Object, createValidation ValidateObjectFunc, includeUninitialized bool) (runtime.Object, error) + Create(ctx context.Context, obj runtime.Object, createValidation ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) } // NamedCreater is an object that can create an instance of a RESTful object using a name parameter. @@ -205,7 +191,7 @@ type NamedCreater interface { // This is needed for create operations on subresources which include the name of the parent // resource in the path. If includeUninitialized is set, the object may be returned without // completing initialization. - Create(ctx genericapirequest.Context, name string, obj runtime.Object, createValidation ValidateObjectFunc, includeUninitialized bool) (runtime.Object, error) + Create(ctx context.Context, name string, obj runtime.Object, createValidation ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error) } // UpdatedObjectInfo provides information about an updated object to an Updater. @@ -218,7 +204,7 @@ type UpdatedObjectInfo interface { // UpdatedObject returns the updated object, given a context and old object. // The only time an empty oldObj should be passed in is if a "create on update" is occurring (there is no oldObj). - UpdatedObject(ctx genericapirequest.Context, oldObj runtime.Object) (newObj runtime.Object, err error) + UpdatedObject(ctx context.Context, oldObj runtime.Object) (newObj runtime.Object, err error) } // ValidateObjectFunc is a function to act on a given object. An error may be returned @@ -250,14 +236,14 @@ type Updater interface { // Update finds a resource in the storage and updates it. Some implementations // may allow updates creates the object - they should set the created boolean // to true. - Update(ctx genericapirequest.Context, name string, objInfo UpdatedObjectInfo, createValidation ValidateObjectFunc, updateValidation ValidateObjectUpdateFunc) (runtime.Object, bool, error) + Update(ctx context.Context, name string, objInfo UpdatedObjectInfo, createValidation ValidateObjectFunc, updateValidation ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) } // CreaterUpdater is a storage object that must support both create and update. // Go prevents embedded interfaces that implement the same method. type CreaterUpdater interface { Creater - Update(ctx genericapirequest.Context, name string, objInfo UpdatedObjectInfo, createValidation ValidateObjectFunc, updateValidation ValidateObjectUpdateFunc) (runtime.Object, bool, error) + Update(ctx context.Context, name string, objInfo UpdatedObjectInfo, createValidation ValidateObjectFunc, updateValidation ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error) } // CreaterUpdater must satisfy the Updater interface. @@ -276,7 +262,7 @@ type Watcher interface { // are supported; an error should be returned if 'field' tries to select on a field that // isn't supported. 'resourceVersion' allows for continuing/starting a watch at a // particular version. - Watch(ctx genericapirequest.Context, options *metainternalversion.ListOptions) (watch.Interface, error) + Watch(ctx context.Context, options *metainternalversion.ListOptions) (watch.Interface, error) } // StandardStorage is an interface covering the common verbs. Provided for testing whether a @@ -293,7 +279,7 @@ type StandardStorage interface { // Redirector know how to return a remote resource's location. type Redirector interface { // ResourceLocation should return the remote location of the given resource, and an optional transport to use to request it, or an error. - ResourceLocation(ctx genericapirequest.Context, id string) (remoteLocation *url.URL, transport http.RoundTripper, err error) + ResourceLocation(ctx context.Context, id string) (remoteLocation *url.URL, transport http.RoundTripper, err error) } // Responder abstracts the normal response behavior for a REST method and is passed to callers that @@ -313,7 +299,7 @@ type Connecter interface { // code and body, so the ServeHTTP method should exit after invoking the responder. The Handler will // be used for a single API request and then discarded. The Responder is guaranteed to write to the // same http.ResponseWriter passed to ServeHTTP. - Connect(ctx genericapirequest.Context, id string, options runtime.Object, r Responder) (http.Handler, error) + Connect(ctx context.Context, id string, options runtime.Object, r Responder) (http.Handler, error) // NewConnectOptions returns an empty options object that will be used to pass // options to the Connect method. If nil, then a nil options object is passed to @@ -334,7 +320,7 @@ type ResourceStreamer interface { // the caller may return a flag indicating whether the result should be flushed as writes occur // and a content type string that indicates the type of the stream. // If a null stream is returned, a StatusNoContent response wil be generated. - InputStream(apiVersion, acceptHeader string) (stream io.ReadCloser, flush bool, mimeType string, err error) + InputStream(ctx context.Context, apiVersion, acceptHeader string) (stream io.ReadCloser, flush bool, mimeType string, err error) } // StorageMetadata is an optional interface that callers can implement to provide additional @@ -348,19 +334,3 @@ type StorageMetadata interface { // it is not nil. Only the type of the return object matters, the value will be ignored. ProducesObject(verb string) interface{} } - -// +k8s:deepcopy-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// ConnectRequest is an object passed to admission control for Connect operations -type ConnectRequest struct { - // Name is the name of the object on which the connect request was made - Name string - - // Options is the options object passed to the connect request. See the NewConnectOptions method on Connecter - Options runtime.Object - - // ResourcePath is the path for the resource in the REST server (ie. "pods/proxy") - ResourcePath string -} - -func (obj *ConnectRequest) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go b/deps/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go new file mode 100644 index 000000000..a83c9cb2f --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/registry/rest/resttest/resttest.go @@ -0,0 +1,1571 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resttest + +import ( + "context" + "fmt" + "reflect" + "strings" + "testing" + "time" + + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/api/validation/path" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + genericapirequest "k8s.io/apiserver/pkg/endpoints/request" + "k8s.io/apiserver/pkg/registry/rest" +) + +// TODO(apelisse): Tests in this file should be more hermertic by always +// removing objects that they create. That would avoid name-collisions. + +type Tester struct { + *testing.T + storage rest.Storage + clusterScope bool + createOnUpdate bool + generatesName bool + returnDeletedObject bool + namer func(int) string +} + +func New(t *testing.T, storage rest.Storage) *Tester { + return &Tester{ + T: t, + storage: storage, + namer: defaultNamer, + } +} + +func defaultNamer(i int) string { + return fmt.Sprintf("foo%d", i) +} + +// Namer allows providing a custom name maker +// By default "foo%d" is used +func (t *Tester) Namer(namer func(int) string) *Tester { + t.namer = namer + return t +} + +func (t *Tester) ClusterScope() *Tester { + t.clusterScope = true + return t +} + +func (t *Tester) AllowCreateOnUpdate() *Tester { + t.createOnUpdate = true + return t +} + +func (t *Tester) GeneratesName() *Tester { + t.generatesName = true + return t +} + +func (t *Tester) ReturnDeletedObject() *Tester { + t.returnDeletedObject = true + return t +} + +// TestNamespace returns the namespace that will be used when creating contexts. +// Returns NamespaceNone for cluster-scoped objects. +func (t *Tester) TestNamespace() string { + if t.clusterScope { + return metav1.NamespaceNone + } + return "test" +} + +// TestContext returns a namespaced context that will be used when making storage calls. +// Namespace is determined by TestNamespace() +func (t *Tester) TestContext() context.Context { + if t.clusterScope { + return genericapirequest.NewContext() + } + return genericapirequest.WithNamespace(genericapirequest.NewContext(), t.TestNamespace()) +} + +func (t *Tester) getObjectMetaOrFail(obj runtime.Object) metav1.Object { + objMeta, err := meta.Accessor(obj) + if err != nil { + t.Fatalf("object does not have ObjectMeta: %v\n%#v", err, obj) + } + return objMeta +} + +func (t *Tester) setObjectMeta(obj runtime.Object, name string) { + meta := t.getObjectMetaOrFail(obj) + meta.SetName(name) + if t.clusterScope { + meta.SetNamespace(metav1.NamespaceNone) + } else { + meta.SetNamespace(genericapirequest.NamespaceValue(t.TestContext())) + } + meta.SetGenerateName("") + meta.SetGeneration(1) +} + +type AssignFunc func([]runtime.Object) []runtime.Object +type EmitFunc func(runtime.Object, string) error +type GetFunc func(context.Context, runtime.Object) (runtime.Object, error) +type InitWatchFunc func() +type InjectErrFunc func(err error) +type IsErrorFunc func(err error) bool +type CreateFunc func(context.Context, runtime.Object) error +type SetRVFunc func(uint64) +type UpdateFunc func(runtime.Object) runtime.Object + +// Test creating an object. +func (t *Tester) TestCreate(valid runtime.Object, createFn CreateFunc, getFn GetFunc, invalid ...runtime.Object) { + dryRunOpts := metav1.CreateOptions{DryRun: []string{metav1.DryRunAll}} + opts := metav1.CreateOptions{} + t.testCreateHasMetadata(valid.DeepCopyObject()) + if !t.generatesName { + t.testCreateGeneratesName(valid.DeepCopyObject()) + } + t.testCreateDryRun(valid.DeepCopyObject(), getFn) + t.testCreateDryRunEquals(valid.DeepCopyObject()) + t.testCreateEquals(valid.DeepCopyObject(), getFn) + t.testCreateAlreadyExisting(valid.DeepCopyObject(), createFn, dryRunOpts) + t.testCreateAlreadyExisting(valid.DeepCopyObject(), createFn, opts) + if t.clusterScope { + t.testCreateDiscardsObjectNamespace(valid.DeepCopyObject(), dryRunOpts) + t.testCreateDiscardsObjectNamespace(valid.DeepCopyObject(), opts) + t.testCreateIgnoresContextNamespace(valid.DeepCopyObject(), dryRunOpts) + t.testCreateIgnoresContextNamespace(valid.DeepCopyObject(), opts) + t.testCreateIgnoresMismatchedNamespace(valid.DeepCopyObject(), dryRunOpts) + t.testCreateIgnoresMismatchedNamespace(valid.DeepCopyObject(), opts) + t.testCreateResetsUserData(valid.DeepCopyObject(), dryRunOpts) + t.testCreateResetsUserData(valid.DeepCopyObject(), opts) + } else { + t.testCreateRejectsMismatchedNamespace(valid.DeepCopyObject(), dryRunOpts) + t.testCreateRejectsMismatchedNamespace(valid.DeepCopyObject(), opts) + } + t.testCreateInvokesValidation(dryRunOpts, invalid...) + t.testCreateInvokesValidation(opts, invalid...) + t.testCreateValidatesNames(valid.DeepCopyObject(), dryRunOpts) + t.testCreateValidatesNames(valid.DeepCopyObject(), opts) + t.testCreateIgnoreClusterName(valid.DeepCopyObject(), dryRunOpts) + t.testCreateIgnoreClusterName(valid.DeepCopyObject(), opts) +} + +// Test updating an object. +func (t *Tester) TestUpdate(valid runtime.Object, createFn CreateFunc, getFn GetFunc, updateFn UpdateFunc, invalidUpdateFn ...UpdateFunc) { + dryRunOpts := metav1.UpdateOptions{DryRun: []string{metav1.DryRunAll}} + opts := metav1.UpdateOptions{} + t.testUpdateEquals(valid.DeepCopyObject(), createFn, getFn, updateFn) + t.testUpdateFailsOnVersionTooOld(valid.DeepCopyObject(), createFn, getFn) + t.testUpdateOnNotFound(valid.DeepCopyObject(), dryRunOpts) + t.testUpdateOnNotFound(valid.DeepCopyObject(), opts) + if !t.clusterScope { + t.testUpdateRejectsMismatchedNamespace(valid.DeepCopyObject(), createFn, getFn) + } + t.testUpdateInvokesValidation(valid.DeepCopyObject(), createFn, invalidUpdateFn...) + t.testUpdateWithWrongUID(valid.DeepCopyObject(), createFn, getFn, dryRunOpts) + t.testUpdateWithWrongUID(valid.DeepCopyObject(), createFn, getFn, opts) + t.testUpdateRetrievesOldObject(valid.DeepCopyObject(), createFn, getFn) + t.testUpdatePropagatesUpdatedObjectError(valid.DeepCopyObject(), createFn, getFn, dryRunOpts) + t.testUpdatePropagatesUpdatedObjectError(valid.DeepCopyObject(), createFn, getFn, opts) + t.testUpdateIgnoreGenerationUpdates(valid.DeepCopyObject(), createFn, getFn) + t.testUpdateIgnoreClusterName(valid.DeepCopyObject(), createFn, getFn) +} + +// Test deleting an object. +func (t *Tester) TestDelete(valid runtime.Object, createFn CreateFunc, getFn GetFunc, isNotFoundFn IsErrorFunc) { + dryRunOpts := metav1.DeleteOptions{DryRun: []string{metav1.DryRunAll}} + opts := metav1.DeleteOptions{} + t.testDeleteNonExist(valid.DeepCopyObject(), dryRunOpts) + t.testDeleteNonExist(valid.DeepCopyObject(), opts) + t.testDeleteNoGraceful(valid.DeepCopyObject(), createFn, getFn, isNotFoundFn, true) + t.testDeleteNoGraceful(valid.DeepCopyObject(), createFn, getFn, isNotFoundFn, false) + t.testDeleteWithUID(valid.DeepCopyObject(), createFn, getFn, isNotFoundFn, dryRunOpts) + t.testDeleteWithUID(valid.DeepCopyObject(), createFn, getFn, isNotFoundFn, opts) +} + +// Test gracefully deleting an object. +func (t *Tester) TestDeleteGraceful(valid runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { + t.testDeleteDryRunGracefulHasdefault(valid.DeepCopyObject(), createFn, expectedGrace) + t.testDeleteGracefulHasDefault(valid.DeepCopyObject(), createFn, getFn, expectedGrace) + t.testDeleteGracefulWithValue(valid.DeepCopyObject(), createFn, getFn, expectedGrace) + t.testDeleteGracefulUsesZeroOnNil(valid.DeepCopyObject(), createFn, expectedGrace) + t.testDeleteGracefulExtend(valid.DeepCopyObject(), createFn, getFn, expectedGrace) + t.testDeleteGracefulShorten(valid.DeepCopyObject(), createFn, getFn, expectedGrace) + t.testDeleteGracefulImmediate(valid.DeepCopyObject(), createFn, getFn, expectedGrace) +} + +// Test getting object. +func (t *Tester) TestGet(valid runtime.Object) { + t.testGetFound(valid.DeepCopyObject()) + t.testGetNotFound(valid.DeepCopyObject()) + t.testGetMimatchedNamespace(valid.DeepCopyObject()) + if !t.clusterScope { + t.testGetDifferentNamespace(valid.DeepCopyObject()) + } +} + +// Test listing objects. +func (t *Tester) TestList(valid runtime.Object, assignFn AssignFunc) { + t.testListNotFound(assignFn) + t.testListFound(valid.DeepCopyObject(), assignFn) + t.testListMatchLabels(valid.DeepCopyObject(), assignFn) + t.testListTableConversion(valid.DeepCopyObject(), assignFn) +} + +// Test watching objects. +func (t *Tester) TestWatch( + valid runtime.Object, emitFn EmitFunc, + labelsPass, labelsFail []labels.Set, fieldsPass, fieldsFail []fields.Set, actions []string) { + t.testWatchLabels(valid.DeepCopyObject(), emitFn, labelsPass, labelsFail, actions) + t.testWatchFields(valid.DeepCopyObject(), emitFn, fieldsPass, fieldsFail, actions) +} + +// ============================================================================= +// Creation tests. + +func (t *Tester) delete(ctx context.Context, obj runtime.Object) error { + objectMeta, err := meta.Accessor(obj) + if err != nil { + return err + } + deleter, ok := t.storage.(rest.GracefulDeleter) + if !ok { + return fmt.Errorf("Expected deleting storage, got %v", t.storage) + } + _, _, err = deleter.Delete(ctx, objectMeta.GetName(), nil) + return err +} + +func (t *Tester) testCreateAlreadyExisting(obj runtime.Object, createFn CreateFunc, opts metav1.CreateOptions) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(1)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + defer t.delete(ctx, foo) + + _, err := t.storage.(rest.Creater).Create(ctx, foo, rest.ValidateAllObjectFunc, &opts) + if !errors.IsAlreadyExists(err) { + t.Errorf("expected already exists err, got %v", err) + } +} + +func (t *Tester) testCreateDryRun(obj runtime.Object, getFn GetFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(2)) + + _, err := t.storage.(rest.Creater).Create(ctx, foo, rest.ValidateAllObjectFunc, &metav1.CreateOptions{DryRun: []string{metav1.DryRunAll}}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + _, err = getFn(ctx, foo) + if !errors.IsNotFound(err) { + t.Errorf("Expected NotFound error, got '%v'", err) + } +} + +func (t *Tester) testCreateDryRunEquals(obj runtime.Object) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(2)) + + createdFake, err := t.storage.(rest.Creater).Create(ctx, foo, rest.ValidateAllObjectFunc, &metav1.CreateOptions{DryRun: []string{metav1.DryRunAll}}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + created, err := t.storage.(rest.Creater).Create(ctx, foo, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + defer t.delete(ctx, created) + + // Set resource version which might be unset in created object. + createdMeta := t.getObjectMetaOrFail(created) + createdFakeMeta := t.getObjectMetaOrFail(createdFake) + createdMeta.SetCreationTimestamp(createdFakeMeta.GetCreationTimestamp()) + createdFakeMeta.SetResourceVersion("") + createdMeta.SetResourceVersion("") + createdMeta.SetUID(createdFakeMeta.GetUID()) + + if e, a := created, createdFake; !apiequality.Semantic.DeepEqual(e, a) { + t.Errorf("unexpected obj: %#v, expected %#v", e, a) + } +} + +func (t *Tester) testCreateEquals(obj runtime.Object, getFn GetFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(2)) + + created, err := t.storage.(rest.Creater).Create(ctx, foo, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + defer t.delete(ctx, created) + + got, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + // Set resource version which might be unset in created object. + createdMeta := t.getObjectMetaOrFail(created) + gotMeta := t.getObjectMetaOrFail(got) + createdMeta.SetResourceVersion(gotMeta.GetResourceVersion()) + + if e, a := created, got; !apiequality.Semantic.DeepEqual(e, a) { + t.Errorf("unexpected obj: %#v, expected %#v", e, a) + } +} + +func (t *Tester) testCreateDiscardsObjectNamespace(valid runtime.Object, opts metav1.CreateOptions) { + objectMeta := t.getObjectMetaOrFail(valid) + + // Ignore non-empty namespace in object meta + objectMeta.SetNamespace("not-default") + + // Ideally, we'd get an error back here, but at least verify the namespace wasn't persisted + created, err := t.storage.(rest.Creater).Create(t.TestContext(), valid.DeepCopyObject(), rest.ValidateAllObjectFunc, &opts) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + defer t.delete(t.TestContext(), created) + createdObjectMeta := t.getObjectMetaOrFail(created) + if createdObjectMeta.GetNamespace() != metav1.NamespaceNone { + t.Errorf("Expected empty namespace on created object, got '%v'", createdObjectMeta.GetNamespace()) + } +} + +func (t *Tester) testCreateGeneratesName(valid runtime.Object) { + objectMeta := t.getObjectMetaOrFail(valid) + objectMeta.SetName("") + objectMeta.SetGenerateName("test-") + + created, err := t.storage.(rest.Creater).Create(t.TestContext(), valid, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + defer t.delete(t.TestContext(), created) + if objectMeta.GetName() == "test-" || !strings.HasPrefix(objectMeta.GetName(), "test-") { + t.Errorf("unexpected name: %#v", valid) + } +} + +func (t *Tester) testCreateHasMetadata(valid runtime.Object) { + objectMeta := t.getObjectMetaOrFail(valid) + objectMeta.SetName(t.namer(1)) + objectMeta.SetNamespace(t.TestNamespace()) + + obj, err := t.storage.(rest.Creater).Create(t.TestContext(), valid, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if obj == nil { + t.Fatalf("Unexpected object from result: %#v", obj) + } + defer t.delete(t.TestContext(), obj) + if !metav1.HasObjectMetaSystemFieldValues(objectMeta) { + t.Errorf("storage did not populate object meta field values") + } +} + +func (t *Tester) testCreateIgnoresContextNamespace(valid runtime.Object, opts metav1.CreateOptions) { + // Ignore non-empty namespace in context + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), "not-default2") + + // Ideally, we'd get an error back here, but at least verify the namespace wasn't persisted + created, err := t.storage.(rest.Creater).Create(ctx, valid.DeepCopyObject(), rest.ValidateAllObjectFunc, &opts) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + defer t.delete(ctx, created) + createdObjectMeta := t.getObjectMetaOrFail(created) + if createdObjectMeta.GetNamespace() != metav1.NamespaceNone { + t.Errorf("Expected empty namespace on created object, got '%v'", createdObjectMeta.GetNamespace()) + } +} + +func (t *Tester) testCreateIgnoresMismatchedNamespace(valid runtime.Object, opts metav1.CreateOptions) { + objectMeta := t.getObjectMetaOrFail(valid) + + // Ignore non-empty namespace in object meta + objectMeta.SetNamespace("not-default") + ctx := genericapirequest.WithNamespace(genericapirequest.NewContext(), "not-default2") + + // Ideally, we'd get an error back here, but at least verify the namespace wasn't persisted + created, err := t.storage.(rest.Creater).Create(ctx, valid.DeepCopyObject(), rest.ValidateAllObjectFunc, &opts) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + defer t.delete(ctx, created) + createdObjectMeta := t.getObjectMetaOrFail(created) + if createdObjectMeta.GetNamespace() != metav1.NamespaceNone { + t.Errorf("Expected empty namespace on created object, got '%v'", createdObjectMeta.GetNamespace()) + } +} + +func (t *Tester) testCreateValidatesNames(valid runtime.Object, opts metav1.CreateOptions) { + for _, invalidName := range path.NameMayNotBe { + objCopy := valid.DeepCopyObject() + objCopyMeta := t.getObjectMetaOrFail(objCopy) + objCopyMeta.SetName(invalidName) + + ctx := t.TestContext() + _, err := t.storage.(rest.Creater).Create(ctx, objCopy, rest.ValidateAllObjectFunc, &opts) + if !errors.IsInvalid(err) { + t.Errorf("%s: Expected to get an invalid resource error, got '%v'", invalidName, err) + } + } + + for _, invalidSuffix := range path.NameMayNotContain { + objCopy := valid.DeepCopyObject() + objCopyMeta := t.getObjectMetaOrFail(objCopy) + objCopyMeta.SetName(objCopyMeta.GetName() + invalidSuffix) + + ctx := t.TestContext() + _, err := t.storage.(rest.Creater).Create(ctx, objCopy, rest.ValidateAllObjectFunc, &opts) + if !errors.IsInvalid(err) { + t.Errorf("%s: Expected to get an invalid resource error, got '%v'", invalidSuffix, err) + } + } +} + +func (t *Tester) testCreateInvokesValidation(opts metav1.CreateOptions, invalid ...runtime.Object) { + for i, obj := range invalid { + ctx := t.TestContext() + _, err := t.storage.(rest.Creater).Create(ctx, obj, rest.ValidateAllObjectFunc, &opts) + if !errors.IsInvalid(err) { + t.Errorf("%d: Expected to get an invalid resource error, got %v", i, err) + } + } +} + +func (t *Tester) testCreateRejectsMismatchedNamespace(valid runtime.Object, opts metav1.CreateOptions) { + objectMeta := t.getObjectMetaOrFail(valid) + objectMeta.SetNamespace("not-default") + + _, err := t.storage.(rest.Creater).Create(t.TestContext(), valid, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err == nil { + t.Errorf("Expected an error, but we didn't get one") + } else if !strings.Contains(err.Error(), "does not match the namespace sent on the request") { + t.Errorf("Expected 'does not match the namespace sent on the request' error, got '%v'", err.Error()) + } +} + +func (t *Tester) testCreateResetsUserData(valid runtime.Object, opts metav1.CreateOptions) { + objectMeta := t.getObjectMetaOrFail(valid) + now := metav1.Now() + objectMeta.SetUID("bad-uid") + objectMeta.SetCreationTimestamp(now) + + obj, err := t.storage.(rest.Creater).Create(t.TestContext(), valid, rest.ValidateAllObjectFunc, &opts) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + if obj == nil { + t.Fatalf("Unexpected object from result: %#v", obj) + } + defer t.delete(t.TestContext(), obj) + if objectMeta.GetUID() == "bad-uid" || objectMeta.GetCreationTimestamp() == now { + t.Errorf("ObjectMeta did not reset basic fields: %#v", objectMeta) + } +} + +func (t *Tester) testCreateIgnoreClusterName(valid runtime.Object, opts metav1.CreateOptions) { + objectMeta := t.getObjectMetaOrFail(valid) + objectMeta.SetName(t.namer(3)) + objectMeta.SetClusterName("clustername-to-ignore") + + obj, err := t.storage.(rest.Creater).Create(t.TestContext(), valid.DeepCopyObject(), rest.ValidateAllObjectFunc, &opts) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + defer t.delete(t.TestContext(), obj) + createdObjectMeta := t.getObjectMetaOrFail(obj) + if len(createdObjectMeta.GetClusterName()) != 0 { + t.Errorf("Expected empty clusterName on created object, got '%v'", createdObjectMeta.GetClusterName()) + } +} + +// ============================================================================= +// Update tests. + +func (t *Tester) testUpdateEquals(obj runtime.Object, createFn CreateFunc, getFn GetFunc, updateFn UpdateFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(2)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + + toUpdate, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + toUpdate = updateFn(toUpdate) + toUpdateMeta := t.getObjectMetaOrFail(toUpdate) + updated, created, err := t.storage.(rest.Updater).Update(ctx, toUpdateMeta.GetName(), rest.DefaultUpdatedObjectInfo(toUpdate), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if created { + t.Errorf("unexpected creation") + } + got, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + // Set resource version which might be unset in created object. + updatedMeta := t.getObjectMetaOrFail(updated) + gotMeta := t.getObjectMetaOrFail(got) + updatedMeta.SetResourceVersion(gotMeta.GetResourceVersion()) + + if e, a := updated, got; !apiequality.Semantic.DeepEqual(e, a) { + t.Errorf("unexpected obj: %#v, expected %#v", e, a) + } +} + +func (t *Tester) testUpdateFailsOnVersionTooOld(obj runtime.Object, createFn CreateFunc, getFn GetFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(3)) + + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + + storedFoo, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + older := storedFoo.DeepCopyObject() + olderMeta := t.getObjectMetaOrFail(older) + olderMeta.SetResourceVersion("1") + + _, _, err = t.storage.(rest.Updater).Update(t.TestContext(), olderMeta.GetName(), rest.DefaultUpdatedObjectInfo(older), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if err == nil { + t.Errorf("Expected an error, but we didn't get one") + } else if !errors.IsConflict(err) { + t.Errorf("Expected Conflict error, got '%v'", err) + } +} + +func (t *Tester) testUpdateInvokesValidation(obj runtime.Object, createFn CreateFunc, invalidUpdateFn ...UpdateFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(4)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + + for _, update := range invalidUpdateFn { + toUpdate := update(foo.DeepCopyObject()) + toUpdateMeta := t.getObjectMetaOrFail(toUpdate) + got, created, err := t.storage.(rest.Updater).Update(t.TestContext(), toUpdateMeta.GetName(), rest.DefaultUpdatedObjectInfo(toUpdate), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if got != nil || created { + t.Errorf("expected nil object and no creation for object: %v", toUpdate) + } + if !errors.IsInvalid(err) && !errors.IsBadRequest(err) { + t.Errorf("expected invalid or bad request error, got %v", err) + } + } +} + +func (t *Tester) testUpdateWithWrongUID(obj runtime.Object, createFn CreateFunc, getFn GetFunc, opts metav1.UpdateOptions) { + ctx := t.TestContext() + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(5)) + objectMeta := t.getObjectMetaOrFail(foo) + objectMeta.SetUID(types.UID("UID0000")) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + defer t.delete(ctx, foo) + objectMeta.SetUID(types.UID("UID1111")) + + obj, created, err := t.storage.(rest.Updater).Update(ctx, objectMeta.GetName(), rest.DefaultUpdatedObjectInfo(foo), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &opts) + if created || obj != nil { + t.Errorf("expected nil object and no creation for object: %v", foo) + } + if err == nil || !errors.IsConflict(err) { + t.Errorf("unexpected error: %v", err) + } +} + +func (t *Tester) testUpdateRetrievesOldObject(obj runtime.Object, createFn CreateFunc, getFn GetFunc) { + ctx := t.TestContext() + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(6)) + objectMeta := t.getObjectMetaOrFail(foo) + objectMeta.SetAnnotations(map[string]string{"A": "1"}) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + return + } + + storedFoo, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + return + } + + storedFooWithUpdates := storedFoo.DeepCopyObject() + objectMeta = t.getObjectMetaOrFail(storedFooWithUpdates) + objectMeta.SetAnnotations(map[string]string{"A": "2"}) + + // Make sure a custom transform is called, and sees the expected updatedObject and oldObject + // This tests the mechanism used to pass the old and new object to admission + calledUpdatedObject := 0 + noopTransform := func(_ context.Context, updatedObject runtime.Object, oldObject runtime.Object) (runtime.Object, error) { + if !reflect.DeepEqual(storedFoo, oldObject) { + t.Errorf("Expected\n\t%#v\ngot\n\t%#v", storedFoo, oldObject) + } + if !reflect.DeepEqual(storedFooWithUpdates, updatedObject) { + t.Errorf("Expected\n\t%#v\ngot\n\t%#v", storedFooWithUpdates, updatedObject) + } + calledUpdatedObject++ + return updatedObject, nil + } + + updatedObj, created, err := t.storage.(rest.Updater).Update(ctx, objectMeta.GetName(), rest.DefaultUpdatedObjectInfo(storedFooWithUpdates, noopTransform), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + return + } + if created { + t.Errorf("expected no creation for object") + return + } + if updatedObj == nil { + t.Errorf("expected non-nil object from update") + return + } + if calledUpdatedObject != 1 { + t.Errorf("expected UpdatedObject() to be called 1 time, was called %d", calledUpdatedObject) + return + } +} + +func (t *Tester) testUpdatePropagatesUpdatedObjectError(obj runtime.Object, createFn CreateFunc, getFn GetFunc, opts metav1.UpdateOptions) { + ctx := t.TestContext() + foo := obj.DeepCopyObject() + name := t.namer(7) + t.setObjectMeta(foo, name) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + return + } + defer t.delete(ctx, foo) + + // Make sure our transform is called, and sees the expected updatedObject and oldObject + propagateErr := fmt.Errorf("custom updated object error for %v", foo) + noopTransform := func(_ context.Context, updatedObject runtime.Object, oldObject runtime.Object) (runtime.Object, error) { + return nil, propagateErr + } + + _, _, err := t.storage.(rest.Updater).Update(ctx, name, rest.DefaultUpdatedObjectInfo(foo, noopTransform), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &opts) + if err != propagateErr { + t.Errorf("expected propagated error, got %#v", err) + } +} + +func (t *Tester) testUpdateIgnoreGenerationUpdates(obj runtime.Object, createFn CreateFunc, getFn GetFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + name := t.namer(8) + t.setObjectMeta(foo, name) + + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + + storedFoo, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + older := storedFoo.DeepCopyObject() + olderMeta := t.getObjectMetaOrFail(older) + olderMeta.SetGeneration(2) + + _, _, err = t.storage.(rest.Updater).Update(t.TestContext(), olderMeta.GetName(), rest.DefaultUpdatedObjectInfo(older), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + updatedFoo, err := getFn(ctx, older) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if exp, got := int64(1), t.getObjectMetaOrFail(updatedFoo).GetGeneration(); exp != got { + t.Errorf("Unexpected generation update: expected %d, got %d", exp, got) + } +} + +func (t *Tester) testUpdateOnNotFound(obj runtime.Object, opts metav1.UpdateOptions) { + t.setObjectMeta(obj, t.namer(0)) + _, created, err := t.storage.(rest.Updater).Update(t.TestContext(), t.namer(0), rest.DefaultUpdatedObjectInfo(obj), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &opts) + if t.createOnUpdate { + if err != nil { + t.Errorf("creation allowed on updated, but got an error: %v", err) + } + if !created { + t.Errorf("creation allowed on update, but object not created") + } + } else { + if err == nil { + t.Errorf("Expected an error, but we didn't get one") + } else if !errors.IsNotFound(err) { + t.Errorf("Expected NotFound error, got '%v'", err) + } + } +} + +func (t *Tester) testUpdateRejectsMismatchedNamespace(obj runtime.Object, createFn CreateFunc, getFn GetFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(1)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + + storedFoo, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + objectMeta := t.getObjectMetaOrFail(storedFoo) + objectMeta.SetName(t.namer(1)) + objectMeta.SetNamespace("not-default") + + obj, updated, err := t.storage.(rest.Updater).Update(t.TestContext(), "foo1", rest.DefaultUpdatedObjectInfo(storedFoo), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if obj != nil || updated { + t.Errorf("expected nil object and not updated") + } + if err == nil { + t.Errorf("expected an error, but didn't get one") + } else if !strings.Contains(err.Error(), "does not match the namespace sent on the request") { + t.Errorf("expected 'does not match the namespace sent on the request' error, got '%v'", err.Error()) + } +} + +func (t *Tester) testUpdateIgnoreClusterName(obj runtime.Object, createFn CreateFunc, getFn GetFunc) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + name := t.namer(9) + t.setObjectMeta(foo, name) + + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + + storedFoo, err := getFn(ctx, foo) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + older := storedFoo.DeepCopyObject() + olderMeta := t.getObjectMetaOrFail(older) + olderMeta.SetClusterName("clustername-to-ignore") + + _, _, err = t.storage.(rest.Updater).Update(t.TestContext(), olderMeta.GetName(), rest.DefaultUpdatedObjectInfo(older), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + updatedFoo, err := getFn(ctx, older) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if clusterName := t.getObjectMetaOrFail(updatedFoo).GetClusterName(); len(clusterName) != 0 { + t.Errorf("Unexpected clusterName update: expected empty, got %v", clusterName) + } + +} + +// ============================================================================= +// Deletion tests. + +func (t *Tester) testDeleteNoGraceful(obj runtime.Object, createFn CreateFunc, getFn GetFunc, isNotFoundFn IsErrorFunc, dryRun bool) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(1)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + defer t.delete(ctx, foo) + objectMeta := t.getObjectMetaOrFail(foo) + opts := metav1.NewDeleteOptions(10) + if dryRun { + opts.DryRun = []string{metav1.DryRunAll} + } + obj, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), opts) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if !wasDeleted { + t.Errorf("unexpected, object %s should have been deleted immediately", objectMeta.GetName()) + } + if !t.returnDeletedObject { + if status, ok := obj.(*metav1.Status); !ok { + t.Errorf("expected status of delete, got %v", status) + } else if status.Status != metav1.StatusSuccess { + t.Errorf("expected success, got: %v", status.Status) + } + } + + _, err = getFn(ctx, foo) + if !dryRun && (err == nil || !isNotFoundFn(err)) { + t.Errorf("unexpected error: %v", err) + } else if dryRun && isNotFoundFn(err) { + t.Error("object should not have been removed in dry-run") + } +} + +func (t *Tester) testDeleteNonExist(obj runtime.Object, opts metav1.DeleteOptions) { + objectMeta := t.getObjectMetaOrFail(obj) + + _, _, err := t.storage.(rest.GracefulDeleter).Delete(t.TestContext(), objectMeta.GetName(), &opts) + if err == nil || !errors.IsNotFound(err) { + t.Errorf("unexpected error: %v", err) + } + +} + +// This test the fast-fail path. We test that the precondition gets verified +// again before deleting the object in tests of pkg/storage/etcd. +func (t *Tester) testDeleteWithUID(obj runtime.Object, createFn CreateFunc, getFn GetFunc, isNotFoundFn IsErrorFunc, opts metav1.DeleteOptions) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(1)) + objectMeta := t.getObjectMetaOrFail(foo) + objectMeta.SetUID(types.UID("UID0000")) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + opts.Preconditions = metav1.NewPreconditionDeleteOptions("UID1111").Preconditions + obj, _, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), &opts) + if err == nil || !errors.IsConflict(err) { + t.Errorf("unexpected error: %v", err) + } + + obj, _, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewPreconditionDeleteOptions("UID0000")) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + if !t.returnDeletedObject { + if status, ok := obj.(*metav1.Status); !ok { + t.Errorf("expected status of delete, got %v", status) + } else if status.Status != metav1.StatusSuccess { + t.Errorf("expected success, got: %v", status.Status) + } + } + + _, err = getFn(ctx, foo) + if err == nil || !isNotFoundFn(err) { + t.Errorf("unexpected error: %v", err) + } +} + +// ============================================================================= +// Graceful Deletion tests. + +func (t *Tester) testDeleteDryRunGracefulHasdefault(obj runtime.Object, createFn CreateFunc, expectedGrace int64) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(1)) + defer t.delete(ctx, foo) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + objectMeta := t.getObjectMetaOrFail(foo) + object, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), &metav1.DeleteOptions{DryRun: []string{metav1.DryRunAll}}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + objectMeta = t.getObjectMetaOrFail(object) + if objectMeta.GetDeletionTimestamp() == nil || objectMeta.GetDeletionGracePeriodSeconds() == nil || *objectMeta.GetDeletionGracePeriodSeconds() != expectedGrace { + t.Errorf("unexpected deleted meta: %#v", objectMeta) + } + _, _, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), &metav1.DeleteOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } +} + +func (t *Tester) testDeleteGracefulHasDefault(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(1)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.GetGeneration() + _, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), &metav1.DeleteOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + if _, err := getFn(ctx, foo); err != nil { + t.Fatalf("did not gracefully delete resource: %v", err) + } + + object, err := t.storage.(rest.Getter).Get(ctx, objectMeta.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Fatalf("unexpected error, object should exist: %v", err) + } + objectMeta = t.getObjectMetaOrFail(object) + if objectMeta.GetDeletionTimestamp() == nil || objectMeta.GetDeletionGracePeriodSeconds() == nil || *objectMeta.GetDeletionGracePeriodSeconds() != expectedGrace { + t.Errorf("unexpected deleted meta: %#v", objectMeta) + } + if generation >= objectMeta.GetGeneration() { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } +} + +func (t *Tester) testDeleteGracefulWithValue(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(2)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.GetGeneration() + _, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewDeleteOptions(expectedGrace+2)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + if _, err := getFn(ctx, foo); err != nil { + t.Fatalf("did not gracefully delete resource: %v", err) + } + + object, err := t.storage.(rest.Getter).Get(ctx, objectMeta.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error, object should exist: %v", err) + } + objectMeta = t.getObjectMetaOrFail(object) + if objectMeta.GetDeletionTimestamp() == nil || objectMeta.GetDeletionGracePeriodSeconds() == nil || *objectMeta.GetDeletionGracePeriodSeconds() != expectedGrace+2 { + t.Errorf("unexpected deleted meta: %#v", objectMeta) + } + if generation >= objectMeta.GetGeneration() { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } +} + +func (t *Tester) testDeleteGracefulExtend(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(3)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.GetGeneration() + _, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewDeleteOptions(expectedGrace)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + if _, err := getFn(ctx, foo); err != nil { + t.Fatalf("did not gracefully delete resource: %v", err) + } + + // second delete duration is ignored + _, wasDeleted, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewDeleteOptions(expectedGrace+2)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + object, err := t.storage.(rest.Getter).Get(ctx, objectMeta.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error, object should exist: %v", err) + } + objectMeta = t.getObjectMetaOrFail(object) + if objectMeta.GetDeletionTimestamp() == nil || objectMeta.GetDeletionGracePeriodSeconds() == nil || *objectMeta.GetDeletionGracePeriodSeconds() != expectedGrace { + t.Errorf("unexpected deleted meta: %#v", objectMeta) + } + if generation >= objectMeta.GetGeneration() { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } +} + +func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, "foo4") + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + objectMeta := t.getObjectMetaOrFail(foo) + generation := objectMeta.GetGeneration() + _, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewDeleteOptions(expectedGrace)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + if _, err := getFn(ctx, foo); err != nil { + t.Fatalf("did not gracefully delete resource: %v", err) + } + + // second delete is immediate, resource is deleted + out, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewDeleteOptions(0)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted != true { + t.Errorf("unexpected, object %s should have been deleted immediately", objectMeta.GetName()) + } + _, err = t.storage.(rest.Getter).Get(ctx, objectMeta.GetName(), &metav1.GetOptions{}) + if !errors.IsNotFound(err) { + t.Errorf("unexpected error, object should be deleted immediately: %v", err) + } + objectMeta = t.getObjectMetaOrFail(out) + // the second delete shouldn't update the object, so the objectMeta.GetDeletionGracePeriodSeconds() should eqaul to the value set in the first delete. + if objectMeta.GetDeletionTimestamp() == nil || objectMeta.GetDeletionGracePeriodSeconds() == nil || *objectMeta.GetDeletionGracePeriodSeconds() != 0 { + t.Errorf("unexpected deleted meta: %#v", objectMeta) + } + if generation >= objectMeta.GetGeneration() { + t.Error("Generation wasn't bumped when deletion timestamp was set") + } +} + +func (t *Tester) testDeleteGracefulUsesZeroOnNil(obj runtime.Object, createFn CreateFunc, expectedGrace int64) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(5)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + objectMeta := t.getObjectMetaOrFail(foo) + _, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if !wasDeleted { + t.Errorf("unexpected, object %s should have been deleted immediately", objectMeta.GetName()) + } + if _, err := t.storage.(rest.Getter).Get(ctx, objectMeta.GetName(), &metav1.GetOptions{}); !errors.IsNotFound(err) { + t.Errorf("unexpected error, object should not exist: %v", err) + } +} + +// Regression test for bug discussed in #27539 +func (t *Tester) testDeleteGracefulShorten(obj runtime.Object, createFn CreateFunc, getFn GetFunc, expectedGrace int64) { + ctx := t.TestContext() + + foo := obj.DeepCopyObject() + t.setObjectMeta(foo, t.namer(6)) + if err := createFn(ctx, foo); err != nil { + t.Errorf("unexpected error: %v", err) + } + bigGrace := int64(time.Hour) + if expectedGrace > bigGrace { + bigGrace = 2 * expectedGrace + } + objectMeta := t.getObjectMetaOrFail(foo) + _, wasDeleted, err := t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewDeleteOptions(bigGrace)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + object, err := getFn(ctx, foo) + if err != nil { + t.Fatalf("did not gracefully delete resource: %v", err) + } + objectMeta = t.getObjectMetaOrFail(object) + deletionTimestamp := *objectMeta.GetDeletionTimestamp() + + // second delete duration is ignored + _, wasDeleted, err = t.storage.(rest.GracefulDeleter).Delete(ctx, objectMeta.GetName(), metav1.NewDeleteOptions(expectedGrace)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if wasDeleted { + t.Errorf("unexpected, object %s should not have been deleted immediately", objectMeta.GetName()) + } + object, err = t.storage.(rest.Getter).Get(ctx, objectMeta.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error, object should exist: %v", err) + } + objectMeta = t.getObjectMetaOrFail(object) + if objectMeta.GetDeletionTimestamp() == nil || objectMeta.GetDeletionGracePeriodSeconds() == nil || + *objectMeta.GetDeletionGracePeriodSeconds() != expectedGrace || !objectMeta.GetDeletionTimestamp().Before(&deletionTimestamp) { + t.Errorf("unexpected deleted meta: %#v", objectMeta) + } +} + +// ============================================================================= +// Get tests. + +// testGetDifferentNamespace ensures same-name objects in different namespaces do not clash +func (t *Tester) testGetDifferentNamespace(obj runtime.Object) { + if t.clusterScope { + t.Fatalf("the test does not work in in cluster-scope") + } + + objMeta := t.getObjectMetaOrFail(obj) + objMeta.SetName(t.namer(5)) + + ctx1 := genericapirequest.WithNamespace(genericapirequest.NewContext(), "bar3") + objMeta.SetNamespace(genericapirequest.NamespaceValue(ctx1)) + _, err := t.storage.(rest.Creater).Create(ctx1, obj, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + ctx2 := genericapirequest.WithNamespace(genericapirequest.NewContext(), "bar4") + objMeta.SetNamespace(genericapirequest.NamespaceValue(ctx2)) + _, err = t.storage.(rest.Creater).Create(ctx2, obj, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + got1, err := t.storage.(rest.Getter).Get(ctx1, objMeta.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + got1Meta := t.getObjectMetaOrFail(got1) + if got1Meta.GetName() != objMeta.GetName() { + t.Errorf("unexpected name of object: %#v, expected: %s", got1, objMeta.GetName()) + } + if got1Meta.GetNamespace() != genericapirequest.NamespaceValue(ctx1) { + t.Errorf("unexpected namespace of object: %#v, expected: %s", got1, genericapirequest.NamespaceValue(ctx1)) + } + + got2, err := t.storage.(rest.Getter).Get(ctx2, objMeta.GetName(), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + got2Meta := t.getObjectMetaOrFail(got2) + if got2Meta.GetName() != objMeta.GetName() { + t.Errorf("unexpected name of object: %#v, expected: %s", got2, objMeta.GetName()) + } + if got2Meta.GetNamespace() != genericapirequest.NamespaceValue(ctx2) { + t.Errorf("unexpected namespace of object: %#v, expected: %s", got2, genericapirequest.NamespaceValue(ctx2)) + } +} + +func (t *Tester) testGetFound(obj runtime.Object) { + ctx := t.TestContext() + t.setObjectMeta(obj, t.namer(1)) + + existing, err := t.storage.(rest.Creater).Create(ctx, obj, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + existingMeta := t.getObjectMetaOrFail(existing) + + got, err := t.storage.(rest.Getter).Get(ctx, t.namer(1), &metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + gotMeta := t.getObjectMetaOrFail(got) + gotMeta.SetResourceVersion(existingMeta.GetResourceVersion()) + if e, a := existing, got; !apiequality.Semantic.DeepEqual(e, a) { + t.Errorf("unexpected obj: %#v, expected %#v", e, a) + } +} + +func (t *Tester) testGetMimatchedNamespace(obj runtime.Object) { + ctx1 := genericapirequest.WithNamespace(genericapirequest.NewContext(), "bar1") + ctx2 := genericapirequest.WithNamespace(genericapirequest.NewContext(), "bar2") + objMeta := t.getObjectMetaOrFail(obj) + objMeta.SetName(t.namer(4)) + objMeta.SetNamespace(genericapirequest.NamespaceValue(ctx1)) + _, err := t.storage.(rest.Creater).Create(ctx1, obj, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + _, err = t.storage.(rest.Getter).Get(ctx2, t.namer(4), &metav1.GetOptions{}) + if t.clusterScope { + if err != nil { + t.Errorf("unexpected error: %v", err) + } + } else { + if !errors.IsNotFound(err) { + t.Errorf("unexpected error returned: %#v", err) + } + } +} + +func (t *Tester) testGetNotFound(obj runtime.Object) { + ctx := t.TestContext() + t.setObjectMeta(obj, t.namer(2)) + _, err := t.storage.(rest.Creater).Create(ctx, obj, rest.ValidateAllObjectFunc, &metav1.CreateOptions{}) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + _, err = t.storage.(rest.Getter).Get(ctx, t.namer(3), &metav1.GetOptions{}) + if !errors.IsNotFound(err) { + t.Errorf("unexpected error returned: %#v", err) + } +} + +// ============================================================================= +// List tests. + +func listToItems(listObj runtime.Object) ([]runtime.Object, error) { + v, err := conversion.EnforcePtr(listObj) + if err != nil { + return nil, fmt.Errorf("unexpected error: %v", err) + } + items := v.FieldByName("Items") + if !items.IsValid() { + return nil, fmt.Errorf("unexpected Items field in %v", listObj) + } + if items.Type().Kind() != reflect.Slice { + return nil, fmt.Errorf("unexpected Items field type: %v", items.Type().Kind()) + } + result := make([]runtime.Object, items.Len()) + for i := 0; i < items.Len(); i++ { + result[i] = items.Index(i).Addr().Interface().(runtime.Object) + } + return result, nil +} + +func (t *Tester) testListFound(obj runtime.Object, assignFn AssignFunc) { + ctx := t.TestContext() + + foo1 := obj.DeepCopyObject() + t.setObjectMeta(foo1, t.namer(1)) + foo2 := obj.DeepCopyObject() + t.setObjectMeta(foo2, t.namer(2)) + + existing := assignFn([]runtime.Object{foo1, foo2}) + + listObj, err := t.storage.(rest.Lister).List(ctx, nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + items, err := listToItems(listObj) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(items) != len(existing) { + t.Errorf("unexpected number of items: %v", len(items)) + } + if !apiequality.Semantic.DeepEqual(existing, items) { + t.Errorf("expected: %#v, got: %#v", existing, items) + } +} + +func (t *Tester) testListMatchLabels(obj runtime.Object, assignFn AssignFunc) { + ctx := t.TestContext() + testLabels := map[string]string{"key": "value"} + + foo3 := obj.DeepCopyObject() + t.setObjectMeta(foo3, "foo3") + foo4 := obj.DeepCopyObject() + foo4Meta := t.getObjectMetaOrFail(foo4) + foo4Meta.SetName("foo4") + foo4Meta.SetNamespace(genericapirequest.NamespaceValue(ctx)) + foo4Meta.SetLabels(testLabels) + + objs := ([]runtime.Object{foo3, foo4}) + + assignFn(objs) + filtered := []runtime.Object{objs[1]} + + selector := labels.SelectorFromSet(labels.Set(testLabels)) + options := &metainternalversion.ListOptions{LabelSelector: selector} + listObj, err := t.storage.(rest.Lister).List(ctx, options) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + items, err := listToItems(listObj) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(items) != len(filtered) { + t.Errorf("unexpected number of items: %v", len(items)) + } + if !apiequality.Semantic.DeepEqual(filtered, items) { + t.Errorf("expected: %#v, got: %#v", filtered, items) + } +} + +func (t *Tester) testListNotFound(assignFn AssignFunc) { + ctx := t.TestContext() + _ = assignFn([]runtime.Object{}) + + listObj, err := t.storage.(rest.Lister).List(ctx, nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + items, err := listToItems(listObj) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(items) != 0 { + t.Errorf("unexpected items: %#v", items) + } +} + +// testListTableConversion verifies a set of known bounds and expected limitations for the values +// returned from a TableList. These conditions may be changed if necessary with adequate review. +func (t *Tester) testListTableConversion(obj runtime.Object, assignFn AssignFunc) { + ctx := t.TestContext() + testLabels := map[string]string{"key": "value"} + + foo3 := obj.DeepCopyObject() + t.setObjectMeta(foo3, "foo3") + foo4 := obj.DeepCopyObject() + foo4Meta := t.getObjectMetaOrFail(foo4) + foo4Meta.SetName("foo4") + foo4Meta.SetNamespace(genericapirequest.NamespaceValue(ctx)) + foo4Meta.SetLabels(testLabels) + + objs := ([]runtime.Object{foo3, foo4}) + + assignFn(objs) + + options := &metainternalversion.ListOptions{} + listObj, err := t.storage.(rest.Lister).List(ctx, options) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + items, err := listToItems(listObj) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if len(items) != len(objs) { + t.Errorf("unexpected number of items: %v", len(items)) + } + if !apiequality.Semantic.DeepEqual(objs, items) { + t.Errorf("expected: %#v, got: %#v", objs, items) + } + + m, err := meta.ListAccessor(listObj) + if err != nil { + t.Fatalf("list should support ListMeta %T: %v", listObj, err) + } + m.SetContinue("continuetoken") + m.SetResourceVersion("11") + m.SetSelfLink("/list/link") + + table, err := t.storage.(rest.TableConvertor).ConvertToTable(ctx, listObj, nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if table.ResourceVersion != "11" || table.SelfLink != "/list/link" || table.Continue != "continuetoken" { + t.Errorf("printer lost list meta: %#v", table.ListMeta) + } + if len(table.Rows) != len(items) { + t.Errorf("unexpected number of rows: %v", len(table.Rows)) + } + columns := table.ColumnDefinitions + if len(columns) == 0 { + t.Errorf("unexpected number of columns: %v", len(columns)) + } + if !strings.EqualFold(columns[0].Name, "Name") || columns[0].Type != "string" || columns[0].Format != "name" { + t.Errorf("expect column 0 to be the name column: %#v", columns[0]) + } + for j, column := range columns { + if len(column.Name) == 0 { + t.Errorf("column %d has no name", j) + } + switch column.Type { + case "string", "date", "integer", "number", "boolean": + default: + t.Errorf("column %d has unexpected type: %q", j, column.Type) + } + switch { + case column.Format == "": + case column.Format == "name" && column.Type == "string": + default: + t.Errorf("column %d has unexpected format: %q with type %q", j, column.Format, column.Type) + } + if column.Priority < 0 || column.Priority > 2 { + t.Errorf("column %d has unexpected priority: %q", j, column.Priority) + } + if len(column.Description) == 0 { + t.Errorf("column %d has no description", j) + } + if column.Name == "Created At" && column.Type != "date" && column.Format != "" { + t.Errorf("column %d looks like a created at column, but has a different type and format: %#v", j, column) + } + } + for i, row := range table.Rows { + if len(row.Cells) != len(table.ColumnDefinitions) { + t.Errorf("row %d did not have the correct number of cells: %d in %v, expected %d", i, len(row.Cells), row.Cells, len(table.ColumnDefinitions)) + } + for j, cell := range row.Cells { + // do not add to this test without discussion - may break clients + switch cell.(type) { + case float64, int64, int32, int, string, bool: + case []interface{}: + case nil: + default: + t.Errorf("row %d, cell %d has an unrecognized type, only JSON serialization safe types are allowed: %T ", i, j, cell) + } + } + if len(row.Cells) != len(table.ColumnDefinitions) { + } + } +} + +// ============================================================================= +// Watching tests. + +func (t *Tester) testWatchFields(obj runtime.Object, emitFn EmitFunc, fieldsPass, fieldsFail []fields.Set, actions []string) { + ctx := t.TestContext() + + for _, field := range fieldsPass { + for _, action := range actions { + options := &metainternalversion.ListOptions{FieldSelector: field.AsSelector(), ResourceVersion: "1"} + watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) + if err != nil { + t.Errorf("unexpected error: %v, %v", err, action) + } + + if err := emitFn(obj, action); err != nil { + t.Errorf("unexpected error: %v", err) + } + + select { + case _, ok := <-watcher.ResultChan(): + if !ok { + t.Errorf("watch channel should be open") + } + case <-time.After(wait.ForeverTestTimeout): + t.Errorf("unexpected timeout from result channel") + } + watcher.Stop() + } + } + + for _, field := range fieldsFail { + for _, action := range actions { + options := &metainternalversion.ListOptions{FieldSelector: field.AsSelector(), ResourceVersion: "1"} + watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if err := emitFn(obj, action); err != nil { + t.Errorf("unexpected error: %v", err) + } + + select { + case <-watcher.ResultChan(): + t.Errorf("unexpected result from result channel") + case <-time.After(time.Millisecond * 500): + // expected case + } + watcher.Stop() + } + } +} + +func (t *Tester) testWatchLabels(obj runtime.Object, emitFn EmitFunc, labelsPass, labelsFail []labels.Set, actions []string) { + ctx := t.TestContext() + + for _, label := range labelsPass { + for _, action := range actions { + options := &metainternalversion.ListOptions{LabelSelector: label.AsSelector(), ResourceVersion: "1"} + watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if err := emitFn(obj, action); err != nil { + t.Errorf("unexpected error: %v", err) + } + + select { + case _, ok := <-watcher.ResultChan(): + if !ok { + t.Errorf("watch channel should be open") + } + case <-time.After(wait.ForeverTestTimeout): + t.Errorf("unexpected timeout from result channel") + } + watcher.Stop() + } + } + + for _, label := range labelsFail { + for _, action := range actions { + options := &metainternalversion.ListOptions{LabelSelector: label.AsSelector(), ResourceVersion: "1"} + watcher, err := t.storage.(rest.Watcher).Watch(ctx, options) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if err := emitFn(obj, action); err != nil { + t.Errorf("unexpected error: %v", err) + } + + select { + case <-watcher.ResultChan(): + t.Errorf("unexpected result from result channel") + case <-time.After(time.Millisecond * 500): + // expected case + } + watcher.Stop() + } + } +} diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/table.go b/deps/k8s.io/apiserver/pkg/registry/rest/table.go index 2f0d1df3b..bfcdcf58b 100644 --- a/deps/k8s.io/apiserver/pkg/registry/rest/table.go +++ b/deps/k8s.io/apiserver/pkg/registry/rest/table.go @@ -17,6 +17,7 @@ limitations under the License. package rest import ( + "context" "fmt" "net/http" "time" @@ -26,7 +27,6 @@ import ( metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" ) type defaultTableConvertor struct { @@ -40,7 +40,7 @@ func NewDefaultTableConvertor(resource schema.GroupResource) TableConvertor { var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() -func (c defaultTableConvertor) ConvertToTable(ctx genericapirequest.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error) { +func (c defaultTableConvertor) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1beta1.Table, error) { var table metav1beta1.Table fn := func(obj runtime.Object) error { m, err := meta.Accessor(obj) diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/update.go b/deps/k8s.io/apiserver/pkg/registry/rest/update.go index aaee5800c..147541bcf 100644 --- a/deps/k8s.io/apiserver/pkg/registry/rest/update.go +++ b/deps/k8s.io/apiserver/pkg/registry/rest/update.go @@ -17,6 +17,7 @@ limitations under the License. package rest import ( + "context" "fmt" "k8s.io/apimachinery/pkg/api/errors" @@ -27,7 +28,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/admission" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/features" utilfeature "k8s.io/apiserver/pkg/util/feature" ) @@ -46,11 +46,11 @@ type RESTUpdateStrategy interface { // the object. For example: remove fields that are not to be persisted, // sort order-insensitive list fields, etc. This should not remove fields // whose presence would be considered a validation error. - PrepareForUpdate(ctx genericapirequest.Context, obj, old runtime.Object) + PrepareForUpdate(ctx context.Context, obj, old runtime.Object) // ValidateUpdate is invoked after default fields in the object have been // filled in before the object is persisted. This method should not mutate // the object. - ValidateUpdate(ctx genericapirequest.Context, obj, old runtime.Object) field.ErrorList + ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList // Canonicalize allows an object to be mutated into a canonical form. This // ensures that code that operates on these objects can rely on the common // form for things like comparison. Canonicalize is invoked after @@ -83,7 +83,8 @@ func validateCommonFields(obj, old runtime.Object, strategy RESTUpdateStrategy) // BeforeUpdate ensures that common operations for all resources are performed on update. It only returns // errors that can be converted to api.Status. It will invoke update validation with the provided existing // and updated objects. -func BeforeUpdate(strategy RESTUpdateStrategy, ctx genericapirequest.Context, obj, old runtime.Object) error { +// It sets zero values only if the object does not have a zero value for the respective field. +func BeforeUpdate(strategy RESTUpdateStrategy, ctx context.Context, obj, old runtime.Object) error { objectMeta, kind, kerr := objectMetaAndKind(strategy, obj) if kerr != nil { return kerr @@ -92,9 +93,10 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx genericapirequest.Context, ob if !ValidNamespace(ctx, objectMeta) { return errors.NewBadRequest("the namespace of the provided object does not match the namespace sent on the request") } - } else { + } else if len(objectMeta.GetNamespace()) > 0 { objectMeta.SetNamespace(metav1.NamespaceNone) } + // Ensure requests cannot update generation oldMeta, err := meta.Accessor(old) if err != nil { @@ -111,7 +113,25 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx genericapirequest.Context, ob strategy.PrepareForUpdate(ctx, obj, old) // ClusterName is ignored and should not be saved - objectMeta.SetClusterName("") + if len(objectMeta.GetClusterName()) > 0 { + objectMeta.SetClusterName("") + } + // Use the existing UID if none is provided + if len(objectMeta.GetUID()) == 0 { + objectMeta.SetUID(oldMeta.GetUID()) + } + // ignore changes to timestamp + if oldCreationTime := oldMeta.GetCreationTimestamp(); !oldCreationTime.IsZero() { + objectMeta.SetCreationTimestamp(oldMeta.GetCreationTimestamp()) + } + // an update can never remove/change a deletion timestamp + if !oldMeta.GetDeletionTimestamp().IsZero() { + objectMeta.SetDeletionTimestamp(oldMeta.GetDeletionTimestamp()) + } + // an update can never remove/change grace period seconds + if oldMeta.GetDeletionGracePeriodSeconds() != nil && objectMeta.GetDeletionGracePeriodSeconds() == nil { + objectMeta.SetDeletionGracePeriodSeconds(oldMeta.GetDeletionGracePeriodSeconds()) + } // Ensure some common fields, like UID, are validated for all resources. errs, err := validateCommonFields(obj, old, strategy) @@ -130,7 +150,7 @@ func BeforeUpdate(strategy RESTUpdateStrategy, ctx genericapirequest.Context, ob } // TransformFunc is a function to transform and return newObj -type TransformFunc func(ctx genericapirequest.Context, newObj runtime.Object, oldObj runtime.Object) (transformedNewObj runtime.Object, err error) +type TransformFunc func(ctx context.Context, newObj runtime.Object, oldObj runtime.Object) (transformedNewObj runtime.Object, err error) // defaultUpdatedObjectInfo implements UpdatedObjectInfo type defaultUpdatedObjectInfo struct { @@ -167,7 +187,7 @@ func (i *defaultUpdatedObjectInfo) Preconditions() *metav1.Preconditions { // UpdatedObject satisfies the UpdatedObjectInfo interface. // It returns a copy of the held obj, passed through any configured transformers. -func (i *defaultUpdatedObjectInfo) UpdatedObject(ctx genericapirequest.Context, oldObj runtime.Object) (runtime.Object, error) { +func (i *defaultUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj runtime.Object) (runtime.Object, error) { var err error // Start with the configured object newObj := i.obj @@ -214,7 +234,7 @@ func (i *wrappedUpdatedObjectInfo) Preconditions() *metav1.Preconditions { // UpdatedObject satisfies the UpdatedObjectInfo interface. // It delegates to the wrapped objInfo and passes the result through any configured transformers. -func (i *wrappedUpdatedObjectInfo) UpdatedObject(ctx genericapirequest.Context, oldObj runtime.Object) (runtime.Object, error) { +func (i *wrappedUpdatedObjectInfo) UpdatedObject(ctx context.Context, oldObj runtime.Object) (runtime.Object, error) { newObj, err := i.objInfo.UpdatedObject(ctx, oldObj) if err != nil { return newObj, err @@ -247,6 +267,7 @@ func AdmissionToValidateObjectUpdateFunc(admit admission.Interface, staticAttrib staticAttributes.GetResource(), staticAttributes.GetSubresource(), staticAttributes.GetOperation(), + staticAttributes.IsDryRun(), staticAttributes.GetUserInfo(), ) if !validatingAdmission.Handles(finalAttributes.GetOperation()) { diff --git a/deps/k8s.io/apiserver/pkg/registry/rest/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/registry/rest/zz_generated.deepcopy.go deleted file mode 100644 index b4e3fd822..000000000 --- a/deps/k8s.io/apiserver/pkg/registry/rest/zz_generated.deepcopy.go +++ /dev/null @@ -1,55 +0,0 @@ -// +build !ignore_autogenerated - -/* -Copyright 2018 The Kubernetes 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. -*/ - -// This file was autogenerated by deepcopy-gen. Do not edit it manually! - -package rest - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConnectRequest) DeepCopyInto(out *ConnectRequest) { - *out = *in - if in.Options == nil { - out.Options = nil - } else { - out.Options = in.Options.DeepCopyObject() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectRequest. -func (in *ConnectRequest) DeepCopy() *ConnectRequest { - if in == nil { - return nil - } - out := new(ConnectRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConnectRequest) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } else { - return nil - } -} diff --git a/deps/k8s.io/apiserver/pkg/server/BUILD b/deps/k8s.io/apiserver/pkg/server/BUILD deleted file mode 100644 index 52b641707..000000000 --- a/deps/k8s.io/apiserver/pkg/server/BUILD +++ /dev/null @@ -1,172 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "config_selfclient_test.go", - "config_test.go", - "genericapiserver_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/filters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "config.go", - "config_selfclient.go", - "doc.go", - "genericapiserver.go", - "handler.go", - "healthz.go", - "hooks.go", - "plugins.go", - "serve.go", - "signal.go", - ] + select({ - "@io_bazel_rules_go//go/platform:android": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:darwin": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:dragonfly": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:freebsd": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:linux": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:nacl": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:netbsd": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:openbsd": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:plan9": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:solaris": [ - "signal_posix.go", - ], - "@io_bazel_rules_go//go/platform:windows": [ - "signal_windows.go", - ], - "//conditions:default": [], - }), - importpath = "k8s.io/apiserver/pkg/server", - deps = [ - "//vendor/github.com/coreos/go-systemd/daemon:go_default_library", - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", - "//vendor/github.com/go-openapi/spec:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/waitgroup:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/initialization:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver/install:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit/policy:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticatorfactory:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/request/union:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizerfactory:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/union:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/discovery:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/openapi:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/rest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/filters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/mux:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/routes:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/filters:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/healthz:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/httplog:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/mux:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/options:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/resourceconfig:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/routes:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/storage:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/config.go b/deps/k8s.io/apiserver/pkg/server/config.go index 5ddd2e911..7587ecd41 100644 --- a/deps/k8s.io/apiserver/pkg/server/config.go +++ b/deps/k8s.io/apiserver/pkg/server/config.go @@ -31,6 +31,7 @@ import ( "github.com/emicklei/go-restful-swagger12" "github.com/go-openapi/spec" + "github.com/golang/glog" "github.com/pborman/uuid" "k8s.io/apimachinery/pkg/runtime" @@ -59,6 +60,7 @@ import ( "k8s.io/apiserver/pkg/server/routes" serverstore "k8s.io/apiserver/pkg/server/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" + "k8s.io/apiserver/pkg/util/logs" "k8s.io/client-go/informers" restclient "k8s.io/client-go/rest" certutil "k8s.io/client-go/util/cert" @@ -79,17 +81,19 @@ const ( // Config is a structure used to configure a GenericAPIServer. // Its members are sorted roughly in order of importance for composers. type Config struct { - // SecureServingInfo is required to serve https - SecureServingInfo *SecureServingInfo + // SecureServing is required to serve https + SecureServing *SecureServingInfo + + // Authentication is the configuration for authentication + Authentication AuthenticationInfo + + // Authorization is the configuration for authorization + Authorization AuthorizationInfo // LoopbackClientConfig is a config for a privileged loopback connection to the API server // This is required for proper functioning of the PostStartHooks on a GenericAPIServer + // TODO: move into SecureServing(WithLoopback) as soon as insecure serving is gone LoopbackClientConfig *restclient.Config - // Authenticator determines which subject is making the request - Authenticator authenticator.Request - // Authorizer determines whether the subject is allowed to make the request based only - // on the RequestURI - Authorizer authorizer.Authorizer // RuleResolver is required to get the list of rules that apply to a given user // in a given namespace RuleResolver authorizer.RuleResolver @@ -116,10 +120,6 @@ type Config struct { AuditBackend audit.Backend // AuditPolicyChecker makes the decision of whether and how to audit log a request. AuditPolicyChecker auditpolicy.Checker - // SupportsBasicAuth indicates that's at least one Authenticator supports basic auth - // If this is true, a basic auth challenge is returned on authentication failure - // TODO(roberthbailey): Remove once the server no longer supports http basic auth. - SupportsBasicAuth bool // ExternalAddress is the host name to use for external (public internet) facing URLs (e.g. Swagger) // Will default to a value based on secure serving info and available ipv4 IPs. ExternalAddress string @@ -140,9 +140,6 @@ type Config struct { // LegacyAPIGroupPrefixes is used to set up URL parsing for authorization and for validating requests // to InstallLegacyAPIGroup. New API servers don't generally have legacy groups at all. LegacyAPIGroupPrefixes sets.String - // RequestContextMapper maps requests to contexts. Exported so downstream consumers can provider their own mappers - // TODO confirm that anyone downstream actually uses this and doesn't just need an accessor - RequestContextMapper apirequest.RequestContextMapper // RequestInfoResolver is used to assign attributes (used by admission and authorization) based on a request URL. // Use-cases that are like kubelets may need to customize this. RequestInfoResolver apirequest.RequestInfoResolver @@ -185,9 +182,6 @@ type Config struct { // values below here are targets for removal //=========================================================================== - // The port on PublicAddress where a read-write server will be installed. - // Defaults to 6443 if not set. - ReadWritePort int // PublicAddress is the IP address where members of the cluster (kubelet, // kube-proxy, services, etc.) can reach the GenericAPIServer. // If nil or 0.0.0.0, the host's default interface will be used. @@ -229,22 +223,40 @@ type SecureServingInfo struct { // CipherSuites optionally overrides the list of allowed cipher suites for the server. // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). CipherSuites []uint16 + + // HTTP2MaxStreamsPerConnection is the limit that the api server imposes on each client. + // A value of zero means to use the default provided by golang's HTTP/2 support. + HTTP2MaxStreamsPerConnection int +} + +type AuthenticationInfo struct { + // Authenticator determines which subject is making the request + Authenticator authenticator.Request + // SupportsBasicAuth indicates that's at least one Authenticator supports basic auth + // If this is true, a basic auth challenge is returned on authentication failure + // TODO(roberthbailey): Remove once the server no longer supports http basic auth. + SupportsBasicAuth bool +} + +type AuthorizationInfo struct { + // Authorizer determines whether the subject is allowed to make the request based only + // on the RequestURI + Authorizer authorizer.Authorizer } // NewConfig returns a Config struct with the default values func NewConfig(codecs serializer.CodecFactory) *Config { return &Config{ Serializer: codecs, - ReadWritePort: 443, - RequestContextMapper: apirequest.NewRequestContextMapper(), BuildHandlerChainFunc: DefaultBuildHandlerChain, HandlerChainWaitGroup: new(utilwaitgroup.SafeWaitGroup), LegacyAPIGroupPrefixes: sets.NewString(DefaultLegacyAPIPrefix), DisabledPostStartHooks: sets.NewString(), - HealthzChecks: []healthz.HealthzChecker{healthz.PingHealthz}, + HealthzChecks: []healthz.HealthzChecker{healthz.PingHealthz, healthz.LogHealthz}, EnableIndex: true, EnableDiscovery: true, EnableProfiling: true, + EnableMetrics: true, MaxRequestsInFlight: 400, MaxMutatingRequestsInFlight: 200, RequestTimeout: time.Duration(60) * time.Second, @@ -264,8 +276,7 @@ func NewRecommendedConfig(codecs serializer.CodecFactory) *RecommendedConfig { } } -func DefaultOpenAPIConfig(getDefinitions openapicommon.GetOpenAPIDefinitions, scheme *runtime.Scheme) *openapicommon.Config { - defNamer := apiopenapi.NewDefinitionNamer(scheme) +func DefaultOpenAPIConfig(getDefinitions openapicommon.GetOpenAPIDefinitions, defNamer *apiopenapi.DefinitionNamer) *openapicommon.Config { return &openapicommon.Config{ ProtocolList: []string{"https"}, IgnorePrefixes: []string{"/swaggerapi"}, @@ -302,23 +313,23 @@ func DefaultSwaggerConfig() *swagger.Config { } } -func (c *Config) ApplyClientCert(clientCAFile string) (*Config, error) { - if c.SecureServingInfo != nil { +func (c *AuthenticationInfo) ApplyClientCert(clientCAFile string, servingInfo *SecureServingInfo) error { + if servingInfo != nil { if len(clientCAFile) > 0 { clientCAs, err := certutil.CertsFromFile(clientCAFile) if err != nil { - return nil, fmt.Errorf("unable to load client CA file: %v", err) + return fmt.Errorf("unable to load client CA file: %v", err) } - if c.SecureServingInfo.ClientCA == nil { - c.SecureServingInfo.ClientCA = x509.NewCertPool() + if servingInfo.ClientCA == nil { + servingInfo.ClientCA = x509.NewCertPool() } for _, cert := range clientCAs { - c.SecureServingInfo.ClientCA.AddCert(cert) + servingInfo.ClientCA.AddCert(cert) } } } - return c, nil + return nil } type completedConfig struct { @@ -340,39 +351,47 @@ type CompletedConfig struct { // Complete fills in any fields not set that are required to have valid data and can be derived // from other fields. If you're going to `ApplyOptions`, do that first. It's mutating the receiver. func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedConfig { - host := c.ExternalAddress - if host == "" && c.PublicAddress != nil { - host = c.PublicAddress.String() - } - - // if there is no port, and we have a ReadWritePort, use that - if _, _, err := net.SplitHostPort(host); err != nil && c.ReadWritePort != 0 { - host = net.JoinHostPort(host, strconv.Itoa(c.ReadWritePort)) + if len(c.ExternalAddress) == 0 && c.PublicAddress != nil { + c.ExternalAddress = c.PublicAddress.String() } - c.ExternalAddress = host - if c.OpenAPIConfig != nil && c.OpenAPIConfig.SecurityDefinitions != nil { - // Setup OpenAPI security: all APIs will have the same authentication for now. - c.OpenAPIConfig.DefaultSecurity = []map[string][]string{} - keys := []string{} - for k := range *c.OpenAPIConfig.SecurityDefinitions { - keys = append(keys, k) - } - sort.Strings(keys) - for _, k := range keys { - c.OpenAPIConfig.DefaultSecurity = append(c.OpenAPIConfig.DefaultSecurity, map[string][]string{k: {}}) + // if there is no port, and we listen on one securely, use that one + if _, _, err := net.SplitHostPort(c.ExternalAddress); err != nil { + if c.SecureServing == nil { + glog.Fatalf("cannot derive external address port without listening on a secure port.") } - if c.OpenAPIConfig.CommonResponses == nil { - c.OpenAPIConfig.CommonResponses = map[int]spec.Response{} + _, port, err := c.SecureServing.HostPort() + if err != nil { + glog.Fatalf("cannot derive external address from the secure port: %v", err) } - if _, exists := c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized]; !exists { - c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized] = spec.Response{ - ResponseProps: spec.ResponseProps{ - Description: "Unauthorized", - }, + c.ExternalAddress = net.JoinHostPort(c.ExternalAddress, strconv.Itoa(port)) + } + + if c.OpenAPIConfig != nil { + if c.OpenAPIConfig.SecurityDefinitions != nil { + // Setup OpenAPI security: all APIs will have the same authentication for now. + c.OpenAPIConfig.DefaultSecurity = []map[string][]string{} + keys := []string{} + for k := range *c.OpenAPIConfig.SecurityDefinitions { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + c.OpenAPIConfig.DefaultSecurity = append(c.OpenAPIConfig.DefaultSecurity, map[string][]string{k: {}}) + } + if c.OpenAPIConfig.CommonResponses == nil { + c.OpenAPIConfig.CommonResponses = map[int]spec.Response{} + } + if _, exists := c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized]; !exists { + c.OpenAPIConfig.CommonResponses[http.StatusUnauthorized] = spec.Response{ + ResponseProps: spec.ResponseProps{ + Description: "Unauthorized", + }, + } } } + // make sure we populate info, and info.version, if not manually set if c.OpenAPIConfig.Info == nil { c.OpenAPIConfig.Info = &spec.Info{} } @@ -385,7 +404,7 @@ func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedCo } } if c.SwaggerConfig != nil && len(c.SwaggerConfig.WebServicesUrl) == 0 { - if c.SecureServingInfo != nil { + if c.SecureServing != nil { c.SwaggerConfig.WebServicesUrl = "https://" + c.ExternalAddress } else { c.SwaggerConfig.WebServicesUrl = "http://" + c.ExternalAddress @@ -395,24 +414,7 @@ func (c *Config) Complete(informers informers.SharedInformerFactory) CompletedCo c.DiscoveryAddresses = discovery.DefaultAddresses{DefaultAddress: c.ExternalAddress} } - // If the loopbackclientconfig is specified AND it has a token for use against the API server - // wrap the authenticator and authorizer in loopback authentication logic - if c.Authenticator != nil && c.Authorizer != nil && c.LoopbackClientConfig != nil && len(c.LoopbackClientConfig.BearerToken) > 0 { - privilegedLoopbackToken := c.LoopbackClientConfig.BearerToken - var uid = uuid.NewRandom().String() - tokens := make(map[string]*user.DefaultInfo) - tokens[privilegedLoopbackToken] = &user.DefaultInfo{ - Name: user.APIServerUser, - UID: uid, - Groups: []string{user.SystemPrivilegedGroup}, - } - - tokenAuthenticator := authenticatorfactory.NewFromTokens(tokens) - c.Authenticator = authenticatorunion.New(tokenAuthenticator, c.Authenticator) - - tokenAuthorizer := authorizerfactory.NewPrivilegedGroups(user.SystemPrivilegedGroup) - c.Authorizer = authorizerunion.New(tokenAuthorizer, c.Authorizer) - } + AuthorizeClientBearerToken(c.LoopbackClientConfig, &c.Authentication, &c.Authorization) if c.RequestInfoResolver == nil { c.RequestInfoResolver = NewRequestInfoResolver(c) @@ -429,9 +431,8 @@ func (c *RecommendedConfig) Complete() CompletedConfig { // New creates a new server which logically combines the handling chain with the passed server. // name is used to differentiate for logging. The handler chain in particular can be difficult as it starts delgating. +// delegationTarget may not be nil. func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*GenericAPIServer, error) { - // The delegationTarget and the config must agree on the RequestContextMapper - if c.Serializer == nil { return nil, fmt.Errorf("Genericapiserver.New() called with config.Serializer == nil") } @@ -442,23 +443,23 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G handlerChainBuilder := func(handler http.Handler) http.Handler { return c.BuildHandlerChainFunc(handler, c.Config) } - apiServerHandler := NewAPIServerHandler(name, c.RequestContextMapper, c.Serializer, handlerChainBuilder, delegationTarget.UnprotectedHandler()) + apiServerHandler := NewAPIServerHandler(name, c.Serializer, handlerChainBuilder, delegationTarget.UnprotectedHandler()) s := &GenericAPIServer{ discoveryAddresses: c.DiscoveryAddresses, LoopbackClientConfig: c.LoopbackClientConfig, legacyAPIGroupPrefixes: c.LegacyAPIGroupPrefixes, admissionControl: c.AdmissionControl, - requestContextMapper: c.RequestContextMapper, Serializer: c.Serializer, AuditBackend: c.AuditBackend, + Authorizer: c.Authorization.Authorizer, delegationTarget: delegationTarget, HandlerChainWaitGroup: c.HandlerChainWaitGroup, minRequestTimeout: time.Duration(c.MinRequestTimeout) * time.Second, ShutdownTimeout: c.RequestTimeout, - SecureServingInfo: c.SecureServingInfo, + SecureServingInfo: c.SecureServing, ExternalAddress: c.ExternalAddress, Handler: apiServerHandler, @@ -474,7 +475,7 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G healthzChecks: c.HealthzChecks, - DiscoveryGroupManager: discovery.NewRootAPIsHandler(c.DiscoveryAddresses, c.Serializer, c.RequestContextMapper), + DiscoveryGroupManager: discovery.NewRootAPIsHandler(c.DiscoveryAddresses, c.Serializer), enableAPIResponseCompression: c.EnableAPIResponseCompression, } @@ -530,24 +531,23 @@ func (c completedConfig) New(name string, delegationTarget DelegationTarget) (*G } func DefaultBuildHandlerChain(apiHandler http.Handler, c *Config) http.Handler { - handler := genericapifilters.WithAuthorization(apiHandler, c.RequestContextMapper, c.Authorizer, c.Serializer) - handler = genericfilters.WithMaxInFlightLimit(handler, c.MaxRequestsInFlight, c.MaxMutatingRequestsInFlight, c.RequestContextMapper, c.LongRunningFunc) - handler = genericapifilters.WithImpersonation(handler, c.RequestContextMapper, c.Authorizer, c.Serializer) + handler := genericapifilters.WithAuthorization(apiHandler, c.Authorization.Authorizer, c.Serializer) + handler = genericfilters.WithMaxInFlightLimit(handler, c.MaxRequestsInFlight, c.MaxMutatingRequestsInFlight, c.LongRunningFunc) + handler = genericapifilters.WithImpersonation(handler, c.Authorization.Authorizer, c.Serializer) if utilfeature.DefaultFeatureGate.Enabled(features.AdvancedAuditing) { - handler = genericapifilters.WithAudit(handler, c.RequestContextMapper, c.AuditBackend, c.AuditPolicyChecker, c.LongRunningFunc) + handler = genericapifilters.WithAudit(handler, c.AuditBackend, c.AuditPolicyChecker, c.LongRunningFunc) } else { - handler = genericapifilters.WithLegacyAudit(handler, c.RequestContextMapper, c.LegacyAuditWriter) + handler = genericapifilters.WithLegacyAudit(handler, c.LegacyAuditWriter) } - failedHandler := genericapifilters.Unauthorized(c.RequestContextMapper, c.Serializer, c.SupportsBasicAuth) + failedHandler := genericapifilters.Unauthorized(c.Serializer, c.Authentication.SupportsBasicAuth) if utilfeature.DefaultFeatureGate.Enabled(features.AdvancedAuditing) { - failedHandler = genericapifilters.WithFailedAuthenticationAudit(failedHandler, c.RequestContextMapper, c.AuditBackend, c.AuditPolicyChecker) + failedHandler = genericapifilters.WithFailedAuthenticationAudit(failedHandler, c.AuditBackend, c.AuditPolicyChecker) } - handler = genericapifilters.WithAuthentication(handler, c.RequestContextMapper, c.Authenticator, failedHandler) + handler = genericapifilters.WithAuthentication(handler, c.Authentication.Authenticator, failedHandler) handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, "true") - handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.RequestContextMapper, c.LongRunningFunc, c.RequestTimeout) - handler = genericfilters.WithWaitGroup(handler, c.RequestContextMapper, c.LongRunningFunc, c.HandlerChainWaitGroup) - handler = genericapifilters.WithRequestInfo(handler, c.RequestInfoResolver, c.RequestContextMapper) - handler = apirequest.WithRequestContext(handler, c.RequestContextMapper) + handler = genericfilters.WithTimeoutForNonLongRunningRequests(handler, c.LongRunningFunc, c.RequestTimeout) + handler = genericfilters.WithWaitGroup(handler, c.LongRunningFunc, c.HandlerChainWaitGroup) + handler = genericapifilters.WithRequestInfo(handler, c.RequestInfoResolver) handler = genericfilters.WithPanicRecovery(handler) return handler } @@ -564,6 +564,8 @@ func installAPI(s *GenericAPIServer, c *Config) { if c.EnableContentionProfiling { goruntime.SetBlockProfileRate(1) } + // so far, only logging related endpoints are considered valid to add for these debug flags. + routes.DebugFlags{}.Install(s.Handler.NonGoRestfulMux, "v", routes.StringFlagPutHandler(logs.GlogSetter)) } if c.EnableMetrics { if c.EnableProfiling { @@ -572,6 +574,7 @@ func installAPI(s *GenericAPIServer, c *Config) { routes.DefaultMetrics{}.Install(s.Handler.NonGoRestfulMux) } } + routes.Version{Version: c.Version}.Install(s.Handler.GoRestfulContainer) if c.EnableDiscovery { @@ -592,3 +595,42 @@ func NewRequestInfoResolver(c *Config) *apirequest.RequestInfoFactory { GrouplessAPIPrefixes: legacyAPIPrefixes, } } + +func (s *SecureServingInfo) HostPort() (string, int, error) { + if s == nil || s.Listener == nil { + return "", 0, fmt.Errorf("no listener found") + } + addr := s.Listener.Addr().String() + host, portStr, err := net.SplitHostPort(addr) + if err != nil { + return "", 0, fmt.Errorf("failed to get port from listener address %q: %v", addr, err) + } + port, err := strconv.Atoi(portStr) + if err != nil { + return "", 0, fmt.Errorf("invalid non-numeric port %q", portStr) + } + return host, port, nil +} + +// AuthorizeClientBearerToken wraps the authenticator and authorizer in loopback authentication logic +// if the loopback client config is specified AND it has a bearer token. +func AuthorizeClientBearerToken(loopback *restclient.Config, authn *AuthenticationInfo, authz *AuthorizationInfo) { + if loopback == nil || authn == nil || authz == nil || authn.Authenticator == nil && authz.Authorizer == nil || len(loopback.BearerToken) == 0 { + return + } + + privilegedLoopbackToken := loopback.BearerToken + var uid = uuid.NewRandom().String() + tokens := make(map[string]*user.DefaultInfo) + tokens[privilegedLoopbackToken] = &user.DefaultInfo{ + Name: user.APIServerUser, + UID: uid, + Groups: []string{user.SystemPrivilegedGroup}, + } + + tokenAuthenticator := authenticatorfactory.NewFromTokens(tokens) + authn.Authenticator = authenticatorunion.New(tokenAuthenticator, authn.Authenticator) + + tokenAuthorizer := authorizerfactory.NewPrivilegedGroups(user.SystemPrivilegedGroup) + authz.Authorizer = authorizerunion.New(tokenAuthorizer, authz.Authorizer) +} diff --git a/deps/k8s.io/apiserver/pkg/server/config_selfclient.go b/deps/k8s.io/apiserver/pkg/server/config_selfclient.go index bf09161c9..53f179527 100644 --- a/deps/k8s.io/apiserver/pkg/server/config_selfclient.go +++ b/deps/k8s.io/apiserver/pkg/server/config_selfclient.go @@ -27,7 +27,7 @@ import ( // select the loopback certificate via SNI if TLS is used. const LoopbackClientServerNameOverride = "apiserver-loopback-client" -func (s *SecureServingInfo) NewLoopbackClientConfig(token string, loopbackCert []byte) (*restclient.Config, error) { +func (s *SecureServingInfo) NewClientConfig(caCert []byte) (*restclient.Config, error) { if s == nil || (s.Cert == nil && len(s.SNICerts) == 0) { return nil, nil } @@ -41,19 +41,29 @@ func (s *SecureServingInfo) NewLoopbackClientConfig(token string, loopbackCert [ // Increase QPS limits. The client is currently passed to all admission plugins, // and those can be throttled in case of higher load on apiserver - see #22340 and #22422 // for more details. Once #22422 is fixed, we may want to remove it. - QPS: 50, - Burst: 100, - Host: "https://" + net.JoinHostPort(host, port), - BearerToken: token, + QPS: 50, + Burst: 100, + Host: "https://" + net.JoinHostPort(host, port), // override the ServerName to select our loopback certificate via SNI. This name is also // used by the client to compare the returns server certificate against. TLSClientConfig: restclient.TLSClientConfig{ - ServerName: LoopbackClientServerNameOverride, - CAData: loopbackCert, + CAData: caCert, }, }, nil } +func (s *SecureServingInfo) NewLoopbackClientConfig(token string, loopbackCert []byte) (*restclient.Config, error) { + c, err := s.NewClientConfig(loopbackCert) + if err != nil || c == nil { + return c, err + } + + c.BearerToken = token + c.TLSClientConfig.ServerName = LoopbackClientServerNameOverride + + return c, nil +} + // LoopbackHostPort returns the host and port loopback REST clients should use // to contact the server. func LoopbackHostPort(bindAddress string) (string, string, error) { @@ -63,6 +73,8 @@ func LoopbackHostPort(bindAddress string) (string, string, error) { return "", "", fmt.Errorf("invalid server bind address: %q", bindAddress) } + isIPv6 := net.ParseIP(host).To4() == nil + // Value is expected to be an IP or DNS name, not "0.0.0.0". if host == "0.0.0.0" || host == "::" { host = "localhost" @@ -72,7 +84,7 @@ func LoopbackHostPort(bindAddress string) (string, string, error) { addrs, err := net.InterfaceAddrs() if err == nil { for _, address := range addrs { - if ipnet, ok := address.(*net.IPNet); ok && ipnet.IP.IsLoopback() { + if ipnet, ok := address.(*net.IPNet); ok && ipnet.IP.IsLoopback() && isIPv6 == (ipnet.IP.To4() == nil) { host = ipnet.IP.String() break } diff --git a/deps/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go b/deps/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go new file mode 100644 index 000000000..3e88dd49d --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/server/deprecated_insecure_serving.go @@ -0,0 +1,72 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "net" + "net/http" + "time" + + "github.com/golang/glog" + + "k8s.io/client-go/rest" +) + +// DeprecatedInsecureServingInfo is the main context object for the insecure http server. +type DeprecatedInsecureServingInfo struct { + // Listener is the secure server network listener. + Listener net.Listener + // optional server name for log messages + Name string +} + +// Serve starts an insecure http server with the given handler. It fails only if +// the initial listen call fails. It does not block. +func (s *DeprecatedInsecureServingInfo) Serve(handler http.Handler, shutdownTimeout time.Duration, stopCh <-chan struct{}) error { + insecureServer := &http.Server{ + Addr: s.Listener.Addr().String(), + Handler: handler, + MaxHeaderBytes: 1 << 20, + } + + if len(s.Name) > 0 { + glog.Infof("Serving %s insecurely on %s", s.Name, s.Listener.Addr()) + } else { + glog.Infof("Serving insecurely on %s", s.Listener.Addr()) + } + return RunServer(insecureServer, s.Listener, shutdownTimeout, stopCh) +} + +func (s *DeprecatedInsecureServingInfo) NewLoopbackClientConfig() (*rest.Config, error) { + if s == nil { + return nil, nil + } + + host, port, err := LoopbackHostPort(s.Listener.Addr().String()) + if err != nil { + return nil, err + } + + return &rest.Config{ + Host: "http://" + net.JoinHostPort(host, port), + // Increase QPS limits. The client is currently passed to all admission plugins, + // and those can be throttled in case of higher load on apiserver - see #22340 and #22422 + // for more details. Once #22422 is fixed, we may want to remove it. + QPS: 50, + Burst: 100, + }, nil +} diff --git a/deps/k8s.io/apiserver/pkg/server/filters/BUILD b/deps/k8s.io/apiserver/pkg/server/filters/BUILD deleted file mode 100644 index 8fed23797..000000000 --- a/deps/k8s.io/apiserver/pkg/server/filters/BUILD +++ /dev/null @@ -1,70 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "compression_test.go", - "cors_test.go", - "maxinflight_test.go", - "timeout_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server/filters", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/filters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "compression.go", - "cors.go", - "doc.go", - "longrunning.go", - "maxinflight.go", - "timeout.go", - "waitgroup.go", - "wrap.go", - ], - importpath = "k8s.io/apiserver/pkg/server/filters", - deps = [ - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/waitgroup:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/httplog:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/filters/compression.go b/deps/k8s.io/apiserver/pkg/server/filters/compression.go index 6bedfadea..625cd5c8d 100644 --- a/deps/k8s.io/apiserver/pkg/server/filters/compression.go +++ b/deps/k8s.io/apiserver/pkg/server/filters/compression.go @@ -46,9 +46,9 @@ const ( ) // WithCompression wraps an http.Handler with the Compression Handler -func WithCompression(handler http.Handler, ctxMapper request.RequestContextMapper) http.Handler { +func WithCompression(handler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - wantsCompression, encoding := wantsCompressedResponse(req, ctxMapper) + wantsCompression, encoding := wantsCompressedResponse(req) w.Header().Set("Vary", "Accept-Encoding") if wantsCompression { compressionWriter, err := NewCompressionResponseWriter(w, encoding) @@ -67,12 +67,9 @@ func WithCompression(handler http.Handler, ctxMapper request.RequestContextMappe } // wantsCompressedResponse reads the Accept-Encoding header to see if and which encoding is requested. -func wantsCompressedResponse(req *http.Request, ctxMapper request.RequestContextMapper) (bool, string) { +func wantsCompressedResponse(req *http.Request) (bool, string) { // don't compress watches - ctx, ok := ctxMapper.Get(req) - if !ok { - return false, "" - } + ctx := req.Context() info, ok := request.RequestInfoFrom(ctx) if !ok { return false, "" @@ -172,13 +169,13 @@ func (c *compressionResponseWriter) compressorClosed() bool { } // RestfulWithCompression wraps WithCompression to be compatible with go-restful -func RestfulWithCompression(function restful.RouteFunction, ctxMapper request.RequestContextMapper) restful.RouteFunction { +func RestfulWithCompression(function restful.RouteFunction) restful.RouteFunction { return restful.RouteFunction(func(request *restful.Request, response *restful.Response) { handler := WithCompression(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { response.ResponseWriter = w request.Request = req function(request, response) - }), ctxMapper) + })) handler.ServeHTTP(response.ResponseWriter, request.Request) }) } diff --git a/deps/k8s.io/apiserver/pkg/server/filters/maxinflight.go b/deps/k8s.io/apiserver/pkg/server/filters/maxinflight.go index 84fa31c72..78700c33a 100644 --- a/deps/k8s.io/apiserver/pkg/server/filters/maxinflight.go +++ b/deps/k8s.io/apiserver/pkg/server/filters/maxinflight.go @@ -98,7 +98,6 @@ func WithMaxInFlightLimit( handler http.Handler, nonMutatingLimit int, mutatingLimit int, - requestContextMapper apirequest.RequestContextMapper, longRunningRequestCheck apirequest.LongRunningRequestCheck, ) http.Handler { startOnce.Do(startRecordingUsage) @@ -115,11 +114,7 @@ func WithMaxInFlightLimit( } return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - ctx, ok := requestContextMapper.Get(r) - if !ok { - handleError(w, r, fmt.Errorf("no context found for request, handler chain must be wrong")) - return - } + ctx := r.Context() requestInfo, ok := apirequest.RequestInfoFrom(ctx) if !ok { handleError(w, r, fmt.Errorf("no RequestInfo found in context, handler chain must be wrong")) @@ -172,7 +167,7 @@ func WithMaxInFlightLimit( metrics.DroppedRequests.WithLabelValues(metrics.ReadOnlyKind).Inc() } // at this point we're about to return a 429, BUT not all actors should be rate limited. A system:master is so powerful - // that he should always get an answer. It's a super-admin or a loopback connection. + // that they should always get an answer. It's a super-admin or a loopback connection. if currUser, ok := apirequest.UserFrom(ctx); ok { for _, group := range currUser.GetGroups() { if group == user.SystemPrivilegedGroup { diff --git a/deps/k8s.io/apiserver/pkg/server/filters/timeout.go b/deps/k8s.io/apiserver/pkg/server/filters/timeout.go index e1ead0eea..eaf767f4f 100644 --- a/deps/k8s.io/apiserver/pkg/server/filters/timeout.go +++ b/deps/k8s.io/apiserver/pkg/server/filters/timeout.go @@ -18,6 +18,7 @@ package filters import ( "bufio" + "context" "encoding/json" "fmt" "net" @@ -30,38 +31,41 @@ import ( apirequest "k8s.io/apiserver/pkg/endpoints/request" ) -var errConnKilled = fmt.Errorf("kill connection/stream") +var errConnKilled = fmt.Errorf("killing connection/stream because serving request timed out and response had been started") // WithTimeoutForNonLongRunningRequests times out non-long-running requests after the time given by timeout. -func WithTimeoutForNonLongRunningRequests(handler http.Handler, requestContextMapper apirequest.RequestContextMapper, longRunning apirequest.LongRunningRequestCheck, timeout time.Duration) http.Handler { +func WithTimeoutForNonLongRunningRequests(handler http.Handler, longRunning apirequest.LongRunningRequestCheck, timeout time.Duration) http.Handler { if longRunning == nil { return handler } - timeoutFunc := func(req *http.Request) (<-chan time.Time, func(), *apierrors.StatusError) { + timeoutFunc := func(req *http.Request) (*http.Request, <-chan time.Time, func(), *apierrors.StatusError) { // TODO unify this with apiserver.MaxInFlightLimit - ctx, ok := requestContextMapper.Get(req) - if !ok { - // if this happens, the handler chain isn't setup correctly because there is no context mapper - return time.After(timeout), func() {}, apierrors.NewInternalError(fmt.Errorf("no context found for request during timeout")) - } + ctx := req.Context() requestInfo, ok := apirequest.RequestInfoFrom(ctx) if !ok { // if this happens, the handler chain isn't setup correctly because there is no request info - return time.After(timeout), func() {}, apierrors.NewInternalError(fmt.Errorf("no request info found for request during timeout")) + return req, time.After(timeout), func() {}, apierrors.NewInternalError(fmt.Errorf("no request info found for request during timeout")) } if longRunning(req, requestInfo) { - return nil, nil, nil + return req, nil, nil, nil } - metricFn := func() { + + ctx, cancel := context.WithCancel(ctx) + req = req.WithContext(ctx) + + postTimeoutFn := func() { + cancel() metrics.Record(req, requestInfo, "", http.StatusGatewayTimeout, 0, 0) } - return time.After(timeout), metricFn, apierrors.NewTimeoutError(fmt.Sprintf("request did not complete within %s", timeout), 0) + return req, time.After(timeout), postTimeoutFn, apierrors.NewTimeoutError(fmt.Sprintf("request did not complete within %s", timeout), 0) } return WithTimeout(handler, timeoutFunc) } +type timeoutFunc = func(*http.Request) (req *http.Request, timeout <-chan time.Time, postTimeoutFunc func(), err *apierrors.StatusError) + // WithTimeout returns an http.Handler that runs h with a timeout // determined by timeoutFunc. The new http.Handler calls h.ServeHTTP to handle // each request, but if a call runs for longer than its time limit, the @@ -71,17 +75,17 @@ func WithTimeoutForNonLongRunningRequests(handler http.Handler, requestContextMa // http.ErrHandlerTimeout. If timeoutFunc returns a nil timeout channel, no // timeout will be enforced. recordFn is a function that will be invoked whenever // a timeout happens. -func WithTimeout(h http.Handler, timeoutFunc func(*http.Request) (timeout <-chan time.Time, recordFn func(), err *apierrors.StatusError)) http.Handler { +func WithTimeout(h http.Handler, timeoutFunc timeoutFunc) http.Handler { return &timeoutHandler{h, timeoutFunc} } type timeoutHandler struct { handler http.Handler - timeout func(*http.Request) (<-chan time.Time, func(), *apierrors.StatusError) + timeout timeoutFunc } func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - after, recordFn, err := t.timeout(r) + r, after, postTimeoutFn, err := t.timeout(r) if after == nil { t.handler.ServeHTTP(w, r) return @@ -97,7 +101,7 @@ func (t *timeoutHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { case <-done: return case <-after: - recordFn() + postTimeoutFn() tw.timeout(err) } } diff --git a/deps/k8s.io/apiserver/pkg/server/filters/waitgroup.go b/deps/k8s.io/apiserver/pkg/server/filters/waitgroup.go index c73978e20..b40a42272 100644 --- a/deps/k8s.io/apiserver/pkg/server/filters/waitgroup.go +++ b/deps/k8s.io/apiserver/pkg/server/filters/waitgroup.go @@ -17,26 +17,22 @@ limitations under the License. package filters import ( + "errors" "net/http" utilwaitgroup "k8s.io/apimachinery/pkg/util/waitgroup" + "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" apirequest "k8s.io/apiserver/pkg/endpoints/request" ) // WithWaitGroup adds all non long-running requests to wait group, which is used for graceful shutdown. -func WithWaitGroup(handler http.Handler, requestContextMapper apirequest.RequestContextMapper, longRunning apirequest.LongRunningRequestCheck, wg *utilwaitgroup.SafeWaitGroup) http.Handler { +func WithWaitGroup(handler http.Handler, longRunning apirequest.LongRunningRequestCheck, wg *utilwaitgroup.SafeWaitGroup) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - ctx, ok := requestContextMapper.Get(req) - if !ok { - // if this happens, the handler chain isn't setup correctly because there is no context mapper - handler.ServeHTTP(w, req) - return - } - + ctx := req.Context() requestInfo, ok := apirequest.RequestInfoFrom(ctx) if !ok { // if this happens, the handler chain isn't setup correctly because there is no request info - handler.ServeHTTP(w, req) + responsewriters.InternalError(w, req, errors.New("no RequestInfo found in the context")) return } diff --git a/deps/k8s.io/apiserver/pkg/server/genericapiserver.go b/deps/k8s.io/apiserver/pkg/server/genericapiserver.go index 8235b2654..b6e500c61 100644 --- a/deps/k8s.io/apiserver/pkg/server/genericapiserver.go +++ b/deps/k8s.io/apiserver/pkg/server/genericapiserver.go @@ -27,8 +27,7 @@ import ( "github.com/emicklei/go-restful-swagger12" "github.com/golang/glog" - "k8s.io/apimachinery/pkg/apimachinery" - "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,9 +36,9 @@ import ( utilwaitgroup "k8s.io/apimachinery/pkg/util/waitgroup" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/audit" + "k8s.io/apiserver/pkg/authorization/authorizer" genericapi "k8s.io/apiserver/pkg/endpoints" "k8s.io/apiserver/pkg/endpoints/discovery" - apirequest "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/server/healthz" "k8s.io/apiserver/pkg/server/routes" @@ -49,8 +48,8 @@ import ( // Info about an API group. type APIGroupInfo struct { - GroupMeta apimachinery.GroupMeta - // Info about the resources in this group. Its a map from version to resource to the storage. + PrioritizedVersions []schema.GroupVersion + // Info about the resources in this group. It's a map from version to resource to the storage. VersionedResourcesStorageMap map[string]map[string]rest.Storage // OptionsExternalVersion controls the APIVersion used for common objects in the // schema like api.Status, api.DeleteOptions, and metav1.ListOptions. Other implementors may @@ -95,9 +94,7 @@ type GenericAPIServer struct { // admissionControl is used to build the RESTStorage that backs an API Group. admissionControl admission.Interface - // requestContextMapper provides a way to get the context for a request. It may be nil. - requestContextMapper apirequest.RequestContextMapper - + // SecureServingInfo holds configuration of the TLS server. SecureServingInfo *SecureServingInfo // ExternalAddress is the address (hostname or IP and port) that should be used in @@ -142,11 +139,16 @@ type GenericAPIServer struct { // auditing. The backend is started after the server starts listening. AuditBackend audit.Backend + // Authorizer determines whether a user is allowed to make a certain request. The Handler does a preliminary + // authorization check using the request URI but it may be necessary to make additional checks, such as in + // the create-on-update case + Authorizer authorizer.Authorizer + // enableAPIResponseCompression indicates whether API Responses should support compression // if the client requests it via Accept-Encoding enableAPIResponseCompression bool - // delegationTarget is the next delegate in the chain or nil + // delegationTarget is the next delegate in the chain. This is never nil. delegationTarget DelegationTarget // HandlerChainWaitGroup allows you to wait for all chain handlers finish after the server shutdown. @@ -159,10 +161,6 @@ type DelegationTarget interface { // UnprotectedHandler returns a handler that is NOT protected by a normal chain UnprotectedHandler() http.Handler - // RequestContextMapper returns the existing RequestContextMapper. Because we cannot rewire all existing - // uses of this function, this will be used in any delegating API server - RequestContextMapper() apirequest.RequestContextMapper - // PostStartHooks returns the post-start hooks that need to be combined PostStartHooks() map[string]postStartHookEntry @@ -200,12 +198,11 @@ func (s *GenericAPIServer) NextDelegate() DelegationTarget { return s.delegationTarget } -var EmptyDelegate = emptyDelegate{ - requestContextMapper: apirequest.NewRequestContextMapper(), +type emptyDelegate struct { } -type emptyDelegate struct { - requestContextMapper apirequest.RequestContextMapper +func NewEmptyDelegate() DelegationTarget { + return emptyDelegate{} } func (s emptyDelegate) UnprotectedHandler() http.Handler { @@ -223,25 +220,11 @@ func (s emptyDelegate) HealthzChecks() []healthz.HealthzChecker { func (s emptyDelegate) ListedPaths() []string { return []string{} } -func (s emptyDelegate) RequestContextMapper() apirequest.RequestContextMapper { - return s.requestContextMapper -} func (s emptyDelegate) NextDelegate() DelegationTarget { return nil } -// RequestContextMapper is exposed so that third party resource storage can be build in a different location. -// TODO refactor third party resource storage -func (s *GenericAPIServer) RequestContextMapper() apirequest.RequestContextMapper { - return s.requestContextMapper -} - -// MinRequestTimeout is exposed so that third party resource storage can be build in a different location. -// TODO refactor third party resource storage -func (s *GenericAPIServer) MinRequestTimeout() time.Duration { - return s.minRequestTimeout -} - +// preparedGenericAPIServer is a private wrapper that enforces a call of PrepareRun() before Run can be invoked. type preparedGenericAPIServer struct { *GenericAPIServer } @@ -259,12 +242,6 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer { s.installHealthz() - return preparedGenericAPIServer{s} -} - -// Run spawns the secure http server. It only returns if stopCh is closed -// or the secure port cannot be listened on initially. -func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { // Register audit backend preShutdownHook. if s.AuditBackend != nil { s.AddPreShutdownHook("audit-backend", func() error { @@ -273,6 +250,12 @@ func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { }) } + return preparedGenericAPIServer{s} +} + +// Run spawns the secure http server. It only returns if stopCh is closed +// or the secure port cannot be listened on initially. +func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error { err := s.NonBlockingRun(stopCh) if err != nil { return err @@ -310,7 +293,7 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error { internalStopCh := make(chan struct{}) if s.SecureServingInfo != nil && s.Handler != nil { - if err := s.serveSecurely(internalStopCh); err != nil { + if err := s.SecureServingInfo.Serve(s.Handler, s.ShutdownTimeout, internalStopCh); err != nil { close(internalStopCh) return err } @@ -337,7 +320,7 @@ func (s preparedGenericAPIServer) NonBlockingRun(stopCh <-chan struct{}) error { // installAPIResources is a private method for installing the REST storage backing each api groupversionresource func (s *GenericAPIServer) installAPIResources(apiPrefix string, apiGroupInfo *APIGroupInfo) error { - for _, groupVersion := range apiGroupInfo.GroupMeta.GroupVersions { + for _, groupVersion := range apiGroupInfo.PrioritizedVersions { if len(apiGroupInfo.VersionedResourcesStorageMap[groupVersion.Version]) == 0 { glog.Warningf("Skipping API %v because it has no resources.", groupVersion) continue @@ -349,7 +332,7 @@ func (s *GenericAPIServer) installAPIResources(apiPrefix string, apiGroupInfo *A } if err := apiGroupVersion.InstallREST(s.Handler.GoRestfulContainer); err != nil { - return fmt.Errorf("Unable to setup API %v: %v", apiGroupInfo, err) + return fmt.Errorf("unable to setup API %v: %v", apiGroupInfo, err) } } @@ -364,14 +347,10 @@ func (s *GenericAPIServer) InstallLegacyAPIGroup(apiPrefix string, apiGroupInfo return err } - // setup discovery - apiVersions := []string{} - for _, groupVersion := range apiGroupInfo.GroupMeta.GroupVersions { - apiVersions = append(apiVersions, groupVersion.Version) - } // Install the version handler. // Add a handler at / to enumerate the supported api versions. - s.Handler.GoRestfulContainer.Add(discovery.NewLegacyRootAPIHandler(s.discoveryAddresses, s.Serializer, apiPrefix, apiVersions, s.requestContextMapper).WebService()) + s.Handler.GoRestfulContainer.Add(discovery.NewLegacyRootAPIHandler(s.discoveryAddresses, s.Serializer, apiPrefix).WebService()) + return nil } @@ -379,10 +358,10 @@ func (s *GenericAPIServer) InstallLegacyAPIGroup(apiPrefix string, apiGroupInfo func (s *GenericAPIServer) InstallAPIGroup(apiGroupInfo *APIGroupInfo) error { // Do not register empty group or empty version. Doing so claims /apis/ for the wrong entity to be returned. // Catching these here places the error much closer to its origin - if len(apiGroupInfo.GroupMeta.GroupVersion.Group) == 0 { + if len(apiGroupInfo.PrioritizedVersions[0].Group) == 0 { return fmt.Errorf("cannot register handler with an empty group for %#v", *apiGroupInfo) } - if len(apiGroupInfo.GroupMeta.GroupVersion.Version) == 0 { + if len(apiGroupInfo.PrioritizedVersions[0].Version) == 0 { return fmt.Errorf("cannot register handler with an empty version for %#v", *apiGroupInfo) } @@ -394,7 +373,7 @@ func (s *GenericAPIServer) InstallAPIGroup(apiGroupInfo *APIGroupInfo) error { // Install the version handler. // Add a handler at /apis/ to enumerate all versions supported by this group. apiVersionsForDiscovery := []metav1.GroupVersionForDiscovery{} - for _, groupVersion := range apiGroupInfo.GroupMeta.GroupVersions { + for _, groupVersion := range apiGroupInfo.PrioritizedVersions { // Check the config to make sure that we elide versions that don't have any resources if len(apiGroupInfo.VersionedResourcesStorageMap[groupVersion.Version]) == 0 { continue @@ -405,17 +384,17 @@ func (s *GenericAPIServer) InstallAPIGroup(apiGroupInfo *APIGroupInfo) error { }) } preferredVersionForDiscovery := metav1.GroupVersionForDiscovery{ - GroupVersion: apiGroupInfo.GroupMeta.GroupVersion.String(), - Version: apiGroupInfo.GroupMeta.GroupVersion.Version, + GroupVersion: apiGroupInfo.PrioritizedVersions[0].String(), + Version: apiGroupInfo.PrioritizedVersions[0].Version, } apiGroup := metav1.APIGroup{ - Name: apiGroupInfo.GroupMeta.GroupVersion.Group, + Name: apiGroupInfo.PrioritizedVersions[0].Group, Versions: apiVersionsForDiscovery, PreferredVersion: preferredVersionForDiscovery, } s.DiscoveryGroupManager.AddGroup(apiGroup) - s.Handler.GoRestfulContainer.Add(discovery.NewAPIGroupHandler(s.Serializer, apiGroup, s.requestContextMapper).WebService()) + s.Handler.GoRestfulContainer.Add(discovery.NewAPIGroupHandler(s.Serializer, apiGroup).WebService()) return nil } @@ -443,23 +422,21 @@ func (s *GenericAPIServer) newAPIGroupVersion(apiGroupInfo *APIGroupInfo, groupV UnsafeConvertor: runtime.UnsafeObjectConvertor(apiGroupInfo.Scheme), Defaulter: apiGroupInfo.Scheme, Typer: apiGroupInfo.Scheme, - Linker: apiGroupInfo.GroupMeta.SelfLinker, - Mapper: apiGroupInfo.GroupMeta.RESTMapper, + Linker: runtime.SelfLinker(meta.NewAccessor()), Admit: s.admissionControl, - Context: s.RequestContextMapper(), MinRequestTimeout: s.minRequestTimeout, EnableAPIResponseCompression: s.enableAPIResponseCompression, + OpenAPIConfig: s.openAPIConfig, + Authorizer: s.Authorizer, } } // NewDefaultAPIGroupInfo returns an APIGroupInfo stubbed with "normal" values // exposed for easier composition from other packages -func NewDefaultAPIGroupInfo(group string, registry *registered.APIRegistrationManager, scheme *runtime.Scheme, parameterCodec runtime.ParameterCodec, codecs serializer.CodecFactory) APIGroupInfo { - groupMeta := registry.GroupOrDie(group) - +func NewDefaultAPIGroupInfo(group string, scheme *runtime.Scheme, parameterCodec runtime.ParameterCodec, codecs serializer.CodecFactory) APIGroupInfo { return APIGroupInfo{ - GroupMeta: *groupMeta, + PrioritizedVersions: scheme.PrioritizedVersionsForGroup(group), VersionedResourcesStorageMap: map[string]map[string]rest.Storage{}, // TODO unhardcode this. It was hardcoded before, but we need to re-evaluate OptionsExternalVersion: &schema.GroupVersion{Version: "v1"}, diff --git a/deps/k8s.io/apiserver/pkg/server/handler.go b/deps/k8s.io/apiserver/pkg/server/handler.go index a92196cba..e4e7d9aee 100644 --- a/deps/k8s.io/apiserver/pkg/server/handler.go +++ b/deps/k8s.io/apiserver/pkg/server/handler.go @@ -18,7 +18,6 @@ package server import ( "bytes" - "errors" "fmt" "net/http" rt "runtime" @@ -32,7 +31,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apiserver/pkg/endpoints/handlers/responsewriters" - "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/apiserver/pkg/server/mux" ) @@ -72,7 +70,7 @@ type APIServerHandler struct { // It is normally used to apply filtering like authentication and authorization type HandlerChainBuilderFn func(apiHandler http.Handler) http.Handler -func NewAPIServerHandler(name string, contextMapper request.RequestContextMapper, s runtime.NegotiatedSerializer, handlerChainBuilder HandlerChainBuilderFn, notFoundHandler http.Handler) *APIServerHandler { +func NewAPIServerHandler(name string, s runtime.NegotiatedSerializer, handlerChainBuilder HandlerChainBuilderFn, notFoundHandler http.Handler) *APIServerHandler { nonGoRestfulMux := mux.NewPathRecorderMux(name) if notFoundHandler != nil { nonGoRestfulMux.NotFoundHandler(notFoundHandler) @@ -85,11 +83,7 @@ func NewAPIServerHandler(name string, contextMapper request.RequestContextMapper logStackOnRecover(s, panicReason, httpWriter) }) gorestfulContainer.ServiceErrorHandler(func(serviceErr restful.ServiceError, request *restful.Request, response *restful.Response) { - ctx, ok := contextMapper.Get(request.Request) - if !ok { - responsewriters.InternalError(response.ResponseWriter, request.Request, errors.New("no context found for request")) - } - serviceErrorHandler(ctx, s, serviceErr, request, response) + serviceErrorHandler(s, serviceErr, request, response) }) director := director{ @@ -177,13 +171,11 @@ func logStackOnRecover(s runtime.NegotiatedSerializer, panicReason interface{}, if ct := w.Header().Get("Content-Type"); len(ct) > 0 { headers.Set("Accept", ct) } - emptyContext := request.NewContext() // best we can do here: we don't know the request - responsewriters.ErrorNegotiated(emptyContext, apierrors.NewGenericServerResponse(http.StatusInternalServerError, "", schema.GroupResource{}, "", "", 0, false), s, schema.GroupVersion{}, w, &http.Request{Header: headers}) + responsewriters.ErrorNegotiated(apierrors.NewGenericServerResponse(http.StatusInternalServerError, "", schema.GroupResource{}, "", "", 0, false), s, schema.GroupVersion{}, w, &http.Request{Header: headers}) } -func serviceErrorHandler(ctx request.Context, s runtime.NegotiatedSerializer, serviceErr restful.ServiceError, request *restful.Request, resp *restful.Response) { +func serviceErrorHandler(s runtime.NegotiatedSerializer, serviceErr restful.ServiceError, request *restful.Request, resp *restful.Response) { responsewriters.ErrorNegotiated( - ctx, apierrors.NewGenericServerResponse(serviceErr.Code, "", schema.GroupResource{}, "", serviceErr.Message, 0, false), s, schema.GroupVersion{}, diff --git a/deps/k8s.io/apiserver/pkg/server/healthz/BUILD b/deps/k8s.io/apiserver/pkg/server/healthz/BUILD deleted file mode 100644 index c95bc6d51..000000000 --- a/deps/k8s.io/apiserver/pkg/server/healthz/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["healthz_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server/healthz", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "healthz.go", - ], - importpath = "k8s.io/apiserver/pkg/server/healthz", - deps = ["//vendor/github.com/golang/glog:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/healthz/healthz.go b/deps/k8s.io/apiserver/pkg/server/healthz/healthz.go index bd8bfe7b5..24fafcefa 100644 --- a/deps/k8s.io/apiserver/pkg/server/healthz/healthz.go +++ b/deps/k8s.io/apiserver/pkg/server/healthz/healthz.go @@ -22,8 +22,12 @@ import ( "net/http" "strings" "sync" + "sync/atomic" + "time" "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/util/wait" ) // HealthzChecker is a named healthz checker. @@ -56,6 +60,34 @@ func (ping) Check(_ *http.Request) error { return nil } +// LogHealthz returns true if logging is not blocked +var LogHealthz HealthzChecker = &log{} + +type log struct { + startOnce sync.Once + lastVerified atomic.Value +} + +func (l *log) Name() string { + return "log" +} + +func (l *log) Check(_ *http.Request) error { + l.startOnce.Do(func() { + l.lastVerified.Store(time.Now()) + go wait.Forever(func() { + glog.Flush() + l.lastVerified.Store(time.Now()) + }, time.Minute) + }) + + lastVerified := l.lastVerified.Load().(time.Time) + if time.Since(lastVerified) < (2 * time.Minute) { + return nil + } + return fmt.Errorf("logging blocked") +} + // NamedCheck returns a healthz checker for the given name and function. func NamedCheck(name string, check func(r *http.Request) error) HealthzChecker { return &healthzCheck{name, check} @@ -66,6 +98,15 @@ func NamedCheck(name string, check func(r *http.Request) error) HealthzChecker { // exactly one call to InstallHandler. Calling InstallHandler more // than once for the same mux will result in a panic. func InstallHandler(mux mux, checks ...HealthzChecker) { + InstallPathHandler(mux, "/healthz", checks...) +} + +// InstallPathHandler registers handlers for health checking on +// a specific path to mux. *All handlers* for the path must be +// specified in exactly one call to InstallPathHandler. Calling +// InstallPathHandler more than once for the same path and mux will +// result in a panic. +func InstallPathHandler(mux mux, path string, checks ...HealthzChecker) { if len(checks) == 0 { glog.V(5).Info("No default health checks specified. Installing the ping handler.") checks = []HealthzChecker{PingHealthz} @@ -73,9 +114,9 @@ func InstallHandler(mux mux, checks ...HealthzChecker) { glog.V(5).Info("Installing healthz checkers:", strings.Join(checkerNames(checks...), ", ")) - mux.Handle("/healthz", handleRootHealthz(checks...)) + mux.Handle(path, handleRootHealthz(checks...)) for _, check := range checks { - mux.Handle(fmt.Sprintf("/healthz/%v", check.Name()), adaptCheckToHandler(check.Check)) + mux.Handle(fmt.Sprintf("%s/%v", path, check.Name()), adaptCheckToHandler(check.Check)) } } diff --git a/deps/k8s.io/apiserver/pkg/server/httplog/BUILD b/deps/k8s.io/apiserver/pkg/server/httplog/BUILD deleted file mode 100644 index 638975d03..000000000 --- a/deps/k8s.io/apiserver/pkg/server/httplog/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["httplog_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server/httplog", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "httplog.go", - ], - importpath = "k8s.io/apiserver/pkg/server/httplog", - deps = ["//vendor/github.com/golang/glog:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/httplog/httplog.go b/deps/k8s.io/apiserver/pkg/server/httplog/httplog.go index 5939ccb04..f8a8a5307 100644 --- a/deps/k8s.io/apiserver/pkg/server/httplog/httplog.go +++ b/deps/k8s.io/apiserver/pkg/server/httplog/httplog.go @@ -100,14 +100,11 @@ func NewLogged(req *http.Request, w *http.ResponseWriter) *respLogger { // then a passthroughLogger will be created which will log to stdout immediately // when Addf is called. func LogOf(req *http.Request, w http.ResponseWriter) logger { - if _, exists := w.(*respLogger); !exists { - pl := &passthroughLogger{} - return pl - } if rl, ok := w.(*respLogger); ok { return rl } - panic("Unable to find or create the logger!") + + return &passthroughLogger{} } // Unlogged returns the original ResponseWriter, or w if it is not our inserted logger. @@ -146,11 +143,11 @@ func (rl *respLogger) Addf(format string, data ...interface{}) { // Log is intended to be called once at the end of your request handler, via defer func (rl *respLogger) Log() { latency := time.Since(rl.startTime) - if glog.V(2) { + if glog.V(3) { if !rl.hijacked { - glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) %v%v%v [%s %s]", rl.req.Method, rl.req.RequestURI, latency, rl.status, rl.statusStack, rl.addedInfo, rl.req.Header["User-Agent"], rl.req.RemoteAddr)) + glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) %v%v%v [%s %s]", rl.req.Method, rl.req.RequestURI, latency, rl.status, rl.statusStack, rl.addedInfo, rl.req.UserAgent(), rl.req.RemoteAddr)) } else { - glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) hijacked [%s %s]", rl.req.Method, rl.req.RequestURI, latency, rl.req.Header["User-Agent"], rl.req.RemoteAddr)) + glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) hijacked [%s %s]", rl.req.Method, rl.req.RequestURI, latency, rl.req.UserAgent(), rl.req.RemoteAddr)) } } } diff --git a/deps/k8s.io/apiserver/pkg/server/mux/BUILD b/deps/k8s.io/apiserver/pkg/server/mux/BUILD deleted file mode 100644 index 0df54a3f0..000000000 --- a/deps/k8s.io/apiserver/pkg/server/mux/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["pathrecorder_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server/mux", - deps = ["//vendor/github.com/stretchr/testify/assert:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "pathrecorder.go", - ], - importpath = "k8s.io/apiserver/pkg/server/mux", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/options/BUILD b/deps/k8s.io/apiserver/pkg/server/options/BUILD deleted file mode 100644 index f026cd2d7..000000000 --- a/deps/k8s.io/apiserver/pkg/server/options/BUILD +++ /dev/null @@ -1,109 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "admission.go", - "api_enablement.go", - "audit.go", - "authentication.go", - "authorization.go", - "coreapi.go", - "doc.go", - "etcd.go", - "feature.go", - "recommended.go", - "server_run_options.go", - "serving.go", - ], - importpath = "k8s.io/apiserver/pkg/server/options", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/gopkg.in/natefinch/lumberjack.v2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/initializer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/initialization:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission/plugin/webhook/validating:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit/policy:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticatorfactory:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizerfactory:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic:go_default_library", - "//vendor/k8s.io/apiserver/pkg/registry/generic/registry:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/healthz:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/resourceconfig:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd3/preflight:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/flag:go_default_library", - "//vendor/k8s.io/apiserver/plugin/pkg/audit/log:go_default_library", - "//vendor/k8s.io/apiserver/plugin/pkg/audit/webhook:go_default_library", - "//vendor/k8s.io/client-go/informers:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "admission_test.go", - "serving_test.go", - ], - data = glob(["testdata/**"]), - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server/options", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/apiserver/pkg/admission:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/request:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/flag:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/options/encryptionconfig:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/options/admission.go b/deps/k8s.io/apiserver/pkg/server/options/admission.go index ce5b01e48..b53c05f62 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/admission.go +++ b/deps/k8s.io/apiserver/pkg/server/options/admission.go @@ -23,6 +23,7 @@ import ( "github.com/spf13/pflag" "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/admission/initializer" @@ -42,8 +43,8 @@ import ( var configScheme = runtime.NewScheme() func init() { - apiserverapi.AddToScheme(configScheme) - apiserverapiv1alpha1.AddToScheme(configScheme) + utilruntime.Must(apiserverapi.AddToScheme(configScheme)) + utilruntime.Must(apiserverapiv1alpha1.AddToScheme(configScheme)) } // AdmissionOptions holds the admission options @@ -79,7 +80,7 @@ func NewAdmissionOptions() *AdmissionOptions { // after all the mutating ones, so their relative order in this list // doesn't matter. RecommendedPluginOrder: []string{lifecycle.PluginName, initialization.PluginName, mutatingwebhook.PluginName, validatingwebhook.PluginName}, - DefaultOffPlugins: sets.NewString(initialization.PluginName, mutatingwebhook.PluginName, validatingwebhook.PluginName), + DefaultOffPlugins: sets.NewString(initialization.PluginName), } server.RegisterAllAdmissionPlugins(options.Plugins) return options @@ -87,12 +88,18 @@ func NewAdmissionOptions() *AdmissionOptions { // AddFlags adds flags related to admission for a specific APIServer to the specified FlagSet func (a *AdmissionOptions) AddFlags(fs *pflag.FlagSet) { + if a == nil { + return + } + fs.StringSliceVar(&a.EnablePlugins, "enable-admission-plugins", a.EnablePlugins, ""+ - "admission plugins that should be enabled in addition to default enabled ones. "+ + "admission plugins that should be enabled in addition to default enabled ones ("+ + strings.Join(a.defaultEnabledPluginNames(), ", ")+"). "+ "Comma-delimited list of admission plugins: "+strings.Join(a.Plugins.Registered(), ", ")+". "+ "The order of plugins in this flag does not matter.") fs.StringSliceVar(&a.DisablePlugins, "disable-admission-plugins", a.DisablePlugins, ""+ - "admission plugins that should be disabled although they are in the default enabled plugins list. "+ + "admission plugins that should be disabled although they are in the default enabled plugins list ("+ + strings.Join(a.defaultEnabledPluginNames(), ", ")+"). "+ "Comma-delimited list of admission plugins: "+strings.Join(a.Plugins.Registered(), ", ")+". "+ "The order of plugins in this flag does not matter.") fs.StringVar(&a.ConfigFile, "admission-control-config-file", a.ConfigFile, @@ -136,12 +143,12 @@ func (a *AdmissionOptions) ApplyTo( if err != nil { return err } - genericInitializer := initializer.New(clientset, informers, c.Authorizer, scheme) + genericInitializer := initializer.New(clientset, informers, c.Authorization.Authorizer, scheme) initializersChain := admission.PluginInitializers{} pluginInitializers = append(pluginInitializers, genericInitializer) initializersChain = append(initializersChain, pluginInitializers...) - admissionChain, err := a.Plugins.NewFromPlugins(pluginNames, pluginsConfigProvider, initializersChain, admissionmetrics.WithControllerMetrics) + admissionChain, err := a.Plugins.NewFromPlugins(pluginNames, pluginsConfigProvider, initializersChain, admission.DecoratorFunc(admissionmetrics.WithControllerMetrics)) if err != nil { return err } @@ -213,3 +220,15 @@ func (a *AdmissionOptions) enabledPluginNames() []string { return orderedPlugins } + +//Return names of plugins which are enabled by default +func (a *AdmissionOptions) defaultEnabledPluginNames() []string { + defaultOnPluginNames := []string{} + for _, pluginName := range a.RecommendedPluginOrder { + if !a.DefaultOffPlugins.Has(pluginName) { + defaultOnPluginNames = append(defaultOnPluginNames, pluginName) + } + } + + return defaultOnPluginNames +} diff --git a/deps/k8s.io/apiserver/pkg/server/options/api_enablement.go b/deps/k8s.io/apiserver/pkg/server/options/api_enablement.go index 3901511f6..71eda2981 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/api_enablement.go +++ b/deps/k8s.io/apiserver/pkg/server/options/api_enablement.go @@ -63,7 +63,7 @@ func (s *APIEnablementOptions) Validate(registries ...GroupRegisty) []error { errors := []error{} if s.RuntimeConfig["api/all"] == "false" && len(s.RuntimeConfig) == 1 { // Do not allow only set api/all=false, in such case apiserver startup has no meaning. - return append(errors, fmt.Errorf("invliad key with only api/all=false")) + return append(errors, fmt.Errorf("invalid key with only api/all=false")) } groups, err := resourceconfig.ParseGroups(s.RuntimeConfig) @@ -97,7 +97,7 @@ func (s *APIEnablementOptions) ApplyTo(c *server.Config, defaultResourceConfig * func unknownGroups(groups []string, registry GroupRegisty) []string { unknownGroups := []string{} for _, group := range groups { - if !registry.IsRegistered(group) { + if !registry.IsGroupRegistered(group) { unknownGroups = append(unknownGroups, group) } } @@ -107,5 +107,5 @@ func unknownGroups(groups []string, registry GroupRegisty) []string { // GroupRegisty provides a method to check whether given group is registered. type GroupRegisty interface { // IsRegistered returns true if given group is registered. - IsRegistered(group string) bool + IsGroupRegistered(group string) bool } diff --git a/deps/k8s.io/apiserver/pkg/server/options/audit.go b/deps/k8s.io/apiserver/pkg/server/options/audit.go index e43ebb12b..29269a228 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/audit.go +++ b/deps/k8s.io/apiserver/pkg/server/options/audit.go @@ -21,21 +21,37 @@ import ( "io" "os" "strings" + "time" "github.com/golang/glog" "github.com/spf13/pflag" "gopkg.in/natefinch/lumberjack.v2" + "k8s.io/apimachinery/pkg/runtime/schema" + auditv1 "k8s.io/apiserver/pkg/apis/audit/v1" + auditv1alpha1 "k8s.io/apiserver/pkg/apis/audit/v1alpha1" auditv1beta1 "k8s.io/apiserver/pkg/apis/audit/v1beta1" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/audit/policy" "k8s.io/apiserver/pkg/features" "k8s.io/apiserver/pkg/server" utilfeature "k8s.io/apiserver/pkg/util/feature" + pluginbuffered "k8s.io/apiserver/plugin/pkg/audit/buffered" pluginlog "k8s.io/apiserver/plugin/pkg/audit/log" + plugintruncate "k8s.io/apiserver/plugin/pkg/audit/truncate" pluginwebhook "k8s.io/apiserver/plugin/pkg/audit/webhook" ) +const ( + // Default configuration values for ModeBatch. + defaultBatchBufferSize = 10000 // Buffer up to 10000 events before starting discarding. + // These batch parameters are only used by the webhook backend. + defaultBatchMaxSize = 400 // Only send up to 400 events at a time. + defaultBatchMaxWait = 30 * time.Second // Send events at least twice a minute. + defaultBatchThrottleQPS = 10 // Limit the send rate by 10 QPS. + defaultBatchThrottleBurst = 15 // Allow up to 15 QPS burst. +) + func appendBackend(existing, newBackend audit.Backend) audit.Backend { if existing == nil { return newBackend @@ -58,6 +74,41 @@ type AuditOptions struct { WebhookOptions AuditWebhookOptions } +const ( + // ModeBatch indicates that the audit backend should buffer audit events + // internally, sending batch updates either once a certain number of + // events have been received or a certain amount of time has passed. + ModeBatch = "batch" + // ModeBlocking causes the audit backend to block on every attempt to process + // a set of events. This causes requests to the API server to wait for the + // flush before sending a response. + ModeBlocking = "blocking" +) + +// AllowedModes is the modes known for audit backends. +var AllowedModes = []string{ + ModeBatch, + ModeBlocking, +} + +type AuditBatchOptions struct { + // Should the backend asynchronous batch events to the webhook backend or + // should the backend block responses? + // + // Defaults to asynchronous batch events. + Mode string + // Configuration for batching backend. Only used in batch mode. + BatchConfig pluginbuffered.BatchConfig +} + +type AuditTruncateOptions struct { + // Whether truncating is enabled or not. + Enabled bool + + // Truncating configuration. + TruncateConfig plugintruncate.Config +} + // AuditLogOptions determines the output of the structured audit log by default. // If the AdvancedAuditing feature is set to false, AuditLogOptions holds the legacy // audit log writer. @@ -67,27 +118,58 @@ type AuditLogOptions struct { MaxBackups int MaxSize int Format string + + BatchOptions AuditBatchOptions + TruncateOptions AuditTruncateOptions + + // API group version used for serializing audit events. + GroupVersionString string } // AuditWebhookOptions control the webhook configuration for audit events. type AuditWebhookOptions struct { - ConfigFile string - // Should the webhook asynchronous batch events to the webhook backend or - // should the webhook block responses? - // - // Defaults to asynchronous batch events. - Mode string - // Configuration for batching webhook. Only used in batch mode. - BatchConfig pluginwebhook.BatchBackendConfig + ConfigFile string + InitialBackoff time.Duration + + BatchOptions AuditBatchOptions + TruncateOptions AuditTruncateOptions + + // API group version used for serializing audit events. + GroupVersionString string } func NewAuditOptions() *AuditOptions { return &AuditOptions{ WebhookOptions: AuditWebhookOptions{ - Mode: pluginwebhook.ModeBatch, - BatchConfig: pluginwebhook.NewDefaultBatchBackendConfig(), + InitialBackoff: pluginwebhook.DefaultInitialBackoff, + BatchOptions: AuditBatchOptions{ + Mode: ModeBatch, + BatchConfig: defaultWebhookBatchConfig(), + }, + TruncateOptions: NewAuditTruncateOptions(), + // TODO(audit): use v1 API in release 1.13 + GroupVersionString: "audit.k8s.io/v1beta1", + }, + LogOptions: AuditLogOptions{ + Format: pluginlog.FormatJson, + BatchOptions: AuditBatchOptions{ + Mode: ModeBlocking, + BatchConfig: defaultLogBatchConfig(), + }, + TruncateOptions: NewAuditTruncateOptions(), + // TODO(audit): use v1 API in release 1.13 + GroupVersionString: "audit.k8s.io/v1beta1", + }, + } +} + +func NewAuditTruncateOptions() AuditTruncateOptions { + return AuditTruncateOptions{ + Enabled: false, + TruncateConfig: plugintruncate.Config{ + MaxBatchSize: 10 * 1024 * 1024, // 10MB + MaxEventSize: 100 * 1024, // 100KB }, - LogOptions: AuditLogOptions{Format: pluginlog.FormatJson}, } } @@ -106,58 +188,73 @@ func (o *AuditOptions) Validate() []error { if len(o.WebhookOptions.ConfigFile) > 0 { allErrors = append(allErrors, fmt.Errorf("feature '%s' must be enabled to set option --audit-webhook-config-file", features.AdvancedAuditing)) } - } else { - // Check webhook mode - validMode := false - for _, m := range pluginwebhook.AllowedModes { - if m == o.WebhookOptions.Mode { - validMode = true - break - } - } - if !validMode { - allErrors = append(allErrors, fmt.Errorf("invalid audit webhook mode %s, allowed modes are %q", o.WebhookOptions.Mode, strings.Join(pluginwebhook.AllowedModes, ","))) - } + } - // Check webhook batch configuration - if o.WebhookOptions.BatchConfig.BufferSize <= 0 { - allErrors = append(allErrors, fmt.Errorf("invalid audit batch webhook buffer size %v, must be a positive number", o.WebhookOptions.BatchConfig.BufferSize)) - } - if o.WebhookOptions.BatchConfig.MaxBatchSize <= 0 { - allErrors = append(allErrors, fmt.Errorf("invalid audit batch webhook max batch size %v, must be a positive number", o.WebhookOptions.BatchConfig.MaxBatchSize)) - } - if o.WebhookOptions.BatchConfig.ThrottleQPS <= 0 { - allErrors = append(allErrors, fmt.Errorf("invalid audit batch webhook throttle QPS %v, must be a positive number", o.WebhookOptions.BatchConfig.ThrottleQPS)) - } - if o.WebhookOptions.BatchConfig.ThrottleBurst <= 0 { - allErrors = append(allErrors, fmt.Errorf("invalid audit batch webhook throttle burst %v, must be a positive number", o.WebhookOptions.BatchConfig.ThrottleBurst)) + allErrors = append(allErrors, o.LogOptions.Validate()...) + allErrors = append(allErrors, o.WebhookOptions.Validate()...) + + return allErrors +} + +func validateBackendMode(pluginName string, mode string) error { + for _, m := range AllowedModes { + if m == mode { + return nil } + } + return fmt.Errorf("invalid audit %s mode %s, allowed modes are %q", pluginName, mode, strings.Join(AllowedModes, ",")) +} - // Check log format - validFormat := false - for _, f := range pluginlog.AllowedFormats { - if f == o.LogOptions.Format { - validFormat = true - break - } +func validateBackendBatchOptions(pluginName string, options AuditBatchOptions) error { + if err := validateBackendMode(pluginName, options.Mode); err != nil { + return err + } + if options.Mode != ModeBatch { + // Don't validate the unused options. + return nil + } + config := options.BatchConfig + if config.BufferSize <= 0 { + return fmt.Errorf("invalid audit batch %s buffer size %v, must be a positive number", pluginName, config.BufferSize) + } + if config.MaxBatchSize <= 0 { + return fmt.Errorf("invalid audit batch %s max batch size %v, must be a positive number", pluginName, config.MaxBatchSize) + } + if config.ThrottleEnable { + if config.ThrottleQPS <= 0 { + return fmt.Errorf("invalid audit batch %s throttle QPS %v, must be a positive number", pluginName, config.ThrottleQPS) } - if !validFormat { - allErrors = append(allErrors, fmt.Errorf("invalid audit log format %s, allowed formats are %q", o.LogOptions.Format, strings.Join(pluginlog.AllowedFormats, ","))) + if config.ThrottleBurst <= 0 { + return fmt.Errorf("invalid audit batch %s throttle burst %v, must be a positive number", pluginName, config.ThrottleBurst) } } + return nil +} - // Check validities of MaxAge, MaxBackups and MaxSize of log options - if o.LogOptions.MaxAge < 0 { - allErrors = append(allErrors, fmt.Errorf("--audit-log-maxage %v can't be a negative number", o.LogOptions.MaxAge)) - } - if o.LogOptions.MaxBackups < 0 { - allErrors = append(allErrors, fmt.Errorf("--audit-log-maxbackup %v can't be a negative number", o.LogOptions.MaxBackups)) +var knownGroupVersions = []schema.GroupVersion{ + auditv1alpha1.SchemeGroupVersion, + auditv1beta1.SchemeGroupVersion, + auditv1.SchemeGroupVersion, +} + +func validateGroupVersionString(groupVersion string) error { + gv, err := schema.ParseGroupVersion(groupVersion) + if err != nil { + return err } - if o.LogOptions.MaxSize < 0 { - allErrors = append(allErrors, fmt.Errorf("--audit-log-maxsize %v can't be a negative number", o.LogOptions.MaxSize)) + if !knownGroupVersion(gv) { + return fmt.Errorf("invalid group version, allowed versions are %q", knownGroupVersions) } + return nil +} - return allErrors +func knownGroupVersion(gv schema.GroupVersion) bool { + for _, knownGv := range knownGroupVersions { + if gv == knownGv { + return true + } + } + return false } func (o *AuditOptions) AddFlags(fs *pflag.FlagSet) { @@ -170,7 +267,11 @@ func (o *AuditOptions) AddFlags(fs *pflag.FlagSet) { " With AdvancedAuditing, a profile is required to enable auditing.") o.LogOptions.AddFlags(fs) + o.LogOptions.BatchOptions.AddFlags(pluginlog.PluginName, fs) + o.LogOptions.TruncateOptions.AddFlags(pluginlog.PluginName, fs) o.WebhookOptions.AddFlags(fs) + o.WebhookOptions.BatchOptions.AddFlags(pluginwebhook.PluginName, fs) + o.WebhookOptions.TruncateOptions.AddFlags(pluginwebhook.PluginName, fs) } func (o *AuditOptions) ApplyTo(c *server.Config) error { @@ -216,10 +317,72 @@ func (o *AuditOptions) applyTo(c *server.Config) error { return nil } +func (o *AuditBatchOptions) AddFlags(pluginName string, fs *pflag.FlagSet) { + fs.StringVar(&o.Mode, fmt.Sprintf("audit-%s-mode", pluginName), o.Mode, + "Strategy for sending audit events. Blocking indicates sending events should block"+ + " server responses. Batch causes the backend to buffer and write events"+ + " asynchronously. Known modes are "+strings.Join(AllowedModes, ",")+".") + fs.IntVar(&o.BatchConfig.BufferSize, fmt.Sprintf("audit-%s-batch-buffer-size", pluginName), + o.BatchConfig.BufferSize, "The size of the buffer to store events before "+ + "batching and writing. Only used in batch mode.") + fs.IntVar(&o.BatchConfig.MaxBatchSize, fmt.Sprintf("audit-%s-batch-max-size", pluginName), + o.BatchConfig.MaxBatchSize, "The maximum size of a batch. Only used in batch mode.") + fs.DurationVar(&o.BatchConfig.MaxBatchWait, fmt.Sprintf("audit-%s-batch-max-wait", pluginName), + o.BatchConfig.MaxBatchWait, "The amount of time to wait before force writing the "+ + "batch that hadn't reached the max size. Only used in batch mode.") + fs.BoolVar(&o.BatchConfig.ThrottleEnable, fmt.Sprintf("audit-%s-batch-throttle-enable", pluginName), + o.BatchConfig.ThrottleEnable, "Whether batching throttling is enabled. Only used in batch mode.") + fs.Float32Var(&o.BatchConfig.ThrottleQPS, fmt.Sprintf("audit-%s-batch-throttle-qps", pluginName), + o.BatchConfig.ThrottleQPS, "Maximum average number of batches per second. "+ + "Only used in batch mode.") + fs.IntVar(&o.BatchConfig.ThrottleBurst, fmt.Sprintf("audit-%s-batch-throttle-burst", pluginName), + o.BatchConfig.ThrottleBurst, "Maximum number of requests sent at the same "+ + "moment if ThrottleQPS was not utilized before. Only used in batch mode.") +} + +func (o *AuditBatchOptions) wrapBackend(delegate audit.Backend) audit.Backend { + if o.Mode == ModeBlocking { + return delegate + } + return pluginbuffered.NewBackend(delegate, o.BatchConfig) +} + +func (o *AuditTruncateOptions) Validate(pluginName string) error { + config := o.TruncateConfig + if config.MaxEventSize <= 0 { + return fmt.Errorf("invalid audit truncate %s max event size %v, must be a positive number", pluginName, config.MaxEventSize) + } + if config.MaxBatchSize < config.MaxEventSize { + return fmt.Errorf("invalid audit truncate %s max batch size %v, must be greater than "+ + "max event size (%v)", pluginName, config.MaxBatchSize, config.MaxEventSize) + } + return nil +} + +func (o *AuditTruncateOptions) AddFlags(pluginName string, fs *pflag.FlagSet) { + fs.BoolVar(&o.Enabled, fmt.Sprintf("audit-%s-truncate-enabled", pluginName), + o.Enabled, "Whether event and batch truncating is enabled.") + fs.Int64Var(&o.TruncateConfig.MaxBatchSize, fmt.Sprintf("audit-%s-truncate-max-batch-size", pluginName), + o.TruncateConfig.MaxBatchSize, "Maximum size of the batch sent to the underlying backend. "+ + "Actual serialized size can be several hundreds of bytes greater. If a batch exceeds this limit, "+ + "it is split into several batches of smaller size.") + fs.Int64Var(&o.TruncateConfig.MaxEventSize, fmt.Sprintf("audit-%s-truncate-max-event-size", pluginName), + o.TruncateConfig.MaxEventSize, "Maximum size of the audit event sent to the underlying backend. "+ + "If the size of an event is greater than this number, first request and response are removed, and "+ + "if this doesn't reduce the size enough, event is discarded.") +} + +func (o *AuditTruncateOptions) wrapBackend(delegate audit.Backend, gv schema.GroupVersion) audit.Backend { + if !o.Enabled { + return delegate + } + return plugintruncate.NewBackend(delegate, o.TruncateConfig, gv) +} + func (o *AuditLogOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&o.Path, "audit-log-path", o.Path, "If set, all requests coming to the apiserver will be logged to this file. '-' means standard out.") - fs.IntVar(&o.MaxAge, "audit-log-maxage", o.MaxBackups, + fs.IntVar(&o.MaxAge, "audit-log-maxage", o.MaxAge, "The maximum number of days to retain old audit log files based on the timestamp encoded in their filename.") fs.IntVar(&o.MaxBackups, "audit-log-maxbackup", o.MaxBackups, "The maximum number of old audit log files to retain.") @@ -229,10 +392,63 @@ func (o *AuditLogOptions) AddFlags(fs *pflag.FlagSet) { "Format of saved audits. \"legacy\" indicates 1-line text format for each event."+ " \"json\" indicates structured json format. Requires the 'AdvancedAuditing' feature"+ " gate. Known formats are "+strings.Join(pluginlog.AllowedFormats, ",")+".") + fs.StringVar(&o.GroupVersionString, "audit-log-version", o.GroupVersionString, + "API group and version used for serializing audit events written to log.") +} + +func (o *AuditLogOptions) Validate() []error { + // Check whether the log backend is enabled based on the options. + if !o.enabled() { + return nil + } + + var allErrors []error + if advancedAuditingEnabled() { + if err := validateBackendBatchOptions(pluginlog.PluginName, o.BatchOptions); err != nil { + allErrors = append(allErrors, err) + } + if err := o.TruncateOptions.Validate(pluginlog.PluginName); err != nil { + allErrors = append(allErrors, err) + } + + if err := validateGroupVersionString(o.GroupVersionString); err != nil { + allErrors = append(allErrors, err) + } + + // Check log format + validFormat := false + for _, f := range pluginlog.AllowedFormats { + if f == o.Format { + validFormat = true + break + } + } + if !validFormat { + allErrors = append(allErrors, fmt.Errorf("invalid audit log format %s, allowed formats are %q", o.Format, strings.Join(pluginlog.AllowedFormats, ","))) + } + } + + // Check validities of MaxAge, MaxBackups and MaxSize of log options, if file log backend is enabled. + if o.MaxAge < 0 { + allErrors = append(allErrors, fmt.Errorf("--audit-log-maxage %v can't be a negative number", o.MaxAge)) + } + if o.MaxBackups < 0 { + allErrors = append(allErrors, fmt.Errorf("--audit-log-maxbackup %v can't be a negative number", o.MaxBackups)) + } + if o.MaxSize < 0 { + allErrors = append(allErrors, fmt.Errorf("--audit-log-maxsize %v can't be a negative number", o.MaxSize)) + } + + return allErrors +} + +// Check whether the log backend is enabled based on the options. +func (o *AuditLogOptions) enabled() bool { + return o != nil && o.Path != "" } func (o *AuditLogOptions) getWriter() io.Writer { - if o.Path == "" { + if !o.enabled() { return nil } @@ -250,7 +466,11 @@ func (o *AuditLogOptions) getWriter() io.Writer { func (o *AuditLogOptions) advancedApplyTo(c *server.Config) error { if w := o.getWriter(); w != nil { - c.AuditBackend = appendBackend(c.AuditBackend, pluginlog.NewBackend(w, o.Format, auditv1beta1.SchemeGroupVersion)) + groupVersion, _ := schema.ParseGroupVersion(o.GroupVersionString) + log := pluginlog.NewBackend(w, o.Format, groupVersion) + log = o.BatchOptions.wrapBackend(log) + log = o.TruncateOptions.wrapBackend(log, groupVersion) + c.AuditBackend = appendBackend(c.AuditBackend, log) } return nil } @@ -264,39 +484,81 @@ func (o *AuditWebhookOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&o.ConfigFile, "audit-webhook-config-file", o.ConfigFile, "Path to a kubeconfig formatted file that defines the audit webhook configuration."+ " Requires the 'AdvancedAuditing' feature gate.") - fs.StringVar(&o.Mode, "audit-webhook-mode", o.Mode, - "Strategy for sending audit events. Blocking indicates sending events should block"+ - " server responses. Batch causes the webhook to buffer and send events"+ - " asynchronously. Known modes are "+strings.Join(pluginwebhook.AllowedModes, ",")+".") - fs.IntVar(&o.BatchConfig.BufferSize, "audit-webhook-batch-buffer-size", - o.BatchConfig.BufferSize, "The size of the buffer to store events before "+ - "batching and sending to the webhook. Only used in batch mode.") - fs.IntVar(&o.BatchConfig.MaxBatchSize, "audit-webhook-batch-max-size", - o.BatchConfig.MaxBatchSize, "The maximum size of a batch sent to the webhook. "+ - "Only used in batch mode.") - fs.DurationVar(&o.BatchConfig.MaxBatchWait, "audit-webhook-batch-max-wait", - o.BatchConfig.MaxBatchWait, "The amount of time to wait before force sending the "+ - "batch that hadn't reached the max size. Only used in batch mode.") - fs.Float32Var(&o.BatchConfig.ThrottleQPS, "audit-webhook-batch-throttle-qps", - o.BatchConfig.ThrottleQPS, "Maximum average number of requests per second. "+ - "Only used in batch mode.") - fs.IntVar(&o.BatchConfig.ThrottleBurst, "audit-webhook-batch-throttle-burst", - o.BatchConfig.ThrottleBurst, "Maximum number of requests sent at the same "+ - "moment if ThrottleQPS was not utilized before. Only used in batch mode.") - fs.DurationVar(&o.BatchConfig.InitialBackoff, "audit-webhook-batch-initial-backoff", - o.BatchConfig.InitialBackoff, "The amount of time to wait before retrying the "+ - "first failed requests. Only used in batch mode.") + fs.DurationVar(&o.InitialBackoff, "audit-webhook-initial-backoff", + o.InitialBackoff, "The amount of time to wait before retrying the first failed request.") + fs.DurationVar(&o.InitialBackoff, "audit-webhook-batch-initial-backoff", + o.InitialBackoff, "The amount of time to wait before retrying the first failed request.") + fs.MarkDeprecated("audit-webhook-batch-initial-backoff", + "Deprecated, use --audit-webhook-initial-backoff instead.") + fs.StringVar(&o.GroupVersionString, "audit-webhook-version", o.GroupVersionString, + "API group and version used for serializing audit events written to webhook.") +} + +func (o *AuditWebhookOptions) Validate() []error { + if !o.enabled() { + return nil + } + + var allErrors []error + if advancedAuditingEnabled() { + if err := validateBackendBatchOptions(pluginwebhook.PluginName, o.BatchOptions); err != nil { + allErrors = append(allErrors, err) + } + if err := o.TruncateOptions.Validate(pluginwebhook.PluginName); err != nil { + allErrors = append(allErrors, err) + } + + if err := validateGroupVersionString(o.GroupVersionString); err != nil { + allErrors = append(allErrors, err) + } + } + return allErrors +} + +func (o *AuditWebhookOptions) enabled() bool { + return o != nil && o.ConfigFile != "" } func (o *AuditWebhookOptions) applyTo(c *server.Config) error { - if o.ConfigFile == "" { + if !o.enabled() { return nil } - webhook, err := pluginwebhook.NewBackend(o.ConfigFile, o.Mode, auditv1beta1.SchemeGroupVersion, o.BatchConfig) + groupVersion, _ := schema.ParseGroupVersion(o.GroupVersionString) + webhook, err := pluginwebhook.NewBackend(o.ConfigFile, groupVersion, o.InitialBackoff) if err != nil { return fmt.Errorf("initializing audit webhook: %v", err) } + webhook = o.BatchOptions.wrapBackend(webhook) + webhook = o.TruncateOptions.wrapBackend(webhook, groupVersion) c.AuditBackend = appendBackend(c.AuditBackend, webhook) return nil } + +// defaultWebhookBatchConfig returns the default BatchConfig used by the Webhook backend. +func defaultWebhookBatchConfig() pluginbuffered.BatchConfig { + return pluginbuffered.BatchConfig{ + BufferSize: defaultBatchBufferSize, + MaxBatchSize: defaultBatchMaxSize, + MaxBatchWait: defaultBatchMaxWait, + + ThrottleEnable: true, + ThrottleQPS: defaultBatchThrottleQPS, + ThrottleBurst: defaultBatchThrottleBurst, + + AsyncDelegate: true, + } +} + +// defaultLogBatchConfig returns the default BatchConfig used by the Log backend. +func defaultLogBatchConfig() pluginbuffered.BatchConfig { + return pluginbuffered.BatchConfig{ + BufferSize: defaultBatchBufferSize, + // Batching is not useful for the log-file backend. + // MaxBatchWait ignored. + MaxBatchSize: 1, + ThrottleEnable: false, + // Asynchronous log threads just create lock contention. + AsyncDelegate: false, + } +} diff --git a/deps/k8s.io/apiserver/pkg/server/options/authentication.go b/deps/k8s.io/apiserver/pkg/server/options/authentication.go index 28c933bea..2dd8cda38 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/authentication.go +++ b/deps/k8s.io/apiserver/pkg/server/options/authentication.go @@ -32,6 +32,7 @@ import ( coreclient "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" + openapicommon "k8s.io/kube-openapi/pkg/common" ) type RequestHeaderAuthenticationOptions struct { @@ -58,7 +59,8 @@ func (s *RequestHeaderAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.ClientCAFile, "requestheader-client-ca-file", s.ClientCAFile, ""+ "Root certificate bundle to use to verify client certificates on incoming requests "+ - "before trusting usernames in headers specified by --requestheader-username-headers") + "before trusting usernames in headers specified by --requestheader-username-headers. "+ + "WARNING: generally do not depend on authorization being already done for incoming requests.") fs.StringSliceVar(&s.AllowedNames, "requestheader-allowed-names", s.AllowedNames, ""+ "List of client certificate common names to allow to provide usernames in headers "+ @@ -130,6 +132,10 @@ func (s *DelegatingAuthenticationOptions) Validate() []error { } func (s *DelegatingAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { + if s == nil { + return + } + fs.StringVar(&s.RemoteKubeConfigFile, "authentication-kubeconfig", s.RemoteKubeConfigFile, ""+ "kubeconfig file pointing at the 'core' kubernetes server with enough rights to create "+ "tokenaccessreviews.authentication.k8s.io.") @@ -146,7 +152,7 @@ func (s *DelegatingAuthenticationOptions) AddFlags(fs *pflag.FlagSet) { } -func (s *DelegatingAuthenticationOptions) ApplyTo(c *server.Config) error { +func (s *DelegatingAuthenticationOptions) ApplyTo(c *server.AuthenticationInfo, servingInfo *server.SecureServingInfo, openAPIConfig *openapicommon.Config) error { if s == nil { c.Authenticator = nil return nil @@ -154,10 +160,13 @@ func (s *DelegatingAuthenticationOptions) ApplyTo(c *server.Config) error { clientCA, err := s.getClientCA() if err != nil { - return err + if _, ignorable := err.(ignorableError); !ignorable { + return err + } else { + glog.Warning(err) + } } - c, err = c.ApplyClientCert(clientCA.ClientCA) - if err != nil { + if err = c.ApplyClientCert(clientCA.ClientCA, servingInfo); err != nil { return fmt.Errorf("unable to load client CA file: %v", err) } @@ -165,8 +174,7 @@ func (s *DelegatingAuthenticationOptions) ApplyTo(c *server.Config) error { if err != nil { return err } - c, err = c.ApplyClientCert(requestHeader.ClientCAFile) - if err != nil { + if err = c.ApplyClientCert(requestHeader.ClientCAFile, servingInfo); err != nil { return fmt.Errorf("unable to load client CA file: %v", err) } @@ -180,8 +188,8 @@ func (s *DelegatingAuthenticationOptions) ApplyTo(c *server.Config) error { } c.Authenticator = authenticator - if c.OpenAPIConfig != nil { - c.OpenAPIConfig.SecurityDefinitions = securityDefinitions + if openAPIConfig != nil { + openAPIConfig.SecurityDefinitions = securityDefinitions } c.SupportsBasicAuth = false @@ -196,7 +204,11 @@ func (s *DelegatingAuthenticationOptions) ToAuthenticationConfig() (authenticato clientCA, err := s.getClientCA() if err != nil { - return authenticatorfactory.DelegatingAuthenticatorConfig{}, err + if _, ignorable := err.(ignorableError); !ignorable { + return authenticatorfactory.DelegatingAuthenticatorConfig{}, err + } else { + glog.Warning(err) + } } requestHeader, err := s.getRequestHeader() if err != nil { @@ -215,8 +227,12 @@ func (s *DelegatingAuthenticationOptions) ToAuthenticationConfig() (authenticato const ( authenticationConfigMapNamespace = metav1.NamespaceSystem - authenticationConfigMapName = "extension-apiserver-authentication" - authenticationRoleName = "extension-apiserver-authentication-reader" + // authenticationConfigMapName is the name of ConfigMap in the kube-system namespace holding the root certificate + // bundle to use to verify client certificates on incoming requests before trusting usernames in headers specified + // by --requestheader-username-headers. This is created in the cluster by the kube-apiserver. + // "WARNING: generally do not depend on authorization being already done for incoming requests.") + authenticationConfigMapName = "extension-apiserver-authentication" + authenticationRoleName = "extension-apiserver-authentication-reader" ) func (s *DelegatingAuthenticationOptions) getClientCA() (*ClientCertAuthenticationOptions, error) { @@ -232,7 +248,7 @@ func (s *DelegatingAuthenticationOptions) getClientCA() (*ClientCertAuthenticati return nil, err } if incluster == nil { - return nil, fmt.Errorf("cluster doesn't provide client-ca-file") + return &s.ClientCert, ignorableError{fmt.Errorf("cluster doesn't provide client-ca-file in configmap/%s in %s, so client certificate authentication to extension api-server won't work.", authenticationConfigMapName, authenticationConfigMapNamespace)} } return incluster, nil } @@ -258,7 +274,7 @@ func (s *DelegatingAuthenticationOptions) getRequestHeader() (*RequestHeaderAuth func (s *DelegatingAuthenticationOptions) lookupInClusterClientCA() (*ClientCertAuthenticationOptions, error) { clientConfig, err := s.getClientConfig() if err != nil { - return nil, err + return nil, fmt.Errorf("failed to get delegated authentication kubeconfig: %v", err) } client, err := coreclient.NewForConfig(clientConfig) if err != nil { @@ -386,3 +402,5 @@ func (s *DelegatingAuthenticationOptions) newTokenAccessReview() (authentication return client.TokenReviews(), nil } + +type ignorableError struct{ error } diff --git a/deps/k8s.io/apiserver/pkg/server/options/authorization.go b/deps/k8s.io/apiserver/pkg/server/options/authorization.go index 9a452d11e..738faa1d4 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/authorization.go +++ b/deps/k8s.io/apiserver/pkg/server/options/authorization.go @@ -17,11 +17,15 @@ limitations under the License. package options import ( + "fmt" "time" "github.com/spf13/pflag" + "k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/authorizerfactory" + "k8s.io/apiserver/pkg/authorization/path" + "k8s.io/apiserver/pkg/authorization/union" "k8s.io/apiserver/pkg/server" authorizationclient "k8s.io/client-go/kubernetes/typed/authorization/v1beta1" "k8s.io/client-go/rest" @@ -29,7 +33,10 @@ import ( ) // DelegatingAuthorizationOptions provides an easy way for composing API servers to delegate their authorization to -// the root kube API server +// the root kube API server. +// WARNING: never assume that every authenticated incoming request already does authorization. +// The aggregator in the kube API server does this today, but this behaviour is not +// guaranteed in the future. type DelegatingAuthorizationOptions struct { // RemoteKubeConfigFile is the file to use to connect to a "normal" kube API server which hosts the // SubjectAccessReview.authorization.k8s.io endpoint for checking tokens. @@ -41,6 +48,10 @@ type DelegatingAuthorizationOptions struct { // DenyCacheTTL is the length of time that an unsuccessful authorization response will be cached. // You generally want more responsive, "deny, try again" flows. DenyCacheTTL time.Duration + + // AlwaysAllowPaths are HTTP paths which are excluded from authorization. They can be plain + // paths or end in * in which case prefix-match is applied. A leading / is optional. + AlwaysAllowPaths []string } func NewDelegatingAuthorizationOptions() *DelegatingAuthorizationOptions { @@ -61,9 +72,9 @@ func (s *DelegatingAuthorizationOptions) AddFlags(fs *pflag.FlagSet) { return } - fs.StringVar(&s.RemoteKubeConfigFile, "authorization-kubeconfig", s.RemoteKubeConfigFile, ""+ + fs.StringVar(&s.RemoteKubeConfigFile, "authorization-kubeconfig", s.RemoteKubeConfigFile, "kubeconfig file pointing at the 'core' kubernetes server with enough rights to create "+ - " subjectaccessreviews.authorization.k8s.io.") + " subjectaccessreviews.authorization.k8s.io.") fs.DurationVar(&s.AllowCacheTTL, "authorization-webhook-cache-authorized-ttl", s.AllowCacheTTL, @@ -72,39 +83,53 @@ func (s *DelegatingAuthorizationOptions) AddFlags(fs *pflag.FlagSet) { fs.DurationVar(&s.DenyCacheTTL, "authorization-webhook-cache-unauthorized-ttl", s.DenyCacheTTL, "The duration to cache 'unauthorized' responses from the webhook authorizer.") + + fs.StringSliceVar(&s.AlwaysAllowPaths, "authorization-always-allow-paths", s.AlwaysAllowPaths, + "A list of HTTP paths to skip during authorization, i.e. these are authorized without "+ + "contacting the 'core' kubernetes server.") } -func (s *DelegatingAuthorizationOptions) ApplyTo(c *server.Config) error { +func (s *DelegatingAuthorizationOptions) ApplyTo(c *server.AuthorizationInfo) error { if s == nil { c.Authorizer = authorizerfactory.NewAlwaysAllowAuthorizer() return nil } - cfg, err := s.ToAuthorizationConfig() - if err != nil { - return err - } - authorizer, err := cfg.New() + a, err := s.ToAuthorization() if err != nil { return err } - - c.Authorizer = authorizer + c.Authorizer = a return nil } -func (s *DelegatingAuthorizationOptions) ToAuthorizationConfig() (authorizerfactory.DelegatingAuthorizerConfig, error) { +func (s *DelegatingAuthorizationOptions) ToAuthorization() (authorizer.Authorizer, error) { + var authorizers []authorizer.Authorizer + + if len(s.AlwaysAllowPaths) > 0 { + a, err := path.NewAuthorizer(s.AlwaysAllowPaths) + if err != nil { + return nil, err + } + authorizers = append(authorizers, a) + } + sarClient, err := s.newSubjectAccessReview() if err != nil { - return authorizerfactory.DelegatingAuthorizerConfig{}, err + return nil, err } - - ret := authorizerfactory.DelegatingAuthorizerConfig{ + cfg := authorizerfactory.DelegatingAuthorizerConfig{ SubjectAccessReviewClient: sarClient, AllowCacheTTL: s.AllowCacheTTL, DenyCacheTTL: s.DenyCacheTTL, } - return ret, nil + a, err := cfg.New() + if err != nil { + return nil, err + } + authorizers = append(authorizers, a) + + return union.New(authorizers...), nil } func (s *DelegatingAuthorizationOptions) newSubjectAccessReview() (authorizationclient.SubjectAccessReviewInterface, error) { @@ -122,7 +147,7 @@ func (s *DelegatingAuthorizationOptions) newSubjectAccessReview() (authorization clientConfig, err = rest.InClusterConfig() } if err != nil { - return nil, err + return nil, fmt.Errorf("failed to get delegated authorization kubeconfig: %v", err) } // set high qps/burst limits since this will effectively limit API server responsiveness diff --git a/deps/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go b/deps/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go new file mode 100644 index 000000000..e8e3d7feb --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/server/options/deprecated_insecure_serving.go @@ -0,0 +1,164 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package options + +import ( + "fmt" + "net" + + "github.com/spf13/pflag" + + "k8s.io/apiserver/pkg/server" + "k8s.io/client-go/rest" +) + +// DeprecatedInsecureServingOptions are for creating an unauthenticated, unauthorized, insecure port. +// No one should be using these anymore. +// DEPRECATED: all insecure serving options are removed in a future version +type DeprecatedInsecureServingOptions struct { + BindAddress net.IP + BindPort int + // BindNetwork is the type of network to bind to - defaults to "tcp", accepts "tcp", + // "tcp4", and "tcp6". + BindNetwork string + + // Listener is the secure server network listener. + // either Listener or BindAddress/BindPort/BindNetwork is set, + // if Listener is set, use it and omit BindAddress/BindPort/BindNetwork. + Listener net.Listener + + // ListenFunc can be overridden to create a custom listener, e.g. for mocking in tests. + // It defaults to options.CreateListener. + ListenFunc func(network, addr string) (net.Listener, int, error) +} + +// Validate ensures that the insecure port values within the range of the port. +func (s *DeprecatedInsecureServingOptions) Validate() []error { + if s == nil { + return nil + } + + errors := []error{} + + if s.BindPort < 0 || s.BindPort > 65335 { + errors = append(errors, fmt.Errorf("insecure port %v must be between 0 and 65335, inclusive. 0 for turning off insecure (HTTP) port", s.BindPort)) + } + + return errors +} + +// AddFlags adds flags related to insecure serving to the specified FlagSet. +func (s *DeprecatedInsecureServingOptions) AddFlags(fs *pflag.FlagSet) { + if s == nil { + return + } + + fs.IPVar(&s.BindAddress, "insecure-bind-address", s.BindAddress, ""+ + "The IP address on which to serve the --insecure-port (set to 0.0.0.0 for all IPv4 interfaces and :: for all IPv6 interfaces).") + fs.MarkDeprecated("insecure-bind-address", "This flag will be removed in a future version.") + fs.Lookup("insecure-bind-address").Hidden = false + + fs.IntVar(&s.BindPort, "insecure-port", s.BindPort, ""+ + "The port on which to serve unsecured, unauthenticated access.") + fs.MarkDeprecated("insecure-port", "This flag will be removed in a future version.") + fs.Lookup("insecure-port").Hidden = false +} + +// AddUnqualifiedFlags adds flags related to insecure serving without the --insecure prefix to the specified FlagSet. +func (s *DeprecatedInsecureServingOptions) AddUnqualifiedFlags(fs *pflag.FlagSet) { + if s == nil { + return + } + + fs.IPVar(&s.BindAddress, "address", s.BindAddress, + "DEPRECATED: see --bind-address instead.") + fs.MarkDeprecated("address", "see --bind-address instead.") + + fs.IntVar(&s.BindPort, "port", s.BindPort, "DEPRECATED: see --secure-port instead.") + fs.MarkDeprecated("port", "see --secure-port instead.") +} + +// ApplyTo adds DeprecatedInsecureServingOptions to the insecureserverinfo amd kube-controller manager configuration. +// Note: the double pointer allows to set the *DeprecatedInsecureServingInfo to nil without referencing the struct hosting this pointer. +func (s *DeprecatedInsecureServingOptions) ApplyTo(c **server.DeprecatedInsecureServingInfo) error { + if s == nil { + return nil + } + if s.BindPort <= 0 { + return nil + } + + if s.Listener == nil { + var err error + listen := CreateListener + if s.ListenFunc != nil { + listen = s.ListenFunc + } + addr := net.JoinHostPort(s.BindAddress.String(), fmt.Sprintf("%d", s.BindPort)) + s.Listener, s.BindPort, err = listen(s.BindNetwork, addr) + if err != nil { + return fmt.Errorf("failed to create listener: %v", err) + } + } + + *c = &server.DeprecatedInsecureServingInfo{ + Listener: s.Listener, + } + + return nil +} + +// WithLoopback adds loopback functionality to the serving options. +func (o *DeprecatedInsecureServingOptions) WithLoopback() *DeprecatedInsecureServingOptionsWithLoopback { + return &DeprecatedInsecureServingOptionsWithLoopback{o} +} + +// DeprecatedInsecureServingOptionsWithLoopback adds loopback functionality to the DeprecatedInsecureServingOptions. +// DEPRECATED: all insecure serving options are removed in a future version +type DeprecatedInsecureServingOptionsWithLoopback struct { + *DeprecatedInsecureServingOptions +} + +// ApplyTo fills up serving information in the server configuration. +func (s *DeprecatedInsecureServingOptionsWithLoopback) ApplyTo(insecureServingInfo **server.DeprecatedInsecureServingInfo, loopbackClientConfig **rest.Config) error { + if s == nil || s.DeprecatedInsecureServingOptions == nil || insecureServingInfo == nil { + return nil + } + + if err := s.DeprecatedInsecureServingOptions.ApplyTo(insecureServingInfo); err != nil { + return err + } + + if *insecureServingInfo == nil || loopbackClientConfig == nil { + return nil + } + + secureLoopbackClientConfig, err := (*insecureServingInfo).NewLoopbackClientConfig() + switch { + // if we failed and there's no fallback loopback client config, we need to fail + case err != nil && secureLoopbackClientConfig == nil: + return err + + // if we failed, but we already have a fallback loopback client config (usually insecure), allow it + case err != nil && secureLoopbackClientConfig != nil: + + default: + *loopbackClientConfig = secureLoopbackClientConfig + } + + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/server/options/etcd.go b/deps/k8s.io/apiserver/pkg/server/options/etcd.go index e401193a7..7f7c47d76 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/etcd.go +++ b/deps/k8s.io/apiserver/pkg/server/options/etcd.go @@ -21,6 +21,7 @@ import ( "net/http" "strconv" "strings" + "time" "github.com/spf13/pflag" @@ -31,8 +32,8 @@ import ( "k8s.io/apiserver/pkg/server" "k8s.io/apiserver/pkg/server/healthz" serverstorage "k8s.io/apiserver/pkg/server/storage" - "k8s.io/apiserver/pkg/storage/etcd3/preflight" "k8s.io/apiserver/pkg/storage/storagebackend" + storagefactory "k8s.io/apiserver/pkg/storage/storagebackend/factory" ) type EtcdOptions struct { @@ -64,7 +65,7 @@ var storageTypes = sets.NewString( ) func NewEtcdOptions(backendConfig *storagebackend.Config) *EtcdOptions { - return &EtcdOptions{ + options := &EtcdOptions{ StorageConfig: *backendConfig, DefaultStorageMediaType: "application/json", DeleteCollectionWorkers: 1, @@ -72,6 +73,8 @@ func NewEtcdOptions(backendConfig *storagebackend.Config) *EtcdOptions { EnableWatchCache: true, DefaultWatchCacheSize: 100, } + options.StorageConfig.CountMetricPollPeriod = time.Minute + return options } func (s *EtcdOptions) Validate() []error { @@ -88,6 +91,21 @@ func (s *EtcdOptions) Validate() []error { allErrors = append(allErrors, fmt.Errorf("--storage-backend invalid, must be 'etcd3' or 'etcd2'. If not specified, it will default to 'etcd3'")) } + for _, override := range s.EtcdServersOverrides { + tokens := strings.Split(override, "#") + if len(tokens) != 2 { + allErrors = append(allErrors, fmt.Errorf("--etcd-servers-overrides invalid, must be of format: group/resource#servers, where servers are URLs, semicolon separated")) + continue + } + + apiresource := strings.Split(tokens[0], "/") + if len(apiresource) != 2 { + allErrors = append(allErrors, fmt.Errorf("--etcd-servers-overrides invalid, must be of format: group/resource#servers, where servers are URLs, semicolon separated")) + continue + } + + } + return allErrors } @@ -99,7 +117,7 @@ func (s *EtcdOptions) AddFlags(fs *pflag.FlagSet) { fs.StringSliceVar(&s.EtcdServersOverrides, "etcd-servers-overrides", s.EtcdServersOverrides, ""+ "Per-resource etcd servers overrides, comma separated. The individual override "+ - "format: group/resource#servers, where servers are http://ip:port, semicolon separated.") + "format: group/resource#servers, where servers are URLs, semicolon separated.") fs.StringVar(&s.DefaultStorageMediaType, "storage-media-type", s.DefaultStorageMediaType, ""+ "The media type to use to store objects in storage. "+ @@ -155,35 +173,38 @@ func (s *EtcdOptions) AddFlags(fs *pflag.FlagSet) { fs.DurationVar(&s.StorageConfig.CompactionInterval, "etcd-compaction-interval", s.StorageConfig.CompactionInterval, "The interval of compaction requests. If 0, the compaction request from apiserver is disabled.") + fs.DurationVar(&s.StorageConfig.CountMetricPollPeriod, "etcd-count-metric-poll-period", s.StorageConfig.CountMetricPollPeriod, ""+ + "Frequency of polling etcd for number of resources per type. 0 disables the metric collection.") } func (s *EtcdOptions) ApplyTo(c *server.Config) error { if s == nil { return nil } - - s.addEtcdHealthEndpoint(c) + if err := s.addEtcdHealthEndpoint(c); err != nil { + return err + } c.RESTOptionsGetter = &SimpleRestOptionsFactory{Options: *s} return nil } func (s *EtcdOptions) ApplyWithStorageFactoryTo(factory serverstorage.StorageFactory, c *server.Config) error { - s.addEtcdHealthEndpoint(c) + if err := s.addEtcdHealthEndpoint(c); err != nil { + return err + } c.RESTOptionsGetter = &storageFactoryRestOptionsFactory{Options: *s, StorageFactory: factory} return nil } -func (s *EtcdOptions) addEtcdHealthEndpoint(c *server.Config) { +func (s *EtcdOptions) addEtcdHealthEndpoint(c *server.Config) error { + healthCheck, err := storagefactory.CreateHealthCheck(s.StorageConfig) + if err != nil { + return err + } c.HealthzChecks = append(c.HealthzChecks, healthz.NamedCheck("etcd", func(r *http.Request) error { - done, err := preflight.EtcdConnection{ServerList: s.StorageConfig.ServerList}.CheckEtcdServers() - if !done { - return fmt.Errorf("etcd failed") - } - if err != nil { - return err - } - return nil + return healthCheck() })) + return nil } type SimpleRestOptionsFactory struct { @@ -197,6 +218,7 @@ func (f *SimpleRestOptionsFactory) GetRESTOptions(resource schema.GroupResource) EnableGarbageCollection: f.Options.EnableGarbageCollection, DeleteCollectionWorkers: f.Options.DeleteCollectionWorkers, ResourcePrefix: resource.Group + "/" + resource.Resource, + CountMetricPollPeriod: f.Options.StorageConfig.CountMetricPollPeriod, } if f.Options.EnableWatchCache { sizes, err := ParseWatchCacheSizes(f.Options.WatchCacheSizes) @@ -229,6 +251,7 @@ func (f *storageFactoryRestOptionsFactory) GetRESTOptions(resource schema.GroupR DeleteCollectionWorkers: f.Options.DeleteCollectionWorkers, EnableGarbageCollection: f.Options.EnableGarbageCollection, ResourcePrefix: f.StorageFactory.ResourcePrefix(resource), + CountMetricPollPeriod: f.Options.StorageConfig.CountMetricPollPeriod, } if f.Options.EnableWatchCache { sizes, err := ParseWatchCacheSizes(f.Options.WatchCacheSizes) diff --git a/deps/k8s.io/apiserver/pkg/server/options/recommended.go b/deps/k8s.io/apiserver/pkg/server/options/recommended.go index 148bfbdce..5016145bd 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/recommended.go +++ b/deps/k8s.io/apiserver/pkg/server/options/recommended.go @@ -30,7 +30,7 @@ import ( // Each of them can be nil to leave the feature unconfigured on ApplyTo. type RecommendedOptions struct { Etcd *EtcdOptions - SecureServing *SecureServingOptions + SecureServing *SecureServingOptionsWithLoopback Authentication *DelegatingAuthenticationOptions Authorization *DelegatingAuthorizationOptions Audit *AuditOptions @@ -44,9 +44,17 @@ type RecommendedOptions struct { } func NewRecommendedOptions(prefix string, codec runtime.Codec) *RecommendedOptions { + sso := NewSecureServingOptions() + + // We are composing recommended options for an aggregated api-server, + // whose client is typically a proxy multiplexing many operations --- + // notably including long-running ones --- into one HTTP/2 connection + // into this server. So allow many concurrent operations. + sso.HTTP2MaxStreamsPerConnection = 1000 + return &RecommendedOptions{ Etcd: NewEtcdOptions(storagebackend.NewDefaultConfig(prefix, codec)), - SecureServing: NewSecureServingOptions(), + SecureServing: sso.WithLoopback(), Authentication: NewDelegatingAuthenticationOptions(), Authorization: NewDelegatingAuthorizationOptions(), Audit: NewAuditOptions(), @@ -75,13 +83,13 @@ func (o *RecommendedOptions) ApplyTo(config *server.RecommendedConfig, scheme *r if err := o.Etcd.ApplyTo(&config.Config); err != nil { return err } - if err := o.SecureServing.ApplyTo(&config.Config); err != nil { + if err := o.SecureServing.ApplyTo(&config.Config.SecureServing, &config.Config.LoopbackClientConfig); err != nil { return err } - if err := o.Authentication.ApplyTo(&config.Config); err != nil { + if err := o.Authentication.ApplyTo(&config.Config.Authentication, config.SecureServing, config.OpenAPIConfig); err != nil { return err } - if err := o.Authorization.ApplyTo(&config.Config); err != nil { + if err := o.Authorization.ApplyTo(&config.Config.Authorization); err != nil { return err } if err := o.Audit.ApplyTo(&config.Config); err != nil { diff --git a/deps/k8s.io/apiserver/pkg/server/options/server_run_options.go b/deps/k8s.io/apiserver/pkg/server/options/server_run_options.go index 985a17967..fccb24e03 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/server_run_options.go +++ b/deps/k8s.io/apiserver/pkg/server/options/server_run_options.go @@ -103,6 +103,10 @@ func (s *ServerRunOptions) Validate() []error { errors = append(errors, fmt.Errorf("--request-timeout can not be negative value")) } + if s.MinRequestTimeout < 0 { + errors = append(errors, fmt.Errorf("--min-request-timeout can not be negative value")) + } + return errors } diff --git a/deps/k8s.io/apiserver/pkg/server/options/serving.go b/deps/k8s.io/apiserver/pkg/server/options/serving.go index edf2b02f5..96bd9fb8c 100644 --- a/deps/k8s.io/apiserver/pkg/server/options/serving.go +++ b/deps/k8s.io/apiserver/pkg/server/options/serving.go @@ -22,9 +22,9 @@ import ( "net" "path" "strconv" + "strings" "github.com/golang/glog" - "github.com/pborman/uuid" "github.com/spf13/pflag" utilnet "k8s.io/apimachinery/pkg/util/net" @@ -35,10 +35,16 @@ import ( type SecureServingOptions struct { BindAddress net.IP - BindPort int + // BindPort is ignored when Listener is set, will serve https even with 0. + BindPort int // BindNetwork is the type of network to bind to - defaults to "tcp", accepts "tcp", // "tcp4", and "tcp6". BindNetwork string + // Required set to true means that BindPort cannot be zero. + Required bool + // ExternalAddress is the address advertised, even if BindAddress is a loopback. By default this + // is set to BindAddress if the later no loopback, or to the first host interface address. + ExternalAddress net.IP // Listener is the secure server network listener. // either Listener or BindAddress/BindPort/BindNetwork is set, @@ -55,6 +61,10 @@ type SecureServingOptions struct { // MinTLSVersion is the minimum TLS version supported. // Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). MinTLSVersion string + + // HTTP2MaxStreamsPerConnection is the limit that the api server imposes on each client. + // A value of zero means to use the default provided by golang's HTTP/2 support. + HTTP2MaxStreamsPerConnection int } type CertKey struct { @@ -70,6 +80,11 @@ type GeneratableKeyCert struct { // CertDirectory is a directory that will contain the certificates. If the cert and key aren't specifically set // this will be used to derive a match with the "pair-name" CertDirectory string + // FixtureDirectory is a directory that contains test fixture used to avoid regeneration of certs during tests. + // The format is: + // _-_-.crt + // _-_-.key + FixtureDirectory string // PairName is the name which will be used with CertDirectory to make a cert and key names // It becomes CertDirector/PairName.crt and CertDirector/PairName.key PairName string @@ -87,6 +102,9 @@ func NewSecureServingOptions() *SecureServingOptions { } func (s *SecureServingOptions) DefaultExternalAddress() (net.IP, error) { + if !s.ExternalAddress.IsUnspecified() { + return s.ExternalAddress, nil + } return utilnet.ChooseBindAddress(s.BindAddress) } @@ -97,7 +115,9 @@ func (s *SecureServingOptions) Validate() []error { errors := []error{} - if s.BindPort < 0 || s.BindPort > 65535 { + if s.Required && s.BindPort < 1 || s.BindPort > 65535 { + errors = append(errors, fmt.Errorf("--secure-port %v must be between 1 and 65535, inclusive. It cannot turned off with 0", s.BindPort)) + } else if s.BindPort < 0 || s.BindPort > 65535 { errors = append(errors, fmt.Errorf("--secure-port %v must be between 0 and 65535, inclusive. 0 for turning off secure port", s.BindPort)) } @@ -112,11 +132,15 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) { fs.IPVar(&s.BindAddress, "bind-address", s.BindAddress, ""+ "The IP address on which to listen for the --secure-port port. The "+ "associated interface(s) must be reachable by the rest of the cluster, and by CLI/web "+ - "clients. If blank, all interfaces will be used (0.0.0.0).") + "clients. If blank, all interfaces will be used (0.0.0.0 for all IPv4 interfaces and :: for all IPv6 interfaces).") - fs.IntVar(&s.BindPort, "secure-port", s.BindPort, ""+ - "The port on which to serve HTTPS with authentication and authorization. If 0, "+ - "don't serve HTTPS at all.") + desc := "The port on which to serve HTTPS with authentication and authorization." + if s.Required { + desc += "It cannot switched off with 0." + } else { + desc += "If 0, don't serve HTTPS at all." + } + fs.IntVar(&s.BindPort, "secure-port", s.BindPort, desc) fs.StringVar(&s.ServerCert.CertDirectory, "cert-dir", s.ServerCert.CertDirectory, ""+ "The directory where the TLS certs are located. "+ @@ -131,14 +155,16 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) { fs.StringVar(&s.ServerCert.CertKey.KeyFile, "tls-private-key-file", s.ServerCert.CertKey.KeyFile, "File containing the default x509 private key matching --tls-cert-file.") + tlsCipherPossibleValues := utilflag.TLSCipherPossibleValues() fs.StringSliceVar(&s.CipherSuites, "tls-cipher-suites", s.CipherSuites, "Comma-separated list of cipher suites for the server. "+ - "Values are from tls package constants (https://golang.org/pkg/crypto/tls/#pkg-constants). "+ - "If omitted, the default Go cipher suites will be used") + "If omitted, the default Go cipher suites will be use. "+ + "Possible values: "+strings.Join(tlsCipherPossibleValues, ",")) + tlsPossibleVersions := utilflag.TLSPossibleVersions() fs.StringVar(&s.MinTLSVersion, "tls-min-version", s.MinTLSVersion, "Minimum TLS version supported. "+ - "Value must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants.") + "Possible values: "+strings.Join(tlsPossibleVersions, ", ")) fs.Var(utilflag.NewNamedCertKeyArray(&s.SNICertKeys), "tls-sni-cert-key", ""+ "A pair of x509 certificate and private key file paths, optionally suffixed with a list of "+ @@ -149,18 +175,18 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) { "--tls-sni-cert-key multiple times. "+ "Examples: \"example.crt,example.key\" or \"foo.crt,foo.key:*.foo.com,foo.com\".") - // TODO remove this flag in 1.11. The flag had no effect before this will prevent scripts from immediately failing on upgrade. - fs.String("tls-ca-file", "", "This flag has no effect.") - fs.MarkDeprecated("tls-ca-file", "This flag has no effect.") - + fs.IntVar(&s.HTTP2MaxStreamsPerConnection, "http2-max-streams-per-connection", s.HTTP2MaxStreamsPerConnection, ""+ + "The limit that the server gives to clients for "+ + "the maximum number of streams in an HTTP/2 connection. "+ + "Zero means to use golang's default.") } // ApplyTo fills up serving information in the server configuration. -func (s *SecureServingOptions) ApplyTo(c *server.Config) error { +func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error { if s == nil { return nil } - if s.BindPort <= 0 { + if s.BindPort <= 0 && s.Listener == nil { return nil } @@ -171,44 +197,19 @@ func (s *SecureServingOptions) ApplyTo(c *server.Config) error { if err != nil { return fmt.Errorf("failed to create listener: %v", err) } + } else { + if _, ok := s.Listener.Addr().(*net.TCPAddr); !ok { + return fmt.Errorf("failed to parse ip and port from listener") + } + s.BindPort = s.Listener.Addr().(*net.TCPAddr).Port + s.BindAddress = s.Listener.Addr().(*net.TCPAddr).IP } - if err := s.applyServingInfoTo(c); err != nil { - return err - } - - c.SecureServingInfo.Listener = s.Listener - - // create self-signed cert+key with the fake server.LoopbackClientServerNameOverride and - // let the server return it when the loopback client connects. - certPem, keyPem, err := certutil.GenerateSelfSignedCertKey(server.LoopbackClientServerNameOverride, nil, nil) - if err != nil { - return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) - } - tlsCert, err := tls.X509KeyPair(certPem, keyPem) - if err != nil { - return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) - } - - secureLoopbackClientConfig, err := c.SecureServingInfo.NewLoopbackClientConfig(uuid.NewRandom().String(), certPem) - switch { - // if we failed and there's no fallback loopback client config, we need to fail - case err != nil && c.LoopbackClientConfig == nil: - return err - - // if we failed, but we already have a fallback loopback client config (usually insecure), allow it - case err != nil && c.LoopbackClientConfig != nil: - - default: - c.LoopbackClientConfig = secureLoopbackClientConfig - c.SecureServingInfo.SNICerts[server.LoopbackClientServerNameOverride] = &tlsCert + *config = &server.SecureServingInfo{ + Listener: s.Listener, + HTTP2MaxStreamsPerConnection: s.HTTP2MaxStreamsPerConnection, } - - return nil -} - -func (s *SecureServingOptions) applyServingInfoTo(c *server.Config) error { - secureServingInfo := &server.SecureServingInfo{} + c := *config serverCertFile, serverKeyFile := s.ServerCert.CertKey.CertFile, s.ServerCert.CertKey.KeyFile // load main cert @@ -217,7 +218,7 @@ func (s *SecureServingOptions) applyServingInfoTo(c *server.Config) error { if err != nil { return fmt.Errorf("unable to load server certificate: %v", err) } - secureServingInfo.Cert = &tlsCert + c.Cert = &tlsCert } if len(s.CipherSuites) != 0 { @@ -225,11 +226,11 @@ func (s *SecureServingOptions) applyServingInfoTo(c *server.Config) error { if err != nil { return err } - secureServingInfo.CipherSuites = cipherSuites + c.CipherSuites = cipherSuites } var err error - secureServingInfo.MinTLSVersion, err = utilflag.TLSVersion(s.MinTLSVersion) + c.MinTLSVersion, err = utilflag.TLSVersion(s.MinTLSVersion) if err != nil { return err } @@ -246,19 +247,16 @@ func (s *SecureServingOptions) applyServingInfoTo(c *server.Config) error { return fmt.Errorf("failed to load SNI cert and key: %v", err) } } - secureServingInfo.SNICerts, err = server.GetNamedCertificateMap(namedTLSCerts) + c.SNICerts, err = server.GetNamedCertificateMap(namedTLSCerts) if err != nil { return err } - c.SecureServingInfo = secureServingInfo - c.ReadWritePort = s.BindPort - return nil } func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress string, alternateDNS []string, alternateIPs []net.IP) error { - if s == nil { + if s == nil || (s.BindPort == 0 && s.Listener == nil) { return nil } keyCert := &s.ServerCert.CertKey @@ -282,7 +280,7 @@ func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress str alternateIPs = append(alternateIPs, s.BindAddress) } - if cert, key, err := certutil.GenerateSelfSignedCertKey(publicAddress, alternateIPs, alternateDNS); err != nil { + if cert, key, err := certutil.GenerateSelfSignedCertKeyWithFixtures(publicAddress, alternateIPs, alternateDNS, s.ServerCert.FixtureDirectory); err != nil { return fmt.Errorf("unable to generate self signed cert: %v", err) } else { if err := certutil.WriteCert(keyCert.CertFile, cert); err != nil { diff --git a/deps/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go b/deps/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go new file mode 100644 index 000000000..ac9635d2d --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/server/options/serving_with_loopback.go @@ -0,0 +1,78 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package options + +import ( + "crypto/tls" + "fmt" + + "github.com/pborman/uuid" + + "k8s.io/apiserver/pkg/server" + "k8s.io/client-go/rest" + certutil "k8s.io/client-go/util/cert" +) + +type SecureServingOptionsWithLoopback struct { + *SecureServingOptions +} + +func (o *SecureServingOptions) WithLoopback() *SecureServingOptionsWithLoopback { + return &SecureServingOptionsWithLoopback{o} +} + +// ApplyTo fills up serving information in the server configuration. +func (s *SecureServingOptionsWithLoopback) ApplyTo(secureServingInfo **server.SecureServingInfo, loopbackClientConfig **rest.Config) error { + if s == nil || s.SecureServingOptions == nil || secureServingInfo == nil { + return nil + } + + if err := s.SecureServingOptions.ApplyTo(secureServingInfo); err != nil { + return err + } + + if *secureServingInfo == nil || loopbackClientConfig == nil { + return nil + } + + // create self-signed cert+key with the fake server.LoopbackClientServerNameOverride and + // let the server return it when the loopback client connects. + certPem, keyPem, err := certutil.GenerateSelfSignedCertKey(server.LoopbackClientServerNameOverride, nil, nil) + if err != nil { + return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) + } + tlsCert, err := tls.X509KeyPair(certPem, keyPem) + if err != nil { + return fmt.Errorf("failed to generate self-signed certificate for loopback connection: %v", err) + } + + secureLoopbackClientConfig, err := (*secureServingInfo).NewLoopbackClientConfig(uuid.NewRandom().String(), certPem) + switch { + // if we failed and there's no fallback loopback client config, we need to fail + case err != nil && secureLoopbackClientConfig == nil: + return err + + // if we failed, but we already have a fallback loopback client config (usually insecure), allow it + case err != nil && secureLoopbackClientConfig != nil: + + default: + *loopbackClientConfig = secureLoopbackClientConfig + (*secureServingInfo).SNICerts[server.LoopbackClientServerNameOverride] = &tlsCert + } + + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/server/resourceconfig/BUILD b/deps/k8s.io/apiserver/pkg/server/resourceconfig/BUILD deleted file mode 100644 index 42360074e..000000000 --- a/deps/k8s.io/apiserver/pkg/server/resourceconfig/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "helpers.go", - ], - importpath = "k8s.io/apiserver/pkg/server/resourceconfig", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/flag:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["helpers_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server/resourceconfig", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/storage:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go b/deps/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go index 3ac79b74a..cb1c54e3f 100644 --- a/deps/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go +++ b/deps/k8s.io/apiserver/pkg/server/resourceconfig/helpers.go @@ -29,12 +29,12 @@ import ( // GroupVersionRegistry provides access to registered group versions. type GroupVersionRegistry interface { - // IsRegistered returns true if given group is registered. - IsRegistered(group string) bool - // IsRegisteredVersion returns true if given version is registered. - IsRegisteredVersion(v schema.GroupVersion) bool - // RegisteredGroupVersions returns all registered group versions. - RegisteredGroupVersions() []schema.GroupVersion + // IsGroupRegistered returns true if given group is registered. + IsGroupRegistered(group string) bool + // IsVersionRegistered returns true if given version is registered. + IsVersionRegistered(v schema.GroupVersion) bool + // PrioritizedVersionsAllGroups returns all registered group versions. + PrioritizedVersionsAllGroups() []schema.GroupVersion } // MergeResourceEncodingConfigs merges the given defaultResourceConfig with specific GroupVersionResource overrides. @@ -78,9 +78,9 @@ func MergeAPIResourceConfigs( if ok { if allAPIFlagValue == "false" { // Disable all group versions. - resourceConfig.DisableVersions(registry.RegisteredGroupVersions()...) + resourceConfig.DisableAll() } else if allAPIFlagValue == "true" { - resourceConfig.EnableVersions(registry.RegisteredGroupVersions()...) + resourceConfig.EnableAll() } } @@ -104,12 +104,12 @@ func MergeAPIResourceConfigs( } // Exclude group not registered into the registry. - if !registry.IsRegistered(groupVersion.Group) { + if !registry.IsGroupRegistered(groupVersion.Group) { continue } // Verify that the groupVersion is registered into registry. - if !registry.IsRegisteredVersion(groupVersion) { + if !registry.IsVersionRegistered(groupVersion) { return nil, fmt.Errorf("group version %s that has not been registered", groupVersion.String()) } enabled, err := getRuntimeConfigValue(overrides, key, false) diff --git a/deps/k8s.io/apiserver/pkg/server/routes/BUILD b/deps/k8s.io/apiserver/pkg/server/routes/BUILD deleted file mode 100644 index e7ffd916b..000000000 --- a/deps/k8s.io/apiserver/pkg/server/routes/BUILD +++ /dev/null @@ -1,54 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "index.go", - "metrics.go", - "openapi.go", - "profiling.go", - "swagger.go", - "swaggerui.go", - "version.go", - ], - importpath = "k8s.io/apiserver/pkg/server/routes", - deps = [ - "//vendor/github.com/elazarl/go-bindata-assetfs:go_default_library", - "//vendor/github.com/emicklei/go-restful:go_default_library", - "//vendor/github.com/emicklei/go-restful-swagger12:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters:go_default_library", - "//vendor/k8s.io/apiserver/pkg/endpoints/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/mux:go_default_library", - "//vendor/k8s.io/apiserver/pkg/server/routes/data/swagger:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd/metrics:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/common:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/handler:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/server/routes/data/swagger:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/routes/data/swagger/BUILD b/deps/k8s.io/apiserver/pkg/server/routes/data/swagger/BUILD deleted file mode 100644 index f715802fa..000000000 --- a/deps/k8s.io/apiserver/pkg/server/routes/data/swagger/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["datafile.go"], - importpath = "k8s.io/apiserver/pkg/server/routes/data/swagger", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/routes/data/swagger/datafile.go b/deps/k8s.io/apiserver/pkg/server/routes/data/swagger/datafile.go index 4accb69ce..619809ea0 100644 --- a/deps/k8s.io/apiserver/pkg/server/routes/data/swagger/datafile.go +++ b/deps/k8s.io/apiserver/pkg/server/routes/data/swagger/datafile.go @@ -1,5 +1,5 @@ /* -Copyright 2017 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -124,7 +124,7 @@ func third_partySwaggerUiLicense() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/LICENSE", size: 596, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/LICENSE", size: 596, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -165,7 +165,7 @@ func third_partySwaggerUiReadmeMd() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/README.md", size: 1032, mode: os.FileMode(436), modTime: time.Unix(1463153383, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/README.md", size: 1032, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -307,7 +307,7 @@ func third_partySwaggerUiCssResetCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/css/reset.css", size: 1066, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/css/reset.css", size: 1066, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1580,7 +1580,7 @@ func third_partySwaggerUiCssScreenCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/css/screen.css", size: 43042, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/css/screen.css", size: 43042, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1623,7 +1623,7 @@ func third_partySwaggerUiCssTypographyCss() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/css/typography.css", size: 1474, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/css/typography.css", size: 1474, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -1640,7 +1640,7 @@ func third_partySwaggerUiFontsDroidSansV6Latin700Eot() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.eot", size: 22924, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.eot", size: 22924, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2068,7 +2068,7 @@ func third_partySwaggerUiFontsDroidSansV6Latin700Svg() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.svg", size: 73575, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.svg", size: 73575, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2085,7 +2085,7 @@ func third_partySwaggerUiFontsDroidSansV6Latin700Ttf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.ttf", size: 40516, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.ttf", size: 40516, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2102,7 +2102,7 @@ func third_partySwaggerUiFontsDroidSansV6Latin700Woff() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.woff", size: 25992, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.woff", size: 25992, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2119,7 +2119,7 @@ func third_partySwaggerUiFontsDroidSansV6Latin700Woff2() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.woff2", size: 11480, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-700.woff2", size: 11480, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2136,7 +2136,7 @@ func third_partySwaggerUiFontsDroidSansV6LatinRegularEot() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.eot", size: 22008, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.eot", size: 22008, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2556,7 +2556,7 @@ func third_partySwaggerUiFontsDroidSansV6LatinRegularSvg() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.svg", size: 72148, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.svg", size: 72148, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2573,7 +2573,7 @@ func third_partySwaggerUiFontsDroidSansV6LatinRegularTtf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.ttf", size: 39072, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.ttf", size: 39072, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2590,7 +2590,7 @@ func third_partySwaggerUiFontsDroidSansV6LatinRegularWoff() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.woff", size: 24868, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.woff", size: 24868, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2607,7 +2607,7 @@ func third_partySwaggerUiFontsDroidSansV6LatinRegularWoff2() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.woff2", size: 11304, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/fonts/droid-sans-v6-latin-regular.woff2", size: 11304, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2624,7 +2624,7 @@ func third_partySwaggerUiImagesExplorer_iconsPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/images/explorer_icons.png", size: 5763, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/images/explorer_icons.png", size: 5763, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2641,7 +2641,7 @@ func third_partySwaggerUiImagesLogo_smallPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/images/logo_small.png", size: 770, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/images/logo_small.png", size: 770, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2658,7 +2658,7 @@ func third_partySwaggerUiImagesPet_store_apiPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/images/pet_store_api.png", size: 824, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/images/pet_store_api.png", size: 824, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2675,7 +2675,7 @@ func third_partySwaggerUiImagesThrobberGif() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/images/throbber.gif", size: 9257, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/images/throbber.gif", size: 9257, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2692,7 +2692,7 @@ func third_partySwaggerUiImagesWordnik_apiPng() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/images/wordnik_api.png", size: 980, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/images/wordnik_api.png", size: 980, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2802,7 +2802,7 @@ func third_partySwaggerUiIndexHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/index.html", size: 3561, mode: os.FileMode(436), modTime: time.Unix(1468871087, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/index.html", size: 3561, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -2833,7 +2833,7 @@ func third_partySwaggerUiLibBackboneMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/backbone-min.js", size: 20390, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/backbone-min.js", size: 20390, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -5128,7 +5128,7 @@ func third_partySwaggerUiLibHandlebars100Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/handlebars-1.0.0.js", size: 72766, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/handlebars-1.0.0.js", size: 72766, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -5172,7 +5172,7 @@ func third_partySwaggerUiLibHandlebars200Js() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/handlebars-2.0.0.js", size: 48517, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/handlebars-2.0.0.js", size: 48517, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -5189,7 +5189,7 @@ func third_partySwaggerUiLibHighlight73PackJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/highlight.7.3.pack.js", size: 7499, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/highlight.7.3.pack.js", size: 7499, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -5207,7 +5207,7 @@ func third_partySwaggerUiLibJquery180MinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery-1.8.0.min.js", size: 92556, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery-1.8.0.min.js", size: 92556, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -5241,7 +5241,7 @@ func third_partySwaggerUiLibJqueryBaBbqMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery.ba-bbq.min.js", size: 4119, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery.ba-bbq.min.js", size: 4119, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -5259,7 +5259,7 @@ func third_partySwaggerUiLibJquerySlidetoMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery.slideto.min.js", size: 369, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery.slideto.min.js", size: 369, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -5283,7 +5283,7 @@ func third_partySwaggerUiLibJqueryWiggleMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery.wiggle.min.js", size: 762, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/jquery.wiggle.min.js", size: 762, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -6498,7 +6498,7 @@ function marked(src, opt, callback) { } catch (e) { e.message += '\nPlease report this to https://github.com/chjj/marked.'; if ((opt || marked.defaults).silent) { - return '

    An error occurred:

    '
    +      return '

    An error occured:

    '
             + escape(e.message + '', true)
             + '
    '; } @@ -6571,7 +6571,7 @@ func third_partySwaggerUiLibMarkedJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/marked.js", size: 28156, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/marked.js", size: 28156, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -6780,7 +6780,7 @@ func third_partySwaggerUiLibShredContentJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/shred/content.js", size: 6862, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/shred/content.js", size: 6862, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -7152,7 +7152,7 @@ var Shred = function(options) { this.logCurl = options.logCurl || false; }; -// Most of the real work is done in the request and response classes. +// Most of the real work is done in the request and reponse classes. Shred.Request = require("./shred/request"); Shred.Response = require("./shred/response"); @@ -8351,7 +8351,7 @@ Changelog: a regress. I appologize for that. 2010.05.09 - 0.5: - - bug fix: 0 is now preceded with a + sign + - bug fix: 0 is now preceeded with a + sign - bug fix: the sign was not at the right position on padded results (Kamal Abdali) - switched from GPL to BSD license @@ -9561,7 +9561,7 @@ func third_partySwaggerUiLibShredBundleJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/shred.bundle.js", size: 88050, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/shred.bundle.js", size: 88050, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -12509,7 +12509,7 @@ func third_partySwaggerUiLibSwaggerClientJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/swagger-client.js", size: 86354, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/swagger-client.js", size: 86354, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -12800,7 +12800,7 @@ func third_partySwaggerUiLibSwaggerOauthJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/swagger-oauth.js", size: 8580, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/swagger-oauth.js", size: 8580, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -14512,7 +14512,7 @@ func third_partySwaggerUiLibSwaggerJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/swagger.js", size: 53321, mode: os.FileMode(436), modTime: time.Unix(1421093375, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/swagger.js", size: 53321, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -14534,7 +14534,7 @@ func third_partySwaggerUiLibUnderscoreMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/lib/underscore-min.js", size: 15626, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/lib/underscore-min.js", size: 15626, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -14570,7 +14570,7 @@ func third_partySwaggerUiO2cHtml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/o2c.html", size: 449, mode: os.FileMode(436), modTime: time.Unix(1425500581, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/o2c.html", size: 449, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -16827,7 +16827,7 @@ func third_partySwaggerUiSwaggerUiJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/swagger-ui.js", size: 110246, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/swagger-ui.js", size: 110246, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -16845,7 +16845,7 @@ func third_partySwaggerUiSwaggerUiMinJs() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "third_party/swagger-ui/swagger-ui.min.js", size: 63466, mode: os.FileMode(436), modTime: time.Unix(1441894315, 0)} + info := bindataFileInfo{name: "third_party/swagger-ui/swagger-ui.min.js", size: 63466, mode: os.FileMode(420), modTime: time.Unix(1503320355, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/deps/k8s.io/apiserver/pkg/server/routes/flags.go b/deps/k8s.io/apiserver/pkg/server/routes/flags.go new file mode 100644 index 000000000..d40f11499 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/server/routes/flags.go @@ -0,0 +1,126 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package routes + +import ( + "fmt" + "html/template" + "io/ioutil" + "net/http" + "path" + "sync" + + "github.com/golang/glog" + + "k8s.io/apiserver/pkg/server/mux" +) + +var ( + lock = &sync.RWMutex{} + registeredFlags = map[string]debugFlag{} +) + +// DebugFlags adds handlers for flags under /debug/flags. +type DebugFlags struct { +} + +// Install registers the APIServer's flags handler. +func (f DebugFlags) Install(c *mux.PathRecorderMux, flag string, handler func(http.ResponseWriter, *http.Request)) { + c.UnlistedHandle("/debug/flags", http.HandlerFunc(f.Index)) + c.UnlistedHandlePrefix("/debug/flags/", http.HandlerFunc(f.Index)) + + url := path.Join("/debug/flags", flag) + c.UnlistedHandleFunc(url, handler) + + f.addFlag(flag) +} + +// Index responds with the `/debug/flags` request. +// For example, "/debug/flags/v" serves the "--v" flag. +// Index responds to a request for "/debug/flags/" with an HTML page +// listing the available flags. +func (f DebugFlags) Index(w http.ResponseWriter, r *http.Request) { + lock.RLock() + defer lock.RUnlock() + if err := indexTmpl.Execute(w, registeredFlags); err != nil { + glog.Error(err) + } +} + +var indexTmpl = template.Must(template.New("index").Parse(` + +/debug/flags/ + + +/debug/flags/
    +
    +flags:
    + +{{range .}} +{{.Flag}}
    +{{end}} +
    +
    +full flags configurable
    + + +`)) + +type debugFlag struct { + Flag string +} + +func (f DebugFlags) addFlag(flag string) { + lock.Lock() + defer lock.Unlock() + registeredFlags[flag] = debugFlag{flag} +} + +// StringFlagSetterFunc is a func used for setting string type flag. +type StringFlagSetterFunc func(string) (string, error) + +// StringFlagPutHandler wraps an http Handler to set string type flag. +func StringFlagPutHandler(setter StringFlagSetterFunc) http.HandlerFunc { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + switch { + case req.Method == "PUT": + body, err := ioutil.ReadAll(req.Body) + if err != nil { + writePlainText(http.StatusBadRequest, "error reading request body: "+err.Error(), w) + return + } + defer req.Body.Close() + response, err := setter(string(body)) + if err != nil { + writePlainText(http.StatusBadRequest, err.Error(), w) + return + } + writePlainText(http.StatusOK, response, w) + return + default: + writePlainText(http.StatusNotAcceptable, "unsupported http method", w) + return + } + }) +} + +// writePlainText renders a simple string response. +func writePlainText(statusCode int, text string, w http.ResponseWriter) { + w.Header().Set("Content-Type", "text/plain") + w.WriteHeader(statusCode) + fmt.Fprintln(w, text) +} diff --git a/deps/k8s.io/apiserver/pkg/server/routes/metrics.go b/deps/k8s.io/apiserver/pkg/server/routes/metrics.go index 6d4e56edc..ee158c204 100644 --- a/deps/k8s.io/apiserver/pkg/server/routes/metrics.go +++ b/deps/k8s.io/apiserver/pkg/server/routes/metrics.go @@ -32,6 +32,7 @@ type DefaultMetrics struct{} // Install adds the DefaultMetrics handler func (m DefaultMetrics) Install(c *mux.PathRecorderMux) { + register() c.Handle("/metrics", prometheus.Handler()) } @@ -41,6 +42,7 @@ type MetricsWithReset struct{} // Install adds the MetricsWithReset handler func (m MetricsWithReset) Install(c *mux.PathRecorderMux) { + register() defaultMetricsHandler := prometheus.Handler().ServeHTTP c.HandleFunc("/metrics", func(w http.ResponseWriter, req *http.Request) { if req.Method == "DELETE" { @@ -52,3 +54,9 @@ func (m MetricsWithReset) Install(c *mux.PathRecorderMux) { defaultMetricsHandler(w, req) }) } + +// register apiserver and etcd metrics +func register() { + apimetrics.Register() + etcdmetrics.Register() +} diff --git a/deps/k8s.io/apiserver/pkg/server/routes/openapi.go b/deps/k8s.io/apiserver/pkg/server/routes/openapi.go index 1bbfacf43..06c723d37 100644 --- a/deps/k8s.io/apiserver/pkg/server/routes/openapi.go +++ b/deps/k8s.io/apiserver/pkg/server/routes/openapi.go @@ -17,7 +17,7 @@ limitations under the License. package routes import ( - "github.com/emicklei/go-restful" + restful "github.com/emicklei/go-restful" "github.com/golang/glog" "k8s.io/apiserver/pkg/server/mux" @@ -32,8 +32,15 @@ type OpenAPI struct { // Install adds the SwaggerUI webservice to the given mux. func (oa OpenAPI) Install(c *restful.Container, mux *mux.PathRecorderMux) { + // NOTE: [DEPRECATION] We will announce deprecation for format-separated endpoints for OpenAPI spec, + // and switch to a single /openapi/v2 endpoint in Kubernetes 1.10. The design doc and deprecation process + // are tracked at: https://docs.google.com/document/d/19lEqE9lc4yHJ3WJAJxS_G7TcORIJXGHyq3wpwcH28nU. _, err := handler.BuildAndRegisterOpenAPIService("/swagger.json", c.RegisteredWebServices(), oa.Config, mux) if err != nil { glog.Fatalf("Failed to register open api spec for root: %v", err) } + _, err = handler.BuildAndRegisterOpenAPIVersionedService("/openapi/v2", c.RegisteredWebServices(), oa.Config, mux) + if err != nil { + glog.Fatalf("Failed to register versioned open api spec for root: %v", err) + } } diff --git a/deps/k8s.io/apiserver/pkg/server/routes/profiling.go b/deps/k8s.io/apiserver/pkg/server/routes/profiling.go index f09a96695..b57d590f5 100644 --- a/deps/k8s.io/apiserver/pkg/server/routes/profiling.go +++ b/deps/k8s.io/apiserver/pkg/server/routes/profiling.go @@ -28,9 +28,16 @@ type Profiling struct{} // Install adds the Profiling webservice to the given mux. func (d Profiling) Install(c *mux.PathRecorderMux) { - c.UnlistedHandle("/debug/pprof", http.HandlerFunc(pprof.Index)) + c.UnlistedHandleFunc("/debug/pprof", redirectTo("/debug/pprof/")) c.UnlistedHandlePrefix("/debug/pprof/", http.HandlerFunc(pprof.Index)) c.UnlistedHandleFunc("/debug/pprof/profile", pprof.Profile) c.UnlistedHandleFunc("/debug/pprof/symbol", pprof.Symbol) c.UnlistedHandleFunc("/debug/pprof/trace", pprof.Trace) } + +// redirectTo redirects request to a certain destination. +func redirectTo(to string) func(http.ResponseWriter, *http.Request) { + return func(rw http.ResponseWriter, req *http.Request) { + http.Redirect(rw, req, to, http.StatusFound) + } +} diff --git a/deps/k8s.io/apiserver/pkg/server/secure_serving.go b/deps/k8s.io/apiserver/pkg/server/secure_serving.go new file mode 100644 index 000000000..7cfc10382 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/server/secure_serving.go @@ -0,0 +1,214 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package server + +import ( + "context" + "crypto/tls" + "crypto/x509" + "fmt" + "net" + "net/http" + "strings" + "time" + + "github.com/golang/glog" + "golang.org/x/net/http2" + + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/validation" +) + +const ( + defaultKeepAlivePeriod = 3 * time.Minute +) + +// serveSecurely runs the secure http server. It fails only if certificates cannot +// be loaded or the initial listen call fails. The actual server loop (stoppable by closing +// stopCh) runs in a go routine, i.e. serveSecurely does not block. +func (s *SecureServingInfo) Serve(handler http.Handler, shutdownTimeout time.Duration, stopCh <-chan struct{}) error { + if s.Listener == nil { + return fmt.Errorf("listener must not be nil") + } + + secureServer := &http.Server{ + Addr: s.Listener.Addr().String(), + Handler: handler, + MaxHeaderBytes: 1 << 20, + TLSConfig: &tls.Config{ + NameToCertificate: s.SNICerts, + // Can't use SSLv3 because of POODLE and BEAST + // Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher + // Can't use TLSv1.1 because of RC4 cipher usage + MinVersion: tls.VersionTLS12, + // enable HTTP2 for go's 1.7 HTTP Server + NextProtos: []string{"h2", "http/1.1"}, + }, + } + + if s.MinTLSVersion > 0 { + secureServer.TLSConfig.MinVersion = s.MinTLSVersion + } + if len(s.CipherSuites) > 0 { + secureServer.TLSConfig.CipherSuites = s.CipherSuites + } + + if s.Cert != nil { + secureServer.TLSConfig.Certificates = []tls.Certificate{*s.Cert} + } + + // append all named certs. Otherwise, the go tls stack will think no SNI processing + // is necessary because there is only one cert anyway. + // Moreover, if ServerCert.CertFile/ServerCert.KeyFile are not set, the first SNI + // cert will become the default cert. That's what we expect anyway. + for _, c := range s.SNICerts { + secureServer.TLSConfig.Certificates = append(secureServer.TLSConfig.Certificates, *c) + } + + if s.ClientCA != nil { + // Populate PeerCertificates in requests, but don't reject connections without certificates + // This allows certificates to be validated by authenticators, while still allowing other auth types + secureServer.TLSConfig.ClientAuth = tls.RequestClientCert + // Specify allowed CAs for client certificates + secureServer.TLSConfig.ClientCAs = s.ClientCA + } + + if s.HTTP2MaxStreamsPerConnection > 0 { + http2.ConfigureServer(secureServer, &http2.Server{ + MaxConcurrentStreams: uint32(s.HTTP2MaxStreamsPerConnection), + }) + } + + glog.Infof("Serving securely on %s", secureServer.Addr) + return RunServer(secureServer, s.Listener, shutdownTimeout, stopCh) +} + +// RunServer listens on the given port if listener is not given, +// then spawns a go-routine continuously serving +// until the stopCh is closed. This function does not block. +// TODO: make private when insecure serving is gone from the kube-apiserver +func RunServer( + server *http.Server, + ln net.Listener, + shutDownTimeout time.Duration, + stopCh <-chan struct{}, +) error { + if ln == nil { + return fmt.Errorf("listener must not be nil") + } + + // Shutdown server gracefully. + go func() { + <-stopCh + ctx, cancel := context.WithTimeout(context.Background(), shutDownTimeout) + server.Shutdown(ctx) + cancel() + }() + + go func() { + defer utilruntime.HandleCrash() + + var listener net.Listener + listener = tcpKeepAliveListener{ln.(*net.TCPListener)} + if server.TLSConfig != nil { + listener = tls.NewListener(listener, server.TLSConfig) + } + + err := server.Serve(listener) + + msg := fmt.Sprintf("Stopped listening on %s", ln.Addr().String()) + select { + case <-stopCh: + glog.Info(msg) + default: + panic(fmt.Sprintf("%s due to error: %v", msg, err)) + } + }() + + return nil +} + +type NamedTLSCert struct { + TLSCert tls.Certificate + + // names is a list of domain patterns: fully qualified domain names, possibly prefixed with + // wildcard segments. + Names []string +} + +// getNamedCertificateMap returns a map of *tls.Certificate by name. It's is +// suitable for use in tls.Config#NamedCertificates. Returns an error if any of the certs +// cannot be loaded. Returns nil if len(certs) == 0 +func GetNamedCertificateMap(certs []NamedTLSCert) (map[string]*tls.Certificate, error) { + // register certs with implicit names first, reverse order such that earlier trump over the later + byName := map[string]*tls.Certificate{} + for i := len(certs) - 1; i >= 0; i-- { + if len(certs[i].Names) > 0 { + continue + } + cert := &certs[i].TLSCert + + // read names from certificate common names and DNS names + if len(cert.Certificate) == 0 { + return nil, fmt.Errorf("empty SNI certificate, skipping") + } + x509Cert, err := x509.ParseCertificate(cert.Certificate[0]) + if err != nil { + return nil, fmt.Errorf("parse error for SNI certificate: %v", err) + } + cn := x509Cert.Subject.CommonName + if cn == "*" || len(validation.IsDNS1123Subdomain(strings.TrimPrefix(cn, "*."))) == 0 { + byName[cn] = cert + } + for _, san := range x509Cert.DNSNames { + byName[san] = cert + } + // intentionally all IPs in the cert are ignored as SNI forbids passing IPs + // to select a cert. Before go 1.6 the tls happily passed IPs as SNI values. + } + + // register certs with explicit names last, overwriting every of the implicit ones, + // again in reverse order. + for i := len(certs) - 1; i >= 0; i-- { + namedCert := &certs[i] + for _, name := range namedCert.Names { + byName[name] = &certs[i].TLSCert + } + } + + return byName, nil +} + +// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted +// connections. It's used by ListenAndServe and ListenAndServeTLS so +// dead TCP connections (e.g. closing laptop mid-download) eventually +// go away. +// +// Copied from Go 1.7.2 net/http/server.go +type tcpKeepAliveListener struct { + *net.TCPListener +} + +func (ln tcpKeepAliveListener) Accept() (net.Conn, error) { + tc, err := ln.AcceptTCP() + if err != nil { + return nil, err + } + tc.SetKeepAlive(true) + tc.SetKeepAlivePeriod(defaultKeepAlivePeriod) + return tc, nil +} diff --git a/deps/k8s.io/apiserver/pkg/server/serve.go b/deps/k8s.io/apiserver/pkg/server/serve.go deleted file mode 100644 index dcb4de1e5..000000000 --- a/deps/k8s.io/apiserver/pkg/server/serve.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package server - -import ( - "context" - "crypto/tls" - "crypto/x509" - "fmt" - "net" - "net/http" - "strings" - "time" - - "github.com/golang/glog" - - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/validation" -) - -const ( - defaultKeepAlivePeriod = 3 * time.Minute -) - -// serveSecurely runs the secure http server. It fails only if certificates cannot -// be loaded or the initial listen call fails. The actual server loop (stoppable by closing -// stopCh) runs in a go routine, i.e. serveSecurely does not block. -func (s *GenericAPIServer) serveSecurely(stopCh <-chan struct{}) error { - if s.SecureServingInfo.Listener == nil { - return fmt.Errorf("listener must not be nil") - } - - secureServer := &http.Server{ - Addr: s.SecureServingInfo.Listener.Addr().String(), - Handler: s.Handler, - MaxHeaderBytes: 1 << 20, - TLSConfig: &tls.Config{ - NameToCertificate: s.SecureServingInfo.SNICerts, - // Can't use SSLv3 because of POODLE and BEAST - // Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher - // Can't use TLSv1.1 because of RC4 cipher usage - MinVersion: tls.VersionTLS12, - // enable HTTP2 for go's 1.7 HTTP Server - NextProtos: []string{"h2", "http/1.1"}, - }, - } - - if s.SecureServingInfo.MinTLSVersion > 0 { - secureServer.TLSConfig.MinVersion = s.SecureServingInfo.MinTLSVersion - } - if len(s.SecureServingInfo.CipherSuites) > 0 { - secureServer.TLSConfig.CipherSuites = s.SecureServingInfo.CipherSuites - } - - if s.SecureServingInfo.Cert != nil { - secureServer.TLSConfig.Certificates = []tls.Certificate{*s.SecureServingInfo.Cert} - } - - // append all named certs. Otherwise, the go tls stack will think no SNI processing - // is necessary because there is only one cert anyway. - // Moreover, if ServerCert.CertFile/ServerCert.KeyFile are not set, the first SNI - // cert will become the default cert. That's what we expect anyway. - for _, c := range s.SecureServingInfo.SNICerts { - secureServer.TLSConfig.Certificates = append(secureServer.TLSConfig.Certificates, *c) - } - - if s.SecureServingInfo.ClientCA != nil { - // Populate PeerCertificates in requests, but don't reject connections without certificates - // This allows certificates to be validated by authenticators, while still allowing other auth types - secureServer.TLSConfig.ClientAuth = tls.RequestClientCert - // Specify allowed CAs for client certificates - secureServer.TLSConfig.ClientCAs = s.SecureServingInfo.ClientCA - } - - glog.Infof("Serving securely on %s", secureServer.Addr) - err := RunServer(secureServer, s.SecureServingInfo.Listener, s.ShutdownTimeout, stopCh) - return err -} - -// RunServer listens on the given port if listener is not given, -// then spawns a go-routine continuously serving -// until the stopCh is closed. This function does not block. -func RunServer( - server *http.Server, - ln net.Listener, - shutDownTimeout time.Duration, - stopCh <-chan struct{}, -) error { - if ln == nil { - return fmt.Errorf("listener must not be nil") - } - - // Shutdown server gracefully. - go func() { - <-stopCh - ctx, cancel := context.WithTimeout(context.Background(), shutDownTimeout) - server.Shutdown(ctx) - cancel() - }() - - go func() { - defer utilruntime.HandleCrash() - - var listener net.Listener - listener = tcpKeepAliveListener{ln.(*net.TCPListener)} - if server.TLSConfig != nil { - listener = tls.NewListener(listener, server.TLSConfig) - } - - err := server.Serve(listener) - - msg := fmt.Sprintf("Stopped listening on %s", ln.Addr().String()) - select { - case <-stopCh: - glog.Info(msg) - default: - panic(fmt.Sprintf("%s due to error: %v", msg, err)) - } - }() - - return nil -} - -type NamedTLSCert struct { - TLSCert tls.Certificate - - // names is a list of domain patterns: fully qualified domain names, possibly prefixed with - // wildcard segments. - Names []string -} - -// getNamedCertificateMap returns a map of *tls.Certificate by name. It's is -// suitable for use in tls.Config#NamedCertificates. Returns an error if any of the certs -// cannot be loaded. Returns nil if len(certs) == 0 -func GetNamedCertificateMap(certs []NamedTLSCert) (map[string]*tls.Certificate, error) { - // register certs with implicit names first, reverse order such that earlier trump over the later - byName := map[string]*tls.Certificate{} - for i := len(certs) - 1; i >= 0; i-- { - if len(certs[i].Names) > 0 { - continue - } - cert := &certs[i].TLSCert - - // read names from certificate common names and DNS names - if len(cert.Certificate) == 0 { - return nil, fmt.Errorf("empty SNI certificate, skipping") - } - x509Cert, err := x509.ParseCertificate(cert.Certificate[0]) - if err != nil { - return nil, fmt.Errorf("parse error for SNI certificate: %v", err) - } - cn := x509Cert.Subject.CommonName - if cn == "*" || len(validation.IsDNS1123Subdomain(strings.TrimPrefix(cn, "*."))) == 0 { - byName[cn] = cert - } - for _, san := range x509Cert.DNSNames { - byName[san] = cert - } - // intentionally all IPs in the cert are ignored as SNI forbids passing IPs - // to select a cert. Before go 1.6 the tls happily passed IPs as SNI values. - } - - // register certs with explicit names last, overwriting every of the implicit ones, - // again in reverse order. - for i := len(certs) - 1; i >= 0; i-- { - namedCert := &certs[i] - for _, name := range namedCert.Names { - byName[name] = &certs[i].TLSCert - } - } - - return byName, nil -} - -// tcpKeepAliveListener sets TCP keep-alive timeouts on accepted -// connections. It's used by ListenAndServe and ListenAndServeTLS so -// dead TCP connections (e.g. closing laptop mid-download) eventually -// go away. -// -// Copied from Go 1.7.2 net/http/server.go -type tcpKeepAliveListener struct { - *net.TCPListener -} - -func (ln tcpKeepAliveListener) Accept() (net.Conn, error) { - tc, err := ln.AcceptTCP() - if err != nil { - return nil, err - } - tc.SetKeepAlive(true) - tc.SetKeepAlivePeriod(defaultKeepAlivePeriod) - return tc, nil -} diff --git a/deps/k8s.io/apiserver/pkg/server/storage/BUILD b/deps/k8s.io/apiserver/pkg/server/storage/BUILD deleted file mode 100644 index 6bedc3672..000000000 --- a/deps/k8s.io/apiserver/pkg/server/storage/BUILD +++ /dev/null @@ -1,66 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "resource_config_test.go", - "storage_factory_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/server/storage", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/install:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "resource_config.go", - "resource_encoding_config.go", - "storage_codec.go", - "storage_factory.go", - ], - importpath = "k8s.io/apiserver/pkg/server/storage", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/recognizer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/server/storage/resource_config.go b/deps/k8s.io/apiserver/pkg/server/storage/resource_config.go index 0a4470605..d16be4279 100644 --- a/deps/k8s.io/apiserver/pkg/server/storage/resource_config.go +++ b/deps/k8s.io/apiserver/pkg/server/storage/resource_config.go @@ -36,6 +36,18 @@ func NewResourceConfig() *ResourceConfig { return &ResourceConfig{GroupVersionConfigs: map[schema.GroupVersion]bool{}} } +func (o *ResourceConfig) DisableAll() { + for k := range o.GroupVersionConfigs { + o.GroupVersionConfigs[k] = false + } +} + +func (o *ResourceConfig) EnableAll() { + for k := range o.GroupVersionConfigs { + o.GroupVersionConfigs[k] = true + } +} + // DisableVersions disables the versions entirely. func (o *ResourceConfig) DisableVersions(versions ...schema.GroupVersion) { for _, version := range versions { diff --git a/deps/k8s.io/apiserver/pkg/server/storage/resource_encoding_config.go b/deps/k8s.io/apiserver/pkg/server/storage/resource_encoding_config.go index 78cb865b7..eff1fe8a4 100644 --- a/deps/k8s.io/apiserver/pkg/server/storage/resource_encoding_config.go +++ b/deps/k8s.io/apiserver/pkg/server/storage/resource_encoding_config.go @@ -17,7 +17,8 @@ limitations under the License. package storage import ( - "k8s.io/apimachinery/pkg/apimachinery/registered" + "fmt" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -33,8 +34,8 @@ type ResourceEncodingConfig interface { } type DefaultResourceEncodingConfig struct { - groups map[string]*GroupResourceEncodingConfig - registry *registered.APIRegistrationManager + groups map[string]*GroupResourceEncodingConfig + scheme *runtime.Scheme } type GroupResourceEncodingConfig struct { @@ -47,8 +48,8 @@ type GroupResourceEncodingConfig struct { var _ ResourceEncodingConfig = &DefaultResourceEncodingConfig{} -func NewDefaultResourceEncodingConfig(registry *registered.APIRegistrationManager) *DefaultResourceEncodingConfig { - return &DefaultResourceEncodingConfig{groups: map[string]*GroupResourceEncodingConfig{}, registry: registry} +func NewDefaultResourceEncodingConfig(scheme *runtime.Scheme) *DefaultResourceEncodingConfig { + return &DefaultResourceEncodingConfig{groups: map[string]*GroupResourceEncodingConfig{}, scheme: scheme} } func newGroupResourceEncodingConfig(defaultEncoding, defaultInternalVersion schema.GroupVersion) *GroupResourceEncodingConfig { @@ -80,16 +81,15 @@ func (o *DefaultResourceEncodingConfig) SetResourceEncoding(resourceBeingStored } func (o *DefaultResourceEncodingConfig) StorageEncodingFor(resource schema.GroupResource) (schema.GroupVersion, error) { - groupMeta, err := o.registry.Group(resource.Group) - if err != nil { - return schema.GroupVersion{}, err + if !o.scheme.IsGroupRegistered(resource.Group) { + return schema.GroupVersion{}, fmt.Errorf("group %q is not registered in scheme", resource.Group) } groupEncoding, groupExists := o.groups[resource.Group] if !groupExists { // return the most preferred external version for the group - return groupMeta.GroupVersion, nil + return o.scheme.PrioritizedVersionsForGroup(resource.Group)[0], nil } resourceOverride, resourceExists := groupEncoding.ExternalResourceEncodings[resource.Resource] @@ -101,8 +101,8 @@ func (o *DefaultResourceEncodingConfig) StorageEncodingFor(resource schema.Group } func (o *DefaultResourceEncodingConfig) InMemoryEncodingFor(resource schema.GroupResource) (schema.GroupVersion, error) { - if _, err := o.registry.Group(resource.Group); err != nil { - return schema.GroupVersion{}, err + if !o.scheme.IsGroupRegistered(resource.Group) { + return schema.GroupVersion{}, fmt.Errorf("group %q is not registered in scheme", resource.Group) } groupEncoding, groupExists := o.groups[resource.Group] diff --git a/deps/k8s.io/apiserver/pkg/server/storage/storage_factory.go b/deps/k8s.io/apiserver/pkg/server/storage/storage_factory.go index 89f617f7d..50c068254 100644 --- a/deps/k8s.io/apiserver/pkg/server/storage/storage_factory.go +++ b/deps/k8s.io/apiserver/pkg/server/storage/storage_factory.go @@ -321,8 +321,10 @@ func (s *DefaultStorageFactory) Backends() []Backend { backends := []Backend{} for server := range servers { backends = append(backends, Backend{ - Server: server, - TLSConfig: tlsConfig, + Server: server, + // We can't share TLSConfig across different backends to avoid races. + // For more details see: http://pr.k8s.io/59338 + TLSConfig: tlsConfig.Clone(), }) } return backends diff --git a/deps/k8s.io/apiserver/pkg/storage/BUILD b/deps/k8s.io/apiserver/pkg/storage/BUILD deleted file mode 100644 index e940b264f..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/BUILD +++ /dev/null @@ -1,97 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "cacher_whitebox_test.go", - "selection_predicate_test.go", - "time_budget_test.go", - "util_test.go", - "watch_cache_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "cacher.go", - "doc.go", - "errors.go", - "interfaces.go", - "selection_predicate.go", - "time_budget.go", - "util.go", - "watch_cache.go", - ], - importpath = "k8s.io/apiserver/pkg/storage", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/validation/path:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/features:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/trace:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/errors:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/etcd:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/etcd3:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/names:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/testing:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/tests:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/cacher.go b/deps/k8s.io/apiserver/pkg/storage/cacher/cacher.go similarity index 90% rename from deps/k8s.io/apiserver/pkg/storage/cacher.go rename to deps/k8s.io/apiserver/pkg/storage/cacher/cacher.go index b452b46df..f73634cd9 100644 --- a/deps/k8s.io/apiserver/pkg/storage/cacher.go +++ b/deps/k8s.io/apiserver/pkg/storage/cacher/cacher.go @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -package storage +package cacher import ( + "context" "fmt" "net/http" "reflect" @@ -24,7 +25,6 @@ import ( "time" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -37,21 +37,22 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" "k8s.io/apiserver/pkg/features" + "k8s.io/apiserver/pkg/storage" utilfeature "k8s.io/apiserver/pkg/util/feature" utiltrace "k8s.io/apiserver/pkg/util/trace" "k8s.io/client-go/tools/cache" ) -// CacherConfig contains the configuration for a given Cache. -type CacherConfig struct { +// Config contains the configuration for a given Cache. +type Config struct { // Maximum size of the history cached in memory. CacheCapacity int // An underlying storage.Interface. - Storage Interface + Storage storage.Interface // An underlying storage.Versioner. - Versioner Versioner + Versioner storage.Versioner // The Cache will be caching objects of a given Type and assumes that they // are all stored under ResourcePrefix directory in the underlying database. @@ -66,7 +67,7 @@ type CacherConfig struct { // TriggerPublisherFunc is used for optimizing amount of watchers that // needs to process an incoming event. - TriggerPublisherFunc TriggerPublisherFunc + TriggerPublisherFunc storage.TriggerPublisherFunc // NewList is a function that creates new empty object storing a list of // objects of type Type. @@ -130,7 +131,7 @@ func (i *indexedWatchers) terminateAll(objectType reflect.Type) { } } -type watchFilterFunc func(key string, l labels.Set, f fields.Set, uninitialized bool) bool +type filterWithAttrsFunc func(key string, l labels.Set, f fields.Set, uninitialized bool) bool // Cacher is responsible for serving WATCH and LIST requests for a given // resource from its internal cache and updating its cache in the background @@ -141,7 +142,7 @@ type Cacher struct { // HighWaterMarks for performance debugging. // Important: Since HighWaterMark is using sync/atomic, it has to be at the top of the struct due to a bug on 32-bit platforms // See: https://golang.org/pkg/sync/atomic/ for more information - incomingHWM HighWaterMark + incomingHWM storage.HighWaterMark // Incoming events that should be dispatched to watchers. incoming chan watchCacheEvent @@ -156,7 +157,7 @@ type Cacher struct { ready *ready // Underlying storage.Interface. - storage Interface + storage storage.Interface // Expected type of objects in the underlying cache. objectType reflect.Type @@ -166,11 +167,11 @@ type Cacher struct { reflector *cache.Reflector // Versioner is used to handle resource versions. - versioner Versioner + versioner storage.Versioner // triggerFunc is used for optimizing amount of watchers that needs to process // an incoming event. - triggerFunc TriggerPublisherFunc + triggerFunc storage.TriggerPublisherFunc // watchers is mapping from the value of trigger function that a // watcher is interested into the watchers watcherIdx int @@ -187,11 +188,11 @@ type Cacher struct { stopWg sync.WaitGroup } -// Create a new Cacher responsible for servicing WATCH and LIST requests from +// NewCacherFromConfig creates a new Cacher responsible for servicing WATCH and LIST requests from // its internal cache and updating its cache in the background based on the // given configuration. -func NewCacherFromConfig(config CacherConfig) *Cacher { - watchCache := newWatchCache(config.CacheCapacity, config.KeyFunc, config.GetAttrsFunc) +func NewCacherFromConfig(config Config) *Cacher { + watchCache := newWatchCache(config.CacheCapacity, config.KeyFunc, config.GetAttrsFunc, config.Versioner) listerWatcher := newCacherListerWatcher(config.Storage, config.ResourcePrefix, config.NewListFunc) reflectorName := "storage/cacher.go:" + config.ResourcePrefix @@ -272,24 +273,24 @@ func (c *Cacher) startCaching(stopChannel <-chan struct{}) { } } -// Implements storage.Interface. -func (c *Cacher) Versioner() Versioner { +// Versioner implements storage.Interface. +func (c *Cacher) Versioner() storage.Versioner { return c.storage.Versioner() } -// Implements storage.Interface. +// Create implements storage.Interface. func (c *Cacher) Create(ctx context.Context, key string, obj, out runtime.Object, ttl uint64) error { return c.storage.Create(ctx, key, obj, out, ttl) } -// Implements storage.Interface. -func (c *Cacher) Delete(ctx context.Context, key string, out runtime.Object, preconditions *Preconditions) error { +// Delete implements storage.Interface. +func (c *Cacher) Delete(ctx context.Context, key string, out runtime.Object, preconditions *storage.Preconditions) error { return c.storage.Delete(ctx, key, out, preconditions) } -// Implements storage.Interface. -func (c *Cacher) Watch(ctx context.Context, key string, resourceVersion string, pred SelectionPredicate) (watch.Interface, error) { - watchRV, err := c.versioner.ParseWatchResourceVersion(resourceVersion) +// Watch implements storage.Interface. +func (c *Cacher) Watch(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate) (watch.Interface, error) { + watchRV, err := c.versioner.ParseResourceVersion(resourceVersion) if err != nil { return nil, err } @@ -337,19 +338,19 @@ func (c *Cacher) Watch(ctx context.Context, key string, resourceVersion string, c.Lock() defer c.Unlock() forget := forgetWatcher(c, c.watcherIdx, triggerValue, triggerSupported) - watcher := newCacheWatcher(watchRV, chanSize, initEvents, watchFilterFunction(key, pred), forget, c.versioner) + watcher := newCacheWatcher(watchRV, chanSize, initEvents, filterWithAttrsFunction(key, pred), forget, c.versioner) c.watchers.addWatcher(watcher, c.watcherIdx, triggerValue, triggerSupported) c.watcherIdx++ return watcher, nil } -// Implements storage.Interface. -func (c *Cacher) WatchList(ctx context.Context, key string, resourceVersion string, pred SelectionPredicate) (watch.Interface, error) { +// WatchList implements storage.Interface. +func (c *Cacher) WatchList(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate) (watch.Interface, error) { return c.Watch(ctx, key, resourceVersion, pred) } -// Implements storage.Interface. +// Get implements storage.Interface. func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, objPtr runtime.Object, ignoreNotFound bool) error { if resourceVersion == "" { // If resourceVersion is not specified, serve it from underlying @@ -360,7 +361,7 @@ func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, ob // If resourceVersion is specified, serve it from cache. // It's guaranteed that the returned value is at least that // fresh as the given resourceVersion. - getRV, err := c.versioner.ParseListResourceVersion(resourceVersion) + getRV, err := c.versioner.ParseResourceVersion(resourceVersion) if err != nil { return err } @@ -394,14 +395,14 @@ func (c *Cacher) Get(ctx context.Context, key string, resourceVersion string, ob } else { objVal.Set(reflect.Zero(objVal.Type())) if !ignoreNotFound { - return NewKeyNotFoundError(key, int64(readResourceVersion)) + return storage.NewKeyNotFoundError(key, int64(readResourceVersion)) } } return nil } -// Implements storage.Interface. -func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion string, pred SelectionPredicate, listObj runtime.Object) error { +// GetToList implements storage.Interface. +func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate, listObj runtime.Object) error { pagingEnabled := utilfeature.DefaultFeatureGate.Enabled(features.APIListChunking) if resourceVersion == "" || (pagingEnabled && (len(pred.Continue) > 0 || pred.Limit > 0)) { // If resourceVersion is not specified, serve it from underlying @@ -413,7 +414,7 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri // If resourceVersion is specified, serve it from cache. // It's guaranteed that the returned value is at least that // fresh as the given resourceVersion. - listRV, err := c.versioner.ParseListResourceVersion(resourceVersion) + listRV, err := c.versioner.ParseResourceVersion(resourceVersion) if err != nil { return err } @@ -439,7 +440,7 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri if err != nil || listVal.Kind() != reflect.Slice { return fmt.Errorf("need a pointer to slice, got %v", listVal.Kind()) } - filter := filterFunction(key, pred) + filter := filterWithAttrsFunction(key, pred) obj, exists, readResourceVersion, err := c.watchCache.WaitUntilFreshAndGet(listRV, key, trace) if err != nil { @@ -452,7 +453,7 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri if !ok { return fmt.Errorf("non *storeElement returned from storage: %v", obj) } - if filter(elem.Key, elem.Object) { + if filter(elem.Key, elem.Labels, elem.Fields, elem.Uninitialized) { listVal.Set(reflect.Append(listVal, reflect.ValueOf(elem.Object).Elem())) } } @@ -464,8 +465,8 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri return nil } -// Implements storage.Interface. -func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, pred SelectionPredicate, listObj runtime.Object) error { +// List implements storage.Interface. +func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, pred storage.SelectionPredicate, listObj runtime.Object) error { pagingEnabled := utilfeature.DefaultFeatureGate.Enabled(features.APIListChunking) hasContinuation := pagingEnabled && len(pred.Continue) > 0 hasLimit := pagingEnabled && pred.Limit > 0 && resourceVersion != "0" @@ -482,7 +483,7 @@ func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, p // If resourceVersion is specified, serve it from cache. // It's guaranteed that the returned value is at least that // fresh as the given resourceVersion. - listRV, err := c.versioner.ParseListResourceVersion(resourceVersion) + listRV, err := c.versioner.ParseResourceVersion(resourceVersion) if err != nil { return err } @@ -508,7 +509,7 @@ func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, p if err != nil || listVal.Kind() != reflect.Slice { return fmt.Errorf("need a pointer to slice, got %v", listVal.Kind()) } - filter := filterFunction(key, pred) + filter := filterWithAttrsFunction(key, pred) objs, readResourceVersion, err := c.watchCache.WaitUntilFreshAndList(listRV, trace) if err != nil { @@ -526,7 +527,7 @@ func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, p if !ok { return fmt.Errorf("non *storeElement returned from storage: %v", obj) } - if filter(elem.Key, elem.Object) { + if filter(elem.Key, elem.Labels, elem.Fields, elem.Uninitialized) { listVal.Set(reflect.Append(listVal, reflect.ValueOf(elem.Object).Elem())) } } @@ -539,10 +540,10 @@ func (c *Cacher) List(ctx context.Context, key string, resourceVersion string, p return nil } -// Implements storage.Interface. +// GuaranteedUpdate implements storage.Interface. func (c *Cacher) GuaranteedUpdate( ctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool, - preconditions *Preconditions, tryUpdate UpdateFunc, _ ...runtime.Object) error { + preconditions *storage.Preconditions, tryUpdate storage.UpdateFunc, _ ...runtime.Object) error { // Ignore the suggestion and try to pass down the current version of the object // read from cache. if elem, exists, err := c.watchCache.GetByKey(key); err != nil { @@ -555,6 +556,11 @@ func (c *Cacher) GuaranteedUpdate( return c.storage.GuaranteedUpdate(ctx, key, ptrToType, ignoreNotFound, preconditions, tryUpdate) } +// Count implements storage.Interface. +func (c *Cacher) Count(pathPrefix string) (int64, error) { + return c.storage.Count(pathPrefix) +} + func (c *Cacher) triggerValues(event *watchCacheEvent) ([]string, bool) { // TODO: Currently we assume that in a given Cacher object, its // is aware of exactly the same trigger (at most one). Thus calling: @@ -647,6 +653,7 @@ func (c *Cacher) isStopped() bool { return c.stopped } +// Stop implements the graceful termination. func (c *Cacher) Stop() { // avoid stopping twice (note: cachers are shared with subresources) if c.isStopped() { @@ -680,22 +687,7 @@ func forgetWatcher(c *Cacher, index int, triggerValue string, triggerSupported b } } -func filterFunction(key string, p SelectionPredicate) func(string, runtime.Object) bool { - filterFunc := func(objKey string, obj runtime.Object) bool { - if !hasPathPrefix(objKey, key) { - return false - } - matches, err := p.Matches(obj) - if err != nil { - glog.Errorf("invalid object for matching. Obj: %v. Err: %v", obj, err) - return false - } - return matches - } - return filterFunc -} - -func watchFilterFunction(key string, p SelectionPredicate) watchFilterFunc { +func filterWithAttrsFunction(key string, p storage.SelectionPredicate) filterWithAttrsFunc { filterFunc := func(objKey string, label labels.Set, field fields.Set, uninitialized bool) bool { if !hasPathPrefix(objKey, key) { return false @@ -705,22 +697,22 @@ func watchFilterFunction(key string, p SelectionPredicate) watchFilterFunc { return filterFunc } -// Returns resource version to which the underlying cache is synced. +// LastSyncResourceVersion returns resource version to which the underlying cache is synced. func (c *Cacher) LastSyncResourceVersion() (uint64, error) { c.ready.wait() resourceVersion := c.reflector.LastSyncResourceVersion() - return c.versioner.ParseListResourceVersion(resourceVersion) + return c.versioner.ParseResourceVersion(resourceVersion) } // cacherListerWatcher opaques storage.Interface to expose cache.ListerWatcher. type cacherListerWatcher struct { - storage Interface + storage storage.Interface resourcePrefix string newListFunc func() runtime.Object } -func newCacherListerWatcher(storage Interface, resourcePrefix string, newListFunc func() runtime.Object) cache.ListerWatcher { +func newCacherListerWatcher(storage storage.Interface, resourcePrefix string, newListFunc func() runtime.Object) cache.ListerWatcher { return &cacherListerWatcher{ storage: storage, resourcePrefix: resourcePrefix, @@ -731,7 +723,7 @@ func newCacherListerWatcher(storage Interface, resourcePrefix string, newListFun // Implements cache.ListerWatcher interface. func (lw *cacherListerWatcher) List(options metav1.ListOptions) (runtime.Object, error) { list := lw.newListFunc() - if err := lw.storage.List(context.TODO(), lw.resourcePrefix, "", Everything, list); err != nil { + if err := lw.storage.List(context.TODO(), lw.resourcePrefix, "", storage.Everything, list); err != nil { return nil, err } return list, nil @@ -739,7 +731,7 @@ func (lw *cacherListerWatcher) List(options metav1.ListOptions) (runtime.Object, // Implements cache.ListerWatcher interface. func (lw *cacherListerWatcher) Watch(options metav1.ListOptions) (watch.Interface, error) { - return lw.storage.WatchList(context.TODO(), lw.resourcePrefix, options.ResourceVersion, Everything) + return lw.storage.WatchList(context.TODO(), lw.resourcePrefix, options.ResourceVersion, storage.Everything) } // errWatcher implements watch.Interface to return a single error @@ -782,19 +774,19 @@ func (c *errWatcher) Stop() { // no-op } -// cachWatcher implements watch.Interface +// cacheWatcher implements watch.Interface type cacheWatcher struct { sync.Mutex input chan *watchCacheEvent result chan watch.Event done chan struct{} - filter watchFilterFunc + filter filterWithAttrsFunc stopped bool forget func(bool) - versioner Versioner + versioner storage.Versioner } -func newCacheWatcher(resourceVersion uint64, chanSize int, initEvents []*watchCacheEvent, filter watchFilterFunc, forget func(bool), versioner Versioner) *cacheWatcher { +func newCacheWatcher(resourceVersion uint64, chanSize int, initEvents []*watchCacheEvent, filter filterWithAttrsFunc, forget func(bool), versioner storage.Versioner) *cacheWatcher { watcher := &cacheWatcher{ input: make(chan *watchCacheEvent, chanSize), result: make(chan watch.Event, chanSize), diff --git a/deps/k8s.io/apiserver/pkg/storage/time_budget.go b/deps/k8s.io/apiserver/pkg/storage/cacher/time_budget.go similarity index 99% rename from deps/k8s.io/apiserver/pkg/storage/time_budget.go rename to deps/k8s.io/apiserver/pkg/storage/cacher/time_budget.go index e619ec660..3de6cbc84 100644 --- a/deps/k8s.io/apiserver/pkg/storage/time_budget.go +++ b/deps/k8s.io/apiserver/pkg/storage/cacher/time_budget.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package storage +package cacher import ( "sync" diff --git a/deps/k8s.io/apiserver/pkg/storage/cacher/util.go b/deps/k8s.io/apiserver/pkg/storage/cacher/util.go new file mode 100644 index 000000000..63a23800f --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/cacher/util.go @@ -0,0 +1,46 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cacher + +import ( + "strings" +) + +// hasPathPrefix returns true if the string matches pathPrefix exactly, or if is prefixed with pathPrefix at a path segment boundary +func hasPathPrefix(s, pathPrefix string) bool { + // Short circuit if s doesn't contain the prefix at all + if !strings.HasPrefix(s, pathPrefix) { + return false + } + + pathPrefixLength := len(pathPrefix) + + if len(s) == pathPrefixLength { + // Exact match + return true + } + if strings.HasSuffix(pathPrefix, "/") { + // pathPrefix already ensured a path segment boundary + return true + } + if s[pathPrefixLength:pathPrefixLength+1] == "/" { + // The next character in s is a path segment boundary + // Check this instead of normalizing pathPrefix to avoid allocating on every call + return true + } + return false +} diff --git a/deps/k8s.io/apiserver/pkg/storage/watch_cache.go b/deps/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go similarity index 87% rename from deps/k8s.io/apiserver/pkg/storage/watch_cache.go rename to deps/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go index 274617385..5afbe434e 100644 --- a/deps/k8s.io/apiserver/pkg/storage/watch_cache.go +++ b/deps/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go @@ -14,22 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -package storage +package cacher import ( "fmt" "sort" - "strconv" "sync" "time" "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/clock" "k8s.io/apimachinery/pkg/watch" + "k8s.io/apiserver/pkg/storage" utiltrace "k8s.io/apiserver/pkg/util/trace" "k8s.io/client-go/tools/cache" ) @@ -61,12 +60,16 @@ type watchCacheEvent struct { } // Computing a key of an object is generally non-trivial (it performs -// e.g. validation underneath). To avoid computing it multiple times -// (to serve the event in different List/Watch requests), in the -// underlying store we are keeping pair (key, object). +// e.g. validation underneath). Similarly computing object fields and +// labels. To avoid computing them multiple times (to serve the event +// in different List/Watch requests), in the underlying store we are +// keeping structs (key, object, labels, fields, uninitialized). type storeElement struct { - Key string - Object runtime.Object + Key string + Object runtime.Object + Labels labels.Set + Fields fields.Set + Uninitialized bool } func storeElementKey(obj interface{}) (string, error) { @@ -133,12 +136,16 @@ type watchCache struct { // for testing timeouts. clock clock.Clock + + // An underlying storage.Versioner. + versioner storage.Versioner } func newWatchCache( capacity int, keyFunc func(runtime.Object) (string, error), - getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, bool, error)) *watchCache { + getAttrsFunc func(runtime.Object) (labels.Set, fields.Set, bool, error), + versioner storage.Versioner) *watchCache { wc := &watchCache{ capacity: capacity, keyFunc: keyFunc, @@ -149,6 +156,7 @@ func newWatchCache( store: cache.NewStore(storeElementKey), resourceVersion: 0, clock: clock.RealClock{}, + versioner: versioner, } wc.cond = sync.NewCond(wc.RLocker()) return wc @@ -156,7 +164,7 @@ func newWatchCache( // Add takes runtime.Object as an argument. func (w *watchCache) Add(obj interface{}) error { - object, resourceVersion, err := objectToVersionedRuntimeObject(obj) + object, resourceVersion, err := w.objectToVersionedRuntimeObject(obj) if err != nil { return err } @@ -168,7 +176,7 @@ func (w *watchCache) Add(obj interface{}) error { // Update takes runtime.Object as an argument. func (w *watchCache) Update(obj interface{}) error { - object, resourceVersion, err := objectToVersionedRuntimeObject(obj) + object, resourceVersion, err := w.objectToVersionedRuntimeObject(obj) if err != nil { return err } @@ -180,7 +188,7 @@ func (w *watchCache) Update(obj interface{}) error { // Delete takes runtime.Object as an argument. func (w *watchCache) Delete(obj interface{}) error { - object, resourceVersion, err := objectToVersionedRuntimeObject(obj) + object, resourceVersion, err := w.objectToVersionedRuntimeObject(obj) if err != nil { return err } @@ -190,36 +198,38 @@ func (w *watchCache) Delete(obj interface{}) error { return w.processEvent(event, resourceVersion, f) } -func objectToVersionedRuntimeObject(obj interface{}) (runtime.Object, uint64, error) { +func (w *watchCache) objectToVersionedRuntimeObject(obj interface{}) (runtime.Object, uint64, error) { object, ok := obj.(runtime.Object) if !ok { return nil, 0, fmt.Errorf("obj does not implement runtime.Object interface: %v", obj) } - meta, err := meta.Accessor(object) - if err != nil { - return nil, 0, err - } - resourceVersion, err := parseResourceVersion(meta.GetResourceVersion()) + resourceVersion, err := w.versioner.ObjectResourceVersion(object) if err != nil { return nil, 0, err } return object, resourceVersion, nil } -func parseResourceVersion(resourceVersion string) (uint64, error) { - if resourceVersion == "" { - return 0, nil - } - // Use bitsize being the size of int on the machine. - return strconv.ParseUint(resourceVersion, 10, 0) -} - func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, updateFunc func(*storeElement) error) error { key, err := w.keyFunc(event.Object) if err != nil { return fmt.Errorf("couldn't compute key: %v", err) } elem := &storeElement{Key: key, Object: event.Object} + elem.Labels, elem.Fields, elem.Uninitialized, err = w.getAttrsFunc(event.Object) + if err != nil { + return err + } + + watchCacheEvent := &watchCacheEvent{ + Type: event.Type, + Object: elem.Object, + ObjLabels: elem.Labels, + ObjFields: elem.Fields, + ObjUninitialized: elem.Uninitialized, + Key: key, + ResourceVersion: resourceVersion, + } // TODO: We should consider moving this lock below after the watchCacheEvent // is created. In such situation, the only problematic scenario is Replace( @@ -231,34 +241,14 @@ func (w *watchCache) processEvent(event watch.Event, resourceVersion uint64, upd if err != nil { return err } - objLabels, objFields, objUninitialized, err := w.getAttrsFunc(event.Object) - if err != nil { - return err - } - var prevObject runtime.Object - var prevObjLabels labels.Set - var prevObjFields fields.Set - var prevObjUninitialized bool if exists { - prevObject = previous.(*storeElement).Object - prevObjLabels, prevObjFields, prevObjUninitialized, err = w.getAttrsFunc(prevObject) - if err != nil { - return err - } - } - watchCacheEvent := &watchCacheEvent{ - Type: event.Type, - Object: event.Object, - ObjLabels: objLabels, - ObjFields: objFields, - ObjUninitialized: objUninitialized, - PrevObject: prevObject, - PrevObjLabels: prevObjLabels, - PrevObjFields: prevObjFields, - PrevObjUninitialized: prevObjUninitialized, - Key: key, - ResourceVersion: resourceVersion, + previousElem := previous.(*storeElement) + watchCacheEvent.PrevObject = previousElem.Object + watchCacheEvent.PrevObjLabels = previousElem.Labels + watchCacheEvent.PrevObjFields = previousElem.Fields + watchCacheEvent.PrevObjUninitialized = previousElem.Uninitialized } + if w.onEvent != nil { w.onEvent(watchCacheEvent) } @@ -364,7 +354,7 @@ func (w *watchCache) GetByKey(key string) (interface{}, bool, error) { // Replace takes slice of runtime.Object as a parameter. func (w *watchCache) Replace(objs []interface{}, resourceVersion string) error { - version, err := parseResourceVersion(resourceVersion) + version, err := w.versioner.ParseResourceVersion(resourceVersion) if err != nil { return err } @@ -379,7 +369,17 @@ func (w *watchCache) Replace(objs []interface{}, resourceVersion string) error { if err != nil { return fmt.Errorf("couldn't compute key: %v", err) } - toReplace = append(toReplace, &storeElement{Key: key, Object: object}) + objLabels, objFields, objUninitialized, err := w.getAttrsFunc(object) + if err != nil { + return err + } + toReplace = append(toReplace, &storeElement{ + Key: key, + Object: object, + Labels: objLabels, + Fields: objFields, + Uninitialized: objUninitialized, + }) } w.Lock() diff --git a/deps/k8s.io/apiserver/pkg/storage/errors.go b/deps/k8s.io/apiserver/pkg/storage/errors.go index a4d134ac9..f73d47aed 100644 --- a/deps/k8s.io/apiserver/pkg/storage/errors.go +++ b/deps/k8s.io/apiserver/pkg/storage/errors.go @@ -166,5 +166,5 @@ func NewInternalError(reason string) InternalError { } func NewInternalErrorf(format string, a ...interface{}) InternalError { - return InternalError{fmt.Sprintf(format, a)} + return InternalError{fmt.Sprintf(format, a...)} } diff --git a/deps/k8s.io/apiserver/pkg/storage/errors/BUILD b/deps/k8s.io/apiserver/pkg/storage/errors/BUILD deleted file mode 100644 index dd07c9c37..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/errors/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "storage.go", - ], - importpath = "k8s.io/apiserver/pkg/storage/errors", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/BUILD b/deps/k8s.io/apiserver/pkg/storage/etcd/BUILD deleted file mode 100644 index 55e33f1a5..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/etcd/BUILD +++ /dev/null @@ -1,87 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "api_object_versioner_test.go", - "etcd_helper_test.go", - "etcd_watcher_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage/etcd", - deps = [ - "//vendor/github.com/coreos/etcd/client:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd/etcdtest:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd/testing:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/testing:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/tests:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "api_object_versioner.go", - "doc.go", - "etcd_helper.go", - "etcd_watcher.go", - ], - importpath = "k8s.io/apiserver/pkg/storage/etcd", - deps = [ - "//vendor/github.com/coreos/etcd/client:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/cache:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation/field:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd/metrics:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd/util:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/trace:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/etcd/etcdtest:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/etcd/metrics:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/etcd/testing:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/etcd/util:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/api_object_versioner.go b/deps/k8s.io/apiserver/pkg/storage/etcd/api_object_versioner.go index 5534f9fa2..471a3313d 100644 --- a/deps/k8s.io/apiserver/pkg/storage/etcd/api_object_versioner.go +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/api_object_versioner.go @@ -82,11 +82,11 @@ func (a APIObjectVersioner) ObjectResourceVersion(obj runtime.Object) (uint64, e return strconv.ParseUint(version, 10, 64) } -// ParseWatchResourceVersion takes a resource version argument and converts it to -// the etcd version we should pass to helper.Watch(). Because resourceVersion is +// ParseResourceVersion takes a resource version argument and converts it to +// the etcd version. For watch we should pass to helper.Watch(). Because resourceVersion is // an opaque value, the default watch behavior for non-zero watch is to watch // the next value (if you pass "1", you will see updates from "2" onwards). -func (a APIObjectVersioner) ParseWatchResourceVersion(resourceVersion string) (uint64, error) { +func (a APIObjectVersioner) ParseResourceVersion(resourceVersion string) (uint64, error) { if resourceVersion == "" || resourceVersion == "0" { return 0, nil } @@ -101,25 +101,6 @@ func (a APIObjectVersioner) ParseWatchResourceVersion(resourceVersion string) (u return version, nil } -// ParseListResourceVersion takes a resource version argument and converts it to -// the etcd version. -// TODO: reevaluate whether it is really clearer to have both this and the -// Watch version of this function, since they perform the same logic. -func (a APIObjectVersioner) ParseListResourceVersion(resourceVersion string) (uint64, error) { - if resourceVersion == "" { - return 0, nil - } - version, err := strconv.ParseUint(resourceVersion, 10, 64) - if err != nil { - return 0, storage.NewInvalidError(field.ErrorList{ - // Validation errors are supposed to return version-specific field - // paths, but this is probably close enough. - field.Invalid(field.NewPath("resourceVersion"), resourceVersion, err.Error()), - }) - } - return version, nil -} - // APIObjectVersioner implements Versioner var Versioner storage.Versioner = APIObjectVersioner{} diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go b/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go index 7b11ec4c9..c6bdd9c92 100644 --- a/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_helper.go @@ -17,6 +17,7 @@ limitations under the License. package etcd import ( + "context" "errors" "fmt" "path" @@ -25,7 +26,6 @@ import ( etcd "github.com/coreos/etcd/client" "github.com/golang/glog" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/conversion" @@ -101,10 +101,6 @@ type etcdHelper struct { cache utilcache.Cache } -func init() { - metrics.Register() -} - // Implements storage.Interface. func (h *etcdHelper) Versioner() storage.Versioner { return h.versioner @@ -157,21 +153,6 @@ func (h *etcdHelper) Create(ctx context.Context, key string, obj, out runtime.Ob return err } -func checkPreconditions(key string, preconditions *storage.Preconditions, out runtime.Object) error { - if preconditions == nil { - return nil - } - objMeta, err := meta.Accessor(out) - if err != nil { - return storage.NewInternalErrorf("can't enforce preconditions %v on un-introspectable object %v, got error: %v", *preconditions, out, err) - } - if preconditions.UID != nil && *preconditions.UID != objMeta.GetUID() { - errMsg := fmt.Sprintf("Precondition failed: UID in precondition: %v, UID in object meta: %v", preconditions.UID, objMeta.GetUID()) - return storage.NewInvalidObjError(key, errMsg) - } - return nil -} - // Implements storage.Interface. func (h *etcdHelper) Delete(ctx context.Context, key string, out runtime.Object, preconditions *storage.Preconditions) error { if ctx == nil { @@ -203,7 +184,7 @@ func (h *etcdHelper) Delete(ctx context.Context, key string, out runtime.Object, if err != nil { return toStorageErr(err, key, 0) } - if err := checkPreconditions(key, preconditions, obj); err != nil { + if err := preconditions.Check(key, obj); err != nil { return toStorageErr(err, key, 0) } index := uint64(0) @@ -235,7 +216,7 @@ func (h *etcdHelper) Watch(ctx context.Context, key string, resourceVersion stri if ctx == nil { glog.Errorf("Context is nil") } - watchRV, err := h.versioner.ParseWatchResourceVersion(resourceVersion) + watchRV, err := h.versioner.ParseResourceVersion(resourceVersion) if err != nil { return nil, err } @@ -250,7 +231,7 @@ func (h *etcdHelper) WatchList(ctx context.Context, key string, resourceVersion if ctx == nil { glog.Errorf("Context is nil") } - watchRV, err := h.versioner.ParseWatchResourceVersion(resourceVersion) + watchRV, err := h.versioner.ParseResourceVersion(resourceVersion) if err != nil { return nil, err } @@ -351,7 +332,10 @@ func (h *etcdHelper) GetToList(ctx context.Context, key string, resourceVersion metrics.RecordEtcdRequestLatency("get", getTypeName(listPtr), startTime) if err != nil { if etcdutil.IsEtcdNotFound(err) { - return nil + if etcdErr, ok := err.(etcd.Error); ok { + return h.versioner.UpdateList(listObj, etcdErr.Index, "") + } + return fmt.Errorf("unexpected error from storage: %#v", err) } return toStorageErr(err, key, 0) } @@ -494,7 +478,7 @@ func (h *etcdHelper) GuaranteedUpdate( if err != nil { return toStorageErr(err, key, 0) } - if err := checkPreconditions(key, preconditions, obj); err != nil { + if err := preconditions.Check(key, obj); err != nil { return toStorageErr(err, key, 0) } meta := storage.ResponseMeta{} @@ -586,6 +570,10 @@ func (h *etcdHelper) GuaranteedUpdate( } } +func (*etcdHelper) Count(pathPerfix string) (int64, error) { + return 0, fmt.Errorf("Count is unimplemented for etcd2!") +} + // etcdCache defines interface used for caching objects stored in etcd. Objects are keyed by // their Node.ModifiedIndex, which is unique across all types. // All implementations must be thread-safe. diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go b/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go index 7c300b430..d3a2e3c53 100644 --- a/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/etcd_watcher.go @@ -17,11 +17,11 @@ limitations under the License. package etcd import ( + "context" "fmt" "net/http" "reflect" "sync" - "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -32,7 +32,6 @@ import ( etcd "github.com/coreos/etcd/client" "github.com/golang/glog" - "golang.org/x/net/context" ) // Etcd watch event actions @@ -100,9 +99,6 @@ type etcdWatcher struct { cache etcdCache } -// watchWaitDuration is the amount of time to wait for an error from watch. -const watchWaitDuration = 100 * time.Millisecond - // newEtcdWatcher returns a new etcdWatcher; if list is true, watch sub-nodes. // The versioner must be able to handle the objects that transform creates. func newEtcdWatcher(list bool, quorum bool, include includeFunc, pred storage.SelectionPredicate, diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/doc.go b/deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/doc.go new file mode 100644 index 000000000..dde65fb9c --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/doc.go @@ -0,0 +1,17 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package etcdtest diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/etcdtest.go b/deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/etcdtest.go new file mode 100644 index 000000000..a4a9ce243 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/etcdtest/etcdtest.go @@ -0,0 +1,39 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package etcdtest + +import ( + "os" + "path" +) + +// Cache size to use for tests. +const DeserializationCacheSize = 150 + +// Returns the prefix set via the ETCD_PREFIX environment variable (if any). +func PathPrefix() string { + pref := os.Getenv("ETCD_PREFIX") + if pref == "" { + pref = "registry" + } + return path.Join("/", pref) +} + +// Adds the ETCD_PREFIX to the provided key +func AddPrefix(in string) string { + return path.Join(PathPrefix(), in) +} diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/metrics/BUILD b/deps/k8s.io/apiserver/pkg/storage/etcd/metrics/BUILD deleted file mode 100644 index f4edcf221..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/etcd/metrics/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["metrics.go"], - importpath = "k8s.io/apiserver/pkg/storage/etcd/metrics", - deps = ["//vendor/github.com/prometheus/client_golang/prometheus:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/metrics/metrics.go b/deps/k8s.io/apiserver/pkg/storage/etcd/metrics/metrics.go index 12c11eaf9..96385f6e6 100644 --- a/deps/k8s.io/apiserver/pkg/storage/etcd/metrics/metrics.go +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/metrics/metrics.go @@ -59,6 +59,13 @@ var ( }, []string{"operation", "type"}, ) + objectCounts = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "etcd_object_counts", + Help: "Number of stored objects at the time of last check split by kind.", + }, + []string{"resource"}, + ) ) var registerMetrics sync.Once @@ -73,9 +80,14 @@ func Register() { prometheus.MustRegister(cacheAddLatency) prometheus.MustRegister(cacheGetLatency) prometheus.MustRegister(etcdRequestLatenciesSummary) + prometheus.MustRegister(objectCounts) }) } +func UpdateObjectCount(resourcePrefix string, count int64) { + objectCounts.WithLabelValues(resourcePrefix).Set(float64(count)) +} + func RecordEtcdRequestLatency(verb, resource string, startTime time.Time) { etcdRequestLatenciesSummary.WithLabelValues(verb, resource).Observe(float64(time.Since(startTime) / time.Microsecond)) } diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/testing/testingcert/certificates.go b/deps/k8s.io/apiserver/pkg/storage/etcd/testing/testingcert/certificates.go new file mode 100644 index 000000000..3eecfda60 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/testing/testingcert/certificates.go @@ -0,0 +1,113 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testingcert + +// You can use cfssl tool to generate certificates, please refer +// https://github.com/coreos/etcd/tree/master/hack/tls-setup for more details. +// +// ca-config.json: +// expiry was changed from 1 year to 100 years (876000h) +// ca-csr.json: +// ca expiry was set to 100 years (876000h) ("ca":{"expiry":"876000h"}) +// key was changed from ecdsa,384 to rsa,2048 +// req-csr.json: +// key was changed from ecdsa,384 to rsa,2048 +// hosts were changed to "localhost","127.0.0.1" +const CAFileContent = ` +-----BEGIN CERTIFICATE----- +MII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fKfNuio2TB1lAErC1oX7bgTX +ieP10uz3FYWQNrlDn0I4KSA888rFPtx8GwoxH/52fGlE80BUV9PNeOVP+mYza0ih +oFj2+PhXVL/JZbx9P/2RLSNbEnq+OPk8AN82SkNtpFzanwtpb3f+kt73878KNoQu +xYZaCF1sK45Kn7mjKSDu/b3xUbTrNwnyVAGOdLzI7CCWOu+ECoZYAH4ZNHHakbyY +eWQ7U9leocEOPlqxsQAKodaCYjuAaOFIcz8/W81q+3qNw/6GbZ4znjRKQ3OtIPZ4 +JH1iNofCudWDp+0CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYw +FAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFMJE +43qLCWhyZAE/wxNneSJw7aUVMB8GA1UdIwQYMBaAFBhzTFdDpU2MW8g6pZ9eivHH +2spHMBoGA1UdEQQTMBGCCWxvY2FsaG9zdIcEfwAAATANBgkqhkiG9w0BAQsFAAOC +AQEAuELC8tbmpyKlA4HLSDHOUquypNyiE6ftBIifJtp8bvBd+jiv4Pr8oVGxHoqq +48X7lamvDirLV5gmK0CxO+EXkIUHhULzPyYPynqsR7KZlk1PWghqsF65nwqcjS3b +tykLttD1AUDIozYvujVYBKXGxb6jcGM1rBF1XtslciFZ5qQnj6dTUujo9/xBA2ql +kOKiVXBNU8KFzq4c20RzHFLfWkbc30Q4XG4dTDVBeGupnFQRkZ0y2dSSU82QcLA/ +HgAyQSO7+csN13r84zbmDuRpUgo6eTXzJ+77G19KDkEL7XEtlw2jB2L6/o+3RGtw +JLOpEsgi7hsvOYCuTA3Krw52Mw== +-----END CERTIFICATE----- +` +const KeyFileContent = ` +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA6JbkDrmFYZufBx6hkczT457FThw8X8Wk/7sE4rmLvKZJYCp8 +p826KjZMHWUASsLWhftuBNeJ4/XS7PcVhZA2uUOfQjgpIDzzysU+3HwbCj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AjGDq1LvXQVXTCp7cPzULjDxogDI2Tvr0MrFFksEtvYKQ6Pr2CeglybWrS8 +XOazIpK8mXdaKY8jwbKfrw0CgYAFnfrb3OaZzxAnFhXSiqH3vn2RPpl9JWUYRcvh +ozRvQKLhwCvuohP+KV3XlsO6m5dM3lk+r85F6NIXJWNINyvGp6u1ThovygJ+I502 +GY8c2kAwJndyx74MaJCBDVMbMwlZpzFWkBz7dj8ZnXRGVNTZNh0Ef2XAjwUdtJP3 +9hS7dwKBgQDCzq0RIxFyy3F5baGHWLVICxmhNExQ2+Vebh+DvsPKtnz6OrWdRbGX +wgGVLrn53s6eCblnXLtKr/Li+t7fS8IkQkvu5guOvI9VeVUmZhFET3GVmUxu+JTb +iQY4uBgaf8Fgay4dkOfjvlOpFDR4E7UbJpg8/cFKTrpwgOiUVyFVdQ== +-----END RSA PRIVATE KEY----- +` diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go b/deps/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go new file mode 100644 index 000000000..deafcfce9 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/etcd/testing/utils.go @@ -0,0 +1,303 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testing + +import ( + "fmt" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + "os" + "path" + "testing" + "time" + + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/storage/etcd/etcdtest" + "k8s.io/apiserver/pkg/storage/etcd/testing/testingcert" + "k8s.io/apiserver/pkg/storage/storagebackend" + + "context" + + etcd "github.com/coreos/etcd/client" + "github.com/coreos/etcd/clientv3" + "github.com/coreos/etcd/etcdserver" + "github.com/coreos/etcd/etcdserver/api/etcdhttp" + "github.com/coreos/etcd/etcdserver/api/v2http" + "github.com/coreos/etcd/integration" + "github.com/coreos/etcd/pkg/testutil" + "github.com/coreos/etcd/pkg/transport" + "github.com/coreos/etcd/pkg/types" + "github.com/golang/glog" +) + +// EtcdTestServer encapsulates the datastructures needed to start local instance for testing +type EtcdTestServer struct { + // The following are lumped etcd2 test server params + // TODO: Deprecate in a post 1.5 release + etcdserver.ServerConfig + PeerListeners, ClientListeners []net.Listener + Client etcd.Client + + CertificatesDir string + CertFile string + KeyFile string + CAFile string + + raftHandler http.Handler + s *etcdserver.EtcdServer + hss []*httptest.Server + + // The following are lumped etcd3 test server params + v3Cluster *integration.ClusterV3 + V3Client *clientv3.Client +} + +// newLocalListener opens a port localhost using any port +func newLocalListener(t *testing.T) net.Listener { + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + return l +} + +// newSecuredLocalListener opens a port localhost using any port +// with SSL enable +func newSecuredLocalListener(t *testing.T, certFile, keyFile, caFile string) net.Listener { + var l net.Listener + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + tlsInfo := transport.TLSInfo{ + CertFile: certFile, + KeyFile: keyFile, + CAFile: caFile, + } + tlscfg, err := tlsInfo.ServerConfig() + if err != nil { + t.Fatalf("unexpected serverConfig error: %v", err) + } + l, err = transport.NewKeepAliveListener(l, "https", tlscfg) + if err != nil { + t.Fatal(err) + } + return l +} + +func newHttpTransport(t *testing.T, certFile, keyFile, caFile string) etcd.CancelableTransport { + tlsInfo := transport.TLSInfo{ + CertFile: certFile, + KeyFile: keyFile, + CAFile: caFile, + } + tr, err := transport.NewTransport(tlsInfo, time.Second) + if err != nil { + t.Fatal(err) + } + return tr +} + +// configureTestCluster will set the params to start an etcd server +func configureTestCluster(t *testing.T, name string, https bool) *EtcdTestServer { + var err error + m := &EtcdTestServer{} + + pln := newLocalListener(t) + m.PeerListeners = []net.Listener{pln} + m.PeerURLs, err = types.NewURLs([]string{"http://" + pln.Addr().String()}) + if err != nil { + t.Fatal(err) + } + + // Allow test launches to control where etcd data goes, for space or performance reasons + baseDir := os.Getenv("TEST_ETCD_DIR") + if len(baseDir) == 0 { + baseDir = os.TempDir() + } + + if https { + m.CertificatesDir, err = ioutil.TempDir(baseDir, "etcd_certificates") + if err != nil { + t.Fatal(err) + } + m.CertFile = path.Join(m.CertificatesDir, "etcdcert.pem") + if err = ioutil.WriteFile(m.CertFile, []byte(testingcert.CertFileContent), 0644); err != nil { + t.Fatal(err) + } + m.KeyFile = path.Join(m.CertificatesDir, "etcdkey.pem") + if err = ioutil.WriteFile(m.KeyFile, []byte(testingcert.KeyFileContent), 0644); err != nil { + t.Fatal(err) + } + m.CAFile = path.Join(m.CertificatesDir, "ca.pem") + if err = ioutil.WriteFile(m.CAFile, []byte(testingcert.CAFileContent), 0644); err != nil { + t.Fatal(err) + } + + cln := newSecuredLocalListener(t, m.CertFile, m.KeyFile, m.CAFile) + m.ClientListeners = []net.Listener{cln} + m.ClientURLs, err = types.NewURLs([]string{"https://" + cln.Addr().String()}) + if err != nil { + t.Fatal(err) + } + } else { + cln := newLocalListener(t) + m.ClientListeners = []net.Listener{cln} + m.ClientURLs, err = types.NewURLs([]string{"http://" + cln.Addr().String()}) + if err != nil { + t.Fatal(err) + } + } + + m.AuthToken = "simple" + m.Name = name + m.DataDir, err = ioutil.TempDir(baseDir, "etcd") + if err != nil { + t.Fatal(err) + } + + clusterStr := fmt.Sprintf("%s=http://%s", name, pln.Addr().String()) + m.InitialPeerURLsMap, err = types.NewURLsMap(clusterStr) + if err != nil { + t.Fatal(err) + } + m.InitialClusterToken = "TestEtcd" + m.NewCluster = true + m.ForceNewCluster = false + m.ElectionTicks = 10 + m.TickMs = uint(10) + + return m +} + +// launch will attempt to start the etcd server +func (m *EtcdTestServer) launch(t *testing.T) error { + var err error + if m.s, err = etcdserver.NewServer(&m.ServerConfig); err != nil { + return fmt.Errorf("failed to initialize the etcd server: %v", err) + } + m.s.SyncTicker = time.NewTicker(500 * time.Millisecond) + m.s.Start() + m.raftHandler = &testutil.PauseableHandler{Next: etcdhttp.NewPeerHandler(m.s)} + for _, ln := range m.PeerListeners { + hs := &httptest.Server{ + Listener: ln, + Config: &http.Server{Handler: m.raftHandler}, + } + hs.Start() + m.hss = append(m.hss, hs) + } + for _, ln := range m.ClientListeners { + hs := &httptest.Server{ + Listener: ln, + Config: &http.Server{Handler: v2http.NewClientHandler(m.s, m.ServerConfig.ReqTimeout())}, + } + hs.Start() + m.hss = append(m.hss, hs) + } + return nil +} + +// waitForEtcd wait until etcd is propagated correctly +func (m *EtcdTestServer) waitUntilUp() error { + membersAPI := etcd.NewMembersAPI(m.Client) + for start := time.Now(); time.Since(start) < wait.ForeverTestTimeout; time.Sleep(10 * time.Millisecond) { + members, err := membersAPI.List(context.TODO()) + if err != nil { + glog.Errorf("Error when getting etcd cluster members") + continue + } + if len(members) == 1 && len(members[0].ClientURLs) > 0 { + return nil + } + } + return fmt.Errorf("timeout on waiting for etcd cluster") +} + +// Terminate will shutdown the running etcd server +func (m *EtcdTestServer) Terminate(t *testing.T) { + if m.v3Cluster != nil { + m.v3Cluster.Terminate(t) + } else { + m.Client = nil + m.s.Stop() + // TODO: This is a pretty ugly hack to workaround races during closing + // in-memory etcd server in unit tests - see #18928 for more details. + // We should get rid of it as soon as we have a proper fix - etcd clients + // have overwritten transport counting opened connections (probably by + // overwriting Dial function) and termination function waiting for all + // connections to be closed and stopping accepting new ones. + time.Sleep(250 * time.Millisecond) + for _, hs := range m.hss { + hs.CloseClientConnections() + hs.Close() + } + if err := os.RemoveAll(m.ServerConfig.DataDir); err != nil { + t.Fatal(err) + } + if len(m.CertificatesDir) > 0 { + if err := os.RemoveAll(m.CertificatesDir); err != nil { + t.Fatal(err) + } + } + } +} + +// NewEtcdTestClientServer DEPRECATED creates a new client and server for testing +func NewEtcdTestClientServer(t *testing.T) *EtcdTestServer { + server := configureTestCluster(t, "foo", true) + err := server.launch(t) + if err != nil { + t.Fatalf("Failed to start etcd server error=%v", err) + return nil + } + + cfg := etcd.Config{ + Endpoints: server.ClientURLs.StringSlice(), + Transport: newHttpTransport(t, server.CertFile, server.KeyFile, server.CAFile), + } + server.Client, err = etcd.New(cfg) + if err != nil { + server.Terminate(t) + t.Fatalf("Unexpected error in NewEtcdTestClientServer (%v)", err) + return nil + } + if err := server.waitUntilUp(); err != nil { + server.Terminate(t) + t.Fatalf("Unexpected error in waitUntilUp (%v)", err) + return nil + } + return server +} + +// NewEtcd3TestClientServer creates a new client and server for testing +func NewUnsecuredEtcd3TestClientServer(t *testing.T) (*EtcdTestServer, *storagebackend.Config) { + server := &EtcdTestServer{ + v3Cluster: integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1}), + } + server.V3Client = server.v3Cluster.RandClient() + config := &storagebackend.Config{ + Type: "etcd3", + Prefix: etcdtest.PathPrefix(), + ServerList: server.V3Client.Endpoints(), + DeserializationCacheSize: etcdtest.DeserializationCacheSize, + Paging: true, + } + return server, config +} diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd/util/BUILD b/deps/k8s.io/apiserver/pkg/storage/etcd/util/BUILD deleted file mode 100644 index 537638e61..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/etcd/util/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["etcd_util_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage/etcd/util", - deps = [ - "//vendor/github.com/coreos/etcd/client:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "etcd_util.go", - ], - importpath = "k8s.io/apiserver/pkg/storage/etcd/util", - deps = ["//vendor/github.com/coreos/etcd/client:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd3/BUILD b/deps/k8s.io/apiserver/pkg/storage/etcd3/BUILD deleted file mode 100644 index 27b429e70..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/etcd3/BUILD +++ /dev/null @@ -1,86 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "compact_test.go", - "store_test.go", - "watcher_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage/etcd3", - deps = [ - "//vendor/github.com/coreos/etcd/clientv3:go_default_library", - "//vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes:go_default_library", - "//vendor/github.com/coreos/etcd/integration:go_default_library", - "//vendor/github.com/coreos/pkg/capnslog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/tests:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "compact.go", - "errors.go", - "event.go", - "store.go", - "watcher.go", - ], - importpath = "k8s.io/apiserver/pkg/storage/etcd3", - deps = [ - "//vendor/github.com/coreos/etcd/clientv3:go_default_library", - "//vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes:go_default_library", - "//vendor/github.com/coreos/etcd/mvcc/mvccpb:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/trace:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/etcd3/preflight:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd3/compact.go b/deps/k8s.io/apiserver/pkg/storage/etcd3/compact.go index 2bceacc8e..bdcd5bcb6 100644 --- a/deps/k8s.io/apiserver/pkg/storage/etcd3/compact.go +++ b/deps/k8s.io/apiserver/pkg/storage/etcd3/compact.go @@ -17,13 +17,13 @@ limitations under the License. package etcd3 import ( + "context" "strconv" "sync" "time" "github.com/coreos/etcd/clientv3" "github.com/golang/glog" - "golang.org/x/net/context" ) const ( diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd3/lease_manager.go b/deps/k8s.io/apiserver/pkg/storage/etcd3/lease_manager.go new file mode 100644 index 000000000..dc06ac520 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/etcd3/lease_manager.go @@ -0,0 +1,102 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package etcd3 + +import ( + "context" + "sync" + "time" + + "github.com/coreos/etcd/clientv3" +) + +// leaseManager is used to manage leases requested from etcd. If a new write +// needs a lease that has similar expiration time to the previous one, the old +// lease will be reused to reduce the overhead of etcd, since lease operations +// are expensive. In the implementation, we only store one previous lease, +// since all the events have the same ttl. +type leaseManager struct { + client *clientv3.Client // etcd client used to grant leases + leaseMu sync.Mutex + prevLeaseID clientv3.LeaseID + prevLeaseExpirationTime time.Time + // The period of time in seconds and percent of TTL that each lease is + // reused. The minimum of them is used to avoid unreasonably large + // numbers. We use var instead of const for testing purposes. + leaseReuseDurationSeconds int64 + leaseReuseDurationPercent float64 +} + +// newDefaultLeaseManager creates a new lease manager using default setting. +func newDefaultLeaseManager(client *clientv3.Client) *leaseManager { + return newLeaseManager(client, 60, 0.05) +} + +// newLeaseManager creates a new lease manager with the number of buffered +// leases, lease reuse duration in seconds and percentage. The percentage +// value x means x*100%. +func newLeaseManager(client *clientv3.Client, leaseReuseDurationSeconds int64, leaseReuseDurationPercent float64) *leaseManager { + return &leaseManager{ + client: client, + leaseReuseDurationSeconds: leaseReuseDurationSeconds, + leaseReuseDurationPercent: leaseReuseDurationPercent, + } +} + +// setLeaseReuseDurationSeconds is used for testing purpose. It is used to +// reduce the extra lease duration to avoid unnecessary timeout in testing. +func (l *leaseManager) setLeaseReuseDurationSeconds(duration int64) { + l.leaseMu.Lock() + defer l.leaseMu.Unlock() + l.leaseReuseDurationSeconds = duration +} + +// GetLease returns a lease based on requested ttl: if the cached previous +// lease can be reused, reuse it; otherwise request a new one from etcd. +func (l *leaseManager) GetLease(ctx context.Context, ttl int64) (clientv3.LeaseID, error) { + now := time.Now() + l.leaseMu.Lock() + defer l.leaseMu.Unlock() + // check if previous lease can be reused + reuseDurationSeconds := l.getReuseDurationSecondsLocked(ttl) + valid := now.Add(time.Duration(ttl) * time.Second).Before(l.prevLeaseExpirationTime) + sufficient := now.Add(time.Duration(ttl+reuseDurationSeconds) * time.Second).After(l.prevLeaseExpirationTime) + if valid && sufficient { + return l.prevLeaseID, nil + } + // request a lease with a little extra ttl from etcd + ttl += reuseDurationSeconds + lcr, err := l.client.Lease.Grant(ctx, ttl) + if err != nil { + return clientv3.LeaseID(0), err + } + // cache the new lease id + l.prevLeaseID = lcr.ID + l.prevLeaseExpirationTime = now.Add(time.Duration(ttl) * time.Second) + return lcr.ID, nil +} + +// getReuseDurationSecondsLocked returns the reusable duration in seconds +// based on the configuration. Lock has to be acquired before calling this +// function. +func (l *leaseManager) getReuseDurationSecondsLocked(ttl int64) int64 { + reuseDurationSeconds := int64(l.leaseReuseDurationPercent * float64(ttl)) + if reuseDurationSeconds > l.leaseReuseDurationSeconds { + reuseDurationSeconds = l.leaseReuseDurationSeconds + } + return reuseDurationSeconds +} diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/BUILD b/deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/BUILD deleted file mode 100644 index 6396c47e3..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["checks.go"], - importpath = "k8s.io/apiserver/pkg/storage/etcd3/preflight", -) - -go_test( - name = "go_default_test", - srcs = ["checks_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage/etcd3/preflight", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/checks.go b/deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/checks.go deleted file mode 100644 index 899a6fa89..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/etcd3/preflight/checks.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package preflight - -import ( - "fmt" - "net" - "net/url" - "time" -) - -const connectionTimeout = 1 * time.Second - -type connection interface { - serverReachable(address string) bool - parseServerList(serverList []string) error - CheckEtcdServers() (bool, error) -} - -// EtcdConnection holds the Etcd server list -type EtcdConnection struct { - ServerList []string -} - -func (EtcdConnection) serverReachable(connURL *url.URL) bool { - scheme := connURL.Scheme - if scheme == "http" || scheme == "https" || scheme == "tcp" { - scheme = "tcp" - } - if conn, err := net.DialTimeout(scheme, connURL.Host, connectionTimeout); err == nil { - defer conn.Close() - return true - } - return false -} - -func parseServerURI(serverURI string) (*url.URL, error) { - connURL, err := url.Parse(serverURI) - if err != nil { - return &url.URL{}, fmt.Errorf("unable to parse etcd url: %v", err) - } - return connURL, nil -} - -// CheckEtcdServers will attempt to reach all etcd servers once. If any -// can be reached, return true. -func (con EtcdConnection) CheckEtcdServers() (done bool, err error) { - // Attempt to reach every Etcd server in order - for _, serverURI := range con.ServerList { - host, err := parseServerURI(serverURI) - if err != nil { - return false, err - } - if con.serverReachable(host) { - return true, nil - } - } - return false, nil -} diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd3/store.go b/deps/k8s.io/apiserver/pkg/storage/etcd3/store.go index f5bf03e5b..83354478d 100644 --- a/deps/k8s.io/apiserver/pkg/storage/etcd3/store.go +++ b/deps/k8s.io/apiserver/pkg/storage/etcd3/store.go @@ -18,6 +18,7 @@ package etcd3 import ( "bytes" + "context" "encoding/base64" "encoding/json" "errors" @@ -29,7 +30,6 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/golang/glog" - "golang.org/x/net/context" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -70,11 +70,7 @@ type store struct { pathPrefix string watcher *watcher pagingEnabled bool -} - -type elemForDecode struct { - data []byte - rev uint64 + leaseManager *leaseManager } type objState struct { @@ -107,8 +103,9 @@ func newStore(c *clientv3.Client, quorumRead, pagingEnabled bool, codec runtime. // for compatibility with etcd2 impl. // no-op for default prefix of '/registry'. // keeps compatibility with etcd2 impl for custom prefixes that don't start with '/' - pathPrefix: path.Join("/", prefix), - watcher: newWatcher(c, codec, versioner, transformer), + pathPrefix: path.Join("/", prefix), + watcher: newWatcher(c, codec, versioner, transformer), + leaseManager: newDefaultLeaseManager(c), } if !quorumRead { // In case of non-quorum reads, we can set WithSerializable() @@ -236,7 +233,7 @@ func (s *store) conditionalDelete(ctx context.Context, key string, out runtime.O if err != nil { return err } - if err := checkPreconditions(key, preconditions, origState.obj); err != nil { + if err := preconditions.Check(key, origState.obj); err != nil { return err } txnResp, err := s.client.KV.Txn(ctx).If( @@ -297,7 +294,7 @@ func (s *store) GuaranteedUpdate( transformContext := authenticatedDataString(key) for { - if err := checkPreconditions(key, preconditions, origState.obj); err != nil { + if err := preconditions.Check(key, origState.obj); err != nil { return err } @@ -388,30 +385,39 @@ func (s *store) GetToList(ctx context.Context, key string, resourceVersion strin if err != nil { return err } - key = path.Join(s.pathPrefix, key) - - getResp, err := s.client.KV.Get(ctx, key, s.getOps...) - if err != nil { - return err - } - if len(getResp.Kvs) == 0 { - return nil - } - data, _, err := s.transformer.TransformFromStorage(getResp.Kvs[0].Value, authenticatedDataString(key)) - if err != nil { - return storage.NewInternalError(err.Error()) - } v, err := conversion.EnforcePtr(listPtr) if err != nil || v.Kind() != reflect.Slice { panic("need ptr to slice") } - if err := appendListItem(v, data, uint64(getResp.Kvs[0].ModRevision), pred, s.codec, s.versioner); err != nil { + + key = path.Join(s.pathPrefix, key) + getResp, err := s.client.KV.Get(ctx, key, s.getOps...) + if err != nil { return err } + + if len(getResp.Kvs) > 0 { + data, _, err := s.transformer.TransformFromStorage(getResp.Kvs[0].Value, authenticatedDataString(key)) + if err != nil { + return storage.NewInternalError(err.Error()) + } + if err := appendListItem(v, data, uint64(getResp.Kvs[0].ModRevision), pred, s.codec, s.versioner); err != nil { + return err + } + } // update version with cluster level revision return s.versioner.UpdateList(listObj, uint64(getResp.Header.Revision), "") } +func (s *store) Count(key string) (int64, error) { + key = path.Join(s.pathPrefix, key) + getResp, err := s.client.KV.Get(context.Background(), key, clientv3.WithRange(clientv3.GetPrefixRangeEnd(key)), clientv3.WithCountOnly()) + if err != nil { + return 0, err + } + return getResp.Count, nil +} + // continueToken is a simple structured object for encoding the state of a continue token. // TODO: if we change the version of the encoded from, we can't start encoding the new version // until all other servers are upgraded (i.e. we need to support rolling schema) @@ -523,7 +529,7 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor case s.pagingEnabled && pred.Limit > 0: if len(resourceVersion) > 0 { - fromRV, err := s.versioner.ParseListResourceVersion(resourceVersion) + fromRV, err := s.versioner.ParseResourceVersion(resourceVersion) if err != nil { return apierrors.NewBadRequest(fmt.Sprintf("invalid resource version: %v", err)) } @@ -538,7 +544,7 @@ func (s *store) List(ctx context.Context, key, resourceVersion string, pred stor default: if len(resourceVersion) > 0 { - fromRV, err := s.versioner.ParseListResourceVersion(resourceVersion) + fromRV, err := s.versioner.ParseResourceVersion(resourceVersion) if err != nil { return apierrors.NewBadRequest(fmt.Sprintf("invalid resource version: %v", err)) } @@ -665,7 +671,7 @@ func (s *store) WatchList(ctx context.Context, key string, resourceVersion strin } func (s *store) watch(ctx context.Context, key string, rv string, pred storage.SelectionPredicate, recursive bool) (watch.Interface, error) { - rev, err := s.versioner.ParseWatchResourceVersion(rv) + rev, err := s.versioner.ParseResourceVersion(rv) if err != nil { return nil, err } @@ -749,13 +755,11 @@ func (s *store) ttlOpts(ctx context.Context, ttl int64) ([]clientv3.OpOption, er if ttl == 0 { return nil, nil } - // TODO: one lease per ttl key is expensive. Based on current use case, we can have a long window to - // put keys within into same lease. We shall benchmark this and optimize the performance. - lcr, err := s.client.Lease.Grant(ctx, ttl) + id, err := s.leaseManager.GetLease(ctx, ttl) if err != nil { return nil, err } - return []clientv3.OpOption{clientv3.WithLease(clientv3.LeaseID(lcr.ID))}, nil + return []clientv3.OpOption{clientv3.WithLease(id)}, nil } // decode decodes value of bytes into object. It will also set the object resource version to rev. @@ -787,21 +791,6 @@ func appendListItem(v reflect.Value, data []byte, rev uint64, pred storage.Selec return nil } -func checkPreconditions(key string, preconditions *storage.Preconditions, out runtime.Object) error { - if preconditions == nil { - return nil - } - objMeta, err := meta.Accessor(out) - if err != nil { - return storage.NewInternalErrorf("can't enforce preconditions %v on un-introspectable object %v, got error: %v", *preconditions, out, err) - } - if preconditions.UID != nil && *preconditions.UID != objMeta.GetUID() { - errMsg := fmt.Sprintf("Precondition failed: UID in precondition: %v, UID in object meta: %v", *preconditions.UID, objMeta.GetUID()) - return storage.NewInvalidObjError(key, errMsg) - } - return nil -} - func notFound(key string) clientv3.Cmp { return clientv3.Compare(clientv3.ModRevision(key), "=", 0) } diff --git a/deps/k8s.io/apiserver/pkg/storage/etcd3/watcher.go b/deps/k8s.io/apiserver/pkg/storage/etcd3/watcher.go index 38aae2f1f..c1216d588 100644 --- a/deps/k8s.io/apiserver/pkg/storage/etcd3/watcher.go +++ b/deps/k8s.io/apiserver/pkg/storage/etcd3/watcher.go @@ -17,6 +17,7 @@ limitations under the License. package etcd3 import ( + "context" "errors" "fmt" "os" @@ -32,7 +33,6 @@ import ( "github.com/coreos/etcd/clientv3" "github.com/golang/glog" - "golang.org/x/net/context" ) const ( @@ -232,7 +232,7 @@ func (wc *watchChan) processEvent(wg *sync.WaitGroup) { continue } if len(wc.resultChan) == outgoingBufSize { - glog.Warningf("Fast watcher, slow processing. Number of buffered events: %d."+ + glog.V(3).Infof("Fast watcher, slow processing. Number of buffered events: %d."+ "Probably caused by slow dispatching events to watchers", outgoingBufSize) } // If user couldn't receive results fast enough, we also block incoming events from watcher. @@ -339,7 +339,7 @@ func (wc *watchChan) sendError(err error) { func (wc *watchChan) sendEvent(e *event) { if len(wc.incomingEventChan) == incomingBufSize { - glog.Warningf("Fast watcher, slow processing. Number of buffered events: %d."+ + glog.V(3).Infof("Fast watcher, slow processing. Number of buffered events: %d."+ "Probably caused by slow decoding, user not receiving fast, or other processing logic", incomingBufSize) } diff --git a/deps/k8s.io/apiserver/pkg/storage/interfaces.go b/deps/k8s.io/apiserver/pkg/storage/interfaces.go index e93265792..2b5da24ff 100644 --- a/deps/k8s.io/apiserver/pkg/storage/interfaces.go +++ b/deps/k8s.io/apiserver/pkg/storage/interfaces.go @@ -17,7 +17,10 @@ limitations under the License. package storage import ( - "golang.org/x/net/context" + "context" + "fmt" + + "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -48,16 +51,12 @@ type Versioner interface { // Should return an error if the specified object does not have a persistable version. ObjectResourceVersion(obj runtime.Object) (uint64, error) - // ParseWatchResourceVersion takes a resource version argument and - // converts it to the storage backend we should pass to helper.Watch(). + // ParseResourceVersion takes a resource version argument and + // converts it to the storage backend. For watch we should pass to helper.Watch(). // Because resourceVersion is an opaque value, the default watch // behavior for non-zero watch is to watch the next value (if you pass // "1", you will see updates from "2" onwards). - ParseWatchResourceVersion(resourceVersion string) (uint64, error) - // ParseListResourceVersion takes a resource version argument and - // converts it to the storage backend version. Appropriate for - // everything that's not intended as an argument for watch. - ParseListResourceVersion(resourceVersion string) (uint64, error) + ParseResourceVersion(resourceVersion string) (uint64, error) } // ResponseMeta contains information about the database metadata that is associated with @@ -109,6 +108,29 @@ func NewUIDPreconditions(uid string) *Preconditions { return &Preconditions{UID: &u} } +func (p *Preconditions) Check(key string, obj runtime.Object) error { + if p == nil { + return nil + } + objMeta, err := meta.Accessor(obj) + if err != nil { + return NewInternalErrorf( + "can't enforce preconditions %v on un-introspectable object %v, got error: %v", + *p, + obj, + err) + } + if p.UID != nil && *p.UID != objMeta.GetUID() { + err := fmt.Sprintf( + "Precondition failed: UID in precondition: %v, UID in object meta: %v", + *p.UID, + objMeta.GetUID()) + return NewInvalidObjError(key, err) + } + return nil + +} + // Interface offers a common interface for object marshaling/unmarshaling operations and // hides all the storage-related operations behind it. type Interface interface { @@ -195,4 +217,7 @@ type Interface interface { GuaranteedUpdate( ctx context.Context, key string, ptrToType runtime.Object, ignoreNotFound bool, precondtions *Preconditions, tryUpdate UpdateFunc, suggestion ...runtime.Object) error + + // Count returns number of different entries under the key (generally being path prefix). + Count(key string) (int64, error) } diff --git a/deps/k8s.io/apiserver/pkg/storage/names/BUILD b/deps/k8s.io/apiserver/pkg/storage/names/BUILD deleted file mode 100644 index 020b44103..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/names/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["generate_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage/names", -) - -go_library( - name = "go_default_library", - srcs = ["generate.go"], - importpath = "k8s.io/apiserver/pkg/storage/names", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/storagebackend/BUILD b/deps/k8s.io/apiserver/pkg/storage/storagebackend/BUILD deleted file mode 100644 index 6b5bc7dc9..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/storagebackend/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["config.go"], - importpath = "k8s.io/apiserver/pkg/storage/storagebackend", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/storagebackend/factory:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/storagebackend/config.go b/deps/k8s.io/apiserver/pkg/storage/storagebackend/config.go index b725985f6..8d7ecf37c 100644 --- a/deps/k8s.io/apiserver/pkg/storage/storagebackend/config.go +++ b/deps/k8s.io/apiserver/pkg/storage/storagebackend/config.go @@ -62,6 +62,9 @@ type Config struct { // CompactionInterval is an interval of requesting compaction from apiserver. // If the value is 0, no compaction will be issued. CompactionInterval time.Duration + + // CountMetricPollPeriod specifies how often should count metric be updated + CountMetricPollPeriod time.Duration } func NewDefaultConfig(prefix string, codec runtime.Codec) *Config { diff --git a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD b/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD deleted file mode 100644 index d604cf5e8..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/BUILD +++ /dev/null @@ -1,62 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["tls_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage/storagebackend/factory", - deps = [ - "//vendor/github.com/coreos/etcd/integration:go_default_library", - "//vendor/github.com/coreos/etcd/pkg/transport:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/example/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd/testing/testingcert:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "etcd2.go", - "etcd3.go", - "factory.go", - ], - importpath = "k8s.io/apiserver/pkg/storage/storagebackend/factory", - deps = [ - "//vendor/github.com/coreos/etcd/client:go_default_library", - "//vendor/github.com/coreos/etcd/clientv3:go_default_library", - "//vendor/github.com/coreos/etcd/pkg/transport:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/etcd3:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/storagebackend:go_default_library", - "//vendor/k8s.io/apiserver/pkg/storage/value:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd2.go b/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd2.go index 84b038104..292553a17 100644 --- a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd2.go +++ b/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd2.go @@ -17,6 +17,8 @@ limitations under the License. package factory import ( + "context" + "fmt" "net" "net/http" "time" @@ -30,6 +32,29 @@ import ( "k8s.io/apiserver/pkg/storage/storagebackend" ) +func newETCD2HealthCheck(c storagebackend.Config) (func() error, error) { + tr, err := newTransportForETCD2(c.CertFile, c.KeyFile, c.CAFile) + if err != nil { + return nil, err + } + + client, err := newETCD2Client(tr, c.ServerList) + if err != nil { + return nil, err + } + + members := etcd2client.NewMembersAPI(client) + + return func() error { + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + if _, err := members.List(ctx); err != nil { + return fmt.Errorf("error listing etcd members: %v", err) + } + return nil + }, nil +} + func newETCD2Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, error) { tr, err := newTransportForETCD2(c.CertFile, c.KeyFile, c.CAFile) if err != nil { @@ -69,10 +94,10 @@ func newTransportForETCD2(certFile, keyFile, caFile string) (*http.Transport, er // TODO: Determine if transport needs optimization tr := utilnet.SetTransportDefaults(&http.Transport{ Proxy: http.ProxyFromEnvironment, - Dial: (&net.Dialer{ + DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, - }).Dial, + }).DialContext, TLSHandshakeTimeout: 10 * time.Second, MaxIdleConnsPerHost: 500, TLSClientConfig: cfg, diff --git a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go b/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go index 48bba7311..cce71d216 100644 --- a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go +++ b/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/etcd3.go @@ -17,12 +17,17 @@ limitations under the License. package factory import ( + "context" + "fmt" + "sync/atomic" "time" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/pkg/transport" - "golang.org/x/net/context" + grpcprom "github.com/grpc-ecosystem/go-grpc-prometheus" + "google.golang.org/grpc" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apiserver/pkg/storage" "k8s.io/apiserver/pkg/storage/etcd3" "k8s.io/apiserver/pkg/storage/storagebackend" @@ -31,12 +36,49 @@ import ( // The short keepalive timeout and interval have been chosen to aggressively // detect a failed etcd server without introducing much overhead. -var ( - keepaliveTime = 30 * time.Second - keepaliveTimeout = 10 * time.Second -) +const keepaliveTime = 30 * time.Second +const keepaliveTimeout = 10 * time.Second -func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, error) { +// dialTimeout is the timeout for failing to establish a connection. +// It is set to 20 seconds as times shorter than that will cause TLS connections to fail +// on heavily loaded arm64 CPUs (issue #64649) +const dialTimeout = 20 * time.Second + +func newETCD3HealthCheck(c storagebackend.Config) (func() error, error) { + // constructing the etcd v3 client blocks and times out if etcd is not available. + // retry in a loop in the background until we successfully create the client, storing the client or error encountered + + clientValue := &atomic.Value{} + + clientErrMsg := &atomic.Value{} + clientErrMsg.Store("etcd client connection not yet established") + + go wait.PollUntil(time.Second, func() (bool, error) { + client, err := newETCD3Client(c) + if err != nil { + clientErrMsg.Store(err.Error()) + return false, nil + } + clientValue.Store(client) + clientErrMsg.Store("") + return true, nil + }, wait.NeverStop) + + return func() error { + if errMsg := clientErrMsg.Load().(string); len(errMsg) > 0 { + return fmt.Errorf(errMsg) + } + client := clientValue.Load().(*clientv3.Client) + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + if _, err := client.Cluster.MemberList(ctx); err != nil { + return fmt.Errorf("error listing etcd members: %v", err) + } + return nil + }, nil +} + +func newETCD3Client(c storagebackend.Config) (*clientv3.Client, error) { tlsInfo := transport.TLSInfo{ CertFile: c.CertFile, KeyFile: c.KeyFile, @@ -44,7 +86,7 @@ func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, e } tlsConfig, err := tlsInfo.ClientConfig() if err != nil { - return nil, nil, err + return nil, err } // NOTE: Client relies on nil tlsConfig // for non-secure connections, update the implicit variable @@ -52,12 +94,22 @@ func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, e tlsConfig = nil } cfg := clientv3.Config{ + DialTimeout: dialTimeout, DialKeepAliveTime: keepaliveTime, DialKeepAliveTimeout: keepaliveTimeout, - Endpoints: c.ServerList, - TLS: tlsConfig, + DialOptions: []grpc.DialOption{ + grpc.WithUnaryInterceptor(grpcprom.UnaryClientInterceptor), + grpc.WithStreamInterceptor(grpcprom.StreamClientInterceptor), + }, + Endpoints: c.ServerList, + TLS: tlsConfig, } client, err := clientv3.New(cfg) + return client, err +} + +func newETCD3Storage(c storagebackend.Config) (storage.Interface, DestroyFunc, error) { + client, err := newETCD3Client(c) if err != nil { return nil, nil, err } diff --git a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/factory.go b/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/factory.go index 101207b9f..bba1fa209 100644 --- a/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/factory.go +++ b/deps/k8s.io/apiserver/pkg/storage/storagebackend/factory/factory.go @@ -41,3 +41,15 @@ func Create(c storagebackend.Config) (storage.Interface, DestroyFunc, error) { return nil, nil, fmt.Errorf("unknown storage type: %s", c.Type) } } + +// CreateHealthCheck creates a healthcheck function based on given config. +func CreateHealthCheck(c storagebackend.Config) (func() error, error) { + switch c.Type { + case storagebackend.StorageTypeETCD2: + return newETCD2HealthCheck(c) + case storagebackend.StorageTypeUnset, storagebackend.StorageTypeETCD3: + return newETCD3HealthCheck(c) + default: + return nil, fmt.Errorf("unknown storage type: %s", c.Type) + } +} diff --git a/deps/k8s.io/apiserver/pkg/storage/testing/OWNERS b/deps/k8s.io/apiserver/pkg/storage/testing/OWNERS new file mode 100755 index 000000000..ff5dd0da8 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/testing/OWNERS @@ -0,0 +1,10 @@ +reviewers: +- smarterclayton +- wojtek-t +- liggitt +- erictune +- timothysc +- soltysh +- mml +- feihujiang +- enj diff --git a/deps/k8s.io/apiserver/pkg/storage/testing/doc.go b/deps/k8s.io/apiserver/pkg/storage/testing/doc.go new file mode 100644 index 000000000..f6870edfb --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/testing/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2015 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package + +package testing diff --git a/deps/k8s.io/apiserver/pkg/storage/testing/types.go b/deps/k8s.io/apiserver/pkg/storage/testing/types.go new file mode 100644 index 000000000..37a70cbf5 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/testing/types.go @@ -0,0 +1,29 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testing + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type TestResource struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + Value int `json:"value"` +} diff --git a/deps/k8s.io/apiserver/pkg/storage/testing/utils.go b/deps/k8s.io/apiserver/pkg/storage/testing/utils.go new file mode 100644 index 000000000..e226da6f6 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/testing/utils.go @@ -0,0 +1,61 @@ +/* +Copyright 2015 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package testing + +import ( + "context" + "path" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apiserver/pkg/storage" +) + +// CreateObj will create a single object using the storage interface +func CreateObj(helper storage.Interface, name string, obj, out runtime.Object, ttl uint64) error { + return helper.Create(context.TODO(), name, obj, out, ttl) +} + +//CreateObjList will create a list from the array of objects +func CreateObjList(prefix string, helper storage.Interface, items []runtime.Object) error { + for i := range items { + obj := items[i] + meta, err := meta.Accessor(obj) + if err != nil { + return err + } + err = CreateObj(helper, path.Join(prefix, meta.GetName()), obj, obj, 0) + if err != nil { + return err + } + items[i] = obj + } + return nil +} + +// CreateList will properly create a list using the storage interface +func CreateList(prefix string, helper storage.Interface, list runtime.Object) error { + items, err := meta.ExtractList(list) + if err != nil { + return err + } + err = CreateObjList(prefix, helper, items) + if err != nil { + return err + } + return meta.SetList(list, items) +} diff --git a/deps/k8s.io/apiserver/pkg/storage/testing/zz_generated.deepcopy.go b/deps/k8s.io/apiserver/pkg/storage/testing/zz_generated.deepcopy.go new file mode 100644 index 000000000..41c1941a7 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/testing/zz_generated.deepcopy.go @@ -0,0 +1,51 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package testing + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TestResource) DeepCopyInto(out *TestResource) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestResource. +func (in *TestResource) DeepCopy() *TestResource { + if in == nil { + return nil + } + out := new(TestResource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *TestResource) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/deps/k8s.io/apiserver/pkg/storage/util.go b/deps/k8s.io/apiserver/pkg/storage/util.go index 9d437d062..8c571b1c8 100644 --- a/deps/k8s.io/apiserver/pkg/storage/util.go +++ b/deps/k8s.io/apiserver/pkg/storage/util.go @@ -18,7 +18,6 @@ package storage import ( "fmt" - "strings" "sync/atomic" "k8s.io/apimachinery/pkg/api/meta" @@ -72,31 +71,6 @@ func NoNamespaceKeyFunc(prefix string, obj runtime.Object) (string, error) { return prefix + "/" + name, nil } -// hasPathPrefix returns true if the string matches pathPrefix exactly, or if is prefixed with pathPrefix at a path segment boundary -func hasPathPrefix(s, pathPrefix string) bool { - // Short circuit if s doesn't contain the prefix at all - if !strings.HasPrefix(s, pathPrefix) { - return false - } - - pathPrefixLength := len(pathPrefix) - - if len(s) == pathPrefixLength { - // Exact match - return true - } - if strings.HasSuffix(pathPrefix, "/") { - // pathPrefix already ensured a path segment boundary - return true - } - if s[pathPrefixLength:pathPrefixLength+1] == "/" { - // The next character in s is a path segment boundary - // Check this instead of normalizing pathPrefix to avoid allocating on every call - return true - } - return false -} - // HighWaterMark is a thread-safe object for tracking the maximum value seen // for some quantity. type HighWaterMark int64 diff --git a/deps/k8s.io/apiserver/pkg/storage/value/BUILD b/deps/k8s.io/apiserver/pkg/storage/value/BUILD deleted file mode 100644 index cfb01af40..000000000 --- a/deps/k8s.io/apiserver/pkg/storage/value/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["transformer_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/storage/value", -) - -go_library( - name = "go_default_library", - srcs = ["transformer.go"], - importpath = "k8s.io/apiserver/pkg/storage/value", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/aes:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/envelope:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/identity:all-srcs", - "//staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/storage/value/metrics.go b/deps/k8s.io/apiserver/pkg/storage/value/metrics.go new file mode 100644 index 000000000..1fe316782 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/storage/value/metrics.go @@ -0,0 +1,124 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package value + +import ( + "sync" + "time" + + "github.com/prometheus/client_golang/prometheus" +) + +const ( + namespace = "apiserver" + subsystem = "storage" +) + +var ( + transformerLatencies = prometheus.NewHistogramVec( + prometheus.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "transformation_latencies_microseconds", + Help: "Latencies in microseconds of value transformation operations.", + // In-process transformations (ex. AES CBC) complete on the order of 20 microseconds. However, when + // external KMS is involved latencies may climb into milliseconds. + Buckets: prometheus.ExponentialBuckets(5, 2, 14), + }, + []string{"transformation_type"}, + ) + transformerFailuresTotal = prometheus.NewCounterVec( + prometheus.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "transformation_failures_total", + Help: "Total number of failed transformation operations.", + }, + []string{"transformation_type"}, + ) + + envelopeTransformationCacheMissTotal = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "envelope_transformation_cache_misses_total", + Help: "Total number of cache misses while accessing key decryption key(KEK).", + }, + ) + + dataKeyGenerationLatencies = prometheus.NewHistogram( + prometheus.HistogramOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "data_key_generation_latencies_microseconds", + Help: "Latencies in microseconds of data encryption key(DEK) generation operations.", + Buckets: prometheus.ExponentialBuckets(5, 2, 14), + }, + ) + dataKeyGenerationFailuresTotal = prometheus.NewCounter( + prometheus.CounterOpts{ + Namespace: namespace, + Subsystem: subsystem, + Name: "data_key_generation_failures_total", + Help: "Total number of failed data encryption key(DEK) generation operations.", + }, + ) +) + +var registerMetrics sync.Once + +func RegisterMetrics() { + registerMetrics.Do(func() { + prometheus.MustRegister(transformerLatencies) + prometheus.MustRegister(transformerFailuresTotal) + prometheus.MustRegister(envelopeTransformationCacheMissTotal) + prometheus.MustRegister(dataKeyGenerationLatencies) + prometheus.MustRegister(dataKeyGenerationFailuresTotal) + }) +} + +// RecordTransformation records latencies and count of TransformFromStorage and TransformToStorage operations. +func RecordTransformation(transformationType string, start time.Time, err error) { + if err != nil { + transformerFailuresTotal.WithLabelValues(transformationType).Inc() + return + } + + since := sinceInMicroseconds(start) + transformerLatencies.WithLabelValues(transformationType).Observe(float64(since)) +} + +// RecordCacheMiss records a miss on Key Encryption Key(KEK) - call to KMS was required to decrypt KEK. +func RecordCacheMiss() { + envelopeTransformationCacheMissTotal.Inc() +} + +// RecordDataKeyGeneration records latencies and count of Data Encryption Key generation operations. +func RecordDataKeyGeneration(start time.Time, err error) { + if err != nil { + dataKeyGenerationFailuresTotal.Inc() + return + } + + since := sinceInMicroseconds(start) + dataKeyGenerationLatencies.Observe(float64(since)) +} + +func sinceInMicroseconds(start time.Time) int64 { + elapsedNanoseconds := time.Since(start).Nanoseconds() + return elapsedNanoseconds / int64(time.Microsecond) +} diff --git a/deps/k8s.io/apiserver/pkg/storage/value/transformer.go b/deps/k8s.io/apiserver/pkg/storage/value/transformer.go index 04af5d6db..bad6ed58e 100644 --- a/deps/k8s.io/apiserver/pkg/storage/value/transformer.go +++ b/deps/k8s.io/apiserver/pkg/storage/value/transformer.go @@ -21,8 +21,13 @@ import ( "bytes" "fmt" "sync" + "time" ) +func init() { + RegisterMetrics() +} + // Context is additional information that a storage transformation may need to verify the data at rest. type Context interface { // AuthenticatedData should return an array of bytes that describes the current value. If the value changes, @@ -80,12 +85,18 @@ func (t *MutableTransformer) Set(transformer Transformer) { } func (t *MutableTransformer) TransformFromStorage(data []byte, context Context) (out []byte, stale bool, err error) { + defer func(start time.Time) { + RecordTransformation("from_storage", start, err) + }(time.Now()) t.lock.RLock() transformer := t.transformer t.lock.RUnlock() return transformer.TransformFromStorage(data, context) } func (t *MutableTransformer) TransformToStorage(data []byte, context Context) (out []byte, err error) { + defer func(start time.Time) { + RecordTransformation("to_storage", start, err) + }(time.Now()) t.lock.RLock() transformer := t.transformer t.lock.RUnlock() diff --git a/deps/k8s.io/apiserver/pkg/util/dryrun/dryrun.go b/deps/k8s.io/apiserver/pkg/util/dryrun/dryrun.go new file mode 100644 index 000000000..3e28c2934 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/util/dryrun/dryrun.go @@ -0,0 +1,22 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dryrun + +// IsDryRun returns true if the DryRun flag is an actual dry-run. +func IsDryRun(flag []string) bool { + return len(flag) > 0 +} diff --git a/deps/k8s.io/apiserver/pkg/util/feature/BUILD b/deps/k8s.io/apiserver/pkg/util/feature/BUILD deleted file mode 100644 index 73ed3f795..000000000 --- a/deps/k8s.io/apiserver/pkg/util/feature/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["feature_gate_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/util/feature", - deps = ["//vendor/github.com/spf13/pflag:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["feature_gate.go"], - importpath = "k8s.io/apiserver/pkg/util/feature", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/apiserver/pkg/util/feature/testing:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/util/feature/feature_gate.go b/deps/k8s.io/apiserver/pkg/util/feature/feature_gate.go index 306877124..6b051a235 100644 --- a/deps/k8s.io/apiserver/pkg/util/feature/feature_gate.go +++ b/deps/k8s.io/apiserver/pkg/util/feature/feature_gate.go @@ -88,6 +88,10 @@ type FeatureGate interface { Add(features map[Feature]FeatureSpec) error // KnownFeatures returns a slice of strings describing the FeatureGate's known features. KnownFeatures() []string + // DeepCopy returns a deep copy of the FeatureGate object, such that gates can be + // set on the copy without mutating the original. This is useful for validating + // config against potential feature gate changes before committing those changes. + DeepCopy() FeatureGate } // featureGate implements FeatureGate as well as pflag.Value for flag parsing. @@ -187,7 +191,7 @@ func (f *featureGate) Set(value string) error { f.known.Store(known) f.enabled.Store(enabled) - glog.Infof("feature gates: %v", enabled) + glog.V(1).Infof("feature gates: %v", enabled) return nil } @@ -223,7 +227,7 @@ func (f *featureGate) SetFromMap(m map[string]bool) error { f.known.Store(known) f.enabled.Store(enabled) - glog.Infof("feature gates: %v", f.enabled) + glog.V(1).Infof("feature gates: %v", f.enabled) return nil } @@ -284,6 +288,10 @@ func (f *featureGate) Enabled(key Feature) bool { // AddFlag adds a flag for setting global feature gates to the specified FlagSet. func (f *featureGate) AddFlag(fs *pflag.FlagSet) { f.lock.Lock() + // TODO(mtaufen): Shouldn't we just close it on the first Set/SetFromMap instead? + // Not all components expose a feature gates flag using this AddFlag method, and + // in the future, all components will completely stop exposing a feature gates flag, + // in favor of componentconfig. f.closed = true f.lock.Unlock() @@ -306,3 +314,34 @@ func (f *featureGate) KnownFeatures() []string { sort.Strings(known) return known } + +// DeepCopy returns a deep copy of the FeatureGate object, such that gates can be +// set on the copy without mutating the original. This is useful for validating +// config against potential feature gate changes before committing those changes. +func (f *featureGate) DeepCopy() FeatureGate { + // Copy existing state. + known := map[Feature]FeatureSpec{} + for k, v := range f.known.Load().(map[Feature]FeatureSpec) { + known[k] = v + } + enabled := map[Feature]bool{} + for k, v := range f.enabled.Load().(map[Feature]bool) { + enabled[k] = v + } + + // Store copied state in new atomics. + knownValue := &atomic.Value{} + knownValue.Store(known) + enabledValue := &atomic.Value{} + enabledValue.Store(enabled) + + // Construct a new featureGate around the copied state. + // Note that specialFeatures is treated as immutable by convention, + // and we maintain the value of f.closed across the copy. + return &featureGate{ + special: specialFeatures, + known: knownValue, + enabled: enabledValue, + closed: f.closed, + } +} diff --git a/deps/k8s.io/apiserver/pkg/util/flag/BUILD b/deps/k8s.io/apiserver/pkg/util/flag/BUILD deleted file mode 100644 index f6aae4b33..000000000 --- a/deps/k8s.io/apiserver/pkg/util/flag/BUILD +++ /dev/null @@ -1,58 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "ciphersuites_flag_test.go", - "colon_separated_multimap_string_string_test.go", - "langle_separated_map_string_string_test.go", - "map_string_bool_test.go", - "map_string_string_test.go", - "namedcertkey_flag_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/util/flag", - deps = ["//vendor/github.com/spf13/pflag:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "ciphersuites_flag.go", - "colon_separated_multimap_string_string.go", - "configuration_map.go", - "flags.go", - "langle_separated_map_string_string.go", - "map_string_bool.go", - "map_string_string.go", - "namedcertkey_flag.go", - "noop.go", - "omitempty.go", - "string_flag.go", - "tristate.go", - ], - importpath = "k8s.io/apiserver/pkg/util/flag", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/util/flag/ciphersuites_flag.go b/deps/k8s.io/apiserver/pkg/util/flag/ciphersuites_flag.go index 73fd62c10..764747c25 100644 --- a/deps/k8s.io/apiserver/pkg/util/flag/ciphersuites_flag.go +++ b/deps/k8s.io/apiserver/pkg/util/flag/ciphersuites_flag.go @@ -19,6 +19,8 @@ package flag import ( "crypto/tls" "fmt" + + "k8s.io/apimachinery/pkg/util/sets" ) // ciphers maps strings into tls package cipher constants in @@ -48,6 +50,14 @@ var ciphers = map[string]uint16{ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, } +func TLSCipherPossibleValues() []string { + cipherKeys := sets.NewString() + for key := range ciphers { + cipherKeys.Insert(key) + } + return cipherKeys.List() +} + func TLSCipherSuites(cipherNames []string) ([]uint16, error) { if len(cipherNames) == 0 { return nil, nil @@ -69,6 +79,14 @@ var versions = map[string]uint16{ "VersionTLS12": tls.VersionTLS12, } +func TLSPossibleVersions() []string { + versionsKeys := sets.NewString() + for key := range versions { + versionsKeys.Insert(key) + } + return versionsKeys.List() +} + func TLSVersion(versionName string) (uint16, error) { if len(versionName) == 0 { return DefaultTLSVersion(), nil diff --git a/deps/k8s.io/apiserver/pkg/util/flag/map_string_bool.go b/deps/k8s.io/apiserver/pkg/util/flag/map_string_bool.go index 46ed43836..e5a01805b 100644 --- a/deps/k8s.io/apiserver/pkg/util/flag/map_string_bool.go +++ b/deps/k8s.io/apiserver/pkg/util/flag/map_string_bool.go @@ -39,6 +39,9 @@ func NewMapStringBool(m *map[string]bool) *MapStringBool { // String implements github.com/spf13/pflag.Value func (m *MapStringBool) String() string { + if m == nil || m.Map == nil { + return "" + } pairs := []string{} for k, v := range *m.Map { pairs = append(pairs, fmt.Sprintf("%s=%t", k, v)) diff --git a/deps/k8s.io/apiserver/pkg/util/flag/map_string_string.go b/deps/k8s.io/apiserver/pkg/util/flag/map_string_string.go index 48468a8dd..129470b3c 100644 --- a/deps/k8s.io/apiserver/pkg/util/flag/map_string_string.go +++ b/deps/k8s.io/apiserver/pkg/util/flag/map_string_string.go @@ -23,11 +23,14 @@ import ( ) // MapStringString can be set from the command line with the format `--flag "string=string"`. -// Multiple comma-separated key-value pairs in a single invocation are supported. For example: `--flag "a=foo,b=bar"`. -// Multiple flag invocations are supported. For example: `--flag "a=foo" --flag "b=bar"`. +// Multiple flag invocations are supported. For example: `--flag "a=foo" --flag "b=bar"`. If this is desired +// to be the only type invocation `NoSplit` should be set to true. +// Multiple comma-separated key-value pairs in a single invocation are supported if `NoSplit` +// is set to false. For example: `--flag "a=foo,b=bar"`. type MapStringString struct { Map *map[string]string initialized bool + NoSplit bool } // NewMapStringString takes a pointer to a map[string]string and returns the @@ -36,8 +39,20 @@ func NewMapStringString(m *map[string]string) *MapStringString { return &MapStringString{Map: m} } +// NewMapStringString takes a pointer to a map[string]string and sets `NoSplit` +// value to `true` and returns the MapStringString flag parsing shim for that map +func NewMapStringStringNoSplit(m *map[string]string) *MapStringString { + return &MapStringString{ + Map: m, + NoSplit: true, + } +} + // String implements github.com/spf13/pflag.Value func (m *MapStringString) String() string { + if m == nil || m.Map == nil { + return "" + } pairs := []string{} for k, v := range *m.Map { pairs = append(pairs, fmt.Sprintf("%s=%s", k, v)) @@ -56,19 +71,34 @@ func (m *MapStringString) Set(value string) error { *m.Map = make(map[string]string) m.initialized = true } - for _, s := range strings.Split(value, ",") { - if len(s) == 0 { - continue - } - arr := strings.SplitN(s, "=", 2) - if len(arr) != 2 { - return fmt.Errorf("malformed pair, expect string=string") + + // account for comma-separated key-value pairs in a single invocation + if !m.NoSplit { + for _, s := range strings.Split(value, ",") { + if len(s) == 0 { + continue + } + arr := strings.SplitN(s, "=", 2) + if len(arr) != 2 { + return fmt.Errorf("malformed pair, expect string=string") + } + k := strings.TrimSpace(arr[0]) + v := strings.TrimSpace(arr[1]) + (*m.Map)[k] = v } - k := strings.TrimSpace(arr[0]) - v := strings.TrimSpace(arr[1]) - (*m.Map)[k] = v + return nil + } + + // account for only one key-value pair in a single invocation + arr := strings.SplitN(value, "=", 2) + if len(arr) != 2 { + return fmt.Errorf("malformed pair, expect string=string") } + k := strings.TrimSpace(arr[0]) + v := strings.TrimSpace(arr[1]) + (*m.Map)[k] = v return nil + } // Type implements github.com/spf13/pflag.Value diff --git a/deps/k8s.io/apiserver/pkg/util/flag/sectioned.go b/deps/k8s.io/apiserver/pkg/util/flag/sectioned.go new file mode 100644 index 000000000..b2b9cea2b --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/util/flag/sectioned.go @@ -0,0 +1,92 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package flag + +import ( + "bytes" + "fmt" + "io" + "strings" + + "github.com/docker/docker/pkg/term" + "github.com/spf13/pflag" +) + +// NamedFlagSets stores named flag sets in the order of calling FlagSet. +type NamedFlagSets struct { + // Order is an ordered list of flag set names. + Order []string + // FlagSets stores the flag sets by name. + FlagSets map[string]*pflag.FlagSet +} + +// FlagSet returns the flag set with the given name and adds it to the +// ordered name list if it is not in there yet. +func (nfs *NamedFlagSets) FlagSet(name string) *pflag.FlagSet { + if nfs.FlagSets == nil { + nfs.FlagSets = map[string]*pflag.FlagSet{} + } + if _, ok := nfs.FlagSets[name]; !ok { + nfs.FlagSets[name] = pflag.NewFlagSet(name, pflag.ExitOnError) + nfs.Order = append(nfs.Order, name) + } + return nfs.FlagSets[name] +} + +// PrintSections prints the given names flag sets in sections, with the maximal given column number. +// If cols is zero, lines are not wrapped. +func PrintSections(w io.Writer, fss NamedFlagSets, cols int) { + for _, name := range fss.Order { + fs := fss.FlagSets[name] + + wideFS := pflag.NewFlagSet("", pflag.ExitOnError) + wideFS.AddFlagSet(fs) + + var zzz string + if cols > 24 { + zzz = strings.Repeat("z", cols-24) + wideFS.Int(zzz, 0, strings.Repeat("z", cols-24)) + } + + var buf bytes.Buffer + fmt.Fprintf(&buf, "\n%s flags:\n\n%s", strings.ToUpper(name[:1])+name[1:], wideFS.FlagUsagesWrapped(cols)) + + if cols > 24 { + i := strings.Index(buf.String(), zzz) + lines := strings.Split(buf.String()[:i], "\n") + fmt.Fprint(w, strings.Join(lines[:len(lines)-1], "\n")) + fmt.Fprintln(w) + } else { + fmt.Fprint(w, buf.String()) + } + } +} + +// TerminalSize returns the current width and height of the user's terminal. If it isn't a terminal, +// nil is returned. On error, zero values are returned for width and height. +// Usually w must be the stdout of the process. Stderr won't work. +func TerminalSize(w io.Writer) (int, int, error) { + outFd, isTerminal := term.GetFdInfo(w) + if !isTerminal { + return 0, 0, fmt.Errorf("given writer is no terminal") + } + winsize, err := term.GetWinsize(outFd) + if err != nil { + return 0, 0, err + } + return int(winsize.Width), int(winsize.Height), nil +} diff --git a/deps/k8s.io/apiserver/pkg/util/flushwriter/BUILD b/deps/k8s.io/apiserver/pkg/util/flushwriter/BUILD deleted file mode 100644 index b8f71d9eb..000000000 --- a/deps/k8s.io/apiserver/pkg/util/flushwriter/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["writer_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/util/flushwriter", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "writer.go", - ], - importpath = "k8s.io/apiserver/pkg/util/flushwriter", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/util/logs/BUILD b/deps/k8s.io/apiserver/pkg/util/logs/BUILD deleted file mode 100644 index 069bb5aba..000000000 --- a/deps/k8s.io/apiserver/pkg/util/logs/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["logs.go"], - importpath = "k8s.io/apiserver/pkg/util/logs", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/util/logs/logs.go b/deps/k8s.io/apiserver/pkg/util/logs/logs.go index c5ba084a5..a62c06094 100644 --- a/deps/k8s.io/apiserver/pkg/util/logs/logs.go +++ b/deps/k8s.io/apiserver/pkg/util/logs/logs.go @@ -18,6 +18,7 @@ package logs import ( "flag" + "fmt" "log" "time" @@ -46,7 +47,7 @@ type GlogWriter struct{} // Write implements the io.Writer interface. func (writer GlogWriter) Write(data []byte) (n int, err error) { - glog.Info(string(data)) + glog.InfoDepth(1, string(data)) return len(data), nil } @@ -67,3 +68,12 @@ func FlushLogs() { func NewLogger(prefix string) *log.Logger { return log.New(GlogWriter{}, prefix, 0) } + +// GlogSetter is a setter to set glog level. +func GlogSetter(val string) (string, error) { + var level glog.Level + if err := level.Set(val); err != nil { + return "", fmt.Errorf("failed set glog.logging.verbosity %s: %v", val, err) + } + return fmt.Sprintf("successfully set glog.logging.verbosity to %s", val), nil +} diff --git a/deps/k8s.io/apiserver/pkg/util/openapi/proto.go b/deps/k8s.io/apiserver/pkg/util/openapi/proto.go new file mode 100644 index 000000000..5641d1a14 --- /dev/null +++ b/deps/k8s.io/apiserver/pkg/util/openapi/proto.go @@ -0,0 +1,142 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package openapi + +import ( + "encoding/json" + "fmt" + + "github.com/go-openapi/spec" + openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" + "github.com/googleapis/gnostic/compiler" + yaml "gopkg.in/yaml.v2" + + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/kube-openapi/pkg/util/proto" +) + +const ( + // groupVersionKindExtensionKey is the key used to lookup the + // GroupVersionKind value for an object definition from the + // definition's "extensions" map. + groupVersionKindExtensionKey = "x-kubernetes-group-version-kind" +) + +// ToProtoSchema builds the proto formatted schema from an OpenAPI spec +func ToProtoSchema(openAPIDefinitions *spec.Definitions, gvk schema.GroupVersionKind) (proto.Schema, error) { + openAPISpec := newMinimalValidOpenAPISpec() + openAPISpec.Definitions = *openAPIDefinitions + + specBytes, err := json.MarshalIndent(openAPISpec, " ", " ") + if err != nil { + return nil, err + } + + var info yaml.MapSlice + err = yaml.Unmarshal(specBytes, &info) + if err != nil { + return nil, err + } + + doc, err := openapi_v2.NewDocument(info, compiler.NewContext("$root", nil)) + if err != nil { + return nil, err + } + + models, err := proto.NewOpenAPIData(doc) + if err != nil { + return nil, err + } + + for _, modelName := range models.ListModels() { + model := models.LookupModel(modelName) + if model == nil { + return nil, fmt.Errorf("the ListModels function returned a model that can't be looked-up") + } + gvkList := parseGroupVersionKind(model) + for _, modelGVK := range gvkList { + if modelGVK == gvk { + return model, nil + } + } + } + + return nil, fmt.Errorf("no model found with a %v tag matching %v", groupVersionKindExtensionKey, gvk) +} + +// newMinimalValidOpenAPISpec creates a minimal openapi spec with only the required fields filled in +func newMinimalValidOpenAPISpec() *spec.Swagger { + return &spec.Swagger{ + SwaggerProps: spec.SwaggerProps{ + Swagger: "2.0", + Info: &spec.Info{ + InfoProps: spec.InfoProps{ + Title: "Kubernetes", + Version: "0.0.0", + }, + }, + }, + } +} + +// parseGroupVersionKind gets and parses GroupVersionKind from the extension. Returns empty if it doesn't have one. +func parseGroupVersionKind(s proto.Schema) []schema.GroupVersionKind { + extensions := s.GetExtensions() + + gvkListResult := []schema.GroupVersionKind{} + + // Get the extensions + gvkExtension, ok := extensions[groupVersionKindExtensionKey] + if !ok { + return []schema.GroupVersionKind{} + } + + // gvk extension must be a list of at least 1 element. + gvkList, ok := gvkExtension.([]interface{}) + if !ok { + return []schema.GroupVersionKind{} + } + + for _, gvk := range gvkList { + // gvk extension list must be a map with group, version, and + // kind fields + gvkMap, ok := gvk.(map[interface{}]interface{}) + if !ok { + continue + } + group, ok := gvkMap["group"].(string) + if !ok { + continue + } + version, ok := gvkMap["version"].(string) + if !ok { + continue + } + kind, ok := gvkMap["kind"].(string) + if !ok { + continue + } + + gvkListResult = append(gvkListResult, schema.GroupVersionKind{ + Group: group, + Version: version, + Kind: kind, + }) + } + + return gvkListResult +} diff --git a/deps/k8s.io/apiserver/pkg/util/trace/BUILD b/deps/k8s.io/apiserver/pkg/util/trace/BUILD deleted file mode 100644 index 5d37bb003..000000000 --- a/deps/k8s.io/apiserver/pkg/util/trace/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["trace.go"], - importpath = "k8s.io/apiserver/pkg/util/trace", - deps = ["//vendor/github.com/golang/glog:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/util/webhook/BUILD b/deps/k8s.io/apiserver/pkg/util/webhook/BUILD deleted file mode 100644 index 7904c80d3..000000000 --- a/deps/k8s.io/apiserver/pkg/util/webhook/BUILD +++ /dev/null @@ -1,55 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["webhook.go"], - importpath = "k8s.io/apiserver/pkg/util/webhook", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "certs_test.go", - "webhook_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/util/webhook", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api/v1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/pkg/util/webhook/gencerts.sh b/deps/k8s.io/apiserver/pkg/util/webhook/gencerts.sh index fdceb9571..a042ab62a 100755 --- a/deps/k8s.io/apiserver/pkg/util/webhook/gencerts.sh +++ b/deps/k8s.io/apiserver/pkg/util/webhook/gencerts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # diff --git a/deps/k8s.io/apiserver/pkg/util/webhook/webhook.go b/deps/k8s.io/apiserver/pkg/util/webhook/webhook.go index 6893e834e..3b03fd3fd 100755 --- a/deps/k8s.io/apiserver/pkg/util/webhook/webhook.go +++ b/deps/k8s.io/apiserver/pkg/util/webhook/webhook.go @@ -22,7 +22,6 @@ import ( "time" apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" @@ -42,13 +41,13 @@ type GenericWebhook struct { } // NewGenericWebhook creates a new GenericWebhook from the provided kubeconfig file. -func NewGenericWebhook(registry *registered.APIRegistrationManager, codecFactory serializer.CodecFactory, kubeConfigFile string, groupVersions []schema.GroupVersion, initialBackoff time.Duration) (*GenericWebhook, error) { - return newGenericWebhook(registry, codecFactory, kubeConfigFile, groupVersions, initialBackoff, defaultRequestTimeout) +func NewGenericWebhook(scheme *runtime.Scheme, codecFactory serializer.CodecFactory, kubeConfigFile string, groupVersions []schema.GroupVersion, initialBackoff time.Duration) (*GenericWebhook, error) { + return newGenericWebhook(scheme, codecFactory, kubeConfigFile, groupVersions, initialBackoff, defaultRequestTimeout) } -func newGenericWebhook(registry *registered.APIRegistrationManager, codecFactory serializer.CodecFactory, kubeConfigFile string, groupVersions []schema.GroupVersion, initialBackoff, requestTimeout time.Duration) (*GenericWebhook, error) { +func newGenericWebhook(scheme *runtime.Scheme, codecFactory serializer.CodecFactory, kubeConfigFile string, groupVersions []schema.GroupVersion, initialBackoff, requestTimeout time.Duration) (*GenericWebhook, error) { for _, groupVersion := range groupVersions { - if !registry.IsEnabledVersion(groupVersion) { + if !scheme.IsVersionRegistered(groupVersion) { return nil, fmt.Errorf("webhook plugin requires enabling extension resource: %s", groupVersion) } } diff --git a/deps/k8s.io/apiserver/pkg/util/wsstream/BUILD b/deps/k8s.io/apiserver/pkg/util/wsstream/BUILD deleted file mode 100644 index d55cd63e4..000000000 --- a/deps/k8s.io/apiserver/pkg/util/wsstream/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "conn_test.go", - "stream_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/pkg/util/wsstream", - deps = ["//vendor/golang.org/x/net/websocket:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "conn.go", - "doc.go", - "stream.go", - ], - importpath = "k8s.io/apiserver/pkg/util/wsstream", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/websocket:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go b/deps/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go new file mode 100644 index 000000000..66165915f --- /dev/null +++ b/deps/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered.go @@ -0,0 +1,289 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package buffered + +import ( + "fmt" + "sync" + "time" + + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + auditinternal "k8s.io/apiserver/pkg/apis/audit" + "k8s.io/apiserver/pkg/audit" + "k8s.io/client-go/util/flowcontrol" +) + +// PluginName is the name reported in error metrics. +const PluginName = "buffered" + +// BatchConfig represents batching delegate audit backend configuration. +type BatchConfig struct { + // BufferSize defines a size of the buffering queue. + BufferSize int + // MaxBatchSize defines maximum size of a batch. + MaxBatchSize int + // MaxBatchWait indicates the maximum interval between two batches. + MaxBatchWait time.Duration + + // ThrottleEnable defines whether throttling will be applied to the batching process. + ThrottleEnable bool + // ThrottleQPS defines the allowed rate of batches per second sent to the delegate backend. + ThrottleQPS float32 + // ThrottleBurst defines the maximum number of requests sent to the delegate backend at the same moment in case + // the capacity defined by ThrottleQPS was not utilized. + ThrottleBurst int + + // Whether the delegate backend should be called asynchronously. + AsyncDelegate bool +} + +type bufferedBackend struct { + // The delegate backend that actually exports events. + delegateBackend audit.Backend + + // Channel to buffer events before sending to the delegate backend. + buffer chan *auditinternal.Event + // Maximum number of events in a batch sent to the delegate backend. + maxBatchSize int + // Amount of time to wait after sending a batch to the delegate backend before sending another one. + // + // Receiving maxBatchSize events will always trigger sending a batch, regardless of the amount of time passed. + maxBatchWait time.Duration + + // Whether the delegate backend should be called asynchronously. + asyncDelegate bool + + // Channel to signal that the batching routine has processed all remaining events and exited. + // Once `shutdownCh` is closed no new events will be sent to the delegate backend. + shutdownCh chan struct{} + + // WaitGroup to control the concurrency of sending batches to the delegate backend. + // Worker routine calls Add before sending a batch and + // then spawns a routine that calls Done after batch was processed by the delegate backend. + // This WaitGroup is used to wait for all sending routines to finish before shutting down audit backend. + wg sync.WaitGroup + + // Limits the number of batches sent to the delegate backend per second. + throttle flowcontrol.RateLimiter +} + +var _ audit.Backend = &bufferedBackend{} + +// NewBackend returns a buffered audit backend that wraps delegate backend. +// Buffered backend automatically runs and shuts down the delegate backend. +func NewBackend(delegate audit.Backend, config BatchConfig) audit.Backend { + var throttle flowcontrol.RateLimiter + if config.ThrottleEnable { + throttle = flowcontrol.NewTokenBucketRateLimiter(config.ThrottleQPS, config.ThrottleBurst) + } + return &bufferedBackend{ + delegateBackend: delegate, + buffer: make(chan *auditinternal.Event, config.BufferSize), + maxBatchSize: config.MaxBatchSize, + maxBatchWait: config.MaxBatchWait, + asyncDelegate: config.AsyncDelegate, + shutdownCh: make(chan struct{}), + wg: sync.WaitGroup{}, + throttle: throttle, + } +} + +func (b *bufferedBackend) Run(stopCh <-chan struct{}) error { + go func() { + // Signal that the working routine has exited. + defer close(b.shutdownCh) + + b.processIncomingEvents(stopCh) + + // Handle the events that were received after the last buffer + // scraping and before this line. Since the buffer is closed, no new + // events will come through. + allEventsProcessed := false + timer := make(chan time.Time) + for !allEventsProcessed { + allEventsProcessed = func() bool { + // Recover from any panic in order to try to process all remaining events. + // Note, that in case of a panic, the return value will be false and + // the loop execution will continue. + defer runtime.HandleCrash() + + events := b.collectEvents(timer, wait.NeverStop) + b.processEvents(events) + return len(events) == 0 + }() + } + }() + return b.delegateBackend.Run(stopCh) +} + +// Shutdown blocks until stopCh passed to the Run method is closed and all +// events added prior to that moment are batched and sent to the delegate backend. +func (b *bufferedBackend) Shutdown() { + // Wait until the routine spawned in Run method exits. + <-b.shutdownCh + + // Wait until all sending routines exit. + // + // - When b.shutdownCh is closed, we know that the goroutine in Run has terminated. + // - This means that processIncomingEvents has terminated. + // - Which means that b.buffer is closed and cannot accept any new events anymore. + // - Because processEvents is called synchronously from the Run goroutine, the waitgroup has its final value. + // Hence wg.Wait will not miss any more outgoing batches. + b.wg.Wait() + + b.delegateBackend.Shutdown() +} + +// processIncomingEvents runs a loop that collects events from the buffer. When +// b.stopCh is closed, processIncomingEvents stops and closes the buffer. +func (b *bufferedBackend) processIncomingEvents(stopCh <-chan struct{}) { + defer close(b.buffer) + + var ( + maxWaitChan <-chan time.Time + maxWaitTimer *time.Timer + ) + // Only use max wait batching if batching is enabled. + if b.maxBatchSize > 1 { + maxWaitTimer = time.NewTimer(b.maxBatchWait) + maxWaitChan = maxWaitTimer.C + defer maxWaitTimer.Stop() + } + + for { + func() { + // Recover from any panics caused by this function so a panic in the + // goroutine can't bring down the main routine. + defer runtime.HandleCrash() + + if b.maxBatchSize > 1 { + maxWaitTimer.Reset(b.maxBatchWait) + } + b.processEvents(b.collectEvents(maxWaitChan, stopCh)) + }() + + select { + case <-stopCh: + return + default: + } + } +} + +// collectEvents attempts to collect some number of events in a batch. +// +// The following things can cause collectEvents to stop and return the list +// of events: +// +// * Maximum number of events for a batch. +// * Timer has passed. +// * Buffer channel is closed and empty. +// * stopCh is closed. +func (b *bufferedBackend) collectEvents(timer <-chan time.Time, stopCh <-chan struct{}) []*auditinternal.Event { + var events []*auditinternal.Event + +L: + for i := 0; i < b.maxBatchSize; i++ { + select { + case ev, ok := <-b.buffer: + // Buffer channel was closed and no new events will follow. + if !ok { + break L + } + events = append(events, ev) + case <-timer: + // Timer has expired. Send currently accumulated batch. + break L + case <-stopCh: + // Backend has been stopped. Send currently accumulated batch. + break L + } + } + + return events +} + +// processEvents process the batch events in a goroutine using delegateBackend's ProcessEvents. +func (b *bufferedBackend) processEvents(events []*auditinternal.Event) { + if len(events) == 0 { + return + } + + // TODO(audit): Should control the number of active goroutines + // if one goroutine takes 5 seconds to finish, the number of goroutines can be 5 * defaultBatchThrottleQPS + if b.throttle != nil { + b.throttle.Accept() + } + + if b.asyncDelegate { + b.wg.Add(1) + go func() { + defer b.wg.Done() + defer runtime.HandleCrash() + + // Execute the real processing in a goroutine to keep it from blocking. + // This lets the batching routine continue draining the queue immediately. + b.delegateBackend.ProcessEvents(events...) + }() + } else { + func() { + defer runtime.HandleCrash() + + // Execute the real processing in a goroutine to keep it from blocking. + // This lets the batching routine continue draining the queue immediately. + b.delegateBackend.ProcessEvents(events...) + }() + } +} + +func (b *bufferedBackend) ProcessEvents(ev ...*auditinternal.Event) { + // The following mechanism is in place to support the situation when audit + // events are still coming after the backend was stopped. + var sendErr error + var evIndex int + + // If the delegateBackend was shutdown and the buffer channel was closed, an + // attempt to add an event to it will result in panic that we should + // recover from. + defer func() { + if err := recover(); err != nil { + sendErr = fmt.Errorf("audit backend shut down") + } + if sendErr != nil { + audit.HandlePluginError(PluginName, sendErr, ev[evIndex:]...) + } + }() + + for i, e := range ev { + evIndex = i + // Per the audit.Backend interface these events are reused after being + // sent to the Sink. Deep copy and send the copy to the queue. + event := e.DeepCopy() + + select { + case b.buffer <- event: + default: + sendErr = fmt.Errorf("audit buffer queue blocked") + return + } + } +} + +func (b *bufferedBackend) String() string { + return fmt.Sprintf("%s<%s>", PluginName, b.delegateBackend) +} diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/buffered/doc.go b/deps/k8s.io/apiserver/plugin/pkg/audit/buffered/doc.go new file mode 100644 index 000000000..933eacc8d --- /dev/null +++ b/deps/k8s.io/apiserver/plugin/pkg/audit/buffered/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package buffered provides an implementation for the audit.Backend interface +// that batches incoming audit events and sends batches to the delegate audit.Backend. +package buffered diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/log/BUILD b/deps/k8s.io/apiserver/plugin/pkg/audit/log/BUILD deleted file mode 100644 index 2a813130e..000000000 --- a/deps/k8s.io/apiserver/plugin/pkg/audit/log/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["backend.go"], - importpath = "k8s.io/apiserver/plugin/pkg/audit/log", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["backend_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/plugin/pkg/audit/log", - deps = [ - "//vendor/github.com/pborman/uuid:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/install:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - ], -) diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/log/backend.go b/deps/k8s.io/apiserver/plugin/pkg/audit/log/backend.go index 7feb8f130..293cdd3c9 100644 --- a/deps/k8s.io/apiserver/plugin/pkg/audit/log/backend.go +++ b/deps/k8s.io/apiserver/plugin/pkg/audit/log/backend.go @@ -32,6 +32,9 @@ const ( FormatLegacy = "legacy" // FormatJson saves event in structured json format. FormatJson = "json" + + // PluginName is the name of this plugin, to be used in help and logs. + PluginName = "log" ) // AllowedFormats are the formats known by log backend. @@ -70,17 +73,17 @@ func (b *backend) logEvent(ev *auditinternal.Event) { case FormatJson: bs, err := runtime.Encode(audit.Codecs.LegacyCodec(b.groupVersion), ev) if err != nil { - audit.HandlePluginError("log", err, ev) + audit.HandlePluginError(PluginName, err, ev) return } line = string(bs[:]) default: - audit.HandlePluginError("log", fmt.Errorf("log format %q is not in list of known formats (%s)", + audit.HandlePluginError(PluginName, fmt.Errorf("log format %q is not in list of known formats (%s)", b.format, strings.Join(AllowedFormats, ",")), ev) return } if _, err := fmt.Fprint(b.out, line); err != nil { - audit.HandlePluginError("log", err, ev) + audit.HandlePluginError(PluginName, err, ev) } } @@ -91,3 +94,7 @@ func (b *backend) Run(stopCh <-chan struct{}) error { func (b *backend) Shutdown() { // Nothing to do here. } + +func (b *backend) String() string { + return PluginName +} diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/truncate/doc.go b/deps/k8s.io/apiserver/plugin/pkg/audit/truncate/doc.go new file mode 100644 index 000000000..3157218eb --- /dev/null +++ b/deps/k8s.io/apiserver/plugin/pkg/audit/truncate/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package truncate provides an implementation for the audit.Backend interface +// that truncates audit events and sends them to the delegate audit.Backend. +package truncate diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go b/deps/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go new file mode 100644 index 000000000..e06f1f2f0 --- /dev/null +++ b/deps/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go @@ -0,0 +1,158 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package truncate + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + auditinternal "k8s.io/apiserver/pkg/apis/audit" + "k8s.io/apiserver/pkg/audit" +) + +const ( + // PluginName is the name reported in error metrics. + PluginName = "truncate" + + // annotationKey defines the name of the annotation used to indicate truncation. + annotationKey = "audit.k8s.io/truncated" + // annotationValue defines the value of the annotation used to indicate truncation. + annotationValue = "true" +) + +// Config represents truncating backend configuration. +type Config struct { + // MaxEventSize defines max allowed size of the event. If the event is larger, + // truncating will be performed. + MaxEventSize int64 + + // MaxBatchSize defined max allowed size of the batch of events, passed to the backend. + // If the total size of the batch is larger than this number, batch will be split. Actual + // size of the serialized request might be slightly higher, on the order of hundreds of bytes. + MaxBatchSize int64 +} + +type backend struct { + // The delegate backend that actually exports events. + delegateBackend audit.Backend + + // Configuration used for truncation. + c Config + + // Encoder used to calculate audit event sizes. + e runtime.Encoder +} + +var _ audit.Backend = &backend{} + +// NewBackend returns a new truncating backend, using configuration passed in the parameters. +// Truncate backend automatically runs and shut downs the delegate backend. +func NewBackend(delegateBackend audit.Backend, config Config, groupVersion schema.GroupVersion) audit.Backend { + return &backend{ + delegateBackend: delegateBackend, + c: config, + e: audit.Codecs.LegacyCodec(groupVersion), + } +} + +func (b *backend) ProcessEvents(events ...*auditinternal.Event) { + var errors []error + var impacted []*auditinternal.Event + var batch []*auditinternal.Event + var batchSize int64 + for _, event := range events { + size, err := b.calcSize(event) + // If event was correctly serialized, but the size is more than allowed + // and it makes sense to do trimming, i.e. there's a request and/or + // response present, try to strip away request and response. + if err == nil && size > b.c.MaxEventSize && event.Level.GreaterOrEqual(auditinternal.LevelRequest) { + event = truncate(event) + size, err = b.calcSize(event) + } + if err != nil { + errors = append(errors, err) + impacted = append(impacted, event) + continue + } + if size > b.c.MaxEventSize { + errors = append(errors, fmt.Errorf("event is too large even after truncating")) + impacted = append(impacted, event) + continue + } + + if len(batch) > 0 && batchSize+size > b.c.MaxBatchSize { + b.delegateBackend.ProcessEvents(batch...) + batch = []*auditinternal.Event{} + batchSize = 0 + } + + batchSize += size + batch = append(batch, event) + } + + if len(batch) > 0 { + b.delegateBackend.ProcessEvents(batch...) + } + + if len(impacted) > 0 { + audit.HandlePluginError(PluginName, utilerrors.NewAggregate(errors), impacted...) + } +} + +// truncate removed request and response objects from the audit events, +// to try and keep at least metadata. +func truncate(e *auditinternal.Event) *auditinternal.Event { + // Make a shallow copy to avoid copying response/request objects. + newEvent := &auditinternal.Event{} + *newEvent = *e + + newEvent.RequestObject = nil + newEvent.ResponseObject = nil + audit.LogAnnotation(newEvent, annotationKey, annotationValue) + return newEvent +} + +func (b *backend) Run(stopCh <-chan struct{}) error { + return b.delegateBackend.Run(stopCh) +} + +func (b *backend) Shutdown() { + b.delegateBackend.Shutdown() +} + +func (b *backend) calcSize(e *auditinternal.Event) (int64, error) { + s := &sizer{} + if err := b.e.Encode(e, s); err != nil { + return 0, err + } + return s.Size, nil +} + +func (b *backend) String() string { + return fmt.Sprintf("%s<%s>", PluginName, b.delegateBackend) +} + +type sizer struct { + Size int64 +} + +func (s *sizer) Write(p []byte) (n int, err error) { + s.Size += int64(len(p)) + return len(p), nil +} diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/webhook/BUILD b/deps/k8s.io/apiserver/plugin/pkg/audit/webhook/BUILD deleted file mode 100644 index da2537d31..000000000 --- a/deps/k8s.io/apiserver/plugin/pkg/audit/webhook/BUILD +++ /dev/null @@ -1,62 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "webhook_test.go", - "webhook_v1alpha1_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/plugin/pkg/audit/webhook", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/github.com/stretchr/testify/require:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api/v1:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["webhook.go"], - importpath = "k8s.io/apiserver/plugin/pkg/audit/webhook", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/install:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1alpha1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/apis/audit/v1beta1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/audit:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go b/deps/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go index 247f94440..80b4842fd 100644 --- a/deps/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go +++ b/deps/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook.go @@ -18,392 +18,71 @@ limitations under the License. package webhook import ( - "errors" - "fmt" - "strings" - "sync" "time" - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/runtime" auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/apis/audit/install" - auditv1alpha1 "k8s.io/apiserver/pkg/apis/audit/v1alpha1" - auditv1beta1 "k8s.io/apiserver/pkg/apis/audit/v1beta1" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/util/webhook" "k8s.io/client-go/rest" - "k8s.io/client-go/util/flowcontrol" ) const ( - // ModeBatch indicates that the webhook should buffer audit events - // internally, sending batch updates either once a certain number of - // events have been received or a certain amount of time has passed. - ModeBatch = "batch" - // ModeBlocking causes the webhook to block on every attempt to process - // a set of events. This causes requests to the API server to wait for a - // round trip to the external audit service before sending a response. - ModeBlocking = "blocking" -) - -// AllowedModes is the modes known by this webhook. -var AllowedModes = []string{ - ModeBatch, - ModeBlocking, -} - -const ( - // Default configuration values for ModeBatch. - defaultBatchBufferSize = 10000 // Buffer up to 10000 events before starting discarding. - defaultBatchMaxSize = 400 // Only send up to 400 events at a time. - defaultBatchMaxWait = 30 * time.Second // Send events at least twice a minute. - defaultInitialBackoff = 10 * time.Second // Wait at least 10 seconds before retrying. - - defaultBatchThrottleQPS = 10 // Limit the send rate by 10 QPS. - defaultBatchThrottleBurst = 15 // Allow up to 15 QPS burst. -) - -// The plugin name reported in error metrics. -const pluginName = "webhook" - -// BatchBackendConfig represents batching webhook audit backend configuration. -type BatchBackendConfig struct { - // BufferSize defines a size of the buffering queue. - BufferSize int - // MaxBatchSize defines maximum size of a batch. - MaxBatchSize int - // MaxBatchWait defines maximum amount of time to wait for MaxBatchSize - // events to be accumulated in the buffer before forcibly sending what's - // being accumulated. - MaxBatchWait time.Duration - - // ThrottleQPS defines the allowed rate of batches per second sent to the webhook. - ThrottleQPS float32 - // ThrottleBurst defines the maximum rate of batches per second sent to the webhook in case - // the capacity defined by ThrottleQPS was not utilized. - ThrottleBurst int - - // InitialBackoff defines the amount of time to wait before retrying the requests - // to the webhook for the first time. - InitialBackoff time.Duration -} - -// NewDefaultBatchBackendConfig returns new BatchBackendConfig objects populated by default values. -func NewDefaultBatchBackendConfig() BatchBackendConfig { - return BatchBackendConfig{ - BufferSize: defaultBatchBufferSize, - MaxBatchSize: defaultBatchMaxSize, - MaxBatchWait: defaultBatchMaxWait, - - ThrottleQPS: defaultBatchThrottleQPS, - ThrottleBurst: defaultBatchThrottleBurst, - - InitialBackoff: defaultInitialBackoff, - } -} - -// NewBackend returns an audit backend that sends events over HTTP to an external service. -// The mode indicates the caching behavior of the webhook. Either blocking (ModeBlocking) -// or buffered with batch POSTs (ModeBatch). -func NewBackend(kubeConfigFile string, mode string, groupVersion schema.GroupVersion, config BatchBackendConfig) (audit.Backend, error) { - switch mode { - case ModeBatch: - return newBatchWebhook(kubeConfigFile, groupVersion, config) - case ModeBlocking: - return newBlockingWebhook(kubeConfigFile, groupVersion) - default: - return nil, fmt.Errorf("webhook mode %q is not in list of known modes (%s)", - mode, strings.Join(AllowedModes, ",")) - } -} + // PluginName is the name of this plugin, to be used in help and logs. + PluginName = "webhook" -var ( - // NOTE: Copied from other webhook implementations - // - // Can we make these passable to NewGenericWebhook? - groupFactoryRegistry = make(announced.APIGroupFactoryRegistry) - // TODO(audit): figure out a general way to let the client choose their preferred version - registry = registered.NewOrDie("") + // DefaultInitialBackoff is the default amount of time to wait before + // retrying sending audit events through a webhook. + DefaultInitialBackoff = 10 * time.Second ) func init() { - allGVs := []schema.GroupVersion{auditv1alpha1.SchemeGroupVersion, auditv1beta1.SchemeGroupVersion} - registry.RegisterVersions(allGVs) - if err := registry.EnableVersions(allGVs...); err != nil { - panic(fmt.Sprintf("failed to enable version %v", allGVs)) - } - install.Install(groupFactoryRegistry, registry, audit.Scheme) + install.Install(audit.Scheme) } func loadWebhook(configFile string, groupVersion schema.GroupVersion, initialBackoff time.Duration) (*webhook.GenericWebhook, error) { - return webhook.NewGenericWebhook(registry, audit.Codecs, configFile, + return webhook.NewGenericWebhook(audit.Scheme, audit.Codecs, configFile, []schema.GroupVersion{groupVersion}, initialBackoff) } -func newBlockingWebhook(configFile string, groupVersion schema.GroupVersion) (*blockingBackend, error) { - w, err := loadWebhook(configFile, groupVersion, defaultInitialBackoff) +type backend struct { + w *webhook.GenericWebhook +} + +// NewBackend returns an audit backend that sends events over HTTP to an external service. +func NewBackend(kubeConfigFile string, groupVersion schema.GroupVersion, initialBackoff time.Duration) (audit.Backend, error) { + w, err := loadWebhook(kubeConfigFile, groupVersion, initialBackoff) if err != nil { return nil, err } - return &blockingBackend{w}, nil + return &backend{w}, nil } -type blockingBackend struct { - w *webhook.GenericWebhook -} - -func (b *blockingBackend) Run(stopCh <-chan struct{}) error { +func (b *backend) Run(stopCh <-chan struct{}) error { return nil } -func (b *blockingBackend) Shutdown() { +func (b *backend) Shutdown() { // nothing to do here } -func (b *blockingBackend) ProcessEvents(ev ...*auditinternal.Event) { +func (b *backend) ProcessEvents(ev ...*auditinternal.Event) { if err := b.processEvents(ev...); err != nil { - audit.HandlePluginError(pluginName, err, ev...) + audit.HandlePluginError(PluginName, err, ev...) } } -func (b *blockingBackend) processEvents(ev ...*auditinternal.Event) error { +func (b *backend) processEvents(ev ...*auditinternal.Event) error { var list auditinternal.EventList for _, e := range ev { list.Items = append(list.Items, *e) } - // NOTE: No exponential backoff because this is the blocking webhook - // mode. Any attempts to retry will block API server requests. - return b.w.RestClient.Post().Body(&list).Do().Error() -} - -func newBatchWebhook(configFile string, groupVersion schema.GroupVersion, config BatchBackendConfig) (*batchBackend, error) { - w, err := loadWebhook(configFile, groupVersion, config.InitialBackoff) - if err != nil { - return nil, err - } - - return &batchBackend{ - w: w, - buffer: make(chan *auditinternal.Event, config.BufferSize), - maxBatchSize: config.MaxBatchSize, - maxBatchWait: config.MaxBatchWait, - shutdownCh: make(chan struct{}), - throttle: flowcontrol.NewTokenBucketRateLimiter(config.ThrottleQPS, config.ThrottleBurst), - }, nil -} - -type batchBackend struct { - w *webhook.GenericWebhook - - // Channel to buffer events in memory before sending them on the webhook. - buffer chan *auditinternal.Event - // Maximum number of events that can be sent at once. - maxBatchSize int - // Amount of time to wait after sending events before force sending another set. - // - // Receiving maxBatchSize events will always trigger a send, regardless of - // if this amount of time has been reached. - maxBatchWait time.Duration - - // Channel to signal that the sending routine has stopped and therefore - // it's safe to assume that no new requests will be initiated. - shutdownCh chan struct{} - - // The sending routine locks reqMutex for reading before initiating a new - // goroutine to send a request. This goroutine then unlocks reqMutex for - // reading when completed. The Shutdown method locks reqMutex for writing - // after the sending routine has exited. When reqMutex is locked for writing, - // all requests have been completed and no new will be spawned, since the - // sending routine is not running anymore. - reqMutex sync.RWMutex - - // Limits the number of requests sent to the backend per second. - throttle flowcontrol.RateLimiter -} - -func (b *batchBackend) Run(stopCh <-chan struct{}) error { - go func() { - // Signal that the sending routine has exited. - defer close(b.shutdownCh) - - b.runSendingRoutine(stopCh) - - // Handle the events that were received after the last buffer - // scraping and before this line. Since the buffer is closed, no new - // events will come through. - for { - if last := func() bool { - // Recover from any panic in order to try to send all remaining events. - // Note, that in case of a panic, the return value will be false and - // the loop execution will continue. - defer runtime.HandleCrash() - - events := b.collectLastEvents() - b.sendBatchEvents(events) - return len(events) == 0 - }(); last { - break - } - } - }() - return nil -} - -func (b *batchBackend) Shutdown() { - <-b.shutdownCh - - // Write locking reqMutex will guarantee that all requests will be completed - // by the time the goroutine continues the execution. Since this line is - // executed after shutdownCh was closed, no new requests will follow this - // lock, because read lock is called in the same goroutine that closes - // shutdownCh before exiting. - b.reqMutex.Lock() - b.reqMutex.Unlock() -} - -// runSendingRoutine runs a loop that collects events from the buffer. When -// stopCh is closed, runSendingRoutine stops and closes the buffer. -func (b *batchBackend) runSendingRoutine(stopCh <-chan struct{}) { - defer close(b.buffer) - - for { - func() { - // Recover from any panics caused by this function so a panic in the - // goroutine can't bring down the main routine. - defer runtime.HandleCrash() - - t := time.NewTimer(b.maxBatchWait) - defer t.Stop() // Release ticker resources - - b.sendBatchEvents(b.collectEvents(stopCh, t.C)) - }() - - select { - case <-stopCh: - return - default: - } - } -} - -// collectEvents attempts to collect some number of events in a batch. -// -// The following things can cause collectEvents to stop and return the list -// of events: -// -// * Some maximum number of events are received. -// * Timer has passed, all queued events are sent. -// * StopCh is closed, all queued events are sent. -// -func (b *batchBackend) collectEvents(stopCh <-chan struct{}, timer <-chan time.Time) []auditinternal.Event { - var events []auditinternal.Event - -L: - for i := 0; i < b.maxBatchSize; i++ { - select { - case ev, ok := <-b.buffer: - // Buffer channel was closed and no new events will follow. - if !ok { - break L - } - events = append(events, *ev) - case <-timer: - // Timer has expired. Send whatever events are in the queue. - break L - case <-stopCh: - // Webhook has shut down. Send the last events. - break L - } - } - - return events -} - -// collectLastEvents assumes that the buffer was closed. It collects the first -// maxBatchSize events from the closed buffer into a batch and returns them. -func (b *batchBackend) collectLastEvents() []auditinternal.Event { - var events []auditinternal.Event - - for i := 0; i < b.maxBatchSize; i++ { - ev, ok := <-b.buffer - if !ok { - break - } - events = append(events, *ev) - } - - return events -} - -// sendBatchEvents sends a POST requests with the event list in a goroutine -// and logs any error encountered. -func (b *batchBackend) sendBatchEvents(events []auditinternal.Event) { - if len(events) == 0 { - return - } - - list := auditinternal.EventList{Items: events} - - if b.throttle != nil { - b.throttle.Accept() - } - - // Locking reqMutex for read will guarantee that the shutdown process will - // block until the goroutine started below is finished. At the same time, it - // will not prevent other batches from being proceed further this point. - b.reqMutex.RLock() - go func() { - // Execute the webhook POST in a goroutine to keep it from blocking. - // This lets the webhook continue to drain the queue immediately. - - defer b.reqMutex.RUnlock() - defer runtime.HandleCrash() - - err := b.w.WithExponentialBackoff(func() rest.Result { - return b.w.RestClient.Post().Body(&list).Do() - }).Error() - if err != nil { - impacted := make([]*auditinternal.Event, len(events)) - for i := range events { - impacted[i] = &events[i] - } - audit.HandlePluginError(pluginName, err, impacted...) - } - }() - return + return b.w.WithExponentialBackoff(func() rest.Result { + return b.w.RestClient.Post().Body(&list).Do() + }).Error() } -func (b *batchBackend) ProcessEvents(ev ...*auditinternal.Event) { - for i, e := range ev { - // Per the audit.Backend interface these events are reused after being - // sent to the Sink. Deep copy and send the copy to the queue. - event := e.DeepCopy() - - // The following mechanism is in place to support the situation when audit - // events are still coming after the backend was shut down. - var sendErr error - func() { - // If the backend was shut down and the buffer channel was closed, an - // attempt to add an event to it will result in panic that we should - // recover from. - defer func() { - if err := recover(); err != nil { - sendErr = errors.New("audit webhook shut down") - } - }() - - select { - case b.buffer <- event: - default: - sendErr = errors.New("audit webhook queue blocked") - } - }() - if sendErr != nil { - audit.HandlePluginError(pluginName, sendErr, ev[i:]...) - return - } - } +func (b *backend) String() string { + return PluginName } diff --git a/deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD b/deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD deleted file mode 100644 index be598daa9..000000000 --- a/deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/BUILD +++ /dev/null @@ -1,53 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "certs_test.go", - "webhook_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/plugin/pkg/authenticator/token/webhook", - deps = [ - "//vendor/k8s.io/api/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api/v1:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["webhook.go"], - importpath = "k8s.io/apiserver/plugin/pkg/authenticator/token/webhook", - deps = [ - "//vendor/k8s.io/api/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/cache:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/authenticator:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go b/deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go index b1f6420ea..feb55f91d 100644 --- a/deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go +++ b/deps/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook.go @@ -18,11 +18,12 @@ limitations under the License. package webhook import ( - "fmt" "time" + "github.com/golang/glog" + authentication "k8s.io/api/authentication/v1beta1" - "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/cache" "k8s.io/apiserver/pkg/authentication/authenticator" @@ -84,6 +85,8 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(token string) (user.Info, return err }) if err != nil { + // An error here indicates bad configuration or an outage. Log for debugging. + glog.Errorf("Failed to make webhook authenticator request: %v", err) return nil, false, err } r.Status = result.Status @@ -109,24 +112,19 @@ func (w *WebhookTokenAuthenticator) AuthenticateToken(token string) (user.Info, }, true, nil } -// NOTE: client-go doesn't provide a registry. client-go does registers the -// authentication/v1beta1. We construct a registry that acknowledges -// authentication/v1beta1 as an enabled version to pass a check enforced in -// NewGenericWebhook. -var registry = registered.NewOrDie("") - -func init() { - registry.RegisterVersions(groupVersions) - if err := registry.EnableVersions(groupVersions...); err != nil { - panic(fmt.Sprintf("failed to enable version %v", groupVersions)) - } -} - // tokenReviewInterfaceFromKubeconfig builds a client from the specified kubeconfig file, // and returns a TokenReviewInterface that uses that client. Note that the client submits TokenReview // requests to the exact path specified in the kubeconfig file, so arbitrary non-API servers can be targeted. func tokenReviewInterfaceFromKubeconfig(kubeConfigFile string) (authenticationclient.TokenReviewInterface, error) { - gw, err := webhook.NewGenericWebhook(registry, scheme.Codecs, kubeConfigFile, groupVersions, 0) + localScheme := runtime.NewScheme() + if err := scheme.AddToScheme(localScheme); err != nil { + return nil, err + } + if err := localScheme.SetVersionPriority(groupVersions...); err != nil { + return nil, err + } + + gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, kubeConfigFile, groupVersions, 0) if err != nil { return nil, err } diff --git a/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD b/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD deleted file mode 100644 index 2cee86fd3..000000000 --- a/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/BUILD +++ /dev/null @@ -1,56 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "certs_test.go", - "webhook_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/apiserver/plugin/pkg/authorizer/webhook", - deps = [ - "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api/v1:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["webhook.go"], - importpath = "k8s.io/apiserver/plugin/pkg/authorizer/webhook", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/cache:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authentication/user:go_default_library", - "//vendor/k8s.io/apiserver/pkg/authorization/authorizer:go_default_library", - "//vendor/k8s.io/apiserver/pkg/util/webhook:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/gencerts.sh b/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/gencerts.sh index 8d7896fa5..1e5fb1fd5 100755 --- a/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/gencerts.sh +++ b/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/gencerts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Kubernetes Authors. # diff --git a/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go b/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go index d00e65be5..03b7bda32 100644 --- a/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go +++ b/deps/k8s.io/apiserver/plugin/pkg/authorizer/webhook/webhook.go @@ -25,7 +25,7 @@ import ( "github.com/golang/glog" authorization "k8s.io/api/authorization/v1beta1" - "k8s.io/apimachinery/pkg/apimachinery/registered" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/cache" "k8s.io/apiserver/pkg/authentication/user" @@ -234,24 +234,19 @@ func convertToSARExtra(extra map[string][]string) map[string]authorization.Extra return ret } -// NOTE: client-go doesn't provide a registry. client-go does registers the -// authorization/v1beta1. We construct a registry that acknowledges -// authorization/v1beta1 as an enabled version to pass a check enforced in -// NewGenericWebhook. -var registry = registered.NewOrDie("") - -func init() { - registry.RegisterVersions(groupVersions) - if err := registry.EnableVersions(groupVersions...); err != nil { - panic(fmt.Sprintf("failed to enable version %v", groupVersions)) - } -} - // subjectAccessReviewInterfaceFromKubeconfig builds a client from the specified kubeconfig file, // and returns a SubjectAccessReviewInterface that uses that client. Note that the client submits SubjectAccessReview // requests to the exact path specified in the kubeconfig file, so arbitrary non-API servers can be targeted. func subjectAccessReviewInterfaceFromKubeconfig(kubeConfigFile string) (authorizationclient.SubjectAccessReviewInterface, error) { - gw, err := webhook.NewGenericWebhook(registry, scheme.Codecs, kubeConfigFile, groupVersions, 0) + localScheme := runtime.NewScheme() + if err := scheme.AddToScheme(localScheme); err != nil { + return nil, err + } + if err := localScheme.SetVersionPriority(groupVersions...); err != nil { + return nil, err + } + + gw, err := webhook.NewGenericWebhook(localScheme, scheme.Codecs, kubeConfigFile, groupVersions, 0) if err != nil { return nil, err } diff --git a/deps/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md b/deps/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md index e559c074b..6aed9889c 100644 --- a/deps/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md +++ b/deps/k8s.io/client-go/.github/PULL_REQUEST_TEMPLATE.md @@ -1,2 +1,3 @@ -Sorry, we do not accept changes directly against this repository. Please see -CONTRIBUTING.md for information on where and how to contribute instead. +Sorry, we do not accept changes directly against this repository, unless the +change is to the `README.md` itself. Please see +`CONTRIBUTING.md` for information on where and how to contribute instead. diff --git a/deps/k8s.io/client-go/CHANGELOG.md b/deps/k8s.io/client-go/CHANGELOG.md index bfa8a453d..7e556dd29 100644 --- a/deps/k8s.io/client-go/CHANGELOG.md +++ b/deps/k8s.io/client-go/CHANGELOG.md @@ -1,10 +1,293 @@ TODO: This document was manually maintained so might be incomplete. The automation effort is tracked in -https://github.com/kubernetes/client-go/issues/234. +https://github.com/kubernetes/test-infra/issues/5843. Changes in `k8s.io/api` and `k8s.io/apimachinery` are mentioned here because `k8s.io/client-go` depends on them. +# v8.0.0 + +**Breaking Changes:** + +* `KUBE_API_VERSIONS` has been removed. + + * [https://github.com/kubernetes/kubernetes/pull/63165](https://github.com/kubernetes/kubernetes/pull/63165) + +* The client-go/discovery `RESTMapper` has been moved to client-go/restmapper. + + * [https://github.com/kubernetes/kubernetes/pull/63507](https://github.com/kubernetes/kubernetes/pull/63507) + +* `CachedDiscoveryClient` has been moved from kubectl to client-go. + + * [https://github.com/kubernetes/kubernetes/pull/63550](https://github.com/kubernetes/kubernetes/pull/63550) + +* The `EventRecorder` interface is changed to include an `AnnotatedEventf` method, which can add annotations to an event. + + * [https://github.com/kubernetes/kubernetes/pull/64213](https://github.com/kubernetes/kubernetes/pull/64213) + +* [k8s.io/apimachinery] The deprecated `RepairMalformedUpdates` flag has been removed. + + * [https://github.com/kubernetes/kubernetes/pull/61455](https://github.com/kubernetes/kubernetes/pull/61455) + +**New Features:** + +* A new easy-to-use dynamic client is added and the old dynamic client is now deprecated. + + * [https://github.com/kubernetes/kubernetes/pull/62913](https://github.com/kubernetes/kubernetes/pull/62913) + +* client-go and kubectl now detect and report an error on duplicated name for user, cluster and context, while loading the kubeconfig. + + * [https://github.com/kubernetes/kubernetes/pull/60464](https://github.com/kubernetes/kubernetes/pull/60464) + +* The informer code-generator now allows specifying a custom resync period for certain informer types and uses the default resync period if none is specified. + + * [https://github.com/kubernetes/kubernetes/pull/61400](https://github.com/kubernetes/kubernetes/pull/61400) + +* Exec authenticator plugin now supports TLS client certificates. + + * [https://github.com/kubernetes/kubernetes/pull/61803](https://github.com/kubernetes/kubernetes/pull/61803) + +* The discovery client now has a default request timeout of 32 seconds. + + * [https://github.com/kubernetes/kubernetes/pull/62733](https://github.com/kubernetes/kubernetes/pull/62733) + +* The OpenStack auth config from is now read from the client config. If the client config is not available, it falls back to reading from the environment variables. + + * [https://github.com/kubernetes/kubernetes/pull/60200](https://github.com/kubernetes/kubernetes/pull/60200) + +* The in-tree support for openstack credentials is now deprecated. Please use the `client-keystone-auth` from the cloud-provider-openstack repository. Details on how to use this new capability is documented [here](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/using-client-keystone-auth.md) + + * [https://github.com/kubernetes/kubernetes/pull/64346](https://github.com/kubernetes/kubernetes/pull/64346) + +**Bug fixes and Improvements:** + +* 406 mime-type errors are now tolerated while attempting to load new openapi schema. This improves compatibility with older servers when creating/updating API objects. + + * [https://github.com/kubernetes/kubernetes/pull/61949](https://github.com/kubernetes/kubernetes/pull/61949) + +* Removes the generated `DeleteCollection()` method for `Services` since the API does not support it. + + * [https://github.com/kubernetes/kubernetes/pull/63861](https://github.com/kubernetes/kubernetes/pull/63861) + +* Event object references with apiversion now report an apiversion, instead of just the group. + + * [https://github.com/kubernetes/kubernetes/pull/63913](https://github.com/kubernetes/kubernetes/pull/63913) + + [https://github.com/kubernetes/kubernetes/pull/62462](https://github.com/kubernetes/kubernetes/pull/62462) + +* [k8s.io/apimachinery] `runtime.Unstructured.UnstructuredContent()` no longer mutates the source while returning the contents. + + * [https://github.com/kubernetes/kubernetes/pull/62063](https://github.com/kubernetes/kubernetes/pull/62063) + +* [k8s.io/apimachinery] Incomplete support for `uint64` is now removed. This fixes a panic encountered while using `DeepCopyJSON` with `uint64`. + + * [https://github.com/kubernetes/kubernetes/pull/62981](https://github.com/kubernetes/kubernetes/pull/62981) + +* [k8s.io/apimachinery] API server can now parse `propagationPolicy` when it sent as a query parameter sent with a delete request. + + * [https://github.com/kubernetes/kubernetes/pull/63414](https://github.com/kubernetes/kubernetes/pull/63414) + +* [k8s.io/apimachinery] APIServices with kube-like versions (e.g. v1, v2beta1, etc.) will be sorted appropriately within each group. + + * [https://github.com/kubernetes/kubernetes/pull/64004](https://github.com/kubernetes/kubernetes/pull/64004) + +* [k8s.io/apimachinery] `int64` is the only allowed integer for printers. + + * [https://github.com/kubernetes/kubernetes/pull/64639](https://github.com/kubernetes/kubernetes/pull/64639) + +## API changes + +**Breaking Changes:** + +* Support for `alpha.kubernetes.io/nvidia-gpu` resource which was deprecated in 1.10 is removed. Please use the resource exposed by `DevicePlugins` instead (`nvidia.com/gpu`). + + * [https://github.com/kubernetes/kubernetes/pull/61498](https://github.com/kubernetes/kubernetes/pull/61498) + +* Alpha annotation for `PersistentVolume` node affinity has been removed. Update your `PersistentVolume`s to use the beta `PersistentVolume.nodeAffinity` field before upgrading. + + * [https://github.com/kubernetes/kubernetes/pull/61816](https://github.com/kubernetes/kubernetes/pull/61816) + +* `ObjectMeta ` `ListOptions` `DeleteOptions` are removed from the core api group. Please use the ones in `meta/v1` instead. + + * [https://github.com/kubernetes/kubernetes/pull/61809](https://github.com/kubernetes/kubernetes/pull/61809) + +* `ExternalID` in `NodeSpec` is deprecated. The externalID of the node is no longer set in the Node spec. + + * [https://github.com/kubernetes/kubernetes/pull/61877](https://github.com/kubernetes/kubernetes/pull/61877) + +* PSP-related types in the `extensions/v1beta1` API group are now deprecated. It is suggested to use the `policy/v1beta1` API group instead. + + * [https://github.com/kubernetes/kubernetes/pull/61777](https://github.com/kubernetes/kubernetes/pull/61777) + +**New Features:** + +* `PodSecurityPolicy` now supports restricting hostPath volume mounts to be readOnly and under specific path prefixes. + + * [https://github.com/kubernetes/kubernetes/pull/58647](https://github.com/kubernetes/kubernetes/pull/58647) + +* `Node.Spec.ConfigSource.ConfigMap.KubeletConfigKey` must be specified when using dynamic Kubelet config to tell the Kubelet which key of the `ConfigMap` identifies its config file. + + * [https://github.com/kubernetes/kubernetes/pull/59847](https://github.com/kubernetes/kubernetes/pull/59847) + +* `serverAddressByClientCIDRs` in `meta/v1` APIGroup is now optional. + + * [https://github.com/kubernetes/kubernetes/pull/61963](https://github.com/kubernetes/kubernetes/pull/61963) + +* A new field `MatchFields` is added to `NodeSelectorTerm`. Currently, it only supports `metadata.name`. + + * [https://github.com/kubernetes/kubernetes/pull/62002](https://github.com/kubernetes/kubernetes/pull/62002) + +* The `PriorityClass` API is promoted to `scheduling.k8s.io/v1beta1`. + + * [https://github.com/kubernetes/kubernetes/pull/63100](https://github.com/kubernetes/kubernetes/pull/63100) + +* The status of dynamic Kubelet config is now reported via `Node.Status.Config`, rather than the `KubeletConfigOk` node condition. + + * [https://github.com/kubernetes/kubernetes/pull/63314](https://github.com/kubernetes/kubernetes/pull/63314) + +* The `GitRepo` volume type is deprecated. To provision a container with a git repo, mount an `EmptyDir` into an `InitContainer` that clones the repo using git, then mount the `EmptyDir` into the Pod's container. + + * [https://github.com/kubernetes/kubernetes/pull/63445](https://github.com/kubernetes/kubernetes/pull/63445) + +* The Sysctls experimental feature has been promoted to beta (enabled by default via the `Sysctls` feature flag). `PodSecurityPolicy` and `Pod` objects now have fields for specifying and controlling sysctls. Alpha sysctl annotations will be ignored by 1.11+ kubelets. All alpha sysctl annotations in existing deployments must be converted to API fields to be effective. + + * [https://github.com/kubernetes/kubernetes/pull/63717](https://github.com/kubernetes/kubernetes/pull/63717) + +* The annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints` is deprecated. Users should use `Service.spec.publishNotReadyAddresses` instead. + + * [https://github.com/kubernetes/kubernetes/pull/63742](https://github.com/kubernetes/kubernetes/pull/63742) + +* `VerticalPodAutoscaler` has been added to `autoscaling/v1` API group. + + * [https://github.com/kubernetes/kubernetes/pull/63797](https://github.com/kubernetes/kubernetes/pull/63797) + +* Alpha support is added for dynamic volume limits based on node type. + + * [https://github.com/kubernetes/kubernetes/pull/64154](https://github.com/kubernetes/kubernetes/pull/64154) + +* `ContainersReady` condition is added to the Pod status. + + * [https://github.com/kubernetes/kubernetes/pull/64646](https://github.com/kubernetes/kubernetes/pull/64646) + +**Bug fixes and Improvements:** + +* Default mount propagation has changed from `HostToContainer` (`rslave` in Linux terminology) to `None` (`private`) to match the behavior in 1.9 and earlier releases. `HostToContainer` as a default caused regressions in some pods. + + * [https://github.com/kubernetes/kubernetes/pull/62462](https://github.com/kubernetes/kubernetes/pull/62462) + +# v7.0.0 + +**Breaking Changes:** + +* Google Cloud Service Account email addresses can now be used in RBAC Role bindings since the default scopes now include the `userinfo.email` scope. This is a breaking change if the numeric uniqueIDs of the Google service accounts were being used in RBAC role bindings. The behavior can be overridden by explicitly specifying the scope values as comma-separated string in the `users[*].config.scopes` field in the `KUBECONFIG` file. + + * [https://github.com/kubernetes/kubernetes/pull/58141](https://github.com/kubernetes/kubernetes/pull/58141) + +* [k8s.io/api] The `ConfigOK` node condition has been renamed to `KubeletConfigOk`. + + * [https://github.com/kubernetes/kubernetes/pull/59905](https://github.com/kubernetes/kubernetes/pull/59905) + +**New Features:** + +* Subresource support is added to the dynamic client. + + * [https://github.com/kubernetes/kubernetes/pull/56717](https://github.com/kubernetes/kubernetes/pull/56717) + +* A watch method is added to the Fake Client. + + * [https://github.com/kubernetes/kubernetes/pull/57504](https://github.com/kubernetes/kubernetes/pull/57504) + +* `ListOptions` can be modified when creating a `ListWatch`. + + * [https://github.com/kubernetes/kubernetes/pull/57508](https://github.com/kubernetes/kubernetes/pull/57508) + +* A `/token` subresource for ServiceAccount is added. + + * [https://github.com/kubernetes/kubernetes/pull/58111](https://github.com/kubernetes/kubernetes/pull/58111) + +* If an informer delivery fails, the particular notification is skipped and continued the next time. + + * [https://github.com/kubernetes/kubernetes/pull/58394](https://github.com/kubernetes/kubernetes/pull/58394) + +* Certificate manager will no longer wait until the initial rotation succeeds or fails before returning from `Start()`. + + * [https://github.com/kubernetes/kubernetes/pull/58930](https://github.com/kubernetes/kubernetes/pull/58930) + +* [k8s.io/api] `VolumeScheduling` and `LocalPersistentVolume` features are beta and enabled by default. The PersistentVolume NodeAffinity alpha annotation is deprecated and will be removed in a future release. + + * [https://github.com/kubernetes/kubernetes/pull/59391](https://github.com/kubernetes/kubernetes/pull/59391) + +* [k8s.io/api] The `PodSecurityPolicy` API has been moved to the `policy/v1beta1` API group. The `PodSecurityPolicy` API in the `extensions/v1beta1` API group is deprecated and will be removed in a future release. + + * [https://github.com/kubernetes/kubernetes/pull/54933](https://github.com/kubernetes/kubernetes/pull/54933) + +* [k8s.io/api] ConfigMap objects now support binary data via a new `binaryData` field. + + * [https://github.com/kubernetes/kubernetes/pull/57938](https://github.com/kubernetes/kubernetes/pull/57938) + +* [k8s.io/api] Service account TokenRequest API is added. + + * [https://github.com/kubernetes/kubernetes/pull/58027](https://github.com/kubernetes/kubernetes/pull/58027) + +* [k8s.io/api] FSType is added in CSI volume source to specify filesystems. + + * [https://github.com/kubernetes/kubernetes/pull/58209](https://github.com/kubernetes/kubernetes/pull/58209) + +* [k8s.io/api] v1beta1 VolumeAttachment API is added. + + * [https://github.com/kubernetes/kubernetes/pull/58462](https://github.com/kubernetes/kubernetes/pull/58462) + +* [k8s.io/api] `v1.Pod` now has a field `ShareProcessNamespace` to configure whether a single process namespace should be shared between all containers in a pod. This feature is in alpha preview. + + * [https://github.com/kubernetes/kubernetes/pull/58716](https://github.com/kubernetes/kubernetes/pull/58716) + +* [k8s.io/api] Add `NominatedNodeName` field to `PodStatus`. This field is set when a pod preempts other pods on the node. + + * [https://github.com/kubernetes/kubernetes/pull/58990](https://github.com/kubernetes/kubernetes/pull/58990) + +* [k8s.io/api] Promote `CSIPersistentVolumeSourc`e to beta. + + * [https://github.com/kubernetes/kubernetes/pull/59157](https://github.com/kubernetes/kubernetes/pull/59157) + +* [k8s.io/api] Promote `DNSPolicy` and `DNSConfig` in `PodSpec` to beta. + + * [https://github.com/kubernetes/kubernetes/pull/59771](https://github.com/kubernetes/kubernetes/pull/59771) + +* [k8s.io/api] External metric types are added to the HPA API. + + * [https://github.com/kubernetes/kubernetes/pull/60096](https://github.com/kubernetes/kubernetes/pull/60096) + +* [k8s.io/apimachinery] The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`. Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`. Older servers will ignore this representation or return an error if it is not available. Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response. + + * [https://github.com/kubernetes/kubernetes/pull/59059](https://github.com/kubernetes/kubernetes/pull/59059) + + +**Bug fixes and Improvements:** + +* Port-forwarding of TCP6 ports is fixed. + + * [https://github.com/kubernetes/kubernetes/pull/57457](https://github.com/kubernetes/kubernetes/pull/57457) + +* A race condition in SharedInformer that could violate the sequential delivery guarantee and cause panics on shutdown is fixed. + + * [https://github.com/kubernetes/kubernetes/pull/59828](https://github.com/kubernetes/kubernetes/pull/59828) + +* [k8s.io/api] PersistentVolume flexVolume sources can now reference secrets in a namespace other than the PersistentVolumeClaim's namespace. + + * [https://github.com/kubernetes/kubernetes/pull/56460](https://github.com/kubernetes/kubernetes/pull/56460) + +* [k8s.io/apimachinery] YAMLDecoder Read can now return the number of bytes read. + + * [https://github.com/kubernetes/kubernetes/pull/57000](https://github.com/kubernetes/kubernetes/pull/57000) + +* [k8s.io/apimachinery] YAMLDecoder Read now tracks rest of buffer on `io.ErrShortBuffer`. + + * [https://github.com/kubernetes/kubernetes/pull/58817](https://github.com/kubernetes/kubernetes/pull/58817) + +* [k8s.io/apimachinery] Prompt required merge key in the error message while applying a strategic merge patch. + + * [https://github.com/kubernetes/kubernetes/pull/57854](https://github.com/kubernetes/kubernetes/pull/57854) + # v6.0.0 **Breaking Changes:** diff --git a/deps/k8s.io/client-go/CONTRIBUTING.md b/deps/k8s.io/client-go/CONTRIBUTING.md index b01f8abb0..a85350aae 100644 --- a/deps/k8s.io/client-go/CONTRIBUTING.md +++ b/deps/k8s.io/client-go/CONTRIBUTING.md @@ -1,6 +1,8 @@ # Contributing guidelines -Do not open pull requests directly against this repository, they will be ignored. Instead, please open pull requests against [kubernetes/kubernetes](https://git.k8s.io/kubernetes/). Please follow the same [contributing guide](https://git.k8s.io/kubernetes/CONTRIBUTING.md) you would follow for any other pull request made to kubernetes/kubernetes. +Do not open pull requests directly against this repository. They will be ignored. Instead, please open pull requests against [kubernetes/kubernetes](https://git.k8s.io/kubernetes/). +The exception is changes to the `README.md` itself. +Please follow the same [contributing guide](https://git.k8s.io/kubernetes/CONTRIBUTING.md) you would follow for any other pull request made to kubernetes/kubernetes. This repository is published from [kubernetes/kubernetes/staging/src/k8s.io/client-go](https://git.k8s.io/kubernetes/staging/src/k8s.io/client-go) by the [kubernetes publishing-bot](https://git.k8s.io/publishing-bot). diff --git a/deps/k8s.io/client-go/Godeps/Godeps.json b/deps/k8s.io/client-go/Godeps/Godeps.json index 904edc04c..80a811a1b 100644 --- a/deps/k8s.io/client-go/Godeps/Godeps.json +++ b/deps/k8s.io/client-go/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/client-go", - "GoVersion": "go1.9", - "GodepVersion": "v79", + "GoVersion": "go1.10", + "GodepVersion": "v80", "Packages": [ "./..." ], @@ -16,51 +16,23 @@ }, { "ImportPath": "github.com/Azure/go-autorest/autorest", - "Rev": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab" + "Rev": "bca49d5b51a50dc5bb17bbf6204c711c6dbded06" }, { "ImportPath": "github.com/Azure/go-autorest/autorest/adal", - "Rev": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab" + "Rev": "bca49d5b51a50dc5bb17bbf6204c711c6dbded06" }, { "ImportPath": "github.com/Azure/go-autorest/autorest/azure", - "Rev": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab" + "Rev": "bca49d5b51a50dc5bb17bbf6204c711c6dbded06" }, { "ImportPath": "github.com/Azure/go-autorest/autorest/date", - "Rev": "d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab" + "Rev": "bca49d5b51a50dc5bb17bbf6204c711c6dbded06" }, { - "ImportPath": "github.com/coreos/go-oidc/http", - "Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f" - }, - { - "ImportPath": "github.com/coreos/go-oidc/jose", - "Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f" - }, - { - "ImportPath": "github.com/coreos/go-oidc/key", - "Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f" - }, - { - "ImportPath": "github.com/coreos/go-oidc/oauth2", - "Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f" - }, - { - "ImportPath": "github.com/coreos/go-oidc/oidc", - "Rev": "a4973d9a4225417aecf5d450a9522f00c1f7130f" - }, - { - "ImportPath": "github.com/coreos/pkg/health", - "Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8" - }, - { - "ImportPath": "github.com/coreos/pkg/httputil", - "Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8" - }, - { - "ImportPath": "github.com/coreos/pkg/timeutil", - "Rev": "fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8" + "ImportPath": "github.com/Azure/go-autorest/version", + "Rev": "bca49d5b51a50dc5bb17bbf6204c711c6dbded06" }, { "ImportPath": "github.com/davecgh/go-spew/spew", @@ -100,23 +72,27 @@ }, { "ImportPath": "github.com/golang/protobuf/proto", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/any", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/duration", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" }, { "ImportPath": "github.com/golang/protobuf/ptypes/timestamp", - "Rev": "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + "Rev": "b4deda0973fb4c70b50d226b1af49f3da59f5265" + }, + { + "ImportPath": "github.com/google/btree", + "Rev": "7d79101e329e5a3adf994758c578dab82b90c017" }, { "ImportPath": "github.com/google/gofuzz", @@ -136,31 +112,39 @@ }, { "ImportPath": "github.com/gophercloud/gophercloud", - "Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97" + "Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack", - "Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97" + "Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tenants", - "Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97" + "Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v2/tokens", - "Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97" + "Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/identity/v3/tokens", - "Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97" + "Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d" }, { "ImportPath": "github.com/gophercloud/gophercloud/openstack/utils", - "Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97" + "Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d" }, { "ImportPath": "github.com/gophercloud/gophercloud/pagination", - "Rev": "8e59687aa4b27ab22a0bf3295f1e165ff7bd5f97" + "Rev": "781450b3c4fcb4f5182bcc5133adb4b2e4a09d1d" + }, + { + "ImportPath": "github.com/gregjones/httpcache", + "Rev": "787624de3eb7bd915c329cba748687a3b22666a6" + }, + { + "ImportPath": "github.com/gregjones/httpcache/diskcache", + "Rev": "787624de3eb7bd915c329cba748687a3b22666a6" }, { "ImportPath": "github.com/hashicorp/golang-lru", @@ -171,20 +155,24 @@ "Rev": "a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4" }, { - "ImportPath": "github.com/howeyc/gopass", - "Rev": "bf9dde6d0d2c004a008c27aaee91170c786f6db8" + "ImportPath": "github.com/imdario/mergo", + "Rev": "9316a62528ac99aaecb4e47eadd6dc8aa6533d58" }, { - "ImportPath": "github.com/imdario/mergo", - "Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc" + "ImportPath": "github.com/json-iterator/go", + "Rev": "f2b4162afba35581b6d4a50d3b8f34e33c144682" }, { - "ImportPath": "github.com/jonboulle/clockwork", - "Rev": "72f9bd7c4e0c2a40055ab3d0f09654f730cce982" + "ImportPath": "github.com/modern-go/concurrent", + "Rev": "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" }, { - "ImportPath": "github.com/json-iterator/go", - "Rev": "13f86432b882000a51c6e610c620974462691a97" + "ImportPath": "github.com/modern-go/reflect2", + "Rev": "05fbef0ca5da472bbf96c9322b84a53edc03c9fd" + }, + { + "ImportPath": "github.com/peterbourgon/diskv", + "Rev": "5f041e8faa004a95c88a202771f4cc3e991971e6" }, { "ImportPath": "github.com/pmezard/go-difflib/difflib", @@ -192,15 +180,15 @@ }, { "ImportPath": "github.com/spf13/pflag", - "Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea" + "Rev": "583c0c0531f06d5278b7d917446061adc344b5cd" }, { "ImportPath": "github.com/stretchr/testify/assert", - "Rev": "f6abca593680b2315d2075e0f5e2a9751e3f431a" + "Rev": "c679ae2cc0cb27ec3293fea7e254e47386f05d69" }, { "ImportPath": "golang.org/x/crypto/ssh/terminal", - "Rev": "81e90905daefcd6fd217b62423c0908922eadb30" + "Rev": "de0752318171da717af4ce24d0a2e8626afaeb11" }, { "ImportPath": "golang.org/x/net/context", @@ -284,335 +272,335 @@ }, { "ImportPath": "k8s.io/api/admissionregistration/v1alpha1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/admissionregistration/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/apps/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/apps/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/apps/v1beta2", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/authentication/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/authentication/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/authorization/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/authorization/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/autoscaling/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/autoscaling/v2beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/batch/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/batch/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/batch/v2alpha1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/certificates/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" + }, + { + "ImportPath": "k8s.io/api/coordination/v1beta1", + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/core/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/events/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/extensions/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/imagepolicy/v1alpha1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/networking/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/policy/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/rbac/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/rbac/v1alpha1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/rbac/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/scheduling/v1alpha1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" + }, + { + "ImportPath": "k8s.io/api/scheduling/v1beta1", + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/settings/v1alpha1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/storage/v1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/storage/v1alpha1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { "ImportPath": "k8s.io/api/storage/v1beta1", - "Rev": "0d0b2f481328d8bae556061a08a02175054059f4" + "Rev": "644117120187a38be1542f4598cbcf7a1b19a015" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/equality", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/errors", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/fuzzer", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/meta", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/api/apitesting/roundtrip", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/testing", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/testing/fuzzer", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" - }, - { - "ImportPath": "k8s.io/apimachinery/pkg/api/testing/roundtrip", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/api/equality", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/api/errors", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/announced", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/api/meta", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { - "ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "ImportPath": "k8s.io/apimachinery/pkg/api/resource", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/fuzzer", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/internalversion", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1beta1", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/cache", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/clock", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/diff", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/framer", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" + }, + { + "ImportPath": "k8s.io/apimachinery/pkg/util/naming", + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/wait", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/yaml", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/version", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "da3b134bab57ebf23dedfec7e0004614dd4b5a24" + "Rev": "017bf4f8f5884203a401400e511f4c8fc2eded21" }, { "ImportPath": "k8s.io/kube-openapi/pkg/util/proto", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" } ] } diff --git a/deps/k8s.io/client-go/Godeps/OWNERS b/deps/k8s.io/client-go/Godeps/OWNERS new file mode 100644 index 000000000..3d49f3060 --- /dev/null +++ b/deps/k8s.io/client-go/Godeps/OWNERS @@ -0,0 +1,2 @@ +approvers: +- dep-approvers diff --git a/deps/k8s.io/client-go/OWNERS b/deps/k8s.io/client-go/OWNERS index 44a4c9e1f..52d334653 100644 --- a/deps/k8s.io/client-go/OWNERS +++ b/deps/k8s.io/client-go/OWNERS @@ -1,44 +1,17 @@ approvers: - caesarxuchao - deads2k -- krousey - lavalamp +- liggitt - smarterclayton - sttts -- liggitt reviewers: -- thockin -- lavalamp -- smarterclayton -- wojtek-t -- deads2k -- yujuhong -- derekwaynecarr - caesarxuchao -- vishh -- mikedanese +- deads2k +- lavalamp - liggitt -- nikhiljindal -- gmarek -- erictune -- davidopp -- pmorie -- sttts -- dchen1107 -- saad-ali -- zmerlynn -- luxas -- janetkuo -- justinsb -- roberthbailey -- ncdc -- tallclair -- yifan-gu -- eparis -- mwielgus -- timothysc -- feiskyer -- jlowdermilk - soltysh -- piosz -- jsafrane +- sttts +- yliaog +labels: +- sig/api-machinery diff --git a/deps/k8s.io/client-go/README.md b/deps/k8s.io/client-go/README.md index 82f41d738..5f01fa180 100644 --- a/deps/k8s.io/client-go/README.md +++ b/deps/k8s.io/client-go/README.md @@ -2,9 +2,9 @@ Go clients for talking to a [kubernetes](http://kubernetes.io/) cluster. -We currently recommend using the v6.0.0 tag. See [INSTALL.md](/INSTALL.md) for +We currently recommend using the v8.0.0 tag. See [INSTALL.md](/INSTALL.md) for detailed installation instructions. `go get k8s.io/client-go/...` works, but -will give you head and doesn't handle the dependencies well. +will build `master`, which doesn't handle the dependencies well. [![BuildStatus Widget]][BuildStatus Result] [![GoReport Widget]][GoReport Status] @@ -91,16 +91,17 @@ We will backport bugfixes--but not new features--into older versions of #### Compatibility matrix -| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 | -|---------------------|----------------|----------------|----------------|----------------|----------------|----------------| -| client-go 1.4 | ✓ | - | - | - | - | - | -| client-go 1.5 | + | - | - | - | - | - | -| client-go 2.0 | +- | ✓ | +- | +- | +- | +- | -| client-go 3.0 | +- | +- | ✓ | - | +- | +- | -| client-go 4.0 | +- | +- | +- | ✓ | +- | +- | -| client-go 5.0 | +- | +- | +- | +- | ✓ | +- | -| client-go 6.0 | +- | +- | +- | +- | +- | ✓ | -| client-go HEAD | +- | +- | +- | +- | +- | + | +| | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 | Kubernetes 1.10 | Kubernetes 1.11 | +|---------------------|----------------|----------------|----------------|----------------|----------------|-----------------|-----------------| +| client-go 1.5 | - | - | - | - | - | - | - | +| client-go 2.0 | ✓ | +- | +- | +- | +- | +- | +- | +| client-go 3.0 | +- | ✓ | - | +- | +- | +- | +- | +| client-go 4.0 | +- | +- | ✓ | +- | +- | +- | +- | +| client-go 5.0 | +- | +- | +- | ✓ | +- | +- | +- | +| client-go 6.0 | +- | +- | +- | +- | ✓ | +- | +- | +| client-go 7.0 | +- | +- | +- | +- | +- | ✓ | +- | +| client-go 8.0 | +- | +- | +- | +- | +- | +- | ✓ | +| client-go HEAD | +- | +- | +- | +- | +- | +- | +- | Key: @@ -125,9 +126,11 @@ between client-go versions. | client-go 1.5 | Kubernetes main repo, 1.5 branch | = - | | client-go 2.0 | Kubernetes main repo, 1.5 branch | = - | | client-go 3.0 | Kubernetes main repo, 1.6 branch | = - | -| client-go 4.0 | Kubernetes main repo, 1.7 branch | ✓ | -| client-go 5.0 | Kubernetes main repo, 1.8 branch | ✓ | +| client-go 4.0 | Kubernetes main repo, 1.7 branch | = - | +| client-go 5.0 | Kubernetes main repo, 1.8 branch | = - | | client-go 6.0 | Kubernetes main repo, 1.9 branch | ✓ | +| client-go 7.0 | Kubernetes main repo, 1.10 branch | ✓ | +| client-go 8.0 | Kubernetes main repo, 1.11 branch | ✓ | | client-go HEAD | Kubernetes main repo, master branch | ✓ | Key: @@ -152,7 +155,7 @@ existing users won't be broken. ### Kubernetes tags -As of October 2017, client-go is still a mirror of +This repository is still a mirror of [k8s.io/kubernetes/staging/src/client-go](https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/client-go), the code development is still done in the staging area. Since Kubernetes 1.8 release, when syncing the code from the staging area, we also sync the Kubernetes diff --git a/deps/k8s.io/client-go/SECURITY_CONTACTS b/deps/k8s.io/client-go/SECURITY_CONTACTS new file mode 100644 index 000000000..0648a8ebf --- /dev/null +++ b/deps/k8s.io/client-go/SECURITY_CONTACTS @@ -0,0 +1,17 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +cjcullen +jessfraz +liggitt +philips +tallclair diff --git a/deps/k8s.io/client-go/deprecated-dynamic/bad_debt.go b/deps/k8s.io/client-go/deprecated-dynamic/bad_debt.go new file mode 100644 index 000000000..51e4a5830 --- /dev/null +++ b/deps/k8s.io/client-go/deprecated-dynamic/bad_debt.go @@ -0,0 +1,79 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deprecated_dynamic + +import ( + "encoding/json" + "io" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" +) + +// dynamicCodec is a codec that wraps the standard unstructured codec +// with special handling for Status objects. +// Deprecated only used by test code and its wrong +type dynamicCodec struct{} + +func (dynamicCodec) Decode(data []byte, gvk *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { + obj, gvk, err := unstructured.UnstructuredJSONScheme.Decode(data, gvk, obj) + if err != nil { + return nil, nil, err + } + + if _, ok := obj.(*metav1.Status); !ok && strings.ToLower(gvk.Kind) == "status" { + obj = &metav1.Status{} + err := json.Unmarshal(data, obj) + if err != nil { + return nil, nil, err + } + } + + return obj, gvk, nil +} + +func (dynamicCodec) Encode(obj runtime.Object, w io.Writer) error { + return unstructured.UnstructuredJSONScheme.Encode(obj, w) +} + +// ContentConfig returns a rest.ContentConfig for dynamic types. +// Deprecated only used by test code and its wrong +func ContentConfig() rest.ContentConfig { + var jsonInfo runtime.SerializerInfo + // TODO: scheme.Codecs here should become "pkg/apis/server/scheme" which is the minimal core you need + // to talk to a kubernetes server + for _, info := range scheme.Codecs.SupportedMediaTypes() { + if info.MediaType == runtime.ContentTypeJSON { + jsonInfo = info + break + } + } + + jsonInfo.Serializer = dynamicCodec{} + jsonInfo.PrettySerializer = nil + return rest.ContentConfig{ + AcceptContentTypes: runtime.ContentTypeJSON, + ContentType: runtime.ContentTypeJSON, + NegotiatedSerializer: serializer.NegotiatedSerializerWrapper(jsonInfo), + } +} diff --git a/deps/k8s.io/client-go/deprecated-dynamic/client.go b/deps/k8s.io/client-go/deprecated-dynamic/client.go new file mode 100644 index 000000000..3b8efffab --- /dev/null +++ b/deps/k8s.io/client-go/deprecated-dynamic/client.go @@ -0,0 +1,131 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package dynamic provides a client interface to arbitrary Kubernetes +// APIs that exposes common high level operations and exposes common +// metadata. +package deprecated_dynamic + +import ( + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/dynamic" + restclient "k8s.io/client-go/rest" +) + +// Interface is a Kubernetes client that allows you to access metadata +// and manipulate metadata of a Kubernetes API group. +type Interface interface { + // Resource returns an API interface to the specified resource for this client's + // group and version. If resource is not a namespaced resource, then namespace + // is ignored. The ResourceInterface inherits the parameter codec of this client. + Resource(resource *metav1.APIResource, namespace string) ResourceInterface +} + +// ResourceInterface is an API interface to a specific resource under a +// dynamic client. +type ResourceInterface interface { + // List returns a list of objects for this resource. + List(opts metav1.ListOptions) (runtime.Object, error) + // Get gets the resource with the specified name. + Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) + // Delete deletes the resource with the specified name. + Delete(name string, opts *metav1.DeleteOptions) error + // DeleteCollection deletes a collection of objects. + DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error + // Create creates the provided resource. + Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) + // Update updates the provided resource. + Update(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) + // Watch returns a watch.Interface that watches the resource. + Watch(opts metav1.ListOptions) (watch.Interface, error) + // Patch patches the provided resource. + Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) +} + +// Client is a Kubernetes client that allows you to access metadata +// and manipulate metadata of a Kubernetes API group, and implements Interface. +type Client struct { + version schema.GroupVersion + delegate dynamic.Interface +} + +// NewClient returns a new client based on the passed in config. The +// codec is ignored, as the dynamic client uses it's own codec. +func NewClient(conf *restclient.Config, version schema.GroupVersion) (*Client, error) { + delegate, err := dynamic.NewForConfig(conf) + if err != nil { + return nil, err + } + + return &Client{version: version, delegate: delegate}, nil +} + +// Resource returns an API interface to the specified resource for this client's +// group and version. If resource is not a namespaced resource, then namespace +// is ignored. The ResourceInterface inherits the parameter codec of c. +func (c *Client) Resource(resource *metav1.APIResource, namespace string) ResourceInterface { + resourceTokens := strings.SplitN(resource.Name, "/", 2) + subresources := []string{} + if len(resourceTokens) > 1 { + subresources = strings.Split(resourceTokens[1], "/") + } + + if len(namespace) == 0 { + return oldResourceShim(c.delegate.Resource(c.version.WithResource(resourceTokens[0])), subresources) + } + return oldResourceShim(c.delegate.Resource(c.version.WithResource(resourceTokens[0])).Namespace(namespace), subresources) +} + +// the old interfaces used the wrong type for lists. this fixes that +func oldResourceShim(in dynamic.ResourceInterface, subresources []string) ResourceInterface { + return oldResourceShimType{ResourceInterface: in, subresources: subresources} +} + +type oldResourceShimType struct { + dynamic.ResourceInterface + subresources []string +} + +func (s oldResourceShimType) Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) { + return s.ResourceInterface.Create(obj, metav1.CreateOptions{}, s.subresources...) +} + +func (s oldResourceShimType) Update(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) { + return s.ResourceInterface.Update(obj, metav1.UpdateOptions{}, s.subresources...) +} + +func (s oldResourceShimType) Delete(name string, opts *metav1.DeleteOptions) error { + return s.ResourceInterface.Delete(name, opts, s.subresources...) +} + +func (s oldResourceShimType) Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) { + return s.ResourceInterface.Get(name, opts, s.subresources...) +} + +func (s oldResourceShimType) List(opts metav1.ListOptions) (runtime.Object, error) { + return s.ResourceInterface.List(opts) +} + +func (s oldResourceShimType) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) { + return s.ResourceInterface.Patch(name, pt, data, metav1.UpdateOptions{}, s.subresources...) +} diff --git a/deps/k8s.io/client-go/deprecated-dynamic/client_pool.go b/deps/k8s.io/client-go/deprecated-dynamic/client_pool.go new file mode 100644 index 000000000..36dc54ce4 --- /dev/null +++ b/deps/k8s.io/client-go/deprecated-dynamic/client_pool.go @@ -0,0 +1,122 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deprecated_dynamic + +import ( + "sync" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime/schema" + restclient "k8s.io/client-go/rest" +) + +// ClientPool manages a pool of dynamic clients. +type ClientPool interface { + // ClientForGroupVersionResource returns a client configured for the specified groupVersionResource. + // Resource may be empty. + ClientForGroupVersionResource(resource schema.GroupVersionResource) (Interface, error) + // ClientForGroupVersionKind returns a client configured for the specified groupVersionKind. + // Kind may be empty. + ClientForGroupVersionKind(kind schema.GroupVersionKind) (Interface, error) +} + +// APIPathResolverFunc knows how to convert a groupVersion to its API path. The Kind field is +// optional. +type APIPathResolverFunc func(kind schema.GroupVersionKind) string + +// LegacyAPIPathResolverFunc can resolve paths properly with the legacy API. +func LegacyAPIPathResolverFunc(kind schema.GroupVersionKind) string { + if len(kind.Group) == 0 { + return "/api" + } + return "/apis" +} + +// clientPoolImpl implements ClientPool and caches clients for the resource group versions +// is asked to retrieve. This type is thread safe. +type clientPoolImpl struct { + lock sync.RWMutex + config *restclient.Config + clients map[schema.GroupVersion]*Client + apiPathResolverFunc APIPathResolverFunc + mapper meta.RESTMapper +} + +// NewClientPool returns a ClientPool from the specified config. It reuses clients for the same +// group version. It is expected this type may be wrapped by specific logic that special cases certain +// resources or groups. +func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool { + confCopy := *config + + return &clientPoolImpl{ + config: &confCopy, + clients: map[schema.GroupVersion]*Client{}, + apiPathResolverFunc: apiPathResolverFunc, + mapper: mapper, + } +} + +// Instantiates a new dynamic client pool with the given config. +func NewDynamicClientPool(cfg *restclient.Config) ClientPool { + // restMapper is not needed when using LegacyAPIPathResolverFunc + emptyMapper := meta.MultiRESTMapper{} + return NewClientPool(cfg, emptyMapper, LegacyAPIPathResolverFunc) +} + +// ClientForGroupVersionResource uses the provided RESTMapper to identify the appropriate resource. Resource may +// be empty. If no matching kind is found the underlying client for that group is still returned. +func (c *clientPoolImpl) ClientForGroupVersionResource(resource schema.GroupVersionResource) (Interface, error) { + kinds, err := c.mapper.KindsFor(resource) + if err != nil { + if meta.IsNoMatchError(err) { + return c.ClientForGroupVersionKind(schema.GroupVersionKind{Group: resource.Group, Version: resource.Version}) + } + return nil, err + } + return c.ClientForGroupVersionKind(kinds[0]) +} + +// ClientForGroupVersion returns a client for the specified groupVersion, creates one if none exists. Kind +// in the GroupVersionKind may be empty. +func (c *clientPoolImpl) ClientForGroupVersionKind(kind schema.GroupVersionKind) (Interface, error) { + c.lock.Lock() + defer c.lock.Unlock() + + gv := kind.GroupVersion() + + // do we have a client already configured? + if existingClient, found := c.clients[gv]; found { + return existingClient, nil + } + + // avoid changing the original config + confCopy := *c.config + conf := &confCopy + + // we need to set the api path based on group version, if no group, default to legacy path + conf.APIPath = c.apiPathResolverFunc(kind) + + // we need to make a client + conf.GroupVersion = &gv + + dynamicClient, err := NewClient(conf, gv) + if err != nil { + return nil, err + } + c.clients[gv] = dynamicClient + return dynamicClient, nil +} diff --git a/deps/k8s.io/client-go/deprecated-dynamic/client_test.go b/deps/k8s.io/client-go/deprecated-dynamic/client_test.go new file mode 100644 index 000000000..790474522 --- /dev/null +++ b/deps/k8s.io/client-go/deprecated-dynamic/client_test.go @@ -0,0 +1,623 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deprecated_dynamic + +import ( + "bytes" + "fmt" + "io/ioutil" + "net/http" + "net/http/httptest" + "reflect" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + restclientwatch "k8s.io/client-go/rest/watch" +) + +func getJSON(version, kind, name string) []byte { + return []byte(fmt.Sprintf(`{"apiVersion": %q, "kind": %q, "metadata": {"name": %q}}`, version, kind, name)) +} + +func getListJSON(version, kind string, items ...[]byte) []byte { + json := fmt.Sprintf(`{"apiVersion": %q, "kind": %q, "items": [%s]}`, + version, kind, bytes.Join(items, []byte(","))) + return []byte(json) +} + +func getObject(version, kind, name string) *unstructured.Unstructured { + return &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": version, + "kind": kind, + "metadata": map[string]interface{}{ + "name": name, + }, + }, + } +} + +func getClientServer(gv *schema.GroupVersion, h func(http.ResponseWriter, *http.Request)) (Interface, *httptest.Server, error) { + srv := httptest.NewServer(http.HandlerFunc(h)) + cl, err := NewClient(&restclient.Config{ + Host: srv.URL, + ContentConfig: restclient.ContentConfig{GroupVersion: gv}, + }, *gv) + if err != nil { + srv.Close() + return nil, nil, err + } + return cl, srv, nil +} + +func TestList(t *testing.T) { + tcs := []struct { + name string + namespace string + path string + resp []byte + want *unstructured.UnstructuredList + }{ + { + name: "normal_list", + path: "/apis/gtest/vtest/rtest", + resp: getListJSON("vTest", "rTestList", + getJSON("vTest", "rTest", "item1"), + getJSON("vTest", "rTest", "item2")), + want: &unstructured.UnstructuredList{ + Object: map[string]interface{}{ + "apiVersion": "vTest", + "kind": "rTestList", + }, + Items: []unstructured.Unstructured{ + *getObject("vTest", "rTest", "item1"), + *getObject("vTest", "rTest", "item2"), + }, + }, + }, + { + name: "namespaced_list", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest", + resp: getListJSON("vTest", "rTestList", + getJSON("vTest", "rTest", "item1"), + getJSON("vTest", "rTest", "item2")), + want: &unstructured.UnstructuredList{ + Object: map[string]interface{}{ + "apiVersion": "vTest", + "kind": "rTestList", + }, + Items: []unstructured.Unstructured{ + *getObject("vTest", "rTest", "item1"), + *getObject("vTest", "rTest", "item2"), + }, + }, + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Errorf("List(%q) got HTTP method %s. wanted GET", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("List(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + + w.Header().Set("Content-Type", runtime.ContentTypeJSON) + w.Write(tc.resp) + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + got, err := cl.Resource(resource, tc.namespace).List(metav1.ListOptions{}) + if err != nil { + t.Errorf("unexpected error when listing %q: %v", tc.name, err) + continue + } + + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("List(%q) want: %v\ngot: %v", tc.name, tc.want, got) + } + } +} + +func TestGet(t *testing.T) { + tcs := []struct { + resource string + namespace string + name string + path string + resp []byte + want *unstructured.Unstructured + }{ + { + resource: "rtest", + name: "normal_get", + path: "/apis/gtest/vtest/rtest/normal_get", + resp: getJSON("vTest", "rTest", "normal_get"), + want: getObject("vTest", "rTest", "normal_get"), + }, + { + resource: "rtest", + namespace: "nstest", + name: "namespaced_get", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_get", + resp: getJSON("vTest", "rTest", "namespaced_get"), + want: getObject("vTest", "rTest", "namespaced_get"), + }, + { + resource: "rtest/srtest", + name: "normal_subresource_get", + path: "/apis/gtest/vtest/rtest/normal_subresource_get/srtest", + resp: getJSON("vTest", "srTest", "normal_subresource_get"), + want: getObject("vTest", "srTest", "normal_subresource_get"), + }, + { + resource: "rtest/srtest", + namespace: "nstest", + name: "namespaced_subresource_get", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_get/srtest", + resp: getJSON("vTest", "srTest", "namespaced_subresource_get"), + want: getObject("vTest", "srTest", "namespaced_subresource_get"), + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Errorf("Get(%q) got HTTP method %s. wanted GET", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("Get(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + + w.Header().Set("Content-Type", runtime.ContentTypeJSON) + w.Write(tc.resp) + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + got, err := cl.Resource(resource, tc.namespace).Get(tc.name, metav1.GetOptions{}) + if err != nil { + t.Errorf("unexpected error when getting %q: %v", tc.name, err) + continue + } + + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("Get(%q) want: %v\ngot: %v", tc.name, tc.want, got) + } + } +} + +func TestDelete(t *testing.T) { + background := metav1.DeletePropagationBackground + uid := types.UID("uid") + + statusOK := &metav1.Status{ + TypeMeta: metav1.TypeMeta{Kind: "Status"}, + Status: metav1.StatusSuccess, + } + tcs := []struct { + namespace string + name string + path string + deleteOptions *metav1.DeleteOptions + }{ + { + name: "normal_delete", + path: "/apis/gtest/vtest/rtest/normal_delete", + }, + { + namespace: "nstest", + name: "namespaced_delete", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_delete", + }, + { + namespace: "nstest", + name: "namespaced_delete_with_options", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_delete_with_options", + deleteOptions: &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}, PropagationPolicy: &background}, + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "DELETE" { + t.Errorf("Delete(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("Delete(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + + w.Header().Set("Content-Type", runtime.ContentTypeJSON) + unstructured.UnstructuredJSONScheme.Encode(statusOK, w) + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + err = cl.Resource(resource, tc.namespace).Delete(tc.name, tc.deleteOptions) + if err != nil { + t.Errorf("unexpected error when deleting %q: %v", tc.name, err) + continue + } + } +} + +func TestDeleteCollection(t *testing.T) { + statusOK := &metav1.Status{ + TypeMeta: metav1.TypeMeta{Kind: "Status"}, + Status: metav1.StatusSuccess, + } + tcs := []struct { + namespace string + name string + path string + }{ + { + name: "normal_delete_collection", + path: "/apis/gtest/vtest/rtest", + }, + { + namespace: "nstest", + name: "namespaced_delete_collection", + path: "/apis/gtest/vtest/namespaces/nstest/rtest", + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "DELETE" { + t.Errorf("DeleteCollection(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("DeleteCollection(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + + w.Header().Set("Content-Type", runtime.ContentTypeJSON) + unstructured.UnstructuredJSONScheme.Encode(statusOK, w) + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, metav1.ListOptions{}) + if err != nil { + t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err) + continue + } + } +} + +func TestCreate(t *testing.T) { + tcs := []struct { + resource string + name string + namespace string + obj *unstructured.Unstructured + path string + }{ + { + resource: "rtest", + name: "normal_create", + path: "/apis/gtest/vtest/rtest", + obj: getObject("gtest/vTest", "rTest", "normal_create"), + }, + { + resource: "rtest", + name: "namespaced_create", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest", + obj: getObject("gtest/vTest", "rTest", "namespaced_create"), + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "POST" { + t.Errorf("Create(%q) got HTTP method %s. wanted POST", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("Create(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + + w.Header().Set("Content-Type", runtime.ContentTypeJSON) + data, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Errorf("Create(%q) unexpected error reading body: %v", tc.name, err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + w.Write(data) + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + got, err := cl.Resource(resource, tc.namespace).Create(tc.obj) + if err != nil { + t.Errorf("unexpected error when creating %q: %v", tc.name, err) + continue + } + + if !reflect.DeepEqual(got, tc.obj) { + t.Errorf("Create(%q) want: %v\ngot: %v", tc.name, tc.obj, got) + } + } +} + +func TestUpdate(t *testing.T) { + tcs := []struct { + resource string + name string + namespace string + obj *unstructured.Unstructured + path string + }{ + { + resource: "rtest", + name: "normal_update", + path: "/apis/gtest/vtest/rtest/normal_update", + obj: getObject("gtest/vTest", "rTest", "normal_update"), + }, + { + resource: "rtest", + name: "namespaced_update", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_update", + obj: getObject("gtest/vTest", "rTest", "namespaced_update"), + }, + { + resource: "rtest/srtest", + name: "normal_subresource_update", + path: "/apis/gtest/vtest/rtest/normal_update/srtest", + obj: getObject("gtest/vTest", "srTest", "normal_update"), + }, + { + resource: "rtest/srtest", + name: "namespaced_subresource_update", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_update/srtest", + obj: getObject("gtest/vTest", "srTest", "namespaced_update"), + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PUT" { + t.Errorf("Update(%q) got HTTP method %s. wanted PUT", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("Update(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + + w.Header().Set("Content-Type", runtime.ContentTypeJSON) + data, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Errorf("Update(%q) unexpected error reading body: %v", tc.name, err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + w.Write(data) + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + got, err := cl.Resource(resource, tc.namespace).Update(tc.obj) + if err != nil { + t.Errorf("unexpected error when updating %q: %v", tc.name, err) + continue + } + + if !reflect.DeepEqual(got, tc.obj) { + t.Errorf("Update(%q) want: %v\ngot: %v", tc.name, tc.obj, got) + } + } +} + +func TestWatch(t *testing.T) { + tcs := []struct { + name string + namespace string + events []watch.Event + path string + query string + }{ + { + name: "normal_watch", + path: "/apis/gtest/vtest/rtest", + query: "watch=true", + events: []watch.Event{ + {Type: watch.Added, Object: getObject("gtest/vTest", "rTest", "normal_watch")}, + {Type: watch.Modified, Object: getObject("gtest/vTest", "rTest", "normal_watch")}, + {Type: watch.Deleted, Object: getObject("gtest/vTest", "rTest", "normal_watch")}, + }, + }, + { + name: "namespaced_watch", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest", + query: "watch=true", + events: []watch.Event{ + {Type: watch.Added, Object: getObject("gtest/vTest", "rTest", "namespaced_watch")}, + {Type: watch.Modified, Object: getObject("gtest/vTest", "rTest", "namespaced_watch")}, + {Type: watch.Deleted, Object: getObject("gtest/vTest", "rTest", "namespaced_watch")}, + }, + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" { + t.Errorf("Watch(%q) got HTTP method %s. wanted GET", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("Watch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + if r.URL.RawQuery != tc.query { + t.Errorf("Watch(%q) got query %s. wanted %s", tc.name, r.URL.RawQuery, tc.query) + } + + enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{}) + for _, e := range tc.events { + enc.Encode(&e) + } + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + watcher, err := cl.Resource(resource, tc.namespace).Watch(metav1.ListOptions{}) + if err != nil { + t.Errorf("unexpected error when watching %q: %v", tc.name, err) + continue + } + + for _, want := range tc.events { + got := <-watcher.ResultChan() + if !reflect.DeepEqual(got, want) { + t.Errorf("Watch(%q) want: %v\ngot: %v", tc.name, want, got) + } + } + } +} + +func TestPatch(t *testing.T) { + tcs := []struct { + resource string + name string + namespace string + patch []byte + want *unstructured.Unstructured + path string + }{ + { + resource: "rtest", + name: "normal_patch", + path: "/apis/gtest/vtest/rtest/normal_patch", + patch: getJSON("gtest/vTest", "rTest", "normal_patch"), + want: getObject("gtest/vTest", "rTest", "normal_patch"), + }, + { + resource: "rtest", + name: "namespaced_patch", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_patch", + patch: getJSON("gtest/vTest", "rTest", "namespaced_patch"), + want: getObject("gtest/vTest", "rTest", "namespaced_patch"), + }, + { + resource: "rtest/srtest", + name: "normal_subresource_patch", + path: "/apis/gtest/vtest/rtest/normal_subresource_patch/srtest", + patch: getJSON("gtest/vTest", "srTest", "normal_subresource_patch"), + want: getObject("gtest/vTest", "srTest", "normal_subresource_patch"), + }, + { + resource: "rtest/srtest", + name: "namespaced_subresource_patch", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_patch/srtest", + patch: getJSON("gtest/vTest", "srTest", "namespaced_subresource_patch"), + want: getObject("gtest/vTest", "srTest", "namespaced_subresource_patch"), + }, + } + for _, tc := range tcs { + gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} + resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} + cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + if r.Method != "PATCH" { + t.Errorf("Patch(%q) got HTTP method %s. wanted PATCH", tc.name, r.Method) + } + + if r.URL.Path != tc.path { + t.Errorf("Patch(%q) got path %s. wanted %s", tc.name, r.URL.Path, tc.path) + } + + content := r.Header.Get("Content-Type") + if content != string(types.StrategicMergePatchType) { + t.Errorf("Patch(%q) got Content-Type %s. wanted %s", tc.name, content, types.StrategicMergePatchType) + } + + data, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Errorf("Patch(%q) unexpected error reading body: %v", tc.name, err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + w.Header().Set("Content-Type", "application/json") + w.Write(data) + }) + if err != nil { + t.Errorf("unexpected error when creating client: %v", err) + continue + } + defer srv.Close() + + got, err := cl.Resource(resource, tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch) + if err != nil { + t.Errorf("unexpected error when patching %q: %v", tc.name, err) + continue + } + + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("Patch(%q) want: %v\ngot: %v", tc.name, tc.want, got) + } + } +} diff --git a/deps/k8s.io/client-go/discovery/BUILD b/deps/k8s.io/client-go/discovery/BUILD deleted file mode 100644 index e47b05276..000000000 --- a/deps/k8s.io/client-go/discovery/BUILD +++ /dev/null @@ -1,76 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "discovery_client.go", - "helper.go", - "restmapper.go", - "unstructured.go", - ], - importpath = "k8s.io/client-go/discovery", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/golang/protobuf/proto:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = [ - "discovery_client_test.go", - "helper_blackbox_test.go", - "restmapper_test.go", - ], - importpath = "k8s.io/client-go/discovery_test", - deps = [ - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/rest/fake:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/discovery/cached:all-srcs", - "//staging/src/k8s.io/client-go/discovery/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/discovery/cached/BUILD b/deps/k8s.io/client-go/discovery/cached/BUILD deleted file mode 100644 index 03fa7edcf..000000000 --- a/deps/k8s.io/client-go/discovery/cached/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["memcache_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/discovery/cached", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["memcache.go"], - importpath = "k8s.io/client-go/discovery/cached", - deps = [ - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/discovery/cached/memcache.go b/deps/k8s.io/client-go/discovery/cached/memcache.go index 585b4c80d..a6ebbe4f0 100644 --- a/deps/k8s.io/client-go/discovery/cached/memcache.go +++ b/deps/k8s.io/client-go/discovery/cached/memcache.go @@ -67,20 +67,7 @@ func (d *memCacheClient) ServerResourcesForGroupVersion(groupVersion string) (*m // ServerResources returns the supported resources for all groups and versions. func (d *memCacheClient) ServerResources() ([]*metav1.APIResourceList, error) { - apiGroups, err := d.ServerGroups() - if err != nil { - return nil, err - } - groupVersions := metav1.ExtractGroupVersions(apiGroups) - result := []*metav1.APIResourceList{} - for _, groupVersion := range groupVersions { - resources, err := d.ServerResourcesForGroupVersion(groupVersion) - if err != nil { - return nil, err - } - result = append(result, resources) - } - return result, nil + return discovery.ServerResources(d) } func (d *memCacheClient) ServerGroups() (*metav1.APIGroupList, error) { @@ -96,18 +83,12 @@ func (d *memCacheClient) RESTClient() restclient.Interface { return d.delegate.RESTClient() } -// TODO: Should this also be cached? The results seem more likely to be -// inconsistent with ServerGroups and ServerResources given the requirement to -// actively Invalidate. func (d *memCacheClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { - return d.delegate.ServerPreferredResources() + return discovery.ServerPreferredResources(d) } -// TODO: Should this also be cached? The results seem more likely to be -// inconsistent with ServerGroups and ServerResources given the requirement to -// actively Invalidate. func (d *memCacheClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { - return d.delegate.ServerPreferredNamespacedResources() + return discovery.ServerPreferredNamespacedResources(d) } func (d *memCacheClient) ServerVersion() (*version.Info, error) { diff --git a/deps/k8s.io/client-go/discovery/cached_discovery.go b/deps/k8s.io/client-go/discovery/cached_discovery.go new file mode 100644 index 000000000..d38a0bbda --- /dev/null +++ b/deps/k8s.io/client-go/discovery/cached_discovery.go @@ -0,0 +1,282 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery + +import ( + "errors" + "io/ioutil" + "net/http" + "os" + "path/filepath" + "sync" + "time" + + "github.com/golang/glog" + "github.com/googleapis/gnostic/OpenAPIv2" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/version" + "k8s.io/client-go/kubernetes/scheme" + restclient "k8s.io/client-go/rest" +) + +// CachedDiscoveryClient implements the functions that discovery server-supported API groups, +// versions and resources. +type CachedDiscoveryClient struct { + delegate DiscoveryInterface + + // cacheDirectory is the directory where discovery docs are held. It must be unique per host:port combination to work well. + cacheDirectory string + + // ttl is how long the cache should be considered valid + ttl time.Duration + + // mutex protects the variables below + mutex sync.Mutex + + // ourFiles are all filenames of cache files created by this process + ourFiles map[string]struct{} + // invalidated is true if all cache files should be ignored that are not ours (e.g. after Invalidate() was called) + invalidated bool + // fresh is true if all used cache files were ours + fresh bool +} + +var _ CachedDiscoveryInterface = &CachedDiscoveryClient{} + +// ServerResourcesForGroupVersion returns the supported resources for a group and version. +func (d *CachedDiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + filename := filepath.Join(d.cacheDirectory, groupVersion, "serverresources.json") + cachedBytes, err := d.getCachedFile(filename) + // don't fail on errors, we either don't have a file or won't be able to run the cached check. Either way we can fallback. + if err == nil { + cachedResources := &metav1.APIResourceList{} + if err := runtime.DecodeInto(scheme.Codecs.UniversalDecoder(), cachedBytes, cachedResources); err == nil { + glog.V(10).Infof("returning cached discovery info from %v", filename) + return cachedResources, nil + } + } + + liveResources, err := d.delegate.ServerResourcesForGroupVersion(groupVersion) + if err != nil { + glog.V(3).Infof("skipped caching discovery info due to %v", err) + return liveResources, err + } + if liveResources == nil || len(liveResources.APIResources) == 0 { + glog.V(3).Infof("skipped caching discovery info, no resources found") + return liveResources, err + } + + if err := d.writeCachedFile(filename, liveResources); err != nil { + glog.V(1).Infof("failed to write cache to %v due to %v", filename, err) + } + + return liveResources, nil +} + +// ServerResources returns the supported resources for all groups and versions. +func (d *CachedDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { + return ServerResources(d) +} + +func (d *CachedDiscoveryClient) ServerGroups() (*metav1.APIGroupList, error) { + filename := filepath.Join(d.cacheDirectory, "servergroups.json") + cachedBytes, err := d.getCachedFile(filename) + // don't fail on errors, we either don't have a file or won't be able to run the cached check. Either way we can fallback. + if err == nil { + cachedGroups := &metav1.APIGroupList{} + if err := runtime.DecodeInto(scheme.Codecs.UniversalDecoder(), cachedBytes, cachedGroups); err == nil { + glog.V(10).Infof("returning cached discovery info from %v", filename) + return cachedGroups, nil + } + } + + liveGroups, err := d.delegate.ServerGroups() + if err != nil { + glog.V(3).Infof("skipped caching discovery info due to %v", err) + return liveGroups, err + } + if liveGroups == nil || len(liveGroups.Groups) == 0 { + glog.V(3).Infof("skipped caching discovery info, no groups found") + return liveGroups, err + } + + if err := d.writeCachedFile(filename, liveGroups); err != nil { + glog.V(1).Infof("failed to write cache to %v due to %v", filename, err) + } + + return liveGroups, nil +} + +func (d *CachedDiscoveryClient) getCachedFile(filename string) ([]byte, error) { + // after invalidation ignore cache files not created by this process + d.mutex.Lock() + _, ourFile := d.ourFiles[filename] + if d.invalidated && !ourFile { + d.mutex.Unlock() + return nil, errors.New("cache invalidated") + } + d.mutex.Unlock() + + file, err := os.Open(filename) + if err != nil { + return nil, err + } + defer file.Close() + + fileInfo, err := file.Stat() + if err != nil { + return nil, err + } + + if time.Now().After(fileInfo.ModTime().Add(d.ttl)) { + return nil, errors.New("cache expired") + } + + // the cache is present and its valid. Try to read and use it. + cachedBytes, err := ioutil.ReadAll(file) + if err != nil { + return nil, err + } + + d.mutex.Lock() + defer d.mutex.Unlock() + d.fresh = d.fresh && ourFile + + return cachedBytes, nil +} + +func (d *CachedDiscoveryClient) writeCachedFile(filename string, obj runtime.Object) error { + if err := os.MkdirAll(filepath.Dir(filename), 0755); err != nil { + return err + } + + bytes, err := runtime.Encode(scheme.Codecs.LegacyCodec(), obj) + if err != nil { + return err + } + + f, err := ioutil.TempFile(filepath.Dir(filename), filepath.Base(filename)+".") + if err != nil { + return err + } + defer os.Remove(f.Name()) + _, err = f.Write(bytes) + if err != nil { + return err + } + + err = os.Chmod(f.Name(), 0755) + if err != nil { + return err + } + + name := f.Name() + err = f.Close() + if err != nil { + return err + } + + // atomic rename + d.mutex.Lock() + defer d.mutex.Unlock() + err = os.Rename(name, filename) + if err == nil { + d.ourFiles[filename] = struct{}{} + } + return err +} + +func (d *CachedDiscoveryClient) RESTClient() restclient.Interface { + return d.delegate.RESTClient() +} + +func (d *CachedDiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + return ServerPreferredResources(d) +} + +func (d *CachedDiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + return ServerPreferredNamespacedResources(d) +} + +func (d *CachedDiscoveryClient) ServerVersion() (*version.Info, error) { + return d.delegate.ServerVersion() +} + +func (d *CachedDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { + return d.delegate.OpenAPISchema() +} + +func (d *CachedDiscoveryClient) Fresh() bool { + d.mutex.Lock() + defer d.mutex.Unlock() + + return d.fresh +} + +func (d *CachedDiscoveryClient) Invalidate() { + d.mutex.Lock() + defer d.mutex.Unlock() + + d.ourFiles = map[string]struct{}{} + d.fresh = true + d.invalidated = true +} + +// NewCachedDiscoveryClientForConfig creates a new DiscoveryClient for the given config, and wraps +// the created client in a CachedDiscoveryClient. The provided configuration is updated with a +// custom transport that understands cache responses. +// We receive two distinct cache directories for now, in order to preserve old behavior +// which makes use of the --cache-dir flag value for storing cache data from the CacheRoundTripper, +// and makes use of the hardcoded destination (~/.kube/cache/discovery/...) for storing +// CachedDiscoveryClient cache data. If httpCacheDir is empty, the restconfig's transport will not +// be updated with a roundtripper that understands cache responses. +// If discoveryCacheDir is empty, cached server resource data will be looked up in the current directory. +// TODO(juanvallejo): the value of "--cache-dir" should be honored. Consolidate discoveryCacheDir with httpCacheDir +// so that server resources and http-cache data are stored in the same location, provided via config flags. +func NewCachedDiscoveryClientForConfig(config *restclient.Config, discoveryCacheDir, httpCacheDir string, ttl time.Duration) (*CachedDiscoveryClient, error) { + if len(httpCacheDir) > 0 { + // update the given restconfig with a custom roundtripper that + // understands how to handle cache responses. + wt := config.WrapTransport + config.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { + if wt != nil { + rt = wt(rt) + } + return newCacheRoundTripper(httpCacheDir, rt) + } + } + + discoveryClient, err := NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + + return newCachedDiscoveryClient(discoveryClient, discoveryCacheDir, ttl), nil +} + +// NewCachedDiscoveryClient creates a new DiscoveryClient. cacheDirectory is the directory where discovery docs are held. It must be unique per host:port combination to work well. +func newCachedDiscoveryClient(delegate DiscoveryInterface, cacheDirectory string, ttl time.Duration) *CachedDiscoveryClient { + return &CachedDiscoveryClient{ + delegate: delegate, + cacheDirectory: cacheDirectory, + ttl: ttl, + ourFiles: map[string]struct{}{}, + fresh: true, + } +} diff --git a/deps/k8s.io/client-go/discovery/cached_discovery_test.go b/deps/k8s.io/client-go/discovery/cached_discovery_test.go new file mode 100644 index 000000000..278931c2d --- /dev/null +++ b/deps/k8s.io/client-go/discovery/cached_discovery_test.go @@ -0,0 +1,169 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery + +import ( + "io/ioutil" + "os" + "testing" + "time" + + "github.com/googleapis/gnostic/OpenAPIv2" + "github.com/stretchr/testify/assert" + + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/rest/fake" +) + +func TestCachedDiscoveryClient_Fresh(t *testing.T) { + assert := assert.New(t) + + d, err := ioutil.TempDir("", "") + assert.NoError(err) + defer os.RemoveAll(d) + + c := fakeDiscoveryClient{} + cdc := newCachedDiscoveryClient(&c, d, 60*time.Second) + assert.True(cdc.Fresh(), "should be fresh after creation") + + cdc.ServerGroups() + assert.True(cdc.Fresh(), "should be fresh after groups call without cache") + assert.Equal(c.groupCalls, 1) + + cdc.ServerGroups() + assert.True(cdc.Fresh(), "should be fresh after another groups call") + assert.Equal(c.groupCalls, 1) + + cdc.ServerResources() + assert.True(cdc.Fresh(), "should be fresh after resources call") + assert.Equal(c.resourceCalls, 1) + + cdc.ServerResources() + assert.True(cdc.Fresh(), "should be fresh after another resources call") + assert.Equal(c.resourceCalls, 1) + + cdc = newCachedDiscoveryClient(&c, d, 60*time.Second) + cdc.ServerGroups() + assert.False(cdc.Fresh(), "should NOT be fresh after recreation with existing groups cache") + assert.Equal(c.groupCalls, 1) + + cdc.ServerResources() + assert.False(cdc.Fresh(), "should NOT be fresh after recreation with existing resources cache") + assert.Equal(c.resourceCalls, 1) + + cdc.Invalidate() + assert.True(cdc.Fresh(), "should be fresh after cache invalidation") + + cdc.ServerResources() + assert.True(cdc.Fresh(), "should ignore existing resources cache after invalidation") + assert.Equal(c.resourceCalls, 2) +} + +func TestNewCachedDiscoveryClient_TTL(t *testing.T) { + assert := assert.New(t) + + d, err := ioutil.TempDir("", "") + assert.NoError(err) + defer os.RemoveAll(d) + + c := fakeDiscoveryClient{} + cdc := newCachedDiscoveryClient(&c, d, 1*time.Nanosecond) + cdc.ServerGroups() + assert.Equal(c.groupCalls, 1) + + time.Sleep(1 * time.Second) + + cdc.ServerGroups() + assert.Equal(c.groupCalls, 2) +} + +type fakeDiscoveryClient struct { + groupCalls int + resourceCalls int + versionCalls int + openAPICalls int + + serverResourcesHandler func() ([]*metav1.APIResourceList, error) +} + +var _ DiscoveryInterface = &fakeDiscoveryClient{} + +func (c *fakeDiscoveryClient) RESTClient() restclient.Interface { + return &fake.RESTClient{} +} + +func (c *fakeDiscoveryClient) ServerGroups() (*metav1.APIGroupList, error) { + c.groupCalls = c.groupCalls + 1 + return &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "a", + Versions: []metav1.GroupVersionForDiscovery{ + { + GroupVersion: "a/v1", + Version: "v1", + }, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{ + GroupVersion: "a/v1", + Version: "v1", + }, + }, + }, + }, nil +} + +func (c *fakeDiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + c.resourceCalls = c.resourceCalls + 1 + if groupVersion == "a/v1" { + return &metav1.APIResourceList{APIResources: []metav1.APIResource{{Name: "widgets", Kind: "Widget"}}}, nil + } + + return nil, errors.NewNotFound(schema.GroupResource{}, "") +} + +func (c *fakeDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { + c.resourceCalls = c.resourceCalls + 1 + if c.serverResourcesHandler != nil { + return c.serverResourcesHandler() + } + return []*metav1.APIResourceList{}, nil +} + +func (c *fakeDiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + c.resourceCalls = c.resourceCalls + 1 + return nil, nil +} + +func (c *fakeDiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + c.resourceCalls = c.resourceCalls + 1 + return nil, nil +} + +func (c *fakeDiscoveryClient) ServerVersion() (*version.Info, error) { + c.versionCalls = c.versionCalls + 1 + return &version.Info{}, nil +} + +func (c *fakeDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { + c.openAPICalls = c.openAPICalls + 1 + return &openapi_v2.Document{}, nil +} diff --git a/deps/k8s.io/client-go/discovery/discovery_client.go b/deps/k8s.io/client-go/discovery/discovery_client.go index 24c11f33b..a96602974 100644 --- a/deps/k8s.io/client-go/discovery/discovery_client.go +++ b/deps/k8s.io/client-go/discovery/discovery_client.go @@ -22,6 +22,8 @@ import ( "net/url" "sort" "strings" + "sync" + "time" "github.com/golang/protobuf/proto" "github.com/googleapis/gnostic/OpenAPIv2" @@ -31,13 +33,21 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/kubernetes/scheme" restclient "k8s.io/client-go/rest" ) -// defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources). -const defaultRetries = 2 +const ( + // defaultRetries is the number of times a resource discovery is repeated if an api group disappears on the fly (e.g. ThirdPartyResources). + defaultRetries = 2 + // protobuf mime type + mimePb = "application/com.github.proto-openapi.spec.v2@v1.0+protobuf" + // defaultTimeout is the maximum amount of time per request when no timeout has been set on a RESTClient. + // Defaults to 32s in order to have a distinguishable length of time, relative to other timeouts that exist. + defaultTimeout = 32 * time.Second +) // DiscoveryInterface holds the methods that discover server-supported API groups, // versions and resources. @@ -179,33 +189,7 @@ func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (r // serverResources returns the supported resources for all groups and versions. func (d *DiscoveryClient) serverResources() ([]*metav1.APIResourceList, error) { - apiGroups, err := d.ServerGroups() - if err != nil { - return nil, err - } - - result := []*metav1.APIResourceList{} - failedGroups := make(map[schema.GroupVersion]error) - - for _, apiGroup := range apiGroups.Groups { - for _, version := range apiGroup.Versions { - gv := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version} - resources, err := d.ServerResourcesForGroupVersion(version.GroupVersion) - if err != nil { - // TODO: maybe restrict this to NotFound errors - failedGroups[gv] = err - continue - } - - result = append(result, resources) - } - } - - if len(failedGroups) == 0 { - return result, nil - } - - return result, &ErrGroupDiscoveryFailed{Groups: failedGroups} + return ServerResources(d) } // ServerResources returns the supported resources for all groups and versions. @@ -238,14 +222,46 @@ func IsGroupDiscoveryFailedError(err error) bool { // serverPreferredResources returns the supported resources with the version preferred by the server. func (d *DiscoveryClient) serverPreferredResources() ([]*metav1.APIResourceList, error) { - serverGroupList, err := d.ServerGroups() + return ServerPreferredResources(d) +} + +// ServerResources uses the provided discovery interface to look up supported resources for all groups and versions. +func ServerResources(d DiscoveryInterface) ([]*metav1.APIResourceList, error) { + apiGroups, err := d.ServerGroups() if err != nil { return nil, err } + groupVersionResources, failedGroups := fetchGroupVersionResources(d, apiGroups) + + // order results by group/version discovery order result := []*metav1.APIResourceList{} - failedGroups := make(map[schema.GroupVersion]error) + for _, apiGroup := range apiGroups.Groups { + for _, version := range apiGroup.Versions { + gv := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version} + if resources, ok := groupVersionResources[gv]; ok { + result = append(result, resources) + } + } + } + if len(failedGroups) == 0 { + return result, nil + } + + return result, &ErrGroupDiscoveryFailed{Groups: failedGroups} +} + +// ServerPreferredResources uses the provided discovery interface to look up preferred resources +func ServerPreferredResources(d DiscoveryInterface) ([]*metav1.APIResourceList, error) { + serverGroupList, err := d.ServerGroups() + if err != nil { + return nil, err + } + + groupVersionResources, failedGroups := fetchGroupVersionResources(d, serverGroupList) + + result := []*metav1.APIResourceList{} grVersions := map[schema.GroupResource]string{} // selected version of a GroupResource grApiResources := map[schema.GroupResource]*metav1.APIResource{} // selected APIResource for a GroupResource gvApiResourceLists := map[schema.GroupVersion]*metav1.APIResourceList{} // blueprint for a APIResourceList for later grouping @@ -253,10 +269,9 @@ func (d *DiscoveryClient) serverPreferredResources() ([]*metav1.APIResourceList, for _, apiGroup := range serverGroupList.Groups { for _, version := range apiGroup.Versions { groupVersion := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version} - apiResourceList, err := d.ServerResourcesForGroupVersion(version.GroupVersion) - if err != nil { - // TODO: maybe restrict this to NotFound errors - failedGroups[groupVersion] = err + + apiResourceList, ok := groupVersionResources[groupVersion] + if !ok { continue } @@ -298,6 +313,41 @@ func (d *DiscoveryClient) serverPreferredResources() ([]*metav1.APIResourceList, return result, &ErrGroupDiscoveryFailed{Groups: failedGroups} } +// fetchServerResourcesForGroupVersions uses the discovery client to fetch the resources for the specified groups in parallel +func fetchGroupVersionResources(d DiscoveryInterface, apiGroups *metav1.APIGroupList) (map[schema.GroupVersion]*metav1.APIResourceList, map[schema.GroupVersion]error) { + groupVersionResources := make(map[schema.GroupVersion]*metav1.APIResourceList) + failedGroups := make(map[schema.GroupVersion]error) + + wg := &sync.WaitGroup{} + resultLock := &sync.Mutex{} + for _, apiGroup := range apiGroups.Groups { + for _, version := range apiGroup.Versions { + groupVersion := schema.GroupVersion{Group: apiGroup.Name, Version: version.Version} + wg.Add(1) + go func() { + defer wg.Done() + defer utilruntime.HandleCrash() + + apiResourceList, err := d.ServerResourcesForGroupVersion(groupVersion.String()) + + // lock to record results + resultLock.Lock() + defer resultLock.Unlock() + + if err != nil { + // TODO: maybe restrict this to NotFound errors + failedGroups[groupVersion] = err + } else { + groupVersionResources[groupVersion] = apiResourceList + } + }() + } + } + wg.Wait() + + return groupVersionResources, failedGroups +} + // ServerPreferredResources returns the supported resources with the version preferred by the // server. func (d *DiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { @@ -307,7 +357,12 @@ func (d *DiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, // ServerPreferredNamespacedResources returns the supported namespaced resources with the // version preferred by the server. func (d *DiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { - all, err := d.ServerPreferredResources() + return ServerPreferredNamespacedResources(d) +} + +// ServerPreferredNamespacedResources uses the provided discovery interface to look up preferred namespaced resources +func ServerPreferredNamespacedResources(d DiscoveryInterface) ([]*metav1.APIResourceList, error) { + all, err := ServerPreferredResources(d) return FilteredBy(ResourcePredicateFunc(func(groupVersion string, r *metav1.APIResource) bool { return r.Namespaced }), all), err @@ -329,9 +384,18 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) { // OpenAPISchema fetches the open api schema using a rest client and parses the proto. func (d *DiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { - data, err := d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw() + data, err := d.restClient.Get().AbsPath("/openapi/v2").SetHeader("Accept", mimePb).Do().Raw() if err != nil { - return nil, err + if errors.IsForbidden(err) || errors.IsNotFound(err) || errors.IsNotAcceptable(err) { + // single endpoint not found/registered in old server, try to fetch old endpoint + // TODO(roycaihw): remove this in 1.11 + data, err = d.restClient.Get().AbsPath("/swagger-2.0.0.pb-v1").Do().Raw() + if err != nil { + return nil, err + } + } else { + return nil, err + } } document := &openapi_v2.Document{} err = proto.Unmarshal(data, document) @@ -360,6 +424,9 @@ func withRetries(maxRetries int, f func() ([]*metav1.APIResourceList, error)) ([ func setDiscoveryDefaults(config *restclient.Config) error { config.APIPath = "" config.GroupVersion = nil + if config.Timeout == 0 { + config.Timeout = defaultTimeout + } codec := runtime.NoopEncoder{Decoder: scheme.Codecs.UniversalDecoder()} config.NegotiatedSerializer = serializer.NegotiatedSerializerWrapper(runtime.SerializerInfo{Serializer: codec}) if len(config.UserAgent) == 0 { diff --git a/deps/k8s.io/client-go/discovery/discovery_client_test.go b/deps/k8s.io/client-go/discovery/discovery_client_test.go index 64249c88a..10e494322 100644 --- a/deps/k8s.io/client-go/discovery/discovery_client_test.go +++ b/deps/k8s.io/client-go/discovery/discovery_client_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package discovery_test +package discovery import ( "encoding/json" @@ -27,12 +27,13 @@ import ( "github.com/gogo/protobuf/proto" "github.com/googleapis/gnostic/OpenAPIv2" + "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/version" - . "k8s.io/client-go/discovery" restclient "k8s.io/client-go/rest" ) @@ -130,6 +131,12 @@ func TestGetServerGroupsWithBrokenServer(t *testing.T) { } } +func TestTimeoutIsSet(t *testing.T) { + cfg := &restclient.Config{} + setDiscoveryDefaults(cfg) + assert.Equal(t, defaultTimeout, cfg.Timeout) +} + func TestGetServerResourcesWithV1Server(t *testing.T) { server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { var obj interface{} @@ -183,6 +190,14 @@ func TestGetServerResources(t *testing.T) { {Name: "jobs", Namespaced: true, Kind: "Job"}, }, } + beta2 := metav1.APIResourceList{ + GroupVersion: "extensions/v1beta2", + APIResources: []metav1.APIResource{ + {Name: "deployments", Namespaced: true, Kind: "Deployment"}, + {Name: "ingresses", Namespaced: true, Kind: "Ingress"}, + {Name: "jobs", Namespaced: true, Kind: "Job"}, + }, + } tests := []struct { resourcesList *metav1.APIResourceList path string @@ -215,6 +230,8 @@ func TestGetServerResources(t *testing.T) { list = &stable case "/apis/extensions/v1beta1": list = &beta + case "/apis/extensions/v1beta2": + list = &beta2 case "/api": list = &metav1.APIVersions{ Versions: []string{ @@ -225,8 +242,10 @@ func TestGetServerResources(t *testing.T) { list = &metav1.APIGroupList{ Groups: []metav1.APIGroup{ { + Name: "extensions", Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "extensions/v1beta1"}, + {GroupVersion: "extensions/v1beta1", Version: "v1beta1"}, + {GroupVersion: "extensions/v1beta2", Version: "v1beta2"}, }, }, }, @@ -268,11 +287,10 @@ func TestGetServerResources(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - serverGroupVersions := sets.NewString(groupVersions(serverResources)...) - for _, api := range []string{"v1", "extensions/v1beta1"} { - if !serverGroupVersions.Has(api) { - t.Errorf("missing expected api %q in %v", api, serverResources) - } + serverGroupVersions := groupVersions(serverResources) + expectedGroupVersions := []string{"v1", "extensions/v1beta1", "extensions/v1beta2"} + if !reflect.DeepEqual(expectedGroupVersions, serverGroupVersions) { + t.Errorf("unexpected group versions: %v", diff.ObjectReflectDiff(expectedGroupVersions, serverGroupVersions)) } } @@ -326,9 +344,14 @@ var returnedOpenAPI = openapi_v2.Document{ }, } -func openapiSchemaFakeServer() (*httptest.Server, error) { +func openapiSchemaDeprecatedFakeServer(status int) (*httptest.Server, error) { var sErr error server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if req.URL.Path == "/openapi/v2" { + // write the error status for the new endpoint request + w.WriteHeader(status) + return + } if req.URL.Path != "/swagger-2.0.0.pb-v1" { sErr = fmt.Errorf("Unexpected url %v", req.URL) } @@ -349,6 +372,33 @@ func openapiSchemaFakeServer() (*httptest.Server, error) { return server, sErr } +func openapiSchemaFakeServer() (*httptest.Server, error) { + var sErr error + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if req.URL.Path != "/openapi/v2" { + sErr = fmt.Errorf("Unexpected url %v", req.URL) + } + if req.Method != "GET" { + sErr = fmt.Errorf("Unexpected method %v", req.Method) + } + decipherableFormat := req.Header.Get("Accept") + if decipherableFormat != "application/com.github.proto-openapi.spec.v2@v1.0+protobuf" { + sErr = fmt.Errorf("Unexpected accept mime type %v", decipherableFormat) + } + + mime.AddExtensionType(".pb-v1", "application/com.github.googleapis.gnostic.OpenAPIv2@68f4ded+protobuf") + + output, err := proto.Marshal(&returnedOpenAPI) + if err != nil { + sErr = err + return + } + w.WriteHeader(http.StatusOK) + w.Write(output) + })) + return server, sErr +} + func TestGetOpenAPISchema(t *testing.T) { server, err := openapiSchemaFakeServer() if err != nil { @@ -366,6 +416,57 @@ func TestGetOpenAPISchema(t *testing.T) { } } +func TestGetOpenAPISchemaForbiddenFallback(t *testing.T) { + server, err := openapiSchemaDeprecatedFakeServer(http.StatusForbidden) + if err != nil { + t.Errorf("unexpected error starting fake server: %v", err) + } + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + got, err := client.OpenAPISchema() + if err != nil { + t.Fatalf("unexpected error getting openapi: %v", err) + } + if e, a := returnedOpenAPI, *got; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } +} + +func TestGetOpenAPISchemaNotFoundFallback(t *testing.T) { + server, err := openapiSchemaDeprecatedFakeServer(http.StatusNotFound) + if err != nil { + t.Errorf("unexpected error starting fake server: %v", err) + } + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + got, err := client.OpenAPISchema() + if err != nil { + t.Fatalf("unexpected error getting openapi: %v", err) + } + if e, a := returnedOpenAPI, *got; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } +} + +func TestGetOpenAPISchemaNotAcceptableFallback(t *testing.T) { + server, err := openapiSchemaDeprecatedFakeServer(http.StatusNotAcceptable) + if err != nil { + t.Errorf("unexpected error starting fake server: %v", err) + } + defer server.Close() + + client := NewDiscoveryClientForConfigOrDie(&restclient.Config{Host: server.URL}) + got, err := client.OpenAPISchema() + if err != nil { + t.Fatalf("unexpected error getting openapi: %v", err) + } + if e, a := returnedOpenAPI, *got; !reflect.DeepEqual(e, a) { + t.Errorf("expected %v, got %v", e, a) + } +} + func TestServerPreferredResources(t *testing.T) { stable := metav1.APIResourceList{ GroupVersion: "v1", @@ -535,7 +636,7 @@ func TestServerPreferredResourcesRetries(t *testing.T) { { Name: "extensions", Versions: []metav1.GroupVersionForDiscovery{ - {GroupVersion: "extensions/v1beta1"}, + {GroupVersion: "extensions/v1beta1", Version: "v1beta1"}, }, PreferredVersion: metav1.GroupVersionForDiscovery{ GroupVersion: "extensions/v1beta1", diff --git a/deps/k8s.io/client-go/discovery/doc.go b/deps/k8s.io/client-go/discovery/doc.go new file mode 100644 index 000000000..76495588e --- /dev/null +++ b/deps/k8s.io/client-go/discovery/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package discovery provides ways to discover server-supported +// API groups, versions and resources. +package discovery diff --git a/deps/k8s.io/client-go/discovery/fake/BUILD b/deps/k8s.io/client-go/discovery/fake/BUILD deleted file mode 100644 index 1477088da..000000000 --- a/deps/k8s.io/client-go/discovery/fake/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["discovery.go"], - importpath = "k8s.io/client-go/discovery/fake", - deps = [ - "//vendor/github.com/googleapis/gnostic/OpenAPIv2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_xtest", - srcs = ["discovery_test.go"], - importpath = "k8s.io/client-go/discovery/fake_test", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/fake:go_default_library", - ], -) diff --git a/deps/k8s.io/client-go/discovery/restmapper.go b/deps/k8s.io/client-go/discovery/restmapper.go deleted file mode 100644 index 6d1de8c1b..000000000 --- a/deps/k8s.io/client-go/discovery/restmapper.go +++ /dev/null @@ -1,331 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package discovery - -import ( - "fmt" - "sync" - - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/golang/glog" -) - -// APIGroupResources is an API group with a mapping of versions to -// resources. -type APIGroupResources struct { - Group metav1.APIGroup - // A mapping of version string to a slice of APIResources for - // that version. - VersionedResources map[string][]metav1.APIResource -} - -// NewRESTMapper returns a PriorityRESTMapper based on the discovered -// groups and resources passed in. -func NewRESTMapper(groupResources []*APIGroupResources, versionInterfaces meta.VersionInterfacesFunc) meta.RESTMapper { - unionMapper := meta.MultiRESTMapper{} - - var groupPriority []string - // /v1 is special. It should always come first - resourcePriority := []schema.GroupVersionResource{{Group: "", Version: "v1", Resource: meta.AnyResource}} - kindPriority := []schema.GroupVersionKind{{Group: "", Version: "v1", Kind: meta.AnyKind}} - - for _, group := range groupResources { - groupPriority = append(groupPriority, group.Group.Name) - - // Make sure the preferred version comes first - if len(group.Group.PreferredVersion.Version) != 0 { - preferred := group.Group.PreferredVersion.Version - if _, ok := group.VersionedResources[preferred]; ok { - resourcePriority = append(resourcePriority, schema.GroupVersionResource{ - Group: group.Group.Name, - Version: group.Group.PreferredVersion.Version, - Resource: meta.AnyResource, - }) - - kindPriority = append(kindPriority, schema.GroupVersionKind{ - Group: group.Group.Name, - Version: group.Group.PreferredVersion.Version, - Kind: meta.AnyKind, - }) - } - } - - for _, discoveryVersion := range group.Group.Versions { - resources, ok := group.VersionedResources[discoveryVersion.Version] - if !ok { - continue - } - - // Add non-preferred versions after the preferred version, in case there are resources that only exist in those versions - if discoveryVersion.Version != group.Group.PreferredVersion.Version { - resourcePriority = append(resourcePriority, schema.GroupVersionResource{ - Group: group.Group.Name, - Version: discoveryVersion.Version, - Resource: meta.AnyResource, - }) - - kindPriority = append(kindPriority, schema.GroupVersionKind{ - Group: group.Group.Name, - Version: discoveryVersion.Version, - Kind: meta.AnyKind, - }) - } - - gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} - versionMapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv}, versionInterfaces) - - for _, resource := range resources { - scope := meta.RESTScopeNamespace - if !resource.Namespaced { - scope = meta.RESTScopeRoot - } - - // this is for legacy resources and servers which don't list singular forms. For those we must still guess. - if len(resource.SingularName) == 0 { - versionMapper.Add(gv.WithKind(resource.Kind), scope) - // TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior - versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope) - continue - } - - plural := gv.WithResource(resource.Name) - singular := gv.WithResource(resource.SingularName) - versionMapper.AddSpecific(gv.WithKind(resource.Kind), plural, singular, scope) - // TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior - versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope) - } - // TODO why is this type not in discovery (at least for "v1") - versionMapper.Add(gv.WithKind("List"), meta.RESTScopeRoot) - unionMapper = append(unionMapper, versionMapper) - } - } - - for _, group := range groupPriority { - resourcePriority = append(resourcePriority, schema.GroupVersionResource{ - Group: group, - Version: meta.AnyVersion, - Resource: meta.AnyResource, - }) - kindPriority = append(kindPriority, schema.GroupVersionKind{ - Group: group, - Version: meta.AnyVersion, - Kind: meta.AnyKind, - }) - } - - return meta.PriorityRESTMapper{ - Delegate: unionMapper, - ResourcePriority: resourcePriority, - KindPriority: kindPriority, - } -} - -// GetAPIGroupResources uses the provided discovery client to gather -// discovery information and populate a slice of APIGroupResources. -func GetAPIGroupResources(cl DiscoveryInterface) ([]*APIGroupResources, error) { - apiGroups, err := cl.ServerGroups() - if err != nil { - return nil, err - } - var result []*APIGroupResources - for _, group := range apiGroups.Groups { - groupResources := &APIGroupResources{ - Group: group, - VersionedResources: make(map[string][]metav1.APIResource), - } - for _, version := range group.Versions { - resources, err := cl.ServerResourcesForGroupVersion(version.GroupVersion) - if err != nil { - // continue as best we can - // TODO track the errors and update callers to handle partial errors. - continue - } - groupResources.VersionedResources[version.Version] = resources.APIResources - } - result = append(result, groupResources) - } - return result, nil -} - -// DeferredDiscoveryRESTMapper is a RESTMapper that will defer -// initialization of the RESTMapper until the first mapping is -// requested. -type DeferredDiscoveryRESTMapper struct { - initMu sync.Mutex - delegate meta.RESTMapper - cl CachedDiscoveryInterface - versionInterface meta.VersionInterfacesFunc -} - -// NewDeferredDiscoveryRESTMapper returns a -// DeferredDiscoveryRESTMapper that will lazily query the provided -// client for discovery information to do REST mappings. -func NewDeferredDiscoveryRESTMapper(cl CachedDiscoveryInterface, versionInterface meta.VersionInterfacesFunc) *DeferredDiscoveryRESTMapper { - return &DeferredDiscoveryRESTMapper{ - cl: cl, - versionInterface: versionInterface, - } -} - -func (d *DeferredDiscoveryRESTMapper) getDelegate() (meta.RESTMapper, error) { - d.initMu.Lock() - defer d.initMu.Unlock() - - if d.delegate != nil { - return d.delegate, nil - } - - groupResources, err := GetAPIGroupResources(d.cl) - if err != nil { - return nil, err - } - - d.delegate = NewRESTMapper(groupResources, d.versionInterface) - return d.delegate, err -} - -// Reset resets the internally cached Discovery information and will -// cause the next mapping request to re-discover. -func (d *DeferredDiscoveryRESTMapper) Reset() { - glog.V(5).Info("Invalidating discovery information") - - d.initMu.Lock() - defer d.initMu.Unlock() - - d.cl.Invalidate() - d.delegate = nil -} - -// KindFor takes a partial resource and returns back the single match. -// It returns an error if there are multiple matches. -func (d *DeferredDiscoveryRESTMapper) KindFor(resource schema.GroupVersionResource) (gvk schema.GroupVersionKind, err error) { - del, err := d.getDelegate() - if err != nil { - return schema.GroupVersionKind{}, err - } - gvk, err = del.KindFor(resource) - if err != nil && !d.cl.Fresh() { - d.Reset() - gvk, err = d.KindFor(resource) - } - return -} - -// KindsFor takes a partial resource and returns back the list of -// potential kinds in priority order. -func (d *DeferredDiscoveryRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvks []schema.GroupVersionKind, err error) { - del, err := d.getDelegate() - if err != nil { - return nil, err - } - gvks, err = del.KindsFor(resource) - if len(gvks) == 0 && !d.cl.Fresh() { - d.Reset() - gvks, err = d.KindsFor(resource) - } - return -} - -// ResourceFor takes a partial resource and returns back the single -// match. It returns an error if there are multiple matches. -func (d *DeferredDiscoveryRESTMapper) ResourceFor(input schema.GroupVersionResource) (gvr schema.GroupVersionResource, err error) { - del, err := d.getDelegate() - if err != nil { - return schema.GroupVersionResource{}, err - } - gvr, err = del.ResourceFor(input) - if err != nil && !d.cl.Fresh() { - d.Reset() - gvr, err = d.ResourceFor(input) - } - return -} - -// ResourcesFor takes a partial resource and returns back the list of -// potential resource in priority order. -func (d *DeferredDiscoveryRESTMapper) ResourcesFor(input schema.GroupVersionResource) (gvrs []schema.GroupVersionResource, err error) { - del, err := d.getDelegate() - if err != nil { - return nil, err - } - gvrs, err = del.ResourcesFor(input) - if len(gvrs) == 0 && !d.cl.Fresh() { - d.Reset() - gvrs, err = d.ResourcesFor(input) - } - return -} - -// RESTMapping identifies a preferred resource mapping for the -// provided group kind. -func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (m *meta.RESTMapping, err error) { - del, err := d.getDelegate() - if err != nil { - return nil, err - } - m, err = del.RESTMapping(gk, versions...) - if err != nil && !d.cl.Fresh() { - d.Reset() - m, err = d.RESTMapping(gk, versions...) - } - return -} - -// RESTMappings returns the RESTMappings for the provided group kind -// in a rough internal preferred order. If no kind is found, it will -// return a NoResourceMatchError. -func (d *DeferredDiscoveryRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (ms []*meta.RESTMapping, err error) { - del, err := d.getDelegate() - if err != nil { - return nil, err - } - ms, err = del.RESTMappings(gk, versions...) - if len(ms) == 0 && !d.cl.Fresh() { - d.Reset() - ms, err = d.RESTMappings(gk, versions...) - } - return -} - -// ResourceSingularizer converts a resource name from plural to -// singular (e.g., from pods to pod). -func (d *DeferredDiscoveryRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { - del, err := d.getDelegate() - if err != nil { - return resource, err - } - singular, err = del.ResourceSingularizer(resource) - if err != nil && !d.cl.Fresh() { - d.Reset() - singular, err = d.ResourceSingularizer(resource) - } - return -} - -func (d *DeferredDiscoveryRESTMapper) String() string { - del, err := d.getDelegate() - if err != nil { - return fmt.Sprintf("DeferredDiscoveryRESTMapper{%v}", err) - } - return fmt.Sprintf("DeferredDiscoveryRESTMapper{\n\t%v\n}", del) -} - -// Make sure it satisfies the interface -var _ meta.RESTMapper = &DeferredDiscoveryRESTMapper{} diff --git a/deps/k8s.io/client-go/discovery/restmapper_test.go b/deps/k8s.io/client-go/discovery/restmapper_test.go deleted file mode 100644 index 69ee7e686..000000000 --- a/deps/k8s.io/client-go/discovery/restmapper_test.go +++ /dev/null @@ -1,384 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package discovery_test - -import ( - "reflect" - "testing" - - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/version" - . "k8s.io/client-go/discovery" - restclient "k8s.io/client-go/rest" - "k8s.io/client-go/rest/fake" - - "github.com/googleapis/gnostic/OpenAPIv2" - "github.com/stretchr/testify/assert" -) - -func TestRESTMapper(t *testing.T) { - resources := []*APIGroupResources{ - { - Group: metav1.APIGroup{ - Name: "extensions", - Versions: []metav1.GroupVersionForDiscovery{ - {Version: "v1beta"}, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1beta"}, - }, - VersionedResources: map[string][]metav1.APIResource{ - "v1beta": { - {Name: "jobs", Namespaced: true, Kind: "Job"}, - {Name: "pods", Namespaced: true, Kind: "Pod"}, - }, - }, - }, - { - Group: metav1.APIGroup{ - Versions: []metav1.GroupVersionForDiscovery{ - {Version: "v1"}, - {Version: "v2"}, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1"}, - }, - VersionedResources: map[string][]metav1.APIResource{ - "v1": { - {Name: "pods", Namespaced: true, Kind: "Pod"}, - }, - "v2": { - {Name: "pods", Namespaced: true, Kind: "Pod"}, - }, - }, - }, - - // This group tests finding and prioritizing resources that only exist in non-preferred versions - { - Group: metav1.APIGroup{ - Name: "unpreferred", - Versions: []metav1.GroupVersionForDiscovery{ - {Version: "v1"}, - {Version: "v2beta1"}, - {Version: "v2alpha1"}, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1"}, - }, - VersionedResources: map[string][]metav1.APIResource{ - "v1": { - {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, - }, - "v2beta1": { - {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, - {Name: "peas", Namespaced: true, Kind: "Pea"}, - }, - "v2alpha1": { - {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, - {Name: "peas", Namespaced: true, Kind: "Pea"}, - }, - }, - }, - } - - restMapper := NewRESTMapper(resources, nil) - - kindTCs := []struct { - input schema.GroupVersionResource - want schema.GroupVersionKind - }{ - { - input: schema.GroupVersionResource{ - Resource: "pods", - }, - want: schema.GroupVersionKind{ - Version: "v1", - Kind: "Pod", - }, - }, - { - input: schema.GroupVersionResource{ - Version: "v1", - Resource: "pods", - }, - want: schema.GroupVersionKind{ - Version: "v1", - Kind: "Pod", - }, - }, - { - input: schema.GroupVersionResource{ - Version: "v2", - Resource: "pods", - }, - want: schema.GroupVersionKind{ - Version: "v2", - Kind: "Pod", - }, - }, - { - input: schema.GroupVersionResource{ - Resource: "pods", - }, - want: schema.GroupVersionKind{ - Version: "v1", - Kind: "Pod", - }, - }, - { - input: schema.GroupVersionResource{ - Resource: "jobs", - }, - want: schema.GroupVersionKind{ - Group: "extensions", - Version: "v1beta", - Kind: "Job", - }, - }, - { - input: schema.GroupVersionResource{ - Resource: "peas", - }, - want: schema.GroupVersionKind{ - Group: "unpreferred", - Version: "v2beta1", - Kind: "Pea", - }, - }, - } - - for _, tc := range kindTCs { - got, err := restMapper.KindFor(tc.input) - if err != nil { - t.Errorf("KindFor(%#v) unexpected error: %v", tc.input, err) - continue - } - - if !reflect.DeepEqual(got, tc.want) { - t.Errorf("KindFor(%#v) = %#v, want %#v", tc.input, got, tc.want) - } - } - - resourceTCs := []struct { - input schema.GroupVersionResource - want schema.GroupVersionResource - }{ - { - input: schema.GroupVersionResource{ - Resource: "pods", - }, - want: schema.GroupVersionResource{ - Version: "v1", - Resource: "pods", - }, - }, - { - input: schema.GroupVersionResource{ - Version: "v1", - Resource: "pods", - }, - want: schema.GroupVersionResource{ - Version: "v1", - Resource: "pods", - }, - }, - { - input: schema.GroupVersionResource{ - Version: "v2", - Resource: "pods", - }, - want: schema.GroupVersionResource{ - Version: "v2", - Resource: "pods", - }, - }, - { - input: schema.GroupVersionResource{ - Resource: "pods", - }, - want: schema.GroupVersionResource{ - Version: "v1", - Resource: "pods", - }, - }, - { - input: schema.GroupVersionResource{ - Resource: "jobs", - }, - want: schema.GroupVersionResource{ - Group: "extensions", - Version: "v1beta", - Resource: "jobs", - }, - }, - } - - for _, tc := range resourceTCs { - got, err := restMapper.ResourceFor(tc.input) - if err != nil { - t.Errorf("ResourceFor(%#v) unexpected error: %v", tc.input, err) - continue - } - - if !reflect.DeepEqual(got, tc.want) { - t.Errorf("ResourceFor(%#v) = %#v, want %#v", tc.input, got, tc.want) - } - } -} - -func TestDeferredDiscoveryRESTMapper_CacheMiss(t *testing.T) { - assert := assert.New(t) - - cdc := fakeCachedDiscoveryInterface{fresh: false} - m := NewDeferredDiscoveryRESTMapper(&cdc, nil) - assert.False(cdc.fresh, "should NOT be fresh after instantiation") - assert.Zero(cdc.invalidateCalls, "should not have called Invalidate()") - - gvk, err := m.KindFor(schema.GroupVersionResource{ - Group: "a", - Version: "v1", - Resource: "foo", - }) - assert.NoError(err) - assert.True(cdc.fresh, "should be fresh after a cache-miss") - assert.Equal(cdc.invalidateCalls, 1, "should have called Invalidate() once") - assert.Equal(gvk.Kind, "Foo") - - gvk, err = m.KindFor(schema.GroupVersionResource{ - Group: "a", - Version: "v1", - Resource: "foo", - }) - assert.NoError(err) - assert.Equal(cdc.invalidateCalls, 1, "should NOT have called Invalidate() again") - - gvk, err = m.KindFor(schema.GroupVersionResource{ - Group: "a", - Version: "v1", - Resource: "bar", - }) - assert.Error(err) - assert.Equal(cdc.invalidateCalls, 1, "should NOT have called Invalidate() again after another cache-miss, but with fresh==true") - - cdc.fresh = false - gvk, err = m.KindFor(schema.GroupVersionResource{ - Group: "a", - Version: "v1", - Resource: "bar", - }) - assert.Error(err) - assert.Equal(cdc.invalidateCalls, 2, "should HAVE called Invalidate() again after another cache-miss, but with fresh==false") -} - -type fakeCachedDiscoveryInterface struct { - invalidateCalls int - fresh bool - enabledA bool -} - -var _ CachedDiscoveryInterface = &fakeCachedDiscoveryInterface{} - -func (c *fakeCachedDiscoveryInterface) Fresh() bool { - return c.fresh -} - -func (c *fakeCachedDiscoveryInterface) Invalidate() { - c.invalidateCalls = c.invalidateCalls + 1 - c.fresh = true - c.enabledA = true -} - -func (c *fakeCachedDiscoveryInterface) RESTClient() restclient.Interface { - return &fake.RESTClient{} -} - -func (c *fakeCachedDiscoveryInterface) ServerGroups() (*metav1.APIGroupList, error) { - if c.enabledA { - return &metav1.APIGroupList{ - Groups: []metav1.APIGroup{ - { - Name: "a", - Versions: []metav1.GroupVersionForDiscovery{ - { - GroupVersion: "a/v1", - Version: "v1", - }, - }, - PreferredVersion: metav1.GroupVersionForDiscovery{ - GroupVersion: "a/v1", - Version: "v1", - }, - }, - }, - }, nil - } - return &metav1.APIGroupList{}, nil -} - -func (c *fakeCachedDiscoveryInterface) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { - if c.enabledA && groupVersion == "a/v1" { - return &metav1.APIResourceList{ - GroupVersion: "a/v1", - APIResources: []metav1.APIResource{ - { - Name: "foo", - Kind: "Foo", - Namespaced: false, - }, - }, - }, nil - } - - return nil, errors.NewNotFound(schema.GroupResource{}, "") -} - -func (c *fakeCachedDiscoveryInterface) ServerResources() ([]*metav1.APIResourceList, error) { - if c.enabledA { - av1, _ := c.ServerResourcesForGroupVersion("a/v1") - return []*metav1.APIResourceList{av1}, nil - } - return []*metav1.APIResourceList{}, nil -} - -func (c *fakeCachedDiscoveryInterface) ServerPreferredResources() ([]*metav1.APIResourceList, error) { - if c.enabledA { - return []*metav1.APIResourceList{ - { - GroupVersion: "a/v1", - APIResources: []metav1.APIResource{ - { - Name: "foo", - Kind: "Foo", - Verbs: []string{}, - }, - }, - }, - }, nil - } - return nil, nil -} - -func (c *fakeCachedDiscoveryInterface) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { - return nil, nil -} - -func (c *fakeCachedDiscoveryInterface) ServerVersion() (*version.Info, error) { - return &version.Info{}, nil -} - -func (c *fakeCachedDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, error) { - return &openapi_v2.Document{}, nil -} diff --git a/deps/k8s.io/client-go/discovery/round_tripper.go b/deps/k8s.io/client-go/discovery/round_tripper.go new file mode 100644 index 000000000..75b7f5209 --- /dev/null +++ b/deps/k8s.io/client-go/discovery/round_tripper.go @@ -0,0 +1,62 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery + +import ( + "net/http" + "path/filepath" + + "github.com/golang/glog" + "github.com/gregjones/httpcache" + "github.com/gregjones/httpcache/diskcache" + "github.com/peterbourgon/diskv" +) + +type cacheRoundTripper struct { + rt *httpcache.Transport +} + +// newCacheRoundTripper creates a roundtripper that reads the ETag on +// response headers and send the If-None-Match header on subsequent +// corresponding requests. +func newCacheRoundTripper(cacheDir string, rt http.RoundTripper) http.RoundTripper { + d := diskv.New(diskv.Options{ + BasePath: cacheDir, + TempDir: filepath.Join(cacheDir, ".diskv-temp"), + }) + t := httpcache.NewTransport(diskcache.NewWithDiskv(d)) + t.Transport = rt + + return &cacheRoundTripper{rt: t} +} + +func (rt *cacheRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + return rt.rt.RoundTrip(req) +} + +func (rt *cacheRoundTripper) CancelRequest(req *http.Request) { + type canceler interface { + CancelRequest(*http.Request) + } + if cr, ok := rt.rt.Transport.(canceler); ok { + cr.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented by %T", rt.rt.Transport) + } +} + +func (rt *cacheRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt.Transport } diff --git a/deps/k8s.io/client-go/discovery/round_tripper_test.go b/deps/k8s.io/client-go/discovery/round_tripper_test.go new file mode 100644 index 000000000..b15e2e771 --- /dev/null +++ b/deps/k8s.io/client-go/discovery/round_tripper_test.go @@ -0,0 +1,95 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package discovery + +import ( + "bytes" + "io/ioutil" + "net/http" + "net/url" + "os" + "testing" +) + +// copied from k8s.io/client-go/transport/round_trippers_test.go +type testRoundTripper struct { + Request *http.Request + Response *http.Response + Err error +} + +func (rt *testRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + rt.Request = req + return rt.Response, rt.Err +} + +func TestCacheRoundTripper(t *testing.T) { + rt := &testRoundTripper{} + cacheDir, err := ioutil.TempDir("", "cache-rt") + defer os.RemoveAll(cacheDir) + if err != nil { + t.Fatal(err) + } + cache := newCacheRoundTripper(cacheDir, rt) + + // First call, caches the response + req := &http.Request{ + Method: http.MethodGet, + URL: &url.URL{Host: "localhost"}, + } + rt.Response = &http.Response{ + Header: http.Header{"ETag": []string{`"123456"`}}, + Body: ioutil.NopCloser(bytes.NewReader([]byte("Content"))), + StatusCode: http.StatusOK, + } + resp, err := cache.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + content, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Fatal(err) + } + if string(content) != "Content" { + t.Errorf(`Expected Body to be "Content", got %q`, string(content)) + } + + // Second call, returns cached response + req = &http.Request{ + Method: http.MethodGet, + URL: &url.URL{Host: "localhost"}, + } + rt.Response = &http.Response{ + StatusCode: http.StatusNotModified, + Body: ioutil.NopCloser(bytes.NewReader([]byte("Other Content"))), + } + + resp, err = cache.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + + // Read body and make sure we have the initial content + content, err = ioutil.ReadAll(resp.Body) + resp.Body.Close() + if err != nil { + t.Fatal(err) + } + if string(content) != "Content" { + t.Errorf("Invalid content read from cache %q", string(content)) + } +} diff --git a/deps/k8s.io/client-go/discovery/unstructured.go b/deps/k8s.io/client-go/discovery/unstructured.go deleted file mode 100644 index fa7f2ec06..000000000 --- a/deps/k8s.io/client-go/discovery/unstructured.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package discovery - -import ( - "reflect" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// UnstructuredObjectTyper provides a runtime.ObjectTyper implementation for -// runtime.Unstructured object based on discovery information. -type UnstructuredObjectTyper struct { - registered map[schema.GroupVersionKind]bool - typers []runtime.ObjectTyper -} - -// NewUnstructuredObjectTyper returns a runtime.ObjectTyper for -// unstructured objects based on discovery information. It accepts a list of fallback typers -// for handling objects that are not runtime.Unstructured. It does not delegate the Recognizes -// check, only ObjectKinds. -func NewUnstructuredObjectTyper(groupResources []*APIGroupResources, typers ...runtime.ObjectTyper) *UnstructuredObjectTyper { - dot := &UnstructuredObjectTyper{ - registered: make(map[schema.GroupVersionKind]bool), - typers: typers, - } - for _, group := range groupResources { - for _, discoveryVersion := range group.Group.Versions { - resources, ok := group.VersionedResources[discoveryVersion.Version] - if !ok { - continue - } - - gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} - for _, resource := range resources { - dot.registered[gv.WithKind(resource.Kind)] = true - } - } - } - return dot -} - -// ObjectKinds returns a slice of one element with the group,version,kind of the -// provided object, or an error if the object is not runtime.Unstructured or -// has no group,version,kind information. unversionedType will always be false -// because runtime.Unstructured object should always have group,version,kind -// information set. -func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error) { - if _, ok := obj.(runtime.Unstructured); ok { - gvk := obj.GetObjectKind().GroupVersionKind() - if len(gvk.Kind) == 0 { - return nil, false, runtime.NewMissingKindErr("object has no kind field ") - } - if len(gvk.Version) == 0 { - return nil, false, runtime.NewMissingVersionErr("object has no apiVersion field") - } - return []schema.GroupVersionKind{gvk}, false, nil - } - var lastErr error - for _, typer := range d.typers { - gvks, unversioned, err := typer.ObjectKinds(obj) - if err != nil { - lastErr = err - continue - } - return gvks, unversioned, nil - } - if lastErr == nil { - lastErr = runtime.NewNotRegisteredErrForType(reflect.TypeOf(obj)) - } - return nil, false, lastErr -} - -// Recognizes returns true if the provided group,version,kind was in the -// discovery information. -func (d *UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { - return d.registered[gvk] -} - -var _ runtime.ObjectTyper = &UnstructuredObjectTyper{} diff --git a/deps/k8s.io/client-go/dynamic/BUILD b/deps/k8s.io/client-go/dynamic/BUILD deleted file mode 100644 index c8d61b292..000000000 --- a/deps/k8s.io/client-go/dynamic/BUILD +++ /dev/null @@ -1,69 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "client_test.go", - "dynamic_util_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/dynamic", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/rest/watch:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "client_pool.go", - "dynamic_util.go", - ], - importpath = "k8s.io/client-go/dynamic", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion/queryparams:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/dynamic/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/dynamic/client.go b/deps/k8s.io/client-go/dynamic/client.go deleted file mode 100644 index b93a0ff19..000000000 --- a/deps/k8s.io/client-go/dynamic/client.go +++ /dev/null @@ -1,378 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package dynamic provides a client interface to arbitrary Kubernetes -// APIs that exposes common high level operations and exposes common -// metadata. -package dynamic - -import ( - "encoding/json" - "errors" - "io" - "net/url" - "strings" - - "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/conversion/queryparams" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/kubernetes/scheme" - restclient "k8s.io/client-go/rest" - "k8s.io/client-go/util/flowcontrol" -) - -// Interface is a Kubernetes client that allows you to access metadata -// and manipulate metadata of a Kubernetes API group. -type Interface interface { - // GetRateLimiter returns the rate limiter for this client. - GetRateLimiter() flowcontrol.RateLimiter - // Resource returns an API interface to the specified resource for this client's - // group and version. If resource is not a namespaced resource, then namespace - // is ignored. The ResourceInterface inherits the parameter codec of this client. - Resource(resource *metav1.APIResource, namespace string) ResourceInterface - // ParameterCodec returns a client with the provided parameter codec. - ParameterCodec(parameterCodec runtime.ParameterCodec) Interface -} - -// ResourceInterface is an API interface to a specific resource under a -// dynamic client. -type ResourceInterface interface { - // List returns a list of objects for this resource. - List(opts metav1.ListOptions) (runtime.Object, error) - // Get gets the resource with the specified name. - Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) - // Delete deletes the resource with the specified name. - Delete(name string, opts *metav1.DeleteOptions) error - // DeleteCollection deletes a collection of objects. - DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error - // Create creates the provided resource. - Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) - // Update updates the provided resource. - Update(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) - // Watch returns a watch.Interface that watches the resource. - Watch(opts metav1.ListOptions) (watch.Interface, error) - // Patch patches the provided resource. - Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) -} - -// Client is a Kubernetes client that allows you to access metadata -// and manipulate metadata of a Kubernetes API group, and implements Interface. -type Client struct { - cl *restclient.RESTClient - parameterCodec runtime.ParameterCodec -} - -// NewClient returns a new client based on the passed in config. The -// codec is ignored, as the dynamic client uses it's own codec. -func NewClient(conf *restclient.Config) (*Client, error) { - // avoid changing the original config - confCopy := *conf - conf = &confCopy - - contentConfig := ContentConfig() - contentConfig.GroupVersion = conf.GroupVersion - if conf.NegotiatedSerializer != nil { - contentConfig.NegotiatedSerializer = conf.NegotiatedSerializer - } - conf.ContentConfig = contentConfig - - if conf.APIPath == "" { - conf.APIPath = "/api" - } - - if len(conf.UserAgent) == 0 { - conf.UserAgent = restclient.DefaultKubernetesUserAgent() - } - - cl, err := restclient.RESTClientFor(conf) - if err != nil { - return nil, err - } - - return &Client{cl: cl}, nil -} - -// GetRateLimiter returns rate limier. -func (c *Client) GetRateLimiter() flowcontrol.RateLimiter { - return c.cl.GetRateLimiter() -} - -// Resource returns an API interface to the specified resource for this client's -// group and version. If resource is not a namespaced resource, then namespace -// is ignored. The ResourceInterface inherits the parameter codec of c. -func (c *Client) Resource(resource *metav1.APIResource, namespace string) ResourceInterface { - return &ResourceClient{ - cl: c.cl, - resource: resource, - ns: namespace, - parameterCodec: c.parameterCodec, - } -} - -// ParameterCodec returns a client with the provided parameter codec. -func (c *Client) ParameterCodec(parameterCodec runtime.ParameterCodec) Interface { - return &Client{ - cl: c.cl, - parameterCodec: parameterCodec, - } -} - -// ResourceClient is an API interface to a specific resource under a -// dynamic client, and implements ResourceInterface. -type ResourceClient struct { - cl *restclient.RESTClient - resource *metav1.APIResource - ns string - parameterCodec runtime.ParameterCodec -} - -func (rc *ResourceClient) parseResourceSubresourceName() (string, []string) { - var resourceName string - var subresourceName []string - if strings.Contains(rc.resource.Name, "/") { - resourceName = strings.Split(rc.resource.Name, "/")[0] - subresourceName = strings.Split(rc.resource.Name, "/")[1:] - } else { - resourceName = rc.resource.Name - } - - return resourceName, subresourceName -} - -// List returns a list of objects for this resource. -func (rc *ResourceClient) List(opts metav1.ListOptions) (runtime.Object, error) { - parameterEncoder := rc.parameterCodec - if parameterEncoder == nil { - parameterEncoder = defaultParameterEncoder - } - return rc.cl.Get(). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(rc.resource.Name). - VersionedParams(&opts, parameterEncoder). - Do(). - Get() -} - -// Get gets the resource with the specified name. -func (rc *ResourceClient) Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) { - parameterEncoder := rc.parameterCodec - if parameterEncoder == nil { - parameterEncoder = defaultParameterEncoder - } - result := new(unstructured.Unstructured) - resourceName, subresourceName := rc.parseResourceSubresourceName() - err := rc.cl.Get(). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(resourceName). - SubResource(subresourceName...). - VersionedParams(&opts, parameterEncoder). - Name(name). - Do(). - Into(result) - return result, err -} - -// Delete deletes the resource with the specified name. -func (rc *ResourceClient) Delete(name string, opts *metav1.DeleteOptions) error { - return rc.cl.Delete(). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(rc.resource.Name). - Name(name). - Body(opts). - Do(). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (rc *ResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error { - parameterEncoder := rc.parameterCodec - if parameterEncoder == nil { - parameterEncoder = defaultParameterEncoder - } - return rc.cl.Delete(). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(rc.resource.Name). - VersionedParams(&listOptions, parameterEncoder). - Body(deleteOptions). - Do(). - Error() -} - -// Create creates the provided resource. -func (rc *ResourceClient) Create(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := new(unstructured.Unstructured) - resourceName, subresourceName := rc.parseResourceSubresourceName() - req := rc.cl.Post(). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(resourceName). - Body(obj) - if len(subresourceName) > 0 { - // If the provided resource is a subresource, the POST request should contain - // object name. Examples of subresources that support Create operation: - // core/v1/pods/{name}/binding - // core/v1/pods/{name}/eviction - // extensions/v1beta1/deployments/{name}/rollback - // apps/v1beta1/deployments/{name}/rollback - // NOTE: Currently our system assumes every subresource object has the same - // name as the parent resource object. E.g. a pods/binding object having - // metadada.name "foo" means pod "foo" is being bound. We may need to - // change this if we break the assumption in the future. - req = req.SubResource(subresourceName...). - Name(obj.GetName()) - } - err := req.Do(). - Into(result) - return result, err -} - -// Update updates the provided resource. -func (rc *ResourceClient) Update(obj *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := new(unstructured.Unstructured) - if len(obj.GetName()) == 0 { - return result, errors.New("object missing name") - } - resourceName, subresourceName := rc.parseResourceSubresourceName() - err := rc.cl.Put(). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(resourceName). - SubResource(subresourceName...). - // NOTE: Currently our system assumes every subresource object has the same - // name as the parent resource object. E.g. a pods/binding object having - // metadada.name "foo" means pod "foo" is being bound. We may need to - // change this if we break the assumption in the future. - Name(obj.GetName()). - Body(obj). - Do(). - Into(result) - return result, err -} - -// Watch returns a watch.Interface that watches the resource. -func (rc *ResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { - parameterEncoder := rc.parameterCodec - if parameterEncoder == nil { - parameterEncoder = defaultParameterEncoder - } - opts.Watch = true - return rc.cl.Get(). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(rc.resource.Name). - VersionedParams(&opts, parameterEncoder). - Watch() -} - -func (rc *ResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) { - result := new(unstructured.Unstructured) - resourceName, subresourceName := rc.parseResourceSubresourceName() - err := rc.cl.Patch(pt). - NamespaceIfScoped(rc.ns, rc.resource.Namespaced). - Resource(resourceName). - SubResource(subresourceName...). - Name(name). - Body(data). - Do(). - Into(result) - return result, err -} - -// dynamicCodec is a codec that wraps the standard unstructured codec -// with special handling for Status objects. -type dynamicCodec struct{} - -func (dynamicCodec) Decode(data []byte, gvk *schema.GroupVersionKind, obj runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) { - obj, gvk, err := unstructured.UnstructuredJSONScheme.Decode(data, gvk, obj) - if err != nil { - return nil, nil, err - } - - if _, ok := obj.(*metav1.Status); !ok && strings.ToLower(gvk.Kind) == "status" { - obj = &metav1.Status{} - err := json.Unmarshal(data, obj) - if err != nil { - return nil, nil, err - } - } - - return obj, gvk, nil -} - -func (dynamicCodec) Encode(obj runtime.Object, w io.Writer) error { - return unstructured.UnstructuredJSONScheme.Encode(obj, w) -} - -// ContentConfig returns a restclient.ContentConfig for dynamic types. -func ContentConfig() restclient.ContentConfig { - var jsonInfo runtime.SerializerInfo - // TODO: scheme.Codecs here should become "pkg/apis/server/scheme" which is the minimal core you need - // to talk to a kubernetes server - for _, info := range scheme.Codecs.SupportedMediaTypes() { - if info.MediaType == runtime.ContentTypeJSON { - jsonInfo = info - break - } - } - - jsonInfo.Serializer = dynamicCodec{} - jsonInfo.PrettySerializer = nil - return restclient.ContentConfig{ - AcceptContentTypes: runtime.ContentTypeJSON, - ContentType: runtime.ContentTypeJSON, - NegotiatedSerializer: serializer.NegotiatedSerializerWrapper(jsonInfo), - } -} - -// paramaterCodec is a codec converts an API object to query -// parameters without trying to convert to the target version. -type parameterCodec struct{} - -func (parameterCodec) EncodeParameters(obj runtime.Object, to schema.GroupVersion) (url.Values, error) { - return queryparams.Convert(obj) -} - -func (parameterCodec) DecodeParameters(parameters url.Values, from schema.GroupVersion, into runtime.Object) error { - return errors.New("DecodeParameters not implemented on dynamic parameterCodec") -} - -var defaultParameterEncoder runtime.ParameterCodec = parameterCodec{} - -type versionedParameterEncoderWithV1Fallback struct{} - -func (versionedParameterEncoderWithV1Fallback) EncodeParameters(obj runtime.Object, to schema.GroupVersion) (url.Values, error) { - ret, err := scheme.ParameterCodec.EncodeParameters(obj, to) - if err != nil && runtime.IsNotRegisteredError(err) { - // fallback to v1 - return scheme.ParameterCodec.EncodeParameters(obj, v1.SchemeGroupVersion) - } - return ret, err -} - -func (versionedParameterEncoderWithV1Fallback) DecodeParameters(parameters url.Values, from schema.GroupVersion, into runtime.Object) error { - return errors.New("DecodeParameters not implemented on versionedParameterEncoderWithV1Fallback") -} - -// VersionedParameterEncoderWithV1Fallback is useful for encoding query -// parameters for custom resources. It tries to convert object to the -// specified version before converting it to query parameters, and falls back to -// converting to v1 if the object is not registered in the specified version. -// For the record, currently API server always treats query parameters sent to a -// custom resource endpoint as v1. -var VersionedParameterEncoderWithV1Fallback runtime.ParameterCodec = versionedParameterEncoderWithV1Fallback{} diff --git a/deps/k8s.io/client-go/dynamic/client_pool.go b/deps/k8s.io/client-go/dynamic/client_pool.go deleted file mode 100644 index a5e1b2978..000000000 --- a/deps/k8s.io/client-go/dynamic/client_pool.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package dynamic - -import ( - "sync" - - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime/schema" - restclient "k8s.io/client-go/rest" -) - -// ClientPool manages a pool of dynamic clients. -type ClientPool interface { - // ClientForGroupVersionResource returns a client configured for the specified groupVersionResource. - // Resource may be empty. - ClientForGroupVersionResource(resource schema.GroupVersionResource) (Interface, error) - // ClientForGroupVersionKind returns a client configured for the specified groupVersionKind. - // Kind may be empty. - ClientForGroupVersionKind(kind schema.GroupVersionKind) (Interface, error) -} - -// APIPathResolverFunc knows how to convert a groupVersion to its API path. The Kind field is -// optional. -type APIPathResolverFunc func(kind schema.GroupVersionKind) string - -// LegacyAPIPathResolverFunc can resolve paths properly with the legacy API. -func LegacyAPIPathResolverFunc(kind schema.GroupVersionKind) string { - if len(kind.Group) == 0 { - return "/api" - } - return "/apis" -} - -// clientPoolImpl implements ClientPool and caches clients for the resource group versions -// is asked to retrieve. This type is thread safe. -type clientPoolImpl struct { - lock sync.RWMutex - config *restclient.Config - clients map[schema.GroupVersion]*Client - apiPathResolverFunc APIPathResolverFunc - mapper meta.RESTMapper -} - -// NewClientPool returns a ClientPool from the specified config. It reuses clients for the same -// group version. It is expected this type may be wrapped by specific logic that special cases certain -// resources or groups. -func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathResolverFunc APIPathResolverFunc) ClientPool { - confCopy := *config - - return &clientPoolImpl{ - config: &confCopy, - clients: map[schema.GroupVersion]*Client{}, - apiPathResolverFunc: apiPathResolverFunc, - mapper: mapper, - } -} - -// Instantiates a new dynamic client pool with the given config. -func NewDynamicClientPool(cfg *restclient.Config) ClientPool { - // restMapper is not needed when using LegacyAPIPathResolverFunc - emptyMapper := meta.MultiRESTMapper{} - return NewClientPool(cfg, emptyMapper, LegacyAPIPathResolverFunc) -} - -// ClientForGroupVersionResource uses the provided RESTMapper to identify the appropriate resource. Resource may -// be empty. If no matching kind is found the underlying client for that group is still returned. -func (c *clientPoolImpl) ClientForGroupVersionResource(resource schema.GroupVersionResource) (Interface, error) { - kinds, err := c.mapper.KindsFor(resource) - if err != nil { - if meta.IsNoMatchError(err) { - return c.ClientForGroupVersionKind(schema.GroupVersionKind{Group: resource.Group, Version: resource.Version}) - } - return nil, err - } - return c.ClientForGroupVersionKind(kinds[0]) -} - -// ClientForGroupVersion returns a client for the specified groupVersion, creates one if none exists. Kind -// in the GroupVersionKind may be empty. -func (c *clientPoolImpl) ClientForGroupVersionKind(kind schema.GroupVersionKind) (Interface, error) { - c.lock.Lock() - defer c.lock.Unlock() - - gv := kind.GroupVersion() - - // do we have a client already configured? - if existingClient, found := c.clients[gv]; found { - return existingClient, nil - } - - // avoid changing the original config - confCopy := *c.config - conf := &confCopy - - // we need to set the api path based on group version, if no group, default to legacy path - conf.APIPath = c.apiPathResolverFunc(kind) - - // we need to make a client - conf.GroupVersion = &gv - - dynamicClient, err := NewClient(conf) - if err != nil { - return nil, err - } - c.clients[gv] = dynamicClient - return dynamicClient, nil -} diff --git a/deps/k8s.io/client-go/dynamic/client_test.go b/deps/k8s.io/client-go/dynamic/client_test.go index ffa550ed5..e74cb832a 100644 --- a/deps/k8s.io/client-go/dynamic/client_test.go +++ b/deps/k8s.io/client-go/dynamic/client_test.go @@ -58,11 +58,10 @@ func getObject(version, kind, name string) *unstructured.Unstructured { } } -func getClientServer(gv *schema.GroupVersion, h func(http.ResponseWriter, *http.Request)) (Interface, *httptest.Server, error) { +func getClientServer(h func(http.ResponseWriter, *http.Request)) (Interface, *httptest.Server, error) { srv := httptest.NewServer(http.HandlerFunc(h)) - cl, err := NewClient(&restclient.Config{ - Host: srv.URL, - ContentConfig: restclient.ContentConfig{GroupVersion: gv}, + cl, err := NewForConfig(&restclient.Config{ + Host: srv.URL, }) if err != nil { srv.Close() @@ -81,7 +80,7 @@ func TestList(t *testing.T) { }{ { name: "normal_list", - path: "/api/gtest/vtest/rtest", + path: "/apis/gtest/vtest/rtest", resp: getListJSON("vTest", "rTestList", getJSON("vTest", "rTest", "item1"), getJSON("vTest", "rTest", "item2")), @@ -99,7 +98,7 @@ func TestList(t *testing.T) { { name: "namespaced_list", namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest", resp: getListJSON("vTest", "rTestList", getJSON("vTest", "rTest", "item1"), getJSON("vTest", "rTest", "item2")), @@ -116,9 +115,8 @@ func TestList(t *testing.T) { }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: "rtest"} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { t.Errorf("List(%q) got HTTP method %s. wanted GET", tc.name, r.Method) } @@ -136,7 +134,7 @@ func TestList(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).List(metav1.ListOptions{}) + got, err := cl.Resource(resource).Namespace(tc.namespace).List(metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when listing %q: %v", tc.name, err) continue @@ -150,17 +148,18 @@ func TestList(t *testing.T) { func TestGet(t *testing.T) { tcs := []struct { - resource string - namespace string - name string - path string - resp []byte - want *unstructured.Unstructured + resource string + subresource []string + namespace string + name string + path string + resp []byte + want *unstructured.Unstructured }{ { resource: "rtest", name: "normal_get", - path: "/api/gtest/vtest/rtest/normal_get", + path: "/apis/gtest/vtest/rtest/normal_get", resp: getJSON("vTest", "rTest", "normal_get"), want: getObject("vTest", "rTest", "normal_get"), }, @@ -168,30 +167,31 @@ func TestGet(t *testing.T) { resource: "rtest", namespace: "nstest", name: "namespaced_get", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_get", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_get", resp: getJSON("vTest", "rTest", "namespaced_get"), want: getObject("vTest", "rTest", "namespaced_get"), }, { - resource: "rtest/srtest", - name: "normal_subresource_get", - path: "/api/gtest/vtest/rtest/normal_subresource_get/srtest", - resp: getJSON("vTest", "srTest", "normal_subresource_get"), - want: getObject("vTest", "srTest", "normal_subresource_get"), + resource: "rtest", + subresource: []string{"srtest"}, + name: "normal_subresource_get", + path: "/apis/gtest/vtest/rtest/normal_subresource_get/srtest", + resp: getJSON("vTest", "srTest", "normal_subresource_get"), + want: getObject("vTest", "srTest", "normal_subresource_get"), }, { - resource: "rtest/srtest", - namespace: "nstest", - name: "namespaced_subresource_get", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_get/srtest", - resp: getJSON("vTest", "srTest", "namespaced_subresource_get"), - want: getObject("vTest", "srTest", "namespaced_subresource_get"), + resource: "rtest", + subresource: []string{"srtest"}, + namespace: "nstest", + name: "namespaced_subresource_get", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_get/srtest", + resp: getJSON("vTest", "srTest", "namespaced_subresource_get"), + want: getObject("vTest", "srTest", "namespaced_subresource_get"), }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: tc.resource} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { t.Errorf("Get(%q) got HTTP method %s. wanted GET", tc.name, r.Method) } @@ -209,7 +209,7 @@ func TestGet(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).Get(tc.name, metav1.GetOptions{}) + got, err := cl.Resource(resource).Namespace(tc.namespace).Get(tc.name, metav1.GetOptions{}, tc.subresource...) if err != nil { t.Errorf("unexpected error when getting %q: %v", tc.name, err) continue @@ -222,29 +222,50 @@ func TestGet(t *testing.T) { } func TestDelete(t *testing.T) { + background := metav1.DeletePropagationBackground + uid := types.UID("uid") + statusOK := &metav1.Status{ TypeMeta: metav1.TypeMeta{Kind: "Status"}, Status: metav1.StatusSuccess, } tcs := []struct { - namespace string - name string - path string + subresource []string + namespace string + name string + path string + deleteOptions *metav1.DeleteOptions }{ { name: "normal_delete", - path: "/api/gtest/vtest/rtest/normal_delete", + path: "/apis/gtest/vtest/rtest/normal_delete", }, { namespace: "nstest", name: "namespaced_delete", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_delete", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_delete", + }, + { + subresource: []string{"srtest"}, + name: "normal_delete", + path: "/apis/gtest/vtest/rtest/normal_delete/srtest", + }, + { + subresource: []string{"srtest"}, + namespace: "nstest", + name: "namespaced_delete", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_delete/srtest", + }, + { + namespace: "nstest", + name: "namespaced_delete_with_options", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_delete_with_options", + deleteOptions: &metav1.DeleteOptions{Preconditions: &metav1.Preconditions{UID: &uid}, PropagationPolicy: &background}, }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: "rtest"} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "DELETE" { t.Errorf("Delete(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method) } @@ -262,7 +283,7 @@ func TestDelete(t *testing.T) { } defer srv.Close() - err = cl.Resource(resource, tc.namespace).Delete(tc.name, nil) + err = cl.Resource(resource).Namespace(tc.namespace).Delete(tc.name, tc.deleteOptions, tc.subresource...) if err != nil { t.Errorf("unexpected error when deleting %q: %v", tc.name, err) continue @@ -282,18 +303,17 @@ func TestDeleteCollection(t *testing.T) { }{ { name: "normal_delete_collection", - path: "/api/gtest/vtest/rtest", + path: "/apis/gtest/vtest/rtest", }, { namespace: "nstest", name: "namespaced_delete_collection", - path: "/api/gtest/vtest/namespaces/nstest/rtest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest", }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: "rtest"} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "DELETE" { t.Errorf("DeleteCollection(%q) got HTTP method %s. wanted DELETE", tc.name, r.Method) } @@ -311,7 +331,7 @@ func TestDeleteCollection(t *testing.T) { } defer srv.Close() - err = cl.Resource(resource, tc.namespace).DeleteCollection(nil, metav1.ListOptions{}) + err = cl.Resource(resource).Namespace(tc.namespace).DeleteCollection(nil, metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when deleting collection %q: %v", tc.name, err) continue @@ -321,43 +341,45 @@ func TestDeleteCollection(t *testing.T) { func TestCreate(t *testing.T) { tcs := []struct { - resource string - name string - namespace string - obj *unstructured.Unstructured - path string + resource string + subresource []string + name string + namespace string + obj *unstructured.Unstructured + path string }{ { resource: "rtest", name: "normal_create", - path: "/api/gtest/vtest/rtest", - obj: getObject("vTest", "rTest", "normal_create"), + path: "/apis/gtest/vtest/rtest", + obj: getObject("gtest/vTest", "rTest", "normal_create"), }, { resource: "rtest", name: "namespaced_create", namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest", - obj: getObject("vTest", "rTest", "namespaced_create"), + path: "/apis/gtest/vtest/namespaces/nstest/rtest", + obj: getObject("gtest/vTest", "rTest", "namespaced_create"), }, { - resource: "rtest/srtest", - name: "normal_subresource_create", - path: "/api/gtest/vtest/rtest/normal_subresource_create/srtest", - obj: getObject("vTest", "srTest", "normal_subresource_create"), + resource: "rtest", + subresource: []string{"srtest"}, + name: "normal_subresource_create", + path: "/apis/gtest/vtest/rtest/normal_subresource_create/srtest", + obj: getObject("vTest", "srTest", "normal_subresource_create"), }, { - resource: "rtest/srtest", - name: "namespaced_subresource_create", - namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_create/srtest", - obj: getObject("vTest", "srTest", "namespaced_subresource_create"), + resource: "rtest/", + subresource: []string{"srtest"}, + name: "namespaced_subresource_create", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_create/srtest", + obj: getObject("vTest", "srTest", "namespaced_subresource_create"), }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: tc.resource} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "POST" { t.Errorf("Create(%q) got HTTP method %s. wanted POST", tc.name, r.Method) } @@ -382,7 +404,7 @@ func TestCreate(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).Create(tc.obj) + got, err := cl.Resource(resource).Namespace(tc.namespace).Create(tc.obj, metav1.CreateOptions{}, tc.subresource...) if err != nil { t.Errorf("unexpected error when creating %q: %v", tc.name, err) continue @@ -396,43 +418,45 @@ func TestCreate(t *testing.T) { func TestUpdate(t *testing.T) { tcs := []struct { - resource string - name string - namespace string - obj *unstructured.Unstructured - path string + resource string + subresource []string + name string + namespace string + obj *unstructured.Unstructured + path string }{ { resource: "rtest", name: "normal_update", - path: "/api/gtest/vtest/rtest/normal_update", - obj: getObject("vTest", "rTest", "normal_update"), + path: "/apis/gtest/vtest/rtest/normal_update", + obj: getObject("gtest/vTest", "rTest", "normal_update"), }, { resource: "rtest", name: "namespaced_update", namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_update", - obj: getObject("vTest", "rTest", "namespaced_update"), + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_update", + obj: getObject("gtest/vTest", "rTest", "namespaced_update"), }, { - resource: "rtest/srtest", - name: "normal_subresource_update", - path: "/api/gtest/vtest/rtest/normal_update/srtest", - obj: getObject("vTest", "srTest", "normal_update"), + resource: "rtest", + subresource: []string{"srtest"}, + name: "normal_subresource_update", + path: "/apis/gtest/vtest/rtest/normal_update/srtest", + obj: getObject("gtest/vTest", "srTest", "normal_update"), }, { - resource: "rtest/srtest", - name: "namespaced_subresource_update", - namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_update/srtest", - obj: getObject("vTest", "srTest", "namespaced_update"), + resource: "rtest", + subresource: []string{"srtest"}, + name: "namespaced_subresource_update", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_update/srtest", + obj: getObject("gtest/vTest", "srTest", "namespaced_update"), }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: tc.resource} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "PUT" { t.Errorf("Update(%q) got HTTP method %s. wanted PUT", tc.name, r.Method) } @@ -457,7 +481,7 @@ func TestUpdate(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).Update(tc.obj) + got, err := cl.Resource(resource).Namespace(tc.namespace).Update(tc.obj, metav1.UpdateOptions{}, tc.subresource...) if err != nil { t.Errorf("unexpected error when updating %q: %v", tc.name, err) continue @@ -479,30 +503,29 @@ func TestWatch(t *testing.T) { }{ { name: "normal_watch", - path: "/api/gtest/vtest/rtest", + path: "/apis/gtest/vtest/rtest", query: "watch=true", events: []watch.Event{ - {Type: watch.Added, Object: getObject("vTest", "rTest", "normal_watch")}, - {Type: watch.Modified, Object: getObject("vTest", "rTest", "normal_watch")}, - {Type: watch.Deleted, Object: getObject("vTest", "rTest", "normal_watch")}, + {Type: watch.Added, Object: getObject("gtest/vTest", "rTest", "normal_watch")}, + {Type: watch.Modified, Object: getObject("gtest/vTest", "rTest", "normal_watch")}, + {Type: watch.Deleted, Object: getObject("gtest/vTest", "rTest", "normal_watch")}, }, }, { name: "namespaced_watch", namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest", query: "watch=true", events: []watch.Event{ - {Type: watch.Added, Object: getObject("vTest", "rTest", "namespaced_watch")}, - {Type: watch.Modified, Object: getObject("vTest", "rTest", "namespaced_watch")}, - {Type: watch.Deleted, Object: getObject("vTest", "rTest", "namespaced_watch")}, + {Type: watch.Added, Object: getObject("gtest/vTest", "rTest", "namespaced_watch")}, + {Type: watch.Modified, Object: getObject("gtest/vTest", "rTest", "namespaced_watch")}, + {Type: watch.Deleted, Object: getObject("gtest/vTest", "rTest", "namespaced_watch")}, }, }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: "rtest", Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: "rtest"} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "GET" { t.Errorf("Watch(%q) got HTTP method %s. wanted GET", tc.name, r.Method) } @@ -514,7 +537,7 @@ func TestWatch(t *testing.T) { t.Errorf("Watch(%q) got query %s. wanted %s", tc.name, r.URL.RawQuery, tc.query) } - enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, dynamicCodec{}), dynamicCodec{}) + enc := restclientwatch.NewEncoder(streaming.NewEncoder(w, unstructured.UnstructuredJSONScheme), unstructured.UnstructuredJSONScheme) for _, e := range tc.events { enc.Encode(&e) } @@ -525,7 +548,7 @@ func TestWatch(t *testing.T) { } defer srv.Close() - watcher, err := cl.Resource(resource, tc.namespace).Watch(metav1.ListOptions{}) + watcher, err := cl.Resource(resource).Namespace(tc.namespace).Watch(metav1.ListOptions{}) if err != nil { t.Errorf("unexpected error when watching %q: %v", tc.name, err) continue @@ -542,48 +565,50 @@ func TestWatch(t *testing.T) { func TestPatch(t *testing.T) { tcs := []struct { - resource string - name string - namespace string - patch []byte - want *unstructured.Unstructured - path string + resource string + subresource []string + name string + namespace string + patch []byte + want *unstructured.Unstructured + path string }{ { resource: "rtest", name: "normal_patch", - path: "/api/gtest/vtest/rtest/normal_patch", - patch: getJSON("vTest", "rTest", "normal_patch"), - want: getObject("vTest", "rTest", "normal_patch"), + path: "/apis/gtest/vtest/rtest/normal_patch", + patch: getJSON("gtest/vTest", "rTest", "normal_patch"), + want: getObject("gtest/vTest", "rTest", "normal_patch"), }, { resource: "rtest", name: "namespaced_patch", namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_patch", - patch: getJSON("vTest", "rTest", "namespaced_patch"), - want: getObject("vTest", "rTest", "namespaced_patch"), + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_patch", + patch: getJSON("gtest/vTest", "rTest", "namespaced_patch"), + want: getObject("gtest/vTest", "rTest", "namespaced_patch"), }, { - resource: "rtest/srtest", - name: "normal_subresource_patch", - path: "/api/gtest/vtest/rtest/normal_subresource_patch/srtest", - patch: getJSON("vTest", "srTest", "normal_subresource_patch"), - want: getObject("vTest", "srTest", "normal_subresource_patch"), + resource: "rtest", + subresource: []string{"srtest"}, + name: "normal_subresource_patch", + path: "/apis/gtest/vtest/rtest/normal_subresource_patch/srtest", + patch: getJSON("gtest/vTest", "srTest", "normal_subresource_patch"), + want: getObject("gtest/vTest", "srTest", "normal_subresource_patch"), }, { - resource: "rtest/srtest", - name: "namespaced_subresource_patch", - namespace: "nstest", - path: "/api/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_patch/srtest", - patch: getJSON("vTest", "srTest", "namespaced_subresource_patch"), - want: getObject("vTest", "srTest", "namespaced_subresource_patch"), + resource: "rtest", + subresource: []string{"srtest"}, + name: "namespaced_subresource_patch", + namespace: "nstest", + path: "/apis/gtest/vtest/namespaces/nstest/rtest/namespaced_subresource_patch/srtest", + patch: getJSON("gtest/vTest", "srTest", "namespaced_subresource_patch"), + want: getObject("gtest/vTest", "srTest", "namespaced_subresource_patch"), }, } for _, tc := range tcs { - gv := &schema.GroupVersion{Group: "gtest", Version: "vtest"} - resource := &metav1.APIResource{Name: tc.resource, Namespaced: len(tc.namespace) != 0} - cl, srv, err := getClientServer(gv, func(w http.ResponseWriter, r *http.Request) { + resource := schema.GroupVersionResource{Group: "gtest", Version: "vtest", Resource: tc.resource} + cl, srv, err := getClientServer(func(w http.ResponseWriter, r *http.Request) { if r.Method != "PATCH" { t.Errorf("Patch(%q) got HTTP method %s. wanted PATCH", tc.name, r.Method) } @@ -613,7 +638,7 @@ func TestPatch(t *testing.T) { } defer srv.Close() - got, err := cl.Resource(resource, tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch) + got, err := cl.Resource(resource).Namespace(tc.namespace).Patch(tc.name, types.StrategicMergePatchType, tc.patch, metav1.UpdateOptions{}, tc.subresource...) if err != nil { t.Errorf("unexpected error when patching %q: %v", tc.name, err) continue @@ -624,11 +649,3 @@ func TestPatch(t *testing.T) { } } } - -func TestVersionedParameterEncoderWithV1Fallback(t *testing.T) { - enc := VersionedParameterEncoderWithV1Fallback - _, err := enc.EncodeParameters(&metav1.ListOptions{}, schema.GroupVersion{Group: "foo.bar.com", Version: "v4"}) - if err != nil { - t.Errorf("Unexpected error: %v", err) - } -} diff --git a/deps/k8s.io/client-go/dynamic/dynamic_util.go b/deps/k8s.io/client-go/dynamic/dynamic_util.go deleted file mode 100644 index c2cf0daea..000000000 --- a/deps/k8s.io/client-go/dynamic/dynamic_util.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package dynamic - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// VersionInterfaces provides an object converter and metadata -// accessor appropriate for use with unstructured objects. -func VersionInterfaces(schema.GroupVersion) (*meta.VersionInterfaces, error) { - return &meta.VersionInterfaces{ - ObjectConvertor: &unstructured.UnstructuredObjectConverter{}, - MetadataAccessor: meta.NewAccessor(), - }, nil -} - -// NewDiscoveryRESTMapper returns a RESTMapper based on discovery information. -func NewDiscoveryRESTMapper(resources []*metav1.APIResourceList, versionFunc meta.VersionInterfacesFunc) (*meta.DefaultRESTMapper, error) { - rm := meta.NewDefaultRESTMapper(nil, versionFunc) - for _, resourceList := range resources { - gv, err := schema.ParseGroupVersion(resourceList.GroupVersion) - if err != nil { - return nil, err - } - - for _, resource := range resourceList.APIResources { - gvk := gv.WithKind(resource.Kind) - scope := meta.RESTScopeRoot - if resource.Namespaced { - scope = meta.RESTScopeNamespace - } - rm.Add(gvk, scope) - } - } - return rm, nil -} - -// ObjectTyper provides an ObjectTyper implementation for -// unstructured.Unstructured object based on discovery information. -type ObjectTyper struct { - registered map[schema.GroupVersionKind]bool -} - -// NewObjectTyper constructs an ObjectTyper from discovery information. -func NewObjectTyper(resources []*metav1.APIResourceList) (runtime.ObjectTyper, error) { - ot := &ObjectTyper{registered: make(map[schema.GroupVersionKind]bool)} - for _, resourceList := range resources { - gv, err := schema.ParseGroupVersion(resourceList.GroupVersion) - if err != nil { - return nil, err - } - - for _, resource := range resourceList.APIResources { - ot.registered[gv.WithKind(resource.Kind)] = true - } - } - return ot, nil -} - -// ObjectKinds returns a slice of one element with the -// group,version,kind of the provided object, or an error if the -// object is not *unstructured.Unstructured or has no group,version,kind -// information. -func (ot *ObjectTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) { - if _, ok := obj.(*unstructured.Unstructured); !ok { - return nil, false, fmt.Errorf("type %T is invalid for determining dynamic object types", obj) - } - return []schema.GroupVersionKind{obj.GetObjectKind().GroupVersionKind()}, false, nil -} - -// Recognizes returns true if the provided group,version,kind was in -// the discovery information. -func (ot *ObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool { - return ot.registered[gvk] -} diff --git a/deps/k8s.io/client-go/dynamic/dynamic_util_test.go b/deps/k8s.io/client-go/dynamic/dynamic_util_test.go deleted file mode 100644 index cdc68e018..000000000 --- a/deps/k8s.io/client-go/dynamic/dynamic_util_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package dynamic - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func TestDiscoveryRESTMapper(t *testing.T) { - resources := []*metav1.APIResourceList{ - { - GroupVersion: "test/beta1", - APIResources: []metav1.APIResource{ - { - Name: "test_kinds", - Namespaced: true, - Kind: "test_kind", - }, - }, - }, - } - - gvk := schema.GroupVersionKind{ - Group: "test", - Version: "beta1", - Kind: "test_kind", - } - - mapper, err := NewDiscoveryRESTMapper(resources, VersionInterfaces) - if err != nil { - t.Fatalf("unexpected error creating mapper: %s", err) - } - - for _, res := range []schema.GroupVersionResource{ - { - Group: "test", - Version: "beta1", - Resource: "test_kinds", - }, - { - Version: "beta1", - Resource: "test_kinds", - }, - { - Group: "test", - Resource: "test_kinds", - }, - { - Resource: "test_kinds", - }, - } { - got, err := mapper.KindFor(res) - if err != nil { - t.Errorf("KindFor(%#v) unexpected error: %s", res, err) - continue - } - - if got != gvk { - t.Errorf("KindFor(%#v) = %#v; want %#v", res, got, gvk) - } - } -} diff --git a/deps/k8s.io/client-go/dynamic/fake/BUILD b/deps/k8s.io/client-go/dynamic/fake/BUILD deleted file mode 100644 index d006188f8..000000000 --- a/deps/k8s.io/client-go/dynamic/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "client_pool.go", - ], - importpath = "k8s.io/client-go/dynamic/fake", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/dynamic:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/dynamic/fake/client.go b/deps/k8s.io/client-go/dynamic/fake/client.go deleted file mode 100644 index 8399076c2..000000000 --- a/deps/k8s.io/client-go/dynamic/fake/client.go +++ /dev/null @@ -1,163 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package fake provides a fake client interface to arbitrary Kubernetes -// APIs that exposes common high level operations and exposes common -// metadata. -package fake - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/dynamic" - "k8s.io/client-go/testing" - "k8s.io/client-go/util/flowcontrol" -) - -// FakeClient is a fake implementation of dynamic.Interface. -type FakeClient struct { - GroupVersion schema.GroupVersion - - *testing.Fake -} - -// GetRateLimiter returns the rate limiter for this client. -func (c *FakeClient) GetRateLimiter() flowcontrol.RateLimiter { - return nil -} - -// Resource returns an API interface to the specified resource for this client's -// group and version. If resource is not a namespaced resource, then namespace -// is ignored. The ResourceClient inherits the parameter codec of this client -func (c *FakeClient) Resource(resource *metav1.APIResource, namespace string) dynamic.ResourceInterface { - return &FakeResourceClient{ - Resource: c.GroupVersion.WithResource(resource.Name), - Kind: c.GroupVersion.WithKind(resource.Kind), - Namespace: namespace, - - Fake: c.Fake, - } -} - -// ParameterCodec returns a client with the provided parameter codec. -func (c *FakeClient) ParameterCodec(parameterCodec runtime.ParameterCodec) dynamic.Interface { - return &FakeClient{ - Fake: c.Fake, - } -} - -// FakeResourceClient is a fake implementation of dynamic.ResourceInterface -type FakeResourceClient struct { - Resource schema.GroupVersionResource - Kind schema.GroupVersionKind - Namespace string - - *testing.Fake -} - -// List returns a list of objects for this resource. -func (c *FakeResourceClient) List(opts metav1.ListOptions) (runtime.Object, error) { - obj, err := c.Fake. - Invokes(testing.NewListAction(c.Resource, c.Kind, c.Namespace, opts), &unstructured.UnstructuredList{}) - - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &unstructured.UnstructuredList{} - for _, item := range obj.(*unstructured.UnstructuredList).Items { - if label.Matches(labels.Set(item.GetLabels())) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Get gets the resource with the specified name. -func (c *FakeResourceClient) Get(name string, opts metav1.GetOptions) (*unstructured.Unstructured, error) { - obj, err := c.Fake. - Invokes(testing.NewGetAction(c.Resource, c.Namespace, name), &unstructured.Unstructured{}) - - if obj == nil { - return nil, err - } - - return obj.(*unstructured.Unstructured), err -} - -// Delete deletes the resource with the specified name. -func (c *FakeResourceClient) Delete(name string, opts *metav1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteAction(c.Resource, c.Namespace, name), &unstructured.Unstructured{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeResourceClient) DeleteCollection(deleteOptions *metav1.DeleteOptions, listOptions metav1.ListOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteCollectionAction(c.Resource, c.Namespace, listOptions), &unstructured.Unstructured{}) - - return err -} - -// Create creates the provided resource. -func (c *FakeResourceClient) Create(inObj *unstructured.Unstructured) (*unstructured.Unstructured, error) { - obj, err := c.Fake. - Invokes(testing.NewCreateAction(c.Resource, c.Namespace, inObj), &unstructured.Unstructured{}) - - if obj == nil { - return nil, err - } - return obj.(*unstructured.Unstructured), err -} - -// Update updates the provided resource. -func (c *FakeResourceClient) Update(inObj *unstructured.Unstructured) (*unstructured.Unstructured, error) { - obj, err := c.Fake. - Invokes(testing.NewUpdateAction(c.Resource, c.Namespace, inObj), &unstructured.Unstructured{}) - - if obj == nil { - return nil, err - } - return obj.(*unstructured.Unstructured), err -} - -// Watch returns a watch.Interface that watches the resource. -func (c *FakeResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchAction(c.Resource, c.Namespace, opts)) -} - -// Patch patches the provided resource. -func (c *FakeResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) { - obj, err := c.Fake. - Invokes(testing.NewPatchAction(c.Resource, c.Namespace, name, data), &unstructured.Unstructured{}) - - if obj == nil { - return nil, err - } - return obj.(*unstructured.Unstructured), err -} diff --git a/deps/k8s.io/client-go/dynamic/fake/client_pool.go b/deps/k8s.io/client-go/dynamic/fake/client_pool.go deleted file mode 100644 index 7ec114892..000000000 --- a/deps/k8s.io/client-go/dynamic/fake/client_pool.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2017 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package fake provides a fake client interface to arbitrary Kubernetes -// APIs that exposes common high level operations and exposes common -// metadata. -package fake - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/dynamic" - "k8s.io/client-go/testing" -) - -// FakeClientPool provides a fake implementation of dynamic.ClientPool. -// It assumes resource GroupVersions are the same as their corresponding kind GroupVersions. -type FakeClientPool struct { - testing.Fake -} - -// ClientForGroupVersionKind returns a client configured for the specified groupVersionResource. -// Resource may be empty. -func (p *FakeClientPool) ClientForGroupVersionResource(resource schema.GroupVersionResource) (dynamic.Interface, error) { - return p.ClientForGroupVersionKind(resource.GroupVersion().WithKind("")) -} - -// ClientForGroupVersionKind returns a client configured for the specified groupVersionKind. -// Kind may be empty. -func (p *FakeClientPool) ClientForGroupVersionKind(kind schema.GroupVersionKind) (dynamic.Interface, error) { - // we can just create a new client every time for testing purposes - return &FakeClient{ - GroupVersion: kind.GroupVersion(), - Fake: &p.Fake, - }, nil -} diff --git a/deps/k8s.io/client-go/dynamic/fake/simple.go b/deps/k8s.io/client-go/dynamic/fake/simple.go new file mode 100644 index 000000000..24e5c7bff --- /dev/null +++ b/deps/k8s.io/client-go/dynamic/fake/simple.go @@ -0,0 +1,368 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "strings" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/dynamic" + "k8s.io/client-go/testing" +) + +func NewSimpleDynamicClient(scheme *runtime.Scheme, objects ...runtime.Object) *FakeDynamicClient { + // In order to use List with this client, you have to have the v1.List registered in your scheme. Neat thing though + // it does NOT have to be the *same* list + scheme.AddKnownTypeWithName(schema.GroupVersionKind{Group: "fake-dynamic-client-group", Version: "v1", Kind: "List"}, &unstructured.UnstructuredList{}) + + codecs := serializer.NewCodecFactory(scheme) + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &FakeDynamicClient{} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type FakeDynamicClient struct { + testing.Fake + scheme *runtime.Scheme +} + +type dynamicResourceClient struct { + client *FakeDynamicClient + namespace string + resource schema.GroupVersionResource +} + +var _ dynamic.Interface = &FakeDynamicClient{} + +func (c *FakeDynamicClient) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface { + return &dynamicResourceClient{client: c, resource: resource} +} + +func (c *dynamicResourceClient) Namespace(ns string) dynamic.ResourceInterface { + ret := *c + ret.namespace = ns + return &ret +} + +func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { + var uncastRet runtime.Object + var err error + switch { + case len(c.namespace) == 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootCreateAction(c.resource, obj), obj) + + case len(c.namespace) == 0 && len(subresources) > 0: + accessor, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + name := accessor.GetName() + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootCreateSubresourceAction(c.resource, name, strings.Join(subresources, "/"), obj), obj) + + case len(c.namespace) > 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewCreateAction(c.resource, c.namespace, obj), obj) + + case len(c.namespace) > 0 && len(subresources) > 0: + accessor, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + name := accessor.GetName() + uncastRet, err = c.client.Fake. + Invokes(testing.NewCreateSubresourceAction(c.resource, name, strings.Join(subresources, "/"), c.namespace, obj), obj) + + } + + if err != nil { + return nil, err + } + if uncastRet == nil { + return nil, err + } + + ret := &unstructured.Unstructured{} + if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil { + return nil, err + } + return ret, err +} + +func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { + var uncastRet runtime.Object + var err error + switch { + case len(c.namespace) == 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootUpdateAction(c.resource, obj), obj) + + case len(c.namespace) == 0 && len(subresources) > 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(c.resource, strings.Join(subresources, "/"), obj), obj) + + case len(c.namespace) > 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewUpdateAction(c.resource, c.namespace, obj), obj) + + case len(c.namespace) > 0 && len(subresources) > 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewUpdateSubresourceAction(c.resource, strings.Join(subresources, "/"), c.namespace, obj), obj) + + } + + if err != nil { + return nil, err + } + if uncastRet == nil { + return nil, err + } + + ret := &unstructured.Unstructured{} + if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil { + return nil, err + } + return ret, err +} + +func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) { + var uncastRet runtime.Object + var err error + switch { + case len(c.namespace) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(c.resource, "status", obj), obj) + + case len(c.namespace) > 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewUpdateSubresourceAction(c.resource, "status", c.namespace, obj), obj) + + } + + if err != nil { + return nil, err + } + if uncastRet == nil { + return nil, err + } + + ret := &unstructured.Unstructured{} + if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil { + return nil, err + } + return ret, err +} + +func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, subresources ...string) error { + var err error + switch { + case len(c.namespace) == 0 && len(subresources) == 0: + _, err = c.client.Fake. + Invokes(testing.NewRootDeleteAction(c.resource, name), &metav1.Status{Status: "dynamic delete fail"}) + + case len(c.namespace) == 0 && len(subresources) > 0: + _, err = c.client.Fake. + Invokes(testing.NewRootDeleteSubresourceAction(c.resource, strings.Join(subresources, "/"), name), &metav1.Status{Status: "dynamic delete fail"}) + + case len(c.namespace) > 0 && len(subresources) == 0: + _, err = c.client.Fake. + Invokes(testing.NewDeleteAction(c.resource, c.namespace, name), &metav1.Status{Status: "dynamic delete fail"}) + + case len(c.namespace) > 0 && len(subresources) > 0: + _, err = c.client.Fake. + Invokes(testing.NewDeleteSubresourceAction(c.resource, strings.Join(subresources, "/"), c.namespace, name), &metav1.Status{Status: "dynamic delete fail"}) + } + + return err +} + +func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1.ListOptions) error { + var err error + switch { + case len(c.namespace) == 0: + action := testing.NewRootDeleteCollectionAction(c.resource, listOptions) + _, err = c.client.Fake.Invokes(action, &metav1.Status{Status: "dynamic deletecollection fail"}) + + case len(c.namespace) > 0: + action := testing.NewDeleteCollectionAction(c.resource, c.namespace, listOptions) + _, err = c.client.Fake.Invokes(action, &metav1.Status{Status: "dynamic deletecollection fail"}) + + } + + return err +} + +func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { + var uncastRet runtime.Object + var err error + switch { + case len(c.namespace) == 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootGetAction(c.resource, name), &metav1.Status{Status: "dynamic get fail"}) + + case len(c.namespace) == 0 && len(subresources) > 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootGetSubresourceAction(c.resource, strings.Join(subresources, "/"), name), &metav1.Status{Status: "dynamic get fail"}) + + case len(c.namespace) > 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewGetAction(c.resource, c.namespace, name), &metav1.Status{Status: "dynamic get fail"}) + + case len(c.namespace) > 0 && len(subresources) > 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewGetSubresourceAction(c.resource, c.namespace, strings.Join(subresources, "/"), name), &metav1.Status{Status: "dynamic get fail"}) + } + + if err != nil { + return nil, err + } + if uncastRet == nil { + return nil, err + } + + ret := &unstructured.Unstructured{} + if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil { + return nil, err + } + return ret, err +} + +func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { + var obj runtime.Object + var err error + switch { + case len(c.namespace) == 0: + obj, err = c.client.Fake. + Invokes(testing.NewRootListAction(c.resource, schema.GroupVersionKind{Group: "fake-dynamic-client-group", Version: "v1", Kind: "" /*List is appended by the tracker automatically*/}, opts), &metav1.Status{Status: "dynamic list fail"}) + + case len(c.namespace) > 0: + obj, err = c.client.Fake. + Invokes(testing.NewListAction(c.resource, schema.GroupVersionKind{Group: "fake-dynamic-client-group", Version: "v1", Kind: "" /*List is appended by the tracker automatically*/}, c.namespace, opts), &metav1.Status{Status: "dynamic list fail"}) + + } + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + + retUnstructured := &unstructured.Unstructured{} + if err := c.client.scheme.Convert(obj, retUnstructured, nil); err != nil { + return nil, err + } + entireList, err := retUnstructured.ToList() + if err != nil { + return nil, err + } + + list := &unstructured.UnstructuredList{} + for i := range entireList.Items { + item := &entireList.Items[i] + metadata, err := meta.Accessor(item) + if err != nil { + return nil, err + } + if label.Matches(labels.Set(metadata.GetLabels())) { + list.Items = append(list.Items, *item) + } + } + return list, nil +} + +func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + switch { + case len(c.namespace) == 0: + return c.client.Fake. + InvokesWatch(testing.NewRootWatchAction(c.resource, opts)) + + case len(c.namespace) > 0: + return c.client.Fake. + InvokesWatch(testing.NewWatchAction(c.resource, c.namespace, opts)) + + } + + panic("math broke") +} + +func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { + var uncastRet runtime.Object + var err error + switch { + case len(c.namespace) == 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootPatchAction(c.resource, name, data), &metav1.Status{Status: "dynamic patch fail"}) + + case len(c.namespace) == 0 && len(subresources) > 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewRootPatchSubresourceAction(c.resource, name, data, subresources...), &metav1.Status{Status: "dynamic patch fail"}) + + case len(c.namespace) > 0 && len(subresources) == 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewPatchAction(c.resource, c.namespace, name, data), &metav1.Status{Status: "dynamic patch fail"}) + + case len(c.namespace) > 0 && len(subresources) > 0: + uncastRet, err = c.client.Fake. + Invokes(testing.NewPatchSubresourceAction(c.resource, c.namespace, name, data, subresources...), &metav1.Status{Status: "dynamic patch fail"}) + + } + + if err != nil { + return nil, err + } + if uncastRet == nil { + return nil, err + } + + ret := &unstructured.Unstructured{} + if err := c.client.scheme.Convert(uncastRet, ret, nil); err != nil { + return nil, err + } + return ret, err +} diff --git a/deps/k8s.io/client-go/dynamic/fake/simple_test.go b/deps/k8s.io/client-go/dynamic/fake/simple_test.go new file mode 100644 index 000000000..cb79c30b9 --- /dev/null +++ b/deps/k8s.io/client-go/dynamic/fake/simple_test.go @@ -0,0 +1,66 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + "testing" + + "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/diff" +) + +func newUnstructured(apiVersion, kind, namespace, name string) *unstructured.Unstructured { + return &unstructured.Unstructured{ + Object: map[string]interface{}{ + "apiVersion": apiVersion, + "kind": kind, + "metadata": map[string]interface{}{ + "namespace": namespace, + "name": name, + }, + }, + } +} + +func TestList(t *testing.T) { + scheme := runtime.NewScheme() + + client := NewSimpleDynamicClient(scheme, + newUnstructured("group/version", "TheKind", "ns-foo", "name-foo"), + newUnstructured("group2/version", "TheKind", "ns-foo", "name2-foo"), + newUnstructured("group/version", "TheKind", "ns-foo", "name-bar"), + newUnstructured("group/version", "TheKind", "ns-foo", "name-baz"), + newUnstructured("group2/version", "TheKind", "ns-foo", "name2-baz"), + ) + listFirst, err := client.Resource(schema.GroupVersionResource{Group: "group", Version: "version", Resource: "thekinds"}).List(metav1.ListOptions{}) + if err != nil { + t.Fatal(err) + } + + expected := []unstructured.Unstructured{ + *newUnstructured("group/version", "TheKind", "ns-foo", "name-foo"), + *newUnstructured("group/version", "TheKind", "ns-foo", "name-bar"), + *newUnstructured("group/version", "TheKind", "ns-foo", "name-baz"), + } + if !equality.Semantic.DeepEqual(listFirst.Items, expected) { + t.Fatal(diff.ObjectGoPrintDiff(expected, listFirst.Items)) + } +} diff --git a/deps/k8s.io/client-go/dynamic/interface.go b/deps/k8s.io/client-go/dynamic/interface.go new file mode 100644 index 000000000..c457be178 --- /dev/null +++ b/deps/k8s.io/client-go/dynamic/interface.go @@ -0,0 +1,59 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dynamic + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" +) + +type Interface interface { + Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface +} + +type ResourceInterface interface { + Create(obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) + Update(obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) + UpdateStatus(obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error) + Delete(name string, options *metav1.DeleteOptions, subresources ...string) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) + List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) +} + +type NamespaceableResourceInterface interface { + Namespace(string) ResourceInterface + ResourceInterface +} + +// APIPathResolverFunc knows how to convert a groupVersion to its API path. The Kind field is optional. +// TODO find a better place to move this for existing callers +type APIPathResolverFunc func(kind schema.GroupVersionKind) string + +// LegacyAPIPathResolverFunc can resolve paths properly with the legacy API. +// TODO find a better place to move this for existing callers +func LegacyAPIPathResolverFunc(kind schema.GroupVersionKind) string { + if len(kind.Group) == 0 { + return "/api" + } + return "/apis" +} diff --git a/deps/k8s.io/client-go/dynamic/scheme.go b/deps/k8s.io/client-go/dynamic/scheme.go new file mode 100644 index 000000000..c4aa081f9 --- /dev/null +++ b/deps/k8s.io/client-go/dynamic/scheme.go @@ -0,0 +1,98 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dynamic + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/runtime/serializer/versioning" +) + +var watchScheme = runtime.NewScheme() +var basicScheme = runtime.NewScheme() +var deleteScheme = runtime.NewScheme() +var parameterScheme = runtime.NewScheme() +var deleteOptionsCodec = serializer.NewCodecFactory(deleteScheme) +var dynamicParameterCodec = runtime.NewParameterCodec(parameterScheme) + +var versionV1 = schema.GroupVersion{Version: "v1"} + +func init() { + metav1.AddToGroupVersion(watchScheme, versionV1) + metav1.AddToGroupVersion(basicScheme, versionV1) + metav1.AddToGroupVersion(parameterScheme, versionV1) + metav1.AddToGroupVersion(deleteScheme, versionV1) +} + +var watchJsonSerializerInfo = runtime.SerializerInfo{ + MediaType: "application/json", + EncodesAsText: true, + Serializer: json.NewSerializer(json.DefaultMetaFactory, watchScheme, watchScheme, false), + PrettySerializer: json.NewSerializer(json.DefaultMetaFactory, watchScheme, watchScheme, true), + StreamSerializer: &runtime.StreamSerializerInfo{ + EncodesAsText: true, + Serializer: json.NewSerializer(json.DefaultMetaFactory, watchScheme, watchScheme, false), + Framer: json.Framer, + }, +} + +// watchNegotiatedSerializer is used to read the wrapper of the watch stream +type watchNegotiatedSerializer struct{} + +var watchNegotiatedSerializerInstance = watchNegotiatedSerializer{} + +func (s watchNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { + return []runtime.SerializerInfo{watchJsonSerializerInfo} +} + +func (s watchNegotiatedSerializer) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { + return versioning.NewDefaultingCodecForScheme(watchScheme, encoder, nil, gv, nil) +} + +func (s watchNegotiatedSerializer) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { + return versioning.NewDefaultingCodecForScheme(watchScheme, nil, decoder, nil, gv) +} + +// basicNegotiatedSerializer is used to handle discovery and error handling serialization +type basicNegotiatedSerializer struct{} + +func (s basicNegotiatedSerializer) SupportedMediaTypes() []runtime.SerializerInfo { + return []runtime.SerializerInfo{ + { + MediaType: "application/json", + EncodesAsText: true, + Serializer: json.NewSerializer(json.DefaultMetaFactory, basicScheme, basicScheme, false), + PrettySerializer: json.NewSerializer(json.DefaultMetaFactory, basicScheme, basicScheme, true), + StreamSerializer: &runtime.StreamSerializerInfo{ + EncodesAsText: true, + Serializer: json.NewSerializer(json.DefaultMetaFactory, basicScheme, basicScheme, false), + Framer: json.Framer, + }, + }, + } +} + +func (s basicNegotiatedSerializer) EncoderForVersion(encoder runtime.Encoder, gv runtime.GroupVersioner) runtime.Encoder { + return versioning.NewDefaultingCodecForScheme(watchScheme, encoder, nil, gv, nil) +} + +func (s basicNegotiatedSerializer) DecoderToVersion(decoder runtime.Decoder, gv runtime.GroupVersioner) runtime.Decoder { + return versioning.NewDefaultingCodecForScheme(watchScheme, nil, decoder, nil, gv) +} diff --git a/deps/k8s.io/client-go/dynamic/simple.go b/deps/k8s.io/client-go/dynamic/simple.go new file mode 100644 index 000000000..9e21cda6e --- /dev/null +++ b/deps/k8s.io/client-go/dynamic/simple.go @@ -0,0 +1,326 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package dynamic + +import ( + "io" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/streaming" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/rest" +) + +type dynamicClient struct { + client *rest.RESTClient +} + +var _ Interface = &dynamicClient{} + +// NewForConfigOrDie creates a new Interface for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) Interface { + ret, err := NewForConfig(c) + if err != nil { + panic(err) + } + return ret +} + +func NewForConfig(inConfig *rest.Config) (Interface, error) { + config := rest.CopyConfig(inConfig) + // for serializing the options + config.GroupVersion = &schema.GroupVersion{} + config.APIPath = "/if-you-see-this-search-for-the-break" + config.AcceptContentTypes = "application/json" + config.ContentType = "application/json" + config.NegotiatedSerializer = basicNegotiatedSerializer{} // this gets used for discovery and error handling types + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + restClient, err := rest.RESTClientFor(config) + if err != nil { + return nil, err + } + + return &dynamicClient{client: restClient}, nil +} + +type dynamicResourceClient struct { + client *dynamicClient + namespace string + resource schema.GroupVersionResource +} + +func (c *dynamicClient) Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface { + return &dynamicResourceClient{client: c, resource: resource} +} + +func (c *dynamicResourceClient) Namespace(ns string) ResourceInterface { + ret := *c + ret.namespace = ns + return &ret +} + +func (c *dynamicResourceClient) Create(obj *unstructured.Unstructured, opts metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { + outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj) + if err != nil { + return nil, err + } + name := "" + if len(subresources) > 0 { + accessor, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + name = accessor.GetName() + } + + result := c.client.client. + Post(). + AbsPath(append(c.makeURLSegments(name), subresources...)...). + Body(outBytes). + SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). + Do() + if err := result.Error(); err != nil { + return nil, err + } + + retBytes, err := result.Raw() + if err != nil { + return nil, err + } + uncastObj, err := runtime.Decode(unstructured.UnstructuredJSONScheme, retBytes) + if err != nil { + return nil, err + } + return uncastObj.(*unstructured.Unstructured), nil +} + +func (c *dynamicResourceClient) Update(obj *unstructured.Unstructured, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { + accessor, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj) + if err != nil { + return nil, err + } + + result := c.client.client. + Put(). + AbsPath(append(c.makeURLSegments(accessor.GetName()), subresources...)...). + Body(outBytes). + SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). + Do() + if err := result.Error(); err != nil { + return nil, err + } + + retBytes, err := result.Raw() + if err != nil { + return nil, err + } + uncastObj, err := runtime.Decode(unstructured.UnstructuredJSONScheme, retBytes) + if err != nil { + return nil, err + } + return uncastObj.(*unstructured.Unstructured), nil +} + +func (c *dynamicResourceClient) UpdateStatus(obj *unstructured.Unstructured, opts metav1.UpdateOptions) (*unstructured.Unstructured, error) { + accessor, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + + outBytes, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj) + if err != nil { + return nil, err + } + + result := c.client.client. + Put(). + AbsPath(append(c.makeURLSegments(accessor.GetName()), "status")...). + Body(outBytes). + SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). + Do() + if err := result.Error(); err != nil { + return nil, err + } + + retBytes, err := result.Raw() + if err != nil { + return nil, err + } + uncastObj, err := runtime.Decode(unstructured.UnstructuredJSONScheme, retBytes) + if err != nil { + return nil, err + } + return uncastObj.(*unstructured.Unstructured), nil +} + +func (c *dynamicResourceClient) Delete(name string, opts *metav1.DeleteOptions, subresources ...string) error { + if opts == nil { + opts = &metav1.DeleteOptions{} + } + deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), opts) + if err != nil { + return err + } + + result := c.client.client. + Delete(). + AbsPath(append(c.makeURLSegments(name), subresources...)...). + Body(deleteOptionsByte). + Do() + return result.Error() +} + +func (c *dynamicResourceClient) DeleteCollection(opts *metav1.DeleteOptions, listOptions metav1.ListOptions) error { + if opts == nil { + opts = &metav1.DeleteOptions{} + } + deleteOptionsByte, err := runtime.Encode(deleteOptionsCodec.LegacyCodec(schema.GroupVersion{Version: "v1"}), opts) + if err != nil { + return err + } + + result := c.client.client. + Delete(). + AbsPath(c.makeURLSegments("")...). + Body(deleteOptionsByte). + SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1). + Do() + return result.Error() +} + +func (c *dynamicResourceClient) Get(name string, opts metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { + result := c.client.client.Get().AbsPath(append(c.makeURLSegments(name), subresources...)...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do() + if err := result.Error(); err != nil { + return nil, err + } + retBytes, err := result.Raw() + if err != nil { + return nil, err + } + uncastObj, err := runtime.Decode(unstructured.UnstructuredJSONScheme, retBytes) + if err != nil { + return nil, err + } + return uncastObj.(*unstructured.Unstructured), nil +} + +func (c *dynamicResourceClient) List(opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { + result := c.client.client.Get().AbsPath(c.makeURLSegments("")...).SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).Do() + if err := result.Error(); err != nil { + return nil, err + } + retBytes, err := result.Raw() + if err != nil { + return nil, err + } + uncastObj, err := runtime.Decode(unstructured.UnstructuredJSONScheme, retBytes) + if err != nil { + return nil, err + } + if list, ok := uncastObj.(*unstructured.UnstructuredList); ok { + return list, nil + } + + list, err := uncastObj.(*unstructured.Unstructured).ToList() + if err != nil { + return nil, err + } + return list, nil +} + +func (c *dynamicResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + internalGV := schema.GroupVersions{ + {Group: c.resource.Group, Version: runtime.APIVersionInternal}, + // always include the legacy group as a decoding target to handle non-error `Status` return types + {Group: "", Version: runtime.APIVersionInternal}, + } + s := &rest.Serializers{ + Encoder: watchNegotiatedSerializerInstance.EncoderForVersion(watchJsonSerializerInfo.Serializer, c.resource.GroupVersion()), + Decoder: watchNegotiatedSerializerInstance.DecoderToVersion(watchJsonSerializerInfo.Serializer, internalGV), + + RenegotiatedDecoder: func(contentType string, params map[string]string) (runtime.Decoder, error) { + return watchNegotiatedSerializerInstance.DecoderToVersion(watchJsonSerializerInfo.Serializer, internalGV), nil + }, + StreamingSerializer: watchJsonSerializerInfo.StreamSerializer.Serializer, + Framer: watchJsonSerializerInfo.StreamSerializer.Framer, + } + + wrappedDecoderFn := func(body io.ReadCloser) streaming.Decoder { + framer := s.Framer.NewFrameReader(body) + return streaming.NewDecoder(framer, s.StreamingSerializer) + } + + opts.Watch = true + return c.client.client.Get().AbsPath(c.makeURLSegments("")...). + SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). + WatchWithSpecificDecoders(wrappedDecoderFn, unstructured.UnstructuredJSONScheme) +} + +func (c *dynamicResourceClient) Patch(name string, pt types.PatchType, data []byte, opts metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { + result := c.client.client. + Patch(pt). + AbsPath(append(c.makeURLSegments(name), subresources...)...). + Body(data). + SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). + Do() + if err := result.Error(); err != nil { + return nil, err + } + retBytes, err := result.Raw() + if err != nil { + return nil, err + } + uncastObj, err := runtime.Decode(unstructured.UnstructuredJSONScheme, retBytes) + if err != nil { + return nil, err + } + return uncastObj.(*unstructured.Unstructured), nil +} + +func (c *dynamicResourceClient) makeURLSegments(name string) []string { + url := []string{} + if len(c.resource.Group) == 0 { + url = append(url, "api") + } else { + url = append(url, "apis", c.resource.Group) + } + url = append(url, c.resource.Version) + + if len(c.namespace) > 0 { + url = append(url, "namespaces", c.namespace) + } + url = append(url, c.resource.Resource) + + if len(name) > 0 { + url = append(url, name) + } + + return url +} diff --git a/deps/k8s.io/client-go/examples/README.md b/deps/k8s.io/client-go/examples/README.md index 4bdc6b1ce..0bbc56720 100644 --- a/deps/k8s.io/client-go/examples/README.md +++ b/deps/k8s.io/client-go/examples/README.md @@ -25,3 +25,7 @@ for client-go. the custom resources. [informer]: https://godoc.org/k8s.io/client-go/tools/cache#NewInformer + +### Testing + +- [**Fake Client**](./fake-client): Use a fake client in tests. \ No newline at end of file diff --git a/deps/k8s.io/client-go/examples/create-update-delete-deployment/BUILD b/deps/k8s.io/client-go/examples/create-update-delete-deployment/BUILD deleted file mode 100644 index 752e68ed5..000000000 --- a/deps/k8s.io/client-go/examples/create-update-delete-deployment/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "create-update-delete-deployment", - embed = [":go_default_library"], - importpath = "k8s.io/client-go/examples/create-update-delete-deployment", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/client-go/examples/create-update-delete-deployment", - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - "//vendor/k8s.io/client-go/util/homedir:go_default_library", - "//vendor/k8s.io/client-go/util/retry:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/examples/create-update-delete-deployment/main.go b/deps/k8s.io/client-go/examples/create-update-delete-deployment/main.go index f6d622745..333ada018 100644 --- a/deps/k8s.io/client-go/examples/create-update-delete-deployment/main.go +++ b/deps/k8s.io/client-go/examples/create-update-delete-deployment/main.go @@ -24,7 +24,7 @@ import ( "os" "path/filepath" - appsv1beta1 "k8s.io/api/apps/v1beta1" + appsv1 "k8s.io/api/apps/v1" apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" @@ -53,14 +53,19 @@ func main() { panic(err) } - deploymentsClient := clientset.AppsV1beta1().Deployments(apiv1.NamespaceDefault) + deploymentsClient := clientset.AppsV1().Deployments(apiv1.NamespaceDefault) - deployment := &appsv1beta1.Deployment{ + deployment := &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: "demo-deployment", }, - Spec: appsv1beta1.DeploymentSpec{ + Spec: appsv1.DeploymentSpec{ Replicas: int32Ptr(2), + Selector: &metav1.LabelSelector{ + MatchLabels: map[string]string{ + "app": "demo", + }, + }, Template: apiv1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ @@ -128,27 +133,6 @@ func main() { } fmt.Println("Updated deployment...") - // Rollback Deployment - prompt() - fmt.Println("Rolling back deployment...") - // Once again use RetryOnConflict to avoid update conflicts - retryErr = retry.RetryOnConflict(retry.DefaultRetry, func() error { - result, getErr := deploymentsClient.Get("demo-deployment", metav1.GetOptions{}) - if getErr != nil { - panic(fmt.Errorf("Failed to get latest version of Deployment: %v", getErr)) - } - - result.Spec.RollbackTo = &appsv1beta1.RollbackConfig{ - Revision: 0, // can be specific revision number, or 0 for last revision - } - _, updateErr := deploymentsClient.Update(result) - return updateErr - }) - if retryErr != nil { - panic(fmt.Errorf("Rollback failed: %v", retryErr)) - } - fmt.Println("Rolled back deployment...") - // List Deployments prompt() fmt.Printf("Listing deployments in namespace %q:\n", apiv1.NamespaceDefault) diff --git a/deps/k8s.io/client-go/examples/fake-client/README.md b/deps/k8s.io/client-go/examples/fake-client/README.md new file mode 100644 index 000000000..89874460c --- /dev/null +++ b/deps/k8s.io/client-go/examples/fake-client/README.md @@ -0,0 +1,14 @@ +# Fake Client Example + +This example demonstrates how to use a fake client with SharedInformerFactory in tests. + +It covers: + * Creating the fake client + * Setting up real informers + * Injecting events into those informers + +## Running + +``` +go test -v k8s.io/client-go/examples/fake-client +``` \ No newline at end of file diff --git a/deps/k8s.io/client-go/examples/fake-client/doc.go b/deps/k8s.io/client-go/examples/fake-client/doc.go new file mode 100644 index 000000000..1c02e5ea5 --- /dev/null +++ b/deps/k8s.io/client-go/examples/fake-client/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package fakeclient contains examples on how to use fakeclient in tests. +// Note: This file is here to avoid warnings on go build since there are no +// non-test files in this package. +package fakeclient diff --git a/deps/k8s.io/client-go/examples/fake-client/main_test.go b/deps/k8s.io/client-go/examples/fake-client/main_test.go new file mode 100644 index 000000000..d77d7ecbc --- /dev/null +++ b/deps/k8s.io/client-go/examples/fake-client/main_test.go @@ -0,0 +1,77 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fakeclient + +import ( + "context" + "testing" + "time" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/cache" +) + +// TestFakeClient demonstrates how to use a fake client with SharedInformerFactory in tests. +func TestFakeClient(t *testing.T) { + // Use a timeout to keep the test from hanging. + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + + // Create the fake client. + client := fake.NewSimpleClientset() + + // We will create an informer that writes added pods to a channel. + pods := make(chan *v1.Pod, 1) + informers := informers.NewSharedInformerFactory(client, 0) + podInformer := informers.Core().V1().Pods().Informer() + podInformer.AddEventHandler(&cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + pod := obj.(*v1.Pod) + t.Logf("pod added: %s/%s", pod.Namespace, pod.Name) + pods <- pod + cancel() + }, + }) + + // Make sure informers are running. + informers.Start(ctx.Done()) + + // This is not required in tests, but it serves as a proof-of-concept by + // ensuring that the informer goroutine have warmed up and called List before + // we send any events to it. + for !podInformer.HasSynced() { + time.Sleep(10 * time.Millisecond) + } + + // Inject an event into the fake client. + p := &v1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "my-pod"}} + _, err := client.Core().Pods("test-ns").Create(p) + if err != nil { + t.Errorf("error injecting pod add: %v", err) + } + + // Wait and check result. + <-ctx.Done() + select { + case pod := <-pods: + t.Logf("Got pod from channel: %s/%s", pod.Namespace, pod.Name) + default: + t.Error("Informer did not get the added pod") + } +} diff --git a/deps/k8s.io/client-go/examples/in-cluster-client-configuration/BUILD b/deps/k8s.io/client-go/examples/in-cluster-client-configuration/BUILD deleted file mode 100644 index 509d79a81..000000000 --- a/deps/k8s.io/client-go/examples/in-cluster-client-configuration/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "in-cluster-client-configuration", - embed = [":go_default_library"], - importpath = "k8s.io/client-go/examples/in-cluster-client-configuration", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/client-go/examples/in-cluster-client-configuration", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/examples/out-of-cluster-client-configuration/BUILD b/deps/k8s.io/client-go/examples/out-of-cluster-client-configuration/BUILD deleted file mode 100644 index 1cee29c83..000000000 --- a/deps/k8s.io/client-go/examples/out-of-cluster-client-configuration/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "out-of-cluster-client-configuration", - embed = [":go_default_library"], - importpath = "k8s.io/client-go/examples/out-of-cluster-client-configuration", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/client-go/examples/out-of-cluster-client-configuration", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/examples/workqueue/BUILD b/deps/k8s.io/client-go/examples/workqueue/BUILD deleted file mode 100644 index d65b8a2f1..000000000 --- a/deps/k8s.io/client-go/examples/workqueue/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "workqueue", - embed = [":go_default_library"], - importpath = "k8s.io/client-go/examples/workqueue", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/client-go/examples/workqueue", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd:go_default_library", - "//vendor/k8s.io/client-go/util/workqueue:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/BUILD b/deps/k8s.io/client-go/informers/BUILD deleted file mode 100644 index 99486a1c8..000000000 --- a/deps/k8s.io/client-go/informers/BUILD +++ /dev/null @@ -1,91 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "factory.go", - "generic.go", - ], - importpath = "k8s.io/client-go/informers", - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", - "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/events/v1beta1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/api/networking/v1:go_default_library", - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/api/rbac/v1:go_default_library", - "//vendor/k8s.io/api/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/api/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/api/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/api/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/api/storage/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/informers/admissionregistration:go_default_library", - "//vendor/k8s.io/client-go/informers/apps:go_default_library", - "//vendor/k8s.io/client-go/informers/autoscaling:go_default_library", - "//vendor/k8s.io/client-go/informers/batch:go_default_library", - "//vendor/k8s.io/client-go/informers/certificates:go_default_library", - "//vendor/k8s.io/client-go/informers/core:go_default_library", - "//vendor/k8s.io/client-go/informers/events:go_default_library", - "//vendor/k8s.io/client-go/informers/extensions:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/informers/networking:go_default_library", - "//vendor/k8s.io/client-go/informers/policy:go_default_library", - "//vendor/k8s.io/client-go/informers/rbac:go_default_library", - "//vendor/k8s.io/client-go/informers/scheduling:go_default_library", - "//vendor/k8s.io/client-go/informers/settings:go_default_library", - "//vendor/k8s.io/client-go/informers/storage:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/admissionregistration:all-srcs", - "//staging/src/k8s.io/client-go/informers/apps:all-srcs", - "//staging/src/k8s.io/client-go/informers/autoscaling:all-srcs", - "//staging/src/k8s.io/client-go/informers/batch:all-srcs", - "//staging/src/k8s.io/client-go/informers/certificates:all-srcs", - "//staging/src/k8s.io/client-go/informers/core:all-srcs", - "//staging/src/k8s.io/client-go/informers/events:all-srcs", - "//staging/src/k8s.io/client-go/informers/extensions:all-srcs", - "//staging/src/k8s.io/client-go/informers/internalinterfaces:all-srcs", - "//staging/src/k8s.io/client-go/informers/networking:all-srcs", - "//staging/src/k8s.io/client-go/informers/policy:all-srcs", - "//staging/src/k8s.io/client-go/informers/rbac:all-srcs", - "//staging/src/k8s.io/client-go/informers/scheduling:all-srcs", - "//staging/src/k8s.io/client-go/informers/settings:all-srcs", - "//staging/src/k8s.io/client-go/informers/storage:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/admissionregistration/BUILD b/deps/k8s.io/client-go/informers/admissionregistration/BUILD deleted file mode 100644 index 6f93c10a2..000000000 --- a/deps/k8s.io/client-go/informers/admissionregistration/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/admissionregistration", - deps = [ - "//vendor/k8s.io/client-go/informers/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/informers/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/admissionregistration/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/informers/admissionregistration/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/admissionregistration/interface.go b/deps/k8s.io/client-go/informers/admissionregistration/interface.go index 2f6d69538..7a0783cc3 100644 --- a/deps/k8s.io/client-go/informers/admissionregistration/interface.go +++ b/deps/k8s.io/client-go/informers/admissionregistration/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package admissionregistration diff --git a/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD b/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index 7292f8ca2..000000000 --- a/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "initializerconfiguration.go", - "interface.go", - ], - importpath = "k8s.io/client-go/informers/admissionregistration/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go b/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go index 96b410d76..4cfaae5bd 100644 --- a/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go +++ b/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/initializerconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - admissionregistration_v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" + admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredInitializerConfigurationInformer(client kubernetes.Interface, re return client.AdmissionregistrationV1alpha1().InitializerConfigurations().Watch(options) }, }, - &admissionregistration_v1alpha1.InitializerConfiguration{}, + &admissionregistrationv1alpha1.InitializerConfiguration{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *initializerConfigurationInformer) defaultInformer(client kubernetes.Int } func (f *initializerConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&admissionregistration_v1alpha1.InitializerConfiguration{}, f.defaultInformer) + return f.factory.InformerFor(&admissionregistrationv1alpha1.InitializerConfiguration{}, f.defaultInformer) } func (f *initializerConfigurationInformer) Lister() v1alpha1.InitializerConfigurationLister { diff --git a/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go b/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go index d932ff5e1..0f47d65d8 100644 --- a/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go +++ b/deps/k8s.io/client-go/informers/admissionregistration/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/BUILD b/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/BUILD deleted file mode 100644 index e66e6eb44..000000000 --- a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "mutatingwebhookconfiguration.go", - "validatingwebhookconfiguration.go", - ], - importpath = "k8s.io/client-go/informers/admissionregistration/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go b/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go index 3b4f3b992..d1e2b61be 100644 --- a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index d22e03759..a06c406c2 100644 --- a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1" + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredMutatingWebhookConfigurationInformer(client kubernetes.Interface return client.AdmissionregistrationV1beta1().MutatingWebhookConfigurations().Watch(options) }, }, - &admissionregistration_v1beta1.MutatingWebhookConfiguration{}, + &admissionregistrationv1beta1.MutatingWebhookConfiguration{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *mutatingWebhookConfigurationInformer) defaultInformer(client kubernetes } func (f *mutatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&admissionregistration_v1beta1.MutatingWebhookConfiguration{}, f.defaultInformer) + return f.factory.InformerFor(&admissionregistrationv1beta1.MutatingWebhookConfiguration{}, f.defaultInformer) } func (f *mutatingWebhookConfigurationInformer) Lister() v1beta1.MutatingWebhookConfigurationLister { diff --git a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 0520d74c3..3b7fafd29 100644 --- a/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/informers/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - admissionregistration_v1beta1 "k8s.io/api/admissionregistration/v1beta1" + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredValidatingWebhookConfigurationInformer(client kubernetes.Interfa return client.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations().Watch(options) }, }, - &admissionregistration_v1beta1.ValidatingWebhookConfiguration{}, + &admissionregistrationv1beta1.ValidatingWebhookConfiguration{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *validatingWebhookConfigurationInformer) defaultInformer(client kubernet } func (f *validatingWebhookConfigurationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&admissionregistration_v1beta1.ValidatingWebhookConfiguration{}, f.defaultInformer) + return f.factory.InformerFor(&admissionregistrationv1beta1.ValidatingWebhookConfiguration{}, f.defaultInformer) } func (f *validatingWebhookConfigurationInformer) Lister() v1beta1.ValidatingWebhookConfigurationLister { diff --git a/deps/k8s.io/client-go/informers/apps/BUILD b/deps/k8s.io/client-go/informers/apps/BUILD deleted file mode 100644 index 80615b108..000000000 --- a/deps/k8s.io/client-go/informers/apps/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/apps", - deps = [ - "//vendor/k8s.io/client-go/informers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/apps/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/informers/apps/v1beta2:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/apps/v1:all-srcs", - "//staging/src/k8s.io/client-go/informers/apps/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/informers/apps/v1beta2:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/apps/interface.go b/deps/k8s.io/client-go/informers/apps/interface.go index cd9541928..02eefe584 100644 --- a/deps/k8s.io/client-go/informers/apps/interface.go +++ b/deps/k8s.io/client-go/informers/apps/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package apps diff --git a/deps/k8s.io/client-go/informers/apps/v1/BUILD b/deps/k8s.io/client-go/informers/apps/v1/BUILD deleted file mode 100644 index 233e26101..000000000 --- a/deps/k8s.io/client-go/informers/apps/v1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "controllerrevision.go", - "daemonset.go", - "deployment.go", - "interface.go", - "replicaset.go", - "statefulset.go", - ], - importpath = "k8s.io/client-go/informers/apps/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/apps/v1/controllerrevision.go b/deps/k8s.io/client-go/informers/apps/v1/controllerrevision.go index 234aa90e1..2f69e0df0 100644 --- a/deps/k8s.io/client-go/informers/apps/v1/controllerrevision.go +++ b/deps/k8s.io/client-go/informers/apps/v1/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - apps_v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewControllerRevisionInformer(client kubernetes.Interface, namespace string func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().ControllerRevisions(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().ControllerRevisions(namespace).Watch(options) }, }, - &apps_v1.ControllerRevision{}, + &appsv1.ControllerRevision{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *controllerRevisionInformer) defaultInformer(client kubernetes.Interface } func (f *controllerRevisionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1.ControllerRevision{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1.ControllerRevision{}, f.defaultInformer) } func (f *controllerRevisionInformer) Lister() v1.ControllerRevisionLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1/daemonset.go b/deps/k8s.io/client-go/informers/apps/v1/daemonset.go index 066b44a30..db649ccbf 100644 --- a/deps/k8s.io/client-go/informers/apps/v1/daemonset.go +++ b/deps/k8s.io/client-go/informers/apps/v1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - apps_v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewDaemonSetInformer(client kubernetes.Interface, namespace string, resyncP func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().DaemonSets(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().DaemonSets(namespace).Watch(options) }, }, - &apps_v1.DaemonSet{}, + &appsv1.DaemonSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *daemonSetInformer) defaultInformer(client kubernetes.Interface, resyncP } func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1.DaemonSet{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1.DaemonSet{}, f.defaultInformer) } func (f *daemonSetInformer) Lister() v1.DaemonSetLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1/deployment.go b/deps/k8s.io/client-go/informers/apps/v1/deployment.go index 209cbf402..71cd00273 100644 --- a/deps/k8s.io/client-go/informers/apps/v1/deployment.go +++ b/deps/k8s.io/client-go/informers/apps/v1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - apps_v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewDeploymentInformer(client kubernetes.Interface, namespace string, resync func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().Deployments(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().Deployments(namespace).Watch(options) }, }, - &apps_v1.Deployment{}, + &appsv1.Deployment{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resync } func (f *deploymentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1.Deployment{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1.Deployment{}, f.defaultInformer) } func (f *deploymentInformer) Lister() v1.DeploymentLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1/interface.go b/deps/k8s.io/client-go/informers/apps/v1/interface.go index 8af8a25db..fab1e76bd 100644 --- a/deps/k8s.io/client-go/informers/apps/v1/interface.go +++ b/deps/k8s.io/client-go/informers/apps/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/informers/apps/v1/replicaset.go b/deps/k8s.io/client-go/informers/apps/v1/replicaset.go index c7c9d8940..6ee7a0537 100644 --- a/deps/k8s.io/client-go/informers/apps/v1/replicaset.go +++ b/deps/k8s.io/client-go/informers/apps/v1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - apps_v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewReplicaSetInformer(client kubernetes.Interface, namespace string, resync func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().ReplicaSets(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().ReplicaSets(namespace).Watch(options) }, }, - &apps_v1.ReplicaSet{}, + &appsv1.ReplicaSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *replicaSetInformer) defaultInformer(client kubernetes.Interface, resync } func (f *replicaSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1.ReplicaSet{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1.ReplicaSet{}, f.defaultInformer) } func (f *replicaSetInformer) Lister() v1.ReplicaSetLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1/statefulset.go b/deps/k8s.io/client-go/informers/apps/v1/statefulset.go index f421da82b..385e65366 100644 --- a/deps/k8s.io/client-go/informers/apps/v1/statefulset.go +++ b/deps/k8s.io/client-go/informers/apps/v1/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - apps_v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + appsv1 "k8s.io/api/apps/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewStatefulSetInformer(client kubernetes.Interface, namespace string, resyn func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().StatefulSets(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AppsV1().StatefulSets(namespace).Watch(options) }, }, - &apps_v1.StatefulSet{}, + &appsv1.StatefulSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *statefulSetInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *statefulSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1.StatefulSet{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1.StatefulSet{}, f.defaultInformer) } func (f *statefulSetInformer) Lister() v1.StatefulSetLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta1/BUILD b/deps/k8s.io/client-go/informers/apps/v1beta1/BUILD deleted file mode 100644 index 80ca939e1..000000000 --- a/deps/k8s.io/client-go/informers/apps/v1beta1/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "controllerrevision.go", - "deployment.go", - "interface.go", - "statefulset.go", - ], - importpath = "k8s.io/client-go/informers/apps/v1beta1", - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/apps/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go b/deps/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go index 04ef7201f..c7d3e30e0 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta1/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - apps_v1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta1 "k8s.io/api/apps/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac return client.AppsV1beta1().ControllerRevisions(namespace).Watch(options) }, }, - &apps_v1beta1.ControllerRevision{}, + &appsv1beta1.ControllerRevision{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *controllerRevisionInformer) defaultInformer(client kubernetes.Interface } func (f *controllerRevisionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta1.ControllerRevision{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta1.ControllerRevision{}, f.defaultInformer) } func (f *controllerRevisionInformer) Lister() v1beta1.ControllerRevisionLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta1/deployment.go b/deps/k8s.io/client-go/informers/apps/v1beta1/deployment.go index b5735542e..03bafca6b 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta1/deployment.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - apps_v1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta1 "k8s.io/api/apps/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string return client.AppsV1beta1().Deployments(namespace).Watch(options) }, }, - &apps_v1beta1.Deployment{}, + &appsv1beta1.Deployment{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resync } func (f *deploymentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta1.Deployment{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta1.Deployment{}, f.defaultInformer) } func (f *deploymentInformer) Lister() v1beta1.DeploymentLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta1/interface.go b/deps/k8s.io/client-go/informers/apps/v1beta1/interface.go index b6bc41024..326939cd1 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/apps/v1beta1/statefulset.go b/deps/k8s.io/client-go/informers/apps/v1beta1/statefulset.go index f19ddc8ac..e4d1b46fa 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta1/statefulset.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta1/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - apps_v1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta1 "k8s.io/api/apps/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin return client.AppsV1beta1().StatefulSets(namespace).Watch(options) }, }, - &apps_v1beta1.StatefulSet{}, + &appsv1beta1.StatefulSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *statefulSetInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *statefulSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta1.StatefulSet{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta1.StatefulSet{}, f.defaultInformer) } func (f *statefulSetInformer) Lister() v1beta1.StatefulSetLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta2/BUILD b/deps/k8s.io/client-go/informers/apps/v1beta2/BUILD deleted file mode 100644 index 5b0137bb2..000000000 --- a/deps/k8s.io/client-go/informers/apps/v1beta2/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "controllerrevision.go", - "daemonset.go", - "deployment.go", - "interface.go", - "replicaset.go", - "statefulset.go", - ], - importpath = "k8s.io/client-go/informers/apps/v1beta2", - deps = [ - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/apps/v1beta2:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go b/deps/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go index 15b70e4e4..975e81077 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta2/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta2 import ( time "time" - apps_v1beta2 "k8s.io/api/apps/v1beta2" + appsv1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredControllerRevisionInformer(client kubernetes.Interface, namespac return client.AppsV1beta2().ControllerRevisions(namespace).Watch(options) }, }, - &apps_v1beta2.ControllerRevision{}, + &appsv1beta2.ControllerRevision{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *controllerRevisionInformer) defaultInformer(client kubernetes.Interface } func (f *controllerRevisionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta2.ControllerRevision{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta2.ControllerRevision{}, f.defaultInformer) } func (f *controllerRevisionInformer) Lister() v1beta2.ControllerRevisionLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta2/daemonset.go b/deps/k8s.io/client-go/informers/apps/v1beta2/daemonset.go index 8b9d1584f..99f17fa6c 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta2/daemonset.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta2/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta2 import ( time "time" - apps_v1beta2 "k8s.io/api/apps/v1beta2" + appsv1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, return client.AppsV1beta2().DaemonSets(namespace).Watch(options) }, }, - &apps_v1beta2.DaemonSet{}, + &appsv1beta2.DaemonSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *daemonSetInformer) defaultInformer(client kubernetes.Interface, resyncP } func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta2.DaemonSet{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta2.DaemonSet{}, f.defaultInformer) } func (f *daemonSetInformer) Lister() v1beta2.DaemonSetLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta2/deployment.go b/deps/k8s.io/client-go/informers/apps/v1beta2/deployment.go index 3f0688c48..b25da82bd 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta2/deployment.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta2/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta2 import ( time "time" - apps_v1beta2 "k8s.io/api/apps/v1beta2" + appsv1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string return client.AppsV1beta2().Deployments(namespace).Watch(options) }, }, - &apps_v1beta2.Deployment{}, + &appsv1beta2.Deployment{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resync } func (f *deploymentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta2.Deployment{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta2.Deployment{}, f.defaultInformer) } func (f *deploymentInformer) Lister() v1beta2.DeploymentLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta2/interface.go b/deps/k8s.io/client-go/informers/apps/v1beta2/interface.go index 88c3b05bd..ded89bd5b 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta2/interface.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta2/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/informers/apps/v1beta2/replicaset.go b/deps/k8s.io/client-go/informers/apps/v1beta2/replicaset.go index 5a82ecdb0..6ce7fcfd0 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta2/replicaset.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta2/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta2 import ( time "time" - apps_v1beta2 "k8s.io/api/apps/v1beta2" + appsv1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string return client.AppsV1beta2().ReplicaSets(namespace).Watch(options) }, }, - &apps_v1beta2.ReplicaSet{}, + &appsv1beta2.ReplicaSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *replicaSetInformer) defaultInformer(client kubernetes.Interface, resync } func (f *replicaSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta2.ReplicaSet{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta2.ReplicaSet{}, f.defaultInformer) } func (f *replicaSetInformer) Lister() v1beta2.ReplicaSetLister { diff --git a/deps/k8s.io/client-go/informers/apps/v1beta2/statefulset.go b/deps/k8s.io/client-go/informers/apps/v1beta2/statefulset.go index 7cc1dd5bf..e77bb2f8f 100644 --- a/deps/k8s.io/client-go/informers/apps/v1beta2/statefulset.go +++ b/deps/k8s.io/client-go/informers/apps/v1beta2/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta2 import ( time "time" - apps_v1beta2 "k8s.io/api/apps/v1beta2" + appsv1beta2 "k8s.io/api/apps/v1beta2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredStatefulSetInformer(client kubernetes.Interface, namespace strin return client.AppsV1beta2().StatefulSets(namespace).Watch(options) }, }, - &apps_v1beta2.StatefulSet{}, + &appsv1beta2.StatefulSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *statefulSetInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *statefulSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apps_v1beta2.StatefulSet{}, f.defaultInformer) + return f.factory.InformerFor(&appsv1beta2.StatefulSet{}, f.defaultInformer) } func (f *statefulSetInformer) Lister() v1beta2.StatefulSetLister { diff --git a/deps/k8s.io/client-go/informers/autoscaling/BUILD b/deps/k8s.io/client-go/informers/autoscaling/BUILD deleted file mode 100644 index 7ad9e975e..000000000 --- a/deps/k8s.io/client-go/informers/autoscaling/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/autoscaling", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/client-go/informers/autoscaling/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/autoscaling/v1:all-srcs", - "//staging/src/k8s.io/client-go/informers/autoscaling/v2beta1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/autoscaling/interface.go b/deps/k8s.io/client-go/informers/autoscaling/interface.go index 8d9caaf22..1494d19d6 100644 --- a/deps/k8s.io/client-go/informers/autoscaling/interface.go +++ b/deps/k8s.io/client-go/informers/autoscaling/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package autoscaling diff --git a/deps/k8s.io/client-go/informers/autoscaling/v1/BUILD b/deps/k8s.io/client-go/informers/autoscaling/v1/BUILD deleted file mode 100644 index 5c3ba46bc..000000000 --- a/deps/k8s.io/client-go/informers/autoscaling/v1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "horizontalpodautoscaler.go", - "interface.go", - ], - importpath = "k8s.io/client-go/informers/autoscaling/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/autoscaling/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go b/deps/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go index 9d0a429e3..205e4ecd7 100644 --- a/deps/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/informers/autoscaling/v1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - autoscaling_v1 "k8s.io/api/autoscaling/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace s func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.AutoscalingV1().HorizontalPodAutoscalers(namespace).Watch(options) }, }, - &autoscaling_v1.HorizontalPodAutoscaler{}, + &autoscalingv1.HorizontalPodAutoscaler{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *horizontalPodAutoscalerInformer) defaultInformer(client kubernetes.Inte } func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&autoscaling_v1.HorizontalPodAutoscaler{}, f.defaultInformer) + return f.factory.InformerFor(&autoscalingv1.HorizontalPodAutoscaler{}, f.defaultInformer) } func (f *horizontalPodAutoscalerInformer) Lister() v1.HorizontalPodAutoscalerLister { diff --git a/deps/k8s.io/client-go/informers/autoscaling/v1/interface.go b/deps/k8s.io/client-go/informers/autoscaling/v1/interface.go index e927a8ce3..601d0f77f 100644 --- a/deps/k8s.io/client-go/informers/autoscaling/v1/interface.go +++ b/deps/k8s.io/client-go/informers/autoscaling/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/informers/autoscaling/v2beta1/BUILD b/deps/k8s.io/client-go/informers/autoscaling/v2beta1/BUILD deleted file mode 100644 index 3439a4ed2..000000000 --- a/deps/k8s.io/client-go/informers/autoscaling/v2beta1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "horizontalpodautoscaler.go", - "interface.go", - ], - importpath = "k8s.io/client-go/informers/autoscaling/v2beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go b/deps/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go index 98bfbde62..4627c5a0b 100644 --- a/deps/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/informers/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v2beta1 import ( time "time" - autoscaling_v2beta1 "k8s.io/api/autoscaling/v2beta1" + autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredHorizontalPodAutoscalerInformer(client kubernetes.Interface, nam return client.AutoscalingV2beta1().HorizontalPodAutoscalers(namespace).Watch(options) }, }, - &autoscaling_v2beta1.HorizontalPodAutoscaler{}, + &autoscalingv2beta1.HorizontalPodAutoscaler{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *horizontalPodAutoscalerInformer) defaultInformer(client kubernetes.Inte } func (f *horizontalPodAutoscalerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&autoscaling_v2beta1.HorizontalPodAutoscaler{}, f.defaultInformer) + return f.factory.InformerFor(&autoscalingv2beta1.HorizontalPodAutoscaler{}, f.defaultInformer) } func (f *horizontalPodAutoscalerInformer) Lister() v2beta1.HorizontalPodAutoscalerLister { diff --git a/deps/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go b/deps/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go index ab7b04f74..ff5d44b09 100644 --- a/deps/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go +++ b/deps/k8s.io/client-go/informers/autoscaling/v2beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v2beta1 diff --git a/deps/k8s.io/client-go/informers/batch/BUILD b/deps/k8s.io/client-go/informers/batch/BUILD deleted file mode 100644 index 9199107c7..000000000 --- a/deps/k8s.io/client-go/informers/batch/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/batch", - deps = [ - "//vendor/k8s.io/client-go/informers/batch/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/batch/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/informers/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/batch/v1:all-srcs", - "//staging/src/k8s.io/client-go/informers/batch/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/informers/batch/v2alpha1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/batch/interface.go b/deps/k8s.io/client-go/informers/batch/interface.go index c06b0b19e..fa428869d 100644 --- a/deps/k8s.io/client-go/informers/batch/interface.go +++ b/deps/k8s.io/client-go/informers/batch/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package batch diff --git a/deps/k8s.io/client-go/informers/batch/v1/BUILD b/deps/k8s.io/client-go/informers/batch/v1/BUILD deleted file mode 100644 index ed4825488..000000000 --- a/deps/k8s.io/client-go/informers/batch/v1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "job.go", - ], - importpath = "k8s.io/client-go/informers/batch/v1", - deps = [ - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/batch/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/batch/v1/interface.go b/deps/k8s.io/client-go/informers/batch/v1/interface.go index 60464d461..67d71adc2 100644 --- a/deps/k8s.io/client-go/informers/batch/v1/interface.go +++ b/deps/k8s.io/client-go/informers/batch/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/informers/batch/v1/job.go b/deps/k8s.io/client-go/informers/batch/v1/job.go index ad3b2c6b7..30d41104a 100644 --- a/deps/k8s.io/client-go/informers/batch/v1/job.go +++ b/deps/k8s.io/client-go/informers/batch/v1/job.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - batch_v1 "k8s.io/api/batch/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + batchv1 "k8s.io/api/batch/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewJobInformer(client kubernetes.Interface, namespace string, resyncPeriod func NewFilteredJobInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.BatchV1().Jobs(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.BatchV1().Jobs(namespace).Watch(options) }, }, - &batch_v1.Job{}, + &batchv1.Job{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *jobInformer) defaultInformer(client kubernetes.Interface, resyncPeriod } func (f *jobInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&batch_v1.Job{}, f.defaultInformer) + return f.factory.InformerFor(&batchv1.Job{}, f.defaultInformer) } func (f *jobInformer) Lister() v1.JobLister { diff --git a/deps/k8s.io/client-go/informers/batch/v1beta1/BUILD b/deps/k8s.io/client-go/informers/batch/v1beta1/BUILD deleted file mode 100644 index 20f4ac3c4..000000000 --- a/deps/k8s.io/client-go/informers/batch/v1beta1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "cronjob.go", - "interface.go", - ], - importpath = "k8s.io/client-go/informers/batch/v1beta1", - deps = [ - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/batch/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/batch/v1beta1/cronjob.go b/deps/k8s.io/client-go/informers/batch/v1beta1/cronjob.go index 933930fd9..0b7598e0f 100644 --- a/deps/k8s.io/client-go/informers/batch/v1beta1/cronjob.go +++ b/deps/k8s.io/client-go/informers/batch/v1beta1/cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - batch_v1beta1 "k8s.io/api/batch/v1beta1" + batchv1beta1 "k8s.io/api/batch/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, r return client.BatchV1beta1().CronJobs(namespace).Watch(options) }, }, - &batch_v1beta1.CronJob{}, + &batchv1beta1.CronJob{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *cronJobInformer) defaultInformer(client kubernetes.Interface, resyncPer } func (f *cronJobInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&batch_v1beta1.CronJob{}, f.defaultInformer) + return f.factory.InformerFor(&batchv1beta1.CronJob{}, f.defaultInformer) } func (f *cronJobInformer) Lister() v1beta1.CronJobLister { diff --git a/deps/k8s.io/client-go/informers/batch/v1beta1/interface.go b/deps/k8s.io/client-go/informers/batch/v1beta1/interface.go index 785a62f7b..76cae22d6 100644 --- a/deps/k8s.io/client-go/informers/batch/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/batch/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/batch/v2alpha1/BUILD b/deps/k8s.io/client-go/informers/batch/v2alpha1/BUILD deleted file mode 100644 index 4684ca4b4..000000000 --- a/deps/k8s.io/client-go/informers/batch/v2alpha1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "cronjob.go", - "interface.go", - ], - importpath = "k8s.io/client-go/informers/batch/v2alpha1", - deps = [ - "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go b/deps/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go index 94e47e180..20cf7d498 100644 --- a/deps/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go +++ b/deps/k8s.io/client-go/informers/batch/v2alpha1/cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v2alpha1 import ( time "time" - batch_v2alpha1 "k8s.io/api/batch/v2alpha1" + batchv2alpha1 "k8s.io/api/batch/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredCronJobInformer(client kubernetes.Interface, namespace string, r return client.BatchV2alpha1().CronJobs(namespace).Watch(options) }, }, - &batch_v2alpha1.CronJob{}, + &batchv2alpha1.CronJob{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *cronJobInformer) defaultInformer(client kubernetes.Interface, resyncPer } func (f *cronJobInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&batch_v2alpha1.CronJob{}, f.defaultInformer) + return f.factory.InformerFor(&batchv2alpha1.CronJob{}, f.defaultInformer) } func (f *cronJobInformer) Lister() v2alpha1.CronJobLister { diff --git a/deps/k8s.io/client-go/informers/batch/v2alpha1/interface.go b/deps/k8s.io/client-go/informers/batch/v2alpha1/interface.go index 2bc64945f..6c5bf236f 100644 --- a/deps/k8s.io/client-go/informers/batch/v2alpha1/interface.go +++ b/deps/k8s.io/client-go/informers/batch/v2alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v2alpha1 diff --git a/deps/k8s.io/client-go/informers/certificates/BUILD b/deps/k8s.io/client-go/informers/certificates/BUILD deleted file mode 100644 index bbe39da8b..000000000 --- a/deps/k8s.io/client-go/informers/certificates/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/certificates", - deps = [ - "//vendor/k8s.io/client-go/informers/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/certificates/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/certificates/interface.go b/deps/k8s.io/client-go/informers/certificates/interface.go index d99ff192d..cff455403 100644 --- a/deps/k8s.io/client-go/informers/certificates/interface.go +++ b/deps/k8s.io/client-go/informers/certificates/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package certificates diff --git a/deps/k8s.io/client-go/informers/certificates/v1beta1/BUILD b/deps/k8s.io/client-go/informers/certificates/v1beta1/BUILD deleted file mode 100644 index d8ada3891..000000000 --- a/deps/k8s.io/client-go/informers/certificates/v1beta1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "certificatesigningrequest.go", - "interface.go", - ], - importpath = "k8s.io/client-go/informers/certificates/v1beta1", - deps = [ - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go b/deps/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go index 3fd95ed83..6472d20e2 100644 --- a/deps/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go +++ b/deps/k8s.io/client-go/informers/certificates/v1beta1/certificatesigningrequest.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - certificates_v1beta1 "k8s.io/api/certificates/v1beta1" + certificatesv1beta1 "k8s.io/api/certificates/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredCertificateSigningRequestInformer(client kubernetes.Interface, r return client.CertificatesV1beta1().CertificateSigningRequests().Watch(options) }, }, - &certificates_v1beta1.CertificateSigningRequest{}, + &certificatesv1beta1.CertificateSigningRequest{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *certificateSigningRequestInformer) defaultInformer(client kubernetes.In } func (f *certificateSigningRequestInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&certificates_v1beta1.CertificateSigningRequest{}, f.defaultInformer) + return f.factory.InformerFor(&certificatesv1beta1.CertificateSigningRequest{}, f.defaultInformer) } func (f *certificateSigningRequestInformer) Lister() v1beta1.CertificateSigningRequestLister { diff --git a/deps/k8s.io/client-go/informers/certificates/v1beta1/interface.go b/deps/k8s.io/client-go/informers/certificates/v1beta1/interface.go index 4b8d9b1c7..258dd1d0e 100644 --- a/deps/k8s.io/client-go/informers/certificates/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/certificates/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/coordination/interface.go b/deps/k8s.io/client-go/informers/coordination/interface.go new file mode 100644 index 000000000..8e541d80d --- /dev/null +++ b/deps/k8s.io/client-go/informers/coordination/interface.go @@ -0,0 +1,46 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package coordination + +import ( + v1beta1 "k8s.io/client-go/informers/coordination/v1beta1" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/deps/k8s.io/client-go/informers/coordination/v1beta1/interface.go b/deps/k8s.io/client-go/informers/coordination/v1beta1/interface.go new file mode 100644 index 000000000..360266206 --- /dev/null +++ b/deps/k8s.io/client-go/informers/coordination/v1beta1/interface.go @@ -0,0 +1,45 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // Leases returns a LeaseInformer. + Leases() LeaseInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// Leases returns a LeaseInformer. +func (v *version) Leases() LeaseInformer { + return &leaseInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/deps/k8s.io/client-go/informers/coordination/v1beta1/lease.go b/deps/k8s.io/client-go/informers/coordination/v1beta1/lease.go new file mode 100644 index 000000000..bb59be13e --- /dev/null +++ b/deps/k8s.io/client-go/informers/coordination/v1beta1/lease.go @@ -0,0 +1,89 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + coordinationv1beta1 "k8s.io/api/coordination/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/coordination/v1beta1" + cache "k8s.io/client-go/tools/cache" +) + +// LeaseInformer provides access to a shared informer and lister for +// Leases. +type LeaseInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.LeaseLister +} + +type leaseInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewLeaseInformer constructs a new informer for Lease type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewLeaseInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredLeaseInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredLeaseInformer constructs a new informer for Lease type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredLeaseInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoordinationV1beta1().Leases(namespace).List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CoordinationV1beta1().Leases(namespace).Watch(options) + }, + }, + &coordinationv1beta1.Lease{}, + resyncPeriod, + indexers, + ) +} + +func (f *leaseInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredLeaseInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *leaseInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&coordinationv1beta1.Lease{}, f.defaultInformer) +} + +func (f *leaseInformer) Lister() v1beta1.LeaseLister { + return v1beta1.NewLeaseLister(f.Informer().GetIndexer()) +} diff --git a/deps/k8s.io/client-go/informers/core/BUILD b/deps/k8s.io/client-go/informers/core/BUILD deleted file mode 100644 index 694589909..000000000 --- a/deps/k8s.io/client-go/informers/core/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/core", - deps = [ - "//vendor/k8s.io/client-go/informers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/core/v1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/core/interface.go b/deps/k8s.io/client-go/informers/core/interface.go index 82b4917e8..de8396b51 100644 --- a/deps/k8s.io/client-go/informers/core/interface.go +++ b/deps/k8s.io/client-go/informers/core/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package core diff --git a/deps/k8s.io/client-go/informers/core/v1/BUILD b/deps/k8s.io/client-go/informers/core/v1/BUILD deleted file mode 100644 index 1d459c5db..000000000 --- a/deps/k8s.io/client-go/informers/core/v1/BUILD +++ /dev/null @@ -1,53 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "componentstatus.go", - "configmap.go", - "endpoints.go", - "event.go", - "interface.go", - "limitrange.go", - "namespace.go", - "node.go", - "persistentvolume.go", - "persistentvolumeclaim.go", - "pod.go", - "podtemplate.go", - "replicationcontroller.go", - "resourcequota.go", - "secret.go", - "service.go", - "serviceaccount.go", - ], - importpath = "k8s.io/client-go/informers/core/v1", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/core/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/core/v1/componentstatus.go b/deps/k8s.io/client-go/informers/core/v1/componentstatus.go index 5c1b4b172..a5ae6fc49 100644 --- a/deps/k8s.io/client-go/informers/core/v1/componentstatus.go +++ b/deps/k8s.io/client-go/informers/core/v1/componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -56,20 +56,20 @@ func NewComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.D func NewFilteredComponentStatusInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ComponentStatuses().List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ComponentStatuses().Watch(options) }, }, - &core_v1.ComponentStatus{}, + &corev1.ComponentStatus{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *componentStatusInformer) defaultInformer(client kubernetes.Interface, r } func (f *componentStatusInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ComponentStatus{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.ComponentStatus{}, f.defaultInformer) } func (f *componentStatusInformer) Lister() v1.ComponentStatusLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/configmap.go b/deps/k8s.io/client-go/informers/core/v1/configmap.go index db58f2ab3..48cb1a48e 100644 --- a/deps/k8s.io/client-go/informers/core/v1/configmap.go +++ b/deps/k8s.io/client-go/informers/core/v1/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewConfigMapInformer(client kubernetes.Interface, namespace string, resyncP func NewFilteredConfigMapInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ConfigMaps(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ConfigMaps(namespace).Watch(options) }, }, - &core_v1.ConfigMap{}, + &corev1.ConfigMap{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *configMapInformer) defaultInformer(client kubernetes.Interface, resyncP } func (f *configMapInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ConfigMap{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.ConfigMap{}, f.defaultInformer) } func (f *configMapInformer) Lister() v1.ConfigMapLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/endpoints.go b/deps/k8s.io/client-go/informers/core/v1/endpoints.go index a184e5586..77fa8cf8a 100644 --- a/deps/k8s.io/client-go/informers/core/v1/endpoints.go +++ b/deps/k8s.io/client-go/informers/core/v1/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewEndpointsInformer(client kubernetes.Interface, namespace string, resyncP func NewFilteredEndpointsInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Endpoints(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Endpoints(namespace).Watch(options) }, }, - &core_v1.Endpoints{}, + &corev1.Endpoints{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *endpointsInformer) defaultInformer(client kubernetes.Interface, resyncP } func (f *endpointsInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Endpoints{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.Endpoints{}, f.defaultInformer) } func (f *endpointsInformer) Lister() v1.EndpointsLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/event.go b/deps/k8s.io/client-go/informers/core/v1/event.go index 02712adc5..52f4911c1 100644 --- a/deps/k8s.io/client-go/informers/core/v1/event.go +++ b/deps/k8s.io/client-go/informers/core/v1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewEventInformer(client kubernetes.Interface, namespace string, resyncPerio func NewFilteredEventInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Events(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Events(namespace).Watch(options) }, }, - &core_v1.Event{}, + &corev1.Event{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *eventInformer) defaultInformer(client kubernetes.Interface, resyncPerio } func (f *eventInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Event{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.Event{}, f.defaultInformer) } func (f *eventInformer) Lister() v1.EventLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/interface.go b/deps/k8s.io/client-go/informers/core/v1/interface.go index 0b460d6b5..b2216a05c 100644 --- a/deps/k8s.io/client-go/informers/core/v1/interface.go +++ b/deps/k8s.io/client-go/informers/core/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/informers/core/v1/limitrange.go b/deps/k8s.io/client-go/informers/core/v1/limitrange.go index 82b21ba1b..7499e1869 100644 --- a/deps/k8s.io/client-go/informers/core/v1/limitrange.go +++ b/deps/k8s.io/client-go/informers/core/v1/limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewLimitRangeInformer(client kubernetes.Interface, namespace string, resync func NewFilteredLimitRangeInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().LimitRanges(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().LimitRanges(namespace).Watch(options) }, }, - &core_v1.LimitRange{}, + &corev1.LimitRange{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *limitRangeInformer) defaultInformer(client kubernetes.Interface, resync } func (f *limitRangeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.LimitRange{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.LimitRange{}, f.defaultInformer) } func (f *limitRangeInformer) Lister() v1.LimitRangeLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/namespace.go b/deps/k8s.io/client-go/informers/core/v1/namespace.go index ea36024bc..57a073355 100644 --- a/deps/k8s.io/client-go/informers/core/v1/namespace.go +++ b/deps/k8s.io/client-go/informers/core/v1/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -56,20 +56,20 @@ func NewNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duratio func NewFilteredNamespaceInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Namespaces().List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Namespaces().Watch(options) }, }, - &core_v1.Namespace{}, + &corev1.Namespace{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *namespaceInformer) defaultInformer(client kubernetes.Interface, resyncP } func (f *namespaceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Namespace{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.Namespace{}, f.defaultInformer) } func (f *namespaceInformer) Lister() v1.NamespaceLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/node.go b/deps/k8s.io/client-go/informers/core/v1/node.go index 66ae4548a..d9b85f83c 100644 --- a/deps/k8s.io/client-go/informers/core/v1/node.go +++ b/deps/k8s.io/client-go/informers/core/v1/node.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -56,20 +56,20 @@ func NewNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration, in func NewFilteredNodeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Nodes().List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Nodes().Watch(options) }, }, - &core_v1.Node{}, + &corev1.Node{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *nodeInformer) defaultInformer(client kubernetes.Interface, resyncPeriod } func (f *nodeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Node{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.Node{}, f.defaultInformer) } func (f *nodeInformer) Lister() v1.NodeLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/persistentvolume.go b/deps/k8s.io/client-go/informers/core/v1/persistentvolume.go index df8a09d39..a50bcfc66 100644 --- a/deps/k8s.io/client-go/informers/core/v1/persistentvolume.go +++ b/deps/k8s.io/client-go/informers/core/v1/persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -56,20 +56,20 @@ func NewPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time. func NewFilteredPersistentVolumeInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().PersistentVolumes().List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().PersistentVolumes().Watch(options) }, }, - &core_v1.PersistentVolume{}, + &corev1.PersistentVolume{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *persistentVolumeInformer) defaultInformer(client kubernetes.Interface, } func (f *persistentVolumeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.PersistentVolume{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.PersistentVolume{}, f.defaultInformer) } func (f *persistentVolumeInformer) Lister() v1.PersistentVolumeLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go b/deps/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go index 2fbef8a6d..3fb5e5f6c 100644 --- a/deps/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go +++ b/deps/k8s.io/client-go/informers/core/v1/persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewPersistentVolumeClaimInformer(client kubernetes.Interface, namespace str func NewFilteredPersistentVolumeClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().PersistentVolumeClaims(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().PersistentVolumeClaims(namespace).Watch(options) }, }, - &core_v1.PersistentVolumeClaim{}, + &corev1.PersistentVolumeClaim{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *persistentVolumeClaimInformer) defaultInformer(client kubernetes.Interf } func (f *persistentVolumeClaimInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.PersistentVolumeClaim{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.PersistentVolumeClaim{}, f.defaultInformer) } func (f *persistentVolumeClaimInformer) Lister() v1.PersistentVolumeClaimLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/pod.go b/deps/k8s.io/client-go/informers/core/v1/pod.go index b70999bb7..57aadd945 100644 --- a/deps/k8s.io/client-go/informers/core/v1/pod.go +++ b/deps/k8s.io/client-go/informers/core/v1/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewPodInformer(client kubernetes.Interface, namespace string, resyncPeriod func NewFilteredPodInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Pods(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Pods(namespace).Watch(options) }, }, - &core_v1.Pod{}, + &corev1.Pod{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *podInformer) defaultInformer(client kubernetes.Interface, resyncPeriod } func (f *podInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Pod{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.Pod{}, f.defaultInformer) } func (f *podInformer) Lister() v1.PodLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/podtemplate.go b/deps/k8s.io/client-go/informers/core/v1/podtemplate.go index 4e2fde734..ff47094fb 100644 --- a/deps/k8s.io/client-go/informers/core/v1/podtemplate.go +++ b/deps/k8s.io/client-go/informers/core/v1/podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewPodTemplateInformer(client kubernetes.Interface, namespace string, resyn func NewFilteredPodTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().PodTemplates(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().PodTemplates(namespace).Watch(options) }, }, - &core_v1.PodTemplate{}, + &corev1.PodTemplate{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *podTemplateInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *podTemplateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.PodTemplate{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.PodTemplate{}, f.defaultInformer) } func (f *podTemplateInformer) Lister() v1.PodTemplateLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/replicationcontroller.go b/deps/k8s.io/client-go/informers/core/v1/replicationcontroller.go index 9c0bac1c7..903fe3fba 100644 --- a/deps/k8s.io/client-go/informers/core/v1/replicationcontroller.go +++ b/deps/k8s.io/client-go/informers/core/v1/replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewReplicationControllerInformer(client kubernetes.Interface, namespace str func NewFilteredReplicationControllerInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ReplicationControllers(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ReplicationControllers(namespace).Watch(options) }, }, - &core_v1.ReplicationController{}, + &corev1.ReplicationController{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *replicationControllerInformer) defaultInformer(client kubernetes.Interf } func (f *replicationControllerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ReplicationController{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.ReplicationController{}, f.defaultInformer) } func (f *replicationControllerInformer) Lister() v1.ReplicationControllerLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/resourcequota.go b/deps/k8s.io/client-go/informers/core/v1/resourcequota.go index c1f593c2f..27ae53ccb 100644 --- a/deps/k8s.io/client-go/informers/core/v1/resourcequota.go +++ b/deps/k8s.io/client-go/informers/core/v1/resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewResourceQuotaInformer(client kubernetes.Interface, namespace string, res func NewFilteredResourceQuotaInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ResourceQuotas(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ResourceQuotas(namespace).Watch(options) }, }, - &core_v1.ResourceQuota{}, + &corev1.ResourceQuota{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *resourceQuotaInformer) defaultInformer(client kubernetes.Interface, res } func (f *resourceQuotaInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ResourceQuota{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.ResourceQuota{}, f.defaultInformer) } func (f *resourceQuotaInformer) Lister() v1.ResourceQuotaLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/secret.go b/deps/k8s.io/client-go/informers/core/v1/secret.go index c45f1c738..e13776b2b 100644 --- a/deps/k8s.io/client-go/informers/core/v1/secret.go +++ b/deps/k8s.io/client-go/informers/core/v1/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewSecretInformer(client kubernetes.Interface, namespace string, resyncPeri func NewFilteredSecretInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Secrets(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Secrets(namespace).Watch(options) }, }, - &core_v1.Secret{}, + &corev1.Secret{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *secretInformer) defaultInformer(client kubernetes.Interface, resyncPeri } func (f *secretInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Secret{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.Secret{}, f.defaultInformer) } func (f *secretInformer) Lister() v1.SecretLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/service.go b/deps/k8s.io/client-go/informers/core/v1/service.go index f4cd7091f..1c758668c 100644 --- a/deps/k8s.io/client-go/informers/core/v1/service.go +++ b/deps/k8s.io/client-go/informers/core/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewServiceInformer(client kubernetes.Interface, namespace string, resyncPer func NewFilteredServiceInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Services(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().Services(namespace).Watch(options) }, }, - &core_v1.Service{}, + &corev1.Service{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *serviceInformer) defaultInformer(client kubernetes.Interface, resyncPer } func (f *serviceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.Service{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.Service{}, f.defaultInformer) } func (f *serviceInformer) Lister() v1.ServiceLister { diff --git a/deps/k8s.io/client-go/informers/core/v1/serviceaccount.go b/deps/k8s.io/client-go/informers/core/v1/serviceaccount.go index 997292625..c701b8f1e 100644 --- a/deps/k8s.io/client-go/informers/core/v1/serviceaccount.go +++ b/deps/k8s.io/client-go/informers/core/v1/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - core_v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewServiceAccountInformer(client kubernetes.Interface, namespace string, re func NewFilteredServiceAccountInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ServiceAccounts(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.CoreV1().ServiceAccounts(namespace).Watch(options) }, }, - &core_v1.ServiceAccount{}, + &corev1.ServiceAccount{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *serviceAccountInformer) defaultInformer(client kubernetes.Interface, re } func (f *serviceAccountInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&core_v1.ServiceAccount{}, f.defaultInformer) + return f.factory.InformerFor(&corev1.ServiceAccount{}, f.defaultInformer) } func (f *serviceAccountInformer) Lister() v1.ServiceAccountLister { diff --git a/deps/k8s.io/client-go/informers/events/BUILD b/deps/k8s.io/client-go/informers/events/BUILD deleted file mode 100644 index cf87d7c56..000000000 --- a/deps/k8s.io/client-go/informers/events/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/events", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/client-go/informers/events/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/events/v1beta1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/events/interface.go b/deps/k8s.io/client-go/informers/events/interface.go index cfb8d375f..af30a3913 100644 --- a/deps/k8s.io/client-go/informers/events/interface.go +++ b/deps/k8s.io/client-go/informers/events/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package events diff --git a/deps/k8s.io/client-go/informers/events/v1beta1/BUILD b/deps/k8s.io/client-go/informers/events/v1beta1/BUILD deleted file mode 100644 index 7f398d3ef..000000000 --- a/deps/k8s.io/client-go/informers/events/v1beta1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "event.go", - "interface.go", - ], - importpath = "k8s.io/client-go/informers/events/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/events/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/events/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/events/v1beta1/event.go b/deps/k8s.io/client-go/informers/events/v1beta1/event.go index 223e0e3dd..0ac6fa282 100644 --- a/deps/k8s.io/client-go/informers/events/v1beta1/event.go +++ b/deps/k8s.io/client-go/informers/events/v1beta1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - events_v1beta1 "k8s.io/api/events/v1beta1" + eventsv1beta1 "k8s.io/api/events/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredEventInformer(client kubernetes.Interface, namespace string, res return client.EventsV1beta1().Events(namespace).Watch(options) }, }, - &events_v1beta1.Event{}, + &eventsv1beta1.Event{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *eventInformer) defaultInformer(client kubernetes.Interface, resyncPerio } func (f *eventInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&events_v1beta1.Event{}, f.defaultInformer) + return f.factory.InformerFor(&eventsv1beta1.Event{}, f.defaultInformer) } func (f *eventInformer) Lister() v1beta1.EventLister { diff --git a/deps/k8s.io/client-go/informers/events/v1beta1/interface.go b/deps/k8s.io/client-go/informers/events/v1beta1/interface.go index 8138b0a0b..c71888c9a 100644 --- a/deps/k8s.io/client-go/informers/events/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/events/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/extensions/BUILD b/deps/k8s.io/client-go/informers/extensions/BUILD deleted file mode 100644 index 070358e20..000000000 --- a/deps/k8s.io/client-go/informers/extensions/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/extensions", - deps = [ - "//vendor/k8s.io/client-go/informers/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/extensions/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/extensions/interface.go b/deps/k8s.io/client-go/informers/extensions/interface.go index 3a5d8a52e..94a66d385 100644 --- a/deps/k8s.io/client-go/informers/extensions/interface.go +++ b/deps/k8s.io/client-go/informers/extensions/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package extensions diff --git a/deps/k8s.io/client-go/informers/extensions/v1beta1/BUILD b/deps/k8s.io/client-go/informers/extensions/v1beta1/BUILD deleted file mode 100644 index 7f11d7bdf..000000000 --- a/deps/k8s.io/client-go/informers/extensions/v1beta1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "daemonset.go", - "deployment.go", - "ingress.go", - "interface.go", - "podsecuritypolicy.go", - "replicaset.go", - ], - importpath = "k8s.io/client-go/informers/extensions/v1beta1", - deps = [ - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go b/deps/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go index 4017b8d3e..80e84eba8 100644 --- a/deps/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go +++ b/deps/k8s.io/client-go/informers/extensions/v1beta1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredDaemonSetInformer(client kubernetes.Interface, namespace string, return client.ExtensionsV1beta1().DaemonSets(namespace).Watch(options) }, }, - &extensions_v1beta1.DaemonSet{}, + &extensionsv1beta1.DaemonSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *daemonSetInformer) defaultInformer(client kubernetes.Interface, resyncP } func (f *daemonSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.DaemonSet{}, f.defaultInformer) + return f.factory.InformerFor(&extensionsv1beta1.DaemonSet{}, f.defaultInformer) } func (f *daemonSetInformer) Lister() v1beta1.DaemonSetLister { diff --git a/deps/k8s.io/client-go/informers/extensions/v1beta1/deployment.go b/deps/k8s.io/client-go/informers/extensions/v1beta1/deployment.go index 01794d7c7..cef4b8150 100644 --- a/deps/k8s.io/client-go/informers/extensions/v1beta1/deployment.go +++ b/deps/k8s.io/client-go/informers/extensions/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredDeploymentInformer(client kubernetes.Interface, namespace string return client.ExtensionsV1beta1().Deployments(namespace).Watch(options) }, }, - &extensions_v1beta1.Deployment{}, + &extensionsv1beta1.Deployment{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *deploymentInformer) defaultInformer(client kubernetes.Interface, resync } func (f *deploymentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.Deployment{}, f.defaultInformer) + return f.factory.InformerFor(&extensionsv1beta1.Deployment{}, f.defaultInformer) } func (f *deploymentInformer) Lister() v1beta1.DeploymentLister { diff --git a/deps/k8s.io/client-go/informers/extensions/v1beta1/ingress.go b/deps/k8s.io/client-go/informers/extensions/v1beta1/ingress.go index d5c9f1671..72a88f313 100644 --- a/deps/k8s.io/client-go/informers/extensions/v1beta1/ingress.go +++ b/deps/k8s.io/client-go/informers/extensions/v1beta1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredIngressInformer(client kubernetes.Interface, namespace string, r return client.ExtensionsV1beta1().Ingresses(namespace).Watch(options) }, }, - &extensions_v1beta1.Ingress{}, + &extensionsv1beta1.Ingress{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *ingressInformer) defaultInformer(client kubernetes.Interface, resyncPer } func (f *ingressInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.Ingress{}, f.defaultInformer) + return f.factory.InformerFor(&extensionsv1beta1.Ingress{}, f.defaultInformer) } func (f *ingressInformer) Lister() v1beta1.IngressLister { diff --git a/deps/k8s.io/client-go/informers/extensions/v1beta1/interface.go b/deps/k8s.io/client-go/informers/extensions/v1beta1/interface.go index a3af9309f..a259d27ae 100644 --- a/deps/k8s.io/client-go/informers/extensions/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/extensions/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go b/deps/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go index 7cf8d5bbf..6f91e5458 100644 --- a/deps/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go +++ b/deps/k8s.io/client-go/informers/extensions/v1beta1/podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPer return client.ExtensionsV1beta1().PodSecurityPolicies().Watch(options) }, }, - &extensions_v1beta1.PodSecurityPolicy{}, + &extensionsv1beta1.PodSecurityPolicy{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *podSecurityPolicyInformer) defaultInformer(client kubernetes.Interface, } func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.PodSecurityPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&extensionsv1beta1.PodSecurityPolicy{}, f.defaultInformer) } func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister { diff --git a/deps/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go b/deps/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go index b826a99c3..e8847aa2c 100644 --- a/deps/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go +++ b/deps/k8s.io/client-go/informers/extensions/v1beta1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredReplicaSetInformer(client kubernetes.Interface, namespace string return client.ExtensionsV1beta1().ReplicaSets(namespace).Watch(options) }, }, - &extensions_v1beta1.ReplicaSet{}, + &extensionsv1beta1.ReplicaSet{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *replicaSetInformer) defaultInformer(client kubernetes.Interface, resync } func (f *replicaSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&extensions_v1beta1.ReplicaSet{}, f.defaultInformer) + return f.factory.InformerFor(&extensionsv1beta1.ReplicaSet{}, f.defaultInformer) } func (f *replicaSetInformer) Lister() v1beta1.ReplicaSetLister { diff --git a/deps/k8s.io/client-go/informers/factory.go b/deps/k8s.io/client-go/informers/factory.go index 4a9296d07..7ae22ee2c 100644 --- a/deps/k8s.io/client-go/informers/factory.go +++ b/deps/k8s.io/client-go/informers/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package informers @@ -31,6 +31,7 @@ import ( autoscaling "k8s.io/client-go/informers/autoscaling" batch "k8s.io/client-go/informers/batch" certificates "k8s.io/client-go/informers/certificates" + coordination "k8s.io/client-go/informers/coordination" core "k8s.io/client-go/informers/core" events "k8s.io/client-go/informers/events" extensions "k8s.io/client-go/informers/extensions" @@ -45,12 +46,16 @@ import ( cache "k8s.io/client-go/tools/cache" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client kubernetes.Interface namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -58,23 +63,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client kubernetes.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client kubernetes.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), } + + // Apply all options + for _, opt := range options { + factory = opt(factory) + } + + return factory } // Start initializes all requested informers. @@ -123,7 +167,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer @@ -141,6 +191,7 @@ type SharedInformerFactory interface { Autoscaling() autoscaling.Interface Batch() batch.Interface Certificates() certificates.Interface + Coordination() coordination.Interface Core() core.Interface Events() events.Interface Extensions() extensions.Interface @@ -172,6 +223,10 @@ func (f *sharedInformerFactory) Certificates() certificates.Interface { return certificates.New(f, f.namespace, f.tweakListOptions) } +func (f *sharedInformerFactory) Coordination() coordination.Interface { + return coordination.New(f, f.namespace, f.tweakListOptions) +} + func (f *sharedInformerFactory) Core() core.Interface { return core.New(f, f.namespace, f.tweakListOptions) } diff --git a/deps/k8s.io/client-go/informers/generic.go b/deps/k8s.io/client-go/informers/generic.go index c19f137cf..5e6ee1c23 100644 --- a/deps/k8s.io/client-go/informers/generic.go +++ b/deps/k8s.io/client-go/informers/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package informers @@ -24,27 +24,29 @@ import ( v1alpha1 "k8s.io/api/admissionregistration/v1alpha1" v1beta1 "k8s.io/api/admissionregistration/v1beta1" v1 "k8s.io/api/apps/v1" - apps_v1beta1 "k8s.io/api/apps/v1beta1" + appsv1beta1 "k8s.io/api/apps/v1beta1" v1beta2 "k8s.io/api/apps/v1beta2" - autoscaling_v1 "k8s.io/api/autoscaling/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" v2beta1 "k8s.io/api/autoscaling/v2beta1" - batch_v1 "k8s.io/api/batch/v1" - batch_v1beta1 "k8s.io/api/batch/v1beta1" + batchv1 "k8s.io/api/batch/v1" + batchv1beta1 "k8s.io/api/batch/v1beta1" v2alpha1 "k8s.io/api/batch/v2alpha1" - certificates_v1beta1 "k8s.io/api/certificates/v1beta1" - core_v1 "k8s.io/api/core/v1" - events_v1beta1 "k8s.io/api/events/v1beta1" - extensions_v1beta1 "k8s.io/api/extensions/v1beta1" - networking_v1 "k8s.io/api/networking/v1" - policy_v1beta1 "k8s.io/api/policy/v1beta1" - rbac_v1 "k8s.io/api/rbac/v1" - rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" - rbac_v1beta1 "k8s.io/api/rbac/v1beta1" - scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1" - settings_v1alpha1 "k8s.io/api/settings/v1alpha1" - storage_v1 "k8s.io/api/storage/v1" - storage_v1alpha1 "k8s.io/api/storage/v1alpha1" - storage_v1beta1 "k8s.io/api/storage/v1beta1" + certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + coordinationv1beta1 "k8s.io/api/coordination/v1beta1" + corev1 "k8s.io/api/core/v1" + eventsv1beta1 "k8s.io/api/events/v1beta1" + extensionsv1beta1 "k8s.io/api/extensions/v1beta1" + networkingv1 "k8s.io/api/networking/v1" + policyv1beta1 "k8s.io/api/policy/v1beta1" + rbacv1 "k8s.io/api/rbac/v1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" + schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" + settingsv1alpha1 "k8s.io/api/settings/v1alpha1" + storagev1 "k8s.io/api/storage/v1" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + storagev1beta1 "k8s.io/api/storage/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -98,11 +100,11 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1().StatefulSets().Informer()}, nil // Group=apps, Version=v1beta1 - case apps_v1beta1.SchemeGroupVersion.WithResource("controllerrevisions"): + case appsv1beta1.SchemeGroupVersion.WithResource("controllerrevisions"): return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().ControllerRevisions().Informer()}, nil - case apps_v1beta1.SchemeGroupVersion.WithResource("deployments"): + case appsv1beta1.SchemeGroupVersion.WithResource("deployments"): return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().Deployments().Informer()}, nil - case apps_v1beta1.SchemeGroupVersion.WithResource("statefulsets"): + case appsv1beta1.SchemeGroupVersion.WithResource("statefulsets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta1().StatefulSets().Informer()}, nil // Group=apps, Version=v1beta2 @@ -118,7 +120,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Apps().V1beta2().StatefulSets().Informer()}, nil // Group=autoscaling, Version=v1 - case autoscaling_v1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): + case autoscalingv1.SchemeGroupVersion.WithResource("horizontalpodautoscalers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V1().HorizontalPodAutoscalers().Informer()}, nil // Group=autoscaling, Version=v2beta1 @@ -126,11 +128,11 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Autoscaling().V2beta1().HorizontalPodAutoscalers().Informer()}, nil // Group=batch, Version=v1 - case batch_v1.SchemeGroupVersion.WithResource("jobs"): + case batchv1.SchemeGroupVersion.WithResource("jobs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1().Jobs().Informer()}, nil // Group=batch, Version=v1beta1 - case batch_v1beta1.SchemeGroupVersion.WithResource("cronjobs"): + case batchv1beta1.SchemeGroupVersion.WithResource("cronjobs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V1beta1().CronJobs().Informer()}, nil // Group=batch, Version=v2alpha1 @@ -138,117 +140,127 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Batch().V2alpha1().CronJobs().Informer()}, nil // Group=certificates.k8s.io, Version=v1beta1 - case certificates_v1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"): + case certificatesv1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"): return &genericInformer{resource: resource.GroupResource(), informer: f.Certificates().V1beta1().CertificateSigningRequests().Informer()}, nil + // Group=coordination.k8s.io, Version=v1beta1 + case coordinationv1beta1.SchemeGroupVersion.WithResource("leases"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Coordination().V1beta1().Leases().Informer()}, nil + // Group=core, Version=v1 - case core_v1.SchemeGroupVersion.WithResource("componentstatuses"): + case corev1.SchemeGroupVersion.WithResource("componentstatuses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ComponentStatuses().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("configmaps"): + case corev1.SchemeGroupVersion.WithResource("configmaps"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ConfigMaps().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("endpoints"): + case corev1.SchemeGroupVersion.WithResource("endpoints"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Endpoints().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("events"): + case corev1.SchemeGroupVersion.WithResource("events"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Events().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("limitranges"): + case corev1.SchemeGroupVersion.WithResource("limitranges"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().LimitRanges().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("namespaces"): + case corev1.SchemeGroupVersion.WithResource("namespaces"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Namespaces().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("nodes"): + case corev1.SchemeGroupVersion.WithResource("nodes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Nodes().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("persistentvolumes"): + case corev1.SchemeGroupVersion.WithResource("persistentvolumes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumes().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("persistentvolumeclaims"): + case corev1.SchemeGroupVersion.WithResource("persistentvolumeclaims"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PersistentVolumeClaims().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("pods"): + case corev1.SchemeGroupVersion.WithResource("pods"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Pods().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("podtemplates"): + case corev1.SchemeGroupVersion.WithResource("podtemplates"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().PodTemplates().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("replicationcontrollers"): + case corev1.SchemeGroupVersion.WithResource("replicationcontrollers"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ReplicationControllers().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("resourcequotas"): + case corev1.SchemeGroupVersion.WithResource("resourcequotas"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ResourceQuotas().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("secrets"): + case corev1.SchemeGroupVersion.WithResource("secrets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Secrets().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("services"): + case corev1.SchemeGroupVersion.WithResource("services"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().Services().Informer()}, nil - case core_v1.SchemeGroupVersion.WithResource("serviceaccounts"): + case corev1.SchemeGroupVersion.WithResource("serviceaccounts"): return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1().ServiceAccounts().Informer()}, nil // Group=events.k8s.io, Version=v1beta1 - case events_v1beta1.SchemeGroupVersion.WithResource("events"): + case eventsv1beta1.SchemeGroupVersion.WithResource("events"): return &genericInformer{resource: resource.GroupResource(), informer: f.Events().V1beta1().Events().Informer()}, nil // Group=extensions, Version=v1beta1 - case extensions_v1beta1.SchemeGroupVersion.WithResource("daemonsets"): + case extensionsv1beta1.SchemeGroupVersion.WithResource("daemonsets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().DaemonSets().Informer()}, nil - case extensions_v1beta1.SchemeGroupVersion.WithResource("deployments"): + case extensionsv1beta1.SchemeGroupVersion.WithResource("deployments"): return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Deployments().Informer()}, nil - case extensions_v1beta1.SchemeGroupVersion.WithResource("ingresses"): + case extensionsv1beta1.SchemeGroupVersion.WithResource("ingresses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().Ingresses().Informer()}, nil - case extensions_v1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"): + case extensionsv1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().PodSecurityPolicies().Informer()}, nil - case extensions_v1beta1.SchemeGroupVersion.WithResource("replicasets"): + case extensionsv1beta1.SchemeGroupVersion.WithResource("replicasets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil // Group=networking.k8s.io, Version=v1 - case networking_v1.SchemeGroupVersion.WithResource("networkpolicies"): + case networkingv1.SchemeGroupVersion.WithResource("networkpolicies"): return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1().NetworkPolicies().Informer()}, nil // Group=policy, Version=v1beta1 - case policy_v1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"): + case policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil + case policyv1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodSecurityPolicies().Informer()}, nil // Group=rbac.authorization.k8s.io, Version=v1 - case rbac_v1.SchemeGroupVersion.WithResource("clusterroles"): + case rbacv1.SchemeGroupVersion.WithResource("clusterroles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().ClusterRoles().Informer()}, nil - case rbac_v1.SchemeGroupVersion.WithResource("clusterrolebindings"): + case rbacv1.SchemeGroupVersion.WithResource("clusterrolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().ClusterRoleBindings().Informer()}, nil - case rbac_v1.SchemeGroupVersion.WithResource("roles"): + case rbacv1.SchemeGroupVersion.WithResource("roles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().Roles().Informer()}, nil - case rbac_v1.SchemeGroupVersion.WithResource("rolebindings"): + case rbacv1.SchemeGroupVersion.WithResource("rolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().RoleBindings().Informer()}, nil // Group=rbac.authorization.k8s.io, Version=v1alpha1 - case rbac_v1alpha1.SchemeGroupVersion.WithResource("clusterroles"): + case rbacv1alpha1.SchemeGroupVersion.WithResource("clusterroles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoles().Informer()}, nil - case rbac_v1alpha1.SchemeGroupVersion.WithResource("clusterrolebindings"): + case rbacv1alpha1.SchemeGroupVersion.WithResource("clusterrolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().ClusterRoleBindings().Informer()}, nil - case rbac_v1alpha1.SchemeGroupVersion.WithResource("roles"): + case rbacv1alpha1.SchemeGroupVersion.WithResource("roles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().Roles().Informer()}, nil - case rbac_v1alpha1.SchemeGroupVersion.WithResource("rolebindings"): + case rbacv1alpha1.SchemeGroupVersion.WithResource("rolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1alpha1().RoleBindings().Informer()}, nil // Group=rbac.authorization.k8s.io, Version=v1beta1 - case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterroles"): + case rbacv1beta1.SchemeGroupVersion.WithResource("clusterroles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoles().Informer()}, nil - case rbac_v1beta1.SchemeGroupVersion.WithResource("clusterrolebindings"): + case rbacv1beta1.SchemeGroupVersion.WithResource("clusterrolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().ClusterRoleBindings().Informer()}, nil - case rbac_v1beta1.SchemeGroupVersion.WithResource("roles"): + case rbacv1beta1.SchemeGroupVersion.WithResource("roles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().Roles().Informer()}, nil - case rbac_v1beta1.SchemeGroupVersion.WithResource("rolebindings"): + case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil // Group=scheduling.k8s.io, Version=v1alpha1 - case scheduling_v1alpha1.SchemeGroupVersion.WithResource("priorityclasses"): + case schedulingv1alpha1.SchemeGroupVersion.WithResource("priorityclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().PriorityClasses().Informer()}, nil + // Group=scheduling.k8s.io, Version=v1beta1 + case schedulingv1beta1.SchemeGroupVersion.WithResource("priorityclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1beta1().PriorityClasses().Informer()}, nil + // Group=settings.k8s.io, Version=v1alpha1 - case settings_v1alpha1.SchemeGroupVersion.WithResource("podpresets"): + case settingsv1alpha1.SchemeGroupVersion.WithResource("podpresets"): return &genericInformer{resource: resource.GroupResource(), informer: f.Settings().V1alpha1().PodPresets().Informer()}, nil // Group=storage.k8s.io, Version=v1 - case storage_v1.SchemeGroupVersion.WithResource("storageclasses"): + case storagev1.SchemeGroupVersion.WithResource("storageclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil // Group=storage.k8s.io, Version=v1alpha1 - case storage_v1alpha1.SchemeGroupVersion.WithResource("volumeattachments"): + case storagev1alpha1.SchemeGroupVersion.WithResource("volumeattachments"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().VolumeAttachments().Informer()}, nil // Group=storage.k8s.io, Version=v1beta1 - case storage_v1beta1.SchemeGroupVersion.WithResource("storageclasses"): + case storagev1beta1.SchemeGroupVersion.WithResource("storageclasses"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil - case storage_v1beta1.SchemeGroupVersion.WithResource("volumeattachments"): + case storagev1beta1.SchemeGroupVersion.WithResource("volumeattachments"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().VolumeAttachments().Informer()}, nil } diff --git a/deps/k8s.io/client-go/informers/internalinterfaces/BUILD b/deps/k8s.io/client-go/informers/internalinterfaces/BUILD deleted file mode 100644 index 5b20c78f7..000000000 --- a/deps/k8s.io/client-go/informers/internalinterfaces/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["factory_interfaces.go"], - importpath = "k8s.io/client-go/informers/internalinterfaces", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go b/deps/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go index ce6e89944..5e05516b1 100644 --- a/deps/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go +++ b/deps/k8s.io/client-go/informers/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/deps/k8s.io/client-go/informers/networking/BUILD b/deps/k8s.io/client-go/informers/networking/BUILD deleted file mode 100644 index 3219e7d02..000000000 --- a/deps/k8s.io/client-go/informers/networking/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/networking", - deps = [ - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/informers/networking/v1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/networking/v1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/networking/interface.go b/deps/k8s.io/client-go/informers/networking/interface.go index bd0b3aaa7..989e8fa0f 100644 --- a/deps/k8s.io/client-go/informers/networking/interface.go +++ b/deps/k8s.io/client-go/informers/networking/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package networking diff --git a/deps/k8s.io/client-go/informers/networking/v1/BUILD b/deps/k8s.io/client-go/informers/networking/v1/BUILD deleted file mode 100644 index dc6f32696..000000000 --- a/deps/k8s.io/client-go/informers/networking/v1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "networkpolicy.go", - ], - importpath = "k8s.io/client-go/informers/networking/v1", - deps = [ - "//vendor/k8s.io/api/networking/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/networking/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/networking/v1/interface.go b/deps/k8s.io/client-go/informers/networking/v1/interface.go index aa75a918c..84dc6476a 100644 --- a/deps/k8s.io/client-go/informers/networking/v1/interface.go +++ b/deps/k8s.io/client-go/informers/networking/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/informers/networking/v1/networkpolicy.go b/deps/k8s.io/client-go/informers/networking/v1/networkpolicy.go index 7d091cbb9..c2255c0df 100644 --- a/deps/k8s.io/client-go/informers/networking/v1/networkpolicy.go +++ b/deps/k8s.io/client-go/informers/networking/v1/networkpolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - networking_v1 "k8s.io/api/networking/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + networkingv1 "k8s.io/api/networking/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewNetworkPolicyInformer(client kubernetes.Interface, namespace string, res func NewFilteredNetworkPolicyInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.NetworkingV1().NetworkPolicies(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.NetworkingV1().NetworkPolicies(namespace).Watch(options) }, }, - &networking_v1.NetworkPolicy{}, + &networkingv1.NetworkPolicy{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *networkPolicyInformer) defaultInformer(client kubernetes.Interface, res } func (f *networkPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networking_v1.NetworkPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&networkingv1.NetworkPolicy{}, f.defaultInformer) } func (f *networkPolicyInformer) Lister() v1.NetworkPolicyLister { diff --git a/deps/k8s.io/client-go/informers/policy/BUILD b/deps/k8s.io/client-go/informers/policy/BUILD deleted file mode 100644 index 882d54d5e..000000000 --- a/deps/k8s.io/client-go/informers/policy/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/policy", - deps = [ - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/informers/policy/v1beta1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/policy/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/policy/interface.go b/deps/k8s.io/client-go/informers/policy/interface.go index 5908e63c5..1859fca82 100644 --- a/deps/k8s.io/client-go/informers/policy/interface.go +++ b/deps/k8s.io/client-go/informers/policy/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package policy diff --git a/deps/k8s.io/client-go/informers/policy/v1beta1/BUILD b/deps/k8s.io/client-go/informers/policy/v1beta1/BUILD deleted file mode 100644 index 39a7a9d34..000000000 --- a/deps/k8s.io/client-go/informers/policy/v1beta1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "poddisruptionbudget.go", - ], - importpath = "k8s.io/client-go/informers/policy/v1beta1", - deps = [ - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/policy/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/policy/v1beta1/interface.go b/deps/k8s.io/client-go/informers/policy/v1beta1/interface.go index e59a4aa9c..a6c1825d2 100644 --- a/deps/k8s.io/client-go/informers/policy/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/policy/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 @@ -26,6 +26,8 @@ import ( type Interface interface { // PodDisruptionBudgets returns a PodDisruptionBudgetInformer. PodDisruptionBudgets() PodDisruptionBudgetInformer + // PodSecurityPolicies returns a PodSecurityPolicyInformer. + PodSecurityPolicies() PodSecurityPolicyInformer } type version struct { @@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (v *version) PodDisruptionBudgets() PodDisruptionBudgetInformer { return &podDisruptionBudgetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } + +// PodSecurityPolicies returns a PodSecurityPolicyInformer. +func (v *version) PodSecurityPolicies() PodSecurityPolicyInformer { + return &podSecurityPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/deps/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go b/deps/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go index aefdc7681..dce61f7f1 100644 --- a/deps/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go +++ b/deps/k8s.io/client-go/informers/policy/v1beta1/poddisruptionbudget.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - policy_v1beta1 "k8s.io/api/policy/v1beta1" + policyv1beta1 "k8s.io/api/policy/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredPodDisruptionBudgetInformer(client kubernetes.Interface, namespa return client.PolicyV1beta1().PodDisruptionBudgets(namespace).Watch(options) }, }, - &policy_v1beta1.PodDisruptionBudget{}, + &policyv1beta1.PodDisruptionBudget{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *podDisruptionBudgetInformer) defaultInformer(client kubernetes.Interfac } func (f *podDisruptionBudgetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&policy_v1beta1.PodDisruptionBudget{}, f.defaultInformer) + return f.factory.InformerFor(&policyv1beta1.PodDisruptionBudget{}, f.defaultInformer) } func (f *podDisruptionBudgetInformer) Lister() v1beta1.PodDisruptionBudgetLister { diff --git a/deps/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go b/deps/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go new file mode 100644 index 000000000..7ce5684fb --- /dev/null +++ b/deps/k8s.io/client-go/informers/policy/v1beta1/podsecuritypolicy.go @@ -0,0 +1,88 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + policyv1beta1 "k8s.io/api/policy/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/policy/v1beta1" + cache "k8s.io/client-go/tools/cache" +) + +// PodSecurityPolicyInformer provides access to a shared informer and lister for +// PodSecurityPolicies. +type PodSecurityPolicyInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.PodSecurityPolicyLister +} + +type podSecurityPolicyInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredPodSecurityPolicyInformer constructs a new informer for PodSecurityPolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredPodSecurityPolicyInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PolicyV1beta1().PodSecurityPolicies().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.PolicyV1beta1().PodSecurityPolicies().Watch(options) + }, + }, + &policyv1beta1.PodSecurityPolicy{}, + resyncPeriod, + indexers, + ) +} + +func (f *podSecurityPolicyInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredPodSecurityPolicyInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&policyv1beta1.PodSecurityPolicy{}, f.defaultInformer) +} + +func (f *podSecurityPolicyInformer) Lister() v1beta1.PodSecurityPolicyLister { + return v1beta1.NewPodSecurityPolicyLister(f.Informer().GetIndexer()) +} diff --git a/deps/k8s.io/client-go/informers/rbac/BUILD b/deps/k8s.io/client-go/informers/rbac/BUILD deleted file mode 100644 index e2afef934..000000000 --- a/deps/k8s.io/client-go/informers/rbac/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/rbac", - deps = [ - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/informers/rbac/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/informers/rbac/v1beta1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/rbac/v1:all-srcs", - "//staging/src/k8s.io/client-go/informers/rbac/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/informers/rbac/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/rbac/interface.go b/deps/k8s.io/client-go/informers/rbac/interface.go index edf21fa6a..228811f8a 100644 --- a/deps/k8s.io/client-go/informers/rbac/interface.go +++ b/deps/k8s.io/client-go/informers/rbac/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package rbac diff --git a/deps/k8s.io/client-go/informers/rbac/v1/BUILD b/deps/k8s.io/client-go/informers/rbac/v1/BUILD deleted file mode 100644 index 4278890e8..000000000 --- a/deps/k8s.io/client-go/informers/rbac/v1/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "interface.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/informers/rbac/v1", - deps = [ - "//vendor/k8s.io/api/rbac/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/rbac/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/rbac/v1/clusterrole.go b/deps/k8s.io/client-go/informers/rbac/v1/clusterrole.go index 0f83c32ce..b8096e6bc 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1/clusterrole.go +++ b/deps/k8s.io/client-go/informers/rbac/v1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - rbac_v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -56,20 +56,20 @@ func NewClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Durat func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().ClusterRoles().List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().ClusterRoles().Watch(options) }, }, - &rbac_v1.ClusterRole{}, + &rbacv1.ClusterRole{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *clusterRoleInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1.ClusterRole{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1.ClusterRole{}, f.defaultInformer) } func (f *clusterRoleInformer) Lister() v1.ClusterRoleLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go b/deps/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go index f4bbe9898..5ef3407c4 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/informers/rbac/v1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - rbac_v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -56,20 +56,20 @@ func NewClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod tim func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().ClusterRoleBindings().List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().ClusterRoleBindings().Watch(options) }, }, - &rbac_v1.ClusterRoleBinding{}, + &rbacv1.ClusterRoleBinding{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *clusterRoleBindingInformer) defaultInformer(client kubernetes.Interface } func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1.ClusterRoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1.ClusterRoleBinding{}, f.defaultInformer) } func (f *clusterRoleBindingInformer) Lister() v1.ClusterRoleBindingLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1/interface.go b/deps/k8s.io/client-go/informers/rbac/v1/interface.go index 969dd563c..7f99c9454 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1/interface.go +++ b/deps/k8s.io/client-go/informers/rbac/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/informers/rbac/v1/role.go b/deps/k8s.io/client-go/informers/rbac/v1/role.go index 3b50e1821..2d98874e5 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1/role.go +++ b/deps/k8s.io/client-go/informers/rbac/v1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - rbac_v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().Roles(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().Roles(namespace).Watch(options) }, }, - &rbac_v1.Role{}, + &rbacv1.Role{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *roleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod } func (f *roleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1.Role{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1.Role{}, f.defaultInformer) } func (f *roleInformer) Lister() v1.RoleLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1/rolebinding.go b/deps/k8s.io/client-go/informers/rbac/v1/rolebinding.go index 32af822f6..a97107de1 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1/rolebinding.go +++ b/deps/k8s.io/client-go/informers/rbac/v1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - rbac_v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + rbacv1 "k8s.io/api/rbac/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -57,20 +57,20 @@ func NewRoleBindingInformer(client kubernetes.Interface, namespace string, resyn func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().RoleBindings(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.RbacV1().RoleBindings(namespace).Watch(options) }, }, - &rbac_v1.RoleBinding{}, + &rbacv1.RoleBinding{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *roleBindingInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1.RoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1.RoleBinding{}, f.defaultInformer) } func (f *roleBindingInformer) Lister() v1.RoleBindingLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1alpha1/BUILD b/deps/k8s.io/client-go/informers/rbac/v1alpha1/BUILD deleted file mode 100644 index 345e10c6f..000000000 --- a/deps/k8s.io/client-go/informers/rbac/v1alpha1/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "interface.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/informers/rbac/v1alpha1", - deps = [ - "//vendor/k8s.io/api/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go b/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go index b64bc8d43..58c9c4125 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go +++ b/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti return client.RbacV1alpha1().ClusterRoles().Watch(options) }, }, - &rbac_v1alpha1.ClusterRole{}, + &rbacv1alpha1.ClusterRole{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *clusterRoleInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1alpha1.ClusterRole{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1alpha1.ClusterRole{}, f.defaultInformer) } func (f *clusterRoleInformer) Lister() v1alpha1.ClusterRoleLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go b/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go index ad8fe6007..759c716bf 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/informers/rbac/v1alpha1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe return client.RbacV1alpha1().ClusterRoleBindings().Watch(options) }, }, - &rbac_v1alpha1.ClusterRoleBinding{}, + &rbacv1alpha1.ClusterRoleBinding{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *clusterRoleBindingInformer) defaultInformer(client kubernetes.Interface } func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1alpha1.ClusterRoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1alpha1.ClusterRoleBinding{}, f.defaultInformer) } func (f *clusterRoleBindingInformer) Lister() v1alpha1.ClusterRoleBindingLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1alpha1/interface.go b/deps/k8s.io/client-go/informers/rbac/v1alpha1/interface.go index 2f4945f9a..d27c79987 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1alpha1/interface.go +++ b/deps/k8s.io/client-go/informers/rbac/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/informers/rbac/v1alpha1/role.go b/deps/k8s.io/client-go/informers/rbac/v1alpha1/role.go index 56f19a03d..1d1f99f06 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1alpha1/role.go +++ b/deps/k8s.io/client-go/informers/rbac/v1alpha1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy return client.RbacV1alpha1().Roles(namespace).Watch(options) }, }, - &rbac_v1alpha1.Role{}, + &rbacv1alpha1.Role{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *roleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod } func (f *roleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1alpha1.Role{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1alpha1.Role{}, f.defaultInformer) } func (f *roleInformer) Lister() v1alpha1.RoleLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go b/deps/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go index 22318e982..9fcb01d3a 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go +++ b/deps/k8s.io/client-go/informers/rbac/v1alpha1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - rbac_v1alpha1 "k8s.io/api/rbac/v1alpha1" + rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin return client.RbacV1alpha1().RoleBindings(namespace).Watch(options) }, }, - &rbac_v1alpha1.RoleBinding{}, + &rbacv1alpha1.RoleBinding{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *roleBindingInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1alpha1.RoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1alpha1.RoleBinding{}, f.defaultInformer) } func (f *roleBindingInformer) Lister() v1alpha1.RoleBindingLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1beta1/BUILD b/deps/k8s.io/client-go/informers/rbac/v1beta1/BUILD deleted file mode 100644 index 0ed73f4ec..000000000 --- a/deps/k8s.io/client-go/informers/rbac/v1beta1/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "interface.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/informers/rbac/v1beta1", - deps = [ - "//vendor/k8s.io/api/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go b/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go index 21fb3b6d9..b82c1c740 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go +++ b/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredClusterRoleInformer(client kubernetes.Interface, resyncPeriod ti return client.RbacV1beta1().ClusterRoles().Watch(options) }, }, - &rbac_v1beta1.ClusterRole{}, + &rbacv1beta1.ClusterRole{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *clusterRoleInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *clusterRoleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1beta1.ClusterRole{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1beta1.ClusterRole{}, f.defaultInformer) } func (f *clusterRoleInformer) Lister() v1beta1.ClusterRoleLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go b/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go index 3c78ac34c..d662e7f56 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/informers/rbac/v1beta1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredClusterRoleBindingInformer(client kubernetes.Interface, resyncPe return client.RbacV1beta1().ClusterRoleBindings().Watch(options) }, }, - &rbac_v1beta1.ClusterRoleBinding{}, + &rbacv1beta1.ClusterRoleBinding{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *clusterRoleBindingInformer) defaultInformer(client kubernetes.Interface } func (f *clusterRoleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1beta1.ClusterRoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1beta1.ClusterRoleBinding{}, f.defaultInformer) } func (f *clusterRoleBindingInformer) Lister() v1beta1.ClusterRoleBindingLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1beta1/interface.go b/deps/k8s.io/client-go/informers/rbac/v1beta1/interface.go index 92e440ba0..04add43af 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/rbac/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/rbac/v1beta1/role.go b/deps/k8s.io/client-go/informers/rbac/v1beta1/role.go index 3bd67d84b..b885beb27 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1beta1/role.go +++ b/deps/k8s.io/client-go/informers/rbac/v1beta1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredRoleInformer(client kubernetes.Interface, namespace string, resy return client.RbacV1beta1().Roles(namespace).Watch(options) }, }, - &rbac_v1beta1.Role{}, + &rbacv1beta1.Role{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *roleInformer) defaultInformer(client kubernetes.Interface, resyncPeriod } func (f *roleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1beta1.Role{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1beta1.Role{}, f.defaultInformer) } func (f *roleInformer) Lister() v1beta1.RoleLister { diff --git a/deps/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go b/deps/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go index 5180c1cff..63d9d7264 100644 --- a/deps/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go +++ b/deps/k8s.io/client-go/informers/rbac/v1beta1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - rbac_v1beta1 "k8s.io/api/rbac/v1beta1" + rbacv1beta1 "k8s.io/api/rbac/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredRoleBindingInformer(client kubernetes.Interface, namespace strin return client.RbacV1beta1().RoleBindings(namespace).Watch(options) }, }, - &rbac_v1beta1.RoleBinding{}, + &rbacv1beta1.RoleBinding{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *roleBindingInformer) defaultInformer(client kubernetes.Interface, resyn } func (f *roleBindingInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&rbac_v1beta1.RoleBinding{}, f.defaultInformer) + return f.factory.InformerFor(&rbacv1beta1.RoleBinding{}, f.defaultInformer) } func (f *roleBindingInformer) Lister() v1beta1.RoleBindingLister { diff --git a/deps/k8s.io/client-go/informers/scheduling/BUILD b/deps/k8s.io/client-go/informers/scheduling/BUILD deleted file mode 100644 index 14c2a70b9..000000000 --- a/deps/k8s.io/client-go/informers/scheduling/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/scheduling", - deps = [ - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/informers/scheduling/v1alpha1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/scheduling/v1alpha1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/scheduling/interface.go b/deps/k8s.io/client-go/informers/scheduling/interface.go index 1ea9a2e71..16d030c30 100644 --- a/deps/k8s.io/client-go/informers/scheduling/interface.go +++ b/deps/k8s.io/client-go/informers/scheduling/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,19 +14,22 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package scheduling import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" v1alpha1 "k8s.io/client-go/informers/scheduling/v1alpha1" + v1beta1 "k8s.io/client-go/informers/scheduling/v1beta1" ) // Interface provides access to each of this group's versions. type Interface interface { // V1alpha1 provides access to shared informers for resources in V1alpha1. V1alpha1() v1alpha1.Interface + // V1beta1 provides access to shared informers for resources in V1beta1. + V1beta1() v1beta1.Interface } type group struct { @@ -44,3 +47,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList func (g *group) V1alpha1() v1alpha1.Interface { return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) } + +// V1beta1 returns a new v1beta1.Interface. +func (g *group) V1beta1() v1beta1.Interface { + return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/deps/k8s.io/client-go/informers/scheduling/v1alpha1/BUILD b/deps/k8s.io/client-go/informers/scheduling/v1alpha1/BUILD deleted file mode 100644 index b168cda49..000000000 --- a/deps/k8s.io/client-go/informers/scheduling/v1alpha1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "priorityclass.go", - ], - importpath = "k8s.io/client-go/informers/scheduling/v1alpha1", - deps = [ - "//vendor/k8s.io/api/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go b/deps/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go index dabe3fb63..cd908d14e 100644 --- a/deps/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go +++ b/deps/k8s.io/client-go/informers/scheduling/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go b/deps/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go index 0aeee10a3..cd90dd765 100644 --- a/deps/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go +++ b/deps/k8s.io/client-go/informers/scheduling/v1alpha1/priorityclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - scheduling_v1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod return client.SchedulingV1alpha1().PriorityClasses().Watch(options) }, }, - &scheduling_v1alpha1.PriorityClass{}, + &schedulingv1alpha1.PriorityClass{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *priorityClassInformer) defaultInformer(client kubernetes.Interface, res } func (f *priorityClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&scheduling_v1alpha1.PriorityClass{}, f.defaultInformer) + return f.factory.InformerFor(&schedulingv1alpha1.PriorityClass{}, f.defaultInformer) } func (f *priorityClassInformer) Lister() v1alpha1.PriorityClassLister { diff --git a/deps/k8s.io/client-go/informers/scheduling/v1beta1/interface.go b/deps/k8s.io/client-go/informers/scheduling/v1beta1/interface.go new file mode 100644 index 000000000..52840a9ce --- /dev/null +++ b/deps/k8s.io/client-go/informers/scheduling/v1beta1/interface.go @@ -0,0 +1,45 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // PriorityClasses returns a PriorityClassInformer. + PriorityClasses() PriorityClassInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// PriorityClasses returns a PriorityClassInformer. +func (v *version) PriorityClasses() PriorityClassInformer { + return &priorityClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/deps/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go b/deps/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go new file mode 100644 index 000000000..3c7d90938 --- /dev/null +++ b/deps/k8s.io/client-go/informers/scheduling/v1beta1/priorityclass.go @@ -0,0 +1,88 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + time "time" + + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + internalinterfaces "k8s.io/client-go/informers/internalinterfaces" + kubernetes "k8s.io/client-go/kubernetes" + v1beta1 "k8s.io/client-go/listers/scheduling/v1beta1" + cache "k8s.io/client-go/tools/cache" +) + +// PriorityClassInformer provides access to a shared informer and lister for +// PriorityClasses. +type PriorityClassInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1beta1.PriorityClassLister +} + +type priorityClassInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewPriorityClassInformer constructs a new informer for PriorityClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewPriorityClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredPriorityClassInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredPriorityClassInformer constructs a new informer for PriorityClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredPriorityClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SchedulingV1beta1().PriorityClasses().List(options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SchedulingV1beta1().PriorityClasses().Watch(options) + }, + }, + &schedulingv1beta1.PriorityClass{}, + resyncPeriod, + indexers, + ) +} + +func (f *priorityClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredPriorityClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *priorityClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&schedulingv1beta1.PriorityClass{}, f.defaultInformer) +} + +func (f *priorityClassInformer) Lister() v1beta1.PriorityClassLister { + return v1beta1.NewPriorityClassLister(f.Informer().GetIndexer()) +} diff --git a/deps/k8s.io/client-go/informers/settings/BUILD b/deps/k8s.io/client-go/informers/settings/BUILD deleted file mode 100644 index 5dc3cfd14..000000000 --- a/deps/k8s.io/client-go/informers/settings/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/settings", - deps = [ - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/informers/settings/v1alpha1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/settings/v1alpha1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/settings/interface.go b/deps/k8s.io/client-go/informers/settings/interface.go index 205dbbf4d..d91e49867 100644 --- a/deps/k8s.io/client-go/informers/settings/interface.go +++ b/deps/k8s.io/client-go/informers/settings/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package settings diff --git a/deps/k8s.io/client-go/informers/settings/v1alpha1/BUILD b/deps/k8s.io/client-go/informers/settings/v1alpha1/BUILD deleted file mode 100644 index fd24549e8..000000000 --- a/deps/k8s.io/client-go/informers/settings/v1alpha1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "podpreset.go", - ], - importpath = "k8s.io/client-go/informers/settings/v1alpha1", - deps = [ - "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/settings/v1alpha1/interface.go b/deps/k8s.io/client-go/informers/settings/v1alpha1/interface.go index 5714bf06c..250220469 100644 --- a/deps/k8s.io/client-go/informers/settings/v1alpha1/interface.go +++ b/deps/k8s.io/client-go/informers/settings/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go b/deps/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go index 7e8140585..33fcf2359 100644 --- a/deps/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go +++ b/deps/k8s.io/client-go/informers/settings/v1alpha1/podpreset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - settings_v1alpha1 "k8s.io/api/settings/v1alpha1" + settingsv1alpha1 "k8s.io/api/settings/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -70,7 +70,7 @@ func NewFilteredPodPresetInformer(client kubernetes.Interface, namespace string, return client.SettingsV1alpha1().PodPresets(namespace).Watch(options) }, }, - &settings_v1alpha1.PodPreset{}, + &settingsv1alpha1.PodPreset{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *podPresetInformer) defaultInformer(client kubernetes.Interface, resyncP } func (f *podPresetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&settings_v1alpha1.PodPreset{}, f.defaultInformer) + return f.factory.InformerFor(&settingsv1alpha1.PodPreset{}, f.defaultInformer) } func (f *podPresetInformer) Lister() v1alpha1.PodPresetLister { diff --git a/deps/k8s.io/client-go/informers/storage/BUILD b/deps/k8s.io/client-go/informers/storage/BUILD deleted file mode 100644 index 56e9e1850..000000000 --- a/deps/k8s.io/client-go/informers/storage/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["interface.go"], - importpath = "k8s.io/client-go/informers/storage", - deps = [ - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/informers/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/informers/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/informers/storage/v1beta1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/informers/storage/v1:all-srcs", - "//staging/src/k8s.io/client-go/informers/storage/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/informers/storage/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/storage/interface.go b/deps/k8s.io/client-go/informers/storage/interface.go index bf95b0b92..8245aa60c 100644 --- a/deps/k8s.io/client-go/informers/storage/interface.go +++ b/deps/k8s.io/client-go/informers/storage/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package storage diff --git a/deps/k8s.io/client-go/informers/storage/v1/BUILD b/deps/k8s.io/client-go/informers/storage/v1/BUILD deleted file mode 100644 index 29c0b883d..000000000 --- a/deps/k8s.io/client-go/informers/storage/v1/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "storageclass.go", - ], - importpath = "k8s.io/client-go/informers/storage/v1", - deps = [ - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/storage/v1/interface.go b/deps/k8s.io/client-go/informers/storage/v1/interface.go index ea84ebabf..d7e4b5c49 100644 --- a/deps/k8s.io/client-go/informers/storage/v1/interface.go +++ b/deps/k8s.io/client-go/informers/storage/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/informers/storage/v1/storageclass.go b/deps/k8s.io/client-go/informers/storage/v1/storageclass.go index f356b5902..b4609b4d2 100644 --- a/deps/k8s.io/client-go/informers/storage/v1/storageclass.go +++ b/deps/k8s.io/client-go/informers/storage/v1/storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - storage_v1 "k8s.io/api/storage/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + storagev1 "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" @@ -56,20 +56,20 @@ func NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Dura func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.StorageV1().StorageClasses().List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.StorageV1().StorageClasses().Watch(options) }, }, - &storage_v1.StorageClass{}, + &storagev1.StorageClass{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *storageClassInformer) defaultInformer(client kubernetes.Interface, resy } func (f *storageClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&storage_v1.StorageClass{}, f.defaultInformer) + return f.factory.InformerFor(&storagev1.StorageClass{}, f.defaultInformer) } func (f *storageClassInformer) Lister() v1.StorageClassLister { diff --git a/deps/k8s.io/client-go/informers/storage/v1alpha1/BUILD b/deps/k8s.io/client-go/informers/storage/v1alpha1/BUILD deleted file mode 100644 index 1871ff496..000000000 --- a/deps/k8s.io/client-go/informers/storage/v1alpha1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "volumeattachment.go", - ], - importpath = "k8s.io/client-go/informers/storage/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/informers/storage/v1alpha1/interface.go b/deps/k8s.io/client-go/informers/storage/v1alpha1/interface.go index 86d49a952..d389b73fa 100644 --- a/deps/k8s.io/client-go/informers/storage/v1alpha1/interface.go +++ b/deps/k8s.io/client-go/informers/storage/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go b/deps/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go index 6b5eeb3c5..e169c8a29 100644 --- a/deps/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go +++ b/deps/k8s.io/client-go/informers/storage/v1alpha1/volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha1 import ( time "time" - storage_v1alpha1 "k8s.io/api/storage/v1alpha1" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri return client.StorageV1alpha1().VolumeAttachments().Watch(options) }, }, - &storage_v1alpha1.VolumeAttachment{}, + &storagev1alpha1.VolumeAttachment{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *volumeAttachmentInformer) defaultInformer(client kubernetes.Interface, } func (f *volumeAttachmentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&storage_v1alpha1.VolumeAttachment{}, f.defaultInformer) + return f.factory.InformerFor(&storagev1alpha1.VolumeAttachment{}, f.defaultInformer) } func (f *volumeAttachmentInformer) Lister() v1alpha1.VolumeAttachmentLister { diff --git a/deps/k8s.io/client-go/informers/storage/v1beta1/BUILD b/deps/k8s.io/client-go/informers/storage/v1beta1/BUILD deleted file mode 100644 index 64aae5165..000000000 --- a/deps/k8s.io/client-go/informers/storage/v1beta1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "interface.go", - "storageclass.go", - "volumeattachment.go", - ], - importpath = "k8s.io/client-go/informers/storage/v1beta1", - deps = [ - "//vendor/k8s.io/api/storage/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/informers/internalinterfaces:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/listers/storage/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/informers/storage/v1beta1/interface.go b/deps/k8s.io/client-go/informers/storage/v1beta1/interface.go index eb8c0c830..aa11c2bb6 100644 --- a/deps/k8s.io/client-go/informers/storage/v1beta1/interface.go +++ b/deps/k8s.io/client-go/informers/storage/v1beta1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/informers/storage/v1beta1/storageclass.go b/deps/k8s.io/client-go/informers/storage/v1beta1/storageclass.go index af6641afb..ed898a77b 100644 --- a/deps/k8s.io/client-go/informers/storage/v1beta1/storageclass.go +++ b/deps/k8s.io/client-go/informers/storage/v1beta1/storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - storage_v1beta1 "k8s.io/api/storage/v1beta1" + storagev1beta1 "k8s.io/api/storage/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod t return client.StorageV1beta1().StorageClasses().Watch(options) }, }, - &storage_v1beta1.StorageClass{}, + &storagev1beta1.StorageClass{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *storageClassInformer) defaultInformer(client kubernetes.Interface, resy } func (f *storageClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&storage_v1beta1.StorageClass{}, f.defaultInformer) + return f.factory.InformerFor(&storagev1beta1.StorageClass{}, f.defaultInformer) } func (f *storageClassInformer) Lister() v1beta1.StorageClassLister { diff --git a/deps/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go b/deps/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go index 22b896823..c75fc06b1 100644 --- a/deps/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go +++ b/deps/k8s.io/client-go/informers/storage/v1beta1/volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( time "time" - storage_v1beta1 "k8s.io/api/storage/v1beta1" + storagev1beta1 "k8s.io/api/storage/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -69,7 +69,7 @@ func NewFilteredVolumeAttachmentInformer(client kubernetes.Interface, resyncPeri return client.StorageV1beta1().VolumeAttachments().Watch(options) }, }, - &storage_v1beta1.VolumeAttachment{}, + &storagev1beta1.VolumeAttachment{}, resyncPeriod, indexers, ) @@ -80,7 +80,7 @@ func (f *volumeAttachmentInformer) defaultInformer(client kubernetes.Interface, } func (f *volumeAttachmentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&storage_v1beta1.VolumeAttachment{}, f.defaultInformer) + return f.factory.InformerFor(&storagev1beta1.VolumeAttachment{}, f.defaultInformer) } func (f *volumeAttachmentInformer) Lister() v1beta1.VolumeAttachmentLister { diff --git a/deps/k8s.io/client-go/kubernetes/BUILD b/deps/k8s.io/client-go/kubernetes/BUILD deleted file mode 100644 index 0ef4f8671..000000000 --- a/deps/k8s.io/client-go/kubernetes/BUILD +++ /dev/null @@ -1,95 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset.go", - "doc.go", - "import.go", - ], - importpath = "k8s.io/client-go/kubernetes", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/fake:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/scheme:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/networking/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1:all-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/clientset.go b/deps/k8s.io/client-go/kubernetes/clientset.go index b68855909..c0416fc3e 100644 --- a/deps/k8s.io/client-go/kubernetes/clientset.go +++ b/deps/k8s.io/client-go/kubernetes/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package kubernetes import ( - glog "github.com/golang/glog" discovery "k8s.io/client-go/discovery" admissionregistrationv1alpha1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1" admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" @@ -34,6 +35,7 @@ import ( batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1" batchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1" certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" @@ -43,6 +45,7 @@ import ( rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" + schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1" storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" @@ -82,6 +85,9 @@ type Interface interface { CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface // Deprecated: please explicitly pick a version if possible. Certificates() certificatesv1beta1.CertificatesV1beta1Interface + CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface + // Deprecated: please explicitly pick a version if possible. + Coordination() coordinationv1beta1.CoordinationV1beta1Interface CoreV1() corev1.CoreV1Interface // Deprecated: please explicitly pick a version if possible. Core() corev1.CoreV1Interface @@ -103,8 +109,9 @@ type Interface interface { RbacV1beta1() rbacv1beta1.RbacV1beta1Interface RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface + SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface // Deprecated: please explicitly pick a version if possible. - Scheduling() schedulingv1alpha1.SchedulingV1alpha1Interface + Scheduling() schedulingv1beta1.SchedulingV1beta1Interface SettingsV1alpha1() settingsv1alpha1.SettingsV1alpha1Interface // Deprecated: please explicitly pick a version if possible. Settings() settingsv1alpha1.SettingsV1alpha1Interface @@ -134,6 +141,7 @@ type Clientset struct { batchV1beta1 *batchv1beta1.BatchV1beta1Client batchV2alpha1 *batchv2alpha1.BatchV2alpha1Client certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client + coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client coreV1 *corev1.CoreV1Client eventsV1beta1 *eventsv1beta1.EventsV1beta1Client extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client @@ -143,6 +151,7 @@ type Clientset struct { rbacV1beta1 *rbacv1beta1.RbacV1beta1Client rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client + schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client settingsV1alpha1 *settingsv1alpha1.SettingsV1alpha1Client storageV1beta1 *storagev1beta1.StorageV1beta1Client storageV1 *storagev1.StorageV1Client @@ -266,6 +275,17 @@ func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interf return c.certificatesV1beta1 } +// CoordinationV1beta1 retrieves the CoordinationV1beta1Client +func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { + return c.coordinationV1beta1 +} + +// Deprecated: Coordination retrieves the default version of CoordinationClient. +// Please explicitly pick a version. +func (c *Clientset) Coordination() coordinationv1beta1.CoordinationV1beta1Interface { + return c.coordinationV1beta1 +} + // CoreV1 retrieves the CoreV1Client func (c *Clientset) CoreV1() corev1.CoreV1Interface { return c.coreV1 @@ -347,10 +367,15 @@ func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1In return c.schedulingV1alpha1 } +// SchedulingV1beta1 retrieves the SchedulingV1beta1Client +func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { + return c.schedulingV1beta1 +} + // Deprecated: Scheduling retrieves the default version of SchedulingClient. // Please explicitly pick a version. -func (c *Clientset) Scheduling() schedulingv1alpha1.SchedulingV1alpha1Interface { - return c.schedulingV1alpha1 +func (c *Clientset) Scheduling() schedulingv1beta1.SchedulingV1beta1Interface { + return c.schedulingV1beta1 } // SettingsV1alpha1 retrieves the SettingsV1alpha1Client @@ -461,6 +486,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.coordinationV1beta1, err = coordinationv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.coreV1, err = corev1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -497,6 +526,10 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { if err != nil { return nil, err } + cs.schedulingV1beta1, err = schedulingv1beta1.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } cs.settingsV1alpha1, err = settingsv1alpha1.NewForConfig(&configShallowCopy) if err != nil { return nil, err @@ -516,7 +549,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil @@ -541,6 +573,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.batchV1beta1 = batchv1beta1.NewForConfigOrDie(c) cs.batchV2alpha1 = batchv2alpha1.NewForConfigOrDie(c) cs.certificatesV1beta1 = certificatesv1beta1.NewForConfigOrDie(c) + cs.coordinationV1beta1 = coordinationv1beta1.NewForConfigOrDie(c) cs.coreV1 = corev1.NewForConfigOrDie(c) cs.eventsV1beta1 = eventsv1beta1.NewForConfigOrDie(c) cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c) @@ -550,6 +583,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { cs.rbacV1beta1 = rbacv1beta1.NewForConfigOrDie(c) cs.rbacV1alpha1 = rbacv1alpha1.NewForConfigOrDie(c) cs.schedulingV1alpha1 = schedulingv1alpha1.NewForConfigOrDie(c) + cs.schedulingV1beta1 = schedulingv1beta1.NewForConfigOrDie(c) cs.settingsV1alpha1 = settingsv1alpha1.NewForConfigOrDie(c) cs.storageV1beta1 = storagev1beta1.NewForConfigOrDie(c) cs.storageV1 = storagev1.NewForConfigOrDie(c) @@ -577,6 +611,7 @@ func New(c rest.Interface) *Clientset { cs.batchV1beta1 = batchv1beta1.New(c) cs.batchV2alpha1 = batchv2alpha1.New(c) cs.certificatesV1beta1 = certificatesv1beta1.New(c) + cs.coordinationV1beta1 = coordinationv1beta1.New(c) cs.coreV1 = corev1.New(c) cs.eventsV1beta1 = eventsv1beta1.New(c) cs.extensionsV1beta1 = extensionsv1beta1.New(c) @@ -586,6 +621,7 @@ func New(c rest.Interface) *Clientset { cs.rbacV1beta1 = rbacv1beta1.New(c) cs.rbacV1alpha1 = rbacv1alpha1.New(c) cs.schedulingV1alpha1 = schedulingv1alpha1.New(c) + cs.schedulingV1beta1 = schedulingv1beta1.New(c) cs.settingsV1alpha1 = settingsv1alpha1.New(c) cs.storageV1beta1 = storagev1beta1.New(c) cs.storageV1 = storagev1.New(c) diff --git a/deps/k8s.io/client-go/kubernetes/doc.go b/deps/k8s.io/client-go/kubernetes/doc.go index 2c07131b1..b272334ad 100644 --- a/deps/k8s.io/client-go/kubernetes/doc.go +++ b/deps/k8s.io/client-go/kubernetes/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package kubernetes diff --git a/deps/k8s.io/client-go/kubernetes/fake/BUILD b/deps/k8s.io/client-go/kubernetes/fake/BUILD deleted file mode 100644 index c30d43ffb..000000000 --- a/deps/k8s.io/client-go/kubernetes/fake/BUILD +++ /dev/null @@ -1,124 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clientset_generated.go", - "doc.go", - "register.go", - ], - importpath = "k8s.io/client-go/kubernetes/fake", - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/api/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/api/authorization/v1:go_default_library", - "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", - "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/events/v1beta1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/api/networking/v1:go_default_library", - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/api/rbac/v1:go_default_library", - "//vendor/k8s.io/api/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/api/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/api/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/api/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/api/storage/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/deps/k8s.io/client-go/kubernetes/fake/clientset_generated.go index 02b950b28..720b98925 100644 --- a/deps/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/deps/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -52,6 +54,8 @@ import ( fakebatchv2alpha1 "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake" certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" fakecertificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake" + coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" + fakecoordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake" eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" @@ -70,6 +74,8 @@ import ( fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" fakeschedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake" + schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + fakeschedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake" settingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1" fakesettingsv1alpha1 "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake" storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" @@ -93,9 +99,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -105,7 +112,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a @@ -232,6 +239,16 @@ func (c *Clientset) Certificates() certificatesv1beta1.CertificatesV1beta1Interf return &fakecertificatesv1beta1.FakeCertificatesV1beta1{Fake: &c.Fake} } +// CoordinationV1beta1 retrieves the CoordinationV1beta1Client +func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface { + return &fakecoordinationv1beta1.FakeCoordinationV1beta1{Fake: &c.Fake} +} + +// Coordination retrieves the CoordinationV1beta1Client +func (c *Clientset) Coordination() coordinationv1beta1.CoordinationV1beta1Interface { + return &fakecoordinationv1beta1.FakeCoordinationV1beta1{Fake: &c.Fake} +} + // CoreV1 retrieves the CoreV1Client func (c *Clientset) CoreV1() corev1.CoreV1Interface { return &fakecorev1.FakeCoreV1{Fake: &c.Fake} @@ -307,9 +324,14 @@ func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1In return &fakeschedulingv1alpha1.FakeSchedulingV1alpha1{Fake: &c.Fake} } -// Scheduling retrieves the SchedulingV1alpha1Client -func (c *Clientset) Scheduling() schedulingv1alpha1.SchedulingV1alpha1Interface { - return &fakeschedulingv1alpha1.FakeSchedulingV1alpha1{Fake: &c.Fake} +// SchedulingV1beta1 retrieves the SchedulingV1beta1Client +func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface { + return &fakeschedulingv1beta1.FakeSchedulingV1beta1{Fake: &c.Fake} +} + +// Scheduling retrieves the SchedulingV1beta1Client +func (c *Clientset) Scheduling() schedulingv1beta1.SchedulingV1beta1Interface { + return &fakeschedulingv1beta1.FakeSchedulingV1beta1{Fake: &c.Fake} } // SettingsV1alpha1 retrieves the SettingsV1alpha1Client diff --git a/deps/k8s.io/client-go/kubernetes/fake/doc.go b/deps/k8s.io/client-go/kubernetes/fake/doc.go index 8a3101e39..9b99e7167 100644 --- a/deps/k8s.io/client-go/kubernetes/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/deps/k8s.io/client-go/kubernetes/fake/register.go b/deps/k8s.io/client-go/kubernetes/fake/register.go index 9fb7e2138..a39e7e59b 100644 --- a/deps/k8s.io/client-go/kubernetes/fake/register.go +++ b/deps/k8s.io/client-go/kubernetes/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -32,6 +34,7 @@ import ( batchv1beta1 "k8s.io/api/batch/v1beta1" batchv2alpha1 "k8s.io/api/batch/v2alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -41,6 +44,7 @@ import ( rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" settingsv1alpha1 "k8s.io/api/settings/v1alpha1" storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" @@ -49,15 +53,43 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + admissionregistrationv1alpha1.AddToScheme, + admissionregistrationv1beta1.AddToScheme, + appsv1beta1.AddToScheme, + appsv1beta2.AddToScheme, + appsv1.AddToScheme, + authenticationv1.AddToScheme, + authenticationv1beta1.AddToScheme, + authorizationv1.AddToScheme, + authorizationv1beta1.AddToScheme, + autoscalingv1.AddToScheme, + autoscalingv2beta1.AddToScheme, + batchv1.AddToScheme, + batchv1beta1.AddToScheme, + batchv2alpha1.AddToScheme, + certificatesv1beta1.AddToScheme, + coordinationv1beta1.AddToScheme, + corev1.AddToScheme, + eventsv1beta1.AddToScheme, + extensionsv1beta1.AddToScheme, + networkingv1.AddToScheme, + policyv1beta1.AddToScheme, + rbacv1.AddToScheme, + rbacv1beta1.AddToScheme, + rbacv1alpha1.AddToScheme, + schedulingv1alpha1.AddToScheme, + schedulingv1beta1.AddToScheme, + settingsv1alpha1.AddToScheme, + storagev1beta1.AddToScheme, + storagev1.AddToScheme, + storagev1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -70,37 +102,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - admissionregistrationv1alpha1.AddToScheme(scheme) - admissionregistrationv1beta1.AddToScheme(scheme) - appsv1beta1.AddToScheme(scheme) - appsv1beta2.AddToScheme(scheme) - appsv1.AddToScheme(scheme) - authenticationv1.AddToScheme(scheme) - authenticationv1beta1.AddToScheme(scheme) - authorizationv1.AddToScheme(scheme) - authorizationv1beta1.AddToScheme(scheme) - autoscalingv1.AddToScheme(scheme) - autoscalingv2beta1.AddToScheme(scheme) - batchv1.AddToScheme(scheme) - batchv1beta1.AddToScheme(scheme) - batchv2alpha1.AddToScheme(scheme) - certificatesv1beta1.AddToScheme(scheme) - corev1.AddToScheme(scheme) - eventsv1beta1.AddToScheme(scheme) - extensionsv1beta1.AddToScheme(scheme) - networkingv1.AddToScheme(scheme) - policyv1beta1.AddToScheme(scheme) - rbacv1.AddToScheme(scheme) - rbacv1beta1.AddToScheme(scheme) - rbacv1alpha1.AddToScheme(scheme) - schedulingv1alpha1.AddToScheme(scheme) - settingsv1alpha1.AddToScheme(scheme) - storagev1beta1.AddToScheme(scheme) - storagev1.AddToScheme(scheme) - storagev1alpha1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/deps/k8s.io/client-go/kubernetes/scheme/BUILD b/deps/k8s.io/client-go/kubernetes/scheme/BUILD deleted file mode 100644 index 1bb118aa0..000000000 --- a/deps/k8s.io/client-go/kubernetes/scheme/BUILD +++ /dev/null @@ -1,62 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importpath = "k8s.io/client-go/kubernetes/scheme", - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/api/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/api/authorization/v1:go_default_library", - "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", - "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/events/v1beta1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/api/networking/v1:go_default_library", - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/api/rbac/v1:go_default_library", - "//vendor/k8s.io/api/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/api/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/api/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/api/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/api/storage/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/scheme/doc.go b/deps/k8s.io/client-go/kubernetes/scheme/doc.go index 3d3ab5f4e..7dc375616 100644 --- a/deps/k8s.io/client-go/kubernetes/scheme/doc.go +++ b/deps/k8s.io/client-go/kubernetes/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/deps/k8s.io/client-go/kubernetes/scheme/register.go b/deps/k8s.io/client-go/kubernetes/scheme/register.go index fc6ff62a6..78d1d8399 100644 --- a/deps/k8s.io/client-go/kubernetes/scheme/register.go +++ b/deps/k8s.io/client-go/kubernetes/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( @@ -32,6 +34,7 @@ import ( batchv1beta1 "k8s.io/api/batch/v1beta1" batchv2alpha1 "k8s.io/api/batch/v2alpha1" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" + coordinationv1beta1 "k8s.io/api/coordination/v1beta1" corev1 "k8s.io/api/core/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" @@ -41,6 +44,7 @@ import ( rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" + schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" settingsv1alpha1 "k8s.io/api/settings/v1alpha1" storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" @@ -49,15 +53,43 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + admissionregistrationv1alpha1.AddToScheme, + admissionregistrationv1beta1.AddToScheme, + appsv1beta1.AddToScheme, + appsv1beta2.AddToScheme, + appsv1.AddToScheme, + authenticationv1.AddToScheme, + authenticationv1beta1.AddToScheme, + authorizationv1.AddToScheme, + authorizationv1beta1.AddToScheme, + autoscalingv1.AddToScheme, + autoscalingv2beta1.AddToScheme, + batchv1.AddToScheme, + batchv1beta1.AddToScheme, + batchv2alpha1.AddToScheme, + certificatesv1beta1.AddToScheme, + coordinationv1beta1.AddToScheme, + corev1.AddToScheme, + eventsv1beta1.AddToScheme, + extensionsv1beta1.AddToScheme, + networkingv1.AddToScheme, + policyv1beta1.AddToScheme, + rbacv1.AddToScheme, + rbacv1beta1.AddToScheme, + rbacv1alpha1.AddToScheme, + schedulingv1alpha1.AddToScheme, + schedulingv1beta1.AddToScheme, + settingsv1alpha1.AddToScheme, + storagev1beta1.AddToScheme, + storagev1.AddToScheme, + storagev1alpha1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -70,37 +102,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - admissionregistrationv1alpha1.AddToScheme(scheme) - admissionregistrationv1beta1.AddToScheme(scheme) - appsv1beta1.AddToScheme(scheme) - appsv1beta2.AddToScheme(scheme) - appsv1.AddToScheme(scheme) - authenticationv1.AddToScheme(scheme) - authenticationv1beta1.AddToScheme(scheme) - authorizationv1.AddToScheme(scheme) - authorizationv1beta1.AddToScheme(scheme) - autoscalingv1.AddToScheme(scheme) - autoscalingv2beta1.AddToScheme(scheme) - batchv1.AddToScheme(scheme) - batchv1beta1.AddToScheme(scheme) - batchv2alpha1.AddToScheme(scheme) - certificatesv1beta1.AddToScheme(scheme) - corev1.AddToScheme(scheme) - eventsv1beta1.AddToScheme(scheme) - extensionsv1beta1.AddToScheme(scheme) - networkingv1.AddToScheme(scheme) - policyv1beta1.AddToScheme(scheme) - rbacv1.AddToScheme(scheme) - rbacv1beta1.AddToScheme(scheme) - rbacv1alpha1.AddToScheme(scheme) - schedulingv1alpha1.AddToScheme(scheme) - settingsv1alpha1.AddToScheme(scheme) - storagev1beta1.AddToScheme(scheme) - storagev1.AddToScheme(scheme) - storagev1alpha1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) } diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index 6ad245311..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "admissionregistration_client.go", - "doc.go", - "generated_expansion.go", - "initializerconfiguration.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go index e6f1a81e2..5e02f7227 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/admissionregistration_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go index 08a9c7ceb..df51baa4d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD deleted file mode 100644 index a70c2bef0..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_admissionregistration_client.go", - "fake_initializerconfiguration.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go index 7fc656256..8457aec27 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_admissionregistration_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_initializerconfiguration.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_initializerconfiguration.go index 34d569257..b927dae2c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_initializerconfiguration.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/fake/fake_initializerconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeInitializerConfigurations) List(opts v1.ListOptions) (result *v1alp if label == nil { label = labels.Everything() } - list := &v1alpha1.InitializerConfigurationList{} + list := &v1alpha1.InitializerConfigurationList{ListMeta: obj.(*v1alpha1.InitializerConfigurationList).ListMeta} for _, item := range obj.(*v1alpha1.InitializerConfigurationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go index bfd47e53c..1e29b96f4 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 type InitializerConfigurationExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go index 11cc502f2..e014ea72b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1alpha1/initializerconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/BUILD deleted file mode 100644 index 197f738eb..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "admissionregistration_client.go", - "doc.go", - "generated_expansion.go", - "mutatingwebhookconfiguration.go", - "validatingwebhookconfiguration.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go index 63e84abc5..b13ea7953 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/BUILD deleted file mode 100644 index 4e615188d..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_admissionregistration_client.go", - "fake_mutatingwebhookconfiguration.go", - "fake_validatingwebhookconfiguration.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go index e08020e42..1a988ddba 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_admissionregistration_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go index 2b8829f9b..e06888cc1 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeMutatingWebhookConfigurations) List(opts v1.ListOptions) (result *v if label == nil { label = labels.Everything() } - list := &v1beta1.MutatingWebhookConfigurationList{} + list := &v1beta1.MutatingWebhookConfigurationList{ListMeta: obj.(*v1beta1.MutatingWebhookConfigurationList).ListMeta} for _, item := range obj.(*v1beta1.MutatingWebhookConfigurationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go index e0fd7ca65..1069634e2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_validatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeValidatingWebhookConfigurations) List(opts v1.ListOptions) (result if label == nil { label = labels.Everything() } - list := &v1beta1.ValidatingWebhookConfigurationList{} + list := &v1beta1.ValidatingWebhookConfigurationList{ListMeta: obj.(*v1beta1.ValidatingWebhookConfigurationList).ListMeta} for _, item := range obj.(*v1beta1.ValidatingWebhookConfigurationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go index a7780738b..2aeb9c98a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type MutatingWebhookConfigurationExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index f6afa0339..cb0157102 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 860ee16b5..3a9339f6c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/BUILD deleted file mode 100644 index 5d77a94df..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "apps_client.go", - "controllerrevision.go", - "daemonset.go", - "deployment.go", - "doc.go", - "generated_expansion.go", - "replicaset.go", - "statefulset.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/apps/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go index 0c81c1d96..da19c7596 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/apps_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go index 5f2d90b63..1ddaa1a71 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type ControllerRevisionsGetter interface { type ControllerRevisionInterface interface { Create(*v1.ControllerRevision) (*v1.ControllerRevision, error) Update(*v1.ControllerRevision) (*v1.ControllerRevision, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ControllerRevision, error) - List(opts meta_v1.ListOptions) (*v1.ControllerRevisionList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ControllerRevision, error) + List(opts metav1.ListOptions) (*v1.ControllerRevisionList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ControllerRevision, err error) ControllerRevisionExpansion } @@ -59,7 +61,7 @@ func newControllerRevisions(c *AppsV1Client, namespace string) *controllerRevisi } // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *controllerRevisions) Get(name string, options meta_v1.GetOptions) (result *v1.ControllerRevision, err error) { +func (c *controllerRevisions) Get(name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) { result = &v1.ControllerRevision{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *controllerRevisions) Get(name string, options meta_v1.GetOptions) (resu } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *controllerRevisions) List(opts meta_v1.ListOptions) (result *v1.ControllerRevisionList, err error) { +func (c *controllerRevisions) List(opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) { result = &v1.ControllerRevisionList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *controllerRevisions) List(opts meta_v1.ListOptions) (result *v1.Control } // Watch returns a watch.Interface that watches the requested controllerRevisions. -func (c *controllerRevisions) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *controllerRevisions) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *controllerRevisions) Update(controllerRevision *v1.ControllerRevision) } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. -func (c *controllerRevisions) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *controllerRevisions) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). @@ -130,7 +132,7 @@ func (c *controllerRevisions) Delete(name string, options *meta_v1.DeleteOptions } // DeleteCollection deletes a collection of objects. -func (c *controllerRevisions) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *controllerRevisions) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("controllerrevisions"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go index f9577d787..03a870698 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type DaemonSetInterface interface { Create(*v1.DaemonSet) (*v1.DaemonSet, error) Update(*v1.DaemonSet) (*v1.DaemonSet, error) UpdateStatus(*v1.DaemonSet) (*v1.DaemonSet, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.DaemonSet, error) - List(opts meta_v1.ListOptions) (*v1.DaemonSetList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.DaemonSet, error) + List(opts metav1.ListOptions) (*v1.DaemonSetList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.DaemonSet, err error) DaemonSetExpansion } @@ -60,7 +62,7 @@ func newDaemonSets(c *AppsV1Client, namespace string) *daemonSets { } // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1.DaemonSet, err error) { +func (c *daemonSets) Get(name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) { result = &v1.DaemonSet{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *daemonSets) Get(name string, options meta_v1.GetOptions) (result *v1.Da } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1.DaemonSetList, err error) { +func (c *daemonSets) List(opts metav1.ListOptions) (result *v1.DaemonSetList, err error) { result = &v1.DaemonSetList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *daemonSets) List(opts meta_v1.ListOptions) (result *v1.DaemonSetList, e } // Watch returns a watch.Interface that watches the requested daemonSets. -func (c *daemonSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *daemonSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *daemonSets) UpdateStatus(daemonSet *v1.DaemonSet) (result *v1.DaemonSet } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. -func (c *daemonSets) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *daemonSets) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). @@ -147,7 +149,7 @@ func (c *daemonSets) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *daemonSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *daemonSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("daemonsets"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go index af837714d..73d46f8bb 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type DeploymentInterface interface { Create(*v1.Deployment) (*v1.Deployment, error) Update(*v1.Deployment) (*v1.Deployment, error) UpdateStatus(*v1.Deployment) (*v1.Deployment, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Deployment, error) - List(opts meta_v1.ListOptions) (*v1.DeploymentList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Deployment, error) + List(opts metav1.ListOptions) (*v1.DeploymentList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Deployment, err error) DeploymentExpansion } @@ -60,7 +62,7 @@ func newDeployments(c *AppsV1Client, namespace string) *deployments { } // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1.Deployment, err error) { +func (c *deployments) Get(name string, options metav1.GetOptions) (result *v1.Deployment, err error) { result = &v1.Deployment{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *deployments) Get(name string, options meta_v1.GetOptions) (result *v1.D } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *deployments) List(opts meta_v1.ListOptions) (result *v1.DeploymentList, err error) { +func (c *deployments) List(opts metav1.ListOptions) (result *v1.DeploymentList, err error) { result = &v1.DeploymentList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *deployments) List(opts meta_v1.ListOptions) (result *v1.DeploymentList, } // Watch returns a watch.Interface that watches the requested deployments. -func (c *deployments) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *deployments) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *deployments) UpdateStatus(deployment *v1.Deployment) (result *v1.Deploy } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. -func (c *deployments) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *deployments) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). @@ -147,7 +149,7 @@ func (c *deployments) Delete(name string, options *meta_v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *deployments) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *deployments) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("deployments"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/BUILD deleted file mode 100644 index 912b2755d..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_apps_client.go", - "fake_controllerrevision.go", - "fake_daemonset.go", - "fake_deployment.go", - "fake_replicaset.go", - "fake_statefulset.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/apps/v1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go index 79f62f184..458df0fa3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_apps_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go index 3fbea7ff4..fc2808daf 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - apps_v1 "k8s.io/api/apps/v1" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var controllerrevisionsResource = schema.GroupVersionResource{Group: "apps", Ver var controllerrevisionsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ControllerRevision"} // Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any. -func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *apps_v1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Get(name string, options v1.GetOptions) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &apps_v1.ControllerRevision{}) + Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ControllerRevision), err + return obj.(*appsv1.ControllerRevision), err } // List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors. -func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *apps_v1.ControllerRevisionList, err error) { +func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *appsv1.ControllerRevisionList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &apps_v1.ControllerRevisionList{}) + Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &appsv1.ControllerRevisionList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *apps_v1.Con if label == nil { label = labels.Everything() } - list := &apps_v1.ControllerRevisionList{} - for _, item := range obj.(*apps_v1.ControllerRevisionList).Items { + list := &appsv1.ControllerRevisionList{ListMeta: obj.(*appsv1.ControllerRevisionList).ListMeta} + for _, item := range obj.(*appsv1.ControllerRevisionList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeControllerRevisions) Watch(opts v1.ListOptions) (watch.Interface, e } // Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Create(controllerRevision *apps_v1.ControllerRevision) (result *apps_v1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Create(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &apps_v1.ControllerRevision{}) + Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ControllerRevision), err + return obj.(*appsv1.ControllerRevision), err } // Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any. -func (c *FakeControllerRevisions) Update(controllerRevision *apps_v1.ControllerRevision) (result *apps_v1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Update(controllerRevision *appsv1.ControllerRevision) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &apps_v1.ControllerRevision{}) + Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &appsv1.ControllerRevision{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ControllerRevision), err + return obj.(*appsv1.ControllerRevision), err } // Delete takes name of the controllerRevision and deletes it. Returns an error if one occurs. func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &apps_v1.ControllerRevision{}) + Invokes(testing.NewDeleteAction(controllerrevisionsResource, c.ns, name), &appsv1.ControllerRevision{}) return err } @@ -110,17 +112,17 @@ func (c *FakeControllerRevisions) Delete(name string, options *v1.DeleteOptions) func (c *FakeControllerRevisions) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(controllerrevisionsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &apps_v1.ControllerRevisionList{}) + _, err := c.Fake.Invokes(action, &appsv1.ControllerRevisionList{}) return err } // Patch applies the patch and returns the patched controllerRevision. -func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.ControllerRevision, err error) { +func (c *FakeControllerRevisions) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ControllerRevision, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, data, subresources...), &apps_v1.ControllerRevision{}) + Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, data, subresources...), &appsv1.ControllerRevision{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ControllerRevision), err + return obj.(*appsv1.ControllerRevision), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go index 87167b688..89e72ebd3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - apps_v1 "k8s.io/api/apps/v1" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var daemonsetsResource = schema.GroupVersionResource{Group: "apps", Version: "v1 var daemonsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "DaemonSet"} // Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. -func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *apps_v1.DaemonSet, err error) { +func (c *FakeDaemonSets) Get(name string, options v1.GetOptions) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &apps_v1.DaemonSet{}) + Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.DaemonSet), err + return obj.(*appsv1.DaemonSet), err } // List takes label and field selectors, and returns the list of DaemonSets that match those selectors. -func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *apps_v1.DaemonSetList, err error) { +func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *appsv1.DaemonSetList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &apps_v1.DaemonSetList{}) + Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &appsv1.DaemonSetList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *apps_v1.DaemonSetLis if label == nil { label = labels.Everything() } - list := &apps_v1.DaemonSetList{} - for _, item := range obj.(*apps_v1.DaemonSetList).Items { + list := &appsv1.DaemonSetList{ListMeta: obj.(*appsv1.DaemonSetList).ListMeta} + for _, item := range obj.(*appsv1.DaemonSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeDaemonSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Create(daemonSet *apps_v1.DaemonSet) (result *apps_v1.DaemonSet, err error) { +func (c *FakeDaemonSets) Create(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &apps_v1.DaemonSet{}) + Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.DaemonSet), err + return obj.(*appsv1.DaemonSet), err } // Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any. -func (c *FakeDaemonSets) Update(daemonSet *apps_v1.DaemonSet) (result *apps_v1.DaemonSet, err error) { +func (c *FakeDaemonSets) Update(daemonSet *appsv1.DaemonSet) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &apps_v1.DaemonSet{}) + Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &appsv1.DaemonSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.DaemonSet), err + return obj.(*appsv1.DaemonSet), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDaemonSets) UpdateStatus(daemonSet *apps_v1.DaemonSet) (*apps_v1.DaemonSet, error) { +func (c *FakeDaemonSets) UpdateStatus(daemonSet *appsv1.DaemonSet) (*appsv1.DaemonSet, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &apps_v1.DaemonSet{}) + Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &appsv1.DaemonSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.DaemonSet), err + return obj.(*appsv1.DaemonSet), err } // Delete takes name of the daemonSet and deletes it. Returns an error if one occurs. func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &apps_v1.DaemonSet{}) + Invokes(testing.NewDeleteAction(daemonsetsResource, c.ns, name), &appsv1.DaemonSet{}) return err } @@ -122,17 +124,17 @@ func (c *FakeDaemonSets) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeDaemonSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &apps_v1.DaemonSetList{}) + _, err := c.Fake.Invokes(action, &appsv1.DaemonSetList{}) return err } // Patch applies the patch and returns the patched daemonSet. -func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.DaemonSet, err error) { +func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.DaemonSet, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &apps_v1.DaemonSet{}) + Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &appsv1.DaemonSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.DaemonSet), err + return obj.(*appsv1.DaemonSet), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go index 99b90371e..2fbd82d6b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - apps_v1 "k8s.io/api/apps/v1" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var deploymentsResource = schema.GroupVersionResource{Group: "apps", Version: "v var deploymentsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "Deployment"} // Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any. -func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *apps_v1.Deployment, err error) { +func (c *FakeDeployments) Get(name string, options v1.GetOptions) (result *appsv1.Deployment, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &apps_v1.Deployment{}) + Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &appsv1.Deployment{}) if obj == nil { return nil, err } - return obj.(*apps_v1.Deployment), err + return obj.(*appsv1.Deployment), err } // List takes label and field selectors, and returns the list of Deployments that match those selectors. -func (c *FakeDeployments) List(opts v1.ListOptions) (result *apps_v1.DeploymentList, err error) { +func (c *FakeDeployments) List(opts v1.ListOptions) (result *appsv1.DeploymentList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &apps_v1.DeploymentList{}) + Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &appsv1.DeploymentList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *apps_v1.DeploymentL if label == nil { label = labels.Everything() } - list := &apps_v1.DeploymentList{} - for _, item := range obj.(*apps_v1.DeploymentList).Items { + list := &appsv1.DeploymentList{ListMeta: obj.(*appsv1.DeploymentList).ListMeta} + for _, item := range obj.(*appsv1.DeploymentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeDeployments) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Create(deployment *apps_v1.Deployment) (result *apps_v1.Deployment, err error) { +func (c *FakeDeployments) Create(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &apps_v1.Deployment{}) + Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) if obj == nil { return nil, err } - return obj.(*apps_v1.Deployment), err + return obj.(*appsv1.Deployment), err } // Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any. -func (c *FakeDeployments) Update(deployment *apps_v1.Deployment) (result *apps_v1.Deployment, err error) { +func (c *FakeDeployments) Update(deployment *appsv1.Deployment) (result *appsv1.Deployment, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &apps_v1.Deployment{}) + Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &appsv1.Deployment{}) if obj == nil { return nil, err } - return obj.(*apps_v1.Deployment), err + return obj.(*appsv1.Deployment), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeDeployments) UpdateStatus(deployment *apps_v1.Deployment) (*apps_v1.Deployment, error) { +func (c *FakeDeployments) UpdateStatus(deployment *appsv1.Deployment) (*appsv1.Deployment, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &apps_v1.Deployment{}) + Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &appsv1.Deployment{}) if obj == nil { return nil, err } - return obj.(*apps_v1.Deployment), err + return obj.(*appsv1.Deployment), err } // Delete takes name of the deployment and deletes it. Returns an error if one occurs. func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &apps_v1.Deployment{}) + Invokes(testing.NewDeleteAction(deploymentsResource, c.ns, name), &appsv1.Deployment{}) return err } @@ -122,17 +124,17 @@ func (c *FakeDeployments) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeDeployments) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &apps_v1.DeploymentList{}) + _, err := c.Fake.Invokes(action, &appsv1.DeploymentList{}) return err } // Patch applies the patch and returns the patched deployment. -func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.Deployment, err error) { +func (c *FakeDeployments) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.Deployment, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &apps_v1.Deployment{}) + Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, data, subresources...), &appsv1.Deployment{}) if obj == nil { return nil, err } - return obj.(*apps_v1.Deployment), err + return obj.(*appsv1.Deployment), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go index 1330460ad..7b882c863 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - apps_v1 "k8s.io/api/apps/v1" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var replicasetsResource = schema.GroupVersionResource{Group: "apps", Version: "v var replicasetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "ReplicaSet"} // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *apps_v1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Get(name string, options v1.GetOptions) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &apps_v1.ReplicaSet{}) + Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ReplicaSet), err + return obj.(*appsv1.ReplicaSet), err } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *apps_v1.ReplicaSetList, err error) { +func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *appsv1.ReplicaSetList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &apps_v1.ReplicaSetList{}) + Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &appsv1.ReplicaSetList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *apps_v1.ReplicaSetL if label == nil { label = labels.Everything() } - list := &apps_v1.ReplicaSetList{} - for _, item := range obj.(*apps_v1.ReplicaSetList).Items { + list := &appsv1.ReplicaSetList{ListMeta: obj.(*appsv1.ReplicaSetList).ListMeta} + for _, item := range obj.(*appsv1.ReplicaSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Create(replicaSet *apps_v1.ReplicaSet) (result *apps_v1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Create(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &apps_v1.ReplicaSet{}) + Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ReplicaSet), err + return obj.(*appsv1.ReplicaSet), err } // Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any. -func (c *FakeReplicaSets) Update(replicaSet *apps_v1.ReplicaSet) (result *apps_v1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Update(replicaSet *appsv1.ReplicaSet) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &apps_v1.ReplicaSet{}) + Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &appsv1.ReplicaSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ReplicaSet), err + return obj.(*appsv1.ReplicaSet), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicaSets) UpdateStatus(replicaSet *apps_v1.ReplicaSet) (*apps_v1.ReplicaSet, error) { +func (c *FakeReplicaSets) UpdateStatus(replicaSet *appsv1.ReplicaSet) (*appsv1.ReplicaSet, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &apps_v1.ReplicaSet{}) + Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &appsv1.ReplicaSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ReplicaSet), err + return obj.(*appsv1.ReplicaSet), err } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &apps_v1.ReplicaSet{}) + Invokes(testing.NewDeleteAction(replicasetsResource, c.ns, name), &appsv1.ReplicaSet{}) return err } @@ -122,17 +124,17 @@ func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &apps_v1.ReplicaSetList{}) + _, err := c.Fake.Invokes(action, &appsv1.ReplicaSetList{}) return err } // Patch applies the patch and returns the patched replicaSet. -func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.ReplicaSet, err error) { +func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.ReplicaSet, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &apps_v1.ReplicaSet{}) + Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &appsv1.ReplicaSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.ReplicaSet), err + return obj.(*appsv1.ReplicaSet), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go index 44845d31b..3cd643a59 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/fake/fake_statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - apps_v1 "k8s.io/api/apps/v1" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var statefulsetsResource = schema.GroupVersionResource{Group: "apps", Version: " var statefulsetsKind = schema.GroupVersionKind{Group: "apps", Version: "v1", Kind: "StatefulSet"} // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *apps_v1.StatefulSet, err error) { +func (c *FakeStatefulSets) Get(name string, options v1.GetOptions) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &apps_v1.StatefulSet{}) + Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.StatefulSet), err + return obj.(*appsv1.StatefulSet), err } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *apps_v1.StatefulSetList, err error) { +func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *appsv1.StatefulSetList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &apps_v1.StatefulSetList{}) + Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &appsv1.StatefulSetList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *apps_v1.StatefulSe if label == nil { label = labels.Everything() } - list := &apps_v1.StatefulSetList{} - for _, item := range obj.(*apps_v1.StatefulSetList).Items { + list := &appsv1.StatefulSetList{ListMeta: obj.(*appsv1.StatefulSetList).ListMeta} + for _, item := range obj.(*appsv1.StatefulSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeStatefulSets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Create(statefulSet *apps_v1.StatefulSet) (result *apps_v1.StatefulSet, err error) { +func (c *FakeStatefulSets) Create(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &apps_v1.StatefulSet{}) + Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.StatefulSet), err + return obj.(*appsv1.StatefulSet), err } // Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any. -func (c *FakeStatefulSets) Update(statefulSet *apps_v1.StatefulSet) (result *apps_v1.StatefulSet, err error) { +func (c *FakeStatefulSets) Update(statefulSet *appsv1.StatefulSet) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &apps_v1.StatefulSet{}) + Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &appsv1.StatefulSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.StatefulSet), err + return obj.(*appsv1.StatefulSet), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeStatefulSets) UpdateStatus(statefulSet *apps_v1.StatefulSet) (*apps_v1.StatefulSet, error) { +func (c *FakeStatefulSets) UpdateStatus(statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &apps_v1.StatefulSet{}) + Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &appsv1.StatefulSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.StatefulSet), err + return obj.(*appsv1.StatefulSet), err } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &apps_v1.StatefulSet{}) + Invokes(testing.NewDeleteAction(statefulsetsResource, c.ns, name), &appsv1.StatefulSet{}) return err } @@ -122,17 +124,17 @@ func (c *FakeStatefulSets) Delete(name string, options *v1.DeleteOptions) error func (c *FakeStatefulSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &apps_v1.StatefulSetList{}) + _, err := c.Fake.Invokes(action, &appsv1.StatefulSetList{}) return err } // Patch applies the patch and returns the patched statefulSet. -func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apps_v1.StatefulSet, err error) { +func (c *FakeStatefulSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *appsv1.StatefulSet, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &apps_v1.StatefulSet{}) + Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &appsv1.StatefulSet{}) if obj == nil { return nil, err } - return obj.(*apps_v1.StatefulSet), err + return obj.(*appsv1.StatefulSet), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go index 6d07e293d..88cfe4ecb 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type ControllerRevisionExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go index bf5330f06..077941162 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type ReplicaSetInterface interface { Create(*v1.ReplicaSet) (*v1.ReplicaSet, error) Update(*v1.ReplicaSet) (*v1.ReplicaSet, error) UpdateStatus(*v1.ReplicaSet) (*v1.ReplicaSet, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ReplicaSet, error) - List(opts meta_v1.ListOptions) (*v1.ReplicaSetList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ReplicaSet, error) + List(opts metav1.ListOptions) (*v1.ReplicaSetList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicaSet, err error) ReplicaSetExpansion } @@ -60,7 +62,7 @@ func newReplicaSets(c *AppsV1Client, namespace string) *replicaSets { } // Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any. -func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicaSet, err error) { +func (c *replicaSets) Get(name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) { result = &v1.ReplicaSet{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *replicaSets) Get(name string, options meta_v1.GetOptions) (result *v1.R } // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. -func (c *replicaSets) List(opts meta_v1.ListOptions) (result *v1.ReplicaSetList, err error) { +func (c *replicaSets) List(opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) { result = &v1.ReplicaSetList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *replicaSets) List(opts meta_v1.ListOptions) (result *v1.ReplicaSetList, } // Watch returns a watch.Interface that watches the requested replicaSets. -func (c *replicaSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *replicaSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1.ReplicaSet) (result *v1.Replic } // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. -func (c *replicaSets) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *replicaSets) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). @@ -147,7 +149,7 @@ func (c *replicaSets) Delete(name string, options *meta_v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *replicaSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *replicaSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicasets"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go index 05496f311..54322d97d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/apps/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type StatefulSetInterface interface { Create(*v1.StatefulSet) (*v1.StatefulSet, error) Update(*v1.StatefulSet) (*v1.StatefulSet, error) UpdateStatus(*v1.StatefulSet) (*v1.StatefulSet, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.StatefulSet, error) - List(opts meta_v1.ListOptions) (*v1.StatefulSetList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.StatefulSet, error) + List(opts metav1.ListOptions) (*v1.StatefulSetList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StatefulSet, err error) StatefulSetExpansion } @@ -60,7 +62,7 @@ func newStatefulSets(c *AppsV1Client, namespace string) *statefulSets { } // Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. -func (c *statefulSets) Get(name string, options meta_v1.GetOptions) (result *v1.StatefulSet, err error) { +func (c *statefulSets) Get(name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) { result = &v1.StatefulSet{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *statefulSets) Get(name string, options meta_v1.GetOptions) (result *v1. } // List takes label and field selectors, and returns the list of StatefulSets that match those selectors. -func (c *statefulSets) List(opts meta_v1.ListOptions) (result *v1.StatefulSetList, err error) { +func (c *statefulSets) List(opts metav1.ListOptions) (result *v1.StatefulSetList, err error) { result = &v1.StatefulSetList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *statefulSets) List(opts meta_v1.ListOptions) (result *v1.StatefulSetLis } // Watch returns a watch.Interface that watches the requested statefulSets. -func (c *statefulSets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *statefulSets) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *statefulSets) UpdateStatus(statefulSet *v1.StatefulSet) (result *v1.Sta } // Delete takes name of the statefulSet and deletes it. Returns an error if one occurs. -func (c *statefulSets) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *statefulSets) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). @@ -147,7 +149,7 @@ func (c *statefulSets) Delete(name string, options *meta_v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *statefulSets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *statefulSets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("statefulsets"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/BUILD deleted file mode 100644 index 18dca7163..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "apps_client.go", - "controllerrevision.go", - "deployment.go", - "doc.go", - "generated_expansion.go", - "scale.go", - "statefulset.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/apps/v1beta1", - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go index eaf6c8b45..4d882e26e 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/apps_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go index 86cab3bb3..ec8fa9242 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go index 1827d92db..365e06f3f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/BUILD deleted file mode 100644 index ef39b5d3d..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_apps_client.go", - "fake_controllerrevision.go", - "fake_deployment.go", - "fake_scale.go", - "fake_statefulset.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go index 22d280d2e..2ff602be9 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_apps_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go index 3d09b1a3a..924194891 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta1.Con if label == nil { label = labels.Everything() } - list := &v1beta1.ControllerRevisionList{} + list := &v1beta1.ControllerRevisionList{ListMeta: obj.(*v1beta1.ControllerRevisionList).ListMeta} for _, item := range obj.(*v1beta1.ControllerRevisionList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go index 98260c467..c4749c52b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentL if label == nil { label = labels.Everything() } - list := &v1beta1.DeploymentList{} + list := &v1beta1.DeploymentList{ListMeta: obj.(*v1beta1.DeploymentList).ListMeta} for _, item := range obj.(*v1beta1.DeploymentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_scale.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_scale.go index 19dfda1c4..de71947e5 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_scale.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeScales implements ScaleInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go index b34b8a8fc..b0f194a7d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/fake/fake_statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta1.StatefulSe if label == nil { label = labels.Everything() } - list := &v1beta1.StatefulSetList{} + list := &v1beta1.StatefulSetList{ListMeta: obj.(*v1beta1.StatefulSetList).ListMeta} for _, item := range obj.(*v1beta1.StatefulSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go index 44edefdcd..b2bfd73a7 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type ControllerRevisionExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go index d67f31431..cef27bd14 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go index cf96d006c..651745451 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta1/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/BUILD b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/BUILD deleted file mode 100644 index 0af42bcf8..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "apps_client.go", - "controllerrevision.go", - "daemonset.go", - "deployment.go", - "doc.go", - "generated_expansion.go", - "replicaset.go", - "scale.go", - "statefulset.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/apps/v1beta2", - deps = [ - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go index cb44f155f..27549499f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/apps_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go index 9fe5d129a..1271cc623 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go index e062d392f..683c06812 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go index 0e292ca17..9a04513f1 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go index 8d6189201..56518ef7f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta2 diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/BUILD deleted file mode 100644 index d965ed1b2..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_apps_client.go", - "fake_controllerrevision.go", - "fake_daemonset.go", - "fake_deployment.go", - "fake_replicaset.go", - "fake_scale.go", - "fake_statefulset.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake", - deps = [ - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/apps/v1beta2:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go index fff0882a1..f7d79d352 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_apps_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go index 1209c8689..954ac35df 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeControllerRevisions) List(opts v1.ListOptions) (result *v1beta2.Con if label == nil { label = labels.Everything() } - list := &v1beta2.ControllerRevisionList{} + list := &v1beta2.ControllerRevisionList{ListMeta: obj.(*v1beta2.ControllerRevisionList).ListMeta} for _, item := range obj.(*v1beta2.ControllerRevisionList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go index b94e4c920..38a147550 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta2.DaemonSetLis if label == nil { label = labels.Everything() } - list := &v1beta2.DaemonSetList{} + list := &v1beta2.DaemonSetList{ListMeta: obj.(*v1beta2.DaemonSetList).ListMeta} for _, item := range obj.(*v1beta2.DaemonSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go index 6571c9e52..cae232242 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta2.DeploymentL if label == nil { label = labels.Everything() } - list := &v1beta2.DeploymentList{} + list := &v1beta2.DeploymentList{ListMeta: obj.(*v1beta2.DeploymentList).ListMeta} for _, item := range obj.(*v1beta2.DeploymentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go index 8158ba983..05fa78931 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta2.ReplicaSetL if label == nil { label = labels.Everything() } - list := &v1beta2.ReplicaSetList{} + list := &v1beta2.ReplicaSetList{ListMeta: obj.(*v1beta2.ReplicaSetList).ListMeta} for _, item := range obj.(*v1beta2.ReplicaSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_scale.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_scale.go index d873efede..b06b7e8e3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_scale.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeScales implements ScaleInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go index 937c38978..fe7851286 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/fake/fake_statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeStatefulSets) List(opts v1.ListOptions) (result *v1beta2.StatefulSe if label == nil { label = labels.Everything() } - list := &v1beta2.StatefulSetList{} + list := &v1beta2.StatefulSetList{ListMeta: obj.(*v1beta2.StatefulSetList).ListMeta} for _, item := range obj.(*v1beta2.StatefulSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go index 98356ca71..bceae5986 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 type ControllerRevisionExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go index e0cd3a286..9fd9de930 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go index 0295d4144..f8d6a7fb0 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go index 8bac75600..095601e15 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/apps/v1beta2/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta2 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD deleted file mode 100644 index b89498dea..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "authentication_client.go", - "doc.go", - "generated_expansion.go", - "tokenreview.go", - "tokenreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1", - deps = [ - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go index 4d0af8c26..3bdcee598 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD deleted file mode 100644 index b2c995baf..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_authentication_client.go", - "fake_tokenreview.go", - "fake_tokenreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1/fake", - deps = [ - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go index fbf88f6f5..ee06a6cdd 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_authentication_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go index a5e5bf533..e2a7f72b6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/fake/fake_tokenreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeTokenReviews implements TokenReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go index 94adbfbce..177209ec6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go index ab95e6a83..25a8d6a17 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1/tokenreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD deleted file mode 100644 index ddbe7e984..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "authentication_client.go", - "doc.go", - "generated_expansion.go", - "tokenreview.go", - "tokenreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1", - deps = [ - "//vendor/k8s.io/api/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go index 996de350a..7f3334a0c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/authentication_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD deleted file mode 100644 index b9800aac7..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_authentication_client.go", - "fake_tokenreview.go", - "fake_tokenreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go index 6dd34cca6..7299653ca 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_authentication_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go index 6089e2f94..63b6b6a85 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/fake/fake_tokenreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeTokenReviews implements TokenReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go index 74ad7fa90..f6df76963 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go index eef5a968d..0ac3561e1 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/tokenreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD deleted file mode 100644 index f6255f38c..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "authorization_client.go", - "doc.go", - "generated_expansion.go", - "localsubjectaccessreview.go", - "localsubjectaccessreview_expansion.go", - "selfsubjectaccessreview.go", - "selfsubjectaccessreview_expansion.go", - "selfsubjectrulesreview.go", - "selfsubjectrulesreview_expansion.go", - "subjectaccessreview.go", - "subjectaccessreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1", - deps = [ - "//vendor/k8s.io/api/authorization/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go index c75cc05b6..e84b90084 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/authorization_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD deleted file mode 100644 index cfea68c78..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_authorization_client.go", - "fake_localsubjectaccessreview.go", - "fake_localsubjectaccessreview_expansion.go", - "fake_selfsubjectaccessreview.go", - "fake_selfsubjectaccessreview_expansion.go", - "fake_selfsubjectrulesreview.go", - "fake_selfsubjectrulesreview_expansion.go", - "fake_subjectaccessreview.go", - "fake_subjectaccessreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1/fake", - deps = [ - "//vendor/k8s.io/api/authorization/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go index 0a0594179..f7e823450 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_authorization_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go index 7ea7aac88..778ba9cea 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_localsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go index 1b977f354..a43a980ba 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go index 1acf4f52b..243f2e89e 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_selfsubjectrulesreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go index 4301290b5..d07e56254 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeSubjectAccessReviews implements SubjectAccessReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview_expansion.go index 7ddc58ff4..a2a2f0697 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/fake/fake_subjectaccessreview_expansion.go @@ -23,5 +23,8 @@ import ( func (c *FakeSubjectAccessReviews) Create(sar *authorizationapi.SubjectAccessReview) (result *authorizationapi.SubjectAccessReview, err error) { obj, err := c.Fake.Invokes(core.NewRootCreateAction(authorizationapi.SchemeGroupVersion.WithResource("subjectaccessreviews"), sar), &authorizationapi.SubjectAccessReview{}) + if obj == nil { + return nil, err + } return obj.(*authorizationapi.SubjectAccessReview), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go index 94adbfbce..177209ec6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go index 7c9ff014f..0292c7861 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/localsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go index 0957b231c..1e3a45817 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go index 9caaee2a0..50a0233eb 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/selfsubjectrulesreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go index f4557d2ba..9c09008c3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1/subjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD deleted file mode 100644 index 793ec39b5..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "authorization_client.go", - "doc.go", - "generated_expansion.go", - "localsubjectaccessreview.go", - "localsubjectaccessreview_expansion.go", - "selfsubjectaccessreview.go", - "selfsubjectaccessreview_expansion.go", - "selfsubjectrulesreview.go", - "selfsubjectrulesreview_expansion.go", - "subjectaccessreview.go", - "subjectaccessreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1", - deps = [ - "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go index 5bf1261ad..7f236f6e3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/authorization_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD deleted file mode 100644 index d3fd9e81b..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_authorization_client.go", - "fake_generated_expansion.go", - "fake_localsubjectaccessreview.go", - "fake_localsubjectaccessreview_expansion.go", - "fake_selfsubjectaccessreview.go", - "fake_selfsubjectaccessreview_expansion.go", - "fake_selfsubjectrulesreview.go", - "fake_selfsubjectrulesreview_expansion.go", - "fake_subjectaccessreview.go", - "fake_subjectaccessreview_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go index 3d3dc67ad..8e328a57b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_authorization_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go index ceb5c499f..d02d05e5d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_localsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeLocalSubjectAccessReviews implements LocalSubjectAccessReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go index 11415d843..8f98ce7a3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeSelfSubjectAccessReviews implements SelfSubjectAccessReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go index b85ee6ddb..d8466b4c8 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_selfsubjectrulesreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeSelfSubjectRulesReviews implements SelfSubjectRulesReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go index 43229d572..0d0abdb72 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/fake/fake_subjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeSubjectAccessReviews implements SubjectAccessReviewInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go index 74ad7fa90..f6df76963 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go index 18821d72e..f5e86a76a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/localsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go index 7bc2a0211..906712cc3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go index 7dfd314d2..56c0f99d4 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/selfsubjectrulesreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go index aa4dfcaab..79f1ec535 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go +++ b/deps/k8s.io/client-go/kubernetes/typed/authorization/v1beta1/subjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/BUILD deleted file mode 100644 index 30e434a68..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "autoscaling_client.go", - "doc.go", - "generated_expansion.go", - "horizontalpodautoscaler.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/autoscaling/v1", - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go index 1e504bd0f..2bd49e2db 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/BUILD deleted file mode 100644 index 3cabf19c5..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_autoscaling_client.go", - "fake_horizontalpodautoscaler.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake", - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go index 3eb03bca5..99e26fcf3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go index 25064f648..7df834375 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/fake/fake_horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - autoscaling_v1 "k8s.io/api/autoscaling/v1" + autoscalingv1 "k8s.io/api/autoscaling/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var horizontalpodautoscalersResource = schema.GroupVersionResource{Group: "autos var horizontalpodautoscalersKind = schema.GroupVersionKind{Group: "autoscaling", Version: "v1", Kind: "HorizontalPodAutoscaler"} // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Get(name string, options v1.GetOptions) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling_v1.HorizontalPodAutoscaler{}) + Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{}) if obj == nil { return nil, err } - return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscaling_v1.HorizontalPodAutoscalerList, err error) { +func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autoscalingv1.HorizontalPodAutoscalerList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscaling_v1.HorizontalPodAutoscalerList{}) + Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &autoscalingv1.HorizontalPodAutoscalerList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *autosc if label == nil { label = labels.Everything() } - list := &autoscaling_v1.HorizontalPodAutoscalerList{} - for _, item := range obj.(*autoscaling_v1.HorizontalPodAutoscalerList).Items { + list := &autoscalingv1.HorizontalPodAutoscalerList{ListMeta: obj.(*autoscalingv1.HorizontalPodAutoscalerList).ListMeta} + for _, item := range obj.(*autoscalingv1.HorizontalPodAutoscalerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeHorizontalPodAutoscalers) Watch(opts v1.ListOptions) (watch.Interfa } // Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscaling_v1.HorizontalPodAutoscaler) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling_v1.HorizontalPodAutoscaler{}) + Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) if obj == nil { return nil, err } - return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err } // Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any. -func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscaling_v1.HorizontalPodAutoscaler) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscaling_v1.HorizontalPodAutoscaler{}) + Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) if obj == nil { return nil, err } - return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscaling_v1.HorizontalPodAutoscaler) (*autoscaling_v1.HorizontalPodAutoscaler, error) { +func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler) (*autoscalingv1.HorizontalPodAutoscaler, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscaling_v1.HorizontalPodAutoscaler{}) + Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &autoscalingv1.HorizontalPodAutoscaler{}) if obj == nil { return nil, err } - return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscaling_v1.HorizontalPodAutoscaler{}) + Invokes(testing.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &autoscalingv1.HorizontalPodAutoscaler{}) return err } @@ -122,17 +124,17 @@ func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *v1.DeleteOpt func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &autoscaling_v1.HorizontalPodAutoscalerList{}) + _, err := c.Fake.Invokes(action, &autoscalingv1.HorizontalPodAutoscalerList{}) return err } // Patch applies the patch and returns the patched horizontalPodAutoscaler. -func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscaling_v1.HorizontalPodAutoscaler, err error) { +func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *autoscalingv1.HorizontalPodAutoscaler, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscaling_v1.HorizontalPodAutoscaler{}) + Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscalingv1.HorizontalPodAutoscaler{}) if obj == nil { return nil, err } - return obj.(*autoscaling_v1.HorizontalPodAutoscaler), err + return obj.(*autoscalingv1.HorizontalPodAutoscaler), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go index 15ea315c7..c60028b05 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type HorizontalPodAutoscalerExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go index 29da3e740..6891b6b63 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/autoscaling/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type HorizontalPodAutoscalerInterface interface { Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.HorizontalPodAutoscaler, error) - List(opts meta_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.HorizontalPodAutoscaler, error) + List(opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) HorizontalPodAutoscalerExpansion } @@ -60,7 +62,7 @@ func newHorizontalPodAutoscalers(c *AutoscalingV1Client, namespace string) *hori } // Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any. -func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { +func (c *horizontalPodAutoscalers) Get(name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) { result = &v1.HorizontalPodAutoscaler{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *horizontalPodAutoscalers) Get(name string, options meta_v1.GetOptions) } // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. -func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { +func (c *horizontalPodAutoscalers) List(opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { result = &v1.HorizontalPodAutoscalerList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *horizontalPodAutoscalers) List(opts meta_v1.ListOptions) (result *v1.Ho } // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. -func (c *horizontalPodAutoscalers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *horizontalPodAutoscalers) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori } // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. -func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *horizontalPodAutoscalers) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). @@ -147,7 +149,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *meta_v1.DeleteOp } // DeleteCollection deletes a collection of objects. -func (c *horizontalPodAutoscalers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *horizontalPodAutoscalers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("horizontalpodautoscalers"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/BUILD deleted file mode 100644 index 1bb145072..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "autoscaling_client.go", - "doc.go", - "generated_expansion.go", - "horizontalpodautoscaler.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go index 95eab7137..3a49b26b3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v2beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go index 57c8c3086..06fd344c0 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v2beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/BUILD deleted file mode 100644 index 6d7d87326..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_autoscaling_client.go", - "fake_horizontalpodautoscaler.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go index f17129754..be8e0f48e 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_autoscaling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go index c2c2e5f38..2d860341a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake/fake_horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts v1.ListOptions) (result *v2beta if label == nil { label = labels.Everything() } - list := &v2beta1.HorizontalPodAutoscalerList{} + list := &v2beta1.HorizontalPodAutoscalerList{ListMeta: obj.(*v2beta1.HorizontalPodAutoscalerList).ListMeta} for _, item := range obj.(*v2beta1.HorizontalPodAutoscalerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go index 9101766f6..6f1704f1e 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v2beta1 type HorizontalPodAutoscalerExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go index b625fdafd..4ac8cce71 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v2beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/BUILD deleted file mode 100644 index 2af6de364..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "batch_client.go", - "doc.go", - "generated_expansion.go", - "job.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/batch/v1", - deps = [ - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go index 0973bdc5a..d5e35e6b2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/BUILD deleted file mode 100644 index 384e15eee..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_batch_client.go", - "fake_job.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/batch/v1/fake", - deps = [ - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go index 95ddc6b1f..c90dd7561 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go index 5686550ce..f12619bb4 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/fake/fake_job.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - batch_v1 "k8s.io/api/batch/v1" + batchv1 "k8s.io/api/batch/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var jobsResource = schema.GroupVersionResource{Group: "batch", Version: "v1", Re var jobsKind = schema.GroupVersionKind{Group: "batch", Version: "v1", Kind: "Job"} // Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batch_v1.Job, err error) { +func (c *FakeJobs) Get(name string, options v1.GetOptions) (result *batchv1.Job, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batch_v1.Job{}) + Invokes(testing.NewGetAction(jobsResource, c.ns, name), &batchv1.Job{}) if obj == nil { return nil, err } - return obj.(*batch_v1.Job), err + return obj.(*batchv1.Job), err } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *FakeJobs) List(opts v1.ListOptions) (result *batch_v1.JobList, err error) { +func (c *FakeJobs) List(opts v1.ListOptions) (result *batchv1.JobList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batch_v1.JobList{}) + Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &batchv1.JobList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeJobs) List(opts v1.ListOptions) (result *batch_v1.JobList, err erro if label == nil { label = labels.Everything() } - list := &batch_v1.JobList{} - for _, item := range obj.(*batch_v1.JobList).Items { + list := &batchv1.JobList{ListMeta: obj.(*batchv1.JobList).ListMeta} + for _, item := range obj.(*batchv1.JobList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeJobs) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Create(job *batch_v1.Job) (result *batch_v1.Job, err error) { +func (c *FakeJobs) Create(job *batchv1.Job) (result *batchv1.Job, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batch_v1.Job{}) + Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &batchv1.Job{}) if obj == nil { return nil, err } - return obj.(*batch_v1.Job), err + return obj.(*batchv1.Job), err } // Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any. -func (c *FakeJobs) Update(job *batch_v1.Job) (result *batch_v1.Job, err error) { +func (c *FakeJobs) Update(job *batchv1.Job) (result *batchv1.Job, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batch_v1.Job{}) + Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &batchv1.Job{}) if obj == nil { return nil, err } - return obj.(*batch_v1.Job), err + return obj.(*batchv1.Job), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeJobs) UpdateStatus(job *batch_v1.Job) (*batch_v1.Job, error) { +func (c *FakeJobs) UpdateStatus(job *batchv1.Job) (*batchv1.Job, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batch_v1.Job{}) + Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &batchv1.Job{}) if obj == nil { return nil, err } - return obj.(*batch_v1.Job), err + return obj.(*batchv1.Job), err } // Delete takes name of the job and deletes it. Returns an error if one occurs. func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batch_v1.Job{}) + Invokes(testing.NewDeleteAction(jobsResource, c.ns, name), &batchv1.Job{}) return err } @@ -122,17 +124,17 @@ func (c *FakeJobs) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeJobs) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &batch_v1.JobList{}) + _, err := c.Fake.Invokes(action, &batchv1.JobList{}) return err } // Patch applies the patch and returns the patched job. -func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch_v1.Job, err error) { +func (c *FakeJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batchv1.Job, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &batch_v1.Job{}) + Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &batchv1.Job{}) if obj == nil { return nil, err } - return obj.(*batch_v1.Job), err + return obj.(*batchv1.Job), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go index a43cb4a95..dc4142934 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type JobExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/job.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/job.go index 8454e576e..ba8332a9a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1/job.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1/job.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/batch/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type JobInterface interface { Create(*v1.Job) (*v1.Job, error) Update(*v1.Job) (*v1.Job, error) UpdateStatus(*v1.Job) (*v1.Job, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Job, error) - List(opts meta_v1.ListOptions) (*v1.JobList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Job, error) + List(opts metav1.ListOptions) (*v1.JobList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) JobExpansion } @@ -60,7 +62,7 @@ func newJobs(c *BatchV1Client, namespace string) *jobs { } // Get takes name of the job, and returns the corresponding job object, and an error if there is any. -func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err error) { +func (c *jobs) Get(name string, options metav1.GetOptions) (result *v1.Job, err error) { result = &v1.Job{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *jobs) Get(name string, options meta_v1.GetOptions) (result *v1.Job, err } // List takes label and field selectors, and returns the list of Jobs that match those selectors. -func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { +func (c *jobs) List(opts metav1.ListOptions) (result *v1.JobList, err error) { result = &v1.JobList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *jobs) List(opts meta_v1.ListOptions) (result *v1.JobList, err error) { } // Watch returns a watch.Interface that watches the requested jobs. -func (c *jobs) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *jobs) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { } // Delete takes name of the job and deletes it. Returns an error if one occurs. -func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *jobs) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). @@ -147,7 +149,7 @@ func (c *jobs) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *jobs) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *jobs) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("jobs"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/BUILD deleted file mode 100644 index 58e0a6afa..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "batch_client.go", - "cronjob.go", - "doc.go", - "generated_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/batch/v1beta1", - deps = [ - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go index c46dc6f5d..aa71ca833 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go index 2c61fcf68..04637c36a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/BUILD deleted file mode 100644 index 8fd1c81ec..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_batch_client.go", - "fake_cronjob.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go index 84959c363..6f350aed9 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go index d23826968..d80ef5e67 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/fake/fake_cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v1beta1.CronJobList, e if label == nil { label = labels.Everything() } - list := &v1beta1.CronJobList{} + list := &v1beta1.CronJobList{ListMeta: obj.(*v1beta1.CronJobList).ListMeta} for _, item := range obj.(*v1beta1.CronJobList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go index 5b7e871b0..145e14a99 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type CronJobExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/BUILD deleted file mode 100644 index c698053ad..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "batch_client.go", - "cronjob.go", - "doc.go", - "generated_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/batch/v2alpha1", - deps = [ - "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go index 7d2860999..e6c6306b8 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v2alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go index 5f92d35d7..4d922f9ae 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v2alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go index 8739e8628..3efe0d284 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v2alpha1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/BUILD deleted file mode 100644 index 659470373..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_batch_client.go", - "fake_cronjob.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake", - deps = [ - "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_batch_client.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_batch_client.go index 25c4a4bac..3e478cde9 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_batch_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_batch_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go index 33bc87cdc..75c0b1733 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/fake/fake_cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeCronJobs) List(opts v1.ListOptions) (result *v2alpha1.CronJobList, if label == nil { label = labels.Everything() } - list := &v2alpha1.CronJobList{} + list := &v2alpha1.CronJobList{ListMeta: obj.(*v2alpha1.CronJobList).ListMeta} for _, item := range obj.(*v2alpha1.CronJobList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go index d30c055a6..34dafc464 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/batch/v2alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v2alpha1 type CronJobExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/BUILD deleted file mode 100644 index 1caeb018f..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "certificates_client.go", - "certificatesigningrequest.go", - "certificatesigningrequest_expansion.go", - "doc.go", - "generated_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/certificates/v1beta1", - deps = [ - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go index 552056b70..baac42ee2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificates_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go index b8c3a5b07..b39169a8f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go +++ b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/BUILD deleted file mode 100644 index 6fa63d82a..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_certificates_client.go", - "fake_certificatesigningrequest.go", - "fake_certificatesigningrequest_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go index 78e1dbb6a..29d8b088e 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificates_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go index 08cbd943d..dfd517195 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go +++ b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/fake/fake_certificatesigningrequest.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1be if label == nil { label = labels.Everything() } - list := &v1beta1.CertificateSigningRequestList{} + list := &v1beta1.CertificateSigningRequestList{ListMeta: obj.(*v1beta1.CertificateSigningRequestList).ListMeta} for _, item := range obj.(*v1beta1.CertificateSigningRequestList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go index 74ad7fa90..f6df76963 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/certificates/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,4 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go new file mode 100644 index 000000000..91a764843 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/coordination_client.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/coordination/v1beta1" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type CoordinationV1beta1Interface interface { + RESTClient() rest.Interface + LeasesGetter +} + +// CoordinationV1beta1Client is used to interact with features provided by the coordination.k8s.io group. +type CoordinationV1beta1Client struct { + restClient rest.Interface +} + +func (c *CoordinationV1beta1Client) Leases(namespace string) LeaseInterface { + return newLeases(c, namespace) +} + +// NewForConfig creates a new CoordinationV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*CoordinationV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &CoordinationV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new CoordinationV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *CoordinationV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new CoordinationV1beta1Client for the given RESTClient. +func New(c rest.Interface) *CoordinationV1beta1Client { + return &CoordinationV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *CoordinationV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/doc.go new file mode 100644 index 000000000..771101956 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go new file mode 100644 index 000000000..16f443990 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go new file mode 100644 index 000000000..f583b466e --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_coordination_client.go @@ -0,0 +1,40 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeCoordinationV1beta1 struct { + *testing.Fake +} + +func (c *FakeCoordinationV1beta1) Leases(namespace string) v1beta1.LeaseInterface { + return &FakeLeases{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeCoordinationV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go new file mode 100644 index 000000000..3204e0291 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/fake/fake_lease.go @@ -0,0 +1,128 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/api/coordination/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeLeases implements LeaseInterface +type FakeLeases struct { + Fake *FakeCoordinationV1beta1 + ns string +} + +var leasesResource = schema.GroupVersionResource{Group: "coordination.k8s.io", Version: "v1beta1", Resource: "leases"} + +var leasesKind = schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1beta1", Kind: "Lease"} + +// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. +func (c *FakeLeases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(leasesResource, c.ns, name), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} + +// List takes label and field selectors, and returns the list of Leases that match those selectors. +func (c *FakeLeases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(leasesResource, leasesKind, c.ns, opts), &v1beta1.LeaseList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.LeaseList{ListMeta: obj.(*v1beta1.LeaseList).ListMeta} + for _, item := range obj.(*v1beta1.LeaseList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested leases. +func (c *FakeLeases) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(leasesResource, c.ns, opts)) + +} + +// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *FakeLeases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} + +// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *FakeLeases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(leasesResource, c.ns, lease), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} + +// Delete takes name of the lease and deletes it. Returns an error if one occurs. +func (c *FakeLeases) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteAction(leasesResource, c.ns, name), &v1beta1.Lease{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeLeases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(leasesResource, c.ns, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.LeaseList{}) + return err +} + +// Patch applies the patch and returns the patched lease. +func (c *FakeLeases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(leasesResource, c.ns, name, data, subresources...), &v1beta1.Lease{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Lease), err +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/generated_expansion.go new file mode 100644 index 000000000..dfd180daf --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type LeaseExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go new file mode 100644 index 000000000..16277255f --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/coordination/v1beta1/lease.go @@ -0,0 +1,157 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/coordination/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// LeasesGetter has a method to return a LeaseInterface. +// A group's client should implement this interface. +type LeasesGetter interface { + Leases(namespace string) LeaseInterface +} + +// LeaseInterface has methods to work with Lease resources. +type LeaseInterface interface { + Create(*v1beta1.Lease) (*v1beta1.Lease, error) + Update(*v1beta1.Lease) (*v1beta1.Lease, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.Lease, error) + List(opts v1.ListOptions) (*v1beta1.LeaseList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) + LeaseExpansion +} + +// leases implements LeaseInterface +type leases struct { + client rest.Interface + ns string +} + +// newLeases returns a Leases +func newLeases(c *CoordinationV1beta1Client, namespace string) *leases { + return &leases{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the lease, and returns the corresponding lease object, and an error if there is any. +func (c *leases) Get(name string, options v1.GetOptions) (result *v1beta1.Lease, err error) { + result = &v1beta1.Lease{} + err = c.client.Get(). + Namespace(c.ns). + Resource("leases"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of Leases that match those selectors. +func (c *leases) List(opts v1.ListOptions) (result *v1beta1.LeaseList, err error) { + result = &v1beta1.LeaseList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("leases"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested leases. +func (c *leases) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("leases"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a lease and creates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *leases) Create(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { + result = &v1beta1.Lease{} + err = c.client.Post(). + Namespace(c.ns). + Resource("leases"). + Body(lease). + Do(). + Into(result) + return +} + +// Update takes the representation of a lease and updates it. Returns the server's representation of the lease, and an error, if there is any. +func (c *leases) Update(lease *v1beta1.Lease) (result *v1beta1.Lease, err error) { + result = &v1beta1.Lease{} + err = c.client.Put(). + Namespace(c.ns). + Resource("leases"). + Name(lease.Name). + Body(lease). + Do(). + Into(result) + return +} + +// Delete takes name of the lease and deletes it. Returns an error if one occurs. +func (c *leases) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("leases"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *leases) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("leases"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched lease. +func (c *leases) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.Lease, err error) { + result = &v1beta1.Lease{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("leases"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/core/v1/BUILD deleted file mode 100644 index dd86cfecd..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/BUILD +++ /dev/null @@ -1,68 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "componentstatus.go", - "configmap.go", - "core_client.go", - "doc.go", - "endpoints.go", - "event.go", - "event_expansion.go", - "generated_expansion.go", - "limitrange.go", - "namespace.go", - "namespace_expansion.go", - "node.go", - "node_expansion.go", - "persistentvolume.go", - "persistentvolumeclaim.go", - "pod.go", - "pod_expansion.go", - "podtemplate.go", - "replicationcontroller.go", - "resourcequota.go", - "secret.go", - "service.go", - "service_expansion.go", - "serviceaccount.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/core/v1", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/reference:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go index 26e0a7f17..e497661cf 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type ComponentStatusesGetter interface { type ComponentStatusInterface interface { Create(*v1.ComponentStatus) (*v1.ComponentStatus, error) Update(*v1.ComponentStatus) (*v1.ComponentStatus, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ComponentStatus, error) - List(opts meta_v1.ListOptions) (*v1.ComponentStatusList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ComponentStatus, error) + List(opts metav1.ListOptions) (*v1.ComponentStatusList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) ComponentStatusExpansion } @@ -57,7 +59,7 @@ func newComponentStatuses(c *CoreV1Client) *componentStatuses { } // Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. -func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result *v1.ComponentStatus, err error) { +func (c *componentStatuses) Get(name string, options metav1.GetOptions) (result *v1.ComponentStatus, err error) { result = &v1.ComponentStatus{} err = c.client.Get(). Resource("componentstatuses"). @@ -69,7 +71,7 @@ func (c *componentStatuses) Get(name string, options meta_v1.GetOptions) (result } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.ComponentStatusList, err error) { +func (c *componentStatuses) List(opts metav1.ListOptions) (result *v1.ComponentStatusList, err error) { result = &v1.ComponentStatusList{} err = c.client.Get(). Resource("componentstatuses"). @@ -80,7 +82,7 @@ func (c *componentStatuses) List(opts meta_v1.ListOptions) (result *v1.Component } // Watch returns a watch.Interface that watches the requested componentStatuses. -func (c *componentStatuses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *componentStatuses) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Resource("componentstatuses"). @@ -112,7 +114,7 @@ func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result } // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. -func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *componentStatuses) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Resource("componentstatuses"). Name(name). @@ -122,7 +124,7 @@ func (c *componentStatuses) Delete(name string, options *meta_v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *componentStatuses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *componentStatuses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Resource("componentstatuses"). VersionedParams(&listOptions, scheme.ParameterCodec). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go index df75d2a81..0984ae70c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type ConfigMapsGetter interface { type ConfigMapInterface interface { Create(*v1.ConfigMap) (*v1.ConfigMap, error) Update(*v1.ConfigMap) (*v1.ConfigMap, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ConfigMap, error) - List(opts meta_v1.ListOptions) (*v1.ConfigMapList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ConfigMap, error) + List(opts metav1.ListOptions) (*v1.ConfigMapList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) ConfigMapExpansion } @@ -59,7 +61,7 @@ func newConfigMaps(c *CoreV1Client, namespace string) *configMaps { } // Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. -func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.ConfigMap, err error) { +func (c *configMaps) Get(name string, options metav1.GetOptions) (result *v1.ConfigMap, err error) { result = &v1.ConfigMap{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *configMaps) Get(name string, options meta_v1.GetOptions) (result *v1.Co } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, err error) { +func (c *configMaps) List(opts metav1.ListOptions) (result *v1.ConfigMapList, err error) { result = &v1.ConfigMapList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *configMaps) List(opts meta_v1.ListOptions) (result *v1.ConfigMapList, e } // Watch returns a watch.Interface that watches the requested configMaps. -func (c *configMaps) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *configMaps) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. -func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *configMaps) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). @@ -130,7 +132,7 @@ func (c *configMaps) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *configMaps) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *configMaps) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("configmaps"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go index b75a3dc16..044a28ebd 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go index f5bc3443a..dd8216789 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type EndpointsGetter interface { type EndpointsInterface interface { Create(*v1.Endpoints) (*v1.Endpoints, error) Update(*v1.Endpoints) (*v1.Endpoints, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Endpoints, error) - List(opts meta_v1.ListOptions) (*v1.EndpointsList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Endpoints, error) + List(opts metav1.ListOptions) (*v1.EndpointsList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) EndpointsExpansion } @@ -59,7 +61,7 @@ func newEndpoints(c *CoreV1Client, namespace string) *endpoints { } // Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.Endpoints, err error) { +func (c *endpoints) Get(name string, options metav1.GetOptions) (result *v1.Endpoints, err error) { result = &v1.Endpoints{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *endpoints) Get(name string, options meta_v1.GetOptions) (result *v1.End } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, err error) { +func (c *endpoints) List(opts metav1.ListOptions) (result *v1.EndpointsList, err error) { result = &v1.EndpointsList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *endpoints) List(opts meta_v1.ListOptions) (result *v1.EndpointsList, er } // Watch returns a watch.Interface that watches the requested endpoints. -func (c *endpoints) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *endpoints) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err e } // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. -func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *endpoints) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). @@ -130,7 +132,7 @@ func (c *endpoints) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *endpoints) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *endpoints) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("endpoints"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/event.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/event.go index bec36116e..57d30f9fd 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/event.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type EventsGetter interface { type EventInterface interface { Create(*v1.Event) (*v1.Event, error) Update(*v1.Event) (*v1.Event, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Event, error) - List(opts meta_v1.ListOptions) (*v1.EventList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Event, error) + List(opts metav1.ListOptions) (*v1.EventList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) EventExpansion } @@ -59,7 +61,7 @@ func newEvents(c *CoreV1Client, namespace string) *events { } // Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, err error) { +func (c *events) Get(name string, options metav1.GetOptions) (result *v1.Event, err error) { result = &v1.Event{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *events) Get(name string, options meta_v1.GetOptions) (result *v1.Event, } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error) { +func (c *events) List(opts metav1.ListOptions) (result *v1.EventList, err error) { result = &v1.EventList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *events) List(opts meta_v1.ListOptions) (result *v1.EventList, err error } // Watch returns a watch.Interface that watches the requested events. -func (c *events) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *events) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { } // Delete takes name of the event and deletes it. Returns an error if one occurs. -func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *events) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). @@ -130,7 +132,7 @@ func (c *events) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *events) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *events) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("events"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD deleted file mode 100644 index f62201d87..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/BUILD +++ /dev/null @@ -1,64 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_componentstatus.go", - "fake_configmap.go", - "fake_core_client.go", - "fake_endpoints.go", - "fake_event.go", - "fake_event_expansion.go", - "fake_limitrange.go", - "fake_namespace.go", - "fake_namespace_expansion.go", - "fake_node.go", - "fake_node_expansion.go", - "fake_persistentvolume.go", - "fake_persistentvolumeclaim.go", - "fake_pod.go", - "fake_pod_expansion.go", - "fake_podtemplate.go", - "fake_replicationcontroller.go", - "fake_resourcequota.go", - "fake_secret.go", - "fake_service.go", - "fake_service_expansion.go", - "fake_serviceaccount.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/core/v1/fake", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go index aeaaf40bf..d06023d48 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,19 +38,19 @@ var componentstatusesResource = schema.GroupVersionResource{Group: "", Version: var componentstatusesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ComponentStatus"} // Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any. -func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result *core_v1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Get(name string, options v1.GetOptions) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(componentstatusesResource, name), &core_v1.ComponentStatus{}) + Invokes(testing.NewRootGetAction(componentstatusesResource, name), &corev1.ComponentStatus{}) if obj == nil { return nil, err } - return obj.(*core_v1.ComponentStatus), err + return obj.(*corev1.ComponentStatus), err } // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. -func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *core_v1.ComponentStatusList, err error) { +func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *corev1.ComponentStatusList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &core_v1.ComponentStatusList{}) + Invokes(testing.NewRootListAction(componentstatusesResource, componentstatusesKind, opts), &corev1.ComponentStatusList{}) if obj == nil { return nil, err } @@ -57,8 +59,8 @@ func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *core_v1.Compo if label == nil { label = labels.Everything() } - list := &core_v1.ComponentStatusList{} - for _, item := range obj.(*core_v1.ComponentStatusList).Items { + list := &corev1.ComponentStatusList{ListMeta: obj.(*corev1.ComponentStatusList).ListMeta} + for _, item := range obj.(*corev1.ComponentStatusList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -73,29 +75,29 @@ func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, err } // Create takes the representation of a componentStatus and creates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Create(componentStatus *core_v1.ComponentStatus) (result *core_v1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Create(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &core_v1.ComponentStatus{}) + Invokes(testing.NewRootCreateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) if obj == nil { return nil, err } - return obj.(*core_v1.ComponentStatus), err + return obj.(*corev1.ComponentStatus), err } // Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any. -func (c *FakeComponentStatuses) Update(componentStatus *core_v1.ComponentStatus) (result *core_v1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Update(componentStatus *corev1.ComponentStatus) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &core_v1.ComponentStatus{}) + Invokes(testing.NewRootUpdateAction(componentstatusesResource, componentStatus), &corev1.ComponentStatus{}) if obj == nil { return nil, err } - return obj.(*core_v1.ComponentStatus), err + return obj.(*corev1.ComponentStatus), err } // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &core_v1.ComponentStatus{}) + Invokes(testing.NewRootDeleteAction(componentstatusesResource, name), &corev1.ComponentStatus{}) return err } @@ -103,16 +105,16 @@ func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) e func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(componentstatusesResource, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.ComponentStatusList{}) + _, err := c.Fake.Invokes(action, &corev1.ComponentStatusList{}) return err } // Patch applies the patch and returns the patched componentStatus. -func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ComponentStatus, err error) { +func (c *FakeComponentStatuses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ComponentStatus, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &core_v1.ComponentStatus{}) + Invokes(testing.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &corev1.ComponentStatus{}) if obj == nil { return nil, err } - return obj.(*core_v1.ComponentStatus), err + return obj.(*corev1.ComponentStatus), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go index ab5d7f108..b491661f2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var configmapsResource = schema.GroupVersionResource{Group: "", Version: "v1", R var configmapsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ConfigMap"} // Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any. -func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *core_v1.ConfigMap, err error) { +func (c *FakeConfigMaps) Get(name string, options v1.GetOptions) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &core_v1.ConfigMap{}) + Invokes(testing.NewGetAction(configmapsResource, c.ns, name), &corev1.ConfigMap{}) if obj == nil { return nil, err } - return obj.(*core_v1.ConfigMap), err + return obj.(*corev1.ConfigMap), err } // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. -func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *core_v1.ConfigMapList, err error) { +func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *corev1.ConfigMapList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &core_v1.ConfigMapList{}) + Invokes(testing.NewListAction(configmapsResource, configmapsKind, c.ns, opts), &corev1.ConfigMapList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *core_v1.ConfigMapLis if label == nil { label = labels.Everything() } - list := &core_v1.ConfigMapList{} - for _, item := range obj.(*core_v1.ConfigMapList).Items { + list := &corev1.ConfigMapList{ListMeta: obj.(*corev1.ConfigMapList).ListMeta} + for _, item := range obj.(*corev1.ConfigMapList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a configMap and creates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Create(configMap *core_v1.ConfigMap) (result *core_v1.ConfigMap, err error) { +func (c *FakeConfigMaps) Create(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &core_v1.ConfigMap{}) + Invokes(testing.NewCreateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) if obj == nil { return nil, err } - return obj.(*core_v1.ConfigMap), err + return obj.(*corev1.ConfigMap), err } // Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any. -func (c *FakeConfigMaps) Update(configMap *core_v1.ConfigMap) (result *core_v1.ConfigMap, err error) { +func (c *FakeConfigMaps) Update(configMap *corev1.ConfigMap) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &core_v1.ConfigMap{}) + Invokes(testing.NewUpdateAction(configmapsResource, c.ns, configMap), &corev1.ConfigMap{}) if obj == nil { return nil, err } - return obj.(*core_v1.ConfigMap), err + return obj.(*corev1.ConfigMap), err } // Delete takes name of the configMap and deletes it. Returns an error if one occurs. func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &core_v1.ConfigMap{}) + Invokes(testing.NewDeleteAction(configmapsResource, c.ns, name), &corev1.ConfigMap{}) return err } @@ -110,17 +112,17 @@ func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.ConfigMapList{}) + _, err := c.Fake.Invokes(action, &corev1.ConfigMapList{}) return err } // Patch applies the patch and returns the patched configMap. -func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ConfigMap, err error) { +func (c *FakeConfigMaps) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ConfigMap, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &core_v1.ConfigMap{}) + Invokes(testing.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &corev1.ConfigMap{}) if obj == nil { return nil, err } - return obj.(*core_v1.ConfigMap), err + return obj.(*corev1.ConfigMap), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go index 5daba9b68..5ad90943c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_core_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go index d7413bfb8..2c9f0de09 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var endpointsResource = schema.GroupVersionResource{Group: "", Version: "v1", Re var endpointsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Endpoints"} // Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any. -func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *core_v1.Endpoints, err error) { +func (c *FakeEndpoints) Get(name string, options v1.GetOptions) (result *corev1.Endpoints, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &core_v1.Endpoints{}) + Invokes(testing.NewGetAction(endpointsResource, c.ns, name), &corev1.Endpoints{}) if obj == nil { return nil, err } - return obj.(*core_v1.Endpoints), err + return obj.(*corev1.Endpoints), err } // List takes label and field selectors, and returns the list of Endpoints that match those selectors. -func (c *FakeEndpoints) List(opts v1.ListOptions) (result *core_v1.EndpointsList, err error) { +func (c *FakeEndpoints) List(opts v1.ListOptions) (result *corev1.EndpointsList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &core_v1.EndpointsList{}) + Invokes(testing.NewListAction(endpointsResource, endpointsKind, c.ns, opts), &corev1.EndpointsList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeEndpoints) List(opts v1.ListOptions) (result *core_v1.EndpointsList if label == nil { label = labels.Everything() } - list := &core_v1.EndpointsList{} - for _, item := range obj.(*core_v1.EndpointsList).Items { + list := &corev1.EndpointsList{ListMeta: obj.(*corev1.EndpointsList).ListMeta} + for _, item := range obj.(*corev1.EndpointsList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a endpoints and creates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Create(endpoints *core_v1.Endpoints) (result *core_v1.Endpoints, err error) { +func (c *FakeEndpoints) Create(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &core_v1.Endpoints{}) + Invokes(testing.NewCreateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) if obj == nil { return nil, err } - return obj.(*core_v1.Endpoints), err + return obj.(*corev1.Endpoints), err } // Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any. -func (c *FakeEndpoints) Update(endpoints *core_v1.Endpoints) (result *core_v1.Endpoints, err error) { +func (c *FakeEndpoints) Update(endpoints *corev1.Endpoints) (result *corev1.Endpoints, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &core_v1.Endpoints{}) + Invokes(testing.NewUpdateAction(endpointsResource, c.ns, endpoints), &corev1.Endpoints{}) if obj == nil { return nil, err } - return obj.(*core_v1.Endpoints), err + return obj.(*corev1.Endpoints), err } // Delete takes name of the endpoints and deletes it. Returns an error if one occurs. func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &core_v1.Endpoints{}) + Invokes(testing.NewDeleteAction(endpointsResource, c.ns, name), &corev1.Endpoints{}) return err } @@ -110,17 +112,17 @@ func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.EndpointsList{}) + _, err := c.Fake.Invokes(action, &corev1.EndpointsList{}) return err } // Patch applies the patch and returns the patched endpoints. -func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Endpoints, err error) { +func (c *FakeEndpoints) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Endpoints, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &core_v1.Endpoints{}) + Invokes(testing.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &corev1.Endpoints{}) if obj == nil { return nil, err } - return obj.(*core_v1.Endpoints), err + return obj.(*corev1.Endpoints), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go index 05ace4f2c..68405a54f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var eventsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resou var eventsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Event"} // Get takes name of the event, and returns the corresponding event object, and an error if there is any. -func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *core_v1.Event, err error) { +func (c *FakeEvents) Get(name string, options v1.GetOptions) (result *corev1.Event, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(eventsResource, c.ns, name), &core_v1.Event{}) + Invokes(testing.NewGetAction(eventsResource, c.ns, name), &corev1.Event{}) if obj == nil { return nil, err } - return obj.(*core_v1.Event), err + return obj.(*corev1.Event), err } // List takes label and field selectors, and returns the list of Events that match those selectors. -func (c *FakeEvents) List(opts v1.ListOptions) (result *core_v1.EventList, err error) { +func (c *FakeEvents) List(opts v1.ListOptions) (result *corev1.EventList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &core_v1.EventList{}) + Invokes(testing.NewListAction(eventsResource, eventsKind, c.ns, opts), &corev1.EventList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *core_v1.EventList, err e if label == nil { label = labels.Everything() } - list := &core_v1.EventList{} - for _, item := range obj.(*core_v1.EventList).Items { + list := &corev1.EventList{ListMeta: obj.(*corev1.EventList).ListMeta} + for _, item := range obj.(*corev1.EventList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a event and creates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Create(event *core_v1.Event) (result *core_v1.Event, err error) { +func (c *FakeEvents) Create(event *corev1.Event) (result *corev1.Event, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &core_v1.Event{}) + Invokes(testing.NewCreateAction(eventsResource, c.ns, event), &corev1.Event{}) if obj == nil { return nil, err } - return obj.(*core_v1.Event), err + return obj.(*corev1.Event), err } // Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any. -func (c *FakeEvents) Update(event *core_v1.Event) (result *core_v1.Event, err error) { +func (c *FakeEvents) Update(event *corev1.Event) (result *corev1.Event, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &core_v1.Event{}) + Invokes(testing.NewUpdateAction(eventsResource, c.ns, event), &corev1.Event{}) if obj == nil { return nil, err } - return obj.(*core_v1.Event), err + return obj.(*corev1.Event), err } // Delete takes name of the event and deletes it. Returns an error if one occurs. func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &core_v1.Event{}) + Invokes(testing.NewDeleteAction(eventsResource, c.ns, name), &corev1.Event{}) return err } @@ -110,17 +112,17 @@ func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.EventList{}) + _, err := c.Fake.Invokes(action, &corev1.EventList{}) return err } // Patch applies the patch and returns the patched event. -func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Event, err error) { +func (c *FakeEvents) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Event, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &core_v1.Event{}) + Invokes(testing.NewPatchSubresourceAction(eventsResource, c.ns, name, data, subresources...), &corev1.Event{}) if obj == nil { return nil, err } - return obj.(*core_v1.Event), err + return obj.(*corev1.Event), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go index efb03a01e..03c03c5d0 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var limitrangesResource = schema.GroupVersionResource{Group: "", Version: "v1", var limitrangesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "LimitRange"} // Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. -func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *core_v1.LimitRange, err error) { +func (c *FakeLimitRanges) Get(name string, options v1.GetOptions) (result *corev1.LimitRange, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &core_v1.LimitRange{}) + Invokes(testing.NewGetAction(limitrangesResource, c.ns, name), &corev1.LimitRange{}) if obj == nil { return nil, err } - return obj.(*core_v1.LimitRange), err + return obj.(*corev1.LimitRange), err } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *core_v1.LimitRangeList, err error) { +func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *corev1.LimitRangeList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &core_v1.LimitRangeList{}) + Invokes(testing.NewListAction(limitrangesResource, limitrangesKind, c.ns, opts), &corev1.LimitRangeList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *core_v1.LimitRangeL if label == nil { label = labels.Everything() } - list := &core_v1.LimitRangeList{} - for _, item := range obj.(*core_v1.LimitRangeList).Items { + list := &corev1.LimitRangeList{ListMeta: obj.(*corev1.LimitRangeList).ListMeta} + for _, item := range obj.(*corev1.LimitRangeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a limitRange and creates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Create(limitRange *core_v1.LimitRange) (result *core_v1.LimitRange, err error) { +func (c *FakeLimitRanges) Create(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &core_v1.LimitRange{}) + Invokes(testing.NewCreateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) if obj == nil { return nil, err } - return obj.(*core_v1.LimitRange), err + return obj.(*corev1.LimitRange), err } // Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any. -func (c *FakeLimitRanges) Update(limitRange *core_v1.LimitRange) (result *core_v1.LimitRange, err error) { +func (c *FakeLimitRanges) Update(limitRange *corev1.LimitRange) (result *corev1.LimitRange, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &core_v1.LimitRange{}) + Invokes(testing.NewUpdateAction(limitrangesResource, c.ns, limitRange), &corev1.LimitRange{}) if obj == nil { return nil, err } - return obj.(*core_v1.LimitRange), err + return obj.(*corev1.LimitRange), err } // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &core_v1.LimitRange{}) + Invokes(testing.NewDeleteAction(limitrangesResource, c.ns, name), &corev1.LimitRange{}) return err } @@ -110,17 +112,17 @@ func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.LimitRangeList{}) + _, err := c.Fake.Invokes(action, &corev1.LimitRangeList{}) return err } // Patch applies the patch and returns the patched limitRange. -func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.LimitRange, err error) { +func (c *FakeLimitRanges) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.LimitRange, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &core_v1.LimitRange{}) + Invokes(testing.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &corev1.LimitRange{}) if obj == nil { return nil, err } - return obj.(*core_v1.LimitRange), err + return obj.(*corev1.LimitRange), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go index 4b8b8ebd1..12b918af0 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,19 +38,19 @@ var namespacesResource = schema.GroupVersionResource{Group: "", Version: "v1", R var namespacesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"} // Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *core_v1.Namespace, err error) { +func (c *FakeNamespaces) Get(name string, options v1.GetOptions) (result *corev1.Namespace, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(namespacesResource, name), &core_v1.Namespace{}) + Invokes(testing.NewRootGetAction(namespacesResource, name), &corev1.Namespace{}) if obj == nil { return nil, err } - return obj.(*core_v1.Namespace), err + return obj.(*corev1.Namespace), err } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *FakeNamespaces) List(opts v1.ListOptions) (result *core_v1.NamespaceList, err error) { +func (c *FakeNamespaces) List(opts v1.ListOptions) (result *corev1.NamespaceList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &core_v1.NamespaceList{}) + Invokes(testing.NewRootListAction(namespacesResource, namespacesKind, opts), &corev1.NamespaceList{}) if obj == nil { return nil, err } @@ -57,8 +59,8 @@ func (c *FakeNamespaces) List(opts v1.ListOptions) (result *core_v1.NamespaceLis if label == nil { label = labels.Everything() } - list := &core_v1.NamespaceList{} - for _, item := range obj.(*core_v1.NamespaceList).Items { + list := &corev1.NamespaceList{ListMeta: obj.(*corev1.NamespaceList).ListMeta} + for _, item := range obj.(*corev1.NamespaceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -73,57 +75,49 @@ func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a namespace and creates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Create(namespace *core_v1.Namespace) (result *core_v1.Namespace, err error) { +func (c *FakeNamespaces) Create(namespace *corev1.Namespace) (result *corev1.Namespace, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &core_v1.Namespace{}) + Invokes(testing.NewRootCreateAction(namespacesResource, namespace), &corev1.Namespace{}) if obj == nil { return nil, err } - return obj.(*core_v1.Namespace), err + return obj.(*corev1.Namespace), err } // Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any. -func (c *FakeNamespaces) Update(namespace *core_v1.Namespace) (result *core_v1.Namespace, err error) { +func (c *FakeNamespaces) Update(namespace *corev1.Namespace) (result *corev1.Namespace, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &core_v1.Namespace{}) + Invokes(testing.NewRootUpdateAction(namespacesResource, namespace), &corev1.Namespace{}) if obj == nil { return nil, err } - return obj.(*core_v1.Namespace), err + return obj.(*corev1.Namespace), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNamespaces) UpdateStatus(namespace *core_v1.Namespace) (*core_v1.Namespace, error) { +func (c *FakeNamespaces) UpdateStatus(namespace *corev1.Namespace) (*corev1.Namespace, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &core_v1.Namespace{}) + Invokes(testing.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &corev1.Namespace{}) if obj == nil { return nil, err } - return obj.(*core_v1.Namespace), err + return obj.(*corev1.Namespace), err } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(namespacesResource, name), &core_v1.Namespace{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewRootDeleteCollectionAction(namespacesResource, listOptions) - - _, err := c.Fake.Invokes(action, &core_v1.NamespaceList{}) + Invokes(testing.NewRootDeleteAction(namespacesResource, name), &corev1.Namespace{}) return err } // Patch applies the patch and returns the patched namespace. -func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Namespace, err error) { +func (c *FakeNamespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Namespace, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &core_v1.Namespace{}) + Invokes(testing.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &corev1.Namespace{}) if obj == nil { return nil, err } - return obj.(*core_v1.Namespace), err + return obj.(*corev1.Namespace), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go index 5639ec0c9..a2bc97b2c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_node.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,19 +38,19 @@ var nodesResource = schema.GroupVersionResource{Group: "", Version: "v1", Resour var nodesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Node"} // Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *core_v1.Node, err error) { +func (c *FakeNodes) Get(name string, options v1.GetOptions) (result *corev1.Node, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(nodesResource, name), &core_v1.Node{}) + Invokes(testing.NewRootGetAction(nodesResource, name), &corev1.Node{}) if obj == nil { return nil, err } - return obj.(*core_v1.Node), err + return obj.(*corev1.Node), err } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *FakeNodes) List(opts v1.ListOptions) (result *core_v1.NodeList, err error) { +func (c *FakeNodes) List(opts v1.ListOptions) (result *corev1.NodeList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &core_v1.NodeList{}) + Invokes(testing.NewRootListAction(nodesResource, nodesKind, opts), &corev1.NodeList{}) if obj == nil { return nil, err } @@ -57,8 +59,8 @@ func (c *FakeNodes) List(opts v1.ListOptions) (result *core_v1.NodeList, err err if label == nil { label = labels.Everything() } - list := &core_v1.NodeList{} - for _, item := range obj.(*core_v1.NodeList).Items { + list := &corev1.NodeList{ListMeta: obj.(*corev1.NodeList).ListMeta} + for _, item := range obj.(*corev1.NodeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -73,40 +75,40 @@ func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a node and creates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Create(node *core_v1.Node) (result *core_v1.Node, err error) { +func (c *FakeNodes) Create(node *corev1.Node) (result *corev1.Node, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(nodesResource, node), &core_v1.Node{}) + Invokes(testing.NewRootCreateAction(nodesResource, node), &corev1.Node{}) if obj == nil { return nil, err } - return obj.(*core_v1.Node), err + return obj.(*corev1.Node), err } // Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any. -func (c *FakeNodes) Update(node *core_v1.Node) (result *core_v1.Node, err error) { +func (c *FakeNodes) Update(node *corev1.Node) (result *corev1.Node, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(nodesResource, node), &core_v1.Node{}) + Invokes(testing.NewRootUpdateAction(nodesResource, node), &corev1.Node{}) if obj == nil { return nil, err } - return obj.(*core_v1.Node), err + return obj.(*corev1.Node), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeNodes) UpdateStatus(node *core_v1.Node) (*core_v1.Node, error) { +func (c *FakeNodes) UpdateStatus(node *corev1.Node) (*corev1.Node, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &core_v1.Node{}) + Invokes(testing.NewRootUpdateSubresourceAction(nodesResource, "status", node), &corev1.Node{}) if obj == nil { return nil, err } - return obj.(*core_v1.Node), err + return obj.(*corev1.Node), err } // Delete takes name of the node and deletes it. Returns an error if one occurs. func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(nodesResource, name), &core_v1.Node{}) + Invokes(testing.NewRootDeleteAction(nodesResource, name), &corev1.Node{}) return err } @@ -114,16 +116,16 @@ func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(nodesResource, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.NodeList{}) + _, err := c.Fake.Invokes(action, &corev1.NodeList{}) return err } // Patch applies the patch and returns the patched node. -func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Node, err error) { +func (c *FakeNodes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Node, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &core_v1.Node{}) + Invokes(testing.NewRootPatchSubresourceAction(nodesResource, name, data, subresources...), &corev1.Node{}) if obj == nil { return nil, err } - return obj.(*core_v1.Node), err + return obj.(*corev1.Node), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go index cb8c70afa..71e2f2dc5 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,19 +38,19 @@ var persistentvolumesResource = schema.GroupVersionResource{Group: "", Version: var persistentvolumesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolume"} // Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. -func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result *core_v1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &core_v1.PersistentVolume{}) + Invokes(testing.NewRootGetAction(persistentvolumesResource, name), &corev1.PersistentVolume{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolume), err + return obj.(*corev1.PersistentVolume), err } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *core_v1.PersistentVolumeList, err error) { +func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *corev1.PersistentVolumeList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &core_v1.PersistentVolumeList{}) + Invokes(testing.NewRootListAction(persistentvolumesResource, persistentvolumesKind, opts), &corev1.PersistentVolumeList{}) if obj == nil { return nil, err } @@ -57,8 +59,8 @@ func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *core_v1.Persi if label == nil { label = labels.Everything() } - list := &core_v1.PersistentVolumeList{} - for _, item := range obj.(*core_v1.PersistentVolumeList).Items { + list := &corev1.PersistentVolumeList{ListMeta: obj.(*corev1.PersistentVolumeList).ListMeta} + for _, item := range obj.(*corev1.PersistentVolumeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -73,40 +75,40 @@ func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, err } // Create takes the representation of a persistentVolume and creates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Create(persistentVolume *core_v1.PersistentVolume) (result *core_v1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Create(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &core_v1.PersistentVolume{}) + Invokes(testing.NewRootCreateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolume), err + return obj.(*corev1.PersistentVolume), err } // Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any. -func (c *FakePersistentVolumes) Update(persistentVolume *core_v1.PersistentVolume) (result *core_v1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Update(persistentVolume *corev1.PersistentVolume) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &core_v1.PersistentVolume{}) + Invokes(testing.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &corev1.PersistentVolume{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolume), err + return obj.(*corev1.PersistentVolume), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *core_v1.PersistentVolume) (*core_v1.PersistentVolume, error) { +func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *corev1.PersistentVolume) (*corev1.PersistentVolume, error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &core_v1.PersistentVolume{}) + Invokes(testing.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &corev1.PersistentVolume{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolume), err + return obj.(*corev1.PersistentVolume), err } // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &core_v1.PersistentVolume{}) + Invokes(testing.NewRootDeleteAction(persistentvolumesResource, name), &corev1.PersistentVolume{}) return err } @@ -114,16 +116,16 @@ func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) e func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.PersistentVolumeList{}) + _, err := c.Fake.Invokes(action, &corev1.PersistentVolumeList{}) return err } // Patch applies the patch and returns the patched persistentVolume. -func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.PersistentVolume, err error) { +func (c *FakePersistentVolumes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolume, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &core_v1.PersistentVolume{}) + Invokes(testing.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &corev1.PersistentVolume{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolume), err + return obj.(*corev1.PersistentVolume), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go index 97d104e02..a06eca81c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var persistentvolumeclaimsResource = schema.GroupVersionResource{Group: "", Vers var persistentvolumeclaimsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PersistentVolumeClaim"} // Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. -func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *core_v1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Get(name string, options v1.GetOptions) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &core_v1.PersistentVolumeClaim{}) + Invokes(testing.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolumeClaim), err + return obj.(*corev1.PersistentVolumeClaim), err } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *core_v1.PersistentVolumeClaimList, err error) { +func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *corev1.PersistentVolumeClaimList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &core_v1.PersistentVolumeClaimList{}) + Invokes(testing.NewListAction(persistentvolumeclaimsResource, persistentvolumeclaimsKind, c.ns, opts), &corev1.PersistentVolumeClaimList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *core_v1. if label == nil { label = labels.Everything() } - list := &core_v1.PersistentVolumeClaimList{} - for _, item := range obj.(*core_v1.PersistentVolumeClaimList).Items { + list := &corev1.PersistentVolumeClaimList{ListMeta: obj.(*corev1.PersistentVolumeClaimList).ListMeta} + for _, item := range obj.(*corev1.PersistentVolumeClaimList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface } // Create takes the representation of a persistentVolumeClaim and creates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *core_v1.PersistentVolumeClaim) (result *core_v1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &core_v1.PersistentVolumeClaim{}) + Invokes(testing.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolumeClaim), err + return obj.(*corev1.PersistentVolumeClaim), err } // Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any. -func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *core_v1.PersistentVolumeClaim) (result *core_v1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *corev1.PersistentVolumeClaim) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &core_v1.PersistentVolumeClaim{}) + Invokes(testing.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolumeClaim), err + return obj.(*corev1.PersistentVolumeClaim), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *core_v1.PersistentVolumeClaim) (*core_v1.PersistentVolumeClaim, error) { +func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &core_v1.PersistentVolumeClaim{}) + Invokes(testing.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolumeClaim), err + return obj.(*corev1.PersistentVolumeClaim), err } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &core_v1.PersistentVolumeClaim{}) + Invokes(testing.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &corev1.PersistentVolumeClaim{}) return err } @@ -122,17 +124,17 @@ func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptio func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.PersistentVolumeClaimList{}) + _, err := c.Fake.Invokes(action, &corev1.PersistentVolumeClaimList{}) return err } // Patch applies the patch and returns the patched persistentVolumeClaim. -func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.PersistentVolumeClaim, err error) { +func (c *FakePersistentVolumeClaims) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PersistentVolumeClaim, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &core_v1.PersistentVolumeClaim{}) + Invokes(testing.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &corev1.PersistentVolumeClaim{}) if obj == nil { return nil, err } - return obj.(*core_v1.PersistentVolumeClaim), err + return obj.(*corev1.PersistentVolumeClaim), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go index a2548fe55..bbf39eafc 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_pod.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var podsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resourc var podsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Pod"} // Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *FakePods) Get(name string, options v1.GetOptions) (result *core_v1.Pod, err error) { +func (c *FakePods) Get(name string, options v1.GetOptions) (result *corev1.Pod, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(podsResource, c.ns, name), &core_v1.Pod{}) + Invokes(testing.NewGetAction(podsResource, c.ns, name), &corev1.Pod{}) if obj == nil { return nil, err } - return obj.(*core_v1.Pod), err + return obj.(*corev1.Pod), err } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *FakePods) List(opts v1.ListOptions) (result *core_v1.PodList, err error) { +func (c *FakePods) List(opts v1.ListOptions) (result *corev1.PodList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &core_v1.PodList{}) + Invokes(testing.NewListAction(podsResource, podsKind, c.ns, opts), &corev1.PodList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakePods) List(opts v1.ListOptions) (result *core_v1.PodList, err error if label == nil { label = labels.Everything() } - list := &core_v1.PodList{} - for _, item := range obj.(*core_v1.PodList).Items { + list := &corev1.PodList{ListMeta: obj.(*corev1.PodList).ListMeta} + for _, item := range obj.(*corev1.PodList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakePods) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a pod and creates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Create(pod *core_v1.Pod) (result *core_v1.Pod, err error) { +func (c *FakePods) Create(pod *corev1.Pod) (result *corev1.Pod, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &core_v1.Pod{}) + Invokes(testing.NewCreateAction(podsResource, c.ns, pod), &corev1.Pod{}) if obj == nil { return nil, err } - return obj.(*core_v1.Pod), err + return obj.(*corev1.Pod), err } // Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *FakePods) Update(pod *core_v1.Pod) (result *core_v1.Pod, err error) { +func (c *FakePods) Update(pod *corev1.Pod) (result *corev1.Pod, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &core_v1.Pod{}) + Invokes(testing.NewUpdateAction(podsResource, c.ns, pod), &corev1.Pod{}) if obj == nil { return nil, err } - return obj.(*core_v1.Pod), err + return obj.(*corev1.Pod), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePods) UpdateStatus(pod *core_v1.Pod) (*core_v1.Pod, error) { +func (c *FakePods) UpdateStatus(pod *corev1.Pod) (*corev1.Pod, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &core_v1.Pod{}) + Invokes(testing.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &corev1.Pod{}) if obj == nil { return nil, err } - return obj.(*core_v1.Pod), err + return obj.(*corev1.Pod), err } // Delete takes name of the pod and deletes it. Returns an error if one occurs. func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &core_v1.Pod{}) + Invokes(testing.NewDeleteAction(podsResource, c.ns, name), &corev1.Pod{}) return err } @@ -122,17 +124,17 @@ func (c *FakePods) Delete(name string, options *v1.DeleteOptions) error { func (c *FakePods) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(podsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.PodList{}) + _, err := c.Fake.Invokes(action, &corev1.PodList{}) return err } // Patch applies the patch and returns the patched pod. -func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Pod, err error) { +func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Pod, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &core_v1.Pod{}) + Invokes(testing.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &corev1.Pod{}) if obj == nil { return nil, err } - return obj.(*core_v1.Pod), err + return obj.(*corev1.Pod), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go index b8086addd..ff242f166 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var podtemplatesResource = schema.GroupVersionResource{Group: "", Version: "v1", var podtemplatesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "PodTemplate"} // Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. -func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *core_v1.PodTemplate, err error) { +func (c *FakePodTemplates) Get(name string, options v1.GetOptions) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &core_v1.PodTemplate{}) + Invokes(testing.NewGetAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{}) if obj == nil { return nil, err } - return obj.(*core_v1.PodTemplate), err + return obj.(*corev1.PodTemplate), err } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *FakePodTemplates) List(opts v1.ListOptions) (result *core_v1.PodTemplateList, err error) { +func (c *FakePodTemplates) List(opts v1.ListOptions) (result *corev1.PodTemplateList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &core_v1.PodTemplateList{}) + Invokes(testing.NewListAction(podtemplatesResource, podtemplatesKind, c.ns, opts), &corev1.PodTemplateList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakePodTemplates) List(opts v1.ListOptions) (result *core_v1.PodTemplat if label == nil { label = labels.Everything() } - list := &core_v1.PodTemplateList{} - for _, item := range obj.(*core_v1.PodTemplateList).Items { + list := &corev1.PodTemplateList{ListMeta: obj.(*corev1.PodTemplateList).ListMeta} + for _, item := range obj.(*corev1.PodTemplateList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakePodTemplates) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a podTemplate and creates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Create(podTemplate *core_v1.PodTemplate) (result *core_v1.PodTemplate, err error) { +func (c *FakePodTemplates) Create(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &core_v1.PodTemplate{}) + Invokes(testing.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) if obj == nil { return nil, err } - return obj.(*core_v1.PodTemplate), err + return obj.(*corev1.PodTemplate), err } // Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any. -func (c *FakePodTemplates) Update(podTemplate *core_v1.PodTemplate) (result *core_v1.PodTemplate, err error) { +func (c *FakePodTemplates) Update(podTemplate *corev1.PodTemplate) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &core_v1.PodTemplate{}) + Invokes(testing.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &corev1.PodTemplate{}) if obj == nil { return nil, err } - return obj.(*core_v1.PodTemplate), err + return obj.(*corev1.PodTemplate), err } // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &core_v1.PodTemplate{}) + Invokes(testing.NewDeleteAction(podtemplatesResource, c.ns, name), &corev1.PodTemplate{}) return err } @@ -110,17 +112,17 @@ func (c *FakePodTemplates) Delete(name string, options *v1.DeleteOptions) error func (c *FakePodTemplates) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.PodTemplateList{}) + _, err := c.Fake.Invokes(action, &corev1.PodTemplateList{}) return err } // Patch applies the patch and returns the patched podTemplate. -func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.PodTemplate, err error) { +func (c *FakePodTemplates) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.PodTemplate, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &core_v1.PodTemplate{}) + Invokes(testing.NewPatchSubresourceAction(podtemplatesResource, c.ns, name, data, subresources...), &corev1.PodTemplate{}) if obj == nil { return nil, err } - return obj.(*core_v1.PodTemplate), err + return obj.(*corev1.PodTemplate), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go index f9b9beeb1..64fde0b6c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1beta1 "k8s.io/api/extensions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" @@ -38,20 +40,20 @@ var replicationcontrollersResource = schema.GroupVersionResource{Group: "", Vers var replicationcontrollersKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ReplicationController"} // Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. -func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (result *core_v1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Get(name string, options v1.GetOptions) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &core_v1.ReplicationController{}) + Invokes(testing.NewGetAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{}) if obj == nil { return nil, err } - return obj.(*core_v1.ReplicationController), err + return obj.(*corev1.ReplicationController), err } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *core_v1.ReplicationControllerList, err error) { +func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *corev1.ReplicationControllerList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &core_v1.ReplicationControllerList{}) + Invokes(testing.NewListAction(replicationcontrollersResource, replicationcontrollersKind, c.ns, opts), &corev1.ReplicationControllerList{}) if obj == nil { return nil, err @@ -61,8 +63,8 @@ func (c *FakeReplicationControllers) List(opts v1.ListOptions) (result *core_v1. if label == nil { label = labels.Everything() } - list := &core_v1.ReplicationControllerList{} - for _, item := range obj.(*core_v1.ReplicationControllerList).Items { + list := &corev1.ReplicationControllerList{ListMeta: obj.(*corev1.ReplicationControllerList).ListMeta} + for _, item := range obj.(*corev1.ReplicationControllerList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -78,43 +80,43 @@ func (c *FakeReplicationControllers) Watch(opts v1.ListOptions) (watch.Interface } // Create takes the representation of a replicationController and creates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Create(replicationController *core_v1.ReplicationController) (result *core_v1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Create(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &core_v1.ReplicationController{}) + Invokes(testing.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) if obj == nil { return nil, err } - return obj.(*core_v1.ReplicationController), err + return obj.(*corev1.ReplicationController), err } // Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any. -func (c *FakeReplicationControllers) Update(replicationController *core_v1.ReplicationController) (result *core_v1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Update(replicationController *corev1.ReplicationController) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &core_v1.ReplicationController{}) + Invokes(testing.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &corev1.ReplicationController{}) if obj == nil { return nil, err } - return obj.(*core_v1.ReplicationController), err + return obj.(*corev1.ReplicationController), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeReplicationControllers) UpdateStatus(replicationController *core_v1.ReplicationController) (*core_v1.ReplicationController, error) { +func (c *FakeReplicationControllers) UpdateStatus(replicationController *corev1.ReplicationController) (*corev1.ReplicationController, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &core_v1.ReplicationController{}) + Invokes(testing.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &corev1.ReplicationController{}) if obj == nil { return nil, err } - return obj.(*core_v1.ReplicationController), err + return obj.(*corev1.ReplicationController), err } // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &core_v1.ReplicationController{}) + Invokes(testing.NewDeleteAction(replicationcontrollersResource, c.ns, name), &corev1.ReplicationController{}) return err } @@ -123,19 +125,19 @@ func (c *FakeReplicationControllers) Delete(name string, options *v1.DeleteOptio func (c *FakeReplicationControllers) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.ReplicationControllerList{}) + _, err := c.Fake.Invokes(action, &corev1.ReplicationControllerList{}) return err } // Patch applies the patch and returns the patched replicationController. -func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ReplicationController, err error) { +func (c *FakeReplicationControllers) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ReplicationController, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &core_v1.ReplicationController{}) + Invokes(testing.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &corev1.ReplicationController{}) if obj == nil { return nil, err } - return obj.(*core_v1.ReplicationController), err + return obj.(*corev1.ReplicationController), err } // GetScale takes name of the replicationController, and returns the corresponding scale object, and an error if there is any. diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go index 97ef36a0f..069749ccf 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var resourcequotasResource = schema.GroupVersionResource{Group: "", Version: "v1 var resourcequotasKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ResourceQuota"} // Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. -func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *core_v1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Get(name string, options v1.GetOptions) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &core_v1.ResourceQuota{}) + Invokes(testing.NewGetAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{}) if obj == nil { return nil, err } - return obj.(*core_v1.ResourceQuota), err + return obj.(*corev1.ResourceQuota), err } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *core_v1.ResourceQuotaList, err error) { +func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *corev1.ResourceQuotaList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &core_v1.ResourceQuotaList{}) + Invokes(testing.NewListAction(resourcequotasResource, resourcequotasKind, c.ns, opts), &corev1.ResourceQuotaList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeResourceQuotas) List(opts v1.ListOptions) (result *core_v1.Resource if label == nil { label = labels.Everything() } - list := &core_v1.ResourceQuotaList{} - for _, item := range obj.(*core_v1.ResourceQuotaList).Items { + list := &corev1.ResourceQuotaList{ListMeta: obj.(*corev1.ResourceQuotaList).ListMeta} + for _, item := range obj.(*corev1.ResourceQuotaList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeResourceQuotas) Watch(opts v1.ListOptions) (watch.Interface, error) } // Create takes the representation of a resourceQuota and creates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Create(resourceQuota *core_v1.ResourceQuota) (result *core_v1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Create(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &core_v1.ResourceQuota{}) + Invokes(testing.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) if obj == nil { return nil, err } - return obj.(*core_v1.ResourceQuota), err + return obj.(*corev1.ResourceQuota), err } // Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any. -func (c *FakeResourceQuotas) Update(resourceQuota *core_v1.ResourceQuota) (result *core_v1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Update(resourceQuota *corev1.ResourceQuota) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &core_v1.ResourceQuota{}) + Invokes(testing.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &corev1.ResourceQuota{}) if obj == nil { return nil, err } - return obj.(*core_v1.ResourceQuota), err + return obj.(*corev1.ResourceQuota), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *core_v1.ResourceQuota) (*core_v1.ResourceQuota, error) { +func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *corev1.ResourceQuota) (*corev1.ResourceQuota, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &core_v1.ResourceQuota{}) + Invokes(testing.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &corev1.ResourceQuota{}) if obj == nil { return nil, err } - return obj.(*core_v1.ResourceQuota), err + return obj.(*corev1.ResourceQuota), err } // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &core_v1.ResourceQuota{}) + Invokes(testing.NewDeleteAction(resourcequotasResource, c.ns, name), &corev1.ResourceQuota{}) return err } @@ -122,17 +124,17 @@ func (c *FakeResourceQuotas) Delete(name string, options *v1.DeleteOptions) erro func (c *FakeResourceQuotas) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.ResourceQuotaList{}) + _, err := c.Fake.Invokes(action, &corev1.ResourceQuotaList{}) return err } // Patch applies the patch and returns the patched resourceQuota. -func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ResourceQuota, err error) { +func (c *FakeResourceQuotas) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ResourceQuota, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &core_v1.ResourceQuota{}) + Invokes(testing.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &corev1.ResourceQuota{}) if obj == nil { return nil, err } - return obj.(*core_v1.ResourceQuota), err + return obj.(*corev1.ResourceQuota), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go index 39bf08d4a..f59ba40bc 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_secret.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var secretsResource = schema.GroupVersionResource{Group: "", Version: "v1", Reso var secretsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Secret"} // Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *core_v1.Secret, err error) { +func (c *FakeSecrets) Get(name string, options v1.GetOptions) (result *corev1.Secret, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(secretsResource, c.ns, name), &core_v1.Secret{}) + Invokes(testing.NewGetAction(secretsResource, c.ns, name), &corev1.Secret{}) if obj == nil { return nil, err } - return obj.(*core_v1.Secret), err + return obj.(*corev1.Secret), err } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *FakeSecrets) List(opts v1.ListOptions) (result *core_v1.SecretList, err error) { +func (c *FakeSecrets) List(opts v1.ListOptions) (result *corev1.SecretList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &core_v1.SecretList{}) + Invokes(testing.NewListAction(secretsResource, secretsKind, c.ns, opts), &corev1.SecretList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeSecrets) List(opts v1.ListOptions) (result *core_v1.SecretList, err if label == nil { label = labels.Everything() } - list := &core_v1.SecretList{} - for _, item := range obj.(*core_v1.SecretList).Items { + list := &corev1.SecretList{ListMeta: obj.(*corev1.SecretList).ListMeta} + for _, item := range obj.(*corev1.SecretList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a secret and creates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Create(secret *core_v1.Secret) (result *core_v1.Secret, err error) { +func (c *FakeSecrets) Create(secret *corev1.Secret) (result *corev1.Secret, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &core_v1.Secret{}) + Invokes(testing.NewCreateAction(secretsResource, c.ns, secret), &corev1.Secret{}) if obj == nil { return nil, err } - return obj.(*core_v1.Secret), err + return obj.(*corev1.Secret), err } // Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any. -func (c *FakeSecrets) Update(secret *core_v1.Secret) (result *core_v1.Secret, err error) { +func (c *FakeSecrets) Update(secret *corev1.Secret) (result *corev1.Secret, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &core_v1.Secret{}) + Invokes(testing.NewUpdateAction(secretsResource, c.ns, secret), &corev1.Secret{}) if obj == nil { return nil, err } - return obj.(*core_v1.Secret), err + return obj.(*corev1.Secret), err } // Delete takes name of the secret and deletes it. Returns an error if one occurs. func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &core_v1.Secret{}) + Invokes(testing.NewDeleteAction(secretsResource, c.ns, name), &corev1.Secret{}) return err } @@ -110,17 +112,17 @@ func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.SecretList{}) + _, err := c.Fake.Invokes(action, &corev1.SecretList{}) return err } // Patch applies the patch and returns the patched secret. -func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Secret, err error) { +func (c *FakeSecrets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Secret, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &core_v1.Secret{}) + Invokes(testing.NewPatchSubresourceAction(secretsResource, c.ns, name, data, subresources...), &corev1.Secret{}) if obj == nil { return nil, err } - return obj.(*core_v1.Secret), err + return obj.(*corev1.Secret), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go index 46678052e..2ffcdff76 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_service.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var servicesResource = schema.GroupVersionResource{Group: "", Version: "v1", Res var servicesKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Service"} // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *FakeServices) Get(name string, options v1.GetOptions) (result *core_v1.Service, err error) { +func (c *FakeServices) Get(name string, options v1.GetOptions) (result *corev1.Service, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(servicesResource, c.ns, name), &core_v1.Service{}) + Invokes(testing.NewGetAction(servicesResource, c.ns, name), &corev1.Service{}) if obj == nil { return nil, err } - return obj.(*core_v1.Service), err + return obj.(*corev1.Service), err } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *FakeServices) List(opts v1.ListOptions) (result *core_v1.ServiceList, err error) { +func (c *FakeServices) List(opts v1.ListOptions) (result *corev1.ServiceList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &core_v1.ServiceList{}) + Invokes(testing.NewListAction(servicesResource, servicesKind, c.ns, opts), &corev1.ServiceList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeServices) List(opts v1.ListOptions) (result *core_v1.ServiceList, e if label == nil { label = labels.Everything() } - list := &core_v1.ServiceList{} - for _, item := range obj.(*core_v1.ServiceList).Items { + list := &corev1.ServiceList{ListMeta: obj.(*corev1.ServiceList).ListMeta} + for _, item := range obj.(*corev1.ServiceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,62 +79,54 @@ func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a service and creates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Create(service *core_v1.Service) (result *core_v1.Service, err error) { +func (c *FakeServices) Create(service *corev1.Service) (result *corev1.Service, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &core_v1.Service{}) + Invokes(testing.NewCreateAction(servicesResource, c.ns, service), &corev1.Service{}) if obj == nil { return nil, err } - return obj.(*core_v1.Service), err + return obj.(*corev1.Service), err } // Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any. -func (c *FakeServices) Update(service *core_v1.Service) (result *core_v1.Service, err error) { +func (c *FakeServices) Update(service *corev1.Service) (result *corev1.Service, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &core_v1.Service{}) + Invokes(testing.NewUpdateAction(servicesResource, c.ns, service), &corev1.Service{}) if obj == nil { return nil, err } - return obj.(*core_v1.Service), err + return obj.(*corev1.Service), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeServices) UpdateStatus(service *core_v1.Service) (*core_v1.Service, error) { +func (c *FakeServices) UpdateStatus(service *corev1.Service) (*corev1.Service, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &core_v1.Service{}) + Invokes(testing.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &corev1.Service{}) if obj == nil { return nil, err } - return obj.(*core_v1.Service), err + return obj.(*corev1.Service), err } // Delete takes name of the service and deletes it. Returns an error if one occurs. func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &core_v1.Service{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) + Invokes(testing.NewDeleteAction(servicesResource, c.ns, name), &corev1.Service{}) - _, err := c.Fake.Invokes(action, &core_v1.ServiceList{}) return err } // Patch applies the patch and returns the patched service. -func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.Service, err error) { +func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.Service, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &core_v1.Service{}) + Invokes(testing.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &corev1.Service{}) if obj == nil { return nil, err } - return obj.(*core_v1.Service), err + return obj.(*corev1.Service), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go index cd74e93c7..2b2c5a7b2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - core_v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var serviceaccountsResource = schema.GroupVersionResource{Group: "", Version: "v var serviceaccountsKind = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "ServiceAccount"} // Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. -func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *core_v1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Get(name string, options v1.GetOptions) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &core_v1.ServiceAccount{}) + Invokes(testing.NewGetAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{}) if obj == nil { return nil, err } - return obj.(*core_v1.ServiceAccount), err + return obj.(*corev1.ServiceAccount), err } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *core_v1.ServiceAccountList, err error) { +func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *corev1.ServiceAccountList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &core_v1.ServiceAccountList{}) + Invokes(testing.NewListAction(serviceaccountsResource, serviceaccountsKind, c.ns, opts), &corev1.ServiceAccountList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeServiceAccounts) List(opts v1.ListOptions) (result *core_v1.Service if label == nil { label = labels.Everything() } - list := &core_v1.ServiceAccountList{} - for _, item := range obj.(*core_v1.ServiceAccountList).Items { + list := &corev1.ServiceAccountList{ListMeta: obj.(*corev1.ServiceAccountList).ListMeta} + for _, item := range obj.(*corev1.ServiceAccountList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeServiceAccounts) Watch(opts v1.ListOptions) (watch.Interface, error } // Create takes the representation of a serviceAccount and creates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Create(serviceAccount *core_v1.ServiceAccount) (result *core_v1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Create(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &core_v1.ServiceAccount{}) + Invokes(testing.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) if obj == nil { return nil, err } - return obj.(*core_v1.ServiceAccount), err + return obj.(*corev1.ServiceAccount), err } // Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any. -func (c *FakeServiceAccounts) Update(serviceAccount *core_v1.ServiceAccount) (result *core_v1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Update(serviceAccount *corev1.ServiceAccount) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &core_v1.ServiceAccount{}) + Invokes(testing.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &corev1.ServiceAccount{}) if obj == nil { return nil, err } - return obj.(*core_v1.ServiceAccount), err + return obj.(*corev1.ServiceAccount), err } // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &core_v1.ServiceAccount{}) + Invokes(testing.NewDeleteAction(serviceaccountsResource, c.ns, name), &corev1.ServiceAccount{}) return err } @@ -110,17 +112,17 @@ func (c *FakeServiceAccounts) Delete(name string, options *v1.DeleteOptions) err func (c *FakeServiceAccounts) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &core_v1.ServiceAccountList{}) + _, err := c.Fake.Invokes(action, &corev1.ServiceAccountList{}) return err } // Patch applies the patch and returns the patched serviceAccount. -func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *core_v1.ServiceAccount, err error) { +func (c *FakeServiceAccounts) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ServiceAccount, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &core_v1.ServiceAccount{}) + Invokes(testing.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &corev1.ServiceAccount{}) if obj == nil { return nil, err } - return obj.(*core_v1.ServiceAccount), err + return obj.(*corev1.ServiceAccount), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount_expansion.go new file mode 100644 index 000000000..a0efbcc2f --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/fake/fake_serviceaccount_expansion.go @@ -0,0 +1,31 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + authenticationv1 "k8s.io/api/authentication/v1" + core "k8s.io/client-go/testing" +) + +func (c *FakeServiceAccounts) CreateToken(name string, tr *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) { + obj, err := c.Fake.Invokes(core.NewCreateSubresourceAction(serviceaccountsResource, name, "token", c.ns, tr), &authenticationv1.TokenRequest{}) + + if obj == nil { + return nil, err + } + return obj.(*authenticationv1.TokenRequest), err +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go index 3f4b5f89c..6e8591b12 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type ComponentStatusExpansion interface{} @@ -35,5 +37,3 @@ type ReplicationControllerExpansion interface{} type ResourceQuotaExpansion interface{} type SecretExpansion interface{} - -type ServiceAccountExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go index a21d09273..5b385668b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type LimitRangesGetter interface { type LimitRangeInterface interface { Create(*v1.LimitRange) (*v1.LimitRange, error) Update(*v1.LimitRange) (*v1.LimitRange, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.LimitRange, error) - List(opts meta_v1.ListOptions) (*v1.LimitRangeList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.LimitRange, error) + List(opts metav1.ListOptions) (*v1.LimitRangeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) LimitRangeExpansion } @@ -59,7 +61,7 @@ func newLimitRanges(c *CoreV1Client, namespace string) *limitRanges { } // Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any. -func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.LimitRange, err error) { +func (c *limitRanges) Get(name string, options metav1.GetOptions) (result *v1.LimitRange, err error) { result = &v1.LimitRange{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *limitRanges) Get(name string, options meta_v1.GetOptions) (result *v1.L } // List takes label and field selectors, and returns the list of LimitRanges that match those selectors. -func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, err error) { +func (c *limitRanges) List(opts metav1.ListOptions) (result *v1.LimitRangeList, err error) { result = &v1.LimitRangeList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *limitRanges) List(opts meta_v1.ListOptions) (result *v1.LimitRangeList, } // Watch returns a watch.Interface that watches the requested limitRanges. -func (c *limitRanges) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *limitRanges) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *limitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, } // Delete takes name of the limitRange and deletes it. Returns an error if one occurs. -func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *limitRanges) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). @@ -130,7 +132,7 @@ func (c *limitRanges) Delete(name string, options *meta_v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *limitRanges) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *limitRanges) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("limitranges"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go index a1c59959d..e22d07dec 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,10 @@ type NamespaceInterface interface { Create(*v1.Namespace) (*v1.Namespace, error) Update(*v1.Namespace) (*v1.Namespace, error) UpdateStatus(*v1.Namespace) (*v1.Namespace, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Namespace, error) - List(opts meta_v1.ListOptions) (*v1.NamespaceList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + Get(name string, options metav1.GetOptions) (*v1.Namespace, error) + List(opts metav1.ListOptions) (*v1.NamespaceList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) NamespaceExpansion } @@ -58,7 +59,7 @@ func newNamespaces(c *CoreV1Client) *namespaces { } // Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any. -func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Namespace, err error) { +func (c *namespaces) Get(name string, options metav1.GetOptions) (result *v1.Namespace, err error) { result = &v1.Namespace{} err = c.client.Get(). Resource("namespaces"). @@ -70,7 +71,7 @@ func (c *namespaces) Get(name string, options meta_v1.GetOptions) (result *v1.Na } // List takes label and field selectors, and returns the list of Namespaces that match those selectors. -func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, err error) { +func (c *namespaces) List(opts metav1.ListOptions) (result *v1.NamespaceList, err error) { result = &v1.NamespaceList{} err = c.client.Get(). Resource("namespaces"). @@ -81,7 +82,7 @@ func (c *namespaces) List(opts meta_v1.ListOptions) (result *v1.NamespaceList, e } // Watch returns a watch.Interface that watches the requested namespaces. -func (c *namespaces) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *namespaces) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Resource("namespaces"). @@ -128,7 +129,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace } // Delete takes name of the namespace and deletes it. Returns an error if one occurs. -func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *namespaces) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Resource("namespaces"). Name(name). @@ -137,16 +138,6 @@ func (c *namespaces) Delete(name string, options *meta_v1.DeleteOptions) error { Error() } -// DeleteCollection deletes a collection of objects. -func (c *namespaces) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { - return c.client.Delete(). - Resource("namespaces"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - // Patch applies the patch and returns the patched namespace. func (c *namespaces) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) { result = &v1.Namespace{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/node.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/node.go index d76251373..5c769c118 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/node.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/node.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type NodeInterface interface { Create(*v1.Node) (*v1.Node, error) Update(*v1.Node) (*v1.Node, error) UpdateStatus(*v1.Node) (*v1.Node, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Node, error) - List(opts meta_v1.ListOptions) (*v1.NodeList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Node, error) + List(opts metav1.ListOptions) (*v1.NodeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Node, err error) NodeExpansion } @@ -58,7 +60,7 @@ func newNodes(c *CoreV1Client) *nodes { } // Get takes name of the node, and returns the corresponding node object, and an error if there is any. -func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, err error) { +func (c *nodes) Get(name string, options metav1.GetOptions) (result *v1.Node, err error) { result = &v1.Node{} err = c.client.Get(). Resource("nodes"). @@ -70,7 +72,7 @@ func (c *nodes) Get(name string, options meta_v1.GetOptions) (result *v1.Node, e } // List takes label and field selectors, and returns the list of Nodes that match those selectors. -func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) { +func (c *nodes) List(opts metav1.ListOptions) (result *v1.NodeList, err error) { result = &v1.NodeList{} err = c.client.Get(). Resource("nodes"). @@ -81,7 +83,7 @@ func (c *nodes) List(opts meta_v1.ListOptions) (result *v1.NodeList, err error) } // Watch returns a watch.Interface that watches the requested nodes. -func (c *nodes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *nodes) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Resource("nodes"). @@ -128,7 +130,7 @@ func (c *nodes) UpdateStatus(node *v1.Node) (result *v1.Node, err error) { } // Delete takes name of the node and deletes it. Returns an error if one occurs. -func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *nodes) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Resource("nodes"). Name(name). @@ -138,7 +140,7 @@ func (c *nodes) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *nodes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *nodes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Resource("nodes"). VersionedParams(&listOptions, scheme.ParameterCodec). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go index 36a881772..d5f19aef5 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type PersistentVolumeInterface interface { Create(*v1.PersistentVolume) (*v1.PersistentVolume, error) Update(*v1.PersistentVolume) (*v1.PersistentVolume, error) UpdateStatus(*v1.PersistentVolume) (*v1.PersistentVolume, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolume, error) - List(opts meta_v1.ListOptions) (*v1.PersistentVolumeList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.PersistentVolume, error) + List(opts metav1.ListOptions) (*v1.PersistentVolumeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) PersistentVolumeExpansion } @@ -58,7 +60,7 @@ func newPersistentVolumes(c *CoreV1Client) *persistentVolumes { } // Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any. -func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolume, err error) { +func (c *persistentVolumes) Get(name string, options metav1.GetOptions) (result *v1.PersistentVolume, err error) { result = &v1.PersistentVolume{} err = c.client.Get(). Resource("persistentvolumes"). @@ -70,7 +72,7 @@ func (c *persistentVolumes) Get(name string, options meta_v1.GetOptions) (result } // List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors. -func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeList, err error) { +func (c *persistentVolumes) List(opts metav1.ListOptions) (result *v1.PersistentVolumeList, err error) { result = &v1.PersistentVolumeList{} err = c.client.Get(). Resource("persistentvolumes"). @@ -81,7 +83,7 @@ func (c *persistentVolumes) List(opts meta_v1.ListOptions) (result *v1.Persisten } // Watch returns a watch.Interface that watches the requested persistentVolumes. -func (c *persistentVolumes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumes) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Resource("persistentvolumes"). @@ -128,7 +130,7 @@ func (c *persistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) } // Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs. -func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *persistentVolumes) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Resource("persistentvolumes"). Name(name). @@ -138,7 +140,7 @@ func (c *persistentVolumes) Delete(name string, options *meta_v1.DeleteOptions) } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *persistentVolumes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Resource("persistentvolumes"). VersionedParams(&listOptions, scheme.ParameterCodec). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go index d60566f83..d32ae5dfd 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type PersistentVolumeClaimInterface interface { Create(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) UpdateStatus(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.PersistentVolumeClaim, error) - List(opts meta_v1.ListOptions) (*v1.PersistentVolumeClaimList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.PersistentVolumeClaim, error) + List(opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolumeClaim, err error) PersistentVolumeClaimExpansion } @@ -60,7 +62,7 @@ func newPersistentVolumeClaims(c *CoreV1Client, namespace string) *persistentVol } // Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any. -func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (result *v1.PersistentVolumeClaim, err error) { +func (c *persistentVolumeClaims) Get(name string, options metav1.GetOptions) (result *v1.PersistentVolumeClaim, err error) { result = &v1.PersistentVolumeClaim{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *persistentVolumeClaims) Get(name string, options meta_v1.GetOptions) (r } // List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors. -func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { +func (c *persistentVolumeClaims) List(opts metav1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { result = &v1.PersistentVolumeClaimList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *persistentVolumeClaims) List(opts meta_v1.ListOptions) (result *v1.Pers } // Watch returns a watch.Interface that watches the requested persistentVolumeClaims. -func (c *persistentVolumeClaims) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *persistentVolumeClaims) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Persiste } // Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs. -func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *persistentVolumeClaims) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). @@ -147,7 +149,7 @@ func (c *persistentVolumeClaims) Delete(name string, options *meta_v1.DeleteOpti } // DeleteCollection deletes a collection of objects. -func (c *persistentVolumeClaims) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *persistentVolumeClaims) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("persistentvolumeclaims"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/pod.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/pod.go index 3825a1cc7..b19c5a5c3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/pod.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type PodInterface interface { Create(*v1.Pod) (*v1.Pod, error) Update(*v1.Pod) (*v1.Pod, error) UpdateStatus(*v1.Pod) (*v1.Pod, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Pod, error) - List(opts meta_v1.ListOptions) (*v1.PodList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Pod, error) + List(opts metav1.ListOptions) (*v1.PodList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Pod, err error) PodExpansion } @@ -60,7 +62,7 @@ func newPods(c *CoreV1Client, namespace string) *pods { } // Get takes name of the pod, and returns the corresponding pod object, and an error if there is any. -func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err error) { +func (c *pods) Get(name string, options metav1.GetOptions) (result *v1.Pod, err error) { result = &v1.Pod{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *pods) Get(name string, options meta_v1.GetOptions) (result *v1.Pod, err } // List takes label and field selectors, and returns the list of Pods that match those selectors. -func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { +func (c *pods) List(opts metav1.ListOptions) (result *v1.PodList, err error) { result = &v1.PodList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *pods) List(opts meta_v1.ListOptions) (result *v1.PodList, err error) { } // Watch returns a watch.Interface that watches the requested pods. -func (c *pods) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *pods) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *pods) UpdateStatus(pod *v1.Pod) (result *v1.Pod, err error) { } // Delete takes name of the pod and deletes it. Returns an error if one occurs. -func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *pods) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). @@ -147,7 +149,7 @@ func (c *pods) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *pods) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *pods) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("pods"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go index 028423adc..d644e17d7 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type PodTemplatesGetter interface { type PodTemplateInterface interface { Create(*v1.PodTemplate) (*v1.PodTemplate, error) Update(*v1.PodTemplate) (*v1.PodTemplate, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.PodTemplate, error) - List(opts meta_v1.ListOptions) (*v1.PodTemplateList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.PodTemplate, error) + List(opts metav1.ListOptions) (*v1.PodTemplateList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodTemplate, err error) PodTemplateExpansion } @@ -59,7 +61,7 @@ func newPodTemplates(c *CoreV1Client, namespace string) *podTemplates { } // Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any. -func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1.PodTemplate, err error) { +func (c *podTemplates) Get(name string, options metav1.GetOptions) (result *v1.PodTemplate, err error) { result = &v1.PodTemplate{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *podTemplates) Get(name string, options meta_v1.GetOptions) (result *v1. } // List takes label and field selectors, and returns the list of PodTemplates that match those selectors. -func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateList, err error) { +func (c *podTemplates) List(opts metav1.ListOptions) (result *v1.PodTemplateList, err error) { result = &v1.PodTemplateList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *podTemplates) List(opts meta_v1.ListOptions) (result *v1.PodTemplateLis } // Watch returns a watch.Interface that watches the requested podTemplates. -func (c *podTemplates) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *podTemplates) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *podTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTempla } // Delete takes name of the podTemplate and deletes it. Returns an error if one occurs. -func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *podTemplates) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). @@ -130,7 +132,7 @@ func (c *podTemplates) Delete(name string, options *meta_v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *podTemplates) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *podTemplates) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("podtemplates"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go index 36b3141c8..17622f1c2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,12 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" v1beta1 "k8s.io/api/extensions/v1beta1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -37,13 +39,13 @@ type ReplicationControllerInterface interface { Create(*v1.ReplicationController) (*v1.ReplicationController, error) Update(*v1.ReplicationController) (*v1.ReplicationController, error) UpdateStatus(*v1.ReplicationController) (*v1.ReplicationController, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ReplicationController, error) - List(opts meta_v1.ListOptions) (*v1.ReplicationControllerList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ReplicationController, error) + List(opts metav1.ListOptions) (*v1.ReplicationControllerList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) - GetScale(replicationControllerName string, options meta_v1.GetOptions) (*v1beta1.Scale, error) + GetScale(replicationControllerName string, options metav1.GetOptions) (*v1beta1.Scale, error) UpdateScale(replicationControllerName string, scale *v1beta1.Scale) (*v1beta1.Scale, error) ReplicationControllerExpansion @@ -64,7 +66,7 @@ func newReplicationControllers(c *CoreV1Client, namespace string) *replicationCo } // Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any. -func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (result *v1.ReplicationController, err error) { +func (c *replicationControllers) Get(name string, options metav1.GetOptions) (result *v1.ReplicationController, err error) { result = &v1.ReplicationController{} err = c.client.Get(). Namespace(c.ns). @@ -77,7 +79,7 @@ func (c *replicationControllers) Get(name string, options meta_v1.GetOptions) (r } // List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors. -func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.ReplicationControllerList, err error) { +func (c *replicationControllers) List(opts metav1.ListOptions) (result *v1.ReplicationControllerList, err error) { result = &v1.ReplicationControllerList{} err = c.client.Get(). Namespace(c.ns). @@ -89,7 +91,7 @@ func (c *replicationControllers) List(opts meta_v1.ListOptions) (result *v1.Repl } // Watch returns a watch.Interface that watches the requested replicationControllers. -func (c *replicationControllers) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *replicationControllers) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -140,7 +142,7 @@ func (c *replicationControllers) UpdateStatus(replicationController *v1.Replicat } // Delete takes name of the replicationController and deletes it. Returns an error if one occurs. -func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *replicationControllers) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -151,7 +153,7 @@ func (c *replicationControllers) Delete(name string, options *meta_v1.DeleteOpti } // DeleteCollection deletes a collection of objects. -func (c *replicationControllers) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *replicationControllers) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("replicationcontrollers"). @@ -176,7 +178,7 @@ func (c *replicationControllers) Patch(name string, pt types.PatchType, data []b } // GetScale takes name of the replicationController, and returns the corresponding v1beta1.Scale object, and an error if there is any. -func (c *replicationControllers) GetScale(replicationControllerName string, options meta_v1.GetOptions) (result *v1beta1.Scale, err error) { +func (c *replicationControllers) GetScale(replicationControllerName string, options metav1.GetOptions) (result *v1beta1.Scale, err error) { result = &v1beta1.Scale{} err = c.client.Get(). Namespace(c.ns). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go index 990326226..8b74a4046 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,11 @@ type ResourceQuotaInterface interface { Create(*v1.ResourceQuota) (*v1.ResourceQuota, error) Update(*v1.ResourceQuota) (*v1.ResourceQuota, error) UpdateStatus(*v1.ResourceQuota) (*v1.ResourceQuota, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ResourceQuota, error) - List(opts meta_v1.ListOptions) (*v1.ResourceQuotaList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ResourceQuota, error) + List(opts metav1.ListOptions) (*v1.ResourceQuotaList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ResourceQuota, err error) ResourceQuotaExpansion } @@ -60,7 +62,7 @@ func newResourceQuotas(c *CoreV1Client, namespace string) *resourceQuotas { } // Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any. -func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v1.ResourceQuota, err error) { +func (c *resourceQuotas) Get(name string, options metav1.GetOptions) (result *v1.ResourceQuota, err error) { result = &v1.ResourceQuota{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *resourceQuotas) Get(name string, options meta_v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors. -func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuotaList, err error) { +func (c *resourceQuotas) List(opts metav1.ListOptions) (result *v1.ResourceQuotaList, err error) { result = &v1.ResourceQuotaList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *resourceQuotas) List(opts meta_v1.ListOptions) (result *v1.ResourceQuot } // Watch returns a watch.Interface that watches the requested resourceQuotas. -func (c *resourceQuotas) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *resourceQuotas) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *resourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (result * } // Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs. -func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *resourceQuotas) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). @@ -147,7 +149,7 @@ func (c *resourceQuotas) Delete(name string, options *meta_v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *resourceQuotas) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *resourceQuotas) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("resourcequotas"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/secret.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/secret.go index a21a2167c..4ea9796b6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/secret.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type SecretsGetter interface { type SecretInterface interface { Create(*v1.Secret) (*v1.Secret, error) Update(*v1.Secret) (*v1.Secret, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Secret, error) - List(opts meta_v1.ListOptions) (*v1.SecretList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Secret, error) + List(opts metav1.ListOptions) (*v1.SecretList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) SecretExpansion } @@ -59,7 +61,7 @@ func newSecrets(c *CoreV1Client, namespace string) *secrets { } // Get takes name of the secret, and returns the corresponding secret object, and an error if there is any. -func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secret, err error) { +func (c *secrets) Get(name string, options metav1.GetOptions) (result *v1.Secret, err error) { result = &v1.Secret{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *secrets) Get(name string, options meta_v1.GetOptions) (result *v1.Secre } // List takes label and field selectors, and returns the list of Secrets that match those selectors. -func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err error) { +func (c *secrets) List(opts metav1.ListOptions) (result *v1.SecretList, err error) { result = &v1.SecretList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *secrets) List(opts meta_v1.ListOptions) (result *v1.SecretList, err err } // Watch returns a watch.Interface that watches the requested secrets. -func (c *secrets) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *secrets) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { } // Delete takes name of the secret and deletes it. Returns an error if one occurs. -func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *secrets) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). @@ -130,7 +132,7 @@ func (c *secrets) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *secrets) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *secrets) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("secrets"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/service.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/service.go index 744714740..6c42ca87a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/service.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -36,11 +38,10 @@ type ServiceInterface interface { Create(*v1.Service) (*v1.Service, error) Update(*v1.Service) (*v1.Service, error) UpdateStatus(*v1.Service) (*v1.Service, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Service, error) - List(opts meta_v1.ListOptions) (*v1.ServiceList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + Get(name string, options metav1.GetOptions) (*v1.Service, error) + List(opts metav1.ListOptions) (*v1.ServiceList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) ServiceExpansion } @@ -60,7 +61,7 @@ func newServices(c *CoreV1Client, namespace string) *services { } // Get takes name of the service, and returns the corresponding service object, and an error if there is any. -func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Service, err error) { +func (c *services) Get(name string, options metav1.GetOptions) (result *v1.Service, err error) { result = &v1.Service{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +74,7 @@ func (c *services) Get(name string, options meta_v1.GetOptions) (result *v1.Serv } // List takes label and field selectors, and returns the list of Services that match those selectors. -func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err error) { +func (c *services) List(opts metav1.ListOptions) (result *v1.ServiceList, err error) { result = &v1.ServiceList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +86,7 @@ func (c *services) List(opts meta_v1.ListOptions) (result *v1.ServiceList, err e } // Watch returns a watch.Interface that watches the requested services. -func (c *services) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *services) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +137,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er } // Delete takes name of the service and deletes it. Returns an error if one occurs. -func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *services) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("services"). @@ -146,17 +147,6 @@ func (c *services) Delete(name string, options *meta_v1.DeleteOptions) error { Error() } -// DeleteCollection deletes a collection of objects. -func (c *services) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("services"). - VersionedParams(&listOptions, scheme.ParameterCodec). - Body(options). - Do(). - Error() -} - // Patch applies the patch and returns the patched service. func (c *services) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) { result = &v1.Service{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go index c3fbebd5e..f3ab7eb87 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/core/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type ServiceAccountsGetter interface { type ServiceAccountInterface interface { Create(*v1.ServiceAccount) (*v1.ServiceAccount, error) Update(*v1.ServiceAccount) (*v1.ServiceAccount, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ServiceAccount, error) - List(opts meta_v1.ListOptions) (*v1.ServiceAccountList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ServiceAccount, error) + List(opts metav1.ListOptions) (*v1.ServiceAccountList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ServiceAccount, err error) ServiceAccountExpansion } @@ -59,7 +61,7 @@ func newServiceAccounts(c *CoreV1Client, namespace string) *serviceAccounts { } // Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any. -func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result *v1.ServiceAccount, err error) { +func (c *serviceAccounts) Get(name string, options metav1.GetOptions) (result *v1.ServiceAccount, err error) { result = &v1.ServiceAccount{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *serviceAccounts) Get(name string, options meta_v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors. -func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAccountList, err error) { +func (c *serviceAccounts) List(opts metav1.ListOptions) (result *v1.ServiceAccountList, err error) { result = &v1.ServiceAccountList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *serviceAccounts) List(opts meta_v1.ListOptions) (result *v1.ServiceAcco } // Watch returns a watch.Interface that watches the requested serviceAccounts. -func (c *serviceAccounts) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *serviceAccounts) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *serviceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1. } // Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs. -func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *serviceAccounts) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). @@ -130,7 +132,7 @@ func (c *serviceAccounts) Delete(name string, options *meta_v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *serviceAccounts) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *serviceAccounts) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("serviceaccounts"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount_expansion.go new file mode 100644 index 000000000..eaf643f15 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/core/v1/serviceaccount_expansion.go @@ -0,0 +1,41 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + authenticationv1 "k8s.io/api/authentication/v1" +) + +// The ServiceAccountExpansion interface allows manually adding extra methods +// to the ServiceAccountInterface. +type ServiceAccountExpansion interface { + CreateToken(name string, tr *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) +} + +// CreateToken creates a new token for a serviceaccount. +func (c *serviceAccounts) CreateToken(name string, tr *authenticationv1.TokenRequest) (*authenticationv1.TokenRequest, error) { + result := &authenticationv1.TokenRequest{} + err := c.client.Post(). + Namespace(c.ns). + Resource("serviceaccounts"). + SubResource("token"). + Name(name). + Body(tr). + Do(). + Into(result) + return result, err +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/BUILD deleted file mode 100644 index 307884cc4..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "event.go", - "events_client.go", - "generated_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/events/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/events/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go index b186b967f..af7d060d5 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go +++ b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go index 5ae7fbc99..fb59635bb 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/events_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/BUILD deleted file mode 100644 index b9a692e5c..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_event.go", - "fake_events_client.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/events/v1beta1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/events/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go index 20ec2a7d6..b210e40a0 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go +++ b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeEvents) List(opts v1.ListOptions) (result *v1beta1.EventList, err e if label == nil { label = labels.Everything() } - list := &v1beta1.EventList{} + list := &v1beta1.EventList{ListMeta: obj.(*v1beta1.EventList).ListMeta} for _, item := range obj.(*v1beta1.EventList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go index 27ede5cd8..875c774e3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/fake/fake_events_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go index e2522111d..e27f693f8 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/events/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type EventExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/BUILD deleted file mode 100644 index 5ad976867..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "daemonset.go", - "deployment.go", - "deployment_expansion.go", - "doc.go", - "extensions_client.go", - "generated_expansion.go", - "ingress.go", - "podsecuritypolicy.go", - "replicaset.go", - "scale.go", - "scale_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/extensions/v1beta1", - deps = [ - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go index f33ce3eb4..85294be4b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go index 91eab950e..89183d285 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go index 73128ed3d..1961ffc7c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/BUILD deleted file mode 100644 index e62ff5bc8..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_daemonset.go", - "fake_deployment.go", - "fake_deployment_expansion.go", - "fake_extensions_client.go", - "fake_ingress.go", - "fake_podsecuritypolicy.go", - "fake_replicaset.go", - "fake_scale.go", - "fake_scale_expansion.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go index 4fb3df94f..3a760b317 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeDaemonSets) List(opts v1.ListOptions) (result *v1beta1.DaemonSetLis if label == nil { label = labels.Everything() } - list := &v1beta1.DaemonSetList{} + list := &v1beta1.DaemonSetList{ListMeta: obj.(*v1beta1.DaemonSetList).ListMeta} for _, item := range obj.(*v1beta1.DaemonSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go index 804ffabf7..f032a5563 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeDeployments) List(opts v1.ListOptions) (result *v1beta1.DeploymentL if label == nil { label = labels.Everything() } - list := &v1beta1.DeploymentList{} + list := &v1beta1.DeploymentList{ListMeta: obj.(*v1beta1.DeploymentList).ListMeta} for _, item := range obj.(*v1beta1.DeploymentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go index 6590b69fd..1aba34f9d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_extensions_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go index 56bbfb013..55257a88a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, if label == nil { label = labels.Everything() } - list := &v1beta1.IngressList{} + list := &v1beta1.IngressList{ListMeta: obj.(*v1beta1.IngressList).ListMeta} for _, item := range obj.(*v1beta1.IngressList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go index 250a17eaa..70b5dac28 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.Pod if label == nil { label = labels.Everything() } - list := &v1beta1.PodSecurityPolicyList{} + list := &v1beta1.PodSecurityPolicyList{ListMeta: obj.(*v1beta1.PodSecurityPolicyList).ListMeta} for _, item := range obj.(*v1beta1.PodSecurityPolicyList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go index fcfb5dcbd..2ab8f244f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetL if label == nil { label = labels.Everything() } - list := &v1beta1.ReplicaSetList{} + list := &v1beta1.ReplicaSetList{ListMeta: obj.(*v1beta1.ReplicaSetList).ListMeta} for _, item := range obj.(*v1beta1.ReplicaSetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go index caa72a34a..02c4d0bab 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/fake/fake_scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeScales implements ScaleInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go index e7062ca2c..cfaeebd05 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type DaemonSetExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go index e9ba108af..f8b664cbd 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go index a1c274c2e..8099d7730 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go index ed68f458b..7e61fa2d1 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go index 8d62590ca..6ee677acd 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go +++ b/deps/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD deleted file mode 100644 index 7a2e3e2b1..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "networking_client.go", - "networkpolicy.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/networking/v1", - deps = [ - "//vendor/k8s.io/api/networking/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/networking/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD deleted file mode 100644 index bc84632da..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_networking_client.go", - "fake_networkpolicy.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/networking/v1/fake", - deps = [ - "//vendor/k8s.io/api/networking/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/networking/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go index 67ba6372e..6b135c636 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networking_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go index 881b8a926..7be202298 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go +++ b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/fake/fake_networkpolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - networking_v1 "k8s.io/api/networking/v1" + networkingv1 "k8s.io/api/networking/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var networkpoliciesResource = schema.GroupVersionResource{Group: "networking.k8s var networkpoliciesKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1", Kind: "NetworkPolicy"} // Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *networking_v1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Get(name string, options v1.GetOptions) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &networking_v1.NetworkPolicy{}) + Invokes(testing.NewGetAction(networkpoliciesResource, c.ns, name), &networkingv1.NetworkPolicy{}) if obj == nil { return nil, err } - return obj.(*networking_v1.NetworkPolicy), err + return obj.(*networkingv1.NetworkPolicy), err } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networking_v1.NetworkPolicyList, err error) { +func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networkingv1.NetworkPolicyList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &networking_v1.NetworkPolicyList{}) + Invokes(testing.NewListAction(networkpoliciesResource, networkpoliciesKind, c.ns, opts), &networkingv1.NetworkPolicyList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeNetworkPolicies) List(opts v1.ListOptions) (result *networking_v1.N if label == nil { label = labels.Everything() } - list := &networking_v1.NetworkPolicyList{} - for _, item := range obj.(*networking_v1.NetworkPolicyList).Items { + list := &networkingv1.NetworkPolicyList{ListMeta: obj.(*networkingv1.NetworkPolicyList).ListMeta} + for _, item := range obj.(*networkingv1.NetworkPolicyList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeNetworkPolicies) Watch(opts v1.ListOptions) (watch.Interface, error } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Create(networkPolicy *networking_v1.NetworkPolicy) (result *networking_v1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Create(networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networking_v1.NetworkPolicy{}) + Invokes(testing.NewCreateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) if obj == nil { return nil, err } - return obj.(*networking_v1.NetworkPolicy), err + return obj.(*networkingv1.NetworkPolicy), err } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. -func (c *FakeNetworkPolicies) Update(networkPolicy *networking_v1.NetworkPolicy) (result *networking_v1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Update(networkPolicy *networkingv1.NetworkPolicy) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networking_v1.NetworkPolicy{}) + Invokes(testing.NewUpdateAction(networkpoliciesResource, c.ns, networkPolicy), &networkingv1.NetworkPolicy{}) if obj == nil { return nil, err } - return obj.(*networking_v1.NetworkPolicy), err + return obj.(*networkingv1.NetworkPolicy), err } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(networkpoliciesResource, c.ns, name), &networking_v1.NetworkPolicy{}) + Invokes(testing.NewDeleteAction(networkpoliciesResource, c.ns, name), &networkingv1.NetworkPolicy{}) return err } @@ -110,17 +112,17 @@ func (c *FakeNetworkPolicies) Delete(name string, options *v1.DeleteOptions) err func (c *FakeNetworkPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(networkpoliciesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &networking_v1.NetworkPolicyList{}) + _, err := c.Fake.Invokes(action, &networkingv1.NetworkPolicyList{}) return err } // Patch applies the patch and returns the patched networkPolicy. -func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networking_v1.NetworkPolicy, err error) { +func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *networkingv1.NetworkPolicy, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, data, subresources...), &networking_v1.NetworkPolicy{}) + Invokes(testing.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, data, subresources...), &networkingv1.NetworkPolicy{}) if obj == nil { return nil, err } - return obj.(*networking_v1.NetworkPolicy), err + return obj.(*networkingv1.NetworkPolicy), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go index 6c72ca5c5..7d77495fa 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type NetworkPolicyExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go index d1059d02b..8684db456 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networking_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go index 8b1518234..d8f0a6b47 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go +++ b/deps/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/networking/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type NetworkPoliciesGetter interface { type NetworkPolicyInterface interface { Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error) Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.NetworkPolicy, error) - List(opts meta_v1.ListOptions) (*v1.NetworkPolicyList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.NetworkPolicy, error) + List(opts metav1.ListOptions) (*v1.NetworkPolicyList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) NetworkPolicyExpansion } @@ -59,7 +61,7 @@ func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicie } // Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. -func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result *v1.NetworkPolicy, err error) { +func (c *networkPolicies) Get(name string, options metav1.GetOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result * } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. -func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPolicyList, err error) { +func (c *networkPolicies) List(opts metav1.ListOptions) (result *v1.NetworkPolicyList, err error) { result = &v1.NetworkPolicyList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPoli } // Watch returns a watch.Interface that watches the requested networkPolicies. -func (c *networkPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *networkPolicies) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.Ne } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. -func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *networkPolicies) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). @@ -130,7 +132,7 @@ func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) er } // DeleteCollection deletes a collection of objects. -func (c *networkPolicies) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *networkPolicies) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/BUILD deleted file mode 100644 index 2abeb549d..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "eviction.go", - "eviction_expansion.go", - "generated_expansion.go", - "poddisruptionbudget.go", - "policy_client.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/policy/v1beta1", - deps = [ - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go index 63e3a6821..12e8e76ed 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/eviction.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/BUILD deleted file mode 100644 index 5fc7afdc9..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_eviction.go", - "fake_eviction_expansion.go", - "fake_poddisruptionbudget.go", - "fake_policy_client.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go index 657fd93d1..b8f6f3eae 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_eviction.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake // FakeEvictions implements EvictionInterface diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go index cc45f5243..3f2e78b31 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_poddisruptionbudget.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakePodDisruptionBudgets) List(opts v1.ListOptions) (result *v1beta1.Po if label == nil { label = labels.Everything() } - list := &v1beta1.PodDisruptionBudgetList{} + list := &v1beta1.PodDisruptionBudgetList{ListMeta: obj.(*v1beta1.PodDisruptionBudgetList).ListMeta} for _, item := range obj.(*v1beta1.PodDisruptionBudgetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go new file mode 100644 index 000000000..0df9aa15f --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_podsecuritypolicy.go @@ -0,0 +1,120 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/api/policy/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakePodSecurityPolicies implements PodSecurityPolicyInterface +type FakePodSecurityPolicies struct { + Fake *FakePolicyV1beta1 +} + +var podsecuritypoliciesResource = schema.GroupVersionResource{Group: "policy", Version: "v1beta1", Resource: "podsecuritypolicies"} + +var podsecuritypoliciesKind = schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodSecurityPolicy"} + +// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. +func (c *FakePodSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. +func (c *FakePodSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(podsecuritypoliciesResource, podsecuritypoliciesKind, opts), &v1beta1.PodSecurityPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.PodSecurityPolicyList{ListMeta: obj.(*v1beta1.PodSecurityPolicyList).ListMeta} + for _, item := range obj.(*v1beta1.PodSecurityPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested podSecurityPolicies. +func (c *FakePodSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(podsecuritypoliciesResource, opts)) +} + +// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} + +// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. +func (c *FakePodSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(podsecuritypoliciesResource, name), &v1beta1.PodSecurityPolicy{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePodSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.PodSecurityPolicyList{}) + return err +} + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *FakePodSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, data, subresources...), &v1beta1.PodSecurityPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PodSecurityPolicy), err +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go index f0f1c6a1f..9c780bf1f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake/fake_policy_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -34,6 +36,10 @@ func (c *FakePolicyV1beta1) PodDisruptionBudgets(namespace string) v1beta1.PodDi return &FakePodDisruptionBudgets{c, namespace} } +func (c *FakePolicyV1beta1) PodSecurityPolicies() v1beta1.PodSecurityPolicyInterface { + return &FakePodSecurityPolicies{c} +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakePolicyV1beta1) RESTClient() rest.Interface { diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go index a119239ca..078c16d5c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type PodDisruptionBudgetExpansion interface{} + +type PodSecurityPolicyExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go index 45d2c1766..a11f27eb2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go new file mode 100644 index 000000000..355be1e9c --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go @@ -0,0 +1,147 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/policy/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface. +// A group's client should implement this interface. +type PodSecurityPoliciesGetter interface { + PodSecurityPolicies() PodSecurityPolicyInterface +} + +// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources. +type PodSecurityPolicyInterface interface { + Create(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) + Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) + List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) + PodSecurityPolicyExpansion +} + +// podSecurityPolicies implements PodSecurityPolicyInterface +type podSecurityPolicies struct { + client rest.Interface +} + +// newPodSecurityPolicies returns a PodSecurityPolicies +func newPodSecurityPolicies(c *PolicyV1beta1Client) *podSecurityPolicies { + return &podSecurityPolicies{ + client: c.RESTClient(), + } +} + +// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any. +func (c *podSecurityPolicies) Get(name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) { + result = &v1beta1.PodSecurityPolicy{} + err = c.client.Get(). + Resource("podsecuritypolicies"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. +func (c *podSecurityPolicies) List(opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) { + result = &v1beta1.PodSecurityPolicyList{} + err = c.client.Get(). + Resource("podsecuritypolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested podSecurityPolicies. +func (c *podSecurityPolicies) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("podsecuritypolicies"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *podSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { + result = &v1beta1.PodSecurityPolicy{} + err = c.client.Post(). + Resource("podsecuritypolicies"). + Body(podSecurityPolicy). + Do(). + Into(result) + return +} + +// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any. +func (c *podSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) { + result = &v1beta1.PodSecurityPolicy{} + err = c.client.Put(). + Resource("podsecuritypolicies"). + Name(podSecurityPolicy.Name). + Body(podSecurityPolicy). + Do(). + Into(result) + return +} + +// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs. +func (c *podSecurityPolicies) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("podsecuritypolicies"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *podSecurityPolicies) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("podsecuritypolicies"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched podSecurityPolicy. +func (c *podSecurityPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) { + result = &v1beta1.PodSecurityPolicy{} + err = c.client.Patch(pt). + Resource("podsecuritypolicies"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go index f9020d0b7..020e185e6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( @@ -27,6 +29,7 @@ type PolicyV1beta1Interface interface { RESTClient() rest.Interface EvictionsGetter PodDisruptionBudgetsGetter + PodSecurityPoliciesGetter } // PolicyV1beta1Client is used to interact with features provided by the policy group. @@ -42,6 +45,10 @@ func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisrupti return newPodDisruptionBudgets(c, namespace) } +func (c *PolicyV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface { + return newPodSecurityPolicies(c) +} + // NewForConfig creates a new PolicyV1beta1Client for the given config. func NewForConfig(c *rest.Config) (*PolicyV1beta1Client, error) { config := *c diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/BUILD deleted file mode 100644 index 76e85d4fc..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "doc.go", - "generated_expansion.go", - "rbac_client.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/rbac/v1", - deps = [ - "//vendor/k8s.io/api/rbac/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go index ab27fdf42..c4299d4c6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type ClusterRolesGetter interface { type ClusterRoleInterface interface { Create(*v1.ClusterRole) (*v1.ClusterRole, error) Update(*v1.ClusterRole) (*v1.ClusterRole, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ClusterRole, error) - List(opts meta_v1.ListOptions) (*v1.ClusterRoleList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ClusterRole, error) + List(opts metav1.ListOptions) (*v1.ClusterRoleList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRole, err error) ClusterRoleExpansion } @@ -57,7 +59,7 @@ func newClusterRoles(c *RbacV1Client) *clusterRoles { } // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterRole, err error) { +func (c *clusterRoles) Get(name string, options metav1.GetOptions) (result *v1.ClusterRole, err error) { result = &v1.ClusterRole{} err = c.client.Get(). Resource("clusterroles"). @@ -69,7 +71,7 @@ func (c *clusterRoles) Get(name string, options meta_v1.GetOptions) (result *v1. } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *clusterRoles) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleList, err error) { +func (c *clusterRoles) List(opts metav1.ListOptions) (result *v1.ClusterRoleList, err error) { result = &v1.ClusterRoleList{} err = c.client.Get(). Resource("clusterroles"). @@ -80,7 +82,7 @@ func (c *clusterRoles) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleLis } // Watch returns a watch.Interface that watches the requested clusterRoles. -func (c *clusterRoles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoles) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Resource("clusterroles"). @@ -112,7 +114,7 @@ func (c *clusterRoles) Update(clusterRole *v1.ClusterRole) (result *v1.ClusterRo } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. -func (c *clusterRoles) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *clusterRoles) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Resource("clusterroles"). Name(name). @@ -122,7 +124,7 @@ func (c *clusterRoles) Delete(name string, options *meta_v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *clusterRoles) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *clusterRoles) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Resource("clusterroles"). VersionedParams(&listOptions, scheme.ParameterCodec). diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go index 9bd87e91a..30c0469a4 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type ClusterRoleBindingsGetter interface { type ClusterRoleBindingInterface interface { Create(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) Update(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.ClusterRoleBinding, error) - List(opts meta_v1.ListOptions) (*v1.ClusterRoleBindingList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ClusterRoleBinding, error) + List(opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterRoleBinding, err error) ClusterRoleBindingExpansion } @@ -57,7 +59,7 @@ func newClusterRoleBindings(c *RbacV1Client) *clusterRoleBindings { } // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (result *v1.ClusterRoleBinding, err error) { +func (c *clusterRoleBindings) Get(name string, options metav1.GetOptions) (result *v1.ClusterRoleBinding, err error) { result = &v1.ClusterRoleBinding{} err = c.client.Get(). Resource("clusterrolebindings"). @@ -69,7 +71,7 @@ func (c *clusterRoleBindings) Get(name string, options meta_v1.GetOptions) (resu } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *clusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1.ClusterRoleBindingList, err error) { +func (c *clusterRoleBindings) List(opts metav1.ListOptions) (result *v1.ClusterRoleBindingList, err error) { result = &v1.ClusterRoleBindingList{} err = c.client.Get(). Resource("clusterrolebindings"). @@ -80,7 +82,7 @@ func (c *clusterRoleBindings) List(opts meta_v1.ListOptions) (result *v1.Cluster } // Watch returns a watch.Interface that watches the requested clusterRoleBindings. -func (c *clusterRoleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *clusterRoleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Resource("clusterrolebindings"). @@ -112,7 +114,7 @@ func (c *clusterRoleBindings) Update(clusterRoleBinding *v1.ClusterRoleBinding) } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. -func (c *clusterRoleBindings) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *clusterRoleBindings) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). Name(name). @@ -122,7 +124,7 @@ func (c *clusterRoleBindings) Delete(name string, options *meta_v1.DeleteOptions } // DeleteCollection deletes a collection of objects. -func (c *clusterRoleBindings) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *clusterRoleBindings) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Resource("clusterrolebindings"). VersionedParams(&listOptions, scheme.ParameterCodec). diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/BUILD deleted file mode 100644 index 4e92a39ba..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_clusterrole.go", - "fake_clusterrolebinding.go", - "fake_rbac_client.go", - "fake_role.go", - "fake_rolebinding.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/rbac/v1/fake", - deps = [ - "//vendor/k8s.io/api/rbac/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go index 6ac4da0fc..d93ac8294 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - rbac_v1 "k8s.io/api/rbac/v1" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,19 +38,19 @@ var clusterrolesResource = schema.GroupVersionResource{Group: "rbac.authorizatio var clusterrolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRole"} // Get takes name of the clusterRole, and returns the corresponding clusterRole object, and an error if there is any. -func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbac_v1.ClusterRole, err error) { +func (c *FakeClusterRoles) Get(name string, options v1.GetOptions) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clusterrolesResource, name), &rbac_v1.ClusterRole{}) + Invokes(testing.NewRootGetAction(clusterrolesResource, name), &rbacv1.ClusterRole{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRole), err + return obj.(*rbacv1.ClusterRole), err } // List takes label and field selectors, and returns the list of ClusterRoles that match those selectors. -func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbac_v1.ClusterRoleList, err error) { +func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbacv1.ClusterRoleList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &rbac_v1.ClusterRoleList{}) + Invokes(testing.NewRootListAction(clusterrolesResource, clusterrolesKind, opts), &rbacv1.ClusterRoleList{}) if obj == nil { return nil, err } @@ -57,8 +59,8 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *rbac_v1.ClusterRol if label == nil { label = labels.Everything() } - list := &rbac_v1.ClusterRoleList{} - for _, item := range obj.(*rbac_v1.ClusterRoleList).Items { + list := &rbacv1.ClusterRoleList{ListMeta: obj.(*rbacv1.ClusterRoleList).ListMeta} + for _, item := range obj.(*rbacv1.ClusterRoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -73,29 +75,29 @@ func (c *FakeClusterRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a clusterRole and creates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Create(clusterRole *rbac_v1.ClusterRole) (result *rbac_v1.ClusterRole, err error) { +func (c *FakeClusterRoles) Create(clusterRole *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbac_v1.ClusterRole{}) + Invokes(testing.NewRootCreateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRole), err + return obj.(*rbacv1.ClusterRole), err } // Update takes the representation of a clusterRole and updates it. Returns the server's representation of the clusterRole, and an error, if there is any. -func (c *FakeClusterRoles) Update(clusterRole *rbac_v1.ClusterRole) (result *rbac_v1.ClusterRole, err error) { +func (c *FakeClusterRoles) Update(clusterRole *rbacv1.ClusterRole) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbac_v1.ClusterRole{}) + Invokes(testing.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbacv1.ClusterRole{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRole), err + return obj.(*rbacv1.ClusterRole), err } // Delete takes name of the clusterRole and deletes it. Returns an error if one occurs. func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &rbac_v1.ClusterRole{}) + Invokes(testing.NewRootDeleteAction(clusterrolesResource, name), &rbacv1.ClusterRole{}) return err } @@ -103,16 +105,16 @@ func (c *FakeClusterRoles) Delete(name string, options *v1.DeleteOptions) error func (c *FakeClusterRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(clusterrolesResource, listOptions) - _, err := c.Fake.Invokes(action, &rbac_v1.ClusterRoleList{}) + _, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleList{}) return err } // Patch applies the patch and returns the patched clusterRole. -func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.ClusterRole, err error) { +func (c *FakeClusterRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRole, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &rbac_v1.ClusterRole{}) + Invokes(testing.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &rbacv1.ClusterRole{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRole), err + return obj.(*rbacv1.ClusterRole), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go index a19b2b40c..a8b2b57ff 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - rbac_v1 "k8s.io/api/rbac/v1" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,19 +38,19 @@ var clusterrolebindingsResource = schema.GroupVersionResource{Group: "rbac.autho var clusterrolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBinding"} // Get takes name of the clusterRoleBinding, and returns the corresponding clusterRoleBinding object, and an error if there is any. -func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *rbac_v1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Get(name string, options v1.GetOptions) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &rbac_v1.ClusterRoleBinding{}) + Invokes(testing.NewRootGetAction(clusterrolebindingsResource, name), &rbacv1.ClusterRoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRoleBinding), err + return obj.(*rbacv1.ClusterRoleBinding), err } // List takes label and field selectors, and returns the list of ClusterRoleBindings that match those selectors. -func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.ClusterRoleBindingList, err error) { +func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbacv1.ClusterRoleBindingList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &rbac_v1.ClusterRoleBindingList{}) + Invokes(testing.NewRootListAction(clusterrolebindingsResource, clusterrolebindingsKind, opts), &rbacv1.ClusterRoleBindingList{}) if obj == nil { return nil, err } @@ -57,8 +59,8 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.Clu if label == nil { label = labels.Everything() } - list := &rbac_v1.ClusterRoleBindingList{} - for _, item := range obj.(*rbac_v1.ClusterRoleBindingList).Items { + list := &rbacv1.ClusterRoleBindingList{ListMeta: obj.(*rbacv1.ClusterRoleBindingList).ListMeta} + for _, item := range obj.(*rbacv1.ClusterRoleBindingList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -73,29 +75,29 @@ func (c *FakeClusterRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, e } // Create takes the representation of a clusterRoleBinding and creates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *rbac_v1.ClusterRoleBinding) (result *rbac_v1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbac_v1.ClusterRoleBinding{}) + Invokes(testing.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRoleBinding), err + return obj.(*rbacv1.ClusterRoleBinding), err } // Update takes the representation of a clusterRoleBinding and updates it. Returns the server's representation of the clusterRoleBinding, and an error, if there is any. -func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbac_v1.ClusterRoleBinding) (result *rbac_v1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *rbacv1.ClusterRoleBinding) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbac_v1.ClusterRoleBinding{}) + Invokes(testing.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &rbacv1.ClusterRoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRoleBinding), err + return obj.(*rbacv1.ClusterRoleBinding), err } // Delete takes name of the clusterRoleBinding and deletes it. Returns an error if one occurs. func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &rbac_v1.ClusterRoleBinding{}) + Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &rbacv1.ClusterRoleBinding{}) return err } @@ -103,16 +105,16 @@ func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) func (c *FakeClusterRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(clusterrolebindingsResource, listOptions) - _, err := c.Fake.Invokes(action, &rbac_v1.ClusterRoleBindingList{}) + _, err := c.Fake.Invokes(action, &rbacv1.ClusterRoleBindingList{}) return err } // Patch applies the patch and returns the patched clusterRoleBinding. -func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.ClusterRoleBinding, err error) { +func (c *FakeClusterRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.ClusterRoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &rbac_v1.ClusterRoleBinding{}) + Invokes(testing.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &rbacv1.ClusterRoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.ClusterRoleBinding), err + return obj.(*rbacv1.ClusterRoleBinding), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go index a27b6b8e1..426fd70d6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go index 12a9f0fe7..f048bbdfb 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - rbac_v1 "k8s.io/api/rbac/v1" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var rolesResource = schema.GroupVersionResource{Group: "rbac.authorization.k8s.i var rolesKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "Role"} // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbac_v1.Role, err error) { +func (c *FakeRoles) Get(name string, options v1.GetOptions) (result *rbacv1.Role, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(rolesResource, c.ns, name), &rbac_v1.Role{}) + Invokes(testing.NewGetAction(rolesResource, c.ns, name), &rbacv1.Role{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.Role), err + return obj.(*rbacv1.Role), err } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *FakeRoles) List(opts v1.ListOptions) (result *rbac_v1.RoleList, err error) { +func (c *FakeRoles) List(opts v1.ListOptions) (result *rbacv1.RoleList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &rbac_v1.RoleList{}) + Invokes(testing.NewListAction(rolesResource, rolesKind, c.ns, opts), &rbacv1.RoleList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *rbac_v1.RoleList, err err if label == nil { label = labels.Everything() } - list := &rbac_v1.RoleList{} - for _, item := range obj.(*rbac_v1.RoleList).Items { + list := &rbacv1.RoleList{ListMeta: obj.(*rbacv1.RoleList).ListMeta} + for _, item := range obj.(*rbacv1.RoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeRoles) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a role and creates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Create(role *rbac_v1.Role) (result *rbac_v1.Role, err error) { +func (c *FakeRoles) Create(role *rbacv1.Role) (result *rbacv1.Role, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbac_v1.Role{}) + Invokes(testing.NewCreateAction(rolesResource, c.ns, role), &rbacv1.Role{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.Role), err + return obj.(*rbacv1.Role), err } // Update takes the representation of a role and updates it. Returns the server's representation of the role, and an error, if there is any. -func (c *FakeRoles) Update(role *rbac_v1.Role) (result *rbac_v1.Role, err error) { +func (c *FakeRoles) Update(role *rbacv1.Role) (result *rbacv1.Role, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbac_v1.Role{}) + Invokes(testing.NewUpdateAction(rolesResource, c.ns, role), &rbacv1.Role{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.Role), err + return obj.(*rbacv1.Role), err } // Delete takes name of the role and deletes it. Returns an error if one occurs. func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &rbac_v1.Role{}) + Invokes(testing.NewDeleteAction(rolesResource, c.ns, name), &rbacv1.Role{}) return err } @@ -110,17 +112,17 @@ func (c *FakeRoles) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeRoles) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(rolesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &rbac_v1.RoleList{}) + _, err := c.Fake.Invokes(action, &rbacv1.RoleList{}) return err } // Patch applies the patch and returns the patched role. -func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.Role, err error) { +func (c *FakeRoles) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.Role, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &rbac_v1.Role{}) + Invokes(testing.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &rbacv1.Role{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.Role), err + return obj.(*rbacv1.Role), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go index e26ff9661..c71635fce 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/fake/fake_rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - rbac_v1 "k8s.io/api/rbac/v1" + rbacv1 "k8s.io/api/rbac/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -37,20 +39,20 @@ var rolebindingsResource = schema.GroupVersionResource{Group: "rbac.authorizatio var rolebindingsKind = schema.GroupVersionKind{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"} // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbac_v1.RoleBinding, err error) { +func (c *FakeRoleBindings) Get(name string, options v1.GetOptions) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &rbac_v1.RoleBinding{}) + Invokes(testing.NewGetAction(rolebindingsResource, c.ns, name), &rbacv1.RoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.RoleBinding), err + return obj.(*rbacv1.RoleBinding), err } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.RoleBindingList, err error) { +func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbacv1.RoleBindingList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &rbac_v1.RoleBindingList{}) + Invokes(testing.NewListAction(rolebindingsResource, rolebindingsKind, c.ns, opts), &rbacv1.RoleBindingList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *rbac_v1.RoleBindin if label == nil { label = labels.Everything() } - list := &rbac_v1.RoleBindingList{} - for _, item := range obj.(*rbac_v1.RoleBindingList).Items { + list := &rbacv1.RoleBindingList{ListMeta: obj.(*rbacv1.RoleBindingList).ListMeta} + for _, item := range obj.(*rbacv1.RoleBindingList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,31 +79,31 @@ func (c *FakeRoleBindings) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a roleBinding and creates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Create(roleBinding *rbac_v1.RoleBinding) (result *rbac_v1.RoleBinding, err error) { +func (c *FakeRoleBindings) Create(roleBinding *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbac_v1.RoleBinding{}) + Invokes(testing.NewCreateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.RoleBinding), err + return obj.(*rbacv1.RoleBinding), err } // Update takes the representation of a roleBinding and updates it. Returns the server's representation of the roleBinding, and an error, if there is any. -func (c *FakeRoleBindings) Update(roleBinding *rbac_v1.RoleBinding) (result *rbac_v1.RoleBinding, err error) { +func (c *FakeRoleBindings) Update(roleBinding *rbacv1.RoleBinding) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbac_v1.RoleBinding{}) + Invokes(testing.NewUpdateAction(rolebindingsResource, c.ns, roleBinding), &rbacv1.RoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.RoleBinding), err + return obj.(*rbacv1.RoleBinding), err } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &rbac_v1.RoleBinding{}) + Invokes(testing.NewDeleteAction(rolebindingsResource, c.ns, name), &rbacv1.RoleBinding{}) return err } @@ -110,17 +112,17 @@ func (c *FakeRoleBindings) Delete(name string, options *v1.DeleteOptions) error func (c *FakeRoleBindings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(rolebindingsResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &rbac_v1.RoleBindingList{}) + _, err := c.Fake.Invokes(action, &rbacv1.RoleBindingList{}) return err } // Patch applies the patch and returns the patched roleBinding. -func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbac_v1.RoleBinding, err error) { +func (c *FakeRoleBindings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *rbacv1.RoleBinding, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &rbac_v1.RoleBinding{}) + Invokes(testing.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &rbacv1.RoleBinding{}) if obj == nil { return nil, err } - return obj.(*rbac_v1.RoleBinding), err + return obj.(*rbacv1.RoleBinding), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go index 48b91811f..e3f1b02e3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type ClusterRoleExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go index 82eb8f1f1..e3855bb9b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go index 1dc65551f..81ea12a9f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type RolesGetter interface { type RoleInterface interface { Create(*v1.Role) (*v1.Role, error) Update(*v1.Role) (*v1.Role, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.Role, error) - List(opts meta_v1.ListOptions) (*v1.RoleList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.Role, error) + List(opts metav1.ListOptions) (*v1.RoleList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Role, err error) RoleExpansion } @@ -59,7 +61,7 @@ func newRoles(c *RbacV1Client, namespace string) *roles { } // Get takes name of the role, and returns the corresponding role object, and an error if there is any. -func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1.Role, err error) { +func (c *roles) Get(name string, options metav1.GetOptions) (result *v1.Role, err error) { result = &v1.Role{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *roles) Get(name string, options meta_v1.GetOptions) (result *v1.Role, e } // List takes label and field selectors, and returns the list of Roles that match those selectors. -func (c *roles) List(opts meta_v1.ListOptions) (result *v1.RoleList, err error) { +func (c *roles) List(opts metav1.ListOptions) (result *v1.RoleList, err error) { result = &v1.RoleList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *roles) List(opts meta_v1.ListOptions) (result *v1.RoleList, err error) } // Watch returns a watch.Interface that watches the requested roles. -func (c *roles) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *roles) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *roles) Update(role *v1.Role) (result *v1.Role, err error) { } // Delete takes name of the role and deletes it. Returns an error if one occurs. -func (c *roles) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *roles) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). @@ -130,7 +132,7 @@ func (c *roles) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *roles) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *roles) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("roles"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go index d1287da7b..17c6f9913 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/rbac/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type RoleBindingsGetter interface { type RoleBindingInterface interface { Create(*v1.RoleBinding) (*v1.RoleBinding, error) Update(*v1.RoleBinding) (*v1.RoleBinding, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.RoleBinding, error) - List(opts meta_v1.ListOptions) (*v1.RoleBindingList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.RoleBinding, error) + List(opts metav1.ListOptions) (*v1.RoleBindingList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.RoleBinding, err error) RoleBindingExpansion } @@ -59,7 +61,7 @@ func newRoleBindings(c *RbacV1Client, namespace string) *roleBindings { } // Get takes name of the roleBinding, and returns the corresponding roleBinding object, and an error if there is any. -func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1.RoleBinding, err error) { +func (c *roleBindings) Get(name string, options metav1.GetOptions) (result *v1.RoleBinding, err error) { result = &v1.RoleBinding{} err = c.client.Get(). Namespace(c.ns). @@ -72,7 +74,7 @@ func (c *roleBindings) Get(name string, options meta_v1.GetOptions) (result *v1. } // List takes label and field selectors, and returns the list of RoleBindings that match those selectors. -func (c *roleBindings) List(opts meta_v1.ListOptions) (result *v1.RoleBindingList, err error) { +func (c *roleBindings) List(opts metav1.ListOptions) (result *v1.RoleBindingList, err error) { result = &v1.RoleBindingList{} err = c.client.Get(). Namespace(c.ns). @@ -84,7 +86,7 @@ func (c *roleBindings) List(opts meta_v1.ListOptions) (result *v1.RoleBindingLis } // Watch returns a watch.Interface that watches the requested roleBindings. -func (c *roleBindings) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *roleBindings) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -119,7 +121,7 @@ func (c *roleBindings) Update(roleBinding *v1.RoleBinding) (result *v1.RoleBindi } // Delete takes name of the roleBinding and deletes it. Returns an error if one occurs. -func (c *roleBindings) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *roleBindings) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). @@ -130,7 +132,7 @@ func (c *roleBindings) Delete(name string, options *meta_v1.DeleteOptions) error } // DeleteCollection deletes a collection of objects. -func (c *roleBindings) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *roleBindings) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("rolebindings"). diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/BUILD deleted file mode 100644 index 11065cf6a..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "doc.go", - "generated_expansion.go", - "rbac_client.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1", - deps = [ - "//vendor/k8s.io/api/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go index 9eb8bc789..37a545762 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go index 6cf383b4f..605078906 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go index 08a9c7ceb..df51baa4d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/BUILD deleted file mode 100644 index 461fd09a0..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_clusterrole.go", - "fake_clusterrolebinding.go", - "fake_rbac_client.go", - "fake_role.go", - "fake_rolebinding.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake", - deps = [ - "//vendor/k8s.io/api/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go index 0b500c43e..13fbce4e7 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1alpha1.ClusterRo if label == nil { label = labels.Everything() } - list := &v1alpha1.ClusterRoleList{} + list := &v1alpha1.ClusterRoleList{ListMeta: obj.(*v1alpha1.ClusterRoleList).ListMeta} for _, item := range obj.(*v1alpha1.ClusterRoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go index 64fdd845f..5076543d9 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.Cl if label == nil { label = labels.Everything() } - list := &v1alpha1.ClusterRoleBindingList{} + list := &v1alpha1.ClusterRoleBindingList{ListMeta: obj.(*v1alpha1.ClusterRoleBindingList).ListMeta} for _, item := range obj.(*v1alpha1.ClusterRoleBindingList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go index 33de3d304..3447e9be8 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go index 51dd9ba6a..24d8efee3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *v1alpha1.RoleList, err er if label == nil { label = labels.Everything() } - list := &v1alpha1.RoleList{} + list := &v1alpha1.RoleList{ListMeta: obj.(*v1alpha1.RoleList).ListMeta} for _, item := range obj.(*v1alpha1.RoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go index 9b650eacf..cb01ef99d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake/fake_rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1alpha1.RoleBindi if label == nil { label = labels.Everything() } - list := &v1alpha1.RoleBindingList{} + list := &v1alpha1.RoleBindingList{ListMeta: obj.(*v1alpha1.RoleBindingList).ListMeta} for _, item := range obj.(*v1alpha1.RoleBindingList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go index 9b61a7506..b8b5c7869 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 type ClusterRoleExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go index 76ebf3166..de83531ed 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go index 0c7e49f0d..aa6954bb5 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go index 1bcfaf88e..0941b8e86 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/BUILD deleted file mode 100644 index e750f1e17..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "doc.go", - "generated_expansion.go", - "rbac_client.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/rbac/v1beta1", - deps = [ - "//vendor/k8s.io/api/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go index 89494ed13..bac951c87 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go index 1602f7fce..96c91de6e 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/BUILD deleted file mode 100644 index 0ab08b3e3..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_clusterrole.go", - "fake_clusterrolebinding.go", - "fake_rbac_client.go", - "fake_role.go", - "fake_rolebinding.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go index 0058c37e4..62a832197 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeClusterRoles) List(opts v1.ListOptions) (result *v1beta1.ClusterRol if label == nil { label = labels.Everything() } - list := &v1beta1.ClusterRoleList{} + list := &v1beta1.ClusterRoleList{ListMeta: obj.(*v1beta1.ClusterRoleList).ListMeta} for _, item := range obj.(*v1beta1.ClusterRoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go index fe8c26172..c9ab47269 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeClusterRoleBindings) List(opts v1.ListOptions) (result *v1beta1.Clu if label == nil { label = labels.Everything() } - list := &v1beta1.ClusterRoleBindingList{} + list := &v1beta1.ClusterRoleBindingList{ListMeta: obj.(*v1beta1.ClusterRoleBindingList).ListMeta} for _, item := range obj.(*v1beta1.ClusterRoleBindingList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go index 0f33d6c56..bdbc246b7 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go index 0167d5396..45b07a001 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeRoles) List(opts v1.ListOptions) (result *v1beta1.RoleList, err err if label == nil { label = labels.Everything() } - list := &v1beta1.RoleList{} + list := &v1beta1.RoleList{ListMeta: obj.(*v1beta1.RoleList).ListMeta} for _, item := range obj.(*v1beta1.RoleList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go index 476a69730..1efd40005 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake/fake_rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeRoleBindings) List(opts v1.ListOptions) (result *v1beta1.RoleBindin if label == nil { label = labels.Everything() } - list := &v1beta1.RoleBindingList{} + list := &v1beta1.RoleBindingList{ListMeta: obj.(*v1beta1.RoleBindingList).ListMeta} for _, item := range obj.(*v1beta1.RoleBindingList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go index 8820cfb46..e7be79f8d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type ClusterRoleExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go index 9d4259e43..46718d731 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rbac_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go index d3d500b5e..66f382c07 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go index 05da7329c..67d3d331b 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go +++ b/deps/k8s.io/client-go/kubernetes/typed/rbac/v1beta1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/BUILD deleted file mode 100644 index db9b36f32..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "priorityclass.go", - "scheduling_client.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1", - deps = [ - "//vendor/k8s.io/api/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go index 08a9c7ceb..df51baa4d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/BUILD deleted file mode 100644 index f5c9c6436..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_priorityclass.go", - "fake_scheduling_client.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake", - deps = [ - "//vendor/k8s.io/api/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go index fdf18546a..8ab4421a9 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_priorityclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *v1alpha1.Priori if label == nil { label = labels.Everything() } - list := &v1alpha1.PriorityClassList{} + list := &v1alpha1.PriorityClassList{ListMeta: obj.(*v1alpha1.PriorityClassList).ListMeta} for _, item := range obj.(*v1alpha1.PriorityClassList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go index e3a5c47b6..974ba193f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/fake/fake_scheduling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go index 832addf07..52f81d881 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 type PriorityClassExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go index 0422dc96a..6845d25c3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/priorityclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go index a36c44928..375f41b8d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1/scheduling_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/doc.go new file mode 100644 index 000000000..771101956 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go new file mode 100644 index 000000000..16f443990 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go new file mode 100644 index 000000000..e234fec66 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_priorityclass.go @@ -0,0 +1,120 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/api/scheduling/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakePriorityClasses implements PriorityClassInterface +type FakePriorityClasses struct { + Fake *FakeSchedulingV1beta1 +} + +var priorityclassesResource = schema.GroupVersionResource{Group: "scheduling.k8s.io", Version: "v1beta1", Resource: "priorityclasses"} + +var priorityclassesKind = schema.GroupVersionKind{Group: "scheduling.k8s.io", Version: "v1beta1", Kind: "PriorityClass"} + +// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. +func (c *FakePriorityClasses) Get(name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(priorityclassesResource, name), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} + +// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *FakePriorityClasses) List(opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(priorityclassesResource, priorityclassesKind, opts), &v1beta1.PriorityClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1beta1.PriorityClassList{ListMeta: obj.(*v1beta1.PriorityClassList).ListMeta} + for _, item := range obj.(*v1beta1.PriorityClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested priorityClasses. +func (c *FakePriorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(priorityclassesResource, opts)) +} + +// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Create(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} + +// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *FakePriorityClasses) Update(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(priorityclassesResource, priorityClass), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} + +// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. +func (c *FakePriorityClasses) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(priorityclassesResource, name), &v1beta1.PriorityClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakePriorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(priorityclassesResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.PriorityClassList{}) + return err +} + +// Patch applies the patch and returns the patched priorityClass. +func (c *FakePriorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(priorityclassesResource, name, data, subresources...), &v1beta1.PriorityClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.PriorityClass), err +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go new file mode 100644 index 000000000..4a6878a45 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/fake/fake_scheduling_client.go @@ -0,0 +1,40 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeSchedulingV1beta1 struct { + *testing.Fake +} + +func (c *FakeSchedulingV1beta1) PriorityClasses() v1beta1.PriorityClassInterface { + return &FakePriorityClasses{c} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSchedulingV1beta1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/generated_expansion.go new file mode 100644 index 000000000..3bab873e6 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/generated_expansion.go @@ -0,0 +1,21 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +type PriorityClassExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go new file mode 100644 index 000000000..57b9766e4 --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/priorityclass.go @@ -0,0 +1,147 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/scheduling/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + scheme "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +// PriorityClassesGetter has a method to return a PriorityClassInterface. +// A group's client should implement this interface. +type PriorityClassesGetter interface { + PriorityClasses() PriorityClassInterface +} + +// PriorityClassInterface has methods to work with PriorityClass resources. +type PriorityClassInterface interface { + Create(*v1beta1.PriorityClass) (*v1beta1.PriorityClass, error) + Update(*v1beta1.PriorityClass) (*v1beta1.PriorityClass, error) + Delete(name string, options *v1.DeleteOptions) error + DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error + Get(name string, options v1.GetOptions) (*v1beta1.PriorityClass, error) + List(opts v1.ListOptions) (*v1beta1.PriorityClassList, error) + Watch(opts v1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) + PriorityClassExpansion +} + +// priorityClasses implements PriorityClassInterface +type priorityClasses struct { + client rest.Interface +} + +// newPriorityClasses returns a PriorityClasses +func newPriorityClasses(c *SchedulingV1beta1Client) *priorityClasses { + return &priorityClasses{ + client: c.RESTClient(), + } +} + +// Get takes name of the priorityClass, and returns the corresponding priorityClass object, and an error if there is any. +func (c *priorityClasses) Get(name string, options v1.GetOptions) (result *v1beta1.PriorityClass, err error) { + result = &v1beta1.PriorityClass{} + err = c.client.Get(). + Resource("priorityclasses"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of PriorityClasses that match those selectors. +func (c *priorityClasses) List(opts v1.ListOptions) (result *v1beta1.PriorityClassList, err error) { + result = &v1beta1.PriorityClassList{} + err = c.client.Get(). + Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested priorityClasses. +func (c *priorityClasses) Watch(opts v1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("priorityclasses"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a priorityClass and creates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *priorityClasses) Create(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { + result = &v1beta1.PriorityClass{} + err = c.client.Post(). + Resource("priorityclasses"). + Body(priorityClass). + Do(). + Into(result) + return +} + +// Update takes the representation of a priorityClass and updates it. Returns the server's representation of the priorityClass, and an error, if there is any. +func (c *priorityClasses) Update(priorityClass *v1beta1.PriorityClass) (result *v1beta1.PriorityClass, err error) { + result = &v1beta1.PriorityClass{} + err = c.client.Put(). + Resource("priorityclasses"). + Name(priorityClass.Name). + Body(priorityClass). + Do(). + Into(result) + return +} + +// Delete takes name of the priorityClass and deletes it. Returns an error if one occurs. +func (c *priorityClasses) Delete(name string, options *v1.DeleteOptions) error { + return c.client.Delete(). + Resource("priorityclasses"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *priorityClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + return c.client.Delete(). + Resource("priorityclasses"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched priorityClass. +func (c *priorityClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.PriorityClass, err error) { + result = &v1beta1.PriorityClass{} + err = c.client.Patch(pt). + Resource("priorityclasses"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go new file mode 100644 index 000000000..6feec4aec --- /dev/null +++ b/deps/k8s.io/client-go/kubernetes/typed/scheduling/v1beta1/scheduling_client.go @@ -0,0 +1,90 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/scheduling/v1beta1" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/client-go/kubernetes/scheme" + rest "k8s.io/client-go/rest" +) + +type SchedulingV1beta1Interface interface { + RESTClient() rest.Interface + PriorityClassesGetter +} + +// SchedulingV1beta1Client is used to interact with features provided by the scheduling.k8s.io group. +type SchedulingV1beta1Client struct { + restClient rest.Interface +} + +func (c *SchedulingV1beta1Client) PriorityClasses() PriorityClassInterface { + return newPriorityClasses(c) +} + +// NewForConfig creates a new SchedulingV1beta1Client for the given config. +func NewForConfig(c *rest.Config) (*SchedulingV1beta1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &SchedulingV1beta1Client{client}, nil +} + +// NewForConfigOrDie creates a new SchedulingV1beta1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SchedulingV1beta1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SchedulingV1beta1Client for the given RESTClient. +func New(c rest.Interface) *SchedulingV1beta1Client { + return &SchedulingV1beta1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1beta1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs} + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *SchedulingV1beta1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/BUILD deleted file mode 100644 index a1abc87e3..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "podpreset.go", - "settings_client.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/settings/v1alpha1", - deps = [ - "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go index 08a9c7ceb..df51baa4d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/BUILD deleted file mode 100644 index f8823f465..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_podpreset.go", - "fake_settings_client.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake", - deps = [ - "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go index 56f52b0e6..90eaccec5 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_podpreset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakePodPresets) List(opts v1.ListOptions) (result *v1alpha1.PodPresetLi if label == nil { label = labels.Everything() } - list := &v1alpha1.PodPresetList{} + list := &v1alpha1.PodPresetList{ListMeta: obj.(*v1alpha1.PodPresetList).ListMeta} for _, item := range obj.(*v1alpha1.PodPresetList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go index dc926bb7e..a142edfed 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/fake/fake_settings_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go index dc95d90d1..23d9f94d5 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 type PodPresetExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go index 38434cfa5..f000ae486 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go +++ b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/podpreset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go index 153069dbd..c2a03b960 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/settings/v1alpha1/settings_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/BUILD deleted file mode 100644 index 0c5507141..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "storage_client.go", - "storageclass.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/storage/v1", - deps = [ - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/BUILD deleted file mode 100644 index be83e85f8..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_storage_client.go", - "fake_storageclass.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/storage/v1/fake", - deps = [ - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go index 5d7cf3eda..fc6f98cf6 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storage_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go index 9e9effb23..37488a2d7 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/fake/fake_storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( - storage_v1 "k8s.io/api/storage/v1" + storagev1 "k8s.io/api/storage/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -36,19 +38,19 @@ var storageclassesResource = schema.GroupVersionResource{Group: "storage.k8s.io" var storageclassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1", Kind: "StorageClass"} // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *storage_v1.StorageClass, err error) { +func (c *FakeStorageClasses) Get(name string, options v1.GetOptions) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootGetAction(storageclassesResource, name), &storage_v1.StorageClass{}) + Invokes(testing.NewRootGetAction(storageclassesResource, name), &storagev1.StorageClass{}) if obj == nil { return nil, err } - return obj.(*storage_v1.StorageClass), err + return obj.(*storagev1.StorageClass), err } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storage_v1.StorageClassList, err error) { +func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storagev1.StorageClassList, err error) { obj, err := c.Fake. - Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &storage_v1.StorageClassList{}) + Invokes(testing.NewRootListAction(storageclassesResource, storageclassesKind, opts), &storagev1.StorageClassList{}) if obj == nil { return nil, err } @@ -57,8 +59,8 @@ func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *storage_v1.Stora if label == nil { label = labels.Everything() } - list := &storage_v1.StorageClassList{} - for _, item := range obj.(*storage_v1.StorageClassList).Items { + list := &storagev1.StorageClassList{ListMeta: obj.(*storagev1.StorageClassList).ListMeta} + for _, item := range obj.(*storagev1.StorageClassList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -73,29 +75,29 @@ func (c *FakeStorageClasses) Watch(opts v1.ListOptions) (watch.Interface, error) } // Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Create(storageClass *storage_v1.StorageClass) (result *storage_v1.StorageClass, err error) { +func (c *FakeStorageClasses) Create(storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storage_v1.StorageClass{}) + Invokes(testing.NewRootCreateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) if obj == nil { return nil, err } - return obj.(*storage_v1.StorageClass), err + return obj.(*storagev1.StorageClass), err } // Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. -func (c *FakeStorageClasses) Update(storageClass *storage_v1.StorageClass) (result *storage_v1.StorageClass, err error) { +func (c *FakeStorageClasses) Update(storageClass *storagev1.StorageClass) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storage_v1.StorageClass{}) + Invokes(testing.NewRootUpdateAction(storageclassesResource, storageClass), &storagev1.StorageClass{}) if obj == nil { return nil, err } - return obj.(*storage_v1.StorageClass), err + return obj.(*storagev1.StorageClass), err } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &storage_v1.StorageClass{}) + Invokes(testing.NewRootDeleteAction(storageclassesResource, name), &storagev1.StorageClass{}) return err } @@ -103,16 +105,16 @@ func (c *FakeStorageClasses) Delete(name string, options *v1.DeleteOptions) erro func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions) - _, err := c.Fake.Invokes(action, &storage_v1.StorageClassList{}) + _, err := c.Fake.Invokes(action, &storagev1.StorageClassList{}) return err } // Patch applies the patch and returns the patched storageClass. -func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storage_v1.StorageClass, err error) { +func (c *FakeStorageClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *storagev1.StorageClass, err error) { obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &storage_v1.StorageClass{}) + Invokes(testing.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &storagev1.StorageClass{}) if obj == nil { return nil, err } - return obj.(*storage_v1.StorageClass), err + return obj.(*storagev1.StorageClass), err } diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go index c378b8b21..2bea7ec7f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type StorageClassExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go index b010a58c9..ac48f4916 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storage_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go index 6d9da9b42..0f7f57f05 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1/storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( v1 "k8s.io/api/storage/v1" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" @@ -35,11 +37,11 @@ type StorageClassesGetter interface { type StorageClassInterface interface { Create(*v1.StorageClass) (*v1.StorageClass, error) Update(*v1.StorageClass) (*v1.StorageClass, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.StorageClass, error) - List(opts meta_v1.ListOptions) (*v1.StorageClassList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.StorageClass, error) + List(opts metav1.ListOptions) (*v1.StorageClassList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.StorageClass, err error) StorageClassExpansion } @@ -57,7 +59,7 @@ func newStorageClasses(c *StorageV1Client) *storageClasses { } // Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. -func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v1.StorageClass, err error) { +func (c *storageClasses) Get(name string, options metav1.GetOptions) (result *v1.StorageClass, err error) { result = &v1.StorageClass{} err = c.client.Get(). Resource("storageclasses"). @@ -69,7 +71,7 @@ func (c *storageClasses) Get(name string, options meta_v1.GetOptions) (result *v } // List takes label and field selectors, and returns the list of StorageClasses that match those selectors. -func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClassList, err error) { +func (c *storageClasses) List(opts metav1.ListOptions) (result *v1.StorageClassList, err error) { result = &v1.StorageClassList{} err = c.client.Get(). Resource("storageclasses"). @@ -80,7 +82,7 @@ func (c *storageClasses) List(opts meta_v1.ListOptions) (result *v1.StorageClass } // Watch returns a watch.Interface that watches the requested storageClasses. -func (c *storageClasses) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *storageClasses) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Resource("storageclasses"). @@ -112,7 +114,7 @@ func (c *storageClasses) Update(storageClass *v1.StorageClass) (result *v1.Stora } // Delete takes name of the storageClass and deletes it. Returns an error if one occurs. -func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *storageClasses) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Resource("storageclasses"). Name(name). @@ -122,7 +124,7 @@ func (c *storageClasses) Delete(name string, options *meta_v1.DeleteOptions) err } // DeleteCollection deletes a collection of objects. -func (c *storageClasses) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *storageClasses) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Resource("storageclasses"). VersionedParams(&listOptions, scheme.ParameterCodec). diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD deleted file mode 100644 index 155421963..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "storage_client.go", - "volumeattachment.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/storage/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go index 08a9c7ceb..df51baa4d 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD deleted file mode 100644 index a509ba7fc..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_storage_client.go", - "fake_volumeattachment.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go index 558b6fab5..1a4d9f56f 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_storage_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go index daa75e5a7..af04b681c 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/fake/fake_volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *v1alpha1.Volu if label == nil { label = labels.Everything() } - list := &v1alpha1.VolumeAttachmentList{} + list := &v1alpha1.VolumeAttachmentList{ListMeta: obj.(*v1alpha1.VolumeAttachmentList).ListMeta} for _, item := range obj.(*v1alpha1.VolumeAttachmentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go index f50925a43..cdb7ab2f8 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 type VolumeAttachmentExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go index a8d65f8fc..c52f630ac 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go index fd0c3d4bf..e6af00185 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1alpha1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/BUILD b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/BUILD deleted file mode 100644 index 79d13929c..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "generated_expansion.go", - "storage_client.go", - "storageclass.go", - "volumeattachment.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/storage/v1beta1", - deps = [ - "//vendor/k8s.io/api/storage/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go index 35b3db3f3..771101956 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1beta1 diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/BUILD b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/BUILD deleted file mode 100644 index 743008884..000000000 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "fake_storage_client.go", - "fake_storageclass.go", - "fake_volumeattachment.go", - ], - importpath = "k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake", - deps = [ - "//vendor/k8s.io/api/storage/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/storage/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go index 1c136b422..e0e3f1d78 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storage_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go index 1c8016830..cbfbab1a3 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeStorageClasses) List(opts v1.ListOptions) (result *v1beta1.StorageC if label == nil { label = labels.Everything() } - list := &v1beta1.StorageClassList{} + list := &v1beta1.StorageClassList{ListMeta: obj.(*v1beta1.StorageClassList).ListMeta} for _, item := range obj.(*v1beta1.StorageClassList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go index d0a580e58..04c0c463a 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -57,7 +59,7 @@ func (c *FakeVolumeAttachments) List(opts v1.ListOptions) (result *v1beta1.Volum if label == nil { label = labels.Everything() } - list := &v1beta1.VolumeAttachmentList{} + list := &v1beta1.VolumeAttachmentList{ListMeta: obj.(*v1beta1.VolumeAttachmentList).ListMeta} for _, item := range obj.(*v1beta1.VolumeAttachmentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go index 4b104064d..559f88f67 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 type StorageClassExpansion interface{} diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go index ad6e5fb34..4bdebb878 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storage_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go index bf18a6c87..fbe1fd4c2 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go index 6b3703970..5cd2d3919 100644 --- a/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go +++ b/deps/k8s.io/client-go/kubernetes/typed/storage/v1beta1/volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1beta1 import ( diff --git a/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD b/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD deleted file mode 100644 index df0364232..000000000 --- a/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "initializerconfiguration.go", - ], - importpath = "k8s.io/client-go/listers/admissionregistration/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go b/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go index 827c06371..2c9f9f6a6 100644 --- a/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go b/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go index 4fa845728..dbd7301fc 100644 --- a/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go +++ b/deps/k8s.io/client-go/listers/admissionregistration/v1alpha1/initializerconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/BUILD b/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/BUILD deleted file mode 100644 index d5128618f..000000000 --- a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "mutatingwebhookconfiguration.go", - "validatingwebhookconfiguration.go", - ], - importpath = "k8s.io/client-go/listers/admissionregistration/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go index 42d7e50ad..8960abc4f 100644 --- a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go b/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go index 2bb3bccb8..b38732c36 100644 --- a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/mutatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go b/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go index 910e4f48e..b89c9bbe2 100644 --- a/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go +++ b/deps/k8s.io/client-go/listers/admissionregistration/v1beta1/validatingwebhookconfiguration.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/apps/v1/BUILD b/deps/k8s.io/client-go/listers/apps/v1/BUILD deleted file mode 100644 index fb3cfbbb6..000000000 --- a/deps/k8s.io/client-go/listers/apps/v1/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "controllerrevision.go", - "daemonset.go", - "daemonset_expansion.go", - "deployment.go", - "deployment_expansion.go", - "expansion_generated.go", - "replicaset.go", - "replicaset_expansion.go", - "statefulset.go", - "statefulset_expansion.go", - ], - importpath = "k8s.io/client-go/listers/apps/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/listers/apps/v1/controllerrevision.go b/deps/k8s.io/client-go/listers/apps/v1/controllerrevision.go index ce53507f0..9029805a3 100644 --- a/deps/k8s.io/client-go/listers/apps/v1/controllerrevision.go +++ b/deps/k8s.io/client-go/listers/apps/v1/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/apps/v1/daemonset.go b/deps/k8s.io/client-go/listers/apps/v1/daemonset.go index 527cab1c9..b022ecc4a 100644 --- a/deps/k8s.io/client-go/listers/apps/v1/daemonset.go +++ b/deps/k8s.io/client-go/listers/apps/v1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/apps/v1/deployment.go b/deps/k8s.io/client-go/listers/apps/v1/deployment.go index 85c566861..d1be7156e 100644 --- a/deps/k8s.io/client-go/listers/apps/v1/deployment.go +++ b/deps/k8s.io/client-go/listers/apps/v1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/apps/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/apps/v1/expansion_generated.go index 447c08796..7f5815f79 100644 --- a/deps/k8s.io/client-go/listers/apps/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/apps/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/apps/v1/replicaset.go b/deps/k8s.io/client-go/listers/apps/v1/replicaset.go index d68f15ce4..d487ef656 100644 --- a/deps/k8s.io/client-go/listers/apps/v1/replicaset.go +++ b/deps/k8s.io/client-go/listers/apps/v1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/apps/v1/statefulset.go b/deps/k8s.io/client-go/listers/apps/v1/statefulset.go index b4bdff2e9..cc0031858 100644 --- a/deps/k8s.io/client-go/listers/apps/v1/statefulset.go +++ b/deps/k8s.io/client-go/listers/apps/v1/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta1/BUILD b/deps/k8s.io/client-go/listers/apps/v1beta1/BUILD deleted file mode 100644 index f6ddce530..000000000 --- a/deps/k8s.io/client-go/listers/apps/v1beta1/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "controllerrevision.go", - "deployment.go", - "expansion_generated.go", - "scale.go", - "statefulset.go", - "statefulset_expansion.go", - ], - importpath = "k8s.io/client-go/listers/apps/v1beta1", - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go b/deps/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go index c0db171c0..d84a865b3 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta1/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta1/deployment.go b/deps/k8s.io/client-go/listers/apps/v1beta1/deployment.go index fb1796bad..048558f2a 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta1/deployment.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go index 338fcd633..8f8d08434 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta1/scale.go b/deps/k8s.io/client-go/listers/apps/v1beta1/scale.go index a0e7086e1..ef8a2630e 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta1/scale.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta1/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta1/statefulset.go b/deps/k8s.io/client-go/listers/apps/v1beta1/statefulset.go index 2fc4042b4..277beb3e4 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta1/statefulset.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta1/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/BUILD b/deps/k8s.io/client-go/listers/apps/v1beta2/BUILD deleted file mode 100644 index 50aefcab1..000000000 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "controllerrevision.go", - "daemonset.go", - "daemonset_expansion.go", - "deployment.go", - "deployment_expansion.go", - "expansion_generated.go", - "replicaset.go", - "replicaset_expansion.go", - "scale.go", - "statefulset.go", - "statefulset_expansion.go", - ], - importpath = "k8s.io/client-go/listers/apps/v1beta2", - deps = [ - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go b/deps/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go index 02ad95d6c..904b59b24 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta2/controllerrevision.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/daemonset.go b/deps/k8s.io/client-go/listers/apps/v1beta2/daemonset.go index c05957b4c..8a40d2c86 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/daemonset.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta2/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/deployment.go b/deps/k8s.io/client-go/listers/apps/v1beta2/deployment.go index 7184a7468..32beaf25c 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/deployment.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta2/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go b/deps/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go index 846f1f621..d468f38e7 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta2/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/replicaset.go b/deps/k8s.io/client-go/listers/apps/v1beta2/replicaset.go index 8cdf0dccd..18c2136a2 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/replicaset.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta2/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/scale.go b/deps/k8s.io/client-go/listers/apps/v1beta2/scale.go index 27e76c366..d89329864 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/scale.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta2/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/listers/apps/v1beta2/statefulset.go b/deps/k8s.io/client-go/listers/apps/v1beta2/statefulset.go index fd0510435..544bff458 100644 --- a/deps/k8s.io/client-go/listers/apps/v1beta2/statefulset.go +++ b/deps/k8s.io/client-go/listers/apps/v1beta2/statefulset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta2 diff --git a/deps/k8s.io/client-go/listers/authentication/v1/BUILD b/deps/k8s.io/client-go/listers/authentication/v1/BUILD deleted file mode 100644 index 18c90f1d3..000000000 --- a/deps/k8s.io/client-go/listers/authentication/v1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "tokenreview.go", - ], - importpath = "k8s.io/client-go/listers/authentication/v1", - deps = [ - "//vendor/k8s.io/api/authentication/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/authentication/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/authentication/v1/expansion_generated.go index ae7db9abc..a8d097f40 100644 --- a/deps/k8s.io/client-go/listers/authentication/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/authentication/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/authentication/v1/tokenreview.go b/deps/k8s.io/client-go/listers/authentication/v1/tokenreview.go index aa0607205..5bb907c0c 100644 --- a/deps/k8s.io/client-go/listers/authentication/v1/tokenreview.go +++ b/deps/k8s.io/client-go/listers/authentication/v1/tokenreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/authentication/v1beta1/BUILD b/deps/k8s.io/client-go/listers/authentication/v1beta1/BUILD deleted file mode 100644 index 45a7b02eb..000000000 --- a/deps/k8s.io/client-go/listers/authentication/v1beta1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "tokenreview.go", - ], - importpath = "k8s.io/client-go/listers/authentication/v1beta1", - deps = [ - "//vendor/k8s.io/api/authentication/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go index 525e8b91e..82192059d 100644 --- a/deps/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/authentication/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go b/deps/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go index b377215b7..148bcae78 100644 --- a/deps/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go +++ b/deps/k8s.io/client-go/listers/authentication/v1beta1/tokenreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1/BUILD b/deps/k8s.io/client-go/listers/authorization/v1/BUILD deleted file mode 100644 index dbea6dcc2..000000000 --- a/deps/k8s.io/client-go/listers/authorization/v1/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "localsubjectaccessreview.go", - "selfsubjectaccessreview.go", - "selfsubjectrulesreview.go", - "subjectaccessreview.go", - ], - importpath = "k8s.io/client-go/listers/authorization/v1", - deps = [ - "//vendor/k8s.io/api/authorization/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/authorization/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/authorization/v1/expansion_generated.go index e0fa02081..af91939fb 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/authorization/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go b/deps/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go index 6ef9963a0..e064c94c1 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1/localsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go b/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go index 29481b71c..f89bc1dde 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go b/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go index 42b54197b..c65b5f84d 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1/selfsubjectrulesreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go b/deps/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go index 1ebffcd65..0d6c29b39 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1/subjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1beta1/BUILD b/deps/k8s.io/client-go/listers/authorization/v1beta1/BUILD deleted file mode 100644 index 665642706..000000000 --- a/deps/k8s.io/client-go/listers/authorization/v1beta1/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "localsubjectaccessreview.go", - "selfsubjectaccessreview.go", - "selfsubjectrulesreview.go", - "subjectaccessreview.go", - ], - importpath = "k8s.io/client-go/listers/authorization/v1beta1", - deps = [ - "//vendor/k8s.io/api/authorization/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go index 57c5ce757..24b06185e 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/authorization/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go b/deps/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go index 984c505fe..4eb8158a3 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1beta1/localsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go b/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go index cbbcc0552..4736ccdd5 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go b/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go index ea885a6ec..4e47abc3a 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1beta1/selfsubjectrulesreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go b/deps/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go index 21dec7cd2..5782b4f23 100644 --- a/deps/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go +++ b/deps/k8s.io/client-go/listers/authorization/v1beta1/subjectaccessreview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/autoscaling/v1/BUILD b/deps/k8s.io/client-go/listers/autoscaling/v1/BUILD deleted file mode 100644 index 8c5bfd95d..000000000 --- a/deps/k8s.io/client-go/listers/autoscaling/v1/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "horizontalpodautoscaler.go", - ], - importpath = "k8s.io/client-go/listers/autoscaling/v1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go index 831f9adff..05253c770 100644 --- a/deps/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/autoscaling/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go b/deps/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go index d9a840385..6d563ca98 100644 --- a/deps/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/listers/autoscaling/v1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/autoscaling/v2beta1/BUILD b/deps/k8s.io/client-go/listers/autoscaling/v2beta1/BUILD deleted file mode 100644 index 78aca5847..000000000 --- a/deps/k8s.io/client-go/listers/autoscaling/v2beta1/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "horizontalpodautoscaler.go", - ], - importpath = "k8s.io/client-go/listers/autoscaling/v2beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v2beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go index dc3da8a0e..8d46a4b6e 100644 --- a/deps/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/autoscaling/v2beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v2beta1 diff --git a/deps/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go b/deps/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go index b1b593931..08d13803b 100644 --- a/deps/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go +++ b/deps/k8s.io/client-go/listers/autoscaling/v2beta1/horizontalpodautoscaler.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v2beta1 diff --git a/deps/k8s.io/client-go/listers/batch/v1/BUILD b/deps/k8s.io/client-go/listers/batch/v1/BUILD deleted file mode 100644 index c695b9856..000000000 --- a/deps/k8s.io/client-go/listers/batch/v1/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "job.go", - "job_expansion.go", - ], - importpath = "k8s.io/client-go/listers/batch/v1", - deps = [ - "//vendor/k8s.io/api/batch/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/batch/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/batch/v1/expansion_generated.go index 6abde7f89..c43caf240 100644 --- a/deps/k8s.io/client-go/listers/batch/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/batch/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/batch/v1/job.go b/deps/k8s.io/client-go/listers/batch/v1/job.go index 948d53a73..909b6f88f 100644 --- a/deps/k8s.io/client-go/listers/batch/v1/job.go +++ b/deps/k8s.io/client-go/listers/batch/v1/job.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/batch/v1beta1/BUILD b/deps/k8s.io/client-go/listers/batch/v1beta1/BUILD deleted file mode 100644 index 0ae1a2eda..000000000 --- a/deps/k8s.io/client-go/listers/batch/v1beta1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "cronjob.go", - "expansion_generated.go", - ], - importpath = "k8s.io/client-go/listers/batch/v1beta1", - deps = [ - "//vendor/k8s.io/api/batch/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/batch/v1beta1/cronjob.go b/deps/k8s.io/client-go/listers/batch/v1beta1/cronjob.go index 10c3c3839..521378ebf 100644 --- a/deps/k8s.io/client-go/listers/batch/v1beta1/cronjob.go +++ b/deps/k8s.io/client-go/listers/batch/v1beta1/cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go index debf39dcd..be2742ef6 100644 --- a/deps/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/batch/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/batch/v2alpha1/BUILD b/deps/k8s.io/client-go/listers/batch/v2alpha1/BUILD deleted file mode 100644 index 92220512e..000000000 --- a/deps/k8s.io/client-go/listers/batch/v2alpha1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "cronjob.go", - "expansion_generated.go", - ], - importpath = "k8s.io/client-go/listers/batch/v2alpha1", - deps = [ - "//vendor/k8s.io/api/batch/v2alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go b/deps/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go index fe144014a..2623f1959 100644 --- a/deps/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go +++ b/deps/k8s.io/client-go/listers/batch/v2alpha1/cronjob.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v2alpha1 diff --git a/deps/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go b/deps/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go index f630c1a7c..a30c7a619 100644 --- a/deps/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/batch/v2alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v2alpha1 diff --git a/deps/k8s.io/client-go/listers/certificates/v1beta1/BUILD b/deps/k8s.io/client-go/listers/certificates/v1beta1/BUILD deleted file mode 100644 index b7ca4270c..000000000 --- a/deps/k8s.io/client-go/listers/certificates/v1beta1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "certificatesigningrequest.go", - "expansion_generated.go", - ], - importpath = "k8s.io/client-go/listers/certificates/v1beta1", - deps = [ - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go b/deps/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go index 08550be05..47c282984 100644 --- a/deps/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go +++ b/deps/k8s.io/client-go/listers/certificates/v1beta1/certificatesigningrequest.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go index 5c241556b..68f993cd6 100644 --- a/deps/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/certificates/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/coordination/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/coordination/v1beta1/expansion_generated.go new file mode 100644 index 000000000..dddc53107 --- /dev/null +++ b/deps/k8s.io/client-go/listers/coordination/v1beta1/expansion_generated.go @@ -0,0 +1,27 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +// LeaseListerExpansion allows custom methods to be added to +// LeaseLister. +type LeaseListerExpansion interface{} + +// LeaseNamespaceListerExpansion allows custom methods to be added to +// LeaseNamespaceLister. +type LeaseNamespaceListerExpansion interface{} diff --git a/deps/k8s.io/client-go/listers/coordination/v1beta1/lease.go b/deps/k8s.io/client-go/listers/coordination/v1beta1/lease.go new file mode 100644 index 000000000..0027444dc --- /dev/null +++ b/deps/k8s.io/client-go/listers/coordination/v1beta1/lease.go @@ -0,0 +1,94 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/coordination/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// LeaseLister helps list Leases. +type LeaseLister interface { + // List lists all Leases in the indexer. + List(selector labels.Selector) (ret []*v1beta1.Lease, err error) + // Leases returns an object that can list and get Leases. + Leases(namespace string) LeaseNamespaceLister + LeaseListerExpansion +} + +// leaseLister implements the LeaseLister interface. +type leaseLister struct { + indexer cache.Indexer +} + +// NewLeaseLister returns a new LeaseLister. +func NewLeaseLister(indexer cache.Indexer) LeaseLister { + return &leaseLister{indexer: indexer} +} + +// List lists all Leases in the indexer. +func (s *leaseLister) List(selector labels.Selector) (ret []*v1beta1.Lease, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Lease)) + }) + return ret, err +} + +// Leases returns an object that can list and get Leases. +func (s *leaseLister) Leases(namespace string) LeaseNamespaceLister { + return leaseNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// LeaseNamespaceLister helps list and get Leases. +type LeaseNamespaceLister interface { + // List lists all Leases in the indexer for a given namespace. + List(selector labels.Selector) (ret []*v1beta1.Lease, err error) + // Get retrieves the Lease from the indexer for a given namespace and name. + Get(name string) (*v1beta1.Lease, error) + LeaseNamespaceListerExpansion +} + +// leaseNamespaceLister implements the LeaseNamespaceLister +// interface. +type leaseNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all Leases in the indexer for a given namespace. +func (s leaseNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Lease, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.Lease)) + }) + return ret, err +} + +// Get retrieves the Lease from the indexer for a given namespace and name. +func (s leaseNamespaceLister) Get(name string) (*v1beta1.Lease, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("lease"), name) + } + return obj.(*v1beta1.Lease), nil +} diff --git a/deps/k8s.io/client-go/listers/core/v1/BUILD b/deps/k8s.io/client-go/listers/core/v1/BUILD deleted file mode 100644 index 313cdc299..000000000 --- a/deps/k8s.io/client-go/listers/core/v1/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "componentstatus.go", - "configmap.go", - "endpoints.go", - "event.go", - "expansion_generated.go", - "limitrange.go", - "namespace.go", - "node.go", - "node_expansion.go", - "persistentvolume.go", - "persistentvolumeclaim.go", - "pod.go", - "podtemplate.go", - "replicationcontroller.go", - "replicationcontroller_expansion.go", - "resourcequota.go", - "secret.go", - "service.go", - "service_expansion.go", - "serviceaccount.go", - ], - importpath = "k8s.io/client-go/listers/core/v1", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/core/v1/componentstatus.go b/deps/k8s.io/client-go/listers/core/v1/componentstatus.go index 76f097f37..23d070810 100644 --- a/deps/k8s.io/client-go/listers/core/v1/componentstatus.go +++ b/deps/k8s.io/client-go/listers/core/v1/componentstatus.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/configmap.go b/deps/k8s.io/client-go/listers/core/v1/configmap.go index 6e45dfc7a..55d7cd4d3 100644 --- a/deps/k8s.io/client-go/listers/core/v1/configmap.go +++ b/deps/k8s.io/client-go/listers/core/v1/configmap.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/endpoints.go b/deps/k8s.io/client-go/listers/core/v1/endpoints.go index f6215474d..ac2fdfc57 100644 --- a/deps/k8s.io/client-go/listers/core/v1/endpoints.go +++ b/deps/k8s.io/client-go/listers/core/v1/endpoints.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/event.go b/deps/k8s.io/client-go/listers/core/v1/event.go index 533e656c3..a9d2db01a 100644 --- a/deps/k8s.io/client-go/listers/core/v1/event.go +++ b/deps/k8s.io/client-go/listers/core/v1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/core/v1/expansion_generated.go index 247610a8c..fac0221b8 100644 --- a/deps/k8s.io/client-go/listers/core/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/core/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/limitrange.go b/deps/k8s.io/client-go/listers/core/v1/limitrange.go index f872726b3..c773c433e 100644 --- a/deps/k8s.io/client-go/listers/core/v1/limitrange.go +++ b/deps/k8s.io/client-go/listers/core/v1/limitrange.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/namespace.go b/deps/k8s.io/client-go/listers/core/v1/namespace.go index 909b4a87c..6a17d0457 100644 --- a/deps/k8s.io/client-go/listers/core/v1/namespace.go +++ b/deps/k8s.io/client-go/listers/core/v1/namespace.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/node.go b/deps/k8s.io/client-go/listers/core/v1/node.go index 3c79200f3..b568ebe47 100644 --- a/deps/k8s.io/client-go/listers/core/v1/node.go +++ b/deps/k8s.io/client-go/listers/core/v1/node.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/persistentvolume.go b/deps/k8s.io/client-go/listers/core/v1/persistentvolume.go index f3231d2e3..1d7c6ca76 100644 --- a/deps/k8s.io/client-go/listers/core/v1/persistentvolume.go +++ b/deps/k8s.io/client-go/listers/core/v1/persistentvolume.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go b/deps/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go index e7298f18b..501a38c43 100644 --- a/deps/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go +++ b/deps/k8s.io/client-go/listers/core/v1/persistentvolumeclaim.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/pod.go b/deps/k8s.io/client-go/listers/core/v1/pod.go index 0762cd802..442f8c55f 100644 --- a/deps/k8s.io/client-go/listers/core/v1/pod.go +++ b/deps/k8s.io/client-go/listers/core/v1/pod.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/podtemplate.go b/deps/k8s.io/client-go/listers/core/v1/podtemplate.go index 14774acbf..9a17f820c 100644 --- a/deps/k8s.io/client-go/listers/core/v1/podtemplate.go +++ b/deps/k8s.io/client-go/listers/core/v1/podtemplate.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/replicationcontroller.go b/deps/k8s.io/client-go/listers/core/v1/replicationcontroller.go index a1cbe21fa..8b17aa2c4 100644 --- a/deps/k8s.io/client-go/listers/core/v1/replicationcontroller.go +++ b/deps/k8s.io/client-go/listers/core/v1/replicationcontroller.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/resourcequota.go b/deps/k8s.io/client-go/listers/core/v1/resourcequota.go index 3da91223b..f5b7030cc 100644 --- a/deps/k8s.io/client-go/listers/core/v1/resourcequota.go +++ b/deps/k8s.io/client-go/listers/core/v1/resourcequota.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/secret.go b/deps/k8s.io/client-go/listers/core/v1/secret.go index 8f7ce949c..e9ef24934 100644 --- a/deps/k8s.io/client-go/listers/core/v1/secret.go +++ b/deps/k8s.io/client-go/listers/core/v1/secret.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/service.go b/deps/k8s.io/client-go/listers/core/v1/service.go index 5b464ac2f..3b5941acb 100644 --- a/deps/k8s.io/client-go/listers/core/v1/service.go +++ b/deps/k8s.io/client-go/listers/core/v1/service.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/core/v1/serviceaccount.go b/deps/k8s.io/client-go/listers/core/v1/serviceaccount.go index 35de315e2..8b94cf594 100644 --- a/deps/k8s.io/client-go/listers/core/v1/serviceaccount.go +++ b/deps/k8s.io/client-go/listers/core/v1/serviceaccount.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/events/v1beta1/BUILD b/deps/k8s.io/client-go/listers/events/v1beta1/BUILD deleted file mode 100644 index f4ea35d4a..000000000 --- a/deps/k8s.io/client-go/listers/events/v1beta1/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "event.go", - "expansion_generated.go", - ], - importpath = "k8s.io/client-go/listers/events/v1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/events/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/listers/events/v1beta1/event.go b/deps/k8s.io/client-go/listers/events/v1beta1/event.go index 0f1dcfe50..4a5bc3997 100644 --- a/deps/k8s.io/client-go/listers/events/v1beta1/event.go +++ b/deps/k8s.io/client-go/listers/events/v1beta1/event.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go index dae23607b..d311691d9 100644 --- a/deps/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/events/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/BUILD b/deps/k8s.io/client-go/listers/extensions/v1beta1/BUILD deleted file mode 100644 index 510c8df6d..000000000 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "daemonset.go", - "daemonset_expansion.go", - "deployment.go", - "deployment_expansion.go", - "expansion_generated.go", - "ingress.go", - "podsecuritypolicy.go", - "replicaset.go", - "replicaset_expansion.go", - "scale.go", - ], - importpath = "k8s.io/client-go/listers/extensions/v1beta1", - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["daemonset_expansion_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/listers/extensions/v1beta1", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go b/deps/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go index aa6741df2..a7bb6657a 100644 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go +++ b/deps/k8s.io/client-go/listers/extensions/v1beta1/daemonset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/deployment.go b/deps/k8s.io/client-go/listers/extensions/v1beta1/deployment.go index 09ce2e20a..13e307189 100644 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/deployment.go +++ b/deps/k8s.io/client-go/listers/extensions/v1beta1/deployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go index 2c99c42ca..b5ee8a492 100644 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/extensions/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/ingress.go b/deps/k8s.io/client-go/listers/extensions/v1beta1/ingress.go index 8489e0b24..1bc33ede2 100644 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/ingress.go +++ b/deps/k8s.io/client-go/listers/extensions/v1beta1/ingress.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go b/deps/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go index 8b44f1793..1298e87ba 100644 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go +++ b/deps/k8s.io/client-go/listers/extensions/v1beta1/podsecuritypolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go b/deps/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go index 111bc02a6..d3e741a86 100644 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go +++ b/deps/k8s.io/client-go/listers/extensions/v1beta1/replicaset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/extensions/v1beta1/scale.go b/deps/k8s.io/client-go/listers/extensions/v1beta1/scale.go index 2f6c9f977..527d4be42 100644 --- a/deps/k8s.io/client-go/listers/extensions/v1beta1/scale.go +++ b/deps/k8s.io/client-go/listers/extensions/v1beta1/scale.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/BUILD b/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/BUILD deleted file mode 100644 index da825e6a5..000000000 --- a/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "imagereview.go", - ], - importpath = "k8s.io/client-go/listers/imagepolicy/v1alpha1", - deps = [ - "//vendor/k8s.io/api/imagepolicy/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/expansion_generated.go b/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/expansion_generated.go index a46911528..9cb13f792 100644 --- a/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go b/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go index 00fa27f74..722e456e7 100644 --- a/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go +++ b/deps/k8s.io/client-go/listers/imagepolicy/v1alpha1/imagereview.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/networking/v1/BUILD b/deps/k8s.io/client-go/listers/networking/v1/BUILD deleted file mode 100644 index 64dc638ba..000000000 --- a/deps/k8s.io/client-go/listers/networking/v1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "networkpolicy.go", - ], - importpath = "k8s.io/client-go/listers/networking/v1", - deps = [ - "//vendor/k8s.io/api/networking/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/networking/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/networking/v1/expansion_generated.go index f8a9d1533..e03a52385 100644 --- a/deps/k8s.io/client-go/listers/networking/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/networking/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/networking/v1/networkpolicy.go b/deps/k8s.io/client-go/listers/networking/v1/networkpolicy.go index c385aac62..e5d997747 100644 --- a/deps/k8s.io/client-go/listers/networking/v1/networkpolicy.go +++ b/deps/k8s.io/client-go/listers/networking/v1/networkpolicy.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/policy/v1beta1/BUILD b/deps/k8s.io/client-go/listers/policy/v1beta1/BUILD deleted file mode 100644 index c678177ae..000000000 --- a/deps/k8s.io/client-go/listers/policy/v1beta1/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "eviction.go", - "expansion_generated.go", - "poddisruptionbudget.go", - "poddisruptionbudget_expansion.go", - ], - importpath = "k8s.io/client-go/listers/policy/v1beta1", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/policy/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/policy/v1beta1/eviction.go b/deps/k8s.io/client-go/listers/policy/v1beta1/eviction.go index 2dc7f5757..6e27f5fdc 100644 --- a/deps/k8s.io/client-go/listers/policy/v1beta1/eviction.go +++ b/deps/k8s.io/client-go/listers/policy/v1beta1/eviction.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go index 090199ade..9a005f20b 100644 --- a/deps/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/policy/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 @@ -25,3 +25,7 @@ type EvictionListerExpansion interface{} // EvictionNamespaceListerExpansion allows custom methods to be added to // EvictionNamespaceLister. type EvictionNamespaceListerExpansion interface{} + +// PodSecurityPolicyListerExpansion allows custom methods to be added to +// PodSecurityPolicyLister. +type PodSecurityPolicyListerExpansion interface{} diff --git a/deps/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go b/deps/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go index dfad3515a..b1f83ee16 100644 --- a/deps/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go +++ b/deps/k8s.io/client-go/listers/policy/v1beta1/poddisruptionbudget.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go b/deps/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go new file mode 100644 index 000000000..e943d3a05 --- /dev/null +++ b/deps/k8s.io/client-go/listers/policy/v1beta1/podsecuritypolicy.go @@ -0,0 +1,65 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/policy/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// PodSecurityPolicyLister helps list PodSecurityPolicies. +type PodSecurityPolicyLister interface { + // List lists all PodSecurityPolicies in the indexer. + List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) + // Get retrieves the PodSecurityPolicy from the index for a given name. + Get(name string) (*v1beta1.PodSecurityPolicy, error) + PodSecurityPolicyListerExpansion +} + +// podSecurityPolicyLister implements the PodSecurityPolicyLister interface. +type podSecurityPolicyLister struct { + indexer cache.Indexer +} + +// NewPodSecurityPolicyLister returns a new PodSecurityPolicyLister. +func NewPodSecurityPolicyLister(indexer cache.Indexer) PodSecurityPolicyLister { + return &podSecurityPolicyLister{indexer: indexer} +} + +// List lists all PodSecurityPolicies in the indexer. +func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*v1beta1.PodSecurityPolicy, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.PodSecurityPolicy)) + }) + return ret, err +} + +// Get retrieves the PodSecurityPolicy from the index for a given name. +func (s *podSecurityPolicyLister) Get(name string) (*v1beta1.PodSecurityPolicy, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("podsecuritypolicy"), name) + } + return obj.(*v1beta1.PodSecurityPolicy), nil +} diff --git a/deps/k8s.io/client-go/listers/rbac/v1/BUILD b/deps/k8s.io/client-go/listers/rbac/v1/BUILD deleted file mode 100644 index 9facdc04d..000000000 --- a/deps/k8s.io/client-go/listers/rbac/v1/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "expansion_generated.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/listers/rbac/v1", - deps = [ - "//vendor/k8s.io/api/rbac/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/rbac/v1/clusterrole.go b/deps/k8s.io/client-go/listers/rbac/v1/clusterrole.go index c806bb610..a612dbeab 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1/clusterrole.go +++ b/deps/k8s.io/client-go/listers/rbac/v1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go b/deps/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go index b7d43faea..2c5958ff9 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/listers/rbac/v1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/rbac/v1/expansion_generated.go index 998b5739a..0eb2a6d11 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/rbac/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1/role.go b/deps/k8s.io/client-go/listers/rbac/v1/role.go index 7f6e43bfb..9a9d98773 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1/role.go +++ b/deps/k8s.io/client-go/listers/rbac/v1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1/rolebinding.go b/deps/k8s.io/client-go/listers/rbac/v1/rolebinding.go index f32f6e4cc..85a69315a 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1/rolebinding.go +++ b/deps/k8s.io/client-go/listers/rbac/v1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1alpha1/BUILD b/deps/k8s.io/client-go/listers/rbac/v1alpha1/BUILD deleted file mode 100644 index 917c535fc..000000000 --- a/deps/k8s.io/client-go/listers/rbac/v1alpha1/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "expansion_generated.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/listers/rbac/v1alpha1", - deps = [ - "//vendor/k8s.io/api/rbac/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go b/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go index cf6ec2587..f8c50f65b 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go +++ b/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go b/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go index 9ddd6bf34..5769ed0e6 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/listers/rbac/v1alpha1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go b/deps/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go index 0ab9deba2..2d4ad1756 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/rbac/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1alpha1/role.go b/deps/k8s.io/client-go/listers/rbac/v1alpha1/role.go index 5aad1e1c8..c337b589b 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1alpha1/role.go +++ b/deps/k8s.io/client-go/listers/rbac/v1alpha1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go b/deps/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go index f1a539e67..4e517f4d6 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go +++ b/deps/k8s.io/client-go/listers/rbac/v1alpha1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1beta1/BUILD b/deps/k8s.io/client-go/listers/rbac/v1beta1/BUILD deleted file mode 100644 index bde3d52e8..000000000 --- a/deps/k8s.io/client-go/listers/rbac/v1beta1/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "clusterrole.go", - "clusterrolebinding.go", - "expansion_generated.go", - "role.go", - "rolebinding.go", - ], - importpath = "k8s.io/client-go/listers/rbac/v1beta1", - deps = [ - "//vendor/k8s.io/api/rbac/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go b/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go index 4e3bd46bb..01356f4b2 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go +++ b/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrole.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go b/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go index 911c86167..6d3f14338 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go +++ b/deps/k8s.io/client-go/listers/rbac/v1beta1/clusterrolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go index 9352061dd..51f674bd0 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/rbac/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1beta1/role.go b/deps/k8s.io/client-go/listers/rbac/v1beta1/role.go index 694a29759..c946c43a7 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1beta1/role.go +++ b/deps/k8s.io/client-go/listers/rbac/v1beta1/role.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go b/deps/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go index 8feb8358f..0eec45bde 100644 --- a/deps/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go +++ b/deps/k8s.io/client-go/listers/rbac/v1beta1/rolebinding.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/scheduling/v1alpha1/BUILD b/deps/k8s.io/client-go/listers/scheduling/v1alpha1/BUILD deleted file mode 100644 index cf60e8132..000000000 --- a/deps/k8s.io/client-go/listers/scheduling/v1alpha1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "priorityclass.go", - ], - importpath = "k8s.io/client-go/listers/scheduling/v1alpha1", - deps = [ - "//vendor/k8s.io/api/scheduling/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go b/deps/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go index a92884a8c..bde8b6206 100644 --- a/deps/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/scheduling/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go b/deps/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go index 1dbe2f242..a3059c94d 100644 --- a/deps/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go +++ b/deps/k8s.io/client-go/listers/scheduling/v1alpha1/priorityclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/scheduling/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/scheduling/v1beta1/expansion_generated.go new file mode 100644 index 000000000..b806e8cf8 --- /dev/null +++ b/deps/k8s.io/client-go/listers/scheduling/v1beta1/expansion_generated.go @@ -0,0 +1,23 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +// PriorityClassListerExpansion allows custom methods to be added to +// PriorityClassLister. +type PriorityClassListerExpansion interface{} diff --git a/deps/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go b/deps/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go new file mode 100644 index 000000000..9d0606392 --- /dev/null +++ b/deps/k8s.io/client-go/listers/scheduling/v1beta1/priorityclass.go @@ -0,0 +1,65 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1beta1 "k8s.io/api/scheduling/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// PriorityClassLister helps list PriorityClasses. +type PriorityClassLister interface { + // List lists all PriorityClasses in the indexer. + List(selector labels.Selector) (ret []*v1beta1.PriorityClass, err error) + // Get retrieves the PriorityClass from the index for a given name. + Get(name string) (*v1beta1.PriorityClass, error) + PriorityClassListerExpansion +} + +// priorityClassLister implements the PriorityClassLister interface. +type priorityClassLister struct { + indexer cache.Indexer +} + +// NewPriorityClassLister returns a new PriorityClassLister. +func NewPriorityClassLister(indexer cache.Indexer) PriorityClassLister { + return &priorityClassLister{indexer: indexer} +} + +// List lists all PriorityClasses in the indexer. +func (s *priorityClassLister) List(selector labels.Selector) (ret []*v1beta1.PriorityClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1beta1.PriorityClass)) + }) + return ret, err +} + +// Get retrieves the PriorityClass from the index for a given name. +func (s *priorityClassLister) Get(name string) (*v1beta1.PriorityClass, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1beta1.Resource("priorityclass"), name) + } + return obj.(*v1beta1.PriorityClass), nil +} diff --git a/deps/k8s.io/client-go/listers/settings/v1alpha1/BUILD b/deps/k8s.io/client-go/listers/settings/v1alpha1/BUILD deleted file mode 100644 index 9979b5e3c..000000000 --- a/deps/k8s.io/client-go/listers/settings/v1alpha1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "podpreset.go", - ], - importpath = "k8s.io/client-go/listers/settings/v1alpha1", - deps = [ - "//vendor/k8s.io/api/settings/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go b/deps/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go index 39f5b2d57..fba210343 100644 --- a/deps/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/settings/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go b/deps/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go index fc8cbbe38..c862e7d7d 100644 --- a/deps/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go +++ b/deps/k8s.io/client-go/listers/settings/v1alpha1/podpreset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/storage/v1/BUILD b/deps/k8s.io/client-go/listers/storage/v1/BUILD deleted file mode 100644 index b90f06bb7..000000000 --- a/deps/k8s.io/client-go/listers/storage/v1/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "storageclass.go", - ], - importpath = "k8s.io/client-go/listers/storage/v1", - deps = [ - "//vendor/k8s.io/api/storage/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/storage/v1/expansion_generated.go b/deps/k8s.io/client-go/listers/storage/v1/expansion_generated.go index a4141351d..d93247064 100644 --- a/deps/k8s.io/client-go/listers/storage/v1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/storage/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/storage/v1/storageclass.go b/deps/k8s.io/client-go/listers/storage/v1/storageclass.go index 023a55d52..13e8536b4 100644 --- a/deps/k8s.io/client-go/listers/storage/v1/storageclass.go +++ b/deps/k8s.io/client-go/listers/storage/v1/storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/client-go/listers/storage/v1alpha1/BUILD b/deps/k8s.io/client-go/listers/storage/v1alpha1/BUILD deleted file mode 100644 index 50592d670..000000000 --- a/deps/k8s.io/client-go/listers/storage/v1alpha1/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "volumeattachment.go", - ], - importpath = "k8s.io/client-go/listers/storage/v1alpha1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/storage/v1alpha1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go b/deps/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go index ca8816b4d..7ca765622 100644 --- a/deps/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/storage/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go b/deps/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go index 2300bd24a..7871f55e4 100644 --- a/deps/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go +++ b/deps/k8s.io/client-go/listers/storage/v1alpha1/volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha1 diff --git a/deps/k8s.io/client-go/listers/storage/v1beta1/BUILD b/deps/k8s.io/client-go/listers/storage/v1beta1/BUILD deleted file mode 100644 index 49d992e47..000000000 --- a/deps/k8s.io/client-go/listers/storage/v1beta1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion_generated.go", - "storageclass.go", - "volumeattachment.go", - ], - importpath = "k8s.io/client-go/listers/storage/v1beta1", - deps = [ - "//vendor/k8s.io/api/storage/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go b/deps/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go index 6866b0e5a..21d95620c 100644 --- a/deps/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go +++ b/deps/k8s.io/client-go/listers/storage/v1beta1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/storage/v1beta1/storageclass.go b/deps/k8s.io/client-go/listers/storage/v1beta1/storageclass.go index f52ac413c..07bc97b32 100644 --- a/deps/k8s.io/client-go/listers/storage/v1beta1/storageclass.go +++ b/deps/k8s.io/client-go/listers/storage/v1beta1/storageclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go b/deps/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go index ee7eff199..7193441b0 100644 --- a/deps/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go +++ b/deps/k8s.io/client-go/listers/storage/v1beta1/volumeattachment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1beta1 diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/doc.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/doc.go new file mode 100644 index 000000000..d06482d55 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package +// +groupName=client.authentication.k8s.io +package clientauthentication // import "k8s.io/client-go/pkg/apis/clientauthentication" diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go new file mode 100644 index 000000000..1b7b5f949 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/install/install.go @@ -0,0 +1,33 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package install installs the experimental API group, making it available as +// an option to all of the API encoding/decoding machinery. +package install + +import ( + "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/pkg/apis/clientauthentication" + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" +) + +// Install registers the API group and adds types to a scheme +func Install(scheme *runtime.Scheme) { + utilruntime.Must(clientauthentication.AddToScheme(scheme)) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion)) +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/register.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/register.go new file mode 100644 index 000000000..e4fbc3ea9 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/register.go @@ -0,0 +1,50 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientauthentication + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "client.authentication.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} + +// Kind takes an unqualified kind and returns a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ExecCredential{}, + ) + return nil +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/types.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/types.go new file mode 100644 index 000000000..6fb53cecf --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/types.go @@ -0,0 +1,77 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clientauthentication + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ExecCredentials is used by exec-based plugins to communicate credentials to +// HTTP transports. +type ExecCredential struct { + metav1.TypeMeta + + // Spec holds information passed to the plugin by the transport. This contains + // request and runtime specific information, such as if the session is interactive. + Spec ExecCredentialSpec + + // Status is filled in by the plugin and holds the credentials that the transport + // should use to contact the API. + // +optional + Status *ExecCredentialStatus +} + +// ExecCredenitalSpec holds request and runtime specific information provided by +// the transport. +type ExecCredentialSpec struct { + // Response is populated when the transport encounters HTTP status codes, such as 401, + // suggesting previous credentials were invalid. + // +optional + Response *Response + + // Interactive is true when the transport detects the command is being called from an + // interactive prompt. + // +optional + Interactive bool +} + +// ExecCredentialStatus holds credentials for the transport to use. +type ExecCredentialStatus struct { + // ExpirationTimestamp indicates a time when the provided credentials expire. + // +optional + ExpirationTimestamp *metav1.Time + // Token is a bearer token used by the client for request authentication. + // +optional + Token string + // PEM-encoded client TLS certificate. + // +optional + ClientCertificateData string + // PEM-encoded client TLS private key. + // +optional + ClientKeyData string +} + +// Response defines metadata about a failed request, including HTTP status code and +// response headers. +type Response struct { + // Headers holds HTTP headers returned by the server. + Header map[string][]string + // Code is the HTTP status code returned by the server. + Code int32 +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go new file mode 100644 index 000000000..016adb28a --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/client-go/pkg/apis/clientauthentication +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta + +// +groupName=client.authentication.k8s.io +package v1alpha1 // import "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go new file mode 100644 index 000000000..2acd13dea --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "client.authentication.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ExecCredential{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go new file mode 100644 index 000000000..921f3a2b9 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/types.go @@ -0,0 +1,78 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ExecCredentials is used by exec-based plugins to communicate credentials to +// HTTP transports. +type ExecCredential struct { + metav1.TypeMeta `json:",inline"` + + // Spec holds information passed to the plugin by the transport. This contains + // request and runtime specific information, such as if the session is interactive. + Spec ExecCredentialSpec `json:"spec,omitempty"` + + // Status is filled in by the plugin and holds the credentials that the transport + // should use to contact the API. + // +optional + Status *ExecCredentialStatus `json:"status,omitempty"` +} + +// ExecCredenitalSpec holds request and runtime specific information provided by +// the transport. +type ExecCredentialSpec struct { + // Response is populated when the transport encounters HTTP status codes, such as 401, + // suggesting previous credentials were invalid. + // +optional + Response *Response `json:"response,omitempty"` + + // Interactive is true when the transport detects the command is being called from an + // interactive prompt. + // +optional + Interactive bool `json:"interactive,omitempty"` +} + +// ExecCredentialStatus holds credentials for the transport to use. +// +// Token and ClientKeyData are sensitive fields. This data should only be +// transmitted in-memory between client and exec plugin process. Exec plugin +// itself should at least be protected via file permissions. +type ExecCredentialStatus struct { + // ExpirationTimestamp indicates a time when the provided credentials expire. + // +optional + ExpirationTimestamp *metav1.Time `json:"expirationTimestamp,omitempty"` + // Token is a bearer token used by the client for request authentication. + Token string `json:"token,omitempty"` + // PEM-encoded client TLS certificates (including intermediates, if any). + ClientCertificateData string `json:"clientCertificateData,omitempty"` + // PEM-encoded private key for the above certificate. + ClientKeyData string `json:"clientKeyData,omitempty"` +} + +// Response defines metadata about a failed request, including HTTP status code and +// response headers. +type Response struct { + // Header holds HTTP headers returned by the server. + Header map[string][]string `json:"header,omitempty"` + // Code is the HTTP status code returned by the server. + Code int32 `json:"code,omitempty"` +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go new file mode 100644 index 000000000..461c20b29 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go @@ -0,0 +1,176 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + unsafe "unsafe" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + clientauthentication "k8s.io/client-go/pkg/apis/clientauthentication" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*ExecCredential)(nil), (*clientauthentication.ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(a.(*ExecCredential), b.(*clientauthentication.ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredential)(nil), (*ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(a.(*clientauthentication.ExecCredential), b.(*ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialSpec)(nil), (*clientauthentication.ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(a.(*ExecCredentialSpec), b.(*clientauthentication.ExecCredentialSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialStatus)(nil), (*ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(a.(*clientauthentication.ExecCredentialStatus), b.(*ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*Response)(nil), (*clientauthentication.Response)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha1_Response_To_clientauthentication_Response(a.(*Response), b.(*clientauthentication.Response), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.Response)(nil), (*Response)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_Response_To_v1alpha1_Response(a.(*clientauthentication.Response), b.(*Response), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + if err := Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*clientauthentication.ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredential_To_clientauthentication_ExecCredential(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + if err := Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredential_To_v1alpha1_ExecCredential(in, out, s) +} + +func autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + out.Response = (*clientauthentication.Response)(unsafe.Pointer(in.Response)) + out.Interactive = in.Interactive + return nil +} + +// Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + out.Response = (*Response)(unsafe.Pointer(in.Response)) + out.Interactive = in.Interactive + return nil +} + +// Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialSpec_To_v1alpha1_ExecCredentialSpec(in, out, s) +} + +func autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus is an autogenerated conversion function. +func Convert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_v1alpha1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialStatus_To_v1alpha1_ExecCredentialStatus(in, out, s) +} + +func autoConvert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { + out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) + out.Code = in.Code + return nil +} + +// Convert_v1alpha1_Response_To_clientauthentication_Response is an autogenerated conversion function. +func Convert_v1alpha1_Response_To_clientauthentication_Response(in *Response, out *clientauthentication.Response, s conversion.Scope) error { + return autoConvert_v1alpha1_Response_To_clientauthentication_Response(in, out, s) +} + +func autoConvert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { + out.Header = *(*map[string][]string)(unsafe.Pointer(&in.Header)) + out.Code = in.Code + return nil +} + +// Convert_clientauthentication_Response_To_v1alpha1_Response is an autogenerated conversion function. +func Convert_clientauthentication_Response_To_v1alpha1_Response(in *clientauthentication.Response, out *Response, s conversion.Scope) error { + return autoConvert_clientauthentication_Response_To_v1alpha1_Response(in, out, s) +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..a73d31b3f --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,128 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredential) DeepCopyInto(out *ExecCredential) { + *out = *in + out.TypeMeta = in.TypeMeta + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecCredentialStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredential. +func (in *ExecCredential) DeepCopy() *ExecCredential { + if in == nil { + return nil + } + out := new(ExecCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExecCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { + *out = *in + if in.Response != nil { + in, out := &in.Response, &out.Response + *out = new(Response) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialSpec. +func (in *ExecCredentialSpec) DeepCopy() *ExecCredentialSpec { + if in == nil { + return nil + } + out := new(ExecCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialStatus) DeepCopyInto(out *ExecCredentialStatus) { + *out = *in + if in.ExpirationTimestamp != nil { + in, out := &in.ExpirationTimestamp, &out.ExpirationTimestamp + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialStatus. +func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { + if in == nil { + return nil + } + out := new(ExecCredentialStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Response) DeepCopyInto(out *Response) { + *out = *in + if in.Header != nil { + in, out := &in.Header, &out.Header + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. +func (in *Response) DeepCopy() *Response { + if in == nil { + return nil + } + out := new(Response) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go new file mode 100644 index 000000000..dd621a3ac --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/conversion.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/conversion.go new file mode 100644 index 000000000..f543806ac --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/conversion.go @@ -0,0 +1,26 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + conversion "k8s.io/apimachinery/pkg/conversion" + clientauthentication "k8s.io/client-go/pkg/apis/clientauthentication" +) + +func Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + return nil +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/doc.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/doc.go new file mode 100644 index 000000000..fbcd9b7fe --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package +// +k8s:conversion-gen=k8s.io/client-go/pkg/apis/clientauthentication +// +k8s:openapi-gen=true +// +k8s:defaulter-gen=TypeMeta + +// +groupName=client.authentication.k8s.io +package v1beta1 // import "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/register.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/register.go new file mode 100644 index 000000000..0bb92f16a --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/register.go @@ -0,0 +1,55 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// GroupName is the group name use in this package +const GroupName = "client.authentication.k8s.io" + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &ExecCredential{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/types.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/types.go new file mode 100644 index 000000000..d6e267452 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/types.go @@ -0,0 +1,59 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ExecCredentials is used by exec-based plugins to communicate credentials to +// HTTP transports. +type ExecCredential struct { + metav1.TypeMeta `json:",inline"` + + // Spec holds information passed to the plugin by the transport. This contains + // request and runtime specific information, such as if the session is interactive. + Spec ExecCredentialSpec `json:"spec,omitempty"` + + // Status is filled in by the plugin and holds the credentials that the transport + // should use to contact the API. + // +optional + Status *ExecCredentialStatus `json:"status,omitempty"` +} + +// ExecCredenitalSpec holds request and runtime specific information provided by +// the transport. +type ExecCredentialSpec struct{} + +// ExecCredentialStatus holds credentials for the transport to use. +// +// Token and ClientKeyData are sensitive fields. This data should only be +// transmitted in-memory between client and exec plugin process. Exec plugin +// itself should at least be protected via file permissions. +type ExecCredentialStatus struct { + // ExpirationTimestamp indicates a time when the provided credentials expire. + // +optional + ExpirationTimestamp *metav1.Time `json:"expirationTimestamp,omitempty"` + // Token is a bearer token used by the client for request authentication. + Token string `json:"token,omitempty"` + // PEM-encoded client TLS certificates (including intermediates, if any). + ClientCertificateData string `json:"clientCertificateData,omitempty"` + // PEM-encoded private key for the above certificate. + ClientKeyData string `json:"clientKeyData,omitempty"` +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go new file mode 100644 index 000000000..94ef4b733 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go @@ -0,0 +1,142 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1beta1 + +import ( + unsafe "unsafe" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + clientauthentication "k8s.io/client-go/pkg/apis/clientauthentication" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*ExecCredential)(nil), (*clientauthentication.ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExecCredential_To_clientauthentication_ExecCredential(a.(*ExecCredential), b.(*clientauthentication.ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredential)(nil), (*ExecCredential)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredential_To_v1beta1_ExecCredential(a.(*clientauthentication.ExecCredential), b.(*ExecCredential), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialSpec)(nil), (*clientauthentication.ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(a.(*ExecCredentialSpec), b.(*clientauthentication.ExecCredentialSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*ExecCredentialStatus)(nil), (*clientauthentication.ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(a.(*ExecCredentialStatus), b.(*clientauthentication.ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*clientauthentication.ExecCredentialStatus)(nil), (*ExecCredentialStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialStatus_To_v1beta1_ExecCredentialStatus(a.(*clientauthentication.ExecCredentialStatus), b.(*ExecCredentialStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*clientauthentication.ExecCredentialSpec)(nil), (*ExecCredentialSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(a.(*clientauthentication.ExecCredentialSpec), b.(*ExecCredentialSpec), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1beta1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + if err := Convert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*clientauthentication.ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_v1beta1_ExecCredential_To_clientauthentication_ExecCredential is an autogenerated conversion function. +func Convert_v1beta1_ExecCredential_To_clientauthentication_ExecCredential(in *ExecCredential, out *clientauthentication.ExecCredential, s conversion.Scope) error { + return autoConvert_v1beta1_ExecCredential_To_clientauthentication_ExecCredential(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredential_To_v1beta1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + if err := Convert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + out.Status = (*ExecCredentialStatus)(unsafe.Pointer(in.Status)) + return nil +} + +// Convert_clientauthentication_ExecCredential_To_v1beta1_ExecCredential is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredential_To_v1beta1_ExecCredential(in *clientauthentication.ExecCredential, out *ExecCredential, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredential_To_v1beta1_ExecCredential(in, out, s) +} + +func autoConvert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + return nil +} + +// Convert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec is an autogenerated conversion function. +func Convert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in *ExecCredentialSpec, out *clientauthentication.ExecCredentialSpec, s conversion.Scope) error { + return autoConvert_v1beta1_ExecCredentialSpec_To_clientauthentication_ExecCredentialSpec(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialSpec_To_v1beta1_ExecCredentialSpec(in *clientauthentication.ExecCredentialSpec, out *ExecCredentialSpec, s conversion.Scope) error { + // WARNING: in.Response requires manual conversion: does not exist in peer-type + // WARNING: in.Interactive requires manual conversion: does not exist in peer-type + return nil +} + +func autoConvert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus is an autogenerated conversion function. +func Convert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in *ExecCredentialStatus, out *clientauthentication.ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_v1beta1_ExecCredentialStatus_To_clientauthentication_ExecCredentialStatus(in, out, s) +} + +func autoConvert_clientauthentication_ExecCredentialStatus_To_v1beta1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + out.ExpirationTimestamp = (*v1.Time)(unsafe.Pointer(in.ExpirationTimestamp)) + out.Token = in.Token + out.ClientCertificateData = in.ClientCertificateData + out.ClientKeyData = in.ClientKeyData + return nil +} + +// Convert_clientauthentication_ExecCredentialStatus_To_v1beta1_ExecCredentialStatus is an autogenerated conversion function. +func Convert_clientauthentication_ExecCredentialStatus_To_v1beta1_ExecCredentialStatus(in *clientauthentication.ExecCredentialStatus, out *ExecCredentialStatus, s conversion.Scope) error { + return autoConvert_clientauthentication_ExecCredentialStatus_To_v1beta1_ExecCredentialStatus(in, out, s) +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.deepcopy.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.deepcopy.go new file mode 100644 index 000000000..736b8cf00 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.deepcopy.go @@ -0,0 +1,92 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredential) DeepCopyInto(out *ExecCredential) { + *out = *in + out.TypeMeta = in.TypeMeta + out.Spec = in.Spec + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecCredentialStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredential. +func (in *ExecCredential) DeepCopy() *ExecCredential { + if in == nil { + return nil + } + out := new(ExecCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExecCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialSpec. +func (in *ExecCredentialSpec) DeepCopy() *ExecCredentialSpec { + if in == nil { + return nil + } + out := new(ExecCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialStatus) DeepCopyInto(out *ExecCredentialStatus) { + *out = *in + if in.ExpirationTimestamp != nil { + in, out := &in.ExpirationTimestamp, &out.ExpirationTimestamp + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialStatus. +func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { + if in == nil { + return nil + } + out := new(ExecCredentialStatus) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.defaults.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.defaults.go new file mode 100644 index 000000000..73e63fc11 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/v1beta1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1beta1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/deps/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go b/deps/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go new file mode 100644 index 000000000..c568a6fc8 --- /dev/null +++ b/deps/k8s.io/client-go/pkg/apis/clientauthentication/zz_generated.deepcopy.go @@ -0,0 +1,128 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package clientauthentication + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredential) DeepCopyInto(out *ExecCredential) { + *out = *in + out.TypeMeta = in.TypeMeta + in.Spec.DeepCopyInto(&out.Spec) + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(ExecCredentialStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredential. +func (in *ExecCredential) DeepCopy() *ExecCredential { + if in == nil { + return nil + } + out := new(ExecCredential) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ExecCredential) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialSpec) DeepCopyInto(out *ExecCredentialSpec) { + *out = *in + if in.Response != nil { + in, out := &in.Response, &out.Response + *out = new(Response) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialSpec. +func (in *ExecCredentialSpec) DeepCopy() *ExecCredentialSpec { + if in == nil { + return nil + } + out := new(ExecCredentialSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCredentialStatus) DeepCopyInto(out *ExecCredentialStatus) { + *out = *in + if in.ExpirationTimestamp != nil { + in, out := &in.ExpirationTimestamp, &out.ExpirationTimestamp + *out = (*in).DeepCopy() + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCredentialStatus. +func (in *ExecCredentialStatus) DeepCopy() *ExecCredentialStatus { + if in == nil { + return nil + } + out := new(ExecCredentialStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Response) DeepCopyInto(out *Response) { + *out = *in + if in.Header != nil { + in, out := &in.Header, &out.Header + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Response. +func (in *Response) DeepCopy() *Response { + if in == nil { + return nil + } + out := new(Response) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/client-go/pkg/version/BUILD b/deps/k8s.io/client-go/pkg/version/BUILD deleted file mode 100644 index ee19d8cde..000000000 --- a/deps/k8s.io/client-go/pkg/version/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "base.go", - "doc.go", - "version.go", - ], - importpath = "k8s.io/client-go/pkg/version", - deps = ["//vendor/k8s.io/apimachinery/pkg/version:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/pkg/version/base.go b/deps/k8s.io/client-go/pkg/version/base.go index 7ab0ed3a7..9b4c79f89 100644 --- a/deps/k8s.io/client-go/pkg/version/base.go +++ b/deps/k8s.io/client-go/pkg/version/base.go @@ -43,7 +43,7 @@ var ( gitMinor string = "" // minor version, numeric possibly followed by "+" // semantic version, derived by build scripts (see - // https://github.com/kubernetes/kubernetes/blob/master/docs/design/versioning.md + // https://git.k8s.io/community/contributors/design-proposals/release/versioning.md // for a detailed discussion of this field) // // TODO: This field is still called "gitVersion" for legacy diff --git a/deps/k8s.io/client-go/pkg/version/def.bzl b/deps/k8s.io/client-go/pkg/version/def.bzl index bca85ab4b..9c018a4ef 100644 --- a/deps/k8s.io/client-go/pkg/version/def.bzl +++ b/deps/k8s.io/client-go/pkg/version/def.bzl @@ -1,3 +1,17 @@ +# Copyright 2017 The Kubernetes 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. + # Implements hack/lib/version.sh's kube::version::ldflags() for Bazel. def version_x_defs(): # This should match the list of packages in kube::version::ldflag diff --git a/deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/BUILD b/deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/BUILD deleted file mode 100644 index 4100f394e..000000000 --- a/deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["provider.go"], - importpath = "k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing", - deps = [ - "//vendor/github.com/coreos/go-oidc/jose:go_default_library", - "//vendor/github.com/coreos/go-oidc/key:go_default_library", - "//vendor/github.com/coreos/go-oidc/oidc:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go b/deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go deleted file mode 100644 index ae7353ff2..000000000 --- a/deps/k8s.io/client-go/plugin/pkg/auth/authenticator/token/oidc/testing/provider.go +++ /dev/null @@ -1,200 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package testing - -import ( - "bytes" - "crypto/rand" - "crypto/rsa" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/json" - "encoding/pem" - "fmt" - "io/ioutil" - "math/big" - "net" - "net/http" - "net/http/httptest" - "net/url" - "os" - "path" - "path/filepath" - "testing" - "time" - - "github.com/coreos/go-oidc/jose" - "github.com/coreos/go-oidc/key" - "github.com/coreos/go-oidc/oidc" -) - -// NewOIDCProvider provides a bare minimum OIDC IdP Server useful for testing. -func NewOIDCProvider(t *testing.T, issuerPath string) *OIDCProvider { - privKey, err := key.GeneratePrivateKey() - if err != nil { - t.Fatalf("Cannot create OIDC Provider: %v", err) - return nil - } - - op := &OIDCProvider{ - Mux: http.NewServeMux(), - PrivKey: privKey, - issuerPath: issuerPath, - } - - op.Mux.HandleFunc(path.Join(issuerPath, "/.well-known/openid-configuration"), op.handleConfig) - op.Mux.HandleFunc(path.Join(issuerPath, "/keys"), op.handleKeys) - - return op -} - -type OIDCProvider struct { - Mux *http.ServeMux - PCFG oidc.ProviderConfig - PrivKey *key.PrivateKey - issuerPath string -} - -func (op *OIDCProvider) ServeTLSWithKeyPair(cert, key string) (*httptest.Server, error) { - srv := httptest.NewUnstartedServer(op.Mux) - - srv.TLS = &tls.Config{Certificates: make([]tls.Certificate, 1)} - var err error - srv.TLS.Certificates[0], err = tls.LoadX509KeyPair(cert, key) - if err != nil { - return nil, fmt.Errorf("Cannot load cert/key pair: %v", err) - } - srv.StartTLS() - - // The issuer's URL is extended by an optional path. This ensures that the plugin can - // handle issuers that use a non-root path for discovery (see kubernetes/kubernetes#29749). - srv.URL = srv.URL + op.issuerPath - - u, err := url.Parse(srv.URL) - if err != nil { - return nil, err - } - pathFor := func(p string) *url.URL { - u2 := *u // Shallow copy. - u2.Path = path.Join(u2.Path, p) - return &u2 - } - - op.PCFG = oidc.ProviderConfig{ - Issuer: u, - AuthEndpoint: pathFor("/auth"), - TokenEndpoint: pathFor("/token"), - KeysEndpoint: pathFor("/keys"), - ResponseTypesSupported: []string{"code"}, - SubjectTypesSupported: []string{"public"}, - IDTokenSigningAlgValues: []string{"RS256"}, - } - return srv, nil -} - -func (op *OIDCProvider) handleConfig(w http.ResponseWriter, req *http.Request) { - b, err := json.Marshal(&op.PCFG) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - w.Header().Set("Content-Type", "application/json") - w.Write(b) -} - -func (op *OIDCProvider) handleKeys(w http.ResponseWriter, req *http.Request) { - keys := struct { - Keys []jose.JWK `json:"keys"` - }{ - Keys: []jose.JWK{op.PrivKey.JWK()}, - } - - b, err := json.Marshal(keys) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - - w.Header().Set("Cache-Control", fmt.Sprintf("public, max-age=%d", int(time.Hour.Seconds()))) - w.Header().Set("Expires", time.Now().Add(time.Hour).Format(time.RFC1123)) - w.Header().Set("Content-Type", "application/json") - w.Write(b) -} - -// generateSelfSignedCert generates a self-signed cert/key pairs and writes to the certPath/keyPath. -// This method is mostly identical to crypto.GenerateSelfSignedCert except for the 'IsCA' and 'KeyUsage' -// in the certificate template. (Maybe we can merge these two methods). -func GenerateSelfSignedCert(t *testing.T, host, certPath, keyPath string) { - priv, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - t.Fatal(err) - } - - template := x509.Certificate{ - SerialNumber: big.NewInt(1), - Subject: pkix.Name{ - CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()), - }, - NotBefore: time.Now(), - NotAfter: time.Now().Add(time.Hour * 24 * 365), - - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, - BasicConstraintsValid: true, - IsCA: true, - } - - if ip := net.ParseIP(host); ip != nil { - template.IPAddresses = append(template.IPAddresses, ip) - } else { - template.DNSNames = append(template.DNSNames, host) - } - - derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, &priv.PublicKey, priv) - if err != nil { - t.Fatal(err) - } - - // Generate cert - certBuffer := bytes.Buffer{} - if err := pem.Encode(&certBuffer, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil { - t.Fatal(err) - } - - // Generate key - keyBuffer := bytes.Buffer{} - if err := pem.Encode(&keyBuffer, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil { - t.Fatal(err) - } - - // Write cert - if err := os.MkdirAll(filepath.Dir(certPath), os.FileMode(0755)); err != nil { - t.Fatal(err) - } - if err := ioutil.WriteFile(certPath, certBuffer.Bytes(), os.FileMode(0644)); err != nil { - t.Fatal(err) - } - - // Write key - if err := os.MkdirAll(filepath.Dir(keyPath), os.FileMode(0755)); err != nil { - t.Fatal(err) - } - if err := ioutil.WriteFile(keyPath, keyBuffer.Bytes(), os.FileMode(0600)); err != nil { - t.Fatal(err) - } -} diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/BUILD b/deps/k8s.io/client-go/plugin/pkg/client/auth/BUILD deleted file mode 100644 index 8ab2d7452..000000000 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["plugins.go"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth", - deps = [ - "//vendor/k8s.io/client-go/plugin/pkg/client/auth/azure:go_default_library", - "//vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp:go_default_library", - "//vendor/k8s.io/client-go/plugin/pkg/client/auth/oidc:go_default_library", - "//vendor/k8s.io/client-go/plugin/pkg/client/auth/openstack:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/plugin/pkg/client/auth/azure:all-srcs", - "//staging/src/k8s.io/client-go/plugin/pkg/client/auth/gcp:all-srcs", - "//staging/src/k8s.io/client-go/plugin/pkg/client/auth/oidc:all-srcs", - "//staging/src/k8s.io/client-go/plugin/pkg/client/auth/openstack:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/BUILD b/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/BUILD deleted file mode 100644 index 768919b5a..000000000 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["azure_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/azure", - deps = ["//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["azure.go"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/azure", - deps = [ - "//vendor/github.com/Azure/go-autorest/autorest:go_default_library", - "//vendor/github.com/Azure/go-autorest/autorest/adal:go_default_library", - "//vendor/github.com/Azure/go-autorest/autorest/azure:go_default_library", - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/README.md b/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/README.md index 0b5e62bd4..e4ba791ea 100644 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/README.md +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/README.md @@ -1,15 +1,14 @@ # Azure Active Directory plugin for client authentication -This plugin provides an integration with Azure Active Directory device flow. If no tokens are present in the kubectl configuration, it will prompt a device code which can be used to login in a browser. After login it will automatically fetch the tokens and stored them in the kubectl configuration. In addition it will refresh and update the tokens in configuration when expired. - +This plugin provides an integration with Azure Active Directory device flow. If no tokens are present in the kubectl configuration, it will prompt a device code which can be used to login in a browser. After login it will automatically fetch the tokens and store them in the kubectl configuration. In addition it will refresh and update the tokens in the configuration when expired. ## Usage -1. Create an Azure Active Directory *Web App / API* application for `apiserver` following these [instructions](https://docs.microsoft.com/en-us/azure/active-directory/active-directory-app-registration) +1. Create an Azure Active Directory *Web App / API* application for `apiserver` following these [instructions](https://docs.microsoft.com/en-us/azure/active-directory/active-directory-app-registration). The callback URL does not matter (just cannot be empty). -2. Create a second Azure Active Directory native application for `kubectl` +2. Create a second Azure Active Directory native application for `kubectl`. The callback URL does not matter (just cannot be empty). -3. On `kubectl` application's configuration page in Azure portal grant permissions to `apiserver` application by clicking on *Required Permissions*, click the *Add* button and search for the apiserver application created in step 1. Select "Access apiserver" under the *DELEGATED PERMISSIONS*. Once added click the *Grant Permissions* button to apply the changes +3. On `kubectl` application's configuration page in Azure portal grant permissions to `apiserver` application by clicking on *Required Permissions*, click the *Add* button and search for the apiserver application created in step 1. Select "Access apiserver" under the *DELEGATED PERMISSIONS*. Once added click the *Grant Permissions* button to apply the changes. 4. Configure the `apiserver` to use the Azure Active Directory as an OIDC provider with following options @@ -21,8 +20,9 @@ This plugin provides an integration with Azure Active Directory device flow. If * Replace the `APISERVER_APPLICATION_ID` with the application ID of `apiserver` application * Replace `TENANT_ID` with your tenant ID. +   * For a list of alternative username claims that are supported by the OIDC issuer check the JSON response at `https://sts.windows.net/TENANT_ID/.well-known/openid-configuration`. -5. Configure the `kubectl` to use the `azure` authentication provider +5. Configure `kubectl` to use the `azure` authentication provider ``` kubectl config set-credentials "USER_NAME" --auth-provider=azure \ @@ -35,7 +35,8 @@ This plugin provides an integration with Azure Active Directory device flow. If * Supported environments: `AzurePublicCloud`, `AzureUSGovernmentCloud`, `AzureChinaCloud`, `AzureGermanCloud` * Replace `USER_NAME` and `TENANT_ID` with your user name and tenant ID * Replace `APPLICATION_ID` with the application ID of your`kubectl` application ID - * Replace `APISERVER_APPLICATION_ID` with the application ID of your `apiserver` application ID + * Replace `APISERVER_APPLICATION_ID` with the application ID of your `apiserver` application ID + * Be sure to also (create and) select a context that uses above user 6. The access token is acquired when first `kubectl` command is executed @@ -45,4 +46,5 @@ This plugin provides an integration with Azure Active Directory device flow. If To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code DEC7D48GA to authenticate. ``` - * After signing in a web browser, the token is stored in the configuration, and it will be reused when executing next commands. + * After signing in a web browser, the token is stored in the configuration, and it will be reused when executing further commands. + * The resulting username in Kubernetes depends on your [configuration of the `--oidc-username-claim` and `--oidc-username-prefix` flags on the API server](https://kubernetes.io/docs/admin/authentication/#configuring-the-api-server). If you are using any authorization method you need to give permissions to that user, e.g. by binding the user to a role in the case of RBAC. diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go b/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go index e14dc8d9d..60304b0f3 100644 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go @@ -297,7 +297,7 @@ func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error) } return &azureToken{ - token: spt.Token, + token: spt.Token(), clientID: token.clientID, tenantID: token.tenantID, apiserverID: token.apiserverID, diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go b/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go new file mode 100644 index 000000000..cae9d0d61 --- /dev/null +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go @@ -0,0 +1,361 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package exec + +import ( + "bytes" + "context" + "crypto/tls" + "errors" + "fmt" + "io" + "net" + "net/http" + "os" + "os/exec" + "reflect" + "sync" + "time" + + "github.com/golang/glog" + "golang.org/x/crypto/ssh/terminal" + "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/client-go/pkg/apis/clientauthentication" + "k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1" + "k8s.io/client-go/pkg/apis/clientauthentication/v1beta1" + "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/transport" + "k8s.io/client-go/util/connrotation" +) + +const execInfoEnv = "KUBERNETES_EXEC_INFO" + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(v1alpha1.AddToScheme(scheme)) + utilruntime.Must(v1beta1.AddToScheme(scheme)) + utilruntime.Must(clientauthentication.AddToScheme(scheme)) +} + +var ( + // Since transports can be constantly re-initialized by programs like kubectl, + // keep a cache of initialized authenticators keyed by a hash of their config. + globalCache = newCache() + // The list of API versions we accept. + apiVersions = map[string]schema.GroupVersion{ + v1alpha1.SchemeGroupVersion.String(): v1alpha1.SchemeGroupVersion, + v1beta1.SchemeGroupVersion.String(): v1beta1.SchemeGroupVersion, + } +) + +func newCache() *cache { + return &cache{m: make(map[string]*Authenticator)} +} + +func cacheKey(c *api.ExecConfig) string { + return fmt.Sprintf("%#v", c) +} + +type cache struct { + mu sync.Mutex + m map[string]*Authenticator +} + +func (c *cache) get(s string) (*Authenticator, bool) { + c.mu.Lock() + defer c.mu.Unlock() + a, ok := c.m[s] + return a, ok +} + +// put inserts an authenticator into the cache. If an authenticator is already +// associated with the key, the first one is returned instead. +func (c *cache) put(s string, a *Authenticator) *Authenticator { + c.mu.Lock() + defer c.mu.Unlock() + existing, ok := c.m[s] + if ok { + return existing + } + c.m[s] = a + return a +} + +// GetAuthenticator returns an exec-based plugin for providing client credentials. +func GetAuthenticator(config *api.ExecConfig) (*Authenticator, error) { + return newAuthenticator(globalCache, config) +} + +func newAuthenticator(c *cache, config *api.ExecConfig) (*Authenticator, error) { + key := cacheKey(config) + if a, ok := c.get(key); ok { + return a, nil + } + + gv, ok := apiVersions[config.APIVersion] + if !ok { + return nil, fmt.Errorf("exec plugin: invalid apiVersion %q", config.APIVersion) + } + + a := &Authenticator{ + cmd: config.Command, + args: config.Args, + group: gv, + + stdin: os.Stdin, + stderr: os.Stderr, + interactive: terminal.IsTerminal(int(os.Stdout.Fd())), + now: time.Now, + environ: os.Environ, + } + + for _, env := range config.Env { + a.env = append(a.env, env.Name+"="+env.Value) + } + + return c.put(key, a), nil +} + +// Authenticator is a client credential provider that rotates credentials by executing a plugin. +// The plugin input and output are defined by the API group client.authentication.k8s.io. +type Authenticator struct { + // Set by the config + cmd string + args []string + group schema.GroupVersion + env []string + + // Stubbable for testing + stdin io.Reader + stderr io.Writer + interactive bool + now func() time.Time + environ func() []string + + // Cached results. + // + // The mutex also guards calling the plugin. Since the plugin could be + // interactive we want to make sure it's only called once. + mu sync.Mutex + cachedCreds *credentials + exp time.Time + + onRotate func() +} + +type credentials struct { + token string + cert *tls.Certificate +} + +// UpdateTransportConfig updates the transport.Config to use credentials +// returned by the plugin. +func (a *Authenticator) UpdateTransportConfig(c *transport.Config) error { + wt := c.WrapTransport + c.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { + if wt != nil { + rt = wt(rt) + } + return &roundTripper{a, rt} + } + + if c.TLS.GetCert != nil { + return errors.New("can't add TLS certificate callback: transport.Config.TLS.GetCert already set") + } + c.TLS.GetCert = a.cert + + var dial func(ctx context.Context, network, addr string) (net.Conn, error) + if c.Dial != nil { + dial = c.Dial + } else { + dial = (&net.Dialer{Timeout: 30 * time.Second, KeepAlive: 30 * time.Second}).DialContext + } + d := connrotation.NewDialer(dial) + a.onRotate = d.CloseAll + c.Dial = d.DialContext + + return nil +} + +type roundTripper struct { + a *Authenticator + base http.RoundTripper +} + +func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + // If a user has already set credentials, use that. This makes commands like + // "kubectl get --token (token) pods" work. + if req.Header.Get("Authorization") != "" { + return r.base.RoundTrip(req) + } + + creds, err := r.a.getCreds() + if err != nil { + return nil, fmt.Errorf("getting credentials: %v", err) + } + if creds.token != "" { + req.Header.Set("Authorization", "Bearer "+creds.token) + } + + res, err := r.base.RoundTrip(req) + if err != nil { + return nil, err + } + if res.StatusCode == http.StatusUnauthorized { + resp := &clientauthentication.Response{ + Header: res.Header, + Code: int32(res.StatusCode), + } + if err := r.a.maybeRefreshCreds(creds, resp); err != nil { + glog.Errorf("refreshing credentials: %v", err) + } + } + return res, nil +} + +func (a *Authenticator) credsExpired() bool { + if a.exp.IsZero() { + return false + } + return a.now().After(a.exp) +} + +func (a *Authenticator) cert() (*tls.Certificate, error) { + creds, err := a.getCreds() + if err != nil { + return nil, err + } + return creds.cert, nil +} + +func (a *Authenticator) getCreds() (*credentials, error) { + a.mu.Lock() + defer a.mu.Unlock() + if a.cachedCreds != nil && !a.credsExpired() { + return a.cachedCreds, nil + } + + if err := a.refreshCredsLocked(nil); err != nil { + return nil, err + } + return a.cachedCreds, nil +} + +// maybeRefreshCreds executes the plugin to force a rotation of the +// credentials, unless they were rotated already. +func (a *Authenticator) maybeRefreshCreds(creds *credentials, r *clientauthentication.Response) error { + a.mu.Lock() + defer a.mu.Unlock() + + // Since we're not making a new pointer to a.cachedCreds in getCreds, no + // need to do deep comparison. + if creds != a.cachedCreds { + // Credentials already rotated. + return nil + } + + return a.refreshCredsLocked(r) +} + +// refreshCredsLocked executes the plugin and reads the credentials from +// stdout. It must be called while holding the Authenticator's mutex. +func (a *Authenticator) refreshCredsLocked(r *clientauthentication.Response) error { + cred := &clientauthentication.ExecCredential{ + Spec: clientauthentication.ExecCredentialSpec{ + Response: r, + Interactive: a.interactive, + }, + } + + env := append(a.environ(), a.env...) + if a.group == v1alpha1.SchemeGroupVersion { + // Input spec disabled for beta due to lack of use. Possibly re-enable this later if + // someone wants it back. + // + // See: https://github.com/kubernetes/kubernetes/issues/61796 + data, err := runtime.Encode(codecs.LegacyCodec(a.group), cred) + if err != nil { + return fmt.Errorf("encode ExecCredentials: %v", err) + } + env = append(env, fmt.Sprintf("%s=%s", execInfoEnv, data)) + } + + stdout := &bytes.Buffer{} + cmd := exec.Command(a.cmd, a.args...) + cmd.Env = env + cmd.Stderr = a.stderr + cmd.Stdout = stdout + if a.interactive { + cmd.Stdin = a.stdin + } + + if err := cmd.Run(); err != nil { + return fmt.Errorf("exec: %v", err) + } + + _, gvk, err := codecs.UniversalDecoder(a.group).Decode(stdout.Bytes(), nil, cred) + if err != nil { + return fmt.Errorf("decoding stdout: %v", err) + } + if gvk.Group != a.group.Group || gvk.Version != a.group.Version { + return fmt.Errorf("exec plugin is configured to use API version %s, plugin returned version %s", + a.group, schema.GroupVersion{Group: gvk.Group, Version: gvk.Version}) + } + + if cred.Status == nil { + return fmt.Errorf("exec plugin didn't return a status field") + } + if cred.Status.Token == "" && cred.Status.ClientCertificateData == "" && cred.Status.ClientKeyData == "" { + return fmt.Errorf("exec plugin didn't return a token or cert/key pair") + } + if (cred.Status.ClientCertificateData == "") != (cred.Status.ClientKeyData == "") { + return fmt.Errorf("exec plugin returned only certificate or key, not both") + } + + if cred.Status.ExpirationTimestamp != nil { + a.exp = cred.Status.ExpirationTimestamp.Time + } else { + a.exp = time.Time{} + } + + newCreds := &credentials{ + token: cred.Status.Token, + } + if cred.Status.ClientKeyData != "" && cred.Status.ClientCertificateData != "" { + cert, err := tls.X509KeyPair([]byte(cred.Status.ClientCertificateData), []byte(cred.Status.ClientKeyData)) + if err != nil { + return fmt.Errorf("failed parsing client key/certificate: %v", err) + } + newCreds.cert = &cert + } + + oldCreds := a.cachedCreds + a.cachedCreds = newCreds + // Only close all connections when TLS cert rotates. Token rotation doesn't + // need the extra noise. + if a.onRotate != nil && oldCreds != nil && !reflect.DeepEqual(oldCreds.cert, a.cachedCreds.cert) { + a.onRotate() + } + return nil +} diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go b/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go new file mode 100644 index 000000000..e3398e821 --- /dev/null +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/exec_test.go @@ -0,0 +1,748 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package exec + +import ( + "bytes" + "crypto/ecdsa" + "crypto/elliptic" + "crypto/rand" + "crypto/tls" + "crypto/x509" + "crypto/x509/pkix" + "encoding/json" + "encoding/pem" + "fmt" + "io/ioutil" + "math/big" + "net/http" + "net/http/httptest" + "reflect" + "strings" + "testing" + "time" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/pkg/apis/clientauthentication" + "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/transport" +) + +var ( + certData = []byte(`-----BEGIN CERTIFICATE----- +MIIC6jCCAdSgAwIBAgIBCzALBgkqhkiG9w0BAQswIzEhMB8GA1UEAwwYMTAuMTMu +MTI5LjEwNkAxNDIxMzU5MDU4MB4XDTE1MDExNTIyMDEzMVoX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/6VOuu4QA/Nsj7luMhIBehnEAHW+ +GkzTKM8oD1PxpEG3nPKXYQKBgQC6AuMPRt3XBl1NkCrpSBy/uObFlFaP2Enpf39S +3OZ0Gv0XQrnSaL1kP8TMcz68rMrGX8DaWYsgytstR4W+jyy7WvZwsUu+GjTJ5aMG +77uEcEBpIi9CBzivfn7hPccE8ZgqPf+n4i6q66yxBJflW5xhvafJqDtW2LcPNbW/ +bvzdmQKBgExALRUXpq+5dbmkdXBHtvXdRDZ6rVmrnjy4nI5bPw+1GqQqk6uAR6B/ +F6NmLCQOO4PDG/cuatNHIr2FrwTmGdEL6ObLUGWn9Oer9gJhHVqqsY5I4sEPo4XX +stR0Yiw0buV6DL/moUO0HIM9Bjh96HJp+LxiIS6UCdIhMPp5HoQa +-----END RSA PRIVATE KEY-----`) + validCert *tls.Certificate +) + +func init() { + cert, err := tls.X509KeyPair(certData, keyData) + if err != nil { + panic(err) + } + validCert = &cert +} + +func TestCacheKey(t *testing.T) { + c1 := &api.ExecConfig{ + Command: "foo-bar", + Args: []string{"1", "2"}, + Env: []api.ExecEnvVar{ + {Name: "3", Value: "4"}, + {Name: "5", Value: "6"}, + {Name: "7", Value: "8"}, + }, + APIVersion: "client.authentication.k8s.io/v1alpha1", + } + c2 := &api.ExecConfig{ + Command: "foo-bar", + Args: []string{"1", "2"}, + Env: []api.ExecEnvVar{ + {Name: "3", Value: "4"}, + {Name: "5", Value: "6"}, + {Name: "7", Value: "8"}, + }, + APIVersion: "client.authentication.k8s.io/v1alpha1", + } + c3 := &api.ExecConfig{ + Command: "foo-bar", + Args: []string{"1", "2"}, + Env: []api.ExecEnvVar{ + {Name: "3", Value: "4"}, + {Name: "5", Value: "6"}, + }, + APIVersion: "client.authentication.k8s.io/v1alpha1", + } + key1 := cacheKey(c1) + key2 := cacheKey(c2) + key3 := cacheKey(c3) + if key1 != key2 { + t.Error("key1 and key2 didn't match") + } + if key1 == key3 { + t.Error("key1 and key3 matched") + } + if key2 == key3 { + t.Error("key2 and key3 matched") + } +} + +func compJSON(t *testing.T, got, want []byte) { + t.Helper() + gotJSON := &bytes.Buffer{} + wantJSON := &bytes.Buffer{} + + if err := json.Indent(gotJSON, got, "", " "); err != nil { + t.Errorf("got invalid JSON: %v", err) + } + if err := json.Indent(wantJSON, want, "", " "); err != nil { + t.Errorf("want invalid JSON: %v", err) + } + g := strings.TrimSpace(gotJSON.String()) + w := strings.TrimSpace(wantJSON.String()) + if g != w { + t.Errorf("wanted %q, got %q", w, g) + } +} + +func TestRefreshCreds(t *testing.T) { + tests := []struct { + name string + config api.ExecConfig + output string + interactive bool + response *clientauthentication.Response + wantInput string + wantCreds credentials + wantExpiry time.Time + wantErr bool + }{ + { + name: "basic-request", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: `{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "foo-bar" + } + }`, + wantCreds: credentials{token: "foo-bar"}, + }, + { + name: "interactive", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + interactive: true, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": { + "interactive": true + } + }`, + output: `{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "foo-bar" + } + }`, + wantCreds: credentials{token: "foo-bar"}, + }, + { + name: "response", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + response: &clientauthentication.Response{ + Header: map[string][]string{ + "WWW-Authenticate": {`Basic realm="Access to the staging site", charset="UTF-8"`}, + }, + Code: 401, + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": { + "response": { + "header": { + "WWW-Authenticate": [ + "Basic realm=\"Access to the staging site\", charset=\"UTF-8\"" + ] + }, + "code": 401 + } + } + }`, + output: `{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "foo-bar" + } + }`, + wantCreds: credentials{token: "foo-bar"}, + }, + { + name: "expiry", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: `{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "foo-bar", + "expirationTimestamp": "2006-01-02T15:04:05Z" + } + }`, + wantExpiry: time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC), + wantCreds: credentials{token: "foo-bar"}, + }, + { + name: "no-group-version", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: `{ + "kind": "ExecCredential", + "status": { + "token": "foo-bar" + } + }`, + wantErr: true, + }, + { + name: "no-status", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: `{ + "kind": "ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1" + }`, + wantErr: true, + }, + { + name: "no-creds", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: `{ + "kind": "ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "status": {} + }`, + wantErr: true, + }, + { + name: "TLS credentials", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: fmt.Sprintf(`{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "clientKeyData": %q, + "clientCertificateData": %q + } + }`, keyData, certData), + wantCreds: credentials{cert: validCert}, + }, + { + name: "bad TLS credentials", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: `{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "clientKeyData": "foo", + "clientCertificateData": "bar" + } + }`, + wantErr: true, + }, + { + name: "cert but no key", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1alpha1", + }, + wantInput: `{ + "kind":"ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1alpha1", + "spec": {} + }`, + output: fmt.Sprintf(`{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "clientCertificateData": %q + } + }`, certData), + wantErr: true, + }, + { + name: "beta-basic-request", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1beta1", + }, + output: `{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1beta1", + "status": { + "token": "foo-bar" + } + }`, + wantCreds: credentials{token: "foo-bar"}, + }, + { + name: "beta-expiry", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1beta1", + }, + output: `{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1beta1", + "status": { + "token": "foo-bar", + "expirationTimestamp": "2006-01-02T15:04:05Z" + } + }`, + wantExpiry: time.Date(2006, 01, 02, 15, 04, 05, 0, time.UTC), + wantCreds: credentials{token: "foo-bar"}, + }, + { + name: "beta-no-group-version", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1beta1", + }, + output: `{ + "kind": "ExecCredential", + "status": { + "token": "foo-bar" + } + }`, + wantErr: true, + }, + { + name: "beta-no-status", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1beta1", + }, + output: `{ + "kind": "ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1beta1" + }`, + wantErr: true, + }, + { + name: "beta-no-token", + config: api.ExecConfig{ + APIVersion: "client.authentication.k8s.io/v1beta1", + }, + output: `{ + "kind": "ExecCredential", + "apiVersion":"client.authentication.k8s.io/v1beta1", + "status": {} + }`, + wantErr: true, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + c := test.config + + c.Command = "./testdata/test-plugin.sh" + c.Env = append(c.Env, api.ExecEnvVar{ + Name: "TEST_OUTPUT", + Value: test.output, + }) + + a, err := newAuthenticator(newCache(), &c) + if err != nil { + t.Fatal(err) + } + + stderr := &bytes.Buffer{} + a.stderr = stderr + a.interactive = test.interactive + a.environ = func() []string { return nil } + + if err := a.refreshCredsLocked(test.response); err != nil { + if !test.wantErr { + t.Errorf("get token %v", err) + } + return + } + if test.wantErr { + t.Fatal("expected error getting token") + } + + if !reflect.DeepEqual(a.cachedCreds, &test.wantCreds) { + t.Errorf("expected credentials %+v got %+v", &test.wantCreds, a.cachedCreds) + } + + if !a.exp.Equal(test.wantExpiry) { + t.Errorf("expected expiry %v got %v", test.wantExpiry, a.exp) + } + + if test.wantInput == "" { + if got := strings.TrimSpace(stderr.String()); got != "" { + t.Errorf("expected no input parameters, got %q", got) + } + return + } + + compJSON(t, stderr.Bytes(), []byte(test.wantInput)) + }) + } +} + +func TestRoundTripper(t *testing.T) { + wantToken := "" + + n := time.Now() + now := func() time.Time { return n } + + env := []string{""} + environ := func() []string { + s := make([]string, len(env)) + copy(s, env) + return s + } + + setOutput := func(s string) { + env[0] = "TEST_OUTPUT=" + s + } + + handler := func(w http.ResponseWriter, r *http.Request) { + gotToken := "" + parts := strings.Split(r.Header.Get("Authorization"), " ") + if len(parts) > 1 && strings.EqualFold(parts[0], "bearer") { + gotToken = parts[1] + } + + if wantToken != gotToken { + http.Error(w, "Unauthorized", http.StatusUnauthorized) + return + } + fmt.Fprintln(w, "ok") + } + server := httptest.NewServer(http.HandlerFunc(handler)) + + c := api.ExecConfig{ + Command: "./testdata/test-plugin.sh", + APIVersion: "client.authentication.k8s.io/v1alpha1", + } + a, err := newAuthenticator(newCache(), &c) + if err != nil { + t.Fatal(err) + } + a.environ = environ + a.now = now + a.stderr = ioutil.Discard + + tc := &transport.Config{} + if err := a.UpdateTransportConfig(tc); err != nil { + t.Fatal(err) + } + client := http.Client{ + Transport: tc.WrapTransport(http.DefaultTransport), + } + + get := func(t *testing.T, statusCode int) { + t.Helper() + resp, err := client.Get(server.URL) + if err != nil { + t.Fatal(err) + } + defer resp.Body.Close() + if resp.StatusCode != statusCode { + t.Errorf("wanted status %d got %d", statusCode, resp.StatusCode) + } + } + + setOutput(`{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "token1" + } + }`) + wantToken = "token1" + get(t, http.StatusOK) + + setOutput(`{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "token2" + } + }`) + // Previous token should be cached + get(t, http.StatusOK) + + wantToken = "token2" + // Token is still cached, hits unauthorized but causes token to rotate. + get(t, http.StatusUnauthorized) + // Follow up request uses the rotated token. + get(t, http.StatusOK) + + setOutput(`{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "token3", + "expirationTimestamp": "` + now().Add(time.Hour).Format(time.RFC3339Nano) + `" + } + }`) + wantToken = "token3" + // Token is still cached, hit's unauthorized but causes rotation to token with an expiry. + get(t, http.StatusUnauthorized) + get(t, http.StatusOK) + + // Move time forward 2 hours, "token3" is now expired. + n = n.Add(time.Hour * 2) + setOutput(`{ + "kind": "ExecCredential", + "apiVersion": "client.authentication.k8s.io/v1alpha1", + "status": { + "token": "token4", + "expirationTimestamp": "` + now().Add(time.Hour).Format(time.RFC3339Nano) + `" + } + }`) + wantToken = "token4" + // Old token is expired, should refresh automatically without hitting a 401. + get(t, http.StatusOK) +} + +func TestTLSCredentials(t *testing.T) { + now := time.Now() + + certPool := x509.NewCertPool() + cert, key := genClientCert(t) + if !certPool.AppendCertsFromPEM(cert) { + t.Fatal("failed to add client cert to CertPool") + } + + server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintln(w, "ok") + })) + server.TLS = &tls.Config{ + ClientAuth: tls.RequireAndVerifyClientCert, + ClientCAs: certPool, + } + server.StartTLS() + defer server.Close() + + a, err := newAuthenticator(newCache(), &api.ExecConfig{ + Command: "./testdata/test-plugin.sh", + APIVersion: "client.authentication.k8s.io/v1alpha1", + }) + if err != nil { + t.Fatal(err) + } + var output *clientauthentication.ExecCredential + a.environ = func() []string { + data, err := runtime.Encode(codecs.LegacyCodec(a.group), output) + if err != nil { + t.Fatal(err) + } + return []string{"TEST_OUTPUT=" + string(data)} + } + a.now = func() time.Time { return now } + a.stderr = ioutil.Discard + + // We're not interested in server's cert, this test is about client cert. + tc := &transport.Config{TLS: transport.TLSConfig{Insecure: true}} + if err := a.UpdateTransportConfig(tc); err != nil { + t.Fatal(err) + } + + get := func(t *testing.T, desc string, wantErr bool) { + t.Run(desc, func(t *testing.T) { + tlsCfg, err := transport.TLSConfigFor(tc) + if err != nil { + t.Fatal("TLSConfigFor:", err) + } + client := http.Client{ + Transport: &http.Transport{TLSClientConfig: tlsCfg}, + } + resp, err := client.Get(server.URL) + switch { + case err != nil && !wantErr: + t.Errorf("got client.Get error: %q, want nil", err) + case err == nil && wantErr: + t.Error("got nil client.Get error, want non-nil") + } + if err == nil { + resp.Body.Close() + } + }) + } + + output = &clientauthentication.ExecCredential{ + Status: &clientauthentication.ExecCredentialStatus{ + ClientCertificateData: string(cert), + ClientKeyData: string(key), + ExpirationTimestamp: &v1.Time{now.Add(time.Hour)}, + }, + } + get(t, "valid TLS cert", false) + + // Advance time to force re-exec. + nCert, nKey := genClientCert(t) + now = now.Add(time.Hour * 2) + output = &clientauthentication.ExecCredential{ + Status: &clientauthentication.ExecCredentialStatus{ + ClientCertificateData: string(nCert), + ClientKeyData: string(nKey), + ExpirationTimestamp: &v1.Time{now.Add(time.Hour)}, + }, + } + get(t, "untrusted TLS cert", true) + + now = now.Add(time.Hour * 2) + output = &clientauthentication.ExecCredential{ + Status: &clientauthentication.ExecCredentialStatus{ + ClientCertificateData: string(cert), + ClientKeyData: string(key), + ExpirationTimestamp: &v1.Time{now.Add(time.Hour)}, + }, + } + get(t, "valid TLS cert again", false) +} + +// genClientCert generates an x509 certificate for testing. Certificate and key +// are returned in PEM encoding. +func genClientCert(t *testing.T) ([]byte, []byte) { + key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + t.Fatal(err) + } + keyRaw, err := x509.MarshalECPrivateKey(key) + if err != nil { + t.Fatal(err) + } + serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128) + serialNumber, err := rand.Int(rand.Reader, serialNumberLimit) + if err != nil { + t.Fatal(err) + } + cert := &x509.Certificate{ + SerialNumber: serialNumber, + Subject: pkix.Name{Organization: []string{"Acme Co"}}, + NotBefore: time.Now(), + NotAfter: time.Now().Add(24 * time.Hour), + + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + BasicConstraintsValid: true, + } + certRaw, err := x509.CreateCertificate(rand.Reader, cert, cert, key.Public(), key) + if err != nil { + t.Fatal(err) + } + return pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: certRaw}), + pem.EncodeToMemory(&pem.Block{Type: "PRIVATE KEY", Bytes: keyRaw}) +} diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/testdata/test-plugin.sh b/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/testdata/test-plugin.sh new file mode 100755 index 000000000..aa7daad5f --- /dev/null +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/exec/testdata/test-plugin.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +# Copyright 2018 The Kubernetes 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. + +>&2 echo "$KUBERNETES_EXEC_INFO" +echo "$TEST_OUTPUT" diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD b/deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD deleted file mode 100644 index 30c710fc1..000000000 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["gcp_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/gcp", - deps = ["//vendor/golang.org/x/oauth2:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = ["gcp.go"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/gcp", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/golang.org/x/oauth2:go_default_library", - "//vendor/golang.org/x/oauth2/google:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/jsonpath:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go b/deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go index 3a4f86777..193d0c727 100644 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/gcp/gcp.go @@ -18,6 +18,7 @@ package gcp import ( "bytes" + "context" "encoding/json" "fmt" "net/http" @@ -27,7 +28,6 @@ import ( "time" "github.com/golang/glog" - "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "k8s.io/apimachinery/pkg/util/net" diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/BUILD b/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/BUILD deleted file mode 100644 index d2ac14664..000000000 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["oidc_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/oidc", -) - -go_library( - name = "go_default_library", - srcs = ["oidc.go"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/oidc", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/oauth2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS b/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS index d2210cb89..e0f3c6ca9 100644 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/OWNERS @@ -2,3 +2,4 @@ approvers: - ericchiang reviewers: - ericchiang +- rithujohn191 diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go b/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go index 1fe52c524..9c3ea0ab8 100644 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/oidc/oidc.go @@ -279,7 +279,7 @@ func (p *oidcAuthProvider) idToken() (string, error) { // Persist new config and if successful, update the in memory config. if err = p.persister.Persist(newCfg); err != nil { - return "", fmt.Errorf("could not perist new tokens: %v", err) + return "", fmt.Errorf("could not persist new tokens: %v", err) } p.cfg = newCfg diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/BUILD b/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/BUILD deleted file mode 100644 index 1ee50f38a..000000000 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["openstack_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/openstack", -) - -go_library( - name = "go_default_library", - srcs = ["openstack.go"], - importpath = "k8s.io/client-go/plugin/pkg/client/auth/openstack", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/gophercloud/gophercloud/openstack:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack.go b/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack.go index 490eff128..e6d7f0493 100644 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack.go +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack.go @@ -23,6 +23,7 @@ import ( "time" "github.com/golang/glog" + "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack" "k8s.io/apimachinery/pkg/util/net" @@ -42,8 +43,7 @@ const DefaultTTLDuration = 10 * time.Minute // the environment variables to determine the client identity, and generates a // token which will be inserted into the request header later. type openstackAuthProvider struct { - ttl time.Duration - + ttl time.Duration tokenGetter TokenGetter } @@ -52,13 +52,23 @@ type TokenGetter interface { Token() (string, error) } -type tokenGetter struct{} +type tokenGetter struct { + authOpt *gophercloud.AuthOptions +} // Token creates a token by authenticate with keystone. -func (*tokenGetter) Token() (string, error) { - options, err := openstack.AuthOptionsFromEnv() - if err != nil { - return "", fmt.Errorf("failed to read openstack env vars: %s", err) +func (t *tokenGetter) Token() (string, error) { + var options gophercloud.AuthOptions + var err error + if t.authOpt == nil { + // reads the config from the environment + glog.V(4).Info("reading openstack config from the environment variables") + options, err = openstack.AuthOptionsFromEnv() + if err != nil { + return "", fmt.Errorf("failed to read openstack env vars: %s", err) + } + } else { + options = *t.authOpt } client, err := openstack.AuthenticatedClient(options) if err != nil { @@ -85,7 +95,7 @@ func (c *cachedGetter) Token() (string, error) { var err error // no token or exceeds the TTL - if c.token == "" || time.Now().Sub(c.born) > c.ttl { + if c.token == "" || time.Since(c.born) > c.ttl { c.token, err = c.tokenGetter.Token() if err != nil { return "", fmt.Errorf("failed to get token: %s", err) @@ -126,10 +136,11 @@ func (t *tokenRoundTripper) WrappedRoundTripper() http.RoundTripper { return t.R // newOpenstackAuthProvider creates an auth provider which works with openstack // environment. -func newOpenstackAuthProvider(clusterAddress string, config map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { +func newOpenstackAuthProvider(_ string, config map[string]string, persister restclient.AuthProviderConfigPersister) (restclient.AuthProvider, error) { var ttlDuration time.Duration var err error + glog.Warningf("WARNING: in-tree openstack auth plugin is now deprecated. please use the \"client-keystone-auth\" kubectl/client-go credential plugin instead") ttl, found := config["ttl"] if !found { ttlDuration = DefaultTTLDuration @@ -145,11 +156,27 @@ func newOpenstackAuthProvider(clusterAddress string, config map[string]string, p } } - // TODO: read/persist client configuration(OS_XXX env vars) in config + authOpt := gophercloud.AuthOptions{ + IdentityEndpoint: config["identityEndpoint"], + Username: config["username"], + Password: config["password"], + DomainName: config["name"], + TenantID: config["tenantId"], + TenantName: config["tenantName"], + } + + getter := tokenGetter{} + // not empty + if (authOpt != gophercloud.AuthOptions{}) { + if len(authOpt.IdentityEndpoint) == 0 { + return nil, fmt.Errorf("empty %q in the config for openstack auth provider", "identityEndpoint") + } + getter.authOpt = &authOpt + } return &openstackAuthProvider{ ttl: ttlDuration, - tokenGetter: &tokenGetter{}, + tokenGetter: &getter, }, nil } diff --git a/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack_test.go b/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack_test.go index 411bec70f..24d55b9fc 100644 --- a/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack_test.go +++ b/deps/k8s.io/client-go/plugin/pkg/client/auth/openstack/openstack_test.go @@ -114,3 +114,60 @@ func TestOpenstackAuthProvider(t *testing.T) { } } + +type fakePersister struct{} + +func (i *fakePersister) Persist(map[string]string) error { + return nil +} + +func TestNewOpenstackAuthProvider(t *testing.T) { + tests := []struct { + name string + config map[string]string + expectError bool + }{ + { + name: "normal config without openstack configurations", + config: map[string]string{ + "ttl": "1s", + "foo": "bar", + }, + }, + { + name: "openstack auth provider: missing identityEndpoint", + config: map[string]string{ + "ttl": "1s", + "foo": "bar", + "username": "xyz", + "password": "123", + "tenantName": "admin", + }, + expectError: true, + }, + { + name: "openstack auth provider", + config: map[string]string{ + "ttl": "1s", + "foo": "bar", + "identityEndpoint": "http://controller:35357/v3", + "username": "xyz", + "password": "123", + "tenantName": "admin", + }, + }, + } + + for _, test := range tests { + _, err := newOpenstackAuthProvider("test", test.config, &fakePersister{}) + if err != nil { + if !test.expectError { + t.Errorf("unexpected error: %v", err) + } + } else { + if test.expectError { + t.Error("expect error, but nil") + } + } + } +} diff --git a/deps/k8s.io/client-go/rest/BUILD b/deps/k8s.io/client-go/rest/BUILD deleted file mode 100644 index 3d0972dd5..000000000 --- a/deps/k8s.io/client-go/rest/BUILD +++ /dev/null @@ -1,100 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "client_test.go", - "config_test.go", - "plugin_test.go", - "request_test.go", - "url_utils_test.go", - "urlbackoff_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/rest", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - "//vendor/k8s.io/client-go/util/testing:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "config.go", - "plugin.go", - "request.go", - "transport.go", - "url_utils.go", - "urlbackoff.go", - "versions.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/client-go/rest", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/http2:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/rest/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - "//vendor/k8s.io/client-go/tools/metrics:go_default_library", - "//vendor/k8s.io/client-go/transport:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/rest/fake:all-srcs", - "//staging/src/k8s.io/client-go/rest/watch:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/rest/config.go b/deps/k8s.io/client-go/rest/config.go index c1a11b8f0..39fde2de5 100644 --- a/deps/k8s.io/client-go/rest/config.go +++ b/deps/k8s.io/client-go/rest/config.go @@ -17,6 +17,7 @@ limitations under the License. package rest import ( + "context" "fmt" "io/ioutil" "net" @@ -29,7 +30,6 @@ import ( "github.com/golang/glog" - "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -77,6 +77,9 @@ type Config struct { // Callback to persist config for AuthProvider. AuthConfigPersister AuthProviderConfigPersister + // Exec-based authentication provider. + ExecProvider *clientcmdapi.ExecConfig + // TLSClientConfig contains settings to enable transport layer security TLSClientConfig @@ -108,7 +111,7 @@ type Config struct { Timeout time.Duration // Dial specifies the dial function for creating unencrypted TCP connections. - Dial func(network, addr string) (net.Conn, error) + Dial func(ctx context.Context, network, address string) (net.Conn, error) // Version forces a specific version to be used (if registered) // Do we need this? @@ -217,7 +220,7 @@ func RESTClientFor(config *Config) (*RESTClient, error) { // the config.Version to be empty. func UnversionedRESTClientFor(config *Config) (*RESTClient, error) { if config.NegotiatedSerializer == nil { - return nil, fmt.Errorf("NeogitatedSerializer is required when initializing a RESTClient") + return nil, fmt.Errorf("NegotiatedSerializer is required when initializing a RESTClient") } baseURL, versionedAPIPath, err := defaultServerUrlFor(config) @@ -313,12 +316,12 @@ func InClusterConfig() (*Config, error) { return nil, fmt.Errorf("unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined") } - token, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/" + v1.ServiceAccountTokenKey) + token, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/token") if err != nil { return nil, err } tlsClientConfig := TLSClientConfig{} - rootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/" + v1.ServiceAccountRootCAKey + rootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" if _, err := certutil.NewPool(rootCAFile); err != nil { glog.Errorf("Expected to load root CA config from %s, but got err: %v", rootCAFile, err) } else { @@ -432,6 +435,7 @@ func CopyConfig(config *Config) *Config { }, AuthProvider: config.AuthProvider, AuthConfigPersister: config.AuthConfigPersister, + ExecProvider: config.ExecProvider, TLSClientConfig: TLSClientConfig{ Insecure: config.TLSClientConfig.Insecure, ServerName: config.TLSClientConfig.ServerName, diff --git a/deps/k8s.io/client-go/rest/config_test.go b/deps/k8s.io/client-go/rest/config_test.go index 5d4d1a2fe..347864285 100644 --- a/deps/k8s.io/client-go/rest/config_test.go +++ b/deps/k8s.io/client-go/rest/config_test.go @@ -17,6 +17,8 @@ limitations under the License. package rest import ( + "context" + "errors" "io" "net" "net/http" @@ -25,8 +27,6 @@ import ( "strings" "testing" - fuzz "github.com/google/gofuzz" - "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -35,8 +35,7 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/util/flowcontrol" - "errors" - + fuzz "github.com/google/gofuzz" "github.com/stretchr/testify/assert" ) @@ -208,7 +207,7 @@ func (n *fakeNegotiatedSerializer) DecoderToVersion(serializer runtime.Decoder, return &fakeCodec{} } -var fakeDialFunc = func(network, addr string) (net.Conn, error) { +var fakeDialFunc = func(ctx context.Context, network, addr string) (net.Conn, error) { return nil, fakeDialerError } var fakeDialerError = errors.New("fakedialer") @@ -253,7 +252,7 @@ func TestAnonymousConfig(t *testing.T) { r.Config = map[string]string{} }, // Dial does not require fuzzer - func(r *func(network, addr string) (net.Conn, error), f fuzz.Continue) {}, + func(r *func(ctx context.Context, network, addr string) (net.Conn, error), f fuzz.Continue) {}, ) for i := 0; i < 20; i++ { original := &Config{} @@ -269,6 +268,7 @@ func TestAnonymousConfig(t *testing.T) { expected.Password = "" expected.AuthProvider = nil expected.AuthConfigPersister = nil + expected.ExecProvider = nil expected.TLSClientConfig.CertData = nil expected.TLSClientConfig.CertFile = "" expected.TLSClientConfig.KeyData = nil @@ -283,10 +283,10 @@ func TestAnonymousConfig(t *testing.T) { expected.WrapTransport = nil } if actual.Dial != nil { - _, actualError := actual.Dial("", "") - _, expectedError := actual.Dial("", "") + _, actualError := actual.Dial(context.Background(), "", "") + _, expectedError := expected.Dial(context.Background(), "", "") if !reflect.DeepEqual(expectedError, actualError) { - t.Fatalf("CopyConfig dropped the Dial field") + t.Fatalf("CopyConfig dropped the Dial field") } } else { actual.Dial = nil @@ -328,7 +328,7 @@ func TestCopyConfig(t *testing.T) { func(r *AuthProviderConfigPersister, f fuzz.Continue) { *r = fakeAuthProviderConfigPersister{} }, - func(r *func(network, addr string) (net.Conn, error), f fuzz.Continue) { + func(r *func(ctx context.Context, network, addr string) (net.Conn, error), f fuzz.Continue) { *r = fakeDialFunc }, ) @@ -350,8 +350,8 @@ func TestCopyConfig(t *testing.T) { expected.WrapTransport = nil } if actual.Dial != nil { - _, actualError := actual.Dial("", "") - _, expectedError := actual.Dial("", "") + _, actualError := actual.Dial(context.Background(), "", "") + _, expectedError := expected.Dial(context.Background(), "", "") if !reflect.DeepEqual(expectedError, actualError) { t.Fatalf("CopyConfig dropped the Dial field") } @@ -360,7 +360,7 @@ func TestCopyConfig(t *testing.T) { expected.Dial = nil if actual.AuthConfigPersister != nil { actualError := actual.AuthConfigPersister.Persist(nil) - expectedError := actual.AuthConfigPersister.Persist(nil) + expectedError := expected.AuthConfigPersister.Persist(nil) if !reflect.DeepEqual(expectedError, actualError) { t.Fatalf("CopyConfig dropped the Dial field") } diff --git a/deps/k8s.io/client-go/rest/fake/BUILD b/deps/k8s.io/client-go/rest/fake/BUILD deleted file mode 100644 index e511b207a..000000000 --- a/deps/k8s.io/client-go/rest/fake/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["fake.go"], - importpath = "k8s.io/client-go/rest/fake", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/rest/fake/fake.go b/deps/k8s.io/client-go/rest/fake/fake.go index bc43a90ac..bbba2da3e 100644 --- a/deps/k8s.io/client-go/rest/fake/fake.go +++ b/deps/k8s.io/client-go/rest/fake/fake.go @@ -94,14 +94,10 @@ func (c *RESTClient) request(verb string) *restclient.Request { ns := c.NegotiatedSerializer info, _ := runtime.SerializerInfoForMediaType(ns.SupportedMediaTypes(), runtime.ContentTypeJSON) - internalVersion := schema.GroupVersion{ - Group: c.GroupVersion.Group, - Version: runtime.APIVersionInternal, - } serializers := restclient.Serializers{ // TODO this was hardcoded before, but it doesn't look right Encoder: ns.EncoderForVersion(info.Serializer, c.GroupVersion), - Decoder: ns.DecoderToVersion(info.Serializer, internalVersion), + Decoder: ns.DecoderToVersion(info.Serializer, c.GroupVersion), } if info.StreamSerializer != nil { serializers.StreamingSerializer = info.StreamSerializer.Serializer diff --git a/deps/k8s.io/client-go/rest/request.go b/deps/k8s.io/client-go/rest/request.go index 6ca9e0197..69ce1c759 100644 --- a/deps/k8s.io/client-go/rest/request.go +++ b/deps/k8s.io/client-go/rest/request.go @@ -198,7 +198,7 @@ func (r *Request) Throttle(limiter flowcontrol.RateLimiter) *Request { return r } -// SubResource sets a sub-resource path which can be multiple segments segment after the resource +// SubResource sets a sub-resource path which can be multiple segments after the resource // name but before the suffix. func (r *Request) SubResource(subresources ...string) *Request { if r.err != nil { @@ -317,10 +317,14 @@ func (r *Request) Param(paramName, s string) *Request { // VersionedParams will not write query parameters that have omitempty set and are empty. If a // parameter has already been set it is appended to (Params and VersionedParams are additive). func (r *Request) VersionedParams(obj runtime.Object, codec runtime.ParameterCodec) *Request { + return r.SpecificallyVersionedParams(obj, codec, *r.content.GroupVersion) +} + +func (r *Request) SpecificallyVersionedParams(obj runtime.Object, codec runtime.ParameterCodec, version schema.GroupVersion) *Request { if r.err != nil { return r } - params, err := codec.EncodeParameters(obj, *r.content.GroupVersion) + params, err := codec.EncodeParameters(obj, version) if err != nil { r.err = err return r @@ -353,8 +357,8 @@ func (r *Request) SetHeader(key string, values ...string) *Request { return r } -// Timeout makes the request use the given duration as a timeout. Sets the "timeout" -// parameter. +// Timeout makes the request use the given duration as an overall timeout for the +// request. Additionally, if set passes the value as "timeout" parameter in URL. func (r *Request) Timeout(d time.Duration) *Request { if r.err != nil { return r @@ -485,6 +489,19 @@ func (r *Request) tryThrottle() { // Watch attempts to begin watching the requested location. // Returns a watch.Interface, or an error. func (r *Request) Watch() (watch.Interface, error) { + return r.WatchWithSpecificDecoders( + func(body io.ReadCloser) streaming.Decoder { + framer := r.serializers.Framer.NewFrameReader(body) + return streaming.NewDecoder(framer, r.serializers.StreamingSerializer) + }, + r.serializers.Decoder, + ) +} + +// WatchWithSpecificDecoders attempts to begin watching the requested location with a *different* decoder. +// Turns out that you want one "standard" decoder for the watch event and one "personal" decoder for the content +// Returns a watch.Interface, or an error. +func (r *Request) WatchWithSpecificDecoders(wrapperDecoderFn func(io.ReadCloser) streaming.Decoder, embeddedDecoder runtime.Decoder) (watch.Interface, error) { // We specifically don't want to rate limit watches, so we // don't use r.throttle here. if r.err != nil { @@ -532,9 +549,8 @@ func (r *Request) Watch() (watch.Interface, error) { } return nil, fmt.Errorf("for request '%+v', got status: %v", url, resp.StatusCode) } - framer := r.serializers.Framer.NewFrameReader(resp.Body) - decoder := streaming.NewDecoder(framer, r.serializers.StreamingSerializer) - return watch.NewStreamWatcher(restclientwatch.NewDecoder(decoder, r.serializers.Decoder)), nil + wrapperDecoder := wrapperDecoderFn(resp.Body) + return watch.NewStreamWatcher(restclientwatch.NewDecoder(wrapperDecoder, embeddedDecoder)), nil } // updateURLMetrics is a convenience function for pushing metrics. @@ -640,7 +656,6 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { } // Right now we make about ten retry attempts if we get a Retry-After response. - // TODO: Change to a timeout based approach. maxRetries := 10 retries := 0 for { @@ -649,6 +664,14 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { if err != nil { return err } + if r.timeout > 0 { + if r.ctx == nil { + r.ctx = context.Background() + } + var cancelFn context.CancelFunc + r.ctx, cancelFn = context.WithTimeout(r.ctx, r.timeout) + defer cancelFn() + } if r.ctx != nil { req = req.WithContext(r.ctx) } @@ -708,7 +731,7 @@ func (r *Request) request(fn func(*http.Request, *http.Response)) error { } } - glog.V(4).Infof("Got a Retry-After %s response for attempt %d to %v", seconds, retries, url) + glog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v", seconds, retries, url) r.backoffMgr.Sleep(time.Duration(seconds) * time.Second) return false } diff --git a/deps/k8s.io/client-go/rest/request_test.go b/deps/k8s.io/client-go/rest/request_test.go index fac690255..f75ee86cb 100755 --- a/deps/k8s.io/client-go/rest/request_test.go +++ b/deps/k8s.io/client-go/rest/request_test.go @@ -1522,7 +1522,7 @@ func TestBody(t *testing.T) { f.Close() defer os.Remove(f.Name()) - var nilObject *v1.DeleteOptions + var nilObject *metav1.DeleteOptions typedObject := interface{}(nilObject) c := testRESTClient(t, nil) tests := []struct { diff --git a/deps/k8s.io/client-go/rest/transport.go b/deps/k8s.io/client-go/rest/transport.go index 878c6abf1..25c1801b6 100644 --- a/deps/k8s.io/client-go/rest/transport.go +++ b/deps/k8s.io/client-go/rest/transport.go @@ -18,8 +18,10 @@ package rest import ( "crypto/tls" + "errors" "net/http" + "k8s.io/client-go/plugin/pkg/client/auth/exec" "k8s.io/client-go/transport" ) @@ -58,25 +60,10 @@ func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTrip // TransportConfig converts a client config to an appropriate transport config. func (c *Config) TransportConfig() (*transport.Config, error) { - wt := c.WrapTransport - if c.AuthProvider != nil { - provider, err := GetAuthProvider(c.Host, c.AuthProvider, c.AuthConfigPersister) - if err != nil { - return nil, err - } - if wt != nil { - previousWT := wt - wt = func(rt http.RoundTripper) http.RoundTripper { - return provider.WrapTransport(previousWT(rt)) - } - } else { - wt = provider.WrapTransport - } - } - return &transport.Config{ + conf := &transport.Config{ UserAgent: c.UserAgent, Transport: c.Transport, - WrapTransport: wt, + WrapTransport: c.WrapTransport, TLS: transport.TLSConfig{ Insecure: c.Insecure, ServerName: c.ServerName, @@ -96,5 +83,34 @@ func (c *Config) TransportConfig() (*transport.Config, error) { Extra: c.Impersonate.Extra, }, Dial: c.Dial, - }, nil + } + + if c.ExecProvider != nil && c.AuthProvider != nil { + return nil, errors.New("execProvider and authProvider cannot be used in combination") + } + + if c.ExecProvider != nil { + provider, err := exec.GetAuthenticator(c.ExecProvider) + if err != nil { + return nil, err + } + if err := provider.UpdateTransportConfig(conf); err != nil { + return nil, err + } + } + if c.AuthProvider != nil { + provider, err := GetAuthProvider(c.Host, c.AuthProvider, c.AuthConfigPersister) + if err != nil { + return nil, err + } + wt := conf.WrapTransport + if wt != nil { + conf.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { + return provider.WrapTransport(wt(rt)) + } + } else { + conf.WrapTransport = provider.WrapTransport + } + } + return conf, nil } diff --git a/deps/k8s.io/client-go/rest/versions.go b/deps/k8s.io/client-go/rest/versions.go deleted file mode 100644 index 9d41812f2..000000000 --- a/deps/k8s.io/client-go/rest/versions.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package rest - -import ( - "encoding/json" - "fmt" - "net/http" - "path" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - legacyAPIPath = "/api" - defaultAPIPath = "/apis" -) - -// TODO: Is this obsoleted by the discovery client? - -// ServerAPIVersions returns the GroupVersions supported by the API server. -// It creates a RESTClient based on the passed in config, but it doesn't rely -// on the Version and Codec of the config, because it uses AbsPath and -// takes the raw response. -func ServerAPIVersions(c *Config) (groupVersions []string, err error) { - transport, err := TransportFor(c) - if err != nil { - return nil, err - } - client := http.Client{Transport: transport} - - configCopy := *c - configCopy.GroupVersion = nil - configCopy.APIPath = "" - baseURL, _, err := defaultServerUrlFor(&configCopy) - if err != nil { - return nil, err - } - // Get the groupVersions exposed at /api - originalPath := baseURL.Path - baseURL.Path = path.Join(originalPath, legacyAPIPath) - resp, err := client.Get(baseURL.String()) - if err != nil { - return nil, err - } - var v metav1.APIVersions - defer resp.Body.Close() - err = json.NewDecoder(resp.Body).Decode(&v) - if err != nil { - return nil, fmt.Errorf("unexpected error: %v", err) - } - - groupVersions = append(groupVersions, v.Versions...) - // Get the groupVersions exposed at /apis - baseURL.Path = path.Join(originalPath, defaultAPIPath) - resp2, err := client.Get(baseURL.String()) - if err != nil { - return nil, err - } - var apiGroupList metav1.APIGroupList - defer resp2.Body.Close() - err = json.NewDecoder(resp2.Body).Decode(&apiGroupList) - if err != nil { - return nil, fmt.Errorf("unexpected error: %v", err) - } - - for _, g := range apiGroupList.Groups { - for _, gv := range g.Versions { - groupVersions = append(groupVersions, gv.GroupVersion) - } - } - - return groupVersions, nil -} diff --git a/deps/k8s.io/client-go/rest/watch/BUILD b/deps/k8s.io/client-go/rest/watch/BUILD deleted file mode 100644 index 271832863..000000000 --- a/deps/k8s.io/client-go/rest/watch/BUILD +++ /dev/null @@ -1,57 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "decoder.go", - "encoder.go", - ], - importpath = "k8s.io/client-go/rest/watch", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = [ - "decoder_test.go", - "encoder_test.go", - ], - importpath = "k8s.io/client-go/rest/watch_test", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/streaming:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest/watch:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/rest/zz_generated.deepcopy.go b/deps/k8s.io/client-go/rest/zz_generated.deepcopy.go index 02d3b606e..c1ab45f33 100644 --- a/deps/k8s.io/client-go/rest/zz_generated.deepcopy.go +++ b/deps/k8s.io/client-go/rest/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package rest diff --git a/deps/k8s.io/client-go/restmapper/category_expansion.go b/deps/k8s.io/client-go/restmapper/category_expansion.go new file mode 100644 index 000000000..1620bbcf8 --- /dev/null +++ b/deps/k8s.io/client-go/restmapper/category_expansion.go @@ -0,0 +1,119 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package restmapper + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/discovery" +) + +// CategoryExpander maps category strings to GroupResouces. +// Categories are classification or 'tag' of a group of resources. +type CategoryExpander interface { + Expand(category string) ([]schema.GroupResource, bool) +} + +// SimpleCategoryExpander implements CategoryExpander interface +// using a static mapping of categories to GroupResource mapping. +type SimpleCategoryExpander struct { + Expansions map[string][]schema.GroupResource +} + +// Expand fulfills CategoryExpander +func (e SimpleCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) { + ret, ok := e.Expansions[category] + return ret, ok +} + +// discoveryCategoryExpander struct lets a REST Client wrapper (discoveryClient) to retrieve list of APIResourceList, +// and then convert to fallbackExpander +type discoveryCategoryExpander struct { + discoveryClient discovery.DiscoveryInterface +} + +// NewDiscoveryCategoryExpander returns a category expander that makes use of the "categories" fields from +// the API, found through the discovery client. In case of any error or no category found (which likely +// means we're at a cluster prior to categories support, fallback to the expander provided. +func NewDiscoveryCategoryExpander(client discovery.DiscoveryInterface) CategoryExpander { + if client == nil { + panic("Please provide discovery client to shortcut expander") + } + return discoveryCategoryExpander{discoveryClient: client} +} + +// Expand fulfills CategoryExpander +func (e discoveryCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) { + // Get all supported resources for groups and versions from server, if no resource found, fallback anyway. + apiResourceLists, _ := e.discoveryClient.ServerResources() + if len(apiResourceLists) == 0 { + return nil, false + } + + discoveredExpansions := map[string][]schema.GroupResource{} + for _, apiResourceList := range apiResourceLists { + gv, err := schema.ParseGroupVersion(apiResourceList.GroupVersion) + if err != nil { + continue + } + // Collect GroupVersions by categories + for _, apiResource := range apiResourceList.APIResources { + if categories := apiResource.Categories; len(categories) > 0 { + for _, category := range categories { + groupResource := schema.GroupResource{ + Group: gv.Group, + Resource: apiResource.Name, + } + discoveredExpansions[category] = append(discoveredExpansions[category], groupResource) + } + } + } + } + + ret, ok := discoveredExpansions[category] + return ret, ok +} + +// UnionCategoryExpander implements CategoryExpander interface. +// It maps given category string to union of expansions returned by all the CategoryExpanders in the list. +type UnionCategoryExpander []CategoryExpander + +// Expand fulfills CategoryExpander +func (u UnionCategoryExpander) Expand(category string) ([]schema.GroupResource, bool) { + ret := []schema.GroupResource{} + ok := false + + // Expand the category for each CategoryExpander in the list and merge/combine the results. + for _, expansion := range u { + curr, currOk := expansion.Expand(category) + + for _, currGR := range curr { + found := false + for _, existing := range ret { + if existing == currGR { + found = true + break + } + } + if !found { + ret = append(ret, currGR) + } + } + ok = ok || currOk + } + + return ret, ok +} diff --git a/deps/k8s.io/client-go/restmapper/category_expansion_test.go b/deps/k8s.io/client-go/restmapper/category_expansion_test.go new file mode 100644 index 000000000..8537a6b49 --- /dev/null +++ b/deps/k8s.io/client-go/restmapper/category_expansion_test.go @@ -0,0 +1,145 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package restmapper + +import ( + "reflect" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func TestCategoryExpansion(t *testing.T) { + tests := []struct { + name string + arg string + + expected []schema.GroupResource + expectedOk bool + }{ + { + name: "no-replacement", + arg: "service", + expected: nil, + }, + { + name: "all-replacement", + arg: "all", + expected: []schema.GroupResource{ + {Resource: "one"}, + {Resource: "two"}, + {Resource: "three", Group: "alpha"}, + {Resource: "four", Group: "bravo"}, + }, + expectedOk: true, + }, + } + + for _, test := range tests { + simpleCategoryExpander := SimpleCategoryExpander{ + Expansions: map[string][]schema.GroupResource{ + "all": { + {Group: "", Resource: "one"}, + {Group: "", Resource: "two"}, + {Group: "alpha", Resource: "three"}, + {Group: "bravo", Resource: "four"}, + }, + }, + } + + actual, actualOk := simpleCategoryExpander.Expand(test.arg) + if e, a := test.expected, actual; !reflect.DeepEqual(e, a) { + t.Errorf("%s: expected %s, got %s", test.name, e, a) + } + if e, a := test.expectedOk, actualOk; e != a { + t.Errorf("%s: expected %v, got %v", test.name, e, a) + } + } +} + +func TestDiscoveryCategoryExpander(t *testing.T) { + tests := []struct { + category string + serverResponse []*metav1.APIResourceList + expected []schema.GroupResource + }{ + { + category: "all", + serverResponse: []*metav1.APIResourceList{ + { + GroupVersion: "batch/v1", + APIResources: []metav1.APIResource{ + { + Name: "jobs", + ShortNames: []string{"jz"}, + Categories: []string{"all"}, + }, + }, + }, + }, + expected: []schema.GroupResource{ + { + Group: "batch", + Resource: "jobs", + }, + }, + }, + { + category: "all", + serverResponse: []*metav1.APIResourceList{ + { + GroupVersion: "batch/v1", + APIResources: []metav1.APIResource{ + { + Name: "jobs", + ShortNames: []string{"jz"}, + }, + }, + }, + }, + }, + { + category: "targaryens", + serverResponse: []*metav1.APIResourceList{ + { + GroupVersion: "batch/v1", + APIResources: []metav1.APIResource{ + { + Name: "jobs", + ShortNames: []string{"jz"}, + Categories: []string{"all"}, + }, + }, + }, + }, + }, + } + + dc := &fakeDiscoveryClient{} + for _, test := range tests { + dc.serverResourcesHandler = func() ([]*metav1.APIResourceList, error) { + return test.serverResponse, nil + } + expander := NewDiscoveryCategoryExpander(dc) + expanded, _ := expander.Expand(test.category) + if !reflect.DeepEqual(expanded, test.expected) { + t.Errorf("expected %v, got %v", test.expected, expanded) + } + } + +} diff --git a/deps/k8s.io/client-go/restmapper/discovery.go b/deps/k8s.io/client-go/restmapper/discovery.go new file mode 100644 index 000000000..aa158626a --- /dev/null +++ b/deps/k8s.io/client-go/restmapper/discovery.go @@ -0,0 +1,339 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package restmapper + +import ( + "fmt" + "strings" + "sync" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/discovery" + + "github.com/golang/glog" +) + +// APIGroupResources is an API group with a mapping of versions to +// resources. +type APIGroupResources struct { + Group metav1.APIGroup + // A mapping of version string to a slice of APIResources for + // that version. + VersionedResources map[string][]metav1.APIResource +} + +// NewDiscoveryRESTMapper returns a PriorityRESTMapper based on the discovered +// groups and resources passed in. +func NewDiscoveryRESTMapper(groupResources []*APIGroupResources) meta.RESTMapper { + unionMapper := meta.MultiRESTMapper{} + + var groupPriority []string + // /v1 is special. It should always come first + resourcePriority := []schema.GroupVersionResource{{Group: "", Version: "v1", Resource: meta.AnyResource}} + kindPriority := []schema.GroupVersionKind{{Group: "", Version: "v1", Kind: meta.AnyKind}} + + for _, group := range groupResources { + groupPriority = append(groupPriority, group.Group.Name) + + // Make sure the preferred version comes first + if len(group.Group.PreferredVersion.Version) != 0 { + preferred := group.Group.PreferredVersion.Version + if _, ok := group.VersionedResources[preferred]; ok { + resourcePriority = append(resourcePriority, schema.GroupVersionResource{ + Group: group.Group.Name, + Version: group.Group.PreferredVersion.Version, + Resource: meta.AnyResource, + }) + + kindPriority = append(kindPriority, schema.GroupVersionKind{ + Group: group.Group.Name, + Version: group.Group.PreferredVersion.Version, + Kind: meta.AnyKind, + }) + } + } + + for _, discoveryVersion := range group.Group.Versions { + resources, ok := group.VersionedResources[discoveryVersion.Version] + if !ok { + continue + } + + // Add non-preferred versions after the preferred version, in case there are resources that only exist in those versions + if discoveryVersion.Version != group.Group.PreferredVersion.Version { + resourcePriority = append(resourcePriority, schema.GroupVersionResource{ + Group: group.Group.Name, + Version: discoveryVersion.Version, + Resource: meta.AnyResource, + }) + + kindPriority = append(kindPriority, schema.GroupVersionKind{ + Group: group.Group.Name, + Version: discoveryVersion.Version, + Kind: meta.AnyKind, + }) + } + + gv := schema.GroupVersion{Group: group.Group.Name, Version: discoveryVersion.Version} + versionMapper := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv}) + + for _, resource := range resources { + scope := meta.RESTScopeNamespace + if !resource.Namespaced { + scope = meta.RESTScopeRoot + } + + // if we have a slash, then this is a subresource and we shouldn't create mappings for those. + if strings.Contains(resource.Name, "/") { + continue + } + + plural := gv.WithResource(resource.Name) + singular := gv.WithResource(resource.SingularName) + // this is for legacy resources and servers which don't list singular forms. For those we must still guess. + if len(resource.SingularName) == 0 { + _, singular = meta.UnsafeGuessKindToResource(gv.WithKind(resource.Kind)) + } + + versionMapper.AddSpecific(gv.WithKind(strings.ToLower(resource.Kind)), plural, singular, scope) + versionMapper.AddSpecific(gv.WithKind(resource.Kind), plural, singular, scope) + // TODO this is producing unsafe guesses that don't actually work, but it matches previous behavior + versionMapper.Add(gv.WithKind(resource.Kind+"List"), scope) + } + // TODO why is this type not in discovery (at least for "v1") + versionMapper.Add(gv.WithKind("List"), meta.RESTScopeRoot) + unionMapper = append(unionMapper, versionMapper) + } + } + + for _, group := range groupPriority { + resourcePriority = append(resourcePriority, schema.GroupVersionResource{ + Group: group, + Version: meta.AnyVersion, + Resource: meta.AnyResource, + }) + kindPriority = append(kindPriority, schema.GroupVersionKind{ + Group: group, + Version: meta.AnyVersion, + Kind: meta.AnyKind, + }) + } + + return meta.PriorityRESTMapper{ + Delegate: unionMapper, + ResourcePriority: resourcePriority, + KindPriority: kindPriority, + } +} + +// GetAPIGroupResources uses the provided discovery client to gather +// discovery information and populate a slice of APIGroupResources. +func GetAPIGroupResources(cl discovery.DiscoveryInterface) ([]*APIGroupResources, error) { + apiGroups, err := cl.ServerGroups() + if err != nil { + if apiGroups == nil || len(apiGroups.Groups) == 0 { + return nil, err + } + // TODO track the errors and update callers to handle partial errors. + } + var result []*APIGroupResources + for _, group := range apiGroups.Groups { + groupResources := &APIGroupResources{ + Group: group, + VersionedResources: make(map[string][]metav1.APIResource), + } + for _, version := range group.Versions { + resources, err := cl.ServerResourcesForGroupVersion(version.GroupVersion) + if err != nil { + // continue as best we can + // TODO track the errors and update callers to handle partial errors. + if resources == nil || len(resources.APIResources) == 0 { + continue + } + } + groupResources.VersionedResources[version.Version] = resources.APIResources + } + result = append(result, groupResources) + } + return result, nil +} + +// DeferredDiscoveryRESTMapper is a RESTMapper that will defer +// initialization of the RESTMapper until the first mapping is +// requested. +type DeferredDiscoveryRESTMapper struct { + initMu sync.Mutex + delegate meta.RESTMapper + cl discovery.CachedDiscoveryInterface +} + +// NewDeferredDiscoveryRESTMapper returns a +// DeferredDiscoveryRESTMapper that will lazily query the provided +// client for discovery information to do REST mappings. +func NewDeferredDiscoveryRESTMapper(cl discovery.CachedDiscoveryInterface) *DeferredDiscoveryRESTMapper { + return &DeferredDiscoveryRESTMapper{ + cl: cl, + } +} + +func (d *DeferredDiscoveryRESTMapper) getDelegate() (meta.RESTMapper, error) { + d.initMu.Lock() + defer d.initMu.Unlock() + + if d.delegate != nil { + return d.delegate, nil + } + + groupResources, err := GetAPIGroupResources(d.cl) + if err != nil { + return nil, err + } + + d.delegate = NewDiscoveryRESTMapper(groupResources) + return d.delegate, err +} + +// Reset resets the internally cached Discovery information and will +// cause the next mapping request to re-discover. +func (d *DeferredDiscoveryRESTMapper) Reset() { + glog.V(5).Info("Invalidating discovery information") + + d.initMu.Lock() + defer d.initMu.Unlock() + + d.cl.Invalidate() + d.delegate = nil +} + +// KindFor takes a partial resource and returns back the single match. +// It returns an error if there are multiple matches. +func (d *DeferredDiscoveryRESTMapper) KindFor(resource schema.GroupVersionResource) (gvk schema.GroupVersionKind, err error) { + del, err := d.getDelegate() + if err != nil { + return schema.GroupVersionKind{}, err + } + gvk, err = del.KindFor(resource) + if err != nil && !d.cl.Fresh() { + d.Reset() + gvk, err = d.KindFor(resource) + } + return +} + +// KindsFor takes a partial resource and returns back the list of +// potential kinds in priority order. +func (d *DeferredDiscoveryRESTMapper) KindsFor(resource schema.GroupVersionResource) (gvks []schema.GroupVersionKind, err error) { + del, err := d.getDelegate() + if err != nil { + return nil, err + } + gvks, err = del.KindsFor(resource) + if len(gvks) == 0 && !d.cl.Fresh() { + d.Reset() + gvks, err = d.KindsFor(resource) + } + return +} + +// ResourceFor takes a partial resource and returns back the single +// match. It returns an error if there are multiple matches. +func (d *DeferredDiscoveryRESTMapper) ResourceFor(input schema.GroupVersionResource) (gvr schema.GroupVersionResource, err error) { + del, err := d.getDelegate() + if err != nil { + return schema.GroupVersionResource{}, err + } + gvr, err = del.ResourceFor(input) + if err != nil && !d.cl.Fresh() { + d.Reset() + gvr, err = d.ResourceFor(input) + } + return +} + +// ResourcesFor takes a partial resource and returns back the list of +// potential resource in priority order. +func (d *DeferredDiscoveryRESTMapper) ResourcesFor(input schema.GroupVersionResource) (gvrs []schema.GroupVersionResource, err error) { + del, err := d.getDelegate() + if err != nil { + return nil, err + } + gvrs, err = del.ResourcesFor(input) + if len(gvrs) == 0 && !d.cl.Fresh() { + d.Reset() + gvrs, err = d.ResourcesFor(input) + } + return +} + +// RESTMapping identifies a preferred resource mapping for the +// provided group kind. +func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (m *meta.RESTMapping, err error) { + del, err := d.getDelegate() + if err != nil { + return nil, err + } + m, err = del.RESTMapping(gk, versions...) + if err != nil && !d.cl.Fresh() { + d.Reset() + m, err = d.RESTMapping(gk, versions...) + } + return +} + +// RESTMappings returns the RESTMappings for the provided group kind +// in a rough internal preferred order. If no kind is found, it will +// return a NoResourceMatchError. +func (d *DeferredDiscoveryRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) (ms []*meta.RESTMapping, err error) { + del, err := d.getDelegate() + if err != nil { + return nil, err + } + ms, err = del.RESTMappings(gk, versions...) + if len(ms) == 0 && !d.cl.Fresh() { + d.Reset() + ms, err = d.RESTMappings(gk, versions...) + } + return +} + +// ResourceSingularizer converts a resource name from plural to +// singular (e.g., from pods to pod). +func (d *DeferredDiscoveryRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { + del, err := d.getDelegate() + if err != nil { + return resource, err + } + singular, err = del.ResourceSingularizer(resource) + if err != nil && !d.cl.Fresh() { + d.Reset() + singular, err = d.ResourceSingularizer(resource) + } + return +} + +func (d *DeferredDiscoveryRESTMapper) String() string { + del, err := d.getDelegate() + if err != nil { + return fmt.Sprintf("DeferredDiscoveryRESTMapper{%v}", err) + } + return fmt.Sprintf("DeferredDiscoveryRESTMapper{\n\t%v\n}", del) +} + +// Make sure it satisfies the interface +var _ meta.RESTMapper = &DeferredDiscoveryRESTMapper{} diff --git a/deps/k8s.io/client-go/restmapper/discovery_test.go b/deps/k8s.io/client-go/restmapper/discovery_test.go new file mode 100644 index 000000000..1b8e7c4f0 --- /dev/null +++ b/deps/k8s.io/client-go/restmapper/discovery_test.go @@ -0,0 +1,384 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package restmapper + +import ( + "reflect" + "testing" + + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + . "k8s.io/client-go/discovery" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/rest/fake" + + "github.com/googleapis/gnostic/OpenAPIv2" + "github.com/stretchr/testify/assert" +) + +func TestRESTMapper(t *testing.T) { + resources := []*APIGroupResources{ + { + Group: metav1.APIGroup{ + Name: "extensions", + Versions: []metav1.GroupVersionForDiscovery{ + {Version: "v1beta"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1beta"}, + }, + VersionedResources: map[string][]metav1.APIResource{ + "v1beta": { + {Name: "jobs", Namespaced: true, Kind: "Job"}, + {Name: "pods", Namespaced: true, Kind: "Pod"}, + }, + }, + }, + { + Group: metav1.APIGroup{ + Versions: []metav1.GroupVersionForDiscovery{ + {Version: "v1"}, + {Version: "v2"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1"}, + }, + VersionedResources: map[string][]metav1.APIResource{ + "v1": { + {Name: "pods", Namespaced: true, Kind: "Pod"}, + }, + "v2": { + {Name: "pods", Namespaced: true, Kind: "Pod"}, + }, + }, + }, + + // This group tests finding and prioritizing resources that only exist in non-preferred versions + { + Group: metav1.APIGroup{ + Name: "unpreferred", + Versions: []metav1.GroupVersionForDiscovery{ + {Version: "v1"}, + {Version: "v2beta1"}, + {Version: "v2alpha1"}, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{Version: "v1"}, + }, + VersionedResources: map[string][]metav1.APIResource{ + "v1": { + {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, + }, + "v2beta1": { + {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, + {Name: "peas", Namespaced: true, Kind: "Pea"}, + }, + "v2alpha1": { + {Name: "broccoli", Namespaced: true, Kind: "Broccoli"}, + {Name: "peas", Namespaced: true, Kind: "Pea"}, + }, + }, + }, + } + + restMapper := NewDiscoveryRESTMapper(resources) + + kindTCs := []struct { + input schema.GroupVersionResource + want schema.GroupVersionKind + }{ + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v2", + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v2", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionKind{ + Version: "v1", + Kind: "Pod", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "jobs", + }, + want: schema.GroupVersionKind{ + Group: "extensions", + Version: "v1beta", + Kind: "Job", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "peas", + }, + want: schema.GroupVersionKind{ + Group: "unpreferred", + Version: "v2beta1", + Kind: "Pea", + }, + }, + } + + for _, tc := range kindTCs { + got, err := restMapper.KindFor(tc.input) + if err != nil { + t.Errorf("KindFor(%#v) unexpected error: %v", tc.input, err) + continue + } + + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("KindFor(%#v) = %#v, want %#v", tc.input, got, tc.want) + } + } + + resourceTCs := []struct { + input schema.GroupVersionResource + want schema.GroupVersionResource + }{ + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Version: "v2", + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v2", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "pods", + }, + want: schema.GroupVersionResource{ + Version: "v1", + Resource: "pods", + }, + }, + { + input: schema.GroupVersionResource{ + Resource: "jobs", + }, + want: schema.GroupVersionResource{ + Group: "extensions", + Version: "v1beta", + Resource: "jobs", + }, + }, + } + + for _, tc := range resourceTCs { + got, err := restMapper.ResourceFor(tc.input) + if err != nil { + t.Errorf("ResourceFor(%#v) unexpected error: %v", tc.input, err) + continue + } + + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("ResourceFor(%#v) = %#v, want %#v", tc.input, got, tc.want) + } + } +} + +func TestDeferredDiscoveryRESTMapper_CacheMiss(t *testing.T) { + assert := assert.New(t) + + cdc := fakeCachedDiscoveryInterface{fresh: false} + m := NewDeferredDiscoveryRESTMapper(&cdc) + assert.False(cdc.fresh, "should NOT be fresh after instantiation") + assert.Zero(cdc.invalidateCalls, "should not have called Invalidate()") + + gvk, err := m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "foo", + }) + assert.NoError(err) + assert.True(cdc.fresh, "should be fresh after a cache-miss") + assert.Equal(cdc.invalidateCalls, 1, "should have called Invalidate() once") + assert.Equal(gvk.Kind, "Foo") + + gvk, err = m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "foo", + }) + assert.NoError(err) + assert.Equal(cdc.invalidateCalls, 1, "should NOT have called Invalidate() again") + + gvk, err = m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "bar", + }) + assert.Error(err) + assert.Equal(cdc.invalidateCalls, 1, "should NOT have called Invalidate() again after another cache-miss, but with fresh==true") + + cdc.fresh = false + gvk, err = m.KindFor(schema.GroupVersionResource{ + Group: "a", + Version: "v1", + Resource: "bar", + }) + assert.Error(err) + assert.Equal(cdc.invalidateCalls, 2, "should HAVE called Invalidate() again after another cache-miss, but with fresh==false") +} + +type fakeCachedDiscoveryInterface struct { + invalidateCalls int + fresh bool + enabledA bool +} + +var _ CachedDiscoveryInterface = &fakeCachedDiscoveryInterface{} + +func (c *fakeCachedDiscoveryInterface) Fresh() bool { + return c.fresh +} + +func (c *fakeCachedDiscoveryInterface) Invalidate() { + c.invalidateCalls = c.invalidateCalls + 1 + c.fresh = true + c.enabledA = true +} + +func (c *fakeCachedDiscoveryInterface) RESTClient() restclient.Interface { + return &fake.RESTClient{} +} + +func (c *fakeCachedDiscoveryInterface) ServerGroups() (*metav1.APIGroupList, error) { + if c.enabledA { + return &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "a", + Versions: []metav1.GroupVersionForDiscovery{ + { + GroupVersion: "a/v1", + Version: "v1", + }, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{ + GroupVersion: "a/v1", + Version: "v1", + }, + }, + }, + }, nil + } + return &metav1.APIGroupList{}, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + if c.enabledA && groupVersion == "a/v1" { + return &metav1.APIResourceList{ + GroupVersion: "a/v1", + APIResources: []metav1.APIResource{ + { + Name: "foo", + Kind: "Foo", + Namespaced: false, + }, + }, + }, nil + } + + return nil, errors.NewNotFound(schema.GroupResource{}, "") +} + +func (c *fakeCachedDiscoveryInterface) ServerResources() ([]*metav1.APIResourceList, error) { + if c.enabledA { + av1, _ := c.ServerResourcesForGroupVersion("a/v1") + return []*metav1.APIResourceList{av1}, nil + } + return []*metav1.APIResourceList{}, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + if c.enabledA { + return []*metav1.APIResourceList{ + { + GroupVersion: "a/v1", + APIResources: []metav1.APIResource{ + { + Name: "foo", + Kind: "Foo", + Verbs: []string{}, + }, + }, + }, + }, nil + } + return nil, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + return nil, nil +} + +func (c *fakeCachedDiscoveryInterface) ServerVersion() (*version.Info, error) { + return &version.Info{}, nil +} + +func (c *fakeCachedDiscoveryInterface) OpenAPISchema() (*openapi_v2.Document, error) { + return &openapi_v2.Document{}, nil +} diff --git a/deps/k8s.io/client-go/restmapper/shortcut.go b/deps/k8s.io/client-go/restmapper/shortcut.go new file mode 100644 index 000000000..d9f4be0b6 --- /dev/null +++ b/deps/k8s.io/client-go/restmapper/shortcut.go @@ -0,0 +1,172 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package restmapper + +import ( + "strings" + + "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/discovery" +) + +// shortcutExpander is a RESTMapper that can be used for Kubernetes resources. It expands the resource first, then invokes the wrapped +type shortcutExpander struct { + RESTMapper meta.RESTMapper + + discoveryClient discovery.DiscoveryInterface +} + +var _ meta.RESTMapper = &shortcutExpander{} + +// NewShortcutExpander wraps a restmapper in a layer that expands shortcuts found via discovery +func NewShortcutExpander(delegate meta.RESTMapper, client discovery.DiscoveryInterface) meta.RESTMapper { + return shortcutExpander{RESTMapper: delegate, discoveryClient: client} +} + +// KindFor fulfills meta.RESTMapper +func (e shortcutExpander) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { + return e.RESTMapper.KindFor(e.expandResourceShortcut(resource)) +} + +// KindsFor fulfills meta.RESTMapper +func (e shortcutExpander) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { + return e.RESTMapper.KindsFor(e.expandResourceShortcut(resource)) +} + +// ResourcesFor fulfills meta.RESTMapper +func (e shortcutExpander) ResourcesFor(resource schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { + return e.RESTMapper.ResourcesFor(e.expandResourceShortcut(resource)) +} + +// ResourceFor fulfills meta.RESTMapper +func (e shortcutExpander) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error) { + return e.RESTMapper.ResourceFor(e.expandResourceShortcut(resource)) +} + +// ResourceSingularizer fulfills meta.RESTMapper +func (e shortcutExpander) ResourceSingularizer(resource string) (string, error) { + return e.RESTMapper.ResourceSingularizer(e.expandResourceShortcut(schema.GroupVersionResource{Resource: resource}).Resource) +} + +// RESTMapping fulfills meta.RESTMapper +func (e shortcutExpander) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) { + return e.RESTMapper.RESTMapping(gk, versions...) +} + +// RESTMappings fulfills meta.RESTMapper +func (e shortcutExpander) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error) { + return e.RESTMapper.RESTMappings(gk, versions...) +} + +// getShortcutMappings returns a set of tuples which holds short names for resources. +// First the list of potential resources will be taken from the API server. +// Next we will append the hardcoded list of resources - to be backward compatible with old servers. +// NOTE that the list is ordered by group priority. +func (e shortcutExpander) getShortcutMappings() ([]*metav1.APIResourceList, []resourceShortcuts, error) { + res := []resourceShortcuts{} + // get server resources + // This can return an error *and* the results it was able to find. We don't need to fail on the error. + apiResList, err := e.discoveryClient.ServerResources() + if err != nil { + glog.V(1).Infof("Error loading discovery information: %v", err) + } + for _, apiResources := range apiResList { + gv, err := schema.ParseGroupVersion(apiResources.GroupVersion) + if err != nil { + glog.V(1).Infof("Unable to parse groupversion = %s due to = %s", apiResources.GroupVersion, err.Error()) + continue + } + for _, apiRes := range apiResources.APIResources { + for _, shortName := range apiRes.ShortNames { + rs := resourceShortcuts{ + ShortForm: schema.GroupResource{Group: gv.Group, Resource: shortName}, + LongForm: schema.GroupResource{Group: gv.Group, Resource: apiRes.Name}, + } + res = append(res, rs) + } + } + } + + return apiResList, res, nil +} + +// expandResourceShortcut will return the expanded version of resource +// (something that a pkg/api/meta.RESTMapper can understand), if it is +// indeed a shortcut. If no match has been found, we will match on group prefixing. +// Lastly we will return resource unmodified. +func (e shortcutExpander) expandResourceShortcut(resource schema.GroupVersionResource) schema.GroupVersionResource { + // get the shortcut mappings and return on first match. + if allResources, shortcutResources, err := e.getShortcutMappings(); err == nil { + // avoid expanding if there's an exact match to a full resource name + for _, apiResources := range allResources { + gv, err := schema.ParseGroupVersion(apiResources.GroupVersion) + if err != nil { + continue + } + if len(resource.Group) != 0 && resource.Group != gv.Group { + continue + } + for _, apiRes := range apiResources.APIResources { + if resource.Resource == apiRes.Name { + return resource + } + if resource.Resource == apiRes.SingularName { + return resource + } + } + } + + for _, item := range shortcutResources { + if len(resource.Group) != 0 && resource.Group != item.ShortForm.Group { + continue + } + if resource.Resource == item.ShortForm.Resource { + resource.Resource = item.LongForm.Resource + resource.Group = item.LongForm.Group + return resource + } + } + + // we didn't find exact match so match on group prefixing. This allows autoscal to match autoscaling + if len(resource.Group) == 0 { + return resource + } + for _, item := range shortcutResources { + if !strings.HasPrefix(item.ShortForm.Group, resource.Group) { + continue + } + if resource.Resource == item.ShortForm.Resource { + resource.Resource = item.LongForm.Resource + resource.Group = item.LongForm.Group + return resource + } + } + } + + return resource +} + +// ResourceShortcuts represents a structure that holds the information how to +// transition from resource's shortcut to its full name. +type resourceShortcuts struct { + ShortForm schema.GroupResource + LongForm schema.GroupResource +} diff --git a/deps/k8s.io/client-go/restmapper/shortcut_test.go b/deps/k8s.io/client-go/restmapper/shortcut_test.go new file mode 100644 index 000000000..dbc288fad --- /dev/null +++ b/deps/k8s.io/client-go/restmapper/shortcut_test.go @@ -0,0 +1,289 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package restmapper + +import ( + "testing" + + "github.com/googleapis/gnostic/OpenAPIv2" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/version" + "k8s.io/client-go/discovery" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/rest/fake" +) + +func TestReplaceAliases(t *testing.T) { + tests := []struct { + name string + arg string + expected schema.GroupVersionResource + srvRes []*metav1.APIResourceList + }{ + { + name: "storageclasses-no-replacement", + arg: "storageclasses", + expected: schema.GroupVersionResource{Resource: "storageclasses"}, + srvRes: []*metav1.APIResourceList{}, + }, + { + name: "hpa-priority", + arg: "hpa", + expected: schema.GroupVersionResource{Resource: "superhorizontalpodautoscalers", Group: "autoscaling"}, + srvRes: []*metav1.APIResourceList{ + { + GroupVersion: "autoscaling/v1", + APIResources: []metav1.APIResource{ + { + Name: "superhorizontalpodautoscalers", + ShortNames: []string{"hpa"}, + }, + }, + }, + { + GroupVersion: "autoscaling/v1", + APIResources: []metav1.APIResource{ + { + Name: "horizontalpodautoscalers", + ShortNames: []string{"hpa"}, + }, + }, + }, + }, + }, + { + name: "resource-override", + arg: "dpl", + expected: schema.GroupVersionResource{Resource: "deployments", Group: "foo"}, + srvRes: []*metav1.APIResourceList{ + { + GroupVersion: "foo/v1", + APIResources: []metav1.APIResource{ + { + Name: "deployments", + ShortNames: []string{"dpl"}, + }, + }, + }, + { + GroupVersion: "extension/v1beta1", + APIResources: []metav1.APIResource{ + { + Name: "deployments", + ShortNames: []string{"deploy"}, + }, + }, + }, + }, + }, + { + name: "resource-match-preferred", + arg: "pods", + expected: schema.GroupVersionResource{Resource: "pods", Group: ""}, + srvRes: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{{Name: "pods", SingularName: "pod"}}, + }, + { + GroupVersion: "acme.com/v1", + APIResources: []metav1.APIResource{{Name: "poddlers", ShortNames: []string{"pods", "pod"}}}, + }, + }, + }, + { + name: "resource-match-singular-preferred", + arg: "pod", + expected: schema.GroupVersionResource{Resource: "pod", Group: ""}, + srvRes: []*metav1.APIResourceList{ + { + GroupVersion: "v1", + APIResources: []metav1.APIResource{{Name: "pods", SingularName: "pod"}}, + }, + { + GroupVersion: "acme.com/v1", + APIResources: []metav1.APIResource{{Name: "poddlers", ShortNames: []string{"pods", "pod"}}}, + }, + }, + }, + } + + for _, test := range tests { + ds := &fakeDiscoveryClient{} + ds.serverResourcesHandler = func() ([]*metav1.APIResourceList, error) { + return test.srvRes, nil + } + mapper := NewShortcutExpander(&fakeRESTMapper{}, ds).(shortcutExpander) + + actual := mapper.expandResourceShortcut(schema.GroupVersionResource{Resource: test.arg}) + if actual != test.expected { + t.Errorf("%s: unexpected argument: expected %s, got %s", test.name, test.expected, actual) + } + } +} + +func TestKindFor(t *testing.T) { + tests := []struct { + in schema.GroupVersionResource + expected schema.GroupVersionResource + srvRes []*metav1.APIResourceList + }{ + { + in: schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "sc"}, + expected: schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "storageclasses"}, + srvRes: []*metav1.APIResourceList{ + { + GroupVersion: "storage.k8s.io/v1", + APIResources: []metav1.APIResource{ + { + Name: "storageclasses", + ShortNames: []string{"sc"}, + }, + }, + }, + }, + }, + { + in: schema.GroupVersionResource{Group: "", Version: "", Resource: "sc"}, + expected: schema.GroupVersionResource{Group: "storage.k8s.io", Version: "", Resource: "storageclasses"}, + srvRes: []*metav1.APIResourceList{ + { + GroupVersion: "storage.k8s.io/v1", + APIResources: []metav1.APIResource{ + { + Name: "storageclasses", + ShortNames: []string{"sc"}, + }, + }, + }, + }, + }, + } + + for i, test := range tests { + ds := &fakeDiscoveryClient{} + ds.serverResourcesHandler = func() ([]*metav1.APIResourceList, error) { + return test.srvRes, nil + } + + delegate := &fakeRESTMapper{} + mapper := NewShortcutExpander(delegate, ds) + + mapper.KindFor(test.in) + if delegate.kindForInput != test.expected { + t.Errorf("%d: unexpected data returned %#v, expected %#v", i, delegate.kindForInput, test.expected) + } + } +} + +type fakeRESTMapper struct { + kindForInput schema.GroupVersionResource +} + +func (f *fakeRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) { + f.kindForInput = resource + return schema.GroupVersionKind{}, nil +} + +func (f *fakeRESTMapper) KindsFor(resource schema.GroupVersionResource) ([]schema.GroupVersionKind, error) { + return nil, nil +} + +func (f *fakeRESTMapper) ResourceFor(input schema.GroupVersionResource) (schema.GroupVersionResource, error) { + return schema.GroupVersionResource{}, nil +} + +func (f *fakeRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error) { + return nil, nil +} + +func (f *fakeRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) { + return nil, nil +} + +func (f *fakeRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error) { + return nil, nil +} + +func (f *fakeRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { + return "", nil +} + +type fakeDiscoveryClient struct { + serverResourcesHandler func() ([]*metav1.APIResourceList, error) +} + +var _ discovery.DiscoveryInterface = &fakeDiscoveryClient{} + +func (c *fakeDiscoveryClient) RESTClient() restclient.Interface { + return &fake.RESTClient{} +} + +func (c *fakeDiscoveryClient) ServerGroups() (*metav1.APIGroupList, error) { + return &metav1.APIGroupList{ + Groups: []metav1.APIGroup{ + { + Name: "a", + Versions: []metav1.GroupVersionForDiscovery{ + { + GroupVersion: "a/v1", + Version: "v1", + }, + }, + PreferredVersion: metav1.GroupVersionForDiscovery{ + GroupVersion: "a/v1", + Version: "v1", + }, + }, + }, + }, nil +} + +func (c *fakeDiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { + if groupVersion == "a/v1" { + return &metav1.APIResourceList{APIResources: []metav1.APIResource{{Name: "widgets", Kind: "Widget"}}}, nil + } + + return nil, errors.NewNotFound(schema.GroupResource{}, "") +} + +func (c *fakeDiscoveryClient) ServerResources() ([]*metav1.APIResourceList, error) { + if c.serverResourcesHandler != nil { + return c.serverResourcesHandler() + } + return []*metav1.APIResourceList{}, nil +} + +func (c *fakeDiscoveryClient) ServerPreferredResources() ([]*metav1.APIResourceList, error) { + return nil, nil +} + +func (c *fakeDiscoveryClient) ServerPreferredNamespacedResources() ([]*metav1.APIResourceList, error) { + return nil, nil +} + +func (c *fakeDiscoveryClient) ServerVersion() (*version.Info, error) { + return &version.Info{}, nil +} + +func (c *fakeDiscoveryClient) OpenAPISchema() (*openapi_v2.Document, error) { + return &openapi_v2.Document{}, nil +} diff --git a/deps/k8s.io/client-go/scale/BUILD b/deps/k8s.io/client-go/scale/BUILD deleted file mode 100644 index 1f1e0b2a4..000000000 --- a/deps/k8s.io/client-go/scale/BUILD +++ /dev/null @@ -1,77 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = [ - "client.go", - "doc.go", - "interfaces.go", - "util.go", - ], - importpath = "k8s.io/client-go/scale", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/dynamic:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme/appsint:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme/appsv1beta1:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme/appsv1beta2:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme/autoscalingv1:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme/extensionsint:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme/extensionsv1beta1:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "client_test.go", - "roundtrip_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/scale", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/testing/roundtrip:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/client-go/discovery:go_default_library", - "//vendor/k8s.io/client-go/discovery/fake:go_default_library", - "//vendor/k8s.io/client-go/dynamic:go_default_library", - "//vendor/k8s.io/client-go/rest/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/scale/fake:all-srcs", - "//staging/src/k8s.io/client-go/scale/scheme:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/client.go b/deps/k8s.io/client-go/scale/client.go index 782aca394..3a3e8fc9e 100644 --- a/deps/k8s.io/client-go/scale/client.go +++ b/deps/k8s.io/client-go/scale/client.go @@ -20,7 +20,6 @@ import ( "fmt" autoscaling "k8s.io/api/autoscaling/v1" - "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" @@ -41,7 +40,7 @@ type restInterfaceProvider func(*restclient.Config) (restclient.Interface, error // It behaves somewhat similarly to the dynamic ClientPool, // but is more specifically scoped to Scale. type scaleClient struct { - mapper meta.RESTMapper + mapper PreferredResourceMapper apiPathResolverFunc dynamic.APIPathResolverFunc scaleKindResolver ScaleKindResolver @@ -51,7 +50,7 @@ type scaleClient struct { // NewForConfig creates a new ScalesGetter which resolves kinds // to resources using the given RESTMapper, and API paths using // the given dynamic.APIPathResolverFunc. -func NewForConfig(cfg *restclient.Config, mapper meta.RESTMapper, resolver dynamic.APIPathResolverFunc, scaleKindResolver ScaleKindResolver) (ScalesGetter, error) { +func NewForConfig(cfg *restclient.Config, mapper PreferredResourceMapper, resolver dynamic.APIPathResolverFunc, scaleKindResolver ScaleKindResolver) (ScalesGetter, error) { // so that the RESTClientFor doesn't complain cfg.GroupVersion = &schema.GroupVersion{} @@ -72,7 +71,7 @@ func NewForConfig(cfg *restclient.Config, mapper meta.RESTMapper, resolver dynam // New creates a new ScalesGetter using the given client to make requests. // The GroupVersion on the client is ignored. -func New(baseClient restclient.Interface, mapper meta.RESTMapper, resolver dynamic.APIPathResolverFunc, scaleKindResolver ScaleKindResolver) ScalesGetter { +func New(baseClient restclient.Interface, mapper PreferredResourceMapper, resolver dynamic.APIPathResolverFunc, scaleKindResolver ScaleKindResolver) ScalesGetter { return &scaleClient{ mapper: mapper, @@ -138,7 +137,7 @@ func (c *namespacedScaleClient) Get(resource schema.GroupResource, name string) SubResource("scale"). Do() if err := result.Error(); err != nil { - return nil, fmt.Errorf("could not fetch the scale for %s %s: %v", resource.String(), name, err) + return nil, err } scaleBytes, err := result.Raw() @@ -196,7 +195,10 @@ func (c *namespacedScaleClient) Update(resource schema.GroupResource, scale *aut Body(scaleUpdateBytes). Do() if err := result.Error(); err != nil { - return nil, fmt.Errorf("could not update the scale for %s %s: %v", resource.String(), scale.Name, err) + // propagate "raw" error from the API + // this allows callers to interpret underlying Reason field + // for example: errors.IsConflict(err) + return nil, err } scaleBytes, err := result.Raw() diff --git a/deps/k8s.io/client-go/scale/client_test.go b/deps/k8s.io/client-go/scale/client_test.go index f4f2af3d6..a3a8c037d 100644 --- a/deps/k8s.io/client-go/scale/client_test.go +++ b/deps/k8s.io/client-go/scale/client_test.go @@ -29,7 +29,6 @@ import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/client-go/discovery" fakedisco "k8s.io/client-go/discovery/fake" "k8s.io/client-go/dynamic" fakerest "k8s.io/client-go/rest/fake" @@ -40,7 +39,7 @@ import ( autoscalingv1 "k8s.io/api/autoscaling/v1" corev1 "k8s.io/api/core/v1" extv1beta1 "k8s.io/api/extensions/v1beta1" - apimeta "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/client-go/restmapper" coretesting "k8s.io/client-go/testing" ) @@ -97,11 +96,11 @@ func fakeScaleClient(t *testing.T) (ScalesGetter, []schema.GroupResource) { }, } - restMapperRes, err := discovery.GetAPIGroupResources(fakeDiscoveryClient) + restMapperRes, err := restmapper.GetAPIGroupResources(fakeDiscoveryClient) if err != nil { - t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v") + t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v", err) } - restMapper := discovery.NewRESTMapper(restMapperRes, apimeta.InterfacesForUnstructured) + restMapper := restmapper.NewDiscoveryRESTMapper(restMapperRes) autoscalingScale := &autoscalingv1.Scale{ TypeMeta: metav1.TypeMeta{ diff --git a/deps/k8s.io/client-go/scale/fake/BUILD b/deps/k8s.io/client-go/scale/fake/BUILD deleted file mode 100644 index 8c9374305..000000000 --- a/deps/k8s.io/client-go/scale/fake/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["client.go"], - importpath = "k8s.io/client-go/scale/fake", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/scale:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/roundtrip_test.go b/deps/k8s.io/client-go/scale/roundtrip_test.go index 2d3b28bf6..1da98704e 100644 --- a/deps/k8s.io/client-go/scale/roundtrip_test.go +++ b/deps/k8s.io/client-go/scale/roundtrip_test.go @@ -19,7 +19,7 @@ package scale import ( "testing" - "k8s.io/apimachinery/pkg/api/testing/roundtrip" + "k8s.io/apimachinery/pkg/api/apitesting/roundtrip" ) // NB: this can't be in the scheme package, because importing' diff --git a/deps/k8s.io/client-go/scale/scheme/BUILD b/deps/k8s.io/client-go/scale/scheme/BUILD deleted file mode 100644 index 74bd976a1..000000000 --- a/deps/k8s.io/client-go/scale/scheme/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/client-go/scale/scheme", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/scale/scheme/appsint:all-srcs", - "//staging/src/k8s.io/client-go/scale/scheme/appsv1beta1:all-srcs", - "//staging/src/k8s.io/client-go/scale/scheme/appsv1beta2:all-srcs", - "//staging/src/k8s.io/client-go/scale/scheme/autoscalingv1:all-srcs", - "//staging/src/k8s.io/client-go/scale/scheme/extensionsint:all-srcs", - "//staging/src/k8s.io/client-go/scale/scheme/extensionsv1beta1:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/scheme/appsint/BUILD b/deps/k8s.io/client-go/scale/scheme/appsint/BUILD deleted file mode 100644 index 2fef63f0e..000000000 --- a/deps/k8s.io/client-go/scale/scheme/appsint/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importpath = "k8s.io/client-go/scale/scheme/appsint", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/scheme/appsv1beta1/BUILD b/deps/k8s.io/client-go/scale/scheme/appsv1beta1/BUILD deleted file mode 100644 index 05530e300..000000000 --- a/deps/k8s.io/client-go/scale/scheme/appsv1beta1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "register.go", - "zz_generated.conversion.go", - ], - importpath = "k8s.io/client-go/scale/scheme/appsv1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/scheme/appsv1beta1/zz_generated.conversion.go b/deps/k8s.io/client-go/scale/scheme/appsv1beta1/zz_generated.conversion.go index 85e497e7f..16d53c697 100644 --- a/deps/k8s.io/client-go/scale/scheme/appsv1beta1/zz_generated.conversion.go +++ b/deps/k8s.io/client-go/scale/scheme/appsv1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package appsv1beta1 @@ -33,15 +33,48 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1beta1_Scale_To_scheme_Scale, - Convert_scheme_Scale_To_v1beta1_Scale, - Convert_v1beta1_ScaleSpec_To_scheme_ScaleSpec, - Convert_scheme_ScaleSpec_To_v1beta1_ScaleSpec, - Convert_v1beta1_ScaleStatus_To_scheme_ScaleStatus, - Convert_scheme_ScaleStatus_To_v1beta1_ScaleStatus, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1beta1.Scale)(nil), (*scheme.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Scale_To_scheme_Scale(a.(*v1beta1.Scale), b.(*scheme.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.Scale)(nil), (*v1beta1.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_Scale_To_v1beta1_Scale(a.(*scheme.Scale), b.(*v1beta1.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ScaleSpec)(nil), (*scheme.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ScaleSpec_To_scheme_ScaleSpec(a.(*v1beta1.ScaleSpec), b.(*scheme.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleSpec)(nil), (*v1beta1.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleSpec_To_v1beta1_ScaleSpec(a.(*scheme.ScaleSpec), b.(*v1beta1.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ScaleStatus_To_scheme_ScaleStatus(a.(*v1beta1.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleStatus)(nil), (*v1beta1.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1beta1_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1beta1.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*scheme.ScaleStatus)(nil), (*v1beta1.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1beta1_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1beta1.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ScaleStatus_To_scheme_ScaleStatus(a.(*v1beta1.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1beta1_Scale_To_scheme_Scale(in *v1beta1.Scale, out *scheme.Scale, s conversion.Scope) error { diff --git a/deps/k8s.io/client-go/scale/scheme/appsv1beta2/BUILD b/deps/k8s.io/client-go/scale/scheme/appsv1beta2/BUILD deleted file mode 100644 index 7e52bc060..000000000 --- a/deps/k8s.io/client-go/scale/scheme/appsv1beta2/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "register.go", - "zz_generated.conversion.go", - ], - importpath = "k8s.io/client-go/scale/scheme/appsv1beta2", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/apps/v1beta2:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/scheme/appsv1beta2/zz_generated.conversion.go b/deps/k8s.io/client-go/scale/scheme/appsv1beta2/zz_generated.conversion.go index faa7319d7..1901be8cb 100644 --- a/deps/k8s.io/client-go/scale/scheme/appsv1beta2/zz_generated.conversion.go +++ b/deps/k8s.io/client-go/scale/scheme/appsv1beta2/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package appsv1beta2 @@ -33,15 +33,48 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1beta2_Scale_To_scheme_Scale, - Convert_scheme_Scale_To_v1beta2_Scale, - Convert_v1beta2_ScaleSpec_To_scheme_ScaleSpec, - Convert_scheme_ScaleSpec_To_v1beta2_ScaleSpec, - Convert_v1beta2_ScaleStatus_To_scheme_ScaleStatus, - Convert_scheme_ScaleStatus_To_v1beta2_ScaleStatus, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1beta2.Scale)(nil), (*scheme.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_Scale_To_scheme_Scale(a.(*v1beta2.Scale), b.(*scheme.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.Scale)(nil), (*v1beta2.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_Scale_To_v1beta2_Scale(a.(*scheme.Scale), b.(*v1beta2.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ScaleSpec)(nil), (*scheme.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ScaleSpec_To_scheme_ScaleSpec(a.(*v1beta2.ScaleSpec), b.(*scheme.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleSpec)(nil), (*v1beta2.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleSpec_To_v1beta2_ScaleSpec(a.(*scheme.ScaleSpec), b.(*v1beta2.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta2.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ScaleStatus_To_scheme_ScaleStatus(a.(*v1beta2.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleStatus)(nil), (*v1beta2.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1beta2_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1beta2.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*scheme.ScaleStatus)(nil), (*v1beta2.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1beta2_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1beta2.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta2.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta2_ScaleStatus_To_scheme_ScaleStatus(a.(*v1beta2.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1beta2_Scale_To_scheme_Scale(in *v1beta2.Scale, out *scheme.Scale, s conversion.Scope) error { diff --git a/deps/k8s.io/client-go/scale/scheme/autoscalingv1/BUILD b/deps/k8s.io/client-go/scale/scheme/autoscalingv1/BUILD deleted file mode 100644 index 646a6fdf8..000000000 --- a/deps/k8s.io/client-go/scale/scheme/autoscalingv1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "register.go", - "zz_generated.conversion.go", - ], - importpath = "k8s.io/client-go/scale/scheme/autoscalingv1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/autoscaling/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/scheme/autoscalingv1/zz_generated.conversion.go b/deps/k8s.io/client-go/scale/scheme/autoscalingv1/zz_generated.conversion.go index 8b0d52562..203f8b323 100644 --- a/deps/k8s.io/client-go/scale/scheme/autoscalingv1/zz_generated.conversion.go +++ b/deps/k8s.io/client-go/scale/scheme/autoscalingv1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package autoscalingv1 @@ -33,15 +33,48 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1_Scale_To_scheme_Scale, - Convert_scheme_Scale_To_v1_Scale, - Convert_v1_ScaleSpec_To_scheme_ScaleSpec, - Convert_scheme_ScaleSpec_To_v1_ScaleSpec, - Convert_v1_ScaleStatus_To_scheme_ScaleStatus, - Convert_scheme_ScaleStatus_To_v1_ScaleStatus, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1.Scale)(nil), (*scheme.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_Scale_To_scheme_Scale(a.(*v1.Scale), b.(*scheme.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.Scale)(nil), (*v1.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_Scale_To_v1_Scale(a.(*scheme.Scale), b.(*v1.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.ScaleSpec)(nil), (*scheme.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ScaleSpec_To_scheme_ScaleSpec(a.(*v1.ScaleSpec), b.(*scheme.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleSpec)(nil), (*v1.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleSpec_To_v1_ScaleSpec(a.(*scheme.ScaleSpec), b.(*v1.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ScaleStatus_To_scheme_ScaleStatus(a.(*v1.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleStatus)(nil), (*v1.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*scheme.ScaleStatus)(nil), (*v1.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_ScaleStatus_To_scheme_ScaleStatus(a.(*v1.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1_Scale_To_scheme_Scale(in *v1.Scale, out *scheme.Scale, s conversion.Scope) error { diff --git a/deps/k8s.io/client-go/scale/scheme/extensionsint/BUILD b/deps/k8s.io/client-go/scale/scheme/extensionsint/BUILD deleted file mode 100644 index 6174a88b1..000000000 --- a/deps/k8s.io/client-go/scale/scheme/extensionsint/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "register.go", - ], - importpath = "k8s.io/client-go/scale/scheme/extensionsint", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/BUILD b/deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/BUILD deleted file mode 100644 index 4c992c7d1..000000000 --- a/deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "register.go", - "zz_generated.conversion.go", - ], - importpath = "k8s.io/client-go/scale/scheme/extensionsv1beta1", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/api/extensions/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/scale/scheme:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/zz_generated.conversion.go b/deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/zz_generated.conversion.go index 1c8e68dc5..99aef8653 100644 --- a/deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/zz_generated.conversion.go +++ b/deps/k8s.io/client-go/scale/scheme/extensionsv1beta1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package extensionsv1beta1 @@ -33,15 +33,48 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1beta1_Scale_To_scheme_Scale, - Convert_scheme_Scale_To_v1beta1_Scale, - Convert_v1beta1_ScaleSpec_To_scheme_ScaleSpec, - Convert_scheme_ScaleSpec_To_v1beta1_ScaleSpec, - Convert_v1beta1_ScaleStatus_To_scheme_ScaleStatus, - Convert_scheme_ScaleStatus_To_v1beta1_ScaleStatus, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1beta1.Scale)(nil), (*scheme.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_Scale_To_scheme_Scale(a.(*v1beta1.Scale), b.(*scheme.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.Scale)(nil), (*v1beta1.Scale)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_Scale_To_v1beta1_Scale(a.(*scheme.Scale), b.(*v1beta1.Scale), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ScaleSpec)(nil), (*scheme.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ScaleSpec_To_scheme_ScaleSpec(a.(*v1beta1.ScaleSpec), b.(*scheme.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleSpec)(nil), (*v1beta1.ScaleSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleSpec_To_v1beta1_ScaleSpec(a.(*scheme.ScaleSpec), b.(*v1beta1.ScaleSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1beta1.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ScaleStatus_To_scheme_ScaleStatus(a.(*v1beta1.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*scheme.ScaleStatus)(nil), (*v1beta1.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1beta1_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1beta1.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*scheme.ScaleStatus)(nil), (*v1beta1.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_scheme_ScaleStatus_To_v1beta1_ScaleStatus(a.(*scheme.ScaleStatus), b.(*v1beta1.ScaleStatus), scope) + }); err != nil { + return err + } + if err := s.AddConversionFunc((*v1beta1.ScaleStatus)(nil), (*scheme.ScaleStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ScaleStatus_To_scheme_ScaleStatus(a.(*v1beta1.ScaleStatus), b.(*scheme.ScaleStatus), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1beta1_Scale_To_scheme_Scale(in *v1beta1.Scale, out *scheme.Scale, s conversion.Scope) error { diff --git a/deps/k8s.io/client-go/scale/scheme/zz_generated.deepcopy.go b/deps/k8s.io/client-go/scale/scheme/zz_generated.deepcopy.go index 61c553df6..3db708154 100644 --- a/deps/k8s.io/client-go/scale/scheme/zz_generated.deepcopy.go +++ b/deps/k8s.io/client-go/scale/scheme/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package scheme @@ -49,9 +49,8 @@ func (in *Scale) DeepCopy() *Scale { func (in *Scale) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -75,12 +74,8 @@ func (in *ScaleStatus) DeepCopyInto(out *ScaleStatus) { *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector - if *in == nil { - *out = nil - } else { - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } + *out = new(v1.LabelSelector) + (*in).DeepCopyInto(*out) } return } diff --git a/deps/k8s.io/client-go/scale/util.go b/deps/k8s.io/client-go/scale/util.go index 46b5c4d1e..2f43a7a79 100644 --- a/deps/k8s.io/client-go/scale/util.go +++ b/deps/k8s.io/client-go/scale/util.go @@ -21,9 +21,11 @@ import ( "strings" "sync" + "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/discovery" scalescheme "k8s.io/client-go/scale/scheme" scaleappsint "k8s.io/client-go/scale/scheme/appsint" @@ -34,6 +36,15 @@ import ( scaleext "k8s.io/client-go/scale/scheme/extensionsv1beta1" ) +// PreferredResourceMapper determines the preferred version of a resource to scale +type PreferredResourceMapper interface { + // ResourceFor takes a partial resource and returns the preferred resource. + ResourceFor(resource schema.GroupVersionResource) (preferredResource schema.GroupVersionResource, err error) +} + +// Ensure a RESTMapper satisfies the PreferredResourceMapper interface +var _ PreferredResourceMapper = meta.RESTMapper(nil) + // ScaleKindResolver knows about the relationship between // resources and the GroupVersionKind of their scale subresources. type ScaleKindResolver interface { @@ -133,13 +144,13 @@ type ScaleConverter struct { // Scales in autoscaling/v1 and extensions/v1beta1. func NewScaleConverter() *ScaleConverter { scheme := runtime.NewScheme() - scaleautoscaling.AddToScheme(scheme) - scalescheme.AddToScheme(scheme) - scaleext.AddToScheme(scheme) - scaleextint.AddToScheme(scheme) - scaleappsint.AddToScheme(scheme) - scaleappsv1beta1.AddToScheme(scheme) - scaleappsv1beta2.AddToScheme(scheme) + utilruntime.Must(scaleautoscaling.AddToScheme(scheme)) + utilruntime.Must(scalescheme.AddToScheme(scheme)) + utilruntime.Must(scaleext.AddToScheme(scheme)) + utilruntime.Must(scaleextint.AddToScheme(scheme)) + utilruntime.Must(scaleappsint.AddToScheme(scheme)) + utilruntime.Must(scaleappsv1beta1.AddToScheme(scheme)) + utilruntime.Must(scaleappsv1beta2.AddToScheme(scheme)) return &ScaleConverter{ scheme: scheme, diff --git a/deps/k8s.io/client-go/testing/BUILD b/deps/k8s.io/client-go/testing/BUILD deleted file mode 100644 index 666a449bd..000000000 --- a/deps/k8s.io/client-go/testing/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "actions.go", - "fake.go", - "fixture.go", - ], - importpath = "k8s.io/client-go/testing", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/version:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/pkg/version:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = [ - "fixture_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/testing", - deps = [ - "//vendor/github.com/stretchr/testify/assert:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/testing/actions.go b/deps/k8s.io/client-go/testing/actions.go index 6f1c3a896..b99f231c8 100644 --- a/deps/k8s.io/client-go/testing/actions.go +++ b/deps/k8s.io/client-go/testing/actions.go @@ -58,37 +58,33 @@ func NewGetSubresourceAction(resource schema.GroupVersionResource, namespace, su return action } -func NewRootListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, opts interface{}) ListActionImpl { - action := ListActionImpl{} - action.Verb = "list" +func NewRootGetSubresourceAction(resource schema.GroupVersionResource, subresource, name string) GetActionImpl { + action := GetActionImpl{} + action.Verb = "get" action.Resource = resource - action.Kind = kind - labelSelector, fieldSelector, _ := ExtractFromListOptions(opts) - action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector} + action.Subresource = subresource + action.Name = name return action } -func NewListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, namespace string, opts interface{}) ListActionImpl { +func NewRootListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, opts interface{}) ListActionImpl { action := ListActionImpl{} action.Verb = "list" action.Resource = resource action.Kind = kind - action.Namespace = namespace labelSelector, fieldSelector, _ := ExtractFromListOptions(opts) action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector} return action } -func NewListSubresourceAction(resource schema.GroupVersionResource, name, subresource string, kind schema.GroupVersionKind, namespace string, opts interface{}) ListActionImpl { +func NewListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, namespace string, opts interface{}) ListActionImpl { action := ListActionImpl{} action.Verb = "list" action.Resource = resource - action.Subresource = subresource action.Kind = kind action.Namespace = namespace - action.Name = name labelSelector, fieldSelector, _ := ExtractFromListOptions(opts) action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector} @@ -114,12 +110,23 @@ func NewCreateAction(resource schema.GroupVersionResource, namespace string, obj return action } -func NewCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource string, namespace string, object runtime.Object) CreateActionImpl { +func NewRootCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource string, object runtime.Object) CreateActionImpl { action := CreateActionImpl{} action.Verb = "create" action.Resource = resource action.Subresource = subresource + action.Name = name + action.Object = object + + return action +} + +func NewCreateSubresourceAction(resource schema.GroupVersionResource, name, subresource, namespace string, object runtime.Object) CreateActionImpl { + action := CreateActionImpl{} + action.Verb = "create" + action.Resource = resource action.Namespace = namespace + action.Subresource = subresource action.Name = name action.Object = object @@ -218,6 +225,16 @@ func NewRootDeleteAction(resource schema.GroupVersionResource, name string) Dele return action } +func NewRootDeleteSubresourceAction(resource schema.GroupVersionResource, subresource string, name string) DeleteActionImpl { + action := DeleteActionImpl{} + action.Verb = "delete" + action.Resource = resource + action.Subresource = subresource + action.Name = name + + return action +} + func NewDeleteAction(resource schema.GroupVersionResource, namespace, name string) DeleteActionImpl { action := DeleteActionImpl{} action.Verb = "delete" @@ -228,6 +245,17 @@ func NewDeleteAction(resource schema.GroupVersionResource, namespace, name strin return action } +func NewDeleteSubresourceAction(resource schema.GroupVersionResource, subresource, namespace, name string) DeleteActionImpl { + action := DeleteActionImpl{} + action.Verb = "delete" + action.Resource = resource + action.Subresource = subresource + action.Namespace = namespace + action.Name = name + + return action +} + func NewRootDeleteCollectionAction(resource schema.GroupVersionResource, opts interface{}) DeleteCollectionActionImpl { action := DeleteCollectionActionImpl{} action.Verb = "delete-collection" @@ -324,6 +352,10 @@ type Action interface { GetResource() schema.GroupVersionResource GetSubresource() string Matches(verb, resource string) bool + + // DeepCopy is used to copy an action to avoid any risk of accidental mutation. Most people never need to call this + // because the invocation logic deep copies before calls to storage and reactors. + DeepCopy() Action } type GenericAction interface { @@ -404,6 +436,10 @@ func (a ActionImpl) Matches(verb, resource string) bool { return strings.ToLower(verb) == strings.ToLower(a.Verb) && strings.ToLower(resource) == strings.ToLower(a.Resource.Resource) } +func (a ActionImpl) DeepCopy() Action { + ret := a + return ret +} type GenericActionImpl struct { ActionImpl @@ -414,6 +450,14 @@ func (a GenericActionImpl) GetValue() interface{} { return a.Value } +func (a GenericActionImpl) DeepCopy() Action { + return GenericActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + // TODO this is wrong, but no worse than before + Value: a.Value, + } +} + type GetActionImpl struct { ActionImpl Name string @@ -423,6 +467,13 @@ func (a GetActionImpl) GetName() string { return a.Name } +func (a GetActionImpl) DeepCopy() Action { + return GetActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + } +} + type ListActionImpl struct { ActionImpl Kind schema.GroupVersionKind @@ -438,6 +489,18 @@ func (a ListActionImpl) GetListRestrictions() ListRestrictions { return a.ListRestrictions } +func (a ListActionImpl) DeepCopy() Action { + return ListActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Kind: a.Kind, + Name: a.Name, + ListRestrictions: ListRestrictions{ + Labels: a.ListRestrictions.Labels.DeepCopySelector(), + Fields: a.ListRestrictions.Fields.DeepCopySelector(), + }, + } +} + type CreateActionImpl struct { ActionImpl Name string @@ -448,6 +511,14 @@ func (a CreateActionImpl) GetObject() runtime.Object { return a.Object } +func (a CreateActionImpl) DeepCopy() Action { + return CreateActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + Object: a.Object.DeepCopyObject(), + } +} + type UpdateActionImpl struct { ActionImpl Object runtime.Object @@ -457,6 +528,13 @@ func (a UpdateActionImpl) GetObject() runtime.Object { return a.Object } +func (a UpdateActionImpl) DeepCopy() Action { + return UpdateActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Object: a.Object.DeepCopyObject(), + } +} + type PatchActionImpl struct { ActionImpl Name string @@ -471,6 +549,16 @@ func (a PatchActionImpl) GetPatch() []byte { return a.Patch } +func (a PatchActionImpl) DeepCopy() Action { + patch := make([]byte, len(a.Patch)) + copy(patch, a.Patch) + return PatchActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + Patch: patch, + } +} + type DeleteActionImpl struct { ActionImpl Name string @@ -480,6 +568,13 @@ func (a DeleteActionImpl) GetName() string { return a.Name } +func (a DeleteActionImpl) DeepCopy() Action { + return DeleteActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Name: a.Name, + } +} + type DeleteCollectionActionImpl struct { ActionImpl ListRestrictions ListRestrictions @@ -489,6 +584,16 @@ func (a DeleteCollectionActionImpl) GetListRestrictions() ListRestrictions { return a.ListRestrictions } +func (a DeleteCollectionActionImpl) DeepCopy() Action { + return DeleteCollectionActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + ListRestrictions: ListRestrictions{ + Labels: a.ListRestrictions.Labels.DeepCopySelector(), + Fields: a.ListRestrictions.Fields.DeepCopySelector(), + }, + } +} + type WatchActionImpl struct { ActionImpl WatchRestrictions WatchRestrictions @@ -498,6 +603,17 @@ func (a WatchActionImpl) GetWatchRestrictions() WatchRestrictions { return a.WatchRestrictions } +func (a WatchActionImpl) DeepCopy() Action { + return WatchActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + WatchRestrictions: WatchRestrictions{ + Labels: a.WatchRestrictions.Labels.DeepCopySelector(), + Fields: a.WatchRestrictions.Fields.DeepCopySelector(), + ResourceVersion: a.WatchRestrictions.ResourceVersion, + }, + } +} + type ProxyGetActionImpl struct { ActionImpl Scheme string @@ -526,3 +642,18 @@ func (a ProxyGetActionImpl) GetPath() string { func (a ProxyGetActionImpl) GetParams() map[string]string { return a.Params } + +func (a ProxyGetActionImpl) DeepCopy() Action { + params := map[string]string{} + for k, v := range a.Params { + params[k] = v + } + return ProxyGetActionImpl{ + ActionImpl: a.ActionImpl.DeepCopy().(ActionImpl), + Scheme: a.Scheme, + Name: a.Name, + Port: a.Port, + Path: a.Path, + Params: params, + } +} diff --git a/deps/k8s.io/client-go/testing/fake.go b/deps/k8s.io/client-go/testing/fake.go index da47b23b9..8b3f31eaf 100644 --- a/deps/k8s.io/client-go/testing/fake.go +++ b/deps/k8s.io/client-go/testing/fake.go @@ -22,10 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/version" "k8s.io/apimachinery/pkg/watch" - kubeversion "k8s.io/client-go/pkg/version" restclient "k8s.io/client-go/rest" ) @@ -134,13 +131,13 @@ func (c *Fake) Invokes(action Action, defaultReturnObj runtime.Object) (runtime. c.Lock() defer c.Unlock() - c.actions = append(c.actions, action) + c.actions = append(c.actions, action.DeepCopy()) for _, reactor := range c.ReactionChain { if !reactor.Handles(action) { continue } - handled, ret, err := reactor.React(action) + handled, ret, err := reactor.React(action.DeepCopy()) if !handled { continue } @@ -157,13 +154,13 @@ func (c *Fake) InvokesWatch(action Action) (watch.Interface, error) { c.Lock() defer c.Unlock() - c.actions = append(c.actions, action) + c.actions = append(c.actions, action.DeepCopy()) for _, reactor := range c.WatchReactionChain { if !reactor.Handles(action) { continue } - handled, ret, err := reactor.React(action) + handled, ret, err := reactor.React(action.DeepCopy()) if !handled { continue } @@ -180,13 +177,13 @@ func (c *Fake) InvokesProxy(action Action) restclient.ResponseWrapper { c.Lock() defer c.Unlock() - c.actions = append(c.actions, action) + c.actions = append(c.actions, action.DeepCopy()) for _, reactor := range c.ProxyReactionChain { if !reactor.Handles(action) { continue } - handled, ret, err := reactor.React(action) + handled, ret, err := reactor.React(action.DeepCopy()) if !handled || err != nil { continue } @@ -214,46 +211,3 @@ func (c *Fake) Actions() []Action { copy(fa, c.actions) return fa } - -// TODO: this probably should be moved to somewhere else. -type FakeDiscovery struct { - *Fake -} - -func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error) { - action := ActionImpl{ - Verb: "get", - Resource: schema.GroupVersionResource{Resource: "resource"}, - } - c.Invokes(action, nil) - for _, rl := range c.Resources { - if rl.GroupVersion == groupVersion { - return rl, nil - } - } - - return nil, fmt.Errorf("GroupVersion %q not found", groupVersion) -} - -func (c *FakeDiscovery) ServerResources() ([]*metav1.APIResourceList, error) { - action := ActionImpl{ - Verb: "get", - Resource: schema.GroupVersionResource{Resource: "resource"}, - } - c.Invokes(action, nil) - return c.Resources, nil -} - -func (c *FakeDiscovery) ServerGroups() (*metav1.APIGroupList, error) { - return nil, nil -} - -func (c *FakeDiscovery) ServerVersion() (*version.Info, error) { - action := ActionImpl{} - action.Verb = "get" - action.Resource = schema.GroupVersionResource{Resource: "version"} - - c.Invokes(action, nil) - versionInfo := kubeversion.Get() - return &versionInfo, nil -} diff --git a/deps/k8s.io/client-go/testing/fixture.go b/deps/k8s.io/client-go/testing/fixture.go index ba8ee508f..00c4c49fc 100644 --- a/deps/k8s.io/client-go/testing/fixture.go +++ b/deps/k8s.io/client-go/testing/fixture.go @@ -25,15 +25,12 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/json" + "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/watch" restclient "k8s.io/client-go/rest" ) -// FakeWatchBufferSize is the max num of watch event can be buffered in the -// watch channel. Note that when watch event overflows or exceed this buffer -// size, manipulations via fake client may be blocked. -const FakeWatchBufferSize = 128 - // ObjectTracker keeps track of objects. It is intended to be used to // fake calls to a server by returning objects based on their kind, // namespace and name. @@ -77,7 +74,6 @@ func ObjectReaction(tracker ObjectTracker) ReactionFunc { return func(action Action) (bool, runtime.Object, error) { ns := action.GetNamespace() gvr := action.GetResource() - // Here and below we need to switch on implementation types, // not on interfaces, as some interfaces are identical // (e.g. UpdateAction and CreateAction), so if we use them, @@ -130,6 +126,34 @@ func ObjectReaction(tracker ObjectTracker) ReactionFunc { } return true, nil, nil + case PatchActionImpl: + obj, err := tracker.Get(gvr, ns, action.GetName()) + if err != nil { + // object is not registered + return false, nil, err + } + + old, err := json.Marshal(obj) + if err != nil { + return true, nil, err + } + // Only supports strategic merge patch + // TODO: Add support for other Patch types + mergedByte, err := strategicpatch.StrategicMergePatch(old, action.GetPatch(), obj) + if err != nil { + return true, nil, err + } + + if err = json.Unmarshal(mergedByte, obj); err != nil { + return true, nil, err + } + + if err = tracker.Update(gvr, obj, ns); err != nil { + return true, nil, err + } + + return true, obj, nil + default: return false, nil, fmt.Errorf("no reaction implemented for %s", action) } @@ -142,12 +166,11 @@ type tracker struct { lock sync.RWMutex objects map[schema.GroupVersionResource][]runtime.Object // The value type of watchers is a map of which the key is either a namespace or - // all/non namespace aka "" and its value is list of fake watchers. Each of - // fake watcher holds a buffered channel of size "FakeWatchBufferSize" which - // is default to 128. Manipulations on resources will broadcast the notification - // events into the watchers' channel and note that too many unhandled event may - // potentially block the tracker. - watchers map[schema.GroupVersionResource]map[string][]*watch.FakeWatcher + // all/non namespace aka "" and its value is list of fake watchers. + // Manipulations on resources will broadcast the notification events into the + // watchers' channel. Note that too many unhandled events (currently 100, + // see apimachinery/pkg/watch.DefaultChanSize) will cause a panic. + watchers map[schema.GroupVersionResource]map[string][]*watch.RaceFreeFakeWatcher } var _ ObjectTracker = &tracker{} @@ -159,7 +182,7 @@ func NewObjectTracker(scheme ObjectScheme, decoder runtime.Decoder) ObjectTracke scheme: scheme, decoder: decoder, objects: make(map[schema.GroupVersionResource][]runtime.Object), - watchers: make(map[schema.GroupVersionResource]map[string][]*watch.FakeWatcher), + watchers: make(map[schema.GroupVersionResource]map[string][]*watch.RaceFreeFakeWatcher), } } @@ -206,10 +229,10 @@ func (t *tracker) Watch(gvr schema.GroupVersionResource, ns string) (watch.Inter t.lock.Lock() defer t.lock.Unlock() - fakewatcher := watch.NewFakeWithChanSize(FakeWatchBufferSize, true) + fakewatcher := watch.NewRaceFreeFake() if _, exists := t.watchers[gvr]; !exists { - t.watchers[gvr] = make(map[string][]*watch.FakeWatcher) + t.watchers[gvr] = make(map[string][]*watch.RaceFreeFakeWatcher) } t.watchers[gvr][ns] = append(t.watchers[gvr][ns], fakewatcher) return fakewatcher, nil @@ -293,8 +316,8 @@ func (t *tracker) Update(gvr schema.GroupVersionResource, obj runtime.Object, ns return t.add(gvr, obj, ns, true) } -func (t *tracker) getWatches(gvr schema.GroupVersionResource, ns string) []*watch.FakeWatcher { - watches := []*watch.FakeWatcher{} +func (t *tracker) getWatches(gvr schema.GroupVersionResource, ns string) []*watch.RaceFreeFakeWatcher { + watches := []*watch.RaceFreeFakeWatcher{} if t.watchers[gvr] != nil { if w := t.watchers[gvr][ns]; w != nil { watches = append(watches, w...) diff --git a/deps/k8s.io/client-go/testing/fixture_test.go b/deps/k8s.io/client-go/testing/fixture_test.go index 967e0aefa..405fe1a7e 100644 --- a/deps/k8s.io/client-go/testing/fixture_test.go +++ b/deps/k8s.io/client-go/testing/fixture_test.go @@ -63,6 +63,9 @@ func TestWatchCallNonNamespace(t *testing.T) { codecs := serializer.NewCodecFactory(scheme) o := NewObjectTracker(scheme, codecs.UniversalDecoder()) watch, err := o.Watch(testResource, ns) + if err != nil { + t.Fatalf("test resource watch failed in %s: %v ", ns, err) + } go func() { err := o.Create(testResource, testObj, ns) if err != nil { @@ -85,7 +88,13 @@ func TestWatchCallAllNamespace(t *testing.T) { codecs := serializer.NewCodecFactory(scheme) o := NewObjectTracker(scheme, codecs.UniversalDecoder()) w, err := o.Watch(testResource, "test_namespace") + if err != nil { + t.Fatalf("test resource watch failed in test_namespace: %v", err) + } wAll, err := o.Watch(testResource, "") + if err != nil { + t.Fatalf("test resource watch failed in all namespaces: %v", err) + } go func() { err := o.Create(testResource, testObj, ns) assert.NoError(t, err, "test resource creation failed") @@ -161,6 +170,9 @@ func TestWatchCallMultipleInvocation(t *testing.T) { for idx, watchNamespace := range watchNamespaces { i := idx w, err := o.Watch(testResource, watchNamespace) + if err != nil { + t.Fatalf("test resource watch failed in %s: %v", watchNamespace, err) + } go func() { assert.NoError(t, err, "watch invocation failed") for _, c := range cases { @@ -190,3 +202,34 @@ func TestWatchCallMultipleInvocation(t *testing.T) { } wg.Wait() } + +func TestWatchAddAfterStop(t *testing.T) { + testResource := schema.GroupVersionResource{Group: "", Version: "test_version", Resource: "test_kind"} + testObj := getArbitraryResource(testResource, "test_name", "test_namespace") + accessor, err := meta.Accessor(testObj) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + ns := accessor.GetNamespace() + scheme := runtime.NewScheme() + codecs := serializer.NewCodecFactory(scheme) + o := NewObjectTracker(scheme, codecs.UniversalDecoder()) + watch, err := o.Watch(testResource, ns) + if err != nil { + t.Errorf("watch creation failed: %v", err) + } + + // When the watch is stopped it should ignore later events without panicking. + defer func() { + if r := recover(); r != nil { + t.Errorf("Watch panicked when it should have ignored create after stop: %v", r) + } + }() + + watch.Stop() + err = o.Create(testResource, testObj, ns) + if err != nil { + t.Errorf("test resource creation failed: %v", err) + } +} diff --git a/deps/k8s.io/client-go/third_party/forked/golang/template/BUILD b/deps/k8s.io/client-go/third_party/forked/golang/template/BUILD deleted file mode 100644 index cebdf7b63..000000000 --- a/deps/k8s.io/client-go/third_party/forked/golang/template/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "exec.go", - "funcs.go", - ], - importpath = "k8s.io/client-go/third_party/forked/golang/template", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/auth/BUILD b/deps/k8s.io/client-go/tools/auth/BUILD deleted file mode 100644 index b418469ef..000000000 --- a/deps/k8s.io/client-go/tools/auth/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["clientauth.go"], - importpath = "k8s.io/client-go/tools/auth", - deps = ["//vendor/k8s.io/client-go/rest:go_default_library"], -) - -go_test( - name = "go_default_xtest", - srcs = ["clientauth_test.go"], - importpath = "k8s.io/client-go/tools/auth_test", - deps = ["//vendor/k8s.io/client-go/tools/auth:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/bootstrap/token/api/OWNERS b/deps/k8s.io/client-go/tools/bootstrap/token/OWNERS similarity index 100% rename from deps/k8s.io/client-go/tools/bootstrap/token/api/OWNERS rename to deps/k8s.io/client-go/tools/bootstrap/token/OWNERS diff --git a/deps/k8s.io/client-go/tools/bootstrap/token/api/BUILD b/deps/k8s.io/client-go/tools/bootstrap/token/api/BUILD deleted file mode 100644 index 7416adc01..000000000 --- a/deps/k8s.io/client-go/tools/bootstrap/token/api/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "types.go", - ], - importpath = "k8s.io/client-go/tools/bootstrap/token/api", - visibility = ["//visibility:public"], - deps = ["//vendor/k8s.io/api/core/v1:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/tools/bootstrap/token/api/doc.go b/deps/k8s.io/client-go/tools/bootstrap/token/api/doc.go index b9910c35a..249e0a059 100644 --- a/deps/k8s.io/client-go/tools/bootstrap/token/api/doc.go +++ b/deps/k8s.io/client-go/tools/bootstrap/token/api/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package api (pkg/bootstrap/token/api) contains constants and types needed for +// Package api (k8s.io/client-go/tools/bootstrap/token/api) contains constants and types needed for // bootstrap tokens as maintained by the BootstrapSigner and TokenCleaner -// controllers (in pkg/controller/bootstrap) +// controllers (in k8s.io/kubernetes/pkg/controller/bootstrap) package api // import "k8s.io/client-go/tools/bootstrap/token/api" diff --git a/deps/k8s.io/client-go/tools/bootstrap/token/api/types.go b/deps/k8s.io/client-go/tools/bootstrap/token/api/types.go index c30814c0e..3bea78b17 100644 --- a/deps/k8s.io/client-go/tools/bootstrap/token/api/types.go +++ b/deps/k8s.io/client-go/tools/bootstrap/token/api/types.go @@ -86,14 +86,26 @@ const ( // authenticate as. The full username given is "system:bootstrap:". BootstrapUserPrefix = "system:bootstrap:" - // BootstrapGroupPattern is the valid regex pattern that all groups - // assigned to a bootstrap token by BootstrapTokenExtraGroupsKey must match. - // See also ValidateBootstrapGroupName(). - BootstrapGroupPattern = "system:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]" - // BootstrapDefaultGroup is the default group for bootstrapping bearer // tokens (in addition to any groups from BootstrapTokenExtraGroupsKey). BootstrapDefaultGroup = "system:bootstrappers" + + // BootstrapGroupPattern is the valid regex pattern that all groups + // assigned to a bootstrap token by BootstrapTokenExtraGroupsKey must match. + // See also util.ValidateBootstrapGroupName() + BootstrapGroupPattern = `\Asystem:bootstrappers:[a-z0-9:-]{0,255}[a-z0-9]\z` + + // BootstrapTokenPattern defines the {id}.{secret} regular expression pattern + BootstrapTokenPattern = `\A([a-z0-9]{6})\.([a-z0-9]{16})\z` + + // BootstrapTokenIDPattern defines token's id regular expression pattern + BootstrapTokenIDPattern = `\A([a-z0-9]{6})\z` + + // BootstrapTokenIDBytes defines the number of bytes used for the Bootstrap Token's ID field + BootstrapTokenIDBytes = 6 + + // BootstrapTokenSecretBytes defines the number of bytes used the Bootstrap Token's Secret field + BootstrapTokenSecretBytes = 16 ) // KnownTokenUsages specifies the known functions a token will get. diff --git a/deps/k8s.io/client-go/tools/bootstrap/token/util/BUILD b/deps/k8s.io/client-go/tools/bootstrap/token/util/BUILD deleted file mode 100644 index 9c015fb5d..000000000 --- a/deps/k8s.io/client-go/tools/bootstrap/token/util/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["helpers.go"], - importpath = "k8s.io/client-go/tools/bootstrap/token/util", - visibility = ["//visibility:public"], - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/client-go/tools/bootstrap/token/api:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["helpers_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/bootstrap/token/util", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers.go b/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers.go index d28fd28f2..bb1fbeb65 100644 --- a/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers.go +++ b/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers.go @@ -17,20 +17,101 @@ limitations under the License. package util import ( + "bufio" + "crypto/rand" "fmt" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/tools/bootstrap/token/api" "regexp" "strings" + + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/tools/bootstrap/token/api" +) + +// validBootstrapTokenChars defines the characters a bootstrap token can consist of +const validBootstrapTokenChars = "0123456789abcdefghijklmnopqrstuvwxyz" + +var ( + // BootstrapTokenRegexp is a compiled regular expression of TokenRegexpString + BootstrapTokenRegexp = regexp.MustCompile(api.BootstrapTokenPattern) + // BootstrapTokenIDRegexp is a compiled regular expression of TokenIDRegexpString + BootstrapTokenIDRegexp = regexp.MustCompile(api.BootstrapTokenIDPattern) + // BootstrapGroupRegexp is a compiled regular expression of BootstrapGroupPattern + BootstrapGroupRegexp = regexp.MustCompile(api.BootstrapGroupPattern) ) -var bootstrapGroupRegexp = regexp.MustCompile(`\A` + api.BootstrapGroupPattern + `\z`) +// GenerateBootstrapToken generates a new, random Bootstrap Token. +func GenerateBootstrapToken() (string, error) { + tokenID, err := randBytes(api.BootstrapTokenIDBytes) + if err != nil { + return "", err + } + + tokenSecret, err := randBytes(api.BootstrapTokenSecretBytes) + if err != nil { + return "", err + } + + return TokenFromIDAndSecret(tokenID, tokenSecret), nil +} + +// randBytes returns a random string consisting of the characters in +// validBootstrapTokenChars, with the length customized by the parameter +func randBytes(length int) (string, error) { + // len("0123456789abcdefghijklmnopqrstuvwxyz") = 36 which doesn't evenly divide + // the possible values of a byte: 256 mod 36 = 4. Discard any random bytes we + // read that are >= 252 so the bytes we evenly divide the character set. + const maxByteValue = 252 + + var ( + b byte + err error + token = make([]byte, length) + ) + + reader := bufio.NewReaderSize(rand.Reader, length*2) + for i := range token { + for { + if b, err = reader.ReadByte(); err != nil { + return "", err + } + if b < maxByteValue { + break + } + } + + token[i] = validBootstrapTokenChars[int(b)%len(validBootstrapTokenChars)] + } + + return string(token), nil +} + +// TokenFromIDAndSecret returns the full token which is of the form "{id}.{secret}" +func TokenFromIDAndSecret(id, secret string) string { + return fmt.Sprintf("%s.%s", id, secret) +} + +// IsValidBootstrapToken returns whether the given string is valid as a Bootstrap Token and +// in other words satisfies the BootstrapTokenRegexp +func IsValidBootstrapToken(token string) bool { + return BootstrapTokenRegexp.MatchString(token) +} + +// IsValidBootstrapTokenID returns whether the given string is valid as a Bootstrap Token ID and +// in other words satisfies the BootstrapTokenIDRegexp +func IsValidBootstrapTokenID(tokenID string) bool { + return BootstrapTokenIDRegexp.MatchString(tokenID) +} + +// BootstrapTokenSecretName returns the expected name for the Secret storing the +// Bootstrap Token in the Kubernetes API. +func BootstrapTokenSecretName(tokenID string) string { + return fmt.Sprintf("%s%s", api.BootstrapTokenSecretPrefix, tokenID) +} // ValidateBootstrapGroupName checks if the provided group name is a valid // bootstrap group name. Returns nil if valid or a validation error if invalid. -// TODO(mattmoyer): this validation should migrate out to client-go (see https://github.com/kubernetes/client-go/issues/114) func ValidateBootstrapGroupName(name string) error { - if bootstrapGroupRegexp.Match([]byte(name)) { + if BootstrapGroupRegexp.Match([]byte(name)) { return nil } return fmt.Errorf("bootstrap group %q is invalid (must match %s)", name, api.BootstrapGroupPattern) @@ -46,7 +127,7 @@ func ValidateUsages(usages []string) error { } } if len(invalidUsages) > 0 { - return fmt.Errorf("invalide bootstrap token usage string: %s, valid usage options: %s", strings.Join(invalidUsages.List(), ","), strings.Join(api.KnownTokenUsages, ",")) + return fmt.Errorf("invalid bootstrap token usage string: %s, valid usage options: %s", strings.Join(invalidUsages.List(), ","), strings.Join(api.KnownTokenUsages, ",")) } return nil } diff --git a/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers_test.go b/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers_test.go index 915bf7540..a1fe6092f 100644 --- a/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers_test.go +++ b/deps/k8s.io/client-go/tools/bootstrap/token/util/helpers_test.go @@ -21,6 +21,143 @@ import ( "testing" ) +func TestGenerateBootstrapToken(t *testing.T) { + token, err := GenerateBootstrapToken() + if err != nil { + t.Fatalf("GenerateBootstrapToken returned an unexpected error: %+v", err) + } + if !IsValidBootstrapToken(token) { + t.Errorf("GenerateBootstrapToken didn't generate a valid token: %q", token) + } +} + +func TestRandBytes(t *testing.T) { + var randTest = []int{ + 0, + 1, + 2, + 3, + 100, + } + + for _, rt := range randTest { + actual, err := randBytes(rt) + if err != nil { + t.Errorf("failed randBytes: %v", err) + } + if len(actual) != rt { + t.Errorf("failed randBytes:\n\texpected: %d\n\t actual: %d\n", rt, len(actual)) + } + } +} + +func TestTokenFromIDAndSecret(t *testing.T) { + var tests = []struct { + id string + secret string + expected string + }{ + {"foo", "bar", "foo.bar"}, // should use default + {"abcdef", "abcdef0123456789", "abcdef.abcdef0123456789"}, + {"h", "b", "h.b"}, + } + for _, rt := range tests { + actual := TokenFromIDAndSecret(rt.id, rt.secret) + if actual != rt.expected { + t.Errorf( + "failed TokenFromIDAndSecret:\n\texpected: %s\n\t actual: %s", + rt.expected, + actual, + ) + } + } +} + +func TestIsValidBootstrapToken(t *testing.T) { + var tests = []struct { + token string + expected bool + }{ + {token: "", expected: false}, + {token: ".", expected: false}, + {token: "1234567890123456789012", expected: false}, // invalid parcel size + {token: "12345.1234567890123456", expected: false}, // invalid parcel size + {token: ".1234567890123456", expected: false}, // invalid parcel size + {token: "123456.", expected: false}, // invalid parcel size + {token: "123456:1234567890.123456", expected: false}, // invalid separation + {token: "abcdef:1234567890123456", expected: false}, // invalid separation + {token: "Abcdef.1234567890123456", expected: false}, // invalid token id + {token: "123456.AABBCCDDEEFFGGHH", expected: false}, // invalid token secret + {token: "123456.AABBCCD-EEFFGGHH", expected: false}, // invalid character + {token: "abc*ef.1234567890123456", expected: false}, // invalid character + {token: "abcdef.1234567890123456", expected: true}, + {token: "123456.aabbccddeeffgghh", expected: true}, + {token: "ABCDEF.abcdef0123456789", expected: false}, + {token: "abcdef.abcdef0123456789", expected: true}, + {token: "123456.1234560123456789", expected: true}, + } + for _, rt := range tests { + actual := IsValidBootstrapToken(rt.token) + if actual != rt.expected { + t.Errorf( + "failed IsValidBootstrapToken for the token %q\n\texpected: %t\n\t actual: %t", + rt.token, + rt.expected, + actual, + ) + } + } +} + +func TestIsValidBootstrapTokenID(t *testing.T) { + var tests = []struct { + tokenID string + expected bool + }{ + {tokenID: "", expected: false}, + {tokenID: "1234567890123456789012", expected: false}, + {tokenID: "12345", expected: false}, + {tokenID: "Abcdef", expected: false}, + {tokenID: "ABCDEF", expected: false}, + {tokenID: "abcdef.", expected: false}, + {tokenID: "abcdef", expected: true}, + {tokenID: "123456", expected: true}, + } + for _, rt := range tests { + actual := IsValidBootstrapTokenID(rt.tokenID) + if actual != rt.expected { + t.Errorf( + "failed IsValidBootstrapTokenID for the token %q\n\texpected: %t\n\t actual: %t", + rt.tokenID, + rt.expected, + actual, + ) + } + } +} + +func TestBootstrapTokenSecretName(t *testing.T) { + var tests = []struct { + tokenID string + expected string + }{ + {"foo", "bootstrap-token-foo"}, + {"bar", "bootstrap-token-bar"}, + {"", "bootstrap-token-"}, + {"abcdef", "bootstrap-token-abcdef"}, + } + for _, rt := range tests { + actual := BootstrapTokenSecretName(rt.tokenID) + if actual != rt.expected { + t.Errorf( + "failed BootstrapTokenSecretName:\n\texpected: %s\n\t actual: %s", + rt.expected, + actual, + ) + } + } +} + func TestValidateBootstrapGroupName(t *testing.T) { tests := []struct { name string diff --git a/deps/k8s.io/client-go/tools/cache/BUILD b/deps/k8s.io/client-go/tools/cache/BUILD deleted file mode 100644 index c0af11c51..000000000 --- a/deps/k8s.io/client-go/tools/cache/BUILD +++ /dev/null @@ -1,104 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "controller_test.go", - "delta_fifo_test.go", - "expiration_cache_test.go", - "fifo_test.go", - "heap_test.go", - "index_test.go", - "mutation_detector_test.go", - "processor_listener_test.go", - "reflector_test.go", - "shared_informer_test.go", - "store_test.go", - "undelta_store_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/cache", - race = "off", - deps = [ - "//vendor/github.com/google/gofuzz:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/tools/cache/testing:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "controller.go", - "delta_fifo.go", - "doc.go", - "expiration_cache.go", - "expiration_cache_fakes.go", - "fake_custom_store.go", - "fifo.go", - "heap.go", - "index.go", - "listers.go", - "listwatch.go", - "mutation_cache.go", - "mutation_detector.go", - "reflector.go", - "reflector_metrics.go", - "shared_informer.go", - "store.go", - "thread_safe_store.go", - "undelta_store.go", - ], - importpath = "k8s.io/client-go/tools/cache", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/cache:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/pager:go_default_library", - "//vendor/k8s.io/client-go/util/buffer:go_default_library", - "//vendor/k8s.io/client-go/util/retry:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/tools/cache/testing:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/cache/delta_fifo.go b/deps/k8s.io/client-go/tools/cache/delta_fifo.go index d883c2f96..45c3b500d 100644 --- a/deps/k8s.io/client-go/tools/cache/delta_fifo.go +++ b/deps/k8s.io/client-go/tools/cache/delta_fifo.go @@ -38,9 +38,22 @@ import ( // TODO: consider merging keyLister with this object, tracking a list of // "known" keys when Pop() is called. Have to think about how that // affects error retrying. -// TODO(lavalamp): I believe there is a possible race only when using an -// external known object source that the above TODO would -// fix. +// NOTE: It is possible to misuse this and cause a race when using an +// external known object source. +// Whether there is a potential race depends on how the comsumer +// modifies knownObjects. In Pop(), process function is called under +// lock, so it is safe to update data structures in it that need to be +// in sync with the queue (e.g. knownObjects). +// +// Example: +// In case of sharedIndexInformer being a consumer +// (https://github.com/kubernetes/kubernetes/blob/0cdd940f/staging/ +// src/k8s.io/client-go/tools/cache/shared_informer.go#L192), +// there is no race as knownObjects (s.indexer) is modified safely +// under DeltaFIFO's lock. The only exceptions are GetStore() and +// GetIndexer() methods, which expose ways to modify the underlying +// storage. Currently these two methods are used for creating Lister +// and internal tests. // // Also see the comment on DeltaFIFO. func NewDeltaFIFO(keyFunc KeyFunc, knownObjects KeyListerGetter) *DeltaFIFO { @@ -199,8 +212,6 @@ func (f *DeltaFIFO) Delete(obj interface{}) error { if err == nil && !exists && !itemsExist { // Presumably, this was deleted when a relist happened. // Don't provide a second report of the same deletion. - // TODO(lavalamp): This may be racy-- we aren't properly locked - // with knownObjects. return nil } } @@ -485,8 +496,6 @@ func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { } // Detect deletions not already in the queue. - // TODO(lavalamp): This may be racy-- we aren't properly locked - // with knownObjects. Unproven. knownKeys := f.knownObjects.ListKeys() queuedDeletions := 0 for _, k := range knownKeys { diff --git a/deps/k8s.io/client-go/tools/cache/listwatch.go b/deps/k8s.io/client-go/tools/cache/listwatch.go index 06657a3b0..3db963963 100644 --- a/deps/k8s.io/client-go/tools/cache/listwatch.go +++ b/deps/k8s.io/client-go/tools/cache/listwatch.go @@ -17,15 +17,12 @@ limitations under the License. package cache import ( + "context" "time" - "golang.org/x/net/context" - - "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" restclient "k8s.io/client-go/rest" "k8s.io/client-go/tools/pager" @@ -113,76 +110,3 @@ func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) { func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) { return lw.WatchFunc(options) } - -// ListWatchUntil checks the provided conditions against the items returned by the list watcher, returning wait.ErrWaitTimeout -// if timeout is exceeded without all conditions returning true, or an error if an error occurs. -// TODO: check for watch expired error and retry watch from latest point? Same issue exists for Until. -func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch.ConditionFunc) (*watch.Event, error) { - if len(conditions) == 0 { - return nil, nil - } - - list, err := lw.List(metav1.ListOptions{}) - if err != nil { - return nil, err - } - initialItems, err := meta.ExtractList(list) - if err != nil { - return nil, err - } - - // use the initial items as simulated "adds" - var lastEvent *watch.Event - currIndex := 0 - passedConditions := 0 - for _, condition := range conditions { - // check the next condition against the previous event and short circuit waiting for the next watch - if lastEvent != nil { - done, err := condition(*lastEvent) - if err != nil { - return lastEvent, err - } - if done { - passedConditions = passedConditions + 1 - continue - } - } - - ConditionSucceeded: - for currIndex < len(initialItems) { - lastEvent = &watch.Event{Type: watch.Added, Object: initialItems[currIndex]} - currIndex++ - - done, err := condition(*lastEvent) - if err != nil { - return lastEvent, err - } - if done { - passedConditions = passedConditions + 1 - break ConditionSucceeded - } - } - } - if passedConditions == len(conditions) { - return lastEvent, nil - } - remainingConditions := conditions[passedConditions:] - - metaObj, err := meta.ListAccessor(list) - if err != nil { - return nil, err - } - currResourceVersion := metaObj.GetResourceVersion() - - watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion}) - if err != nil { - return nil, err - } - - evt, err := watch.Until(timeout, watchInterface, remainingConditions...) - if err == watch.ErrWatchClosed { - // present a consistent error interface to callers - err = wait.ErrWaitTimeout - } - return evt, err -} diff --git a/deps/k8s.io/client-go/tools/cache/mutation_detector.go b/deps/k8s.io/client-go/tools/cache/mutation_detector.go index 8e6338a1b..e2aa44848 100644 --- a/deps/k8s.io/client-go/tools/cache/mutation_detector.go +++ b/deps/k8s.io/client-go/tools/cache/mutation_detector.go @@ -24,6 +24,8 @@ import ( "sync" "time" + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/diff" ) @@ -43,6 +45,7 @@ func NewCacheMutationDetector(name string) CacheMutationDetector { if !mutationDetectionEnabled { return dummyMutationDetector{} } + glog.Warningln("Mutation detector is enabled, this will result in memory leakage.") return &defaultCacheMutationDetector{name: name, period: 1 * time.Second} } diff --git a/deps/k8s.io/client-go/tools/cache/reflector.go b/deps/k8s.io/client-go/tools/cache/reflector.go index 054a7373c..9ee7efcbb 100644 --- a/deps/k8s.io/client-go/tools/cache/reflector.go +++ b/deps/k8s.io/client-go/tools/cache/reflector.go @@ -24,9 +24,6 @@ import ( "net" "net/url" "reflect" - "regexp" - goruntime "runtime" - "runtime/debug" "strconv" "strings" "sync" @@ -40,6 +37,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/naming" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/watch" @@ -76,8 +74,6 @@ type Reflector struct { var ( // We try to spread the load on apiserver by setting timeouts for // watch requests - it is random in [minWatchTimeout, 2*minWatchTimeout]. - // However, it can be modified to avoid periodic resync to break the - // TCP connection. minWatchTimeout = 5 * time.Minute ) @@ -96,7 +92,7 @@ func NewNamespaceKeyedIndexerAndReflector(lw ListerWatcher, expectedType interfa // resyncPeriod, so that you can use reflectors to periodically process everything as // well as incrementally processing the things that change. func NewReflector(lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector { - return NewNamedReflector(getDefaultReflectorName(internalPackages...), lw, expectedType, store, resyncPeriod) + return NewNamedReflector(naming.GetNameFromCallsite(internalPackages...), lw, expectedType, store, resyncPeriod) } // reflectorDisambiguator is used to disambiguate started reflectors. @@ -127,74 +123,7 @@ func makeValidPrometheusMetricLabel(in string) string { // internalPackages are packages that ignored when creating a default reflector name. These packages are in the common // call chains to NewReflector, so they'd be low entropy names for reflectors -var internalPackages = []string{"client-go/tools/cache/", "/runtime/asm_"} - -// getDefaultReflectorName walks back through the call stack until we find a caller from outside of the ignoredPackages -// it returns back a shortpath/filename:line to aid in identification of this reflector when it starts logging -func getDefaultReflectorName(ignoredPackages ...string) string { - name := "????" - const maxStack = 10 - for i := 1; i < maxStack; i++ { - _, file, line, ok := goruntime.Caller(i) - if !ok { - file, line, ok = extractStackCreator() - if !ok { - break - } - i += maxStack - } - if hasPackage(file, ignoredPackages) { - continue - } - - file = trimPackagePrefix(file) - name = fmt.Sprintf("%s:%d", file, line) - break - } - return name -} - -// hasPackage returns true if the file is in one of the ignored packages. -func hasPackage(file string, ignoredPackages []string) bool { - for _, ignoredPackage := range ignoredPackages { - if strings.Contains(file, ignoredPackage) { - return true - } - } - return false -} - -// trimPackagePrefix reduces duplicate values off the front of a package name. -func trimPackagePrefix(file string) string { - if l := strings.LastIndex(file, "k8s.io/client-go/pkg/"); l >= 0 { - return file[l+len("k8s.io/client-go/"):] - } - if l := strings.LastIndex(file, "/src/"); l >= 0 { - return file[l+5:] - } - if l := strings.LastIndex(file, "/pkg/"); l >= 0 { - return file[l+1:] - } - return file -} - -var stackCreator = regexp.MustCompile(`(?m)^created by (.*)\n\s+(.*):(\d+) \+0x[[:xdigit:]]+$`) - -// extractStackCreator retrieves the goroutine file and line that launched this stack. Returns false -// if the creator cannot be located. -// TODO: Go does not expose this via runtime https://github.com/golang/go/issues/11440 -func extractStackCreator() (string, int, bool) { - stack := debug.Stack() - matches := stackCreator.FindStringSubmatch(string(stack)) - if matches == nil || len(matches) != 4 { - return "", 0, false - } - line, err := strconv.Atoi(matches[3]) - if err != nil { - return "", 0, false - } - return matches[2], line, true -} +var internalPackages = []string{"client-go/tools/cache/"} // Run starts a watch and handles watch events. Will restart the watch if it is closed. // Run will exit when stopCh is closed. diff --git a/deps/k8s.io/client-go/tools/cache/testing/BUILD b/deps/k8s.io/client-go/tools/cache/testing/BUILD deleted file mode 100644 index b4816f9ed..000000000 --- a/deps/k8s.io/client-go/tools/cache/testing/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["fake_controller_source_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/cache/testing", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = ["fake_controller_source.go"], - importpath = "k8s.io/client-go/tools/cache/testing", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/clientcmd/BUILD b/deps/k8s.io/client-go/tools/clientcmd/BUILD deleted file mode 100644 index 4e3ad95b1..000000000 --- a/deps/k8s.io/client-go/tools/clientcmd/BUILD +++ /dev/null @@ -1,79 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "client_config_test.go", - "loader_test.go", - "merged_client_builder_test.go", - "overrides_test.go", - "validation_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/clientcmd", - deps = [ - "//vendor/github.com/ghodss/yaml:go_default_library", - "//vendor/github.com/imdario/mergo:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api/latest:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "auth_loaders.go", - "client_config.go", - "config.go", - "doc.go", - "flag.go", - "helpers.go", - "loader.go", - "merged_client_builder.go", - "overrides.go", - "validation.go", - ], - importpath = "k8s.io/client-go/tools/clientcmd", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/howeyc/gopass:go_default_library", - "//vendor/github.com/imdario/mergo:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/auth:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api/latest:go_default_library", - "//vendor/k8s.io/client-go/util/homedir:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/tools/clientcmd/api:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/BUILD b/deps/k8s.io/client-go/tools/clientcmd/api/BUILD deleted file mode 100644 index ecb65fa30..000000000 --- a/deps/k8s.io/client-go/tools/clientcmd/api/BUILD +++ /dev/null @@ -1,51 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "helpers_test.go", - "types_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/clientcmd/api", - deps = ["//vendor/github.com/ghodss/yaml:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "helpers.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/client-go/tools/clientcmd/api", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/tools/clientcmd/api/latest:all-srcs", - "//staging/src/k8s.io/client-go/tools/clientcmd/api/v1:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/helpers.go b/deps/k8s.io/client-go/tools/clientcmd/api/helpers.go index 43e26487c..65a36936b 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/helpers.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/helpers.go @@ -29,6 +29,8 @@ import ( func init() { sDec, _ := base64.StdEncoding.DecodeString("REDACTED+") redactedBytes = []byte(string(sDec)) + sDec, _ = base64.StdEncoding.DecodeString("DATA+OMITTED") + dataOmittedBytes = []byte(string(sDec)) } // IsConfigEmpty returns true if the config is empty. @@ -79,7 +81,10 @@ func MinifyConfig(config *Config) error { return nil } -var redactedBytes []byte +var ( + redactedBytes []byte + dataOmittedBytes []byte +) // Flatten redacts raw data entries from the config object for a human-readable view. func ShortenConfig(config *Config) { @@ -97,7 +102,7 @@ func ShortenConfig(config *Config) { } for key, cluster := range config.Clusters { if len(cluster.CertificateAuthorityData) > 0 { - cluster.CertificateAuthorityData = redactedBytes + cluster.CertificateAuthorityData = dataOmittedBytes } config.Clusters[key] = cluster } diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/helpers_test.go b/deps/k8s.io/client-go/tools/clientcmd/api/helpers_test.go index 430208456..7ec30e5da 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/helpers_test.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/helpers_test.go @@ -229,7 +229,7 @@ func Example_minifyAndShorten() { // clusters: // cow-cluster: // LocationOfOrigin: "" - // certificate-authority-data: REDACTED + // certificate-authority-data: DATA+OMITTED // server: http://cow.org:8080 // contexts: // federal-context: @@ -276,14 +276,15 @@ func TestShortenSuccess(t *testing.T) { } redacted := string(redactedBytes) + dataOmitted := string(dataOmittedBytes) if len(mutatingConfig.Clusters) != 2 { t.Errorf("unexpected clusters: %v", mutatingConfig.Clusters) } if !reflect.DeepEqual(startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) { t.Errorf("expected %v, got %v", startingConfig.Clusters[unchangingCluster], mutatingConfig.Clusters[unchangingCluster]) } - if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != redacted { - t.Errorf("expected %v, got %v", redacted, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) + if string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData) != dataOmitted { + t.Errorf("expected %v, got %v", dataOmitted, string(mutatingConfig.Clusters[changingCluster].CertificateAuthorityData)) } if len(mutatingConfig.AuthInfos) != 2 { diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/latest/BUILD b/deps/k8s.io/client-go/tools/clientcmd/api/latest/BUILD deleted file mode 100644 index 308319e22..000000000 --- a/deps/k8s.io/client-go/tools/clientcmd/api/latest/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["latest.go"], - importpath = "k8s.io/client-go/tools/clientcmd/api/latest", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/json:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api/v1:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/latest/latest.go b/deps/k8s.io/client-go/tools/clientcmd/api/latest/latest.go index 5fbbe3f13..35bb5dde1 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/latest/latest.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/latest/latest.go @@ -21,6 +21,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/apimachinery/pkg/runtime/serializer/versioning" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/client-go/tools/clientcmd/api" "k8s.io/client-go/tools/clientcmd/api/v1" ) @@ -47,14 +48,8 @@ var ( func init() { Scheme = runtime.NewScheme() - if err := api.AddToScheme(Scheme); err != nil { - // Programmer error, detect immediately - panic(err) - } - if err := v1.AddToScheme(Scheme); err != nil { - // Programmer error, detect immediately - panic(err) - } + utilruntime.Must(api.AddToScheme(Scheme)) + utilruntime.Must(v1.AddToScheme(Scheme)) yamlSerializer := json.NewYAMLSerializer(json.DefaultMetaFactory, Scheme, Scheme) Codec = versioning.NewDefaultingCodecForScheme( Scheme, diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/types.go b/deps/k8s.io/client-go/tools/clientcmd/api/types.go index 407dec83a..1391df702 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/types.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/types.go @@ -119,6 +119,9 @@ type AuthInfo struct { // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. // +optional AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"` + // Exec specifies a custom exec-based authentication plugin for the kubernetes cluster. + // +optional + Exec *ExecConfig `json:"exec,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields // +optional Extensions map[string]runtime.Object `json:"extensions,omitempty"` @@ -147,6 +150,35 @@ type AuthProviderConfig struct { Config map[string]string `json:"config,omitempty"` } +// ExecConfig specifies a command to provide client credentials. The command is exec'd +// and outputs structured stdout holding credentials. +// +// See the client.authentiction.k8s.io API group for specifications of the exact input +// and output format +type ExecConfig struct { + // Command to execute. + Command string `json:"command"` + // Arguments to pass to the command when executing it. + // +optional + Args []string `json:"args"` + // Env defines additional environment variables to expose to the process. These + // are unioned with the host's environment, as well as variables client-go uses + // to pass argument to the plugin. + // +optional + Env []ExecEnvVar `json:"env"` + + // Preferred input version of the ExecInfo. The returned ExecCredentials MUST use + // the same encoding version as the input. + APIVersion string `json:"apiVersion,omitempty"` +} + +// ExecEnvVar is used for setting environment variables when executing an exec-based +// credential plugin. +type ExecEnvVar struct { + Name string `json:"name"` + Value string `json:"value"` +} + // NewConfig is a convenience function that returns a new Config object with non-nil maps func NewConfig() *Config { return &Config{ diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/v1/BUILD b/deps/k8s.io/client-go/tools/clientcmd/api/v1/BUILD deleted file mode 100644 index 2b9daaf08..000000000 --- a/deps/k8s.io/client-go/tools/clientcmd/api/v1/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "conversion.go", - "doc.go", - "register.go", - "types.go", - "zz_generated.deepcopy.go", - ], - importpath = "k8s.io/client-go/tools/clientcmd/api/v1", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/v1/conversion.go b/deps/k8s.io/client-go/tools/clientcmd/api/v1/conversion.go index b47bfbca2..2d7142e6e 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/v1/conversion.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/v1/conversion.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + "fmt" "sort" "k8s.io/apimachinery/pkg/conversion" @@ -105,7 +106,11 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err := s.Convert(&curr.Cluster, newCluster, 0); err != nil { return err } - (*out)[curr.Name] = newCluster + if (*out)[curr.Name] == nil { + (*out)[curr.Name] = newCluster + } else { + return fmt.Errorf("error converting *[]NamedCluster into *map[string]*api.Cluster: duplicate name \"%v\" in list: %v", curr.Name, *in) + } } return nil @@ -136,7 +141,11 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err := s.Convert(&curr.AuthInfo, newAuthInfo, 0); err != nil { return err } - (*out)[curr.Name] = newAuthInfo + if (*out)[curr.Name] == nil { + (*out)[curr.Name] = newAuthInfo + } else { + return fmt.Errorf("error converting *[]NamedAuthInfo into *map[string]*api.AuthInfo: duplicate name \"%v\" in list: %v", curr.Name, *in) + } } return nil @@ -167,7 +176,11 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err := s.Convert(&curr.Context, newContext, 0); err != nil { return err } - (*out)[curr.Name] = newContext + if (*out)[curr.Name] == nil { + (*out)[curr.Name] = newContext + } else { + return fmt.Errorf("error converting *[]NamedContext into *map[string]*api.Context: duplicate name \"%v\" in list: %v", curr.Name, *in) + } } return nil @@ -198,7 +211,11 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err := s.Convert(&curr.Extension, &newExtension, 0); err != nil { return err } - (*out)[curr.Name] = newExtension + if (*out)[curr.Name] == nil { + (*out)[curr.Name] = newExtension + } else { + return fmt.Errorf("error converting *[]NamedExtension into *map[string]runtime.Object: duplicate name \"%v\" in list: %v", curr.Name, *in) + } } return nil diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/v1/types.go b/deps/k8s.io/client-go/tools/clientcmd/api/v1/types.go index 53568135e..56afb608a 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/v1/types.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/v1/types.go @@ -113,6 +113,9 @@ type AuthInfo struct { // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. // +optional AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"` + // Exec specifies a custom exec-based authentication plugin for the kubernetes cluster. + // +optional + Exec *ExecConfig `json:"exec,omitempty"` // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields // +optional Extensions []NamedExtension `json:"extensions,omitempty"` @@ -169,3 +172,32 @@ type AuthProviderConfig struct { Name string `json:"name"` Config map[string]string `json:"config"` } + +// ExecConfig specifies a command to provide client credentials. The command is exec'd +// and outputs structured stdout holding credentials. +// +// See the client.authentiction.k8s.io API group for specifications of the exact input +// and output format +type ExecConfig struct { + // Command to execute. + Command string `json:"command"` + // Arguments to pass to the command when executing it. + // +optional + Args []string `json:"args"` + // Env defines additional environment variables to expose to the process. These + // are unioned with the host's environment, as well as variables client-go uses + // to pass argument to the plugin. + // +optional + Env []ExecEnvVar `json:"env"` + + // Preferred input version of the ExecInfo. The returned ExecCredentials MUST use + // the same encoding version as the input. + APIVersion string `json:"apiVersion,omitempty"` +} + +// ExecEnvVar is used for setting environment variables when executing an exec-based +// credential plugin. +type ExecEnvVar struct { + Name string `json:"name"` + Value string `json:"value"` +} diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go b/deps/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go index dbd943d15..da519dfa3 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -46,22 +46,26 @@ func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { in, out := &in.ImpersonateUserExtra, &out.ImpersonateUserExtra *out = make(map[string][]string, len(*in)) for key, val := range *in { + var outVal []string if val == nil { (*out)[key] = nil } else { - (*out)[key] = make([]string, len(val)) - copy((*out)[key], val) + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) } + (*out)[key] = outVal } } if in.AuthProvider != nil { in, out := &in.AuthProvider, &out.AuthProvider - if *in == nil { - *out = nil - } else { - *out = new(AuthProviderConfig) - (*in).DeepCopyInto(*out) - } + *out = new(AuthProviderConfig) + (*in).DeepCopyInto(*out) + } + if in.Exec != nil { + in, out := &in.Exec, &out.Exec + *out = new(ExecConfig) + (*in).DeepCopyInto(*out) } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions @@ -183,9 +187,8 @@ func (in *Config) DeepCopy() *Config { func (in *Config) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -211,6 +214,48 @@ func (in *Context) DeepCopy() *Context { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecConfig) DeepCopyInto(out *ExecConfig) { + *out = *in + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]ExecEnvVar, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecConfig. +func (in *ExecConfig) DeepCopy() *ExecConfig { + if in == nil { + return nil + } + out := new(ExecConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecEnvVar) DeepCopyInto(out *ExecEnvVar) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecEnvVar. +func (in *ExecEnvVar) DeepCopy() *ExecEnvVar { + if in == nil { + return nil + } + out := new(ExecEnvVar) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamedAuthInfo) DeepCopyInto(out *NamedAuthInfo) { *out = *in diff --git a/deps/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go b/deps/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go index e575b23d7..3240a7a98 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go +++ b/deps/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package api @@ -46,22 +46,26 @@ func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { in, out := &in.ImpersonateUserExtra, &out.ImpersonateUserExtra *out = make(map[string][]string, len(*in)) for key, val := range *in { + var outVal []string if val == nil { (*out)[key] = nil } else { - (*out)[key] = make([]string, len(val)) - copy((*out)[key], val) + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) } + (*out)[key] = outVal } } if in.AuthProvider != nil { in, out := &in.AuthProvider, &out.AuthProvider - if *in == nil { - *out = nil - } else { - *out = new(AuthProviderConfig) - (*in).DeepCopyInto(*out) - } + *out = new(AuthProviderConfig) + (*in).DeepCopyInto(*out) + } + if in.Exec != nil { + in, out := &in.Exec, &out.Exec + *out = new(ExecConfig) + (*in).DeepCopyInto(*out) } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions @@ -150,36 +154,45 @@ func (in *Config) DeepCopyInto(out *Config) { in, out := &in.Clusters, &out.Clusters *out = make(map[string]*Cluster, len(*in)) for key, val := range *in { + var outVal *Cluster if val == nil { (*out)[key] = nil } else { - (*out)[key] = new(Cluster) - val.DeepCopyInto((*out)[key]) + in, out := &val, &outVal + *out = new(Cluster) + (*in).DeepCopyInto(*out) } + (*out)[key] = outVal } } if in.AuthInfos != nil { in, out := &in.AuthInfos, &out.AuthInfos *out = make(map[string]*AuthInfo, len(*in)) for key, val := range *in { + var outVal *AuthInfo if val == nil { (*out)[key] = nil } else { - (*out)[key] = new(AuthInfo) - val.DeepCopyInto((*out)[key]) + in, out := &val, &outVal + *out = new(AuthInfo) + (*in).DeepCopyInto(*out) } + (*out)[key] = outVal } } if in.Contexts != nil { in, out := &in.Contexts, &out.Contexts *out = make(map[string]*Context, len(*in)) for key, val := range *in { + var outVal *Context if val == nil { (*out)[key] = nil } else { - (*out)[key] = new(Context) - val.DeepCopyInto((*out)[key]) + in, out := &val, &outVal + *out = new(Context) + (*in).DeepCopyInto(*out) } + (*out)[key] = outVal } } if in.Extensions != nil { @@ -210,9 +223,8 @@ func (in *Config) DeepCopy() *Config { func (in *Config) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -242,6 +254,48 @@ func (in *Context) DeepCopy() *Context { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecConfig) DeepCopyInto(out *ExecConfig) { + *out = *in + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]ExecEnvVar, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecConfig. +func (in *ExecConfig) DeepCopy() *ExecConfig { + if in == nil { + return nil + } + out := new(ExecConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecEnvVar) DeepCopyInto(out *ExecEnvVar) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecEnvVar. +func (in *ExecEnvVar) DeepCopy() *ExecEnvVar { + if in == nil { + return nil + } + out := new(ExecEnvVar) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Preferences) DeepCopyInto(out *Preferences) { *out = *in diff --git a/deps/k8s.io/client-go/tools/clientcmd/auth_loaders.go b/deps/k8s.io/client-go/tools/clientcmd/auth_loaders.go index 12331f6e6..1d3c11d8f 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/auth_loaders.go +++ b/deps/k8s.io/client-go/tools/clientcmd/auth_loaders.go @@ -23,7 +23,8 @@ import ( "io/ioutil" "os" - "github.com/howeyc/gopass" + "golang.org/x/crypto/ssh/terminal" + clientauth "k8s.io/client-go/tools/auth" ) @@ -89,8 +90,12 @@ func promptForString(field string, r io.Reader, show bool) (result string, err e _, err = fmt.Fscan(r, &result) } else { var data []byte - data, err = gopass.GetPasswdMasked() - result = string(data) + if terminal.IsTerminal(int(os.Stdin.Fd())) { + data, err = terminal.ReadPassword(int(os.Stdin.Fd())) + result = string(data) + } else { + return "", fmt.Errorf("error reading input for %s", field) + } } return result, err } diff --git a/deps/k8s.io/client-go/tools/clientcmd/client_config.go b/deps/k8s.io/client-go/tools/clientcmd/client_config.go index af86f677c..b8927f710 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/client_config.go +++ b/deps/k8s.io/client-go/tools/clientcmd/client_config.go @@ -27,7 +27,6 @@ import ( "github.com/golang/glog" "github.com/imdario/mergo" - "k8s.io/api/core/v1" restclient "k8s.io/client-go/rest" clientauth "k8s.io/client-go/tools/auth" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" @@ -100,6 +99,26 @@ func NewInteractiveClientConfig(config clientcmdapi.Config, contextName string, return &DirectClientConfig{config, contextName, overrides, fallbackReader, configAccess, promptedCredentials{}} } +// NewClientConfigFromBytes takes your kubeconfig and gives you back a ClientConfig +func NewClientConfigFromBytes(configBytes []byte) (ClientConfig, error) { + config, err := Load(configBytes) + if err != nil { + return nil, err + } + + return &DirectClientConfig{*config, "", &ConfigOverrides{}, nil, nil, promptedCredentials{}}, nil +} + +// RESTConfigFromKubeConfig is a convenience method to give back a restconfig from your kubeconfig bytes. +// For programmatic access, this is what you want 80% of the time +func RESTConfigFromKubeConfig(configBytes []byte) (*restclient.Config, error) { + clientConfig, err := NewClientConfigFromBytes(configBytes) + if err != nil { + return nil, err + } + return clientConfig.ClientConfig() +} + func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) { return config.config, nil } @@ -156,10 +175,6 @@ func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { // only try to read the auth information if we are secure if restclient.IsConfigTransportTLS(*clientConfig) { var err error - - // mergo is a first write wins for map value and a last writing wins for interface values - // NOTE: This behavior changed with https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a. - // Our mergo.Merge version is older than this change. var persister restclient.AuthProviderConfigPersister if config.configAccess != nil { authInfoName, _ := config.getAuthInfoName() @@ -169,13 +184,13 @@ func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { if err != nil { return nil, err } - mergo.Merge(clientConfig, userAuthPartialConfig) + mergo.MergeWithOverwrite(clientConfig, userAuthPartialConfig) serverAuthPartialConfig, err := getServerIdentificationPartialConfig(configAuthInfo, configClusterInfo) if err != nil { return nil, err } - mergo.Merge(clientConfig, serverAuthPartialConfig) + mergo.MergeWithOverwrite(clientConfig, serverAuthPartialConfig) } return clientConfig, nil @@ -195,7 +210,7 @@ func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClientConfig.CAFile = configClusterInfo.CertificateAuthority configClientConfig.CAData = configClusterInfo.CertificateAuthorityData configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify - mergo.Merge(mergedConfig, configClientConfig) + mergo.MergeWithOverwrite(mergedConfig, configClientConfig) return mergedConfig, nil } @@ -241,6 +256,9 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI mergedConfig.AuthProvider = configAuthInfo.AuthProvider mergedConfig.AuthConfigPersister = persistAuthConfig } + if configAuthInfo.Exec != nil { + mergedConfig.ExecProvider = configAuthInfo.Exec + } // if there still isn't enough information to authenticate the user, try prompting if !canIdentifyUser(*mergedConfig) && (fallbackReader != nil) { @@ -257,8 +275,8 @@ func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthI promptedConfig := makeUserIdentificationConfig(*promptedAuthInfo) previouslyMergedConfig := mergedConfig mergedConfig = &restclient.Config{} - mergo.Merge(mergedConfig, promptedConfig) - mergo.Merge(mergedConfig, previouslyMergedConfig) + mergo.MergeWithOverwrite(mergedConfig, promptedConfig) + mergo.MergeWithOverwrite(mergedConfig, previouslyMergedConfig) config.promptedCredentials.username = mergedConfig.Username config.promptedCredentials.password = mergedConfig.Password } @@ -291,7 +309,8 @@ func canIdentifyUser(config restclient.Config) bool { return len(config.Username) > 0 || (len(config.CertFile) > 0 || len(config.CertData) > 0) || len(config.BearerToken) > 0 || - config.AuthProvider != nil + config.AuthProvider != nil || + config.ExecProvider != nil } // Namespace implements ClientConfig @@ -314,7 +333,7 @@ func (config *DirectClientConfig) Namespace() (string, bool, error) { } if len(configContext.Namespace) == 0 { - return v1.NamespaceDefault, false, nil + return "default", false, nil } return configContext.Namespace, false, nil @@ -400,11 +419,11 @@ func (config *DirectClientConfig) getContext() (clientcmdapi.Context, error) { mergedContext := clientcmdapi.NewContext() if configContext, exists := contexts[contextName]; exists { - mergo.Merge(mergedContext, configContext) + mergo.MergeWithOverwrite(mergedContext, configContext) } else if required { return clientcmdapi.Context{}, fmt.Errorf("context %q does not exist", contextName) } - mergo.Merge(mergedContext, config.overrides.Context) + mergo.MergeWithOverwrite(mergedContext, config.overrides.Context) return *mergedContext, nil } @@ -416,11 +435,11 @@ func (config *DirectClientConfig) getAuthInfo() (clientcmdapi.AuthInfo, error) { mergedAuthInfo := clientcmdapi.NewAuthInfo() if configAuthInfo, exists := authInfos[authInfoName]; exists { - mergo.Merge(mergedAuthInfo, configAuthInfo) + mergo.MergeWithOverwrite(mergedAuthInfo, configAuthInfo) } else if required { return clientcmdapi.AuthInfo{}, fmt.Errorf("auth info %q does not exist", authInfoName) } - mergo.Merge(mergedAuthInfo, config.overrides.AuthInfo) + mergo.MergeWithOverwrite(mergedAuthInfo, config.overrides.AuthInfo) return *mergedAuthInfo, nil } @@ -431,13 +450,13 @@ func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { clusterInfoName, required := config.getClusterName() mergedClusterInfo := clientcmdapi.NewCluster() - mergo.Merge(mergedClusterInfo, config.overrides.ClusterDefaults) + mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterDefaults) if configClusterInfo, exists := clusterInfos[clusterInfoName]; exists { - mergo.Merge(mergedClusterInfo, configClusterInfo) + mergo.MergeWithOverwrite(mergedClusterInfo, configClusterInfo) } else if required { return clientcmdapi.Cluster{}, fmt.Errorf("cluster %q does not exist", clusterInfoName) } - mergo.Merge(mergedClusterInfo, config.overrides.ClusterInfo) + mergo.MergeWithOverwrite(mergedClusterInfo, config.overrides.ClusterInfo) // An override of --insecure-skip-tls-verify=true and no accompanying CA/CA data should clear already-set CA/CA data // otherwise, a kubeconfig containing a CA reference would return an error that "CA and insecure-skip-tls-verify couldn't both be set" caLen := len(config.overrides.ClusterInfo.CertificateAuthority) diff --git a/deps/k8s.io/client-go/tools/clientcmd/client_config_test.go b/deps/k8s.io/client-go/tools/clientcmd/client_config_test.go index 0a9288bcf..21a7d3227 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/client_config_test.go +++ b/deps/k8s.io/client-go/tools/clientcmd/client_config_test.go @@ -28,21 +28,83 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) -func TestOldMergoLib(t *testing.T) { +func TestMergoSemantics(t *testing.T) { + type U struct { + A string + B int64 + } type T struct { + S []string X string + Y int64 + U U + } + var testDataStruct = []struct { + dst T + src T + expected T + }{ + { + dst: T{X: "one"}, + src: T{X: "two"}, + expected: T{X: "two"}, + }, + { + dst: T{X: "one", Y: 5, U: U{A: "four", B: 6}}, + src: T{X: "two", U: U{A: "three", B: 4}}, + expected: T{X: "two", Y: 5, U: U{A: "three", B: 4}}, + }, + { + dst: T{S: []string{"test3", "test4", "test5"}}, + src: T{S: []string{"test1", "test2", "test3"}}, + expected: T{S: []string{"test1", "test2", "test3"}}, + }, } - dst := T{X: "one"} - src := T{X: "two"} - mergo.Merge(&dst, &src) - if dst.X != "two" { - // mergo.Merge changed in an incompatible way with - // - // https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a - // - // We have to stay with the old version which still does eager - // copying from src to dst in structs. - t.Errorf("mergo.Merge library found with incompatible, new behavior") + for _, data := range testDataStruct { + err := mergo.MergeWithOverwrite(&data.dst, &data.src) + if err != nil { + t.Errorf("error while merging: %s", err) + } + if !reflect.DeepEqual(data.dst, data.expected) { + // The mergo library has previously changed in a an incompatible way. + // example: + // + // https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a + // + // This test verifies that the semantics of the merge are what we expect. + // If they are not, the mergo library may have been updated and broken + // unexpectedly. + t.Errorf("mergo.MergeWithOverwrite did not provide expected output: %+v doesn't match %+v", data.dst, data.expected) + } + } + + var testDataMap = []struct { + dst map[string]int + src map[string]int + expected map[string]int + }{ + { + dst: map[string]int{"rsc": 6543, "r": 2138, "gri": 1908, "adg": 912, "prt": 22}, + src: map[string]int{"rsc": 3711, "r": 2138, "gri": 1908, "adg": 912}, + expected: map[string]int{"rsc": 3711, "r": 2138, "gri": 1908, "adg": 912, "prt": 22}, + }, + } + for _, data := range testDataMap { + err := mergo.MergeWithOverwrite(&data.dst, &data.src) + if err != nil { + t.Errorf("error while merging: %s", err) + } + if !reflect.DeepEqual(data.dst, data.expected) { + // The mergo library has previously changed in a an incompatible way. + // example: + // + // https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a + // + // This test verifies that the semantics of the merge are what we expect. + // If they are not, the mergo library may have been updated and broken + // unexpectedly. + t.Errorf("mergo.MergeWithOverwrite did not provide expected output: %+v doesn't match %+v", data.dst, data.expected) + } } } @@ -126,6 +188,54 @@ func TestMergeContext(t *testing.T) { matchStringArg(namespace, actual, t) } +func TestModifyContext(t *testing.T) { + expectedCtx := map[string]bool{ + "updated": true, + "clean": true, + } + + tempPath, err := ioutil.TempFile("", "testclientcmd-") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + defer os.Remove(tempPath.Name()) + + pathOptions := NewDefaultPathOptions() + config := createValidTestConfig() + + pathOptions.GlobalFile = tempPath.Name() + + // define new context and assign it - our path options config + config.Contexts["updated"] = &clientcmdapi.Context{ + Cluster: "updated", + AuthInfo: "updated", + } + config.CurrentContext = "updated" + + if err := ModifyConfig(pathOptions, *config, true); err != nil { + t.Errorf("Unexpected error: %v", err) + } + + startingConfig, err := pathOptions.GetStartingConfig() + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + // make sure the current context was updated + matchStringArg("updated", startingConfig.CurrentContext, t) + + // there should now be two contexts + if len(startingConfig.Contexts) != len(expectedCtx) { + t.Fatalf("unexpected nuber of contexts, expecting %v, but found %v", len(expectedCtx), len(startingConfig.Contexts)) + } + + for key := range startingConfig.Contexts { + if !expectedCtx[key] { + t.Fatalf("expected context %q to exist", key) + } + } +} + func TestCertificateData(t *testing.T) { caData := []byte("ca-data") certData := []byte("cert-data") @@ -526,3 +636,46 @@ func TestNamespaceOverride(t *testing.T) { matchStringArg("foo", ns, t) } + +func TestAuthConfigMerge(t *testing.T) { + content := ` +apiVersion: v1 +clusters: +- cluster: + server: https://localhost:8080 + name: foo-cluster +contexts: +- context: + cluster: foo-cluster + user: foo-user + namespace: bar + name: foo-context +current-context: foo-context +kind: Config +users: +- name: foo-user + user: + exec: + apiVersion: client.authentication.k8s.io/v1alpha1 + args: + - arg-1 + - arg-2 + command: foo-command +` + tmpfile, err := ioutil.TempFile("", "kubeconfig") + if err != nil { + t.Error(err) + } + defer os.Remove(tmpfile.Name()) + if err := ioutil.WriteFile(tmpfile.Name(), []byte(content), 0666); err != nil { + t.Error(err) + } + config, err := BuildConfigFromFlags("", tmpfile.Name()) + if err != nil { + t.Error(err) + } + if !reflect.DeepEqual(config.ExecProvider.Args, []string{"arg-1", "arg-2"}) { + t.Errorf("Got args %v when they should be %v\n", config.ExecProvider.Args, []string{"arg-1", "arg-2"}) + } + +} diff --git a/deps/k8s.io/client-go/tools/clientcmd/config.go b/deps/k8s.io/client-go/tools/clientcmd/config.go index 16ccdaf20..9495849b0 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/config.go +++ b/deps/k8s.io/client-go/tools/clientcmd/config.go @@ -68,7 +68,9 @@ func (o *PathOptions) GetEnvVarFiles() []string { return []string{} } - return filepath.SplitList(envVarValue) + fileList := filepath.SplitList(envVarValue) + // prevent the same path load multiple times + return deduplicate(fileList) } func (o *PathOptions) GetLoadingPrecedence() []string { @@ -218,6 +220,9 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela } } + // seenConfigs stores a map of config source filenames to computed config objects + seenConfigs := map[string]*clientcmdapi.Config{} + for key, context := range newConfig.Contexts { startingContext, exists := startingConfig.Contexts[key] if !reflect.DeepEqual(context, startingContext) || !exists { @@ -226,15 +231,28 @@ func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, rela destinationFile = configAccess.GetDefaultFilename() } - configToWrite, err := getConfigFromFile(destinationFile) - if err != nil { - return err + // we only obtain a fresh config object from its source file + // if we have not seen it already - this prevents us from + // reading and writing to the same number of files repeatedly + // when multiple / all contexts share the same destination file. + configToWrite, seen := seenConfigs[destinationFile] + if !seen { + var err error + configToWrite, err = getConfigFromFile(destinationFile) + if err != nil { + return err + } + seenConfigs[destinationFile] = configToWrite } + configToWrite.Contexts[key] = context + } + } - if err := WriteToFile(*configToWrite, destinationFile); err != nil { - return err - } + // actually persist config object changes + for destinationFile, configToWrite := range seenConfigs { + if err := WriteToFile(*configToWrite, destinationFile); err != nil { + return err } } diff --git a/deps/k8s.io/client-go/tools/clientcmd/loader.go b/deps/k8s.io/client-go/tools/clientcmd/loader.go index 2b6293db4..6038c8d45 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/loader.go +++ b/deps/k8s.io/client-go/tools/clientcmd/loader.go @@ -139,7 +139,9 @@ func NewDefaultClientConfigLoadingRules() *ClientConfigLoadingRules { envVarFiles := os.Getenv(RecommendedConfigPathEnvVar) if len(envVarFiles) != 0 { - chain = append(chain, filepath.SplitList(envVarFiles)...) + fileList := filepath.SplitList(envVarFiles) + // prevent the same path load multiple times + chain = append(chain, deduplicate(fileList)...) } else { chain = append(chain, RecommendedHomeFile) @@ -209,7 +211,7 @@ func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) { mapConfig := clientcmdapi.NewConfig() for _, kubeconfig := range kubeconfigs { - mergo.Merge(mapConfig, kubeconfig) + mergo.MergeWithOverwrite(mapConfig, kubeconfig) } // merge all of the struct values in the reverse order so that priority is given correctly @@ -217,14 +219,14 @@ func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) { nonMapConfig := clientcmdapi.NewConfig() for i := len(kubeconfigs) - 1; i >= 0; i-- { kubeconfig := kubeconfigs[i] - mergo.Merge(nonMapConfig, kubeconfig) + mergo.MergeWithOverwrite(nonMapConfig, kubeconfig) } // since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and // get the values we expect. config := clientcmdapi.NewConfig() - mergo.Merge(config, mapConfig) - mergo.Merge(config, nonMapConfig) + mergo.MergeWithOverwrite(config, mapConfig) + mergo.MergeWithOverwrite(config, nonMapConfig) if rules.ResolvePaths() { if err := ResolveLocalPaths(config); err != nil { @@ -557,7 +559,12 @@ func GetClusterFileReferences(cluster *clientcmdapi.Cluster) []*string { } func GetAuthInfoFileReferences(authInfo *clientcmdapi.AuthInfo) []*string { - return []*string{&authInfo.ClientCertificate, &authInfo.ClientKey, &authInfo.TokenFile} + s := []*string{&authInfo.ClientCertificate, &authInfo.ClientKey, &authInfo.TokenFile} + // Only resolve exec command if it isn't PATH based. + if authInfo.Exec != nil && strings.ContainsRune(authInfo.Exec.Command, filepath.Separator) { + s = append(s, &authInfo.Exec.Command) + } + return s } // ResolvePaths updates the given refs to be absolute paths, relative to the given base directory @@ -610,3 +617,17 @@ func MakeRelative(path, base string) (string, error) { } return path, nil } + +// deduplicate removes any duplicated values and returns a new slice, keeping the order unchanged +func deduplicate(s []string) []string { + encountered := map[string]bool{} + ret := make([]string, 0) + for i := range s { + if encountered[s[i]] { + continue + } + encountered[s[i]] = true + ret = append(ret, s[i]) + } + return ret +} diff --git a/deps/k8s.io/client-go/tools/clientcmd/loader_test.go b/deps/k8s.io/client-go/tools/clientcmd/loader_test.go index 74319788a..86eccac45 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/loader_test.go +++ b/deps/k8s.io/client-go/tools/clientcmd/loader_test.go @@ -201,11 +201,182 @@ func TestLoadingEmptyMaps(t *testing.T) { } } +func TestDuplicateClusterName(t *testing.T) { + configFile, _ := ioutil.TempFile("", "") + defer os.Remove(configFile.Name()) + + err := ioutil.WriteFile(configFile.Name(), []byte(` +kind: Config +apiVersion: v1 +clusters: +- cluster: + api-version: v1 + server: https://kubernetes.default.svc:443 + certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + name: kubeconfig-cluster +- cluster: + api-version: v2 + server: https://test.example.server:443 + certificate-authority: /var/run/secrets/test.example.io/serviceaccount/ca.crt + name: kubeconfig-cluster +contexts: +- context: + cluster: kubeconfig-cluster + namespace: default + user: kubeconfig-user + name: kubeconfig-context +current-context: kubeconfig-context +users: +- name: kubeconfig-user + user: + tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +`), os.FileMode(0755)) + + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + _, err = LoadFromFile(configFile.Name()) + if err == nil || !strings.Contains(err.Error(), + "error converting *[]NamedCluster into *map[string]*api.Cluster: duplicate name \"kubeconfig-cluster\" in list") { + t.Error("Expected error in loading duplicate cluster name, got none") + } +} + +func TestDuplicateContextName(t *testing.T) { + configFile, _ := ioutil.TempFile("", "") + defer os.Remove(configFile.Name()) + + err := ioutil.WriteFile(configFile.Name(), []byte(` +kind: Config +apiVersion: v1 +clusters: +- cluster: + api-version: v1 + server: https://kubernetes.default.svc:443 + certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + name: kubeconfig-cluster +contexts: +- context: + cluster: kubeconfig-cluster + namespace: default + user: kubeconfig-user + name: kubeconfig-context +- context: + cluster: test-example-cluster + namespace: test-example + user: test-example-user + name: kubeconfig-context +current-context: kubeconfig-context +users: +- name: kubeconfig-user + user: + tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +`), os.FileMode(0755)) + + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + _, err = LoadFromFile(configFile.Name()) + if err == nil || !strings.Contains(err.Error(), + "error converting *[]NamedContext into *map[string]*api.Context: duplicate name \"kubeconfig-context\" in list") { + t.Error("Expected error in loading duplicate context name, got none") + } +} + +func TestDuplicateUserName(t *testing.T) { + configFile, _ := ioutil.TempFile("", "") + defer os.Remove(configFile.Name()) + + err := ioutil.WriteFile(configFile.Name(), []byte(` +kind: Config +apiVersion: v1 +clusters: +- cluster: + api-version: v1 + server: https://kubernetes.default.svc:443 + certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + name: kubeconfig-cluster +contexts: +- context: + cluster: kubeconfig-cluster + namespace: default + user: kubeconfig-user + name: kubeconfig-context +current-context: kubeconfig-context +users: +- name: kubeconfig-user + user: + tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +- name: kubeconfig-user + user: + tokenFile: /var/run/secrets/test.example.com/serviceaccount/token +`), os.FileMode(0755)) + + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + _, err = LoadFromFile(configFile.Name()) + if err == nil || !strings.Contains(err.Error(), + "error converting *[]NamedAuthInfo into *map[string]*api.AuthInfo: duplicate name \"kubeconfig-user\" in list") { + t.Error("Expected error in loading duplicate user name, got none") + } +} + +func TestDuplicateExtensionName(t *testing.T) { + configFile, _ := ioutil.TempFile("", "") + defer os.Remove(configFile.Name()) + + err := ioutil.WriteFile(configFile.Name(), []byte(` +kind: Config +apiVersion: v1 +clusters: +- cluster: + api-version: v1 + server: https://kubernetes.default.svc:443 + certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + name: kubeconfig-cluster +contexts: +- context: + cluster: kubeconfig-cluster + namespace: default + user: kubeconfig-user + name: kubeconfig-context +current-context: kubeconfig-context +users: +- name: kubeconfig-user + user: + tokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token +extensions: +- extension: + bytes: test + name: test-extension +- extension: + bytes: some-example + name: test-extension +`), os.FileMode(0755)) + + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + + _, err = LoadFromFile(configFile.Name()) + if err == nil || !strings.Contains(err.Error(), + "error converting *[]NamedExtension into *map[string]runtime.Object: duplicate name \"test-extension\" in list") { + t.Error("Expected error in loading duplicate extension name, got none") + } +} + func TestResolveRelativePaths(t *testing.T) { pathResolutionConfig1 := clientcmdapi.Config{ AuthInfos: map[string]*clientcmdapi.AuthInfo{ "relative-user-1": {ClientCertificate: "relative/client/cert", ClientKey: "../relative/client/key"}, "absolute-user-1": {ClientCertificate: "/absolute/client/cert", ClientKey: "/absolute/client/key"}, + "relative-cmd-1": {Exec: &clientcmdapi.ExecConfig{Command: "../relative/client/cmd"}}, + "absolute-cmd-1": {Exec: &clientcmdapi.ExecConfig{Command: "/absolute/client/cmd"}}, + "PATH-cmd-1": {Exec: &clientcmdapi.ExecConfig{Command: "cmd"}}, }, Clusters: map[string]*clientcmdapi.Cluster{ "relative-server-1": {CertificateAuthority: "../relative/ca"}, @@ -291,9 +462,21 @@ func TestResolveRelativePaths(t *testing.T) { matchStringArg(pathResolutionConfig2.AuthInfos["absolute-user-2"].ClientCertificate, authInfo.ClientCertificate, t) matchStringArg(pathResolutionConfig2.AuthInfos["absolute-user-2"].ClientKey, authInfo.ClientKey, t) } + if key == "relative-cmd-1" { + foundAuthInfoCount++ + matchStringArg(path.Join(configDir1, pathResolutionConfig1.AuthInfos[key].Exec.Command), authInfo.Exec.Command, t) + } + if key == "absolute-cmd-1" { + foundAuthInfoCount++ + matchStringArg(pathResolutionConfig1.AuthInfos[key].Exec.Command, authInfo.Exec.Command, t) + } + if key == "PATH-cmd-1" { + foundAuthInfoCount++ + matchStringArg(pathResolutionConfig1.AuthInfos[key].Exec.Command, authInfo.Exec.Command, t) + } } - if foundAuthInfoCount != 4 { - t.Errorf("Expected 4 users, found %v: %v", foundAuthInfoCount, mergedConfig.AuthInfos) + if foundAuthInfoCount != 7 { + t.Errorf("Expected 7 users, found %v: %v", foundAuthInfoCount, mergedConfig.AuthInfos) } } @@ -577,3 +760,30 @@ func Example_mergingEverythingNoConflicts() { // user: // token: red-token } + +func TestDeduplicate(t *testing.T) { + testCases := []struct { + src []string + expect []string + }{ + { + src: []string{"a", "b", "c", "d", "e", "f"}, + expect: []string{"a", "b", "c", "d", "e", "f"}, + }, + { + src: []string{"a", "b", "c", "b", "e", "f"}, + expect: []string{"a", "b", "c", "e", "f"}, + }, + { + src: []string{"a", "a", "b", "b", "c", "b"}, + expect: []string{"a", "b", "c"}, + }, + } + + for _, testCase := range testCases { + get := deduplicate(testCase.src) + if !reflect.DeepEqual(get, testCase.expect) { + t.Errorf("expect: %v, get: %v", testCase.expect, get) + } + } +} diff --git a/deps/k8s.io/client-go/tools/clientcmd/merged_client_builder.go b/deps/k8s.io/client-go/tools/clientcmd/merged_client_builder.go index 3f02111bd..05038133b 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/merged_client_builder.go +++ b/deps/k8s.io/client-go/tools/clientcmd/merged_client_builder.go @@ -22,7 +22,6 @@ import ( "github.com/golang/glog" - "k8s.io/api/core/v1" restclient "k8s.io/client-go/rest" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -145,7 +144,7 @@ func (config *DeferredLoadingClientConfig) Namespace() (string, bool, error) { if len(ns) > 0 { // if we got a non-default namespace from the kubeconfig, use it - if ns != v1.NamespaceDefault { + if ns != "default" { return ns, false, nil } diff --git a/deps/k8s.io/client-go/tools/clientcmd/validation.go b/deps/k8s.io/client-go/tools/clientcmd/validation.go index 4c7b15b78..629c0b30a 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/validation.go +++ b/deps/k8s.io/client-go/tools/clientcmd/validation.go @@ -237,6 +237,25 @@ func validateAuthInfo(authInfoName string, authInfo clientcmdapi.AuthInfo) []err } } + if authInfo.Exec != nil { + if authInfo.AuthProvider != nil { + validationErrors = append(validationErrors, fmt.Errorf("authProvider cannot be provided in combination with an exec plugin for %s", authInfoName)) + } + if len(authInfo.Exec.Command) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("command must be specified for %v to use exec authentication plugin", authInfoName)) + } + if len(authInfo.Exec.APIVersion) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("apiVersion must be specified for %v to use exec authentication plugin", authInfoName)) + } + for _, v := range authInfo.Exec.Env { + if len(v.Name) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("env variable name must be specified for %v to use exec authentication plugin", authInfoName)) + } else if len(v.Value) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("env variable %s value must be specified for %v to use exec authentication plugin", v.Name, authInfoName)) + } + } + } + // authPath also provides information for the client to identify the server, so allow multiple auth methods in that case if (len(methods) > 1) && (!usingAuthPath) { validationErrors = append(validationErrors, fmt.Errorf("more than one authentication method found for %v; found %v, only one is allowed", authInfoName, methods)) diff --git a/deps/k8s.io/client-go/tools/clientcmd/validation_test.go b/deps/k8s.io/client-go/tools/clientcmd/validation_test.go index fcf86ab0a..4742b1a14 100644 --- a/deps/k8s.io/client-go/tools/clientcmd/validation_test.go +++ b/deps/k8s.io/client-go/tools/clientcmd/validation_test.go @@ -365,6 +365,106 @@ func TestValidateMultipleMethodsAuthInfo(t *testing.T) { test.testConfig(t) } +func TestValidateAuthInfoExec(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["user"] = &clientcmdapi.AuthInfo{ + Exec: &clientcmdapi.ExecConfig{ + Command: "/bin/example", + APIVersion: "clientauthentication.k8s.io/v1alpha1", + Args: []string{"hello", "world"}, + Env: []clientcmdapi.ExecEnvVar{ + {Name: "foo", Value: "bar"}, + }, + }, + } + test := configValidationTest{ + config: config, + } + + test.testAuthInfo("user", t) + test.testConfig(t) +} + +func TestValidateAuthInfoExecNoVersion(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["user"] = &clientcmdapi.AuthInfo{ + Exec: &clientcmdapi.ExecConfig{ + Command: "/bin/example", + }, + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{ + "apiVersion must be specified for user to use exec authentication plugin", + }, + } + + test.testAuthInfo("user", t) + test.testConfig(t) +} + +func TestValidateAuthInfoExecNoCommand(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["user"] = &clientcmdapi.AuthInfo{ + Exec: &clientcmdapi.ExecConfig{ + APIVersion: "clientauthentication.k8s.io/v1alpha1", + }, + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{ + "command must be specified for user to use exec authentication plugin", + }, + } + + test.testAuthInfo("user", t) + test.testConfig(t) +} + +func TestValidateAuthInfoExecWithAuthProvider(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["user"] = &clientcmdapi.AuthInfo{ + AuthProvider: &clientcmdapi.AuthProviderConfig{ + Name: "oidc", + }, + Exec: &clientcmdapi.ExecConfig{ + Command: "/bin/example", + APIVersion: "clientauthentication.k8s.io/v1alpha1", + }, + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{ + "authProvider cannot be provided in combination with an exec plugin for user", + }, + } + + test.testAuthInfo("user", t) + test.testConfig(t) +} + +func TestValidateAuthInfoExecInvalidEnv(t *testing.T) { + config := clientcmdapi.NewConfig() + config.AuthInfos["user"] = &clientcmdapi.AuthInfo{ + Exec: &clientcmdapi.ExecConfig{ + Command: "/bin/example", + APIVersion: "clientauthentication.k8s.io/v1alpha1", + Env: []clientcmdapi.ExecEnvVar{ + {Name: "foo"}, // No value + }, + }, + } + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{ + "env variable foo value must be specified for user to use exec authentication plugin", + }, + } + + test.testAuthInfo("user", t) + test.testConfig(t) +} + type configValidationTest struct { config *clientcmdapi.Config expectedErrorSubstring []string diff --git a/deps/k8s.io/client-go/tools/leaderelection/BUILD b/deps/k8s.io/client-go/tools/leaderelection/BUILD deleted file mode 100644 index d48e68690..000000000 --- a/deps/k8s.io/client-go/tools/leaderelection/BUILD +++ /dev/null @@ -1,54 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["leaderelection.go"], - importpath = "k8s.io/client-go/tools/leaderelection", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["leaderelection_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/leaderelection", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake:go_default_library", - "//vendor/k8s.io/client-go/testing:go_default_library", - "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/tools/leaderelection/resourcelock:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/leaderelection/leaderelection.go b/deps/k8s.io/client-go/tools/leaderelection/leaderelection.go index e41b420c9..9a357b2ac 100644 --- a/deps/k8s.io/client-go/tools/leaderelection/leaderelection.go +++ b/deps/k8s.io/client-go/tools/leaderelection/leaderelection.go @@ -49,6 +49,7 @@ limitations under the License. package leaderelection import ( + "context" "fmt" "reflect" "time" @@ -74,6 +75,16 @@ func NewLeaderElector(lec LeaderElectionConfig) (*LeaderElector, error) { if lec.RenewDeadline <= time.Duration(JitterFactor*float64(lec.RetryPeriod)) { return nil, fmt.Errorf("renewDeadline must be greater than retryPeriod*JitterFactor") } + if lec.LeaseDuration < 1 { + return nil, fmt.Errorf("leaseDuration must be greater than zero") + } + if lec.RenewDeadline < 1 { + return nil, fmt.Errorf("renewDeadline must be greater than zero") + } + if lec.RetryPeriod < 1 { + return nil, fmt.Errorf("retryPeriod must be greater than zero") + } + if lec.Lock == nil { return nil, fmt.Errorf("Lock must not be nil.") } @@ -109,7 +120,7 @@ type LeaderElectionConfig struct { // * OnChallenge() type LeaderCallbacks struct { // OnStartedLeading is called when a LeaderElector client starts leading - OnStartedLeading func(stop <-chan struct{}) + OnStartedLeading func(context.Context) // OnStoppedLeading is called when a LeaderElector client stops leading OnStoppedLeading func() // OnNewLeader is called when the client observes a leader that is @@ -119,10 +130,6 @@ type LeaderCallbacks struct { } // LeaderElector is a leader election client. -// -// possible future methods: -// * (le *LeaderElector) IsLeader() -// * (le *LeaderElector) GetLeader() type LeaderElector struct { config LeaderElectionConfig // internal bookkeeping @@ -135,26 +142,28 @@ type LeaderElector struct { } // Run starts the leader election loop -func (le *LeaderElector) Run() { +func (le *LeaderElector) Run(ctx context.Context) { defer func() { runtime.HandleCrash() le.config.Callbacks.OnStoppedLeading() }() - le.acquire() - stop := make(chan struct{}) - go le.config.Callbacks.OnStartedLeading(stop) - le.renew() - close(stop) + if !le.acquire(ctx) { + return // ctx signalled done + } + ctx, cancel := context.WithCancel(ctx) + defer cancel() + go le.config.Callbacks.OnStartedLeading(ctx) + le.renew(ctx) } // RunOrDie starts a client with the provided config or panics if the config // fails to validate. -func RunOrDie(lec LeaderElectionConfig) { +func RunOrDie(ctx context.Context, lec LeaderElectionConfig) { le, err := NewLeaderElector(lec) if err != nil { panic(err) } - le.Run() + le.Run(ctx) } // GetLeader returns the identity of the last observed leader or returns the empty string if @@ -168,13 +177,16 @@ func (le *LeaderElector) IsLeader() bool { return le.observedRecord.HolderIdentity == le.config.Lock.Identity() } -// acquire loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew succeeds. -func (le *LeaderElector) acquire() { - stop := make(chan struct{}) +// acquire loops calling tryAcquireOrRenew and returns true immediately when tryAcquireOrRenew succeeds. +// Returns false if ctx signals done. +func (le *LeaderElector) acquire(ctx context.Context) bool { + ctx, cancel := context.WithCancel(ctx) + defer cancel() + succeeded := false desc := le.config.Lock.Describe() glog.Infof("attempting to acquire leader lease %v...", desc) wait.JitterUntil(func() { - succeeded := le.tryAcquireOrRenew() + succeeded = le.tryAcquireOrRenew() le.maybeReportTransition() if !succeeded { glog.V(4).Infof("failed to acquire lease %v", desc) @@ -182,17 +194,33 @@ func (le *LeaderElector) acquire() { } le.config.Lock.RecordEvent("became leader") glog.Infof("successfully acquired lease %v", desc) - close(stop) - }, le.config.RetryPeriod, JitterFactor, true, stop) + cancel() + }, le.config.RetryPeriod, JitterFactor, true, ctx.Done()) + return succeeded } -// renew loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew fails. -func (le *LeaderElector) renew() { - stop := make(chan struct{}) +// renew loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew fails or ctx signals done. +func (le *LeaderElector) renew(ctx context.Context) { + ctx, cancel := context.WithCancel(ctx) + defer cancel() wait.Until(func() { - err := wait.Poll(le.config.RetryPeriod, le.config.RenewDeadline, func() (bool, error) { - return le.tryAcquireOrRenew(), nil - }) + timeoutCtx, timeoutCancel := context.WithTimeout(ctx, le.config.RenewDeadline) + defer timeoutCancel() + err := wait.PollImmediateUntil(le.config.RetryPeriod, func() (bool, error) { + done := make(chan bool, 1) + go func() { + defer close(done) + done <- le.tryAcquireOrRenew() + }() + + select { + case <-timeoutCtx.Done(): + return false, fmt.Errorf("failed to tryAcquireOrRenew %s", timeoutCtx.Err()) + case result := <-done: + return result, nil + } + }, timeoutCtx.Done()) + le.maybeReportTransition() desc := le.config.Lock.Describe() if err == nil { @@ -201,8 +229,8 @@ func (le *LeaderElector) renew() { } le.config.Lock.RecordEvent("stopped leading") glog.Infof("failed to renew lease %v: %v", desc, err) - close(stop) - }, 0, stop) + cancel() + }, le.config.RetryPeriod, ctx.Done()) } // tryAcquireOrRenew tries to acquire a leader lease if it is not already acquired, @@ -239,14 +267,14 @@ func (le *LeaderElector) tryAcquireOrRenew() bool { le.observedTime = time.Now() } if le.observedTime.Add(le.config.LeaseDuration).After(now.Time) && - oldLeaderElectionRecord.HolderIdentity != le.config.Lock.Identity() { + !le.IsLeader() { glog.V(4).Infof("lock is held by %v and has not yet expired", oldLeaderElectionRecord.HolderIdentity) return false } // 3. We're going to try to update. The leaderElectionRecord is set to it's default // here. Let's correct it before updating. - if oldLeaderElectionRecord.HolderIdentity == le.config.Lock.Identity() { + if le.IsLeader() { leaderElectionRecord.AcquireTime = oldLeaderElectionRecord.AcquireTime leaderElectionRecord.LeaderTransitions = oldLeaderElectionRecord.LeaderTransitions } else { @@ -263,12 +291,12 @@ func (le *LeaderElector) tryAcquireOrRenew() bool { return true } -func (l *LeaderElector) maybeReportTransition() { - if l.observedRecord.HolderIdentity == l.reportedLeader { +func (le *LeaderElector) maybeReportTransition() { + if le.observedRecord.HolderIdentity == le.reportedLeader { return } - l.reportedLeader = l.observedRecord.HolderIdentity - if l.config.Callbacks.OnNewLeader != nil { - go l.config.Callbacks.OnNewLeader(l.reportedLeader) + le.reportedLeader = le.observedRecord.HolderIdentity + if le.config.Callbacks.OnNewLeader != nil { + go le.config.Callbacks.OnNewLeader(le.reportedLeader) } } diff --git a/deps/k8s.io/client-go/tools/leaderelection/resourcelock/BUILD b/deps/k8s.io/client-go/tools/leaderelection/resourcelock/BUILD deleted file mode 100644 index 8a9f8104f..000000000 --- a/deps/k8s.io/client-go/tools/leaderelection/resourcelock/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "configmaplock.go", - "endpointslock.go", - "interface.go", - ], - importpath = "k8s.io/client-go/tools/leaderelection/resourcelock", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", - "//vendor/k8s.io/client-go/tools/record:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go b/deps/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go index 69e8c5a7a..4ff595603 100644 --- a/deps/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go +++ b/deps/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go @@ -32,15 +32,15 @@ import ( // data we will likely move to deprecate the Endpoints lock. type ConfigMapLock struct { - // ConfigMapMeta should contain a Name and a Namespace of an - // ConfigMapMeta object that the Leadercmlector will attempt to lead. + // ConfigMapMeta should contain a Name and a Namespace of a + // ConfigMapMeta object that the LeaderElector will attempt to lead. ConfigMapMeta metav1.ObjectMeta Client corev1client.ConfigMapsGetter LockConfig ResourceLockConfig cm *v1.ConfigMap } -// Get returns the cmlection record from a ConfigMap Annotation +// Get returns the election record from a ConfigMap Annotation func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, error) { var record LeaderElectionRecord var err error @@ -59,7 +59,7 @@ func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, error) { return &record, nil } -// Create attempts to create a LeadercmlectionRecord annotation +// Create attempts to create a LeaderElectionRecord annotation func (cml *ConfigMapLock) Create(ler LeaderElectionRecord) error { recordBytes, err := json.Marshal(ler) if err != nil { @@ -77,7 +77,7 @@ func (cml *ConfigMapLock) Create(ler LeaderElectionRecord) error { return err } -// Update will update and existing annotation on a given resource. +// Update will update an existing annotation on a given resource. func (cml *ConfigMapLock) Update(ler LeaderElectionRecord) error { if cml.cm == nil { return errors.New("endpoint not initialized, call get or create first") @@ -91,7 +91,7 @@ func (cml *ConfigMapLock) Update(ler LeaderElectionRecord) error { return err } -// RecordEvent in leader cmlection while adding meta-data +// RecordEvent in leader election while adding meta-data func (cml *ConfigMapLock) RecordEvent(s string) { events := fmt.Sprintf("%v %v", cml.LockConfig.Identity, s) cml.LockConfig.EventRecorder.Eventf(&v1.ConfigMap{ObjectMeta: cml.cm.ObjectMeta}, v1.EventTypeNormal, "LeaderElection", events) diff --git a/deps/k8s.io/client-go/tools/metrics/BUILD b/deps/k8s.io/client-go/tools/metrics/BUILD deleted file mode 100644 index 7b06e0f96..000000000 --- a/deps/k8s.io/client-go/tools/metrics/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["metrics.go"], - importpath = "k8s.io/client-go/tools/metrics", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/pager/BUILD b/deps/k8s.io/client-go/tools/pager/BUILD deleted file mode 100644 index d30a10cd6..000000000 --- a/deps/k8s.io/client-go/tools/pager/BUILD +++ /dev/null @@ -1,50 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["pager.go"], - importpath = "k8s.io/client-go/tools/pager", - deps = [ - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["pager_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/pager", - deps = [ - "//vendor/golang.org/x/net/context:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) diff --git a/deps/k8s.io/client-go/tools/pager/pager.go b/deps/k8s.io/client-go/tools/pager/pager.go index 2e0874e0e..74ea3586a 100644 --- a/deps/k8s.io/client-go/tools/pager/pager.go +++ b/deps/k8s.io/client-go/tools/pager/pager.go @@ -17,10 +17,9 @@ limitations under the License. package pager import ( + "context" "fmt" - "golang.org/x/net/context" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" diff --git a/deps/k8s.io/client-go/tools/pager/pager_test.go b/deps/k8s.io/client-go/tools/pager/pager_test.go index b905fc1fb..ae517cab2 100644 --- a/deps/k8s.io/client-go/tools/pager/pager_test.go +++ b/deps/k8s.io/client-go/tools/pager/pager_test.go @@ -17,11 +17,11 @@ limitations under the License. package pager import ( + "context" "fmt" "reflect" "testing" - "golang.org/x/net/context" "k8s.io/apimachinery/pkg/api/errors" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/deps/k8s.io/client-go/tools/portforward/BUILD b/deps/k8s.io/client-go/tools/portforward/BUILD deleted file mode 100644 index c92391167..000000000 --- a/deps/k8s.io/client-go/tools/portforward/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["portforward_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/portforward", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "portforward.go", - ], - importpath = "k8s.io/client-go/tools/portforward", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/record/BUILD b/deps/k8s.io/client-go/tools/record/BUILD deleted file mode 100644 index 5fbd06bbf..000000000 --- a/deps/k8s.io/client-go/tools/record/BUILD +++ /dev/null @@ -1,69 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "event_test.go", - "events_cache_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/record", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/diff:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/reference:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "event.go", - "events_cache.go", - "fake.go", - ], - importpath = "k8s.io/client-go/tools/record", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/golang/groupcache/lru:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/tools/reference:go_default_library", - "//vendor/k8s.io/client-go/util/flowcontrol:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/record/event.go b/deps/k8s.io/client-go/tools/record/event.go index b5ec44650..168dfa80c 100644 --- a/deps/k8s.io/client-go/tools/record/event.go +++ b/deps/k8s.io/client-go/tools/record/event.go @@ -72,6 +72,9 @@ type EventRecorder interface { // PastEventf is just like Eventf, but with an option to specify the event's 'timestamp' field. PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) + + // AnnotatedEventf is just like eventf, but with annotations attached + AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) } // EventBroadcaster knows how to receive events and send them to any EventSink, watcher, or log. @@ -225,11 +228,7 @@ func (eventBroadcaster *eventBroadcasterImpl) StartEventWatcher(eventHandler fun watcher := eventBroadcaster.Watch() go func() { defer utilruntime.HandleCrash() - for { - watchEvent, open := <-watcher.ResultChan() - if !open { - return - } + for watchEvent := range watcher.ResultChan() { event, ok := watchEvent.Object.(*v1.Event) if !ok { // This is all local, so there's no reason this should @@ -254,7 +253,7 @@ type recorderImpl struct { clock clock.Clock } -func (recorder *recorderImpl) generateEvent(object runtime.Object, timestamp metav1.Time, eventtype, reason, message string) { +func (recorder *recorderImpl) generateEvent(object runtime.Object, annotations map[string]string, timestamp metav1.Time, eventtype, reason, message string) { ref, err := ref.GetReference(recorder.scheme, object) if err != nil { glog.Errorf("Could not construct reference to: '%#v' due to: '%v'. Will not report event: '%v' '%v' '%v'", object, err, eventtype, reason, message) @@ -266,7 +265,7 @@ func (recorder *recorderImpl) generateEvent(object runtime.Object, timestamp met return } - event := recorder.makeEvent(ref, eventtype, reason, message) + event := recorder.makeEvent(ref, annotations, eventtype, reason, message) event.Source = recorder.source go func() { @@ -285,7 +284,7 @@ func validateEventType(eventtype string) bool { } func (recorder *recorderImpl) Event(object runtime.Object, eventtype, reason, message string) { - recorder.generateEvent(object, metav1.Now(), eventtype, reason, message) + recorder.generateEvent(object, nil, metav1.Now(), eventtype, reason, message) } func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) { @@ -293,10 +292,14 @@ func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, m } func (recorder *recorderImpl) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) { - recorder.generateEvent(object, timestamp, eventtype, reason, fmt.Sprintf(messageFmt, args...)) + recorder.generateEvent(object, nil, timestamp, eventtype, reason, fmt.Sprintf(messageFmt, args...)) +} + +func (recorder *recorderImpl) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { + recorder.generateEvent(object, annotations, metav1.Now(), eventtype, reason, fmt.Sprintf(messageFmt, args...)) } -func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reason, message string) *v1.Event { +func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, annotations map[string]string, eventtype, reason, message string) *v1.Event { t := metav1.Time{Time: recorder.clock.Now()} namespace := ref.Namespace if namespace == "" { @@ -304,8 +307,9 @@ func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reas } return &v1.Event{ ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), - Namespace: namespace, + Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), + Namespace: namespace, + Annotations: annotations, }, InvolvedObject: *ref, Reason: reason, diff --git a/deps/k8s.io/client-go/tools/record/fake.go b/deps/k8s.io/client-go/tools/record/fake.go index c0e8eedbb..6e031daaf 100644 --- a/deps/k8s.io/client-go/tools/record/fake.go +++ b/deps/k8s.io/client-go/tools/record/fake.go @@ -45,6 +45,10 @@ func (f *FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageF func (f *FakeRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) { } +func (f *FakeRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { + f.Eventf(object, eventtype, reason, messageFmt, args) +} + // NewFakeRecorder creates new fake event recorder with event channel with // buffer of given size. func NewFakeRecorder(bufferSize int) *FakeRecorder { diff --git a/deps/k8s.io/client-go/tools/reference/BUILD b/deps/k8s.io/client-go/tools/reference/BUILD deleted file mode 100644 index 47da958ab..000000000 --- a/deps/k8s.io/client-go/tools/reference/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["ref.go"], - importpath = "k8s.io/client-go/tools/reference", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/reference/ref.go b/deps/k8s.io/client-go/tools/reference/ref.go index 58b60fd5d..573d948a9 100644 --- a/deps/k8s.io/client-go/tools/reference/ref.go +++ b/deps/k8s.io/client-go/tools/reference/ref.go @@ -86,10 +86,14 @@ func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*v1.ObjectReferen } // example paths: ///* parts := strings.Split(selfLinkUrl.Path, "/") - if len(parts) < 3 { + if len(parts) < 4 { return nil, fmt.Errorf("unexpected self link format: '%v'; got version '%v'", selfLink, version) } - version = parts[2] + if parts[1] == "api" { + version = parts[2] + } else { + version = parts[2] + "/" + parts[3] + } } // only has list metadata diff --git a/deps/k8s.io/client-go/tools/reference/ref_test.go b/deps/k8s.io/client-go/tools/reference/ref_test.go new file mode 100644 index 000000000..b0cf06a97 --- /dev/null +++ b/deps/k8s.io/client-go/tools/reference/ref_test.go @@ -0,0 +1,72 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package reference + +import ( + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +type TestRuntimeObj struct { + metav1.TypeMeta + metav1.ObjectMeta +} + +func (o *TestRuntimeObj) DeepCopyObject() runtime.Object { + panic("die") +} + +func TestGetReferenceRefVersion(t *testing.T) { + tests := []struct { + name string + input *TestRuntimeObj + expectedRefVersion string + }{ + { + name: "api from selflink", + input: &TestRuntimeObj{ + ObjectMeta: metav1.ObjectMeta{SelfLink: "/api/v1/namespaces"}, + }, + expectedRefVersion: "v1", + }, + { + name: "foo.group/v3 from selflink", + input: &TestRuntimeObj{ + ObjectMeta: metav1.ObjectMeta{SelfLink: "/apis/foo.group/v3/namespaces"}, + }, + expectedRefVersion: "foo.group/v3", + }, + } + + scheme := runtime.NewScheme() + scheme.AddKnownTypes(schema.GroupVersion{Group: "this", Version: "is ignored"}, &TestRuntimeObj{}) + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + ref, err := GetReference(scheme, test.input) + if err != nil { + t.Fatal(err) + } + if test.expectedRefVersion != ref.APIVersion { + t.Errorf("expected %q, got %q", test.expectedRefVersion, ref.APIVersion) + } + }) + } +} diff --git a/deps/k8s.io/client-go/tools/remotecommand/BUILD b/deps/k8s.io/client-go/tools/remotecommand/BUILD deleted file mode 100644 index 8d856e93e..000000000 --- a/deps/k8s.io/client-go/tools/remotecommand/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "v2_test.go", - "v4_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/tools/remotecommand", - deps = [ - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "errorstream.go", - "remotecommand.go", - "resize.go", - "v1.go", - "v2.go", - "v3.go", - "v4.go", - ], - importpath = "k8s.io/client-go/tools/remotecommand", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/core/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/remotecommand:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - "//vendor/k8s.io/client-go/transport/spdy:go_default_library", - "//vendor/k8s.io/client-go/util/exec:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/tools/remotecommand/remotecommand.go b/deps/k8s.io/client-go/tools/remotecommand/remotecommand.go index 6b69f366e..d2b29861e 100644 --- a/deps/k8s.io/client-go/tools/remotecommand/remotecommand.go +++ b/deps/k8s.io/client-go/tools/remotecommand/remotecommand.go @@ -30,8 +30,8 @@ import ( spdy "k8s.io/client-go/transport/spdy" ) -// StreamOptions holds information pertaining to the current streaming session: supported stream -// protocols, input/output streams, if the client is requesting a TTY, and a terminal size queue to +// StreamOptions holds information pertaining to the current streaming session: +// input/output streams, if the client is requesting a TTY, and a terminal size queue to // support terminal resizing. type StreamOptions struct { Stdin io.Reader diff --git a/deps/k8s.io/client-go/tools/watch/informerwatcher.go b/deps/k8s.io/client-go/tools/watch/informerwatcher.go new file mode 100644 index 000000000..35a346949 --- /dev/null +++ b/deps/k8s.io/client-go/tools/watch/informerwatcher.go @@ -0,0 +1,114 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "sync" + "sync/atomic" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +func newTicketer() *ticketer { + return &ticketer{ + cond: sync.NewCond(&sync.Mutex{}), + } +} + +type ticketer struct { + counter uint64 + + cond *sync.Cond + current uint64 +} + +func (t *ticketer) GetTicket() uint64 { + // -1 to start from 0 + return atomic.AddUint64(&t.counter, 1) - 1 +} + +func (t *ticketer) WaitForTicket(ticket uint64, f func()) { + t.cond.L.Lock() + defer t.cond.L.Unlock() + for ticket != t.current { + t.cond.Wait() + } + + f() + + t.current++ + t.cond.Broadcast() +} + +// NewIndexerInformerWatcher will create an IndexerInformer and wrap it into watch.Interface +// so you can use it anywhere where you'd have used a regular Watcher returned from Watch method. +func NewIndexerInformerWatcher(lw cache.ListerWatcher, objType runtime.Object) (cache.Indexer, cache.Controller, watch.Interface) { + ch := make(chan watch.Event) + w := watch.NewProxyWatcher(ch) + t := newTicketer() + + indexer, informer := cache.NewIndexerInformer(lw, objType, 0, cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + go t.WaitForTicket(t.GetTicket(), func() { + select { + case ch <- watch.Event{ + Type: watch.Added, + Object: obj.(runtime.Object), + }: + case <-w.StopChan(): + } + }) + }, + UpdateFunc: func(old, new interface{}) { + go t.WaitForTicket(t.GetTicket(), func() { + select { + case ch <- watch.Event{ + Type: watch.Modified, + Object: new.(runtime.Object), + }: + case <-w.StopChan(): + } + }) + }, + DeleteFunc: func(obj interface{}) { + go t.WaitForTicket(t.GetTicket(), func() { + staleObj, stale := obj.(cache.DeletedFinalStateUnknown) + if stale { + // We have no means of passing the additional information down using watch API based on watch.Event + // but the caller can filter such objects by checking if metadata.deletionTimestamp is set + obj = staleObj + } + + select { + case ch <- watch.Event{ + Type: watch.Deleted, + Object: obj.(runtime.Object), + }: + case <-w.StopChan(): + } + }) + }, + }, cache.Indexers{}) + + go func() { + informer.Run(w.StopChan()) + }() + + return indexer, informer, w +} diff --git a/deps/k8s.io/client-go/tools/watch/informerwatcher_test.go b/deps/k8s.io/client-go/tools/watch/informerwatcher_test.go new file mode 100644 index 000000000..e94b4d256 --- /dev/null +++ b/deps/k8s.io/client-go/tools/watch/informerwatcher_test.go @@ -0,0 +1,236 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "math/rand" + "reflect" + "sort" + "testing" + "time" + + "github.com/davecgh/go-spew/spew" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" + "k8s.io/apimachinery/pkg/watch" + fakeclientset "k8s.io/client-go/kubernetes/fake" + testcore "k8s.io/client-go/testing" + "k8s.io/client-go/tools/cache" +) + +type byEventTypeAndName []watch.Event + +func (a byEventTypeAndName) Len() int { return len(a) } +func (a byEventTypeAndName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byEventTypeAndName) Less(i, j int) bool { + if a[i].Type < a[j].Type { + return true + } + + if a[i].Type > a[j].Type { + return false + } + + return a[i].Object.(*corev1.Secret).Name < a[j].Object.(*corev1.Secret).Name +} + +func TestTicketer(t *testing.T) { + tg := newTicketer() + + const numTickets = 100 // current golang limit for race detector is 8192 simultaneously alive goroutines + var tickets []uint64 + for i := 0; i < numTickets; i++ { + ticket := tg.GetTicket() + tickets = append(tickets, ticket) + + exp, got := uint64(i), ticket + if got != exp { + t.Fatalf("expected ticket %d, got %d", exp, got) + } + } + + // shuffle tickets + rand.Shuffle(len(tickets), func(i, j int) { + tickets[i], tickets[j] = tickets[j], tickets[i] + }) + + res := make(chan uint64, len(tickets)) + for _, ticket := range tickets { + go func(ticket uint64) { + time.Sleep(time.Duration(rand.Intn(50)) * time.Millisecond) + tg.WaitForTicket(ticket, func() { + res <- ticket + }) + }(ticket) + } + + for i := 0; i < numTickets; i++ { + exp, got := uint64(i), <-res + if got != exp { + t.Fatalf("expected ticket %d, got %d", exp, got) + } + } +} + +func TestNewInformerWatcher(t *testing.T) { + // Make sure there are no 2 same types of events on a secret with the same name or that might be flaky. + tt := []struct { + name string + objects []runtime.Object + events []watch.Event + }{ + { + name: "basic test", + objects: []runtime.Object{ + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-1", + }, + StringData: map[string]string{ + "foo-1": "initial", + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-2", + }, + StringData: map[string]string{ + "foo-2": "initial", + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-3", + }, + StringData: map[string]string{ + "foo-3": "initial", + }, + }, + }, + events: []watch.Event{ + { + Type: watch.Added, + Object: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-4", + }, + StringData: map[string]string{ + "foo-4": "initial", + }, + }, + }, + { + Type: watch.Modified, + Object: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-2", + }, + StringData: map[string]string{ + "foo-2": "new", + }, + }, + }, + { + Type: watch.Deleted, + Object: &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + Name: "pod-3", + }, + }, + }, + }, + }, + } + + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + var expected []watch.Event + for _, o := range tc.objects { + expected = append(expected, watch.Event{ + Type: watch.Added, + Object: o.DeepCopyObject(), + }) + } + for _, e := range tc.events { + expected = append(expected, *e.DeepCopy()) + } + + fake := fakeclientset.NewSimpleClientset(tc.objects...) + fakeWatch := watch.NewFakeWithChanSize(len(tc.events), false) + fake.PrependWatchReactor("secrets", testcore.DefaultWatchReactor(fakeWatch, nil)) + + for _, e := range tc.events { + fakeWatch.Action(e.Type, e.Object) + } + + lw := &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return fake.Core().Secrets("").List(options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return fake.Core().Secrets("").Watch(options) + }, + } + _, _, w := NewIndexerInformerWatcher(lw, &corev1.Secret{}) + + var result []watch.Event + loop: + for { + var event watch.Event + var ok bool + select { + case event, ok = <-w.ResultChan(): + if !ok { + t.Errorf("Failed to read event: channel is already closed!") + return + } + + result = append(result, *event.DeepCopy()) + case <-time.After(time.Second * 1): + // All the events are buffered -> this means we are done + // Also the one sec will make sure that we would detect RetryWatcher's incorrect behaviour after last event + break loop + } + } + + // Informers don't guarantee event order so we need to sort these arrays to compare them + sort.Sort(byEventTypeAndName(expected)) + sort.Sort(byEventTypeAndName(result)) + + if !reflect.DeepEqual(expected, result) { + t.Error(spew.Errorf("\nexpected: %#v,\ngot: %#v,\ndiff: %s", expected, result, diff.ObjectReflectDiff(expected, result))) + return + } + + // Fill in some data to test watch closing while there are some events to be read + for _, e := range tc.events { + fakeWatch.Action(e.Type, e.Object) + } + + // Stop before reading all the data to make sure the informer can deal with closed channel + w.Stop() + + // Wait a bit to see if the informer won't panic + // TODO: Try to figure out a more reliable mechanism than time.Sleep (https://github.com/kubernetes/kubernetes/pull/50102/files#r184716591) + time.Sleep(1 * time.Second) + }) + } + +} diff --git a/deps/k8s.io/client-go/tools/watch/until.go b/deps/k8s.io/client-go/tools/watch/until.go new file mode 100644 index 000000000..933578843 --- /dev/null +++ b/deps/k8s.io/client-go/tools/watch/until.go @@ -0,0 +1,225 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "context" + "errors" + "fmt" + "time" + + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +// PreconditionFunc returns true if the condition has been reached, false if it has not been reached yet, +// or an error if the condition failed or detected an error state. +type PreconditionFunc func(store cache.Store) (bool, error) + +// ConditionFunc returns true if the condition has been reached, false if it has not been reached yet, +// or an error if the condition cannot be checked and should terminate. In general, it is better to define +// level driven conditions over edge driven conditions (pod has ready=true, vs pod modified and ready changed +// from false to true). +type ConditionFunc func(event watch.Event) (bool, error) + +// ErrWatchClosed is returned when the watch channel is closed before timeout in UntilWithoutRetry. +var ErrWatchClosed = errors.New("watch closed before UntilWithoutRetry timeout") + +// UntilWithoutRetry reads items from the watch until each provided condition succeeds, and then returns the last watch +// encountered. The first condition that returns an error terminates the watch (and the event is also returned). +// If no event has been received, the returned event will be nil. +// Conditions are satisfied sequentially so as to provide a useful primitive for higher level composition. +// Waits until context deadline or until context is canceled. +// +// Warning: Unless you have a very specific use case (probably a special Watcher) don't use this function!!! +// Warning: This will fail e.g. on API timeouts and/or 'too old resource version' error. +// Warning: You are most probably looking for a function *Until* or *UntilWithSync* below, +// Warning: solving such issues. +// TODO: Consider making this function private to prevent misuse when the other occurrences in our codebase are gone. +func UntilWithoutRetry(ctx context.Context, watcher watch.Interface, conditions ...ConditionFunc) (*watch.Event, error) { + ch := watcher.ResultChan() + defer watcher.Stop() + var lastEvent *watch.Event + for _, condition := range conditions { + // check the next condition against the previous event and short circuit waiting for the next watch + if lastEvent != nil { + done, err := condition(*lastEvent) + if err != nil { + return lastEvent, err + } + if done { + continue + } + } + ConditionSucceeded: + for { + select { + case event, ok := <-ch: + if !ok { + return lastEvent, ErrWatchClosed + } + lastEvent = &event + + done, err := condition(event) + if err != nil { + return lastEvent, err + } + if done { + break ConditionSucceeded + } + + case <-ctx.Done(): + return lastEvent, wait.ErrWaitTimeout + } + } + } + return lastEvent, nil +} + +// UntilWithSync creates an informer from lw, optionally checks precondition when the store is synced, +// and watches the output until each provided condition succeeds, in a way that is identical +// to function UntilWithoutRetry. (See above.) +// UntilWithSync can deal with all errors like API timeout, lost connections and 'Resource version too old'. +// It is the only function that can recover from 'Resource version too old', Until and UntilWithoutRetry will +// just fail in that case. On the other hand it can't provide you with guarantees as strong as using simple +// Watch method with Until. It can skip some intermediate events in case of watch function failing but it will +// re-list to recover and you always get an event, if there has been a change, after recovery. +// Also with the current implementation based on DeltaFIFO, order of the events you receive is guaranteed only for +// particular object, not between more of them even it's the same resource. +// The most frequent usage would be a command that needs to watch the "state of the world" and should't fail, like: +// waiting for object reaching a state, "small" controllers, ... +func UntilWithSync(ctx context.Context, lw cache.ListerWatcher, objType runtime.Object, precondition PreconditionFunc, conditions ...ConditionFunc) (*watch.Event, error) { + indexer, informer, watcher := NewIndexerInformerWatcher(lw, objType) + // Proxy watcher can be stopped multiple times so it's fine to use defer here to cover alternative branches and + // let UntilWithoutRetry to stop it + defer watcher.Stop() + + if precondition != nil { + if !cache.WaitForCacheSync(ctx.Done(), informer.HasSynced) { + return nil, fmt.Errorf("UntilWithSync: unable to sync caches: %v", ctx.Err()) + } + + done, err := precondition(indexer) + if err != nil { + return nil, err + } + + if done { + return nil, nil + } + } + + return UntilWithoutRetry(ctx, watcher, conditions...) +} + +// ContextWithOptionalTimeout wraps context.WithTimeout and handles infinite timeouts expressed as 0 duration. +func ContextWithOptionalTimeout(parent context.Context, timeout time.Duration) (context.Context, context.CancelFunc) { + if timeout < 0 { + // This should be handled in validation + glog.Errorf("Timeout for context shall not be negative!") + timeout = 0 + } + + if timeout == 0 { + return context.WithCancel(parent) + } + + return context.WithTimeout(parent, timeout) +} + +// ListWatchUntil checks the provided conditions against the items returned by the list watcher, returning wait.ErrWaitTimeout +// if timeout is exceeded without all conditions returning true, or an error if an error occurs. +// TODO: check for watch expired error and retry watch from latest point? Same issue exists for Until. +// TODO: remove when no longer used +// +// Deprecated: Use UntilWithSync instead. +func ListWatchUntil(timeout time.Duration, lw cache.ListerWatcher, conditions ...ConditionFunc) (*watch.Event, error) { + if len(conditions) == 0 { + return nil, nil + } + + list, err := lw.List(metav1.ListOptions{}) + if err != nil { + return nil, err + } + initialItems, err := meta.ExtractList(list) + if err != nil { + return nil, err + } + + // use the initial items as simulated "adds" + var lastEvent *watch.Event + currIndex := 0 + passedConditions := 0 + for _, condition := range conditions { + // check the next condition against the previous event and short circuit waiting for the next watch + if lastEvent != nil { + done, err := condition(*lastEvent) + if err != nil { + return lastEvent, err + } + if done { + passedConditions = passedConditions + 1 + continue + } + } + + ConditionSucceeded: + for currIndex < len(initialItems) { + lastEvent = &watch.Event{Type: watch.Added, Object: initialItems[currIndex]} + currIndex++ + + done, err := condition(*lastEvent) + if err != nil { + return lastEvent, err + } + if done { + passedConditions = passedConditions + 1 + break ConditionSucceeded + } + } + } + if passedConditions == len(conditions) { + return lastEvent, nil + } + remainingConditions := conditions[passedConditions:] + + metaObj, err := meta.ListAccessor(list) + if err != nil { + return nil, err + } + currResourceVersion := metaObj.GetResourceVersion() + + watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion}) + if err != nil { + return nil, err + } + + ctx, cancel := ContextWithOptionalTimeout(context.Background(), timeout) + defer cancel() + evt, err := UntilWithoutRetry(ctx, watchInterface, remainingConditions...) + if err == ErrWatchClosed { + // present a consistent error interface to callers + err = wait.ErrWaitTimeout + } + return evt, err +} diff --git a/deps/k8s.io/client-go/tools/watch/until_test.go b/deps/k8s.io/client-go/tools/watch/until_test.go new file mode 100644 index 000000000..dd0559461 --- /dev/null +++ b/deps/k8s.io/client-go/tools/watch/until_test.go @@ -0,0 +1,303 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package watch + +import ( + "context" + "errors" + "reflect" + "strings" + "testing" + "time" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + fakeclient "k8s.io/client-go/kubernetes/fake" + "k8s.io/client-go/tools/cache" +) + +type fakePod struct { + name string +} + +func (obj *fakePod) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind } +func (obj *fakePod) DeepCopyObject() runtime.Object { panic("DeepCopyObject not supported by fakePod") } + +func TestUntil(t *testing.T) { + fw := watch.NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + fw.Modify(obj) + }() + conditions := []ConditionFunc{ + func(event watch.Event) (bool, error) { return event.Type == watch.Added, nil }, + func(event watch.Event) (bool, error) { return event.Type == watch.Modified, nil }, + } + + ctx, _ := context.WithTimeout(context.Background(), time.Minute) + lastEvent, err := UntilWithoutRetry(ctx, fw, conditions...) + if err != nil { + t.Fatalf("expected nil error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != watch.Modified { + t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilMultipleConditions(t *testing.T) { + fw := watch.NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + }() + conditions := []ConditionFunc{ + func(event watch.Event) (bool, error) { return event.Type == watch.Added, nil }, + func(event watch.Event) (bool, error) { return event.Type == watch.Added, nil }, + } + + ctx, _ := context.WithTimeout(context.Background(), time.Minute) + lastEvent, err := UntilWithoutRetry(ctx, fw, conditions...) + if err != nil { + t.Fatalf("expected nil error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != watch.Added { + t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilMultipleConditionsFail(t *testing.T) { + fw := watch.NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + }() + conditions := []ConditionFunc{ + func(event watch.Event) (bool, error) { return event.Type == watch.Added, nil }, + func(event watch.Event) (bool, error) { return event.Type == watch.Added, nil }, + func(event watch.Event) (bool, error) { return event.Type == watch.Deleted, nil }, + } + + ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) + lastEvent, err := UntilWithoutRetry(ctx, fw, conditions...) + if err != wait.ErrWaitTimeout { + t.Fatalf("expected ErrWaitTimeout error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != watch.Added { + t.Fatalf("expected ADDED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilTimeout(t *testing.T) { + fw := watch.NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + fw.Modify(obj) + }() + conditions := []ConditionFunc{ + func(event watch.Event) (bool, error) { + return event.Type == watch.Added, nil + }, + func(event watch.Event) (bool, error) { + return event.Type == watch.Modified, nil + }, + } + + lastEvent, err := UntilWithoutRetry(context.Background(), fw, conditions...) + if err != nil { + t.Fatalf("expected nil error, got %#v", err) + } + if lastEvent == nil { + t.Fatal("expected an event") + } + if lastEvent.Type != watch.Modified { + t.Fatalf("expected MODIFIED event type, got %v", lastEvent.Type) + } + if got, isPod := lastEvent.Object.(*fakePod); !isPod { + t.Fatalf("expected a pod event, got %#v", got) + } +} + +func TestUntilErrorCondition(t *testing.T) { + fw := watch.NewFake() + go func() { + var obj *fakePod + fw.Add(obj) + }() + expected := "something bad" + conditions := []ConditionFunc{ + func(event watch.Event) (bool, error) { return event.Type == watch.Added, nil }, + func(event watch.Event) (bool, error) { return false, errors.New(expected) }, + } + + ctx, cancel := context.WithTimeout(context.Background(), time.Minute) + defer cancel() + _, err := UntilWithoutRetry(ctx, fw, conditions...) + if err == nil { + t.Fatal("expected an error") + } + if !strings.Contains(err.Error(), expected) { + t.Fatalf("expected %q in error string, got %q", expected, err.Error()) + } +} + +func TestUntilWithSync(t *testing.T) { + // FIXME: test preconditions + tt := []struct { + name string + lw *cache.ListWatch + preconditionFunc PreconditionFunc + conditionFunc ConditionFunc + expectedErr error + expectedEvent *watch.Event + }{ + { + name: "doesn't wait for sync with no precondition", + lw: &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + select {} + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + select {} + }, + }, + preconditionFunc: nil, + conditionFunc: func(e watch.Event) (bool, error) { + return true, nil + }, + expectedErr: errors.New("timed out waiting for the condition"), + expectedEvent: nil, + }, + { + name: "waits indefinitely with precondition if it can't sync", + lw: &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + select {} + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + select {} + }, + }, + preconditionFunc: func(store cache.Store) (bool, error) { + return true, nil + }, + conditionFunc: func(e watch.Event) (bool, error) { + return true, nil + }, + expectedErr: errors.New("UntilWithSync: unable to sync caches: context deadline exceeded"), + expectedEvent: nil, + }, + { + name: "precondition can stop the loop", + lw: func() *cache.ListWatch { + fakeclient := fakeclient.NewSimpleClientset(&corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "first"}}) + + return &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return fakeclient.CoreV1().Secrets("").List(options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return fakeclient.CoreV1().Secrets("").Watch(options) + }, + } + }(), + preconditionFunc: func(store cache.Store) (bool, error) { + _, exists, err := store.Get(&metav1.ObjectMeta{Namespace: "", Name: "first"}) + if err != nil { + return true, err + } + if exists { + return true, nil + } + return false, nil + }, + conditionFunc: func(e watch.Event) (bool, error) { + return true, errors.New("should never reach this") + }, + expectedErr: nil, + expectedEvent: nil, + }, + { + name: "precondition lets it proceed to regular condition", + lw: func() *cache.ListWatch { + fakeclient := fakeclient.NewSimpleClientset(&corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "first"}}) + + return &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + return fakeclient.CoreV1().Secrets("").List(options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + return fakeclient.CoreV1().Secrets("").Watch(options) + }, + } + }(), + preconditionFunc: func(store cache.Store) (bool, error) { + return false, nil + }, + conditionFunc: func(e watch.Event) (bool, error) { + if e.Type == watch.Added { + return true, nil + } + panic("no other events are expected") + }, + expectedErr: nil, + expectedEvent: &watch.Event{Type: watch.Added, Object: &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "first"}}}, + }, + } + + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + // Informer waits for caches to sync by polling in 100ms intervals, + // timeout needs to be reasonably higher + ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) + defer cancel() + + event, err := UntilWithSync(ctx, tc.lw, &corev1.Secret{}, tc.preconditionFunc, tc.conditionFunc) + + if !reflect.DeepEqual(err, tc.expectedErr) { + t.Errorf("expected error %#v, got %#v", tc.expectedErr, err) + } + + if !reflect.DeepEqual(event, tc.expectedEvent) { + t.Errorf("expected event %#v, got %#v", tc.expectedEvent, event) + } + }) + } +} diff --git a/deps/k8s.io/client-go/transport/BUILD b/deps/k8s.io/client-go/transport/BUILD deleted file mode 100644 index d9c8502fa..000000000 --- a/deps/k8s.io/client-go/transport/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "cache_test.go", - "round_trippers_test.go", - "transport_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/transport", -) - -go_library( - name = "go_default_library", - srcs = [ - "cache.go", - "config.go", - "round_trippers.go", - "transport.go", - ], - importpath = "k8s.io/client-go/transport", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/net:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/transport/spdy:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/transport/cache.go b/deps/k8s.io/client-go/transport/cache.go index 7c40848c7..7cffe2a5f 100644 --- a/deps/k8s.io/client-go/transport/cache.go +++ b/deps/k8s.io/client-go/transport/cache.go @@ -43,7 +43,9 @@ type tlsCacheKey struct { caData string certData string keyData string + getCert string serverName string + dial string } func (t tlsCacheKey) String() string { @@ -51,7 +53,7 @@ func (t tlsCacheKey) String() string { if len(t.keyData) > 0 { keyText = "" } - return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, serverName:%s", t.insecure, t.caData, t.certData, keyText, t.serverName) + return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, getCert: %s, serverName:%s, dial:%s", t.insecure, t.caData, t.certData, keyText, t.getCert, t.serverName, t.dial) } func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { @@ -75,7 +77,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { return nil, err } // The options didn't require a custom TLS config - if tlsConfig == nil { + if tlsConfig == nil && config.Dial == nil { return http.DefaultTransport, nil } @@ -84,7 +86,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { dial = (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, - }).Dial + }).DialContext } // Cache a single transport for these options c.transports[key] = utilnet.SetTransportDefaults(&http.Transport{ @@ -92,7 +94,7 @@ func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { TLSHandshakeTimeout: 10 * time.Second, TLSClientConfig: tlsConfig, MaxIdleConnsPerHost: idleConnsPerHost, - Dial: dial, + DialContext: dial, }) return c.transports[key], nil } @@ -108,6 +110,8 @@ func tlsConfigKey(c *Config) (tlsCacheKey, error) { caData: string(c.TLS.CAData), certData: string(c.TLS.CertData), keyData: string(c.TLS.KeyData), + getCert: fmt.Sprintf("%p", c.TLS.GetCert), serverName: c.TLS.ServerName, + dial: fmt.Sprintf("%p", c.Dial), }, nil } diff --git a/deps/k8s.io/client-go/transport/cache_test.go b/deps/k8s.io/client-go/transport/cache_test.go index 81f428de0..9b740cdec 100644 --- a/deps/k8s.io/client-go/transport/cache_test.go +++ b/deps/k8s.io/client-go/transport/cache_test.go @@ -17,6 +17,9 @@ limitations under the License. package transport import ( + "context" + "crypto/tls" + "net" "net/http" "testing" ) @@ -51,8 +54,12 @@ func TestTLSConfigKey(t *testing.T) { } // Make sure config fields that affect the tls config affect the cache key + dialer := net.Dialer{} + getCert := func() (*tls.Certificate, error) { return nil, nil } uniqueConfigurations := map[string]*Config{ "no tls": {}, + "dialer": {Dial: dialer.DialContext}, + "dialer2": {Dial: func(ctx context.Context, network, address string) (net.Conn, error) { return nil, nil }}, "insecure": {TLS: TLSConfig{Insecure: true}}, "cadata 1": {TLS: TLSConfig{CAData: []byte{1}}}, "cadata 2": {TLS: TLSConfig{CAData: []byte{2}}}, @@ -101,14 +108,27 @@ func TestTLSConfigKey(t *testing.T) { KeyData: []byte{1}, }, }, + "getCert1": { + TLS: TLSConfig{ + KeyData: []byte{1}, + GetCert: getCert, + }, + }, + "getCert2": { + TLS: TLSConfig{ + KeyData: []byte{1}, + GetCert: func() (*tls.Certificate, error) { return nil, nil }, + }, + }, + "getCert1, key 2": { + TLS: TLSConfig{ + KeyData: []byte{2}, + GetCert: getCert, + }, + }, } for nameA, valueA := range uniqueConfigurations { for nameB, valueB := range uniqueConfigurations { - // Don't compare to ourselves - if nameA == nameB { - continue - } - keyA, err := tlsConfigKey(valueA) if err != nil { t.Errorf("Unexpected error for %q: %v", nameA, err) @@ -119,6 +139,15 @@ func TestTLSConfigKey(t *testing.T) { t.Errorf("Unexpected error for %q: %v", nameB, err) continue } + + // Make sure we get the same key on the same config + if nameA == nameB { + if keyA != keyB { + t.Errorf("Expected identical cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB) + } + continue + } + if keyA == keyB { t.Errorf("Expected unique cache keys for %q and %q, got:\n\t%s\n\t%s", nameA, nameB, keyA, keyB) continue diff --git a/deps/k8s.io/client-go/transport/config.go b/deps/k8s.io/client-go/transport/config.go index af347dafe..4081c23e7 100644 --- a/deps/k8s.io/client-go/transport/config.go +++ b/deps/k8s.io/client-go/transport/config.go @@ -17,6 +17,8 @@ limitations under the License. package transport import ( + "context" + "crypto/tls" "net" "net/http" ) @@ -53,7 +55,7 @@ type Config struct { WrapTransport func(rt http.RoundTripper) http.RoundTripper // Dial specifies the dial function for creating unencrypted TCP connections. - Dial func(network, addr string) (net.Conn, error) + Dial func(ctx context.Context, network, address string) (net.Conn, error) } // ImpersonationConfig has all the available impersonation options @@ -83,7 +85,12 @@ func (c *Config) HasTokenAuth() bool { // HasCertAuth returns whether the configuration has certificate authentication or not. func (c *Config) HasCertAuth() bool { - return len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0 + return (len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0) && (len(c.TLS.KeyData) != 0 || len(c.TLS.KeyFile) != 0) +} + +// HasCertCallbacks returns whether the configuration has certificate callback or not. +func (c *Config) HasCertCallback() bool { + return c.TLS.GetCert != nil } // TLSConfig holds the information needed to set up a TLS transport. @@ -98,4 +105,6 @@ type TLSConfig struct { CAData []byte // Bytes of the PEM-encoded server trusted root certificates. Supercedes CAFile. CertData []byte // Bytes of the PEM-encoded client certificate. Supercedes CertFile. KeyData []byte // Bytes of the PEM-encoded client key. Supercedes KeyFile. + + GetCert func() (*tls.Certificate, error) // Callback that returns a TLS client certificate. CertData, CertFile, KeyData and KeyFile supercede this field. } diff --git a/deps/k8s.io/client-go/transport/round_trippers.go b/deps/k8s.io/client-go/transport/round_trippers.go index c728b1877..0ebcbbc80 100644 --- a/deps/k8s.io/client-go/transport/round_trippers.go +++ b/deps/k8s.io/client-go/transport/round_trippers.go @@ -129,7 +129,7 @@ func SetAuthProxyHeaders(req *http.Request, username string, groups []string, ex } for key, values := range extra { for _, value := range values { - req.Header.Add("X-Remote-Extra-"+key, value) + req.Header.Add("X-Remote-Extra-"+headerKeyEscape(key), value) } } } @@ -138,7 +138,7 @@ func (rt *authProxyRoundTripper) CancelRequest(req *http.Request) { if canceler, ok := rt.rt.(requestCanceler); ok { canceler.CancelRequest(req) } else { - glog.Errorf("CancelRequest not implemented") + glog.Errorf("CancelRequest not implemented by %T", rt.rt) } } @@ -166,7 +166,7 @@ func (rt *userAgentRoundTripper) CancelRequest(req *http.Request) { if canceler, ok := rt.rt.(requestCanceler); ok { canceler.CancelRequest(req) } else { - glog.Errorf("CancelRequest not implemented") + glog.Errorf("CancelRequest not implemented by %T", rt.rt) } } @@ -197,7 +197,7 @@ func (rt *basicAuthRoundTripper) CancelRequest(req *http.Request) { if canceler, ok := rt.rt.(requestCanceler); ok { canceler.CancelRequest(req) } else { - glog.Errorf("CancelRequest not implemented") + glog.Errorf("CancelRequest not implemented by %T", rt.rt) } } @@ -246,7 +246,7 @@ func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Respons } for k, vv := range rt.impersonate.Extra { for _, v := range vv { - req.Header.Add(ImpersonateUserExtraHeaderPrefix+k, v) + req.Header.Add(ImpersonateUserExtraHeaderPrefix+headerKeyEscape(k), v) } } @@ -257,7 +257,7 @@ func (rt *impersonatingRoundTripper) CancelRequest(req *http.Request) { if canceler, ok := rt.delegate.(requestCanceler); ok { canceler.CancelRequest(req) } else { - glog.Errorf("CancelRequest not implemented") + glog.Errorf("CancelRequest not implemented by %T", rt.delegate) } } @@ -288,7 +288,7 @@ func (rt *bearerAuthRoundTripper) CancelRequest(req *http.Request) { if canceler, ok := rt.rt.(requestCanceler); ok { canceler.CancelRequest(req) } else { - glog.Errorf("CancelRequest not implemented") + glog.Errorf("CancelRequest not implemented by %T", rt.rt) } } @@ -335,7 +335,7 @@ func (r *requestInfo) toCurl() string { } } - return fmt.Sprintf("curl -k -v -X%s %s %s", r.RequestVerb, headers, r.RequestURL) + return fmt.Sprintf("curl -k -v -X%s %s '%s'", r.RequestVerb, headers, r.RequestURL) } // debuggingRoundTripper will display information about the requests passing @@ -372,7 +372,7 @@ func (rt *debuggingRoundTripper) CancelRequest(req *http.Request) { if canceler, ok := rt.delegatedRoundTripper.(requestCanceler); ok { canceler.CancelRequest(req) } else { - glog.Errorf("CancelRequest not implemented") + glog.Errorf("CancelRequest not implemented by %T", rt.delegatedRoundTripper) } } @@ -422,3 +422,110 @@ func (rt *debuggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, e func (rt *debuggingRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.delegatedRoundTripper } + +func legalHeaderByte(b byte) bool { + return int(b) < len(legalHeaderKeyBytes) && legalHeaderKeyBytes[b] +} + +func shouldEscape(b byte) bool { + // url.PathUnescape() returns an error if any '%' is not followed by two + // hexadecimal digits, so we'll intentionally encode it. + return !legalHeaderByte(b) || b == '%' +} + +func headerKeyEscape(key string) string { + buf := strings.Builder{} + for i := 0; i < len(key); i++ { + b := key[i] + if shouldEscape(b) { + // %-encode bytes that should be escaped: + // https://tools.ietf.org/html/rfc3986#section-2.1 + fmt.Fprintf(&buf, "%%%02X", b) + continue + } + buf.WriteByte(b) + } + return buf.String() +} + +// legalHeaderKeyBytes was copied from net/http/lex.go's isTokenTable. +// See https://httpwg.github.io/specs/rfc7230.html#rule.token.separators +var legalHeaderKeyBytes = [127]bool{ + '%': true, + '!': true, + '#': true, + '$': true, + '&': true, + '\'': true, + '*': true, + '+': true, + '-': true, + '.': true, + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + 'A': true, + 'B': true, + 'C': true, + 'D': true, + 'E': true, + 'F': true, + 'G': true, + 'H': true, + 'I': true, + 'J': true, + 'K': true, + 'L': true, + 'M': true, + 'N': true, + 'O': true, + 'P': true, + 'Q': true, + 'R': true, + 'S': true, + 'T': true, + 'U': true, + 'W': true, + 'V': true, + 'X': true, + 'Y': true, + 'Z': true, + '^': true, + '_': true, + '`': true, + 'a': true, + 'b': true, + 'c': true, + 'd': true, + 'e': true, + 'f': true, + 'g': true, + 'h': true, + 'i': true, + 'j': true, + 'k': true, + 'l': true, + 'm': true, + 'n': true, + 'o': true, + 'p': true, + 'q': true, + 'r': true, + 's': true, + 't': true, + 'u': true, + 'v': true, + 'w': true, + 'x': true, + 'y': true, + 'z': true, + '|': true, + '~': true, +} diff --git a/deps/k8s.io/client-go/transport/round_trippers_test.go b/deps/k8s.io/client-go/transport/round_trippers_test.go index d5ffc6bde..74d3dc212 100644 --- a/deps/k8s.io/client-go/transport/round_trippers_test.go +++ b/deps/k8s.io/client-go/transport/round_trippers_test.go @@ -18,6 +18,7 @@ package transport import ( "net/http" + "net/url" "reflect" "strings" "testing" @@ -125,6 +126,32 @@ func TestImpersonationRoundTripper(t *testing.T) { ImpersonateUserExtraHeaderPrefix + "Second": {"B", "b"}, }, }, + { + name: "escape handling", + impersonationConfig: ImpersonationConfig{ + UserName: "user", + Extra: map[string][]string{ + "test.example.com/thing.thing": {"A", "a"}, + }, + }, + expected: map[string][]string{ + ImpersonateUserHeader: {"user"}, + ImpersonateUserExtraHeaderPrefix + `Test.example.com%2fthing.thing`: {"A", "a"}, + }, + }, + { + name: "double escape handling", + impersonationConfig: ImpersonationConfig{ + UserName: "user", + Extra: map[string][]string{ + "test.example.com/thing.thing%20another.thing": {"A", "a"}, + }, + }, + expected: map[string][]string{ + ImpersonateUserHeader: {"user"}, + ImpersonateUserExtraHeaderPrefix + `Test.example.com%2fthing.thing%2520another.thing`: {"A", "a"}, + }, + }, } for _, tc := range tcs { @@ -159,9 +186,10 @@ func TestImpersonationRoundTripper(t *testing.T) { func TestAuthProxyRoundTripper(t *testing.T) { for n, tc := range map[string]struct { - username string - groups []string - extra map[string][]string + username string + groups []string + extra map[string][]string + expectedExtra map[string][]string }{ "allfields": { username: "user", @@ -170,6 +198,34 @@ func TestAuthProxyRoundTripper(t *testing.T) { "one": {"alpha", "bravo"}, "two": {"charlie", "delta"}, }, + expectedExtra: map[string][]string{ + "one": {"alpha", "bravo"}, + "two": {"charlie", "delta"}, + }, + }, + "escaped extra": { + username: "user", + groups: []string{"groupA", "groupB"}, + extra: map[string][]string{ + "one": {"alpha", "bravo"}, + "example.com/two": {"charlie", "delta"}, + }, + expectedExtra: map[string][]string{ + "one": {"alpha", "bravo"}, + "example.com%2ftwo": {"charlie", "delta"}, + }, + }, + "double escaped extra": { + username: "user", + groups: []string{"groupA", "groupB"}, + extra: map[string][]string{ + "one": {"alpha", "bravo"}, + "example.com/two%20three": {"charlie", "delta"}, + }, + expectedExtra: map[string][]string{ + "one": {"alpha", "bravo"}, + "example.com%2ftwo%2520three": {"charlie", "delta"}, + }, }, } { rt := &testRoundTripper{} @@ -210,9 +266,64 @@ func TestAuthProxyRoundTripper(t *testing.T) { actualExtra[extraKey] = append(actualExtra[key], values...) } } - if e, a := tc.extra, actualExtra; !reflect.DeepEqual(e, a) { + if e, a := tc.expectedExtra, actualExtra; !reflect.DeepEqual(e, a) { t.Errorf("%s expected %v, got %v", n, e, a) continue } } } + +// TestHeaderEscapeRoundTrip tests to see if foo == url.PathUnescape(headerEscape(foo)) +// This behavior is important for client -> API server transmission of extra values. +func TestHeaderEscapeRoundTrip(t *testing.T) { + t.Parallel() + testCases := []struct { + name string + key string + }{ + { + name: "alpha", + key: "alphabetical", + }, + { + name: "alphanumeric", + key: "alph4num3r1c", + }, + { + name: "percent encoded", + key: "percent%20encoded", + }, + { + name: "almost percent encoded", + key: "almost%zzpercent%xxencoded", + }, + { + name: "illegal char & percent encoding", + key: "example.com/percent%20encoded", + }, + { + name: "weird unicode stuff", + key: "example.com/ᛒᚥᛏᛖᚥᚢとロビン", + }, + { + name: "header legal chars", + key: "abc123!#$+.-_*\\^`~|'", + }, + { + name: "legal path, illegal header", + key: "@=:", + }, + } + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + escaped := headerKeyEscape(tc.key) + unescaped, err := url.PathUnescape(escaped) + if err != nil { + t.Fatalf("url.PathUnescape(%q) returned error: %v", escaped, err) + } + if tc.key != unescaped { + t.Errorf("url.PathUnescape(headerKeyEscape(%q)) returned %q, wanted %q", tc.key, unescaped, tc.key) + } + }) + } +} diff --git a/deps/k8s.io/client-go/transport/spdy/BUILD b/deps/k8s.io/client-go/transport/spdy/BUILD deleted file mode 100644 index bf90084b6..000000000 --- a/deps/k8s.io/client-go/transport/spdy/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["spdy.go"], - importpath = "k8s.io/client-go/transport/spdy", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/httpstream/spdy:go_default_library", - "//vendor/k8s.io/client-go/rest:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/transport/transport.go b/deps/k8s.io/client-go/transport/transport.go index 15be0a3e6..c19739fdf 100644 --- a/deps/k8s.io/client-go/transport/transport.go +++ b/deps/k8s.io/client-go/transport/transport.go @@ -28,7 +28,7 @@ import ( // or transport level security defined by the provided Config. func New(config *Config) (http.RoundTripper, error) { // Set transport level security - if config.Transport != nil && (config.HasCA() || config.HasCertAuth() || config.TLS.Insecure) { + if config.Transport != nil && (config.HasCA() || config.HasCertAuth() || config.HasCertCallback() || config.TLS.Insecure) { return nil, fmt.Errorf("using a custom transport with TLS certificate options or the insecure flag is not allowed") } @@ -52,7 +52,7 @@ func New(config *Config) (http.RoundTripper, error) { // TLSConfigFor returns a tls.Config that will provide the transport level security defined // by the provided Config. Will return nil if no transport level security is requested. func TLSConfigFor(c *Config) (*tls.Config, error) { - if !(c.HasCA() || c.HasCertAuth() || c.TLS.Insecure) { + if !(c.HasCA() || c.HasCertAuth() || c.HasCertCallback() || c.TLS.Insecure || len(c.TLS.ServerName) > 0) { return nil, nil } if c.HasCA() && c.TLS.Insecure { @@ -75,12 +75,40 @@ func TLSConfigFor(c *Config) (*tls.Config, error) { tlsConfig.RootCAs = rootCertPool(c.TLS.CAData) } + var staticCert *tls.Certificate if c.HasCertAuth() { + // If key/cert were provided, verify them before setting up + // tlsConfig.GetClientCertificate. cert, err := tls.X509KeyPair(c.TLS.CertData, c.TLS.KeyData) if err != nil { return nil, err } - tlsConfig.Certificates = []tls.Certificate{cert} + staticCert = &cert + } + + if c.HasCertAuth() || c.HasCertCallback() { + tlsConfig.GetClientCertificate = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) { + // Note: static key/cert data always take precedence over cert + // callback. + if staticCert != nil { + return staticCert, nil + } + if c.HasCertCallback() { + cert, err := c.TLS.GetCert() + if err != nil { + return nil, err + } + // GetCert may return empty value, meaning no cert. + if cert != nil { + return cert, nil + } + } + + // Both c.TLS.CertData/KeyData were unset and GetCert didn't return + // anything. Return an empty tls.Certificate, no client cert will + // be sent to the server. + return &tls.Certificate{}, nil + } } return tlsConfig, nil diff --git a/deps/k8s.io/client-go/transport/transport_test.go b/deps/k8s.io/client-go/transport/transport_test.go index 4d2d78f86..2e9896a08 100644 --- a/deps/k8s.io/client-go/transport/transport_test.go +++ b/deps/k8s.io/client-go/transport/transport_test.go @@ -17,6 +17,8 @@ limitations under the License. package transport import ( + "crypto/tls" + "errors" "net/http" "testing" ) @@ -94,6 +96,8 @@ func TestNew(t *testing.T) { Config *Config Err bool TLS bool + TLSCert bool + TLSErr bool Default bool }{ "default transport": { @@ -101,6 +105,13 @@ func TestNew(t *testing.T) { Config: &Config{}, }, + "server name": { + TLS: true, + Config: &Config{TLS: TLSConfig{ + ServerName: "foo", + }}, + }, + "ca transport": { TLS: true, Config: &Config{ @@ -128,7 +139,8 @@ func TestNew(t *testing.T) { }, "cert transport": { - TLS: true, + TLS: true, + TLSCert: true, Config: &Config{ TLS: TLSConfig{ CAData: []byte(rootCACert), @@ -158,7 +170,8 @@ func TestNew(t *testing.T) { }, }, "key data overriding bad file cert transport": { - TLS: true, + TLS: true, + TLSCert: true, Config: &Config{ TLS: TLSConfig{ CAData: []byte(rootCACert), @@ -168,37 +181,108 @@ func TestNew(t *testing.T) { }, }, }, + "callback cert and key": { + TLS: true, + TLSCert: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + GetCert: func() (*tls.Certificate, error) { + crt, err := tls.X509KeyPair([]byte(certData), []byte(keyData)) + return &crt, err + }, + }, + }, + }, + "cert callback error": { + TLS: true, + TLSCert: true, + TLSErr: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + GetCert: func() (*tls.Certificate, error) { + return nil, errors.New("GetCert failure") + }, + }, + }, + }, + "cert data overrides empty callback result": { + TLS: true, + TLSCert: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + GetCert: func() (*tls.Certificate, error) { + return nil, nil + }, + CertData: []byte(certData), + KeyData: []byte(keyData), + }, + }, + }, + "callback returns nothing": { + TLS: true, + TLSCert: true, + Config: &Config{ + TLS: TLSConfig{ + CAData: []byte(rootCACert), + GetCert: func() (*tls.Certificate, error) { + return nil, nil + }, + }, + }, + }, } for k, testCase := range testCases { - transport, err := New(testCase.Config) - switch { - case testCase.Err && err == nil: - t.Errorf("%s: unexpected non-error", k) - continue - case !testCase.Err && err != nil: - t.Errorf("%s: unexpected error: %v", k, err) - continue - } - - switch { - case testCase.Default && transport != http.DefaultTransport: - t.Errorf("%s: expected the default transport, got %#v", k, transport) - continue - case !testCase.Default && transport == http.DefaultTransport: - t.Errorf("%s: expected non-default transport, got %#v", k, transport) - continue - } - - // We only know how to check TLSConfig on http.Transports - if transport, ok := transport.(*http.Transport); ok { + t.Run(k, func(t *testing.T) { + rt, err := New(testCase.Config) + switch { + case testCase.Err && err == nil: + t.Fatal("unexpected non-error") + case !testCase.Err && err != nil: + t.Fatalf("unexpected error: %v", err) + } + if testCase.Err { + return + } + + switch { + case testCase.Default && rt != http.DefaultTransport: + t.Fatalf("got %#v, expected the default transport", rt) + case !testCase.Default && rt == http.DefaultTransport: + t.Fatalf("got %#v, expected non-default transport", rt) + } + + // We only know how to check TLSConfig on http.Transports + transport := rt.(*http.Transport) switch { case testCase.TLS && transport.TLSClientConfig == nil: - t.Errorf("%s: expected TLSClientConfig, got %#v", k, transport) - continue + t.Fatalf("got %#v, expected TLSClientConfig", transport) case !testCase.TLS && transport.TLSClientConfig != nil: - t.Errorf("%s: expected no TLSClientConfig, got %#v", k, transport) - continue + t.Fatalf("got %#v, expected no TLSClientConfig", transport) + } + if !testCase.TLS { + return + } + + switch { + case testCase.TLSCert && transport.TLSClientConfig.GetClientCertificate == nil: + t.Fatalf("got %#v, expected TLSClientConfig.GetClientCertificate", transport.TLSClientConfig) + case !testCase.TLSCert && transport.TLSClientConfig.GetClientCertificate != nil: + t.Fatalf("got %#v, expected no TLSClientConfig.GetClientCertificate", transport.TLSClientConfig) + } + if !testCase.TLSCert { + return + } + + _, err = transport.TLSClientConfig.GetClientCertificate(nil) + switch { + case testCase.TLSErr && err == nil: + t.Error("got nil error from GetClientCertificate, expected non-nil") + case !testCase.TLSErr && err != nil: + t.Errorf("got error from GetClientCertificate: %q, expected nil", err) } - } + }) } } diff --git a/deps/k8s.io/client-go/util/buffer/BUILD b/deps/k8s.io/client-go/util/buffer/BUILD deleted file mode 100644 index da23420e9..000000000 --- a/deps/k8s.io/client-go/util/buffer/BUILD +++ /dev/null @@ -1,30 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -go_library( - name = "go_default_library", - srcs = ["ring_growing.go"], - importpath = "k8s.io/client-go/util/buffer", - visibility = ["//visibility:public"], -) - -go_test( - name = "go_default_test", - srcs = ["ring_growing_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/buffer", - deps = ["//vendor/github.com/stretchr/testify/assert:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/util/buffer/ring_growing_test.go b/deps/k8s.io/client-go/util/buffer/ring_growing_test.go index 231b836c0..31a4c079d 100644 --- a/deps/k8s.io/client-go/util/buffer/ring_growing_test.go +++ b/deps/k8s.io/client-go/util/buffer/ring_growing_test.go @@ -39,7 +39,7 @@ func TestGrowth(t *testing.T) { } assert.Equalf(t, x, read, "expected to have read %d items: %d", x, read) assert.Zerof(t, g.readable, "expected readable to be zero: %d", g.readable) - assert.Equalf(t, g.n, 16, "expected N to be 16: %d", g.n) + assert.Equalf(t, 16, g.n, "expected N to be 16: %d", g.n) } func TestEmpty(t *testing.T) { diff --git a/deps/k8s.io/client-go/util/cert/BUILD b/deps/k8s.io/client-go/util/cert/BUILD deleted file mode 100644 index 121de49fb..000000000 --- a/deps/k8s.io/client-go/util/cert/BUILD +++ /dev/null @@ -1,48 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "csr_test.go", - "pem_test.go", - ], - data = glob(["testdata/**"]), - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/cert", -) - -go_library( - name = "go_default_library", - srcs = [ - "cert.go", - "csr.go", - "io.go", - "pem.go", - ], - data = [ - "testdata/dontUseThisKey.pem", - ], - importpath = "k8s.io/client-go/util/cert", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/util/cert/triple:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/cert/cert.go b/deps/k8s.io/client-go/util/cert/cert.go index 2c95754c1..0d6794bb5 100644 --- a/deps/k8s.io/client-go/util/cert/cert.go +++ b/deps/k8s.io/client-go/util/cert/cert.go @@ -27,9 +27,12 @@ import ( "encoding/pem" "errors" "fmt" + "io/ioutil" "math" "math/big" "net" + "path" + "strings" "time" ) @@ -136,25 +139,82 @@ func MakeEllipticPrivateKeyPEM() ([]byte, error) { // GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host. // Host may be an IP or a DNS name -// You may also specify additional subject alt names (either ip or dns names) for the certificate +// You may also specify additional subject alt names (either ip or dns names) for the certificate. func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) { + return GenerateSelfSignedCertKeyWithFixtures(host, alternateIPs, alternateDNS, "") +} + +// GenerateSelfSignedCertKeyWithFixtures creates a self-signed certificate and key for the given host. +// Host may be an IP or a DNS name. You may also specify additional subject alt names (either ip or dns names) +// for the certificate. +// +// If fixtureDirectory is non-empty, it is a directory path which can contain pre-generated certs. The format is: +// _-_-.crt +// _-_-.key +// Certs/keys not existing in that directory are created. +func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, alternateDNS []string, fixtureDirectory string) ([]byte, []byte, error) { + validFrom := time.Now().Add(-time.Hour) // valid an hour earlier to avoid flakes due to clock skew + maxAge := time.Hour * 24 * 365 // one year self-signed certs + + baseName := fmt.Sprintf("%s_%s_%s", host, strings.Join(ipsToStrings(alternateIPs), "-"), strings.Join(alternateDNS, "-")) + certFixturePath := path.Join(fixtureDirectory, baseName+".crt") + keyFixturePath := path.Join(fixtureDirectory, baseName+".key") + if len(fixtureDirectory) > 0 { + cert, err := ioutil.ReadFile(certFixturePath) + if err == nil { + key, err := ioutil.ReadFile(keyFixturePath) + if err == nil { + return cert, key, nil + } + return nil, nil, fmt.Errorf("cert %s can be read, but key %s cannot: %v", certFixturePath, keyFixturePath, err) + } + maxAge = 100 * time.Hour * 24 * 365 // 100 years fixtures + } + + caKey, err := rsa.GenerateKey(cryptorand.Reader, 2048) + if err != nil { + return nil, nil, err + } + + caTemplate := x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{ + CommonName: fmt.Sprintf("%s-ca@%d", host, time.Now().Unix()), + }, + NotBefore: validFrom, + NotAfter: validFrom.Add(maxAge), + + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, + BasicConstraintsValid: true, + IsCA: true, + } + + caDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &caTemplate, &caTemplate, &caKey.PublicKey, caKey) + if err != nil { + return nil, nil, err + } + + caCertificate, err := x509.ParseCertificate(caDERBytes) + if err != nil { + return nil, nil, err + } + priv, err := rsa.GenerateKey(cryptorand.Reader, 2048) if err != nil { return nil, nil, err } template := x509.Certificate{ - SerialNumber: big.NewInt(1), + SerialNumber: big.NewInt(2), Subject: pkix.Name{ CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()), }, - NotBefore: time.Now(), - NotAfter: time.Now().Add(time.Hour * 24 * 365), + NotBefore: validFrom, + NotAfter: validFrom.Add(maxAge), - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, BasicConstraintsValid: true, - IsCA: true, } if ip := net.ParseIP(host); ip != nil { @@ -166,16 +226,19 @@ func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS template.IPAddresses = append(template.IPAddresses, alternateIPs...) template.DNSNames = append(template.DNSNames, alternateDNS...) - derBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, &template, &priv.PublicKey, priv) + derBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, caCertificate, &priv.PublicKey, caKey) if err != nil { return nil, nil, err } - // Generate cert + // Generate cert, followed by ca certBuffer := bytes.Buffer{} if err := pem.Encode(&certBuffer, &pem.Block{Type: CertificateBlockType, Bytes: derBytes}); err != nil { return nil, nil, err } + if err := pem.Encode(&certBuffer, &pem.Block{Type: CertificateBlockType, Bytes: caDERBytes}); err != nil { + return nil, nil, err + } // Generate key keyBuffer := bytes.Buffer{} @@ -183,6 +246,15 @@ func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS return nil, nil, err } + if len(fixtureDirectory) > 0 { + if err := ioutil.WriteFile(certFixturePath, certBuffer.Bytes(), 0644); err != nil { + return nil, nil, fmt.Errorf("failed to write cert fixture to %s: %v", certFixturePath, err) + } + if err := ioutil.WriteFile(keyFixturePath, keyBuffer.Bytes(), 0644); err != nil { + return nil, nil, fmt.Errorf("failed to write key fixture to %s: %v", certFixturePath, err) + } + } + return certBuffer.Bytes(), keyBuffer.Bytes(), nil } @@ -213,3 +285,11 @@ func FormatCert(c *x509.Certificate) string { } return res } + +func ipsToStrings(ips []net.IP) []string { + ss := make([]string, 0, len(ips)) + for _, ip := range ips { + ss = append(ss, ip.String()) + } + return ss +} diff --git a/deps/k8s.io/client-go/util/cert/io.go b/deps/k8s.io/client-go/util/cert/io.go index a41f8054a..a57bf09d5 100644 --- a/deps/k8s.io/client-go/util/cert/io.go +++ b/deps/k8s.io/client-go/util/cert/io.go @@ -17,7 +17,11 @@ limitations under the License. package cert import ( + "crypto" + "crypto/ecdsa" + "crypto/rsa" "crypto/x509" + "encoding/pem" "fmt" "io/ioutil" "os" @@ -84,7 +88,8 @@ func WriteKey(keyPath string, data []byte) error { // can't find one, it will generate a new key and store it there. func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err error) { loadedData, err := ioutil.ReadFile(keyPath) - if err == nil { + // Call verifyKeyData to ensure the file wasn't empty/corrupt. + if err == nil && verifyKeyData(loadedData) { return loadedData, false, err } if !os.IsNotExist(err) { @@ -101,6 +106,27 @@ func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err return generatedData, true, nil } +// MarshalPrivateKeyToPEM converts a known private key type of RSA or ECDSA to +// a PEM encoded block or returns an error. +func MarshalPrivateKeyToPEM(privateKey crypto.PrivateKey) ([]byte, error) { + switch t := privateKey.(type) { + case *ecdsa.PrivateKey: + derBytes, err := x509.MarshalECPrivateKey(t) + if err != nil { + return nil, err + } + privateKeyPemBlock := &pem.Block{ + Type: ECPrivateKeyBlockType, + Bytes: derBytes, + } + return pem.EncodeToMemory(privateKeyPemBlock), nil + case *rsa.PrivateKey: + return EncodePrivateKeyPEM(t), nil + default: + return nil, fmt.Errorf("private key is not a recognized type: %T", privateKey) + } +} + // NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file. // Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates func NewPool(filename string) (*x509.CertPool, error) { @@ -156,3 +182,12 @@ func PublicKeysFromFile(file string) ([]interface{}, error) { } return keys, nil } + +// verifyKeyData returns true if the provided data appears to be a valid private key. +func verifyKeyData(data []byte) bool { + if len(data) == 0 { + return false + } + _, err := ParsePrivateKeyPEM(data) + return err == nil +} diff --git a/deps/k8s.io/client-go/util/cert/triple/BUILD b/deps/k8s.io/client-go/util/cert/triple/BUILD deleted file mode 100644 index 6399d0e95..000000000 --- a/deps/k8s.io/client-go/util/cert/triple/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["triple.go"], - importpath = "k8s.io/client-go/util/cert/triple", - deps = ["//vendor/k8s.io/client-go/util/cert:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/certificate/BUILD b/deps/k8s.io/client-go/util/certificate/BUILD deleted file mode 100644 index 7f54ae3df..000000000 --- a/deps/k8s.io/client-go/util/certificate/BUILD +++ /dev/null @@ -1,67 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "certificate_manager_test.go", - "certificate_store_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/certificate", - tags = ["automanaged"], - deps = [ - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "certificate_manager.go", - "certificate_store.go", - ], - importpath = "k8s.io/client-go/util/certificate", - tags = ["automanaged"], - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - "//vendor/k8s.io/client-go/util/certificate/csr:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/client-go/util/certificate/csr:all-srcs", - ], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/client-go/util/certificate/certificate_manager.go b/deps/k8s.io/client-go/util/certificate/certificate_manager.go index a2d1feaf8..7b07b26a3 100644 --- a/deps/k8s.io/client-go/util/certificate/certificate_manager.go +++ b/deps/k8s.io/client-go/util/certificate/certificate_manager.go @@ -24,6 +24,7 @@ import ( "crypto/x509" "encoding/pem" "fmt" + "reflect" "sync" "time" @@ -32,6 +33,7 @@ import ( certificates "k8s.io/api/certificates/v1beta1" "k8s.io/apimachinery/pkg/api/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/wait" certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" "k8s.io/client-go/util/cert" @@ -75,6 +77,13 @@ type Config struct { // part of rotation. It follows the same rules as the template parameter of // crypto.x509.CreateCertificateRequest in the Go standard libraries. Template *x509.CertificateRequest + // GetTemplate returns the CertificateRequest that will be used as a template for + // generating certificate signing requests for all new keys generated as + // part of rotation. It follows the same rules as the template parameter of + // crypto.x509.CreateCertificateRequest in the Go standard libraries. + // If no template is available, nil may be returned, and no certificate will be requested. + // If specified, takes precedence over Template. + GetTemplate func() *x509.CertificateRequest // Usages is the types of usages that certificates generated by the manager // can be used for. Usages []certificates.KeyUsage @@ -136,7 +145,10 @@ func (e *NoCertKeyError) Error() string { return string(*e) } type manager struct { certSigningRequestClient certificatesclient.CertificateSigningRequestInterface - template *x509.CertificateRequest + getTemplate func() *x509.CertificateRequest + lastRequestLock sync.Mutex + lastRequest *x509.CertificateRequest + dynamicTemplate bool usages []certificates.KeyUsage certStore Store certAccessLock sync.RWMutex @@ -158,9 +170,15 @@ func NewManager(config *Config) (Manager, error) { return nil, err } + getTemplate := config.GetTemplate + if getTemplate == nil { + getTemplate = func() *x509.CertificateRequest { return config.Template } + } + m := manager{ certSigningRequestClient: config.CertificateSigningRequestClient, - template: config.Template, + getTemplate: getTemplate, + dynamicTemplate: config.GetTemplate != nil, usages: config.Usages, certStore: config.CertificateStore, cert: cert, @@ -215,12 +233,32 @@ func (m *manager) Start() { glog.V(2).Infof("Certificate rotation is enabled.") + templateChanged := make(chan struct{}) go wait.Forever(func() { deadline := m.nextRotationDeadline() if sleepInterval := deadline.Sub(time.Now()); sleepInterval > 0 { glog.V(2).Infof("Waiting %v for next certificate rotation", sleepInterval) - time.Sleep(sleepInterval) + + timer := time.NewTimer(sleepInterval) + defer timer.Stop() + + select { + case <-timer.C: + // unblock when deadline expires + case <-templateChanged: + if reflect.DeepEqual(m.getLastRequest(), m.getTemplate()) { + // if the template now matches what we last requested, restart the rotation deadline loop + return + } + glog.V(2).Infof("Certificate template changed, rotating") + } + } + + // Don't enter rotateCerts and trigger backoff if we don't even have a template to request yet + if m.getTemplate() == nil { + return } + backoff := wait.Backoff{ Duration: 2 * time.Second, Factor: 2, @@ -231,7 +269,18 @@ func (m *manager) Start() { utilruntime.HandleError(fmt.Errorf("Reached backoff limit, still unable to rotate certs: %v", err)) wait.PollInfinite(32*time.Second, m.rotateCerts) } - }, 0) + }, time.Second) + + if m.dynamicTemplate { + go wait.Forever(func() { + // check if the current template matches what we last requested + if !reflect.DeepEqual(m.getLastRequest(), m.getTemplate()) { + // if the template is different, queue up an interrupt of the rotation deadline loop. + // if we've requested a CSR that matches the new template by the time the interrupt is handled, the interrupt is disregarded. + templateChanged <- struct{}{} + } + }, time.Second) + } } func getCurrentCertificateOrBootstrap( @@ -268,6 +317,13 @@ func getCurrentCertificateOrBootstrap( return nil, false, fmt.Errorf("unable to parse certificate data: %v", err) } bootstrapCert.Leaf = certs[0] + + if _, err := store.Update(bootstrapCertificatePEM, bootstrapKeyPEM); err != nil { + utilruntime.HandleError(fmt.Errorf("Unable to set the cert/key pair to the bootstrap certificate: %v", err)) + } else { + glog.V(4).Infof("Updated the store to contain the initial bootstrap certificate") + } + return &bootstrapCert, true, nil } @@ -279,7 +335,7 @@ func getCurrentCertificateOrBootstrap( func (m *manager) rotateCerts() (bool, error) { glog.V(2).Infof("Rotating certificates") - csrPEM, keyPEM, privateKey, err := m.generateCSR() + template, csrPEM, keyPEM, privateKey, err := m.generateCSR() if err != nil { utilruntime.HandleError(fmt.Errorf("Unable to generate a certificate signing request: %v", err)) return false, nil @@ -293,6 +349,9 @@ func (m *manager) rotateCerts() (bool, error) { return false, m.updateServerError(err) } + // Once we've successfully submitted a CSR for this template, record that we did so + m.setLastRequest(template) + // Wait for the certificate to be signed. Instead of one long watch, we retry with slightly longer // intervals each time in order to tolerate failures from the server AND to preserve the liveliness // of the cert manager loop. This creates slightly more traffic against the API server in return @@ -346,6 +405,36 @@ func (m *manager) nextRotationDeadline() time.Time { return time.Now() } + // Ensure the currently held certificate satisfies the requested subject CN and SANs + if template := m.getTemplate(); template != nil { + if template.Subject.CommonName != m.cert.Leaf.Subject.CommonName { + glog.V(2).Infof("Current certificate CN (%s) does not match requested CN (%s), rotating now", m.cert.Leaf.Subject.CommonName, template.Subject.CommonName) + return time.Now() + } + + currentDNSNames := sets.NewString(m.cert.Leaf.DNSNames...) + desiredDNSNames := sets.NewString(template.DNSNames...) + missingDNSNames := desiredDNSNames.Difference(currentDNSNames) + if len(missingDNSNames) > 0 { + glog.V(2).Infof("Current certificate is missing requested DNS names %v, rotating now", missingDNSNames.List()) + return time.Now() + } + + currentIPs := sets.NewString() + for _, ip := range m.cert.Leaf.IPAddresses { + currentIPs.Insert(ip.String()) + } + desiredIPs := sets.NewString() + for _, ip := range template.IPAddresses { + desiredIPs.Insert(ip.String()) + } + missingIPs := desiredIPs.Difference(currentIPs) + if len(missingIPs) > 0 { + glog.V(2).Infof("Current certificate is missing requested IP addresses %v, rotating now", missingIPs.List()) + return time.Now() + } + } + notAfter := m.cert.Leaf.NotAfter totalDuration := float64(notAfter.Sub(m.cert.Leaf.NotBefore)) deadline := m.cert.Leaf.NotBefore.Add(jitteryDuration(totalDuration)) @@ -401,22 +490,38 @@ func (m *manager) updateServerError(err error) error { return nil } -func (m *manager) generateCSR() (csrPEM []byte, keyPEM []byte, key interface{}, err error) { +func (m *manager) generateCSR() (template *x509.CertificateRequest, csrPEM []byte, keyPEM []byte, key interface{}, err error) { // Generate a new private key. privateKey, err := ecdsa.GenerateKey(elliptic.P256(), cryptorand.Reader) if err != nil { - return nil, nil, nil, fmt.Errorf("unable to generate a new private key: %v", err) + return nil, nil, nil, nil, fmt.Errorf("unable to generate a new private key: %v", err) } der, err := x509.MarshalECPrivateKey(privateKey) if err != nil { - return nil, nil, nil, fmt.Errorf("unable to marshal the new key to DER: %v", err) + return nil, nil, nil, nil, fmt.Errorf("unable to marshal the new key to DER: %v", err) } keyPEM = pem.EncodeToMemory(&pem.Block{Type: cert.ECPrivateKeyBlockType, Bytes: der}) - csrPEM, err = cert.MakeCSRFromTemplate(privateKey, m.template) + template = m.getTemplate() + if template == nil { + return nil, nil, nil, nil, fmt.Errorf("unable to create a csr, no template available") + } + csrPEM, err = cert.MakeCSRFromTemplate(privateKey, template) if err != nil { - return nil, nil, nil, fmt.Errorf("unable to create a csr from the private key: %v", err) + return nil, nil, nil, nil, fmt.Errorf("unable to create a csr from the private key: %v", err) } - return csrPEM, keyPEM, privateKey, nil + return template, csrPEM, keyPEM, privateKey, nil +} + +func (m *manager) getLastRequest() *x509.CertificateRequest { + m.lastRequestLock.Lock() + defer m.lastRequestLock.Unlock() + return m.lastRequest +} + +func (m *manager) setLastRequest(r *x509.CertificateRequest) { + m.lastRequestLock.Lock() + defer m.lastRequestLock.Unlock() + m.lastRequest = r } diff --git a/deps/k8s.io/client-go/util/certificate/certificate_manager_test.go b/deps/k8s.io/client-go/util/certificate/certificate_manager_test.go index c48f7a721..299a1d530 100644 --- a/deps/k8s.io/client-go/util/certificate/certificate_manager_test.go +++ b/deps/k8s.io/client-go/util/certificate/certificate_manager_test.go @@ -186,7 +186,7 @@ func TestSetRotationDeadline(t *testing.T) { NotAfter: tc.notAfter, }, }, - template: &x509.CertificateRequest{}, + getTemplate: func() *x509.CertificateRequest { return &x509.CertificateRequest{} }, usages: []certificates.KeyUsage{}, certificateExpiration: &g, } @@ -206,7 +206,7 @@ func TestSetRotationDeadline(t *testing.T) { t.Errorf("%d metrics were recorded, wanted %d", g.calls, 1) } if g.lastValue != float64(tc.notAfter.Unix()) { - t.Errorf("%d value for metric was recorded, wanted %d", g.lastValue, tc.notAfter.Unix()) + t.Errorf("%f value for metric was recorded, wanted %d", g.lastValue, tc.notAfter.Unix()) } }) } @@ -221,8 +221,8 @@ func TestRotateCertCreateCSRError(t *testing.T) { NotAfter: now.Add(-1 * time.Hour), }, }, - template: &x509.CertificateRequest{}, - usages: []certificates.KeyUsage{}, + getTemplate: func() *x509.CertificateRequest { return &x509.CertificateRequest{} }, + usages: []certificates.KeyUsage{}, certSigningRequestClient: fakeClient{ failureType: createError, }, @@ -244,8 +244,8 @@ func TestRotateCertWaitingForResultError(t *testing.T) { NotAfter: now.Add(-1 * time.Hour), }, }, - template: &x509.CertificateRequest{}, - usages: []certificates.KeyUsage{}, + getTemplate: func() *x509.CertificateRequest { return &x509.CertificateRequest{} }, + usages: []certificates.KeyUsage{}, certSigningRequestClient: fakeClient{ failureType: watchError, }, diff --git a/deps/k8s.io/client-go/util/certificate/certificate_store.go b/deps/k8s.io/client-go/util/certificate/certificate_store.go index 42a40dcdf..f54bd6586 100644 --- a/deps/k8s.io/client-go/util/certificate/certificate_store.go +++ b/deps/k8s.io/client-go/util/certificate/certificate_store.go @@ -46,6 +46,15 @@ type fileStore struct { keyFile string } +// FileStore is a store that provides certificate retrieval as well as +// the path on disk of the current PEM. +type FileStore interface { + Store + // CurrentPath returns the path on disk of the current certificate/key + // pair encoded as PEM files. + CurrentPath() string +} + // NewFileStore returns a concrete implementation of a Store that is based on // storing the cert/key pairs in a single file per pair on disk in the // designated directory. When starting up it will look for the currently @@ -64,7 +73,7 @@ func NewFileStore( certDirectory string, keyDirectory string, certFile string, - keyFile string) (Store, error) { + keyFile string) (FileStore, error) { s := fileStore{ pairNamePrefix: pairNamePrefix, @@ -79,6 +88,11 @@ func NewFileStore( return &s, nil } +// CurrentPath returns the path to the current version of these certificates. +func (s *fileStore) CurrentPath() string { + return filepath.Join(s.certDirectory, s.filename(currentPair)) +} + // recover checks if there is a certificate rotation that was interrupted while // progress, and if so, attempts to recover to a good state. func (s *fileStore) recover() error { diff --git a/deps/k8s.io/client-go/util/certificate/csr/BUILD b/deps/k8s.io/client-go/util/certificate/csr/BUILD deleted file mode 100644 index b45251b98..000000000 --- a/deps/k8s.io/client-go/util/certificate/csr/BUILD +++ /dev/null @@ -1,54 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["csr.go"], - importpath = "k8s.io/client-go/util/certificate/csr", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/types:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/tools/cache:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["csr_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/certificate/csr", - deps = [ - "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", - "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", - "//vendor/k8s.io/client-go/util/cert:go_default_library", - ], -) diff --git a/deps/k8s.io/client-go/util/certificate/csr/csr.go b/deps/k8s.io/client-go/util/certificate/csr/csr.go index 22112a5b5..4a53352fe 100644 --- a/deps/k8s.io/client-go/util/certificate/csr/csr.go +++ b/deps/k8s.io/client-go/util/certificate/csr/csr.go @@ -24,10 +24,11 @@ import ( "encoding/base64" "encoding/pem" "fmt" - "github.com/golang/glog" "reflect" "time" + "github.com/golang/glog" + certificates "k8s.io/api/certificates/v1beta1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -38,6 +39,7 @@ import ( "k8s.io/apimachinery/pkg/watch" certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" "k8s.io/client-go/tools/cache" + watchtools "k8s.io/client-go/tools/watch" certutil "k8s.io/client-go/util/cert" ) @@ -121,7 +123,7 @@ func RequestCertificate(client certificatesclient.CertificateSigningRequestInter func WaitForCertificate(client certificatesclient.CertificateSigningRequestInterface, req *certificates.CertificateSigningRequest, timeout time.Duration) (certData []byte, err error) { fieldSelector := fields.OneTermEqualSelector("metadata.name", req.Name).String() - event, err := cache.ListWatchUntil( + event, err := watchtools.ListWatchUntil( timeout, &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { diff --git a/deps/k8s.io/client-go/util/connrotation/connrotation.go b/deps/k8s.io/client-go/util/connrotation/connrotation.go new file mode 100644 index 000000000..235a9e019 --- /dev/null +++ b/deps/k8s.io/client-go/util/connrotation/connrotation.go @@ -0,0 +1,105 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package connrotation implements a connection dialer that tracks and can close +// all created connections. +// +// This is used for credential rotation of long-lived connections, when there's +// no way to re-authenticate on a live connection. +package connrotation + +import ( + "context" + "net" + "sync" +) + +// DialFunc is a shorthand for signature of net.DialContext. +type DialFunc func(ctx context.Context, network, address string) (net.Conn, error) + +// Dialer opens connections through Dial and tracks them. +type Dialer struct { + dial DialFunc + + mu sync.Mutex + conns map[*closableConn]struct{} +} + +// NewDialer creates a new Dialer instance. +// +// If dial is not nil, it will be used to create new underlying connections. +// Otherwise net.DialContext is used. +func NewDialer(dial DialFunc) *Dialer { + return &Dialer{ + dial: dial, + conns: make(map[*closableConn]struct{}), + } +} + +// CloseAll forcibly closes all tracked connections. +// +// Note: new connections may get created before CloseAll returns. +func (d *Dialer) CloseAll() { + d.mu.Lock() + conns := d.conns + d.conns = make(map[*closableConn]struct{}) + d.mu.Unlock() + + for conn := range conns { + conn.Close() + } +} + +// Dial creates a new tracked connection. +func (d *Dialer) Dial(network, address string) (net.Conn, error) { + return d.DialContext(context.Background(), network, address) +} + +// DialContext creates a new tracked connection. +func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) { + conn, err := d.dial(ctx, network, address) + if err != nil { + return nil, err + } + + closable := &closableConn{Conn: conn} + + // Start tracking the connection + d.mu.Lock() + d.conns[closable] = struct{}{} + d.mu.Unlock() + + // When the connection is closed, remove it from the map. This will + // be no-op if the connection isn't in the map, e.g. if CloseAll() + // is called. + closable.onClose = func() { + d.mu.Lock() + delete(d.conns, closable) + d.mu.Unlock() + } + + return closable, nil +} + +type closableConn struct { + onClose func() + net.Conn +} + +func (c *closableConn) Close() error { + go c.onClose() + return c.Conn.Close() +} diff --git a/deps/k8s.io/client-go/util/connrotation/connrotation_test.go b/deps/k8s.io/client-go/util/connrotation/connrotation_test.go new file mode 100644 index 000000000..a618f2961 --- /dev/null +++ b/deps/k8s.io/client-go/util/connrotation/connrotation_test.go @@ -0,0 +1,61 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package connrotation + +import ( + "context" + "net" + "testing" + "time" +) + +func TestCloseAll(t *testing.T) { + closed := make(chan struct{}) + dialFn := func(ctx context.Context, network, address string) (net.Conn, error) { + return closeOnlyConn{onClose: func() { closed <- struct{}{} }}, nil + } + dialer := NewDialer(dialFn) + + const numConns = 10 + + // Outer loop to ensure Dialer is re-usable after CloseAll. + for i := 0; i < 5; i++ { + for j := 0; j < numConns; j++ { + if _, err := dialer.Dial("", ""); err != nil { + t.Fatal(err) + } + } + dialer.CloseAll() + for j := 0; j < numConns; j++ { + select { + case <-closed: + case <-time.After(time.Second): + t.Fatalf("iteration %d: 1s after CloseAll only %d/%d connections closed", i, j, numConns) + } + } + } +} + +type closeOnlyConn struct { + net.Conn + onClose func() +} + +func (c closeOnlyConn) Close() error { + go c.onClose() + return nil +} diff --git a/deps/k8s.io/client-go/util/exec/BUILD b/deps/k8s.io/client-go/util/exec/BUILD deleted file mode 100644 index 57b58e5cc..000000000 --- a/deps/k8s.io/client-go/util/exec/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["exec.go"], - importpath = "k8s.io/client-go/util/exec", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/flowcontrol/BUILD b/deps/k8s.io/client-go/util/flowcontrol/BUILD deleted file mode 100644 index 6590d5cb4..000000000 --- a/deps/k8s.io/client-go/util/flowcontrol/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "backoff_test.go", - "throttle_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/flowcontrol", - deps = ["//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library"], -) - -go_library( - name = "go_default_library", - srcs = [ - "backoff.go", - "throttle.go", - ], - importpath = "k8s.io/client-go/util/flowcontrol", - deps = [ - "//vendor/golang.org/x/time/rate:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/client-go/util/integer:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/flowcontrol/backoff_test.go b/deps/k8s.io/client-go/util/flowcontrol/backoff_test.go index 23a6cbfa3..b14ab341b 100644 --- a/deps/k8s.io/client-go/util/flowcontrol/backoff_test.go +++ b/deps/k8s.io/client-go/util/flowcontrol/backoff_test.go @@ -75,7 +75,7 @@ func TestBackoffReset(t *testing.T) { } } -func TestBackoffHightWaterMark(t *testing.T) { +func TestBackoffHighWaterMark(t *testing.T) { id := "_idHiWaterMark" tc := clock.NewFakeClock(time.Now()) step := time.Second diff --git a/deps/k8s.io/client-go/util/homedir/BUILD b/deps/k8s.io/client-go/util/homedir/BUILD deleted file mode 100644 index 21a1952cf..000000000 --- a/deps/k8s.io/client-go/util/homedir/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["homedir.go"], - importpath = "k8s.io/client-go/util/homedir", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/integer/BUILD b/deps/k8s.io/client-go/util/integer/BUILD deleted file mode 100644 index 6de17569a..000000000 --- a/deps/k8s.io/client-go/util/integer/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["integer_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/integer", -) - -go_library( - name = "go_default_library", - srcs = ["integer.go"], - importpath = "k8s.io/client-go/util/integer", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/jsonpath/BUILD b/deps/k8s.io/client-go/util/jsonpath/BUILD deleted file mode 100644 index 2686d5ee8..000000000 --- a/deps/k8s.io/client-go/util/jsonpath/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "jsonpath_test.go", - "parser_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/jsonpath", -) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "jsonpath.go", - "node.go", - "parser.go", - ], - importpath = "k8s.io/client-go/util/jsonpath", - deps = ["//vendor/k8s.io/client-go/third_party/forked/golang/template:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/jsonpath/node.go b/deps/k8s.io/client-go/util/jsonpath/node.go index bc763357c..2f612b188 100644 --- a/deps/k8s.io/client-go/util/jsonpath/node.go +++ b/deps/k8s.io/client-go/util/jsonpath/node.go @@ -80,7 +80,7 @@ func (l *ListNode) append(n Node) { } func (l *ListNode) String() string { - return fmt.Sprintf("%s", l.Type()) + return l.Type().String() } // TextNode holds plain text. @@ -210,7 +210,7 @@ func newWildcard() *WildcardNode { } func (i *WildcardNode) String() string { - return fmt.Sprintf("%s", i.Type()) + return i.Type().String() } // RecursiveNode means a recursive descent operator @@ -223,7 +223,7 @@ func newRecursive() *RecursiveNode { } func (r *RecursiveNode) String() string { - return fmt.Sprintf("%s", r.Type()) + return r.Type().String() } // UnionNode is union of ListNode @@ -237,7 +237,7 @@ func newUnion(nodes []*ListNode) *UnionNode { } func (u *UnionNode) String() string { - return fmt.Sprintf("%s", u.Type()) + return u.Type().String() } // BoolNode holds bool value diff --git a/deps/k8s.io/client-go/util/jsonpath/parser.go b/deps/k8s.io/client-go/util/jsonpath/parser.go index ef0f9213a..99b45849c 100644 --- a/deps/k8s.io/client-go/util/jsonpath/parser.go +++ b/deps/k8s.io/client-go/util/jsonpath/parser.go @@ -94,7 +94,7 @@ func (p *Parser) consumeText() string { // next returns the next rune in the input. func (p *Parser) next() rune { - if int(p.pos) >= len(p.input) { + if p.pos >= len(p.input) { p.width = 0 return eof } @@ -266,7 +266,7 @@ Loop: } } text := p.consumeText() - text = string(text[1 : len(text)-1]) + text = text[1 : len(text)-1] if text == "*" { text = ":" } @@ -373,7 +373,7 @@ Loop: } reg := regexp.MustCompile(`^([^!<>=]+)([!<>=]+)(.+?)$`) text := p.consumeText() - text = string(text[:len(text)-2]) + text = text[:len(text)-2] value := reg.FindStringSubmatch(text) if value == nil { parser, err := parseAction("text", text) diff --git a/deps/k8s.io/client-go/util/retry/BUILD b/deps/k8s.io/client-go/util/retry/BUILD deleted file mode 100644 index bf008c916..000000000 --- a/deps/k8s.io/client-go/util/retry/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = ["util.go"], - importpath = "k8s.io/client-go/util/retry", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["util_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/retry", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/testing/BUILD b/deps/k8s.io/client-go/util/testing/BUILD deleted file mode 100644 index 956b9d1ae..000000000 --- a/deps/k8s.io/client-go/util/testing/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["fake_handler_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/testing", -) - -go_library( - name = "go_default_library", - srcs = [ - "fake_handler.go", - "tmpdir.go", - ], - importpath = "k8s.io/client-go/util/testing", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/workqueue/BUILD b/deps/k8s.io/client-go/util/workqueue/BUILD deleted file mode 100644 index 54a299eb6..000000000 --- a/deps/k8s.io/client-go/util/workqueue/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = [ - "default_rate_limiters_test.go", - "delaying_queue_test.go", - "rate_limitting_queue_test.go", - ], - embed = [":go_default_library"], - importpath = "k8s.io/client-go/util/workqueue", - deps = [ - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", - ], -) - -go_library( - name = "go_default_library", - srcs = [ - "default_rate_limiters.go", - "delaying_queue.go", - "doc.go", - "metrics.go", - "parallelizer.go", - "queue.go", - "rate_limitting_queue.go", - ], - importpath = "k8s.io/client-go/util/workqueue", - deps = [ - "//vendor/golang.org/x/time/rate:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", - "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", - ], -) - -go_test( - name = "go_default_xtest", - srcs = ["queue_test.go"], - importpath = "k8s.io/client-go/util/workqueue_test", - deps = ["//vendor/k8s.io/client-go/util/workqueue:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/client-go/util/workqueue/delaying_queue.go b/deps/k8s.io/client-go/util/workqueue/delaying_queue.go index c62ed32ef..a37177425 100644 --- a/deps/k8s.io/client-go/util/workqueue/delaying_queue.go +++ b/deps/k8s.io/client-go/util/workqueue/delaying_queue.go @@ -45,7 +45,7 @@ func newDelayingQueue(clock clock.Clock, name string) DelayingInterface { ret := &delayingType{ Interface: NewNamed(name), clock: clock, - heartbeat: clock.Tick(maxWait), + heartbeat: clock.NewTicker(maxWait), stopCh: make(chan struct{}), waitingForAddCh: make(chan *waitFor, 1000), metrics: newRetryMetrics(name), @@ -67,10 +67,7 @@ type delayingType struct { stopCh chan struct{} // heartbeat ensures we wait no more than maxWait before firing - // - // TODO: replace with Ticker (and add to clock) so this can be cleaned up. - // clock.Tick will leak. - heartbeat <-chan time.Time + heartbeat clock.Ticker // waitingForAddCh is a buffered channel that feeds waitingForAdd waitingForAddCh chan *waitFor @@ -138,6 +135,7 @@ func (pq waitForPriorityQueue) Peek() interface{} { func (q *delayingType) ShutDown() { q.Interface.ShutDown() close(q.stopCh) + q.heartbeat.Stop() } // AddAfter adds the given item to the work queue after the given delay @@ -209,7 +207,7 @@ func (q *delayingType) waitingLoop() { case <-q.stopCh: return - case <-q.heartbeat: + case <-q.heartbeat.C(): // continue the loop, which will add ready items case <-nextReadyAt: diff --git a/deps/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go b/deps/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go index 32d7fc906..3fbe07d0d 100644 --- a/deps/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go +++ b/deps/k8s.io/client-go/util/workqueue/rate_limitting_queue_test.go @@ -30,7 +30,7 @@ func TestRateLimitingQueue(t *testing.T) { delayingQueue := &delayingType{ Interface: New(), clock: fakeClock, - heartbeat: fakeClock.Tick(maxWait), + heartbeat: fakeClock.NewTicker(maxWait), stopCh: make(chan struct{}), waitingForAddCh: make(chan *waitFor, 1000), metrics: newRetryMetrics(""), diff --git a/deps/k8s.io/code-generator/Godeps/Godeps.json b/deps/k8s.io/code-generator/Godeps/Godeps.json index 4595525e2..affc13ced 100644 --- a/deps/k8s.io/code-generator/Godeps/Godeps.json +++ b/deps/k8s.io/code-generator/Godeps/Godeps.json @@ -1,7 +1,7 @@ { "ImportPath": "k8s.io/code-generator", - "GoVersion": "go1.9", - "GodepVersion": "v79", + "GoVersion": "go1.10", + "GodepVersion": "v80", "Packages": [ "./..." ], @@ -32,7 +32,7 @@ }, { "ImportPath": "github.com/go-openapi/spec", - "Rev": "7abd5745472fff5eb3685386d5fb8bf38683154d" + "Rev": "1de3e0542de65ad8d75452a595886fdd0befb363" }, { "ImportPath": "github.com/go-openapi/swag", @@ -156,7 +156,7 @@ }, { "ImportPath": "github.com/spf13/pflag", - "Rev": "4c012f6dcd9546820e378d0bdda4d8fc772cdfea" + "Rev": "583c0c0531f06d5278b7d917446061adc344b5cd" }, { "ImportPath": "golang.org/x/net/idna", @@ -220,51 +220,63 @@ }, { "ImportPath": "k8s.io/gengo/args", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/examples/deepcopy-gen/generators", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/examples/defaulter-gen/generators", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/examples/import-boss/generators", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/examples/set-gen/generators", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/examples/set-gen/sets", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/generator", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/namer", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/parser", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" }, { "ImportPath": "k8s.io/gengo/types", - "Rev": "b6c426f7730e6d66e6e476a85d1c3eb7633880e0" + "Rev": "fdcf9f9480fdd5bf2b3c3df9bf4ecd22b25b87e2" + }, + { + "ImportPath": "k8s.io/kube-openapi/cmd/openapi-gen/args", + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" }, { "ImportPath": "k8s.io/kube-openapi/pkg/common", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" }, { "ImportPath": "k8s.io/kube-openapi/pkg/generators", - "Rev": "a07b7bbb58e7fdc5144f8d7046331d29fc9ad3b3" + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" + }, + { + "ImportPath": "k8s.io/kube-openapi/pkg/generators/rules", + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" + }, + { + "ImportPath": "k8s.io/kube-openapi/pkg/util/sets", + "Rev": "0cf8f7e6ed1d2e3d47d02e3b6e559369af24d803" } ] } diff --git a/deps/k8s.io/code-generator/Godeps/OWNERS b/deps/k8s.io/code-generator/Godeps/OWNERS new file mode 100644 index 000000000..3d49f3060 --- /dev/null +++ b/deps/k8s.io/code-generator/Godeps/OWNERS @@ -0,0 +1,2 @@ +approvers: +- dep-approvers diff --git a/deps/k8s.io/code-generator/OWNERS b/deps/k8s.io/code-generator/OWNERS index ce432f59d..4155fc60c 100644 --- a/deps/k8s.io/code-generator/OWNERS +++ b/deps/k8s.io/code-generator/OWNERS @@ -6,3 +6,6 @@ reviewers: - lavalamp - wojtek-t - sttts +labels: +- sig/api-machinery +- area/code-generation diff --git a/deps/k8s.io/code-generator/SECURITY_CONTACTS b/deps/k8s.io/code-generator/SECURITY_CONTACTS new file mode 100644 index 000000000..0648a8ebf --- /dev/null +++ b/deps/k8s.io/code-generator/SECURITY_CONTACTS @@ -0,0 +1,17 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +cjcullen +jessfraz +liggitt +philips +tallclair diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go index b5182d690..d056c5b78 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/install/install.go @@ -19,25 +19,15 @@ limitations under the License. package install import ( - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/code-generator/_examples/apiserver/apis/example" "k8s.io/code-generator/_examples/apiserver/apis/example/v1" ) // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - if err := announced.NewGroupMetaFactory( - &announced.GroupMetaFactoryArgs{ - GroupName: example.SchemeGroupVersion.Group, - VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version}, - AddInternalObjectsToScheme: example.AddToScheme, - }, - announced.VersionToSchemeFunc{ - v1.SchemeGroupVersion.Version: v1.AddToScheme, - }, - ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { - panic(err) - } +func Install(scheme *runtime.Scheme) { + utilruntime.Must(example.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/doc.go index 242d3904d..5b6bd5b30 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/doc.go @@ -15,6 +15,7 @@ limitations under the License. */ // +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta // +k8s:conversion-gen=k8s.io/code-generator/_examples/apiserver/apis/example // +groupName=example.apiserver.code-generator.k8s.io package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go index f430e1b32..ba47dbe2e 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1 @@ -34,15 +34,38 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1_TestType_To_example_TestType, - Convert_example_TestType_To_v1_TestType, - Convert_v1_TestTypeList_To_example_TestTypeList, - Convert_example_TestTypeList_To_v1_TestTypeList, - Convert_v1_TestTypeStatus_To_example_TestTypeStatus, - Convert_example_TestTypeStatus_To_v1_TestTypeStatus, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*TestType)(nil), (*example.TestType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TestType_To_example_TestType(a.(*TestType), b.(*example.TestType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*example.TestType)(nil), (*TestType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_example_TestType_To_v1_TestType(a.(*example.TestType), b.(*TestType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TestTypeList)(nil), (*example.TestTypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TestTypeList_To_example_TestTypeList(a.(*TestTypeList), b.(*example.TestTypeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*example.TestTypeList)(nil), (*TestTypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_example_TestTypeList_To_v1_TestTypeList(a.(*example.TestTypeList), b.(*TestTypeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TestTypeStatus)(nil), (*example.TestTypeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TestTypeStatus_To_example_TestTypeStatus(a.(*TestTypeStatus), b.(*example.TestTypeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*example.TestTypeStatus)(nil), (*TestTypeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_example_TestTypeStatus_To_v1_TestTypeStatus(a.(*example.TestTypeStatus), b.(*TestTypeStatus), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1_TestType_To_example_TestType(in *TestType, out *example.TestType, s conversion.Scope) error { diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go index 96771586c..dae52ff12 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -47,9 +47,8 @@ func (in *TestType) DeepCopy() *TestType { func (in *TestType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -81,9 +80,8 @@ func (in *TestTypeList) DeepCopy() *TestTypeList { func (in *TestTypeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.defaults.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.defaults.go index 88d7af085..cce2e603a 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.defaults.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/v1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go index 7f46d2bbe..980112fa8 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package example @@ -47,9 +47,8 @@ func (in *TestType) DeepCopy() *TestType { func (in *TestType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -81,9 +80,8 @@ func (in *TestTypeList) DeepCopy() *TestTypeList { func (in *TestTypeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go index ef241a33f..1e786f5c5 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/install/install.go @@ -19,25 +19,15 @@ limitations under the License. package install import ( - "k8s.io/apimachinery/pkg/apimachinery/announced" - "k8s.io/apimachinery/pkg/apimachinery/registered" "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/code-generator/_examples/apiserver/apis/example2" "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" ) // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - if err := announced.NewGroupMetaFactory( - &announced.GroupMetaFactoryArgs{ - GroupName: example2.SchemeGroupVersion.Group, - VersionPreferenceOrder: []string{v1.SchemeGroupVersion.Version}, - AddInternalObjectsToScheme: example2.AddToScheme, - }, - announced.VersionToSchemeFunc{ - v1.SchemeGroupVersion.Version: v1.AddToScheme, - }, - ).Announce(groupFactoryRegistry).RegisterAndEnable(registry, scheme); err != nil { - panic(err) - } +func Install(scheme *runtime.Scheme) { + utilruntime.Must(example2.AddToScheme(scheme)) + utilruntime.Must(v1.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion)) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go index 41e271d22..36bd4549c 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/doc.go @@ -15,6 +15,7 @@ limitations under the License. */ // +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta // +groupName=example.test.apiserver.code-generator.k8s.io // +k8s:conversion-gen=k8s.io/code-generator/_examples/apiserver/apis/example2 // +groupGoName=SecondExample diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go index 432b17d44..5bf9a98e9 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.conversion.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by conversion-gen. Do not edit it manually! +// Code generated by conversion-gen. DO NOT EDIT. package v1 @@ -34,15 +34,38 @@ func init() { // RegisterConversions adds conversion functions to the given scheme. // Public to allow building arbitrary schemes. -func RegisterConversions(scheme *runtime.Scheme) error { - return scheme.AddGeneratedConversionFuncs( - Convert_v1_TestType_To_example2_TestType, - Convert_example2_TestType_To_v1_TestType, - Convert_v1_TestTypeList_To_example2_TestTypeList, - Convert_example2_TestTypeList_To_v1_TestTypeList, - Convert_v1_TestTypeStatus_To_example2_TestTypeStatus, - Convert_example2_TestTypeStatus_To_v1_TestTypeStatus, - ) +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*TestType)(nil), (*example2.TestType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TestType_To_example2_TestType(a.(*TestType), b.(*example2.TestType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*example2.TestType)(nil), (*TestType)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_example2_TestType_To_v1_TestType(a.(*example2.TestType), b.(*TestType), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TestTypeList)(nil), (*example2.TestTypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TestTypeList_To_example2_TestTypeList(a.(*TestTypeList), b.(*example2.TestTypeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*example2.TestTypeList)(nil), (*TestTypeList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_example2_TestTypeList_To_v1_TestTypeList(a.(*example2.TestTypeList), b.(*TestTypeList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*TestTypeStatus)(nil), (*example2.TestTypeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1_TestTypeStatus_To_example2_TestTypeStatus(a.(*TestTypeStatus), b.(*example2.TestTypeStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*example2.TestTypeStatus)(nil), (*TestTypeStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_example2_TestTypeStatus_To_v1_TestTypeStatus(a.(*example2.TestTypeStatus), b.(*TestTypeStatus), scope) + }); err != nil { + return err + } + return nil } func autoConvert_v1_TestType_To_example2_TestType(in *TestType, out *example2.TestType, s conversion.Scope) error { diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go index 96771586c..dae52ff12 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -47,9 +47,8 @@ func (in *TestType) DeepCopy() *TestType { func (in *TestType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -81,9 +80,8 @@ func (in *TestTypeList) DeepCopy() *TestTypeList { func (in *TestTypeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.defaults.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.defaults.go index 88d7af085..cce2e603a 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.defaults.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/v1/zz_generated.defaults.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go index 55746bfeb..f9b317e57 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/apis/example2/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package example2 @@ -47,9 +47,8 @@ func (in *TestType) DeepCopy() *TestType { func (in *TestType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -81,9 +80,8 @@ func (in *TestTypeList) DeepCopy() *TestTypeList { func (in *TestTypeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go index cf71a6772..ff88d121c 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion import ( - glog "github.com/golang/glog" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -76,7 +77,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/doc.go index 6a6cae177..6c970b092 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go index 37c924c3a..37f1b724d 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -41,9 +43,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -53,7 +56,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/doc.go index 8a3101e39..9b99e7167 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go index d923c8d8b..5713015ce 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -21,6 +23,7 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" exampleinternalversion "k8s.io/code-generator/_examples/apiserver/apis/example" secondexampleinternalversion "k8s.io/code-generator/_examples/apiserver/apis/example2" ) @@ -28,10 +31,9 @@ import ( var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + exampleinternalversion.AddToScheme, + secondexampleinternalversion.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -44,11 +46,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - exampleinternalversion.AddToScheme(scheme) - secondexampleinternalversion.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/doc.go index 3d3ab5f4e..7dc375616 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go index 5a722d059..97b03068e 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,13 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( - os "os" - - announced "k8s.io/apimachinery/pkg/apimachinery/announced" - registered "k8s.io/apimachinery/pkg/apimachinery/registered" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -33,16 +31,13 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) -var Registry = registered.NewOrDie(os.Getenv("KUBE_API_VERSIONS")) -var GroupFactoryRegistry = make(announced.APIGroupFactoryRegistry) - func init() { v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - Install(GroupFactoryRegistry, Registry, Scheme) + Install(Scheme) } // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) { - example.Install(groupFactoryRegistry, registry, scheme) - secondexample.Install(groupFactoryRegistry, registry, scheme) +func Install(scheme *runtime.Scheme) { + example.Install(scheme) + secondexample.Install(scheme) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/doc.go index 861501975..86602442b 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go index 906aa3f47..61d99cad0 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/example_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion import ( @@ -64,17 +66,12 @@ func New(c rest.Interface) *ExampleClient { } func setConfigDefaults(config *rest.Config) error { - g, err := scheme.Registry.Group("example.apiserver.code-generator.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { - gv := g.GroupVersion + if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("example.apiserver.code-generator.k8s.io")[0].Group { + gv := scheme.Scheme.PrioritizedVersionsForGroup("example.apiserver.code-generator.k8s.io")[0] config.GroupVersion = &gv } config.NegotiatedSerializer = scheme.Codecs diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_client.go index b8c081d95..90564e449 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_example_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go index bee016ecf..7b247ca95 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/fake/fake_testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example.TestTypeList, if label == nil { label = labels.Everything() } - list := &example.TestTypeList{} + list := &example.TestTypeList{ListMeta: obj.(*example.TestTypeList).ListMeta} for _, item := range obj.(*example.TestTypeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/generated_expansion.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/generated_expansion.go index 189d4e23f..50bdbd254 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/generated_expansion.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion type TestTypeExpansion interface{} diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go index 5077c0ca7..d19392e85 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example/internalversion/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/doc.go index 861501975..86602442b 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go index 4939e1ec2..0fcc7baa4 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/example2_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion import ( @@ -64,17 +66,12 @@ func New(c rest.Interface) *SecondExampleClient { } func setConfigDefaults(config *rest.Config) error { - g, err := scheme.Registry.Group("example.test.apiserver.code-generator.k8s.io") - if err != nil { - return err - } - config.APIPath = "/apis" if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() } - if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { - gv := g.GroupVersion + if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("example.test.apiserver.code-generator.k8s.io")[0].Group { + gv := scheme.Scheme.PrioritizedVersionsForGroup("example.test.apiserver.code-generator.k8s.io")[0] config.GroupVersion = &gv } config.NegotiatedSerializer = scheme.Codecs diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_client.go index ea617dc8e..235305e9d 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_example2_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go index 0691a4956..2890ff19d 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/fake/fake_testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +62,7 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2.TestTypeList if label == nil { label = labels.Everything() } - list := &example2.TestTypeList{} + list := &example2.TestTypeList{ListMeta: obj.(*example2.TestTypeList).ListMeta} for _, item := range obj.(*example2.TestTypeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/generated_expansion.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/generated_expansion.go index 189d4e23f..50bdbd254 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/generated_expansion.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion type TestTypeExpansion interface{} diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go index 10725f494..1a2ca7891 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/internalversion/typed/example2/internalversion/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package internalversion import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.go index 86cca3b19..8ba9799f5 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package versioned import ( - glog "github.com/golang/glog" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -92,7 +93,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/doc.go index 9c6dfafa7..41721ca52 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package versioned diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.go index 26ae83c7e..6dce4fed4 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -41,9 +43,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -53,7 +56,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/doc.go index 8a3101e39..9b99e7167 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go index a5fb3c3e4..75282b82f 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -21,6 +23,7 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" examplev1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" secondexamplev1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" ) @@ -28,10 +31,9 @@ import ( var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + examplev1.AddToScheme, + secondexamplev1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -44,11 +46,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - examplev1.AddToScheme(scheme) - secondexamplev1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/doc.go index 3d3ab5f4e..7dc375616 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go index 47f51ae71..e4c8dc102 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( @@ -21,6 +23,7 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" examplev1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" secondexamplev1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" ) @@ -28,10 +31,9 @@ import ( var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + examplev1.AddToScheme, + secondexamplev1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -44,11 +46,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - examplev1.AddToScheme(scheme) - secondexamplev1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_client.go index 407fa9e26..743c8ded2 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/example_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_client.go index 1a8636374..509a5b427 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_example_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go index 063d8cc79..6847f17d5 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -23,7 +25,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - example_v1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" + examplev1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" ) // FakeTestTypes implements TestTypeInterface @@ -37,20 +39,20 @@ var testtypesResource = schema.GroupVersionResource{Group: "example.apiserver.co var testtypesKind = schema.GroupVersionKind{Group: "example.apiserver.code-generator.k8s.io", Version: "v1", Kind: "TestType"} // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example_v1.TestType{}) + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example_v1.TestTypeList, err error) { +func (c *FakeTestTypes) List(opts v1.ListOptions) (result *examplev1.TestTypeList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example_v1.TestTypeList{}) + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &examplev1.TestTypeList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example_v1.TestTypeLi if label == nil { label = labels.Everything() } - list := &example_v1.TestTypeList{} - for _, item := range obj.(*example_v1.TestTypeList).Items { + list := &examplev1.TestTypeList{ListMeta: obj.(*examplev1.TestTypeList).ListMeta} + for _, item := range obj.(*examplev1.TestTypeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(testType *example_v1.TestType) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Create(testType *examplev1.TestType) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(testType *example_v1.TestType) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Update(testType *examplev1.TestType) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(testType *example_v1.TestType) (*example_v1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(testType *examplev1.TestType) (*examplev1.TestType, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example_v1.TestType{}) + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &example_v1.TestType{}) + Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &examplev1.TestType{}) return err } @@ -122,17 +124,17 @@ func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &example_v1.TestTypeList{}) + _, err := c.Fake.Invokes(action, &examplev1.TestTypeList{}) return err } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example_v1.TestType{}) + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/generated_expansion.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/generated_expansion.go index 4e2775e3a..d513810d0 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/generated_expansion.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type TestTypeExpansion interface{} diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go index 70fded42a..2a0606512 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" @@ -36,11 +38,11 @@ type TestTypeInterface interface { Create(*v1.TestType) (*v1.TestType, error) Update(*v1.TestType) (*v1.TestType, error) UpdateStatus(*v1.TestType) (*v1.TestType, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.TestType, error) - List(opts meta_v1.ListOptions) (*v1.TestTypeList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.TestType, error) + List(opts metav1.ListOptions) (*v1.TestTypeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -60,7 +62,7 @@ func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { } // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.TestType, err error) { +func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.Tes } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err error) { +func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) { result = &v1.TestTypeList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err } // Watch returns a watch.Interface that watches the requested testTypes. -func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, er } // Delete takes name of the testType and deletes it. Returns an error if one occurs. -func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). @@ -147,7 +149,7 @@ func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go index 552a87f8a..1271c0f19 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/example2_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/doc.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go index 43ad4e988..1820e182c 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go index 12bbdcbe5..51a3f3e7d 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/fake/fake_testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -23,7 +25,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - example2_v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" + example2v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" ) // FakeTestTypes implements TestTypeInterface @@ -37,20 +39,20 @@ var testtypesResource = schema.GroupVersionResource{Group: "example.test.apiserv var testtypesKind = schema.GroupVersionKind{Group: "example.test.apiserver.code-generator.k8s.io", Version: "v1", Kind: "TestType"} // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example2_v1.TestType{}) + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2_v1.TestTypeList, err error) { +func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2v1.TestTypeList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example2_v1.TestTypeList{}) + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example2v1.TestTypeList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2_v1.TestTypeL if label == nil { label = labels.Everything() } - list := &example2_v1.TestTypeList{} - for _, item := range obj.(*example2_v1.TestTypeList).Items { + list := &example2v1.TestTypeList{ListMeta: obj.(*example2v1.TestTypeList).ListMeta} + for _, item := range obj.(*example2v1.TestTypeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(testType *example2_v1.TestType) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Create(testType *example2v1.TestType) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(testType *example2_v1.TestType) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Update(testType *example2v1.TestType) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(testType *example2_v1.TestType) (*example2_v1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(testType *example2v1.TestType) (*example2v1.TestType, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2_v1.TestType{}) + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &example2_v1.TestType{}) + Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &example2v1.TestType{}) return err } @@ -122,17 +124,17 @@ func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &example2_v1.TestTypeList{}) + _, err := c.Fake.Invokes(action, &example2v1.TestTypeList{}) return err } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example2_v1.TestType{}) + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/generated_expansion.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/generated_expansion.go index 4e2775e3a..d513810d0 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/generated_expansion.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type TestTypeExpansion interface{} diff --git a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go index fa39745ad..b29bd8118 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/clientset/versioned/typed/example2/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" @@ -36,11 +38,11 @@ type TestTypeInterface interface { Create(*v1.TestType) (*v1.TestType, error) Update(*v1.TestType) (*v1.TestType, error) UpdateStatus(*v1.TestType) (*v1.TestType, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.TestType, error) - List(opts meta_v1.ListOptions) (*v1.TestTypeList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.TestType, error) + List(opts metav1.ListOptions) (*v1.TestTypeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -60,7 +62,7 @@ func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { } // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.TestType, err error) { +func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.Tes } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err error) { +func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) { result = &v1.TestTypeList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err } // Watch returns a watch.Interface that watches the requested testTypes. -func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, er } // Delete takes name of the testType and deletes it. Returns an error if one occurs. -func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). @@ -147,7 +149,7 @@ func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/interface.go index 21d8874a0..9cc5d1b0a 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package example diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/interface.go index 21e19c623..1ccc8f3ca 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.go index 8faaeb4d7..025113612 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - example_v1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" + examplev1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" versioned "k8s.io/code-generator/_examples/apiserver/clientset/versioned" internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" v1 "k8s.io/code-generator/_examples/apiserver/listers/example/v1" @@ -57,20 +57,20 @@ func NewTestTypeInformer(client versioned.Interface, namespace string, resyncPer func NewFilteredTestTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.ExampleV1().TestTypes(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.ExampleV1().TestTypes(namespace).Watch(options) }, }, - &example_v1.TestType{}, + &examplev1.TestType{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *testTypeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&example_v1.TestType{}, f.defaultInformer) + return f.factory.InformerFor(&examplev1.TestType{}, f.defaultInformer) } func (f *testTypeInformer) Lister() v1.TestTypeLister { diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/interface.go index c6a044468..3a791dd0f 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package example diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/interface.go index 21e19c623..1ccc8f3ca 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.go index a1574521c..979ee4d58 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/example2/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - example2_v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" + example2v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" versioned "k8s.io/code-generator/_examples/apiserver/clientset/versioned" internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" v1 "k8s.io/code-generator/_examples/apiserver/listers/example2/v1" @@ -57,20 +57,20 @@ func NewTestTypeInformer(client versioned.Interface, namespace string, resyncPer func NewFilteredTestTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.SecondExampleV1().TestTypes(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.SecondExampleV1().TestTypes(namespace).Watch(options) }, }, - &example2_v1.TestType{}, + &example2v1.TestType{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *testTypeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&example2_v1.TestType{}, f.defaultInformer) + return f.factory.InformerFor(&example2v1.TestType{}, f.defaultInformer) } func (f *testTypeInformer) Lister() v1.TestTypeLister { diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go index 4575655e1..fc4aa0d39 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -33,12 +33,16 @@ import ( internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client versioned.Interface namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -46,23 +50,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) } + + return factory } // Start initializes all requested informers. @@ -111,7 +154,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go index 4a22dcdfd..feb7b2028 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -24,7 +24,7 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" v1 "k8s.io/code-generator/_examples/apiserver/apis/example/v1" - example2_v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" + example2v1 "k8s.io/code-generator/_examples/apiserver/apis/example2/v1" ) // GenericInformer is type of SharedIndexInformer which will locate and delegate to other @@ -58,7 +58,7 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1().TestTypes().Informer()}, nil // Group=example.test.apiserver.code-generator.k8s.io, Version=v1 - case example2_v1.SchemeGroupVersion.WithResource("testtypes"): + case example2v1.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.SecondExample().V1().TestTypes().Informer()}, nil } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go index d659b6f64..6318f5284 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/interface.go index 836e7e01b..d2a36b3c8 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package example diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/interface.go index 5abe38523..0fd5f8c3b 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.go index 56619360b..22d761056 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example/internalversion/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion @@ -26,7 +26,7 @@ import ( watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" example "k8s.io/code-generator/_examples/apiserver/apis/example" - clientset_internalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion" + clientsetinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion" internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces" internalversion "k8s.io/code-generator/_examples/apiserver/listers/example/internalversion" ) @@ -47,14 +47,14 @@ type testTypeInformer struct { // NewTestTypeInformer constructs a new informer for TestType type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewTestTypeInformer(client clientset_internalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { +func NewTestTypeInformer(client clientsetinternalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredTestTypeInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredTestTypeInformer constructs a new informer for TestType type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredTestTypeInformer(client clientset_internalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredTestTypeInformer(client clientsetinternalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { @@ -76,7 +76,7 @@ func NewFilteredTestTypeInformer(client clientset_internalversion.Interface, nam ) } -func (f *testTypeInformer) defaultInformer(client clientset_internalversion.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { +func (f *testTypeInformer) defaultInformer(client clientsetinternalversion.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/interface.go index 0656ffbdc..9a5b411a1 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package example diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/interface.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/interface.go index 5abe38523..0fd5f8c3b 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/interface.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.go index 0024c91cd..dcac2ce84 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/example2/internalversion/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion @@ -26,7 +26,7 @@ import ( watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" example2 "k8s.io/code-generator/_examples/apiserver/apis/example2" - clientset_internalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion" + clientsetinternalversion "k8s.io/code-generator/_examples/apiserver/clientset/internalversion" internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces" internalversion "k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion" ) @@ -47,14 +47,14 @@ type testTypeInformer struct { // NewTestTypeInformer constructs a new informer for TestType type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewTestTypeInformer(client clientset_internalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { +func NewTestTypeInformer(client clientsetinternalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredTestTypeInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredTestTypeInformer constructs a new informer for TestType type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredTestTypeInformer(client clientset_internalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredTestTypeInformer(client clientsetinternalversion.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { @@ -76,7 +76,7 @@ func NewFilteredTestTypeInformer(client clientset_internalversion.Interface, nam ) } -func (f *testTypeInformer) defaultInformer(client clientset_internalversion.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { +func (f *testTypeInformer) defaultInformer(client clientsetinternalversion.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredTestTypeInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go index 69fd861ae..ca6d4defe 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion @@ -33,12 +33,16 @@ import ( internalinterfaces "k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client internalversion.Interface namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -46,23 +50,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client internalversion.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client internalversion.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client internalversion.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) } + + return factory } // Start initializes all requested informers. @@ -111,7 +154,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go index 3486e0cd3..046ccac95 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go index 1c770ab0c..03c679244 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/informers/internalversion/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/expansion_generated.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/expansion_generated.go index f308c1673..4bb87150c 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/expansion_generated.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.go index ccfe8f80f..9daa91bbc 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/internalversion/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/expansion_generated.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/expansion_generated.go index d258c22f0..0192e05f0 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/expansion_generated.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.go index 5e420f12c..a9b3d87c0 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/expansion_generated.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/expansion_generated.go index f308c1673..4bb87150c 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/expansion_generated.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.go index 35abf8661..724e63871 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/internalversion/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package internalversion diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/expansion_generated.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/expansion_generated.go index d258c22f0..0192e05f0 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/expansion_generated.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.go b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.go index 65f5a58b9..8aa178af8 100644 --- a/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/apiserver/listers/example2/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go index 08f1279fb..e6614c0da 100644 --- a/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/doc.go @@ -15,5 +15,6 @@ limitations under the License. */ // +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta // +groupName=example.crd.code-generator.k8s.io package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go index 5c2ebc4d6..d79ea38b7 100644 --- a/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go +++ b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/types.go @@ -45,3 +45,30 @@ type TestTypeList struct { type TestTypeStatus struct { Blah string } + +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +type ClusterTestTypeList struct { + metav1.TypeMeta + metav1.ListMeta + Items []ClusterTestType +} + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale +// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/kubernetes/pkg/apis/autoscaling.Scale,result=k8s.io/kubernetes/pkg/apis/autoscaling.Scale + +type ClusterTestType struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty"` + // +optional + Status ClusterTestTypeStatus `json:"status,omitempty"` +} + +type ClusterTestTypeStatus struct { + Blah string +} diff --git a/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go index 96771586c..a3b4bfa9c 100644 --- a/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -24,6 +24,82 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterTestType) DeepCopyInto(out *ClusterTestType) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTestType. +func (in *ClusterTestType) DeepCopy() *ClusterTestType { + if in == nil { + return nil + } + out := new(ClusterTestType) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterTestType) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterTestTypeList) DeepCopyInto(out *ClusterTestTypeList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterTestType, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTestTypeList. +func (in *ClusterTestTypeList) DeepCopy() *ClusterTestTypeList { + if in == nil { + return nil + } + out := new(ClusterTestTypeList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterTestTypeList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterTestTypeStatus) DeepCopyInto(out *ClusterTestTypeStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterTestTypeStatus. +func (in *ClusterTestTypeStatus) DeepCopy() *ClusterTestTypeStatus { + if in == nil { + return nil + } + out := new(ClusterTestTypeStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TestType) DeepCopyInto(out *TestType) { *out = *in @@ -47,9 +123,8 @@ func (in *TestType) DeepCopy() *TestType { func (in *TestType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -81,9 +156,8 @@ func (in *TestTypeList) DeepCopy() *TestTypeList { func (in *TestTypeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.defaults.go b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.defaults.go new file mode 100644 index 000000000..cce2e603a --- /dev/null +++ b/deps/k8s.io/code-generator/_examples/crd/apis/example/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go b/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go index 702b71634..6521d83ff 100644 --- a/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/doc.go @@ -15,6 +15,7 @@ limitations under the License. */ // +k8s:deepcopy-gen=package +// +k8s:defaulter-gen=TypeMeta // +groupName=example.test.crd.code-generator.k8s.io // +groupGoName=SecondExample package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go b/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go index 96771586c..dae52ff12 100644 --- a/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go +++ b/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1 @@ -47,9 +47,8 @@ func (in *TestType) DeepCopy() *TestType { func (in *TestType) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -81,9 +80,8 @@ func (in *TestTypeList) DeepCopy() *TestTypeList { func (in *TestTypeList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c - } else { - return nil } + return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.defaults.go b/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.defaults.go new file mode 100644 index 000000000..cce2e603a --- /dev/null +++ b/deps/k8s.io/code-generator/_examples/crd/apis/example2/v1/zz_generated.defaults.go @@ -0,0 +1,32 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by defaulter-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// RegisterDefaults adds defaulters functions to the given scheme. +// Public to allow building arbitrary schemes. +// All generated defaulters are covering - they call all nested defaulters. +func RegisterDefaults(scheme *runtime.Scheme) error { + return nil +} diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.go index c0c581df8..034e06ad0 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package versioned import ( - glog "github.com/golang/glog" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -92,7 +93,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/doc.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/doc.go index 9c6dfafa7..41721ca52 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package versioned diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.go index 83f00392b..4ad8bba75 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -41,9 +43,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -53,7 +56,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/doc.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/doc.go index 8a3101e39..9b99e7167 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go index 42cfe80fe..f3fd49d0d 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -21,6 +23,7 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" secondexamplev1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" ) @@ -28,10 +31,9 @@ import ( var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + examplev1.AddToScheme, + secondexamplev1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -44,11 +46,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - examplev1.AddToScheme(scheme) - secondexamplev1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/doc.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/doc.go index 3d3ab5f4e..7dc375616 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go index d852f64e7..a98fc7ea7 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( @@ -21,6 +23,7 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" secondexamplev1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" ) @@ -28,10 +31,9 @@ import ( var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + examplev1.AddToScheme, + secondexamplev1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -44,11 +46,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - examplev1.AddToScheme(scheme) - secondexamplev1.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) } diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go new file mode 100644 index 000000000..30e0e7498 --- /dev/null +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/clustertesttype.go @@ -0,0 +1,193 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" + v1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + scheme "k8s.io/code-generator/_examples/crd/clientset/versioned/scheme" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" +) + +// ClusterTestTypesGetter has a method to return a ClusterTestTypeInterface. +// A group's client should implement this interface. +type ClusterTestTypesGetter interface { + ClusterTestTypes() ClusterTestTypeInterface +} + +// ClusterTestTypeInterface has methods to work with ClusterTestType resources. +type ClusterTestTypeInterface interface { + Create(*v1.ClusterTestType) (*v1.ClusterTestType, error) + Update(*v1.ClusterTestType) (*v1.ClusterTestType, error) + UpdateStatus(*v1.ClusterTestType) (*v1.ClusterTestType, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.ClusterTestType, error) + List(opts metav1.ListOptions) (*v1.ClusterTestTypeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) + GetScale(clusterTestTypeName string, options metav1.GetOptions) (*autoscaling.Scale, error) + UpdateScale(clusterTestTypeName string, scale *autoscaling.Scale) (*autoscaling.Scale, error) + + ClusterTestTypeExpansion +} + +// clusterTestTypes implements ClusterTestTypeInterface +type clusterTestTypes struct { + client rest.Interface +} + +// newClusterTestTypes returns a ClusterTestTypes +func newClusterTestTypes(c *ExampleV1Client) *clusterTestTypes { + return &clusterTestTypes{ + client: c.RESTClient(), + } +} + +// Get takes name of the clusterTestType, and returns the corresponding clusterTestType object, and an error if there is any. +func (c *clusterTestTypes) Get(name string, options metav1.GetOptions) (result *v1.ClusterTestType, err error) { + result = &v1.ClusterTestType{} + err = c.client.Get(). + Resource("clustertesttypes"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. +func (c *clusterTestTypes) List(opts metav1.ListOptions) (result *v1.ClusterTestTypeList, err error) { + result = &v1.ClusterTestTypeList{} + err = c.client.Get(). + Resource("clustertesttypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested clusterTestTypes. +func (c *clusterTestTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) { + opts.Watch = true + return c.client.Get(). + Resource("clustertesttypes"). + VersionedParams(&opts, scheme.ParameterCodec). + Watch() +} + +// Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. +func (c *clusterTestTypes) Create(clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { + result = &v1.ClusterTestType{} + err = c.client.Post(). + Resource("clustertesttypes"). + Body(clusterTestType). + Do(). + Into(result) + return +} + +// Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. +func (c *clusterTestTypes) Update(clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { + result = &v1.ClusterTestType{} + err = c.client.Put(). + Resource("clustertesttypes"). + Name(clusterTestType.Name). + Body(clusterTestType). + Do(). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + +func (c *clusterTestTypes) UpdateStatus(clusterTestType *v1.ClusterTestType) (result *v1.ClusterTestType, err error) { + result = &v1.ClusterTestType{} + err = c.client.Put(). + Resource("clustertesttypes"). + Name(clusterTestType.Name). + SubResource("status"). + Body(clusterTestType). + Do(). + Into(result) + return +} + +// Delete takes name of the clusterTestType and deletes it. Returns an error if one occurs. +func (c *clusterTestTypes) Delete(name string, options *metav1.DeleteOptions) error { + return c.client.Delete(). + Resource("clustertesttypes"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *clusterTestTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { + return c.client.Delete(). + Resource("clustertesttypes"). + VersionedParams(&listOptions, scheme.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Patch applies the patch and returns the patched clusterTestType. +func (c *clusterTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.ClusterTestType, err error) { + result = &v1.ClusterTestType{} + err = c.client.Patch(pt). + Resource("clustertesttypes"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +} + +// GetScale takes name of the clusterTestType, and returns the corresponding autoscaling.Scale object, and an error if there is any. +func (c *clusterTestTypes) GetScale(clusterTestTypeName string, options metav1.GetOptions) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} + err = c.client.Get(). + Resource("clustertesttypes"). + Name(clusterTestTypeName). + SubResource("scale"). + VersionedParams(&options, scheme.ParameterCodec). + Do(). + Into(result) + return +} + +// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *clusterTestTypes) UpdateScale(clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { + result = &autoscaling.Scale{} + err = c.client.Put(). + Resource("clustertesttypes"). + Name(clusterTestTypeName). + SubResource("scale"). + Body(scale). + Do(). + Into(result) + return +} diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/doc.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go index 1e282aa17..25d80728c 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/example_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( @@ -25,6 +27,7 @@ import ( type ExampleV1Interface interface { RESTClient() rest.Interface + ClusterTestTypesGetter TestTypesGetter } @@ -33,6 +36,10 @@ type ExampleV1Client struct { restClient rest.Interface } +func (c *ExampleV1Client) ClusterTestTypes() ClusterTestTypeInterface { + return newClusterTestTypes(c) +} + func (c *ExampleV1Client) TestTypes(namespace string) TestTypeInterface { return newTestTypes(c, namespace) } diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/doc.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go new file mode 100644 index 000000000..e0b0376b8 --- /dev/null +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_clustertesttype.go @@ -0,0 +1,152 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + schema "k8s.io/apimachinery/pkg/runtime/schema" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" + examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + autoscaling "k8s.io/kubernetes/pkg/apis/autoscaling" +) + +// FakeClusterTestTypes implements ClusterTestTypeInterface +type FakeClusterTestTypes struct { + Fake *FakeExampleV1 +} + +var clustertesttypesResource = schema.GroupVersionResource{Group: "example.crd.code-generator.k8s.io", Version: "v1", Resource: "clustertesttypes"} + +var clustertesttypesKind = schema.GroupVersionKind{Group: "example.crd.code-generator.k8s.io", Version: "v1", Kind: "ClusterTestType"} + +// Get takes name of the clusterTestType, and returns the corresponding clusterTestType object, and an error if there is any. +func (c *FakeClusterTestTypes) Get(name string, options v1.GetOptions) (result *examplev1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetAction(clustertesttypesResource, name), &examplev1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*examplev1.ClusterTestType), err +} + +// List takes label and field selectors, and returns the list of ClusterTestTypes that match those selectors. +func (c *FakeClusterTestTypes) List(opts v1.ListOptions) (result *examplev1.ClusterTestTypeList, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootListAction(clustertesttypesResource, clustertesttypesKind, opts), &examplev1.ClusterTestTypeList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &examplev1.ClusterTestTypeList{ListMeta: obj.(*examplev1.ClusterTestTypeList).ListMeta} + for _, item := range obj.(*examplev1.ClusterTestTypeList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested clusterTestTypes. +func (c *FakeClusterTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchAction(clustertesttypesResource, opts)) +} + +// Create takes the representation of a clusterTestType and creates it. Returns the server's representation of the clusterTestType, and an error, if there is any. +func (c *FakeClusterTestTypes) Create(clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootCreateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*examplev1.ClusterTestType), err +} + +// Update takes the representation of a clusterTestType and updates it. Returns the server's representation of the clusterTestType, and an error, if there is any. +func (c *FakeClusterTestTypes) Update(clusterTestType *examplev1.ClusterTestType) (result *examplev1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateAction(clustertesttypesResource, clusterTestType), &examplev1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*examplev1.ClusterTestType), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeClusterTestTypes) UpdateStatus(clusterTestType *examplev1.ClusterTestType) (*examplev1.ClusterTestType, error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "status", clusterTestType), &examplev1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*examplev1.ClusterTestType), err +} + +// Delete takes name of the clusterTestType and deletes it. Returns an error if one occurs. +func (c *FakeClusterTestTypes) Delete(name string, options *v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteAction(clustertesttypesResource, name), &examplev1.ClusterTestType{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeClusterTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { + action := testing.NewRootDeleteCollectionAction(clustertesttypesResource, listOptions) + + _, err := c.Fake.Invokes(action, &examplev1.ClusterTestTypeList{}) + return err +} + +// Patch applies the patch and returns the patched clusterTestType. +func (c *FakeClusterTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.ClusterTestType, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceAction(clustertesttypesResource, name, data, subresources...), &examplev1.ClusterTestType{}) + if obj == nil { + return nil, err + } + return obj.(*examplev1.ClusterTestType), err +} + +// GetScale takes name of the clusterTestType, and returns the corresponding scale object, and an error if there is any. +func (c *FakeClusterTestTypes) GetScale(clusterTestTypeName string, options v1.GetOptions) (result *autoscaling.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootGetSubresourceAction(clustertesttypesResource, clusterTestTypeName), &autoscaling.Scale{}) + if obj == nil { + return nil, err + } + return obj.(*autoscaling.Scale), err +} + +// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. +func (c *FakeClusterTestTypes) UpdateScale(clusterTestTypeName string, scale *autoscaling.Scale) (result *autoscaling.Scale, err error) { + obj, err := c.Fake. + Invokes(testing.NewRootUpdateSubresourceAction(clustertesttypesResource, "scale", scale), &autoscaling.Scale{}) + if obj == nil { + return nil, err + } + return obj.(*autoscaling.Scale), err +} diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go index c7bf2dfc4..e6aa99993 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_example_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -26,6 +28,10 @@ type FakeExampleV1 struct { *testing.Fake } +func (c *FakeExampleV1) ClusterTestTypes() v1.ClusterTestTypeInterface { + return &FakeClusterTestTypes{c} +} + func (c *FakeExampleV1) TestTypes(namespace string) v1.TestTypeInterface { return &FakeTestTypes{c, namespace} } diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go index 124396f2f..b284a5797 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/fake/fake_testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -23,7 +25,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - example_v1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" ) // FakeTestTypes implements TestTypeInterface @@ -37,20 +39,20 @@ var testtypesResource = schema.GroupVersionResource{Group: "example.crd.code-gen var testtypesKind = schema.GroupVersionKind{Group: "example.crd.code-generator.k8s.io", Version: "v1", Kind: "TestType"} // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example_v1.TestType{}) + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example_v1.TestTypeList, err error) { +func (c *FakeTestTypes) List(opts v1.ListOptions) (result *examplev1.TestTypeList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example_v1.TestTypeList{}) + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &examplev1.TestTypeList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example_v1.TestTypeLi if label == nil { label = labels.Everything() } - list := &example_v1.TestTypeList{} - for _, item := range obj.(*example_v1.TestTypeList).Items { + list := &examplev1.TestTypeList{ListMeta: obj.(*examplev1.TestTypeList).ListMeta} + for _, item := range obj.(*examplev1.TestTypeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(testType *example_v1.TestType) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Create(testType *examplev1.TestType) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(testType *example_v1.TestType) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Update(testType *examplev1.TestType) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example_v1.TestType{}) + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(testType *example_v1.TestType) (*example_v1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(testType *examplev1.TestType) (*examplev1.TestType, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example_v1.TestType{}) + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &example_v1.TestType{}) + Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &examplev1.TestType{}) return err } @@ -122,17 +124,17 @@ func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &example_v1.TestTypeList{}) + _, err := c.Fake.Invokes(action, &examplev1.TestTypeList{}) return err } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example_v1.TestType, err error) { +func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *examplev1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example_v1.TestType{}) + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &examplev1.TestType{}) if obj == nil { return nil, err } - return obj.(*example_v1.TestType), err + return obj.(*examplev1.TestType), err } diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go index 4e2775e3a..3059734a9 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 +type ClusterTestTypeExpansion interface{} + type TestTypeExpansion interface{} diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go index 460b68abf..6fafb1e1b 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" @@ -36,11 +38,11 @@ type TestTypeInterface interface { Create(*v1.TestType) (*v1.TestType, error) Update(*v1.TestType) (*v1.TestType, error) UpdateStatus(*v1.TestType) (*v1.TestType, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.TestType, error) - List(opts meta_v1.ListOptions) (*v1.TestTypeList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.TestType, error) + List(opts metav1.ListOptions) (*v1.TestTypeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -60,7 +62,7 @@ func newTestTypes(c *ExampleV1Client, namespace string) *testTypes { } // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.TestType, err error) { +func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.Tes } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err error) { +func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) { result = &v1.TestTypeList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err } // Watch returns a watch.Interface that watches the requested testTypes. -func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, er } // Delete takes name of the testType and deletes it. Returns an error if one occurs. -func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). @@ -147,7 +149,7 @@ func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/doc.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/doc.go index 95b44dfa8..3af5d054f 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_client.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_client.go index a753b9689..210b6509f 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_client.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/example2_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/doc.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/doc.go index 63e2c8a08..16f443990 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/doc.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,5 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go index 89e64d648..0d55a6b8e 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_example2_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go index ccba168aa..7c37bd816 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/fake/fake_testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -23,7 +25,7 @@ import ( types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" - example2_v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" + example2v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" ) // FakeTestTypes implements TestTypeInterface @@ -37,20 +39,20 @@ var testtypesResource = schema.GroupVersionResource{Group: "example.test.crd.cod var testtypesKind = schema.GroupVersionKind{Group: "example.test.crd.code-generator.k8s.io", Version: "v1", Kind: "TestType"} // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Get(name string, options v1.GetOptions) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example2_v1.TestType{}) + Invokes(testing.NewGetAction(testtypesResource, c.ns, name), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2_v1.TestTypeList, err error) { +func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2v1.TestTypeList, err error) { obj, err := c.Fake. - Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example2_v1.TestTypeList{}) + Invokes(testing.NewListAction(testtypesResource, testtypesKind, c.ns, opts), &example2v1.TestTypeList{}) if obj == nil { return nil, err @@ -60,8 +62,8 @@ func (c *FakeTestTypes) List(opts v1.ListOptions) (result *example2_v1.TestTypeL if label == nil { label = labels.Everything() } - list := &example2_v1.TestTypeList{} - for _, item := range obj.(*example2_v1.TestTypeList).Items { + list := &example2v1.TestTypeList{ListMeta: obj.(*example2v1.TestTypeList).ListMeta} + for _, item := range obj.(*example2v1.TestTypeList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -77,43 +79,43 @@ func (c *FakeTestTypes) Watch(opts v1.ListOptions) (watch.Interface, error) { } // Create takes the representation of a testType and creates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Create(testType *example2_v1.TestType) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Create(testType *example2v1.TestType) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + Invokes(testing.NewCreateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // Update takes the representation of a testType and updates it. Returns the server's representation of the testType, and an error, if there is any. -func (c *FakeTestTypes) Update(testType *example2_v1.TestType) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Update(testType *example2v1.TestType) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2_v1.TestType{}) + Invokes(testing.NewUpdateAction(testtypesResource, c.ns, testType), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeTestTypes) UpdateStatus(testType *example2_v1.TestType) (*example2_v1.TestType, error) { +func (c *FakeTestTypes) UpdateStatus(testType *example2v1.TestType) (*example2v1.TestType, error) { obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2_v1.TestType{}) + Invokes(testing.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } // Delete takes name of the testType and deletes it. Returns an error if one occurs. func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &example2_v1.TestType{}) + Invokes(testing.NewDeleteAction(testtypesResource, c.ns, name), &example2v1.TestType{}) return err } @@ -122,17 +124,17 @@ func (c *FakeTestTypes) Delete(name string, options *v1.DeleteOptions) error { func (c *FakeTestTypes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error { action := testing.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions) - _, err := c.Fake.Invokes(action, &example2_v1.TestTypeList{}) + _, err := c.Fake.Invokes(action, &example2v1.TestTypeList{}) return err } // Patch applies the patch and returns the patched testType. -func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example2_v1.TestType, err error) { +func (c *FakeTestTypes) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *example2v1.TestType, err error) { obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example2_v1.TestType{}) + Invokes(testing.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &example2v1.TestType{}) if obj == nil { return nil, err } - return obj.(*example2_v1.TestType), err + return obj.(*example2v1.TestType), err } diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/generated_expansion.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/generated_expansion.go index 4e2775e3a..d513810d0 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/generated_expansion.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 type TestTypeExpansion interface{} diff --git a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go index bf6b4de43..69b0e64c5 100644 --- a/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/clientset/versioned/typed/example2/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Code generated by client-gen. DO NOT EDIT. + package v1 import ( - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" rest "k8s.io/client-go/rest" @@ -36,11 +38,11 @@ type TestTypeInterface interface { Create(*v1.TestType) (*v1.TestType, error) Update(*v1.TestType) (*v1.TestType, error) UpdateStatus(*v1.TestType) (*v1.TestType, error) - Delete(name string, options *meta_v1.DeleteOptions) error - DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error - Get(name string, options meta_v1.GetOptions) (*v1.TestType, error) - List(opts meta_v1.ListOptions) (*v1.TestTypeList, error) - Watch(opts meta_v1.ListOptions) (watch.Interface, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error + Get(name string, options metav1.GetOptions) (*v1.TestType, error) + List(opts metav1.ListOptions) (*v1.TestTypeList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.TestType, err error) TestTypeExpansion } @@ -60,7 +62,7 @@ func newTestTypes(c *SecondExampleV1Client, namespace string) *testTypes { } // Get takes name of the testType, and returns the corresponding testType object, and an error if there is any. -func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.TestType, err error) { +func (c *testTypes) Get(name string, options metav1.GetOptions) (result *v1.TestType, err error) { result = &v1.TestType{} err = c.client.Get(). Namespace(c.ns). @@ -73,7 +75,7 @@ func (c *testTypes) Get(name string, options meta_v1.GetOptions) (result *v1.Tes } // List takes label and field selectors, and returns the list of TestTypes that match those selectors. -func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err error) { +func (c *testTypes) List(opts metav1.ListOptions) (result *v1.TestTypeList, err error) { result = &v1.TestTypeList{} err = c.client.Get(). Namespace(c.ns). @@ -85,7 +87,7 @@ func (c *testTypes) List(opts meta_v1.ListOptions) (result *v1.TestTypeList, err } // Watch returns a watch.Interface that watches the requested testTypes. -func (c *testTypes) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { +func (c *testTypes) Watch(opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). @@ -136,7 +138,7 @@ func (c *testTypes) UpdateStatus(testType *v1.TestType) (result *v1.TestType, er } // Delete takes name of the testType and deletes it. Returns an error if one occurs. -func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { +func (c *testTypes) Delete(name string, options *metav1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). @@ -147,7 +149,7 @@ func (c *testTypes) Delete(name string, options *meta_v1.DeleteOptions) error { } // DeleteCollection deletes a collection of objects. -func (c *testTypes) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { +func (c *testTypes) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("testtypes"). diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/interface.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/interface.go index d74e15f5c..10c18944c 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/interface.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package example diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/clustertesttype.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/clustertesttype.go new file mode 100644 index 000000000..13c38e44f --- /dev/null +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/clustertesttype.go @@ -0,0 +1,88 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + time "time" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" + examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + versioned "k8s.io/code-generator/_examples/crd/clientset/versioned" + internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" + v1 "k8s.io/code-generator/_examples/crd/listers/example/v1" +) + +// ClusterTestTypeInformer provides access to a shared informer and lister for +// ClusterTestTypes. +type ClusterTestTypeInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1.ClusterTestTypeLister +} + +type clusterTestTypeInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewClusterTestTypeInformer constructs a new informer for ClusterTestType type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewClusterTestTypeInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredClusterTestTypeInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredClusterTestTypeInformer constructs a new informer for ClusterTestType type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredClusterTestTypeInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().ClusterTestTypes().List(options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.ExampleV1().ClusterTestTypes().Watch(options) + }, + }, + &examplev1.ClusterTestType{}, + resyncPeriod, + indexers, + ) +} + +func (f *clusterTestTypeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredClusterTestTypeInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *clusterTestTypeInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&examplev1.ClusterTestType{}, f.defaultInformer) +} + +func (f *clusterTestTypeInformer) Lister() v1.ClusterTestTypeLister { + return v1.NewClusterTestTypeLister(f.Informer().GetIndexer()) +} diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.go index d0a447bda..1e17b1325 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 @@ -24,6 +24,8 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // ClusterTestTypes returns a ClusterTestTypeInformer. + ClusterTestTypes() ClusterTestTypeInformer // TestTypes returns a TestTypeInformer. TestTypes() TestTypeInformer } @@ -39,6 +41,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// ClusterTestTypes returns a ClusterTestTypeInformer. +func (v *version) ClusterTestTypes() ClusterTestTypeInformer { + return &clusterTestTypeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // TestTypes returns a TestTypeInformer. func (v *version) TestTypes() TestTypeInformer { return &testTypeInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.go index b5e307151..47ca5b287 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - example_v1 "k8s.io/code-generator/_examples/crd/apis/example/v1" + examplev1 "k8s.io/code-generator/_examples/crd/apis/example/v1" versioned "k8s.io/code-generator/_examples/crd/clientset/versioned" internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" v1 "k8s.io/code-generator/_examples/crd/listers/example/v1" @@ -57,20 +57,20 @@ func NewTestTypeInformer(client versioned.Interface, namespace string, resyncPer func NewFilteredTestTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.ExampleV1().TestTypes(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.ExampleV1().TestTypes(namespace).Watch(options) }, }, - &example_v1.TestType{}, + &examplev1.TestType{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *testTypeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&example_v1.TestType{}, f.defaultInformer) + return f.factory.InformerFor(&examplev1.TestType{}, f.defaultInformer) } func (f *testTypeInformer) Lister() v1.TestTypeLister { diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/interface.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/interface.go index d58b0edb4..9e00c7b80 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/interface.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package example diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/interface.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/interface.go index d0a447bda..024352284 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/interface.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.go index b42802ffd..eb99c32d0 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/example2/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1 import ( time "time" - meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" cache "k8s.io/client-go/tools/cache" - example2_v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" + example2v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" versioned "k8s.io/code-generator/_examples/crd/clientset/versioned" internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" v1 "k8s.io/code-generator/_examples/crd/listers/example2/v1" @@ -57,20 +57,20 @@ func NewTestTypeInformer(client versioned.Interface, namespace string, resyncPer func NewFilteredTestTypeInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.SecondExampleV1().TestTypes(namespace).List(options) }, - WatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.SecondExampleV1().TestTypes(namespace).Watch(options) }, }, - &example2_v1.TestType{}, + &example2v1.TestType{}, resyncPeriod, indexers, ) @@ -81,7 +81,7 @@ func (f *testTypeInformer) defaultInformer(client versioned.Interface, resyncPer } func (f *testTypeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&example2_v1.TestType{}, f.defaultInformer) + return f.factory.InformerFor(&example2v1.TestType{}, f.defaultInformer) } func (f *testTypeInformer) Lister() v1.TestTypeLister { diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go index 7a1c864f2..7d6d1f934 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -33,12 +33,16 @@ import ( internalinterfaces "k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client versioned.Interface namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -46,23 +50,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) } + + return factory } // Start initializes all requested informers. @@ -111,7 +154,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go index f9459e9bc..f6b1174c6 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -24,7 +24,7 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" v1 "k8s.io/code-generator/_examples/crd/apis/example/v1" - example2_v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" + example2v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1" ) // GenericInformer is type of SharedIndexInformer which will locate and delegate to other @@ -54,11 +54,13 @@ func (f *genericInformer) Lister() cache.GenericLister { func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { // Group=example.crd.code-generator.k8s.io, Version=v1 + case v1.SchemeGroupVersion.WithResource("clustertesttypes"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1().ClusterTestTypes().Informer()}, nil case v1.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.Example().V1().TestTypes().Informer()}, nil // Group=example.test.crd.code-generator.k8s.io, Version=v1 - case example2_v1.SchemeGroupVersion.WithResource("testtypes"): + case example2v1.SchemeGroupVersion.WithResource("testtypes"): return &genericInformer{resource: resource.GroupResource(), informer: f.SecondExample().V1().TestTypes().Informer()}, nil } diff --git a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go index d784ac1d2..02e0d6ac3 100644 --- a/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/deps/k8s.io/code-generator/_examples/crd/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/clustertesttype.go b/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/clustertesttype.go new file mode 100644 index 000000000..584b3b273 --- /dev/null +++ b/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/clustertesttype.go @@ -0,0 +1,65 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" + v1 "k8s.io/code-generator/_examples/crd/apis/example/v1" +) + +// ClusterTestTypeLister helps list ClusterTestTypes. +type ClusterTestTypeLister interface { + // List lists all ClusterTestTypes in the indexer. + List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) + // Get retrieves the ClusterTestType from the index for a given name. + Get(name string) (*v1.ClusterTestType, error) + ClusterTestTypeListerExpansion +} + +// clusterTestTypeLister implements the ClusterTestTypeLister interface. +type clusterTestTypeLister struct { + indexer cache.Indexer +} + +// NewClusterTestTypeLister returns a new ClusterTestTypeLister. +func NewClusterTestTypeLister(indexer cache.Indexer) ClusterTestTypeLister { + return &clusterTestTypeLister{indexer: indexer} +} + +// List lists all ClusterTestTypes in the indexer. +func (s *clusterTestTypeLister) List(selector labels.Selector) (ret []*v1.ClusterTestType, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1.ClusterTestType)) + }) + return ret, err +} + +// Get retrieves the ClusterTestType from the index for a given name. +func (s *clusterTestTypeLister) Get(name string) (*v1.ClusterTestType, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1.Resource("clustertesttype"), name) + } + return obj.(*v1.ClusterTestType), nil +} diff --git a/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go b/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go index d258c22f0..2681a29f4 100644 --- a/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go +++ b/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,10 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 +// ClusterTestTypeListerExpansion allows custom methods to be added to +// ClusterTestTypeLister. +type ClusterTestTypeListerExpansion interface{} + // TestTypeListerExpansion allows custom methods to be added to // TestTypeLister. type TestTypeListerExpansion interface{} diff --git a/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.go b/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.go index ce132fd2f..7055b6cc4 100644 --- a/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/listers/example/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/expansion_generated.go b/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/expansion_generated.go index d258c22f0..0192e05f0 100644 --- a/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/expansion_generated.go +++ b/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.go b/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.go index a7ad6062c..d3b15c0b9 100644 --- a/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.go +++ b/deps/k8s.io/code-generator/_examples/crd/listers/example2/v1/testtype.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1 diff --git a/deps/k8s.io/code-generator/cmd/client-gen/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/BUILD deleted file mode 100644 index ce49c939e..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/BUILD +++ /dev/null @@ -1,46 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "client-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/client-gen", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/client-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/client-gen/args:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/client-gen/generators:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/client-gen/path:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/client-gen/types:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/client-gen/args/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/args/BUILD deleted file mode 100644 index d9068b667..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/args/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "args.go", - "gvpackages.go", - "gvtype.go", - ], - importpath = "k8s.io/code-generator/cmd/client-gen/args", - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/types:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) - -go_test( - name = "go_default_test", - srcs = ["gvpackages_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/client-gen/args", - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/types:go_default_library", - ], -) diff --git a/deps/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go b/deps/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go index 8154c2eec..f8891bec8 100644 --- a/deps/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go +++ b/deps/k8s.io/code-generator/cmd/client-gen/args/gvpackages_test.go @@ -45,12 +45,12 @@ func TestGVPackageFlag(t *testing.T) { args: []string{"foo/bar/v1", "foo/bar/v2", "foo/bar/", "foo/v1"}, expectedGroups: []types.GroupVersions{ {PackageName: "bar", Group: types.Group("bar"), Versions: []types.PackageVersion{ - {"v1", "foo/bar/v1"}, - {"v2", "foo/bar/v2"}, - {"", "foo/bar"}, + {Version: "v1", Package: "foo/bar/v1"}, + {Version: "v2", Package: "foo/bar/v2"}, + {Version: "", Package: "foo/bar"}, }}, {PackageName: "foo", Group: types.Group("foo"), Versions: []types.PackageVersion{ - {"v1", "foo/v1"}, + {Version: "v1", Package: "foo/v1"}, }}, }, }, @@ -59,12 +59,12 @@ func TestGVPackageFlag(t *testing.T) { def: []string{"foo/bar/v1alpha1", "foo/v1"}, expectedGroups: []types.GroupVersions{ {PackageName: "bar", Group: types.Group("bar"), Versions: []types.PackageVersion{ - {"v1", "foo/bar/v1"}, - {"v2", "foo/bar/v2"}, - {"", "foo/bar"}, + {Version: "v1", Package: "foo/bar/v1"}, + {Version: "v2", Package: "foo/bar/v2"}, + {Version: "", Package: "foo/bar"}, }}, {PackageName: "foo", Group: types.Group("foo"), Versions: []types.PackageVersion{ - {"v1", "foo/v1"}, + {Version: "v1", Package: "foo/v1"}, }}, }, }, @@ -72,8 +72,8 @@ func TestGVPackageFlag(t *testing.T) { args: []string{"api/v1", "api"}, expectedGroups: []types.GroupVersions{ {PackageName: "core", Group: types.Group("api"), Versions: []types.PackageVersion{ - {"v1", "core/v1"}, - {"", "core"}, + {Version: "v1", Package: "core/v1"}, + {Version: "", Package: "core"}, }}, }, }, @@ -82,7 +82,7 @@ func TestGVPackageFlag(t *testing.T) { importBasePath: "k8s.io/api", expectedGroups: []types.GroupVersions{ {PackageName: "foo", Group: types.Group("foo"), Versions: []types.PackageVersion{ - {"v1", "k8s.io/api/foo/v1"}, + {Version: "v1", Package: "k8s.io/api/foo/v1"}, }}, }, }, diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/generators/BUILD deleted file mode 100644 index cc4e600e6..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/BUILD +++ /dev/null @@ -1,50 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "client_generator.go", - "generator_for_clientset.go", - "generator_for_expansion.go", - "generator_for_group.go", - "generator_for_type.go", - "tags.go", - ], - importpath = "k8s.io/code-generator/cmd/client-gen/generators", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators/fake:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators/util:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/path:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/types:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/client-gen/generators/fake:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/client-gen/generators/scheme:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/client-gen/generators/util:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/deps/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index 74af0b31d..335e995c0 100644 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/deps/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -44,10 +44,10 @@ func NameSystems() namer.NameSystems { publicNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "EventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "EventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name @@ -56,10 +56,10 @@ func NameSystems() namer.NameSystems { } privateNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "eventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "eventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name @@ -68,10 +68,10 @@ func NameSystems() namer.NameSystems { } publicPluralNamer := &ExceptionNamer{ Exceptions: map[string]string{ - // these exceptions are used to deconflict the generated code - // you can put your fully qualified package like - // to generate a name that doesn't conflict with your group. - // "k8s.io/apis/events/v1beta1.Event": "EventResource" + // these exceptions are used to deconflict the generated code + // you can put your fully qualified package like + // to generate a name that doesn't conflict with your group. + // "k8s.io/apis/events/v1beta1.Event": "EventResource" }, KeyFunc: func(t *types.Type) string { return t.Name.Package + "." + t.Name.Name diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/BUILD deleted file mode 100644 index 8041036ce..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "fake_client_generator.go", - "generator_fake_for_clientset.go", - "generator_fake_for_group.go", - "generator_fake_for_type.go", - ], - importpath = "k8s.io/code-generator/cmd/client-gen/generators/fake", - deps = [ - "//vendor/k8s.io/code-generator/cmd/client-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators/scheme:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators/util:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/path:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/types:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go b/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go index f77ab0570..f1225acb3 100644 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go +++ b/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go @@ -63,7 +63,7 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { groupClientPackage := filepath.Join(g.fakeClientsetPackage, "typed", group.PackageName, version.NonEmpty()) fakeGroupClientPackage := filepath.Join(groupClientPackage, "fake") - groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{group.Group, version.Version}]) + groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}]) imports = append(imports, strings.ToLower(fmt.Sprintf("%s%s \"%s\"", groupAlias, version.NonEmpty(), groupClientPackage))) imports = append(imports, strings.ToLower(fmt.Sprintf("fake%s%s \"%s\"", groupAlias, version.NonEmpty(), fakeGroupClientPackage))) } @@ -125,9 +125,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -137,7 +138,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go b/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go index c129a5f4b..bf18c14c6 100644 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go +++ b/deps/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go @@ -146,9 +146,10 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "NewRootWatchAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootWatchAction"}), "NewWatchAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewWatchAction"}), "NewCreateSubresourceAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewCreateSubresourceAction"}), + "NewRootCreateSubresourceAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootCreateSubresourceAction"}), "NewUpdateSubresourceAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewUpdateSubresourceAction"}), "NewGetSubresourceAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewGetSubresourceAction"}), - "NewListSubresourceAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewListSubresourceAction"}), + "NewRootGetSubresourceAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootGetSubresourceAction"}), "NewRootUpdateSubresourceAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootUpdateSubresourceAction"}), "NewRootPatchAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootPatchAction"}), "NewPatchAction": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewPatchAction"}), @@ -235,11 +236,8 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. } if e.HasVerb("list") { - if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, listSubresourceTemplate), m) - } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, listTemplate), m) - } + + sw.Do(adjustTemplate(e.VerbName, e.VerbType, listTemplate), m) } // TODO: Figure out schemantic for watching a sub-resource. @@ -322,19 +320,6 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type } ` -var listSubresourceTemplate = ` -// List takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *Fake$.type|publicPlural$) List($.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { - obj, err := c.Fake. - $if .namespaced$Invokes($.NewListSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", $.type|allLowercasePlural$Kind, c.ns, opts), &$.resultType|raw$List{}) - $else$Invokes($.NewRootListAction|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, opts), &$.resultType|raw$List{})$end$ - if obj == nil { - return nil, err - } - return obj.(*$.resultType|raw$List), err -} -` - var listUsingOptionsTemplate = ` // List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { @@ -349,7 +334,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type if label == nil { label = $.Everything|raw$() } - list := &$.type|raw$List{} + list := &$.type|raw$List{ListMeta: obj.(*$.type|raw$List).ListMeta} for _, item := range obj.(*$.type|raw$List).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) @@ -377,7 +362,7 @@ var getSubresourceTemplate = ` func (c *Fake$.type|publicPlural$) Get($.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, c.ns, "$.subresourcePath$", $.type|private$Name), &$.resultType|raw${}) - $else$Invokes($.NewRootGetAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name), &$.resultType|raw${})$end$ + $else$Invokes($.NewRootGetSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name), &$.resultType|raw${})$end$ if obj == nil { return nil, err } @@ -423,7 +408,7 @@ var createSubresourceTemplate = ` func (c *Fake$.type|publicPlural$) Create($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", c.ns, $.inputType|private$), &$.resultType|raw${}) - $else$Invokes($.NewRootCreateAction|raw$($.inputType|allLowercasePlural$Resource, $.inputType|private$), &$.resultType|raw${})$end$ + $else$Invokes($.NewRootCreateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$ if obj == nil { return nil, err } @@ -449,7 +434,7 @@ var updateSubresourceTemplate = ` func (c *Fake$.type|publicPlural$) Update($.type|private$Name string, $.inputType|private$ *$.inputType|raw$) (result *$.resultType|raw$, err error) { obj, err := c.Fake. $if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", c.ns, $.inputType|private$), &$.inputType|raw${}) - $else$Invokes($.NewRootUpdateAction|raw$($.type|allLowercasePlural$Resource, $.type|private$), &$.type|raw${})$end$ + $else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", $.inputType|private$), &$.resultType|raw${})$end$ if obj == nil { return nil, err } diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index de5264660..18ec09ac6 100644 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -59,7 +59,7 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { for _, group := range g.groups { for _, version := range group.Versions { typedClientPath := filepath.Join(g.clientsetPackage, "typed", group.PackageName, version.NonEmpty()) - groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{group.Group, version.Version}]) + groupAlias := strings.ToLower(g.groupGoNames[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}]) imports = append(imports, strings.ToLower(fmt.Sprintf("%s%s \"%s\"", groupAlias, version.NonEmpty(), typedClientPath))) } } @@ -83,7 +83,6 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr "NewDiscoveryClientForConfigOrDie": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClientForConfigOrDie"}), "NewDiscoveryClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClient"}), "flowcontrolNewTokenBucketRateLimiter": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/flowcontrol", Name: "NewTokenBucketRateLimiter"}), - "glogErrorf": c.Universe.Function(types.Name{Package: "github.com/golang/glog", Name: "Errorf"}), } sw.Do(clientsetInterface, m) sw.Do(clientsetTemplate, m) @@ -163,7 +162,6 @@ $range .allGroups$ cs.$.LowerCaseGroupGoName$$.Version$, err =$.PackageAlias$ $end$ cs.DiscoveryClient, err = $.NewDiscoveryClientForConfig|raw$(&configShallowCopy) if err!=nil { - $.glogErrorf|raw$("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go b/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go index 8e569a84f..fd59715c4 100644 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go +++ b/deps/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go @@ -210,17 +210,12 @@ func New(c $.restRESTClientInterface|raw$) *$.GroupGoName$$.Version$Client { var setInternalVersionClientDefaultsTemplate = ` func setConfigDefaults(config *$.restConfig|raw$) error { - g, err := scheme.Registry.Group("$.groupName$") - if err != nil { - return err - } - config.APIPath = $.apiPath$ if config.UserAgent == "" { config.UserAgent = $.restDefaultKubernetesUserAgent|raw$() } - if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group { - gv := g.GroupVersion + if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("$.groupName$")[0].Group { + gv := scheme.Scheme.PrioritizedVersionsForGroup("$.groupName$")[0] config.GroupVersion = &gv } config.NegotiatedSerializer = scheme.Codecs diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/BUILD deleted file mode 100644 index ee7a1c06f..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["generator_for_scheme.go"], - importpath = "k8s.io/code-generator/cmd/client-gen/generators/scheme", - deps = [ - "//vendor/k8s.io/code-generator/cmd/client-gen/path:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/types:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go b/deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go index 6000e40da..60cfbcc0f 100644 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go +++ b/deps/k8s.io/code-generator/cmd/client-gen/generators/scheme/generator_for_scheme.go @@ -62,7 +62,7 @@ func (g *GenScheme) Imports(c *generator.Context) (imports []string) { for _, group := range g.Groups { for _, version := range group.Versions { packagePath := g.InputPackages[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}] - groupAlias := strings.ToLower(g.GroupGoNames[clientgentypes.GroupVersion{group.Group, version.Version}]) + groupAlias := strings.ToLower(g.GroupGoNames[clientgentypes.GroupVersion{Group: group.Group, Version: version.Version}]) if g.CreateRegistry { // import the install package for internal clientsets instead of the type package with register.go if version.Version != "" { @@ -86,26 +86,23 @@ func (g *GenScheme) GenerateType(c *generator.Context, t *types.Type, w io.Write allInstallGroups := clientgentypes.ToGroupInstallPackages(g.Groups, g.GroupGoNames) m := map[string]interface{}{ - "allGroupVersions": allGroupVersions, - "allInstallGroups": allInstallGroups, - "customRegister": false, - "osGetenv": c.Universe.Function(types.Name{Package: "os", Name: "Getenv"}), - "runtimeNewParameterCodec": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "NewParameterCodec"}), - "runtimeNewScheme": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "NewScheme"}), - "serializerNewCodecFactory": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/serializer", Name: "NewCodecFactory"}), - "runtimeScheme": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "Scheme"}), - "schemaGroupVersion": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersion"}), - "metav1AddToGroupVersion": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "AddToGroupVersion"}), - "announcedAPIGroupFactoryRegistry": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apimachinery/announced", Name: "APIGroupFactoryRegistry"}), - "registeredNewOrDie": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/apimachinery/registered", Name: "NewOrDie"}), - "registeredAPIRegistrationManager": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apimachinery/registered", Name: "APIRegistrationManager"}), + "allGroupVersions": allGroupVersions, + "allInstallGroups": allInstallGroups, + "customRegister": false, + "runtimeNewParameterCodec": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "NewParameterCodec"}), + "runtimeNewScheme": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "NewScheme"}), + "serializerNewCodecFactory": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/serializer", Name: "NewCodecFactory"}), + "runtimeScheme": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "Scheme"}), + "runtimeSchemeBuilder": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "SchemeBuilder"}), + "runtimeUtilMust": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/util/runtime", Name: "Must"}), + "schemaGroupVersion": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersion"}), + "metav1AddToGroupVersion": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "AddToGroupVersion"}), } globals := map[string]string{ - "Scheme": "Scheme", - "Codecs": "Codecs", - "ParameterCodec": "ParameterCodec", - "Registry": "Registry", - "GroupFactoryRegistry": "GroupFactoryRegistry", + "Scheme": "Scheme", + "Codecs": "Codecs", + "ParameterCodec": "ParameterCodec", + "Registry": "Registry", } for k, v := range globals { if g.PrivateScheme { @@ -135,35 +132,34 @@ func (g *GenScheme) GenerateType(c *generator.Context, t *types.Type, w io.Write var globalsTemplate = ` var $.Scheme$ = $.runtimeNewScheme|raw$() var $.Codecs$ = $.serializerNewCodecFactory|raw$($.Scheme$) -var $.ParameterCodec$ = $.runtimeNewParameterCodec|raw$($.Scheme$) -` +var $.ParameterCodec$ = $.runtimeNewParameterCodec|raw$($.Scheme$)` var registryRegistration = ` -var $.Registry$ = $.registeredNewOrDie|raw$($.osGetenv|raw$("KUBE_API_VERSIONS")) -var $.GroupFactoryRegistry$ = make($.announcedAPIGroupFactoryRegistry|raw$) func init() { $.metav1AddToGroupVersion|raw$($.Scheme$, $.schemaGroupVersion|raw${Version: "v1"}) - Install($.GroupFactoryRegistry$, $.Registry$, $.Scheme$) + Install($.Scheme$) } // Install registers the API group and adds types to a scheme -func Install(groupFactoryRegistry $.announcedAPIGroupFactoryRegistry|raw$, registry *$.registeredAPIRegistrationManager|raw$, scheme *$.runtimeScheme|raw$) { +func Install(scheme *$.runtimeScheme|raw$) { $- range .allInstallGroups$ - $.InstallPackageAlias$.Install(groupFactoryRegistry, registry, scheme) + $.InstallPackageAlias$.Install(scheme) $- end$ $if .customRegister$ - ExtraInstall(groupFactoryRegistry, registry, scheme) + ExtraInstall(scheme) $end -$ } ` var simpleRegistration = ` - - -func init() { - $.metav1AddToGroupVersion|raw$($.Scheme$, $.schemaGroupVersion|raw${Version: "v1"}) - AddToScheme($.Scheme$) +var localSchemeBuilder = $.runtimeSchemeBuilder|raw${ + $- range .allGroupVersions$ + $.PackageAlias$.AddToScheme, + $- end$ + $if .customRegister$ + ExtraAddToScheme, + $end -$ } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -176,16 +172,14 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *$.runtimeScheme|raw$) { - $- range .allGroupVersions$ - $.PackageAlias$.AddToScheme(scheme) - $- end$ - $if .customRegister$ - ExtraAddToScheme(scheme) - $end -$ +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + $.metav1AddToGroupVersion|raw$($.Scheme$, $.schemaGroupVersion|raw${Version: "v1"}) + $.runtimeUtilMust|raw$(AddToScheme($.Scheme$)) } ` diff --git a/deps/k8s.io/code-generator/cmd/client-gen/generators/util/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/generators/util/BUILD deleted file mode 100644 index e355fb513..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/generators/util/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_test( - name = "go_default_test", - srcs = ["tags_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/client-gen/generators/util", -) - -go_library( - name = "go_default_library", - srcs = ["tags.go"], - importpath = "k8s.io/code-generator/cmd/client-gen/generators/util", - deps = ["//vendor/k8s.io/gengo/types:go_default_library"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/client-gen/path/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/path/BUILD deleted file mode 100644 index 8c042fcaa..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/path/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["path.go"], - importpath = "k8s.io/code-generator/cmd/client-gen/path", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/client-gen/types/BUILD b/deps/k8s.io/code-generator/cmd/client-gen/types/BUILD deleted file mode 100644 index d5d6e8607..000000000 --- a/deps/k8s.io/code-generator/cmd/client-gen/types/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "helpers.go", - "types.go", - ], - importpath = "k8s.io/code-generator/cmd/client-gen/types", - deps = ["//vendor/k8s.io/gengo/namer:go_default_library"], -) - -go_test( - name = "go_default_test", - srcs = ["helpers_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/client-gen/types", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/conversion-gen/BUILD b/deps/k8s.io/code-generator/cmd/conversion-gen/BUILD deleted file mode 100644 index c0fd6862b..000000000 --- a/deps/k8s.io/code-generator/cmd/conversion-gen/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "conversion-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/conversion-gen", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/conversion-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/conversion-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/cmd/conversion-gen/generators:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/conversion-gen/args:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/conversion-gen/generators:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/conversion-gen/args/BUILD b/deps/k8s.io/code-generator/cmd/conversion-gen/args/BUILD deleted file mode 100644 index e06b0b1bc..000000000 --- a/deps/k8s.io/code-generator/cmd/conversion-gen/args/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["args.go"], - importpath = "k8s.io/code-generator/cmd/conversion-gen/args", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/cmd/conversion-gen/args/args.go b/deps/k8s.io/code-generator/cmd/conversion-gen/args/args.go index 3b7b0123d..07ce6e72b 100644 --- a/deps/k8s.io/code-generator/cmd/conversion-gen/args/args.go +++ b/deps/k8s.io/code-generator/cmd/conversion-gen/args/args.go @@ -42,7 +42,7 @@ type CustomArgs struct { // generator pick up manually written conversion funcs from external packages. ExtraPeerDirs []string - // Skipunsafe indicates whether to generate unsafe conversions to improve the efficiency + // SkipUnsafe indicates whether to generate unsafe conversions to improve the efficiency // of these operations. The unsafe operation is a direct pointer assignment via unsafe // (within the allowed uses of unsafe) and is equivalent to a proposed Golang change to // allow structs that are identical to be assigned to each other. diff --git a/deps/k8s.io/code-generator/cmd/conversion-gen/generators/BUILD b/deps/k8s.io/code-generator/cmd/conversion-gen/generators/BUILD deleted file mode 100644 index fd9feff40..000000000 --- a/deps/k8s.io/code-generator/cmd/conversion-gen/generators/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["conversion.go"], - importpath = "k8s.io/code-generator/cmd/conversion-gen/generators", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/cmd/conversion-gen/args:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go b/deps/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go index 257fa0a5c..422237e11 100644 --- a/deps/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go +++ b/deps/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go @@ -175,10 +175,14 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package key := conversionPair{inType.Elem, outType.Elem} // We might scan the same package twice, and that's OK. if v, ok := manualMap[key]; ok && v != nil && v.Name.Package != pkg.Path { - panic(fmt.Sprintf("duplicate static conversion defined: %s -> %s", key.inType, key.outType)) + panic(fmt.Sprintf("duplicate static conversion defined: %s -> %s from:\n%s.%s\n%s.%s", key.inType, key.outType, v.Name.Package, v.Name.Name, f.Name.Package, f.Name.Name)) } manualMap[key] = f } else { + // prevent user error when they don't get the correct conversion signature + if strings.HasPrefix(f.Name.Name, "Convert_") { + glog.Errorf("Rename function %s %s -> %s to match expected conversion signature", f.Name.Package, f.Name.Name, buffer.String()) + } glog.V(8).Infof("%s has wrong name", f.Name) } buffer.Reset() @@ -193,7 +197,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat packages := generator.Packages{} header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) - header = append(header, []byte("\n// This file was autogenerated by conversion-gen. Do not edit it manually!\n\n")...) // Accumulate pre-existing conversion functions. // TODO: This is too ad-hoc. We need a better way. @@ -607,14 +610,34 @@ func (g *genConversion) Init(c *generator.Context, w io.Writer) error { } sw.Do("// RegisterConversions adds conversion functions to the given scheme.\n", nil) sw.Do("// Public to allow building arbitrary schemes.\n", nil) - sw.Do("func RegisterConversions(scheme $.|raw$) error {\n", schemePtr) - sw.Do("return scheme.AddGeneratedConversionFuncs(\n", nil) + sw.Do("func RegisterConversions(s $.|raw$) error {\n", schemePtr) for _, t := range g.types { peerType := getPeerTypeFor(c, t, g.peerPackages) - sw.Do(nameTmpl+",\n", argsFromType(t, peerType)) - sw.Do(nameTmpl+",\n", argsFromType(peerType, t)) + args := argsFromType(t, peerType).With("Scope", types.Ref(conversionPackagePath, "Scope")) + sw.Do("if err := s.AddGeneratedConversionFunc((*$.inType|raw$)(nil), (*$.outType|raw$)(nil), func(a, b interface{}, scope $.Scope|raw$) error { return "+nameTmpl+"(a.(*$.inType|raw$), b.(*$.outType|raw$), scope) }); err != nil { return err }\n", args) + args = argsFromType(peerType, t).With("Scope", types.Ref(conversionPackagePath, "Scope")) + sw.Do("if err := s.AddGeneratedConversionFunc((*$.inType|raw$)(nil), (*$.outType|raw$)(nil), func(a, b interface{}, scope $.Scope|raw$) error { return "+nameTmpl+"(a.(*$.inType|raw$), b.(*$.outType|raw$), scope) }); err != nil { return err }\n", args) + } + var pairs []conversionPair + for pair, t := range g.manualConversions { + if t.Name.Package != g.outputPackage { + continue + } + pairs = append(pairs, pair) } - sw.Do(")\n", nil) + // sort by name of the conversion function + sort.Slice(pairs, func(i, j int) bool { + if g.manualConversions[pairs[i]].Name.Name < g.manualConversions[pairs[j]].Name.Name { + return true + } + return false + }) + for _, pair := range pairs { + args := argsFromType(pair.inType, pair.outType).With("Scope", types.Ref(conversionPackagePath, "Scope")).With("fn", g.manualConversions[pair]) + sw.Do("if err := s.AddConversionFunc((*$.inType|raw$)(nil), (*$.outType|raw$)(nil), func(a, b interface{}, scope $.Scope|raw$) error { return $.fn|raw$(a.(*$.inType|raw$), b.(*$.outType|raw$), scope) }); err != nil { return err }\n", args) + } + + sw.Do("return nil\n", nil) sw.Do("}\n\n", nil) return sw.Error() } diff --git a/deps/k8s.io/code-generator/cmd/deepcopy-gen/BUILD b/deps/k8s.io/code-generator/cmd/deepcopy-gen/BUILD deleted file mode 100644 index ea92990c7..000000000 --- a/deps/k8s.io/code-generator/cmd/deepcopy-gen/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "deepcopy-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/deepcopy-gen", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/deepcopy-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/deepcopy-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/deepcopy-gen/generators:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/deepcopy-gen/args:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/deepcopy-gen/args/BUILD b/deps/k8s.io/code-generator/cmd/deepcopy-gen/args/BUILD deleted file mode 100644 index cf86fb776..000000000 --- a/deps/k8s.io/code-generator/cmd/deepcopy-gen/args/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["args.go"], - importpath = "k8s.io/code-generator/cmd/deepcopy-gen/args", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/deepcopy-gen/generators:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/cmd/defaulter-gen/BUILD b/deps/k8s.io/code-generator/cmd/defaulter-gen/BUILD deleted file mode 100644 index d1d29fe43..000000000 --- a/deps/k8s.io/code-generator/cmd/defaulter-gen/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "defaulter-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/defaulter-gen", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/defaulter-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/defaulter-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/defaulter-gen/generators:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/defaulter-gen/args:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/defaulter-gen/args/BUILD b/deps/k8s.io/code-generator/cmd/defaulter-gen/args/BUILD deleted file mode 100644 index 6f9bb87c5..000000000 --- a/deps/k8s.io/code-generator/cmd/defaulter-gen/args/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["args.go"], - importpath = "k8s.io/code-generator/cmd/defaulter-gen/args", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/defaulter-gen/generators:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/cmd/go-to-protobuf/BUILD b/deps/k8s.io/code-generator/cmd/go-to-protobuf/BUILD deleted file mode 100644 index 8c334b014..000000000 --- a/deps/k8s.io/code-generator/cmd/go-to-protobuf/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "go-to-protobuf", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/go-to-protobuf", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/go-to-protobuf", - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/go-to-protobuf/protobuf:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/BUILD b/deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/BUILD deleted file mode 100644 index be8608c8b..000000000 --- a/deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", - "go_test", -) - -go_library( - name = "go_default_library", - srcs = [ - "cmd.go", - "generator.go", - "import_tracker.go", - "namer.go", - "package.go", - "parser.go", - "tags.go", - ], - importpath = "k8s.io/code-generator/cmd/go-to-protobuf/protobuf", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/code-generator/third_party/forked/golang/reflect:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/parser:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) - -go_test( - name = "go_default_test", - srcs = ["namer_test.go"], - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/go-to-protobuf/protobuf", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go b/deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go index 423577a12..e3b21c670 100644 --- a/deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go +++ b/deps/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/namer.go @@ -116,7 +116,10 @@ func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global } return } - global[t.Name] = p + if t.Name.Package == p.PackagePath { + // Associate types only to their own package + global[t.Name] = p + } if _, ok := local[t.Name]; ok { return } diff --git a/deps/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/BUILD b/deps/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/BUILD deleted file mode 100644 index af0299b4a..000000000 --- a/deps/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "protoc-gen-gogo", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo", - deps = [ - "//vendor/github.com/gogo/protobuf/gogoproto:go_default_library", - "//vendor/github.com/gogo/protobuf/proto:go_default_library", - "//vendor/github.com/gogo/protobuf/sortkeys:go_default_library", - "//vendor/github.com/gogo/protobuf/vanity/command:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/import-boss/BUILD b/deps/k8s.io/code-generator/cmd/import-boss/BUILD deleted file mode 100644 index ea42fe21a..000000000 --- a/deps/k8s.io/code-generator/cmd/import-boss/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "import-boss", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/import-boss", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/import-boss", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/import-boss/generators:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/informer-gen/BUILD b/deps/k8s.io/code-generator/cmd/informer-gen/BUILD deleted file mode 100644 index 2211cdfda..000000000 --- a/deps/k8s.io/code-generator/cmd/informer-gen/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "informer-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/informer-gen", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/informer-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/informer-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/cmd/informer-gen/generators:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/informer-gen/args:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/informer-gen/generators:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/informer-gen/args/BUILD b/deps/k8s.io/code-generator/cmd/informer-gen/args/BUILD deleted file mode 100644 index e22338101..000000000 --- a/deps/k8s.io/code-generator/cmd/informer-gen/args/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["args.go"], - importpath = "k8s.io/code-generator/cmd/informer-gen/args", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/cmd/informer-gen/generators/BUILD b/deps/k8s.io/code-generator/cmd/informer-gen/generators/BUILD deleted file mode 100644 index 9c220b55a..000000000 --- a/deps/k8s.io/code-generator/cmd/informer-gen/generators/BUILD +++ /dev/null @@ -1,45 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "factory.go", - "factoryinterface.go", - "generic.go", - "groupinterface.go", - "informer.go", - "packages.go", - "tags.go", - "types.go", - "versioninterface.go", - ], - importpath = "k8s.io/code-generator/cmd/informer-gen/generators", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators/util:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/types:go_default_library", - "//vendor/k8s.io/code-generator/cmd/informer-gen/args:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/informer-gen/generators/factory.go b/deps/k8s.io/code-generator/cmd/informer-gen/generators/factory.go index 2a91aaa9e..5c557db73 100644 --- a/deps/k8s.io/code-generator/cmd/informer-gen/generators/factory.go +++ b/deps/k8s.io/code-generator/cmd/informer-gen/generators/factory.go @@ -89,6 +89,7 @@ func (g *factoryGenerator) GenerateType(c *generator.Context, t *types.Type, w i "syncMutex": c.Universe.Type(syncMutex), "timeDuration": c.Universe.Type(timeDuration), "namespaceAll": c.Universe.Type(metav1NamespaceAll), + "object": c.Universe.Type(metav1Object), } sw.Do(sharedInformerFactoryStruct, m) @@ -98,12 +99,16 @@ func (g *factoryGenerator) GenerateType(c *generator.Context, t *types.Type, w i } var sharedInformerFactoryStruct = ` +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client {{.clientSetInterface|raw}} namespace string tweakListOptions {{.interfacesTweakListOptionsFunc|raw}} lock {{.syncMutex|raw}} defaultResync {{.timeDuration|raw}} + customResync map[{{.reflectType|raw}}]{{.timeDuration|raw}} informers map[{{.reflectType|raw}}]{{.cacheSharedIndexInformer|raw}} // startedInformers is used for tracking which informers have been started. @@ -111,23 +116,62 @@ type sharedInformerFactory struct { startedInformers map[{{.reflectType|raw}}]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[{{.object|raw}}]{{.timeDuration|raw}}) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client {{.clientSetInterface|raw}}, defaultResync {{.timeDuration|raw}}) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, {{.namespaceAll|raw}}, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client {{.clientSetInterface|raw}}, defaultResync {{.timeDuration|raw}}, namespace string, tweakListOptions {{.interfacesTweakListOptionsFunc|raw}}) SharedInformerFactory { - return &sharedInformerFactory{ - client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, - defaultResync: defaultResync, - informers: make(map[{{.reflectType|raw}}]{{.cacheSharedIndexInformer|raw}}), - startedInformers: make(map[{{.reflectType|raw}}]bool), - } + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client {{.clientSetInterface|raw}}, defaultResync {{.timeDuration|raw}}, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ + client: client, + namespace: v1.NamespaceAll, + defaultResync: defaultResync, + informers: make(map[{{.reflectType|raw}}]{{.cacheSharedIndexInformer|raw}}), + startedInformers: make(map[{{.reflectType|raw}}]bool), + customResync: make(map[{{.reflectType|raw}}]{{.timeDuration|raw}}), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) + } + + return factory } // Start initializes all requested informers. @@ -176,7 +220,13 @@ func (f *sharedInformerFactory) InformerFor(obj {{.runtimeObject|raw}}, newFunc if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer diff --git a/deps/k8s.io/code-generator/cmd/informer-gen/generators/packages.go b/deps/k8s.io/code-generator/cmd/informer-gen/generators/packages.go index 2a6ef2eeb..2cc0372f8 100644 --- a/deps/k8s.io/code-generator/cmd/informer-gen/generators/packages.go +++ b/deps/k8s.io/code-generator/cmd/informer-gen/generators/packages.go @@ -62,12 +62,6 @@ func DefaultNameSystem() string { return "public" } -// generatedBy returns information about the arguments used to invoke -// lister-gen. -func generatedBy() string { - return fmt.Sprintf("\n// This file was automatically generated by informer-gen\n\n") -} - // objectMetaForPackage returns the type of ObjectMeta used by package p. func objectMetaForPackage(p *types.Package) (*types.Type, bool, error) { generatingForPackage := false @@ -111,8 +105,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat glog.Fatalf("Failed loading boilerplate: %v", err) } - boilerplate = append(boilerplate, []byte(generatedBy())...) - customArgs, ok := arguments.CustomArgs.(*informergenargs.CustomArgs) if !ok { glog.Fatalf("Wrong CustomArgs type: %T", arguments.CustomArgs) diff --git a/deps/k8s.io/code-generator/cmd/informer-gen/generators/types.go b/deps/k8s.io/code-generator/cmd/informer-gen/generators/types.go index ecefb078c..27d4bd51a 100644 --- a/deps/k8s.io/code-generator/cmd/informer-gen/generators/types.go +++ b/deps/k8s.io/code-generator/cmd/informer-gen/generators/types.go @@ -37,5 +37,6 @@ var ( timeDuration = types.Name{Package: "time", Name: "Duration"} v1ListOptions = types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ListOptions"} metav1NamespaceAll = types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "NamespaceAll"} + metav1Object = types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "Object"} watchInterface = types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"} ) diff --git a/deps/k8s.io/code-generator/cmd/lister-gen/BUILD b/deps/k8s.io/code-generator/cmd/lister-gen/BUILD deleted file mode 100644 index c39a4ef61..000000000 --- a/deps/k8s.io/code-generator/cmd/lister-gen/BUILD +++ /dev/null @@ -1,44 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "lister-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/lister-gen", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/lister-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/lister-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/cmd/lister-gen/generators:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/lister-gen/args:all-srcs", - "//staging/src/k8s.io/code-generator/cmd/lister-gen/generators:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/lister-gen/args/BUILD b/deps/k8s.io/code-generator/cmd/lister-gen/args/BUILD deleted file mode 100644 index 53c1eefde..000000000 --- a/deps/k8s.io/code-generator/cmd/lister-gen/args/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["args.go"], - importpath = "k8s.io/code-generator/cmd/lister-gen/args", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/cmd/lister-gen/generators/BUILD b/deps/k8s.io/code-generator/cmd/lister-gen/generators/BUILD deleted file mode 100644 index aabb98b64..000000000 --- a/deps/k8s.io/code-generator/cmd/lister-gen/generators/BUILD +++ /dev/null @@ -1,38 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = [ - "expansion.go", - "lister.go", - "tags.go", - ], - importpath = "k8s.io/code-generator/cmd/lister-gen/generators", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/generators/util:go_default_library", - "//vendor/k8s.io/code-generator/cmd/client-gen/types:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/generator:go_default_library", - "//vendor/k8s.io/gengo/namer:go_default_library", - "//vendor/k8s.io/gengo/types:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/deps/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index 3da8d2ddd..cde6e2f77 100644 --- a/deps/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/deps/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -62,12 +62,6 @@ func DefaultNameSystem() string { return "public" } -// generatedBy returns information about the arguments used to invoke -// lister-gen. -func generatedBy() string { - return fmt.Sprintf("\n// This file was automatically generated by lister-gen\n\n") -} - // Packages makes the client package definition. func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { boilerplate, err := arguments.LoadGoBoilerplate() @@ -75,8 +69,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat glog.Fatalf("Failed loading boilerplate: %v", err) } - boilerplate = append(boilerplate, []byte(generatedBy())...) - var packageList generator.Packages for _, inputDir := range arguments.InputDirs { p := context.Universe.Package(inputDir) diff --git a/deps/k8s.io/code-generator/cmd/openapi-gen/BUILD b/deps/k8s.io/code-generator/cmd/openapi-gen/BUILD deleted file mode 100644 index 339a2cab9..000000000 --- a/deps/k8s.io/code-generator/cmd/openapi-gen/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "openapi-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/openapi-gen", -) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/openapi-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/code-generator/cmd/openapi-gen/args:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/kube-openapi/pkg/generators:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [ - ":package-srcs", - "//staging/src/k8s.io/code-generator/cmd/openapi-gen/args:all-srcs", - ], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/cmd/openapi-gen/args/BUILD b/deps/k8s.io/code-generator/cmd/openapi-gen/args/BUILD deleted file mode 100644 index e1eb70ea7..000000000 --- a/deps/k8s.io/code-generator/cmd/openapi-gen/args/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["args.go"], - importpath = "k8s.io/code-generator/cmd/openapi-gen/args", - visibility = ["//visibility:public"], - deps = [ - "//vendor/github.com/spf13/pflag:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/cmd/register-gen/args/args.go b/deps/k8s.io/code-generator/cmd/register-gen/args/args.go new file mode 100644 index 000000000..2e3ab084e --- /dev/null +++ b/deps/k8s.io/code-generator/cmd/register-gen/args/args.go @@ -0,0 +1,39 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package args + +import ( + "fmt" + + "k8s.io/gengo/args" +) + +// NewDefaults returns default arguments for the generator. +func NewDefaults() *args.GeneratorArgs { + genericArgs := args.Default().WithoutDefaultFlagParsing() + genericArgs.OutputFileBaseName = "zz_generated.register" + return genericArgs +} + +// Validate checks the given arguments. +func Validate(genericArgs *args.GeneratorArgs) error { + if len(genericArgs.OutputFileBaseName) == 0 { + return fmt.Errorf("output file base name cannot be empty") + } + + return nil +} diff --git a/deps/k8s.io/code-generator/cmd/register-gen/generators/packages.go b/deps/k8s.io/code-generator/cmd/register-gen/generators/packages.go new file mode 100644 index 000000000..ca13ca857 --- /dev/null +++ b/deps/k8s.io/code-generator/cmd/register-gen/generators/packages.go @@ -0,0 +1,137 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "fmt" + "os" + "path" + "strings" + + "github.com/golang/glog" + + clientgentypes "k8s.io/code-generator/cmd/client-gen/types" + "k8s.io/gengo/args" + "k8s.io/gengo/generator" + "k8s.io/gengo/namer" + "k8s.io/gengo/types" +) + +// NameSystems returns the name system used by the generators in this package. +func NameSystems() namer.NameSystems { + return namer.NameSystems{} +} + +// DefaultNameSystem returns the default name system for ordering the types to be +// processed by the generators in this package. +func DefaultNameSystem() string { + return "public" +} + +// Packages makes packages to generate. +func Packages(context *generator.Context, arguments *args.GeneratorArgs) generator.Packages { + boilerplate, err := arguments.LoadGoBoilerplate() + if err != nil { + glog.Fatalf("Failed loading boilerplate: %v", err) + } + + packages := generator.Packages{} + for _, inputDir := range arguments.InputDirs { + pkg := context.Universe.Package(inputDir) + internal, err := isInternal(pkg) + if err != nil { + glog.V(5).Infof("skipping the generation of %s file, due to err %v", arguments.OutputFileBaseName, err) + continue + } + if internal { + glog.V(5).Infof("skipping the generation of %s file because %s package contains internal types, note that internal types don't have \"json\" tags", arguments.OutputFileBaseName, pkg.Name) + continue + } + registerFileName := "register.go" + searchPath := path.Join(args.DefaultSourceTree(), inputDir, registerFileName) + if _, err := os.Stat(path.Join(searchPath)); err == nil { + glog.V(5).Infof("skipping the generation of %s file because %s already exists in the path %s", arguments.OutputFileBaseName, registerFileName, searchPath) + continue + } else if err != nil && !os.IsNotExist(err) { + glog.Fatalf("an error %v has occurred while checking if %s exists", err, registerFileName) + } + + gv := clientgentypes.GroupVersion{} + { + pathParts := strings.Split(pkg.Path, "/") + if len(pathParts) < 2 { + glog.Errorf("the path of the package must contain the group name and the version, path = %s", pkg.Path) + continue + } + gv.Group = clientgentypes.Group(pathParts[len(pathParts)-2]) + gv.Version = clientgentypes.Version(pathParts[len(pathParts)-1]) + + // if there is a comment of the form "// +groupName=somegroup" or "// +groupName=somegroup.foo.bar.io", + // extract the fully qualified API group name from it and overwrite the group inferred from the package path + if override := types.ExtractCommentTags("+", pkg.DocComments)["groupName"]; override != nil { + groupName := override[0] + glog.V(5).Infof("overriding the group name with = %s", groupName) + gv.Group = clientgentypes.Group(groupName) + } + } + + typesToRegister := []*types.Type{} + for _, t := range pkg.Types { + glog.V(5).Infof("considering type = %s", t.Name.String()) + for _, typeMember := range t.Members { + if typeMember.Name == "TypeMeta" && typeMember.Embedded == true { + typesToRegister = append(typesToRegister, t) + } + } + } + + packages = append(packages, + &generator.DefaultPackage{ + PackageName: pkg.Name, + PackagePath: pkg.Path, + HeaderText: boilerplate, + GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { + return []generator.Generator{ + ®isterExternalGenerator{ + DefaultGen: generator.DefaultGen{ + OptionalName: arguments.OutputFileBaseName, + }, + gv: gv, + typesToGenerate: typesToRegister, + outputPackage: pkg.Path, + imports: generator.NewImportTracker(), + }, + } + }, + }) + } + + return packages +} + +// isInternal determines whether the given package +// contains the internal types or not +func isInternal(p *types.Package) (bool, error) { + for _, t := range p.Types { + for _, member := range t.Members { + if member.Name == "TypeMeta" { + return !strings.Contains(member.Tags, "json"), nil + } + } + } + return false, fmt.Errorf("unable to find TypeMeta for any types in package %s", p.Path) +} diff --git a/deps/k8s.io/code-generator/cmd/register-gen/generators/register_external.go b/deps/k8s.io/code-generator/cmd/register-gen/generators/register_external.go new file mode 100644 index 000000000..c831c575d --- /dev/null +++ b/deps/k8s.io/code-generator/cmd/register-gen/generators/register_external.go @@ -0,0 +1,117 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "io" + "sort" + + clientgentypes "k8s.io/code-generator/cmd/client-gen/types" + "k8s.io/gengo/generator" + "k8s.io/gengo/namer" + "k8s.io/gengo/types" +) + +type registerExternalGenerator struct { + generator.DefaultGen + outputPackage string + gv clientgentypes.GroupVersion + typesToGenerate []*types.Type + imports namer.ImportTracker +} + +var _ generator.Generator = ®isterExternalGenerator{} + +func (g *registerExternalGenerator) Filter(_ *generator.Context, _ *types.Type) bool { + return false +} + +func (g *registerExternalGenerator) Imports(c *generator.Context) (imports []string) { + return g.imports.ImportLines() +} + +func (g *registerExternalGenerator) Namers(_ *generator.Context) namer.NameSystems { + return namer.NameSystems{ + "raw": namer.NewRawNamer(g.outputPackage, g.imports), + } +} + +func (g *registerExternalGenerator) Finalize(context *generator.Context, w io.Writer) error { + typesToGenerateOnlyNames := make([]string, len(g.typesToGenerate)) + for index, typeToGenerate := range g.typesToGenerate { + typesToGenerateOnlyNames[index] = typeToGenerate.Name.Name + } + + // sort the list of types to register, so that the generator produces stable output + sort.Strings(typesToGenerateOnlyNames) + + sw := generator.NewSnippetWriter(w, context, "$", "$") + m := map[string]interface{}{ + "groupName": g.gv.Group, + "version": g.gv.Version, + "types": typesToGenerateOnlyNames, + "addToGroupVersion": context.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "AddToGroupVersion"}), + "groupVersion": context.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "GroupVersion"}), + } + sw.Do(registerExternalTypesTemplate, m) + return sw.Error() +} + +var registerExternalTypesTemplate = ` +// GroupName specifies the group name used to register the objects. +const GroupName = "$.groupName$" + +// GroupVersion specifies the group and the version used to register the objects. +var GroupVersion = $.groupVersion|raw${Group: GroupName, Version: "$.version$"} + +// SchemeGroupVersion is group version used to register these objects +// Deprecated: use GroupVersion instead. +var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "$.version$"} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +var ( + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + // Depreciated: use Install instead + AddToScheme = localSchemeBuilder.AddToScheme + Install = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes) +} + +// Adds the list of known types to Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + $range .types -$ + &$.${}, + $end$ + ) + // AddToGroupVersion allows the serialization of client types like ListOptions. + $.addToGroupVersion|raw$(scheme, SchemeGroupVersion) + return nil +} +` diff --git a/deps/k8s.io/code-generator/cmd/register-gen/main.go b/deps/k8s.io/code-generator/cmd/register-gen/main.go new file mode 100644 index 000000000..db02a4af4 --- /dev/null +++ b/deps/k8s.io/code-generator/cmd/register-gen/main.go @@ -0,0 +1,52 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "flag" + "path/filepath" + + "github.com/golang/glog" + "github.com/spf13/pflag" + + generatorargs "k8s.io/code-generator/cmd/register-gen/args" + "k8s.io/code-generator/cmd/register-gen/generators" + "k8s.io/code-generator/pkg/util" + "k8s.io/gengo/args" +) + +func main() { + genericArgs := generatorargs.NewDefaults() + genericArgs.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), util.BoilerplatePath()) + genericArgs.AddFlags(pflag.CommandLine) + flag.Set("logtostderr", "true") + pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + + pflag.Parse() + if err := generatorargs.Validate(genericArgs); err != nil { + glog.Fatalf("Error: %v", err) + } + + if err := genericArgs.Execute( + generators.NameSystems(), + generators.DefaultNameSystem(), + generators.Packages, + ); err != nil { + glog.Fatalf("Error: %v", err) + } + glog.V(2).Info("Completed successfully.") +} diff --git a/deps/k8s.io/code-generator/cmd/set-gen/BUILD b/deps/k8s.io/code-generator/cmd/set-gen/BUILD deleted file mode 100644 index b7eb08352..000000000 --- a/deps/k8s.io/code-generator/cmd/set-gen/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_binary", - "go_library", -) - -go_binary( - name = "set-gen", - embed = [":go_default_library"], - importpath = "k8s.io/code-generator/cmd/set-gen", -) - -exports_files([ - "types.go", -]) - -go_library( - name = "go_default_library", - srcs = ["main.go"], - importpath = "k8s.io/code-generator/cmd/set-gen", - deps = [ - "//vendor/github.com/golang/glog:go_default_library", - "//vendor/k8s.io/code-generator/pkg/util:go_default_library", - "//vendor/k8s.io/gengo/args:go_default_library", - "//vendor/k8s.io/gengo/examples/set-gen/generators:go_default_library", - ], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/code-generator/generate-groups.sh b/deps/k8s.io/code-generator/generate-groups.sh index b92296d96..d7ad5b2e0 100755 --- a/deps/k8s.io/code-generator/generate-groups.sh +++ b/deps/k8s.io/code-generator/generate-groups.sh @@ -46,7 +46,13 @@ APIS_PKG="$3" GROUPS_WITH_VERSIONS="$4" shift 4 -go install ./$(dirname "${0}")/cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen} +( + # To support running this script from anywhere, we have to first cd into this directory + # so we can install the tools. + cd $(dirname "${0}") + go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen} +) + function codegen::join() { local IFS="$1"; shift; echo "$*"; } # enumerate group versions @@ -67,7 +73,7 @@ fi if [ "${GENS}" = "all" ] || grep -qw "client" <<<"${GENS}"; then echo "Generating clientset for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/clientset" - ${GOPATH}/bin/client-gen --clientset-name versioned --input-base "" --input $(codegen::join , "${FQ_APIS[@]}") --output-package ${OUTPUT_PKG}/clientset "$@" + ${GOPATH}/bin/client-gen --clientset-name ${CLIENTSET_NAME_VERSIONED:-versioned} --input-base "" --input $(codegen::join , "${FQ_APIS[@]}") --output-package ${OUTPUT_PKG}/clientset "$@" fi if [ "${GENS}" = "all" ] || grep -qw "lister" <<<"${GENS}"; then @@ -79,7 +85,7 @@ if [ "${GENS}" = "all" ] || grep -qw "informer" <<<"${GENS}"; then echo "Generating informers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/informers" ${GOPATH}/bin/informer-gen \ --input-dirs $(codegen::join , "${FQ_APIS[@]}") \ - --versioned-clientset-package ${OUTPUT_PKG}/clientset/versioned \ + --versioned-clientset-package ${OUTPUT_PKG}/clientset/${CLIENTSET_NAME_VERSIONED:-versioned} \ --listers-package ${OUTPUT_PKG}/listers \ --output-package ${OUTPUT_PKG}/informers \ "$@" diff --git a/deps/k8s.io/code-generator/generate-internal-groups.sh b/deps/k8s.io/code-generator/generate-internal-groups.sh index 0de606d39..1220e77c5 100755 --- a/deps/k8s.io/code-generator/generate-internal-groups.sh +++ b/deps/k8s.io/code-generator/generate-internal-groups.sh @@ -87,9 +87,9 @@ fi if [ "${GENS}" = "all" ] || grep -qw "client" <<<"${GENS}"; then echo "Generating clientset for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/clientset" if [ -n "${INT_APIS_PKG}" ]; then - ${GOPATH}/bin/client-gen --clientset-name internalversion --input-base "" --input $(codegen::join , $(printf '%s/ ' "${INT_FQ_APIS[@]}")) --output-package ${OUTPUT_PKG}/clientset "$@" + ${GOPATH}/bin/client-gen --clientset-name ${CLIENTSET_NAME_INTERNAL:-internalversion} --input-base "" --input $(codegen::join , $(printf '%s/ ' "${INT_FQ_APIS[@]}")) --output-package ${OUTPUT_PKG}/clientset "$@" fi - ${GOPATH}/bin/client-gen --clientset-name versioned --input-base "" --input $(codegen::join , "${EXT_FQ_APIS[@]}") --output-package ${OUTPUT_PKG}/clientset "$@" + ${GOPATH}/bin/client-gen --clientset-name ${CLIENTSET_NAME_VERSIONED:-versioned} --input-base "" --input $(codegen::join , "${EXT_FQ_APIS[@]}") --output-package ${OUTPUT_PKG}/clientset "$@" fi if [ "${GENS}" = "all" ] || grep -qw "lister" <<<"${GENS}"; then @@ -101,8 +101,8 @@ if [ "${GENS}" = "all" ] || grep -qw "informer" <<<"${GENS}"; then echo "Generating informers for ${GROUPS_WITH_VERSIONS} at ${OUTPUT_PKG}/informers" ${GOPATH}/bin/informer-gen \ --input-dirs $(codegen::join , "${ALL_FQ_APIS[@]}") \ - --versioned-clientset-package ${OUTPUT_PKG}/clientset/versioned \ - --internal-clientset-package ${OUTPUT_PKG}/clientset/internalversion \ + --versioned-clientset-package ${OUTPUT_PKG}/clientset/${CLIENTSET_NAME_VERSIONED:-versioned} \ + --internal-clientset-package ${OUTPUT_PKG}/clientset/${CLIENTSET_NAME_INTERNAL:-internalversion} \ --listers-package ${OUTPUT_PKG}/listers \ --output-package ${OUTPUT_PKG}/informers \ "$@" diff --git a/deps/k8s.io/code-generator/hack/BUILD b/deps/k8s.io/code-generator/hack/BUILD deleted file mode 100644 index bf12794f6..000000000 --- a/deps/k8s.io/code-generator/hack/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -exports_files( - glob(["*.txt"]), - visibility = ["//visibility:public"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:public"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/hack/boilerplate.go.txt b/deps/k8s.io/code-generator/hack/boilerplate.go.txt index 59e740c1e..b7c650da4 100644 --- a/deps/k8s.io/code-generator/hack/boilerplate.go.txt +++ b/deps/k8s.io/code-generator/hack/boilerplate.go.txt @@ -1,5 +1,5 @@ /* -Copyright YEAR The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/deps/k8s.io/code-generator/hack/update-codegen.sh b/deps/k8s.io/code-generator/hack/update-codegen.sh index e38a0d92c..767c2ab36 100755 --- a/deps/k8s.io/code-generator/hack/update-codegen.sh +++ b/deps/k8s.io/code-generator/hack/update-codegen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # diff --git a/deps/k8s.io/code-generator/hack/verify-codegen.sh b/deps/k8s.io/code-generator/hack/verify-codegen.sh index 601a76962..25302228d 100755 --- a/deps/k8s.io/code-generator/hack/verify-codegen.sh +++ b/deps/k8s.io/code-generator/hack/verify-codegen.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Kubernetes Authors. # diff --git a/deps/k8s.io/code-generator/pkg/util/BUILD b/deps/k8s.io/code-generator/pkg/util/BUILD deleted file mode 100644 index 4b6ea978c..000000000 --- a/deps/k8s.io/code-generator/pkg/util/BUILD +++ /dev/null @@ -1,22 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library") - -go_library( - name = "go_default_library", - srcs = ["build.go"], - importpath = "k8s.io/code-generator/pkg/util", - visibility = ["//visibility:public"], -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], - visibility = ["//visibility:public"], -) diff --git a/deps/k8s.io/code-generator/third_party/forked/golang/reflect/BUILD b/deps/k8s.io/code-generator/third_party/forked/golang/reflect/BUILD deleted file mode 100644 index cc2f10c36..000000000 --- a/deps/k8s.io/code-generator/third_party/forked/golang/reflect/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -load( - "@io_bazel_rules_go//go:def.bzl", - "go_library", -) - -go_library( - name = "go_default_library", - srcs = ["type.go"], - importpath = "k8s.io/code-generator/third_party/forked/golang/reflect", -) - -filegroup( - name = "package-srcs", - srcs = glob(["**"]), - tags = ["automanaged"], - visibility = ["//visibility:private"], -) - -filegroup( - name = "all-srcs", - srcs = [":package-srcs"], - tags = ["automanaged"], -) diff --git a/deps/k8s.io/gengo/.travis.yml b/deps/k8s.io/gengo/.travis.yml index c9cb1e608..a0d74599a 100644 --- a/deps/k8s.io/gengo/.travis.yml +++ b/deps/k8s.io/gengo/.travis.yml @@ -1,16 +1,16 @@ language: go go: - - 1.8 + - "1.10" - tip - + go_import_path: k8s.io/gengo jobs: include: - stage: Run tests - script: - - find . -name Makefile | xargs -n1 dirname | while read DIR; do make -C $DIR test; done + script: + - find . -name vendor -prune -o -name Makefile -execdir make test \; - go test -v ./... - stage: Verify examples - script: + script: - go run ./examples/import-boss/main.go -i k8s.io/gengo/... --verify-only diff --git a/deps/k8s.io/gengo/CONTRIBUTING.md b/deps/k8s.io/gengo/CONTRIBUTING.md new file mode 100644 index 000000000..ef37eb0b6 --- /dev/null +++ b/deps/k8s.io/gengo/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing + +Thanks for taking the time to join our community and start contributing! + +The [Contributor Guide](https://github.com/kubernetes/community/blob/master/contributors/guide/README.md) +provides detailed instructions on how to get your ideas and bug fixes seen and accepted. + +Please remember to sign the [CNCF CLA](https://github.com/kubernetes/community/blob/master/CLA.md) and +read and observe the [Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/deps/k8s.io/gengo/OWNERS b/deps/k8s.io/gengo/OWNERS index 12683dde3..756e9b6df 100644 --- a/deps/k8s.io/gengo/OWNERS +++ b/deps/k8s.io/gengo/OWNERS @@ -1,3 +1,4 @@ approvers: - lavalamp - wojtek-t + - sttts diff --git a/deps/k8s.io/gengo/README.md b/deps/k8s.io/gengo/README.md index 8b7f6cc10..eb71990e8 100644 --- a/deps/k8s.io/gengo/README.md +++ b/deps/k8s.io/gengo/README.md @@ -51,3 +51,6 @@ Package namer defines a naming system, for: * and defining parallel tracks of names, for making public interfaces and private implementations. +## Contributing + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute. diff --git a/deps/k8s.io/gengo/SECURITY_CONTACTS b/deps/k8s.io/gengo/SECURITY_CONTACTS new file mode 100644 index 000000000..3895fb792 --- /dev/null +++ b/deps/k8s.io/gengo/SECURITY_CONTACTS @@ -0,0 +1,15 @@ +# Defined below are the security contacts for this repo. +# +# They are the contact point for the Product Security Team to reach out +# to for triaging and handling of incoming issues. +# +# The below names agree to abide by the +# [Embargo Policy](https://github.com/kubernetes/sig-release/blob/master/security-release-process-documentation/security-release-process.md#embargo-policy) +# and will be removed and replaced if they violate that agreement. +# +# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE +# INSTRUCTIONS AT https://kubernetes.io/security/ + +lavalamp +wojtek-t +sttts diff --git a/deps/k8s.io/gengo/args/args.go b/deps/k8s.io/gengo/args/args.go index ad9a83480..2f8680d1e 100644 --- a/deps/k8s.io/gengo/args/args.go +++ b/deps/k8s.io/gengo/args/args.go @@ -23,6 +23,7 @@ import ( "fmt" "io/ioutil" "os" + "path" "path/filepath" "strconv" "strings" @@ -40,10 +41,11 @@ import ( // before calling AddFlags. func Default() *GeneratorArgs { return &GeneratorArgs{ - OutputBase: DefaultSourceTree(), - GoHeaderFilePath: filepath.Join(DefaultSourceTree(), "k8s.io/gengo/boilerplate/boilerplate.go.txt"), - GeneratedBuildTag: "ignore_autogenerated", - defaultCommandLineFlags: true, + OutputBase: DefaultSourceTree(), + GoHeaderFilePath: filepath.Join(DefaultSourceTree(), "k8s.io/gengo/boilerplate/boilerplate.go.txt"), + GeneratedBuildTag: "ignore_autogenerated", + GeneratedByCommentTemplate: "// Code generated by GENERATOR_NAME. DO NOT EDIT.", + defaultCommandLineFlags: true, } } @@ -64,6 +66,11 @@ type GeneratorArgs struct { // Where to get copyright header text. GoHeaderFilePath string + // If GeneratedByCommentTemplate is set, generate a "Code generated by" comment + // below the bloilerplate, of the format defined by this string. + // Any instances of "GENERATOR_NAME" will be replaced with the name of the code generator. + GeneratedByCommentTemplate string + // If true, only verify, don't write anything. VerifyOnly bool @@ -103,6 +110,16 @@ func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) { return nil, err } b = bytes.Replace(b, []byte("YEAR"), []byte(strconv.Itoa(time.Now().Year())), -1) + + if g.GeneratedByCommentTemplate != "" { + if len(b) != 0 { + b = append(b, byte('\n')) + } + generatorName := path.Base(os.Args[0]) + generatedByComment := strings.Replace(g.GeneratedByCommentTemplate, "GENERATOR_NAME", generatorName, -1) + s := fmt.Sprintf("%s\n\n", generatedByComment) + b = append(b, []byte(s)...) + } return b, nil } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go b/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go index b650ce886..dec7dcaf7 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy.go @@ -129,10 +129,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat inputs := sets.NewString(context.Inputs...) packages := generator.Packages{} header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) - header = append(header, []byte(` - // This file was autogenerated by deepcopy-gen. Do not edit it manually! - - `)...) boundingDirs := []string{} if customArgs, ok := arguments.CustomArgs.(*CustomArgs); ok { @@ -286,27 +282,99 @@ func (g *genDeepCopy) copyableAndInBounds(t *types.Type) bool { return true } -// hasDeepCopyMethod returns true if an appropriate DeepCopy() method is -// defined for the given type. This allows more efficient deep copy +// deepCopyMethod returns the signature of a DeepCopy() method, nil or an error +// if the type does not match. This allows more efficient deep copy // implementations to be defined by the type's author. The correct signature // for a type T is: // func (t T) DeepCopy() T // or: -// func (t *T) DeepCopy() T -func hasDeepCopyMethod(t *types.Type) bool { - for mn, mt := range t.Methods { - if mn != "DeepCopy" { - continue - } - if len(mt.Signature.Parameters) != 0 { - return false - } - if len(mt.Signature.Results) != 1 || mt.Signature.Results[0].Name != t.Name { - return false - } - return true +// func (t *T) DeepCopy() *T +func deepCopyMethod(t *types.Type) (*types.Signature, error) { + f, found := t.Methods["DeepCopy"] + if !found { + return nil, nil } - return false + if len(f.Signature.Parameters) != 0 { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected no parameters", t) + } + if len(f.Signature.Results) != 1 { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected exactly one result", t) + } + + ptrResult := f.Signature.Results[0].Kind == types.Pointer && f.Signature.Results[0].Elem.Name == t.Name + nonPtrResult := f.Signature.Results[0].Name == t.Name + + if !ptrResult && !nonPtrResult { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected to return %s or *%s", t, t.Name.Name, t.Name.Name) + } + + ptrRcvr := f.Signature.Receiver != nil && f.Signature.Receiver.Kind == types.Pointer && f.Signature.Receiver.Elem.Name == t.Name + nonPtrRcvr := f.Signature.Receiver != nil && f.Signature.Receiver.Name == t.Name + + if ptrRcvr && !ptrResult { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected a *%s result for a *%s receiver", t, t.Name.Name, t.Name.Name) + } + if nonPtrRcvr && !nonPtrResult { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected a %s result for a %s receiver", t, t.Name.Name, t.Name.Name) + } + + return f.Signature, nil +} + +// deepCopyMethodOrDie returns the signatrue of a DeepCopy method, nil or calls glog.Fatalf +// if the type does not match. +func deepCopyMethodOrDie(t *types.Type) *types.Signature { + ret, err := deepCopyMethod(t) + if err != nil { + glog.Fatal(err) + } + return ret +} + +// deepCopyIntoMethod returns the signature of a DeepCopyInto() method, nil or an error +// if the type is wrong. DeepCopyInto allows more efficient deep copy +// implementations to be defined by the type's author. The correct signature +// for a type T is: +// func (t T) DeepCopyInto(t *T) +// or: +// func (t *T) DeepCopyInto(t *T) +func deepCopyIntoMethod(t *types.Type) (*types.Signature, error) { + f, found := t.Methods["DeepCopyInto"] + if !found { + return nil, nil + } + if len(f.Signature.Parameters) != 1 { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected exactly one parameter", t) + } + if len(f.Signature.Results) != 0 { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected no result type", t) + } + + ptrParam := f.Signature.Parameters[0].Kind == types.Pointer && f.Signature.Parameters[0].Elem.Name == t.Name + + if !ptrParam { + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected parameter of type *%s", t, t.Name.Name) + } + + ptrRcvr := f.Signature.Receiver != nil && f.Signature.Receiver.Kind == types.Pointer && f.Signature.Receiver.Elem.Name == t.Name + nonPtrRcvr := f.Signature.Receiver != nil && f.Signature.Receiver.Name == t.Name + + if !ptrRcvr && !nonPtrRcvr { + // this should never happen + return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected a receiver of type %s or *%s", t, t.Name.Name, t.Name.Name) + } + + return f.Signature, nil +} + +// deepCopyIntoMethodOrDie returns the signature of a DeepCopyInto() method, nil or calls glog.Fatalf +// if the type is wrong. +func deepCopyIntoMethodOrDie(t *types.Type) *types.Signature { + ret, err := deepCopyIntoMethod(t) + if err != nil { + glog.Fatal(err) + } + return ret } func isRootedUnder(pkg string, roots []string) bool { @@ -327,17 +395,36 @@ func copyableType(t *types.Type) bool { if ttag != nil && ttag.value == "false" { return false } - // TODO: Consider generating functions for other kinds too. - if t.Kind != types.Struct { + + // Filter out private types. + if namer.IsPrivateGoName(t.Name.Name) { return false } - // Also, filter out private types. - if namer.IsPrivateGoName(t.Name.Name) { + + if t.Kind == types.Alias { + // if the underlying built-in is not deepcopy-able, deepcopy is opt-in through definition of custom methods. + // Note that aliases of builtins, maps, slices can have deepcopy methods. + if deepCopyMethodOrDie(t) != nil || deepCopyIntoMethodOrDie(t) != nil { + return true + } else { + return t.Underlying.Kind != types.Builtin || copyableType(t.Underlying) + } + } + + if t.Kind != types.Struct { return false } + return true } +func underlyingType(t *types.Type) *types.Type { + for t.Kind == types.Alias { + t = t.Underlying + } + return t +} + func (g *genDeepCopy) isOtherPackage(pkg string) bool { if pkg == g.targetPackage { return false @@ -426,7 +513,7 @@ func extractNonPointerInterfaces(comments []string) (bool, error) { return result, nil } -func (g *genDeepCopy) deepCopyableInterfaces(c *generator.Context, t *types.Type) ([]*types.Type, error) { +func (g *genDeepCopy) deepCopyableInterfacesInner(c *generator.Context, t *types.Type) ([]*types.Type, error) { if t.Kind != types.Struct { return nil, nil } @@ -451,9 +538,9 @@ func (g *genDeepCopy) deepCopyableInterfaces(c *generator.Context, t *types.Type return ts, nil } -// DeepCopyableInterfaces returns the interface types to implement and whether they apply to a non-pointer receiver. -func (g *genDeepCopy) DeepCopyableInterfaces(c *generator.Context, t *types.Type) ([]*types.Type, bool, error) { - ts, err := g.deepCopyableInterfaces(c, t) +// deepCopyableInterfaces returns the interface types to implement and whether they apply to a non-pointer receiver. +func (g *genDeepCopy) deepCopyableInterfaces(c *generator.Context, t *types.Type) ([]*types.Type, bool, error) { + ts, err := g.deepCopyableInterfacesInner(c, t) if err != nil { return nil, false, err } @@ -494,12 +581,15 @@ func (g *genDeepCopy) GenerateType(c *generator.Context, t *types.Type, w io.Wri sw := generator.NewSnippetWriter(w, c, "$", "$") args := argsFromType(t) - _, foundDeepCopyInto := t.Methods["DeepCopyInto"] - _, foundDeepCopy := t.Methods["DeepCopy"] - if !foundDeepCopyInto { + if deepCopyIntoMethodOrDie(t) == nil { sw.Do("// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n", args) - sw.Do("func (in *$.type|raw$) DeepCopyInto(out *$.type|raw$) {\n", args) - if foundDeepCopy { + if isReference(t) { + sw.Do("func (in $.type|raw$) DeepCopyInto(out *$.type|raw$) {\n", args) + sw.Do("{in:=&in\n", nil) + } else { + sw.Do("func (in *$.type|raw$) DeepCopyInto(out *$.type|raw$) {\n", args) + } + if deepCopyMethodOrDie(t) != nil { if t.Methods["DeepCopy"].Signature.Receiver.Kind == types.Pointer { sw.Do("clone := in.DeepCopy()\n", nil) sw.Do("*out = *clone\n", nil) @@ -511,20 +601,31 @@ func (g *genDeepCopy) GenerateType(c *generator.Context, t *types.Type, w io.Wri g.generateFor(t, sw) sw.Do("return\n", nil) } + if isReference(t) { + sw.Do("}\n", nil) + } sw.Do("}\n\n", nil) } - if !foundDeepCopy { + if deepCopyMethodOrDie(t) == nil { sw.Do("// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new $.type|raw$.\n", args) - sw.Do("func (in *$.type|raw$) DeepCopy() *$.type|raw$ {\n", args) + if isReference(t) { + sw.Do("func (in $.type|raw$) DeepCopy() $.type|raw$ {\n", args) + } else { + sw.Do("func (in *$.type|raw$) DeepCopy() *$.type|raw$ {\n", args) + } sw.Do("if in == nil { return nil }\n", nil) sw.Do("out := new($.type|raw$)\n", args) sw.Do("in.DeepCopyInto(out)\n", nil) - sw.Do("return out\n", nil) + if isReference(t) { + sw.Do("return *out\n", nil) + } else { + sw.Do("return out\n", nil) + } sw.Do("}\n\n", nil) } - intfs, nonPointerReceiver, err := g.DeepCopyableInterfaces(c, t) + intfs, nonPointerReceiver, err := g.deepCopyableInterfaces(c, t) if err != nil { return err } @@ -547,12 +648,24 @@ func (g *genDeepCopy) GenerateType(c *generator.Context, t *types.Type, w io.Wri return sw.Error() } +// isReference return true for pointer, maps, slices and aliases of those. +func isReference(t *types.Type) bool { + if t.Kind == types.Pointer || t.Kind == types.Map || t.Kind == types.Slice { + return true + } + return t.Kind == types.Alias && isReference(underlyingType(t)) +} + // we use the system of shadowing 'in' and 'out' so that the same code is valid // at any nesting level. This makes the autogenerator easy to understand, and // the compiler shouldn't care. func (g *genDeepCopy) generateFor(t *types.Type, sw *generator.SnippetWriter) { + // derive inner types if t is an alias. We call the do* methods below with the alias type. + // basic rule: generate according to inner type, but construct objects with the alias type. + ut := underlyingType(t) + var f func(*types.Type, *generator.SnippetWriter) - switch t.Kind { + switch ut.Kind { case types.Builtin: f = g.doBuiltin case types.Map: @@ -561,120 +674,139 @@ func (g *genDeepCopy) generateFor(t *types.Type, sw *generator.SnippetWriter) { f = g.doSlice case types.Struct: f = g.doStruct - case types.Interface: - f = g.doInterface case types.Pointer: f = g.doPointer + case types.Interface: + // interfaces are handled in-line in the other cases + glog.Fatalf("Hit an interface type %v. This should never happen.", t) case types.Alias: - f = g.doAlias + // can never happen because we branch on the underlying type which is never an alias + glog.Fatalf("Hit an alias type %v. This should never happen.", t) default: - f = g.doUnknown + glog.Fatalf("Hit an unsupported type %v.", t) } f(t, sw) } +// doBuiltin generates code for a builtin or an alias to a builtin. The generated code is +// is the same for both cases, i.e. it's the code for the underlying type. func (g *genDeepCopy) doBuiltin(t *types.Type, sw *generator.SnippetWriter) { + if deepCopyMethodOrDie(t) != nil || deepCopyIntoMethodOrDie(t) != nil { + sw.Do("*out = in.DeepCopy()\n", nil) + return + } + sw.Do("*out = *in\n", nil) } +// doMap generates code for a map or an alias to a map. The generated code is +// is the same for both cases, i.e. it's the code for the underlying type. func (g *genDeepCopy) doMap(t *types.Type, sw *generator.SnippetWriter) { + ut := underlyingType(t) + uet := underlyingType(ut.Elem) + + if deepCopyMethodOrDie(t) != nil || deepCopyIntoMethodOrDie(t) != nil { + sw.Do("*out = in.DeepCopy()\n", nil) + return + } + + if !ut.Key.IsAssignable() { + glog.Fatalf("Hit an unsupported type %v.", uet) + } + sw.Do("*out = make($.|raw$, len(*in))\n", t) - if t.Key.IsAssignable() { - switch { - case hasDeepCopyMethod(t.Elem): - sw.Do("for key, val := range *in {\n", nil) + sw.Do("for key, val := range *in {\n", nil) + dc, dci := deepCopyMethodOrDie(ut.Elem), deepCopyIntoMethodOrDie(ut.Elem) + switch { + case dc != nil || dci != nil: + // Note: a DeepCopy exists because it is added if DeepCopyInto is manually defined + leftPointer := ut.Elem.Kind == types.Pointer + rightPointer := !isReference(ut.Elem) + if dc != nil { + rightPointer = dc.Results[0].Kind == types.Pointer + } + if leftPointer == rightPointer { sw.Do("(*out)[key] = val.DeepCopy()\n", nil) - sw.Do("}\n", nil) - case t.Elem.IsAnonymousStruct(): - sw.Do("for key := range *in {\n", nil) - sw.Do("(*out)[key] = struct{}{}\n", nil) - sw.Do("}\n", nil) - case t.Elem.IsAssignable(): - sw.Do("for key, val := range *in {\n", nil) - sw.Do("(*out)[key] = val\n", nil) - sw.Do("}\n", nil) - case t.Elem.Kind == types.Interface: - sw.Do("for key, val := range *in {\n", nil) - sw.Do("if val == nil {(*out)[key]=nil} else {\n", nil) - sw.Do(fmt.Sprintf("(*out)[key] = val.DeepCopy%s()\n", t.Elem.Name.Name), t) - sw.Do("}}\n", nil) - default: - sw.Do("for key, val := range *in {\n", nil) - if g.copyableAndInBounds(t.Elem) { - sw.Do("newVal := new($.|raw$)\n", t.Elem) - sw.Do("val.DeepCopyInto(newVal)\n", nil) - sw.Do("(*out)[key] = *newVal\n", nil) - } else if t.Elem.Kind == types.Slice && t.Elem.Elem.Kind == types.Builtin { - sw.Do("if val==nil { (*out)[key]=nil } else {\n", nil) - sw.Do("(*out)[key] = make($.|raw$, len(val))\n", t.Elem) - sw.Do("copy((*out)[key], val)\n", nil) - sw.Do("}\n", nil) - } else if t.Elem.Kind == types.Alias && t.Elem.Underlying.Kind == types.Slice && t.Elem.Underlying.Elem.Kind == types.Builtin { - sw.Do("(*out)[key] = make($.|raw$, len(val))\n", t.Elem) - sw.Do("copy((*out)[key], val)\n", nil) - } else if t.Elem.Kind == types.Pointer { - sw.Do("if val==nil { (*out)[key]=nil } else {\n", nil) - sw.Do("(*out)[key] = new($.Elem|raw$)\n", t.Elem) - sw.Do("val.DeepCopyInto((*out)[key])\n", nil) - sw.Do("}\n", nil) - } else { - sw.Do("(*out)[key] = *val.DeepCopy()\n", t.Elem) - } - sw.Do("}\n", nil) + } else if leftPointer { + sw.Do("x := val.DeepCopy()\n", nil) + sw.Do("(*out)[key] = &x\n", nil) + } else { + sw.Do("(*out)[key] = *val.DeepCopy()\n", nil) } - } else { - // TODO: Implement it when necessary. - sw.Do("for range *in {\n", nil) - sw.Do("// FIXME: Copying unassignable keys unsupported $.|raw$\n", t.Key) + case ut.Elem.IsAnonymousStruct(): // not uet here because it needs type cast + sw.Do("(*out)[key] = val\n", nil) + case uet.IsAssignable(): + sw.Do("(*out)[key] = val\n", nil) + case uet.Kind == types.Interface: + sw.Do("if val == nil {(*out)[key]=nil} else {\n", nil) + // Note: if t.Elem has been an alias "J" of an interface "I" in Go, we will see it + // as kind Interface of name "J" here, i.e. generate val.DeepCopyJ(). The golang + // parser does not give us the underlying interface name. So we cannot do any better. + sw.Do(fmt.Sprintf("(*out)[key] = val.DeepCopy%s()\n", uet.Name.Name), nil) + sw.Do("}\n", nil) + case uet.Kind == types.Slice || uet.Kind == types.Map || uet.Kind == types.Pointer: + sw.Do("var outVal $.|raw$\n", uet) + sw.Do("if val == nil { (*out)[key] = nil } else {\n", nil) + sw.Do("in, out := &val, &outVal\n", uet) + g.generateFor(ut.Elem, sw) sw.Do("}\n", nil) + sw.Do("(*out)[key] = outVal\n", nil) + case uet.Kind == types.Struct: + sw.Do("(*out)[key] = *val.DeepCopy()\n", uet) + default: + glog.Fatalf("Hit an unsupported type %v.", uet) } + sw.Do("}\n", nil) } +// doSlice generates code for a slice or an alias to a slice. The generated code is +// is the same for both cases, i.e. it's the code for the underlying type. func (g *genDeepCopy) doSlice(t *types.Type, sw *generator.SnippetWriter) { - if hasDeepCopyMethod(t) { + ut := underlyingType(t) + uet := underlyingType(ut.Elem) + + if deepCopyMethodOrDie(t) != nil || deepCopyIntoMethodOrDie(t) != nil { sw.Do("*out = in.DeepCopy()\n", nil) return } sw.Do("*out = make($.|raw$, len(*in))\n", t) - if hasDeepCopyMethod(t.Elem) { + if deepCopyMethodOrDie(ut.Elem) != nil || deepCopyIntoMethodOrDie(ut.Elem) != nil { sw.Do("for i := range *in {\n", nil) - sw.Do("(*out)[i] = (*in)[i].DeepCopy()\n", nil) + // Note: a DeepCopyInto exists because it is added if DeepCopy is manually defined + sw.Do("(*in)[i].DeepCopyInto(&(*out)[i])\n", nil) sw.Do("}\n", nil) - } else if t.Elem.Kind == types.Builtin || t.Elem.IsAssignable() { + } else if uet.Kind == types.Builtin || uet.IsAssignable() { sw.Do("copy(*out, *in)\n", nil) } else { sw.Do("for i := range *in {\n", nil) - if t.Elem.Kind == types.Slice { + if uet.Kind == types.Slice || uet.Kind == types.Map || uet.Kind == types.Pointer || deepCopyMethodOrDie(ut.Elem) != nil || deepCopyIntoMethodOrDie(ut.Elem) != nil { sw.Do("if (*in)[i] != nil {\n", nil) sw.Do("in, out := &(*in)[i], &(*out)[i]\n", nil) - g.generateFor(t.Elem, sw) + g.generateFor(ut.Elem, sw) sw.Do("}\n", nil) - } else if hasDeepCopyMethod(t.Elem) { - sw.Do("(*out)[i] = (*in)[i].DeepCopy()\n", nil) - // REVISIT(sttts): the following is removed in master - //} else if t.Elem.IsAssignable() { - // sw.Do("(*out)[i] = (*in)[i]\n", nil) - } else if t.Elem.Kind == types.Interface { - sw.Do("if (*in)[i] == nil {(*out)[i]=nil} else {\n", nil) - sw.Do(fmt.Sprintf("(*out)[i] = (*in)[i].DeepCopy%s()\n", t.Elem.Name.Name), t) - sw.Do("}\n", nil) - } else if t.Elem.Kind == types.Pointer { - sw.Do("if (*in)[i]==nil { (*out)[i]=nil } else {\n", nil) - sw.Do("(*out)[i] = new($.Elem|raw$)\n", t.Elem) - sw.Do("(*in)[i].DeepCopyInto((*out)[i])\n", nil) + } else if uet.Kind == types.Interface { + sw.Do("if (*in)[i] != nil {\n", nil) + // Note: if t.Elem has been an alias "J" of an interface "I" in Go, we will see it + // as kind Interface of name "J" here, i.e. generate val.DeepCopyJ(). The golang + // parser does not give us the underlying interface name. So we cannot do any better. + sw.Do(fmt.Sprintf("(*out)[i] = (*in)[i].DeepCopy%s()\n", uet.Name.Name), nil) sw.Do("}\n", nil) - } else if t.Elem.Kind == types.Struct { + } else if uet.Kind == types.Struct { sw.Do("(*in)[i].DeepCopyInto(&(*out)[i])\n", nil) } else { - sw.Do("(*out)[i] = (*in)[i].DeepCopy()\n", nil) + glog.Fatalf("Hit an unsupported type %v.", uet) } sw.Do("}\n", nil) } } +// doStruct generates code for a struct or an alias to a struct. The generated code is +// is the same for both cases, i.e. it's the code for the underlying type. func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { - if hasDeepCopyMethod(t) { + ut := underlyingType(t) + + if deepCopyMethodOrDie(t) != nil || deepCopyIntoMethodOrDie(t) != nil { sw.Do("*out = in.DeepCopy()\n", nil) return } @@ -683,89 +815,91 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { sw.Do("*out = *in\n", nil) // Now fix-up fields as needed. - for _, m := range t.Members { - t := m.Type - hasMethod := hasDeepCopyMethod(t) - if t.Kind == types.Alias { - copied := *t.Underlying - copied.Name = t.Name - t = &copied - } + for _, m := range ut.Members { + ft := m.Type + uft := underlyingType(ft) + args := generator.Args{ - "type": t, - "kind": t.Kind, + "type": ft, + "kind": ft.Kind, "name": m.Name, } - switch t.Kind { - case types.Builtin: - if hasMethod { - sw.Do("out.$.name$ = in.$.name$.DeepCopy()\n", args) + dc, dci := deepCopyMethodOrDie(ft), deepCopyIntoMethodOrDie(ft) + switch { + case dc != nil || dci != nil: + // Note: a DeepCopyInto exists because it is added if DeepCopy is manually defined + leftPointer := ft.Kind == types.Pointer + rightPointer := !isReference(ft) + if dc != nil { + rightPointer = dc.Results[0].Kind == types.Pointer } - // the initial *out = *in was enough - case types.Map, types.Slice, types.Pointer: - if hasMethod { - sw.Do("if in.$.name$ != nil {\n", args) + if leftPointer == rightPointer { sw.Do("out.$.name$ = in.$.name$.DeepCopy()\n", args) - sw.Do("}\n", nil) + } else if leftPointer { + sw.Do("x := in.$.name$.DeepCopy()\n", args) + sw.Do("out.$.name$ = = &x\n", args) } else { - // Fixup non-nil reference-semantic types. - sw.Do("if in.$.name$ != nil {\n", args) - sw.Do("in, out := &in.$.name$, &out.$.name$\n", args) - g.generateFor(t, sw) - sw.Do("}\n", nil) + sw.Do("in.$.name$.DeepCopyInto(&out.$.name$)\n", args) } - case types.Struct: - if hasMethod { - sw.Do("out.$.name$ = in.$.name$.DeepCopy()\n", args) - } else if t.IsAssignable() { + case uft.Kind == types.Builtin: + // the initial *out = *in was enough + case uft.Kind == types.Map, uft.Kind == types.Slice, uft.Kind == types.Pointer: + // Fixup non-nil reference-semantic types. + sw.Do("if in.$.name$ != nil {\n", args) + sw.Do("in, out := &in.$.name$, &out.$.name$\n", args) + g.generateFor(ft, sw) + sw.Do("}\n", nil) + case uft.Kind == types.Struct: + if ft.IsAssignable() { sw.Do("out.$.name$ = in.$.name$\n", args) } else { sw.Do("in.$.name$.DeepCopyInto(&out.$.name$)\n", args) } - case types.Interface: - sw.Do("if in.$.name$ == nil {out.$.name$=nil} else {\n", args) - sw.Do(fmt.Sprintf("out.$.name$ = in.$.name$.DeepCopy%s()\n", t.Name.Name), args) + case uft.Kind == types.Interface: + sw.Do("if in.$.name$ != nil {\n", args) + // Note: if t.Elem has been an alias "J" of an interface "I" in Go, we will see it + // as kind Interface of name "J" here, i.e. generate val.DeepCopyJ(). The golang + // parser does not give us the underlying interface name. So we cannot do any better. + sw.Do(fmt.Sprintf("out.$.name$ = in.$.name$.DeepCopy%s()\n", uft.Name.Name), args) sw.Do("}\n", nil) default: - sw.Do("out.$.name$ = in.$.name$.DeepCopy()\n", args) + glog.Fatalf("Hit an unsupported type %v.", uft) } } } -func (g *genDeepCopy) doInterface(t *types.Type, sw *generator.SnippetWriter) { - // TODO: Add support for interfaces. - g.doUnknown(t, sw) -} - +// doPointer generates code for a pointer or an alias to a pointer. The generated code is +// is the same for both cases, i.e. it's the code for the underlying type. func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) { - sw.Do("if *in == nil { *out = nil } else {\n", t) - if hasDeepCopyMethod(t.Elem) { - sw.Do("*out = new($.Elem|raw$)\n", t) - sw.Do("**out = (*in).DeepCopy()\n", nil) - } else if t.Elem.IsAssignable() { - sw.Do("*out = new($.Elem|raw$)\n", t) - sw.Do("**out = **in", nil) - } else { - switch t.Elem.Kind { - case types.Map, types.Slice: - sw.Do("*out = new($.Elem|raw$)\n", t) - sw.Do("if **in != nil {\n", t) - sw.Do("in, out := *in, *out\n", nil) - g.generateFor(t.Elem, sw) - sw.Do("}\n", nil) - default: - sw.Do("*out = new($.Elem|raw$)\n", t) - sw.Do("(*in).DeepCopyInto(*out)\n", nil) + ut := underlyingType(t) + uet := underlyingType(ut.Elem) + + dc, dci := deepCopyMethodOrDie(ut.Elem), deepCopyIntoMethodOrDie(ut.Elem) + switch { + case dc != nil || dci != nil: + rightPointer := !isReference(ut.Elem) + if dc != nil { + rightPointer = dc.Results[0].Kind == types.Pointer + } + if rightPointer { + sw.Do("*out = (*in).DeepCopy()\n", nil) + } else { + sw.Do("x := (*in).DeepCopy()\n", nil) + sw.Do("*out = &x\n", nil) } + case uet.IsAssignable(): + sw.Do("*out = new($.Elem|raw$)\n", ut) + sw.Do("**out = **in", nil) + case uet.Kind == types.Map, uet.Kind == types.Slice, uet.Kind == types.Pointer: + sw.Do("*out = new($.Elem|raw$)\n", ut) + sw.Do("if **in != nil {\n", nil) + sw.Do("in, out := *in, *out\n", nil) + g.generateFor(uet, sw) + sw.Do("}\n", nil) + case uet.Kind == types.Struct: + sw.Do("*out = new($.Elem|raw$)\n", ut) + sw.Do("(*in).DeepCopyInto(*out)\n", nil) + default: + glog.Fatalf("Hit an unsupported type %v.", uet) } - sw.Do("}", t) -} - -func (g *genDeepCopy) doAlias(t *types.Type, sw *generator.SnippetWriter) { - // TODO: Add support for aliases. - g.doUnknown(t, sw) -} - -func (g *genDeepCopy) doUnknown(t *types.Type, sw *generator.SnippetWriter) { - sw.Do("// FIXME: Type $.|raw$ is unsupported.\n", t) } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go b/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go index 71cc23c9b..8b9bad413 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/generators/deepcopy_test.go @@ -106,10 +106,11 @@ func Test_isRootedUnder(t *testing.T) { } } -func Test_hasDeepCopyMethod(t *testing.T) { +func Test_deepCopyMethod(t *testing.T) { testCases := []struct { typ types.Type expect bool + error bool }{ { typ: types.Type{ @@ -130,6 +131,10 @@ func Test_hasDeepCopyMethod(t *testing.T) { Name: types.Name{Package: "pkgname", Name: "func()"}, Kind: types.Func, Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, Parameters: []*types.Type{}, Results: []*types.Type{}, }, @@ -148,6 +153,10 @@ func Test_hasDeepCopyMethod(t *testing.T) { Name: types.Name{Package: "pkgname", Name: "func()"}, Kind: types.Func, Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, Parameters: []*types.Type{}, Results: []*types.Type{}, }, @@ -155,6 +164,7 @@ func Test_hasDeepCopyMethod(t *testing.T) { }, }, expect: false, + error: true, }, { typ: types.Type{ @@ -166,6 +176,10 @@ func Test_hasDeepCopyMethod(t *testing.T) { Name: types.Name{Package: "pkgname", Name: "func() int"}, Kind: types.Func, Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, Parameters: []*types.Type{}, Results: []*types.Type{ { @@ -178,17 +192,72 @@ func Test_hasDeepCopyMethod(t *testing.T) { }, }, expect: false, + error: true, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Wrong signature with pointer receiver, but non-pointer result. + "DeepCopy": { + Name: types.Name{Package: "pkgname", Name: "func() pkgname.typename"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Parameters: []*types.Type{}, + Results: []*types.Type{ + { + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + }, + }, + }, + }, + }, + }, + expect: false, + error: true, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Wrong signature with non-pointer receiver, but pointer result. + "DeepCopy": { + Name: types.Name{Package: "pkgname", Name: "func() pkgname.typename"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + Parameters: []*types.Type{}, + Results: []*types.Type{ + { + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + }, + }, + }, + }, + }, + expect: false, + error: true, }, { typ: types.Type{ Name: types.Name{Package: "pkgname", Name: "typename"}, Kind: types.Builtin, Methods: map[string]*types.Type{ - // Correct signature. + // Correct signature with non-pointer receiver. "DeepCopy": { Name: types.Name{Package: "pkgname", Name: "func() pkgname.typename"}, Kind: types.Func, Signature: &types.Signature{ + Receiver: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, Parameters: []*types.Type{}, Results: []*types.Type{ { @@ -202,6 +271,33 @@ func Test_hasDeepCopyMethod(t *testing.T) { }, expect: true, }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Correct signature with pointer receiver. + "DeepCopy": { + Name: types.Name{Package: "pkgname", Name: "func() pkgname.typename"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Parameters: []*types.Type{}, + Results: []*types.Type{ + { + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + }, + }, + }, + }, + }, + expect: true, + }, { typ: types.Type{ Name: types.Name{Package: "pkgname", Name: "typename"}, @@ -212,6 +308,10 @@ func Test_hasDeepCopyMethod(t *testing.T) { Name: types.Name{Package: "pkgname", Name: "func(int) pkgname.typename"}, Kind: types.Func, Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, Parameters: []*types.Type{ { Name: types.Name{Name: "int"}, @@ -229,6 +329,7 @@ func Test_hasDeepCopyMethod(t *testing.T) { }, }, expect: false, + error: true, }, { typ: types.Type{ @@ -240,6 +341,10 @@ func Test_hasDeepCopyMethod(t *testing.T) { Name: types.Name{Package: "pkgname", Name: "func() (pkgname.typename, int)"}, Kind: types.Func, Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, Parameters: []*types.Type{}, Results: []*types.Type{ { @@ -256,13 +361,223 @@ func Test_hasDeepCopyMethod(t *testing.T) { }, }, expect: false, + error: true, }, } for i, tc := range testCases { - r := hasDeepCopyMethod(&tc.typ) - if r != tc.expect { - t.Errorf("case[%d]: expected %t, got %t", i, tc.expect, r) + r, err := deepCopyMethod(&tc.typ) + if tc.error && err == nil { + t.Errorf("case[%d]: expected an error, got none", i) + } else if !tc.error && err != nil { + t.Errorf("case[%d]: expected no error, got: %v", i, err) + } else if !tc.error && (r != nil) != tc.expect { + t.Errorf("case[%d]: expected result %v, got: %v", i, tc.expect, r) + } + } +} + +func Test_deepCopyIntoMethod(t *testing.T) { + testCases := []struct { + typ types.Type + expect bool + error bool + }{ + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + // No DeepCopyInto method. + Methods: map[string]*types.Type{}, + }, + expect: false, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // No DeepCopyInto method. + "method": { + Name: types.Name{Package: "pkgname", Name: "func()"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Parameters: []*types.Type{}, + Results: []*types.Type{}, + }, + }, + }, + }, + expect: false, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Wrong signature (no parameter). + "DeepCopyInto": { + Name: types.Name{Package: "pkgname", Name: "func()"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Parameters: []*types.Type{}, + Results: []*types.Type{}, + }, + }, + }, + }, + expect: false, + error: true, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Wrong signature (unexpected result). + "DeepCopyInto": { + Name: types.Name{Package: "pkgname", Name: "func(*pkgname.typename) int"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Parameters: []*types.Type{ + { + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + }, + Results: []*types.Type{ + { + Name: types.Name{Name: "int"}, + Kind: types.Builtin, + }, + }, + }, + }, + }, + }, + expect: false, + error: true, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Wrong signature (non-pointer parameter, pointer receiver). + "DeepCopyInto": { + Name: types.Name{Package: "pkgname", Name: "func(pkgname.typename)"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Parameters: []*types.Type{ + {Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Results: []*types.Type{}, + }, + }, + }, + }, + expect: false, + error: true, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Wrong signature (non-pointer parameter, non-pointer receiver). + "DeepCopyInto": { + Name: types.Name{Package: "pkgname", Name: "func(pkgname.typename)"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + Parameters: []*types.Type{ + {Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Results: []*types.Type{}, + }, + }, + }, + }, + expect: false, + error: true, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Correct signature with non-pointer receiver. + "DeepCopyInto": { + Name: types.Name{Package: "pkgname", Name: "func(*pkgname.typename)"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + Parameters: []*types.Type{ + { + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + }, + Results: []*types.Type{}, + }, + }, + }, + }, + expect: true, + }, + { + typ: types.Type{ + Name: types.Name{Package: "pkgname", Name: "typename"}, + Kind: types.Builtin, + Methods: map[string]*types.Type{ + // Correct signature with pointer receiver. + "DeepCopyInto": { + Name: types.Name{Package: "pkgname", Name: "func(*pkgname.typename)"}, + Kind: types.Func, + Signature: &types.Signature{ + Receiver: &types.Type{ + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + Parameters: []*types.Type{ + { + Kind: types.Pointer, + Elem: &types.Type{Kind: types.Struct, Name: types.Name{Package: "pkgname", Name: "typename"}}, + }, + }, + Results: []*types.Type{}, + }, + }, + }, + }, + expect: true, + }, + } + + for i, tc := range testCases { + r, err := deepCopyIntoMethod(&tc.typ) + if tc.error && err == nil { + t.Errorf("case[%d]: expected an error, got none", i) + } else if !tc.error && err != nil { + t.Errorf("case[%d]: expected no error, got: %v", i, err) + } else if !tc.error && (r != nil) != tc.expect { + t.Errorf("case[%d]: expected result %v, got: %v", i, tc.expect, r) } } } @@ -351,7 +666,7 @@ func Test_extractInterfacesTag(t *testing.T) { }{ { comments: []string{}, - expect: nil, + expect: nil, }, { comments: []string{ @@ -395,4 +710,4 @@ func Test_extractInterfacesTag(t *testing.T) { t.Errorf("case[%d]: expected %v, got %v", i, tc.expect, r) } } -} \ No newline at end of file +} diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/doc.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/doc.go new file mode 100644 index 000000000..7f8d158c9 --- /dev/null +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/doc.go @@ -0,0 +1,89 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// +k8s:deepcopy-gen=package + +// This is a test package. +package aliases + +// Note: the following AliasInterface and AliasAliasInterface +k8s:deepcopy-gen:interfaces tags +// are necessary because Golang flattens interface alias in the type system. I.e. an alias J of +// an interface I is actually equivalent to I. So support deepcopies of those aliases, we have +// to implement all aliases of that interface. + +// +k8s:deepcopy-gen:interfaces=k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases.Interface +// +k8s:deepcopy-gen:interfaces=k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases.AliasInterface +// +k8s:deepcopy-gen:interfaces=k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases.AliasAliasInterface +type Foo struct { + X int +} + +type Interface interface { + DeepCopyInterface() Interface + DeepCopyAliasInterface() AliasInterface + DeepCopyAliasAliasInterface() AliasAliasInterface +} + +type Builtin int +type Slice []int +type Pointer *int +type PointerAlias *Builtin +type Struct Foo +type Map map[string]int + +type FooAlias Foo +type FooSlice []Foo +type FooPointer *Foo +type FooMap map[string]Foo + +type AliasBuiltin Builtin +type AliasSlice Slice +type AliasPointer Pointer +type AliasStruct Struct +type AliasMap Map + +type AliasInterface Interface +type AliasAliasInterface AliasInterface +type AliasInterfaceMap map[string]AliasInterface +type AliasInterfaceSlice []AliasInterface + +// Aliases +type Ttest struct { + Builtin Builtin + Slice Slice + Pointer Pointer + PointerAlias PointerAlias + Struct Struct + Map Map + SliceSlice []Slice + MapSlice map[string]Slice + + FooAlias FooAlias + FooSlice FooSlice + FooPointer FooPointer + FooMap FooMap + + AliasBuiltin AliasBuiltin + AliasSlice AliasSlice + AliasPointer AliasPointer + AliasStruct AliasStruct + AliasMap AliasMap + + AliasInterface AliasInterface + AliasAliasInterface AliasAliasInterface + AliasInterfaceMap AliasInterfaceMap + AliasInterfaceSlice AliasInterfaceSlice +} diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/zz_generated.go new file mode 100644 index 000000000..0e6b66b6e --- /dev/null +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases/zz_generated.go @@ -0,0 +1,412 @@ +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package aliases + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in AliasInterfaceMap) DeepCopyInto(out *AliasInterfaceMap) { + { + in := &in + *out = make(AliasInterfaceMap, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = val.DeepCopyAliasInterface() + } + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasInterfaceMap. +func (in AliasInterfaceMap) DeepCopy() AliasInterfaceMap { + if in == nil { + return nil + } + out := new(AliasInterfaceMap) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in AliasInterfaceSlice) DeepCopyInto(out *AliasInterfaceSlice) { + { + in := &in + *out = make(AliasInterfaceSlice, len(*in)) + for i := range *in { + if (*in)[i] != nil { + (*out)[i] = (*in)[i].DeepCopyAliasInterface() + } + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasInterfaceSlice. +func (in AliasInterfaceSlice) DeepCopy() AliasInterfaceSlice { + if in == nil { + return nil + } + out := new(AliasInterfaceSlice) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in AliasMap) DeepCopyInto(out *AliasMap) { + { + in := &in + *out = make(AliasMap, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasMap. +func (in AliasMap) DeepCopy() AliasMap { + if in == nil { + return nil + } + out := new(AliasMap) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in AliasSlice) DeepCopyInto(out *AliasSlice) { + { + in := &in + *out = make(AliasSlice, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasSlice. +func (in AliasSlice) DeepCopy() AliasSlice { + if in == nil { + return nil + } + out := new(AliasSlice) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AliasStruct) DeepCopyInto(out *AliasStruct) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasStruct. +func (in *AliasStruct) DeepCopy() *AliasStruct { + if in == nil { + return nil + } + out := new(AliasStruct) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Foo) DeepCopyInto(out *Foo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Foo. +func (in *Foo) DeepCopy() *Foo { + if in == nil { + return nil + } + out := new(Foo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyAliasAliasInterface is an autogenerated deepcopy function, copying the receiver, creating a new AliasAliasInterface. +func (in *Foo) DeepCopyAliasAliasInterface() AliasAliasInterface { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyAliasInterface is an autogenerated deepcopy function, copying the receiver, creating a new AliasInterface. +func (in *Foo) DeepCopyAliasInterface() AliasInterface { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Interface. +func (in *Foo) DeepCopyInterface() Interface { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FooAlias) DeepCopyInto(out *FooAlias) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooAlias. +func (in *FooAlias) DeepCopy() *FooAlias { + if in == nil { + return nil + } + out := new(FooAlias) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in FooMap) DeepCopyInto(out *FooMap) { + { + in := &in + *out = make(FooMap, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooMap. +func (in FooMap) DeepCopy() FooMap { + if in == nil { + return nil + } + out := new(FooMap) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in FooSlice) DeepCopyInto(out *FooSlice) { + { + in := &in + *out = make(FooSlice, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooSlice. +func (in FooSlice) DeepCopy() FooSlice { + if in == nil { + return nil + } + out := new(FooSlice) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Map) DeepCopyInto(out *Map) { + { + in := &in + *out = make(Map, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Map. +func (in Map) DeepCopy() Map { + if in == nil { + return nil + } + out := new(Map) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Slice) DeepCopyInto(out *Slice) { + { + in := &in + *out = make(Slice, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Slice. +func (in Slice) DeepCopy() Slice { + if in == nil { + return nil + } + out := new(Slice) + in.DeepCopyInto(out) + return *out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Struct) DeepCopyInto(out *Struct) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Struct. +func (in *Struct) DeepCopy() *Struct { + if in == nil { + return nil + } + out := new(Struct) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Ttest) DeepCopyInto(out *Ttest) { + *out = *in + if in.Slice != nil { + in, out := &in.Slice, &out.Slice + *out = make(Slice, len(*in)) + copy(*out, *in) + } + if in.Pointer != nil { + in, out := &in.Pointer, &out.Pointer + *out = new(int) + **out = **in + } + if in.PointerAlias != nil { + in, out := &in.PointerAlias, &out.PointerAlias + *out = new(Builtin) + **out = **in + } + out.Struct = in.Struct + if in.Map != nil { + in, out := &in.Map, &out.Map + *out = make(Map, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SliceSlice != nil { + in, out := &in.SliceSlice, &out.SliceSlice + *out = make([]Slice, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = make(Slice, len(*in)) + copy(*out, *in) + } + } + } + if in.MapSlice != nil { + in, out := &in.MapSlice, &out.MapSlice + *out = make(map[string]Slice, len(*in)) + for key, val := range *in { + var outVal []int + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(Slice, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + out.FooAlias = in.FooAlias + if in.FooSlice != nil { + in, out := &in.FooSlice, &out.FooSlice + *out = make(FooSlice, len(*in)) + copy(*out, *in) + } + if in.FooPointer != nil { + in, out := &in.FooPointer, &out.FooPointer + *out = new(Foo) + **out = **in + } + if in.FooMap != nil { + in, out := &in.FooMap, &out.FooMap + *out = make(FooMap, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AliasSlice != nil { + in, out := &in.AliasSlice, &out.AliasSlice + *out = make(AliasSlice, len(*in)) + copy(*out, *in) + } + if in.AliasPointer != nil { + in, out := &in.AliasPointer, &out.AliasPointer + *out = new(int) + **out = **in + } + out.AliasStruct = in.AliasStruct + if in.AliasMap != nil { + in, out := &in.AliasMap, &out.AliasMap + *out = make(AliasMap, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.AliasInterface != nil { + out.AliasInterface = in.AliasInterface.DeepCopyAliasInterface() + } + if in.AliasAliasInterface != nil { + out.AliasAliasInterface = in.AliasAliasInterface.DeepCopyAliasAliasInterface() + } + if in.AliasInterfaceMap != nil { + in, out := &in.AliasInterfaceMap, &out.AliasInterfaceMap + *out = make(AliasInterfaceMap, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = val.DeepCopyAliasInterface() + } + } + } + if in.AliasInterfaceSlice != nil { + in, out := &in.AliasInterfaceSlice, &out.AliasInterfaceSlice + *out = make(AliasInterfaceSlice, len(*in)) + for i := range *in { + if (*in)[i] != nil { + (*out)[i] = (*in)[i].DeepCopyAliasInterface() + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ttest. +func (in *Ttest) DeepCopy() *Ttest { + if in == nil { + return nil + } + out := new(Ttest) + in.DeepCopyInto(out) + return out +} diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/builtins/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/builtins/zz_generated.go index 300dec482..94c775afa 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/builtins/zz_generated.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/builtins/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package builtins diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interface_fuzzer.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interface_fuzzer.go new file mode 100644 index 000000000..02c2652d9 --- /dev/null +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interface_fuzzer.go @@ -0,0 +1,131 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package output_tests + +import ( + "github.com/google/gofuzz" + + "k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases" + "k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces" +) + +// interfaceFuzzers contains fuzzer that set all interface to nil because our +// JSON deepcopy does not work with it. +// TODO: test also interface deepcopy +var interfaceFuzzers = []interface{}{ + func(s *aliases.AliasAliasInterface, c fuzz.Continue) { + if c.RandBool() { + *s = nil + } else { + *s = &aliasAliasInterfaceInstance{X: c.Int()} + } + }, + func(s *aliases.AliasInterface, c fuzz.Continue) { + if c.RandBool() { + *s = nil + } else { + *s = &aliasAliasInterfaceInstance{X: c.Int()} + } + }, + func(s *aliases.Interface, c fuzz.Continue) { + if c.RandBool() { + *s = nil + } else { + *s = &aliasAliasInterfaceInstance{X: c.Int()} + } + }, + func(s *aliases.AliasInterfaceMap, c fuzz.Continue) { + if c.RandBool() { + *s = nil + } else { + *s = make(aliases.AliasInterfaceMap) + for i := 0; i < c.Intn(3); i++ { + if c.RandBool() { + (*s)[c.RandString()] = nil + } else { + (*s)[c.RandString()] = &aliasAliasInterfaceInstance{X: c.Int()} + } + } + } + + }, + func(s *aliases.AliasInterfaceSlice, c fuzz.Continue) { + if c.RandBool() { + *s = nil + } else { + *s = make(aliases.AliasInterfaceSlice, 0, 0) + for i := 0; i < c.Intn(3); i++ { + if c.RandBool() { + *s = append(*s, nil) + } else { + *s = append(*s, &aliasAliasInterfaceInstance{X: c.Int()}) + } + } + } + }, + func(s *interfaces.Inner, c fuzz.Continue) { + if c.RandBool() { + *s = nil + } else { + *s = &interfacesInnerInstance{X: c.Float64()} + } + }, +} + +type aliasAliasInterfaceInstance struct { + X int +} + +func (i *aliasAliasInterfaceInstance) DeepCopyInterface() aliases.Interface { + if i == nil { + return nil + } + + return &aliasAliasInterfaceInstance{X: i.X} +} + +func (i *aliasAliasInterfaceInstance) DeepCopyAliasInterface() aliases.AliasInterface { + if i == nil { + return nil + } + + return &aliasAliasInterfaceInstance{X: i.X} +} + +func (i *aliasAliasInterfaceInstance) DeepCopyAliasAliasInterface() aliases.AliasAliasInterface { + if i == nil { + return nil + } + + return &aliasAliasInterfaceInstance{X: i.X} +} + +type interfacesInnerInstance struct { + X float64 +} + +func (i *interfacesInnerInstance) DeepCopyInner() interfaces.Inner { + if i == nil { + return nil + } + + return &interfacesInnerInstance{X: i.X} +} + +func (i *interfacesInnerInstance) Function() float64 { + return i.X +} diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/doc.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/doc.go index 647791bf2..2d01f2e60 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/doc.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/doc.go @@ -20,7 +20,7 @@ limitations under the License. package interfaces type Inner interface { - function() float64 + Function() float64 DeepCopyInner() Inner } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/zz_generated.go index e3f9fe342..7e1e65d58 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/zz_generated.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package interfaces @@ -27,9 +27,7 @@ func (in *Ttest) DeepCopyInto(out *Ttest) { in, out := &in.I, &out.I *out = make([]Inner, len(*in)) for i := range *in { - if (*in)[i] == nil { - (*out)[i] = nil - } else { + if (*in)[i] != nil { (*out)[i] = (*in)[i].DeepCopyInner() } } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/doc.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/doc.go index 4c5b9231c..7579ddbd7 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/doc.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/doc.go @@ -22,14 +22,22 @@ package maps type Ttest struct { Byte map[string]byte //Int8 map[string]int8 //TODO: int8 becomes byte in SnippetWriter - Int16 map[string]int16 - Int32 map[string]int32 - Int64 map[string]int64 - Uint8 map[string]uint8 - Uint16 map[string]uint16 - Uint32 map[string]uint32 - Uint64 map[string]uint64 - Float32 map[string]float32 - Float64 map[string]float64 - String map[string]string + Int16 map[string]int16 + Int32 map[string]int32 + Int64 map[string]int64 + Uint8 map[string]uint8 + Uint16 map[string]uint16 + Uint32 map[string]uint32 + Uint64 map[string]uint64 + Float32 map[string]float32 + Float64 map[string]float64 + String map[string]string + StringPtr map[string]*string + StringPtrPtr map[string]**string + Map map[string]map[string]string + MapPtr map[string]*map[string]string + Slice map[string][]string + SlicePtr map[string]*[]string + Struct map[string]Ttest + StructPtr map[string]*Ttest } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/zz_generated.go index 6f7b0156a..8e1302db6 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/zz_generated.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/maps/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package maps @@ -100,6 +100,134 @@ func (in *Ttest) DeepCopyInto(out *Ttest) { (*out)[key] = val } } + if in.StringPtr != nil { + in, out := &in.StringPtr, &out.StringPtr + *out = make(map[string]*string, len(*in)) + for key, val := range *in { + var outVal *string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(string) + **out = **in + } + (*out)[key] = outVal + } + } + if in.StringPtrPtr != nil { + in, out := &in.StringPtrPtr, &out.StringPtrPtr + *out = make(map[string]**string, len(*in)) + for key, val := range *in { + var outVal **string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(*string) + if **in != nil { + in, out := *in, *out + *out = new(string) + **out = **in + } + } + (*out)[key] = outVal + } + } + if in.Map != nil { + in, out := &in.Map, &out.Map + *out = make(map[string]map[string]string, len(*in)) + for key, val := range *in { + var outVal map[string]string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + (*out)[key] = outVal + } + } + if in.MapPtr != nil { + in, out := &in.MapPtr, &out.MapPtr + *out = make(map[string]*map[string]string, len(*in)) + for key, val := range *in { + var outVal *map[string]string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(map[string]string) + if **in != nil { + in, out := *in, *out + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + } + (*out)[key] = outVal + } + } + if in.Slice != nil { + in, out := &in.Slice, &out.Slice + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + var outVal []string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = make([]string, len(*in)) + copy(*out, *in) + } + (*out)[key] = outVal + } + } + if in.SlicePtr != nil { + in, out := &in.SlicePtr, &out.SlicePtr + *out = make(map[string]*[]string, len(*in)) + for key, val := range *in { + var outVal *[]string + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + (*out)[key] = outVal + } + } + if in.Struct != nil { + in, out := &in.Struct, &out.Struct + *out = make(map[string]Ttest, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.StructPtr != nil { + in, out := &in.StructPtr, &out.StructPtr + *out = make(map[string]*Ttest, len(*in)) + for key, val := range *in { + var outVal *Ttest + if val == nil { + (*out)[key] = nil + } else { + in, out := &val, &outVal + *out = new(Ttest) + (*in).DeepCopyInto(*out) + } + (*out)[key] = outVal + } + } return } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/output_test.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/output_test.go new file mode 100644 index 000000000..5e89957d0 --- /dev/null +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/output_test.go @@ -0,0 +1,157 @@ +package output_tests + +import ( + "fmt" + "reflect" + "testing" + + "github.com/davecgh/go-spew/spew" + "github.com/google/gofuzz" + + "k8s.io/gengo/examples/deepcopy-gen/output_tests/aliases" + "k8s.io/gengo/examples/deepcopy-gen/output_tests/builtins" + "k8s.io/gengo/examples/deepcopy-gen/output_tests/interfaces" + "k8s.io/gengo/examples/deepcopy-gen/output_tests/maps" + "k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer" + "k8s.io/gengo/examples/deepcopy-gen/output_tests/slices" + "k8s.io/gengo/examples/deepcopy-gen/output_tests/structs" +) + +func TestWithValueFuzzer(t *testing.T) { + tests := []interface{}{ + aliases.Ttest{}, + builtins.Ttest{}, + interfaces.Ttest{}, + maps.Ttest{}, + pointer.Ttest{}, + slices.Ttest{}, + structs.Ttest{}, + } + + fuzzer := fuzz.New() + fuzzer.NilChance(0.5) + fuzzer.NumElements(0, 2) + fuzzer.Funcs(interfaceFuzzers...) + + for _, test := range tests { + t.Run(fmt.Sprintf("%T", test), func(t *testing.T) { + N := 1000 + for i := 0; i < N; i++ { + original := reflect.New(reflect.TypeOf(test)).Interface() + + fuzzer.Fuzz(original) + + reflectCopy := ReflectDeepCopy(original) + + if !reflect.DeepEqual(original, reflectCopy) { + t.Errorf("original and reflectCopy are different:\n\n original = %s\n\n jsonCopy = %s", spew.Sdump(original), spew.Sdump(reflectCopy)) + } + + deepCopy := reflect.ValueOf(original).MethodByName("DeepCopy").Call(nil)[0].Interface() + + if !reflect.DeepEqual(original, deepCopy) { + t.Fatalf("original and deepCopy are different:\n\n original = %s\n\n deepCopy() = %s", spew.Sdump(original), spew.Sdump(deepCopy)) + } + + ValueFuzz(original) + + if !reflect.DeepEqual(reflectCopy, deepCopy) { + t.Fatalf("reflectCopy and deepCopy are different:\n\n origin = %s\n\n jsonCopy() = %s", spew.Sdump(original), spew.Sdump(deepCopy)) + } + } + }) + } +} + +func BenchmarkReflectDeepCopy(b *testing.B) { + fourtytwo := "fourtytwo" + fourtytwoPtr := &fourtytwo + var nilMap map[string]string + var nilSlice []string + mapPtr := &map[string]string{"0": "fourtytwo", "1": "fourtytwo"} + slicePtr := &[]string{"fourtytwo", "fourtytwo", "fourtytwo"} + structPtr := &pointer.Ttest{ + Builtin: &fourtytwo, + Ptr: &fourtytwoPtr, + } + + tests := []interface{}{ + maps.Ttest{ + Byte: map[string]byte{"0": 42, "1": 42, "3": 42}, + Int16: map[string]int16{"0": 42, "1": 42, "3": 42}, + Int32: map[string]int32{"0": 42, "1": 42, "3": 42}, + Int64: map[string]int64{"0": 42, "1": 42, "3": 42}, + Uint8: map[string]uint8{"0": 42, "1": 42, "3": 42}, + Uint16: map[string]uint16{"0": 42, "1": 42, "3": 42}, + Uint32: map[string]uint32{"0": 42, "1": 42, "3": 42}, + Uint64: map[string]uint64{"0": 42, "1": 42, "3": 42}, + Float32: map[string]float32{"0": 42.0, "1": 42.0, "3": 42.0}, + Float64: map[string]float64{"0": 42, "1": 42, "3": 42}, + String: map[string]string{"0": "fourtytwo", "1": "fourtytwo", "3": "fourtytwo"}, + StringPtr: map[string]*string{"0": &fourtytwo, "1": &fourtytwo, "3": &fourtytwo}, + StringPtrPtr: map[string]**string{"0": &fourtytwoPtr, "1": &fourtytwoPtr, "3": &fourtytwoPtr}, + Map: map[string]map[string]string{"0": nil, "1": {"a": fourtytwo, "b": fourtytwo}, "3": {}}, + MapPtr: map[string]*map[string]string{"0": nil, "1": {"a": fourtytwo, "b": fourtytwo}, "3": &nilMap}, + Slice: map[string][]string{"0": nil, "1": {"a", "b"}, "2": {}}, + SlicePtr: map[string]*[]string{"0": nil, "1": {"a", "b"}, "2": &nilSlice}, + Struct: map[string]maps.Ttest{"0": {}, "1": {Byte: map[string]byte{"0": 42, "1": 42, "3": 42}}}, + StructPtr: map[string]*maps.Ttest{"0": nil, "1": {}, "2": {Byte: map[string]byte{"0": 42, "1": 42, "3": 42}}}, + }, + slices.Ttest{ + Byte: []byte{42, 42, 42}, + Int16: []int16{42, 42, 42}, + Int32: []int32{42, 42, 42}, + Int64: []int64{42, 42, 42}, + Uint8: []uint8{42, 42, 42}, + Uint16: []uint16{42, 42, 42}, + Uint32: []uint32{42, 42, 42}, + Uint64: []uint64{42, 42, 42}, + Float32: []float32{42.0, 42.0, 42.0}, + Float64: []float64{42, 42, 42}, + String: []string{"fourtytwo", "fourtytwo", "fourtytwo"}, + StringPtr: []*string{&fourtytwo, &fourtytwo, &fourtytwo}, + StringPtrPtr: []**string{&fourtytwoPtr, &fourtytwoPtr, &fourtytwoPtr}, + Map: []map[string]string{nil, {"a": fourtytwo, "b": fourtytwo}, {}}, + MapPtr: []*map[string]string{nil, {"a": fourtytwo, "b": fourtytwo}, &nilMap}, + Slice: [][]string{nil, {"a", "b"}, {}}, + SlicePtr: []*[]string{nil, {"a", "b"}, &nilSlice}, + Struct: []slices.Ttest{{}, {Byte: []byte{42, 42, 42}}}, + StructPtr: []*slices.Ttest{nil, {}, {Byte: []byte{42, 42, 42}}}, + }, + pointer.Ttest{ + Builtin: &fourtytwo, + Ptr: &fourtytwoPtr, + Map: &map[string]string{"0": "fourtytwo", "1": "fourtytwo"}, + Slice: &[]string{"fourtytwo", "fourtytwo", "fourtytwo"}, + MapPtr: &mapPtr, + SlicePtr: &slicePtr, + Struct: &pointer.Ttest{ + Builtin: &fourtytwo, + Ptr: &fourtytwoPtr, + }, + StructPtr: &structPtr, + }, + } + + fuzzer := fuzz.New() + fuzzer.NilChance(0.5) + fuzzer.NumElements(0, 2) + fuzzer.Funcs(interfaceFuzzers...) + + for _, test := range tests { + b.Run(fmt.Sprintf("%T", test), func(b *testing.B) { + for i := 0; i < b.N; i++ { + switch t := test.(type) { + case maps.Ttest: + t.DeepCopy() + case slices.Ttest: + t.DeepCopy() + case pointer.Ttest: + t.DeepCopy() + default: + b.Fatalf("missing type case in switch for %T", t) + } + } + }) + } +} diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/doc.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/doc.go index c4d504f62..fd461101b 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/doc.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/doc.go @@ -20,5 +20,12 @@ limitations under the License. package pointer type Ttest struct { - Types map[string]*Ttest + Builtin *string + Ptr **string + Map *map[string]string + Slice *[]string + MapPtr **map[string]string + SlicePtr **[]string + Struct *Ttest + StructPtr **Ttest } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/zz_generated.go index 4b98703d5..a3b08c343 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/zz_generated.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/pointer/zz_generated.go @@ -16,25 +16,89 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package pointer // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Ttest) DeepCopyInto(out *Ttest) { *out = *in - if in.Types != nil { - in, out := &in.Types, &out.Types - *out = make(map[string]*Ttest, len(*in)) - for key, val := range *in { - if val == nil { - (*out)[key] = nil - } else { - (*out)[key] = new(Ttest) - val.DeepCopyInto((*out)[key]) + if in.Builtin != nil { + in, out := &in.Builtin, &out.Builtin + *out = new(string) + **out = **in + } + if in.Ptr != nil { + in, out := &in.Ptr, &out.Ptr + *out = new(*string) + if **in != nil { + in, out := *in, *out + *out = new(string) + **out = **in + } + } + if in.Map != nil { + in, out := &in.Map, &out.Map + *out = new(map[string]string) + if **in != nil { + in, out := *in, *out + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + } + if in.Slice != nil { + in, out := &in.Slice, &out.Slice + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + if in.MapPtr != nil { + in, out := &in.MapPtr, &out.MapPtr + *out = new(*map[string]string) + if **in != nil { + in, out := *in, *out + *out = new(map[string]string) + if **in != nil { + in, out := *in, *out + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + } + } + if in.SlicePtr != nil { + in, out := &in.SlicePtr, &out.SlicePtr + *out = new(*[]string) + if **in != nil { + in, out := *in, *out + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) } } } + if in.Struct != nil { + in, out := &in.Struct, &out.Struct + *out = new(Ttest) + (*in).DeepCopyInto(*out) + } + if in.StructPtr != nil { + in, out := &in.StructPtr, &out.StructPtr + *out = new(*Ttest) + if **in != nil { + in, out := *in, *out + *out = new(Ttest) + (*in).DeepCopyInto(*out) + } + } return } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/reflect_deepcopy.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/reflect_deepcopy.go new file mode 100644 index 000000000..6a6a3a406 --- /dev/null +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/reflect_deepcopy.go @@ -0,0 +1,81 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package output_tests + +import ( + "fmt" + "reflect" +) + +// ReflectDeepCopy deep copies the object using reflection. +func ReflectDeepCopy(in interface{}) interface{} { + return reflectDeepCopy(reflect.ValueOf(in)).Interface() +} + +func reflectDeepCopy(src reflect.Value) reflect.Value { + switch src.Kind() { + case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: + if src.IsNil() { + return src + } + } + + switch src.Kind() { + case reflect.Chan, reflect.Func, reflect.UnsafePointer, reflect.Uintptr: + panic(fmt.Sprintf("cannot deep copy kind: %s", src.Kind())) + case reflect.Array: + dst := reflect.New(src.Type()) + for i := 0; i < src.Len(); i++ { + dst.Elem().Index(i).Set(reflectDeepCopy(src.Index(i))) + } + return dst.Elem() + case reflect.Interface: + return reflectDeepCopy(src.Elem()) + case reflect.Map: + dst := reflect.MakeMap(src.Type()) + for _, k := range src.MapKeys() { + dst.SetMapIndex(k, reflectDeepCopy(src.MapIndex(k))) + } + return dst + case reflect.Ptr: + dst := reflect.New(src.Type().Elem()) + dst.Elem().Set(reflectDeepCopy(src.Elem())) + return dst + case reflect.Slice: + dst := reflect.MakeSlice(src.Type(), 0, src.Len()) + for i := 0; i < src.Len(); i++ { + dst = reflect.Append(dst, reflectDeepCopy(src.Index(i))) + } + return dst + case reflect.Struct: + dst := reflect.New(src.Type()) + for i := 0; i < src.NumField(); i++ { + if !dst.Elem().Field(i).CanSet() { + // Can't set private fields. At this point, the + // best we can do is a shallow copy. For + // example, time.Time is a value type with + // private members that can be shallow copied. + return src + } + dst.Elem().Field(i).Set(reflectDeepCopy(src.Field(i))) + } + return dst.Elem() + default: + // Value types like numbers, booleans, and strings. + return src + } +} diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/doc.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/doc.go index 48d5e8814..4d86278f0 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/doc.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/doc.go @@ -22,14 +22,22 @@ package slices type Ttest struct { Byte []byte //Int8 []int8 //TODO: int8 becomes byte in SnippetWriter - Int16 []int16 - Int32 []int32 - Int64 []int64 - Uint8 []uint8 - Uint16 []uint16 - Uint32 []uint32 - Uint64 []uint64 - Float32 []float32 - Float64 []float64 - String []string + Int16 []int16 + Int32 []int32 + Int64 []int64 + Uint8 []uint8 + Uint16 []uint16 + Uint32 []uint32 + Uint64 []uint64 + Float32 []float32 + Float64 []float64 + String []string + StringPtr []*string + StringPtrPtr []**string + Map []map[string]string + MapPtr []*map[string]string + Slice [][]string + SlicePtr []*[]string + Struct []Ttest + StructPtr []*Ttest } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/zz_generated.go index 74c841c11..a6c729b50 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/zz_generated.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/slices/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package slices @@ -78,6 +78,106 @@ func (in *Ttest) DeepCopyInto(out *Ttest) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.StringPtr != nil { + in, out := &in.StringPtr, &out.StringPtr + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.StringPtrPtr != nil { + in, out := &in.StringPtrPtr, &out.StringPtrPtr + *out = make([]**string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(*string) + if **in != nil { + in, out := *in, *out + *out = new(string) + **out = **in + } + } + } + } + if in.Map != nil { + in, out := &in.Map, &out.Map + *out = make([]map[string]string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + } + } + if in.MapPtr != nil { + in, out := &in.MapPtr, &out.MapPtr + *out = make([]*map[string]string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(map[string]string) + if **in != nil { + in, out := *in, *out + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + } + } + } + if in.Slice != nil { + in, out := &in.Slice, &out.Slice + *out = make([][]string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + } + if in.SlicePtr != nil { + in, out := &in.SlicePtr, &out.SlicePtr + *out = make([]*[]string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new([]string) + if **in != nil { + in, out := *in, *out + *out = make([]string, len(*in)) + copy(*out, *in) + } + } + } + } + if in.Struct != nil { + in, out := &in.Struct, &out.Struct + *out = make([]Ttest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.StructPtr != nil { + in, out := &in.StructPtr, &out.StructPtr + *out = make([]*Ttest, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Ttest) + (*in).DeepCopyInto(*out) + } + } + } return } diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/structs/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/structs/zz_generated.go index 209cd50a8..85a682fa7 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/structs/zz_generated.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/structs/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package structs diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/value_fuzzer.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/value_fuzzer.go new file mode 100644 index 000000000..00ab58561 --- /dev/null +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/value_fuzzer.go @@ -0,0 +1,86 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package output_tests + +import ( + "reflect" +) + +// ValueFuzz recursively changes all basic type values in an object. Any kind of references will not +// be touched, i.e. the addresses of slices, maps, pointers will stay unchanged. +func ValueFuzz(obj interface{}) { + valueFuzz(reflect.ValueOf(obj)) +} + +func valueFuzz(obj reflect.Value) { + switch obj.Kind() { + case reflect.Array: + for i := 0; i < obj.Len(); i++ { + valueFuzz(obj.Index(i)) + } + case reflect.Slice: + if obj.IsNil() { + // TODO: set non-nil value + } else { + for i := 0; i < obj.Len(); i++ { + valueFuzz(obj.Index(i)) + } + } + case reflect.Interface, reflect.Ptr: + if obj.IsNil() { + // TODO: set non-nil value + } else { + valueFuzz(obj.Elem()) + } + case reflect.Struct: + for i, n := 0, obj.NumField(); i < n; i++ { + valueFuzz(obj.Field(i)) + } + case reflect.Map: + if obj.IsNil() { + // TODO: set non-nil value + } else { + for _, k := range obj.MapKeys() { + // map values are not addressable. We need a copy. + v := obj.MapIndex(k) + copy := reflect.New(v.Type()) + copy.Elem().Set(v) + valueFuzz(copy.Elem()) + obj.SetMapIndex(k, copy.Elem()) + } + // TODO: set some new value + } + case reflect.Func: // ignore, we don't have function types in our API + default: + if !obj.CanSet() { + return + } + switch obj.Kind() { + case reflect.String: + obj.SetString(obj.String() + "x") + case reflect.Bool: + obj.SetBool(!obj.Bool()) + case reflect.Float32, reflect.Float64: + obj.SetFloat(obj.Float()*2.0 + 1.0) + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + obj.SetInt(obj.Int() + 1) + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: + obj.SetUint(obj.Uint() + 1) + default: + } + } +} diff --git a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/wholepkg/zz_generated.go b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/wholepkg/zz_generated.go index 5fd2b63c2..d1ec5f6ab 100644 --- a/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/wholepkg/zz_generated.go +++ b/deps/k8s.io/gengo/examples/deepcopy-gen/output_tests/wholepkg/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package wholepkg @@ -24,6 +24,15 @@ import ( otherpkg "k8s.io/gengo/examples/deepcopy-gen/output_tests/otherpkg" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ManualSlice) DeepCopyInto(out *ManualSlice) { + { + in := &in + *out = in.DeepCopy() + return + } +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManualStruct) DeepCopyInto(out *ManualStruct) { *out = in.DeepCopy() @@ -100,12 +109,8 @@ func (in *Struct_Embed_Pointer) DeepCopyInto(out *Struct_Embed_Pointer) { *out = *in if in.int != nil { in, out := &in.int, &out.int - if *in == nil { - *out = nil - } else { - *out = new(int) - **out = **in - } + *out = new(int) + **out = **in } return } @@ -196,58 +201,34 @@ func (in *Struct_Everything) DeepCopyInto(out *Struct_Everything) { out.ManualStructAliasField = in.ManualStructAliasField if in.BoolPtrField != nil { in, out := &in.BoolPtrField, &out.BoolPtrField - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.IntPtrField != nil { in, out := &in.IntPtrField, &out.IntPtrField - if *in == nil { - *out = nil - } else { - *out = new(int) - **out = **in - } + *out = new(int) + **out = **in } if in.StringPtrField != nil { in, out := &in.StringPtrField, &out.StringPtrField - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.FloatPtrField != nil { in, out := &in.FloatPtrField, &out.FloatPtrField - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } + *out = new(float64) + **out = **in } in.PrimitivePointersField.DeepCopyInto(&out.PrimitivePointersField) if in.ManualStructPtrField != nil { in, out := &in.ManualStructPtrField, &out.ManualStructPtrField - if *in == nil { - *out = nil - } else { - *out = new(ManualStruct) - **out = (*in).DeepCopy() - } + x := (*in).DeepCopy() + *out = &x } if in.ManualStructAliasPtrField != nil { in, out := &in.ManualStructAliasPtrField, &out.ManualStructAliasPtrField - if *in == nil { - *out = nil - } else { - *out = new(ManualStruct_Alias) - **out = **in - } + *out = new(ManualStruct_Alias) + **out = **in } if in.SliceBoolField != nil { in, out := &in.SliceBoolField, &out.SliceBoolField @@ -279,12 +260,10 @@ func (in *Struct_Everything) DeepCopyInto(out *Struct_Everything) { in, out := &in.SliceManualStructField, &out.SliceManualStructField *out = make([]ManualStruct, len(*in)) for i := range *in { - (*out)[i] = (*in)[i].DeepCopy() + (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.ManualSliceField != nil { - out.ManualSliceField = in.ManualSliceField.DeepCopy() - } + out.ManualSliceField = in.ManualSliceField.DeepCopy() return } @@ -358,19 +337,13 @@ func (in *Struct_ExplicitSelectorExplicitObject) DeepCopySelector() Selector { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Struct_Interfaces) DeepCopyInto(out *Struct_Interfaces) { *out = *in - if in.ObjectField == nil { - out.ObjectField = nil - } else { + if in.ObjectField != nil { out.ObjectField = in.ObjectField.DeepCopyObject() } - if in.NilObjectField == nil { - out.NilObjectField = nil - } else { + if in.NilObjectField != nil { out.NilObjectField = in.NilObjectField.DeepCopyObject() } - if in.SelectorField == nil { - out.SelectorField = nil - } else { + if in.SelectorField != nil { out.SelectorField = in.SelectorField.DeepCopySelector() } return @@ -468,39 +441,23 @@ func (in *Struct_PrimitivePointers) DeepCopyInto(out *Struct_PrimitivePointers) *out = *in if in.BoolPtrField != nil { in, out := &in.BoolPtrField, &out.BoolPtrField - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.IntPtrField != nil { in, out := &in.IntPtrField, &out.IntPtrField - if *in == nil { - *out = nil - } else { - *out = new(int) - **out = **in - } + *out = new(int) + **out = **in } if in.StringPtrField != nil { in, out := &in.StringPtrField, &out.StringPtrField - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.FloatPtrField != nil { in, out := &in.FloatPtrField, &out.FloatPtrField - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } + *out = new(float64) + **out = **in } return } @@ -520,39 +477,23 @@ func (in *Struct_PrimitivePointers_Alias) DeepCopyInto(out *Struct_PrimitivePoin *out = *in if in.BoolPtrField != nil { in, out := &in.BoolPtrField, &out.BoolPtrField - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.IntPtrField != nil { in, out := &in.IntPtrField, &out.IntPtrField - if *in == nil { - *out = nil - } else { - *out = new(int) - **out = **in - } + *out = new(int) + **out = **in } if in.StringPtrField != nil { in, out := &in.StringPtrField, &out.StringPtrField - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.FloatPtrField != nil { in, out := &in.FloatPtrField, &out.FloatPtrField - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } + *out = new(float64) + **out = **in } return } @@ -666,12 +607,10 @@ func (in *Struct_Slices) DeepCopyInto(out *Struct_Slices) { in, out := &in.SliceManualStructField, &out.SliceManualStructField *out = make([]ManualStruct, len(*in)) for i := range *in { - (*out)[i] = (*in)[i].DeepCopy() + (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.ManualSliceField != nil { - out.ManualSliceField = in.ManualSliceField.DeepCopy() - } + out.ManualSliceField = in.ManualSliceField.DeepCopy() return } @@ -752,12 +691,10 @@ func (in *Struct_Slices_Alias) DeepCopyInto(out *Struct_Slices_Alias) { in, out := &in.SliceManualStructField, &out.SliceManualStructField *out = make([]ManualStruct, len(*in)) for i := range *in { - (*out)[i] = (*in)[i].DeepCopy() + (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.ManualSliceField != nil { - out.ManualSliceField = in.ManualSliceField.DeepCopy() - } + out.ManualSliceField = in.ManualSliceField.DeepCopy() return } diff --git a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/zz_generated.go b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/zz_generated.go index 94a0143e9..637b110e3 100644 --- a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/zz_generated.go +++ b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/empty/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package empty diff --git a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/zz_generated.go b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/zz_generated.go index d79b1a924..b2ba489fd 100644 --- a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/zz_generated.go +++ b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/pointer/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package pointer diff --git a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/zz_generated.go b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/zz_generated.go index f822a57e3..9cef858ec 100644 --- a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/zz_generated.go +++ b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/slices/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package slices diff --git a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/zz_generated.go b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/zz_generated.go index ebcf5ce50..563a0589f 100644 --- a/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/zz_generated.go +++ b/deps/k8s.io/gengo/examples/defaulter-gen/_output_tests/wholepkg/zz_generated.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by defaulter-gen. Do not edit it manually! +// Code generated by defaulter-gen. DO NOT EDIT. package wholepkg diff --git a/deps/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go b/deps/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go index 33490adee..6ab8676a2 100644 --- a/deps/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go +++ b/deps/k8s.io/gengo/examples/defaulter-gen/generators/defaulter.go @@ -203,11 +203,6 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat packages := generator.Packages{} header := append([]byte(fmt.Sprintf("// +build !%s\n\n", arguments.GeneratedBuildTag)), boilerplate...) - header = append(header, []byte( - ` -// This file was autogenerated by defaulter-gen. Do not edit it manually! - -`)...) // Accumulate pre-existing default functions. // TODO: This is too ad-hoc. We need a better way. diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/.gitignore b/deps/k8s.io/gengo/examples/go-to-protobuf/.gitignore deleted file mode 100644 index 0e9aa466b..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -go-to-protobuf diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/.import-restrictions b/deps/k8s.io/gengo/examples/go-to-protobuf/.import-restrictions deleted file mode 100644 index fc4485f2c..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/.import-restrictions +++ /dev/null @@ -1,11 +0,0 @@ -{ - "Rules": [ - { - "SelectorRegexp": "k8s[.]io", - "AllowedPrefixes": [ - "k8s.io/gengo", - "k8s.io/kubernetes/third_party/forked/golang" - ] - } - ] -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/OWNERS b/deps/k8s.io/gengo/examples/go-to-protobuf/OWNERS deleted file mode 100644 index cefd99c34..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -approvers: - - smarterclayton diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/build-image/Dockerfile b/deps/k8s.io/gengo/examples/go-to-protobuf/build-image/Dockerfile deleted file mode 100644 index 1fbfd25ab..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/build-image/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2016 The Kubernetes 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. - -# This file creates a standard build environment for building Kubernetes -FROM k8s.gcr.io/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG - -# Mark this as a kube-build container -RUN touch /kube-build-image - -WORKDIR /go/src/k8s.io/kubernetes - -# Install goimports tool -RUN go get golang.org/x/tools/cmd/goimports diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/main.go b/deps/k8s.io/gengo/examples/go-to-protobuf/main.go deleted file mode 100644 index 2fa9ce464..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/main.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2015 The Kubernetes 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. -*/ - -// go-to-protobuf generates a Protobuf IDL from a Go struct, respecting any -// existing IDL tags on the Go struct. -package main - -import ( - "k8s.io/gengo/examples/go-to-protobuf/protobuf" - - flag "github.com/spf13/pflag" -) - -var g = protobuf.New() - -func init() { - g.BindFlags(flag.CommandLine) -} - -func main() { - flag.Parse() - protobuf.Run(g) -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/cmd.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/cmd.go deleted file mode 100644 index 34183416d..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/cmd.go +++ /dev/null @@ -1,306 +0,0 @@ -/* -Copyright 2015 The Kubernetes 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. -*/ - -// go-to-protobuf generates a Protobuf IDL from a Go struct, respecting any -// existing IDL tags on the Go struct. -package protobuf - -import ( - "bytes" - "fmt" - "log" - "os/exec" - "path/filepath" - "strings" - - "k8s.io/gengo/args" - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/parser" - "k8s.io/gengo/types" - - flag "github.com/spf13/pflag" -) - -type Generator struct { - Common args.GeneratorArgs - Packages string - OutputBase string - ProtoImport []string - Conditional string - Clean bool - OnlyIDL bool - KeepGogoproto bool - SkipGeneratedRewrite bool - DropEmbeddedFields string -} - -func New() *Generator { - sourceTree := args.DefaultSourceTree() - common := args.GeneratorArgs{ - OutputBase: sourceTree, - GoHeaderFilePath: filepath.Join(sourceTree, "k8s.io/kubernetes/hack/boilerplate/boilerplate.go.txt"), - } - defaultProtoImport := filepath.Join(sourceTree, "k8s.io", "kubernetes", "vendor", "github.com", "gogo", "protobuf", "protobuf") - return &Generator{ - Common: common, - OutputBase: sourceTree, - ProtoImport: []string{defaultProtoImport}, - Packages: strings.Join([]string{ - `+k8s.io/kubernetes/pkg/util/intstr`, - `+k8s.io/kubernetes/pkg/api/resource`, - `+k8s.io/kubernetes/pkg/runtime`, - `+k8s.io/kubernetes/pkg/watch/versioned`, - `k8s.io/kubernetes/pkg/api/unversioned`, - `k8s.io/kubernetes/pkg/api/v1`, - `k8s.io/kubernetes/pkg/apis/policy/v1alpha1`, - `k8s.io/kubernetes/pkg/apis/extensions/v1beta1`, - `k8s.io/kubernetes/pkg/apis/autoscaling/v1`, - `k8s.io/kubernetes/pkg/apis/authorization/v1beta1`, - `k8s.io/kubernetes/pkg/apis/batch/v1`, - `k8s.io/kubernetes/pkg/apis/batch/v2alpha1`, - `k8s.io/kubernetes/pkg/apis/apps/v1alpha1`, - `k8s.io/kubernetes/pkg/apis/authentication/v1beta1`, - `k8s.io/kubernetes/pkg/apis/rbac/v1alpha1`, - `k8s.io/kubernetes/federation/apis/federation/v1beta1`, - `k8s.io/kubernetes/pkg/apis/certificates/v1alpha1`, - `k8s.io/kubernetes/pkg/apis/imagepolicy/v1alpha1`, - }, ","), - DropEmbeddedFields: "k8s.io/kubernetes/pkg/api/unversioned.TypeMeta", - } -} - -func (g *Generator) BindFlags(flag *flag.FlagSet) { - flag.StringVarP(&g.Common.GoHeaderFilePath, "go-header-file", "h", g.Common.GoHeaderFilePath, "File containing boilerplate header text. The string YEAR will be replaced with the current 4-digit year.") - flag.BoolVar(&g.Common.VerifyOnly, "verify-only", g.Common.VerifyOnly, "If true, only verify existing output, do not write anything.") - flag.StringVarP(&g.Packages, "packages", "p", g.Packages, "comma-separated list of directories to get input types from. Directories prefixed with '-' are not generated, directories prefixed with '+' only create types with explicit IDL instructions.") - flag.StringVarP(&g.OutputBase, "output-base", "o", g.OutputBase, "Output base; defaults to $GOPATH/src/") - flag.StringSliceVar(&g.ProtoImport, "proto-import", g.ProtoImport, "The search path for the core protobuf .protos, required, defaults to GODEPS on path.") - flag.StringVar(&g.Conditional, "conditional", g.Conditional, "An optional Golang build tag condition to add to the generated Go code") - flag.BoolVar(&g.Clean, "clean", g.Clean, "If true, remove all generated files for the specified Packages.") - flag.BoolVar(&g.OnlyIDL, "only-idl", g.OnlyIDL, "If true, only generate the IDL for each package.") - flag.BoolVar(&g.KeepGogoproto, "keep-gogoproto", g.KeepGogoproto, "If true, the generated IDL will contain gogoprotobuf extensions which are normally removed") - flag.BoolVar(&g.SkipGeneratedRewrite, "skip-generated-rewrite", g.SkipGeneratedRewrite, "If true, skip fixing up the generated.pb.go file (debugging only).") - flag.StringVar(&g.DropEmbeddedFields, "drop-embedded-fields", g.DropEmbeddedFields, "Comma-delimited list of embedded Go types to omit from generated protobufs") -} - -func Run(g *Generator) { - if g.Common.VerifyOnly { - g.OnlyIDL = true - g.Clean = false - } - - b := parser.New() - b.AddBuildTags("proto") - - omitTypes := map[types.Name]struct{}{} - for _, t := range strings.Split(g.DropEmbeddedFields, ",") { - name := types.Name{} - if i := strings.LastIndex(t, "."); i != -1 { - name.Package, name.Name = t[:i], t[i+1:] - } else { - name.Name = t - } - if len(name.Name) == 0 { - log.Fatalf("--drop-embedded-types requires names in the form of [GOPACKAGE.]TYPENAME: %v", t) - } - omitTypes[name] = struct{}{} - } - - boilerplate, err := g.Common.LoadGoBoilerplate() - if err != nil { - log.Fatalf("Failed loading boilerplate: %v", err) - } - - protobufNames := NewProtobufNamer() - outputPackages := generator.Packages{} - for _, d := range strings.Split(g.Packages, ",") { - generateAllTypes, outputPackage := true, true - switch { - case strings.HasPrefix(d, "+"): - d = d[1:] - generateAllTypes = false - case strings.HasPrefix(d, "-"): - d = d[1:] - outputPackage = false - } - name := protoSafePackage(d) - parts := strings.SplitN(d, "=", 2) - if len(parts) > 1 { - d = parts[0] - name = parts[1] - } - p := newProtobufPackage(d, name, generateAllTypes, omitTypes) - header := append([]byte{}, boilerplate...) - header = append(header, p.HeaderText...) - p.HeaderText = header - protobufNames.Add(p) - if outputPackage { - outputPackages = append(outputPackages, p) - } - } - - if !g.Common.VerifyOnly { - for _, p := range outputPackages { - if err := p.(*protobufPackage).Clean(g.OutputBase); err != nil { - log.Fatalf("Unable to clean package %s: %v", p.Name(), err) - } - } - } - - if g.Clean { - return - } - - for _, p := range protobufNames.List() { - if err := b.AddDir(p.Path()); err != nil { - log.Fatalf("Unable to add directory %q: %v", p.Path(), err) - } - } - - c, err := generator.NewContext( - b, - namer.NameSystems{ - "public": namer.NewPublicNamer(3), - "proto": protobufNames, - }, - "public", - ) - if err != nil { - log.Fatalf("Failed making a context: %v", err) - } - - c.Verify = g.Common.VerifyOnly - c.FileTypes["protoidl"] = NewProtoFile() - - if err := protobufNames.AssignTypesToPackages(c); err != nil { - log.Fatalf("Failed to identify Common types: %v", err) - } - - if err := c.ExecutePackages(g.OutputBase, outputPackages); err != nil { - log.Fatalf("Failed executing generator: %v", err) - } - - if g.OnlyIDL { - return - } - - if _, err := exec.LookPath("protoc"); err != nil { - log.Fatalf("Unable to find 'protoc': %v", err) - } - - searchArgs := []string{"-I", ".", "-I", g.OutputBase} - if len(g.ProtoImport) != 0 { - for _, s := range g.ProtoImport { - searchArgs = append(searchArgs, "-I", s) - } - } - args := append(searchArgs, fmt.Sprintf("--gogo_out=%s", g.OutputBase)) - - buf := &bytes.Buffer{} - if len(g.Conditional) > 0 { - fmt.Fprintf(buf, "// +build %s\n\n", g.Conditional) - } - buf.Write(boilerplate) - - for _, outputPackage := range outputPackages { - p := outputPackage.(*protobufPackage) - - path := filepath.Join(g.OutputBase, p.ImportPath()) - outputPath := filepath.Join(g.OutputBase, p.OutputPath()) - - // generate the gogoprotobuf protoc - cmd := exec.Command("protoc", append(args, path)...) - out, err := cmd.CombinedOutput() - if len(out) > 0 { - log.Printf(string(out)) - } - if err != nil { - log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to generate protoc on %s: %v", p.PackageName, err) - } - - if g.SkipGeneratedRewrite { - continue - } - - // alter the generated protobuf file to remove the generated types (but leave the serializers) and rewrite the - // package statement to match the desired package name - if err := RewriteGeneratedGogoProtobufFile(outputPath, p.ExtractGeneratedType, p.OptionalTypeName, buf.Bytes()); err != nil { - log.Fatalf("Unable to rewrite generated %s: %v", outputPath, err) - } - - // sort imports - cmd = exec.Command("goimports", "-w", outputPath) - out, err = cmd.CombinedOutput() - if len(out) > 0 { - log.Printf(string(out)) - } - if err != nil { - log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to rewrite imports for %s: %v", p.PackageName, err) - } - - // format and simplify the generated file - cmd = exec.Command("gofmt", "-s", "-w", outputPath) - out, err = cmd.CombinedOutput() - if len(out) > 0 { - log.Printf(string(out)) - } - if err != nil { - log.Println(strings.Join(cmd.Args, " ")) - log.Fatalf("Unable to apply gofmt for %s: %v", p.PackageName, err) - } - } - - if g.SkipGeneratedRewrite { - return - } - - if !g.KeepGogoproto { - // generate, but do so without gogoprotobuf extensions - for _, outputPackage := range outputPackages { - p := outputPackage.(*protobufPackage) - p.OmitGogo = true - } - if err := c.ExecutePackages(g.OutputBase, outputPackages); err != nil { - log.Fatalf("Failed executing generator: %v", err) - } - } - - for _, outputPackage := range outputPackages { - p := outputPackage.(*protobufPackage) - - if len(p.StructTags) == 0 { - continue - } - - pattern := filepath.Join(g.OutputBase, p.PackagePath, "*.go") - files, err := filepath.Glob(pattern) - if err != nil { - log.Fatalf("Can't glob pattern %q: %v", pattern, err) - } - - for _, s := range files { - if strings.HasSuffix(s, "_test.go") { - continue - } - if err := RewriteTypesWithProtobufStructTags(s, p.StructTags); err != nil { - log.Fatalf("Unable to rewrite with struct tags %s: %v", s, err) - } - } - } -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/generator.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/generator.go deleted file mode 100644 index 9ef54e564..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/generator.go +++ /dev/null @@ -1,762 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import ( - "fmt" - "io" - "log" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/golang/glog" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -// genProtoIDL produces a .proto IDL. -type genProtoIDL struct { - generator.DefaultGen - localPackage types.Name - localGoPackage types.Name - imports namer.ImportTracker - - generateAll bool - omitGogo bool - omitFieldTypes map[types.Name]struct{} -} - -func (g *genProtoIDL) PackageVars(c *generator.Context) []string { - if g.omitGogo { - return []string{ - fmt.Sprintf("option go_package = %q;", g.localGoPackage.Name), - } - } - return []string{ - "option (gogoproto.marshaler_all) = true;", - "option (gogoproto.sizer_all) = true;", - "option (gogoproto.goproto_stringer_all) = false;", - "option (gogoproto.stringer_all) = true;", - "option (gogoproto.unmarshaler_all) = true;", - "option (gogoproto.goproto_unrecognized_all) = false;", - "option (gogoproto.goproto_enum_prefix_all) = false;", - "option (gogoproto.goproto_getters_all) = false;", - fmt.Sprintf("option go_package = %q;", g.localGoPackage.Name), - } -} -func (g *genProtoIDL) Filename() string { return g.OptionalName + ".proto" } -func (g *genProtoIDL) FileType() string { return "protoidl" } -func (g *genProtoIDL) Namers(c *generator.Context) namer.NameSystems { - return namer.NameSystems{ - // The local namer returns the correct protobuf name for a proto type - // in the context of a package - "local": localNamer{g.localPackage}, - } -} - -// Filter ignores types that are identified as not exportable. -func (g *genProtoIDL) Filter(c *generator.Context, t *types.Type) bool { - tagVals := types.ExtractCommentTags("+", t.CommentLines)["protobuf"] - if tagVals != nil { - if tagVals[0] == "false" { - // Type specified "false". - return false - } - if tagVals[0] == "true" { - // Type specified "true". - return true - } - glog.Fatalf(`Comment tag "protobuf" must be true or false, found: %q`, tagVals[0]) - } - if !g.generateAll { - // We're not generating everything. - return false - } - seen := map[*types.Type]bool{} - ok := isProtoable(seen, t) - return ok -} - -func isProtoable(seen map[*types.Type]bool, t *types.Type) bool { - if seen[t] { - // be optimistic in the case of type cycles. - return true - } - seen[t] = true - switch t.Kind { - case types.Builtin: - return true - case types.Alias: - return isProtoable(seen, t.Underlying) - case types.Slice, types.Pointer: - return isProtoable(seen, t.Elem) - case types.Map: - return isProtoable(seen, t.Key) && isProtoable(seen, t.Elem) - case types.Struct: - for _, m := range t.Members { - if isProtoable(seen, m.Type) { - return true - } - } - return false - case types.Func, types.Chan: - return false - case types.DeclarationOf, types.Unknown, types.Unsupported: - return false - case types.Interface: - return false - default: - log.Printf("WARNING: type %q is not portable: %s", t.Kind, t.Name) - return false - } -} - -// isOptionalAlias should return true if the specified type has an underlying type -// (is an alias) of a map or slice and has the comment tag protobuf.nullable=true, -// indicating that the type should be nullable in protobuf. -func isOptionalAlias(t *types.Type) bool { - if t.Underlying == nil || (t.Underlying.Kind != types.Map && t.Underlying.Kind != types.Slice) { - return false - } - if extractBoolTagOrDie("protobuf.nullable", t.CommentLines) == false { - return false - } - return true -} - -func (g *genProtoIDL) Imports(c *generator.Context) (imports []string) { - lines := []string{} - // TODO: this could be expressed more cleanly - for _, line := range g.imports.ImportLines() { - if g.omitGogo && line == "github.com/gogo/protobuf/gogoproto/gogo.proto" { - continue - } - lines = append(lines, line) - } - return lines -} - -// GenerateType makes the body of a file implementing a set for type t. -func (g *genProtoIDL) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { - sw := generator.NewSnippetWriter(w, c, "$", "$") - b := bodyGen{ - locator: &protobufLocator{ - namer: c.Namers["proto"].(ProtobufFromGoNamer), - tracker: g.imports, - universe: c.Universe, - - localGoPackage: g.localGoPackage.Package, - }, - localPackage: g.localPackage, - - omitGogo: g.omitGogo, - omitFieldTypes: g.omitFieldTypes, - - t: t, - } - switch t.Kind { - case types.Alias: - return b.doAlias(sw) - case types.Struct: - return b.doStruct(sw) - default: - return b.unknown(sw) - } -} - -// ProtobufFromGoNamer finds the protobuf name of a type (and its package, and -// the package path) from its Go name. -type ProtobufFromGoNamer interface { - GoNameToProtoName(name types.Name) types.Name -} - -type ProtobufLocator interface { - ProtoTypeFor(t *types.Type) (*types.Type, error) - GoTypeForName(name types.Name) *types.Type - CastTypeName(name types.Name) string -} - -type protobufLocator struct { - namer ProtobufFromGoNamer - tracker namer.ImportTracker - universe types.Universe - - localGoPackage string -} - -// CastTypeName returns the cast type name of a Go type -// TODO: delegate to a new localgo namer? -func (p protobufLocator) CastTypeName(name types.Name) string { - if name.Package == p.localGoPackage { - return name.Name - } - return name.String() -} - -func (p protobufLocator) GoTypeForName(name types.Name) *types.Type { - if len(name.Package) == 0 { - name.Package = p.localGoPackage - } - return p.universe.Type(name) -} - -// ProtoTypeFor locates a Protobuf type for the provided Go type (if possible). -func (p protobufLocator) ProtoTypeFor(t *types.Type) (*types.Type, error) { - switch { - // we've already converted the type, or it's a map - case t.Kind == types.Protobuf || t.Kind == types.Map: - p.tracker.AddType(t) - return t, nil - } - // it's a fundamental type - if t, ok := isFundamentalProtoType(t); ok { - p.tracker.AddType(t) - return t, nil - } - // it's a message - if t.Kind == types.Struct || isOptionalAlias(t) { - t := &types.Type{ - Name: p.namer.GoNameToProtoName(t.Name), - Kind: types.Protobuf, - - CommentLines: t.CommentLines, - } - p.tracker.AddType(t) - return t, nil - } - return nil, errUnrecognizedType -} - -type bodyGen struct { - locator ProtobufLocator - localPackage types.Name - omitGogo bool - omitFieldTypes map[types.Name]struct{} - - t *types.Type -} - -func (b bodyGen) unknown(sw *generator.SnippetWriter) error { - return fmt.Errorf("not sure how to generate: %#v", b.t) -} - -func (b bodyGen) doAlias(sw *generator.SnippetWriter) error { - if !isOptionalAlias(b.t) { - return nil - } - - var kind string - switch b.t.Underlying.Kind { - case types.Map: - kind = "map" - default: - kind = "slice" - } - optional := &types.Type{ - Name: b.t.Name, - Kind: types.Struct, - - CommentLines: b.t.CommentLines, - SecondClosestCommentLines: b.t.SecondClosestCommentLines, - Members: []types.Member{ - { - Name: "Items", - CommentLines: []string{fmt.Sprintf("items, if empty, will result in an empty %s\n", kind)}, - Type: b.t.Underlying, - }, - }, - } - nested := b - nested.t = optional - return nested.doStruct(sw) -} - -func (b bodyGen) doStruct(sw *generator.SnippetWriter) error { - if len(b.t.Name.Name) == 0 { - return nil - } - if namer.IsPrivateGoName(b.t.Name.Name) { - return nil - } - - var alias *types.Type - var fields []protoField - options := []string{} - allOptions := types.ExtractCommentTags("+", b.t.CommentLines) - for k, v := range allOptions { - switch { - case strings.HasPrefix(k, "protobuf.options."): - key := strings.TrimPrefix(k, "protobuf.options.") - switch key { - case "marshal": - if v[0] == "false" { - if !b.omitGogo { - options = append(options, - "(gogoproto.marshaler) = false", - "(gogoproto.unmarshaler) = false", - "(gogoproto.sizer) = false", - ) - } - } - default: - if !b.omitGogo || !strings.HasPrefix(key, "(gogoproto.") { - if key == "(gogoproto.goproto_stringer)" && v[0] == "false" { - options = append(options, "(gogoproto.stringer) = false") - } - options = append(options, fmt.Sprintf("%s = %s", key, v[0])) - } - } - // protobuf.as allows a type to have the same message contents as another Go type - case k == "protobuf.as": - fields = nil - if alias = b.locator.GoTypeForName(types.Name{Name: v[0]}); alias == nil { - return fmt.Errorf("type %v references alias %q which does not exist", b.t, v[0]) - } - // protobuf.embed instructs the generator to use the named type in this package - // as an embedded message. - case k == "protobuf.embed": - fields = []protoField{ - { - Tag: 1, - Name: v[0], - Type: &types.Type{ - Name: types.Name{ - Name: v[0], - Package: b.localPackage.Package, - Path: b.localPackage.Path, - }, - }, - }, - } - } - } - if alias == nil { - alias = b.t - } - - // If we don't explicitly embed anything, generate fields by traversing fields. - if fields == nil { - memberFields, err := membersToFields(b.locator, alias, b.localPackage, b.omitFieldTypes) - if err != nil { - return fmt.Errorf("type %v cannot be converted to protobuf: %v", b.t, err) - } - fields = memberFields - } - - out := sw.Out() - genComment(out, b.t.CommentLines, "") - sw.Do(`message $.Name.Name$ { -`, b.t) - - if len(options) > 0 { - sort.Sort(sort.StringSlice(options)) - for _, s := range options { - fmt.Fprintf(out, " option %s;\n", s) - } - fmt.Fprintln(out) - } - - for i, field := range fields { - genComment(out, field.CommentLines, " ") - fmt.Fprintf(out, " ") - switch { - case field.Map: - case field.Repeated: - fmt.Fprintf(out, "repeated ") - case field.Required: - fmt.Fprintf(out, "required ") - default: - fmt.Fprintf(out, "optional ") - } - sw.Do(`$.Type|local$ $.Name$ = $.Tag$`, field) - if len(field.Extras) > 0 { - extras := []string{} - for k, v := range field.Extras { - if b.omitGogo && strings.HasPrefix(k, "(gogoproto.") { - continue - } - extras = append(extras, fmt.Sprintf("%s = %s", k, v)) - } - sort.Sort(sort.StringSlice(extras)) - if len(extras) > 0 { - fmt.Fprintf(out, " [") - fmt.Fprint(out, strings.Join(extras, ", ")) - fmt.Fprintf(out, "]") - } - } - fmt.Fprintf(out, ";\n") - if i != len(fields)-1 { - fmt.Fprintf(out, "\n") - } - } - fmt.Fprintf(out, "}\n\n") - return nil -} - -type protoField struct { - LocalPackage types.Name - - Tag int - Name string - Type *types.Type - Map bool - Repeated bool - Optional bool - Required bool - Nullable bool - Extras map[string]string - - CommentLines []string -} - -var ( - errUnrecognizedType = fmt.Errorf("did not recognize the provided type") -) - -func isFundamentalProtoType(t *types.Type) (*types.Type, bool) { - // TODO: when we enable proto3, also include other fundamental types in the google.protobuf package - // switch { - // case t.Kind == types.Struct && t.Name == types.Name{Package: "time", Name: "Time"}: - // return &types.Type{ - // Kind: types.Protobuf, - // Name: types.Name{Path: "google/protobuf/timestamp.proto", Package: "google.protobuf", Name: "Timestamp"}, - // }, true - // } - switch t.Kind { - case types.Slice: - if t.Elem.Name.Name == "byte" && len(t.Elem.Name.Package) == 0 { - return &types.Type{Name: types.Name{Name: "bytes"}, Kind: types.Protobuf}, true - } - case types.Builtin: - switch t.Name.Name { - case "string", "uint32", "int32", "uint64", "int64", "bool": - return &types.Type{Name: types.Name{Name: t.Name.Name}, Kind: types.Protobuf}, true - case "int": - return &types.Type{Name: types.Name{Name: "int64"}, Kind: types.Protobuf}, true - case "uint": - return &types.Type{Name: types.Name{Name: "uint64"}, Kind: types.Protobuf}, true - case "float64", "float": - return &types.Type{Name: types.Name{Name: "double"}, Kind: types.Protobuf}, true - case "float32": - return &types.Type{Name: types.Name{Name: "float"}, Kind: types.Protobuf}, true - case "uintptr": - return &types.Type{Name: types.Name{Name: "uint64"}, Kind: types.Protobuf}, true - } - // TODO: complex? - } - return t, false -} - -func memberTypeToProtobufField(locator ProtobufLocator, field *protoField, t *types.Type) error { - var err error - switch t.Kind { - case types.Protobuf: - field.Type, err = locator.ProtoTypeFor(t) - case types.Builtin: - field.Type, err = locator.ProtoTypeFor(t) - case types.Map: - valueField := &protoField{} - if err := memberTypeToProtobufField(locator, valueField, t.Elem); err != nil { - return err - } - keyField := &protoField{} - if err := memberTypeToProtobufField(locator, keyField, t.Key); err != nil { - return err - } - // All other protobuf types have kind types.Protobuf, so setting types.Map - // here would be very misleading. - field.Type = &types.Type{ - Kind: types.Protobuf, - Key: keyField.Type, - Elem: valueField.Type, - } - if !strings.HasPrefix(t.Name.Name, "map[") { - field.Extras["(gogoproto.casttype)"] = strconv.Quote(locator.CastTypeName(t.Name)) - } - if k, ok := keyField.Extras["(gogoproto.casttype)"]; ok { - field.Extras["(gogoproto.castkey)"] = k - } - if v, ok := valueField.Extras["(gogoproto.casttype)"]; ok { - field.Extras["(gogoproto.castvalue)"] = v - } - field.Map = true - case types.Pointer: - if err := memberTypeToProtobufField(locator, field, t.Elem); err != nil { - return err - } - field.Nullable = true - case types.Alias: - if isOptionalAlias(t) { - field.Type, err = locator.ProtoTypeFor(t) - field.Nullable = true - } else { - if err := memberTypeToProtobufField(locator, field, t.Underlying); err != nil { - log.Printf("failed to alias: %s %s: err %v", t.Name, t.Underlying.Name, err) - return err - } - if field.Extras == nil { - field.Extras = make(map[string]string) - } - field.Extras["(gogoproto.casttype)"] = strconv.Quote(locator.CastTypeName(t.Name)) - } - case types.Slice: - if t.Elem.Name.Name == "byte" && len(t.Elem.Name.Package) == 0 { - field.Type = &types.Type{Name: types.Name{Name: "bytes"}, Kind: types.Protobuf} - return nil - } - if err := memberTypeToProtobufField(locator, field, t.Elem); err != nil { - return err - } - field.Repeated = true - case types.Struct: - if len(t.Name.Name) == 0 { - return errUnrecognizedType - } - field.Type, err = locator.ProtoTypeFor(t) - field.Nullable = false - default: - return errUnrecognizedType - } - return err -} - -// protobufTagToField extracts information from an existing protobuf tag -func protobufTagToField(tag string, field *protoField, m types.Member, t *types.Type, localPackage types.Name) error { - if len(tag) == 0 || tag == "-" { - return nil - } - - // protobuf:"bytes,3,opt,name=Id,customtype=github.com/gogo/protobuf/test.Uuid" - parts := strings.Split(tag, ",") - if len(parts) < 3 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, not enough segments\n", m.Name, t.Name) - } - protoTag, err := strconv.Atoi(parts[1]) - if err != nil { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, field ID is %q which is not an integer: %v\n", m.Name, t.Name, parts[1], err) - } - field.Tag = protoTag - - // In general there is doesn't make sense to parse the protobuf tags to get the type, - // as all auto-generated once will have wire type "bytes", "varint" or "fixed64". - // However, sometimes we explicitly set them to have a custom serialization, e.g.: - // type Time struct { - // time.Time `protobuf:"Timestamp,1,req,name=time"` - // } - // to force the generator to use a given type (that we manually wrote serialization & - // deserialization methods for). - switch parts[0] { - case "varint", "fixed32", "fixed64", "bytes", "group": - default: - name := types.Name{} - if last := strings.LastIndex(parts[0], "."); last != -1 { - prefix := parts[0][:last] - name = types.Name{ - Name: parts[0][last+1:], - Package: prefix, - Path: strings.Replace(prefix, ".", "/", -1), - } - } else { - name = types.Name{ - Name: parts[0], - Package: localPackage.Package, - Path: localPackage.Path, - } - } - field.Type = &types.Type{ - Name: name, - Kind: types.Protobuf, - } - } - - protoExtra := make(map[string]string) - for i, extra := range parts[3:] { - parts := strings.SplitN(extra, "=", 2) - if len(parts) != 2 { - return fmt.Errorf("member %q of %q malformed 'protobuf' tag, tag %d should be key=value, got %q\n", m.Name, t.Name, i+4, extra) - } - switch parts[0] { - case "name": - protoExtra[parts[0]] = parts[1] - case "casttype", "castkey", "castvalue": - parts[0] = fmt.Sprintf("(gogoproto.%s)", parts[0]) - protoExtra[parts[0]] = parts[1] - } - } - - field.Extras = protoExtra - if name, ok := protoExtra["name"]; ok { - field.Name = name - delete(protoExtra, "name") - } - - return nil -} - -func membersToFields(locator ProtobufLocator, t *types.Type, localPackage types.Name, omitFieldTypes map[types.Name]struct{}) ([]protoField, error) { - fields := []protoField{} - - for _, m := range t.Members { - if namer.IsPrivateGoName(m.Name) { - // skip private fields - continue - } - if _, ok := omitFieldTypes[types.Name{Name: m.Type.Name.Name, Package: m.Type.Name.Package}]; ok { - continue - } - tags := reflect.StructTag(m.Tags) - field := protoField{ - LocalPackage: localPackage, - - Tag: -1, - Extras: make(map[string]string), - } - - protobufTag := tags.Get("protobuf") - if protobufTag == "-" { - continue - } - - if err := protobufTagToField(protobufTag, &field, m, t, localPackage); err != nil { - return nil, err - } - - // extract information from JSON field tag - if tag := tags.Get("json"); len(tag) > 0 { - parts := strings.Split(tag, ",") - if len(field.Name) == 0 && len(parts[0]) != 0 { - field.Name = parts[0] - } - if field.Tag == -1 && field.Name == "-" { - continue - } - } - - if field.Type == nil { - if err := memberTypeToProtobufField(locator, &field, m.Type); err != nil { - return nil, fmt.Errorf("unable to embed type %q as field %q in %q: %v", m.Type, field.Name, t.Name, err) - } - } - if len(field.Name) == 0 { - field.Name = namer.IL(m.Name) - } - - if field.Map && field.Repeated { - // maps cannot be repeated - field.Repeated = false - field.Nullable = true - } - - if !field.Nullable { - field.Extras["(gogoproto.nullable)"] = "false" - } - if (field.Type.Name.Name == "bytes" && field.Type.Name.Package == "") || (field.Repeated && field.Type.Name.Package == "" && namer.IsPrivateGoName(field.Type.Name.Name)) { - delete(field.Extras, "(gogoproto.nullable)") - } - if field.Name != m.Name { - field.Extras["(gogoproto.customname)"] = strconv.Quote(m.Name) - } - field.CommentLines = m.CommentLines - fields = append(fields, field) - } - - // assign tags - highest := 0 - byTag := make(map[int]*protoField) - // fields are in Go struct order, which we preserve - for i := range fields { - field := &fields[i] - tag := field.Tag - if tag != -1 { - if existing, ok := byTag[tag]; ok { - return nil, fmt.Errorf("field %q and %q both have tag %d", field.Name, existing.Name, tag) - } - byTag[tag] = field - } - if tag > highest { - highest = tag - } - } - // starting from the highest observed tag, assign new field tags - for i := range fields { - field := &fields[i] - if field.Tag != -1 { - continue - } - highest++ - field.Tag = highest - byTag[field.Tag] = field - } - return fields, nil -} - -func genComment(out io.Writer, lines []string, indent string) { - for { - l := len(lines) - if l == 0 || len(lines[l-1]) != 0 { - break - } - lines = lines[:l-1] - } - for _, c := range lines { - fmt.Fprintf(out, "%s// %s\n", indent, c) - } -} - -func formatProtoFile(source []byte) ([]byte, error) { - // TODO; Is there any protobuf formatter? - return source, nil -} - -func assembleProtoFile(w io.Writer, f *generator.File) { - w.Write(f.Header) - - fmt.Fprint(w, "syntax = 'proto2';\n\n") - - if len(f.PackageName) > 0 { - fmt.Fprintf(w, "package %s;\n\n", f.PackageName) - } - - if len(f.Imports) > 0 { - imports := []string{} - for i := range f.Imports { - imports = append(imports, i) - } - sort.Strings(imports) - for _, s := range imports { - fmt.Fprintf(w, "import %q;\n", s) - } - fmt.Fprint(w, "\n") - } - - if f.Vars.Len() > 0 { - fmt.Fprintf(w, "%s\n", f.Vars.String()) - } - - w.Write(f.Body.Bytes()) -} - -func NewProtoFile() *generator.DefaultFileType { - return &generator.DefaultFileType{ - Format: formatProtoFile, - Assemble: assembleProtoFile, - } -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/import_tracker.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/import_tracker.go deleted file mode 100644 index 08a991b15..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/import_tracker.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import ( - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -type ImportTracker struct { - namer.DefaultImportTracker -} - -func NewImportTracker(local types.Name, typesToAdd ...*types.Type) *ImportTracker { - tracker := namer.NewDefaultImportTracker(local) - tracker.IsInvalidType = func(t *types.Type) bool { return t.Kind != types.Protobuf } - tracker.LocalName = func(name types.Name) string { return name.Package } - tracker.PrintImport = func(path, name string) string { return path } - - tracker.AddTypes(typesToAdd...) - return &ImportTracker{ - DefaultImportTracker: tracker, - } -} - -// AddNullable ensures that support for the nullable Gogo-protobuf extension is added. -func (tracker *ImportTracker) AddNullable() { - tracker.AddType(&types.Type{ - Kind: types.Protobuf, - Name: types.Name{ - Name: "nullable", - Package: "gogoproto", - Path: "github.com/gogo/protobuf/gogoproto/gogo.proto", - }, - }) -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer.go deleted file mode 100644 index 60060d4ed..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer.go +++ /dev/null @@ -1,186 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import ( - "fmt" - "reflect" - "strings" - - "k8s.io/gengo/generator" - "k8s.io/gengo/namer" - "k8s.io/gengo/types" -) - -type localNamer struct { - localPackage types.Name -} - -func (n localNamer) Name(t *types.Type) string { - if t.Key != nil && t.Elem != nil { - return fmt.Sprintf("map<%s, %s>", n.Name(t.Key), n.Name(t.Elem)) - } - if len(n.localPackage.Package) != 0 && n.localPackage.Package == t.Name.Package { - return t.Name.Name - } - return t.Name.String() -} - -type protobufNamer struct { - packages []*protobufPackage - packagesByPath map[string]*protobufPackage -} - -func NewProtobufNamer() *protobufNamer { - return &protobufNamer{ - packagesByPath: make(map[string]*protobufPackage), - } -} - -func (n *protobufNamer) Name(t *types.Type) string { - if t.Kind == types.Map { - return fmt.Sprintf("map<%s, %s>", n.Name(t.Key), n.Name(t.Elem)) - } - return t.Name.String() -} - -func (n *protobufNamer) List() []generator.Package { - packages := make([]generator.Package, 0, len(n.packages)) - for i := range n.packages { - packages = append(packages, n.packages[i]) - } - return packages -} - -func (n *protobufNamer) Add(p *protobufPackage) { - if _, ok := n.packagesByPath[p.PackagePath]; !ok { - n.packagesByPath[p.PackagePath] = p - n.packages = append(n.packages, p) - } -} - -func (n *protobufNamer) GoNameToProtoName(name types.Name) types.Name { - if p, ok := n.packagesByPath[name.Package]; ok { - return types.Name{ - Name: name.Name, - Package: p.PackageName, - Path: p.ImportPath(), - } - } - for _, p := range n.packages { - if _, ok := p.FilterTypes[name]; ok { - return types.Name{ - Name: name.Name, - Package: p.PackageName, - Path: p.ImportPath(), - } - } - } - return types.Name{Name: name.Name} -} - -func protoSafePackage(name string) string { - pkg := strings.Replace(name, "/", ".", -1) - return strings.Replace(pkg, "-", "_", -1) -} - -type typeNameSet map[types.Name]*protobufPackage - -// assignGoTypeToProtoPackage looks for Go and Protobuf types that are referenced by a type in -// a package. It will not recurse into protobuf types. -func assignGoTypeToProtoPackage(p *protobufPackage, t *types.Type, local, global typeNameSet, optional map[types.Name]struct{}) { - newT, isProto := isFundamentalProtoType(t) - if isProto { - t = newT - } - if otherP, ok := global[t.Name]; ok { - if _, ok := local[t.Name]; !ok { - p.Imports.AddType(&types.Type{ - Kind: types.Protobuf, - Name: otherP.ProtoTypeName(), - }) - } - return - } - global[t.Name] = p - if _, ok := local[t.Name]; ok { - return - } - // don't recurse into existing proto types - if isProto { - p.Imports.AddType(t) - return - } - - local[t.Name] = p - for _, m := range t.Members { - if namer.IsPrivateGoName(m.Name) { - continue - } - field := &protoField{} - tag := reflect.StructTag(m.Tags).Get("protobuf") - if tag == "-" { - continue - } - if err := protobufTagToField(tag, field, m, t, p.ProtoTypeName()); err == nil && field.Type != nil { - assignGoTypeToProtoPackage(p, field.Type, local, global, optional) - continue - } - assignGoTypeToProtoPackage(p, m.Type, local, global, optional) - } - // TODO: should methods be walked? - if t.Elem != nil { - assignGoTypeToProtoPackage(p, t.Elem, local, global, optional) - } - if t.Key != nil { - assignGoTypeToProtoPackage(p, t.Key, local, global, optional) - } - if t.Underlying != nil { - if t.Kind == types.Alias && isOptionalAlias(t) { - optional[t.Name] = struct{}{} - } - assignGoTypeToProtoPackage(p, t.Underlying, local, global, optional) - } -} - -func (n *protobufNamer) AssignTypesToPackages(c *generator.Context) error { - global := make(typeNameSet) - for _, p := range n.packages { - local := make(typeNameSet) - optional := make(map[types.Name]struct{}) - p.Imports = NewImportTracker(p.ProtoTypeName()) - for _, t := range c.Order { - if t.Name.Package != p.PackagePath { - continue - } - assignGoTypeToProtoPackage(p, t, local, global, optional) - } - p.FilterTypes = make(map[types.Name]struct{}) - p.LocalNames = make(map[string]struct{}) - p.OptionalTypeNames = make(map[string]struct{}) - for k, v := range local { - if v == p { - p.FilterTypes[k] = struct{}{} - p.LocalNames[k.Name] = struct{}{} - if _, ok := optional[k]; ok { - p.OptionalTypeNames[k.Name] = struct{}{} - } - } - } - } - return nil -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer_test.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer_test.go deleted file mode 100644 index 0ee71f80b..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/namer_test.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import "testing" - -func TestProtoSafePackage(t *testing.T) { - tests := []struct { - pkg string - expected string - }{ - { - pkg: "foo", - expected: "foo", - }, - { - pkg: "foo/bar", - expected: "foo.bar", - }, - { - pkg: "foo/bar/baz", - expected: "foo.bar.baz", - }, - { - pkg: "foo/bar-baz/x/y-z/q", - expected: "foo.bar_baz.x.y_z.q", - }, - } - - for _, test := range tests { - actual := protoSafePackage(test.pkg) - if e, a := test.expected, actual; e != a { - t.Errorf("%s: expected %s, got %s", test.pkg, e, a) - } - } -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/package.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/package.go deleted file mode 100644 index 055d71577..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/package.go +++ /dev/null @@ -1,211 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import ( - "fmt" - "go/ast" - "log" - "os" - "path/filepath" - "reflect" - "strings" - - "k8s.io/gengo/generator" - "k8s.io/gengo/types" -) - -func newProtobufPackage(packagePath, packageName string, generateAll bool, omitFieldTypes map[types.Name]struct{}) *protobufPackage { - pkg := &protobufPackage{ - DefaultPackage: generator.DefaultPackage{ - // The protobuf package name (foo.bar.baz) - PackageName: packageName, - // A path segment relative to the GOPATH root (foo/bar/baz) - PackagePath: packagePath, - HeaderText: []byte( - ` -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -`), - PackageDocumentation: []byte(fmt.Sprintf( - `// Package %s is an autogenerated protobuf IDL. -`, packageName)), - }, - GenerateAll: generateAll, - OmitFieldTypes: omitFieldTypes, - } - pkg.FilterFunc = pkg.filterFunc - pkg.GeneratorFunc = pkg.generatorFunc - return pkg -} - -// protobufPackage contains the protobuf implementation of Package. -type protobufPackage struct { - generator.DefaultPackage - - // If true, generate protobuf serializations for all public types. - // If false, only generate protobuf serializations for structs that - // request serialization. - GenerateAll bool - - // A list of types to filter to; if not specified all types will be included. - FilterTypes map[types.Name]struct{} - - // If true, omit any gogoprotobuf extensions not defined as types. - OmitGogo bool - - // A list of field types that will be excluded from the output struct - OmitFieldTypes map[types.Name]struct{} - - // A list of names that this package exports - LocalNames map[string]struct{} - - // A list of type names in this package that will need marshaller rewriting - // to remove synthetic protobuf fields. - OptionalTypeNames map[string]struct{} - - // A list of struct tags to generate onto named struct fields - StructTags map[string]map[string]string - - // An import tracker for this package - Imports *ImportTracker -} - -func (p *protobufPackage) Clean(outputBase string) error { - for _, s := range []string{p.ImportPath(), p.OutputPath()} { - if err := os.Remove(filepath.Join(outputBase, s)); err != nil && !os.IsNotExist(err) { - return err - } - } - return nil -} - -func (p *protobufPackage) ProtoTypeName() types.Name { - return types.Name{ - Name: p.Path(), // the go path "foo/bar/baz" - Package: p.Name(), // the protobuf package "foo.bar.baz" - Path: p.ImportPath(), // the path of the import to get the proto - } -} - -func (p *protobufPackage) filterFunc(c *generator.Context, t *types.Type) bool { - switch t.Kind { - case types.Func, types.Chan: - return false - case types.Struct: - if t.Name.Name == "struct{}" { - return false - } - case types.Builtin: - return false - case types.Alias: - if !isOptionalAlias(t) { - return false - } - case types.Slice, types.Array, types.Map: - return false - case types.Pointer: - return false - } - if _, ok := isFundamentalProtoType(t); ok { - return false - } - _, ok := p.FilterTypes[t.Name] - return ok -} - -func (p *protobufPackage) HasGoType(name string) bool { - _, ok := p.LocalNames[name] - return ok -} - -func (p *protobufPackage) OptionalTypeName(name string) bool { - _, ok := p.OptionalTypeNames[name] - return ok -} - -func (p *protobufPackage) ExtractGeneratedType(t *ast.TypeSpec) bool { - if !p.HasGoType(t.Name.Name) { - return false - } - - switch s := t.Type.(type) { - case *ast.StructType: - for i, f := range s.Fields.List { - if len(f.Tag.Value) == 0 { - continue - } - tag := strings.Trim(f.Tag.Value, "`") - protobufTag := reflect.StructTag(tag).Get("protobuf") - if len(protobufTag) == 0 { - continue - } - if len(f.Names) > 1 { - log.Printf("WARNING: struct %s field %d %s: defined multiple names but single protobuf tag", t.Name.Name, i, f.Names[0].Name) - // TODO hard error? - } - if p.StructTags == nil { - p.StructTags = make(map[string]map[string]string) - } - m := p.StructTags[t.Name.Name] - if m == nil { - m = make(map[string]string) - p.StructTags[t.Name.Name] = m - } - m[f.Names[0].Name] = tag - } - default: - log.Printf("WARNING: unexpected Go AST type definition: %#v", t) - } - - return true -} - -func (p *protobufPackage) generatorFunc(c *generator.Context) []generator.Generator { - generators := []generator.Generator{} - - p.Imports.AddNullable() - - generators = append(generators, &genProtoIDL{ - DefaultGen: generator.DefaultGen{ - OptionalName: "generated", - }, - localPackage: types.Name{Package: p.PackageName, Path: p.PackagePath}, - localGoPackage: types.Name{Package: p.PackagePath, Name: p.GoPackageName()}, - imports: p.Imports, - generateAll: p.GenerateAll, - omitGogo: p.OmitGogo, - omitFieldTypes: p.OmitFieldTypes, - }) - return generators -} - -func (p *protobufPackage) GoPackageName() string { - return filepath.Base(p.PackagePath) -} - -func (p *protobufPackage) ImportPath() string { - return filepath.Join(p.PackagePath, "generated.proto") -} - -func (p *protobufPackage) OutputPath() string { - return filepath.Join(p.PackagePath, "generated.pb.go") -} - -var ( - _ = generator.Package(&protobufPackage{}) -) diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/parser.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/parser.go deleted file mode 100644 index 282108f5d..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/parser.go +++ /dev/null @@ -1,452 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import ( - "bytes" - "errors" - "fmt" - "go/ast" - "go/format" - "go/parser" - "go/printer" - "go/token" - "io/ioutil" - "os" - "reflect" - "strings" - - customreflect "k8s.io/kubernetes/third_party/forked/golang/reflect" -) - -func rewriteFile(name string, header []byte, rewriteFn func(*token.FileSet, *ast.File) error) error { - fset := token.NewFileSet() - src, err := ioutil.ReadFile(name) - if err != nil { - return err - } - file, err := parser.ParseFile(fset, name, src, parser.DeclarationErrors|parser.ParseComments) - if err != nil { - return err - } - - if err := rewriteFn(fset, file); err != nil { - return err - } - - b := &bytes.Buffer{} - b.Write(header) - if err := printer.Fprint(b, fset, file); err != nil { - return err - } - - body, err := format.Source(b.Bytes()) - if err != nil { - return err - } - - f, err := os.OpenFile(name, os.O_WRONLY|os.O_TRUNC, 0644) - if err != nil { - return err - } - defer f.Close() - if _, err := f.Write(body); err != nil { - return err - } - return f.Close() -} - -// ExtractFunc extracts information from the provided TypeSpec and returns true if the type should be -// removed from the destination file. -type ExtractFunc func(*ast.TypeSpec) bool - -// OptionalFunc returns true if the provided local name is a type that has protobuf.nullable=true -// and should have its marshal functions adjusted to remove the 'Items' accessor. -type OptionalFunc func(name string) bool - -func RewriteGeneratedGogoProtobufFile(name string, extractFn ExtractFunc, optionalFn OptionalFunc, header []byte) error { - return rewriteFile(name, header, func(fset *token.FileSet, file *ast.File) error { - cmap := ast.NewCommentMap(fset, file, file.Comments) - - // transform methods that point to optional maps or slices - for _, d := range file.Decls { - rewriteOptionalMethods(d, optionalFn) - } - - // remove types that are already declared - decls := []ast.Decl{} - for _, d := range file.Decls { - if dropExistingTypeDeclarations(d, extractFn) { - continue - } - if dropEmptyImportDeclarations(d) { - continue - } - decls = append(decls, d) - } - file.Decls = decls - - // remove unmapped comments - file.Comments = cmap.Filter(file).Comments() - return nil - }) -} - -// rewriteOptionalMethods makes specific mutations to marshaller methods that belong to types identified -// as being "optional" (they may be nil on the wire). This allows protobuf to serialize a map or slice and -// properly discriminate between empty and nil (which is not possible in protobuf). -// TODO: move into upstream gogo-protobuf once https://github.com/gogo/protobuf/issues/181 -// has agreement -func rewriteOptionalMethods(decl ast.Decl, isOptional OptionalFunc) { - switch t := decl.(type) { - case *ast.FuncDecl: - ident, ptr, ok := receiver(t) - if !ok { - return - } - - // correct initialization of the form `m.Field = &OptionalType{}` to - // `m.Field = OptionalType{}` - if t.Name.Name == "Unmarshal" { - ast.Walk(optionalAssignmentVisitor{fn: isOptional}, t.Body) - } - - if !isOptional(ident.Name) { - return - } - - switch t.Name.Name { - case "Unmarshal": - ast.Walk(&optionalItemsVisitor{}, t.Body) - case "MarshalTo", "Size", "String": - ast.Walk(&optionalItemsVisitor{}, t.Body) - fallthrough - case "Marshal": - // if the method has a pointer receiver, set it back to a normal receiver - if ptr { - t.Recv.List[0].Type = ident - } - } - } -} - -type optionalAssignmentVisitor struct { - fn OptionalFunc -} - -// Visit walks the provided node, transforming field initializations of the form -// m.Field = &OptionalType{} -> m.Field = OptionalType{} -func (v optionalAssignmentVisitor) Visit(n ast.Node) ast.Visitor { - switch t := n.(type) { - case *ast.AssignStmt: - if len(t.Lhs) == 1 && len(t.Rhs) == 1 { - if !isFieldSelector(t.Lhs[0], "m", "") { - return nil - } - unary, ok := t.Rhs[0].(*ast.UnaryExpr) - if !ok || unary.Op != token.AND { - return nil - } - composite, ok := unary.X.(*ast.CompositeLit) - if !ok || composite.Type == nil || len(composite.Elts) != 0 { - return nil - } - if ident, ok := composite.Type.(*ast.Ident); ok && v.fn(ident.Name) { - t.Rhs[0] = composite - } - } - return nil - } - return v -} - -type optionalItemsVisitor struct{} - -// Visit walks the provided node, looking for specific patterns to transform that match -// the effective outcome of turning struct{ map[x]y || []x } into map[x]y or []x. -func (v *optionalItemsVisitor) Visit(n ast.Node) ast.Visitor { - switch t := n.(type) { - case *ast.RangeStmt: - if isFieldSelector(t.X, "m", "Items") { - t.X = &ast.Ident{Name: "m"} - } - case *ast.AssignStmt: - if len(t.Lhs) == 1 && len(t.Rhs) == 1 { - switch lhs := t.Lhs[0].(type) { - case *ast.IndexExpr: - if isFieldSelector(lhs.X, "m", "Items") { - lhs.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - default: - if isFieldSelector(t.Lhs[0], "m", "Items") { - t.Lhs[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - switch rhs := t.Rhs[0].(type) { - case *ast.CallExpr: - if ident, ok := rhs.Fun.(*ast.Ident); ok && ident.Name == "append" { - ast.Walk(v, rhs) - if len(rhs.Args) > 0 { - switch arg := rhs.Args[0].(type) { - case *ast.Ident: - if arg.Name == "m" { - rhs.Args[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - } - return nil - } - } - } - case *ast.IfStmt: - switch cond := t.Cond.(type) { - case *ast.BinaryExpr: - if cond.Op == token.EQL { - if isFieldSelector(cond.X, "m", "Items") && isIdent(cond.Y, "nil") { - cond.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - } - if t.Init != nil { - // Find form: - // if err := m[len(m.Items)-1].Unmarshal(data[iNdEx:postIndex]); err != nil { - // return err - // } - switch s := t.Init.(type) { - case *ast.AssignStmt: - if call, ok := s.Rhs[0].(*ast.CallExpr); ok { - if sel, ok := call.Fun.(*ast.SelectorExpr); ok { - if x, ok := sel.X.(*ast.IndexExpr); ok { - // m[] -> (*m)[] - if sel2, ok := x.X.(*ast.SelectorExpr); ok { - if ident, ok := sel2.X.(*ast.Ident); ok && ident.Name == "m" { - x.X = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - // len(m.Items) -> len(*m) - if bin, ok := x.Index.(*ast.BinaryExpr); ok { - if call2, ok := bin.X.(*ast.CallExpr); ok && len(call2.Args) == 1 { - if isFieldSelector(call2.Args[0], "m", "Items") { - call2.Args[0] = &ast.StarExpr{X: &ast.Ident{Name: "m"}} - } - } - } - } - } - } - } - } - case *ast.IndexExpr: - if isFieldSelector(t.X, "m", "Items") { - t.X = &ast.Ident{Name: "m"} - return nil - } - case *ast.CallExpr: - changed := false - for i := range t.Args { - if isFieldSelector(t.Args[i], "m", "Items") { - t.Args[i] = &ast.Ident{Name: "m"} - changed = true - } - } - if changed { - return nil - } - } - return v -} - -func isFieldSelector(n ast.Expr, name, field string) bool { - s, ok := n.(*ast.SelectorExpr) - if !ok || s.Sel == nil || (field != "" && s.Sel.Name != field) { - return false - } - return isIdent(s.X, name) -} - -func isIdent(n ast.Expr, value string) bool { - ident, ok := n.(*ast.Ident) - return ok && ident.Name == value -} - -func receiver(f *ast.FuncDecl) (ident *ast.Ident, pointer bool, ok bool) { - if f.Recv == nil || len(f.Recv.List) != 1 { - return nil, false, false - } - switch t := f.Recv.List[0].Type.(type) { - case *ast.StarExpr: - identity, ok := t.X.(*ast.Ident) - if !ok { - return nil, false, false - } - return identity, true, true - case *ast.Ident: - return t, false, true - } - return nil, false, false -} - -// dropExistingTypeDeclarations removes any type declaration for which extractFn returns true. The function -// returns true if the entire declaration should be dropped. -func dropExistingTypeDeclarations(decl ast.Decl, extractFn ExtractFunc) bool { - switch t := decl.(type) { - case *ast.GenDecl: - if t.Tok != token.TYPE { - return false - } - specs := []ast.Spec{} - for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.TypeSpec: - if extractFn(spec) { - continue - } - specs = append(specs, spec) - } - } - if len(specs) == 0 { - return true - } - t.Specs = specs - } - return false -} - -// dropEmptyImportDeclarations strips any generated but no-op imports from the generated code -// to prevent generation from being able to define side-effects. The function returns true -// if the entire declaration should be dropped. -func dropEmptyImportDeclarations(decl ast.Decl) bool { - switch t := decl.(type) { - case *ast.GenDecl: - if t.Tok != token.IMPORT { - return false - } - specs := []ast.Spec{} - for _, s := range t.Specs { - switch spec := s.(type) { - case *ast.ImportSpec: - if spec.Name != nil && spec.Name.Name == "_" { - continue - } - specs = append(specs, spec) - } - } - if len(specs) == 0 { - return true - } - t.Specs = specs - } - return false -} - -func RewriteTypesWithProtobufStructTags(name string, structTags map[string]map[string]string) error { - return rewriteFile(name, []byte{}, func(fset *token.FileSet, file *ast.File) error { - allErrs := []error{} - - // set any new struct tags - for _, d := range file.Decls { - if errs := updateStructTags(d, structTags, []string{"protobuf"}); len(errs) > 0 { - allErrs = append(allErrs, errs...) - } - } - - if len(allErrs) > 0 { - var s string - for _, err := range allErrs { - s += err.Error() + "\n" - } - return errors.New(s) - } - return nil - }) -} - -func updateStructTags(decl ast.Decl, structTags map[string]map[string]string, toCopy []string) []error { - var errs []error - t, ok := decl.(*ast.GenDecl) - if !ok { - return nil - } - if t.Tok != token.TYPE { - return nil - } - - for _, s := range t.Specs { - spec, ok := s.(*ast.TypeSpec) - if !ok { - continue - } - typeName := spec.Name.Name - fieldTags, ok := structTags[typeName] - if !ok { - continue - } - st, ok := spec.Type.(*ast.StructType) - if !ok { - continue - } - - for i := range st.Fields.List { - f := st.Fields.List[i] - var name string - if len(f.Names) == 0 { - switch t := f.Type.(type) { - case *ast.Ident: - name = t.Name - case *ast.SelectorExpr: - name = t.Sel.Name - default: - errs = append(errs, fmt.Errorf("unable to get name for tag from struct %q, field %#v", spec.Name.Name, t)) - continue - } - } else { - name = f.Names[0].Name - } - value, ok := fieldTags[name] - if !ok { - continue - } - var tags customreflect.StructTags - if f.Tag != nil { - oldTags, err := customreflect.ParseStructTags(strings.Trim(f.Tag.Value, "`")) - if err != nil { - errs = append(errs, fmt.Errorf("unable to read struct tag from struct %q, field %q: %v", spec.Name.Name, name, err)) - continue - } - tags = oldTags - } - for _, name := range toCopy { - // don't overwrite existing tags - if tags.Has(name) { - continue - } - // append new tags - if v := reflect.StructTag(value).Get(name); len(v) > 0 { - tags = append(tags, customreflect.StructTag{Name: name, Value: v}) - } - } - if len(tags) == 0 { - continue - } - if f.Tag == nil { - f.Tag = &ast.BasicLit{} - } - f.Tag.Value = tags.String() - } - } - return errs -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/tags.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/tags.go deleted file mode 100644 index 62f9002ae..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protobuf/tags.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2016 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package protobuf - -import ( - "github.com/golang/glog" - "k8s.io/gengo/types" -) - -// extractBoolTagOrDie gets the comment-tags for the key and asserts that, if -// it exists, the value is boolean. If the tag did not exist, it returns -// false. -func extractBoolTagOrDie(key string, lines []string) bool { - val, err := types.ExtractSingleBoolCommentTag("+", key, false, lines) - if err != nil { - glog.Fatalf(err.Error()) - } - return val -} diff --git a/deps/k8s.io/gengo/examples/go-to-protobuf/protoc-gen-gogo/main.go b/deps/k8s.io/gengo/examples/go-to-protobuf/protoc-gen-gogo/main.go deleted file mode 100644 index 6e5051dce..000000000 --- a/deps/k8s.io/gengo/examples/go-to-protobuf/protoc-gen-gogo/main.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2015 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package main defines the protoc-gen-gogo binary we use to generate our proto go files, -// as well as takes dependencies on the correct gogo/protobuf packages for godeps. -package main - -import ( - "github.com/gogo/protobuf/vanity/command" - - // dependencies that are required for our packages - _ "github.com/gogo/protobuf/gogoproto" - _ "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/sortkeys" -) - -func main() { - command.Write(command.Generate(command.Read())) -} diff --git a/deps/k8s.io/gengo/examples/import-boss/generators/import_restrict_test.go b/deps/k8s.io/gengo/examples/import-boss/generators/import_restrict_test.go index 0d21024ed..234c64a32 100644 --- a/deps/k8s.io/gengo/examples/import-boss/generators/import_restrict_test.go +++ b/deps/k8s.io/gengo/examples/import-boss/generators/import_restrict_test.go @@ -17,6 +17,7 @@ limitations under the License. package generators import ( + "path/filepath" "testing" ) @@ -24,12 +25,14 @@ func TestRemoveLastDir(t *testing.T) { table := map[string]struct{ newPath, removedDir string }{ "a/b/c": {"a/c", "b"}, } - for input, expect := range table { + for slashInput, expect := range table { + input := filepath.FromSlash(slashInput) + gotPath, gotRemoved := removeLastDir(input) - if e, a := expect.newPath, gotPath; e != a { + if e, a := filepath.FromSlash(expect.newPath), gotPath; e != a { t.Errorf("%v: wanted %v, got %v", input, e, a) } - if e, a := expect.removedDir, gotRemoved; e != a { + if e, a := filepath.FromSlash(expect.removedDir), gotRemoved; e != a { t.Errorf("%v: wanted %v, got %v", input, e, a) } } diff --git a/deps/k8s.io/gengo/examples/set-gen/generators/sets.go b/deps/k8s.io/gengo/examples/set-gen/generators/sets.go index c570b0c0a..8c5b4184b 100644 --- a/deps/k8s.io/gengo/examples/set-gen/generators/sets.go +++ b/deps/k8s.io/gengo/examples/set-gen/generators/sets.go @@ -53,11 +53,7 @@ func Packages(_ *generator.Context, arguments *args.GeneratorArgs) generator.Pac return generator.Packages{&generator.DefaultPackage{ PackageName: "sets", PackagePath: arguments.OutputPackagePath, - HeaderText: append(boilerplate, []byte( - ` -// This file was autogenerated by set-gen. Do not edit it manually! - -`)...), + HeaderText: boilerplate, PackageDocumentation: []byte( `// Package sets has auto-generated set types. `), diff --git a/deps/k8s.io/gengo/examples/set-gen/sets/byte.go b/deps/k8s.io/gengo/examples/set-gen/sets/byte.go index ac3a7e717..766f4501e 100644 --- a/deps/k8s.io/gengo/examples/set-gen/sets/byte.go +++ b/deps/k8s.io/gengo/examples/set-gen/sets/byte.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets diff --git a/deps/k8s.io/gengo/examples/set-gen/sets/doc.go b/deps/k8s.io/gengo/examples/set-gen/sets/doc.go index feeee6c51..b152a0bf0 100644 --- a/deps/k8s.io/gengo/examples/set-gen/sets/doc.go +++ b/deps/k8s.io/gengo/examples/set-gen/sets/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. // Package sets has auto-generated set types. package sets diff --git a/deps/k8s.io/gengo/examples/set-gen/sets/empty.go b/deps/k8s.io/gengo/examples/set-gen/sets/empty.go index 2d0695922..e11e622c5 100644 --- a/deps/k8s.io/gengo/examples/set-gen/sets/empty.go +++ b/deps/k8s.io/gengo/examples/set-gen/sets/empty.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets diff --git a/deps/k8s.io/gengo/examples/set-gen/sets/int.go b/deps/k8s.io/gengo/examples/set-gen/sets/int.go index 63566301d..a0a513cd9 100644 --- a/deps/k8s.io/gengo/examples/set-gen/sets/int.go +++ b/deps/k8s.io/gengo/examples/set-gen/sets/int.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets diff --git a/deps/k8s.io/gengo/examples/set-gen/sets/int64.go b/deps/k8s.io/gengo/examples/set-gen/sets/int64.go index eaab5d659..9ca9af0c5 100644 --- a/deps/k8s.io/gengo/examples/set-gen/sets/int64.go +++ b/deps/k8s.io/gengo/examples/set-gen/sets/int64.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets diff --git a/deps/k8s.io/gengo/examples/set-gen/sets/string.go b/deps/k8s.io/gengo/examples/set-gen/sets/string.go index d5218c79c..ba00ad7df 100644 --- a/deps/k8s.io/gengo/examples/set-gen/sets/string.go +++ b/deps/k8s.io/gengo/examples/set-gen/sets/string.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This file was autogenerated by set-gen. Do not edit it manually! +// Code generated by set-gen. DO NOT EDIT. package sets diff --git a/deps/k8s.io/gengo/generator/import_tracker.go b/deps/k8s.io/gengo/generator/import_tracker.go index 6d3593dc7..d4ba5e907 100644 --- a/deps/k8s.io/gengo/generator/import_tracker.go +++ b/deps/k8s.io/gengo/generator/import_tracker.go @@ -17,9 +17,10 @@ limitations under the License. package generator import ( - "path/filepath" "strings" + "github.com/golang/glog" + "k8s.io/gengo/namer" "k8s.io/gengo/types" ) @@ -37,15 +38,22 @@ func NewImportTracker(typesToAdd ...*types.Type) namer.ImportTracker { func golangTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { path := t.Package - dirs := strings.Split(path, string(filepath.Separator)) + + // Using backslashes in package names causes gengo to produce Go code which + // will not compile with the gc compiler. See the comment on GoSeperator. + if strings.ContainsRune(path, '\\') { + glog.Warningf("Warning: backslash used in import path '%v', this is unsupported.\n", path) + } + + dirs := strings.Split(path, namer.GoSeperator) for n := len(dirs) - 1; n >= 0; n-- { - // TODO: bikeshed about whether it's more readable to have an - // _, something else, or nothing between directory names. - name := strings.Join(dirs[n:], "_") + // follow kube convention of not having anything between directory names + name := strings.Join(dirs[n:], "") + name = strings.Replace(name, "_", "", -1) // These characters commonly appear in import paths for go // packages, but aren't legal go names. So we'll sanitize. - name = strings.Replace(name, ".", "_", -1) - name = strings.Replace(name, "-", "_", -1) + name = strings.Replace(name, ".", "", -1) + name = strings.Replace(name, "-", "", -1) if _, found := tracker.PathOf(name); found { // This name collides with some other package continue diff --git a/deps/k8s.io/gengo/namer/namer.go b/deps/k8s.io/gengo/namer/namer.go index 9bdc730a4..d700a00a5 100644 --- a/deps/k8s.io/gengo/namer/namer.go +++ b/deps/k8s.io/gengo/namer/namer.go @@ -23,6 +23,17 @@ import ( "k8s.io/gengo/types" ) +const ( + // GoSeperator is used to split go import paths. + // Forward slash is used instead of filepath.Seperator because it is the + // only universally-accepted path delimiter and the only delimiter not + // potentially forbidden by Go compilers. (In particular gc does not allow + // the use of backslashes in import paths.) + // See https://golang.org/ref/spec#Import_declarations. + // See also https://github.com/kubernetes/gengo/issues/83#issuecomment-367040772. + GoSeperator = "/" +) + // Returns whether a name is a private Go name. func IsPrivateGoName(name string) bool { return len(name) == 0 || strings.ToLower(name[:1]) == name[:1] @@ -187,7 +198,7 @@ var ( // filters out unwanted directory names and sanitizes remaining names. func (ns *NameStrategy) filterDirs(path string) []string { - allDirs := strings.Split(path, string(filepath.Separator)) + allDirs := strings.Split(path, GoSeperator) dirs := make([]string, 0, len(allDirs)) for _, p := range allDirs { if ns.IgnoreWords == nil || !ns.IgnoreWords[p] { diff --git a/deps/k8s.io/gengo/namer/plural_namer.go b/deps/k8s.io/gengo/namer/plural_namer.go index 40bdcc6cc..a9a198a70 100644 --- a/deps/k8s.io/gengo/namer/plural_namer.go +++ b/deps/k8s.io/gengo/namer/plural_namer.go @@ -59,7 +59,7 @@ func (r *pluralNamer) Name(t *types.Type) string { return r.finalize(plural) } if len(singular) < 2 { - return r.finalize(plural) + return r.finalize(singular) } switch rune(singular[len(singular)-1]) { @@ -87,7 +87,7 @@ func (r *pluralNamer) Name(t *types.Type) string { plural = sPlural(singular) } case 'f': - plural = vesPlural(singular) + plural = vesPlural(singular) default: plural = sPlural(singular) } diff --git a/deps/k8s.io/gengo/namer/plural_namer_test.go b/deps/k8s.io/gengo/namer/plural_namer_test.go index c10d3b71f..a8b648558 100644 --- a/deps/k8s.io/gengo/namer/plural_namer_test.go +++ b/deps/k8s.io/gengo/namer/plural_namer_test.go @@ -35,6 +35,11 @@ func TestPluralNamer(t *testing.T) { expectedPrivate string expectedPublic string }{ + { + "I", + "i", + "I", + }, { "Pod", "pods", diff --git a/deps/k8s.io/gengo/parser/parse.go b/deps/k8s.io/gengo/parser/parse.go index 865b430f7..7b043d716 100644 --- a/deps/k8s.io/gengo/parser/parse.go +++ b/deps/k8s.io/gengo/parser/parse.go @@ -26,6 +26,7 @@ import ( "io/ioutil" "os" "os/exec" + "path" "path/filepath" "sort" "strings" @@ -226,12 +227,12 @@ func (b *Builder) AddDirRecursive(dir string) error { // filepath.Walk includes the root dir, but we already did that, so we'll // remove that prefix and rebuild a package import path. prefix := b.buildPackages[dir].Dir - fn := func(path string, info os.FileInfo, err error) error { + fn := func(filePath string, info os.FileInfo, err error) error { if info != nil && info.IsDir() { - rel := strings.TrimPrefix(path, prefix) + rel := filepath.ToSlash(strings.TrimPrefix(filePath, prefix)) if rel != "" { // Make a pkg path. - pkg := filepath.Join(string(canonicalizeImportPath(b.buildPackages[dir].ImportPath)), rel) + pkg := path.Join(string(canonicalizeImportPath(b.buildPackages[dir].ImportPath)), rel) // Add it. if _, err := b.importPackage(pkg, true); err != nil { @@ -488,7 +489,7 @@ func (b *Builder) findTypesIn(pkgPath importPathString, u *types.Universe) error u.Package(string(pkgPath)).SourcePath = b.absPaths[pkgPath] for _, f := range b.parsed[pkgPath] { - if strings.HasSuffix(f.name, "/doc.go") { + if _, fileName := filepath.Split(f.name); fileName == "doc.go" { tp := u.Package(string(pkgPath)) // findTypesIn might be called multiple times. Clean up tp.Comments // to avoid repeatedly fill same comments to it. diff --git a/deps/k8s.io/gengo/parser/parse_test.go b/deps/k8s.io/gengo/parser/parse_test.go index 6212682c3..93a1bf980 100644 --- a/deps/k8s.io/gengo/parser/parse_test.go +++ b/deps/k8s.io/gengo/parser/parse_test.go @@ -18,6 +18,7 @@ package parser_test import ( "bytes" + "path" "path/filepath" "reflect" "testing" @@ -61,7 +62,7 @@ type file struct { func construct(t *testing.T, files []file, testNamer namer.Namer) (*parser.Builder, types.Universe, []*types.Type) { b := parser.New() for _, f := range files { - if err := b.AddFileForTest(filepath.Dir(f.path), f.path, []byte(f.contents)); err != nil { + if err := b.AddFileForTest(path.Dir(f.path), filepath.FromSlash(f.path), []byte(f.contents)); err != nil { t.Fatal(err) } } diff --git a/deps/k8s.io/kube-openapi/.travis.yml b/deps/k8s.io/kube-openapi/.travis.yml index 996a4df0e..6c770ec12 100644 --- a/deps/k8s.io/kube-openapi/.travis.yml +++ b/deps/k8s.io/kube-openapi/.travis.yml @@ -1,4 +1,4 @@ language: go go_import_path: k8s.io/kube-openapi -script: go test ./pkg/... +script: go test ./pkg/... ./test/... diff --git a/deps/k8s.io/kube-openapi/CONTRIBUTING.md b/deps/k8s.io/kube-openapi/CONTRIBUTING.md new file mode 100644 index 000000000..ef37eb0b6 --- /dev/null +++ b/deps/k8s.io/kube-openapi/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing + +Thanks for taking the time to join our community and start contributing! + +The [Contributor Guide](https://github.com/kubernetes/community/blob/master/contributors/guide/README.md) +provides detailed instructions on how to get your ideas and bug fixes seen and accepted. + +Please remember to sign the [CNCF CLA](https://github.com/kubernetes/community/blob/master/CLA.md) and +read and observe the [Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/deps/k8s.io/kube-openapi/Godeps/Godeps.json b/deps/k8s.io/kube-openapi/Godeps/Godeps.json index 0e95fb3de..38032f652 100644 --- a/deps/k8s.io/kube-openapi/Godeps/Godeps.json +++ b/deps/k8s.io/kube-openapi/Godeps/Godeps.json @@ -6,6 +6,11 @@ "./..." ], "Deps": [ + { + "ImportPath": "bitbucket.org/ww/goautoneg", + "Comment": "null-5", + "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" + }, { "ImportPath": "github.com/NYTimes/gziphandler", "Rev": "56545f4a5d46df9a6648819d1664c3a03a13ffdb" diff --git a/deps/k8s.io/kube-openapi/OWNERS b/deps/k8s.io/kube-openapi/OWNERS index 7c8ad60c5..e8c62bfa2 100755 --- a/deps/k8s.io/kube-openapi/OWNERS +++ b/deps/k8s.io/kube-openapi/OWNERS @@ -3,5 +3,9 @@ reviewers: - gmarek - mbohlool - philips +- seans3 +- apelisse approvers: - mbohlool +- lavalamp +- seans3 diff --git a/deps/k8s.io/kube-openapi/README.md b/deps/k8s.io/kube-openapi/README.md index babadde1f..fd448585b 100644 --- a/deps/k8s.io/kube-openapi/README.md +++ b/deps/k8s.io/kube-openapi/README.md @@ -12,3 +12,7 @@ definitions. - The spec generator that is responsible for dynamically generate the final OpenAPI spec using web service routes or combining other OpenAPI/Json specs. + +## Contributing + +Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute. diff --git a/deps/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go b/deps/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go new file mode 100644 index 000000000..f555bddaf --- /dev/null +++ b/deps/k8s.io/kube-openapi/cmd/openapi-gen/args/args.go @@ -0,0 +1,73 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package args + +import ( + "fmt" + + "github.com/spf13/pflag" + "k8s.io/gengo/args" +) + +// CustomArgs is used by the gengo framework to pass args specific to this generator. +type CustomArgs struct { + // ReportFilename is added to CustomArgs for specifying name of report file used + // by API linter. If specified, API rule violations will be printed to report file. + // Otherwise default value "-" will be used which indicates stdout. + ReportFilename string +} + +// NewDefaults returns default arguments for the generator. Returning the arguments instead +// of using default flag parsing allows registering custom arguments afterwards +func NewDefaults() (*args.GeneratorArgs, *CustomArgs) { + // Default() sets a couple of flag default values for example the boilerplate. + // WithoutDefaultFlagParsing() disables implicit addition of command line flags and parsing, + // which allows registering custom arguments afterwards + genericArgs := args.Default().WithoutDefaultFlagParsing() + customArgs := &CustomArgs{} + genericArgs.CustomArgs = customArgs + + // Default value for report filename is "-", which stands for stdout + customArgs.ReportFilename = "-" + // Default value for output file base name + genericArgs.OutputFileBaseName = "openapi_generated" + + return genericArgs, customArgs +} + +// AddFlags add the generator flags to the flag set. +func (c *CustomArgs) AddFlags(fs *pflag.FlagSet) { + fs.StringVarP(&c.ReportFilename, "report-filename", "r", c.ReportFilename, "Name of report file used by API linter to print API violations. Default \"-\" stands for standard output. NOTE that if valid filename other than \"-\" is specified, API linter won't return error on detected API violations. This allows further check of existing API violations without stopping the OpenAPI generation toolchain.") +} + +// Validate checks the given arguments. +func Validate(genericArgs *args.GeneratorArgs) error { + c, ok := genericArgs.CustomArgs.(*CustomArgs) + if !ok { + return fmt.Errorf("input arguments don't contain valid custom arguments") + } + if len(c.ReportFilename) == 0 { + return fmt.Errorf("report filename cannot be empty. specify a valid filename or use \"-\" for stdout") + } + if len(genericArgs.OutputFileBaseName) == 0 { + return fmt.Errorf("output file base name cannot be empty") + } + if len(genericArgs.OutputPackagePath) == 0 { + return fmt.Errorf("output package cannot be empty") + } + return nil +} diff --git a/deps/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go b/deps/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go new file mode 100644 index 000000000..0f7563b10 --- /dev/null +++ b/deps/k8s.io/kube-openapi/cmd/openapi-gen/openapi-gen.go @@ -0,0 +1,55 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// This package generates openAPI definition file to be used in open API spec generation on API servers. To generate +// definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines. To +// exclude a type from a tagged package, add "+k8s:openapi-gen=false" tag to the type comment lines. + +package main + +import ( + "flag" + "log" + + generatorargs "k8s.io/kube-openapi/cmd/openapi-gen/args" + "k8s.io/kube-openapi/pkg/generators" + + "github.com/spf13/pflag" +) + +func main() { + genericArgs, customArgs := generatorargs.NewDefaults() + + genericArgs.AddFlags(pflag.CommandLine) + customArgs.AddFlags(pflag.CommandLine) + flag.Set("logtostderr", "true") + pflag.CommandLine.AddGoFlagSet(flag.CommandLine) + pflag.Parse() + + if err := generatorargs.Validate(genericArgs); err != nil { + log.Fatalf("Arguments validation error: %v", err) + } + + // Generates the code for the OpenAPIDefinitions. + if err := genericArgs.Execute( + generators.NameSystems(), + generators.DefaultNameSystem(), + generators.Packages, + ); err != nil { + log.Fatalf("OpenAPI code generation error: %v", err) + } + log.Println("Code for OpenAPI definitions generated") +} diff --git a/deps/k8s.io/kube-openapi/example/openapi-gen/main.go b/deps/k8s.io/kube-openapi/example/openapi-gen/main.go deleted file mode 100644 index f08ca0c9a..000000000 --- a/deps/k8s.io/kube-openapi/example/openapi-gen/main.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2016 The Kubernetes 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. -*/ - -// This package generates openAPI definition file to be used in open API spec generation on API servers. To generate -// definition for a specific type or package add "+k8s:openapi-gen=true" tag to the type/package comment lines. To -// exclude a type from a tagged package, add "+k8s:openapi-gen=false" tag to the type comment lines. -package main - -import ( - "path/filepath" - - "k8s.io/gengo/args" - "k8s.io/kube-openapi/pkg/generators" - - "github.com/golang/glog" -) - -func main() { - arguments := args.Default() - - // Override defaults. - arguments.OutputFileBaseName = "openapi_generated" - arguments.GoHeaderFilePath = filepath.Join(args.DefaultSourceTree(), "k8s.io/kubernetes/hack/boilerplate/boilerplate.go.txt") - - // Run it. - if err := arguments.Execute( - generators.NameSystems(), - generators.DefaultNameSystem(), - generators.Packages, - ); err != nil { - glog.Fatalf("Error: %v", err) - } - glog.V(2).Info("Completed successfully.") -} \ No newline at end of file diff --git a/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator.go b/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator.go index 9fb16e6e9..f05b50172 100644 --- a/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator.go +++ b/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator.go @@ -61,6 +61,10 @@ func (s *referenceWalker) walkRef(ref spec.Ref) spec.Ref { k := refStr[len(definitionPrefix):] def := s.root.Definitions[k] s.walkSchema(&def) + // Make sure we don't assign to nil map + if s.root.Definitions == nil { + s.root.Definitions = spec.Definitions{} + } s.root.Definitions[k] = def } return s.walkRefCallback(ref) @@ -147,6 +151,9 @@ func (s *referenceWalker) walkOperation(op *spec.Operation) { } func (s *referenceWalker) Start() { + if s.root.Paths == nil { + return + } for _, pathItem := range s.root.Paths.Paths { s.walkParams(pathItem.Parameters) s.walkOperation(pathItem.Delete) @@ -159,7 +166,7 @@ func (s *referenceWalker) Start() { } } -// usedDefinitionForSpec returns a map with all used definition in the provided spec as keys and true as values. +// usedDefinitionForSpec returns a map with all used definitions in the provided spec as keys and true as values. func usedDefinitionForSpec(sp *spec.Swagger) map[string]bool { usedDefinitions := map[string]bool{} walkOnAllReferences(func(ref spec.Ref) spec.Ref { @@ -172,7 +179,7 @@ func usedDefinitionForSpec(sp *spec.Swagger) map[string]bool { } // FilterSpecByPaths removes unnecessary paths and definitions used by those paths. -// i.e. if a Path removed by this function, all definition used by it and not used +// i.e. if a Path removed by this function, all definitions used by it and not used // anywhere else will also be removed. func FilterSpecByPaths(sp *spec.Swagger, keepPathPrefixes []string) { // Walk all references to find all used definitions. This function @@ -220,6 +227,10 @@ func renameDefinition(s *spec.Swagger, old, new string) { } return ref }, s) + // Make sure we don't assign to nil map + if s.Definitions == nil { + s.Definitions = spec.Definitions{} + } s.Definitions[new] = s.Definitions[old] delete(s.Definitions, old) } @@ -244,6 +255,13 @@ func MergeSpecs(dest, source *spec.Swagger) error { func mergeSpecs(dest, source *spec.Swagger, renameModelConflicts, ignorePathConflicts bool) (err error) { specCloned := false + // Paths may be empty, due to [ACL constraints](http://goo.gl/8us55a#securityFiltering). + if source.Paths == nil { + source.Paths = &spec.Paths{} + } + if dest.Paths == nil { + dest.Paths = &spec.Paths{} + } if ignorePathConflicts { keepPaths := []string{} hasConflictingPath := false @@ -335,6 +353,9 @@ func mergeSpecs(dest, source *spec.Swagger, renameModelConflicts, ignorePathConf } for k, v := range source.Definitions { if _, found := dest.Definitions[k]; !found { + if dest.Definitions == nil { + dest.Definitions = spec.Definitions{} + } dest.Definitions[k] = v } } @@ -343,6 +364,10 @@ func mergeSpecs(dest, source *spec.Swagger, renameModelConflicts, ignorePathConf if _, found := dest.Paths.Paths[k]; found { return fmt.Errorf("unable to merge: duplicated path %s", k) } + // PathItem may be empty, due to [ACL constraints](http://goo.gl/8us55a#securityFiltering). + if dest.Paths.Paths == nil { + dest.Paths.Paths = map[string]spec.PathItem{} + } dest.Paths.Paths[k] = v } return nil diff --git a/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator_test.go b/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator_test.go index 9b6fa1034..779ac01d4 100644 --- a/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator_test.go +++ b/deps/k8s.io/kube-openapi/pkg/aggregator/aggregator_test.go @@ -133,9 +133,9 @@ definitions: format: "string" `), &spec1_filtered) - assert := assert.New(t) + ast := assert.New(t) FilterSpecByPaths(spec1, []string{"/test"}) - assert.Equal(DebugSpec{spec1_filtered}, DebugSpec{spec1}) + ast.Equal(DebugSpec{spec1_filtered}, DebugSpec{spec1}) } func TestFilterSpecsWithUnusedDefinitions(t *testing.T) { @@ -238,9 +238,9 @@ definitions: type: "object" `), &spec1Filtered) - assert := assert.New(t) + ast := assert.New(t) FilterSpecByPaths(spec1, []string{"/test"}) - assert.Equal(DebugSpec{spec1Filtered}, DebugSpec{spec1}) + ast.Equal(DebugSpec{spec1Filtered}, DebugSpec{spec1}) } func TestMergeSpecsSimple(t *testing.T) { @@ -369,11 +369,211 @@ definitions: type: "string" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) +} + +func TestMergeSpecsEmptyDefinitions(t *testing.T) { + var spec1, spec2, expected *spec.Swagger + yaml.Unmarshal([]byte(` +swagger: "2.0" +paths: + /test: + post: + tags: + - "test" + summary: "Test API" + operationId: "addTest" + parameters: + - in: "body" + name: "body" + description: "test object" + required: true + responses: + 405: + description: "Invalid input" +`), &spec1) + + yaml.Unmarshal([]byte(` +swagger: "2.0" +paths: + /othertest: + post: + tags: + - "test2" + summary: "Test2 API" + operationId: "addTest2" + consumes: + - "application/json" + produces: + - "application/xml" + parameters: + - in: "body" + name: "body" + description: "test2 object" + required: true + schema: + $ref: "#/definitions/Test2" +definitions: + Test2: + type: "object" + properties: + other: + $ref: "#/definitions/Other" + Other: + type: "string" +`), &spec2) + + yaml.Unmarshal([]byte(` +swagger: "2.0" +paths: + /test: + post: + tags: + - "test" + summary: "Test API" + operationId: "addTest" + parameters: + - in: "body" + name: "body" + description: "test object" + required: true + responses: + 405: + description: "Invalid input" + /othertest: + post: + tags: + - "test2" + summary: "Test2 API" + operationId: "addTest2" + consumes: + - "application/json" + produces: + - "application/xml" + parameters: + - in: "body" + name: "body" + description: "test2 object" + required: true + schema: + $ref: "#/definitions/Test2" +definitions: + Test2: + type: "object" + properties: + other: + $ref: "#/definitions/Other" + Other: + type: "string" +`), &expected) + + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { + return + } + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) +} + +func TestMergeSpecsEmptyPaths(t *testing.T) { + var spec1, spec2, expected *spec.Swagger + yaml.Unmarshal([]byte(` +swagger: "2.0" +definitions: + Test: + type: "object" + properties: + id: + type: "integer" + format: "int64" + status: + type: "string" + description: "Status" + InvalidInput: + type: "string" + format: "string" +`), &spec1) + + yaml.Unmarshal([]byte(` +swagger: "2.0" +paths: + /othertest: + post: + tags: + - "test2" + summary: "Test2 API" + operationId: "addTest2" + consumes: + - "application/json" + produces: + - "application/xml" + parameters: + - in: "body" + name: "body" + description: "test2 object" + required: true + schema: + $ref: "#/definitions/Test2" +definitions: + Test2: + type: "object" + properties: + other: + $ref: "#/definitions/Other" + Other: + type: "string" +`), &spec2) + + yaml.Unmarshal([]byte(` +swagger: "2.0" +paths: + /othertest: + post: + tags: + - "test2" + summary: "Test2 API" + operationId: "addTest2" + consumes: + - "application/json" + produces: + - "application/xml" + parameters: + - in: "body" + name: "body" + description: "test2 object" + required: true + schema: + $ref: "#/definitions/Test2" +definitions: + Test: + type: "object" + properties: + id: + type: "integer" + format: "int64" + status: + type: "string" + description: "Status" + InvalidInput: + type: "string" + format: "string" + Test2: + type: "object" + properties: + other: + $ref: "#/definitions/Other" + Other: + type: "string" +`), &expected) + + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { + return + } + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } func TestMergeSpecsReuseModel(t *testing.T) { @@ -500,11 +700,11 @@ definitions: format: "string" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } func TestMergeSpecsRenameModel(t *testing.T) { @@ -636,11 +836,11 @@ definitions: format: "string" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } func TestMergeSpecsRenameModelWithExistingV2InDestination(t *testing.T) { @@ -715,11 +915,11 @@ definitions: type: "object" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } func TestMergeSpecsRenameModelWithExistingV2InSource(t *testing.T) { @@ -794,11 +994,11 @@ definitions: type: "object" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } // This tests if there are three specs, where the first two use the same object definition, @@ -881,14 +1081,14 @@ definitions: type: "object" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - if !assert.NoError(MergeSpecs(spec1, spec3)) { + if !ast.NoError(MergeSpecs(spec1, spec3)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } // This tests if there are three specs, where the last two use the same object definition, @@ -969,14 +1169,14 @@ definitions: type: "object" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - if !assert.NoError(MergeSpecs(spec1, spec3)) { + if !ast.NoError(MergeSpecs(spec1, spec3)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } func TestSafeMergeSpecsSimple(t *testing.T) { @@ -1079,15 +1279,15 @@ definitions: format: "int64" `), &expected) - assert := assert.New(t) + ast := assert.New(t) actual, err := CloneSpec(fooSpec) - if !assert.NoError(err) { + if !ast.NoError(err) { return } - if !assert.NoError(MergeSpecsFailOnDefinitionConflict(actual, barSpec)) { + if !ast.NoError(MergeSpecsFailOnDefinitionConflict(actual, barSpec)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{actual}) + ast.Equal(DebugSpec{expected}, DebugSpec{actual}) } func TestSafeMergeSpecsReuseModel(t *testing.T) { @@ -1184,15 +1384,15 @@ definitions: format: "int64" `), &expected) - assert := assert.New(t) + ast := assert.New(t) actual, err := CloneSpec(fooSpec) - if !assert.NoError(err) { + if !ast.NoError(err) { return } - if !assert.NoError(MergeSpecsFailOnDefinitionConflict(actual, barSpec)) { + if !ast.NoError(MergeSpecsFailOnDefinitionConflict(actual, barSpec)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{actual}) + ast.Equal(DebugSpec{expected}, DebugSpec{actual}) } func TestSafeMergeSpecsReuseModelFails(t *testing.T) { @@ -1291,12 +1491,12 @@ definitions: format: "int64" `), &expected) - assert := assert.New(t) + ast := assert.New(t) actual, err := CloneSpec(fooSpec) - if !assert.NoError(err) { + if !ast.NoError(err) { return } - assert.Error(MergeSpecsFailOnDefinitionConflict(actual, barSpec)) + ast.Error(MergeSpecsFailOnDefinitionConflict(actual, barSpec)) } func TestMergeSpecsIgnorePathConflicts(t *testing.T) { @@ -1402,22 +1602,22 @@ definitions: format: "int64" `), &expected) - assert := assert.New(t) + ast := assert.New(t) actual, err := CloneSpec(fooSpec) - if !assert.NoError(err) { + if !ast.NoError(err) { return } - if !assert.Error(MergeSpecs(actual, barSpec)) { + if !ast.Error(MergeSpecs(actual, barSpec)) { return } actual, err = CloneSpec(fooSpec) - if !assert.NoError(err) { + if !ast.NoError(err) { return } - if !assert.NoError(MergeSpecsIgnorePathConflict(actual, barSpec)) { + if !ast.NoError(MergeSpecsIgnorePathConflict(actual, barSpec)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{actual}) + ast.Equal(DebugSpec{expected}, DebugSpec{actual}) } func TestMergeSpecsIgnorePathConflictsAllConflicting(t *testing.T) { @@ -1448,16 +1648,16 @@ definitions: format: "int64" `), &fooSpec) - assert := assert.New(t) + ast := assert.New(t) foo2Spec, err := CloneSpec(fooSpec) actual, err := CloneSpec(fooSpec) - if !assert.NoError(err) { + if !ast.NoError(err) { return } - if !assert.NoError(MergeSpecsIgnorePathConflict(actual, foo2Spec)) { + if !ast.NoError(MergeSpecsIgnorePathConflict(actual, foo2Spec)) { return } - assert.Equal(DebugSpec{fooSpec}, DebugSpec{actual}) + ast.Equal(DebugSpec{fooSpec}, DebugSpec{actual}) } func TestMergeSpecReplacesAllPossibleRefs(t *testing.T) { @@ -1650,9 +1850,9 @@ definitions: type: "object" `), &expected) - assert := assert.New(t) - if !assert.NoError(MergeSpecs(spec1, spec2)) { + ast := assert.New(t) + if !ast.NoError(MergeSpecs(spec1, spec2)) { return } - assert.Equal(DebugSpec{expected}, DebugSpec{spec1}) + ast.Equal(DebugSpec{expected}, DebugSpec{spec1}) } diff --git a/deps/k8s.io/kube-openapi/pkg/builder/openapi.go b/deps/k8s.io/kube-openapi/pkg/builder/openapi.go index 3eaed1533..f48700d54 100644 --- a/deps/k8s.io/kube-openapi/pkg/builder/openapi.go +++ b/deps/k8s.io/kube-openapi/pkg/builder/openapi.go @@ -45,6 +45,47 @@ type openAPI struct { // BuildOpenAPISpec builds OpenAPI spec given a list of webservices (containing routes) and common.Config to customize it. func BuildOpenAPISpec(webServices []*restful.WebService, config *common.Config) (*spec.Swagger, error) { + o := newOpenAPI(config) + err := o.buildPaths(webServices) + if err != nil { + return nil, err + } + return o.finalizeSwagger() +} + +// BuildOpenAPIDefinitionsForResource builds a partial OpenAPI spec given a sample object and common.Config to customize it. +func BuildOpenAPIDefinitionsForResource(model interface{}, config *common.Config) (*spec.Definitions, error) { + o := newOpenAPI(config) + // We can discard the return value of toSchema because all we care about is the side effect of calling it. + // All the models created for this resource get added to o.swagger.Definitions + _, err := o.toSchema(getCanonicalTypeName(model)) + if err != nil { + return nil, err + } + swagger, err := o.finalizeSwagger() + if err != nil { + return nil, err + } + return &swagger.Definitions, nil +} + +// BuildOpenAPIDefinitionsForResources returns the OpenAPI spec which includes the definitions for the +// passed type names. +func BuildOpenAPIDefinitionsForResources(config *common.Config, names ...string) (*spec.Swagger, error) { + o := newOpenAPI(config) + // We can discard the return value of toSchema because all we care about is the side effect of calling it. + // All the models created for this resource get added to o.swagger.Definitions + for _, name := range names { + _, err := o.toSchema(name) + if err != nil { + return nil, err + } + } + return o.finalizeSwagger() +} + +// newOpenAPI sets up the openAPI object so we can build the spec. +func newOpenAPI(config *common.Config) openAPI { o := openAPI{ config: config, swagger: &spec.Swagger{ @@ -56,16 +97,6 @@ func BuildOpenAPISpec(webServices []*restful.WebService, config *common.Config) }, }, } - - err := o.init(webServices) - if err != nil { - return nil, err - } - - return o.swagger, nil -} - -func (o *openAPI) init(webServices []*restful.WebService) error { if o.config.GetOperationIDAndTags == nil { o.config.GetOperationIDAndTags = func(r *restful.Route) (string, []string, error) { return r.Operation, nil, nil @@ -83,25 +114,32 @@ func (o *openAPI) init(webServices []*restful.WebService) error { if o.config.CommonResponses == nil { o.config.CommonResponses = map[int]spec.Response{} } - err := o.buildPaths(webServices) - if err != nil { - return err - } + return o +} + +// finalizeSwagger is called after the spec is built and returns the final spec. +// NOTE: finalizeSwagger also make changes to the final spec, as specified in the config. +func (o *openAPI) finalizeSwagger() (*spec.Swagger, error) { if o.config.SecurityDefinitions != nil { o.swagger.SecurityDefinitions = *o.config.SecurityDefinitions o.swagger.Security = o.config.DefaultSecurity } if o.config.PostProcessSpec != nil { + var err error o.swagger, err = o.config.PostProcessSpec(o.swagger) if err != nil { - return err + return nil, err } } - return nil + return o.swagger, nil } -func getCanonicalizeTypeName(t reflect.Type) string { +func getCanonicalTypeName(model interface{}) string { + t := reflect.TypeOf(model) + if t.Kind() == reflect.Ptr { + t = t.Elem() + } if t.PkgPath() == "" { return t.Name() } @@ -143,15 +181,10 @@ func (o *openAPI) buildDefinitionRecursively(name string) error { return nil } -// buildDefinitionForType build a definition for a given type and return a referable name to it's definition. +// buildDefinitionForType build a definition for a given type and return a referable name to its definition. // This is the main function that keep track of definitions used in this spec and is depend on code generated // by k8s.io/kubernetes/cmd/libs/go2idl/openapi-gen. -func (o *openAPI) buildDefinitionForType(sample interface{}) (string, error) { - t := reflect.TypeOf(sample) - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - name := getCanonicalizeTypeName(t) +func (o *openAPI) buildDefinitionForType(name string) (string, error) { if err := o.buildDefinitionRecursively(name); err != nil { return "", err } @@ -302,7 +335,7 @@ func (o *openAPI) buildOperations(route restful.Route, inPathCommonParamsMap map } func (o *openAPI) buildResponse(model interface{}, description string) (spec.Response, error) { - schema, err := o.toSchema(model) + schema, err := o.toSchema(getCanonicalTypeName(model)) if err != nil { return spec.Response{}, err } @@ -347,8 +380,8 @@ func (o *openAPI) findCommonParameters(routes []restful.Route) (map[interface{}] return commonParamsMap, nil } -func (o *openAPI) toSchema(model interface{}) (_ *spec.Schema, err error) { - if openAPIType, openAPIFormat := common.GetOpenAPITypeFormat(getCanonicalizeTypeName(reflect.TypeOf(model))); openAPIType != "" { +func (o *openAPI) toSchema(name string) (_ *spec.Schema, err error) { + if openAPIType, openAPIFormat := common.GetOpenAPITypeFormat(name); openAPIType != "" { return &spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{openAPIType}, @@ -356,7 +389,7 @@ func (o *openAPI) toSchema(model interface{}) (_ *spec.Schema, err error) { }, }, nil } else { - ref, err := o.buildDefinitionForType(model) + ref, err := o.buildDefinitionForType(name) if err != nil { return nil, err } @@ -380,7 +413,7 @@ func (o *openAPI) buildParameter(restParam restful.ParameterData, bodySample int case restful.BodyParameterKind: if bodySample != nil { ret.In = "body" - ret.Schema, err = o.toSchema(bodySample) + ret.Schema, err = o.toSchema(getCanonicalTypeName(bodySample)) return ret, err } else { // There is not enough information in the body parameter to build the definition. diff --git a/deps/k8s.io/kube-openapi/pkg/builder/openapi_test.go b/deps/k8s.io/kube-openapi/pkg/builder/openapi_test.go index 9045e06d4..4087c6d65 100644 --- a/deps/k8s.io/kube-openapi/pkg/builder/openapi_test.go +++ b/deps/k8s.io/kube-openapi/pkg/builder/openapi_test.go @@ -30,20 +30,10 @@ import ( ) // setUp is a convenience function for setting up for (most) tests. -func setUp(t *testing.T, fullMethods bool) (openAPI, *restful.Container, *assert.Assertions) { +func setUp(t *testing.T, fullMethods bool) (*openapi.Config, *restful.Container, *assert.Assertions) { assert := assert.New(t) config, container := getConfig(fullMethods) - return openAPI{ - config: config, - swagger: &spec.Swagger{ - SwaggerProps: spec.SwaggerProps{ - Swagger: OpenAPIVersion, - Definitions: spec.Definitions{}, - Paths: &spec.Paths{Paths: map[string]spec.PathItem{}}, - Info: config.Info, - }, - }, - }, container, assert + return config, container, assert } func noOp(request *restful.Request, response *restful.Response) {} @@ -425,8 +415,8 @@ func getTestOutputDefinition() spec.Schema { } } -func TestBuildSwaggerSpec(t *testing.T) { - o, container, assert := setUp(t, true) +func TestBuildOpenAPISpec(t *testing.T) { + config, container, assert := setUp(t, true) expected := &spec.Swagger{ SwaggerProps: spec.SwaggerProps{ Info: &spec.Info{ @@ -449,7 +439,27 @@ func TestBuildSwaggerSpec(t *testing.T) { }, }, } - err := o.init(container.RegisteredWebServices()) + swagger, err := BuildOpenAPISpec(container.RegisteredWebServices(), config) + if !assert.NoError(err) { + return + } + expected_json, err := json.Marshal(expected) + if !assert.NoError(err) { + return + } + actual_json, err := json.Marshal(swagger) + if !assert.NoError(err) { + return + } + assert.Equal(string(expected_json), string(actual_json)) +} + +func TestBuildOpenAPIDefinitionsForResource(t *testing.T) { + config, _, assert := setUp(t, true) + expected := &spec.Definitions{ + "builder.TestInput": getTestInputDefinition(), + } + swagger, err := BuildOpenAPIDefinitionsForResource(TestInput{}, config) if !assert.NoError(err) { return } @@ -457,7 +467,7 @@ func TestBuildSwaggerSpec(t *testing.T) { if !assert.NoError(err) { return } - actual_json, err := json.Marshal(o.swagger) + actual_json, err := json.Marshal(swagger) if !assert.NoError(err) { return } diff --git a/deps/k8s.io/kube-openapi/pkg/common/common.go b/deps/k8s.io/kube-openapi/pkg/common/common.go index fbe01cabb..0d235876d 100644 --- a/deps/k8s.io/kube-openapi/pkg/common/common.go +++ b/deps/k8s.io/kube-openapi/pkg/common/common.go @@ -32,7 +32,7 @@ type OpenAPIDefinition struct { type ReferenceCallback func(path string) spec.Ref -// OpenAPIDefinitions is collection of all definitions. +// GetOpenAPIDefinitions is collection of all definitions. type GetOpenAPIDefinitions func(ReferenceCallback) map[string]OpenAPIDefinition // OpenAPIDefinitionGetter gets openAPI definitions for a given type. If a type implements this interface, diff --git a/deps/k8s.io/kube-openapi/pkg/generators/api_linter.go b/deps/k8s.io/kube-openapi/pkg/generators/api_linter.go new file mode 100644 index 000000000..9270d2632 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/generators/api_linter.go @@ -0,0 +1,100 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "fmt" + "io" + + "k8s.io/kube-openapi/pkg/generators/rules" + + "github.com/golang/glog" + "k8s.io/gengo/types" +) + +// apiLinter is the framework hosting mutliple API rules and recording API rule +// violations +type apiLinter struct { + // API rules that implement APIRule interface and output API rule violations + rules []APIRule + violations []apiViolation +} + +// newAPILinter creates an apiLinter object with API rules in package rules. Please +// add APIRule here when new API rule is implemented. +func newAPILinter() *apiLinter { + return &apiLinter{ + rules: []APIRule{ + &rules.NamesMatch{}, + }, + } +} + +// apiViolation uniquely identifies single API rule violation +type apiViolation struct { + // Name of rule from APIRule.Name() + rule string + + packageName string + typeName string + + // Optional: name of field that violates API rule. Empty fieldName implies that + // the entire type violates the rule. + field string +} + +// APIRule is the interface for validating API rule on Go types +type APIRule interface { + // Validate evaluates API rule on type t and returns a list of field names in + // the type that violate the rule. Empty field name [""] implies the entire + // type violates the rule. + Validate(t *types.Type) ([]string, error) + + // Name returns the name of APIRule + Name() string +} + +// validate runs all API rules on type t and records any API rule violation +func (l *apiLinter) validate(t *types.Type) error { + for _, r := range l.rules { + glog.V(5).Infof("validating API rule %v for type %v", r.Name(), t) + fields, err := r.Validate(t) + if err != nil { + return err + } + for _, field := range fields { + l.violations = append(l.violations, apiViolation{ + rule: r.Name(), + packageName: t.Name.Package, + typeName: t.Name.Name, + field: field, + }) + } + } + return nil +} + +// report prints any API rule violation to writer w and returns error if violation exists +func (l *apiLinter) report(w io.Writer) error { + for _, v := range l.violations { + fmt.Fprintf(w, "API rule violation: %s,%s,%s,%s\n", v.rule, v.packageName, v.typeName, v.field) + } + if len(l.violations) > 0 { + return fmt.Errorf("API rule violations exist") + } + return nil +} diff --git a/deps/k8s.io/kube-openapi/pkg/generators/extension.go b/deps/k8s.io/kube-openapi/pkg/generators/extension.go new file mode 100644 index 000000000..befe38db2 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/generators/extension.go @@ -0,0 +1,182 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "fmt" + "sort" + "strings" + + "k8s.io/gengo/examples/set-gen/sets" + "k8s.io/gengo/types" +) + +const extensionPrefix = "x-kubernetes-" + +// extensionAttributes encapsulates common traits for particular extensions. +type extensionAttributes struct { + xName string + kind types.Kind + allowedValues sets.String +} + +// Extension tag to openapi extension attributes +var tagToExtension = map[string]extensionAttributes{ + "patchMergeKey": extensionAttributes{ + xName: "x-kubernetes-patch-merge-key", + kind: types.Slice, + }, + "patchStrategy": extensionAttributes{ + xName: "x-kubernetes-patch-strategy", + kind: types.Slice, + allowedValues: sets.NewString("merge", "retainKeys"), + }, + "listMapKey": extensionAttributes{ + xName: "x-kubernetes-list-map-keys", + kind: types.Slice, + }, + "listType": extensionAttributes{ + xName: "x-kubernetes-list-type", + kind: types.Slice, + allowedValues: sets.NewString("atomic", "set", "map"), + }, +} + +// Extension encapsulates information necessary to generate an OpenAPI extension. +type extension struct { + idlTag string // Example: listType + xName string // Example: x-kubernetes-list-type + values []string // Example: [atomic] +} + +func (e extension) hasAllowedValues() bool { + return tagToExtension[e.idlTag].allowedValues.Len() > 0 +} + +func (e extension) allowedValues() sets.String { + return tagToExtension[e.idlTag].allowedValues +} + +func (e extension) hasKind() bool { + return len(tagToExtension[e.idlTag].kind) > 0 +} + +func (e extension) kind() types.Kind { + return tagToExtension[e.idlTag].kind +} + +func (e extension) validateAllowedValues() error { + // allowedValues not set means no restrictions on values. + if !e.hasAllowedValues() { + return nil + } + // Check for missing value. + if len(e.values) == 0 { + return fmt.Errorf("%s needs a value, none given.", e.idlTag) + } + // For each extension value, validate that it is allowed. + allowedValues := e.allowedValues() + if !allowedValues.HasAll(e.values...) { + return fmt.Errorf("%v not allowed for %s. Allowed values: %v", + e.values, e.idlTag, allowedValues.List()) + } + return nil +} + +func (e extension) validateType(kind types.Kind) error { + // If this extension class has no kind, then don't validate the type. + if !e.hasKind() { + return nil + } + if kind != e.kind() { + return fmt.Errorf("tag %s on type %v; only allowed on type %v", + e.idlTag, kind, e.kind()) + } + return nil +} + +func (e extension) hasMultipleValues() bool { + return len(e.values) > 1 +} + +// Returns sorted list of map keys. Needed for deterministic testing. +func sortedMapKeys(m map[string][]string) []string { + keys := make([]string, len(m)) + i := 0 + for k := range m { + keys[i] = k + i++ + } + sort.Strings(keys) + return keys +} + +// Parses comments to return openapi extensions. Returns a list of +// extensions which parsed correctly, as well as a list of the +// parse errors. Validating extensions is performed separately. +// NOTE: Non-empty errors does not mean extensions is empty. +func parseExtensions(comments []string) ([]extension, []error) { + extensions := []extension{} + errors := []error{} + // First, generate extensions from "+k8s:openapi-gen=x-kubernetes-*" annotations. + values := getOpenAPITagValue(comments) + for _, val := range values { + // Example: x-kubernetes-member-tag:member_test + if strings.HasPrefix(val, extensionPrefix) { + parts := strings.SplitN(val, ":", 2) + if len(parts) != 2 { + errors = append(errors, fmt.Errorf("invalid extension value: %v", val)) + continue + } + e := extension{ + idlTag: tagName, // Example: k8s:openapi-gen + xName: parts[0], // Example: x-kubernetes-member-tag + values: []string{parts[1]}, // Example: member_test + } + extensions = append(extensions, e) + } + } + // Next, generate extensions from "idlTags" (e.g. +listType) + tagValues := types.ExtractCommentTags("+", comments) + for _, idlTag := range sortedMapKeys(tagValues) { + xAttrs, exists := tagToExtension[idlTag] + if !exists { + continue + } + values := tagValues[idlTag] + e := extension{ + idlTag: idlTag, // listType + xName: xAttrs.xName, // x-kubernetes-list-type + values: values, // [atomic] + } + extensions = append(extensions, e) + } + return extensions, errors +} + +func validateMemberExtensions(extensions []extension, m *types.Member) []error { + errors := []error{} + for _, e := range extensions { + if err := e.validateAllowedValues(); err != nil { + errors = append(errors, err) + } + if err := e.validateType(m.Type.Kind); err != nil { + errors = append(errors, err) + } + } + return errors +} diff --git a/deps/k8s.io/kube-openapi/pkg/generators/extension_test.go b/deps/k8s.io/kube-openapi/pkg/generators/extension_test.go new file mode 100644 index 000000000..d1214bd9a --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/generators/extension_test.go @@ -0,0 +1,454 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generators + +import ( + "reflect" + "strings" + "testing" + + "k8s.io/gengo/examples/set-gen/sets" + "k8s.io/gengo/types" +) + +func TestSingleTagExtension(t *testing.T) { + + // Comments only contain one tag extension and one value. + var tests = []struct { + comments []string + extensionTag string + extensionName string + extensionValues []string + }{ + { + comments: []string{"+patchMergeKey=name"}, + extensionTag: "patchMergeKey", + extensionName: "x-kubernetes-patch-merge-key", + extensionValues: []string{"name"}, + }, + { + comments: []string{"+patchStrategy=merge"}, + extensionTag: "patchStrategy", + extensionName: "x-kubernetes-patch-strategy", + extensionValues: []string{"merge"}, + }, + { + comments: []string{"+listType=atomic"}, + extensionTag: "listType", + extensionName: "x-kubernetes-list-type", + extensionValues: []string{"atomic"}, + }, + { + comments: []string{"+listMapKey=port"}, + extensionTag: "listMapKey", + extensionName: "x-kubernetes-list-map-keys", + extensionValues: []string{"port"}, + }, + { + comments: []string{"+k8s:openapi-gen=x-kubernetes-member-tag:member_test"}, + extensionTag: "k8s:openapi-gen", + extensionName: "x-kubernetes-member-tag", + extensionValues: []string{"member_test"}, + }, + { + comments: []string{"+k8s:openapi-gen=x-kubernetes-member-tag:member_test:member_test2"}, + extensionTag: "k8s:openapi-gen", + extensionName: "x-kubernetes-member-tag", + extensionValues: []string{"member_test:member_test2"}, + }, + { + // Test that poorly formatted extensions aren't added. + comments: []string{ + "+k8s:openapi-gen=x-kubernetes-no-value", + "+k8s:openapi-gen=x-kubernetes-member-success:success", + "+k8s:openapi-gen=x-kubernetes-wrong-separator;error", + }, + extensionTag: "k8s:openapi-gen", + extensionName: "x-kubernetes-member-success", + extensionValues: []string{"success"}, + }, + } + for _, test := range tests { + extensions, _ := parseExtensions(test.comments) + actual := extensions[0] + if actual.idlTag != test.extensionTag { + t.Errorf("Extension Tag: expected (%s), actual (%s)\n", test.extensionTag, actual.idlTag) + } + if actual.xName != test.extensionName { + t.Errorf("Extension Name: expected (%s), actual (%s)\n", test.extensionName, actual.xName) + } + if !reflect.DeepEqual(actual.values, test.extensionValues) { + t.Errorf("Extension Values: expected (%s), actual (%s)\n", test.extensionValues, actual.values) + } + if actual.hasMultipleValues() { + t.Errorf("%s: hasMultipleValues() should be false\n", actual.xName) + } + } + +} + +func TestMultipleTagExtensions(t *testing.T) { + + var tests = []struct { + comments []string + extensionTag string + extensionName string + extensionValues []string + }{ + { + comments: []string{ + "+listMapKey=port", + "+listMapKey=protocol", + }, + extensionTag: "listMapKey", + extensionName: "x-kubernetes-list-map-keys", + extensionValues: []string{"port", "protocol"}, + }, + } + for _, test := range tests { + extensions, errors := parseExtensions(test.comments) + if len(errors) > 0 { + t.Errorf("Unexpected errors: %v\n", errors) + } + actual := extensions[0] + if actual.idlTag != test.extensionTag { + t.Errorf("Extension Tag: expected (%s), actual (%s)\n", test.extensionTag, actual.idlTag) + } + if actual.xName != test.extensionName { + t.Errorf("Extension Name: expected (%s), actual (%s)\n", test.extensionName, actual.xName) + } + if !reflect.DeepEqual(actual.values, test.extensionValues) { + t.Errorf("Extension Values: expected (%s), actual (%s)\n", test.extensionValues, actual.values) + } + if !actual.hasMultipleValues() { + t.Errorf("%s: hasMultipleValues() should be true\n", actual.xName) + } + } + +} + +func TestExtensionParseErrors(t *testing.T) { + + var tests = []struct { + comments []string + errorMessage string + }{ + { + // Missing extension value should be an error. + comments: []string{ + "+k8s:openapi-gen=x-kubernetes-no-value", + }, + errorMessage: "x-kubernetes-no-value", + }, + { + // Wrong separator should be an error. + comments: []string{ + "+k8s:openapi-gen=x-kubernetes-wrong-separator;error", + }, + errorMessage: "x-kubernetes-wrong-separator;error", + }, + } + + for _, test := range tests { + _, errors := parseExtensions(test.comments) + if len(errors) == 0 { + t.Errorf("Expected errors while parsing: %v\n", test.comments) + } + error := errors[0] + if !strings.Contains(error.Error(), test.errorMessage) { + t.Errorf("Error (%v) should contain substring (%s)\n", error, test.errorMessage) + } + } +} + +func TestExtensionAllowedValues(t *testing.T) { + + var methodTests = []struct { + e extension + allowedValues sets.String + }{ + { + e: extension{ + idlTag: "patchStrategy", + }, + allowedValues: sets.NewString("merge", "retainKeys"), + }, + { + e: extension{ + idlTag: "patchMergeKey", + }, + allowedValues: nil, + }, + { + e: extension{ + idlTag: "listType", + }, + allowedValues: sets.NewString("atomic", "set", "map"), + }, + { + e: extension{ + idlTag: "listMapKey", + }, + allowedValues: nil, + }, + { + e: extension{ + idlTag: "k8s:openapi-gen", + }, + allowedValues: nil, + }, + } + for _, test := range methodTests { + if test.allowedValues != nil { + if !test.e.hasAllowedValues() { + t.Errorf("hasAllowedValues() expected (true), but received: false") + } + if !reflect.DeepEqual(test.allowedValues, test.e.allowedValues()) { + t.Errorf("allowedValues() expected (%v), but received: %v", + test.allowedValues, test.e.allowedValues()) + } + } + if test.allowedValues == nil && test.e.hasAllowedValues() { + t.Errorf("hasAllowedValues() expected (false), but received: true") + } + } + + var successTests = []struct { + e extension + }{ + { + e: extension{ + idlTag: "patchStrategy", + xName: "x-kubernetes-patch-strategy", + values: []string{"merge"}, + }, + }, + { + // Validate multiple values. + e: extension{ + idlTag: "patchStrategy", + xName: "x-kubernetes-patch-strategy", + values: []string{"merge", "retainKeys"}, + }, + }, + { + e: extension{ + idlTag: "patchMergeKey", + xName: "x-kubernetes-patch-merge-key", + values: []string{"key1"}, + }, + }, + { + e: extension{ + idlTag: "listType", + xName: "x-kubernetes-list-type", + values: []string{"atomic"}, + }, + }, + } + for _, test := range successTests { + actualErr := test.e.validateAllowedValues() + if actualErr != nil { + t.Errorf("Expected no error for (%v), but received: %v\n", test.e, actualErr) + } + } + + var failureTests = []struct { + e extension + }{ + { + // Every value must be allowed. + e: extension{ + idlTag: "patchStrategy", + xName: "x-kubernetes-patch-strategy", + values: []string{"disallowed", "merge"}, + }, + }, + { + e: extension{ + idlTag: "patchStrategy", + xName: "x-kubernetes-patch-strategy", + values: []string{"foo"}, + }, + }, + { + e: extension{ + idlTag: "listType", + xName: "x-kubernetes-list-type", + values: []string{"not-allowed"}, + }, + }, + } + for _, test := range failureTests { + actualErr := test.e.validateAllowedValues() + if actualErr == nil { + t.Errorf("Expected error, but received none: %v\n", test.e) + } + } + +} + +func TestExtensionKind(t *testing.T) { + + var methodTests = []struct { + e extension + kind types.Kind + }{ + { + e: extension{ + idlTag: "patchStrategy", + }, + kind: types.Slice, + }, + { + e: extension{ + idlTag: "patchMergeKey", + }, + kind: types.Slice, + }, + { + e: extension{ + idlTag: "listType", + }, + kind: types.Slice, + }, + { + e: extension{ + idlTag: "listMapKey", + }, + kind: types.Slice, + }, + { + e: extension{ + idlTag: "k8s:openapi-gen", + }, + kind: "", + }, + } + for _, test := range methodTests { + if len(test.kind) > 0 { + if !test.e.hasKind() { + t.Errorf("%v: hasKind() expected (true), but received: false", test.e) + } + if test.kind != test.e.kind() { + t.Errorf("%v: kind() expected (%v), but received: %v", test.e, test.kind, test.e.kind()) + } + } else { + if test.e.hasKind() { + t.Errorf("%v: hasKind() expected (false), but received: true", test.e) + } + } + } +} + +func TestValidateMemberExtensions(t *testing.T) { + + patchStrategyExtension := extension{ + idlTag: "patchStrategy", + xName: "x-kubernetes-patch-strategy", + values: []string{"merge"}, + } + patchMergeKeyExtension := extension{ + idlTag: "patchMergeKey", + xName: "x-kubernetes-patch-merge-key", + values: []string{"key1", "key2"}, + } + listTypeExtension := extension{ + idlTag: "listType", + xName: "x-kubernetes-list-type", + values: []string{"atomic"}, + } + listMapKeysExtension := extension{ + idlTag: "listMapKey", + xName: "x-kubernetes-map-keys", + values: []string{"key1"}, + } + genExtension := extension{ + idlTag: "k8s:openapi-gen", + xName: "x-kubernetes-member-type", + values: []string{"value1"}, + } + + sliceField := types.Member{ + Name: "Containers", + Type: &types.Type{ + Kind: types.Slice, + }, + } + mapField := types.Member{ + Name: "Containers", + Type: &types.Type{ + Kind: types.Map, + }, + } + + var successTests = []struct { + extensions []extension + member types.Member + }{ + // Test single member extension + { + extensions: []extension{patchStrategyExtension}, + member: sliceField, + }, + // Test multiple member extensions + { + extensions: []extension{ + patchMergeKeyExtension, + listTypeExtension, + listMapKeysExtension, + genExtension, // Should not generate errors during type validation + }, + member: sliceField, + }, + } + for _, test := range successTests { + errors := validateMemberExtensions(test.extensions, &test.member) + if len(errors) > 0 { + t.Errorf("validateMemberExtensions: %v should have produced no errors. Errors: %v", + test.extensions, errors) + } + } + + var failureTests = []struct { + extensions []extension + member types.Member + }{ + // Test single member extension + { + extensions: []extension{patchStrategyExtension}, + member: mapField, + }, + // Test multiple member extensions + { + extensions: []extension{ + patchMergeKeyExtension, + listTypeExtension, + listMapKeysExtension, + }, + member: mapField, + }, + } + for _, test := range failureTests { + errors := validateMemberExtensions(test.extensions, &test.member) + if len(errors) != len(test.extensions) { + t.Errorf("validateMemberExtensions: %v should have produced all errors. Errors: %v", + test.extensions, errors) + } + } + +} diff --git a/deps/k8s.io/kube-openapi/pkg/generators/openapi.go b/deps/k8s.io/kube-openapi/pkg/generators/openapi.go index 73e367b35..d6c6275a7 100644 --- a/deps/k8s.io/kube-openapi/pkg/generators/openapi.go +++ b/deps/k8s.io/kube-openapi/pkg/generators/openapi.go @@ -20,6 +20,7 @@ import ( "bytes" "fmt" "io" + "os" "path/filepath" "reflect" "sort" @@ -29,6 +30,7 @@ import ( "k8s.io/gengo/generator" "k8s.io/gengo/namer" "k8s.io/gengo/types" + generatorargs "k8s.io/kube-openapi/cmd/openapi-gen/args" openapi "k8s.io/kube-openapi/pkg/common" "github.com/golang/glog" @@ -40,15 +42,17 @@ const tagOptional = "optional" // Known values for the tag. const ( - tagValueTrue = "true" - tagValueFalse = "false" - tagExtensionPrefix = "x-kubernetes-" - tagPatchStrategy = "patchStrategy" - tagPatchMergeKey = "patchMergeKey" - patchStrategyExtensionName = "patch-strategy" - patchMergeKeyExtensionName = "patch-merge-key" + tagValueTrue = "true" + tagValueFalse = "false" ) +// Used for temporary validation of patch struct tags. +// TODO: Remove patch struct tag validation because they we are now consuming OpenAPI on server. +var tempPatchTags = [...]string{ + "patchMergeKey", + "patchStrategy", +} + func getOpenAPITagValue(comments []string) []string { return types.ExtractCommentTags("+", comments)[tagName] } @@ -118,13 +122,18 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat `)...) + reportFilename := "-" + if customArgs, ok := arguments.CustomArgs.(*generatorargs.CustomArgs); ok { + reportFilename = customArgs.ReportFilename + } + return generator.Packages{ &generator.DefaultPackage{ PackageName: filepath.Base(arguments.OutputPackagePath), PackagePath: arguments.OutputPackagePath, HeaderText: header, GeneratorFunc: func(c *generator.Context) (generators []generator.Generator) { - return []generator.Generator{NewOpenAPIGen(arguments.OutputFileBaseName, arguments.OutputPackagePath, context)} + return []generator.Generator{NewOpenAPIGen(arguments.OutputFileBaseName, arguments.OutputPackagePath, context, newAPILinter(), reportFilename)} }, FilterFunc: func(c *generator.Context, t *types.Type) bool { // There is a conflict between this codegen and codecgen, we should avoid types generated for codecgen @@ -153,26 +162,39 @@ const ( type openAPIGen struct { generator.DefaultGen // TargetPackage is the package that will get GetOpenAPIDefinitions function returns all open API definitions. - targetPackage string - imports namer.ImportTracker - context *generator.Context + targetPackage string + imports namer.ImportTracker + types []*types.Type + context *generator.Context + linter *apiLinter + reportFilename string } -func NewOpenAPIGen(sanitizedName string, targetPackage string, context *generator.Context) generator.Generator { +func NewOpenAPIGen(sanitizedName string, targetPackage string, context *generator.Context, linter *apiLinter, reportFilename string) generator.Generator { return &openAPIGen{ DefaultGen: generator.DefaultGen{ OptionalName: sanitizedName, }, - imports: generator.NewImportTracker(), - targetPackage: targetPackage, - context: context, + imports: generator.NewImportTracker(), + targetPackage: targetPackage, + context: context, + linter: linter, + reportFilename: reportFilename, } } +const nameTmpl = "schema_$.type|private$" + func (g *openAPIGen) Namers(c *generator.Context) namer.NameSystems { // Have the raw namer for this file track what it imports. return namer.NameSystems{ "raw": namer.NewRawNamer(g.targetPackage, g.imports), + "private": &namer.NameStrategy{ + Join: func(pre string, in []string, post string) string { + return strings.Join(in, "_") + }, + PrependPackageNames: 4, // enough to fully qualify from k8s.io/api/... + }, } } @@ -181,6 +203,7 @@ func (g *openAPIGen) Filter(c *generator.Context, t *types.Type) bool { if strings.HasPrefix(t.Name.Name, "codecSelfer") { return false } + g.types = append(g.types, t) return true } @@ -215,17 +238,25 @@ func (g *openAPIGen) Init(c *generator.Context, w io.Writer) error { sw := generator.NewSnippetWriter(w, c, "$", "$") sw.Do("func GetOpenAPIDefinitions(ref $.ReferenceCallback|raw$) map[string]$.OpenAPIDefinition|raw$ {\n", argsFromType(nil)) sw.Do("return map[string]$.OpenAPIDefinition|raw${\n", argsFromType(nil)) - return sw.Error() -} -func (g *openAPIGen) Finalize(c *generator.Context, w io.Writer) error { - sw := generator.NewSnippetWriter(w, c, "$", "$") - sw.Do("}\n", nil) + for _, t := range g.types { + err := newOpenAPITypeWriter(sw).generateCall(t) + if err != nil { + return err + } + } + sw.Do("}\n", nil) + sw.Do("}\n\n", nil) + return sw.Error() } func (g *openAPIGen) GenerateType(c *generator.Context, t *types.Type, w io.Writer) error { + glog.V(5).Infof("validating API rules for type %v", t) + if err := g.linter.validate(t); err != nil { + return err + } glog.V(5).Infof("generating for type %v", t) sw := generator.NewSnippetWriter(w, c, "$", "$") err := newOpenAPITypeWriter(sw).generate(t) @@ -243,10 +274,6 @@ func getJsonTags(m *types.Member) []string { return strings.Split(jsonTag, ",") } -func getPatchTags(m *types.Member) (string, string) { - return reflect.StructTag(m.Tags).Get(tagPatchMergeKey), reflect.StructTag(m.Tags).Get(tagPatchStrategy) -} - func getReferableName(m *types.Member) string { jsonTags := getJsonTags(m) if len(jsonTags) > 0 { @@ -342,7 +369,7 @@ func (g openAPITypeWriter) generateMembers(t *types.Type, required []string) ([] return required, nil } -func (g openAPITypeWriter) generate(t *types.Type) error { +func (g openAPITypeWriter) generateCall(t *types.Type) error { // Only generate for struct type and ignore the rest switch t.Kind { case types.Struct: @@ -350,31 +377,37 @@ func (g openAPITypeWriter) generate(t *types.Type) error { g.Do("\"$.$\": ", t.Name) if hasOpenAPIDefinitionMethod(t) { g.Do("$.type|raw${}.OpenAPIDefinition(),\n", args) + } else { + g.Do(nameTmpl+"(ref),\n", args) + } + } + return g.Error() +} + +func (g openAPITypeWriter) generate(t *types.Type) error { + // Only generate for struct type and ignore the rest + switch t.Kind { + case types.Struct: + if hasOpenAPIDefinitionMethod(t) { + // already invoked directly return nil } + + args := argsFromType(t) + g.Do("func "+nameTmpl+"(ref $.ReferenceCallback|raw$) $.OpenAPIDefinition|raw$ {\n", args) if hasOpenAPIDefinitionMethods(t) { - // Since this generated snippet is part of a map: - // - // map[string]common.OpenAPIDefinition: { - // "TYPE_NAME": { - // Schema: spec.Schema{ ... }, - // }, - // } - // - // For compliance with gofmt -s it's important we elide the - // struct type. The type is implied by the map and will be - // removed otherwise. - g.Do("{\n"+ + g.Do("return $.OpenAPIDefinition|raw${\n"+ "Schema: spec.Schema{\n"+ - "SchemaProps: spec.SchemaProps{\n"+ - "Type:$.type|raw${}.OpenAPISchemaType(),\n"+ + "SchemaProps: spec.SchemaProps{\n", args) + g.generateDescription(t.CommentLines) + g.Do("Type:$.type|raw${}.OpenAPISchemaType(),\n"+ "Format:$.type|raw${}.OpenAPISchemaFormat(),\n"+ "},\n"+ "},\n"+ - "},\n", args) + "}\n}\n\n", args) return nil } - g.Do("{\nSchema: spec.Schema{\nSchemaProps: spec.SchemaProps{\n", nil) + g.Do("return $.OpenAPIDefinition|raw${\nSchema: spec.Schema{\nSchemaProps: spec.SchemaProps{\n", args) g.generateDescription(t.CommentLines) g.Do("Properties: map[string]$.SpecSchemaType|raw${\n", args) required, err := g.generateMembers(t, []string{}) @@ -386,7 +419,7 @@ func (g openAPITypeWriter) generate(t *types.Type) error { g.Do("Required: []string{\"$.$\"},\n", strings.Join(required, "\",\"")) } g.Do("},\n", nil) - if err := g.generateExtensions(t.CommentLines); err != nil { + if err := g.generateStructExtensions(t); err != nil { return err } g.Do("},\n", nil) @@ -406,70 +439,73 @@ func (g openAPITypeWriter) generate(t *types.Type) error { } g.Do("\"$.$\",", k) } - g.Do("},\n},\n", nil) + g.Do("},\n}\n}\n\n", nil) } return nil } -func (g openAPITypeWriter) generateExtensions(CommentLines []string) error { - tagValues := getOpenAPITagValue(CommentLines) - type NameValue struct { - Name, Value string - } - extensions := []NameValue{} - for _, val := range tagValues { - if strings.HasPrefix(val, tagExtensionPrefix) { - parts := strings.SplitN(val, ":", 2) - if len(parts) != 2 { - return fmt.Errorf("invalid extension value: %v", val) - } - extensions = append(extensions, NameValue{parts[0], parts[1]}) +func (g openAPITypeWriter) generateStructExtensions(t *types.Type) error { + extensions, errors := parseExtensions(t.CommentLines) + // Initially, we will only log struct extension errors. + if len(errors) > 0 { + for _, e := range errors { + glog.V(2).Infof("[%s]: %s\n", t.String(), e) } } - patchMergeKeyTag, err := getSingleTagsValue(CommentLines, tagPatchMergeKey) - if err != nil { - return err - } - if len(patchMergeKeyTag) > 0 { - extensions = append(extensions, NameValue{tagExtensionPrefix + patchMergeKeyExtensionName, patchMergeKeyTag}) - } - patchStrategyTag, err := getSingleTagsValue(CommentLines, tagPatchStrategy) - if err != nil { - return err - } - if len(patchStrategyTag) > 0 { - extensions = append(extensions, NameValue{tagExtensionPrefix + patchStrategyExtensionName, patchStrategyTag}) + // TODO(seans3): Validate struct extensions here. + g.emitExtensions(extensions) + return nil +} + +func (g openAPITypeWriter) generateMemberExtensions(m *types.Member, parent *types.Type) error { + extensions, parseErrors := parseExtensions(m.CommentLines) + validationErrors := validateMemberExtensions(extensions, m) + errors := append(parseErrors, validationErrors...) + // Initially, we will only log member extension errors. + if len(errors) > 0 { + errorPrefix := fmt.Sprintf("[%s] %s:", parent.String(), m.String()) + for _, e := range errors { + glog.V(2).Infof("%s %s\n", errorPrefix, e) + } } + g.emitExtensions(extensions) + return nil +} + +func (g openAPITypeWriter) emitExtensions(extensions []extension) { + // If any extensions exist, then emit code to create them. if len(extensions) == 0 { - return nil + return } g.Do("VendorExtensible: spec.VendorExtensible{\nExtensions: spec.Extensions{\n", nil) for _, extension := range extensions { - g.Do("\"$.$\": ", extension.Name) - g.Do("\"$.$\",\n", extension.Value) + g.Do("\"$.$\": ", extension.xName) + if extension.hasMultipleValues() { + g.Do("[]string{\n", nil) + } + for _, value := range extension.values { + g.Do("\"$.$\",\n", value) + } + if extension.hasMultipleValues() { + g.Do("},\n", nil) + } } g.Do("},\n},\n", nil) - return nil } // TODO(#44005): Move this validation outside of this generator (probably to policy verifier) func (g openAPITypeWriter) validatePatchTags(m *types.Member, parent *types.Type) error { - patchMergeKeyStructTag, patchStrategyStructTag := getPatchTags(m) - patchMergeKeyCommentTag, err := getSingleTagsValue(m.CommentLines, tagPatchMergeKey) - if err != nil { - return err - } - patchStrategyCommentTag, err := getSingleTagsValue(m.CommentLines, tagPatchStrategy) - if err != nil { - return err - } - if patchMergeKeyStructTag != patchMergeKeyCommentTag { - return fmt.Errorf("patchMergeKey in comment and struct tags should match for member (%s) of (%s)", - m.Name, parent.Name.String()) - } - if patchStrategyStructTag != patchStrategyCommentTag { - return fmt.Errorf("patchStrategy in comment and struct tags should match for member (%s) of (%s)", - m.Name, parent.Name.String()) + // TODO: Remove patch struct tag validation because they we are now consuming OpenAPI on server. + for _, tagKey := range tempPatchTags { + structTagValue := reflect.StructTag(m.Tags).Get(tagKey) + commentTagValue, err := getSingleTagsValue(m.CommentLines, tagKey) + if err != nil { + return err + } + if structTagValue != commentTagValue { + return fmt.Errorf("Tags in comment and struct should match for member (%s) of (%s)", + m.Name, parent.Name.String()) + } } return nil } @@ -526,7 +562,7 @@ func (g openAPITypeWriter) generateProperty(m *types.Member, parent *types.Type) return err } g.Do("\"$.$\": {\n", name) - if err := g.generateExtensions(m.CommentLines); err != nil { + if err := g.generateMemberExtensions(m, parent); err != nil { return err } g.Do("SchemaProps: spec.SchemaProps{\n", nil) @@ -642,3 +678,27 @@ func (g openAPITypeWriter) generateSliceProperty(t *types.Type) error { g.Do("},\n},\n},\n", nil) return nil } + +// Finalize prints the API rule violations to report file (if specified from arguments) or stdout (default) +func (g *openAPIGen) Finalize(c *generator.Context, w io.Writer) error { + // If report file isn't specified, return error to force user to choose either stdout ("-") or a file name + if len(g.reportFilename) == 0 { + return fmt.Errorf("empty report file name: please provide a valid file name or use the default \"-\" (stdout)") + } + // If stdout is specified, print violations and return error + if g.reportFilename == "-" { + return g.linter.report(os.Stdout) + } + // Otherwise, print violations to report file and return nil + f, err := os.Create(g.reportFilename) + if err != nil { + return err + } + defer f.Close() + g.linter.report(f) + // NOTE: we don't return error here because we assume that the report file will + // get evaluated afterwards to determine if error should be raised. For example, + // you can have make rules that compare the report file with existing known + // violations (whitelist) and determine no error if no change is detected. + return nil +} diff --git a/deps/k8s.io/kube-openapi/pkg/generators/openapi_test.go b/deps/k8s.io/kube-openapi/pkg/generators/openapi_test.go index c6128d02a..6713b8324 100644 --- a/deps/k8s.io/kube-openapi/pkg/generators/openapi_test.go +++ b/deps/k8s.io/kube-openapi/pkg/generators/openapi_test.go @@ -20,6 +20,7 @@ import ( "bytes" "fmt" "path/filepath" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -46,7 +47,7 @@ func construct(t *testing.T, files map[string]string, testNamer namer.Namer) (*p return b, u, o } -func testOpenAPITypeWritter(t *testing.T, code string) (error, *assert.Assertions, *bytes.Buffer) { +func testOpenAPITypeWriter(t *testing.T, code string) (error, error, *assert.Assertions, *bytes.Buffer, *bytes.Buffer) { assert := assert.New(t) var testFiles = map[string]string{ "base/foo/bar.go": code, @@ -54,20 +55,33 @@ func testOpenAPITypeWritter(t *testing.T, code string) (error, *assert.Assertion rawNamer := namer.NewRawNamer("o", nil) namers := namer.NameSystems{ "raw": namer.NewRawNamer("", nil), + "private": &namer.NameStrategy{ + Join: func(pre string, in []string, post string) string { + return strings.Join(in, "_") + }, + PrependPackageNames: 4, // enough to fully qualify from k8s.io/api/... + }, } builder, universe, _ := construct(t, testFiles, rawNamer) context, err := generator.NewContext(builder, namers, "raw") if err != nil { t.Fatal(err) } - buffer := &bytes.Buffer{} - sw := generator.NewSnippetWriter(buffer, context, "$", "$") blahT := universe.Type(types.Name{Package: "base/foo", Name: "Blah"}) - return newOpenAPITypeWriter(sw).generate(blahT), assert, buffer + + callBuffer := &bytes.Buffer{} + callSW := generator.NewSnippetWriter(callBuffer, context, "$", "$") + callError := newOpenAPITypeWriter(callSW).generateCall(blahT) + + funcBuffer := &bytes.Buffer{} + funcSW := generator.NewSnippetWriter(funcBuffer, context, "$", "$") + funcError := newOpenAPITypeWriter(funcSW).generate(blahT) + + return callError, funcError, assert, callBuffer, funcBuffer } func TestSimple(t *testing.T) { - err, assert, buffer := testOpenAPITypeWritter(t, ` + callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, ` package foo // Blah is a test. @@ -112,15 +126,24 @@ type Blah struct { // +k8s:openapi-gen=x-kubernetes-member-tag:member_test WithExtension string // a member with struct tag as extension - // +patchStrategy=ps + // +patchStrategy=merge // +patchMergeKey=pmk - WithStructTagExtension string `+"`"+`patchStrategy:"ps" patchMergeKey:"pmk"`+"`"+` + WithStructTagExtension string `+"`"+`patchStrategy:"merge" patchMergeKey:"pmk"`+"`"+` + // a member with a list type + // +listType=atomic + WithListType []string } `) - if err != nil { - t.Fatal(err) + if callErr != nil { + t.Fatal(callErr) + } + if funcErr != nil { + t.Fatal(funcErr) } - assert.Equal(`"base/foo.Blah": { + assert.Equal(`"base/foo.Blah": schema_base_foo_Blah(ref), +`, callBuffer.String()) + assert.Equal(`func schema_base_foo_Blah(ref common.ReferenceCallback) common.OpenAPIDefinition { +return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "Blah is a test.", @@ -246,7 +269,7 @@ Format: "", VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-patch-merge-key": "pmk", -"x-kubernetes-patch-strategy": "ps", +"x-kubernetes-patch-strategy": "merge", }, }, SchemaProps: spec.SchemaProps{ @@ -255,8 +278,27 @@ Type: []string{"string"}, Format: "", }, }, +"WithListType": { +VendorExtensible: spec.VendorExtensible{ +Extensions: spec.Extensions{ +"x-kubernetes-list-type": "atomic", +}, +}, +SchemaProps: spec.SchemaProps{ +Description: "a member with a list type", +Type: []string{"array"}, +Items: &spec.SchemaOrArray{ +Schema: &spec.Schema{ +SchemaProps: spec.SchemaProps{ +Type: []string{"string"}, +Format: "", +}, +}, +}, +}, +}, }, -Required: []string{"String","Int64","Int32","Int16","Int8","Uint","Uint64","Uint32","Uint16","Uint8","Byte","Bool","Float64","Float32","ByteArray","WithExtension","WithStructTagExtension"}, +Required: []string{"String","Int64","Int32","Int16","Int8","Uint","Uint64","Uint32","Uint16","Uint8","Byte","Bool","Float64","Float32","ByteArray","WithExtension","WithStructTagExtension","WithListType"}, }, VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -266,12 +308,14 @@ Extensions: spec.Extensions{ }, Dependencies: []string{ }, -}, -`, buffer.String()) +} +} + +`, funcBuffer.String()) } func TestFailingSample1(t *testing.T) { - err, assert, _ := testOpenAPITypeWritter(t, ` + _, funcErr, assert, _, _ := testOpenAPITypeWriter(t, ` package foo // Map sample tests openAPIGen.generateMapProperty method. @@ -280,13 +324,13 @@ type Blah struct { StringToArray map[string]map[string]string } `) - if assert.Error(err, "An error was expected") { - assert.Equal(err, fmt.Errorf("map Element kind Map is not supported in map[string]map[string]string")) + if assert.Error(funcErr, "An error was expected") { + assert.Equal(funcErr, fmt.Errorf("map Element kind Map is not supported in map[string]map[string]string")) } } func TestFailingSample2(t *testing.T) { - err, assert, _ := testOpenAPITypeWritter(t, ` + _, funcErr, assert, _, _ := testOpenAPITypeWriter(t, ` package foo // Map sample tests openAPIGen.generateMapProperty method. @@ -294,13 +338,13 @@ type Blah struct { // A sample String to String map StringToArray map[int]string } `) - if assert.Error(err, "An error was expected") { - assert.Equal(err, fmt.Errorf("map with non-string keys are not supported by OpenAPI in map[int]string")) + if assert.Error(funcErr, "An error was expected") { + assert.Equal(funcErr, fmt.Errorf("map with non-string keys are not supported by OpenAPI in map[int]string")) } } func TestCustomDef(t *testing.T) { - err, assert, buffer := testOpenAPITypeWritter(t, ` + callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, ` package foo import openapi "k8s.io/kube-openapi/pkg/common" @@ -319,39 +363,53 @@ func (_ Blah) OpenAPIDefinition() openapi.OpenAPIDefinition { } } `) - if err != nil { - t.Fatal(err) + if callErr != nil { + t.Fatal(callErr) + } + if funcErr != nil { + t.Fatal(funcErr) } assert.Equal(`"base/foo.Blah": foo.Blah{}.OpenAPIDefinition(), -`, buffer.String()) +`, callBuffer.String()) + assert.Equal(``, funcBuffer.String()) } func TestCustomDefs(t *testing.T) { - err, assert, buffer := testOpenAPITypeWritter(t, ` + callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, ` package foo +// Blah is a custom type type Blah struct { } func (_ Blah) OpenAPISchemaType() []string { return []string{"string"} } func (_ Blah) OpenAPISchemaFormat() string { return "date-time" } `) - if err != nil { - t.Fatal(err) + if callErr != nil { + t.Fatal(callErr) } - assert.Equal(`"base/foo.Blah": { + if funcErr != nil { + t.Fatal(funcErr) + } + assert.Equal(`"base/foo.Blah": schema_base_foo_Blah(ref), +`, callBuffer.String()) + assert.Equal(`func schema_base_foo_Blah(ref common.ReferenceCallback) common.OpenAPIDefinition { +return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ +Description: "Blah is a custom type", Type:foo.Blah{}.OpenAPISchemaType(), Format:foo.Blah{}.OpenAPISchemaFormat(), }, }, -}, -`, buffer.String()) +} +} + +`, funcBuffer.String()) } func TestPointer(t *testing.T) { - err, assert, buffer := testOpenAPITypeWritter(t, ` + callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, ` package foo // PointerSample demonstrate pointer's properties @@ -366,10 +424,16 @@ type Blah struct { MapPointer *map[string]string } `) - if err != nil { - t.Fatal(err) + if callErr != nil { + t.Fatal(callErr) + } + if funcErr != nil { + t.Fatal(funcErr) } - assert.Equal(`"base/foo.Blah": { + assert.Equal(`"base/foo.Blah": schema_base_foo_Blah(ref), +`, callBuffer.String()) + assert.Equal(`func schema_base_foo_Blah(ref common.ReferenceCallback) common.OpenAPIDefinition { +return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "PointerSample demonstrate pointer's properties", @@ -421,12 +485,14 @@ Required: []string{"StringPointer","StructPointer","SlicePointer","MapPointer"}, }, Dependencies: []string{ "base/foo.Blah",}, -}, -`, buffer.String()) +} +} + +`, funcBuffer.String()) } func TestNestedLists(t *testing.T) { - err, assert, buffer := testOpenAPITypeWritter(t, ` + callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, ` package foo // Blah is a test. @@ -437,10 +503,16 @@ type Blah struct { NestedList [][]int64 } `) - if err != nil { - t.Fatal(err) + if callErr != nil { + t.Fatal(callErr) + } + if funcErr != nil { + t.Fatal(funcErr) } - assert.Equal(`"base/foo.Blah": { + assert.Equal(`"base/foo.Blah": schema_base_foo_Blah(ref), +`, callBuffer.String()) + assert.Equal(`func schema_base_foo_Blah(ref common.ReferenceCallback) common.OpenAPIDefinition { +return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Description: "Blah is a test.", @@ -477,6 +549,77 @@ Extensions: spec.Extensions{ }, Dependencies: []string{ }, +} +} + +`, funcBuffer.String()) +} + +func TestExtensions(t *testing.T) { + callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, ` +package foo + +// Blah is a test. +// +k8s:openapi-gen=true +// +k8s:openapi-gen=x-kubernetes-type-tag:type_test +type Blah struct { + // a member with a list type + // +listType=map + // +listMapKey=port + // +listMapKey=protocol + WithListField []string +} + `) + if callErr != nil { + t.Fatal(callErr) + } + if funcErr != nil { + t.Fatal(funcErr) + } + assert.Equal(`"base/foo.Blah": schema_base_foo_Blah(ref), +`, callBuffer.String()) + assert.Equal(`func schema_base_foo_Blah(ref common.ReferenceCallback) common.OpenAPIDefinition { +return common.OpenAPIDefinition{ +Schema: spec.Schema{ +SchemaProps: spec.SchemaProps{ +Description: "Blah is a test.", +Properties: map[string]spec.Schema{ +"WithListField": { +VendorExtensible: spec.VendorExtensible{ +Extensions: spec.Extensions{ +"x-kubernetes-list-map-keys": []string{ +"port", +"protocol", +}, +"x-kubernetes-list-type": "map", +}, +}, +SchemaProps: spec.SchemaProps{ +Description: "a member with a list type", +Type: []string{"array"}, +Items: &spec.SchemaOrArray{ +Schema: &spec.Schema{ +SchemaProps: spec.SchemaProps{ +Type: []string{"string"}, +Format: "", +}, +}, +}, +}, +}, }, -`, buffer.String()) +Required: []string{"WithListField"}, +}, +VendorExtensible: spec.VendorExtensible{ +Extensions: spec.Extensions{ +"x-kubernetes-type-tag": "type_test", +}, +}, +}, +Dependencies: []string{ +}, +} +} + +`, funcBuffer.String()) } diff --git a/deps/k8s.io/kube-openapi/pkg/generators/rules/doc.go b/deps/k8s.io/kube-openapi/pkg/generators/rules/doc.go new file mode 100644 index 000000000..384a44dca --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/generators/rules/doc.go @@ -0,0 +1,23 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package rules contains API rules that are enforced in OpenAPI spec generation +// as part of the machinery. Files under this package implement APIRule interface +// which evaluates Go type and produces list of API rule violations. +// +// Implementations of APIRule should be added to API linter under openAPIGen code- +// generator to get integrated in the generation process. +package rules diff --git a/deps/k8s.io/kube-openapi/pkg/generators/rules/names_match.go b/deps/k8s.io/kube-openapi/pkg/generators/rules/names_match.go new file mode 100644 index 000000000..3a71ff178 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/generators/rules/names_match.go @@ -0,0 +1,172 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rules + +import ( + "reflect" + "strings" + + "k8s.io/kube-openapi/pkg/util/sets" + + "k8s.io/gengo/types" +) + +var ( + // Blacklist of JSON tags that should skip match evaluation + jsonTagBlacklist = sets.NewString( + // Omitted field is ignored by the package + "-", + ) + + // Blacklist of JSON names that should skip match evaluation + jsonNameBlacklist = sets.NewString( + // Empty name is used for inline struct field (e.g. metav1.TypeMeta) + "", + // Special case for object and list meta + "metadata", + ) + + // List of substrings that aren't allowed in Go name and JSON name + disallowedNameSubstrings = sets.NewString( + // Underscore is not allowed in either name + "_", + // Dash is not allowed in either name. Note that since dash is a valid JSON tag, this should be checked + // after JSON tag blacklist check. + "-", + ) +) + +/* +NamesMatch implements APIRule interface. +Go field names must be CamelCase. JSON field names must be camelCase. Other than capitalization of the +initial letter, the two should almost always match. No underscores nor dashes in either. +This rule verifies the convention "Other than capitalization of the initial letter, the two should almost always match." +Examples (also in unit test): + Go name | JSON name | match + podSpec false + PodSpec podSpec true + PodSpec PodSpec false + podSpec podSpec false + PodSpec spec false + Spec podSpec false + JSONSpec jsonSpec true + JSONSpec jsonspec false + HTTPJSONSpec httpJSONSpec true +NOTE: this validator cannot tell two sequential all-capital words from one word, therefore the case below +is also considered matched. + HTTPJSONSpec httpjsonSpec true +NOTE: JSON names in jsonNameBlacklist should skip evaluation + true + podSpec true + podSpec - true + podSpec metadata true +*/ +type NamesMatch struct{} + +// Name returns the name of APIRule +func (n *NamesMatch) Name() string { + return "names_match" +} + +// Validate evaluates API rule on type t and returns a list of field names in +// the type that violate the rule. Empty field name [""] implies the entire +// type violates the rule. +func (n *NamesMatch) Validate(t *types.Type) ([]string, error) { + fields := make([]string, 0) + + // Only validate struct type and ignore the rest + switch t.Kind { + case types.Struct: + for _, m := range t.Members { + goName := m.Name + jsonTag, ok := reflect.StructTag(m.Tags).Lookup("json") + // Distinguish empty JSON tag and missing JSON tag. Empty JSON tag / name is + // allowed (in JSON name blacklist) but missing JSON tag is invalid. + if !ok { + fields = append(fields, goName) + continue + } + if jsonTagBlacklist.Has(jsonTag) { + continue + } + jsonName := strings.Split(jsonTag, ",")[0] + if !namesMatch(goName, jsonName) { + fields = append(fields, goName) + } + } + } + return fields, nil +} + +// namesMatch evaluates if goName and jsonName match the API rule +// TODO: Use an off-the-shelf CamelCase solution instead of implementing this logic. The following existing +// packages have been tried out: +// github.com/markbates/inflect +// github.com/segmentio/go-camelcase +// github.com/iancoleman/strcase +// github.com/fatih/camelcase +// Please see https://github.com/kubernetes/kube-openapi/pull/83#issuecomment-400842314 for more details +// about why they don't satisfy our need. What we need can be a function that detects an acronym at the +// beginning of a string. +func namesMatch(goName, jsonName string) bool { + if jsonNameBlacklist.Has(jsonName) { + return true + } + if !isAllowedName(goName) || !isAllowedName(jsonName) { + return false + } + if strings.ToLower(goName) != strings.ToLower(jsonName) { + return false + } + // Go field names must be CamelCase. JSON field names must be camelCase. + if !isCapital(goName[0]) || isCapital(jsonName[0]) { + return false + } + for i := 0; i < len(goName); i++ { + if goName[i] == jsonName[i] { + // goName[0:i-1] is uppercase and jsonName[0:i-1] is lowercase, goName[i:] + // and jsonName[i:] should match; + // goName[i] should be lowercase if i is equal to 1, e.g.: + // goName | jsonName + // PodSpec podSpec + // or uppercase if i is greater than 1, e.g.: + // goname | jsonName + // JSONSpec jsonSpec + // This is to rule out cases like: + // goname | jsonName + // JSONSpec jsonspec + return goName[i:] == jsonName[i:] && (i == 1 || isCapital(goName[i])) + } + } + return true +} + +// isCaptical returns true if one character is capital +func isCapital(b byte) bool { + return b >= 'A' && b <= 'Z' +} + +// isAllowedName checks the list of disallowedNameSubstrings and returns true if name doesn't contain +// any disallowed substring. +func isAllowedName(name string) bool { + for _, substr := range disallowedNameSubstrings.UnsortedList() { + if strings.Contains(name, substr) { + return false + } + } + return true +} diff --git a/deps/k8s.io/kube-openapi/pkg/generators/rules/names_match_test.go b/deps/k8s.io/kube-openapi/pkg/generators/rules/names_match_test.go new file mode 100644 index 000000000..faae2cba8 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/generators/rules/names_match_test.go @@ -0,0 +1,359 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rules + +import ( + "reflect" + "testing" + + "k8s.io/gengo/types" +) + +func TestNamesMatch(t *testing.T) { + tcs := []struct { + // name of test case + name string + t *types.Type + + // expected list of violation fields + expected []string + }{ + // The comments are in format of {goName, jsonName, match}, + // {"PodSpec", "podSpec", true}, + { + name: "simple", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "PodSpec", + Tags: `json:"podSpec"`, + }, + }, + }, + expected: []string{}, + }, + // {"PodSpec", "podSpec", true}, + { + name: "multiple_json_tags", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "PodSpec", + Tags: `json:"podSpec,omitempty"`, + }, + }, + }, + expected: []string{}, + }, + // {"PodSpec", "podSpec", true}, + { + name: "protobuf_tag", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "PodSpec", + Tags: `json:"podSpec,omitempty" protobuf:"bytes,1,opt,name=podSpec"`, + }, + }, + }, + expected: []string{}, + }, + // {"", "podSpec", false}, + { + name: "empty", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "", + Tags: `json:"podSpec"`, + }, + }, + }, + expected: []string{""}, + }, + // {"PodSpec", "PodSpec", false}, + { + name: "CamelCase_CamelCase", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "PodSpec", + Tags: `json:"PodSpec"`, + }, + }, + }, + expected: []string{"PodSpec"}, + }, + // {"podSpec", "podSpec", false}, + { + name: "camelCase_camelCase", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "podSpec", + Tags: `json:"podSpec"`, + }, + }, + }, + expected: []string{"podSpec"}, + }, + // {"PodSpec", "spec", false}, + { + name: "short_json_name", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "PodSpec", + Tags: `json:"spec"`, + }, + }, + }, + expected: []string{"PodSpec"}, + }, + // {"Spec", "podSpec", false}, + { + name: "long_json_name", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "Spec", + Tags: `json:"podSpec"`, + }, + }, + }, + expected: []string{"Spec"}, + }, + // {"JSONSpec", "jsonSpec", true}, + { + name: "acronym", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "JSONSpec", + Tags: `json:"jsonSpec"`, + }, + }, + }, + expected: []string{}, + }, + // {"JSONSpec", "jsonspec", false}, + { + name: "acronym_invalid", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "JSONSpec", + Tags: `json:"jsonspec"`, + }, + }, + }, + expected: []string{"JSONSpec"}, + }, + // {"HTTPJSONSpec", "httpJSONSpec", true}, + { + name: "multiple_acronym", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "HTTPJSONSpec", + Tags: `json:"httpJSONSpec"`, + }, + }, + }, + expected: []string{}, + }, + // // NOTE: this validator cannot tell two sequential all-capital words from one word, + // // therefore the case below is also considered matched. + // {"HTTPJSONSpec", "httpjsonSpec", true}, + { + name: "multiple_acronym_as_one", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "HTTPJSONSpec", + Tags: `json:"httpjsonSpec"`, + }, + }, + }, + expected: []string{}, + }, + // NOTE: JSON tags in jsonTagBlacklist should skip evaluation + { + name: "blacklist_tag_dash", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "podSpec", + Tags: `json:"-"`, + }, + }, + }, + expected: []string{}, + }, + // {"PodSpec", "-", false}, + { + name: "invalid_json_name_dash", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "PodSpec", + Tags: `json:"-,"`, + }, + }, + }, + expected: []string{"PodSpec"}, + }, + // NOTE: JSON names in jsonNameBlacklist should skip evaluation + // {"", "", true}, + { + name: "unspecified", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "", + Tags: `json:""`, + }, + }, + }, + expected: []string{}, + }, + // {"podSpec", "", true}, + { + name: "blacklist_empty", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "podSpec", + Tags: `json:""`, + }, + }, + }, + expected: []string{}, + }, + // {"podSpec", "metadata", true}, + { + name: "blacklist_metadata", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "podSpec", + Tags: `json:"metadata"`, + }, + }, + }, + expected: []string{}, + }, + { + name: "non_struct", + t: &types.Type{ + Kind: types.Map, + }, + expected: []string{}, + }, + { + name: "no_json_tag", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "PodSpec", + Tags: `podSpec`, + }, + }, + }, + expected: []string{"PodSpec"}, + }, + // NOTE: this is to expand test coverage + // {"S", "s", true}, + { + name: "single_character", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "S", + Tags: `json:"s"`, + }, + }, + }, + expected: []string{}, + }, + // NOTE: names with disallowed substrings should fail evaluation + // {"Pod-Spec", "pod-Spec", false}, + { + name: "disallowed_substring_dash", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "Pod-Spec", + Tags: `json:"pod-Spec"`, + }, + }, + }, + expected: []string{"Pod-Spec"}, + }, + // {"Pod_Spec", "pod_Spec", false}, + { + name: "disallowed_substring_underscore", + t: &types.Type{ + Kind: types.Struct, + Members: []types.Member{ + types.Member{ + Name: "Pod_Spec", + Tags: `json:"pod_Spec"`, + }, + }, + }, + expected: []string{"Pod_Spec"}, + }, + } + + n := &NamesMatch{} + for _, tc := range tcs { + if violations, _ := n.Validate(tc.t); !reflect.DeepEqual(violations, tc.expected) { + t.Errorf("unexpected validation result: test name %v, want: %v, got: %v", + tc.name, tc.expected, violations) + } + } +} + +// TestRuleName tests the Name of API rule. This is to expand test coverage +func TestRuleName(t *testing.T) { + ruleName := "names_match" + n := &NamesMatch{} + if n.Name() != ruleName { + t.Errorf("unexpected API rule name: want: %v, got: %v", ruleName, n.Name()) + } +} diff --git a/deps/k8s.io/kube-openapi/pkg/handler/handler.go b/deps/k8s.io/kube-openapi/pkg/handler/handler.go index 3ac304429..c4bbc0bff 100644 --- a/deps/k8s.io/kube-openapi/pkg/handler/handler.go +++ b/deps/k8s.io/kube-openapi/pkg/handler/handler.go @@ -28,6 +28,8 @@ import ( "sync" "time" + "bitbucket.org/ww/goautoneg" + yaml "gopkg.in/yaml.v2" "github.com/NYTimes/gziphandler" @@ -56,7 +58,6 @@ type OpenAPIService struct { // rwMutex protects All members of this service. rwMutex sync.RWMutex - orgSpec *spec.Swagger lastModified time.Time specBytes []byte @@ -79,10 +80,10 @@ func computeETag(data []byte) string { } // NOTE: [DEPRECATION] We will announce deprecation for format-separated endpoints for OpenAPI spec, -// and switch to a single /openapi/v2 endpoint in Kubernetes 1.9. The design doc and deprecation process +// and switch to a single /openapi/v2 endpoint in Kubernetes 1.10. The design doc and deprecation process // are tracked at: https://docs.google.com/document/d/19lEqE9lc4yHJ3WJAJxS_G7TcORIJXGHyq3wpwcH28nU. // -// BuildAndRegisterOpenAPIService builds the spec and registers a handler to provides access to it. +// BuildAndRegisterOpenAPIService builds the spec and registers a handler to provide access to it. // Use this method if your OpenAPI spec is static. If you want to update the spec, use BuildOpenAPISpec then RegisterOpenAPIService. func BuildAndRegisterOpenAPIService(servePath string, webServices []*restful.WebService, config *common.Config, handler common.PathHandler) (*OpenAPIService, error) { spec, err := builder.BuildOpenAPISpec(webServices, config) @@ -93,10 +94,10 @@ func BuildAndRegisterOpenAPIService(servePath string, webServices []*restful.Web } // NOTE: [DEPRECATION] We will announce deprecation for format-separated endpoints for OpenAPI spec, -// and switch to a single /openapi/v2 endpoint in Kubernetes 1.9. The design doc and deprecation process +// and switch to a single /openapi/v2 endpoint in Kubernetes 1.10. The design doc and deprecation process // are tracked at: https://docs.google.com/document/d/19lEqE9lc4yHJ3WJAJxS_G7TcORIJXGHyq3wpwcH28nU. // -// RegisterOpenAPIService registers a handler to provides access to provided swagger spec. +// RegisterOpenAPIService registers a handler to provide access to provided swagger spec. // Note: servePath should end with ".json" as the RegisterOpenAPIService assume it is serving a // json file and will also serve .pb and .gz files. func RegisterOpenAPIService(openapiSpec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error) { @@ -159,7 +160,6 @@ func (o *OpenAPIService) getSwaggerPbGzBytes() ([]byte, string, time.Time) { } func (o *OpenAPIService) UpdateSpec(openapiSpec *spec.Swagger) (err error) { - orgSpec := openapiSpec specBytes, err := json.MarshalIndent(openapiSpec, " ", " ") if err != nil { return err @@ -179,7 +179,6 @@ func (o *OpenAPIService) UpdateSpec(openapiSpec *spec.Swagger) (err error) { o.rwMutex.Lock() defer o.rwMutex.Unlock() - o.orgSpec = orgSpec o.specBytes = specBytes o.specPb = specPb o.specPbGz = specPbGz @@ -212,47 +211,57 @@ func toGzip(data []byte) []byte { return buf.Bytes() } -// RegisterOpenAPIVersionedService registers a handler to provides access to provided swagger spec. +// RegisterOpenAPIVersionedService registers a handler to provide access to provided swagger spec. func RegisterOpenAPIVersionedService(openapiSpec *spec.Swagger, servePath string, handler common.PathHandler) (*OpenAPIService, error) { o := OpenAPIService{} if err := o.UpdateSpec(openapiSpec); err != nil { return nil, err } - files := map[string]func() ([]byte, string, time.Time){ - "application/json": o.getSwaggerBytes, - "application/com.github.proto-openapi.spec.v2@v1.0+protobuf": o.getSwaggerPbBytes, + accepted := []struct { + Type string + SubType string + GetDataAndETag func() ([]byte, string, time.Time) + }{ + {"application", "json", o.getSwaggerBytes}, + {"application", "com.github.proto-openapi.spec.v2@v1.0+protobuf", o.getSwaggerPbBytes}, } handler.Handle(servePath, gziphandler.GzipHandler(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { - var getDataAndETag func() ([]byte, string, time.Time) - // Get the first value associated with header "Accept" - decipherableFormat := r.Header.Get("Accept") - if decipherableFormat == "" || decipherableFormat == "*/*" { - // If "Accept" header is not set or "*/*", serve json file as default - decipherableFormat = "application/json" + decipherableFormats := r.Header.Get("Accept") + if decipherableFormats == "" { + decipherableFormats = "*/*" } + clauses := goautoneg.ParseAccept(decipherableFormats) w.Header().Add("Vary", "Accept") - - getDataAndETag = files[decipherableFormat] - if getDataAndETag == nil { - // Return 406 for not acceptable format - w.WriteHeader(406) - return + for _, clause := range clauses { + for _, accepts := range accepted { + if clause.Type != accepts.Type && clause.Type != "*" { + continue + } + if clause.SubType != accepts.SubType && clause.SubType != "*" { + continue + } + + // serve the first matching media type in the sorted clause list + data, etag, lastModified := accepts.GetDataAndETag() + w.Header().Set("Etag", etag) + // ServeContent will take care of caching using eTag. + http.ServeContent(w, r, servePath, lastModified, bytes.NewReader(data)) + return + } } - data, etag, lastModified := getDataAndETag() - w.Header().Set("Etag", etag) - - // ServeContent will take care of caching using eTag. - http.ServeContent(w, r, servePath, lastModified, bytes.NewReader(data)) + // Return 406 for not acceptable format + w.WriteHeader(406) + return }), )) return &o, nil } -// BuildAndRegisterOpenAPIVersionedService builds the spec and registers a handler to provides access to it. +// BuildAndRegisterOpenAPIVersionedService builds the spec and registers a handler to provide access to it. // Use this method if your OpenAPI spec is static. If you want to update the spec, use BuildOpenAPISpec then RegisterOpenAPIVersionedService. func BuildAndRegisterOpenAPIVersionedService(servePath string, webServices []*restful.WebService, config *common.Config, handler common.PathHandler) (*OpenAPIService, error) { spec, err := builder.BuildOpenAPISpec(webServices, config) diff --git a/deps/k8s.io/kube-openapi/pkg/handler/handler_test.go b/deps/k8s.io/kube-openapi/pkg/handler/handler_test.go new file mode 100644 index 000000000..8d7146c10 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/handler/handler_test.go @@ -0,0 +1,89 @@ +package handler + +import ( + "encoding/json" + "io/ioutil" + "net/http" + "net/http/httptest" + "reflect" + "testing" + + "github.com/go-openapi/spec" +) + +var returnedSwagger = []byte(`{ + "swagger": "2.0", + "info": { + "title": "Kubernetes", + "version": "v1.11.0" + }}`) + +func TestRegisterOpenAPIVersionedService(t *testing.T) { + var s spec.Swagger + err := s.UnmarshalJSON(returnedSwagger) + if err != nil { + t.Errorf("Unexpected error in unmarshalling SwaggerJSON: %v", err) + } + + returnedJSON, err := json.MarshalIndent(s, " ", " ") + if err != nil { + t.Errorf("Unexpected error in preparing returnedJSON: %v", err) + } + returnedPb, err := toProtoBinary(returnedJSON) + if err != nil { + t.Errorf("Unexpected error in preparing returnedPb: %v", err) + } + + mux := http.NewServeMux() + _, err = RegisterOpenAPIVersionedService(&s, "/openapi/v2", mux) + if err != nil { + t.Errorf("Unexpected error in register OpenAPI versioned service: %v", err) + } + server := httptest.NewServer(mux) + defer server.Close() + client := server.Client() + + tcs := []struct { + acceptHeader string + respStatus int + respBody []byte + }{ + {"", 200, returnedJSON}, + {"*/*", 200, returnedJSON}, + {"application/*", 200, returnedJSON}, + {"application/json", 200, returnedJSON}, + {"test/test", 406, []byte{}}, + {"application/test", 406, []byte{}}, + {"application/test, */*", 200, returnedJSON}, + {"application/test, application/json", 200, returnedJSON}, + {"application/com.github.proto-openapi.spec.v2@v1.0+protobuf", 200, returnedPb}, + {"application/json, application/com.github.proto-openapi.spec.v2@v1.0+protobuf", 200, returnedJSON}, + {"application/com.github.proto-openapi.spec.v2@v1.0+protobuf, application/json", 200, returnedPb}, + {"application/com.github.proto-openapi.spec.v2@v1.0+protobuf; q=0.5, application/json", 200, returnedJSON}, + } + + for _, tc := range tcs { + req, err := http.NewRequest("GET", server.URL+"/openapi/v2", nil) + if err != nil { + t.Errorf("Accept: %v: Unexpected error in creating new request: %v", tc.acceptHeader, err) + } + + req.Header.Add("Accept", tc.acceptHeader) + resp, err := client.Do(req) + if err != nil { + t.Errorf("Accept: %v: Unexpected error in serving HTTP request: %v", tc.acceptHeader, err) + } + + if resp.StatusCode != tc.respStatus { + t.Errorf("Accept: %v: Unexpected response status code, want: %v, got: %v", tc.acceptHeader, tc.respStatus, resp.StatusCode) + } + defer resp.Body.Close() + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + t.Errorf("Accept: %v: Unexpected error in reading response body: %v", tc.acceptHeader, err) + } + if !reflect.DeepEqual(body, tc.respBody) { + t.Errorf("Accept: %v: Response body mismatches, want: %v, got: %v", tc.acceptHeader, tc.respBody, body) + } + } +} diff --git a/deps/k8s.io/kube-openapi/pkg/idl/doc.go b/deps/k8s.io/kube-openapi/pkg/idl/doc.go new file mode 100644 index 000000000..9d59aaf0e --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/idl/doc.go @@ -0,0 +1,140 @@ +/* +Copyright 2018 The Kubernetes 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. +*/ + +// The IDL package describes comment directives that may be applied to +// API types and fields. +package idl + +// ListType annotates a list to further describe its topology. It may +// have 3 possible values: "atomic", "map", or "set". Note that there is +// no default, and the generation step will fail if a list is found that +// is missing the tag. +// +// This tag MUST only be used on lists, or the generation step will +// fail. +// +// Atomic +// +// Example: +// +listType=atomic +// +// Atomic lists will be entirely replaced when updated. This tag may be +// used on any type of list (struct, scalar, ...). +// +// Using this tag will generate the following OpenAPI extension: +// "x-kubernetes-list-type": "atomic" +// +// Map +// +// Example: +// +listType=map +// +// These lists are like maps in that their elements have a non-index key +// used to identify them. Order is preserved upon merge. Using the map +// tag on a list with non-struct elements will result in an error during +// the generation step. +// +// Using this tag will generate the following OpenAPI extension: +// "x-kubernetes-list-type": "map" +// +// Set +// +// Example: +// +listType=set +// +// Sets are lists that must not have multiple times the same value. Each +// value must be a scalar (or another atomic type). +// +// Using this tag will generate the following OpenAPI extension: +// "x-kubernetes-list-type": "set" +type ListType string + +// ListMapKey annotates map lists by specifying the key used as the index of the map. +// +// This tag MUST only be used on lists that have the listType=map +// attribute, or the generation step will fail. Also, the value +// specified for this attribute must be a scalar typed field of the +// child structure (no nesting is supported). +// +// An example of how this can be used is shown in the ListType (map) example. +// +// Example: +// +listMapKey=name +// +// Using this tag will generate the following OpenAPI extension: +// "x-kubernetes-list-map-key": "name" +type ListMapKey string + +// MapType annotates a map to further describe its topology. It may +// have only one value: "atomic". Atomic means that the entire map is +// considered as a whole, rather than as distinct values. +// +// By default, a map will be considered as a set of distinct values that +// can be updated individually. This default WILL NOT generate any +// openapi extension, as this will also be interpreted as the default +// behavior in the openapi definition. +// +// This tag MUST only be used on maps, or the generation step will fail. +// +// Atomic +// +// Example: +// +mapType=atomic +// +// Atomic maps will be entirely replaced when updated. This tag may be +// used on any map. +// +// Using this tag will generate the following OpenAPI extension: +// "x-kubernetes-map-type": "atomic" +type MapType string + +// OpenAPIGen needs to be described. +type OpenAPIGen string + +// Optional needs to be described. +type Optional string + +// PatchMergeKey needs to be described. +type PatchMergeKey string + +// PatchStrategy needs to be described. +type PatchStrategy string + +// StructType annotates a struct to further describe its topology. It may +// have only one value: "atomic". Atomic means that the entire struct is +// considered as a whole, rather than as distinct values. +// +// By default, a struct will be considered as a set of distinct values that +// can be updated individually. This default WILL NOT generate any +// openapi extension, as this will also be interpreted as the default +// behavior in the openapi definition. +// +// This tag MUST only be used on structs, or the generation step will fail. +// +// Atomic +// +// Example: +// +structType=atomic +// +// Atomic structs will be entirely replaced when updated. This tag may be +// used on any struct. +// +// Using this tag will generate the following OpenAPI extension: +// "x-kubernetes-struct-type": "atomic" +type StructType string + +// Union is TBD. +type Union string diff --git a/deps/k8s.io/kube-openapi/pkg/idl/listtype_test.go b/deps/k8s.io/kube-openapi/pkg/idl/listtype_test.go new file mode 100644 index 000000000..2fcc148e2 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/idl/listtype_test.go @@ -0,0 +1,56 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package idl_test + +// This example shows how to use the listType map attribute and how to +// specify a key to identify elements of the list. The listMapKey +// attribute is used to specify that Name is the key of the map. +func ExampleListType_map() { + type SomeStruct struct { + Name string + Value string + } + type SomeAPI struct { + // +listType=map + // +listMapKey=name + elements []SomeStruct + } +} + +// This example shows how to use the listType set attribute to specify +// that this list should be treated as a set: items in the list can't be +// duplicated. +func ExampleListType_set() { + type SomeAPI struct { + // +listType=set + keys []string + } +} + +// This example shows how to use the listType atomic attribute to +// specify that this list should be treated as a whole. +func ExampleListType_atomic() { + type SomeStruct struct { + Name string + Value string + } + + type SomeAPI struct { + // +listType=atomic + elements []SomeStruct + } +} diff --git a/deps/k8s.io/kube-openapi/pkg/idl/maptype_test.go b/deps/k8s.io/kube-openapi/pkg/idl/maptype_test.go new file mode 100644 index 000000000..c791b1a54 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/idl/maptype_test.go @@ -0,0 +1,26 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package idl_test + +// This example shows how to use the mapType atomic attribute to +// specify that this map should be treated as a whole. +func ExampleMapType_atomic() { + type SomeAPI struct { + // +mapType=atomic + elements map[string]string + } +} diff --git a/deps/k8s.io/kube-openapi/pkg/idl/structtype_test.go b/deps/k8s.io/kube-openapi/pkg/idl/structtype_test.go new file mode 100644 index 000000000..a7d8f933d --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/idl/structtype_test.go @@ -0,0 +1,30 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package idl_test + +// This example shows how to use the structType atomic attribute to +// specify that this struct should be treated as a whole. +func ExampleStructType_atomic() { + type SomeStruct struct { + Name string + Value string + } + type SomeAPI struct { + // +structType=atomic + elements SomeStruct + } +} diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/document.go b/deps/k8s.io/kube-openapi/pkg/util/proto/document.go index 61dbf4fc0..a57dcd363 100644 --- a/deps/k8s.io/kube-openapi/pkg/util/proto/document.go +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/document.go @@ -21,8 +21,8 @@ import ( "sort" "strings" - openapi_v2 "github.com/googleapis/gnostic/OpenAPIv2" - yaml "gopkg.in/yaml.v2" + "github.com/googleapis/gnostic/OpenAPIv2" + "gopkg.in/yaml.v2" ) func newSchemaError(path *Path, format string, a ...interface{}) error { @@ -126,12 +126,17 @@ func (d *Definitions) parseMap(s *openapi_v2.Schema, path *Path) (Schema, error) if len(s.GetType().GetValue()) != 0 && s.GetType().GetValue()[0] != object { return nil, newSchemaError(path, "invalid object type") } + var sub Schema if s.GetAdditionalProperties().GetSchema() == nil { - return nil, newSchemaError(path, "invalid object doesn't have additional properties") - } - sub, err := d.ParseSchema(s.GetAdditionalProperties().GetSchema(), path) - if err != nil { - return nil, err + sub = &Arbitrary{ + BaseSchema: d.parseBaseSchema(s, path), + } + } else { + var err error + sub, err = d.ParseSchema(s.GetAdditionalProperties().GetSchema(), path) + if err != nil { + return nil, err + } } return &Map{ BaseSchema: d.parseBaseSchema(s, path), @@ -148,12 +153,10 @@ func (d *Definitions) parsePrimitive(s *openapi_v2.Schema, path *Path) (Schema, t = s.GetType().GetValue()[0] } switch t { - case String: - case Number: - case Integer: - case Boolean: - case "": // Some models are completely empty, and can be safely ignored. - // Do nothing + case String: // do nothing + case Number: // do nothing + case Integer: // do nothing + case Boolean: // do nothing default: return nil, newSchemaError(path, "Unknown primitive type: %q", t) } @@ -219,27 +222,38 @@ func (d *Definitions) parseArbitrary(s *openapi_v2.Schema, path *Path) (Schema, // ParseSchema creates a walkable Schema from an openapi schema. While // this function is public, it doesn't leak through the interface. func (d *Definitions) ParseSchema(s *openapi_v2.Schema, path *Path) (Schema, error) { + if s.GetXRef() != "" { + return d.parseReference(s, path) + } objectTypes := s.GetType().GetValue() - if len(objectTypes) == 1 { + switch len(objectTypes) { + case 0: + // in the OpenAPI schema served by older k8s versions, object definitions created from structs did not include + // the type:object property (they only included the "properties" property), so we need to handle this case + if s.GetProperties() != nil { + return d.parseKind(s, path) + } else { + // Definition has no type and no properties. Treat it as an arbitrary value + // TODO: what if it has additionalProperties or patternProperties? + return d.parseArbitrary(s, path) + } + case 1: t := objectTypes[0] switch t { case object: - return d.parseMap(s, path) + if s.GetProperties() != nil { + return d.parseKind(s, path) + } else { + return d.parseMap(s, path) + } case array: return d.parseArray(s, path) } - - } - if s.GetXRef() != "" { - return d.parseReference(s, path) - } - if s.GetProperties() != nil { - return d.parseKind(s, path) - } - if len(objectTypes) == 0 || (len(objectTypes) == 1 && objectTypes[0] == "") { - return d.parseArbitrary(s, path) + return d.parsePrimitive(s, path) + default: + // the OpenAPI generator never generates (nor it ever did in the past) OpenAPI type definitions with multiple types + return nil, newSchemaError(path, "definitions with multiple types aren't supported") } - return d.parsePrimitive(s, path) } // LookupModel is public through the interface of Models. It diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/openapi.go b/deps/k8s.io/kube-openapi/pkg/util/proto/openapi.go index b48e62c3b..f26b5ef88 100644 --- a/deps/k8s.io/kube-openapi/pkg/util/proto/openapi.go +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/openapi.go @@ -59,7 +59,7 @@ type SchemaVisitor interface { } // SchemaVisitorArbitrary is an additional visitor interface which handles -// arbitrary types. For backwards compatability, it's a separate interface +// arbitrary types. For backwards compatibility, it's a separate interface // which is checked for at runtime. type SchemaVisitorArbitrary interface { SchemaVisitor diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go b/deps/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go index 916abe0c0..b6e237256 100644 --- a/deps/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/openapi_test.go @@ -26,9 +26,10 @@ import ( "k8s.io/kube-openapi/pkg/util/proto/testing" ) -var fakeSchema = testing.Fake{Path: filepath.Join("testing", "swagger.json")} +var fakeSchema = testing.Fake{Path: filepath.Join("testdata", "swagger.json")} +var fakeSchemaNext = testing.Fake{Path: filepath.Join("testdata", "swagger_next.json")} -var _ = Describe("Reading apps/v1beta1/Deployment from openAPIData", func() { +var _ = Describe("Reading apps/v1beta1/Deployment from v1.8 openAPIData", func() { var models proto.Models BeforeEach(func() { s, err := fakeSchema.OpenAPISchema() @@ -132,6 +133,63 @@ var _ = Describe("Reading apps/v1beta1/Deployment from openAPIData", func() { }) }) +var _ = Describe("Reading apps/v1beta1/Deployment from v1.11 openAPIData", func() { + var models proto.Models + BeforeEach(func() { + s, err := fakeSchemaNext.OpenAPISchema() + Expect(err).To(BeNil()) + models, err = proto.NewOpenAPIData(s) + Expect(err).To(BeNil()) + }) + + model := "io.k8s.api.apps.v1beta1.Deployment" + var schema proto.Schema + It("should lookup the Schema by its model name", func() { + schema = models.LookupModel(model) + Expect(schema).ToNot(BeNil()) + }) + + var deployment *proto.Kind + It("should be a Kind", func() { + deployment = schema.(*proto.Kind) + Expect(deployment).ToNot(BeNil()) + }) +}) + +var _ = Describe("Reading apps/v1beta1/ControllerRevision from v1.11 openAPIData", func() { + var models proto.Models + BeforeEach(func() { + s, err := fakeSchemaNext.OpenAPISchema() + Expect(err).To(BeNil()) + models, err = proto.NewOpenAPIData(s) + Expect(err).To(BeNil()) + }) + + model := "io.k8s.api.apps.v1beta1.ControllerRevision" + var schema proto.Schema + It("should lookup the Schema by its model name", func() { + schema = models.LookupModel(model) + Expect(schema).ToNot(BeNil()) + }) + + var cr *proto.Kind + It("data property should be map[string]Arbitrary", func() { + cr = schema.(*proto.Kind) + Expect(cr).ToNot(BeNil()) + Expect(cr.Fields).To(HaveKey("data")) + + data := cr.Fields["data"].(*proto.Map) + Expect(data).ToNot(BeNil()) + Expect(data.GetName()).To(Equal("Map of Arbitrary value (primitive, object or array)")) + Expect(data.GetPath().Get()).To(Equal([]string{"io.k8s.api.apps.v1beta1.ControllerRevision", ".data"})) + + arbitrary := data.SubType.(*proto.Arbitrary) + Expect(arbitrary).ToNot(BeNil()) + Expect(arbitrary.GetName()).To(Equal("Arbitrary value (primitive, object or array)")) + Expect(arbitrary.GetPath().Get()).To(Equal([]string{"io.k8s.api.apps.v1beta1.ControllerRevision", ".data"})) + }) +}) + var _ = Describe("Reading authorization.k8s.io/v1/SubjectAccessReview from openAPIData", func() { var models proto.Models BeforeEach(func() { diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/testing/swagger.json b/deps/k8s.io/kube-openapi/pkg/util/proto/testdata/swagger.json similarity index 99% rename from deps/k8s.io/kube-openapi/pkg/util/proto/testing/swagger.json rename to deps/k8s.io/kube-openapi/pkg/util/proto/testdata/swagger.json index a944bf381..0e15f86b8 100644 --- a/deps/k8s.io/kube-openapi/pkg/util/proto/testing/swagger.json +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/testdata/swagger.json @@ -1112,7 +1112,7 @@ "type": "string" }, "kind": { - "description": "Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + "description": "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", "type": "string" }, "readOnly": { @@ -1672,7 +1672,7 @@ ], "properties": { "names": { - "description": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", + "description": "Names by which this image is known. e.g. [\"k8s.gcr.io/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", "type": "array", "items": { "type": "string" diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/testdata/swagger_next.json b/deps/k8s.io/kube-openapi/pkg/util/proto/testdata/swagger_next.json new file mode 100644 index 000000000..f2dc451f9 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/testdata/swagger_next.json @@ -0,0 +1,6574 @@ +{ + "swagger": "2.0", + "info": { + "title": "Kubernetes", + "version": "v1.8.0" + }, + "paths": {}, + "definitions": { + "io.k8s.api.apps.v1beta1.ControllerRevision": { + "description": "ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.", + "type": "object", + "required": [ + "revision" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "data": { + "description": "Data is the serialized representation of the state.", + "type": "object" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "revision": { + "description": "Revision indicates the revision of the state represented by Data.", + "type": "integer", + "format": "int64" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "ControllerRevision", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.ControllerRevisionList": { + "description": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of ControllerRevisions", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "ControllerRevisionList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.Deployment": { + "description": "Deployment enables declarative updates for Pods and ReplicaSets.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the Deployment.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentSpec" + }, + "status": { + "description": "Most recently observed status of the Deployment.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "Deployment", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.DeploymentCondition": { + "description": "DeploymentCondition describes the state of a deployment at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastUpdateTime": { + "description": "The last time this condition was updated.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of deployment condition.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1beta1.DeploymentList": { + "description": "DeploymentList is a list of Deployments.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of Deployments.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "DeploymentList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.DeploymentRollback": { + "description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.", + "type": "object", + "required": [ + "name", + "rollbackTo" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Required: This must match the Name of a deployment.", + "type": "string" + }, + "rollbackTo": { + "description": "The config of this deployment rollback.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollbackConfig" + }, + "updatedAnnotations": { + "description": "The annotations to be updated to a deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "DeploymentRollback", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.DeploymentSpec": { + "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", + "type": "object", + "required": [ + "template" + ], + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "paused": { + "description": "Indicates that the deployment is paused.", + "type": "boolean" + }, + "progressDeadlineSeconds": { + "description": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.", + "type": "integer", + "format": "int32" + }, + "rollbackTo": { + "description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollbackConfig" + }, + "selector": { + "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "strategy": { + "description": "The deployment strategy to use to replace existing pods with new ones.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentStrategy" + }, + "template": { + "description": "Template describes the pods that will be created.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + } + } + }, + "io.k8s.api.apps.v1beta1.DeploymentStatus": { + "description": "DeploymentStatus is the most recently observed status of the Deployment.", + "type": "object", + "properties": { + "availableReplicas": { + "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "collisionCount": { + "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a deployment's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "observedGeneration": { + "description": "The generation observed by the deployment controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "Total number of ready pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "type": "integer", + "format": "int32" + }, + "unavailableReplicas": { + "description": "Total number of unavailable pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "updatedReplicas": { + "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1beta1.DeploymentStrategy": { + "description": "DeploymentStrategy describes how to replace existing pods with new ones.", + "type": "object", + "properties": { + "rollingUpdate": { + "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollingUpdateDeployment" + }, + "type": { + "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1beta1.RollbackConfig": { + "description": "DEPRECATED.", + "type": "object", + "properties": { + "revision": { + "description": "The revision to rollback to. If set to 0, rollback to the last revision.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.apps.v1beta1.RollingUpdateDeployment": { + "description": "Spec to control the desired behavior of rolling update.", + "type": "object", + "properties": { + "maxSurge": { + "description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new RC can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "maxUnavailable": { + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy": { + "description": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", + "type": "object", + "properties": { + "partition": { + "description": "Partition indicates the ordinal at which the StatefulSet should be partitioned.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1beta1.Scale": { + "description": "Scale represents a scaling request for a resource.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ScaleSpec" + }, + "status": { + "description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ScaleStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "Scale", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.ScaleSpec": { + "description": "ScaleSpec describes the attributes of a scale subresource", + "type": "object", + "properties": { + "replicas": { + "description": "desired number of instances for the scaled object.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1beta1.ScaleStatus": { + "description": "ScaleStatus represents the current status of a scale subresource.", + "type": "object", + "required": [ + "replicas" + ], + "properties": { + "replicas": { + "description": "actual number of observed instances of the scaled object.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "targetSelector": { + "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "type": "string" + } + } + }, + "io.k8s.api.apps.v1beta1.StatefulSet": { + "description": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired identities of pods in this set.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetSpec" + }, + "status": { + "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "StatefulSet", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.StatefulSetList": { + "description": "StatefulSetList is a collection of StatefulSets.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "apps", + "kind": "StatefulSetList", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.apps.v1beta1.StatefulSetSpec": { + "description": "A StatefulSetSpec is the specification of a StatefulSet.", + "type": "object", + "required": [ + "template", + "serviceName" + ], + "properties": { + "podManagementPolicy": { + "description": "podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.", + "type": "string" + }, + "replicas": { + "description": "replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "serviceName": { + "description": "serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where \"pod-specific-string\" is managed by the StatefulSet controller.", + "type": "string" + }, + "template": { + "description": "template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + }, + "updateStrategy": { + "description": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy" + }, + "volumeClaimTemplates": { + "description": "volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" + } + } + } + }, + "io.k8s.api.apps.v1beta1.StatefulSetStatus": { + "description": "StatefulSetStatus represents the current state of a StatefulSet.", + "type": "object", + "required": [ + "replicas" + ], + "properties": { + "collisionCount": { + "description": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", + "type": "integer", + "format": "int32" + }, + "currentReplicas": { + "description": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", + "type": "integer", + "format": "int32" + }, + "currentRevision": { + "description": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "replicas is the number of Pods created by the StatefulSet controller.", + "type": "integer", + "format": "int32" + }, + "updateRevision": { + "description": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", + "type": "string" + }, + "updatedReplicas": { + "description": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy": { + "description": "StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.", + "type": "object", + "properties": { + "rollingUpdate": { + "description": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", + "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy" + }, + "type": { + "description": "Type indicates the type of the StatefulSetUpdateStrategy.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.LocalSubjectAccessReview": { + "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "LocalSubjectAccessReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authorization.v1.NonResourceAttributes": { + "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + "type": "object", + "properties": { + "path": { + "description": "Path is the URL path of the request", + "type": "string" + }, + "verb": { + "description": "Verb is the standard HTTP verb", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.ResourceAttributes": { + "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + "type": "object", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + "type": "string" + }, + "resource": { + "description": "Resource is one of the existing resource types. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is one of the existing resource types. \"\" means none.", + "type": "string" + }, + "verb": { + "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.SelfSubjectAccessReview": { + "description": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. user and groups must be empty", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SelfSubjectAccessReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec": { + "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceAttributes" + } + } + }, + "io.k8s.api.authorization.v1.SubjectAccessReview": { + "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SubjectAccessReview", + "version": "v1" + } + ] + }, + "io.k8s.api.authorization.v1.SubjectAccessReviewSpec": { + "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "extra": { + "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "groups": { + "description": "Groups is the groups you're testing for.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceAttributes" + }, + "uid": { + "description": "UID information about the requesting user.", + "type": "string" + }, + "user": { + "description": "User is the user you're testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1.SubjectAccessReviewStatus": { + "description": "SubjectAccessReviewStatus", + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "description": "Allowed is required. True if the action would be allowed, false otherwise.", + "type": "boolean" + }, + "evaluationError": { + "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + "type": "string" + }, + "reason": { + "description": "Reason is optional. It indicates why a request was allowed or denied.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview": { + "description": "LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "LocalSubjectAccessReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authorization.v1beta1.NonResourceAttributes": { + "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", + "type": "object", + "properties": { + "path": { + "description": "Path is the URL path of the request", + "type": "string" + }, + "verb": { + "description": "Verb is the standard HTTP verb", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.ResourceAttributes": { + "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", + "type": "object", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", + "type": "string" + }, + "namespace": { + "description": "Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview", + "type": "string" + }, + "resource": { + "description": "Resource is one of the existing resource types. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is one of the existing resource types. \"\" means none.", + "type": "string" + }, + "verb": { + "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview": { + "description": "SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \"in all namespaces\". Self is a special case, because users should always be able to check whether they can perform an action", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated. user and groups must be empty", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SelfSubjectAccessReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec": { + "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceAttributes" + } + } + }, + "io.k8s.api.authorization.v1beta1.SubjectAccessReview": { + "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec holds information about the request being evaluated", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" + }, + "status": { + "description": "Status is filled in by the server and indicates whether the request is allowed or not", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "authorization.k8s.io", + "kind": "SubjectAccessReview", + "version": "v1beta1" + } + ] + }, + "io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec": { + "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", + "type": "object", + "properties": { + "extra": { + "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "group": { + "description": "Groups is the groups you're testing for.", + "type": "array", + "items": { + "type": "string" + } + }, + "nonResourceAttributes": { + "description": "NonResourceAttributes describes information for a non-resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceAttributes" + }, + "resourceAttributes": { + "description": "ResourceAuthorizationAttributes describes information for a resource access request", + "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceAttributes" + }, + "uid": { + "description": "UID information about the requesting user.", + "type": "string" + }, + "user": { + "description": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups", + "type": "string" + } + } + }, + "io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus": { + "description": "SubjectAccessReviewStatus", + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "description": "Allowed is required. True if the action would be allowed, false otherwise.", + "type": "boolean" + }, + "evaluationError": { + "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", + "type": "string" + }, + "reason": { + "description": "Reason is optional. It indicates why a request was allowed or denied.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource": { + "description": "Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).", + "type": "integer", + "format": "int32" + }, + "readOnly": { + "description": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "boolean" + }, + "volumeID": { + "description": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Affinity": { + "description": "Affinity is a group of affinity scheduling rules.", + "type": "object", + "properties": { + "nodeAffinity": { + "description": "Describes node affinity scheduling rules for the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeAffinity" + }, + "podAffinity": { + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinity" + }, + "podAntiAffinity": { + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", + "$ref": "#/definitions/io.k8s.api.core.v1.PodAntiAffinity" + } + } + }, + "io.k8s.api.core.v1.AttachedVolume": { + "description": "AttachedVolume describes a volume attached to a node", + "type": "object", + "required": [ + "name", + "devicePath" + ], + "properties": { + "devicePath": { + "description": "DevicePath represents the device path where the volume should be available", + "type": "string" + }, + "name": { + "description": "Name of the attached volume", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.AzureDiskVolumeSource": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "type": "object", + "required": [ + "diskName", + "diskURI" + ], + "properties": { + "cachingMode": { + "description": "Host Caching mode: None, Read Only, Read Write.", + "type": "string" + }, + "diskName": { + "description": "The Name of the data disk in the blob storage", + "type": "string" + }, + "diskURI": { + "description": "The URI the data disk in the blob storage", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "kind": { + "description": "Expected values Shared: mulitple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.AzureFilePersistentVolumeSource": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "type": "object", + "required": [ + "secretName", + "shareName" + ], + "properties": { + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretName": { + "description": "the name of secret that contains Azure Storage Account Name and Key", + "type": "string" + }, + "secretNamespace": { + "description": "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", + "type": "string" + }, + "shareName": { + "description": "Share Name", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.AzureFileVolumeSource": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "type": "object", + "required": [ + "secretName", + "shareName" + ], + "properties": { + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretName": { + "description": "the name of secret that contains Azure Storage Account Name and Key", + "type": "string" + }, + "shareName": { + "description": "Share Name", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Binding": { + "description": "Binding ties one object to another; for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.", + "type": "object", + "required": [ + "target" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "target": { + "description": "The target object that you want to bind to the standard object.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Binding", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.Capabilities": { + "description": "Adds and removes POSIX capabilities from running containers.", + "type": "object", + "properties": { + "add": { + "description": "Added capabilities", + "type": "array", + "items": { + "type": "string" + } + }, + "drop": { + "description": "Removed capabilities", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.CephFSPersistentVolumeSource": { + "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "monitors" + ], + "properties": { + "monitors": { + "description": "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "boolean" + }, + "secretFile": { + "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" + }, + "user": { + "description": "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.CephFSVolumeSource": { + "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "monitors" + ], + "properties": { + "monitors": { + "description": "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "boolean" + }, + "secretFile": { + "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "user": { + "description": "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.CinderVolumeSource": { + "description": "Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "type": "boolean" + }, + "volumeID": { + "description": "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ClientIPConfig": { + "description": "ClientIPConfig represents the configurations of Client IP based session affinity.", + "type": "object", + "properties": { + "timeoutSeconds": { + "description": "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be \u003e0 \u0026\u0026 \u003c=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.ComponentCondition": { + "description": "Information about the condition of a component.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "error": { + "description": "Condition error code for a component. For example, a health check error code.", + "type": "string" + }, + "message": { + "description": "Message about the condition for a component. For example, information about a health check.", + "type": "string" + }, + "status": { + "description": "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", + "type": "string" + }, + "type": { + "description": "Type of condition for a component. Valid value: \"Healthy\"", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ComponentStatus": { + "description": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "conditions": { + "description": "List of component conditions observed", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ComponentCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ComponentStatus", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ComponentStatusList": { + "description": "Status of all the conditions for the component as a list of ComponentStatus objects.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of ComponentStatus objects.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ComponentStatus" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ComponentStatusList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ConfigMap": { + "description": "ConfigMap holds configuration data for pods to consume.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "data": { + "description": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ConfigMap", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ConfigMapEnvSource": { + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.ConfigMapKeySelector": { + "description": "Selects a key from a ConfigMap.", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "The key to select.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's key must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.ConfigMapList": { + "description": "ConfigMapList is a resource containing a list of ConfigMap objects.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of ConfigMaps.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ConfigMapList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ConfigMapProjection": { + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.ConfigMapVolumeSource": { + "description": "Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.Container": { + "description": "A single application container that you want to run within a pod.", + "type": "object", + "required": [ + "name", + "image" + ], + "properties": { + "args": { + "description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "List of environment variables to set in the container. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EnvVar" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "envFrom": { + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EnvFromSource" + } + }, + "image": { + "description": "Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "lifecycle": { + "description": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", + "$ref": "#/definitions/io.k8s.api.core.v1.Lifecycle" + }, + "livenessProbe": { + "description": "Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "name": { + "description": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", + "type": "string" + }, + "ports": { + "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerPort" + }, + "x-kubernetes-patch-merge-key": "containerPort", + "x-kubernetes-patch-strategy": "merge" + }, + "readinessProbe": { + "description": "Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "$ref": "#/definitions/io.k8s.api.core.v1.Probe" + }, + "resources": { + "description": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" + }, + "securityContext": { + "description": "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md", + "$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext" + }, + "stdin": { + "description": "Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.", + "type": "boolean" + }, + "stdinOnce": { + "description": "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false", + "type": "boolean" + }, + "terminationMessagePath": { + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "type": "string" + }, + "tty": { + "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", + "type": "boolean" + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeMount" + }, + "x-kubernetes-patch-merge-key": "mountPath", + "x-kubernetes-patch-strategy": "merge" + }, + "workingDir": { + "description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ContainerImage": { + "description": "Describe a container image", + "type": "object", + "required": [ + "names" + ], + "properties": { + "names": { + "description": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", + "type": "array", + "items": { + "type": "string" + } + }, + "sizeBytes": { + "description": "The size of the image in bytes.", + "type": "integer", + "format": "int64" + } + } + }, + "io.k8s.api.core.v1.ContainerPort": { + "description": "ContainerPort represents a network port in a single container.", + "type": "object", + "required": [ + "containerPort" + ], + "properties": { + "containerPort": { + "description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.", + "type": "integer", + "format": "int32" + }, + "hostIP": { + "description": "What host IP to bind the external port to.", + "type": "string" + }, + "hostPort": { + "description": "Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + "type": "string" + }, + "protocol": { + "description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ContainerState": { + "description": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", + "type": "object", + "properties": { + "running": { + "description": "Details about a running container", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateRunning" + }, + "terminated": { + "description": "Details about a terminated container", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateTerminated" + }, + "waiting": { + "description": "Details about a waiting container", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateWaiting" + } + } + }, + "io.k8s.api.core.v1.ContainerStateRunning": { + "description": "ContainerStateRunning is a running state of a container.", + "type": "object", + "properties": { + "startedAt": { + "description": "Time at which the container was last (re-)started", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.core.v1.ContainerStateTerminated": { + "description": "ContainerStateTerminated is a terminated state of a container.", + "type": "object", + "required": [ + "exitCode" + ], + "properties": { + "containerID": { + "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'", + "type": "string" + }, + "exitCode": { + "description": "Exit status from the last termination of the container", + "type": "integer", + "format": "int32" + }, + "finishedAt": { + "description": "Time at which the container last terminated", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Message regarding the last termination of the container", + "type": "string" + }, + "reason": { + "description": "(brief) reason from the last termination of the container", + "type": "string" + }, + "signal": { + "description": "Signal from the last termination of the container", + "type": "integer", + "format": "int32" + }, + "startedAt": { + "description": "Time at which previous execution of the container started", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.core.v1.ContainerStateWaiting": { + "description": "ContainerStateWaiting is a waiting state of a container.", + "type": "object", + "properties": { + "message": { + "description": "Message regarding why the container is not yet running.", + "type": "string" + }, + "reason": { + "description": "(brief) reason the container is not yet running.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ContainerStatus": { + "description": "ContainerStatus contains details for the current status of this container.", + "type": "object", + "required": [ + "name", + "ready", + "restartCount", + "image", + "imageID" + ], + "properties": { + "containerID": { + "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'.", + "type": "string" + }, + "image": { + "description": "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", + "type": "string" + }, + "imageID": { + "description": "ImageID of the container's image.", + "type": "string" + }, + "lastState": { + "description": "Details about the container's last termination condition.", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerState" + }, + "name": { + "description": "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", + "type": "string" + }, + "ready": { + "description": "Specifies whether the container has passed its readiness probe.", + "type": "boolean" + }, + "restartCount": { + "description": "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", + "type": "integer", + "format": "int32" + }, + "state": { + "description": "Details about the container's current condition.", + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerState" + } + } + }, + "io.k8s.api.core.v1.DaemonEndpoint": { + "description": "DaemonEndpoint contains information about a single Daemon endpoint.", + "type": "object", + "required": [ + "Port" + ], + "properties": { + "Port": { + "description": "Port number of the given endpoint.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.DownwardAPIProjection": { + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "type": "object", + "properties": { + "items": { + "description": "Items is a list of DownwardAPIVolume file", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeFile" + } + } + } + }, + "io.k8s.api.core.v1.DownwardAPIVolumeFile": { + "description": "DownwardAPIVolumeFile represents information to create the file containing the pod field", + "type": "object", + "required": [ + "path" + ], + "properties": { + "fieldRef": { + "description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectFieldSelector" + }, + "mode": { + "description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + "type": "string" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceFieldSelector" + } + } + }, + "io.k8s.api.core.v1.DownwardAPIVolumeSource": { + "description": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "Items is a list of downward API volume file", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeFile" + } + } + } + }, + "io.k8s.api.core.v1.EmptyDirVolumeSource": { + "description": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "medium": { + "description": "What type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + "type": "string" + }, + "sizeLimit": { + "description": "Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + }, + "io.k8s.api.core.v1.EndpointAddress": { + "description": "EndpointAddress is a tuple that describes single IP address.", + "type": "object", + "required": [ + "ip" + ], + "properties": { + "hostname": { + "description": "The Hostname of this endpoint", + "type": "string" + }, + "ip": { + "description": "The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.", + "type": "string" + }, + "nodeName": { + "description": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", + "type": "string" + }, + "targetRef": { + "description": "Reference to object providing the endpoint.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + } + } + }, + "io.k8s.api.core.v1.EndpointPort": { + "description": "EndpointPort is a tuple that describes a single port.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "name": { + "description": "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.", + "type": "string" + }, + "port": { + "description": "The port number of the endpoint.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Must be UDP or TCP. Default is TCP.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.EndpointSubset": { + "description": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", + "type": "object", + "properties": { + "addresses": { + "description": "IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointAddress" + } + }, + "notReadyAddresses": { + "description": "IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointAddress" + } + }, + "ports": { + "description": "Port numbers available on the related IP addresses.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointPort" + } + } + } + }, + "io.k8s.api.core.v1.Endpoints": { + "description": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", + "type": "object", + "required": [ + "subsets" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "subsets": { + "description": "The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.EndpointSubset" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Endpoints", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EndpointsList": { + "description": "EndpointsList is a list of endpoints.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of endpoints.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "EndpointsList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EnvFromSource": { + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "type": "object", + "properties": { + "configMapRef": { + "description": "The ConfigMap to select from", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapEnvSource" + }, + "prefix": { + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + "type": "string" + }, + "secretRef": { + "description": "The Secret to select from", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretEnvSource" + } + } + }, + "io.k8s.api.core.v1.EnvVar": { + "description": "EnvVar represents an environment variable present in a Container.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name of the environment variable. Must be a C_IDENTIFIER.", + "type": "string" + }, + "value": { + "description": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", + "type": "string" + }, + "valueFrom": { + "description": "Source for the environment variable's value. Cannot be used if value is not empty.", + "$ref": "#/definitions/io.k8s.api.core.v1.EnvVarSource" + } + } + }, + "io.k8s.api.core.v1.EnvVarSource": { + "description": "EnvVarSource represents a source for the value of an EnvVar.", + "type": "object", + "properties": { + "configMapKeyRef": { + "description": "Selects a key of a ConfigMap.", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector" + }, + "fieldRef": { + "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectFieldSelector" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceFieldSelector" + }, + "secretKeyRef": { + "description": "Selects a key of a secret in the pod's namespace", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretKeySelector" + } + } + }, + "io.k8s.api.core.v1.Event": { + "description": "Event is a report of an event somewhere in the cluster.", + "type": "object", + "required": [ + "metadata", + "involvedObject" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "count": { + "description": "The number of times this event has occurred.", + "type": "integer", + "format": "int32" + }, + "firstTimestamp": { + "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "involvedObject": { + "description": "The object that this event is about.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "lastTimestamp": { + "description": "The time at which the most recent occurrence of this event was recorded.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "reason": { + "description": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", + "type": "string" + }, + "source": { + "description": "The component reporting this event. Should be a short machine understandable string.", + "$ref": "#/definitions/io.k8s.api.core.v1.EventSource" + }, + "type": { + "description": "Type of this event (Normal, Warning), new types could be added in the future", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Event", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EventList": { + "description": "EventList is a list of events.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of events", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Event" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "EventList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.EventSource": { + "description": "EventSource contains information for an event.", + "type": "object", + "properties": { + "component": { + "description": "Component from which the event is generated.", + "type": "string" + }, + "host": { + "description": "Node name on which the event is generated.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ExecAction": { + "description": "ExecAction describes a \"run in container\" action.", + "type": "object", + "properties": { + "command": { + "description": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.FCVolumeSource": { + "description": "Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "lun": { + "description": "Optional: FC target lun number", + "type": "integer", + "format": "int32" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "targetWWNs": { + "description": "Optional: FC target worldwide names (WWNs)", + "type": "array", + "items": { + "type": "string" + } + }, + "wwids": { + "description": "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.FlexVolumeSource": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", + "type": "object", + "required": [ + "driver" + ], + "properties": { + "driver": { + "description": "Driver is the name of the driver to use for this volume.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.", + "type": "string" + }, + "options": { + "description": "Optional: Extra command options if any.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + } + } + }, + "io.k8s.api.core.v1.FlockerVolumeSource": { + "description": "Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "properties": { + "datasetName": { + "description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated", + "type": "string" + }, + "datasetUUID": { + "description": "UUID of the dataset. This is unique identifier of a Flocker dataset", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.GCEPersistentDiskVolumeSource": { + "description": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "pdName" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "integer", + "format": "int32" + }, + "pdName": { + "description": "Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.GitRepoVolumeSource": { + "description": "Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.", + "type": "object", + "required": [ + "repository" + ], + "properties": { + "directory": { + "description": "Target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.", + "type": "string" + }, + "repository": { + "description": "Repository URL", + "type": "string" + }, + "revision": { + "description": "Commit hash for the specified revision.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.GlusterfsVolumeSource": { + "description": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "endpoints", + "path" + ], + "properties": { + "endpoints": { + "description": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "path": { + "description": "Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.HTTPGetAction": { + "description": "HTTPGetAction describes an action based on HTTP Get requests.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.HTTPHeader" + } + }, + "path": { + "description": "Path to access on the HTTP server.", + "type": "string" + }, + "port": { + "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "scheme": { + "description": "Scheme to use for connecting to the host. Defaults to HTTP.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.HTTPHeader": { + "description": "HTTPHeader describes a custom header to be used in HTTP probes", + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Handler": { + "description": "Handler defines a specific action that should be taken", + "type": "object", + "properties": { + "exec": { + "description": "One and only one of the following should be specified. Exec specifies the action to take.", + "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.", + "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" + } + } + }, + "io.k8s.api.core.v1.HostAlias": { + "description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", + "type": "object", + "properties": { + "hostnames": { + "description": "Hostnames for the above IP address.", + "type": "array", + "items": { + "type": "string" + } + }, + "ip": { + "description": "IP address of the host file entry.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.HostPathVolumeSource": { + "description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "type": "string" + }, + "type": { + "description": "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ISCSIVolumeSource": { + "description": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "targetPortal", + "iqn", + "lun" + ], + "properties": { + "chapAuthDiscovery": { + "description": "whether support iSCSI Discovery CHAP authentication", + "type": "boolean" + }, + "chapAuthSession": { + "description": "whether support iSCSI Session CHAP authentication", + "type": "boolean" + }, + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi", + "type": "string" + }, + "initiatorName": { + "description": "Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.", + "type": "string" + }, + "iqn": { + "description": "Target iSCSI Qualified Name.", + "type": "string" + }, + "iscsiInterface": { + "description": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.", + "type": "string" + }, + "lun": { + "description": "iSCSI target lun number.", + "type": "integer", + "format": "int32" + }, + "portals": { + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", + "type": "boolean" + }, + "secretRef": { + "description": "CHAP secret for iSCSI target and initiator authentication", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "targetPortal": { + "description": "iSCSI target portal. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.KeyToPath": { + "description": "Maps a string key to a path within a volume.", + "type": "object", + "required": [ + "key", + "path" + ], + "properties": { + "key": { + "description": "The key to project.", + "type": "string" + }, + "mode": { + "description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Lifecycle": { + "description": "Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.", + "type": "object", + "properties": { + "postStart": { + "description": "PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + "$ref": "#/definitions/io.k8s.api.core.v1.Handler" + }, + "preStop": { + "description": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", + "$ref": "#/definitions/io.k8s.api.core.v1.Handler" + } + } + }, + "io.k8s.api.core.v1.LimitRange": { + "description": "LimitRange sets resource usage limits for each kind of resource in a Namespace.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "LimitRange", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.LimitRangeItem": { + "description": "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", + "type": "object", + "properties": { + "default": { + "description": "Default resource requirement limit value by resource name if resource limit is omitted.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "defaultRequest": { + "description": "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "max": { + "description": "Max usage constraints on this kind by resource name.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "maxLimitRequestRatio": { + "description": "MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; this represents the max burst for the named resource.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "min": { + "description": "Min usage constraints on this kind by resource name.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "type": { + "description": "Type of resource that this limit applies to.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.LimitRangeList": { + "description": "LimitRangeList is a list of LimitRange items.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "LimitRangeList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.LimitRangeSpec": { + "description": "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", + "type": "object", + "required": [ + "limits" + ], + "properties": { + "limits": { + "description": "Limits is the list of LimitRangeItem objects that are enforced.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeItem" + } + } + } + }, + "io.k8s.api.core.v1.LoadBalancerIngress": { + "description": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", + "type": "object", + "properties": { + "hostname": { + "description": "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", + "type": "string" + }, + "ip": { + "description": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.LoadBalancerStatus": { + "description": "LoadBalancerStatus represents the status of a load-balancer.", + "type": "object", + "properties": { + "ingress": { + "description": "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerIngress" + } + } + } + }, + "io.k8s.api.core.v1.LocalObjectReference": { + "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.LocalVolumeSource": { + "description": "Local represents directly-attached storage with node affinity", + "type": "object", + "required": [ + "path" + ], + "properties": { + "path": { + "description": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.NFSVolumeSource": { + "description": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "server", + "path" + ], + "properties": { + "path": { + "description": "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "boolean" + }, + "server": { + "description": "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Namespace": { + "description": "Namespace provides a scope for Names. Use of multiple namespaces is optional.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceSpec" + }, + "status": { + "description": "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Namespace", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NamespaceList": { + "description": "NamespaceList is a list of Namespaces.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "NamespaceList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NamespaceSpec": { + "description": "NamespaceSpec describes the attributes on a Namespace.", + "type": "object", + "properties": { + "finalizers": { + "description": "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.NamespaceStatus": { + "description": "NamespaceStatus is information about the current status of a Namespace.", + "type": "object", + "properties": { + "phase": { + "description": "Phase is the current lifecycle phase of the namespace. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Node": { + "description": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSpec" + }, + "status": { + "description": "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Node", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NodeAddress": { + "description": "NodeAddress contains information for the node's address.", + "type": "object", + "required": [ + "type", + "address" + ], + "properties": { + "address": { + "description": "The node address.", + "type": "string" + }, + "type": { + "description": "Node address type, one of Hostname, ExternalIP or InternalIP.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.NodeAffinity": { + "description": "Node affinity is a group of node affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PreferredSchedulingTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector" + } + } + }, + "io.k8s.api.core.v1.NodeCondition": { + "description": "NodeCondition contains condition information for a node.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastHeartbeatTime": { + "description": "Last time we got an update on a given condition.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastTransitionTime": { + "description": "Last time the condition transit from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "(brief) reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of node condition.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.NodeConfigSource": { + "description": "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "configMapRef": { + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "NodeConfigSource", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NodeDaemonEndpoints": { + "description": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", + "type": "object", + "properties": { + "kubeletEndpoint": { + "description": "Endpoint on which Kubelet is listening.", + "$ref": "#/definitions/io.k8s.api.core.v1.DaemonEndpoint" + } + } + }, + "io.k8s.api.core.v1.NodeList": { + "description": "NodeList is the whole list of all Nodes which have been registered with master.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of nodes", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Node" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "NodeList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.NodeSelector": { + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "type": "object", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "description": "Required. A list of node selector terms. The terms are ORed.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" + } + } + } + }, + "io.k8s.api.core.v1.NodeSelectorRequirement": { + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "The label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + "type": "string" + }, + "values": { + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.NodeSelectorTerm": { + "description": "A null or empty node selector term matches no objects.", + "type": "object", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "description": "Required. A list of node selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement" + } + } + } + }, + "io.k8s.api.core.v1.NodeSpec": { + "description": "NodeSpec describes the attributes that a node is created with.", + "type": "object", + "properties": { + "configSource": { + "description": "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeConfigSource" + }, + "externalID": { + "description": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.", + "type": "string" + }, + "podCIDR": { + "description": "PodCIDR represents the pod IP range assigned to the node.", + "type": "string" + }, + "providerID": { + "description": "ID of the node assigned by the cloud provider in the format: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e", + "type": "string" + }, + "taints": { + "description": "If specified, the node's taints.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Taint" + } + }, + "unschedulable": { + "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.NodeStatus": { + "description": "NodeStatus is information about the current status of a node.", + "type": "object", + "properties": { + "addresses": { + "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeAddress" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "allocatable": { + "description": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "capacity": { + "description": "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "conditions": { + "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "daemonEndpoints": { + "description": "Endpoints of daemons running on the Node.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeDaemonEndpoints" + }, + "images": { + "description": "List of container images on this node", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerImage" + } + }, + "nodeInfo": { + "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSystemInfo" + }, + "phase": { + "description": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", + "type": "string" + }, + "volumesAttached": { + "description": "List of volumes that are attached to the node.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.AttachedVolume" + } + }, + "volumesInUse": { + "description": "List of attachable volumes in use (mounted) by the node.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.NodeSystemInfo": { + "description": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", + "type": "object", + "required": [ + "machineID", + "systemUUID", + "bootID", + "kernelVersion", + "osImage", + "containerRuntimeVersion", + "kubeletVersion", + "kubeProxyVersion", + "operatingSystem", + "architecture" + ], + "properties": { + "architecture": { + "description": "The Architecture reported by the node", + "type": "string" + }, + "bootID": { + "description": "Boot ID reported by the node.", + "type": "string" + }, + "containerRuntimeVersion": { + "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", + "type": "string" + }, + "kernelVersion": { + "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", + "type": "string" + }, + "kubeProxyVersion": { + "description": "KubeProxy Version reported by the node.", + "type": "string" + }, + "kubeletVersion": { + "description": "Kubelet Version reported by the node.", + "type": "string" + }, + "machineID": { + "description": "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", + "type": "string" + }, + "operatingSystem": { + "description": "The Operating System reported by the node", + "type": "string" + }, + "osImage": { + "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", + "type": "string" + }, + "systemUUID": { + "description": "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ObjectFieldSelector": { + "description": "ObjectFieldSelector selects an APIVersioned field of an object.", + "type": "object", + "required": [ + "fieldPath" + ], + "properties": { + "apiVersion": { + "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", + "type": "string" + }, + "fieldPath": { + "description": "Path of the field to select in the specified API version.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ObjectReference": { + "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "type": "object", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "fieldPath": { + "description": "If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.", + "type": "string" + }, + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", + "type": "string" + }, + "resourceVersion": { + "description": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PersistentVolume": { + "description": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeSpec" + }, + "status": { + "description": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolume", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeClaim": { + "description": "PersistentVolumeClaim is a user's request for and claim to a persistent volume", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimSpec" + }, + "status": { + "description": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolumeClaim", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeClaimList": { + "description": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolumeClaimList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeClaimSpec": { + "description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "resources": { + "description": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" + }, + "selector": { + "description": "A label query over volumes to consider for binding.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeClaimStatus": { + "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "capacity": { + "description": "Represents the actual resources of the underlying volume.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "phase": { + "description": "Phase represents the current phase of PersistentVolumeClaim.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource": { + "description": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).", + "type": "object", + "required": [ + "claimName" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeList": { + "description": "PersistentVolumeList is a list of PersistentVolume items.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PersistentVolumeList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PersistentVolumeSpec": { + "description": "PersistentVolumeSpec is the specification of a persistent volume.", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", + "type": "array", + "items": { + "type": "string" + } + }, + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureFilePersistentVolumeSource" + }, + "capacity": { + "description": "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.CephFSPersistentVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" + }, + "claimRef": { + "description": "ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", + "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. This depends on the Flocker control service being running", + "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a directory on the host. Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. Provisioned by an admin.", + "$ref": "#/definitions/io.k8s.api.core.v1.ISCSIVolumeSource" + }, + "local": { + "description": "Local represents directly-attached storage with node affinity", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalVolumeSource" + }, + "mountOptions": { + "description": "A list of mount options, e.g. [\"ro\", \"soft\"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options", + "type": "array", + "items": { + "type": "string" + } + }, + "nfs": { + "description": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" + }, + "persistentVolumeReclaimPolicy": { + "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", + "type": "string" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" + }, + "storageClassName": { + "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", + "type": "string" + }, + "storageos": { + "description": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "io.k8s.api.core.v1.PersistentVolumeStatus": { + "description": "PersistentVolumeStatus is the current status of a persistent volume.", + "type": "object", + "properties": { + "message": { + "description": "A human-readable message indicating details about why the volume is in this state.", + "type": "string" + }, + "phase": { + "description": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", + "type": "string" + }, + "reason": { + "description": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource": { + "description": "Represents a Photon Controller persistent disk resource.", + "type": "object", + "required": [ + "pdID" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "pdID": { + "description": "ID that identifies Photon Controller persistent disk", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Pod": { + "description": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" + }, + "status": { + "description": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Pod", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodAffinity": { + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" + } + } + } + }, + "io.k8s.api.core.v1.PodAffinityTerm": { + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "type": "object", + "properties": { + "labelSelector": { + "description": "A label query over a set of resources, in this case pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" + }, + "namespaces": { + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", + "type": "array", + "items": { + "type": "string" + } + }, + "topologyKey": { + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PodAntiAffinity": { + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" + } + } + } + }, + "io.k8s.api.core.v1.PodCondition": { + "description": "PodCondition contains details for the current condition of this pod.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "description": "Last time we probed the condition.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + "type": "string" + }, + "type": { + "description": "Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PodList": { + "description": "PodList is a list of Pods.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Pod" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PodList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodSecurityContext": { + "description": "PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.", + "type": "object", + "properties": { + "fsGroup": { + "description": "A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:\n\n1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", + "type": "integer", + "format": "int64" + }, + "runAsNonRoot": { + "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "type": "boolean" + }, + "runAsUser": { + "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "type": "integer", + "format": "int64" + }, + "seLinuxOptions": { + "description": "The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.", + "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" + }, + "supplementalGroups": { + "description": "A list of groups applied to the first process run in each container, in addition to the container's primary GID. If unspecified, no groups will be added to any container.", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + } + }, + "io.k8s.api.core.v1.PodSpec": { + "description": "PodSpec is a description of a pod.", + "type": "object", + "required": [ + "containers" + ], + "properties": { + "activeDeadlineSeconds": { + "description": "Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer.", + "type": "integer", + "format": "int64" + }, + "affinity": { + "description": "If specified, the pod's scheduling constraints", + "$ref": "#/definitions/io.k8s.api.core.v1.Affinity" + }, + "automountServiceAccountToken": { + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", + "type": "boolean" + }, + "containers": { + "description": "List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Container" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "dnsPolicy": { + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + "type": "string" + }, + "hostAliases": { + "description": "HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.HostAlias" + }, + "x-kubernetes-patch-merge-key": "ip", + "x-kubernetes-patch-strategy": "merge" + }, + "hostIPC": { + "description": "Use the host's ipc namespace. Optional: Default to false.", + "type": "boolean" + }, + "hostNetwork": { + "description": "Host networking requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.", + "type": "boolean" + }, + "hostPID": { + "description": "Use the host's pid namespace. Optional: Default to false.", + "type": "boolean" + }, + "hostname": { + "description": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", + "type": "string" + }, + "imagePullSecrets": { + "description": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "initContainers": { + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Container" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "nodeName": { + "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements.", + "type": "string" + }, + "nodeSelector": { + "description": "NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priority": { + "description": "The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority.", + "type": "integer", + "format": "int32" + }, + "priorityClassName": { + "description": "If specified, indicates the pod's priority. \"SYSTEM\" is a special keyword which indicates the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.", + "type": "string" + }, + "restartPolicy": { + "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy", + "type": "string" + }, + "schedulerName": { + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", + "type": "string" + }, + "securityContext": { + "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext" + }, + "serviceAccount": { + "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", + "type": "string" + }, + "serviceAccountName": { + "description": "ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + "type": "string" + }, + "subdomain": { + "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all.", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.", + "type": "integer", + "format": "int64" + }, + "tolerations": { + "description": "If specified, the pod's tolerations.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" + } + }, + "volumes": { + "description": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Volume" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge,retainKeys" + } + } + }, + "io.k8s.api.core.v1.PodStatus": { + "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", + "type": "object", + "properties": { + "conditions": { + "description": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "containerStatuses": { + "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" + } + }, + "hostIP": { + "description": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", + "type": "string" + }, + "initContainerStatuses": { + "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" + } + }, + "message": { + "description": "A human readable message indicating details about why the pod is in this condition.", + "type": "string" + }, + "phase": { + "description": "Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", + "type": "string" + }, + "podIP": { + "description": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", + "type": "string" + }, + "qosClass": { + "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md", + "type": "string" + }, + "reason": { + "description": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", + "type": "string" + }, + "startTime": { + "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + } + } + }, + "io.k8s.api.core.v1.PodTemplate": { + "description": "PodTemplate describes a template for creating copies of a predefined pod.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "template": { + "description": "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PodTemplate", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodTemplateList": { + "description": "PodTemplateList is a list of PodTemplates.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of pod templates", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "PodTemplateList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.PodTemplateSpec": { + "description": "PodTemplateSpec describes the data a pod should have when created from a template", + "type": "object", + "properties": { + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" + } + } + }, + "io.k8s.api.core.v1.PortworxVolumeSource": { + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "type": "object", + "required": [ + "volumeID" + ], + "properties": { + "fsType": { + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "volumeID": { + "description": "VolumeID uniquely identifies a Portworx volume", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.PreferredSchedulingTerm": { + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "type": "object", + "required": [ + "weight", + "preference" + ], + "properties": { + "preference": { + "description": "A node selector term, associated with the corresponding weight.", + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" + }, + "weight": { + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.Probe": { + "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + "type": "object", + "properties": { + "exec": { + "description": "One and only one of the following should be specified. Exec specifies the action to take.", + "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" + }, + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.", + "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" + }, + "initialDelaySeconds": { + "description": "Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "successThreshold": { + "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", + "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.ProjectedVolumeSource": { + "description": "Represents a projected volume source", + "type": "object", + "required": [ + "sources" + ], + "properties": { + "defaultMode": { + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "sources": { + "description": "list of volume projections", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.VolumeProjection" + } + } + } + }, + "io.k8s.api.core.v1.QuobyteVolumeSource": { + "description": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", + "type": "object", + "required": [ + "registry", + "volume" + ], + "properties": { + "group": { + "description": "Group to map volume access to Default is no group", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", + "type": "boolean" + }, + "registry": { + "description": "Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes", + "type": "string" + }, + "user": { + "description": "User to map volume access to Defaults to serivceaccount user", + "type": "string" + }, + "volume": { + "description": "Volume is a string that references an already created Quobyte volume by name.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.RBDVolumeSource": { + "description": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", + "type": "object", + "required": [ + "monitors", + "image" + ], + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd", + "type": "string" + }, + "image": { + "description": "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "keyring": { + "description": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "monitors": { + "description": "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "pool": { + "description": "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "user": { + "description": "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ReplicationController": { + "description": "ReplicationController represents the configuration of a replication controller.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerSpec" + }, + "status": { + "description": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ReplicationController", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ReplicationControllerCondition": { + "description": "ReplicationControllerCondition describes the state of a replication controller at a certain point.", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "The last time the condition transitioned from one status to another.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of replication controller condition.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ReplicationControllerList": { + "description": "ReplicationControllerList is a collection of replication controllers.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ReplicationControllerList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ReplicationControllerSpec": { + "description": "ReplicationControllerSpec is the specification of a replication controller.", + "type": "object", + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Selector is a label query over pods that should match the Replicas count. If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "template": { + "description": "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", + "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" + } + } + }, + "io.k8s.api.core.v1.ReplicationControllerStatus": { + "description": "ReplicationControllerStatus represents the current status of a replication controller.", + "type": "object", + "required": [ + "replicas" + ], + "properties": { + "availableReplicas": { + "description": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a replication controller's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "fullyLabeledReplicas": { + "description": "The number of pods that have labels matching the labels of the pod template of the replication controller.", + "type": "integer", + "format": "int32" + }, + "observedGeneration": { + "description": "ObservedGeneration reflects the generation of the most recently observed replication controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "The number of ready replicas for this replication controller.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.api.core.v1.ResourceFieldSelector": { + "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", + "type": "object", + "required": [ + "resource" + ], + "properties": { + "containerName": { + "description": "Container name: required for volumes, optional for env vars", + "type": "string" + }, + "divisor": { + "description": "Specifies the output format of the exposed resources, defaults to \"1\"", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "resource": { + "description": "Required: resource to select", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ResourceQuota": { + "description": "ResourceQuota sets aggregate quota restrictions enforced per namespace", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaSpec" + }, + "status": { + "description": "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ResourceQuota", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ResourceQuotaList": { + "description": "ResourceQuotaList is a list of ResourceQuota items.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ResourceQuotaList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ResourceQuotaSpec": { + "description": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", + "type": "object", + "properties": { + "hard": { + "description": "Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "scopes": { + "description": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.api.core.v1.ResourceQuotaStatus": { + "description": "ResourceQuotaStatus defines the enforced hard limits and observed use.", + "type": "object", + "properties": { + "hard": { + "description": "Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "used": { + "description": "Used is the current observed total usage of the resource in the namespace.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + } + }, + "io.k8s.api.core.v1.ResourceRequirements": { + "description": "ResourceRequirements describes the compute resource requirements.", + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + }, + "requests": { + "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" + } + } + } + }, + "io.k8s.api.core.v1.SELinuxOptions": { + "description": "SELinuxOptions are the labels to be applied to the container", + "type": "object", + "properties": { + "level": { + "description": "Level is SELinux level label that applies to the container.", + "type": "string" + }, + "role": { + "description": "Role is a SELinux role label that applies to the container.", + "type": "string" + }, + "type": { + "description": "Type is a SELinux type label that applies to the container.", + "type": "string" + }, + "user": { + "description": "User is a SELinux user label that applies to the container.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ScaleIOVolumeSource": { + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "type": "object", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "gateway": { + "description": "The host address of the ScaleIO API Gateway.", + "type": "string" + }, + "protectionDomain": { + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\").", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "sslEnabled": { + "description": "Flag to enable/disable SSL communication with Gateway, default false", + "type": "boolean" + }, + "storageMode": { + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\").", + "type": "string" + }, + "storagePool": { + "description": "The Storage Pool associated with the protection domain (defaults to \"default\").", + "type": "string" + }, + "system": { + "description": "The name of the storage system as configured in ScaleIO.", + "type": "string" + }, + "volumeName": { + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Secret": { + "description": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "data": { + "description": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", + "type": "object", + "additionalProperties": { + "type": "string", + "format": "byte" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "stringData": { + "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Used to facilitate programmatic handling of secret data.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Secret", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.SecretEnvSource": { + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.SecretKeySelector": { + "description": "SecretKeySelector selects a key of a Secret.", + "type": "object", + "required": [ + "key" + ], + "properties": { + "key": { + "description": "The key of the secret to select from. Must be a valid secret key.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or it's key must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.SecretList": { + "description": "SecretList is a list of Secret.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Secret" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "SecretList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.SecretProjection": { + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined", + "type": "boolean" + } + } + }, + "io.k8s.api.core.v1.SecretReference": { + "description": "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", + "type": "object", + "properties": { + "name": { + "description": "Name is unique within a namespace to reference a secret resource.", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which the secret name must be unique.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.SecretVolumeSource": { + "description": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" + } + }, + "optional": { + "description": "Specify whether the Secret or it's keys must be defined", + "type": "boolean" + }, + "secretName": { + "description": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.SecurityContext": { + "description": "SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", + "type": "object", + "properties": { + "allowPrivilegeEscalation": { + "description": "AllowPrivilegeEscalation controls whether a process can gain more privileges than it's parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN", + "type": "boolean" + }, + "capabilities": { + "description": "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", + "$ref": "#/definitions/io.k8s.api.core.v1.Capabilities" + }, + "privileged": { + "description": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", + "type": "boolean" + }, + "readOnlyRootFilesystem": { + "description": "Whether this container has a read-only root filesystem. Default is false.", + "type": "boolean" + }, + "runAsNonRoot": { + "description": "Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "type": "boolean" + }, + "runAsUser": { + "description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "type": "integer", + "format": "int64" + }, + "seLinuxOptions": { + "description": "The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" + } + } + }, + "io.k8s.api.core.v1.Service": { + "description": "Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "description": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ServiceSpec" + }, + "status": { + "description": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "$ref": "#/definitions/io.k8s.api.core.v1.ServiceStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Service", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServiceAccount": { + "description": "ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "automountServiceAccountToken": { + "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", + "type": "boolean" + }, + "imagePullSecrets": { + "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "secrets": { + "description": "Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. More info: https://kubernetes.io/docs/concepts/configuration/secret", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ServiceAccount", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServiceAccountList": { + "description": "ServiceAccountList is a list of ServiceAccount objects", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ServiceAccountList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServiceList": { + "description": "ServiceList holds a list of services.", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "items": { + "description": "List of services", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.Service" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "ServiceList", + "version": "v1" + } + ] + }, + "io.k8s.api.core.v1.ServicePort": { + "description": "ServicePort contains information on service's port.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "name": { + "description": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.", + "type": "string" + }, + "nodePort": { + "description": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", + "type": "integer", + "format": "int32" + }, + "port": { + "description": "The port that will be exposed by this service.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.", + "type": "string" + }, + "targetPort": { + "description": "Number or name of the port to access on the pods targeted by the service. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.core.v1.ServiceSpec": { + "description": "ServiceSpec describes the attributes that a user creates on a service.", + "type": "object", + "properties": { + "clusterIP": { + "description": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "string" + }, + "externalIPs": { + "description": "externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.", + "type": "array", + "items": { + "type": "string" + } + }, + "externalName": { + "description": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.", + "type": "string" + }, + "externalTrafficPolicy": { + "description": "externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. \"Local\" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. \"Cluster\" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading.", + "type": "string" + }, + "healthCheckNodePort": { + "description": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", + "type": "integer", + "format": "int32" + }, + "loadBalancerIP": { + "description": "Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature.", + "type": "string" + }, + "loadBalancerSourceRanges": { + "description": "If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/", + "type": "array", + "items": { + "type": "string" + } + }, + "ports": { + "description": "The list of ports that are exposed by this service. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.api.core.v1.ServicePort" + }, + "x-kubernetes-patch-merge-key": "port", + "x-kubernetes-patch-strategy": "merge" + }, + "publishNotReadyAddresses": { + "description": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field.", + "type": "boolean" + }, + "selector": { + "description": "Route service traffic to pods with label keys and values matching this selector. If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sessionAffinity": { + "description": "Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", + "type": "string" + }, + "sessionAffinityConfig": { + "description": "sessionAffinityConfig contains the configurations of session affinity.", + "$ref": "#/definitions/io.k8s.api.core.v1.SessionAffinityConfig" + }, + "type": { + "description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"ClusterIP\" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.ServiceStatus": { + "description": "ServiceStatus represents the current status of a service.", + "type": "object", + "properties": { + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer, if one is present.", + "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" + } + } + }, + "io.k8s.api.core.v1.SessionAffinityConfig": { + "description": "SessionAffinityConfig represents the configurations of session affinity.", + "type": "object", + "properties": { + "clientIP": { + "description": "clientIP contains the configurations of Client IP based session affinity.", + "$ref": "#/definitions/io.k8s.api.core.v1.ClientIPConfig" + } + } + }, + "io.k8s.api.core.v1.StorageOSPersistentVolumeSource": { + "description": "Represents a StorageOS persistent volume resource.", + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" + }, + "volumeName": { + "description": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + "type": "string" + }, + "volumeNamespace": { + "description": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.StorageOSVolumeSource": { + "description": "Represents a StorageOS persistent volume resource.", + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", + "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" + }, + "volumeName": { + "description": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", + "type": "string" + }, + "volumeNamespace": { + "description": "VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.TCPSocketAction": { + "description": "TCPSocketAction describes an action based on opening a socket", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Optional: Host name to connect to, defaults to the pod IP.", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + } + }, + "io.k8s.api.core.v1.Taint": { + "description": "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", + "type": "object", + "required": [ + "key", + "effect" + ], + "properties": { + "effect": { + "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Required. The taint key to be applied to a node.", + "type": "string" + }, + "timeAdded": { + "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "value": { + "description": "Required. The taint value corresponding to the taint key.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Toleration": { + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "type": "object", + "properties": { + "effect": { + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "type": "string" + }, + "operator": { + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "type": "string" + }, + "tolerationSeconds": { + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + "type": "integer", + "format": "int64" + }, + "value": { + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.Volume": { + "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.AzureFileVolumeSource" + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.CephFSVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" + }, + "configMap": { + "description": "ConfigMap represents a configMap that should populate this volume", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapVolumeSource" + }, + "downwardAPI": { + "description": "DownwardAPI represents downward API about the pod that should populate this volume", + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeSource" + }, + "emptyDir": { + "description": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", + "$ref": "#/definitions/io.k8s.api.core.v1.EmptyDirVolumeSource" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", + "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", + "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", + "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" + }, + "gitRepo": { + "description": "GitRepo represents a git repository at a particular revision.", + "$ref": "#/definitions/io.k8s.api.core.v1.GitRepoVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.ISCSIVolumeSource" + }, + "name": { + "description": "Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "nfs": { + "description": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" + }, + "persistentVolumeClaim": { + "description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" + }, + "projected": { + "description": "Items for all in one resources secrets, configmaps, and downward API", + "$ref": "#/definitions/io.k8s.api.core.v1.ProjectedVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", + "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", + "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" + }, + "secret": { + "description": "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretVolumeSource" + }, + "storageos": { + "description": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", + "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSVolumeSource" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", + "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "io.k8s.api.core.v1.VolumeMount": { + "description": "VolumeMount describes a mounting of a Volume within a container.", + "required": [ + "name", + "mountPath" + ], + "properties": { + "mountPath": { + "description": "Path within the container at which the volume should be mounted. Must not contain ':'.", + "type": "string" + }, + "name": { + "description": "This must match the Name of a Volume.", + "type": "string" + }, + "readOnly": { + "description": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", + "type": "boolean" + }, + "subPath": { + "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.VolumeProjection": { + "description": "Projection that may be projected along with other supported volume types", + "type": "object", + "properties": { + "configMap": { + "description": "information about the configMap data to project", + "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapProjection" + }, + "downwardAPI": { + "description": "information about the downwardAPI data to project", + "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIProjection" + }, + "secret": { + "description": "information about the secret data to project", + "$ref": "#/definitions/io.k8s.api.core.v1.SecretProjection" + } + } + }, + "io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource": { + "description": "Represents a vSphere volume resource.", + "type": "object", + "required": [ + "volumePath" + ], + "properties": { + "fsType": { + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "storagePolicyID": { + "description": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", + "type": "string" + }, + "storagePolicyName": { + "description": "Storage Policy Based Management (SPBM) profile name.", + "type": "string" + }, + "volumePath": { + "description": "Path that identifies vSphere volume vmdk", + "type": "string" + } + } + }, + "io.k8s.api.core.v1.WeightedPodAffinityTerm": { + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "type": "object", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "podAffinityTerm": { + "description": "Required. A pod affinity term, associated with the corresponding weight.", + "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" + }, + "weight": { + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "io.k8s.apimachinery.pkg.api.resource.Quantity": { + "type": "string" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup": { + "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", + "type": "object", + "required": [ + "name", + "versions", + "serverAddressByClientCIDRs" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "name is the name of the group.", + "type": "string" + }, + "preferredVersion": { + "description": "preferredVersion is the version preferred by the API server, which probably is the storage version.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery" + }, + "serverAddressByClientCIDRs": { + "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" + } + }, + "versions": { + "description": "versions are the versions supported in this group.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIGroup", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList": { + "description": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", + "type": "object", + "required": [ + "groups" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "groups": { + "description": "groups is a list of APIGroup.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIGroupList", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", + "type": "object", + "required": [ + "name", + "singularName", + "namespaced", + "kind", + "verbs" + ], + "properties": { + "categories": { + "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "type": "array", + "items": { + "type": "string" + } + }, + "kind": { + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + "type": "string" + }, + "name": { + "description": "name is the plural name of the resource.", + "type": "string" + }, + "namespaced": { + "description": "namespaced indicates if a resource is namespaced or not.", + "type": "boolean" + }, + "shortNames": { + "description": "shortNames is a list of suggested short names of the resource.", + "type": "array", + "items": { + "type": "string" + } + }, + "singularName": { + "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + "type": "string" + }, + "verbs": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", + "type": "object", + "required": [ + "groupVersion", + "resources" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "groupVersion": { + "description": "groupVersion is the group and version this APIResourceList is for.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "resources": { + "description": "resources contains the name of the resources and if they are namespaced.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIResourceList", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions": { + "description": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", + "type": "object", + "required": [ + "versions", + "serverAddressByClientCIDRs" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "serverAddressByClientCIDRs": { + "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" + } + }, + "versions": { + "description": "versions are the api versions that are available.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "APIVersions", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { + "description": "DeleteOptions may be provided when deleting an API object.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "gracePeriodSeconds": { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "type": "integer", + "format": "int64" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "orphanDependents": { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "type": "boolean" + }, + "preconditions": { + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" + }, + "propagationPolicy": { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "admission.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "admissionregistration.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "apps", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "apps", + "kind": "DeleteOptions", + "version": "v1beta2" + }, + { + "group": "authentication.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "authentication.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "autoscaling", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "autoscaling", + "kind": "DeleteOptions", + "version": "v2alpha1" + }, + { + "group": "batch", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "batch", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "batch", + "kind": "DeleteOptions", + "version": "v2alpha1" + }, + { + "group": "certificates.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "extensions", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "federation", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "imagepolicy.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "networking.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "policy", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + }, + { + "group": "scheduling.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "settings.k8s.io", + "kind": "DeleteOptions", + "version": "v1alpha1" + }, + { + "group": "storage.k8s.io", + "kind": "DeleteOptions", + "version": "v1" + }, + { + "group": "storage.k8s.io", + "kind": "DeleteOptions", + "version": "v1beta1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery": { + "description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", + "type": "object", + "required": [ + "groupVersion", + "version" + ], + "properties": { + "groupVersion": { + "description": "groupVersion specifies the API group and version in the form \"group/version\"", + "type": "string" + }, + "version": { + "description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Initializer": { + "description": "Initializer is information about an initializer that has not yet completed.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "name of the process that is responsible for initializing this object.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Initializers": { + "description": "Initializers tracks the progress of initialization.", + "type": "object", + "required": [ + "pending" + ], + "properties": { + "pending": { + "description": "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Initializer" + }, + "x-kubernetes-patch-merge-key": "name", + "x-kubernetes-patch-strategy": "merge" + }, + "result": { + "description": "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement" + } + }, + "matchLabels": { + "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string", + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "type": "object", + "properties": { + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "type": "integer", + "format": "int64" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-patch-strategy": "merge" + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int64" + }, + "initializers": { + "description": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Initializers" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" + }, + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "type": "object", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { + "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", + "type": "object" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions": { + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "type": "object", + "properties": { + "uid": { + "description": "Specifies the target UID.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR": { + "description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", + "type": "object", + "required": [ + "clientCIDR", + "serverAddress" + ], + "properties": { + "clientCIDR": { + "description": "The CIDR with which clients can match their IP to figure out the server address that they should use.", + "type": "string" + }, + "serverAddress": { + "description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { + "description": "Status is a return value for calls that don't return other objects.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources", + "type": "string" + }, + "code": { + "description": "Suggested HTTP return code for this status, 0 if not set.", + "type": "integer", + "format": "int32" + }, + "details": { + "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "message": { + "description": "A human-readable description of the status of this operation.", + "type": "string" + }, + "metadata": { + "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + }, + "reason": { + "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", + "type": "string" + }, + "status": { + "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "Status", + "version": "v1" + } + ] + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause": { + "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", + "type": "object", + "properties": { + "field": { + "description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", + "type": "string" + }, + "message": { + "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", + "type": "string" + }, + "reason": { + "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { + "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", + "type": "object", + "properties": { + "causes": { + "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", + "type": "array", + "items": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" + } + }, + "group": { + "description": "The group attribute of the resource associated with the status StatusReason.", + "type": "string" + }, + "kind": { + "description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", + "type": "string" + }, + "retryAfterSeconds": { + "description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", + "type": "integer", + "format": "int32" + }, + "uid": { + "description": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { + "type": "string", + "format": "date-time" + }, + "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent": { + "description": "Event represents a single event to a watched resource.", + "type": "object", + "required": [ + "type", + "object" + ], + "properties": { + "object": { + "description": "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + "type": "object" + }, + "type": { + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "admission.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "admissionregistration.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "apps", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "apps", + "kind": "WatchEvent", + "version": "v1beta2" + }, + { + "group": "authentication.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "authentication.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "autoscaling", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "autoscaling", + "kind": "WatchEvent", + "version": "v2alpha1" + }, + { + "group": "batch", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "batch", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "batch", + "kind": "WatchEvent", + "version": "v2alpha1" + }, + { + "group": "certificates.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "extensions", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "federation", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "imagepolicy.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "networking.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "policy", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "rbac.authorization.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + }, + { + "group": "scheduling.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "settings.k8s.io", + "kind": "WatchEvent", + "version": "v1alpha1" + }, + { + "group": "storage.k8s.io", + "kind": "WatchEvent", + "version": "v1" + }, + { + "group": "storage.k8s.io", + "kind": "WatchEvent", + "version": "v1beta1" + } + ] + }, + "io.k8s.apimachinery.pkg.util.intstr.IntOrString": { + "type": "string", + "format": "int-or-string" + }, + "io.k8s.apimachinery.pkg.version.Info": { + "description": "Info contains versioning information. how we'll want to distribute that information.", + "type": "object", + "required": [ + "major", + "minor", + "gitVersion", + "gitCommit", + "gitTreeState", + "buildDate", + "goVersion", + "compiler", + "platform" + ], + "properties": { + "buildDate": { + "type": "string" + }, + "compiler": { + "type": "string" + }, + "gitCommit": { + "type": "string" + }, + "gitTreeState": { + "type": "string" + }, + "gitVersion": { + "type": "string" + }, + "goVersion": { + "type": "string" + }, + "major": { + "type": "string" + }, + "minor": { + "type": "string" + }, + "platform": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "BearerToken": { + "description": "Bearer Token authentication", + "type": "apiKey", + "name": "authorization", + "in": "header" + } + }, + "security": [ + { + "BearerToken": [] + } + ] +} diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/testing/openapi.go b/deps/k8s.io/kube-openapi/pkg/util/proto/testing/openapi.go index 4aee2f107..bc280a198 100644 --- a/deps/k8s.io/kube-openapi/pkg/util/proto/testing/openapi.go +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/testing/openapi.go @@ -60,3 +60,9 @@ func (f *Fake) OpenAPISchema() (*openapi_v2.Document, error) { }) return f.document, f.err } + +type Empty struct{} + +func (Empty) OpenAPISchema() (*openapi_v2.Document, error) { + return nil, nil +} diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_suite_test.go b/deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_suite_test.go new file mode 100644 index 000000000..30e4381f9 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_suite_test.go @@ -0,0 +1,49 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/config" + . "github.com/onsi/ginkgo/types" + . "github.com/onsi/gomega" + + "fmt" + "testing" +) + +func TestOpenapi(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecsWithDefaultAndCustomReporters(t, "Openapi Suite", []Reporter{newlineReporter{}}) +} + +// Print a newline after the default newlineReporter due to issue +// https://github.com/jstemmer/go-junit-report/issues/31 +type newlineReporter struct{} + +func (newlineReporter) SpecSuiteWillBegin(config GinkgoConfigType, summary *SuiteSummary) {} + +func (newlineReporter) BeforeSuiteDidRun(setupSummary *SetupSummary) {} + +func (newlineReporter) AfterSuiteDidRun(setupSummary *SetupSummary) {} + +func (newlineReporter) SpecWillRun(specSummary *SpecSummary) {} + +func (newlineReporter) SpecDidComplete(specSummary *SpecSummary) {} + +// SpecSuiteDidEnd Prints a newline between "35 Passed | 0 Failed | 0 Pending | 0 Skipped" and "--- PASS:" +func (newlineReporter) SpecSuiteDidEnd(summary *SuiteSummary) { fmt.Printf("\n") } diff --git a/deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_test.go b/deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_test.go new file mode 100644 index 000000000..dee2eb701 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/util/proto/validation/validation_test.go @@ -0,0 +1,369 @@ +/* +Copyright 2017 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation_test + +import ( + "fmt" + "path/filepath" + + "github.com/ghodss/yaml" + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + + "k8s.io/kube-openapi/pkg/util/proto" + "k8s.io/kube-openapi/pkg/util/proto/testing" + "k8s.io/kube-openapi/pkg/util/proto/validation" +) + +var fakeSchema = testing.Fake{Path: filepath.Join("..", "testdata", "swagger.json")} + +func Validate(models proto.Models, model string, data string) []error { + var obj interface{} + if err := yaml.Unmarshal([]byte(data), &obj); err != nil { + return []error{fmt.Errorf("pre-validation: failed to parse yaml: %v", err)} + } + schema := models.LookupModel(model) + if schema == nil { + return []error{fmt.Errorf("pre-validation: couldn't find model %s", model)} + } + + return validation.ValidateModel(obj, schema, model) +} + +var _ = Describe("resource validation using OpenAPI Schema", func() { + var models proto.Models + BeforeEach(func() { + s, err := fakeSchema.OpenAPISchema() + Expect(err).To(BeNil()) + models, err = proto.NewOpenAPIData(s) + Expect(err).To(BeNil()) + }) + + It("finds Deployment in Schema and validates it", func() { + err := Validate(models, "io.k8s.api.apps.v1beta1.Deployment", ` +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + name: redis-master + name: name +spec: + replicas: 1 + template: + metadata: + labels: + app: redis + spec: + containers: + - image: redis + name: redis +`) + Expect(err).To(BeNil()) + }) + + It("validates a valid pod", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +apiVersion: v1 +kind: Pod +metadata: + labels: + name: redis-master + name: name +spec: + containers: + - args: + - this + - is + - an + - ok + - command + image: gcr.io/fake_project/fake_image:fake_tag + name: master +`) + Expect(err).To(BeNil()) + }) + + It("finds invalid command (string instead of []string) in Json Pod", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +{ + "kind": "Pod", + "apiVersion": "v1", + "metadata": { + "name": "name", + "labels": { + "name": "redis-master" + } + }, + "spec": { + "containers": [ + { + "name": "master", + "image": "gcr.io/fake_project/fake_image:fake_tag", + "args": "this is a bad command" + } + ] + } +} +`) + Expect(err).To(Equal([]error{ + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0].args", + Err: validation.InvalidTypeError{ + Path: "io.k8s.api.core.v1.Container.args", + Expected: "array", + Actual: "string", + }, + }, + })) + }) + + It("fails because hostPort is string instead of int", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +{ + "kind": "Pod", + "apiVersion": "v1", + "metadata": { + "name": "apache-php", + "labels": { + "name": "apache-php" + } + }, + "spec": { + "volumes": [{ + "name": "shared-disk" + }], + "containers": [ + { + "name": "apache-php", + "image": "gcr.io/fake_project/fake_image:fake_tag", + "ports": [ + { + "name": "apache", + "hostPort": "13380", + "containerPort": 80, + "protocol": "TCP" + } + ], + "volumeMounts": [ + { + "name": "shared-disk", + "mountPath": "/var/www/html" + } + ] + } + ] + } +} +`) + + Expect(err).To(Equal([]error{ + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0].ports[0].hostPort", + Err: validation.InvalidTypeError{ + Path: "io.k8s.api.core.v1.ContainerPort.hostPort", + Expected: "integer", + Actual: "string", + }, + }, + })) + + }) + + It("fails because volume is not an array of object", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +{ + "kind": "Pod", + "apiVersion": "v1", + "metadata": { + "name": "apache-php", + "labels": { + "name": "apache-php" + } + }, + "spec": { + "volumes": [ + "name": "shared-disk" + ], + "containers": [ + { + "name": "apache-php", + "image": "gcr.io/fake_project/fake_image:fake_tag", + "ports": [ + { + "name": "apache", + "hostPort": 13380, + "containerPort": 80, + "protocol": "TCP" + } + ], + "volumeMounts": [ + { + "name": "shared-disk", + "mountPath": "/var/www/html" + } + ] + } + ] + } +} +`) + Expect(err).To(BeNil()) + }) + + It("fails because some string lists have empty strings", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +apiVersion: v1 +kind: Pod +metadata: + labels: + name: redis-master + name: name +spec: + containers: + - image: gcr.io/fake_project/fake_image:fake_tag + name: master + args: + - + command: + - +`) + + Expect(err).To(Equal([]error{ + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0].args", + Err: validation.InvalidObjectTypeError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0].args[0]", + Type: "nil", + }, + }, + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0].command", + Err: validation.InvalidObjectTypeError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0].command[0]", + Type: "nil", + }, + }, + })) + }) + + It("fails if required fields are missing", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +apiVersion: v1 +kind: Pod +metadata: + labels: + name: redis-master + name: name +spec: + containers: + - command: ["my", "command"] +`) + + Expect(err).To(Equal([]error{ + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0]", + Err: validation.MissingRequiredFieldError{ + Path: "io.k8s.api.core.v1.Container", + Field: "name", + }, + }, + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0]", + Err: validation.MissingRequiredFieldError{ + Path: "io.k8s.api.core.v1.Container", + Field: "image", + }, + }, + })) + }) + + It("fails if required fields are empty", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +apiVersion: v1 +kind: Pod +metadata: + labels: + name: redis-master + name: name +spec: + containers: + - image: + name: +`) + + Expect(err).To(Equal([]error{ + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0]", + Err: validation.MissingRequiredFieldError{ + Path: "io.k8s.api.core.v1.Container", + Field: "name", + }, + }, + validation.ValidationError{ + Path: "io.k8s.api.core.v1.Pod.spec.containers[0]", + Err: validation.MissingRequiredFieldError{ + Path: "io.k8s.api.core.v1.Container", + Field: "image", + }, + }, + })) + }) + + It("is fine with empty non-mandatory fields", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +apiVersion: v1 +kind: Pod +metadata: + labels: + name: redis-master + name: name +spec: + containers: + - image: image + name: name + command: +`) + + Expect(err).To(BeNil()) + }) + + It("fails because apiVersion is not provided", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +kind: Pod +metadata: + name: name +spec: + containers: + - name: name + image: image +`) + Expect(err).To(BeNil()) + }) + + It("fails because apiVersion type is not string and kind is not provided", func() { + err := Validate(models, "io.k8s.api.core.v1.Pod", ` +apiVersion: 1 +metadata: + name: name +spec: + containers: + - name: name + image: image +`) + Expect(err).To(BeNil()) + }) +}) diff --git a/deps/k8s.io/kube-openapi/pkg/util/sets/empty.go b/deps/k8s.io/kube-openapi/pkg/util/sets/empty.go new file mode 100644 index 000000000..13303ea89 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/util/sets/empty.go @@ -0,0 +1,27 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +// NOTE: This file is copied from k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/sets/empty.go +// because in Kubernetes we don't allowed vendor code to import staging code. See +// https://github.com/kubernetes/kube-openapi/pull/90 for more details. + +package sets + +// Empty is public since it is used by some internal API objects for conversions between external +// string arrays and internal sets, and conversion logic requires public types today. +type Empty struct{} diff --git a/deps/k8s.io/kube-openapi/pkg/util/sets/string.go b/deps/k8s.io/kube-openapi/pkg/util/sets/string.go new file mode 100644 index 000000000..53f2bc12a --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/util/sets/string.go @@ -0,0 +1,207 @@ +/* +Copyright The Kubernetes 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. +*/ + +// Code generated by set-gen. DO NOT EDIT. + +// NOTE: This file is copied from k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/util/sets/string.go +// because in Kubernetes we don't allowed vendor code to import staging code. See +// https://github.com/kubernetes/kube-openapi/pull/90 for more details. + +package sets + +import ( + "reflect" + "sort" +) + +// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. +type String map[string]Empty + +// NewString creates a String from a list of values. +func NewString(items ...string) String { + ss := String{} + ss.Insert(items...) + return ss +} + +// StringKeySet creates a String from a keys of a map[string](? extends interface{}). +// If the value passed in is not actually a map, this will panic. +func StringKeySet(theMap interface{}) String { + v := reflect.ValueOf(theMap) + ret := String{} + + for _, keyValue := range v.MapKeys() { + ret.Insert(keyValue.Interface().(string)) + } + return ret +} + +// Insert adds items to the set. +func (s String) Insert(items ...string) { + for _, item := range items { + s[item] = Empty{} + } +} + +// Delete removes all items from the set. +func (s String) Delete(items ...string) { + for _, item := range items { + delete(s, item) + } +} + +// Has returns true if and only if item is contained in the set. +func (s String) Has(item string) bool { + _, contained := s[item] + return contained +} + +// HasAll returns true if and only if all items are contained in the set. +func (s String) HasAll(items ...string) bool { + for _, item := range items { + if !s.Has(item) { + return false + } + } + return true +} + +// HasAny returns true if any items are contained in the set. +func (s String) HasAny(items ...string) bool { + for _, item := range items { + if s.Has(item) { + return true + } + } + return false +} + +// Difference returns a set of objects that are not in s2 +// For example: +// s1 = {a1, a2, a3} +// s2 = {a1, a2, a4, a5} +// s1.Difference(s2) = {a3} +// s2.Difference(s1) = {a4, a5} +func (s String) Difference(s2 String) String { + result := NewString() + for key := range s { + if !s2.Has(key) { + result.Insert(key) + } + } + return result +} + +// Union returns a new set which includes items in either s1 or s2. +// For example: +// s1 = {a1, a2} +// s2 = {a3, a4} +// s1.Union(s2) = {a1, a2, a3, a4} +// s2.Union(s1) = {a1, a2, a3, a4} +func (s1 String) Union(s2 String) String { + result := NewString() + for key := range s1 { + result.Insert(key) + } + for key := range s2 { + result.Insert(key) + } + return result +} + +// Intersection returns a new set which includes the item in BOTH s1 and s2 +// For example: +// s1 = {a1, a2} +// s2 = {a2, a3} +// s1.Intersection(s2) = {a2} +func (s1 String) Intersection(s2 String) String { + var walk, other String + result := NewString() + if s1.Len() < s2.Len() { + walk = s1 + other = s2 + } else { + walk = s2 + other = s1 + } + for key := range walk { + if other.Has(key) { + result.Insert(key) + } + } + return result +} + +// IsSuperset returns true if and only if s1 is a superset of s2. +func (s1 String) IsSuperset(s2 String) bool { + for item := range s2 { + if !s1.Has(item) { + return false + } + } + return true +} + +// Equal returns true if and only if s1 is equal (as a set) to s2. +// Two sets are equal if their membership is identical. +// (In practice, this means same elements, order doesn't matter) +func (s1 String) Equal(s2 String) bool { + return len(s1) == len(s2) && s1.IsSuperset(s2) +} + +type sortableSliceOfString []string + +func (s sortableSliceOfString) Len() int { return len(s) } +func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } +func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// List returns the contents as a sorted string slice. +func (s String) List() []string { + res := make(sortableSliceOfString, 0, len(s)) + for key := range s { + res = append(res, key) + } + sort.Sort(res) + return []string(res) +} + +// UnsortedList returns the slice with contents in random order. +func (s String) UnsortedList() []string { + res := make([]string, 0, len(s)) + for key := range s { + res = append(res, key) + } + return res +} + +// Returns a single element from the set. +func (s String) PopAny() (string, bool) { + for key := range s { + s.Delete(key) + return key, true + } + var zeroValue string + return zeroValue, false +} + +// Len returns the size of the set. +func (s String) Len() int { + return len(s) +} + +func lessString(lhs, rhs string) bool { + return lhs < rhs +} diff --git a/deps/k8s.io/kube-openapi/pkg/util/util_test.go b/deps/k8s.io/kube-openapi/pkg/util/util_test.go new file mode 100644 index 000000000..f3a1b91a4 --- /dev/null +++ b/deps/k8s.io/kube-openapi/pkg/util/util_test.go @@ -0,0 +1,37 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package util + +import "testing" + +func TestCanonicalName(t *testing.T) { + + var tests = []struct { + input string + expected string + }{ + {"k8s.io/api/core/v1.Pod", "io.k8s.api.core.v1.Pod"}, + {"k8s.io/api/networking/v1/NetworkPolicy", "io.k8s.api.networking.v1.NetworkPolicy"}, + {"k8s.io/api/apps/v1beta2.Scale", "io.k8s.api.apps.v1beta2.Scale"}, + {"servicecatalog.k8s.io/foo/bar/v1alpha1.Baz", "io.k8s.servicecatalog.foo.bar.v1alpha1.Baz"}, + } + for _, test := range tests { + if got := ToCanonicalName(test.input); got != test.expected { + t.Errorf("ToCanonicalName(%q) = %v", test.input, got) + } + } +} diff --git a/deps/k8s.io/kube-openapi/test/integration/README.md b/deps/k8s.io/kube-openapi/test/integration/README.md new file mode 100644 index 000000000..4e4e5fbb7 --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/README.md @@ -0,0 +1,28 @@ +# Kube OpenAPI Integration Tests + +## Running the integration tests + +Within the current directory: + +```bash +$ go test -v . +``` + +## Generating the golden Swagger definition file + +First, run the generator to create `openapi_generated.go` file which specifies +the `OpenAPIDefinition` for each type. + +```bash +$ go run ../../cmd/openapi-gen/openapi-gen.go -i "./testdata/listtype" -o pkg -p generated -O openapi_generated +``` +The generated file `pkg/generated/openapi_generated.go` should have been created. + +Next, run the OpenAPI builder to create the Swagger file which includes +the definitions. The output file named `golden.json` will be output in +the current directory. + +```bash +$ go run builder/main.go golden.json +``` + diff --git a/deps/k8s.io/kube-openapi/test/integration/builder/main.go b/deps/k8s.io/kube-openapi/test/integration/builder/main.go new file mode 100644 index 000000000..7008c574c --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/builder/main.go @@ -0,0 +1,85 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "log" + "os" + + "github.com/go-openapi/spec" + "k8s.io/kube-openapi/pkg/builder" + "k8s.io/kube-openapi/pkg/common" + "k8s.io/kube-openapi/test/integration/pkg/generated" +) + +// TODO: Change this to output the generated swagger to stdout. +const defaultSwaggerFile = "generated.json" + +func main() { + // Get the name of the generated swagger file from the args + // if it exists; otherwise use the default file name. + swaggerFilename := defaultSwaggerFile + if len(os.Args) > 1 { + swaggerFilename = os.Args[1] + } + + // Generate the definition names from the map keys returned + // from GetOpenAPIDefinitions. Anonymous function returning empty + // Ref is not used. + var defNames []string + for name, _ := range generated.GetOpenAPIDefinitions(func(name string) spec.Ref { + return spec.Ref{} + }) { + defNames = append(defNames, name) + } + + // Create a minimal builder config, then call the builder with the definition names. + config := createOpenAPIBuilderConfig() + config.GetDefinitions = generated.GetOpenAPIDefinitions + swagger, serr := builder.BuildOpenAPIDefinitionsForResources(config, defNames...) + if serr != nil { + log.Fatalf("ERROR: %s", serr.Error()) + } + + // Marshal the swagger spec into JSON, then write it out. + specBytes, err := json.MarshalIndent(swagger, " ", " ") + if err != nil { + panic(fmt.Sprintf("json marshal error: %s", err.Error())) + } + err = ioutil.WriteFile(swaggerFilename, specBytes, 0644) + if err != nil { + log.Fatalf("stdout write error: %s", err.Error()) + } +} + +// CreateOpenAPIBuilderConfig hard-codes some values in the API builder +// config for testing. +func createOpenAPIBuilderConfig() *common.Config { + return &common.Config{ + ProtocolList: []string{"https"}, + IgnorePrefixes: []string{"/swaggerapi"}, + Info: &spec.Info{ + InfoProps: spec.InfoProps{ + Title: "Integration Test", + Version: "1.0", + }, + }, + } +} diff --git a/deps/k8s.io/kube-openapi/test/integration/integration_suite_test.go b/deps/k8s.io/kube-openapi/test/integration/integration_suite_test.go new file mode 100644 index 000000000..23a9f4709 --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/integration_suite_test.go @@ -0,0 +1,97 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package integration + +import ( + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "testing" + + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + "github.com/onsi/gomega/gexec" +) + +const ( + testdataDir = "./testdata" + inputDir = testdataDir + "/listtype" + outputBase = "pkg" + outputPackage = "generated" + outputBaseFilename = "openapi_generated" + reportFilename = "test.report" + generatedSwaggerFile = "generated.json" + goldenSwaggerFile = "golden.json" + timeoutSeconds = 5.0 +) + +func TestGenerators(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Integration Test Suite") +} + +var _ = Describe("Open API Definitions Generation", func() { + + var ( + tempDir string + terr error + generatedSwaggerDef string + ) + + BeforeSuite(func() { + // Create a temporary directory for generated swagger files. + tempDir, terr = ioutil.TempDir("", "openapi") + Expect(terr).ShouldNot(HaveOccurred()) + // Build the OpenAPI code generator. + binary_path, berr := gexec.Build("../../cmd/openapi-gen/openapi-gen.go") + Expect(berr).ShouldNot(HaveOccurred()) + // Run the OpenAPI code generator, creating OpenAPIDefinition code + // to be compiled into builder. + command := exec.Command(binary_path, "-i", inputDir, "-o", outputBase, "-p", outputPackage, "-O", outputBaseFilename, "-r", reportFilename) + session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) + Expect(err).ShouldNot(HaveOccurred()) + Eventually(session, timeoutSeconds).Should(gexec.Exit(0)) + + // Create the OpenAPI swagger builder. + binary_path, berr = gexec.Build("./builder/main.go") + Expect(berr).ShouldNot(HaveOccurred()) + // Execute the builder, generating an OpenAPI swagger file with definitions. + generatedSwaggerDef = filepath.Join(tempDir, generatedSwaggerFile) + command = exec.Command(binary_path, generatedSwaggerDef) + command.Dir = testdataDir + session, err = gexec.Start(command, GinkgoWriter, GinkgoWriter) + Expect(err).ShouldNot(HaveOccurred()) + Eventually(session, timeoutSeconds).Should(gexec.Exit(0)) + }) + + AfterSuite(func() { + os.RemoveAll(tempDir) + gexec.CleanupBuildArtifacts() + }) + + Describe("Validating OpenAPI Definition Generation", func() { + It("Generated OpenAPI swagger definitions should match golden files", func() { + // Diff the generated swagger against the golden swagger. Exit code should be zero. + command := exec.Command("diff", goldenSwaggerFile, generatedSwaggerDef) + command.Dir = testdataDir + session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) + Expect(err).ShouldNot(HaveOccurred()) + Eventually(session, timeoutSeconds).Should(gexec.Exit(0)) + }) + }) +}) diff --git a/deps/k8s.io/kube-openapi/test/integration/pkg/generated/openapi_generated.go b/deps/k8s.io/kube-openapi/test/integration/pkg/generated/openapi_generated.go new file mode 100644 index 000000000..43705ccec --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/pkg/generated/openapi_generated.go @@ -0,0 +1,25 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package generated + +import ( + common "k8s.io/kube-openapi/pkg/common" +) + +func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { + return map[string]common.OpenAPIDefinition{} +} diff --git a/deps/k8s.io/kube-openapi/test/integration/testdata/golden.json b/deps/k8s.io/kube-openapi/test/integration/testdata/golden.json new file mode 100644 index 000000000..0eb907804 --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/testdata/golden.json @@ -0,0 +1,68 @@ +{ + "swagger": "2.0", + "info": { + "title": "Integration Test", + "version": "1.0" + }, + "paths": {}, + "definitions": { + "listtype.AtomicList": { + "required": [ + "Field" + ], + "properties": { + "Field": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + } + } + }, + "listtype.Item": { + "required": [ + "Port", + "Protocol" + ], + "properties": { + "Port": { + "type": "integer", + "format": "int32" + }, + "Protocol": { + "type": "string" + } + } + }, + "listtype.MapList": { + "required": [ + "Field" + ], + "properties": { + "Field": { + "type": "array", + "items": { + "$ref": "#/definitions/listtype.Item" + }, + "x-kubernetes-list-map-keys": "port", + "x-kubernetes-list-type": "map" + } + } + }, + "listtype.SetList": { + "required": [ + "Field" + ], + "properties": { + "Field": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + } + } + } \ No newline at end of file diff --git a/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/atomic-list.go b/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/atomic-list.go new file mode 100644 index 000000000..9029ece01 --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/atomic-list.go @@ -0,0 +1,7 @@ +package listtype + +// +k8s:openapi-gen=true +type AtomicList struct { + // +listType=atomic + Field []string +} diff --git a/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/map-list.go b/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/map-list.go new file mode 100644 index 000000000..bb1f693d1 --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/map-list.go @@ -0,0 +1,14 @@ +package listtype + +// +k8s:openapi-gen=true +type Item struct { + Port int + Protocol string +} + +// +k8s:openapi-gen=true +type MapList struct { + // +listType=map + // +listMapKey=port + Field []Item +} diff --git a/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/set-list.go b/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/set-list.go new file mode 100644 index 000000000..bf7b27c53 --- /dev/null +++ b/deps/k8s.io/kube-openapi/test/integration/testdata/listtype/set-list.go @@ -0,0 +1,7 @@ +package listtype + +// +k8s:openapi-gen=true +type SetList struct { + // +listType=set + Field []string +} diff --git a/pkg/operator/operator_leader.go b/pkg/operator/operator_leader.go index 12620edbe..0bfb42911 100644 --- a/pkg/operator/operator_leader.go +++ b/pkg/operator/operator_leader.go @@ -23,6 +23,7 @@ package operator import ( + "context" "fmt" "os" "time" @@ -68,20 +69,21 @@ func (o *Operator) runLeaderElection(lockName string, onStart func(stop <-chan s log.Fatal().Err(err).Msg("Failed to create resource lock") } - leaderelection.RunOrDie(leaderelection.LeaderElectionConfig{ + ctx := context.Background() + leaderelection.RunOrDie(ctx, leaderelection.LeaderElectionConfig{ Lock: rl, LeaseDuration: 15 * time.Second, RenewDeadline: 10 * time.Second, RetryPeriod: 2 * time.Second, Callbacks: leaderelection.LeaderCallbacks{ - OnStartedLeading: func(stop <-chan struct{}) { + OnStartedLeading: func(ctx context.Context) { recordEvent("Leader Election Won", fmt.Sprintf("Pod %s is running as leader", o.Config.PodName)) readyProbe.SetReady() if err := o.setRoleLabel(log, constants.LabelRoleLeader); err != nil { log.Error().Msg("Cannot set leader role on Pod. Terminating process") os.Exit(2) } - onStart(stop) + onStart(ctx.Done()) }, OnStoppedLeading: func() { recordEvent("Stop Leading", fmt.Sprintf("Pod %s is stopping to run as leader", o.Config.PodName)) diff --git a/pkg/storage/pv_creator.go b/pkg/storage/pv_creator.go index 55be5d3d6..e3fa2cc80 100644 --- a/pkg/storage/pv_creator.go +++ b/pkg/storage/pv_creator.go @@ -25,7 +25,6 @@ package storage import ( "context" "crypto/sha1" - "encoding/json" "fmt" "math/rand" "net" @@ -145,17 +144,13 @@ func (ls *LocalStorage) createPV(ctx context.Context, apiObject *api.ArangoLocal // Create a volume pvName := strings.ToLower(apiObject.GetName() + "-" + shortHash(info.NodeName) + "-" + name) volumeMode := v1.PersistentVolumeFilesystem - nodeAff, err := createNodeAffinity(info.NodeName) - if err != nil { - return maskAny(err) // No continue here, since this should just not happen - } + nodeSel := createNodeSelector(info.NodeName) pv := &v1.PersistentVolume{ ObjectMeta: metav1.ObjectMeta{ Name: pvName, Annotations: map[string]string{ - AnnProvisionedBy: storageClassProvisioner, - v1.AlphaStorageNodeAffinityAnnotation: nodeAff, - nodeNameAnnotation: info.NodeName, + AnnProvisionedBy: storageClassProvisioner, + nodeNameAnnotation: info.NodeName, }, Labels: map[string]string{ k8sutil.LabelKeyArangoDeployment: deploymentName, @@ -184,6 +179,9 @@ func (ls *LocalStorage) createPV(ctx context.Context, apiObject *api.ArangoLocal Namespace: claim.GetNamespace(), UID: claim.GetUID(), }, + NodeAffinity: &v1.VolumeNodeAffinity{ + Required: nodeSel, + }, }, } // Attach PV to ArangoLocalStorage @@ -229,27 +227,20 @@ func createValidEndpointList(list *v1.EndpointsList) []string { } // createNodeAffinity creates a node affinity serialized to string. -func createNodeAffinity(nodeName string) (string, error) { - aff := v1.NodeAffinity{ - RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{ - v1.NodeSelectorTerm{ - MatchExpressions: []v1.NodeSelectorRequirement{ - v1.NodeSelectorRequirement{ - Key: "kubernetes.io/hostname", - Operator: v1.NodeSelectorOpIn, - Values: []string{nodeName}, - }, +func createNodeSelector(nodeName string) *v1.NodeSelector { + return &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + v1.NodeSelectorTerm{ + MatchExpressions: []v1.NodeSelectorRequirement{ + v1.NodeSelectorRequirement{ + Key: "kubernetes.io/hostname", + Operator: v1.NodeSelectorOpIn, + Values: []string{nodeName}, }, }, }, }, } - encoded, err := json.Marshal(aff) - if err != nil { - return "", maskAny(err) - } - return string(encoded), nil } // createNodeClientMap creates a map from node name to API. From 7e95b692b530cba591e368f64424dedd6275568c Mon Sep 17 00:00:00 2001 From: Ewout Prangsma Date: Mon, 27 Aug 2018 13:04:17 +0200 Subject: [PATCH 2/3] Updated generated code --- .../v1alpha/zz_generated.deepcopy.go | 311 ++++++++---------- .../v1alpha/zz_generated.deepcopy.go | 56 ++-- .../storage/v1alpha/zz_generated.deepcopy.go | 2 +- .../clientset/versioned/clientset.go | 5 +- pkg/generated/clientset/versioned/doc.go | 3 + .../versioned/fake/clientset_generated.go | 12 +- pkg/generated/clientset/versioned/fake/doc.go | 3 + .../clientset/versioned/fake/register.go | 23 +- .../clientset/versioned/scheme/doc.go | 3 + .../clientset/versioned/scheme/register.go | 23 +- .../deployment/v1alpha/arangodeployment.go | 3 + .../deployment/v1alpha/deployment_client.go | 3 + .../versioned/typed/deployment/v1alpha/doc.go | 3 + .../typed/deployment/v1alpha/fake/doc.go | 3 + .../v1alpha/fake/fake_arangodeployment.go | 5 +- .../v1alpha/fake/fake_deployment_client.go | 3 + .../deployment/v1alpha/generated_expansion.go | 3 + .../v1alpha/arangodeploymentreplication.go | 3 + .../typed/replication/v1alpha/doc.go | 3 + .../typed/replication/v1alpha/fake/doc.go | 3 + .../fake/fake_arangodeploymentreplication.go | 5 +- .../v1alpha/fake/fake_replication_client.go | 3 + .../v1alpha/generated_expansion.go | 3 + .../replication/v1alpha/replication_client.go | 3 + .../storage/v1alpha/arangolocalstorage.go | 3 + .../versioned/typed/storage/v1alpha/doc.go | 3 + .../typed/storage/v1alpha/fake/doc.go | 3 + .../v1alpha/fake/fake_arangolocalstorage.go | 5 +- .../v1alpha/fake/fake_storage_client.go | 3 + .../storage/v1alpha/generated_expansion.go | 3 + .../typed/storage/v1alpha/storage_client.go | 3 + .../externalversions/deployment/interface.go | 2 +- .../deployment/v1alpha/arangodeployment.go | 8 +- .../deployment/v1alpha/interface.go | 2 +- .../informers/externalversions/factory.go | 63 +++- .../informers/externalversions/generic.go | 10 +- .../internalinterfaces/factory_interfaces.go | 2 +- .../externalversions/replication/interface.go | 2 +- .../v1alpha/arangodeploymentreplication.go | 8 +- .../replication/v1alpha/interface.go | 2 +- .../externalversions/storage/interface.go | 2 +- .../storage/v1alpha/arangolocalstorage.go | 8 +- .../storage/v1alpha/interface.go | 2 +- .../deployment/v1alpha/arangodeployment.go | 2 +- .../deployment/v1alpha/expansion_generated.go | 2 +- .../v1alpha/arangodeploymentreplication.go | 2 +- .../v1alpha/expansion_generated.go | 2 +- .../storage/v1alpha/arangolocalstorage.go | 2 +- .../storage/v1alpha/expansion_generated.go | 2 +- 49 files changed, 376 insertions(+), 257 deletions(-) diff --git a/pkg/apis/deployment/v1alpha/zz_generated.deepcopy.go b/pkg/apis/deployment/v1alpha/zz_generated.deepcopy.go index 44c6d3db6..9afc322e4 100644 --- a/pkg/apis/deployment/v1alpha/zz_generated.deepcopy.go +++ b/pkg/apis/deployment/v1alpha/zz_generated.deepcopy.go @@ -20,15 +20,15 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha import ( time "time" - core_v1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -38,12 +38,7 @@ func (in *Action) DeepCopyInto(out *Action) { in.CreationTime.DeepCopyInto(&out.CreationTime) if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime - if *in == nil { - *out = nil - } else { - *out = new(v1.Time) - (*in).DeepCopyInto(*out) - } + *out = (*in).DeepCopy() } return } @@ -124,12 +119,8 @@ func (in *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec) { *out = *in if in.JWTSecretName != nil { in, out := &in.JWTSecretName, &out.JWTSecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -149,30 +140,18 @@ func (in *ChaosSpec) DeepCopyInto(out *ChaosSpec) { *out = *in if in.Enabled != nil { in, out := &in.Enabled, &out.Enabled - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } if in.Interval != nil { in, out := &in.Interval, &out.Interval - if *in == nil { - *out = nil - } else { - *out = new(time.Duration) - **out = **in - } + *out = new(time.Duration) + **out = **in } if in.KillPodProbability != nil { in, out := &in.KillPodProbability, &out.KillPodProbability - if *in == nil { - *out = nil - } else { - *out = new(Percent) - **out = **in - } + *out = new(Percent) + **out = **in } return } @@ -205,62 +184,60 @@ func (in *Condition) DeepCopy() *Condition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ConditionList) DeepCopyInto(out *ConditionList) { + { + in := &in + *out = make(ConditionList, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionList. +func (in ConditionList) DeepCopy() ConditionList { + if in == nil { + return nil + } + out := new(ConditionList) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec) { *out = *in if in.Mode != nil { in, out := &in.Mode, &out.Mode - if *in == nil { - *out = nil - } else { - *out = new(DeploymentMode) - **out = **in - } + *out = new(DeploymentMode) + **out = **in } if in.Environment != nil { in, out := &in.Environment, &out.Environment - if *in == nil { - *out = nil - } else { - *out = new(Environment) - **out = **in - } + *out = new(Environment) + **out = **in } if in.StorageEngine != nil { in, out := &in.StorageEngine, &out.StorageEngine - if *in == nil { - *out = nil - } else { - *out = new(StorageEngine) - **out = **in - } + *out = new(StorageEngine) + **out = **in } if in.Image != nil { in, out := &in.Image, &out.Image - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.ImagePullPolicy != nil { in, out := &in.ImagePullPolicy, &out.ImagePullPolicy - if *in == nil { - *out = nil - } else { - *out = new(core_v1.PullPolicy) - **out = **in - } + *out = new(v1.PullPolicy) + **out = **in } if in.DowntimeAllowed != nil { in, out := &in.DowntimeAllowed, &out.DowntimeAllowed - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } in.ExternalAccess.DeepCopyInto(&out.ExternalAccess) in.RocksDB.DeepCopyInto(&out.RocksDB) @@ -297,12 +274,8 @@ func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { } if in.CurrentImage != nil { in, out := &in.CurrentImage, &out.CurrentImage - if *in == nil { - *out = nil - } else { - *out = new(ImageInfo) - **out = **in - } + *out = new(ImageInfo) + **out = **in } in.Members.DeepCopyInto(&out.Members) if in.Conditions != nil { @@ -321,21 +294,13 @@ func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { } if in.AcceptedSpec != nil { in, out := &in.AcceptedSpec, &out.AcceptedSpec - if *in == nil { - *out = nil - } else { - *out = new(DeploymentSpec) - (*in).DeepCopyInto(*out) - } + *out = new(DeploymentSpec) + (*in).DeepCopyInto(*out) } if in.SecretHashes != nil { in, out := &in.SecretHashes, &out.SecretHashes - if *in == nil { - *out = nil - } else { - *out = new(SecretHashes) - **out = **in - } + *out = new(SecretHashes) + **out = **in } return } @@ -413,30 +378,18 @@ func (in *ExternalAccessSpec) DeepCopyInto(out *ExternalAccessSpec) { *out = *in if in.Type != nil { in, out := &in.Type, &out.Type - if *in == nil { - *out = nil - } else { - *out = new(ExternalAccessType) - **out = **in - } + *out = new(ExternalAccessType) + **out = **in } if in.NodePort != nil { in, out := &in.NodePort, &out.NodePort - if *in == nil { - *out = nil - } else { - *out = new(int) - **out = **in - } + *out = new(int) + **out = **in } if in.LoadBalancerIP != nil { in, out := &in.LoadBalancerIP, &out.LoadBalancerIP - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -467,6 +420,26 @@ func (in *ImageInfo) DeepCopy() *ImageInfo { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ImageInfoList) DeepCopyInto(out *ImageInfoList) { + { + in := &in + *out = make(ImageInfoList, len(*in)) + copy(*out, *in) + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageInfoList. +func (in ImageInfoList) DeepCopy() ImageInfoList { + if in == nil { + return nil + } + out := new(ImageInfoList) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MemberStatus) DeepCopyInto(out *MemberStatus) { *out = *in @@ -480,7 +453,7 @@ func (in *MemberStatus) DeepCopyInto(out *MemberStatus) { } if in.RecentTerminations != nil { in, out := &in.RecentTerminations, &out.RecentTerminations - *out = make([]v1.Time, len(*in)) + *out = make([]metav1.Time, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -498,17 +471,35 @@ func (in *MemberStatus) DeepCopy() *MemberStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in MemberStatusList) DeepCopyInto(out *MemberStatusList) { + { + in := &in + *out = make(MemberStatusList, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MemberStatusList. +func (in MemberStatusList) DeepCopy() MemberStatusList { + if in == nil { + return nil + } + out := new(MemberStatusList) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MonitoringSpec) DeepCopyInto(out *MonitoringSpec) { *out = *in if in.TokenSecretName != nil { in, out := &in.TokenSecretName, &out.TokenSecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -523,17 +514,35 @@ func (in *MonitoringSpec) DeepCopy() *MonitoringSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in Plan) DeepCopyInto(out *Plan) { + { + in := &in + *out = make(Plan, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Plan. +func (in Plan) DeepCopy() Plan { + if in == nil { + return nil + } + out := new(Plan) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RocksDBEncryptionSpec) DeepCopyInto(out *RocksDBEncryptionSpec) { *out = *in if in.KeySecretName != nil { in, out := &in.KeySecretName, &out.KeySecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -586,12 +595,8 @@ func (in *ServerGroupSpec) DeepCopyInto(out *ServerGroupSpec) { *out = *in if in.Count != nil { in, out := &in.Count, &out.Count - if *in == nil { - *out = nil - } else { - *out = new(int) - **out = **in - } + *out = new(int) + **out = **in } if in.Args != nil { in, out := &in.Args, &out.Args @@ -600,29 +605,21 @@ func (in *ServerGroupSpec) DeepCopyInto(out *ServerGroupSpec) { } if in.StorageClassName != nil { in, out := &in.StorageClassName, &out.StorageClassName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } in.Resources.DeepCopyInto(&out.Resources) if in.Tolerations != nil { in, out := &in.Tolerations, &out.Tolerations - *out = make([]core_v1.Toleration, len(*in)) + *out = make([]v1.Toleration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ServiceAccountName != nil { in, out := &in.ServiceAccountName, &out.ServiceAccountName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -642,21 +639,13 @@ func (in *SyncAuthenticationSpec) DeepCopyInto(out *SyncAuthenticationSpec) { *out = *in if in.JWTSecretName != nil { in, out := &in.JWTSecretName, &out.JWTSecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.ClientCASecretName != nil { in, out := &in.ClientCASecretName, &out.ClientCASecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -703,12 +692,8 @@ func (in *SyncSpec) DeepCopyInto(out *SyncSpec) { *out = *in if in.Enabled != nil { in, out := &in.Enabled, &out.Enabled - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } + *out = new(bool) + **out = **in } in.ExternalAccess.DeepCopyInto(&out.ExternalAccess) in.Authentication.DeepCopyInto(&out.Authentication) @@ -732,12 +717,8 @@ func (in *TLSSpec) DeepCopyInto(out *TLSSpec) { *out = *in if in.CASecretName != nil { in, out := &in.CASecretName, &out.CASecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.AltNames != nil { in, out := &in.AltNames, &out.AltNames @@ -746,12 +727,8 @@ func (in *TLSSpec) DeepCopyInto(out *TLSSpec) { } if in.TTL != nil { in, out := &in.TTL, &out.TTL - if *in == nil { - *out = nil - } else { - *out = new(Duration) - **out = **in - } + *out = new(Duration) + **out = **in } return } diff --git a/pkg/apis/replication/v1alpha/zz_generated.deepcopy.go b/pkg/apis/replication/v1alpha/zz_generated.deepcopy.go index ccfa8d871..35206b000 100644 --- a/pkg/apis/replication/v1alpha/zz_generated.deepcopy.go +++ b/pkg/apis/replication/v1alpha/zz_generated.deepcopy.go @@ -20,7 +20,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha @@ -128,6 +128,28 @@ func (in *Condition) DeepCopy() *Condition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in ConditionList) DeepCopyInto(out *ConditionList) { + { + in := &in + *out = make(ConditionList, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + return + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionList. +func (in ConditionList) DeepCopy() ConditionList { + if in == nil { + return nil + } + out := new(ConditionList) + in.DeepCopyInto(out) + return *out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DatabaseStatus) DeepCopyInto(out *DatabaseStatus) { *out = *in @@ -199,21 +221,13 @@ func (in *EndpointAuthenticationSpec) DeepCopyInto(out *EndpointAuthenticationSp *out = *in if in.KeyfileSecretName != nil { in, out := &in.KeyfileSecretName, &out.KeyfileSecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.UserSecretName != nil { in, out := &in.UserSecretName, &out.UserSecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } @@ -233,12 +247,8 @@ func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec) { *out = *in if in.DeploymentName != nil { in, out := &in.DeploymentName, &out.DeploymentName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } if in.MasterEndpoint != nil { in, out := &in.MasterEndpoint, &out.MasterEndpoint @@ -288,12 +298,8 @@ func (in *EndpointTLSSpec) DeepCopyInto(out *EndpointTLSSpec) { *out = *in if in.CASecretName != nil { in, out := &in.CASecretName, &out.CASecretName - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } + *out = new(string) + **out = **in } return } diff --git a/pkg/apis/storage/v1alpha/zz_generated.deepcopy.go b/pkg/apis/storage/v1alpha/zz_generated.deepcopy.go index 94bb9250c..d2b0cd013 100644 --- a/pkg/apis/storage/v1alpha/zz_generated.deepcopy.go +++ b/pkg/apis/storage/v1alpha/zz_generated.deepcopy.go @@ -20,7 +20,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was autogenerated by deepcopy-gen. Do not edit it manually! +// Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/clientset/versioned/clientset.go b/pkg/generated/clientset/versioned/clientset.go index 44936e362..20784842c 100644 --- a/pkg/generated/clientset/versioned/clientset.go +++ b/pkg/generated/clientset/versioned/clientset.go @@ -17,13 +17,15 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package versioned import ( databasev1alpha "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/deployment/v1alpha" replicationv1alpha "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/replication/v1alpha" storagev1alpha "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/typed/storage/v1alpha" - glog "github.com/golang/glog" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -115,7 +117,6 @@ func NewForConfig(c *rest.Config) (*Clientset, error) { cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { - glog.Errorf("failed to create the DiscoveryClient: %v", err) return nil, err } return &cs, nil diff --git a/pkg/generated/clientset/versioned/doc.go b/pkg/generated/clientset/versioned/doc.go index eadca8d06..611123583 100644 --- a/pkg/generated/clientset/versioned/doc.go +++ b/pkg/generated/clientset/versioned/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated clientset. package versioned diff --git a/pkg/generated/clientset/versioned/fake/clientset_generated.go b/pkg/generated/clientset/versioned/fake/clientset_generated.go index 1e3cefd46..00ef7441c 100644 --- a/pkg/generated/clientset/versioned/fake/clientset_generated.go +++ b/pkg/generated/clientset/versioned/fake/clientset_generated.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -46,9 +49,10 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { } } - fakePtr := testing.Fake{} - fakePtr.AddReactor("*", "*", testing.ObjectReaction(o)) - fakePtr.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + cs := &Clientset{} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { gvr := action.GetResource() ns := action.GetNamespace() watch, err := o.Watch(gvr, ns) @@ -58,7 +62,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset { return true, watch, nil }) - return &Clientset{fakePtr, &fakediscovery.FakeDiscovery{Fake: &fakePtr}} + return cs } // Clientset implements clientset.Interface. Meant to be embedded into a diff --git a/pkg/generated/clientset/versioned/fake/doc.go b/pkg/generated/clientset/versioned/fake/doc.go index f49855ef8..abc693b83 100644 --- a/pkg/generated/clientset/versioned/fake/doc.go +++ b/pkg/generated/clientset/versioned/fake/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated fake clientset. package fake diff --git a/pkg/generated/clientset/versioned/fake/register.go b/pkg/generated/clientset/versioned/fake/register.go index 70c37b32b..08555281c 100644 --- a/pkg/generated/clientset/versioned/fake/register.go +++ b/pkg/generated/clientset/versioned/fake/register.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -27,15 +30,16 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var parameterCodec = runtime.NewParameterCodec(scheme) - -func init() { - v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + databasev1alpha.AddToScheme, + replicationv1alpha.AddToScheme, + storagev1alpha.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -48,12 +52,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - databasev1alpha.AddToScheme(scheme) - replicationv1alpha.AddToScheme(scheme) - storagev1alpha.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) } diff --git a/pkg/generated/clientset/versioned/scheme/doc.go b/pkg/generated/clientset/versioned/scheme/doc.go index 0edf246bd..938255afa 100644 --- a/pkg/generated/clientset/versioned/scheme/doc.go +++ b/pkg/generated/clientset/versioned/scheme/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // This package contains the scheme of the automatically generated clientset. package scheme diff --git a/pkg/generated/clientset/versioned/scheme/register.go b/pkg/generated/clientset/versioned/scheme/register.go index de3b9f360..470ea8df3 100644 --- a/pkg/generated/clientset/versioned/scheme/register.go +++ b/pkg/generated/clientset/versioned/scheme/register.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package scheme import ( @@ -27,15 +30,16 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - AddToScheme(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + databasev1alpha.AddToScheme, + replicationv1alpha.AddToScheme, + storagev1alpha.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition @@ -48,12 +52,13 @@ func init() { // ) // // kclientset, _ := kubernetes.NewForConfig(c) -// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. -func AddToScheme(scheme *runtime.Scheme) { - databasev1alpha.AddToScheme(scheme) - replicationv1alpha.AddToScheme(scheme) - storagev1alpha.AddToScheme(scheme) +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) } diff --git a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/arangodeployment.go b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/arangodeployment.go index 59ad656f0..48c30a20f 100644 --- a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/arangodeployment.go +++ b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/arangodeployment.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha import ( diff --git a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/deployment_client.go b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/deployment_client.go index 345033471..75288b76f 100644 --- a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/deployment_client.go +++ b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/deployment_client.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha import ( diff --git a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/doc.go b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/doc.go index f48feba5c..7853ae553 100644 --- a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/doc.go +++ b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha diff --git a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/doc.go b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/doc.go index 6055f5176..7958e7822 100644 --- a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/doc.go +++ b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_arangodeployment.go b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_arangodeployment.go index 8127d727c..7e7e9d749 100644 --- a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_arangodeployment.go +++ b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_arangodeployment.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -63,7 +66,7 @@ func (c *FakeArangoDeployments) List(opts v1.ListOptions) (result *v1alpha.Arang if label == nil { label = labels.Everything() } - list := &v1alpha.ArangoDeploymentList{} + list := &v1alpha.ArangoDeploymentList{ListMeta: obj.(*v1alpha.ArangoDeploymentList).ListMeta} for _, item := range obj.(*v1alpha.ArangoDeploymentList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_deployment_client.go b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_deployment_client.go index 472e7def9..be0eda489 100644 --- a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_deployment_client.go +++ b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/fake/fake_deployment_client.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/generated_expansion.go b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/generated_expansion.go index 2e36f2670..ba13ce770 100644 --- a/pkg/generated/clientset/versioned/typed/deployment/v1alpha/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/deployment/v1alpha/generated_expansion.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha type ArangoDeploymentExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/replication/v1alpha/arangodeploymentreplication.go b/pkg/generated/clientset/versioned/typed/replication/v1alpha/arangodeploymentreplication.go index b548a7665..2c0a45dba 100644 --- a/pkg/generated/clientset/versioned/typed/replication/v1alpha/arangodeploymentreplication.go +++ b/pkg/generated/clientset/versioned/typed/replication/v1alpha/arangodeploymentreplication.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha import ( diff --git a/pkg/generated/clientset/versioned/typed/replication/v1alpha/doc.go b/pkg/generated/clientset/versioned/typed/replication/v1alpha/doc.go index f48feba5c..7853ae553 100644 --- a/pkg/generated/clientset/versioned/typed/replication/v1alpha/doc.go +++ b/pkg/generated/clientset/versioned/typed/replication/v1alpha/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha diff --git a/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/doc.go b/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/doc.go index 6055f5176..7958e7822 100644 --- a/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/doc.go +++ b/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_arangodeploymentreplication.go b/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_arangodeploymentreplication.go index 96c937aed..6cc260310 100644 --- a/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_arangodeploymentreplication.go +++ b/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_arangodeploymentreplication.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -63,7 +66,7 @@ func (c *FakeArangoDeploymentReplications) List(opts v1.ListOptions) (result *v1 if label == nil { label = labels.Everything() } - list := &v1alpha.ArangoDeploymentReplicationList{} + list := &v1alpha.ArangoDeploymentReplicationList{ListMeta: obj.(*v1alpha.ArangoDeploymentReplicationList).ListMeta} for _, item := range obj.(*v1alpha.ArangoDeploymentReplicationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_replication_client.go b/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_replication_client.go index bea672c63..57b33879c 100644 --- a/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_replication_client.go +++ b/pkg/generated/clientset/versioned/typed/replication/v1alpha/fake/fake_replication_client.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/pkg/generated/clientset/versioned/typed/replication/v1alpha/generated_expansion.go b/pkg/generated/clientset/versioned/typed/replication/v1alpha/generated_expansion.go index c102dfab5..7574264ab 100644 --- a/pkg/generated/clientset/versioned/typed/replication/v1alpha/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/replication/v1alpha/generated_expansion.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha type ArangoDeploymentReplicationExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/replication/v1alpha/replication_client.go b/pkg/generated/clientset/versioned/typed/replication/v1alpha/replication_client.go index a2ae5c1c2..a9401e90b 100644 --- a/pkg/generated/clientset/versioned/typed/replication/v1alpha/replication_client.go +++ b/pkg/generated/clientset/versioned/typed/replication/v1alpha/replication_client.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha import ( diff --git a/pkg/generated/clientset/versioned/typed/storage/v1alpha/arangolocalstorage.go b/pkg/generated/clientset/versioned/typed/storage/v1alpha/arangolocalstorage.go index 3a09820df..b02118dfc 100644 --- a/pkg/generated/clientset/versioned/typed/storage/v1alpha/arangolocalstorage.go +++ b/pkg/generated/clientset/versioned/typed/storage/v1alpha/arangolocalstorage.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha import ( diff --git a/pkg/generated/clientset/versioned/typed/storage/v1alpha/doc.go b/pkg/generated/clientset/versioned/typed/storage/v1alpha/doc.go index f48feba5c..7853ae553 100644 --- a/pkg/generated/clientset/versioned/typed/storage/v1alpha/doc.go +++ b/pkg/generated/clientset/versioned/typed/storage/v1alpha/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // This package has the automatically generated typed clients. package v1alpha diff --git a/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/doc.go b/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/doc.go index 6055f5176..7958e7822 100644 --- a/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/doc.go +++ b/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/doc.go @@ -17,5 +17,8 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + // Package fake has the automatically generated clients. package fake diff --git a/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_arangolocalstorage.go b/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_arangolocalstorage.go index 833e7c550..194505a26 100644 --- a/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_arangolocalstorage.go +++ b/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_arangolocalstorage.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( @@ -60,7 +63,7 @@ func (c *FakeArangoLocalStorages) List(opts v1.ListOptions) (result *v1alpha.Ara if label == nil { label = labels.Everything() } - list := &v1alpha.ArangoLocalStorageList{} + list := &v1alpha.ArangoLocalStorageList{ListMeta: obj.(*v1alpha.ArangoLocalStorageList).ListMeta} for _, item := range obj.(*v1alpha.ArangoLocalStorageList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) diff --git a/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_storage_client.go b/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_storage_client.go index e1fbbe983..272b74901 100644 --- a/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_storage_client.go +++ b/pkg/generated/clientset/versioned/typed/storage/v1alpha/fake/fake_storage_client.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package fake import ( diff --git a/pkg/generated/clientset/versioned/typed/storage/v1alpha/generated_expansion.go b/pkg/generated/clientset/versioned/typed/storage/v1alpha/generated_expansion.go index a9dd0388e..68b91f2e1 100644 --- a/pkg/generated/clientset/versioned/typed/storage/v1alpha/generated_expansion.go +++ b/pkg/generated/clientset/versioned/typed/storage/v1alpha/generated_expansion.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha type ArangoLocalStorageExpansion interface{} diff --git a/pkg/generated/clientset/versioned/typed/storage/v1alpha/storage_client.go b/pkg/generated/clientset/versioned/typed/storage/v1alpha/storage_client.go index b2358f01d..886dbe8cd 100644 --- a/pkg/generated/clientset/versioned/typed/storage/v1alpha/storage_client.go +++ b/pkg/generated/clientset/versioned/typed/storage/v1alpha/storage_client.go @@ -17,6 +17,9 @@ // // Copyright holder is ArangoDB GmbH, Cologne, Germany // + +// Code generated by client-gen. DO NOT EDIT. + package v1alpha import ( diff --git a/pkg/generated/informers/externalversions/deployment/interface.go b/pkg/generated/informers/externalversions/deployment/interface.go index 870850685..9b0cc7e5b 100644 --- a/pkg/generated/informers/externalversions/deployment/interface.go +++ b/pkg/generated/informers/externalversions/deployment/interface.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package database diff --git a/pkg/generated/informers/externalversions/deployment/v1alpha/arangodeployment.go b/pkg/generated/informers/externalversions/deployment/v1alpha/arangodeployment.go index d5498e0ac..7c1ae444d 100644 --- a/pkg/generated/informers/externalversions/deployment/v1alpha/arangodeployment.go +++ b/pkg/generated/informers/externalversions/deployment/v1alpha/arangodeployment.go @@ -18,14 +18,14 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha import ( time "time" - deployment_v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1alpha" + deploymentv1alpha "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1alpha" versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned" internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces" v1alpha "github.com/arangodb/kube-arangodb/pkg/generated/listers/deployment/v1alpha" @@ -74,7 +74,7 @@ func NewFilteredArangoDeploymentInformer(client versioned.Interface, namespace s return client.DatabaseV1alpha().ArangoDeployments(namespace).Watch(options) }, }, - &deployment_v1alpha.ArangoDeployment{}, + &deploymentv1alpha.ArangoDeployment{}, resyncPeriod, indexers, ) @@ -85,7 +85,7 @@ func (f *arangoDeploymentInformer) defaultInformer(client versioned.Interface, r } func (f *arangoDeploymentInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&deployment_v1alpha.ArangoDeployment{}, f.defaultInformer) + return f.factory.InformerFor(&deploymentv1alpha.ArangoDeployment{}, f.defaultInformer) } func (f *arangoDeploymentInformer) Lister() v1alpha.ArangoDeploymentLister { diff --git a/pkg/generated/informers/externalversions/deployment/v1alpha/interface.go b/pkg/generated/informers/externalversions/deployment/v1alpha/interface.go index 4fbbb770e..1825ffa1c 100644 --- a/pkg/generated/informers/externalversions/deployment/v1alpha/interface.go +++ b/pkg/generated/informers/externalversions/deployment/v1alpha/interface.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/informers/externalversions/factory.go b/pkg/generated/informers/externalversions/factory.go index c88fc2a3f..fc58ab927 100644 --- a/pkg/generated/informers/externalversions/factory.go +++ b/pkg/generated/informers/externalversions/factory.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -38,12 +38,16 @@ import ( cache "k8s.io/client-go/tools/cache" ) +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + type sharedInformerFactory struct { client versioned.Interface namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc lock sync.Mutex defaultResync time.Duration + customResync map[reflect.Type]time.Duration informers map[reflect.Type]cache.SharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -51,23 +55,62 @@ type sharedInformerFactory struct { startedInformers map[reflect.Type]bool } -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewFilteredSharedInformerFactory(client, defaultResync, v1.NamespaceAll, nil) + return NewSharedInformerFactoryWithOptions(client, defaultResync) } // NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. // Listers obtained via this SharedInformerFactory will be subject to the same filters // as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return &sharedInformerFactory{ + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ client: client, - namespace: namespace, - tweakListOptions: tweakListOptions, + namespace: v1.NamespaceAll, defaultResync: defaultResync, informers: make(map[reflect.Type]cache.SharedIndexInformer), startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) } + + return factory } // Start initializes all requested informers. @@ -116,7 +159,13 @@ func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internal if exists { return informer } - informer = newFunc(f.client, f.defaultResync) + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) f.informers[informerType] = informer return informer diff --git a/pkg/generated/informers/externalversions/generic.go b/pkg/generated/informers/externalversions/generic.go index b169aa0ef..c94e774a4 100644 --- a/pkg/generated/informers/externalversions/generic.go +++ b/pkg/generated/informers/externalversions/generic.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package externalversions @@ -26,8 +26,8 @@ import ( "fmt" v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1alpha" - replication_v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1alpha" - storage_v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha" + replicationv1alpha "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1alpha" + storagev1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" ) @@ -63,11 +63,11 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Database().V1alpha().ArangoDeployments().Informer()}, nil // Group=replication.database.arangodb.com, Version=v1alpha - case replication_v1alpha.SchemeGroupVersion.WithResource("arangodeploymentreplications"): + case replicationv1alpha.SchemeGroupVersion.WithResource("arangodeploymentreplications"): return &genericInformer{resource: resource.GroupResource(), informer: f.Replication().V1alpha().ArangoDeploymentReplications().Informer()}, nil // Group=storage.arangodb.com, Version=v1alpha - case storage_v1alpha.SchemeGroupVersion.WithResource("arangolocalstorages"): + case storagev1alpha.SchemeGroupVersion.WithResource("arangolocalstorages"): return &genericInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha().ArangoLocalStorages().Informer()}, nil } diff --git a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go index e2a568374..ea4e3c3ca 100644 --- a/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/generated/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package internalinterfaces diff --git a/pkg/generated/informers/externalversions/replication/interface.go b/pkg/generated/informers/externalversions/replication/interface.go index 6c7a3bcfb..d4bbb9c43 100644 --- a/pkg/generated/informers/externalversions/replication/interface.go +++ b/pkg/generated/informers/externalversions/replication/interface.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package replication diff --git a/pkg/generated/informers/externalversions/replication/v1alpha/arangodeploymentreplication.go b/pkg/generated/informers/externalversions/replication/v1alpha/arangodeploymentreplication.go index 2c45a1651..3e491e1d2 100644 --- a/pkg/generated/informers/externalversions/replication/v1alpha/arangodeploymentreplication.go +++ b/pkg/generated/informers/externalversions/replication/v1alpha/arangodeploymentreplication.go @@ -18,14 +18,14 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha import ( time "time" - replication_v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1alpha" + replicationv1alpha "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1alpha" versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned" internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces" v1alpha "github.com/arangodb/kube-arangodb/pkg/generated/listers/replication/v1alpha" @@ -74,7 +74,7 @@ func NewFilteredArangoDeploymentReplicationInformer(client versioned.Interface, return client.ReplicationV1alpha().ArangoDeploymentReplications(namespace).Watch(options) }, }, - &replication_v1alpha.ArangoDeploymentReplication{}, + &replicationv1alpha.ArangoDeploymentReplication{}, resyncPeriod, indexers, ) @@ -85,7 +85,7 @@ func (f *arangoDeploymentReplicationInformer) defaultInformer(client versioned.I } func (f *arangoDeploymentReplicationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&replication_v1alpha.ArangoDeploymentReplication{}, f.defaultInformer) + return f.factory.InformerFor(&replicationv1alpha.ArangoDeploymentReplication{}, f.defaultInformer) } func (f *arangoDeploymentReplicationInformer) Lister() v1alpha.ArangoDeploymentReplicationLister { diff --git a/pkg/generated/informers/externalversions/replication/v1alpha/interface.go b/pkg/generated/informers/externalversions/replication/v1alpha/interface.go index c5f378749..aaa561ee3 100644 --- a/pkg/generated/informers/externalversions/replication/v1alpha/interface.go +++ b/pkg/generated/informers/externalversions/replication/v1alpha/interface.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/informers/externalversions/storage/interface.go b/pkg/generated/informers/externalversions/storage/interface.go index 86dd7b1ce..a6f3eb9b3 100644 --- a/pkg/generated/informers/externalversions/storage/interface.go +++ b/pkg/generated/informers/externalversions/storage/interface.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package storage diff --git a/pkg/generated/informers/externalversions/storage/v1alpha/arangolocalstorage.go b/pkg/generated/informers/externalversions/storage/v1alpha/arangolocalstorage.go index 62ece31db..f11c6d76b 100644 --- a/pkg/generated/informers/externalversions/storage/v1alpha/arangolocalstorage.go +++ b/pkg/generated/informers/externalversions/storage/v1alpha/arangolocalstorage.go @@ -18,14 +18,14 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha import ( time "time" - storage_v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha" + storagev1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha" versioned "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned" internalinterfaces "github.com/arangodb/kube-arangodb/pkg/generated/informers/externalversions/internalinterfaces" v1alpha "github.com/arangodb/kube-arangodb/pkg/generated/listers/storage/v1alpha" @@ -73,7 +73,7 @@ func NewFilteredArangoLocalStorageInformer(client versioned.Interface, resyncPer return client.StorageV1alpha().ArangoLocalStorages().Watch(options) }, }, - &storage_v1alpha.ArangoLocalStorage{}, + &storagev1alpha.ArangoLocalStorage{}, resyncPeriod, indexers, ) @@ -84,7 +84,7 @@ func (f *arangoLocalStorageInformer) defaultInformer(client versioned.Interface, } func (f *arangoLocalStorageInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&storage_v1alpha.ArangoLocalStorage{}, f.defaultInformer) + return f.factory.InformerFor(&storagev1alpha.ArangoLocalStorage{}, f.defaultInformer) } func (f *arangoLocalStorageInformer) Lister() v1alpha.ArangoLocalStorageLister { diff --git a/pkg/generated/informers/externalversions/storage/v1alpha/interface.go b/pkg/generated/informers/externalversions/storage/v1alpha/interface.go index d410030ea..d08509158 100644 --- a/pkg/generated/informers/externalversions/storage/v1alpha/interface.go +++ b/pkg/generated/informers/externalversions/storage/v1alpha/interface.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by informer-gen +// Code generated by informer-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/listers/deployment/v1alpha/arangodeployment.go b/pkg/generated/listers/deployment/v1alpha/arangodeployment.go index 9b1258f59..d64a41e24 100644 --- a/pkg/generated/listers/deployment/v1alpha/arangodeployment.go +++ b/pkg/generated/listers/deployment/v1alpha/arangodeployment.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/listers/deployment/v1alpha/expansion_generated.go b/pkg/generated/listers/deployment/v1alpha/expansion_generated.go index 1e8cad6f6..cc93e7d4f 100644 --- a/pkg/generated/listers/deployment/v1alpha/expansion_generated.go +++ b/pkg/generated/listers/deployment/v1alpha/expansion_generated.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/listers/replication/v1alpha/arangodeploymentreplication.go b/pkg/generated/listers/replication/v1alpha/arangodeploymentreplication.go index 09bdea528..2aa86e8ff 100644 --- a/pkg/generated/listers/replication/v1alpha/arangodeploymentreplication.go +++ b/pkg/generated/listers/replication/v1alpha/arangodeploymentreplication.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/listers/replication/v1alpha/expansion_generated.go b/pkg/generated/listers/replication/v1alpha/expansion_generated.go index 51d8b72b8..1dd6ef1f3 100644 --- a/pkg/generated/listers/replication/v1alpha/expansion_generated.go +++ b/pkg/generated/listers/replication/v1alpha/expansion_generated.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/listers/storage/v1alpha/arangolocalstorage.go b/pkg/generated/listers/storage/v1alpha/arangolocalstorage.go index 7a89e9306..aee87946d 100644 --- a/pkg/generated/listers/storage/v1alpha/arangolocalstorage.go +++ b/pkg/generated/listers/storage/v1alpha/arangolocalstorage.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha diff --git a/pkg/generated/listers/storage/v1alpha/expansion_generated.go b/pkg/generated/listers/storage/v1alpha/expansion_generated.go index 76e4cd4fe..917b607b3 100644 --- a/pkg/generated/listers/storage/v1alpha/expansion_generated.go +++ b/pkg/generated/listers/storage/v1alpha/expansion_generated.go @@ -18,7 +18,7 @@ // Copyright holder is ArangoDB GmbH, Cologne, Germany // -// This file was automatically generated by lister-gen +// Code generated by lister-gen. DO NOT EDIT. package v1alpha From 4a096f28b38c18ee29ef8118329121536825b775 Mon Sep 17 00:00:00 2001 From: Ewout Prangsma Date: Mon, 27 Aug 2018 13:12:02 +0200 Subject: [PATCH 3/3] Fixed unit tests --- pkg/storage/pv_creator_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/storage/pv_creator_test.go b/pkg/storage/pv_creator_test.go index bbc4311a2..cf4ff2c03 100644 --- a/pkg/storage/pv_creator_test.go +++ b/pkg/storage/pv_creator_test.go @@ -24,6 +24,7 @@ package storage import ( "context" + "encoding/json" "testing" "github.com/stretchr/testify/assert" @@ -83,16 +84,17 @@ func TestCreateValidEndpointList(t *testing.T) { } } -// TestCreateNodeAffinity tests createNodeAffinity. -func TestCreateNodeAffinity(t *testing.T) { +// TestCreateNodeSelector tests createNodeSelector. +func TestCreateNodeSelector(t *testing.T) { tests := map[string]string{ - "foo": "{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"kubernetes.io/hostname\",\"operator\":\"In\",\"values\":[\"foo\"]}]}]}}", - "bar": "{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"kubernetes.io/hostname\",\"operator\":\"In\",\"values\":[\"bar\"]}]}]}}", + "foo": "{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"kubernetes.io/hostname\",\"operator\":\"In\",\"values\":[\"foo\"]}]}]}", + "bar": "{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"kubernetes.io/hostname\",\"operator\":\"In\",\"values\":[\"bar\"]}]}]}", } for input, expected := range tests { - output, err := createNodeAffinity(input) + sel := createNodeSelector(input) + output, err := json.Marshal(sel) assert.NoError(t, err) - assert.Equal(t, expected, output, "Input: '%s'", input) + assert.Equal(t, expected, string(output), "Input: '%s'", input) } }